summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/README6
-rw-r--r--mysql-test/asan.supp1
-rw-r--r--mysql-test/collections/smoke_test2
-rw-r--r--mysql-test/include/analyze-format.inc2
-rw-r--r--mysql-test/include/check-testcase.test4
-rw-r--r--mysql-test/include/column_compression_rpl.inc2
-rw-r--r--mysql-test/include/commit.inc15
-rw-r--r--mysql-test/include/common-tests.inc8
-rw-r--r--mysql-test/include/concurrent.inc52
-rw-r--r--mysql-test/include/ctype_common.inc2
-rw-r--r--mysql-test/include/ctype_heap.inc2
-rw-r--r--mysql-test/include/ctype_ident_sys.inc73
-rw-r--r--mysql-test/include/ctype_pad_all_engines.inc6
-rw-r--r--mysql-test/include/ctype_strtoll10.inc2
-rw-r--r--mysql-test/include/deadlock.inc4
-rw-r--r--mysql-test/include/default_client.cnf3
-rw-r--r--mysql-test/include/default_mysqld.cnf17
-rw-r--r--mysql-test/include/function_defaults.inc2
-rw-r--r--mysql-test/include/galera_cluster.inc23
-rw-r--r--mysql-test/include/galera_variables_ok.inc2
-rw-r--r--mysql-test/include/galera_variables_ok_debug.inc2
-rw-r--r--mysql-test/include/have_dbi_dbd-mariadb.inc (renamed from mysql-test/include/have_dbi_dbd-mysql.inc)10
-rw-r--r--mysql-test/include/have_pool_of_threads.inc3
-rw-r--r--mysql-test/include/have_s3.inc10
-rw-r--r--mysql-test/include/have_type_mysql_json.inc3
-rw-r--r--mysql-test/include/have_type_mysql_json.opt2
-rw-r--r--mysql-test/include/icp_tests.inc7
-rw-r--r--mysql-test/include/index_merge1.inc4
-rw-r--r--mysql-test/include/innodb_checksum_algorithm.combinations2
-rw-r--r--mysql-test/include/kill_and_restart_mysqld.inc15
-rw-r--r--mysql-test/include/load_dump_and_upgrade.inc49
-rw-r--r--mysql-test/include/loaddata_autocom.inc2
-rw-r--r--mysql-test/include/maybe_pool_of_threads.combinations5
-rw-r--r--mysql-test/include/maybe_pool_of_threads.inc2
-rw-r--r--mysql-test/include/mix1.inc4
-rw-r--r--mysql-test/include/mix2.inc28
-rw-r--r--mysql-test/include/mysqlhotcopy.inc4
-rw-r--r--mysql-test/include/not_threadpool.inc3
-rw-r--r--mysql-test/include/not_windows.inc2
-rw-r--r--mysql-test/include/partition_mrr.inc6
-rw-r--r--mysql-test/include/percona_nonflushing_analyze_debug.inc35
-rw-r--r--mysql-test/include/ps_conv.inc16
-rw-r--r--mysql-test/include/query_cache.inc6
-rw-r--r--mysql-test/include/query_cache_partitions.inc2
-rw-r--r--mysql-test/include/read_many_rows.inc2
-rw-r--r--mysql-test/include/rowid_order.inc2
-rw-r--r--mysql-test/include/search_pattern_in_file.inc13
-rw-r--r--mysql-test/include/show_events.inc6
-rw-r--r--mysql-test/include/shutdown_mysqld.inc10
-rw-r--r--mysql-test/include/unsafe_binlog.inc6
-rw-r--r--mysql-test/include/wait_for_sql_thread_read_all.inc2
-rw-r--r--mysql-test/include/wsrep_wait_condition.inc23
-rw-r--r--mysql-test/include/wsrep_wait_disconnect.inc20
-rw-r--r--mysql-test/include/wsrep_wait_membership.inc10
-rw-r--r--mysql-test/lib/My/ConfigFactory.pm3
-rw-r--r--mysql-test/lib/My/Debugger.pm6
-rw-r--r--mysql-test/lib/mtr_cases.pm6
-rwxr-xr-xmysql-test/lib/v1/mysql-test-run.pl37
-rw-r--r--mysql-test/lsan.supp17
-rw-r--r--mysql-test/main/alter_events.result14
-rw-r--r--mysql-test/main/alter_events.test31
-rw-r--r--mysql-test/main/alter_table,aria.rdiff22
-rw-r--r--mysql-test/main/alter_table,heap.rdiff59
-rw-r--r--mysql-test/main/alter_table.combinations5
-rw-r--r--mysql-test/main/alter_table.result752
-rw-r--r--mysql-test/main/alter_table.test424
-rw-r--r--mysql-test/main/alter_table_debug.result26
-rw-r--r--mysql-test/main/alter_table_debug.test33
-rw-r--r--mysql-test/main/alter_table_mdev539_maria.result4
-rw-r--r--mysql-test/main/alter_table_mdev539_maria.test4
-rw-r--r--mysql-test/main/alter_table_mdev539_myisam.result4
-rw-r--r--mysql-test/main/alter_table_mdev539_myisam.test4
-rw-r--r--mysql-test/main/alter_table_online.result8
-rw-r--r--mysql-test/main/alter_user.result40
-rw-r--r--mysql-test/main/alter_user.test29
-rw-r--r--mysql-test/main/analyze_format_json.result85
-rw-r--r--mysql-test/main/analyze_stmt_orderby.result39
-rw-r--r--mysql-test/main/backup_interaction.result10
-rw-r--r--mysql-test/main/backup_interaction.test10
-rw-r--r--mysql-test/main/backup_lock.result47
-rw-r--r--mysql-test/main/backup_lock.test41
-rw-r--r--mysql-test/main/brackets.result8
-rw-r--r--mysql-test/main/cache_innodb.result6
-rw-r--r--mysql-test/main/column_compression.result16
-rw-r--r--mysql-test/main/column_compression.test30
-rw-r--r--mysql-test/main/comment_column.test22
-rw-r--r--mysql-test/main/comment_database.result78
-rw-r--r--mysql-test/main/comment_database.test63
-rw-r--r--mysql-test/main/comment_index.test20
-rw-r--r--mysql-test/main/comment_table.test6
-rw-r--r--mysql-test/main/commit_1innodb.result19
-rw-r--r--mysql-test/main/compress.result8
-rw-r--r--mysql-test/main/concurrent_innodb_safelog-master.opt1
-rw-r--r--mysql-test/main/concurrent_innodb_safelog.result34
-rw-r--r--mysql-test/main/concurrent_innodb_safelog.test4
-rw-r--r--mysql-test/main/concurrent_innodb_unsafelog-master.opt2
-rw-r--r--mysql-test/main/concurrent_innodb_unsafelog.result50
-rw-r--r--mysql-test/main/concurrent_innodb_unsafelog.test8
-rw-r--r--mysql-test/main/crash_commit_before-master.opt2
-rw-r--r--mysql-test/main/create.result34
-rw-r--r--mysql-test/main/create.test29
-rw-r--r--mysql-test/main/create_drop_view.result7
-rw-r--r--mysql-test/main/create_drop_view.test2
-rw-r--r--mysql-test/main/create_or_replace.result3
-rw-r--r--mysql-test/main/cte_cycle.result156
-rw-r--r--mysql-test/main/cte_cycle.test143
-rw-r--r--mysql-test/main/cte_nonrecursive.result34
-rw-r--r--mysql-test/main/cte_nonrecursive.test12
-rw-r--r--mysql-test/main/cte_recursive.result217
-rw-r--r--mysql-test/main/cte_recursive.test12
-rw-r--r--mysql-test/main/ctype_big5.result70
-rw-r--r--mysql-test/main/ctype_big5.test17
-rw-r--r--mysql-test/main/ctype_binary.result42
-rw-r--r--mysql-test/main/ctype_binary.test41
-rw-r--r--mysql-test/main/ctype_cp1251.result4
-rw-r--r--mysql-test/main/ctype_cp932.result70
-rw-r--r--mysql-test/main/ctype_cp932.test17
-rw-r--r--mysql-test/main/ctype_dec8.result58
-rw-r--r--mysql-test/main/ctype_dec8.test15
-rw-r--r--mysql-test/main/ctype_errors.result11
-rw-r--r--mysql-test/main/ctype_errors.test11
-rw-r--r--mysql-test/main/ctype_eucjpms.result70
-rw-r--r--mysql-test/main/ctype_eucjpms.test17
-rw-r--r--mysql-test/main/ctype_euckr.result70
-rw-r--r--mysql-test/main/ctype_euckr.test17
-rw-r--r--mysql-test/main/ctype_filename.result74
-rw-r--r--mysql-test/main/ctype_filename.test74
-rw-r--r--mysql-test/main/ctype_gb2312.result70
-rw-r--r--mysql-test/main/ctype_gb2312.test17
-rw-r--r--mysql-test/main/ctype_gbk.result70
-rw-r--r--mysql-test/main/ctype_gbk.test17
-rw-r--r--mysql-test/main/ctype_latin1.result75
-rw-r--r--mysql-test/main/ctype_latin1.test34
-rw-r--r--mysql-test/main/ctype_ldml.result12
-rw-r--r--mysql-test/main/ctype_ldml.test13
-rw-r--r--mysql-test/main/ctype_nopad_8bit.result276
-rw-r--r--mysql-test/main/ctype_sjis.result92
-rw-r--r--mysql-test/main/ctype_sjis.test47
-rw-r--r--mysql-test/main/ctype_swe7.result30
-rw-r--r--mysql-test/main/ctype_swe7.test26
-rw-r--r--mysql-test/main/ctype_tis620.result12
-rw-r--r--mysql-test/main/ctype_uca.test2
-rw-r--r--mysql-test/main/ctype_ucs.result62
-rw-r--r--mysql-test/main/ctype_ucs.test25
-rw-r--r--mysql-test/main/ctype_ucs2_uca.result12
-rw-r--r--mysql-test/main/ctype_ujis.result12
-rw-r--r--mysql-test/main/ctype_utf16.result29
-rw-r--r--mysql-test/main/ctype_utf16.test58
-rw-r--r--mysql-test/main/ctype_utf16_uca.result12
-rw-r--r--mysql-test/main/ctype_utf16_uca.test2
-rw-r--r--mysql-test/main/ctype_utf16le.result50
-rw-r--r--mysql-test/main/ctype_utf16le.test32
-rw-r--r--mysql-test/main/ctype_utf32.result14
-rw-r--r--mysql-test/main/ctype_utf32.test36
-rw-r--r--mysql-test/main/ctype_utf32_uca.result12
-rw-r--r--mysql-test/main/ctype_utf32_uca.test2
-rw-r--r--mysql-test/main/ctype_utf8.result115
-rw-r--r--mysql-test/main/ctype_utf8.test57
-rw-r--r--mysql-test/main/ctype_utf8_def_upgrade.result8
-rw-r--r--mysql-test/main/ctype_utf8_uca.result12
-rw-r--r--mysql-test/main/ctype_utf8mb4.result12
-rw-r--r--mysql-test/main/ctype_utf8mb4_uca.result12
-rw-r--r--mysql-test/main/ctype_utf8mb4_uca.test2
-rw-r--r--mysql-test/main/deadlock_innodb.result4
-rw-r--r--mysql-test/main/delayed.test4
-rw-r--r--mysql-test/main/delete_innodb.result26
-rw-r--r--mysql-test/main/delete_innodb.test22
-rw-r--r--mysql-test/main/derived.result15
-rw-r--r--mysql-test/main/derived.test4
-rw-r--r--mysql-test/main/derived_cond_pushdown.result204
-rw-r--r--mysql-test/main/derived_opt.result4
-rw-r--r--mysql-test/main/derived_split_innodb.result11
-rw-r--r--mysql-test/main/derived_split_innodb.test2
-rw-r--r--mysql-test/main/disabled.def3
-rw-r--r--mysql-test/main/distinct.result6
-rw-r--r--mysql-test/main/drop-no_root.result28
-rw-r--r--mysql-test/main/drop-no_root.test85
-rw-r--r--mysql-test/main/drop.result38
-rw-r--r--mysql-test/main/drop.test37
-rw-r--r--mysql-test/main/drop_combinations.inc24
-rw-r--r--mysql-test/main/drop_combinations.result878
-rw-r--r--mysql-test/main/drop_combinations.test425
-rw-r--r--mysql-test/main/drop_table_force.result131
-rw-r--r--mysql-test/main/drop_table_force.test226
-rw-r--r--mysql-test/main/events_bugs.result4
-rw-r--r--mysql-test/main/except.result44
-rw-r--r--mysql-test/main/except.test10
-rw-r--r--mysql-test/main/except_all.result675
-rw-r--r--mysql-test/main/except_all.test99
-rw-r--r--mysql-test/main/explain.test2
-rw-r--r--mysql-test/main/explain_json.result28
-rw-r--r--mysql-test/main/explain_json_format_partitions.result3
-rw-r--r--mysql-test/main/features.result16
-rw-r--r--mysql-test/main/features.test14
-rw-r--r--mysql-test/main/flush.result12
-rw-r--r--mysql-test/main/flush.test9
-rw-r--r--mysql-test/main/flush_read_lock.result83
-rw-r--r--mysql-test/main/flush_read_lock.test129
-rw-r--r--mysql-test/main/foreign_key.result2
-rw-r--r--mysql-test/main/foreign_key.test2
-rw-r--r--mysql-test/main/frm-debug.result24
-rw-r--r--mysql-test/main/frm-debug.test22
-rw-r--r--mysql-test/main/func_bit.result367
-rw-r--r--mysql-test/main/func_bit.test97
-rw-r--r--mysql-test/main/func_crypt.result1
-rw-r--r--mysql-test/main/func_crypt.test2
-rw-r--r--mysql-test/main/func_debug.result8
-rw-r--r--mysql-test/main/func_des_encrypt.result38
-rw-r--r--mysql-test/main/func_des_encrypt.test21
-rw-r--r--mysql-test/main/func_gconcat.result2
-rw-r--r--mysql-test/main/func_group.result12
-rw-r--r--mysql-test/main/func_group_innodb.result6
-rw-r--r--mysql-test/main/func_group_innodb.test6
-rw-r--r--mysql-test/main/func_hybrid_type.result196
-rw-r--r--mysql-test/main/func_hybrid_type.test253
-rw-r--r--mysql-test/main/func_in.result4
-rw-r--r--mysql-test/main/func_json.result313
-rw-r--r--mysql-test/main/func_json.test232
-rw-r--r--mysql-test/main/func_like.result4
-rw-r--r--mysql-test/main/func_math.result44
-rw-r--r--mysql-test/main/func_math.test38
-rw-r--r--mysql-test/main/func_misc.result98
-rw-r--r--mysql-test/main/func_misc.test59
-rw-r--r--mysql-test/main/func_regexp_pcre.result49
-rw-r--r--mysql-test/main/func_regexp_pcre.test35
-rw-r--r--mysql-test/main/func_regexp_pcre_debug.result2
-rw-r--r--mysql-test/main/func_str.result20
-rw-r--r--mysql-test/main/func_str.test5
-rw-r--r--mysql-test/main/func_time.result12
-rw-r--r--mysql-test/main/func_time.test2
-rw-r--r--mysql-test/main/function_defaults.result4
-rw-r--r--mysql-test/main/function_defaults_innodb.result4
-rw-r--r--mysql-test/main/get_diagnostics.result1
-rw-r--r--mysql-test/main/get_diagnostics.test2
-rw-r--r--mysql-test/main/gis-debug.result79
-rw-r--r--mysql-test/main/gis-debug.test51
-rw-r--r--mysql-test/main/gis.result1020
-rw-r--r--mysql-test/main/gis.test211
-rw-r--r--mysql-test/main/grant.result14
-rw-r--r--mysql-test/main/grant.test1
-rw-r--r--mysql-test/main/grant2.result2
-rw-r--r--mysql-test/main/grant_binlog_replay.result52
-rw-r--r--mysql-test/main/grant_binlog_replay.test73
-rw-r--r--mysql-test/main/grant_kill.result71
-rw-r--r--mysql-test/main/grant_kill.test88
-rw-r--r--mysql-test/main/grant_master_admin.result36
-rw-r--r--mysql-test/main/grant_master_admin.test47
-rw-r--r--mysql-test/main/grant_read_only.result73
-rw-r--r--mysql-test/main/grant_read_only.test83
-rw-r--r--mysql-test/main/grant_server.result61
-rw-r--r--mysql-test/main/grant_server.test75
-rw-r--r--mysql-test/main/grant_slave_admin.result64
-rw-r--r--mysql-test/main/grant_slave_admin.test74
-rw-r--r--mysql-test/main/grant_slave_monitor.result75
-rw-r--r--mysql-test/main/grant_slave_monitor.test117
-rw-r--r--mysql-test/main/group_by.result33
-rw-r--r--mysql-test/main/group_by.test33
-rw-r--r--mysql-test/main/group_min_max.result178
-rw-r--r--mysql-test/main/group_min_max.test2
-rw-r--r--mysql-test/main/index_intersect.result26
-rw-r--r--mysql-test/main/index_intersect.test22
-rw-r--r--mysql-test/main/index_intersect_innodb.result30
-rw-r--r--mysql-test/main/index_intersect_innodb.test4
-rw-r--r--mysql-test/main/index_merge_innodb.result2
-rw-r--r--mysql-test/main/index_merge_innodb.test2
-rw-r--r--mysql-test/main/index_merge_myisam.result6
-rw-r--r--mysql-test/main/index_merge_myisam.test2
-rw-r--r--mysql-test/main/information_schema.result20
-rw-r--r--mysql-test/main/information_schema.test3
-rw-r--r--mysql-test/main/information_schema_all_engines-master.opt1
-rw-r--r--mysql-test/main/information_schema_all_engines.result8
-rw-r--r--mysql-test/main/information_schema_db.result2
-rw-r--r--mysql-test/main/information_schema_db.test3
-rw-r--r--mysql-test/main/information_schema_stats.result4
-rw-r--r--mysql-test/main/innodb_ext_key,off.rdiff13
-rw-r--r--mysql-test/main/innodb_ext_key.result10
-rw-r--r--mysql-test/main/innodb_ext_key.test6
-rw-r--r--mysql-test/main/innodb_icp.result26
-rw-r--r--mysql-test/main/innodb_icp.test6
-rw-r--r--mysql-test/main/innodb_mrr_cpk.result6
-rw-r--r--mysql-test/main/innodb_mrr_cpk.test6
-rw-r--r--mysql-test/main/innodb_mysql_lock2.result3
-rw-r--r--mysql-test/main/innodb_mysql_lock2.test3
-rw-r--r--mysql-test/main/innodb_mysql_sync.result4
-rw-r--r--mysql-test/main/insert.result16
-rw-r--r--mysql-test/main/insert.test13
-rw-r--r--mysql-test/main/insert_returning.result617
-rw-r--r--mysql-test/main/insert_returning.test328
-rw-r--r--mysql-test/main/insert_returning_datatypes.result72
-rw-r--r--mysql-test/main/insert_returning_datatypes.test74
-rw-r--r--mysql-test/main/intersect.result86
-rw-r--r--mysql-test/main/intersect.test30
-rw-r--r--mysql-test/main/intersect_all.result902
-rw-r--r--mysql-test/main/intersect_all.test328
-rw-r--r--mysql-test/main/join.result4
-rw-r--r--mysql-test/main/join_cache.result12
-rw-r--r--mysql-test/main/join_nested.result4
-rw-r--r--mysql-test/main/join_nested_jcl6.result6
-rw-r--r--mysql-test/main/join_outer.result6
-rw-r--r--mysql-test/main/join_outer_innodb.result63
-rw-r--r--mysql-test/main/join_outer_innodb.test17
-rw-r--r--mysql-test/main/join_outer_jcl6.result6
-rw-r--r--mysql-test/main/key.result4
-rw-r--r--mysql-test/main/key_cache.result10
-rw-r--r--mysql-test/main/key_cache.test2
-rw-r--r--mysql-test/main/keyread.result10
-rw-r--r--mysql-test/main/keyread.test20
-rw-r--r--mysql-test/main/kill-2.test1
-rw-r--r--mysql-test/main/kill.test1
-rw-r--r--mysql-test/main/large_pages.opt1
-rw-r--r--mysql-test/main/large_pages.result43
-rw-r--r--mysql-test/main/large_pages.test38
-rw-r--r--mysql-test/main/limit_rows_examined.result4
-rw-r--r--mysql-test/main/loaddata_autocom_innodb.result2
-rw-r--r--mysql-test/main/lock.result15
-rw-r--r--mysql-test/main/lock.test18
-rw-r--r--mysql-test/main/lock_user.result2
-rw-r--r--mysql-test/main/lock_user.test1
-rw-r--r--mysql-test/main/log_tables.result6
-rw-r--r--mysql-test/main/log_tables.test6
-rw-r--r--mysql-test/main/long_unique.result15
-rw-r--r--mysql-test/main/long_unique.test18
-rw-r--r--mysql-test/main/long_unique_bugs.result74
-rw-r--r--mysql-test/main/long_unique_bugs.test72
-rw-r--r--mysql-test/main/long_unique_bugs_replication.result12
-rw-r--r--mysql-test/main/long_unique_bugs_replication.test24
-rw-r--r--mysql-test/main/long_unique_delayed.result19
-rw-r--r--mysql-test/main/long_unique_delayed.test22
-rw-r--r--mysql-test/main/lowercase_fs_off.test4
-rw-r--r--mysql-test/main/mdl.result3
-rw-r--r--mysql-test/main/mdl.test3
-rw-r--r--mysql-test/main/mdl_sync.result111
-rw-r--r--mysql-test/main/mdl_sync.test164
-rw-r--r--mysql-test/main/merge.result2
-rw-r--r--mysql-test/main/merge.test2
-rw-r--r--mysql-test/main/merge_debug.result8
-rw-r--r--mysql-test/main/merge_debug.test8
-rw-r--r--mysql-test/main/merge_mmap.result4
-rw-r--r--mysql-test/main/merge_mmap.test8
-rw-r--r--mysql-test/main/mix2_myisam.result8
-rw-r--r--mysql-test/main/mrr_icp_extra.result2
-rw-r--r--mysql-test/main/my_print_defaults.result51
-rw-r--r--mysql-test/main/my_print_defaults.test106
-rw-r--r--mysql-test/main/myisam.result6
-rw-r--r--mysql-test/main/myisam.test6
-rw-r--r--mysql-test/main/myisam_crash_before_flush_keys-master.opt2
-rw-r--r--mysql-test/main/myisam_debug.result4
-rw-r--r--mysql-test/main/myisam_debug.test2
-rw-r--r--mysql-test/main/myisam_explain_non_select_all.result64
-rw-r--r--mysql-test/main/myisam_icp.result20
-rw-r--r--mysql-test/main/myisam_repair.result51
-rw-r--r--mysql-test/main/myisam_repair.test57
-rw-r--r--mysql-test/main/myisampack.result2
-rw-r--r--mysql-test/main/myisampack.test2
-rw-r--r--mysql-test/main/mysql-metadata.result87
-rw-r--r--mysql-test/main/mysql-metadata.test22
-rw-r--r--mysql-test/main/mysql_json_mysql_upgrade.result198
-rw-r--r--mysql-test/main/mysql_json_mysql_upgrade.test36
-rw-r--r--mysql-test/main/mysql_json_mysql_upgrade_with_plugin_loaded.result95
-rw-r--r--mysql-test/main/mysql_json_mysql_upgrade_with_plugin_loaded.test35
-rw-r--r--mysql-test/main/mysql_json_table_recreate.opt1
-rw-r--r--mysql-test/main/mysql_json_table_recreate.result171
-rw-r--r--mysql-test/main/mysql_json_table_recreate.test90
-rw-r--r--mysql-test/main/mysql_upgrade.result59
-rw-r--r--mysql-test/main/mysql_upgrade.test29
-rw-r--r--mysql-test/main/mysql_upgrade_mysql_json_datatype.result104
-rw-r--r--mysql-test/main/mysql_upgrade_mysql_json_datatype.test61
-rw-r--r--mysql-test/main/mysql_upgrade_noengine.result4
-rw-r--r--mysql-test/main/mysql_upgrade_noengine.test3
-rw-r--r--mysql-test/main/mysql_upgrade_to_100502.result119
-rw-r--r--mysql-test/main/mysql_upgrade_to_100502.test127
-rw-r--r--mysql-test/main/mysqlbinlog-innodb.result4
-rw-r--r--mysql-test/main/mysqlbinlog.result69
-rw-r--r--mysql-test/main/mysqlbinlog.test60
-rw-r--r--mysql-test/main/mysqlbinlog_row_compressed.result2
-rw-r--r--mysql-test/main/mysqlbinlog_row_minimal.result4
-rw-r--r--mysql-test/main/mysqlbinlog_stmt_compressed.result2
-rw-r--r--mysql-test/main/mysqld--defaults-file.test5
-rw-r--r--mysql-test/main/mysqld--help,aix.rdiff76
-rw-r--r--mysql-test/main/mysqld--help,win.rdiff16
-rw-r--r--mysql-test/main/mysqld--help-aria.result12
-rw-r--r--mysql-test/main/mysqld--help-aria.test39
-rw-r--r--mysql-test/main/mysqld--help.result123
-rw-r--r--mysql-test/main/mysqld--help.test5
-rw-r--r--mysql-test/main/mysqldump-max.result6
-rw-r--r--mysql-test/main/mysqldump-max.test6
-rw-r--r--mysql-test/main/mysqldump-system.result18
-rw-r--r--mysql-test/main/mysqldump-system.test4
-rw-r--r--mysql-test/main/mysqldump.result4
-rw-r--r--mysql-test/main/mysqlshow.test2
-rw-r--r--mysql-test/main/mysqltest_tracking_info.result6
-rw-r--r--mysql-test/main/mysqltest_tracking_info.test25
-rw-r--r--mysql-test/main/named_pipe.result8
-rw-r--r--mysql-test/main/named_pipe.test3
-rw-r--r--mysql-test/main/negation_elimination.result18
-rw-r--r--mysql-test/main/not_embedded_server.result2
-rw-r--r--mysql-test/main/null.result2
-rw-r--r--mysql-test/main/null_key.result14
-rw-r--r--mysql-test/main/openssl_1.test1
-rw-r--r--mysql-test/main/opt_trace.result1538
-rw-r--r--mysql-test/main/opt_trace.test61
-rw-r--r--mysql-test/main/opt_trace_index_merge.result130
-rw-r--r--mysql-test/main/opt_trace_index_merge_innodb.result34
-rw-r--r--mysql-test/main/opt_trace_security.result16
-rw-r--r--mysql-test/main/opt_trace_ucs2.result2
-rw-r--r--mysql-test/main/opt_tvc.result16
-rw-r--r--mysql-test/main/order_by.result650
-rw-r--r--mysql-test/main/order_by.test226
-rw-r--r--mysql-test/main/order_by_pack_big.result499
-rw-r--r--mysql-test/main/order_by_pack_big.test185
-rw-r--r--mysql-test/main/parser.result81
-rw-r--r--mysql-test/main/parser.test60
-rw-r--r--mysql-test/main/partition.result24
-rw-r--r--mysql-test/main/partition.test9
-rw-r--r--mysql-test/main/partition_alter.test11
-rw-r--r--mysql-test/main/partition_cache.result6
-rw-r--r--mysql-test/main/partition_cache_innodb.result2
-rw-r--r--mysql-test/main/partition_cache_myisam.result2
-rw-r--r--mysql-test/main/partition_error.result2
-rw-r--r--mysql-test/main/partition_error.test2
-rw-r--r--mysql-test/main/partition_explicit_prune.result8
-rw-r--r--mysql-test/main/partition_innodb.result6
-rw-r--r--mysql-test/main/partition_innodb.test4
-rw-r--r--mysql-test/main/partition_mrr_aria.result18
-rw-r--r--mysql-test/main/partition_mrr_innodb.result18
-rw-r--r--mysql-test/main/partition_mrr_myisam.result22
-rw-r--r--mysql-test/main/partition_myisam.result5
-rw-r--r--mysql-test/main/partition_myisam.test6
-rw-r--r--mysql-test/main/partition_not_blackhole.result2
-rw-r--r--mysql-test/main/partition_pruning.result210
-rw-r--r--mysql-test/main/partition_range.result25
-rw-r--r--mysql-test/main/partition_range.test27
-rw-r--r--mysql-test/main/partition_utf8-debug.result88
-rw-r--r--mysql-test/main/partition_utf8-debug.test71
-rw-r--r--mysql-test/main/partition_utf8.result22
-rw-r--r--mysql-test/main/partition_utf8.test19
-rw-r--r--mysql-test/main/percona_nonflushing_analyze_debug.result28
-rw-r--r--mysql-test/main/percona_nonflushing_analyze_debug.test12
-rw-r--r--mysql-test/main/plugin_innodb.result4
-rw-r--r--mysql-test/main/plugin_innodb.test16
-rw-r--r--mysql-test/main/pool_of_threads.result8
-rw-r--r--mysql-test/main/profiling.result3
-rw-r--r--mysql-test/main/ps.result12
-rw-r--r--mysql-test/main/ps_1general.result18
-rw-r--r--mysql-test/main/ps_1general.test10
-rw-r--r--mysql-test/main/ps_show_log.result4
-rw-r--r--mysql-test/main/query_cache.result4
-rw-r--r--mysql-test/main/query_cache.test7
-rw-r--r--mysql-test/main/range.result351
-rw-r--r--mysql-test/main/range.test206
-rw-r--r--mysql-test/main/range_innodb.result6
-rw-r--r--mysql-test/main/range_mrr_icp.result337
-rw-r--r--mysql-test/main/range_notembedded.result221
-rw-r--r--mysql-test/main/range_notembedded.test119
-rw-r--r--mysql-test/main/range_vs_index_merge.result2
-rw-r--r--mysql-test/main/range_vs_index_merge_innodb.result14
-rw-r--r--mysql-test/main/range_vs_index_merge_innodb.test4
-rw-r--r--mysql-test/main/read_many_rows_innodb.result2
-rw-r--r--mysql-test/main/rename.result25
-rw-r--r--mysql-test/main/rename.test18
-rw-r--r--mysql-test/main/repair.result6
-rw-r--r--mysql-test/main/repair_symlink-5543.test4
-rw-r--r--mysql-test/main/replace_returning.result262
-rw-r--r--mysql-test/main/replace_returning.test192
-rw-r--r--mysql-test/main/replace_returning_datatypes.result61
-rw-r--r--mysql-test/main/replace_returning_datatypes.test66
-rw-r--r--mysql-test/main/replace_returning_err.result69
-rw-r--r--mysql-test/main/replace_returning_err.test86
-rw-r--r--mysql-test/main/require_secure_transport-master.opt1
-rw-r--r--mysql-test/main/require_secure_transport.result8
-rw-r--r--mysql-test/main/require_secure_transport.test15
-rw-r--r--mysql-test/main/row.result13
-rw-r--r--mysql-test/main/row.test18
-rw-r--r--mysql-test/main/rowid_filter.result266
-rw-r--r--mysql-test/main/rowid_filter.test4
-rw-r--r--mysql-test/main/rowid_filter_innodb.result385
-rw-r--r--mysql-test/main/rowid_filter_innodb.test4
-rw-r--r--mysql-test/main/rowid_order_innodb.result2
-rw-r--r--mysql-test/main/select.result24
-rw-r--r--mysql-test/main/select.test8
-rw-r--r--mysql-test/main/select_jcl6.result26
-rw-r--r--mysql-test/main/select_pkeycache.result24
-rw-r--r--mysql-test/main/selectivity.result12
-rw-r--r--mysql-test/main/selectivity_innodb.result8
-rw-r--r--mysql-test/main/selectivity_innodb.test4
-rw-r--r--mysql-test/main/set_operation.result1191
-rw-r--r--mysql-test/main/set_operation.test554
-rw-r--r--mysql-test/main/set_operation_oracle.result127
-rw-r--r--mysql-test/main/set_operation_oracle.test71
-rw-r--r--mysql-test/main/shutdown.result2
-rw-r--r--mysql-test/main/shutdown.test2
-rw-r--r--mysql-test/main/sp-code.result25
-rw-r--r--mysql-test/main/sp-code.test16
-rw-r--r--mysql-test/main/sp-error.result10
-rw-r--r--mysql-test/main/sp-error.test17
-rw-r--r--mysql-test/main/sp-row.result4
-rw-r--r--mysql-test/main/sp-row.test4
-rw-r--r--mysql-test/main/sp-security.result24
-rw-r--r--mysql-test/main/sp-security.test29
-rw-r--r--mysql-test/main/sp-vars.result403
-rw-r--r--mysql-test/main/sp-vars.test591
-rw-r--r--mysql-test/main/sp.result4
-rw-r--r--mysql-test/main/sp_gis.result72
-rw-r--r--mysql-test/main/sp_gis.test63
-rw-r--r--mysql-test/main/sp_trans.result36
-rw-r--r--mysql-test/main/sp_trans.test26
-rw-r--r--mysql-test/main/ssl.result8
-rw-r--r--mysql-test/main/ssl_compress.result8
-rw-r--r--mysql-test/main/stack-crash.result3
-rw-r--r--mysql-test/main/stat_tables.result10
-rw-r--r--mysql-test/main/stat_tables_disabled.result4
-rw-r--r--mysql-test/main/stat_tables_disabled.test4
-rw-r--r--mysql-test/main/stat_tables_innodb.result6
-rw-r--r--mysql-test/main/stat_tables_innodb.test4
-rw-r--r--mysql-test/main/stat_tables_par.inc275
-rw-r--r--mysql-test/main/stat_tables_par.result1
-rw-r--r--mysql-test/main/stat_tables_par.test279
-rw-r--r--mysql-test/main/stat_tables_par_innodb.result5
-rw-r--r--mysql-test/main/stat_tables_par_innodb.test13
-rw-r--r--mysql-test/main/status_bug17954.test3
-rw-r--r--mysql-test/main/subselect.result14
-rw-r--r--mysql-test/main/subselect.test6
-rw-r--r--mysql-test/main/subselect2.result4
-rw-r--r--mysql-test/main/subselect3.result4
-rw-r--r--mysql-test/main/subselect3_jcl6.result4
-rw-r--r--mysql-test/main/subselect4.result9
-rw-r--r--mysql-test/main/subselect4.test4
-rw-r--r--mysql-test/main/subselect_cache.result21
-rw-r--r--mysql-test/main/subselect_cache.test6
-rw-r--r--mysql-test/main/subselect_innodb.result3
-rw-r--r--mysql-test/main/subselect_mat.result25
-rw-r--r--mysql-test/main/subselect_mat_cost.result2
-rw-r--r--mysql-test/main/subselect_mat_cost_bugs.result6
-rw-r--r--mysql-test/main/subselect_no_exists_to_in.result14
-rw-r--r--mysql-test/main/subselect_no_mat.result10
-rw-r--r--mysql-test/main/subselect_no_opts.result20
-rw-r--r--mysql-test/main/subselect_no_scache.result22
-rw-r--r--mysql-test/main/subselect_no_semijoin.result12
-rw-r--r--mysql-test/main/subselect_partial_match.result2
-rw-r--r--mysql-test/main/subselect_sj.result10
-rw-r--r--mysql-test/main/subselect_sj2.result8
-rw-r--r--mysql-test/main/subselect_sj2_jcl6.result8
-rw-r--r--mysql-test/main/subselect_sj2_mat.result28
-rw-r--r--mysql-test/main/subselect_sj_jcl6.result12
-rw-r--r--mysql-test/main/subselect_sj_mat.result51
-rw-r--r--mysql-test/main/subselect_sj_mat.test5
-rw-r--r--mysql-test/main/subselect_sj_nonmerged.result8
-rw-r--r--mysql-test/main/sum_distinct-big.result2
-rw-r--r--mysql-test/main/sum_distinct-big.test4
-rw-r--r--mysql-test/main/symlink-myisam-11902.test4
-rw-r--r--mysql-test/main/system_mysql_db_error_log-master.opt1
-rw-r--r--mysql-test/main/system_mysql_db_error_log.result118
-rw-r--r--mysql-test/main/system_mysql_db_error_log.test117
-rw-r--r--mysql-test/main/system_mysql_db_fix40123.result2
-rw-r--r--mysql-test/main/system_mysql_db_fix40123.test2
-rw-r--r--mysql-test/main/system_mysql_db_fix50030.result2
-rw-r--r--mysql-test/main/system_mysql_db_fix50030.test2
-rw-r--r--mysql-test/main/table_elim.result8
-rw-r--r--mysql-test/main/table_value_constr.result14
-rw-r--r--mysql-test/main/table_value_constr.test16
-rw-r--r--mysql-test/main/tc_heuristic_recover.test4
-rw-r--r--mysql-test/main/temp_table.result21
-rw-r--r--mysql-test/main/temp_table.test33
-rw-r--r--mysql-test/main/temp_table_symlink.test11
-rw-r--r--mysql-test/main/thread_pool_info.opt1
-rw-r--r--mysql-test/main/thread_pool_info.result111
-rw-r--r--mysql-test/main/thread_pool_info.test92
-rw-r--r--mysql-test/main/trigger-trans.result14
-rw-r--r--mysql-test/main/trigger-trans.test22
-rw-r--r--mysql-test/main/trigger.test2
-rw-r--r--mysql-test/main/trigger_notembedded.result4
-rw-r--r--mysql-test/main/trigger_notembedded.test2
-rw-r--r--mysql-test/main/type_binary.result40
-rw-r--r--mysql-test/main/type_binary.test28
-rw-r--r--mysql-test/main/type_bit.result25
-rw-r--r--mysql-test/main/type_bit.test23
-rw-r--r--mysql-test/main/type_blob.result6
-rw-r--r--mysql-test/main/type_blob.test4
-rw-r--r--mysql-test/main/type_date.result2
-rw-r--r--mysql-test/main/type_datetime.result2
-rw-r--r--mysql-test/main/type_enum.result12
-rw-r--r--mysql-test/main/type_int.result15
-rw-r--r--mysql-test/main/type_int.test18
-rw-r--r--mysql-test/main/type_json.result30
-rw-r--r--mysql-test/main/type_json.test27
-rw-r--r--mysql-test/main/type_row.result51
-rw-r--r--mysql-test/main/type_row.test62
-rw-r--r--mysql-test/main/type_temporal_mariadb53.result237
-rw-r--r--mysql-test/main/type_temporal_mariadb53.test32
-rw-r--r--mysql-test/main/type_temporal_mysql56_debug.result420
-rw-r--r--mysql-test/main/type_time.result2
-rw-r--r--mysql-test/main/type_varchar.result29
-rw-r--r--mysql-test/main/type_varchar.test23
-rw-r--r--mysql-test/main/type_year.result26
-rw-r--r--mysql-test/main/type_year.test24
-rw-r--r--mysql-test/main/unsafe_binlog_innodb-master.opt1
-rw-r--r--mysql-test/main/unsafe_binlog_innodb.result12
-rw-r--r--mysql-test/main/unsafe_binlog_innodb.test8
-rw-r--r--mysql-test/main/user_var-binlog.result2
-rw-r--r--mysql-test/main/user_var.result2
-rw-r--r--mysql-test/main/variables.result37
-rw-r--r--mysql-test/main/variables.test23
-rw-r--r--mysql-test/main/view.result13
-rw-r--r--mysql-test/main/view.test30
-rw-r--r--mysql-test/main/view_grant.result31
-rw-r--r--mysql-test/main/view_grant.test19
-rw-r--r--mysql-test/main/warnings_debug.result6
-rw-r--r--mysql-test/main/warnings_debug.test2
-rw-r--r--mysql-test/main/win.result11
-rw-r--r--mysql-test/main/win.test5
-rw-r--r--mysql-test/main/win_percentile.result36
-rw-r--r--mysql-test/main/win_percentile.test11
-rw-r--r--mysql-test/main/xa.result124
-rw-r--r--mysql-test/main/xa.test122
-rw-r--r--mysql-test/main/xa_binlog.result63
-rw-r--r--mysql-test/main/xa_binlog.test35
-rw-r--r--mysql-test/main/xa_prepared_binlog_off-master.opt1
-rw-r--r--mysql-test/main/xa_prepared_binlog_off.result1044
-rw-r--r--mysql-test/main/xa_prepared_binlog_off.test11
-rw-r--r--mysql-test/main/xa_sync.result10
-rw-r--r--mysql-test/main/xa_sync.test5
-rw-r--r--mysql-test/main/xml.result13
-rw-r--r--mysql-test/main/xml.test14
-rw-r--r--mysql-test/main/xtradb_mrr.result6
-rw-r--r--mysql-test/main/xtradb_mrr.test6
-rwxr-xr-xmysql-test/mysql-test-run.pl56
-rwxr-xr-xmysql-test/std_data/checkDBI_DBD-MariaDB.pl (renamed from mysql-test/std_data/checkDBI_DBD-mysql.pl)26
-rw-r--r--mysql-test/std_data/ldml/Index.xml9
-rw-r--r--mysql-test/std_data/mariadb-conv/file01.utf16.txtbin0 -> 36 bytes
-rw-r--r--mysql-test/std_data/mariadb-conv/file01.utf8.txt3
-rw-r--r--mysql-test/std_data/mariadb-conv/file02.latin1.txt3
-rw-r--r--mysql-test/std_data/mariadb53_temporal/mariadb5312_datetime.frmbin0 -> 8712 bytes
-rw-r--r--mysql-test/std_data/mariadb53_temporal/mariadb5312_time.frmbin0 -> 8712 bytes
-rw-r--r--mysql-test/std_data/mariadb53_temporal/mariadb5312_timestamp.frmbin0 -> 8712 bytes
-rw-r--r--mysql-test/std_data/mysql_database_10.0.dump902
-rw-r--r--mysql-test/std_data/mysql_database_10.1.dump906
-rw-r--r--mysql-test/std_data/mysql_database_10.2.dump906
-rw-r--r--mysql-test/std_data/mysql_database_10.3.dump928
-rw-r--r--mysql-test/std_data/mysql_database_10.4.dump923
-rw-r--r--mysql-test/std_data/mysql_database_5.5.dump737
-rw-r--r--mysql-test/std_data/mysql_json/mysql_json_test.MYDbin0 -> 1905700 bytes
-rw-r--r--mysql-test/std_data/mysql_json/mysql_json_test.MYIbin0 -> 1024 bytes
-rw-r--r--mysql-test/std_data/mysql_json/mysql_json_test.frmbin0 -> 8646 bytes
-rw-r--r--mysql-test/std_data/mysql_json/mysql_json_test_big.MYDbin0 -> 1898044 bytes
-rw-r--r--mysql-test/std_data/mysql_json/mysql_json_test_big.MYIbin0 -> 1024 bytes
-rw-r--r--mysql-test/std_data/mysql_json/mysql_json_test_big.frmbin0 -> 8646 bytes
-rw-r--r--mysql-test/std_data/mysql_json/tempty.MYDbin0 -> 40 bytes
-rw-r--r--mysql-test/std_data/mysql_json/tempty.MYIbin0 -> 1024 bytes
-rw-r--r--mysql-test/std_data/mysql_json/tempty.frmbin0 -> 8554 bytes
-rw-r--r--mysql-test/std_data/s3_unique_table.frmbin0 -> 512 bytes
-rw-r--r--mysql-test/std_data/wl5766_data.txt100000
-rw-r--r--mysql-test/suite/archive/archive.result2
-rw-r--r--mysql-test/suite/archive/archive.test2
-rw-r--r--mysql-test/suite/archive/archive_gis.result2
-rw-r--r--mysql-test/suite/archive/archive_gis.test2
-rw-r--r--mysql-test/suite/binlog/include/binlog.test2
-rw-r--r--mysql-test/suite/binlog/include/binlog_xa_prepare_connection.inc31
-rw-r--r--mysql-test/suite/binlog/include/binlog_xa_prepare_disconnect.inc37
-rw-r--r--mysql-test/suite/binlog/include/binlog_xa_prepared_do_and_restart.inc323
-rw-r--r--mysql-test/suite/binlog/include/print_optional_metadata.inc34
-rw-r--r--mysql-test/suite/binlog/r/binlog_base64_flag.result4
-rw-r--r--mysql-test/suite/binlog/r/binlog_bug23533.result2
-rw-r--r--mysql-test/suite/binlog/r/binlog_drop_if_exists.result44
-rw-r--r--mysql-test/suite/binlog/r/binlog_empty_xa_prepared.result110
-rw-r--r--mysql-test/suite/binlog/r/binlog_grant.result115
-rw-r--r--mysql-test/suite/binlog/r/binlog_mixed.result11
-rw-r--r--mysql-test/suite/binlog/r/binlog_mysqlbinlog2.result70
-rw-r--r--mysql-test/suite/binlog/r/binlog_mysqlbinlog_row.result4
-rw-r--r--mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_innodb.result8
-rw-r--r--mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_myisam.result8
-rw-r--r--mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_trans.result2
-rw-r--r--mysql-test/suite/binlog/r/binlog_row_annotate.result12
-rw-r--r--mysql-test/suite/binlog/r/binlog_row_binlog.result2
-rw-r--r--mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result4
-rw-r--r--mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_options.result4
-rw-r--r--mysql-test/suite/binlog/r/binlog_stm_binlog.result2
-rw-r--r--mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result4
-rw-r--r--mysql-test/suite/binlog/r/binlog_table_map_optional_metadata.result312
-rw-r--r--mysql-test/suite/binlog/r/binlog_table_map_optional_metadata_binary.result64
-rw-r--r--mysql-test/suite/binlog/r/binlog_table_map_optional_metadata_ucs2.result64
-rw-r--r--mysql-test/suite/binlog/r/binlog_table_map_optional_metadata_utf32.result64
-rw-r--r--mysql-test/suite/binlog/r/binlog_xa_checkpoint.result33
-rw-r--r--mysql-test/suite/binlog/r/binlog_xa_prepared.result1176
-rw-r--r--mysql-test/suite/binlog/r/binlog_xa_prepared_disconnect.result1176
-rw-r--r--mysql-test/suite/binlog/r/flashback.result4
-rw-r--r--mysql-test/suite/binlog/r/foreign_key.result34
-rw-r--r--mysql-test/suite/binlog/t/binlog_base64_flag.test4
-rw-r--r--mysql-test/suite/binlog/t/binlog_drop_if_exists.test32
-rw-r--r--mysql-test/suite/binlog/t/binlog_empty_xa_prepared.test82
-rw-r--r--mysql-test/suite/binlog/t/binlog_grant.test140
-rw-r--r--mysql-test/suite/binlog/t/binlog_index-master.opt2
-rw-r--r--mysql-test/suite/binlog/t/binlog_mdev342-master.opt2
-rw-r--r--mysql-test/suite/binlog/t/binlog_mixed.test23
-rw-r--r--mysql-test/suite/binlog/t/binlog_table_map_optional_metadata.test333
-rw-r--r--mysql-test/suite/binlog/t/binlog_table_map_optional_metadata_binary.test73
-rw-r--r--mysql-test/suite/binlog/t/binlog_table_map_optional_metadata_ucs2.test74
-rw-r--r--mysql-test/suite/binlog/t/binlog_table_map_optional_metadata_utf32.test74
-rw-r--r--mysql-test/suite/binlog/t/binlog_xa_checkpoint.test57
-rw-r--r--mysql-test/suite/binlog/t/binlog_xa_prepared.inc102
-rw-r--r--mysql-test/suite/binlog/t/binlog_xa_prepared_disconnect.test11
-rw-r--r--mysql-test/suite/binlog/t/binlog_xa_recover.opt2
-rw-r--r--mysql-test/suite/binlog/t/foreign_key.test22
-rw-r--r--mysql-test/suite/binlog_encryption/binlog_row_annotate.result6
-rw-r--r--mysql-test/suite/binlog_encryption/rpl_parallel.result1691
-rw-r--r--mysql-test/suite/binlog_encryption/rpl_parallel.test1
-rw-r--r--mysql-test/suite/binlog_encryption/rpl_parallel_analyze_table_hang.result51
-rw-r--r--mysql-test/suite/binlog_encryption/rpl_parallel_analyze_table_hang.test1
-rw-r--r--mysql-test/suite/binlog_encryption/rpl_parallel_deadlock_corrupt_binlog.result93
-rw-r--r--mysql-test/suite/binlog_encryption/rpl_parallel_deadlock_corrupt_binlog.test1
-rw-r--r--mysql-test/suite/binlog_encryption/rpl_parallel_domain.result71
-rw-r--r--mysql-test/suite/binlog_encryption/rpl_parallel_domain.test1
-rw-r--r--mysql-test/suite/binlog_encryption/rpl_parallel_domain_slave_single_grp.result101
-rw-r--r--mysql-test/suite/binlog_encryption/rpl_parallel_domain_slave_single_grp.test1
-rw-r--r--mysql-test/suite/binlog_encryption/rpl_parallel_free_deferred_event.result44
-rw-r--r--mysql-test/suite/binlog_encryption/rpl_parallel_free_deferred_event.test1
-rw-r--r--mysql-test/suite/binlog_encryption/rpl_parallel_gco_wait_kill.result257
-rw-r--r--mysql-test/suite/binlog_encryption/rpl_parallel_gco_wait_kill.test1
-rw-r--r--mysql-test/suite/binlog_encryption/rpl_parallel_gtid_slave_pos_update_fail.result65
-rw-r--r--mysql-test/suite/binlog_encryption/rpl_parallel_gtid_slave_pos_update_fail.test1
-rw-r--r--mysql-test/suite/binlog_encryption/rpl_parallel_ignore_error_on_rotate.result74
-rw-r--r--mysql-test/suite/binlog_encryption/rpl_parallel_ignore_error_on_rotate.test1
-rw-r--r--mysql-test/suite/binlog_encryption/rpl_parallel_incorrect_relay_pos.result75
-rw-r--r--mysql-test/suite/binlog_encryption/rpl_parallel_incorrect_relay_pos.test1
-rw-r--r--mysql-test/suite/binlog_encryption/rpl_parallel_innodb_lock_conflict.result79
-rw-r--r--mysql-test/suite/binlog_encryption/rpl_parallel_innodb_lock_conflict.test1
-rw-r--r--mysql-test/suite/binlog_encryption/rpl_parallel_missed_error_handling.result65
-rw-r--r--mysql-test/suite/binlog_encryption/rpl_parallel_missed_error_handling.test1
-rw-r--r--mysql-test/suite/binlog_encryption/rpl_parallel_mode.result75
-rw-r--r--mysql-test/suite/binlog_encryption/rpl_parallel_mode.test1
-rw-r--r--mysql-test/suite/binlog_encryption/rpl_parallel_partial_binlog_trans.result51
-rw-r--r--mysql-test/suite/binlog_encryption/rpl_parallel_partial_binlog_trans.test1
-rw-r--r--mysql-test/suite/binlog_encryption/rpl_parallel_record_gtid_wakeup.result48
-rw-r--r--mysql-test/suite/binlog_encryption/rpl_parallel_record_gtid_wakeup.test1
-rw-r--r--mysql-test/suite/binlog_encryption/rpl_parallel_retry_deadlock.result192
-rw-r--r--mysql-test/suite/binlog_encryption/rpl_parallel_retry_deadlock.test1
-rw-r--r--mysql-test/suite/binlog_encryption/rpl_parallel_rollback_assert.result45
-rw-r--r--mysql-test/suite/binlog_encryption/rpl_parallel_rollback_assert.test1
-rw-r--r--mysql-test/suite/binlog_encryption/rpl_parallel_single_grpcmt.result161
-rw-r--r--mysql-test/suite/binlog_encryption/rpl_parallel_single_grpcmt.test1
-rw-r--r--mysql-test/suite/binlog_encryption/rpl_parallel_slave_bgc_kill.result323
-rw-r--r--mysql-test/suite/binlog_encryption/rpl_parallel_slave_bgc_kill.test1
-rw-r--r--mysql-test/suite/binlog_encryption/rpl_parallel_stop_on_con_kill.result102
-rw-r--r--mysql-test/suite/binlog_encryption/rpl_parallel_stop_on_con_kill.test1
-rw-r--r--mysql-test/suite/binlog_encryption/rpl_parallel_stop_slave.result85
-rw-r--r--mysql-test/suite/binlog_encryption/rpl_parallel_stop_slave.test1
-rw-r--r--mysql-test/suite/binlog_encryption/rpl_parallel_wrong_binlog_order.result75
-rw-r--r--mysql-test/suite/binlog_encryption/rpl_parallel_wrong_binlog_order.test1
-rw-r--r--mysql-test/suite/binlog_encryption/rpl_parallel_wrong_exec_master_pos.result34
-rw-r--r--mysql-test/suite/binlog_encryption/rpl_parallel_wrong_exec_master_pos.test1
-rw-r--r--mysql-test/suite/binlog_encryption/rpl_skip_replication.result2
-rw-r--r--mysql-test/suite/client/mariadb-conv-cp932.result49
-rw-r--r--mysql-test/suite/client/mariadb-conv-cp932.test57
-rw-r--r--mysql-test/suite/client/mariadb-conv-utf16.result13
-rw-r--r--mysql-test/suite/client/mariadb-conv-utf16.test21
-rw-r--r--mysql-test/suite/client/mariadb-conv-utf8.result49
-rw-r--r--mysql-test/suite/client/mariadb-conv-utf8.test57
-rw-r--r--mysql-test/suite/client/mariadb-conv.result25
-rw-r--r--mysql-test/suite/client/mariadb-conv.test39
-rw-r--r--mysql-test/suite/compat/oracle/r/gis-debug.result24
-rw-r--r--mysql-test/suite/compat/oracle/r/gis.result63
-rw-r--r--mysql-test/suite/compat/oracle/r/parser.result48
-rw-r--r--mysql-test/suite/compat/oracle/r/sp-code.result27
-rw-r--r--mysql-test/suite/compat/oracle/r/sp-row.result4
-rw-r--r--mysql-test/suite/compat/oracle/r/sp.result6
-rw-r--r--mysql-test/suite/compat/oracle/r/table_value_constr.result4
-rw-r--r--mysql-test/suite/compat/oracle/r/type_date.result5
-rw-r--r--mysql-test/suite/compat/oracle/t/gis-debug.test31
-rw-r--r--mysql-test/suite/compat/oracle/t/gis.test72
-rw-r--r--mysql-test/suite/compat/oracle/t/parser.test62
-rw-r--r--mysql-test/suite/compat/oracle/t/sp-code.test31
-rw-r--r--mysql-test/suite/compat/oracle/t/sp-row.test4
-rw-r--r--mysql-test/suite/compat/oracle/t/sp.test2
-rw-r--r--mysql-test/suite/compat/oracle/t/type_date.test6
-rw-r--r--mysql-test/suite/csv/csv.result4
-rw-r--r--mysql-test/suite/encryption/disabled.def14
-rw-r--r--mysql-test/suite/encryption/r/aria_tiny.result26
-rw-r--r--mysql-test/suite/encryption/r/corrupted_during_recovery.result2
-rw-r--r--mysql-test/suite/encryption/r/innodb-force-corrupt.result2
-rw-r--r--mysql-test/suite/encryption/r/innodb-redo-badkey.result6
-rw-r--r--mysql-test/suite/encryption/r/innodb-redo-nokeys.result2
-rw-r--r--mysql-test/suite/encryption/r/innodb-remove-encryption.result2
-rw-r--r--mysql-test/suite/encryption/r/innodb-scrub-log.result3
-rw-r--r--mysql-test/suite/encryption/r/innodb_encrypt_freed.result4
-rw-r--r--mysql-test/suite/encryption/r/innodb_encrypt_log.result4
-rw-r--r--mysql-test/suite/encryption/r/innodb_encrypt_log_corruption.result72
-rw-r--r--mysql-test/suite/encryption/r/innodb_import.result3
-rw-r--r--mysql-test/suite/encryption/r/innodb_scrub.result138
-rw-r--r--mysql-test/suite/encryption/r/innodb_scrub_background.result160
-rw-r--r--mysql-test/suite/encryption/r/tempfiles_encrypted.result11
-rw-r--r--mysql-test/suite/encryption/t/aria_tiny.test39
-rw-r--r--mysql-test/suite/encryption/t/corrupted_during_recovery.test6
-rw-r--r--mysql-test/suite/encryption/t/innodb-force-corrupt.test2
-rw-r--r--mysql-test/suite/encryption/t/innodb-redo-badkey.test6
-rw-r--r--mysql-test/suite/encryption/t/innodb-redo-nokeys.test2
-rw-r--r--mysql-test/suite/encryption/t/innodb-remove-encryption.test5
-rw-r--r--mysql-test/suite/encryption/t/innodb-scrub-log.opt1
-rw-r--r--mysql-test/suite/encryption/t/innodb-scrub-log.test13
-rw-r--r--mysql-test/suite/encryption/t/innodb_encrypt_freed.opt1
-rw-r--r--mysql-test/suite/encryption/t/innodb_encrypt_freed.test4
-rw-r--r--mysql-test/suite/encryption/t/innodb_encrypt_key_rotation_age.test5
-rw-r--r--mysql-test/suite/encryption/t/innodb_encrypt_log.opt1
-rw-r--r--mysql-test/suite/encryption/t/innodb_encrypt_log.test2
-rw-r--r--mysql-test/suite/encryption/t/innodb_encryption-page-compression.test2
-rw-r--r--mysql-test/suite/encryption/t/innodb_encryption_discard_import.opt3
-rw-r--r--mysql-test/suite/encryption/t/innodb_first_page.test1
-rw-r--r--mysql-test/suite/encryption/t/innodb_import.opt1
-rw-r--r--mysql-test/suite/encryption/t/innodb_scrub.opt7
-rw-r--r--mysql-test/suite/encryption/t/innodb_scrub.test147
-rw-r--r--mysql-test/suite/encryption/t/innodb_scrub_background.opt7
-rw-r--r--mysql-test/suite/encryption/t/innodb_scrub_background.test170
-rw-r--r--mysql-test/suite/engines/funcs/r/db_alter_character_set.result560
-rw-r--r--mysql-test/suite/engines/funcs/r/db_alter_character_set_collate.result168
-rw-r--r--mysql-test/suite/engines/funcs/r/db_alter_collate_ascii.result224
-rw-r--r--mysql-test/suite/engines/funcs/r/db_alter_collate_utf8.result2352
-rw-r--r--mysql-test/suite/engines/funcs/r/db_create_character_set.result140
-rw-r--r--mysql-test/suite/engines/funcs/r/db_create_character_set_collate.result84
-rw-r--r--mysql-test/suite/engines/funcs/r/rpl_sp.result2
-rw-r--r--mysql-test/suite/engines/funcs/r/rpl_temporary.result4
-rw-r--r--mysql-test/suite/engines/funcs/r/tc_rename_error.result2
-rw-r--r--mysql-test/suite/engines/funcs/t/tc_rename_error.test4
-rw-r--r--mysql-test/suite/engines/iuds/r/strings_charsets_update_delete.resultbin113116 -> 112230 bytes
-rw-r--r--mysql-test/suite/engines/iuds/r/strings_update_delete.result15
-rw-r--r--mysql-test/suite/engines/iuds/r/type_bit_iuds.result54
-rw-r--r--mysql-test/suite/engines/rr_trx/include/rr_init.test6
-rw-r--r--mysql-test/suite/engines/rr_trx/r/init_innodb.result4
-rw-r--r--mysql-test/suite/federated/federated_server.result8
-rw-r--r--mysql-test/suite/federated/federated_type_inet6.result24
-rw-r--r--mysql-test/suite/federated/federated_type_inet6.test17
-rw-r--r--mysql-test/suite/federated/federatedx_create_handlers.result6
-rw-r--r--mysql-test/suite/funcs_1/r/innodb_trig_03.result10
-rw-r--r--mysql-test/suite/funcs_1/r/innodb_trig_03e.result8
-rw-r--r--mysql-test/suite/funcs_1/r/is_check_constraints.result152
-rw-r--r--mysql-test/suite/funcs_1/r/is_columns_is.result8
-rw-r--r--mysql-test/suite/funcs_1/r/is_columns_is_embedded.result8
-rw-r--r--mysql-test/suite/funcs_1/r/is_engines_federated.result2
-rw-r--r--mysql-test/suite/funcs_1/r/is_schemata.result29
-rw-r--r--mysql-test/suite/funcs_1/r/is_schemata_embedded.result35
-rw-r--r--mysql-test/suite/funcs_1/r/is_schemata_is_mysql_test.result14
-rw-r--r--mysql-test/suite/funcs_1/r/is_statistics.result1
-rw-r--r--mysql-test/suite/funcs_1/r/is_statistics_mysql.result1
-rw-r--r--mysql-test/suite/funcs_1/r/is_statistics_mysql_embedded.result2
-rw-r--r--mysql-test/suite/funcs_1/r/is_user_privileges.result33
-rw-r--r--mysql-test/suite/funcs_1/r/memory_trig_03.result10
-rw-r--r--mysql-test/suite/funcs_1/r/memory_trig_03e.result8
-rw-r--r--mysql-test/suite/funcs_1/r/myisam_trig_03.result10
-rw-r--r--mysql-test/suite/funcs_1/r/myisam_trig_03e.result8
-rw-r--r--mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result24
-rw-r--r--mysql-test/suite/funcs_1/r/processlist_priv_ps.result24
-rw-r--r--mysql-test/suite/funcs_1/r/processlist_val_no_prot.result10
-rw-r--r--mysql-test/suite/funcs_1/r/processlist_val_ps.result10
-rw-r--r--mysql-test/suite/funcs_1/r/storedproc.result57
-rw-r--r--mysql-test/suite/funcs_1/t/is_check_constraints.test21
-rw-r--r--mysql-test/suite/funcs_1/t/is_user_privileges.test26
-rw-r--r--mysql-test/suite/funcs_1/t/storedproc.test32
-rw-r--r--mysql-test/suite/galera/disabled.def3
-rw-r--r--mysql-test/suite/galera/include/kill_galera.inc9
-rw-r--r--mysql-test/suite/galera/r/GCF-360.result24
-rw-r--r--mysql-test/suite/galera/r/MDEV-10715.result28
-rw-r--r--mysql-test/suite/galera/r/galera-features#117.result37
-rw-r--r--mysql-test/suite/galera/r/galera_binlog_cache_size.result2
-rw-r--r--mysql-test/suite/galera/r/galera_can_run_toi.result38
-rw-r--r--mysql-test/suite/galera/r/galera_create_view.result4
-rw-r--r--mysql-test/suite/galera/r/galera_defaults.result3
-rw-r--r--mysql-test/suite/galera/r/galera_gra_log.result13
-rw-r--r--mysql-test/suite/galera/r/galera_gtid_slave.result4
-rw-r--r--mysql-test/suite/galera/r/galera_gtid_slave_sst_rsync.result12
-rw-r--r--mysql-test/suite/galera/r/galera_gtid_trx_conflict.result44
-rw-r--r--mysql-test/suite/galera/r/galera_last_committed_id.result41
-rw-r--r--mysql-test/suite/galera/r/galera_performance_schema.result1
-rw-r--r--mysql-test/suite/galera/r/galera_sync_wait_upto.result24
-rw-r--r--mysql-test/suite/galera/r/galera_view.result5
-rw-r--r--mysql-test/suite/galera/r/galera_vote_rejoin_ddl.result62
-rw-r--r--mysql-test/suite/galera/r/galera_vote_rejoin_dml.result73
-rw-r--r--mysql-test/suite/galera/r/wsrep_strict_ddl.result194
-rw-r--r--mysql-test/suite/galera/suite.pm1
-rw-r--r--mysql-test/suite/galera/t/GCF-360.cnf17
-rw-r--r--mysql-test/suite/galera/t/GCF-360.test65
-rw-r--r--mysql-test/suite/galera/t/MDEV-10715.cnf14
-rw-r--r--mysql-test/suite/galera/t/MDEV-10715.test19
-rw-r--r--mysql-test/suite/galera/t/MDEV-16509.test27
-rw-r--r--mysql-test/suite/galera/t/galera-features#117.cnf5
-rw-r--r--mysql-test/suite/galera/t/galera-features#117.test38
-rw-r--r--mysql-test/suite/galera/t/galera_as_slave_gtid_replicate_do_db_cc.cnf14
-rw-r--r--mysql-test/suite/galera/t/galera_can_run_toi.test34
-rw-r--r--mysql-test/suite/galera/t/galera_create_view.test6
-rw-r--r--mysql-test/suite/galera/t/galera_ftwrl_drain.test2
-rw-r--r--mysql-test/suite/galera/t/galera_gcache_recover_full_gcache.cnf2
-rw-r--r--mysql-test/suite/galera/t/galera_gcache_recover_manytrx.cnf4
-rw-r--r--mysql-test/suite/galera/t/galera_gra_log.test27
-rw-r--r--mysql-test/suite/galera/t/galera_gtid_slave.cnf10
-rw-r--r--mysql-test/suite/galera/t/galera_gtid_slave_sst_rsync.cnf8
-rw-r--r--mysql-test/suite/galera/t/galera_gtid_trx_conflict.cnf14
-rw-r--r--mysql-test/suite/galera/t/galera_gtid_trx_conflict.test56
-rw-r--r--mysql-test/suite/galera/t/galera_last_committed_id.cnf9
-rw-r--r--mysql-test/suite/galera/t/galera_last_committed_id.combinations6
-rw-r--r--mysql-test/suite/galera/t/galera_last_committed_id.test52
-rw-r--r--mysql-test/suite/galera/t/galera_load_data.cnf6
-rw-r--r--mysql-test/suite/galera/t/galera_sync_wait_upto.cnf9
-rw-r--r--mysql-test/suite/galera/t/galera_sync_wait_upto.combinations6
-rw-r--r--mysql-test/suite/galera/t/galera_sync_wait_upto.test93
-rw-r--r--mysql-test/suite/galera/t/galera_view.test7
-rw-r--r--mysql-test/suite/galera/t/galera_vote_rejoin_ddl.cnf10
-rw-r--r--mysql-test/suite/galera/t/galera_vote_rejoin_ddl.test96
-rw-r--r--mysql-test/suite/galera/t/galera_vote_rejoin_dml.cnf7
-rw-r--r--mysql-test/suite/galera/t/galera_vote_rejoin_dml.test99
-rw-r--r--mysql-test/suite/galera/t/wsrep_strict_ddl.test133
-rw-r--r--mysql-test/suite/galera_3nodes/disabled.def1
-rw-r--r--mysql-test/suite/galera_3nodes/r/GCF-354.result57
-rw-r--r--mysql-test/suite/galera_3nodes/r/GCF-363.result46
-rw-r--r--mysql-test/suite/galera_3nodes/r/GCF-376.result72
-rw-r--r--mysql-test/suite/galera_3nodes/r/galera-features#119.result32
-rw-r--r--mysql-test/suite/galera_3nodes/r/galera_evs_suspect_timeout.result1
-rw-r--r--mysql-test/suite/galera_3nodes/r/galera_gtid_2_cluster.result38
-rw-r--r--mysql-test/suite/galera_3nodes/r/galera_pc_weight.result176
-rw-r--r--mysql-test/suite/galera_3nodes/r/galera_toi_vote.result22
-rw-r--r--mysql-test/suite/galera_3nodes/r/galera_vote_rejoin_mysqldump.result83
-rw-r--r--mysql-test/suite/galera_3nodes/r/inconsistency_shutdown.result142
-rw-r--r--mysql-test/suite/galera_3nodes/t/GCF-354.cnf5
-rw-r--r--mysql-test/suite/galera_3nodes/t/GCF-354.test104
-rw-r--r--mysql-test/suite/galera_3nodes/t/GCF-363.cnf8
-rw-r--r--mysql-test/suite/galera_3nodes/t/GCF-363.test66
-rw-r--r--mysql-test/suite/galera_3nodes/t/GCF-376.cnf4
-rw-r--r--mysql-test/suite/galera_3nodes/t/GCF-376.test98
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera-features#119.test72
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_evs_suspect_timeout.test5
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_pc_weight.test68
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_toi_vote.cnf5
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_toi_vote.test67
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_vote_rejoin_mysqldump.cnf4
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_vote_rejoin_mysqldump.test93
-rw-r--r--mysql-test/suite/galera_3nodes/t/inconsistency_shutdown.cnf9
-rw-r--r--mysql-test/suite/galera_3nodes/t/inconsistency_shutdown.test183
-rw-r--r--mysql-test/suite/galera_3nodes_sr/r/galera_vote_sr.result197
-rw-r--r--mysql-test/suite/galera_3nodes_sr/t/galera_vote_sr-master.opt2
-rw-r--r--mysql-test/suite/galera_3nodes_sr/t/galera_vote_sr.inc80
-rw-r--r--mysql-test/suite/galera_3nodes_sr/t/galera_vote_sr.test39
-rw-r--r--mysql-test/suite/galera_sr/disabled.def3
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_large_fragment-master.opt2
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_mysqldump_sst.test5
-rw-r--r--mysql-test/suite/gcol/inc/gcol_column_def_options.inc6
-rw-r--r--mysql-test/suite/gcol/inc/gcol_ins_upd.inc6
-rw-r--r--mysql-test/suite/gcol/r/gcol_bugfixes.result3
-rw-r--r--mysql-test/suite/gcol/r/gcol_column_def_options_innodb.result4
-rw-r--r--mysql-test/suite/gcol/r/gcol_column_def_options_myisam.result4
-rw-r--r--mysql-test/suite/gcol/r/gcol_csv.result2
-rw-r--r--mysql-test/suite/gcol/r/gcol_falcon.result2
-rw-r--r--mysql-test/suite/gcol/r/gcol_ins_upd_innodb.result14
-rw-r--r--mysql-test/suite/gcol/r/gcol_ins_upd_myisam.result14
-rw-r--r--mysql-test/suite/gcol/r/gcol_keys_innodb.result2
-rw-r--r--mysql-test/suite/gcol/r/gcol_purge.result22
-rw-r--r--mysql-test/suite/gcol/r/gcol_select_innodb.result6
-rw-r--r--mysql-test/suite/gcol/r/gcol_select_myisam.result6
-rw-r--r--mysql-test/suite/gcol/r/innodb_virtual_debug_purge.result72
-rw-r--r--mysql-test/suite/gcol/r/innodb_virtual_stats.result12
-rw-r--r--mysql-test/suite/gcol/r/main_alter_table.result2
-rw-r--r--mysql-test/suite/gcol/t/gcol_purge.test30
-rw-r--r--mysql-test/suite/gcol/t/innodb_virtual_debug_purge.test112
-rw-r--r--mysql-test/suite/gcol/t/innodb_virtual_stats.test4
-rw-r--r--mysql-test/suite/gcol/t/main_alter_table.test2
-rw-r--r--mysql-test/suite/handler/aria.result161
-rw-r--r--mysql-test/suite/handler/handler.inc161
-rw-r--r--mysql-test/suite/handler/heap.result161
-rw-r--r--mysql-test/suite/handler/init.inc2
-rw-r--r--mysql-test/suite/handler/innodb.result340
-rw-r--r--mysql-test/suite/handler/innodb.test1
-rw-r--r--mysql-test/suite/handler/interface.result2
-rw-r--r--mysql-test/suite/handler/myisam.result161
-rw-r--r--mysql-test/suite/handler/savepoint.inc182
-rw-r--r--mysql-test/suite/heap/drop.result3
-rw-r--r--mysql-test/suite/heap/drop.test11
-rw-r--r--mysql-test/suite/heap/heap.result6
-rw-r--r--mysql-test/suite/heap/heap.test6
-rw-r--r--mysql-test/suite/heap/heap_btree.result8
-rw-r--r--mysql-test/suite/heap/heap_btree.test8
-rw-r--r--mysql-test/suite/innodb/include/log_file_cleanup.inc2
-rw-r--r--mysql-test/suite/innodb/include/show_i_s_tables.inc4
-rw-r--r--mysql-test/suite/innodb/include/show_i_s_tablespaces.inc2
-rw-r--r--mysql-test/suite/innodb/r/alter_copy.result10
-rw-r--r--mysql-test/suite/innodb/r/alter_inplace_perfschema.result2
-rw-r--r--mysql-test/suite/innodb/r/alter_partitioned.result11
-rw-r--r--mysql-test/suite/innodb/r/alter_rename_existing.result2
-rw-r--r--mysql-test/suite/innodb/r/alter_rename_files.result19
-rw-r--r--mysql-test/suite/innodb/r/alter_table.result17
-rw-r--r--mysql-test/suite/innodb/r/autoinc_debug.result6
-rw-r--r--mysql-test/suite/innodb/r/buf_pool_resize_oom.result2
-rw-r--r--mysql-test/suite/innodb/r/doublewrite.result9
-rw-r--r--mysql-test/suite/innodb/r/encryption_threads_shutdown.result12
-rw-r--r--mysql-test/suite/innodb/r/flush.result16
-rw-r--r--mysql-test/suite/innodb/r/foreign_key.result77
-rw-r--r--mysql-test/suite/innodb/r/full_crc32_import.result9
-rw-r--r--mysql-test/suite/innodb/r/gap_locks.result35
-rw-r--r--mysql-test/suite/innodb/r/group_commit_force_recovery.result5
-rw-r--r--mysql-test/suite/innodb/r/ibuf_not_empty.result20
-rw-r--r--mysql-test/suite/innodb/r/import_corrupted.result2
-rw-r--r--mysql-test/suite/innodb/r/index_vcol_purge_startup.result24
-rw-r--r--mysql-test/suite/innodb/r/information_schema_grants.result9
-rw-r--r--mysql-test/suite/innodb/r/innodb-alter-debug.result9
-rw-r--r--mysql-test/suite/innodb/r/innodb-alter-timestamp.result2
-rw-r--r--mysql-test/suite/innodb/r/innodb-alter.result30
-rw-r--r--mysql-test/suite/innodb/r/innodb-analyze.result4
-rw-r--r--mysql-test/suite/innodb/r/innodb-change-buffer-recovery.result2
-rw-r--r--mysql-test/suite/innodb/r/innodb-fk-warnings.result25
-rw-r--r--mysql-test/suite/innodb/r/innodb-fk.result36
-rw-r--r--mysql-test/suite/innodb/r/innodb-isolation.result6
-rw-r--r--mysql-test/suite/innodb/r/innodb-page-cleaners.result45
-rw-r--r--mysql-test/suite/innodb/r/innodb-page_compression_tables.result8
-rw-r--r--mysql-test/suite/innodb/r/innodb-stats-modified-counter.result8
-rw-r--r--mysql-test/suite/innodb/r/innodb-stats-sample.result4
-rw-r--r--mysql-test/suite/innodb/r/innodb-system-table-view.result20
-rw-r--r--mysql-test/suite/innodb/r/innodb-wl5522-debug.result32
-rw-r--r--mysql-test/suite/innodb/r/innodb-wl5522.result10
-rw-r--r--mysql-test/suite/innodb/r/innodb-wl5980-alter.result2
-rw-r--r--mysql-test/suite/innodb/r/innodb.result5
-rw-r--r--mysql-test/suite/innodb/r/innodb_buffer_pool_resize_debug.result4
-rw-r--r--mysql-test/suite/innodb/r/innodb_buffer_pool_resize_temporary.result16
-rw-r--r--mysql-test/suite/innodb/r/innodb_bug12400341.result3
-rw-r--r--mysql-test/suite/innodb/r/innodb_bug12902967.result2
-rw-r--r--mysql-test/suite/innodb/r/innodb_bug34300.result2
-rw-r--r--mysql-test/suite/innodb/r/innodb_bug35220.result2
-rw-r--r--mysql-test/suite/innodb/r/innodb_bug38231.result2
-rw-r--r--mysql-test/suite/innodb/r/innodb_bug39438.result2
-rw-r--r--mysql-test/suite/innodb/r/innodb_bug42101-nonzero.result26
-rw-r--r--mysql-test/suite/innodb/r/innodb_bug42101.result22
-rw-r--r--mysql-test/suite/innodb/r/innodb_bug53592.result4
-rw-r--r--mysql-test/suite/innodb/r/innodb_bulk_create_index_flush.result54
-rw-r--r--mysql-test/suite/innodb/r/innodb_ctype_big5.result2
-rw-r--r--mysql-test/suite/innodb/r/innodb_ctype_latin1.result2
-rw-r--r--mysql-test/suite/innodb/r/innodb_ctype_ldml.result5
-rw-r--r--mysql-test/suite/innodb/r/innodb_ctype_utf8.result2
-rw-r--r--mysql-test/suite/innodb/r/innodb_force_recovery.result25
-rw-r--r--mysql-test/suite/innodb/r/innodb_gis.result2
-rw-r--r--mysql-test/suite/innodb/r/innodb_information_schema.result4
-rw-r--r--mysql-test/suite/innodb/r/innodb_information_schema_buffer.result52
-rw-r--r--mysql-test/suite/innodb/r/innodb_lock_wait_timeout_1.result12
-rw-r--r--mysql-test/suite/innodb/r/innodb_mysql.result23
-rw-r--r--mysql-test/suite/innodb/r/innodb_rename_index.result989
-rw-r--r--mysql-test/suite/innodb/r/innodb_scrub.result12
-rw-r--r--mysql-test/suite/innodb/r/innodb_skip_innodb_is_tables.result492
-rw-r--r--mysql-test/suite/innodb/r/innodb_status_variables.result127
-rw-r--r--mysql-test/suite/innodb/r/innodb_trx_weight.result2
-rw-r--r--mysql-test/suite/innodb/r/innodb_wl6326.result20
-rw-r--r--mysql-test/suite/innodb/r/innodb_wl6326_big.result449
-rw-r--r--mysql-test/suite/innodb/r/instant_alter,4k.rdiff4
-rw-r--r--mysql-test/suite/innodb/r/instant_alter.result38
-rw-r--r--mysql-test/suite/innodb/r/instant_alter_bugs.result3
-rw-r--r--mysql-test/suite/innodb/r/instant_alter_charset.result2
-rw-r--r--mysql-test/suite/innodb/r/instant_alter_debug,redundant.rdiff6
-rw-r--r--mysql-test/suite/innodb/r/instant_alter_debug.result41
-rw-r--r--mysql-test/suite/innodb/r/instant_alter_purge.result23
-rw-r--r--mysql-test/suite/innodb/r/log_alter_table.result21
-rw-r--r--mysql-test/suite/innodb/r/log_corruption.result70
-rw-r--r--mysql-test/suite/innodb/r/log_file.result110
-rw-r--r--mysql-test/suite/innodb/r/log_file_name.result2
-rw-r--r--mysql-test/suite/innodb/r/log_file_name_debug.result6
-rw-r--r--mysql-test/suite/innodb/r/log_file_size.result27
-rw-r--r--mysql-test/suite/innodb/r/monitor.result236
-rw-r--r--mysql-test/suite/innodb/r/page_cleaner.result14
-rw-r--r--mysql-test/suite/innodb/r/purge_secondary.result15
-rw-r--r--mysql-test/suite/innodb/r/purge_thread_shutdown.result10
-rw-r--r--mysql-test/suite/innodb/r/redo_log_during_checkpoint.result1
-rw-r--r--mysql-test/suite/innodb/r/row_format_redundant.result3
-rw-r--r--mysql-test/suite/innodb/r/table_definition_cache_debug.result2
-rw-r--r--mysql-test/suite/innodb/r/table_flags.result1
-rw-r--r--mysql-test/suite/innodb/r/temp_table_savepoint.result318
-rw-r--r--mysql-test/suite/innodb/r/temporary_table.result2
-rw-r--r--mysql-test/suite/innodb/r/temporary_table_optimization.result2
-rw-r--r--mysql-test/suite/innodb/r/undo_truncate.result3
-rw-r--r--mysql-test/suite/innodb/r/undo_truncate_recover.result1
-rw-r--r--mysql-test/suite/innodb/t/alter_copy.test8
-rw-r--r--mysql-test/suite/innodb/t/alter_large_dml.test2
-rw-r--r--mysql-test/suite/innodb/t/alter_partitioned.test13
-rw-r--r--mysql-test/suite/innodb/t/alter_rename_existing.test2
-rw-r--r--mysql-test/suite/innodb/t/alter_rename_files.test31
-rw-r--r--mysql-test/suite/innodb/t/alter_table.test17
-rw-r--r--mysql-test/suite/innodb/t/autoinc_debug.test8
-rw-r--r--mysql-test/suite/innodb/t/buf_pool_resize_oom.test2
-rw-r--r--mysql-test/suite/innodb/t/corrupted_during_recovery.test4
-rw-r--r--mysql-test/suite/innodb/t/doublewrite.test19
-rw-r--r--mysql-test/suite/innodb/t/encryption_threads_shutdown.opt6
-rw-r--r--mysql-test/suite/innodb/t/encryption_threads_shutdown.test32
-rw-r--r--mysql-test/suite/innodb/t/flush.opt1
-rw-r--r--mysql-test/suite/innodb/t/flush.test19
-rw-r--r--mysql-test/suite/innodb/t/foreign_key.combinations5
-rw-r--r--mysql-test/suite/innodb/t/foreign_key.test58
-rw-r--r--mysql-test/suite/innodb/t/full_crc32_import.opt1
-rw-r--r--mysql-test/suite/innodb/t/full_crc32_import.test4
-rw-r--r--mysql-test/suite/innodb/t/gap_locks.test29
-rw-r--r--mysql-test/suite/innodb/t/group_commit_binlog_pos-master.opt2
-rw-r--r--mysql-test/suite/innodb/t/group_commit_binlog_pos_no_optimize_thread-master.opt2
-rw-r--r--mysql-test/suite/innodb/t/group_commit_crash-master.opt2
-rw-r--r--mysql-test/suite/innodb/t/group_commit_crash_no_optimize_thread-master.opt2
-rw-r--r--mysql-test/suite/innodb/t/group_commit_force_recovery-master.opt1
-rw-r--r--mysql-test/suite/innodb/t/group_commit_force_recovery.test21
-rw-r--r--mysql-test/suite/innodb/t/ibuf_not_empty.combinations4
-rw-r--r--mysql-test/suite/innodb/t/ibuf_not_empty.test25
-rw-r--r--mysql-test/suite/innodb/t/import_corrupted.test2
-rw-r--r--mysql-test/suite/innodb/t/index_vcol_purge_startup.test28
-rw-r--r--mysql-test/suite/innodb/t/information_schema_grants.opt1
-rw-r--r--mysql-test/suite/innodb/t/information_schema_grants.test9
-rw-r--r--mysql-test/suite/innodb/t/innodb-alter-debug.test12
-rw-r--r--mysql-test/suite/innodb/t/innodb-alter.test6
-rw-r--r--mysql-test/suite/innodb/t/innodb-analyze.test32
-rw-r--r--mysql-test/suite/innodb/t/innodb-change-buffer-recovery.test2
-rw-r--r--mysql-test/suite/innodb/t/innodb-fk-warnings.test26
-rw-r--r--mysql-test/suite/innodb/t/innodb-fk.test34
-rw-r--r--mysql-test/suite/innodb/t/innodb-mdev7046.test2
-rw-r--r--mysql-test/suite/innodb/t/innodb-page-cleaners.test100
-rw-r--r--mysql-test/suite/innodb/t/innodb-page_compression_tables.test7
-rw-r--r--mysql-test/suite/innodb/t/innodb-stats-sample.test32
-rw-r--r--mysql-test/suite/innodb/t/innodb-trim.test12
-rw-r--r--mysql-test/suite/innodb/t/innodb-wl5522-debug.test52
-rw-r--r--mysql-test/suite/innodb/t/innodb-wl5522.test5
-rw-r--r--mysql-test/suite/innodb/t/innodb-wl5980-alter.test256
-rw-r--r--mysql-test/suite/innodb/t/innodb.test11
-rw-r--r--mysql-test/suite/innodb/t/innodb_buffer_pool_resize_debug.test10
-rw-r--r--mysql-test/suite/innodb/t/innodb_buffer_pool_resize_temporary.test30
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug12400341-master.opt2
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug12400341.test5
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug12902967.test2
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug14147491-master.opt2
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug14147491.test2
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug30113362.test2
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug34300.test2
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug35220.test2
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug38231.test2
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug39438.test2
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug42101-nonzero-master.opt1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug42101-nonzero.test20
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug42101.test18
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug53674-master.opt2
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug53756-master.opt2
-rw-r--r--mysql-test/suite/innodb/t/innodb_bulk_create_index_flush.test75
-rw-r--r--mysql-test/suite/innodb/t/innodb_ctype_big5.test2
-rw-r--r--mysql-test/suite/innodb/t/innodb_ctype_latin1.test2
-rw-r--r--mysql-test/suite/innodb/t/innodb_ctype_ldml.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_ctype_utf8.test2
-rw-r--r--mysql-test/suite/innodb/t/innodb_defrag_concurrent.opt1
-rw-r--r--mysql-test/suite/innodb/t/innodb_force_recovery.test27
-rw-r--r--mysql-test/suite/innodb/t/innodb_gis.test2
-rw-r--r--mysql-test/suite/innodb/t/innodb_information_schema.test2
-rw-r--r--mysql-test/suite/innodb/t/innodb_information_schema_buffer.test50
-rw-r--r--mysql-test/suite/innodb/t/innodb_lock_wait_timeout_1.test16
-rw-r--r--mysql-test/suite/innodb/t/innodb_rename_index.test538
-rw-r--r--mysql-test/suite/innodb/t/innodb_scrub.opt1
-rw-r--r--mysql-test/suite/innodb/t/innodb_scrub.test28
-rw-r--r--mysql-test/suite/innodb/t/innodb_skip_innodb_is_tables.opt2
-rw-r--r--mysql-test/suite/innodb/t/innodb_skip_innodb_is_tables.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_status_variables.test7
-rw-r--r--mysql-test/suite/innodb/t/innodb_trx_weight.test2
-rw-r--r--mysql-test/suite/innodb/t/innodb_wl6326.test27
-rw-r--r--mysql-test/suite/innodb/t/innodb_wl6326_big.test716
-rw-r--r--mysql-test/suite/innodb/t/instant_alter.test12
-rw-r--r--mysql-test/suite/innodb/t/instant_alter_bugs.test1
-rw-r--r--mysql-test/suite/innodb/t/instant_alter_charset.test2
-rw-r--r--mysql-test/suite/innodb/t/instant_alter_debug.test48
-rw-r--r--mysql-test/suite/innodb/t/instant_alter_purge.test39
-rw-r--r--mysql-test/suite/innodb/t/leaf_page_corrupted_during_recovery.test6
-rw-r--r--mysql-test/suite/innodb/t/log_alter_table.opt1
-rw-r--r--mysql-test/suite/innodb/t/log_alter_table.test47
-rw-r--r--mysql-test/suite/innodb/t/log_corruption.test182
-rw-r--r--mysql-test/suite/innodb/t/log_file.test20
-rw-r--r--mysql-test/suite/innodb/t/log_file_name.test4
-rw-r--r--mysql-test/suite/innodb/t/log_file_name_debug.test6
-rw-r--r--mysql-test/suite/innodb/t/log_file_size.test39
-rw-r--r--mysql-test/suite/innodb/t/mdev-117.test2
-rw-r--r--mysql-test/suite/innodb/t/monitor.test183
-rw-r--r--mysql-test/suite/innodb/t/page_cleaner.test30
-rw-r--r--mysql-test/suite/innodb/t/purge_secondary.test14
-rw-r--r--mysql-test/suite/innodb/t/recovery_shutdown.test3
-rw-r--r--mysql-test/suite/innodb/t/redo_log_during_checkpoint.test1
-rw-r--r--mysql-test/suite/innodb/t/table_definition_cache_debug.test2
-rw-r--r--mysql-test/suite/innodb/t/temp_table_savepoint.test159
-rw-r--r--mysql-test/suite/innodb/t/temporary_table.test3
-rw-r--r--mysql-test/suite/innodb/t/undo_truncate.test8
-rw-r--r--mysql-test/suite/innodb/t/undo_truncate_recover.test2
-rw-r--r--mysql-test/suite/innodb_fts/r/fulltext.result2
-rw-r--r--mysql-test/suite/innodb_fts/r/sync.result10
-rw-r--r--mysql-test/suite/innodb_fts/t/fulltext.test2
-rw-r--r--mysql-test/suite/innodb_fts/t/sync.test14
-rw-r--r--mysql-test/suite/innodb_gis/r/1.result4
-rw-r--r--mysql-test/suite/innodb_gis/r/alter_spatial_index.result6
-rw-r--r--mysql-test/suite/innodb_gis/r/create_spatial_index.result2
-rw-r--r--mysql-test/suite/innodb_gis/r/gis.result4
-rw-r--r--mysql-test/suite/innodb_gis/r/point_basic.result123
-rw-r--r--mysql-test/suite/innodb_gis/r/rtree_estimate.result6
-rw-r--r--mysql-test/suite/innodb_gis/t/point_basic.test113
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_buffer_page.result28
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_buffer_page.test9
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_buffer_page_lru.result28
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_buffer_page_lru.test9
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_buffer_pool_stats.result36
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_buffer_pool_stats.test3
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_cmp.opt1
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_cmp.result10
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_cmp.test3
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_cmp_per_index.result12
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_cmp_per_index.test3
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_cmp_per_index_reset.opt1
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_cmp_per_index_reset.result12
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_cmp_per_index_reset.test3
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_cmp_reset.opt1
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_cmp_reset.result10
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_cmp_reset.test3
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_cmpmem.result10
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_cmpmem.test3
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_cmpmem_reset.opt1
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_cmpmem_reset.result10
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_cmpmem_reset.test3
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_ft_being_deleted.opt1
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_ft_being_deleted.result5
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_ft_being_deleted.test3
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_ft_config.opt1
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_ft_config.result6
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_ft_config.test3
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_ft_default_stopword.opt1
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_ft_default_stopword.result5
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_ft_default_stopword.test3
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_ft_deleted.opt1
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_ft_deleted.result5
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_ft_deleted.test3
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_ft_index_cache.opt1
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_ft_index_cache.result10
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_ft_index_cache.test3
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_ft_index_table.opt1
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_ft_index_table.result10
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_ft_index_table.test3
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_lock_waits.result8
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_lock_waits.test3
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_locks.result18
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_locks.test9
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_metrics.result25
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_metrics.test9
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_mutexes.opt1
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_mutexes.result8
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_mutexes.test3
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_sys_columns.result10
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_sys_columns.test3
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_sys_datafiles.opt1
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_sys_datafiles.result6
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_sys_datafiles.test3
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_sys_fields.result7
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_sys_fields.test3
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_sys_foreign.result9
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_sys_foreign.test3
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_sys_foreign_cols.result8
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_sys_foreign_cols.test3
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_sys_indexes.result12
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_sys_indexes.test3
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_sys_semaphore_waits.opt1
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_sys_semaphore_waits.result24
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_sys_semaphore_waits.test3
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_sys_tables.result12
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_sys_tables.test3
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_sys_tablespaces.opt1
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_sys_tablespaces.result13
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_sys_tablespaces.test3
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_sys_tablestats.opt1
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_sys_tablestats.result13
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_sys_tablestats.test3
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_sys_virtual.result7
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_sys_virtual.test3
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_tablespaces_encryption.opt1
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_tablespaces_encryption.result14
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_tablespaces_encryption.test3
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_trx.result30
-rw-r--r--mysql-test/suite/innodb_i_s/innodb_trx.test9
-rw-r--r--mysql-test/suite/innodb_zip/r/16k,full_crc32.rdiff16
-rw-r--r--mysql-test/suite/innodb_zip/r/16k,strict_full_crc32.rdiff16
-rw-r--r--mysql-test/suite/innodb_zip/r/blob.result21
-rw-r--r--mysql-test/suite/innodb_zip/r/bug53591.result2
-rw-r--r--mysql-test/suite/innodb_zip/r/cmp_per_index.result14
-rw-r--r--mysql-test/suite/innodb_zip/r/innochecksum_3.result4
-rw-r--r--mysql-test/suite/innodb_zip/r/page_size,4k.rdiff12
-rw-r--r--mysql-test/suite/innodb_zip/r/page_size,8k.rdiff12
-rw-r--r--mysql-test/suite/innodb_zip/r/page_size.result10
-rw-r--r--mysql-test/suite/innodb_zip/r/recover.result17
-rw-r--r--mysql-test/suite/innodb_zip/r/restart.result224
-rw-r--r--mysql-test/suite/innodb_zip/r/wl5522_debug_zip.result23
-rw-r--r--mysql-test/suite/innodb_zip/r/wl5522_zip.result4
-rw-r--r--mysql-test/suite/innodb_zip/t/blob.test29
-rw-r--r--mysql-test/suite/innodb_zip/t/cmp_per_index.opt1
-rw-r--r--mysql-test/suite/innodb_zip/t/cmp_per_index.test16
-rw-r--r--mysql-test/suite/innodb_zip/t/large_blob-master.opt2
-rw-r--r--mysql-test/suite/innodb_zip/t/recover.test16
-rw-r--r--mysql-test/suite/innodb_zip/t/restart.test92
-rw-r--r--mysql-test/suite/innodb_zip/t/wl5522_debug_zip.test37
-rw-r--r--mysql-test/suite/maria/aria_sort_buffer.result11
-rw-r--r--mysql-test/suite/maria/aria_sort_buffer.test15
-rw-r--r--mysql-test/suite/maria/bulk_insert_crash.opt2
-rw-r--r--mysql-test/suite/maria/create.result29
-rw-r--r--mysql-test/suite/maria/create.test40
-rw-r--r--mysql-test/suite/maria/icp.result24
-rw-r--r--mysql-test/suite/maria/icp.test6
-rw-r--r--mysql-test/suite/maria/lock.result14
-rw-r--r--mysql-test/suite/maria/lock.test13
-rw-r--r--mysql-test/suite/maria/maria-autozerofill.result6
-rw-r--r--mysql-test/suite/maria/maria-autozerofill.test9
-rw-r--r--mysql-test/suite/maria/maria-big.result2
-rw-r--r--mysql-test/suite/maria/maria-big.test2
-rw-r--r--mysql-test/suite/maria/maria-connect.result9
-rw-r--r--mysql-test/suite/maria/maria-connect.test9
-rw-r--r--mysql-test/suite/maria/maria-gis-recovery.opt2
-rw-r--r--mysql-test/suite/maria/maria-gis-rtree-dynamic.result2
-rw-r--r--mysql-test/suite/maria/maria-gis-rtree-dynamic.test2
-rw-r--r--mysql-test/suite/maria/maria-gis-rtree-trans.result2
-rw-r--r--mysql-test/suite/maria/maria-gis-rtree-trans.test2
-rw-r--r--mysql-test/suite/maria/maria-gis-rtree.result2
-rw-r--r--mysql-test/suite/maria/maria-gis-rtree.test2
-rw-r--r--mysql-test/suite/maria/maria-partitioning.result7
-rw-r--r--mysql-test/suite/maria/maria-partitioning.test8
-rw-r--r--mysql-test/suite/maria/maria-purge.result4
-rw-r--r--mysql-test/suite/maria/maria-purge.test8
-rw-r--r--mysql-test/suite/maria/maria-recovery-big-master.opt2
-rw-r--r--mysql-test/suite/maria/maria-recovery-bitmap-master.opt2
-rw-r--r--mysql-test/suite/maria/maria-recovery-master.opt2
-rw-r--r--mysql-test/suite/maria/maria-recovery-rtree-ft-master.opt2
-rw-r--r--mysql-test/suite/maria/maria-recovery2-master.opt2
-rw-r--r--mysql-test/suite/maria/maria-recovery3-master.opt2
-rw-r--r--mysql-test/suite/maria/maria-ucs2.result12
-rw-r--r--mysql-test/suite/maria/maria-ucs2.test10
-rw-r--r--mysql-test/suite/maria/maria.result74
-rw-r--r--mysql-test/suite/maria/maria.test14
-rw-r--r--mysql-test/suite/maria/maria3.result8
-rw-r--r--mysql-test/suite/maria/maria3.test8
-rw-r--r--mysql-test/suite/maria/maria_notembedded.result2
-rw-r--r--mysql-test/suite/maria/maria_notembedded.test6
-rw-r--r--mysql-test/suite/maria/maria_partition.result4
-rw-r--r--mysql-test/suite/maria/maria_partition.test8
-rw-r--r--mysql-test/suite/maria/max_length.result32
-rw-r--r--mysql-test/suite/maria/max_length.test8
-rw-r--r--mysql-test/suite/maria/mrr.result16
-rw-r--r--mysql-test/suite/maria/mrr.test10
-rw-r--r--mysql-test/suite/maria/rollback.result186
-rw-r--r--mysql-test/suite/maria/rollback.test51
-rw-r--r--mysql-test/suite/maria/transaction.result19
-rw-r--r--mysql-test/suite/maria/transaction.test26
-rw-r--r--mysql-test/suite/mariabackup/absolute_ibdata_paths.opt1
-rw-r--r--mysql-test/suite/mariabackup/ddl_incremental_encrypted.result26
-rw-r--r--mysql-test/suite/mariabackup/ddl_incremental_encrypted.test66
-rw-r--r--mysql-test/suite/mariabackup/huge_lsn.result2
-rw-r--r--mysql-test/suite/mariabackup/huge_lsn.test2
-rw-r--r--mysql-test/suite/mariabackup/innodb_log_optimize_ddl.result37
-rw-r--r--mysql-test/suite/mariabackup/innodb_log_optimize_ddl.test47
-rw-r--r--mysql-test/suite/mariabackup/innodb_redo_log_overwrite.opt2
-rw-r--r--mysql-test/suite/mariabackup/innodb_redo_overwrite.opt2
-rw-r--r--mysql-test/suite/mariabackup/innodb_redo_overwrite.result1
-rw-r--r--mysql-test/suite/mariabackup/innodb_redo_overwrite.test13
-rw-r--r--mysql-test/suite/mariabackup/innodb_xa_rollback.result45
-rw-r--r--mysql-test/suite/mariabackup/innodb_xa_rollback.test77
-rw-r--r--mysql-test/suite/mariabackup/mlog_index_load.result16
-rw-r--r--mysql-test/suite/mariabackup/mlog_index_load.test28
-rw-r--r--mysql-test/suite/mariabackup/row_format_redundant.result14
-rw-r--r--mysql-test/suite/mariabackup/row_format_redundant.test17
-rw-r--r--mysql-test/suite/mariabackup/undo_space_id.result10
-rw-r--r--mysql-test/suite/mariabackup/undo_space_id.test2
-rw-r--r--mysql-test/suite/mariabackup/xb_compressed_encrypted.opt2
-rw-r--r--mysql-test/suite/mariabackup/xbstream.test2
-rw-r--r--mysql-test/suite/multi_source/info_logs.result8
-rw-r--r--mysql-test/suite/multi_source/multi_source_slave_alias_replica.result157
-rw-r--r--mysql-test/suite/multi_source/multi_source_slave_alias_replica.test80
-rw-r--r--mysql-test/suite/multi_source/reset_slave.result4
-rw-r--r--mysql-test/suite/multi_source/simple.result14
-rw-r--r--mysql-test/suite/optimizer_unfixed_bugs/r/bug43617.result2
-rw-r--r--mysql-test/suite/optimizer_unfixed_bugs/t/bug43617.test2
-rw-r--r--mysql-test/suite/parts/inc/partition.pre4
-rw-r--r--mysql-test/suite/parts/inc/partition_crash.inc18
-rw-r--r--mysql-test/suite/parts/inc/partition_engine.inc6
-rw-r--r--mysql-test/suite/parts/inc/partition_fail_t2.inc2
-rw-r--r--mysql-test/suite/parts/inc/partition_layout.inc2
-rw-r--r--mysql-test/suite/parts/inc/partition_mgm_crash.inc18
-rw-r--r--mysql-test/suite/parts/r/alter_table.result30
-rw-r--r--mysql-test/suite/parts/r/debug_fail_myisam.result (renamed from mysql-test/suite/parts/r/partition_debug_myisam.result)76
-rw-r--r--mysql-test/suite/parts/r/debug_innodb_crash.result2170
-rw-r--r--mysql-test/suite/parts/r/debug_innodb_fail.result3864
-rw-r--r--mysql-test/suite/parts/r/debug_myisam_crash.result2376
-rw-r--r--mysql-test/suite/parts/r/debug_myisam_fail.result4115
-rw-r--r--mysql-test/suite/parts/r/longname.result7
-rw-r--r--mysql-test/suite/parts/r/partition_basic_symlink_innodb.result6
-rw-r--r--mysql-test/suite/parts/r/partition_debug.result48
-rw-r--r--mysql-test/suite/parts/r/partition_debug_innodb.result6056
-rw-r--r--mysql-test/suite/parts/r/partition_engine_innodb.result4
-rw-r--r--mysql-test/suite/parts/r/partition_engine_myisam.result4
-rw-r--r--mysql-test/suite/parts/r/partition_open.result2
-rw-r--r--mysql-test/suite/parts/r/partition_special_innodb.result41
-rw-r--r--mysql-test/suite/parts/r/partition_value_innodb.result2
-rw-r--r--mysql-test/suite/parts/r/partition_value_myisam.result2
-rw-r--r--mysql-test/suite/parts/r/percona_nonflushing_analyze_debug.result68
-rw-r--r--mysql-test/suite/parts/t/alter_table.test40
-rw-r--r--mysql-test/suite/parts/t/debug_innodb_crash-master.opt1
-rw-r--r--mysql-test/suite/parts/t/debug_innodb_crash.test22
-rw-r--r--mysql-test/suite/parts/t/debug_innodb_fail-master.opt1
-rw-r--r--mysql-test/suite/parts/t/debug_innodb_fail.test22
-rw-r--r--mysql-test/suite/parts/t/debug_myisam_crash-master.opt1
-rw-r--r--mysql-test/suite/parts/t/debug_myisam_crash.test (renamed from mysql-test/suite/parts/t/partition_debug_myisam.test)3
-rw-r--r--mysql-test/suite/parts/t/debug_myisam_fail-master.opt1
-rw-r--r--mysql-test/suite/parts/t/debug_myisam_fail.test14
-rw-r--r--mysql-test/suite/parts/t/longname.test8
-rw-r--r--mysql-test/suite/parts/t/partition_basic_symlink_innodb.test56
-rw-r--r--mysql-test/suite/parts/t/partition_debug_innodb-master.opt2
-rw-r--r--mysql-test/suite/parts/t/partition_debug_innodb.test7
-rw-r--r--mysql-test/suite/parts/t/partition_debug_myisam-master.opt1
-rw-r--r--mysql-test/suite/parts/t/partition_debug_sync_innodb.test6
-rw-r--r--mysql-test/suite/parts/t/partition_special_innodb.test44
-rw-r--r--mysql-test/suite/parts/t/percona_nonflushing_analyze_debug.test29
-rw-r--r--mysql-test/suite/perfschema/disabled.def31
-rw-r--r--mysql-test/suite/perfschema/include/binlog_edge_common.inc8
-rw-r--r--mysql-test/suite/perfschema/include/event_aggregate_cleanup.inc7
-rw-r--r--mysql-test/suite/perfschema/include/event_aggregate_load.inc344
-rw-r--r--mysql-test/suite/perfschema/include/event_aggregate_setup.inc102
-rw-r--r--mysql-test/suite/perfschema/include/hostcache_dump.inc2
-rw-r--r--mysql-test/suite/perfschema/include/memory_aggregate_cleanup.inc45
-rw-r--r--mysql-test/suite/perfschema/include/memory_aggregate_load.inc506
-rw-r--r--mysql-test/suite/perfschema/include/memory_aggregate_setup.inc208
-rw-r--r--mysql-test/suite/perfschema/include/pfs_upgrade.inc10
-rw-r--r--mysql-test/suite/perfschema/include/prepared_stmts_deallocation.inc11
-rw-r--r--mysql-test/suite/perfschema/include/prepared_stmts_execution.inc18
-rw-r--r--mysql-test/suite/perfschema/include/prepared_stmts_setup.inc20
-rw-r--r--mysql-test/suite/perfschema/include/program_cleanup.inc31
-rw-r--r--mysql-test/suite/perfschema/include/program_execution.inc54
-rw-r--r--mysql-test/suite/perfschema/include/program_nested_cleanup.inc21
-rw-r--r--mysql-test/suite/perfschema/include/program_nested_execution.inc22
-rw-r--r--mysql-test/suite/perfschema/include/program_nested_setup.inc88
-rw-r--r--mysql-test/suite/perfschema/include/program_setup.inc136
-rw-r--r--mysql-test/suite/perfschema/include/reset_transaction_gtid.inc20
-rw-r--r--mysql-test/suite/perfschema/include/schema.inc15
-rw-r--r--mysql-test/suite/perfschema/include/show_aggregate.inc125
-rw-r--r--mysql-test/suite/perfschema/include/show_plugin_verifier.inc29
-rw-r--r--mysql-test/suite/perfschema/include/show_transaction_gtid.inc29
-rw-r--r--mysql-test/suite/perfschema/include/sizing_auto.inc24
-rw-r--r--mysql-test/suite/perfschema/include/socket_check1.inc2
-rw-r--r--mysql-test/suite/perfschema/include/start_server_common.inc45
-rw-r--r--mysql-test/suite/perfschema/include/table_aggregate_load.inc63
-rw-r--r--mysql-test/suite/perfschema/include/table_aggregate_setup.inc6
-rw-r--r--mysql-test/suite/perfschema/include/table_io_result_helper.inc3
-rw-r--r--mysql-test/suite/perfschema/include/transaction_cleanup.inc12
-rw-r--r--mysql-test/suite/perfschema/include/transaction_nested_events_verifier.inc145
-rw-r--r--mysql-test/suite/perfschema/include/transaction_setup.inc231
-rw-r--r--mysql-test/suite/perfschema/include/upgrade_check.inc1
-rw-r--r--mysql-test/suite/perfschema/include/wait_for_pfs_thread_count.inc2
-rw-r--r--mysql-test/suite/perfschema/r/all_tests.result3
-rw-r--r--mysql-test/suite/perfschema/r/alter_table_progress.result100
-rw-r--r--mysql-test/suite/perfschema/r/bad_option.result8
-rw-r--r--mysql-test/suite/perfschema/r/bad_option_1.result4
-rw-r--r--mysql-test/suite/perfschema/r/bad_option_2.result3
-rw-r--r--mysql-test/suite/perfschema/r/bad_option_3.result4
-rw-r--r--mysql-test/suite/perfschema/r/bad_option_4.result4
-rw-r--r--mysql-test/suite/perfschema/r/bad_option_5.result4
-rw-r--r--mysql-test/suite/perfschema/r/batch_table_io_func.result195
-rw-r--r--mysql-test/suite/perfschema/r/binlog_edge_mix.result8
-rw-r--r--mysql-test/suite/perfschema/r/binlog_edge_row.result8
-rw-r--r--mysql-test/suite/perfschema/r/binlog_edge_stmt.result8
-rw-r--r--mysql-test/suite/perfschema/r/binlog_ok_mix.result8
-rw-r--r--mysql-test/suite/perfschema/r/binlog_ok_row.result8
-rw-r--r--mysql-test/suite/perfschema/r/binlog_ok_stmt.result8
-rw-r--r--mysql-test/suite/perfschema/r/checksum.result16
-rw-r--r--mysql-test/suite/perfschema/r/cnf_option.result4
-rw-r--r--mysql-test/suite/perfschema/r/connect_attrs.result4
-rw-r--r--mysql-test/suite/perfschema/r/connection_type_notwin.result79
-rw-r--r--mysql-test/suite/perfschema/r/connection_type_win.result78
-rw-r--r--mysql-test/suite/perfschema/r/csv_table_io.result92
-rw-r--r--mysql-test/suite/perfschema/r/ddl_esms_by_program.result9
-rw-r--r--mysql-test/suite/perfschema/r/ddl_ets_by_account_by_event_name.result10
-rw-r--r--mysql-test/suite/perfschema/r/ddl_ets_by_host_by_event_name.result10
-rw-r--r--mysql-test/suite/perfschema/r/ddl_ets_by_thread_by_event_name.result9
-rw-r--r--mysql-test/suite/perfschema/r/ddl_ets_by_user_by_event_name.result10
-rw-r--r--mysql-test/suite/perfschema/r/ddl_ets_global_by_event_name.result10
-rw-r--r--mysql-test/suite/perfschema/r/ddl_events_stages_current.result3
-rw-r--r--mysql-test/suite/perfschema/r/ddl_events_stages_history.result3
-rw-r--r--mysql-test/suite/perfschema/r/ddl_events_stages_history_long.result3
-rw-r--r--mysql-test/suite/perfschema/r/ddl_events_transactions_current.result7
-rw-r--r--mysql-test/suite/perfschema/r/ddl_events_transactions_history.result7
-rw-r--r--mysql-test/suite/perfschema/r/ddl_events_transactions_history_long.result7
-rw-r--r--mysql-test/suite/perfschema/r/ddl_global_status.result10
-rw-r--r--mysql-test/suite/perfschema/r/ddl_global_variables.result11
-rw-r--r--mysql-test/suite/perfschema/r/ddl_mems_by_account_by_event_name.result10
-rw-r--r--mysql-test/suite/perfschema/r/ddl_mems_by_host_by_event_name.result10
-rw-r--r--mysql-test/suite/perfschema/r/ddl_mems_by_thread_by_event_name.result10
-rw-r--r--mysql-test/suite/perfschema/r/ddl_mems_by_user_by_event_name.result10
-rw-r--r--mysql-test/suite/perfschema/r/ddl_mems_global_by_event_name.result10
-rw-r--r--mysql-test/suite/perfschema/r/ddl_metadata_locks.result8
-rw-r--r--mysql-test/suite/perfschema/r/ddl_prepared_statements_instances.result9
-rw-r--r--mysql-test/suite/perfschema/r/ddl_replication_applier_configuration.result11
-rw-r--r--mysql-test/suite/perfschema/r/ddl_replication_applier_status.result11
-rw-r--r--mysql-test/suite/perfschema/r/ddl_replication_applier_status_by_coordinator.result11
-rw-r--r--mysql-test/suite/perfschema/r/ddl_replication_applier_status_by_worker.result11
-rw-r--r--mysql-test/suite/perfschema/r/ddl_replication_connection_configuration.result11
-rw-r--r--mysql-test/suite/perfschema/r/ddl_replication_connection_status.result11
-rw-r--r--mysql-test/suite/perfschema/r/ddl_replication_group_member_stats.result11
-rw-r--r--mysql-test/suite/perfschema/r/ddl_replication_group_members.result11
-rw-r--r--mysql-test/suite/perfschema/r/ddl_session_status.result11
-rw-r--r--mysql-test/suite/perfschema/r/ddl_session_variables.result11
-rw-r--r--mysql-test/suite/perfschema/r/ddl_setup_actors.result2
-rw-r--r--mysql-test/suite/perfschema/r/ddl_status_by_account.result10
-rw-r--r--mysql-test/suite/perfschema/r/ddl_status_by_host.result10
-rw-r--r--mysql-test/suite/perfschema/r/ddl_status_by_thread.result10
-rw-r--r--mysql-test/suite/perfschema/r/ddl_status_by_user.result10
-rw-r--r--mysql-test/suite/perfschema/r/ddl_table_handles.result8
-rw-r--r--mysql-test/suite/perfschema/r/ddl_uvar_by_thread.result11
-rw-r--r--mysql-test/suite/perfschema/r/ddl_variables_by_thread.result11
-rw-r--r--mysql-test/suite/perfschema/r/digest_table_full.result2
-rw-r--r--mysql-test/suite/perfschema/r/dml_esms_by_program.result27
-rw-r--r--mysql-test/suite/perfschema/r/dml_ets_by_account_by_event_name.result26
-rw-r--r--mysql-test/suite/perfschema/r/dml_ets_by_host_by_event_name.result26
-rw-r--r--mysql-test/suite/perfschema/r/dml_ets_by_thread_by_event_name.result26
-rw-r--r--mysql-test/suite/perfschema/r/dml_ets_by_user_by_event_name.result26
-rw-r--r--mysql-test/suite/perfschema/r/dml_ets_global_by_event_name.result25
-rw-r--r--mysql-test/suite/perfschema/r/dml_events_stages_current.result2
-rw-r--r--mysql-test/suite/perfschema/r/dml_events_stages_history.result2
-rw-r--r--mysql-test/suite/perfschema/r/dml_events_stages_history_long.result2
-rw-r--r--mysql-test/suite/perfschema/r/dml_events_statements_current.result1
-rw-r--r--mysql-test/suite/perfschema/r/dml_events_statements_history.result1
-rw-r--r--mysql-test/suite/perfschema/r/dml_events_statements_history_long.result1
-rw-r--r--mysql-test/suite/perfschema/r/dml_events_transactions_current.result25
-rw-r--r--mysql-test/suite/perfschema/r/dml_events_transactions_history.result29
-rw-r--r--mysql-test/suite/perfschema/r/dml_events_transactions_history_long.result29
-rw-r--r--mysql-test/suite/perfschema/r/dml_file_instances.result59
-rw-r--r--mysql-test/suite/perfschema/r/dml_global_status.result21
-rw-r--r--mysql-test/suite/perfschema/r/dml_global_variables.result21
-rw-r--r--mysql-test/suite/perfschema/r/dml_handler.result164
-rw-r--r--mysql-test/suite/perfschema/r/dml_mems_by_account_by_event_name.result26
-rw-r--r--mysql-test/suite/perfschema/r/dml_mems_by_host_by_event_name.result26
-rw-r--r--mysql-test/suite/perfschema/r/dml_mems_by_thread_by_event_name.result26
-rw-r--r--mysql-test/suite/perfschema/r/dml_mems_by_user_by_event_name.result26
-rw-r--r--mysql-test/suite/perfschema/r/dml_mems_global_by_event_name.result26
-rw-r--r--mysql-test/suite/perfschema/r/dml_metadata_locks.result21
-rw-r--r--mysql-test/suite/perfschema/r/dml_prepared_statements_instances.result26
-rw-r--r--mysql-test/suite/perfschema/r/dml_replication_applier_configuration.result21
-rw-r--r--mysql-test/suite/perfschema/r/dml_replication_applier_status.result24
-rw-r--r--mysql-test/suite/perfschema/r/dml_replication_applier_status_by_coordinator.result25
-rw-r--r--mysql-test/suite/perfschema/r/dml_replication_applier_status_by_worker.result25
-rw-r--r--mysql-test/suite/perfschema/r/dml_replication_connection_configuration.result25
-rw-r--r--mysql-test/suite/perfschema/r/dml_replication_connection_status.result25
-rw-r--r--mysql-test/suite/perfschema/r/dml_replication_group_member_stats.result26
-rw-r--r--mysql-test/suite/perfschema/r/dml_replication_group_members.result24
-rw-r--r--mysql-test/suite/perfschema/r/dml_session_status.result21
-rw-r--r--mysql-test/suite/perfschema/r/dml_session_variables.result21
-rw-r--r--mysql-test/suite/perfschema/r/dml_setup_actors.result80
-rw-r--r--mysql-test/suite/perfschema/r/dml_setup_consumers.result6
-rw-r--r--mysql-test/suite/perfschema/r/dml_setup_instruments.result11
-rw-r--r--mysql-test/suite/perfschema/r/dml_setup_objects.result4
-rw-r--r--mysql-test/suite/perfschema/r/dml_setup_timers.result41
-rw-r--r--mysql-test/suite/perfschema/r/dml_status_by_account.result24
-rw-r--r--mysql-test/suite/perfschema/r/dml_status_by_host.result24
-rw-r--r--mysql-test/suite/perfschema/r/dml_status_by_thread.result24
-rw-r--r--mysql-test/suite/perfschema/r/dml_status_by_user.result24
-rw-r--r--mysql-test/suite/perfschema/r/dml_table_handles.result21
-rw-r--r--mysql-test/suite/perfschema/r/dml_threads.result3
-rw-r--r--mysql-test/suite/perfschema/r/dml_uvar_by_thread.result30
-rw-r--r--mysql-test/suite/perfschema/r/dml_variables_by_thread.result24
-rw-r--r--mysql-test/suite/perfschema/r/event_aggregate.result6031
-rw-r--r--mysql-test/suite/perfschema/r/event_aggregate_no_a.result4258
-rw-r--r--mysql-test/suite/perfschema/r/event_aggregate_no_a_no_h.result3702
-rw-r--r--mysql-test/suite/perfschema/r/event_aggregate_no_a_no_u.result2413
-rw-r--r--mysql-test/suite/perfschema/r/event_aggregate_no_a_no_u_no_h.result1857
-rw-r--r--mysql-test/suite/perfschema/r/event_aggregate_no_h.result5475
-rw-r--r--mysql-test/suite/perfschema/r/event_aggregate_no_u.result4186
-rw-r--r--mysql-test/suite/perfschema/r/event_aggregate_no_u_no_h.result3630
-rw-r--r--mysql-test/suite/perfschema/r/file_misc.result1
-rw-r--r--mysql-test/suite/perfschema/r/func_file_io.result9
-rw-r--r--mysql-test/suite/perfschema/r/func_mutex.result11
-rw-r--r--mysql-test/suite/perfschema/r/global_objects.result33
-rw-r--r--mysql-test/suite/perfschema/r/global_read_lock.result2
-rw-r--r--mysql-test/suite/perfschema/r/grant.result7
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_again_allow.result4
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_again_deny.result4
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_bad_allow.result4
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_bad_deny.result4
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_good_allow.result4
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_good_deny.result4
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_noname_allow.result4
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_noname_deny.result4
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_auth_ed25519.result6
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_auth_plugin.result10
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_blocked.result34
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_format.result4
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_max_con.result38
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_allow.result8
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_deny.result8
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_noname_allow.result4
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_noname_deny.result4
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_passwd.result12
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_ssl.result8
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_again_allow.result4
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_again_deny.result4
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_bad_allow.result4
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_bad_deny.result4
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_good_allow.result4
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_good_deny.result4
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_noname_allow.result4
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_noname_deny.result4
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_auth_plugin.result10
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_blocked.result34
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_max_con.result38
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_again_allow.result8
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_again_deny.result8
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_noname_allow.result4
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_noname_deny.result4
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_passwd.result12
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_ssl.result8
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_peer_addr.result4
-rw-r--r--mysql-test/suite/perfschema/r/indexed_table_io.result47
-rw-r--r--mysql-test/suite/perfschema/r/information_schema.result450
-rw-r--r--mysql-test/suite/perfschema/r/innodb_events_transactions_history_long.result16
-rw-r--r--mysql-test/suite/perfschema/r/innodb_table_io.result92
-rw-r--r--mysql-test/suite/perfschema/r/io_cache.result96
-rw-r--r--mysql-test/suite/perfschema/r/max_program_zero.result313
-rw-r--r--mysql-test/suite/perfschema/r/mdl_func.result920
-rw-r--r--mysql-test/suite/perfschema/r/memory_aggregate.result5602
-rw-r--r--mysql-test/suite/perfschema/r/memory_aggregate_32bit.result5602
-rw-r--r--mysql-test/suite/perfschema/r/memory_aggregate_no_a.result4014
-rw-r--r--mysql-test/suite/perfschema/r/memory_aggregate_no_a_no_h.result3464
-rw-r--r--mysql-test/suite/perfschema/r/memory_aggregate_no_a_no_u.result2442
-rw-r--r--mysql-test/suite/perfschema/r/memory_aggregate_no_a_no_u_no_h.result1892
-rw-r--r--mysql-test/suite/perfschema/r/memory_aggregate_no_h.result5052
-rw-r--r--mysql-test/suite/perfschema/r/memory_aggregate_no_u.result4030
-rw-r--r--mysql-test/suite/perfschema/r/memory_aggregate_no_u_no_h.result3480
-rw-r--r--mysql-test/suite/perfschema/r/memory_table_io.result94
-rw-r--r--mysql-test/suite/perfschema/r/merge_table_io.result104
-rw-r--r--mysql-test/suite/perfschema/r/misc.result26
-rw-r--r--mysql-test/suite/perfschema/r/multi_table_io.result58
-rw-r--r--mysql-test/suite/perfschema/r/myisam_file_io.result53
-rw-r--r--mysql-test/suite/perfschema/r/myisam_table_io.result92
-rw-r--r--mysql-test/suite/perfschema/r/nesting.result65
-rw-r--r--mysql-test/suite/perfschema/r/no_threads.result17
-rw-r--r--mysql-test/suite/perfschema/r/one_thread_per_con.result8
-rw-r--r--mysql-test/suite/perfschema/r/ortho_iter.result855
-rw-r--r--mysql-test/suite/perfschema/r/part_table_io.result90
-rw-r--r--mysql-test/suite/perfschema/r/pfs_upgrade_event.result2
-rw-r--r--mysql-test/suite/perfschema/r/pfs_upgrade_func.result2
-rw-r--r--mysql-test/suite/perfschema/r/pfs_upgrade_proc.result2
-rw-r--r--mysql-test/suite/perfschema/r/pfs_upgrade_table.result2
-rw-r--r--mysql-test/suite/perfschema/r/pfs_upgrade_view.result2
-rw-r--r--mysql-test/suite/perfschema/r/prepared_statements.result672
-rw-r--r--mysql-test/suite/perfschema/r/prepared_stmts_by_stored_programs.result126
-rw-r--r--mysql-test/suite/perfschema/r/privilege.result16
-rw-r--r--mysql-test/suite/perfschema/r/privilege_table_io.result92
-rw-r--r--mysql-test/suite/perfschema/r/query_cache.result28
-rw-r--r--mysql-test/suite/perfschema/r/read_only.result5
-rw-r--r--mysql-test/suite/perfschema/r/relaylog.result8
-rw-r--r--mysql-test/suite/perfschema/r/rollback_table_io.result42
-rw-r--r--mysql-test/suite/perfschema/r/rpl_group_member_stats.result8
-rw-r--r--mysql-test/suite/perfschema/r/rpl_group_members.result5
-rw-r--r--mysql-test/suite/perfschema/r/rpl_gtid_func.result50
-rw-r--r--mysql-test/suite/perfschema/r/rpl_statements.result134
-rw-r--r--mysql-test/suite/perfschema/r/rpl_threads.result61
-rw-r--r--mysql-test/suite/perfschema/r/schema.result361
-rw-r--r--mysql-test/suite/perfschema/r/server_init.result53
-rw-r--r--mysql-test/suite/perfschema/r/setup_actors.result48
-rw-r--r--mysql-test/suite/perfschema/r/setup_actors_enabled.result136
-rw-r--r--mysql-test/suite/perfschema/r/setup_actors_history.result138
-rw-r--r--mysql-test/suite/perfschema/r/setup_consumers_defaults.result5
-rw-r--r--mysql-test/suite/perfschema/r/setup_instruments_defaults.result21
-rw-r--r--mysql-test/suite/perfschema/r/setup_object_table_lock_io.result91
-rw-r--r--mysql-test/suite/perfschema/r/setup_objects.result4
-rw-r--r--mysql-test/suite/perfschema/r/short_option_1.result12
-rw-r--r--mysql-test/suite/perfschema/r/short_option_2.result2
-rw-r--r--mysql-test/suite/perfschema/r/show_aggregate.result530
-rw-r--r--mysql-test/suite/perfschema/r/show_coverage.result142
-rw-r--r--mysql-test/suite/perfschema/r/show_misc.result74
-rw-r--r--mysql-test/suite/perfschema/r/show_plugin.result626
-rw-r--r--mysql-test/suite/perfschema/r/show_sanity.result853
-rw-r--r--mysql-test/suite/perfschema/r/sizing_default.result72
-rw-r--r--mysql-test/suite/perfschema/r/sizing_growth.result255
-rw-r--r--mysql-test/suite/perfschema/r/sizing_high.result72
-rw-r--r--mysql-test/suite/perfschema/r/sizing_low.result73
-rw-r--r--mysql-test/suite/perfschema/r/sizing_med.result72
-rw-r--r--mysql-test/suite/perfschema/r/sizing_off.result60
-rw-r--r--mysql-test/suite/perfschema/r/socket_connect.result76
-rw-r--r--mysql-test/suite/perfschema/r/socket_summary_by_event_name_func.result84
-rw-r--r--mysql-test/suite/perfschema/r/socket_summary_by_instance_func.result26
-rw-r--r--mysql-test/suite/perfschema/r/socket_summary_by_instance_func_win.result26
-rw-r--r--mysql-test/suite/perfschema/r/stage_mdl_function.result12
-rw-r--r--mysql-test/suite/perfschema/r/stage_mdl_global.result12
-rw-r--r--mysql-test/suite/perfschema/r/stage_mdl_procedure.result12
-rw-r--r--mysql-test/suite/perfschema/r/stage_mdl_table.result14
-rw-r--r--mysql-test/suite/perfschema/r/start_server_disable_idle.result138
-rw-r--r--mysql-test/suite/perfschema/r/start_server_disable_stages.result138
-rw-r--r--mysql-test/suite/perfschema/r/start_server_disable_statements.result138
-rw-r--r--mysql-test/suite/perfschema/r/start_server_disable_transactions.result167
-rw-r--r--mysql-test/suite/perfschema/r/start_server_disable_waits.result138
-rw-r--r--mysql-test/suite/perfschema/r/start_server_innodb.result147
-rw-r--r--mysql-test/suite/perfschema/r/start_server_low_digest_sql_length.result12
-rw-r--r--mysql-test/suite/perfschema/r/start_server_low_index.result280
-rw-r--r--mysql-test/suite/perfschema/r/start_server_low_table_lock.result237
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_account.result140
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_cond_class.result142
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_cond_inst.result144
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_digests.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_file_class.result142
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_file_inst.result146
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_host.result140
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_index.result185
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_mdl.result161
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_memory_class.result235
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_mutex_class.result142
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_mutex_inst.result146
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_prepared_stmts_instances.result212
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_rwlock_class.result142
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_rwlock_inst.result146
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_setup_actors.result140
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_setup_objects.result140
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_socket_class.result142
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_socket_inst.result144
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_stage_class.result140
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_stages_history.result140
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_stages_history_long.result140
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_statement_class.result140
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_statements_history.result140
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_statements_history_long.result140
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_table_hdl.result144
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_table_inst.result144
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_table_lock.result177
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_thread_class.result142
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_thread_inst.result144
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_transactions_history.result156
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_transactions_history_long.result156
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_user.result140
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_waits_history.result140
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_waits_history_long.result140
-rw-r--r--mysql-test/suite/perfschema/r/start_server_nothing.result278
-rw-r--r--mysql-test/suite/perfschema/r/start_server_off.result217
-rw-r--r--mysql-test/suite/perfschema/r/start_server_on.result147
-rw-r--r--mysql-test/suite/perfschema/r/start_server_variables.result154
-rw-r--r--mysql-test/suite/perfschema/r/start_server_zero_digest_sql_length.result12
-rw-r--r--mysql-test/suite/perfschema/r/statement_digest.result2
-rw-r--r--mysql-test/suite/perfschema/r/statement_digest_consumers.result3
-rw-r--r--mysql-test/suite/perfschema/r/statement_digest_consumers2.result3
-rw-r--r--mysql-test/suite/perfschema/r/statement_digest_long_query.result4
-rw-r--r--mysql-test/suite/perfschema/r/statement_program_concurrency.result117
-rw-r--r--mysql-test/suite/perfschema/r/statement_program_lost_inst.result335
-rw-r--r--mysql-test/suite/perfschema/r/statement_program_nested.result2333
-rw-r--r--mysql-test/suite/perfschema/r/statement_program_nesting_event_check.result1512
-rw-r--r--mysql-test/suite/perfschema/r/statement_program_non_nested.result704
-rw-r--r--mysql-test/suite/perfschema/r/status_reprepare.result42
-rw-r--r--mysql-test/suite/perfschema/r/sxlock_func.result58
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_global_2u_2t.result664
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_global_2u_3t.result732
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_global_4u_2t.result668
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_global_4u_3t.result736
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_hist_2u_2t.result898
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_hist_2u_3t.result1006
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_hist_4u_2t.result1046
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_hist_4u_3t.result1154
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_off.result338
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_thread_2u_2t.result826
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_thread_2u_3t.result894
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_thread_4u_2t.result970
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_thread_4u_3t.result1038
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_global_2u_2t.result664
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_global_2u_3t.result732
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_global_4u_2t.result668
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_global_4u_3t.result736
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_hist_2u_2t.result896
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_hist_2u_3t.result1003
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_hist_4u_2t.result1044
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_hist_4u_3t.result1151
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_thread_2u_2t.result826
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_thread_2u_3t.result894
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_thread_4u_2t.result970
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_thread_4u_3t.result1038
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_global_2u_2t.result392
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_global_2u_3t.result334
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_global_4u_2t.result396
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_global_4u_3t.result338
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_hist_2u_2t.result394
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_hist_2u_3t.result337
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_hist_4u_2t.result398
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_hist_4u_3t.result341
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_2t.result392
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_3t.result334
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_thread_4u_2t.result396
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_thread_4u_3t.result338
-rw-r--r--mysql-test/suite/perfschema/r/table_name.result115
-rw-r--r--mysql-test/suite/perfschema/r/table_schema.result419
-rw-r--r--mysql-test/suite/perfschema/r/temp_table_io.result46
-rw-r--r--mysql-test/suite/perfschema/r/thread_cache.result6
-rw-r--r--mysql-test/suite/perfschema/r/thread_misc.result1
-rw-r--r--mysql-test/suite/perfschema/r/threads_history.result700
-rw-r--r--mysql-test/suite/perfschema/r/threads_innodb.result11
-rw-r--r--mysql-test/suite/perfschema/r/threads_mysql_freebsd.result3
-rw-r--r--mysql-test/suite/perfschema/r/threads_mysql_linux.result3
-rw-r--r--mysql-test/suite/perfschema/r/threads_mysql_windows.result3
-rw-r--r--mysql-test/suite/perfschema/r/transaction.result680
-rw-r--r--mysql-test/suite/perfschema/r/transaction_gtid.result171
-rw-r--r--mysql-test/suite/perfschema/r/transaction_nested_events.result1284
-rw-r--r--mysql-test/suite/perfschema/r/trigger_table_io.result178
-rw-r--r--mysql-test/suite/perfschema/r/user_var_func.result91
-rw-r--r--mysql-test/suite/perfschema/r/view_table_io.result96
-rw-r--r--mysql-test/suite/perfschema/t/all_tests.test3
-rw-r--r--mysql-test/suite/perfschema/t/alter_table_progress.test145
-rw-r--r--mysql-test/suite/perfschema/t/bad_option.test74
-rw-r--r--mysql-test/suite/perfschema/t/bad_option_1.test39
-rw-r--r--mysql-test/suite/perfschema/t/bad_option_2.test21
-rw-r--r--mysql-test/suite/perfschema/t/bad_option_3.test39
-rw-r--r--mysql-test/suite/perfschema/t/bad_option_4.test39
-rw-r--r--mysql-test/suite/perfschema/t/bad_option_5.test42
-rw-r--r--mysql-test/suite/perfschema/t/batch_table_io_func.test148
-rw-r--r--mysql-test/suite/perfschema/t/checksum.test16
-rw-r--r--mysql-test/suite/perfschema/t/cnf_option.test4
-rw-r--r--mysql-test/suite/perfschema/t/connect_attrs.test2
-rw-r--r--mysql-test/suite/perfschema/t/connection_type_notwin.test92
-rw-r--r--mysql-test/suite/perfschema/t/connection_type_win.test90
-rw-r--r--mysql-test/suite/perfschema/t/ddl_esms_by_program.test21
-rw-r--r--mysql-test/suite/perfschema/t/ddl_ets_by_account_by_event_name.test19
-rw-r--r--mysql-test/suite/perfschema/t/ddl_ets_by_host_by_event_name.test19
-rw-r--r--mysql-test/suite/perfschema/t/ddl_ets_by_thread_by_event_name.test18
-rw-r--r--mysql-test/suite/perfschema/t/ddl_ets_by_user_by_event_name.test19
-rw-r--r--mysql-test/suite/perfschema/t/ddl_ets_global_by_event_name.test19
-rw-r--r--mysql-test/suite/perfschema/t/ddl_events_stages_current.test5
-rw-r--r--mysql-test/suite/perfschema/t/ddl_events_stages_history.test5
-rw-r--r--mysql-test/suite/perfschema/t/ddl_events_stages_history_long.test5
-rw-r--r--mysql-test/suite/perfschema/t/ddl_events_transactions_current.test16
-rw-r--r--mysql-test/suite/perfschema/t/ddl_events_transactions_history.test16
-rw-r--r--mysql-test/suite/perfschema/t/ddl_events_transactions_history_long.test16
-rw-r--r--mysql-test/suite/perfschema/t/ddl_global_status.test19
-rw-r--r--mysql-test/suite/perfschema/t/ddl_global_variables.test20
-rw-r--r--mysql-test/suite/perfschema/t/ddl_mems_by_account_by_event_name.test19
-rw-r--r--mysql-test/suite/perfschema/t/ddl_mems_by_host_by_event_name.test19
-rw-r--r--mysql-test/suite/perfschema/t/ddl_mems_by_thread_by_event_name.test19
-rw-r--r--mysql-test/suite/perfschema/t/ddl_mems_by_user_by_event_name.test19
-rw-r--r--mysql-test/suite/perfschema/t/ddl_mems_global_by_event_name.test19
-rw-r--r--mysql-test/suite/perfschema/t/ddl_metadata_locks.test17
-rw-r--r--mysql-test/suite/perfschema/t/ddl_prepared_statements_instances.test21
-rw-r--r--mysql-test/suite/perfschema/t/ddl_replication_applier_configuration.test22
-rw-r--r--mysql-test/suite/perfschema/t/ddl_replication_applier_status.test22
-rw-r--r--mysql-test/suite/perfschema/t/ddl_replication_applier_status_by_coordinator.test22
-rw-r--r--mysql-test/suite/perfschema/t/ddl_replication_applier_status_by_worker.test22
-rw-r--r--mysql-test/suite/perfschema/t/ddl_replication_connection_configuration.test22
-rw-r--r--mysql-test/suite/perfschema/t/ddl_replication_connection_status.test22
-rw-r--r--mysql-test/suite/perfschema/t/ddl_replication_group_member_stats.test21
-rw-r--r--mysql-test/suite/perfschema/t/ddl_replication_group_members.test22
-rw-r--r--mysql-test/suite/perfschema/t/ddl_session_status.test20
-rw-r--r--mysql-test/suite/perfschema/t/ddl_session_variables.test20
-rw-r--r--mysql-test/suite/perfschema/t/ddl_setup_actors.test2
-rw-r--r--mysql-test/suite/perfschema/t/ddl_status_by_account.test19
-rw-r--r--mysql-test/suite/perfschema/t/ddl_status_by_host.test19
-rw-r--r--mysql-test/suite/perfschema/t/ddl_status_by_thread.test19
-rw-r--r--mysql-test/suite/perfschema/t/ddl_status_by_user.test19
-rw-r--r--mysql-test/suite/perfschema/t/ddl_table_handles.test17
-rw-r--r--mysql-test/suite/perfschema/t/ddl_uvar_by_thread.test20
-rw-r--r--mysql-test/suite/perfschema/t/ddl_variables_by_thread.test20
-rw-r--r--mysql-test/suite/perfschema/t/digest_table_full.test2
-rw-r--r--mysql-test/suite/perfschema/t/disabled.def1
-rw-r--r--mysql-test/suite/perfschema/t/dml_esms_by_program.test44
-rw-r--r--mysql-test/suite/perfschema/t/dml_ets_by_account_by_event_name.test42
-rw-r--r--mysql-test/suite/perfschema/t/dml_ets_by_host_by_event_name.test42
-rw-r--r--mysql-test/suite/perfschema/t/dml_ets_by_thread_by_event_name.test42
-rw-r--r--mysql-test/suite/perfschema/t/dml_ets_by_user_by_event_name.test42
-rw-r--r--mysql-test/suite/perfschema/t/dml_ets_global_by_event_name.test41
-rw-r--r--mysql-test/suite/perfschema/t/dml_events_transactions_current.test41
-rw-r--r--mysql-test/suite/perfschema/t/dml_events_transactions_history.test47
-rw-r--r--mysql-test/suite/perfschema/t/dml_events_transactions_history_long.test47
-rw-r--r--mysql-test/suite/perfschema/t/dml_file_instances.test66
-rw-r--r--mysql-test/suite/perfschema/t/dml_global_status.test36
-rw-r--r--mysql-test/suite/perfschema/t/dml_global_variables.test36
-rw-r--r--mysql-test/suite/perfschema/t/dml_handler.test8
-rw-r--r--mysql-test/suite/perfschema/t/dml_mems_by_account_by_event_name.test42
-rw-r--r--mysql-test/suite/perfschema/t/dml_mems_by_host_by_event_name.test42
-rw-r--r--mysql-test/suite/perfschema/t/dml_mems_by_thread_by_event_name.test42
-rw-r--r--mysql-test/suite/perfschema/t/dml_mems_by_user_by_event_name.test42
-rw-r--r--mysql-test/suite/perfschema/t/dml_mems_global_by_event_name.test42
-rw-r--r--mysql-test/suite/perfschema/t/dml_metadata_locks.test35
-rw-r--r--mysql-test/suite/perfschema/t/dml_prepared_statements_instances.test43
-rw-r--r--mysql-test/suite/perfschema/t/dml_replication_applier_configuration.test38
-rw-r--r--mysql-test/suite/perfschema/t/dml_replication_applier_status.test42
-rw-r--r--mysql-test/suite/perfschema/t/dml_replication_applier_status_by_coordinator.test43
-rw-r--r--mysql-test/suite/perfschema/t/dml_replication_applier_status_by_worker.test43
-rw-r--r--mysql-test/suite/perfschema/t/dml_replication_connection_configuration.test43
-rw-r--r--mysql-test/suite/perfschema/t/dml_replication_connection_status.test43
-rw-r--r--mysql-test/suite/perfschema/t/dml_replication_group_member_stats.test38
-rw-r--r--mysql-test/suite/perfschema/t/dml_replication_group_members.test40
-rw-r--r--mysql-test/suite/perfschema/t/dml_session_status.test36
-rw-r--r--mysql-test/suite/perfschema/t/dml_session_variables.test36
-rw-r--r--mysql-test/suite/perfschema/t/dml_setup_actors.test69
-rw-r--r--mysql-test/suite/perfschema/t/dml_setup_instruments.test19
-rw-r--r--mysql-test/suite/perfschema/t/dml_setup_objects.test4
-rw-r--r--mysql-test/suite/perfschema/t/dml_setup_timers.test4
-rw-r--r--mysql-test/suite/perfschema/t/dml_status_by_account.test40
-rw-r--r--mysql-test/suite/perfschema/t/dml_status_by_host.test40
-rw-r--r--mysql-test/suite/perfschema/t/dml_status_by_thread.test40
-rw-r--r--mysql-test/suite/perfschema/t/dml_status_by_user.test40
-rw-r--r--mysql-test/suite/perfschema/t/dml_table_handles.test35
-rw-r--r--mysql-test/suite/perfschema/t/dml_uvar_by_thread.test48
-rw-r--r--mysql-test/suite/perfschema/t/dml_variables_by_thread.test40
-rw-r--r--mysql-test/suite/perfschema/t/event_aggregate.test1
-rw-r--r--mysql-test/suite/perfschema/t/event_aggregate_no_a.test1
-rw-r--r--mysql-test/suite/perfschema/t/event_aggregate_no_a_no_h.test1
-rw-r--r--mysql-test/suite/perfschema/t/event_aggregate_no_a_no_u.test1
-rw-r--r--mysql-test/suite/perfschema/t/event_aggregate_no_a_no_u_no_h.test1
-rw-r--r--mysql-test/suite/perfschema/t/event_aggregate_no_h.test1
-rw-r--r--mysql-test/suite/perfschema/t/event_aggregate_no_u.test1
-rw-r--r--mysql-test/suite/perfschema/t/event_aggregate_no_u_no_h.test1
-rw-r--r--mysql-test/suite/perfschema/t/file_misc-master.opt1
-rw-r--r--mysql-test/suite/perfschema/t/file_misc.test11
-rw-r--r--mysql-test/suite/perfschema/t/func_file_io.test2
-rw-r--r--mysql-test/suite/perfschema/t/func_mutex.test4
-rw-r--r--mysql-test/suite/perfschema/t/global_objects-master.opt1
-rw-r--r--mysql-test/suite/perfschema/t/global_objects.test29
-rw-r--r--mysql-test/suite/perfschema/t/grant.test12
-rw-r--r--mysql-test/suite/perfschema/t/indexed_table_io.test4
-rw-r--r--mysql-test/suite/perfschema/t/information_schema.test23
-rw-r--r--mysql-test/suite/perfschema/t/innodb_events_transactions_history_long.test19
-rw-r--r--mysql-test/suite/perfschema/t/io_cache-master.opt3
-rw-r--r--mysql-test/suite/perfschema/t/io_cache.test121
-rw-r--r--mysql-test/suite/perfschema/t/max_program_zero-master.opt3
-rw-r--r--mysql-test/suite/perfschema/t/max_program_zero.test48
-rw-r--r--mysql-test/suite/perfschema/t/mdl_func.test479
-rw-r--r--mysql-test/suite/perfschema/t/memory_aggregate-master.opt1
-rw-r--r--mysql-test/suite/perfschema/t/memory_aggregate.test7
-rw-r--r--mysql-test/suite/perfschema/t/memory_aggregate_32bit-master.opt1
-rw-r--r--mysql-test/suite/perfschema/t/memory_aggregate_32bit.test7
-rw-r--r--mysql-test/suite/perfschema/t/memory_aggregate_no_a-master.opt2
-rw-r--r--mysql-test/suite/perfschema/t/memory_aggregate_no_a.test7
-rw-r--r--mysql-test/suite/perfschema/t/memory_aggregate_no_a_no_h-master.opt3
-rw-r--r--mysql-test/suite/perfschema/t/memory_aggregate_no_a_no_h.test7
-rw-r--r--mysql-test/suite/perfschema/t/memory_aggregate_no_a_no_u-master.opt3
-rw-r--r--mysql-test/suite/perfschema/t/memory_aggregate_no_a_no_u.test7
-rw-r--r--mysql-test/suite/perfschema/t/memory_aggregate_no_a_no_u_no_h-master.opt4
-rw-r--r--mysql-test/suite/perfschema/t/memory_aggregate_no_a_no_u_no_h.test7
-rw-r--r--mysql-test/suite/perfschema/t/memory_aggregate_no_h-master.opt2
-rw-r--r--mysql-test/suite/perfschema/t/memory_aggregate_no_h.test7
-rw-r--r--mysql-test/suite/perfschema/t/memory_aggregate_no_u-master.opt2
-rw-r--r--mysql-test/suite/perfschema/t/memory_aggregate_no_u.test7
-rw-r--r--mysql-test/suite/perfschema/t/memory_aggregate_no_u_no_h-master.opt3
-rw-r--r--mysql-test/suite/perfschema/t/memory_aggregate_no_u_no_h.test7
-rw-r--r--mysql-test/suite/perfschema/t/misc.test32
-rw-r--r--mysql-test/suite/perfschema/t/myisam_file_io.test2
-rw-r--r--mysql-test/suite/perfschema/t/nesting.test8
-rw-r--r--mysql-test/suite/perfschema/t/no_threads-master.opt6
-rw-r--r--mysql-test/suite/perfschema/t/no_threads.test10
-rw-r--r--mysql-test/suite/perfschema/t/one_thread_per_con.test3
-rw-r--r--mysql-test/suite/perfschema/t/ortho_iter.test207
-rw-r--r--mysql-test/suite/perfschema/t/pfs_upgrade_event-master.opt2
-rw-r--r--mysql-test/suite/perfschema/t/pfs_upgrade_event.test2
-rw-r--r--mysql-test/suite/perfschema/t/pfs_upgrade_func-master.opt2
-rw-r--r--mysql-test/suite/perfschema/t/pfs_upgrade_func.test2
-rw-r--r--mysql-test/suite/perfschema/t/pfs_upgrade_proc-master.opt2
-rw-r--r--mysql-test/suite/perfschema/t/pfs_upgrade_proc.test2
-rw-r--r--mysql-test/suite/perfschema/t/pfs_upgrade_table-master.opt2
-rw-r--r--mysql-test/suite/perfschema/t/pfs_upgrade_table.test2
-rw-r--r--mysql-test/suite/perfschema/t/pfs_upgrade_view-master.opt2
-rw-r--r--mysql-test/suite/perfschema/t/pfs_upgrade_view.test2
-rw-r--r--mysql-test/suite/perfschema/t/pool_of_threads-master.opt1
-rw-r--r--mysql-test/suite/perfschema/t/prepared_statements.test210
-rw-r--r--mysql-test/suite/perfschema/t/prepared_stmts_by_stored_programs.test151
-rw-r--r--mysql-test/suite/perfschema/t/privilege.test12
-rw-r--r--mysql-test/suite/perfschema/t/privilege_table_io.test6
-rw-r--r--mysql-test/suite/perfschema/t/query_cache.test24
-rw-r--r--mysql-test/suite/perfschema/t/read_only.test4
-rw-r--r--mysql-test/suite/perfschema/t/rpl_group_member_stats.test48
-rw-r--r--mysql-test/suite/perfschema/t/rpl_group_members.test33
-rw-r--r--mysql-test/suite/perfschema/t/rpl_gtid_func.test2
-rw-r--r--mysql-test/suite/perfschema/t/rpl_statements.test132
-rw-r--r--mysql-test/suite/perfschema/t/rpl_threads.test79
-rw-r--r--mysql-test/suite/perfschema/t/server_init.test32
-rw-r--r--mysql-test/suite/perfschema/t/setup_actors.test26
-rw-r--r--mysql-test/suite/perfschema/t/setup_actors_enabled.test219
-rw-r--r--mysql-test/suite/perfschema/t/setup_actors_history.test177
-rw-r--r--mysql-test/suite/perfschema/t/setup_consumers_defaults-master.opt7
-rw-r--r--mysql-test/suite/perfschema/t/setup_consumers_defaults.test2
-rw-r--r--mysql-test/suite/perfschema/t/setup_instruments_defaults-master.opt7
-rw-r--r--mysql-test/suite/perfschema/t/setup_instruments_defaults.test19
-rw-r--r--mysql-test/suite/perfschema/t/setup_object_table_lock_io.test107
-rw-r--r--mysql-test/suite/perfschema/t/setup_objects.test6
-rw-r--r--mysql-test/suite/perfschema/t/short_option_1-master.opt2
-rw-r--r--mysql-test/suite/perfschema/t/short_option_1.test10
-rw-r--r--mysql-test/suite/perfschema/t/short_option_2-master.opt2
-rw-r--r--mysql-test/suite/perfschema/t/short_option_2.test4
-rw-r--r--mysql-test/suite/perfschema/t/show_aggregate.test306
-rw-r--r--mysql-test/suite/perfschema/t/show_coverage.test186
-rw-r--r--mysql-test/suite/perfschema/t/show_misc.test64
-rw-r--r--mysql-test/suite/perfschema/t/show_plugin.test321
-rw-r--r--mysql-test/suite/perfschema/t/show_sanity.test1850
-rw-r--r--mysql-test/suite/perfschema/t/sizing_default.cnf39
-rw-r--r--mysql-test/suite/perfschema/t/sizing_default.test29
-rw-r--r--mysql-test/suite/perfschema/t/sizing_growth-master.opt3
-rw-r--r--mysql-test/suite/perfschema/t/sizing_growth.test478
-rw-r--r--mysql-test/suite/perfschema/t/sizing_high.cnf57
-rw-r--r--mysql-test/suite/perfschema/t/sizing_high.test9
-rw-r--r--mysql-test/suite/perfschema/t/sizing_low.cnf34
-rw-r--r--mysql-test/suite/perfschema/t/sizing_low.test10
-rw-r--r--mysql-test/suite/perfschema/t/sizing_med.cnf34
-rw-r--r--mysql-test/suite/perfschema/t/sizing_med.test9
-rw-r--r--mysql-test/suite/perfschema/t/sizing_off.cnf38
-rw-r--r--mysql-test/suite/perfschema/t/sizing_off.test8
-rw-r--r--mysql-test/suite/perfschema/t/socket_connect.test76
-rw-r--r--mysql-test/suite/perfschema/t/socket_summary_by_event_name_func.test88
-rw-r--r--mysql-test/suite/perfschema/t/socket_summary_by_instance_func.test11
-rw-r--r--mysql-test/suite/perfschema/t/socket_summary_by_instance_func_win.test12
-rw-r--r--mysql-test/suite/perfschema/t/start_server_disable_transactions-master.opt1
-rw-r--r--mysql-test/suite/perfschema/t/start_server_disable_transactions.test28
-rw-r--r--mysql-test/suite/perfschema/t/start_server_innodb.test2
-rw-r--r--mysql-test/suite/perfschema/t/start_server_low_digest_sql_length-master.opt3
-rw-r--r--mysql-test/suite/perfschema/t/start_server_low_digest_sql_length.test23
-rw-r--r--mysql-test/suite/perfschema/t/start_server_low_index-master.opt2
-rw-r--r--mysql-test/suite/perfschema/t/start_server_low_index.test181
-rw-r--r--mysql-test/suite/perfschema/t/start_server_low_table_lock-master.opt2
-rw-r--r--mysql-test/suite/perfschema/t/start_server_low_table_lock.test130
-rw-r--r--mysql-test/suite/perfschema/t/start_server_no_account.test4
-rw-r--r--mysql-test/suite/perfschema/t/start_server_no_cond_class.test6
-rw-r--r--mysql-test/suite/perfschema/t/start_server_no_cond_inst.test8
-rw-r--r--mysql-test/suite/perfschema/t/start_server_no_digests.test2
-rw-r--r--mysql-test/suite/perfschema/t/start_server_no_file_class.test6
-rw-r--r--mysql-test/suite/perfschema/t/start_server_no_file_inst.test8
-rw-r--r--mysql-test/suite/perfschema/t/start_server_no_host.test4
-rw-r--r--mysql-test/suite/perfschema/t/start_server_no_index-master.opt2
-rw-r--r--mysql-test/suite/perfschema/t/start_server_no_index.test64
-rw-r--r--mysql-test/suite/perfschema/t/start_server_no_mdl-master.opt2
-rw-r--r--mysql-test/suite/perfschema/t/start_server_no_mdl.test23
-rw-r--r--mysql-test/suite/perfschema/t/start_server_no_memory_class-master.opt2
-rw-r--r--mysql-test/suite/perfschema/t/start_server_no_memory_class.test26
-rw-r--r--mysql-test/suite/perfschema/t/start_server_no_mutex_class.test6
-rw-r--r--mysql-test/suite/perfschema/t/start_server_no_mutex_inst.test8
-rw-r--r--mysql-test/suite/perfschema/t/start_server_no_prepared_stmts_instances-master.opt2
-rw-r--r--mysql-test/suite/perfschema/t/start_server_no_prepared_stmts_instances.test43
-rw-r--r--mysql-test/suite/perfschema/t/start_server_no_rwlock_class.test6
-rw-r--r--mysql-test/suite/perfschema/t/start_server_no_rwlock_inst.test8
-rw-r--r--mysql-test/suite/perfschema/t/start_server_no_setup_actors.test2
-rw-r--r--mysql-test/suite/perfschema/t/start_server_no_setup_objects.test2
-rw-r--r--mysql-test/suite/perfschema/t/start_server_no_socket_class.test6
-rw-r--r--mysql-test/suite/perfschema/t/start_server_no_socket_inst.test8
-rw-r--r--mysql-test/suite/perfschema/t/start_server_no_stage_class.test4
-rw-r--r--mysql-test/suite/perfschema/t/start_server_no_stages_history.test2
-rw-r--r--mysql-test/suite/perfschema/t/start_server_no_stages_history_long.test2
-rw-r--r--mysql-test/suite/perfschema/t/start_server_no_statement_class.test4
-rw-r--r--mysql-test/suite/perfschema/t/start_server_no_statements_history.test2
-rw-r--r--mysql-test/suite/perfschema/t/start_server_no_statements_history_long.test2
-rw-r--r--mysql-test/suite/perfschema/t/start_server_no_table_hdl.test8
-rw-r--r--mysql-test/suite/perfschema/t/start_server_no_table_inst-master.opt2
-rw-r--r--mysql-test/suite/perfschema/t/start_server_no_table_inst.test8
-rw-r--r--mysql-test/suite/perfschema/t/start_server_no_table_lock-master.opt2
-rw-r--r--mysql-test/suite/perfschema/t/start_server_no_table_lock.test54
-rw-r--r--mysql-test/suite/perfschema/t/start_server_no_thread_class.test6
-rw-r--r--mysql-test/suite/perfschema/t/start_server_no_thread_inst.test8
-rw-r--r--mysql-test/suite/perfschema/t/start_server_no_transactions_history-master.opt2
-rw-r--r--mysql-test/suite/perfschema/t/start_server_no_transactions_history.test14
-rw-r--r--mysql-test/suite/perfschema/t/start_server_no_transactions_history_long-master.opt2
-rw-r--r--mysql-test/suite/perfschema/t/start_server_no_transactions_history_long.test14
-rw-r--r--mysql-test/suite/perfschema/t/start_server_no_user.test4
-rw-r--r--mysql-test/suite/perfschema/t/start_server_no_waits_history.test2
-rw-r--r--mysql-test/suite/perfschema/t/start_server_no_waits_history_long.test2
-rw-r--r--mysql-test/suite/perfschema/t/start_server_nothing-master.opt8
-rw-r--r--mysql-test/suite/perfschema/t/start_server_nothing.test18
-rw-r--r--mysql-test/suite/perfschema/t/start_server_off.test11
-rw-r--r--mysql-test/suite/perfschema/t/start_server_on.test2
-rw-r--r--mysql-test/suite/perfschema/t/start_server_zero_digest_sql_length-master.opt3
-rw-r--r--mysql-test/suite/perfschema/t/start_server_zero_digest_sql_length.test20
-rw-r--r--mysql-test/suite/perfschema/t/statement_digest.test2
-rw-r--r--mysql-test/suite/perfschema/t/statement_digest_long_query.test12
-rw-r--r--mysql-test/suite/perfschema/t/statement_program_concurrency-master.opt1
-rw-r--r--mysql-test/suite/perfschema/t/statement_program_concurrency.test130
-rw-r--r--mysql-test/suite/perfschema/t/statement_program_lost_inst-master.opt3
-rw-r--r--mysql-test/suite/perfschema/t/statement_program_lost_inst.test72
-rw-r--r--mysql-test/suite/perfschema/t/statement_program_nested-master.opt1
-rw-r--r--mysql-test/suite/perfschema/t/statement_program_nested.test73
-rw-r--r--mysql-test/suite/perfschema/t/statement_program_nesting_event_check-master.opt1
-rw-r--r--mysql-test/suite/perfschema/t/statement_program_nesting_event_check.test44
-rw-r--r--mysql-test/suite/perfschema/t/statement_program_non_nested-master.opt1
-rw-r--r--mysql-test/suite/perfschema/t/statement_program_non_nested.test144
-rw-r--r--mysql-test/suite/perfschema/t/status_reprepare.test61
-rw-r--r--mysql-test/suite/perfschema/t/sxlock_func.test75
-rw-r--r--mysql-test/suite/perfschema/t/table_lock_aggregate_global_2u_2t.test3
-rw-r--r--mysql-test/suite/perfschema/t/table_lock_aggregate_global_2u_3t.test3
-rw-r--r--mysql-test/suite/perfschema/t/table_lock_aggregate_global_4u_2t.test3
-rw-r--r--mysql-test/suite/perfschema/t/table_lock_aggregate_global_4u_3t.test3
-rw-r--r--mysql-test/suite/perfschema/t/table_lock_aggregate_hist_2u_2t.test3
-rw-r--r--mysql-test/suite/perfschema/t/table_lock_aggregate_hist_2u_3t.test3
-rw-r--r--mysql-test/suite/perfschema/t/table_lock_aggregate_hist_4u_2t.test3
-rw-r--r--mysql-test/suite/perfschema/t/table_lock_aggregate_hist_4u_3t.test3
-rw-r--r--mysql-test/suite/perfschema/t/table_lock_aggregate_thread_2u_2t.test3
-rw-r--r--mysql-test/suite/perfschema/t/table_lock_aggregate_thread_2u_3t.test3
-rw-r--r--mysql-test/suite/perfschema/t/table_lock_aggregate_thread_4u_2t.test3
-rw-r--r--mysql-test/suite/perfschema/t/table_lock_aggregate_thread_4u_3t.test3
-rw-r--r--mysql-test/suite/perfschema/t/table_name.test115
-rw-r--r--mysql-test/suite/perfschema/t/table_schema.test16
-rw-r--r--mysql-test/suite/perfschema/t/thread_cache.test6
-rw-r--r--mysql-test/suite/perfschema/t/thread_misc-master.opt1
-rw-r--r--mysql-test/suite/perfschema/t/thread_misc.test11
-rw-r--r--mysql-test/suite/perfschema/t/threads_history.test727
-rw-r--r--mysql-test/suite/perfschema/t/threads_innodb.test3
-rw-r--r--mysql-test/suite/perfschema/t/threads_insert_delayed.test40
-rw-r--r--mysql-test/suite/perfschema/t/threads_mysql_freebsd.test22
-rw-r--r--mysql-test/suite/perfschema/t/threads_mysql_linux.test22
-rw-r--r--mysql-test/suite/perfschema/t/threads_mysql_windows.test22
-rw-r--r--mysql-test/suite/perfschema/t/transaction-master.opt4
-rw-r--r--mysql-test/suite/perfschema/t/transaction.test734
-rw-r--r--mysql-test/suite/perfschema/t/transaction_gtid.test194
-rw-r--r--mysql-test/suite/perfschema/t/transaction_nested_events-master.opt19
-rw-r--r--mysql-test/suite/perfschema/t/transaction_nested_events.test387
-rw-r--r--mysql-test/suite/perfschema/t/user_var_func.test101
-rw-r--r--mysql-test/suite/perfschema/t/view_table_io.test3
-rw-r--r--mysql-test/suite/perfschema_stress/t/modify.test5
-rw-r--r--mysql-test/suite/perfschema_stress/t/read.test5
-rw-r--r--mysql-test/suite/perfschema_stress/t/setup.test5
-rw-r--r--mysql-test/suite/perfschema_stress/t/work.test5
-rw-r--r--mysql-test/suite/period/engines.combinations1
-rw-r--r--mysql-test/suite/period/r/alter.result18
-rw-r--r--mysql-test/suite/period/r/create.result8
-rw-r--r--mysql-test/suite/period/r/delete.result5
-rw-r--r--mysql-test/suite/period/r/long_unique.result17
-rw-r--r--mysql-test/suite/period/r/overlaps.result353
-rw-r--r--mysql-test/suite/period/t/alter.test16
-rw-r--r--mysql-test/suite/period/t/delete.test10
-rw-r--r--mysql-test/suite/period/t/long_unique.test23
-rw-r--r--mysql-test/suite/period/t/overlaps.test346
-rw-r--r--mysql-test/suite/plugins/r/multiauth.result3
-rw-r--r--mysql-test/suite/plugins/r/simple_password_check.result4
-rw-r--r--mysql-test/suite/plugins/r/test_sql_service.result8
-rw-r--r--mysql-test/suite/plugins/t/dialog.test8
-rw-r--r--mysql-test/suite/plugins/t/multiauth.test7
-rw-r--r--mysql-test/suite/plugins/t/pam.test6
-rw-r--r--mysql-test/suite/plugins/t/pam_cleartext.test8
-rw-r--r--mysql-test/suite/plugins/t/pam_v1.test8
-rw-r--r--mysql-test/suite/plugins/t/test_sql_service.opt2
-rw-r--r--mysql-test/suite/plugins/t/test_sql_service.test18
-rw-r--r--mysql-test/suite/roles/admin.result4
-rw-r--r--mysql-test/suite/roles/create_and_drop_role_invalid_user_table.result2
-rw-r--r--mysql-test/suite/roles/definer.result2
-rw-r--r--mysql-test/suite/rpl/disabled.def1
-rw-r--r--mysql-test/suite/rpl/include/check_type.inc2
-rw-r--r--mysql-test/suite/rpl/include/rpl_parallel.inc2217
-rw-r--r--mysql-test/suite/rpl/include/rpl_parallel_analyze_table_hang.inc73
-rw-r--r--mysql-test/suite/rpl/include/rpl_parallel_deadlock_corrupt_binlog.inc79
-rw-r--r--mysql-test/suite/rpl/include/rpl_parallel_domain.inc87
-rw-r--r--mysql-test/suite/rpl/include/rpl_parallel_domain_slave_single_grp.inc128
-rw-r--r--mysql-test/suite/rpl/include/rpl_parallel_free_deferred_event.inc67
-rw-r--r--mysql-test/suite/rpl/include/rpl_parallel_gco_wait_kill.inc366
-rw-r--r--mysql-test/suite/rpl/include/rpl_parallel_gtid_slave_pos_update_fail.inc98
-rw-r--r--mysql-test/suite/rpl/include/rpl_parallel_ignore_error_on_rotate.inc96
-rw-r--r--mysql-test/suite/rpl/include/rpl_parallel_incorrect_relay_pos.inc128
-rw-r--r--mysql-test/suite/rpl/include/rpl_parallel_innodb_lock_conflict.inc107
-rw-r--r--mysql-test/suite/rpl/include/rpl_parallel_missed_error_handling.inc87
-rw-r--r--mysql-test/suite/rpl/include/rpl_parallel_mode.inc87
-rw-r--r--mysql-test/suite/rpl/include/rpl_parallel_partial_binlog_trans.inc71
-rw-r--r--mysql-test/suite/rpl/include/rpl_parallel_record_gtid_wakeup.inc72
-rw-r--r--mysql-test/suite/rpl/include/rpl_parallel_retry_deadlock.inc281
-rw-r--r--mysql-test/suite/rpl/include/rpl_parallel_rollback_assert.inc62
-rw-r--r--mysql-test/suite/rpl/include/rpl_parallel_single_grpcmt.inc170
-rw-r--r--mysql-test/suite/rpl/include/rpl_parallel_slave_bgc_kill.inc454
-rw-r--r--mysql-test/suite/rpl/include/rpl_parallel_stop_on_con_kill.inc129
-rw-r--r--mysql-test/suite/rpl/include/rpl_parallel_stop_slave.inc114
-rw-r--r--mysql-test/suite/rpl/include/rpl_parallel_wrong_binlog_order.inc91
-rw-r--r--mysql-test/suite/rpl/include/rpl_parallel_wrong_exec_master_pos.inc56
-rw-r--r--mysql-test/suite/rpl/include/rpl_stm_relay_ign_space.inc2
-rw-r--r--mysql-test/suite/rpl/include/rpl_xa_mixed_engines.inc183
-rw-r--r--mysql-test/suite/rpl/r/create_or_replace_mix.result36
-rw-r--r--mysql-test/suite/rpl/r/create_or_replace_statement.result2
-rw-r--r--mysql-test/suite/rpl/r/grant_replication_slave.result43
-rw-r--r--mysql-test/suite/rpl/r/rpl_binlog_rollback_cleanup.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_blackhole_row_annotate.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_create_drop_view.result3
-rw-r--r--mysql-test/suite/rpl/r/rpl_create_or_replace_fail.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_delayed_slave.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_dual_pos_advance.result6
-rw-r--r--mysql-test/suite/rpl/r/rpl_foreign_key_innodb.result17
-rw-r--r--mysql-test/suite/rpl/r/rpl_hrtime.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_mdev382.result6
-rw-r--r--mysql-test/suite/rpl/r/rpl_mdev6386.result1
-rw-r--r--mysql-test/suite/rpl/r/rpl_mixed_implicit_commit_binlog.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_parallel.result1690
-rw-r--r--mysql-test/suite/rpl/r/rpl_parallel_analyze_table_hang.result51
-rw-r--r--mysql-test/suite/rpl/r/rpl_parallel_conflicts.result9
-rw-r--r--mysql-test/suite/rpl/r/rpl_parallel_deadlock_corrupt_binlog.result93
-rw-r--r--mysql-test/suite/rpl/r/rpl_parallel_domain.result71
-rw-r--r--mysql-test/suite/rpl/r/rpl_parallel_domain_slave_single_grp.result101
-rw-r--r--mysql-test/suite/rpl/r/rpl_parallel_free_deferred_event.result44
-rw-r--r--mysql-test/suite/rpl/r/rpl_parallel_gco_wait_kill.result257
-rw-r--r--mysql-test/suite/rpl/r/rpl_parallel_gtid_slave_pos_update_fail.result65
-rw-r--r--mysql-test/suite/rpl/r/rpl_parallel_ignore_error_on_rotate.result74
-rw-r--r--mysql-test/suite/rpl/r/rpl_parallel_incorrect_relay_pos.result75
-rw-r--r--mysql-test/suite/rpl/r/rpl_parallel_innodb_lock_conflict.result79
-rw-r--r--mysql-test/suite/rpl/r/rpl_parallel_mdev6589.result1
-rw-r--r--mysql-test/suite/rpl/r/rpl_parallel_missed_error_handling.result65
-rw-r--r--mysql-test/suite/rpl/r/rpl_parallel_mode.result75
-rw-r--r--mysql-test/suite/rpl/r/rpl_parallel_optimistic_xa.result51
-rw-r--r--mysql-test/suite/rpl/r/rpl_parallel_optimistic_xa_lsu_off.result51
-rw-r--r--mysql-test/suite/rpl/r/rpl_parallel_partial_binlog_trans.result51
-rw-r--r--mysql-test/suite/rpl/r/rpl_parallel_record_gtid_wakeup.result48
-rw-r--r--mysql-test/suite/rpl/r/rpl_parallel_retry_deadlock.result192
-rw-r--r--mysql-test/suite/rpl/r/rpl_parallel_rollback_assert.result45
-rw-r--r--mysql-test/suite/rpl/r/rpl_parallel_single_grpcmt.result160
-rw-r--r--mysql-test/suite/rpl/r/rpl_parallel_slave_bgc_kill.result323
-rw-r--r--mysql-test/suite/rpl/r/rpl_parallel_stop_on_con_kill.result102
-rw-r--r--mysql-test/suite/rpl/r/rpl_parallel_stop_slave.result85
-rw-r--r--mysql-test/suite/rpl/r/rpl_parallel_wrong_binlog_order.result75
-rw-r--r--mysql-test/suite/rpl/r/rpl_parallel_wrong_exec_master_pos.result34
-rw-r--r--mysql-test/suite/rpl/r/rpl_parallel_xa_same_xid.result23
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_big_table_id,32bit.rdiff58
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_big_table_id.result60
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_create_table.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_implicit_commit_binlog.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result8
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_triggers.result132
-rw-r--r--mysql-test/suite/rpl/r/rpl_show_slave_hosts.result4
-rw-r--r--mysql-test/suite/rpl/r/rpl_skip_replication.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_slave_alias_replica.result55
-rw-r--r--mysql-test/suite/rpl/r/rpl_sp.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_spec_variables.result22
-rw-r--r--mysql-test/suite/rpl/r/rpl_stm_implicit_commit_binlog.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_sync_with_innodb_thd_conc.result18
-rw-r--r--mysql-test/suite/rpl/r/rpl_table_options.result4
-rw-r--r--mysql-test/suite/rpl/r/rpl_temporary.result4
-rw-r--r--mysql-test/suite/rpl/r/rpl_temporary_errors.result47
-rw-r--r--mysql-test/suite/rpl/r/rpl_xa.result222
-rw-r--r--mysql-test/suite/rpl/r/rpl_xa_gap_lock.result44
-rw-r--r--mysql-test/suite/rpl/r/rpl_xa_gtid_pos_auto_engine.result238
-rw-r--r--mysql-test/suite/rpl/r/rpl_xa_survive_disconnect.result319
-rw-r--r--mysql-test/suite/rpl/r/rpl_xa_survive_disconnect_lsu_off.result319
-rw-r--r--mysql-test/suite/rpl/r/rpl_xa_survive_disconnect_mixed_engines.result373
-rw-r--r--mysql-test/suite/rpl/t/create_or_replace.inc1
-rw-r--r--mysql-test/suite/rpl/t/grant_replication_slave.test39
-rw-r--r--mysql-test/suite/rpl/t/rpl_create_drop_view.test3
-rw-r--r--mysql-test/suite/rpl/t/rpl_create_or_replace_fail.test2
-rw-r--r--mysql-test/suite/rpl/t/rpl_create_xa_prepared.inc9
-rw-r--r--mysql-test/suite/rpl/t/rpl_delayed_slave.combinations1
-rw-r--r--mysql-test/suite/rpl/t/rpl_failed_drop_tbl_binlog.opt1
-rw-r--r--mysql-test/suite/rpl/t/rpl_foreign_key_innodb.test17
-rw-r--r--mysql-test/suite/rpl/t/rpl_gtid_crash-master.opt2
-rw-r--r--mysql-test/suite/rpl/t/rpl_gtid_crash_myisam-master.opt2
-rw-r--r--mysql-test/suite/rpl/t/rpl_heartbeat_basic.test2
-rw-r--r--mysql-test/suite/rpl/t/rpl_mdev6386.test1
-rw-r--r--mysql-test/suite/rpl/t/rpl_mixed_implicit_commit_binlog.test2
-rw-r--r--mysql-test/suite/rpl/t/rpl_parallel.test1
-rw-r--r--mysql-test/suite/rpl/t/rpl_parallel_analyze_table_hang.test1
-rw-r--r--mysql-test/suite/rpl/t/rpl_parallel_conflicts-slave.opt1
-rw-r--r--mysql-test/suite/rpl/t/rpl_parallel_conflicts.test10
-rw-r--r--mysql-test/suite/rpl/t/rpl_parallel_deadlock_corrupt_binlog.test1
-rw-r--r--mysql-test/suite/rpl/t/rpl_parallel_domain.test1
-rw-r--r--mysql-test/suite/rpl/t/rpl_parallel_domain_slave_single_grp.test1
-rw-r--r--mysql-test/suite/rpl/t/rpl_parallel_free_deferred_event.test1
-rw-r--r--mysql-test/suite/rpl/t/rpl_parallel_gco_wait_kill.test1
-rw-r--r--mysql-test/suite/rpl/t/rpl_parallel_gtid_slave_pos_update_fail.test1
-rw-r--r--mysql-test/suite/rpl/t/rpl_parallel_ignore_error_on_rotate.test1
-rw-r--r--mysql-test/suite/rpl/t/rpl_parallel_incorrect_relay_pos.test1
-rw-r--r--mysql-test/suite/rpl/t/rpl_parallel_innodb_lock_conflict.test1
-rw-r--r--mysql-test/suite/rpl/t/rpl_parallel_mdev6589.test1
-rw-r--r--mysql-test/suite/rpl/t/rpl_parallel_missed_error_handling.test1
-rw-r--r--mysql-test/suite/rpl/t/rpl_parallel_mode.test1
-rw-r--r--mysql-test/suite/rpl/t/rpl_parallel_optimistic_xa.test235
-rw-r--r--mysql-test/suite/rpl/t/rpl_parallel_optimistic_xa_lsu_off-slave.opt1
-rw-r--r--mysql-test/suite/rpl/t/rpl_parallel_optimistic_xa_lsu_off.test2
-rw-r--r--mysql-test/suite/rpl/t/rpl_parallel_partial_binlog_trans.test1
-rw-r--r--mysql-test/suite/rpl/t/rpl_parallel_record_gtid_wakeup.test1
-rw-r--r--mysql-test/suite/rpl/t/rpl_parallel_retry_deadlock.test1
-rw-r--r--mysql-test/suite/rpl/t/rpl_parallel_rollback_assert.test1
-rw-r--r--mysql-test/suite/rpl/t/rpl_parallel_single_grpcmt.test1
-rw-r--r--mysql-test/suite/rpl/t/rpl_parallel_slave_bgc_kill.test1
-rw-r--r--mysql-test/suite/rpl/t/rpl_parallel_stop_on_con_kill.test1
-rw-r--r--mysql-test/suite/rpl/t/rpl_parallel_stop_slave.test1
-rw-r--r--mysql-test/suite/rpl/t/rpl_parallel_temptable-master.opt2
-rw-r--r--mysql-test/suite/rpl/t/rpl_parallel_wrong_binlog_order.test1
-rw-r--r--mysql-test/suite/rpl/t/rpl_parallel_wrong_exec_master_pos.test1
-rw-r--r--mysql-test/suite/rpl/t/rpl_parallel_xa_same_xid.test138
-rw-r--r--mysql-test/suite/rpl/t/rpl_row_big_table_id.opt1
-rw-r--r--mysql-test/suite/rpl/t/rpl_row_big_table_id.test15
-rw-r--r--mysql-test/suite/rpl/t/rpl_row_create_table.test6
-rw-r--r--mysql-test/suite/rpl/t/rpl_row_implicit_commit_binlog.test2
-rw-r--r--mysql-test/suite/rpl/t/rpl_row_triggers.test116
-rw-r--r--mysql-test/suite/rpl/t/rpl_slave_alias_replica.test102
-rw-r--r--mysql-test/suite/rpl/t/rpl_slow_query_log.test4
-rw-r--r--mysql-test/suite/rpl/t/rpl_spec_variables.test23
-rw-r--r--mysql-test/suite/rpl/t/rpl_stm_implicit_commit_binlog.test2
-rw-r--r--mysql-test/suite/rpl/t/rpl_sync_with_innodb_thd_conc.test41
-rw-r--r--mysql-test/suite/rpl/t/rpl_table_options.test4
-rw-r--r--mysql-test/suite/rpl/t/rpl_temporary_errors.test82
-rw-r--r--mysql-test/suite/rpl/t/rpl_xa-master.opt1
-rw-r--r--mysql-test/suite/rpl/t/rpl_xa.inc355
-rw-r--r--mysql-test/suite/rpl/t/rpl_xa.test5
-rw-r--r--mysql-test/suite/rpl/t/rpl_xa_gap_lock-slave.opt1
-rw-r--r--mysql-test/suite/rpl/t/rpl_xa_gap_lock.test137
-rw-r--r--mysql-test/suite/rpl/t/rpl_xa_gtid_pos_auto_engine-master.opt1
-rw-r--r--mysql-test/suite/rpl/t/rpl_xa_gtid_pos_auto_engine.test29
-rw-r--r--mysql-test/suite/rpl/t/rpl_xa_survive_disconnect.test297
-rw-r--r--mysql-test/suite/rpl/t/rpl_xa_survive_disconnect_lsu_off-slave.opt2
-rw-r--r--mysql-test/suite/rpl/t/rpl_xa_survive_disconnect_lsu_off.test8
-rw-r--r--mysql-test/suite/rpl/t/rpl_xa_survive_disconnect_mixed_engines.test68
-rw-r--r--mysql-test/suite/s3/alter.result130
-rw-r--r--mysql-test/suite/s3/alter.test100
-rw-r--r--mysql-test/suite/s3/alter2.result49
-rw-r--r--mysql-test/suite/s3/alter2.test64
-rw-r--r--mysql-test/suite/s3/amazon.result7
-rw-r--r--mysql-test/suite/s3/amazon.test27
-rw-r--r--mysql-test/suite/s3/arguments.result58
-rw-r--r--mysql-test/suite/s3/arguments.test54
-rw-r--r--mysql-test/suite/s3/backup.result18
-rw-r--r--mysql-test/suite/s3/backup.test33
-rw-r--r--mysql-test/suite/s3/basic.result156
-rw-r--r--mysql-test/suite/s3/basic.test88
-rw-r--r--mysql-test/suite/s3/create_database.inc10
-rw-r--r--mysql-test/suite/s3/disabled.def0
-rw-r--r--mysql-test/suite/s3/discovery.result57
-rw-r--r--mysql-test/suite/s3/discovery.test84
-rw-r--r--mysql-test/suite/s3/drop_database.inc9
-rw-r--r--mysql-test/suite/s3/encryption.opt (renamed from mysql-test/suite/mariabackup/ddl_incremental_encrypted.opt)5
-rw-r--r--mysql-test/suite/s3/encryption.result23
-rw-r--r--mysql-test/suite/s3/encryption.test36
-rw-r--r--mysql-test/suite/s3/innodb.result31
-rw-r--r--mysql-test/suite/s3/innodb.test35
-rw-r--r--mysql-test/suite/s3/my.cnf33
-rw-r--r--mysql-test/suite/s3/mysqldump.result60
-rw-r--r--mysql-test/suite/s3/mysqldump.test33
-rw-r--r--mysql-test/suite/s3/no_s3-master.opt1
-rw-r--r--mysql-test/suite/s3/no_s3.result11
-rw-r--r--mysql-test/suite/s3/no_s3.test25
-rw-r--r--mysql-test/suite/s3/partition.result166
-rw-r--r--mysql-test/suite/s3/partition.test118
-rw-r--r--mysql-test/suite/s3/partition_create_fail.result15
-rw-r--r--mysql-test/suite/s3/partition_create_fail.test39
-rw-r--r--mysql-test/suite/s3/partition_move.result74
-rw-r--r--mysql-test/suite/s3/partition_move.test80
-rw-r--r--mysql-test/suite/s3/replication.inc209
-rw-r--r--mysql-test/suite/s3/replication_delayed.cnf3
-rw-r--r--mysql-test/suite/s3/replication_delayed.result124
-rw-r--r--mysql-test/suite/s3/replication_delayed.test115
-rw-r--r--mysql-test/suite/s3/replication_mixed.cnf3
-rw-r--r--mysql-test/suite/s3/replication_mixed.result300
-rw-r--r--mysql-test/suite/s3/replication_mixed.test11
-rw-r--r--mysql-test/suite/s3/replication_partition.cnf3
-rw-r--r--mysql-test/suite/s3/replication_partition.result290
-rw-r--r--mysql-test/suite/s3/replication_partition.test170
-rw-r--r--mysql-test/suite/s3/replication_stmt.cnf3
-rw-r--r--mysql-test/suite/s3/replication_stmt.result300
-rw-r--r--mysql-test/suite/s3/replication_stmt.test11
-rw-r--r--mysql-test/suite/s3/select.result8
-rw-r--r--mysql-test/suite/s3/select.test17
-rw-r--r--mysql-test/suite/s3/slave.cnf34
-rw-r--r--mysql-test/suite/s3/suite.pm67
-rw-r--r--mysql-test/suite/s3/unsupported.result15
-rw-r--r--mysql-test/suite/s3/unsupported.test43
-rw-r--r--mysql-test/suite/sql_sequence/create.result15
-rw-r--r--mysql-test/suite/sql_sequence/create.test4
-rw-r--r--mysql-test/suite/sql_sequence/default.result4
-rw-r--r--mysql-test/suite/sql_sequence/other.result13
-rw-r--r--mysql-test/suite/sql_sequence/other.test10
-rw-r--r--mysql-test/suite/sql_sequence/rebuild.result147
-rw-r--r--mysql-test/suite/sql_sequence/rebuild.test2
-rw-r--r--mysql-test/suite/storage_engine/create_table.result2
-rw-r--r--mysql-test/suite/storage_engine/create_table.test2
-rw-r--r--mysql-test/suite/sys_vars/inc/secure_timestamp_func.inc32
-rw-r--r--mysql-test/suite/sys_vars/inc/sysvar_global_and_session_grant.inc49
-rw-r--r--mysql-test/suite/sys_vars/inc/sysvar_global_grant.inc53
-rw-r--r--mysql-test/suite/sys_vars/inc/sysvar_global_grant_alone.inc41
-rw-r--r--mysql-test/suite/sys_vars/inc/sysvar_session_grant.inc51
-rw-r--r--mysql-test/suite/sys_vars/inc/sysvar_session_grant_alone.inc45
-rw-r--r--mysql-test/suite/sys_vars/inc/sysvars_server.inc1
-rw-r--r--mysql-test/suite/sys_vars/r/aria_sort_buffer_size_basic,32bit.rdiff9
-rw-r--r--mysql-test/suite/sys_vars/r/aria_sort_buffer_size_basic.result2
-rw-r--r--mysql-test/suite/sys_vars/r/big_tables_basic.result28
-rw-r--r--mysql-test/suite/sys_vars/r/binlog_annotate_row_events_grant.result42
-rw-r--r--mysql-test/suite/sys_vars/r/binlog_cache_size_grant.result46
-rw-r--r--mysql-test/suite/sys_vars/r/binlog_commit_wait_count_grant.result46
-rw-r--r--mysql-test/suite/sys_vars/r/binlog_commit_wait_usec_grant.result46
-rw-r--r--mysql-test/suite/sys_vars/r/binlog_direct_non_transactional_updates_grant.result44
-rw-r--r--mysql-test/suite/sys_vars/r/binlog_file_cache_size_grant.result46
-rw-r--r--mysql-test/suite/sys_vars/r/binlog_format_grant.result40
-rw-r--r--mysql-test/suite/sys_vars/r/binlog_row_image_grant.result42
-rw-r--r--mysql-test/suite/sys_vars/r/binlog_row_metadata_basic.result90
-rw-r--r--mysql-test/suite/sys_vars/r/binlog_row_metadata_grant.result46
-rw-r--r--mysql-test/suite/sys_vars/r/binlog_stmt_cache_size_grant.result46
-rw-r--r--mysql-test/suite/sys_vars/r/connect_timeout_grant.result46
-rw-r--r--mysql-test/suite/sys_vars/r/default_regex_flags_basic.result6
-rw-r--r--mysql-test/suite/sys_vars/r/disconnect_on_expired_password_grant.result46
-rw-r--r--mysql-test/suite/sys_vars/r/expire_logs_days_grant.result46
-rw-r--r--mysql-test/suite/sys_vars/r/extra_max_connections_grant.result46
-rw-r--r--mysql-test/suite/sys_vars/r/general_log_file_basic.result2
-rw-r--r--mysql-test/suite/sys_vars/r/gtid_binlog_state_grant.result46
-rw-r--r--mysql-test/suite/sys_vars/r/gtid_cleanup_batch_size_grant.result46
-rw-r--r--mysql-test/suite/sys_vars/r/gtid_domain_id_grant.result69
-rw-r--r--mysql-test/suite/sys_vars/r/gtid_ignore_duplicates_grant.result46
-rw-r--r--mysql-test/suite/sys_vars/r/gtid_pos_auto_engines_grant.result46
-rw-r--r--mysql-test/suite/sys_vars/r/gtid_seq_no_grant.result44
-rw-r--r--mysql-test/suite/sys_vars/r/gtid_slave_pos_grant.result46
-rw-r--r--mysql-test/suite/sys_vars/r/gtid_strict_mode_grant.result46
-rw-r--r--mysql-test/suite/sys_vars/r/init_connect_grant.result46
-rw-r--r--mysql-test/suite/sys_vars/r/init_slave_grant.result46
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_adaptive_max_sleep_delay_basic.result24
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_background_scrub_data_check_interval_basic.result42
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_background_scrub_data_compressed_basic.result12
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_background_scrub_data_interval_basic.result24
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_background_scrub_data_uncompressed_basic.result12
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_buffer_pool_evict_basic.result2
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_checksum_algorithm_basic.result4
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_checksums_basic.result53
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_commit_concurrency_basic.result26
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_concurrency_tickets_basic.result68
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_debug_force_scrubbing_basic.result50
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_disable_background_merge_basic.result4
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_doublewrite_batch_size_basic.result24
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_flush_sync_basic.result10
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_idle_flush_pct_basic.result89
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_locks_unsafe_for_binlog_basic.result53
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_log_checksums_basic.result8
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_log_compressed_pages_basic.result14
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_log_optimize_ddl_basic.result6
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_max_dirty_pages_pct_basic.result4
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_max_dirty_pages_pct_func.result34
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_page_cleaners_basic.result16
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_page_hash_locks_basic.result24
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_replication_delay_basic.result34
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_rollback_segments_basic.result64
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_scrub_log_basic.result2
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_scrub_log_speed_basic.result8
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_stats_sample_pages_basic.result77
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_stats_transient_sample_pages_basic.result6
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_thread_concurrency_basic.result38
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_thread_sleep_delay_basic.result46
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_undo_logs_basic.result100
-rw-r--r--mysql-test/suite/sys_vars/r/local_infile_func.result2
-rw-r--r--mysql-test/suite/sys_vars/r/log_bin_compress_grant.result46
-rw-r--r--mysql-test/suite/sys_vars/r/log_bin_compress_min_len_grant.result46
-rw-r--r--mysql-test/suite/sys_vars/r/log_bin_trust_function_creators_grant.result46
-rw-r--r--mysql-test/suite/sys_vars/r/master_verify_checksum_grant.result46
-rw-r--r--mysql-test/suite/sys_vars/r/max_binlog_cache_size_grant.result46
-rw-r--r--mysql-test/suite/sys_vars/r/max_binlog_size_grant.result46
-rw-r--r--mysql-test/suite/sys_vars/r/max_binlog_stmt_cache_size_grant.result46
-rw-r--r--mysql-test/suite/sys_vars/r/max_connect_errors_grant.result46
-rw-r--r--mysql-test/suite/sys_vars/r/max_connections_grant.result46
-rw-r--r--mysql-test/suite/sys_vars/r/max_long_data_size_basic.result14
-rw-r--r--mysql-test/suite/sys_vars/r/max_password_errors_grant.result46
-rw-r--r--mysql-test/suite/sys_vars/r/multi_range_count_basic.result233
-rw-r--r--mysql-test/suite/sys_vars/r/old_alter_table_basic.result18
-rw-r--r--mysql-test/suite/sys_vars/r/optimizer_switch_basic.result32
-rw-r--r--mysql-test/suite/sys_vars/r/preudo_thread_id_grant.result44
-rw-r--r--mysql-test/suite/sys_vars/r/proxy_protocol_networks_grant.result46
-rw-r--r--mysql-test/suite/sys_vars/r/read_binlog_speed_limit_grant.result46
-rw-r--r--mysql-test/suite/sys_vars/r/read_only_func.result2
-rw-r--r--mysql-test/suite/sys_vars/r/read_only_grant.result44
-rw-r--r--mysql-test/suite/sys_vars/r/relay_log_purge_grant.result46
-rw-r--r--mysql-test/suite/sys_vars/r/relay_log_recovery_grant.result46
-rw-r--r--mysql-test/suite/sys_vars/r/replicate_do_db_grant.result46
-rw-r--r--mysql-test/suite/sys_vars/r/replicate_do_table_grant.result46
-rw-r--r--mysql-test/suite/sys_vars/r/replicate_events_marked_for_skip_grant.result46
-rw-r--r--mysql-test/suite/sys_vars/r/replicate_ignore_db_grant.result46
-rw-r--r--mysql-test/suite/sys_vars/r/replicate_ignore_table_grant.result46
-rw-r--r--mysql-test/suite/sys_vars/r/replicate_wild_do_table_grant.result46
-rw-r--r--mysql-test/suite/sys_vars/r/replicate_wild_ignore_table_grant.result46
-rw-r--r--mysql-test/suite/sys_vars/r/rpl_semi_sync_master_enabled_grant.result46
-rw-r--r--mysql-test/suite/sys_vars/r/rpl_semi_sync_master_timeout_grant.result46
-rw-r--r--mysql-test/suite/sys_vars/r/rpl_semi_sync_master_trace_level_grant.result46
-rw-r--r--mysql-test/suite/sys_vars/r/rpl_semi_sync_master_wait_no_slave_grant.result46
-rw-r--r--mysql-test/suite/sys_vars/r/rpl_semi_sync_master_wait_point_grant.result46
-rw-r--r--mysql-test/suite/sys_vars/r/rpl_semi_sync_slave_delay_master_grant.result46
-rw-r--r--mysql-test/suite/sys_vars/r/rpl_semi_sync_slave_enabled_grant.result46
-rw-r--r--mysql-test/suite/sys_vars/r/rpl_semi_sync_slave_kill_conn_timeout_grant.result46
-rw-r--r--mysql-test/suite/sys_vars/r/rpl_semi_sync_slave_trace_level_grant.result46
-rw-r--r--mysql-test/suite/sys_vars/r/secure_auth_grant.result46
-rw-r--r--mysql-test/suite/sys_vars/r/secure_timestamp_no.result28
-rw-r--r--mysql-test/suite/sys_vars/r/secure_timestamp_rpl.result32
-rw-r--r--mysql-test/suite/sys_vars/r/secure_timestamp_super.result30
-rw-r--r--mysql-test/suite/sys_vars/r/secure_timestamp_yes.result30
-rw-r--r--mysql-test/suite/sys_vars/r/server_id_grant.result69
-rw-r--r--mysql-test/suite/sys_vars/r/session_track_system_variables_basic.result10
-rw-r--r--mysql-test/suite/sys_vars/r/slave_compressed_protocol_grant.result46
-rw-r--r--mysql-test/suite/sys_vars/r/slave_ddl_exec_mode_grant.result46
-rw-r--r--mysql-test/suite/sys_vars/r/slave_domain_parallel_threads_grant.result46
-rw-r--r--mysql-test/suite/sys_vars/r/slave_exec_mode_grant.result46
-rw-r--r--mysql-test/suite/sys_vars/r/slave_max_allowed_packet_grant.result46
-rw-r--r--mysql-test/suite/sys_vars/r/slave_net_timeout_grant.result46
-rw-r--r--mysql-test/suite/sys_vars/r/slave_parallel_max_queued_grant.result46
-rw-r--r--mysql-test/suite/sys_vars/r/slave_parallel_mode_grant.result46
-rw-r--r--mysql-test/suite/sys_vars/r/slave_parallel_threads_grant.result46
-rw-r--r--mysql-test/suite/sys_vars/r/slave_parallel_workers_grant.result46
-rw-r--r--mysql-test/suite/sys_vars/r/slave_run_triggers_for_rbr_grant.result46
-rw-r--r--mysql-test/suite/sys_vars/r/slave_sql_verify_checksum_grant.result46
-rw-r--r--mysql-test/suite/sys_vars/r/slave_transaction_retry_interval_grant.result46
-rw-r--r--mysql-test/suite/sys_vars/r/slave_type_conversions_grant.result46
-rw-r--r--mysql-test/suite/sys_vars/r/slow_launch_time_grant.result46
-rw-r--r--mysql-test/suite/sys_vars/r/slow_query_log_file_basic.result2
-rw-r--r--mysql-test/suite/sys_vars/r/sql_big_tables_basic.result109
-rw-r--r--mysql-test/suite/sys_vars/r/sql_big_tables_func.result96
-rw-r--r--mysql-test/suite/sys_vars/r/sql_log_bin_grant.result42
-rw-r--r--mysql-test/suite/sys_vars/r/storage_engine_basic.result34
-rw-r--r--mysql-test/suite/sys_vars/r/sync_binlog_grant.result46
-rw-r--r--mysql-test/suite/sys_vars/r/sync_master_info_grant.result46
-rw-r--r--mysql-test/suite/sys_vars/r/sync_relay_log_grant.result46
-rw-r--r--mysql-test/suite/sys_vars/r/sync_relay_log_info_grant.result46
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_aria,32bit.rdiff54
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_aria.result4
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_debug.result8
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_innodb,32bit.rdiff253
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_innodb.result258
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_server_embedded,32bit.rdiff441
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_server_embedded.result204
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_server_notembedded,32bit.rdiff447
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_server_notembedded,aix.rdiff105
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result230
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_star.result113
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_wsrep.result79
-rw-r--r--mysql-test/suite/sys_vars/r/thread_concurrency_basic.result21
-rw-r--r--mysql-test/suite/sys_vars/r/thread_pool_idle_timeout_grant.result46
-rw-r--r--mysql-test/suite/sys_vars/r/thread_pool_max_threads_grant.result46
-rw-r--r--mysql-test/suite/sys_vars/r/thread_pool_oversubscribe_grant.result46
-rw-r--r--mysql-test/suite/sys_vars/r/thread_pool_stall_limit_basic.result2
-rw-r--r--mysql-test/suite/sys_vars/r/thread_pool_stall_limit_grant.result46
-rw-r--r--mysql-test/suite/sys_vars/r/timed_mutexes_basic.result124
-rw-r--r--mysql-test/suite/sys_vars/r/tmp_disk_table_size_func.result2
-rw-r--r--mysql-test/suite/sys_vars/r/tmp_memory_table_size_basic.result165
-rw-r--r--mysql-test/suite/sys_vars/r/tmp_table_size_basic.result146
-rw-r--r--mysql-test/suite/sys_vars/r/wsrep_strict_ddl_basic.result45
-rw-r--r--mysql-test/suite/sys_vars/t/all_vars.test1
-rw-r--r--mysql-test/suite/sys_vars/t/aria_sort_buffer_size_basic.test1
-rw-r--r--mysql-test/suite/sys_vars/t/binlog_annotate_row_events_grant.test9
-rw-r--r--mysql-test/suite/sys_vars/t/binlog_cache_size_grant.test9
-rw-r--r--mysql-test/suite/sys_vars/t/binlog_commit_wait_count_grant.test9
-rw-r--r--mysql-test/suite/sys_vars/t/binlog_commit_wait_usec_grant.test9
-rw-r--r--mysql-test/suite/sys_vars/t/binlog_direct_non_transactional_updates_grant.test56
-rw-r--r--mysql-test/suite/sys_vars/t/binlog_file_cache_size_grant.test9
-rw-r--r--mysql-test/suite/sys_vars/t/binlog_format_grant.test49
-rw-r--r--mysql-test/suite/sys_vars/t/binlog_row_image_grant.test9
-rw-r--r--mysql-test/suite/sys_vars/t/binlog_row_metadata_basic.test121
-rw-r--r--mysql-test/suite/sys_vars/t/binlog_row_metadata_grant.test9
-rw-r--r--mysql-test/suite/sys_vars/t/binlog_stmt_cache_size_grant.test9
-rw-r--r--mysql-test/suite/sys_vars/t/connect_timeout_grant.test56
-rw-r--r--mysql-test/suite/sys_vars/t/default_regex_flags_basic.test2
-rw-r--r--mysql-test/suite/sys_vars/t/disconnect_on_expired_password_grant.test56
-rw-r--r--mysql-test/suite/sys_vars/t/expire_logs_days_grant.test9
-rw-r--r--mysql-test/suite/sys_vars/t/extra_max_connections_grant.test56
-rw-r--r--mysql-test/suite/sys_vars/t/gtid_binlog_state_grant.test67
-rw-r--r--mysql-test/suite/sys_vars/t/gtid_cleanup_batch_size_grant.test9
-rw-r--r--mysql-test/suite/sys_vars/t/gtid_domain_id_grant.test16
-rw-r--r--mysql-test/suite/sys_vars/t/gtid_ignore_duplicates_grant.test9
-rw-r--r--mysql-test/suite/sys_vars/t/gtid_pos_auto_engines_grant.test9
-rw-r--r--mysql-test/suite/sys_vars/t/gtid_seq_no_grant.test9
-rw-r--r--mysql-test/suite/sys_vars/t/gtid_slave_pos_grant.test9
-rw-r--r--mysql-test/suite/sys_vars/t/gtid_strict_mode_grant.test9
-rw-r--r--mysql-test/suite/sys_vars/t/init_connect_grant.test56
-rw-r--r--mysql-test/suite/sys_vars/t/init_slave_grant.test9
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_buffer_pool_dump_pct_function.opt1
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_buffer_pool_evict_basic.test2
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_checksums_basic.test106
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_commit_concurrency_basic.test12
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_debug_force_scrubbing_basic.test42
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_disable_background_merge_basic.test12
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_doublewrite_batch_size_basic.test24
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_flush_sync_basic.test7
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_idle_flush_pct_basic.test63
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_locks_unsafe_for_binlog_basic.test106
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_log_files_in_group_basic.opt1
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_max_dirty_pages_pct_func.test17
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_page_hash_locks_basic.test24
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_rollback_segments_basic.test64
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_scrub_log_basic.test2
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_scrub_log_speed_basic.test2
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_stats_sample_pages_basic.test72
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_stats_transient_sample_pages_basic.test4
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_undo_logs_basic.opt1
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_undo_logs_basic.test125
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_use_native_aio_basic.test2
-rw-r--r--mysql-test/suite/sys_vars/t/local_infile_func.test2
-rw-r--r--mysql-test/suite/sys_vars/t/log_bin_compress_grant.test9
-rw-r--r--mysql-test/suite/sys_vars/t/log_bin_compress_min_len_grant.test9
-rw-r--r--mysql-test/suite/sys_vars/t/log_bin_trust_function_creators_grant.test9
-rw-r--r--mysql-test/suite/sys_vars/t/master_verify_checksum_grant.test9
-rw-r--r--mysql-test/suite/sys_vars/t/max_binlog_cache_size_grant.test9
-rw-r--r--mysql-test/suite/sys_vars/t/max_binlog_size_grant.test9
-rw-r--r--mysql-test/suite/sys_vars/t/max_binlog_stmt_cache_size_grant.test9
-rw-r--r--mysql-test/suite/sys_vars/t/max_connect_errors_grant.test56
-rw-r--r--mysql-test/suite/sys_vars/t/max_connections_grant.test56
-rw-r--r--mysql-test/suite/sys_vars/t/max_long_data_size_basic.test17
-rw-r--r--mysql-test/suite/sys_vars/t/max_password_errors_grant.test56
-rw-r--r--mysql-test/suite/sys_vars/t/multi_range_count_basic.test234
-rw-r--r--mysql-test/suite/sys_vars/t/preudo_thread_id_grant.test9
-rw-r--r--mysql-test/suite/sys_vars/t/proxy_protocol_networks_grant.test56
-rw-r--r--mysql-test/suite/sys_vars/t/read_binlog_speed_limit_grant.test9
-rw-r--r--mysql-test/suite/sys_vars/t/read_only_grant.test52
-rw-r--r--mysql-test/suite/sys_vars/t/relay_log_purge_grant.test9
-rw-r--r--mysql-test/suite/sys_vars/t/relay_log_recovery_grant.test9
-rw-r--r--mysql-test/suite/sys_vars/t/replicate_do_db_grant.test9
-rw-r--r--mysql-test/suite/sys_vars/t/replicate_do_table_grant.test9
-rw-r--r--mysql-test/suite/sys_vars/t/replicate_events_marked_for_skip_grant.test9
-rw-r--r--mysql-test/suite/sys_vars/t/replicate_ignore_db_grant.test9
-rw-r--r--mysql-test/suite/sys_vars/t/replicate_ignore_table_grant.test9
-rw-r--r--mysql-test/suite/sys_vars/t/replicate_wild_do_table_grant.test9
-rw-r--r--mysql-test/suite/sys_vars/t/replicate_wild_ignore_table_grant.test9
-rw-r--r--mysql-test/suite/sys_vars/t/rpl_semi_sync_master_enabled_grant.test9
-rw-r--r--mysql-test/suite/sys_vars/t/rpl_semi_sync_master_timeout_grant.test9
-rw-r--r--mysql-test/suite/sys_vars/t/rpl_semi_sync_master_trace_level_grant.test9
-rw-r--r--mysql-test/suite/sys_vars/t/rpl_semi_sync_master_wait_no_slave_grant.test9
-rw-r--r--mysql-test/suite/sys_vars/t/rpl_semi_sync_master_wait_point_grant.test9
-rw-r--r--mysql-test/suite/sys_vars/t/rpl_semi_sync_slave_delay_master_grant.test9
-rw-r--r--mysql-test/suite/sys_vars/t/rpl_semi_sync_slave_enabled_grant.test9
-rw-r--r--mysql-test/suite/sys_vars/t/rpl_semi_sync_slave_kill_conn_timeout_grant.test9
-rw-r--r--mysql-test/suite/sys_vars/t/rpl_semi_sync_slave_trace_level_grant.test9
-rw-r--r--mysql-test/suite/sys_vars/t/secure_auth_grant.test56
-rw-r--r--mysql-test/suite/sys_vars/t/server_id_grant.test16
-rw-r--r--mysql-test/suite/sys_vars/t/session_track_system_variables_basic.test4
-rw-r--r--mysql-test/suite/sys_vars/t/slave_compressed_protocol_grant.test9
-rw-r--r--mysql-test/suite/sys_vars/t/slave_ddl_exec_mode_grant.test9
-rw-r--r--mysql-test/suite/sys_vars/t/slave_domain_parallel_threads_grant.test9
-rw-r--r--mysql-test/suite/sys_vars/t/slave_exec_mode_grant.test9
-rw-r--r--mysql-test/suite/sys_vars/t/slave_max_allowed_packet_grant.test9
-rw-r--r--mysql-test/suite/sys_vars/t/slave_net_timeout_grant.test9
-rw-r--r--mysql-test/suite/sys_vars/t/slave_parallel_max_queued_grant.test9
-rw-r--r--mysql-test/suite/sys_vars/t/slave_parallel_mode_grant.test9
-rw-r--r--mysql-test/suite/sys_vars/t/slave_parallel_threads_grant.test9
-rw-r--r--mysql-test/suite/sys_vars/t/slave_parallel_workers_grant.test9
-rw-r--r--mysql-test/suite/sys_vars/t/slave_run_triggers_for_rbr_grant.test9
-rw-r--r--mysql-test/suite/sys_vars/t/slave_sql_verify_checksum_grant.test9
-rw-r--r--mysql-test/suite/sys_vars/t/slave_transaction_retry_interval_grant.test9
-rw-r--r--mysql-test/suite/sys_vars/t/slave_type_conversions_grant.test9
-rw-r--r--mysql-test/suite/sys_vars/t/slow_launch_time_grant.test56
-rw-r--r--mysql-test/suite/sys_vars/t/sql_log_bin_grant.test51
-rw-r--r--mysql-test/suite/sys_vars/t/sync_binlog_grant.test9
-rw-r--r--mysql-test/suite/sys_vars/t/sync_master_info_grant.test9
-rw-r--r--mysql-test/suite/sys_vars/t/sync_relay_log_grant.test9
-rw-r--r--mysql-test/suite/sys_vars/t/sync_relay_log_info_grant.test9
-rw-r--r--mysql-test/suite/sys_vars/t/sysvars_star.cnf5
-rw-r--r--mysql-test/suite/sys_vars/t/sysvars_star.opt2
-rw-r--r--mysql-test/suite/sys_vars/t/sysvars_star.test41
-rw-r--r--mysql-test/suite/sys_vars/t/thread_concurrency_basic.test18
-rw-r--r--mysql-test/suite/sys_vars/t/thread_pool_idle_timeout_basic.test1
-rw-r--r--mysql-test/suite/sys_vars/t/thread_pool_idle_timeout_grant.test58
-rw-r--r--mysql-test/suite/sys_vars/t/thread_pool_max_threads_basic.test1
-rw-r--r--mysql-test/suite/sys_vars/t/thread_pool_max_threads_grant.test58
-rw-r--r--mysql-test/suite/sys_vars/t/thread_pool_min_threads_basic.test1
-rw-r--r--mysql-test/suite/sys_vars/t/thread_pool_oversubscribe_basic.test1
-rw-r--r--mysql-test/suite/sys_vars/t/thread_pool_oversubscribe_grant.test58
-rw-r--r--mysql-test/suite/sys_vars/t/thread_pool_size_basic.opt2
-rw-r--r--mysql-test/suite/sys_vars/t/thread_pool_size_basic.test1
-rw-r--r--mysql-test/suite/sys_vars/t/thread_pool_stall_limit_basic.test2
-rw-r--r--mysql-test/suite/sys_vars/t/thread_pool_stall_limit_grant.test58
-rw-r--r--mysql-test/suite/sys_vars/t/timed_mutexes_basic.test169
-rw-r--r--mysql-test/suite/sys_vars/t/tmp_memory_table_size_basic.test209
-rw-r--r--mysql-test/suite/sys_vars/t/tmp_table_size_basic.test207
-rw-r--r--mysql-test/suite/sys_vars/t/wait_timeout_func.test1
-rw-r--r--mysql-test/suite/sys_vars/t/wsrep_strict_ddl_basic.test42
-rw-r--r--mysql-test/suite/vcol/inc/vcol_column_def_options.inc6
-rw-r--r--mysql-test/suite/vcol/inc/vcol_ins_upd.inc2
-rw-r--r--mysql-test/suite/vcol/inc/vcol_select.inc4
-rw-r--r--mysql-test/suite/vcol/r/binlog.result2
-rw-r--r--mysql-test/suite/vcol/r/rpl_vcol.result2
-rw-r--r--mysql-test/suite/vcol/r/vcol_archive.result2
-rw-r--r--mysql-test/suite/vcol/r/vcol_blackhole.result2
-rw-r--r--mysql-test/suite/vcol/r/vcol_blocked_sql_funcs.result2
-rw-r--r--mysql-test/suite/vcol/r/vcol_column_def_options_innodb.result8
-rw-r--r--mysql-test/suite/vcol/r/vcol_column_def_options_myisam.result8
-rw-r--r--mysql-test/suite/vcol/r/vcol_csv.result2
-rw-r--r--mysql-test/suite/vcol/r/vcol_handler_aria.result2
-rw-r--r--mysql-test/suite/vcol/r/vcol_handler_innodb.result2
-rw-r--r--mysql-test/suite/vcol/r/vcol_handler_myisam.result2
-rw-r--r--mysql-test/suite/vcol/r/vcol_ins_upd_innodb.result2
-rw-r--r--mysql-test/suite/vcol/r/vcol_ins_upd_myisam.result2
-rw-r--r--mysql-test/suite/vcol/r/vcol_keys_innodb.result9
-rw-r--r--mysql-test/suite/vcol/r/vcol_keys_myisam.result2
-rw-r--r--mysql-test/suite/vcol/r/vcol_memory.result2
-rw-r--r--mysql-test/suite/vcol/r/vcol_non_stored_columns_innodb.result2
-rw-r--r--mysql-test/suite/vcol/r/vcol_non_stored_columns_myisam.result2
-rw-r--r--mysql-test/suite/vcol/r/vcol_partition_innodb.result2
-rw-r--r--mysql-test/suite/vcol/r/vcol_partition_myisam.result2
-rw-r--r--mysql-test/suite/vcol/r/vcol_select_innodb.result8
-rw-r--r--mysql-test/suite/vcol/r/vcol_select_myisam.result8
-rw-r--r--mysql-test/suite/vcol/r/vcol_sql_mode.result213
-rw-r--r--mysql-test/suite/vcol/r/vcol_sql_mode_datetime.result20
-rw-r--r--mysql-test/suite/vcol/r/vcol_sql_mode_time.result20
-rw-r--r--mysql-test/suite/vcol/r/vcol_sql_mode_timestamp.result25
-rw-r--r--mysql-test/suite/vcol/r/vcol_sql_mode_upgrade.result94
-rw-r--r--mysql-test/suite/vcol/r/vcol_supported_sql_funcs.result2
-rw-r--r--mysql-test/suite/vcol/r/vcol_trigger_sp_innodb.result2
-rw-r--r--mysql-test/suite/vcol/r/vcol_trigger_sp_myisam.result2
-rw-r--r--mysql-test/suite/vcol/r/vcol_view_innodb.result2
-rw-r--r--mysql-test/suite/vcol/r/vcol_view_myisam.result2
-rw-r--r--mysql-test/suite/vcol/t/rpl_vcol.test2
-rw-r--r--mysql-test/suite/vcol/t/vcol_archive.test2
-rw-r--r--mysql-test/suite/vcol/t/vcol_blackhole.test2
-rw-r--r--mysql-test/suite/vcol/t/vcol_blocked_sql_funcs.test2
-rw-r--r--mysql-test/suite/vcol/t/vcol_column_def_options_innodb.test2
-rw-r--r--mysql-test/suite/vcol/t/vcol_column_def_options_myisam.test2
-rw-r--r--mysql-test/suite/vcol/t/vcol_csv.test2
-rw-r--r--mysql-test/suite/vcol/t/vcol_handler_aria.test2
-rw-r--r--mysql-test/suite/vcol/t/vcol_handler_innodb.test2
-rw-r--r--mysql-test/suite/vcol/t/vcol_handler_myisam.test2
-rw-r--r--mysql-test/suite/vcol/t/vcol_ins_upd_innodb.test2
-rw-r--r--mysql-test/suite/vcol/t/vcol_ins_upd_myisam.test2
-rw-r--r--mysql-test/suite/vcol/t/vcol_keys_innodb.test4
-rw-r--r--mysql-test/suite/vcol/t/vcol_keys_myisam.test2
-rw-r--r--mysql-test/suite/vcol/t/vcol_memory.test2
-rw-r--r--mysql-test/suite/vcol/t/vcol_non_stored_columns_innodb.test2
-rw-r--r--mysql-test/suite/vcol/t/vcol_non_stored_columns_myisam.test2
-rw-r--r--mysql-test/suite/vcol/t/vcol_partition_innodb.test2
-rw-r--r--mysql-test/suite/vcol/t/vcol_partition_myisam.test2
-rw-r--r--mysql-test/suite/vcol/t/vcol_select_innodb.test2
-rw-r--r--mysql-test/suite/vcol/t/vcol_select_myisam.test2
-rw-r--r--mysql-test/suite/vcol/t/vcol_sql_mode.test83
-rw-r--r--mysql-test/suite/vcol/t/vcol_sql_mode_datetime.test12
-rw-r--r--mysql-test/suite/vcol/t/vcol_sql_mode_time.test12
-rw-r--r--mysql-test/suite/vcol/t/vcol_sql_mode_timestamp.test12
-rw-r--r--mysql-test/suite/vcol/t/vcol_sql_mode_upgrade.test20
-rw-r--r--mysql-test/suite/vcol/t/vcol_supported_sql_funcs.test2
-rw-r--r--mysql-test/suite/vcol/t/vcol_trigger_sp_innodb.test2
-rw-r--r--mysql-test/suite/vcol/t/vcol_trigger_sp_myisam.test2
-rw-r--r--mysql-test/suite/vcol/t/vcol_view_innodb.test2
-rw-r--r--mysql-test/suite/vcol/t/vcol_view_myisam.test2
-rw-r--r--mysql-test/suite/versioning/r/alter.result24
-rw-r--r--mysql-test/suite/versioning/r/create.result2
-rw-r--r--mysql-test/suite/versioning/r/cte.result5
-rw-r--r--mysql-test/suite/versioning/r/delete_history.result12
-rw-r--r--mysql-test/suite/versioning/r/foreign.result38
-rw-r--r--mysql-test/suite/versioning/r/partition.result770
-rw-r--r--mysql-test/suite/versioning/r/partition_innodb.result80
-rw-r--r--mysql-test/suite/versioning/r/partition_rotation.result70
-rw-r--r--mysql-test/suite/versioning/r/select.result5
-rw-r--r--mysql-test/suite/versioning/r/select2,trx_id.rdiff6
-rw-r--r--mysql-test/suite/versioning/r/select2.result2
-rw-r--r--mysql-test/suite/versioning/r/trx_id.result61
-rw-r--r--mysql-test/suite/versioning/t/alter.test24
-rw-r--r--mysql-test/suite/versioning/t/delete_history.test11
-rw-r--r--mysql-test/suite/versioning/t/foreign.test43
-rw-r--r--mysql-test/suite/versioning/t/partition.test565
-rw-r--r--mysql-test/suite/versioning/t/partition_innodb.test93
-rw-r--r--mysql-test/suite/versioning/t/partition_rotation.test58
-rw-r--r--mysql-test/suite/versioning/t/select.test13
-rw-r--r--mysql-test/suite/versioning/t/select2.test6
-rw-r--r--mysql-test/suite/versioning/t/trx_id.test71
-rw-r--r--mysql-test/suite/wsrep/r/MDEV-23466.result2
-rw-r--r--mysql-test/suite/wsrep/r/variables.result2
-rw-r--r--mysql-test/suite/wsrep/r/variables_debug.result2
-rw-r--r--mysql-test/unstable-tests454
-rw-r--r--mysql-test/valgrind.supp539
2718 files changed, 297265 insertions, 59895 deletions
diff --git a/mysql-test/README b/mysql-test/README
index f1c38f11716..6c7f004a54d 100644
--- a/mysql-test/README
+++ b/mysql-test/README
@@ -86,15 +86,15 @@ If the result is incorrect, you have found a bug. In this case, you should
edit the test result to the correct results so that we can verify that
the bug is corrected in future releases.
-If you want to submit your test case you can send it
+If you want to submit your test case you can send it
to maria-developers@lists.launchpad.net or attach it to a bug report on
-http://mariadb.org/jira/.
+https://mariadb.org/jira/.
If the test case is really big or if it contains 'not public' data,
then put your .test file and .result file(s) into a tar.gz archive,
add a README that explains the problem, ftp the archive to
ftp://ftp.askmonty.org/private and submit a report to
-http://mariadb.org/jira about it.
+https://mariadb.org/jira about it.
The latest information about mysql-test-run can be found at:
https://mariadb.com/kb/en/mariadb/mysqltest/
diff --git a/mysql-test/asan.supp b/mysql-test/asan.supp
new file mode 100644
index 00000000000..1bfd4fd0b17
--- /dev/null
+++ b/mysql-test/asan.supp
@@ -0,0 +1 @@
+# Asan suppressions
diff --git a/mysql-test/collections/smoke_test b/mysql-test/collections/smoke_test
index 6a9df661c4f..deaf38beb33 100644
--- a/mysql-test/collections/smoke_test
+++ b/mysql-test/collections/smoke_test
@@ -144,3 +144,5 @@ versioning.simple
versioning.trx_id
period.versioning
plugins.multiauth
+client.mariadb-conv
+innodb_i_s.innodb_sys_tables
diff --git a/mysql-test/include/analyze-format.inc b/mysql-test/include/analyze-format.inc
index 08006e26c79..7e18524e44e 100644
--- a/mysql-test/include/analyze-format.inc
+++ b/mysql-test/include/analyze-format.inc
@@ -1,3 +1,3 @@
# The time on ANALYSE FORMAT=JSON is rather variable
---replace_regex /("(r_total_time_ms|r_buffer_size|r_filling_time_ms)": )[^, \n]*/\1"REPLACED"/
+--replace_regex /("(r_total_time_ms|r_table_time_ms|r_other_time_ms|r_buffer_size|r_filling_time_ms)": )[^, \n]*/\1"REPLACED"/
diff --git a/mysql-test/include/check-testcase.test b/mysql-test/include/check-testcase.test
index 191feae1628..e984c4dc497 100644
--- a/mysql-test/include/check-testcase.test
+++ b/mysql-test/include/check-testcase.test
@@ -66,7 +66,7 @@ if ($tmp)
--echo Gtid_IO_Pos #
--echo Replicate_Do_Domain_Ids
--echo Replicate_Ignore_Domain_Ids
- --echo Parallel_Mode conservative
+ --echo Parallel_Mode optimistic
--echo SQL_Delay 0
--echo SQL_Remaining_Delay NULL
--echo Slave_SQL_Running_State
@@ -98,7 +98,7 @@ call mtr.check_testcase();
let $datadir=`select @@datadir`;
list_files $datadir mysql_upgrade_info;
list_files_write_file $datadir.tempfiles.txt $datadir/test #sql*;
---replace_regex /#sql-ib[0-9a-f]+\.ibd\n//
+--replace_regex /#sql-ib[1-9][0-9]*\.ibd\n//
cat_file $datadir.tempfiles.txt;
remove_file $datadir.tempfiles.txt;
list_files $datadir/mysql #sql*;
diff --git a/mysql-test/include/column_compression_rpl.inc b/mysql-test/include/column_compression_rpl.inc
index 7c8931a491f..3abf04a92ed 100644
--- a/mysql-test/include/column_compression_rpl.inc
+++ b/mysql-test/include/column_compression_rpl.inc
@@ -5,7 +5,7 @@ SET @saved_slave_type_conversions = @@slave_type_conversions;
SET GLOBAL SLAVE_TYPE_CONVERSIONS = 'ALL_NON_LOSSY';
--connection master
-if (!$engine_type) {let $engine_type=`SELECT @@storage_engine`; let $engine_type2=`SELECT @@storage_engine`;}
+if (!$engine_type) {let $engine_type=`SELECT @@default_storage_engine`; let $engine_type2=`SELECT @@default_storage_engine`;}
--disable_warnings
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8,t9,t10;
diff --git a/mysql-test/include/commit.inc b/mysql-test/include/commit.inc
index 1844a5320f7..a3c64096adf 100644
--- a/mysql-test/include/commit.inc
+++ b/mysql-test/include/commit.inc
@@ -405,6 +405,11 @@ end|
delimiter ;|
--echo # Reset Handler_commit and Handler_prepare counters
flush status;
+
+--echo #
+--echo # Count of reading of p_verify_status_increment() from mysql.proc
+call p_verify_status_increment(2, 0, 2, 0);
+
--echo #
--echo # 1. Read-only statement: SELECT
--echo #
@@ -562,7 +567,7 @@ begin
return 2;
end|
delimiter ;|
-call p_verify_status_increment(0, 0, 0, 0);
+call p_verify_status_increment(4, 0, 4, 0);
--echo # 16. A function changes non-trans-table.
--echo #
@@ -571,7 +576,7 @@ call p_verify_status_increment(0, 0, 0, 0);
--echo # the binary log.
--echo #
select f1();
-call p_verify_status_increment(1, 0, 1, 0);
+call p_verify_status_increment(3, 0, 3, 0);
commit;
call p_verify_status_increment(1, 0, 1, 0);
@@ -650,7 +655,7 @@ call p_verify_status_increment(0, 0, 0, 0);
--echo # 24. DDL: TRUNCATE TEMPORARY TABLE
--echo
truncate table t2;
-call p_verify_status_increment(4, 0, 4, 0);
+call p_verify_status_increment(2, 0, 2, 0);
commit;
--echo # There is nothing left to commit
call p_verify_status_increment(0, 0, 0, 0);
@@ -763,7 +768,7 @@ call p_verify_status_increment(0, 0, 0, 0);
truncate table t3;
call p_verify_status_increment(2, 0, 2, 0);
create view v1 as select * from t2;
-call p_verify_status_increment(2, 0, 2, 0);
+call p_verify_status_increment(4, 0, 4, 0);
check table t1;
call p_verify_status_increment(2, 0, 2, 0);
--echo # Sic: after this bug is fixed, CHECK leaves no pending transaction
@@ -774,7 +779,7 @@ call p_verify_status_increment(4, 0, 4, 0);
commit;
call p_verify_status_increment(0, 0, 0, 0);
drop view v1;
-call p_verify_status_increment(0, 0, 0, 0);
+call p_verify_status_increment(2, 0, 2, 0);
--echo #
--echo # Cleanup
diff --git a/mysql-test/include/common-tests.inc b/mysql-test/include/common-tests.inc
index 347760bf3c0..9c6b29858c8 100644
--- a/mysql-test/include/common-tests.inc
+++ b/mysql-test/include/common-tests.inc
@@ -1412,9 +1412,9 @@ drop table tmp;
# big table done
-SET BIG_TABLES=1;
+set tmp_memory_table_size=0;
select distinct concat(fld3," ",fld3) as namn from t2,t3 where t2.fld1=t3.t2nr order by namn limit 10;
-SET BIG_TABLES=0;
+set tmp_memory_table_size=default;
select distinct concat(fld3," ",fld3) from t2,t3 where t2.fld1=t3.t2nr order by fld3 limit 10;
select distinct fld5 from t2 limit 10;
@@ -1423,9 +1423,9 @@ select distinct fld5 from t2 limit 10;
#
select distinct fld3,count(*) from t2 group by companynr,fld3 limit 10;
-SET BIG_TABLES=1; # Force use of MyISAM
+set tmp_memory_table_size=0;
select distinct fld3,count(*) from t2 group by companynr,fld3 limit 10;
-SET BIG_TABLES=0;
+set tmp_memory_table_size=default;
select distinct fld3,repeat("a",length(fld3)),count(*) from t2 group by companynr,fld3 limit 100,10;
#
diff --git a/mysql-test/include/concurrent.inc b/mysql-test/include/concurrent.inc
index c6d8775af6b..5425f144d1d 100644
--- a/mysql-test/include/concurrent.inc
+++ b/mysql-test/include/concurrent.inc
@@ -31,20 +31,19 @@ SET SQL_MODE="";
# Show prerequisites for this test.
#
SELECT @@global.tx_isolation;
-SELECT @@global.innodb_locks_unsafe_for_binlog;
#
-# When innodb_locks_unsafe_for_binlog is not set (zero), which is the
-# default, InnoDB takes "next-key locks"/"gap locks". This means it
+# With the transaction isolation level REPEATABLE READ (the default)
+# or SERIALIZEBLE, InnoDB takes "next-key locks"/"gap locks". This means it
# locks the gap before the keys that it accessed to find the rows to
# use for a statement. In this case we have to expect some more lock
-# wait timeouts in the tests below as if innodb_locks_unsafe_for_binlog
-# is set (non-zero). In the latter case no "next-key locks"/"gap locks"
-# are taken and locks on keys that do not match the WHERE conditon are
-# released. Hence less lock collisions occur.
+# wait timeouts in the tests, compared to READ UNCOMMITTED or READ COMMITTED.
+# For READ UNCOMMITTED or READ COMMITTED, no "next-key locks"/"gap locks"
+# are taken and locks on keys that do not match the WHERE condition are
+# released. Hence fewer lock collisions occur.
# We use the variable $keep_locks to set the expectations for
# lock wait timeouts accordingly.
#
-let $keep_locks= `SELECT NOT @@global.innodb_locks_unsafe_for_binlog`;
+let $keep_locks= `SELECT @@global.tx_isolation IN ('REPEATABLE-READ','SERIALIZABLE')`;
--echo # keep_locks == $keep_locks
#
@@ -52,14 +51,6 @@ let $keep_locks= `SELECT NOT @@global.innodb_locks_unsafe_for_binlog`;
#
GRANT USAGE ON test.* TO mysqltest@localhost;
-#
-# Preparatory cleanup.
-#
---disable_warnings
-drop table if exists t1;
---enable_warnings
-
-
--echo
--echo **
--echo ** two UPDATE's running and both changing distinct result sets
@@ -67,7 +58,7 @@ drop table if exists t1;
connect (thread1, localhost, mysqltest,,);
connection thread1;
--echo ** Set up table
- eval SET SESSION STORAGE_ENGINE = $engine_type;
+ eval SET SESSION DEFAULT_STORAGE_ENGINE = $engine_type;
create table t1(eta int(11) not null, tipo int(11), c varchar(255));
insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
@@ -99,7 +90,7 @@ drop table if exists t1;
--echo ** Update on t1 will cause a table scan which will be blocked because
--echo ** the previously initiated table scan applied exclusive key locks on
--echo ** all primary keys.
- --echo ** Not so if innodb_locks_unsafe_for_binlog is set. The locks that
+ --echo ** Not so for READ UNCOMMITTED or READ COMMITTED. The locks that
--echo ** do not match the WHERE condition are released.
if ($keep_locks)
{
@@ -157,7 +148,7 @@ drop table t1;
#connect (thread1, localhost, mysqltest,,);
connection thread1;
--echo ** Set up table
- eval SET SESSION STORAGE_ENGINE = $engine_type;
+ eval SET SESSION DEFAULT_STORAGE_ENGINE = $engine_type;
create table t1(eta int(11) not null, tipo int(11), c varchar(255));
insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
@@ -190,7 +181,7 @@ drop table t1;
--echo ** Update on t1 will cause a table scan which will be blocked because
--echo ** the previously initiated table scan applied exclusive key locks on
--echo ** all primary keys.
- --echo ** Not so if innodb_locks_unsafe_for_binlog is set. The locks that
+ --echo ** Not so for READ UNCOMMITTED or READ COMMITTED. The locks that
--echo ** do not match the WHERE condition are released.
if ($keep_locks)
{
@@ -246,7 +237,7 @@ drop table t1;
#connect (thread1, localhost, mysqltest,,);
connection thread1;
--echo ** Set up table
- eval SET SESSION STORAGE_ENGINE = $engine_type;
+ eval SET SESSION DEFAULT_STORAGE_ENGINE = $engine_type;
create table t1 (a int not null, b int not null);
insert into t1 values (1,1),(2,1),(3,1),(4,1);
--echo ** Create ULL 'hello2'
@@ -296,7 +287,7 @@ drop table t1;
#connect (thread1, localhost, mysqltest,,);
connection thread1;
--echo ** Set up table
- eval SET SESSION STORAGE_ENGINE = $engine_type;
+ eval SET SESSION DEFAULT_STORAGE_ENGINE = $engine_type;
create table t1(eta int(11) not null, tipo int(11), c varchar(255));
insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
@@ -358,7 +349,7 @@ drop table t1;
#connect (thread1, localhost, mysqltest,,);
connection thread1;
--echo ** Set up table
- eval SET SESSION STORAGE_ENGINE = $engine_type;
+ eval SET SESSION DEFAULT_STORAGE_ENGINE = $engine_type;
create table t1(eta int(11) not null, tipo int(11), c varchar(255));
insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
@@ -386,7 +377,7 @@ drop table t1;
--echo ** Updating single row using a table scan. This will time out
--echo ** because of ongoing transaction on thread 1 holding lock on
--echo ** all primary keys in the scan.
- --echo ** Not so if innodb_locks_unsafe_for_binlog is set. The locks that
+ --echo ** Not so for READ UNCOMMITTED or READ COMMITTED. The locks that
--echo ** do not match the WHERE condition are released.
if ($keep_locks)
{
@@ -429,7 +420,7 @@ drop table t1;
#connect (thread1, localhost, mysqltest,,);
connection thread1;
--echo ** Set up table
- eval SET SESSION STORAGE_ENGINE = $engine_type;
+ eval SET SESSION DEFAULT_STORAGE_ENGINE = $engine_type;
create table t1(eta int(11) not null, tipo int(11), c varchar(255));
insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
@@ -487,7 +478,7 @@ drop table t1;
#connect (thread1, localhost, mysqltest,,);
connection thread1;
--echo ** Set up table
- eval SET SESSION STORAGE_ENGINE = $engine_type;
+ eval SET SESSION DEFAULT_STORAGE_ENGINE = $engine_type;
create table t1(eta int(11) not null, tipo int(11), c varchar(255));
insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
@@ -542,7 +533,7 @@ drop table t1;
#connect (thread1, localhost, mysqltest,,);
connection thread1;
--echo ** Set up table
- eval SET SESSION STORAGE_ENGINE = $engine_type;
+ eval SET SESSION DEFAULT_STORAGE_ENGINE = $engine_type;
create table t1(eta int(11) not null, tipo int(11), c varchar(255));
insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
@@ -570,7 +561,7 @@ drop table t1;
--echo ** Update on t1 will cause a table scan which will be blocked because
--echo ** the previously initiated table scan applied exclusive key locks on
--echo ** all primary keys.
- --echo ** Not so if innodb_locks_unsafe_for_binlog is set. The locks that
+ --echo ** Not so for READ UNCOMMITTED or READ COMMITTED. The locks that
--echo ** do not match the WHERE condition are released.
if ($keep_locks)
{
@@ -598,13 +589,8 @@ drop table t1;
connection thread1;
select * from t1;
---echo ** Cleanup
-connection thread1;
disconnect thread1;
---source include/wait_until_disconnected.inc
-connection thread2;
disconnect thread2;
---source include/wait_until_disconnected.inc
connection default;
drop table t1;
drop user mysqltest@localhost;
diff --git a/mysql-test/include/ctype_common.inc b/mysql-test/include/ctype_common.inc
index a39c25f2cc8..2b407fcb31a 100644
--- a/mysql-test/include/ctype_common.inc
+++ b/mysql-test/include/ctype_common.inc
@@ -8,7 +8,7 @@
# use SHOW FULL COLUMNS instead.
#
# Please surround all CREATE TABLE with --disable_warnings
-# and --enable_warnings to be able to set storage_engine
+# and --enable_warnings to be able to set default_storage_engine
# without having to check if the hanlder exists.
SET @safe_character_set_server= @@character_set_server;
diff --git a/mysql-test/include/ctype_heap.inc b/mysql-test/include/ctype_heap.inc
index eafd37e104a..061ed439483 100644
--- a/mysql-test/include/ctype_heap.inc
+++ b/mysql-test/include/ctype_heap.inc
@@ -1,5 +1,5 @@
--echo #
---echo # Test that cs->coll->hash_sort() ignores trailing spaces
+--echo # Test that hash_sort() ignores trailing spaces
--echo #
SELECT @@collation_connection;
CREATE TABLE t1 ENGINE=HEAP AS SELECT REPEAT (' ', 10) AS a LIMIT 0;
diff --git a/mysql-test/include/ctype_ident_sys.inc b/mysql-test/include/ctype_ident_sys.inc
new file mode 100644
index 00000000000..80ac962f031
--- /dev/null
+++ b/mysql-test/include/ctype_ident_sys.inc
@@ -0,0 +1,73 @@
+--echo #
+--echo # SET STATEMENT (bad|good.bad|bad.good)=1
+--echo #
+
+--error ER_INVALID_CHARACTER_STRING
+EXECUTE IMMEDIATE CONCAT('SET STATEMENT ',@seq, '=1 SELECT 1');
+
+--error ER_INVALID_CHARACTER_STRING
+EXECUTE IMMEDIATE CONCAT('SET STATEMENT ',@seq, '.a=1 SELECT 1');
+
+--error ER_INVALID_CHARACTER_STRING
+EXECUTE IMMEDIATE CONCAT('SET STATEMENT a.',@seq, '=1 SELECT 1');
+
+
+--echo #
+--echo # SET SESSION (bad|good.bad|bad.good)=1
+--echo #
+
+--error ER_INVALID_CHARACTER_STRING
+EXECUTE IMMEDIATE CONCAT('SET SESSION ',@seq, '=1 SELECT 1');
+
+--error ER_INVALID_CHARACTER_STRING
+EXECUTE IMMEDIATE CONCAT('SET SESSION ',@seq, '.a=1 SELECT 1');
+
+--error ER_INVALID_CHARACTER_STRING
+EXECUTE IMMEDIATE CONCAT('SET SESSION a.',@seq, '=1 SELECT 1');
+
+
+--echo #
+--echo # SET (bad|good.bad|bad.good)=1
+--echo #
+
+
+--error ER_INVALID_CHARACTER_STRING
+EXECUTE IMMEDIATE CONCAT('SET ', @seq, '=1');
+
+--error ER_INVALID_CHARACTER_STRING
+EXECUTE IMMEDIATE CONCAT('SET ', @seq, '.a=1');
+
+--error ER_INVALID_CHARACTER_STRING
+EXECUTE IMMEDIATE CONCAT('SET a.', @seq, '=1');
+
+
+--echo #
+--echo # Oracle SP call: BEGIN (bad|good.bad|bad.good)(params); END
+--echo #
+
+SET sql_mode=ORACLE;
+--error ER_INVALID_CHARACTER_STRING
+EXECUTE IMMEDIATE CONCAT('BEGIN ',@seq, '(1); END;');
+
+--error ER_INVALID_CHARACTER_STRING
+EXECUTE IMMEDIATE CONCAT('BEGIN ',@seq, '.a(1); END;');
+
+--error ER_INVALID_CHARACTER_STRING
+EXECUTE IMMEDIATE CONCAT('BEGIN a.',@seq, '(1); END;');
+
+
+--echo #
+--echo # Oracle assignment: (bad|good.bad|bad.good):= value
+--echo #
+
+--error ER_INVALID_CHARACTER_STRING
+EXECUTE IMMEDIATE CONCAT(@seq, ':=1');
+
+--error ER_INVALID_CHARACTER_STRING
+EXECUTE IMMEDIATE CONCAT(@seq, '.a:=1');
+
+--error ER_INVALID_CHARACTER_STRING
+EXECUTE IMMEDIATE CONCAT('a.', @seq, ':=1');
+
+
+SET sql_mode=DEFAULT;
diff --git a/mysql-test/include/ctype_pad_all_engines.inc b/mysql-test/include/ctype_pad_all_engines.inc
index 29371676a19..a031f84e74b 100644
--- a/mysql-test/include/ctype_pad_all_engines.inc
+++ b/mysql-test/include/ctype_pad_all_engines.inc
@@ -1,7 +1,7 @@
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
--source include/ctype_pad.inc
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
--source include/ctype_pad.inc
-SET STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=Default;
diff --git a/mysql-test/include/ctype_strtoll10.inc b/mysql-test/include/ctype_strtoll10.inc
index 8bb2d29f86a..725180d6a24 100644
--- a/mysql-test/include/ctype_strtoll10.inc
+++ b/mysql-test/include/ctype_strtoll10.inc
@@ -1,5 +1,5 @@
--echo #
---echo # Testing cs->cset->strtoll10()
+--echo # Testing strtoll10()
--echo #
SELECT @@character_set_connection;
diff --git a/mysql-test/include/deadlock.inc b/mysql-test/include/deadlock.inc
index 7ac2a16fc44..b5ffd5f1cb5 100644
--- a/mysql-test/include/deadlock.inc
+++ b/mysql-test/include/deadlock.inc
@@ -132,7 +132,7 @@ drop table t1, t2;
# Bug#25164 create table `a` as select * from `A` hangs
#
-set storage_engine=innodb;
+set default_storage_engine=innodb;
--disable_warnings
drop table if exists a;
@@ -149,6 +149,6 @@ drop table A;
drop table if exists a;
--enable_warnings
-set storage_engine=default;
+set default_storage_engine=default;
--echo End of 5.0 tests.
diff --git a/mysql-test/include/default_client.cnf b/mysql-test/include/default_client.cnf
index e326b308f5f..1dda4b5b139 100644
--- a/mysql-test/include/default_client.cnf
+++ b/mysql-test/include/default_client.cnf
@@ -3,9 +3,6 @@
# when running tests - not to depend on the current machine localization.
#
-[client]
-plugin-dir=@mysqld.1.plugin-dir
-
[mysql]
default-character-set=latin1
diff --git a/mysql-test/include/default_mysqld.cnf b/mysql-test/include/default_mysqld.cnf
index 387a144bacb..cccf72591cc 100644
--- a/mysql-test/include/default_mysqld.cnf
+++ b/mysql-test/include/default_mysqld.cnf
@@ -1,5 +1,5 @@
# Copyright (c) 2007, 2013, Oracle and/or its affiliates
-# Copyright (c) 2010, 2013, Monty Program Ab
+# Copyright (c) 2010, 2019, MariaDB Corporation
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -53,8 +53,7 @@ loose-innodb_lru_scan_depth= 100
loose-innodb_write_io_threads= 2
loose-innodb_read_io_threads= 2
loose-innodb_log_buffer_size= 1M
-loose-innodb_log_file_size= 5M
-loose-innodb_log_files_in_group= 2
+loose-innodb_log_file_size= 10M
loose-innodb-stats-persistent= OFF
slave-net-timeout=120
@@ -77,7 +76,13 @@ loose-performance-schema-max-cond-instances=1000
loose-performance-schema-max-file-instances=10000
loose-performance-schema-max-socket-instances=1000
loose-performance-schema-max-table-instances=500
+loose-performance-schema-max-table-lock-stat=500
+loose-performance-schema-max-index-stat=5000
loose-performance-schema-max-table-handles=1000
+loose-performance-schema-max-prepared-statements-instances=100
+loose-performance-schema-max-program-instances=5000
+loose-performance-schema-setup-actors-size=100
+loose-performance-schema-setup-objects-size=100
loose-performance-schema-events-waits-history-size=10
loose-performance-schema-events-waits-history-long-size=10000
@@ -85,8 +90,11 @@ loose-performance-schema-events-stages-history-size=10
loose-performance-schema-events-stages-history-long-size=1000
loose-performance-schema-events-statements-history-size=10
loose-performance-schema-events-statements-history-long-size=1000
+loose-performance-schema-events-transactions-history-size=10
+loose-performance-schema-events-transactions-history-long-size=1000
loose-performance-schema-max-thread-instances=200
loose-performance-schema-session-connect-attrs-size=2048
+loose-performance-schema-max-metadata-locks=10000
# Enable everything, for maximun code exposure during testing
@@ -98,6 +106,9 @@ loose-performance-schema-consumer-events-stages-history-long=ON
loose-performance-schema-consumer-events-statements-current=ON
loose-performance-schema-consumer-events-statements-history=ON
loose-performance-schema-consumer-events-statements-history-long=ON
+loose-performance-schema-consumer-events-transactions-current=ON
+loose-performance-schema-consumer-events-transactions-history=ON
+loose-performance-schema-consumer-events-transactions-history-long=ON
loose-performance-schema-consumer-events-waits-current=ON
loose-performance-schema-consumer-events-waits-history=ON
loose-performance-schema-consumer-events-waits-history-long=ON
diff --git a/mysql-test/include/function_defaults.inc b/mysql-test/include/function_defaults.inc
index 23822aa24dc..6e4fa10a65b 100644
--- a/mysql-test/include/function_defaults.inc
+++ b/mysql-test/include/function_defaults.inc
@@ -1,7 +1,7 @@
SET TIME_ZONE = "+00:00";
--echo #
---echo # Test of errors for column data types that dont support function
+--echo # Test of errors for column data types that don't support function
--echo # defaults.
--echo #
diff --git a/mysql-test/include/galera_cluster.inc b/mysql-test/include/galera_cluster.inc
index 7f76ea59c7f..48b5bc631db 100644
--- a/mysql-test/include/galera_cluster.inc
+++ b/mysql-test/include/galera_cluster.inc
@@ -3,16 +3,29 @@
#
# Description
# -----------
-# Configure galera cluster with 2 nodes.
+# Configure galera cluster with $galera_cluster_size (default: 2) nodes.
#
---let $galera_cluster_size = 2
+if (!$galera_cluster_size)
+{
+# --die ERROR IN TEST: $galera_cluster_size variable must be set
+ --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
+
+--let $_galera_node= $galera_cluster_size
+
+while ($_galera_node != 1)
+{
+ --connection node_$_galera_node
+ --source include/galera_wait_ready.inc
+ --source include/have_innodb.inc
+
+ --dec $_galera_node
+}
--connection node_1
diff --git a/mysql-test/include/galera_variables_ok.inc b/mysql-test/include/galera_variables_ok.inc
index 82c5174bc14..c9a54724c17 100644
--- a/mysql-test/include/galera_variables_ok.inc
+++ b/mysql-test/include/galera_variables_ok.inc
@@ -1,6 +1,6 @@
--disable_query_log
---let $galera_variables_ok = `SELECT COUNT(*) = 49 FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME LIKE 'wsrep%'`
+--let $galera_variables_ok = `SELECT COUNT(*) = 50 FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME LIKE 'wsrep%'`
--if (!$galera_variables_ok) {
--skip Galera number of variables has changed!
diff --git a/mysql-test/include/galera_variables_ok_debug.inc b/mysql-test/include/galera_variables_ok_debug.inc
index c9a54724c17..e420b3af6c3 100644
--- a/mysql-test/include/galera_variables_ok_debug.inc
+++ b/mysql-test/include/galera_variables_ok_debug.inc
@@ -1,6 +1,6 @@
--disable_query_log
---let $galera_variables_ok = `SELECT COUNT(*) = 50 FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME LIKE 'wsrep%'`
+--let $galera_variables_ok = `SELECT COUNT(*) = 51 FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME LIKE 'wsrep%'`
--if (!$galera_variables_ok) {
--skip Galera number of variables has changed!
diff --git a/mysql-test/include/have_dbi_dbd-mysql.inc b/mysql-test/include/have_dbi_dbd-mariadb.inc
index 7c2113a8109..1495d2891c8 100644
--- a/mysql-test/include/have_dbi_dbd-mysql.inc
+++ b/mysql-test/include/have_dbi_dbd-mariadb.inc
@@ -1,7 +1,7 @@
#
# Originally created by John Embretsen, 2011-01-26.
#
-# Checks for the existence of Perl modules DBI and DBD::mysql as seen from the
+# Checks for the existence of Perl modules DBI and DBD::MariaDB as seen from the
# perl installation used by "external" executable perl scripts, i.e. scripts
# that are executed as standalone scripts interpreted by the perl installation
# specified by the "shebang" line in the top of these scripts.
@@ -30,7 +30,7 @@
# We jump through some hoops since there is no direct way to check if an
# external command went OK or not from a mysql-test file:
#
-# - In theory, we could do as simple as "exec perl -MDBI -MDBD::mysql -e 1",
+# - In theory, we could do as simple as "exec perl -MDBI -MDBD::MariaDB -e 1",
# however we cannot check the result (exit code) from within a test script.
# Also, this may not yield the same result as other uses of perl due to the
# shebang issue mentioned above.
@@ -55,8 +55,8 @@
# Instead, we call a separate helper script which checks for the modules in its
# own environment. We call it without "perl" in front.
---let $perlChecker= $MYSQLTEST_VARDIR/std_data/checkDBI_DBD-mysql.pl
---let $resultFile= $MYSQL_TMP_DIR/dbidbd-mysql.txt
+--let $perlChecker= $MYSQLTEST_VARDIR/std_data/checkDBI_DBD-MariaDB.pl
+--let $resultFile= $MYSQL_TMP_DIR/dbiDBD-MariaDB.txt
--exec perl $perlChecker
@@ -64,7 +64,7 @@
--source $resultFile
if (!$dbidbd) {
- --skip Test needs Perl modules DBI and DBD::mysql
+ --skip Test needs Perl modules DBI and DBD::MariaDB
}
# Clean up
diff --git a/mysql-test/include/have_pool_of_threads.inc b/mysql-test/include/have_pool_of_threads.inc
index 432c6216804..62460127d88 100644
--- a/mysql-test/include/have_pool_of_threads.inc
+++ b/mysql-test/include/have_pool_of_threads.inc
@@ -1,4 +1,5 @@
--- require include/have_pool_of_threads.require
+--source include/not_aix.inc
+--require include/have_pool_of_threads.require
disable_query_log;
show variables like 'thread_handling';
enable_query_log;
diff --git a/mysql-test/include/have_s3.inc b/mysql-test/include/have_s3.inc
new file mode 100644
index 00000000000..d81778cd157
--- /dev/null
+++ b/mysql-test/include/have_s3.inc
@@ -0,0 +1,10 @@
+if (!`SELECT count(*) FROM information_schema.engines WHERE
+ (support = 'YES' OR support = 'DEFAULT') AND
+ engine = 's3'`)
+{
+ skip Need s3 engine;
+}
+if (`select @@global.s3_secret_key = "" or @@global.s3_access_key = ""`)
+{
+ skip S3 engine not configured;
+}
diff --git a/mysql-test/include/have_type_mysql_json.inc b/mysql-test/include/have_type_mysql_json.inc
new file mode 100644
index 00000000000..bea1f52cb61
--- /dev/null
+++ b/mysql-test/include/have_type_mysql_json.inc
@@ -0,0 +1,3 @@
+if (!$TYPE_MYSQL_JSON_SO) {
+ skip Need MYSQL_JSON plugin;
+}
diff --git a/mysql-test/include/have_type_mysql_json.opt b/mysql-test/include/have_type_mysql_json.opt
new file mode 100644
index 00000000000..0676b7832cf
--- /dev/null
+++ b/mysql-test/include/have_type_mysql_json.opt
@@ -0,0 +1,2 @@
+--loose-type_mysql_json
+--plugin-load-add=$TYPE_MYSQL_JSON_SO
diff --git a/mysql-test/include/icp_tests.inc b/mysql-test/include/icp_tests.inc
index 66fdc3e754c..d78fe0dd209 100644
--- a/mysql-test/include/icp_tests.inc
+++ b/mysql-test/include/icp_tests.inc
@@ -1,3 +1,5 @@
+--source include/have_sequence.inc
+
--echo #
--echo # Bug#36981 - "innodb crash when selecting for update"
--echo #
@@ -459,6 +461,7 @@ INSERT INTO t2 VALUES (15,4);
set @save_optimizer_switch= @@optimizer_switch;
set optimizer_switch='semijoin=off';
+--replace_column 9 #
EXPLAIN
SELECT * FROM t1
WHERE pk IN (SELECT it.pk FROM t2 JOIN t2 AS it ON it.i=it.i WHERE it.pk-t1.i<10);
@@ -720,12 +723,15 @@ DROP TABLE t1;
CREATE TABLE t1 (b int NOT NULL, c int, a varchar(1024), PRIMARY KEY (b));
INSERT INTO t1 VALUES (1,4,'Ill');
+insert into t1 select seq+100,5,seq from seq_1_to_100;
CREATE TABLE t2 (a varchar(1024), KEY (a(512)));
INSERT INTO t2 VALUES
('Ill'), ('eckqzsflbzaffti'), ('w'), ('she'), ('gxbwypqtjzwywwer'), ('w');
+insert into t2 select seq from seq_1_to_100;
SET SESSION optimizer_switch='index_condition_pushdown=off';
+--replace_column 9 #
EXPLAIN
SELECT t1.b, t1.c FROM t1, t2 WHERE t1.a = t2.a AND (t1.b<0 OR t1.b>0)
HAVING t1.c != 5 ORDER BY t1.c;
@@ -733,6 +739,7 @@ SELECT t1.b, t1.c FROM t1, t2 WHERE t1.a = t2.a AND (t1.b<0 OR t1.b>0)
HAVING t1.c != 5 ORDER BY t1.c;
SET SESSION optimizer_switch='index_condition_pushdown=on';
+--replace_column 9 #
EXPLAIN
SELECT t1.b, t1.c FROM t1, t2 WHERE t1.a = t2.a AND (t1.b<0 OR t1.b>0)
HAVING t1.c != 5 ORDER BY t1.c;
diff --git a/mysql-test/include/index_merge1.inc b/mysql-test/include/index_merge1.inc
index 5364780b689..a1366af2c28 100644
--- a/mysql-test/include/index_merge1.inc
+++ b/mysql-test/include/index_merge1.inc
@@ -182,7 +182,7 @@ alter table t2 add index i321(key3, key2, key1);
explain select key3 from t2 where key1 = 100 or key2 = 100;
# index_merge vs 'index', 'index' is better.
-explain select key3 from t2 where key1 < 500 or key2 < 500;
+explain select key3 from t2 where key1 < 600 or key2 < 600;
# index_merge vs 'all', index_merge is better.
explain select key7 from t2 where key1 <100 or key2 < 100;
@@ -374,7 +374,7 @@ drop table t1;
if ($merge_table_support)
{
#
-# BUG#17314: Index_merge/intersection not choosen by the optimizer for MERGE tables
+# BUG#17314: Index_merge/intersection not chosen by the optimizer for MERGE tables
#
create table t1 (
a int, b int,
diff --git a/mysql-test/include/innodb_checksum_algorithm.combinations b/mysql-test/include/innodb_checksum_algorithm.combinations
index fd237e1190a..039bfaef676 100644
--- a/mysql-test/include/innodb_checksum_algorithm.combinations
+++ b/mysql-test/include/innodb_checksum_algorithm.combinations
@@ -3,9 +3,11 @@
[strict_crc32]
--innodb-checksum-algorithm=strict_crc32
+--innodb-flush-sync=OFF
[full_crc32]
--innodb-checksum-algorithm=full_crc32
[strict_full_crc32]
--innodb-checksum-algorithm=strict_full_crc32
+--innodb-flush-sync=OFF
diff --git a/mysql-test/include/kill_and_restart_mysqld.inc b/mysql-test/include/kill_and_restart_mysqld.inc
new file mode 100644
index 00000000000..b67fb7350b4
--- /dev/null
+++ b/mysql-test/include/kill_and_restart_mysqld.inc
@@ -0,0 +1,15 @@
+if (!$restart_parameters)
+{
+ let $restart_parameters = restart;
+}
+
+--let $_server_id= `SELECT @@server_id`
+--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.$_server_id.expect
+
+--echo # Kill and $restart_parameters
+--exec echo "$restart_parameters" > $_expect_file_name
+--shutdown_server 0
+--source include/wait_until_disconnected.inc
+--enable_reconnect
+--source include/wait_until_connected_again.inc
+--disable_reconnect
diff --git a/mysql-test/include/load_dump_and_upgrade.inc b/mysql-test/include/load_dump_and_upgrade.inc
new file mode 100644
index 00000000000..52351ea473c
--- /dev/null
+++ b/mysql-test/include/load_dump_and_upgrade.inc
@@ -0,0 +1,49 @@
+--source include/have_innodb.inc
+
+# ==== Usage ====
+#
+# [--let $old_version= 10.2]
+# --source include/load_dump_and_upgrade.inc
+
+# Dumps stored in std_data as mysql_database_<old_version>.dump
+# were pre-created by running mysqldump for `mysql` database
+# on a freshly boostrapped instance of the corresponding version.
+# On 10.4 the local root was additionally given an empty password,
+# to avoid using unix_socket.
+
+# Backup the existing mysql schema, to restore it later
+--exec $MYSQL_DUMP mysql > $MYSQL_TMP_DIR/mysql_database_backup
+
+--echo #
+--echo # Upgrade from version $old_version
+--echo #
+
+# Workaround for MDEV-22127 (can't import database dump created before 10.4)
+# The most universal workaround suggested in the item is running
+# DROP TABLE IF EXISTS `mysql`.`global_priv`;
+# DROP VIEW IF EXISTS `mysql`.`user`;
+# before the upgrade. For this test, it is better than creating the dumps
+# with --add-drop-database, because
+# a) it won't require re-creating the dump when the bug is fixed;
+# b) it won't hide possible unrelated problems;
+# c) add-drop-database doesn't work with logging into tables enabled (MDEV-4875 and more)
+
+--exec $MYSQL -e "DROP TABLE IF EXISTS mysql.global_priv; DROP VIEW IF EXISTS mysql.user"
+
+--echo # Loading dump of $old_version mysql schema
+--exec $MYSQL mysql < $MYSQLTEST_VARDIR/std_data/mysql_database_$old_version.dump
+
+--echo # Running mysql_upgrade
+--exec $MYSQL_UPGRADE --verbose > $MYSQL_TMP_DIR/upgrade.log
+
+--echo # Checking that mysql.user is accessible and returns some data
+SELECT COUNT(*) > 0 AS `mysql.user has data` FROM mysql.user;
+
+# Restore the backup of mysql schema
+--exec $MYSQL mysql < $MYSQL_TMP_DIR/mysql_database_backup
+
+--let $ddir= `select @@datadir`
+
+# It will fail if the file doesn't exist, which is good,
+# which is an extra check that it was written
+--remove_file $ddir/mysql_upgrade_info
diff --git a/mysql-test/include/loaddata_autocom.inc b/mysql-test/include/loaddata_autocom.inc
index 7b0c67d2ca8..8c38965f1c0 100644
--- a/mysql-test/include/loaddata_autocom.inc
+++ b/mysql-test/include/loaddata_autocom.inc
@@ -1,6 +1,6 @@
# Test if the engine does autocommit in LOAD DATA INFILE, or not
-eval SET SESSION STORAGE_ENGINE = $engine_type;
+eval SET SESSION DEFAULT_STORAGE_ENGINE = $engine_type;
--disable_warnings
drop table if exists t1;
diff --git a/mysql-test/include/maybe_pool_of_threads.combinations b/mysql-test/include/maybe_pool_of_threads.combinations
new file mode 100644
index 00000000000..29d3d7f4871
--- /dev/null
+++ b/mysql-test/include/maybe_pool_of_threads.combinations
@@ -0,0 +1,5 @@
+[pot]
+thread_handling=pool-of-threads
+
+[1tpc]
+thread_handling=one-thread-per-connection
diff --git a/mysql-test/include/maybe_pool_of_threads.inc b/mysql-test/include/maybe_pool_of_threads.inc
new file mode 100644
index 00000000000..d25e3864333
--- /dev/null
+++ b/mysql-test/include/maybe_pool_of_threads.inc
@@ -0,0 +1,2 @@
+# run with and without threadpool
+--source include/not_aix.inc
diff --git a/mysql-test/include/mix1.inc b/mysql-test/include/mix1.inc
index 30b17c2e063..2ec0868c39e 100644
--- a/mysql-test/include/mix1.inc
+++ b/mysql-test/include/mix1.inc
@@ -1183,10 +1183,6 @@ set @my_innodb_autoextend_increment=@@global.innodb_autoextend_increment;
set global innodb_autoextend_increment=8;
set global innodb_autoextend_increment=@my_innodb_autoextend_increment;
-set @my_innodb_commit_concurrency=@@global.innodb_commit_concurrency;
-set global innodb_commit_concurrency=0;
-set global innodb_commit_concurrency=@my_innodb_commit_concurrency;
-
#
# Bug #37830: ORDER BY ASC/DESC - no difference
#
diff --git a/mysql-test/include/mix2.inc b/mysql-test/include/mix2.inc
index ed06e436ead..8e72e7ad2f6 100644
--- a/mysql-test/include/mix2.inc
+++ b/mysql-test/include/mix2.inc
@@ -55,7 +55,7 @@
# Set the SESSION DEFAULT STORAGE ENGINE to a value <> storage engine
# to be tested. This must not affect any CREATE TABLE statement, where
# the storage engine is assigned explicitly,
-eval SET SESSION STORAGE_ENGINE = $other_engine_type;
+eval SET SESSION DEFAULT_STORAGE_ENGINE = $other_engine_type;
#
# Small basic test with ignore
@@ -1457,8 +1457,8 @@ show variables like "innodb_thread_sleep_delay";
# Test varchar
#
-let $default=`select @@storage_engine`;
-eval set storage_engine=$engine_type;
+let $default=`select @@default_storage_engine`;
+eval set default_storage_engine=$engine_type;
source include/varchar.inc;
#
@@ -1479,7 +1479,7 @@ create table t1 (v varchar(65530) character set utf8);
show create table t1;
drop table t1;
-eval set storage_engine=$default;
+eval set default_storage_engine=$default;
# InnoDB specific varchar tests
eval create table t1 (v varchar(16384)) engine=$engine_type;
@@ -2272,25 +2272,25 @@ drop table t1, t2, t3;
# 3) CREATE ... SELECT
connect (a,localhost,root,,);
-eval SET SESSION STORAGE_ENGINE = $engine_type;
+eval SET SESSION DEFAULT_STORAGE_ENGINE = $engine_type;
connect (b,localhost,root,,);
-eval SET SESSION STORAGE_ENGINE = $engine_type;
+eval SET SESSION DEFAULT_STORAGE_ENGINE = $engine_type;
connect (c,localhost,root,,);
-eval SET SESSION STORAGE_ENGINE = $engine_type;
+eval SET SESSION DEFAULT_STORAGE_ENGINE = $engine_type;
connect (d,localhost,root,,);
-eval SET SESSION STORAGE_ENGINE = $engine_type;
+eval SET SESSION DEFAULT_STORAGE_ENGINE = $engine_type;
connect (e,localhost,root,,);
-eval SET SESSION STORAGE_ENGINE = $engine_type;
+eval SET SESSION DEFAULT_STORAGE_ENGINE = $engine_type;
connect (f,localhost,root,,);
-eval SET SESSION STORAGE_ENGINE = $engine_type;
+eval SET SESSION DEFAULT_STORAGE_ENGINE = $engine_type;
connect (g,localhost,root,,);
-eval SET SESSION STORAGE_ENGINE = $engine_type;
+eval SET SESSION DEFAULT_STORAGE_ENGINE = $engine_type;
connect (h,localhost,root,,);
-eval SET SESSION STORAGE_ENGINE = $engine_type;
+eval SET SESSION DEFAULT_STORAGE_ENGINE = $engine_type;
connect (i,localhost,root,,);
-eval SET SESSION STORAGE_ENGINE = $engine_type;
+eval SET SESSION DEFAULT_STORAGE_ENGINE = $engine_type;
connect (j,localhost,root,,);
-eval SET SESSION STORAGE_ENGINE = $engine_type;
+eval SET SESSION DEFAULT_STORAGE_ENGINE = $engine_type;
connection a;
create table t1(a int not null, b int, primary key(a));
insert into t1 values (1,2),(5,3),(4,2);
diff --git a/mysql-test/include/mysqlhotcopy.inc b/mysql-test/include/mysqlhotcopy.inc
index 2fc14d599d9..306f0acc208 100644
--- a/mysql-test/include/mysqlhotcopy.inc
+++ b/mysql-test/include/mysqlhotcopy.inc
@@ -4,7 +4,7 @@
--source include/not_windows.inc
--source include/not_embedded.inc
---source include/have_dbi_dbd-mysql.inc
+--source include/have_dbi_dbd-mariadb.inc
if (!$MYSQLHOTCOPY)
{
@@ -19,7 +19,7 @@ if (!$MYSQLHOTCOPY)
# executable, i.e. not necessarily using the perl interpreter in PATH,
# because that is how the documentation demonstrates it.
#
-# We include have_dbi_dbd-mysql.inc above so that the test will
+# We include have_dbi_dbd-mariadb.inc above so that the test will
# be skipped if Perl modules required by the mysqlhotcopy tool are not
# found when the script is run this way.
diff --git a/mysql-test/include/not_threadpool.inc b/mysql-test/include/not_threadpool.inc
index a49c8cfcc32..98e1f7d2535 100644
--- a/mysql-test/include/not_threadpool.inc
+++ b/mysql-test/include/not_threadpool.inc
@@ -1,5 +1,4 @@
if (`SELECT count(*) FROM information_schema.GLOBAL_VARIABLES WHERE
- VARIABLE_NAME = 'THREAD_HANDLING' AND
- VARIABLE_VALUE = 'loaded-dynamically'`){
+ VARIABLE_NAME = 'THREAD_HANDLING' AND VARIABLE_VALUE = 'pool-of-threads'`){
skip Test requires: 'not_threadpool';
}
diff --git a/mysql-test/include/not_windows.inc b/mysql-test/include/not_windows.inc
index 08373095438..035486025f2 100644
--- a/mysql-test/include/not_windows.inc
+++ b/mysql-test/include/not_windows.inc
@@ -1,4 +1,4 @@
#
# suite.pm will make sure that all tests including this file
-# will be skipped unless this is on Windows
+# will be skipped if run under Windows
#
diff --git a/mysql-test/include/partition_mrr.inc b/mysql-test/include/partition_mrr.inc
index f372cccfdd2..188bc50147f 100644
--- a/mysql-test/include/partition_mrr.inc
+++ b/mysql-test/include/partition_mrr.inc
@@ -10,8 +10,8 @@ drop table if exists t1,t3;
create table t1(a int);
insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
-set @tmp=@@storage_engine;
-eval set storage_engine=$engine_type;
+set @tmp=@@default_storage_engine;
+eval set default_storage_engine=$engine_type;
create table t3 (
ID bigint(20) NOT NULL AUTO_INCREMENT,
@@ -27,7 +27,7 @@ create table t3 (
);
show create table t3;
-set storage_engine= @tmp;
+set default_storage_engine= @tmp;
insert into t3 select
A.a+10*B.a,
diff --git a/mysql-test/include/percona_nonflushing_analyze_debug.inc b/mysql-test/include/percona_nonflushing_analyze_debug.inc
new file mode 100644
index 00000000000..95621c70d5c
--- /dev/null
+++ b/mysql-test/include/percona_nonflushing_analyze_debug.inc
@@ -0,0 +1,35 @@
+#
+# Test ANALYZE TABLE that does not flush table definition cache
+# Arguments:
+# $percona_nonflushing_analyze_table - table to test
+#
+
+--source include/count_sessions.inc
+
+--connect con1,localhost,root
+
+SET DEBUG_SYNC="handler_ha_index_next_end SIGNAL idx_scan_in_progress WAIT_FOR finish_scan";
+
+send_eval SELECT * FROM $percona_nonflushing_analyze_table;
+
+--connection default
+
+SET DEBUG_SYNC="now WAIT_FOR idx_scan_in_progress";
+
+set @tmp=@@use_stat_tables;
+set use_stat_tables='preferably_for_queries';
+eval ANALYZE TABLE $percona_nonflushing_analyze_table;
+
+set use_stat_tables=@tmp;
+# With the bug fixed this should not block
+eval SELECT * FROM $percona_nonflushing_analyze_table;
+
+SET DEBUG_SYNC="now SIGNAL finish_scan";
+
+--connection con1
+reap;
+--disconnect con1
+--connection default
+SET DEBUG_SYNC='reset';
+
+--source include/wait_until_count_sessions.inc
diff --git a/mysql-test/include/ps_conv.inc b/mysql-test/include/ps_conv.inc
index d31f41ef39d..fd69741773f 100644
--- a/mysql-test/include/ps_conv.inc
+++ b/mysql-test/include/ps_conv.inc
@@ -157,7 +157,7 @@ select @arg01:= c1, @arg02:= c2, @arg03:= c3, @arg04:= c4,
@arg25:= c25, @arg26:= c26, @arg27:= c27, @arg28:= c28,
@arg29:= c29, @arg30:= c30, @arg31:= c31, @arg32:= c32
from t9 where c1= 1 ;
-# get as much informations about the parameters as possible
+# get as much information about the parameters as possible
--enable_metadata
execute full_info ;
--disable_metadata
@@ -171,7 +171,7 @@ select @arg01:= c1, @arg02:= c2, @arg03:= c3, @arg04:= c4,
@arg25:= c25, @arg26:= c26, @arg27:= c27, @arg28:= c28,
@arg29:= c29, @arg30:= c30, @arg31:= c31, @arg32:= c32
from t9 where c1= 0 ;
-# get as much informations about the parameters as possible
+# get as much information about the parameters as possible
--enable_metadata
execute full_info ;
--disable_metadata
@@ -188,14 +188,14 @@ prepare stmt1 from "select
from t9 where c1= ?" ;
set @my_key= 1 ;
execute stmt1 using @my_key ;
-# get as much informations about the parameters as possible
+# get as much information about the parameters as possible
--enable_metadata
execute full_info ;
--disable_metadata
# now the same procedure with the record containing so many NULLs
set @my_key= 0 ;
execute stmt1 using @my_key ;
-# get as much informations about the parameters as possible
+# get as much information about the parameters as possible
--enable_metadata
execute full_info ;
--disable_metadata
@@ -215,7 +215,7 @@ into @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, @arg07, @arg08,
@arg17, @arg18, @arg19, @arg20, @arg21, @arg22, @arg23, @arg24,
@arg25, @arg26, @arg27, @arg28, @arg29, @arg30, @arg31, @arg32
from t9 where c1= 1 ;
-# get as much informations about the parameters as possible
+# get as much information about the parameters as possible
--enable_metadata
execute full_info ;
--disable_metadata
@@ -228,7 +228,7 @@ into @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, @arg07, @arg08,
@arg17, @arg18, @arg19, @arg20, @arg21, @arg22, @arg23, @arg24,
@arg25, @arg26, @arg27, @arg28, @arg29, @arg30, @arg31, @arg32
from t9 where c1= 0 ;
-# get as much informations about the parameters as possible
+# get as much information about the parameters as possible
--enable_metadata
execute full_info ;
--disable_metadata
@@ -243,7 +243,7 @@ into @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, @arg07, @arg08,
from t9 where c1= ?" ;
set @my_key= 1 ;
execute stmt1 using @my_key ;
-# get as much informations about the parameters as possible
+# get as much information about the parameters as possible
--enable_metadata
execute full_info ;
--disable_metadata
@@ -251,7 +251,7 @@ execute full_info ;
# Bug#5034: prepared "select 1 into @arg15", second execute crashes server
set @my_key= 0 ;
execute stmt1 using @my_key ;
-# get as much informations about the parameters as possible
+# get as much information about the parameters as possible
--enable_metadata
execute full_info ;
--disable_metadata
diff --git a/mysql-test/include/query_cache.inc b/mysql-test/include/query_cache.inc
index fcb9c2494d4..d41bc21b143 100644
--- a/mysql-test/include/query_cache.inc
+++ b/mysql-test/include/query_cache.inc
@@ -17,7 +17,7 @@
SET global query_cache_type=ON;
SET local query_cache_type=ON;
-eval SET SESSION STORAGE_ENGINE = $engine_type;
+eval SET SESSION DEFAULT_STORAGE_ENGINE = $engine_type;
# Initialise
--disable_warnings
@@ -120,7 +120,7 @@ drop table t3,t2,t1;
# Establish connection1
connect (connection1,localhost,root,,);
-eval SET SESSION STORAGE_ENGINE = $engine_type;
+eval SET SESSION DEFAULT_STORAGE_ENGINE = $engine_type;
SET @@autocommit=1;
connection default;
@@ -130,7 +130,7 @@ SHOW VARIABLES LIKE 'have_query_cache';
SET GLOBAL query_cache_size = 204800;
flush status;
SET @@autocommit=1;
-eval SET SESSION STORAGE_ENGINE = $engine_type;
+eval SET SESSION DEFAULT_STORAGE_ENGINE = $engine_type;
eval CREATE TABLE t2 (s1 int, s2 varchar(1000), key(s1))$partitions_s1;
INSERT INTO t2 VALUES (1,repeat('a',10)),(2,repeat('a',10)),(3,repeat('a',10)),(4,repeat('a',10));
COMMIT;
diff --git a/mysql-test/include/query_cache_partitions.inc b/mysql-test/include/query_cache_partitions.inc
index c69356f907d..e06b161e03b 100644
--- a/mysql-test/include/query_cache_partitions.inc
+++ b/mysql-test/include/query_cache_partitions.inc
@@ -6,7 +6,7 @@
SET global query_cache_type=ON;
SET local query_cache_type=ON;
-eval SET SESSION STORAGE_ENGINE = $engine_type;
+eval SET SESSION DEFAULT_STORAGE_ENGINE = $engine_type;
# Initialise
--disable_warnings
diff --git a/mysql-test/include/read_many_rows.inc b/mysql-test/include/read_many_rows.inc
index d40086b01df..7590f48af6c 100644
--- a/mysql-test/include/read_many_rows.inc
+++ b/mysql-test/include/read_many_rows.inc
@@ -19,7 +19,7 @@
# main code t/innodb-big.test --> include/read_many_rows.inc
#
-eval SET SESSION STORAGE_ENGINE = $engine_type;
+eval SET SESSION DEFAULT_STORAGE_ENGINE = $engine_type;
--disable_warnings
DROP TABLE IF EXISTS t1, t2, t3, t4;
diff --git a/mysql-test/include/rowid_order.inc b/mysql-test/include/rowid_order.inc
index b05bad45cde..0dfe48e0b52 100644
--- a/mysql-test/include/rowid_order.inc
+++ b/mysql-test/include/rowid_order.inc
@@ -16,7 +16,7 @@
# main code went into include/rowid_order.inc
#
-eval SET SESSION STORAGE_ENGINE = $engine_type;
+eval SET SESSION DEFAULT_STORAGE_ENGINE = $engine_type;
--disable_warnings
drop table if exists t1, t2, t3,t4;
diff --git a/mysql-test/include/search_pattern_in_file.inc b/mysql-test/include/search_pattern_in_file.inc
index 5e66bbb7db0..a899a9294cc 100644
--- a/mysql-test/include/search_pattern_in_file.inc
+++ b/mysql-test/include/search_pattern_in_file.inc
@@ -9,6 +9,9 @@
#
# The environment variables SEARCH_FILE and SEARCH_PATTERN must be set
# before sourcing this routine.
+# SEARCH_TYPE can also be set to either NULL(default) or _gm_
+# NULL is equivalent of using m/SEARCH_PATTERN/gs
+# _gm_ is equivalent of using m/SEARCH_RANGE/gm
#
# Optionally, SEARCH_RANGE can be set to the max number of bytes of the file
# to search. If negative, it will search that many bytes at the end of the
@@ -77,7 +80,15 @@ perl;
close(FILE);
$content.= $file_content;
}
- my @matches=($content =~ m/$search_pattern/gs);
+ my @matches;
+ if (not defined($ENV{SEARCH_TYPE}))
+ {
+ @matches=($content =~ /$search_pattern/gs);
+ }
+ elsif($ENV{SEARCH_TYPE} == "_gm_")
+ {
+ @matches=($content =~ /$search_pattern/gm);
+ }
my $res=@matches ? "FOUND " . scalar(@matches) : "NOT FOUND";
$ENV{SEARCH_FILE} =~ s{^.*?([^/\\]+)$}{$1};
diff --git a/mysql-test/include/show_events.inc b/mysql-test/include/show_events.inc
index 9ee01f73999..453cde39ed5 100644
--- a/mysql-test/include/show_events.inc
+++ b/mysql-test/include/show_events.inc
@@ -80,6 +80,11 @@ if ($binlog_limit != '')
--let $statement= $statement limit $binlog_limit
}
+if (!$binlog_database)
+{
+ --let $binlog_database="database"
+}
+
# Execute the statement and write to $output_file
--let $output_file= GENERATE
--source include/write_result_to_file.inc
@@ -102,6 +107,7 @@ let $script=
s{((?:master|slave|slave-relay)-bin\.[0-9]{6};pos=)[0-9]+DOLLAR}{DOLLAR1POS};
s{SONAME ".*"}{SONAME "LIB"};
s{DOLLARmysqltest_vardir}{MYSQLTEST_VARDIR}g;
+ s{$binlog_database}{database};
||
--let $pre_script= my DOLLARmysqltest_vardir = DOLLARENV{'MYSQLTEST_VARDIR'};
diff --git a/mysql-test/include/shutdown_mysqld.inc b/mysql-test/include/shutdown_mysqld.inc
index 74a3028946d..db0cfb82c68 100644
--- a/mysql-test/include/shutdown_mysqld.inc
+++ b/mysql-test/include/shutdown_mysqld.inc
@@ -26,7 +26,17 @@ if ($rpl_inited)
--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.$_server_id.expect
--exec echo "wait" > $_expect_file_name
+# Avoid warnings from connection threads that does not have time to exit
+--disable_query_log
+set @@global.log_warnings=0;
+--enable_query_log
+
--let $server_shutdown_timeout= 60
+if ($VALGRIND_TEST)
+{
+ --let $server_shutdown_timeout= 300
+}
+
if ($shutdown_timeout)
{
--let $server_shutdown_timeout= $shutdown_timeout
diff --git a/mysql-test/include/unsafe_binlog.inc b/mysql-test/include/unsafe_binlog.inc
index 2fc2ad77bc9..824ee2a61d7 100644
--- a/mysql-test/include/unsafe_binlog.inc
+++ b/mysql-test/include/unsafe_binlog.inc
@@ -145,15 +145,15 @@ connect (a,localhost,root,,);
connect (b,localhost,root,,);
connect (c,localhost,root,,);
connect (d,localhost,root,,);
-eval SET SESSION STORAGE_ENGINE = $engine_type;
+eval SET SESSION DEFAULT_STORAGE_ENGINE = $engine_type;
connect (e,localhost,root,,);
connect (f,localhost,root,,);
connect (g,localhost,root,,);
-eval SET SESSION STORAGE_ENGINE = $engine_type;
+eval SET SESSION DEFAULT_STORAGE_ENGINE = $engine_type;
connect (h,localhost,root,,);
connect (i,localhost,root,,);
connect (j,localhost,root,,);
-eval SET SESSION STORAGE_ENGINE = $engine_type;
+eval SET SESSION DEFAULT_STORAGE_ENGINE = $engine_type;
connection a;
eval create table t1(a int not null, b int, primary key(a)) engine = $engine_type;
insert into t1 values (1,2),(5,3),(4,2);
diff --git a/mysql-test/include/wait_for_sql_thread_read_all.inc b/mysql-test/include/wait_for_sql_thread_read_all.inc
index ec5ecd0cb17..1bbb006f3a8 100644
--- a/mysql-test/include/wait_for_sql_thread_read_all.inc
+++ b/mysql-test/include/wait_for_sql_thread_read_all.inc
@@ -1,6 +1,6 @@
--let $show_statement = show all slaves status
--let $field = Slave_SQL_State
---let $condition = = 'Slave has read all relay log; waiting for the slave I/O thread to update it'
+--let $condition = = 'Slave has read all relay log; waiting for more updates'
--let $wait_for_all = 1
--source include/wait_show_condition.inc
diff --git a/mysql-test/include/wsrep_wait_condition.inc b/mysql-test/include/wsrep_wait_condition.inc
new file mode 100644
index 00000000000..89b310475eb
--- /dev/null
+++ b/mysql-test/include/wsrep_wait_condition.inc
@@ -0,0 +1,23 @@
+# Helper script to allow to wait for condition on a node that may become
+# non-primary. It attempts to preserve wsrep_sync_wait and wsrep_on session
+# variables.
+#
+# We are forced to restore a global value for the session wsrep_sync_wait
+# here because we can not always issue a SELECT query to obtain the original
+# value and then restore it
+
+disable_query_log;
+SET SESSION wsrep_sync_wait = 8;
+let $restore_wsrep_sync_wait = `SELECT @@GLOBAL.wsrep_sync_wait`;
+let $restore_wsrep_on = `SELECT @@wsrep_on`;
+SET SESSION wsrep_on = OFF;
+
+--source include/wait_condition.inc
+
+if ($restore_wsrep_on == 1)
+{
+ --eval SET SESSION wsrep_on = ON
+}
+--eval SET SESSION wsrep_sync_wait = $restore_wsrep_sync_wait
+
+enable_query_log;
diff --git a/mysql-test/include/wsrep_wait_disconnect.inc b/mysql-test/include/wsrep_wait_disconnect.inc
index 740fc0d9426..504e8069cba 100644
--- a/mysql-test/include/wsrep_wait_disconnect.inc
+++ b/mysql-test/include/wsrep_wait_disconnect.inc
@@ -1,20 +1,2 @@
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;
+--source include/wsrep_wait_condition.inc
diff --git a/mysql-test/include/wsrep_wait_membership.inc b/mysql-test/include/wsrep_wait_membership.inc
new file mode 100644
index 00000000000..8bc1920ddfb
--- /dev/null
+++ b/mysql-test/include/wsrep_wait_membership.inc
@@ -0,0 +1,10 @@
+# Waits for N members in the cluster
+#
+# Usage:
+# --let $members=1
+# --source wsrep_wait_membership.inc
+#
+
+let $wait_condition = SELECT VARIABLE_VALUE = $members FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+
+--source include/wsrep_wait_condition.inc
diff --git a/mysql-test/lib/My/ConfigFactory.pm b/mysql-test/lib/My/ConfigFactory.pm
index 261de37ab54..3249a06256c 100644
--- a/mysql-test/lib/My/ConfigFactory.pm
+++ b/mysql-test/lib/My/ConfigFactory.pm
@@ -216,6 +216,7 @@ my @mysqld_rules=
my @client_rules=
(
{ 'character-sets-dir' => \&fix_charset_dir },
+ { 'plugin-dir' => sub { $::client_plugindir } },
);
@@ -346,7 +347,7 @@ sub resolve_at_variable {
or croak "There is no group named '$group_name' that ",
"can be used to resolve '$option_name' for test '$self->{testname}'";
- my $value= $from_group->value($option_name);
+ my $value= $from_group->value($option_name) || '';
$res .= $before.$value;
}
$res .= $after;
diff --git a/mysql-test/lib/My/Debugger.pm b/mysql-test/lib/My/Debugger.pm
index cc151b233d5..58175a0e9be 100644
--- a/mysql-test/lib/My/Debugger.pm
+++ b/mysql-test/lib/My/Debugger.pm
@@ -120,10 +120,10 @@ for my $k (sort keys %debuggers) {
$v->{script} = '' unless $v->{script};
$v->{options} =~ s/(\{exe\}|$)/ {options} $&/ unless $v->{options} =~ /\{options\}/;
- register_opt "$k" => "Start mysqld";
- register_opt "client-$k" => "Start mysqltest client";
+ register_opt "$k" => "Start mariadbd";
+ register_opt "client-$k" => "Start mariadb-test client";
register_opt "boot-$k" => "Start bootstrap server";
- register_opt "manual-$k" => "Before running test(s) let user manually start mysqld";
+ register_opt "manual-$k" => "Before running test(s) let user manually start mariadbd";
}
sub subst($%) {
diff --git a/mysql-test/lib/mtr_cases.pm b/mysql-test/lib/mtr_cases.pm
index fe4f316c31f..adc911ba937 100644
--- a/mysql-test/lib/mtr_cases.pm
+++ b/mysql-test/lib/mtr_cases.pm
@@ -64,8 +64,8 @@ my $plugin_suitedir_regex;
my $overlay_regex;
if (-d '../sql') {
- @plugin_suitedirs= ('storage/*/mysql-test', 'plugin/*/mysql-test');
- $overlay_regex= '\b(?:storage|plugin)/(\w+)/mysql-test\b';
+ @plugin_suitedirs= ('storage/*/mysql-test', 'plugin/*/mysql-test', 'storage/*/*/mysql-test', );
+ $overlay_regex= '\b(?:storage|plugin|storage[/][^/]*)/(\w+)/mysql-test\b';
} else {
@plugin_suitedirs= ('mysql-test/plugin/*');
$overlay_regex= '\bmysql-test/plugin/(\w+)\b';
@@ -747,7 +747,7 @@ sub collect_one_test_case {
if ( $enable_disabled )
{
# User has selected to run all disabled tests
- mtr_report(" - $tinfo->{name} wil be run although it's been disabled\n",
+ mtr_report(" - $tinfo->{name} will be run although it's been disabled\n",
" due to '$disable'");
}
else
diff --git a/mysql-test/lib/v1/mysql-test-run.pl b/mysql-test/lib/v1/mysql-test-run.pl
index 6fe5f66fbfc..6b419aff3bf 100755
--- a/mysql-test/lib/v1/mysql-test-run.pl
+++ b/mysql-test/lib/v1/mysql-test-run.pl
@@ -2,16 +2,16 @@
# -*- cperl -*-
# Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
-#
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA
@@ -572,7 +572,7 @@ sub command_line_setup () {
'valgrind-path=s' => \$opt_valgrind_path,
'callgrind' => \$opt_callgrind,
- # Stress testing
+ # Stress testing
'stress' => \$opt_stress,
'stress-suite=s' => \$opt_stress_suite,
'stress-threads=i' => \$opt_stress_threads,
@@ -655,7 +655,7 @@ sub command_line_setup () {
$glob_mysql_test_dir= `cygpath -m "$glob_mysql_test_dir"`;
chomp($glob_mysql_test_dir);
}
- if (defined $ENV{MTR_BINDIR})
+ if (defined $ENV{MTR_BINDIR})
{
$default_vardir= "$ENV{MTR_BINDIR}/mysql-test/var";
}
@@ -700,7 +700,7 @@ sub command_line_setup () {
{
my $lib_mysqld=
mtr_path_exists(vs_config_dirs('libmysqld',''));
- $lib_mysqld= $glob_cygwin_perl ? ":".`cygpath "$lib_mysqld"`
+ $lib_mysqld= $glob_cygwin_perl ? ":".`cygpath "$lib_mysqld"`
: ";".$lib_mysqld;
chomp($lib_mysqld);
$ENV{'PATH'}="$ENV{'PATH'}".$lib_mysqld;
@@ -738,7 +738,7 @@ sub command_line_setup () {
"$glob_bindir/client",
"$glob_bindir/bin");
}
-
+
# Look for language files and charsetsdir, use same share
$path_share= mtr_path_exists("$glob_bindir/share/mysql",
"$glob_bindir/sql/share",
@@ -761,8 +761,8 @@ sub command_line_setup () {
"$path_client_bindir/mysqld-debug",
"$path_client_bindir/mysqld-max",
"$glob_bindir/libexec/mysqld",
- "$glob_bindir/bin/mysqld",
- "$glob_bindir/sbin/mysqld");
+ "$glob_bindir/bin/mariadbd",
+ "$glob_bindir/sbin/mariadbd");
# Use the mysqld found above to find out what features are available
collect_mysqld_features();
@@ -815,7 +815,7 @@ sub command_line_setup () {
$used_binlog_format= $1;
}
}
- if (defined $used_binlog_format)
+ if (defined $used_binlog_format)
{
mtr_report("Using binlog format '$used_binlog_format'");
}
@@ -1619,7 +1619,7 @@ sub environment_setup () {
$ENV{'CHARSETSDIR'}= $path_charsetsdir;
$ENV{'UMASK'}= "0660"; # The octal *string*
$ENV{'UMASK_DIR'}= "0770"; # The octal *string*
-
+
#
# MySQL tests can produce output in various character sets
# (especially, ctype_xxx.test). To avoid confusing Perl
@@ -1630,7 +1630,7 @@ sub environment_setup () {
#
$ENV{'LC_ALL'}= "C";
$ENV{'LC_CTYPE'}= "C";
-
+
$ENV{'LC_COLLATE'}= "C";
$ENV{'USE_RUNNING_SERVER'}= $opt_extern;
$ENV{'MYSQL_TEST_DIR'}= $glob_mysql_test_dir;
@@ -1803,7 +1803,7 @@ sub environment_setup () {
$ENV{'MYSQLADMIN'}= mtr_native_path($exe_mysqladmin);
# ----------------------------------------------------
- # Setup env so childs can execute perror
+ # Setup env so childs can execute perror
# ----------------------------------------------------
$ENV{'MY_PERROR'}= mtr_native_path($exe_perror);
@@ -2773,7 +2773,7 @@ sub run_testcase ($) {
if ($glob_win32_perl)
{
#ActiveState perl hangs when using normal exit, use POSIX::_exit instead
- use POSIX qw[ _exit ];
+ use POSIX qw[ _exit ];
POSIX::_exit(0);
}
else
@@ -3157,10 +3157,10 @@ sub mysqld_arguments ($$$$) {
{
# NOTE: the backport (see BUG#48048) originally removed the
# commented out lines below. However, given that they are
-# protected with a version check (< 50200) now, it should be
-# safe to keep them. The problem is that the backported patch
-# was into a 5.1 GA codebase - mysql-5.1-rep+2 tree - so
-# version is 501XX, consequently check becomes worthless. It
+# protected with a version check (< 50200) now, it should be
+# safe to keep them. The problem is that the backported patch
+# was into a 5.1 GA codebase - mysql-5.1-rep+2 tree - so
+# version is 501XX, consequently check becomes worthless. It
# should be safe to uncomment them when merging up to 5.5.
#
# RQG semisync test runs on the 5.1 GA tree and needs MTR v1.
@@ -4322,4 +4322,3 @@ sub list_options ($) {
mtr_exit(1);
}
-
diff --git a/mysql-test/lsan.supp b/mysql-test/lsan.supp
new file mode 100644
index 00000000000..3f460d4544e
--- /dev/null
+++ b/mysql-test/lsan.supp
@@ -0,0 +1,17 @@
+# LSAN (Asan leaks) suppressions
+
+# Leaks found by main.tls_version1
+leak:gnutls_certificate_allocate_credentials
+leak:gnutls_x509_trust_list_init
+
+# Leaks found by openssl_1
+leak:libtasn1
+leak:libgnutls
+leak:gnutls_pubkey_init
+leak:gnutls_x509_privkey_init
+leak:gnutls_x509_crt_init
+leak:gnutls_privkey_init
+leak:gnutls_x509_trust_list_init
+leak:gnutls_subject_alt_names_init
+leak:__gmp_default_allocate
+leak:__gmp_default_reallocate
diff --git a/mysql-test/main/alter_events.result b/mysql-test/main/alter_events.result
new file mode 100644
index 00000000000..b3bd8d26fe6
--- /dev/null
+++ b/mysql-test/main/alter_events.result
@@ -0,0 +1,14 @@
+SET GLOBAL event_scheduler=1;
+CREATE TABLE t1 (a int primary key, b int) engine=innodb;
+insert into t1 values (1,1),(2,2),(3,3);
+CREATE TABLE t2 (a int primary key) engine=innodb;
+CREATE EVENT e_t1 ON SCHEDULE EVERY 1 SECOND DO insert ignore into test.t2 select a from test.t1;
+select * from t2;
+a
+1
+2
+3
+drop event e_t1;
+ALTER TABLE mysql.event DROP PRIMARY KEY, ADD PRIMARY KEY(db,name);
+drop table t1,t2;
+SET GLOBAL event_scheduler=default;
diff --git a/mysql-test/main/alter_events.test b/mysql-test/main/alter_events.test
new file mode 100644
index 00000000000..309a0ce06ce
--- /dev/null
+++ b/mysql-test/main/alter_events.test
@@ -0,0 +1,31 @@
+--source include/not_embedded.inc
+--source include/have_innodb.inc
+#--source include/have_metadata_lock_info.inc
+
+#
+# Testing of problems with ALTER TABLE and events on the same table(s)
+#
+
+#
+# MDEV-24452 ALTER TABLE event take infinite time which for example breaks
+# mysql_upgrade
+#
+
+SET GLOBAL event_scheduler=1;
+
+CREATE TABLE t1 (a int primary key, b int) engine=innodb;
+insert into t1 values (1,1),(2,2),(3,3);
+CREATE TABLE t2 (a int primary key) engine=innodb;
+
+CREATE EVENT e_t1 ON SCHEDULE EVERY 1 SECOND DO insert ignore into test.t2 select a from test.t1;
+
+let $wait_condition=SELECT count(*) > 0 from t2;
+--source include/wait_condition.inc
+select * from t2;
+drop event e_t1;
+
+# select * from information_schema.metadata_lock_info;
+ALTER TABLE mysql.event DROP PRIMARY KEY, ADD PRIMARY KEY(db,name);
+drop table t1,t2;
+
+SET GLOBAL event_scheduler=default;
diff --git a/mysql-test/main/alter_table,aria.rdiff b/mysql-test/main/alter_table,aria.rdiff
new file mode 100644
index 00000000000..40bbf95494c
--- /dev/null
+++ b/mysql-test/main/alter_table,aria.rdiff
@@ -0,0 +1,22 @@
+--- ./mysql-test/main/alter_table.result 2020-02-27 19:35:41.279992329 +0300
++++ ./mysql-test/main/alter_table,aria.reject 2020-02-27 19:37:13.251994491 +0300
+@@ -2716,8 +2716,7 @@
+ t3 CREATE TABLE `t3` (
+ `a` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL,
+- KEY `b` (`b`),
+- CONSTRAINT `t3_ibfk_1` FOREIGN KEY (`b`) REFERENCES `t1` (`bb`)
++ KEY `b` (`b`)
+ ) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
+ ALTER TABLE t1 RENAME COLUMN bb TO b;
+ SHOW CREATE TABLE t1;
+@@ -2733,8 +2732,7 @@
+ t3 CREATE TABLE `t3` (
+ `a` int(11) DEFAULT NULL,
+ `c` int(11) DEFAULT NULL,
+- KEY `b` (`c`),
+- CONSTRAINT `t3_ibfk_1` FOREIGN KEY (`c`) REFERENCES `t1` (`b`)
++ KEY `b` (`c`)
+ ) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
+ CREATE TABLE t4(a int);
+ ALTER TABLE t4 RENAME COLUMN a TO aa, ALGORITHM = INPLACE;
diff --git a/mysql-test/main/alter_table,heap.rdiff b/mysql-test/main/alter_table,heap.rdiff
new file mode 100644
index 00000000000..ad6fd194cc9
--- /dev/null
+++ b/mysql-test/main/alter_table,heap.rdiff
@@ -0,0 +1,59 @@
+--- ./mysql-test/main/alter_table.result 2020-02-27 19:35:41.279992329 +0300
++++ ./mysql-test/main/alter_table,heap.reject 2020-02-27 19:39:44.175998039 +0300
+@@ -2716,8 +2716,7 @@
+ t3 CREATE TABLE `t3` (
+ `a` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL,
+- KEY `b` (`b`),
+- CONSTRAINT `t3_ibfk_1` FOREIGN KEY (`b`) REFERENCES `t1` (`bb`)
++ KEY `b` (`b`)
+ ) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
+ ALTER TABLE t1 RENAME COLUMN bb TO b;
+ SHOW CREATE TABLE t1;
+@@ -2733,8 +2732,7 @@
+ t3 CREATE TABLE `t3` (
+ `a` int(11) DEFAULT NULL,
+ `c` int(11) DEFAULT NULL,
+- KEY `b` (`c`),
+- CONSTRAINT `t3_ibfk_1` FOREIGN KEY (`c`) REFERENCES `t1` (`b`)
++ KEY `b` (`c`)
+ ) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
+ CREATE TABLE t4(a int);
+ ALTER TABLE t4 RENAME COLUMN a TO aa, ALGORITHM = INPLACE;
+@@ -2774,36 +2772,6 @@
+ ERROR 42S22: Unknown column 'd' in 'field list'
+ DROP TRIGGER trg1;
+ DROP PROCEDURE sp1;
+-CREATE TABLE t_gen(a INT, b DOUBLE GENERATED ALWAYS AS (SQRT(a)));
+-INSERT INTO t_gen(a) VALUES(4);
+-SELECT * FROM t_gen;
+-a b
+-4 2
+-SHOW CREATE TABLE t_gen;
+-Table Create Table
+-t_gen CREATE TABLE `t_gen` (
+- `a` int(11) DEFAULT NULL,
+- `b` double GENERATED ALWAYS AS (sqrt(`a`)) VIRTUAL
+-) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
+-ALTER TABLE t_gen RENAME COLUMN a TO c, CHANGE COLUMN b b DOUBLE GENERATED ALWAYS AS (SQRT(c));
+-SELECT * FROM t_gen;
+-c b
+-4 2
+-SHOW CREATE TABLE t_gen;
+-Table Create Table
+-t_gen CREATE TABLE `t_gen` (
+- `c` int(11) DEFAULT NULL,
+- `b` double GENERATED ALWAYS AS (sqrt(`c`)) VIRTUAL
+-) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
+-ALTER TABLE t_gen CHANGE COLUMN c x INT;
+-show create table t_gen;
+-Table Create Table
+-t_gen CREATE TABLE `t_gen` (
+- `x` int(11) DEFAULT NULL,
+- `b` double GENERATED ALWAYS AS (sqrt(`x`)) VIRTUAL
+-) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
+-ALTER TABLE t_gen RENAME COLUMN x TO a;
+-DROP TABLE t_gen;
+ SHOW CREATE TABLE t1;
+ Table Create Table
+ t1 CREATE TABLE `t1` (
diff --git a/mysql-test/main/alter_table.combinations b/mysql-test/main/alter_table.combinations
new file mode 100644
index 00000000000..824e0a3be04
--- /dev/null
+++ b/mysql-test/main/alter_table.combinations
@@ -0,0 +1,5 @@
+[innodb]
+
+[aria]
+
+[heap]
diff --git a/mysql-test/main/alter_table.result b/mysql-test/main/alter_table.result
index 3c59b83f2ce..a43d9845947 100644
--- a/mysql-test/main/alter_table.result
+++ b/mysql-test/main/alter_table.result
@@ -272,8 +272,7 @@ ERROR 42000: Incorrect table name ''
drop table t1;
drop table if exists t1, t2;
Warnings:
-Note 1051 Unknown table 'test.t1'
-Note 1051 Unknown table 'test.t2'
+Note 1051 Unknown table 'test.t1,test.t2'
create table t1 ( a varchar(10) not null primary key ) engine=myisam;
create table t2 ( a varchar(10) not null primary key ) engine=merge union=(t1);
flush tables;
@@ -1679,6 +1678,8 @@ ALTER TABLE t1 DROP INDEX i1, DROP INDEX i2, DROP INDEX i3, DROP INDEX i4;
#
SET SESSION old_alter_table= 1;
affected rows: 0
+Warnings:
+Warning 1287 '@@old_alter_table' is deprecated and will be removed in a future release. Please use '@@alter_algorithm' instead
ALTER TABLE t1 ADD INDEX i1(b);
affected rows: 2
info: Records: 2 Duplicates: 0 Warnings: 0
@@ -1699,6 +1700,8 @@ Warnings:
Note 1831 Duplicate index `i4`. This is deprecated and will be disallowed in a future release
SET SESSION old_alter_table= 0;
affected rows: 0
+Warnings:
+Warning 1287 '@@old_alter_table' is deprecated and will be removed in a future release. Please use '@@alter_algorithm' instead
ALTER TABLE t1 DROP INDEX i1, DROP INDEX i2, DROP INDEX i3, DROP INDEX i4;
#
# 3: Test unsupported in-place operation
@@ -2627,3 +2630,748 @@ insert into t1 (id,name,enabled,domain_id) values (1,"Monty",1,"domain_id");
insert into t1 (id,name,enabled,domain_id) values (2,"Monty2",1,"domain_id2");
ALTER TABLE t1 ADD CONSTRAINT ixu_user2_name_domain_id UNIQUE (domain_id, name);
DROP TABLE t1;
+#
+# End of 10.4 tests
+#
+#
+# MDEV-16290 ALTER TABLE ... RENAME COLUMN syntax
+#
+SET @save_default_engine= @@DEFAULT_STORAGE_ENGINE;
+CREATE TABLE t1(a INT, b VARCHAR(30), c FLOAT);
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(30) DEFAULT NULL,
+ `c` float DEFAULT NULL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
+INSERT INTO t1 VALUES(1,'abcd',1.234);
+CREATE TABLE t2(a INT, b VARCHAR(30), c FLOAT) ENGINE=MyIsam;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(30) DEFAULT NULL,
+ `c` float DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+INSERT INTO t2 VALUES(1,'abcd',1.234);
+ALTER TABLE t1 RENAME COLUMN a TO a;
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(30) DEFAULT NULL,
+ `c` float DEFAULT NULL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
+ALTER TABLE t1 RENAME COLUMN a TO m;
+ALTER TABLE t1 RENAME COLUMN a TO m;
+ERROR 42S22: Unknown column 'a' in 't1'
+ALTER TABLE t1 RENAME COLUMN IF EXISTS a TO m;
+Warnings:
+Note 1054 Unknown column 'a' in 't1'
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `m` int(11) DEFAULT NULL,
+ `b` varchar(30) DEFAULT NULL,
+ `c` float DEFAULT NULL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
+SELECT * FROM t1;
+m b c
+1 abcd 1.234
+ALTER TABLE t1 RENAME COLUMN m TO x,
+RENAME COLUMN b TO y,
+RENAME COLUMN c TO z;
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) DEFAULT NULL,
+ `y` varchar(30) DEFAULT NULL,
+ `z` float DEFAULT NULL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
+SELECT * FROM t1;
+x y z
+1 abcd 1.234
+ALTER TABLE t2 RENAME COLUMN a TO d, RENAME COLUMN b TO e, RENAME COLUMN c to f;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `d` int(11) DEFAULT NULL,
+ `e` varchar(30) DEFAULT NULL,
+ `f` float DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+SELECT * FROM t2;
+d e f
+1 abcd 1.234
+ALTER TABLE t1 CHANGE COLUMN x a INT, RENAME COLUMN y TO b;
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(30) DEFAULT NULL,
+ `z` float DEFAULT NULL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
+ALTER TABLE t1 CHANGE COLUMN z c DOUBLE, RENAME COLUMN b to b;
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(30) DEFAULT NULL,
+ `c` double DEFAULT NULL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
+ALTER TABLE t1 CHANGE COLUMN a b int, RENAME COLUMN b TO c, CHANGE COLUMN c d FLOAT;
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `b` int(11) DEFAULT NULL,
+ `c` varchar(30) DEFAULT NULL,
+ `d` float DEFAULT NULL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
+ALTER TABLE t1 ADD COLUMN zz INT, RENAME COLUMN d TO f;
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `b` int(11) DEFAULT NULL,
+ `c` varchar(30) DEFAULT NULL,
+ `f` float DEFAULT NULL,
+ `zz` int(11) DEFAULT NULL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
+ALTER TABLE t1 DROP COLUMN zz, RENAME COLUMN c TO zz;
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `b` int(11) DEFAULT NULL,
+ `zz` varchar(30) DEFAULT NULL,
+ `f` float DEFAULT NULL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
+ALTER TABLE t1 RENAME COLUMN zz to c, DROP COLUMN f;
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `b` int(11) DEFAULT NULL,
+ `c` varchar(30) DEFAULT NULL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
+ALTER TABLE t1 ADD COLUMN d INT DEFAULT 5, RENAME COLUMN c TO b, DROP COLUMN b;
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `b` varchar(30) DEFAULT NULL,
+ `d` int(11) DEFAULT 5
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
+ALTER TABLE t1 RENAME COLUMN b TO d, RENAME COLUMN d TO b;
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `d` varchar(30) DEFAULT NULL,
+ `b` int(11) DEFAULT 5
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
+ALTER TABLE t1 ADD KEY(b);
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `d` varchar(30) DEFAULT NULL,
+ `b` int(11) DEFAULT 5,
+ KEY `b` (`b`)
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
+ALTER TABLE t1 RENAME COLUMN b TO bb;
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `d` varchar(30) DEFAULT NULL,
+ `bb` int(11) DEFAULT 5,
+ KEY `b` (`bb`)
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
+SELECT * FROM t1;
+d bb
+abcd 5
+CREATE TABLE t3(a int, b int, KEY(b));
+ALTER TABLE t3 ADD CONSTRAINT FOREIGN KEY(b) REFERENCES t1(bb);
+SHOW CREATE TABLE t3;
+Table Create Table
+t3 CREATE TABLE `t3` (
+ `a` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL,
+ KEY `b` (`b`),
+ CONSTRAINT `t3_ibfk_1` FOREIGN KEY (`b`) REFERENCES `t1` (`bb`)
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
+ALTER TABLE t1 RENAME COLUMN bb TO b;
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `d` varchar(30) DEFAULT NULL,
+ `b` int(11) DEFAULT 5,
+ KEY `b` (`b`)
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
+ALTER TABLE t3 RENAME COLUMN b TO c;
+SHOW CREATE TABLE t3;
+Table Create Table
+t3 CREATE TABLE `t3` (
+ `a` int(11) DEFAULT NULL,
+ `c` int(11) DEFAULT NULL,
+ KEY `b` (`c`),
+ CONSTRAINT `t3_ibfk_1` FOREIGN KEY (`c`) REFERENCES `t1` (`b`)
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
+CREATE TABLE t4(a int);
+ALTER TABLE t4 RENAME COLUMN a TO aa, ALGORITHM = INPLACE;
+SHOW CREATE TABLE t4;
+Table Create Table
+t4 CREATE TABLE `t4` (
+ `aa` int(11) DEFAULT NULL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
+ALTER TABLE t4 RENAME COLUMN aa TO a, ALGORITHM = COPY;
+SHOW CREATE TABLE t4;
+Table Create Table
+t4 CREATE TABLE `t4` (
+ `a` int(11) DEFAULT NULL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
+DROP TABLE t4;
+CREATE VIEW v1 AS SELECT d,e,f FROM t2;
+CREATE TRIGGER trg1 BEFORE UPDATE on t2 FOR EACH ROW SET NEW.d=OLD.d + 10;
+CREATE PROCEDURE sp1() INSERT INTO t2(d) VALUES(10);
+ALTER TABLE t2 RENAME COLUMN d TO g;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `g` int(11) DEFAULT NULL,
+ `e` varchar(30) DEFAULT NULL,
+ `f` float DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+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 `test`.`t2`.`d` AS `d`,`test`.`t2`.`e` AS `e`,`test`.`t2`.`f` AS `f` from `t2` koi8r koi8r_general_ci
+Warnings:
+Warning 1356 View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+SELECT * FROM v1;
+ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+UPDATE t2 SET f = f + 10;
+ERROR 42S22: Unknown column 'd' in 'OLD'
+CALL sp1();
+ERROR 42S22: Unknown column 'd' in 'field list'
+DROP TRIGGER trg1;
+DROP PROCEDURE sp1;
+CREATE TABLE t_gen(a INT, b DOUBLE GENERATED ALWAYS AS (SQRT(a)));
+INSERT INTO t_gen(a) VALUES(4);
+SELECT * FROM t_gen;
+a b
+4 2
+SHOW CREATE TABLE t_gen;
+Table Create Table
+t_gen CREATE TABLE `t_gen` (
+ `a` int(11) DEFAULT NULL,
+ `b` double GENERATED ALWAYS AS (sqrt(`a`)) VIRTUAL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
+ALTER TABLE t_gen RENAME COLUMN a TO c, CHANGE COLUMN b b DOUBLE GENERATED ALWAYS AS (SQRT(c));
+SELECT * FROM t_gen;
+c b
+4 2
+SHOW CREATE TABLE t_gen;
+Table Create Table
+t_gen CREATE TABLE `t_gen` (
+ `c` int(11) DEFAULT NULL,
+ `b` double GENERATED ALWAYS AS (sqrt(`c`)) VIRTUAL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
+ALTER TABLE t_gen CHANGE COLUMN c x INT;
+show create table t_gen;
+Table Create Table
+t_gen CREATE TABLE `t_gen` (
+ `x` int(11) DEFAULT NULL,
+ `b` double GENERATED ALWAYS AS (sqrt(`x`)) VIRTUAL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
+ALTER TABLE t_gen RENAME COLUMN x TO a;
+DROP TABLE t_gen;
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `d` varchar(30) DEFAULT NULL,
+ `b` int(11) DEFAULT 5,
+ KEY `b` (`b`)
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
+ALTER TABLE t1 RENAME COLUMN b z;
+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 'z' at line 1
+ALTER TABLE t1 RENAME COLUMN FROM b TO z;
+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 'FROM b TO z' at line 1
+ALTER TABLE t1 RENAME COLUMN b TO 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 '1' at line 1
+ALTER TABLE t1 RENAME COLUMN b TO e, RENAME COLUMN c TO e;
+ERROR 42S22: Unknown column 'c' in 't1'
+ALTER TABLE t1 ADD COLUMN z INT, RENAME COLUMN b TO z;
+ERROR 42S21: Duplicate column name 'z'
+ALTER TABLE t1 DROP COLUMN b, RENAME COLUMN b TO z;
+ERROR 42S22: Unknown column 'b' in 't1'
+ALTER TABLE t1 RENAME COLUMN b TO b, RENAME COLUMN b TO b;
+ERROR 42S22: Unknown column 'b' in 't1'
+ALTER TABLE t1 RENAME COLUMN b TO c3, DROP COLUMN c3;
+ERROR 42000: Can't DROP COLUMN `c3`; check that it exists
+ALTER TABLE t1 ADD COLUMN z INT, CHANGE COLUMN z y INT, DROP COLUMN y;
+ERROR 42S22: Unknown column 'z' in 't1'
+ALTER TABLE t1 ADD COLUMN z INT, RENAME COLUMN z TO y, DROP COLUMN y;
+ERROR 42S22: Unknown column 'z' in 't1'
+ALTER TABLE t1 RENAME COLUMN b TO `nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn`;
+ERROR 42000: Incorrect column name 'nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn'
+ALTER TABLE t1 CHANGE b `nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn` int;
+ERROR 42000: Identifier name 'nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn' is too long
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `d` varchar(30) DEFAULT NULL,
+ `b` int(11) DEFAULT 5,
+ KEY `b` (`b`)
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
+SELECT * FROM t1;
+d b
+abcd 5
+DROP VIEW v1;
+DROP TABLE t3,t1,t2;
+SET DEFAULT_STORAGE_ENGINE= @save_default_engine;
+#
+# MDEV-7318 RENAME INDEX
+#
+#
+# 1) Tests for syntax and semantics of ALTER TABLE RENAME
+# KEY/INDEX result.
+#
+# 1.a) Both RENAME KEY and RENAME INDEX variants should be
+# allowed and produce expected results.
+create table t1 (pk int primary key, i int, j int, key a(i));
+alter table t1 rename key a to b;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `pk` int(11) NOT NULL,
+ `i` int(11) DEFAULT NULL,
+ `j` int(11) DEFAULT NULL,
+ PRIMARY KEY (`pk`),
+ KEY `b` (`i`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+alter table t1 rename index b to c;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `pk` int(11) NOT NULL,
+ `i` int(11) DEFAULT NULL,
+ `j` int(11) DEFAULT NULL,
+ PRIMARY KEY (`pk`),
+ KEY `c` (`i`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+# 1.b) It should be impossible to rename index that doesn't
+# exists, dropped or added within the same ALTER TABLE.
+alter table t1 rename key d to e;
+ERROR 42000: Key 'd' doesn't exist in table 't1'
+alter table t1 rename key if exists d to e;
+Warnings:
+Note 1176 Key 'd' doesn't exist in table 't1'
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `pk` int(11) NOT NULL,
+ `i` int(11) DEFAULT NULL,
+ `j` int(11) DEFAULT NULL,
+ PRIMARY KEY (`pk`),
+ KEY `c` (`i`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+alter table t1 drop key c, rename key c to d;
+ERROR 42000: Key 'c' doesn't exist in table 't1'
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `pk` int(11) NOT NULL,
+ `i` int(11) DEFAULT NULL,
+ `j` int(11) DEFAULT NULL,
+ PRIMARY KEY (`pk`),
+ KEY `c` (`i`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+alter table t1 add key d(j), rename key d to e;
+ERROR 42000: Key 'd' doesn't exist in table 't1'
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `pk` int(11) NOT NULL,
+ `i` int(11) DEFAULT NULL,
+ `j` int(11) DEFAULT NULL,
+ PRIMARY KEY (`pk`),
+ KEY `c` (`i`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+# 1.c) It should be impossible to rename index to a name
+# which is already used by another index, or is used
+# by index which is added within the same ALTER TABLE.
+alter table t1 add key d(j);
+alter table t1 rename key c to d;
+ERROR 42000: Duplicate key name 'd'
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `pk` int(11) NOT NULL,
+ `i` int(11) DEFAULT NULL,
+ `j` int(11) DEFAULT NULL,
+ PRIMARY KEY (`pk`),
+ KEY `c` (`i`),
+ KEY `d` (`j`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+alter table t1 drop key d;
+alter table t1 add key d(j), rename key c to d;
+ERROR 42000: Duplicate key name 'd'
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `pk` int(11) NOT NULL,
+ `i` int(11) DEFAULT NULL,
+ `j` int(11) DEFAULT NULL,
+ PRIMARY KEY (`pk`),
+ KEY `c` (`i`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+# 1.d) It should be possible to rename index to a name
+# which belongs to index which is dropped within the
+# same ALTER TABLE.
+alter table t1 add key d(j);
+alter table t1 drop key c, rename key d to c;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `pk` int(11) NOT NULL,
+ `i` int(11) DEFAULT NULL,
+ `j` int(11) DEFAULT NULL,
+ PRIMARY KEY (`pk`),
+ KEY `c` (`j`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+# 1.e) We disallow renaming from/to PRIMARY as it might
+# lead to some other key becoming "primary" internally,
+# which will be interpreted as dropping/addition of
+# primary key.
+alter table t1 rename key primary to d;
+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 'primary to d' at line 1
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `pk` int(11) NOT NULL,
+ `i` int(11) DEFAULT NULL,
+ `j` int(11) DEFAULT NULL,
+ PRIMARY KEY (`pk`),
+ KEY `c` (`j`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+# Even using 'funny' syntax.
+alter table t1 rename key `primary` to d;
+ERROR 42000: Incorrect index name 'primary'
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `pk` int(11) NOT NULL,
+ `i` int(11) DEFAULT NULL,
+ `j` int(11) DEFAULT NULL,
+ PRIMARY KEY (`pk`),
+ KEY `c` (`j`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+alter table t1 rename key c to primary;
+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 'primary' at line 1
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `pk` int(11) NOT NULL,
+ `i` int(11) DEFAULT NULL,
+ `j` int(11) DEFAULT NULL,
+ PRIMARY KEY (`pk`),
+ KEY `c` (`j`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+alter table t1 rename key c to `primary`;
+ERROR 42000: Incorrect index name 'primary'
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `pk` int(11) NOT NULL,
+ `i` int(11) DEFAULT NULL,
+ `j` int(11) DEFAULT NULL,
+ PRIMARY KEY (`pk`),
+ KEY `c` (`j`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+drop table t1;
+#
+# 2) More complex tests for semantics of ALTER TABLE.
+#
+# 2.a) Check that standalone RENAME KEY works as expected
+# for unique and non-unique indexes.
+create table t1 (a int, unique u(a), b int, key k(b));
+alter table t1 rename key u to uu;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL,
+ UNIQUE KEY `uu` (`a`),
+ KEY `k` (`b`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+alter table t1 rename key k to kk;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL,
+ UNIQUE KEY `uu` (`a`),
+ KEY `kk` (`b`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+# 2.b) Check how that this clause can be mixed with other
+# clauses which don't affect key or its columns.
+alter table t1 rename key kk to kkk, add column c int;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL,
+ `c` int(11) DEFAULT NULL,
+ UNIQUE KEY `uu` (`a`),
+ KEY `kkk` (`b`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+alter table t1 rename key uu to uuu, add key c(c);
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL,
+ `c` int(11) DEFAULT NULL,
+ UNIQUE KEY `uuu` (`a`),
+ KEY `kkk` (`b`),
+ KEY `c` (`c`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+alter table t1 rename key kkk to k, drop key uuu;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL,
+ `c` int(11) DEFAULT NULL,
+ KEY `k` (`b`),
+ KEY `c` (`c`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+alter table t1 rename key k to kk, rename to t2;
+show create table t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL,
+ `c` int(11) DEFAULT NULL,
+ KEY `kk` (`b`),
+ KEY `c` (`c`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+drop table t2;
+#
+# 3) Test coverage for handling of RENAME INDEX clause in
+# various storage engines and using different ALTER
+# algorithm.
+#
+# 3.a) Test coverage for simple storage engines (MyISAM/Heap).
+create table t1 (i int, key k(i)) engine=myisam;
+insert into t1 values (1);
+create table t2 (i int, key k(i)) engine=memory;
+insert into t2 values (1);
+# MyISAM and Heap should be able to handle key renaming in-place.
+alter table t1 algorithm=inplace, rename key k to kk;
+alter table t2 algorithm=inplace, rename key k to kk;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `i` int(11) DEFAULT NULL,
+ KEY `kk` (`i`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+show create table t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `i` int(11) DEFAULT NULL,
+ KEY `kk` (`i`)
+) ENGINE=MEMORY DEFAULT CHARSET=latin1
+# So by default in-place algorithm should be chosen.
+# (ALTER TABLE should report 0 rows affected).
+alter table t1 rename key kk to kkk;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+alter table t2 rename key kk to kkk;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `i` int(11) DEFAULT NULL,
+ KEY `kkk` (`i`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+show create table t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `i` int(11) DEFAULT NULL,
+ KEY `kkk` (`i`)
+) ENGINE=MEMORY DEFAULT CHARSET=latin1
+# Copy algorithm should work as well.
+alter table t1 algorithm=copy, rename key kkk to kkkk;
+alter table t2 algorithm=copy, rename key kkk to kkkk;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `i` int(11) DEFAULT NULL,
+ KEY `kkkk` (`i`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+show create table t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `i` int(11) DEFAULT NULL,
+ KEY `kkkk` (`i`)
+) ENGINE=MEMORY DEFAULT CHARSET=latin1
+# When renaming is combined with other in-place operation
+# it still works as expected (i.e. works in-place).
+alter table t1 algorithm=inplace, rename key kkkk to k, alter column i set default 100;
+alter table t2 algorithm=inplace, rename key kkkk to k, alter column i set default 100;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `i` int(11) DEFAULT 100,
+ KEY `k` (`i`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+show create table t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `i` int(11) DEFAULT 100,
+ KEY `k` (`i`)
+) ENGINE=MEMORY DEFAULT CHARSET=latin1
+# Combining with non-inplace operation results in the whole ALTER
+# becoming non-inplace.
+alter table t1 algorithm=inplace, rename key k to kk, add column j int;
+ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY
+alter table t2 algorithm=inplace, rename key k to kk, add column j int;
+ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY
+drop table t1, t2;
+# 3.b) Basic tests for InnoDB. More tests can be found in
+# innodb.innodb_rename_index*
+create table t1 (i int, key k(i)) engine=innodb;
+insert into t1 values (1);
+# Basic rename, inplace algorithm should be chosen
+alter table t1 algorithm=inplace, rename key k to kk;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `i` int(11) DEFAULT NULL,
+ KEY `kk` (`i`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+# copy algorithm should work as well.
+alter table t1 algorithm=copy, rename key kk to kkk;
+affected rows: 1
+info: Records: 1 Duplicates: 0 Warnings: 0
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `i` int(11) DEFAULT NULL,
+ KEY `kkk` (`i`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+drop table t1;
+#
+# 4) Additional coverage for complex cases in which code
+# in ALTER TABLE comparing old and new table version
+# got confused.
+#
+# Once InnoDB starts to support in-place index renaming the result
+# of below statements should stay the same. Information about
+# indexes returned by SHOW CREATE TABLE (from .FRM) and by
+# InnoDB (from InnoDB data-dictionary) should be consistent.
+#
+create table t1 ( a int, b int, c int, d int,
+primary key (a), index i1 (b), index i2 (c) ) engine=innodb;
+alter table t1 add index i1 (d), rename index i1 to x;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) NOT NULL,
+ `b` int(11) DEFAULT NULL,
+ `c` int(11) DEFAULT NULL,
+ `d` int(11) DEFAULT NULL,
+ PRIMARY KEY (`a`),
+ KEY `x` (`b`),
+ KEY `i2` (`c`),
+ KEY `i1` (`d`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+select i.name as k, f.name as c from information_schema.innodb_sys_tables as t,
+information_schema.innodb_sys_indexes as i,
+information_schema.innodb_sys_fields as f
+where t.name='test/t1' and t.table_id = i.table_id and i.index_id = f.index_id
+order by k, c;
+k c
+i1 d
+i2 c
+PRIMARY a
+x b
+drop table t1;
+create table t1 (a int, b int, c int, d int,
+primary key (a), index i1 (b), index i2 (c)) engine=innodb;
+alter table t1 add index i1 (d), rename index i1 to i2, drop index i2;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) NOT NULL,
+ `b` int(11) DEFAULT NULL,
+ `c` int(11) DEFAULT NULL,
+ `d` int(11) DEFAULT NULL,
+ PRIMARY KEY (`a`),
+ KEY `i2` (`b`),
+ KEY `i1` (`d`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+select i.name as k, f.name as c from information_schema.innodb_sys_tables as t,
+information_schema.innodb_sys_indexes as i,
+information_schema.innodb_sys_fields as f
+where t.name='test/t1' and t.table_id = i.table_id and i.index_id = f.index_id
+order by k, c;
+k c
+i1 d
+i2 b
+PRIMARY a
+drop table t1;
+#
+# ALTER TABLE IF EXISTS
+#
+create table t1 (a int);
+alter table if exists t1 add column b int;
+alter table if exists t2 add column c int;
+Warnings:
+Error 1146 Table 'test.t2' doesn't exist
+alter table if exists t9 rename t1;
+Warnings:
+Error 1146 Table 'test.t9' doesn't exist
+alter table if exists t1 rename t2;
+show create table t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+drop table t2;
+#
+# MDEV-22881 Unexpected errors, corrupt output, Valgrind / ASAN errors in Item_ident::print or append_identifier
+#
+create table t1 (a int check (a >= 0));
+lock tables t1 write;
+alter table t1 rename column a to a;
+alter table t1 rename key if exists x to xx;
+Warnings:
+Note 1176 Key 'x' doesn't exist in table 't1'
+unlock tables;
+drop table t1;
+#
+# MDEV-23852 alter table rename column to uppercase doesn't work
+#
+create table t1 (abc int);
+alter table t1 rename column abc to Abc, algorithm=copy;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `Abc` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+alter table t1 rename column abc to ABc, algorithm=inplace;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `ABc` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+alter table t1 rename column abc to ABC;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `ABC` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+drop table t1;
+#
+# End of 10.5 tests
+#
diff --git a/mysql-test/main/alter_table.test b/mysql-test/main/alter_table.test
index fa931fcadbf..e65a4edf13e 100644
--- a/mysql-test/main/alter_table.test
+++ b/mysql-test/main/alter_table.test
@@ -2146,3 +2146,427 @@ insert into t1 (id,name,enabled,domain_id) values (1,"Monty",1,"domain_id");
insert into t1 (id,name,enabled,domain_id) values (2,"Monty2",1,"domain_id2");
ALTER TABLE t1 ADD CONSTRAINT ixu_user2_name_domain_id UNIQUE (domain_id, name);
DROP TABLE t1;
+
+--echo #
+--echo # End of 10.4 tests
+--echo #
+
+--echo #
+--echo # MDEV-16290 ALTER TABLE ... RENAME COLUMN syntax
+--echo #
+SET @save_default_engine= @@DEFAULT_STORAGE_ENGINE;
+--disable_query_log
+if ($MTR_COMBINATION_INNODB)
+{
+SET DEFAULT_STORAGE_ENGINE= INNODB;
+}
+if ($MTR_COMBINATION_ARIA)
+{
+SET DEFAULT_STORAGE_ENGINE= ARIA;
+}
+if ($MTR_COMBINATION_HEAP)
+{
+SET DEFAULT_STORAGE_ENGINE= MEMORY;
+}
+--enable_query_log
+let $default_engine= `select @@default_storage_engine`;
+
+CREATE TABLE t1(a INT, b VARCHAR(30), c FLOAT);
+--replace_result $default_engine DEFAULT_ENGINE " PAGE_CHECKSUM=1" ""
+SHOW CREATE TABLE t1;
+INSERT INTO t1 VALUES(1,'abcd',1.234);
+CREATE TABLE t2(a INT, b VARCHAR(30), c FLOAT) ENGINE=MyIsam;
+SHOW CREATE TABLE t2;
+INSERT INTO t2 VALUES(1,'abcd',1.234);
+
+# Rename one column
+ALTER TABLE t1 RENAME COLUMN a TO a;
+--replace_result $default_engine DEFAULT_ENGINE " PAGE_CHECKSUM=1" ""
+SHOW CREATE TABLE t1;
+ALTER TABLE t1 RENAME COLUMN a TO m;
+--error ER_BAD_FIELD_ERROR
+ALTER TABLE t1 RENAME COLUMN a TO m;
+ALTER TABLE t1 RENAME COLUMN IF EXISTS a TO m;
+--replace_result $default_engine DEFAULT_ENGINE " PAGE_CHECKSUM=1" ""
+SHOW CREATE TABLE t1;
+SELECT * FROM t1;
+
+# Rename multiple column
+ALTER TABLE t1 RENAME COLUMN m TO x,
+ RENAME COLUMN b TO y,
+ RENAME COLUMN c TO z;
+--replace_result $default_engine DEFAULT_ENGINE " PAGE_CHECKSUM=1" ""
+SHOW CREATE TABLE t1;
+SELECT * FROM t1;
+
+# Rename multiple columns with MyIsam Engine
+ALTER TABLE t2 RENAME COLUMN a TO d, RENAME COLUMN b TO e, RENAME COLUMN c to f;
+SHOW CREATE TABLE t2;
+SELECT * FROM t2;
+
+# Mix different ALTER operations with RENAME COLUMN
+ALTER TABLE t1 CHANGE COLUMN x a INT, RENAME COLUMN y TO b;
+--replace_result $default_engine DEFAULT_ENGINE " PAGE_CHECKSUM=1" ""
+SHOW CREATE TABLE t1;
+ALTER TABLE t1 CHANGE COLUMN z c DOUBLE, RENAME COLUMN b to b;
+--replace_result $default_engine DEFAULT_ENGINE " PAGE_CHECKSUM=1" ""
+SHOW CREATE TABLE t1;
+ALTER TABLE t1 CHANGE COLUMN a b int, RENAME COLUMN b TO c, CHANGE COLUMN c d FLOAT;
+--replace_result $default_engine DEFAULT_ENGINE " PAGE_CHECKSUM=1" ""
+SHOW CREATE TABLE t1;
+ALTER TABLE t1 ADD COLUMN zz INT, RENAME COLUMN d TO f;
+--replace_result $default_engine DEFAULT_ENGINE " PAGE_CHECKSUM=1" ""
+SHOW CREATE TABLE t1;
+ALTER TABLE t1 DROP COLUMN zz, RENAME COLUMN c TO zz;
+--replace_result $default_engine DEFAULT_ENGINE " PAGE_CHECKSUM=1" ""
+SHOW CREATE TABLE t1;
+ALTER TABLE t1 RENAME COLUMN zz to c, DROP COLUMN f;
+--replace_result $default_engine DEFAULT_ENGINE " PAGE_CHECKSUM=1" ""
+SHOW CREATE TABLE t1;
+ALTER TABLE t1 ADD COLUMN d INT DEFAULT 5, RENAME COLUMN c TO b, DROP COLUMN b;
+--replace_result $default_engine DEFAULT_ENGINE " PAGE_CHECKSUM=1" ""
+SHOW CREATE TABLE t1;
+
+#Cyclic Rename
+ALTER TABLE t1 RENAME COLUMN b TO d, RENAME COLUMN d TO b;
+--replace_result $default_engine DEFAULT_ENGINE " PAGE_CHECKSUM=1" ""
+SHOW CREATE TABLE t1;
+
+# Rename with Indexes
+ALTER TABLE t1 ADD KEY(b);
+--replace_result $default_engine DEFAULT_ENGINE " PAGE_CHECKSUM=1" ""
+SHOW CREATE TABLE t1;
+ALTER TABLE t1 RENAME COLUMN b TO bb;
+--replace_result $default_engine DEFAULT_ENGINE " PAGE_CHECKSUM=1" ""
+SHOW CREATE TABLE t1;
+SELECT * FROM t1;
+
+# Rename with Foreign keys.
+CREATE TABLE t3(a int, b int, KEY(b));
+ALTER TABLE t3 ADD CONSTRAINT FOREIGN KEY(b) REFERENCES t1(bb);
+--replace_result $default_engine DEFAULT_ENGINE " PAGE_CHECKSUM=1" ""
+SHOW CREATE TABLE t3;
+ALTER TABLE t1 RENAME COLUMN bb TO b;
+--replace_result $default_engine DEFAULT_ENGINE " PAGE_CHECKSUM=1" ""
+SHOW CREATE TABLE t1;
+ALTER TABLE t3 RENAME COLUMN b TO c;
+--replace_result $default_engine DEFAULT_ENGINE " PAGE_CHECKSUM=1" ""
+SHOW CREATE TABLE t3;
+
+# Different Algorithm
+CREATE TABLE t4(a int);
+ALTER TABLE t4 RENAME COLUMN a TO aa, ALGORITHM = INPLACE;
+--replace_result $default_engine DEFAULT_ENGINE " PAGE_CHECKSUM=1" ""
+SHOW CREATE TABLE t4;
+ALTER TABLE t4 RENAME COLUMN aa TO a, ALGORITHM = COPY;
+--replace_result $default_engine DEFAULT_ENGINE " PAGE_CHECKSUM=1" ""
+SHOW CREATE TABLE t4;
+DROP TABLE t4;
+
+# View, Trigger and SP
+CREATE VIEW v1 AS SELECT d,e,f FROM t2;
+CREATE TRIGGER trg1 BEFORE UPDATE on t2 FOR EACH ROW SET NEW.d=OLD.d + 10;
+CREATE PROCEDURE sp1() INSERT INTO t2(d) VALUES(10);
+ALTER TABLE t2 RENAME COLUMN d TO g;
+--replace_result $default_engine DEFAULT_ENGINE " PAGE_CHECKSUM=1" ""
+SHOW CREATE TABLE t2;
+SHOW CREATE VIEW v1;
+--error ER_VIEW_INVALID
+SELECT * FROM v1;
+--error ER_BAD_FIELD_ERROR
+UPDATE t2 SET f = f + 10;
+--error ER_BAD_FIELD_ERROR
+CALL sp1();
+DROP TRIGGER trg1;
+DROP PROCEDURE sp1;
+
+# Generated Columns
+if (!$MTR_COMBINATION_HEAP)
+{
+CREATE TABLE t_gen(a INT, b DOUBLE GENERATED ALWAYS AS (SQRT(a)));
+INSERT INTO t_gen(a) VALUES(4);
+SELECT * FROM t_gen;
+--replace_result $default_engine DEFAULT_ENGINE " PAGE_CHECKSUM=1" ""
+SHOW CREATE TABLE t_gen;
+ALTER TABLE t_gen RENAME COLUMN a TO c, CHANGE COLUMN b b DOUBLE GENERATED ALWAYS AS (SQRT(c));
+SELECT * FROM t_gen;
+--replace_result $default_engine DEFAULT_ENGINE " PAGE_CHECKSUM=1" ""
+SHOW CREATE TABLE t_gen;
+#--error ER_DEPENDENT_BY_GENERATED_COLUMN
+ALTER TABLE t_gen CHANGE COLUMN c x INT;
+--replace_result $default_engine DEFAULT_ENGINE " PAGE_CHECKSUM=1" ""
+show create table t_gen;
+#--error ER_DEPENDENT_BY_GENERATED_COLUMN
+ALTER TABLE t_gen RENAME COLUMN x TO a;
+DROP TABLE t_gen;
+}
+
+
+#
+# Negative tests
+#
+--replace_result $default_engine DEFAULT_ENGINE " PAGE_CHECKSUM=1" ""
+SHOW CREATE TABLE t1;
+
+# Invalid Syntax
+--error ER_PARSE_ERROR
+ALTER TABLE t1 RENAME COLUMN b z;
+--error ER_PARSE_ERROR
+ALTER TABLE t1 RENAME COLUMN FROM b TO z;
+--error ER_PARSE_ERROR
+ALTER TABLE t1 RENAME COLUMN b TO 1;
+
+# Duplicate column name
+--error ER_BAD_FIELD_ERROR
+ALTER TABLE t1 RENAME COLUMN b TO e, RENAME COLUMN c TO e;
+--error ER_DUP_FIELDNAME
+ALTER TABLE t1 ADD COLUMN z INT, RENAME COLUMN b TO z;
+
+# Multiple operation on same column
+--error ER_BAD_FIELD_ERROR
+ALTER TABLE t1 DROP COLUMN b, RENAME COLUMN b TO z;
+--error ER_BAD_FIELD_ERROR
+ALTER TABLE t1 RENAME COLUMN b TO b, RENAME COLUMN b TO b;
+--error ER_CANT_DROP_FIELD_OR_KEY
+ALTER TABLE t1 RENAME COLUMN b TO c3, DROP COLUMN c3;
+--error ER_BAD_FIELD_ERROR
+ALTER TABLE t1 ADD COLUMN z INT, CHANGE COLUMN z y INT, DROP COLUMN y;
+--error ER_BAD_FIELD_ERROR
+ALTER TABLE t1 ADD COLUMN z INT, RENAME COLUMN z TO y, DROP COLUMN y;
+
+# Invalid column name while renaming
+--error ER_WRONG_COLUMN_NAME
+ALTER TABLE t1 RENAME COLUMN b TO `nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn`;
+# This error is different compared to ALTER TABLE ... CHANGE command
+--error ER_TOO_LONG_IDENT
+ALTER TABLE t1 CHANGE b `nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn` int;
+
+--replace_result $default_engine DEFAULT_ENGINE " PAGE_CHECKSUM=1" ""
+SHOW CREATE TABLE t1;
+SELECT * FROM t1;
+
+# Cleanup
+DROP VIEW v1;
+DROP TABLE t3,t1,t2;
+SET DEFAULT_STORAGE_ENGINE= @save_default_engine;
+
+--echo #
+--echo # MDEV-7318 RENAME INDEX
+--echo #
+
+--echo #
+--echo # 1) Tests for syntax and semantics of ALTER TABLE RENAME
+--echo # KEY/INDEX result.
+--echo #
+--echo # 1.a) Both RENAME KEY and RENAME INDEX variants should be
+--echo # allowed and produce expected results.
+create table t1 (pk int primary key, i int, j int, key a(i));
+alter table t1 rename key a to b;
+show create table t1;
+alter table t1 rename index b to c;
+show create table t1;
+
+--echo # 1.b) It should be impossible to rename index that doesn't
+--echo # exists, dropped or added within the same ALTER TABLE.
+--error ER_KEY_DOES_NOT_EXISTS
+alter table t1 rename key d to e;
+alter table t1 rename key if exists d to e;
+show create table t1;
+--error ER_KEY_DOES_NOT_EXISTS
+alter table t1 drop key c, rename key c to d;
+show create table t1;
+--error ER_KEY_DOES_NOT_EXISTS
+alter table t1 add key d(j), rename key d to e;
+show create table t1;
+
+--echo # 1.c) It should be impossible to rename index to a name
+--echo # which is already used by another index, or is used
+--echo # by index which is added within the same ALTER TABLE.
+alter table t1 add key d(j);
+--error ER_DUP_KEYNAME
+alter table t1 rename key c to d;
+show create table t1;
+alter table t1 drop key d;
+--error ER_DUP_KEYNAME
+alter table t1 add key d(j), rename key c to d;
+show create table t1;
+
+--echo # 1.d) It should be possible to rename index to a name
+--echo # which belongs to index which is dropped within the
+--echo # same ALTER TABLE.
+alter table t1 add key d(j);
+alter table t1 drop key c, rename key d to c;
+show create table t1;
+
+--echo # 1.e) We disallow renaming from/to PRIMARY as it might
+--echo # lead to some other key becoming "primary" internally,
+--echo # which will be interpreted as dropping/addition of
+--echo # primary key.
+--error ER_PARSE_ERROR
+alter table t1 rename key primary to d;
+show create table t1;
+--echo # Even using 'funny' syntax.
+--error ER_WRONG_NAME_FOR_INDEX
+alter table t1 rename key `primary` to d;
+show create table t1;
+--error ER_PARSE_ERROR
+alter table t1 rename key c to primary;
+show create table t1;
+--error ER_WRONG_NAME_FOR_INDEX
+alter table t1 rename key c to `primary`;
+show create table t1;
+drop table t1;
+
+
+--echo #
+--echo # 2) More complex tests for semantics of ALTER TABLE.
+--echo #
+--echo # 2.a) Check that standalone RENAME KEY works as expected
+--echo # for unique and non-unique indexes.
+create table t1 (a int, unique u(a), b int, key k(b));
+alter table t1 rename key u to uu;
+show create table t1;
+alter table t1 rename key k to kk;
+show create table t1;
+
+--echo # 2.b) Check how that this clause can be mixed with other
+--echo # clauses which don't affect key or its columns.
+alter table t1 rename key kk to kkk, add column c int;
+show create table t1;
+alter table t1 rename key uu to uuu, add key c(c);
+show create table t1;
+alter table t1 rename key kkk to k, drop key uuu;
+show create table t1;
+alter table t1 rename key k to kk, rename to t2;
+show create table t2;
+drop table t2;
+
+
+--echo #
+--echo # 3) Test coverage for handling of RENAME INDEX clause in
+--echo # various storage engines and using different ALTER
+--echo # algorithm.
+--echo #
+--echo # 3.a) Test coverage for simple storage engines (MyISAM/Heap).
+create table t1 (i int, key k(i)) engine=myisam;
+insert into t1 values (1);
+create table t2 (i int, key k(i)) engine=memory;
+insert into t2 values (1);
+--echo # MyISAM and Heap should be able to handle key renaming in-place.
+alter table t1 algorithm=inplace, rename key k to kk;
+alter table t2 algorithm=inplace, rename key k to kk;
+show create table t1;
+show create table t2;
+--echo # So by default in-place algorithm should be chosen.
+--echo # (ALTER TABLE should report 0 rows affected).
+--enable_info
+alter table t1 rename key kk to kkk;
+alter table t2 rename key kk to kkk;
+--disable_info
+show create table t1;
+show create table t2;
+--echo # Copy algorithm should work as well.
+alter table t1 algorithm=copy, rename key kkk to kkkk;
+alter table t2 algorithm=copy, rename key kkk to kkkk;
+show create table t1;
+show create table t2;
+--echo # When renaming is combined with other in-place operation
+--echo # it still works as expected (i.e. works in-place).
+alter table t1 algorithm=inplace, rename key kkkk to k, alter column i set default 100;
+alter table t2 algorithm=inplace, rename key kkkk to k, alter column i set default 100;
+show create table t1;
+show create table t2;
+--echo # Combining with non-inplace operation results in the whole ALTER
+--echo # becoming non-inplace.
+--error ER_ALTER_OPERATION_NOT_SUPPORTED
+alter table t1 algorithm=inplace, rename key k to kk, add column j int;
+--error ER_ALTER_OPERATION_NOT_SUPPORTED
+alter table t2 algorithm=inplace, rename key k to kk, add column j int;
+drop table t1, t2;
+
+--echo # 3.b) Basic tests for InnoDB. More tests can be found in
+--echo # innodb.innodb_rename_index*
+create table t1 (i int, key k(i)) engine=innodb;
+insert into t1 values (1);
+--echo # Basic rename, inplace algorithm should be chosen
+--enable_info
+alter table t1 algorithm=inplace, rename key k to kk;
+--disable_info
+show create table t1;
+--echo # copy algorithm should work as well.
+--enable_info
+alter table t1 algorithm=copy, rename key kk to kkk;
+--disable_info
+show create table t1;
+drop table t1;
+
+--echo #
+--echo # 4) Additional coverage for complex cases in which code
+--echo # in ALTER TABLE comparing old and new table version
+--echo # got confused.
+--echo #
+--echo # Once InnoDB starts to support in-place index renaming the result
+--echo # of below statements should stay the same. Information about
+--echo # indexes returned by SHOW CREATE TABLE (from .FRM) and by
+--echo # InnoDB (from InnoDB data-dictionary) should be consistent.
+--echo #
+create table t1 ( a int, b int, c int, d int,
+ primary key (a), index i1 (b), index i2 (c) ) engine=innodb;
+alter table t1 add index i1 (d), rename index i1 to x;
+show create table t1;
+select i.name as k, f.name as c from information_schema.innodb_sys_tables as t,
+ information_schema.innodb_sys_indexes as i,
+ information_schema.innodb_sys_fields as f
+where t.name='test/t1' and t.table_id = i.table_id and i.index_id = f.index_id
+order by k, c;
+drop table t1;
+create table t1 (a int, b int, c int, d int,
+ primary key (a), index i1 (b), index i2 (c)) engine=innodb;
+alter table t1 add index i1 (d), rename index i1 to i2, drop index i2;
+show create table t1;
+select i.name as k, f.name as c from information_schema.innodb_sys_tables as t,
+ information_schema.innodb_sys_indexes as i,
+ information_schema.innodb_sys_fields as f
+where t.name='test/t1' and t.table_id = i.table_id and i.index_id = f.index_id
+order by k, c;
+drop table t1;
+
+--echo #
+--echo # ALTER TABLE IF EXISTS
+--echo #
+
+create table t1 (a int);
+alter table if exists t1 add column b int;
+alter table if exists t2 add column c int;
+alter table if exists t9 rename t1;
+alter table if exists t1 rename t2;
+show create table t2;
+drop table t2;
+
+--echo #
+--echo # MDEV-22881 Unexpected errors, corrupt output, Valgrind / ASAN errors in Item_ident::print or append_identifier
+--echo #
+create table t1 (a int check (a >= 0));
+lock tables t1 write;
+alter table t1 rename column a to a;
+alter table t1 rename key if exists x to xx;
+
+# cleanup
+unlock tables;
+drop table t1;
+
+--echo #
+--echo # MDEV-23852 alter table rename column to uppercase doesn't work
+--echo #
+create table t1 (abc int);
+alter table t1 rename column abc to Abc, algorithm=copy;
+show create table t1;
+alter table t1 rename column abc to ABc, algorithm=inplace;
+show create table t1;
+alter table t1 rename column abc to ABC;
+show create table t1;
+drop table t1;
+
+--echo #
+--echo # End of 10.5 tests
+--echo #
diff --git a/mysql-test/main/alter_table_debug.result b/mysql-test/main/alter_table_debug.result
new file mode 100644
index 00000000000..3366f1721cd
--- /dev/null
+++ b/mysql-test/main/alter_table_debug.result
@@ -0,0 +1,26 @@
+#
+# Start of 10.5 tests
+#
+#
+# MDEV-19612 Split ALTER related data type specific code in sql_table.cc to Type_handler
+#
+SET sql_mode='STRICT_ALL_TABLES,STRICT_TRANS_TABLES,NO_ZERO_DATE';
+CREATE TABLE t1 (a INT);
+ALTER TABLE t1 ALGORITHM=COPY, ADD b INT NOT NULL;
+DROP TABLE t1;
+SET sql_mode='STRICT_ALL_TABLES,STRICT_TRANS_TABLES,NO_ZERO_DATE';
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (0);
+ALTER TABLE t1 ALGORITHM=COPY, ADD b INT NOT NULL;
+DROP TABLE t1;
+SET sql_mode='STRICT_ALL_TABLES,STRICT_TRANS_TABLES,NO_ZERO_DATE';
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (0);
+SET debug_dbug='+d,validate_implicit_default_value_error';
+ALTER TABLE t1 ALGORITHM=COPY, ADD b INT NOT NULL;
+ERROR 22007: Incorrect int value: '0' for column `test`.`t1`.`b` at row 1
+SET debug_dbug='-d,validate_implicit_default_value_error';
+DROP TABLE t1;
+#
+# End of 10.5 tests
+#
diff --git a/mysql-test/main/alter_table_debug.test b/mysql-test/main/alter_table_debug.test
new file mode 100644
index 00000000000..8c9293b06b9
--- /dev/null
+++ b/mysql-test/main/alter_table_debug.test
@@ -0,0 +1,33 @@
+--source include/have_debug.inc
+
+--echo #
+--echo # Start of 10.5 tests
+--echo #
+
+--echo #
+--echo # MDEV-19612 Split ALTER related data type specific code in sql_table.cc to Type_handler
+--echo #
+
+SET sql_mode='STRICT_ALL_TABLES,STRICT_TRANS_TABLES,NO_ZERO_DATE';
+CREATE TABLE t1 (a INT);
+ALTER TABLE t1 ALGORITHM=COPY, ADD b INT NOT NULL;
+DROP TABLE t1;
+
+SET sql_mode='STRICT_ALL_TABLES,STRICT_TRANS_TABLES,NO_ZERO_DATE';
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (0);
+ALTER TABLE t1 ALGORITHM=COPY, ADD b INT NOT NULL;
+DROP TABLE t1;
+
+SET sql_mode='STRICT_ALL_TABLES,STRICT_TRANS_TABLES,NO_ZERO_DATE';
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (0);
+SET debug_dbug='+d,validate_implicit_default_value_error';
+--error ER_TRUNCATED_WRONG_VALUE
+ALTER TABLE t1 ALGORITHM=COPY, ADD b INT NOT NULL;
+SET debug_dbug='-d,validate_implicit_default_value_error';
+DROP TABLE t1;
+
+--echo #
+--echo # End of 10.5 tests
+--echo #
diff --git a/mysql-test/main/alter_table_mdev539_maria.result b/mysql-test/main/alter_table_mdev539_maria.result
index 0206f4070a0..01b2982edce 100644
--- a/mysql-test/main/alter_table_mdev539_maria.result
+++ b/mysql-test/main/alter_table_mdev539_maria.result
@@ -1,5 +1,5 @@
#
-set @@storage_engine= Aria;
+set @@default_storage_engine= Aria;
#
# mdev-539: fast build of unique/primary indexes for MyISAM/Aria
#
@@ -250,4 +250,4 @@ select * from customer where c_custkey=3;
c_custkey c_name c_address c_nationkey c_phone c_acctbal c_mktsegment c_comment
3 Customer#000000003 MG9kdTD2WBHm 1 11-719-748-3364 7498.12 AUTOMOBILE special packages wake. slyly reg
DROP DATABASE dbt3_s001;
-set @@storage_engine= default;
+set @@default_storage_engine= default;
diff --git a/mysql-test/main/alter_table_mdev539_maria.test b/mysql-test/main/alter_table_mdev539_maria.test
index 7e01bc3be84..2fead7bdab4 100644
--- a/mysql-test/main/alter_table_mdev539_maria.test
+++ b/mysql-test/main/alter_table_mdev539_maria.test
@@ -1,7 +1,7 @@
--echo #
-set @@storage_engine= Aria;
+set @@default_storage_engine= Aria;
--source include/alter_table_mdev539.inc
-set @@storage_engine= default;
+set @@default_storage_engine= default;
diff --git a/mysql-test/main/alter_table_mdev539_myisam.result b/mysql-test/main/alter_table_mdev539_myisam.result
index 0339a64c9c7..490e5a4073a 100644
--- a/mysql-test/main/alter_table_mdev539_myisam.result
+++ b/mysql-test/main/alter_table_mdev539_myisam.result
@@ -1,5 +1,5 @@
#
-set @@storage_engine= MyISAM;
+set @@default_storage_engine= MyISAM;
#
# mdev-539: fast build of unique/primary indexes for MyISAM/Aria
#
@@ -250,4 +250,4 @@ select * from customer where c_custkey=3;
c_custkey c_name c_address c_nationkey c_phone c_acctbal c_mktsegment c_comment
3 Customer#000000003 MG9kdTD2WBHm 1 11-719-748-3364 7498.12 AUTOMOBILE special packages wake. slyly reg
DROP DATABASE dbt3_s001;
-set @@storage_engine= default;
+set @@default_storage_engine= default;
diff --git a/mysql-test/main/alter_table_mdev539_myisam.test b/mysql-test/main/alter_table_mdev539_myisam.test
index 0a5669088bf..c600e37c52c 100644
--- a/mysql-test/main/alter_table_mdev539_myisam.test
+++ b/mysql-test/main/alter_table_mdev539_myisam.test
@@ -1,7 +1,7 @@
--echo #
-set @@storage_engine= MyISAM;
+set @@default_storage_engine= MyISAM;
--source include/alter_table_mdev539.inc
-set @@storage_engine= default;
+set @@default_storage_engine= default;
diff --git a/mysql-test/main/alter_table_online.result b/mysql-test/main/alter_table_online.result
index 2e3de2c0635..719d6fe1751 100644
--- a/mysql-test/main/alter_table_online.result
+++ b/mysql-test/main/alter_table_online.result
@@ -253,19 +253,19 @@ Feature_delay_key_write 0
alter online table t1 delay_key_write=1;
show status like 'Feature_delay_key_write';
Variable_name Value
-Feature_delay_key_write 1
+Feature_delay_key_write 0
flush tables;
insert t1 values (1,2),(2,3),(3,4);
show status like 'Feature_delay_key_write';
Variable_name Value
-Feature_delay_key_write 2
+Feature_delay_key_write 1
alter online table t1 delay_key_write=0;
show status like 'Feature_delay_key_write';
Variable_name Value
-Feature_delay_key_write 2
+Feature_delay_key_write 1
flush tables;
insert t1 values (1,2),(2,3),(3,4);
show status like 'Feature_delay_key_write';
Variable_name Value
-Feature_delay_key_write 2
+Feature_delay_key_write 1
drop table t1;
diff --git a/mysql-test/main/alter_user.result b/mysql-test/main/alter_user.result
index 0dcec5835b7..0bbf0aa6788 100644
--- a/mysql-test/main/alter_user.result
+++ b/mysql-test/main/alter_user.result
@@ -21,26 +21,30 @@ alter user foo;
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 N N 0.000000
-# Test super privilege works correctly with a read only database.
+#
+# Test READ_ONLY privilege works correctly with a read only database.
+#
SET @start_read_only = @@global.read_only;
SET GLOBAL read_only=1;
grant create user on *.* to foo;
-# Currently no super privileges.
+# Currently no READ_ONLY ADMIN privileges.
connect a, localhost, foo;
select @@global.read_only;
@@global.read_only
1
alter user foo;
ERROR HY000: The MariaDB server is running with the --read-only option so it cannot execute this statement
-# Grant super privilege to the user.
+# Grant READ_ONLY ADMIN privilege to the user.
connection default;
-grant super on *.* to foo;
-# We now have super privilege. We should be able to run alter user.
+grant READ_ONLY ADMIN on *.* to foo;
+# We now have READ_ONLY ADMIN privilege. We should be able to run alter user.
connect b, localhost, foo;
alter user foo;
connection default;
SET GLOBAL read_only = @start_read_only;
+#
# Test inexistant user.
+#
alter user boo;
ERROR HY000: Operation ALTER USER failed for 'boo'
#--warning ER_CANNOT_USER
@@ -48,23 +52,25 @@ alter user if exists boo;
Warnings:
Error 1133 Can't find any matching row in the user table
Note 1396 Operation ALTER USER failed for 'boo'
+#
# Test password related altering.
+#
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 *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
+% foo *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 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 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 *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
+% foo *9CD58369E930E28C8996A89DB18B63294E6DC10C 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 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 *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
+% foo *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 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 Y N N N N 0 0 0 0 mysql_native_password *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N 0.000000
alter user foo identified by password 'invalid';
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 invalid 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 invalid N N 0.000000
+% foo invalid 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 Y N N N N 0 0 0 0 mysql_native_password invalid N N 0.000000
alter user foo identified with 'somecoolplugin';
ERROR HY000: Operation ALTER USER failed for 'foo'@'%'
show warnings;
@@ -74,32 +80,36 @@ Error 1396 Operation ALTER USER failed for 'foo'@'%'
alter user foo identified with 'mysql_old_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 Y N N N N N N N N N Y N N N N 0 0 0 0 mysql_old_password N N 0.000000
+% 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 Y N N N N 0 0 0 0 mysql_old_password N N 0.000000
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 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
+% foo 0123456789ABCDEF 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 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 *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
+% foo *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 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 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 *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
+% foo *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 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 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 *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
+% foo *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 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 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
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 *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
+% foo *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 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 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.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 5a05a671277..37f77c26496 100644
--- a/mysql-test/main/alter_user.test
+++ b/mysql-test/main/alter_user.test
@@ -16,36 +16,47 @@ select * from mysql.user where user = 'foo';
alter user foo;
select * from mysql.user where user = 'foo';
---echo # Test super privilege works correctly with a read only database.
+--echo #
+--echo # Test READ_ONLY privilege works correctly with a read only database.
+--echo #
+
SET @start_read_only = @@global.read_only;
SET GLOBAL read_only=1;
grant create user on *.* to foo;
---echo # Currently no super privileges.
+--echo # Currently no READ_ONLY ADMIN privileges.
connect (a, localhost, foo);
select @@global.read_only;
--error ER_OPTION_PREVENTS_STATEMENT
alter user foo;
---echo # Grant super privilege to the user.
+--echo # Grant READ_ONLY ADMIN privilege to the user.
connection default;
-grant super on *.* to foo;
+grant READ_ONLY ADMIN on *.* to foo;
---echo # We now have super privilege. We should be able to run alter user.
+--echo # We now have READ_ONLY ADMIN privilege. We should be able to run alter user.
connect (b, localhost, foo);
alter user foo;
connection default;
SET GLOBAL read_only = @start_read_only;
+
+--echo #
--echo # Test inexistant user.
+--echo #
+
--error ER_CANNOT_USER
alter user boo;
--echo #--warning ER_CANNOT_USER
alter user if exists boo;
+
+--echo #
--echo # Test password related altering.
+--echo #
+
alter user foo identified by 'something';
select * from mysql.user where user = 'foo';
@@ -68,7 +79,11 @@ select * from mysql.user where user = 'foo';
alter user foo identified with 'mysql_old_password' using '0123456789ABCDEF';
select * from mysql.user where user = 'foo';
+
+--echo #
--echo # Test ssl related altering.
+--echo #
+
alter user foo identified by 'something' require SSL;
select * from mysql.user where user = 'foo';
@@ -79,7 +94,11 @@ alter user foo identified by 'something'
require cipher 'text' issuer 'foo_issuer' subject 'foo_subject';
select * from mysql.user where user = 'foo';
+
+--echo #
--echo # Test resource limits altering.
+--echo #
+
alter user foo with MAX_QUERIES_PER_HOUR 10
MAX_UPDATES_PER_HOUR 20
MAX_CONNECTIONS_PER_HOUR 30
diff --git a/mysql-test/main/analyze_format_json.result b/mysql-test/main/analyze_format_json.result
index c306c2fc1b3..fc643d1a8af 100644
--- a/mysql-test/main/analyze_format_json.result
+++ b/mysql-test/main/analyze_format_json.result
@@ -15,7 +15,8 @@ ANALYZE
"r_loops": 1,
"rows": 10,
"r_rows": 10,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 30,
"attached_condition": "t0.a < 3"
@@ -43,7 +44,8 @@ ANALYZE
"r_loops": 1,
"rows": 10,
"r_rows": 10,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 0,
"attached_condition": "t0.a > 9 and t0.a is not null"
@@ -83,7 +85,8 @@ ANALYZE
"r_loops": 1,
"rows": 10,
"r_rows": 10,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100,
"attached_condition": "t0.a is not null"
@@ -99,7 +102,8 @@ ANALYZE
"r_loops": 10,
"rows": 1,
"r_rows": 1,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 40,
"attached_condition": "t1.b < 4"
@@ -125,7 +129,8 @@ ANALYZE
"r_loops": 1,
"rows": 100,
"r_rows": 100,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 20,
"attached_condition": "tbl1.b < 20"
@@ -137,7 +142,8 @@ ANALYZE
"r_loops": 1,
"rows": 100,
"r_rows": 100,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 60,
"attached_condition": "tbl2.b < 60"
@@ -163,7 +169,8 @@ ANALYZE
"r_loops": 1,
"rows": 100,
"r_rows": 100,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 20,
"attached_condition": "tbl1.b < 20"
@@ -175,7 +182,8 @@ ANALYZE
"r_loops": 1,
"rows": 100,
"r_rows": 100,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 60,
"attached_condition": "tbl2.b < 60"
@@ -184,7 +192,7 @@ ANALYZE
"buffer_size": "1Kb",
"join_type": "BNL",
"attached_condition": "tbl1.c > tbl2.c",
- "r_filtered": 15.833
+ "r_filtered": 15.83333333
}
}
}
@@ -210,7 +218,8 @@ ANALYZE
"r_loops": 1,
"rows": 10,
"r_rows": 10,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100,
"attached_condition": "t1.a is not null"
@@ -226,7 +235,8 @@ ANALYZE
"r_loops": 10,
"rows": 2,
"r_rows": 0.2,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100,
"using_index": true
@@ -260,7 +270,8 @@ ANALYZE
"r_loops": 1,
"rows": 10,
"r_rows": 10,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 50,
"attached_condition": "test.t1.a < 5"
@@ -317,7 +328,8 @@ ANALYZE
"r_loops": 1,
"rows": 10,
"r_rows": 10,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 50,
"index_condition": "t1.pk < 10",
@@ -382,7 +394,8 @@ ANALYZE
"r_loops": 1,
"rows": 5,
"r_rows": 5,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100
},
@@ -405,9 +418,10 @@ ANALYZE
"r_loops": 5,
"rows": 1010,
"r_rows": 203.8,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
- "r_filtered": 98.135
+ "r_filtered": 98.13542689
}
}
}
@@ -441,7 +455,8 @@ ANALYZE
"r_loops": 1,
"rows": 10,
"r_rows": 10,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 50,
"attached_condition": "tbl1.a < 5"
@@ -460,7 +475,8 @@ ANALYZE
"r_loops": 1,
"rows": 10,
"r_rows": 10,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 20,
"attached_condition": "tbl2.a in (2,3)"
@@ -501,6 +517,7 @@ ANALYZE
"r_used_priority_queue": false,
"r_output_rows": 0,
"r_buffer_size": "REPLACED",
+ "r_sort_mode": "sort_key,rowid",
"temporary_table": {
"table": {
"table_name": "t2",
@@ -508,7 +525,8 @@ ANALYZE
"r_loops": 1,
"rows": 256,
"r_rows": 256,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100
}
@@ -531,6 +549,7 @@ ANALYZE
"r_used_priority_queue": false,
"r_output_rows": 256,
"r_buffer_size": "REPLACED",
+ "r_sort_mode": "sort_key,rowid",
"temporary_table": {
"table": {
"table_name": "t2",
@@ -538,7 +557,8 @@ ANALYZE
"r_loops": 1,
"rows": 256,
"r_rows": 256,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100
}
@@ -572,6 +592,7 @@ ANALYZE
"r_used_priority_queue": false,
"r_output_rows": 256,
"r_buffer_size": "REPLACED",
+ "r_sort_mode": "sort_key,rowid",
"temporary_table": {
"table": {
"table_name": "t2",
@@ -579,7 +600,8 @@ ANALYZE
"r_loops": 1,
"rows": 256,
"r_rows": 256,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100
}
@@ -608,7 +630,8 @@ ANALYZE
"r_loops": 1,
"rows": 2,
"r_rows": 2,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100
},
@@ -619,7 +642,8 @@ ANALYZE
"r_loops": 1,
"rows": 2,
"r_rows": 2,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 0,
"attached_condition": "<in_optimizer>(t2.b,t2.b in (subquery#2))"
@@ -642,7 +666,8 @@ ANALYZE
"r_loops": 1,
"rows": 2,
"r_rows": 2,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100
}
@@ -679,6 +704,7 @@ ANALYZE
"r_used_priority_queue": false,
"r_output_rows": 0,
"r_buffer_size": "REPLACED",
+ "r_sort_mode": "packed_sort_key,rowid",
"temporary_table": {
"filesort": {
"sort_key": "(subquery#2)",
@@ -687,6 +713,7 @@ ANALYZE
"r_used_priority_queue": false,
"r_output_rows": 0,
"r_buffer_size": "REPLACED",
+ "r_sort_mode": "sort_key,rowid",
"temporary_table": {
"table": {
"table_name": "t2",
@@ -694,7 +721,8 @@ ANALYZE
"r_loops": 1,
"rows": 2,
"r_rows": 2,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100
},
@@ -705,7 +733,8 @@ ANALYZE
"r_loops": 1,
"rows": 2,
"r_rows": 2,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 0,
"attached_condition": "t3.f3 in (1,2)"
@@ -779,7 +808,8 @@ ANALYZE
"r_loops": 1,
"rows": 10,
"r_rows": 10,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 0,
"attached_condition": "t1.a < 0"
@@ -799,6 +829,7 @@ ANALYZE
"r_limit": null,
"r_used_priority_queue": null,
"r_output_rows": null,
+ "r_sort_mode": "sort_key,rowid",
"table": {
"table_name": "t2",
"access_type": "ALL",
diff --git a/mysql-test/main/analyze_stmt_orderby.result b/mysql-test/main/analyze_stmt_orderby.result
index 23f4c39dd5b..11736c47a49 100644
--- a/mysql-test/main/analyze_stmt_orderby.result
+++ b/mysql-test/main/analyze_stmt_orderby.result
@@ -44,6 +44,7 @@ ANALYZE
"r_limit": 5,
"r_used_priority_queue": true,
"r_output_rows": 6,
+ "r_sort_mode": "sort_key,rowid",
"table": {
"update": 1,
"table_name": "t2",
@@ -145,6 +146,7 @@ ANALYZE
"r_used_priority_queue": false,
"r_output_rows": 10000,
"r_buffer_size": "REPLACED",
+ "r_sort_mode": "sort_key,rowid",
"table": {
"delete": 1,
"table_name": "t2",
@@ -211,6 +213,7 @@ ANALYZE
"r_limit": 4,
"r_used_priority_queue": true,
"r_output_rows": 4,
+ "r_sort_mode": "sort_key,rowid",
"temporary_table": {
"table": {
"table_name": "t0",
@@ -218,7 +221,8 @@ ANALYZE
"r_loops": 1,
"rows": 10,
"r_rows": 10,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100,
"attached_condition": "t0.a is not null"
@@ -234,7 +238,8 @@ ANALYZE
"r_loops": 10,
"rows": 1,
"r_rows": 0.4,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100
}
@@ -298,13 +303,15 @@ ANALYZE
"r_used_priority_queue": false,
"r_output_rows": 10,
"r_buffer_size": "REPLACED",
+ "r_sort_mode": "sort_key,addon_fields",
"table": {
"table_name": "t0",
"access_type": "ALL",
"r_loops": 1,
"rows": 10,
"r_rows": 10,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100,
"attached_condition": "t0.a is not null"
@@ -322,7 +329,8 @@ ANALYZE
"r_loops": 10,
"rows": 1,
"r_rows": 0.4,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100
}
@@ -355,6 +363,7 @@ ANALYZE
"r_used_priority_queue": false,
"r_output_rows": 10,
"r_buffer_size": "REPLACED",
+ "r_sort_mode": "sort_key,rowid",
"temporary_table": {
"table": {
"table_name": "t2",
@@ -362,7 +371,8 @@ ANALYZE
"r_loops": 1,
"rows": 1000,
"r_rows": 1000,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 50,
"attached_condition": "t2.a MOD 2 = 0"
@@ -410,7 +420,8 @@ ANALYZE
"r_loops": 1,
"rows": 10,
"r_rows": 10,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100
},
@@ -421,7 +432,8 @@ ANALYZE
"r_loops": 1,
"rows": 10,
"r_rows": 10,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100
},
@@ -465,6 +477,7 @@ ANALYZE
"r_limit": 1,
"r_used_priority_queue": true,
"r_output_rows": 2,
+ "r_sort_mode": "sort_key,rowid",
"temporary_table": {
"filesort": {
"sort_key": "t5.a",
@@ -473,6 +486,7 @@ ANALYZE
"r_used_priority_queue": false,
"r_output_rows": 6,
"r_buffer_size": "REPLACED",
+ "r_sort_mode": "sort_key,rowid",
"temporary_table": {
"table": {
"table_name": "t6",
@@ -480,7 +494,8 @@ ANALYZE
"r_loops": 1,
"rows": 5,
"r_rows": 5,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 80,
"attached_condition": "t6.b > 0 and t6.a <= 5"
@@ -492,7 +507,8 @@ ANALYZE
"r_loops": 1,
"rows": 7,
"r_rows": 7,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100
},
@@ -500,7 +516,7 @@ ANALYZE
"buffer_size": "119",
"join_type": "BNL",
"attached_condition": "t5.a = t6.a",
- "r_filtered": 21.429
+ "r_filtered": 21.42857143
}
}
}
@@ -586,7 +602,8 @@ ANALYZE
"r_loops": 1,
"rows": 7,
"r_rows": 20,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100,
"using_index_for_group_by": true
diff --git a/mysql-test/main/backup_interaction.result b/mysql-test/main/backup_interaction.result
index 3c3071b8e70..a6fe7cf448d 100644
--- a/mysql-test/main/backup_interaction.result
+++ b/mysql-test/main/backup_interaction.result
@@ -37,7 +37,7 @@ unlock tables;
#
backup stage start;
unlock tables;
-select lock_mode from information_schema.metadata_lock_info;
+select lock_mode from information_schema.metadata_lock_info where thread_id>0;
lock_mode
MDL_BACKUP_START
lock table t1 write;
@@ -98,11 +98,11 @@ drop table t1;
create table t1(a int) engine=InnoDB;
begin;
insert into t1 values(1);
-select lock_mode from information_schema.metadata_lock_info;
+select lock_mode from information_schema.metadata_lock_info where thread_id>0;
lock_mode
MDL_SHARED_WRITE
backup stage start;
-select lock_mode from information_schema.metadata_lock_info;
+select lock_mode from information_schema.metadata_lock_info where thread_id>0;
lock_mode
MDL_BACKUP_START
backup stage block_commit;
@@ -205,12 +205,12 @@ begin;
select * from t1;
col1
1
-select lock_mode from information_schema.metadata_lock_info;
+select lock_mode from information_schema.metadata_lock_info where thread_id>0;
lock_mode
MDL_BACKUP_WAIT_COMMIT
MDL_SHARED_READ
backup stage end;
-select lock_mode from information_schema.metadata_lock_info;
+select lock_mode from information_schema.metadata_lock_info where thread_id>0;
lock_mode
drop table t1;
#
diff --git a/mysql-test/main/backup_interaction.test b/mysql-test/main/backup_interaction.test
index 09ed769c898..a398a4a2d2d 100644
--- a/mysql-test/main/backup_interaction.test
+++ b/mysql-test/main/backup_interaction.test
@@ -52,7 +52,7 @@ unlock tables;
--echo #
backup stage start;
unlock tables;
-select lock_mode from information_schema.metadata_lock_info;
+select lock_mode from information_schema.metadata_lock_info where thread_id>0;
--error ER_BACKUP_LOCK_IS_ACTIVE
lock table t1 write;
@@ -121,9 +121,9 @@ drop table t1;
create table t1(a int) engine=InnoDB;
begin;
insert into t1 values(1);
-select lock_mode from information_schema.metadata_lock_info;
+select lock_mode from information_schema.metadata_lock_info where thread_id>0;
backup stage start;
-select lock_mode from information_schema.metadata_lock_info;
+select lock_mode from information_schema.metadata_lock_info where thread_id>0;
backup stage block_commit;
commit;
backup stage end;
@@ -224,9 +224,9 @@ backup stage start;
backup stage block_commit;
begin;
select * from t1;
-select lock_mode from information_schema.metadata_lock_info;
+select lock_mode from information_schema.metadata_lock_info where thread_id>0;
backup stage end;
-select lock_mode from information_schema.metadata_lock_info;
+select lock_mode from information_schema.metadata_lock_info where thread_id>0;
drop table t1;
--echo #
diff --git a/mysql-test/main/backup_lock.result b/mysql-test/main/backup_lock.result
index 95b2f520d90..96503814d00 100644
--- a/mysql-test/main/backup_lock.result
+++ b/mysql-test/main/backup_lock.result
@@ -192,28 +192,71 @@ BACKUP STAGE END;
SET GLOBAL lock_wait_timeout=0;
CREATE TABLE t_permanent_innodb (col1 INT) ENGINE = InnoDB;
CREATE TABLE t_permanent_myisam (col1 INT) ENGINE = MyISAM;
+CREATE TABLE t_permanent_aria (col1 INT) ENGINE = Aria transactional=1;
+CREATE TABLE t_permanent_aria2 (col1 INT) ENGINE = Aria transactional=0;
INSERT INTO t_permanent_innodb SET col1 = 1;
INSERT INTO t_permanent_myisam SET col1 = 1;
+INSERT INTO t_permanent_aria SET col1 = 1;
+INSERT INTO t_permanent_aria2 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;
+SET AUTOCOMMIT = 1;
+UPDATE t_permanent_aria SET col1 = 1;
+UPDATE t_permanent_innodb SET col1 = 1;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
UPDATE t_permanent_innodb SET col1 = 8;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
UPDATE t_permanent_myisam SET col1 = 8;
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+UPDATE t_permanent_aria SET col1 = 8;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+UPDATE t_permanent_aria2 SET col1 = 8;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+select * from t_permanent_innodb;
+col1
+1
+select * from t_permanent_myisam;
+col1
+1
+select * from t_permanent_aria;
+col1
+8
+select * from t_permanent_aria2;
+col1
+1
+SET AUTOCOMMIT = 0;
+UPDATE t_permanent_innodb SET col1 = 9;
+UPDATE t_permanent_aria SET col1 = 9;
+UPDATE t_permanent_myisam SET col1 = 9;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+UPDATE t_permanent_aria2 SET col1 = 9;
+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;
+select * from t_permanent_innodb;
+col1
+1
+select * from t_permanent_myisam;
+col1
+1
+select * from t_permanent_aria;
+col1
+9
+select * from t_permanent_aria2;
+col1
+1
+DROP TABLE t_permanent_myisam, t_permanent_innodb, t_permanent_aria, t_permanent_aria2;
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
index d6db7a6364e..0d4da8cb892 100644
--- a/mysql-test/main/backup_lock.test
+++ b/mysql-test/main/backup_lock.test
@@ -251,14 +251,17 @@ BACKUP STAGE END;
SET GLOBAL lock_wait_timeout=0;
CREATE TABLE t_permanent_innodb (col1 INT) ENGINE = InnoDB;
CREATE TABLE t_permanent_myisam (col1 INT) ENGINE = MyISAM;
+CREATE TABLE t_permanent_aria (col1 INT) ENGINE = Aria transactional=1;
+CREATE TABLE t_permanent_aria2 (col1 INT) ENGINE = Aria transactional=0;
INSERT INTO t_permanent_innodb SET col1 = 1;
-
INSERT INTO t_permanent_myisam SET col1 = 1;
+INSERT INTO t_permanent_aria SET col1 = 1;
+INSERT INTO t_permanent_aria2 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;
@@ -267,10 +270,36 @@ BACKUP STAGE BLOCK_DDL;
BACKUP STAGE BLOCK_COMMIT;
--connection con1
+SET AUTOCOMMIT = 1;
+
+# These should work as values are not changed
+UPDATE t_permanent_aria SET col1 = 1;
+--error ER_LOCK_WAIT_TIMEOUT
+UPDATE t_permanent_innodb SET col1 = 1;
+
+--error ER_LOCK_WAIT_TIMEOUT
UPDATE t_permanent_innodb SET col1 = 8;
--error ER_LOCK_WAIT_TIMEOUT
UPDATE t_permanent_myisam SET col1 = 8;
--error ER_LOCK_WAIT_TIMEOUT
+UPDATE t_permanent_aria SET col1 = 8;
+--error ER_LOCK_WAIT_TIMEOUT
+UPDATE t_permanent_aria2 SET col1 = 8;
+
+select * from t_permanent_innodb;
+select * from t_permanent_myisam;
+select * from t_permanent_aria;
+select * from t_permanent_aria2;
+
+SET AUTOCOMMIT = 0;
+UPDATE t_permanent_innodb SET col1 = 9;
+UPDATE t_permanent_aria SET col1 = 9;
+--error ER_LOCK_WAIT_TIMEOUT
+UPDATE t_permanent_myisam SET col1 = 9;
+--error ER_LOCK_WAIT_TIMEOUT
+UPDATE t_permanent_aria2 SET col1 = 9;
+
+--error ER_LOCK_WAIT_TIMEOUT
DROP TABLE t_con1_innodb;
--error ER_LOCK_WAIT_TIMEOUT
@@ -278,7 +307,13 @@ DROP TABLE t_con1_myisam;
--connection default
BACKUP STAGE END;
-DROP TABLE t_permanent_myisam, t_permanent_innodb;
+
+select * from t_permanent_innodb;
+select * from t_permanent_myisam;
+select * from t_permanent_aria;
+select * from t_permanent_aria2;
+
+DROP TABLE t_permanent_myisam, t_permanent_innodb, t_permanent_aria, t_permanent_aria2;
DROP TABLE t_con1_innodb, t_con1_myisam;
--disconnect con1
set global lock_wait_timeout=default;
diff --git a/mysql-test/main/brackets.result b/mysql-test/main/brackets.result
index c221d64fd17..69b479d7820 100644
--- a/mysql-test/main/brackets.result
+++ b/mysql-test/main/brackets.result
@@ -54,7 +54,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
3 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used
NULL UNION RESULT <union1,4> ALL NULL NULL NULL NULL NULL NULL
Warnings:
-Note 1003 /* select#1 */ select 1 AS `1` union /* select#4 */ select `__4`.`1` AS `1` from (/* select#2 */ select 1 AS `1` union all /* select#3 */ select 1 AS `1`) `__4`
+Note 1003 /* select#1 */ select 1 AS `1` union /* select#4 */ select `__4`.`1` AS `1` from (/* select#2 */ select 1 AS `1` union /* select#3 */ select 1 AS `1`) `__4`
select 1 union select 1 union all select 1;
1
1
@@ -4454,7 +4454,7 @@ create view v1 as
with t(a) as (values (2), (1)) select a from t;
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 with t(a) as (values (2),(1))select `t`.`a` AS `a` from `t` latin1 latin1_swedish_ci
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS with t(`a`) as (values (2),(1))select `t`.`a` AS `a` from `t` latin1 latin1_swedish_ci
select * from v1;
a
2
@@ -4469,7 +4469,7 @@ order by 1 desc limit 3 )
select a from t1 where a=4 union select a from t where a=7 order by a desc;
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 with t(a) as (values (2),(1) union (values (4),(7)) order by 1 desc limit 3)select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = 4 union select `t`.`a` AS `a` from `t` where `t`.`a` = 7 order by `a` desc latin1 latin1_swedish_ci
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS with t(`a`) as (values (2),(1) union (values (4),(7)) order by 1 desc limit 3)select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = 4 union select `t`.`a` AS `a` from `t` where `t`.`a` = 7 order by `a` desc latin1 latin1_swedish_ci
select * from v1;
a
7
@@ -4484,7 +4484,7 @@ order by 1 desc limit 3 )
select a from t1 where a=1 union select a from t where a=7 order by a desc;
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 with t(a) as ((values (2),(1)) union (values (4),(7) order by 1 desc) order by 1 desc limit 3)select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = 1 union select `t`.`a` AS `a` from `t` where `t`.`a` = 7 order by `a` desc latin1 latin1_swedish_ci
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS with t(`a`) as ((values (2),(1)) union (values (4),(7) order by 1 desc) order by 1 desc limit 3)select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = 1 union select `t`.`a` AS `a` from `t` where `t`.`a` = 7 order by `a` desc latin1 latin1_swedish_ci
select * from v1;
a
7
diff --git a/mysql-test/main/cache_innodb.result b/mysql-test/main/cache_innodb.result
index 18ae0ac8a83..d6e67b472b0 100644
--- a/mysql-test/main/cache_innodb.result
+++ b/mysql-test/main/cache_innodb.result
@@ -1,6 +1,6 @@
SET global query_cache_type=ON;
SET local query_cache_type=ON;
-SET SESSION STORAGE_ENGINE = InnoDB;
+SET SESSION DEFAULT_STORAGE_ENGINE = InnoDB;
drop table if exists t1,t2,t3;
set @save_query_cache_size = @@global.query_cache_size;
set GLOBAL query_cache_size = 1355776;
@@ -132,7 +132,7 @@ id a
1 me
drop table t3,t2,t1;
connect connection1,localhost,root,,;
-SET SESSION STORAGE_ENGINE = InnoDB;
+SET SESSION DEFAULT_STORAGE_ENGINE = InnoDB;
SET @@autocommit=1;
connection default;
SHOW VARIABLES LIKE 'have_query_cache';
@@ -141,7 +141,7 @@ have_query_cache YES
SET GLOBAL query_cache_size = 204800;
flush status;
SET @@autocommit=1;
-SET SESSION STORAGE_ENGINE = InnoDB;
+SET SESSION DEFAULT_STORAGE_ENGINE = InnoDB;
CREATE TABLE t2 (s1 int, s2 varchar(1000), key(s1));
INSERT INTO t2 VALUES (1,repeat('a',10)),(2,repeat('a',10)),(3,repeat('a',10)),(4,repeat('a',10));
COMMIT;
diff --git a/mysql-test/main/column_compression.result b/mysql-test/main/column_compression.result
index bd843736ccc..01f906b5f31 100644
--- a/mysql-test/main/column_compression.result
+++ b/mysql-test/main/column_compression.result
@@ -2672,3 +2672,19 @@ SET column_compression_threshold=0;
INSERT INTO t1 VALUES('aa');
SET column_compression_threshold=DEFAULT;
DROP TABLE t1;
+#
+# End of 10.3 tests
+#
+#
+# Start of 10.5 tests
+#
+#
+# MDEV-19727 Add Type_handler::Key_part_spec_init_ft
+#
+CREATE TABLE t1 (a VARCHAR(1000) COMPRESSED, FULLTEXT INDEX(a));
+ERROR HY000: Compressed column 'a' can't be used in key specification
+CREATE TABLE t1 (a TEXT COMPRESSED, FULLTEXT INDEX(a));
+ERROR HY000: Compressed column 'a' can't be used in key specification
+#
+# End of 10.5 tests
+#
diff --git a/mysql-test/main/column_compression.test b/mysql-test/main/column_compression.test
index 1560b23ad3e..2ae50be95d2 100644
--- a/mysql-test/main/column_compression.test
+++ b/mysql-test/main/column_compression.test
@@ -256,7 +256,6 @@ CREATE TABLE t1 (a NVARCHAR(10) COMPRESSED BINARY COMPRESSED);
--error ER_PARSE_ERROR
CREATE TABLE t1 (a NVARCHAR(10) COMPRESSED DEFAULT '' COMPRESSED);
-
--echo #
--echo # MDEV-21348 - Memory leak in Storage-Engine Independent Column
--echo # Compression
@@ -266,3 +265,32 @@ SET column_compression_threshold=0;
INSERT INTO t1 VALUES('aa');
SET column_compression_threshold=DEFAULT;
DROP TABLE t1;
+
+--echo #
+--echo # End of 10.3 tests
+--echo #
+
+
+--echo #
+--echo # Start of 10.5 tests
+--echo #
+
+--echo #
+--echo # MDEV-19727 Add Type_handler::Key_part_spec_init_ft
+--echo #
+
+#
+# Indexes on COMPRESSED columns are generally prohibited, so we don't have
+# to override Type_handler_xxx_compressed::Key_part_spec_init_ft().
+# Note, we could support FULLTEXT indexes on compressed columns eventually.
+#
+
+--error ER_COMPRESSED_COLUMN_USED_AS_KEY
+CREATE TABLE t1 (a VARCHAR(1000) COMPRESSED, FULLTEXT INDEX(a));
+
+--error ER_COMPRESSED_COLUMN_USED_AS_KEY
+CREATE TABLE t1 (a TEXT COMPRESSED, FULLTEXT INDEX(a));
+
+--echo #
+--echo # End of 10.5 tests
+--echo #
diff --git a/mysql-test/main/comment_column.test b/mysql-test/main/comment_column.test
index a4f3893dd4a..e883f64766a 100644
--- a/mysql-test/main/comment_column.test
+++ b/mysql-test/main/comment_column.test
@@ -6,7 +6,7 @@ create table t1 (c1 VARCHAR(10) NOT NULL COMMENT 'Abcdefghijabcdefghijabcdefghij
SELECT table_comment,char_length(table_comment) FROM information_schema.tables WHERE table_name='t1';
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
SELECT comment,index_comment,char_length(index_comment) FROM information_schema.statistics WHERE table_name='t1';
-let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
+let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='DEFAULT_STORAGE_ENGINE'`;
--replace_result $ENGINE ENGINE
SHOW CREATE TABLE t1;
@@ -14,7 +14,7 @@ ALTER TABLE t1 ADD COLUMN c8 INTEGER COMMENT 'ABCdefghijabcdefghijabcdefghijabcd
SELECT table_comment,char_length(table_comment) FROM information_schema.tables WHERE table_name='t1';
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
SELECT comment,index_comment,char_length(index_comment) FROM information_schema.statistics WHERE table_name='t1';
-let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
+let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='DEFAULT_STORAGE_ENGINE'`;
--replace_result $ENGINE ENGINE
SHOW CREATE TABLE t1;
@@ -23,7 +23,7 @@ ALTER TABLE t1 ADD COLUMN c9 INTEGER COMMENT 'ABCDefghijabcdefghijabcdefghijabcd
SELECT table_comment,char_length(table_comment) FROM information_schema.tables WHERE table_name='t1';
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
SELECT comment,index_comment,char_length(index_comment) FROM information_schema.statistics WHERE table_name='t1';
-let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
+let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='DEFAULT_STORAGE_ENGINE'`;
--replace_result $ENGINE ENGINE
SHOW CREATE TABLE t1;
@@ -32,7 +32,7 @@ ALTER TABLE t1 ADD COLUMN c10 INTEGER COMMENT 'ABCDEfghijabcdefghijabcdefghijabc
SELECT table_comment,char_length(table_comment) FROM information_schema.tables WHERE table_name='t1';
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
SELECT comment,index_comment,char_length(index_comment) FROM information_schema.statistics WHERE table_name='t1';
-let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
+let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='DEFAULT_STORAGE_ENGINE'`;
--replace_result $ENGINE ENGINE
SHOW CREATE TABLE t1;
@@ -41,14 +41,14 @@ ALTER TABLE t1 MODIFY COLUMN c8 CHAR(10);
SELECT table_comment,char_length(table_comment) FROM information_schema.tables WHERE table_name='t1';
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
SELECT comment,index_comment,char_length(index_comment) FROM information_schema.statistics WHERE table_name='t1';
-let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
+let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='DEFAULT_STORAGE_ENGINE'`;
--replace_result $ENGINE ENGINE
SHOW CREATE TABLE t1;
ALTER TABLE t1 CHANGE COLUMN c9 c9_1 INTEGER COMMENT '1234567890';
SELECT table_comment,char_length(table_comment) FROM information_schema.tables WHERE table_name='t1';
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
SELECT comment,index_comment,char_length(index_comment) FROM information_schema.statistics WHERE table_name='t1';
-let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
+let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='DEFAULT_STORAGE_ENGINE'`;
--replace_result $ENGINE ENGINE
SHOW CREATE TABLE t1;
@@ -56,7 +56,7 @@ ALTER TABLE t1 DROP COLUMN c1;
SELECT table_comment,char_length(table_comment) FROM information_schema.tables WHERE table_name='t1';
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
SELECT comment,index_comment,char_length(index_comment) FROM information_schema.statistics WHERE table_name='t1';
-let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
+let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='DEFAULT_STORAGE_ENGINE'`;
--replace_result $ENGINE ENGINE
SHOW CREATE TABLE t1;
@@ -67,7 +67,7 @@ ALTER TABLE t1 ADD COLUMN c11 INTEGER COMMENT 'ABCDEfghijabcdefghijabcdefghijabc
SELECT table_comment,char_length(table_comment) FROM information_schema.tables WHERE table_name='t1';
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
SELECT comment,index_comment,char_length(index_comment) FROM information_schema.statistics WHERE table_name='t1';
-let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
+let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='DEFAULT_STORAGE_ENGINE'`;
--replace_result $ENGINE ENGINE
SHOW CREATE TABLE t1;
@@ -78,7 +78,7 @@ ALTER TABLE t1 ADD COLUMN c12 INTEGER COMMENT 'ABCDEfghijabcdefghijabcdefghijabc
SELECT table_comment,char_length(table_comment) FROM information_schema.tables WHERE table_name='t1';
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
SELECT comment,index_comment,char_length(index_comment) FROM information_schema.statistics WHERE table_name='t1';
-let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
+let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='DEFAULT_STORAGE_ENGINE'`;
--replace_result $ENGINE ENGINE
SHOW CREATE TABLE t1;
@@ -87,7 +87,7 @@ ALTER TABLE t1 ADD COLUMN c12 CHAR(100) COMMENT 'ABCDefghijabcdefghijabcdefghija
SELECT table_comment,char_length(table_comment) FROM information_schema.tables WHERE table_name='t1';
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
SELECT comment,index_comment,char_length(index_comment) FROM information_schema.statistics WHERE table_name='t1';
-let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
+let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='DEFAULT_STORAGE_ENGINE'`;
--replace_result $ENGINE ENGINE
SHOW CREATE TABLE t1;
@@ -99,7 +99,7 @@ create table t1 (c1 VARCHAR(10) NOT NULL COMMENT 'Abcdefghijabcdefghijabcdefghij
SELECT table_comment,char_length(table_comment) FROM information_schema.tables WHERE table_name='t1';
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
SELECT comment,index_comment,char_length(index_comment) FROM information_schema.statistics WHERE table_name='t1';
-let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
+let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='DEFAULT_STORAGE_ENGINE'`;
--replace_result $ENGINE ENGINE
SHOW CREATE TABLE t1;
diff --git a/mysql-test/main/comment_database.result b/mysql-test/main/comment_database.result
new file mode 100644
index 00000000000..628a3259b6b
--- /dev/null
+++ b/mysql-test/main/comment_database.result
@@ -0,0 +1,78 @@
+#
+# MDEV-307: Add functionality for database comments
+#
+CREATE DATABASE db1 COMMENT=;
+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
+CREATE DATABASE db1
+COMMENT='abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd';
+SHOW CREATE DATABASE db1;
+Database Create Database
+db1 CREATE DATABASE `db1` /*!40100 DEFAULT CHARACTER SET latin1 */ COMMENT 'abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd'
+SELECT schema_comment, char_length(schema_comment)
+FROM information_schema.schemata
+WHERE schema_name='db1';
+schema_comment char_length(schema_comment)
+abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd 1024
+DROP DATABASE db1;
+SET SQL_MODE='';
+CREATE DATABASE db1
+COMMENT='abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcde';
+Warnings:
+Warning 4160 Comment for database 'db1' is too long (max = 1024)
+SHOW CREATE DATABASE db1;
+Database Create Database
+db1 CREATE DATABASE `db1` /*!40100 DEFAULT CHARACTER SET latin1 */ COMMENT 'abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd'
+SELECT schema_comment, char_length(schema_comment)
+FROM information_schema.schemata
+WHERE schema_name='db1';
+schema_comment char_length(schema_comment)
+abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd 1024
+DROP DATABASE db1;
+SET SQL_MODE='TRADITIONAL';
+CREATE DATABASE db1
+COMMENT='abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcde';
+ERROR HY000: Comment for database 'db1' is too long (max = 1024)
+SELECT schema_comment, char_length(schema_comment)
+FROM information_schema.schemata
+WHERE schema_name='db1';
+schema_comment char_length(schema_comment)
+CREATE DATABASE db1 COMMENT 'db1';
+SHOW CREATE DATABASE db1;
+Database Create Database
+db1 CREATE DATABASE `db1` /*!40100 DEFAULT CHARACTER SET latin1 */ COMMENT 'db1'
+ALTER DATABASE db1 COMMENT = "db1 comment";
+SELECT * FROM information_schema.schemata
+WHERE schema_name='db1';
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def db1 latin1 latin1_swedish_ci NULL db1 comment
+DROP DATABASE db1;
+CREATE DATABASE db1;
+USE db1;
+ALTER DATABASE COMMENT 'db1 comment' CHARACTER SET 'utf8';
+SHOW CREATE DATABASE db1;
+Database Create Database
+db1 CREATE DATABASE `db1` /*!40100 DEFAULT CHARACTER SET utf8 */ COMMENT 'db1 comment'
+ALTER DATABASE db1 COMMENT 'this is db1 comment';
+SHOW CREATE DATABASE db1;
+Database Create Database
+db1 CREATE DATABASE `db1` /*!40100 DEFAULT CHARACTER SET utf8 */ COMMENT 'this is db1 comment'
+ALTER DATABASE CHARACTER SET 'latin1';
+SHOW CREATE DATABASE db1;
+Database Create Database
+db1 CREATE DATABASE `db1` /*!40100 DEFAULT CHARACTER SET latin1 */ COMMENT 'this is db1 comment'
+DROP DATABASE db1;
+CREATE DATABASE comment COMMENT 'comment' CHARACTER SET 'latin2';
+SHOW CREATE DATABASE comment;
+Database Create Database
+comment CREATE DATABASE `comment` /*!40100 DEFAULT CHARACTER SET latin2 */ COMMENT 'comment'
+ALTER DATABASE comment COMMENT 'comment comment';
+SHOW CREATE DATABASE comment;
+Database Create Database
+comment CREATE DATABASE `comment` /*!40100 DEFAULT CHARACTER SET latin2 */ COMMENT 'comment comment'
+USE comment;
+ALTER DATABASE COMMENT 'comment';
+SELECT * FROM information_schema.schemata
+WHERE schema_name='comment';
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def comment latin2 latin2_general_ci NULL comment
+DROP DATABASE comment;
diff --git a/mysql-test/main/comment_database.test b/mysql-test/main/comment_database.test
new file mode 100644
index 00000000000..3fe1c7b205c
--- /dev/null
+++ b/mysql-test/main/comment_database.test
@@ -0,0 +1,63 @@
+--echo #
+--echo # MDEV-307: Add functionality for database comments
+--echo #
+
+# Check an error state
+--error ER_PARSE_ERROR
+CREATE DATABASE db1 COMMENT=;
+
+# 1024 bytes
+CREATE DATABASE db1
+COMMENT='abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd';
+SHOW CREATE DATABASE db1;
+SELECT schema_comment, char_length(schema_comment)
+FROM information_schema.schemata
+WHERE schema_name='db1';
+DROP DATABASE db1;
+
+# 1025 bytes (warning)
+SET SQL_MODE='';
+CREATE DATABASE db1
+COMMENT='abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcde';
+SHOW CREATE DATABASE db1;
+SELECT schema_comment, char_length(schema_comment)
+FROM information_schema.schemata
+WHERE schema_name='db1';
+DROP DATABASE db1;
+SET SQL_MODE='TRADITIONAL';
+
+# 1025 bytes (error)
+--error ER_TOO_LONG_DATABASE_COMMENT
+CREATE DATABASE db1
+COMMENT='abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcde';
+SELECT schema_comment, char_length(schema_comment)
+FROM information_schema.schemata
+WHERE schema_name='db1';
+
+CREATE DATABASE db1 COMMENT 'db1';
+SHOW CREATE DATABASE db1;
+ALTER DATABASE db1 COMMENT = "db1 comment";
+SELECT * FROM information_schema.schemata
+WHERE schema_name='db1';
+DROP DATABASE db1;
+
+CREATE DATABASE db1;
+USE db1;
+ALTER DATABASE COMMENT 'db1 comment' CHARACTER SET 'utf8';
+SHOW CREATE DATABASE db1;
+ALTER DATABASE db1 COMMENT 'this is db1 comment';
+SHOW CREATE DATABASE db1;
+ALTER DATABASE CHARACTER SET 'latin1';
+SHOW CREATE DATABASE db1;
+DROP DATABASE db1;
+
+# Test the case when the database is named 'comment'
+CREATE DATABASE comment COMMENT 'comment' CHARACTER SET 'latin2';
+SHOW CREATE DATABASE comment;
+ALTER DATABASE comment COMMENT 'comment comment';
+SHOW CREATE DATABASE comment;
+USE comment;
+ALTER DATABASE COMMENT 'comment';
+SELECT * FROM information_schema.schemata
+WHERE schema_name='comment';
+DROP DATABASE comment;
diff --git a/mysql-test/main/comment_index.test b/mysql-test/main/comment_index.test
index 4ba1f336ddb..5db60368dac 100644
--- a/mysql-test/main/comment_index.test
+++ b/mysql-test/main/comment_index.test
@@ -6,7 +6,7 @@ create table t1 (c1 VARCHAR(10) NOT NULL COMMENT 'Abcdefghijabcdefghijabcdefghij
SELECT table_comment,char_length(table_comment) FROM information_schema.tables WHERE table_name='t1';
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
SELECT comment,index_comment,char_length(index_comment) FROM information_schema.statistics WHERE table_name='t1';
-let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
+let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='DEFAULT_STORAGE_ENGINE'`;
--replace_result $ENGINE ENGINE
SHOW CREATE TABLE t1;
@@ -15,7 +15,7 @@ CREATE INDEX i4 ON t1(c4) COMMENT 'abcdefghijabcdefghijabcdefghijabcdefghijabcde
SELECT table_comment,char_length(table_comment) FROM information_schema.tables WHERE table_name='t1';
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
SELECT comment,index_comment,char_length(index_comment) FROM information_schema.statistics WHERE table_name='t1';
-let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
+let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='DEFAULT_STORAGE_ENGINE'`;
--replace_result $ENGINE ENGINE
SHOW CREATE TABLE t1;
@@ -24,7 +24,7 @@ ALTER TABLE t1 ADD INDEX (c6) COMMENT 'abcdefghijabcdefghijabcdefghijabcdefghija
SELECT table_comment,char_length(table_comment) FROM information_schema.tables WHERE table_name='t1';
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
SELECT comment,index_comment,char_length(index_comment) FROM information_schema.statistics WHERE table_name='t1';
-let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
+let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='DEFAULT_STORAGE_ENGINE'`;
--replace_result $ENGINE ENGINE
SHOW CREATE TABLE t1;
@@ -33,7 +33,7 @@ ALTER TABLE t1 DROP INDEX i2, DROP INDEX i4;
SELECT table_comment,char_length(table_comment) FROM information_schema.tables WHERE table_name='t1';
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
SELECT comment,index_comment,char_length(index_comment) FROM information_schema.statistics WHERE table_name='t1';
-let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
+let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='DEFAULT_STORAGE_ENGINE'`;
--replace_result $ENGINE ENGINE
SHOW CREATE TABLE t1;
@@ -41,7 +41,7 @@ ALTER TABLE t1 ADD INDEX i8(c8) COMMENT 'abcdefghijabcdefghijabcdefghijabcdefghi
SELECT table_comment,char_length(table_comment) FROM information_schema.tables WHERE table_name='t1';
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
SELECT comment,index_comment,char_length(index_comment) FROM information_schema.statistics WHERE table_name='t1';
-let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
+let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='DEFAULT_STORAGE_ENGINE'`;
--replace_result $ENGINE ENGINE
SHOW CREATE TABLE t1;
@@ -51,7 +51,7 @@ CREATE INDEX i1_3 ON t1(c1,c2,c3) COMMENT 'abcdefghijabcdefghijabcdefghijabcdefg
SELECT table_comment,char_length(table_comment) FROM information_schema.tables WHERE table_name='t1';
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
SELECT comment,index_comment,char_length(index_comment) FROM information_schema.statistics WHERE table_name='t1';
-let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
+let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='DEFAULT_STORAGE_ENGINE'`;
--replace_result $ENGINE ENGINE
SHOW CREATE TABLE t1;
@@ -62,7 +62,7 @@ CREATE INDEX i11 ON t1(c11) COMMENT 'abcdefghijabcdefghijabcdefghijabcdefghijabc
SELECT table_comment,char_length(table_comment) FROM information_schema.tables WHERE table_name='t1';
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
SELECT comment,index_comment,char_length(index_comment) FROM information_schema.statistics WHERE table_name='t1';
-let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
+let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='DEFAULT_STORAGE_ENGINE'`;
--replace_result $ENGINE ENGINE
SHOW CREATE TABLE t1;
@@ -71,7 +71,7 @@ ALTER TABLE t1 ADD INDEX (c13) COMMENT 'abcdefghijabcdefghijabcdefghijabcdefghij
SELECT table_comment,char_length(table_comment) FROM information_schema.tables WHERE table_name='t1';
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
SELECT comment,index_comment,char_length(index_comment) FROM information_schema.statistics WHERE table_name='t1';
-let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
+let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='DEFAULT_STORAGE_ENGINE'`;
--replace_result $ENGINE ENGINE
SHOW CREATE TABLE t1;
@@ -84,7 +84,7 @@ ALTER TABLE t1 ADD INDEX i12 (c12) COMMENT 'abcdefghijabcdefghijabcdefghijabcdef
SELECT table_comment,char_length(table_comment) FROM information_schema.tables WHERE table_name='t1';
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
SELECT comment,index_comment,char_length(index_comment) FROM information_schema.statistics WHERE table_name='t1';
-let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
+let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='DEFAULT_STORAGE_ENGINE'`;
--replace_result $ENGINE ENGINE
SHOW CREATE TABLE t1;
@@ -95,7 +95,7 @@ CREATE INDEX i12 ON t1(c12) COMMENT 'abcdefghijabcdefghijabcdefghijabcdefghijabc
SELECT table_comment,char_length(table_comment) FROM information_schema.tables WHERE table_name='t1';
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
SELECT comment,index_comment,char_length(index_comment) FROM information_schema.statistics WHERE table_name='t1';
-let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
+let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='DEFAULT_STORAGE_ENGINE'`;
--replace_result $ENGINE ENGINE
SHOW CREATE TABLE t1;
diff --git a/mysql-test/main/comment_table.test b/mysql-test/main/comment_table.test
index db8bdf54ba6..ba1ab9dda33 100644
--- a/mysql-test/main/comment_table.test
+++ b/mysql-test/main/comment_table.test
@@ -3,7 +3,7 @@ create table t1 (c1 VARCHAR(10) NOT NULL COMMENT 'c1 comment', c2 INTEGER,c3 INT
) COMMENT='abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd';
SELECT table_comment,char_length(table_comment) FROM information_schema.tables WHERE table_name='t1';
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
-let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
+let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='DEFAULT_STORAGE_ENGINE'`;
--replace_result $ENGINE ENGINE
SHOW CREATE TABLE t1;
drop table t1;
@@ -13,7 +13,7 @@ create table t1 (c1 VARCHAR(10) NOT NULL COMMENT 'c1 comment', c2 INTEGER,c3 INT
) COMMENT='abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcde';
SELECT table_comment,char_length(table_comment) FROM information_schema.tables WHERE table_name='t1';
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
-let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
+let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='DEFAULT_STORAGE_ENGINE'`;
--replace_result $ENGINE ENGINE
SHOW CREATE TABLE t1;
drop table t1;
@@ -30,7 +30,7 @@ create table t1 (c1 VARCHAR(10) NOT NULL COMMENT 'c1 comment', c2 INTEGER,c3 INT
) COMMENT='abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd';
SELECT table_comment,char_length(table_comment) FROM information_schema.tables WHERE table_name='t1';
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
-let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
+let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='DEFAULT_STORAGE_ENGINE'`;
--replace_result $ENGINE ENGINE
SHOW CREATE TABLE t1;
drop table t1;
diff --git a/mysql-test/main/commit_1innodb.result b/mysql-test/main/commit_1innodb.result
index a7b544dc282..d090844cb74 100644
--- a/mysql-test/main/commit_1innodb.result
+++ b/mysql-test/main/commit_1innodb.result
@@ -386,6 +386,11 @@ end|
# Reset Handler_commit and Handler_prepare counters
flush status;
#
+# Count of reading of p_verify_status_increment() from mysql.proc
+call p_verify_status_increment(2, 0, 2, 0);
+SUCCESS
+
+#
# 1. Read-only statement: SELECT
#
select * from t1;
@@ -568,7 +573,7 @@ begin
insert t2 set a=2;
return 2;
end|
-call p_verify_status_increment(0, 0, 0, 0);
+call p_verify_status_increment(4, 0, 4, 0);
SUCCESS
# 16. A function changes non-trans-table.
@@ -580,7 +585,7 @@ SUCCESS
select f1();
f1()
2
-call p_verify_status_increment(1, 0, 1, 0);
+call p_verify_status_increment(3, 0, 3, 0);
SUCCESS
commit;
@@ -688,9 +693,9 @@ SUCCESS
# 24. DDL: TRUNCATE TEMPORARY TABLE
truncate table t2;
-call p_verify_status_increment(4, 0, 4, 0);
-ERROR
-Expected commit increment: 4 actual: 2
+call p_verify_status_increment(2, 0, 2, 0);
+SUCCESS
+
commit;
# There is nothing left to commit
call p_verify_status_increment(0, 0, 0, 0);
@@ -855,7 +860,7 @@ call p_verify_status_increment(2, 0, 2, 0);
SUCCESS
create view v1 as select * from t2;
-call p_verify_status_increment(2, 0, 2, 0);
+call p_verify_status_increment(4, 0, 4, 0);
SUCCESS
check table t1;
@@ -882,7 +887,7 @@ call p_verify_status_increment(0, 0, 0, 0);
SUCCESS
drop view v1;
-call p_verify_status_increment(0, 0, 0, 0);
+call p_verify_status_increment(2, 0, 2, 0);
SUCCESS
#
diff --git a/mysql-test/main/compress.result b/mysql-test/main/compress.result
index 8fbbb324b16..788eb7ab13b 100644
--- a/mysql-test/main/compress.result
+++ b/mysql-test/main/compress.result
@@ -515,7 +515,7 @@ insert into tmp select * from t3;
insert into t3 select * from tmp;
alter table t3 add t2nr int not null auto_increment primary key first;
drop table tmp;
-SET BIG_TABLES=1;
+set tmp_memory_table_size=0;
select distinct concat(fld3," ",fld3) as namn from t2,t3 where t2.fld1=t3.t2nr order by namn limit 10;
namn
Abraham Abraham
@@ -528,7 +528,7 @@ ammonium ammonium
analyzable analyzable
animals animals
animized animized
-SET BIG_TABLES=0;
+set tmp_memory_table_size=default;
select distinct concat(fld3," ",fld3) from t2,t3 where t2.fld1=t3.t2nr order by fld3 limit 10;
concat(fld3," ",fld3)
Abraham Abraham
@@ -565,7 +565,7 @@ attendants 1
bedlam 1
bedpost 1
boasted 1
-SET BIG_TABLES=1;
+set tmp_memory_table_size=0;
select distinct fld3,count(*) from t2 group by companynr,fld3 limit 10;
fld3 count(*)
affixed 1
@@ -578,7 +578,7 @@ attendants 1
bedlam 1
bedpost 1
boasted 1
-SET BIG_TABLES=0;
+set tmp_memory_table_size=default;
select distinct fld3,repeat("a",length(fld3)),count(*) from t2 group by companynr,fld3 limit 100,10;
fld3 repeat("a",length(fld3)) count(*)
circus aaaaaa 1
diff --git a/mysql-test/main/concurrent_innodb_safelog-master.opt b/mysql-test/main/concurrent_innodb_safelog-master.opt
deleted file mode 100644
index 82dec8b25fd..00000000000
--- a/mysql-test/main/concurrent_innodb_safelog-master.opt
+++ /dev/null
@@ -1 +0,0 @@
---loose-innodb_lock_wait_timeout=1
diff --git a/mysql-test/main/concurrent_innodb_safelog.result b/mysql-test/main/concurrent_innodb_safelog.result
index 27889777ac1..7d120547570 100644
--- a/mysql-test/main/concurrent_innodb_safelog.result
+++ b/mysql-test/main/concurrent_innodb_safelog.result
@@ -1,15 +1,13 @@
+SET @save_timeout = @@GLOBAL.innodb_lock_wait_timeout;
+SET GLOBAL innodb_lock_wait_timeout = 1;
SET GLOBAL TRANSACTION ISOLATION LEVEL REPEATABLE READ;
connection default;
SET SQL_MODE="";
SELECT @@global.tx_isolation;
@@global.tx_isolation
REPEATABLE-READ
-SELECT @@global.innodb_locks_unsafe_for_binlog;
-@@global.innodb_locks_unsafe_for_binlog
-0
# keep_locks == 1
GRANT USAGE ON test.* TO mysqltest@localhost;
-drop table if exists t1;
**
** two UPDATE's running and both changing distinct result sets
@@ -17,7 +15,7 @@ drop table if exists t1;
connect thread1, localhost, mysqltest,,;
connection thread1;
** Set up table
-SET SESSION STORAGE_ENGINE = InnoDB;
+SET SESSION DEFAULT_STORAGE_ENGINE = InnoDB;
create table t1(eta int(11) not null, tipo int(11), c varchar(255));
insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
@@ -47,7 +45,7 @@ begin;
** Update on t1 will cause a table scan which will be blocked because
** the previously initiated table scan applied exclusive key locks on
** all primary keys.
-** Not so if innodb_locks_unsafe_for_binlog is set. The locks that
+** Not so for READ UNCOMMITTED or READ COMMITTED. The locks that
** do not match the WHERE condition are released.
update t1 set eta=2 where tipo=22;
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
@@ -157,7 +155,7 @@ drop table t1;
**
connection thread1;
** Set up table
-SET SESSION STORAGE_ENGINE = InnoDB;
+SET SESSION DEFAULT_STORAGE_ENGINE = InnoDB;
create table t1(eta int(11) not null, tipo int(11), c varchar(255));
insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
@@ -187,7 +185,7 @@ begin;
** Update on t1 will cause a table scan which will be blocked because
** the previously initiated table scan applied exclusive key locks on
** all primary keys.
-** Not so if innodb_locks_unsafe_for_binlog is set. The locks that
+** Not so for READ UNCOMMITTED or READ COMMITTED. The locks that
** do not match the WHERE condition are released.
update t1 set tipo=1 where tipo=2;
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
@@ -295,7 +293,7 @@ drop table t1;
**
connection thread1;
** Set up table
-SET SESSION STORAGE_ENGINE = InnoDB;
+SET SESSION DEFAULT_STORAGE_ENGINE = InnoDB;
create table t1 (a int not null, b int not null);
insert into t1 values (1,1),(2,1),(3,1),(4,1);
** Create ULL 'hello2'
@@ -344,7 +342,7 @@ drop table t1;
**
connection thread1;
** Set up table
-SET SESSION STORAGE_ENGINE = InnoDB;
+SET SESSION DEFAULT_STORAGE_ENGINE = InnoDB;
create table t1(eta int(11) not null, tipo int(11), c varchar(255));
insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
@@ -447,7 +445,7 @@ drop table t1;
**
connection thread1;
** Set up table
-SET SESSION STORAGE_ENGINE = InnoDB;
+SET SESSION DEFAULT_STORAGE_ENGINE = InnoDB;
create table t1(eta int(11) not null, tipo int(11), c varchar(255));
insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
@@ -476,7 +474,7 @@ begin;
** Updating single row using a table scan. This will time out
** because of ongoing transaction on thread 1 holding lock on
** all primary keys in the scan.
-** Not so if innodb_locks_unsafe_for_binlog is set. The locks that
+** Not so for READ UNCOMMITTED or READ COMMITTED. The locks that
** do not match the WHERE condition are released.
update t1 set tipo=11 where tipo=22;
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
@@ -551,7 +549,7 @@ drop table t1;
**
connection thread1;
** Set up table
-SET SESSION STORAGE_ENGINE = InnoDB;
+SET SESSION DEFAULT_STORAGE_ENGINE = InnoDB;
create table t1(eta int(11) not null, tipo int(11), c varchar(255));
insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
@@ -638,7 +636,7 @@ drop table t1;
**
connection thread1;
** Set up table
-SET SESSION STORAGE_ENGINE = InnoDB;
+SET SESSION DEFAULT_STORAGE_ENGINE = InnoDB;
create table t1(eta int(11) not null, tipo int(11), c varchar(255));
insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
@@ -715,7 +713,7 @@ drop table t1;
**
connection thread1;
** Set up table
-SET SESSION STORAGE_ENGINE = InnoDB;
+SET SESSION DEFAULT_STORAGE_ENGINE = InnoDB;
create table t1(eta int(11) not null, tipo int(11), c varchar(255));
insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
@@ -736,7 +734,7 @@ begin;
** Update on t1 will cause a table scan which will be blocked because
** the previously initiated table scan applied exclusive key locks on
** all primary keys.
-** Not so if innodb_locks_unsafe_for_binlog is set. The locks that
+** Not so for READ UNCOMMITTED or READ COMMITTED. The locks that
** do not match the WHERE condition are released.
update t1 set tipo=1 where tipo=22;
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
@@ -789,12 +787,10 @@ eta tipo c
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
-** Cleanup
-connection thread1;
disconnect thread1;
-connection thread2;
disconnect thread2;
connection default;
drop table t1;
drop user mysqltest@localhost;
SET SQL_MODE=default;
+SET GLOBAL innodb_lock_wait_timeout = @save_timeout;
diff --git a/mysql-test/main/concurrent_innodb_safelog.test b/mysql-test/main/concurrent_innodb_safelog.test
index 828df9ef717..7f6b3c328f2 100644
--- a/mysql-test/main/concurrent_innodb_safelog.test
+++ b/mysql-test/main/concurrent_innodb_safelog.test
@@ -16,8 +16,10 @@
let $engine_type= InnoDB;
+SET @save_timeout = @@GLOBAL.innodb_lock_wait_timeout;
+SET GLOBAL innodb_lock_wait_timeout = 1;
SET GLOBAL TRANSACTION ISOLATION LEVEL REPEATABLE READ;
-# innodb_locks_unsafe_for_binlog not set for this test
--source include/concurrent.inc
+SET GLOBAL innodb_lock_wait_timeout = @save_timeout;
diff --git a/mysql-test/main/concurrent_innodb_unsafelog-master.opt b/mysql-test/main/concurrent_innodb_unsafelog-master.opt
deleted file mode 100644
index ea9c1b860e9..00000000000
--- a/mysql-test/main/concurrent_innodb_unsafelog-master.opt
+++ /dev/null
@@ -1,2 +0,0 @@
---loose-innodb_locks_unsafe_for_binlog
---loose-innodb_lock_wait_timeout=1
diff --git a/mysql-test/main/concurrent_innodb_unsafelog.result b/mysql-test/main/concurrent_innodb_unsafelog.result
index 39e757aeeb1..9ae80328c0b 100644
--- a/mysql-test/main/concurrent_innodb_unsafelog.result
+++ b/mysql-test/main/concurrent_innodb_unsafelog.result
@@ -1,15 +1,14 @@
-SET GLOBAL TRANSACTION ISOLATION LEVEL REPEATABLE READ;
+SET @save_timeout = @@GLOBAL.innodb_lock_wait_timeout;
+SET GLOBAL innodb_lock_wait_timeout = 1;
+SET @save_isolation = @@GLOBAL.tx_isolation;
+SET GLOBAL TRANSACTION ISOLATION LEVEL READ COMMITTED;
connection default;
SET SQL_MODE="";
SELECT @@global.tx_isolation;
@@global.tx_isolation
-REPEATABLE-READ
-SELECT @@global.innodb_locks_unsafe_for_binlog;
-@@global.innodb_locks_unsafe_for_binlog
-1
+READ-COMMITTED
# keep_locks == 0
GRANT USAGE ON test.* TO mysqltest@localhost;
-drop table if exists t1;
**
** two UPDATE's running and both changing distinct result sets
@@ -17,7 +16,7 @@ drop table if exists t1;
connect thread1, localhost, mysqltest,,;
connection thread1;
** Set up table
-SET SESSION STORAGE_ENGINE = InnoDB;
+SET SESSION DEFAULT_STORAGE_ENGINE = InnoDB;
create table t1(eta int(11) not null, tipo int(11), c varchar(255));
insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
@@ -47,7 +46,7 @@ begin;
** Update on t1 will cause a table scan which will be blocked because
** the previously initiated table scan applied exclusive key locks on
** all primary keys.
-** Not so if innodb_locks_unsafe_for_binlog is set. The locks that
+** Not so for READ UNCOMMITTED or READ COMMITTED. The locks that
** do not match the WHERE condition are released.
update t1 set eta=2 where tipo=22;
** Release user level name lock from thread 1. This will cause the ULL
@@ -101,7 +100,7 @@ eta tipo c
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
2 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
-90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
+1 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
** And send final commit on thread 1.
commit;
** Table should now be updated by both updates in the order of
@@ -156,7 +155,7 @@ drop table t1;
**
connection thread1;
** Set up table
-SET SESSION STORAGE_ENGINE = InnoDB;
+SET SESSION DEFAULT_STORAGE_ENGINE = InnoDB;
create table t1(eta int(11) not null, tipo int(11), c varchar(255));
insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
@@ -186,7 +185,7 @@ begin;
** Update on t1 will cause a table scan which will be blocked because
** the previously initiated table scan applied exclusive key locks on
** all primary keys.
-** Not so if innodb_locks_unsafe_for_binlog is set. The locks that
+** Not so for READ UNCOMMITTED or READ COMMITTED. The locks that
** do not match the WHERE condition are released.
update t1 set tipo=1 where tipo=2;
** Release ULL. This will release the next waiting ULL on thread 2.
@@ -231,13 +230,13 @@ select * from t1;
eta tipo c
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
-10 1 ccccccccccccccccccccccccccccccccccccccccccc
+1 1 ccccccccccccccccccccccccccccccccccccccccccc
20 1 ddddddddddddddddddddddddddddddddddddddddddd
-30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
+1 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
40 1 fffffffffffffffffffffffffffffffffffffffffff
-50 1 ggggggggggggggggggggggggggggggggggggggggggg
+1 1 ggggggggggggggggggggggggggggggggggggggggggg
60 1 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
-70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+1 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
commit;
@@ -293,7 +292,7 @@ drop table t1;
**
connection thread1;
** Set up table
-SET SESSION STORAGE_ENGINE = InnoDB;
+SET SESSION DEFAULT_STORAGE_ENGINE = InnoDB;
create table t1 (a int not null, b int not null);
insert into t1 values (1,1),(2,1),(3,1),(4,1);
** Create ULL 'hello2'
@@ -342,7 +341,7 @@ drop table t1;
**
connection thread1;
** Set up table
-SET SESSION STORAGE_ENGINE = InnoDB;
+SET SESSION DEFAULT_STORAGE_ENGINE = InnoDB;
create table t1(eta int(11) not null, tipo int(11), c varchar(255));
insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
@@ -445,7 +444,7 @@ drop table t1;
**
connection thread1;
** Set up table
-SET SESSION STORAGE_ENGINE = InnoDB;
+SET SESSION DEFAULT_STORAGE_ENGINE = InnoDB;
create table t1(eta int(11) not null, tipo int(11), c varchar(255));
insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
@@ -474,7 +473,7 @@ begin;
** Updating single row using a table scan. This will time out
** because of ongoing transaction on thread 1 holding lock on
** all primary keys in the scan.
-** Not so if innodb_locks_unsafe_for_binlog is set. The locks that
+** Not so for READ UNCOMMITTED or READ COMMITTED. The locks that
** do not match the WHERE condition are released.
update t1 set tipo=11 where tipo=22;
** After the time out the transaction is aborted; no rows should
@@ -548,7 +547,7 @@ drop table t1;
**
connection thread1;
** Set up table
-SET SESSION STORAGE_ENGINE = InnoDB;
+SET SESSION DEFAULT_STORAGE_ENGINE = InnoDB;
create table t1(eta int(11) not null, tipo int(11), c varchar(255));
insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
@@ -635,7 +634,7 @@ drop table t1;
**
connection thread1;
** Set up table
-SET SESSION STORAGE_ENGINE = InnoDB;
+SET SESSION DEFAULT_STORAGE_ENGINE = InnoDB;
create table t1(eta int(11) not null, tipo int(11), c varchar(255));
insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
@@ -712,7 +711,7 @@ drop table t1;
**
connection thread1;
** Set up table
-SET SESSION STORAGE_ENGINE = InnoDB;
+SET SESSION DEFAULT_STORAGE_ENGINE = InnoDB;
create table t1(eta int(11) not null, tipo int(11), c varchar(255));
insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
@@ -733,7 +732,7 @@ begin;
** Update on t1 will cause a table scan which will be blocked because
** the previously initiated table scan applied exclusive key locks on
** all primary keys.
-** Not so if innodb_locks_unsafe_for_binlog is set. The locks that
+** Not so for READ UNCOMMITTED or READ COMMITTED. The locks that
** do not match the WHERE condition are released.
update t1 set tipo=1 where tipo=22;
select * from t1;
@@ -785,12 +784,11 @@ eta tipo c
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
80 1 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
-** Cleanup
-connection thread1;
disconnect thread1;
-connection thread2;
disconnect thread2;
connection default;
drop table t1;
drop user mysqltest@localhost;
SET SQL_MODE=default;
+SET GLOBAL innodb_lock_wait_timeout = @save_timeout;
+SET GLOBAL tx_isolation = @save_isolation;
diff --git a/mysql-test/main/concurrent_innodb_unsafelog.test b/mysql-test/main/concurrent_innodb_unsafelog.test
index e2c03655e43..eee2295211e 100644
--- a/mysql-test/main/concurrent_innodb_unsafelog.test
+++ b/mysql-test/main/concurrent_innodb_unsafelog.test
@@ -16,8 +16,12 @@
let $engine_type= InnoDB;
-SET GLOBAL TRANSACTION ISOLATION LEVEL REPEATABLE READ;
-# innodb_locks_unsafe_for_binlog is set fro this test.
+SET @save_timeout = @@GLOBAL.innodb_lock_wait_timeout;
+SET GLOBAL innodb_lock_wait_timeout = 1;
+SET @save_isolation = @@GLOBAL.tx_isolation;
+SET GLOBAL TRANSACTION ISOLATION LEVEL READ COMMITTED;
--source include/concurrent.inc
+SET GLOBAL innodb_lock_wait_timeout = @save_timeout;
+SET GLOBAL tx_isolation = @save_isolation;
diff --git a/mysql-test/main/crash_commit_before-master.opt b/mysql-test/main/crash_commit_before-master.opt
index 9bcf94dca97..f464a1013d7 100644
--- a/mysql-test/main/crash_commit_before-master.opt
+++ b/mysql-test/main/crash_commit_before-master.opt
@@ -1,3 +1,3 @@
---skip-stack-trace --skip-core-file
+--loose-skip-stack-trace --skip-core-file
--default-storage-engine=MyISAM
--loose-skip-innodb-file-per-table
diff --git a/mysql-test/main/create.result b/mysql-test/main/create.result
index 39ede1f90b9..e6af42db1ff 100644
--- a/mysql-test/main/create.result
+++ b/mysql-test/main/create.result
@@ -26,8 +26,7 @@ create table t2 select auto+1 from t1;
ERROR 42S02: Table 'test.t1' doesn't exist
drop table if exists t1,t2;
Warnings:
-Note 1051 Unknown table 'test.t1'
-Note 1051 Unknown table 'test.t2'
+Note 1051 Unknown table 'test.t1,test.t2'
create table t1 (b char(0) not null, index(b));
ERROR 42000: The storage engine MyISAM can't index column `b`
create table t1 (a int not null,b text) engine=heap;
@@ -255,9 +254,9 @@ select * from t1;
if('2002'='2002','Y','N')
Y
drop table if exists t1;
-SET SESSION storage_engine="heap";
-SELECT @@storage_engine;
-@@storage_engine
+SET SESSION default_storage_engine="heap";
+SELECT @@default_storage_engine;
+@@default_storage_engine
MEMORY
CREATE TABLE t1 (a int not null);
show create table t1;
@@ -266,10 +265,10 @@ t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL
) ENGINE=MEMORY DEFAULT CHARSET=latin1
drop table t1;
-SET SESSION storage_engine="gemini";
+SET SESSION default_storage_engine="gemini";
ERROR 42000: Unknown storage engine 'gemini'
-SELECT @@storage_engine;
-@@storage_engine
+SELECT @@default_storage_engine;
+@@default_storage_engine
MEMORY
CREATE TABLE t1 (a int not null);
show create table t1;
@@ -277,7 +276,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL
) ENGINE=MEMORY DEFAULT CHARSET=latin1
-SET SESSION storage_engine=default;
+SET SESSION default_storage_engine=default;
drop table t1;
create table t1 ( k1 varchar(2), k2 int, primary key(k1,k2));
insert into t1 values ("a", 1), ("b", 2);
@@ -419,9 +418,9 @@ create temporary table t3 like t2;
ERROR HY000: Table 't2' was not locked with LOCK TABLES
unlock tables;
drop tables t1, t2;
-SET SESSION storage_engine="heap";
-SELECT @@storage_engine;
-@@storage_engine
+SET SESSION default_storage_engine="heap";
+SELECT @@default_storage_engine;
+@@default_storage_engine
MEMORY
CREATE TABLE t1 (a int not null);
show create table t1;
@@ -430,10 +429,10 @@ t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL
) ENGINE=MEMORY DEFAULT CHARSET=latin1
drop table t1;
-SET SESSION storage_engine="gemini";
+SET SESSION default_storage_engine="gemini";
ERROR 42000: Unknown storage engine 'gemini'
-SELECT @@storage_engine;
-@@storage_engine
+SELECT @@default_storage_engine;
+@@default_storage_engine
MEMORY
CREATE TABLE t1 (a int not null);
show create table t1;
@@ -441,7 +440,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL
) ENGINE=MEMORY DEFAULT CHARSET=latin1
-SET SESSION storage_engine=default;
+SET SESSION default_storage_engine=default;
drop table t1;
create table t1(a int,b int,c int unsigned,d date,e char,f datetime,g time,h blob);
insert into t1(a)values(1);
@@ -2049,3 +2048,6 @@ DROP TABLE t1;
#
# End of 10.4 tests
#
+CREATE TABLE t1 (id1 INT, id2 INT, primary key (id1), unique index (id2) visible);
+drop table t1;
+# End of 10.5 Test
diff --git a/mysql-test/main/create.test b/mysql-test/main/create.test
index adac81f02c5..5f84e282570 100644
--- a/mysql-test/main/create.test
+++ b/mysql-test/main/create.test
@@ -191,17 +191,17 @@ drop table if exists t1;
#
# Test default table type
#
-SET SESSION storage_engine="heap";
-SELECT @@storage_engine;
+SET SESSION default_storage_engine="heap";
+SELECT @@default_storage_engine;
CREATE TABLE t1 (a int not null);
show create table t1;
drop table t1;
--error ER_UNKNOWN_STORAGE_ENGINE
-SET SESSION storage_engine="gemini";
-SELECT @@storage_engine;
+SET SESSION default_storage_engine="gemini";
+SELECT @@default_storage_engine;
CREATE TABLE t1 (a int not null);
show create table t1;
-SET SESSION storage_engine=default;
+SET SESSION default_storage_engine=default;
drop table t1;
@@ -349,17 +349,17 @@ drop tables t1, t2;
#
# Test default table type
#
-SET SESSION storage_engine="heap";
-SELECT @@storage_engine;
+SET SESSION default_storage_engine="heap";
+SELECT @@default_storage_engine;
CREATE TABLE t1 (a int not null);
show create table t1;
drop table t1;
--error ER_UNKNOWN_STORAGE_ENGINE
-SET SESSION storage_engine="gemini";
-SELECT @@storage_engine;
+SET SESSION default_storage_engine="gemini";
+SELECT @@default_storage_engine;
CREATE TABLE t1 (a int not null);
show create table t1;
-SET SESSION storage_engine=default;
+SET SESSION default_storage_engine=default;
drop table t1;
#
@@ -1905,3 +1905,12 @@ DROP TABLE t1;
--echo #
--echo # End of 10.4 tests
--echo #
+
+#
+# MDEV-22199 Add VISIBLE option for indexes in create table
+#
+
+CREATE TABLE t1 (id1 INT, id2 INT, primary key (id1), unique index (id2) visible);
+drop table t1;
+
+--echo # End of 10.5 Test
diff --git a/mysql-test/main/create_drop_view.result b/mysql-test/main/create_drop_view.result
index 9d7e42552bf..a62639545e1 100644
--- a/mysql-test/main/create_drop_view.result
+++ b/mysql-test/main/create_drop_view.result
@@ -52,8 +52,15 @@ id
50
80
40
+DROP TABLE IF EXISTS v1;
+Warnings:
+Note 1965 'test.v1' is a view
DROP VIEW IF EXISTS v1;
DROP VIEW IF EXISTS v1;
Warnings:
Note 4092 Unknown VIEW: 'test.v1'
+DROP VIEW IF EXISTS t1;
+Warnings:
+Warning 1347 'test.t1' is not of type 'VIEW'
+Note 4092 Unknown VIEW: 'test.t1'
DROP TABLE t1;
diff --git a/mysql-test/main/create_drop_view.test b/mysql-test/main/create_drop_view.test
index 5f5df43a7e0..0ebf643e1f1 100644
--- a/mysql-test/main/create_drop_view.test
+++ b/mysql-test/main/create_drop_view.test
@@ -22,6 +22,8 @@ INSERT INTO t1 VALUES (50), (80), (3), (2), (40);
SELECT * FROM t1;
SELECT * FROM v1;
+DROP TABLE IF EXISTS v1;
DROP VIEW IF EXISTS v1;
DROP VIEW IF EXISTS v1;
+DROP VIEW IF EXISTS t1;
DROP TABLE t1;
diff --git a/mysql-test/main/create_or_replace.result b/mysql-test/main/create_or_replace.result
index 485091e5810..1eaf87d190d 100644
--- a/mysql-test/main/create_or_replace.result
+++ b/mysql-test/main/create_or_replace.result
@@ -255,8 +255,7 @@ drop table t1,t3,t4;
create database mysqltest2;
drop table if exists test.t1,mysqltest2.t2;
Warnings:
-Note 1051 Unknown table 'test.t1'
-Note 1051 Unknown table 'mysqltest2.t2'
+Note 1051 Unknown table 'test.t1,mysqltest2.t2'
create table test.t1 (i int) engine=myisam;
create table mysqltest2.t2 like test.t1;
lock table test.t1 write, mysqltest2.t2 write;
diff --git a/mysql-test/main/cte_cycle.result b/mysql-test/main/cte_cycle.result
new file mode 100644
index 00000000000..e7e0cc5f801
--- /dev/null
+++ b/mysql-test/main/cte_cycle.result
@@ -0,0 +1,156 @@
+#
+# check errors
+#
+WITH RECURSIVE cte AS (
+SELECT 1 AS a UNION ALL
+SELECT NULL FROM cte WHERE a IS NOT NULL)
+CYCLE a, a RESTRICT
+SELECT * FROM cte;
+ERROR 42S21: Duplicate column name 'a'
+WITH RECURSIVE cte AS (
+SELECT 1 AS a UNION ALL
+SELECT NULL FROM cte WHERE a IS NOT NULL)
+CYCLE b RESTRICT
+SELECT * FROM cte;
+ERROR 42S22: Unknown column 'b' in 'CYCLE clause'
+WITH cte AS (
+SELECT 1 AS a UNION ALL
+SELECT NULL FROM cte WHERE a IS NOT NULL)
+CYCLE b RESTRICT
+SELECT * FROM cte;
+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 'CYCLE b RESTRICT
+SELECT * FROM cte' at line 4
+#
+# A degenerate case
+#
+WITH RECURSIVE cte AS (
+SELECT 1 AS a, 2 as b)
+CYCLE b RESTRICT
+SELECT * FROM cte;
+a b
+1 2
+#
+# A simple case
+#
+WITH RECURSIVE cte AS (
+SELECT 1 AS a, 2 as b UNION ALL
+SELECT 2, 2 FROM cte WHERE a IS NOT NULL)
+CYCLE b RESTRICT
+SELECT * FROM cte;
+a b
+1 2
+#
+# MDEV-20632 case (with fixed syntax)
+#
+create table t1 (from_ int, to_ int);
+insert into t1 values (1,2), (1,100), (2,3), (3,4), (4,1);
+WITH RECURSIVE cte (depth, from_, to_) as (
+SELECT 0,1,1
+UNION
+SELECT depth+1, t1.from_, t1.to_
+FROM t1, cte WHERE t1.from_ = cte.to_
+) CYCLE from_, to_ RESTRICT
+select * from cte;
+depth from_ to_
+0 1 1
+1 1 2
+1 1 100
+2 2 3
+3 3 4
+4 4 1
+create view v1 as WITH RECURSIVE cte (depth, from_, to_) as (
+SELECT 0,1,1
+UNION
+SELECT depth+1, t1.from_, t1.to_
+FROM t1, cte WHERE t1.from_ = cte.to_
+) CYCLE from_, to_ RESTRICT
+select * from cte;
+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 with recursive cte(`depth`,`from_`,`to_`) as (select 0 AS `depth`,1 AS `from_`,1 AS `to_` union select `cte`.`depth` + 1 AS `depth+1`,`test`.`t1`.`from_` AS `from_`,`test`.`t1`.`to_` AS `to_` from (`test`.`t1` join `cte`) where `test`.`t1`.`from_` = `cte`.`to_`) CYCLE `from_`,`to_` RESTRICT select `cte`.`depth` AS `depth`,`cte`.`from_` AS `from_`,`cte`.`to_` AS `to_` from `cte` latin1 latin1_swedish_ci
+select * from v1;
+depth from_ to_
+0 1 1
+1 1 2
+1 1 100
+2 2 3
+3 3 4
+4 4 1
+delete from t1;
+insert into t1 values (1,2), (1,NULL), (NULL,NULL), (NULL, 1);
+select * from v1;
+depth from_ to_
+0 1 1
+1 1 2
+1 1 NULL
+drop view v1;
+drop table t1;
+#
+# A simple blob case
+#
+create table t1 (a int, b text);
+insert into t1 values (1, "a");
+WITH RECURSIVE cte AS (
+SELECT a, b from t1 UNION ALL
+SELECT a, b FROM cte WHERE a IS NOT NULL)
+CYCLE b RESTRICT
+SELECT * FROM cte;
+a b
+1 a
+drop table t1;
+#
+# check bit types
+#
+create table t1 (from_ bit(3), to_ bit(3));
+insert into t1 values (1,2), (1,7), (2,3), (3,4), (4,1);
+WITH RECURSIVE cte (depth, from_, to_) as (
+SELECT 0,1,1
+UNION
+SELECT depth+1, t1.from_, t1.to_
+FROM t1, cte WHERE t1.from_ = cte.to_
+) CYCLE from_, to_ RESTRICT
+select * from cte;
+depth from_ to_
+0 1 1
+1 1 2
+1 1 7
+2 2 3
+3 3 4
+4 4 1
+drop table t1;
+#
+# check bit types with BLOBs (TEXT)
+#
+create table t1 (from_ bit(3), to_ bit(3), load_ text);
+insert into t1 values (1,2,"A"), (1,7,"A"), (2,3,"A"), (3,4,"A"), (4,1,"A");
+WITH RECURSIVE cte (depth, from_, to_, load_) as (
+SELECT 0,1,1,"A"
+ UNION
+SELECT depth+1, t1.from_, t1.to_, t1.load_
+FROM t1, cte WHERE t1.from_ = cte.to_
+) CYCLE from_, to_, load_ RESTRICT
+select * from cte;
+depth from_ to_ load_
+0 1 1 A
+1 1 2 A
+1 1 7 A
+2 2 3 A
+3 3 4 A
+4 4 1 A
+insert into t1 values (4,1,"B");
+WITH RECURSIVE cte (depth, from_, to_, load_) as (
+SELECT 0,1,1,"A"
+ UNION
+SELECT depth+1, t1.from_, t1.to_, t1.load_
+FROM t1, cte WHERE t1.from_ = cte.to_
+) CYCLE from_, to_, load_ RESTRICT
+select * from cte;
+depth from_ to_ load_
+0 1 1 A
+1 1 2 A
+1 1 7 A
+2 2 3 A
+3 3 4 A
+4 4 1 A
+4 4 1 B
+drop table t1;
diff --git a/mysql-test/main/cte_cycle.test b/mysql-test/main/cte_cycle.test
new file mode 100644
index 00000000000..505980353fd
--- /dev/null
+++ b/mysql-test/main/cte_cycle.test
@@ -0,0 +1,143 @@
+
+--echo #
+--echo # check errors
+--echo #
+
+--error ER_DUP_FIELDNAME
+WITH RECURSIVE cte AS (
+ SELECT 1 AS a UNION ALL
+ SELECT NULL FROM cte WHERE a IS NOT NULL)
+ CYCLE a, a RESTRICT
+SELECT * FROM cte;
+
+--error ER_BAD_FIELD_ERROR
+WITH RECURSIVE cte AS (
+ SELECT 1 AS a UNION ALL
+ SELECT NULL FROM cte WHERE a IS NOT NULL)
+ CYCLE b RESTRICT
+SELECT * FROM cte;
+
+--error ER_PARSE_ERROR
+WITH cte AS (
+ SELECT 1 AS a UNION ALL
+ SELECT NULL FROM cte WHERE a IS NOT NULL)
+ CYCLE b RESTRICT
+SELECT * FROM cte;
+
+
+--echo #
+--echo # A degenerate case
+--echo #
+
+WITH RECURSIVE cte AS (
+ SELECT 1 AS a, 2 as b)
+ CYCLE b RESTRICT
+SELECT * FROM cte;
+
+
+--echo #
+--echo # A simple case
+--echo #
+
+WITH RECURSIVE cte AS (
+ SELECT 1 AS a, 2 as b UNION ALL
+ SELECT 2, 2 FROM cte WHERE a IS NOT NULL)
+ CYCLE b RESTRICT
+SELECT * FROM cte;
+
+
+--echo #
+--echo # MDEV-20632 case (with fixed syntax)
+--echo #
+
+create table t1 (from_ int, to_ int);
+insert into t1 values (1,2), (1,100), (2,3), (3,4), (4,1);
+
+WITH RECURSIVE cte (depth, from_, to_) as (
+ SELECT 0,1,1
+ UNION
+ SELECT depth+1, t1.from_, t1.to_
+ FROM t1, cte WHERE t1.from_ = cte.to_
+) CYCLE from_, to_ RESTRICT
+select * from cte;
+
+create view v1 as WITH RECURSIVE cte (depth, from_, to_) as (
+ SELECT 0,1,1
+ UNION
+ SELECT depth+1, t1.from_, t1.to_
+ FROM t1, cte WHERE t1.from_ = cte.to_
+) CYCLE from_, to_ RESTRICT
+select * from cte;
+
+show create view v1;
+
+select * from v1;
+
+delete from t1;
+
+insert into t1 values (1,2), (1,NULL), (NULL,NULL), (NULL, 1);
+
+select * from v1;
+
+drop view v1;
+
+drop table t1;
+
+
+--echo #
+--echo # A simple blob case
+--echo #
+
+create table t1 (a int, b text);
+insert into t1 values (1, "a");
+
+WITH RECURSIVE cte AS (
+ SELECT a, b from t1 UNION ALL
+ SELECT a, b FROM cte WHERE a IS NOT NULL)
+ CYCLE b RESTRICT
+SELECT * FROM cte;
+
+drop table t1;
+
+--echo #
+--echo # check bit types
+--echo #
+
+create table t1 (from_ bit(3), to_ bit(3));
+insert into t1 values (1,2), (1,7), (2,3), (3,4), (4,1);
+
+WITH RECURSIVE cte (depth, from_, to_) as (
+ SELECT 0,1,1
+ UNION
+ SELECT depth+1, t1.from_, t1.to_
+ FROM t1, cte WHERE t1.from_ = cte.to_
+) CYCLE from_, to_ RESTRICT
+select * from cte;
+drop table t1;
+
+--echo #
+--echo # check bit types with BLOBs (TEXT)
+--echo #
+
+create table t1 (from_ bit(3), to_ bit(3), load_ text);
+insert into t1 values (1,2,"A"), (1,7,"A"), (2,3,"A"), (3,4,"A"), (4,1,"A");
+
+WITH RECURSIVE cte (depth, from_, to_, load_) as (
+ SELECT 0,1,1,"A"
+ UNION
+ SELECT depth+1, t1.from_, t1.to_, t1.load_
+ FROM t1, cte WHERE t1.from_ = cte.to_
+) CYCLE from_, to_, load_ RESTRICT
+select * from cte;
+insert into t1 values (4,1,"B");
+WITH RECURSIVE cte (depth, from_, to_, load_) as (
+ SELECT 0,1,1,"A"
+ UNION
+ SELECT depth+1, t1.from_, t1.to_, t1.load_
+ FROM t1, cte WHERE t1.from_ = cte.to_
+) CYCLE from_, to_, load_ RESTRICT
+select * from cte;
+
+drop table t1;
+
+
diff --git a/mysql-test/main/cte_nonrecursive.result b/mysql-test/main/cte_nonrecursive.result
index 11101d7d0f1..17c73f74a49 100644
--- a/mysql-test/main/cte_nonrecursive.result
+++ b/mysql-test/main/cte_nonrecursive.result
@@ -606,7 +606,7 @@ with t(c) as (select a from t1 where b >= 'c')
select * from t r1 where r1.c=4;
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 with t(c) as (select `test`.`t1`.`a` AS `c` from `test`.`t1` where `test`.`t1`.`b` >= 'c')select `r1`.`c` AS `c` from `t` `r1` where `r1`.`c` = 4 latin1 latin1_swedish_ci
+v3 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v3` AS with t(`c`) as (select `test`.`t1`.`a` AS `c` from `test`.`t1` where `test`.`t1`.`b` >= 'c')select `r1`.`c` AS `c` from `t` `r1` where `r1`.`c` = 4 latin1 latin1_swedish_ci
select * from v3;
c
4
@@ -618,7 +618,7 @@ with t(c) as (select a from t1 where b >= 'c')
select * from t r1, t r2 where r1.c=r2.c and r2.c=4;
show create view v4;
View Create View character_set_client collation_connection
-v4 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v4` AS with t(c) as (select `test`.`t1`.`a` AS `c` from `test`.`t1` where `test`.`t1`.`b` >= 'c')select `r1`.`c` AS `c`,`r2`.`c` AS `d` from (`t` `r1` join `t` `r2`) where `r1`.`c` = `r2`.`c` and `r2`.`c` = 4 latin1 latin1_swedish_ci
+v4 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v4` AS with t(`c`) as (select `test`.`t1`.`a` AS `c` from `test`.`t1` where `test`.`t1`.`b` >= 'c')select `r1`.`c` AS `c`,`r2`.`c` AS `d` from (`t` `r1` join `t` `r2`) where `r1`.`c` = `r2`.`c` and `r2`.`c` = 4 latin1 latin1_swedish_ci
select * from v4;
c d
4 4
@@ -1159,10 +1159,10 @@ with cte as
union
(select a from t1 where a < 2);
a
+1
4
5
7
-1
prepare stmt from "with cte as
(select a from t1 where a between 4 and 7 group by a)
(select a from cte where exists( select a from t1 where cte.a=t1.a ))
@@ -1170,16 +1170,16 @@ union
(select a from t1 where a < 2)";
execute stmt;
a
+1
4
5
7
-1
execute stmt;
a
+1
4
5
7
-1
deallocate prepare stmt;
with cte as
(select a from t1 where a between 4 and 7 group by a)
@@ -1216,9 +1216,9 @@ union
(select a from cte where exists( select a from t1 where cte.a=t1.a ));
a
1
-7
-5
4
+5
+7
prepare stmt from "with cte as
(select a from t1 where a between 4 and 7)
(select a from t1 where a < 2)
@@ -1227,15 +1227,15 @@ union
execute stmt;
a
1
-7
-5
4
+5
+7
execute stmt;
a
1
-7
-5
4
+5
+7
deallocate prepare stmt;
with cte as
(select a from t1 where a between 4 and 7)
@@ -1244,9 +1244,9 @@ where exists( select a from t1 where t1.a < 2 and cte.a=t1.a ))
union
(select a from cte where exists( select a from t1 where cte.a=t1.a ));
a
-7
-5
4
+5
+7
prepare stmt from "with cte as
(select a from t1 where a between 4 and 7)
(select a from cte
@@ -1255,14 +1255,14 @@ union
(select a from cte where exists( select a from t1 where cte.a=t1.a ))";
execute stmt;
a
-7
-5
4
+5
+7
execute stmt;
a
-7
-5
4
+5
+7
deallocate prepare stmt;
drop table t1;
#
diff --git a/mysql-test/main/cte_nonrecursive.test b/mysql-test/main/cte_nonrecursive.test
index e1be68563d2..8ab3bddc410 100644
--- a/mysql-test/main/cte_nonrecursive.test
+++ b/mysql-test/main/cte_nonrecursive.test
@@ -808,9 +808,12 @@ with cte as
union
(select a from t1 where a < 2);
+--sorted_result
eval $q1;
eval prepare stmt from "$q1";
+--sorted_result
execute stmt;
+--sorted_result
execute stmt;
deallocate prepare stmt;
@@ -821,9 +824,12 @@ with cte as
union
(select a from cte where exists( select a from t1 where cte.a=t1.a ));
+--sorted_result
eval $q2;
eval prepare stmt from "$q2";
+--sorted_result
execute stmt;
+--sorted_result
execute stmt;
deallocate prepare stmt;
@@ -834,9 +840,12 @@ with cte as
union
(select a from cte where exists( select a from t1 where cte.a=t1.a ));
+--sorted_result
eval $q3;
eval prepare stmt from "$q3";
+--sorted_result
execute stmt;
+--sorted_result
execute stmt;
deallocate prepare stmt;
@@ -848,9 +857,12 @@ with cte as
union
(select a from cte where exists( select a from t1 where cte.a=t1.a ));
+--sorted_result
eval $q4;
eval prepare stmt from "$q4";
+--sorted_result
execute stmt;
+--sorted_result
execute stmt;
deallocate prepare stmt;
diff --git a/mysql-test/main/cte_recursive.result b/mysql-test/main/cte_recursive.result
index 72d8d5cc00e..478bd9a92a5 100644
--- a/mysql-test/main/cte_recursive.result
+++ b/mysql-test/main/cte_recursive.result
@@ -699,7 +699,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
NULL UNION RESULT <union3,4,5> ALL NULL NULL NULL NULL NULL NULL
2 DERIVED <derived3> ALL NULL NULL NULL NULL 12 100.00 Using where
Warnings:
-Note 1003 with recursive ancestor_couple_ids(h_id,w_id) as (/* select#2 */ select `a`.`father` AS `h_id`,`a`.`mother` AS `w_id` from `coupled_ancestors` `a` where `a`.`father` is not null and `a`.`mother` is not null), coupled_ancestors(id,name,dob,father,mother) as (/* select#3 */ select `test`.`folks`.`id` AS `id`,`test`.`folks`.`name` AS `name`,`test`.`folks`.`dob` AS `dob`,`test`.`folks`.`father` AS `father`,`test`.`folks`.`mother` AS `mother` from `test`.`folks` where `test`.`folks`.`name` = 'Me' union all /* select#4 */ select `test`.`p`.`id` AS `id`,`test`.`p`.`name` AS `name`,`test`.`p`.`dob` AS `dob`,`test`.`p`.`father` AS `father`,`test`.`p`.`mother` AS `mother` from `test`.`folks` `p` join `ancestor_couple_ids` `fa` where `test`.`p`.`id` = `fa`.`h_id` union all /* select#5 */ select `test`.`p`.`id` AS `id`,`test`.`p`.`name` AS `name`,`test`.`p`.`dob` AS `dob`,`test`.`p`.`father` AS `father`,`test`.`p`.`mother` AS `mother` from `test`.`folks` `p` join `ancestor_couple_ids` `ma` where `test`.`p`.`id` = `ma`.`w_id`)/* select#1 */ select `h`.`name` AS `name`,`h`.`dob` AS `dob`,`w`.`name` AS `name`,`w`.`dob` AS `dob` from `ancestor_couple_ids` `c` join `coupled_ancestors` `h` join `coupled_ancestors` `w` where `h`.`id` = `c`.`h_id` and `w`.`id` = `c`.`w_id`
+Note 1003 with recursive ancestor_couple_ids(`h_id`,`w_id`) as (/* select#2 */ select `a`.`father` AS `h_id`,`a`.`mother` AS `w_id` from `coupled_ancestors` `a` where `a`.`father` is not null and `a`.`mother` is not null), coupled_ancestors(`id`,`name`,`dob`,`father`,`mother`) as (/* select#3 */ select `test`.`folks`.`id` AS `id`,`test`.`folks`.`name` AS `name`,`test`.`folks`.`dob` AS `dob`,`test`.`folks`.`father` AS `father`,`test`.`folks`.`mother` AS `mother` from `test`.`folks` where `test`.`folks`.`name` = 'Me' union all /* select#4 */ select `test`.`p`.`id` AS `id`,`test`.`p`.`name` AS `name`,`test`.`p`.`dob` AS `dob`,`test`.`p`.`father` AS `father`,`test`.`p`.`mother` AS `mother` from `test`.`folks` `p` join `ancestor_couple_ids` `fa` where `test`.`p`.`id` = `fa`.`h_id` union all /* select#5 */ select `test`.`p`.`id` AS `id`,`test`.`p`.`name` AS `name`,`test`.`p`.`dob` AS `dob`,`test`.`p`.`father` AS `father`,`test`.`p`.`mother` AS `mother` from `test`.`folks` `p` join `ancestor_couple_ids` `ma` where `test`.`p`.`id` = `ma`.`w_id`)/* select#1 */ select `h`.`name` AS `name`,`h`.`dob` AS `dob`,`w`.`name` AS `name`,`w`.`dob` AS `dob` from `ancestor_couple_ids` `c` join `coupled_ancestors` `h` join `coupled_ancestors` `w` where `h`.`id` = `c`.`h_id` and `w`.`id` = `c`.`w_id`
# simple mutual recursion
with recursive
ancestor_couple_ids(h_id, w_id)
@@ -2407,7 +2407,8 @@ ANALYZE
"r_loops": 1,
"rows": 2,
"r_rows": 10,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100,
"materialized": {
@@ -2438,7 +2439,8 @@ ANALYZE
"r_loops": 10,
"rows": 2,
"r_rows": 1,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 90,
"attached_condition": "src.counter < 10"
@@ -3091,7 +3093,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
4 DEPENDENT SUBQUERY <derived2> ALL NULL NULL NULL NULL 16 100.00 Using where
NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL NULL
Warnings:
-Note 1003 with recursive destinations(city,legs) as (/* select#2 */ select `test`.`a`.`arrival` AS `city`,1 AS `legs` from `test`.`flights` `a` where `test`.`a`.`departure` = 'Cairo' union /* select#3 */ select `test`.`b`.`arrival` AS `arrival`,`r`.`legs` + 1 AS `r.legs + 1` from `destinations` `r` join `test`.`flights` `b` where `r`.`city` = `test`.`b`.`departure` and !<in_optimizer>(`test`.`b`.`arrival`,<exists>(/* select#4 */ select `destinations`.`city` from `destinations` where trigcond(`test`.`b`.`arrival` = `destinations`.`city` or `destinations`.`city` is null) having trigcond(`destinations`.`city` is null))))/* select#1 */ select `destinations`.`city` AS `city`,`destinations`.`legs` AS `legs` from `destinations`
+Note 1003 with recursive destinations(`city`,`legs`) as (/* select#2 */ select `test`.`a`.`arrival` AS `city`,1 AS `legs` from `test`.`flights` `a` where `test`.`a`.`departure` = 'Cairo' union /* select#3 */ select `test`.`b`.`arrival` AS `arrival`,`r`.`legs` + 1 AS `r.legs + 1` from `destinations` `r` join `test`.`flights` `b` where `r`.`city` = `test`.`b`.`departure` and !(<in_optimizer>(`test`.`b`.`arrival`,<exists>(/* select#4 */ select `destinations`.`city` from `destinations` where trigcond(`test`.`b`.`arrival` = `destinations`.`city` or `destinations`.`city` is null) having trigcond(`destinations`.`city` is null)))))/* select#1 */ select `destinations`.`city` AS `city`,`destinations`.`legs` AS `legs` from `destinations`
set standard_compliant_cte=default;
drop table flights;
#
@@ -3110,7 +3112,7 @@ SELECT * FROM cte;
#
# MDEV-15575: using recursive cte with big_tables enabled
#
-set big_tables=1;
+set tmp_memory_table_size=0;
with recursive qn as
(select 123 as a union all select 1+a from qn where a<130)
select * from qn;
@@ -3123,13 +3125,13 @@ a
128
129
130
-set big_tables=default;
+set tmp_memory_table_size=default;
#
# MDEV-15571: using recursive cte with big_tables enabled
#
create table t1 (a bigint);
insert into t1 values(1);
-set big_tables=1;
+set tmp_memory_table_size=0;
with recursive qn as
(
select a from t1
@@ -3138,13 +3140,13 @@ select a*2000 from qn where a<10000000000000000000
)
select * from qn;
ERROR 22003: BIGINT value is out of range in '`qn`.`a` * 2000'
-set big_tables=default;
+set tmp_memory_table_size=default;
drop table t1;
#
# MDEV-15556: using recursive cte with big_tables enabled
# when recursive tables are accessed by key
#
-SET big_tables=1;
+set tmp_memory_table_size=0;
CREATE TABLE t1 (id int, name char(10), leftpar int, rightpar int);
INSERT INTO t1 VALUES
(1, "A", 2, 3), (2, "LA", 4, 5), (4, "LLA", 6, 7),
@@ -3195,7 +3197,7 @@ id select_type table type possible_keys key key_len ref rows Extra
4 RECURSIVE UNION <derived2> ref key0 key0 5 test.t2.id 2
NULL UNION RESULT <union2,3,4> ALL NULL NULL NULL NULL NULL
DROP TABLE t1,t2;
-SET big_tables=0;
+set tmp_memory_table_size=default;
#
# MDEV-15840: recursive tables are accessed by key
# (the same problem as for MDEV-15556)
@@ -3378,7 +3380,7 @@ NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL NULL
5 DERIVED <derived2> ALL NULL NULL NULL NULL 2 100.00 Using where
5 DERIVED t1 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer (flat, BNL join)
Warnings:
-Note 1003 with recursive rcte(a) as (/* select#2 */ select 1 AS `a` union /* select#3 */ select cast(`rcte`.`a` + 1 as unsigned) AS `cast(a+1 as unsigned)` from `rcte` where `rcte`.`a` < 10), cte1 as (/* select#4 */ select count(0) AS `c1` from `rcte` join `test`.`t1` where `rcte`.`a` between 3 and 5 and `test`.`t1`.`id` = `rcte`.`a` - 3), cte2 as (/* select#5 */ select count(0) AS `c2` from `rcte` join `test`.`t1` where `rcte`.`a` between 7 and 8 and `test`.`t1`.`id` = `rcte`.`a` - 7)/* select#1 */ select `cte1`.`c1` AS `c1`,`cte2`.`c2` AS `c2` from `cte1` join `cte2`
+Note 1003 with recursive rcte(`a`) as (/* select#2 */ select 1 AS `a` union /* select#3 */ select cast(`rcte`.`a` + 1 as unsigned) AS `cast(a+1 as unsigned)` from `rcte` where `rcte`.`a` < 10), cte1 as (/* select#4 */ select count(0) AS `c1` from `rcte` join `test`.`t1` where `rcte`.`a` between 3 and 5 and `test`.`t1`.`id` = `rcte`.`a` - 3), cte2 as (/* select#5 */ select count(0) AS `c2` from `rcte` join `test`.`t1` where `rcte`.`a` between 7 and 8 and `test`.`t1`.`id` = `rcte`.`a` - 7)/* select#1 */ select `cte1`.`c1` AS `c1`,`cte2`.`c2` AS `c2` from `cte1` join `cte2`
prepare stmt from "with recursive
rcte(a) as
(select 1 union select cast(a+1 as unsigned) from rcte where a < 10),
@@ -3464,7 +3466,7 @@ NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL NULL
4 DERIVED <derived2> ALL NULL NULL NULL NULL 2 100.00 Using where
4 DERIVED t1 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer (flat, BNL join)
Warnings:
-Note 1003 with recursive rcte(a) as (/* select#2 */ select 1 AS `a` union /* select#3 */ select cast(`rcte`.`a` + 1 as unsigned) AS `cast(a+1 as unsigned)` from `rcte` where `rcte`.`a` < 10), cte1 as (/* select#4 */ select count(0) AS `c1` from `rcte` join `test`.`t1` where `rcte`.`a` between 3 and 5 and `test`.`t1`.`id` = `rcte`.`a` - 3), cte2 as (/* select#5 */ select count(0) AS `c2` from `rcte` join `test`.`t1` where `rcte`.`a` between 7 and 8 and `test`.`t1`.`id` = `rcte`.`a` - 7)/* select#1 */ select `cte2`.`c2` AS `c2`,`cte1`.`c1` AS `c1` from `cte2` join `cte1`
+Note 1003 with recursive rcte(`a`) as (/* select#2 */ select 1 AS `a` union /* select#3 */ select cast(`rcte`.`a` + 1 as unsigned) AS `cast(a+1 as unsigned)` from `rcte` where `rcte`.`a` < 10), cte1 as (/* select#4 */ select count(0) AS `c1` from `rcte` join `test`.`t1` where `rcte`.`a` between 3 and 5 and `test`.`t1`.`id` = `rcte`.`a` - 3), cte2 as (/* select#5 */ select count(0) AS `c2` from `rcte` join `test`.`t1` where `rcte`.`a` between 7 and 8 and `test`.`t1`.`id` = `rcte`.`a` - 7)/* select#1 */ select `cte2`.`c2` AS `c2`,`cte1`.`c1` AS `c1` from `cte2` join `cte1`
prepare stmt from "with recursive
rcte(a) as
(select 1 union select cast(a+1 as unsigned) from rcte where a < 10),
@@ -3780,9 +3782,8 @@ where (dt.a1) in (with recursive cte as (select a2 from t2 where a2='2'
union select tt2.a2 from t2 tt2 join cte on tt2.b1=cte.a2)
select a2 from cte);
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t1 ALL NULL NULL NULL NULL 3
-1 PRIMARY <subquery5> eq_ref distinct_key distinct_key 23 func 1
-5 MATERIALIZED <derived3> ALL NULL NULL NULL NULL 2
+1 PRIMARY t1 ALL NULL NULL NULL NULL 3 Using where
+1 PRIMARY <derived3> ref key0 key0 23 test.t1.a1 1 FirstMatch(t1)
3 DERIVED t2 const PRIMARY PRIMARY 22 const 1 Using index
4 RECURSIVE UNION <derived3> ALL NULL NULL NULL NULL 2 Using where
4 RECURSIVE UNION tt2 ref b1 b1 23 cte.a2 2
@@ -3798,112 +3799,101 @@ ANALYZE
"select_id": 1,
"r_loops": 1,
"r_total_time_ms": "REPLACED",
- "const_condition": "1",
"table": {
"table_name": "t1",
"access_type": "ALL",
"r_loops": 1,
"rows": 3,
"r_rows": 3,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
- "r_filtered": 100
+ "r_filtered": 100,
+ "attached_condition": "t1.a1 is not null"
},
"table": {
- "table_name": "<subquery5>",
- "access_type": "eq_ref",
- "possible_keys": ["distinct_key"],
- "key": "distinct_key",
+ "table_name": "<derived3>",
+ "access_type": "ref",
+ "possible_keys": ["key0"],
+ "key": "key0",
"key_length": "23",
"used_key_parts": ["a2"],
- "ref": ["func"],
+ "ref": ["test.t1.a1"],
"r_loops": 3,
"rows": 1,
- "r_rows": 0.3333,
- "r_total_time_ms": "REPLACED",
+ "r_rows": 0.333333333,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100,
+ "first_match": "t1",
"materialized": {
- "unique": 1,
"query_block": {
- "select_id": 5,
- "table": {
- "table_name": "<derived3>",
+ "recursive_union": {
+ "table_name": "<union3,4>",
"access_type": "ALL",
- "r_loops": 1,
- "rows": 2,
- "r_rows": 1,
- "r_total_time_ms": "REPLACED",
- "filtered": 100,
- "r_filtered": 100,
- "materialized": {
- "query_block": {
- "recursive_union": {
- "table_name": "<union3,4>",
- "access_type": "ALL",
- "r_loops": 0,
- "r_rows": null,
- "query_specifications": [
- {
- "query_block": {
- "select_id": 3,
- "r_loops": 1,
- "r_total_time_ms": "REPLACED",
- "table": {
- "table_name": "t2",
- "access_type": "const",
- "possible_keys": ["PRIMARY"],
- "key": "PRIMARY",
- "key_length": "22",
- "used_key_parts": ["a2"],
- "ref": ["const"],
- "r_loops": 0,
- "rows": 1,
- "r_rows": null,
- "filtered": 100,
- "r_filtered": null,
- "using_index": true
- }
- }
- },
- {
- "query_block": {
- "select_id": 4,
- "operation": "UNION",
- "r_loops": 1,
- "r_total_time_ms": "REPLACED",
- "table": {
- "table_name": "<derived3>",
- "access_type": "ALL",
- "r_loops": 1,
- "rows": 2,
- "r_rows": 1,
- "r_total_time_ms": "REPLACED",
- "filtered": 100,
- "r_filtered": 100,
- "attached_condition": "cte.a2 is not null"
- },
- "table": {
- "table_name": "tt2",
- "access_type": "ref",
- "possible_keys": ["b1"],
- "key": "b1",
- "key_length": "23",
- "used_key_parts": ["b1"],
- "ref": ["cte.a2"],
- "r_loops": 1,
- "rows": 2,
- "r_rows": 1,
- "r_total_time_ms": "REPLACED",
- "filtered": 100,
- "r_filtered": 100
- }
- }
- }
- ]
+ "r_loops": 0,
+ "r_rows": null,
+ "query_specifications": [
+ {
+ "query_block": {
+ "select_id": 3,
+ "r_loops": 1,
+ "r_total_time_ms": "REPLACED",
+ "table": {
+ "table_name": "t2",
+ "access_type": "const",
+ "possible_keys": ["PRIMARY"],
+ "key": "PRIMARY",
+ "key_length": "22",
+ "used_key_parts": ["a2"],
+ "ref": ["const"],
+ "r_loops": 0,
+ "rows": 1,
+ "r_rows": null,
+ "filtered": 100,
+ "r_filtered": null,
+ "using_index": true
+ }
+ }
+ },
+ {
+ "query_block": {
+ "select_id": 4,
+ "operation": "UNION",
+ "r_loops": 1,
+ "r_total_time_ms": "REPLACED",
+ "table": {
+ "table_name": "<derived3>",
+ "access_type": "ALL",
+ "r_loops": 1,
+ "rows": 2,
+ "r_rows": 1,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 100,
+ "r_filtered": 100,
+ "attached_condition": "cte.a2 is not null"
+ },
+ "table": {
+ "table_name": "tt2",
+ "access_type": "ref",
+ "possible_keys": ["b1"],
+ "key": "b1",
+ "key_length": "23",
+ "used_key_parts": ["b1"],
+ "ref": ["cte.a2"],
+ "r_loops": 1,
+ "rows": 2,
+ "r_rows": 1,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 100,
+ "r_filtered": 100
+ }
}
}
- }
+ ]
}
}
}
@@ -4075,7 +4065,8 @@ ANALYZE
"r_loops": 1,
"rows": 4,
"r_rows": 4,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100,
"materialized": {
@@ -4097,7 +4088,8 @@ ANALYZE
"r_loops": 1,
"rows": 4,
"r_rows": 4,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100
}
@@ -4115,7 +4107,8 @@ ANALYZE
"r_loops": 1,
"rows": 4,
"r_rows": 4,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100,
"attached_condition": "t1.c is not null"
@@ -4131,7 +4124,8 @@ ANALYZE
"r_loops": 4,
"rows": 2,
"r_rows": 0.5,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100
}
@@ -4209,7 +4203,8 @@ ANALYZE
"r_loops": 1,
"rows": 4,
"r_rows": 4,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100
}
@@ -4285,6 +4280,8 @@ use test;
#
set @save_big_tables=@@big_tables;
set big_tables=1;
+Warnings:
+Warning 1287 '@@big_tables' is deprecated and will be removed in a future release
create table folks(id int, name char(32), dob date, father int, mother int);
insert into folks values
(100, 'Me', '2000-01-01', 20, 30),
@@ -4459,9 +4456,9 @@ id select_type table type possible_keys key key_len ref rows Extra
4 RECURSIVE UNION <derived2> ALL NULL NULL NULL NULL 2
5 RECURSIVE UNION <derived2> ALL NULL NULL NULL NULL 2
NULL UNION RESULT <union3,4,5> ALL NULL NULL NULL NULL NULL
-2 DERIVED h ALL NULL NULL NULL NULL 12 Using where
-2 DERIVED <derived3> ref key0 key0 5 test.h.id 2
-2 DERIVED w ALL NULL NULL NULL NULL 12 Using where; Using join buffer (flat, BNL join)
+2 DERIVED h ALL NULL NULL NULL NULL 12
+2 DERIVED w ALL NULL NULL NULL NULL 12 Using join buffer (flat, BNL join)
+2 DERIVED <derived3> ALL NULL NULL NULL NULL 12 Using where; Using join buffer (incremental, BNL join)
prepare stmt from "with recursive
ancestor_couples(h_id, h_name, h_dob, h_father, h_mother,
w_id, w_name, w_dob, w_father, w_mother)
@@ -4499,6 +4496,8 @@ Grandpa Ben 1940-10-21 Grandma Sally 1943-08-23
deallocate prepare stmt;
drop table folks;
set big_tables=@save_big_tables;
+Warnings:
+Warning 1287 '@@big_tables' is deprecated and will be removed in a future release
#
# MDEV-26135: execution of PS for query with hanging recursive CTE
#
diff --git a/mysql-test/main/cte_recursive.test b/mysql-test/main/cte_recursive.test
index 8ac6f841f6e..f8c41dbc3ea 100644
--- a/mysql-test/main/cte_recursive.test
+++ b/mysql-test/main/cte_recursive.test
@@ -2138,13 +2138,13 @@ SELECT * FROM cte;
--echo # MDEV-15575: using recursive cte with big_tables enabled
--echo #
-set big_tables=1;
+set tmp_memory_table_size=0; # force on-disk tmp table
with recursive qn as
(select 123 as a union all select 1+a from qn where a<130)
select * from qn;
-set big_tables=default;
+set tmp_memory_table_size=default;
--echo #
--echo # MDEV-15571: using recursive cte with big_tables enabled
@@ -2153,7 +2153,7 @@ set big_tables=default;
create table t1 (a bigint);
insert into t1 values(1);
-set big_tables=1;
+set tmp_memory_table_size=0; # force on-disk tmp table
--error ER_DATA_OUT_OF_RANGE
with recursive qn as
@@ -2164,7 +2164,7 @@ with recursive qn as
)
select * from qn;
-set big_tables=default;
+set tmp_memory_table_size=default;
drop table t1;
@@ -2173,7 +2173,7 @@ drop table t1;
--echo # when recursive tables are accessed by key
--echo #
-SET big_tables=1;
+set tmp_memory_table_size=0; # force on-disk tmp table
CREATE TABLE t1 (id int, name char(10), leftpar int, rightpar int);
INSERT INTO t1 VALUES
@@ -2202,7 +2202,7 @@ eval EXPLAIN $q;
DROP TABLE t1,t2;
-SET big_tables=0;
+set tmp_memory_table_size=default;
--echo #
--echo # MDEV-15840: recursive tables are accessed by key
diff --git a/mysql-test/main/ctype_big5.result b/mysql-test/main/ctype_big5.result
index 8895e2d89df..41ce8f0b82e 100644
--- a/mysql-test/main/ctype_big5.result
+++ b/mysql-test/main/ctype_big5.result
@@ -4827,7 +4827,7 @@ DROP TABLE t1;
# MDEV-9711 NO PAD Collatons
#
SET character_set_connection=big5;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -4965,7 +4965,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -5103,8 +5103,8 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -5242,7 +5242,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -5380,7 +5380,65 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=Default;
#
# End of 10.2 tests
#
+#
+# Start of 10.5 tests
+#
+#
+# MDEV-22625 SIGSEGV in intern_find_sys_var (optimized builds)
+#
+SET NAMES big5;
+SET @seq=_big5 0xA3C0;
+#
+# SET STATEMENT (bad|good.bad|bad.good)=1
+#
+EXECUTE IMMEDIATE CONCAT('SET STATEMENT ',@seq, '=1 SELECT 1');
+ERROR HY000: Invalid big5 character string: '\xA3\xC0'
+EXECUTE IMMEDIATE CONCAT('SET STATEMENT ',@seq, '.a=1 SELECT 1');
+ERROR HY000: Invalid big5 character string: '\xA3\xC0'
+EXECUTE IMMEDIATE CONCAT('SET STATEMENT a.',@seq, '=1 SELECT 1');
+ERROR HY000: Invalid big5 character string: '\xA3\xC0'
+#
+# SET SESSION (bad|good.bad|bad.good)=1
+#
+EXECUTE IMMEDIATE CONCAT('SET SESSION ',@seq, '=1 SELECT 1');
+ERROR HY000: Invalid big5 character string: '\xA3\xC0'
+EXECUTE IMMEDIATE CONCAT('SET SESSION ',@seq, '.a=1 SELECT 1');
+ERROR HY000: Invalid big5 character string: '\xA3\xC0'
+EXECUTE IMMEDIATE CONCAT('SET SESSION a.',@seq, '=1 SELECT 1');
+ERROR HY000: Invalid big5 character string: '\xA3\xC0'
+#
+# SET (bad|good.bad|bad.good)=1
+#
+EXECUTE IMMEDIATE CONCAT('SET ', @seq, '=1');
+ERROR HY000: Invalid big5 character string: '\xA3\xC0'
+EXECUTE IMMEDIATE CONCAT('SET ', @seq, '.a=1');
+ERROR HY000: Invalid big5 character string: '\xA3\xC0'
+EXECUTE IMMEDIATE CONCAT('SET a.', @seq, '=1');
+ERROR HY000: Invalid big5 character string: '\xA3\xC0'
+#
+# Oracle SP call: BEGIN (bad|good.bad|bad.good)(params); END
+#
+SET sql_mode=ORACLE;
+EXECUTE IMMEDIATE CONCAT('BEGIN ',@seq, '(1); END;');
+ERROR HY000: Invalid big5 character string: '\xA3\xC0'
+EXECUTE IMMEDIATE CONCAT('BEGIN ',@seq, '.a(1); END;');
+ERROR HY000: Invalid big5 character string: '\xA3\xC0'
+EXECUTE IMMEDIATE CONCAT('BEGIN a.',@seq, '(1); END;');
+ERROR HY000: Invalid big5 character string: '\xA3\xC0'
+#
+# Oracle assignment: (bad|good.bad|bad.good):= value
+#
+EXECUTE IMMEDIATE CONCAT(@seq, ':=1');
+ERROR HY000: Invalid big5 character string: '\xA3\xC0'
+EXECUTE IMMEDIATE CONCAT(@seq, '.a:=1');
+ERROR HY000: Invalid big5 character string: '\xA3\xC0'
+EXECUTE IMMEDIATE CONCAT('a.', @seq, ':=1');
+ERROR HY000: Invalid big5 character string: '\xA3\xC0'
+SET sql_mode=DEFAULT;
+#
+# End of 10.5 tests
+#
diff --git a/mysql-test/main/ctype_big5.test b/mysql-test/main/ctype_big5.test
index 410203c7c86..41991258886 100644
--- a/mysql-test/main/ctype_big5.test
+++ b/mysql-test/main/ctype_big5.test
@@ -269,3 +269,20 @@ let $coll_pad='big5_bin';
--echo #
--echo # End of 10.2 tests
--echo #
+
+
+--echo #
+--echo # Start of 10.5 tests
+--echo #
+
+--echo #
+--echo # MDEV-22625 SIGSEGV in intern_find_sys_var (optimized builds)
+--echo #
+
+SET NAMES big5;
+SET @seq=_big5 0xA3C0;
+--source include/ctype_ident_sys.inc
+
+--echo #
+--echo # End of 10.5 tests
+--echo #
diff --git a/mysql-test/main/ctype_binary.result b/mysql-test/main/ctype_binary.result
index 97f970a9e49..05f31f13dc7 100644
--- a/mysql-test/main/ctype_binary.result
+++ b/mysql-test/main/ctype_binary.result
@@ -1,7 +1,4 @@
set names binary;
-#
-# Start of 5.5 tests
-#
SET TIME_ZONE = _latin1 '+03:00';
#
# Start of WL#2649 Number-to-string conversions
@@ -809,12 +806,12 @@ create table t1 as select concat(uuid()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(36) CHARACTER SET utf8 DEFAULT NULL
+ `c1` varbinary(36) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select coercibility(uuid()), coercibility(cast('a' as char character set latin1));
coercibility(uuid()) coercibility(cast('a' as char character set latin1))
-4 2
+5 2
select charset(concat(uuid(), cast('a' as char character set latin1)));
charset(concat(uuid(), cast('a' as char character set latin1)))
latin1
@@ -2927,9 +2924,6 @@ SET sql_mode=default;
#
# End of 5.5 tests
#
-#
-# Start of 10.0 tests
-#
SET NAMES binary;
#
# MDEV-7149 Constant condition propagation erroneously applied for LIKE
@@ -3077,9 +3071,6 @@ SET optimizer_switch=@save_optimizer_switch;
# End of 10.0 tests
#
#
-# Start of 10.1 tests
-#
-#
# MDEV-8695 Wrong result for SELECT..WHERE varchar_column='a' AND CRC32(varchar_column)=3904355907
#
CREATE TABLE t1 (a VARBINARY(10));
@@ -3270,9 +3261,6 @@ ERROR HY000: Incorrect information in file: 'DIR/t1.frm'
# End of 10.1 tests
#
#
-# Start of 10.2 tests
-#
-#
# MDEV-22111 ERROR 1064 & 1033 and SIGSEGV on CREATE TABLE w/ various charsets on 10.4/5 optimized builds | Assertion `(uint) (table_check_constraints - share->check_constraints) == (uint) (share->table_check_constraints - share->field_check_constraints)' failed
# 10.2 tests
#
@@ -3318,3 +3306,29 @@ DROP TABLE t1;
#
# End of 10.2 tests
#
+#
+# Start of 10.5 tests
+#
+#
+# MDEV-8844 Unreadable control characters printed as is in warnings
+#
+SET NAMES binary;
+CREATE TABLE t1 (a VARCHAR(20) CHARACTER SET latin1, UNIQUE(a));
+INSERT INTO t1 VALUES (0x61000162FF);
+INSERT INTO t1 VALUES (0x61000162FF);
+ERROR 23000: Duplicate entry 'a\0000\0001bÿ' for key 'a'
+INSERT IGNORE INTO t1 VALUES (0x61000162FF);
+Warnings:
+Warning 1062 Duplicate entry 'a\0000\0001bÿ' for key 'a'
+DROP TABLE t1;
+CREATE TABLE t1 (a VARCHAR(20) CHARACTER SET utf8, UNIQUE(a));
+INSERT INTO t1 VALUES (_latin1 0x61000162FF);
+INSERT INTO t1 VALUES (_latin1 0x61000162FF);
+ERROR 23000: Duplicate entry 'a\0000\0001bÿ' for key 'a'
+INSERT IGNORE INTO t1 VALUES (_latin1 0x61000162FF);
+Warnings:
+Warning 1062 Duplicate entry 'a\0000\0001bÿ' for key 'a'
+DROP TABLE t1;
+#
+# End of 10.5 tests
+#
diff --git a/mysql-test/main/ctype_binary.test b/mysql-test/main/ctype_binary.test
index b871a41309b..3cf184576b4 100644
--- a/mysql-test/main/ctype_binary.test
+++ b/mysql-test/main/ctype_binary.test
@@ -1,10 +1,6 @@
set names binary;
---echo #
---echo # Start of 5.5 tests
---echo #
-
--source include/ctype_numconv.inc
--echo #
@@ -12,10 +8,6 @@ set names binary;
--echo #
---echo #
---echo # Start of 10.0 tests
---echo #
-
SET NAMES binary;
--source include/ctype_like_cond_propagation.inc
@@ -32,10 +24,6 @@ SET NAMES utf8, character_set_connection=binary;
--echo #
--echo #
---echo # Start of 10.1 tests
---echo #
-
---echo #
--echo # MDEV-8695 Wrong result for SELECT..WHERE varchar_column='a' AND CRC32(varchar_column)=3904355907
--echo #
CREATE TABLE t1 (a VARBINARY(10));
@@ -139,10 +127,6 @@ CREATE TABLE t1 (a ENUM('a',0x0061), b ENUM('b'));
--echo #
--echo #
---echo # Start of 10.2 tests
---echo #
-
---echo #
--echo # MDEV-22111 ERROR 1064 & 1033 and SIGSEGV on CREATE TABLE w/ various charsets on 10.4/5 optimized builds | Assertion `(uint) (table_check_constraints - share->check_constraints) == (uint) (share->table_check_constraints - share->field_check_constraints)' failed
--echo # 10.2 tests
--echo #
@@ -169,12 +153,33 @@ INSERT INTO t1 VALUES (1);
SELECT HEX(c) FROM t1;
DROP TABLE t1;
+--echo #
+--echo # End of 10.2 tests
+--echo #
+--echo #
+--echo # Start of 10.5 tests
+--echo #
+--echo #
+--echo # MDEV-8844 Unreadable control characters printed as is in warnings
+--echo #
+SET NAMES binary;
+CREATE TABLE t1 (a VARCHAR(20) CHARACTER SET latin1, UNIQUE(a));
+INSERT INTO t1 VALUES (0x61000162FF);
+--error ER_DUP_ENTRY
+INSERT INTO t1 VALUES (0x61000162FF);
+INSERT IGNORE INTO t1 VALUES (0x61000162FF);
+DROP TABLE t1;
-
+CREATE TABLE t1 (a VARCHAR(20) CHARACTER SET utf8, UNIQUE(a));
+INSERT INTO t1 VALUES (_latin1 0x61000162FF);
+--error ER_DUP_ENTRY
+INSERT INTO t1 VALUES (_latin1 0x61000162FF);
+INSERT IGNORE INTO t1 VALUES (_latin1 0x61000162FF);
+DROP TABLE t1;
--echo #
---echo # End of 10.2 tests
+--echo # End of 10.5 tests
--echo #
diff --git a/mysql-test/main/ctype_cp1251.result b/mysql-test/main/ctype_cp1251.result
index b0e6e1e6506..7d9b47f1f54 100644
--- a/mysql-test/main/ctype_cp1251.result
+++ b/mysql-test/main/ctype_cp1251.result
@@ -1218,12 +1218,12 @@ create table t1 as select concat(uuid()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(36) CHARACTER SET utf8 DEFAULT NULL
+ `c1` varchar(36) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select coercibility(uuid()), coercibility(cast('a' as char character set latin1));
coercibility(uuid()) coercibility(cast('a' as char character set latin1))
-4 2
+5 2
select charset(concat(uuid(), cast('a' as char character set latin1)));
charset(concat(uuid(), cast('a' as char character set latin1)))
latin1
diff --git a/mysql-test/main/ctype_cp932.result b/mysql-test/main/ctype_cp932.result
index eb714e9f8d7..952130cf11c 100644
--- a/mysql-test/main/ctype_cp932.result
+++ b/mysql-test/main/ctype_cp932.result
@@ -40,7 +40,7 @@ SET @@character_set_results= @old_character_set_results;
# MDEV-9711 NO PAD Collatons
#
SET character_set_connection=cp932;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -178,7 +178,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -316,8 +316,8 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -455,7 +455,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -593,7 +593,65 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=Default;
#
# End of 10.2 tests
#
+#
+# Start of 10.5 tests
+#
+#
+# MDEV-22625 SIGSEGV in intern_find_sys_var (optimized builds)
+#
+SET NAMES cp932;
+SET @seq=_cp932 0x81AD;
+#
+# SET STATEMENT (bad|good.bad|bad.good)=1
+#
+EXECUTE IMMEDIATE CONCAT('SET STATEMENT ',@seq, '=1 SELECT 1');
+ERROR HY000: Invalid cp932 character string: '\x81\xAD'
+EXECUTE IMMEDIATE CONCAT('SET STATEMENT ',@seq, '.a=1 SELECT 1');
+ERROR HY000: Invalid cp932 character string: '\x81\xAD'
+EXECUTE IMMEDIATE CONCAT('SET STATEMENT a.',@seq, '=1 SELECT 1');
+ERROR HY000: Invalid cp932 character string: '\x81\xAD'
+#
+# SET SESSION (bad|good.bad|bad.good)=1
+#
+EXECUTE IMMEDIATE CONCAT('SET SESSION ',@seq, '=1 SELECT 1');
+ERROR HY000: Invalid cp932 character string: '\x81\xAD'
+EXECUTE IMMEDIATE CONCAT('SET SESSION ',@seq, '.a=1 SELECT 1');
+ERROR HY000: Invalid cp932 character string: '\x81\xAD'
+EXECUTE IMMEDIATE CONCAT('SET SESSION a.',@seq, '=1 SELECT 1');
+ERROR HY000: Invalid cp932 character string: '\x81\xAD'
+#
+# SET (bad|good.bad|bad.good)=1
+#
+EXECUTE IMMEDIATE CONCAT('SET ', @seq, '=1');
+ERROR HY000: Invalid cp932 character string: '\x81\xAD'
+EXECUTE IMMEDIATE CONCAT('SET ', @seq, '.a=1');
+ERROR HY000: Invalid cp932 character string: '\x81\xAD'
+EXECUTE IMMEDIATE CONCAT('SET a.', @seq, '=1');
+ERROR HY000: Invalid cp932 character string: '\x81\xAD'
+#
+# Oracle SP call: BEGIN (bad|good.bad|bad.good)(params); END
+#
+SET sql_mode=ORACLE;
+EXECUTE IMMEDIATE CONCAT('BEGIN ',@seq, '(1); END;');
+ERROR HY000: Invalid cp932 character string: '\x81\xAD'
+EXECUTE IMMEDIATE CONCAT('BEGIN ',@seq, '.a(1); END;');
+ERROR HY000: Invalid cp932 character string: '\x81\xAD'
+EXECUTE IMMEDIATE CONCAT('BEGIN a.',@seq, '(1); END;');
+ERROR HY000: Invalid cp932 character string: '\x81\xAD'
+#
+# Oracle assignment: (bad|good.bad|bad.good):= value
+#
+EXECUTE IMMEDIATE CONCAT(@seq, ':=1');
+ERROR HY000: Invalid cp932 character string: '\x81\xAD'
+EXECUTE IMMEDIATE CONCAT(@seq, '.a:=1');
+ERROR HY000: Invalid cp932 character string: '\x81\xAD'
+EXECUTE IMMEDIATE CONCAT('a.', @seq, ':=1');
+ERROR HY000: Invalid cp932 character string: '\x81\xAD'
+SET sql_mode=DEFAULT;
+#
+# End of 10.5 tests
+#
diff --git a/mysql-test/main/ctype_cp932.test b/mysql-test/main/ctype_cp932.test
index 2486ca8a79e..0f5ff437d33 100644
--- a/mysql-test/main/ctype_cp932.test
+++ b/mysql-test/main/ctype_cp932.test
@@ -47,3 +47,20 @@ let $coll_pad='cp932_bin';
--echo #
--echo # End of 10.2 tests
--echo #
+
+
+--echo #
+--echo # Start of 10.5 tests
+--echo #
+
+--echo #
+--echo # MDEV-22625 SIGSEGV in intern_find_sys_var (optimized builds)
+--echo #
+
+SET NAMES cp932;
+SET @seq=_cp932 0x81AD;
+--source include/ctype_ident_sys.inc
+
+--echo #
+--echo # End of 10.5 tests
+--echo #
diff --git a/mysql-test/main/ctype_dec8.result b/mysql-test/main/ctype_dec8.result
new file mode 100644
index 00000000000..f0522494bb2
--- /dev/null
+++ b/mysql-test/main/ctype_dec8.result
@@ -0,0 +1,58 @@
+#
+# Start of 10.5 tests
+#
+#
+# MDEV-22625 SIGSEGV in intern_find_sys_var (optimized builds)
+#
+SET NAMES dec8;
+SET @seq=_dec8 0xD0;
+#
+# SET STATEMENT (bad|good.bad|bad.good)=1
+#
+EXECUTE IMMEDIATE CONCAT('SET STATEMENT ',@seq, '=1 SELECT 1');
+ERROR HY000: Invalid dec8 character string: '\xD0'
+EXECUTE IMMEDIATE CONCAT('SET STATEMENT ',@seq, '.a=1 SELECT 1');
+ERROR HY000: Invalid dec8 character string: '\xD0'
+EXECUTE IMMEDIATE CONCAT('SET STATEMENT a.',@seq, '=1 SELECT 1');
+ERROR HY000: Invalid dec8 character string: '\xD0'
+#
+# SET SESSION (bad|good.bad|bad.good)=1
+#
+EXECUTE IMMEDIATE CONCAT('SET SESSION ',@seq, '=1 SELECT 1');
+ERROR HY000: Invalid dec8 character string: '\xD0'
+EXECUTE IMMEDIATE CONCAT('SET SESSION ',@seq, '.a=1 SELECT 1');
+ERROR HY000: Invalid dec8 character string: '\xD0'
+EXECUTE IMMEDIATE CONCAT('SET SESSION a.',@seq, '=1 SELECT 1');
+ERROR HY000: Invalid dec8 character string: '\xD0'
+#
+# SET (bad|good.bad|bad.good)=1
+#
+EXECUTE IMMEDIATE CONCAT('SET ', @seq, '=1');
+ERROR HY000: Invalid dec8 character string: '\xD0'
+EXECUTE IMMEDIATE CONCAT('SET ', @seq, '.a=1');
+ERROR HY000: Invalid dec8 character string: '\xD0'
+EXECUTE IMMEDIATE CONCAT('SET a.', @seq, '=1');
+ERROR HY000: Invalid dec8 character string: '\xD0'
+#
+# Oracle SP call: BEGIN (bad|good.bad|bad.good)(params); END
+#
+SET sql_mode=ORACLE;
+EXECUTE IMMEDIATE CONCAT('BEGIN ',@seq, '(1); END;');
+ERROR HY000: Invalid dec8 character string: '\xD0'
+EXECUTE IMMEDIATE CONCAT('BEGIN ',@seq, '.a(1); END;');
+ERROR HY000: Invalid dec8 character string: '\xD0'
+EXECUTE IMMEDIATE CONCAT('BEGIN a.',@seq, '(1); END;');
+ERROR HY000: Invalid dec8 character string: '\xD0'
+#
+# Oracle assignment: (bad|good.bad|bad.good):= value
+#
+EXECUTE IMMEDIATE CONCAT(@seq, ':=1');
+ERROR HY000: Invalid dec8 character string: '\xD0'
+EXECUTE IMMEDIATE CONCAT(@seq, '.a:=1');
+ERROR HY000: Invalid dec8 character string: '\xD0'
+EXECUTE IMMEDIATE CONCAT('a.', @seq, ':=1');
+ERROR HY000: Invalid dec8 character string: '\xD0'
+SET sql_mode=DEFAULT;
+#
+# End of 10.5 tests
+#
diff --git a/mysql-test/main/ctype_dec8.test b/mysql-test/main/ctype_dec8.test
new file mode 100644
index 00000000000..869d6242225
--- /dev/null
+++ b/mysql-test/main/ctype_dec8.test
@@ -0,0 +1,15 @@
+--echo #
+--echo # Start of 10.5 tests
+--echo #
+
+--echo #
+--echo # MDEV-22625 SIGSEGV in intern_find_sys_var (optimized builds)
+--echo #
+
+SET NAMES dec8;
+SET @seq=_dec8 0xD0;
+--source include/ctype_ident_sys.inc
+
+--echo #
+--echo # End of 10.5 tests
+--echo #
diff --git a/mysql-test/main/ctype_errors.result b/mysql-test/main/ctype_errors.result
index 6f9e14a8942..9916fb7c9c4 100644
--- a/mysql-test/main/ctype_errors.result
+++ b/mysql-test/main/ctype_errors.result
@@ -49,3 +49,14 @@ ERROR 42000: \0423 \0432\0430\0441 \043E\0448\0438\0431\043A\0430 \0432 \0437\04
disconnect con1;
connection default;
End of 5.5 tests
+#
+# MDEV-22130 SHOW WARNINGS will SIGSEGV 10.5 optimized build after setting CHARACTER_SET_RESULTS to NULL and running any invalid SQL | Binary_string::copy_printable_hhhh
+#
+SET NAMES latin1;
+SET @@CHARACTER_SET_RESULTS=NULL;
+a;
+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 'a' at line 1
+SHOW WARNINGS;
+Level Code Message
+Error 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'a' at line 1
+SET NAMES latin1;
diff --git a/mysql-test/main/ctype_errors.test b/mysql-test/main/ctype_errors.test
index b228a3b9f19..9ede9933ca7 100644
--- a/mysql-test/main/ctype_errors.test
+++ b/mysql-test/main/ctype_errors.test
@@ -58,3 +58,14 @@ disconnect con1;
connection default;
--echo End of 5.5 tests
+
+--echo #
+--echo # MDEV-22130 SHOW WARNINGS will SIGSEGV 10.5 optimized build after setting CHARACTER_SET_RESULTS to NULL and running any invalid SQL | Binary_string::copy_printable_hhhh
+--echo #
+
+SET NAMES latin1;
+SET @@CHARACTER_SET_RESULTS=NULL;
+--error ER_PARSE_ERROR
+a;
+SHOW WARNINGS;
+SET NAMES latin1;
diff --git a/mysql-test/main/ctype_eucjpms.result b/mysql-test/main/ctype_eucjpms.result
index be341cc7e68..ba91abca96f 100644
--- a/mysql-test/main/ctype_eucjpms.result
+++ b/mysql-test/main/ctype_eucjpms.result
@@ -33934,7 +33934,7 @@ DROP TABLE t1;
# MDEV-9711 NO PAD Collatons
#
SET character_set_connection=eucjpms;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -34072,7 +34072,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -34210,8 +34210,8 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -34349,7 +34349,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -34487,7 +34487,65 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=Default;
#
# End of 10.2 tests
#
+#
+# Start of 10.5 tests
+#
+#
+# MDEV-22625 SIGSEGV in intern_find_sys_var (optimized builds)
+#
+SET NAMES eucjpms;
+SET @seq=_eucjpms 0x8FA1A1;
+#
+# SET STATEMENT (bad|good.bad|bad.good)=1
+#
+EXECUTE IMMEDIATE CONCAT('SET STATEMENT ',@seq, '=1 SELECT 1');
+ERROR HY000: Invalid eucjpms character string: '\x8F\xA1\xA1'
+EXECUTE IMMEDIATE CONCAT('SET STATEMENT ',@seq, '.a=1 SELECT 1');
+ERROR HY000: Invalid eucjpms character string: '\x8F\xA1\xA1'
+EXECUTE IMMEDIATE CONCAT('SET STATEMENT a.',@seq, '=1 SELECT 1');
+ERROR HY000: Invalid eucjpms character string: '\x8F\xA1\xA1'
+#
+# SET SESSION (bad|good.bad|bad.good)=1
+#
+EXECUTE IMMEDIATE CONCAT('SET SESSION ',@seq, '=1 SELECT 1');
+ERROR HY000: Invalid eucjpms character string: '\x8F\xA1\xA1'
+EXECUTE IMMEDIATE CONCAT('SET SESSION ',@seq, '.a=1 SELECT 1');
+ERROR HY000: Invalid eucjpms character string: '\x8F\xA1\xA1'
+EXECUTE IMMEDIATE CONCAT('SET SESSION a.',@seq, '=1 SELECT 1');
+ERROR HY000: Invalid eucjpms character string: '\x8F\xA1\xA1'
+#
+# SET (bad|good.bad|bad.good)=1
+#
+EXECUTE IMMEDIATE CONCAT('SET ', @seq, '=1');
+ERROR HY000: Invalid eucjpms character string: '\x8F\xA1\xA1'
+EXECUTE IMMEDIATE CONCAT('SET ', @seq, '.a=1');
+ERROR HY000: Invalid eucjpms character string: '\x8F\xA1\xA1'
+EXECUTE IMMEDIATE CONCAT('SET a.', @seq, '=1');
+ERROR HY000: Invalid eucjpms character string: '\x8F\xA1\xA1'
+#
+# Oracle SP call: BEGIN (bad|good.bad|bad.good)(params); END
+#
+SET sql_mode=ORACLE;
+EXECUTE IMMEDIATE CONCAT('BEGIN ',@seq, '(1); END;');
+ERROR HY000: Invalid eucjpms character string: '\x8F\xA1\xA1'
+EXECUTE IMMEDIATE CONCAT('BEGIN ',@seq, '.a(1); END;');
+ERROR HY000: Invalid eucjpms character string: '\x8F\xA1\xA1'
+EXECUTE IMMEDIATE CONCAT('BEGIN a.',@seq, '(1); END;');
+ERROR HY000: Invalid eucjpms character string: '\x8F\xA1\xA1'
+#
+# Oracle assignment: (bad|good.bad|bad.good):= value
+#
+EXECUTE IMMEDIATE CONCAT(@seq, ':=1');
+ERROR HY000: Invalid eucjpms character string: '\x8F\xA1\xA1'
+EXECUTE IMMEDIATE CONCAT(@seq, '.a:=1');
+ERROR HY000: Invalid eucjpms character string: '\x8F\xA1\xA1'
+EXECUTE IMMEDIATE CONCAT('a.', @seq, ':=1');
+ERROR HY000: Invalid eucjpms character string: '\x8F\xA1\xA1'
+SET sql_mode=DEFAULT;
+#
+# End of 10.5 tests
+#
diff --git a/mysql-test/main/ctype_eucjpms.test b/mysql-test/main/ctype_eucjpms.test
index 867ca809dbf..6af72270853 100644
--- a/mysql-test/main/ctype_eucjpms.test
+++ b/mysql-test/main/ctype_eucjpms.test
@@ -596,3 +596,20 @@ let $coll_pad='eucjpms_bin';
--echo #
--echo # End of 10.2 tests
--echo #
+
+
+--echo #
+--echo # Start of 10.5 tests
+--echo #
+
+--echo #
+--echo # MDEV-22625 SIGSEGV in intern_find_sys_var (optimized builds)
+--echo #
+
+SET NAMES eucjpms;
+SET @seq=_eucjpms 0x8FA1A1;
+--source include/ctype_ident_sys.inc
+
+--echo #
+--echo # End of 10.5 tests
+--echo #
diff --git a/mysql-test/main/ctype_euckr.result b/mysql-test/main/ctype_euckr.result
index f8dab97ce1d..5bfcc7071f3 100644
--- a/mysql-test/main/ctype_euckr.result
+++ b/mysql-test/main/ctype_euckr.result
@@ -25452,7 +25452,7 @@ SET optimizer_switch=@save_optimizer_switch;
# MDEV-9711 NO PAD Collatons
#
SET character_set_connection=euckr;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -25590,7 +25590,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -25728,8 +25728,8 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -25867,7 +25867,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -26005,7 +26005,65 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=Default;
#
# End of 10.2 tests
#
+#
+# Start of 10.5 tests
+#
+#
+# MDEV-22625 SIGSEGV in intern_find_sys_var (optimized builds)
+#
+SET NAMES euckr;
+SET @seq=_euckr 0xA2E8;
+#
+# SET STATEMENT (bad|good.bad|bad.good)=1
+#
+EXECUTE IMMEDIATE CONCAT('SET STATEMENT ',@seq, '=1 SELECT 1');
+ERROR HY000: Invalid euckr character string: '\xA2\xE8'
+EXECUTE IMMEDIATE CONCAT('SET STATEMENT ',@seq, '.a=1 SELECT 1');
+ERROR HY000: Invalid euckr character string: '\xA2\xE8'
+EXECUTE IMMEDIATE CONCAT('SET STATEMENT a.',@seq, '=1 SELECT 1');
+ERROR HY000: Invalid euckr character string: '\xA2\xE8'
+#
+# SET SESSION (bad|good.bad|bad.good)=1
+#
+EXECUTE IMMEDIATE CONCAT('SET SESSION ',@seq, '=1 SELECT 1');
+ERROR HY000: Invalid euckr character string: '\xA2\xE8'
+EXECUTE IMMEDIATE CONCAT('SET SESSION ',@seq, '.a=1 SELECT 1');
+ERROR HY000: Invalid euckr character string: '\xA2\xE8'
+EXECUTE IMMEDIATE CONCAT('SET SESSION a.',@seq, '=1 SELECT 1');
+ERROR HY000: Invalid euckr character string: '\xA2\xE8'
+#
+# SET (bad|good.bad|bad.good)=1
+#
+EXECUTE IMMEDIATE CONCAT('SET ', @seq, '=1');
+ERROR HY000: Invalid euckr character string: '\xA2\xE8'
+EXECUTE IMMEDIATE CONCAT('SET ', @seq, '.a=1');
+ERROR HY000: Invalid euckr character string: '\xA2\xE8'
+EXECUTE IMMEDIATE CONCAT('SET a.', @seq, '=1');
+ERROR HY000: Invalid euckr character string: '\xA2\xE8'
+#
+# Oracle SP call: BEGIN (bad|good.bad|bad.good)(params); END
+#
+SET sql_mode=ORACLE;
+EXECUTE IMMEDIATE CONCAT('BEGIN ',@seq, '(1); END;');
+ERROR HY000: Invalid euckr character string: '\xA2\xE8'
+EXECUTE IMMEDIATE CONCAT('BEGIN ',@seq, '.a(1); END;');
+ERROR HY000: Invalid euckr character string: '\xA2\xE8'
+EXECUTE IMMEDIATE CONCAT('BEGIN a.',@seq, '(1); END;');
+ERROR HY000: Invalid euckr character string: '\xA2\xE8'
+#
+# Oracle assignment: (bad|good.bad|bad.good):= value
+#
+EXECUTE IMMEDIATE CONCAT(@seq, ':=1');
+ERROR HY000: Invalid euckr character string: '\xA2\xE8'
+EXECUTE IMMEDIATE CONCAT(@seq, '.a:=1');
+ERROR HY000: Invalid euckr character string: '\xA2\xE8'
+EXECUTE IMMEDIATE CONCAT('a.', @seq, ':=1');
+ERROR HY000: Invalid euckr character string: '\xA2\xE8'
+SET sql_mode=DEFAULT;
+#
+# End of 10.5 tests
+#
diff --git a/mysql-test/main/ctype_euckr.test b/mysql-test/main/ctype_euckr.test
index 46955360217..1154047fdb0 100644
--- a/mysql-test/main/ctype_euckr.test
+++ b/mysql-test/main/ctype_euckr.test
@@ -227,3 +227,20 @@ let $coll_pad='euckr_bin';
--echo #
--echo # End of 10.2 tests
--echo #
+
+
+--echo #
+--echo # Start of 10.5 tests
+--echo #
+
+--echo #
+--echo # MDEV-22625 SIGSEGV in intern_find_sys_var (optimized builds)
+--echo #
+
+SET NAMES euckr;
+SET @seq=_euckr 0xA2E8;
+--source include/ctype_ident_sys.inc
+
+--echo #
+--echo # End of 10.5 tests
+--echo #
diff --git a/mysql-test/main/ctype_filename.result b/mysql-test/main/ctype_filename.result
index 955e1ff8a8f..aaccea91793 100644
--- a/mysql-test/main/ctype_filename.result
+++ b/mysql-test/main/ctype_filename.result
@@ -59,3 +59,77 @@ SELECT doc.`Children`.0 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 '.0 FROM t1' at line 1
SET NAMES latin1;
# End of 10.3 tests
+#
+# MDEV-22043 Special character leads to assertion in my_wc_to_printable_generic on 10.5.2 (debug)
+#
+SET NAMES filename;
+ERROR 42000: Variable 'character_set_client' can't be set to the value of 'filename'
+EXECUTE IMMEDIATE _latin1 0x01;
+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 '\0001' at line 1
+SET NAMES utf8;
+#
+# MDEV-23435 Functions do not convert numbers to character_set_results
+#
+SET NAMES utf8, character_set_results=filename;
+CREATE TABLE t1 (a DATETIME(6));
+INSERT INTO t1 VALUES ('2001-01-01 00:00:00.000000');
+SELECT a, COALESCE(a) AS c FROM t1;
+a c
+2001@002d01@002d01@002000@003a00@003a00@002e000000 2001@002d01@002d01@002000@003a00@003a00@002e000000
+DROP TABLE t1;
+CREATE TABLE t1 (a TIME(6));
+INSERT INTO t1 VALUES ('00:00:00.000000');
+SELECT a, COALESCE(a) AS c FROM t1;
+a c
+00@003a00@003a00@002e000000 00@003a00@003a00@002e000000
+DROP TABLE t1;
+CREATE TABLE t1 (a DATE);
+INSERT INTO t1 VALUES ('2001-01-01');
+SELECT a, COALESCE(a) AS c FROM t1;
+a c
+2001@002d01@002d01 2001@002d01@002d01
+DROP TABLE t1;
+CREATE TABLE t1 (a TINYINT);
+INSERT INTO t1 VALUES (-1);
+SELECT a, COALESCE(a) AS c FROM t1;
+a c
+@002d1 @002d1
+DROP TABLE t1;
+CREATE TABLE t1 (a SMALLINT);
+INSERT INTO t1 VALUES (-1);
+SELECT a, COALESCE(a) AS c FROM t1;
+a c
+@002d1 @002d1
+DROP TABLE t1;
+CREATE TABLE t1 (a MEDIUMINT);
+INSERT INTO t1 VALUES (-1);
+SELECT a, COALESCE(a) AS c FROM t1;
+a c
+@002d1 @002d1
+DROP TABLE t1;
+CREATE TABLE t1 (a BIGINT);
+INSERT INTO t1 VALUES (-1);
+SELECT a, COALESCE(a) AS c FROM t1;
+a c
+@002d1 @002d1
+DROP TABLE t1;
+CREATE TABLE t1 (a DECIMAL(10.2));
+INSERT INTO t1 VALUES (-1);
+SELECT a, COALESCE(a) AS c FROM t1;
+a c
+@002d1 @002d1
+DROP TABLE t1;
+CREATE TABLE t1 (a FLOAT);
+INSERT INTO t1 VALUES (-1);
+SELECT a, COALESCE(a) AS c FROM t1;
+a c
+@002d1 @002d1
+DROP TABLE t1;
+CREATE TABLE t1 (a DOUBLE);
+INSERT INTO t1 VALUES (-1);
+SELECT a, COALESCE(a) AS c FROM t1;
+a c
+@002d1 @002d1
+DROP TABLE t1;
+SET NAMES utf8;
+# End of 10.5 tests
diff --git a/mysql-test/main/ctype_filename.test b/mysql-test/main/ctype_filename.test
index 0c38172a0ef..ba42d1a2807 100644
--- a/mysql-test/main/ctype_filename.test
+++ b/mysql-test/main/ctype_filename.test
@@ -65,3 +65,77 @@ SELECT doc.`Children`.0 FROM t1;
SET NAMES latin1;
--echo # End of 10.3 tests
+
+--echo #
+--echo # MDEV-22043 Special character leads to assertion in my_wc_to_printable_generic on 10.5.2 (debug)
+--echo #
+
+--error ER_WRONG_VALUE_FOR_VAR
+SET NAMES filename;
+--error ER_PARSE_ERROR
+EXECUTE IMMEDIATE _latin1 0x01;
+SET NAMES utf8;
+
+--echo #
+--echo # MDEV-23435 Functions do not convert numbers to character_set_results
+--echo #
+
+--disable_ps_protocol
+
+SET NAMES utf8, character_set_results=filename;
+
+CREATE TABLE t1 (a DATETIME(6));
+INSERT INTO t1 VALUES ('2001-01-01 00:00:00.000000');
+SELECT a, COALESCE(a) AS c FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a TIME(6));
+INSERT INTO t1 VALUES ('00:00:00.000000');
+SELECT a, COALESCE(a) AS c FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a DATE);
+INSERT INTO t1 VALUES ('2001-01-01');
+SELECT a, COALESCE(a) AS c FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a TINYINT);
+INSERT INTO t1 VALUES (-1);
+SELECT a, COALESCE(a) AS c FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a SMALLINT);
+INSERT INTO t1 VALUES (-1);
+SELECT a, COALESCE(a) AS c FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a MEDIUMINT);
+INSERT INTO t1 VALUES (-1);
+SELECT a, COALESCE(a) AS c FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a BIGINT);
+INSERT INTO t1 VALUES (-1);
+SELECT a, COALESCE(a) AS c FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a DECIMAL(10.2));
+INSERT INTO t1 VALUES (-1);
+SELECT a, COALESCE(a) AS c FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a FLOAT);
+INSERT INTO t1 VALUES (-1);
+SELECT a, COALESCE(a) AS c FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a DOUBLE);
+INSERT INTO t1 VALUES (-1);
+SELECT a, COALESCE(a) AS c FROM t1;
+DROP TABLE t1;
+
+SET NAMES utf8;
+
+--enable_ps_protocol
+
+--echo # End of 10.5 tests
diff --git a/mysql-test/main/ctype_gb2312.result b/mysql-test/main/ctype_gb2312.result
index 2998615b1cb..d6066f82db9 100644
--- a/mysql-test/main/ctype_gb2312.result
+++ b/mysql-test/main/ctype_gb2312.result
@@ -4522,7 +4522,7 @@ SET sql_mode = DEFAULT;
# MDEV-9711 NO PAD Collatons
#
SET character_set_connection=gb2312;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -4660,7 +4660,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -4798,8 +4798,8 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -4937,7 +4937,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -5075,7 +5075,65 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=Default;
#
# End of 10.2 tests
#
+#
+# Start of 10.5 tests
+#
+#
+# MDEV-22625 SIGSEGV in intern_find_sys_var (optimized builds)
+#
+SET NAMES gb2312;
+SET @seq=_gb2312 0xA2A1;
+#
+# SET STATEMENT (bad|good.bad|bad.good)=1
+#
+EXECUTE IMMEDIATE CONCAT('SET STATEMENT ',@seq, '=1 SELECT 1');
+ERROR HY000: Invalid gb2312 character string: '\xA2\xA1'
+EXECUTE IMMEDIATE CONCAT('SET STATEMENT ',@seq, '.a=1 SELECT 1');
+ERROR HY000: Invalid gb2312 character string: '\xA2\xA1'
+EXECUTE IMMEDIATE CONCAT('SET STATEMENT a.',@seq, '=1 SELECT 1');
+ERROR HY000: Invalid gb2312 character string: '\xA2\xA1'
+#
+# SET SESSION (bad|good.bad|bad.good)=1
+#
+EXECUTE IMMEDIATE CONCAT('SET SESSION ',@seq, '=1 SELECT 1');
+ERROR HY000: Invalid gb2312 character string: '\xA2\xA1'
+EXECUTE IMMEDIATE CONCAT('SET SESSION ',@seq, '.a=1 SELECT 1');
+ERROR HY000: Invalid gb2312 character string: '\xA2\xA1'
+EXECUTE IMMEDIATE CONCAT('SET SESSION a.',@seq, '=1 SELECT 1');
+ERROR HY000: Invalid gb2312 character string: '\xA2\xA1'
+#
+# SET (bad|good.bad|bad.good)=1
+#
+EXECUTE IMMEDIATE CONCAT('SET ', @seq, '=1');
+ERROR HY000: Invalid gb2312 character string: '\xA2\xA1'
+EXECUTE IMMEDIATE CONCAT('SET ', @seq, '.a=1');
+ERROR HY000: Invalid gb2312 character string: '\xA2\xA1'
+EXECUTE IMMEDIATE CONCAT('SET a.', @seq, '=1');
+ERROR HY000: Invalid gb2312 character string: '\xA2\xA1'
+#
+# Oracle SP call: BEGIN (bad|good.bad|bad.good)(params); END
+#
+SET sql_mode=ORACLE;
+EXECUTE IMMEDIATE CONCAT('BEGIN ',@seq, '(1); END;');
+ERROR HY000: Invalid gb2312 character string: '\xA2\xA1'
+EXECUTE IMMEDIATE CONCAT('BEGIN ',@seq, '.a(1); END;');
+ERROR HY000: Invalid gb2312 character string: '\xA2\xA1'
+EXECUTE IMMEDIATE CONCAT('BEGIN a.',@seq, '(1); END;');
+ERROR HY000: Invalid gb2312 character string: '\xA2\xA1'
+#
+# Oracle assignment: (bad|good.bad|bad.good):= value
+#
+EXECUTE IMMEDIATE CONCAT(@seq, ':=1');
+ERROR HY000: Invalid gb2312 character string: '\xA2\xA1'
+EXECUTE IMMEDIATE CONCAT(@seq, '.a:=1');
+ERROR HY000: Invalid gb2312 character string: '\xA2\xA1'
+EXECUTE IMMEDIATE CONCAT('a.', @seq, ':=1');
+ERROR HY000: Invalid gb2312 character string: '\xA2\xA1'
+SET sql_mode=DEFAULT;
+#
+# End of 10.5 tests
+#
diff --git a/mysql-test/main/ctype_gb2312.test b/mysql-test/main/ctype_gb2312.test
index 4489168a163..07460116ade 100644
--- a/mysql-test/main/ctype_gb2312.test
+++ b/mysql-test/main/ctype_gb2312.test
@@ -180,3 +180,20 @@ let $coll_pad='gb2312_bin';
--echo #
--echo # End of 10.2 tests
--echo #
+
+
+--echo #
+--echo # Start of 10.5 tests
+--echo #
+
+--echo #
+--echo # MDEV-22625 SIGSEGV in intern_find_sys_var (optimized builds)
+--echo #
+
+SET NAMES gb2312;
+SET @seq=_gb2312 0xA2A1;
+--source include/ctype_ident_sys.inc
+
+--echo #
+--echo # End of 10.5 tests
+--echo #
diff --git a/mysql-test/main/ctype_gbk.result b/mysql-test/main/ctype_gbk.result
index c2a84a7ea70..7b54794a884 100644
--- a/mysql-test/main/ctype_gbk.result
+++ b/mysql-test/main/ctype_gbk.result
@@ -5985,7 +5985,7 @@ DROP TABLE t1;
# MDEV-9711 NO PAD Collatons
#
SET character_set_connection=gbk;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -6123,7 +6123,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -6261,8 +6261,8 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -6400,7 +6400,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -6538,7 +6538,65 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=Default;
#
# End of 10.2 tests
#
+#
+# Start of 10.5 tests
+#
+#
+# MDEV-22625 SIGSEGV in intern_find_sys_var (optimized builds)
+#
+SET NAMES gbk;
+SET @seq=_gbk 0xAAA1;
+#
+# SET STATEMENT (bad|good.bad|bad.good)=1
+#
+EXECUTE IMMEDIATE CONCAT('SET STATEMENT ',@seq, '=1 SELECT 1');
+ERROR HY000: Invalid gbk character string: '\xAA\xA1'
+EXECUTE IMMEDIATE CONCAT('SET STATEMENT ',@seq, '.a=1 SELECT 1');
+ERROR HY000: Invalid gbk character string: '\xAA\xA1'
+EXECUTE IMMEDIATE CONCAT('SET STATEMENT a.',@seq, '=1 SELECT 1');
+ERROR HY000: Invalid gbk character string: '\xAA\xA1'
+#
+# SET SESSION (bad|good.bad|bad.good)=1
+#
+EXECUTE IMMEDIATE CONCAT('SET SESSION ',@seq, '=1 SELECT 1');
+ERROR HY000: Invalid gbk character string: '\xAA\xA1'
+EXECUTE IMMEDIATE CONCAT('SET SESSION ',@seq, '.a=1 SELECT 1');
+ERROR HY000: Invalid gbk character string: '\xAA\xA1'
+EXECUTE IMMEDIATE CONCAT('SET SESSION a.',@seq, '=1 SELECT 1');
+ERROR HY000: Invalid gbk character string: '\xAA\xA1'
+#
+# SET (bad|good.bad|bad.good)=1
+#
+EXECUTE IMMEDIATE CONCAT('SET ', @seq, '=1');
+ERROR HY000: Invalid gbk character string: '\xAA\xA1'
+EXECUTE IMMEDIATE CONCAT('SET ', @seq, '.a=1');
+ERROR HY000: Invalid gbk character string: '\xAA\xA1'
+EXECUTE IMMEDIATE CONCAT('SET a.', @seq, '=1');
+ERROR HY000: Invalid gbk character string: '\xAA\xA1'
+#
+# Oracle SP call: BEGIN (bad|good.bad|bad.good)(params); END
+#
+SET sql_mode=ORACLE;
+EXECUTE IMMEDIATE CONCAT('BEGIN ',@seq, '(1); END;');
+ERROR HY000: Invalid gbk character string: '\xAA\xA1'
+EXECUTE IMMEDIATE CONCAT('BEGIN ',@seq, '.a(1); END;');
+ERROR HY000: Invalid gbk character string: '\xAA\xA1'
+EXECUTE IMMEDIATE CONCAT('BEGIN a.',@seq, '(1); END;');
+ERROR HY000: Invalid gbk character string: '\xAA\xA1'
+#
+# Oracle assignment: (bad|good.bad|bad.good):= value
+#
+EXECUTE IMMEDIATE CONCAT(@seq, ':=1');
+ERROR HY000: Invalid gbk character string: '\xAA\xA1'
+EXECUTE IMMEDIATE CONCAT(@seq, '.a:=1');
+ERROR HY000: Invalid gbk character string: '\xAA\xA1'
+EXECUTE IMMEDIATE CONCAT('a.', @seq, ':=1');
+ERROR HY000: Invalid gbk character string: '\xAA\xA1'
+SET sql_mode=DEFAULT;
+#
+# End of 10.5 tests
+#
diff --git a/mysql-test/main/ctype_gbk.test b/mysql-test/main/ctype_gbk.test
index d9d0a4d0ee4..c63c331c643 100644
--- a/mysql-test/main/ctype_gbk.test
+++ b/mysql-test/main/ctype_gbk.test
@@ -484,3 +484,20 @@ let $coll_pad='gbk_bin';
--echo #
--echo # End of 10.2 tests
--echo #
+
+
+--echo #
+--echo # Start of 10.5 tests
+--echo #
+
+--echo #
+--echo # MDEV-22625 SIGSEGV in intern_find_sys_var (optimized builds)
+--echo #
+
+SET NAMES gbk;
+SET @seq=_gbk 0xAAA1;
+--source include/ctype_ident_sys.inc
+
+--echo #
+--echo # End of 10.5 tests
+--echo #
diff --git a/mysql-test/main/ctype_latin1.result b/mysql-test/main/ctype_latin1.result
index b4005a4a73b..68870bbeea8 100644
--- a/mysql-test/main/ctype_latin1.result
+++ b/mysql-test/main/ctype_latin1.result
@@ -1527,12 +1527,12 @@ create table t1 as select concat(uuid()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(36) CHARACTER SET utf8 DEFAULT NULL
+ `c1` varchar(36) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select coercibility(uuid()), coercibility(cast('a' as char character set latin1));
coercibility(uuid()) coercibility(cast('a' as char character set latin1))
-4 2
+5 2
select charset(concat(uuid(), cast('a' as char character set latin1)));
charset(concat(uuid(), cast('a' as char character set latin1)))
latin1
@@ -8309,7 +8309,7 @@ CONVERT(1, CHAR) IN ('100', '10', '1')
# MDEV-9711 NO PAD Collatons
#
SET character_set_connection=latin1;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -8447,7 +8447,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -8585,8 +8585,8 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -8724,7 +8724,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -8862,7 +8862,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=Default;
SET NAMES latin1;
#
# MDEV-14350 Index use with collation utf8mb4_unicode_nopad_ci on LIKE pattern with wrong results
@@ -8891,3 +8891,62 @@ DROP TABLE t1;
#
# End of 10.2 tests
#
+#
+# Start of 10.5 tests
+#
+#
+# MDEV-20712 Wrong data type for CAST(@a AS BINARY) for a numeric variable
+#
+SET NAMES latin1;
+SET @a=2;
+CREATE OR REPLACE TABLE t1 AS SELECT CAST(1 AS BINARY), CAST(@a AS BINARY), CAST(@b:=3 AS BINARY);
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `CAST(1 AS BINARY)` varbinary(1) DEFAULT NULL,
+ `CAST(@a AS BINARY)` varbinary(20) DEFAULT NULL,
+ `CAST(@b:=3 AS BINARY)` varbinary(1) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1;
+#
+# MDEV-8844 Unreadable control characters printed as is in warnings
+#
+SET NAMES latin1;
+SELECT CAST(_latin1 0x610062 AS INT);
+CAST(_latin1 0x610062 AS INT)
+0
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: 'a\0000b'
+SELECT CAST(_latin1 0x610162 AS INT);
+CAST(_latin1 0x610162 AS INT)
+0
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: 'a\0001b'
+SELECT CAST(_latin1 0x611F62 AS INT);
+CAST(_latin1 0x611F62 AS INT)
+0
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: 'a\001Fb'
+SELECT CAST(_latin1 0x617F62 AS INT);
+CAST(_latin1 0x617F62 AS INT)
+0
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: 'a\007Fb'
+SELECT CAST(_latin1 0x612062 AS INT);
+CAST(_latin1 0x612062 AS INT)
+0
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: 'a b'
+SELECT CAST(_latin1 0x617E62 AS INT);
+CAST(_latin1 0x617E62 AS INT)
+0
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: 'a~b'
+SELECT CAST(_latin1 0x61FF62 AS INT);
+CAST(_latin1 0x61FF62 AS INT)
+0
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: 'aÿb'
+#
+# End of 10.5 tests
+#
diff --git a/mysql-test/main/ctype_latin1.test b/mysql-test/main/ctype_latin1.test
index a556c86c016..d5b62beb140 100644
--- a/mysql-test/main/ctype_latin1.test
+++ b/mysql-test/main/ctype_latin1.test
@@ -441,3 +441,37 @@ SET NAMES latin1;
--echo #
--echo # End of 10.2 tests
--echo #
+
+--echo #
+--echo # Start of 10.5 tests
+--echo #
+
+--echo #
+--echo # MDEV-20712 Wrong data type for CAST(@a AS BINARY) for a numeric variable
+--echo #
+
+SET NAMES latin1;
+SET @a=2;
+CREATE OR REPLACE TABLE t1 AS SELECT CAST(1 AS BINARY), CAST(@a AS BINARY), CAST(@b:=3 AS BINARY);
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+
+
+--echo #
+--echo # MDEV-8844 Unreadable control characters printed as is in warnings
+--echo #
+SET NAMES latin1;
+# control
+SELECT CAST(_latin1 0x610062 AS INT);
+SELECT CAST(_latin1 0x610162 AS INT);
+SELECT CAST(_latin1 0x611F62 AS INT);
+SELECT CAST(_latin1 0x617F62 AS INT);
+# normal characters
+SELECT CAST(_latin1 0x612062 AS INT);
+SELECT CAST(_latin1 0x617E62 AS INT);
+SELECT CAST(_latin1 0x61FF62 AS INT);
+
+
+--echo #
+--echo # End of 10.5 tests
+--echo #
diff --git a/mysql-test/main/ctype_ldml.result b/mysql-test/main/ctype_ldml.result
index 3ce50331ed0..22b7a316111 100644
--- a/mysql-test/main/ctype_ldml.result
+++ b/mysql-test/main/ctype_ldml.result
@@ -447,7 +447,7 @@ Bug#46448 trailing spaces are not ignored when user collation maps space != 0x20
set names latin1;
show collation like 'latin1_test';
Collation Charset Id Default Compiled Sortlen
-latin1_test latin1 99 Yes 1
+latin1_test latin1 331 1
select "foo" = "foo " collate latin1_test;
"foo" = "foo " collate latin1_test
1
@@ -466,6 +466,7 @@ utf8mb4_test_ci utf8mb4 326 8
utf16_test_ci utf16 327 8
utf8mb4_test_400_ci utf8mb4 328 8
utf8mb4_test_520_nopad_ci utf8mb4 329 8
+latin1_test latin1 331 1
latin1_test2 latin1 332 1
latin1_test2_cs latin1 333 1
latin1_swedish_nopad2_ci latin1 334 1
@@ -490,7 +491,7 @@ utf32_test_ci utf32 391 8
utf8_maxuserid_ci utf8 2047 8
show collation like '%test%';
Collation Charset Id Default Compiled Sortlen
-latin1_test latin1 99 Yes 1
+latin1_test latin1 331 1
latin1_test2 latin1 332 1
latin1_test2_cs latin1 333 1
utf8_test_ci utf8 353 8
@@ -3034,3 +3035,10 @@ SELECT 'chž'< 'i';
1
SELECT 'a' COLLATE utf8_czech_test_bad_w2;
ERROR HY000: Unknown collation: 'utf8_czech_test_bad_w2'
+#
+# MDEV-7947 my_charset_same: strcmp() takes 0.37% in OLTP RO
+#
+SHOW COLLATION LIKE 'latin1_test_replace';
+Collation Charset Id Default Compiled Sortlen
+SELECT 'foo' = 'foo ' COLLATE latin1_test_replace;
+ERROR HY000: Unknown collation: 'latin1_test_replace'
diff --git a/mysql-test/main/ctype_ldml.test b/mysql-test/main/ctype_ldml.test
index a6cba4b9780..8baabdf2bcb 100644
--- a/mysql-test/main/ctype_ldml.test
+++ b/mysql-test/main/ctype_ldml.test
@@ -3,6 +3,10 @@
--source include/have_utf16.inc
--source include/have_utf32.inc
+--disable_query_log
+call mtr.add_suppression("Charset id.*trying to replace");
+--enable_query_log
+
--disable_warnings
drop table if exists t1;
--enable_warnings
@@ -602,3 +606,12 @@ SELECT 'chž'< 'i';
--error ER_UNKNOWN_COLLATION
SELECT 'a' COLLATE utf8_czech_test_bad_w2;
+
+
+--echo #
+--echo # MDEV-7947 my_charset_same: strcmp() takes 0.37% in OLTP RO
+--echo #
+
+SHOW COLLATION LIKE 'latin1_test_replace';
+--error ER_UNKNOWN_COLLATION
+SELECT 'foo' = 'foo ' COLLATE latin1_test_replace;
diff --git a/mysql-test/main/ctype_nopad_8bit.result b/mysql-test/main/ctype_nopad_8bit.result
index b5dadc2f5da..2b089ce2994 100644
--- a/mysql-test/main/ctype_nopad_8bit.result
+++ b/mysql-test/main/ctype_nopad_8bit.result
@@ -2,7 +2,7 @@
# MDEV-9711 NO PAD Collatons
#
SET character_set_connection=dec8;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -140,7 +140,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -278,8 +278,8 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -417,7 +417,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -555,9 +555,9 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=Default;
SET character_set_connection=cp850;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -695,7 +695,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -833,8 +833,8 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -972,7 +972,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -1110,9 +1110,9 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=Default;
SET character_set_connection=hp8;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -1250,7 +1250,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -1388,8 +1388,8 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -1527,7 +1527,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -1665,9 +1665,9 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=Default;
SET character_set_connection=koi8r;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -1805,7 +1805,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -1943,8 +1943,8 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -2082,7 +2082,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -2220,9 +2220,9 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=Default;
SET character_set_connection=latin2;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -2360,7 +2360,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -2498,8 +2498,8 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -2637,7 +2637,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -2775,9 +2775,9 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=Default;
SET character_set_connection=swe7;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -2915,7 +2915,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -3053,8 +3053,8 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -3192,7 +3192,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -3330,9 +3330,9 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=Default;
SET character_set_connection=ascii;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -3470,7 +3470,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -3608,8 +3608,8 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -3747,7 +3747,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -3885,9 +3885,9 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=Default;
SET character_set_connection=hebrew;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -4025,7 +4025,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -4163,8 +4163,8 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -4302,7 +4302,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -4440,9 +4440,9 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=Default;
SET character_set_connection=koi8u;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -4580,7 +4580,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -4718,8 +4718,8 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -4857,7 +4857,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -4995,9 +4995,9 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=Default;
SET character_set_connection=greek;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -5135,7 +5135,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -5273,8 +5273,8 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -5412,7 +5412,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -5550,9 +5550,9 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=Default;
SET character_set_connection=cp1250;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -5690,7 +5690,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -5828,8 +5828,8 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -5967,7 +5967,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -6105,9 +6105,9 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=Default;
SET character_set_connection=cp1257;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -6245,7 +6245,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -6383,8 +6383,8 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -6522,7 +6522,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -6660,9 +6660,9 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=Default;
SET character_set_connection=latin5;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -6800,7 +6800,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -6938,8 +6938,8 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -7077,7 +7077,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -7215,9 +7215,9 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=Default;
SET character_set_connection=armscii8;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -7355,7 +7355,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -7493,8 +7493,8 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -7632,7 +7632,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -7770,9 +7770,9 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=Default;
SET character_set_connection=cp866;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -7910,7 +7910,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -8048,8 +8048,8 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -8187,7 +8187,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -8325,9 +8325,9 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=Default;
SET character_set_connection=keybcs2;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -8465,7 +8465,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -8603,8 +8603,8 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -8742,7 +8742,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -8880,9 +8880,9 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=Default;
SET character_set_connection=macce;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -9020,7 +9020,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -9158,8 +9158,8 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -9297,7 +9297,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -9435,9 +9435,9 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=Default;
SET character_set_connection=macroman;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -9575,7 +9575,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -9713,8 +9713,8 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -9852,7 +9852,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -9990,9 +9990,9 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=Default;
SET character_set_connection=cp852;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -10130,7 +10130,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -10268,8 +10268,8 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -10407,7 +10407,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -10545,9 +10545,9 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=Default;
SET character_set_connection=latin7;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -10685,7 +10685,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -10823,8 +10823,8 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -10962,7 +10962,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -11100,9 +11100,9 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=Default;
SET character_set_connection=cp1251;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -11240,7 +11240,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -11378,8 +11378,8 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -11517,7 +11517,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -11655,9 +11655,9 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=Default;
SET character_set_connection=cp1256;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -11795,7 +11795,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -11933,8 +11933,8 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -12072,7 +12072,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -12210,9 +12210,9 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=Default;
SET character_set_connection=geostd8;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -12350,7 +12350,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -12488,8 +12488,8 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -12627,7 +12627,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -12765,7 +12765,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=Default;
#
# End of 10.2 tests
#
diff --git a/mysql-test/main/ctype_sjis.result b/mysql-test/main/ctype_sjis.result
index c897268b204..638f9bc21c7 100644
--- a/mysql-test/main/ctype_sjis.result
+++ b/mysql-test/main/ctype_sjis.result
@@ -18739,7 +18739,7 @@ DROP TABLE t1;
# MDEV-9711 NO PAD Collatons
#
SET character_set_connection=sjis;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -18877,7 +18877,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -19015,8 +19015,8 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -19154,7 +19154,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -19292,7 +19292,87 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=Default;
#
# End of 10.2 tests
#
+#
+# Start of 10.5 tests
+#
+#
+# MDEV-22043 Special character leads to assertion in my_wc_to_printable_generic on 10.5.2 (debug)
+#
+SET NAMES sjis;
+SET @@CHARACTER_SET_CLIENT='cp1257';
+(a(b 'Ñ‚'));
+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 'a(b '_0143_201A'))' at line 1
+SET NAMES sjis;
+SET @@CHARACTER_SET_CLIENT='cp1257';
+'Ñ‚';
+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 ''_0143_201A'' at line 1
+SET NAMES sjis;
+SET @@CHARACTER_SET_CLIENT='cp1257';
+EXECUTE IMMEDIATE _cp1257 0xD182;
+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 '_0143_201A' at line 1
+SET NAMES sjis;
+#
+# End of 10.5 tests
+#
+#
+# Start of 10.5 tests
+#
+#
+# MDEV-22625 SIGSEGV in intern_find_sys_var (optimized builds)
+#
+SET NAMES sjis;
+SET @seq=_sjis 0x81AD;
+#
+# SET STATEMENT (bad|good.bad|bad.good)=1
+#
+EXECUTE IMMEDIATE CONCAT('SET STATEMENT ',@seq, '=1 SELECT 1');
+ERROR HY000: Invalid sjis character string: '_x81_xAD'
+EXECUTE IMMEDIATE CONCAT('SET STATEMENT ',@seq, '.a=1 SELECT 1');
+ERROR HY000: Invalid sjis character string: '_x81_xAD'
+EXECUTE IMMEDIATE CONCAT('SET STATEMENT a.',@seq, '=1 SELECT 1');
+ERROR HY000: Invalid sjis character string: '_x81_xAD'
+#
+# SET SESSION (bad|good.bad|bad.good)=1
+#
+EXECUTE IMMEDIATE CONCAT('SET SESSION ',@seq, '=1 SELECT 1');
+ERROR HY000: Invalid sjis character string: '_x81_xAD'
+EXECUTE IMMEDIATE CONCAT('SET SESSION ',@seq, '.a=1 SELECT 1');
+ERROR HY000: Invalid sjis character string: '_x81_xAD'
+EXECUTE IMMEDIATE CONCAT('SET SESSION a.',@seq, '=1 SELECT 1');
+ERROR HY000: Invalid sjis character string: '_x81_xAD'
+#
+# SET (bad|good.bad|bad.good)=1
+#
+EXECUTE IMMEDIATE CONCAT('SET ', @seq, '=1');
+ERROR HY000: Invalid sjis character string: '_x81_xAD'
+EXECUTE IMMEDIATE CONCAT('SET ', @seq, '.a=1');
+ERROR HY000: Invalid sjis character string: '_x81_xAD'
+EXECUTE IMMEDIATE CONCAT('SET a.', @seq, '=1');
+ERROR HY000: Invalid sjis character string: '_x81_xAD'
+#
+# Oracle SP call: BEGIN (bad|good.bad|bad.good)(params); END
+#
+SET sql_mode=ORACLE;
+EXECUTE IMMEDIATE CONCAT('BEGIN ',@seq, '(1); END;');
+ERROR HY000: Invalid sjis character string: '_x81_xAD'
+EXECUTE IMMEDIATE CONCAT('BEGIN ',@seq, '.a(1); END;');
+ERROR HY000: Invalid sjis character string: '_x81_xAD'
+EXECUTE IMMEDIATE CONCAT('BEGIN a.',@seq, '(1); END;');
+ERROR HY000: Invalid sjis character string: '_x81_xAD'
+#
+# Oracle assignment: (bad|good.bad|bad.good):= value
+#
+EXECUTE IMMEDIATE CONCAT(@seq, ':=1');
+ERROR HY000: Invalid sjis character string: '_x81_xAD'
+EXECUTE IMMEDIATE CONCAT(@seq, '.a:=1');
+ERROR HY000: Invalid sjis character string: '_x81_xAD'
+EXECUTE IMMEDIATE CONCAT('a.', @seq, ':=1');
+ERROR HY000: Invalid sjis character string: '_x81_xAD'
+SET sql_mode=DEFAULT;
+#
+# End of 10.5 tests
+#
diff --git a/mysql-test/main/ctype_sjis.test b/mysql-test/main/ctype_sjis.test
index 9a8ce414c14..8ca423bb7c1 100644
--- a/mysql-test/main/ctype_sjis.test
+++ b/mysql-test/main/ctype_sjis.test
@@ -260,3 +260,50 @@ let $coll_pad='sjis_bin';
--echo #
--echo # End of 10.2 tests
--echo #
+
+--echo #
+--echo # Start of 10.5 tests
+--echo #
+
+--echo #
+--echo # MDEV-22043 Special character leads to assertion in my_wc_to_printable_generic on 10.5.2 (debug)
+--echo #
+
+SET NAMES sjis;
+SET @@CHARACTER_SET_CLIENT='cp1257';
+--error ER_PARSE_ERROR
+(a(b 'Ñ‚'));
+
+SET NAMES sjis;
+SET @@CHARACTER_SET_CLIENT='cp1257';
+--error ER_PARSE_ERROR
+'Ñ‚';
+
+SET NAMES sjis;
+SET @@CHARACTER_SET_CLIENT='cp1257';
+--error ER_PARSE_ERROR
+EXECUTE IMMEDIATE _cp1257 0xD182;
+
+SET NAMES sjis;
+
+
+--echo #
+--echo # End of 10.5 tests
+--echo #
+
+
+--echo #
+--echo # Start of 10.5 tests
+--echo #
+
+--echo #
+--echo # MDEV-22625 SIGSEGV in intern_find_sys_var (optimized builds)
+--echo #
+
+SET NAMES sjis;
+SET @seq=_sjis 0x81AD;
+--source include/ctype_ident_sys.inc
+
+--echo #
+--echo # End of 10.5 tests
+--echo #
diff --git a/mysql-test/main/ctype_swe7.result b/mysql-test/main/ctype_swe7.result
index 63da7d362ca..db65b6b8a1a 100644
--- a/mysql-test/main/ctype_swe7.result
+++ b/mysql-test/main/ctype_swe7.result
@@ -3078,7 +3078,7 @@ SET sql_mode = DEFAULT;
# MDEV-9711 NO PAD Collatons
#
SET character_set_connection=swe7;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -3216,7 +3216,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -3354,8 +3354,8 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -3493,7 +3493,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -3631,7 +3631,25 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=Default;
#
# End of 10.2 tests
#
+#
+# Start of 10.5 tests
+#
+#
+# MDEV-22043 Special character leads to assertion in my_wc_to_printable_generic on 10.5.2 (debug)
+#
+SET NAMES swe7;
+SELECT `ï¼´`;
+ERROR HY000: Invalid swe7 character string: '.xEF.xBC.xB4'
+SET NAMES swe7;
+SELECT `é¾”`;
+ERROR HY000: Invalid swe7 character string: '.xE9.xBE.x94'
+SET NAMES swe7;
+EXECUTE IMMEDIATE _swe7 0x01;
+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 '.0001' at line 1
+#
+# End of 10.5 tests
+#
diff --git a/mysql-test/main/ctype_swe7.test b/mysql-test/main/ctype_swe7.test
index 2e648a89406..a8d79935aa6 100644
--- a/mysql-test/main/ctype_swe7.test
+++ b/mysql-test/main/ctype_swe7.test
@@ -38,3 +38,29 @@ let $coll_pad='swe7_bin';
--echo #
--echo # End of 10.2 tests
--echo #
+
+
+--echo #
+--echo # Start of 10.5 tests
+--echo #
+
+--echo #
+--echo # MDEV-22043 Special character leads to assertion in my_wc_to_printable_generic on 10.5.2 (debug)
+--echo #
+
+SET NAMES swe7;
+--error ER_INVALID_CHARACTER_STRING
+SELECT `ï¼´`;
+
+SET NAMES swe7;
+--error ER_INVALID_CHARACTER_STRING
+SELECT `é¾”`;
+
+SET NAMES swe7;
+--error ER_PARSE_ERROR
+EXECUTE IMMEDIATE _swe7 0x01;
+
+
+--echo #
+--echo # End of 10.5 tests
+--echo #
diff --git a/mysql-test/main/ctype_tis620.result b/mysql-test/main/ctype_tis620.result
index 9650c366d38..7e0c255c756 100644
--- a/mysql-test/main/ctype_tis620.result
+++ b/mysql-test/main/ctype_tis620.result
@@ -3866,7 +3866,7 @@ E0
# MDEV-9711 NO PAD Collatons
#
SET character_set_connection=tis620;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -4004,7 +4004,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -4142,8 +4142,8 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -4281,7 +4281,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -4419,7 +4419,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=Default;
#
# End of 10.2 tests
#
diff --git a/mysql-test/main/ctype_uca.test b/mysql-test/main/ctype_uca.test
index 82be0305f07..67ef7d7aa96 100644
--- a/mysql-test/main/ctype_uca.test
+++ b/mysql-test/main/ctype_uca.test
@@ -483,7 +483,7 @@ set names utf8;
--echo # Start of 5.5 tests
--echo #
#
-# Test my_like_range and contractions
+# Test like_range and contractions
#
SET collation_connection=utf8_czech_ci;
--source include/ctype_czech.inc
diff --git a/mysql-test/main/ctype_ucs.result b/mysql-test/main/ctype_ucs.result
index 6292ad2591e..dc3ed0cf7a9 100644
--- a/mysql-test/main/ctype_ucs.result
+++ b/mysql-test/main/ctype_ucs.result
@@ -1569,7 +1569,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range a a 23 NULL 1 Using where; Using index
EXPLAIN SELECT * FROM t1 WHERE a LIKE 'c%';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index a a 23 NULL 31 Using where; Using index
+1 SIMPLE t1 range a a 23 NULL 31 Using where; Using index
SELECT * FROM t1 WHERE a LIKE 'c%';
a
ca
@@ -1585,7 +1585,7 @@ ch
ALTER TABLE t1 MODIFY a VARCHAR(10) CHARACTER SET ucs2 COLLATE ucs2_croatian_ci;
EXPLAIN SELECT * FROM t1 WHERE a LIKE 'd%';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index a a 23 NULL 31 Using where; Using index
+1 SIMPLE t1 range a a 23 NULL 31 Using where; Using index
SELECT hex(concat('d',_ucs2 0x017E,'%'));
hex(concat('d',_ucs2 0x017E,'%'))
0064017E0025
@@ -2411,12 +2411,12 @@ create table t1 as select concat(uuid()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(36) CHARACTER SET utf8 DEFAULT NULL
+ `c1` varchar(36) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select coercibility(uuid()), coercibility(cast('a' as char character set latin1));
coercibility(uuid()) coercibility(cast('a' as char character set latin1))
-4 2
+5 2
select charset(concat(uuid(), cast('a' as char character set latin1)));
charset(concat(uuid(), cast('a' as char character set latin1)))
latin1
@@ -5777,7 +5777,7 @@ Warning 1292 Truncated incorrect INTEGER value: '1IJ3'
# MDEV-9711 NO PAD Collatons
#
SET character_set_connection=ucs2;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -5915,7 +5915,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -6053,8 +6053,8 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -6192,7 +6192,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -6330,7 +6330,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=Default;
#
# MDEV-10585 EXECUTE IMMEDIATE statement
#
@@ -6433,3 +6433,45 @@ SET NAMES utf8;
#
# End of 10.4 tests
#
+#
+# Start of 10.5 tests
+#
+#
+# MDEV-8844 Unreadable control characters printed as is in warnings
+#
+# control
+SELECT CAST(_ucs2 0x006100000062 AS INT);
+CAST(_ucs2 0x006100000062 AS INT)
+0
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: 'a\0000b'
+SELECT CAST(_ucs2 0x006100010062 AS INT);
+CAST(_ucs2 0x006100010062 AS INT)
+0
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: 'a\0001b'
+# surrogate halfs
+SELECT CAST(_ucs2 0x0061D8000062 AS INT);
+CAST(_ucs2 0x0061D8000062 AS INT)
+0
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: 'a\D800b'
+SELECT CAST(_ucs2 0x0061DFFF0062 AS INT);
+CAST(_ucs2 0x0061DFFF0062 AS INT)
+0
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: 'a\DFFFb'
+# normal characters
+SELECT CAST(_ucs2 0x0061D7000062 AS INT);
+CAST(_ucs2 0x0061D7000062 AS INT)
+0
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: 'a휀b'
+SELECT CAST(_ucs2 0x0061E0030062 AS INT);
+CAST(_ucs2 0x0061E0030062 AS INT)
+0
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: 'ab'
+#
+# End of 10.5 tests
+#
diff --git a/mysql-test/main/ctype_ucs.test b/mysql-test/main/ctype_ucs.test
index 7a772a092b1..cdc86fa3283 100644
--- a/mysql-test/main/ctype_ucs.test
+++ b/mysql-test/main/ctype_ucs.test
@@ -1124,3 +1124,28 @@ SET NAMES utf8;
--echo #
--echo # End of 10.4 tests
--echo #
+
+
+--echo #
+--echo # Start of 10.5 tests
+--echo #
+
+--echo #
+--echo # MDEV-8844 Unreadable control characters printed as is in warnings
+--echo #
+
+--echo # control
+SELECT CAST(_ucs2 0x006100000062 AS INT);
+SELECT CAST(_ucs2 0x006100010062 AS INT);
+
+--echo # surrogate halfs
+SELECT CAST(_ucs2 0x0061D8000062 AS INT);
+SELECT CAST(_ucs2 0x0061DFFF0062 AS INT);
+
+--echo # normal characters
+SELECT CAST(_ucs2 0x0061D7000062 AS INT);
+SELECT CAST(_ucs2 0x0061E0030062 AS INT);
+
+--echo #
+--echo # End of 10.5 tests
+--echo #
diff --git a/mysql-test/main/ctype_ucs2_uca.result b/mysql-test/main/ctype_ucs2_uca.result
index 44a623842c6..24667ff6949 100644
--- a/mysql-test/main/ctype_ucs2_uca.result
+++ b/mysql-test/main/ctype_ucs2_uca.result
@@ -5,7 +5,7 @@
# MDEV-10877 xxx_unicode_nopad_ci collations
#
SET NAMES utf8, character_set_connection=ucs2;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -143,7 +143,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -281,8 +281,8 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -420,7 +420,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -558,7 +558,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=Default;
SET NAMES utf8, collation_connection=ucs2_unicode_520_nopad_ci;
#
# MDEV-14350 Index use with collation utf8mb4_unicode_nopad_ci on LIKE pattern with wrong results
diff --git a/mysql-test/main/ctype_ujis.result b/mysql-test/main/ctype_ujis.result
index 66175344615..c20455813d3 100644
--- a/mysql-test/main/ctype_ujis.result
+++ b/mysql-test/main/ctype_ujis.result
@@ -26253,7 +26253,7 @@ DROP TABLE t1;
# MDEV-9711 NO PAD Collatons
#
SET character_set_connection=ujis;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -26391,7 +26391,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -26529,8 +26529,8 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -26668,7 +26668,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -26806,7 +26806,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=Default;
#
# End of 10.2 tests
#
diff --git a/mysql-test/main/ctype_utf16.result b/mysql-test/main/ctype_utf16.result
index 3643e170376..36dedc87321 100644
--- a/mysql-test/main/ctype_utf16.result
+++ b/mysql-test/main/ctype_utf16.result
@@ -1086,7 +1086,7 @@ select left('aaa','1');
left('aaa','1')
a
#
-# Testing cs->cset->strtoll10()
+# Testing strtoll10()
#
SELECT @@character_set_connection;
@@character_set_connection
@@ -2259,7 +2259,7 @@ Warning 1292 Truncated incorrect INTEGER value: '1IJ3'
# MDEV-9711 NO PAD Collatons
#
SET character_set_connection=utf16;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -2397,7 +2397,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -2535,8 +2535,8 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -2674,7 +2674,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -2812,7 +2812,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=Default;
#
# End of 10.2 tests
#
@@ -2841,3 +2841,18 @@ VALUES ('') UNION VALUES ( _utf16 0x0020 COLLATE utf16_bin);
#
# End of 10.3 tests
#
+#
+# Start of 10.5 tests
+#
+#
+# MDEV-8844 Unreadable control characters printed as is in warnings
+#
+SET NAMES utf8;
+SELECT CAST(_utf16 0x0061D83DDE0E0062 AS INT);
+CAST(_utf16 0x0061D83DDE0E0062 AS INT)
+0
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: 'a?b'
+#
+# End of 10.5 tests
+#
diff --git a/mysql-test/main/ctype_utf16.test b/mysql-test/main/ctype_utf16.test
index 2267facd106..c2807a19215 100644
--- a/mysql-test/main/ctype_utf16.test
+++ b/mysql-test/main/ctype_utf16.test
@@ -511,12 +511,12 @@ drop table t1;
set names latin1;
set collation_connection=utf16_general_ci;
#
-# Testing cs->coll->instr()
+# Testing instr()
#
select position('bb' in 'abba');
#
-# Testing cs->coll->hash_sort()
+# Testing hash_sort()
#
create table t1 (a varchar(10) character set utf16) engine=heap;
insert into t1 values ('a'),('A'),('b'),('B');
@@ -525,21 +525,21 @@ select hex(min(binary a)),count(*) from t1 group by a;
drop table t1;
#
-# Testing cs->cset->numchars()
+# Testing numchars()
#
select char_length('abcd'), octet_length('abcd');
select char_length(_utf16 0xD800DC00), octet_length(_utf16 0xD800DC00);
select char_length(_utf16 0xD87FDFFF), octet_length(_utf16 0xD87FDFFF);
#
-# Testing cs->cset->charpos()
+# Testing charpos()
#
select left('abcd',2);
select hex(left(_utf16 0xD800DC00D87FDFFF, 1));
select hex(right(_utf16 0xD800DC00D87FDFFF, 1));
#
-# Testing cs->cset->well_formed_length()
+# Testing well_formed_length()
#
create table t1 (a varchar(10) character set utf16);
# Bad sequences
@@ -564,7 +564,7 @@ drop table t1;
#
# Bug#32393 Character sets: illegal characters in utf16 columns
#
-# Tests that cs->cset->wc_mb() doesn't accept surrogate parts
+# Tests that my_ci_wc_mb() doesn't accept surrogate parts
#
# via alter
#
@@ -586,7 +586,7 @@ drop table t1;
#
-# Testing cs->cset->lengthsp()
+# Testing lengthsp()
#
create table t1 (a char(10)) character set utf16;
insert into t1 values ('a ');
@@ -594,13 +594,13 @@ select hex(a) from t1;
drop table t1;
#
-# Testing cs->cset->caseup() and cs->cset->casedn()
+# Testing caseup() and casedn()
#
select upper('abcd'), lower('ABCD');
#
# TODO: str_to_datetime() is broken and doesn't work with ucs2 and utf16
-# Testing cs->cset->snprintf()
+# Testing snprintf()
#
#create table t1 (a date);
#insert into t1 values ('2007-09-16');
@@ -608,11 +608,11 @@ select upper('abcd'), lower('ABCD');
#drop table t1;
#
-# Testing cs->cset->l10tostr
+# Testing l10tostr
# !!! Not used in the code
#
-# Testing cs->cset->ll10tostr
+# Testing ll10tostr
#
create table t1 (a varchar(10) character set utf16);
insert into t1 values (123456);
@@ -620,16 +620,16 @@ select a, hex(a) from t1;
drop table t1;
-# Testing cs->cset->fill
+# Testing fill
# SOUNDEX fills strings with DIGIT ZERO up to four characters
select hex(soundex('a'));
#
-# Testing cs->cset->strntol
+# Testing strntol
# !!! Not used in the code
#
-# Testing cs->cset->strntoul
+# Testing strntoul
#
create table t1 (a enum ('a','b','c')) character set utf16;
insert into t1 values ('1');
@@ -637,14 +637,14 @@ select * from t1;
drop table t1;
#
-# Testing cs->cset->strntoll and cs->cset->strntoull
+# Testing strntoll and strntoull
#
set names latin1;
select hex(conv(convert('123' using utf16), -10, 16));
select hex(conv(convert('123' using utf16), 10, 16));
#
-# Testing cs->cset->strntod
+# Testing strntod
#
set names latin1;
set character_set_connection=utf16;
@@ -652,12 +652,12 @@ select 1.1 + '1.2';
select 1.1 + '1.2xxx';
# Testing strntoll10_utf16
-# Testing cs->cset->strtoll10
+# Testing strtoll10
select left('aaa','1');
--source include/ctype_strtoll10.inc
#
-# Testing cs->cset->strntoull10rnd
+# Testing strntoull10rnd
#
create table t1 (a int);
insert into t1 values ('-1234.1e2');
@@ -667,7 +667,7 @@ select * from t1;
drop table t1;
#
-# Testing cs->cset->scan
+# Testing scan
#
create table t1 (a int);
insert into t1 values ('1 ');
@@ -955,3 +955,23 @@ VALUES ('') UNION VALUES ( _utf16 0x0020 COLLATE utf16_bin);
--echo #
--echo # End of 10.3 tests
--echo #
+
+
+--echo #
+--echo # Start of 10.5 tests
+--echo #
+
+--echo #
+--echo # MDEV-8844 Unreadable control characters printed as is in warnings
+--echo #
+
+SET NAMES utf8;
+# Make sure surrogate halfs (when a part of a full utf16 character)
+# are not escaped and the entire utf16 character consisting of two
+# surrogate pairs is replaced to a single question mark.
+SELECT CAST(_utf16 0x0061D83DDE0E0062 AS INT);
+
+
+--echo #
+--echo # End of 10.5 tests
+--echo #
diff --git a/mysql-test/main/ctype_utf16_uca.result b/mysql-test/main/ctype_utf16_uca.result
index d4f0a821168..d1dbd498064 100644
--- a/mysql-test/main/ctype_utf16_uca.result
+++ b/mysql-test/main/ctype_utf16_uca.result
@@ -7318,7 +7318,7 @@ DROP TABLE t1;
# MDEV-10877 xxx_unicode_nopad_ci collations
#
SET NAMES utf8, character_set_connection=utf16;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -7456,7 +7456,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -7594,8 +7594,8 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -7733,7 +7733,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -7871,7 +7871,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=Default;
SET NAMES utf8, collation_connection=utf16_unicode_520_nopad_ci;
#
# MDEV-14350 Index use with collation utf8mb4_unicode_nopad_ci on LIKE pattern with wrong results
diff --git a/mysql-test/main/ctype_utf16_uca.test b/mysql-test/main/ctype_utf16_uca.test
index 93807232bab..cb00ccc0c61 100644
--- a/mysql-test/main/ctype_utf16_uca.test
+++ b/mysql-test/main/ctype_utf16_uca.test
@@ -143,7 +143,7 @@ set collation_connection=utf16_unicode_ci;
--source include/ctype_regex.inc
#
-# Test my_like_range and contractions
+# Test like_range and contractions
#
SET collation_connection=utf16_czech_ci;
--source include/ctype_czech.inc
diff --git a/mysql-test/main/ctype_utf16le.result b/mysql-test/main/ctype_utf16le.result
index d791d09d7d4..c43106aa042 100644
--- a/mysql-test/main/ctype_utf16le.result
+++ b/mysql-test/main/ctype_utf16le.result
@@ -1027,17 +1027,17 @@ text 65535 32767
DROP TABLE t1;
SET NAMES utf8, collation_connection=utf16le_general_ci;
#
-# Testing cs->coll->instr()
+# Testing instr()
#
SELECT POSITION('bb' IN 'abba');
POSITION('bb' IN 'abba')
2
#
-# Testing cs->coll->hash_sort()
+# Testing hash_sort()
#
SET NAMES utf8, collation_connection=utf16le_bin;
#
-# Test that cs->coll->hash_sort() ignores trailing spaces
+# Test that hash_sort() ignores trailing spaces
#
SELECT @@collation_connection;
@@collation_connection
@@ -1056,7 +1056,7 @@ a 61002000
DROP TABLE t1;
SET NAMES utf8, collation_connection=utf16le_general_ci;
#
-# Test that cs->coll->hash_sort() ignores trailing spaces
+# Test that hash_sort() ignores trailing spaces
#
SELECT @@collation_connection;
@@collation_connection
@@ -1074,7 +1074,7 @@ a HEX(a)
a 61002000
DROP TABLE t1;
#
-# Testing cs->cset->numchars()
+# Testing numchars()
#
SELECT CHAR_LENGTH('abcd'), OCTET_LENGTH('abcd');
CHAR_LENGTH('abcd') OCTET_LENGTH('abcd')
@@ -1086,7 +1086,7 @@ SELECT CHAR_LENGTH(_utf16le 0x7DD8FFDF), OCTET_LENGTH(_utf16le 0x7FD8DDDF);
CHAR_LENGTH(_utf16le 0x7DD8FFDF) OCTET_LENGTH(_utf16le 0x7FD8DDDF)
1 4
#
-# Testing cs->cset->charpos()
+# Testing charpos()
#
SELECT LEFT('abcd',2);
LEFT('abcd',2)
@@ -1098,7 +1098,7 @@ SELECT HEX(RIGHT(_utf16le 0x00D800DC7FD8FFDF, 1));
HEX(RIGHT(_utf16le 0x00D800DC7FD8FFDF, 1))
7FD8FFDF
#
-# Testing cs->cset->well_formed_length()
+# Testing well_formed_length()
#
CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET utf16le);
# Bad sequences
@@ -1127,7 +1127,7 @@ DROP TABLE t1;
#
# Bug#32393 Character sets: illegal characters in utf16le columns
#
-# Tests that cs->cset->wc_mb() doesn't accept surrogate parts
+# Tests that my_ci_wc_mb() doesn't accept surrogate parts
#
# via ALTER
#
@@ -1154,7 +1154,7 @@ HEX(s2)
3F00
DROP TABLE t1;
#
-# Testing cs->cset->lengthsp()
+# Testing lengthsp()
#
CREATE TABLE t1 (a CHAR(10)) CHARACTER SET utf16le;
INSERT INTO t1 VALUES ('a ');
@@ -1163,7 +1163,7 @@ HEX(a)
6100
DROP TABLE t1;
#
-# Testing cs->cset->caseup() and cs->cset->casedn()
+# Testing caseup() and casedn()
#
SELECT UPPER('abcd'), LOWER('ABCD');
UPPER('abcd') LOWER('ABCD')
@@ -1181,7 +1181,7 @@ a
2007-09-16
DROP TABLE t1;
#
-# Testing cs->cset->ll10tostr
+# Testing ll10tostr
#
CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET utf16le);
INSERT INTO t1 VALUES (123456);
@@ -1190,14 +1190,14 @@ a HEX(a)
123456 310032003300340035003600
DROP TABLE t1;
#
-# Testing cs->cset->fill
+# Testing fill
# SOUNDEX fills strings with DIGIT ZERO up to four characters
#
SELECT SOUNDEX('a'), HEX(SOUNDEX('a'));
SOUNDEX('a') HEX(SOUNDEX('a'))
A000 4100300030003000
#
-# Testing cs->cset->strntoul
+# Testing strntoul
#
CREATE TABLE t1 (a enum ('a','b','c')) CHARACTER SET utf16le;
INSERT INTO t1 VALUES ('1');
@@ -1206,7 +1206,7 @@ a
a
DROP TABLE t1;
#
-# Testing cs->cset->strntoll and cs->cset->strntoull
+# Testing strntoll and strntoull
#
SET NAMES latin1;
SELECT HEX(CONV(CONVERT('123' USING utf16le), -10, 16));
@@ -1217,7 +1217,7 @@ HEX(CONV(CONVERT('123' USING utf16le), 10, 16))
3742
SET NAMES utf8, collation_connection=utf16le_general_ci;
#
-# Testing cs->cset->strntod
+# Testing strntod
#
SET NAMES utf8, collation_connection=utf16le_general_ci;
SELECT 1.1 + '1.2';
@@ -1229,7 +1229,7 @@ SELECT 1.1 + '1.2xxx';
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '1.2xxx'
#
-# Testing cs->cset->strtoll10
+# Testing strtoll10
#
SELECT LEFT('aaa','1');
LEFT('aaa','1')
@@ -1303,7 +1303,7 @@ Warning 1292 Truncated incorrect INTEGER value: '-18446744073709551614'
Warning 1292 Truncated incorrect INTEGER value: '-18446744073709551615'
DROP TABLE t1;
#
-# Testing cs->cset->strtoll10()
+# Testing strtoll10()
#
SELECT @@character_set_connection;
@@character_set_connection
@@ -1479,7 +1479,7 @@ CAST('123456789123456789123x' AS UNSIGNED)
Warnings:
Warning 1292 Truncated incorrect INTEGER value: '123456789123456789123x'
#
-# Testing cs->cset->strntoull10rnd
+# Testing strntoull10rnd
#
CREATE TABLE t1 (a int);
INSERT INTO t1 VALUES ('-1234.1e2');
@@ -1531,7 +1531,7 @@ a
18446744073709551615
DROP TABLE t1;
#
-# Testing cs->cset->scan
+# Testing scan
#
CREATE TABLE t1 (a int);
INSERT INTO t1 VALUES ('1 ');
@@ -2445,7 +2445,7 @@ Warning 1292 Truncated incorrect INTEGER value: '1IJ3'
# MDEV-9711 NO PAD Collatons
#
SET character_set_connection=utf16le;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -2583,7 +2583,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -2721,8 +2721,8 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -2860,7 +2860,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -2998,7 +2998,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=Default;
#
# End of 10.2 tests
#
diff --git a/mysql-test/main/ctype_utf16le.test b/mysql-test/main/ctype_utf16le.test
index 204df136274..6f8fd71ec34 100644
--- a/mysql-test/main/ctype_utf16le.test
+++ b/mysql-test/main/ctype_utf16le.test
@@ -434,12 +434,12 @@ DROP TABLE t1;
SET NAMES utf8, collation_connection=utf16le_general_ci;
--echo #
---echo # Testing cs->coll->instr()
+--echo # Testing instr()
--echo #
SELECT POSITION('bb' IN 'abba');
--echo #
---echo # Testing cs->coll->hash_sort()
+--echo # Testing hash_sort()
--echo #
SET NAMES utf8, collation_connection=utf16le_bin;
--source include/ctype_heap.inc
@@ -447,21 +447,21 @@ SET NAMES utf8, collation_connection=utf16le_general_ci;
--source include/ctype_heap.inc
--echo #
---echo # Testing cs->cset->numchars()
+--echo # Testing numchars()
--echo #
SELECT CHAR_LENGTH('abcd'), OCTET_LENGTH('abcd');
SELECT CHAR_LENGTH(_utf16le 0x00D800DC), OCTET_LENGTH(_utf16le 0x00D800DC);
SELECT CHAR_LENGTH(_utf16le 0x7DD8FFDF), OCTET_LENGTH(_utf16le 0x7FD8DDDF);
--echo #
---echo # Testing cs->cset->charpos()
+--echo # Testing charpos()
--echo #
SELECT LEFT('abcd',2);
SELECT HEX(LEFT(_utf16le 0x00D800DC7FD8FFDF, 1));
SELECT HEX(RIGHT(_utf16le 0x00D800DC7FD8FFDF, 1));
--echo #
---echo # Testing cs->cset->well_formed_length()
+--echo # Testing well_formed_length()
--echo #
CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET utf16le);
--echo # Bad sequences
@@ -486,7 +486,7 @@ DROP TABLE t1;
--echo #
--echo # Bug#32393 Character sets: illegal characters in utf16le columns
--echo #
---echo # Tests that cs->cset->wc_mb() doesn't accept surrogate parts
+--echo # Tests that my_ci_wc_mb() doesn't accept surrogate parts
--echo #
--echo # via ALTER
--echo #
@@ -508,7 +508,7 @@ DROP TABLE t1;
--echo #
---echo # Testing cs->cset->lengthsp()
+--echo # Testing lengthsp()
--echo #
CREATE TABLE t1 (a CHAR(10)) CHARACTER SET utf16le;
INSERT INTO t1 VALUES ('a ');
@@ -517,7 +517,7 @@ DROP TABLE t1;
--echo #
---echo # Testing cs->cset->caseup() and cs->cset->casedn()
+--echo # Testing caseup() and casedn()
--echo #
SELECT UPPER('abcd'), LOWER('ABCD');
@@ -532,7 +532,7 @@ DROP TABLE t1;
--echo #
---echo # Testing cs->cset->ll10tostr
+--echo # Testing ll10tostr
--echo #
CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET utf16le);
INSERT INTO t1 VALUES (123456);
@@ -540,14 +540,14 @@ SELECT a, HEX(a) FROM t1;
DROP TABLE t1;
--echo #
---echo # Testing cs->cset->fill
+--echo # Testing fill
--echo # SOUNDEX fills strings with DIGIT ZERO up to four characters
--echo #
SELECT SOUNDEX('a'), HEX(SOUNDEX('a'));
--echo #
---echo # Testing cs->cset->strntoul
+--echo # Testing strntoul
--echo #
CREATE TABLE t1 (a enum ('a','b','c')) CHARACTER SET utf16le;
INSERT INTO t1 VALUES ('1');
@@ -556,7 +556,7 @@ DROP TABLE t1;
--echo #
---echo # Testing cs->cset->strntoll and cs->cset->strntoull
+--echo # Testing strntoll and strntoull
--echo #
SET NAMES latin1;
SELECT HEX(CONV(CONVERT('123' USING utf16le), -10, 16));
@@ -565,7 +565,7 @@ SET NAMES utf8, collation_connection=utf16le_general_ci;
--echo #
---echo # Testing cs->cset->strntod
+--echo # Testing strntod
--echo #
SET NAMES utf8, collation_connection=utf16le_general_ci;
SELECT 1.1 + '1.2';
@@ -573,7 +573,7 @@ SELECT 1.1 + '1.2xxx';
--echo #
---echo # Testing cs->cset->strtoll10
+--echo # Testing strtoll10
--echo #
SELECT LEFT('aaa','1');
CREATE TABLE t1 AS SELECT REPEAT('abcd', 128) AS a;
@@ -600,7 +600,7 @@ DROP TABLE t1;
--source include/ctype_strtoll10.inc
--echo #
---echo # Testing cs->cset->strntoull10rnd
+--echo # Testing strntoull10rnd
--echo #
CREATE TABLE t1 (a int);
INSERT INTO t1 VALUES ('-1234.1e2');
@@ -626,7 +626,7 @@ DROP TABLE t1;
--echo #
---echo # Testing cs->cset->scan
+--echo # Testing scan
--echo #
CREATE TABLE t1 (a int);
INSERT INTO t1 VALUES ('1 ');
diff --git a/mysql-test/main/ctype_utf32.result b/mysql-test/main/ctype_utf32.result
index da71f6eb59c..d7717ece210 100644
--- a/mysql-test/main/ctype_utf32.result
+++ b/mysql-test/main/ctype_utf32.result
@@ -1083,7 +1083,7 @@ select left('aaa','1');
left('aaa','1')
a
#
-# Testing cs->cset->strtoll10()
+# Testing strtoll10()
#
SELECT @@character_set_connection;
@@character_set_connection
@@ -2315,7 +2315,7 @@ Warning 1292 Truncated incorrect INTEGER value: '1IJ3'
# MDEV-9711 NO PAD Collatons
#
SET character_set_connection=utf32;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -2453,7 +2453,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -2591,8 +2591,8 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -2730,7 +2730,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -2868,7 +2868,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=Default;
#
# MDEV-22111 ERROR 1064 & 1033 and SIGSEGV on CREATE TABLE w/ various charsets on 10.4/5 optimized builds | Assertion `(uint) (table_check_constraints - share->check_constraints) == (uint) (share->table_check_constraints - share->field_check_constraints)' failed
# 10.2 tests
diff --git a/mysql-test/main/ctype_utf32.test b/mysql-test/main/ctype_utf32.test
index 891fd14d15f..59cc13015af 100644
--- a/mysql-test/main/ctype_utf32.test
+++ b/mysql-test/main/ctype_utf32.test
@@ -554,12 +554,12 @@ drop table t1;
set names latin1;
set collation_connection=utf32_general_ci;
#
-# Testing cs->coll->instr()
+# Testing instr()
#
select position('bb' in 'abba');
#
-# Testing cs->coll->hash_sort()
+# Testing hash_sort()
#
create table t1 (a varchar(10) character set utf32) engine=heap;
insert into t1 values ('a'),('A'),('b'),('B');
@@ -568,17 +568,17 @@ select hex(min(binary a)),count(*) from t1 group by a;
drop table t1;
#
-# Testing cs->cset->numchars()
+# Testing numchars()
#
select char_length('abcd'), octet_length('abcd');
#
-# Testing cs->cset->charpos()
+# Testing charpos()
#
select left('abcd',2);
#
-# Testing cs->cset->well_formed_length()
+# Testing well_formed_length()
#
create table t1 (a varchar(10) character set utf32);
insert into t1 values (_utf32 0x0010FFFF);
@@ -625,7 +625,7 @@ select hex(s1) from t1 where s1 = 0xfffd;
drop table t1;
#
-# Testing cs->cset->lengthsp()
+# Testing lengthsp()
#
create table t1 (a char(10)) character set utf32;
insert into t1 values ('a ');
@@ -633,13 +633,13 @@ select hex(a) from t1;
drop table t1;
#
-# Testing cs->cset->caseup() and cs->cset->casedn()
+# Testing caseup() and casedn()
#
select upper('abcd'), lower('ABCD');
#
# TODO: str_to_datetime() is broken and doesn't work with ucs2 and utf32
-# Testing cs->cset->snprintf()
+# Testing snprintf()
#
#create table t1 (a date);
#insert into t1 values ('2007-09-16');
@@ -647,11 +647,11 @@ select upper('abcd'), lower('ABCD');
#drop table t1;
#
-# Testing cs->cset->l10tostr
+# Testing l10tostr
# !!! Not used in the code
#
-# Testing cs->cset->ll10tostr
+# Testing ll10tostr
#
create table t1 (a varchar(10) character set utf32);
insert into t1 values (123456);
@@ -659,16 +659,16 @@ select a, hex(a) from t1;
drop table t1;
#
-# Testing cs->cset->fill
+# Testing fill
# SOUNDEX fills strings with DIGIT ZERO up to four characters
select hex(soundex('a'));
#
-# Testing cs->cset->strntol
+# Testing strntol
# !!! Not used in the code
#
-# Testing cs->cset->strntoul
+# Testing strntoul
#
create table t1 (a enum ('a','b','c')) character set utf32;
insert into t1 values ('1');
@@ -676,14 +676,14 @@ select * from t1;
drop table t1;
#
-# Testing cs->cset->strntoll and cs->cset->strntoull
+# Testing strntoll and strntoull
#
set names latin1;
select hex(conv(convert('123' using utf32), -10, 16));
select hex(conv(convert('123' using utf32), 10, 16));
#
-# Testing cs->cset->strntod
+# Testing strntod
#
set names latin1;
set character_set_connection=utf32;
@@ -691,12 +691,12 @@ select 1.1 + '1.2';
select 1.1 + '1.2xxx';
# Testing strntoll10_utf32
-# Testing cs->cset->strtoll10
+# Testing strtoll10
select left('aaa','1');
--source include/ctype_strtoll10.inc
#
-# Testing cs->cset->strntoull10rnd
+# Testing strntoull10rnd
#
create table t1 (a int);
insert into t1 values ('-1234.1e2');
@@ -706,7 +706,7 @@ select * from t1;
drop table t1;
#
-# Testing cs->cset->scan
+# Testing scan
#
create table t1 (a int);
insert into t1 values ('1 ');
diff --git a/mysql-test/main/ctype_utf32_uca.result b/mysql-test/main/ctype_utf32_uca.result
index 3f90bedd1c1..a344672579e 100644
--- a/mysql-test/main/ctype_utf32_uca.result
+++ b/mysql-test/main/ctype_utf32_uca.result
@@ -7338,7 +7338,7 @@ DROP TABLE t1;
# MDEV-10877 xxx_unicode_nopad_ci collations
#
SET NAMES utf8, character_set_connection=utf32;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -7476,7 +7476,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -7614,8 +7614,8 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -7753,7 +7753,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -7891,7 +7891,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=Default;
SET NAMES utf8, collation_connection=utf32_unicode_520_nopad_ci;
#
# MDEV-14350 Index use with collation utf8mb4_unicode_nopad_ci on LIKE pattern with wrong results
diff --git a/mysql-test/main/ctype_utf32_uca.test b/mysql-test/main/ctype_utf32_uca.test
index 42635d1464d..f84093c4587 100644
--- a/mysql-test/main/ctype_utf32_uca.test
+++ b/mysql-test/main/ctype_utf32_uca.test
@@ -144,7 +144,7 @@ set collation_connection=utf32_unicode_ci;
#
-# Test my_like_range and contractions
+# Test like_range and contractions
#
SET collation_connection=utf32_czech_ci;
--source include/ctype_czech.inc
diff --git a/mysql-test/main/ctype_utf8.result b/mysql-test/main/ctype_utf8.result
index 4ca9b1e4cb7..266292edab6 100644
--- a/mysql-test/main/ctype_utf8.result
+++ b/mysql-test/main/ctype_utf8.result
@@ -3283,7 +3283,7 @@ t1 CREATE TABLE `t1` (
drop table t1;
select coercibility(uuid()), coercibility(cast('a' as char character set latin1));
coercibility(uuid()) coercibility(cast('a' as char character set latin1))
-4 2
+5 2
select charset(concat(uuid(), cast('a' as char character set latin1)));
charset(concat(uuid(), cast('a' as char character set latin1)))
latin1
@@ -5409,18 +5409,21 @@ DROP TABLE t1;
#
# Bug#11764503 (Bug#57341) Query in EXPLAIN EXTENDED shows wrong characters
#
+# Emulate utf8 client erroneously started with --default-character-set=latin1,
+# # as in the bug report. EXPLAIN output should still be pretty readable
SET NAMES latin1;
EXPLAIN EXTENDED SELECT 'abcdÃÂÃÄÅ', _latin1'abcdÃÂÃÄÅ', _utf8'abcdÃÂÃÄÅ' AS u;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
Warnings:
-Note 1003 select 'abcdÃÂÃÄÅ' AS `abcdÃÂÃÄÅ`,_latin1'abcd\xC3\x81\xC3\x82\xC3\x83\xC3\x84\xC3\x85' AS `abcdÃÂÃÄÅ`,_utf8'abcd\xC3\x81\xC3\x82\xC3\x83\xC3\x84\xC3\x85' AS `u`
+Note 1003 select 'abcdÃ\0081ÂÃÄÅ' AS `abcdÃ\0081ÂÃÄÅ`,_latin1'abcd\xC3\x81\xC3\x82\xC3\x83\xC3\x84\xC3\x85' AS `abcdÃ\0081ÂÃÄÅ`,_utf8'abcd\xC3\x81\xC3\x82\xC3\x83\xC3\x84\xC3\x85' AS `u`
+# Test normal utf8
SET NAMES utf8;
EXPLAIN EXTENDED SELECT 'abcdÃÂÃÄÅ', _latin1'abcdÃÂÃÄÅ', _utf8'abcdÃÂÃÄÅ';
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
Warnings:
-Note 1003 select 'abcdÃÂÃÄÅ' AS `abcdÃÂÃÄÅ`,_latin1'abcd\xC3\x81\xC3\x82\xC3\x83\xC3\x84\xC3\x85' AS `abcdÃÂÂÃÄÅ`,_utf8'abcd\xC3\x81\xC3\x82\xC3\x83\xC3\x84\xC3\x85' AS `abcdÃÂÃÄÅ`
+Note 1003 select 'abcdÃÂÃÄÅ' AS `abcdÃÂÃÄÅ`,_latin1'abcd\xC3\x81\xC3\x82\xC3\x83\xC3\x84\xC3\x85' AS `abcdÃ\0081ÂÃÄÅ`,_utf8'abcd\xC3\x81\xC3\x82\xC3\x83\xC3\x84\xC3\x85' AS `abcdÃÂÃÄÅ`
#
# Bug#11750518 41090: ORDER BY TRUNCATES GROUP_CONCAT RESULT
#
@@ -10686,7 +10689,7 @@ DROP TABLE t1;
#
# MDEV-9711 NO PAD Collatons
#
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -10824,7 +10827,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -10962,8 +10965,8 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -11101,7 +11104,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -11239,7 +11242,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=Default;
#
# End of 10.2 tests
#
@@ -11351,3 +11354,97 @@ a
#
# End of 10.3 tests
#
+#
+# Start of 10.5 tests
+#
+#
+# MDEV-20712 Wrong data type for CAST(@a AS BINARY) for a numeric variable
+#
+SET NAMES utf8;
+SET @a=2;
+CREATE OR REPLACE TABLE t1 AS SELECT CAST(1 AS BINARY), CAST(@a AS BINARY), CAST(@b:=3 AS BINARY);
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `CAST(1 AS BINARY)` varbinary(1) DEFAULT NULL,
+ `CAST(@a AS BINARY)` varbinary(20) DEFAULT NULL,
+ `CAST(@b:=3 AS BINARY)` varbinary(1) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1;
+#
+# MDEV-20890 Illegal mix of collations with UUID()
+#
+SET NAMES utf8 COLLATE utf8_unicode_ci;
+SELECT uuid()>'';
+uuid()>''
+1
+#
+# MDEV-8844 Unreadable control characters printed as is in warnings
+#
+SET NAMES utf8;
+# control, part1
+SELECT CAST(_utf8 0x610062 AS INT);
+CAST(_utf8 0x610062 AS INT)
+0
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: 'a\0000b'
+SELECT CAST(_utf8 0x610162 AS INT);
+CAST(_utf8 0x610162 AS INT)
+0
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: 'a\0001b'
+SELECT CAST(_utf8 0x611F62 AS INT);
+CAST(_utf8 0x611F62 AS INT)
+0
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: 'a\001Fb'
+# control, part2: U+0080..U+009F
+SELECT CAST(_utf8 0x617F62 AS INT);
+CAST(_utf8 0x617F62 AS INT)
+0
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: 'a\007Fb'
+SELECT CAST(_utf8 0x61C28062 AS INT);
+CAST(_utf8 0x61C28062 AS INT)
+0
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: 'a\0080b'
+SELECT CAST(_utf8 0x61C29F62 AS INT);
+CAST(_utf8 0x61C29F62 AS INT)
+0
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: 'a\009Fb'
+# normal characters
+SELECT CAST(_utf8 0x612062 AS INT);
+CAST(_utf8 0x612062 AS INT)
+0
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: 'a b'
+SELECT CAST(_utf8 0x617E62 AS INT);
+CAST(_utf8 0x617E62 AS INT)
+0
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: 'a~b'
+SELECT CAST(_utf8 0x61C2BF62 AS INT);
+CAST(_utf8 0x61C2BF62 AS INT)
+0
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: 'a¿b'
+SELECT CAST(_utf8 'ëëë' AS INT);
+CAST(_utf8 'ëëë' AS INT)
+0
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: 'ëëë'
+SELECT CAST(_utf8 'Å“Å“Å“' AS INT);
+CAST(_utf8 'Å“Å“Å“' AS INT)
+0
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: 'Å“Å“Å“'
+SELECT CAST(_utf8 'ÑÑÑ' AS INT);
+CAST(_utf8 'ÑÑÑ' AS INT)
+0
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: 'ÑÑÑ'
+#
+# End of 10.5 tests
+#
diff --git a/mysql-test/main/ctype_utf8.test b/mysql-test/main/ctype_utf8.test
index 38dd9341e47..01e5a0e8c80 100644
--- a/mysql-test/main/ctype_utf8.test
+++ b/mysql-test/main/ctype_utf8.test
@@ -1598,11 +1598,12 @@ DROP TABLE t1;
--echo #
--echo # Bug#11764503 (Bug#57341) Query in EXPLAIN EXTENDED shows wrong characters
--echo #
-# Emulate utf8 client erroneously started with --default-character-set=latin1,
-# as in the bug report. EXPLAIN output should still be pretty readable
+
+--echo # Emulate utf8 client erroneously started with --default-character-set=latin1,
+--echo # # as in the bug report. EXPLAIN output should still be pretty readable
SET NAMES latin1;
EXPLAIN EXTENDED SELECT 'abcdÃÂÃÄÅ', _latin1'abcdÃÂÃÄÅ', _utf8'abcdÃÂÃÄÅ' AS u;
-# Test normal utf8
+--echo # Test normal utf8
SET NAMES utf8;
EXPLAIN EXTENDED SELECT 'abcdÃÂÃÄÅ', _latin1'abcdÃÂÃÄÅ', _utf8'abcdÃÂÃÄÅ';
@@ -2279,3 +2280,53 @@ VALUES (_latin1 0xDF) UNION VALUES(_utf8'a' COLLATE utf8_bin);
--echo #
--echo # End of 10.3 tests
--echo #
+
+
+--echo #
+--echo # Start of 10.5 tests
+--echo #
+
+--echo #
+--echo # MDEV-20712 Wrong data type for CAST(@a AS BINARY) for a numeric variable
+--echo #
+
+SET NAMES utf8;
+SET @a=2;
+CREATE OR REPLACE TABLE t1 AS SELECT CAST(1 AS BINARY), CAST(@a AS BINARY), CAST(@b:=3 AS BINARY);
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-20890 Illegal mix of collations with UUID()
+--echo #
+
+SET NAMES utf8 COLLATE utf8_unicode_ci;
+SELECT uuid()>'';
+
+
+--echo #
+--echo # MDEV-8844 Unreadable control characters printed as is in warnings
+--echo #
+SET NAMES utf8;
+--echo # control, part1
+SELECT CAST(_utf8 0x610062 AS INT);
+SELECT CAST(_utf8 0x610162 AS INT);
+SELECT CAST(_utf8 0x611F62 AS INT);
+
+--echo # control, part2: U+0080..U+009F
+SELECT CAST(_utf8 0x617F62 AS INT);
+SELECT CAST(_utf8 0x61C28062 AS INT);
+SELECT CAST(_utf8 0x61C29F62 AS INT);
+
+--echo # normal characters
+SELECT CAST(_utf8 0x612062 AS INT);
+SELECT CAST(_utf8 0x617E62 AS INT);
+SELECT CAST(_utf8 0x61C2BF62 AS INT);
+SELECT CAST(_utf8 'ëëë' AS INT);
+SELECT CAST(_utf8 'Å“Å“Å“' AS INT);
+SELECT CAST(_utf8 'ÑÑÑ' AS INT);
+
+
+--echo #
+--echo # End of 10.5 tests
+--echo #
diff --git a/mysql-test/main/ctype_utf8_def_upgrade.result b/mysql-test/main/ctype_utf8_def_upgrade.result
index 921b5200aca..4f8a2b27db2 100644
--- a/mysql-test/main/ctype_utf8_def_upgrade.result
+++ b/mysql-test/main/ctype_utf8_def_upgrade.result
@@ -10,14 +10,14 @@ SELECT @@character_set_database;
latin1
SET @@character_set_database="latin1";
SELECT COUNT(*) FROM t1;
-ERROR HY000: Got error 190 "Incompatible key or row definition between the MariaDB .frm file and the information in the storage engine. You have to dump an" from storage engine MyISAM
+ERROR HY000: Got error 190 "Incompatible key or row definition between the MariaDB .frm file and the information in the storage engine. You may have retry " from storage engine MyISAM
CHECK TABLE t1;
Table Op Msg_type Msg_text
-test.t1 check Error Got error 190 "Incompatible key or row definition between the MariaDB .frm file and the information in the storage engine. You have to dump an" from storage engine MyISAM
+test.t1 check Error Got error 190 "Incompatible key or row definition between the MariaDB .frm file and the information in the storage engine. You may have retry " from storage engine MyISAM
test.t1 check error Corrupt
REPAIR TABLE t1;
Table Op Msg_type Msg_text
-test.t1 repair Error Got error 190 "Incompatible key or row definition between the MariaDB .frm file and the information in the storage engine. You have to dump an" from storage engine MyISAM
+test.t1 repair Error Got error 190 "Incompatible key or row definition between the MariaDB .frm file and the information in the storage engine. You may have retry " from storage engine MyISAM
test.t1 repair error Corrupt
REPAIR TABLE t1 USE_FRM;
Table Op Msg_type Msg_text
@@ -64,7 +64,7 @@ SELECT @@character_set_database, 'taken from db.opt' AS comment;
@@character_set_database comment
latin1 taken from db.opt
SELECT COUNT(*) FROM t1;
-ERROR HY000: Got error 190 "Incompatible key or row definition between the MariaDB .frm file and the information in the storage engine. You have to dump an" from storage engine MyISAM
+ERROR HY000: Got error 190 "Incompatible key or row definition between the MariaDB .frm file and the information in the storage engine. You may have retry " from storage engine MyISAM
REPAIR TABLE t1 USE_FRM;
Table Op Msg_type Msg_text
db1.t1 repair status OK
diff --git a/mysql-test/main/ctype_utf8_uca.result b/mysql-test/main/ctype_utf8_uca.result
index 23e9802b61a..ef64203bbbe 100644
--- a/mysql-test/main/ctype_utf8_uca.result
+++ b/mysql-test/main/ctype_utf8_uca.result
@@ -5,7 +5,7 @@
# MDEV-10877 xxx_unicode_nopad_ci collations
#
SET NAMES utf8;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -143,7 +143,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -281,8 +281,8 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -420,7 +420,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -558,7 +558,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=Default;
SET NAMES utf8 COLLATE utf8_unicode_nopad_ci;
#
# MDEV-14350 Index use with collation utf8mb4_unicode_nopad_ci on LIKE pattern with wrong results
diff --git a/mysql-test/main/ctype_utf8mb4.result b/mysql-test/main/ctype_utf8mb4.result
index 2762873b9c7..20ebfd255b2 100644
--- a/mysql-test/main/ctype_utf8mb4.result
+++ b/mysql-test/main/ctype_utf8mb4.result
@@ -3570,7 +3570,7 @@ DROP TABLE t1;
#
# MDEV-9711 NO PAD Collatons
#
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -3708,7 +3708,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -3846,8 +3846,8 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -3985,7 +3985,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -4123,7 +4123,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=Default;
#
# MDEV-10867 PREPARE..EXECUTE is not consistent about non-ASCII characters
#
diff --git a/mysql-test/main/ctype_utf8mb4_uca.result b/mysql-test/main/ctype_utf8mb4_uca.result
index 0712ca63abd..34cc443e6f6 100644
--- a/mysql-test/main/ctype_utf8mb4_uca.result
+++ b/mysql-test/main/ctype_utf8mb4_uca.result
@@ -6022,7 +6022,7 @@ DROP TABLE t1;
# MDEV-9711 NO PAD Collatons
#
SET NAMES utf8mb4;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -6160,7 +6160,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -6298,8 +6298,8 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
-SET STORAGE_ENGINE=MyISAM;
+SET DEFAULT_STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=MyISAM;
#
# Start of ctype_pad.inc
#
@@ -6437,7 +6437,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=HEAP;
+SET DEFAULT_STORAGE_ENGINE=HEAP;
#
# Start of ctype_pad.inc
#
@@ -6575,7 +6575,7 @@ DROP TABLE t1;
#
# End of ctype_pad.inc
#
-SET STORAGE_ENGINE=Default;
+SET DEFAULT_STORAGE_ENGINE=Default;
SET NAMES utf8mb4 COLLATE utf8mb4_unicode_520_nopad_ci;
#
# MDEV-14350 Index use with collation utf8mb4_unicode_nopad_ci on LIKE pattern with wrong results
diff --git a/mysql-test/main/ctype_utf8mb4_uca.test b/mysql-test/main/ctype_utf8mb4_uca.test
index 160cb48bad6..7a95da8468c 100644
--- a/mysql-test/main/ctype_utf8mb4_uca.test
+++ b/mysql-test/main/ctype_utf8mb4_uca.test
@@ -45,7 +45,7 @@ DROP TABLE t1;
--echo #
#
# Bug#57737 Character sets: search fails with like, contraction, index
-# Test my_like_range and contractions
+# Test like_range and contractions
#
SET collation_connection=utf8mb4_czech_ci;
--source include/ctype_czech.inc
diff --git a/mysql-test/main/deadlock_innodb.result b/mysql-test/main/deadlock_innodb.result
index fca0ff6be0c..09958bf0413 100644
--- a/mysql-test/main/deadlock_innodb.result
+++ b/mysql-test/main/deadlock_innodb.result
@@ -115,7 +115,7 @@ disconnect con1;
disconnect con2;
drop table t1, t2;
End of 4.1 tests
-set storage_engine=innodb;
+set default_storage_engine=innodb;
drop table if exists a;
drop table if exists A;
create table A (c int);
@@ -123,5 +123,5 @@ insert into A (c) values (0);
create table a as select * from A;
drop table A;
drop table if exists a;
-set storage_engine=default;
+set default_storage_engine=default;
End of 5.0 tests.
diff --git a/mysql-test/main/delayed.test b/mysql-test/main/delayed.test
index 573985fec1f..a96ffdfcca9 100644
--- a/mysql-test/main/delayed.test
+++ b/mysql-test/main/delayed.test
@@ -15,9 +15,9 @@
# limit the test to engines which support INSERT DELAYED
disable_query_log;
--require include/true.require
-select @@global.storage_engine in
+select @@global.default_storage_engine in
("memory","myisam","archive","blackhole") and
-@@session.storage_engine in
+@@session.default_storage_engine in
("memory","myisam","archive","blackhole") as `TRUE`;
enable_query_log;
diff --git a/mysql-test/main/delete_innodb.result b/mysql-test/main/delete_innodb.result
new file mode 100644
index 00000000000..b9f4c8bdaf5
--- /dev/null
+++ b/mysql-test/main/delete_innodb.result
@@ -0,0 +1,26 @@
+# Tests for delete with INNODB
+#
+# MDEV-22187: SIGSEGV in ha_innobase::cmp_ref on DELETE
+#
+SET @save_sort_buffer_size= @@sort_buffer_size;
+SET sort_buffer_size=1024;
+CREATE TABLE t1(c1 CHAR(255) PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (0), ('a'), ('b');
+ANALYZE TABLE t1 PERSISTENT FOR ALL;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
+SELECT * FROM t1;
+c1
+0
+a
+b
+EXPLAIN DELETE b FROM t1 AS a JOIN t1 AS b;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE a index NULL PRIMARY 255 NULL 3 Using index
+1 SIMPLE b ALL NULL NULL NULL NULL 3
+DELETE b FROM t1 AS a JOIN t1 AS b;
+SELECT * FROM t1;
+c1
+SET sort_buffer_size=@save_sort_buffer_size;
+DROP TABLE t1;
diff --git a/mysql-test/main/delete_innodb.test b/mysql-test/main/delete_innodb.test
new file mode 100644
index 00000000000..c5c5c5d0172
--- /dev/null
+++ b/mysql-test/main/delete_innodb.test
@@ -0,0 +1,22 @@
+--source include/have_innodb.inc
+--source include/have_sequence.inc
+
+--echo # Tests for delete with INNODB
+
+--echo #
+--echo # MDEV-22187: SIGSEGV in ha_innobase::cmp_ref on DELETE
+--echo #
+
+SET @save_sort_buffer_size= @@sort_buffer_size;
+SET sort_buffer_size=1024;
+CREATE TABLE t1(c1 CHAR(255) PRIMARY KEY) ENGINE=InnoDB;
+
+INSERT INTO t1 VALUES (0), ('a'), ('b');
+ANALYZE TABLE t1 PERSISTENT FOR ALL;
+SELECT * FROM t1;
+EXPLAIN DELETE b FROM t1 AS a JOIN t1 AS b;
+DELETE b FROM t1 AS a JOIN t1 AS b;
+SELECT * FROM t1;
+
+SET sort_buffer_size=@save_sort_buffer_size;
+DROP TABLE t1;
diff --git a/mysql-test/main/derived.result b/mysql-test/main/derived.result
index ac7d3b2d879..006f41236f5 100644
--- a/mysql-test/main/derived.result
+++ b/mysql-test/main/derived.result
@@ -324,11 +324,11 @@ create table t2 (a int, b int, primary key (a));
insert into t2 values (1,7),(2,7);
explain select a from t2 where a>1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 index PRIMARY PRIMARY 4 NULL 2 Using where; Using index
+1 SIMPLE t2 range PRIMARY PRIMARY 4 NULL 1 Using where; Using index
explain select a from (select a from t2 where a>1) tt;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY <derived2> ALL NULL NULL NULL NULL 2
-2 DERIVED t2 index PRIMARY PRIMARY 4 NULL 2 Using where; Using index
+2 DERIVED t2 range PRIMARY PRIMARY 4 NULL 1 Using where; Using index
drop table t2;
CREATE TABLE `t1` ( `itemid` int(11) NOT NULL default '0', `grpid` varchar(15) NOT NULL default '', `vendor` int(11) NOT NULL default '0', `date_` date NOT NULL default '0000-00-00', `price` decimal(12,2) NOT NULL default '0.00', PRIMARY KEY (`itemid`,`grpid`,`vendor`,`date_`), KEY `itemid` (`itemid`,`vendor`), KEY `itemid_2` (`itemid`,`date_`));
insert into t1 values (128, 'rozn', 2, curdate(), 10),
@@ -1064,16 +1064,19 @@ INSERT INTO t2 VALUES (NULL),(NULL);
CREATE TABLE t3 (c VARCHAR(1024) CHARACTER SET utf8, d INT) ENGINE=MyISAM;
CREATE OR REPLACE ALGORITHM=TEMPTABLE VIEW v3 AS SELECT * FROM t3;
INSERT INTO t3 VALUES ('abc',NULL),('def',4);
+INSERT INTO t1 select seq from seq_1_to_1000;
+INSERT INTO t2 select seq+1000 from seq_1_to_1000;
+INSERT INTO t3 select 'qqq',seq+2000 from seq_1_to_1000;
set @save_join_cache_level= @@join_cache_level;
SET join_cache_level= 8;
explain
SELECT * FROM v1, t2, v3 WHERE a = c AND b = d;
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY <derived2> ALL NULL NULL NULL NULL 2
-1 PRIMARY <derived3> hash_ALL NULL #hash#$hj 3075 func 2 Using where; Using join buffer (flat, BNLH join)
+1 PRIMARY <derived2> ALL NULL NULL NULL NULL 1002
+1 PRIMARY <derived3> hash_ALL NULL #hash#$hj 3075 func 1002 Using where; Using join buffer (flat, BNLH join)
1 PRIMARY t2 eq_ref PRIMARY PRIMARY 4 v3.d 1 Using index
-3 DERIVED t3 ALL NULL NULL NULL NULL 2
-2 DERIVED t1 ALL NULL NULL NULL NULL 2
+3 DERIVED t3 ALL NULL NULL NULL NULL 1002
+2 DERIVED t1 ALL NULL NULL NULL NULL 1002
SELECT * FROM v1, t2, v3 WHERE a = c AND b = d;
a b c d
DROP VIEW v1, v3;
diff --git a/mysql-test/main/derived.test b/mysql-test/main/derived.test
index f4477ce8550..8c41f80ffbd 100644
--- a/mysql-test/main/derived.test
+++ b/mysql-test/main/derived.test
@@ -1,5 +1,6 @@
# Initialize
--source include/default_optimizer_switch.inc
+--source include/have_sequence.inc
--disable_warnings
drop table if exists t1,t2,t3;
@@ -919,6 +920,9 @@ INSERT INTO t2 VALUES (NULL),(NULL);
CREATE TABLE t3 (c VARCHAR(1024) CHARACTER SET utf8, d INT) ENGINE=MyISAM;
CREATE OR REPLACE ALGORITHM=TEMPTABLE VIEW v3 AS SELECT * FROM t3;
INSERT INTO t3 VALUES ('abc',NULL),('def',4);
+INSERT INTO t1 select seq from seq_1_to_1000;
+INSERT INTO t2 select seq+1000 from seq_1_to_1000;
+INSERT INTO t3 select 'qqq',seq+2000 from seq_1_to_1000;
set @save_join_cache_level= @@join_cache_level;
SET join_cache_level= 8;
diff --git a/mysql-test/main/derived_cond_pushdown.result b/mysql-test/main/derived_cond_pushdown.result
index 01a863ccb8b..b3a4dc4c253 100644
--- a/mysql-test/main/derived_cond_pushdown.result
+++ b/mysql-test/main/derived_cond_pushdown.result
@@ -8828,9 +8828,21 @@ EXPLAIN
"query_block": {
"select_id": 1,
"table": {
- "table_name": "<derived2>",
+ "table_name": "t1",
"access_type": "ALL",
- "rows": 3,
+ "rows": 4,
+ "filtered": 100,
+ "attached_condition": "t1.id2 is not null"
+ },
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ref",
+ "possible_keys": ["key0"],
+ "key": "key0",
+ "key_length": "5",
+ "used_key_parts": ["id2"],
+ "ref": ["test.t1.id2"],
+ "rows": 2,
"filtered": 100,
"attached_condition": "vc.ct > 0",
"materialized": {
@@ -8850,18 +8862,6 @@ EXPLAIN
}
}
}
- },
- "block-nl-join": {
- "table": {
- "table_name": "t1",
- "access_type": "ALL",
- "rows": 4,
- "filtered": 100
- },
- "buffer_type": "flat",
- "buffer_size": "163",
- "join_type": "BNL",
- "attached_condition": "t1.id2 = vc.id2"
}
}
}
@@ -9078,9 +9078,8 @@ WHERE d_tab.e>1
)
;
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t1 ALL NULL NULL NULL NULL 5
-1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 8 func,func 1
-2 MATERIALIZED <derived3> ALL NULL NULL NULL NULL 5 Using where
+1 PRIMARY t1 ALL NULL NULL NULL NULL 5 Using where
+1 PRIMARY <derived3> ref key0 key0 10 test.t1.a,test.t1.b 2 FirstMatch(t1)
3 DERIVED t2 ALL NULL NULL NULL NULL 5 Using where; Using temporary; Using filesort
EXPLAIN FORMAT=JSON SELECT * FROM t1
WHERE (t1.a,t1.b) IN
@@ -9103,44 +9102,33 @@ EXPLAIN
"table_name": "t1",
"access_type": "ALL",
"rows": 5,
- "filtered": 100
+ "filtered": 100,
+ "attached_condition": "t1.a > 1 and t1.a is not null and t1.b is not null"
},
"table": {
- "table_name": "<subquery2>",
- "access_type": "eq_ref",
- "possible_keys": ["distinct_key"],
- "key": "distinct_key",
- "key_length": "8",
+ "table_name": "<derived3>",
+ "access_type": "ref",
+ "possible_keys": ["key0"],
+ "key": "key0",
+ "key_length": "10",
"used_key_parts": ["e", "max_f"],
- "ref": ["func", "func"],
- "rows": 1,
+ "ref": ["test.t1.a", "test.t1.b"],
+ "rows": 2,
"filtered": 100,
+ "first_match": "t1",
"materialized": {
- "unique": 1,
"query_block": {
- "select_id": 2,
- "table": {
- "table_name": "<derived3>",
- "access_type": "ALL",
- "rows": 5,
- "filtered": 100,
- "attached_condition": "d_tab.e > 1",
- "materialized": {
- "query_block": {
- "select_id": 3,
- "having_condition": "max_f > 18",
- "filesort": {
- "sort_key": "t2.e",
- "temporary_table": {
- "table": {
- "table_name": "t2",
- "access_type": "ALL",
- "rows": 5,
- "filtered": 100,
- "attached_condition": "t2.e > 1"
- }
- }
- }
+ "select_id": 3,
+ "having_condition": "max_f > 18",
+ "filesort": {
+ "sort_key": "t2.e",
+ "temporary_table": {
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t2.e > 1"
}
}
}
@@ -9179,9 +9167,8 @@ WHERE d_tab.max_f<25
)
;
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t1 ALL NULL NULL NULL NULL 5
-1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 8 func,func 1
-2 MATERIALIZED <derived3> ALL NULL NULL NULL NULL 5 Using where
+1 PRIMARY t1 ALL NULL NULL NULL NULL 5 Using where
+1 PRIMARY <derived3> ref key0 key0 10 test.t1.a,test.t1.b 2 FirstMatch(t1)
3 DERIVED t2 ALL NULL NULL NULL NULL 5 Using temporary; Using filesort
EXPLAIN FORMAT=JSON SELECT * FROM t1
WHERE (t1.a,t1.b) IN
@@ -9204,43 +9191,32 @@ EXPLAIN
"table_name": "t1",
"access_type": "ALL",
"rows": 5,
- "filtered": 100
+ "filtered": 100,
+ "attached_condition": "t1.b < 25 and t1.a is not null and t1.b is not null"
},
"table": {
- "table_name": "<subquery2>",
- "access_type": "eq_ref",
- "possible_keys": ["distinct_key"],
- "key": "distinct_key",
- "key_length": "8",
+ "table_name": "<derived3>",
+ "access_type": "ref",
+ "possible_keys": ["key0"],
+ "key": "key0",
+ "key_length": "10",
"used_key_parts": ["e", "max_f"],
- "ref": ["func", "func"],
- "rows": 1,
+ "ref": ["test.t1.a", "test.t1.b"],
+ "rows": 2,
"filtered": 100,
+ "first_match": "t1",
"materialized": {
- "unique": 1,
"query_block": {
- "select_id": 2,
- "table": {
- "table_name": "<derived3>",
- "access_type": "ALL",
- "rows": 5,
- "filtered": 100,
- "attached_condition": "d_tab.max_f < 25",
- "materialized": {
- "query_block": {
- "select_id": 3,
- "having_condition": "max_f > 18 and max_f < 25",
- "filesort": {
- "sort_key": "t2.e",
- "temporary_table": {
- "table": {
- "table_name": "t2",
- "access_type": "ALL",
- "rows": 5,
- "filtered": 100
- }
- }
- }
+ "select_id": 3,
+ "having_condition": "max_f > 18 and max_f < 25",
+ "filesort": {
+ "sort_key": "t2.e",
+ "temporary_table": {
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100
}
}
}
@@ -14339,16 +14315,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
-2 33 7 5 33 207
4 33 123 5 33 207
-2 33 7 8 33 117
+2 33 7 5 33 207
4 33 123 8 33 117
-1 21 345 3 21 231
+2 33 7 8 33 117
3 21 500 3 21 231
+1 21 345 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 <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)
+1 PRIMARY t2 ALL NULL NULL NULL NULL 9 Using where
+1 PRIMARY <derived2> ref key0 key0 5 test.t2.b 2 Using where
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
@@ -14356,9 +14332,21 @@ EXPLAIN
"query_block": {
"select_id": 1,
"table": {
- "table_name": "<derived2>",
+ "table_name": "t2",
"access_type": "ALL",
- "rows": 5,
+ "rows": 9,
+ "filtered": 100,
+ "attached_condition": "t2.b is not null"
+ },
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ref",
+ "possible_keys": ["key0"],
+ "key": "key0",
+ "key_length": "5",
+ "used_key_parts": ["b"],
+ "ref": ["test.t2.b"],
+ "rows": 2,
"filtered": 100,
"attached_condition": "v1.a < 5",
"materialized": {
@@ -14377,18 +14365,6 @@ EXPLAIN
}
}
}
- },
- "block-nl-join": {
- "table": {
- "table_name": "t2",
- "access_type": "ALL",
- "rows": 9,
- "filtered": 100
- },
- "buffer_type": "flat",
- "buffer_size": "173",
- "join_type": "BNL",
- "attached_condition": "t2.b = v1.b"
}
}
}
@@ -15472,7 +15448,7 @@ EXPLAIN
"access_type": "ALL",
"possible_keys": ["idx_b"],
"rows": 12,
- "filtered": 83.333,
+ "filtered": 83.33333588,
"attached_condition": "t1.b <= 5 and t1.a is not null"
},
"table": {
@@ -15747,7 +15723,7 @@ EXPLAIN
"access_type": "ALL",
"possible_keys": ["idx_b"],
"rows": 12,
- "filtered": 83.333,
+ "filtered": 83.33333588,
"attached_condition": "t3.b <= 15 and t3.a is not null and t3.c is not null"
},
"table": {
@@ -15900,7 +15876,7 @@ EXPLAIN
"access_type": "ALL",
"possible_keys": ["idx_b"],
"rows": 12,
- "filtered": 83.333,
+ "filtered": 83.33333588,
"attached_condition": "t3.b <= 15 and t3.a is not null and t3.c is not null"
},
"table": {
@@ -16132,7 +16108,7 @@ EXPLAIN
"table_name": "t2",
"access_type": "ALL",
"rows": 90,
- "filtered": 63.281,
+ "filtered": 63.28125,
"attached_condition": "t2.b < 40 and t2.a is not null"
},
"table": {
@@ -16629,7 +16605,7 @@ EXPLAIN
"table_name": "t2",
"access_type": "ALL",
"rows": 90,
- "filtered": 63.281,
+ "filtered": 63.28125,
"attached_condition": "t2.b < 40 and t2.a is not null"
},
"table": {
@@ -17318,7 +17294,8 @@ ANALYZE
"r_loops": 1,
"rows": 4,
"r_rows": 2,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 50,
"attached_condition": "v1.a = 3",
@@ -17341,7 +17318,8 @@ ANALYZE
"r_loops": 1,
"rows": 2,
"r_rows": 2,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 50,
"attached_condition": "t1.a = 3"
@@ -17401,7 +17379,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY <subquery3> eq_ref distinct_key distinct_key 4 func 1
1 PRIMARY <derived2> ref key0 key0 5 test.t3.id 2
3 MATERIALIZED t2 ALL NULL NULL NULL NULL 3
-2 DERIVED cp2 index NULL a 5 NULL 7 Using index
+2 DERIVED cp2 range NULL a 5 NULL 8 Using index for group-by
explain format=json select * from t1, (select a from t1 cp2 group by a) dt, t3
where dt.a = t1.a and t1.a = t3.id and t1.a in (select a from t2);
EXPLAIN
@@ -17464,13 +17442,13 @@ EXPLAIN
"select_id": 2,
"table": {
"table_name": "cp2",
- "access_type": "index",
+ "access_type": "range",
"key": "a",
"key_length": "5",
"used_key_parts": ["a"],
- "rows": 7,
+ "rows": 8,
"filtered": 100,
- "using_index": true
+ "using_index_for_group_by": true
}
}
}
diff --git a/mysql-test/main/derived_opt.result b/mysql-test/main/derived_opt.result
index 907c97e92d4..cf0c1cb617f 100644
--- a/mysql-test/main/derived_opt.result
+++ b/mysql-test/main/derived_opt.result
@@ -137,10 +137,10 @@ create table t2 (a int, b int, primary key (a));
insert into t2 values (1,7),(2,7);
explain select a from t2 where a>1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 index PRIMARY PRIMARY 4 NULL 2 Using where; Using index
+1 SIMPLE t2 range PRIMARY PRIMARY 4 NULL 1 Using where; Using index
explain select a from (select a from t2 where a>1) tt;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 index PRIMARY PRIMARY 4 NULL 2 Using where; Using index
+1 SIMPLE t2 range PRIMARY PRIMARY 4 NULL 1 Using where; Using index
drop table t2;
create table t1
(
diff --git a/mysql-test/main/derived_split_innodb.result b/mysql-test/main/derived_split_innodb.result
index 63db8c94dde..9edf9a1f2ae 100644
--- a/mysql-test/main/derived_split_innodb.result
+++ b/mysql-test/main/derived_split_innodb.result
@@ -9,6 +9,7 @@ KEY c1 (c1),
KEY n1_c1_n2 (n1,c1,n2)
) ENGINE=InnoDB;
INSERT INTO t1 VALUES (0, 2, 'a'), (1, 3, 'a');
+insert into t1 select seq+1,seq+2,'c' from seq_1_to_1000;
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
@@ -16,7 +17,7 @@ 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;
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t1 index c1,n1_c1_n2 n1_c1_n2 9 NULL 2 Using where; Using index
+1 PRIMARY t1 ref c1,n1_c1_n2 c1 1 const 2 Using index condition; Using where; Using temporary; Using filesort
1 PRIMARY <derived2> ref key0 key0 8 test.t1.n1,test.t1.n2 2
2 LATERAL DERIVED t1 ref c1,n1_c1_n2 n1_c1_n2 4 test.t1.n1 1 Using where; Using index
SELECT t1.n1 FROM t1, (SELECT n1, n2 FROM t1 WHERE c1 = 'a' GROUP BY n1) as t
@@ -205,8 +206,8 @@ t2
where t1.id = dt.id and t1.itemid = dt.itemid and t2.id=t1.itemid;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t2 ALL NULL NULL NULL NULL 1
-1 PRIMARY t1 ref idx idx 4 test.t2.id 1
-1 PRIMARY <derived2> ref key0 key0 9 test.t2.id,test.t1.id 2
+1 PRIMARY <derived2> ref key1 key1 4 test.t2.id 2
+1 PRIMARY t1 ALL idx NULL NULL NULL 6 Using where; Using join buffer (flat, BNL join)
2 DERIVED t3 ref idx1,idx2 idx1 4 const 5 Using where; Using index
select t1.id, t1.itemid, dt.id, t2.id
from t1,
@@ -224,8 +225,8 @@ t2
where t1.id = dt.id and t1.itemid = dt.itemid and t2.id=t1.itemid;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t2 ALL NULL NULL NULL NULL 1
-1 PRIMARY t1 ref idx idx 4 test.t2.id 1
-1 PRIMARY <derived2> ref key0 key0 9 test.t2.id,test.t1.id 2
+1 PRIMARY <derived2> ref key1 key1 4 test.t2.id 2
+1 PRIMARY t1 ALL idx NULL NULL NULL 6 Using where; Using join buffer (flat, BNL join)
2 DERIVED t3 ref idx1 idx1 4 const 5 Using where; Using index
select t1.id, t1.itemid, dt.id, t2.id
from t1,
diff --git a/mysql-test/main/derived_split_innodb.test b/mysql-test/main/derived_split_innodb.test
index 22793b448da..bee9ef497b6 100644
--- a/mysql-test/main/derived_split_innodb.test
+++ b/mysql-test/main/derived_split_innodb.test
@@ -1,5 +1,6 @@
--source include/have_innodb.inc
--source include/default_optimizer_switch.inc
+--source include/have_sequence.inc
--echo #
--echo # MDEV-16917: do not use splitting for derived with join cache
@@ -13,6 +14,7 @@ CREATE TABLE t1 (
KEY n1_c1_n2 (n1,c1,n2)
) ENGINE=InnoDB;
INSERT INTO t1 VALUES (0, 2, 'a'), (1, 3, 'a');
+insert into t1 select seq+1,seq+2,'c' from seq_1_to_1000;
ANALYZE TABLE t1;
diff --git a/mysql-test/main/disabled.def b/mysql-test/main/disabled.def
index 8ba5b271c2b..d3366587ee5 100644
--- a/mysql-test/main/disabled.def
+++ b/mysql-test/main/disabled.def
@@ -17,3 +17,6 @@ mysql_embedded : Bug#12561297 2011-05-14 Anitha Dependent on PB2 chang
file_contents : MDEV-6526 these files are not installed anymore
max_statement_time : cannot possibly work, depends on timing
partition_open_files_limit : open_files_limit check broken by MDEV-18360
+partition_innodb : Waiting for fix MDEV-20169
+type_enum : Waiting for fix MDEV-6978
+type_set : Waiting for fix MDEV-6978
diff --git a/mysql-test/main/distinct.result b/mysql-test/main/distinct.result
index 8fcc45e740a..2062ff0091d 100644
--- a/mysql-test/main/distinct.result
+++ b/mysql-test/main/distinct.result
@@ -538,10 +538,10 @@ PRIMARY KEY (a,b));
INSERT INTO t2 VALUES (1,1,1,50), (1,2,3,40), (2,1,3,4);
EXPLAIN SELECT DISTINCT a FROM t2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 index NULL PRIMARY 8 NULL 3 Using index
+1 SIMPLE t2 range NULL PRIMARY 4 NULL 4 Using index for group-by
EXPLAIN SELECT DISTINCT a,a FROM t2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 index NULL PRIMARY 8 NULL 3 Using index
+1 SIMPLE t2 range NULL PRIMARY 4 NULL 4 Using index for group-by
EXPLAIN SELECT DISTINCT b,a FROM t2;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 index NULL PRIMARY 8 NULL 3 Using index
@@ -756,7 +756,7 @@ INSERT INTO t1(a, b, c) VALUES (1, 1, 1),
(1, 2, 3);
EXPLAIN SELECT DISTINCT a, b, d, c FROM t1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index NULL a 16 NULL 6 Using index
+1 SIMPLE t1 range NULL PRIMARY 16 NULL 7 Using index for group-by; Using temporary
SELECT DISTINCT a, b, d, c FROM t1;
a b d c
1 1 0 1
diff --git a/mysql-test/main/drop-no_root.result b/mysql-test/main/drop-no_root.result
deleted file mode 100644
index 3e1f2fe2cf0..00000000000
--- a/mysql-test/main/drop-no_root.result
+++ /dev/null
@@ -1,28 +0,0 @@
-
-# --
-# -- Bug#26704: Failing DROP DATABASE brings mysql-client out of sync.
-# --
-
-DROP DATABASE IF EXISTS mysql_test;
-
-CREATE DATABASE mysql_test;
-CREATE TABLE mysql_test.t1(c INT);
-use mysql_test;
-
-chmod 000 mysql_test/t1.frm
-
-DROP DATABASE mysql_test;
-
-SELECT DATABASE();
-DATABASE()
-mysql_test
-
-rm -f mysql_test/t1.MYD mysql_test/t1.MYI
-chmod 666 mysql_test/t1.frm
-rm -f mysql_test/t1.frm
-
-DROP DATABASE mysql_test;
-
-use test;
-
-# -- End of Bug#26704.
diff --git a/mysql-test/main/drop-no_root.test b/mysql-test/main/drop-no_root.test
deleted file mode 100644
index 8fb5b3f74a8..00000000000
--- a/mysql-test/main/drop-no_root.test
+++ /dev/null
@@ -1,85 +0,0 @@
-# This test uses chmod, can't be run with root permissions
---source include/not_as_root.inc
-
-###########################################################################
-
---echo
---echo # --
---echo # -- Bug#26704: Failing DROP DATABASE brings mysql-client out of sync.
---echo # --
-
---echo
---disable_warnings
-DROP DATABASE IF EXISTS mysql_test;
---enable_warnings
-
---echo
-CREATE DATABASE mysql_test;
-CREATE TABLE mysql_test.t1(c INT);
-
-use mysql_test;
-
-let $MYSQLD_DATADIR= `select @@datadir`;
-
---echo
---echo chmod 000 mysql_test/t1.frm
---chmod 0000 $MYSQLD_DATADIR/mysql_test/t1.frm
-
-# NOTE: For the DROP DATABASE below we need:
-# - disable result log because ER_DB_DROP_RMDIR contains errno, which can be
-# different on different platforms.
-# - expect different error codes, because Windows and UNIX behaves
-# differently (see below).
-#
-# NOTE: Windows and UNIX behaves differently in this test case:
-#
-# - on UNIX when t1.frm is chmoded to 000, it is perfectly deleted
-# by the first DROP DATABASE, but some other files (t1.MYI and t1.MYD) left
-# in the directory. So, we have to explicitly removes them before the
-# second DROP DATABASE.
-#
-# - on Windows when t1.frm is chmoded to 000, it is not deleted by the first
-# DROP DATABASE, but all other files in the database directory are deleted.
-# Thus, we have to change the t1.frm permissions again and delete it
-# explicitly before the second DROP DATABASE.
-#
-# All those differences do not really matter for the idea of this test case:
-# checking that if DROP DATABASE failed, the client is Ok.
-
---echo
---disable_result_log
---error ER_DB_DROP_RMDIR,6
-DROP DATABASE mysql_test;
---enable_result_log
-
---echo
-SELECT DATABASE();
-
-# Remove t1.MYI and t1.MYD. On UNIX it should succeed. On Windows, it fails.
---echo
---echo rm -f mysql_test/t1.MYD mysql_test/t1.MYI
---error 0, 1
---remove_file $MYSQLD_DATADIR/mysql_test/t1.MYD
---error 0, 1
---remove_file $MYSQLD_DATADIR/mysql_test/t1.MYI
-
-# Make t1.frm removable: fail on UNIX, succeed on Windows.
---echo chmod 666 mysql_test/t1.frm
---error 0, 1
---chmod 0666 $MYSQLD_DATADIR/mysql_test/t1.frm
-
-# Remove t1.frm: fail on UNIX, succeed on Windows.
---echo rm -f mysql_test/t1.frm
---error 0, 1
---remove_file $MYSQLD_DATADIR/mysql_test/t1.frm
-
---echo
-DROP DATABASE mysql_test;
-
---echo
-use test;
-
---echo
---echo # -- End of Bug#26704.
-
-###########################################################################
diff --git a/mysql-test/main/drop.result b/mysql-test/main/drop.result
index f55888ad1bd..d50ffabc9fa 100644
--- a/mysql-test/main/drop.result
+++ b/mysql-test/main/drop.result
@@ -131,6 +131,19 @@ create table mysql_test.`#sql-347f_7` (f1 int);
create table mysql_test.`#sql-347f_8` (f1 int);
drop table mysql_test.`#sql-347f_8`;
drop database mysql_test;
+create database mysql_test;
+use mysql_test;
+create table t1(c int);
+drop database mysql_test;
+ERROR HY000: Error dropping database (can't rmdir './mysql_test', errno: 39 "Directory not empty")
+select database();
+database()
+mysql_test
+drop database mysql_test;
+select database();
+database()
+NULL
+use test;
# --
# -- Bug#29958: Weird message on DROP DATABASE if mysql.proc does not
@@ -205,14 +218,10 @@ Warnings:
Note 1051 Unknown table 'test.table1'
DROP TABLE IF EXISTS table1,table2;
Warnings:
-Note 1051 Unknown table 'test.table1'
-Note 1051 Unknown table 'test.table2'
+Note 1051 Unknown table 'test.table1,test.table2'
DROP VIEW IF EXISTS view1,view2,view3,view4;
Warnings:
-Note 4092 Unknown VIEW: 'test.view1'
-Note 4092 Unknown VIEW: 'test.view2'
-Note 4092 Unknown VIEW: 'test.view3'
-Note 4092 Unknown VIEW: 'test.view4'
+Note 4092 Unknown VIEW: 'test.view1,test.view2,test.view3,test.view4'
# Test error message when trigger does not find table
CREATE TABLE table1(a int);
@@ -230,3 +239,20 @@ DROP TABLE table1,table2;
CREATE DATABASE mysqltest;
CREATE TABLE mysqltest.db(id INT);
DROP DATABASE mysqltest;
+#
+# Verify sql_if_exists
+#
+DROP DATABASE mysqltest;
+ERROR HY000: Can't drop database 'mysqltest'; database doesn't exist
+CREATE DATABASE mysqltest;
+drop table mysqltest.does_not_exists;
+ERROR 42S02: Unknown table 'mysqltest.does_not_exists'
+set @@session.sql_if_exists=1;
+drop table mysqltest.does_not_exists;
+Warnings:
+Note 1051 Unknown table 'mysqltest.does_not_exists'
+drop database mysqltest;
+drop database mysqltest;
+Warnings:
+Note 1008 Can't drop database 'mysqltest'; database doesn't exist
+set @@session.sql_if_exists=0;
diff --git a/mysql-test/main/drop.test b/mysql-test/main/drop.test
index fe8d39c0d7e..45ff7f364f4 100644
--- a/mysql-test/main/drop.test
+++ b/mysql-test/main/drop.test
@@ -1,3 +1,5 @@
+--source include/have_innodb.inc
+
call mtr.add_suppression("table or database name 'abc`def'");
# Initialise
@@ -173,6 +175,27 @@ let $MYSQLD_DATADIR= `select @@datadir`;
copy_file $MYSQLD_DATADIR/mysql_test/t1.frm $MYSQLD_DATADIR/mysql_test/#sql-347f_6.frm;
drop database mysql_test;
+#
+# Bug#26704: Failing DROP DATABASE brings mysql-client out of sync.
+#
+
+create database mysql_test;
+use mysql_test;
+create table t1(c int);
+
+write_file $MYSQLD_DATADIR/mysql_test/do_not_delete;
+do_not_delete
+EOF
+
+replace_result $MYSQLD_DATADIR ./ \\ / 66 39 93 39 17 39 247 39 41 39 "File exists" "Directory not empty";
+error ER_DB_DROP_RMDIR;
+drop database mysql_test;
+select database();
+remove_file $MYSQLD_DATADIR/mysql_test/do_not_delete;
+drop database mysql_test;
+select database();
+use test;
+
###########################################################################
--echo
@@ -322,3 +345,17 @@ CREATE DATABASE mysqltest;
CREATE TABLE mysqltest.db(id INT);
DROP DATABASE mysqltest;
+--echo #
+--echo # Verify sql_if_exists
+--echo #
+
+--error ER_DB_DROP_EXISTS
+DROP DATABASE mysqltest;
+CREATE DATABASE mysqltest;
+--error ER_BAD_TABLE_ERROR
+drop table mysqltest.does_not_exists;
+set @@session.sql_if_exists=1;
+drop table mysqltest.does_not_exists;
+drop database mysqltest;
+drop database mysqltest;
+set @@session.sql_if_exists=0;
diff --git a/mysql-test/main/drop_combinations.inc b/mysql-test/main/drop_combinations.inc
new file mode 100644
index 00000000000..f1d8627f04f
--- /dev/null
+++ b/mysql-test/main/drop_combinations.inc
@@ -0,0 +1,24 @@
+#
+# Create all tables, sequences and views needed for drop combinations;
+#
+
+if ($create_option != 'temporary')
+{
+ show tables;
+}
+
+--echo # Generating test tables
+--disable_query_log
+--disable_warnings
+eval create $create_option table if not exists t1 (a int);
+eval create $create_option table if not exists t2 (a int);
+eval create $create_option sequence if not exists s1;
+eval create $create_option sequence if not exists s2;
+if ($create_option != 'temporary')
+{
+ eval create view if not exists v1 as SELECT * from t1;
+ eval create view if not exists v2 as SELECT * from t2;
+}
+
+--enable_warnings
+--enable_query_log
diff --git a/mysql-test/main/drop_combinations.result b/mysql-test/main/drop_combinations.result
new file mode 100644
index 00000000000..a939bcd2b51
--- /dev/null
+++ b/mysql-test/main/drop_combinations.result
@@ -0,0 +1,878 @@
+SET @save_default_engine= @@DEFAULT_STORAGE_ENGINE;
+SET default_storage_engine=myisam;
+show tables;
+Tables_in_test
+# Generating test tables
+#
+# DROP TABLE
+#
+drop table t1,t2,t3;
+ERROR 42S02: Unknown table 'test.t3'
+show warnings;
+Level Code Message
+Error 1051 Unknown table 'test.t3'
+show tables;
+Tables_in_test
+s1
+s2
+v1
+v2
+# Generating test tables
+drop table t1,t3,t2;
+ERROR 42S02: Unknown table 'test.t3'
+show warnings;
+Level Code Message
+Error 1051 Unknown table 'test.t3'
+show tables;
+Tables_in_test
+s1
+s2
+v1
+v2
+# Generating test tables
+drop table t1,t4,t2,t3;
+ERROR 42S02: Unknown table 'test.t4,test.t3'
+show warnings;
+Level Code Message
+Error 1051 Unknown table 'test.t4,test.t3'
+show tables;
+Tables_in_test
+s1
+s2
+v1
+v2
+# Generating test tables
+drop table t1,s1,s2,t2;
+show tables;
+Tables_in_test
+v1
+v2
+# Generating test tables
+drop table t1,v1,v2,t2;
+ERROR 42S02: 'test.v1' is a view
+show warnings;
+Level Code Message
+Error 1965 'test.v1' is a view
+Error 1965 'test.v2' is a view
+show tables;
+Tables_in_test
+s1
+s2
+v1
+v2
+# Generating test tables
+drop table v1,s1,s2,v2,t2;
+ERROR 42S02: 'test.v1' is a view
+show warnings;
+Level Code Message
+Error 1965 'test.v1' is a view
+Error 1965 'test.v2' is a view
+show tables;
+Tables_in_test
+t1
+v1
+v2
+# Generating test tables
+drop table t1,s1,v1,t3,t4;
+ERROR 42S02: 'test.v1' is a view
+show warnings;
+Level Code Message
+Warning 1017 Can't find file: './test/t1.MYI' (errno: 2 "No such file or directory")
+Error 1965 'test.v1' is a view
+Error 1051 Unknown table 'test.t3,test.t4'
+drop table s2,v2,t2,t1;
+ERROR 42S02: 'test.v2' is a view
+show warnings;
+Level Code Message
+Error 1965 'test.v2' is a view
+Error 1051 Unknown table 'test.t1'
+show tables;
+Tables_in_test
+v1
+v2
+# Generating test tables
+drop table s1,v1,s2,v2;
+ERROR 42S02: 'test.v1' is a view
+show warnings;
+Level Code Message
+Error 1965 'test.v1' is a view
+Error 1965 'test.v2' is a view
+show tables;
+Tables_in_test
+t1
+t2
+v1
+v2
+# Generating test tables
+#
+# DROP TABLE with if exists
+#
+drop table if exists t1,t2,t3;
+Warnings:
+Note 1051 Unknown table 'test.t3'
+show tables;
+Tables_in_test
+s1
+s2
+v1
+v2
+# Generating test tables
+drop table if exists t1,t3,t2;
+Warnings:
+Note 1051 Unknown table 'test.t3'
+show tables;
+Tables_in_test
+s1
+s2
+v1
+v2
+# Generating test tables
+drop table if exists t1,t4,t2,t3;
+Warnings:
+Note 1051 Unknown table 'test.t4,test.t3'
+show tables;
+Tables_in_test
+s1
+s2
+v1
+v2
+# Generating test tables
+drop table if exists t1,s1,s2,t2;
+show tables;
+Tables_in_test
+v1
+v2
+# Generating test tables
+drop table if exists t1,v1,v2,t2;
+Warnings:
+Note 1965 'test.v1' is a view
+Note 1965 'test.v2' is a view
+show tables;
+Tables_in_test
+s1
+s2
+v1
+v2
+# Generating test tables
+drop table if exists v1,s1,s2,v2,t2;
+Warnings:
+Note 1965 'test.v1' is a view
+Note 1965 'test.v2' is a view
+show tables;
+Tables_in_test
+t1
+v1
+v2
+# Generating test tables
+drop table if exists t1,s1,v1,t3,t4;
+Warnings:
+Warning 1017 Can't find file: './test/t1.MYI' (errno: 2 "No such file or directory")
+Note 1965 'test.v1' is a view
+Note 1051 Unknown table 'test.t3,test.t4'
+drop table if exists s2,v2,t2,t1;
+Warnings:
+Note 1965 'test.v2' is a view
+Note 1051 Unknown table 'test.t1'
+show tables;
+Tables_in_test
+v1
+v2
+# Generating test tables
+drop table if exists s1,v1,s2,v2;
+Warnings:
+Note 1965 'test.v1' is a view
+Note 1965 'test.v2' is a view
+show tables;
+Tables_in_test
+t1
+t2
+v1
+v2
+# Generating test tables
+#
+# DROP TEMPORARY TABLE
+#
+drop table if exists t1,t2;
+drop temporary table if exists tt1,tt2;
+drop sequence if exists s1,s2;
+drop temporary sequence if exists ss1,ss2;
+drop view if exists v1,v2;
+drop temporary table t1,t2,t3;
+ERROR 42S02: Unknown table 'test.t1,test.t2,test.t3'
+show warnings;
+Level Code Message
+Error 1051 Unknown table 'test.t1,test.t2,test.t3'
+# Generating test tables
+drop temporary table t1,t3,t2;
+ERROR 42S02: Unknown table 'test.t3'
+show warnings;
+Level Code Message
+Error 1051 Unknown table 'test.t3'
+# Generating test tables
+drop temporary table t1,t4,t2,t3;
+ERROR 42S02: Unknown table 'test.t4,test.t3'
+show warnings;
+Level Code Message
+Error 1051 Unknown table 'test.t4,test.t3'
+# Generating test tables
+drop temporary table t1,s1,s2,t2;
+# Generating test tables
+drop temporary table t1,v1,v2,t2;
+ERROR 42S02: Unknown table 'test.v1,test.v2'
+show warnings;
+Level Code Message
+Error 1051 Unknown table 'test.v1,test.v2'
+# Generating test tables
+drop temporary table v1,s1,s2,v2,t2;
+ERROR 42S02: Unknown table 'test.v1,test.v2'
+show warnings;
+Level Code Message
+Error 1051 Unknown table 'test.v1,test.v2'
+# Generating test tables
+drop temporary table t1,s1,v1,t3,t4;
+ERROR 42S02: Unknown table 'test.v1,test.t3,test.t4'
+show warnings;
+Level Code Message
+Error 1051 Unknown table 'test.v1,test.t3,test.t4'
+# Generating test tables
+drop temporary table s2,v2,t2,t1;
+ERROR 42S02: Unknown table 'test.v2'
+show warnings;
+Level Code Message
+Error 1051 Unknown table 'test.v2'
+# Generating test tables
+drop temporary table s1,v1,s2,v2;
+ERROR 42S02: Unknown table 'test.v1,test.v2'
+show warnings;
+Level Code Message
+Error 1051 Unknown table 'test.v1,test.v2'
+# Generating test tables
+#
+# DROP TEMPORARY TABLE with if exists
+#
+drop temporary table if exists t1,t2,t3;
+Warnings:
+Note 1051 Unknown table 'test.t3'
+# Generating test tables
+drop temporary table if exists t1,t3,t2;
+Warnings:
+Note 1051 Unknown table 'test.t3'
+# Generating test tables
+drop temporary table if exists t1,t4,t2,t3;
+Warnings:
+Note 1051 Unknown table 'test.t4,test.t3'
+# Generating test tables
+drop temporary table if exists t1,s1,s2,t2;
+# Generating test tables
+drop temporary table if exists t1,v1,v2,t2;
+Warnings:
+Note 1051 Unknown table 'test.v1,test.v2'
+# Generating test tables
+drop temporary table if exists v1,s1,s2,v2,t2;
+Warnings:
+Note 1051 Unknown table 'test.v1,test.v2'
+# Generating test tables
+drop temporary table if exists t1,s1,v1,t3,t4;
+Warnings:
+Note 1051 Unknown table 'test.v1,test.t3,test.t4'
+drop temporary table if exists s2,v2,t2,t1;
+Warnings:
+Note 1051 Unknown table 'test.v2,test.t1'
+# Generating test tables
+drop temporary table if exists s1,v1,s2,v2;
+Warnings:
+Note 1051 Unknown table 'test.v1,test.v2'
+# Generating test tables
+drop temporary table t1,t2;
+drop temporary sequence s1,s2;
+show tables;
+Tables_in_test
+# Generating test tables
+#
+# DROP SEQUENCE
+#
+drop sequence s1,s2,s3;
+ERROR 42S02: Unknown SEQUENCE: 'test.s3'
+show warnings;
+Level Code Message
+Error 4091 Unknown SEQUENCE: 'test.s3'
+show tables;
+Tables_in_test
+t1
+t2
+v1
+v2
+# Generating test tables
+drop sequence s1,s3,s2;
+ERROR 42S02: Unknown SEQUENCE: 'test.s3'
+show warnings;
+Level Code Message
+Error 4091 Unknown SEQUENCE: 'test.s3'
+show tables;
+Tables_in_test
+t1
+t2
+v1
+v2
+# Generating test tables
+drop sequence s1,s4,s2,s3;
+ERROR 42S02: Unknown SEQUENCE: 'test.s4,test.s3'
+show warnings;
+Level Code Message
+Error 4091 Unknown SEQUENCE: 'test.s4,test.s3'
+show tables;
+Tables_in_test
+t1
+t2
+v1
+v2
+# Generating test tables
+drop sequence s1,t1,t2,s2,s3,s4;
+ERROR 42S02: 'test.t1' is not a SEQUENCE
+show warnings;
+Level Code Message
+Error 4090 'test.t1' is not a SEQUENCE
+Error 4090 'test.t2' is not a SEQUENCE
+Error 4091 Unknown SEQUENCE: 'test.s3,test.s4'
+show tables;
+Tables_in_test
+t1
+t2
+v1
+v2
+# Generating test tables
+drop sequence s1,v1,v2,s2;
+ERROR 42S02: 'test.v1' is a view
+show warnings;
+Level Code Message
+Error 1965 'test.v1' is a view
+Error 1965 'test.v2' is a view
+show tables;
+Tables_in_test
+t1
+t2
+v1
+v2
+# Generating test tables
+drop sequence v1,t1,t2,v2,s2;
+ERROR 42S02: 'test.v1' is a view
+show warnings;
+Level Code Message
+Error 1965 'test.v1' is a view
+Error 4090 'test.t1' is not a SEQUENCE
+Error 4090 'test.t2' is not a SEQUENCE
+Error 1965 'test.v2' is a view
+drop sequence t1,v1,t2,v2,s2;
+ERROR 42S02: 'test.t1' is not a SEQUENCE
+show warnings;
+Level Code Message
+Error 4090 'test.t1' is not a SEQUENCE
+Error 1965 'test.v1' is a view
+Error 4090 'test.t2' is not a SEQUENCE
+Error 1965 'test.v2' is a view
+Error 4091 Unknown SEQUENCE: 'test.s2'
+show tables;
+Tables_in_test
+s1
+t1
+t2
+v1
+v2
+# Generating test tables
+drop sequence s1,t1,v1,t3,s4;
+ERROR 42S02: 'test.t1' is not a SEQUENCE
+show warnings;
+Level Code Message
+Warning 1017 Can't find file: './test/s1.MYI' (errno: 2 "No such file or directory")
+Error 4090 'test.t1' is not a SEQUENCE
+Error 1965 'test.v1' is a view
+Error 4091 Unknown SEQUENCE: 'test.t3,test.s4'
+drop sequence t2,v2,s2,s1;
+ERROR 42S02: 'test.t2' is not a SEQUENCE
+show warnings;
+Level Code Message
+Error 4090 'test.t2' is not a SEQUENCE
+Error 1965 'test.v2' is a view
+Error 4091 Unknown SEQUENCE: 'test.s1'
+show tables;
+Tables_in_test
+t1
+t2
+v1
+v2
+# Generating test tables
+drop sequence t1,v1,t2,v2;
+ERROR 42S02: 'test.t1' is not a SEQUENCE
+show warnings;
+Level Code Message
+Error 4090 'test.t1' is not a SEQUENCE
+Error 1965 'test.v1' is a view
+Error 4090 'test.t2' is not a SEQUENCE
+Error 1965 'test.v2' is a view
+show tables;
+Tables_in_test
+s1
+s2
+t1
+t2
+v1
+v2
+# Generating test tables
+#
+# DROP SEQUENCE with if exists
+#
+drop sequence if exists s1,s2,s3;
+Warnings:
+Note 4091 Unknown SEQUENCE: 'test.s3'
+show tables;
+Tables_in_test
+t1
+t2
+v1
+v2
+# Generating test tables
+drop sequence if exists s1,s3,s2;
+Warnings:
+Note 4091 Unknown SEQUENCE: 'test.s3'
+show tables;
+Tables_in_test
+t1
+t2
+v1
+v2
+# Generating test tables
+drop sequence if exists s1,s4,s2,s3;
+Warnings:
+Note 4091 Unknown SEQUENCE: 'test.s4,test.s3'
+show tables;
+Tables_in_test
+t1
+t2
+v1
+v2
+# Generating test tables
+drop sequence if exists s1,t1,t2,s2;
+Warnings:
+Note 4090 'test.t1' is not a SEQUENCE
+Note 4090 'test.t2' is not a SEQUENCE
+show tables;
+Tables_in_test
+t1
+t2
+v1
+v2
+# Generating test tables
+drop sequence if exists s1,v1,v2,s2;
+Warnings:
+Note 1965 'test.v1' is a view
+Note 1965 'test.v2' is a view
+show tables;
+Tables_in_test
+t1
+t2
+v1
+v2
+# Generating test tables
+drop sequence if exists v1,t1,t2,v2,s2;
+Warnings:
+Note 1965 'test.v1' is a view
+Note 4090 'test.t1' is not a SEQUENCE
+Note 4090 'test.t2' is not a SEQUENCE
+Note 1965 'test.v2' is a view
+show tables;
+Tables_in_test
+s1
+t1
+t2
+v1
+v2
+# Generating test tables
+drop sequence if exists s1,t1,v1,t3,s4;
+Warnings:
+Warning 1017 Can't find file: './test/s1.MYI' (errno: 2 "No such file or directory")
+Note 4090 'test.t1' is not a SEQUENCE
+Note 1965 'test.v1' is a view
+Note 4091 Unknown SEQUENCE: 'test.t3,test.s4'
+drop sequence if exists t2,v2,s2,s1;
+Warnings:
+Note 4090 'test.t2' is not a SEQUENCE
+Note 1965 'test.v2' is a view
+Note 4091 Unknown SEQUENCE: 'test.s1'
+show tables;
+Tables_in_test
+t1
+t2
+v1
+v2
+# Generating test tables
+drop sequence if exists t1,v1,t2,v2;
+Warnings:
+Note 4090 'test.t1' is not a SEQUENCE
+Note 1965 'test.v1' is a view
+Note 4090 'test.t2' is not a SEQUENCE
+Note 1965 'test.v2' is a view
+show tables;
+Tables_in_test
+s1
+s2
+t1
+t2
+v1
+v2
+# Generating test tables
+#
+# DROP TEMPORARY SEQUENCE
+#
+drop table if exists t1,t2;
+drop temporary table if exists tt1,tt2;
+drop sequence if exists s1,s2;
+drop temporary sequence if exists ss1,ss2;
+drop view if exists v1,v2;
+# Generating test tables
+drop temporary sequence s1,s2,s3;
+ERROR 42S02: Unknown SEQUENCE: 'test.s3'
+show warnings;
+Level Code Message
+Error 4091 Unknown SEQUENCE: 'test.s3'
+# Generating test tables
+drop temporary sequence s1,s3,s2;
+ERROR 42S02: Unknown SEQUENCE: 'test.s3'
+show warnings;
+Level Code Message
+Error 4091 Unknown SEQUENCE: 'test.s3'
+# Generating test tables
+drop temporary sequence s1,s4,s2,s3;
+ERROR 42S02: Unknown SEQUENCE: 'test.s4,test.s3'
+show warnings;
+Level Code Message
+Error 4091 Unknown SEQUENCE: 'test.s4,test.s3'
+# Generating test tables
+drop temporary sequence s1,t1,t2,s2;
+ERROR 42S02: Unknown SEQUENCE: 'test.t1,test.t2'
+show warnings;
+Level Code Message
+Error 4091 Unknown SEQUENCE: 'test.t1,test.t2'
+# Generating test tables
+drop temporary sequence s1,v1,v2,s2;
+ERROR 42S02: Unknown SEQUENCE: 'test.v1,test.v2'
+show warnings;
+Level Code Message
+Error 4091 Unknown SEQUENCE: 'test.v1,test.v2'
+# Generating test tables
+drop temporary sequence v1,t1,t2,v2,s2;
+ERROR 42S02: Unknown SEQUENCE: 'test.v1,test.t1,test.t2,test.v2'
+show warnings;
+Level Code Message
+Error 4091 Unknown SEQUENCE: 'test.v1,test.t1,test.t2,test.v2'
+# Generating test tables
+drop temporary sequence s1,t1,v1,t3,s4;
+ERROR 42S02: Unknown SEQUENCE: 'test.t1,test.v1,test.t3,test.s4'
+show warnings;
+Level Code Message
+Error 4091 Unknown SEQUENCE: 'test.t1,test.v1,test.t3,test.s4'
+drop temporary sequence t2,v2,s2,s1;
+ERROR 42S02: Unknown SEQUENCE: 'test.t2,test.v2,test.s1'
+show warnings;
+Level Code Message
+Error 4091 Unknown SEQUENCE: 'test.t2,test.v2,test.s1'
+# Generating test tables
+drop temporary sequence t1,v1,t2,v2;
+ERROR 42S02: Unknown SEQUENCE: 'test.t1,test.v1,test.t2,test.v2'
+show warnings;
+Level Code Message
+Error 4091 Unknown SEQUENCE: 'test.t1,test.v1,test.t2,test.v2'
+# Generating test tables
+#
+# DROP TEMPORARY SEQUENCE with if exists
+#
+drop temporary sequence if exists s1,s2,s3;
+Warnings:
+Note 4091 Unknown SEQUENCE: 'test.s3'
+# Generating test tables
+drop temporary sequence if exists s1,s3,s2;
+Warnings:
+Note 4091 Unknown SEQUENCE: 'test.s3'
+# Generating test tables
+drop temporary sequence if exists s1,s4,s2,s3;
+Warnings:
+Note 4091 Unknown SEQUENCE: 'test.s4,test.s3'
+# Generating test tables
+drop temporary sequence if exists s1,t1,t2,s2;
+Warnings:
+Note 4090 'test.t1' is not a SEQUENCE
+Note 4090 'test.t2' is not a SEQUENCE
+# Generating test tables
+drop temporary sequence if exists s1,v1,v2,s2;
+Warnings:
+Note 4091 Unknown SEQUENCE: 'test.v1,test.v2'
+# Generating test tables
+drop temporary sequence if exists v1,t1,t2,v2,s2;
+Warnings:
+Note 4090 'test.t1' is not a SEQUENCE
+Note 4090 'test.t2' is not a SEQUENCE
+Note 4091 Unknown SEQUENCE: 'test.v1,test.v2'
+# Generating test tables
+drop temporary sequence if exists s1,t1,v1,t3,s4;
+Warnings:
+Note 4090 'test.t1' is not a SEQUENCE
+Note 4091 Unknown SEQUENCE: 'test.v1,test.t3,test.s4'
+drop temporary sequence if exists t2,v2,s2,s1;
+Warnings:
+Note 4090 'test.t2' is not a SEQUENCE
+Note 4091 Unknown SEQUENCE: 'test.v2,test.s1'
+# Generating test tables
+drop temporary sequence if exists t1,v1,t2,v2;
+Warnings:
+Note 4090 'test.t1' is not a SEQUENCE
+Note 4090 'test.t2' is not a SEQUENCE
+Note 4091 Unknown SEQUENCE: 'test.v1,test.v2'
+# Generating test tables
+drop temporary table t1,t2;
+drop temporary sequence s1,s2;
+show tables;
+Tables_in_test
+# Generating test tables
+#
+# DROP VIEW
+#
+drop view v1,v2,v3;
+ERROR 42S02: Unknown VIEW: 'test.v3'
+show warnings;
+Level Code Message
+Error 4092 Unknown VIEW: 'test.v3'
+show tables;
+Tables_in_test
+s1
+s2
+t1
+t2
+# Generating test tables
+drop view v1,v3,v2;
+ERROR 42S02: Unknown VIEW: 'test.v3'
+show warnings;
+Level Code Message
+Error 4092 Unknown VIEW: 'test.v3'
+show tables;
+Tables_in_test
+s1
+s2
+t1
+t2
+# Generating test tables
+drop view v1,v4,v2,v3;
+ERROR 42S02: Unknown VIEW: 'test.v4,test.v3'
+show warnings;
+Level Code Message
+Error 4092 Unknown VIEW: 'test.v4,test.v3'
+show tables;
+Tables_in_test
+s1
+s2
+t1
+t2
+# Generating test tables
+drop view v1,t1,t2,v2;
+ERROR 42S02: Unknown VIEW: 'test.t1,test.t2'
+show warnings;
+Level Code Message
+Warning 1347 'test.t1' is not of type 'VIEW'
+Warning 1347 'test.t2' is not of type 'VIEW'
+Error 4092 Unknown VIEW: 'test.t1,test.t2'
+show tables;
+Tables_in_test
+s1
+s2
+t1
+t2
+# Generating test tables
+drop view v1,s1,s2,v2;
+ERROR 42S02: Unknown VIEW: 'test.s1,test.s2'
+show warnings;
+Level Code Message
+Warning 1347 'test.s1' is not of type 'VIEW'
+Warning 1347 'test.s2' is not of type 'VIEW'
+Error 4092 Unknown VIEW: 'test.s1,test.s2'
+show tables;
+Tables_in_test
+s1
+s2
+t1
+t2
+# Generating test tables
+drop view s1,t1,t2,s2,v2;
+ERROR 42S02: Unknown VIEW: 'test.s1,test.t1,test.t2,test.s2'
+show warnings;
+Level Code Message
+Warning 1347 'test.s1' is not of type 'VIEW'
+Warning 1347 'test.t1' is not of type 'VIEW'
+Warning 1347 'test.t2' is not of type 'VIEW'
+Warning 1347 'test.s2' is not of type 'VIEW'
+Error 4092 Unknown VIEW: 'test.s1,test.t1,test.t2,test.s2'
+drop table t1;
+Warnings:
+Warning 1017 Can't find file: './test/t1.MYI' (errno: 2 "No such file or directory")
+show warnings;
+Level Code Message
+Warning 1017 Can't find file: './test/t1.MYI' (errno: 2 "No such file or directory")
+drop view v1,t1;
+ERROR 42S02: Unknown VIEW: 'test.t1'
+show warnings;
+Level Code Message
+Error 4092 Unknown VIEW: 'test.t1'
+show tables;
+Tables_in_test
+s1
+s2
+t2
+# Generating test tables
+drop view v1,t1,s1,t3,v4;
+ERROR 42S02: Unknown VIEW: 'test.t1,test.s1,test.t3,test.v4'
+show warnings;
+Level Code Message
+Warning 1347 'test.t1' is not of type 'VIEW'
+Warning 1347 'test.s1' is not of type 'VIEW'
+Error 4092 Unknown VIEW: 'test.t1,test.s1,test.t3,test.v4'
+drop view t2,s2,v2,v1;
+ERROR 42S02: Unknown VIEW: 'test.t2,test.s2,test.v1'
+show warnings;
+Level Code Message
+Warning 1347 'test.t2' is not of type 'VIEW'
+Warning 1347 'test.s2' is not of type 'VIEW'
+Error 4092 Unknown VIEW: 'test.t2,test.s2,test.v1'
+show tables;
+Tables_in_test
+s1
+s2
+t1
+t2
+# Generating test tables
+drop view t1,s1,t2,s2;
+ERROR 42S02: Unknown VIEW: 'test.t1,test.s1,test.t2,test.s2'
+show warnings;
+Level Code Message
+Warning 1347 'test.t1' is not of type 'VIEW'
+Warning 1347 'test.s1' is not of type 'VIEW'
+Warning 1347 'test.t2' is not of type 'VIEW'
+Warning 1347 'test.s2' is not of type 'VIEW'
+Error 4092 Unknown VIEW: 'test.t1,test.s1,test.t2,test.s2'
+show tables;
+Tables_in_test
+s1
+s2
+t1
+t2
+v1
+v2
+# Generating test tables
+#
+# DROP VIEW with if exists
+#
+drop view if exists v1,v2,v3;
+Warnings:
+Note 4092 Unknown VIEW: 'test.v3'
+show tables;
+Tables_in_test
+s1
+s2
+t1
+t2
+# Generating test tables
+drop view if exists v1,v3,v2;
+Warnings:
+Note 4092 Unknown VIEW: 'test.v3'
+show tables;
+Tables_in_test
+s1
+s2
+t1
+t2
+# Generating test tables
+drop view if exists v1,v4,v2,v3;
+Warnings:
+Note 4092 Unknown VIEW: 'test.v4,test.v3'
+show tables;
+Tables_in_test
+s1
+s2
+t1
+t2
+# Generating test tables
+drop view if exists v1,t1,t2,v2;
+Warnings:
+Warning 1347 'test.t1' is not of type 'VIEW'
+Warning 1347 'test.t2' is not of type 'VIEW'
+Note 4092 Unknown VIEW: 'test.t1,test.t2'
+show tables;
+Tables_in_test
+s1
+s2
+t1
+t2
+# Generating test tables
+drop view if exists v1,s1,s2,v2;
+Warnings:
+Warning 1347 'test.s1' is not of type 'VIEW'
+Warning 1347 'test.s2' is not of type 'VIEW'
+Note 4092 Unknown VIEW: 'test.s1,test.s2'
+show tables;
+Tables_in_test
+s1
+s2
+t1
+t2
+# Generating test tables
+drop view if exists s1,t1,t2,s2,v2;
+Warnings:
+Warning 1347 'test.s1' is not of type 'VIEW'
+Warning 1347 'test.t1' is not of type 'VIEW'
+Warning 1347 'test.t2' is not of type 'VIEW'
+Warning 1347 'test.s2' is not of type 'VIEW'
+Note 4092 Unknown VIEW: 'test.s1,test.t1,test.t2,test.s2'
+drop table t1;
+drop view if exists v1,t1;
+Warnings:
+Note 4092 Unknown VIEW: 'test.t1'
+show tables;
+Tables_in_test
+s1
+s2
+t2
+# Generating test tables
+drop view if exists v1,t1,s1,t3,v4;
+Warnings:
+Warning 1347 'test.t1' is not of type 'VIEW'
+Warning 1347 'test.s1' is not of type 'VIEW'
+Note 4092 Unknown VIEW: 'test.t1,test.s1,test.t3,test.v4'
+drop view if exists t2,s2,v2,v1;
+Warnings:
+Warning 1347 'test.t2' is not of type 'VIEW'
+Warning 1347 'test.s2' is not of type 'VIEW'
+Note 4092 Unknown VIEW: 'test.t2,test.s2,test.v1'
+show tables;
+Tables_in_test
+s1
+s2
+t1
+t2
+# Generating test tables
+drop view if exists t1,s1,t2,s2;
+Warnings:
+Warning 1347 'test.t1' is not of type 'VIEW'
+Warning 1347 'test.s1' is not of type 'VIEW'
+Warning 1347 'test.t2' is not of type 'VIEW'
+Warning 1347 'test.s2' is not of type 'VIEW'
+Note 4092 Unknown VIEW: 'test.t1,test.s1,test.t2,test.s2'
+show tables;
+Tables_in_test
+s1
+s2
+t1
+t2
+v1
+v2
+# Generating test tables
+# cleanup
+drop table if exists t1,t2;
+drop sequence if exists s1,s2;
+drop view if exists v1,v2;
+SET default_storage_engine=@save_default_engine;
diff --git a/mysql-test/main/drop_combinations.test b/mysql-test/main/drop_combinations.test
new file mode 100644
index 00000000000..8b3ad43793b
--- /dev/null
+++ b/mysql-test/main/drop_combinations.test
@@ -0,0 +1,425 @@
+#
+# Test different combinations of doing DROP TABLE/SEQUENCE/VIEW
+#
+
+SET @save_default_engine= @@DEFAULT_STORAGE_ENGINE;
+SET default_storage_engine=myisam;
+let $DATADIR= `select @@datadir`;
+
+# Create tables t1,t2, sequences s1,s2 and views v1,v2
+let $create_option=;
+--source drop_combinations.inc
+
+--echo #
+--echo # DROP TABLE
+--echo #
+
+--error ER_BAD_TABLE_ERROR
+drop table t1,t2,t3;
+--replace_result $DATADIR ./
+show warnings;
+--source drop_combinations.inc
+--error ER_BAD_TABLE_ERROR
+drop table t1,t3,t2;
+--replace_result $DATADIR ./
+show warnings;
+--source drop_combinations.inc
+--error ER_BAD_TABLE_ERROR
+drop table t1,t4,t2,t3;
+--replace_result $DATADIR ./
+show warnings;
+--source drop_combinations.inc
+drop table t1,s1,s2,t2;
+--source drop_combinations.inc
+--error ER_IT_IS_A_VIEW
+drop table t1,v1,v2,t2;
+--replace_result $DATADIR ./
+show warnings;
+--source drop_combinations.inc
+--error ER_IT_IS_A_VIEW
+drop table v1,s1,s2,v2,t2;
+--replace_result $DATADIR ./
+show warnings;
+--source drop_combinations.inc
+--remove_file $DATADIR/test/t1.MYD
+--replace_result $DATADIR ./
+--error ER_IT_IS_A_VIEW
+drop table t1,s1,v1,t3,t4;
+--replace_result $DATADIR ./
+show warnings;
+--error ER_IT_IS_A_VIEW
+drop table s2,v2,t2,t1;
+--replace_result $DATADIR ./
+show warnings;
+--source drop_combinations.inc
+--replace_result $DATADIR ./
+--error ER_IT_IS_A_VIEW
+drop table s1,v1,s2,v2;
+--replace_result $DATADIR ./
+show warnings;
+--source drop_combinations.inc
+
+--echo #
+--echo # DROP TABLE with if exists
+--echo #
+
+drop table if exists t1,t2,t3;
+--source drop_combinations.inc
+drop table if exists t1,t3,t2;
+--source drop_combinations.inc
+drop table if exists t1,t4,t2,t3;
+--source drop_combinations.inc
+drop table if exists t1,s1,s2,t2;
+--source drop_combinations.inc
+drop table if exists t1,v1,v2,t2;
+--source drop_combinations.inc
+drop table if exists v1,s1,s2,v2,t2;
+--source drop_combinations.inc
+--remove_file $DATADIR/test/t1.MYD
+--replace_result \\ /
+--replace_result $DATADIR ./
+drop table if exists t1,s1,v1,t3,t4;
+drop table if exists s2,v2,t2,t1;
+--source drop_combinations.inc
+--replace_result $DATADIR ./
+drop table if exists s1,v1,s2,v2;
+--source drop_combinations.inc
+
+--echo #
+--echo # DROP TEMPORARY TABLE
+--echo #
+
+--disable_warnings
+drop table if exists t1,t2;
+drop temporary table if exists tt1,tt2;
+drop sequence if exists s1,s2;
+drop temporary sequence if exists ss1,ss2;
+drop view if exists v1,v2;
+--enable_warnings
+let $create_option=temporary;
+
+--error ER_BAD_TABLE_ERROR
+drop temporary table t1,t2,t3;
+--replace_result $DATADIR ./
+show warnings;
+--source drop_combinations.inc
+--error ER_BAD_TABLE_ERROR
+drop temporary table t1,t3,t2;
+--replace_result $DATADIR ./
+show warnings;
+--source drop_combinations.inc
+--error ER_BAD_TABLE_ERROR
+drop temporary table t1,t4,t2,t3;
+--replace_result $DATADIR ./
+show warnings;
+--source drop_combinations.inc
+drop temporary table t1,s1,s2,t2;
+--source drop_combinations.inc
+--error ER_BAD_TABLE_ERROR
+drop temporary table t1,v1,v2,t2;
+--replace_result $DATADIR ./
+show warnings;
+--source drop_combinations.inc
+--error ER_BAD_TABLE_ERROR
+drop temporary table v1,s1,s2,v2,t2;
+--replace_result $DATADIR ./
+show warnings;
+--source drop_combinations.inc
+--error ER_BAD_TABLE_ERROR
+drop temporary table t1,s1,v1,t3,t4;
+--replace_result $DATADIR ./
+show warnings;
+--source drop_combinations.inc
+--error ER_BAD_TABLE_ERROR
+drop temporary table s2,v2,t2,t1;
+--replace_result $DATADIR ./
+show warnings;
+--source drop_combinations.inc
+--error ER_BAD_TABLE_ERROR
+drop temporary table s1,v1,s2,v2;
+--replace_result $DATADIR ./
+show warnings;
+--source drop_combinations.inc
+
+--echo #
+--echo # DROP TEMPORARY TABLE with if exists
+--echo #
+
+drop temporary table if exists t1,t2,t3;
+--source drop_combinations.inc
+drop temporary table if exists t1,t3,t2;
+--source drop_combinations.inc
+drop temporary table if exists t1,t4,t2,t3;
+--source drop_combinations.inc
+drop temporary table if exists t1,s1,s2,t2;
+--source drop_combinations.inc
+drop temporary table if exists t1,v1,v2,t2;
+--source drop_combinations.inc
+drop temporary table if exists v1,s1,s2,v2,t2;
+--source drop_combinations.inc
+drop temporary table if exists t1,s1,v1,t3,t4;
+drop temporary table if exists s2,v2,t2,t1;
+--source drop_combinations.inc
+drop temporary table if exists s1,v1,s2,v2;
+--source drop_combinations.inc
+
+let $create_option=;
+drop temporary table t1,t2;
+drop temporary sequence s1,s2;
+--source drop_combinations.inc
+
+--echo #
+--echo # DROP SEQUENCE
+--echo #
+
+--error ER_UNKNOWN_SEQUENCES
+drop sequence s1,s2,s3;
+--replace_result $DATADIR ./
+show warnings;
+--source drop_combinations.inc
+--error ER_UNKNOWN_SEQUENCES
+drop sequence s1,s3,s2;
+--replace_result $DATADIR ./
+show warnings;
+--source drop_combinations.inc
+--error ER_UNKNOWN_SEQUENCES
+drop sequence s1,s4,s2,s3;
+--replace_result $DATADIR ./
+show warnings;
+--source drop_combinations.inc
+--error ER_NOT_SEQUENCE2
+drop sequence s1,t1,t2,s2,s3,s4;
+--replace_result $DATADIR ./
+show warnings;
+--source drop_combinations.inc
+--error ER_IT_IS_A_VIEW
+drop sequence s1,v1,v2,s2;
+--replace_result $DATADIR ./
+show warnings;
+--source drop_combinations.inc
+--error ER_IT_IS_A_VIEW
+drop sequence v1,t1,t2,v2,s2;
+--replace_result $DATADIR ./
+show warnings;
+--error ER_NOT_SEQUENCE2
+drop sequence t1,v1,t2,v2,s2;
+--replace_result $DATADIR ./
+show warnings;
+--source drop_combinations.inc
+--remove_file $DATADIR/test/s1.MYD
+--replace_result \\ /
+--error ER_NOT_SEQUENCE2
+drop sequence s1,t1,v1,t3,s4;
+--replace_result $DATADIR ./
+show warnings;
+--error ER_NOT_SEQUENCE2
+drop sequence t2,v2,s2,s1;
+--replace_result $DATADIR ./
+show warnings;
+--source drop_combinations.inc
+--error ER_NOT_SEQUENCE2
+drop sequence t1,v1,t2,v2;
+--replace_result $DATADIR ./
+show warnings;
+--source drop_combinations.inc
+
+--echo #
+--echo # DROP SEQUENCE with if exists
+--echo #
+
+drop sequence if exists s1,s2,s3;
+--source drop_combinations.inc
+drop sequence if exists s1,s3,s2;
+--source drop_combinations.inc
+drop sequence if exists s1,s4,s2,s3;
+--source drop_combinations.inc
+drop sequence if exists s1,t1,t2,s2;
+--source drop_combinations.inc
+drop sequence if exists s1,v1,v2,s2;
+--source drop_combinations.inc
+drop sequence if exists v1,t1,t2,v2,s2;
+--source drop_combinations.inc
+--remove_file $DATADIR/test/s1.MYD
+--replace_result \\ /
+--replace_result $DATADIR ./
+drop sequence if exists s1,t1,v1,t3,s4;
+drop sequence if exists t2,v2,s2,s1;
+--source drop_combinations.inc
+drop sequence if exists t1,v1,t2,v2;
+--source drop_combinations.inc
+
+--echo #
+--echo # DROP TEMPORARY SEQUENCE
+--echo #
+
+--disable_warnings
+drop table if exists t1,t2;
+drop temporary table if exists tt1,tt2;
+drop sequence if exists s1,s2;
+drop temporary sequence if exists ss1,ss2;
+drop view if exists v1,v2;
+--enable_warnings
+let $create_option=temporary;
+--source drop_combinations.inc
+
+--error ER_UNKNOWN_SEQUENCES
+drop temporary sequence s1,s2,s3;
+--replace_result $DATADIR ./
+show warnings;
+--source drop_combinations.inc
+--error ER_UNKNOWN_SEQUENCES
+drop temporary sequence s1,s3,s2;
+--replace_result $DATADIR ./
+show warnings;
+--source drop_combinations.inc
+--error ER_UNKNOWN_SEQUENCES
+drop temporary sequence s1,s4,s2,s3;
+--replace_result $DATADIR ./
+show warnings;
+--source drop_combinations.inc
+--error ER_UNKNOWN_SEQUENCES
+drop temporary sequence s1,t1,t2,s2;
+--replace_result $DATADIR ./
+show warnings;
+--source drop_combinations.inc
+--error ER_UNKNOWN_SEQUENCES
+drop temporary sequence s1,v1,v2,s2;
+--replace_result $DATADIR ./
+show warnings;
+--source drop_combinations.inc
+--error ER_UNKNOWN_SEQUENCES
+drop temporary sequence v1,t1,t2,v2,s2;
+--replace_result $DATADIR ./
+show warnings;
+--source drop_combinations.inc
+--error ER_UNKNOWN_SEQUENCES
+drop temporary sequence s1,t1,v1,t3,s4;
+--replace_result $DATADIR ./
+show warnings;
+--error ER_UNKNOWN_SEQUENCES
+drop temporary sequence t2,v2,s2,s1;
+--replace_result $DATADIR ./
+show warnings;
+--source drop_combinations.inc
+--error ER_UNKNOWN_SEQUENCES
+drop temporary sequence t1,v1,t2,v2;
+--replace_result $DATADIR ./
+show warnings;
+--source drop_combinations.inc
+
+--echo #
+--echo # DROP TEMPORARY SEQUENCE with if exists
+--echo #
+
+drop temporary sequence if exists s1,s2,s3;
+--source drop_combinations.inc
+drop temporary sequence if exists s1,s3,s2;
+--source drop_combinations.inc
+drop temporary sequence if exists s1,s4,s2,s3;
+--source drop_combinations.inc
+drop temporary sequence if exists s1,t1,t2,s2;
+--source drop_combinations.inc
+drop temporary sequence if exists s1,v1,v2,s2;
+--source drop_combinations.inc
+drop temporary sequence if exists v1,t1,t2,v2,s2;
+--source drop_combinations.inc
+drop temporary sequence if exists s1,t1,v1,t3,s4;
+drop temporary sequence if exists t2,v2,s2,s1;
+--source drop_combinations.inc
+drop temporary sequence if exists t1,v1,t2,v2;
+--source drop_combinations.inc
+
+let $create_option=;
+drop temporary table t1,t2;
+drop temporary sequence s1,s2;
+--source drop_combinations.inc
+
+--echo #
+--echo # DROP VIEW
+--echo #
+
+--error ER_UNKNOWN_VIEW
+drop view v1,v2,v3;
+--replace_result $DATADIR ./
+show warnings;
+--source drop_combinations.inc
+--error ER_UNKNOWN_VIEW
+drop view v1,v3,v2;
+--replace_result $DATADIR ./
+show warnings;
+--source drop_combinations.inc
+--error ER_UNKNOWN_VIEW
+drop view v1,v4,v2,v3;
+--replace_result $DATADIR ./
+show warnings;
+--source drop_combinations.inc
+--error ER_UNKNOWN_VIEW
+drop view v1,t1,t2,v2;
+--replace_result $DATADIR ./
+show warnings;
+--source drop_combinations.inc
+--error ER_UNKNOWN_VIEW
+drop view v1,s1,s2,v2;
+--replace_result $DATADIR ./
+show warnings;
+--source drop_combinations.inc
+--remove_file $DATADIR/test/t1.MYD
+--replace_result \\ /
+--error ER_UNKNOWN_VIEW
+drop view s1,t1,t2,s2,v2;
+--replace_result $DATADIR ./
+show warnings;
+--replace_result $DATADIR ./
+drop table t1;
+--replace_result $DATADIR ./
+show warnings;
+--error ER_UNKNOWN_VIEW
+drop view v1,t1;
+--replace_result $DATADIR ./
+show warnings;
+--source drop_combinations.inc
+--error ER_UNKNOWN_VIEW
+drop view v1,t1,s1,t3,v4;
+--replace_result $DATADIR ./
+show warnings;
+--error ER_UNKNOWN_VIEW
+drop view t2,s2,v2,v1;
+--replace_result $DATADIR ./
+show warnings;
+--source drop_combinations.inc
+--error ER_UNKNOWN_VIEW
+drop view t1,s1,t2,s2;
+--replace_result $DATADIR ./
+show warnings;
+--source drop_combinations.inc
+
+--echo #
+--echo # DROP VIEW with if exists
+--echo #
+
+drop view if exists v1,v2,v3;
+--source drop_combinations.inc
+drop view if exists v1,v3,v2;
+--source drop_combinations.inc
+drop view if exists v1,v4,v2,v3;
+--source drop_combinations.inc
+drop view if exists v1,t1,t2,v2;
+--source drop_combinations.inc
+drop view if exists v1,s1,s2,v2;
+--source drop_combinations.inc
+drop view if exists s1,t1,t2,s2,v2;
+drop table t1;
+drop view if exists v1,t1;
+--source drop_combinations.inc
+drop view if exists v1,t1,s1,t3,v4;
+drop view if exists t2,s2,v2,v1;
+--source drop_combinations.inc
+drop view if exists t1,s1,t2,s2;
+--source drop_combinations.inc
+
+--echo # cleanup
+drop table if exists t1,t2;
+drop sequence if exists s1,s2;
+drop view if exists v1,v2;
+
+SET default_storage_engine=@save_default_engine;
diff --git a/mysql-test/main/drop_table_force.result b/mysql-test/main/drop_table_force.result
new file mode 100644
index 00000000000..622589eb3b9
--- /dev/null
+++ b/mysql-test/main/drop_table_force.result
@@ -0,0 +1,131 @@
+CALL mtr.add_suppression("Operating system error number");
+CALL mtr.add_suppression("The error means the system cannot");
+CALL mtr.add_suppression("returned OS error 71");
+#Test1: table with missing .ibd can be dropped directly
+create table t1(a int)engine=innodb;
+drop table t1;
+db.opt
+# Test droping table without frm without super privilege
+create table t1(a int) engine=innodb;
+create user test identified by '123456';
+grant all privileges on test.t1 to 'test'@'%'identified by '123456';
+connect con_test, localhost, test,'123456', ;
+connection con_test;
+drop table t1;
+drop table t1;
+ERROR 42S02: Unknown table 'test.t1'
+connection default;
+disconnect con_test;
+drop user test;
+db.opt
+#Test5: drop table with triger, and with missing frm
+create table t1(a int)engine=innodb;
+create trigger t1_trg before insert on t1 for each row begin end;
+drop table t1;
+drop table t1;
+ERROR 42S02: Unknown table 'test.t1'
+db.opt
+#Test6: table with foreign key references can not be dropped
+CREATE TABLE parent (id INT NOT NULL, PRIMARY KEY (id)) ENGINE=INNODB;
+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;
+drop table parent;
+ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails
+drop table child;
+drop table parent;
+db.opt
+#Test7: drop table twice
+create table t1(a int)engine=innodb;
+drop table t1;
+db.opt
+drop table if exists t1;
+Warnings:
+Note 1051 Unknown table 'test.t1'
+db.opt
+#Test9: check compatibility with restrict/cascade
+CREATE TABLE parent (id INT NOT NULL, PRIMARY KEY (id)) ENGINE=INNODB;
+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;
+drop table parent;
+ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails
+drop table parent restrict;
+ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails
+drop table parent cascade;
+ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails
+drop table parent;
+ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails
+drop table parent restrict;
+ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails
+drop table parent cascade;
+ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails
+drop table child;
+drop table parent;
+#Test10: drop non-innodb engine table returns ok
+create table t1(a int) engine=myisam;
+drop table t1;
+create table t1(a int) engine=myisam;
+drop table t1;
+Warnings:
+Warning 1017 Can't find file: './test/t1.MYI' (errno: 2 "No such file or directory")
+create table t1(a int) engine=myisam;
+drop table t1;
+Warnings:
+Warning 1017 Can't find file: './test/t1.MYI' (errno: 2 "No such file or directory")
+db.opt
+create table t1(a int) engine=aria;
+db.opt
+t1.MAI
+drop table t1;
+ERROR 42S02: Unknown table 'test.t1'
+show warnings;
+Level Code Message
+Error 29 File './test/t1.MAD' not found (Errcode: 2 "No such file or directory")
+Error 1051 Unknown table 'test.t1'
+db.opt
+create table t2(a int) engine=aria;
+flush tables;
+db.opt
+t2.MAD
+drop table t2;
+ERROR 42S02: Unknown table 'test.t2'
+show warnings;
+Level Code Message
+Error 1051 Unknown table 'test.t2'
+db.opt
+create table t2(a int) engine=aria;
+flush tables;
+db.opt
+t2.frm
+drop table t2;
+Warnings:
+Warning 1017 Can't find file: './test/t2.MAI' (errno: 2 "No such file or directory")
+create table t2(a int not null) engine=CSV;
+flush tables;
+drop table t2;
+db.opt
+create table t2(a int not null) engine=CSV;
+flush tables;
+drop table t2;
+db.opt
+create table t2(a int not null) engine=archive;
+flush tables;
+select * from t2;
+a
+flush tables;
+select * from t2;
+ERROR 42S02: Table 'test.t2' doesn't exist
+db.opt
+drop table t2;
+ERROR 42S02: Unknown table 'test.t2'
+create table t2(a int not null) engine=archive;
+flush tables;
+drop table t2;
+ERROR 42S02: Unknown table 'test.t2'
+db.opt
+#
+# MDEV-23549 CREATE fails after DROP without FRM
+#
+create table t1 (a int);
+select * from t1;
+a
+drop table t1;
+create table t1 (a int);
+drop table t1;
diff --git a/mysql-test/main/drop_table_force.test b/mysql-test/main/drop_table_force.test
new file mode 100644
index 00000000000..f3073e3b67d
--- /dev/null
+++ b/mysql-test/main/drop_table_force.test
@@ -0,0 +1,226 @@
+--source include/have_log_bin.inc
+--source include/have_innodb.inc
+--source include/have_archive.inc
+#
+# This test is based on the orginal test from Tencent for DROP TABLE ... FORCE
+# In MariaDB we did reuse the code but MariaDB does not require the FORCE
+# keyword to drop a table even if the .frm file or some engine files are
+# missing.
+# To make it easy to see the differences between the orginal code and
+# the new one, we have left some references to the original test case
+#
+
+CALL mtr.add_suppression("Operating system error number");
+CALL mtr.add_suppression("The error means the system cannot");
+CALL mtr.add_suppression("returned OS error 71");
+
+let $DATADIR= `select @@datadir`;
+
+--echo #Test1: table with missing .ibd can be dropped directly
+# drop table without ibd
+create table t1(a int)engine=innodb;
+--remove_file $DATADIR/test/t1.ibd
+drop table t1;
+--list_files $DATADIR/test/
+
+# Original DROP TABLE .. FORCE required SUPER privilege. MariaDB doesn't
+--echo # Test droping table without frm without super privilege
+
+# create table t1 and rm frm
+create table t1(a int) engine=innodb;
+--remove_file $DATADIR/test/t1.frm
+
+# create test user
+create user test identified by '123456';
+grant all privileges on test.t1 to 'test'@'%'identified by '123456';
+
+# connect as test
+connect (con_test, localhost, test,'123456', );
+--connection con_test
+
+# drop table with user test
+drop table t1;
+--error ER_BAD_TABLE_ERROR
+drop table t1;
+
+# connect as root
+--connection default
+
+--disconnect con_test
+drop user test;
+
+# check files in datadir about t1
+--list_files $DATADIR/test/
+
+--echo #Test5: drop table with triger, and with missing frm
+# create table t1 with triger and rm frm
+create table t1(a int)engine=innodb;
+create trigger t1_trg before insert on t1 for each row begin end;
+
+let $DATADIR= `select @@datadir`;
+--remove_file $DATADIR/test/t1.frm
+
+drop table t1;
+--error ER_BAD_TABLE_ERROR
+drop table t1;
+
+# check files in datadir about t1
+--list_files $DATADIR/test/
+
+--echo #Test6: table with foreign key references can not be dropped
+# create table with foreign key reference and rm frm
+CREATE TABLE parent (id INT NOT NULL, PRIMARY KEY (id)) ENGINE=INNODB;
+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;
+--remove_file $DATADIR/test/parent.frm
+
+# parent can not be dropped when there are foreign key references
+--error ER_ROW_IS_REFERENCED_2
+drop table parent;
+
+# parent can be dropped when there are no foreign key references
+drop table child;
+drop table parent;
+
+# check files in datadir about child and parent
+--list_files $DATADIR/test/
+
+--echo #Test7: drop table twice
+create table t1(a int)engine=innodb;
+--remove_file $DATADIR/test/t1.frm
+
+# first drop table will success
+drop table t1;
+
+# check files in datadir about t1
+--list_files $DATADIR/test/
+
+# second drop with if exists will also ok
+drop table if exists t1;
+
+# check files in datadir about t1
+--list_files $DATADIR/test/
+
+--echo #Test9: check compatibility with restrict/cascade
+# create table with foreign key reference and rm frm
+CREATE TABLE parent (id INT NOT NULL, PRIMARY KEY (id)) ENGINE=INNODB;
+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;
+
+# parent can not be dropped when there are foreign key references
+--error ER_ROW_IS_REFERENCED_2
+drop table parent;
+--error ER_ROW_IS_REFERENCED_2
+drop table parent restrict;
+--error ER_ROW_IS_REFERENCED_2
+drop table parent cascade;
+--error ER_ROW_IS_REFERENCED_2
+drop table parent;
+--error ER_ROW_IS_REFERENCED_2
+drop table parent restrict;
+--error ER_ROW_IS_REFERENCED_2
+drop table parent cascade;
+
+# parent can be dropped when there are no foreign key references
+drop table child;
+drop table parent;
+
+--echo #Test10: drop non-innodb engine table returns ok
+# create myisam table t1 and rm .frm
+create table t1(a int) engine=myisam;
+--remove_file $DATADIR/test/t1.frm
+--replace_result \\ /
+drop table t1;
+
+# create myisam table t1 and rm .MYD
+create table t1(a int) engine=myisam;
+--remove_file $DATADIR/test/t1.MYD
+--replace_result \\ /
+drop table t1;
+
+# create myisam table t1 and rm .MYI
+create table t1(a int) engine=myisam;
+--remove_file $DATADIR/test/t1.MYI
+--replace_result \\ /
+drop table t1;
+--list_files $DATADIR/test/
+
+# create Aria table t1 and rm .frm and .MAD
+create table t1(a int) engine=aria;
+--remove_file $DATADIR/test/t1.frm
+--remove_file $DATADIR/test/t1.MAD
+--list_files $DATADIR/test/
+--error ER_BAD_TABLE_ERROR
+drop table t1;
+--replace_result \\ /
+show warnings;
+--list_files $DATADIR/test/
+
+# create Aria table t2 and rm .frm and .MAI
+create table t2(a int) engine=aria;
+flush tables;
+--remove_file $DATADIR/test/t2.frm
+--remove_file $DATADIR/test/t2.MAI
+--list_files $DATADIR/test/
+--error ER_BAD_TABLE_ERROR
+drop table t2;
+--replace_result \\ /
+show warnings;
+--list_files $DATADIR/test/
+
+# create Aria table t2 and rm .MAI and .MAD
+create table t2(a int) engine=aria;
+flush tables;
+--remove_file $DATADIR/test/t2.MAD
+--remove_file $DATADIR/test/t2.MAI
+--list_files $DATADIR/test/
+--replace_result \\ /
+drop table t2;
+
+# create CVS table t2 and rm .frm
+create table t2(a int not null) engine=CSV;
+flush tables;
+--remove_file $DATADIR/test/t2.frm
+drop table t2;
+--list_files $DATADIR/test/
+
+# create CVS table t2 and rm .frm
+create table t2(a int not null) engine=CSV;
+flush tables;
+--remove_file $DATADIR/test/t2.CSV
+drop table t2;
+--list_files $DATADIR/test/
+
+# create Archive table t2 and rm
+# Note that as Archive has discovery, removing the
+# ARZ will automatically remove the .frm
+
+create table t2(a int not null) engine=archive;
+flush tables;
+--error 1
+--remove_file $DATADIR/test/t2.frm
+select * from t2;
+flush tables;
+--remove_file $DATADIR/test/t2.ARZ
+--error ER_NO_SUCH_TABLE
+select * from t2;
+--list_files $DATADIR/test/
+--replace_result \\ /
+--error ER_BAD_TABLE_ERROR
+drop table t2;
+
+create table t2(a int not null) engine=archive;
+flush tables;
+--remove_file $DATADIR/test/t2.ARZ
+--error ER_BAD_TABLE_ERROR
+drop table t2;
+--list_files $DATADIR/test/
+
+--echo #
+--echo # MDEV-23549 CREATE fails after DROP without FRM
+--echo #
+create table t1 (a int);
+select * from t1;
+--remove_file $datadir/test/t1.frm
+
+drop table t1;
+create table t1 (a int);
+drop table t1;
diff --git a/mysql-test/main/events_bugs.result b/mysql-test/main/events_bugs.result
index 666361188b9..e3984bcd67a 100644
--- a/mysql-test/main/events_bugs.result
+++ b/mysql-test/main/events_bugs.result
@@ -405,7 +405,7 @@ SELECT event_name, definer FROM INFORMATION_SCHEMA.EVENTS;
event_name definer
e1 mysqltest_u1@localhost
ALTER DEFINER=root@localhost EVENT e1 ON SCHEDULE EVERY 1 HOUR;
-ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
+ERROR 42000: Access denied; you need (at least one of) the SUPER, SET USER privilege(s) for this operation
SELECT event_name, definer FROM INFORMATION_SCHEMA.EVENTS;
event_name definer
e1 mysqltest_u1@localhost
@@ -418,7 +418,7 @@ event_name definer
e1 mysqltest_u1@localhost
DROP EVENT e1;
CREATE DEFINER=root@localhost EVENT e1 ON SCHEDULE EVERY 1 DAY DO SELECT 1;
-ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
+ERROR 42000: Access denied; you need (at least one of) the SUPER, SET USER privilege(s) for this operation
DROP EVENT e1;
ERROR HY000: Unknown event 'e1'
disconnect conn1;
diff --git a/mysql-test/main/except.result b/mysql-test/main/except.result
index f48a25f93bd..96efeb03c5e 100644
--- a/mysql-test/main/except.result
+++ b/mysql-test/main/except.result
@@ -82,7 +82,8 @@ ANALYZE
"r_loops": 1,
"rows": 2,
"r_rows": 2,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100
}
@@ -100,7 +101,8 @@ ANALYZE
"r_loops": 1,
"rows": 2,
"r_rows": 2,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100
}
@@ -123,7 +125,8 @@ ANALYZE
"r_loops": 1,
"rows": 2,
"r_rows": 1,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100,
"materialized": {
@@ -145,7 +148,8 @@ ANALYZE
"r_loops": 1,
"rows": 2,
"r_rows": 2,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100
}
@@ -163,7 +167,8 @@ ANALYZE
"r_loops": 1,
"rows": 2,
"r_rows": 2,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100
}
@@ -309,7 +314,8 @@ ANALYZE
"r_loops": 1,
"rows": 2,
"r_rows": 2,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100
},
@@ -320,7 +326,8 @@ ANALYZE
"r_loops": 1,
"rows": 2,
"r_rows": 2,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100
},
@@ -343,7 +350,8 @@ ANALYZE
"r_loops": 1,
"rows": 2,
"r_rows": 2,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100
},
@@ -354,7 +362,8 @@ ANALYZE
"r_loops": 1,
"rows": 2,
"r_rows": 2,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100
},
@@ -383,7 +392,8 @@ ANALYZE
"r_loops": 1,
"rows": 4,
"r_rows": 3,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100,
"materialized": {
@@ -405,7 +415,8 @@ ANALYZE
"r_loops": 1,
"rows": 2,
"r_rows": 2,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100
},
@@ -416,7 +427,8 @@ ANALYZE
"r_loops": 1,
"rows": 2,
"r_rows": 2,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100
},
@@ -439,7 +451,8 @@ ANALYZE
"r_loops": 1,
"rows": 2,
"r_rows": 2,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100
},
@@ -450,7 +463,8 @@ ANALYZE
"r_loops": 1,
"rows": 2,
"r_rows": 2,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100
},
@@ -508,8 +522,6 @@ select 1 as a from dual union all select 1 from dual;
a
1
1
-select 1 from dual except all select 1 from dual;
-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 'all select 1 from dual' at line 1
create table t1 (a int, b blob, a1 int, b1 blob) engine=MyISAM;
create table t2 (c int, d blob, c1 int, d1 blob) engine=MyISAM;
insert into t1 values (1,"ddd", 1, "sdfrrwwww"),(2, "fgh", 2, "dffggtt");
diff --git a/mysql-test/main/except.test b/mysql-test/main/except.test
index 4eaae1a3888..090826ce94d 100644
--- a/mysql-test/main/except.test
+++ b/mysql-test/main/except.test
@@ -13,9 +13,9 @@ EXPLAIN extended (select a,b from t1) except (select c,d from t2);
EXPLAIN extended select * from ((select a,b from t1) except (select c,d from t2)) a;
EXPLAIN format=json (select a,b from t1) except (select c,d from t2);
---replace_regex /"r_total_time_ms": [0-9e\.\-+]*,/"r_total_time_ms": "REPLACED",/
+--source include/analyze-format.inc
ANALYZE format=json (select a,b from t1) except (select c,d from t2);
---replace_regex /"r_total_time_ms": [0-9e\.\-+]*,/"r_total_time_ms": "REPLACED",/
+--source include/analyze-format.inc
ANALYZE format=json select * from ((select a,b from t1) except (select c,d from t2)) a;
select * from ((select a,b from t1) except (select c,d from t2)) a;
@@ -45,9 +45,9 @@ EXPLAIN (select a,b,e,f from t1,t3) except (select c,d,g,h from t2,t4);
EXPLAIN extended select * from ((select a,b,e,f from t1,t3) except (select c,d,g,h from t2,t4)) a;
EXPLAIN format=json (select a,b,e,f from t1,t3) except (select c,d,g,h from t2,t4);
---replace_regex /"r_total_time_ms": [0-9e\.\-+]*,/"r_total_time_ms": "REPLACED",/
+--source include/analyze-format.inc
ANALYZE format=json (select a,b,e,f from t1,t3) except (select c,d,g,h from t2,t4);
---replace_regex /"r_total_time_ms": [0-9e\.\-+]*,/"r_total_time_ms": "REPLACED",/
+--source include/analyze-format.inc
ANALYZE format=json select * from ((select a,b,e,f from t1,t3) except
(select c,d,g,h from t2,t4)) a;
select * from ((select a,b,e,f from t1,t3) except (select c,d,g,h from t2,t4)) a;
@@ -70,8 +70,6 @@ select 1 as a from dual except select 1 from dual;
select 1 from dual ORDER BY 1 except select 1 from dual;
select 1 as a from dual union all select 1 from dual;
---error ER_PARSE_ERROR
-select 1 from dual except all select 1 from dual;
create table t1 (a int, b blob, a1 int, b1 blob) engine=MyISAM;
diff --git a/mysql-test/main/except_all.result b/mysql-test/main/except_all.result
new file mode 100644
index 00000000000..2903ec857c3
--- /dev/null
+++ b/mysql-test/main/except_all.result
@@ -0,0 +1,675 @@
+create table t1 (a int, b int) engine=MyISAM;
+create table t2 (c int, d int) engine=MyISAM;
+insert into t1 values (1,1),(2,2),(3,3),(2,2),(4,4),(4,4),(4,4);
+insert into t2 values (1,1),(1,1),(1,1),(2,2),(3,3),(3,3),(5,5);
+select * from t1 except select * from t2;
+a b
+4 4
+select * from t1 except all select * from t2;
+a b
+4 4
+2 2
+4 4
+4 4
+select * from t1 except all select c+1,d+1 from t2;
+a b
+1 1
+4 4
+(select * from t1) except all (select * from t2);
+a b
+4 4
+2 2
+4 4
+4 4
+select * from ((select * from t1) except all (select * from t2)) a;
+a b
+4 4
+2 2
+4 4
+4 4
+select * from ((select a from t1) except all (select c from t2)) a;
+a
+4
+2
+4
+4
+select * from t1 except all select * from t1 union all select * from t1 union all select * from t1 except select * from t2;
+a b
+4 4
+select * from t1 except all select * from t1 union all select * from t1 union all select * from t1 except all select * from t2;
+a b
+4 4
+2 2
+4 4
+4 4
+4 4
+4 4
+4 4
+2 2
+2 2
+select * from (select * from t1 except all select * from t2) q1 except all select * from (select * from t1 except all select * from t2) q2;
+a b
+EXPLAIN select * from t1 except all select * from t2;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 7
+2 EXCEPT t2 ALL NULL NULL NULL NULL 7
+NULL EXCEPT RESULT <except1,2> ALL NULL NULL NULL NULL NULL
+EXPLAIN format=json select * from t1 except all select * from t2;
+EXPLAIN
+{
+ "query_block": {
+ "union_result": {
+ "table_name": "<except1,2>",
+ "access_type": "ALL",
+ "query_specifications": [
+ {
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 7,
+ "filtered": 100
+ }
+ }
+ },
+ {
+ "query_block": {
+ "select_id": 2,
+ "operation": "EXCEPT",
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 7,
+ "filtered": 100
+ }
+ }
+ }
+ ]
+ }
+ }
+}
+EXPLAIN extended (select * from t1) except all (select * from t2);
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 7 100.00
+2 EXCEPT t2 ALL NULL NULL NULL NULL 7 100.00
+NULL EXCEPT RESULT <except1,2> ALL NULL NULL NULL NULL NULL NULL
+Warnings:
+Note 1003 (/* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1`) except all (/* select#2 */ select `test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t2`)
+EXPLAIN extended select * from ((select * from t1) except all (select * from t2)) a;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY <derived2> ALL NULL NULL NULL NULL 7 100.00
+2 DERIVED t1 ALL NULL NULL NULL NULL 7 100.00
+3 EXCEPT t2 ALL NULL NULL NULL NULL 7 100.00
+NULL EXCEPT RESULT <except2,3> ALL NULL NULL NULL NULL NULL NULL
+Warnings:
+Note 1003 /* select#1 */ select `a`.`a` AS `a`,`a`.`b` AS `b` from ((/* select#2 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1`) except all (/* select#3 */ select `test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t2`)) `a`
+ANALYZE format=json select * from ((select a,b from t1) except all (select c,d from t2)) a;
+ANALYZE
+{
+ "query_block": {
+ "select_id": 1,
+ "r_loops": 1,
+ "r_total_time_ms": "REPLACED",
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ALL",
+ "r_loops": 1,
+ "rows": 7,
+ "r_rows": 4,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 100,
+ "r_filtered": 100,
+ "materialized": {
+ "query_block": {
+ "union_result": {
+ "table_name": "<except2,3>",
+ "access_type": "ALL",
+ "r_loops": 1,
+ "r_rows": 4,
+ "query_specifications": [
+ {
+ "query_block": {
+ "select_id": 2,
+ "r_loops": 1,
+ "r_total_time_ms": "REPLACED",
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "r_loops": 1,
+ "rows": 7,
+ "r_rows": 7,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 100,
+ "r_filtered": 100
+ }
+ }
+ },
+ {
+ "query_block": {
+ "select_id": 3,
+ "operation": "EXCEPT",
+ "r_loops": 1,
+ "r_total_time_ms": "REPLACED",
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "r_loops": 1,
+ "rows": 7,
+ "r_rows": 7,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 100,
+ "r_filtered": 100
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ }
+}
+ANALYZE format=json select * from ((select a from t1) except all (select c from t2)) a;
+ANALYZE
+{
+ "query_block": {
+ "select_id": 1,
+ "r_loops": 1,
+ "r_total_time_ms": "REPLACED",
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ALL",
+ "r_loops": 1,
+ "rows": 7,
+ "r_rows": 4,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 100,
+ "r_filtered": 100,
+ "materialized": {
+ "query_block": {
+ "union_result": {
+ "table_name": "<except2,3>",
+ "access_type": "ALL",
+ "r_loops": 1,
+ "r_rows": 4,
+ "query_specifications": [
+ {
+ "query_block": {
+ "select_id": 2,
+ "r_loops": 1,
+ "r_total_time_ms": "REPLACED",
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "r_loops": 1,
+ "rows": 7,
+ "r_rows": 7,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 100,
+ "r_filtered": 100
+ }
+ }
+ },
+ {
+ "query_block": {
+ "select_id": 3,
+ "operation": "EXCEPT",
+ "r_loops": 1,
+ "r_total_time_ms": "REPLACED",
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "r_loops": 1,
+ "rows": 7,
+ "r_rows": 7,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 100,
+ "r_filtered": 100
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ }
+}
+select * from ((select a from t1) except all (select c from t2)) a;
+a
+4
+2
+4
+4
+prepare stmt from "(select a,b from t1) except all (select c,d from t2)";
+execute stmt;
+a b
+4 4
+2 2
+4 4
+4 4
+execute stmt;
+a b
+4 4
+2 2
+4 4
+4 4
+prepare stmt from "select * from ((select a,b from t1) except all (select c,d from t2)) a";
+execute stmt;
+a b
+4 4
+2 2
+4 4
+4 4
+execute stmt;
+a b
+4 4
+2 2
+4 4
+4 4
+drop tables t1,t2;
+create table t1 (a int, b int) engine=MyISAM;
+create table t2 (c int, d int) engine=MyISAM;
+create table t3 (e int, f int) engine=MyISAM;
+create table t4 (g int, h int) engine=MyISAM;
+insert into t1 values (1,1),(2,2),(2,2);
+insert into t2 values (2,2),(3,3);
+insert into t3 values (4,4),(5,5),(4,4);
+insert into t4 values (4,4),(7,7),(4,4);
+(select a,b,e,f from t1,t3) except all (select c,d,g,h from t2,t4);
+a b e f
+1 1 4 4
+2 2 4 4
+1 1 5 5
+2 2 5 5
+1 1 4 4
+2 2 4 4
+2 2 5 5
+select * from ((select a,b,e,f from t1,t3) except all (select c,d,g,h from t2,t4)) t;
+a b e f
+1 1 4 4
+2 2 4 4
+1 1 5 5
+2 2 5 5
+1 1 4 4
+2 2 4 4
+2 2 5 5
+(select * from t1,t3) except all (select * from t2,t4);
+a b e f
+1 1 4 4
+2 2 4 4
+1 1 5 5
+2 2 5 5
+1 1 4 4
+2 2 4 4
+2 2 5 5
+(select a,b,e from t1,t3) except all (select c,d,g from t2,t4);
+a b e
+1 1 4
+2 2 4
+1 1 5
+2 2 5
+1 1 4
+2 2 4
+2 2 5
+EXPLAIN (select a,b,e,f from t1,t3) except all (select c,d,g,h from t2,t4);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 3
+1 PRIMARY t3 ALL NULL NULL NULL NULL 3 Using join buffer (flat, BNL join)
+2 EXCEPT t2 ALL NULL NULL NULL NULL 2
+2 EXCEPT t4 ALL NULL NULL NULL NULL 3 Using join buffer (flat, BNL join)
+NULL EXCEPT RESULT <except1,2> ALL NULL NULL NULL NULL NULL
+EXPLAIN select * from ((select a,b,e,f from t1,t3) except all (select c,d,g,h from t2,t4)) t;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY <derived2> ALL NULL NULL NULL NULL 9
+2 DERIVED t1 ALL NULL NULL NULL NULL 3
+2 DERIVED t3 ALL NULL NULL NULL NULL 3 Using join buffer (flat, BNL join)
+3 EXCEPT t2 ALL NULL NULL NULL NULL 2
+3 EXCEPT t4 ALL NULL NULL NULL NULL 3 Using join buffer (flat, BNL join)
+NULL EXCEPT RESULT <except2,3> ALL NULL NULL NULL NULL NULL
+EXPLAIN extended select * from ((select a,b,e,f from t1,t3) except all (select c,d,g,h from t2,t4)) t;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY <derived2> ALL NULL NULL NULL NULL 9 100.00
+2 DERIVED t1 ALL NULL NULL NULL NULL 3 100.00
+2 DERIVED t3 ALL NULL NULL NULL NULL 3 100.00 Using join buffer (flat, BNL join)
+3 EXCEPT t2 ALL NULL NULL NULL NULL 2 100.00
+3 EXCEPT t4 ALL NULL NULL NULL NULL 3 100.00 Using join buffer (flat, BNL join)
+NULL EXCEPT RESULT <except2,3> ALL NULL NULL NULL NULL NULL NULL
+Warnings:
+Note 1003 /* select#1 */ select `t`.`a` AS `a`,`t`.`b` AS `b`,`t`.`e` AS `e`,`t`.`f` AS `f` from ((/* select#2 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t3`.`e` AS `e`,`test`.`t3`.`f` AS `f` from `test`.`t1` join `test`.`t3`) except all (/* select#3 */ select `test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d`,`test`.`t4`.`g` AS `g`,`test`.`t4`.`h` AS `h` from `test`.`t2` join `test`.`t4`)) `t`
+EXPLAIN format=json select * from ((select a,b,e,f from t1,t3) except all (select c,d,g,h from t2,t4)) t;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100,
+ "materialized": {
+ "query_block": {
+ "union_result": {
+ "table_name": "<except2,3>",
+ "access_type": "ALL",
+ "query_specifications": [
+ {
+ "query_block": {
+ "select_id": 2,
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 3,
+ "filtered": 100
+ },
+ "block-nl-join": {
+ "table": {
+ "table_name": "t3",
+ "access_type": "ALL",
+ "rows": 3,
+ "filtered": 100
+ },
+ "buffer_type": "flat",
+ "buffer_size": "119",
+ "join_type": "BNL"
+ }
+ }
+ },
+ {
+ "query_block": {
+ "select_id": 3,
+ "operation": "EXCEPT",
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 2,
+ "filtered": 100
+ },
+ "block-nl-join": {
+ "table": {
+ "table_name": "t4",
+ "access_type": "ALL",
+ "rows": 3,
+ "filtered": 100
+ },
+ "buffer_type": "flat",
+ "buffer_size": "119",
+ "join_type": "BNL"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ }
+}
+ANALYZE format=json (select a,b,e,f from t1,t3) except all (select c,d,g,h from t2,t4);
+ANALYZE
+{
+ "query_block": {
+ "union_result": {
+ "table_name": "<except1,2>",
+ "access_type": "ALL",
+ "r_loops": 1,
+ "r_rows": 7,
+ "query_specifications": [
+ {
+ "query_block": {
+ "select_id": 1,
+ "r_loops": 1,
+ "r_total_time_ms": "REPLACED",
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "r_loops": 1,
+ "rows": 3,
+ "r_rows": 3,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 100,
+ "r_filtered": 100
+ },
+ "block-nl-join": {
+ "table": {
+ "table_name": "t3",
+ "access_type": "ALL",
+ "r_loops": 1,
+ "rows": 3,
+ "r_rows": 3,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 100,
+ "r_filtered": 100
+ },
+ "buffer_type": "flat",
+ "buffer_size": "119",
+ "join_type": "BNL",
+ "r_filtered": 100
+ }
+ }
+ },
+ {
+ "query_block": {
+ "select_id": 2,
+ "operation": "EXCEPT",
+ "r_loops": 1,
+ "r_total_time_ms": "REPLACED",
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "r_loops": 1,
+ "rows": 2,
+ "r_rows": 2,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 100,
+ "r_filtered": 100
+ },
+ "block-nl-join": {
+ "table": {
+ "table_name": "t4",
+ "access_type": "ALL",
+ "r_loops": 1,
+ "rows": 3,
+ "r_rows": 3,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 100,
+ "r_filtered": 100
+ },
+ "buffer_type": "flat",
+ "buffer_size": "119",
+ "join_type": "BNL",
+ "r_filtered": 100
+ }
+ }
+ }
+ ]
+ }
+ }
+}
+ANALYZE format=json select * from ((select a,b,e,f from t1,t3) except all (select c,d,g,h from t2,t4)) t;
+ANALYZE
+{
+ "query_block": {
+ "select_id": 1,
+ "r_loops": 1,
+ "r_total_time_ms": "REPLACED",
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ALL",
+ "r_loops": 1,
+ "rows": 9,
+ "r_rows": 7,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 100,
+ "r_filtered": 100,
+ "materialized": {
+ "query_block": {
+ "union_result": {
+ "table_name": "<except2,3>",
+ "access_type": "ALL",
+ "r_loops": 1,
+ "r_rows": 7,
+ "query_specifications": [
+ {
+ "query_block": {
+ "select_id": 2,
+ "r_loops": 1,
+ "r_total_time_ms": "REPLACED",
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "r_loops": 1,
+ "rows": 3,
+ "r_rows": 3,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 100,
+ "r_filtered": 100
+ },
+ "block-nl-join": {
+ "table": {
+ "table_name": "t3",
+ "access_type": "ALL",
+ "r_loops": 1,
+ "rows": 3,
+ "r_rows": 3,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 100,
+ "r_filtered": 100
+ },
+ "buffer_type": "flat",
+ "buffer_size": "119",
+ "join_type": "BNL",
+ "r_filtered": 100
+ }
+ }
+ },
+ {
+ "query_block": {
+ "select_id": 3,
+ "operation": "EXCEPT",
+ "r_loops": 1,
+ "r_total_time_ms": "REPLACED",
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "r_loops": 1,
+ "rows": 2,
+ "r_rows": 2,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 100,
+ "r_filtered": 100
+ },
+ "block-nl-join": {
+ "table": {
+ "table_name": "t4",
+ "access_type": "ALL",
+ "r_loops": 1,
+ "rows": 3,
+ "r_rows": 3,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 100,
+ "r_filtered": 100
+ },
+ "buffer_type": "flat",
+ "buffer_size": "119",
+ "join_type": "BNL",
+ "r_filtered": 100
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ }
+}
+prepare stmt from "(select a,b,e,f from t1,t3) except all (select c,d,g,h from t2,t4)";
+execute stmt;
+a b e f
+1 1 4 4
+2 2 4 4
+1 1 5 5
+2 2 5 5
+1 1 4 4
+2 2 4 4
+2 2 5 5
+execute stmt;
+a b e f
+1 1 4 4
+2 2 4 4
+1 1 5 5
+2 2 5 5
+1 1 4 4
+2 2 4 4
+2 2 5 5
+prepare stmt from "select * from ((select a,b,e,f from t1,t3) except all (select c,d,g,h from t2,t4)) a";
+execute stmt;
+a b e f
+1 1 4 4
+2 2 4 4
+1 1 5 5
+2 2 5 5
+1 1 4 4
+2 2 4 4
+2 2 5 5
+execute stmt;
+a b e f
+1 1 4 4
+2 2 4 4
+1 1 5 5
+2 2 5 5
+1 1 4 4
+2 2 4 4
+2 2 5 5
+drop tables t1,t2,t3,t4;
+select 1 as a from dual except all select 1 from dual;
+a
+(select 1 from dual) except all (select 1 from dual);
+1
+(select 1 from dual into @v) except all (select 1 from dual);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'into @v) except all (select 1 from dual)' at line 1
+select 1 from dual ORDER BY 1 except all select 1 from dual;
+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 'except all select 1 from dual' at line 1
+select 1 as a from dual union all select 1 from dual;
+a
+1
+1
+create table t1 (a int, b blob, a1 int, b1 blob) engine=MyISAM;
+create table t2 (c int, d blob, c1 int, d1 blob) engine=MyISAM;
+insert into t1 values (1,"ddd", 1, "sdfrrwwww"),(2, "fgh", 2, "dffggtt"),(2, "fgh", 2, "dffggtt");
+insert into t2 values (2, "fgh", 2, "dffggtt"),(3, "ffggddd", 3, "dfgg");
+(select a,b,b1 from t1) except all (select c,d,d1 from t2);
+a b b1
+1 ddd sdfrrwwww
+2 fgh dffggtt
+create table t3 (select a,b,b1 from t1) except all (select c,d,d1 from t2);
+show create table t3;
+Table Create Table
+t3 CREATE TABLE `t3` (
+ `a` int(11) DEFAULT NULL,
+ `b` blob DEFAULT NULL,
+ `b1` blob DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+drop tables t1,t2,t3;
+CREATE TABLE t (i INT);
+INSERT INTO t VALUES (1),(2);
+SELECT * FROM t WHERE i != ANY ( SELECT 3 EXCEPT ALL SELECT 3 );
+i
+drop table t;
diff --git a/mysql-test/main/except_all.test b/mysql-test/main/except_all.test
new file mode 100644
index 00000000000..f873b220126
--- /dev/null
+++ b/mysql-test/main/except_all.test
@@ -0,0 +1,99 @@
+create table t1 (a int, b int) engine=MyISAM;
+create table t2 (c int, d int) engine=MyISAM;
+insert into t1 values (1,1),(2,2),(3,3),(2,2),(4,4),(4,4),(4,4);
+insert into t2 values (1,1),(1,1),(1,1),(2,2),(3,3),(3,3),(5,5);
+
+select * from t1 except select * from t2;
+select * from t1 except all select * from t2;
+select * from t1 except all select c+1,d+1 from t2;
+(select * from t1) except all (select * from t2);
+select * from ((select * from t1) except all (select * from t2)) a;
+select * from ((select a from t1) except all (select c from t2)) a;
+select * from t1 except all select * from t1 union all select * from t1 union all select * from t1 except select * from t2;
+
+select * from t1 except all select * from t1 union all select * from t1 union all select * from t1 except all select * from t2;
+
+select * from (select * from t1 except all select * from t2) q1 except all select * from (select * from t1 except all select * from t2) q2;
+
+EXPLAIN select * from t1 except all select * from t2;
+EXPLAIN format=json select * from t1 except all select * from t2;
+EXPLAIN extended (select * from t1) except all (select * from t2);
+EXPLAIN extended select * from ((select * from t1) except all (select * from t2)) a;
+
+--source include/analyze-format.inc
+ANALYZE format=json select * from ((select a,b from t1) except all (select c,d from t2)) a;
+--source include/analyze-format.inc
+ANALYZE format=json select * from ((select a from t1) except all (select c from t2)) a;
+select * from ((select a from t1) except all (select c from t2)) a;
+
+prepare stmt from "(select a,b from t1) except all (select c,d from t2)";
+execute stmt;
+execute stmt;
+
+prepare stmt from "select * from ((select a,b from t1) except all (select c,d from t2)) a";
+execute stmt;
+execute stmt;
+
+drop tables t1,t2;
+
+create table t1 (a int, b int) engine=MyISAM;
+create table t2 (c int, d int) engine=MyISAM;
+create table t3 (e int, f int) engine=MyISAM;
+create table t4 (g int, h int) engine=MyISAM;
+insert into t1 values (1,1),(2,2),(2,2);
+insert into t2 values (2,2),(3,3);
+insert into t3 values (4,4),(5,5),(4,4);
+insert into t4 values (4,4),(7,7),(4,4);
+
+(select a,b,e,f from t1,t3) except all (select c,d,g,h from t2,t4);
+select * from ((select a,b,e,f from t1,t3) except all (select c,d,g,h from t2,t4)) t;
+(select * from t1,t3) except all (select * from t2,t4);
+(select a,b,e from t1,t3) except all (select c,d,g from t2,t4);
+
+EXPLAIN (select a,b,e,f from t1,t3) except all (select c,d,g,h from t2,t4);
+EXPLAIN select * from ((select a,b,e,f from t1,t3) except all (select c,d,g,h from t2,t4)) t;
+EXPLAIN extended select * from ((select a,b,e,f from t1,t3) except all (select c,d,g,h from t2,t4)) t;
+EXPLAIN format=json select * from ((select a,b,e,f from t1,t3) except all (select c,d,g,h from t2,t4)) t;
+
+--source include/analyze-format.inc
+ANALYZE format=json (select a,b,e,f from t1,t3) except all (select c,d,g,h from t2,t4);
+--source include/analyze-format.inc
+ANALYZE format=json select * from ((select a,b,e,f from t1,t3) except all (select c,d,g,h from t2,t4)) t;
+
+prepare stmt from "(select a,b,e,f from t1,t3) except all (select c,d,g,h from t2,t4)";
+execute stmt;
+execute stmt;
+
+prepare stmt from "select * from ((select a,b,e,f from t1,t3) except all (select c,d,g,h from t2,t4)) a";
+execute stmt;
+execute stmt;
+
+drop tables t1,t2,t3,t4;
+
+select 1 as a from dual except all select 1 from dual;
+(select 1 from dual) except all (select 1 from dual);
+--error ER_PARSE_ERROR
+(select 1 from dual into @v) except all (select 1 from dual);
+--error ER_PARSE_ERROR
+select 1 from dual ORDER BY 1 except all select 1 from dual;
+select 1 as a from dual union all select 1 from dual;
+
+create table t1 (a int, b blob, a1 int, b1 blob) engine=MyISAM;
+create table t2 (c int, d blob, c1 int, d1 blob) engine=MyISAM;
+insert into t1 values (1,"ddd", 1, "sdfrrwwww"),(2, "fgh", 2, "dffggtt"),(2, "fgh", 2, "dffggtt");
+insert into t2 values (2, "fgh", 2, "dffggtt"),(3, "ffggddd", 3, "dfgg");
+
+
+(select a,b,b1 from t1) except all (select c,d,d1 from t2);
+# make sure that blob is used
+create table t3 (select a,b,b1 from t1) except all (select c,d,d1 from t2);
+show create table t3;
+
+drop tables t1,t2,t3;
+
+CREATE TABLE t (i INT);
+INSERT INTO t VALUES (1),(2);
+
+SELECT * FROM t WHERE i != ANY ( SELECT 3 EXCEPT ALL SELECT 3 );
+
+drop table t; \ No newline at end of file
diff --git a/mysql-test/main/explain.test b/mysql-test/main/explain.test
index cf9f6be09ed..0fa4a5af215 100644
--- a/mysql-test/main/explain.test
+++ b/mysql-test/main/explain.test
@@ -130,7 +130,7 @@ DROP TABLE t1,t2;
CREATE TABLE t1 (a INT PRIMARY KEY);
---error ER_KEY_DOES_NOT_EXITS
+--error ER_KEY_DOES_NOT_EXISTS
EXPLAIN EXTENDED SELECT COUNT(a) FROM t1 USE KEY(a);
DROP TABLE t1;
diff --git a/mysql-test/main/explain_json.result b/mysql-test/main/explain_json.result
index b918e7614af..18a15795aab 100644
--- a/mysql-test/main/explain_json.result
+++ b/mysql-test/main/explain_json.result
@@ -977,7 +977,8 @@ ANALYZE
"r_loops": 1,
"rows": 101,
"r_rows": 100,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100,
"using_index_for_group_by": true
@@ -1036,7 +1037,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 select count(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 Extra
-1 SIMPLE t1 range NULL idx_t1_1 163 NULL 65 Using where; Using index for group-by (scanning)
+1 SIMPLE t1 range NULL idx_t1_1 163 NULL 65 Using where; Using index for group-by
explain format=json select count(distinct a1,a2,b) from t1 where (a2 >= 'b') and (b = 'a');
EXPLAIN
{
@@ -1069,7 +1070,7 @@ EXPLAIN
"rows": 65,
"filtered": 100,
"attached_condition": "t1.b = 'a' and t1.c = 'i121' and t1.a2 >= 'b'",
- "using_index_for_group_by": "scanning"
+ "using_index_for_group_by": true
}
}
}
@@ -1292,7 +1293,8 @@ ANALYZE
"r_loops": 1,
"rows": 2,
"r_rows": 2,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100
}
@@ -1346,7 +1348,8 @@ ANALYZE
"r_loops": 1,
"rows": 2,
"r_rows": 2,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100
},
@@ -1361,7 +1364,8 @@ ANALYZE
"r_loops": 2,
"rows": 1,
"r_rows": 1,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100,
"attached_condition": "trigcond(t2.pk is null) and trigcond(trigcond(t1.a is not null))",
@@ -1421,7 +1425,8 @@ ANALYZE
"r_loops": 1,
"rows": 2,
"r_rows": 2,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100,
"attached_condition": "t1.a is not null"
@@ -1437,7 +1442,8 @@ ANALYZE
"r_loops": 2,
"rows": 1,
"r_rows": 1,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100,
"using_index": true,
@@ -1512,7 +1518,8 @@ ANALYZE
"r_loops": 1,
"rows": 10,
"r_rows": 10,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100,
"attached_condition": "t3.a is not null"
@@ -1529,7 +1536,8 @@ ANALYZE
"r_loops": 1,
"rows": 1,
"r_rows": 10,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100,
"index_condition_bka": "t4.b + 1 <= t3.b + 1"
diff --git a/mysql-test/main/explain_json_format_partitions.result b/mysql-test/main/explain_json_format_partitions.result
index 5d7fdbc4864..0c7d9e93105 100644
--- a/mysql-test/main/explain_json_format_partitions.result
+++ b/mysql-test/main/explain_json_format_partitions.result
@@ -36,7 +36,8 @@ ANALYZE
"r_loops": 1,
"rows": 10,
"r_rows": 10,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 30,
"attached_condition": "t1.a in (2,3,4)"
diff --git a/mysql-test/main/features.result b/mysql-test/main/features.result
index beab7fb946f..0da2e5fe986 100644
--- a/mysql-test/main/features.result
+++ b/mysql-test/main/features.result
@@ -10,6 +10,7 @@ Feature_delay_key_write 0
Feature_dynamic_columns 0
Feature_fulltext 0
Feature_gis 0
+Feature_insert_returning 0
Feature_invisible_columns 0
Feature_json 0
Feature_locale 0
@@ -165,9 +166,24 @@ drop table t1;
show status like "feature_delay_key_write";
Variable_name Value
Feature_delay_key_write 2
+#
+# Feature CHECK CONSTRAINT
+#
create table t1 (a int check (a > 5));
create table t2 (b int, constraint foo check (b < 10));
drop table t1, t2;
show status like "feature_check_constraint";
Variable_name Value
Feature_check_constraint 2
+#
+# Feature insert...returning
+#
+create table t1(id1 int);
+insert into t1 values (1),(2) returning *;
+id1
+1
+2
+drop table t1;
+show status like "feature_insert_returning";
+Variable_name Value
+Feature_insert_returning 1
diff --git a/mysql-test/main/features.test b/mysql-test/main/features.test
index 1241bd50bdd..d0f5263c5c3 100644
--- a/mysql-test/main/features.test
+++ b/mysql-test/main/features.test
@@ -132,10 +132,18 @@ drop table t1;
show status like "feature_delay_key_write";
-#
-# Feature CHECK CONSTRAINT
-#
+--echo #
+--echo # Feature CHECK CONSTRAINT
+--echo #
create table t1 (a int check (a > 5));
create table t2 (b int, constraint foo check (b < 10));
drop table t1, t2;
show status like "feature_check_constraint";
+
+--echo #
+--echo # Feature insert...returning
+--echo #
+create table t1(id1 int);
+insert into t1 values (1),(2) returning *;
+drop table t1;
+show status like "feature_insert_returning";
diff --git a/mysql-test/main/flush.result b/mysql-test/main/flush.result
index 8149ce29dec..39e0b9432fe 100644
--- a/mysql-test/main/flush.result
+++ b/mysql-test/main/flush.result
@@ -329,12 +329,9 @@ flush tables t1 with read lock;
handler t1 read a next;
ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
unlock tables;
-#
-# Sic: lost handler position.
-#
handler t1 read a next;
a
-1
+3
handler t1 close;
drop table t1;
#
@@ -558,3 +555,10 @@ ERROR HY000: Table 'v1' was not locked with LOCK TABLES
UNLOCK TABLES;
DROP VIEW v1;
DROP TABLE t1;
+#
+# Test FLUSH THREADS
+#
+flush threads;
+show status like "Threads_cached";
+Variable_name Value
+Threads_cached 0
diff --git a/mysql-test/main/flush.test b/mysql-test/main/flush.test
index 17f9241a122..6d76196bf54 100644
--- a/mysql-test/main/flush.test
+++ b/mysql-test/main/flush.test
@@ -412,9 +412,6 @@ flush tables t1 with read lock;
--error ER_LOCK_OR_ACTIVE_TRANSACTION
handler t1 read a next;
unlock tables;
---echo #
---echo # Sic: lost handler position.
---echo #
handler t1 read a next;
handler t1 close;
drop table t1;
@@ -672,3 +669,9 @@ UNLOCK TABLES;
DROP VIEW v1;
DROP TABLE t1;
+--echo #
+--echo # Test FLUSH THREADS
+--echo #
+
+flush threads;
+show status like "Threads_cached";
diff --git a/mysql-test/main/flush_read_lock.result b/mysql-test/main/flush_read_lock.result
index 0f8c2ce9fb9..62a94c38124 100644
--- a/mysql-test/main/flush_read_lock.result
+++ b/mysql-test/main/flush_read_lock.result
@@ -49,6 +49,7 @@ set local sql_mode="";
# used in this test in order to be able to
# check that DDL statements on temporary tables
# are compatible with FTRWL.
+call mtr.add_suppression("BINLOG_BASE64_EVENT: Error executing row event.*error code: 1223");
drop tables if exists t1_base, t2_base, t3_trans;
drop tables if exists tm_base, tm_base_temp;
drop database if exists mysqltest1;
@@ -438,7 +439,6 @@ Success: Was able to run 'execute stmt1' under FTWRL.
Success: Was able to run 'execute stmt1' with FTWRL active in another connection.
Success: Was able to run FTWRL while 'execute stmt1' was active in another connection.
deallocate prepare stmt1;
-call mtr.add_suppression("Slave SQL.*Can.t execute the query because you have a conflicting read lock., error.* 1223");
#
# 9.2.b) EXECUTE for statement which is incompatible with FTWRL
# should be also incompatible.
@@ -1310,6 +1310,8 @@ unlock tables;
# Check that XA non-COMMIT statements are not and COMMIT is
# blocked by active FTWRL in another connection
#
+# XA COMMIT, XA ROLLBACK and XA PREPARE does take COMMIT lock to ensure
+# that nothing is written to bin log and redo log under FTWRL mode.
connection con1;
flush tables with read lock;
connection default;
@@ -1322,11 +1324,25 @@ connection con1;
flush tables with read lock;
connection default;
xa end 'test1';
-xa prepare 'test1';
+xa prepare 'test1';;
+connection con1;
+unlock tables;
+# Switching to connection 'default'.
+connection default;
+# Reap XA PREPARE.
+# Switching to connection 'con1'.
+connection con1;
+flush tables with read lock;
+# Switching to connection 'default'.
+connection default;
+# Send XA ROLLBACK 'test1'
xa rollback 'test1';
+# Switching to connection 'con1'.
connection con1;
+# Wait until XA ROLLBACK is blocked.
unlock tables;
connection default;
+# Reap XA ROLLBACK
xa start 'test1';
insert into t3_trans values (1);
connection con1;
@@ -1334,7 +1350,20 @@ flush tables with read lock;
connection default;
connection default;
xa end 'test1';
+# Send XA PREPARE 'test1'
xa prepare 'test1';
+# Switching to connection 'con1'.
+connection con1;
+# Wait until XA PREPARE is blocked.
+unlock tables;
+# Switching to connection 'default'.
+connection default;
+# Reap XA PREPARE.
+# Switching to connection 'con1'.
+connection con1;
+flush tables with read lock;
+# Switching to connection 'default'.
+connection default;
# Send:
xa commit 'test1';;
connection con1;
@@ -1344,6 +1373,56 @@ connection default;
# Reap XA COMMIT.
delete from t3_trans;
#
+# Check that XA COMMIT / ROLLBACK for prepared transaction from a
+# disconnected session is blocked by active FTWRL in another connection.
+#
+# Create temporary connection for XA transaction.
+connect con_tmp,localhost,root,,;
+xa start 'test1';
+insert into t3_trans values (1);
+xa end 'test1';
+xa prepare 'test1';
+# Disconnect temporary connection
+set debug_sync='thread_end SIGNAL test1_prepare';
+disconnect con_tmp;
+connection con1;
+set debug_sync='now WAIT_FOR test1_prepare';
+# Create temporary connection for XA transaction.
+connect con_tmp1,localhost,root,,;
+xa start 'test2';
+insert into t3_trans values (2);
+xa end 'test2';
+xa prepare 'test2';
+# Disconnect temporary connection
+set debug_sync='thread_end SIGNAL test2_prepare';
+disconnect con_tmp1;
+# Switching to connection 'con1'.
+connection con1;
+set debug_sync='now WAIT_FOR test2_prepare';
+flush tables with read lock;
+# Switching to connection 'default'.
+connection default;
+# Send XA ROLLBACK 'test1'
+xa rollback 'test1';
+# Switching to connection 'con1'.
+connection con1;
+# Wait until XA ROLLBACK is blocked.
+unlock tables;
+flush tables with read lock;
+# Switching to connection 'default'.
+connection default;
+# Reap XA ROLLBACK
+# Send XA COMMIT
+xa commit 'test2';;
+# Switching to connection 'con1'.
+connection con1;
+# Wait until XA COMMIT is blocked.
+unlock tables;
+# Switching to connection 'default'.
+connection default;
+# Reap XA COMMIT.
+delete from t3_trans;
+#
# Check that XA COMMIT blocks FTWRL in another connection.
xa start 'test1';
insert into t3_trans values (1);
diff --git a/mysql-test/main/flush_read_lock.test b/mysql-test/main/flush_read_lock.test
index 80512deac4e..d73820425d2 100644
--- a/mysql-test/main/flush_read_lock.test
+++ b/mysql-test/main/flush_read_lock.test
@@ -65,6 +65,9 @@ set local sql_mode="";
--echo # used in this test in order to be able to
--echo # check that DDL statements on temporary tables
--echo # are compatible with FTRWL.
+
+call mtr.add_suppression("BINLOG_BASE64_EVENT: Error executing row event.*error code: 1223");
+
--disable_warnings
drop tables if exists t1_base, t2_base, t3_trans;
drop tables if exists tm_base, tm_base_temp;
@@ -300,7 +303,6 @@ set debug_sync= "RESET";
--echo # We don't run similar test for BEGIN and ROLLBACK as
--echo # they release metadata locks in non-standard place.
-
--echo #
--echo # 4) BINLOG statement should be incompatible with FTWRL.
--echo #
@@ -544,8 +546,6 @@ let $cleanup_stmt= ;
--source include/check_ftwrl_compatible.inc
deallocate prepare stmt1;
-call mtr.add_suppression("Slave SQL.*Can.t execute the query because you have a conflicting read lock., error.* 1223");
-
--echo #
--echo # 9.2.b) EXECUTE for statement which is incompatible with FTWRL
--echo # should be also incompatible.
@@ -1592,6 +1592,8 @@ unlock tables;
--echo # Check that XA non-COMMIT statements are not and COMMIT is
--echo # blocked by active FTWRL in another connection
--echo #
+--echo # XA COMMIT, XA ROLLBACK and XA PREPARE does take COMMIT lock to ensure
+--echo # that nothing is written to bin log and redo log under FTWRL mode.
connection $con_aux1;
flush tables with read lock;
connection default;
@@ -1604,11 +1606,37 @@ connection $con_aux1;
flush tables with read lock;
connection default;
xa end 'test1';
-xa prepare 'test1';
-xa rollback 'test1';
+--send xa prepare 'test1';
connection $con_aux1;
+let $wait_condition=
+ select count(*) = 1 from information_schema.processlist
+ where state = "Waiting for backup lock" and
+ info = "xa prepare 'test1'";
+--source include/wait_condition.inc
unlock tables;
+--echo # Switching to connection 'default'.
connection default;
+--echo # Reap XA PREPARE.
+--reap
+--echo # Switching to connection '$con_aux1'.
+connection $con_aux1;
+flush tables with read lock;
+--echo # Switching to connection 'default'.
+connection default;
+--echo # Send XA ROLLBACK 'test1'
+--send xa rollback 'test1'
+--echo # Switching to connection '$con_aux1'.
+connection $con_aux1;
+--echo # Wait until XA ROLLBACK is blocked.
+let $wait_condition=
+ select count(*) = 1 from information_schema.processlist
+ where state = "Waiting for backup lock" and
+ info = "xa rollback 'test1'";
+--source include/wait_condition.inc
+unlock tables;
+connection default;
+--echo # Reap XA ROLLBACK
+--reap
xa start 'test1';
insert into t3_trans values (1);
connection $con_aux1;
@@ -1616,7 +1644,27 @@ flush tables with read lock;
connection default;
connection default;
xa end 'test1';
-xa prepare 'test1';
+--echo # Send XA PREPARE 'test1'
+--send xa prepare 'test1'
+--echo # Switching to connection '$con_aux1'.
+connection $con_aux1;
+--echo # Wait until XA PREPARE is blocked.
+let $wait_condition=
+ select count(*) = 1 from information_schema.processlist
+ where state = "Waiting for backup lock" and
+ info = "xa prepare 'test1'";
+--source include/wait_condition.inc
+unlock tables;
+--echo # Switching to connection 'default'.
+connection default;
+--echo # Reap XA PREPARE.
+--reap
+--echo # Switching to connection '$con_aux1'.
+connection $con_aux1;
+flush tables with read lock;
+--echo # Switching to connection 'default'.
+connection default;
+
--echo # Send:
--send xa commit 'test1';
connection $con_aux1;
@@ -1632,6 +1680,75 @@ connection default;
--reap
delete from t3_trans;
--echo #
+--echo # Check that XA COMMIT / ROLLBACK for prepared transaction from a
+--echo # disconnected session is blocked by active FTWRL in another connection.
+--echo #
+--echo # Create temporary connection for XA transaction.
+connect (con_tmp,localhost,root,,);
+xa start 'test1';
+insert into t3_trans values (1);
+xa end 'test1';
+xa prepare 'test1';
+--echo # Disconnect temporary connection
+set debug_sync='thread_end SIGNAL test1_prepare';
+disconnect con_tmp;
+connection $con_aux1;
+set debug_sync='now WAIT_FOR test1_prepare';
+
+
+--echo # Create temporary connection for XA transaction.
+connect (con_tmp1,localhost,root,,);
+xa start 'test2';
+insert into t3_trans values (2);
+xa end 'test2';
+xa prepare 'test2';
+--echo # Disconnect temporary connection
+set debug_sync='thread_end SIGNAL test2_prepare';
+disconnect con_tmp1;
+
+
+--echo # Switching to connection '$con_aux1'.
+connection $con_aux1;
+set debug_sync='now WAIT_FOR test2_prepare';
+flush tables with read lock;
+
+--echo # Switching to connection 'default'.
+connection default;
+--echo # Send XA ROLLBACK 'test1'
+--send xa rollback 'test1'
+--echo # Switching to connection '$con_aux1'.
+
+connection $con_aux1;
+--echo # Wait until XA ROLLBACK is blocked.
+let $wait_condition=
+ select count(*) = 1 from information_schema.processlist
+ where state = "Waiting for backup lock" and
+ info = "xa rollback 'test1'";
+--source include/wait_condition.inc
+unlock tables;
+flush tables with read lock;
+--echo # Switching to connection 'default'.
+connection default;
+--echo # Reap XA ROLLBACK
+--reap
+--echo # Send XA COMMIT
+--send xa commit 'test2';
+--echo # Switching to connection '$con_aux1'.
+connection $con_aux1;
+--echo # Wait until XA COMMIT is blocked.
+let $wait_condition=
+ select count(*) = 1 from information_schema.processlist
+ where state = "Waiting for backup lock" and
+ info = "xa commit 'test2'";
+--source include/wait_condition.inc
+unlock tables;
+--echo # Switching to connection 'default'.
+connection default;
+--echo # Reap XA COMMIT.
+--reap
+delete from t3_trans;
+
+--echo #
--echo # Check that XA COMMIT blocks FTWRL in another connection.
xa start 'test1';
insert into t3_trans values (1);
diff --git a/mysql-test/main/foreign_key.result b/mysql-test/main/foreign_key.result
index c412be6bbdb..46c8d3b7fee 100644
--- a/mysql-test/main/foreign_key.result
+++ b/mysql-test/main/foreign_key.result
@@ -1,7 +1,7 @@
drop table if exists t1,t2;
create table t1 (
a int not null references t2,
-b int not null references t2 (c),
+b int not null constraint t2_c references t2 (c),
primary key (a,b),
foreign key (a) references t3 match full,
foreign key (a) references t3 match partial,
diff --git a/mysql-test/main/foreign_key.test b/mysql-test/main/foreign_key.test
index 3a09a544532..8f42d43718e 100644
--- a/mysql-test/main/foreign_key.test
+++ b/mysql-test/main/foreign_key.test
@@ -10,7 +10,7 @@ drop table if exists t1,t2;
create table t1 (
a int not null references t2,
- b int not null references t2 (c),
+ b int not null constraint t2_c references t2 (c),
primary key (a,b),
foreign key (a) references t3 match full,
foreign key (a) references t3 match partial,
diff --git a/mysql-test/main/frm-debug.result b/mysql-test/main/frm-debug.result
new file mode 100644
index 00000000000..332d7e00a8f
--- /dev/null
+++ b/mysql-test/main/frm-debug.result
@@ -0,0 +1,24 @@
+#
+# MDEV-20042 Implement EXTRA2_FIELD_DATA_TYPE_INFO in FRM
+#
+SET SESSION debug_dbug="+d,frm_data_type_info";
+CREATE TABLE t1 (c01 INT, c02 CHAR(20), c03 TEXT, c04 DOUBLE);
+Warnings:
+Note 1105 build_frm_image: Field data type info length: 0
+DROP TABLE t1;
+SET SESSION debug_dbug="-d,frm_data_type_info";
+SET SESSION debug_dbug="+d,frm_data_type_info";
+SET SESSION debug_dbug="+d,frm_data_type_info_emulate";
+CREATE TABLE t1 (c01 INT, c02 CHAR(20), c03 TEXT, c04 DOUBLE);
+Warnings:
+Note 1105 build_frm_image: Field data type info length: 14
+Note 1105 DBUG: [0] name='c01' type_info=''
+Note 1105 DBUG: [1] name='c02' type_info='xchar'
+Note 1105 DBUG: [2] name='c03' type_info='xblob'
+Note 1105 DBUG: [3] name='c04' type_info=''
+SET SESSION debug_dbug="-d,frm_data_type_info_emulate";
+SET SESSION debug_dbug="-d,frm_data_type_info";
+FLUSH TABLES;
+SHOW CREATE TABLE t1;
+ERROR HY000: Unknown data type: 'xchar'
+DROP TABLE t1;
diff --git a/mysql-test/main/frm-debug.test b/mysql-test/main/frm-debug.test
new file mode 100644
index 00000000000..d86acdbc7e3
--- /dev/null
+++ b/mysql-test/main/frm-debug.test
@@ -0,0 +1,22 @@
+--source include/have_debug.inc
+
+--echo #
+--echo # MDEV-20042 Implement EXTRA2_FIELD_DATA_TYPE_INFO in FRM
+--echo #
+
+# This should have empty EXTRA2_FIELD_DATA_TYPE_INFO
+SET SESSION debug_dbug="+d,frm_data_type_info";
+CREATE TABLE t1 (c01 INT, c02 CHAR(20), c03 TEXT, c04 DOUBLE);
+DROP TABLE t1;
+SET SESSION debug_dbug="-d,frm_data_type_info";
+
+# This should have non-empty EXTRA2_FIELD_DATA_TYPE_INFO
+SET SESSION debug_dbug="+d,frm_data_type_info";
+SET SESSION debug_dbug="+d,frm_data_type_info_emulate";
+CREATE TABLE t1 (c01 INT, c02 CHAR(20), c03 TEXT, c04 DOUBLE);
+SET SESSION debug_dbug="-d,frm_data_type_info_emulate";
+SET SESSION debug_dbug="-d,frm_data_type_info";
+FLUSH TABLES;
+--error ER_UNKNOWN_DATA_TYPE
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
diff --git a/mysql-test/main/func_bit.result b/mysql-test/main/func_bit.result
new file mode 100644
index 00000000000..4eb44f76ef3
--- /dev/null
+++ b/mysql-test/main/func_bit.result
@@ -0,0 +1,367 @@
+#
+# Start of 10.5 tests
+#
+#
+# MDEV-20305 Data loss on DOUBLE and DECIMAL conversion to INT
+#
+CREATE PROCEDURE p1(type VARCHAR(64), val VARCHAR(64))
+BEGIN
+EXECUTE IMMEDIATE CONCAT('CREATE TABLE t1 (a ', type, ')');
+SHOW CREATE TABLE t1;
+EXECUTE IMMEDIATE CONCAT('INSERT INTO t1 VALUES (', val, ')');
+SELECT
+a,
+~a,
+a & 18446744073709551615,
+18446744073709551615 & a,
+0 | a,
+a | 0,
+a << 0,
+a >> 0,
+a ^ 1,
+1 ^ a,
+BIT_COUNT(a)
+FROM t1;
+SHOW WARNINGS;
+DROP TABLE t1;
+END;
+$$
+CALL p1('BIGINT UNSIGNED', 18446744073709551615);
+Table t1
+Create Table CREATE TABLE `t1` (
+ `a` bigint(20) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 18446744073709551615
+~a 0
+a & 18446744073709551615 18446744073709551615
+18446744073709551615 & a 18446744073709551615
+0 | a 18446744073709551615
+a | 0 18446744073709551615
+a << 0 18446744073709551615
+a >> 0 18446744073709551615
+a ^ 1 18446744073709551614
+1 ^ a 18446744073709551614
+BIT_COUNT(a) 64
+CALL p1('DOUBLE', 18446744073709551615);
+Table t1
+Create Table CREATE TABLE `t1` (
+ `a` double DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 1.8446744073709552e19
+~a 0
+a & 18446744073709551615 18446744073709551615
+18446744073709551615 & a 18446744073709551615
+0 | a 18446744073709551615
+a | 0 18446744073709551615
+a << 0 18446744073709551615
+a >> 0 18446744073709551615
+a ^ 1 18446744073709551614
+1 ^ a 18446744073709551614
+BIT_COUNT(a) 64
+Level Warning
+Code 1916
+Message Got overflow when converting '18446744073709552000' to UNSIGNED INT. Value truncated
+Level Warning
+Code 1916
+Message Got overflow when converting '18446744073709552000' to UNSIGNED INT. Value truncated
+Level Warning
+Code 1916
+Message Got overflow when converting '18446744073709552000' to UNSIGNED INT. Value truncated
+Level Warning
+Code 1916
+Message Got overflow when converting '18446744073709552000' to UNSIGNED INT. Value truncated
+Level Warning
+Code 1916
+Message Got overflow when converting '18446744073709552000' to UNSIGNED INT. Value truncated
+Level Warning
+Code 1916
+Message Got overflow when converting '18446744073709552000' to UNSIGNED INT. Value truncated
+Level Warning
+Code 1916
+Message Got overflow when converting '18446744073709552000' to UNSIGNED INT. Value truncated
+Level Warning
+Code 1916
+Message Got overflow when converting '18446744073709552000' to UNSIGNED INT. Value truncated
+Level Warning
+Code 1916
+Message Got overflow when converting '18446744073709552000' to UNSIGNED INT. Value truncated
+Level Warning
+Code 1916
+Message Got overflow when converting '18446744073709552000' to UNSIGNED INT. Value truncated
+CALL p1('DECIMAL(30,0)', 18446744073709551615);
+Table t1
+Create Table CREATE TABLE `t1` (
+ `a` decimal(30,0) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 18446744073709551615
+~a 0
+a & 18446744073709551615 18446744073709551615
+18446744073709551615 & a 18446744073709551615
+0 | a 18446744073709551615
+a | 0 18446744073709551615
+a << 0 18446744073709551615
+a >> 0 18446744073709551615
+a ^ 1 18446744073709551614
+1 ^ a 18446744073709551614
+BIT_COUNT(a) 64
+CALL p1('BIGINT', -1);
+Table t1
+Create Table CREATE TABLE `t1` (
+ `a` bigint(20) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a -1
+~a 0
+a & 18446744073709551615 18446744073709551615
+18446744073709551615 & a 18446744073709551615
+0 | a 18446744073709551615
+a | 0 18446744073709551615
+a << 0 18446744073709551615
+a >> 0 18446744073709551615
+a ^ 1 18446744073709551614
+1 ^ a 18446744073709551614
+BIT_COUNT(a) 64
+CALL p1('DOUBLE', -1);
+Table t1
+Create Table CREATE TABLE `t1` (
+ `a` double DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a -1
+~a 0
+a & 18446744073709551615 18446744073709551615
+18446744073709551615 & a 18446744073709551615
+0 | a 18446744073709551615
+a | 0 18446744073709551615
+a << 0 18446744073709551615
+a >> 0 18446744073709551615
+a ^ 1 18446744073709551614
+1 ^ a 18446744073709551614
+BIT_COUNT(a) 64
+CALL p1('DECIMAL(30,0)', -1);
+Table t1
+Create Table CREATE TABLE `t1` (
+ `a` decimal(30,0) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a -1
+~a 0
+a & 18446744073709551615 18446744073709551615
+18446744073709551615 & a 18446744073709551615
+0 | a 18446744073709551615
+a | 0 18446744073709551615
+a << 0 18446744073709551615
+a >> 0 18446744073709551615
+a ^ 1 18446744073709551614
+1 ^ a 18446744073709551614
+BIT_COUNT(a) 64
+CALL p1('BIGINT', -9223372036854775808);
+Table t1
+Create Table CREATE TABLE `t1` (
+ `a` bigint(20) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a -9223372036854775808
+~a 9223372036854775807
+a & 18446744073709551615 9223372036854775808
+18446744073709551615 & a 9223372036854775808
+0 | a 9223372036854775808
+a | 0 9223372036854775808
+a << 0 9223372036854775808
+a >> 0 9223372036854775808
+a ^ 1 9223372036854775809
+1 ^ a 9223372036854775809
+BIT_COUNT(a) 1
+CALL p1('DOUBLE', -9223372036854775808);
+Table t1
+Create Table CREATE TABLE `t1` (
+ `a` double DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a -9.223372036854776e18
+~a 9223372036854775807
+a & 18446744073709551615 9223372036854775808
+18446744073709551615 & a 9223372036854775808
+0 | a 9223372036854775808
+a | 0 9223372036854775808
+a << 0 9223372036854775808
+a >> 0 9223372036854775808
+a ^ 1 9223372036854775809
+1 ^ a 9223372036854775809
+BIT_COUNT(a) 1
+Level Warning
+Code 1916
+Message Got overflow when converting '-9223372036854776000' to INT. Value truncated
+Level Warning
+Code 1916
+Message Got overflow when converting '-9223372036854776000' to INT. Value truncated
+Level Warning
+Code 1916
+Message Got overflow when converting '-9223372036854776000' to INT. Value truncated
+Level Warning
+Code 1916
+Message Got overflow when converting '-9223372036854776000' to INT. Value truncated
+Level Warning
+Code 1916
+Message Got overflow when converting '-9223372036854776000' to INT. Value truncated
+Level Warning
+Code 1916
+Message Got overflow when converting '-9223372036854776000' to INT. Value truncated
+Level Warning
+Code 1916
+Message Got overflow when converting '-9223372036854776000' to INT. Value truncated
+Level Warning
+Code 1916
+Message Got overflow when converting '-9223372036854776000' to INT. Value truncated
+Level Warning
+Code 1916
+Message Got overflow when converting '-9223372036854776000' to INT. Value truncated
+Level Warning
+Code 1916
+Message Got overflow when converting '-9223372036854776000' to INT. Value truncated
+CALL p1('DECIMAL(30,0)', -9223372036854775808);
+Table t1
+Create Table CREATE TABLE `t1` (
+ `a` decimal(30,0) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a -9223372036854775808
+~a 9223372036854775807
+a & 18446744073709551615 9223372036854775808
+18446744073709551615 & a 9223372036854775808
+0 | a 9223372036854775808
+a | 0 9223372036854775808
+a << 0 9223372036854775808
+a >> 0 9223372036854775808
+a ^ 1 9223372036854775809
+1 ^ a 9223372036854775809
+BIT_COUNT(a) 1
+DROP PROCEDURE p1;
+SELECT CAST(CAST(18446744073709551615 AS UNSIGNED) AS DECIMAL(32))<<0 AS c1;
+c1
+18446744073709551615
+SELECT CAST(CAST(18446744073709551615 AS UNSIGNED) AS DOUBLE)<<0 AS c1;
+c1
+18446744073709551615
+Warnings:
+Warning 1916 Got overflow when converting '18446744073709552000' to UNSIGNED INT. Value truncated
+SELECT COALESCE(CAST(CAST(0xFFFFFFFFFFFFFFFF AS UNSIGNED) AS DECIMAL(32))) << 0 AS c1;
+c1
+18446744073709551615
+SELECT COALESCE(CAST(CAST(0xFFFFFFFFFFFFFFFF AS UNSIGNED) AS DOUBLE)) << 0 AS c1;
+c1
+18446744073709551615
+Warnings:
+Warning 1916 Got overflow when converting '18446744073709552000' to UNSIGNED INT. Value truncated
+SELECT 18446744073709551615 ^ 1 AS c1;
+c1
+18446744073709551614
+SELECT 18446744073709551615.0 ^ 1 AS c1;
+c1
+18446744073709551614
+SELECT 18446744073709551615e0 ^ 1 AS c1;
+c1
+18446744073709551614
+Warnings:
+Warning 1916 Got overflow when converting '18446744073709552000' to UNSIGNED INT. Value truncated
+SELECT LAST_VALUE(18446744073709551615) ^ 1 AS c1;
+c1
+18446744073709551614
+SELECT LAST_VALUE(18446744073709551615.0) ^ 1 AS c1;
+c1
+18446744073709551614
+SELECT LAST_VALUE(18446744073709551615e0) ^ 1 AS c1;
+c1
+18446744073709551614
+Warnings:
+Warning 1916 Got overflow when converting '18446744073709552000' to UNSIGNED INT. Value truncated
+SELECT 18446744073709551615 & 18446744073709551615 AS c1;
+c1
+18446744073709551615
+SELECT 18446744073709551615 & 18446744073709551615.0 AS c1;
+c1
+18446744073709551615
+SELECT 18446744073709551615 & 18446744073709551615e0 AS c1;
+c1
+18446744073709551615
+Warnings:
+Warning 1916 Got overflow when converting '18446744073709552000' to UNSIGNED INT. Value truncated
+SELECT 18446744073709551615.0 & 18446744073709551615 AS c1;
+c1
+18446744073709551615
+SELECT 18446744073709551615.0 & 18446744073709551615.0 AS c1;
+c1
+18446744073709551615
+SELECT 18446744073709551615.0 & 18446744073709551615e0 AS c1;
+c1
+18446744073709551615
+Warnings:
+Warning 1916 Got overflow when converting '18446744073709552000' to UNSIGNED INT. Value truncated
+SELECT 18446744073709551615e0 & 18446744073709551615 AS c1;
+c1
+18446744073709551615
+Warnings:
+Warning 1916 Got overflow when converting '18446744073709552000' to UNSIGNED INT. Value truncated
+SELECT 18446744073709551615e0 & 18446744073709551615.0 AS c1;
+c1
+18446744073709551615
+Warnings:
+Warning 1916 Got overflow when converting '18446744073709552000' to UNSIGNED INT. Value truncated
+SELECT 18446744073709551615e0 & 18446744073709551615e0 AS c1;
+c1
+18446744073709551615
+Warnings:
+Warning 1916 Got overflow when converting '18446744073709552000' to UNSIGNED INT. Value truncated
+Warning 1916 Got overflow when converting '18446744073709552000' to UNSIGNED INT. Value truncated
+SELECT 0 | 18446744073709551615 AS c1;
+c1
+18446744073709551615
+SELECT 0 | 18446744073709551615.0 AS c1;
+c1
+18446744073709551615
+SELECT 0 | 18446744073709551615e0 AS c1;
+c1
+18446744073709551615
+Warnings:
+Warning 1916 Got overflow when converting '18446744073709552000' to UNSIGNED INT. Value truncated
+SELECT 18446744073709551615 | 0 AS c1;
+c1
+18446744073709551615
+SELECT 18446744073709551615.0 | 0 AS c1;
+c1
+18446744073709551615
+SELECT 18446744073709551615e0 | 0 AS c1;
+c1
+18446744073709551615
+Warnings:
+Warning 1916 Got overflow when converting '18446744073709552000' to UNSIGNED INT. Value truncated
+SELECT ~18446744073709551615 AS c1;
+c1
+0
+SELECT ~18446744073709551615.0 AS c1;
+c1
+0
+SELECT ~18446744073709551615e0 AS c1;
+c1
+0
+Warnings:
+Warning 1916 Got overflow when converting '18446744073709552000' to UNSIGNED INT. Value truncated
+SELECT BIT_COUNT(18446744073709551615) AS c1;
+c1
+64
+SELECT BIT_COUNT(18446744073709551615.0) AS c1;
+c1
+64
+SELECT BIT_COUNT(18446744073709551615e0) AS c1;
+c1
+64
+Warnings:
+Warning 1916 Got overflow when converting '18446744073709552000' to UNSIGNED INT. Value truncated
+SELECT BIT_COUNT(-9223372036854775808) AS c1;
+c1
+1
+SELECT BIT_COUNT(-9223372036854775808.0) AS c1;
+c1
+1
+SELECT BIT_COUNT(-9223372036854775808e0) AS c1;
+c1
+1
+Warnings:
+Warning 1916 Got overflow when converting '-9223372036854776000' to INT. Value truncated
+#
+# End of 10.5 tests
+#
diff --git a/mysql-test/main/func_bit.test b/mysql-test/main/func_bit.test
new file mode 100644
index 00000000000..e4f3189eafc
--- /dev/null
+++ b/mysql-test/main/func_bit.test
@@ -0,0 +1,97 @@
+--echo #
+--echo # Start of 10.5 tests
+--echo #
+
+--echo #
+--echo # MDEV-20305 Data loss on DOUBLE and DECIMAL conversion to INT
+--echo #
+
+DELIMITER $$;
+CREATE PROCEDURE p1(type VARCHAR(64), val VARCHAR(64))
+BEGIN
+ EXECUTE IMMEDIATE CONCAT('CREATE TABLE t1 (a ', type, ')');
+ SHOW CREATE TABLE t1;
+ EXECUTE IMMEDIATE CONCAT('INSERT INTO t1 VALUES (', val, ')');
+ SELECT
+ a,
+ ~a,
+ a & 18446744073709551615,
+ 18446744073709551615 & a,
+ 0 | a,
+ a | 0,
+ a << 0,
+ a >> 0,
+ a ^ 1,
+ 1 ^ a,
+ BIT_COUNT(a)
+ FROM t1;
+ SHOW WARNINGS;
+ DROP TABLE t1;
+END;
+$$
+DELIMITER ;$$
+
+--vertical_results
+CALL p1('BIGINT UNSIGNED', 18446744073709551615);
+CALL p1('DOUBLE', 18446744073709551615);
+CALL p1('DECIMAL(30,0)', 18446744073709551615);
+
+CALL p1('BIGINT', -1);
+CALL p1('DOUBLE', -1);
+CALL p1('DECIMAL(30,0)', -1);
+
+CALL p1('BIGINT', -9223372036854775808);
+CALL p1('DOUBLE', -9223372036854775808);
+CALL p1('DECIMAL(30,0)', -9223372036854775808);
+--horizontal_results
+
+DROP PROCEDURE p1;
+
+
+SELECT CAST(CAST(18446744073709551615 AS UNSIGNED) AS DECIMAL(32))<<0 AS c1;
+SELECT CAST(CAST(18446744073709551615 AS UNSIGNED) AS DOUBLE)<<0 AS c1;
+
+SELECT COALESCE(CAST(CAST(0xFFFFFFFFFFFFFFFF AS UNSIGNED) AS DECIMAL(32))) << 0 AS c1;
+SELECT COALESCE(CAST(CAST(0xFFFFFFFFFFFFFFFF AS UNSIGNED) AS DOUBLE)) << 0 AS c1;
+
+SELECT 18446744073709551615 ^ 1 AS c1;
+SELECT 18446744073709551615.0 ^ 1 AS c1;
+SELECT 18446744073709551615e0 ^ 1 AS c1;
+
+SELECT LAST_VALUE(18446744073709551615) ^ 1 AS c1;
+SELECT LAST_VALUE(18446744073709551615.0) ^ 1 AS c1;
+SELECT LAST_VALUE(18446744073709551615e0) ^ 1 AS c1;
+
+SELECT 18446744073709551615 & 18446744073709551615 AS c1;
+SELECT 18446744073709551615 & 18446744073709551615.0 AS c1;
+SELECT 18446744073709551615 & 18446744073709551615e0 AS c1;
+SELECT 18446744073709551615.0 & 18446744073709551615 AS c1;
+SELECT 18446744073709551615.0 & 18446744073709551615.0 AS c1;
+SELECT 18446744073709551615.0 & 18446744073709551615e0 AS c1;
+SELECT 18446744073709551615e0 & 18446744073709551615 AS c1;
+SELECT 18446744073709551615e0 & 18446744073709551615.0 AS c1;
+SELECT 18446744073709551615e0 & 18446744073709551615e0 AS c1;
+
+
+SELECT 0 | 18446744073709551615 AS c1;
+SELECT 0 | 18446744073709551615.0 AS c1;
+SELECT 0 | 18446744073709551615e0 AS c1;
+SELECT 18446744073709551615 | 0 AS c1;
+SELECT 18446744073709551615.0 | 0 AS c1;
+SELECT 18446744073709551615e0 | 0 AS c1;
+
+SELECT ~18446744073709551615 AS c1;
+SELECT ~18446744073709551615.0 AS c1;
+SELECT ~18446744073709551615e0 AS c1;
+
+SELECT BIT_COUNT(18446744073709551615) AS c1;
+SELECT BIT_COUNT(18446744073709551615.0) AS c1;
+SELECT BIT_COUNT(18446744073709551615e0) AS c1;
+
+SELECT BIT_COUNT(-9223372036854775808) AS c1;
+SELECT BIT_COUNT(-9223372036854775808.0) AS c1;
+SELECT BIT_COUNT(-9223372036854775808e0) AS c1;
+
+--echo #
+--echo # End of 10.5 tests
+--echo #
diff --git a/mysql-test/main/func_crypt.result b/mysql-test/main/func_crypt.result
index aaa6aa61eae..2c42d3dc845 100644
--- a/mysql-test/main/func_crypt.result
+++ b/mysql-test/main/func_crypt.result
@@ -214,3 +214,4 @@ SELECT * FROM t1;
a b
hello 12NKz5XM5JeKI
DROP TABLE t1;
+# End of 10.2 tests
diff --git a/mysql-test/main/func_crypt.test b/mysql-test/main/func_crypt.test
index d091aa4ae86..118a7023669 100644
--- a/mysql-test/main/func_crypt.test
+++ b/mysql-test/main/func_crypt.test
@@ -120,3 +120,5 @@ SHOW CREATE TABLE t1;
INSERT INTO t1 (a) VALUES ('hello');
SELECT * FROM t1;
DROP TABLE t1;
+
+--echo # End of 10.2 tests
diff --git a/mysql-test/main/func_debug.result b/mysql-test/main/func_debug.result
index 47bbced730b..08650fdd3c3 100644
--- a/mysql-test/main/func_debug.result
+++ b/mysql-test/main/func_debug.result
@@ -1723,7 +1723,7 @@ a
2
3
Warnings:
-Note 1105 bin_eq=0 a=(int)-1 b=(bigint)18446744073709551615
+Note 1105 bin_eq=0 a=(int)-1 b=(bigint unsigned)18446744073709551615
SELECT * FROM t1 WHERE a BETWEEN -1 AND 18446744073709551616;
a
1
@@ -1746,7 +1746,7 @@ a
2
3
Warnings:
-Note 1105 bin_eq=0 a=(int)-1 b=(bigint)18446744073709551615
+Note 1105 bin_eq=0 a=(int)-1 b=(bigint unsigned)18446744073709551615
EXECUTE IMMEDIATE 'SELECT * FROM t1 WHERE a BETWEEN -1 AND ?' USING 18446744073709551616;
a
1
@@ -1863,8 +1863,8 @@ Warnings:
Note 1105 DBUG: [0] arg=1 handler=0 (row)
Note 1105 DBUG: [1] arg=2 handler=0 (row)
Note 1105 DBUG: ROW(3 args) level=0
-Note 1105 DBUG: [0,0] handler=bigint
-Note 1105 DBUG: [0,1] handler=bigint
+Note 1105 DBUG: [0,0] handler=bigint unsigned
+Note 1105 DBUG: [0,1] handler=bigint unsigned
Note 1105 DBUG: [0,2] handler=int
Note 1105 DBUG: => handler=decimal
Note 1105 DBUG: [1,0] handler=int
diff --git a/mysql-test/main/func_des_encrypt.result b/mysql-test/main/func_des_encrypt.result
index b81f96f6ef7..540596589b6 100644
--- a/mysql-test/main/func_des_encrypt.result
+++ b/mysql-test/main/func_des_encrypt.result
@@ -35,3 +35,41 @@ DES_DECRYPT(DES_ENCRYPT('1234')) DES_DECRYPT(DES_ENCRYPT('12345')) DES_DECRYPT(D
1234 12345 123456 1234567
DROP TABLE t1;
End of 5.0 tests
+#
+# MDEV-23330 Server crash or ASAN negative-size-param in
+# my_strnncollsp_binary / SORT_FIELD_ATTR::compare_packed_varstrings
+#
+CREATE TABLE t1 (a CHAR(240), b BIT(48));
+INSERT INTO t1 VALUES ('a',b'0001'),('b',b'0010'),('c',b'0011'),('d',b'0100'),('e',b'0001'),('f',b'0101'),('g',b'0110'),('h',b'0111'),('i',b'1000'),('j',b'1001');
+SELECT DES_DECRYPT(a, 'x'), HEX(BINARY b) FROM t1 GROUP BY 1, 2 WITH ROLLUP;
+DES_DECRYPT(a, 'x') HEX(BINARY b)
+a 000000000001
+a NULL
+b 000000000002
+b NULL
+c 000000000003
+c NULL
+d 000000000004
+d NULL
+e 000000000001
+e NULL
+f 000000000005
+f NULL
+g 000000000006
+g NULL
+h 000000000007
+h NULL
+i 000000000008
+i NULL
+j 000000000009
+j NULL
+NULL NULL
+DROP TABLE t1;
+CREATE TABLE t1 (a INT);
+INSERT t1 VALUES (1),(2);
+SELECT CHAR_LENGTH(a), DES_DECRYPT(a) FROM (SELECT _utf8 0xC2A2 AS a FROM t1) AS t2;
+CHAR_LENGTH(a) DES_DECRYPT(a)
+1 ¢
+1 ¢
+DROP TABLE t1;
+End of 10.5 tests
diff --git a/mysql-test/main/func_des_encrypt.test b/mysql-test/main/func_des_encrypt.test
index c9661b81cc0..44fc30ff00f 100644
--- a/mysql-test/main/func_des_encrypt.test
+++ b/mysql-test/main/func_des_encrypt.test
@@ -37,3 +37,24 @@ SELECT
DROP TABLE t1;
--Echo End of 5.0 tests
+
+--echo #
+--echo # MDEV-23330 Server crash or ASAN negative-size-param in
+--echo # my_strnncollsp_binary / SORT_FIELD_ATTR::compare_packed_varstrings
+--echo #
+
+CREATE TABLE t1 (a CHAR(240), b BIT(48));
+INSERT INTO t1 VALUES ('a',b'0001'),('b',b'0010'),('c',b'0011'),('d',b'0100'),('e',b'0001'),('f',b'0101'),('g',b'0110'),('h',b'0111'),('i',b'1000'),('j',b'1001');
+SELECT DES_DECRYPT(a, 'x'), HEX(BINARY b) FROM t1 GROUP BY 1, 2 WITH ROLLUP;
+DROP TABLE t1;
+
+#
+# don't change the charset of a literal Item_string
+#
+
+CREATE TABLE t1 (a INT);
+INSERT t1 VALUES (1),(2);
+SELECT CHAR_LENGTH(a), DES_DECRYPT(a) FROM (SELECT _utf8 0xC2A2 AS a FROM t1) AS t2;
+DROP TABLE t1;
+
+--Echo End of 10.5 tests
diff --git a/mysql-test/main/func_gconcat.result b/mysql-test/main/func_gconcat.result
index a7517e98134..328bbc953ab 100644
--- a/mysql-test/main/func_gconcat.result
+++ b/mysql-test/main/func_gconcat.result
@@ -1043,7 +1043,7 @@ DROP TABLE t1;
CREATE TABLE t1(f1 int);
INSERT INTO t1 values (0),(0);
SELECT POLYGON((SELECT 1 FROM (SELECT 1 IN (GROUP_CONCAT(t1.f1)) FROM t1, t1 t GROUP BY t.f1 ) d));
-ERROR HY000: Illegal parameter data type int for operation 'geometrycollection'
+ERROR HY000: Illegal parameter data type int for operation 'polygon'
DROP TABLE t1;
#
# Bug#58396 group_concat and explain extended are still crashy
diff --git a/mysql-test/main/func_group.result b/mysql-test/main/func_group.result
index 071c155cd6b..177f0950a77 100644
--- a/mysql-test/main/func_group.result
+++ b/mysql-test/main/func_group.result
@@ -604,11 +604,11 @@ AME AME
explain
select min(a1) from t1 where a1 > 'KKK' or a1 < 'XXX';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index PRIMARY PRIMARY 3 NULL 15 Using where; Using index
+1 SIMPLE t1 range PRIMARY PRIMARY 0 NULL 15 Using where; Using index
explain
select min(a1) from t1 where (a1 < 'KKK' or a1 > 'KKK');
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index PRIMARY PRIMARY 3 NULL 15 Using where; Using index
+1 SIMPLE t1 range PRIMARY PRIMARY 3 NULL 14 Using where; Using index
explain
select max(a3) from t1 where a2 < 2 and a3 < 'SEA';
id select_type table type possible_keys key key_len ref rows Extra
@@ -653,7 +653,7 @@ id select_type table type possible_keys key key_len ref rows Extra
explain
select concat(min(t1.a1),min(t2.a4)) from t1, t2 where t2.a4 <> 'AME';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 index k2 k2 4 NULL 7 Using where; Using index
+1 SIMPLE t2 range k2 k2 4 NULL 6 Using where; Using index
1 SIMPLE t1 index NULL PRIMARY 3 NULL 15 Using index; Using join buffer (flat, BNL join)
drop table t1, t2;
create table t1 (a char(10));
@@ -1927,7 +1927,7 @@ b
EXPLAIN
SELECT MIN(f2) FROM t1 WHERE f2 >= 'abc';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index f2 f2 4 NULL 2 Using where; Using index
+1 SIMPLE t1 range f2 f2 4 NULL 1 Using where; Using index
SELECT MIN(f2) FROM t1 WHERE f2 >= 'abc';
MIN(f2)
b
@@ -1941,7 +1941,7 @@ b
EXPLAIN
SELECT MIN(f2) FROM t1 WHERE f2 BETWEEN 'abc' AND 'b' ;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index f2 f2 4 NULL 2 Using where; Using index
+1 SIMPLE t1 range f2 f2 4 NULL 1 Using where; Using index
SELECT MIN(f2) FROM t1 WHERE f2 BETWEEN 'abc' AND 'b' ;
MIN(f2)
b
@@ -2326,7 +2326,7 @@ SELECT MAX('x') << 1, CAST(MAX('x') AS DOUBLE), CAST(MAX('x') AS DECIMAL);
MAX('x') << 1 CAST(MAX('x') AS DOUBLE) CAST(MAX('x') AS DECIMAL)
0 0 0
Warnings:
-Warning 1292 Truncated incorrect INTEGER value: 'x'
+Warning 1292 Truncated incorrect DECIMAL value: 'x'
Warning 1292 Truncated incorrect DOUBLE value: 'x'
Warning 1292 Truncated incorrect DECIMAL value: 'x'
#
diff --git a/mysql-test/main/func_group_innodb.result b/mysql-test/main/func_group_innodb.result
index a4c9b574585..f5a823e4638 100644
--- a/mysql-test/main/func_group_innodb.result
+++ b/mysql-test/main/func_group_innodb.result
@@ -225,8 +225,8 @@ DROP TABLE t1;
#
# MDEV-4269: crash when grouping by values()
#
-SELECT @@storage_engine INTO @old_engine;
-set storage_engine=innodb;
+SELECT @@default_storage_engine INTO @old_engine;
+set default_storage_engine=innodb;
create table y select 1 b;
select 1 from y group by b;
1
@@ -235,7 +235,7 @@ select 1 from y group by value(b);
1
1
drop table y;
-SET storage_engine=@old_engine;
+SET default_storage_engine=@old_engine;
#
# Bug#13723054 CRASH WITH MIN/MAX AFTER QUICK_GROUP_MIN_MAX_SELECT::NEXT_MIN
#
diff --git a/mysql-test/main/func_group_innodb.test b/mysql-test/main/func_group_innodb.test
index 6141b4d85ed..748c64a43c6 100644
--- a/mysql-test/main/func_group_innodb.test
+++ b/mysql-test/main/func_group_innodb.test
@@ -170,14 +170,14 @@ DROP TABLE t1;
--echo # MDEV-4269: crash when grouping by values()
--echo #
-SELECT @@storage_engine INTO @old_engine;
-set storage_engine=innodb;
+SELECT @@default_storage_engine INTO @old_engine;
+set default_storage_engine=innodb;
create table y select 1 b;
select 1 from y group by b;
select 1 from y group by value(b);
drop table y;
-SET storage_engine=@old_engine;
+SET default_storage_engine=@old_engine;
### End of 5.1 tests
diff --git a/mysql-test/main/func_hybrid_type.result b/mysql-test/main/func_hybrid_type.result
index 83965bc6db5..4be42cee523 100644
--- a/mysql-test/main/func_hybrid_type.result
+++ b/mysql-test/main/func_hybrid_type.result
@@ -4119,3 +4119,199 @@ c
#
# End of 10.4 tests
#
+#
+# Start of 10.5 tests
+#
+#
+# MDEV-20332 Wrong UNSIGNED metadata flag returned for COALESCE(unsigned_field,timestamp_field)
+#
+CREATE TABLE t1 (a INT UNSIGNED, b TIMESTAMP);
+SELECT COALESCE(a,b) FROM t1;
+Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
+def COALESCE(a,b) 253 19 0 Y 0 39 8
+COALESCE(a,b)
+DROP TABLE t1;
+#
+# MDEV-20353 Add separate type handlers for unsigned integer data types
+#
+# Constant
+SELECT 1=ROW(1,1);
+ERROR HY000: Illegal parameter data types int and row for operation '='
+SELECT -1=ROW(1,1);
+ERROR HY000: Illegal parameter data types int and row for operation '='
+SELECT 9223372036854775807=ROW(1,1);
+ERROR HY000: Illegal parameter data types bigint and row for operation '='
+SELECT 9223372036854775808=ROW(1,1);
+ERROR HY000: Illegal parameter data types bigint unsigned and row for operation '='
+SELECT 18446744073709551615=ROW(1,1);
+ERROR HY000: Illegal parameter data types bigint unsigned and row for operation '='
+# COALESCE
+CREATE TABLE t1 (a TINYINT UNSIGNED, b TINYINT);
+SELECT COALESCE(a,a)=ROW(1,1) FROM t1;
+ERROR HY000: Illegal parameter data types tiny unsigned and row for operation '='
+SELECT COALESCE(b,b)=ROW(1,1) FROM t1;
+ERROR HY000: Illegal parameter data types tinyint and row for operation '='
+DROP TABLE t1;
+CREATE TABLE t1 (a SMALLINT UNSIGNED, b SMALLINT);
+SELECT COALESCE(a,a)=ROW(1,1) FROM t1;
+ERROR HY000: Illegal parameter data types smallint unsigned and row for operation '='
+SELECT COALESCE(b,b)=ROW(1,1) FROM t1;
+ERROR HY000: Illegal parameter data types smallint and row for operation '='
+DROP TABLE t1;
+CREATE TABLE t1 (a MEDIUMINT UNSIGNED, b MEDIUMINT);
+SELECT COALESCE(a,a)=ROW(1,1) FROM t1;
+ERROR HY000: Illegal parameter data types mediumint unsigned and row for operation '='
+SELECT COALESCE(b,b)=ROW(1,1) FROM t1;
+ERROR HY000: Illegal parameter data types mediumint and row for operation '='
+DROP TABLE t1;
+CREATE TABLE t1 (a INT UNSIGNED, b INT);
+SELECT COALESCE(a,a)=ROW(1,1) FROM t1;
+ERROR HY000: Illegal parameter data types int unsigned and row for operation '='
+SELECT COALESCE(b,b)=ROW(1,1) FROM t1;
+ERROR HY000: Illegal parameter data types int and row for operation '='
+DROP TABLE t1;
+CREATE TABLE t1 (a BIGINT UNSIGNED, b BIGINT);
+SELECT COALESCE(a,a)=ROW(1,1) FROM t1;
+ERROR HY000: Illegal parameter data types bigint unsigned and row for operation '='
+SELECT COALESCE(b,b)=ROW(1,1) FROM t1;
+ERROR HY000: Illegal parameter data types bigint and row for operation '='
+DROP TABLE t1;
+# COALESCE for different types integer types, with the UNSIGNED flag
+CREATE TABLE t1 (a1 TINYINT UNSIGNED, a2 SMALLINT UNSIGNED);
+SELECT COALESCE(a1,a2)=ROW(1,1) FROM t1;
+ERROR HY000: Illegal parameter data types smallint unsigned and row for operation '='
+DROP TABLE t1;
+CREATE TABLE t1 (a1 SMALLINT UNSIGNED, a2 MEDIUMINT UNSIGNED);
+SELECT COALESCE(a1,a2)=ROW(1,1) FROM t1;
+ERROR HY000: Illegal parameter data types mediumint unsigned and row for operation '='
+DROP TABLE t1;
+CREATE TABLE t1 (a1 MEDIUMINT UNSIGNED, a2 INT UNSIGNED);
+SELECT COALESCE(a1,a2)=ROW(1,1) FROM t1;
+ERROR HY000: Illegal parameter data types int unsigned and row for operation '='
+DROP TABLE t1;
+CREATE TABLE t1 (a1 INT UNSIGNED, a2 BIGINT UNSIGNED);
+SELECT COALESCE(a1,a2)=ROW(1,1) FROM t1;
+ERROR HY000: Illegal parameter data types bigint unsigned and row for operation '='
+DROP TABLE t1;
+# COALESCE for different types integer types, without the UNSIGNED flag
+CREATE TABLE t1 (a1 TINYINT, a2 SMALLINT);
+SELECT COALESCE(a1,a2)=ROW(1,1) FROM t1;
+ERROR HY000: Illegal parameter data types smallint and row for operation '='
+DROP TABLE t1;
+CREATE TABLE t1 (a1 SMALLINT, a2 MEDIUMINT);
+SELECT COALESCE(a1,a2)=ROW(1,1) FROM t1;
+ERROR HY000: Illegal parameter data types mediumint and row for operation '='
+DROP TABLE t1;
+CREATE TABLE t1 (a1 MEDIUMINT, a2 INT);
+SELECT COALESCE(a1,a2)=ROW(1,1) FROM t1;
+ERROR HY000: Illegal parameter data types int and row for operation '='
+DROP TABLE t1;
+CREATE TABLE t1 (a1 INT, a2 BIGINT);
+SELECT COALESCE(a1,a2)=ROW(1,1) FROM t1;
+ERROR HY000: Illegal parameter data types bigint and row for operation '='
+DROP TABLE t1;
+# Operator +
+CREATE TABLE t1 (a TINYINT UNSIGNED, b TINYINT);
+SELECT (a+a)=ROW(1,1) FROM t1;
+ERROR HY000: Illegal parameter data types int unsigned and row for operation '='
+SELECT (b+b)=ROW(1,1) FROM t1;
+ERROR HY000: Illegal parameter data types int and row for operation '='
+DROP TABLE t1;
+CREATE TABLE t1 (a SMALLINT UNSIGNED, b SMALLINT);
+SELECT (a+a)=ROW(1,1) FROM t1;
+ERROR HY000: Illegal parameter data types int unsigned and row for operation '='
+SELECT (b+b)=ROW(1,1) FROM t1;
+ERROR HY000: Illegal parameter data types int and row for operation '='
+DROP TABLE t1;
+CREATE TABLE t1 (a MEDIUMINT UNSIGNED, b MEDIUMINT);
+SELECT (a+a)=ROW(1,1) FROM t1;
+ERROR HY000: Illegal parameter data types int unsigned and row for operation '='
+SELECT (b+b)=ROW(1,1) FROM t1;
+ERROR HY000: Illegal parameter data types bigint and row for operation '='
+DROP TABLE t1;
+CREATE TABLE t1 (a INT UNSIGNED, b INT);
+SELECT (a+a)=ROW(1,1) FROM t1;
+ERROR HY000: Illegal parameter data types bigint unsigned and row for operation '='
+SELECT (b+b)=ROW(1,1) FROM t1;
+ERROR HY000: Illegal parameter data types bigint and row for operation '='
+DROP TABLE t1;
+CREATE TABLE t1 (a BIGINT UNSIGNED, b BIGINT);
+SELECT (a+a)=ROW(1,1) FROM t1;
+ERROR HY000: Illegal parameter data types bigint unsigned and row for operation '='
+SELECT (b+b)=ROW(1,1) FROM t1;
+ERROR HY000: Illegal parameter data types bigint and row for operation '='
+DROP TABLE t1;
+# Opetator + for different types integer types, with the UNSIGNED flag
+CREATE TABLE t1 (a1 TINYINT UNSIGNED, a2 SMALLINT UNSIGNED);
+SELECT (a1+a2)=ROW(1,1) FROM t1;
+ERROR HY000: Illegal parameter data types int unsigned and row for operation '='
+DROP TABLE t1;
+CREATE TABLE t1 (a1 SMALLINT UNSIGNED, a2 MEDIUMINT UNSIGNED);
+SELECT (a1+a2)=ROW(1,1) FROM t1;
+ERROR HY000: Illegal parameter data types int unsigned and row for operation '='
+DROP TABLE t1;
+CREATE TABLE t1 (a1 MEDIUMINT UNSIGNED, a2 INT UNSIGNED);
+SELECT (a1+a2)=ROW(1,1) FROM t1;
+ERROR HY000: Illegal parameter data types bigint unsigned and row for operation '='
+DROP TABLE t1;
+CREATE TABLE t1 (a1 INT UNSIGNED, a2 BIGINT UNSIGNED);
+SELECT (a1+a2)=ROW(1,1) FROM t1;
+ERROR HY000: Illegal parameter data types bigint unsigned and row for operation '='
+DROP TABLE t1;
+# Operator + for different types integer types, without the UNSIGNED flag
+CREATE TABLE t1 (a1 TINYINT, a2 SMALLINT);
+SELECT (a1+a2)=ROW(1,1) FROM t1;
+ERROR HY000: Illegal parameter data types int and row for operation '='
+DROP TABLE t1;
+CREATE TABLE t1 (a1 SMALLINT, a2 MEDIUMINT);
+SELECT (a1+a2)=ROW(1,1) FROM t1;
+ERROR HY000: Illegal parameter data types bigint and row for operation '='
+DROP TABLE t1;
+CREATE TABLE t1 (a1 MEDIUMINT, a2 INT);
+SELECT (a1+a2)=ROW(1,1) FROM t1;
+ERROR HY000: Illegal parameter data types bigint and row for operation '='
+DROP TABLE t1;
+CREATE TABLE t1 (a1 INT, a2 BIGINT);
+SELECT (a1+a2)=ROW(1,1) FROM t1;
+ERROR HY000: Illegal parameter data types bigint and row for operation '='
+DROP TABLE t1;
+# SUM
+CREATE TABLE t1 (a TINYINT UNSIGNED, b TINYINT);
+SELECT MAX(a)=ROW(1,1) FROM t1;
+ERROR HY000: Illegal parameter data types tiny unsigned and row for operation '='
+SELECT MAX(b)=ROW(1,1) FROM t1;
+ERROR HY000: Illegal parameter data types tinyint and row for operation '='
+DROP TABLE t1;
+CREATE TABLE t1 (a SMALLINT UNSIGNED, b SMALLINT);
+SELECT MAX(a)=ROW(1,1) FROM t1;
+ERROR HY000: Illegal parameter data types smallint unsigned and row for operation '='
+SELECT MAX(b)=ROW(1,1) FROM t1;
+ERROR HY000: Illegal parameter data types smallint and row for operation '='
+DROP TABLE t1;
+CREATE TABLE t1 (a MEDIUMINT UNSIGNED, b MEDIUMINT);
+SELECT MAX(a)=ROW(1,1) FROM t1;
+ERROR HY000: Illegal parameter data types mediumint unsigned and row for operation '='
+SELECT MAX(b)=ROW(1,1) FROM t1;
+ERROR HY000: Illegal parameter data types mediumint and row for operation '='
+DROP TABLE t1;
+CREATE TABLE t1 (a INT UNSIGNED, b INT);
+SELECT MAX(a)=ROW(1,1) FROM t1;
+ERROR HY000: Illegal parameter data types int unsigned and row for operation '='
+SELECT MAX(b)=ROW(1,1) FROM t1;
+ERROR HY000: Illegal parameter data types int and row for operation '='
+DROP TABLE t1;
+CREATE TABLE t1 (a BIGINT UNSIGNED, b BIGINT);
+SELECT MAX(a)=ROW(1,1) FROM t1;
+ERROR HY000: Illegal parameter data types bigint unsigned and row for operation '='
+SELECT MAX(b)=ROW(1,1) FROM t1;
+ERROR HY000: Illegal parameter data types bigint and row for operation '='
+DROP TABLE t1;
+# HEX hybrid
+SELECT 0x20+ROW(1,1);
+ERROR HY000: Illegal parameter data types bigint unsigned and row for operation '+'
+# System variables
+SELECT @@max_allowed_packet=ROW(1,1);
+ERROR HY000: Illegal parameter data types bigint unsigned and row for operation '='
+#
+# End of 10.5 tests
+#
diff --git a/mysql-test/main/func_hybrid_type.test b/mysql-test/main/func_hybrid_type.test
index 31a096c3305..cf41d92b01f 100644
--- a/mysql-test/main/func_hybrid_type.test
+++ b/mysql-test/main/func_hybrid_type.test
@@ -825,3 +825,256 @@ SELECT 0 + LEAST(TIME'-10:00:00',TIME'10:00:00') AS c;
--echo #
--echo # End of 10.4 tests
--echo #
+
+
+--echo #
+--echo # Start of 10.5 tests
+--echo #
+
+--echo #
+--echo # MDEV-20332 Wrong UNSIGNED metadata flag returned for COALESCE(unsigned_field,timestamp_field)
+--echo #
+
+CREATE TABLE t1 (a INT UNSIGNED, b TIMESTAMP);
+--disable_ps_protocol
+--enable_metadata
+SELECT COALESCE(a,b) FROM t1;
+--disable_metadata
+--enable_ps_protocol
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-20353 Add separate type handlers for unsigned integer data types
+--echo #
+
+--echo # Constant
+
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT 1=ROW(1,1);
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT -1=ROW(1,1);
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT 9223372036854775807=ROW(1,1);
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT 9223372036854775808=ROW(1,1);
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT 18446744073709551615=ROW(1,1);
+
+
+--echo # COALESCE
+
+CREATE TABLE t1 (a TINYINT UNSIGNED, b TINYINT);
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT COALESCE(a,a)=ROW(1,1) FROM t1;
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT COALESCE(b,b)=ROW(1,1) FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a SMALLINT UNSIGNED, b SMALLINT);
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT COALESCE(a,a)=ROW(1,1) FROM t1;
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT COALESCE(b,b)=ROW(1,1) FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a MEDIUMINT UNSIGNED, b MEDIUMINT);
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT COALESCE(a,a)=ROW(1,1) FROM t1;
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT COALESCE(b,b)=ROW(1,1) FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a INT UNSIGNED, b INT);
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT COALESCE(a,a)=ROW(1,1) FROM t1;
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT COALESCE(b,b)=ROW(1,1) FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a BIGINT UNSIGNED, b BIGINT);
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT COALESCE(a,a)=ROW(1,1) FROM t1;
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT COALESCE(b,b)=ROW(1,1) FROM t1;
+DROP TABLE t1;
+
+
+--echo # COALESCE for different types integer types, with the UNSIGNED flag
+
+CREATE TABLE t1 (a1 TINYINT UNSIGNED, a2 SMALLINT UNSIGNED);
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT COALESCE(a1,a2)=ROW(1,1) FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a1 SMALLINT UNSIGNED, a2 MEDIUMINT UNSIGNED);
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT COALESCE(a1,a2)=ROW(1,1) FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a1 MEDIUMINT UNSIGNED, a2 INT UNSIGNED);
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT COALESCE(a1,a2)=ROW(1,1) FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a1 INT UNSIGNED, a2 BIGINT UNSIGNED);
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT COALESCE(a1,a2)=ROW(1,1) FROM t1;
+DROP TABLE t1;
+
+
+--echo # COALESCE for different types integer types, without the UNSIGNED flag
+
+CREATE TABLE t1 (a1 TINYINT, a2 SMALLINT);
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT COALESCE(a1,a2)=ROW(1,1) FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a1 SMALLINT, a2 MEDIUMINT);
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT COALESCE(a1,a2)=ROW(1,1) FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a1 MEDIUMINT, a2 INT);
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT COALESCE(a1,a2)=ROW(1,1) FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a1 INT, a2 BIGINT);
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT COALESCE(a1,a2)=ROW(1,1) FROM t1;
+DROP TABLE t1;
+
+
+--echo # Operator +
+
+CREATE TABLE t1 (a TINYINT UNSIGNED, b TINYINT);
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT (a+a)=ROW(1,1) FROM t1;
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT (b+b)=ROW(1,1) FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a SMALLINT UNSIGNED, b SMALLINT);
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT (a+a)=ROW(1,1) FROM t1;
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT (b+b)=ROW(1,1) FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a MEDIUMINT UNSIGNED, b MEDIUMINT);
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT (a+a)=ROW(1,1) FROM t1;
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT (b+b)=ROW(1,1) FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a INT UNSIGNED, b INT);
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT (a+a)=ROW(1,1) FROM t1;
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT (b+b)=ROW(1,1) FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a BIGINT UNSIGNED, b BIGINT);
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT (a+a)=ROW(1,1) FROM t1;
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT (b+b)=ROW(1,1) FROM t1;
+DROP TABLE t1;
+
+
+--echo # Opetator + for different types integer types, with the UNSIGNED flag
+
+CREATE TABLE t1 (a1 TINYINT UNSIGNED, a2 SMALLINT UNSIGNED);
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT (a1+a2)=ROW(1,1) FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a1 SMALLINT UNSIGNED, a2 MEDIUMINT UNSIGNED);
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT (a1+a2)=ROW(1,1) FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a1 MEDIUMINT UNSIGNED, a2 INT UNSIGNED);
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT (a1+a2)=ROW(1,1) FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a1 INT UNSIGNED, a2 BIGINT UNSIGNED);
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT (a1+a2)=ROW(1,1) FROM t1;
+DROP TABLE t1;
+
+
+--echo # Operator + for different types integer types, without the UNSIGNED flag
+
+CREATE TABLE t1 (a1 TINYINT, a2 SMALLINT);
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT (a1+a2)=ROW(1,1) FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a1 SMALLINT, a2 MEDIUMINT);
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT (a1+a2)=ROW(1,1) FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a1 MEDIUMINT, a2 INT);
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT (a1+a2)=ROW(1,1) FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a1 INT, a2 BIGINT);
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT (a1+a2)=ROW(1,1) FROM t1;
+DROP TABLE t1;
+
+--echo # SUM
+
+CREATE TABLE t1 (a TINYINT UNSIGNED, b TINYINT);
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT MAX(a)=ROW(1,1) FROM t1;
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT MAX(b)=ROW(1,1) FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a SMALLINT UNSIGNED, b SMALLINT);
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT MAX(a)=ROW(1,1) FROM t1;
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT MAX(b)=ROW(1,1) FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a MEDIUMINT UNSIGNED, b MEDIUMINT);
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT MAX(a)=ROW(1,1) FROM t1;
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT MAX(b)=ROW(1,1) FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a INT UNSIGNED, b INT);
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT MAX(a)=ROW(1,1) FROM t1;
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT MAX(b)=ROW(1,1) FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a BIGINT UNSIGNED, b BIGINT);
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT MAX(a)=ROW(1,1) FROM t1;
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT MAX(b)=ROW(1,1) FROM t1;
+DROP TABLE t1;
+
+--echo # HEX hybrid
+
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT 0x20+ROW(1,1);
+
+--echo # System variables
+
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT @@max_allowed_packet=ROW(1,1);
+
+--echo #
+--echo # End of 10.5 tests
+--echo #
diff --git a/mysql-test/main/func_in.result b/mysql-test/main/func_in.result
index 9a3c1dba045..51074650d29 100644
--- a/mysql-test/main/func_in.result
+++ b/mysql-test/main/func_in.result
@@ -522,7 +522,7 @@ a
b
explain select f1 from t1 where f1 in ('a','b');
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index t1f1_idx t1f1_idx 2 NULL 3 Using where; Using index
+1 SIMPLE t1 range t1f1_idx t1f1_idx 2 NULL 2 Using where; Using index
select f1 from t1 where f1 in (2,1);
f1
1
@@ -553,7 +553,7 @@ Warning 1292 Truncated incorrect DOUBLE value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'b'
explain select f2 from t2 where f2 in ('a','b');
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 index t2f2 t2f2 5 NULL 3 Using where; Using index
+1 SIMPLE t2 range t2f2 t2f2 5 NULL 1 Using where; Using index
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'b'
diff --git a/mysql-test/main/func_json.result b/mysql-test/main/func_json.result
index 9e7f83e2983..4ad7efea8af 100644
--- a/mysql-test/main/func_json.result
+++ b/mysql-test/main/func_json.result
@@ -1069,5 +1069,318 @@ SELECT * FROM t1 WHERE CASE WHEN JSON_OBJECT('x', (SELECT MAX(a=2) FROM t1))='{"
a
DROP TABLE t1;
#
+# MDEV-16620 JSON_ARRAYAGG
+#
+#
+# Integer aggregation
+#
+CREATE TABLE t1 (a INT, b INT);
+INSERT INTO t1 VALUES (1, 1),(2, 1), (1, 1),(2, 1), (3, 2),(2, 2),(2, 2),(2, 2);
+SELECT JSON_VALID(JSON_ARRAYAGG(a)) FROM t1;
+JSON_VALID(JSON_ARRAYAGG(a))
+1
+SELECT JSON_ARRAYAGG(a), JSON_ARRAYAGG(b) FROM t1;
+JSON_ARRAYAGG(a) JSON_ARRAYAGG(b)
+[1,2,1,2,3,2,2,2] [1,1,1,1,2,2,2,2]
+SELECT JSON_ARRAYAGG(a), JSON_ARRAYAGG(b) FROM t1 GROUP BY b;
+JSON_ARRAYAGG(a) JSON_ARRAYAGG(b)
+[1,2,1,2] [1,1,1,1]
+[3,2,2,2] [2,2,2,2]
+DROP TABLE t1;
+#
+# Real aggregation
+#
+CREATE TABLE t1 (a FLOAT, b DOUBLE, c DECIMAL(10, 2));
+INSERT INTO t1 VALUES (1.0, 2.0, 3.0),(1.0, 3.0, 9.0),(1.0, 4.0, 16.0),(1.0, 5.0, 25.0);
+SELECT JSON_VALID(JSON_ARRAYAGG(a)) FROM t1;
+JSON_VALID(JSON_ARRAYAGG(a))
+1
+SELECT JSON_ARRAYAGG(a), JSON_ARRAYAGG(b), JSON_ARRAYAGG(c) FROM t1;
+JSON_ARRAYAGG(a) JSON_ARRAYAGG(b) JSON_ARRAYAGG(c)
+[1,1,1,1] [2,3,4,5] [3.00,9.00,16.00,25.00]
+DROP TABLE t1;
+#
+# Boolean aggregation
+#
+CREATE TABLE t1 (a BOOLEAN, b BOOLEAN);
+INSERT INTO t1 VALUES (TRUE, TRUE), (TRUE, FALSE), (FALSE, TRUE), (FALSE, FALSE);
+SELECT JSON_VALID(JSON_ARRAYAGG(a)) FROM t1;
+JSON_VALID(JSON_ARRAYAGG(a))
+1
+SELECT JSON_ARRAYAGG(a), JSON_ARRAYAGG(b) FROM t1;
+JSON_ARRAYAGG(a) JSON_ARRAYAGG(b)
+[1,1,0,0] [1,0,1,0]
+SELECT JSON_ARRAYAGG(a), JSON_ARRAYAGG(b) FROM t1 GROUP BY b;
+JSON_ARRAYAGG(a) JSON_ARRAYAGG(b)
+[1,0] [0,0]
+[1,0] [1,1]
+SELECT JSON_ARRAYAGG(TRUE), JSON_ARRAYAGG(FALSE) FROM t1;
+JSON_ARRAYAGG(TRUE) JSON_ARRAYAGG(FALSE)
+[true,true,true,true] [false,false,false,false]
+DROP TABLE t1;
+#
+# Aggregation of strings with quoted
+#
+CREATE TABLE t1 (a VARCHAR(80));
+INSERT INTO t1 VALUES
+('"double_quoted_value"'), ("'single_quoted_value'"),
+('"double_quoted_value"'), ("'single_quoted_value'");
+SELECT JSON_VALID(JSON_ARRAYAGG(a)) FROM t1;
+JSON_VALID(JSON_ARRAYAGG(a))
+1
+SELECT JSON_ARRAYAGG(a) FROM t1;
+JSON_ARRAYAGG(a)
+["\"double_quoted_value\"","'single_quoted_value'","\"double_quoted_value\"","'single_quoted_value'"]
+DROP TABLE t1;
+#
+# Strings and NULLs
+#
+CREATE TABLE t1 (a INT, b VARCHAR(80));
+INSERT INTO t1 VALUES
+(1, "Hello"),(1, "World"), (2, "This"),(2, "Will"), (2, "Work"),(2, "!"), (3, NULL),
+(1, "Hello"),(1, "World"), (2, "This"),(2, "Will"), (2, "Work"),(2, "!"), (3, NULL);
+SELECT JSON_VALID(JSON_ARRAYAGG(b)) FROM t1;
+JSON_VALID(JSON_ARRAYAGG(b))
+1
+SELECT JSON_ARRAYAGG(a), JSON_ARRAYAGG(b) FROM t1;
+JSON_ARRAYAGG(a) JSON_ARRAYAGG(b)
+[1,1,2,2,2,2,3,1,1,2,2,2,2,3] ["Hello","World","This","Will","Work","!",null,"Hello","World","This","Will","Work","!",null]
+SELECT JSON_ARRAYAGG(a), JSON_ARRAYAGG(b) FROM t1 GROUP BY a;
+JSON_ARRAYAGG(a) JSON_ARRAYAGG(b)
+[1,1,1,1] ["Hello","World","Hello","World"]
+[2,2,2,2,2,2,2,2] ["!","Work","Will","This","Will","This","!","Work"]
+[3,3] [null,null]
+#
+# DISTINCT and LIMIT
+#
+SELECT JSON_ARRAYAGG(b LIMIT 1) FROM t1;
+JSON_ARRAYAGG(b LIMIT 1)
+["Hello"]
+SELECT JSON_ARRAYAGG(b LIMIT 2) FROM t1;
+JSON_ARRAYAGG(b LIMIT 2)
+["Hello","World"]
+SELECT JSON_ARRAYAGG(b LIMIT 1) FROM t1 GROUP BY b;
+JSON_ARRAYAGG(b LIMIT 1)
+[null]
+["!"]
+["Hello"]
+["This"]
+["Will"]
+["Work"]
+["World"]
+SELECT JSON_ARRAYAGG(b LIMIT 2) FROM t1 GROUP BY a;
+JSON_ARRAYAGG(b LIMIT 2)
+["Hello","World"]
+["!","Work"]
+[null,null]
+SELECT JSON_ARRAYAGG(DISTINCT a) FROM t1;
+JSON_ARRAYAGG(DISTINCT a)
+[1,2,3]
+SELECT JSON_ARRAYAGG(DISTINCT b) FROM t1;
+JSON_ARRAYAGG(DISTINCT b)
+[null,"!","Hello","This","Will","Work","World"]
+SELECT JSON_ARRAYAGG(DISTINCT a LIMIT 2) FROM t1;
+JSON_ARRAYAGG(DISTINCT a LIMIT 2)
+[1,2]
+SELECT JSON_ARRAYAGG(DISTINCT b LIMIT 2) FROM t1;
+JSON_ARRAYAGG(DISTINCT b LIMIT 2)
+[null,"!"]
+#
+# JSON aggregation
+#
+SELECT JSON_VALID(JSON_ARRAYAGG(JSON_ARRAY(a, b))) FROM t1;
+JSON_VALID(JSON_ARRAYAGG(JSON_ARRAY(a, b)))
+1
+SELECT JSON_ARRAYAGG(JSON_ARRAY(a, b)) FROM t1;
+JSON_ARRAYAGG(JSON_ARRAY(a, b))
+[[1, "Hello"],[1, "World"],[2, "This"],[2, "Will"],[2, "Work"],[2, "!"],[3, null],[1, "Hello"],[1, "World"],[2, "This"],[2, "Will"],[2, "Work"],[2, "!"],[3, null]]
+SELECT JSON_ARRAYAGG(JSON_ARRAY(a, b)) FROM t1 GROUP BY a;
+JSON_ARRAYAGG(JSON_ARRAY(a, b))
+[[1, "Hello"],[1, "World"],[1, "Hello"],[1, "World"]]
+[[2, "!"],[2, "Work"],[2, "Will"],[2, "This"],[2, "Will"],[2, "This"],[2, "!"],[2, "Work"]]
+[[3, null],[3, null]]
+SELECT JSON_VALID(JSON_ARRAYAGG(JSON_OBJECT('a', a, 'b', b))) FROM t1;
+JSON_VALID(JSON_ARRAYAGG(JSON_OBJECT('a', a, 'b', b)))
+1
+SELECT JSON_ARRAYAGG(JSON_OBJECT('a', a, 'b', b)) FROM t1;
+JSON_ARRAYAGG(JSON_OBJECT('a', a, 'b', b))
+[{"a": 1, "b": "Hello"},{"a": 1, "b": "World"},{"a": 2, "b": "This"},{"a": 2, "b": "Will"},{"a": 2, "b": "Work"},{"a": 2, "b": "!"},{"a": 3, "b": null},{"a": 1, "b": "Hello"},{"a": 1, "b": "World"},{"a": 2, "b": "This"},{"a": 2, "b": "Will"},{"a": 2, "b": "Work"},{"a": 2, "b": "!"},{"a": 3, "b": null}]
+SELECT JSON_ARRAYAGG(JSON_OBJECT('a', a, 'b', b)) FROM t1 GROUP BY a;
+JSON_ARRAYAGG(JSON_OBJECT('a', a, 'b', b))
+[{"a": 1, "b": "Hello"},{"a": 1, "b": "World"},{"a": 1, "b": "Hello"},{"a": 1, "b": "World"}]
+[{"a": 2, "b": "!"},{"a": 2, "b": "Work"},{"a": 2, "b": "Will"},{"a": 2, "b": "This"},{"a": 2, "b": "Will"},{"a": 2, "b": "This"},{"a": 2, "b": "!"},{"a": 2, "b": "Work"}]
+[{"a": 3, "b": null},{"a": 3, "b": null}]
+#
+# Error checks
+#
+SELECT JSON_ARRAYAGG(a, b) FROM t1;
+ERROR 42000: Incorrect parameter count in the call to native function 'JSON_ARRAYAGG'
+SELECT JSON_ARRAYAGG(JSON_ARRAYAGG(a, b)) FROM t1;
+ERROR 42000: Incorrect parameter count in the call to native function 'JSON_ARRAYAGG'
+SELECT JSON_ARRAYAGG(JSON_ARRAYAGG(a)) FROM t1;
+ERROR HY000: Invalid use of group function
+#
+# MDEV-16620 JSON_OBJECTAGG
+#
+SELECT JSON_OBJECTAGG(a, b) FROM t1;
+JSON_OBJECTAGG(a, b)
+{"1":"Hello", "1":"World", "2":"This", "2":"Will", "2":"Work", "2":"!", "3":null, "1":"Hello", "1":"World", "2":"This", "2":"Will", "2":"Work", "2":"!", "3":null}
+SELECT JSON_OBJECTAGG(a) 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 ') FROM t1' at line 1
+DROP TABLE t1;
+#
# End of 10.4 tests
#
+#
+# MDEV-16620 JSON_ARRAYAGG
+#
+CREATE TABLE t1 (a INT);
+SELECT JSON_ARRAYAGG(a) FROM t1;
+JSON_ARRAYAGG(a)
+NULL
+DROP TABLE t1;
+#
+# MDEV-21915 Server crashes in copy_fields,Item_func_group_concat::add
+while using json_arrayagg() as a window function
+#
+select json_arrayagg(a) over () from (select 1 a) t;
+ERROR 42000: This version of MariaDB doesn't yet support 'JSON_ARRAYAGG() aggregate as window function'
+select json_objectagg(a, b) over () from (select 1 a, 2 b) t;
+ERROR 42000: This version of MariaDB doesn't yet support 'JSON_OBJECTAGG() aggregate as window function'
+SELECT JSON_ARRAYAGG(NULL) FROM (SELECT 1 AS t) AS A;
+JSON_ARRAYAGG(NULL)
+[null]
+SELECT JSON_ARRAYAGG("null") FROM (SELECT 1 AS t) AS A;
+JSON_ARRAYAGG("null")
+["null"]
+create view v as (select json_arrayagg(json_object("type", "permPeriod", "id", "asd")) as JSON_DATA);
+select * from v;
+JSON_DATA
+[{"type": "permPeriod", "id": "asd"}]
+drop view v;
+select json_arrayagg(a order by a asc) from (select 1 a union select 2 a) t;
+json_arrayagg(a order by a asc)
+[1,2]
+select json_object('x', json_arrayagg(json_object('a', 1)));
+json_object('x', json_arrayagg(json_object('a', 1)))
+{"x": [{"a": 1}]}
+#
+# MDEV-22011: DISTINCT with JSON_ARRAYAGG gives wrong results
+#
+CREATE TABLE t1(a INT, b INT);
+INSERT INTO t1 VALUES (1,1), (2,2), (3,3);
+INSERT INTO t1 VALUES (1,1), (2,2), (3,3);
+SELECT JSON_ARRAYAGG(a) FROM t1;
+JSON_ARRAYAGG(a)
+[1,2,3,1,2,3]
+SELECT JSON_ARRAYAGG(DISTINCT a) FROM t1;
+JSON_ARRAYAGG(DISTINCT a)
+[1,2,3]
+INSERT INTO t1 VALUES (NULL,NULL), (NULL,NULL);
+SELECT JSON_ARRAYAGG(a) FROM t1;
+JSON_ARRAYAGG(a)
+[1,2,3,1,2,3,null,null]
+SELECT JSON_ARRAYAGG(DISTINCT a) FROM t1;
+JSON_ARRAYAGG(DISTINCT a)
+[null,1,2,3]
+DROP TABLE t1;
+CREATE TABLE t1(a VARCHAR(10), b INT);
+INSERT INTO t1 VALUES (1,1), (2,2), (3,3);
+INSERT INTO t1 VALUES (1,1), (2,2), (3,3);
+SELECT JSON_ARRAYAGG(a) FROM t1;
+JSON_ARRAYAGG(a)
+["1","2","3","1","2","3"]
+SELECT JSON_ARRAYAGG(DISTINCT a) FROM t1;
+JSON_ARRAYAGG(DISTINCT a)
+["1","2","3"]
+INSERT INTO t1 VALUES (NULL,NULL), (NULL,NULL);
+SELECT JSON_ARRAYAGG(a) FROM t1;
+JSON_ARRAYAGG(a)
+["1","2","3","1","2","3",null,null]
+SELECT JSON_ARRAYAGG(DISTINCT a) FROM t1;
+JSON_ARRAYAGG(DISTINCT a)
+[null,"1","2","3"]
+DROP TABLE t1;
+#
+# MDEV-22840: JSON_ARRAYAGG gives wrong results with NULL values and ORDER by clause
+#
+CREATE TABLE t1(a VARCHAR(255));
+INSERT INTO t1 VALUES ('red'),('blue');
+SELECT JSON_ARRAYAGG(a) FROM t1;
+JSON_ARRAYAGG(a)
+["red","blue"]
+SELECT JSON_ARRAYAGG(a ORDER BY a DESC) FROM t1;
+JSON_ARRAYAGG(a ORDER BY a DESC)
+["red","blue"]
+SELECT JSON_ARRAYAGG(a ORDER BY a ASC) FROM t1;
+JSON_ARRAYAGG(a ORDER BY a ASC)
+["blue","red"]
+INSERT INTO t1 VALUES (NULL);
+SELECT JSON_ARRAYAGG(a) FROM t1;
+JSON_ARRAYAGG(a)
+["red","blue",null]
+SELECT JSON_ARRAYAGG(a ORDER BY a DESC) FROM t1;
+JSON_ARRAYAGG(a ORDER BY a DESC)
+["red","blue",null]
+SELECT JSON_ARRAYAGG(a ORDER BY a ASC) FROM t1;
+JSON_ARRAYAGG(a ORDER BY a ASC)
+[null,"blue","red"]
+DROP TABLE t1;
+set group_concat_max_len=64;
+create table t1 (a varchar(254));
+insert into t1 values (concat('x64-', repeat('a', 60)));
+insert into t1 values (concat('x64-', repeat('b', 60)));
+insert into t1 values (concat('x64-', repeat('c', 60)));
+select json_arrayagg(a) from t1;
+json_arrayagg(a)
+["x64-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"]
+Warnings:
+Warning 1260 Row 1 was cut by JSON_ARRAYAGG()
+drop table t1;
+SET group_concat_max_len= default;
+create table t1 (col1 json);
+insert into t1 values('{"color":"red", "size":1}' );
+insert into t1 values('{"color":"blue", "size":2}' );
+select JSON_ARRAYAGG(col1) from t1;
+JSON_ARRAYAGG(col1)
+[{"color":"red", "size":1},{"color":"blue", "size":2}]
+drop table t1;
+#
+# MDEV-23029: JSON_OBJECTAGG returns NULL when used together with GROUP BY
+#
+CREATE TABLE t1 (e INT, a VARCHAR(255), v VARCHAR(255));
+INSERT INTO t1 VALUES (0, 'a1', '1') , (0, 'a2', '2') , (1, 'b1', '3');
+EXPLAIN SELECT B.e, JSON_OBJECTAGG(B.a, B.v) FROM t1 A, t1 B GROUP BY B.e, B.a;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE A ALL NULL NULL NULL NULL 3 Using temporary; Using filesort
+1 SIMPLE B ALL NULL NULL NULL NULL 3 Using join buffer (flat, BNL join)
+SELECT B.e, JSON_OBJECTAGG(B.a, B.v) FROM t1 A, t1 B GROUP BY B.e, B.a;
+e JSON_OBJECTAGG(B.a, B.v)
+0 {"a1":"1", "a1":"1", "a1":"1"}
+0 {"a2":"2", "a2":"2", "a2":"2"}
+1 {"b1":"3", "b1":"3", "b1":"3"}
+CREATE VIEW v AS SELECT JSON_OBJECTAGG(a, e) FROM t1;
+SELECT * FROM v;
+JSON_OBJECTAGG(a, e)
+{"a1":0, "a2":0, "b1":1}
+DROP VIEW v;
+DROP TABLE t1;
+#
+# MDEV-23004 When using GROUP BY with JSON_ARRAYAGG with joint table, the square brackets are not included.
+#
+CREATE TABLE t1(id int primary key, name varchar(50));
+CREATE TABLE t2(id int, owner_id int);
+INSERT INTO t1 VALUES (1, "name1"), (2, "name2"), (3, "name3");
+INSERT INTO t2 VALUES (1, 1), (2, 1), (3, 2), (4, 3);
+SELECT t1.id, JSON_ARRAYAGG(JSON_OBJECT('id',t2.id) ORDER BY t2.id) as materials
+from t1 LEFT JOIN t2 on t1.id = t2.owner_id
+GROUP BY t1.id ORDER BY id;
+id materials
+1 ["{\"id\": 1}","{\"id\": 2}"]
+2 ["{\"id\": 3}"]
+3 ["{\"id\": 4}"]
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# End of 10.5 tests
+#
diff --git a/mysql-test/main/func_json.test b/mysql-test/main/func_json.test
index b95c862116d..d598809adf5 100644
--- a/mysql-test/main/func_json.test
+++ b/mysql-test/main/func_json.test
@@ -642,6 +642,238 @@ SELECT * FROM t1 WHERE CASE WHEN JSON_OBJECT('x', (SELECT MAX(a=2) FROM t1))='{"
DROP TABLE t1;
+-- echo #
+-- echo # MDEV-16620 JSON_ARRAYAGG
+-- echo #
+
+-- echo #
+-- echo # Integer aggregation
+-- echo #
+CREATE TABLE t1 (a INT, b INT);
+INSERT INTO t1 VALUES (1, 1),(2, 1), (1, 1),(2, 1), (3, 2),(2, 2),(2, 2),(2, 2);
+SELECT JSON_VALID(JSON_ARRAYAGG(a)) FROM t1;
+SELECT JSON_ARRAYAGG(a), JSON_ARRAYAGG(b) FROM t1;
+SELECT JSON_ARRAYAGG(a), JSON_ARRAYAGG(b) FROM t1 GROUP BY b;
+DROP TABLE t1;
+
+-- echo #
+-- echo # Real aggregation
+-- echo #
+CREATE TABLE t1 (a FLOAT, b DOUBLE, c DECIMAL(10, 2));
+INSERT INTO t1 VALUES (1.0, 2.0, 3.0),(1.0, 3.0, 9.0),(1.0, 4.0, 16.0),(1.0, 5.0, 25.0);
+SELECT JSON_VALID(JSON_ARRAYAGG(a)) FROM t1;
+SELECT JSON_ARRAYAGG(a), JSON_ARRAYAGG(b), JSON_ARRAYAGG(c) FROM t1;
+DROP TABLE t1;
+
+-- echo #
+-- echo # Boolean aggregation
+-- echo #
+CREATE TABLE t1 (a BOOLEAN, b BOOLEAN);
+INSERT INTO t1 VALUES (TRUE, TRUE), (TRUE, FALSE), (FALSE, TRUE), (FALSE, FALSE);
+SELECT JSON_VALID(JSON_ARRAYAGG(a)) FROM t1;
+SELECT JSON_ARRAYAGG(a), JSON_ARRAYAGG(b) FROM t1;
+SELECT JSON_ARRAYAGG(a), JSON_ARRAYAGG(b) FROM t1 GROUP BY b;
+SELECT JSON_ARRAYAGG(TRUE), JSON_ARRAYAGG(FALSE) FROM t1;
+DROP TABLE t1;
+
+-- echo #
+-- echo # Aggregation of strings with quoted
+-- echo #
+CREATE TABLE t1 (a VARCHAR(80));
+INSERT INTO t1 VALUES
+ ('"double_quoted_value"'), ("'single_quoted_value'"),
+ ('"double_quoted_value"'), ("'single_quoted_value'");
+SELECT JSON_VALID(JSON_ARRAYAGG(a)) FROM t1;
+SELECT JSON_ARRAYAGG(a) FROM t1;
+DROP TABLE t1;
+
+-- echo #
+-- echo # Strings and NULLs
+-- echo #
+CREATE TABLE t1 (a INT, b VARCHAR(80));
+INSERT INTO t1 VALUES
+ (1, "Hello"),(1, "World"), (2, "This"),(2, "Will"), (2, "Work"),(2, "!"), (3, NULL),
+ (1, "Hello"),(1, "World"), (2, "This"),(2, "Will"), (2, "Work"),(2, "!"), (3, NULL);
+SELECT JSON_VALID(JSON_ARRAYAGG(b)) FROM t1;
+SELECT JSON_ARRAYAGG(a), JSON_ARRAYAGG(b) FROM t1;
+SELECT JSON_ARRAYAGG(a), JSON_ARRAYAGG(b) FROM t1 GROUP BY a;
+
+-- echo #
+-- echo # DISTINCT and LIMIT
+-- echo #
+SELECT JSON_ARRAYAGG(b LIMIT 1) FROM t1;
+SELECT JSON_ARRAYAGG(b LIMIT 2) FROM t1;
+SELECT JSON_ARRAYAGG(b LIMIT 1) FROM t1 GROUP BY b;
+SELECT JSON_ARRAYAGG(b LIMIT 2) FROM t1 GROUP BY a;
+SELECT JSON_ARRAYAGG(DISTINCT a) FROM t1;
+SELECT JSON_ARRAYAGG(DISTINCT b) FROM t1;
+SELECT JSON_ARRAYAGG(DISTINCT a LIMIT 2) FROM t1;
+SELECT JSON_ARRAYAGG(DISTINCT b LIMIT 2) FROM t1;
+
+-- echo #
+-- echo # JSON aggregation
+-- echo #
+SELECT JSON_VALID(JSON_ARRAYAGG(JSON_ARRAY(a, b))) FROM t1;
+SELECT JSON_ARRAYAGG(JSON_ARRAY(a, b)) FROM t1;
+SELECT JSON_ARRAYAGG(JSON_ARRAY(a, b)) FROM t1 GROUP BY a;
+
+SELECT JSON_VALID(JSON_ARRAYAGG(JSON_OBJECT('a', a, 'b', b))) FROM t1;
+SELECT JSON_ARRAYAGG(JSON_OBJECT('a', a, 'b', b)) FROM t1;
+SELECT JSON_ARRAYAGG(JSON_OBJECT('a', a, 'b', b)) FROM t1 GROUP BY a;
+
+-- echo #
+-- echo # Error checks
+-- echo #
+--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+SELECT JSON_ARRAYAGG(a, b) FROM t1;
+
+--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+SELECT JSON_ARRAYAGG(JSON_ARRAYAGG(a, b)) FROM t1;
+
+--error ER_INVALID_GROUP_FUNC_USE
+SELECT JSON_ARRAYAGG(JSON_ARRAYAGG(a)) FROM t1;
+
+-- echo #
+-- echo # MDEV-16620 JSON_OBJECTAGG
+-- echo #
+
+SELECT JSON_OBJECTAGG(a, b) FROM t1;
+--error ER_PARSE_ERROR
+SELECT JSON_OBJECTAGG(a) FROM t1;
+
+DROP TABLE t1;
+
--echo #
--echo # End of 10.4 tests
--echo #
+
+-- echo #
+-- echo # MDEV-16620 JSON_ARRAYAGG
+-- echo #
+
+CREATE TABLE t1 (a INT);
+SELECT JSON_ARRAYAGG(a) FROM t1;
+DROP TABLE t1;
+
+-- echo #
+-- echo # MDEV-21915 Server crashes in copy_fields,Item_func_group_concat::add
+-- echo while using json_arrayagg() as a window function
+-- echo #
+
+--error ER_NOT_SUPPORTED_YET
+select json_arrayagg(a) over () from (select 1 a) t;
+
+--error ER_NOT_SUPPORTED_YET
+select json_objectagg(a, b) over () from (select 1 a, 2 b) t;
+
+SELECT JSON_ARRAYAGG(NULL) FROM (SELECT 1 AS t) AS A;
+SELECT JSON_ARRAYAGG("null") FROM (SELECT 1 AS t) AS A;
+
+create view v as (select json_arrayagg(json_object("type", "permPeriod", "id", "asd")) as JSON_DATA);
+select * from v;
+drop view v;
+
+select json_arrayagg(a order by a asc) from (select 1 a union select 2 a) t;
+
+select json_object('x', json_arrayagg(json_object('a', 1)));
+
+--echo #
+--echo # MDEV-22011: DISTINCT with JSON_ARRAYAGG gives wrong results
+--echo #
+
+CREATE TABLE t1(a INT, b INT);
+INSERT INTO t1 VALUES (1,1), (2,2), (3,3);
+INSERT INTO t1 VALUES (1,1), (2,2), (3,3);
+
+SELECT JSON_ARRAYAGG(a) FROM t1;
+SELECT JSON_ARRAYAGG(DISTINCT a) FROM t1;
+
+INSERT INTO t1 VALUES (NULL,NULL), (NULL,NULL);
+
+SELECT JSON_ARRAYAGG(a) FROM t1;
+SELECT JSON_ARRAYAGG(DISTINCT a) FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1(a VARCHAR(10), b INT);
+INSERT INTO t1 VALUES (1,1), (2,2), (3,3);
+INSERT INTO t1 VALUES (1,1), (2,2), (3,3);
+
+SELECT JSON_ARRAYAGG(a) FROM t1;
+SELECT JSON_ARRAYAGG(DISTINCT a) FROM t1;
+
+INSERT INTO t1 VALUES (NULL,NULL), (NULL,NULL);
+
+SELECT JSON_ARRAYAGG(a) FROM t1;
+SELECT JSON_ARRAYAGG(DISTINCT a) FROM t1;
+
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-22840: JSON_ARRAYAGG gives wrong results with NULL values and ORDER by clause
+--echo #
+
+CREATE TABLE t1(a VARCHAR(255));
+INSERT INTO t1 VALUES ('red'),('blue');
+
+SELECT JSON_ARRAYAGG(a) FROM t1;
+SELECT JSON_ARRAYAGG(a ORDER BY a DESC) FROM t1;
+SELECT JSON_ARRAYAGG(a ORDER BY a ASC) FROM t1;
+
+INSERT INTO t1 VALUES (NULL);
+
+SELECT JSON_ARRAYAGG(a) FROM t1;
+SELECT JSON_ARRAYAGG(a ORDER BY a DESC) FROM t1;
+SELECT JSON_ARRAYAGG(a ORDER BY a ASC) FROM t1;
+DROP TABLE t1;
+
+set group_concat_max_len=64;
+create table t1 (a varchar(254));
+insert into t1 values (concat('x64-', repeat('a', 60)));
+insert into t1 values (concat('x64-', repeat('b', 60))); insert into t1 values (concat('x64-', repeat('c', 60)));
+select json_arrayagg(a) from t1;
+drop table t1;
+SET group_concat_max_len= default;
+
+create table t1 (col1 json);
+insert into t1 values('{"color":"red", "size":1}' );
+insert into t1 values('{"color":"blue", "size":2}' );
+select JSON_ARRAYAGG(col1) from t1;
+drop table t1;
+
+--echo #
+--echo # MDEV-23029: JSON_OBJECTAGG returns NULL when used together with GROUP BY
+--echo #
+
+CREATE TABLE t1 (e INT, a VARCHAR(255), v VARCHAR(255));
+INSERT INTO t1 VALUES (0, 'a1', '1') , (0, 'a2', '2') , (1, 'b1', '3');
+
+EXPLAIN SELECT B.e, JSON_OBJECTAGG(B.a, B.v) FROM t1 A, t1 B GROUP BY B.e, B.a;
+SELECT B.e, JSON_OBJECTAGG(B.a, B.v) FROM t1 A, t1 B GROUP BY B.e, B.a;
+
+CREATE VIEW v AS SELECT JSON_OBJECTAGG(a, e) FROM t1;
+SELECT * FROM v;
+
+DROP VIEW v;
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-23004 When using GROUP BY with JSON_ARRAYAGG with joint table, the square brackets are not included.
+--echo #
+
+CREATE TABLE t1(id int primary key, name varchar(50));
+CREATE TABLE t2(id int, owner_id int);
+
+INSERT INTO t1 VALUES (1, "name1"), (2, "name2"), (3, "name3");
+INSERT INTO t2 VALUES (1, 1), (2, 1), (3, 2), (4, 3);
+
+SELECT t1.id, JSON_ARRAYAGG(JSON_OBJECT('id',t2.id) ORDER BY t2.id) as materials
+ from t1 LEFT JOIN t2 on t1.id = t2.owner_id
+ GROUP BY t1.id ORDER BY id;
+
+DROP TABLE t1;
+DROP TABLE t2;
+
+--echo #
+--echo # End of 10.5 tests
+--echo #
+
diff --git a/mysql-test/main/func_like.result b/mysql-test/main/func_like.result
index fc306c42067..200cb20c4de 100644
--- a/mysql-test/main/func_like.result
+++ b/mysql-test/main/func_like.result
@@ -3,12 +3,12 @@ create table t1 (a varchar(10), key(a));
insert into t1 values ("a"),("abc"),("abcd"),("hello"),("test");
explain extended select * from t1 where a like 'abc%';
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t1 index a a 13 NULL 5 40.00 Using where; Using index
+1 SIMPLE t1 range a a 13 NULL 2 100.00 Using where; Using index
Warnings:
Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` like 'abc%'
explain extended select * from t1 where a like concat('abc','%');
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t1 index a a 13 NULL 5 40.00 Using where; Using index
+1 SIMPLE t1 range a a 13 NULL 2 100.00 Using where; Using index
Warnings:
Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` like <cache>(concat('abc','%'))
select * from t1 where a like "abc%";
diff --git a/mysql-test/main/func_math.result b/mysql-test/main/func_math.result
index c3037ab769a..ec2521bcfd7 100644
--- a/mysql-test/main/func_math.result
+++ b/mysql-test/main/func_math.result
@@ -3550,3 +3550,47 @@ DROP TABLE t1,t2;
#
# End of 10.4 tests
#
+#
+# Start of 10.5 tests
+#
+#
+# MDEV-21278 Assertion `is_unsigned() == attr.unsigned_flag' or Assertion `field.is_sane()' failed
+#
+CREATE TABLE t1 (a TIMESTAMP);
+INSERT INTO t1 VALUES (NULL),(NULL);
+SET SESSION SQL_MODE= 'NO_UNSIGNED_SUBTRACTION';
+SELECT DISTINCT UUID_SHORT() - a FROM t1;
+UUID_SHORT() - a
+xxx
+xxx
+CREATE TABLE t2 AS SELECT DISTINCT UUID_SHORT() - a FROM t1;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `UUID_SHORT() - a` bigint(22) NOT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t2, t1;
+SET sql_mode=DEFAULT;
+CREATE TABLE t1 (a TIMESTAMP);
+INSERT INTO t1 VALUES (NULL),(NULL);
+SET SESSION SQL_MODE= 'NO_UNSIGNED_SUBTRACTION';
+SELECT UUID_SHORT() - a FROM t1;
+UUID_SHORT() - a
+xxx
+xxx
+CREATE TABLE t2 AS SELECT UUID_SHORT() - a FROM t1;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `UUID_SHORT() - a` bigint(22) NOT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t2, t1;
+#
+# MDEV-23680 Assertion `data' failed in crcr32_calc_pclmulqdq
+#
+SELECT CRC32(ExtractValue('<a><b/></a>', '/a/b')) AS f;
+f
+0
+#
+# End of 10.5 tests
+#
diff --git a/mysql-test/main/func_math.test b/mysql-test/main/func_math.test
index 9398cde7f89..572e0fd0f6b 100644
--- a/mysql-test/main/func_math.test
+++ b/mysql-test/main/func_math.test
@@ -1849,3 +1849,41 @@ DROP TABLE t1,t2;
--echo #
--echo # End of 10.4 tests
--echo #
+
+
+--echo #
+--echo # Start of 10.5 tests
+--echo #
+
+--echo #
+--echo # MDEV-21278 Assertion `is_unsigned() == attr.unsigned_flag' or Assertion `field.is_sane()' failed
+--echo #
+
+CREATE TABLE t1 (a TIMESTAMP);
+INSERT INTO t1 VALUES (NULL),(NULL);
+SET SESSION SQL_MODE= 'NO_UNSIGNED_SUBTRACTION';
+--replace_column 1 xxx
+SELECT DISTINCT UUID_SHORT() - a FROM t1;
+CREATE TABLE t2 AS SELECT DISTINCT UUID_SHORT() - a FROM t1;
+SHOW CREATE TABLE t2;
+DROP TABLE t2, t1;
+SET sql_mode=DEFAULT;
+
+CREATE TABLE t1 (a TIMESTAMP);
+INSERT INTO t1 VALUES (NULL),(NULL);
+SET SESSION SQL_MODE= 'NO_UNSIGNED_SUBTRACTION';
+--replace_column 1 xxx
+SELECT UUID_SHORT() - a FROM t1;
+CREATE TABLE t2 AS SELECT UUID_SHORT() - a FROM t1;
+SHOW CREATE TABLE t2;
+DROP TABLE t2, t1;
+
+--echo #
+--echo # MDEV-23680 Assertion `data' failed in crcr32_calc_pclmulqdq
+--echo #
+SELECT CRC32(ExtractValue('<a><b/></a>', '/a/b')) AS f;
+
+
+--echo #
+--echo # End of 10.5 tests
+--echo #
diff --git a/mysql-test/main/func_misc.result b/mysql-test/main/func_misc.result
index 483338c405a..260fcaa9116 100644
--- a/mysql-test/main/func_misc.result
+++ b/mysql-test/main/func_misc.result
@@ -22,7 +22,7 @@ hex(inet_aton('127.1.1'))
7F010001
select length(uuid()), charset(uuid()), length(unhex(replace(uuid(),_utf8'-',_utf8'')));
length(uuid()) charset(uuid()) length(unhex(replace(uuid(),_utf8'-',_utf8'')))
-36 utf8 16
+36 latin1 16
set @a= uuid_short();
set @b= uuid_short();
select @b - @a;
@@ -107,7 +107,7 @@ create table t1 as select uuid(), length(uuid());
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `uuid()` varchar(36) CHARACTER SET utf8 DEFAULT NULL,
+ `uuid()` varchar(36) DEFAULT NULL,
`length(uuid())` int(10) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
@@ -1345,6 +1345,9 @@ SELECT IS_IPV4_MAPPED(INET6_ATON('1.2.3.4')),
IS_IPV4_COMPAT(INET6_ATON('1.2.3.4'));
IS_IPV4_MAPPED(INET6_ATON('1.2.3.4')) IS_IPV4_COMPAT(INET6_ATON('1.2.3.4'))
0 0
+Warnings:
+Warning 1292 Incorrect inet6 value: '\x01\x02\x03\x04'
+Warning 1292 Incorrect inet6 value: '\x01\x02\x03\x04'
SELECT IS_IPV4_MAPPED(INET6_ATON('::1.2.3.4')),
IS_IPV4_COMPAT(INET6_ATON('::1.2.3.4'));
IS_IPV4_MAPPED(INET6_ATON('::1.2.3.4')) IS_IPV4_COMPAT(INET6_ATON('::1.2.3.4'))
@@ -1638,3 +1641,94 @@ DROP TABLE t1;
#
# End of 10.4 tests
#
+#
+# MDEV-10569 Add RELEASE_ALL_LOCKS SQL-function
+#
+# Test function without any locks
+SELECT RELEASE_ALL_LOCKS();
+RELEASE_ALL_LOCKS()
+0
+# Test function with one lock only
+SELECT GET_LOCK('l1',10);
+GET_LOCK('l1',10)
+1
+SELECT RELEASE_ALL_LOCKS();
+RELEASE_ALL_LOCKS()
+1
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA
+FROM information_schema.metadata_lock_info WHERE thread_id>0 ORDER BY TABLE_SCHEMA;
+LOCK_MODE LOCK_TYPE TABLE_SCHEMA
+# Test function with multiple locks
+SELECT GET_LOCK('l01',10),
+GET_LOCK('l02',10),
+GET_LOCK('l03',10),
+GET_LOCK('l04',10),
+GET_LOCK('l05',10),
+GET_LOCK('l06',10),
+GET_LOCK('l07',10),
+GET_LOCK('l08',10),
+GET_LOCK('l09',10),
+GET_LOCK('l10',10),
+GET_LOCK('l11',10),
+GET_LOCK('l12',10),
+GET_LOCK('l13',10),
+GET_LOCK('l14',10),
+GET_LOCK('l15',10);
+GET_LOCK('l01',10) GET_LOCK('l02',10) GET_LOCK('l03',10) GET_LOCK('l04',10) GET_LOCK('l05',10) GET_LOCK('l06',10) GET_LOCK('l07',10) GET_LOCK('l08',10) GET_LOCK('l09',10) GET_LOCK('l10',10) GET_LOCK('l11',10) GET_LOCK('l12',10) GET_LOCK('l13',10) GET_LOCK('l14',10) GET_LOCK('l15',10)
+1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA
+FROM information_schema.metadata_lock_info WHERE thread_id>0 ORDER BY TABLE_SCHEMA;
+LOCK_MODE LOCK_TYPE TABLE_SCHEMA
+MDL_SHARED_NO_WRITE User lock l01
+MDL_SHARED_NO_WRITE User lock l02
+MDL_SHARED_NO_WRITE User lock l03
+MDL_SHARED_NO_WRITE User lock l04
+MDL_SHARED_NO_WRITE User lock l05
+MDL_SHARED_NO_WRITE User lock l06
+MDL_SHARED_NO_WRITE User lock l07
+MDL_SHARED_NO_WRITE User lock l08
+MDL_SHARED_NO_WRITE User lock l09
+MDL_SHARED_NO_WRITE User lock l10
+MDL_SHARED_NO_WRITE User lock l11
+MDL_SHARED_NO_WRITE User lock l12
+MDL_SHARED_NO_WRITE User lock l13
+MDL_SHARED_NO_WRITE User lock l14
+MDL_SHARED_NO_WRITE User lock l15
+SELECT RELEASE_ALL_LOCKS();
+RELEASE_ALL_LOCKS()
+15
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA
+FROM information_schema.metadata_lock_info WHERE thread_id>0 ORDER BY TABLE_SCHEMA;
+LOCK_MODE LOCK_TYPE TABLE_SCHEMA
+# Test function with recursive locks
+SELECT GET_LOCK('l1',10),
+GET_LOCK('l2',10),
+GET_LOCK('l2',10),
+GET_LOCK('l3',10),
+GET_LOCK('l3',10),
+GET_LOCK('l3',10),
+GET_LOCK('l4',10),
+GET_LOCK('l4',10),
+GET_LOCK('l4',10),
+GET_LOCK('l4',10),
+GET_LOCK('l5',10),
+GET_LOCK('l5',10),
+GET_LOCK('l5',10),
+GET_LOCK('l5',10),
+GET_LOCK('l5',10);
+GET_LOCK('l1',10) GET_LOCK('l2',10) GET_LOCK('l2',10) GET_LOCK('l3',10) GET_LOCK('l3',10) GET_LOCK('l3',10) GET_LOCK('l4',10) GET_LOCK('l4',10) GET_LOCK('l4',10) GET_LOCK('l4',10) GET_LOCK('l5',10) GET_LOCK('l5',10) GET_LOCK('l5',10) GET_LOCK('l5',10) GET_LOCK('l5',10)
+1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA
+FROM information_schema.metadata_lock_info WHERE thread_id>0 ORDER BY TABLE_SCHEMA;
+LOCK_MODE LOCK_TYPE TABLE_SCHEMA
+MDL_SHARED_NO_WRITE User lock l1
+MDL_SHARED_NO_WRITE User lock l2
+MDL_SHARED_NO_WRITE User lock l3
+MDL_SHARED_NO_WRITE User lock l4
+MDL_SHARED_NO_WRITE User lock l5
+SELECT RELEASE_ALL_LOCKS();
+RELEASE_ALL_LOCKS()
+15
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA
+FROM information_schema.metadata_lock_info WHERE thread_id>0 ORDER BY TABLE_SCHEMA;
+LOCK_MODE LOCK_TYPE TABLE_SCHEMA
diff --git a/mysql-test/main/func_misc.test b/mysql-test/main/func_misc.test
index 7d19c9e58af..a471d224677 100644
--- a/mysql-test/main/func_misc.test
+++ b/mysql-test/main/func_misc.test
@@ -1,7 +1,7 @@
#
# Testing of misc functions
#
-
+--source include/have_metadata_lock_info.inc
--source include/default_optimizer_switch.inc
--disable_warnings
DROP TABLE IF EXISTS t1, t2;
@@ -1278,3 +1278,60 @@ DROP TABLE t1;
--echo #
--echo # End of 10.4 tests
--echo #
+
+--echo #
+--echo # MDEV-10569 Add RELEASE_ALL_LOCKS SQL-function
+--echo #
+
+--echo # Test function without any locks
+SELECT RELEASE_ALL_LOCKS();
+
+--echo # Test function with one lock only
+SELECT GET_LOCK('l1',10);
+SELECT RELEASE_ALL_LOCKS();
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA
+FROM information_schema.metadata_lock_info WHERE thread_id>0 ORDER BY TABLE_SCHEMA;
+
+--echo # Test function with multiple locks
+SELECT GET_LOCK('l01',10),
+ GET_LOCK('l02',10),
+ GET_LOCK('l03',10),
+ GET_LOCK('l04',10),
+ GET_LOCK('l05',10),
+ GET_LOCK('l06',10),
+ GET_LOCK('l07',10),
+ GET_LOCK('l08',10),
+ GET_LOCK('l09',10),
+ GET_LOCK('l10',10),
+ GET_LOCK('l11',10),
+ GET_LOCK('l12',10),
+ GET_LOCK('l13',10),
+ GET_LOCK('l14',10),
+ GET_LOCK('l15',10);
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA
+FROM information_schema.metadata_lock_info WHERE thread_id>0 ORDER BY TABLE_SCHEMA;
+SELECT RELEASE_ALL_LOCKS();
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA
+FROM information_schema.metadata_lock_info WHERE thread_id>0 ORDER BY TABLE_SCHEMA;
+
+--echo # Test function with recursive locks
+SELECT GET_LOCK('l1',10),
+ GET_LOCK('l2',10),
+ GET_LOCK('l2',10),
+ GET_LOCK('l3',10),
+ GET_LOCK('l3',10),
+ GET_LOCK('l3',10),
+ GET_LOCK('l4',10),
+ GET_LOCK('l4',10),
+ GET_LOCK('l4',10),
+ GET_LOCK('l4',10),
+ GET_LOCK('l5',10),
+ GET_LOCK('l5',10),
+ GET_LOCK('l5',10),
+ GET_LOCK('l5',10),
+ GET_LOCK('l5',10);
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA
+FROM information_schema.metadata_lock_info WHERE thread_id>0 ORDER BY TABLE_SCHEMA;
+SELECT RELEASE_ALL_LOCKS();
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA
+FROM information_schema.metadata_lock_info WHERE thread_id>0 ORDER BY TABLE_SCHEMA;
diff --git a/mysql-test/main/func_regexp_pcre.result b/mysql-test/main/func_regexp_pcre.result
index 494fe917dc6..3b0688fc70e 100644
--- a/mysql-test/main/func_regexp_pcre.result
+++ b/mysql-test/main/func_regexp_pcre.result
@@ -793,7 +793,7 @@ SELECT 'a\nb' RLIKE '(?-s)a.b';
0
SET default_regex_flags=DEFAULT;
SELECT REGEXP_SUBSTR('Monday Mon','^((?<DN>Mon|Fri|Sun)day|(?<DN>Tue)sday).*(?P=DN)$');
-ERROR 42000: Got error 'two named subpatterns have the same name at offset 29' from regexp
+ERROR 42000: Regex error 'two named subpatterns have the same name (PCRE2_DUPNAMES not set) at offset 30'
SET default_regex_flags='DUPNAMES';
SELECT REGEXP_SUBSTR('Monday Mon','^((?<DN>Mon|Fri|Sun)day|(?<DN>Tue)sday).*(?P=DN)$');
REGEXP_SUBSTR('Monday Mon','^((?<DN>Mon|Fri|Sun)day|(?<DN>Tue)sday).*(?P=DN)$')
@@ -817,11 +817,13 @@ SELECT 'AB' RLIKE 'A# this is a comment\nB';
1
SET default_regex_flags=DEFAULT;
SELECT 'Aq' RLIKE 'A\\q';
-'Aq' RLIKE 'A\\q'
-1
+ERROR 42000: Regex error 'unrecognized character follows \ at offset 2'
SET default_regex_flags='EXTRA';
-SELECT 'Aq' RLIKE 'A\\q';
-ERROR 42000: Got error 'unrecognized character follows \ at offset 2' from regexp
+SELECT 'A' RLIKE 'B';
+'A' RLIKE 'B'
+0
+Warnings:
+Warning 1105 PCRE2 doesn't support the EXTRA flag. Ignored.
SET default_regex_flags=DEFAULT;
SELECT 'a\nb\nc' RLIKE '^b$';
'a\nb\nc' RLIKE '^b$'
@@ -861,7 +863,7 @@ SELECT 0xE001 REGEXP @regCheck;
0xE001 REGEXP @regCheck
0
Warnings:
-Warning 1139 Got error 'pcre_exec: Invalid utf8 byte sequence in the subject string' from regexp
+Warning 1139 Regex error 'UTF-8 error: 1 byte missing at end'
# Testing workaround N1: This makes the pattern to be a binary string:
SET NAMES latin1;
SET @regCheck= X'E001';
@@ -882,41 +884,6 @@ CAST(0xE001 AS BINARY) REGEXP @regCheck
1
# MDEV-12420: Testing recursion overflow
SELECT 1 FROM dual WHERE ('Alpha,Bravo,Charlie,Delta,Echo,Foxtrot,StrataCentral,Golf,Hotel,India,Juliet,Kilo,Lima,Mike,StrataL3,November,Oscar,StrataL2,Sand,P3,P4SwitchTest,Arsys,Poppa,ExtensionMgr,Arp,Quebec,Romeo,StrataApiV2,PtReyes,Sierra,SandAcl,Arrow,Artools,BridgeTest,Tango,SandT,PAlaska,Namespace,Agent,Qos,PatchPanel,ProjectReport,Ark,Gimp,Agent,SliceAgent,Arnet,Bgp,Ale,Tommy,Central,AsicPktTestLib,Hsc,SandL3,Abuild,Pca9555,Standby,ControllerDut,CalSys,SandLib,Sb820,PointV2,BfnLib,Evpn,BfnSdk,Sflow,ManagementActive,AutoTest,GatedTest,Bgp,Sand,xinetd,BfnAgentLib,bf-utils,Hello,BfnState,Eos,Artest,Qos,Scd,ThermoMgr,Uniform,EosUtils,Eb,FanController,Central,BfnL3,BfnL2,tcp_wrappers,Victor,Environment,Route,Failover,Whiskey,Xray,Gimp,BfnFixed,Strata,SoCal,XApi,Msrp,XpProfile,tcpdump,PatchPanel,ArosTest,FhTest,Arbus,XpAcl,MacConc,XpApi,telnet,QosTest,Alpha2,BfnVlan,Stp,VxlanControllerTest,MplsAgent,Bravo2,Lanz,BfnMbb,Intf,XCtrl,Unicast,SandTunnel,L3Unicast,Ipsec,MplsTest,Rsvp,EthIntf,StageMgr,Sol,MplsUtils,Nat,Ira,P4NamespaceDut,Counters,Charlie2,Aqlc,Mlag,Power,OpenFlow,Lag,RestApi,BfdTest,strongs,Sfa,CEosUtils,Adt746,MaintenanceMode,MlagDut,EosImage,IpEth,MultiProtocol,Launcher,Max3179,Snmp,Acl,IpEthTest,PhyEee,bf-syslibs,tacc,XpL2,p4-ar-switch,p4-bf-switch,LdpTest,BfnPhy,Mirroring,Phy6,Ptp' REGEXP '^((?!\b(Strata|StrataApi|StrataApiV2)\b).)*$');
-1
-Warnings:
-Warning 1139 Got error 'pcre_exec: recursion limit of NUM exceeded' from regexp
-SELECT CONCAT(REPEAT('100,',60),'101') RLIKE '^(([1-9][0-9]*),)*[1-9][0-9]*$';
-CONCAT(REPEAT('100,',60),'101') RLIKE '^(([1-9][0-9]*),)*[1-9][0-9]*$'
-1
-SELECT CONCAT(REPEAT('100,',400),'101') RLIKE '^(([1-9][0-9]*),)*[1-9][0-9]*$';
-CONCAT(REPEAT('100,',400),'101') RLIKE '^(([1-9][0-9]*),)*[1-9][0-9]*$'
-0
-Warnings:
-Warning 1139 Got error 'pcre_exec: recursion limit of NUM exceeded' from regexp
-SELECT REGEXP_INSTR(CONCAT(REPEAT('100,',60),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$');
-REGEXP_INSTR(CONCAT(REPEAT('100,',60),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$')
-1
-SELECT REGEXP_INSTR(CONCAT(REPEAT('100,',400),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$');
-REGEXP_INSTR(CONCAT(REPEAT('100,',400),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$')
-0
-Warnings:
-Warning 1139 Got error 'pcre_exec: recursion limit of NUM exceeded' from regexp
-SELECT LENGTH(REGEXP_SUBSTR(CONCAT(REPEAT('100,',60),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$'));
-LENGTH(REGEXP_SUBSTR(CONCAT(REPEAT('100,',60),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$'))
-243
-SELECT LENGTH(REGEXP_SUBSTR(CONCAT(REPEAT('100,',400),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$'));
-LENGTH(REGEXP_SUBSTR(CONCAT(REPEAT('100,',400),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$'))
-0
-Warnings:
-Warning 1139 Got error 'pcre_exec: recursion limit of NUM exceeded' from regexp
-SELECT LENGTH(REGEXP_REPLACE(CONCAT(REPEAT('100,',60),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$', ''));
-LENGTH(REGEXP_REPLACE(CONCAT(REPEAT('100,',60),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$', ''))
-0
-SELECT LENGTH(REGEXP_REPLACE(CONCAT(REPEAT('100,',400),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$', ''));
-LENGTH(REGEXP_REPLACE(CONCAT(REPEAT('100,',400),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$', ''))
-1603
-Warnings:
-Warning 1139 Got error 'pcre_exec: recursion limit of NUM exceeded' from regexp
SELECT REGEXP_INSTR('a_kollision', 'oll');
REGEXP_INSTR('a_kollision', 'oll')
4
diff --git a/mysql-test/main/func_regexp_pcre.test b/mysql-test/main/func_regexp_pcre.test
index de0fe94b7c1..3851caf8917 100644
--- a/mysql-test/main/func_regexp_pcre.test
+++ b/mysql-test/main/func_regexp_pcre.test
@@ -368,6 +368,8 @@ SELECT 'a\nb' RLIKE 'a.b';
SELECT 'a\nb' RLIKE '(?-s)a.b';
SET default_regex_flags=DEFAULT;
+# note that old pcre2 reports a different offset
+--replace_result 29 30
--error ER_REGEXP_ERROR
SELECT REGEXP_SUBSTR('Monday Mon','^((?<DN>Mon|Fri|Sun)day|(?<DN>Tue)sday).*(?P=DN)$');
SET default_regex_flags='DUPNAMES';
@@ -382,10 +384,12 @@ SELECT 'AB' RLIKE 'A B';
SELECT 'AB' RLIKE 'A# this is a comment\nB';
SET default_regex_flags=DEFAULT;
-SELECT 'Aq' RLIKE 'A\\q';
-SET default_regex_flags='EXTRA';
--error ER_REGEXP_ERROR
SELECT 'Aq' RLIKE 'A\\q';
+
+SET default_regex_flags='EXTRA';
+SELECT 'A' RLIKE 'B';
+
SET default_regex_flags=DEFAULT;
SELECT 'a\nb\nc' RLIKE '^b$';
@@ -430,27 +434,14 @@ SET @regCheck= '\\xE0\\x01';
SELECT CAST(0xE001 AS BINARY) REGEXP @regCheck;
--echo # MDEV-12420: Testing recursion overflow
---replace_regex /[0-9]+ exceeded/NUM exceeded/
+# pcre2 < 10.30 relies on stack, we limit recursion depth, REGEXP fails
+# newer pcre2 uses heap, no need (and no way) to limit recursion, REGEXP succeeds
+# we just test that it doesn't crash with a stack overflow
+--disable_warnings
+--disable_result_log
SELECT 1 FROM dual WHERE ('Alpha,Bravo,Charlie,Delta,Echo,Foxtrot,StrataCentral,Golf,Hotel,India,Juliet,Kilo,Lima,Mike,StrataL3,November,Oscar,StrataL2,Sand,P3,P4SwitchTest,Arsys,Poppa,ExtensionMgr,Arp,Quebec,Romeo,StrataApiV2,PtReyes,Sierra,SandAcl,Arrow,Artools,BridgeTest,Tango,SandT,PAlaska,Namespace,Agent,Qos,PatchPanel,ProjectReport,Ark,Gimp,Agent,SliceAgent,Arnet,Bgp,Ale,Tommy,Central,AsicPktTestLib,Hsc,SandL3,Abuild,Pca9555,Standby,ControllerDut,CalSys,SandLib,Sb820,PointV2,BfnLib,Evpn,BfnSdk,Sflow,ManagementActive,AutoTest,GatedTest,Bgp,Sand,xinetd,BfnAgentLib,bf-utils,Hello,BfnState,Eos,Artest,Qos,Scd,ThermoMgr,Uniform,EosUtils,Eb,FanController,Central,BfnL3,BfnL2,tcp_wrappers,Victor,Environment,Route,Failover,Whiskey,Xray,Gimp,BfnFixed,Strata,SoCal,XApi,Msrp,XpProfile,tcpdump,PatchPanel,ArosTest,FhTest,Arbus,XpAcl,MacConc,XpApi,telnet,QosTest,Alpha2,BfnVlan,Stp,VxlanControllerTest,MplsAgent,Bravo2,Lanz,BfnMbb,Intf,XCtrl,Unicast,SandTunnel,L3Unicast,Ipsec,MplsTest,Rsvp,EthIntf,StageMgr,Sol,MplsUtils,Nat,Ira,P4NamespaceDut,Counters,Charlie2,Aqlc,Mlag,Power,OpenFlow,Lag,RestApi,BfdTest,strongs,Sfa,CEosUtils,Adt746,MaintenanceMode,MlagDut,EosImage,IpEth,MultiProtocol,Launcher,Max3179,Snmp,Acl,IpEthTest,PhyEee,bf-syslibs,tacc,XpL2,p4-ar-switch,p4-bf-switch,LdpTest,BfnPhy,Mirroring,Phy6,Ptp' REGEXP '^((?!\b(Strata|StrataApi|StrataApiV2)\b).)*$');
-
-#
-# MDEV-13173 An RLIKE that previously worked on 10.0 now returns "Got error 'pcre_exec: recursion limit of 100 exceeded' from regexp"
-#
-SELECT CONCAT(REPEAT('100,',60),'101') RLIKE '^(([1-9][0-9]*),)*[1-9][0-9]*$';
---replace_regex /[0-9]+ exceeded/NUM exceeded/
-SELECT CONCAT(REPEAT('100,',400),'101') RLIKE '^(([1-9][0-9]*),)*[1-9][0-9]*$';
-
-SELECT REGEXP_INSTR(CONCAT(REPEAT('100,',60),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$');
---replace_regex /[0-9]+ exceeded/NUM exceeded/
-SELECT REGEXP_INSTR(CONCAT(REPEAT('100,',400),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$');
-
-SELECT LENGTH(REGEXP_SUBSTR(CONCAT(REPEAT('100,',60),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$'));
---replace_regex /[0-9]+ exceeded/NUM exceeded/
-SELECT LENGTH(REGEXP_SUBSTR(CONCAT(REPEAT('100,',400),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$'));
-
-SELECT LENGTH(REGEXP_REPLACE(CONCAT(REPEAT('100,',60),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$', ''));
---replace_regex /[0-9]+ exceeded/NUM exceeded/
-SELECT LENGTH(REGEXP_REPLACE(CONCAT(REPEAT('100,',400),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$', ''));
+--enable_result_log
+--enable_warnings
#
# MDEV-12942 REGEXP_INSTR returns 1 when using brackets
diff --git a/mysql-test/main/func_regexp_pcre_debug.result b/mysql-test/main/func_regexp_pcre_debug.result
index 40a379a077d..61bf9cfe98b 100644
--- a/mysql-test/main/func_regexp_pcre_debug.result
+++ b/mysql-test/main/func_regexp_pcre_debug.result
@@ -3,7 +3,7 @@ SELECT 'a' RLIKE 'a';
'a' RLIKE 'a'
0
Warnings:
-Warning 1139 Got error 'pcre_exec: Internal error (-123)' from regexp
+Warning 1139 Regex error 'pcre_exec: Internal error (-123)'
SELECT 'a' RLIKE 'a';
'a' RLIKE 'a'
1
diff --git a/mysql-test/main/func_str.result b/mysql-test/main/func_str.result
index a1522c473d3..b8a2d34786f 100644
--- a/mysql-test/main/func_str.result
+++ b/mysql-test/main/func_str.result
@@ -211,6 +211,11 @@ this is test
select replace('aaaa','a','b'),replace('aaaa','aa','b'),replace('aaaa','a','bb'),replace('aaaa','','b'),replace('bbbb','a','c');
replace('aaaa','a','b') replace('aaaa','aa','b') replace('aaaa','a','bb') replace('aaaa','','b') replace('bbbb','a','c')
bbbb bb bbbbbbbb aaaa bbbb
+select replace('aaaa','a','bbbb');
+Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
+def replace('aaaa','a','bbbb') 253 16 16 Y 0 39 8
+replace('aaaa','a','bbbb')
+bbbbbbbbbbbbbbbb
select replace(concat(lcase(concat('THIS',' ','IS',' ','A',' ')),ucase('false'),' ','test'),'FALSE','REAL') ;
replace(concat(lcase(concat('THIS',' ','IS',' ','A',' ')),ucase('false'),' ','test'),'FALSE','REAL')
this is a REAL test
@@ -967,17 +972,17 @@ explain extended select length('\n\t\r\b\0\_\%\\');
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
Warnings:
-Note 1003 select octet_length('\n \r\0\\_\\%\\') AS `length('\n\t\r\b\0\_\%\\')`
+Note 1003 select octet_length('\n \r\0008\0\\_\\%\\') AS `length('\n\t\r\b\0\_\%\\')`
explain extended select bit_length('\n\t\r\b\0\_\%\\');
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
Warnings:
-Note 1003 select bit_length('\n \r\0\\_\\%\\') AS `bit_length('\n\t\r\b\0\_\%\\')`
+Note 1003 select bit_length('\n \r\0008\0\\_\\%\\') AS `bit_length('\n\t\r\b\0\_\%\\')`
explain extended select bit_length('\n\t\r\b\0\_\%\\');
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
Warnings:
-Note 1003 select bit_length('\n \r\0\\_\\%\\') AS `bit_length('\n\t\r\b\0\_\%\\')`
+Note 1003 select bit_length('\n \r\0008\0\\_\\%\\') AS `bit_length('\n\t\r\b\0\_\%\\')`
explain extended select concat('monty',' was here ','again');
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
@@ -3071,7 +3076,7 @@ SELECT ((rpad(1.0,2048,1)) = ('4(') ^ (0.1));
((rpad(1.0,2048,1)) = ('4(') ^ (0.1))
0
Warnings:
-Warning 1292 Truncated incorrect INTEGER value: '4('
+Warning 1292 Truncated incorrect DECIMAL value: '4('
SELECT
pow((rpad(10.0,2048,1)),(b'1111111111111111111111111111111111111111111'));
ERROR 22003: DOUBLE value is out of range in 'pow(rpad(10.0,2048,1),0x07ffffffffff)'
@@ -3079,7 +3084,7 @@ SELECT ((rpad(1.0,2048,1)) + (0) ^ ('../'));
((rpad(1.0,2048,1)) + (0) ^ ('../'))
1.011111111111111
Warnings:
-Warning 1292 Truncated incorrect INTEGER value: '../'
+Warning 1292 Truncated incorrect DECIMAL value: '../'
SELECT stddev_samp(rpad(1.0,2048,1));
stddev_samp(rpad(1.0,2048,1))
NULL
@@ -5162,12 +5167,9 @@ DATA_VALUE CHAR(10) NULL,
HAS_DATA BIT NOT NULL,
TEST_COLUMN CHAR(10) AS (RPAD(CASE WHEN HAS_DATA = 1
THEN DATA_VALUE ELSE NULL END, 10)) STORED);
-Warnings:
-Warning 1901 Function or expression 'rpad(case when `HAS_DATA` = 1 then `DATA_VALUE` else NULL end,10)' cannot be used in the GENERATED ALWAYS AS clause of `TEST_COLUMN`
-Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
+ERROR HY000: Function or expression 'rpad(case when `HAS_DATA` = 1 then `DATA_VALUE` else NULL end,10)' cannot be used in the GENERATED ALWAYS AS clause of `TEST_COLUMN`
# Cleanup
DROP TABLE t1;
-DROP TABLE crash_test_2;
#
# End of 10.3 tests
#
diff --git a/mysql-test/main/func_str.test b/mysql-test/main/func_str.test
index efde77f21eb..4df473fa0f6 100644
--- a/mysql-test/main/func_str.test
+++ b/mysql-test/main/func_str.test
@@ -91,6 +91,9 @@ SELECT CONCAT('"',CONCAT_WS('";"',repeat('a',60),repeat('b',60),repeat('c',60),r
select insert('txs',2,1,'hi'),insert('is ',4,0,'a'),insert('txxxxt',2,4,'es');
select replace('aaaa','a','b'),replace('aaaa','aa','b'),replace('aaaa','a','bb'),replace('aaaa','','b'),replace('bbbb','a','c');
+--enable_metadata
+select replace('aaaa','a','bbbb');
+--disable_metadata
select replace(concat(lcase(concat('THIS',' ','IS',' ','A',' ')),ucase('false'),' ','test'),'FALSE','REAL') ;
select soundex(''),soundex('he'),soundex('hello all folks'),soundex('#3556 in bugdb');
select 'mood' sounds like 'mud';
@@ -2097,6 +2100,7 @@ DROP TABLE t1, t2;
CREATE TABLE t1 (i int, b int AS (RPAD(123,1)) stored);
--echo # Original case from the reporter
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
CREATE TABLE crash_test_2 (
DATA_VALUE CHAR(10) NULL,
HAS_DATA BIT NOT NULL,
@@ -2105,7 +2109,6 @@ CREATE TABLE crash_test_2 (
--echo # Cleanup
DROP TABLE t1;
-DROP TABLE crash_test_2;
--echo #
diff --git a/mysql-test/main/func_time.result b/mysql-test/main/func_time.result
index 725e156ddd4..d44f634db08 100644
--- a/mysql-test/main/func_time.result
+++ b/mysql-test/main/func_time.result
@@ -1699,8 +1699,8 @@ NULL
SELECT MONTHNAME(0), MONTHNAME(0) IS NULL, MONTHNAME(0) + 1;
MONTHNAME(0) MONTHNAME(0) IS NULL MONTHNAME(0) + 1
NULL 1 NULL
-SET storage_engine=NULL;
-ERROR 42000: Variable 'storage_engine' can't be set to the value of 'NULL'
+SET default_storage_engine=NULL;
+ERROR 42000: Variable 'default_storage_engine' can't be set to the value of 'NULL'
#
# BUG#13354387 - CRASH IN IN MY_DECIMAL::OPERATOR FOR VIEW AND FUNCTION UNIX_TIMESTAMP
# Part1 (5.5)
@@ -2795,7 +2795,7 @@ SET sql_mode=DEFAULT;
DO TO_DAYS(SEC_TO_TIME(TIME(CEILING(UUID()))));
DO TO_DAYS(SEC_TO_TIME(MAKEDATE('',RAND(~('')))));
Warnings:
-Warning 1292 Truncated incorrect INTEGER value: ''
+Warning 1292 Truncated incorrect DECIMAL value: ''
Warning 1292 Truncated incorrect INTEGER value: ''
Warning 1292 Truncated incorrect seconds value: '20000101'
SELECT SEC_TO_TIME(MAKEDATE(0,RAND(~0)));
@@ -3701,15 +3701,15 @@ SET TIMESTAMP=DEFAULT;
# MDEV-15702 Remove the use of STRING_ITEM from Item_func_date_format::fix_length_and_dec()
#
SELECT DATE_FORMAT('2001-01-01',POINT(1,1));
-ERROR HY000: Illegal parameter data type geometry for operation 'date_format'
+ERROR HY000: Illegal parameter data type point for operation 'date_format'
SELECT DATE_FORMAT(POINT(1,1),'10');
-ERROR HY000: Illegal parameter data type geometry for operation 'date_format'
+ERROR HY000: Illegal parameter data type point for operation 'date_format'
SELECT DATE_FORMAT('2001-01-01',ROW(1,1));
ERROR HY000: Illegal parameter data type row for operation 'date_format'
SELECT DATE_FORMAT(ROW(1,1),'10');
ERROR HY000: Illegal parameter data type row for operation 'date_format'
SELECT DATE_FORMAT('2001-01-01','%Y',POINT(1,1));
-ERROR HY000: Illegal parameter data type geometry for operation 'date_format'
+ERROR HY000: Illegal parameter data type point for operation 'date_format'
SELECT DATE_FORMAT('2001-01-01','%Y',ROW(1,1));
ERROR HY000: Illegal parameter data type row for operation 'date_format'
SELECT DATE_FORMAT('2001-01-01','%Y',@unknown_user_variable);
diff --git a/mysql-test/main/func_time.test b/mysql-test/main/func_time.test
index 71f82ddba7b..970d3e44a77 100644
--- a/mysql-test/main/func_time.test
+++ b/mysql-test/main/func_time.test
@@ -1016,7 +1016,7 @@ SELECT SUBDATE(STR_TO_DATE(NULL,0), INTERVAL 1 HOUR);
--echo #
SELECT MONTHNAME(0), MONTHNAME(0) IS NULL, MONTHNAME(0) + 1;
--error ER_WRONG_VALUE_FOR_VAR
-SET storage_engine=NULL;
+SET default_storage_engine=NULL;
--echo #
diff --git a/mysql-test/main/function_defaults.result b/mysql-test/main/function_defaults.result
index 4a8f64df352..1f9b324e30c 100644
--- a/mysql-test/main/function_defaults.result
+++ b/mysql-test/main/function_defaults.result
@@ -6,7 +6,7 @@
#
SET TIME_ZONE = "+00:00";
#
-# Test of errors for column data types that dont support function
+# Test of errors for column data types that don't support function
# defaults.
#
CREATE OR REPLACE TABLE t1( a BIT DEFAULT CURRENT_TIMESTAMP );
@@ -1552,7 +1552,7 @@ DROP TABLE t1;
#
SET TIME_ZONE = "+00:00";
#
-# Test of errors for column data types that dont support function
+# Test of errors for column data types that don't support function
# defaults.
#
CREATE OR REPLACE TABLE t1( a BIT DEFAULT CURRENT_TIMESTAMP(6) );
diff --git a/mysql-test/main/function_defaults_innodb.result b/mysql-test/main/function_defaults_innodb.result
index dd769f8577a..c73dda735d5 100644
--- a/mysql-test/main/function_defaults_innodb.result
+++ b/mysql-test/main/function_defaults_innodb.result
@@ -7,7 +7,7 @@ set default_storage_engine=innodb;
#
SET TIME_ZONE = "+00:00";
#
-# Test of errors for column data types that dont support function
+# Test of errors for column data types that don't support function
# defaults.
#
CREATE OR REPLACE TABLE t1( a BIT DEFAULT CURRENT_TIMESTAMP );
@@ -1553,7 +1553,7 @@ DROP TABLE t1;
#
SET TIME_ZONE = "+00:00";
#
-# Test of errors for column data types that dont support function
+# Test of errors for column data types that don't support function
# defaults.
#
CREATE OR REPLACE TABLE t1( a BIT DEFAULT CURRENT_TIMESTAMP(6) );
diff --git a/mysql-test/main/get_diagnostics.result b/mysql-test/main/get_diagnostics.result
index 6944103c805..ca495d6954d 100644
--- a/mysql-test/main/get_diagnostics.result
+++ b/mysql-test/main/get_diagnostics.result
@@ -1,3 +1,4 @@
+SET NAMES utf8;
#
# WL#2111: GET DIAGNOSTICS tests
#
diff --git a/mysql-test/main/get_diagnostics.test b/mysql-test/main/get_diagnostics.test
index 1553eb500b7..4667ec727dd 100644
--- a/mysql-test/main/get_diagnostics.test
+++ b/mysql-test/main/get_diagnostics.test
@@ -1,3 +1,5 @@
+SET NAMES utf8;
+
--echo #
--echo # WL#2111: GET DIAGNOSTICS tests
--echo #
diff --git a/mysql-test/main/gis-debug.result b/mysql-test/main/gis-debug.result
index 2daa810db0d..f490a720ecf 100644
--- a/mysql-test/main/gis-debug.result
+++ b/mysql-test/main/gis-debug.result
@@ -356,22 +356,16 @@ SET SESSION debug_dbug="-d,Item_func_in";
# MDEV-12238 Add Type_handler::Item_func_{plus|minus|mul|div|mod}_fix_length_and_dec()
#
SET debug_dbug='+d,num_op';
-CREATE TABLE t1 AS SELECT
-POINT(0,0)+POINT(0,0),
-POINT(0,0)-POINT(0,0),
-POINT(0,0)*POINT(0,0),
-POINT(0,0)/POINT(0,0),
-POINT(0,0) MOD POINT(0,0) LIMIT 0;
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `POINT(0,0)+POINT(0,0)` geometry DEFAULT NULL,
- `POINT(0,0)-POINT(0,0)` geometry DEFAULT NULL,
- `POINT(0,0)*POINT(0,0)` geometry DEFAULT NULL,
- `POINT(0,0)/POINT(0,0)` geometry DEFAULT NULL,
- `POINT(0,0) MOD POINT(0,0)` geometry DEFAULT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1
-DROP TABLE t1;
+SELECT POINT(0,0)+POINT(0,0);
+ERROR HY000: Illegal parameter data types point and point for operation '+'
+SELECT POINT(0,0)-POINT(0,0);
+ERROR HY000: Illegal parameter data types point and point for operation '-'
+SELECT POINT(0,0)*POINT(0,0);
+ERROR HY000: Illegal parameter data types point and point for operation '*'
+SELECT POINT(0,0)/POINT(0,0);
+ERROR HY000: Illegal parameter data types point and point for operation '/'
+SELECT POINT(0,0) MOD POINT(0,0);
+ERROR HY000: Illegal parameter data types point and point for operation 'MOD'
CREATE TABLE t1 AS SELECT
POINT(0,0)+'0',
POINT(0,0)-'0',
@@ -399,11 +393,11 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
CREATE TABLE t1 AS SELECT '0'-POINT(0,0) LIMIT 0;
-ERROR HY000: Illegal parameter data types varchar and geometry for operation '-'
+ERROR HY000: Illegal parameter data types varchar and point for operation '-'
CREATE TABLE t1 AS SELECT '0'/POINT(0,0) LIMIT 0;
-ERROR HY000: Illegal parameter data types varchar and geometry for operation '/'
+ERROR HY000: Illegal parameter data types varchar and point for operation '/'
CREATE TABLE t1 AS SELECT '0' MOD POINT(0,0) LIMIT 0;
-ERROR HY000: Illegal parameter data types varchar and geometry for operation 'MOD'
+ERROR HY000: Illegal parameter data types varchar and point for operation 'MOD'
SET debug_dbug='-d,num_op';
#
# End of 10.3 tests
@@ -424,9 +418,9 @@ Warnings:
Note 1105 DBUG: [0] arg=1 handler=0 (row)
Note 1105 DBUG: [1] arg=2 handler=0 (row)
Note 1105 DBUG: ROW(3 args) level=0
-Note 1105 DBUG: [0,0] handler=geometry
-Note 1105 DBUG: [0,1] handler=geometry
-Note 1105 DBUG: [0,2] handler=geometry
+Note 1105 DBUG: [0,0] handler=point
+Note 1105 DBUG: [0,1] handler=point
+Note 1105 DBUG: [0,2] handler=point
Note 1105 DBUG: => handler=geometry
Note 1105 DBUG: [1,0] handler=int
Note 1105 DBUG: [1,1] handler=int
@@ -449,9 +443,9 @@ Note 1105 DBUG: [1,1] handler=row
Note 1105 DBUG: [1,2] handler=row
Note 1105 DBUG: => handler=row
Note 1105 DBUG: ROW(3 args) level=1
-Note 1105 DBUG: [0,0] handler=geometry
-Note 1105 DBUG: [0,1] handler=geometry
-Note 1105 DBUG: [0,2] handler=geometry
+Note 1105 DBUG: [0,0] handler=point
+Note 1105 DBUG: [0,1] handler=point
+Note 1105 DBUG: [0,2] handler=point
Note 1105 DBUG: => handler=geometry
Note 1105 DBUG: [1,0] handler=int
Note 1105 DBUG: [1,1] handler=int
@@ -459,18 +453,18 @@ Note 1105 DBUG: [1,2] handler=int
Note 1105 DBUG: => handler=bigint
Note 1105 DBUG: types_compatible=yes bisect=no
SELECT (1,0) IN ((POINT(1,1),0),(0,0));
-ERROR HY000: Illegal parameter data types int and geometry for operation 'in'
+ERROR HY000: Illegal parameter data types int and point for operation 'in'
SHOW WARNINGS;
Level Code Message
Note 1105 DBUG: [0] arg=1 handler=0 (row)
Note 1105 DBUG: [1] arg=2 handler=0 (row)
Note 1105 DBUG: ROW(3 args) level=0
Note 1105 DBUG: [0,0] handler=int
-Note 1105 DBUG: [0,1] handler=geometry
+Note 1105 DBUG: [0,1] handler=point
Note 1105 DBUG: [0,2] handler=int
-Error 4078 Illegal parameter data types int and geometry for operation 'in'
+Error 4078 Illegal parameter data types int and point for operation 'in'
SELECT (1,(0,0)) IN ((1,(POINT(1,1),0)),(0,(0,0)));
-ERROR HY000: Illegal parameter data types int and geometry for operation 'in'
+ERROR HY000: Illegal parameter data types int and point for operation 'in'
SHOW WARNINGS;
Level Code Message
Note 1105 DBUG: [0] arg=1 handler=0 (row)
@@ -486,12 +480,35 @@ Note 1105 DBUG: [1,2] handler=row
Note 1105 DBUG: => handler=row
Note 1105 DBUG: ROW(3 args) level=1
Note 1105 DBUG: [0,0] handler=int
-Note 1105 DBUG: [0,1] handler=geometry
+Note 1105 DBUG: [0,1] handler=point
Note 1105 DBUG: [0,2] handler=int
-Error 4078 Illegal parameter data types int and geometry for operation 'in'
+Error 4078 Illegal parameter data types int and point for operation 'in'
SET SESSION debug_dbug="-d,Predicant_to_list_comparator";
SET SESSION debug_dbug="-d,Item_func_in";
SET SESSION debug_dbug="-d,cmp_item";
#
# End of 10.4 tests
#
+#
+# Start of 10.5 tests
+#
+#
+# MDEV-19994 Add class Function_collection
+#
+SET SESSION debug_dbug="+d,make_item_func_call_native_simulate_not_found";
+SELECT CONTAINS(POINT(1,1),POINT(1,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 '(POINT(1,1),POINT(1,1))' at line 1
+SELECT WITHIN(POINT(1,1),POINT(1,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 '(POINT(1,1),POINT(1,1))' at line 1
+SET SESSION debug_dbug="-d,make_item_func_call_native_simulate_not_found";
+#
+# MDEV-20009 Add CAST(expr AS pluggable_type)
+#
+SET SESSION debug_dbug="+d,emulate_geometry_create_typecast_item";
+SELECT AsText(CAST('POINT(0 0)' AS GEOMETRY));
+AsText(CAST('POINT(0 0)' AS GEOMETRY))
+POINT(0 0)
+SET SESSION debug_dbug="-d,emulate_geometry_create_typecast_item";
+#
+# End of 10.5 tests
+#
diff --git a/mysql-test/main/gis-debug.test b/mysql-test/main/gis-debug.test
index dd64ce0f04c..0e11c11e5b5 100644
--- a/mysql-test/main/gis-debug.test
+++ b/mysql-test/main/gis-debug.test
@@ -73,15 +73,19 @@ SET SESSION debug_dbug="-d,Item_func_in";
SET debug_dbug='+d,num_op';
-# (GEOMETRY,GEOMETRY) gives GEOMETRY for all operators
-CREATE TABLE t1 AS SELECT
- POINT(0,0)+POINT(0,0),
- POINT(0,0)-POINT(0,0),
- POINT(0,0)*POINT(0,0),
- POINT(0,0)/POINT(0,0),
- POINT(0,0) MOD POINT(0,0) LIMIT 0;
-SHOW CREATE TABLE t1;
-DROP TABLE t1;
+# (GEOMETRY,GEOMETRY) goes through
+# Type_collection_geometry::aggregate_for_num_op() which fails.
+
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT POINT(0,0)+POINT(0,0);
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT POINT(0,0)-POINT(0,0);
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT POINT(0,0)*POINT(0,0);
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT POINT(0,0)/POINT(0,0);
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT POINT(0,0) MOD POINT(0,0);
# (GEOMETRY,VARCHAR) gives GEOMETRY for all operators
CREATE TABLE t1 AS SELECT
@@ -147,3 +151,32 @@ SET SESSION debug_dbug="-d,cmp_item";
--echo #
--echo # End of 10.4 tests
--echo #
+
+
+--echo #
+--echo # Start of 10.5 tests
+--echo #
+
+--echo #
+--echo # MDEV-19994 Add class Function_collection
+--echo #
+
+SET SESSION debug_dbug="+d,make_item_func_call_native_simulate_not_found";
+--error ER_PARSE_ERROR
+SELECT CONTAINS(POINT(1,1),POINT(1,1));
+--error ER_PARSE_ERROR
+SELECT WITHIN(POINT(1,1),POINT(1,1));
+SET SESSION debug_dbug="-d,make_item_func_call_native_simulate_not_found";
+
+--echo #
+--echo # MDEV-20009 Add CAST(expr AS pluggable_type)
+--echo #
+
+SET SESSION debug_dbug="+d,emulate_geometry_create_typecast_item";
+SELECT AsText(CAST('POINT(0 0)' AS GEOMETRY));
+SET SESSION debug_dbug="-d,emulate_geometry_create_typecast_item";
+
+
+--echo #
+--echo # End of 10.5 tests
+--echo #
diff --git a/mysql-test/main/gis.result b/mysql-test/main/gis.result
index 655649b85ff..8bcb98143a2 100644
--- a/mysql-test/main/gis.result
+++ b/mysql-test/main/gis.result
@@ -488,7 +488,7 @@ explain extended select issimple(MultiPoint(Point(3, 6), Point(4, 10))), issimpl
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
Warnings:
-Note 1003 select st_issimple(geometrycollection(point(3,6),point(4,10))) AS `issimple(MultiPoint(Point(3, 6), Point(4, 10)))`,st_issimple(point(3,6)) AS `issimple(Point(3, 6))`
+Note 1003 select st_issimple(multipoint(point(3,6),point(4,10))) AS `issimple(MultiPoint(Point(3, 6), Point(4, 10)))`,st_issimple(point(3,6)) AS `issimple(Point(3, 6))`
create table t1 (a geometry not null);
insert into t1 values (GeomFromText('Point(1 2)'));
insert into t1 values ('Garbage');
@@ -1049,7 +1049,7 @@ f5 datetime YES NULL
drop view v1;
drop table t1;
SELECT MultiPoint(12345,'');
-ERROR HY000: Illegal parameter data type int for operation 'geometrycollection'
+ERROR HY000: Illegal parameter data type int for operation 'multipoint'
SELECT 1 FROM (SELECT GREATEST(1,GEOMETRYCOLLECTION('00000','00000')) b FROM DUAL) AS d WHERE (LINESTRING(d.b));
ERROR HY000: Illegal parameter data type varchar for operation 'geometrycollection'
#
@@ -1889,10 +1889,10 @@ DROP TABLE t1;
create view v1 as select AsWKT(GeometryCollection(Point(44, 6), LineString(Point(3, 6), Point(7, 9))));
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 st_astext(geometrycollection(point(44,6),geometrycollection(point(3,6),point(7,9)))) AS `Name_exp_1` latin1 latin1_swedish_ci
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select st_astext(geometrycollection(point(44,6),linestring(point(3,6),point(7,9)))) AS `Name_exp_1` latin1 latin1_swedish_ci
select * from v1;
Name_exp_1
-GEOMETRYCOLLECTION(POINT(44 6),GEOMETRYCOLLECTION(POINT(3 6),POINT(7 9)))
+GEOMETRYCOLLECTION(POINT(44 6),LINESTRING(3 6,7 9))
drop view v1;
#
# MDEV-10134 Add full support for DEFAULT
@@ -2505,309 +2505,309 @@ CREATE TABLE t1 (a TINYINT, b Point)
CREATE TABLE t2 AS SELECT CASE WHEN TRUE THEN a ELSE b END FROM t1
ERROR:
-Illegal parameter data types tinyint and geometry for operation 'case'
+Illegal parameter data types tinyint and point for operation 'case'
CREATE TABLE t2 AS SELECT COALESCE(a,b) FROM t1
ERROR:
-Illegal parameter data types tinyint and geometry for operation 'coalesce'
+Illegal parameter data types tinyint and point for operation 'coalesce'
CREATE TABLE t2 AS SELECT IF(TRUE,a,b) FROM t1
ERROR:
-Illegal parameter data types tinyint and geometry for operation 'if'
+Illegal parameter data types tinyint and point for operation 'if'
CREATE TABLE t2 AS SELECT IFNULL(a,b) FROM t1
ERROR:
-Illegal parameter data types tinyint and geometry for operation 'ifnull'
+Illegal parameter data types tinyint and point for operation 'ifnull'
CREATE TABLE t2 AS SELECT a FROM t1 UNION SELECT b FROM t1
ERROR:
-Illegal parameter data types tinyint and geometry for operation 'UNION'
+Illegal parameter data types tinyint and point for operation 'UNION'
-------------------------------------
CREATE TABLE t1 (a SMALLINT, b Point)
CREATE TABLE t2 AS SELECT CASE WHEN TRUE THEN a ELSE b END FROM t1
ERROR:
-Illegal parameter data types smallint and geometry for operation 'case'
+Illegal parameter data types smallint and point for operation 'case'
CREATE TABLE t2 AS SELECT COALESCE(a,b) FROM t1
ERROR:
-Illegal parameter data types smallint and geometry for operation 'coalesce'
+Illegal parameter data types smallint and point for operation 'coalesce'
CREATE TABLE t2 AS SELECT IF(TRUE,a,b) FROM t1
ERROR:
-Illegal parameter data types smallint and geometry for operation 'if'
+Illegal parameter data types smallint and point for operation 'if'
CREATE TABLE t2 AS SELECT IFNULL(a,b) FROM t1
ERROR:
-Illegal parameter data types smallint and geometry for operation 'ifnull'
+Illegal parameter data types smallint and point for operation 'ifnull'
CREATE TABLE t2 AS SELECT a FROM t1 UNION SELECT b FROM t1
ERROR:
-Illegal parameter data types smallint and geometry for operation 'UNION'
+Illegal parameter data types smallint and point for operation 'UNION'
-------------------------------------
CREATE TABLE t1 (a MEDIUMINT, b Point)
CREATE TABLE t2 AS SELECT CASE WHEN TRUE THEN a ELSE b END FROM t1
ERROR:
-Illegal parameter data types mediumint and geometry for operation 'case'
+Illegal parameter data types mediumint and point for operation 'case'
CREATE TABLE t2 AS SELECT COALESCE(a,b) FROM t1
ERROR:
-Illegal parameter data types mediumint and geometry for operation 'coalesce'
+Illegal parameter data types mediumint and point for operation 'coalesce'
CREATE TABLE t2 AS SELECT IF(TRUE,a,b) FROM t1
ERROR:
-Illegal parameter data types mediumint and geometry for operation 'if'
+Illegal parameter data types mediumint and point for operation 'if'
CREATE TABLE t2 AS SELECT IFNULL(a,b) FROM t1
ERROR:
-Illegal parameter data types mediumint and geometry for operation 'ifnull'
+Illegal parameter data types mediumint and point for operation 'ifnull'
CREATE TABLE t2 AS SELECT a FROM t1 UNION SELECT b FROM t1
ERROR:
-Illegal parameter data types mediumint and geometry for operation 'UNION'
+Illegal parameter data types mediumint and point for operation 'UNION'
-------------------------------------
CREATE TABLE t1 (a INT, b Point)
CREATE TABLE t2 AS SELECT CASE WHEN TRUE THEN a ELSE b END FROM t1
ERROR:
-Illegal parameter data types int and geometry for operation 'case'
+Illegal parameter data types int and point for operation 'case'
CREATE TABLE t2 AS SELECT COALESCE(a,b) FROM t1
ERROR:
-Illegal parameter data types int and geometry for operation 'coalesce'
+Illegal parameter data types int and point for operation 'coalesce'
CREATE TABLE t2 AS SELECT IF(TRUE,a,b) FROM t1
ERROR:
-Illegal parameter data types int and geometry for operation 'if'
+Illegal parameter data types int and point for operation 'if'
CREATE TABLE t2 AS SELECT IFNULL(a,b) FROM t1
ERROR:
-Illegal parameter data types int and geometry for operation 'ifnull'
+Illegal parameter data types int and point for operation 'ifnull'
CREATE TABLE t2 AS SELECT a FROM t1 UNION SELECT b FROM t1
ERROR:
-Illegal parameter data types int and geometry for operation 'UNION'
+Illegal parameter data types int and point for operation 'UNION'
-------------------------------------
CREATE TABLE t1 (a BIGINT, b Point)
CREATE TABLE t2 AS SELECT CASE WHEN TRUE THEN a ELSE b END FROM t1
ERROR:
-Illegal parameter data types bigint and geometry for operation 'case'
+Illegal parameter data types bigint and point for operation 'case'
CREATE TABLE t2 AS SELECT COALESCE(a,b) FROM t1
ERROR:
-Illegal parameter data types bigint and geometry for operation 'coalesce'
+Illegal parameter data types bigint and point for operation 'coalesce'
CREATE TABLE t2 AS SELECT IF(TRUE,a,b) FROM t1
ERROR:
-Illegal parameter data types bigint and geometry for operation 'if'
+Illegal parameter data types bigint and point for operation 'if'
CREATE TABLE t2 AS SELECT IFNULL(a,b) FROM t1
ERROR:
-Illegal parameter data types bigint and geometry for operation 'ifnull'
+Illegal parameter data types bigint and point for operation 'ifnull'
CREATE TABLE t2 AS SELECT a FROM t1 UNION SELECT b FROM t1
ERROR:
-Illegal parameter data types bigint and geometry for operation 'UNION'
+Illegal parameter data types bigint and point for operation 'UNION'
-------------------------------------
CREATE TABLE t1 (a FLOAT, b Point)
CREATE TABLE t2 AS SELECT CASE WHEN TRUE THEN a ELSE b END FROM t1
ERROR:
-Illegal parameter data types float and geometry for operation 'case'
+Illegal parameter data types float and point for operation 'case'
CREATE TABLE t2 AS SELECT COALESCE(a,b) FROM t1
ERROR:
-Illegal parameter data types float and geometry for operation 'coalesce'
+Illegal parameter data types float and point for operation 'coalesce'
CREATE TABLE t2 AS SELECT IF(TRUE,a,b) FROM t1
ERROR:
-Illegal parameter data types float and geometry for operation 'if'
+Illegal parameter data types float and point for operation 'if'
CREATE TABLE t2 AS SELECT IFNULL(a,b) FROM t1
ERROR:
-Illegal parameter data types float and geometry for operation 'ifnull'
+Illegal parameter data types float and point for operation 'ifnull'
CREATE TABLE t2 AS SELECT a FROM t1 UNION SELECT b FROM t1
ERROR:
-Illegal parameter data types float and geometry for operation 'UNION'
+Illegal parameter data types float and point for operation 'UNION'
-------------------------------------
CREATE TABLE t1 (a DOUBLE, b Point)
CREATE TABLE t2 AS SELECT CASE WHEN TRUE THEN a ELSE b END FROM t1
ERROR:
-Illegal parameter data types double and geometry for operation 'case'
+Illegal parameter data types double and point for operation 'case'
CREATE TABLE t2 AS SELECT COALESCE(a,b) FROM t1
ERROR:
-Illegal parameter data types double and geometry for operation 'coalesce'
+Illegal parameter data types double and point for operation 'coalesce'
CREATE TABLE t2 AS SELECT IF(TRUE,a,b) FROM t1
ERROR:
-Illegal parameter data types double and geometry for operation 'if'
+Illegal parameter data types double and point for operation 'if'
CREATE TABLE t2 AS SELECT IFNULL(a,b) FROM t1
ERROR:
-Illegal parameter data types double and geometry for operation 'ifnull'
+Illegal parameter data types double and point for operation 'ifnull'
CREATE TABLE t2 AS SELECT a FROM t1 UNION SELECT b FROM t1
ERROR:
-Illegal parameter data types double and geometry for operation 'UNION'
+Illegal parameter data types double and point for operation 'UNION'
-------------------------------------
CREATE TABLE t1 (a DECIMAL(10,2), b Point)
CREATE TABLE t2 AS SELECT CASE WHEN TRUE THEN a ELSE b END FROM t1
ERROR:
-Illegal parameter data types decimal and geometry for operation 'case'
+Illegal parameter data types decimal and point for operation 'case'
CREATE TABLE t2 AS SELECT COALESCE(a,b) FROM t1
ERROR:
-Illegal parameter data types decimal and geometry for operation 'coalesce'
+Illegal parameter data types decimal and point for operation 'coalesce'
CREATE TABLE t2 AS SELECT IF(TRUE,a,b) FROM t1
ERROR:
-Illegal parameter data types decimal and geometry for operation 'if'
+Illegal parameter data types decimal and point for operation 'if'
CREATE TABLE t2 AS SELECT IFNULL(a,b) FROM t1
ERROR:
-Illegal parameter data types decimal and geometry for operation 'ifnull'
+Illegal parameter data types decimal and point for operation 'ifnull'
CREATE TABLE t2 AS SELECT a FROM t1 UNION SELECT b FROM t1
ERROR:
-Illegal parameter data types decimal and geometry for operation 'UNION'
+Illegal parameter data types decimal and point for operation 'UNION'
-------------------------------------
CREATE TABLE t1 (a BIT(8), b Point)
CREATE TABLE t2 AS SELECT CASE WHEN TRUE THEN a ELSE b END FROM t1
ERROR:
-Illegal parameter data types bigint and geometry for operation 'case'
+Illegal parameter data types bigint and point for operation 'case'
CREATE TABLE t2 AS SELECT COALESCE(a,b) FROM t1
ERROR:
-Illegal parameter data types bigint and geometry for operation 'coalesce'
+Illegal parameter data types bigint and point for operation 'coalesce'
CREATE TABLE t2 AS SELECT IF(TRUE,a,b) FROM t1
ERROR:
-Illegal parameter data types bigint and geometry for operation 'if'
+Illegal parameter data types bigint and point for operation 'if'
CREATE TABLE t2 AS SELECT IFNULL(a,b) FROM t1
ERROR:
-Illegal parameter data types bigint and geometry for operation 'ifnull'
+Illegal parameter data types bigint and point for operation 'ifnull'
CREATE TABLE t2 AS SELECT a FROM t1 UNION SELECT b FROM t1
ERROR:
-Illegal parameter data types bit and geometry for operation 'UNION'
+Illegal parameter data types bit and point for operation 'UNION'
-------------------------------------
CREATE TABLE t1 (a TIME, b Point)
CREATE TABLE t2 AS SELECT CASE WHEN TRUE THEN a ELSE b END FROM t1
ERROR:
-Illegal parameter data types time and geometry for operation 'case'
+Illegal parameter data types time and point for operation 'case'
CREATE TABLE t2 AS SELECT COALESCE(a,b) FROM t1
ERROR:
-Illegal parameter data types time and geometry for operation 'coalesce'
+Illegal parameter data types time and point for operation 'coalesce'
CREATE TABLE t2 AS SELECT IF(TRUE,a,b) FROM t1
ERROR:
-Illegal parameter data types time and geometry for operation 'if'
+Illegal parameter data types time and point for operation 'if'
CREATE TABLE t2 AS SELECT IFNULL(a,b) FROM t1
ERROR:
-Illegal parameter data types time and geometry for operation 'ifnull'
+Illegal parameter data types time and point for operation 'ifnull'
CREATE TABLE t2 AS SELECT a FROM t1 UNION SELECT b FROM t1
ERROR:
-Illegal parameter data types time and geometry for operation 'UNION'
+Illegal parameter data types time and point for operation 'UNION'
-------------------------------------
CREATE TABLE t1 (a DATE, b Point)
CREATE TABLE t2 AS SELECT CASE WHEN TRUE THEN a ELSE b END FROM t1
ERROR:
-Illegal parameter data types date and geometry for operation 'case'
+Illegal parameter data types date and point for operation 'case'
CREATE TABLE t2 AS SELECT COALESCE(a,b) FROM t1
ERROR:
-Illegal parameter data types date and geometry for operation 'coalesce'
+Illegal parameter data types date and point for operation 'coalesce'
CREATE TABLE t2 AS SELECT IF(TRUE,a,b) FROM t1
ERROR:
-Illegal parameter data types date and geometry for operation 'if'
+Illegal parameter data types date and point for operation 'if'
CREATE TABLE t2 AS SELECT IFNULL(a,b) FROM t1
ERROR:
-Illegal parameter data types date and geometry for operation 'ifnull'
+Illegal parameter data types date and point for operation 'ifnull'
CREATE TABLE t2 AS SELECT a FROM t1 UNION SELECT b FROM t1
ERROR:
-Illegal parameter data types date and geometry for operation 'UNION'
+Illegal parameter data types date and point for operation 'UNION'
-------------------------------------
CREATE TABLE t1 (a DATETIME, b Point)
CREATE TABLE t2 AS SELECT CASE WHEN TRUE THEN a ELSE b END FROM t1
ERROR:
-Illegal parameter data types datetime and geometry for operation 'case'
+Illegal parameter data types datetime and point for operation 'case'
CREATE TABLE t2 AS SELECT COALESCE(a,b) FROM t1
ERROR:
-Illegal parameter data types datetime and geometry for operation 'coalesce'
+Illegal parameter data types datetime and point for operation 'coalesce'
CREATE TABLE t2 AS SELECT IF(TRUE,a,b) FROM t1
ERROR:
-Illegal parameter data types datetime and geometry for operation 'if'
+Illegal parameter data types datetime and point for operation 'if'
CREATE TABLE t2 AS SELECT IFNULL(a,b) FROM t1
ERROR:
-Illegal parameter data types datetime and geometry for operation 'ifnull'
+Illegal parameter data types datetime and point for operation 'ifnull'
CREATE TABLE t2 AS SELECT a FROM t1 UNION SELECT b FROM t1
ERROR:
-Illegal parameter data types datetime and geometry for operation 'UNION'
+Illegal parameter data types datetime and point for operation 'UNION'
-------------------------------------
CREATE TABLE t1 (a TIMESTAMP, b Point)
CREATE TABLE t2 AS SELECT CASE WHEN TRUE THEN a ELSE b END FROM t1
ERROR:
-Illegal parameter data types timestamp and geometry for operation 'case'
+Illegal parameter data types timestamp and point for operation 'case'
CREATE TABLE t2 AS SELECT COALESCE(a,b) FROM t1
ERROR:
-Illegal parameter data types timestamp and geometry for operation 'coalesce'
+Illegal parameter data types timestamp and point for operation 'coalesce'
CREATE TABLE t2 AS SELECT IF(TRUE,a,b) FROM t1
ERROR:
-Illegal parameter data types timestamp and geometry for operation 'if'
+Illegal parameter data types timestamp and point for operation 'if'
CREATE TABLE t2 AS SELECT IFNULL(a,b) FROM t1
ERROR:
-Illegal parameter data types timestamp and geometry for operation 'ifnull'
+Illegal parameter data types timestamp and point for operation 'ifnull'
CREATE TABLE t2 AS SELECT a FROM t1 UNION SELECT b FROM t1
ERROR:
-Illegal parameter data types timestamp and geometry for operation 'UNION'
+Illegal parameter data types timestamp and point for operation 'UNION'
-------------------------------------
CREATE TABLE t1 (a YEAR, b Point)
CREATE TABLE t2 AS SELECT CASE WHEN TRUE THEN a ELSE b END FROM t1
ERROR:
-Illegal parameter data types year and geometry for operation 'case'
+Illegal parameter data types year and point for operation 'case'
CREATE TABLE t2 AS SELECT COALESCE(a,b) FROM t1
ERROR:
-Illegal parameter data types year and geometry for operation 'coalesce'
+Illegal parameter data types year and point for operation 'coalesce'
CREATE TABLE t2 AS SELECT IF(TRUE,a,b) FROM t1
ERROR:
-Illegal parameter data types year and geometry for operation 'if'
+Illegal parameter data types year and point for operation 'if'
CREATE TABLE t2 AS SELECT IFNULL(a,b) FROM t1
ERROR:
-Illegal parameter data types year and geometry for operation 'ifnull'
+Illegal parameter data types year and point for operation 'ifnull'
CREATE TABLE t2 AS SELECT a FROM t1 UNION SELECT b FROM t1
ERROR:
-Illegal parameter data types year and geometry for operation 'UNION'
+Illegal parameter data types year and point for operation 'UNION'
# This creates BLOB with hybrid functions, but fails on error with UNION (MDEV-11458)
-------------------------------------
CREATE TABLE t1 (a ENUM(0x61), b Point)
@@ -2838,7 +2838,7 @@ t2 CREATE TABLE `t2` (
CREATE TABLE t2 AS SELECT a FROM t1 UNION SELECT b FROM t1
ERROR:
-Illegal parameter data types enum and geometry for operation 'UNION'
+Illegal parameter data types enum and point for operation 'UNION'
-------------------------------------
CREATE TABLE t1 (a SET(0x61), b Point)
@@ -2868,7 +2868,7 @@ t2 CREATE TABLE `t2` (
CREATE TABLE t2 AS SELECT a FROM t1 UNION SELECT b FROM t1
ERROR:
-Illegal parameter data types set and geometry for operation 'UNION'
+Illegal parameter data types set and point for operation 'UNION'
CREATE TABLE t1 AS SELECT COALESCE(NULL, Point(1,1));
SHOW CREATE TABLE t1;
Table Create Table
@@ -3155,602 +3155,602 @@ CREATE TABLE t1 (a TINYINT, b Point, c Point)
SELECT a=b FROM t1
ERROR:
-Illegal parameter data types tinyint and geometry for operation '='
+Illegal parameter data types tinyint and point for operation '='
SELECT b=a FROM t1
ERROR:
-Illegal parameter data types geometry and tinyint for operation '='
+Illegal parameter data types point and tinyint for operation '='
SELECT a BETWEEN b AND c FROM t1
ERROR:
-Illegal parameter data types tinyint and geometry for operation 'between'
+Illegal parameter data types tinyint and point for operation 'between'
SELECT a IN (b,c) FROM t1
ERROR:
-Illegal parameter data types tinyint and geometry for operation 'in'
+Illegal parameter data types tinyint and point for operation 'in'
SELECT CASE a WHEN b THEN "a" WHEN c THEN "b" END FROM t1
ERROR:
-Illegal parameter data types tinyint and geometry for operation 'case..when'
+Illegal parameter data types tinyint and point for operation 'case..when'
SELECT a=POINT(1,1) FROM t1
ERROR:
-Illegal parameter data types tinyint and geometry for operation '='
+Illegal parameter data types tinyint and point for operation '='
SELECT POINT(1,1)=a FROM t1
ERROR:
-Illegal parameter data types geometry and tinyint for operation '='
+Illegal parameter data types point and tinyint for operation '='
SELECT a BETWEEN POINT(1,1) AND POINT(1,2) FROM t1
ERROR:
-Illegal parameter data types tinyint and geometry for operation 'between'
+Illegal parameter data types tinyint and point for operation 'between'
SELECT a IN (POINT(1,1),POINT(1,2)) FROM t1
ERROR:
-Illegal parameter data types tinyint and geometry for operation 'in'
+Illegal parameter data types tinyint and point for operation 'in'
SELECT CASE a WHEN POINT(1,1) THEN "a" WHEN POINT(1,2) THEN "b" END FROM t1
ERROR:
-Illegal parameter data types tinyint and geometry for operation 'case..when'
+Illegal parameter data types tinyint and point for operation 'case..when'
CALL p1('CREATE TABLE t1 (a SMALLINT, b Point, c Point)');
-------------------------------------
CREATE TABLE t1 (a SMALLINT, b Point, c Point)
SELECT a=b FROM t1
ERROR:
-Illegal parameter data types smallint and geometry for operation '='
+Illegal parameter data types smallint and point for operation '='
SELECT b=a FROM t1
ERROR:
-Illegal parameter data types geometry and smallint for operation '='
+Illegal parameter data types point and smallint for operation '='
SELECT a BETWEEN b AND c FROM t1
ERROR:
-Illegal parameter data types smallint and geometry for operation 'between'
+Illegal parameter data types smallint and point for operation 'between'
SELECT a IN (b,c) FROM t1
ERROR:
-Illegal parameter data types smallint and geometry for operation 'in'
+Illegal parameter data types smallint and point for operation 'in'
SELECT CASE a WHEN b THEN "a" WHEN c THEN "b" END FROM t1
ERROR:
-Illegal parameter data types smallint and geometry for operation 'case..when'
+Illegal parameter data types smallint and point for operation 'case..when'
SELECT a=POINT(1,1) FROM t1
ERROR:
-Illegal parameter data types smallint and geometry for operation '='
+Illegal parameter data types smallint and point for operation '='
SELECT POINT(1,1)=a FROM t1
ERROR:
-Illegal parameter data types geometry and smallint for operation '='
+Illegal parameter data types point and smallint for operation '='
SELECT a BETWEEN POINT(1,1) AND POINT(1,2) FROM t1
ERROR:
-Illegal parameter data types smallint and geometry for operation 'between'
+Illegal parameter data types smallint and point for operation 'between'
SELECT a IN (POINT(1,1),POINT(1,2)) FROM t1
ERROR:
-Illegal parameter data types smallint and geometry for operation 'in'
+Illegal parameter data types smallint and point for operation 'in'
SELECT CASE a WHEN POINT(1,1) THEN "a" WHEN POINT(1,2) THEN "b" END FROM t1
ERROR:
-Illegal parameter data types smallint and geometry for operation 'case..when'
+Illegal parameter data types smallint and point for operation 'case..when'
CALL p1('CREATE TABLE t1 (a MEDIUMINT, b Point, c Point)');
-------------------------------------
CREATE TABLE t1 (a MEDIUMINT, b Point, c Point)
SELECT a=b FROM t1
ERROR:
-Illegal parameter data types mediumint and geometry for operation '='
+Illegal parameter data types mediumint and point for operation '='
SELECT b=a FROM t1
ERROR:
-Illegal parameter data types geometry and mediumint for operation '='
+Illegal parameter data types point and mediumint for operation '='
SELECT a BETWEEN b AND c FROM t1
ERROR:
-Illegal parameter data types mediumint and geometry for operation 'between'
+Illegal parameter data types mediumint and point for operation 'between'
SELECT a IN (b,c) FROM t1
ERROR:
-Illegal parameter data types mediumint and geometry for operation 'in'
+Illegal parameter data types mediumint and point for operation 'in'
SELECT CASE a WHEN b THEN "a" WHEN c THEN "b" END FROM t1
ERROR:
-Illegal parameter data types mediumint and geometry for operation 'case..when'
+Illegal parameter data types mediumint and point for operation 'case..when'
SELECT a=POINT(1,1) FROM t1
ERROR:
-Illegal parameter data types mediumint and geometry for operation '='
+Illegal parameter data types mediumint and point for operation '='
SELECT POINT(1,1)=a FROM t1
ERROR:
-Illegal parameter data types geometry and mediumint for operation '='
+Illegal parameter data types point and mediumint for operation '='
SELECT a BETWEEN POINT(1,1) AND POINT(1,2) FROM t1
ERROR:
-Illegal parameter data types mediumint and geometry for operation 'between'
+Illegal parameter data types mediumint and point for operation 'between'
SELECT a IN (POINT(1,1),POINT(1,2)) FROM t1
ERROR:
-Illegal parameter data types mediumint and geometry for operation 'in'
+Illegal parameter data types mediumint and point for operation 'in'
SELECT CASE a WHEN POINT(1,1) THEN "a" WHEN POINT(1,2) THEN "b" END FROM t1
ERROR:
-Illegal parameter data types mediumint and geometry for operation 'case..when'
+Illegal parameter data types mediumint and point for operation 'case..when'
CALL p1('CREATE TABLE t1 (a INT, b Point, c Point)');
-------------------------------------
CREATE TABLE t1 (a INT, b Point, c Point)
SELECT a=b FROM t1
ERROR:
-Illegal parameter data types int and geometry for operation '='
+Illegal parameter data types int and point for operation '='
SELECT b=a FROM t1
ERROR:
-Illegal parameter data types geometry and int for operation '='
+Illegal parameter data types point and int for operation '='
SELECT a BETWEEN b AND c FROM t1
ERROR:
-Illegal parameter data types int and geometry for operation 'between'
+Illegal parameter data types int and point for operation 'between'
SELECT a IN (b,c) FROM t1
ERROR:
-Illegal parameter data types int and geometry for operation 'in'
+Illegal parameter data types int and point for operation 'in'
SELECT CASE a WHEN b THEN "a" WHEN c THEN "b" END FROM t1
ERROR:
-Illegal parameter data types int and geometry for operation 'case..when'
+Illegal parameter data types int and point for operation 'case..when'
SELECT a=POINT(1,1) FROM t1
ERROR:
-Illegal parameter data types int and geometry for operation '='
+Illegal parameter data types int and point for operation '='
SELECT POINT(1,1)=a FROM t1
ERROR:
-Illegal parameter data types geometry and int for operation '='
+Illegal parameter data types point and int for operation '='
SELECT a BETWEEN POINT(1,1) AND POINT(1,2) FROM t1
ERROR:
-Illegal parameter data types int and geometry for operation 'between'
+Illegal parameter data types int and point for operation 'between'
SELECT a IN (POINT(1,1),POINT(1,2)) FROM t1
ERROR:
-Illegal parameter data types int and geometry for operation 'in'
+Illegal parameter data types int and point for operation 'in'
SELECT CASE a WHEN POINT(1,1) THEN "a" WHEN POINT(1,2) THEN "b" END FROM t1
ERROR:
-Illegal parameter data types int and geometry for operation 'case..when'
+Illegal parameter data types int and point for operation 'case..when'
CALL p1('CREATE TABLE t1 (a BIGINT, b Point, c Point)');
-------------------------------------
CREATE TABLE t1 (a BIGINT, b Point, c Point)
SELECT a=b FROM t1
ERROR:
-Illegal parameter data types bigint and geometry for operation '='
+Illegal parameter data types bigint and point for operation '='
SELECT b=a FROM t1
ERROR:
-Illegal parameter data types geometry and bigint for operation '='
+Illegal parameter data types point and bigint for operation '='
SELECT a BETWEEN b AND c FROM t1
ERROR:
-Illegal parameter data types bigint and geometry for operation 'between'
+Illegal parameter data types bigint and point for operation 'between'
SELECT a IN (b,c) FROM t1
ERROR:
-Illegal parameter data types bigint and geometry for operation 'in'
+Illegal parameter data types bigint and point for operation 'in'
SELECT CASE a WHEN b THEN "a" WHEN c THEN "b" END FROM t1
ERROR:
-Illegal parameter data types bigint and geometry for operation 'case..when'
+Illegal parameter data types bigint and point for operation 'case..when'
SELECT a=POINT(1,1) FROM t1
ERROR:
-Illegal parameter data types bigint and geometry for operation '='
+Illegal parameter data types bigint and point for operation '='
SELECT POINT(1,1)=a FROM t1
ERROR:
-Illegal parameter data types geometry and bigint for operation '='
+Illegal parameter data types point and bigint for operation '='
SELECT a BETWEEN POINT(1,1) AND POINT(1,2) FROM t1
ERROR:
-Illegal parameter data types bigint and geometry for operation 'between'
+Illegal parameter data types bigint and point for operation 'between'
SELECT a IN (POINT(1,1),POINT(1,2)) FROM t1
ERROR:
-Illegal parameter data types bigint and geometry for operation 'in'
+Illegal parameter data types bigint and point for operation 'in'
SELECT CASE a WHEN POINT(1,1) THEN "a" WHEN POINT(1,2) THEN "b" END FROM t1
ERROR:
-Illegal parameter data types bigint and geometry for operation 'case..when'
+Illegal parameter data types bigint and point for operation 'case..when'
CALL p1('CREATE TABLE t1 (a FLOAT, b Point, c Point)');
-------------------------------------
CREATE TABLE t1 (a FLOAT, b Point, c Point)
SELECT a=b FROM t1
ERROR:
-Illegal parameter data types float and geometry for operation '='
+Illegal parameter data types float and point for operation '='
SELECT b=a FROM t1
ERROR:
-Illegal parameter data types geometry and float for operation '='
+Illegal parameter data types point and float for operation '='
SELECT a BETWEEN b AND c FROM t1
ERROR:
-Illegal parameter data types float and geometry for operation 'between'
+Illegal parameter data types float and point for operation 'between'
SELECT a IN (b,c) FROM t1
ERROR:
-Illegal parameter data types float and geometry for operation 'in'
+Illegal parameter data types float and point for operation 'in'
SELECT CASE a WHEN b THEN "a" WHEN c THEN "b" END FROM t1
ERROR:
-Illegal parameter data types float and geometry for operation 'case..when'
+Illegal parameter data types float and point for operation 'case..when'
SELECT a=POINT(1,1) FROM t1
ERROR:
-Illegal parameter data types float and geometry for operation '='
+Illegal parameter data types float and point for operation '='
SELECT POINT(1,1)=a FROM t1
ERROR:
-Illegal parameter data types geometry and float for operation '='
+Illegal parameter data types point and float for operation '='
SELECT a BETWEEN POINT(1,1) AND POINT(1,2) FROM t1
ERROR:
-Illegal parameter data types float and geometry for operation 'between'
+Illegal parameter data types float and point for operation 'between'
SELECT a IN (POINT(1,1),POINT(1,2)) FROM t1
ERROR:
-Illegal parameter data types float and geometry for operation 'in'
+Illegal parameter data types float and point for operation 'in'
SELECT CASE a WHEN POINT(1,1) THEN "a" WHEN POINT(1,2) THEN "b" END FROM t1
ERROR:
-Illegal parameter data types float and geometry for operation 'case..when'
+Illegal parameter data types float and point for operation 'case..when'
CALL p1('CREATE TABLE t1 (a DOUBLE, b Point, c Point)');
-------------------------------------
CREATE TABLE t1 (a DOUBLE, b Point, c Point)
SELECT a=b FROM t1
ERROR:
-Illegal parameter data types double and geometry for operation '='
+Illegal parameter data types double and point for operation '='
SELECT b=a FROM t1
ERROR:
-Illegal parameter data types geometry and double for operation '='
+Illegal parameter data types point and double for operation '='
SELECT a BETWEEN b AND c FROM t1
ERROR:
-Illegal parameter data types double and geometry for operation 'between'
+Illegal parameter data types double and point for operation 'between'
SELECT a IN (b,c) FROM t1
ERROR:
-Illegal parameter data types double and geometry for operation 'in'
+Illegal parameter data types double and point for operation 'in'
SELECT CASE a WHEN b THEN "a" WHEN c THEN "b" END FROM t1
ERROR:
-Illegal parameter data types double and geometry for operation 'case..when'
+Illegal parameter data types double and point for operation 'case..when'
SELECT a=POINT(1,1) FROM t1
ERROR:
-Illegal parameter data types double and geometry for operation '='
+Illegal parameter data types double and point for operation '='
SELECT POINT(1,1)=a FROM t1
ERROR:
-Illegal parameter data types geometry and double for operation '='
+Illegal parameter data types point and double for operation '='
SELECT a BETWEEN POINT(1,1) AND POINT(1,2) FROM t1
ERROR:
-Illegal parameter data types double and geometry for operation 'between'
+Illegal parameter data types double and point for operation 'between'
SELECT a IN (POINT(1,1),POINT(1,2)) FROM t1
ERROR:
-Illegal parameter data types double and geometry for operation 'in'
+Illegal parameter data types double and point for operation 'in'
SELECT CASE a WHEN POINT(1,1) THEN "a" WHEN POINT(1,2) THEN "b" END FROM t1
ERROR:
-Illegal parameter data types double and geometry for operation 'case..when'
+Illegal parameter data types double and point for operation 'case..when'
CALL p1('CREATE TABLE t1 (a DECIMAL(10,2), b Point, c Point)');
-------------------------------------
CREATE TABLE t1 (a DECIMAL(10,2), b Point, c Point)
SELECT a=b FROM t1
ERROR:
-Illegal parameter data types decimal and geometry for operation '='
+Illegal parameter data types decimal and point for operation '='
SELECT b=a FROM t1
ERROR:
-Illegal parameter data types geometry and decimal for operation '='
+Illegal parameter data types point and decimal for operation '='
SELECT a BETWEEN b AND c FROM t1
ERROR:
-Illegal parameter data types decimal and geometry for operation 'between'
+Illegal parameter data types decimal and point for operation 'between'
SELECT a IN (b,c) FROM t1
ERROR:
-Illegal parameter data types decimal and geometry for operation 'in'
+Illegal parameter data types decimal and point for operation 'in'
SELECT CASE a WHEN b THEN "a" WHEN c THEN "b" END FROM t1
ERROR:
-Illegal parameter data types decimal and geometry for operation 'case..when'
+Illegal parameter data types decimal and point for operation 'case..when'
SELECT a=POINT(1,1) FROM t1
ERROR:
-Illegal parameter data types decimal and geometry for operation '='
+Illegal parameter data types decimal and point for operation '='
SELECT POINT(1,1)=a FROM t1
ERROR:
-Illegal parameter data types geometry and decimal for operation '='
+Illegal parameter data types point and decimal for operation '='
SELECT a BETWEEN POINT(1,1) AND POINT(1,2) FROM t1
ERROR:
-Illegal parameter data types decimal and geometry for operation 'between'
+Illegal parameter data types decimal and point for operation 'between'
SELECT a IN (POINT(1,1),POINT(1,2)) FROM t1
ERROR:
-Illegal parameter data types decimal and geometry for operation 'in'
+Illegal parameter data types decimal and point for operation 'in'
SELECT CASE a WHEN POINT(1,1) THEN "a" WHEN POINT(1,2) THEN "b" END FROM t1
ERROR:
-Illegal parameter data types decimal and geometry for operation 'case..when'
+Illegal parameter data types decimal and point for operation 'case..when'
CALL p1('CREATE TABLE t1 (a BIT(8), b Point, c Point)');
-------------------------------------
CREATE TABLE t1 (a BIT(8), b Point, c Point)
SELECT a=b FROM t1
ERROR:
-Illegal parameter data types bit and geometry for operation '='
+Illegal parameter data types bit and point for operation '='
SELECT b=a FROM t1
ERROR:
-Illegal parameter data types geometry and bit for operation '='
+Illegal parameter data types point and bit for operation '='
SELECT a BETWEEN b AND c FROM t1
ERROR:
-Illegal parameter data types bit and geometry for operation 'between'
+Illegal parameter data types bit and point for operation 'between'
SELECT a IN (b,c) FROM t1
ERROR:
-Illegal parameter data types bit and geometry for operation 'in'
+Illegal parameter data types bit and point for operation 'in'
SELECT CASE a WHEN b THEN "a" WHEN c THEN "b" END FROM t1
ERROR:
-Illegal parameter data types bit and geometry for operation 'case..when'
+Illegal parameter data types bit and point for operation 'case..when'
SELECT a=POINT(1,1) FROM t1
ERROR:
-Illegal parameter data types bit and geometry for operation '='
+Illegal parameter data types bit and point for operation '='
SELECT POINT(1,1)=a FROM t1
ERROR:
-Illegal parameter data types geometry and bit for operation '='
+Illegal parameter data types point and bit for operation '='
SELECT a BETWEEN POINT(1,1) AND POINT(1,2) FROM t1
ERROR:
-Illegal parameter data types bit and geometry for operation 'between'
+Illegal parameter data types bit and point for operation 'between'
SELECT a IN (POINT(1,1),POINT(1,2)) FROM t1
ERROR:
-Illegal parameter data types bit and geometry for operation 'in'
+Illegal parameter data types bit and point for operation 'in'
SELECT CASE a WHEN POINT(1,1) THEN "a" WHEN POINT(1,2) THEN "b" END FROM t1
ERROR:
-Illegal parameter data types bit and geometry for operation 'case..when'
+Illegal parameter data types bit and point for operation 'case..when'
CALL p1('CREATE TABLE t1 (a TIME, b Point, c Point)');
-------------------------------------
CREATE TABLE t1 (a TIME, b Point, c Point)
SELECT a=b FROM t1
ERROR:
-Illegal parameter data types time and geometry for operation '='
+Illegal parameter data types time and point for operation '='
SELECT b=a FROM t1
ERROR:
-Illegal parameter data types geometry and time for operation '='
+Illegal parameter data types point and time for operation '='
SELECT a BETWEEN b AND c FROM t1
ERROR:
-Illegal parameter data types time and geometry for operation 'between'
+Illegal parameter data types time and point for operation 'between'
SELECT a IN (b,c) FROM t1
ERROR:
-Illegal parameter data types time and geometry for operation 'in'
+Illegal parameter data types time and point for operation 'in'
SELECT CASE a WHEN b THEN "a" WHEN c THEN "b" END FROM t1
ERROR:
-Illegal parameter data types time and geometry for operation 'case..when'
+Illegal parameter data types time and point for operation 'case..when'
SELECT a=POINT(1,1) FROM t1
ERROR:
-Illegal parameter data types time and geometry for operation '='
+Illegal parameter data types time and point for operation '='
SELECT POINT(1,1)=a FROM t1
ERROR:
-Illegal parameter data types geometry and time for operation '='
+Illegal parameter data types point and time for operation '='
SELECT a BETWEEN POINT(1,1) AND POINT(1,2) FROM t1
ERROR:
-Illegal parameter data types time and geometry for operation 'between'
+Illegal parameter data types time and point for operation 'between'
SELECT a IN (POINT(1,1),POINT(1,2)) FROM t1
ERROR:
-Illegal parameter data types time and geometry for operation 'in'
+Illegal parameter data types time and point for operation 'in'
SELECT CASE a WHEN POINT(1,1) THEN "a" WHEN POINT(1,2) THEN "b" END FROM t1
ERROR:
-Illegal parameter data types time and geometry for operation 'case..when'
+Illegal parameter data types time and point for operation 'case..when'
CALL p1('CREATE TABLE t1 (a DATE, b Point, c Point)');
-------------------------------------
CREATE TABLE t1 (a DATE, b Point, c Point)
SELECT a=b FROM t1
ERROR:
-Illegal parameter data types date and geometry for operation '='
+Illegal parameter data types date and point for operation '='
SELECT b=a FROM t1
ERROR:
-Illegal parameter data types geometry and date for operation '='
+Illegal parameter data types point and date for operation '='
SELECT a BETWEEN b AND c FROM t1
ERROR:
-Illegal parameter data types date and geometry for operation 'between'
+Illegal parameter data types date and point for operation 'between'
SELECT a IN (b,c) FROM t1
ERROR:
-Illegal parameter data types date and geometry for operation 'in'
+Illegal parameter data types date and point for operation 'in'
SELECT CASE a WHEN b THEN "a" WHEN c THEN "b" END FROM t1
ERROR:
-Illegal parameter data types date and geometry for operation 'case..when'
+Illegal parameter data types date and point for operation 'case..when'
SELECT a=POINT(1,1) FROM t1
ERROR:
-Illegal parameter data types date and geometry for operation '='
+Illegal parameter data types date and point for operation '='
SELECT POINT(1,1)=a FROM t1
ERROR:
-Illegal parameter data types geometry and date for operation '='
+Illegal parameter data types point and date for operation '='
SELECT a BETWEEN POINT(1,1) AND POINT(1,2) FROM t1
ERROR:
-Illegal parameter data types date and geometry for operation 'between'
+Illegal parameter data types date and point for operation 'between'
SELECT a IN (POINT(1,1),POINT(1,2)) FROM t1
ERROR:
-Illegal parameter data types date and geometry for operation 'in'
+Illegal parameter data types date and point for operation 'in'
SELECT CASE a WHEN POINT(1,1) THEN "a" WHEN POINT(1,2) THEN "b" END FROM t1
ERROR:
-Illegal parameter data types date and geometry for operation 'case..when'
+Illegal parameter data types date and point for operation 'case..when'
CALL p1('CREATE TABLE t1 (a DATETIME, b Point, c Point)');
-------------------------------------
CREATE TABLE t1 (a DATETIME, b Point, c Point)
SELECT a=b FROM t1
ERROR:
-Illegal parameter data types datetime and geometry for operation '='
+Illegal parameter data types datetime and point for operation '='
SELECT b=a FROM t1
ERROR:
-Illegal parameter data types geometry and datetime for operation '='
+Illegal parameter data types point and datetime for operation '='
SELECT a BETWEEN b AND c FROM t1
ERROR:
-Illegal parameter data types datetime and geometry for operation 'between'
+Illegal parameter data types datetime and point for operation 'between'
SELECT a IN (b,c) FROM t1
ERROR:
-Illegal parameter data types datetime and geometry for operation 'in'
+Illegal parameter data types datetime and point for operation 'in'
SELECT CASE a WHEN b THEN "a" WHEN c THEN "b" END FROM t1
ERROR:
-Illegal parameter data types datetime and geometry for operation 'case..when'
+Illegal parameter data types datetime and point for operation 'case..when'
SELECT a=POINT(1,1) FROM t1
ERROR:
-Illegal parameter data types datetime and geometry for operation '='
+Illegal parameter data types datetime and point for operation '='
SELECT POINT(1,1)=a FROM t1
ERROR:
-Illegal parameter data types geometry and datetime for operation '='
+Illegal parameter data types point and datetime for operation '='
SELECT a BETWEEN POINT(1,1) AND POINT(1,2) FROM t1
ERROR:
-Illegal parameter data types datetime and geometry for operation 'between'
+Illegal parameter data types datetime and point for operation 'between'
SELECT a IN (POINT(1,1),POINT(1,2)) FROM t1
ERROR:
-Illegal parameter data types datetime and geometry for operation 'in'
+Illegal parameter data types datetime and point for operation 'in'
SELECT CASE a WHEN POINT(1,1) THEN "a" WHEN POINT(1,2) THEN "b" END FROM t1
ERROR:
-Illegal parameter data types datetime and geometry for operation 'case..when'
+Illegal parameter data types datetime and point for operation 'case..when'
CALL p1('CREATE TABLE t1 (a TIMESTAMP, b Point, c Point)');
-------------------------------------
CREATE TABLE t1 (a TIMESTAMP, b Point, c Point)
SELECT a=b FROM t1
ERROR:
-Illegal parameter data types timestamp and geometry for operation '='
+Illegal parameter data types timestamp and point for operation '='
SELECT b=a FROM t1
ERROR:
-Illegal parameter data types geometry and timestamp for operation '='
+Illegal parameter data types point and timestamp for operation '='
SELECT a BETWEEN b AND c FROM t1
ERROR:
-Illegal parameter data types timestamp and geometry for operation 'between'
+Illegal parameter data types timestamp and point for operation 'between'
SELECT a IN (b,c) FROM t1
ERROR:
-Illegal parameter data types timestamp and geometry for operation 'in'
+Illegal parameter data types timestamp and point for operation 'in'
SELECT CASE a WHEN b THEN "a" WHEN c THEN "b" END FROM t1
ERROR:
-Illegal parameter data types timestamp and geometry for operation 'case..when'
+Illegal parameter data types timestamp and point for operation 'case..when'
SELECT a=POINT(1,1) FROM t1
ERROR:
-Illegal parameter data types timestamp and geometry for operation '='
+Illegal parameter data types timestamp and point for operation '='
SELECT POINT(1,1)=a FROM t1
ERROR:
-Illegal parameter data types geometry and timestamp for operation '='
+Illegal parameter data types point and timestamp for operation '='
SELECT a BETWEEN POINT(1,1) AND POINT(1,2) FROM t1
ERROR:
-Illegal parameter data types timestamp and geometry for operation 'between'
+Illegal parameter data types timestamp and point for operation 'between'
SELECT a IN (POINT(1,1),POINT(1,2)) FROM t1
ERROR:
-Illegal parameter data types timestamp and geometry for operation 'in'
+Illegal parameter data types timestamp and point for operation 'in'
SELECT CASE a WHEN POINT(1,1) THEN "a" WHEN POINT(1,2) THEN "b" END FROM t1
ERROR:
-Illegal parameter data types timestamp and geometry for operation 'case..when'
+Illegal parameter data types timestamp and point for operation 'case..when'
CALL p1('CREATE TABLE t1 (a YEAR, b Point, c Point)');
-------------------------------------
CREATE TABLE t1 (a YEAR, b Point, c Point)
SELECT a=b FROM t1
ERROR:
-Illegal parameter data types year and geometry for operation '='
+Illegal parameter data types year and point for operation '='
SELECT b=a FROM t1
ERROR:
-Illegal parameter data types geometry and year for operation '='
+Illegal parameter data types point and year for operation '='
SELECT a BETWEEN b AND c FROM t1
ERROR:
-Illegal parameter data types year and geometry for operation 'between'
+Illegal parameter data types year and point for operation 'between'
SELECT a IN (b,c) FROM t1
ERROR:
-Illegal parameter data types year and geometry for operation 'in'
+Illegal parameter data types year and point for operation 'in'
SELECT CASE a WHEN b THEN "a" WHEN c THEN "b" END FROM t1
ERROR:
-Illegal parameter data types year and geometry for operation 'case..when'
+Illegal parameter data types year and point for operation 'case..when'
SELECT a=POINT(1,1) FROM t1
ERROR:
-Illegal parameter data types year and geometry for operation '='
+Illegal parameter data types year and point for operation '='
SELECT POINT(1,1)=a FROM t1
ERROR:
-Illegal parameter data types geometry and year for operation '='
+Illegal parameter data types point and year for operation '='
SELECT a BETWEEN POINT(1,1) AND POINT(1,2) FROM t1
ERROR:
-Illegal parameter data types year and geometry for operation 'between'
+Illegal parameter data types year and point for operation 'between'
SELECT a IN (POINT(1,1),POINT(1,2)) FROM t1
ERROR:
-Illegal parameter data types year and geometry for operation 'in'
+Illegal parameter data types year and point for operation 'in'
SELECT CASE a WHEN POINT(1,1) THEN "a" WHEN POINT(1,2) THEN "b" END FROM t1
ERROR:
-Illegal parameter data types year and geometry for operation 'case..when'
+Illegal parameter data types year and point for operation 'case..when'
CALL p1('CREATE TABLE t1 (a Point, b Point, c Point)');
-------------------------------------
CREATE TABLE t1 (a Point, b Point, c Point)
@@ -3869,85 +3869,85 @@ CREATE TABLE t1 (a TINYINT, b Point)
CREATE TABLE t2 AS SELECT LEAST(a,b) FROM t1
ERROR:
-Illegal parameter data types tinyint and geometry for operation 'least'
+Illegal parameter data types tinyint and point for operation 'least'
-------------------------------------
CREATE TABLE t1 (a SMALLINT, b Point)
CREATE TABLE t2 AS SELECT LEAST(a,b) FROM t1
ERROR:
-Illegal parameter data types smallint and geometry for operation 'least'
+Illegal parameter data types smallint and point for operation 'least'
-------------------------------------
CREATE TABLE t1 (a MEDIUMINT, b Point)
CREATE TABLE t2 AS SELECT LEAST(a,b) FROM t1
ERROR:
-Illegal parameter data types mediumint and geometry for operation 'least'
+Illegal parameter data types mediumint and point for operation 'least'
-------------------------------------
CREATE TABLE t1 (a INT, b Point)
CREATE TABLE t2 AS SELECT LEAST(a,b) FROM t1
ERROR:
-Illegal parameter data types int and geometry for operation 'least'
+Illegal parameter data types int and point for operation 'least'
-------------------------------------
CREATE TABLE t1 (a BIGINT, b Point)
CREATE TABLE t2 AS SELECT LEAST(a,b) FROM t1
ERROR:
-Illegal parameter data types bigint and geometry for operation 'least'
+Illegal parameter data types bigint and point for operation 'least'
-------------------------------------
CREATE TABLE t1 (a FLOAT, b Point)
CREATE TABLE t2 AS SELECT LEAST(a,b) FROM t1
ERROR:
-Illegal parameter data types float and geometry for operation 'least'
+Illegal parameter data types float and point for operation 'least'
-------------------------------------
CREATE TABLE t1 (a DOUBLE, b Point)
CREATE TABLE t2 AS SELECT LEAST(a,b) FROM t1
ERROR:
-Illegal parameter data types double and geometry for operation 'least'
+Illegal parameter data types double and point for operation 'least'
-------------------------------------
CREATE TABLE t1 (a DECIMAL(10,2), b Point)
CREATE TABLE t2 AS SELECT LEAST(a,b) FROM t1
ERROR:
-Illegal parameter data types decimal and geometry for operation 'least'
+Illegal parameter data types decimal and point for operation 'least'
-------------------------------------
CREATE TABLE t1 (a BIT(8), b Point)
CREATE TABLE t2 AS SELECT LEAST(a,b) FROM t1
ERROR:
-Illegal parameter data types bit and geometry for operation 'least'
+Illegal parameter data types bit and point for operation 'least'
-------------------------------------
CREATE TABLE t1 (a TIME, b Point)
CREATE TABLE t2 AS SELECT LEAST(a,b) FROM t1
ERROR:
-Illegal parameter data types time and geometry for operation 'least'
+Illegal parameter data types time and point for operation 'least'
-------------------------------------
CREATE TABLE t1 (a DATE, b Point)
CREATE TABLE t2 AS SELECT LEAST(a,b) FROM t1
ERROR:
-Illegal parameter data types date and geometry for operation 'least'
+Illegal parameter data types date and point for operation 'least'
-------------------------------------
CREATE TABLE t1 (a DATETIME, b Point)
CREATE TABLE t2 AS SELECT LEAST(a,b) FROM t1
ERROR:
-Illegal parameter data types datetime and geometry for operation 'least'
+Illegal parameter data types datetime and point for operation 'least'
-------------------------------------
CREATE TABLE t1 (a TIMESTAMP, b Point)
CREATE TABLE t2 AS SELECT LEAST(a,b) FROM t1
ERROR:
-Illegal parameter data types timestamp and geometry for operation 'least'
+Illegal parameter data types timestamp and point for operation 'least'
-------------------------------------
CREATE TABLE t1 (a YEAR, b Point)
CREATE TABLE t2 AS SELECT LEAST(a,b) FROM t1
ERROR:
-Illegal parameter data types year and geometry for operation 'least'
+Illegal parameter data types year and point for operation 'least'
# This LEAST(ENUM,GEOMETRY) creates BLOB, but fails on error with UNION (see MDEV-12503)
-------------------------------------
CREATE TABLE t1 (a ENUM(0x61), b Point)
@@ -3982,7 +3982,7 @@ SELECT ROUND(a) FROM t1;
ERROR HY000: Illegal parameter data type geometry for operation 'round'
DROP TABLE t1;
SELECT ROUND(POINT(1,1));
-ERROR HY000: Illegal parameter data type geometry for operation 'round'
+ERROR HY000: Illegal parameter data type point for operation 'round'
#
# MDEV-12199 Split Item_func_{abs|neg|int_val}::fix_length_and_dec() into methods in Type_handler
#
@@ -4005,37 +4005,37 @@ SELECT FLOOR(COALESCE(a)) FROM t1;
ERROR HY000: Illegal parameter data type geometry for operation 'floor'
DROP TABLE t1;
SELECT -POINT(1,1);
-ERROR HY000: Illegal parameter data type geometry for operation '-'
+ERROR HY000: Illegal parameter data type point for operation '-'
SELECT ABS(POINT(1,1));
-ERROR HY000: Illegal parameter data type geometry for operation 'abs'
+ERROR HY000: Illegal parameter data type point for operation 'abs'
SELECT CEILING(POINT(1,1));
-ERROR HY000: Illegal parameter data type geometry for operation 'ceiling'
+ERROR HY000: Illegal parameter data type point for operation 'ceiling'
SELECT FLOOR(POINT(1,1));
-ERROR HY000: Illegal parameter data type geometry for operation 'floor'
+ERROR HY000: Illegal parameter data type point for operation 'floor'
#
# MDEV-12239 Add Type_handler::Item_sum_{sum|avg|variance}_fix_length_and_dec()
#
CREATE TABLE t1 (a GEOMETRY);
SELECT SUM(POINT(1,1)) FROM t1;
-ERROR HY000: Illegal parameter data type geometry for operation 'sum'
+ERROR HY000: Illegal parameter data type point for operation 'sum'
SELECT SUM(a) FROM t1;
ERROR HY000: Illegal parameter data type geometry for operation 'sum'
SELECT SUM(COALESCE(a)) FROM t1;
ERROR HY000: Illegal parameter data type geometry for operation 'sum'
SELECT AVG(POINT(1,1)) FROM t1;
-ERROR HY000: Illegal parameter data type geometry for operation 'avg'
+ERROR HY000: Illegal parameter data type point for operation 'avg'
SELECT AVG(a) FROM t1;
ERROR HY000: Illegal parameter data type geometry for operation 'avg'
SELECT AVG(COALESCE(a)) FROM t1;
ERROR HY000: Illegal parameter data type geometry for operation 'avg'
SELECT VARIANCE(POINT(1,1)) FROM t1;
-ERROR HY000: Illegal parameter data type geometry for operation 'variance('
+ERROR HY000: Illegal parameter data type point for operation 'variance('
SELECT VARIANCE(a) FROM t1;
ERROR HY000: Illegal parameter data type geometry for operation 'variance('
SELECT VARIANCE(COALESCE(a)) FROM t1;
ERROR HY000: Illegal parameter data type geometry for operation 'variance('
SELECT STDDEV(POINT(1,1)) FROM t1;
-ERROR HY000: Illegal parameter data type geometry for operation 'std('
+ERROR HY000: Illegal parameter data type point for operation 'std('
SELECT STDDEV(a) FROM t1;
ERROR HY000: Illegal parameter data type geometry for operation 'std('
SELECT STDDEV(COALESCE(a)) FROM t1;
@@ -4046,23 +4046,23 @@ DROP TABLE t1;
#
CREATE TABLE t1 (a GEOMETRY);
SELECT CAST(POINT(1,1) AS SIGNED) FROM t1;
-ERROR HY000: Illegal parameter data type geometry for operation 'cast_as_signed'
+ERROR HY000: Illegal parameter data type point for operation 'cast_as_signed'
SELECT CAST(POINT(1,1) AS UNSIGNED) FROM t1;
-ERROR HY000: Illegal parameter data type geometry for operation 'cast_as_unsigned'
+ERROR HY000: Illegal parameter data type point for operation 'cast_as_unsigned'
SELECT CAST(POINT(1,1) AS FLOAT) FROM t1;
-ERROR HY000: Illegal parameter data type geometry for operation 'float_typecast'
+ERROR HY000: Illegal parameter data type point for operation 'float_typecast'
SELECT CAST(POINT(1,1) AS DOUBLE) FROM t1;
-ERROR HY000: Illegal parameter data type geometry for operation 'double_typecast'
+ERROR HY000: Illegal parameter data type point for operation 'double_typecast'
SELECT CAST(POINT(1,1) AS DECIMAL(10,1)) FROM t1;
-ERROR HY000: Illegal parameter data type geometry for operation 'decimal_typecast'
+ERROR HY000: Illegal parameter data type point for operation 'decimal_typecast'
SELECT CAST(POINT(1,1) AS CHAR) FROM t1;
-ERROR HY000: Illegal parameter data type geometry for operation 'cast_as_char'
+ERROR HY000: Illegal parameter data type point for operation 'cast_as_char'
SELECT CAST(POINT(1,1) AS TIME) FROM t1;
-ERROR HY000: Illegal parameter data type geometry for operation 'cast_as_time'
+ERROR HY000: Illegal parameter data type point for operation 'cast_as_time'
SELECT CAST(POINT(1,1) AS DATE) FROM t1;
-ERROR HY000: Illegal parameter data type geometry for operation 'cast_as_date'
+ERROR HY000: Illegal parameter data type point for operation 'cast_as_date'
SELECT CAST(POINT(1,1) AS DATETIME) FROM t1;
-ERROR HY000: Illegal parameter data type geometry for operation 'cast_as_datetime'
+ERROR HY000: Illegal parameter data type point for operation 'cast_as_datetime'
SELECT CAST(a AS SIGNED) FROM t1;
ERROR HY000: Illegal parameter data type geometry for operation 'cast_as_signed'
SELECT CAST(a AS UNSIGNED) FROM t1;
@@ -4111,25 +4111,25 @@ DROP TABLE t1;
#
CREATE TABLE t1 (a GEOMETRY);
SELECT POINT(1,1) + 1;
-ERROR HY000: Illegal parameter data types geometry and int for operation '+'
+ERROR HY000: Illegal parameter data types point and int for operation '+'
SELECT POINT(1,1) - 1;
-ERROR HY000: Illegal parameter data types geometry and int for operation '-'
+ERROR HY000: Illegal parameter data types point and int for operation '-'
SELECT POINT(1,1) * 1;
-ERROR HY000: Illegal parameter data types geometry and int for operation '*'
+ERROR HY000: Illegal parameter data types point and int for operation '*'
SELECT POINT(1,1) / 1;
-ERROR HY000: Illegal parameter data types geometry and int for operation '/'
+ERROR HY000: Illegal parameter data types point and int for operation '/'
SELECT POINT(1,1) MOD 1;
-ERROR HY000: Illegal parameter data types geometry and int for operation 'MOD'
+ERROR HY000: Illegal parameter data types point and int for operation 'MOD'
SELECT 1 + POINT(1,1);
-ERROR HY000: Illegal parameter data types int and geometry for operation '+'
+ERROR HY000: Illegal parameter data types int and point for operation '+'
SELECT 1 - POINT(1,1);
-ERROR HY000: Illegal parameter data types int and geometry for operation '-'
+ERROR HY000: Illegal parameter data types int and point for operation '-'
SELECT 1 * POINT(1,1);
-ERROR HY000: Illegal parameter data types int and geometry for operation '*'
+ERROR HY000: Illegal parameter data types int and point for operation '*'
SELECT 1 / POINT(1,1);
-ERROR HY000: Illegal parameter data types int and geometry for operation '/'
+ERROR HY000: Illegal parameter data types int and point for operation '/'
SELECT 1 MOD POINT(1,1);
-ERROR HY000: Illegal parameter data types int and geometry for operation 'MOD'
+ERROR HY000: Illegal parameter data types int and point for operation 'MOD'
SELECT a + 1 FROM t1;
ERROR HY000: Illegal parameter data types geometry and int for operation '+'
SELECT a - 1 FROM t1;
@@ -4175,33 +4175,33 @@ DROP TABLE t1;
# MDEV-12514 Split Item_temporal_func::fix_length_and_dec()
#
SELECT DATE_ADD(POINT(1,1), INTERVAL 10 DAY);
-ERROR HY000: Illegal parameter data types geometry and interval for operation 'date_add_interval'
+ERROR HY000: Illegal parameter data types point and interval for operation 'date_add_interval'
SELECT DATE_SUB(POINT(1,1), INTERVAL 10 DAY);
-ERROR HY000: Illegal parameter data types geometry and interval for operation 'date_add_interval'
+ERROR HY000: Illegal parameter data types point and interval for operation 'date_add_interval'
SELECT POINT(1,1) + INTERVAL 10 DAY;
-ERROR HY000: Illegal parameter data types geometry and interval for operation 'date_add_interval'
+ERROR HY000: Illegal parameter data types point and interval for operation 'date_add_interval'
SELECT POINT(1,1) - INTERVAL 10 DAY;
-ERROR HY000: Illegal parameter data types geometry and interval for operation 'date_add_interval'
+ERROR HY000: Illegal parameter data types point and interval for operation 'date_add_interval'
SELECT INTERVAL 10 DAY + POINT(1,1);
-ERROR HY000: Illegal parameter data types geometry and interval for operation 'date_add_interval'
+ERROR HY000: Illegal parameter data types point and interval for operation 'date_add_interval'
SELECT INTERVAL 10 DAY + POINT(1,1);
-ERROR HY000: Illegal parameter data types geometry and interval for operation 'date_add_interval'
+ERROR HY000: Illegal parameter data types point and interval for operation 'date_add_interval'
SELECT ADDTIME(POINT(1,1), '10:10:10');
-ERROR HY000: Illegal parameter data types geometry and varchar for operation 'addtime'
+ERROR HY000: Illegal parameter data types point and varchar for operation 'addtime'
SELECT ADDTIME('10:10:10', POINT(1,1));
-ERROR HY000: Illegal parameter data types varchar and geometry for operation 'addtime'
+ERROR HY000: Illegal parameter data types varchar and point for operation 'addtime'
SELECT ADDTIME(POINT(1,1), TIME'10:10:10');
-ERROR HY000: Illegal parameter data types geometry and time for operation 'addtime'
+ERROR HY000: Illegal parameter data types point and time for operation 'addtime'
SELECT ADDTIME(TIME'10:10:10', POINT(1,1));
-ERROR HY000: Illegal parameter data types time and geometry for operation 'addtime'
+ERROR HY000: Illegal parameter data types time and point for operation 'addtime'
SELECT ADDTIME(POINT(1,1), TIMESTAMP'2001-01-01 10:10:10');
-ERROR HY000: Illegal parameter data types geometry and datetime for operation 'addtime'
+ERROR HY000: Illegal parameter data types point and datetime for operation 'addtime'
SELECT ADDTIME(TIMESTAMP'2001-01-01 10:10:10', POINT(1,1));
-ERROR HY000: Illegal parameter data types datetime and geometry for operation 'addtime'
+ERROR HY000: Illegal parameter data types datetime and point for operation 'addtime'
SELECT STR_TO_DATE(POINT(1,1),'%M %d,%Y');
-ERROR HY000: Illegal parameter data types geometry and varchar for operation 'str_to_date'
+ERROR HY000: Illegal parameter data types point and varchar for operation 'str_to_date'
SELECT STR_TO_DATE('2001-01-01', POINT(1,1));
-ERROR HY000: Illegal parameter data types varchar and geometry for operation 'str_to_date'
+ERROR HY000: Illegal parameter data types varchar and point for operation 'str_to_date'
#
# MDEV-12665 Hybrid functions do not preserve geometry type
#
@@ -4442,11 +4442,11 @@ ERROR HY000: Illegal parameter data type int for operation 'st_pointonsurface'
SELECT ST_POINTN(1,1);
ERROR HY000: Illegal parameter data type int for operation 'st_pointn'
SELECT ST_POINTN(LineString(Point(1,1)),Point(1,1));
-ERROR HY000: Illegal parameter data type geometry for operation 'st_pointn'
+ERROR HY000: Illegal parameter data type point for operation 'st_pointn'
SELECT ST_BUFFER(1, 1);
ERROR HY000: Illegal parameter data type int for operation 'st_buffer'
SELECT ST_BUFFER(Point(1,1), Point(1,1));
-ERROR HY000: Illegal parameter data type geometry for operation 'st_buffer'
+ERROR HY000: Illegal parameter data type point for operation 'st_buffer'
PREPARE stmt FROM 'CREATE TABLE t1 AS SELECT ST_ENVELOPE(?) AS g';
EXECUTE stmt USING 1;
ERROR HY000: Illegal parameter data type int for operation 'st_envelope'
@@ -4465,7 +4465,7 @@ PREPARE stmt FROM 'CREATE TABLE t1 AS SELECT ST_BUFFER(?,?) AS g';
EXECUTE stmt USING 1,1;
ERROR HY000: Illegal parameter data type int for operation 'st_buffer'
EXECUTE stmt USING POINT(1,1),POINT(1,1);
-ERROR HY000: Illegal parameter data type geometry for operation 'st_buffer'
+ERROR HY000: Illegal parameter data type point for operation 'st_buffer'
EXECUTE stmt USING POINT(1,1),0;
SHOW CREATE TABLE t1;
Table Create Table
@@ -4483,11 +4483,11 @@ DEALLOCATE PREPARE stmt;
SELECT ST_GEOMETRYFROMTEXT(ROW(1,1));
ERROR HY000: Illegal parameter data type row for operation 'st_geometryfromtext'
SELECT ST_GEOMETRYFROMTEXT(Point(1,1));
-ERROR HY000: Illegal parameter data type geometry for operation 'st_geometryfromtext'
+ERROR HY000: Illegal parameter data type point for operation 'st_geometryfromtext'
SELECT ST_GEOMETRYFROMTEXT(Point(1,1), 1);
-ERROR HY000: Illegal parameter data type geometry for operation 'st_geometryfromtext'
+ERROR HY000: Illegal parameter data type point for operation 'st_geometryfromtext'
SELECT ST_GEOMETRYFROMTEXT('test', Point(1,1));
-ERROR HY000: Illegal parameter data type geometry for operation 'st_geometryfromtext'
+ERROR HY000: Illegal parameter data type point for operation 'st_geometryfromtext'
SELECT ST_GEOMETRYFROMWKB(ROW(1,1));
ERROR HY000: Illegal parameter data type row for operation 'st_geometryfromwkb'
SELECT ST_GEOMETRYFROMWKB(1);
@@ -4495,7 +4495,7 @@ ERROR HY000: Illegal parameter data type int for operation 'st_geometryfromwkb'
SELECT ST_GEOMETRYFROMWKB(1, 1);
ERROR HY000: Illegal parameter data type int for operation 'st_geometryfromwkb'
SELECT ST_GEOMETRYFROMWKB(Point(1,1), Point(1,1));
-ERROR HY000: Illegal parameter data type geometry for operation 'st_geometryfromwkb'
+ERROR HY000: Illegal parameter data type point for operation 'st_geometryfromwkb'
SELECT ST_GEOMFROMGEOJSON(ROW(1,1));
ERROR HY000: Illegal parameter data type row for operation 'st_geomfromgeojson'
SELECT ST_GEOMFROMGEOJSON(1);
@@ -4503,20 +4503,20 @@ ERROR HY000: Illegal parameter data type int for operation 'st_geomfromgeojson'
SELECT ST_GEOMFROMGEOJSON(1,1);
ERROR HY000: Illegal parameter data type int for operation 'st_geomfromgeojson'
SELECT ST_GEOMFROMGEOJSON(Point(1,1), Point(1,1));
-ERROR HY000: Illegal parameter data type geometry for operation 'st_geomfromgeojson'
+ERROR HY000: Illegal parameter data type point for operation 'st_geomfromgeojson'
SELECT POINT(ROW(1,1),1);
ERROR HY000: Illegal parameter data type row for operation 'point'
SELECT POINT(POINT(1,1),1);
-ERROR HY000: Illegal parameter data type geometry for operation 'point'
+ERROR HY000: Illegal parameter data type point for operation 'point'
SELECT POINT(1,ROW(1,1));
ERROR HY000: Illegal parameter data type row for operation 'point'
SELECT POINT(1,POINT(1,1));
-ERROR HY000: Illegal parameter data type geometry for operation 'point'
+ERROR HY000: Illegal parameter data type point for operation 'point'
PREPARE stmt FROM 'CREATE TABLE t1 AS SELECT ST_GEOMFROMTEXT(?,?) AS g';
EXECUTE stmt USING 1,1;
ERROR HY000: Illegal parameter data type int for operation 'st_geometryfromtext'
EXECUTE stmt USING POINT(1,1),POINT(1,1);
-ERROR HY000: Illegal parameter data type geometry for operation 'st_geometryfromtext'
+ERROR HY000: Illegal parameter data type point for operation 'st_geometryfromtext'
EXECUTE stmt USING 'POINT(1 1)',1;
SHOW CREATE TABLE t1;
Table Create Table
@@ -4677,7 +4677,7 @@ ERROR HY000: Illegal parameter data type date for operation 'st_relate'
SELECT ST_RELATE(Point(1,1),Point(1,1),TIMESTAMP'2010-01-01 10:10:10');
ERROR HY000: Illegal parameter data type datetime for operation 'st_relate'
SELECT ST_RELATE(Point(1,1),Point(1,1),Point(1,1));
-ERROR HY000: Illegal parameter data type geometry for operation 'st_relate'
+ERROR HY000: Illegal parameter data type point for operation 'st_relate'
# Item_str_ascii_func_args_geometry
SELECT ST_ASTEXT(ROW(1,1));
ERROR HY000: Illegal parameter data type row for operation 'st_astext'
@@ -4698,9 +4698,9 @@ ERROR HY000: Illegal parameter data type int for operation 'st_asgeojson'
SELECT ST_ASGEOJSON('test');
ERROR HY000: Illegal parameter data type varchar for operation 'st_asgeojson'
SELECT ST_ASGEOJSON(POINT(1,1), POINT(1,1));
-ERROR HY000: Illegal parameter data type geometry for operation 'st_asgeojson'
+ERROR HY000: Illegal parameter data type point for operation 'st_asgeojson'
SELECT ST_ASGEOJSON(POINT(1,1), 1, POINT(1,1));
-ERROR HY000: Illegal parameter data type geometry for operation 'st_asgeojson'
+ERROR HY000: Illegal parameter data type point for operation 'st_asgeojson'
# Item_func_spatial_rel
SELECT ST_TOUCHES(ROW(1,1), POINT(1,1));
ERROR HY000: Illegal parameter data type row for operation 'st_touches'
@@ -4730,47 +4730,47 @@ ERROR HY000: Illegal parameter data type varchar for operation 'st_touches'
# MDEV-13964 Parameter data type control for Item_real_func
#
SELECT EXP(POINT(1,1));
-ERROR HY000: Illegal parameter data type geometry for operation 'exp'
+ERROR HY000: Illegal parameter data type point for operation 'exp'
SELECT LN(POINT(1,1));
-ERROR HY000: Illegal parameter data type geometry for operation 'ln'
+ERROR HY000: Illegal parameter data type point for operation 'ln'
SELECT LOG2(POINT(1,1));
-ERROR HY000: Illegal parameter data type geometry for operation 'log2'
+ERROR HY000: Illegal parameter data type point for operation 'log2'
SELECT LOG10(POINT(1,1));
-ERROR HY000: Illegal parameter data type geometry for operation 'log10'
+ERROR HY000: Illegal parameter data type point for operation 'log10'
SELECT SQRT(POINT(1,1));
-ERROR HY000: Illegal parameter data type geometry for operation 'sqrt'
+ERROR HY000: Illegal parameter data type point for operation 'sqrt'
SELECT ACOS(POINT(1,1));
-ERROR HY000: Illegal parameter data type geometry for operation 'acos'
+ERROR HY000: Illegal parameter data type point for operation 'acos'
SELECT ASIN(POINT(1,1));
-ERROR HY000: Illegal parameter data type geometry for operation 'asin'
+ERROR HY000: Illegal parameter data type point for operation 'asin'
SELECT COS(POINT(1,1));
-ERROR HY000: Illegal parameter data type geometry for operation 'cos'
+ERROR HY000: Illegal parameter data type point for operation 'cos'
SELECT SIN(POINT(1,1));
-ERROR HY000: Illegal parameter data type geometry for operation 'sin'
+ERROR HY000: Illegal parameter data type point for operation 'sin'
SELECT TAN(POINT(1,1));
-ERROR HY000: Illegal parameter data type geometry for operation 'tan'
+ERROR HY000: Illegal parameter data type point for operation 'tan'
SELECT COT(POINT(1,1));
-ERROR HY000: Illegal parameter data type geometry for operation 'cot'
+ERROR HY000: Illegal parameter data type point for operation 'cot'
SELECT LOG(POINT(1,1));
-ERROR HY000: Illegal parameter data type geometry for operation 'log'
+ERROR HY000: Illegal parameter data type point for operation 'log'
SELECT LOG(POINT(1,1),POINT(1,1));
-ERROR HY000: Illegal parameter data type geometry for operation 'log'
+ERROR HY000: Illegal parameter data type point for operation 'log'
SELECT LOG(1, POINT(1,1));
-ERROR HY000: Illegal parameter data type geometry for operation 'log'
+ERROR HY000: Illegal parameter data type point for operation 'log'
SELECT ATAN(POINT(1,1));
-ERROR HY000: Illegal parameter data type geometry for operation 'atan'
+ERROR HY000: Illegal parameter data type point for operation 'atan'
SELECT ATAN(POINT(1,1),POINT(1,1));
-ERROR HY000: Illegal parameter data type geometry for operation 'atan'
+ERROR HY000: Illegal parameter data type point for operation 'atan'
SELECT ATAN(1, POINT(1,1));
-ERROR HY000: Illegal parameter data type geometry for operation 'atan'
+ERROR HY000: Illegal parameter data type point for operation 'atan'
SELECT POW(POINT(1,1),POINT(1,1));
-ERROR HY000: Illegal parameter data type geometry for operation 'pow'
+ERROR HY000: Illegal parameter data type point for operation 'pow'
SELECT RAND(POINT(1,1));
-ERROR HY000: Illegal parameter data type geometry for operation 'rand'
+ERROR HY000: Illegal parameter data type point for operation 'rand'
SELECT RADIANS(POINT(1,1));
-ERROR HY000: Illegal parameter data type geometry for operation 'radians'
+ERROR HY000: Illegal parameter data type point for operation 'radians'
SELECT DEGREES(POINT(1,1));
-ERROR HY000: Illegal parameter data type geometry for operation 'degrees'
+ERROR HY000: Illegal parameter data type point for operation 'degrees'
SELECT EXP(ROW(1,1));
ERROR HY000: Illegal parameter data type row for operation 'exp'
SELECT LN(ROW(1,1));
@@ -4817,64 +4817,64 @@ ERROR HY000: Illegal parameter data type row for operation 'degrees'
# MDEV-13965 Parameter data type control for Item_longlong_func
#
SELECT POINT(1,1) | 1;
-ERROR HY000: Illegal parameter data type geometry for operation '|'
+ERROR HY000: Illegal parameter data type point for operation '|'
SELECT 1 | POINT(1,1);
-ERROR HY000: Illegal parameter data type geometry for operation '|'
+ERROR HY000: Illegal parameter data type point for operation '|'
SELECT POINT(1,1) & 1;
-ERROR HY000: Illegal parameter data type geometry for operation '&'
+ERROR HY000: Illegal parameter data type point for operation '&'
SELECT 1 & POINT(1,1);
-ERROR HY000: Illegal parameter data type geometry for operation '&'
+ERROR HY000: Illegal parameter data type point for operation '&'
SELECT POINT(1,1) << 1;
-ERROR HY000: Illegal parameter data type geometry for operation '<<'
+ERROR HY000: Illegal parameter data type point for operation '<<'
SELECT 1 << POINT(1,1);
-ERROR HY000: Illegal parameter data type geometry for operation '<<'
+ERROR HY000: Illegal parameter data type point for operation '<<'
SELECT POINT(1,1) >> 1;
-ERROR HY000: Illegal parameter data type geometry for operation '>>'
+ERROR HY000: Illegal parameter data type point for operation '>>'
SELECT 1 >> POINT(1,1);
-ERROR HY000: Illegal parameter data type geometry for operation '>>'
+ERROR HY000: Illegal parameter data type point for operation '>>'
SELECT ~POINT(1,1);
-ERROR HY000: Illegal parameter data type geometry for operation '~'
+ERROR HY000: Illegal parameter data type point for operation '~'
SELECT TO_SECONDS(POINT(1,1));
-ERROR HY000: Illegal parameter data type geometry for operation 'to_seconds'
+ERROR HY000: Illegal parameter data type point for operation 'to_seconds'
SELECT TIMESTAMPDIFF(SECOND,POINT(1,1), 1);
-ERROR HY000: Illegal parameter data type geometry for operation 'timestampdiff'
+ERROR HY000: Illegal parameter data type point for operation 'timestampdiff'
SELECT TIMESTAMPDIFF(SECOND,1, POINT(1,1));
-ERROR HY000: Illegal parameter data type geometry for operation 'timestampdiff'
+ERROR HY000: Illegal parameter data type point for operation 'timestampdiff'
SELECT INET_ATON(POINT(1,1));
-ERROR HY000: Illegal parameter data type geometry for operation 'inet_aton'
+ERROR HY000: Illegal parameter data type point for operation 'inet_aton'
SELECT LAST_INSERT_ID(POINT(1,1));
-ERROR HY000: Illegal parameter data type geometry for operation 'last_insert_id'
+ERROR HY000: Illegal parameter data type point for operation 'last_insert_id'
#
# MDEV-13966 Parameter data type control for Item_temporal_func
#
SELECT FROM_DAYS(POINT(1,1));
-ERROR HY000: Illegal parameter data type geometry for operation 'from_days'
+ERROR HY000: Illegal parameter data type point for operation 'from_days'
SELECT MAKEDATE(POINT(1,1),1);
-ERROR HY000: Illegal parameter data type geometry for operation 'makedate'
+ERROR HY000: Illegal parameter data type point for operation 'makedate'
SELECT MAKEDATE(1, POINT(1,1));
-ERROR HY000: Illegal parameter data type geometry for operation 'makedate'
+ERROR HY000: Illegal parameter data type point for operation 'makedate'
SELECT LAST_DAY(POINT(1,1));
-ERROR HY000: Illegal parameter data type geometry for operation 'last_day'
+ERROR HY000: Illegal parameter data type point for operation 'last_day'
SELECT SEC_TO_TIME(POINT(1,1));
-ERROR HY000: Illegal parameter data type geometry for operation 'sec_to_time'
+ERROR HY000: Illegal parameter data type point for operation 'sec_to_time'
SELECT TIMEDIFF(POINT(1,1),1);
-ERROR HY000: Illegal parameter data type geometry for operation 'timediff'
+ERROR HY000: Illegal parameter data type point for operation 'timediff'
SELECT TIMEDIFF(1, POINT(1,1));
-ERROR HY000: Illegal parameter data type geometry for operation 'timediff'
+ERROR HY000: Illegal parameter data type point for operation 'timediff'
SELECT MAKETIME(POINT(1,1),1,1);
-ERROR HY000: Illegal parameter data type geometry for operation 'maketime'
+ERROR HY000: Illegal parameter data type point for operation 'maketime'
SELECT MAKETIME(1, POINT(1,1), 1);
-ERROR HY000: Illegal parameter data type geometry for operation 'maketime'
+ERROR HY000: Illegal parameter data type point for operation 'maketime'
SELECT MAKETIME(1, 1, POINT(1,1));
-ERROR HY000: Illegal parameter data type geometry for operation 'maketime'
+ERROR HY000: Illegal parameter data type point for operation 'maketime'
SELECT FROM_UNIXTIME(POINT(1,1));
-ERROR HY000: Illegal parameter data type geometry for operation 'from_unixtime'
+ERROR HY000: Illegal parameter data type point for operation 'from_unixtime'
SELECT CONVERT_TZ(POINT(1,1),1,1);
-ERROR HY000: Illegal parameter data type geometry for operation 'convert_tz'
+ERROR HY000: Illegal parameter data type point for operation 'convert_tz'
SELECT CONVERT_TZ(1, POINT(1,1), 1);
-ERROR HY000: Illegal parameter data type geometry for operation 'convert_tz'
+ERROR HY000: Illegal parameter data type point for operation 'convert_tz'
SELECT CONVERT_TZ(1, 1, POINT(1,1));
-ERROR HY000: Illegal parameter data type geometry for operation 'convert_tz'
+ERROR HY000: Illegal parameter data type point for operation 'convert_tz'
#
# MDEV-13967 Parameter data type control for Item_long_func
#
@@ -4903,67 +4903,67 @@ SELECT ORD(POINT(1,1));
ORD(POINT(1,1))
0
SELECT SIGN(POINT(1,1));
-ERROR HY000: Illegal parameter data type geometry for operation 'sign'
+ERROR HY000: Illegal parameter data type point for operation 'sign'
SELECT LOCATE('a','a',POINT(1,1));
-ERROR HY000: Illegal parameter data type geometry for operation 'locate'
+ERROR HY000: Illegal parameter data type point for operation 'locate'
SELECT LOCATE(POINT(1,1),POINT(1,1));
LOCATE(POINT(1,1),POINT(1,1))
1
SELECT BIT_COUNT(POINT(1,1));
-ERROR HY000: Illegal parameter data type geometry for operation 'bit_count'
+ERROR HY000: Illegal parameter data type point for operation 'bit_count'
SELECT BENCHMARK(POINT(1,1),'');
-ERROR HY000: Illegal parameter data type geometry for operation 'benchmark'
+ERROR HY000: Illegal parameter data type point for operation 'benchmark'
SELECT SLEEP(POINT(1,1));
-ERROR HY000: Illegal parameter data type geometry for operation 'sleep'
+ERROR HY000: Illegal parameter data type point for operation 'sleep'
SELECT GET_LOCK('x', POINT(1,1));
-ERROR HY000: Illegal parameter data type geometry for operation 'get_lock'
+ERROR HY000: Illegal parameter data type point for operation 'get_lock'
SELECT PERIOD_ADD(POINT(1,1),1);
-ERROR HY000: Illegal parameter data type geometry for operation 'period_add'
+ERROR HY000: Illegal parameter data type point for operation 'period_add'
SELECT PERIOD_ADD(1,POINT(1,1));
-ERROR HY000: Illegal parameter data type geometry for operation 'period_add'
+ERROR HY000: Illegal parameter data type point for operation 'period_add'
SELECT PERIOD_DIFF(POINT(1,1),1);
-ERROR HY000: Illegal parameter data type geometry for operation 'period_diff'
+ERROR HY000: Illegal parameter data type point for operation 'period_diff'
SELECT PERIOD_DIFF(1,POINT(1,1));
-ERROR HY000: Illegal parameter data type geometry for operation 'period_diff'
+ERROR HY000: Illegal parameter data type point for operation 'period_diff'
SELECT TO_DAYS(POINT(1,1));
-ERROR HY000: Illegal parameter data type geometry for operation 'to_days'
+ERROR HY000: Illegal parameter data type point for operation 'to_days'
SELECT DAYOFMONTH(POINT(1,1));
-ERROR HY000: Illegal parameter data type geometry for operation 'dayofmonth'
+ERROR HY000: Illegal parameter data type point for operation 'dayofmonth'
SELECT DAYOFYEAR(POINT(1,1));
-ERROR HY000: Illegal parameter data type geometry for operation 'dayofyear'
+ERROR HY000: Illegal parameter data type point for operation 'dayofyear'
SELECT QUARTER(POINT(1,1));
-ERROR HY000: Illegal parameter data type geometry for operation 'quarter'
+ERROR HY000: Illegal parameter data type point for operation 'quarter'
SELECT YEAR(POINT(1,1));
-ERROR HY000: Illegal parameter data type geometry for operation 'year'
+ERROR HY000: Illegal parameter data type point for operation 'year'
SELECT YEARWEEK(POINT(1,1));
-ERROR HY000: Illegal parameter data type geometry for operation 'yearweek'
+ERROR HY000: Illegal parameter data type point for operation 'yearweek'
SELECT WEEK(POINT(1,1));
-ERROR HY000: Illegal parameter data type geometry for operation 'week'
+ERROR HY000: Illegal parameter data type point for operation 'week'
SELECT WEEK(POINT(1,1),1);
-ERROR HY000: Illegal parameter data type geometry for operation 'week'
+ERROR HY000: Illegal parameter data type point for operation 'week'
SELECT WEEK(1,POINT(1,1));
-ERROR HY000: Illegal parameter data type geometry for operation 'week'
+ERROR HY000: Illegal parameter data type point for operation 'week'
SELECT HOUR(POINT(1,1));
-ERROR HY000: Illegal parameter data type geometry for operation 'hour'
+ERROR HY000: Illegal parameter data type point for operation 'hour'
SELECT MINUTE(POINT(1,1));
-ERROR HY000: Illegal parameter data type geometry for operation 'minute'
+ERROR HY000: Illegal parameter data type point for operation 'minute'
SELECT SECOND(POINT(1,1));
-ERROR HY000: Illegal parameter data type geometry for operation 'second'
+ERROR HY000: Illegal parameter data type point for operation 'second'
SELECT MICROSECOND(POINT(1,1));
-ERROR HY000: Illegal parameter data type geometry for operation 'microsecond'
+ERROR HY000: Illegal parameter data type point for operation 'microsecond'
SELECT JSON_DEPTH(POINT(1,1));
-ERROR HY000: Illegal parameter data type geometry for operation 'json_depth'
+ERROR HY000: Illegal parameter data type point for operation 'json_depth'
SELECT JSON_LENGTH(POINT(1,1));
-ERROR HY000: Illegal parameter data type geometry for operation 'json_length'
+ERROR HY000: Illegal parameter data type point for operation 'json_length'
SELECT JSON_LENGTH('json', POINT(1,1));
-ERROR HY000: Illegal parameter data type geometry for operation 'json_length'
+ERROR HY000: Illegal parameter data type point for operation 'json_length'
SELECT JSON_LENGTH(POINT(1,1), POINT(1,1));
-ERROR HY000: Illegal parameter data type geometry for operation 'json_length'
+ERROR HY000: Illegal parameter data type point for operation 'json_length'
SELECT REGEXP_INSTR(POINT(1,1),'');
REGEXP_INSTR(POINT(1,1),'')
1
SELECT REGEXP_INSTR('',POINT(1,1));
-ERROR HY000: Illegal parameter data type geometry for operation 'regexp_instr'
+ERROR HY000: Illegal parameter data type point for operation 'regexp_instr'
SELECT FIND_IN_SET(POINT(1,1),'');
FIND_IN_SET(POINT(1,1),'')
0
@@ -4971,11 +4971,11 @@ SELECT FIND_IN_SET('',POINT(1,1));
FIND_IN_SET('',POINT(1,1))
0
SELECT RELEASE_LOCK(POINT(1,1));
-ERROR HY000: Illegal parameter data type geometry for operation 'release_lock'
+ERROR HY000: Illegal parameter data type point for operation 'release_lock'
SELECT IS_FREE_LOCK(POINT(1,1));
-ERROR HY000: Illegal parameter data type geometry for operation 'is_free_lock'
+ERROR HY000: Illegal parameter data type point for operation 'is_free_lock'
SELECT IS_USED_LOCK(POINT(1,1));
-ERROR HY000: Illegal parameter data type geometry for operation 'is_used_lock'
+ERROR HY000: Illegal parameter data type point for operation 'is_used_lock'
#
# End of 10.3 tests
#
@@ -5019,16 +5019,16 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
SELECT 0x60+POINT(1,1);
-ERROR HY000: Illegal parameter data types bigint and geometry for operation '+'
+ERROR HY000: Illegal parameter data types bigint unsigned and point for operation '+'
SELECT POINT(1,1)+0x60;
-ERROR HY000: Illegal parameter data types geometry and bigint for operation '+'
+ERROR HY000: Illegal parameter data types point and bigint unsigned for operation '+'
#
# MDEV-16454 Bad results for IN with ROW
#
SELECT (1,0) IN ((POINT(1,1),0),(0,0));
-ERROR HY000: Illegal parameter data types int and geometry for operation 'in'
+ERROR HY000: Illegal parameter data types int and point for operation 'in'
SELECT (1,(0,0)) IN ((1,(POINT(1,1),0)),(0,(0,0)));
-ERROR HY000: Illegal parameter data types int and geometry for operation 'in'
+ERROR HY000: Illegal parameter data types int and point for operation 'in'
#
# MDEV-19819 ALTER from POINT to LINESTRING erroneously preserves POINT values
#
@@ -5048,3 +5048,283 @@ DROP TABLE t1, t2;
#
# End of 10.4 tests
#
+#
+# Start of 10.5 tests
+#
+#
+# MDEV-19994 Add class Function_collection
+#
+SELECT CONTAINS();
+ERROR 42000: Incorrect parameter count in the call to native function 'CONTAINS()'
+SELECT CONTAINS(POINT(1,1));
+ERROR 42000: Incorrect parameter count in the call to native function 'CONTAINS(POINT(1,1))'
+SELECT CONTAINS(POINT(1,1), POINT(1,1), POINT(1,1));
+ERROR 42000: Incorrect parameter count in the call to native function 'CONTAINS(POINT(1,1), POINT(1,1), POINT(1,1))'
+SELECT WITHIN();
+ERROR 42000: Incorrect parameter count in the call to native function 'WITHIN()'
+SELECT WITHIN(POINT(1,1));
+ERROR 42000: Incorrect parameter count in the call to native function 'WITHIN(POINT(1,1))'
+SELECT WITHIN(POINT(1,1), POINT(1,1), POINT(1,1));
+ERROR 42000: Incorrect parameter count in the call to native function 'WITHIN(POINT(1,1), POINT(1,1), POINT(1,1))'
+#
+# MDEV-20009 Add CAST(expr AS pluggable_type)
+#
+SELECT CAST(1 AS GEOMETRY);
+ERROR HY000: Operator does not exists: 'CAST(expr AS geometry)'
+SELECT CAST(1 AS GEOMETRYCOLLECTION);
+ERROR HY000: Operator does not exists: 'CAST(expr AS geometrycollection)'
+SELECT CAST(1 AS POINT);
+ERROR HY000: Operator does not exists: 'CAST(expr AS point)'
+SELECT CAST(1 AS LINESTRING);
+ERROR HY000: Operator does not exists: 'CAST(expr AS linestring)'
+SELECT CAST(1 AS POLYGON);
+ERROR HY000: Operator does not exists: 'CAST(expr AS polygon)'
+SELECT CAST(1 AS MULTIPOINT);
+ERROR HY000: Operator does not exists: 'CAST(expr AS multipoint)'
+SELECT CAST(1 AS MULTILINESTRING);
+ERROR HY000: Operator does not exists: 'CAST(expr AS multilinestring)'
+SELECT CAST(1 AS MULTIPOLYGON);
+ERROR HY000: Operator does not exists: 'CAST(expr AS multipolygon)'
+SELECT CONVERT(1, GEOMETRY);
+ERROR HY000: Operator does not exists: 'CAST(expr AS geometry)'
+SELECT CONVERT(1, GEOMETRYCOLLECTION);
+ERROR HY000: Operator does not exists: 'CAST(expr AS geometrycollection)'
+SELECT CONVERT(1, POINT);
+ERROR HY000: Operator does not exists: 'CAST(expr AS point)'
+SELECT CONVERT(1, LINESTRING);
+ERROR HY000: Operator does not exists: 'CAST(expr AS linestring)'
+SELECT CONVERT(1, POLYGON);
+ERROR HY000: Operator does not exists: 'CAST(expr AS polygon)'
+SELECT CONVERT(1, MULTIPOINT);
+ERROR HY000: Operator does not exists: 'CAST(expr AS multipoint)'
+SELECT CONVERT(1, MULTILINESTRING);
+ERROR HY000: Operator does not exists: 'CAST(expr AS multilinestring)'
+SELECT CONVERT(1, MULTIPOLYGON);
+ERROR HY000: Operator does not exists: 'CAST(expr AS multipolygon)'
+#
+# MDEV-17832 Protocol: extensions for Pluggable types and JSON, GEOMETRY
+#
+SET NAMES utf8;
+CREATE TABLE t1 (
+p POINT,
+ls LINESTRING,
+pl POLYGON,
+mp MULTIPOINT,
+mls MULTILINESTRING,
+mpl MULTIPOLYGON,
+gc GEOMETRYCOLLECTION,
+g GEOMETRY
+) CHARACTER SET utf8;
+SELECT * FROM t1;
+Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
+def test t1 t1 p p 255 (type=point) 4294967295 0 Y 144 0 63
+def test t1 t1 ls ls 255 (type=linestring) 4294967295 0 Y 144 0 63
+def test t1 t1 pl pl 255 (type=polygon) 4294967295 0 Y 144 0 63
+def test t1 t1 mp mp 255 (type=multipoint) 4294967295 0 Y 144 0 63
+def test t1 t1 mls mls 255 (type=multilinestring) 4294967295 0 Y 144 0 63
+def test t1 t1 mpl mpl 255 (type=multipolygon) 4294967295 0 Y 144 0 63
+def test t1 t1 gc gc 255 (type=geometrycollection) 4294967295 0 Y 144 0 63
+def test t1 t1 g g 255 4294967295 0 Y 144 0 63
+p ls pl mp mls mpl gc g
+SELECT
+COALESCE(p) AS p,
+COALESCE(ls) AS ls,
+COALESCE(pl) AS pl,
+COALESCE(mp) AS mp,
+COALESCE(mls) AS mls,
+COALESCE(mpl) AS mpl,
+COALESCE(gc) AS gc,
+COALESCE(g) AS g
+FROM t1;
+Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
+def p 255 (type=point) 4294967295 0 Y 128 0 63
+def ls 255 (type=linestring) 4294967295 0 Y 128 0 63
+def pl 255 (type=polygon) 4294967295 0 Y 128 0 63
+def mp 255 (type=multipoint) 4294967295 0 Y 128 0 63
+def mls 255 (type=multilinestring) 4294967295 0 Y 128 0 63
+def mpl 255 (type=multipolygon) 4294967295 0 Y 128 0 63
+def gc 255 (type=geometrycollection) 4294967295 0 Y 128 0 63
+def g 255 4294967295 0 Y 128 0 63
+p ls pl mp mls mpl gc g
+SELECT
+COALESCE(p,p),
+COALESCE(p,ls),
+COALESCE(p,pl),
+COALESCE(p,mp),
+COALESCE(p,mls),
+COALESCE(p,mpl),
+COALESCE(p,g),
+COALESCE(p,gc)
+FROM t1;
+Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
+def COALESCE(p,p) 255 (type=point) 4294967295 0 Y 128 0 63
+def COALESCE(p,ls) 255 4294967295 0 Y 128 0 63
+def COALESCE(p,pl) 255 4294967295 0 Y 128 0 63
+def COALESCE(p,mp) 255 4294967295 0 Y 128 0 63
+def COALESCE(p,mls) 255 4294967295 0 Y 128 0 63
+def COALESCE(p,mpl) 255 4294967295 0 Y 128 0 63
+def COALESCE(p,g) 255 4294967295 0 Y 128 0 63
+def COALESCE(p,gc) 255 4294967295 0 Y 128 0 63
+COALESCE(p,p) COALESCE(p,ls) COALESCE(p,pl) COALESCE(p,mp) COALESCE(p,mls) COALESCE(p,mpl) COALESCE(p,g) COALESCE(p,gc)
+SELECT
+COALESCE(ls,p),
+COALESCE(ls,ls),
+COALESCE(ls,pl),
+COALESCE(ls,mp),
+COALESCE(ls,mls),
+COALESCE(ls,mpl),
+COALESCE(ls,g),
+COALESCE(ls,gc)
+FROM t1;
+Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
+def COALESCE(ls,p) 255 4294967295 0 Y 128 0 63
+def COALESCE(ls,ls) 255 (type=linestring) 4294967295 0 Y 128 0 63
+def COALESCE(ls,pl) 255 4294967295 0 Y 128 0 63
+def COALESCE(ls,mp) 255 4294967295 0 Y 128 0 63
+def COALESCE(ls,mls) 255 4294967295 0 Y 128 0 63
+def COALESCE(ls,mpl) 255 4294967295 0 Y 128 0 63
+def COALESCE(ls,g) 255 4294967295 0 Y 128 0 63
+def COALESCE(ls,gc) 255 4294967295 0 Y 128 0 63
+COALESCE(ls,p) COALESCE(ls,ls) COALESCE(ls,pl) COALESCE(ls,mp) COALESCE(ls,mls) COALESCE(ls,mpl) COALESCE(ls,g) COALESCE(ls,gc)
+SELECT
+COALESCE(pl,p),
+COALESCE(pl,ls),
+COALESCE(pl,pl),
+COALESCE(pl,mp),
+COALESCE(pl,mls),
+COALESCE(pl,mpl),
+COALESCE(pl,g),
+COALESCE(pl,gc)
+FROM t1;
+Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
+def COALESCE(pl,p) 255 4294967295 0 Y 128 0 63
+def COALESCE(pl,ls) 255 4294967295 0 Y 128 0 63
+def COALESCE(pl,pl) 255 (type=polygon) 4294967295 0 Y 128 0 63
+def COALESCE(pl,mp) 255 4294967295 0 Y 128 0 63
+def COALESCE(pl,mls) 255 4294967295 0 Y 128 0 63
+def COALESCE(pl,mpl) 255 4294967295 0 Y 128 0 63
+def COALESCE(pl,g) 255 4294967295 0 Y 128 0 63
+def COALESCE(pl,gc) 255 4294967295 0 Y 128 0 63
+COALESCE(pl,p) COALESCE(pl,ls) COALESCE(pl,pl) COALESCE(pl,mp) COALESCE(pl,mls) COALESCE(pl,mpl) COALESCE(pl,g) COALESCE(pl,gc)
+SELECT
+COALESCE(mp,p),
+COALESCE(mp,ls),
+COALESCE(mp,pl),
+COALESCE(mp,mp),
+COALESCE(mp,mls),
+COALESCE(mp,mpl),
+COALESCE(mp,g),
+COALESCE(mp,gc)
+FROM t1;
+Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
+def COALESCE(mp,p) 255 4294967295 0 Y 128 0 63
+def COALESCE(mp,ls) 255 4294967295 0 Y 128 0 63
+def COALESCE(mp,pl) 255 4294967295 0 Y 128 0 63
+def COALESCE(mp,mp) 255 (type=multipoint) 4294967295 0 Y 128 0 63
+def COALESCE(mp,mls) 255 4294967295 0 Y 128 0 63
+def COALESCE(mp,mpl) 255 4294967295 0 Y 128 0 63
+def COALESCE(mp,g) 255 4294967295 0 Y 128 0 63
+def COALESCE(mp,gc) 255 4294967295 0 Y 128 0 63
+COALESCE(mp,p) COALESCE(mp,ls) COALESCE(mp,pl) COALESCE(mp,mp) COALESCE(mp,mls) COALESCE(mp,mpl) COALESCE(mp,g) COALESCE(mp,gc)
+SELECT
+COALESCE(mls,p),
+COALESCE(mls,ls),
+COALESCE(mls,pl),
+COALESCE(mls,mp),
+COALESCE(mls,mls),
+COALESCE(mls,mpl),
+COALESCE(mls,g),
+COALESCE(mls,gc)
+FROM t1;
+Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
+def COALESCE(mls,p) 255 4294967295 0 Y 128 0 63
+def COALESCE(mls,ls) 255 4294967295 0 Y 128 0 63
+def COALESCE(mls,pl) 255 4294967295 0 Y 128 0 63
+def COALESCE(mls,mp) 255 4294967295 0 Y 128 0 63
+def COALESCE(mls,mls) 255 (type=multilinestring) 4294967295 0 Y 128 0 63
+def COALESCE(mls,mpl) 255 4294967295 0 Y 128 0 63
+def COALESCE(mls,g) 255 4294967295 0 Y 128 0 63
+def COALESCE(mls,gc) 255 4294967295 0 Y 128 0 63
+COALESCE(mls,p) COALESCE(mls,ls) COALESCE(mls,pl) COALESCE(mls,mp) COALESCE(mls,mls) COALESCE(mls,mpl) COALESCE(mls,g) COALESCE(mls,gc)
+SELECT
+COALESCE(mpl,p),
+COALESCE(mpl,ls),
+COALESCE(mpl,pl),
+COALESCE(mpl,mp),
+COALESCE(mpl,mls),
+COALESCE(mpl,mpl),
+COALESCE(mpl,g),
+COALESCE(mpl,gc)
+FROM t1;
+Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
+def COALESCE(mpl,p) 255 4294967295 0 Y 128 0 63
+def COALESCE(mpl,ls) 255 4294967295 0 Y 128 0 63
+def COALESCE(mpl,pl) 255 4294967295 0 Y 128 0 63
+def COALESCE(mpl,mp) 255 4294967295 0 Y 128 0 63
+def COALESCE(mpl,mls) 255 4294967295 0 Y 128 0 63
+def COALESCE(mpl,mpl) 255 (type=multipolygon) 4294967295 0 Y 128 0 63
+def COALESCE(mpl,g) 255 4294967295 0 Y 128 0 63
+def COALESCE(mpl,gc) 255 4294967295 0 Y 128 0 63
+COALESCE(mpl,p) COALESCE(mpl,ls) COALESCE(mpl,pl) COALESCE(mpl,mp) COALESCE(mpl,mls) COALESCE(mpl,mpl) COALESCE(mpl,g) COALESCE(mpl,gc)
+SELECT
+COALESCE(g,p),
+COALESCE(g,ls),
+COALESCE(g,pl),
+COALESCE(g,mp),
+COALESCE(g,mls),
+COALESCE(g,mpl),
+COALESCE(g,g),
+COALESCE(g,gc)
+FROM t1;
+Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
+def COALESCE(g,p) 255 4294967295 0 Y 128 0 63
+def COALESCE(g,ls) 255 4294967295 0 Y 128 0 63
+def COALESCE(g,pl) 255 4294967295 0 Y 128 0 63
+def COALESCE(g,mp) 255 4294967295 0 Y 128 0 63
+def COALESCE(g,mls) 255 4294967295 0 Y 128 0 63
+def COALESCE(g,mpl) 255 4294967295 0 Y 128 0 63
+def COALESCE(g,g) 255 4294967295 0 Y 128 0 63
+def COALESCE(g,gc) 255 4294967295 0 Y 128 0 63
+COALESCE(g,p) COALESCE(g,ls) COALESCE(g,pl) COALESCE(g,mp) COALESCE(g,mls) COALESCE(g,mpl) COALESCE(g,g) COALESCE(g,gc)
+SELECT
+COALESCE(gc,p),
+COALESCE(gc,ls),
+COALESCE(gc,pl),
+COALESCE(gc,mp),
+COALESCE(gc,mls),
+COALESCE(gc,mpl),
+COALESCE(gc,g),
+COALESCE(gc,gc)
+FROM t1;
+Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
+def COALESCE(gc,p) 255 4294967295 0 Y 128 0 63
+def COALESCE(gc,ls) 255 4294967295 0 Y 128 0 63
+def COALESCE(gc,pl) 255 4294967295 0 Y 128 0 63
+def COALESCE(gc,mp) 255 4294967295 0 Y 128 0 63
+def COALESCE(gc,mls) 255 4294967295 0 Y 128 0 63
+def COALESCE(gc,mpl) 255 4294967295 0 Y 128 0 63
+def COALESCE(gc,g) 255 4294967295 0 Y 128 0 63
+def COALESCE(gc,gc) 255 (type=geometrycollection) 4294967295 0 Y 128 0 63
+COALESCE(gc,p) COALESCE(gc,ls) COALESCE(gc,pl) COALESCE(gc,mp) COALESCE(gc,mls) COALESCE(gc,mpl) COALESCE(gc,g) COALESCE(gc,gc)
+DROP TABLE t1;
+#
+# MDEV-20809 EXTRACT from INET6 value does not produce any warnings
+#
+CREATE TABLE t1 (a GEOMETRY);
+SELECT EXTRACT(DAY FROM a) FROM t1;
+ERROR HY000: Illegal parameter data type geometry for operation 'extract(day)'
+DROP TABLE t1;
+#
+# MDEV-21765 Possibly inconsistent behavior of BIT_xx functions with INET6 field
+#
+CREATE TABLE t1 (a GEOMETRY);
+SELECT BIT_AND(a) FROM t1;
+ERROR HY000: Illegal parameter data type geometry for operation 'bit_and('
+SELECT BIT_OR(a) FROM t1;
+ERROR HY000: Illegal parameter data type geometry for operation 'bit_or('
+SELECT BIT_XOR(a) FROM t1;
+ERROR HY000: Illegal parameter data type geometry for operation 'bit_xor('
+DROP TABLE t1;
+#
+# End of 10.5 tests
+#
diff --git a/mysql-test/main/gis.test b/mysql-test/main/gis.test
index 4ec5eb99d62..17a93291b77 100644
--- a/mysql-test/main/gis.test
+++ b/mysql-test/main/gis.test
@@ -3124,3 +3124,214 @@ DROP TABLE t1, t2;
--echo #
--echo # End of 10.4 tests
--echo #
+
+
+--echo #
+--echo # Start of 10.5 tests
+--echo #
+
+--echo #
+--echo # MDEV-19994 Add class Function_collection
+--echo #
+
+--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+SELECT CONTAINS();
+--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+SELECT CONTAINS(POINT(1,1));
+--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+SELECT CONTAINS(POINT(1,1), POINT(1,1), POINT(1,1));
+
+--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+SELECT WITHIN();
+--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+SELECT WITHIN(POINT(1,1));
+--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+SELECT WITHIN(POINT(1,1), POINT(1,1), POINT(1,1));
+
+--echo #
+--echo # MDEV-20009 Add CAST(expr AS pluggable_type)
+--echo #
+
+--error ER_UNKNOWN_OPERATOR
+SELECT CAST(1 AS GEOMETRY);
+--error ER_UNKNOWN_OPERATOR
+SELECT CAST(1 AS GEOMETRYCOLLECTION);
+--error ER_UNKNOWN_OPERATOR
+SELECT CAST(1 AS POINT);
+--error ER_UNKNOWN_OPERATOR
+SELECT CAST(1 AS LINESTRING);
+--error ER_UNKNOWN_OPERATOR
+SELECT CAST(1 AS POLYGON);
+--error ER_UNKNOWN_OPERATOR
+SELECT CAST(1 AS MULTIPOINT);
+--error ER_UNKNOWN_OPERATOR
+SELECT CAST(1 AS MULTILINESTRING);
+--error ER_UNKNOWN_OPERATOR
+SELECT CAST(1 AS MULTIPOLYGON);
+
+
+--error ER_UNKNOWN_OPERATOR
+SELECT CONVERT(1, GEOMETRY);
+--error ER_UNKNOWN_OPERATOR
+SELECT CONVERT(1, GEOMETRYCOLLECTION);
+--error ER_UNKNOWN_OPERATOR
+SELECT CONVERT(1, POINT);
+--error ER_UNKNOWN_OPERATOR
+SELECT CONVERT(1, LINESTRING);
+--error ER_UNKNOWN_OPERATOR
+SELECT CONVERT(1, POLYGON);
+--error ER_UNKNOWN_OPERATOR
+SELECT CONVERT(1, MULTIPOINT);
+--error ER_UNKNOWN_OPERATOR
+SELECT CONVERT(1, MULTILINESTRING);
+--error ER_UNKNOWN_OPERATOR
+SELECT CONVERT(1, MULTIPOLYGON);
+
+
+--echo #
+--echo # MDEV-17832 Protocol: extensions for Pluggable types and JSON, GEOMETRY
+--echo #
+
+SET NAMES utf8;
+CREATE TABLE t1 (
+ p POINT,
+ ls LINESTRING,
+ pl POLYGON,
+ mp MULTIPOINT,
+ mls MULTILINESTRING,
+ mpl MULTIPOLYGON,
+ gc GEOMETRYCOLLECTION,
+ g GEOMETRY
+) CHARACTER SET utf8;
+
+--enable_metadata
+SELECT * FROM t1;
+
+SELECT
+ COALESCE(p) AS p,
+ COALESCE(ls) AS ls,
+ COALESCE(pl) AS pl,
+ COALESCE(mp) AS mp,
+ COALESCE(mls) AS mls,
+ COALESCE(mpl) AS mpl,
+ COALESCE(gc) AS gc,
+ COALESCE(g) AS g
+FROM t1;
+
+SELECT
+ COALESCE(p,p),
+ COALESCE(p,ls),
+ COALESCE(p,pl),
+ COALESCE(p,mp),
+ COALESCE(p,mls),
+ COALESCE(p,mpl),
+ COALESCE(p,g),
+ COALESCE(p,gc)
+FROM t1;
+
+SELECT
+ COALESCE(ls,p),
+ COALESCE(ls,ls),
+ COALESCE(ls,pl),
+ COALESCE(ls,mp),
+ COALESCE(ls,mls),
+ COALESCE(ls,mpl),
+ COALESCE(ls,g),
+ COALESCE(ls,gc)
+FROM t1;
+
+SELECT
+ COALESCE(pl,p),
+ COALESCE(pl,ls),
+ COALESCE(pl,pl),
+ COALESCE(pl,mp),
+ COALESCE(pl,mls),
+ COALESCE(pl,mpl),
+ COALESCE(pl,g),
+ COALESCE(pl,gc)
+FROM t1;
+
+SELECT
+ COALESCE(mp,p),
+ COALESCE(mp,ls),
+ COALESCE(mp,pl),
+ COALESCE(mp,mp),
+ COALESCE(mp,mls),
+ COALESCE(mp,mpl),
+ COALESCE(mp,g),
+ COALESCE(mp,gc)
+FROM t1;
+
+SELECT
+ COALESCE(mls,p),
+ COALESCE(mls,ls),
+ COALESCE(mls,pl),
+ COALESCE(mls,mp),
+ COALESCE(mls,mls),
+ COALESCE(mls,mpl),
+ COALESCE(mls,g),
+ COALESCE(mls,gc)
+FROM t1;
+
+SELECT
+ COALESCE(mpl,p),
+ COALESCE(mpl,ls),
+ COALESCE(mpl,pl),
+ COALESCE(mpl,mp),
+ COALESCE(mpl,mls),
+ COALESCE(mpl,mpl),
+ COALESCE(mpl,g),
+ COALESCE(mpl,gc)
+FROM t1;
+
+SELECT
+ COALESCE(g,p),
+ COALESCE(g,ls),
+ COALESCE(g,pl),
+ COALESCE(g,mp),
+ COALESCE(g,mls),
+ COALESCE(g,mpl),
+ COALESCE(g,g),
+ COALESCE(g,gc)
+FROM t1;
+
+SELECT
+ COALESCE(gc,p),
+ COALESCE(gc,ls),
+ COALESCE(gc,pl),
+ COALESCE(gc,mp),
+ COALESCE(gc,mls),
+ COALESCE(gc,mpl),
+ COALESCE(gc,g),
+ COALESCE(gc,gc)
+FROM t1;
+
+--disable_metadata
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-20809 EXTRACT from INET6 value does not produce any warnings
+--echo #
+
+CREATE TABLE t1 (a GEOMETRY);
+--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION
+SELECT EXTRACT(DAY FROM a) FROM t1;
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-21765 Possibly inconsistent behavior of BIT_xx functions with INET6 field
+--echo #
+
+CREATE TABLE t1 (a GEOMETRY);
+--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION
+SELECT BIT_AND(a) FROM t1;
+--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION
+SELECT BIT_OR(a) FROM t1;
+--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION
+SELECT BIT_XOR(a) FROM t1;
+DROP TABLE t1;
+
+
+--echo #
+--echo # End of 10.5 tests
+--echo #
diff --git a/mysql-test/main/grant.result b/mysql-test/main/grant.result
index 8cb2ebd551f..92073388b69 100644
--- a/mysql-test/main/grant.result
+++ b/mysql-test/main/grant.result
@@ -621,7 +621,12 @@ Process Server Admin To view the plain text of currently executing queries
Proxy Server Admin To make proxy user possible
References Databases,Tables To have references on tables
Reload Server Admin To reload or refresh tables, logs and privileges
-Replication client Server Admin To ask where the slave or master servers are
+Binlog admin Server To purge binary logs
+Binlog monitor Server To use SHOW BINLOG STATUS and SHOW BINARY LOG
+Binlog replay Server To use BINLOG (generated by mariadb-binlog)
+Replication master admin Server To monitor connected slaves
+Replication slave admin Server To start/stop slave and apply binlog events
+Slave monitor Server To use SHOW SLAVE STATUS and SHOW RELAYLOG EVENTS
Replication slave Server Admin To read binary log events from the master
Select Tables To retrieve rows from table
Show databases Server Admin To see all databases with SHOW DATABASES
@@ -631,6 +636,10 @@ Super Server Admin To use KILL thread, SET GLOBAL, CHANGE MASTER, etc.
Trigger Tables To use triggers
Create tablespace Server Admin To create/alter/drop tablespaces
Update Tables To update existing rows
+Set user Server To create views and stored routines with a different definer
+Federated admin Server To execute the CREATE SERVER, ALTER SERVER, DROP SERVER statements
+Connection admin Server To bypass connection limits and kill other users' connections
+Read_only admin Server To perform write operations even if @@read_only=ON
Usage Server Admin No privileges - allow connect only
connect root,localhost,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK;
connection root;
@@ -1959,10 +1968,11 @@ GRANT REPLICATION SLAVE ON *.* TO mysqltest_u1@localhost;
GRANT SHOW DATABASES ON *.* TO mysqltest_u1@localhost;
GRANT SHUTDOWN ON *.* TO mysqltest_u1@localhost;
GRANT USAGE ON *.* TO mysqltest_u1@localhost;
+GRANT SLAVE MONITOR ON *.* TO mysqltest_u1@localhost;
SHOW GRANTS FOR mysqltest_u1@localhost;
Grants for mysqltest_u1@localhost
-GRANT RELOAD, SHUTDOWN, PROCESS, FILE, SHOW DATABASES, REPLICATION SLAVE, REPLICATION CLIENT, CREATE USER ON *.* TO `mysqltest_u1`@`localhost`
+GRANT RELOAD, SHUTDOWN, PROCESS, FILE, SHOW DATABASES, REPLICATION SLAVE, BINLOG MONITOR, CREATE USER, SLAVE MONITOR ON *.* TO `mysqltest_u1`@`localhost`
GRANT CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE ROUTINE, ALTER ROUTINE, EVENT ON `mysqltest_db1`.* TO `mysqltest_u1`@`localhost`
connect con1,localhost,mysqltest_u1,,mysqltest_db1;
connection con1;
diff --git a/mysql-test/main/grant.test b/mysql-test/main/grant.test
index 38baf673825..a81e77567b5 100644
--- a/mysql-test/main/grant.test
+++ b/mysql-test/main/grant.test
@@ -1833,6 +1833,7 @@ GRANT REPLICATION SLAVE ON *.* TO mysqltest_u1@localhost;
GRANT SHOW DATABASES ON *.* TO mysqltest_u1@localhost;
GRANT SHUTDOWN ON *.* TO mysqltest_u1@localhost;
GRANT USAGE ON *.* TO mysqltest_u1@localhost;
+GRANT SLAVE MONITOR ON *.* TO mysqltest_u1@localhost;
--echo
SHOW GRANTS FOR mysqltest_u1@localhost;
diff --git a/mysql-test/main/grant2.result b/mysql-test/main/grant2.result
index 0eb8dee026e..3f2b1d48c55 100644
--- a/mysql-test/main/grant2.result
+++ b/mysql-test/main/grant2.result
@@ -162,7 +162,7 @@ connection con10;
set sql_log_off = 1;
ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
set sql_log_bin = 0;
-ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
+ERROR 42000: Access denied; you need (at least one of) the SUPER, BINLOG ADMIN privilege(s) for this operation
disconnect con10;
connection default;
delete from mysql.user where user like 'mysqltest\_1';
diff --git a/mysql-test/main/grant_binlog_replay.result b/mysql-test/main/grant_binlog_replay.result
new file mode 100644
index 00000000000..2c71e70e59b
--- /dev/null
+++ b/mysql-test/main/grant_binlog_replay.result
@@ -0,0 +1,52 @@
+#
+# Start of 10.5 tests
+#
+#
+# MDEV-21975 Add BINLOG REPLAY privilege and bind new privileges to gtid_seq_no, preudo_thread_id, server_id, gtid_domain_id
+#
+#
+# Test that binlog replay statements are not allowed without BINLOG REPLAY or SUPER
+#
+CREATE USER user1@localhost IDENTIFIED BY '';
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE BINLOG REPLAY, SUPER ON *.* FROM user1@localhost;
+connect con1,localhost,user1,,;
+connection con1;
+BINLOG '';
+ERROR 42000: Access denied; you need (at least one of) the SUPER, BINLOG REPLAY privilege(s) for this operation
+disconnect con1;
+connection default;
+DROP USER user1@localhost;
+#
+# Test that binlog replay statements are allowed with BINLOG REPLAY
+#
+CREATE USER user1@localhost IDENTIFIED BY '';
+GRANT BINLOG REPLAY ON *.* TO user1@localhost;
+SHOW GRANTS FOR user1@localhost;
+Grants for user1@localhost
+GRANT BINLOG REPLAY ON *.* TO `user1`@`localhost`
+connect con1,localhost,user1,,;
+connection con1;
+BINLOG '';
+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
+disconnect con1;
+connection default;
+DROP USER user1@localhost;
+#
+# Test that binlog replay statements are allowed with SUPER
+#
+CREATE USER user1@localhost IDENTIFIED BY '';
+GRANT SUPER ON *.* TO user1@localhost;
+SHOW GRANTS FOR user1@localhost;
+Grants for user1@localhost
+GRANT SUPER ON *.* TO `user1`@`localhost`
+connect con1,localhost,user1,,;
+connection con1;
+BINLOG '';
+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
+disconnect con1;
+connection default;
+DROP USER user1@localhost;
+#
+# End of 10.5 tests
+#
diff --git a/mysql-test/main/grant_binlog_replay.test b/mysql-test/main/grant_binlog_replay.test
new file mode 100644
index 00000000000..a3078e5023c
--- /dev/null
+++ b/mysql-test/main/grant_binlog_replay.test
@@ -0,0 +1,73 @@
+-- source include/not_embedded.inc
+
+--echo #
+--echo # Start of 10.5 tests
+--echo #
+
+--echo #
+--echo # MDEV-21975 Add BINLOG REPLAY privilege and bind new privileges to gtid_seq_no, preudo_thread_id, server_id, gtid_domain_id
+--echo #
+
+--echo #
+--echo # Test that binlog replay statements are not allowed without BINLOG REPLAY or SUPER
+--echo #
+
+CREATE USER user1@localhost IDENTIFIED BY '';
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE BINLOG REPLAY, SUPER ON *.* FROM user1@localhost;
+
+connect (con1,localhost,user1,,);
+connection con1;
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+BINLOG '';
+disconnect con1;
+
+connection default;
+DROP USER user1@localhost;
+
+
+--echo #
+--echo # Test that binlog replay statements are allowed with BINLOG REPLAY
+--echo #
+
+CREATE USER user1@localhost IDENTIFIED BY '';
+GRANT BINLOG REPLAY ON *.* TO user1@localhost;
+SHOW GRANTS FOR user1@localhost;
+
+connect (con1,localhost,user1,,);
+connection con1;
+# The below fails with a syntax error.
+# This is fine. It's only important that it does not fail on "access denied".
+--error ER_SYNTAX_ERROR
+BINLOG '';
+--enable_result_log
+disconnect con1;
+
+connection default;
+DROP USER user1@localhost;
+
+
+--echo #
+--echo # Test that binlog replay statements are allowed with SUPER
+--echo #
+
+CREATE USER user1@localhost IDENTIFIED BY '';
+GRANT SUPER ON *.* TO user1@localhost;
+SHOW GRANTS FOR user1@localhost;
+
+connect (con1,localhost,user1,,);
+connection con1;
+--error ER_BAD_SLAVE
+# The below fails with a syntax error.
+# This is fine. It's only important that it does not fail on "access denied".
+--error ER_SYNTAX_ERROR
+BINLOG '';
+--enable_result_log
+disconnect con1;
+
+connection default;
+DROP USER user1@localhost;
+
+--echo #
+--echo # End of 10.5 tests
+--echo #
diff --git a/mysql-test/main/grant_kill.result b/mysql-test/main/grant_kill.result
new file mode 100644
index 00000000000..e1243a39a70
--- /dev/null
+++ b/mysql-test/main/grant_kill.result
@@ -0,0 +1,71 @@
+#
+# Start of 10.5 tests
+#
+#
+# MDEV-21743 Split up SUPER privilege to smaller privileges
+#
+#
+# Test that KILL is not allowed without CONNECTION ADMIN or SUPER
+#
+CREATE USER foo@localhost;
+GRANT SELECT ON *.* TO foo@localhost;
+CREATE USER bar@localhost;
+GRANT ALL PRIVILEGES ON *.* TO bar@localhost;
+REVOKE CONNECTION ADMIN, SUPER ON *.* FROM bar@localhost;
+connect foo,localhost,foo,,;
+connect bar,localhost,bar,,;
+SELECT user FROM information_schema.processlist ORDER BY user;
+user
+bar
+foo
+root
+KILL ID;
+ERROR HY000: You are not owner of thread ID
+disconnect foo;
+disconnect bar;
+connection default;
+DROP USER foo@localhost;
+DROP USER bar@localhost;
+#
+# Test that KILL is allowed with CONNECTION ADMIN
+#
+CREATE USER foo@localhost;
+GRANT SELECT ON *.* TO foo@localhost;
+CREATE USER bar@localhost;
+GRANT PROCESS, CONNECTION ADMIN ON *.* TO bar@localhost;
+connect foo,localhost,foo,,;
+connect bar,localhost,bar,,;
+SELECT user FROM information_schema.processlist ORDER BY user;
+user
+bar
+foo
+root
+KILL ID;
+connection default;
+disconnect foo;
+disconnect bar;
+DROP USER foo@localhost;
+DROP USER bar@localhost;
+#
+# Test that KILL is allowed with SUPER
+#
+CREATE USER foo@localhost;
+GRANT SELECT ON *.* TO foo@localhost;
+CREATE USER bar@localhost;
+GRANT PROCESS, SUPER ON *.* TO bar@localhost;
+connect foo,localhost,foo,,;
+connect bar,localhost,bar,,;
+SELECT user FROM information_schema.processlist ORDER BY user;
+user
+bar
+foo
+root
+KILL ID;
+connection default;
+disconnect foo;
+disconnect bar;
+DROP USER foo@localhost;
+DROP USER bar@localhost;
+#
+# End of 10.5 tests
+#
diff --git a/mysql-test/main/grant_kill.test b/mysql-test/main/grant_kill.test
new file mode 100644
index 00000000000..b29dfb32917
--- /dev/null
+++ b/mysql-test/main/grant_kill.test
@@ -0,0 +1,88 @@
+-- source include/not_embedded.inc
+
+--echo #
+--echo # Start of 10.5 tests
+--echo #
+
+--echo #
+--echo # MDEV-21743 Split up SUPER privilege to smaller privileges
+--echo #
+
+--let $count_sessions=1
+
+--echo #
+--echo # Test that KILL is not allowed without CONNECTION ADMIN or SUPER
+--echo #
+
+CREATE USER foo@localhost;
+GRANT SELECT ON *.* TO foo@localhost;
+CREATE USER bar@localhost;
+GRANT ALL PRIVILEGES ON *.* TO bar@localhost;
+REVOKE CONNECTION ADMIN, SUPER ON *.* FROM bar@localhost;
+--connect (foo,localhost,foo,,)
+let $id=`(SELECT id FROM INFORMATION_SCHEMA.PROCESSLIST WHERE user='foo')`;
+--connect (bar,localhost,bar,,)
+SELECT user FROM information_schema.processlist ORDER BY user;
+--replace_result $id ID
+--error ER_KILL_DENIED_ERROR
+--eval KILL $id
+--disconnect foo
+--disconnect bar
+--connection default
+--source include/wait_until_count_sessions.inc
+DROP USER foo@localhost;
+DROP USER bar@localhost;
+
+--echo #
+--echo # Test that KILL is allowed with CONNECTION ADMIN
+--echo #
+
+CREATE USER foo@localhost;
+GRANT SELECT ON *.* TO foo@localhost;
+CREATE USER bar@localhost;
+GRANT PROCESS, CONNECTION ADMIN ON *.* TO bar@localhost;
+--connect (foo,localhost,foo,,)
+let $id=`(SELECT id FROM INFORMATION_SCHEMA.PROCESSLIST WHERE user='foo')`;
+--connect (bar,localhost,bar,,)
+SELECT user FROM information_schema.processlist ORDER BY user;
+--replace_result $id ID
+--eval KILL $id
+--connection default
+let $wait_condition=
+ select count(*) = 0 from information_schema.processlist
+ where user = "foo";
+--source include/wait_condition.inc
+--disconnect foo
+--disconnect bar
+--source include/wait_until_count_sessions.inc
+DROP USER foo@localhost;
+DROP USER bar@localhost;
+
+--echo #
+--echo # Test that KILL is allowed with SUPER
+--echo #
+
+CREATE USER foo@localhost;
+GRANT SELECT ON *.* TO foo@localhost;
+CREATE USER bar@localhost;
+GRANT PROCESS, SUPER ON *.* TO bar@localhost;
+--connect (foo,localhost,foo,,)
+let $id=`(SELECT id FROM INFORMATION_SCHEMA.PROCESSLIST WHERE user='foo')`;
+--connect (bar,localhost,bar,,)
+SELECT user FROM information_schema.processlist ORDER BY user;
+--replace_result $id ID
+--eval KILL $id
+--connection default
+let $wait_condition=
+ select count(*) = 0 from information_schema.processlist
+ where user = "foo";
+--source include/wait_condition.inc
+--disconnect foo
+--disconnect bar
+--source include/wait_until_count_sessions.inc
+DROP USER foo@localhost;
+DROP USER bar@localhost;
+
+--echo #
+--echo # End of 10.5 tests
+--echo #
diff --git a/mysql-test/main/grant_master_admin.result b/mysql-test/main/grant_master_admin.result
new file mode 100644
index 00000000000..bd08ade940c
--- /dev/null
+++ b/mysql-test/main/grant_master_admin.result
@@ -0,0 +1,36 @@
+#
+# Start of 10.5 tests
+#
+#
+# MDEV-21743 Split up SUPER privilege to smaller privileges
+#
+#
+# Test that master admin statements are not allowed without REPLICATION MASTER ADMIN
+#
+CREATE USER user1@localhost IDENTIFIED BY '';
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE REPLICATION MASTER ADMIN ON *.* FROM user1@localhost;
+connect con1,localhost,user1,,;
+connection con1;
+SHOW SLAVE HOSTS;
+ERROR 42000: Access denied; you need (at least one of) the REPLICATION MASTER ADMIN privilege(s) for this operation
+disconnect con1;
+connection default;
+DROP USER user1@localhost;
+#
+# Test that master admin statements are allowed with REPLICATION MASTER ADMIN
+#
+CREATE USER user1@localhost IDENTIFIED BY '';
+GRANT REPLICATION MASTER ADMIN ON *.* TO user1@localhost;
+SHOW GRANTS FOR user1@localhost;
+Grants for user1@localhost
+GRANT REPLICATION MASTER ADMIN ON *.* TO `user1`@`localhost`
+connect con1,localhost,user1,,;
+connection con1;
+SHOW SLAVE HOSTS;
+Server_id Host Port Master_id
+connection default;
+DROP USER user1@localhost;
+#
+# End of 10.5 tests
+#
diff --git a/mysql-test/main/grant_master_admin.test b/mysql-test/main/grant_master_admin.test
new file mode 100644
index 00000000000..c98c374f7e9
--- /dev/null
+++ b/mysql-test/main/grant_master_admin.test
@@ -0,0 +1,47 @@
+-- source include/not_embedded.inc
+
+--echo #
+--echo # Start of 10.5 tests
+--echo #
+
+--echo #
+--echo # MDEV-21743 Split up SUPER privilege to smaller privileges
+--echo #
+
+--echo #
+--echo # Test that master admin statements are not allowed without REPLICATION MASTER ADMIN
+--echo #
+
+CREATE USER user1@localhost IDENTIFIED BY '';
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE REPLICATION MASTER ADMIN ON *.* FROM user1@localhost;
+
+connect (con1,localhost,user1,,);
+connection con1;
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+SHOW SLAVE HOSTS;
+disconnect con1;
+
+connection default;
+DROP USER user1@localhost;
+
+
+--echo #
+--echo # Test that master admin statements are allowed with REPLICATION MASTER ADMIN
+--echo #
+
+CREATE USER user1@localhost IDENTIFIED BY '';
+GRANT REPLICATION MASTER ADMIN ON *.* TO user1@localhost;
+SHOW GRANTS FOR user1@localhost;
+
+connect (con1,localhost,user1,,);
+connection con1;
+SHOW SLAVE HOSTS;
+
+connection default;
+DROP USER user1@localhost;
+
+
+--echo #
+--echo # End of 10.5 tests
+--echo #
diff --git a/mysql-test/main/grant_read_only.result b/mysql-test/main/grant_read_only.result
new file mode 100644
index 00000000000..185325f03a6
--- /dev/null
+++ b/mysql-test/main/grant_read_only.result
@@ -0,0 +1,73 @@
+#
+# Start of 10.5 tests
+#
+#
+# Test that @@read_only is not ignored without READ_ONLY ADMIN or SUPER
+#
+CREATE TABLE t1 (a INT);
+CREATE USER user1@localhost IDENTIFIED BY '';
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE READ_ONLY ADMIN, SUPER ON *.* FROM user1@localhost;
+SET @@GLOBAL.read_only=1;
+connect con1,localhost,user1,,;
+connection con1;
+UPDATE t1 SET a=11 WHERE a=10;
+ERROR HY000: The MariaDB server is running with the --read-only option so it cannot execute this statement
+DELETE FROM t1 WHERE a=11;
+ERROR HY000: The MariaDB server is running with the --read-only option so it cannot execute this statement
+INSERT INTO t1 VALUES (20);
+ERROR HY000: The MariaDB server is running with the --read-only option so it cannot execute this statement
+disconnect con1;
+connection default;
+SET @@GLOBAL.read_only=0;
+DROP USER user1@localhost;
+DROP TABLE t1;
+#
+# Test that @@read_only is ignored with READ_ONLY ADMIN
+#
+CREATE TABLE t1 (a INT);
+CREATE USER user1@localhost IDENTIFIED BY '';
+GRANT INSERT, UPDATE, DELETE, READ_ONLY ADMIN ON *.* TO user1@localhost;
+SHOW GRANTS FOR user1@localhost;
+Grants for user1@localhost
+GRANT INSERT, UPDATE, DELETE, READ_ONLY ADMIN ON *.* TO `user1`@`localhost`
+SET @@GLOBAL.read_only=1;
+connect con1,localhost,user1,,;
+connection con1;
+SELECT @@read_only;
+@@read_only
+1
+UPDATE t1 SET a=11 WHERE a=10;
+DELETE FROM t1 WHERE a=11;
+INSERT INTO t1 VALUES (20);
+disconnect con1;
+connection default;
+SET @@GLOBAL.read_only=0;
+DROP USER user1@localhost;
+DROP TABLE t1;
+#
+# Test that @@read_only is ignored with SUPER
+#
+CREATE TABLE t1 (a INT);
+CREATE USER user1@localhost IDENTIFIED BY '';
+GRANT INSERT, UPDATE, DELETE, SUPER ON *.* TO user1@localhost;
+SHOW GRANTS FOR user1@localhost;
+Grants for user1@localhost
+GRANT INSERT, UPDATE, DELETE, SUPER ON *.* TO `user1`@`localhost`
+SET @@GLOBAL.read_only=1;
+connect con1,localhost,user1,,;
+connection con1;
+SELECT @@read_only;
+@@read_only
+1
+UPDATE t1 SET a=11 WHERE a=10;
+DELETE FROM t1 WHERE a=11;
+INSERT INTO t1 VALUES (20);
+disconnect con1;
+connection default;
+SET @@GLOBAL.read_only=0;
+DROP USER user1@localhost;
+DROP TABLE t1;
+#
+# End of 10.5 tests
+#
diff --git a/mysql-test/main/grant_read_only.test b/mysql-test/main/grant_read_only.test
new file mode 100644
index 00000000000..25ffa3767ba
--- /dev/null
+++ b/mysql-test/main/grant_read_only.test
@@ -0,0 +1,83 @@
+-- source include/not_embedded.inc
+
+--echo #
+--echo # Start of 10.5 tests
+--echo #
+
+--echo #
+--echo # Test that @@read_only is not ignored without READ_ONLY ADMIN or SUPER
+--echo #
+
+CREATE TABLE t1 (a INT);
+CREATE USER user1@localhost IDENTIFIED BY '';
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE READ_ONLY ADMIN, SUPER ON *.* FROM user1@localhost;
+SET @@GLOBAL.read_only=1;
+
+connect (con1,localhost,user1,,);
+connection con1;
+--error ER_OPTION_PREVENTS_STATEMENT
+UPDATE t1 SET a=11 WHERE a=10;
+--error ER_OPTION_PREVENTS_STATEMENT
+DELETE FROM t1 WHERE a=11;
+--error ER_OPTION_PREVENTS_STATEMENT
+INSERT INTO t1 VALUES (20);
+disconnect con1;
+
+connection default;
+SET @@GLOBAL.read_only=0;
+DROP USER user1@localhost;
+DROP TABLE t1;
+
+--echo #
+--echo # Test that @@read_only is ignored with READ_ONLY ADMIN
+--echo #
+
+CREATE TABLE t1 (a INT);
+CREATE USER user1@localhost IDENTIFIED BY '';
+## TODO: it works even without INSERT/UPDATE/DELETE: file a bug report!
+GRANT INSERT, UPDATE, DELETE, READ_ONLY ADMIN ON *.* TO user1@localhost;
+SHOW GRANTS FOR user1@localhost;
+SET @@GLOBAL.read_only=1;
+
+connect (con1,localhost,user1,,);
+connection con1;
+SELECT @@read_only;
+UPDATE t1 SET a=11 WHERE a=10;
+DELETE FROM t1 WHERE a=11;
+INSERT INTO t1 VALUES (20);
+disconnect con1;
+
+connection default;
+SET @@GLOBAL.read_only=0;
+DROP USER user1@localhost;
+DROP TABLE t1;
+
+
+--echo #
+--echo # Test that @@read_only is ignored with SUPER
+--echo #
+
+CREATE TABLE t1 (a INT);
+CREATE USER user1@localhost IDENTIFIED BY '';
+## TODO: it works even without INSERT/UPDATE/DELETE: file a bug report!
+GRANT INSERT, UPDATE, DELETE, SUPER ON *.* TO user1@localhost;
+SHOW GRANTS FOR user1@localhost;
+SET @@GLOBAL.read_only=1;
+
+connect (con1,localhost,user1,,);
+connection con1;
+SELECT @@read_only;
+UPDATE t1 SET a=11 WHERE a=10;
+DELETE FROM t1 WHERE a=11;
+INSERT INTO t1 VALUES (20);
+disconnect con1;
+
+connection default;
+SET @@GLOBAL.read_only=0;
+DROP USER user1@localhost;
+DROP TABLE t1;
+
+--echo #
+--echo # End of 10.5 tests
+--echo #
diff --git a/mysql-test/main/grant_server.result b/mysql-test/main/grant_server.result
new file mode 100644
index 00000000000..37b5f67ba4b
--- /dev/null
+++ b/mysql-test/main/grant_server.result
@@ -0,0 +1,61 @@
+#
+# Start of 10.5 tests
+#
+#
+# Test that SERVER DDL statements are not allowed without FEDERATED ADMIN or SUPER
+#
+CREATE USER user1@localhost IDENTIFIED BY '';
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE FEDERATED ADMIN, SUPER ON *.* FROM user1@localhost;
+connect con1,localhost,user1,,;
+connection con1;
+CREATE SERVER IF NOT EXISTS server_1
+FOREIGN DATA WRAPPER mysql
+OPTIONS (USER 'mysqltest_1', HOST 'localhost', DATABASE 'test2');
+ERROR 42000: Access denied; you need (at least one of) the SUPER, FEDERATED ADMIN privilege(s) for this operation
+ALTER SERVER server_1 OPTIONS(HOST 'Server.Example.Org');
+ERROR 42000: Access denied; you need (at least one of) the SUPER, FEDERATED ADMIN privilege(s) for this operation
+DROP SERVER server_1;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, FEDERATED ADMIN privilege(s) for this operation
+disconnect con1;
+connection default;
+DROP USER user1@localhost;
+#
+# Test that SERVER DDL statements are allowed with FEDERATED ADMIN
+#
+CREATE USER user1@localhost IDENTIFIED BY '';
+GRANT FEDERATED ADMIN ON *.* TO user1@localhost;
+SHOW GRANTS FOR user1@localhost;
+Grants for user1@localhost
+GRANT FEDERATED ADMIN ON *.* TO `user1`@`localhost`
+connect con1,localhost,user1,,;
+connection con1;
+CREATE SERVER IF NOT EXISTS server_1
+FOREIGN DATA WRAPPER mysql
+OPTIONS (USER 'mysqltest_1', HOST 'localhost', DATABASE 'test2');
+ALTER SERVER server_1 OPTIONS(HOST 'Server.Example.Org');
+DROP SERVER server_1;
+disconnect con1;
+connection default;
+DROP USER user1@localhost;
+#
+# Test that SERVER DDL statements are allowed with SUPER
+#
+CREATE USER user1@localhost IDENTIFIED BY '';
+GRANT SUPER ON *.* TO user1@localhost;
+SHOW GRANTS FOR user1@localhost;
+Grants for user1@localhost
+GRANT SUPER ON *.* TO `user1`@`localhost`
+connect con1,localhost,user1,,;
+connection con1;
+CREATE SERVER IF NOT EXISTS server_1
+FOREIGN DATA WRAPPER mysql
+OPTIONS (USER 'mysqltest_1', HOST 'localhost', DATABASE 'test2');
+ALTER SERVER server_1 OPTIONS(HOST 'Server.Example.Org');
+DROP SERVER server_1;
+disconnect con1;
+connection default;
+DROP USER user1@localhost;
+#
+# End of 10.5 tests
+#
diff --git a/mysql-test/main/grant_server.test b/mysql-test/main/grant_server.test
new file mode 100644
index 00000000000..58c6b4e9ab6
--- /dev/null
+++ b/mysql-test/main/grant_server.test
@@ -0,0 +1,75 @@
+-- source include/not_embedded.inc
+
+--echo #
+--echo # Start of 10.5 tests
+--echo #
+
+--echo #
+--echo # Test that SERVER DDL statements are not allowed without FEDERATED ADMIN or SUPER
+--echo #
+
+CREATE USER user1@localhost IDENTIFIED BY '';
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE FEDERATED ADMIN, SUPER ON *.* FROM user1@localhost;
+
+connect (con1,localhost,user1,,);
+connection con1;
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+CREATE SERVER IF NOT EXISTS server_1
+ FOREIGN DATA WRAPPER mysql
+ OPTIONS (USER 'mysqltest_1', HOST 'localhost', DATABASE 'test2');
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+ALTER SERVER server_1 OPTIONS(HOST 'Server.Example.Org');
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+DROP SERVER server_1;
+disconnect con1;
+
+connection default;
+DROP USER user1@localhost;
+
+
+--echo #
+--echo # Test that SERVER DDL statements are allowed with FEDERATED ADMIN
+--echo #
+
+CREATE USER user1@localhost IDENTIFIED BY '';
+GRANT FEDERATED ADMIN ON *.* TO user1@localhost;
+SHOW GRANTS FOR user1@localhost;
+
+connect (con1,localhost,user1,,);
+connection con1;
+CREATE SERVER IF NOT EXISTS server_1
+ FOREIGN DATA WRAPPER mysql
+ OPTIONS (USER 'mysqltest_1', HOST 'localhost', DATABASE 'test2');
+ALTER SERVER server_1 OPTIONS(HOST 'Server.Example.Org');
+DROP SERVER server_1;
+disconnect con1;
+
+connection default;
+DROP USER user1@localhost;
+
+
+--echo #
+--echo # Test that SERVER DDL statements are allowed with SUPER
+--echo #
+
+CREATE USER user1@localhost IDENTIFIED BY '';
+GRANT SUPER ON *.* TO user1@localhost;
+SHOW GRANTS FOR user1@localhost;
+
+connect (con1,localhost,user1,,);
+connection con1;
+CREATE SERVER IF NOT EXISTS server_1
+ FOREIGN DATA WRAPPER mysql
+ OPTIONS (USER 'mysqltest_1', HOST 'localhost', DATABASE 'test2');
+ALTER SERVER server_1 OPTIONS(HOST 'Server.Example.Org');
+DROP SERVER server_1;
+disconnect con1;
+
+connection default;
+DROP USER user1@localhost;
+
+
+--echo #
+--echo # End of 10.5 tests
+--echo #
diff --git a/mysql-test/main/grant_slave_admin.result b/mysql-test/main/grant_slave_admin.result
new file mode 100644
index 00000000000..0f1f2c9985f
--- /dev/null
+++ b/mysql-test/main/grant_slave_admin.result
@@ -0,0 +1,64 @@
+#
+# Start of 10.5 tests
+#
+#
+# MDEV-21743 Split up SUPER privilege to smaller privileges
+#
+#
+# Test that slave admin statements are not allowed without REPLICATION SLAVE ADMIN or SUPER
+#
+CREATE USER user1@localhost IDENTIFIED BY '';
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE REPLICATION SLAVE ADMIN, SUPER ON *.* FROM user1@localhost;
+connect con1,localhost,user1,,;
+connection con1;
+START SLAVE;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, REPLICATION SLAVE ADMIN privilege(s) for this operation
+CHANGE MASTER TO MASTER_HOST='127.0.0.1';
+ERROR 42000: Access denied; you need (at least one of) the SUPER, REPLICATION SLAVE ADMIN privilege(s) for this operation
+STOP SLAVE;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, REPLICATION SLAVE ADMIN privilege(s) for this operation
+disconnect con1;
+connection default;
+DROP USER user1@localhost;
+#
+# Test that slave admin statements are allowed with REPLICATION SLAVE ADMIN
+#
+CREATE USER user1@localhost IDENTIFIED BY '';
+GRANT REPLICATION SLAVE ADMIN ON *.* TO user1@localhost;
+SHOW GRANTS FOR user1@localhost;
+Grants for user1@localhost
+GRANT REPLICATION SLAVE ADMIN ON *.* TO `user1`@`localhost`
+connect con1,localhost,user1,,;
+connection con1;
+START SLAVE;
+ERROR HY000: Misconfigured slave: MASTER_HOST was not set; Fix in config file or with CHANGE MASTER TO
+CHANGE MASTER TO MASTER_USER='root';
+STOP SLAVE;
+Warnings:
+Note 1255 Slave already has been stopped
+disconnect con1;
+connection default;
+DROP USER user1@localhost;
+#
+# Test that slave admin statements are allowed with SUPER
+#
+CREATE USER user1@localhost IDENTIFIED BY '';
+GRANT SUPER ON *.* TO user1@localhost;
+SHOW GRANTS FOR user1@localhost;
+Grants for user1@localhost
+GRANT SUPER ON *.* TO `user1`@`localhost`
+connect con1,localhost,user1,,;
+connection con1;
+START SLAVE;
+ERROR HY000: Misconfigured slave: MASTER_HOST was not set; Fix in config file or with CHANGE MASTER TO
+CHANGE MASTER TO MASTER_USER='root';
+STOP SLAVE;
+Warnings:
+Note 1255 Slave already has been stopped
+disconnect con1;
+connection default;
+DROP USER user1@localhost;
+#
+# End of 10.5 tests
+#
diff --git a/mysql-test/main/grant_slave_admin.test b/mysql-test/main/grant_slave_admin.test
new file mode 100644
index 00000000000..d73c31e0cf2
--- /dev/null
+++ b/mysql-test/main/grant_slave_admin.test
@@ -0,0 +1,74 @@
+-- source include/not_embedded.inc
+
+--echo #
+--echo # Start of 10.5 tests
+--echo #
+
+--echo #
+--echo # MDEV-21743 Split up SUPER privilege to smaller privileges
+--echo #
+
+--echo #
+--echo # Test that slave admin statements are not allowed without REPLICATION SLAVE ADMIN or SUPER
+--echo #
+
+CREATE USER user1@localhost IDENTIFIED BY '';
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE REPLICATION SLAVE ADMIN, SUPER ON *.* FROM user1@localhost;
+
+connect (con1,localhost,user1,,);
+connection con1;
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+START SLAVE;
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+CHANGE MASTER TO MASTER_HOST='127.0.0.1';
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+STOP SLAVE;
+disconnect con1;
+
+connection default;
+DROP USER user1@localhost;
+
+
+--echo #
+--echo # Test that slave admin statements are allowed with REPLICATION SLAVE ADMIN
+--echo #
+
+CREATE USER user1@localhost IDENTIFIED BY '';
+GRANT REPLICATION SLAVE ADMIN ON *.* TO user1@localhost;
+SHOW GRANTS FOR user1@localhost;
+
+connect (con1,localhost,user1,,);
+connection con1;
+--error ER_BAD_SLAVE
+START SLAVE;
+CHANGE MASTER TO MASTER_USER='root';
+STOP SLAVE;
+disconnect con1;
+
+connection default;
+DROP USER user1@localhost;
+
+
+--echo #
+--echo # Test that slave admin statements are allowed with SUPER
+--echo #
+
+CREATE USER user1@localhost IDENTIFIED BY '';
+GRANT SUPER ON *.* TO user1@localhost;
+SHOW GRANTS FOR user1@localhost;
+
+connect (con1,localhost,user1,,);
+connection con1;
+--error ER_BAD_SLAVE
+START SLAVE;
+CHANGE MASTER TO MASTER_USER='root';
+STOP SLAVE;
+disconnect con1;
+
+connection default;
+DROP USER user1@localhost;
+
+--echo #
+--echo # End of 10.5 tests
+--echo #
diff --git a/mysql-test/main/grant_slave_monitor.result b/mysql-test/main/grant_slave_monitor.result
new file mode 100644
index 00000000000..68df790074a
--- /dev/null
+++ b/mysql-test/main/grant_slave_monitor.result
@@ -0,0 +1,75 @@
+CREATE USER user1@localhost IDENTIFIED BY '';
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE SLAVE MONITOR, SUPER ON *.* FROM user1@localhost;
+FLUSH PRIVILEGES;
+connect con1,localhost,user1,,;
+connection con1;
+SHOW GRANTS;
+Grants for user1@localhost
+GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, BINLOG MONITOR, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY, SET USER, FEDERATED ADMIN, CONNECTION ADMIN, READ_ONLY ADMIN, REPLICATION SLAVE ADMIN, REPLICATION MASTER ADMIN, BINLOG ADMIN, BINLOG REPLAY ON *.* TO `user1`@`localhost`
+#
+# Verify that having REPLICATION SLAVE ADMIN doesn't allow SHOW SLAVE STATUS
+# Expected error: Access denied; you need (at least one of) the SUPER, SLAVE
+# MONITOR privilege(s) for this operation
+#
+SHOW SLAVE STATUS;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, SLAVE MONITOR privilege(s) for this operation
+#
+# Verify that having REPLICATION SLAVE ADMIN doesn't allow SHOW RELAYLOG EVENTS
+# Expected error: Access denied; you need (at least one of) the REPLICA MONITOR
+# privilege(s) for this operation
+#
+SHOW RELAYLOG EVENTS;
+ERROR 42000: Access denied; you need (at least one of) the SLAVE MONITOR privilege(s) for this operation
+disconnect con1;
+#
+# SHOW SLAVE STATUS and SHOW RELAYLOG EVENTS are allowed with SLAVE MONITOR privilege
+#
+connection default;
+GRANT SLAVE MONITOR ON *.* TO user1@localhost;
+FLUSH PRIVILEGES;
+connect con1,localhost,user1,,;
+connection con1;
+SHOW GRANTS;
+Grants for user1@localhost
+GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, BINLOG MONITOR, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY, SET USER, FEDERATED ADMIN, CONNECTION ADMIN, READ_ONLY ADMIN, REPLICATION SLAVE ADMIN, REPLICATION MASTER ADMIN, BINLOG ADMIN, BINLOG REPLAY, SLAVE MONITOR ON *.* TO `user1`@`localhost`
+SHOW SLAVE STATUS;
+SHOW RELAYLOG EVENTS;
+disconnect con1;
+connection default;
+DROP USER user1@localhost;
+#
+# SHOW SLAVE STATUS command is allowed with SUPER privilege
+#
+CREATE USER user1@localhost IDENTIFIED BY '';
+GRANT SUPER ON *.* TO user1@localhost;
+connect con1,localhost,user1,,;
+SHOW SLAVE STATUS;
+#
+# SHOW RELAYLOG EVENTS is not allowed with SUPER privilege, it requires SLAVE MONITOR
+#
+SHOW RELAYLOG EVENTS;
+ERROR 42000: Access denied; you need (at least one of) the SLAVE MONITOR privilege(s) for this operation
+disconnect con1;
+connection default;
+DROP USER user1@localhost;
+#
+# MDEV-25030 Upgrade to 10.5.9 breaks root's ability to grant
+#
+insert mysql.global_priv values ('bar', 'foo7', '{"access":274877906943,"version_id":100507,"plugin":"mysql_native_password","authentication_string":""}'),
+('bar', 'foo8', '{"access":274877906943,"version_id":100508,"plugin":"mysql_native_password","authentication_string":""}'),
+('bar', 'foo9', '{"access":274877906943,"version_id":100509,"plugin":"mysql_native_password","authentication_string":""}');
+flush privileges;
+show grants for foo7@bar;
+Grants for foo7@bar
+GRANT ALL PRIVILEGES ON *.* TO `foo7`@`bar` WITH GRANT OPTION
+show grants for foo8@bar;
+Grants for foo8@bar
+GRANT ALL PRIVILEGES ON *.* TO `foo8`@`bar` WITH GRANT OPTION
+show grants for foo9@bar;
+Grants for foo9@bar
+GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, BINLOG MONITOR, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY, SET USER, FEDERATED ADMIN, CONNECTION ADMIN, READ_ONLY ADMIN, REPLICATION SLAVE ADMIN, REPLICATION MASTER ADMIN, BINLOG ADMIN, BINLOG REPLAY ON *.* TO `foo9`@`bar` WITH GRANT OPTION
+drop user foo7@bar, foo8@bar, foo9@bar;
+#
+# End of 10.5 tests
+#
diff --git a/mysql-test/main/grant_slave_monitor.test b/mysql-test/main/grant_slave_monitor.test
new file mode 100644
index 00000000000..af4399b7150
--- /dev/null
+++ b/mysql-test/main/grant_slave_monitor.test
@@ -0,0 +1,117 @@
+# ==== Purpose ====
+#
+# SLAVE MONITOR privilege is required to execute following commands.
+# SHOW SLAVE STATUS
+# SHOW RELAYLOG EVENTS
+#
+# ==== Implementation ====
+#
+# Step1: GRANT ALL privileges for a new user 'user1' and then REVOKE
+# SLAVE MONITOR and SUPER privileges.
+# Step2: Execute SHOW SLAVE STAUTS/SHOW RELAYLOG EVENTS commands and expect
+# ER_SPECIFIC_ACCESS_DENIED_ERROR. This also verifies that REPLICATION
+# SLAVE ADMIN privilege is not required for these two commands.
+# Step3: GRANT SLAVE MONITOR privilege and observe that both commands are
+# allowd to execute.
+# Step4: GRANT SUPER privilege and observe that only SHOW SLAVE STATUS command
+# is allowed.
+#
+# ==== References ====
+#
+# MDEV-23610: Slave user can't run "SHOW SLAVE STATUS" anymore after upgrade
+# to 10.5, mysql_upgrade should take of that
+# MDEV-23918: admin privlege required to view contents of relay logs in 10.5
+#
+
+--source include/not_embedded.inc
+
+CREATE USER user1@localhost IDENTIFIED BY '';
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE SLAVE MONITOR, SUPER ON *.* FROM user1@localhost;
+FLUSH PRIVILEGES;
+
+--connect(con1,localhost,user1,,)
+--connection con1
+SHOW GRANTS;
+
+--echo #
+--echo # Verify that having REPLICATION SLAVE ADMIN doesn't allow SHOW SLAVE STATUS
+--echo # Expected error: Access denied; you need (at least one of) the SUPER, SLAVE
+--echo # MONITOR privilege(s) for this operation
+--echo #
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+SHOW SLAVE STATUS;
+
+--echo #
+--echo # Verify that having REPLICATION SLAVE ADMIN doesn't allow SHOW RELAYLOG EVENTS
+--echo # Expected error: Access denied; you need (at least one of) the REPLICA MONITOR
+--echo # privilege(s) for this operation
+--echo #
+--disable_ps_protocol
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+SHOW RELAYLOG EVENTS;
+--enable_ps_protocol
+--disconnect con1
+
+--echo #
+--echo # SHOW SLAVE STATUS and SHOW RELAYLOG EVENTS are allowed with SLAVE MONITOR privilege
+--echo #
+
+--connection default
+GRANT SLAVE MONITOR ON *.* TO user1@localhost;
+FLUSH PRIVILEGES;
+
+--connect(con1,localhost,user1,,)
+--connection con1
+SHOW GRANTS;
+
+--disable_result_log
+SHOW SLAVE STATUS;
+--disable_ps_protocol
+SHOW RELAYLOG EVENTS;
+--enable_ps_protocol
+--enable_result_log
+--disconnect con1
+
+--connection default
+DROP USER user1@localhost;
+
+--echo #
+--echo # SHOW SLAVE STATUS command is allowed with SUPER privilege
+--echo #
+CREATE USER user1@localhost IDENTIFIED BY '';
+GRANT SUPER ON *.* TO user1@localhost;
+
+--connect(con1,localhost,user1,,)
+--disable_result_log
+SHOW SLAVE STATUS;
+--enable_result_log
+
+--echo #
+--echo # SHOW RELAYLOG EVENTS is not allowed with SUPER privilege, it requires SLAVE MONITOR
+--echo #
+
+--disable_ps_protocol
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+SHOW RELAYLOG EVENTS;
+--enable_ps_protocol
+--disconnect con1
+
+--connection default
+DROP USER user1@localhost;
+
+--echo #
+--echo # MDEV-25030 Upgrade to 10.5.9 breaks root's ability to grant
+--echo #
+insert mysql.global_priv values ('bar', 'foo7', '{"access":274877906943,"version_id":100507,"plugin":"mysql_native_password","authentication_string":""}'),
+ ('bar', 'foo8', '{"access":274877906943,"version_id":100508,"plugin":"mysql_native_password","authentication_string":""}'),
+ ('bar', 'foo9', '{"access":274877906943,"version_id":100509,"plugin":"mysql_native_password","authentication_string":""}');
+flush privileges;
+show grants for foo7@bar;
+show grants for foo8@bar;
+show grants for foo9@bar;
+drop user foo7@bar, foo8@bar, foo9@bar;
+
+--echo #
+--echo # End of 10.5 tests
+--echo #
diff --git a/mysql-test/main/group_by.result b/mysql-test/main/group_by.result
index db75287c61c..8c1ba102e8f 100644
--- a/mysql-test/main/group_by.result
+++ b/mysql-test/main/group_by.result
@@ -321,6 +321,7 @@ a c count(distinct rand())
drop table t1;
CREATE TABLE t1 (a char(1));
INSERT INTO t1 VALUES ('A'),('B'),('A'),('B'),('A'),('B'),(NULL),('a'),('b'),(NULL),('A'),('B'),(NULL);
+flush status;
SELECT a FROM t1 GROUP BY a;
a
NULL
@@ -359,7 +360,11 @@ A 4
B 4
a 1
b 1
-SET BIG_TABLES=1;
+show status like 'Created%tables';
+Variable_name Value
+Created_tmp_disk_tables 0
+Created_tmp_tables 6
+set tmp_memory_table_size=0;
SELECT a FROM t1 GROUP BY a;
a
NULL
@@ -398,7 +403,11 @@ A 4
B 4
a 1
b 1
-SET BIG_TABLES=0;
+show status like 'Created%tables';
+Variable_name Value
+Created_tmp_disk_tables 6
+Created_tmp_tables 12
+set tmp_memory_table_size=default;
drop table t1;
CREATE TABLE t1 (
`a` char(193) default NULL,
@@ -515,14 +524,14 @@ a count(*)
NULL 9
3
b 1
-set big_tables=1;
+set tmp_memory_table_size=0;
select a,count(*) from t1 group by a;
a count(*)
NULL 9
3
b 1
drop table t1;
-set big_tables=0;
+set tmp_memory_table_size=default;
SET @save_optimizer_use_condition_selectivity=@@optimizer_use_condition_selectivity,@save_optimizer_switch=@@optimizer_switch;
SET optimizer_switch='outer_join_with_cache=off',@@optimizer_use_condition_selectivity=4;
create table t1 (a int not null, b int not null);
@@ -1569,7 +1578,7 @@ id select_type table type possible_keys key key_len ref rows Extra
EXPLAIN SELECT a FROM t1 FORCE INDEX FOR JOIN (i2)
FORCE INDEX FOR GROUP BY (i2) GROUP BY a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index NULL i2 9 NULL 144 Using index
+1 SIMPLE t1 range NULL i2 4 NULL 145 Using index for group-by
EXPLAIN SELECT a FROM t1 USE INDEX () IGNORE INDEX (i2);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 144
@@ -1692,7 +1701,7 @@ NULL 1
1 2
EXPLAIN SELECT a from t2 GROUP BY a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 index NULL a 10 NULL 6 Using index
+1 SIMPLE t2 range NULL a 5 NULL 7 Using index for group-by
SELECT a from t2 GROUP BY a;
a
NULL
@@ -1964,7 +1973,7 @@ DROP TABLE t1;
# Bug#11765254 (58200): Assertion failed: param.sort_length when grouping
# by functions
#
-SET BIG_TABLES=1;
+set tmp_memory_table_size=0;
CREATE TABLE t1(a INT);
INSERT INTO t1 VALUES (0),(0);
SELECT 1 FROM t1 GROUP BY IF(`a`,'','');
@@ -1991,7 +2000,7 @@ Warning 1292 Truncated incorrect INTEGER value: 'jxW<'
Warning 1292 Truncated incorrect INTEGER value: 'K'
Warning 1292 Truncated incorrect INTEGER value: 'jxW<'
DROP TABLE t1;
-SET BIG_TABLES=0;
+set tmp_memory_table_size=default;
#
# MDEV-641 LP:1002108 - Wrong result (or crash) from a query with duplicated field in the group list and a limit clause
# Bug#11761078: 53534: INCORRECT 'SELECT SQL_BIG_RESULT...'
@@ -2603,6 +2612,14 @@ v 2v,2v
NULL 1c,2v,2v
DROP TABLE t1,t2;
#
+# MDEV-24855 ER_CRASHED_ON_USAGE or Assertion `length <= column->length'
+# failed in ma_blockrec.c
+#
+CREATE TABLE t1 (a BIT(5), c BINARY(179));
+INSERT INTO t1 VALUES (b'1100','foo'),(b'0','bar');
+SELECT c, GROUP_CONCAT(CASE NULL WHEN 0 THEN a END, CASE 'foo' WHEN c THEN 1 END) AS f FROM t1 GROUP BY ExtractValue('<a></a>', '/a'), UUID();
+DROP TABLE t1;
+#
# MDEV-6129: Server crashes during UNION with ORDER BY field IS NULL
#
SET sql_mode='ONLY_FULL_GROUP_BY';
diff --git a/mysql-test/main/group_by.test b/mysql-test/main/group_by.test
index 3ca518420a0..97209b50cda 100644
--- a/mysql-test/main/group_by.test
+++ b/mysql-test/main/group_by.test
@@ -280,21 +280,28 @@ drop table t1;
CREATE TABLE t1 (a char(1));
INSERT INTO t1 VALUES ('A'),('B'),('A'),('B'),('A'),('B'),(NULL),('a'),('b'),(NULL),('A'),('B'),(NULL);
+flush status;
SELECT a FROM t1 GROUP BY a;
SELECT a,count(*) FROM t1 GROUP BY a;
SELECT a FROM t1 GROUP BY binary a;
SELECT a,count(*) FROM t1 GROUP BY binary a;
SELECT binary a FROM t1 GROUP BY 1;
SELECT binary a,count(*) FROM t1 GROUP BY 1;
-# Do the same tests with MyISAM temporary tables
-SET BIG_TABLES=1;
+--disable_ps_protocol
+show status like 'Created%tables';
+--enable_ps_protocol
+# Do the same tests with on-disk temporary tables
+set tmp_memory_table_size=0;
SELECT a FROM t1 GROUP BY a;
SELECT a,count(*) FROM t1 GROUP BY a;
SELECT a FROM t1 GROUP BY binary a;
SELECT a,count(*) FROM t1 GROUP BY binary a;
SELECT binary a FROM t1 GROUP BY 1;
SELECT binary a,count(*) FROM t1 GROUP BY 1;
-SET BIG_TABLES=0;
+--disable_ps_protocol
+show status like 'Created%tables';
+--enable_ps_protocol
+set tmp_memory_table_size=default;
drop table t1;
#
@@ -391,10 +398,10 @@ drop table t1,t2,t3;
create table t1 (a blob null);
insert into t1 values (NULL),(NULL),(NULL),(NULL),(NULL),(NULL),(NULL),(NULL),(NULL),(""),(""),(""),("b");
select a,count(*) from t1 group by a;
-set big_tables=1;
+set tmp_memory_table_size=0;
select a,count(*) from t1 group by a;
drop table t1;
-set big_tables=0;
+set tmp_memory_table_size=default;
#
# Test of GROUP BY ... ORDER BY NULL optimization
@@ -1344,7 +1351,7 @@ DROP TABLE t1;
--echo # by functions
--echo #
-SET BIG_TABLES=1;
+set tmp_memory_table_size=0;
CREATE TABLE t1(a INT);
INSERT INTO t1 VALUES (0),(0);
SELECT 1 FROM t1 GROUP BY IF(`a`,'','');
@@ -1352,7 +1359,7 @@ SELECT 1 FROM t1 GROUP BY TRIM(LEADING RAND() FROM '');
SELECT 1 FROM t1 GROUP BY SUBSTRING('',SLEEP(0),'');
SELECT 1 FROM t1 GROUP BY SUBSTRING(SYSDATE() FROM 'K' FOR 'jxW<');
DROP TABLE t1;
-SET BIG_TABLES=0;
+set tmp_memory_table_size=default;
--echo #
--echo # MDEV-641 LP:1002108 - Wrong result (or crash) from a query with duplicated field in the group list and a limit clause
@@ -1710,6 +1717,18 @@ FROM t1 JOIN t2 ON c = b GROUP BY b WITH ROLLUP;
DROP TABLE t1,t2;
--echo #
+--echo # MDEV-24855 ER_CRASHED_ON_USAGE or Assertion `length <= column->length'
+--echo # failed in ma_blockrec.c
+--echo #
+
+CREATE TABLE t1 (a BIT(5), c BINARY(179));
+INSERT INTO t1 VALUES (b'1100','foo'),(b'0','bar');
+--disable_result_log
+SELECT c, GROUP_CONCAT(CASE NULL WHEN 0 THEN a END, CASE 'foo' WHEN c THEN 1 END) AS f FROM t1 GROUP BY ExtractValue('<a></a>', '/a'), UUID();
+--enable_result_log
+DROP TABLE t1;
+
+--echo #
--echo # MDEV-6129: Server crashes during UNION with ORDER BY field IS NULL
--echo #
diff --git a/mysql-test/main/group_min_max.result b/mysql-test/main/group_min_max.result
index 8d240f9f36d..a17f3f09c3b 100644
--- a/mysql-test/main/group_min_max.result
+++ b/mysql-test/main/group_min_max.result
@@ -35,6 +35,8 @@ insert into t1 (a1, a2, b, c, d) values
('d','a','b','e412','xy1'),('d','a','b','f412','xy2'),('d','a','b','g412','xy3'),('d','a','b','h412','xy4'),
('d','b','a','i421','xy1'),('d','b','a','j421','xy2'),('d','b','a','k421','xy3'),('d','b','a','l421','xy4'),
('d','b','b','m422','xy1'),('d','b','b','n422','xy2'),('d','b','b','o422','xy3'),('d','b','b','p422','xy4');
+insert into t1 select * from t1;
+insert into t1 select * from t1;
create index idx_t1_0 on t1 (a1);
create index idx_t1_1 on t1 (a1,a2,b,c);
create index idx_t1_2 on t1 (a1,a2,b);
@@ -290,34 +292,34 @@ b i421 l421
b m422 p422
explain select a1,a2,b,min(c),max(c) from t1 where a1 < 'd' group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 10 Using where; Using index for group-by
+1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 12 Using where; Using index for group-by
explain select a1,a2,b,min(c),max(c) from t1 where a1 >= 'b' group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 14 Using where; Using index for group-by
+1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 13 Using where; Using index for group-by
explain select a1,a2,b, max(c) from t1 where a1 >= 'c' or a1 < 'b' group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 14 Using where; Using index for group-by
+1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 13 Using where; Using index for group-by
explain select a1, max(c) from t1 where a1 >= 'c' or a1 < 'b' group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 14 Using where; Using index for group-by
+1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 13 Using where; Using index for group-by
explain select a1,a2,b,min(c),max(c) from t1 where a1 >= 'c' or a2 < 'b' group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 17 Using where; Using index for group-by
explain select a1,a2,b, max(c) from t1 where a1 = 'z' or a1 = 'b' or a1 = 'd' group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 10 Using where; Using index for group-by
+1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 9 Using where; Using index for group-by
explain select a1,a2,b,min(c),max(c) from t1 where a1 = 'z' or a1 = 'b' or a1 = 'd' group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 10 Using where; Using index for group-by
+1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 9 Using where; Using index for group-by
explain select a1,a2,b, max(c) from t1 where (a1 = 'b' or a1 = 'd' or a1 = 'a' or a1 = 'c') and (a2 > 'a') group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 10 Using where; Using index for group-by
+1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 9 Using where; Using index for group-by
explain 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') group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 10 Using where; Using index for group-by
+1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 9 Using where; Using index for group-by
explain select a1,min(c),max(c) from t1 where a1 >= 'b' group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 14 Using where; Using index for group-by
+1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 13 Using where; Using index for group-by
explain select a1, max(c) from t1 where a1 in ('a','b','d') group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 13 Using where; Using index for group-by
@@ -1361,9 +1363,9 @@ explain select a1,a2,b,min(c),max(c) from t1
where exists ( select * from t2 where t2.c = t1.c )
group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t1 index NULL idx_t1_1 163 NULL 128 Using index
+1 PRIMARY t1 index NULL idx_t1_1 163 NULL 512 Using index
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 16 func 1
-2 MATERIALIZED t2 index NULL idx_t2_1 163 NULL 164 Using index
+2 MATERIALIZED t2 index NULL idx_t2_1 163 NULL 548 Using index
select a1,a2,b,min(c),max(c) from t1
where exists ( select * from t2 where t2.c = t1.c )
group by a1,a2,b;
@@ -1388,8 +1390,8 @@ explain select a1,a2,b,min(c),max(c) from t1
where exists ( select * from t2 where t2.c > 'b1' )
group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t1 index NULL idx_t1_1 163 NULL 128 Using index
-2 SUBQUERY t2 index NULL idx_t2_1 163 NULL 164 Using where; Using index
+1 PRIMARY t1 index NULL idx_t1_1 163 NULL 512 Using index
+2 SUBQUERY t2 index NULL idx_t2_1 163 NULL 548 Using where; Using index
select a1,a2,b,min(c),max(c) from t1
where exists ( select * from t2 where t2.c > 'b1' )
group by a1,a2,b;
@@ -1414,8 +1416,8 @@ explain select a1,a2,b,c,min(c), max(c) from t1
where exists ( select * from t2 where t1.b > 'a' and t2.c > 'b1' )
group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t1 index NULL idx_t1_1 163 NULL 128 Using where; Using index
-2 DEPENDENT SUBQUERY t2 index NULL idx_t2_1 163 NULL 164 Using where; Using index
+1 PRIMARY t1 index NULL idx_t1_1 163 NULL 512 Using where; Using index
+2 DEPENDENT SUBQUERY t2 index NULL idx_t2_1 163 NULL 548 Using where; Using index
select a1,a2,b,c,min(c), max(c) from t1
where exists ( select * from t2 where t1.b > 'a' and t2.c > 'b1' )
group by a1,a2,b;
@@ -1436,8 +1438,8 @@ where t2.c in (select c from t3 where t3.c > t1.b) and
t2.c > 'b1' )
group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t1 index NULL idx_t1_1 163 NULL 128 Using where; Using index
-2 DEPENDENT SUBQUERY t2 index NULL idx_t2_1 163 NULL 164 Using where; Using index
+1 PRIMARY t1 index NULL idx_t1_1 163 NULL 512 Using where; Using index
+2 DEPENDENT SUBQUERY t2 index NULL idx_t2_1 163 NULL 548 Using where; Using index
2 DEPENDENT SUBQUERY t3 index NULL idx_t3_1 10 NULL 192 Using where; Using index; FirstMatch(t2)
select a1,a2,b,c,min(c), max(c) from t1
where exists ( select * from t2
@@ -1466,8 +1468,8 @@ explain select a1,a2,b,c,min(c), max(c) from t1
where exists ( select * from t2 where t1.c > 'a' and t2.c > 'b1' )
group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t1 index NULL idx_t1_1 163 NULL 128 Using where; Using index
-2 DEPENDENT SUBQUERY t2 index NULL idx_t2_1 163 NULL 164 Using where; Using index
+1 PRIMARY t1 index NULL idx_t1_1 163 NULL 512 Using where; Using index
+2 DEPENDENT SUBQUERY t2 index NULL idx_t2_1 163 NULL 548 Using where; Using index
select a1,a2,b,c,min(c), max(c) from t1
where exists ( select * from t2 where t1.c > 'a' and t2.c > 'b1' )
group by a1,a2,b;
@@ -1496,8 +1498,8 @@ where t2.c in (select c from t3 where t3.c > t1.c) and
t2.c > 'b1' )
group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t1 index NULL idx_t1_1 163 NULL 128 Using where; Using index
-2 DEPENDENT SUBQUERY t2 index NULL idx_t2_1 163 NULL 164 Using where; Using index
+1 PRIMARY t1 index NULL idx_t1_1 163 NULL 512 Using where; Using index
+2 DEPENDENT SUBQUERY t2 index NULL idx_t2_1 163 NULL 548 Using where; Using index
2 DEPENDENT SUBQUERY t3 index NULL idx_t3_1 10 NULL 192 Using where; Using index; FirstMatch(t2)
select a1,a2,b,c,min(c), max(c) from t1
where exists ( select * from t2
@@ -1533,13 +1535,13 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range NULL idx_t1_1 163 NULL 17 Using where; Using index for group-by
explain select a1,a2,b,min(c) from t1 where ((a1 > 'a') or (a1 < '9')) and ((a2 >= 'b') and (a2 < 'z')) and (b = 'a') and ((c < 'h112') or (c = 'j121') or (c > 'k121' and c < 'm122') or (c > 'o122')) group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 163 NULL 14 Using where; Using index for group-by
+1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 163 NULL 13 Using where; Using index for group-by
explain select a1,a2,b,min(c) from t1 where ((a1 > 'a') or (a1 < '9')) and ((a2 >= 'b') and (a2 < 'z')) and (b = 'a') and ((c = 'j121') or (c > 'k121' and c < 'm122') or (c > 'o122') or (c < 'h112') or (c = 'c111')) group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 163 NULL 14 Using where; Using index for group-by
+1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 163 NULL 13 Using where; Using index for group-by
explain select a1,a2,b,min(c) from t1 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 t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 14 Using where; Using index for group-by
+1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 13 Using where; Using index for group-by
explain select a1,a2,b,min(c) from t1 where (ord(a1) > 97) and (ord(a2) + ord(a1) > 194) and (b = 'c') group by a1,a2,b;
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
@@ -1656,7 +1658,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range NULL idx_t1_1 163 NULL 17 Using where; Using index for group-by
explain select a1,a2,b from t1 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 t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_2 147 NULL 13 Using where; Using index for group-by
+1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 13 Using where; Using index for group-by
explain select a1,a2,b from t2 where (a1 >= 'c' or a2 < 'b') and (b > 'a') 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
@@ -1716,15 +1718,15 @@ 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 0.38 Using where; Using index
+1 SIMPLE t1 range NULL idx_t1_1 163 NULL 65 100.00 Using where; Using index for group-by
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');
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_2 147 NULL 13 Using where; Using index for group-by
+1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 13 Using where; Using index for group-by
explain select distinct b from t1 where (a2 >= 'b') and (b = 'a');
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index NULL idx_t1_2 147 NULL 128 Using where; Using index
+1 SIMPLE t1 index NULL idx_t1_2 147 NULL 512 Using where; Using index
explain select distinct a1,a2,b from t2;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 range NULL idx_t2_1 146 NULL # Using index for group-by
@@ -1733,7 +1735,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 0.30 Using where; Using index
+1 SIMPLE t2 range NULL idx_t2_1 163 NULL 69 100.00 Using where; Using index for group-by
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');
@@ -1741,7 +1743,7 @@ 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
explain select distinct b from t2 where (a2 >= 'b') and (b = 'a');
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 index NULL idx_t2_2 146 NULL 164 Using where; Using index
+1 SIMPLE t2 index NULL idx_t2_2 146 NULL 548 Using where; Using index
select distinct a1,a2,b from t1;
a1 a2 b
a a a
@@ -1867,7 +1869,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range NULL idx_t1_1 163 NULL 17 Using where; Using index for group-by
explain select distinct a1,a2,b from t1 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 t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_2 147 NULL 13 Using where; Using index for group-by
+1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 13 Using where; Using index for group-by
explain select distinct b from t1 where (a2 >= 'b') and (b = 'a') group by a1,a2,b;
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; Using temporary; Using filesort
@@ -1959,18 +1961,18 @@ 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 select count(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 Extra
-1 SIMPLE t1 range NULL idx_t1_1 163 NULL 65 Using where; Using index for group-by (scanning)
+1 SIMPLE t1 range NULL idx_t1_1 163 NULL 65 Using where; Using index for group-by
explain extended select count(distinct a1,a2,b) from t1 where (a1 > 'a') and (a2 > 'a') and (b = 'c');
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_2 147 NULL 13 100.00 Using where; Using index for group-by
+1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 13 100.00 Using where; Using index for group-by
Warnings:
Note 1003 select count(distinct `test`.`t1`.`a1`,`test`.`t1`.`a2`,`test`.`t1`.`b`) AS `count(distinct a1,a2,b)` from `test`.`t1` where `test`.`t1`.`b` = 'c' and `test`.`t1`.`a1` > 'a' and `test`.`t1`.`a2` > 'a'
explain select count(distinct b) from t1 where (a2 >= 'b') and (b = 'a');
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index NULL idx_t1_2 147 NULL 128 Using where; Using index
+1 SIMPLE t1 index NULL idx_t1_2 147 NULL 512 Using where; Using index
explain extended select 98 + count(distinct a1,a2,b) from t1 where (a1 > 'a') and (a2 > 'a');
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_2 147 NULL 13 100.00 Using where; Using index for group-by
+1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 13 100.00 Using where; Using index for group-by
Warnings:
Note 1003 select 98 + count(distinct `test`.`t1`.`a1`,`test`.`t1`.`a2`,`test`.`t1`.`b`) AS `98 + count(distinct a1,a2,b)` from `test`.`t1` where `test`.`t1`.`a1` > 'a' and `test`.`t1`.`a2` > 'a'
select count(distinct a1,a2,b) from t1 where (a2 >= 'b') and (b = 'a');
@@ -1990,16 +1992,16 @@ select 98 + count(distinct a1,a2,b) from t1 where (a1 > 'a') and (a2 > 'a');
104
explain select a1,a2,b, concat(min(c), max(c)) from t1 where a1 < 'd' group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 10 Using where; Using index for group-by
+1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 12 Using where; Using index for group-by
explain select concat(a1,min(c)),b from t1 where a1 < 'd' group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 10 Using where; Using index for group-by
+1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 12 Using where; Using index for group-by
explain select concat(a1,min(c)),b,max(c) from t1 where a1 < 'd' group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 10 Using where; Using index for group-by
+1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 12 Using where; Using index for group-by
explain select concat(a1,a2),b,min(c),max(c) from t1 where a1 < 'd' group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 10 Using where; Using index for group-by
+1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 12 Using where; Using index for group-by
explain select concat(ord(min(b)),ord(max(b))),min(b),max(b) from t1 group by a1,a2;
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 index for group-by
@@ -2071,63 +2073,63 @@ concat(ord(min(b)),ord(max(b))) min(b) max(b)
9798 a b
explain select a1,a2,b,d,min(c),max(c) from t1 group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL NULL NULL NULL NULL 128 Using temporary; Using filesort
+1 SIMPLE t1 ALL NULL NULL NULL NULL 512 Using temporary; Using filesort
explain select a1,a2,b,d from t1 group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL NULL NULL NULL NULL 128 Using temporary; Using filesort
+1 SIMPLE t1 ALL NULL NULL NULL NULL 512 Using temporary; Using filesort
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 99.22 Using where; Using index
+1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 130 NULL 276 99.22 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 45.12 Using where; Using temporary; Using filesort
+1 SIMPLE t1 ALL idx_t1_0,idx_t1_1,idx_t1_2 NULL NULL NULL 512 40.43 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 45.12 Using where; Using temporary; Using filesort
+1 SIMPLE t1 ALL idx_t1_0,idx_t1_1,idx_t1_2 NULL NULL NULL 512 40.43 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;
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
+1 SIMPLE t2 index NULL idx_t2_1 163 NULL 548 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 99.22 Using where; Using index
+1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 130 NULL 276 99.22 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;
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
+1 SIMPLE t2 index NULL idx_t2_1 163 NULL 548 Using where; Using index
select a1,a2,min(b),c from t2 where (a2 = 'a') and (c = 'a111') group by a1;
a1 a2 min(b) c
a a a a111
explain select a1,a2,b,max(c),min(c) from t2 where (a2 = 'a') and (b = 'b') or (b = 'a') group by a1;
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
+1 SIMPLE t2 index NULL idx_t2_1 163 NULL 548 Using where; Using index
explain select a1,a2,b,min(c),max(c) from t2
where (c > 'a000') and (c <= 'd999') and (c like '_8__') 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 164 Using where; Using index
+1 SIMPLE t2 index NULL idx_t2_1 163 NULL 548 Using where; Using index
explain select a1, a2, b, c, min(d), max(d) from t1 group by a1,a2,b,c;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL NULL NULL NULL NULL 128 Using temporary; Using filesort
+1 SIMPLE t1 ALL NULL NULL NULL NULL 512 Using temporary; Using filesort
explain select a1,a2,count(a2) from t1 group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index NULL idx_t1_2 147 NULL 128 Using index
+1 SIMPLE t1 index NULL idx_t1_2 147 NULL 512 Using index
explain extended select a1,a2,count(a2) from t1 where (a1 > 'a') 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_2 65 NULL 101 95.05 Using where; Using index
+1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_2 65 NULL 392 100.00 Using where; Using index
Warnings:
Note 1003 select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2`,count(`test`.`t1`.`a2`) AS `count(a2)` from `test`.`t1` where `test`.`t1`.`a1` > 'a' group by `test`.`t1`.`a1`,`test`.`t1`.`a2`,`test`.`t1`.`b`
explain extended select sum(ord(a1)) from t1 where (a1 > 'a') 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_2 65 NULL 101 95.05 Using where; Using index
+1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_2 65 NULL 392 100.00 Using where; Using index
Warnings:
Note 1003 select sum(ord(`test`.`t1`.`a1`)) AS `sum(ord(a1))` from `test`.`t1` where `test`.`t1`.`a1` > 'a' group by `test`.`t1`.`a1`,`test`.`t1`.`a2`,`test`.`t1`.`b`
create table t4 as select distinct a1, a2, b, c from t1;
@@ -2158,7 +2160,7 @@ d b b m422
drop table t4;
explain select distinct(a1) from t1 where ord(a2) = 98;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index NULL idx_t1_2 147 NULL 128 Using where; Using index
+1 SIMPLE t1 index NULL idx_t1_2 147 NULL 512 Using where; Using index
select distinct(a1) from t1 where ord(a2) = 98;
a1
a
@@ -2372,7 +2374,7 @@ CREATE TABLE t2 (a int, b int, c int, PRIMARY KEY (a,b,c));
INSERT INTO t2 SELECT a,b,b FROM t1;
explain SELECT MIN(c) FROM t2 WHERE b = 2 and a = 1 and c > 1 GROUP BY a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range PRIMARY PRIMARY 12 NULL 1 Using where; Using index for group-by
+1 SIMPLE t2 range PRIMARY PRIMARY 12 NULL 1 Using where; Using index
SELECT MIN(c) FROM t2 WHERE b = 2 and a = 1 and c > 1 GROUP BY a;
MIN(c)
2
@@ -2386,7 +2388,7 @@ 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 index NULL a 10 NULL 15 Using index
+1 SIMPLE t1 range NULL a 5 NULL 6 Using index for group-by
FLUSH STATUS;
SELECT max(b), a FROM t1 GROUP BY a;
max(b) a
@@ -2396,18 +2398,18 @@ max(b) a
6 4
SHOW STATUS LIKE 'handler_read__e%';
Variable_name Value
-Handler_read_key 0
-Handler_read_next 15
+Handler_read_key 8
+Handler_read_next 0
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 index NULL a 10 NULL 15 Using index
+1 SIMPLE t1 range NULL a 5 NULL 6 Using index for group-by
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 0
-Handler_read_next 15
+Handler_read_key 8
+Handler_read_next 0
Handler_read_retry 0
FLUSH STATUS;
SELECT * FROM (SELECT max(b), a FROM t1 GROUP BY a) b;
@@ -2418,8 +2420,8 @@ max(b) a
6 4
SHOW STATUS LIKE 'handler_read__e%';
Variable_name Value
-Handler_read_key 0
-Handler_read_next 15
+Handler_read_key 8
+Handler_read_next 0
Handler_read_retry 0
FLUSH STATUS;
(SELECT max(b), a FROM t1 GROUP BY a) UNION
@@ -2431,20 +2433,20 @@ max(b) a
6 4
SHOW STATUS LIKE 'handler_read__e%';
Variable_name Value
-Handler_read_key 0
-Handler_read_next 30
+Handler_read_key 16
+Handler_read_next 0
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 index NULL a 10 NULL 15 Using index
-2 UNION t1 index NULL a 10 NULL 15 Using index
+1 PRIMARY t1 range NULL a 5 NULL 6 Using index for group-by
+2 UNION t1 range NULL a 5 NULL 6 Using index for group-by
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 a a 5 NULL 2 Using where; Using index for group-by
+2 SUBQUERY t1 range a a 5 NULL 5 Using where; 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
@@ -2454,38 +2456,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 a a 5 NULL 2 Using where; Using index for group-by
+2 SUBQUERY t1 range a a 5 NULL 5 Using where; 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 2
-1 PRIMARY t1_outer ref a a 5 <subquery2>.max(b) 3 Using index
-2 MATERIALIZED t1 range a a 5 NULL 2 Using where; 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 range a a 5 NULL 5 Using where; 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 index NULL a 10 NULL 15 Using index
-2 SUBQUERY t1 range a a 5 NULL 2 Using where; Using index for group-by
+1 PRIMARY t1_outer range NULL a 5 NULL 6 Using index for group-by
+2 SUBQUERY t1 range a a 5 NULL 5 Using where; 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 a a 5 NULL 2 Using where; Using index for group-by
+2 SUBQUERY t1 range a a 5 NULL 5 Using where; 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 a a 5 NULL 2 Using where; Using index for group-by
+3 SUBQUERY t1 range a a 5 NULL 5 Using where; 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 5
-Handler_read_next 15
+Handler_read_key 13
+Handler_read_next 0
Handler_read_retry 0
DELETE FROM t3;
FLUSH STATUS;
@@ -2493,15 +2495,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 0
-Handler_read_next 15
+Handler_read_key 8
+Handler_read_next 0
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 0
-Handler_read_next 15
+Handler_read_key 8
+Handler_read_next 0
Handler_read_retry 0
FLUSH STATUS;
DELETE FROM t3 WHERE (SELECT (SELECT MAX(b) FROM t1 GROUP BY a HAVING a < 2) x
@@ -2509,8 +2511,8 @@ FROM t1) > 10000;
ERROR 21000: Subquery returns more than 1 row
SHOW STATUS LIKE 'handler_read__e%';
Variable_name Value
-Handler_read_key 0
-Handler_read_next 16
+Handler_read_key 8
+Handler_read_next 1
Handler_read_retry 0
DROP TABLE t1,t2,t3;
CREATE TABLE t1 (a int, INDEX idx(a));
@@ -2662,7 +2664,7 @@ a b
3 13
explain extended select sql_buffer_result a, max(b)+1 from t1 where a = 0 group by a;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t1 ref a,index a 5 const 15 100.00 Using index; Using temporary
+1 SIMPLE t1 ref a,index a 5 const 15 20.00 Using index; Using temporary
Warnings:
Note 1003 select sql_buffer_result `test`.`t1`.`a` AS `a`,max(`test`.`t1`.`b`) + 1 AS `max(b)+1` from `test`.`t1` where `test`.`t1`.`a` = 0 group by `test`.`t1`.`a`
drop table t1;
@@ -3662,7 +3664,7 @@ f1 COUNT(DISTINCT f2)
3 4
explain SELECT f1, COUNT(DISTINCT f2) FROM t1 GROUP BY f1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL f1 5 NULL 9 Using index for group-by (scanning)
+1 SIMPLE t1 range NULL f1 5 NULL 9 Using index for group-by
drop table t1;
# End of test#50539.
#
@@ -4000,10 +4002,10 @@ 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
explain select min(a) from t1 where a between "a" and "Cafeeeeeeeeeeeeeeeeeeeeeeeeee";
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index a a 13 NULL 2 Using where; Using index
+1 SIMPLE t1 range a a 13 NULL 2 Using where; Using index
explain select min(a) from t1 where a between "abbbbbbbbbbbbbbbbbbbb" and "Cafe2";
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index a a 13 NULL 2 Using where; Using index
+1 SIMPLE t1 range a a 13 NULL 2 Using where; Using index
drop table t1;
#
# MDEV-15433: Optimizer does not use group by optimization with distinct
diff --git a/mysql-test/main/group_min_max.test b/mysql-test/main/group_min_max.test
index 0dc7ea2fee7..526552dda92 100644
--- a/mysql-test/main/group_min_max.test
+++ b/mysql-test/main/group_min_max.test
@@ -53,6 +53,8 @@ insert into t1 (a1, a2, b, c, d) values
('d','a','b','e412','xy1'),('d','a','b','f412','xy2'),('d','a','b','g412','xy3'),('d','a','b','h412','xy4'),
('d','b','a','i421','xy1'),('d','b','a','j421','xy2'),('d','b','a','k421','xy3'),('d','b','a','l421','xy4'),
('d','b','b','m422','xy1'),('d','b','b','n422','xy2'),('d','b','b','o422','xy3'),('d','b','b','p422','xy4');
+insert into t1 select * from t1;
+insert into t1 select * from t1;
create index idx_t1_0 on t1 (a1);
create index idx_t1_1 on t1 (a1,a2,b,c);
diff --git a/mysql-test/main/index_intersect.result b/mysql-test/main/index_intersect.result
index bb2478c8c46..3ec98216479 100644
--- a/mysql-test/main/index_intersect.result
+++ b/mysql-test/main/index_intersect.result
@@ -80,7 +80,7 @@ EXPLAIN
SELECT * FROM City
WHERE Name LIKE 'M%' AND Population > 7000000;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City range Population,Name Population 4 NULL # Using index condition; Using where
+1 SIMPLE City index_merge Population,Name Population,Name 4,35 NULL # Using sort_intersect(Population,Name); Using where
SELECT * FROM City USE INDEX ()
WHERE Name LIKE 'C%' AND Population > 1000000;
ID Name Country Population
@@ -335,8 +335,8 @@ ID Name Country Population
SELECT * FROM City
WHERE Name LIKE 'M%' AND Population > 7000000;
ID Name Country Population
-3580 Moscow RUS 8389200
1024 Mumbai (Bombay) IND 10500000
+3580 Moscow RUS 8389200
SELECT COUNT(*) FROM City WHERE Name BETWEEN 'M' AND 'N';
COUNT(*)
301
@@ -368,14 +368,14 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE City index_merge Population,Country,Name Name,Population 35,4 NULL # Using sort_intersect(Name,Population); Using where
EXPLAIN
SELECT * FROM City
-WHERE Name BETWEEN 'G' AND 'J' AND Population > 1000000 AND Country LIKE 'J%';
+WHERE Name BETWEEN 'G' AND 'K' AND Population > 1000000 AND Country LIKE 'J%';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City index_merge Population,Country,Name Population,Country 4,3 NULL # Using sort_intersect(Population,Country); Using where
+1 SIMPLE City index_merge Population,Country,Name Population,Country,Name 4,3,35 NULL # Using sort_intersect(Population,Country,Name); Using where
EXPLAIN
SELECT * FROM City
WHERE Name BETWEEN 'G' AND 'K' AND Population > 500000 AND Country LIKE 'C%';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City range Population,Name,Country Name # NULL # Using index condition; Using where
+1 SIMPLE City index_merge Population,Name,Country Name,Country,Population # NULL # Using sort_intersect(Name,Country,Population); Using where
SELECT * FROM City USE INDEX ()
WHERE Name BETWEEN 'M' AND 'N' AND Population > 1000000 AND Country LIKE 'C%';
ID Name Country Population
@@ -387,12 +387,14 @@ ID Name Country Population
1810 Montréal CAN 1016376
2259 Medellín COL 1861265
SELECT * FROM City USE INDEX ()
-WHERE Name BETWEEN 'G' AND 'J' AND Population > 1000000 AND Country LIKE 'J%';
+WHERE Name BETWEEN 'G' AND 'K' AND Population > 1000000 AND Country LIKE 'J%';
ID Name Country Population
+1533 Jokohama [Yokohama] JPN 3339594
1541 Hiroshima JPN 1119117
SELECT * FROM City
-WHERE Name BETWEEN 'G' AND 'J' AND Population > 1000000 AND Country LIKE 'J%';
+WHERE Name BETWEEN 'G' AND 'K' AND Population > 1000000 AND Country LIKE 'J%';
ID Name Country Population
+1533 Jokohama [Yokohama] JPN 3339594
1541 Hiroshima JPN 1119117
SELECT * FROM City USE INDEX ()
WHERE Name BETWEEN 'G' AND 'K' AND Population > 500000 AND Country LIKE 'C%';
@@ -464,17 +466,17 @@ EXPLAIN
SELECT * FROM City
WHERE ID BETWEEN 501 AND 1000 AND Population > 700000 AND Country LIKE 'C%';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City range PRIMARY,Population,Country Population 4 NULL # Using index condition; Using where
+1 SIMPLE City index_merge PRIMARY,Population,Country Population,PRIMARY,Country 4,4,3 NULL # Using sort_intersect(Population,PRIMARY,Country); Using where
EXPLAIN
SELECT * FROM City
WHERE ID BETWEEN 1 AND 500 AND Population > 700000 AND Country LIKE 'C%';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City range PRIMARY,Population,Country Population 4 NULL # Using index condition; Using where
+1 SIMPLE City index_merge PRIMARY,Population,Country Population,PRIMARY,Country 4,4,3 NULL # Using sort_intersect(Population,PRIMARY,Country); Using where
EXPLAIN
SELECT * FROM City
WHERE ID BETWEEN 2001 AND 2500 AND Population > 300000 AND Country LIKE 'H%';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City range PRIMARY,Population,Country Country 3 NULL # Using index condition; Using where
+1 SIMPLE City index_merge PRIMARY,Population,Country Country,PRIMARY 3,4 NULL # Using sort_intersect(Country,PRIMARY); Using where
EXPLAIN
SELECT * FROM City
WHERE ID BETWEEN 3701 AND 4000 AND Population > 1000000
@@ -693,7 +695,7 @@ ID Name Country Population
3808 Austin USA 656562
3809 Baltimore USA 651154
3810 Memphis USA 650100
-SET SESSION sort_buffer_size = 2048;
+SET SESSION sort_buffer_size = IF(@@version_compile_machine like '%64%', 2048, 1536);
EXPLAIN
SELECT * FROM City WHERE
Name LIKE 'C%' AND Population > 1000000;
@@ -706,7 +708,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE City index_merge Population,Name Population,Name 4,35 NULL # Using sort_intersect(Population,Name); Using where
EXPLAIN
SELECT * FROM City
-WHERE Name BETWEEN 'G' AND 'J' AND Population > 1000000 AND Country LIKE 'J%';
+WHERE Name BETWEEN 'G' AND 'K' AND Population > 1000000 AND Country LIKE 'J%';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE City index_merge Population,Country,Name Population,Country 4,3 NULL # Using sort_intersect(Population,Country); Using where
EXPLAIN
diff --git a/mysql-test/main/index_intersect.test b/mysql-test/main/index_intersect.test
index a3fbe0de8b9..26937fd5eef 100644
--- a/mysql-test/main/index_intersect.test
+++ b/mysql-test/main/index_intersect.test
@@ -139,7 +139,7 @@ SELECT * FROM City
--replace_column 9 #
EXPLAIN
SELECT * FROM City
- WHERE Name BETWEEN 'G' AND 'J' AND Population > 1000000 AND Country LIKE 'J%';
+ WHERE Name BETWEEN 'G' AND 'K' AND Population > 1000000 AND Country LIKE 'J%';
--replace_column 7 # 9 #
--replace_result Population,Country,Name Population,Name,Country
@@ -161,11 +161,11 @@ SELECT * FROM City
SELECT * FROM City USE INDEX ()
- WHERE Name BETWEEN 'G' AND 'J' AND Population > 1000000 AND Country LIKE 'J%';
+ WHERE Name BETWEEN 'G' AND 'K' AND Population > 1000000 AND Country LIKE 'J%';
--sorted_result
SELECT * FROM City
- WHERE Name BETWEEN 'G' AND 'J' AND Population > 1000000 AND Country LIKE 'J%';
+ WHERE Name BETWEEN 'G' AND 'K' AND Population > 1000000 AND Country LIKE 'J%';
SELECT * FROM City USE INDEX ()
@@ -275,10 +275,22 @@ SELECT * FROM City USE INDEX ()
SELECT * FROM City
WHERE ID BETWEEN 3001 AND 4000 AND Population > 600000
AND Country BETWEEN 'S' AND 'Z' ;
+
+# Originally this was just sort_buffer_size=2048. Then, it started
+# failing on 32bit due to different cost number in
+# Unique::get_use_cost() because of sizeof(sizeof(TREE_ELEMENT)+key_size)
+# On 64 bit: Unique object element_size=32, which gives 2048/32= 64 elements
+# in the tree.
+# On 32 bit: Unique object element_size=24.
+# If we want 64 elements in the tree, we need 64*24=1536 as sort_buffer_size.
-SET SESSION sort_buffer_size = 2048;
+# The purpose of setting sort_buffer_size is to show that some of the following
+# explains should use 'index_merge' while others should use range
+# If the following code causes future problems, the other option would be
+# to create a separate result-.diff file for 32 bit.
+SET SESSION sort_buffer_size = IF(@@version_compile_machine like '%64%', 2048, 1536);
# The following EXPLAIN command demonstrate that the execution plans
# may be different if sort_buffer_size is set to a small value
@@ -298,7 +310,7 @@ SELECT * FROM City WHERE
--replace_column 9 #
EXPLAIN
SELECT * FROM City
- WHERE Name BETWEEN 'G' AND 'J' AND Population > 1000000 AND Country LIKE 'J%';
+ WHERE Name BETWEEN 'G' AND 'K' AND Population > 1000000 AND Country LIKE 'J%';
--replace_column 9 #
EXPLAIN
diff --git a/mysql-test/main/index_intersect_innodb.result b/mysql-test/main/index_intersect_innodb.result
index fed33b3d9bd..44407dbcd30 100644
--- a/mysql-test/main/index_intersect_innodb.result
+++ b/mysql-test/main/index_intersect_innodb.result
@@ -1,4 +1,4 @@
-SET SESSION STORAGE_ENGINE='InnoDB';
+SET SESSION DEFAULT_STORAGE_ENGINE='InnoDB';
set @innodb_stats_persistent_save= @@innodb_stats_persistent;
set @innodb_stats_persistent_sample_pages_save=
@@innodb_stats_persistent_sample_pages;
@@ -86,7 +86,7 @@ EXPLAIN
SELECT * FROM City
WHERE Name LIKE 'M%' AND Population > 7000000;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City range Population,Name Population 4 NULL # Using index condition; Using where
+1 SIMPLE City index_merge Population,Name Population,Name 4,35 NULL # Using sort_intersect(Population,Name); Using where
SELECT * FROM City USE INDEX ()
WHERE Name LIKE 'C%' AND Population > 1000000;
ID Name Country Population
@@ -341,8 +341,8 @@ ID Name Country Population
SELECT * FROM City
WHERE Name LIKE 'M%' AND Population > 7000000;
ID Name Country Population
-3580 Moscow RUS 8389200
1024 Mumbai (Bombay) IND 10500000
+3580 Moscow RUS 8389200
SELECT COUNT(*) FROM City WHERE Name BETWEEN 'M' AND 'N';
COUNT(*)
301
@@ -371,12 +371,12 @@ EXPLAIN
SELECT * FROM City
WHERE Name BETWEEN 'M' AND 'N' AND Population > 1000000 AND Country LIKE 'C%';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City index_merge Population,Country,Name Population,Name 4,35 NULL # Using sort_intersect(Population,Name); Using where
+1 SIMPLE City index_merge Population,Country,Name Population,Name,Country 4,35,3 NULL # Using sort_intersect(Population,Name,Country); Using where
EXPLAIN
SELECT * FROM City
-WHERE Name BETWEEN 'G' AND 'J' AND Population > 1000000 AND Country LIKE 'J%';
+WHERE Name BETWEEN 'G' AND 'K' AND Population > 1000000 AND Country LIKE 'J%';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City index_merge Population,Country,Name Population,Country 4,3 NULL # Using sort_intersect(Population,Country); Using where
+1 SIMPLE City index_merge Population,Country,Name Population,Country,Name 4,3,35 NULL # Using sort_intersect(Population,Country,Name); Using where
EXPLAIN
SELECT * FROM City
WHERE Name BETWEEN 'G' AND 'K' AND Population > 500000 AND Country LIKE 'C%';
@@ -393,12 +393,14 @@ ID Name Country Population
1810 Montréal CAN 1016376
2259 Medellín COL 1861265
SELECT * FROM City USE INDEX ()
-WHERE Name BETWEEN 'G' AND 'J' AND Population > 1000000 AND Country LIKE 'J%';
+WHERE Name BETWEEN 'G' AND 'K' AND Population > 1000000 AND Country LIKE 'J%';
ID Name Country Population
+1533 Jokohama [Yokohama] JPN 3339594
1541 Hiroshima JPN 1119117
SELECT * FROM City
-WHERE Name BETWEEN 'G' AND 'J' AND Population > 1000000 AND Country LIKE 'J%';
+WHERE Name BETWEEN 'G' AND 'K' AND Population > 1000000 AND Country LIKE 'J%';
ID Name Country Population
+1533 Jokohama [Yokohama] JPN 3339594
1541 Hiroshima JPN 1119117
SELECT * FROM City USE INDEX ()
WHERE Name BETWEEN 'G' AND 'K' AND Population > 500000 AND Country LIKE 'C%';
@@ -480,19 +482,19 @@ EXPLAIN
SELECT * FROM City
WHERE ID BETWEEN 2001 AND 2500 AND Population > 300000 AND Country LIKE 'H%';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City range PRIMARY,Population,Country Country 7 NULL # Using index condition; Using where
+1 SIMPLE City index_merge PRIMARY,Population,Country PRIMARY,Population,Country 4,4,7 NULL # Using sort_intersect(PRIMARY,Population,Country); Using where
EXPLAIN
SELECT * FROM City
WHERE ID BETWEEN 3701 AND 4000 AND Population > 1000000
AND Country BETWEEN 'S' AND 'Z';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City index_merge PRIMARY,Population,Country PRIMARY,Population 4,4 NULL # Using sort_intersect(PRIMARY,Population); Using where
+1 SIMPLE City index_merge PRIMARY,Population,Country PRIMARY,Population,Country 4,4,7 NULL # Using sort_intersect(PRIMARY,Population,Country); Using where
EXPLAIN
SELECT * FROM City
WHERE ID BETWEEN 3001 AND 4000 AND Population > 600000
AND Country BETWEEN 'S' AND 'Z' ;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City range PRIMARY,Population,Country PRIMARY 4 NULL # Using where
+1 SIMPLE City index_merge PRIMARY,Population,Country PRIMARY,Population,Country 4,4,7 NULL # Using sort_intersect(PRIMARY,Population,Country); Using where
SELECT * FROM City USE INDEX ()
WHERE ID BETWEEN 501 AND 1000 AND Population > 700000 AND Country LIKE 'C%';
ID Name Country Population
@@ -699,7 +701,7 @@ ID Name Country Population
3808 Austin USA 656562
3809 Baltimore USA 651154
3810 Memphis USA 650100
-SET SESSION sort_buffer_size = 2048;
+SET SESSION sort_buffer_size = IF(@@version_compile_machine like '%64%', 2048, 1536);
EXPLAIN
SELECT * FROM City WHERE
Name LIKE 'C%' AND Population > 1000000;
@@ -712,7 +714,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE City index_merge Population,Name Population,Name 4,35 NULL # Using sort_intersect(Population,Name); Using where
EXPLAIN
SELECT * FROM City
-WHERE Name BETWEEN 'G' AND 'J' AND Population > 1000000 AND Country LIKE 'J%';
+WHERE Name BETWEEN 'G' AND 'K' AND Population > 1000000 AND Country LIKE 'J%';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE City index_merge Population,Country,Name Population,Country 4,3 NULL # Using sort_intersect(Population,Country); Using where
EXPLAIN
@@ -983,4 +985,4 @@ SET SESSION optimizer_switch='rowid_filter=default';
set global innodb_stats_persistent= @innodb_stats_persistent_save;
set global innodb_stats_persistent_sample_pages=
@innodb_stats_persistent_sample_pages_save;
-SET SESSION STORAGE_ENGINE=DEFAULT;
+SET SESSION DEFAULT_STORAGE_ENGINE=DEFAULT;
diff --git a/mysql-test/main/index_intersect_innodb.test b/mysql-test/main/index_intersect_innodb.test
index 637056ad795..d1c6ac7fa16 100644
--- a/mysql-test/main/index_intersect_innodb.test
+++ b/mysql-test/main/index_intersect_innodb.test
@@ -1,6 +1,6 @@
--source include/have_innodb.inc
-SET SESSION STORAGE_ENGINE='InnoDB';
+SET SESSION DEFAULT_STORAGE_ENGINE='InnoDB';
set @innodb_stats_persistent_save= @@innodb_stats_persistent;
set @innodb_stats_persistent_sample_pages_save=
@@ -13,4 +13,4 @@ set global innodb_stats_persistent= @innodb_stats_persistent_save;
set global innodb_stats_persistent_sample_pages=
@innodb_stats_persistent_sample_pages_save;
-SET SESSION STORAGE_ENGINE=DEFAULT;
+SET SESSION DEFAULT_STORAGE_ENGINE=DEFAULT;
diff --git a/mysql-test/main/index_merge_innodb.result b/mysql-test/main/index_merge_innodb.result
index e72e2c78d98..775ef3d01e5 100644
--- a/mysql-test/main/index_merge_innodb.result
+++ b/mysql-test/main/index_merge_innodb.result
@@ -2,7 +2,7 @@ connect disable_purge,localhost,root,,;
# Disable the purge of InnoDB history, to make the test run faster.
START TRANSACTION WITH CONSISTENT SNAPSHOT;
connection default;
-SET STORAGE_ENGINE = InnoDB;
+SET DEFAULT_STORAGE_ENGINE = InnoDB;
set @optimizer_switch_save= @@optimizer_switch;
set optimizer_switch='index_merge_sort_intersection=off';
set optimizer_switch='rowid_filter=off';
diff --git a/mysql-test/main/index_merge_innodb.test b/mysql-test/main/index_merge_innodb.test
index 4bdcb17760e..c0918fec79f 100644
--- a/mysql-test/main/index_merge_innodb.test
+++ b/mysql-test/main/index_merge_innodb.test
@@ -19,7 +19,7 @@ connect disable_purge,localhost,root,,;
START TRANSACTION WITH CONSISTENT SNAPSHOT;
connection default;
-SET STORAGE_ENGINE = InnoDB;
+SET DEFAULT_STORAGE_ENGINE = InnoDB;
# InnoDB does not support Merge tables (affects include/index_merge1.inc)
let $merge_table_support= 0;
diff --git a/mysql-test/main/index_merge_myisam.result b/mysql-test/main/index_merge_myisam.result
index 55caf051720..053239b7fb1 100644
--- a/mysql-test/main/index_merge_myisam.result
+++ b/mysql-test/main/index_merge_myisam.result
@@ -1,4 +1,4 @@
-SET STORAGE_ENGINE = MyISAM;
+SET DEFAULT_STORAGE_ENGINE = MyISAM;
set @optimizer_switch_save= @@optimizer_switch;
set optimizer_switch='rowid_filter=off';
set optimizer_switch='index_merge_sort_intersection=off';
@@ -215,7 +215,7 @@ alter table t2 add index i321(key3, key2, key1);
explain select key3 from t2 where key1 = 100 or key2 = 100;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 index_merge i1_3,i2_3 i1_3,i2_3 4,4 NULL 2 Using sort_union(i1_3,i2_3); Using where
-explain select key3 from t2 where key1 < 500 or key2 < 500;
+explain select key3 from t2 where key1 < 600 or key2 < 600;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 index i1_3,i2_3 i321 12 NULL 1024 Using where; Using index
explain select key7 from t2 where key1 <100 or key2 < 100;
@@ -1475,7 +1475,7 @@ EXPLAIN SELECT t1.f1 FROM t1
WHERE (SELECT COUNT(*) FROM t2 WHERE t2.f3 = 'h' AND t2.f2 = t1.f1) = 0 AND t1.f1 = 2;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 system PRIMARY NULL NULL NULL 1
-2 SUBQUERY t2 ref f2,f3 f2 5 const 2 Using where
+2 SUBQUERY t2 ref f2,f3 f3 2 const 2 Using index condition; Using where
DROP TABLE t1,t2;
create table t0 (a int);
insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
diff --git a/mysql-test/main/index_merge_myisam.test b/mysql-test/main/index_merge_myisam.test
index b77c9bc1ca2..10ddbee36b2 100644
--- a/mysql-test/main/index_merge_myisam.test
+++ b/mysql-test/main/index_merge_myisam.test
@@ -10,7 +10,7 @@
# include/index_merge*.inc files
#
-SET STORAGE_ENGINE = MyISAM;
+SET DEFAULT_STORAGE_ENGINE = MyISAM;
# MyISAM supports Merge tables
let $merge_table_support= 1;
diff --git a/mysql-test/main/information_schema.result b/mysql-test/main/information_schema.result
index 9ba19cca7e1..82f04e0aeb1 100644
--- a/mysql-test/main/information_schema.result
+++ b/mysql-test/main/information_schema.result
@@ -10,11 +10,11 @@ grant select, update on test.* to mysqltest_1@localhost;
create user mysqltest_3@localhost;
create user mysqltest_3;
select * from information_schema.SCHEMATA where schema_name > 'm';
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
select schema_name from information_schema.schemata;
schema_name
information_schema
@@ -1580,14 +1580,14 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE b ALL NULL NULL NULL NULL NULL Using where; Open_frm_only; Scanned all databases; Using join buffer (flat, BNL join)
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA
WHERE SCHEMA_NAME = 'mysqltest';
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA
WHERE SCHEMA_NAME = '';
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA
WHERE SCHEMA_NAME = 'test';
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def test latin1 latin1_swedish_ci NULL
select count(*) from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='mysql' AND TABLE_NAME='nonexisting';
count(*)
0
@@ -1632,7 +1632,7 @@ CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME UNIQUE_CONSTRAINT_CATALOG U
select * from `information_schema`.`REFERENTIAL_CONSTRAINTS` where `TABLE_NAME` = NULL;
CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME UNIQUE_CONSTRAINT_CATALOG UNIQUE_CONSTRAINT_SCHEMA UNIQUE_CONSTRAINT_NAME MATCH_OPTION UPDATE_RULE DELETE_RULE TABLE_NAME REFERENCED_TABLE_NAME
select * from information_schema.schemata where schema_name = NULL;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
select * from `information_schema`.`STATISTICS` where `TABLE_SCHEMA` = NULL;
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT INDEX_COMMENT
select * from `information_schema`.`STATISTICS` where `TABLE_NAME` = NULL;
diff --git a/mysql-test/main/information_schema.test b/mysql-test/main/information_schema.test
index c3dbc1f6e6b..17c029bc81f 100644
--- a/mysql-test/main/information_schema.test
+++ b/mysql-test/main/information_schema.test
@@ -1,9 +1,6 @@
# This test uses grants, which can't get tested for embedded server
-- source include/not_embedded.inc
-#Don't run this test when thread_pool active
---source include/not_threadpool.inc
-
# check that CSV engine was compiled in, as the result of the test depends
# on the presence of the log tables (which are CSV-based).
--source include/have_csv.inc
diff --git a/mysql-test/main/information_schema_all_engines-master.opt b/mysql-test/main/information_schema_all_engines-master.opt
index 43411c5033a..7ba5aa5b8b3 100644
--- a/mysql-test/main/information_schema_all_engines-master.opt
+++ b/mysql-test/main/information_schema_all_engines-master.opt
@@ -15,4 +15,3 @@
--loose-innodb-sys-tablestats
--loose-innodb-mutexes
--loose-innodb-tablespaces-encryption
---loose-innodb-tablespaces-scrubbing
diff --git a/mysql-test/main/information_schema_all_engines.result b/mysql-test/main/information_schema_all_engines.result
index 1269972d127..2e377b254e4 100644
--- a/mysql-test/main/information_schema_all_engines.result
+++ b/mysql-test/main/information_schema_all_engines.result
@@ -39,7 +39,6 @@ INNODB_SYS_TABLES
INNODB_SYS_TABLESTATS
INNODB_SYS_VIRTUAL
INNODB_TABLESPACES_ENCRYPTION
-INNODB_TABLESPACES_SCRUBBING
INNODB_TRX
KEYWORDS
KEY_CACHES
@@ -122,7 +121,6 @@ INNODB_SYS_TABLES TABLE_ID
INNODB_SYS_TABLESTATS TABLE_ID
INNODB_SYS_VIRTUAL TABLE_ID
INNODB_TABLESPACES_ENCRYPTION SPACE
-INNODB_TABLESPACES_SCRUBBING SPACE
INNODB_TRX trx_id
KEYWORDS WORD
KEY_CACHES KEY_CACHE_NAME
@@ -205,7 +203,6 @@ INNODB_SYS_TABLES TABLE_ID
INNODB_SYS_TABLESTATS TABLE_ID
INNODB_SYS_VIRTUAL TABLE_ID
INNODB_TABLESPACES_ENCRYPTION SPACE
-INNODB_TABLESPACES_SCRUBBING SPACE
INNODB_TRX trx_id
KEYWORDS WORD
KEY_CACHES KEY_CACHE_NAME
@@ -293,7 +290,6 @@ INNODB_SYS_TABLES information_schema.INNODB_SYS_TABLES 1
INNODB_SYS_TABLESTATS information_schema.INNODB_SYS_TABLESTATS 1
INNODB_SYS_VIRTUAL information_schema.INNODB_SYS_VIRTUAL 1
INNODB_TABLESPACES_ENCRYPTION information_schema.INNODB_TABLESPACES_ENCRYPTION 1
-INNODB_TABLESPACES_SCRUBBING information_schema.INNODB_TABLESPACES_SCRUBBING 1
INNODB_TRX information_schema.INNODB_TRX 1
KEY_CACHES information_schema.KEY_CACHES 1
KEY_COLUMN_USAGE information_schema.KEY_COLUMN_USAGE 1
@@ -364,7 +360,6 @@ Database: information_schema
| INNODB_SYS_TABLESTATS |
| INNODB_SYS_VIRTUAL |
| INNODB_TABLESPACES_ENCRYPTION |
-| INNODB_TABLESPACES_SCRUBBING |
| INNODB_TRX |
| KEYWORDS |
| KEY_CACHES |
@@ -437,7 +432,6 @@ Database: INFORMATION_SCHEMA
| INNODB_SYS_TABLESTATS |
| INNODB_SYS_VIRTUAL |
| INNODB_TABLESPACES_ENCRYPTION |
-| INNODB_TABLESPACES_SCRUBBING |
| INNODB_TRX |
| KEYWORDS |
| KEY_CACHES |
@@ -475,5 +469,5 @@ Wildcard: inf_rmation_schema
| information_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 68
+information_schema 67
mysql 31
diff --git a/mysql-test/main/information_schema_db.result b/mysql-test/main/information_schema_db.result
index bf665da4542..b8a18179e75 100644
--- a/mysql-test/main/information_schema_db.result
+++ b/mysql-test/main/information_schema_db.result
@@ -101,7 +101,7 @@ grant insert on v1 to testdb_2@localhost;
create view v5 as select f1 from t1;
grant select, show view on v5 to testdb_2@localhost;
create definer=`no_such_user`@`no_such_host` view v6 as select f1 from t1;
-ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
+ERROR 42000: Access denied; you need (at least one of) the SUPER, SET USER privilege(s) for this operation
connection default;
use testdb_1;
create view v6 as select f1 from t1;
diff --git a/mysql-test/main/information_schema_db.test b/mysql-test/main/information_schema_db.test
index b244662a28c..7cf8c0801e6 100644
--- a/mysql-test/main/information_schema_db.test
+++ b/mysql-test/main/information_schema_db.test
@@ -2,9 +2,6 @@
# in the embedded server by default). So skip the test in embedded-server mode.
-- source include/not_embedded.inc
-#Don't run this test when thread_pool active
---source include/not_threadpool.inc
-
-- source include/testdb_only.inc
set local sql_mode="";
diff --git a/mysql-test/main/information_schema_stats.result b/mysql-test/main/information_schema_stats.result
index 8e044bc9f96..352bcbab823 100644
--- a/mysql-test/main/information_schema_stats.result
+++ b/mysql-test/main/information_schema_stats.result
@@ -57,12 +57,12 @@ count(*)
3
select * from information_schema.index_statistics where table_schema='test' and table_name='just_a_test';
TABLE_SCHEMA TABLE_NAME INDEX_NAME ROWS_READ
-test just_a_test PRIMARY 5
+test just_a_test PRIMARY 4
test just_a_test first_name 1
test just_a_test state 2
select * from information_schema.table_statistics where table_schema='test' and table_name='just_a_test';
TABLE_SCHEMA TABLE_NAME ROWS_READ ROWS_CHANGED ROWS_CHANGED_X_INDEXES
-test just_a_test 8 5 15
+test just_a_test 7 5 15
drop table just_a_test;
select * from information_schema.index_statistics where table_schema='test' and table_name='just_a_test';
TABLE_SCHEMA TABLE_NAME INDEX_NAME ROWS_READ
diff --git a/mysql-test/main/innodb_ext_key,off.rdiff b/mysql-test/main/innodb_ext_key,off.rdiff
index f4eaa4b112c..4d6c65c9971 100644
--- a/mysql-test/main/innodb_ext_key,off.rdiff
+++ b/mysql-test/main/innodb_ext_key,off.rdiff
@@ -249,7 +249,7 @@
drop table t1,t2,t3;
#
# Bug mdev-4340: performance regression with extended_keys=on
-@@ -710,13 +710,13 @@
+@@ -714,13 +714,13 @@
select * from t1 force index(index_date_updated)
where index_date_updated= 10 and index_id < 800;
id select_type table type possible_keys key key_len ref rows Extra
@@ -265,7 +265,7 @@
drop table t0,t1,t2;
#
# MDEV-11196: Error:Run-Time Check Failure #2 - Stack around the variable 'key_buff'
-@@ -751,13 +751,14 @@
+@@ -755,11 +755,12 @@
"select_id": 1,
"table": {
"table_name": "t1",
@@ -279,12 +279,9 @@
+ "used_key_parts": ["f2"],
+ "ref": ["const"],
"rows": 1,
-- "filtered": 50,
-+ "filtered": 100,
+ "filtered": 100,
"index_condition": "t1.pk1 <= 5 and t1.pk2 <= 5 and t1.f2 = 'abc'",
- "attached_condition": "t1.f1 <= '3'"
- }
-@@ -784,8 +785,8 @@
+@@ -788,8 +789,8 @@
"access_type": "range",
"possible_keys": ["k1"],
"key": "k1",
@@ -293,5 +290,5 @@
+ "key_length": "3007",
+ "used_key_parts": ["pk1", "f2"],
"rows": 1,
- "filtered": 50,
+ "filtered": 100,
"index_condition": "t1.f2 <= 5 and t1.pk2 <= 5 and t1.pk1 = 'abc'",
diff --git a/mysql-test/main/innodb_ext_key.result b/mysql-test/main/innodb_ext_key.result
index 6fba116d35d..0d3e27e5bf0 100644
--- a/mysql-test/main/innodb_ext_key.result
+++ b/mysql-test/main/innodb_ext_key.result
@@ -1,4 +1,4 @@
-SET SESSION STORAGE_ENGINE='InnoDB';
+SET SESSION DEFAULT_STORAGE_ENGINE='InnoDB';
set @innodb_stats_persistent_save= @@innodb_stats_persistent;
set @innodb_stats_persistent_sample_pages_save=
@@innodb_stats_persistent_sample_pages;
@@ -561,6 +561,10 @@ INSERT INTO t2 VALUES
(547118223,998,0,NULL,4,'','',0,0,NULL,NULL,''),(547119246,998,0,NULL,5,'','',0,0,NULL,NULL,''),
(547115155,999,0,NULL,1,'','',0,0,NULL,NULL,''),(547116178,999,0,NULL,2,'','',0,0,NULL,NULL,''),
(547117201,999,0,NULL,3,'','',0,0,NULL,NULL,''),(547118224,999,0,NULL,4,'','',0,0,NULL,NULL,''),
+(547117213,999,0,NULL,3,'','',0,0,NULL,NULL,''),(547117217,999,0,NULL,4,'','',0,0,NULL,NULL,''),
+(547117214,999,0,NULL,3,'','',0,0,NULL,NULL,''),(547117218,999,0,NULL,4,'','',0,0,NULL,NULL,''),
+(547117215,999,0,NULL,3,'','',0,0,NULL,NULL,''),(547117219,999,0,NULL,4,'','',0,0,NULL,NULL,''),
+(547117216,999,0,NULL,3,'','',0,0,NULL,NULL,''),(547117220,999,0,NULL,4,'','',0,0,NULL,NULL,''),
(547119271,38928081,0,NULL,10,'','',0,0,NULL,NULL,''),(547119272,38928081,0,NULL,11,'','',0,0,NULL,NULL,''),
(547119273,38928081,0,NULL,12,'','',0,0,NULL,NULL,''),(547119274,38928081,0,NULL,13,'','',0,0,NULL,NULL,''),
(547119275,38928081,0,NULL,14,'','',0,0,NULL,NULL,''),(547119276,38928081,0,NULL,15,'','',0,0,NULL,NULL,''),
@@ -757,7 +761,7 @@ EXPLAIN
"key_length": "3070",
"used_key_parts": ["f2", "pk1"],
"rows": 1,
- "filtered": 50,
+ "filtered": 100,
"index_condition": "t1.pk1 <= 5 and t1.pk2 <= 5 and t1.f2 = 'abc'",
"attached_condition": "t1.f1 <= '3'"
}
@@ -787,7 +791,7 @@ EXPLAIN
"key_length": "3011",
"used_key_parts": ["pk1", "f2", "pk2"],
"rows": 1,
- "filtered": 50,
+ "filtered": 100,
"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 1ff0ea51990..77eda0df6f6 100644
--- a/mysql-test/main/innodb_ext_key.test
+++ b/mysql-test/main/innodb_ext_key.test
@@ -1,6 +1,6 @@
--source include/innodb_prefix_index_cluster_optimization.inc
-SET SESSION STORAGE_ENGINE='InnoDB';
+SET SESSION DEFAULT_STORAGE_ENGINE='InnoDB';
set @innodb_stats_persistent_save= @@innodb_stats_persistent;
set @innodb_stats_persistent_sample_pages_save=
@@ -414,6 +414,10 @@ INSERT INTO t2 VALUES
(547118223,998,0,NULL,4,'','',0,0,NULL,NULL,''),(547119246,998,0,NULL,5,'','',0,0,NULL,NULL,''),
(547115155,999,0,NULL,1,'','',0,0,NULL,NULL,''),(547116178,999,0,NULL,2,'','',0,0,NULL,NULL,''),
(547117201,999,0,NULL,3,'','',0,0,NULL,NULL,''),(547118224,999,0,NULL,4,'','',0,0,NULL,NULL,''),
+(547117213,999,0,NULL,3,'','',0,0,NULL,NULL,''),(547117217,999,0,NULL,4,'','',0,0,NULL,NULL,''),
+(547117214,999,0,NULL,3,'','',0,0,NULL,NULL,''),(547117218,999,0,NULL,4,'','',0,0,NULL,NULL,''),
+(547117215,999,0,NULL,3,'','',0,0,NULL,NULL,''),(547117219,999,0,NULL,4,'','',0,0,NULL,NULL,''),
+(547117216,999,0,NULL,3,'','',0,0,NULL,NULL,''),(547117220,999,0,NULL,4,'','',0,0,NULL,NULL,''),
(547119271,38928081,0,NULL,10,'','',0,0,NULL,NULL,''),(547119272,38928081,0,NULL,11,'','',0,0,NULL,NULL,''),
(547119273,38928081,0,NULL,12,'','',0,0,NULL,NULL,''),(547119274,38928081,0,NULL,13,'','',0,0,NULL,NULL,''),
(547119275,38928081,0,NULL,14,'','',0,0,NULL,NULL,''),(547119276,38928081,0,NULL,15,'','',0,0,NULL,NULL,''),
diff --git a/mysql-test/main/innodb_icp.result b/mysql-test/main/innodb_icp.result
index 96ff1964ac1..c89d49cad0c 100644
--- a/mysql-test/main/innodb_icp.result
+++ b/mysql-test/main/innodb_icp.result
@@ -1,5 +1,5 @@
-set @save_storage_engine= @@storage_engine;
-set storage_engine=InnoDB;
+set @save_storage_engine= @@default_storage_engine;
+set default_storage_engine=InnoDB;
set @innodb_stats_persistent_save= @@innodb_stats_persistent;
set @innodb_stats_persistent_sample_pages_save=
@@innodb_stats_persistent_sample_pages;
@@ -435,9 +435,9 @@ EXPLAIN
SELECT * FROM t1
WHERE pk IN (SELECT it.pk FROM t2 JOIN t2 AS it ON it.i=it.i WHERE it.pk-t1.i<10);
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t1 ALL NULL NULL NULL NULL 3 Using where
-2 DEPENDENT SUBQUERY it eq_ref PRIMARY PRIMARY 4 func 1 Using where
-2 DEPENDENT SUBQUERY t2 index NULL PRIMARY 4 NULL 3 Using index; Using join buffer (flat, BNL join)
+1 PRIMARY t1 ALL NULL NULL NULL NULL # Using where
+2 DEPENDENT SUBQUERY it eq_ref PRIMARY PRIMARY 4 func # Using where
+2 DEPENDENT SUBQUERY t2 index NULL PRIMARY 4 NULL # Using index; Using join buffer (flat, BNL join)
SELECT * FROM t1
WHERE pk IN (SELECT it.pk FROM t2 JOIN t2 AS it ON it.i=it.i WHERE it.pk-t1.i<10);
pk i
@@ -658,7 +658,7 @@ SELECT * FROM t1
WHERE NOT(b = 'Texas') AND b BETWEEN 'wy' AND 'y' OR b = 'Pennsylvania'
ORDER BY a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL b NULL NULL NULL # Using where; Using filesort
+1 SIMPLE t1 range b b 13 NULL # Using where; Rowid-ordered scan; Using filesort
SELECT * FROM t1
WHERE NOT(b = 'Texas') AND b BETWEEN 'wy' AND 'y' OR b = 'Pennsylvania'
ORDER BY a;
@@ -670,7 +670,7 @@ SELECT * FROM t1
WHERE NOT(b = 'Texas') AND b BETWEEN 'wy' AND 'y' OR b = 'Pennsylvania'
ORDER BY a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL b NULL NULL NULL # Using where; Using filesort
+1 SIMPLE t1 range b b 13 NULL # Using index condition; Rowid-ordered scan; Using filesort
SELECT * FROM t1
WHERE NOT(b = 'Texas') AND b BETWEEN 'wy' AND 'y' OR b = 'Pennsylvania'
ORDER BY a;
@@ -682,16 +682,18 @@ DROP TABLE t1;
#
CREATE TABLE t1 (b int NOT NULL, c int, a varchar(1024), PRIMARY KEY (b));
INSERT INTO t1 VALUES (1,4,'Ill');
+insert into t1 select seq+100,5,seq from seq_1_to_100;
CREATE TABLE t2 (a varchar(1024), KEY (a(512)));
INSERT INTO t2 VALUES
('Ill'), ('eckqzsflbzaffti'), ('w'), ('she'), ('gxbwypqtjzwywwer'), ('w');
+insert into t2 select seq from seq_1_to_100;
SET SESSION optimizer_switch='index_condition_pushdown=off';
EXPLAIN
SELECT t1.b, t1.c FROM t1, t2 WHERE t1.a = t2.a AND (t1.b<0 OR t1.b>0)
HAVING t1.c != 5 ORDER BY t1.c;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 1 Using where; Using filesort
-1 SIMPLE t2 ref a a 515 test.t1.a 1 Using where
+1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL # Using where; Using filesort
+1 SIMPLE t2 ref a a 515 test.t1.a # Using where
SELECT t1.b, t1.c FROM t1, t2 WHERE t1.a = t2.a AND (t1.b<0 OR t1.b>0)
HAVING t1.c != 5 ORDER BY t1.c;
b c
@@ -701,8 +703,8 @@ EXPLAIN
SELECT t1.b, t1.c FROM t1, t2 WHERE t1.a = t2.a AND (t1.b<0 OR t1.b>0)
HAVING t1.c != 5 ORDER BY t1.c;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 1 Using where; Using filesort
-1 SIMPLE t2 ref a a 515 test.t1.a 1 Using where
+1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL # Using where; Using filesort
+1 SIMPLE t2 ref a a 515 test.t1.a # Using where
SELECT t1.b, t1.c FROM t1, t2 WHERE t1.a = t2.a AND (t1.b<0 OR t1.b>0)
HAVING t1.c != 5 ORDER BY t1.c;
b c
@@ -963,7 +965,7 @@ pk key1 key2
142 frequent-val rare-42
drop table t1, t2;
set optimizer_switch=@innodb_icp_tmp;
-set storage_engine= @save_storage_engine;
+set default_storage_engine= @save_storage_engine;
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/innodb_icp.test b/mysql-test/main/innodb_icp.test
index 9081b886224..d1f188afd64 100644
--- a/mysql-test/main/innodb_icp.test
+++ b/mysql-test/main/innodb_icp.test
@@ -5,8 +5,8 @@
--source include/have_innodb.inc
--source include/default_optimizer_switch.inc
-set @save_storage_engine= @@storage_engine;
-set storage_engine=InnoDB;
+set @save_storage_engine= @@default_storage_engine;
+set default_storage_engine=InnoDB;
set @innodb_stats_persistent_save= @@innodb_stats_persistent;
set @innodb_stats_persistent_sample_pages_save=
@@ -82,7 +82,7 @@ drop table t1, t2;
set optimizer_switch=@innodb_icp_tmp;
-set storage_engine= @save_storage_engine;
+set default_storage_engine= @save_storage_engine;
set global innodb_stats_persistent= @innodb_stats_persistent_save;
set global innodb_stats_persistent_sample_pages=
diff --git a/mysql-test/main/innodb_mrr_cpk.result b/mysql-test/main/innodb_mrr_cpk.result
index a2e43d7d127..8b9260f4596 100644
--- a/mysql-test/main/innodb_mrr_cpk.result
+++ b/mysql-test/main/innodb_mrr_cpk.result
@@ -3,8 +3,8 @@ set @innodb_mrr_cpk_tmp=@@optimizer_switch;
set optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
set @save_join_cache_level=@@join_cache_level;
set join_cache_level=6;
-set @save_storage_engine=@@storage_engine;
-set storage_engine=innodb;
+set @save_storage_engine=@@default_storage_engine;
+set default_storage_engine=innodb;
create table t0(a int);
insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
create table t1(a char(8), b char(8), filler char(100), primary key(a));
@@ -234,5 +234,5 @@ drop table t0,t1,t2;
# This must be at the end:
#
set @@join_cache_level= @save_join_cache_level;
-set storage_engine=@save_storage_engine;
+set default_storage_engine=@save_storage_engine;
set optimizer_switch=@innodb_mrr_cpk_tmp;
diff --git a/mysql-test/main/innodb_mrr_cpk.test b/mysql-test/main/innodb_mrr_cpk.test
index cb79c238f2b..cbebafd3053 100644
--- a/mysql-test/main/innodb_mrr_cpk.test
+++ b/mysql-test/main/innodb_mrr_cpk.test
@@ -23,8 +23,8 @@ set optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
set @save_join_cache_level=@@join_cache_level;
set join_cache_level=6;
-set @save_storage_engine=@@storage_engine;
-set storage_engine=innodb;
+set @save_storage_engine=@@default_storage_engine;
+set default_storage_engine=innodb;
create table t0(a int);
insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
@@ -225,5 +225,5 @@ drop table t0,t1,t2;
--echo #
set @@join_cache_level= @save_join_cache_level;
-set storage_engine=@save_storage_engine;
+set default_storage_engine=@save_storage_engine;
set optimizer_switch=@innodb_mrr_cpk_tmp;
diff --git a/mysql-test/main/innodb_mysql_lock2.result b/mysql-test/main/innodb_mysql_lock2.result
index 608cbec88c5..ffbe3f8a406 100644
--- a/mysql-test/main/innodb_mysql_lock2.result
+++ b/mysql-test/main/innodb_mysql_lock2.result
@@ -238,8 +238,7 @@ Success: 'show keys from t1' doesn't take row locks on 't1'.
# statement-by-statement) and thanks to MVCC we can always get
# versions of rows prior to the update that has locked them.
# But in practice InnoDB does locking reads for all statements
-# other than SELECT (unless it is a READ-COMITTED mode or
-# innodb_locks_unsafe_for_binlog is ON).
+# other than SELECT (unless READ UNCOMMITTED or READ COMMITTED).
connection default;
Success: 'call p1((select i + 5 from t1 where i = 1))' takes shared row locks on 't1'.
#
diff --git a/mysql-test/main/innodb_mysql_lock2.test b/mysql-test/main/innodb_mysql_lock2.test
index f319fe23568..b983fd8dc7a 100644
--- a/mysql-test/main/innodb_mysql_lock2.test
+++ b/mysql-test/main/innodb_mysql_lock2.test
@@ -261,8 +261,7 @@ let $statement= show keys from t1;
--echo # statement-by-statement) and thanks to MVCC we can always get
--echo # versions of rows prior to the update that has locked them.
--echo # But in practice InnoDB does locking reads for all statements
---echo # other than SELECT (unless it is a READ-COMITTED mode or
---echo # innodb_locks_unsafe_for_binlog is ON).
+--echo # other than SELECT (unless READ UNCOMMITTED or READ COMMITTED).
let $statement= call p1((select i + 5 from t1 where i = 1));
let $wait_statement= $statement;
--source include/check_shared_row_lock.inc
diff --git a/mysql-test/main/innodb_mysql_sync.result b/mysql-test/main/innodb_mysql_sync.result
index 3f284edde86..46ed7d43830 100644
--- a/mysql-test/main/innodb_mysql_sync.result
+++ b/mysql-test/main/innodb_mysql_sync.result
@@ -450,6 +450,8 @@ info: Records: 0 Duplicates: 0 Warnings: 0
#table copy when the old_alter_table enabled.
SET SESSION old_alter_table= TRUE;
affected rows: 0
+Warnings:
+Warning 1287 '@@old_alter_table' is deprecated and will be removed in a future release. Please use '@@alter_algorithm' instead
ALTER TABLE t1 FORCE;
affected rows: 1
info: Records: 1 Duplicates: 0 Warnings: 0
@@ -474,6 +476,8 @@ SET DEBUG_SYNC= 'RESET';
affected rows: 0
SET SESSION old_alter_table= FALSE;
affected rows: 0
+Warnings:
+Warning 1287 '@@old_alter_table' is deprecated and will be removed in a future release. Please use '@@alter_algorithm' instead
#ALTER TABLE FORCE and ALTER TABLE ENGINE uses table copy
#when ALGORITHM COPY is used.
ALTER TABLE t1 FORCE, ALGORITHM= COPY;
diff --git a/mysql-test/main/insert.result b/mysql-test/main/insert.result
index 4aea81262d2..d8f40b7383a 100644
--- a/mysql-test/main/insert.result
+++ b/mysql-test/main/insert.result
@@ -751,3 +751,19 @@ REPLACE INTO v1 SET f = NULL;
ERROR 22007: Truncated incorrect DOUBLE value: 'foo'
DROP VIEW v1;
DROP TABLE t1;
+create table t1 (a int default 5);
+insert t1 values (1);
+insert t1 values (a);
+insert t1 values ((select a+1));
+insert t1 set a=2;
+insert t1 set a=a+2;
+insert t1 set a=(select a+3);
+select * from t1;
+a
+1
+5
+6
+2
+7
+8
+drop table t1;
diff --git a/mysql-test/main/insert.test b/mysql-test/main/insert.test
index e00c9cd7a0d..4ccaa20ece8 100644
--- a/mysql-test/main/insert.test
+++ b/mysql-test/main/insert.test
@@ -612,3 +612,16 @@ CREATE VIEW v1 AS SELECT * FROM t1 WHERE f <=> 'foo' WITH CHECK OPTION;
REPLACE INTO v1 SET f = NULL;
DROP VIEW v1;
DROP TABLE t1;
+
+#
+# outer referencesin subqueries in INSERT
+#
+create table t1 (a int default 5);
+insert t1 values (1);
+insert t1 values (a);
+insert t1 values ((select a+1));
+insert t1 set a=2;
+insert t1 set a=a+2;
+insert t1 set a=(select a+3);
+select * from t1;
+drop table t1;
diff --git a/mysql-test/main/insert_returning.result b/mysql-test/main/insert_returning.result
new file mode 100644
index 00000000000..a3cde7b1270
--- /dev/null
+++ b/mysql-test/main/insert_returning.result
@@ -0,0 +1,617 @@
+# Test for INSERT...RETURNING
+CREATE TABLE t1(id1 INT PRIMARY KEY AUTO_INCREMENT, val1 VARCHAR(1));
+CREATE TABLE t2(id2 INT PRIMARY KEY AUTO_INCREMENT, val2 VARCHAR(1));
+CREATE VIEW v1 AS SELECT id1, val1 FROM t1;
+CREATE VIEW v2 AS SELECT id2,val2 FROM t2;
+INSERT INTO t2 VALUES (1,'a'),(2,'b'),(3,'c');
+CREATE FUNCTION f(arg INT) RETURNS TEXT
+BEGIN
+RETURN (SELECT arg+arg);
+END|
+#
+# Simple insert statement...RETURNING
+#
+INSERT INTO t1 (id1, val1) VALUES (1, 'a');
+INSERT INTO t1 (id1, val1) VALUES (2, 'b') RETURNING *;
+id1 val1
+2 b
+INSERT INTO t1 (id1, val1) VALUES (3, 'c') RETURNING id1+id1 as total,val1,
+id1 && id1, id1 | id1, UPPER(val1),f(id1);
+total val1 id1 && id1 id1 | id1 UPPER(val1) f(id1)
+6 c 1 3 C 6
+INSERT INTO t1(id1,val1) VALUES (4,'d') RETURNING(SELECT GROUP_CONCAT(val2)
+FROM t2 WHERE id2=1);
+(SELECT GROUP_CONCAT(val2)
+FROM t2 WHERE id2=1)
+a
+INSERT INTO t1(id1,val1) VALUES(5,'e') RETURNING(SELECT GROUP_CONCAT(val2)
+FROM t2 GROUP BY id2 HAVING id2=id1-2);
+(SELECT GROUP_CONCAT(val2)
+FROM t2 GROUP BY id2 HAVING id2=id1-2)
+c
+PREPARE stmt FROM "INSERT INTO t1 (id1,val1) VALUES (6,'f') RETURNING (SELECT id2 FROM t2 WHERE val2='b')";
+EXECUTE stmt;
+(SELECT id2 FROM t2 WHERE val2='b')
+2
+DELETE FROM t1 WHERE id1=6;
+SELECT * FROM t1;
+id1 val1
+1 a
+2 b
+3 c
+4 d
+5 e
+EXECUTE stmt;
+(SELECT id2 FROM t2 WHERE val2='b')
+2
+DEALLOCATE PREPARE stmt;
+INSERT IGNORE INTO t1(id1,val1) VALUES (7,'h') RETURNING *;
+id1 val1
+7 h
+SELECT * FROM t1;
+id1 val1
+1 a
+2 b
+3 c
+4 d
+5 e
+6 f
+7 h
+EXPLAIN INSERT INTO t1(id1,val1) VALUES (8,'i') RETURNING *;
+id select_type table type possible_keys key key_len ref rows Extra
+1 INSERT t1 ALL NULL NULL NULL NULL NULL NULL
+EXPLAIN EXTENDED INSERT INTO t1(id1,val1) VALUES(9,'j') RETURNING id1;
+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
+EXPLAIN FORMAT="json" INSERT INTO t1(id1,val1) VALUES (10,'k') RETURNING id1;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t1"
+ }
+ }
+}
+SELECT * FROM t1;
+id1 val1
+1 a
+2 b
+3 c
+4 d
+5 e
+6 f
+7 h
+INSERT INTO v1(id1, val1) VALUES (12, 'a') RETURNING id1+id1 as total,val1,
+id1 && id1, id1 id1, UPPER(val1),f(id1);
+total val1 id1 && id1 id1 UPPER(val1) f(id1)
+24 a 1 12 A 24
+ANALYZE INSERT INTO t1(id1,val1) VALUES(13,'l') RETURNING *;
+id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
+1 INSERT t1 ALL NULL NULL NULL NULL NULL NULL 100.00 100.00 NULL
+INSERT INTO t1(id1,val1) VALUES(14,'m') RETURNING t1.*;
+id1 val1
+14 m
+TRUNCATE TABLE t1;
+#
+# Multiple values in one insert statement...RETURNING
+#
+INSERT INTO t1 VALUES (1,'a'),(2,'b');
+INSERT INTO t1 VALUES (3,'c'),(4,'d') RETURNING *;
+id1 val1
+3 c
+4 d
+INSERT INTO t1 VALUES (5,'e'),(6,'f') RETURNING id1 as id,val1,
+id1 && id1, id1|id1, UPPER(val1),f(id1);
+id val1 id1 && id1 id1|id1 UPPER(val1) f(id1)
+5 e 1 5 E 10
+6 f 1 6 F 12
+INSERT INTO t1 VALUES (7,'g'),(8,'h') RETURNING(SELECT GROUP_CONCAT(val2)
+FROM t2 WHERE id2=1);
+(SELECT GROUP_CONCAT(val2)
+FROM t2 WHERE id2=1)
+a
+a
+INSERT INTO t1 VALUES (9,'i'),(10,'j') RETURNING(SELECT GROUP_CONCAT(val2)
+FROM t2 GROUP BY id2 HAVING id2=id1-8);
+(SELECT GROUP_CONCAT(val2)
+FROM t2 GROUP BY id2 HAVING id2=id1-8)
+a
+b
+PREPARE stmt FROM "INSERT INTO t1 VALUES (11,'k'),(12,'l') RETURNING (SELECT id2 FROM t2 WHERE val2='b')";
+EXECUTE stmt;
+(SELECT id2 FROM t2 WHERE val2='b')
+2
+2
+DELETE FROM t1 WHERE val1 IN ('k','l');
+SELECT * FROM t1;
+id1 val1
+1 a
+2 b
+3 c
+4 d
+5 e
+6 f
+7 g
+8 h
+9 i
+10 j
+EXECUTE stmt;
+(SELECT id2 FROM t2 WHERE val2='b')
+2
+2
+DEALLOCATE PREPARE stmt;
+INSERT IGNORE INTO t1 VALUES(13,'o'),(14,'p') RETURNING *;
+id1 val1
+13 o
+14 p
+EXPLAIN INSERT INTO t1 VALUES(15,'q'),(16,'r') RETURNING *;
+id select_type table type possible_keys key key_len ref rows Extra
+1 INSERT t1 ALL NULL NULL NULL NULL NULL NULL
+EXPLAIN EXTENDED INSERT INTO t1 VALUES (17,'s'),(18,'t') RETURNING *;
+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
+EXPLAIN FORMAT="json" INSERT INTO t1 VALUES(19,'u'),(20,'v') RETURNING id1;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t1"
+ }
+ }
+}
+SELECT * FROM t1;
+id1 val1
+1 a
+2 b
+3 c
+4 d
+5 e
+6 f
+7 g
+8 h
+9 i
+10 j
+12 l
+11 k
+13 o
+14 p
+INSERT INTO v1 VALUES(23,'y'),(24,'z') RETURNING id1 as id,val1,
+id1 && id1, id1|id1, UPPER(val1),f(id1);
+id val1 id1 && id1 id1|id1 UPPER(val1) f(id1)
+23 y 1 23 Y 46
+24 z 1 24 Z 48
+ANALYZE INSERT INTO t1 VALUES(25,'a'),(26,'b') RETURNING *;
+id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
+1 INSERT t1 ALL NULL NULL NULL NULL NULL NULL 100.00 100.00 NULL
+ANALYZE INSERT INTO t1 VALUES(27,'c'),(28,'d') RETURNING t1.*;
+id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
+1 INSERT t1 ALL NULL NULL NULL NULL NULL NULL 100.00 100.00 NULL
+#
+# INSERT...ON DUPLICATE KEY UPDATE...RETURNING
+#
+CREATE TABLE ins_duplicate (id INT PRIMARY KEY AUTO_INCREMENT, val VARCHAR(1));
+INSERT INTO ins_duplicate VALUES (1,'a');
+INSERT INTO ins_duplicate VALUES (2,'b') ON DUPLICATE KEY UPDATE val='b'
+RETURNING *;
+id val
+2 b
+INSERT INTO ins_duplicate VALUES (2,'b') ON DUPLICATE KEY UPDATE val='c'
+RETURNING id+id AS total, val, id && id, id|id, UPPER(val),f(id);
+total val id && id id|id UPPER(val) f(id)
+4 c 1 2 C 4
+INSERT INTO ins_duplicate VALUES (2,'b') ON DUPLICATE KEY UPDATE val='d'
+RETURNING (SELECT GROUP_CONCAT(val2) FROM t2 WHERE id2=1);
+(SELECT GROUP_CONCAT(val2) FROM t2 WHERE id2=1)
+a
+INSERT INTO ins_duplicate VALUES (2,'b') ON DUPLICATE KEY UPDATE val='e'
+RETURNING (SELECT GROUP_CONCAT(val2) FROM t2 GROUP BY id2 HAVING id2=id);
+(SELECT GROUP_CONCAT(val2) FROM t2 GROUP BY id2 HAVING id2=id)
+b
+PREPARE stmt FROM "INSERT INTO ins_duplicate VALUES (2,'b') ON DUPLICATE
+KEY UPDATE val='f' RETURNING (SELECT id2 FROM t2 WHERE val2='b')";
+EXECUTE stmt;
+(SELECT id2 FROM t2 WHERE val2='b')
+2
+SELECT * FROM t2;
+id2 val2
+1 a
+2 b
+3 c
+EXECUTE stmt;
+(SELECT id2 FROM t2 WHERE val2='b')
+2
+DEALLOCATE PREPARE stmt;
+INSERT IGNORE INTO ins_duplicate(id,val) VALUES (3,'c'),(4,'d') ON DUPLICATE
+KEY UPDATE val='g' RETURNING id;
+id
+3
+4
+EXPLAIN INSERT INTO ins_duplicate(id,val) VALUES (2,'b') ON DUPLICATE KEY
+UPDATE val='h' RETURNING val;
+id select_type table type possible_keys key key_len ref rows Extra
+1 INSERT ins_duplicate ALL NULL NULL NULL NULL NULL NULL
+EXPLAIN EXTENDED INSERT INTO ins_duplicate(id,val) VALUES (2,'b')
+ON DUPLICATE KEY UPDATE val='i' RETURNING val;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 INSERT ins_duplicate ALL NULL NULL NULL NULL NULL 100.00 NULL
+EXPLAIN FORMAT="json" INSERT INTO ins_duplicate(id,val) VALUES (2,'b')
+ON DUPLICATE KEY UPDATE val='j' RETURNING val;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "ins_duplicate"
+ }
+ }
+}
+INSERT INTO v1(id1, val1) VALUES (2,'d') ON DUPLICATE KEY UPDATE
+val1='d' RETURNING id1+id1 AS total, val1, id1 && id1, id1|id1, UPPER(val1),
+f(id1);
+total val1 id1 && id1 id1|id1 UPPER(val1) f(id1)
+4 d 1 2 D 4
+ANALYZE INSERT INTO ins_duplicate(id,val) VALUES(2,'b') ON DUPLICATE KEY UPDATE
+val='k' RETURNING *;
+id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
+1 INSERT ins_duplicate ALL NULL NULL NULL NULL NULL NULL 100.00 100.00 NULL
+INSERT INTO ins_duplicate(id,val) VALUES(2,'b') ON DUPLICATE KEY UPDATE
+val='l' RETURNING ins_duplicate.*;
+id val
+2 l
+SELECT * FROM ins_duplicate;
+id val
+1 a
+2 l
+3 c
+4 d
+#
+# INSERT...SET...RETURNING
+#
+TRUNCATE TABLE t1;
+INSERT INTO t1 SET id1= 1, val1= 'a';
+INSERT INTO t1 SET id1= 2, val1= 'b' RETURNING *;
+id1 val1
+2 b
+INSERT INTO t1 SET id1= 3, val1= 'c' RETURNING id1+id1 AS total,val1,
+id1 && id1, id1|id1, UPPER(val1),f(id1);
+total val1 id1 && id1 id1|id1 UPPER(val1) f(id1)
+6 c 1 3 C 6
+INSERT INTO t1 SET id1= 4, val1= 'd' RETURNING (SELECT GROUP_CONCAT(val2)
+FROM t2 WHERE id2=1);
+(SELECT GROUP_CONCAT(val2)
+FROM t2 WHERE id2=1)
+a
+INSERT INTO t1 SET id1= 5, val1='e' RETURNING (SELECT GROUP_CONCAT(val2)
+FROM t2 GROUP BY id2 HAVING id2=id1-3);
+(SELECT GROUP_CONCAT(val2)
+FROM t2 GROUP BY id2 HAVING id2=id1-3)
+b
+PREPARE stmt FROM "INSERT INTO t1 SET id1= 6, val1='f' RETURNING (SELECT id2 FROM t2 WHERE val2='b')";
+EXECUTE stmt;
+(SELECT id2 FROM t2 WHERE val2='b')
+2
+DELETE FROM t1 WHERE val1='f';
+SELECT * FROM t1;
+id1 val1
+1 a
+2 b
+3 c
+4 d
+5 e
+EXECUTE stmt;
+(SELECT id2 FROM t2 WHERE val2='b')
+2
+DEALLOCATE PREPARE stmt;
+INSERT INTO t1 SET id1= 7, val1= 'g' RETURNING f(id1);
+f(id1)
+14
+INSERT INTO t1 SET val1= 'n' RETURNING *;
+id1 val1
+8 n
+INSERT IGNORE INTO t1 SET id1= 8, val1= 'h' RETURNING *;
+id1 val1
+Warnings:
+Warning 1062 Duplicate entry '8' for key 'PRIMARY'
+EXPLAIN INSERT INTO t1 SET id1=9, val1='i' RETURNING id1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 INSERT t1 ALL NULL NULL NULL NULL NULL NULL
+EXPLAIN EXTENDED INSERT INTO t1 SET id1=10, val1='j' RETURNING val1;
+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
+EXPLAIN FORMAT="json" INSERT INTO t1 SET id1=11, val1='k' RETURNING val1;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t1"
+ }
+ }
+}
+INSERT INTO v1 SET id1=26, val1='Z' RETURNING id1+id1 AS total,val1,
+id1 && id1, id1|id1, UPPER(val1),f(id1);
+total val1 id1 && id1 id1|id1 UPPER(val1) f(id1)
+52 Z 1 26 Z 52
+ANALYZE INSERT INTO t1 SET id1=12, val1='l' RETURNING *;
+id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
+1 INSERT t1 ALL NULL NULL NULL NULL NULL NULL 100.00 100.00 NULL
+INSERT INTO t1 SET id1= 13, val1= 'm' RETURNING t1.*;
+id1 val1
+13 m
+SELECT * FROM t1;
+id1 val1
+1 a
+2 b
+3 c
+4 d
+5 e
+6 f
+7 g
+8 n
+26 Z
+12 l
+13 m
+#
+# INSERT...SELECT...RETURNING
+#
+TRUNCATE TABLE t2;
+INSERT INTO t2(id2,val2) SELECT * FROM t1;
+TRUNCATE TABLE t2;
+INSERT INTO t2 SELECT * FROM t1 WHERE id1=1 RETURNING *;
+id2 val2
+1 a
+INSERT INTO t2 SELECT * FROM t1 WHERE id1=2 RETURNING id2+id2 AS total,
+val2,id2 && id2, id2|id2, UPPER(val2),f(id2);
+total val2 id2 && id2 id2|id2 UPPER(val2) f(id2)
+4 b 1 2 B 4
+INSERT INTO t2 SELECT * FROM t1 WHERE id1=3 RETURNING (SELECT GROUP_CONCAT(val1) FROM t1 GROUP BY id1 HAVING id1=id1+1);
+(SELECT GROUP_CONCAT(val1) FROM t1 GROUP BY id1 HAVING id1=id1+1)
+NULL
+PREPARE stmt FROM "INSERT INTO t2 SELECT * FROM t1 WHERE id1=4 RETURNING (SELECT id1 FROM t1 WHERE val1='b')";
+EXECUTE stmt;
+(SELECT id1 FROM t1 WHERE val1='b')
+2
+DELETE FROM t2 WHERE id2=4;
+SELECT * FROM t1;
+id1 val1
+1 a
+2 b
+3 c
+4 d
+5 e
+6 f
+7 g
+8 n
+26 Z
+12 l
+13 m
+EXECUTE stmt;
+(SELECT id1 FROM t1 WHERE val1='b')
+2
+DEALLOCATE PREPARE stmt;
+INSERT INTO t2 SELECT * FROM t1 WHERE id1=6 RETURNING
+(SELECT id1+id2 FROM t1 WHERE id1=1);
+(SELECT id1+id2 FROM t1 WHERE id1=1)
+7
+INSERT INTO t2 SELECT * FROM t1 WHERE id1=7 RETURNING f(id2);
+f(id2)
+14
+EXPLAIN INSERT INTO t2 SELECT * FROM t1 WHERE id1=8 RETURNING id2;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 const PRIMARY PRIMARY 4 const 1
+EXPLAIN EXTENDED INSERT INTO t1 SELECT * FROM t1 WHERE id1=9 RETURNING val1;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+EXPLAIN FORMAT="json" INSERT INTO t1 SELECT * FROM t1 WHERE id1=10 RETURNING val1;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "message": "Impossible WHERE noticed after reading const tables"
+ }
+ }
+}
+INSERT IGNORE INTO t2 SELECT * FROM t1 WHERE id1=8 RETURNING *;
+id2 val2
+8 n
+INSERT IGNORE INTO v2 SELECT * FROM v1 RETURNING *;
+id2 val2
+5 e
+26 Z
+12 l
+13 m
+Warnings:
+Warning 1062 Duplicate entry '1' for key 'PRIMARY'
+Warning 1062 Duplicate entry '2' for key 'PRIMARY'
+Warning 1062 Duplicate entry '3' for key 'PRIMARY'
+Warning 1062 Duplicate entry '4' for key 'PRIMARY'
+Warning 1062 Duplicate entry '6' for key 'PRIMARY'
+Warning 1062 Duplicate entry '7' for key 'PRIMARY'
+Warning 1062 Duplicate entry '8' for key 'PRIMARY'
+ANALYZE INSERT INTO t2 SELECT * FROM t1 WHERE id1=11 RETURNING *;
+id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
+1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL no matching row in const table
+SELECT * FROM t2;
+id2 val2
+1 a
+2 b
+3 c
+4 d
+6 f
+7 g
+8 n
+5 e
+26 Z
+12 l
+13 m
+TRUNCATE TABLE t2;
+INSERT INTO t2 SELECT * FROM t1 WHERE id1=1 RETURNING t2.*;
+id2 val2
+1 a
+INSERT INTO t2 SELECT t1.* FROM t1 WHERE id1=2 RETURNING t2.*;
+id2 val2
+2 b
+SELECT * FROM t2;
+id2 val2
+1 a
+2 b
+DROP TABLE t1;
+DROP TABLE t2;
+DROP TABLE ins_duplicate;
+#
+# Error message test
+#
+CREATE TABLE t1(id1 INT,val1 VARCHAR(1));
+CREATE TABLE t2(id2 INT,val2 VARCHAR(1));
+CREATE TABLE ins_duplicate (id INT PRIMARY KEY, val VARCHAR(1));
+INSERT INTO t1 VALUES(1,'a'),(2,'b'),(3,'c');
+#
+# SIMLPE INSERT STATEMENT
+#
+INSERT INTO t2(id2,val2) VALUES(1,'a') RETURNING id1;
+ERROR 42S22: Unknown column 'id1' in 'field list'
+INSERT INTO t2(id2,val2) values(2,'b') RETURNING SUM(id2);
+ERROR HY000: Invalid use of group function
+INSERT INTO t2(id2,val2) VALUES(3,'c') RETURNING (SELECT id1 FROM t1);
+ERROR 21000: Subquery returns more than 1 row
+INSERT INTO t2(id2,val2) VALUES(4,'d') RETURNING (SELECT * FROM t1);
+ERROR 21000: Operand should contain 1 column(s)
+INSERT INTO t2(id2,val2) VALUES(4,'d') RETURNING (SELECT * FROM t2);
+ERROR 21000: Operand should contain 1 column(s)
+INSERT INTO t2(id2,val2) VALUES(5,'e') RETURNING id2, (SELECT id1+id2 FROM
+t1 WHERE id1=1);
+id2 (SELECT id1+id2 FROM
+t1 WHERE id1=1)
+5 6
+INSERT INTO t2(id2,val2) VALUES(5,'f') RETURNING (SELECT id2 FROM t2);
+ERROR HY000: Table 't2' is specified twice, both as a target for 'INSERT' and as a separate source for data
+INSERT INTO t2 (id2, val2) VALUES (6,'f') RETURNING t1.*;
+ERROR 42S02: Unknown table 'test.t1'
+#
+# Multiple rows in single insert statement
+#
+INSERT INTO t2 VALUES(1,'a'),(2,'b') RETURNING id1;
+ERROR 42S22: Unknown column 'id1' in 'field list'
+INSERT INTO t2 VALUES(3,'c'),(4,'d') RETURNING MAX(id2);
+ERROR HY000: Invalid use of group function
+INSERT INTO t2 VALUES(5,'c'),(6,'f') RETURNING (SELECT id1 FROM t1);
+ERROR 21000: Subquery returns more than 1 row
+INSERT INTO t2 VALUES(7,'g'),(8,'h') RETURNING (SELECT * FROM t1);
+ERROR 21000: Operand should contain 1 column(s)
+INSERT INTO t2 VALUES(9,'g'),(10,'h') RETURNING (SELECT * FROM t2);
+ERROR 21000: Operand should contain 1 column(s)
+INSERT INTO t2 VALUES(11,'e'),(12,'f') RETURNING id2, (SELECT id1+id2 FROM
+t1 WHERE id1=1);
+id2 (SELECT id1+id2 FROM
+t1 WHERE id1=1)
+11 12
+12 13
+INSERT INTO t2 VALUES(13,'f'),(14,'g') RETURNING (SELECT id2 FROM t2);
+ERROR HY000: Table 't2' is specified twice, both as a target for 'INSERT' and as a separate source for data
+INSERT INTO t2 VALUES(13,'f'),(14,'g') RETURNING t1.*;
+ERROR 42S02: Unknown table 'test.t1'
+#
+# INSERT ... SET
+#
+INSERT INTO t2 SET id2=1, val2='a' RETURNING id1;
+ERROR 42S22: Unknown column 'id1' in 'field list'
+INSERT INTO t2 SET id2=2, val2='b' RETURNING COUNT(id2);
+ERROR HY000: Invalid use of group function
+INSERT INTO t2 SET id2=3, val2='c' RETURNING (SELECT id1 FROM t1);
+ERROR 21000: Subquery returns more than 1 row
+INSERT INTO t2 SET id2=4, val2='d' RETURNING (SELECT * FROM t1);
+ERROR 21000: Operand should contain 1 column(s)
+INSERT INTO t2 SET id2=4, val2='d' RETURNING (SELECT * FROM t2);
+ERROR 21000: Operand should contain 1 column(s)
+INSERT INTO t2 SET id2=5, val2='e' RETURNING id2, (SELECT id1+id2 FROM t1
+WHERE id1=1);
+id2 (SELECT id1+id2 FROM t1
+WHERE id1=1)
+5 6
+INSERT INTO t2 SET id2=5, val2='f' RETURNING (SELECT id2 FROM t2);
+ERROR HY000: Table 't2' is specified twice, both as a target for 'INSERT' and as a separate source for data
+INSERT INTO t2 SET id2=5, val2='f' RETURNING t1.*;
+ERROR 42S02: Unknown table 'test.t1'
+#
+# INSERT...ON DUPLICATE KEY UPDATE
+#
+INSERT INTO ins_duplicate VALUES (2,'b') ON DUPLICATE KEY UPDATE val='b'
+RETURNING id1;
+ERROR 42S22: Unknown column 'id1' in 'field list'
+INSERT INTO ins_duplicate VALUES (2,'b') ON DUPLICATE KEY UPDATE val='b'
+RETURNING MAX(id);
+ERROR HY000: Invalid use of group function
+INSERT INTO ins_duplicate VALUES (2,'b') ON DUPLICATE KEY UPDATE val='b'
+RETURNING (SELECT id1 FROM t1);
+ERROR 21000: Subquery returns more than 1 row
+INSERT INTO ins_duplicate VALUES (2,'b') ON DUPLICATE KEY UPDATE val='b'
+RETURNING (SELECT * FROM t1);
+ERROR 21000: Operand should contain 1 column(s)
+INSERT INTO ins_duplicate VALUES (2,'b') ON DUPLICATE KEY UPDATE val='b'
+RETURNING (SELECT * FROM ins_duplicate);
+ERROR 21000: Operand should contain 1 column(s)
+INSERT INTO ins_duplicate VALUES(2,'b') ON DUPLICATE KEY UPDATE val='b'
+RETURNING id2, (SELECT id1+id FROM t1 WHERE id1=1);
+ERROR 42S22: Unknown column 'id2' in 'field list'
+INSERT INTO ins_duplicate VALUES(2,'b') ON DUPLICATE KEY UPDATE val='b'
+RETURNING (SELECT id FROM ins_duplicate);
+ERROR HY000: Table 'ins_duplicate' is specified twice, both as a target for 'INSERT' and as a separate source for data
+INSERT INTO ins_duplicate VALUES(2,'b') ON DUPLICATE KEY UPDATE val='b'
+RETURNING t1.*;
+ERROR 42S02: Unknown table 'test.t1'
+#
+# INSERT...SELECT
+#
+INSERT INTO t2(id2, val2) SELECT * FROM t1 WHERE id1=1 RETURNING id1;
+ERROR 42S22: Unknown column 'id1' in 'field list'
+INSERT INTO t2(id2, val2) SELECT * FROM t1 WHERE id1=2 RETURNING MAX(id2);
+ERROR HY000: Invalid use of group function
+INSERT INTO t2(id2, val2) SELECT * FROM t1 WHERE id1=2 RETURNING (SELECT
+id1 FROM t1);
+ERROR 21000: Subquery returns more than 1 row
+INSERT INTO t2(id2, val2) SELECT * FROM t1 WHERE id1=2 RETURNING (SELECT
+* FROM t1);
+ERROR 21000: Operand should contain 1 column(s)
+INSERT INTO t2(id2, val2) SELECT * FROM t1 WHERE id1=2 RETURNING(SELECT
+* FROM t2);
+ERROR 21000: Operand should contain 1 column(s)
+INSERT INTO t2(id2,val2) SELECT * FROM t1 WHERE id1=2 RETURNING (SELECT
+id2 FROM t2);
+ERROR 21000: Subquery returns more than 1 row
+INSERT INTO t2(id2,val2) SELECT t1.* FROM t1 WHERE id1=2 RETURNING t1.*;
+ERROR 42S02: Unknown table 'test.t1'
+#
+# TRIGGER
+#
+CREATE TRIGGER bi1 before insert on t1 for each row set NEW.val1= 'z';
+INSERT INTO t1 VALUES (4, 'd'), (5, 'e') RETURNING *;
+id1 val1
+4 z
+5 z
+CREATE TRIGGER bi2 before insert on t2 for each row
+INSERT INTO t1 VALUES (NEW.id2, NEW.val2) RETURNING *;
+ERROR 0A000: Not allowed to return a result set from a trigger
+#
+# SP
+#
+CREATE FUNCTION f1(arg INT) RETURNS TEXT
+BEGIN
+INSERT INTO t1 VALUES (arg, arg) RETURNING *;
+RETURN arg;
+END|
+ERROR 0A000: Not allowed to return a result set from a function
+CREATE PROCEDURE sp1(arg INT)
+INSERT INTO t1 VALUES (arg, arg) RETURNING *;
+CALL sp1(0);
+id1 val1
+0 z
+DROP PROCEDURE sp1;
+DROP TABLE t1;
+DROP TABLE t2;
+DROP TABLE ins_duplicate;
+DROP VIEW v1;
+DROP VIEW v2;
+DROP FUNCTION f;
diff --git a/mysql-test/main/insert_returning.test b/mysql-test/main/insert_returning.test
new file mode 100644
index 00000000000..6c8e71a4617
--- /dev/null
+++ b/mysql-test/main/insert_returning.test
@@ -0,0 +1,328 @@
+--echo # Test for INSERT...RETURNING
+
+CREATE TABLE t1(id1 INT PRIMARY KEY AUTO_INCREMENT, val1 VARCHAR(1));
+CREATE TABLE t2(id2 INT PRIMARY KEY AUTO_INCREMENT, val2 VARCHAR(1));
+CREATE VIEW v1 AS SELECT id1, val1 FROM t1;
+CREATE VIEW v2 AS SELECT id2,val2 FROM t2;
+INSERT INTO t2 VALUES (1,'a'),(2,'b'),(3,'c');
+
+DELIMITER |;
+
+CREATE FUNCTION f(arg INT) RETURNS TEXT
+BEGIN
+ RETURN (SELECT arg+arg);
+END|
+
+DELIMITER ;|
+
+--echo #
+--echo # Simple insert statement...RETURNING
+--echo #
+INSERT INTO t1 (id1, val1) VALUES (1, 'a');
+INSERT INTO t1 (id1, val1) VALUES (2, 'b') RETURNING *;
+INSERT INTO t1 (id1, val1) VALUES (3, 'c') RETURNING id1+id1 as total,val1,
+id1 && id1, id1 | id1, UPPER(val1),f(id1);
+INSERT INTO t1(id1,val1) VALUES (4,'d') RETURNING(SELECT GROUP_CONCAT(val2)
+FROM t2 WHERE id2=1);
+INSERT INTO t1(id1,val1) VALUES(5,'e') RETURNING(SELECT GROUP_CONCAT(val2)
+FROM t2 GROUP BY id2 HAVING id2=id1-2);
+PREPARE stmt FROM "INSERT INTO t1 (id1,val1) VALUES (6,'f') RETURNING (SELECT id2 FROM t2 WHERE val2='b')";
+EXECUTE stmt;
+DELETE FROM t1 WHERE id1=6;
+SELECT * FROM t1;
+EXECUTE stmt;
+DEALLOCATE PREPARE stmt;
+INSERT IGNORE INTO t1(id1,val1) VALUES (7,'h') RETURNING *;
+SELECT * FROM t1;
+EXPLAIN INSERT INTO t1(id1,val1) VALUES (8,'i') RETURNING *;
+EXPLAIN EXTENDED INSERT INTO t1(id1,val1) VALUES(9,'j') RETURNING id1;
+EXPLAIN FORMAT="json" INSERT INTO t1(id1,val1) VALUES (10,'k') RETURNING id1;
+SELECT * FROM t1;
+INSERT INTO v1(id1, val1) VALUES (12, 'a') RETURNING id1+id1 as total,val1,
+id1 && id1, id1 id1, UPPER(val1),f(id1);
+ANALYZE INSERT INTO t1(id1,val1) VALUES(13,'l') RETURNING *;
+INSERT INTO t1(id1,val1) VALUES(14,'m') RETURNING t1.*;
+TRUNCATE TABLE t1;
+
+--echo #
+--echo # Multiple values in one insert statement...RETURNING
+--echo #
+INSERT INTO t1 VALUES (1,'a'),(2,'b');
+INSERT INTO t1 VALUES (3,'c'),(4,'d') RETURNING *;
+INSERT INTO t1 VALUES (5,'e'),(6,'f') RETURNING id1 as id,val1,
+id1 && id1, id1|id1, UPPER(val1),f(id1);
+INSERT INTO t1 VALUES (7,'g'),(8,'h') RETURNING(SELECT GROUP_CONCAT(val2)
+FROM t2 WHERE id2=1);
+INSERT INTO t1 VALUES (9,'i'),(10,'j') RETURNING(SELECT GROUP_CONCAT(val2)
+FROM t2 GROUP BY id2 HAVING id2=id1-8);
+PREPARE stmt FROM "INSERT INTO t1 VALUES (11,'k'),(12,'l') RETURNING (SELECT id2 FROM t2 WHERE val2='b')";
+EXECUTE stmt;
+DELETE FROM t1 WHERE val1 IN ('k','l');
+SELECT * FROM t1;
+EXECUTE stmt;
+DEALLOCATE PREPARE stmt;
+INSERT IGNORE INTO t1 VALUES(13,'o'),(14,'p') RETURNING *;
+EXPLAIN INSERT INTO t1 VALUES(15,'q'),(16,'r') RETURNING *;
+EXPLAIN EXTENDED INSERT INTO t1 VALUES (17,'s'),(18,'t') RETURNING *;
+EXPLAIN FORMAT="json" INSERT INTO t1 VALUES(19,'u'),(20,'v') RETURNING id1;
+SELECT * FROM t1;
+INSERT INTO v1 VALUES(23,'y'),(24,'z') RETURNING id1 as id,val1,
+id1 && id1, id1|id1, UPPER(val1),f(id1);
+ANALYZE INSERT INTO t1 VALUES(25,'a'),(26,'b') RETURNING *;
+ANALYZE INSERT INTO t1 VALUES(27,'c'),(28,'d') RETURNING t1.*;
+
+--echo #
+--echo # INSERT...ON DUPLICATE KEY UPDATE...RETURNING
+--echo #
+CREATE TABLE ins_duplicate (id INT PRIMARY KEY AUTO_INCREMENT, val VARCHAR(1));
+INSERT INTO ins_duplicate VALUES (1,'a');
+INSERT INTO ins_duplicate VALUES (2,'b') ON DUPLICATE KEY UPDATE val='b'
+RETURNING *;
+INSERT INTO ins_duplicate VALUES (2,'b') ON DUPLICATE KEY UPDATE val='c'
+RETURNING id+id AS total, val, id && id, id|id, UPPER(val),f(id);
+INSERT INTO ins_duplicate VALUES (2,'b') ON DUPLICATE KEY UPDATE val='d'
+RETURNING (SELECT GROUP_CONCAT(val2) FROM t2 WHERE id2=1);
+INSERT INTO ins_duplicate VALUES (2,'b') ON DUPLICATE KEY UPDATE val='e'
+RETURNING (SELECT GROUP_CONCAT(val2) FROM t2 GROUP BY id2 HAVING id2=id);
+PREPARE stmt FROM "INSERT INTO ins_duplicate VALUES (2,'b') ON DUPLICATE
+KEY UPDATE val='f' RETURNING (SELECT id2 FROM t2 WHERE val2='b')";
+EXECUTE stmt;
+SELECT * FROM t2;
+EXECUTE stmt;
+DEALLOCATE PREPARE stmt;
+INSERT IGNORE INTO ins_duplicate(id,val) VALUES (3,'c'),(4,'d') ON DUPLICATE
+KEY UPDATE val='g' RETURNING id;
+EXPLAIN INSERT INTO ins_duplicate(id,val) VALUES (2,'b') ON DUPLICATE KEY
+UPDATE val='h' RETURNING val;
+EXPLAIN EXTENDED INSERT INTO ins_duplicate(id,val) VALUES (2,'b')
+ON DUPLICATE KEY UPDATE val='i' RETURNING val;
+EXPLAIN FORMAT="json" INSERT INTO ins_duplicate(id,val) VALUES (2,'b')
+ON DUPLICATE KEY UPDATE val='j' RETURNING val;
+INSERT INTO v1(id1, val1) VALUES (2,'d') ON DUPLICATE KEY UPDATE
+val1='d' RETURNING id1+id1 AS total, val1, id1 && id1, id1|id1, UPPER(val1),
+f(id1);
+ANALYZE INSERT INTO ins_duplicate(id,val) VALUES(2,'b') ON DUPLICATE KEY UPDATE
+val='k' RETURNING *;
+INSERT INTO ins_duplicate(id,val) VALUES(2,'b') ON DUPLICATE KEY UPDATE
+val='l' RETURNING ins_duplicate.*;
+SELECT * FROM ins_duplicate;
+
+--echo #
+--echo # INSERT...SET...RETURNING
+--echo #
+TRUNCATE TABLE t1;
+INSERT INTO t1 SET id1= 1, val1= 'a';
+INSERT INTO t1 SET id1= 2, val1= 'b' RETURNING *;
+INSERT INTO t1 SET id1= 3, val1= 'c' RETURNING id1+id1 AS total,val1,
+id1 && id1, id1|id1, UPPER(val1),f(id1);
+INSERT INTO t1 SET id1= 4, val1= 'd' RETURNING (SELECT GROUP_CONCAT(val2)
+FROM t2 WHERE id2=1);
+INSERT INTO t1 SET id1= 5, val1='e' RETURNING (SELECT GROUP_CONCAT(val2)
+FROM t2 GROUP BY id2 HAVING id2=id1-3);
+PREPARE stmt FROM "INSERT INTO t1 SET id1= 6, val1='f' RETURNING (SELECT id2 FROM t2 WHERE val2='b')";
+EXECUTE stmt;
+DELETE FROM t1 WHERE val1='f';
+SELECT * FROM t1;
+EXECUTE stmt;
+DEALLOCATE PREPARE stmt;
+INSERT INTO t1 SET id1= 7, val1= 'g' RETURNING f(id1);
+INSERT INTO t1 SET val1= 'n' RETURNING *;
+INSERT IGNORE INTO t1 SET id1= 8, val1= 'h' RETURNING *;
+EXPLAIN INSERT INTO t1 SET id1=9, val1='i' RETURNING id1;
+EXPLAIN EXTENDED INSERT INTO t1 SET id1=10, val1='j' RETURNING val1;
+EXPLAIN FORMAT="json" INSERT INTO t1 SET id1=11, val1='k' RETURNING val1;
+INSERT INTO v1 SET id1=26, val1='Z' RETURNING id1+id1 AS total,val1,
+id1 && id1, id1|id1, UPPER(val1),f(id1);
+ANALYZE INSERT INTO t1 SET id1=12, val1='l' RETURNING *;
+INSERT INTO t1 SET id1= 13, val1= 'm' RETURNING t1.*;
+SELECT * FROM t1;
+
+--echo #
+--echo # INSERT...SELECT...RETURNING
+--echo #
+TRUNCATE TABLE t2;
+INSERT INTO t2(id2,val2) SELECT * FROM t1;
+TRUNCATE TABLE t2;
+INSERT INTO t2 SELECT * FROM t1 WHERE id1=1 RETURNING *;
+INSERT INTO t2 SELECT * FROM t1 WHERE id1=2 RETURNING id2+id2 AS total,
+val2,id2 && id2, id2|id2, UPPER(val2),f(id2);
+INSERT INTO t2 SELECT * FROM t1 WHERE id1=3 RETURNING (SELECT GROUP_CONCAT(val1) FROM t1 GROUP BY id1 HAVING id1=id1+1);
+PREPARE stmt FROM "INSERT INTO t2 SELECT * FROM t1 WHERE id1=4 RETURNING (SELECT id1 FROM t1 WHERE val1='b')";
+EXECUTE stmt;
+DELETE FROM t2 WHERE id2=4;
+SELECT * FROM t1;
+EXECUTE stmt;
+DEALLOCATE PREPARE stmt;
+INSERT INTO t2 SELECT * FROM t1 WHERE id1=6 RETURNING
+(SELECT id1+id2 FROM t1 WHERE id1=1);
+INSERT INTO t2 SELECT * FROM t1 WHERE id1=7 RETURNING f(id2);
+EXPLAIN INSERT INTO t2 SELECT * FROM t1 WHERE id1=8 RETURNING id2;
+EXPLAIN EXTENDED INSERT INTO t1 SELECT * FROM t1 WHERE id1=9 RETURNING val1;
+EXPLAIN FORMAT="json" INSERT INTO t1 SELECT * FROM t1 WHERE id1=10 RETURNING val1;
+INSERT IGNORE INTO t2 SELECT * FROM t1 WHERE id1=8 RETURNING *;
+INSERT IGNORE INTO v2 SELECT * FROM v1 RETURNING *;
+ANALYZE INSERT INTO t2 SELECT * FROM t1 WHERE id1=11 RETURNING *;
+SELECT * FROM t2;
+TRUNCATE TABLE t2;
+INSERT INTO t2 SELECT * FROM t1 WHERE id1=1 RETURNING t2.*;
+INSERT INTO t2 SELECT t1.* FROM t1 WHERE id1=2 RETURNING t2.*;
+SELECT * FROM t2;
+
+DROP TABLE t1;
+DROP TABLE t2;
+DROP TABLE ins_duplicate;
+
+--echo #
+--echo # Error message test
+--echo #
+
+CREATE TABLE t1(id1 INT,val1 VARCHAR(1));
+CREATE TABLE t2(id2 INT,val2 VARCHAR(1));
+CREATE TABLE ins_duplicate (id INT PRIMARY KEY, val VARCHAR(1));
+
+INSERT INTO t1 VALUES(1,'a'),(2,'b'),(3,'c');
+
+--echo #
+--echo # SIMLPE INSERT STATEMENT
+--echo #
+--error ER_BAD_FIELD_ERROR
+INSERT INTO t2(id2,val2) VALUES(1,'a') RETURNING id1;
+--error ER_INVALID_GROUP_FUNC_USE
+INSERT INTO t2(id2,val2) values(2,'b') RETURNING SUM(id2);
+--error ER_SUBQUERY_NO_1_ROW
+INSERT INTO t2(id2,val2) VALUES(3,'c') RETURNING (SELECT id1 FROM t1);
+--error ER_OPERAND_COLUMNS
+INSERT INTO t2(id2,val2) VALUES(4,'d') RETURNING (SELECT * FROM t1);
+--error ER_OPERAND_COLUMNS
+INSERT INTO t2(id2,val2) VALUES(4,'d') RETURNING (SELECT * FROM t2);
+INSERT INTO t2(id2,val2) VALUES(5,'e') RETURNING id2, (SELECT id1+id2 FROM
+t1 WHERE id1=1);
+--error ER_UPDATE_TABLE_USED
+INSERT INTO t2(id2,val2) VALUES(5,'f') RETURNING (SELECT id2 FROM t2);
+--error ER_BAD_TABLE_ERROR
+INSERT INTO t2 (id2, val2) VALUES (6,'f') RETURNING t1.*;
+
+--echo #
+--echo # Multiple rows in single insert statement
+--echo #
+--error ER_BAD_FIELD_ERROR
+INSERT INTO t2 VALUES(1,'a'),(2,'b') RETURNING id1;
+--error ER_INVALID_GROUP_FUNC_USE
+INSERT INTO t2 VALUES(3,'c'),(4,'d') RETURNING MAX(id2);
+--error ER_SUBQUERY_NO_1_ROW
+INSERT INTO t2 VALUES(5,'c'),(6,'f') RETURNING (SELECT id1 FROM t1);
+--error ER_OPERAND_COLUMNS
+INSERT INTO t2 VALUES(7,'g'),(8,'h') RETURNING (SELECT * FROM t1);
+--error ER_OPERAND_COLUMNS
+INSERT INTO t2 VALUES(9,'g'),(10,'h') RETURNING (SELECT * FROM t2);
+INSERT INTO t2 VALUES(11,'e'),(12,'f') RETURNING id2, (SELECT id1+id2 FROM
+t1 WHERE id1=1);
+--error ER_UPDATE_TABLE_USED
+INSERT INTO t2 VALUES(13,'f'),(14,'g') RETURNING (SELECT id2 FROM t2);
+--error ER_BAD_TABLE_ERROR
+INSERT INTO t2 VALUES(13,'f'),(14,'g') RETURNING t1.*;
+
+--echo #
+--echo # INSERT ... SET
+--echo #
+--error ER_BAD_FIELD_ERROR
+INSERT INTO t2 SET id2=1, val2='a' RETURNING id1;
+--error ER_INVALID_GROUP_FUNC_USE
+INSERT INTO t2 SET id2=2, val2='b' RETURNING COUNT(id2);
+--error ER_SUBQUERY_NO_1_ROW
+INSERT INTO t2 SET id2=3, val2='c' RETURNING (SELECT id1 FROM t1);
+--error ER_OPERAND_COLUMNS
+INSERT INTO t2 SET id2=4, val2='d' RETURNING (SELECT * FROM t1);
+--error ER_OPERAND_COLUMNS
+INSERT INTO t2 SET id2=4, val2='d' RETURNING (SELECT * FROM t2);
+INSERT INTO t2 SET id2=5, val2='e' RETURNING id2, (SELECT id1+id2 FROM t1
+WHERE id1=1);
+--error ER_UPDATE_TABLE_USED
+INSERT INTO t2 SET id2=5, val2='f' RETURNING (SELECT id2 FROM t2);
+--error ER_BAD_TABLE_ERROR
+INSERT INTO t2 SET id2=5, val2='f' RETURNING t1.*;
+
+--echo #
+--echo # INSERT...ON DUPLICATE KEY UPDATE
+--echo #
+--error ER_BAD_FIELD_ERROR
+INSERT INTO ins_duplicate VALUES (2,'b') ON DUPLICATE KEY UPDATE val='b'
+RETURNING id1;
+--error ER_INVALID_GROUP_FUNC_USE
+INSERT INTO ins_duplicate VALUES (2,'b') ON DUPLICATE KEY UPDATE val='b'
+RETURNING MAX(id);
+--error ER_SUBQUERY_NO_1_ROW
+INSERT INTO ins_duplicate VALUES (2,'b') ON DUPLICATE KEY UPDATE val='b'
+RETURNING (SELECT id1 FROM t1);
+--error ER_OPERAND_COLUMNS
+INSERT INTO ins_duplicate VALUES (2,'b') ON DUPLICATE KEY UPDATE val='b'
+RETURNING (SELECT * FROM t1);
+--error ER_OPERAND_COLUMNS
+INSERT INTO ins_duplicate VALUES (2,'b') ON DUPLICATE KEY UPDATE val='b'
+RETURNING (SELECT * FROM ins_duplicate);
+--error ER_BAD_FIELD_ERROR
+INSERT INTO ins_duplicate VALUES(2,'b') ON DUPLICATE KEY UPDATE val='b'
+RETURNING id2, (SELECT id1+id FROM t1 WHERE id1=1);
+--error ER_UPDATE_TABLE_USED
+INSERT INTO ins_duplicate VALUES(2,'b') ON DUPLICATE KEY UPDATE val='b'
+RETURNING (SELECT id FROM ins_duplicate);
+--error ER_BAD_TABLE_ERROR
+INSERT INTO ins_duplicate VALUES(2,'b') ON DUPLICATE KEY UPDATE val='b'
+RETURNING t1.*;
+
+--echo #
+--echo # INSERT...SELECT
+--echo #
+--error ER_BAD_FIELD_ERROR
+INSERT INTO t2(id2, val2) SELECT * FROM t1 WHERE id1=1 RETURNING id1;
+--error ER_INVALID_GROUP_FUNC_USE
+INSERT INTO t2(id2, val2) SELECT * FROM t1 WHERE id1=2 RETURNING MAX(id2);
+--error ER_SUBQUERY_NO_1_ROW
+INSERT INTO t2(id2, val2) SELECT * FROM t1 WHERE id1=2 RETURNING (SELECT
+id1 FROM t1);
+--error ER_OPERAND_COLUMNS
+INSERT INTO t2(id2, val2) SELECT * FROM t1 WHERE id1=2 RETURNING (SELECT
+* FROM t1);
+--error ER_OPERAND_COLUMNS
+INSERT INTO t2(id2, val2) SELECT * FROM t1 WHERE id1=2 RETURNING(SELECT
+* FROM t2);
+--error ER_SUBQUERY_NO_1_ROW
+INSERT INTO t2(id2,val2) SELECT * FROM t1 WHERE id1=2 RETURNING (SELECT
+id2 FROM t2);
+--error ER_BAD_TABLE_ERROR
+INSERT INTO t2(id2,val2) SELECT t1.* FROM t1 WHERE id1=2 RETURNING t1.*;
+
+--echo #
+--echo # TRIGGER
+--echo #
+CREATE TRIGGER bi1 before insert on t1 for each row set NEW.val1= 'z';
+INSERT INTO t1 VALUES (4, 'd'), (5, 'e') RETURNING *;
+
+--error ER_SP_NO_RETSET
+CREATE TRIGGER bi2 before insert on t2 for each row
+ INSERT INTO t1 VALUES (NEW.id2, NEW.val2) RETURNING *;
+
+--echo #
+--echo # SP
+--echo #
+delimiter |;
+--error ER_SP_NO_RETSET
+CREATE FUNCTION f1(arg INT) RETURNS TEXT
+BEGIN
+ INSERT INTO t1 VALUES (arg, arg) RETURNING *;
+ RETURN arg;
+END|
+delimiter ;|
+
+CREATE PROCEDURE sp1(arg INT)
+ INSERT INTO t1 VALUES (arg, arg) RETURNING *;
+
+CALL sp1(0);
+
+DROP PROCEDURE sp1;
+DROP TABLE t1;
+DROP TABLE t2;
+DROP TABLE ins_duplicate;
+DROP VIEW v1;
+DROP VIEW v2;
+DROP FUNCTION f;
diff --git a/mysql-test/main/insert_returning_datatypes.result b/mysql-test/main/insert_returning_datatypes.result
new file mode 100644
index 00000000000..d0516d172f8
--- /dev/null
+++ b/mysql-test/main/insert_returning_datatypes.result
@@ -0,0 +1,72 @@
+CREATE TABLE t1(num_int1 INT(2) PRIMARY KEY,
+num_bit1 BIT(8),
+num_float1 FLOAT(5,2),
+num_double1 DOUBLE(5,2),
+char_enum1 ENUM('A','B','C','D'),
+char_set1 SET('a','b','c','d','e'),
+str_varchar1 VARCHAR(2),
+d1 DATE,
+dt1 DATETIME,
+ts1 TIMESTAMP,
+y1 YEAR,
+b1 BOOL);
+CREATE TABLE t2(num_int2 INT(2) PRIMARY KEY,
+num_bit2 BIT(8),
+num_float2 FLOAT(5,2),
+num_double2 DOUBLE(5,2),
+char_enum2 ENUM('A','B','C','D'),
+char_set2 SET('a','b','c','d','e'),
+str_varchar2 VARCHAR(2),
+d2 DATE,
+dt2 DATETIME,
+ts2 TIMESTAMP,
+y2 YEAR,
+b2 BOOL);
+#
+# SIMLPE INSERT STATEMENT
+#
+INSERT INTO t1(num_int1,num_bit1,num_float1,num_double1,char_enum1,char_set1,
+str_varchar1, d1,dt1,ts1,y1,b1) VALUES(1,b'1000011', 123.45, 123.55,
+'A','b,e', 'V','120314',"2012-04-19 13:08:22", '2001-07-22 12:12:12',
+2012,0) RETURNING *;
+num_int1 num_bit1 num_float1 num_double1 char_enum1 char_set1 str_varchar1 d1 dt1 ts1 y1 b1
+1 C 123.45 123.55 A b,e V 2012-03-14 2012-04-19 13:08:22 2001-07-22 12:12:12 2012 0
+#
+# MULTIPLE ROWS IN SINGLE STATEMENT
+#
+INSERT INTO t1 VALUES(2,b'1000011', 123.45, 123.55, 'A','b,e', 'V',
+'120314',"2012-04-19 13:08:22", '2001-07-22 12:12:12',2012,0),(3,b'1000011',
+123.45, 123.55, 'A','b,e', 'V','120314',"2012-04-19 13:08:22",
+'2001-07-22 12:12:12',2012,1) RETURNING *;
+num_int1 num_bit1 num_float1 num_double1 char_enum1 char_set1 str_varchar1 d1 dt1 ts1 y1 b1
+2 C 123.45 123.55 A b,e V 2012-03-14 2012-04-19 13:08:22 2001-07-22 12:12:12 2012 0
+3 C 123.45 123.55 A b,e V 2012-03-14 2012-04-19 13:08:22 2001-07-22 12:12:12 2012 1
+#
+# INSERT...SET...RETURNING
+#
+INSERT INTO t1 SET num_int1=4,num_bit1=b'1000011',num_float1=124.67,
+num_double1=231.12,char_enum1='B',char_set1='a,d,e',
+str_varchar1='AB',d1='120314',dt1="2012-04-19 13:08:22",
+ts1='2001-07-22 12:12:1',y1=2014,b1=1 RETURNING *;
+num_int1 num_bit1 num_float1 num_double1 char_enum1 char_set1 str_varchar1 d1 dt1 ts1 y1 b1
+4 C 124.67 231.12 B a,d,e AB 2012-03-14 2012-04-19 13:08:22 2001-07-22 12:12:01 2014 1
+#
+# INSERT...ON DUPLICATE KEY UPDATE
+#
+INSERT INTO t1 VALUES (5,b'1000011', 123.45, 123.55,'C','b,e', 'V',
+'120314',"2012-04-19 13:08:22", '2001-07-22 12:12:12',2012,0)
+ON DUPLICATE KEY UPDATE num_float1=111.111 RETURNING *;
+num_int1 num_bit1 num_float1 num_double1 char_enum1 char_set1 str_varchar1 d1 dt1 ts1 y1 b1
+5 C 123.45 123.55 C b,e V 2012-03-14 2012-04-19 13:08:22 2001-07-22 12:12:12 2012 0
+#
+# INSERT...SELECT...RETURNING
+#
+INSERT INTO t2 SELECT * FROM t1 RETURNING *;
+num_int2 num_bit2 num_float2 num_double2 char_enum2 char_set2 str_varchar2 d2 dt2 ts2 y2 b2
+1 C 123.45 123.55 A b,e V 2012-03-14 2012-04-19 13:08:22 2001-07-22 12:12:12 2012 0
+2 C 123.45 123.55 A b,e V 2012-03-14 2012-04-19 13:08:22 2001-07-22 12:12:12 2012 0
+3 C 123.45 123.55 A b,e V 2012-03-14 2012-04-19 13:08:22 2001-07-22 12:12:12 2012 1
+4 C 124.67 231.12 B a,d,e AB 2012-03-14 2012-04-19 13:08:22 2001-07-22 12:12:01 2014 1
+5 C 123.45 123.55 C b,e V 2012-03-14 2012-04-19 13:08:22 2001-07-22 12:12:12 2012 0
+DROP TABLE t1;
+DROP TABLE t2;
diff --git a/mysql-test/main/insert_returning_datatypes.test b/mysql-test/main/insert_returning_datatypes.test
new file mode 100644
index 00000000000..6591e91cb4d
--- /dev/null
+++ b/mysql-test/main/insert_returning_datatypes.test
@@ -0,0 +1,74 @@
+#Test for checking all dataypes are returned
+
+CREATE TABLE t1(num_int1 INT(2) PRIMARY KEY,
+num_bit1 BIT(8),
+num_float1 FLOAT(5,2),
+num_double1 DOUBLE(5,2),
+char_enum1 ENUM('A','B','C','D'),
+char_set1 SET('a','b','c','d','e'),
+str_varchar1 VARCHAR(2),
+d1 DATE,
+dt1 DATETIME,
+ts1 TIMESTAMP,
+y1 YEAR,
+b1 BOOL);
+
+CREATE TABLE t2(num_int2 INT(2) PRIMARY KEY,
+num_bit2 BIT(8),
+num_float2 FLOAT(5,2),
+num_double2 DOUBLE(5,2),
+char_enum2 ENUM('A','B','C','D'),
+char_set2 SET('a','b','c','d','e'),
+str_varchar2 VARCHAR(2),
+d2 DATE,
+dt2 DATETIME,
+ts2 TIMESTAMP,
+y2 YEAR,
+b2 BOOL);
+
+
+--echo #
+--echo # SIMLPE INSERT STATEMENT
+--echo #
+INSERT INTO t1(num_int1,num_bit1,num_float1,num_double1,char_enum1,char_set1,
+str_varchar1, d1,dt1,ts1,y1,b1) VALUES(1,b'1000011', 123.45, 123.55,
+ 'A','b,e', 'V','120314',"2012-04-19 13:08:22", '2001-07-22 12:12:12',
+2012,0) RETURNING *;
+
+
+--echo #
+--echo # MULTIPLE ROWS IN SINGLE STATEMENT
+--echo #
+INSERT INTO t1 VALUES(2,b'1000011', 123.45, 123.55, 'A','b,e', 'V',
+'120314',"2012-04-19 13:08:22", '2001-07-22 12:12:12',2012,0),(3,b'1000011',
+123.45, 123.55, 'A','b,e', 'V','120314',"2012-04-19 13:08:22",
+'2001-07-22 12:12:12',2012,1) RETURNING *;
+
+
+
+--echo #
+--echo # INSERT...SET...RETURNING
+--echo #
+INSERT INTO t1 SET num_int1=4,num_bit1=b'1000011',num_float1=124.67,
+num_double1=231.12,char_enum1='B',char_set1='a,d,e',
+str_varchar1='AB',d1='120314',dt1="2012-04-19 13:08:22",
+ts1='2001-07-22 12:12:1',y1=2014,b1=1 RETURNING *;
+
+
+
+--echo #
+--echo # INSERT...ON DUPLICATE KEY UPDATE
+--echo #
+INSERT INTO t1 VALUES (5,b'1000011', 123.45, 123.55,'C','b,e', 'V',
+'120314',"2012-04-19 13:08:22", '2001-07-22 12:12:12',2012,0)
+ON DUPLICATE KEY UPDATE num_float1=111.111 RETURNING *;
+
+
+--echo #
+--echo # INSERT...SELECT...RETURNING
+--echo #
+INSERT INTO t2 SELECT * FROM t1 RETURNING *;
+
+
+DROP TABLE t1;
+DROP TABLE t2;
diff --git a/mysql-test/main/intersect.result b/mysql-test/main/intersect.result
index 5990fcce110..95a3c2f7db9 100644
--- a/mysql-test/main/intersect.result
+++ b/mysql-test/main/intersect.result
@@ -108,7 +108,8 @@ ANALYZE
"r_loops": 1,
"rows": 3,
"r_rows": 3,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100
}
@@ -126,7 +127,8 @@ ANALYZE
"r_loops": 1,
"rows": 3,
"r_rows": 3,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100
}
@@ -144,7 +146,8 @@ ANALYZE
"r_loops": 1,
"rows": 3,
"r_rows": 3,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100
}
@@ -167,7 +170,8 @@ ANALYZE
"r_loops": 1,
"rows": 3,
"r_rows": 1,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100,
"materialized": {
@@ -189,7 +193,8 @@ ANALYZE
"r_loops": 1,
"rows": 3,
"r_rows": 3,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100
}
@@ -207,7 +212,8 @@ ANALYZE
"r_loops": 1,
"rows": 3,
"r_rows": 3,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100
}
@@ -225,7 +231,8 @@ ANALYZE
"r_loops": 1,
"rows": 3,
"r_rows": 3,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100
}
@@ -349,7 +356,8 @@ ANALYZE
"r_loops": 1,
"rows": 3,
"r_rows": 3,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100
}
@@ -367,7 +375,8 @@ ANALYZE
"r_loops": 1,
"rows": 3,
"r_rows": 3,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100
},
@@ -378,7 +387,8 @@ ANALYZE
"r_loops": 1,
"rows": 3,
"r_rows": 3,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100
},
@@ -406,7 +416,8 @@ ANALYZE
"r_loops": 1,
"rows": 3,
"r_rows": 1,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100,
"materialized": {
@@ -428,7 +439,8 @@ ANALYZE
"r_loops": 1,
"rows": 3,
"r_rows": 3,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100
}
@@ -446,7 +458,8 @@ ANALYZE
"r_loops": 1,
"rows": 3,
"r_rows": 3,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100
},
@@ -457,7 +470,8 @@ ANALYZE
"r_loops": 1,
"rows": 3,
"r_rows": 3,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100
},
@@ -508,8 +522,6 @@ select 1 as a from dual union all select 1 from dual;
a
1
1
-select 1 from dual intersect all select 1 from dual;
-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 'all select 1 from dual' at line 1
create table t1 (a int, b blob, a1 int, b1 blob);
create table t2 (c int, d blob, c1 int, d1 blob);
insert into t1 values (1,"ddd", 1, "sdfrrwwww"),(2, "fgh", 2, "dffggtt");
@@ -611,22 +623,6 @@ NULL INTERSECT RESULT <intersect2,3> ALL NULL NULL NULL NULL NULL NULL
NULL UNION RESULT <union1,5,4> ALL NULL NULL NULL NULL NULL NULL
Warnings:
Note 1003 (/* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1`) union /* select#5 */ select `__5`.`c` AS `c`,`__5`.`d` AS `d` from ((/* select#2 */ select `test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t2`) intersect (/* select#3 */ select `test`.`t3`.`e` AS `e`,`test`.`t3`.`f` AS `f` from `test`.`t3`)) `__5` union (/* select#4 */ select 4 AS `4`,4 AS `4`)
-set SQL_MODE=ORACLE;
-(select a,b from t1) union (select c,d from t2) intersect (select e,f from t3) union (select 4,4);
-a b
-3 3
-4 4
-explain extended
-(select a,b from t1) union (select c,d from t2) intersect (select e,f from t3) union (select 4,4);
-id select_type table type possible_keys key key_len ref rows filtered Extra
-1 PRIMARY t1 ALL NULL NULL NULL NULL 2 100.00
-2 UNION t2 ALL NULL NULL NULL NULL 2 100.00
-3 INTERSECT t3 ALL NULL NULL NULL NULL 2 100.00
-4 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used
-NULL UNIT RESULT <unit1,2,3,4> ALL NULL NULL NULL NULL NULL NULL
-Warnings:
-Note 1003 (/* select#1 */ select "test"."t1"."a" AS "a","test"."t1"."b" AS "b" from "test"."t1") union (/* select#2 */ select "test"."t2"."c" AS "c","test"."t2"."d" AS "d" from "test"."t2") intersect (/* select#3 */ select "test"."t3"."e" AS "e","test"."t3"."f" AS "f" from "test"."t3") union (/* select#4 */ select 4 AS "4",4 AS "4")
-set SQL_MODE=default;
(select e,f from t3) intersect (select c,d from t2) union (select a,b from t1) union (select 4,4);
e f
3 3
@@ -643,24 +639,6 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
NULL UNIT RESULT <unit1,2,3,4> ALL NULL NULL NULL NULL NULL NULL
Warnings:
Note 1003 (/* select#1 */ select `test`.`t3`.`e` AS `e`,`test`.`t3`.`f` AS `f` from `test`.`t3`) intersect (/* select#2 */ select `test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t2`) union (/* select#3 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1`) union (/* select#4 */ select 4 AS `4`,4 AS `4`)
-set SQL_MODE=ORACLE;
-(select e,f from t3) intersect (select c,d from t2) union (select a,b from t1) union (select 4,4);
-e f
-3 3
-4 4
-5 5
-6 6
-explain extended
-(select e,f from t3) intersect (select c,d from t2) union (select a,b from t1) union (select 4,4);
-id select_type table type possible_keys key key_len ref rows filtered Extra
-1 PRIMARY t3 ALL NULL NULL NULL NULL 2 100.00
-2 INTERSECT t2 ALL NULL NULL NULL NULL 2 100.00
-3 UNION t1 ALL NULL NULL NULL NULL 2 100.00
-4 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used
-NULL UNIT RESULT <unit1,2,3,4> ALL NULL NULL NULL NULL NULL NULL
-Warnings:
-Note 1003 (/* select#1 */ select "test"."t3"."e" AS "e","test"."t3"."f" AS "f" from "test"."t3") intersect (/* select#2 */ select "test"."t2"."c" AS "c","test"."t2"."d" AS "d" from "test"."t2") union (/* select#3 */ select "test"."t1"."a" AS "a","test"."t1"."b" AS "b" from "test"."t1") union (/* select#4 */ select 4 AS "4",4 AS "4")
-set SQL_MODE=default;
(/* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1`) union /* select#3 */ select `__3`.`c` AS `c`,`__3`.`d` AS `d` from ((/* select#2 */ select `test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t2`) intersect (/* select#4 */ select `test`.`t3`.`e` AS `e`,`test`.`t3`.`f` AS `f` from `test`.`t3`)) `__3` union (/* select#5 */ select 4 AS `4`,4 AS `4`);
a b
3 3
@@ -824,12 +802,6 @@ create table t234(c1 int);
insert into t234 values(2);
insert into t234 values(3);
insert into t234 values(4);
-set SQL_MODE=oracle;
-select * from t13 union select * from t234 intersect select * from t12;
-c1
-1
-2
-set SQL_MODE=default;
select * from t13 union select * from t234 intersect select * from t12;
c1
1
@@ -852,9 +824,9 @@ select * from t2 where a < 5
intersect
select * from t3 where a < 5;
a
+1
7
7
-1
explain extended
select * from t1 where a > 4
union all
diff --git a/mysql-test/main/intersect.test b/mysql-test/main/intersect.test
index 18c95d62d44..5e811f1f56d 100644
--- a/mysql-test/main/intersect.test
+++ b/mysql-test/main/intersect.test
@@ -24,9 +24,9 @@ EXPLAIN (select a,b from t1) intersect (select c,d from t2) intersect (select e,
EXPLAIN extended (select a,b from t1) intersect (select c,d from t2) intersect (select e,f from t3);
EXPLAIN extended select * from ((select a,b from t1) intersect (select c,d from t2) intersect (select e,f from t3)) a;
EXPLAIN format=json (select a,b from t1) intersect (select c,d from t2) intersect (select e,f from t3);
---replace_regex /"r_total_time_ms": [0-9e\.\-+]*,/"r_total_time_ms": "REPLACED",/
+--source include/analyze-format.inc
ANALYZE format=json (select a,b from t1) intersect (select c,d from t2) intersect (select e,f from t3);
---replace_regex /"r_total_time_ms": [0-9e\.\-+]*,/"r_total_time_ms": "REPLACED",/
+--source include/analyze-format.inc
ANALYZE format=json select * from ((select a,b from t1) intersect (select c,d from t2) intersect (select e,f from t3)) a;
select * from ((select a,b from t1) intersect (select c,d from t2) intersect (select e,f from t3)) a;
@@ -44,9 +44,9 @@ EXPLAIN extended (select a,b from t1) intersect (select c,e from t2,t3);
EXPLAIN extended select * from ((select a,b from t1) intersect (select c,e from t2,t3)) a;
set @@optimizer_switch='optimize_join_buffer_size=off';
EXPLAIN format=json (select a,b from t1) intersect (select c,e from t2,t3);
---replace_regex /"r_total_time_ms": [0-9e\.\-+]*,/"r_total_time_ms": "REPLACED",/
+--source include/analyze-format.inc
ANALYZE format=json (select a,b from t1) intersect (select c,e from t2,t3);
---replace_regex /"r_total_time_ms": [0-9e\.\-+]*,/"r_total_time_ms": "REPLACED",/
+--source include/analyze-format.inc
ANALYZE format=json select * from ((select a,b from t1) intersect (select c,e from t2,t3)) a;
set @@optimizer_switch=@save_optimizer_switch;
select * from ((select a,b from t1) intersect (select c,e from t2,t3)) a;
@@ -71,8 +71,6 @@ select 1 as a from dual intersect select 1 from dual;
select 1 from dual ORDER BY 1 intersect select 1 from dual;
select 1 as a from dual union all select 1 from dual;
---error ER_PARSE_ERROR
-select 1 from dual intersect all select 1 from dual;
@@ -153,12 +151,6 @@ insert into t3 values (1,1),(3,3);
(select a,b from t1) union (select c,d from t2) intersect (select e,f from t3) union (select 4,4);
explain extended
(select a,b from t1) union (select c,d from t2) intersect (select e,f from t3) union (select 4,4);
-set SQL_MODE=ORACLE;
---sorted_result
-(select a,b from t1) union (select c,d from t2) intersect (select e,f from t3) union (select 4,4);
-explain extended
-(select a,b from t1) union (select c,d from t2) intersect (select e,f from t3) union (select 4,4);
-set SQL_MODE=default;
# test result of linear mix operation
@@ -166,12 +158,6 @@ set SQL_MODE=default;
(select e,f from t3) intersect (select c,d from t2) union (select a,b from t1) union (select 4,4);
explain extended
(select e,f from t3) intersect (select c,d from t2) union (select a,b from t1) union (select 4,4);
-set SQL_MODE=ORACLE;
---sorted_result
-(select e,f from t3) intersect (select c,d from t2) union (select a,b from t1) union (select 4,4);
-explain extended
-(select e,f from t3) intersect (select c,d from t2) union (select a,b from t1) union (select 4,4);
-set SQL_MODE=default;
--sorted_result
(/* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1`) union /* select#3 */ select `__3`.`c` AS `c`,`__3`.`d` AS `d` from ((/* select#2 */ select `test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t2`) intersect (/* select#4 */ select `test`.`t3`.`e` AS `e`,`test`.`t3`.`f` AS `f` from `test`.`t3`)) `__3` union (/* select#5 */ select 4 AS `4`,4 AS `4`);
@@ -316,11 +302,7 @@ create table t234(c1 int);
insert into t234 values(2);
insert into t234 values(3);
insert into t234 values(4);
-
-set SQL_MODE=oracle;
---sorted_result
-select * from t13 union select * from t234 intersect select * from t12;
-set SQL_MODE=default;
+
--sorted_result
select * from t13 union select * from t234 intersect select * from t12;
@@ -339,7 +321,7 @@ insert into t2 values (4), (5), (9), (1), (8), (9);
create table t3 (a int);
insert into t3 values (8), (1), (8), (2), (3), (7), (2);
-
+--sorted_result
select * from t1 where a > 4
union all
select * from t2 where a < 5
diff --git a/mysql-test/main/intersect_all.result b/mysql-test/main/intersect_all.result
new file mode 100644
index 00000000000..7483e1df06e
--- /dev/null
+++ b/mysql-test/main/intersect_all.result
@@ -0,0 +1,902 @@
+create table t1 (a int, b int) engine=MyISAM;
+create table t2 (c int, d int) engine=MyISAM;
+insert into t1 values (1,1),(2,2),(3,3),(2,2);
+insert into t2 values (2,2),(2,2),(5,5);
+select * from t1 intersect all select * from t2;
+a b
+2 2
+2 2
+(select a,b from t1) intersect all (select c,d from t2);
+a b
+2 2
+2 2
+select * from ((select a,b from t1) intersect all (select c,d from t2)) t;
+a b
+2 2
+2 2
+select * from ((select a from t1) intersect all (select c from t2)) t;
+a
+2
+2
+drop tables t1,t2;
+create table t1 (a int, b int) engine=MyISAM;
+create table t2 (c int, d int) engine=MyISAM;
+create table t3 (e int, f int) engine=MyISAM;
+insert into t1 values (1,1),(2,2),(3,3),(2,2);
+insert into t2 values (2,2),(3,3),(4,4),(2,2);
+insert into t3 values (1,1),(2,2),(5,5),(2,2);
+(select a,b from t1) intersect all (select c,d from t2) intersect all (select e,f from t3);
+a b
+2 2
+2 2
+EXPLAIN (select a,b from t1) intersect all (select c,d from t2) intersect all (select e,f from t3);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 4
+2 INTERSECT t2 ALL NULL NULL NULL NULL 4
+3 INTERSECT t3 ALL NULL NULL NULL NULL 4
+NULL INTERSECT RESULT <intersect1,2,3> ALL NULL NULL NULL NULL NULL
+EXPLAIN extended (select a,b from t1) intersect all (select c,d from t2) intersect all (select e,f from t3);
+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
+2 INTERSECT t2 ALL NULL NULL NULL NULL 4 100.00
+3 INTERSECT t3 ALL NULL NULL NULL NULL 4 100.00
+NULL INTERSECT RESULT <intersect1,2,3> ALL NULL NULL NULL NULL NULL NULL
+Warnings:
+Note 1003 (/* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1`) intersect all (/* select#2 */ select `test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t2`) intersect all (/* select#3 */ select `test`.`t3`.`e` AS `e`,`test`.`t3`.`f` AS `f` from `test`.`t3`)
+EXPLAIN extended select * from ((select a,b from t1) intersect all (select c,d from t2) intersect all (select e,f from t3)) a;
+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
+3 INTERSECT t2 ALL NULL NULL NULL NULL 4 100.00
+4 INTERSECT t3 ALL NULL NULL NULL NULL 4 100.00
+NULL INTERSECT RESULT <intersect2,3,4> ALL NULL NULL NULL NULL NULL NULL
+Warnings:
+Note 1003 /* select#1 */ select `a`.`a` AS `a`,`a`.`b` AS `b` from ((/* select#2 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1`) intersect all (/* select#3 */ select `test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t2`) intersect all (/* select#4 */ select `test`.`t3`.`e` AS `e`,`test`.`t3`.`f` AS `f` from `test`.`t3`)) `a`
+EXPLAIN format=json (select a,b from t1) intersect all (select c,d from t2) intersect all (select e,f from t3);
+EXPLAIN
+{
+ "query_block": {
+ "union_result": {
+ "table_name": "<intersect1,2,3>",
+ "access_type": "ALL",
+ "query_specifications": [
+ {
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 4,
+ "filtered": 100
+ }
+ }
+ },
+ {
+ "query_block": {
+ "select_id": 2,
+ "operation": "INTERSECT",
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 4,
+ "filtered": 100
+ }
+ }
+ },
+ {
+ "query_block": {
+ "select_id": 3,
+ "operation": "INTERSECT",
+ "table": {
+ "table_name": "t3",
+ "access_type": "ALL",
+ "rows": 4,
+ "filtered": 100
+ }
+ }
+ }
+ ]
+ }
+ }
+}
+ANALYZE format=json (select a,b from t1) intersect all (select c,d from t2) intersect all (select e,f from t3);
+ANALYZE
+{
+ "query_block": {
+ "union_result": {
+ "table_name": "<intersect1,2,3>",
+ "access_type": "ALL",
+ "r_loops": 1,
+ "r_rows": 2,
+ "query_specifications": [
+ {
+ "query_block": {
+ "select_id": 1,
+ "r_loops": 1,
+ "r_total_time_ms": "REPLACED",
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "r_loops": 1,
+ "rows": 4,
+ "r_rows": 4,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 100,
+ "r_filtered": 100
+ }
+ }
+ },
+ {
+ "query_block": {
+ "select_id": 2,
+ "operation": "INTERSECT",
+ "r_loops": 1,
+ "r_total_time_ms": "REPLACED",
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "r_loops": 1,
+ "rows": 4,
+ "r_rows": 4,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 100,
+ "r_filtered": 100
+ }
+ }
+ },
+ {
+ "query_block": {
+ "select_id": 3,
+ "operation": "INTERSECT",
+ "r_loops": 1,
+ "r_total_time_ms": "REPLACED",
+ "table": {
+ "table_name": "t3",
+ "access_type": "ALL",
+ "r_loops": 1,
+ "rows": 4,
+ "r_rows": 4,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 100,
+ "r_filtered": 100
+ }
+ }
+ }
+ ]
+ }
+ }
+}
+ANALYZE format=json select * from ((select a,b from t1) intersect all (select c,d from t2) intersect all (select e,f from t3)) a;
+ANALYZE
+{
+ "query_block": {
+ "select_id": 1,
+ "r_loops": 1,
+ "r_total_time_ms": "REPLACED",
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ALL",
+ "r_loops": 1,
+ "rows": 4,
+ "r_rows": 2,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 100,
+ "r_filtered": 100,
+ "materialized": {
+ "query_block": {
+ "union_result": {
+ "table_name": "<intersect2,3,4>",
+ "access_type": "ALL",
+ "r_loops": 1,
+ "r_rows": 2,
+ "query_specifications": [
+ {
+ "query_block": {
+ "select_id": 2,
+ "r_loops": 1,
+ "r_total_time_ms": "REPLACED",
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "r_loops": 1,
+ "rows": 4,
+ "r_rows": 4,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 100,
+ "r_filtered": 100
+ }
+ }
+ },
+ {
+ "query_block": {
+ "select_id": 3,
+ "operation": "INTERSECT",
+ "r_loops": 1,
+ "r_total_time_ms": "REPLACED",
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "r_loops": 1,
+ "rows": 4,
+ "r_rows": 4,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 100,
+ "r_filtered": 100
+ }
+ }
+ },
+ {
+ "query_block": {
+ "select_id": 4,
+ "operation": "INTERSECT",
+ "r_loops": 1,
+ "r_total_time_ms": "REPLACED",
+ "table": {
+ "table_name": "t3",
+ "access_type": "ALL",
+ "r_loops": 1,
+ "rows": 4,
+ "r_rows": 4,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 100,
+ "r_filtered": 100
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ }
+}
+select * from ((select a,b from t1) intersect all (select c,d from t2) intersect all (select e,f from t3)) a;
+a b
+2 2
+2 2
+prepare stmt from "(select a,b from t1) intersect all (select c,d from t2) intersect all (select e,f from t3);";
+execute stmt;
+a b
+2 2
+2 2
+execute stmt;
+a b
+2 2
+2 2
+prepare stmt from "select * from ((select a,b from t1) intersect all (select c,d from t2) intersect all (select e,f from t3)) a";
+execute stmt;
+a b
+2 2
+2 2
+execute stmt;
+a b
+2 2
+2 2
+insert into t1 values (2,2),(3,3);
+insert into t2 values (2,2),(2,2),(2,2);
+(select a,b from t1) intersect all (select c,d from t2) intersect all (select e,f from t3);
+a b
+2 2
+2 2
+(select a,b from t1) intersect (select c,d from t2) intersect all (select e,f from t3);
+a b
+2 2
+insert into t3 values (2,2);
+(select a,b from t1) intersect all (select c,d from t2) intersect (select e,f from t3);
+a b
+2 2
+(select a,b from t1) intersect all (select c,e from t2,t3);
+a b
+2 2
+2 2
+2 2
+EXPLAIN (select a,b from t1) intersect all (select c,e from t2,t3);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 6
+2 INTERSECT t3 ALL NULL NULL NULL NULL 5
+2 INTERSECT t2 ALL NULL NULL NULL NULL 7 Using join buffer (flat, BNL join)
+NULL INTERSECT RESULT <intersect1,2> ALL NULL NULL NULL NULL NULL
+EXPLAIN extended (select a,b from t1) intersect all (select c,e from t2,t3);
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 6 100.00
+2 INTERSECT t3 ALL NULL NULL NULL NULL 5 100.00
+2 INTERSECT t2 ALL NULL NULL NULL NULL 7 100.00 Using join buffer (flat, BNL join)
+NULL INTERSECT RESULT <intersect1,2> ALL NULL NULL NULL NULL NULL NULL
+Warnings:
+Note 1003 (/* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1`) intersect all (/* select#2 */ select `test`.`t2`.`c` AS `c`,`test`.`t3`.`e` AS `e` from `test`.`t2` join `test`.`t3`)
+EXPLAIN extended select * from ((select a,b from t1) intersect all (select c,e from t2,t3)) a;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY <derived2> ALL NULL NULL NULL NULL 6 100.00
+2 DERIVED t1 ALL NULL NULL NULL NULL 6 100.00
+3 INTERSECT t3 ALL NULL NULL NULL NULL 5 100.00
+3 INTERSECT t2 ALL NULL NULL NULL NULL 7 100.00 Using join buffer (flat, BNL join)
+NULL INTERSECT RESULT <intersect2,3> ALL NULL NULL NULL NULL NULL NULL
+Warnings:
+Note 1003 /* select#1 */ select `a`.`a` AS `a`,`a`.`b` AS `b` from ((/* select#2 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1`) intersect all (/* select#3 */ select `test`.`t2`.`c` AS `c`,`test`.`t3`.`e` AS `e` from `test`.`t2` join `test`.`t3`)) `a`
+EXPLAIN format=json (select a,b from t1) intersect all (select c,e from t2,t3);
+EXPLAIN
+{
+ "query_block": {
+ "union_result": {
+ "table_name": "<intersect1,2>",
+ "access_type": "ALL",
+ "query_specifications": [
+ {
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 6,
+ "filtered": 100
+ }
+ }
+ },
+ {
+ "query_block": {
+ "select_id": 2,
+ "operation": "INTERSECT",
+ "table": {
+ "table_name": "t3",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100
+ },
+ "block-nl-join": {
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 7,
+ "filtered": 100
+ },
+ "buffer_type": "flat",
+ "buffer_size": "65",
+ "join_type": "BNL"
+ }
+ }
+ }
+ ]
+ }
+ }
+}
+ANALYZE format=json (select a,b from t1) intersect all (select c,e from t2,t3);
+ANALYZE
+{
+ "query_block": {
+ "union_result": {
+ "table_name": "<intersect1,2>",
+ "access_type": "ALL",
+ "r_loops": 1,
+ "r_rows": 3,
+ "query_specifications": [
+ {
+ "query_block": {
+ "select_id": 1,
+ "r_loops": 1,
+ "r_total_time_ms": "REPLACED",
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "r_loops": 1,
+ "rows": 6,
+ "r_rows": 6,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 100,
+ "r_filtered": 100
+ }
+ }
+ },
+ {
+ "query_block": {
+ "select_id": 2,
+ "operation": "INTERSECT",
+ "r_loops": 1,
+ "r_total_time_ms": "REPLACED",
+ "table": {
+ "table_name": "t3",
+ "access_type": "ALL",
+ "r_loops": 1,
+ "rows": 5,
+ "r_rows": 5,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 100,
+ "r_filtered": 100
+ },
+ "block-nl-join": {
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "r_loops": 1,
+ "rows": 7,
+ "r_rows": 7,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 100,
+ "r_filtered": 100
+ },
+ "buffer_type": "flat",
+ "buffer_size": "65",
+ "join_type": "BNL",
+ "r_filtered": 100
+ }
+ }
+ }
+ ]
+ }
+ }
+}
+ANALYZE format=json select * from ((select a,b from t1) intersect all (select c,e from t2,t3)) a;
+ANALYZE
+{
+ "query_block": {
+ "select_id": 1,
+ "r_loops": 1,
+ "r_total_time_ms": "REPLACED",
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ALL",
+ "r_loops": 1,
+ "rows": 6,
+ "r_rows": 3,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 100,
+ "r_filtered": 100,
+ "materialized": {
+ "query_block": {
+ "union_result": {
+ "table_name": "<intersect2,3>",
+ "access_type": "ALL",
+ "r_loops": 1,
+ "r_rows": 3,
+ "query_specifications": [
+ {
+ "query_block": {
+ "select_id": 2,
+ "r_loops": 1,
+ "r_total_time_ms": "REPLACED",
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "r_loops": 1,
+ "rows": 6,
+ "r_rows": 6,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 100,
+ "r_filtered": 100
+ }
+ }
+ },
+ {
+ "query_block": {
+ "select_id": 3,
+ "operation": "INTERSECT",
+ "r_loops": 1,
+ "r_total_time_ms": "REPLACED",
+ "table": {
+ "table_name": "t3",
+ "access_type": "ALL",
+ "r_loops": 1,
+ "rows": 5,
+ "r_rows": 5,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 100,
+ "r_filtered": 100
+ },
+ "block-nl-join": {
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "r_loops": 1,
+ "rows": 7,
+ "r_rows": 7,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 100,
+ "r_filtered": 100
+ },
+ "buffer_type": "flat",
+ "buffer_size": "65",
+ "join_type": "BNL",
+ "r_filtered": 100
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ }
+}
+select * from ((select a,b from t1) intersect all (select c,e from t2,t3)) a;
+a b
+2 2
+2 2
+2 2
+prepare stmt from "(select a,b from t1) intersect all (select c,e from t2,t3);";
+execute stmt;
+a b
+2 2
+2 2
+2 2
+execute stmt;
+a b
+2 2
+2 2
+2 2
+prepare stmt from "select * from ((select a,b from t1) intersect all (select c,e from t2,t3)) a";
+execute stmt;
+a b
+2 2
+2 2
+2 2
+execute stmt;
+a b
+2 2
+2 2
+2 2
+drop tables t1,t2,t3;
+select 1 as a from dual intersect all select 1 from dual;
+a
+1
+(select 1 from dual) intersect all (select 1 from dual);
+1
+1
+(select 1 from dual into @v) intersect all (select 1 from dual);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'into @v) intersect all (select 1 from dual)' at line 1
+select 1 from dual ORDER BY 1 intersect all select 1 from dual;
+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 'intersect all select 1 from dual' at line 1
+select 1 as a from dual union all select 1 from dual;
+a
+1
+1
+create table t1 (a int, b blob, a1 int, b1 blob);
+create table t2 (c int, d blob, c1 int, d1 blob);
+insert into t1 values (1,"ddd", 1, "sdfrrwwww"),(2, "fgh", 2, "dffggtt"),(2, "fgh", 2, "dffggtt");
+insert into t2 values (2, "fgh", 2, "dffggtt"),(3, "ffggddd", 3, "dfgg"),(2, "fgh", 2, "dffggtt");
+(select a,b,b1 from t1) intersect all (select c,d,d1 from t2);
+a b b1
+2 fgh dffggtt
+2 fgh dffggtt
+drop tables t1,t2;
+create table t1 (a int, b blob) engine=MyISAM;
+create table t2 (c int, d blob) engine=MyISAM;
+create table t3 (e int, f blob) engine=MyISAM;
+insert into t1 values (1,1),(2,2),(3,3),(2,2),(3,3);
+insert into t2 values (2,2),(3,3),(4,4),(2,2),(2,2),(2,2);
+insert into t3 values (1,1),(2,2),(5,5),(2,2),(5,5);
+(select a,b from t1) intersect all (select c,d from t2) intersect all (select e,f from t3);
+a b
+2 2
+2 2
+select * from ((select a,b from t1) intersect all (select c,d from t2) intersect (select e,f from t3)) a;
+a b
+2 2
+prepare stmt from "(select a,b from t1) intersect all (select c,d from t2) intersect all (select e,f from t3);";
+execute stmt;
+a b
+2 2
+2 2
+execute stmt;
+a b
+2 2
+2 2
+prepare stmt from "select * from ((select a,b from t1) intersect all (select c,d from t2) intersect all (select e,f from t3)) a";
+execute stmt;
+a b
+2 2
+2 2
+execute stmt;
+a b
+2 2
+2 2
+create table t4 (select a,b from t1) intersect all (select c,d from t2) intersect all (select e,f from t3);
+show create table t4;
+Table Create Table
+t4 CREATE TABLE `t4` (
+ `a` int(11) DEFAULT NULL,
+ `b` blob DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+drop tables t4;
+(select a,b from t1) intersect all (select c,d from t2) intersect all (select e,f from t3) union all (select 4,4);
+a b
+4 4
+2 2
+2 2
+(select a,b from t1) intersect all (select c,d from t2) intersect all (select e,f from t3) union all (select 4,4) except all (select 2,2);
+a b
+4 4
+2 2
+drop tables t1,t2,t3;
+create table t1 (a int, b int);
+create table t2 (c int, d int);
+create table t3 (e int, f int);
+insert into t1 values (1,1),(2,2),(3,3),(2,2),(3,3);
+insert into t2 values (2,2),(3,3),(4,4),(2,2),(2,2),(2,2);
+insert into t3 values (1,1),(2,2),(5,5),(2,2),(5,5);
+(select a,b from t1) intersect all (select c,d from t2) intersect all (select e,f from t3) union all (select 4,4);
+a b
+4 4
+2 2
+2 2
+(select a,b from t1) intersect all (select c,d from t2) intersect all (select e,f from t3) union all (select 4,4) except all (select 2,2);
+a b
+4 4
+2 2
+drop tables t1,t2,t3;
+#
+# INTERSECT precedence
+#
+create table t1 (a int, b blob) engine=MyISAM;
+create table t2 (c int, d blob) engine=MyISAM;
+create table t3 (e int, f blob) engine=MyISAM;
+insert into t1 values (5,5),(6,6);
+insert into t2 values (2,2),(3,3);
+insert into t3 values (1,1),(3,3);
+(select a,b from t1) union all (select c,d from t2) intersect (select e,f from t3) union all (select 4,4);
+a b
+5 5
+6 6
+3 3
+4 4
+(select a,b from t1) union all (select c,d from t2) intersect all (select e,f from t3) union all (select 4,4);
+a b
+5 5
+6 6
+3 3
+4 4
+explain extended (select a,b from t1) union all (select c,d from t2) intersect all (select e,f from t3) union all (select 4,4);
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 2 100.00
+5 UNION <derived2> ALL NULL NULL NULL NULL 2 100.00
+2 DERIVED t2 ALL NULL NULL NULL NULL 2 100.00
+3 INTERSECT t3 ALL NULL NULL NULL NULL 2 100.00
+NULL INTERSECT RESULT <intersect2,3> ALL NULL NULL NULL NULL NULL NULL
+4 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used
+Warnings:
+Note 1003 (/* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1`) union all /* select#5 */ select `__5`.`c` AS `c`,`__5`.`d` AS `d` from ((/* select#2 */ select `test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t2`) intersect all (/* select#3 */ select `test`.`t3`.`e` AS `e`,`test`.`t3`.`f` AS `f` from `test`.`t3`)) `__5` union all (/* select#4 */ select 4 AS `4`,4 AS `4`)
+insert into t2 values (3,3);
+insert into t3 values (3,3);
+(select e,f from t3) intersect all (select c,d from t2) union all (select a,b from t1) union all (select 4,4);
+e f
+3 3
+3 3
+5 5
+6 6
+4 4
+explain extended (select e,f from t3) intersect all (select c,d from t2) union all (select a,b from t1) union all (select 4,4);
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00
+2 INTERSECT t2 ALL NULL NULL NULL NULL 3 100.00
+3 UNION t1 ALL NULL NULL NULL NULL 2 100.00
+4 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used
+NULL UNIT RESULT <unit1,2,3,4> ALL NULL NULL NULL NULL NULL NULL
+Warnings:
+Note 1003 (/* select#1 */ select `test`.`t3`.`e` AS `e`,`test`.`t3`.`f` AS `f` from `test`.`t3`) intersect all (/* select#2 */ select `test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t2`) union all (/* select#3 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1`) union all (/* select#4 */ select 4 AS `4`,4 AS `4`)
+(/* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1`) union /* select#3 */ select `__3`.`c` AS `c`,`__3`.`d` AS `d` from ((/* select#2 */ select `test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t2`) intersect all (/* select#4 */ select `test`.`t3`.`e` AS `e`,`test`.`t3`.`f` AS `f` from `test`.`t3`)) `__3` union (/* select#5 */ select 4 AS `4`,4 AS `4`);
+a b
+5 5
+6 6
+3 3
+4 4
+prepare stmt from "(select a,b from t1) union all (select c,d from t2) intersect all (select e,f from t3) union all (select 4,4)";
+execute stmt;
+a b
+5 5
+6 6
+3 3
+3 3
+4 4
+execute stmt;
+a b
+5 5
+6 6
+3 3
+3 3
+4 4
+create view v1 as (select a,b from t1) union all (select c,d from t2) intersect all (select e,f from t3) union all (select 4,4);
+select b,a,b+1 from v1;
+b a b+1
+5 5 6
+6 6 7
+3 3 4
+3 3 4
+4 4 5
+select b,a,b+1 from v1 where a > 3;
+b a b+1
+5 5 6
+6 6 7
+4 4 5
+create procedure p1()
+select * from v1;
+call p1();
+a b
+5 5
+6 6
+3 3
+3 3
+4 4
+call p1();
+a b
+5 5
+6 6
+3 3
+3 3
+4 4
+drop procedure p1;
+create procedure p1()
+(select a,b from t1) union all (select c,d from t2) intersect all (select e,f from t3) union all (select 4,4);
+call p1();
+a b
+5 5
+6 6
+3 3
+3 3
+4 4
+call p1();
+a b
+5 5
+6 6
+3 3
+3 3
+4 4
+drop procedure p1;
+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 `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1`) union all select `__6`.`c` AS `c`,`__6`.`d` AS `d` from ((select `test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t2`) intersect all (select `test`.`t3`.`e` AS `e`,`test`.`t3`.`f` AS `f` from `test`.`t3`)) `__6` union all (select 4 AS `4`,4 AS `4`) latin1 latin1_swedish_ci
+drop view v1;
+drop tables t1,t2,t3;
+CREATE TABLE t (i INT);
+INSERT INTO t VALUES (1),(2);
+SELECT * FROM t WHERE i != ANY ( SELECT 6 INTERSECT ALL SELECT 3 );
+i
+select i from t where
+exists ((select 6 as r from dual having t.i <> 6)
+intersect all
+(select 3 from dual having t.i <> 3));
+i
+drop table t;
+CREATE TABLE t1 (a varchar(32)) ENGINE=MyISAM;
+INSERT INTO t1 VALUES
+('Jakarta'),('Lisbon'),('Honolulu'),('Lusaka'),('Barcelona'),('Taipei'),
+('Brussels'),('Orlando'),('Osaka'),('Quito'),('Lima'),('Tunis'),
+('Unalaska'),('Rotterdam'),('Zagreb'),('Ufa'),('Ryazan'),('Xiamen'),
+('London'),('Izmir'),('Samara'),('Bern'),('Zhengzhou'),('Vladivostok'),
+('Yangon'),('Victoria'),('Warsaw'),('Luanda'),('Leon'),('Bangkok'),
+('Wellington'),('Zibo'),('Qiqihar'),('Delhi'),('Hamburg'),('Ottawa'),
+('Vaduz');
+CREATE TABLE t2 (b varchar(32)) ENGINE=MyISAM;
+INSERT INTO t2 VALUES
+('Gaza'),('Jeddah'),('Beirut'),('Incheon'),('Tbilisi'),('Izmir'),
+('Quito'),('Riga'),('Freetown'),('Zagreb'),('Caracas'),('Orlando'),
+('Kingston'),('Turin'),('Xinyang'),('Osaka'),('Albany'),('Geneva'),
+('Omsk'),('Kazan'),('Quezon'),('Indore'),('Odessa'),('Xiamen'),
+('Winnipeg'),('Yakutsk'),('Nairobi'),('Ufa'),('Helsinki'),('Vilnius'),
+('Aden'),('Liverpool'),('Honolulu'),('Frankfurt'),('Glasgow'),
+('Vienna'),('Jackson'),('Jakarta'),('Sydney'),('Oslo'),('Novgorod'),
+('Norilsk'),('Izhevsk'),('Istanbul'),('Nice');
+CREATE TABLE t3 (c varchar(32)) ENGINE=MyISAM;
+INSERT INTO t3 VALUES
+('Nicosia'),('Istanbul'),('Richmond'),('Stockholm'),('Dublin'),
+('Wichita'),('Warsaw'),('Glasgow'),('Winnipeg'),('Irkutsk'),('Quito'),
+('Xiamen'),('Berlin'),('Rome'),('Denver'),('Dallas'),('Kabul'),
+('Prague'),('Izhevsk'),('Tirana'),('Sofia'),('Detroit'),('Sorbonne');
+select count(*) from (
+SELECT * FROM t1 LEFT OUTER JOIN t2 LEFT OUTER JOIN t3 ON b < c ON a > b
+INTERSECT
+SELECT * FROM t1 LEFT OUTER JOIN t2 LEFT OUTER JOIN t3 ON b < c ON a > b
+) a;
+count(*)
+14848
+select count(*) from (
+SELECT * FROM t1 LEFT OUTER JOIN t2 LEFT OUTER JOIN t3 ON b < c ON a > b
+INTERSECT ALL
+SELECT * FROM t1 LEFT OUTER JOIN t2 LEFT OUTER JOIN t3 ON b < c ON a > b
+) a;
+count(*)
+14848
+insert into t1 values ('Xiamen');
+insert into t2 values ('Xiamen'),('Xiamen');
+insert into t3 values ('Xiamen');
+select count(*) from (
+SELECT * FROM t1 LEFT OUTER JOIN t2 LEFT OUTER JOIN t3 ON b < c ON a > b
+INTERSECT ALL
+SELECT * FROM t1 LEFT OUTER JOIN t2 LEFT OUTER JOIN t3 ON b < c ON a > b
+) a;
+count(*)
+16430
+drop table t1,t2,t3;
+CREATE TABLE t1 (a varchar(32) not null) ENGINE=MyISAM;
+INSERT INTO t1 VALUES
+('Jakarta'),('Lisbon'),('Honolulu'),('Lusaka'),('Barcelona'),('Taipei'),
+('Brussels'),('Orlando'),('Osaka'),('Quito'),('Lima'),('Tunis'),
+('Unalaska'),('Rotterdam'),('Zagreb'),('Ufa'),('Ryazan'),('Xiamen'),
+('London'),('Izmir'),('Samara'),('Bern'),('Zhengzhou'),('Vladivostok'),
+('Yangon'),('Victoria'),('Warsaw'),('Luanda'),('Leon'),('Bangkok'),
+('Wellington'),('Zibo'),('Qiqihar'),('Delhi'),('Hamburg'),('Ottawa'),
+('Vaduz'),('Detroit'),('Detroit');
+CREATE TABLE t2 (b varchar(32) not null) ENGINE=MyISAM;
+INSERT INTO t2 VALUES
+('Gaza'),('Jeddah'),('Beirut'),('Incheon'),('Tbilisi'),('Izmir'),
+('Quito'),('Riga'),('Freetown'),('Zagreb'),('Caracas'),('Orlando'),
+('Kingston'),('Turin'),('Xinyang'),('Osaka'),('Albany'),('Geneva'),
+('Omsk'),('Kazan'),('Quezon'),('Indore'),('Odessa'),('Xiamen'),
+('Winnipeg'),('Yakutsk'),('Nairobi'),('Ufa'),('Helsinki'),('Vilnius'),
+('Aden'),('Liverpool'),('Honolulu'),('Frankfurt'),('Glasgow'),
+('Vienna'),('Jackson'),('Jakarta'),('Sydney'),('Oslo'),('Novgorod'),
+('Norilsk'),('Izhevsk'),('Istanbul'),('Nice'),('Detroit'),('Detroit');
+CREATE TABLE t3 (c varchar(32) not null) ENGINE=MyISAM;
+INSERT INTO t3 VALUES
+('Nicosia'),('Istanbul'),('Richmond'),('Stockholm'),('Dublin'),
+('Wichita'),('Warsaw'),('Glasgow'),('Winnipeg'),('Irkutsk'),('Quito'),
+('Xiamen'),('Berlin'),('Rome'),('Denver'),('Dallas'),('Kabul'),
+('Prague'),('Izhevsk'),('Tirana'),('Sofia'),('Detroit'),('Sorbonne'),
+('Detroit');
+select count(*) from (
+SELECT * FROM t1 LEFT OUTER JOIN t2 LEFT OUTER JOIN t3 ON b < c ON a > b
+INTERSECT
+SELECT * FROM t1 LEFT OUTER JOIN t2 LEFT OUTER JOIN t3 ON b < c ON a > b
+) a;
+count(*)
+15547
+drop table t1,t2,t3;
+create table t12(c1 int);
+insert into t12 values(1);
+insert into t12 values(2);
+create table t13(c1 int);
+insert into t13 values(1);
+insert into t13 values(3);
+create table t234(c1 int);
+insert into t234 values(2);
+insert into t234 values(3);
+insert into t234 values(4);
+select * from t13 union select * from t234 intersect all select * from t12;
+c1
+1
+3
+2
+drop table t12,t13,t234;
+create table t1 (a int);
+insert into t1 values (3), (1), (7), (3), (2), (7), (4);
+create table t2 (a int);
+insert into t2 values (4), (5), (9), (1), (8), (9), (2), (2);
+create table t3 (a int);
+insert into t3 values (8), (1), (8), (2), (3), (7), (2);
+select * from t1 where a > 4
+union all
+select * from t2 where a < 5
+intersect all
+select * from t3 where a < 5;
+a
+7
+7
+2
+1
+2
+explain extended
+select * from t1 where a > 4
+union all
+select * from t2 where a < 5
+intersect all
+select * from t3 where a < 5;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 7 100.00 Using where
+4 UNION <derived2> ALL NULL NULL NULL NULL 7 100.00
+2 DERIVED t2 ALL NULL NULL NULL NULL 8 100.00 Using where
+3 INTERSECT t3 ALL NULL NULL NULL NULL 7 100.00 Using where
+NULL INTERSECT RESULT <intersect2,3> ALL NULL NULL NULL NULL NULL NULL
+Warnings:
+Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` > 4 union all /* select#4 */ select `__4`.`a` AS `a` from (/* select#2 */ select `test`.`t2`.`a` AS `a` from `test`.`t2` where `test`.`t2`.`a` < 5 intersect all /* select#3 */ select `test`.`t3`.`a` AS `a` from `test`.`t3` where `test`.`t3`.`a` < 5) `__4`
+drop table t1,t2,t3;
diff --git a/mysql-test/main/intersect_all.test b/mysql-test/main/intersect_all.test
new file mode 100644
index 00000000000..5d2b038fde9
--- /dev/null
+++ b/mysql-test/main/intersect_all.test
@@ -0,0 +1,328 @@
+create table t1 (a int, b int) engine=MyISAM;
+create table t2 (c int, d int) engine=MyISAM;
+insert into t1 values (1,1),(2,2),(3,3),(2,2);
+insert into t2 values (2,2),(2,2),(5,5);
+
+select * from t1 intersect all select * from t2;
+(select a,b from t1) intersect all (select c,d from t2);
+select * from ((select a,b from t1) intersect all (select c,d from t2)) t;
+select * from ((select a from t1) intersect all (select c from t2)) t;
+
+drop tables t1,t2;
+
+create table t1 (a int, b int) engine=MyISAM;
+create table t2 (c int, d int) engine=MyISAM;
+create table t3 (e int, f int) engine=MyISAM;
+insert into t1 values (1,1),(2,2),(3,3),(2,2);
+insert into t2 values (2,2),(3,3),(4,4),(2,2);
+insert into t3 values (1,1),(2,2),(5,5),(2,2);
+
+(select a,b from t1) intersect all (select c,d from t2) intersect all (select e,f from t3);
+
+EXPLAIN (select a,b from t1) intersect all (select c,d from t2) intersect all (select e,f from t3);
+EXPLAIN extended (select a,b from t1) intersect all (select c,d from t2) intersect all (select e,f from t3);
+EXPLAIN extended select * from ((select a,b from t1) intersect all (select c,d from t2) intersect all (select e,f from t3)) a;
+EXPLAIN format=json (select a,b from t1) intersect all (select c,d from t2) intersect all (select e,f from t3);
+--source include/analyze-format.inc
+ANALYZE format=json (select a,b from t1) intersect all (select c,d from t2) intersect all (select e,f from t3);
+--source include/analyze-format.inc
+ANALYZE format=json select * from ((select a,b from t1) intersect all (select c,d from t2) intersect all (select e,f from t3)) a;
+select * from ((select a,b from t1) intersect all (select c,d from t2) intersect all (select e,f from t3)) a;
+
+prepare stmt from "(select a,b from t1) intersect all (select c,d from t2) intersect all (select e,f from t3);";
+execute stmt;
+execute stmt;
+
+prepare stmt from "select * from ((select a,b from t1) intersect all (select c,d from t2) intersect all (select e,f from t3)) a";
+execute stmt;
+execute stmt;
+
+insert into t1 values (2,2),(3,3);
+insert into t2 values (2,2),(2,2),(2,2);
+(select a,b from t1) intersect all (select c,d from t2) intersect all (select e,f from t3);
+(select a,b from t1) intersect (select c,d from t2) intersect all (select e,f from t3);
+
+insert into t3 values (2,2);
+(select a,b from t1) intersect all (select c,d from t2) intersect (select e,f from t3);
+
+(select a,b from t1) intersect all (select c,e from t2,t3);
+
+EXPLAIN (select a,b from t1) intersect all (select c,e from t2,t3);
+EXPLAIN extended (select a,b from t1) intersect all (select c,e from t2,t3);
+EXPLAIN extended select * from ((select a,b from t1) intersect all (select c,e from t2,t3)) a;
+EXPLAIN format=json (select a,b from t1) intersect all (select c,e from t2,t3);
+--source include/analyze-format.inc
+ANALYZE format=json (select a,b from t1) intersect all (select c,e from t2,t3);
+--source include/analyze-format.inc
+ANALYZE format=json select * from ((select a,b from t1) intersect all (select c,e from t2,t3)) a;
+select * from ((select a,b from t1) intersect all (select c,e from t2,t3)) a;
+
+prepare stmt from "(select a,b from t1) intersect all (select c,e from t2,t3);";
+execute stmt;
+execute stmt;
+
+prepare stmt from "select * from ((select a,b from t1) intersect all (select c,e from t2,t3)) a";
+execute stmt;
+execute stmt;
+
+drop tables t1,t2,t3;
+
+select 1 as a from dual intersect all select 1 from dual;
+(select 1 from dual) intersect all (select 1 from dual);
+--error ER_PARSE_ERROR
+(select 1 from dual into @v) intersect all (select 1 from dual);
+--error ER_PARSE_ERROR
+select 1 from dual ORDER BY 1 intersect all select 1 from dual;
+select 1 as a from dual union all select 1 from dual;
+
+create table t1 (a int, b blob, a1 int, b1 blob);
+create table t2 (c int, d blob, c1 int, d1 blob);
+insert into t1 values (1,"ddd", 1, "sdfrrwwww"),(2, "fgh", 2, "dffggtt"),(2, "fgh", 2, "dffggtt");
+insert into t2 values (2, "fgh", 2, "dffggtt"),(3, "ffggddd", 3, "dfgg"),(2, "fgh", 2, "dffggtt");
+
+(select a,b,b1 from t1) intersect all (select c,d,d1 from t2);
+
+drop tables t1,t2;
+
+create table t1 (a int, b blob) engine=MyISAM;
+create table t2 (c int, d blob) engine=MyISAM;
+create table t3 (e int, f blob) engine=MyISAM;
+insert into t1 values (1,1),(2,2),(3,3),(2,2),(3,3);
+insert into t2 values (2,2),(3,3),(4,4),(2,2),(2,2),(2,2);
+insert into t3 values (1,1),(2,2),(5,5),(2,2),(5,5);
+
+(select a,b from t1) intersect all (select c,d from t2) intersect all (select e,f from t3);
+select * from ((select a,b from t1) intersect all (select c,d from t2) intersect (select e,f from t3)) a;
+
+prepare stmt from "(select a,b from t1) intersect all (select c,d from t2) intersect all (select e,f from t3);";
+execute stmt;
+execute stmt;
+
+prepare stmt from "select * from ((select a,b from t1) intersect all (select c,d from t2) intersect all (select e,f from t3)) a";
+execute stmt;
+execute stmt;
+
+# make sure that blob is used
+create table t4 (select a,b from t1) intersect all (select c,d from t2) intersect all (select e,f from t3);
+show create table t4;
+drop tables t4;
+
+
+(select a,b from t1) intersect all (select c,d from t2) intersect all (select e,f from t3) union all (select 4,4);
+
+(select a,b from t1) intersect all (select c,d from t2) intersect all (select e,f from t3) union all (select 4,4) except all (select 2,2);
+
+drop tables t1,t2,t3;
+
+create table t1 (a int, b int);
+create table t2 (c int, d int);
+create table t3 (e int, f int);
+insert into t1 values (1,1),(2,2),(3,3),(2,2),(3,3);
+insert into t2 values (2,2),(3,3),(4,4),(2,2),(2,2),(2,2);
+insert into t3 values (1,1),(2,2),(5,5),(2,2),(5,5);
+
+
+(select a,b from t1) intersect all (select c,d from t2) intersect all (select e,f from t3) union all (select 4,4);
+
+(select a,b from t1) intersect all (select c,d from t2) intersect all (select e,f from t3) union all (select 4,4) except all (select 2,2);
+
+drop tables t1,t2,t3;
+
+--echo #
+--echo # INTERSECT precedence
+--echo #
+create table t1 (a int, b blob) engine=MyISAM;
+create table t2 (c int, d blob) engine=MyISAM;
+create table t3 (e int, f blob) engine=MyISAM;
+insert into t1 values (5,5),(6,6);
+insert into t2 values (2,2),(3,3);
+insert into t3 values (1,1),(3,3);
+
+
+
+(select a,b from t1) union all (select c,d from t2) intersect (select e,f from t3) union all (select 4,4);
+
+(select a,b from t1) union all (select c,d from t2) intersect all (select e,f from t3) union all (select 4,4);
+explain extended (select a,b from t1) union all (select c,d from t2) intersect all (select e,f from t3) union all (select 4,4);
+
+# test result of linear mix operation
+insert into t2 values (3,3);
+insert into t3 values (3,3);
+
+(select e,f from t3) intersect all (select c,d from t2) union all (select a,b from t1) union all (select 4,4);
+explain extended (select e,f from t3) intersect all (select c,d from t2) union all (select a,b from t1) union all (select 4,4);
+
+
+(/* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1`) union /* select#3 */ select `__3`.`c` AS `c`,`__3`.`d` AS `d` from ((/* select#2 */ select `test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t2`) intersect all (/* select#4 */ select `test`.`t3`.`e` AS `e`,`test`.`t3`.`f` AS `f` from `test`.`t3`)) `__3` union (/* select#5 */ select 4 AS `4`,4 AS `4`);
+
+prepare stmt from "(select a,b from t1) union all (select c,d from t2) intersect all (select e,f from t3) union all (select 4,4)";
+
+execute stmt;
+
+execute stmt;
+
+create view v1 as (select a,b from t1) union all (select c,d from t2) intersect all (select e,f from t3) union all (select 4,4);
+
+
+select b,a,b+1 from v1;
+
+select b,a,b+1 from v1 where a > 3;
+
+create procedure p1()
+ select * from v1;
+
+call p1();
+
+call p1();
+drop procedure p1;
+
+create procedure p1()
+ (select a,b from t1) union all (select c,d from t2) intersect all (select e,f from t3) union all (select 4,4);
+
+call p1();
+
+call p1();
+drop procedure p1;
+
+show create view v1;
+
+drop view v1;
+drop tables t1,t2,t3;
+
+CREATE TABLE t (i INT);
+INSERT INTO t VALUES (1),(2);
+SELECT * FROM t WHERE i != ANY ( SELECT 6 INTERSECT ALL SELECT 3 );
+
+select i from t where
+ exists ((select 6 as r from dual having t.i <> 6)
+ intersect all
+ (select 3 from dual having t.i <> 3));
+
+drop table t;
+
+CREATE TABLE t1 (a varchar(32)) ENGINE=MyISAM;
+INSERT INTO t1 VALUES
+('Jakarta'),('Lisbon'),('Honolulu'),('Lusaka'),('Barcelona'),('Taipei'),
+('Brussels'),('Orlando'),('Osaka'),('Quito'),('Lima'),('Tunis'),
+('Unalaska'),('Rotterdam'),('Zagreb'),('Ufa'),('Ryazan'),('Xiamen'),
+('London'),('Izmir'),('Samara'),('Bern'),('Zhengzhou'),('Vladivostok'),
+('Yangon'),('Victoria'),('Warsaw'),('Luanda'),('Leon'),('Bangkok'),
+('Wellington'),('Zibo'),('Qiqihar'),('Delhi'),('Hamburg'),('Ottawa'),
+('Vaduz');
+
+CREATE TABLE t2 (b varchar(32)) ENGINE=MyISAM;
+INSERT INTO t2 VALUES
+('Gaza'),('Jeddah'),('Beirut'),('Incheon'),('Tbilisi'),('Izmir'),
+('Quito'),('Riga'),('Freetown'),('Zagreb'),('Caracas'),('Orlando'),
+('Kingston'),('Turin'),('Xinyang'),('Osaka'),('Albany'),('Geneva'),
+('Omsk'),('Kazan'),('Quezon'),('Indore'),('Odessa'),('Xiamen'),
+('Winnipeg'),('Yakutsk'),('Nairobi'),('Ufa'),('Helsinki'),('Vilnius'),
+('Aden'),('Liverpool'),('Honolulu'),('Frankfurt'),('Glasgow'),
+('Vienna'),('Jackson'),('Jakarta'),('Sydney'),('Oslo'),('Novgorod'),
+('Norilsk'),('Izhevsk'),('Istanbul'),('Nice');
+
+CREATE TABLE t3 (c varchar(32)) ENGINE=MyISAM;
+INSERT INTO t3 VALUES
+('Nicosia'),('Istanbul'),('Richmond'),('Stockholm'),('Dublin'),
+('Wichita'),('Warsaw'),('Glasgow'),('Winnipeg'),('Irkutsk'),('Quito'),
+('Xiamen'),('Berlin'),('Rome'),('Denver'),('Dallas'),('Kabul'),
+('Prague'),('Izhevsk'),('Tirana'),('Sofia'),('Detroit'),('Sorbonne');
+
+select count(*) from (
+ SELECT * FROM t1 LEFT OUTER JOIN t2 LEFT OUTER JOIN t3 ON b < c ON a > b
+ INTERSECT
+ SELECT * FROM t1 LEFT OUTER JOIN t2 LEFT OUTER JOIN t3 ON b < c ON a > b
+) a;
+
+select count(*) from (
+ SELECT * FROM t1 LEFT OUTER JOIN t2 LEFT OUTER JOIN t3 ON b < c ON a > b
+ INTERSECT ALL
+ SELECT * FROM t1 LEFT OUTER JOIN t2 LEFT OUTER JOIN t3 ON b < c ON a > b
+) a;
+
+insert into t1 values ('Xiamen');
+insert into t2 values ('Xiamen'),('Xiamen');
+insert into t3 values ('Xiamen');
+select count(*) from (
+ SELECT * FROM t1 LEFT OUTER JOIN t2 LEFT OUTER JOIN t3 ON b < c ON a > b
+ INTERSECT ALL
+ SELECT * FROM t1 LEFT OUTER JOIN t2 LEFT OUTER JOIN t3 ON b < c ON a > b
+) a;
+
+drop table t1,t2,t3;
+
+CREATE TABLE t1 (a varchar(32) not null) ENGINE=MyISAM;
+INSERT INTO t1 VALUES
+('Jakarta'),('Lisbon'),('Honolulu'),('Lusaka'),('Barcelona'),('Taipei'),
+('Brussels'),('Orlando'),('Osaka'),('Quito'),('Lima'),('Tunis'),
+('Unalaska'),('Rotterdam'),('Zagreb'),('Ufa'),('Ryazan'),('Xiamen'),
+('London'),('Izmir'),('Samara'),('Bern'),('Zhengzhou'),('Vladivostok'),
+('Yangon'),('Victoria'),('Warsaw'),('Luanda'),('Leon'),('Bangkok'),
+('Wellington'),('Zibo'),('Qiqihar'),('Delhi'),('Hamburg'),('Ottawa'),
+('Vaduz'),('Detroit'),('Detroit');
+
+CREATE TABLE t2 (b varchar(32) not null) ENGINE=MyISAM;
+INSERT INTO t2 VALUES
+('Gaza'),('Jeddah'),('Beirut'),('Incheon'),('Tbilisi'),('Izmir'),
+('Quito'),('Riga'),('Freetown'),('Zagreb'),('Caracas'),('Orlando'),
+('Kingston'),('Turin'),('Xinyang'),('Osaka'),('Albany'),('Geneva'),
+('Omsk'),('Kazan'),('Quezon'),('Indore'),('Odessa'),('Xiamen'),
+('Winnipeg'),('Yakutsk'),('Nairobi'),('Ufa'),('Helsinki'),('Vilnius'),
+('Aden'),('Liverpool'),('Honolulu'),('Frankfurt'),('Glasgow'),
+('Vienna'),('Jackson'),('Jakarta'),('Sydney'),('Oslo'),('Novgorod'),
+('Norilsk'),('Izhevsk'),('Istanbul'),('Nice'),('Detroit'),('Detroit');
+
+CREATE TABLE t3 (c varchar(32) not null) ENGINE=MyISAM;
+INSERT INTO t3 VALUES
+('Nicosia'),('Istanbul'),('Richmond'),('Stockholm'),('Dublin'),
+('Wichita'),('Warsaw'),('Glasgow'),('Winnipeg'),('Irkutsk'),('Quito'),
+('Xiamen'),('Berlin'),('Rome'),('Denver'),('Dallas'),('Kabul'),
+('Prague'),('Izhevsk'),('Tirana'),('Sofia'),('Detroit'),('Sorbonne'),
+('Detroit');
+
+select count(*) from (
+ SELECT * FROM t1 LEFT OUTER JOIN t2 LEFT OUTER JOIN t3 ON b < c ON a > b
+ INTERSECT
+ SELECT * FROM t1 LEFT OUTER JOIN t2 LEFT OUTER JOIN t3 ON b < c ON a > b
+) a;
+
+drop table t1,t2,t3;
+
+create table t12(c1 int);
+insert into t12 values(1);
+insert into t12 values(2);
+create table t13(c1 int);
+insert into t13 values(1);
+insert into t13 values(3);
+create table t234(c1 int);
+insert into t234 values(2);
+insert into t234 values(3);
+insert into t234 values(4);
+
+
+select * from t13 union select * from t234 intersect all select * from t12;
+
+drop table t12,t13,t234;
+
+create table t1 (a int);
+insert into t1 values (3), (1), (7), (3), (2), (7), (4);
+create table t2 (a int);
+insert into t2 values (4), (5), (9), (1), (8), (9), (2), (2);
+create table t3 (a int);
+insert into t3 values (8), (1), (8), (2), (3), (7), (2);
+
+
+select * from t1 where a > 4
+union all
+select * from t2 where a < 5
+intersect all
+select * from t3 where a < 5;
+
+explain extended
+select * from t1 where a > 4
+union all
+select * from t2 where a < 5
+intersect all
+select * from t3 where a < 5;
+
+drop table t1,t2,t3; \ No newline at end of file
diff --git a/mysql-test/main/join.result b/mysql-test/main/join.result
index 9bccf358fb7..d8eb9795b4e 100644
--- a/mysql-test/main/join.result
+++ b/mysql-test/main/join.result
@@ -1473,8 +1473,8 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE DU system dog_id NULL NULL NULL 1
1 SIMPLE D system PRIMARY NULL NULL NULL 1
1 SIMPLE DSAR system NULL NULL NULL NULL 1
-1 SIMPLE DT range t_id t_id 2 NULL 2 Using where
-1 SIMPLE DSA ref PRIMARY PRIMARY 8 const,test.DT.t_id,func 1 Using index
+1 SIMPLE DSA ref PRIMARY PRIMARY 4 const 3 Using where; Using index
+1 SIMPLE DT ALL t_id NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join)
SELECT * FROM t5 DU, t1 D, t4 DT, t2 DSA, t3 DSAR
WHERE DU.dog_id=D.dog_id AND D.dog_id=DT.dog_id AND D.birthday=DT.birthday AND
DT.t_id=DSA.t_id AND DT.birthday=DSA.birthday AND DSA.dog_id=DSAR.dog_id;
diff --git a/mysql-test/main/join_cache.result b/mysql-test/main/join_cache.result
index e8fe3a10b18..79c5b7923bd 100644
--- a/mysql-test/main/join_cache.result
+++ b/mysql-test/main/join_cache.result
@@ -5060,8 +5060,8 @@ EXPLAIN
SELECT * FROM t1,t2
WHERE t1.f1 = t2.f4 AND (t1.f3 = 1 AND t2.f3 = 4 OR t1.f3 = 2 AND t2.f3 = 6);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 2 Using where
-1 SIMPLE t2 ALL PRIMARY NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join)
+1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 2 Using where; Rowid-ordered scan
+1 SIMPLE t2 range PRIMARY PRIMARY 4 NULL 2 Using where; Rowid-ordered scan; Using join buffer (flat, BNL join)
SELECT * FROM t1,t2
WHERE t1.f1 = t2.f4 AND (t1.f3 = 1 AND t2.f3 = 4 OR t1.f3 = 2 AND t2.f3 = 6);
f1 f3 f3 f2 f4
@@ -5070,8 +5070,8 @@ EXPLAIN
SELECT * FROM t1,t2
WHERE t1.f1 = t2.f4 AND (t1.f3 = 1 AND t2.f3 = 4 OR t1.f3 = 2 AND t2.f3 = 6);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 2 Using where
-1 SIMPLE t2 ALL PRIMARY NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join)
+1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 2 Using index condition; Rowid-ordered scan
+1 SIMPLE t2 range PRIMARY PRIMARY 4 NULL 2 Using index condition; Using where; Rowid-ordered scan; Using join buffer (flat, BNL join)
SELECT * FROM t1,t2
WHERE t1.f1 = t2.f4 AND (t1.f3 = 1 AND t2.f3 = 4 OR t1.f3 = 2 AND t2.f3 = 6);
f1 f3 f3 f2 f4
@@ -6197,7 +6197,7 @@ EXPLAIN
"select_id": 1,
"table": {
"table_name": "a",
- "access_type": "index",
+ "access_type": "range",
"possible_keys": ["PRIMARY"],
"key": "PRIMARY",
"key_length": "4",
@@ -6216,7 +6216,7 @@ EXPLAIN
"key_length": "10",
"used_key_parts": ["kp1", "kp2"],
"rows": 836,
- "filtered": 76.434,
+ "filtered": 76.43428802,
"index_condition": "b.kp2 <= 10",
"attached_condition": "b.kp2 <= 10 and b.col1 + 1 < 33333"
},
diff --git a/mysql-test/main/join_nested.result b/mysql-test/main/join_nested.result
index 4f6583b6fbc..b323190d8d5 100644
--- a/mysql-test/main/join_nested.result
+++ b/mysql-test/main/join_nested.result
@@ -1284,9 +1284,9 @@ NULL 2 2
DELETE FROM t3;
EXPLAIN SELECT a, b, c FROM t1 LEFT JOIN (t2, t3) ON b < 3 and b = c;
id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t3 const c NULL NULL NULL 1 Impossible ON condition
+1 SIMPLE t2 const b NULL NULL NULL 1 Impossible ON condition
1 SIMPLE t1 index NULL a 5 NULL 21 Using index
-1 SIMPLE t3 index c c 5 NULL 0 Using where; Using index
-1 SIMPLE t2 ref b b 5 test.t3.c 2 Using index
SELECT a, b, c FROM t1 LEFT JOIN (t2, t3) ON b < 3 and b = c;
a b c
NULL NULL NULL
diff --git a/mysql-test/main/join_nested_jcl6.result b/mysql-test/main/join_nested_jcl6.result
index 3293f20aa17..f7d0242244d 100644
--- a/mysql-test/main/join_nested_jcl6.result
+++ b/mysql-test/main/join_nested_jcl6.result
@@ -1293,9 +1293,9 @@ NULL 2 2
DELETE FROM t3;
EXPLAIN SELECT a, b, c FROM t1 LEFT JOIN (t2, t3) ON b < 3 and b = c;
id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t3 const c NULL NULL NULL 1 Impossible ON condition
+1 SIMPLE t2 const b NULL NULL NULL 1 Impossible ON condition
1 SIMPLE t1 index NULL a 5 NULL 21 Using index
-1 SIMPLE t3 index c c 5 NULL 0 Using where; Using index
-1 SIMPLE t2 ref b b 5 test.t3.c 2 Using index
SELECT a, b, c FROM t1 LEFT JOIN (t2, t3) ON b < 3 and b = c;
a b c
NULL NULL NULL
@@ -2034,7 +2034,7 @@ ON t6.b >= 2 AND t5.b=t7.b AND
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t5 ALL NULL NULL NULL NULL 3
1 SIMPLE t7 ref|filter PRIMARY,b_i b_i|PRIMARY 5|4 test.t5.b 2 (29%) Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan; Using rowid filter
-1 SIMPLE t6 range PRIMARY,b_i PRIMARY 4 NULL 3 Using where; Rowid-ordered scan; Using join buffer (incremental, BNL join)
+1 SIMPLE t6 range|filter PRIMARY,b_i PRIMARY|b_i 4|5 NULL 3 (86%) Using where; Rowid-ordered scan; Using join buffer (incremental, BNL join); Using rowid filter
1 SIMPLE t8 ref b_i b_i 5 test.t5.b 2 Using where; Using join buffer (incremental, BKA join); Key-ordered Rowid-ordered scan
SELECT t5.a,t5.b,t6.a,t6.b,t7.a,t7.b,t8.a,t8.b
FROM t5
diff --git a/mysql-test/main/join_outer.result b/mysql-test/main/join_outer.result
index b7fcb55e4fe..fcffeb6d161 100644
--- a/mysql-test/main/join_outer.result
+++ b/mysql-test/main/join_outer.result
@@ -1740,7 +1740,7 @@ from t1,t2
where t2.pk=t1.pk+1000 and t1.pk>1000
group by t2.pk;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 PRIMARY t1 index PRIMARY PRIMARY 4 NULL 2 50.00 Using where; Using index; Using temporary; Using filesort
+1 PRIMARY t1 range PRIMARY PRIMARY 4 NULL 1 100.00 Using where; Using index; Using temporary; Using filesort
1 PRIMARY t2 eq_ref PRIMARY PRIMARY 4 func 1 100.00 Using where; Using index
2 DEPENDENT SUBQUERY t3 eq_ref PRIMARY PRIMARY 4 func 1 100.00 Using where; Using index
2 DEPENDENT SUBQUERY t4 eq_ref PRIMARY PRIMARY 4 test.t3.pk 1 100.00 Using index
@@ -2272,11 +2272,11 @@ id select_type table type possible_keys key key_len ref rows Extra
explain select * from t1 left join t2 on t2.b is null;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 9
-1 SIMPLE t2 ref b b 5 const 780 Using where
+1 SIMPLE t2 ALL b NULL NULL NULL 1000 Using where
explain select * from t1 left join t2 on t2.c is null;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 9
-1 SIMPLE t2 ref c c 5 const 393 Using where
+1 SIMPLE t2 ALL c NULL NULL NULL 1000 Using where
drop table t1,t2;
#
# MDEV-10006: optimizer doesn't convert outer join to inner on views with WHERE clause
diff --git a/mysql-test/main/join_outer_innodb.result b/mysql-test/main/join_outer_innodb.result
index a0358094baa..09a37a29702 100644
--- a/mysql-test/main/join_outer_innodb.result
+++ b/mysql-test/main/join_outer_innodb.result
@@ -8,13 +8,13 @@ EXPLAIN
SELECT COUNT(*) FROM t2 LEFT JOIN t1 ON t2.fkey = t1.id
WHERE t1.name LIKE 'A%';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index PRIMARY,name name 23 NULL 3 Using where; Using index
+1 SIMPLE t1 range PRIMARY,name name 23 NULL 2 Using where; Using index
1 SIMPLE t2 ref fkey fkey 5 test.t1.id 1 Using index
EXPLAIN
SELECT COUNT(*) FROM t2 LEFT JOIN t1 ON t2.fkey = t1.id
WHERE t1.name LIKE 'A%' OR FALSE;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index PRIMARY,name name 23 NULL 3 Using where; Using index
+1 SIMPLE t1 range PRIMARY,name name 23 NULL 2 Using where; Using index
1 SIMPLE t2 ref fkey fkey 5 test.t1.id 1 Using index
DROP TABLE t1,t2;
#
@@ -433,47 +433,47 @@ left join t16 on t15.o1 = t16.p1
where t1.a10 = 1;
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
+1 SIMPLE t2 ref PRIMARY PRIMARY 4 test.t1.a1 1 Using index
+1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.b2 1 Using where; Using index
+1 SIMPLE t4 eq_ref PRIMARY PRIMARY 4 test.t1.a2 1 Using index
+1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.d1 1 Using where
+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 t2 ref PRIMARY PRIMARY 4 test.t1.a1 1 Using index
+1 SIMPLE t13 ref PRIMARY,m3 m3 8 const,test.t1.a1 1 Using index
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 t3 eq_ref PRIMARY PRIMARY 4 test.t2.b2 1 Using where; Using index
-1 SIMPLE t9 ref PRIMARY PRIMARY 1 test.t1.a4 1
+1 SIMPLE m2 ref PRIMARY,m3 m3 8 const,test.t1.a1 1 Using index
1 SIMPLE l3 eq_ref PRIMARY PRIMARY 4 test.m2.m2 1 Using where
-1 SIMPLE t14 ALL PRIMARY NULL NULL NULL 4 Using where; Using join buffer (flat, BNL join)
-1 SIMPLE t4 eq_ref PRIMARY PRIMARY 4 test.t1.a2 1 Using index
+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)
-1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.d1 1 Using where
-1 SIMPLE t6 eq_ref PRIMARY PRIMARY 4 test.t1.a3 1 Using where; Using index
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
+1 SIMPLE t2 ref PRIMARY PRIMARY 4 test.t1.a1 1 Using index
+1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.b2 1 Using where; Using index
+1 SIMPLE t4 eq_ref PRIMARY PRIMARY 4 test.t1.a2 1 Using index
+1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.d1 1 Using where
+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 t2 ref PRIMARY PRIMARY 4 test.t1.a1 1 Using index
+1 SIMPLE t13 ref PRIMARY,m3 m3 8 const,test.t1.a1 1 Using index
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 t3 eq_ref PRIMARY PRIMARY 4 test.t2.b2 1 Using where; Using index
-1 SIMPLE t9 ref PRIMARY PRIMARY 1 test.t1.a4 1
+1 SIMPLE m2 ref PRIMARY,m3 m3 8 const,test.t1.a1 1 Using index
1 SIMPLE l3 eq_ref PRIMARY PRIMARY 4 test.m2.m2 1 Using where
-1 SIMPLE t14 ALL PRIMARY NULL NULL NULL 4 Using where; Using join buffer (flat, BNL join)
-1 SIMPLE t4 eq_ref PRIMARY PRIMARY 4 test.t1.a2 1 Using index
+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)
-1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.d1 1 Using where
-1 SIMPLE t6 eq_ref PRIMARY PRIMARY 4 test.t1.a3 1 Using where; Using index
drop view v1;
drop table t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16;
#
@@ -481,9 +481,7 @@ drop table t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16;
#
drop table if exists t1,t2,t3;
Warnings:
-Note 1051 Unknown table 'test.t1'
-Note 1051 Unknown table 'test.t2'
-Note 1051 Unknown table 'test.t3'
+Note 1051 Unknown table 'test.t1,test.t2,test.t3'
create table t2(a int,unique key (a)) engine=innodb;
create table t3(b int) engine=innodb;
create table t1(c int,b int)engine=innodb;
@@ -498,3 +496,22 @@ natural right outer join t3;
drop table t1,t2,t3;
set optimizer_prune_level=@mdev4270_opl;
set optimizer_search_depth=@mdev4270_osd;
+#
+# Bug #20939184:INNODB: UNLOCK ROW COULD NOT FIND A 2 MODE LOCK ON THE
+# RECORD
+#
+CREATE TABLE t1 (c1 INT, c2 INT, c3 INT, PRIMARY KEY (c1,c2) ) engine=innodb;
+CREATE TABLE t2 (c1 INT, c2 INT, c3 INT, PRIMARY KEY (c1), KEY (c2)) engine=innodb;
+INSERT INTO t1 VALUES (1,2,3),(2,3,4),(3,4,5);
+INSERT INTO t2 SELECT * FROM t1;
+SET TRANSACTION ISOLATION LEVEL READ COMMITTED;
+START TRANSACTION;
+SELECT * FROM t1 LEFT JOIN t2 ON t1.c2=t2.c2 AND t2.c1=1 FOR UPDATE;
+c1 c2 c3 c1 c2 c3
+1 2 3 1 2 3
+2 3 4 NULL NULL NULL
+3 4 5 NULL NULL NULL
+UPDATE t1 LEFT JOIN t2 ON t1.c1 = t2.c2 AND t2.c1 = 3 SET t1.c3 = RAND()*10;
+COMMIT;
+SET TRANSACTION ISOLATION LEVEL REPEATABLE READ;
+DROP TABLE t1,t2;
diff --git a/mysql-test/main/join_outer_innodb.test b/mysql-test/main/join_outer_innodb.test
index c26cd62fbc7..6b332f3d155 100644
--- a/mysql-test/main/join_outer_innodb.test
+++ b/mysql-test/main/join_outer_innodb.test
@@ -374,3 +374,20 @@ drop table t1,t2,t3;
set optimizer_prune_level=@mdev4270_opl;
set optimizer_search_depth=@mdev4270_osd;
+--echo #
+--echo # Bug #20939184:INNODB: UNLOCK ROW COULD NOT FIND A 2 MODE LOCK ON THE
+--echo # RECORD
+--echo #
+CREATE TABLE t1 (c1 INT, c2 INT, c3 INT, PRIMARY KEY (c1,c2) ) engine=innodb;
+CREATE TABLE t2 (c1 INT, c2 INT, c3 INT, PRIMARY KEY (c1), KEY (c2)) engine=innodb;
+INSERT INTO t1 VALUES (1,2,3),(2,3,4),(3,4,5);
+INSERT INTO t2 SELECT * FROM t1;
+SET TRANSACTION ISOLATION LEVEL READ COMMITTED;
+START TRANSACTION;
+#unlocks rows in table t2 where c1 = 1
+SELECT * FROM t1 LEFT JOIN t2 ON t1.c2=t2.c2 AND t2.c1=1 FOR UPDATE;
+UPDATE t1 LEFT JOIN t2 ON t1.c1 = t2.c2 AND t2.c1 = 3 SET t1.c3 = RAND()*10;
+COMMIT;
+SET TRANSACTION ISOLATION LEVEL REPEATABLE READ;
+DROP TABLE t1,t2;
+
diff --git a/mysql-test/main/join_outer_jcl6.result b/mysql-test/main/join_outer_jcl6.result
index 3cb846426fe..721989c3368 100644
--- a/mysql-test/main/join_outer_jcl6.result
+++ b/mysql-test/main/join_outer_jcl6.result
@@ -1747,7 +1747,7 @@ from t1,t2
where t2.pk=t1.pk+1000 and t1.pk>1000
group by t2.pk;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 PRIMARY t1 index PRIMARY PRIMARY 4 NULL 2 50.00 Using where; Using index; Using temporary; Using filesort
+1 PRIMARY t1 range PRIMARY PRIMARY 4 NULL 1 100.00 Using where; Using index; Using temporary; Using filesort
1 PRIMARY t2 eq_ref PRIMARY PRIMARY 4 func 1 100.00 Using where; Using index
2 DEPENDENT SUBQUERY t3 eq_ref PRIMARY PRIMARY 4 func 1 100.00 Using where; Using index
2 DEPENDENT SUBQUERY t4 eq_ref PRIMARY PRIMARY 4 test.t3.pk 1 100.00 Using index
@@ -2279,11 +2279,11 @@ id select_type table type possible_keys key key_len ref rows Extra
explain select * from t1 left join t2 on t2.b is null;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 9
-1 SIMPLE t2 ref b b 5 const 780 Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
+1 SIMPLE t2 ALL b NULL NULL NULL 1000 Using where; Using join buffer (flat, BNL join)
explain select * from t1 left join t2 on t2.c is null;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 9
-1 SIMPLE t2 ref c c 5 const 393 Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
+1 SIMPLE t2 ALL c NULL NULL NULL 1000 Using where; Using join buffer (flat, BNL join)
drop table t1,t2;
#
# MDEV-10006: optimizer doesn't convert outer join to inner on views with WHERE clause
diff --git a/mysql-test/main/key.result b/mysql-test/main/key.result
index 3139caa9ae5..78a2f42c477 100644
--- a/mysql-test/main/key.result
+++ b/mysql-test/main/key.result
@@ -216,7 +216,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1 Using index
explain select 1 from t1 where id =2 or id=3;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index PRIMARY PRIMARY 4 NULL 7 Using where; Using index
+1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 2 Using where; Using index
explain select name from t1 where id =2;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1
@@ -611,7 +611,7 @@ 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 a a 5 NULL 2 Using where; Using index for group-by
+2 SUBQUERY t1 range a a 5 NULL 5 Using where; Using index
SELECT 1 as RES FROM t1 AS t1_outer WHERE
(SELECT max(b) FROM t1 GROUP BY a HAVING a < 2) > 12;
RES
diff --git a/mysql-test/main/key_cache.result b/mysql-test/main/key_cache.result
index 322a2be6a4e..c8bdc979387 100644
--- a/mysql-test/main/key_cache.result
+++ b/mysql-test/main/key_cache.result
@@ -43,8 +43,8 @@ SELECT @@medium.key_buffer_size;
SET @@global.key_buffer_size=@save_key_buffer_size;
SELECT @@default.key_buffer_size;
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 'default.key_buffer_size' at line 1
-SELECT @@skr.storage_engine="test";
-ERROR HY000: Variable 'storage_engine' is not a variable component (can't be used as XXXX.variable_name)
+SELECT @@skr.default_storage_engine="test";
+ERROR HY000: Variable 'default_storage_engine' is not a variable component (can't be used as XXXX.variable_name)
select @@keycache1.key_cache_block_size;
@@keycache1.key_cache_block_size
0
@@ -739,13 +739,13 @@ p
1019
explain select i from t2 where a='yyyy' and i=3;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 ref k1,k2 k1 5 const 189 Using where
+1 SIMPLE t2 index_merge k1,k2 k1,k2 5,11 NULL 50 Using intersect(k1,k2); Using where; Using index
select i from t2 where a='yyyy' and i=3;
i
3
explain select a from t2 where a='yyyy' and i=3;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 ref k1,k2 k1 5 const 189 Using where
+1 SIMPLE t2 index_merge k1,k2 k1,k2 5,11 NULL 50 Using intersect(k1,k2); Using where; Using index
select a from t2 where a='yyyy' and i=3 ;
a
yyyy
@@ -753,7 +753,7 @@ select * from information_schema.key_caches where segment_number is null;
KEY_CACHE_NAME SEGMENTS SEGMENT_NUMBER FULL_SIZE BLOCK_SIZE USED_BLOCKS UNUSED_BLOCKS DIRTY_BLOCKS READ_REQUESTS READS WRITE_REQUESTS WRITES
default 2 NULL 32768 1024 # # 0 3172 24 1552 18
small NULL NULL 1048576 1024 # # 0 0 0 0 0
-keycache1 7 NULL 262143 2048 # # 0 3201 43 1594 30
+keycache1 7 NULL 262143 2048 # # 0 3229 43 1594 30
keycache2 NULL NULL 1048576 1024 # # 0 6 6 3 3
set global keycache1.key_cache_block_size=2*1024;
insert into t2 values (7000, 3, 'yyyy');
diff --git a/mysql-test/main/key_cache.test b/mysql-test/main/key_cache.test
index fb6ae497e74..50305d499b3 100644
--- a/mysql-test/main/key_cache.test
+++ b/mysql-test/main/key_cache.test
@@ -45,7 +45,7 @@ SET @@global.key_buffer_size=@save_key_buffer_size;
--error 1064
SELECT @@default.key_buffer_size;
--error ER_VARIABLE_IS_NOT_STRUCT
-SELECT @@skr.storage_engine="test";
+SELECT @@skr.default_storage_engine="test";
select @@keycache1.key_cache_block_size;
select @@keycache1.key_buffer_size;
diff --git a/mysql-test/main/keyread.result b/mysql-test/main/keyread.result
index d8e9659d4bb..19a22eedbdf 100644
--- a/mysql-test/main/keyread.result
+++ b/mysql-test/main/keyread.result
@@ -4,3 +4,13 @@ select distinct f1 from v1;
f1
drop view v1;
drop table t1;
+CREATE TABLE t1 (a INT NOT NULL, UNIQUE(a)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1),(2);
+DELETE FROM t1 ORDER BY a LIMIT 1;
+SELECT * FROM t1;
+a
+2
+DROP TABLE t1;
+CREATE TABLE t1 (a CHAR KEY,b BLOB) ENGINE=InnoDB;
+DELETE FROM t1 ORDER BY a LIMIT 1;
+DROP TABLE t1;
diff --git a/mysql-test/main/keyread.test b/mysql-test/main/keyread.test
index d9d3002d392..6500f840b66 100644
--- a/mysql-test/main/keyread.test
+++ b/mysql-test/main/keyread.test
@@ -8,3 +8,23 @@ create view v1 as select * from t1 where f2 = 1;
select distinct f1 from v1;
drop view v1;
drop table t1;
+
+#
+# MDEV-22062 Assertion `!table->file->keyread_enabled()' failed in
+# close_thread_table
+#
+
+CREATE TABLE t1 (a INT NOT NULL, UNIQUE(a)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1),(2);
+DELETE FROM t1 ORDER BY a LIMIT 1;
+SELECT * FROM t1;
+DROP TABLE t1;
+
+#
+# MDEV-22237 Assertion `!table->file->keyread_enabled()' failed in
+# handler::ha_reset on DELETE
+#
+
+CREATE TABLE t1 (a CHAR KEY,b BLOB) ENGINE=InnoDB;
+DELETE FROM t1 ORDER BY a LIMIT 1;
+DROP TABLE t1;
diff --git a/mysql-test/main/kill-2.test b/mysql-test/main/kill-2.test
index 0c1177722b4..3412e75b8d5 100644
--- a/mysql-test/main/kill-2.test
+++ b/mysql-test/main/kill-2.test
@@ -8,7 +8,6 @@
#
-- source include/not_embedded.inc
--- source include/not_threadpool.inc
--echo #
--echo # MDEV-6896 kill user command cause MariaDB crash!
diff --git a/mysql-test/main/kill.test b/mysql-test/main/kill.test
index 05e70ff8651..1bb31bc665d 100644
--- a/mysql-test/main/kill.test
+++ b/mysql-test/main/kill.test
@@ -9,7 +9,6 @@
-- source include/not_embedded.inc
-- source include/have_debug_sync.inc
--- source include/not_threadpool.inc
set local sql_mode="";
set global sql_mode="";
diff --git a/mysql-test/main/large_pages.opt b/mysql-test/main/large_pages.opt
new file mode 100644
index 00000000000..857c9c1ecee
--- /dev/null
+++ b/mysql-test/main/large_pages.opt
@@ -0,0 +1 @@
+--large-pages
diff --git a/mysql-test/main/large_pages.result b/mysql-test/main/large_pages.result
new file mode 100644
index 00000000000..9d03e646ddf
--- /dev/null
+++ b/mysql-test/main/large_pages.result
@@ -0,0 +1,43 @@
+call mtr.add_suppression("\\[Warning\\] (mysqld|mariadbd): Couldn't allocate [0-9]+ bytes \\((Large/HugeTLB memory|MEMLOCK) page size [0-9]+\\).*");
+create table t1 (
+a int not null auto_increment,
+b char(16) not null,
+primary key (a),
+key (b)
+);
+create table t2(
+a int not null auto_increment,
+b char(16) not null,
+primary key (a),
+key (b)
+);
+insert into t1(b) values
+('test0'),
+('test1'),
+('test2'),
+('test3'),
+('test4'),
+('test5'),
+('test6'),
+('test7');
+insert into t2(b) select b from t1;
+insert into t1(b) select b from t2;
+select * from t1 join t2 using (b) ORDER BY t1.a, t2.a;
+b a a
+test0 1 1
+test1 2 2
+test2 3 3
+test3 4 4
+test4 5 5
+test5 6 6
+test6 7 7
+test7 8 8
+test0 9 1
+test1 10 2
+test2 11 3
+test3 12 4
+test4 13 5
+test5 14 6
+test6 15 7
+test7 16 8
+drop table t1, t2;
diff --git a/mysql-test/main/large_pages.test b/mysql-test/main/large_pages.test
new file mode 100644
index 00000000000..136273a2821
--- /dev/null
+++ b/mysql-test/main/large_pages.test
@@ -0,0 +1,38 @@
+# Test of large pages (or at least the fallback to conventional allocation)
+
+# Windows needs SeLockMemoryPrivilege
+--source include/not_windows.inc
+--source include/have_innodb.inc
+
+call mtr.add_suppression("\\[Warning\\] (mysqld|mariadbd): Couldn't allocate [0-9]+ bytes \\((Large/HugeTLB memory|MEMLOCK) page size [0-9]+\\).*");
+
+create table t1 (
+ a int not null auto_increment,
+ b char(16) not null,
+ primary key (a),
+ key (b)
+);
+
+create table t2(
+ a int not null auto_increment,
+ b char(16) not null,
+ primary key (a),
+ key (b)
+);
+
+insert into t1(b) values
+ ('test0'),
+ ('test1'),
+ ('test2'),
+ ('test3'),
+ ('test4'),
+ ('test5'),
+ ('test6'),
+ ('test7');
+
+insert into t2(b) select b from t1;
+insert into t1(b) select b from t2;
+
+select * from t1 join t2 using (b) ORDER BY t1.a, t2.a;
+
+drop table t1, t2;
diff --git a/mysql-test/main/limit_rows_examined.result b/mysql-test/main/limit_rows_examined.result
index e87dd25cac9..f0a22b8f3f2 100644
--- a/mysql-test/main/limit_rows_examined.result
+++ b/mysql-test/main/limit_rows_examined.result
@@ -255,7 +255,7 @@ select * from t1i
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 t1i range PRIMARY PRIMARY 2 NULL 4 Using where; Using index
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 > ' ')
@@ -395,7 +395,7 @@ select * from t1i
where c1 IN (select * from t2i where c2 > ' ') LIMIT ROWS EXAMINED 17;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1i index NULL PRIMARY 2 NULL 4 Using where; Using index
-2 MATERIALIZED t2i index PRIMARY PRIMARY 2 NULL 4 Using where; Using index
+2 MATERIALIZED t2i range PRIMARY PRIMARY 2 NULL 4 Using where; Using index
select * from t1i
where c1 IN (select * from t2i where c2 > ' ') LIMIT ROWS EXAMINED 17;
c1
diff --git a/mysql-test/main/loaddata_autocom_innodb.result b/mysql-test/main/loaddata_autocom_innodb.result
index 9f5a0809f2a..6967d4143bb 100644
--- a/mysql-test/main/loaddata_autocom_innodb.result
+++ b/mysql-test/main/loaddata_autocom_innodb.result
@@ -1,4 +1,4 @@
-SET SESSION STORAGE_ENGINE = InnoDB;
+SET SESSION DEFAULT_STORAGE_ENGINE = InnoDB;
drop table if exists t1;
create table t1 (id int unsigned not null auto_increment primary key, a text, b text);
start transaction;
diff --git a/mysql-test/main/lock.result b/mysql-test/main/lock.result
index e76c04520eb..7abeaf035ee 100644
--- a/mysql-test/main/lock.result
+++ b/mysql-test/main/lock.result
@@ -520,3 +520,18 @@ DROP TABLE t1;
#
# End of 10.2 tests
#
+#
+# MDEV-24382 Assertion `thd->mdl_context.is_lock_owner(MDL_key::TABLE, db, table_name, MDL_EXCLUSIVE)'
+# failed in tdc_remove_table
+#
+CREATE TABLE t (c INT);
+LOCK TABLES t READ LOCAL;
+CREATE TEMPORARY TABLE t (a INT) SELECT 1 AS a;
+DROP SEQUENCE t;
+ERROR 42S02: Unknown SEQUENCE: 'test.t'
+DROP TEMPORARY TABLE t;
+UNLOCK TABLES;
+DROP TABLE t;
+#
+# End of 10.5 tests
+#
diff --git a/mysql-test/main/lock.test b/mysql-test/main/lock.test
index 32e4fd47664..8f2435160c3 100644
--- a/mysql-test/main/lock.test
+++ b/mysql-test/main/lock.test
@@ -633,3 +633,21 @@ DROP TABLE t1;
--echo #
--echo # End of 10.2 tests
--echo #
+
+--echo #
+--echo # MDEV-24382 Assertion `thd->mdl_context.is_lock_owner(MDL_key::TABLE, db, table_name, MDL_EXCLUSIVE)'
+--echo # failed in tdc_remove_table
+--echo #
+CREATE TABLE t (c INT);
+LOCK TABLES t READ LOCAL;
+CREATE TEMPORARY TABLE t (a INT) SELECT 1 AS a;
+--error ER_UNKNOWN_SEQUENCES
+DROP SEQUENCE t;
+
+DROP TEMPORARY TABLE t;
+UNLOCK TABLES;
+DROP TABLE t;
+
+--echo #
+--echo # End of 10.5 tests
+--echo #
diff --git a/mysql-test/main/lock_user.result b/mysql-test/main/lock_user.result
index 560ae6ce425..24fff2105ab 100644
--- a/mysql-test/main/lock_user.result
+++ b/mysql-test/main/lock_user.result
@@ -164,7 +164,7 @@ CREATE USER `user1`@`localhost` ACCOUNT LOCK PASSWORD EXPIRE
alter user user1@localhost PASSWORD EXPIRE INTERVAL 60 DAY ACCOUNT UNLOCK;
select * from mysql.global_priv where user='user1';
Host User Priv
-localhost user1 {"access":0,"plugin":"mysql_native_password","authentication_string":"","account_locked":false,"password_last_changed":0,"password_lifetime":60}
+localhost user1 {"access":0,"version_id":XXX,"plugin":"mysql_native_password","authentication_string":"","account_locked":false,"password_last_changed":0,"password_lifetime":60}
show create user user1@localhost;
CREATE USER for user1@localhost
CREATE USER `user1`@`localhost` PASSWORD EXPIRE
diff --git a/mysql-test/main/lock_user.test b/mysql-test/main/lock_user.test
index 530883f33ef..4e480c19360 100644
--- a/mysql-test/main/lock_user.test
+++ b/mysql-test/main/lock_user.test
@@ -160,6 +160,7 @@ alter user user1@localhost ACCOUNT LOCK PASSWORD EXPIRE DEFAULT;
show create user user1@localhost;
# note output needs to be corrected by MDEV-24114: password expire users cannot be unexpired
alter user user1@localhost PASSWORD EXPIRE INTERVAL 60 DAY ACCOUNT UNLOCK;
+--replace_regex /"version_id":[0-9]*,/"version_id":XXX,/
select * from mysql.global_priv where user='user1';
show create user user1@localhost;
diff --git a/mysql-test/main/log_tables.result b/mysql-test/main/log_tables.result
index 84e43a6be00..914bc06748e 100644
--- a/mysql-test/main/log_tables.result
+++ b/mysql-test/main/log_tables.result
@@ -251,14 +251,14 @@ lock tables mysql.slow_log READ;
ERROR HY000: You can't use locks with log tables
set global general_log='OFF';
set global slow_query_log='OFF';
-set @save_storage_engine= @@session.storage_engine;
-set storage_engine= MEMORY;
+set @save_storage_engine= @@session.default_storage_engine;
+set default_storage_engine= MEMORY;
alter table mysql.slow_log engine=NonExistentEngine;
Warnings:
Warning 1286 Unknown storage engine 'NonExistentEngine'
alter table mysql.slow_log engine=memory;
ERROR HY000: Storage engine MEMORY cannot be used for log tables
-set storage_engine= @save_storage_engine;
+set default_storage_engine= @save_storage_engine;
ALTER TABLE mysql.general_log ENGINE=Aria;
ERROR HY000: Storage engine Aria cannot be used for log tables
ALTER TABLE mysql.general_log ENGINE=Aria transactional = 0;
diff --git a/mysql-test/main/log_tables.test b/mysql-test/main/log_tables.test
index 97a143a8fa5..537bd843af8 100644
--- a/mysql-test/main/log_tables.test
+++ b/mysql-test/main/log_tables.test
@@ -252,8 +252,8 @@ set global general_log='OFF';
set global slow_query_log='OFF';
# check that alter table doesn't work for other engines
-set @save_storage_engine= @@session.storage_engine;
-set storage_engine= MEMORY;
+set @save_storage_engine= @@session.default_storage_engine;
+set default_storage_engine= MEMORY;
# After fixing bug#35765 the error behaivor changed:
# If compiled in/enabled ER_UNSUPORTED_LOG_ENGINE
# If not (i.e. not existant) it will show a warning
@@ -267,7 +267,7 @@ alter table mysql.slow_log engine=memory;
#alter table mysql.slow_log engine=archive;
#--error ER_UNSUPORTED_LOG_ENGINE
#alter table mysql.slow_log engine=blackhole;
-set storage_engine= @save_storage_engine;
+set default_storage_engine= @save_storage_engine;
# Make sure only non-transactional Aria table can be used for logging
--error ER_UNSUPORTED_LOG_ENGINE
diff --git a/mysql-test/main/long_unique.result b/mysql-test/main/long_unique.result
index eb61a080c96..29cb1a881ca 100644
--- a/mysql-test/main/long_unique.result
+++ b/mysql-test/main/long_unique.result
@@ -1477,4 +1477,19 @@ id select_type table type possible_keys key key_len ref rows Extra
SELECT t2.b FROM t1 JOIN t2 ON t1.d = t2.f WHERE t2.pk >= 20;
b
drop table t1,t2;
+#
+# MDEV-21470 MyISAM start_bulk_insert doesn't work with long unique
+#
+CREATE TABLE t1 (a INT, b BLOB) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (1,'foo'),(2,'bar');
+CREATE TABLE t2 (c BIT, d BLOB, UNIQUE(d)) ENGINE=MyISAM;
+INSERT INTO t2 SELECT * FROM t1;
+Warnings:
+Warning 1264 Out of range value for column 'c' at row 2
+DROP TABLE t1, t2;
+#
+# MDEV-19338 Using AUTO_INCREMENT with long unique
+#
+CREATE TABLE t1 (pk INT, a TEXT NOT NULL DEFAULT '', PRIMARY KEY (pk), b INT AUTO_INCREMENT, UNIQUE(b), UNIQUE (a,b)) ENGINE=myisam;
+ERROR HY000: AUTO_INCREMENT column `b` cannot be used in the UNIQUE index `a`
set @@GLOBAL.max_allowed_packet= @allowed_packet;
diff --git a/mysql-test/main/long_unique.test b/mysql-test/main/long_unique.test
index c0bd77ca5c9..2146b4b4638 100644
--- a/mysql-test/main/long_unique.test
+++ b/mysql-test/main/long_unique.test
@@ -556,4 +556,22 @@ SELECT t2.b FROM t1 JOIN t2 ON t1.d = t2.f WHERE t2.pk >= 20;
SELECT t2.b FROM t1 JOIN t2 ON t1.d = t2.f WHERE t2.pk >= 20;
drop table t1,t2;
+--echo #
+--echo # MDEV-21470 MyISAM start_bulk_insert doesn't work with long unique
+--echo #
+
+CREATE TABLE t1 (a INT, b BLOB) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (1,'foo'),(2,'bar');
+CREATE TABLE t2 (c BIT, d BLOB, UNIQUE(d)) ENGINE=MyISAM;
+INSERT INTO t2 SELECT * FROM t1;
+DROP TABLE t1, t2;
+
+--echo #
+--echo # MDEV-19338 Using AUTO_INCREMENT with long unique
+--echo #
+
+--error ER_NO_AUTOINCREMENT_WITH_UNIQUE
+CREATE TABLE t1 (pk INT, a TEXT NOT NULL DEFAULT '', PRIMARY KEY (pk), b INT AUTO_INCREMENT, UNIQUE(b), UNIQUE (a,b)) ENGINE=myisam;
+
+# Cleanup
set @@GLOBAL.max_allowed_packet= @allowed_packet;
diff --git a/mysql-test/main/long_unique_bugs.result b/mysql-test/main/long_unique_bugs.result
index 5d6c0562c8a..5f9715a14ee 100644
--- a/mysql-test/main/long_unique_bugs.result
+++ b/mysql-test/main/long_unique_bugs.result
@@ -10,6 +10,7 @@ create temporary table tmp (a varchar(1024), b int, c int, d int, e linestring,
load data infile 'load.data' into table tmp;
delete from tmp;
drop table t1;
+drop table tmp;
create table t1 (b blob) engine=innodb;
alter table t1 add unique (b);
alter table t1 force;
@@ -266,7 +267,7 @@ disconnect con1;
connection default;
DROP TABLE t1, t2;
CREATE TABLE t1 (a TEXT, UNIQUE(a)) ENGINE=Aria;
-ERROR 42000: Specified key was too long; max key length is 1000 bytes
+ERROR 42000: Specified key was too long; max key length is 2000 bytes
create table t1(a int, unique(a) using hash);
#BULK insert > 100 rows (MI_MIN_ROWS_TO_DISABLE_INDEXES)
drop table t1;
@@ -288,3 +289,74 @@ Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_par
t2 0 a 1 a A NULL NULL NULL YES HASH
t2 0 a 2 b A NULL NULL NULL YES HASH
DROP TABLE t1,t2;
+create temporary table tmp ( a int, b int, c blob not null, d int, e int default 0, f int, unique key (c)) engine=innodb;
+create table t2 (x int);
+lock table t2 write;
+update tmp set c = 'foo';
+start transaction;
+alter table tmp alter column a set default 8;
+unlock tables;
+drop table t2;
+create table t1 (pk int primary key, f blob, unique(f)) engine=innodb;
+insert t1 values (1, null);
+select * into outfile 't1.data' from t1;
+load data infile 't1.data' replace into table t1;
+select * from t1;
+pk f
+1 NULL
+drop table t1;
+create table t1 (a int, b blob) engine=myisam;
+insert t1 values (1,'foo'),(2,'bar'), (3, 'bar');
+create table t2 (c int, d blob, unique(d)) engine=myisam;
+insert t2 select * from t1;
+ERROR 23000: Duplicate entry 'bar' for key 'd'
+select * from t2;
+c d
+1 foo
+2 bar
+insert ignore t2 select * from t1;
+Warnings:
+Warning 1062 Duplicate entry 'foo' for key 'd'
+Warning 1062 Duplicate entry 'bar' for key 'd'
+Warning 1062 Duplicate entry 'bar' for key 'd'
+select * from t2;
+c d
+1 foo
+2 bar
+replace t2 select * from t1;
+select * from t2;
+c d
+1 foo
+3 bar
+update t1, t2 set t2.d='off' where t1.a=t2.c and t1.b='foo';
+select * from t2;
+c d
+1 off
+3 bar
+alter table t2 add system versioning;
+delete from t2 using t1, t2 where t1.a=t2.c and t1.b='foo';
+select * from t2;
+c d
+3 bar
+create or replace table t2 (a int, b blob, unique(b)) as select * from t1;
+ERROR 23000: Duplicate entry 'bar' for key 'b'
+select * from t2;
+ERROR 42S02: Table 'test.t2' doesn't exist
+create or replace table t2 (a int, b blob, unique(b)) ignore as select * from t1;
+Warnings:
+Warning 1062 Duplicate entry 'bar' for key 'b'
+select * from t2;
+a b
+1 foo
+2 bar
+create or replace table t2 (a int, b blob, unique(b)) replace as select * from t1;
+select * from t2;
+a b
+1 foo
+3 bar
+drop table if exists t1, t2;
+create table t1 (a int, b int, unique (b) using hash) engine=innodb partition by key (a) partitions 2;
+insert into t1 values (1,10),(2,20);
+update t1 set b = 30 limit 1;
+drop table t1;
+# End of 10.5 tests
diff --git a/mysql-test/main/long_unique_bugs.test b/mysql-test/main/long_unique_bugs.test
index 34d02b1c8f4..3e0e35e6162 100644
--- a/mysql-test/main/long_unique_bugs.test
+++ b/mysql-test/main/long_unique_bugs.test
@@ -18,6 +18,7 @@ delete from tmp;
drop table t1;
--let $datadir= `SELECT @@datadir`
--remove_file $datadir/test/load.data
+drop table tmp;
#
# MDEV-18712 InnoDB indexes are inconsistent with what defined in .frm for table after rebuilding table with index on blob
@@ -368,3 +369,74 @@ show index from t2;
# Cleanup
DROP TABLE t1,t2;
+
+#
+# MDEV-22113 SIGSEGV, ASAN use-after-poison, Assertion `next_insert_id == 0' in handler::ha_external_lock
+#
+create temporary table tmp ( a int, b int, c blob not null, d int, e int default 0, f int, unique key (c)) engine=innodb;
+create table t2 (x int);
+lock table t2 write;
+update tmp set c = 'foo';
+start transaction;
+alter table tmp alter column a set default 8;
+unlock tables;
+drop table t2;
+--source include/have_innodb.inc
+
+#
+# MDEV-22218 InnoDB: Failing assertion: node->pcur->rel_pos == BTR_PCUR_ON upon LOAD DATA with NO_BACKSLASH_ESCAPES in SQL_MODE and unique blob in table
+#
+create table t1 (pk int primary key, f blob, unique(f)) engine=innodb;
+insert t1 values (1, null);
+select * into outfile 't1.data' from t1;
+load data infile 't1.data' replace into table t1;
+select * from t1;
+drop table t1;
+--let $datadir= `SELECT @@datadir`
+--remove_file $datadir/test/t1.data
+
+# more tests:
+
+create table t1 (a int, b blob) engine=myisam;
+insert t1 values (1,'foo'),(2,'bar'), (3, 'bar');
+create table t2 (c int, d blob, unique(d)) engine=myisam;
+
+# INSERT...SELECT
+--error ER_DUP_ENTRY
+insert t2 select * from t1;
+ select * from t2;
+insert ignore t2 select * from t1;
+ select * from t2;
+replace t2 select * from t1;
+ select * from t2;
+
+# multi-UPDATE
+update t1, t2 set t2.d='off' where t1.a=t2.c and t1.b='foo';
+ select * from t2;
+
+# multi-DELETE
+alter table t2 add system versioning;
+delete from t2 using t1, t2 where t1.a=t2.c and t1.b='foo';
+ select * from t2;
+
+# CREATE...SELECT
+--error ER_DUP_ENTRY
+create or replace table t2 (a int, b blob, unique(b)) as select * from t1;
+--error ER_NO_SUCH_TABLE
+ select * from t2;
+create or replace table t2 (a int, b blob, unique(b)) ignore as select * from t1;
+ select * from t2;
+create or replace table t2 (a int, b blob, unique(b)) replace as select * from t1;
+ select * from t2;
+
+drop table if exists t1, t2;
+
+#
+# MDEV-22185 Failing assertion: node->pcur->rel_pos == BTR_PCUR_ON or ER_KEY_NOT_FOUND or Assertion `inited==NONE' failed in handler::ha_index_init
+#
+create table t1 (a int, b int, unique (b) using hash) engine=innodb partition by key (a) partitions 2;
+insert into t1 values (1,10),(2,20);
+update t1 set b = 30 limit 1;
+drop table t1;
+
+--echo # End of 10.5 tests
diff --git a/mysql-test/main/long_unique_bugs_replication.result b/mysql-test/main/long_unique_bugs_replication.result
new file mode 100644
index 00000000000..af583d00cea
--- /dev/null
+++ b/mysql-test/main/long_unique_bugs_replication.result
@@ -0,0 +1,12 @@
+include/master-slave.inc
+[connection master]
+create table t1 (i1 int, a1 text, unique key i1 (a1)) engine=myisam;
+insert into t1 values (1,1);
+insert into t1 values (2,2);
+update t1 set a1 = 'd' limit 1;
+update t1 set a1 = 'd2' where i1= 2;
+connection slave;
+connection slave;
+connection master;
+drop table t1;
+include/rpl_end.inc
diff --git a/mysql-test/main/long_unique_bugs_replication.test b/mysql-test/main/long_unique_bugs_replication.test
new file mode 100644
index 00000000000..1cacd088bee
--- /dev/null
+++ b/mysql-test/main/long_unique_bugs_replication.test
@@ -0,0 +1,24 @@
+#
+# Long unique bugs related to master slave replication
+#
+
+#
+# MDEV-22722 Assertion "inited==NONE" failed in handler::ha_index_init on the slave during UPDATE
+#
+
+--source include/have_binlog_format_row.inc
+--source include/master-slave.inc
+
+create table t1 (i1 int, a1 text, unique key i1 (a1)) engine=myisam;
+insert into t1 values (1,1);
+insert into t1 values (2,2);
+update t1 set a1 = 'd' limit 1;
+update t1 set a1 = 'd2' where i1= 2;
+
+sync_slave_with_master;
+connection slave;
+
+connection master;
+drop table t1;
+
+--source include/rpl_end.inc
diff --git a/mysql-test/main/long_unique_delayed.result b/mysql-test/main/long_unique_delayed.result
new file mode 100644
index 00000000000..52365249097
--- /dev/null
+++ b/mysql-test/main/long_unique_delayed.result
@@ -0,0 +1,19 @@
+#
+# Test insert delayed with long unique keys
+#
+create table t1(a blob unique) engine=myisam;
+insert delayed into t1 values(1),(2),(3),(56),('sachin'),('maria'),(123456789034567891),(null),(null),(123456789034567890),('maria');
+insert delayed into t1 values(1),(9);
+flush tables t1;
+select count(*) from t1;
+count(*)
+11
+drop table t1;
+#
+# MDEV-19848
+# Server crashes in check_vcol_forward_refs upon INSERT DELAYED into
+# table with long blob key
+#
+CREATE TABLE t1 (a BLOB, UNIQUE(a)) ENGINE=MyISAM;
+INSERT DELAYED t1 () VALUES ();
+DROP TABLE t1;
diff --git a/mysql-test/main/long_unique_delayed.test b/mysql-test/main/long_unique_delayed.test
new file mode 100644
index 00000000000..c0de4a74913
--- /dev/null
+++ b/mysql-test/main/long_unique_delayed.test
@@ -0,0 +1,22 @@
+--source include/not_embedded.inc
+
+--echo #
+--echo # Test insert delayed with long unique keys
+--echo #
+
+create table t1(a blob unique) engine=myisam;
+insert delayed into t1 values(1),(2),(3),(56),('sachin'),('maria'),(123456789034567891),(null),(null),(123456789034567890),('maria');
+insert delayed into t1 values(1),(9);
+flush tables t1;
+select count(*) from t1;
+drop table t1;
+
+--echo #
+--echo # MDEV-19848
+--echo # Server crashes in check_vcol_forward_refs upon INSERT DELAYED into
+--echo # table with long blob key
+--echo #
+
+CREATE TABLE t1 (a BLOB, UNIQUE(a)) ENGINE=MyISAM;
+INSERT DELAYED t1 () VALUES ();
+DROP TABLE t1;
diff --git a/mysql-test/main/lowercase_fs_off.test b/mysql-test/main/lowercase_fs_off.test
index e8e8dafe584..879a1eabc25 100644
--- a/mysql-test/main/lowercase_fs_off.test
+++ b/mysql-test/main/lowercase_fs_off.test
@@ -138,9 +138,9 @@ set GLOBAL sql_mode=default;
--echo # Compatibility schema names respect the filesystem case sensitivity
---error ER_UNKNOWN_ERROR
+--error ER_UNKNOWN_DATA_TYPE
CREATE TABLE t1 (a MARIADB_SCHEMA.date);
---error ER_UNKNOWN_ERROR
+--error ER_UNKNOWN_DATA_TYPE
CREATE TABLE t1 (a Mariadb_schema.date);
CREATE TABLE t1 (a mariadb_schema.date);
diff --git a/mysql-test/main/mdl.result b/mysql-test/main/mdl.result
index 883f35674c0..fbf80312ac0 100644
--- a/mysql-test/main/mdl.result
+++ b/mysql-test/main/mdl.result
@@ -58,6 +58,8 @@ DROP TABLE t1,t3;
#
CREATE TABLE t1(a INT) ENGINE=InnoDB;
CREATE TABLE t3(a INT) ENGINE=myisam;
+connect purge_control,localhost,root,,;
+START TRANSACTION WITH CONSISTENT SNAPSHOT;
connect locker,localhost,root,,;
connection default;
FLUSH TABLES WITH READ LOCK;
@@ -85,6 +87,7 @@ MDL_SHARED_WRITE Table metadata lock test t3
unlock tables;
connection locker;
unlock tables;
+disconnect purge_control;
connection default;
disconnect locker;
DROP TABLE t1,t3;
diff --git a/mysql-test/main/mdl.test b/mysql-test/main/mdl.test
index 23a862f5212..0c1b7a13a0c 100644
--- a/mysql-test/main/mdl.test
+++ b/mysql-test/main/mdl.test
@@ -40,6 +40,8 @@ DROP TABLE t1,t3;
CREATE TABLE t1(a INT) ENGINE=InnoDB;
CREATE TABLE t3(a INT) ENGINE=myisam;
+connect(purge_control,localhost,root,,);
+START TRANSACTION WITH CONSISTENT SNAPSHOT;
connect (locker,localhost,root,,);
connection default;
@@ -75,6 +77,7 @@ unlock tables;
connection locker;
--reap
unlock tables;
+disconnect purge_control;
connection default;
disconnect locker;
diff --git a/mysql-test/main/mdl_sync.result b/mysql-test/main/mdl_sync.result
index 5203fdddb2d..0ffe2f745a0 100644
--- a/mysql-test/main/mdl_sync.result
+++ b/mysql-test/main/mdl_sync.result
@@ -2010,117 +2010,6 @@ connection deadlock_con1;
connection default;
# Reaping ALTER. It should succeed and not produce ER_LOCK_DEADLOCK.
drop table t1;
-#
-# Now, test for a situation in which deadlock involves waiting not
-# only in MDL subsystem but also for TDC. Such deadlocks should be
-# successfully detected. If possible, they should be resolved without
-# resorting to ER_LOCK_DEADLOCK error.
-#
-create table t1(i int);
-create table t2(j int);
-#
-# First, let us check how we handle a simple scenario involving
-# waits in MDL and TDC.
-#
-set debug_sync= 'RESET';
-connection deadlock_con1;
-# Start a statement, which will acquire SR metadata lock on t1, open it
-# and then stop, before trying to acquire SW lock on t2 and opening it.
-set debug_sync='open_tables_after_open_and_process_table SIGNAL parked WAIT_FOR go';
-# Sending:
-select * from t1 where i in (select j from t2 for update);
-connection deadlock_con2;
-# Wait till the above SELECT stops.
-set debug_sync='now WAIT_FOR parked';
-# The below FLUSH TABLES WITH READ LOCK should acquire
-# SNW locks on t1 and t2 and wait till SELECT closes t1.
-# Sending:
-flush tables t1, t2 with read lock;
-connection deadlock_con3;
-# Wait until FLUSH TABLES WITH t1, t2 READ LOCK starts waiting
-# for SELECT to close t1.
-# Resume SELECT, so it tries to acquire SW lock on t1 and blocks,
-# creating a deadlock. This deadlock should be detected and resolved
-# by backing-off SELECT. As a result FTWRL should be able to finish.
-set debug_sync='now SIGNAL go';
-connection deadlock_con2;
-# Reap FLUSH TABLES WITH READ LOCK.
-unlock tables;
-connection deadlock_con1;
-# Reap SELECT.
-i
-#
-# The same scenario with a slightly different order of events
-# which emphasizes that setting correct deadlock detector weights
-# for flush waits is important.
-#
-set debug_sync= 'RESET';
-connection deadlock_con2;
-set debug_sync='flush_tables_with_read_lock_after_acquire_locks SIGNAL parked WAIT_FOR go';
-# The below FLUSH TABLES WITH READ LOCK should acquire
-# SNW locks on t1 and t2 and wait on debug sync point.
-# Sending:
-flush tables t1, t2 with read lock;
-connection deadlock_con1;
-# Wait till FLUSH TABLE WITH READ LOCK stops.
-set debug_sync='now WAIT_FOR parked';
-# Start statement which will acquire SR metadata lock on t1, open
-# it and then will block while trying to acquire SW lock on t2.
-# Sending:
-select * from t1 where i in (select j from t2 for update);
-connection deadlock_con3;
-# Wait till the above SELECT blocks.
-# Resume FLUSH TABLES, so it tries to flush t1, thus creating
-# a deadlock. This deadlock should be detected and resolved by
-# backing-off SELECT. As a result FTWRL should be able to finish.
-set debug_sync='now SIGNAL go';
-connection deadlock_con2;
-# Reap FLUSH TABLES WITH READ LOCK.
-unlock tables;
-connection deadlock_con1;
-# Reap SELECT.
-i
-#
-# Now a more complex scenario involving two connections
-# waiting for MDL and one for TDC.
-#
-set debug_sync= 'RESET';
-connection deadlock_con1;
-# Start a statement which will acquire SR metadata lock on t2, open it
-# and then stop, before trying to acquire SR on t1 and opening it.
-set debug_sync='open_tables_after_open_and_process_table SIGNAL parked WAIT_FOR go';
-# Sending:
-select * from t2, t1;
-connection deadlock_con2;
-# Wait till the above SELECT stops.
-set debug_sync='now WAIT_FOR parked';
-# The below FLUSH TABLES WITH READ LOCK should acquire
-# SNW locks on t2 and wait till SELECT closes t2.
-# Sending:
-flush tables t2 with read lock;
-connection deadlock_con3;
-# Wait until FLUSH TABLES WITH READ LOCK starts waiting
-# for SELECT to close t2.
-# The below DROP TABLES should acquire X lock on t1 and start
-# waiting for X lock on t2.
-# Sending:
-drop tables t1, t2;
-connection default;
-# Wait until DROP TABLES starts waiting for X lock on t2.
-# Resume SELECT, so it tries to acquire SR lock on t1 and blocks,
-# creating a deadlock. This deadlock should be detected and resolved
-# by backing-off SELECT. As a result, FTWRL should be able to finish.
-set debug_sync='now SIGNAL go';
-connection deadlock_con2;
-# Reap FLUSH TABLES WITH READ LOCK.
-# Unblock DROP TABLES.
-unlock tables;
-connection deadlock_con3;
-# Reap DROP TABLES.
-connection deadlock_con1;
-# Reap SELECT. It should emit error about missing table.
-ERROR 42S02: Table 'test.t2' doesn't exist
-connection default;
set debug_sync= 'RESET';
disconnect deadlock_con1;
disconnect deadlock_con2;
diff --git a/mysql-test/main/mdl_sync.test b/mysql-test/main/mdl_sync.test
index 2a1e488ab44..557fbe261a2 100644
--- a/mysql-test/main/mdl_sync.test
+++ b/mysql-test/main/mdl_sync.test
@@ -2493,170 +2493,6 @@ connection default;
drop table t1;
---echo #
---echo # Now, test for a situation in which deadlock involves waiting not
---echo # only in MDL subsystem but also for TDC. Such deadlocks should be
---echo # successfully detected. If possible, they should be resolved without
---echo # resorting to ER_LOCK_DEADLOCK error.
---echo #
-create table t1(i int);
-create table t2(j int);
-
---echo #
---echo # First, let us check how we handle a simple scenario involving
---echo # waits in MDL and TDC.
---echo #
-set debug_sync= 'RESET';
-
-connection deadlock_con1;
---echo # Start a statement, which will acquire SR metadata lock on t1, open it
---echo # and then stop, before trying to acquire SW lock on t2 and opening it.
-set debug_sync='open_tables_after_open_and_process_table SIGNAL parked WAIT_FOR go';
---echo # Sending:
---send select * from t1 where i in (select j from t2 for update)
-
-connection deadlock_con2;
---echo # Wait till the above SELECT stops.
-set debug_sync='now WAIT_FOR parked';
---echo # The below FLUSH TABLES WITH READ LOCK should acquire
---echo # SNW locks on t1 and t2 and wait till SELECT closes t1.
---echo # Sending:
-send flush tables t1, t2 with read lock;
-
-connection deadlock_con3;
---echo # Wait until FLUSH TABLES WITH t1, t2 READ LOCK starts waiting
---echo # for SELECT to close t1.
-let $wait_condition=
- select count(*) = 1 from information_schema.processlist
- where state = "Waiting for table flush" and
- info = "flush tables t1, t2 with read lock";
---source include/wait_condition.inc
-
---echo # Resume SELECT, so it tries to acquire SW lock on t1 and blocks,
---echo # creating a deadlock. This deadlock should be detected and resolved
---echo # by backing-off SELECT. As a result FTWRL should be able to finish.
-set debug_sync='now SIGNAL go';
-
-connection deadlock_con2;
---echo # Reap FLUSH TABLES WITH READ LOCK.
-reap;
-unlock tables;
-
-connection deadlock_con1;
---echo # Reap SELECT.
-reap;
-
---echo #
---echo # The same scenario with a slightly different order of events
---echo # which emphasizes that setting correct deadlock detector weights
---echo # for flush waits is important.
---echo #
-set debug_sync= 'RESET';
-
-connection deadlock_con2;
-set debug_sync='flush_tables_with_read_lock_after_acquire_locks SIGNAL parked WAIT_FOR go';
-
---echo # The below FLUSH TABLES WITH READ LOCK should acquire
---echo # SNW locks on t1 and t2 and wait on debug sync point.
---echo # Sending:
-send flush tables t1, t2 with read lock;
-
-connection deadlock_con1;
---echo # Wait till FLUSH TABLE WITH READ LOCK stops.
-set debug_sync='now WAIT_FOR parked';
-
---echo # Start statement which will acquire SR metadata lock on t1, open
---echo # it and then will block while trying to acquire SW lock on t2.
---echo # Sending:
-send select * from t1 where i in (select j from t2 for update);
-
-connection deadlock_con3;
---echo # Wait till the above SELECT blocks.
-let $wait_condition=
- select count(*) = 1 from information_schema.processlist
- where state = "Waiting for table metadata lock" and
- info = "select * from t1 where i in (select j from t2 for update)";
---source include/wait_condition.inc
-
---echo # Resume FLUSH TABLES, so it tries to flush t1, thus creating
---echo # a deadlock. This deadlock should be detected and resolved by
---echo # backing-off SELECT. As a result FTWRL should be able to finish.
-set debug_sync='now SIGNAL go';
-
-connection deadlock_con2;
---echo # Reap FLUSH TABLES WITH READ LOCK.
-reap;
-unlock tables;
-
-connection deadlock_con1;
---echo # Reap SELECT.
-reap;
-
---echo #
---echo # Now a more complex scenario involving two connections
---echo # waiting for MDL and one for TDC.
---echo #
-set debug_sync= 'RESET';
-
-connection deadlock_con1;
---echo # Start a statement which will acquire SR metadata lock on t2, open it
---echo # and then stop, before trying to acquire SR on t1 and opening it.
-set debug_sync='open_tables_after_open_and_process_table SIGNAL parked WAIT_FOR go';
---echo # Sending:
-send select * from t2, t1;
-
-connection deadlock_con2;
---echo # Wait till the above SELECT stops.
-set debug_sync='now WAIT_FOR parked';
---echo # The below FLUSH TABLES WITH READ LOCK should acquire
---echo # SNW locks on t2 and wait till SELECT closes t2.
---echo # Sending:
-send flush tables t2 with read lock;
-
-connection deadlock_con3;
---echo # Wait until FLUSH TABLES WITH READ LOCK starts waiting
---echo # for SELECT to close t2.
-let $wait_condition=
- select count(*) = 1 from information_schema.processlist
- where state = "Waiting for table flush" and
- info = "flush tables t2 with read lock";
---source include/wait_condition.inc
-
---echo # The below DROP TABLES should acquire X lock on t1 and start
---echo # waiting for X lock on t2.
---echo # Sending:
-send drop tables t1, t2;
-
-connection default;
---echo # Wait until DROP TABLES starts waiting for X lock on t2.
-let $wait_condition=
- select count(*) = 1 from information_schema.processlist
- where state = "Waiting for table metadata lock" and
- info = "drop tables t1, t2";
---source include/wait_condition.inc
-
---echo # Resume SELECT, so it tries to acquire SR lock on t1 and blocks,
---echo # creating a deadlock. This deadlock should be detected and resolved
---echo # by backing-off SELECT. As a result, FTWRL should be able to finish.
-set debug_sync='now SIGNAL go';
-
-connection deadlock_con2;
---echo # Reap FLUSH TABLES WITH READ LOCK.
-reap;
---echo # Unblock DROP TABLES.
-unlock tables;
-
-connection deadlock_con3;
---echo # Reap DROP TABLES.
-reap;
-
-connection deadlock_con1;
---echo # Reap SELECT. It should emit error about missing table.
---error ER_NO_SUCH_TABLE
-reap;
-
-connection default;
-
set debug_sync= 'RESET';
disconnect deadlock_con1;
diff --git a/mysql-test/main/merge.result b/mysql-test/main/merge.result
index 075152da1c7..0d6f387a7bc 100644
--- a/mysql-test/main/merge.result
+++ b/mysql-test/main/merge.result
@@ -1,4 +1,4 @@
-set @save_default_storage_engine=@@global.storage_engine;
+set @save_default_storage_engine=@@global.default_storage_engine;
set global default_storage_engine=myisam;
set session default_storage_engine=myisam;
drop table if exists t1,t2,t3,t4,t5,t6;
diff --git a/mysql-test/main/merge.test b/mysql-test/main/merge.test
index c22cf3950c1..888b41b24bd 100644
--- a/mysql-test/main/merge.test
+++ b/mysql-test/main/merge.test
@@ -6,7 +6,7 @@
--source include/count_sessions.inc
# MERGE tables require MyISAM tables
-set @save_default_storage_engine=@@global.storage_engine;
+set @save_default_storage_engine=@@global.default_storage_engine;
set global default_storage_engine=myisam;
set session default_storage_engine=myisam;
diff --git a/mysql-test/main/merge_debug.result b/mysql-test/main/merge_debug.result
index 29858810ff1..36cf254f87e 100644
--- a/mysql-test/main/merge_debug.result
+++ b/mysql-test/main/merge_debug.result
@@ -1,6 +1,6 @@
-set @default_storage_engine= @@global.storage_engine;
-set global storage_engine=myisam;
-set session storage_engine=myisam;
+set @default_storage_engine= @@global.default_storage_engine;
+set global default_storage_engine=myisam;
+set session default_storage_engine=myisam;
call mtr.add_suppression("Index for table .*crashed' is corrupt; try to repair it");
drop table if exists crashed,t2,t3,t4;
SET @orig_debug=@@global.debug_dbug;
@@ -24,4 +24,4 @@ INSERT INTO t3 VALUES (31);
UNLOCK TABLES;
DROP TRIGGER t1_ai;
DROP TABLE t4,crashed,t2,t3;
-set global storage_engine=@default_storage_engine;
+set global default_storage_engine=@default_storage_engine;
diff --git a/mysql-test/main/merge_debug.test b/mysql-test/main/merge_debug.test
index 50017bc1331..4141042c261 100644
--- a/mysql-test/main/merge_debug.test
+++ b/mysql-test/main/merge_debug.test
@@ -4,9 +4,9 @@
--source include/have_debug.inc
-set @default_storage_engine= @@global.storage_engine;
-set global storage_engine=myisam;
-set session storage_engine=myisam;
+set @default_storage_engine= @@global.default_storage_engine;
+set global default_storage_engine=myisam;
+set session default_storage_engine=myisam;
call mtr.add_suppression("Index for table .*crashed' is corrupt; try to repair it");
@@ -43,4 +43,4 @@ UNLOCK TABLES;
DROP TRIGGER t1_ai;
DROP TABLE t4,crashed,t2,t3;
-set global storage_engine=@default_storage_engine;
+set global default_storage_engine=@default_storage_engine;
diff --git a/mysql-test/main/merge_mmap.result b/mysql-test/main/merge_mmap.result
index e8014259a4a..8e655a0491b 100644
--- a/mysql-test/main/merge_mmap.result
+++ b/mysql-test/main/merge_mmap.result
@@ -1,5 +1,5 @@
-SET GLOBAL storage_engine = MyISAM;
-SET SESSION storage_engine = MyISAM;
+SET GLOBAL default_storage_engine = MyISAM;
+SET SESSION default_storage_engine = MyISAM;
DROP TABLE IF EXISTS t1, t2, m1, m2;
CREATE TABLE t1 (c1 INT);
CREATE TABLE t2 (c1 INT);
diff --git a/mysql-test/main/merge_mmap.test b/mysql-test/main/merge_mmap.test
index c97b029754d..f3fce257f06 100644
--- a/mysql-test/main/merge_mmap.test
+++ b/mysql-test/main/merge_mmap.test
@@ -3,9 +3,9 @@
#
# MERGE tables require MyISAM tables
---let $default=`SELECT @@global.storage_engine`
-SET GLOBAL storage_engine = MyISAM;
-SET SESSION storage_engine = MyISAM;
+--let $default=`SELECT @@global.default_storage_engine`
+SET GLOBAL default_storage_engine = MyISAM;
+SET SESSION default_storage_engine = MyISAM;
# Clean up resources used in this test case.
--disable_warnings
@@ -146,6 +146,6 @@ DROP TABLE m2, m1, t2, t1;
--disable_result_log
--disable_query_log
-eval SET GLOBAL storage_engine = $default;
+eval SET GLOBAL default_storage_engine = $default;
--enable_result_log
--enable_query_log
diff --git a/mysql-test/main/mix2_myisam.result b/mysql-test/main/mix2_myisam.result
index 220d14f3b0e..5a228f63502 100644
--- a/mysql-test/main/mix2_myisam.result
+++ b/mysql-test/main/mix2_myisam.result
@@ -1,5 +1,5 @@
call mtr.add_suppression("Can't find record in .*");
-SET SESSION STORAGE_ENGINE = MEMORY;
+SET SESSION DEFAULT_STORAGE_ENGINE = MEMORY;
drop table if exists t1,t2,t3,t4;
drop database if exists mysqltest;
create table t1 (id int unsigned not null auto_increment, code tinyint unsigned not null, name char(20) not null, primary key (id), key (code), unique (name)) engine=MyISAM;
@@ -1411,7 +1411,7 @@ select count(*) from t1 where x = 18446744073709551601;
count(*)
1
drop table t1;
-set storage_engine=MyISAM;
+set default_storage_engine=MyISAM;
drop table if exists t1,t2,t3;
--- Testing varchar ---
--- Testing varchar ---
@@ -1552,7 +1552,7 @@ alter table t1 add unique(v);
ERROR 23000: Duplicate entry '{ ' for key 'v_2'
show warnings;
Level Code Message
-Error 1062 Duplicate entry 'a' for key 'v_2'
+Error 1062 Duplicate entry 'a\0001' for key 'v_2'
alter table t1 add key(v);
Warnings:
Note 1831 Duplicate index `v_2`. This is deprecated and will be disallowed in a future release
@@ -2012,7 +2012,7 @@ t1 CREATE TABLE `t1` (
`v` mediumtext CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
-set storage_engine=MEMORY;
+set default_storage_engine=MEMORY;
create table t1 (v varchar(16384)) engine=MyISAM;
drop table t1;
create table t1 (a char(1), b char(1), key(a, b)) engine=MyISAM;
diff --git a/mysql-test/main/mrr_icp_extra.result b/mysql-test/main/mrr_icp_extra.result
index 176df5cf9d5..f0c284762c6 100644
--- a/mysql-test/main/mrr_icp_extra.result
+++ b/mysql-test/main/mrr_icp_extra.result
@@ -353,7 +353,7 @@ alter table t1 add unique(v);
ERROR 23000: Duplicate entry '{ ' for key 'v_2'
show warnings;
Level Code Message
-Error 1062 Duplicate entry 'a' for key 'v_2'
+Error 1062 Duplicate entry 'a\0001' for key 'v_2'
alter table t1 add key(v);
Warnings:
Note 1831 Duplicate index `v_2`. This is deprecated and will be disallowed in a future release
diff --git a/mysql-test/main/my_print_defaults.result b/mysql-test/main/my_print_defaults.result
new file mode 100644
index 00000000000..64aa7b45ca8
--- /dev/null
+++ b/mysql-test/main/my_print_defaults.result
@@ -0,0 +1,51 @@
+# MDEV-24248: my_print_defaults is not taking all the values when using
+# -e option which is called from mysql.server (extra_args).
+#
+# checking for mysql.server
+--key_buffer_size=20M
+--max_allowed_packet=250M
+--table_open_cache=1000
+--table_definition_cache=2000
+--read_buffer_size=1M
+--thread_cache_size=8
+--max_connections=1024
+--long_query_time=60
+--slow_query_log=1
+#
+# MDEV-25908: -e does not work for my_print_defaults
+#
+# Testing -e
+--key_buffer_size=20M
+--max_allowed_packet=250M
+--table_open_cache=1000
+#Testing --defaults-extra-file
+--key_buffer_size=20M
+--max_allowed_packet=250M
+--table_open_cache=1000
+#
+# Testing other options
+#
+# Testing -c option
+--key_buffer_size=20M
+--max_allowed_packet=250M
+--table_open_cache=1000
+# Testing --defaults-file
+--key_buffer_size=20M
+--max_allowed_packet=250M
+--table_open_cache=1000
+# Testing -g option
+--key_buffer_size=20M
+--max_allowed_packet=250M
+--table_open_cache=1000
+--table_definition_cache=2000
+--read_buffer_size=1M
+--thread_cache_size=8
+# Testing --defaults-group-suffix
+--key_buffer_size=20M
+--max_allowed_packet=250M
+--table_open_cache=1000
+--table_definition_cache=2000
+--read_buffer_size=1M
+--thread_cache_size=8
+# Testing --no-defaults
+# End of 10.5 Test
diff --git a/mysql-test/main/my_print_defaults.test b/mysql-test/main/my_print_defaults.test
new file mode 100644
index 00000000000..bfd4e563826
--- /dev/null
+++ b/mysql-test/main/my_print_defaults.test
@@ -0,0 +1,106 @@
+--echo # MDEV-24248: my_print_defaults is not taking all the values when using
+--echo # -e option which is called from mysql.server (extra_args).
+--echo #
+
+--echo # checking for mysql.server
+
+--write_file $MYSQLTEST_VARDIR/tmp/tmp1.cnf
+[mariadb]
+key_buffer_size=20M
+max_allowed_packet=250M
+table_open_cache=1000
+table_definition_cache=2000
+read_buffer_size=1M
+thread_cache_size=8
+max_connections=1024
+long_query_time=60
+slow_query_log=1
+EOF
+
+--write_file $MYSQLTEST_VARDIR/tmp/tmp2.cnf
+[mariadb]
+key_buffer_size=20M
+max_allowed_packet=250M
+table_open_cache=1000
+table_definition_cache=2000
+read_buffer_size=1M
+thread_cache_size=8
+max_connections=1024
+long_query_time=60
+slow_query_log=1
+EOF
+
+--exec $MYSQL_MY_PRINT_DEFAULTS --defaults-extra-file=$MYSQLTEST_VARDIR/tmp/tmp1.cnf -c $MYSQLTEST_VARDIR/tmp/tmp2.cnf --mysqld mysql.server
+--remove_file $MYSQLTEST_VARDIR/tmp/tmp1.cnf
+--remove_file $MYSQLTEST_VARDIR/tmp/tmp2.cnf
+
+
+--echo #
+--echo # MDEV-25908: -e does not work for my_print_defaults
+--echo #
+
+--write_file $MYSQLTEST_VARDIR/tmp/tmp1.cnf
+
+[mariadb]
+key_buffer_size=20M
+max_allowed_packet=250M
+table_open_cache=1000
+EOF
+
+--write_file $MYSQLTEST_VARDIR/tmp/tmp2.cnf
+
+[mariadb]
+key_buffer_size=20M
+max_allowed_packet=250M
+table_open_cache=1000
+EOF
+
+--echo # Testing -e
+--exec $MYSQL_MY_PRINT_DEFAULTS -e $MYSQLTEST_VARDIR/tmp/tmp1.cnf -c $MYSQLTEST_VARDIR/tmp/tmp2.cnf --mysqld mysql.server
+--echo #Testing --defaults-extra-file
+--exec $MYSQL_MY_PRINT_DEFAULTS --defaults-extra-file=$MYSQLTEST_VARDIR/tmp/tmp1.cnf -c $MYSQLTEST_VARDIR/tmp/tmp2.cnf --mysqld mysql.server
+
+--remove_file $MYSQLTEST_VARDIR/tmp/tmp1.cnf
+--remove_file $MYSQLTEST_VARDIR/tmp/tmp2.cnf
+
+--echo #
+--echo # Testing other options
+--echo #
+
+
+--write_file $MYSQLTEST_VARDIR/tmp/tmp2.cnf
+[mariadb]
+key_buffer_size=20M
+max_allowed_packet=250M
+table_open_cache=1000
+EOF
+
+--write_file $MYSQLTEST_VARDIR/tmp/tmp3.cnf
+[mariadb]
+key_buffer_size=20M
+max_allowed_packet=250M
+table_open_cache=1000
+
+[mariadb.1]
+table_definition_cache=2000
+read_buffer_size=1M
+thread_cache_size=8
+EOF
+
+--echo # Testing -c option
+--exec $MYSQL_MY_PRINT_DEFAULTS -c $MYSQLTEST_VARDIR/tmp/tmp2.cnf --mysqld mysql.server
+--echo # Testing --defaults-file
+--exec $MYSQL_MY_PRINT_DEFAULTS --defaults-file=$MYSQLTEST_VARDIR/tmp/tmp2.cnf --mysqld mysql.server
+
+--echo # Testing -g option
+--exec $MYSQL_MY_PRINT_DEFAULTS -c $MYSQLTEST_VARDIR/tmp/tmp3.cnf --mysqld mysql.server -g .1
+--echo # Testing --defaults-group-suffix
+--exec $MYSQL_MY_PRINT_DEFAULTS -c $MYSQLTEST_VARDIR/tmp/tmp3.cnf --mysqld mysql.server --defaults-group-suffix=.1
+
+--echo # Testing --no-defaults
+--exec $MYSQL_MY_PRINT_DEFAULTS --no-defaults
+
+--remove_file $MYSQLTEST_VARDIR/tmp/tmp2.cnf
+--remove_file $MYSQLTEST_VARDIR/tmp/tmp3.cnf
+
+--echo # End of 10.5 Test
diff --git a/mysql-test/main/myisam.result b/mysql-test/main/myisam.result
index 32737bd8399..a2a9d4854ee 100644
--- a/mysql-test/main/myisam.result
+++ b/mysql-test/main/myisam.result
@@ -1127,7 +1127,7 @@ length(c1) c1
2 B
DROP TABLE t1;
End of 4.1 tests
-set storage_engine=MyISAM;
+set default_storage_engine=MyISAM;
drop table if exists t1,t2,t3;
--- Testing varchar ---
--- Testing varchar ---
@@ -1268,7 +1268,7 @@ alter table t1 add unique(v);
ERROR 23000: Duplicate entry '{ ' for key 'v_2'
show warnings;
Level Code Message
-Error 1062 Duplicate entry 'a' for key 'v_2'
+Error 1062 Duplicate entry 'a\0001' for key 'v_2'
alter table t1 add key(v);
Warnings:
Note 1831 Duplicate index `v_2`. This is deprecated and will be disallowed in a future release
@@ -1738,7 +1738,7 @@ t1 CREATE TABLE `t1` (
`v` text DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
-set storage_engine=MyISAM;
+set default_storage_engine=MyISAM;
set @save_concurrent_insert=@@concurrent_insert;
set global concurrent_insert=1;
create table t1 (a int);
diff --git a/mysql-test/main/myisam.test b/mysql-test/main/myisam.test
index 9b81ab197ae..5ed63f50f49 100644
--- a/mysql-test/main/myisam.test
+++ b/mysql-test/main/myisam.test
@@ -1023,8 +1023,8 @@ DROP TABLE t1;
# Test varchar
#
-let $default=`select @@storage_engine`;
-set storage_engine=MyISAM;
+let $default=`select @@default_storage_engine`;
+set default_storage_engine=MyISAM;
source include/varchar.inc;
#
@@ -1048,7 +1048,7 @@ create table t1 (v varchar(65535));
show create table t1;
drop table t1;
-eval set storage_engine=$default;
+eval set default_storage_engine=$default;
#
# Test concurrent insert
diff --git a/mysql-test/main/myisam_crash_before_flush_keys-master.opt b/mysql-test/main/myisam_crash_before_flush_keys-master.opt
index 425fda95086..590d44a6d12 100644
--- a/mysql-test/main/myisam_crash_before_flush_keys-master.opt
+++ b/mysql-test/main/myisam_crash_before_flush_keys-master.opt
@@ -1 +1 @@
---skip-stack-trace --skip-core-file
+--loose-skip-stack-trace --skip-core-file
diff --git a/mysql-test/main/myisam_debug.result b/mysql-test/main/myisam_debug.result
index 650a3bcb787..10208a936a0 100644
--- a/mysql-test/main/myisam_debug.result
+++ b/mysql-test/main/myisam_debug.result
@@ -38,7 +38,9 @@ insert t1 values (1),(2),(1);
set @old_dbug=@@debug_dbug;
SET debug_dbug='+d,mi_lock_database_failure';
unlock tables;
-Warnings:
+ERROR HY000: Index for table './test/t1.MYI' is corrupt; try to repair it
+SHOW WARNINGS;
+Level Code Message
Error 126 Index for table './test/t1.MYI' is corrupt; try to repair it
Error 1030 Got error 22 "Invalid argument" from storage engine MyISAM
SET debug_dbug=@old_dbug;
diff --git a/mysql-test/main/myisam_debug.test b/mysql-test/main/myisam_debug.test
index 2861c344b10..fcb134c0400 100644
--- a/mysql-test/main/myisam_debug.test
+++ b/mysql-test/main/myisam_debug.test
@@ -67,6 +67,8 @@ lock tables t1 write;
insert t1 values (1),(2),(1);
set @old_dbug=@@debug_dbug;
SET debug_dbug='+d,mi_lock_database_failure';
+--error HA_ERR_CRASHED
unlock tables;
+SHOW WARNINGS;
SET debug_dbug=@old_dbug;
drop table t1;
diff --git a/mysql-test/main/myisam_explain_non_select_all.result b/mysql-test/main/myisam_explain_non_select_all.result
index 7f24cb4896d..2ff966fdfd3 100644
--- a/mysql-test/main/myisam_explain_non_select_all.result
+++ b/mysql-test/main/myisam_explain_non_select_all.result
@@ -3091,12 +3091,11 @@ FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t1 WHERE a IN (SELECT * FROM (SELECT b FROM t2 ORDER BY b LIMIT 2,2) x);
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
-1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 100.00
-2 MATERIALIZED <derived3> ALL NULL NULL NULL NULL 3 100.00
+1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00 Using where
+1 PRIMARY <derived3> ref key0 key0 5 test.t1.a 2 100.00 FirstMatch(t1)
3 DERIVED t2 ALL NULL NULL NULL NULL 3 100.00 Using filesort
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
+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 `x`.`b` = `test`.`t1`.`a`
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
Handler_read_key 4
@@ -3105,7 +3104,7 @@ Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be
# Status of "equivalent" SELECT query execution:
Variable_name Value
Handler_read_key 7
-Handler_read_rnd_next 10
+Handler_read_rnd_next 8
Sort_priority_queue_sorts 1
Sort_rows 3
Sort_scan 1
@@ -3126,19 +3125,17 @@ 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
EXPLAIN UPDATE t1, t2 SET a = 10 WHERE a IN (SELECT * FROM (SELECT b FROM t2 ORDER BY b LIMIT 2,2) x);
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t1 ALL NULL NULL NULL NULL 3
-1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1
+1 PRIMARY t1 ALL NULL NULL NULL NULL 3 Using where
+1 PRIMARY <derived3> ref key0 key0 5 test.t1.a 2 FirstMatch(t1)
1 PRIMARY t2 ALL NULL NULL NULL NULL 3
-2 MATERIALIZED <derived3> ALL NULL NULL NULL NULL 3
3 DERIVED t2 ALL NULL NULL NULL NULL 3 Using filesort
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED UPDATE t1, t2 SET a = 10 WHERE a IN (SELECT * FROM (SELECT b FROM t2 ORDER BY b LIMIT 2,2) x);
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
-1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 100.00
+1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00 Using where
+1 PRIMARY <derived3> ref key0 key0 5 test.t1.a 2 100.00 FirstMatch(t1)
1 PRIMARY t2 ALL NULL NULL NULL NULL 3 100.00
-2 MATERIALIZED <derived3> ALL NULL NULL NULL NULL 3 100.00
3 DERIVED t2 ALL NULL NULL NULL NULL 3 100.00 Using filesort
# Status of EXPLAIN EXTENDED query
Variable_name Value
@@ -3147,13 +3144,12 @@ FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t1, t2 WHERE a IN (SELECT * FROM (SELECT b FROM t2 ORDER BY b LIMIT 2,2) x);
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
-1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 100.00
+1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00 Using where
+1 PRIMARY <derived3> ref key0 key0 5 test.t1.a 2 100.00 FirstMatch(t1)
1 PRIMARY t2 ALL NULL NULL NULL NULL 3 100.00 Using join buffer (flat, BNL join)
-2 MATERIALIZED <derived3> ALL NULL NULL NULL NULL 3 100.00
3 DERIVED t2 ALL NULL NULL NULL NULL 3 100.00 Using filesort
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
+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 `x`.`b` = `test`.`t1`.`a`
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
Handler_read_key 4
@@ -3162,14 +3158,14 @@ Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be
# Status of "equivalent" SELECT query execution:
Variable_name Value
Handler_read_key 7
-Handler_read_rnd_next 10
+Handler_read_rnd_next 8
Sort_priority_queue_sorts 1
Sort_rows 3
Sort_scan 1
# Status of testing query execution:
Variable_name Value
Handler_read_key 7
-Handler_read_rnd_next 10
+Handler_read_rnd_next 8
Sort_priority_queue_sorts 1
Sort_rows 3
Sort_scan 1
@@ -3182,20 +3178,18 @@ 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
EXPLAIN UPDATE t1, (SELECT * FROM t2) y SET a = 10 WHERE a IN (SELECT * FROM (SELECT b FROM t2 ORDER BY b LIMIT 2,2) x);
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t1 ALL NULL NULL NULL NULL 3
-1 PRIMARY <subquery3> eq_ref distinct_key distinct_key 4 func 1
+1 PRIMARY t1 ALL NULL NULL NULL NULL 3 Using where
+1 PRIMARY <derived4> ref key0 key0 5 test.t1.a 2 FirstMatch(t1)
1 PRIMARY <derived2> ALL NULL NULL NULL NULL 3
-3 MATERIALIZED <derived4> ALL NULL NULL NULL NULL 3
4 DERIVED t2 ALL NULL NULL NULL NULL 3 Using filesort
2 DERIVED t2 ALL NULL NULL NULL NULL 3
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED UPDATE t1, (SELECT * FROM t2) y SET a = 10 WHERE a IN (SELECT * FROM (SELECT b FROM t2 ORDER BY b LIMIT 2,2) x);
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
-1 PRIMARY <subquery3> eq_ref distinct_key distinct_key 4 func 1 100.00
+1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00 Using where
+1 PRIMARY <derived4> ref key0 key0 5 test.t1.a 2 100.00 FirstMatch(t1)
1 PRIMARY <derived2> ALL NULL NULL NULL NULL 3 100.00
-3 MATERIALIZED <derived4> ALL NULL NULL NULL NULL 3 100.00
4 DERIVED t2 ALL NULL NULL NULL NULL 3 100.00 Using filesort
2 DERIVED t2 ALL NULL NULL NULL NULL 3 100.00
# Status of EXPLAIN EXTENDED query
@@ -3205,13 +3199,12 @@ FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t1, (SELECT * FROM t2) y WHERE a IN (SELECT * FROM (SELECT b FROM t2 ORDER BY b LIMIT 2,2) x);
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
-1 PRIMARY <subquery3> eq_ref distinct_key distinct_key 4 func 1 100.00
+1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00 Using where
+1 PRIMARY <derived4> ref key0 key0 5 test.t1.a 2 100.00 FirstMatch(t1)
1 PRIMARY t2 ALL NULL NULL NULL NULL 3 100.00 Using join buffer (flat, BNL join)
-3 MATERIALIZED <derived4> ALL NULL NULL NULL NULL 3 100.00
4 DERIVED t2 ALL NULL NULL NULL NULL 3 100.00 Using filesort
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
+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 `x`.`b` = `test`.`t1`.`a`
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
Handler_read_key 4
@@ -3220,14 +3213,14 @@ Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be
# Status of "equivalent" SELECT query execution:
Variable_name Value
Handler_read_key 7
-Handler_read_rnd_next 10
+Handler_read_rnd_next 8
Sort_priority_queue_sorts 1
Sort_rows 3
Sort_scan 1
# Status of testing query execution:
Variable_name Value
Handler_read_key 7
-Handler_read_rnd_next 10
+Handler_read_rnd_next 8
Sort_priority_queue_sorts 1
Sort_rows 3
Sort_scan 1
@@ -3283,7 +3276,7 @@ FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT a t1 FROM t1 WHERE a>10;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t1 index PRIMARY PRIMARY 4 NULL 5 20.00 Using where; Using index
+1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 1 100.00 Using where; Using index
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
@@ -3293,9 +3286,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_first 1
-Handler_read_key 3
-Handler_read_next 5
+Handler_read_key 4
# Status of testing query execution:
Variable_name Value
Handler_read_key 4
@@ -3322,7 +3313,7 @@ FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT a t1 FROM t1 WHERE a>10 ORDER BY a+20;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t1 index PRIMARY PRIMARY 4 NULL 5 20.00 Using where; Using index; Using filesort
+1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 1 100.00 Using where; Using index; Using filesort
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
@@ -3332,9 +3323,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 3
-Handler_read_rnd_next 6
-Sort_scan 1
+Handler_read_key 4
+Sort_range 1
# Status of testing query execution:
Variable_name Value
Handler_read_key 4
diff --git a/mysql-test/main/myisam_icp.result b/mysql-test/main/myisam_icp.result
index 68770229926..d0614913480 100644
--- a/mysql-test/main/myisam_icp.result
+++ b/mysql-test/main/myisam_icp.result
@@ -407,7 +407,7 @@ WHERE (pk BETWEEN 4 AND 5 OR pk < 2) AND c1 < 240
ORDER BY c1
LIMIT 1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range PRIMARY,k1 PRIMARY 4 NULL 3 Using index condition; Using where; Rowid-ordered scan; Using filesort
+1 SIMPLE t1 range|filter PRIMARY,k1 PRIMARY|k1 4|5 NULL 3 (50%) Using index condition; Using where; Rowid-ordered scan; Using filesort; Using rowid filter
DROP TABLE t1;
#
#
@@ -428,9 +428,9 @@ EXPLAIN
SELECT * FROM t1
WHERE pk IN (SELECT it.pk FROM t2 JOIN t2 AS it ON it.i=it.i WHERE it.pk-t1.i<10);
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t1 ALL NULL NULL NULL NULL 3 Using where
-2 DEPENDENT SUBQUERY it eq_ref PRIMARY PRIMARY 4 func 1 Using index condition
-2 DEPENDENT SUBQUERY t2 index NULL PRIMARY 4 NULL 3 Using index; Using join buffer (flat, BNL join)
+1 PRIMARY t1 ALL NULL NULL NULL NULL # Using where
+2 DEPENDENT SUBQUERY it eq_ref PRIMARY PRIMARY 4 func # Using index condition
+2 DEPENDENT SUBQUERY t2 index NULL PRIMARY 4 NULL # Using index; Using join buffer (flat, BNL join)
SELECT * FROM t1
WHERE pk IN (SELECT it.pk FROM t2 JOIN t2 AS it ON it.i=it.i WHERE it.pk-t1.i<10);
pk i
@@ -506,7 +506,7 @@ WHERE (t2.pk <= 4 AND t1.pk IN (2,1)) OR
(t1.pk > 1 AND t2.pk BETWEEN 6 AND 6);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 1 Using index condition; Rowid-ordered scan
-1 SIMPLE t2 ALL PRIMARY NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join)
+1 SIMPLE t2 range PRIMARY PRIMARY 4 NULL 2 Using index condition; Using where; Rowid-ordered scan; Using join buffer (flat, BNL join)
SELECT c2 FROM t1 JOIN t2 ON t1.c1 = t2.c1
WHERE (t2.pk <= 4 AND t1.pk IN (2,1)) OR
(t1.pk > 1 AND t2.pk BETWEEN 6 AND 6);
@@ -675,16 +675,18 @@ DROP TABLE t1;
#
CREATE TABLE t1 (b int NOT NULL, c int, a varchar(1024), PRIMARY KEY (b));
INSERT INTO t1 VALUES (1,4,'Ill');
+insert into t1 select seq+100,5,seq from seq_1_to_100;
CREATE TABLE t2 (a varchar(1024), KEY (a(512)));
INSERT INTO t2 VALUES
('Ill'), ('eckqzsflbzaffti'), ('w'), ('she'), ('gxbwypqtjzwywwer'), ('w');
+insert into t2 select seq from seq_1_to_100;
SET SESSION optimizer_switch='index_condition_pushdown=off';
EXPLAIN
SELECT t1.b, t1.c FROM t1, t2 WHERE t1.a = t2.a AND (t1.b<0 OR t1.b>0)
HAVING t1.c != 5 ORDER BY t1.c;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 system PRIMARY NULL NULL NULL 1
-1 SIMPLE t2 ref a a 515 const 1 Using where
+1 SIMPLE t1 ALL PRIMARY NULL NULL NULL # Using where; Using filesort
+1 SIMPLE t2 ref a a 515 test.t1.a # Using where
SELECT t1.b, t1.c FROM t1, t2 WHERE t1.a = t2.a AND (t1.b<0 OR t1.b>0)
HAVING t1.c != 5 ORDER BY t1.c;
b c
@@ -694,8 +696,8 @@ EXPLAIN
SELECT t1.b, t1.c FROM t1, t2 WHERE t1.a = t2.a AND (t1.b<0 OR t1.b>0)
HAVING t1.c != 5 ORDER BY t1.c;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 system PRIMARY NULL NULL NULL 1
-1 SIMPLE t2 ref a a 515 const 1 Using where
+1 SIMPLE t1 ALL PRIMARY NULL NULL NULL # Using where; Using filesort
+1 SIMPLE t2 ref a a 515 test.t1.a # Using where
SELECT t1.b, t1.c FROM t1, t2 WHERE t1.a = t2.a AND (t1.b<0 OR t1.b>0)
HAVING t1.c != 5 ORDER BY t1.c;
b c
diff --git a/mysql-test/main/myisam_repair.result b/mysql-test/main/myisam_repair.result
deleted file mode 100644
index 50a9695c8c7..00000000000
--- a/mysql-test/main/myisam_repair.result
+++ /dev/null
@@ -1,51 +0,0 @@
-#
-# MDEV-23318 Assertion `cache_empty(keycache)' failed in
-# prepare_resize_simple_key_cache
-#
-SET @buffer_size.save= @@key_buffer_size;
-SET GLOBAL key_buffer_size= 134217728;
-SET myisam_repair_threads= 6;
-CREATE TABLE t1 (
-pk INT AUTO_INCREMENT,
-a INTEGER,
-b DATE,
-c VARCHAR(1),
-d BLOB,
-PRIMARY KEY (pk),
-KEY (a),
-KEY (b),
-KEY (c, a),
-UNIQUE (d)
-) ENGINE=MyISAM;
-INSERT INTO t1 (a,b,c) SELECT seq, '2020-12-12', 'x' FROM seq_1_to_20;
-ALTER TABLE t1 DISABLE KEYS;
-SET GLOBAL c.key_buffer_size= 13700864;
-Warnings:
-Warning 1292 Truncated incorrect key_buffer_size value: '13700864'
-INSERT INTO t1 SELECT 1;
-ERROR 21S01: Column count doesn't match value count at row 1
-SET GLOBAL c.key_buffer_size= 0;
-DROP TABLE t1;
-SET GLOBAL key_buffer_size= 134217728;
-CREATE TABLE t1 (
-pk INT AUTO_INCREMENT,
-a INTEGER,
-b DATE,
-c VARCHAR(1),
-d VARBINARY(40982),
-PRIMARY KEY (pk),
-KEY (a),
-KEY (b),
-KEY (c, a),
-UNIQUE (d)
-) ENGINE=MyISAM;
-INSERT INTO t1 (a,b,c) SELECT seq, '2020-12-12', 'x' FROM seq_1_to_20;
-ALTER TABLE t1 DISABLE KEYS;
-SET GLOBAL c.key_buffer_size= 13700864;
-Warnings:
-Warning 1292 Truncated incorrect key_buffer_size value: '13700864'
-INSERT INTO t1 SELECT 1;
-ERROR 21S01: Column count doesn't match value count at row 1
-SET GLOBAL c.key_buffer_size= 0;
-DROP TABLE t1;
-SET GLOBAL key_buffer_size= @buffer_size.save;
diff --git a/mysql-test/main/myisam_repair.test b/mysql-test/main/myisam_repair.test
deleted file mode 100644
index bcb69d59e2c..00000000000
--- a/mysql-test/main/myisam_repair.test
+++ /dev/null
@@ -1,57 +0,0 @@
---source include/have_sequence.inc
-
-
---echo #
---echo # MDEV-23318 Assertion `cache_empty(keycache)' failed in
---echo # prepare_resize_simple_key_cache
---echo #
-
-SET @buffer_size.save= @@key_buffer_size;
-SET GLOBAL key_buffer_size= 134217728;
-SET myisam_repair_threads= 6;
-
-CREATE TABLE t1 (
- pk INT AUTO_INCREMENT,
- a INTEGER,
- b DATE,
- c VARCHAR(1),
- d BLOB,
- PRIMARY KEY (pk),
- KEY (a),
- KEY (b),
- KEY (c, a),
- UNIQUE (d)
-) ENGINE=MyISAM;
-
-INSERT INTO t1 (a,b,c) SELECT seq, '2020-12-12', 'x' FROM seq_1_to_20;
-
-ALTER TABLE t1 DISABLE KEYS;
-SET GLOBAL c.key_buffer_size= 13700864;
---error ER_WRONG_VALUE_COUNT_ON_ROW
-INSERT INTO t1 SELECT 1;
-SET GLOBAL c.key_buffer_size= 0;
-DROP TABLE t1;
-
-SET GLOBAL key_buffer_size= 134217728;
-
-CREATE TABLE t1 (
- pk INT AUTO_INCREMENT,
- a INTEGER,
- b DATE,
- c VARCHAR(1),
- d VARBINARY(40982),
- PRIMARY KEY (pk),
- KEY (a),
- KEY (b),
- KEY (c, a),
- UNIQUE (d)
-) ENGINE=MyISAM;
-INSERT INTO t1 (a,b,c) SELECT seq, '2020-12-12', 'x' FROM seq_1_to_20;
-ALTER TABLE t1 DISABLE KEYS;
-SET GLOBAL c.key_buffer_size= 13700864;
---error ER_WRONG_VALUE_COUNT_ON_ROW
-INSERT INTO t1 SELECT 1;
-SET GLOBAL c.key_buffer_size= 0;
-
-DROP TABLE t1;
-SET GLOBAL key_buffer_size= @buffer_size.save;
diff --git a/mysql-test/main/myisampack.result b/mysql-test/main/myisampack.result
index 13321695360..61ad21a6c9f 100644
--- a/mysql-test/main/myisampack.result
+++ b/mysql-test/main/myisampack.result
@@ -1,6 +1,6 @@
DROP TABLE IF EXISTS t1,t2,t3;
CREATE TABLE t1(c1 DOUBLE, c2 DOUBLE, c3 DOUBLE, c4 DOUBLE, c5 DOUBLE,
-c6 DOUBLE, c7 DOUBLE, c8 DOUBLE, c9 DOUBLE, a INT PRIMARY KEY);
+c6 DOUBLE, c7 DOUBLE, c8 DOUBLE, c9 DOUBLE, a INT PRIMARY KEY) checksum=1;
INSERT INTO t1 VALUES
(-3.31168791059336e-06,-3.19054655887874e-06,-1.06528081684847e-05,-1.227278240089e-06,-1.66718069164799e-06,-2.59038972510885e-06,-2.83145227805303e-06,-4.09678491270648e-07,-2.22610091291797e-06,6),
(0.0030743000272545,2.53222044316438e-05,2.78674650061845e-05,1.95914465544536e-05,1.7347572525984e-05,1.87513810069614e-05,1.69882826885005e-05,2.44449336987598e-05,1.89914629921774e-05,9),
diff --git a/mysql-test/main/myisampack.test b/mysql-test/main/myisampack.test
index 1f97a28e6fd..a63f0bcd484 100644
--- a/mysql-test/main/myisampack.test
+++ b/mysql-test/main/myisampack.test
@@ -5,7 +5,7 @@ DROP TABLE IF EXISTS t1,t2,t3;
# BUG#31277 - myisamchk --unpack corrupts a table
#
CREATE TABLE t1(c1 DOUBLE, c2 DOUBLE, c3 DOUBLE, c4 DOUBLE, c5 DOUBLE,
- c6 DOUBLE, c7 DOUBLE, c8 DOUBLE, c9 DOUBLE, a INT PRIMARY KEY);
+ c6 DOUBLE, c7 DOUBLE, c8 DOUBLE, c9 DOUBLE, a INT PRIMARY KEY) checksum=1;
INSERT INTO t1 VALUES
(-3.31168791059336e-06,-3.19054655887874e-06,-1.06528081684847e-05,-1.227278240089e-06,-1.66718069164799e-06,-2.59038972510885e-06,-2.83145227805303e-06,-4.09678491270648e-07,-2.22610091291797e-06,6),
(0.0030743000272545,2.53222044316438e-05,2.78674650061845e-05,1.95914465544536e-05,1.7347572525984e-05,1.87513810069614e-05,1.69882826885005e-05,2.44449336987598e-05,1.89914629921774e-05,9),
diff --git a/mysql-test/main/mysql-metadata.result b/mysql-test/main/mysql-metadata.result
new file mode 100644
index 00000000000..ce6c77ed7fa
--- /dev/null
+++ b/mysql-test/main/mysql-metadata.result
@@ -0,0 +1,87 @@
+#
+# MDEV-17832 Protocol: extensions for Pluggable types and JSON, GEOMETRY
+#
+SET NAMES utf8;
+CREATE TABLE t1 (
+js0 JSON,
+js1 TEXT CHECK (JSON_VALID(js1)),
+js2 TEXT CHECK (LENGTH(js2) > 0 AND JSON_VALID(js2)),
+js3 TEXT CHECK (LENGTH(js2) > 0 OR JSON_VALID(js2))
+) CHARACTER SET utf8;
+--------------
+SELECT * FROM t1
+--------------
+
+Field 1: `js0`
+Catalog: `def`
+Database: `test`
+Table: `t1`
+Org_table: `t1`
+Type: BLOB (format=json)
+Collation: latin1_swedish_ci (8)
+Length: 4294967295
+Max_length: 0
+Decimals: 0
+Flags: BLOB BINARY
+
+Field 2: `js1`
+Catalog: `def`
+Database: `test`
+Table: `t1`
+Org_table: `t1`
+Type: BLOB (format=json)
+Collation: latin1_swedish_ci (8)
+Length: 65535
+Max_length: 0
+Decimals: 0
+Flags: BLOB
+
+Field 3: `js2`
+Catalog: `def`
+Database: `test`
+Table: `t1`
+Org_table: `t1`
+Type: BLOB (format=json)
+Collation: latin1_swedish_ci (8)
+Length: 65535
+Max_length: 0
+Decimals: 0
+Flags: BLOB
+
+Field 4: `js3`
+Catalog: `def`
+Database: `test`
+Table: `t1`
+Org_table: `t1`
+Type: BLOB
+Collation: latin1_swedish_ci (8)
+Length: 65535
+Max_length: 0
+Decimals: 0
+Flags: BLOB
+
+
+0 rows in set (TIME)
+
+Bye
+--------------
+SELECT JSON_COMPACT(js0) FROM t1
+--------------
+
+Field 1: `JSON_COMPACT(js0)`
+Catalog: `def`
+Database: ``
+Table: ``
+Org_table: ``
+Type: LONG_BLOB (format=json)
+Collation: binary (63)
+Length: 4294967295
+Max_length: 0
+Decimals: 0
+Flags: BINARY
+
+
+0 rows in set (TIME)
+
+Bye
+DROP TABLE t1;
diff --git a/mysql-test/main/mysql-metadata.test b/mysql-test/main/mysql-metadata.test
new file mode 100644
index 00000000000..bab44496f78
--- /dev/null
+++ b/mysql-test/main/mysql-metadata.test
@@ -0,0 +1,22 @@
+-- source include/have_working_dns.inc
+-- source include/not_embedded.inc
+
+--echo #
+--echo # MDEV-17832 Protocol: extensions for Pluggable types and JSON, GEOMETRY
+--echo #
+
+SET NAMES utf8;
+CREATE TABLE t1 (
+ js0 JSON,
+ js1 TEXT CHECK (JSON_VALID(js1)),
+ js2 TEXT CHECK (LENGTH(js2) > 0 AND JSON_VALID(js2)),
+ js3 TEXT CHECK (LENGTH(js2) > 0 OR JSON_VALID(js2))
+) CHARACTER SET utf8;
+
+--replace_regex /0 rows in set [(].*[)]/0 rows in set (TIME)/
+--exec $MYSQL -vvv --column-type-info --database=test -e "SELECT * FROM t1;"
+
+--replace_regex /0 rows in set [(].*[)]/0 rows in set (TIME)/
+--exec $MYSQL -vvv --column-type-info --database=test -e "SELECT JSON_COMPACT(js0) FROM t1;"
+
+DROP TABLE t1;
diff --git a/mysql-test/main/mysql_json_mysql_upgrade.result b/mysql-test/main/mysql_json_mysql_upgrade.result
new file mode 100644
index 00000000000..05863bb3591
--- /dev/null
+++ b/mysql-test/main/mysql_json_mysql_upgrade.result
@@ -0,0 +1,198 @@
+#
+# MDEV-24093: Detect during mysql_upgrade if type_mysql_json.so
+# is needed and load it
+#
+SET NAMES utf8;
+show create table mysql_json_test;
+ERROR HY000: Unknown data type: 'MYSQL_JSON'
+Phase 1/7: Checking and upgrading mysql database
+Processing databases
+mysql
+mysql.column_stats OK
+mysql.columns_priv OK
+mysql.db OK
+mysql.event OK
+mysql.func OK
+mysql.global_priv OK
+mysql.gtid_slave_pos OK
+mysql.help_category OK
+mysql.help_keyword OK
+mysql.help_relation OK
+mysql.help_topic OK
+mysql.index_stats OK
+mysql.innodb_index_stats
+Error : Unknown storage engine 'InnoDB'
+error : Corrupt
+mysql.innodb_table_stats
+Error : Unknown storage engine 'InnoDB'
+error : Corrupt
+mysql.plugin OK
+mysql.proc OK
+mysql.procs_priv OK
+mysql.proxies_priv OK
+mysql.roles_mapping OK
+mysql.servers OK
+mysql.table_stats OK
+mysql.tables_priv OK
+mysql.time_zone OK
+mysql.time_zone_leap_second OK
+mysql.time_zone_name OK
+mysql.time_zone_transition OK
+mysql.time_zone_transition_type OK
+mysql.transaction_registry
+Error : Unknown storage engine 'InnoDB'
+error : Corrupt
+
+Repairing tables
+mysql.innodb_index_stats
+Error : Unknown storage engine 'InnoDB'
+error : Corrupt
+mysql.innodb_table_stats
+Error : Unknown storage engine 'InnoDB'
+error : Corrupt
+mysql.transaction_registry
+Error : Unknown storage engine 'InnoDB'
+error : Corrupt
+Phase 2/7: Installing used storage engines... Skipped
+installing plugin for MYSQL_JSON data type
+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
+Processing databases
+information_schema
+mtr
+mtr.global_suppressions OK
+mtr.test_suppressions OK
+performance_schema
+test
+test.mysql_json_test Needs upgrade
+test.mysql_json_test_big Needs upgrade
+
+Repairing tables
+test.mysql_json_test OK
+test.mysql_json_test_big OK
+uninstalling plugin for 'type_mysql_json' data type
+Phase 7/7: Running 'FLUSH PRIVILEGES'
+OK
+show create table mysql_json_test;
+Table Create Table
+mysql_json_test CREATE TABLE `mysql_json_test` (
+ `description` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
+ `expected` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL,
+ `actual` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
+select * from mysql_json_test;
+description expected actual
+Raw integers as JSON 0 0
+Raw integers as JSON -127 -127
+Raw integers as JSON 128 128
+Raw integers as JSON 32767 32767
+Raw integers as JSON -32768 -32768
+Raw integers as JSON 65535 65535
+Raw integers as JSON 65536 65536
+Raw integers as JSON -2147483648 -2147483648
+Raw integers as JSON 2147483647 2147483647
+Raw integers as JSON 4294967295 4294967295
+Raw integers as JSON -9223372036854775807 -9223372036854775807
+Raw integers as JSON 9223372036854775807 9223372036854775807
+Raw integers as JSON 18446744073709551615 18446744073709551615
+Raw doubles as JSON 3.14 3.14
+Raw doubles as JSON -5678.987 -5678.987
+Raw doubles as JSON -2.2250738585072014e-308 -2.2250738585072014e-308
+Raw doubles as JSON 2.2250738585072014e-308 2.2250738585072014e-308
+Simple JSON test {"key1": "val1", "key2": "val2"} {"key1": "val1", "key2": "val2"}
+Raw doubles as JSON 0.0 0.0
+Simple Array as Value {"a": [1, 2], "b": ["x", "y"]} {"a": [1, 2], "b": ["x", "y"]}
+Simple Array as Base Key [1, 2, 3, 4, 5, [], "a", "b", "c"] [1, 2, 3, 4, 5, [], "a", "b", "c"]
+GeoJSON {"type": "MultiPoint", "coordinates": [[1, 1], [2, 2], [3, 3]]} {"type": "MultiPoint", "coordinates": [[1, 1], [2, 2], [3, 3]]}
+GeoJSON {"type": "LineString", "coordinates": [[0, 5], [5, 10], [10, 15]]} {"type": "LineString", "coordinates": [[0, 5], [5, 10], [10, 15]]}
+GeoJSON {"type": "GeometryCollection", "geometries": []} {"type": "GeometryCollection", "geometries": []}
+GeoJSON {"type": "Point", "coordinates": [11.1111, 12.22222]} {"type": "Point", "coordinates": [11.1111, 12.22222]}
+Opaque Types: opaque_mysql_type_set "b,c" "b,c"
+Opaque Types: opaque_mysql_type_enum "b" "b"
+Opaque Types: opaque_mysql_type_date "2015-01-15" "2015-01-15"
+Opaque Types: opaque_mysql_type_time "23:24:25.000000" "23:24:25.000000"
+Opaque Types: opaque_mysql_type_datetime "2015-01-15 23:24:25.000000" "2015-01-15 23:24:25.000000"
+Opaque Types: opaque_mysql_type_geom {"type": "Point", "coordinates": [1, 1]} {"type": "Point", "coordinates": [1, 1]}
+Opaque Types: opaque_mysql_type_bit "base64:type16:yv4=" "base64:type16:yv4="
+Opaque Types: opaque_mysql_type_year "base64:type13:MjAxOQ==" "base64:type13:MjAxOQ=="
+Opaque Types: opaque_mysql_type_blob "base64:type252:yv66vg==" "base64:type252:yv66vg=="
+Opaque Types: opaque_mysql_type_longblob "base64:type251:yv66vg==" "base64:type251:yv66vg=="
+Opaque Types: opaque_mysql_type_mediumblob "base64:type250:yv66vg==" "base64:type250:yv66vg=="
+Opaque Types: opaque_mysql_type_tinyblob "base64:type249:yv66vg==" "base64:type249:yv66vg=="
+Opaque Types: opaque_mysql_type_varchar "base64:type15:Zm9v" "base64:type15:Zm9v"
+DateTime as Raw Value: "2015-01-15 23:24:25.000000" "2015-01-15 23:24:25.000000"
+Opaque Types: opaque_mysql_type_varbinary "base64:type15:YWJj" "base64:type15:YWJj"
+Opaque Types: opaque_mysql_type_binary "base64:type254:YWJjAAAAAAAAAA==" "base64:type254:YWJjAAAAAAAAAA=="
+DateTime as Raw Value: "23:24:25.000000" "23:24:25.000000"
+DateTime as Raw Value: "2015-01-15" "2015-01-15"
+DateTime as Raw Value: "2015-01-15 23:24:25.000000" "2015-01-15 23:24:25.000000"
+UTF8 Characters: {"Person": "EMP", "details": {"Name": "Anel Husaković - test: đžšćÄ"}} {"Person": "EMP", "details": {"Name": "Anel Husaković - test: đžšćÄ"}}
+UTF8 Characters: "Anel Husaković - test: đžšćÄ" "Anel Husaković - test: đžšćÄ"
+UTF8 Characters: {"Name": "Anel Husaković - test: đžšćÄ"} {"Name": "Anel Husaković - test: đžšćÄ"}
+UTF8 Characters: {"details": {"Name": "Anel Husaković - test: đžšćÄ"}, "\"Anel Husaković - test: đžšćÄ\"": "EMP"} {"details": {"Name": "Anel Husaković - test: đžšćÄ"}, "\"Anel Husaković - test: đžšćÄ\"": "EMP"}
+Special Characters: {"{": "}"} {"{": "}"}
+Special Characters: "key1 - with \" val " "key1 - with \" val "
+Special Characters: {"key1 and \n\"key2\"": "val1\t val2"} {"key1 and \n\"key2\"": "val1\t val2"}
+Special Characters: "'" "'"
+Special Characters: "q" "q"
+Special Characters: {"[": "]"} {"[": "]"}
+Special Characters: {"{": "}"} {"{": "}"}
+Empty JSON Object/Array: [] []
+Special Characters: "some_string" "some_string"
+Special Characters: "'" "'"
+Special Characters: "\"" "\""
+Special Characters: "" ""
+Special Characters: "'" "'"
+Special Characters: "''" "''"
+Empty JSON Object/Array: {} {}
+Special Characters: "f" "f"
+Special Characters: "\\" "\\"
+Special Characters: "\n" "\n"
+Special Characters: "\f" "\f"
+Special Characters: "\t" "\t"
+Special Characters: "\r" "\r"
+Special Characters: "\b" "\b"
+Special Characters: "\\b" "\\b"
+Special Characters: {"key \n key": "val \n val"} {"key \n key": "val \n val"}
+Special Characters: {"key \f key": "val \f val"} {"key \f key": "val \f val"}
+Special Characters: {"key \t key": "val \t val"} {"key \t key": "val \t val"}
+Special Characters: {"key \r key": "val \r val"} {"key \r key": "val \r val"}
+Special Characters: {"key \b key": "val \b val"} {"key \b key": "val \b val"}
+Special Characters: {"key \\0 key": "val \n val"} {"key \\0 key": "val \n val"}
+Special Characters: {"key \\ key": "val \\ val"} {"key \\ key": "val \\ val"}
+Special Characters: {"key \" key": "val \" val"} {"key \" key": "val \" val"}
+Special Characters: {"key ' key": "val ' val"} {"key ' key": "val ' val"}
+Special Characters: {"key \\Z key": "val ' val"} {"key \\Z key": "val ' val"}
+Special Characters: ["a \f b", "c \f d"] ["a \f b", "c \f d"]
+Special Characters: ["a \t b", "c \t d"] ["a \t b", "c \t d"]
+Special Characters: ["a \r b", "c \r d"] ["a \r b", "c \r d"]
+Special Characters: ["a \b b", "c \b d"] ["a \b b", "c \b d"]
+Special Characters: ["a \\ b", "c \\ d"] ["a \\ b", "c \\ d"]
+Special Characters: ["a \" b", "c \" d"] ["a \" b", "c \" d"]
+Special Characters: ["a ' b", "c ' d"] ["a ' b", "c ' d"]
+Special String Cases: {"": ""} {"": ""}
+Special String Cases: [""] [""]
+Raw LITERALS: true true
+Raw LITERALS: false false
+Raw LITERALS: null null
+JSON LITERALS: {"val": true} {"val": true}
+JSON LITERALS: {"val": false} {"val": false}
+JSON LITERALS: {"val": null} {"val": null}
+Timestamp as RawValue "2019-12-26 19:56:03.000000" "2019-12-26 19:56:03.000000"
+Array LITERALS: ["prefix", null, "suffix", 1] ["prefix", null, "suffix", 1]
+Array LITERALS: ["prefix", false, "suffix", 1] ["prefix", false, "suffix", 1]
+Array LITERALS: ["prefix", true, "suffix", 1] ["prefix", true, "suffix", 1]
+show create table mysql_json_test_big;
+Table Create Table
+mysql_json_test_big CREATE TABLE `mysql_json_test_big` (
+ `description` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
+ `expected` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL,
+ `actual` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
+select * from mysql.plugin;
+name dl
+drop table mysql_json_test;
+drop table mysql_json_test_big;
diff --git a/mysql-test/main/mysql_json_mysql_upgrade.test b/mysql-test/main/mysql_json_mysql_upgrade.test
new file mode 100644
index 00000000000..4380b004c70
--- /dev/null
+++ b/mysql-test/main/mysql_json_mysql_upgrade.test
@@ -0,0 +1,36 @@
+--echo #
+--echo # MDEV-24093: Detect during mysql_upgrade if type_mysql_json.so
+--echo # is needed and load it
+--echo #
+
+-- source include/have_utf8.inc
+-- source include/mysql_upgrade_preparation.inc
+
+if (!$TYPE_MYSQL_JSON_SO) {
+ skip Need MYSQL_JSON plugin;
+}
+
+SET NAMES utf8;
+
+let $MYSQLD_DATADIR= `select @@datadir`;
+
+--copy_file std_data/mysql_json/mysql_json_test.frm $MYSQLD_DATADIR/test/mysql_json_test.frm
+--copy_file std_data/mysql_json/mysql_json_test.MYI $MYSQLD_DATADIR/test/mysql_json_test.MYI
+--copy_file std_data/mysql_json/mysql_json_test.MYD $MYSQLD_DATADIR/test/mysql_json_test.MYD
+
+--copy_file std_data/mysql_json/mysql_json_test_big.frm $MYSQLD_DATADIR/test/mysql_json_test_big.frm
+--copy_file std_data/mysql_json/mysql_json_test_big.MYI $MYSQLD_DATADIR/test/mysql_json_test_big.MYI
+--copy_file std_data/mysql_json/mysql_json_test_big.MYD $MYSQLD_DATADIR/test/mysql_json_test_big.MYD
+
+--error ER_UNKNOWN_DATA_TYPE
+show create table mysql_json_test;
+
+--exec $MYSQL_UPGRADE --force 2>&1
+--remove_file $MYSQLD_DATADIR/mysql_upgrade_info
+
+show create table mysql_json_test;
+select * from mysql_json_test;
+show create table mysql_json_test_big;
+select * from mysql.plugin;
+drop table mysql_json_test;
+drop table mysql_json_test_big;
diff --git a/mysql-test/main/mysql_json_mysql_upgrade_with_plugin_loaded.result b/mysql-test/main/mysql_json_mysql_upgrade_with_plugin_loaded.result
new file mode 100644
index 00000000000..0b2e7af84eb
--- /dev/null
+++ b/mysql-test/main/mysql_json_mysql_upgrade_with_plugin_loaded.result
@@ -0,0 +1,95 @@
+#
+# MDEV-24093: Detect during mysql_upgrade if type_mysql_json.so
+# is needed and load it
+#
+SET NAMES utf8;
+call mtr.add_suppression("Table rebuild required");
+show create table mysql_json_test;
+ERROR HY000: Table rebuild required. Please do "ALTER TABLE `test.mysql_json_test` FORCE" or dump/reload to fix it!
+Phase 1/7: Checking and upgrading mysql database
+Processing databases
+mysql
+mysql.column_stats OK
+mysql.columns_priv OK
+mysql.db OK
+mysql.event OK
+mysql.func OK
+mysql.global_priv OK
+mysql.gtid_slave_pos OK
+mysql.help_category OK
+mysql.help_keyword OK
+mysql.help_relation OK
+mysql.help_topic OK
+mysql.index_stats OK
+mysql.innodb_index_stats
+Error : Unknown storage engine 'InnoDB'
+error : Corrupt
+mysql.innodb_table_stats
+Error : Unknown storage engine 'InnoDB'
+error : Corrupt
+mysql.plugin OK
+mysql.proc OK
+mysql.procs_priv OK
+mysql.proxies_priv OK
+mysql.roles_mapping OK
+mysql.servers OK
+mysql.table_stats OK
+mysql.tables_priv OK
+mysql.time_zone OK
+mysql.time_zone_leap_second OK
+mysql.time_zone_name OK
+mysql.time_zone_transition OK
+mysql.time_zone_transition_type OK
+mysql.transaction_registry
+Error : Unknown storage engine 'InnoDB'
+error : Corrupt
+
+Repairing tables
+mysql.innodb_index_stats
+Error : Unknown storage engine 'InnoDB'
+error : Corrupt
+mysql.innodb_table_stats
+Error : Unknown storage engine 'InnoDB'
+error : Corrupt
+mysql.transaction_registry
+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
+Processing databases
+information_schema
+mtr
+mtr.global_suppressions OK
+mtr.test_suppressions OK
+performance_schema
+test
+test.mysql_json_test Needs upgrade
+test.mysql_json_test_big Needs upgrade
+
+Repairing tables
+test.mysql_json_test OK
+test.mysql_json_test_big OK
+Phase 7/7: Running 'FLUSH PRIVILEGES'
+OK
+show create table mysql_json_test;
+Table Create Table
+mysql_json_test CREATE TABLE `mysql_json_test` (
+ `description` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
+ `expected` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL,
+ `actual` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
+show create table mysql_json_test_big;
+Table Create Table
+mysql_json_test_big CREATE TABLE `mysql_json_test_big` (
+ `description` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
+ `expected` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL,
+ `actual` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
+select * from mysql.plugin;
+name dl
+drop table mysql_json_test;
+drop table mysql_json_test_big;
diff --git a/mysql-test/main/mysql_json_mysql_upgrade_with_plugin_loaded.test b/mysql-test/main/mysql_json_mysql_upgrade_with_plugin_loaded.test
new file mode 100644
index 00000000000..f3e9c2e539a
--- /dev/null
+++ b/mysql-test/main/mysql_json_mysql_upgrade_with_plugin_loaded.test
@@ -0,0 +1,35 @@
+--echo #
+--echo # MDEV-24093: Detect during mysql_upgrade if type_mysql_json.so
+--echo # is needed and load it
+--echo #
+# Let's now load plugin first
+-- source include/have_utf8.inc
+-- source include/have_type_mysql_json.inc
+-- source include/mysql_upgrade_preparation.inc
+
+SET NAMES utf8;
+call mtr.add_suppression("Table rebuild required");
+
+let $MYSQLD_DATADIR= `select @@datadir`;
+
+--copy_file std_data/mysql_json/mysql_json_test.frm $MYSQLD_DATADIR/test/mysql_json_test.frm
+--copy_file std_data/mysql_json/mysql_json_test.MYI $MYSQLD_DATADIR/test/mysql_json_test.MYI
+--copy_file std_data/mysql_json/mysql_json_test.MYD $MYSQLD_DATADIR/test/mysql_json_test.MYD
+
+--copy_file std_data/mysql_json/mysql_json_test_big.frm $MYSQLD_DATADIR/test/mysql_json_test_big.frm
+--copy_file std_data/mysql_json/mysql_json_test_big.MYI $MYSQLD_DATADIR/test/mysql_json_test_big.MYI
+--copy_file std_data/mysql_json/mysql_json_test_big.MYD $MYSQLD_DATADIR/test/mysql_json_test_big.MYD
+
+# In the previous example (mysql_json_mysql_upgrade.test)
+# instead of ER_TABLE_NEEDS_REBUILD we had ER_UNKNOWN_DATA_TYPE
+--error ER_TABLE_NEEDS_REBUILD
+show create table mysql_json_test;
+
+--exec $MYSQL_UPGRADE --force 2>&1
+--remove_file $MYSQLD_DATADIR/mysql_upgrade_info
+
+show create table mysql_json_test;
+show create table mysql_json_test_big;
+select * from mysql.plugin;
+drop table mysql_json_test;
+drop table mysql_json_test_big;
diff --git a/mysql-test/main/mysql_json_table_recreate.opt b/mysql-test/main/mysql_json_table_recreate.opt
new file mode 100644
index 00000000000..135fd2b77b8
--- /dev/null
+++ b/mysql-test/main/mysql_json_table_recreate.opt
@@ -0,0 +1 @@
+--plugin-load=$TYPE_MYSQL_JSON_SO
diff --git a/mysql-test/main/mysql_json_table_recreate.result b/mysql-test/main/mysql_json_table_recreate.result
new file mode 100644
index 00000000000..3dfc6d7a259
--- /dev/null
+++ b/mysql-test/main/mysql_json_table_recreate.result
@@ -0,0 +1,171 @@
+#
+# The following test takes 2 tables containing a JSON column and attempts
+# to repair them.
+#
+# The tables header is (Description, Expected, Actual), where description
+# shows a brief description what the JSON value is testing in the MariaDB
+# implementation. Expected is the longtext string and actual is the JSON
+# column that needs to be converted to MariaDB's representation of
+# LONGTEXT.
+#
+call mtr.add_suppression("Table rebuild required");
+call mtr.add_suppression("is marked as crashed");
+call mtr.add_suppression("Checking");
+SET NAMES utf8;
+#
+# Check that only ALTER TABLE ... FORCE is allowed on a MySQL 5.7 table
+# with a JSON column.
+#
+show create table tempty;
+ERROR HY000: Table rebuild required. Please do "ALTER TABLE `test.tempty` FORCE" or dump/reload to fix it!
+select * from tempty;
+ERROR HY000: Table rebuild required. Please do "ALTER TABLE `test.tempty` FORCE" or dump/reload to fix it!
+alter table tempty force;
+show create table tempty;
+Table Create Table
+tempty CREATE TABLE `tempty` (
+ `t` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+show create table mysql_json_test;
+ERROR HY000: Table rebuild required. Please do "ALTER TABLE `test.mysql_json_test` FORCE" or dump/reload to fix it!
+select * from mysql_json_test;
+ERROR HY000: Table rebuild required. Please do "ALTER TABLE `test.mysql_json_test` FORCE" or dump/reload to fix it!
+LOCK TABLES mysql_json_test WRITE;
+ERROR HY000: Table rebuild required. Please do "ALTER TABLE `test.mysql_json_test` FORCE" or dump/reload to fix it!
+alter table mysql_json_test force;
+select description, expected, actual, expected = actual from mysql_json_test;
+description expected actual expected = actual
+Array LITERALS: ["prefix", false, "suffix", 1] ["prefix", false, "suffix", 1] 1
+Array LITERALS: ["prefix", null, "suffix", 1] ["prefix", null, "suffix", 1] 1
+Array LITERALS: ["prefix", true, "suffix", 1] ["prefix", true, "suffix", 1] 1
+DateTime as Raw Value: "2015-01-15 23:24:25.000000" "2015-01-15 23:24:25.000000" 1
+DateTime as Raw Value: "2015-01-15 23:24:25.000000" "2015-01-15 23:24:25.000000" 1
+DateTime as Raw Value: "2015-01-15" "2015-01-15" 1
+DateTime as Raw Value: "23:24:25.000000" "23:24:25.000000" 1
+Empty JSON Object/Array: [] [] 1
+Empty JSON Object/Array: {} {} 1
+GeoJSON {"type": "GeometryCollection", "geometries": []} {"type": "GeometryCollection", "geometries": []} 1
+GeoJSON {"type": "LineString", "coordinates": [[0, 5], [5, 10], [10, 15]]} {"type": "LineString", "coordinates": [[0, 5], [5, 10], [10, 15]]} 1
+GeoJSON {"type": "MultiPoint", "coordinates": [[1, 1], [2, 2], [3, 3]]} {"type": "MultiPoint", "coordinates": [[1, 1], [2, 2], [3, 3]]} 1
+GeoJSON {"type": "Point", "coordinates": [11.1111, 12.22222]} {"type": "Point", "coordinates": [11.1111, 12.22222]} 1
+JSON LITERALS: {"val": false} {"val": false} 1
+JSON LITERALS: {"val": null} {"val": null} 1
+JSON LITERALS: {"val": true} {"val": true} 1
+Opaque Types: opaque_mysql_type_binary "base64:type254:YWJjAAAAAAAAAA==" "base64:type254:YWJjAAAAAAAAAA==" 1
+Opaque Types: opaque_mysql_type_bit "base64:type16:yv4=" "base64:type16:yv4=" 1
+Opaque Types: opaque_mysql_type_blob "base64:type252:yv66vg==" "base64:type252:yv66vg==" 1
+Opaque Types: opaque_mysql_type_date "2015-01-15" "2015-01-15" 1
+Opaque Types: opaque_mysql_type_datetime "2015-01-15 23:24:25.000000" "2015-01-15 23:24:25.000000" 1
+Opaque Types: opaque_mysql_type_enum "b" "b" 1
+Opaque Types: opaque_mysql_type_geom {"type": "Point", "coordinates": [1, 1]} {"type": "Point", "coordinates": [1, 1]} 1
+Opaque Types: opaque_mysql_type_longblob "base64:type251:yv66vg==" "base64:type251:yv66vg==" 1
+Opaque Types: opaque_mysql_type_mediumblob "base64:type250:yv66vg==" "base64:type250:yv66vg==" 1
+Opaque Types: opaque_mysql_type_set "b,c" "b,c" 1
+Opaque Types: opaque_mysql_type_time "23:24:25.000000" "23:24:25.000000" 1
+Opaque Types: opaque_mysql_type_tinyblob "base64:type249:yv66vg==" "base64:type249:yv66vg==" 1
+Opaque Types: opaque_mysql_type_varbinary "base64:type15:YWJj" "base64:type15:YWJj" 1
+Opaque Types: opaque_mysql_type_varchar "base64:type15:Zm9v" "base64:type15:Zm9v" 1
+Opaque Types: opaque_mysql_type_year "base64:type13:MjAxOQ==" "base64:type13:MjAxOQ==" 1
+Raw LITERALS: false false 1
+Raw LITERALS: null null 1
+Raw LITERALS: true true 1
+Raw doubles as JSON -2.2250738585072014e-308 -2.2250738585072014e-308 1
+Raw doubles as JSON -5678.987 -5678.987 1
+Raw doubles as JSON 0.0 0.0 1
+Raw doubles as JSON 2.2250738585072014e-308 2.2250738585072014e-308 1
+Raw doubles as JSON 3.14 3.14 1
+Raw integers as JSON -127 -127 1
+Raw integers as JSON -2147483648 -2147483648 1
+Raw integers as JSON -32768 -32768 1
+Raw integers as JSON -9223372036854775807 -9223372036854775807 1
+Raw integers as JSON 0 0 1
+Raw integers as JSON 128 128 1
+Raw integers as JSON 18446744073709551615 18446744073709551615 1
+Raw integers as JSON 2147483647 2147483647 1
+Raw integers as JSON 32767 32767 1
+Raw integers as JSON 4294967295 4294967295 1
+Raw integers as JSON 65535 65535 1
+Raw integers as JSON 65536 65536 1
+Raw integers as JSON 9223372036854775807 9223372036854775807 1
+Simple Array as Base Key [1, 2, 3, 4, 5, [], "a", "b", "c"] [1, 2, 3, 4, 5, [], "a", "b", "c"] 1
+Simple Array as Value {"a": [1, 2], "b": ["x", "y"]} {"a": [1, 2], "b": ["x", "y"]} 1
+Simple JSON test {"key1": "val1", "key2": "val2"} {"key1": "val1", "key2": "val2"} 1
+Special Characters: "" "" 1
+Special Characters: "'" "'" 1
+Special Characters: "'" "'" 1
+Special Characters: "'" "'" 1
+Special Characters: "''" "''" 1
+Special Characters: "\"" "\"" 1
+Special Characters: "\\" "\\" 1
+Special Characters: "\\b" "\\b" 1
+Special Characters: "\b" "\b" 1
+Special Characters: "\f" "\f" 1
+Special Characters: "\n" "\n" 1
+Special Characters: "\r" "\r" 1
+Special Characters: "\t" "\t" 1
+Special Characters: "f" "f" 1
+Special Characters: "key1 - with \" val " "key1 - with \" val " 1
+Special Characters: "q" "q" 1
+Special Characters: "some_string" "some_string" 1
+Special Characters: ["a ' b", "c ' d"] ["a ' b", "c ' d"] 1
+Special Characters: ["a \" b", "c \" d"] ["a \" b", "c \" d"] 1
+Special Characters: ["a \\ b", "c \\ d"] ["a \\ b", "c \\ d"] 1
+Special Characters: ["a \b b", "c \b d"] ["a \b b", "c \b d"] 1
+Special Characters: ["a \f b", "c \f d"] ["a \f b", "c \f d"] 1
+Special Characters: ["a \r b", "c \r d"] ["a \r b", "c \r d"] 1
+Special Characters: ["a \t b", "c \t d"] ["a \t b", "c \t d"] 1
+Special Characters: {"[": "]"} {"[": "]"} 1
+Special Characters: {"key ' key": "val ' val"} {"key ' key": "val ' val"} 1
+Special Characters: {"key \" key": "val \" val"} {"key \" key": "val \" val"} 1
+Special Characters: {"key \\ key": "val \\ val"} {"key \\ key": "val \\ val"} 1
+Special Characters: {"key \\0 key": "val \n val"} {"key \\0 key": "val \n val"} 1
+Special Characters: {"key \\Z key": "val ' val"} {"key \\Z key": "val ' val"} 1
+Special Characters: {"key \b key": "val \b val"} {"key \b key": "val \b val"} 1
+Special Characters: {"key \f key": "val \f val"} {"key \f key": "val \f val"} 1
+Special Characters: {"key \n key": "val \n val"} {"key \n key": "val \n val"} 1
+Special Characters: {"key \r key": "val \r val"} {"key \r key": "val \r val"} 1
+Special Characters: {"key \t key": "val \t val"} {"key \t key": "val \t val"} 1
+Special Characters: {"key1 and \n\"key2\"": "val1\t val2"} {"key1 and \n\"key2\"": "val1\t val2"} 1
+Special Characters: {"{": "}"} {"{": "}"} 1
+Special Characters: {"{": "}"} {"{": "}"} 1
+Special String Cases: [""] [""] 1
+Special String Cases: {"": ""} {"": ""} 1
+Timestamp as RawValue "2019-12-26 19:56:03.000000" "2019-12-26 19:56:03.000000" 1
+UTF8 Characters: "Anel Husaković - test: đžšćÄ" "Anel Husaković - test: đžšćÄ" 1
+UTF8 Characters: {"Name": "Anel Husaković - test: đžšćÄ"} {"Name": "Anel Husaković - test: đžšćÄ"} 1
+UTF8 Characters: {"Person": "EMP", "details": {"Name": "Anel Husaković - test: đžšćÄ"}} {"Person": "EMP", "details": {"Name": "Anel Husaković - test: đžšćÄ"}} 1
+UTF8 Characters: {"details": {"Name": "Anel Husaković - test: đžšćÄ"}, "\"Anel Husaković - test: đžšćÄ\"": "EMP"} {"details": {"Name": "Anel Husaković - test: đžšćÄ"}, "\"Anel Husaković - test: đžšćÄ\"": "EMP"} 1
+#
+# A quick check that all rows match from the original MySQL Table.
+#
+select count(*) as 'Total_Number_of_Tests',
+sum(expected = actual) as 'Succesful_Tests'
+from mysql_json_test;
+Total_Number_of_Tests Succesful_Tests
+100 100
+show create table mysql_json_test;
+Table Create Table
+mysql_json_test CREATE TABLE `mysql_json_test` (
+ `description` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
+ `expected` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL,
+ `actual` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
+show create table mysql_json_test_big;
+ERROR HY000: Table rebuild required. Please do "ALTER TABLE `test.mysql_json_test_big` FORCE" or dump/reload to fix it!
+select * from mysql_json_test_big;
+ERROR HY000: Table rebuild required. Please do "ALTER TABLE `test.mysql_json_test_big` FORCE" or dump/reload to fix it!
+#
+# This test checks the long format implementation of MySQL's JSON
+# Not printing the actual contents as they are not readable by a human,
+# just compare the strings, make sure they match.
+#
+alter table mysql_json_test_big force;
+select count(*) as 'Total_Number_of_Tests',
+sum(expected = actual) as 'Succesful_Tests',
+sum(JSON_VALID(actual)) as 'String_is_valid_JSON'
+from mysql_json_test_big;
+Total_Number_of_Tests Succesful_Tests String_is_valid_JSON
+1 1 1
+drop table tempty;
+drop table mysql_json_test;
+drop table mysql_json_test_big;
diff --git a/mysql-test/main/mysql_json_table_recreate.test b/mysql-test/main/mysql_json_table_recreate.test
new file mode 100644
index 00000000000..a399b546591
--- /dev/null
+++ b/mysql-test/main/mysql_json_table_recreate.test
@@ -0,0 +1,90 @@
+--source include/have_utf8.inc
+--source include/have_type_mysql_json.inc
+
+--echo #
+--echo # The following test takes 2 tables containing a JSON column and attempts
+--echo # to repair them.
+--echo #
+--echo # The tables header is (Description, Expected, Actual), where description
+--echo # shows a brief description what the JSON value is testing in the MariaDB
+--echo # implementation. Expected is the longtext string and actual is the JSON
+--echo # column that needs to be converted to MariaDB's representation of
+--echo # LONGTEXT.
+--echo #
+
+
+call mtr.add_suppression("Table rebuild required");
+call mtr.add_suppression("is marked as crashed");
+call mtr.add_suppression("Checking");
+
+let $MYSQLD_DATADIR= `select @@datadir`;
+
+SET NAMES utf8;
+
+--copy_file std_data/mysql_json/tempty.frm $MYSQLD_DATADIR/test/tempty.frm
+--copy_file std_data/mysql_json/tempty.MYI $MYSQLD_DATADIR/test/tempty.MYI
+--copy_file std_data/mysql_json/tempty.MYD $MYSQLD_DATADIR/test/tempty.MYD
+
+--copy_file std_data/mysql_json/mysql_json_test.frm $MYSQLD_DATADIR/test/mysql_json_test.frm
+--copy_file std_data/mysql_json/mysql_json_test.MYI $MYSQLD_DATADIR/test/mysql_json_test.MYI
+--copy_file std_data/mysql_json/mysql_json_test.MYD $MYSQLD_DATADIR/test/mysql_json_test.MYD
+
+--copy_file std_data/mysql_json/mysql_json_test_big.frm $MYSQLD_DATADIR/test/mysql_json_test_big.frm
+--copy_file std_data/mysql_json/mysql_json_test_big.MYI $MYSQLD_DATADIR/test/mysql_json_test_big.MYI
+--copy_file std_data/mysql_json/mysql_json_test_big.MYD $MYSQLD_DATADIR/test/mysql_json_test_big.MYD
+
+--echo #
+--echo # Check that only ALTER TABLE ... FORCE is allowed on a MySQL 5.7 table
+--echo # with a JSON column.
+--echo #
+
+--error ER_TABLE_NEEDS_REBUILD
+show create table tempty;
+--error ER_TABLE_NEEDS_REBUILD
+select * from tempty;
+
+alter table tempty force;
+show create table tempty;
+
+--error ER_TABLE_NEEDS_REBUILD
+show create table mysql_json_test;
+--error ER_TABLE_NEEDS_REBUILD
+select * from mysql_json_test;
+
+--error ER_TABLE_NEEDS_REBUILD
+LOCK TABLES mysql_json_test WRITE;
+
+alter table mysql_json_test force;
+
+--sorted_result
+select description, expected, actual, expected = actual from mysql_json_test;
+
+--echo #
+--echo # A quick check that all rows match from the original MySQL Table.
+--echo #
+select count(*) as 'Total_Number_of_Tests',
+ sum(expected = actual) as 'Succesful_Tests'
+from mysql_json_test;
+
+show create table mysql_json_test;
+
+--error ER_TABLE_NEEDS_REBUILD
+show create table mysql_json_test_big;
+--error ER_TABLE_NEEDS_REBUILD
+select * from mysql_json_test_big;
+
+--echo #
+--echo # This test checks the long format implementation of MySQL's JSON
+--echo # Not printing the actual contents as they are not readable by a human,
+--echo # just compare the strings, make sure they match.
+--echo #
+alter table mysql_json_test_big force;
+
+select count(*) as 'Total_Number_of_Tests',
+ sum(expected = actual) as 'Succesful_Tests',
+ sum(JSON_VALID(actual)) as 'String_is_valid_JSON'
+from mysql_json_test_big;
+
+drop table tempty;
+drop table mysql_json_test;
+drop table mysql_json_test_big;
diff --git a/mysql-test/main/mysql_upgrade.result b/mysql-test/main/mysql_upgrade.result
index af3688dca6b..6bb236b6fb8 100644
--- a/mysql-test/main/mysql_upgrade.result
+++ b/mysql-test/main/mysql_upgrade.result
@@ -843,3 +843,62 @@ count(*)
drop table mysql.global_priv;
rename table mysql.global_priv_bak to mysql.global_priv;
# End of 10.4 tests
+#
+# Check that mysql_upgrade can be run on mysqldump
+# of mysql schema from previous versions
+#
+call mtr.add_suppression("innodb_table_stats has length mismatch in the column name table_name");
+#
+# Upgrade from version 5.5
+#
+# Loading dump of 5.5 mysql schema
+# Running mysql_upgrade
+# Checking that mysql.user is accessible and returns some data
+SELECT COUNT(*) > 0 AS `mysql.user has data` FROM mysql.user;
+mysql.user has data
+1
+#
+# Upgrade from version 10.0
+#
+# Loading dump of 10.0 mysql schema
+# Running mysql_upgrade
+# Checking that mysql.user is accessible and returns some data
+SELECT COUNT(*) > 0 AS `mysql.user has data` FROM mysql.user;
+mysql.user has data
+1
+#
+# Upgrade from version 10.1
+#
+# Loading dump of 10.1 mysql schema
+# Running mysql_upgrade
+# Checking that mysql.user is accessible and returns some data
+SELECT COUNT(*) > 0 AS `mysql.user has data` FROM mysql.user;
+mysql.user has data
+1
+#
+# Upgrade from version 10.2
+#
+# Loading dump of 10.2 mysql schema
+# Running mysql_upgrade
+# Checking that mysql.user is accessible and returns some data
+SELECT COUNT(*) > 0 AS `mysql.user has data` FROM mysql.user;
+mysql.user has data
+1
+#
+# Upgrade from version 10.3
+#
+# Loading dump of 10.3 mysql schema
+# Running mysql_upgrade
+# Checking that mysql.user is accessible and returns some data
+SELECT COUNT(*) > 0 AS `mysql.user has data` FROM mysql.user;
+mysql.user has data
+1
+#
+# Upgrade from version 10.4
+#
+# Loading dump of 10.4 mysql schema
+# Running mysql_upgrade
+# Checking that mysql.user is accessible and returns some data
+SELECT COUNT(*) > 0 AS `mysql.user has data` FROM mysql.user;
+mysql.user has data
+1
diff --git a/mysql-test/main/mysql_upgrade.test b/mysql-test/main/mysql_upgrade.test
index 7d673d2bb4d..c40bf8b10be 100644
--- a/mysql-test/main/mysql_upgrade.test
+++ b/mysql-test/main/mysql_upgrade.test
@@ -357,3 +357,32 @@ drop table mysql.global_priv;
rename table mysql.global_priv_bak to mysql.global_priv;
--echo # End of 10.4 tests
+
+#
+# MDEV-22249 Upgrade testing between major versions in MTR
+#
+--echo #
+--echo # Check that mysql_upgrade can be run on mysqldump
+--echo # of mysql schema from previous versions
+--echo #
+
+# The warning appears during mysql_upgrade, before the schema becomes consistent
+call mtr.add_suppression("innodb_table_stats has length mismatch in the column name table_name");
+
+--let $old_version= 5.5
+--source include/load_dump_and_upgrade.inc
+
+--let $old_version= 10.0
+--source include/load_dump_and_upgrade.inc
+
+--let $old_version= 10.1
+--source include/load_dump_and_upgrade.inc
+
+--let $old_version= 10.2
+--source include/load_dump_and_upgrade.inc
+
+--let $old_version= 10.3
+--source include/load_dump_and_upgrade.inc
+
+--let $old_version= 10.4
+--source include/load_dump_and_upgrade.inc
diff --git a/mysql-test/main/mysql_upgrade_mysql_json_datatype.result b/mysql-test/main/mysql_upgrade_mysql_json_datatype.result
new file mode 100644
index 00000000000..25bc70c9074
--- /dev/null
+++ b/mysql-test/main/mysql_upgrade_mysql_json_datatype.result
@@ -0,0 +1,104 @@
+call mtr.add_suppression("Table rebuild required");
+call mtr.add_suppression("is marked as crashed");
+call mtr.add_suppression("Checking");
+SET NAMES utf8;
+set sql_mode="";
+show create table tempty;
+ERROR HY000: Table rebuild required. Please do "ALTER TABLE `test.tempty` FORCE" or dump/reload to fix it!
+show create table mysql_json_test;
+ERROR HY000: Table rebuild required. Please do "ALTER TABLE `test.mysql_json_test` FORCE" or dump/reload to fix it!
+show create table mysql_json_test_big;
+ERROR HY000: Table rebuild required. Please do "ALTER TABLE `test.mysql_json_test_big` FORCE" or dump/reload to fix it!
+# Run mysql_upgrade to fix the tables containing JSON.
+Phase 1/7: Checking and upgrading mysql database
+Processing databases
+mysql
+mysql.column_stats OK
+mysql.columns_priv OK
+mysql.db OK
+mysql.event OK
+mysql.func OK
+mysql.global_priv OK
+mysql.gtid_slave_pos OK
+mysql.help_category OK
+mysql.help_keyword OK
+mysql.help_relation OK
+mysql.help_topic OK
+mysql.index_stats OK
+mysql.innodb_index_stats OK
+mysql.innodb_table_stats OK
+mysql.plugin OK
+mysql.proc OK
+mysql.procs_priv OK
+mysql.proxies_priv OK
+mysql.roles_mapping OK
+mysql.servers OK
+mysql.table_stats OK
+mysql.tables_priv OK
+mysql.time_zone OK
+mysql.time_zone_leap_second OK
+mysql.time_zone_name OK
+mysql.time_zone_transition OK
+mysql.time_zone_transition_type OK
+mysql.transaction_registry OK
+Phase 2/7: Installing used storage engines... Skipped
+Phase 3/7: Fixing views
+mysql.user OK
+Phase 4/7: Running 'mysql_fix_privilege_tables'
+Phase 5/7: Fixing table and database names
+Phase 6/7: Checking and upgrading tables
+Processing databases
+information_schema
+mtr
+mtr.global_suppressions OK
+mtr.test_suppressions OK
+performance_schema
+test
+test.mysql_json_test Needs upgrade
+test.mysql_json_test_big Needs upgrade
+test.tempty Needs upgrade
+
+Repairing tables
+test.mysql_json_test OK
+test.mysql_json_test_big OK
+test.tempty OK
+Phase 7/7: Running 'FLUSH PRIVILEGES'
+OK
+#
+# Now check if the table structure is correct and that the data
+# is still present.
+#
+show create table tempty;
+Table Create Table
+tempty CREATE TABLE `tempty` (
+ `t` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+show create table mysql_json_test;
+Table Create Table
+mysql_json_test CREATE TABLE `mysql_json_test` (
+ `description` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
+ `expected` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL,
+ `actual` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
+show create table mysql_json_test_big;
+Table Create Table
+mysql_json_test_big CREATE TABLE `mysql_json_test_big` (
+ `description` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
+ `expected` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL,
+ `actual` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
+select count(*) as 'Total_Number_of_Tests',
+sum(expected = actual) as 'Succesful_Tests',
+sum(JSON_VALID(actual)) as 'String_is_valid_JSON'
+from mysql_json_test;
+Total_Number_of_Tests Succesful_Tests String_is_valid_JSON
+100 100 100
+select count(*) as 'Total_Number_of_Tests',
+sum(expected = actual) as 'Succesful_Tests',
+sum(JSON_VALID(actual)) as 'String_is_valid_JSON'
+from mysql_json_test_big;
+Total_Number_of_Tests Succesful_Tests String_is_valid_JSON
+1 1 1
+drop table tempty;
+drop table mysql_json_test;
+drop table mysql_json_test_big;
diff --git a/mysql-test/main/mysql_upgrade_mysql_json_datatype.test b/mysql-test/main/mysql_upgrade_mysql_json_datatype.test
new file mode 100644
index 00000000000..13d8ff5754a
--- /dev/null
+++ b/mysql-test/main/mysql_upgrade_mysql_json_datatype.test
@@ -0,0 +1,61 @@
+-- source include/mysql_upgrade_preparation.inc
+-- source include/have_working_dns.inc
+-- source include/have_innodb.inc
+-- source include/have_type_mysql_json.inc
+
+call mtr.add_suppression("Table rebuild required");
+call mtr.add_suppression("is marked as crashed");
+call mtr.add_suppression("Checking");
+
+let $MYSQLD_DATADIR= `select @@datadir`;
+SET NAMES utf8;
+
+--copy_file std_data/mysql_json/tempty.frm $MYSQLD_DATADIR/test/tempty.frm
+--copy_file std_data/mysql_json/tempty.MYI $MYSQLD_DATADIR/test/tempty.MYI
+--copy_file std_data/mysql_json/tempty.MYD $MYSQLD_DATADIR/test/tempty.MYD
+
+--copy_file std_data/mysql_json/mysql_json_test.frm $MYSQLD_DATADIR/test/mysql_json_test.frm
+--copy_file std_data/mysql_json/mysql_json_test.MYI $MYSQLD_DATADIR/test/mysql_json_test.MYI
+--copy_file std_data/mysql_json/mysql_json_test.MYD $MYSQLD_DATADIR/test/mysql_json_test.MYD
+
+--copy_file std_data/mysql_json/mysql_json_test_big.frm $MYSQLD_DATADIR/test/mysql_json_test_big.frm
+--copy_file std_data/mysql_json/mysql_json_test_big.MYI $MYSQLD_DATADIR/test/mysql_json_test_big.MYI
+--copy_file std_data/mysql_json/mysql_json_test_big.MYD $MYSQLD_DATADIR/test/mysql_json_test_big.MYD
+
+
+set sql_mode="";
+
+--error ER_TABLE_NEEDS_REBUILD
+show create table tempty;
+--error ER_TABLE_NEEDS_REBUILD
+show create table mysql_json_test;
+--error ER_TABLE_NEEDS_REBUILD
+show create table mysql_json_test_big;
+
+--echo # Run mysql_upgrade to fix the tables containing JSON.
+--exec $MYSQL_UPGRADE --force 2>&1
+
+--echo #
+--echo # Now check if the table structure is correct and that the data
+--echo # is still present.
+--echo #
+
+show create table tempty;
+show create table mysql_json_test;
+show create table mysql_json_test_big;
+
+select count(*) as 'Total_Number_of_Tests',
+sum(expected = actual) as 'Succesful_Tests',
+sum(JSON_VALID(actual)) as 'String_is_valid_JSON'
+from mysql_json_test;
+
+select count(*) as 'Total_Number_of_Tests',
+sum(expected = actual) as 'Succesful_Tests',
+sum(JSON_VALID(actual)) as 'String_is_valid_JSON'
+from mysql_json_test_big;
+
+drop table tempty;
+drop table mysql_json_test;
+drop table mysql_json_test_big;
+
+--remove_file $MYSQLD_DATADIR/mysql_upgrade_info
diff --git a/mysql-test/main/mysql_upgrade_noengine.result b/mysql-test/main/mysql_upgrade_noengine.result
index 7b7082ab007..1b915978a6d 100644
--- a/mysql-test/main/mysql_upgrade_noengine.result
+++ b/mysql-test/main/mysql_upgrade_noengine.result
@@ -318,3 +318,7 @@ uninstall plugin blackhole;
uninstall plugin archive;
drop table mysql.global_priv;
rename table mysql.global_priv_bak to mysql.global_priv;
+FLUSH PRIVILEGES;
+SHOW GRANTS FOR root@localhost;
+Grants for root@localhost GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` WITH GRANT OPTION
+Grants for root@localhost GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION
diff --git a/mysql-test/main/mysql_upgrade_noengine.test b/mysql-test/main/mysql_upgrade_noengine.test
index e3c3e718591..5b063fb3d8c 100644
--- a/mysql-test/main/mysql_upgrade_noengine.test
+++ b/mysql-test/main/mysql_upgrade_noengine.test
@@ -76,3 +76,6 @@ uninstall plugin archive;
drop table mysql.global_priv;
rename table mysql.global_priv_bak to mysql.global_priv;
+
+FLUSH PRIVILEGES;
+SHOW GRANTS FOR root@localhost;
diff --git a/mysql-test/main/mysql_upgrade_to_100502.result b/mysql-test/main/mysql_upgrade_to_100502.result
new file mode 100644
index 00000000000..15095809092
--- /dev/null
+++ b/mysql-test/main/mysql_upgrade_to_100502.result
@@ -0,0 +1,119 @@
+#
+# MDEV-22057 REPLICATION MASTER ADMIN is missing in root account after upgrade
+#
+# switching from mysql.global_priv to mysql.user
+DROP VIEW mysql.user_bak;
+FLUSH PRIVILEGES;
+CREATE USER user_all@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user_all@localhost WITH GRANT OPTION;
+SHOW GRANTS FOR user_all@localhost;
+Grants for user_all@localhost
+GRANT ALL PRIVILEGES ON *.* TO `user_all`@`localhost` WITH GRANT OPTION
+CREATE USER user_super@localhost;
+GRANT SUPER ON *.* TO user_super@localhost;
+SHOW GRANTS FOR user_super@localhost;
+Grants for user_super@localhost
+GRANT SUPER, SET USER, FEDERATED ADMIN, CONNECTION ADMIN, READ_ONLY ADMIN, REPLICATION SLAVE ADMIN, BINLOG ADMIN, BINLOG REPLAY ON *.* TO `user_super`@`localhost`
+CREATE USER user_super_replslave@localhost;
+GRANT SUPER, REPLICATION SLAVE ON *.* TO user_super_replslave@localhost;
+SHOW GRANTS FOR user_super_replslave@localhost;
+Grants for user_super_replslave@localhost
+GRANT SUPER, REPLICATION SLAVE, SET USER, FEDERATED ADMIN, CONNECTION ADMIN, READ_ONLY ADMIN, REPLICATION SLAVE ADMIN, REPLICATION MASTER ADMIN, BINLOG ADMIN, BINLOG REPLAY, SLAVE MONITOR ON *.* TO `user_super_replslave`@`localhost`
+#
+# MDEV-23610: Slave user can't run "SHOW SLAVE STATUS" anymore after upgrade to 10.5, mysql_upgrade should take of that
+#
+#
+# Users with privilege SUPER prior to 10.5 should successfully execute
+# SHOW SLAVE STATUS command
+#
+CREATE USER user_replsuper@localhost;
+GRANT SUPER ON *.* TO user_replsuper@localhost;
+SHOW GRANTS FOR user_replsuper@localhost;
+Grants for user_replsuper@localhost
+GRANT SUPER, SET USER, FEDERATED ADMIN, CONNECTION ADMIN, READ_ONLY ADMIN, REPLICATION SLAVE ADMIN, BINLOG ADMIN, BINLOG REPLAY ON *.* TO `user_replsuper`@`localhost`
+#
+# Users with privilege REPLICATION CLIENT prior to 10.5 should successfully execute
+# SHOW SLAVE STATUS command
+#
+CREATE USER user_replclient@localhost;
+GRANT REPLICATION CLIENT ON *.* TO user_replclient@localhost;
+SHOW GRANTS FOR user_replclient@localhost;
+Grants for user_replclient@localhost
+GRANT BINLOG MONITOR ON *.* TO `user_replclient`@`localhost`
+#
+# Users with privilege REPLICATION SLAVE prior to 10.5 should successfully execute
+# SHOW RELAYLOG EVENTS command
+#
+CREATE USER user_replslave@localhost;
+GRANT REPLICATION SLAVE ON *.* TO user_replslave@localhost;
+SHOW GRANTS FOR user_replslave@localhost;
+Grants for user_replslave@localhost
+GRANT REPLICATION SLAVE, REPLICATION MASTER ADMIN, SLAVE MONITOR ON *.* TO `user_replslave`@`localhost`
+# mysql_upgrade --force --silent 2>&1
+FLUSH PRIVILEGES;
+#
+# Should get ALL PRIVILEGES WITH GRANT OPTION
+#
+SHOW GRANTS FOR user_all@localhost;
+Grants for user_all@localhost
+GRANT ALL PRIVILEGES ON *.* TO `user_all`@`localhost` WITH GRANT OPTION
+#
+# Should automatically get all new 10.5.2 priveleges that were splitted from SUPER
+#
+SHOW GRANTS FOR user_super@localhost;
+Grants for user_super@localhost
+GRANT SUPER, SET USER, FEDERATED ADMIN, CONNECTION ADMIN, READ_ONLY ADMIN, REPLICATION SLAVE ADMIN, BINLOG ADMIN, BINLOG REPLAY ON *.* TO `user_super`@`localhost`
+#
+# Should automatically get all new 10.5.2 priveleges that were splitted from SUPER, plus REPLICATION MASTER ADMIN
+#
+SHOW GRANTS FOR user_super_replslave@localhost;
+Grants for user_super_replslave@localhost
+GRANT SUPER, REPLICATION SLAVE, SET USER, FEDERATED ADMIN, CONNECTION ADMIN, READ_ONLY ADMIN, REPLICATION SLAVE ADMIN, REPLICATION MASTER ADMIN, BINLOG ADMIN, BINLOG REPLAY, SLAVE MONITOR ON *.* TO `user_super_replslave`@`localhost`
+#
+# MDEV-23610: Slave user can't run "SHOW SLAVE STATUS" anymore after upgrade to 10.5, mysql_upgrade should take of that
+#
+#
+# Should automatically get BINLOG MONITOR and REPLICA MONITOR
+#
+SHOW GRANTS FOR user_replclient@localhost;
+Grants for user_replclient@localhost
+GRANT BINLOG MONITOR, SLAVE MONITOR ON *.* TO `user_replclient`@`localhost`
+#
+# Should automatically get REPLICA MONITOR
+#
+SHOW GRANTS FOR user_replslave@localhost;
+Grants for user_replslave@localhost
+GRANT REPLICATION SLAVE, SLAVE MONITOR ON *.* TO `user_replslave`@`localhost`
+connect con1,localhost,user_super_replslave,,test;
+connection con1;
+SHOW SLAVE STATUS;
+disconnect con1;
+connect con1,localhost,user_replclient,,test;
+connection con1;
+SHOW SLAVE STATUS;
+disconnect con1;
+connect con1,localhost,user_replslave,,test;
+connection con1;
+SHOW RELAYLOG EVENTS;
+disconnect con1;
+connection default;
+SELECT
+json_value(Priv, '$.version_id'),
+json_value(Priv, '$.access'),
+user
+FROM
+mysql.global_priv
+WHERE
+host='localhost'
+AND
+user LIKE 'user_%';
+json_value(Priv, '$.version_id') json_value(Priv, '$.access') user
+NULL 1073741823 user_all
+NULL 1048576 user_replclient
+NULL 524288 user_replslave
+NULL 32768 user_replsuper
+NULL 32768 user_super
+NULL 557056 user_super_replslave
+DROP TABLE mysql.global_priv;
+RENAME TABLE mysql.global_priv_bak TO mysql.global_priv;
+FLUSH PRIVILEGES;
diff --git a/mysql-test/main/mysql_upgrade_to_100502.test b/mysql-test/main/mysql_upgrade_to_100502.test
new file mode 100644
index 00000000000..b5a44080f17
--- /dev/null
+++ b/mysql-test/main/mysql_upgrade_to_100502.test
@@ -0,0 +1,127 @@
+-- source include/mysql_upgrade_preparation.inc
+-- source include/have_working_dns.inc
+-- source include/have_innodb.inc
+-- source include/have_partition.inc
+let $MYSQLD_DATADIR= `select @@datadir`;
+
+
+--echo #
+--echo # MDEV-22057 REPLICATION MASTER ADMIN is missing in root account after upgrade
+--echo #
+
+--source include/switch_to_mysql_user.inc
+DROP VIEW mysql.user_bak;
+FLUSH PRIVILEGES;
+
+CREATE USER user_all@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user_all@localhost WITH GRANT OPTION;
+SHOW GRANTS FOR user_all@localhost;
+
+CREATE USER user_super@localhost;
+GRANT SUPER ON *.* TO user_super@localhost;
+SHOW GRANTS FOR user_super@localhost;
+
+CREATE USER user_super_replslave@localhost;
+GRANT SUPER, REPLICATION SLAVE ON *.* TO user_super_replslave@localhost;
+SHOW GRANTS FOR user_super_replslave@localhost;
+
+--echo #
+--echo # MDEV-23610: Slave user can't run "SHOW SLAVE STATUS" anymore after upgrade to 10.5, mysql_upgrade should take of that
+--echo #
+
+--echo #
+--echo # Users with privilege SUPER prior to 10.5 should successfully execute
+--echo # SHOW SLAVE STATUS command
+--echo #
+CREATE USER user_replsuper@localhost;
+GRANT SUPER ON *.* TO user_replsuper@localhost;
+SHOW GRANTS FOR user_replsuper@localhost;
+
+--echo #
+--echo # Users with privilege REPLICATION CLIENT prior to 10.5 should successfully execute
+--echo # SHOW SLAVE STATUS command
+--echo #
+CREATE USER user_replclient@localhost;
+GRANT REPLICATION CLIENT ON *.* TO user_replclient@localhost;
+SHOW GRANTS FOR user_replclient@localhost;
+
+--echo #
+--echo # Users with privilege REPLICATION SLAVE prior to 10.5 should successfully execute
+--echo # SHOW RELAYLOG EVENTS command
+--echo #
+CREATE USER user_replslave@localhost;
+GRANT REPLICATION SLAVE ON *.* TO user_replslave@localhost;
+SHOW GRANTS FOR user_replslave@localhost;
+
+--echo # mysql_upgrade --force --silent 2>&1
+--exec $MYSQL_UPGRADE --force --silent 2>&1
+--remove_file $MYSQLD_DATADIR/mysql_upgrade_info
+FLUSH PRIVILEGES;
+
+--echo #
+--echo # Should get ALL PRIVILEGES WITH GRANT OPTION
+--echo #
+SHOW GRANTS FOR user_all@localhost;
+
+--echo #
+--echo # Should automatically get all new 10.5.2 priveleges that were splitted from SUPER
+--echo #
+SHOW GRANTS FOR user_super@localhost;
+
+--echo #
+--echo # Should automatically get all new 10.5.2 priveleges that were splitted from SUPER, plus REPLICATION MASTER ADMIN
+--echo #
+SHOW GRANTS FOR user_super_replslave@localhost;
+
+--echo #
+--echo # MDEV-23610: Slave user can't run "SHOW SLAVE STATUS" anymore after upgrade to 10.5, mysql_upgrade should take of that
+--echo #
+
+--echo #
+--echo # Should automatically get BINLOG MONITOR and REPLICA MONITOR
+--echo #
+SHOW GRANTS FOR user_replclient@localhost;
+
+--echo #
+--echo # Should automatically get REPLICA MONITOR
+--echo #
+SHOW GRANTS FOR user_replslave@localhost;
+
+--connect (con1,localhost,user_super_replslave,,test)
+--connection con1
+--disable_result_log
+SHOW SLAVE STATUS;
+--enable_result_log
+--disconnect con1
+
+--connect (con1,localhost,user_replclient,,test)
+--connection con1
+--disable_result_log
+SHOW SLAVE STATUS;
+--enable_result_log
+--disconnect con1
+
+--connect (con1,localhost,user_replslave,,test)
+--connection con1
+--disable_ps_protocol
+--disable_result_log
+SHOW RELAYLOG EVENTS;
+--enable_result_log
+--enable_ps_protocol
+--disconnect con1
+
+--connection default
+SELECT
+ json_value(Priv, '$.version_id'),
+ json_value(Priv, '$.access'),
+ user
+FROM
+ mysql.global_priv
+WHERE
+ host='localhost'
+AND
+ user LIKE 'user_%';
+
+DROP TABLE mysql.global_priv;
+RENAME TABLE mysql.global_priv_bak TO mysql.global_priv;
+FLUSH PRIVILEGES;
diff --git a/mysql-test/main/mysqlbinlog-innodb.result b/mysql-test/main/mysqlbinlog-innodb.result
index 9d3bcc7c776..8428e4cd74b 100644
--- a/mysql-test/main/mysqlbinlog-innodb.result
+++ b/mysql-test/main/mysqlbinlog-innodb.result
@@ -29,7 +29,7 @@ START TRANSACTION
use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=#/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -60,7 +60,7 @@ START TRANSACTION
use `foo`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=#/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
diff --git a/mysql-test/main/mysqlbinlog.result b/mysql-test/main/mysqlbinlog.result
index 4c82563e0f6..83cc2ef510a 100644
--- a/mysql-test/main/mysqlbinlog.result
+++ b/mysql-test/main/mysqlbinlog.result
@@ -22,7 +22,7 @@ ROLLBACK/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=#/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -102,7 +102,7 @@ START TRANSACTION
use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=#/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -138,7 +138,7 @@ START TRANSACTION
/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=#/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -189,7 +189,7 @@ START TRANSACTION
use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=#/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -216,7 +216,7 @@ ROLLBACK/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=#/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -296,7 +296,7 @@ START TRANSACTION
use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=#/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -332,7 +332,7 @@ START TRANSACTION
/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=#/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -383,7 +383,7 @@ START TRANSACTION
use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=#/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -492,7 +492,7 @@ DELIMITER /*!*/;
use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=#/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -544,7 +544,7 @@ DELIMITER /*!*/;
use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=#/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -724,7 +724,7 @@ ROLLBACK/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1253783037/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -778,7 +778,7 @@ DELIMITER /*!*/;
ROLLBACK/*!*/;
SET TIMESTAMP=1253783037/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -813,7 +813,7 @@ ROLLBACK /* added by mysqlbinlog */;
DELIMITER /*!*/;
SET TIMESTAMP=1266652094/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -855,7 +855,7 @@ ROLLBACK /* added by mysqlbinlog */;
DELIMITER /*!*/;
SET TIMESTAMP=1266652094/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -878,8 +878,19 @@ ROLLBACK /* added by mysqlbinlog */;
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/;
End of 5.0 tests
End of 5.1 tests
-# Expect deprecation warning.
-# Expect deprecation warning again.
+#
+# Expect error for invalid --base64-output argument value.
+# MYSQL_BINLOG std_data/master-bin.000001 --base64-output=always 2>&1
+Unknown option to base64-output: always
+Alternatives are: 'NEVER','AUTO','UNSPEC','DECODE-ROWS'
+#
+# Expect error for incomplete --base64-output argument.
+# MYSQL_BINLOG std_data/master-bin.000001 --base64-output 2>&1
+mysqlbinlog: option '--base64-output' requires an argument
+#
+# Ensure --base64-output=auto outputs the same result as unspecified
+# MYSQL_BINLOG -v MYSQLD_DATADIR/master-bin.000001 > MYSQLTEST_VARDIR/tmp/mysqlbinlog_nob64spec.out
+# MYSQL_BINLOG --base64-output=auto -v MYSQLD_DATADIR/master-bin.000001 > MYSQLTEST_VARDIR/tmp/mysqlbinlog_b64auto.out
RESET MASTER;
CREATE DATABASE test1;
USE test1;
@@ -962,7 +973,7 @@ AAAAAAAAAAAAAAAAAAAgrgJSFzgNAAgAEgAEBAQEEgAAUwAEGggAAAAICAgC
# Event: Query thread_id=1 exec_time=0 error_code=0
SET TIMESTAMP=1375907364/*!*/;
SET @@session.pseudo_thread_id=1/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -1045,7 +1056,7 @@ AAAAAAAAAAAAAAAAAAA/rQJSGzgNAAgAEgAEBAQEEgAAUwAEGggAAAAICAgC
# Event: Query thread_id=1 exec_time=1 error_code=0
SET TIMESTAMP=1375907141/*!*/;
SET @@session.pseudo_thread_id=1/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -1128,7 +1139,7 @@ AAAAAAAAAAAAAAAAAAAnrAJSHzgNAAgAEgAEBAQEEgAAUwAEGggAAAAICAgC
# Event: Query thread_id=1 exec_time=0 error_code=0
SET TIMESTAMP=1375906879/*!*/;
SET @@session.pseudo_thread_id=1/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -1211,7 +1222,7 @@ AAAAAAAAAAAAAAAAAABbsAJSEzgNAAgAEgAEBAQEEgAAUwAEGggAAAAICAgC
# Event: Query thread_id=1 exec_time=0 error_code=0
SET TIMESTAMP=1375907933/*!*/;
SET @@session.pseudo_thread_id=1/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -1257,3 +1268,21 @@ ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/;
mysqlbinlog Ver VER for OS at ARCH
+#
+# Test --rewrite-db
+#
+RESET MASTER;
+CREATE TABLE t1 (a int);
+INSERT INTO t1 values(1);
+DROP TABLE t1;
+FLUSH LOGS;
+ERROR: Bad syntax in rewrite-db: missing '->'
+
+ERROR: Bad syntax in rewrite-db: empty TO db
+
+ERROR: Bad syntax in rewrite-db: empty TO db
+
+ERROR: Bad syntax in rewrite-db: empty FROM db
+
+ERROR: Bad syntax in rewrite-db: empty FROM db
+
diff --git a/mysql-test/main/mysqlbinlog.test b/mysql-test/main/mysqlbinlog.test
index e0503402bd6..c8a141404d0 100644
--- a/mysql-test/main/mysqlbinlog.test
+++ b/mysql-test/main/mysqlbinlog.test
@@ -130,6 +130,7 @@ select "--- reading stdin --" as "";
# postion is constant to correspond to an event in pre-recorded binlog
--let $binlog_start_pos=79
--exec $MYSQL_BINLOG --short-form --start-position=$binlog_start_pos - < $MYSQL_TEST_DIR/std_data/trunc_binlog.000001
+
drop table t1,t2;
#
@@ -520,18 +521,32 @@ remove_file $MYSQLTEST_VARDIR/tmp/mysqlbinlog.warn.empty;
remove_file $MYSQLTEST_VARDIR/tmp/mysqlbinlog.warn;
#
-# WL#5625: Deprecate mysqlbinlog options --base64-output=always and --base64-output
+# MDEV-25222: Remove mysqlbinlog options --base64-output=always and --base64-output
#
---echo # Expect deprecation warning.
---exec $MYSQL_BINLOG --base64-output=always std_data/master-bin.000001 > /dev/null 2> $MYSQLTEST_VARDIR/tmp/mysqlbinlog.warn
---cat_file $MYSQLTEST_VARDIR/tmp/mysqlbinlog.warn
+--echo #
+--echo # Expect error for invalid --base64-output argument value.
+--echo # MYSQL_BINLOG std_data/master-bin.000001 --base64-output=always 2>&1
+--error 1
+--exec $MYSQL_BINLOG std_data/master-bin.000001 --base64-output=always 2>&1
---echo # Expect deprecation warning again.
---exec $MYSQL_BINLOG --base64-output std_data/master-bin.000001 > /dev/null 2> $MYSQLTEST_VARDIR/tmp/mysqlbinlog.warn
---cat_file $MYSQLTEST_VARDIR/tmp/mysqlbinlog.warn
+--echo #
+--echo # Expect error for incomplete --base64-output argument.
+--echo # MYSQL_BINLOG std_data/master-bin.000001 --base64-output 2>&1
+# The error produces the absolute path of the mysqlbinlog executable, remove it.
+--replace_regex /.*mysqlbinlog.*:/mysqlbinlog:/i
+--error 1
+--exec $MYSQL_BINLOG std_data/master-bin.000001 --base64-output 2>&1
+
+--echo #
+--echo # Ensure --base64-output=auto outputs the same result as unspecified
+--echo # MYSQL_BINLOG -v MYSQLD_DATADIR/master-bin.000001 > MYSQLTEST_VARDIR/tmp/mysqlbinlog_nob64spec.out
+--exec $MYSQL_BINLOG -v $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mysqlbinlog_nob64spec.out
+--echo # MYSQL_BINLOG --base64-output=auto -v MYSQLD_DATADIR/master-bin.000001 > MYSQLTEST_VARDIR/tmp/mysqlbinlog_b64auto.out
+--exec $MYSQL_BINLOG --base64-output=auto -v $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mysqlbinlog_b64auto.out
+--diff_files $MYSQLTEST_VARDIR/tmp/mysqlbinlog_nob64spec.out $MYSQLTEST_VARDIR/tmp/mysqlbinlog_b64auto.out
+--remove_file $MYSQLTEST_VARDIR/tmp/mysqlbinlog_nob64spec.out
+--remove_file $MYSQLTEST_VARDIR/tmp/mysqlbinlog_b64auto.out
-# Clean up this part of the test.
---remove_file $MYSQLTEST_VARDIR/tmp/mysqlbinlog.warn
# BUG#50914
# This test verifies if the approach of the mysqlbinlog prints
@@ -595,3 +610,30 @@ eval SET GLOBAL SERVER_ID = $old_server_id;
#
replace_regex /.*mysqlbinlog(\.exe)? Ver .* for .* at [-_a-zA-Z0-9]+/mysqlbinlog Ver VER for OS at ARCH/;
exec $MYSQL_BINLOG --version;
+
+--echo #
+--echo # Test --rewrite-db
+--echo #
+
+RESET MASTER;
+CREATE TABLE t1 (a int);
+INSERT INTO t1 values(1);
+DROP TABLE t1;
+FLUSH LOGS;
+
+--error 1
+--exec $MYSQL_BINLOG --rewrite-db=a --short-form $MYSQLD_DATADIR/master-bin.000001 2>&1
+
+--error 1
+--exec $MYSQL_BINLOG --rewrite-db="a->" --short-form $MYSQLD_DATADIR/master-bin.000001 2>&1
+
+--error 1
+--exec $MYSQL_BINLOG --rewrite-db="a-> " --short-form $MYSQLD_DATADIR/master-bin.000001 2>&1
+
+--error 1
+--exec $MYSQL_BINLOG --rewrite-db="->b" --short-form $MYSQLD_DATADIR/master-bin.000001 2>&1
+
+--error 1
+--exec $MYSQL_BINLOG --rewrite-db=" ->" --short-form $MYSQLD_DATADIR/master-bin.000001 2>&1
+
+--exec $MYSQL_BINLOG --rewrite-db=" test -> foo " --short-form $MYSQLD_DATADIR/master-bin.000001 > /dev/null 2> $MYSQLTEST_VARDIR/tmp/mysqlbinlog.warn
diff --git a/mysql-test/main/mysqlbinlog_row_compressed.result b/mysql-test/main/mysqlbinlog_row_compressed.result
index cb8d60704f9..95a81c7305c 100644
--- a/mysql-test/main/mysqlbinlog_row_compressed.result
+++ b/mysql-test/main/mysqlbinlog_row_compressed.result
@@ -33,7 +33,7 @@ ROLLBACK/*!*/;
use `test`/*!*/;
SET TIMESTAMP=X/*!*/;
SET @@session.pseudo_thread_id=5/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=#/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
diff --git a/mysql-test/main/mysqlbinlog_row_minimal.result b/mysql-test/main/mysqlbinlog_row_minimal.result
index aeaabab623a..659228a57e2 100644
--- a/mysql-test/main/mysqlbinlog_row_minimal.result
+++ b/mysql-test/main/mysqlbinlog_row_minimal.result
@@ -31,7 +31,7 @@ ROLLBACK/*!*/;
use `test`/*!*/;
SET TIMESTAMP=X/*!*/;
SET @@session.pseudo_thread_id=5/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=#/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -397,7 +397,7 @@ START TRANSACTION
#<date> server id 1 end_log_pos END_LOG_POS CRC32 XXX Query thread_id=TID exec_time=x error_code=0
SET TIMESTAMP=X/*!*/;
SET @@session.pseudo_thread_id=TID/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=#/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
diff --git a/mysql-test/main/mysqlbinlog_stmt_compressed.result b/mysql-test/main/mysqlbinlog_stmt_compressed.result
index 654dff9e90d..078e6a746ff 100644
--- a/mysql-test/main/mysqlbinlog_stmt_compressed.result
+++ b/mysql-test/main/mysqlbinlog_stmt_compressed.result
@@ -33,7 +33,7 @@ ROLLBACK/*!*/;
use `test`/*!*/;
SET TIMESTAMP=X/*!*/;
SET @@session.pseudo_thread_id=5/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=#/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
diff --git a/mysql-test/main/mysqld--defaults-file.test b/mysql-test/main/mysqld--defaults-file.test
index 91d30eb1617..9ca427568ef 100644
--- a/mysql-test/main/mysqld--defaults-file.test
+++ b/mysql-test/main/mysqld--defaults-file.test
@@ -4,12 +4,15 @@
source include/not_embedded.inc;
source include/not_windows.inc;
+source include/not_aix.inc;
# All these tests refer to configuration files that do not exist
+--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
--error 1
exec $MYSQLD --defaults-file=/path/with/no/extension --print-defaults 2>&1;
+--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
--error 1
exec $MYSQLD --defaults-file=/path/with.ext --print-defaults 2>&1;
@@ -35,7 +38,7 @@ exec $MYSQLD --defaults-file=no_extension --print-defaults 2>&1;
--echo #
--echo # Test on `defaults-file`
---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+--replace_result $MYSQLTEST_REAL_VARDIR MYSQLTEST_VARDIR
exec $MYSQLD --defaults-file=$MYSQLTEST_VARDIR/my.cnf --help --verbose | grep -A 1 'Default options are read';
--echo # Test on `defaults-extra-file`
diff --git a/mysql-test/main/mysqld--help,aix.rdiff b/mysql-test/main/mysqld--help,aix.rdiff
index e69de29bb2d..972f8b1844b 100644
--- a/mysql-test/main/mysqld--help,aix.rdiff
+++ b/mysql-test/main/mysqld--help,aix.rdiff
@@ -0,0 +1,76 @@
+diff --git a/mysql-test/main/mysqld--help.result b/mysql-test/main/mysqld--help.result
+index 7b0ce27ead3..38176dcaa86 100644
+--- a/mysql-test/main/mysqld--help.result
++++ b/mysql-test/main/mysqld--help.result
+@@ -1301,8 +1301,6 @@ The following specify which files/extra groups are read (specified before remain
+ WHERE clause, or a LIMIT clause, or else they will
+ aborted. Prevents the common mistake of accidentally
+ deleting or updating every row in a table.
+- --stack-trace Print a symbolic stack trace on failure
+- (Defaults to on; use --skip-stack-trace to disable.)
+ --standard-compliant-cte
+ Allow only CTEs compliant to SQL standard
+ (Defaults to on; use --skip-standard-compliant-cte to disable.)
+@@ -1367,39 +1365,6 @@ The following specify which files/extra groups are read (specified before remain
+ --thread-cache-size=#
+ How many threads we should keep in a cache for reuse.
+ These are freed after 5 minutes of idle time
+- --thread-pool-dedicated-listener
+- If set to 1,listener thread will not pick up queries
+- --thread-pool-exact-stats
+- If set to 1, provides better statistics in
+- information_schema threadpool tables
+- --thread-pool-idle-timeout=#
+- Timeout in seconds for an idle thread in the thread
+- pool.Worker thread will be shut down after timeout
+- --thread-pool-max-threads=#
+- Maximum allowed number of worker threads in the thread
+- pool
+- --thread-pool-oversubscribe=#
+- How many additional active worker threads in a group are
+- allowed.
+- --thread-pool-prio-kickup-timer=#
+- The number of milliseconds before a dequeued low-priority
+- statement is moved to the high-priority queue
+- --thread-pool-priority=name
+- Threadpool priority. High priority connections usually
+- start executing earlier than low priority.If priority set
+- to 'auto', the the actual priority(low or high) is
+- determined based on whether or not connection is inside
+- transaction.
+- --thread-pool-size=#
+- Number of thread groups in the pool. This parameter is
+- roughly equivalent to maximum number of concurrently
+- executing threads (threads in a waiting state do not
+- count as executing).
+- --thread-pool-stall-limit=#
+- Maximum query execution time in milliseconds,before an
+- executing non-yielding thread is considered stalled.If a
+- worker thread is stalled, additional worker thread may be
+- created to handle remaining clients.
+ --thread-stack=# The stack size for each thread
+ --time-format=name The TIME format (ignored)
+ --tls-version=name TLS protocol version for secure connections.. Any
+@@ -1788,7 +1753,6 @@ slow-query-log FALSE
+ sort-buffer-size 2097152
+ sql-mode STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
+ sql-safe-updates FALSE
+-stack-trace TRUE
+ standard-compliant-cte TRUE
+ stored-program-cache 256
+ strict-password-validation TRUE
+@@ -1807,14 +1771,6 @@ tcp-keepalive-probes 0
+ tcp-keepalive-time 0
+ tcp-nodelay TRUE
+ thread-cache-size 151
+-thread-pool-dedicated-listener FALSE
+-thread-pool-exact-stats FALSE
+-thread-pool-idle-timeout 60
+-thread-pool-max-threads 65536
+-thread-pool-oversubscribe 3
+-thread-pool-prio-kickup-timer 1000
+-thread-pool-priority auto
+-thread-pool-stall-limit 500
+ thread-stack 299008
+ time-format %H:%i:%s
+ tmp-disk-table-size 18446744073709551615
diff --git a/mysql-test/main/mysqld--help,win.rdiff b/mysql-test/main/mysqld--help,win.rdiff
index 1bdbc0fc287..337755252ba 100644
--- a/mysql-test/main/mysqld--help,win.rdiff
+++ b/mysql-test/main/mysqld--help,win.rdiff
@@ -1,13 +1,5 @@
--- a/mysql-test/r/mysqld--help.result
+++ b/mysql-test/r/mysqld--help.result
-@@ -419,7 +419,6 @@
- The number of segments in a key cache
- -L, --language=name Client error messages in given language. May be given as
- a full path. Deprecated. Use --lc-messages-dir instead.
-- --large-pages Enable support for large pages
- --lc-messages=name Set the language used for the error messages.
- -L, --lc-messages-dir=name
- Directory where error messages are
@@ -647,6 +646,7 @@
Use MySQL-5.6 (instead of MariaDB-5.3) format for TIME,
DATETIME, TIMESTAMP columns.
@@ -58,14 +50,6 @@
--transaction-alloc-block-size=#
Allocation block size for transactions to be stored in
binary log
-@@ -1513,7 +1523,6 @@
- key-cache-division-limit 100
- key-cache-file-hash-size 512
- key-cache-segments 0
--large-pages FALSE
- lc-messages en_US
- lc-messages-dir MYSQL_SHAREDIR/
- lc-time-names en_US
@@ -1587,6 +1596,7 @@
myisam-stats-method NULLS_UNEQUAL
myisam-use-mmap FALSE
diff --git a/mysql-test/main/mysqld--help-aria.result b/mysql-test/main/mysqld--help-aria.result
new file mode 100644
index 00000000000..70e7d8930c4
--- /dev/null
+++ b/mysql-test/main/mysqld--help-aria.result
@@ -0,0 +1,12 @@
+[ERROR] mariadbd: Can't lock aria aria_log_control for exclusive use, error: #. Will retry for 0 seconds
+[ERROR] Plugin 'Aria' init function returned error.
+[ERROR] Plugin 'Aria' registration as a STORAGE ENGINE failed.
+[Warning] Could not open mysql.plugin table: "Unknown storage engine 'Aria'". Some options may be missing from the help text
+#
+# Check that we don't write any data to wrong or not existing datadir
+#
+[Warning] Could not open mysql.plugin table: "Table 'mysql.plugin' doesn't exist". Some options may be missing from the help text
+#
+# Check with existing directory
+#
+[Warning] Could not open mysql.plugin table: "Table 'mysql.plugin' doesn't exist". Some options may be missing from the help text
diff --git a/mysql-test/main/mysqld--help-aria.test b/mysql-test/main/mysqld--help-aria.test
new file mode 100644
index 00000000000..253a46492f0
--- /dev/null
+++ b/mysql-test/main/mysqld--help-aria.test
@@ -0,0 +1,39 @@
+#
+# Check errors from mysqld--help when providing different datadir
+#
+
+# We can't run this test on windows as windows doesn't provide file locking
+# which the first exec requires.
+
+--source include/not_windows.inc
+
+--let $args=--table-cache=5 --max-connections=10 --log-warnings=1 --silent-startup --lower-case-table-names=1 --help --verbose
+
+--exec $MYSQLD_CMD $args > $MYSQL_TMP_DIR/mysqld--help2.txt 2> $MYSQL_TMP_DIR/mysqld--help2.err
+--replace_regex /mysqld/mariadbd/ /\d\d\d\d-\d*-\d* *\d*:\d*:\d* \d* // /control file '.*aria_log_control'/aria_log_control/ /error: \d+/error: #/
+--cat_file $MYSQL_TMP_DIR/mysqld--help2.err
+
+--echo #
+--echo # Check that we don't write any data to wrong or not existing datadir
+--echo #
+
+--exec $MYSQLD_CMD $args --datadir=$MYSQL_TMP_DIR/help > $MYSQL_TMP_DIR/mysqld--help2.txt 2> $MYSQL_TMP_DIR/mysqld--help2.err
+--replace_regex /\d\d\d\d-\d*-\d* *\d*:\d*:\d* \d* //
+--cat_file $MYSQL_TMP_DIR/mysqld--help2.err
+
+--echo #
+--echo # Check with existing directory
+--echo #
+
+--mkdir $MYSQL_TMP_DIR/help
+--exec $MYSQLD_CMD $args --datadir=$MYSQL_TMP_DIR/help > $MYSQL_TMP_DIR/mysqld--help2.txt 2> $MYSQL_TMP_DIR/mysqld--help2.err
+--replace_regex /\d\d\d\d-\d*-\d* *\d*:\d*:\d* \d* //
+--cat_file $MYSQL_TMP_DIR/mysqld--help2.err
+--list_files $MYSQL_TMP_DIR/help
+
+#
+# Cleanup
+#
+--rmdir $MYSQL_TMP_DIR/help
+--remove_file $MYSQL_TMP_DIR/mysqld--help2.txt
+--remove_file $MYSQL_TMP_DIR/mysqld--help2.err
diff --git a/mysql-test/main/mysqld--help.result b/mysql-test/main/mysqld--help.result
index c008df32257..7b0ce27ead3 100644
--- a/mysql-test/main/mysqld--help.result
+++ b/mysql-test/main/mysqld--help.result
@@ -40,7 +40,7 @@ The following specify which files/extra groups are read (specified before remain
--big-tables Old variable, which if set to 1, allows large result sets
by saving all temporary sets to disk, avoiding 'table
full' errors. No longer needed, as the server now handles
- this automatically. sql_big_tables is a synonym.
+ this automatically.
--bind-address=name IP address to bind to.
--binlog-annotate-row-events
Tells the master to annotate RBR events with the
@@ -114,6 +114,12 @@ The following specify which files/extra groups are read (specified before remain
the table) is logged in the before image, and only
changed columns are logged in the after image. (Default:
FULL).
+ --binlog-row-metadata=name
+ Controls whether metadata is logged using FULL , MINIMAL
+ format and NO_LOG.FULL causes all metadata to be logged;
+ MINIMAL means that only metadata actually required by
+ slave is logged; NO_LOG NO metadata will be
+ logged.Default: NO_LOG.
--binlog-stmt-cache-size=#
The size of the statement cache for updates to
non-transactional engines for the binary log. If you
@@ -196,7 +202,8 @@ The following specify which files/extra groups are read (specified before remain
using the password expiration options in ALTER USER.
--default-regex-flags=name
Default flags for the regex library. Any combination of:
- DOTALL, DUPNAMES, EXTENDED, EXTRA, MULTILINE, UNGREEDY
+ DOTALL, DUPNAMES, EXTENDED, EXTENDED_MORE, EXTRA,
+ MULTILINE, UNGREEDY
--default-storage-engine=name
The default storage engine for new tables
--default-time-zone=name
@@ -561,10 +568,6 @@ The following specify which files/extra groups are read (specified before remain
max_join_size records return an error
--max-length-for-sort-data=#
Max number of bytes in sorted records
- --max-long-data-size=#
- 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
@@ -613,8 +616,6 @@ The following specify which files/extra groups are read (specified before remain
Don't write queries to slow log that examine fewer rows
than that
--mrr-buffer-size=# Size of buffer to use when using MRR with range access
- --multi-range-count=#
- Ignored. Use mrr_buffer_size instead
--myisam-block-size=#
Block size to be used for MyISAM index pages
--myisam-data-pointer-size=#
@@ -680,6 +681,9 @@ The following specify which files/extra groups are read (specified before remain
max_connections*5 or max_connections + table_cache*2
(whichever is larger) number of file descriptors
(Automatically configured unless set explicitly)
+ --optimizer-max-sel-arg-weight=#
+ The maximum weight of the SEL_ARG graph. Set to 0 for no
+ limit
--optimizer-prune-level=#
Controls the heuristic(s) applied during query
optimization to prune less-promising partial plans from
@@ -714,7 +718,7 @@ The following specify which files/extra groups are read (specified before remain
extended_keys, exists_to_in, orderby_uses_equalities,
condition_pushdown_for_derived, split_materialized,
condition_pushdown_for_subquery, rowid_filter,
- condition_pushdown_from_having
+ condition_pushdown_from_having, not_null_range_scan
--optimizer-trace=name
Controls tracing of the Optimizer:
optimizer_trace=option=val[,option=val...], where option
@@ -755,13 +759,21 @@ The following specify which files/extra groups are read (specified before remain
--performance-schema-consumer-events-statements-current
Default startup value for the events_statements_current
consumer.
- (Defaults to on; use --skip-performance-schema-consumer-events-statements-current to disable.)
--performance-schema-consumer-events-statements-history
Default startup value for the events_statements_history
consumer.
--performance-schema-consumer-events-statements-history-long
Default startup value for the
events_statements_history_long consumer.
+ --performance-schema-consumer-events-transactions-current
+ Default startup value for the events_transactions_current
+ consumer.
+ --performance-schema-consumer-events-transactions-history
+ Default startup value for the events_transactions_history
+ consumer.
+ --performance-schema-consumer-events-transactions-history-long
+ Default startup value for the
+ events_transactions_history_long consumer.
--performance-schema-consumer-events-waits-current
Default startup value for the events_waits_current
consumer.
@@ -797,6 +809,12 @@ The following specify which files/extra groups are read (specified before remain
--performance-schema-events-statements-history-size=#
Number of rows per thread in EVENTS_STATEMENTS_HISTORY.
Use 0 to disable, -1 for automated sizing.
+ --performance-schema-events-transactions-history-long-size=#
+ Number of rows in EVENTS_TRANSACTIONS_HISTORY_LONG. Use 0
+ to disable, -1 for automated sizing.
+ --performance-schema-events-transactions-history-size=#
+ Number of rows per thread in EVENTS_TRANSACTIONS_HISTORY.
+ Use 0 to disable, -1 for automated sizing.
--performance-schema-events-waits-history-long-size=#
Number of rows in EVENTS_WAITS_HISTORY_LONG. Use 0 to
disable, -1 for automated sizing.
@@ -824,11 +842,25 @@ The following specify which files/extra groups are read (specified before remain
--performance-schema-max-file-instances=#
Maximum number of instrumented files. Use 0 to disable,
-1 for automated sizing.
+ --performance-schema-max-index-stat=#
+ Maximum number of index statistics for instrumented
+ tables. Use 0 to disable, -1 for automated scaling.
+ --performance-schema-max-memory-classes=#
+ Maximum number of memory pool instruments.
+ --performance-schema-max-metadata-locks=#
+ Maximum number of metadata locks. Use 0 to disable, -1
+ for automated scaling.
--performance-schema-max-mutex-classes=#
Maximum number of mutex instruments.
--performance-schema-max-mutex-instances=#
Maximum number of instrumented MUTEX objects. Use 0 to
disable, -1 for automated sizing.
+ --performance-schema-max-prepared-statements-instances=#
+ Maximum number of instrumented prepared statements. Use 0
+ to disable, -1 for automated scaling.
+ --performance-schema-max-program-instances=#
+ Maximum number of instrumented programs. Use 0 to
+ disable, -1 for automated scaling.
--performance-schema-max-rwlock-classes=#
Maximum number of rwlock instruments.
--performance-schema-max-rwlock-instances=#
@@ -839,16 +871,23 @@ The following specify which files/extra groups are read (specified before remain
--performance-schema-max-socket-instances=#
Maximum number of opened instrumented sockets. Use 0 to
disable, -1 for automated sizing.
+ --performance-schema-max-sql-text-length=#
+ Maximum length of displayed sql text.
--performance-schema-max-stage-classes=#
Maximum number of stage instruments.
--performance-schema-max-statement-classes=#
Maximum number of statement instruments.
+ --performance-schema-max-statement-stack=#
+ Number of rows per thread in EVENTS_STATEMENTS_CURRENT.
--performance-schema-max-table-handles=#
Maximum number of opened instrumented tables. Use 0 to
disable, -1 for automated sizing.
--performance-schema-max-table-instances=#
Maximum number of instrumented tables. Use 0 to disable,
-1 for automated sizing.
+ --performance-schema-max-table-lock-stat=#
+ Maximum number of lock statistics for instrumented
+ tables. Use 0 to disable, -1 for automated scaling.
--performance-schema-max-thread-classes=#
Maximum number of thread instruments.
--performance-schema-max-thread-instances=#
@@ -1046,6 +1085,10 @@ The following specify which files/extra groups are read (specified before remain
not sure, leave this option unset
--report-user=name The account user name of the slave to be reported to the
master during slave registration
+ --require-secure-transport
+ When this option is enabled, connections attempted using
+ insecure transport will be rejected. Secure transports
+ are SSL/TLS, Unix sockets or named pipes.
--rowid-merge-buff-size=#
The size of the buffers used [NOT] IN evaluation via
partial matching
@@ -1115,8 +1158,6 @@ The following specify which files/extra groups are read (specified before remain
Show user and password in SHOW SLAVE HOSTS on this
master.
--silent-startup Don't print [Note] to the error log during startup.
- --skip-bdb Deprecated option; Exist only for compatibility with old
- my.cnf files
--skip-grant-tables Start without grant tables. This gives all users FULL
ACCESS to all tables.
--skip-host-cache Don't cache host names.
@@ -1186,13 +1227,15 @@ The following specify which files/extra groups are read (specified before remain
Alias for slave_parallel_threads
--slave-run-triggers-for-rbr=name
Modes for how triggers in row-base replication on slave
- side will be executed. Legal values are NO (default), YES
- and LOGGING. NO means that trigger for RBR will not be
- running on slave. YES and LOGGING means that triggers
- will be running on slave, if there was not triggers
- running on the master for the statement. LOGGING also
- means results of that the executed triggers work will be
- written to the binlog.
+ side will be executed. Legal values are NO (default),
+ YES, LOGGING and ENFORCE. NO means that trigger for RBR
+ will not be running on slave. YES and LOGGING means that
+ triggers will be running on slave, if there was not
+ triggers running on the master for the statement. LOGGING
+ also means results of that the executed triggers work
+ will be written to the binlog. ENFORCE means that
+ triggers will always be run on the slave, even if there
+ are triggers on the master. ENFORCE implies LOGGING.
--slave-skip-errors=name
Tells the slave thread to continue replication when a
query event returns an error from the provided list
@@ -1324,6 +1367,11 @@ The following specify which files/extra groups are read (specified before remain
--thread-cache-size=#
How many threads we should keep in a cache for reuse.
These are freed after 5 minutes of idle time
+ --thread-pool-dedicated-listener
+ If set to 1,listener thread will not pick up queries
+ --thread-pool-exact-stats
+ If set to 1, provides better statistics in
+ information_schema threadpool tables
--thread-pool-idle-timeout=#
Timeout in seconds for an idle thread in the thread
pool.Worker thread will be shut down after timeout
@@ -1354,8 +1402,6 @@ The following specify which files/extra groups are read (specified before remain
created to handle remaining clients.
--thread-stack=# The stack size for each thread
--time-format=name The TIME format (ignored)
- --timed-mutexes Specify whether to time mutexes. Deprecated, has no
- effect.
--tls-version=name TLS protocol version for secure connections.. Any
combination of: TLSv1.0, TLSv1.1, TLSv1.2, TLSv1.3
--tmp-disk-table-size=#
@@ -1428,6 +1474,7 @@ binlog-format MIXED
binlog-optimize-thread-scheduling TRUE
binlog-row-event-max-size 8192
binlog-row-image FULL
+binlog-row-metadata NO_LOG
binlog-stmt-cache-size 32768
bulk-insert-buffer-size 8388608
character-set-client-handshake TRUE
@@ -1556,7 +1603,6 @@ max-error-count 64
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
@@ -1575,7 +1621,6 @@ metadata-locks-cache-size 1024
metadata-locks-hash-instances 8
min-examined-row-limit 0
mrr-buffer-size 262144
-multi-range-count 256
myisam-block-size 1024
myisam-data-pointer-size 6
myisam-max-sort-file-size 9223372036853727232
@@ -1595,6 +1640,7 @@ old-alter-table DEFAULT
old-mode
old-passwords FALSE
old-style-user-limits FALSE
+optimizer-max-sel-arg-weight 32000
optimizer-prune-level 1
optimizer-search-depth 62
optimizer-selectivity-sampling-limit 100
@@ -1607,9 +1653,12 @@ performance-schema-accounts-size -1
performance-schema-consumer-events-stages-current FALSE
performance-schema-consumer-events-stages-history FALSE
performance-schema-consumer-events-stages-history-long FALSE
-performance-schema-consumer-events-statements-current TRUE
+performance-schema-consumer-events-statements-current FALSE
performance-schema-consumer-events-statements-history FALSE
performance-schema-consumer-events-statements-history-long FALSE
+performance-schema-consumer-events-transactions-current FALSE
+performance-schema-consumer-events-transactions-history FALSE
+performance-schema-consumer-events-transactions-history-long FALSE
performance-schema-consumer-events-waits-current FALSE
performance-schema-consumer-events-waits-history FALSE
performance-schema-consumer-events-waits-history-long FALSE
@@ -1621,6 +1670,8 @@ performance-schema-events-stages-history-long-size -1
performance-schema-events-stages-history-size -1
performance-schema-events-statements-history-long-size -1
performance-schema-events-statements-history-size -1
+performance-schema-events-transactions-history-long-size -1
+performance-schema-events-transactions-history-size -1
performance-schema-events-waits-history-long-size -1
performance-schema-events-waits-history-size -1
performance-schema-hosts-size -1
@@ -1628,24 +1679,32 @@ performance-schema-instrument
performance-schema-max-cond-classes 90
performance-schema-max-cond-instances -1
performance-schema-max-digest-length 1024
-performance-schema-max-file-classes 50
+performance-schema-max-file-classes 80
performance-schema-max-file-handles 32768
performance-schema-max-file-instances -1
-performance-schema-max-mutex-classes 200
+performance-schema-max-index-stat -1
+performance-schema-max-memory-classes 320
+performance-schema-max-metadata-locks -1
+performance-schema-max-mutex-classes 210
performance-schema-max-mutex-instances -1
-performance-schema-max-rwlock-classes 40
+performance-schema-max-prepared-statements-instances -1
+performance-schema-max-program-instances -1
+performance-schema-max-rwlock-classes 50
performance-schema-max-rwlock-instances -1
performance-schema-max-socket-classes 10
performance-schema-max-socket-instances -1
+performance-schema-max-sql-text-length 1024
performance-schema-max-stage-classes 160
-performance-schema-max-statement-classes 202
+performance-schema-max-statement-classes 222
+performance-schema-max-statement-stack 10
performance-schema-max-table-handles -1
performance-schema-max-table-instances -1
+performance-schema-max-table-lock-stat -1
performance-schema-max-thread-classes 50
performance-schema-max-thread-instances -1
performance-schema-session-connect-attrs-size -1
-performance-schema-setup-actors-size 100
-performance-schema-setup-objects-size 100
+performance-schema-setup-actors-size -1
+performance-schema-setup-objects-size -1
performance-schema-users-size -1
port 3306
port-open-timeout 0
@@ -1680,6 +1739,7 @@ report-host (No default value)
report-password (No default value)
report-port 0
report-user (No default value)
+require-secure-transport FALSE
rowid-merge-buff-size 8388608
rpl-semi-sync-master-enabled FALSE
rpl-semi-sync-master-timeout 10000
@@ -1747,6 +1807,8 @@ tcp-keepalive-probes 0
tcp-keepalive-time 0
tcp-nodelay TRUE
thread-cache-size 151
+thread-pool-dedicated-listener FALSE
+thread-pool-exact-stats FALSE
thread-pool-idle-timeout 60
thread-pool-max-threads 65536
thread-pool-oversubscribe 3
@@ -1755,7 +1817,6 @@ thread-pool-priority auto
thread-pool-stall-limit 500
thread-stack 299008
time-format %H:%i:%s
-timed-mutexes FALSE
tmp-disk-table-size 18446744073709551615
tmp-memory-table-size 16777216
tmp-table-size 16777216
diff --git a/mysql-test/main/mysqld--help.test b/mysql-test/main/mysqld--help.test
index b54af092a5e..f918670d319 100644
--- a/mysql-test/main/mysqld--help.test
+++ b/mysql-test/main/mysqld--help.test
@@ -30,13 +30,14 @@ perl;
tls-version version.*/;
# Plugins which may or may not be there:
- @plugins=qw/innodb archive blackhole federated partition
+ @plugins=qw/innodb archive blackhole federated partition s3
feedback debug temp-pool ssl des-key-file xtradb sequence
thread-concurrency super-large-pages mutex-deadlock-detector
connect null-audit aria oqgraph sphinx thread-handling
test-sql-discovery query-cache-info
query-response-time metadata-lock-info locales unix-socket
- wsrep file-key-management cracklib-password-check user-variables/;
+ wsrep file-key-management cracklib-password-check user-variables
+ thread-pool-groups thread-pool-queues thread-pool-stats thread-pool-waits/;
# And substitute the content some environment variables with their
# names:
diff --git a/mysql-test/main/mysqldump-max.result b/mysql-test/main/mysqldump-max.result
index f936184849f..c1825814919 100644
--- a/mysql-test/main/mysqldump-max.result
+++ b/mysql-test/main/mysqldump-max.result
@@ -277,8 +277,8 @@ drop table t3;
drop table t4;
drop table t5;
drop table t6;
-SELECT @@global.storage_engine INTO @old_engine;
-SET GLOBAL storage_engine=InnoDB;
+SELECT @@global.default_storage_engine INTO @old_engine;
+SET GLOBAL default_storage_engine=InnoDB;
CREATE VIEW v1 AS SELECT * FROM t1;
INSERT INTO t1 VALUES();
SELECT COUNT(*) FROM v1;
@@ -289,7 +289,7 @@ COUNT(*)
1
DROP VIEW v1;
DROP TABLE t1;
-SET GLOBAL storage_engine=@old_engine;
+SET GLOBAL default_storage_engine=@old_engine;
connect c1,127.0.0.1,root,,test,$MASTER_MYPORT,;
connect c2,127.0.0.1,root,,test,$MASTER_MYPORT,;
connect c3,127.0.0.1,root,,test,$MASTER_MYPORT,;
diff --git a/mysql-test/main/mysqldump-max.test b/mysql-test/main/mysqldump-max.test
index a989fd28135..49e54d542b8 100644
--- a/mysql-test/main/mysqldump-max.test
+++ b/mysql-test/main/mysqldump-max.test
@@ -81,8 +81,8 @@ drop table t6;
# type to avoid Inno's column-number limits (~1000 columns) etc.
# Here because it needs Inno-engine.
-SELECT @@global.storage_engine INTO @old_engine;
-SET GLOBAL storage_engine=InnoDB;
+SELECT @@global.default_storage_engine INTO @old_engine;
+SET GLOBAL default_storage_engine=InnoDB;
--disable_query_log
CREATE TABLE `t1` (
@@ -1128,7 +1128,7 @@ SELECT COUNT(*) FROM v1;
DROP VIEW v1;
DROP TABLE t1;
-SET GLOBAL storage_engine=@old_engine;
+SET GLOBAL default_storage_engine=@old_engine;
# Test fully non-locking mysqldump with consistent binlog position (MWL#136).
diff --git a/mysql-test/main/mysqldump-system.result b/mysql-test/main/mysqldump-system.result
index c443e250e4a..2fa010b3e4e 100644
--- a/mysql-test/main/mysqldump-system.result
+++ b/mysql-test/main/mysqldump-system.result
@@ -430,10 +430,10 @@ UNLOCK TABLES;
SELECT * FROM mysql.global_priv ORDER BY User,Host;
Host User Priv
-% USER {"access":0,"plugin":"mysql_native_password","authentication_string":"","password_last_changed":NOW,"default_role":"role_2"}
-localhost mariadb.sys {"access":0,"plugin":"mysql_native_password","authentication_string":"","account_locked":false,"password_last_changed":NOW}
- role_1 {"access":16384,"is_role":true}
- role_2 {"access":0,"is_role":true}
+% USER {"access":0,"version_id":VERSION,"plugin":"mysql_native_password","authentication_string":"","password_last_changed":NOW,"default_role":"role_2"}
+localhost mariadb.sys {"access":0,"plugin":"mysql_native_password","authentication_string":"","account_locked":false,"password_last_changed":NOW,"version_id":VERSION}
+ role_1 {"access":16384,"version_id":VERSION,"is_role":true}
+ role_2 {"access":0,"version_id":VERSION,"is_role":true}
localhost root {"access":18446744073709551615}
CHECKSUM TABLE mysql.roles_mapping, mysql.time_zone_transition, mysql.plugin,
mysql.servers, mysql.func, mysql.innodb_table_stats, mysql.table_stats;
@@ -465,11 +465,11 @@ set time_zone= @@global.time_zone;
DROP USER mariadb_test_restore;
SELECT * FROM mysql.global_priv ORDER BY User,Host;
Host User Priv
-% USER {"access":0,"plugin":"mysql_native_password","authentication_string":"","password_last_changed":NOW,"default_role":"role_2"}
-localhost mariadb.sys {"access":0,"plugin":"mysql_native_password","authentication_string":"","password_last_changed":NOW,"password_lifetime":-1,"default_role":""}
- role_1 {"access":16384,"is_role":true}
- role_2 {"access":0,"is_role":true}
-localhost root {"access":1073741823,"plugin":"mysql_native_password","authentication_string":"","password_last_changed":NOW,"default_role":""}
+% USER {"access":0,"version_id":VERSION,"plugin":"mysql_native_password","authentication_string":"","password_last_changed":NOW,"default_role":"role_2"}
+localhost mariadb.sys {"access":0,"version_id":VERSION,"plugin":"mysql_native_password","authentication_string":"","password_last_changed":NOW,"password_lifetime":-1,"default_role":""}
+ role_1 {"access":16384,"version_id":VERSION,"is_role":true}
+ role_2 {"access":0,"version_id":VERSION,"is_role":true}
+localhost root {"access":549755813887,"version_id":VERSION,"plugin":"mysql_native_password","authentication_string":"","password_last_changed":NOW,"default_role":""}
CHECKSUM TABLE mysql.roles_mapping, mysql.time_zone_transition, mysql.plugin,
mysql.servers, mysql.func, mysql.innodb_table_stats, mysql.table_stats;
Table Checksum
diff --git a/mysql-test/main/mysqldump-system.test b/mysql-test/main/mysqldump-system.test
index 74638bb9265..c1965410167 100644
--- a/mysql-test/main/mysqldump-system.test
+++ b/mysql-test/main/mysqldump-system.test
@@ -94,7 +94,7 @@ eval CREATE FUNCTION metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_SO";
# password_last_changed date isn't saved/restored
# root user's Priv $.access lower number on restore
---replace_regex /"password_last_changed":[0-9]+/"password_last_changed":NOW/
+--replace_regex /"password_last_changed":[0-9]+/"password_last_changed":NOW/ /"version_id":[0-9]+/"version_id":VERSION/
SELECT * FROM mysql.global_priv ORDER BY User,Host;
CHECKSUM TABLE mysql.roles_mapping, mysql.time_zone_transition, mysql.plugin,
@@ -126,7 +126,7 @@ DROP USER mariadb_test_restore;
# successful restore?
---replace_regex /"password_last_changed":[0-9]+/"password_last_changed":NOW/
+--replace_regex /"password_last_changed":[0-9]+/"password_last_changed":NOW/ /"version_id":[0-9]+/"version_id":VERSION/
SELECT * FROM mysql.global_priv ORDER BY User,Host;
CHECKSUM TABLE mysql.roles_mapping, mysql.time_zone_transition, mysql.plugin,
diff --git a/mysql-test/main/mysqldump.result b/mysql-test/main/mysqldump.result
index d0d054b5473..cdccb13e892 100644
--- a/mysql-test/main/mysqldump.result
+++ b/mysql-test/main/mysqldump.result
@@ -3640,8 +3640,8 @@ reset master;
mysqldump: Couldn't execute 'FLUSH /*!40101 LOCAL */ TABLES': Access denied; you need (at least one of) the RELOAD privilege(s) for this operation (1227)
mysqldump: Couldn't execute 'FLUSH /*!40101 LOCAL */ TABLES': Access denied; you need (at least one of) the RELOAD privilege(s) for this operation (1227)
grant RELOAD on *.* to mysqltest_1@localhost;
-mysqldump: Couldn't execute 'SHOW MASTER STATUS': Access denied; you need (at least one of) the SUPER, REPLICATION CLIENT privilege(s) for this operation (1227)
-mysqldump: Couldn't execute 'SHOW MASTER STATUS': Access denied; you need (at least one of) the SUPER, REPLICATION CLIENT privilege(s) for this operation (1227)
+mysqldump: Couldn't execute 'SHOW MASTER STATUS': Access denied; you need (at least one of) the SUPER, BINLOG MONITOR privilege(s) for this operation (1227)
+mysqldump: Couldn't execute 'SHOW MASTER STATUS': Access denied; you need (at least one of) the SUPER, BINLOG MONITOR privilege(s) for this operation (1227)
grant REPLICATION CLIENT on *.* to mysqltest_1@localhost;
drop table t1;
drop user mysqltest_1@localhost;
diff --git a/mysql-test/main/mysqlshow.test b/mysql-test/main/mysqlshow.test
index 8c60b64a5f1..7201579452e 100644
--- a/mysql-test/main/mysqlshow.test
+++ b/mysql-test/main/mysqlshow.test
@@ -1,7 +1,5 @@
# Can't run test of external client with embedded server
-- source include/not_embedded.inc
-# Don't test when thread_pool active
---source include/not_threadpool.inc
--disable_warnings
DROP TABLE IF EXISTS t1,t2,test1,test2;
diff --git a/mysql-test/main/mysqltest_tracking_info.result b/mysql-test/main/mysqltest_tracking_info.result
index 3c474cee10f..2a58ba430ca 100644
--- a/mysql-test/main/mysqltest_tracking_info.result
+++ b/mysql-test/main/mysqltest_tracking_info.result
@@ -38,7 +38,7 @@ SET @@session.session_track_system_variables='optimizer_switch';
set optimizer_switch='index_merge=off,index_merge_union=off,index_merge_sort_union=off,index_merge_intersection=off,index_merge_sort_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=on,in_to_exists=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=on,mrr_cost_based=on,mrr_sort_keys=on,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=on,table_elimination=off,extended_keys=off,exists_to_in=off,orderby_uses_equalities=off,condition_pushdown_for_derived=off';
-- Tracker : SESSION_TRACK_SYSTEM_VARIABLES
-- optimizer_switch
--- index_merge=off,index_merge_union=off,index_merge_sort_union=off,index_merge_intersection=off,index_merge_sort_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=on,in_to_exists=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=on,mrr_cost_based=on,mrr_sort_keys=on,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=on,table_elimination=off,extended_keys=off,exists_to_in=off,orderby_uses_equalities=off,condition_pushdown_for_derived=off,split_materialized=on,condition_pushdown_for_subquery=on,rowid_filter=on,condition_pushdown_from_having=on
+-- index_merge=off,index_merge_union=off,index_merge_sort_union=off,index_merge_intersection=off,index_merge_sort_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=on,in_to_exists=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=on,mrr_cost_based=on,mrr_sort_keys=on,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=on,table_elimination=off,extended_keys=off,exists_to_in=off,orderby_uses_equalities=off,condition_pushdown_for_derived=off,split_materialized=on,condition_pushdown_for_subquery=on,rowid_filter=on,condition_pushdown_from_having=on,not_null_range_scan=off
Warnings:
Warning 1681 'engine_condition_pushdown=on' is deprecated and will be removed in a future release
@@ -57,3 +57,7 @@ ERROR 42000: Variable 'session_track_system_variables' can't be set to the value
SET SESSION session_track_system_variables=NULL;
ERROR 42000: Variable 'session_track_system_variables' can't be set to the value of 'NULL'
# End of 10.3 tests
+#
+# MDEV-16470 - Session user variables tracker
+#
+# End of 10.5 tests
diff --git a/mysql-test/main/mysqltest_tracking_info.test b/mysql-test/main/mysqltest_tracking_info.test
index ae52571b2b9..a3dfbba53c0 100644
--- a/mysql-test/main/mysqltest_tracking_info.test
+++ b/mysql-test/main/mysqltest_tracking_info.test
@@ -60,3 +60,28 @@ SET @@GLOBAL.session_track_system_variables=NULL;
SET SESSION session_track_system_variables=NULL;
--echo # End of 10.3 tests
+
+--echo #
+--echo # MDEV-16470 - Session user variables tracker
+--echo #
+#SET @@session.session_track_user_variables=1;
+#--enable_session_track_info
+#SET @a=1;
+#SET @b=NULL;
+#SELECT @c:=10;
+#--disable_session_track_info
+#SET @@session.session_track_user_variables=0;
+
+#--echo #
+#--echo # mdev-22337 Assertion `Alloced_length >= (str_length + length +
+#--echo net_length_size(length))' failed in Binary_string::q_net_store_data
+#--echo on long MULTIPOLYGON query with session_track_user_variables=1
+#--echo (optimized builds)
+#--echo #
+#set @@session.session_track_user_variables=1;
+#--enable_session_track_info
+#set @a=repeat('X', 1029);
+#--disable_session_track_info
+#set @@session.session_track_user_variables=0;
+
+--echo # End of 10.5 tests
diff --git a/mysql-test/main/named_pipe.result b/mysql-test/main/named_pipe.result
index f8c2acf98a0..9fc7abd79f5 100644
--- a/mysql-test/main/named_pipe.result
+++ b/mysql-test/main/named_pipe.result
@@ -509,7 +509,7 @@ insert into tmp select * from t3;
insert into t3 select * from tmp;
alter table t3 add t2nr int not null auto_increment primary key first;
drop table tmp;
-SET BIG_TABLES=1;
+set tmp_memory_table_size=0;
select distinct concat(fld3," ",fld3) as namn from t2,t3 where t2.fld1=t3.t2nr order by namn limit 10;
namn
Abraham Abraham
@@ -522,7 +522,7 @@ ammonium ammonium
analyzable analyzable
animals animals
animized animized
-SET BIG_TABLES=0;
+set tmp_memory_table_size=default;
select distinct concat(fld3," ",fld3) from t2,t3 where t2.fld1=t3.t2nr order by fld3 limit 10;
concat(fld3," ",fld3)
Abraham Abraham
@@ -559,7 +559,7 @@ attendants 1
bedlam 1
bedpost 1
boasted 1
-SET BIG_TABLES=1;
+set tmp_memory_table_size=0;
select distinct fld3,count(*) from t2 group by companynr,fld3 limit 10;
fld3 count(*)
affixed 1
@@ -572,7 +572,7 @@ attendants 1
bedlam 1
bedpost 1
boasted 1
-SET BIG_TABLES=0;
+set tmp_memory_table_size=default;
select distinct fld3,repeat("a",length(fld3)),count(*) from t2 group by companynr,fld3 limit 100,10;
fld3 repeat("a",length(fld3)) count(*)
circus aaaaaa 1
diff --git a/mysql-test/main/named_pipe.test b/mysql-test/main/named_pipe.test
index 2fe6f1cc5c0..3f01b415fc5 100644
--- a/mysql-test/main/named_pipe.test
+++ b/mysql-test/main/named_pipe.test
@@ -5,9 +5,6 @@
# Named pipe does not support the non-blocking API.
--disable_non_blocking_api
-# thread pool causes different results
--- source include/not_threadpool.inc
-
# Only run this test if named pipe is avaliable
let $nmp= query_get_value("SHOW VARIABLES LIKE 'named_pipe'", Value, 1);
if ($nmp != ON){
diff --git a/mysql-test/main/negation_elimination.result b/mysql-test/main/negation_elimination.result
index f9be5b55e46..7b9a76d86b2 100644
--- a/mysql-test/main/negation_elimination.result
+++ b/mysql-test/main/negation_elimination.result
@@ -4,7 +4,7 @@ insert into t1 values (NULL), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
(10), (11), (12), (13), (14), (15), (16), (17), (18), (19);
explain select * from t1 where not(not(a));
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index a a 5 NULL 21 Using where; Using index
+1 SIMPLE t1 range a a 5 NULL 20 Using where; Using index
select * from t1 where not(not(a));
a
1
@@ -55,7 +55,7 @@ a
10
explain select * from t1 where not(a = 10);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index a a 5 NULL 21 Using where; Using index
+1 SIMPLE t1 range a a 5 NULL 19 Using where; Using index
select * from t1 where not(a = 10);
a
0
@@ -145,7 +145,7 @@ a
19
explain select * from t1 where not(a is null);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index a a 5 NULL 21 Using where; Using index
+1 SIMPLE t1 range a a 5 NULL 20 Using where; Using index
select * from t1 where not(a is null);
a
0
@@ -192,7 +192,7 @@ a
15
explain select * from t1 where not(a < 15 and a > 5);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index a a 5 NULL 21 Using where; Using index
+1 SIMPLE t1 range a a 5 NULL 11 Using where; Using index
select * from t1 where not(a < 15 and a > 5);
a
0
@@ -208,7 +208,7 @@ a
19
explain select * from t1 where a = 2 or not(a < 10);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index a a 5 NULL 21 Using where; Using index
+1 SIMPLE t1 range a a 5 NULL 11 Using where; Using index
select * from t1 where a = 2 or not(a < 10);
a
2
@@ -255,7 +255,7 @@ a
19
explain select * from t1 where a = 2 or not(a < 5 or a > 15);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index a a 5 NULL 21 Using where; Using index
+1 SIMPLE t1 range a a 5 NULL 12 Using where; Using index
select * from t1 where a = 2 or not(a < 5 or a > 15);
a
2
@@ -272,7 +272,7 @@ a
15
explain select * from t1 where a = 7 or not(a < 15 and a > 5);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index a a 5 NULL 21 Using where; Using index
+1 SIMPLE t1 range a a 5 NULL 12 Using where; Using index
select * from t1 where a = 7 or not(a < 15 and a > 5);
a
0
@@ -289,7 +289,7 @@ a
19
explain select * from t1 where NULL or not(a < 15 and a > 5);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index a a 5 NULL 21 Using where; Using index
+1 SIMPLE t1 range a a 5 NULL 11 Using where; Using index
select * from t1 where NULL or not(a < 15 and a > 5);
a
0
@@ -500,7 +500,7 @@ NULL NULL
3 1
explain extended select a, not(not(a)), not(a <= 2 and not(a)), not(a not like "1"), not (a not in (1,2)), not(a != 2) from t1 where not(not(a)) having not(not(a));
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t1 index a a 5 NULL 5 80.00 Using where; Using index
+1 SIMPLE t1 range a a 5 NULL 4 100.00 Using where; Using index
Warnings:
Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`a` <> 0 AS `not(not(a))`,`test`.`t1`.`a` > 2 or `test`.`t1`.`a` <> 0 AS `not(a <= 2 and not(a))`,`test`.`t1`.`a` like '1' AS `not(a not like "1")`,`test`.`t1`.`a` in (1,2) AS `not (a not in (1,2))`,`test`.`t1`.`a` = 2 AS `not(a != 2)` from `test`.`t1` where `test`.`t1`.`a` <> 0 having `test`.`t1`.`a` <> 0
drop table t1;
diff --git a/mysql-test/main/not_embedded_server.result b/mysql-test/main/not_embedded_server.result
index bc794ce48c8..0b952f93ad8 100644
--- a/mysql-test/main/not_embedded_server.result
+++ b/mysql-test/main/not_embedded_server.result
@@ -68,7 +68,7 @@ ERROR HY000: Operation CREATE USER failed for 'user\"s_12601974'@'localhost'
DROP USER 'user\"s_12601974'@'localhost';
CREATE USER 'user\bs_12601974'@'localhost';
CREATE USER 'user\bs_12601974'@'localhost';
-ERROR HY000: Operation CREATE USER failed for 'users_12601974'@'localhost'
+ERROR HY000: Operation CREATE USER failed for 'user\0008s_12601974'@'localhost'
DROP USER 'user\bs_12601974'@'localhost';
CREATE USER 'user\ns_12601974'@'localhost';
CREATE USER 'user\ns_12601974'@'localhost';
diff --git a/mysql-test/main/null.result b/mysql-test/main/null.result
index fc29f68baf0..73ac958cacd 100644
--- a/mysql-test/main/null.result
+++ b/mysql-test/main/null.result
@@ -267,7 +267,7 @@ t1 CREATE TABLE `t1` (
`c30` varchar(317) CHARACTER SET latin2 DEFAULT NULL,
`c31` varchar(192) CHARACTER SET latin2 DEFAULT NULL,
`c32` char(0) CHARACTER SET latin2 DEFAULT NULL,
- `c33` varchar(3) CHARACTER SET latin2 DEFAULT NULL,
+ `c33` varchar(6) CHARACTER SET latin2 DEFAULT NULL,
`c34` varchar(3) CHARACTER SET latin2 DEFAULT NULL,
`c35` varchar(3) CHARACTER SET latin2 DEFAULT NULL,
`c36` varchar(3) CHARACTER SET latin2 DEFAULT NULL,
diff --git a/mysql-test/main/null_key.result b/mysql-test/main/null_key.result
index 55b2060475f..6b9d59c636a 100644
--- a/mysql-test/main/null_key.result
+++ b/mysql-test/main/null_key.result
@@ -20,7 +20,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index NULL a 9 NULL 12 Using where; Using index
explain select * from t1 where (a is null or a > 0 and a < 2) and b < 5 limit 3;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index a,b a 9 NULL 12 Using where; Using index
+1 SIMPLE t1 range a,b a 9 NULL 2 Using where; Using index
explain select * from t1 where (a is null or a = 7) and b=7;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref_or_null a,b a 9 const,const 2 Using where; Using index
@@ -32,7 +32,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref a,b a 5 const 3 Using where; Using index
explain select * from t1 where a is null and b=9 or a is null and b=7 limit 3;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref a,b a 5 const 2 Using where; Using index
+1 SIMPLE t1 range a,b a 9 NULL 3 Using where; Using index
explain select * from t1 where a > 1 and a < 3 limit 1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range a a 5 NULL 1 Using where; Using index
@@ -160,7 +160,7 @@ a b
7 NULL
explain select * from t1 where (a = 7 or a is null) and (b=7 or b is null);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref_or_null a,b a 5 const 4 Using where; Using index
+1 SIMPLE t1 ref_or_null a,b a 5 const 5 Using where; Using index
select * from t1 where (a = 7 or a is null) and (b=7 or b is null);
a b
7 NULL
@@ -194,7 +194,7 @@ a a b
explain select * from t2,t1 where t1.a=t2.a and (b= 7 or b is null);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 2 Using where
-1 SIMPLE t1 ref_or_null a a 10 test.t2.a,const 4 Using where; Using index
+1 SIMPLE t1 ref_or_null a a 10 test.t2.a,const 5 Using where; Using index
select * from t2,t1 where t1.a=t2.a and (b= 7 or b is null);
a a b
7 7 7
@@ -204,7 +204,7 @@ a a b
explain select * from t2,t1 where (t1.a=t2.a or t1.a is null) and b= 7;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 2
-1 SIMPLE t1 ref_or_null a a 10 test.t2.a,const 4 Using where; Using index
+1 SIMPLE t1 ref_or_null a a 10 test.t2.a,const 5 Using where; Using index
select * from t2,t1 where (t1.a=t2.a or t1.a is null) and b= 7;
a a b
7 7 7
@@ -214,7 +214,7 @@ a a b
explain select * from t2,t1 where (t1.a=t2.a or t1.a is null) and (b= 7 or b is null);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 2
-1 SIMPLE t1 ref_or_null a a 5 test.t2.a 4 Using where; Using index
+1 SIMPLE t1 ref_or_null a a 5 test.t2.a 5 Using where; Using index
select * from t2,t1 where (t1.a=t2.a or t1.a is null) and (b= 7 or b is null);
a a b
7 7 NULL
@@ -261,7 +261,7 @@ INSERT INTO t1 VALUES (11,5),(12,6),(13,7),(14,8),(15,9);
INSERT INTO t2 VALUES (1,NULL),(2,NULL),(3,1),(4,2),(5,NULL),(6,NULL),(7,3),(8,4),(9,NULL),(10,NULL);
explain select id from t1 where uniq_id is null;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref idx1 idx1 5 const 6 Using index condition
+1 SIMPLE t1 ALL idx1 NULL NULL NULL 15 Using where
explain select id from t1 where uniq_id =1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 const idx1 idx1 5 const 1
diff --git a/mysql-test/main/openssl_1.test b/mysql-test/main/openssl_1.test
index b70d2018c9e..fff65624b12 100644
--- a/mysql-test/main/openssl_1.test
+++ b/mysql-test/main/openssl_1.test
@@ -1,5 +1,6 @@
# Needed for mysqldump
--source include/have_utf8mb4.inc
+--source include/not_asan.inc
# Tests for SSL connections, only run if mysqld is compiled
# with support for SSL.
diff --git a/mysql-test/main/opt_trace.result b/mysql-test/main/opt_trace.result
index 0ced5f19e14..8f912e0500d 100644
--- a/mysql-test/main/opt_trace.result
+++ b/mysql-test/main/opt_trace.result
@@ -118,7 +118,7 @@ select * from v1 {
"table": "t1",
"table_scan": {
"rows": 2,
- "cost": 2.0044
+ "cost": 2.004394531
}
}
]
@@ -133,19 +133,19 @@ select * from v1 {
{
"access_type": "scan",
"resulting_rows": 1,
- "cost": 2.2044,
+ "cost": 2.204394531,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 1,
- "cost": 2.2044,
+ "cost": 2.204394531,
"uses_join_buffering": false
}
},
"rows_for_plan": 1,
- "cost_for_plan": 2.4044,
+ "cost_for_plan": 2.404394531,
"estimated_join_cardinality": 1
}
]
@@ -264,7 +264,7 @@ select * from (select * from t1 where t1.a=1)q {
"table": "t1",
"table_scan": {
"rows": 2,
- "cost": 2.0044
+ "cost": 2.004394531
}
}
]
@@ -279,19 +279,19 @@ select * from (select * from t1 where t1.a=1)q {
{
"access_type": "scan",
"resulting_rows": 1,
- "cost": 2.2044,
+ "cost": 2.204394531,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 1,
- "cost": 2.2044,
+ "cost": 2.204394531,
"uses_join_buffering": false
}
},
"rows_for_plan": 1,
- "cost_for_plan": 2.4044,
+ "cost_for_plan": 2.404394531,
"estimated_join_cardinality": 1
}
]
@@ -415,7 +415,7 @@ select * from v2 {
"table": "t1",
"table_scan": {
"rows": 2,
- "cost": 2.0044
+ "cost": 2.004394531
}
}
]
@@ -430,7 +430,7 @@ select * from v2 {
{
"access_type": "scan",
"resulting_rows": 1,
- "cost": 2.2044,
+ "cost": 2.204394531,
"chosen": true,
"use_tmp_table": true
}
@@ -438,12 +438,12 @@ select * from v2 {
"chosen_access_method": {
"type": "scan",
"records": 1,
- "cost": 2.2044,
+ "cost": 2.204394531,
"uses_join_buffering": false
}
},
"rows_for_plan": 1,
- "cost_for_plan": 2.4044,
+ "cost_for_plan": 2.404394531,
"cost_for_sorting": 1,
"estimated_join_cardinality": 1
}
@@ -622,7 +622,7 @@ explain select * from v2 {
"table": "t2",
"table_scan": {
"rows": 10,
- "cost": 2.022
+ "cost": 2.021972656
}
}
]
@@ -637,19 +637,19 @@ explain select * from v2 {
{
"access_type": "scan",
"resulting_rows": 10,
- "cost": 2.022,
+ "cost": 2.021972656,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 10,
- "cost": 2.022,
+ "cost": 2.021972656,
"uses_join_buffering": false
}
},
"rows_for_plan": 10,
- "cost_for_plan": 4.022,
+ "cost_for_plan": 4.021972656,
"estimated_join_cardinality": 10
}
]
@@ -740,7 +740,7 @@ explain select * from v1 {
"table": "t1",
"table_scan": {
"rows": 10,
- "cost": 2.022
+ "cost": 2.021972656
}
}
]
@@ -755,7 +755,7 @@ explain select * from v1 {
{
"access_type": "scan",
"resulting_rows": 10,
- "cost": 2.022,
+ "cost": 2.021972656,
"chosen": true,
"use_tmp_table": true
}
@@ -763,12 +763,12 @@ explain select * from v1 {
"chosen_access_method": {
"type": "scan",
"records": 10,
- "cost": 2.022,
+ "cost": 2.021972656,
"uses_join_buffering": false
}
},
"rows_for_plan": 10,
- "cost_for_plan": 4.022,
+ "cost_for_plan": 4.021972656,
"cost_for_sorting": 10,
"estimated_join_cardinality": 10
}
@@ -972,14 +972,14 @@ explain select * from t1,t2 where t1.a=t2.b+2 and t2.a= t1.b {
"table": "t1",
"table_scan": {
"rows": 100,
- "cost": 2.3174
+ "cost": 2.317382812
}
},
{
"table": "t2",
"table_scan": {
"rows": 100,
- "cost": 2.3174
+ "cost": 2.317382812
}
}
]
@@ -994,19 +994,19 @@ explain select * from t1,t2 where t1.a=t2.b+2 and t2.a= t1.b {
{
"access_type": "scan",
"resulting_rows": 100,
- "cost": 2.3174,
+ "cost": 2.317382812,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 100,
- "cost": 2.3174,
+ "cost": 2.317382812,
"uses_join_buffering": false
}
},
"rows_for_plan": 100,
- "cost_for_plan": 22.317,
+ "cost_for_plan": 22.31738281,
"rest_of_plan": [
{
"plan_prefix": ["t1"],
@@ -1019,25 +1019,25 @@ explain select * from t1,t2 where t1.a=t2.b+2 and t2.a= t1.b {
"used_range_estimates": false,
"cause": "not available",
"rows": 1,
- "cost": 200,
+ "cost": 200.0585794,
"chosen": true
},
{
"access_type": "scan",
"resulting_rows": 100,
- "cost": 2.3174,
+ "cost": 2.317382812,
"chosen": false
}
],
"chosen_access_method": {
"type": "ref",
"records": 1,
- "cost": 200,
+ "cost": 200.0585794,
"uses_join_buffering": false
}
},
"rows_for_plan": 100,
- "cost_for_plan": 242.32,
+ "cost_for_plan": 242.3759623,
"estimated_join_cardinality": 100
}
]
@@ -1050,19 +1050,19 @@ explain select * from t1,t2 where t1.a=t2.b+2 and t2.a= t1.b {
{
"access_type": "scan",
"resulting_rows": 100,
- "cost": 2.3174,
+ "cost": 2.317382812,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 100,
- "cost": 2.3174,
+ "cost": 2.317382812,
"uses_join_buffering": false
}
},
"rows_for_plan": 100,
- "cost_for_plan": 22.317,
+ "cost_for_plan": 22.31738281,
"rest_of_plan": [
{
"plan_prefix": ["t2"],
@@ -1075,25 +1075,25 @@ explain select * from t1,t2 where t1.a=t2.b+2 and t2.a= t1.b {
"used_range_estimates": false,
"cause": "not available",
"rows": 1,
- "cost": 200,
+ "cost": 200.0585794,
"chosen": true
},
{
"access_type": "scan",
"resulting_rows": 100,
- "cost": 2.3174,
+ "cost": 2.317382812,
"chosen": false
}
],
"chosen_access_method": {
"type": "ref",
"records": 1,
- "cost": 200,
+ "cost": 200.0585794,
"uses_join_buffering": false
}
},
"rows_for_plan": 100,
- "cost_for_plan": 242.32,
+ "cost_for_plan": 242.3759623,
"pruned_by_cost": true
}
]
@@ -1177,7 +1177,7 @@ EXPLAIN SELECT DISTINCT a FROM t1 {
"range_analysis": {
"table_scan": {
"rows": 65536,
- "cost": 13255
+ "cost": 13255.2
},
"potential_range_indexes": [
{
@@ -1193,8 +1193,9 @@ EXPLAIN SELECT DISTINCT a FROM t1 {
],
"best_covering_index_scan": {
"index": "a",
- "cost": 4812.5,
- "chosen": true
+ "cost": 13377.39141,
+ "chosen": false,
+ "cause": "cost"
},
"group_index_range": {
"distinct_query": true,
@@ -1203,7 +1204,7 @@ EXPLAIN SELECT DISTINCT a FROM t1 {
"index": "a",
"covering": true,
"rows": 5,
- "cost": 6.75
+ "cost": 6.25
}
]
},
@@ -1215,7 +1216,7 @@ EXPLAIN SELECT DISTINCT a FROM t1 {
"max_aggregate": false,
"distinct_aggregate": false,
"rows": 5,
- "cost": 6.75,
+ "cost": 6.25,
"key_parts_used_for_access": ["a"],
"ranges": [],
"chosen": true
@@ -1229,12 +1230,12 @@ EXPLAIN SELECT DISTINCT a FROM t1 {
"max_aggregate": false,
"distinct_aggregate": false,
"rows": 5,
- "cost": 6.75,
+ "cost": 6.25,
"key_parts_used_for_access": ["a"],
"ranges": []
},
"rows_for_plan": 5,
- "cost_for_plan": 6.75,
+ "cost_for_plan": 6.25,
"chosen": true
}
}
@@ -1251,19 +1252,19 @@ EXPLAIN SELECT DISTINCT a FROM t1 {
{
"access_type": "index_merge",
"resulting_rows": 5,
- "cost": 6.75,
+ "cost": 6.25,
"chosen": true
}
],
"chosen_access_method": {
"type": "index_merge",
"records": 5,
- "cost": 6.75,
+ "cost": 6.25,
"uses_join_buffering": false
}
},
"rows_for_plan": 5,
- "cost_for_plan": 7.75,
+ "cost_for_plan": 7.25,
"estimated_join_cardinality": 5
}
]
@@ -1306,7 +1307,7 @@ test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
EXPLAIN SELECT MIN(d) FROM t1 where b=2 and c=3 group by a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index NULL a 20 NULL 7 Using where; Using index
+1 SIMPLE t1 range NULL a 20 NULL 8 Using where; Using index for group-by
select * from information_schema.OPTIMIZER_TRACE;
QUERY TRACE MISSING_BYTES_BEYOND_MAX_MEM_SIZE INSUFFICIENT_PRIVILEGES
EXPLAIN SELECT MIN(d) FROM t1 where b=2 and c=3 group by a {
@@ -1365,7 +1366,7 @@ EXPLAIN SELECT MIN(d) FROM t1 where b=2 and c=3 group by a {
"range_analysis": {
"table_scan": {
"rows": 7,
- "cost": 5.5291
+ "cost": 5.429052734
},
"potential_range_indexes": [
{
@@ -1376,10 +1377,17 @@ EXPLAIN SELECT MIN(d) FROM t1 where b=2 and c=3 group by a {
],
"best_covering_index_scan": {
"index": "a",
- "cost": 1.3869,
+ "cost": 2.409226263,
"chosen": true
},
"setup_range_conditions": [],
+ "analyzing_range_alternatives": {
+ "range_scan_alternatives": [],
+ "analyzing_roworder_intersect": {
+ "cause": "too few roworder scans"
+ },
+ "analyzing_index_merge_union": []
+ },
"group_index_range": {
"potential_group_range_indexes": [
{
@@ -1402,33 +1410,26 @@ EXPLAIN SELECT MIN(d) FROM t1 where b=2 and c=3 group by a {
"cost": 2.2,
"key_parts_used_for_access": ["a", "b", "c"],
"ranges": ["(2,3) <= (b,c) <= (2,3)"],
- "chosen": false,
- "cause": "cost"
+ "chosen": true
},
- "analyzing_range_alternatives": {
- "range_scan_alternatives": [],
- "analyzing_roworder_intersect": {
- "cause": "too few roworder scans"
+ "chosen_range_access_summary": {
+ "range_access_plan": {
+ "type": "index_group",
+ "index": "a",
+ "min_max_arg": "d",
+ "min_aggregate": true,
+ "max_aggregate": false,
+ "distinct_aggregate": false,
+ "rows": 8,
+ "cost": 2.2,
+ "key_parts_used_for_access": ["a", "b", "c"],
+ "ranges": ["(2,3) <= (b,c) <= (2,3)"]
},
- "analyzing_index_merge_union": []
+ "rows_for_plan": 8,
+ "cost_for_plan": 2.2,
+ "chosen": true
}
}
- },
- {
- "selectivity_for_indexes": [],
- "selectivity_for_columns": [
- {
- "column_name": "b",
- "ranges": ["2 <= b <= 2"],
- "selectivity_from_histogram": 0.2891
- },
- {
- "column_name": "c",
- "ranges": ["3 <= c <= 3"],
- "selectivity_from_histogram": 0.2891
- }
- ],
- "cond_selectivity": 0.0836
}
]
},
@@ -1440,24 +1441,24 @@ EXPLAIN SELECT MIN(d) FROM t1 where b=2 and c=3 group by a {
"best_access_path": {
"considered_access_paths": [
{
- "access_type": "scan",
- "resulting_rows": 0.5849,
- "cost": 3.3121,
+ "access_type": "index_merge",
+ "resulting_rows": 8,
+ "cost": 2.2,
"chosen": true,
"use_tmp_table": true
}
],
"chosen_access_method": {
- "type": "scan",
- "records": 0.5849,
- "cost": 3.3121,
+ "type": "index_merge",
+ "records": 8,
+ "cost": 2.2,
"uses_join_buffering": false
}
},
- "rows_for_plan": 0.5849,
- "cost_for_plan": 3.4291,
- "cost_for_sorting": 0.5849,
- "estimated_join_cardinality": 0.5849
+ "rows_for_plan": 8,
+ "cost_for_plan": 3.8,
+ "cost_for_sorting": 8,
+ "estimated_join_cardinality": 8
}
]
},
@@ -1475,25 +1476,6 @@ EXPLAIN SELECT MIN(d) FROM t1 where b=2 and c=3 group by a {
}
]
}
- },
- {
- "reconsidering_access_paths_for_index_ordering": {
- "clause": "GROUP BY",
- "fanout": 1,
- "read_time": 3.3131,
- "table": "t1",
- "rows_estimation": 7,
- "possible_keys": [
- {
- "index": "a",
- "can_resolve_order": true,
- "updated_limit": 7,
- "index_scan_time": 7,
- "records": 7,
- "chosen": true
- }
- ]
- }
}
]
}
@@ -1519,7 +1501,7 @@ INSERT INTO t1 values (1,'2001-01-01'),(1,'2001-01-02'),
set optimizer_trace='enabled=on';
EXPLAIN SELECT id,MIN(a),MAX(a) FROM t1 WHERE a>=20010104e0 GROUP BY id;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index NULL id 8 NULL 16 Using where; Using index
+1 SIMPLE t1 range NULL id 8 NULL 9 Using where; Using index for group-by
select * from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
QUERY TRACE MISSING_BYTES_BEYOND_MAX_MEM_SIZE INSUFFICIENT_PRIVILEGES
EXPLAIN SELECT id,MIN(a),MAX(a) FROM t1 WHERE a>=20010104e0 GROUP BY id {
@@ -1578,7 +1560,7 @@ EXPLAIN SELECT id,MIN(a),MAX(a) FROM t1 WHERE a>=20010104e0 GROUP BY id {
"range_analysis": {
"table_scan": {
"rows": 16,
- "cost": 7.3313
+ "cost": 7.23125
},
"potential_range_indexes": [
{
@@ -1589,10 +1571,17 @@ EXPLAIN SELECT id,MIN(a),MAX(a) FROM t1 WHERE a>=20010104e0 GROUP BY id {
],
"best_covering_index_scan": {
"index": "id",
- "cost": 1.8468,
+ "cost": 4.21171589,
"chosen": true
},
"setup_range_conditions": [],
+ "analyzing_range_alternatives": {
+ "range_scan_alternatives": [],
+ "analyzing_roworder_intersect": {
+ "cause": "too few roworder scans"
+ },
+ "analyzing_index_merge_union": []
+ },
"group_index_range": {
"potential_group_range_indexes": [
{
@@ -1615,22 +1604,26 @@ EXPLAIN SELECT id,MIN(a),MAX(a) FROM t1 WHERE a>=20010104e0 GROUP BY id {
"cost": 2.35,
"key_parts_used_for_access": ["id"],
"ranges": ["(2001-01-04) <= (a)"],
- "chosen": false,
- "cause": "cost"
+ "chosen": true
},
- "analyzing_range_alternatives": {
- "range_scan_alternatives": [],
- "analyzing_roworder_intersect": {
- "cause": "too few roworder scans"
+ "chosen_range_access_summary": {
+ "range_access_plan": {
+ "type": "index_group",
+ "index": "id",
+ "min_max_arg": "a",
+ "min_aggregate": true,
+ "max_aggregate": true,
+ "distinct_aggregate": false,
+ "rows": 9,
+ "cost": 2.35,
+ "key_parts_used_for_access": ["id"],
+ "ranges": ["(2001-01-04) <= (a)"]
},
- "analyzing_index_merge_union": []
+ "rows_for_plan": 9,
+ "cost_for_plan": 2.35,
+ "chosen": true
}
}
- },
- {
- "selectivity_for_indexes": [],
- "selectivity_for_columns": [],
- "cond_selectivity": 1
}
]
},
@@ -1642,24 +1635,24 @@ EXPLAIN SELECT id,MIN(a),MAX(a) FROM t1 WHERE a>=20010104e0 GROUP BY id {
"best_access_path": {
"considered_access_paths": [
{
- "access_type": "scan",
- "resulting_rows": 16,
- "cost": 2.0312,
+ "access_type": "index_merge",
+ "resulting_rows": 9,
+ "cost": 2.35,
"chosen": true,
"use_tmp_table": true
}
],
"chosen_access_method": {
- "type": "scan",
- "records": 16,
- "cost": 2.0312,
+ "type": "index_merge",
+ "records": 9,
+ "cost": 2.35,
"uses_join_buffering": false
}
},
- "rows_for_plan": 16,
- "cost_for_plan": 5.2313,
- "cost_for_sorting": 16,
- "estimated_join_cardinality": 16
+ "rows_for_plan": 9,
+ "cost_for_plan": 4.15,
+ "cost_for_sorting": 9,
+ "estimated_join_cardinality": 9
}
]
},
@@ -1677,25 +1670,6 @@ EXPLAIN SELECT id,MIN(a),MAX(a) FROM t1 WHERE a>=20010104e0 GROUP BY id {
}
]
}
- },
- {
- "reconsidering_access_paths_for_index_ordering": {
- "clause": "GROUP BY",
- "fanout": 1,
- "read_time": 2.0322,
- "table": "t1",
- "rows_estimation": 9,
- "possible_keys": [
- {
- "index": "id",
- "can_resolve_order": true,
- "updated_limit": 16,
- "index_scan_time": 16,
- "records": 16,
- "chosen": true
- }
- ]
- }
}
]
}
@@ -1710,7 +1684,7 @@ EXPLAIN SELECT id,MIN(a),MAX(a) FROM t1 WHERE a>=20010104e0 GROUP BY id {
} 0 0
EXPLAIN SELECT * FROM t1 WHERE a = 20010104e0 GROUP BY id;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index NULL id 8 NULL 16 Using where; Using index
+1 SIMPLE t1 range NULL id 8 NULL 9 Using where; Using index for group-by
select * from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
QUERY TRACE MISSING_BYTES_BEYOND_MAX_MEM_SIZE INSUFFICIENT_PRIVILEGES
EXPLAIN SELECT * FROM t1 WHERE a = 20010104e0 GROUP BY id {
@@ -1769,7 +1743,7 @@ EXPLAIN SELECT * FROM t1 WHERE a = 20010104e0 GROUP BY id {
"range_analysis": {
"table_scan": {
"rows": 16,
- "cost": 7.3313
+ "cost": 7.23125
},
"potential_range_indexes": [
{
@@ -1780,10 +1754,17 @@ EXPLAIN SELECT * FROM t1 WHERE a = 20010104e0 GROUP BY id {
],
"best_covering_index_scan": {
"index": "id",
- "cost": 1.8468,
+ "cost": 4.21171589,
"chosen": true
},
"setup_range_conditions": [],
+ "analyzing_range_alternatives": {
+ "range_scan_alternatives": [],
+ "analyzing_roworder_intersect": {
+ "cause": "too few roworder scans"
+ },
+ "analyzing_index_merge_union": []
+ },
"group_index_range": {
"potential_group_range_indexes": [
{
@@ -1806,22 +1787,26 @@ EXPLAIN SELECT * FROM t1 WHERE a = 20010104e0 GROUP BY id {
"cost": 2.35,
"key_parts_used_for_access": ["id", "a"],
"ranges": ["(2001-01-04) <= (a) <= (2001-01-04)"],
- "chosen": false,
- "cause": "cost"
+ "chosen": true
},
- "analyzing_range_alternatives": {
- "range_scan_alternatives": [],
- "analyzing_roworder_intersect": {
- "cause": "too few roworder scans"
+ "chosen_range_access_summary": {
+ "range_access_plan": {
+ "type": "index_group",
+ "index": "id",
+ "min_max_arg": null,
+ "min_aggregate": false,
+ "max_aggregate": false,
+ "distinct_aggregate": false,
+ "rows": 9,
+ "cost": 2.35,
+ "key_parts_used_for_access": ["id", "a"],
+ "ranges": ["(2001-01-04) <= (a) <= (2001-01-04)"]
},
- "analyzing_index_merge_union": []
+ "rows_for_plan": 9,
+ "cost_for_plan": 2.35,
+ "chosen": true
}
}
- },
- {
- "selectivity_for_indexes": [],
- "selectivity_for_columns": [],
- "cond_selectivity": 1
}
]
},
@@ -1833,24 +1818,24 @@ EXPLAIN SELECT * FROM t1 WHERE a = 20010104e0 GROUP BY id {
"best_access_path": {
"considered_access_paths": [
{
- "access_type": "scan",
- "resulting_rows": 16,
- "cost": 2.0312,
+ "access_type": "index_merge",
+ "resulting_rows": 9,
+ "cost": 2.35,
"chosen": true,
"use_tmp_table": true
}
],
"chosen_access_method": {
- "type": "scan",
- "records": 16,
- "cost": 2.0312,
+ "type": "index_merge",
+ "records": 9,
+ "cost": 2.35,
"uses_join_buffering": false
}
},
- "rows_for_plan": 16,
- "cost_for_plan": 5.2313,
- "cost_for_sorting": 16,
- "estimated_join_cardinality": 16
+ "rows_for_plan": 9,
+ "cost_for_plan": 4.15,
+ "cost_for_sorting": 9,
+ "estimated_join_cardinality": 9
}
]
},
@@ -1868,25 +1853,6 @@ EXPLAIN SELECT * FROM t1 WHERE a = 20010104e0 GROUP BY id {
}
]
}
- },
- {
- "reconsidering_access_paths_for_index_ordering": {
- "clause": "GROUP BY",
- "fanout": 1,
- "read_time": 2.0322,
- "table": "t1",
- "rows_estimation": 9,
- "possible_keys": [
- {
- "index": "id",
- "can_resolve_order": true,
- "updated_limit": 16,
- "index_scan_time": 16,
- "records": 16,
- "chosen": true
- }
- ]
- }
}
]
}
@@ -2006,7 +1972,7 @@ explain select * from t1 where a=1 and b=2 order by c limit 1 {
"range_analysis": {
"table_scan": {
"rows": 1000,
- "cost": 232.66
+ "cost": 232.5644531
},
"potential_range_indexes": [
{
@@ -2026,10 +1992,6 @@ explain select * from t1 where a=1 and b=2 order by c limit 1 {
}
],
"setup_range_conditions": [],
- "group_index_range": {
- "chosen": false,
- "cause": "no group by or distinct"
- },
"analyzing_range_alternatives": {
"range_scan_alternatives": [
{
@@ -2039,7 +2001,7 @@ explain select * from t1 where a=1 and b=2 order by c limit 1 {
"using_mrr": false,
"index_only": false,
"rows": 180,
- "cost": 229.72,
+ "cost": 216.2943776,
"chosen": true
},
{
@@ -2049,7 +2011,7 @@ explain select * from t1 where a=1 and b=2 order by c limit 1 {
"using_mrr": false,
"index_only": false,
"rows": 21,
- "cost": 27.445,
+ "cost": 25.36242739,
"chosen": true
}
],
@@ -2058,6 +2020,10 @@ explain select * from t1 where a=1 and b=2 order by c limit 1 {
},
"analyzing_index_merge_union": []
},
+ "group_index_range": {
+ "chosen": false,
+ "cause": "no group by or distinct"
+ },
"chosen_range_access_summary": {
"range_access_plan": {
"type": "range_scan",
@@ -2066,7 +2032,7 @@ explain select * from t1 where a=1 and b=2 order by c limit 1 {
"ranges": ["(1,2) <= (a,b) <= (1,2)"]
},
"rows_for_plan": 21,
- "cost_for_plan": 27.445,
+ "cost_for_plan": 25.36242739,
"chosen": true
}
}
@@ -2076,12 +2042,12 @@ explain select * from t1 where a=1 and b=2 order by c limit 1 {
"rowid_filters": [
{
"key": "a_b",
- "build_cost": 2.989,
+ "build_cost": 0.886777098,
"rows": 21
},
{
"key": "a_c",
- "build_cost": 23.969,
+ "build_cost": 10.52169992,
"rows": 180
}
]
@@ -2097,12 +2063,12 @@ explain select * from t1 where a=1 and b=2 order by c limit 1 {
{
"column_name": "a",
"ranges": ["1 <= a <= 1"],
- "selectivity_from_histogram": 0.1797
+ "selectivity_from_histogram": 0.1796875
},
{
"column_name": "b",
"ranges": ["2 <= b <= 2"],
- "selectivity_from_histogram": 0.0156
+ "selectivity_from_histogram": 0.015625
}
],
"cond_selectivity": 0.021
@@ -2121,7 +2087,7 @@ explain select * from t1 where a=1 and b=2 order by c limit 1 {
"index": "a_c",
"used_range_estimates": true,
"rows": 180,
- "cost": 92,
+ "cost": 180.2743776,
"chosen": true
},
{
@@ -2129,7 +2095,7 @@ explain select * from t1 where a=1 and b=2 order by c limit 1 {
"index": "a_b",
"used_range_estimates": true,
"rows": 21,
- "cost": 22,
+ "cost": 21.14242739,
"chosen": true
},
{
@@ -2141,12 +2107,12 @@ explain select * from t1 where a=1 and b=2 order by c limit 1 {
"chosen_access_method": {
"type": "ref",
"records": 21,
- "cost": 22,
+ "cost": 21.14242739,
"uses_join_buffering": false
}
},
"rows_for_plan": 21,
- "cost_for_plan": 26.2,
+ "cost_for_plan": 25.34242739,
"estimated_join_cardinality": 21
}
]
@@ -2170,7 +2136,7 @@ explain select * from t1 where a=1 and b=2 order by c limit 1 {
"reconsidering_access_paths_for_index_ordering": {
"clause": "ORDER BY",
"fanout": 1,
- "read_time": 22.001,
+ "read_time": 21.14342739,
"table": "t1",
"rows_estimation": 21,
"possible_keys": [
@@ -2186,8 +2152,8 @@ explain select * from t1 where a=1 and b=2 order by c limit 1 {
"index": "a_c",
"can_resolve_order": true,
"updated_limit": 47,
- "range_scan_time": 4.324,
- "index_scan_time": 4.324,
+ "range_scan_time": 4.331020747,
+ "index_scan_time": 4.331020747,
"records": 180,
"chosen": true
},
@@ -2204,7 +2170,7 @@ explain select * from t1 where a=1 and b=2 order by c limit 1 {
"range_analysis": {
"table_scan": {
"rows": 1000,
- "cost": 2e308
+ "cost": 1.79769e308
},
"potential_range_indexes": [
{
@@ -2224,10 +2190,6 @@ explain select * from t1 where a=1 and b=2 order by c limit 1 {
}
],
"setup_range_conditions": [],
- "group_index_range": {
- "chosen": false,
- "cause": "no group by or distinct"
- },
"analyzing_range_alternatives": {
"range_scan_alternatives": [
{
@@ -2237,7 +2199,7 @@ explain select * from t1 where a=1 and b=2 order by c limit 1 {
"using_mrr": false,
"index_only": false,
"rows": 180,
- "cost": 229.72,
+ "cost": 216.2943776,
"chosen": true
}
],
@@ -2246,6 +2208,10 @@ explain select * from t1 where a=1 and b=2 order by c limit 1 {
},
"analyzing_index_merge_union": []
},
+ "group_index_range": {
+ "chosen": false,
+ "cause": "no group by or distinct"
+ },
"chosen_range_access_summary": {
"range_access_plan": {
"type": "range_scan",
@@ -2254,7 +2220,7 @@ explain select * from t1 where a=1 and b=2 order by c limit 1 {
"ranges": ["(1) <= (a) <= (1)"]
},
"rows_for_plan": 180,
- "cost_for_plan": 229.72,
+ "cost_for_plan": 216.2943776,
"chosen": true
}
}
@@ -2353,7 +2319,7 @@ select t1.a from t1 left join t2 on t1.a=t2.a {
"table": "t1",
"table_scan": {
"rows": 4,
- "cost": 2.0068
+ "cost": 2.006835938
}
},
{
@@ -2374,19 +2340,19 @@ select t1.a from t1 left join t2 on t1.a=t2.a {
{
"access_type": "scan",
"resulting_rows": 4,
- "cost": 2.0068,
+ "cost": 2.006835938,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 4,
- "cost": 2.0068,
+ "cost": 2.006835938,
"uses_join_buffering": false
}
},
"rows_for_plan": 4,
- "cost_for_plan": 2.8068,
+ "cost_for_plan": 2.806835937,
"estimated_join_cardinality": 4
}
]
@@ -2478,14 +2444,14 @@ explain select * from t1 left join t2 on t2.a=t1.a {
"table": "t1",
"table_scan": {
"rows": 4,
- "cost": 2.0068
+ "cost": 2.006835938
}
},
{
"table": "t2",
"table_scan": {
"rows": 2,
- "cost": 2.0044
+ "cost": 2.004394531
}
}
]
@@ -2500,19 +2466,19 @@ explain select * from t1 left join t2 on t2.a=t1.a {
{
"access_type": "scan",
"resulting_rows": 4,
- "cost": 2.0068,
+ "cost": 2.006835938,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 4,
- "cost": 2.0068,
+ "cost": 2.006835938,
"uses_join_buffering": false
}
},
"rows_for_plan": 4,
- "cost_for_plan": 2.8068,
+ "cost_for_plan": 2.806835937,
"rest_of_plan": [
{
"plan_prefix": ["t1"],
@@ -2529,7 +2495,7 @@ explain select * from t1 left join t2 on t2.a=t1.a {
{
"access_type": "scan",
"resulting_rows": 2,
- "cost": 8.0176,
+ "cost": 8.017578125,
"chosen": false
}
],
@@ -2541,7 +2507,7 @@ explain select * from t1 left join t2 on t2.a=t1.a {
}
},
"rows_for_plan": 4,
- "cost_for_plan": 7.6068,
+ "cost_for_plan": 7.606835937,
"estimated_join_cardinality": 4
}
]
@@ -2662,7 +2628,7 @@ explain select t1.a from t1 left join (t2 join t3 on t2.b=t3.b) on t2.a=t1.a and
"table": "t1",
"table_scan": {
"rows": 4,
- "cost": 2.0068
+ "cost": 2.006835938
}
},
{
@@ -2689,19 +2655,19 @@ explain select t1.a from t1 left join (t2 join t3 on t2.b=t3.b) on t2.a=t1.a and
{
"access_type": "scan",
"resulting_rows": 4,
- "cost": 2.0068,
+ "cost": 2.006835938,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 4,
- "cost": 2.0068,
+ "cost": 2.006835938,
"uses_join_buffering": false
}
},
"rows_for_plan": 4,
- "cost_for_plan": 2.8068,
+ "cost_for_plan": 2.806835937,
"estimated_join_cardinality": 4
}
]
@@ -2861,14 +2827,14 @@ explain extended select * from t1 where a in (select pk from t10) {
"table": "t1",
"table_scan": {
"rows": 3,
- "cost": 2.0066
+ "cost": 2.006591797
}
},
{
"table": "t10",
"table_scan": {
"rows": 10,
- "cost": 2.022
+ "cost": 2.021972656
}
}
]
@@ -2891,19 +2857,19 @@ explain extended select * from t1 where a in (select pk from t10) {
{
"access_type": "scan",
"resulting_rows": 10,
- "cost": 2.022,
+ "cost": 2.021972656,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 10,
- "cost": 2.022,
+ "cost": 2.021972656,
"uses_join_buffering": false
}
},
"rows_for_plan": 10,
- "cost_for_plan": 4.022,
+ "cost_for_plan": 4.021972656,
"estimated_join_cardinality": 10
}
]
@@ -2921,19 +2887,19 @@ explain extended select * from t1 where a in (select pk from t10) {
{
"access_type": "scan",
"resulting_rows": 3,
- "cost": 2.0066,
+ "cost": 2.006591797,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 3,
- "cost": 2.0066,
+ "cost": 2.006591797,
"uses_join_buffering": false
}
},
"rows_for_plan": 3,
- "cost_for_plan": 2.6066,
+ "cost_for_plan": 2.606591797,
"semijoin_strategy_choice": [],
"rest_of_plan": [
{
@@ -2944,34 +2910,34 @@ explain extended select * from t1 where a in (select pk from t10) {
{
"access_type": "scan",
"resulting_rows": 10,
- "cost": 2.022,
+ "cost": 2.021972656,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 10,
- "cost": 2.022,
+ "cost": 2.021972656,
"uses_join_buffering": true
}
},
"rows_for_plan": 30,
- "cost_for_plan": 10.629,
+ "cost_for_plan": 10.62856445,
"semijoin_strategy_choice": [
{
"strategy": "FirstMatch",
"records": 3,
- "read_time": 10.629
+ "read_time": 10.62856445
},
{
"strategy": "SJ-Materialization",
"records": 3,
- "read_time": 5.2786
+ "read_time": 5.278564453
},
{
"strategy": "DuplicateWeedout",
"records": 3,
- "read_time": 27.129
+ "read_time": 27.12856445
},
{
"chosen_strategy": "SJ-Materialization"
@@ -2989,19 +2955,19 @@ explain extended select * from t1 where a in (select pk from t10) {
{
"access_type": "scan",
"resulting_rows": 10,
- "cost": 2.022,
+ "cost": 2.021972656,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 10,
- "cost": 2.022,
+ "cost": 2.021972656,
"uses_join_buffering": false
}
},
"rows_for_plan": 10,
- "cost_for_plan": 4.022,
+ "cost_for_plan": 4.021972656,
"semijoin_strategy_choice": [],
"pruned_by_heuristic": true
}
@@ -3177,7 +3143,7 @@ explain select * from t1 where pk = 2 and a=5 and b=1 {
"range_analysis": {
"table_scan": {
"rows": 10,
- "cost": 6.1317
+ "cost": 6.031738281
},
"potential_range_indexes": [
{
@@ -3198,14 +3164,10 @@ explain select * from t1 where pk = 2 and a=5 and b=1 {
],
"best_covering_index_scan": {
"index": "pk_a_b",
- "cost": 1.5429,
+ "cost": 3.010739566,
"chosen": true
},
"setup_range_conditions": [],
- "group_index_range": {
- "chosen": false,
- "cause": "no group by or distinct"
- },
"analyzing_range_alternatives": {
"range_scan_alternatives": [
{
@@ -3215,9 +3177,8 @@ explain select * from t1 where pk = 2 and a=5 and b=1 {
"using_mrr": false,
"index_only": false,
"rows": 1,
- "cost": 2.3773,
- "chosen": false,
- "cause": "cost"
+ "cost": 1.345585794,
+ "chosen": true
},
{
"index": "pk_a",
@@ -3226,7 +3187,7 @@ explain select * from t1 where pk = 2 and a=5 and b=1 {
"using_mrr": false,
"index_only": false,
"rows": 1,
- "cost": 2.3783,
+ "cost": 1.345829876,
"chosen": false,
"cause": "cost"
},
@@ -3237,7 +3198,7 @@ explain select * from t1 where pk = 2 and a=5 and b=1 {
"using_mrr": false,
"index_only": true,
"rows": 1,
- "cost": 1.1793,
+ "cost": 0.346073957,
"chosen": true
}
],
@@ -3245,10 +3206,10 @@ explain select * from t1 where pk = 2 and a=5 and b=1 {
"intersecting_indexes": [
{
"index": "pk",
- "index_scan_cost": 1.0023,
- "cumulated_index_scan_cost": 1.0023,
- "disk_sweep_cost": 0.9008,
- "cumulative_total_cost": 1.9031,
+ "index_scan_cost": 1.000585794,
+ "cumulated_index_scan_cost": 1.000585794,
+ "disk_sweep_cost": 0.90078125,
+ "cumulative_total_cost": 1.901367044,
"usable": true,
"matching_rows_now": 1,
"intersect_covering_with_this_index": false,
@@ -3274,6 +3235,10 @@ explain select * from t1 where pk = 2 and a=5 and b=1 {
},
"analyzing_index_merge_union": []
},
+ "group_index_range": {
+ "chosen": false,
+ "cause": "no group by or distinct"
+ },
"chosen_range_access_summary": {
"range_access_plan": {
"type": "range_scan",
@@ -3282,7 +3247,7 @@ explain select * from t1 where pk = 2 and a=5 and b=1 {
"ranges": ["(2,5,1) <= (pk,a,b) <= (2,5,1)"]
},
"rows_for_plan": 1,
- "cost_for_plan": 1.1793,
+ "cost_for_plan": 0.346073957,
"chosen": true
}
}
@@ -3292,17 +3257,17 @@ explain select * from t1 where pk = 2 and a=5 and b=1 {
"rowid_filters": [
{
"key": "pk",
- "build_cost": 1.1823,
+ "build_cost": 0.130585794,
"rows": 1
},
{
"key": "pk_a",
- "build_cost": 1.1833,
+ "build_cost": 0.130829876,
"rows": 1
},
{
"key": "pk_a_b",
- "build_cost": 1.1843,
+ "build_cost": 0.131073957,
"rows": 1
}
]
@@ -3342,7 +3307,7 @@ explain select * from t1 where pk = 2 and a=5 and b=1 {
"index": "pk",
"used_range_estimates": true,
"rows": 1,
- "cost": 2,
+ "cost": 1.125585794,
"chosen": true
},
{
@@ -3350,7 +3315,7 @@ explain select * from t1 where pk = 2 and a=5 and b=1 {
"index": "pk_a",
"used_range_estimates": true,
"rows": 1,
- "cost": 2,
+ "cost": 1.125829876,
"chosen": false,
"cause": "cost"
},
@@ -3359,7 +3324,7 @@ explain select * from t1 where pk = 2 and a=5 and b=1 {
"index": "pk_a_b",
"used_range_estimates": true,
"rows": 1,
- "cost": 1.0043,
+ "cost": 0.126073957,
"chosen": true
},
{
@@ -3371,12 +3336,12 @@ explain select * from t1 where pk = 2 and a=5 and b=1 {
"chosen_access_method": {
"type": "ref",
"records": 1,
- "cost": 1.0043,
+ "cost": 0.126073957,
"uses_join_buffering": false
}
},
"rows_for_plan": 1,
- "cost_for_plan": 1.2043,
+ "cost_for_plan": 0.326073957,
"estimated_join_cardinality": 1
}
]
@@ -3473,7 +3438,7 @@ select f1(a) from t1 {
"table": "t1",
"table_scan": {
"rows": 4,
- "cost": 2.0068
+ "cost": 2.006835938
}
}
]
@@ -3488,19 +3453,19 @@ select f1(a) from t1 {
{
"access_type": "scan",
"resulting_rows": 4,
- "cost": 2.0068,
+ "cost": 2.006835938,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 4,
- "cost": 2.0068,
+ "cost": 2.006835938,
"uses_join_buffering": false
}
},
"rows_for_plan": 4,
- "cost_for_plan": 2.8068,
+ "cost_for_plan": 2.806835937,
"estimated_join_cardinality": 4
}
]
@@ -3571,7 +3536,7 @@ select f2(a) from t1 {
"table": "t1",
"table_scan": {
"rows": 4,
- "cost": 2.0068
+ "cost": 2.006835938
}
}
]
@@ -3586,19 +3551,19 @@ select f2(a) from t1 {
{
"access_type": "scan",
"resulting_rows": 4,
- "cost": 2.0068,
+ "cost": 2.006835938,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 4,
- "cost": 2.0068,
+ "cost": 2.006835938,
"uses_join_buffering": false
}
},
"rows_for_plan": 4,
- "cost_for_plan": 2.8068,
+ "cost_for_plan": 2.806835937,
"estimated_join_cardinality": 4
}
]
@@ -3646,7 +3611,7 @@ a
2
select length(trace) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
length(trace)
-2163
+2183
set optimizer_trace_max_mem_size=100;
select * from t1;
a
@@ -3660,7 +3625,7 @@ select * from t1 {
"join_preparation": {
"select_id": 1,
"steps": [
- 2063 0
+ 2083 0
set optimizer_trace_max_mem_size=0;
select * from t1;
a
@@ -3668,7 +3633,7 @@ a
2
select * from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
QUERY TRACE MISSING_BYTES_BEYOND_MAX_MEM_SIZE INSUFFICIENT_PRIVILEGES
-select * from t1 2163 0
+select * from t1 2183 0
drop table t1;
set optimizer_trace='enabled=off';
set @@optimizer_trace_max_mem_size= @save_optimizer_trace_max_mem_size;
@@ -3693,7 +3658,7 @@ explain delete from t0 where t0.a<3 {
"range_analysis": {
"table_scan": {
"rows": 10,
- "cost": 6.122
+ "cost": 6.021972656
},
"potential_range_indexes": [
{
@@ -3703,10 +3668,6 @@ explain delete from t0 where t0.a<3 {
}
],
"setup_range_conditions": [],
- "group_index_range": {
- "chosen": false,
- "cause": "no join"
- },
"analyzing_range_alternatives": {
"range_scan_alternatives": [
{
@@ -3716,12 +3677,16 @@ explain delete from t0 where t0.a<3 {
"using_mrr": false,
"index_only": false,
"rows": 3,
- "cost": 5.007,
+ "cost": 3.746757383,
"chosen": true
}
],
"analyzing_index_merge_union": []
},
+ "group_index_range": {
+ "chosen": false,
+ "cause": "no join"
+ },
"chosen_range_access_summary": {
"range_access_plan": {
"type": "range_scan",
@@ -3730,7 +3695,7 @@ explain delete from t0 where t0.a<3 {
"ranges": ["(NULL) < (a) < (3)"]
},
"rows_for_plan": 3,
- "cost_for_plan": 5.007,
+ "cost_for_plan": 3.746757383,
"chosen": true
}
}
@@ -3831,7 +3796,7 @@ explain delete t0,t1 from t0, t1 where t0.a=t1.a and t1.a<3 {
"range_analysis": {
"table_scan": {
"rows": 10,
- "cost": 6.122
+ "cost": 6.021972656
},
"potential_range_indexes": [
{
@@ -3842,14 +3807,10 @@ explain delete t0,t1 from t0, t1 where t0.a=t1.a and t1.a<3 {
],
"best_covering_index_scan": {
"index": "a",
- "cost": 1.5234,
+ "cost": 3.005857945,
"chosen": true
},
"setup_range_conditions": [],
- "group_index_range": {
- "chosen": false,
- "cause": "not single_table"
- },
"analyzing_range_alternatives": {
"range_scan_alternatives": [
{
@@ -3859,7 +3820,7 @@ explain delete t0,t1 from t0, t1 where t0.a=t1.a and t1.a<3 {
"using_mrr": false,
"index_only": true,
"rows": 3,
- "cost": 1.407,
+ "cost": 0.746757383,
"chosen": true
}
],
@@ -3868,6 +3829,10 @@ explain delete t0,t1 from t0, t1 where t0.a=t1.a and t1.a<3 {
},
"analyzing_index_merge_union": []
},
+ "group_index_range": {
+ "chosen": false,
+ "cause": "not single_table"
+ },
"chosen_range_access_summary": {
"range_access_plan": {
"type": "range_scan",
@@ -3876,7 +3841,7 @@ explain delete t0,t1 from t0, t1 where t0.a=t1.a and t1.a<3 {
"ranges": ["(NULL) < (a) < (3)"]
},
"rows_for_plan": 3,
- "cost_for_plan": 1.407,
+ "cost_for_plan": 0.746757383,
"chosen": true
}
}
@@ -3896,7 +3861,7 @@ explain delete t0,t1 from t0, t1 where t0.a=t1.a and t1.a<3 {
"range_analysis": {
"table_scan": {
"rows": 10,
- "cost": 6.122
+ "cost": 6.021972656
},
"potential_range_indexes": [
{
@@ -3907,14 +3872,10 @@ explain delete t0,t1 from t0, t1 where t0.a=t1.a and t1.a<3 {
],
"best_covering_index_scan": {
"index": "a",
- "cost": 1.5234,
+ "cost": 3.005857945,
"chosen": true
},
"setup_range_conditions": [],
- "group_index_range": {
- "chosen": false,
- "cause": "not single_table"
- },
"analyzing_range_alternatives": {
"range_scan_alternatives": [
{
@@ -3924,7 +3885,7 @@ explain delete t0,t1 from t0, t1 where t0.a=t1.a and t1.a<3 {
"using_mrr": false,
"index_only": true,
"rows": 3,
- "cost": 1.407,
+ "cost": 0.746757383,
"chosen": true
}
],
@@ -3933,6 +3894,10 @@ explain delete t0,t1 from t0, t1 where t0.a=t1.a and t1.a<3 {
},
"analyzing_index_merge_union": []
},
+ "group_index_range": {
+ "chosen": false,
+ "cause": "not single_table"
+ },
"chosen_range_access_summary": {
"range_access_plan": {
"type": "range_scan",
@@ -3941,7 +3906,7 @@ explain delete t0,t1 from t0, t1 where t0.a=t1.a and t1.a<3 {
"ranges": ["(NULL) < (a) < (3)"]
},
"rows_for_plan": 3,
- "cost_for_plan": 1.407,
+ "cost_for_plan": 0.746757383,
"chosen": true
}
}
@@ -3968,19 +3933,19 @@ explain delete t0,t1 from t0, t1 where t0.a=t1.a and t1.a<3 {
{
"access_type": "range",
"resulting_rows": 3,
- "cost": 1.407,
+ "cost": 0.746757383,
"chosen": true
}
],
"chosen_access_method": {
"type": "range",
"records": 3,
- "cost": 1.407,
+ "cost": 0.746757383,
"uses_join_buffering": false
}
},
"rows_for_plan": 3,
- "cost_for_plan": 2.007,
+ "cost_for_plan": 1.346757383,
"rest_of_plan": [
{
"plan_prefix": ["t0"],
@@ -3993,7 +3958,7 @@ explain delete t0,t1 from t0, t1 where t0.a=t1.a and t1.a<3 {
"used_range_estimates": false,
"cause": "not better than ref estimates",
"rows": 1,
- "cost": 3.007,
+ "cost": 3.001757383,
"chosen": true
},
{
@@ -4005,12 +3970,12 @@ explain delete t0,t1 from t0, t1 where t0.a=t1.a and t1.a<3 {
"chosen_access_method": {
"type": "ref",
"records": 1,
- "cost": 3.007,
+ "cost": 3.001757383,
"uses_join_buffering": false
}
},
"rows_for_plan": 3,
- "cost_for_plan": 5.614,
+ "cost_for_plan": 4.948514767,
"estimated_join_cardinality": 3
}
]
@@ -4023,19 +3988,19 @@ explain delete t0,t1 from t0, t1 where t0.a=t1.a and t1.a<3 {
{
"access_type": "range",
"resulting_rows": 3,
- "cost": 1.407,
+ "cost": 0.746757383,
"chosen": true
}
],
"chosen_access_method": {
"type": "range",
"records": 3,
- "cost": 1.407,
+ "cost": 0.746757383,
"uses_join_buffering": false
}
},
"rows_for_plan": 3,
- "cost_for_plan": 2.007,
+ "cost_for_plan": 1.346757383,
"rest_of_plan": [
{
"plan_prefix": ["t1"],
@@ -4048,7 +4013,7 @@ explain delete t0,t1 from t0, t1 where t0.a=t1.a and t1.a<3 {
"used_range_estimates": false,
"cause": "not better than ref estimates",
"rows": 2,
- "cost": 3.014,
+ "cost": 3.003514767,
"chosen": true
},
{
@@ -4060,12 +4025,12 @@ explain delete t0,t1 from t0, t1 where t0.a=t1.a and t1.a<3 {
"chosen_access_method": {
"type": "ref",
"records": 2,
- "cost": 3.014,
+ "cost": 3.003514767,
"uses_join_buffering": false
}
},
"rows_for_plan": 6,
- "cost_for_plan": 6.2211,
+ "cost_for_plan": 5.55027215,
"pruned_by_cost": true
}
]
@@ -4177,7 +4142,7 @@ explain select * from (select rand() from t1)q {
"table": "t1",
"table_scan": {
"rows": 3,
- "cost": 2.0051
+ "cost": 2.005126953
}
}
]
@@ -4192,19 +4157,19 @@ explain select * from (select rand() from t1)q {
{
"access_type": "scan",
"resulting_rows": 3,
- "cost": 2.0051,
+ "cost": 2.005126953,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 3,
- "cost": 2.0051,
+ "cost": 2.005126953,
"uses_join_buffering": false
}
},
"rows_for_plan": 3,
- "cost_for_plan": 2.6051,
+ "cost_for_plan": 2.605126953,
"estimated_join_cardinality": 3
}
]
@@ -4429,21 +4394,21 @@ explain select * from t1 where a in (select t_inner_1.a from t1 t_inner_1, t1 t_
"table": "t1",
"table_scan": {
"rows": 3,
- "cost": 2.0051
+ "cost": 2.005126953
}
},
{
"table": "t_inner_1",
"table_scan": {
"rows": 3,
- "cost": 2.0051
+ "cost": 2.005126953
}
},
{
"table": "t_inner_2",
"table_scan": {
"rows": 3,
- "cost": 2.0051
+ "cost": 2.005126953
}
}
]
@@ -4466,19 +4431,19 @@ explain select * from t1 where a in (select t_inner_1.a from t1 t_inner_1, t1 t_
{
"access_type": "scan",
"resulting_rows": 3,
- "cost": 2.0051,
+ "cost": 2.005126953,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 3,
- "cost": 2.0051,
+ "cost": 2.005126953,
"uses_join_buffering": false
}
},
"rows_for_plan": 3,
- "cost_for_plan": 2.6051,
+ "cost_for_plan": 2.605126953,
"rest_of_plan": [
{
"plan_prefix": ["t_inner_1"],
@@ -4488,19 +4453,19 @@ explain select * from t1 where a in (select t_inner_1.a from t1 t_inner_1, t1 t_
{
"access_type": "scan",
"resulting_rows": 3,
- "cost": 2.0051,
+ "cost": 2.005126953,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 3,
- "cost": 2.0051,
+ "cost": 2.005126953,
"uses_join_buffering": true
}
},
"rows_for_plan": 9,
- "cost_for_plan": 6.4103,
+ "cost_for_plan": 6.410253906,
"estimated_join_cardinality": 9
}
]
@@ -4513,19 +4478,19 @@ explain select * from t1 where a in (select t_inner_1.a from t1 t_inner_1, t1 t_
{
"access_type": "scan",
"resulting_rows": 3,
- "cost": 2.0051,
+ "cost": 2.005126953,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 3,
- "cost": 2.0051,
+ "cost": 2.005126953,
"uses_join_buffering": false
}
},
"rows_for_plan": 3,
- "cost_for_plan": 2.6051,
+ "cost_for_plan": 2.605126953,
"pruned_by_heuristic": true
}
]
@@ -4543,19 +4508,19 @@ explain select * from t1 where a in (select t_inner_1.a from t1 t_inner_1, t1 t_
{
"access_type": "scan",
"resulting_rows": 3,
- "cost": 2.0051,
+ "cost": 2.005126953,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 3,
- "cost": 2.0051,
+ "cost": 2.005126953,
"uses_join_buffering": false
}
},
"rows_for_plan": 3,
- "cost_for_plan": 2.6051,
+ "cost_for_plan": 2.605126953,
"semijoin_strategy_choice": [],
"rest_of_plan": [
{
@@ -4566,19 +4531,19 @@ explain select * from t1 where a in (select t_inner_1.a from t1 t_inner_1, t1 t_
{
"access_type": "scan",
"resulting_rows": 3,
- "cost": 2.0051,
+ "cost": 2.005126953,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 3,
- "cost": 2.0051,
+ "cost": 2.005126953,
"uses_join_buffering": true
}
},
"rows_for_plan": 9,
- "cost_for_plan": 6.4103,
+ "cost_for_plan": 6.410253906,
"semijoin_strategy_choice": [],
"rest_of_plan": [
{
@@ -4589,34 +4554,34 @@ explain select * from t1 where a in (select t_inner_1.a from t1 t_inner_1, t1 t_
{
"access_type": "scan",
"resulting_rows": 3,
- "cost": 2.0051,
+ "cost": 2.005126953,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 3,
- "cost": 2.0051,
+ "cost": 2.005126953,
"uses_join_buffering": true
}
},
"rows_for_plan": 27,
- "cost_for_plan": 13.815,
+ "cost_for_plan": 13.81538086,
"semijoin_strategy_choice": [
{
"strategy": "FirstMatch",
"records": 3,
- "read_time": 33.867
+ "read_time": 33.86665039
},
{
"strategy": "SJ-Materialization",
"records": 3,
- "read_time": 7.2154
+ "read_time": 7.215380859
},
{
"strategy": "DuplicateWeedout",
"records": 3,
- "read_time": 18.315
+ "read_time": 18.31538086
},
{
"chosen_strategy": "SJ-Materialization"
@@ -4634,19 +4599,19 @@ explain select * from t1 where a in (select t_inner_1.a from t1 t_inner_1, t1 t_
{
"access_type": "scan",
"resulting_rows": 3,
- "cost": 2.0051,
+ "cost": 2.005126953,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 3,
- "cost": 2.0051,
+ "cost": 2.005126953,
"uses_join_buffering": true
}
},
"rows_for_plan": 9,
- "cost_for_plan": 6.4103,
+ "cost_for_plan": 6.410253906,
"semijoin_strategy_choice": [],
"pruned_by_heuristic": true
}
@@ -4660,19 +4625,19 @@ explain select * from t1 where a in (select t_inner_1.a from t1 t_inner_1, t1 t_
{
"access_type": "scan",
"resulting_rows": 3,
- "cost": 2.0051,
+ "cost": 2.005126953,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 3,
- "cost": 2.0051,
+ "cost": 2.005126953,
"uses_join_buffering": false
}
},
"rows_for_plan": 3,
- "cost_for_plan": 2.6051,
+ "cost_for_plan": 2.605126953,
"semijoin_strategy_choice": [],
"pruned_by_heuristic": true
},
@@ -4684,19 +4649,19 @@ explain select * from t1 where a in (select t_inner_1.a from t1 t_inner_1, t1 t_
{
"access_type": "scan",
"resulting_rows": 3,
- "cost": 2.0051,
+ "cost": 2.005126953,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 3,
- "cost": 2.0051,
+ "cost": 2.005126953,
"uses_join_buffering": false
}
},
"rows_for_plan": 3,
- "cost_for_plan": 2.6051,
+ "cost_for_plan": 2.605126953,
"semijoin_strategy_choice": [],
"pruned_by_heuristic": true
}
@@ -4927,42 +4892,42 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
"table": "t_outer_1",
"table_scan": {
"rows": 3,
- "cost": 2.0051
+ "cost": 2.005126953
}
},
{
"table": "t_outer_2",
"table_scan": {
"rows": 9,
- "cost": 2.0154
+ "cost": 2.015380859
}
},
{
"table": "t_inner_2",
"table_scan": {
"rows": 9,
- "cost": 2.0154
+ "cost": 2.015380859
}
},
{
"table": "t_inner_1",
"table_scan": {
"rows": 3,
- "cost": 2.0051
+ "cost": 2.005126953
}
},
{
"table": "t_inner_3",
"table_scan": {
"rows": 9,
- "cost": 2.0154
+ "cost": 2.015380859
}
},
{
"table": "t_inner_4",
"table_scan": {
"rows": 3,
- "cost": 2.0051
+ "cost": 2.005126953
}
}
]
@@ -4992,19 +4957,19 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"access_type": "scan",
"resulting_rows": 3,
- "cost": 2.0051,
+ "cost": 2.005126953,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 3,
- "cost": 2.0051,
+ "cost": 2.005126953,
"uses_join_buffering": false
}
},
"rows_for_plan": 3,
- "cost_for_plan": 2.6051,
+ "cost_for_plan": 2.605126953,
"semijoin_strategy_choice": [],
"rest_of_plan": [
{
@@ -5015,19 +4980,19 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"access_type": "scan",
"resulting_rows": 3,
- "cost": 2.0051,
+ "cost": 2.005126953,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 3,
- "cost": 2.0051,
+ "cost": 2.005126953,
"uses_join_buffering": true
}
},
"rows_for_plan": 9,
- "cost_for_plan": 6.4103,
+ "cost_for_plan": 6.410253906,
"semijoin_strategy_choice": [],
"rest_of_plan": [
{
@@ -5038,29 +5003,29 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"access_type": "scan",
"resulting_rows": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"uses_join_buffering": true
}
},
"rows_for_plan": 81,
- "cost_for_plan": 24.626,
+ "cost_for_plan": 24.62563477,
"semijoin_strategy_choice": [
{
"strategy": "FirstMatch",
"records": 3,
- "read_time": 44.759
+ "read_time": 44.75893555
},
{
"strategy": "DuplicateWeedout",
"records": 3,
- "read_time": 37.226
+ "read_time": 37.22563477
},
{
"chosen_strategy": "DuplicateWeedout"
@@ -5075,19 +5040,19 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"access_type": "scan",
"resulting_rows": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"uses_join_buffering": true
}
},
"rows_for_plan": 27,
- "cost_for_plan": 44.641,
+ "cost_for_plan": 44.64101563,
"semijoin_strategy_choice": [],
"rest_of_plan": [
{
@@ -5103,19 +5068,19 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"access_type": "scan",
"resulting_rows": 3,
- "cost": 2.0051,
+ "cost": 2.005126953,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 3,
- "cost": 2.0051,
+ "cost": 2.005126953,
"uses_join_buffering": true
}
},
"rows_for_plan": 81,
- "cost_for_plan": 62.846,
+ "cost_for_plan": 62.84614258,
"semijoin_strategy_choice": [],
"rest_of_plan": [
{
@@ -5132,29 +5097,29 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"access_type": "scan",
"resulting_rows": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"uses_join_buffering": true
}
},
"rows_for_plan": 729,
- "cost_for_plan": 210.66,
+ "cost_for_plan": 210.6615234,
"semijoin_strategy_choice": [
{
"strategy": "FirstMatch",
"records": 27,
- "read_time": 424.03
+ "read_time": 424.025293
},
{
"strategy": "DuplicateWeedout",
"records": 27,
- "read_time": 324.06
+ "read_time": 324.0615234
},
{
"chosen_strategy": "DuplicateWeedout"
@@ -5177,19 +5142,19 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"access_type": "scan",
"resulting_rows": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"uses_join_buffering": true
}
},
"rows_for_plan": 243,
- "cost_for_plan": 95.256,
+ "cost_for_plan": 95.25639648,
"semijoin_strategy_choice": [],
"pruned_by_heuristic": true
}
@@ -5203,19 +5168,19 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"access_type": "scan",
"resulting_rows": 3,
- "cost": 2.0051,
+ "cost": 2.005126953,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 3,
- "cost": 2.0051,
+ "cost": 2.005126953,
"uses_join_buffering": true
}
},
"rows_for_plan": 9,
- "cost_for_plan": 41.031,
+ "cost_for_plan": 41.03076172,
"semijoin_strategy_choice": [],
"rest_of_plan": [
{
@@ -5231,19 +5196,19 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"access_type": "scan",
"resulting_rows": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"uses_join_buffering": true
}
},
"rows_for_plan": 81,
- "cost_for_plan": 59.246,
+ "cost_for_plan": 59.24614258,
"semijoin_strategy_choice": [],
"rest_of_plan": [
{
@@ -5260,24 +5225,24 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"access_type": "scan",
"resulting_rows": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"uses_join_buffering": true
}
},
"rows_for_plan": 729,
- "cost_for_plan": 207.06,
+ "cost_for_plan": 207.0615234,
"semijoin_strategy_choice": [
{
"strategy": "DuplicateWeedout",
"records": 27,
- "read_time": 320.46
+ "read_time": 320.4615234
},
{
"chosen_strategy": "DuplicateWeedout"
@@ -5300,19 +5265,19 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"access_type": "scan",
"resulting_rows": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"uses_join_buffering": true
}
},
"rows_for_plan": 81,
- "cost_for_plan": 59.246,
+ "cost_for_plan": 59.24614258,
"semijoin_strategy_choice": [],
"pruned_by_heuristic": true
}
@@ -5326,19 +5291,19 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"access_type": "scan",
"resulting_rows": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"uses_join_buffering": true
}
},
"rows_for_plan": 27,
- "cost_for_plan": 44.641,
+ "cost_for_plan": 44.64101563,
"semijoin_strategy_choice": [],
"pruned_by_heuristic": true
}
@@ -5352,19 +5317,19 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"access_type": "scan",
"resulting_rows": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"uses_join_buffering": true
}
},
"rows_for_plan": 81,
- "cost_for_plan": 24.626,
+ "cost_for_plan": 24.62563477,
"semijoin_strategy_choice": [],
"rest_of_plan": [
{
@@ -5375,24 +5340,24 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"access_type": "scan",
"resulting_rows": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"uses_join_buffering": true
}
},
"rows_for_plan": 729,
- "cost_for_plan": 172.44,
+ "cost_for_plan": 172.4410156,
"semijoin_strategy_choice": [
{
"strategy": "DuplicateWeedout",
"records": 27,
- "read_time": 285.84
+ "read_time": 285.8410156
},
{
"chosen_strategy": "DuplicateWeedout"
@@ -5412,19 +5377,19 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"access_type": "scan",
"resulting_rows": 3,
- "cost": 2.0051,
+ "cost": 2.005126953,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 3,
- "cost": 2.0051,
+ "cost": 2.005126953,
"uses_join_buffering": true
}
},
"rows_for_plan": 81,
- "cost_for_plan": 304.05,
+ "cost_for_plan": 304.0461426,
"semijoin_strategy_choice": [],
"rest_of_plan": [
{
@@ -5441,24 +5406,24 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"access_type": "scan",
"resulting_rows": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"uses_join_buffering": true
}
},
"rows_for_plan": 729,
- "cost_for_plan": 451.86,
+ "cost_for_plan": 451.8615234,
"semijoin_strategy_choice": [
{
"strategy": "DuplicateWeedout",
"records": 27,
- "read_time": 565.26
+ "read_time": 565.2615234
},
{
"chosen_strategy": "DuplicateWeedout"
@@ -5481,19 +5446,19 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"access_type": "scan",
"resulting_rows": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"uses_join_buffering": true
}
},
"rows_for_plan": 243,
- "cost_for_plan": 336.46,
+ "cost_for_plan": 336.4563965,
"semijoin_strategy_choice": [],
"pruned_by_cost": true
}
@@ -5507,19 +5472,19 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"access_type": "scan",
"resulting_rows": 3,
- "cost": 2.0051,
+ "cost": 2.005126953,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 3,
- "cost": 2.0051,
+ "cost": 2.005126953,
"uses_join_buffering": true
}
},
"rows_for_plan": 243,
- "cost_for_plan": 75.231,
+ "cost_for_plan": 75.23076172,
"semijoin_strategy_choice": [],
"rest_of_plan": [
{
@@ -5535,19 +5500,19 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"access_type": "scan",
"resulting_rows": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"uses_join_buffering": true
}
},
"rows_for_plan": 2187,
- "cost_for_plan": 514.65,
+ "cost_for_plan": 514.6461426,
"semijoin_strategy_choice": [],
"pruned_by_cost": true
},
@@ -5564,19 +5529,19 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"access_type": "scan",
"resulting_rows": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"uses_join_buffering": true
}
},
"rows_for_plan": 2187,
- "cost_for_plan": 514.65,
+ "cost_for_plan": 514.6461426,
"semijoin_strategy_choice": [],
"pruned_by_cost": true
}
@@ -5590,19 +5555,19 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"access_type": "scan",
"resulting_rows": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"uses_join_buffering": true
}
},
"rows_for_plan": 729,
- "cost_for_plan": 172.44,
+ "cost_for_plan": 172.4410156,
"semijoin_strategy_choice": [],
"rest_of_plan": [
{
@@ -5618,24 +5583,24 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"access_type": "scan",
"resulting_rows": 3,
- "cost": 2.0051,
+ "cost": 2.005126953,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 3,
- "cost": 2.0051,
+ "cost": 2.005126953,
"uses_join_buffering": true
}
},
"rows_for_plan": 2187,
- "cost_for_plan": 611.85,
+ "cost_for_plan": 611.8461426,
"semijoin_strategy_choice": [
{
"strategy": "FirstMatch",
"records": 81,
- "read_time": 2232.8
+ "read_time": 2232.809033
},
{
"chosen_strategy": "FirstMatch"
@@ -5656,19 +5621,19 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"access_type": "scan",
"resulting_rows": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"uses_join_buffering": true
}
},
"rows_for_plan": 6561,
- "cost_for_plan": 1486.7,
+ "cost_for_plan": 1486.656396,
"semijoin_strategy_choice": [],
"pruned_by_cost": true
}
@@ -5684,19 +5649,19 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"access_type": "scan",
"resulting_rows": 3,
- "cost": 2.0051,
+ "cost": 2.005126953,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 3,
- "cost": 2.0051,
+ "cost": 2.005126953,
"uses_join_buffering": true
}
},
"rows_for_plan": 27,
- "cost_for_plan": 13.815,
+ "cost_for_plan": 13.81538086,
"semijoin_strategy_choice": [],
"rest_of_plan": [
{
@@ -5707,19 +5672,19 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"access_type": "scan",
"resulting_rows": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"uses_join_buffering": true
}
},
"rows_for_plan": 243,
- "cost_for_plan": 64.431,
+ "cost_for_plan": 64.43076172,
"semijoin_strategy_choice": [],
"rest_of_plan": [
{
@@ -5735,19 +5700,19 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"access_type": "scan",
"resulting_rows": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"uses_join_buffering": true
}
},
"rows_for_plan": 2187,
- "cost_for_plan": 503.85,
+ "cost_for_plan": 503.8461426,
"semijoin_strategy_choice": [],
"pruned_by_cost": true
},
@@ -5764,19 +5729,19 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"access_type": "scan",
"resulting_rows": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"uses_join_buffering": true
}
},
"rows_for_plan": 2187,
- "cost_for_plan": 503.85,
+ "cost_for_plan": 503.8461426,
"semijoin_strategy_choice": [],
"pruned_by_cost": true
}
@@ -5790,19 +5755,19 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"access_type": "scan",
"resulting_rows": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"uses_join_buffering": true
}
},
"rows_for_plan": 243,
- "cost_for_plan": 64.431,
+ "cost_for_plan": 64.43076172,
"semijoin_strategy_choice": [],
"pruned_by_heuristic": true
},
@@ -5814,19 +5779,19 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"access_type": "scan",
"resulting_rows": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"uses_join_buffering": true
}
},
"rows_for_plan": 243,
- "cost_for_plan": 64.431,
+ "cost_for_plan": 64.43076172,
"semijoin_strategy_choice": [],
"pruned_by_heuristic": true
}
@@ -5840,19 +5805,19 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"access_type": "scan",
"resulting_rows": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"uses_join_buffering": true
}
},
"rows_for_plan": 81,
- "cost_for_plan": 24.626,
+ "cost_for_plan": 24.62563477,
"semijoin_strategy_choice": [],
"rest_of_plan": [
{
@@ -5863,19 +5828,19 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"access_type": "scan",
"resulting_rows": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"uses_join_buffering": true
}
},
"rows_for_plan": 729,
- "cost_for_plan": 172.44,
+ "cost_for_plan": 172.4410156,
"semijoin_strategy_choice": [],
"rest_of_plan": [
{
@@ -5891,19 +5856,19 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"access_type": "scan",
"resulting_rows": 3,
- "cost": 2.0051,
+ "cost": 2.005126953,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 3,
- "cost": 2.0051,
+ "cost": 2.005126953,
"uses_join_buffering": true
}
},
"rows_for_plan": 2187,
- "cost_for_plan": 611.85,
+ "cost_for_plan": 611.8461426,
"semijoin_strategy_choice": [],
"pruned_by_cost": true
},
@@ -5920,19 +5885,19 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"access_type": "scan",
"resulting_rows": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"uses_join_buffering": true
}
},
"rows_for_plan": 6561,
- "cost_for_plan": 1486.7,
+ "cost_for_plan": 1486.656396,
"semijoin_strategy_choice": [],
"pruned_by_cost": true
}
@@ -5946,19 +5911,19 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"access_type": "scan",
"resulting_rows": 3,
- "cost": 2.0051,
+ "cost": 2.005126953,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 3,
- "cost": 2.0051,
+ "cost": 2.005126953,
"uses_join_buffering": true
}
},
"rows_for_plan": 243,
- "cost_for_plan": 75.231,
+ "cost_for_plan": 75.23076172,
"semijoin_strategy_choice": [],
"rest_of_plan": [
{
@@ -5974,19 +5939,19 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"access_type": "scan",
"resulting_rows": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"uses_join_buffering": true
}
},
"rows_for_plan": 2187,
- "cost_for_plan": 514.65,
+ "cost_for_plan": 514.6461426,
"semijoin_strategy_choice": [],
"pruned_by_cost": true
},
@@ -6003,19 +5968,19 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"access_type": "scan",
"resulting_rows": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"uses_join_buffering": true
}
},
"rows_for_plan": 2187,
- "cost_for_plan": 514.65,
+ "cost_for_plan": 514.6461426,
"semijoin_strategy_choice": [],
"pruned_by_cost": true
}
@@ -6029,19 +5994,19 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"access_type": "scan",
"resulting_rows": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"uses_join_buffering": true
}
},
"rows_for_plan": 729,
- "cost_for_plan": 172.44,
+ "cost_for_plan": 172.4410156,
"semijoin_strategy_choice": [],
"pruned_by_heuristic": true
}
@@ -6057,19 +6022,19 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"access_type": "scan",
"resulting_rows": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"uses_join_buffering": true
}
},
"rows_for_plan": 27,
- "cost_for_plan": 10.021,
+ "cost_for_plan": 10.02050781,
"semijoin_strategy_choice": [],
"pruned_by_heuristic": true
},
@@ -6081,19 +6046,19 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"access_type": "scan",
"resulting_rows": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"uses_join_buffering": true
}
},
"rows_for_plan": 27,
- "cost_for_plan": 10.021,
+ "cost_for_plan": 10.02050781,
"semijoin_strategy_choice": [],
"pruned_by_heuristic": true
},
@@ -6105,19 +6070,19 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"access_type": "scan",
"resulting_rows": 3,
- "cost": 2.0051,
+ "cost": 2.005126953,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 3,
- "cost": 2.0051,
+ "cost": 2.005126953,
"uses_join_buffering": true
}
},
"rows_for_plan": 9,
- "cost_for_plan": 6.4103,
+ "cost_for_plan": 6.410253906,
"semijoin_strategy_choice": [],
"pruned_by_heuristic": true
},
@@ -6129,19 +6094,19 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"access_type": "scan",
"resulting_rows": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"uses_join_buffering": true
}
},
"rows_for_plan": 27,
- "cost_for_plan": 10.021,
+ "cost_for_plan": 10.02050781,
"semijoin_strategy_choice": [],
"pruned_by_heuristic": true
}
@@ -6155,19 +6120,19 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"access_type": "scan",
"resulting_rows": 3,
- "cost": 2.0051,
+ "cost": 2.005126953,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 3,
- "cost": 2.0051,
+ "cost": 2.005126953,
"uses_join_buffering": false
}
},
"rows_for_plan": 3,
- "cost_for_plan": 2.6051,
+ "cost_for_plan": 2.605126953,
"semijoin_strategy_choice": [],
"pruned_by_heuristic": true
},
@@ -6179,19 +6144,19 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"access_type": "scan",
"resulting_rows": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"uses_join_buffering": false
}
},
"rows_for_plan": 9,
- "cost_for_plan": 3.8154,
+ "cost_for_plan": 3.815380859,
"semijoin_strategy_choice": [],
"pruned_by_heuristic": true
},
@@ -6203,19 +6168,19 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"access_type": "scan",
"resulting_rows": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"uses_join_buffering": false
}
},
"rows_for_plan": 9,
- "cost_for_plan": 3.8154,
+ "cost_for_plan": 3.815380859,
"semijoin_strategy_choice": [],
"pruned_by_heuristic": true
},
@@ -6227,19 +6192,19 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"access_type": "scan",
"resulting_rows": 3,
- "cost": 2.0051,
+ "cost": 2.005126953,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 3,
- "cost": 2.0051,
+ "cost": 2.005126953,
"uses_join_buffering": false
}
},
"rows_for_plan": 3,
- "cost_for_plan": 2.6051,
+ "cost_for_plan": 2.605126953,
"semijoin_strategy_choice": [],
"pruned_by_heuristic": true
},
@@ -6251,19 +6216,19 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"access_type": "scan",
"resulting_rows": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"uses_join_buffering": false
}
},
"rows_for_plan": 9,
- "cost_for_plan": 3.8154,
+ "cost_for_plan": 3.815380859,
"semijoin_strategy_choice": [],
"pruned_by_heuristic": true
}
@@ -6502,42 +6467,42 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
"table": "t_outer_1",
"table_scan": {
"rows": 3,
- "cost": 2.0051
+ "cost": 2.005126953
}
},
{
"table": "t_outer_2",
"table_scan": {
"rows": 9,
- "cost": 2.0154
+ "cost": 2.015380859
}
},
{
"table": "t_inner_2",
"table_scan": {
"rows": 9,
- "cost": 2.0154
+ "cost": 2.015380859
}
},
{
"table": "t_inner_1",
"table_scan": {
"rows": 3,
- "cost": 2.0051
+ "cost": 2.005126953
}
},
{
"table": "t_inner_3",
"table_scan": {
"rows": 9,
- "cost": 2.0154
+ "cost": 2.015380859
}
},
{
"table": "t_inner_4",
"table_scan": {
"rows": 3,
- "cost": 2.0051
+ "cost": 2.005126953
}
}
]
@@ -6565,19 +6530,19 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"access_type": "scan",
"resulting_rows": 3,
- "cost": 2.0051,
+ "cost": 2.005126953,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 3,
- "cost": 2.0051,
+ "cost": 2.005126953,
"uses_join_buffering": false
}
},
"rows_for_plan": 3,
- "cost_for_plan": 2.6051,
+ "cost_for_plan": 2.605126953,
"rest_of_plan": [
{
"plan_prefix": ["t_inner_1"],
@@ -6587,19 +6552,19 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"access_type": "scan",
"resulting_rows": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"uses_join_buffering": true
}
},
"rows_for_plan": 27,
- "cost_for_plan": 10.021,
+ "cost_for_plan": 10.02050781,
"estimated_join_cardinality": 27
}
]
@@ -6612,19 +6577,19 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"access_type": "scan",
"resulting_rows": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"uses_join_buffering": false
}
},
"rows_for_plan": 9,
- "cost_for_plan": 3.8154,
+ "cost_for_plan": 3.815380859,
"pruned_by_heuristic": true
}
]
@@ -6639,19 +6604,19 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"access_type": "scan",
"resulting_rows": 3,
- "cost": 2.0051,
+ "cost": 2.005126953,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 3,
- "cost": 2.0051,
+ "cost": 2.005126953,
"uses_join_buffering": false
}
},
"rows_for_plan": 3,
- "cost_for_plan": 2.6051,
+ "cost_for_plan": 2.605126953,
"rest_of_plan": [
{
"plan_prefix": ["t_inner_4"],
@@ -6661,19 +6626,19 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"access_type": "scan",
"resulting_rows": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"uses_join_buffering": true
}
},
"rows_for_plan": 27,
- "cost_for_plan": 10.021,
+ "cost_for_plan": 10.02050781,
"estimated_join_cardinality": 27
}
]
@@ -6686,19 +6651,19 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"access_type": "scan",
"resulting_rows": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"uses_join_buffering": false
}
},
"rows_for_plan": 9,
- "cost_for_plan": 3.8154,
+ "cost_for_plan": 3.815380859,
"pruned_by_heuristic": true
}
]
@@ -6716,19 +6681,19 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"access_type": "scan",
"resulting_rows": 3,
- "cost": 2.0051,
+ "cost": 2.005126953,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 3,
- "cost": 2.0051,
+ "cost": 2.005126953,
"uses_join_buffering": false
}
},
"rows_for_plan": 3,
- "cost_for_plan": 2.6051,
+ "cost_for_plan": 2.605126953,
"semijoin_strategy_choice": [],
"rest_of_plan": [
{
@@ -6739,19 +6704,19 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"access_type": "scan",
"resulting_rows": 3,
- "cost": 2.0051,
+ "cost": 2.005126953,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 3,
- "cost": 2.0051,
+ "cost": 2.005126953,
"uses_join_buffering": true
}
},
"rows_for_plan": 9,
- "cost_for_plan": 6.4103,
+ "cost_for_plan": 6.410253906,
"semijoin_strategy_choice": [],
"rest_of_plan": [
{
@@ -6762,34 +6727,34 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"access_type": "scan",
"resulting_rows": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"uses_join_buffering": true
}
},
"rows_for_plan": 81,
- "cost_for_plan": 24.626,
+ "cost_for_plan": 24.62563477,
"semijoin_strategy_choice": [
{
"strategy": "FirstMatch",
"records": 3,
- "read_time": 44.759
+ "read_time": 44.75893555
},
{
"strategy": "SJ-Materialization",
"records": 3,
- "read_time": 8.1256
+ "read_time": 8.125634766
},
{
"strategy": "DuplicateWeedout",
"records": 3,
- "read_time": 37.226
+ "read_time": 37.22563477
},
{
"chosen_strategy": "SJ-Materialization"
@@ -6804,19 +6769,19 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"access_type": "scan",
"resulting_rows": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"uses_join_buffering": true
}
},
"rows_for_plan": 27,
- "cost_for_plan": 15.541,
+ "cost_for_plan": 15.54101562,
"semijoin_strategy_choice": [],
"rest_of_plan": [
{
@@ -6832,19 +6797,19 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"access_type": "scan",
"resulting_rows": 3,
- "cost": 2.0051,
+ "cost": 2.005126953,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 3,
- "cost": 2.0051,
+ "cost": 2.005126953,
"uses_join_buffering": true
}
},
"rows_for_plan": 81,
- "cost_for_plan": 33.746,
+ "cost_for_plan": 33.74614258,
"semijoin_strategy_choice": [],
"rest_of_plan": [
{
@@ -6861,34 +6826,34 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"access_type": "scan",
"resulting_rows": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"uses_join_buffering": true
}
},
"rows_for_plan": 729,
- "cost_for_plan": 181.56,
+ "cost_for_plan": 181.5615234,
"semijoin_strategy_choice": [
{
"strategy": "FirstMatch",
"records": 27,
- "read_time": 394.93
+ "read_time": 394.925293
},
{
"strategy": "SJ-Materialization",
"records": 27,
- "read_time": 22.262
+ "read_time": 22.26152344
},
{
"strategy": "DuplicateWeedout",
"records": 27,
- "read_time": 294.96
+ "read_time": 294.9615234
},
{
"chosen_strategy": "SJ-Materialization"
@@ -6911,19 +6876,19 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"access_type": "scan",
"resulting_rows": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"uses_join_buffering": true
}
},
"rows_for_plan": 243,
- "cost_for_plan": 66.156,
+ "cost_for_plan": 66.15639648,
"semijoin_strategy_choice": [],
"pruned_by_cost": true
}
@@ -6937,19 +6902,19 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"access_type": "scan",
"resulting_rows": 3,
- "cost": 2.0051,
+ "cost": 2.005126953,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 3,
- "cost": 2.0051,
+ "cost": 2.005126953,
"uses_join_buffering": true
}
},
"rows_for_plan": 9,
- "cost_for_plan": 11.931,
+ "cost_for_plan": 11.93076172,
"semijoin_strategy_choice": [],
"rest_of_plan": [
{
@@ -6965,19 +6930,19 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"access_type": "scan",
"resulting_rows": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"uses_join_buffering": true
}
},
"rows_for_plan": 81,
- "cost_for_plan": 30.146,
+ "cost_for_plan": 30.14614258,
"semijoin_strategy_choice": [],
"pruned_by_cost": true
},
@@ -6994,19 +6959,19 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"access_type": "scan",
"resulting_rows": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"uses_join_buffering": true
}
},
"rows_for_plan": 81,
- "cost_for_plan": 30.146,
+ "cost_for_plan": 30.14614258,
"semijoin_strategy_choice": [],
"pruned_by_cost": true
}
@@ -7020,19 +6985,19 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"access_type": "scan",
"resulting_rows": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"uses_join_buffering": true
}
},
"rows_for_plan": 27,
- "cost_for_plan": 15.541,
+ "cost_for_plan": 15.54101562,
"semijoin_strategy_choice": [],
"pruned_by_heuristic": true
}
@@ -7046,19 +7011,19 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"access_type": "scan",
"resulting_rows": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"uses_join_buffering": true
}
},
"rows_for_plan": 81,
- "cost_for_plan": 24.626,
+ "cost_for_plan": 24.62563477,
"semijoin_strategy_choice": [],
"pruned_by_cost": true
},
@@ -7070,19 +7035,19 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"access_type": "scan",
"resulting_rows": 3,
- "cost": 2.0051,
+ "cost": 2.005126953,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 3,
- "cost": 2.0051,
+ "cost": 2.005126953,
"uses_join_buffering": true
}
},
"rows_for_plan": 27,
- "cost_for_plan": 13.815,
+ "cost_for_plan": 13.81538086,
"semijoin_strategy_choice": [],
"pruned_by_heuristic": true
},
@@ -7094,19 +7059,19 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"access_type": "scan",
"resulting_rows": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"uses_join_buffering": true
}
},
"rows_for_plan": 81,
- "cost_for_plan": 24.626,
+ "cost_for_plan": 24.62563477,
"semijoin_strategy_choice": [],
"pruned_by_cost": true
}
@@ -7120,19 +7085,19 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"access_type": "scan",
"resulting_rows": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"uses_join_buffering": true
}
},
"rows_for_plan": 27,
- "cost_for_plan": 10.021,
+ "cost_for_plan": 10.02050781,
"semijoin_strategy_choice": [],
"pruned_by_heuristic": true
},
@@ -7144,19 +7109,19 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"access_type": "scan",
"resulting_rows": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"uses_join_buffering": true
}
},
"rows_for_plan": 27,
- "cost_for_plan": 10.021,
+ "cost_for_plan": 10.02050781,
"semijoin_strategy_choice": [],
"pruned_by_heuristic": true
},
@@ -7168,19 +7133,19 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"access_type": "scan",
"resulting_rows": 3,
- "cost": 2.0051,
+ "cost": 2.005126953,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 3,
- "cost": 2.0051,
+ "cost": 2.005126953,
"uses_join_buffering": true
}
},
"rows_for_plan": 9,
- "cost_for_plan": 6.4103,
+ "cost_for_plan": 6.410253906,
"semijoin_strategy_choice": [],
"pruned_by_heuristic": true
},
@@ -7192,19 +7157,19 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"access_type": "scan",
"resulting_rows": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"uses_join_buffering": true
}
},
"rows_for_plan": 27,
- "cost_for_plan": 10.021,
+ "cost_for_plan": 10.02050781,
"semijoin_strategy_choice": [],
"pruned_by_heuristic": true
}
@@ -7218,19 +7183,19 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"access_type": "scan",
"resulting_rows": 3,
- "cost": 2.0051,
+ "cost": 2.005126953,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 3,
- "cost": 2.0051,
+ "cost": 2.005126953,
"uses_join_buffering": false
}
},
"rows_for_plan": 3,
- "cost_for_plan": 2.6051,
+ "cost_for_plan": 2.605126953,
"semijoin_strategy_choice": [],
"pruned_by_heuristic": true
},
@@ -7242,19 +7207,19 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"access_type": "scan",
"resulting_rows": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"uses_join_buffering": false
}
},
"rows_for_plan": 9,
- "cost_for_plan": 3.8154,
+ "cost_for_plan": 3.815380859,
"semijoin_strategy_choice": [],
"pruned_by_heuristic": true
},
@@ -7266,19 +7231,19 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"access_type": "scan",
"resulting_rows": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"uses_join_buffering": false
}
},
"rows_for_plan": 9,
- "cost_for_plan": 3.8154,
+ "cost_for_plan": 3.815380859,
"semijoin_strategy_choice": [],
"pruned_by_heuristic": true
},
@@ -7290,19 +7255,19 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"access_type": "scan",
"resulting_rows": 3,
- "cost": 2.0051,
+ "cost": 2.005126953,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 3,
- "cost": 2.0051,
+ "cost": 2.005126953,
"uses_join_buffering": false
}
},
"rows_for_plan": 3,
- "cost_for_plan": 2.6051,
+ "cost_for_plan": 2.605126953,
"semijoin_strategy_choice": [],
"pruned_by_heuristic": true
},
@@ -7314,19 +7279,19 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"access_type": "scan",
"resulting_rows": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 9,
- "cost": 2.0154,
+ "cost": 2.015380859,
"uses_join_buffering": false
}
},
"rows_for_plan": 9,
- "cost_for_plan": 3.8154,
+ "cost_for_plan": 3.815380859,
"semijoin_strategy_choice": [],
"pruned_by_heuristic": true
}
@@ -7466,7 +7431,7 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives'))
"using_mrr": false,
"index_only": true,
"rows": 1,
- "cost": 1.1783,
+ "cost": 0.345829876,
"chosen": true
}
],
@@ -7500,7 +7465,7 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives'))
"using_mrr": false,
"index_only": true,
"rows": 107,
- "cost": 8.9549,
+ "cost": 21.63379668,
"chosen": true
}
],
@@ -7537,7 +7502,7 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives'))
"using_mrr": false,
"index_only": false,
"rows": 1000,
- "cost": 1273.2,
+ "cost": 1203.877243,
"chosen": true
}
],
@@ -7582,7 +7547,7 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives'))
"using_mrr": false,
"index_only": false,
"rows": 4,
- "cost": 6.2648,
+ "cost": 4.948710032,
"chosen": true
}
],
@@ -7621,7 +7586,7 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives'))
"using_mrr": false,
"index_only": false,
"rows": 1,
- "cost": 2.3797,
+ "cost": 1.346171589,
"chosen": true
}
],
@@ -7655,7 +7620,7 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives'))
"using_mrr": false,
"index_only": false,
"rows": 1,
- "cost": 2.3797,
+ "cost": 1.346171589,
"chosen": true
}
],
@@ -7697,7 +7662,7 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives'))
"using_mrr": false,
"index_only": false,
"rows": 1,
- "cost": 2.3787,
+ "cost": 1.345927508,
"chosen": true
}
],
@@ -7732,7 +7697,7 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives'))
"using_mrr": false,
"index_only": false,
"rows": 1,
- "cost": 2.3785,
+ "cost": 1.345878692,
"chosen": true
}
],
@@ -7767,7 +7732,7 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives'))
"using_mrr": false,
"index_only": false,
"rows": 1,
- "cost": 2.3787,
+ "cost": 1.345927508,
"chosen": true
}
],
@@ -7805,7 +7770,7 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives'))
"using_mrr": false,
"index_only": false,
"rows": 1,
- "cost": 2.3785,
+ "cost": 1.345878692,
"chosen": true
}
],
@@ -7846,7 +7811,7 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives'))
"using_mrr": false,
"index_only": false,
"rows": 1,
- "cost": 3.5719,
+ "cost": 1.394255553,
"chosen": true
}
],
@@ -7885,7 +7850,7 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives'))
"using_mrr": false,
"index_only": false,
"rows": 2,
- "cost": 3.6324,
+ "cost": 2.546855016,
"chosen": true
}
],
@@ -7941,7 +7906,7 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives'))
"using_mrr": false,
"index_only": false,
"rows": 1000,
- "cost": 1273.2,
+ "cost": 1203.877243,
"chosen": true
}
],
@@ -8006,7 +7971,7 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.considered_execution_plans'))
{
"access_type": "scan",
"resulting_rows": 5.9375,
- "cost": 2.8296,
+ "cost": 2.829589844,
"chosen": true
}
],
@@ -8014,12 +7979,12 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.considered_execution_plans'))
{
"type": "scan",
"records": 5.9375,
- "cost": 2.8296,
+ "cost": 2.829589844,
"uses_join_buffering": false
}
},
"rows_for_plan": 5.9375,
- "cost_for_plan": 4.0171,
+ "cost_for_plan": 4.017089844,
"rest_of_plan":
[
@@ -8036,22 +8001,22 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.considered_execution_plans'))
{
"access_type": "scan",
- "resulting_rows": 804.69,
- "cost": 256.85,
+ "resulting_rows": 804.6875,
+ "cost": 256.8548584,
"chosen": true
}
],
"chosen_access_method":
{
"type": "scan",
- "records": 804.69,
- "cost": 256.85,
+ "records": 804.6875,
+ "cost": 256.8548584,
"uses_join_buffering": false
}
},
- "rows_for_plan": 4777.8,
- "cost_for_plan": 1216.4,
- "estimated_join_cardinality": 4777.8
+ "rows_for_plan": 4777.832031,
+ "cost_for_plan": 1216.438354,
+ "estimated_join_cardinality": 4777.832031
}
]
},
@@ -8068,21 +8033,21 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.considered_execution_plans'))
{
"access_type": "scan",
- "resulting_rows": 804.69,
- "cost": 43.26,
+ "resulting_rows": 804.6875,
+ "cost": 43.25976562,
"chosen": true
}
],
"chosen_access_method":
{
"type": "scan",
- "records": 804.69,
- "cost": 43.26,
+ "records": 804.6875,
+ "cost": 43.25976562,
"uses_join_buffering": false
}
},
- "rows_for_plan": 804.69,
- "cost_for_plan": 204.2,
+ "rows_for_plan": 804.6875,
+ "cost_for_plan": 204.1972656,
"pruned_by_heuristic": true
}
]
@@ -8112,7 +8077,7 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.considered_execution_plans'))
{
"access_type": "scan",
"resulting_rows": 10,
- "cost": 2.0171,
+ "cost": 2.017089844,
"chosen": true
}
],
@@ -8120,12 +8085,12 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.considered_execution_plans'))
{
"type": "scan",
"records": 10,
- "cost": 2.0171,
+ "cost": 2.017089844,
"uses_join_buffering": false
}
},
"rows_for_plan": 10,
- "cost_for_plan": 4.0171,
+ "cost_for_plan": 4.017089844,
"rest_of_plan":
[
@@ -8146,14 +8111,14 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.considered_execution_plans'))
"used_range_estimates": false,
"cause": "not available",
"rows": 1,
- "cost": 20,
+ "cost": 20.00585794,
"chosen": true
},
{
"access_type": "scan",
- "resulting_rows": 804.69,
- "cost": 43.26,
+ "resulting_rows": 804.6875,
+ "cost": 43.25976562,
"chosen": false
}
],
@@ -8161,14 +8126,14 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.considered_execution_plans'))
{
"type": "ref",
"records": 1,
- "cost": 20,
+ "cost": 20.00585794,
"uses_join_buffering": false
}
},
"rows_for_plan": 10,
- "cost_for_plan": 26.017,
- "selectivity": 0.8047,
- "estimated_join_cardinality": 8.0469
+ "cost_for_plan": 26.02294779,
+ "selectivity": 0.8046875,
+ "estimated_join_cardinality": 8.046875
}
]
},
@@ -8185,21 +8150,21 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.considered_execution_plans'))
{
"access_type": "scan",
- "resulting_rows": 804.69,
- "cost": 43.26,
+ "resulting_rows": 804.6875,
+ "cost": 43.25976562,
"chosen": true
}
],
"chosen_access_method":
{
"type": "scan",
- "records": 804.69,
- "cost": 43.26,
+ "records": 804.6875,
+ "cost": 43.25976562,
"uses_join_buffering": false
}
},
- "rows_for_plan": 804.69,
- "cost_for_plan": 204.2,
+ "rows_for_plan": 804.6875,
+ "cost_for_plan": 204.1972656,
"pruned_by_cost": true
}
]
@@ -8233,7 +8198,7 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives'))
"using_mrr": false,
"index_only": false,
"rows": 1,
- "cost": 2.4265,
+ "cost": 1.357887479,
"chosen": true
}
],
@@ -8299,9 +8264,8 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.range_scan_alternatives'))
"using_mrr": false,
"index_only": true,
"rows": 1,
- "cost": 1.3033,
- "chosen": false,
- "cause": "cost"
+ "cost": 0.345829876,
+ "chosen": true
}
]
]
@@ -8337,7 +8301,7 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.considered_execution_plans'))
{
"access_type": "scan",
"resulting_rows": 10,
- "cost": 2.022,
+ "cost": 2.021972656,
"chosen": true
}
],
@@ -8345,12 +8309,12 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.considered_execution_plans'))
{
"type": "scan",
"records": 10,
- "cost": 2.022,
+ "cost": 2.021972656,
"uses_join_buffering": false
}
},
"rows_for_plan": 10,
- "cost_for_plan": 4.022,
+ "cost_for_plan": 4.021972656,
"rest_of_plan":
[
@@ -8371,14 +8335,14 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.considered_execution_plans'))
"used_range_estimates": false,
"cause": "not available",
"rows": 1,
- "cost": 20,
+ "cost": 20.00585794,
"chosen": true
},
{
"access_type": "scan",
"resulting_rows": 100,
- "cost": 2.2197,
+ "cost": 2.219726562,
"chosen": false
}
],
@@ -8386,12 +8350,12 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.considered_execution_plans'))
{
"type": "ref",
"records": 1,
- "cost": 20,
+ "cost": 20.00585794,
"uses_join_buffering": false
}
},
"rows_for_plan": 10,
- "cost_for_plan": 26.022,
+ "cost_for_plan": 26.0278306,
"cost_for_sorting": 10,
"estimated_join_cardinality": 10
}
@@ -8411,7 +8375,7 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.considered_execution_plans'))
{
"access_type": "scan",
"resulting_rows": 100,
- "cost": 2.2197,
+ "cost": 2.219726562,
"chosen": true,
"use_tmp_table": true
}
@@ -8420,12 +8384,12 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.considered_execution_plans'))
{
"type": "scan",
"records": 100,
- "cost": 2.2197,
+ "cost": 2.219726562,
"uses_join_buffering": false
}
},
"rows_for_plan": 100,
- "cost_for_plan": 22.22,
+ "cost_for_plan": 22.21972656,
"rest_of_plan":
[
@@ -8446,14 +8410,14 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.considered_execution_plans'))
"used_range_estimates": false,
"cause": "not available",
"rows": 1,
- "cost": 200,
+ "cost": 200.0585794,
"chosen": true
},
{
"access_type": "scan",
"resulting_rows": 10,
- "cost": 2.022,
+ "cost": 2.021972656,
"chosen": true
}
],
@@ -8461,12 +8425,12 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.considered_execution_plans'))
{
"type": "scan",
"records": 10,
- "cost": 2.022,
+ "cost": 2.021972656,
"uses_join_buffering": true
}
},
"rows_for_plan": 1000,
- "cost_for_plan": 224.24,
+ "cost_for_plan": 224.2416992,
"pruned_by_cost": true
}
]
@@ -8502,7 +8466,7 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.selectivity_for_columns'))
[
"1 <= a <= 5"
],
- "selectivity_from_histogram": 0.0469
+ "selectivity_from_histogram": 0.046875
},
{
@@ -8511,7 +8475,7 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.selectivity_for_columns'))
[
"NULL < b <= 5"
],
- "selectivity_from_histogram": 0.0469
+ "selectivity_from_histogram": 0.046875
}
]
]
@@ -8554,7 +8518,7 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.selectivity_for_columns'))
[
"10 <= b < 25"
],
- "selectivity_from_histogram": 0.1562
+ "selectivity_from_histogram": 0.15625
}
]
]
@@ -8584,7 +8548,7 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.range_scan_alternatives'))
"using_mrr": false,
"index_only": false,
"rows": 0,
- "cost": 1.125,
+ "cost": 0.145,
"chosen": true
}
]
@@ -8601,3 +8565,233 @@ set max_session_mem_used=default;
#
# End of 10.4 tests
#
+set optimizer_trace='enabled=on';
+#
+# Test many rows to see output of big cost numbers
+#
+select count(*) from seq_1_to_10000000;
+count(*)
+10000000
+select * from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+QUERY TRACE MISSING_BYTES_BEYOND_MAX_MEM_SIZE INSUFFICIENT_PRIVILEGES
+select count(*) from seq_1_to_10000000 {
+ "steps": [
+ {
+ "join_preparation": {
+ "select_id": 1,
+ "steps": [
+ {
+ "expanded_query": "select count(0) AS `count(*)` from seq_1_to_10000000"
+ }
+ ]
+ }
+ },
+ {
+ "join_optimization": {
+ "select_id": 1,
+ "steps": [
+ {
+ "table_dependencies": [
+ {
+ "table": "seq_1_to_10000000",
+ "row_may_be_null": false,
+ "map_bit": 0,
+ "depends_on_map_bits": []
+ }
+ ]
+ },
+ {
+ "rows_estimation": [
+ {
+ "table": "seq_1_to_10000000",
+ "table_scan": {
+ "rows": 10000000,
+ "cost": 10000000
+ }
+ }
+ ]
+ },
+ {
+ "considered_execution_plans": [
+ {
+ "plan_prefix": [],
+ "table": "seq_1_to_10000000",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 10000000,
+ "cost": 10000000,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 10000000,
+ "cost": 10000000,
+ "uses_join_buffering": false
+ }
+ },
+ "rows_for_plan": 10000000,
+ "cost_for_plan": 12000000,
+ "estimated_join_cardinality": 10000000
+ }
+ ]
+ },
+ {
+ "best_join_order": ["seq_1_to_10000000"]
+ },
+ {
+ "attaching_conditions_to_tables": {
+ "original_condition": null,
+ "attached_conditions_computation": [],
+ "attached_conditions_summary": [
+ {
+ "table": "seq_1_to_10000000",
+ "attached": null
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "join_execution": {
+ "select_id": 1,
+ "steps": []
+ }
+ }
+ ]
+} 0 0
+#
+# MDEV-22891: Optimizer trace: const tables are not clearly visible
+#
+create table t0(a int primary key);
+insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+create table t1 (pk int primary key, a int);
+insert into t1 select a,a from t0;
+create table t2 (pk int primary key, a int);
+insert into t2 select a,a from t0;
+create table t3 (pk int primary key, a int);
+insert into t3 select a,a from t0;
+explain
+select * from t1 left join (t2 join t3 on t3.pk=1000) on t2.a=t1.a and t2.pk is null;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t3 const PRIMARY NULL NULL NULL 1 Impossible ON condition
+1 SIMPLE t2 const PRIMARY NULL NULL NULL 1 Impossible ON condition
+1 SIMPLE t1 ALL NULL NULL NULL NULL 10
+select JSON_DETAILED(JSON_EXTRACT(trace, '$**.mark_join_nest_as_const'))
+from information_schema.optimizer_trace;
+JSON_DETAILED(JSON_EXTRACT(trace, '$**.mark_join_nest_as_const'))
+[
+
+ {
+ "members":
+ [
+ "t3",
+ "t2"
+ ]
+ }
+]
+drop table t0, t1, t2, t3;
+#
+# MDEV-23767: IN-to-subquery conversion is not visible in optimizer trace
+#
+create table t0 (a int);
+INSERT INTO t0 VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+set @tmp=@@in_predicate_conversion_threshold;
+set in_predicate_conversion_threshold=3;
+explain select * from t0 where a in (1,2,3,4,5,6);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t0 ALL NULL NULL NULL NULL 10 Using where
+1 PRIMARY <derived3> ref key0 key0 4 test.t0.a 2 FirstMatch(t0)
+3 DERIVED NULL NULL NULL NULL NULL NULL NULL No tables used
+select json_detailed(json_extract(trace, '$**.in_to_subquery_conversion'))
+from information_schema.optimizer_trace;
+json_detailed(json_extract(trace, '$**.in_to_subquery_conversion'))
+[
+
+ {
+ "item": "t0.a in (1,2,3,4,5,6)",
+ "conversion":
+ [
+
+ {
+ "join_preparation":
+ {
+ "select_id": 2,
+ "steps":
+ [
+
+ {
+ "derived":
+ {
+ "table": "tvc_0",
+ "select_id": 3,
+ "algorithm": "materialized"
+ }
+ },
+
+ {
+ "transformation":
+ {
+ "select_id": 2,
+ "from": "IN (SELECT)",
+ "to": "materialization",
+ "sjm_scan_allowed": true,
+ "possible": true
+ }
+ },
+
+ {
+ "transformation":
+ {
+ "select_id": 2,
+ "from": "IN (SELECT)",
+ "to": "semijoin",
+ "chosen": true
+ }
+ },
+
+ {
+ "expanded_query": "/* select#2 */ select tvc_0._col_1 from (values (1),(2),(3),(4),(5),(6)) tvc_0"
+ }
+ ]
+ }
+ }
+ ]
+ }
+]
+explain select * from t0 where a in (1,2,3,4,5,a+1);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t0 ALL NULL NULL NULL NULL 10 Using where
+select json_detailed(json_extract(trace, '$**.in_to_subquery_conversion'))
+from information_schema.optimizer_trace;
+json_detailed(json_extract(trace, '$**.in_to_subquery_conversion'))
+[
+
+ {
+ "item": "t0.a in (1,2,3,4,5,t0.a + 1)",
+ "done": false,
+ "reason": "non-constant element in the IN-list"
+ }
+]
+explain select * from t0 where a in ('1','2','3','4','5','6');
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t0 ALL NULL NULL NULL NULL 10 Using where
+select json_detailed(json_extract(trace, '$**.in_to_subquery_conversion'))
+from information_schema.optimizer_trace;
+json_detailed(json_extract(trace, '$**.in_to_subquery_conversion'))
+[
+
+ {
+ "item": "t0.a in ('1','2','3','4','5','6')",
+ "done": false,
+ "reason": "type mismatch"
+ }
+]
+set in_predicate_conversion_threshold=@tmp;
+drop table t0;
+# End of 10.5 tests
+set optimizer_trace='enabled=off';
diff --git a/mysql-test/main/opt_trace.test b/mysql-test/main/opt_trace.test
index 3fae7f34750..ecb6658e338 100644
--- a/mysql-test/main/opt_trace.test
+++ b/mysql-test/main/opt_trace.test
@@ -637,3 +637,64 @@ set max_session_mem_used=default;
--echo #
--echo # End of 10.4 tests
--echo #
+
+set optimizer_trace='enabled=on';
+
+--echo #
+--echo # Test many rows to see output of big cost numbers
+--echo #
+
+select count(*) from seq_1_to_10000000;
+select * from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+
+--echo #
+--echo # MDEV-22891: Optimizer trace: const tables are not clearly visible
+--echo #
+create table t0(a int primary key);
+insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+
+create table t1 (pk int primary key, a int);
+insert into t1 select a,a from t0;
+
+create table t2 (pk int primary key, a int);
+insert into t2 select a,a from t0;
+
+create table t3 (pk int primary key, a int);
+insert into t3 select a,a from t0;
+
+explain
+select * from t1 left join (t2 join t3 on t3.pk=1000) on t2.a=t1.a and t2.pk is null;
+
+select JSON_DETAILED(JSON_EXTRACT(trace, '$**.mark_join_nest_as_const'))
+from information_schema.optimizer_trace;
+
+drop table t0, t1, t2, t3;
+
+--echo #
+--echo # MDEV-23767: IN-to-subquery conversion is not visible in optimizer trace
+--echo #
+create table t0 (a int);
+INSERT INTO t0 VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+
+set @tmp=@@in_predicate_conversion_threshold;
+set in_predicate_conversion_threshold=3;
+
+explain select * from t0 where a in (1,2,3,4,5,6);
+
+select json_detailed(json_extract(trace, '$**.in_to_subquery_conversion'))
+from information_schema.optimizer_trace;
+
+explain select * from t0 where a in (1,2,3,4,5,a+1);
+
+select json_detailed(json_extract(trace, '$**.in_to_subquery_conversion'))
+from information_schema.optimizer_trace;
+
+explain select * from t0 where a in ('1','2','3','4','5','6');
+select json_detailed(json_extract(trace, '$**.in_to_subquery_conversion'))
+from information_schema.optimizer_trace;
+
+set in_predicate_conversion_threshold=@tmp;
+drop table t0;
+
+--echo # End of 10.5 tests
+set optimizer_trace='enabled=off';
diff --git a/mysql-test/main/opt_trace_index_merge.result b/mysql-test/main/opt_trace_index_merge.result
index ed5ddfd69f4..3b79a7a44e8 100644
--- a/mysql-test/main/opt_trace_index_merge.result
+++ b/mysql-test/main/opt_trace_index_merge.result
@@ -73,7 +73,7 @@ explain select * from t1 where a=1 or b=1 {
"range_analysis": {
"table_scan": {
"rows": 1000,
- "cost": 231.69
+ "cost": 231.5878906
},
"potential_range_indexes": [
{
@@ -93,10 +93,6 @@ explain select * from t1 where a=1 or b=1 {
}
],
"setup_range_conditions": [],
- "group_index_range": {
- "chosen": false,
- "cause": "no group by or distinct"
- },
"analyzing_range_alternatives": {
"range_scan_alternatives": [],
"analyzing_roworder_intersect": {
@@ -115,12 +111,12 @@ explain select * from t1 where a=1 or b=1 {
"using_mrr": false,
"index_only": true,
"rows": 1,
- "cost": 1.1773,
+ "cost": 0.345585794,
"chosen": true
}
],
"index_to_merge": "a",
- "cumulated_cost": 1.1773
+ "cumulated_cost": 0.345585794
},
{
"range_scan_alternatives": [
@@ -131,15 +127,15 @@ explain select * from t1 where a=1 or b=1 {
"using_mrr": false,
"index_only": true,
"rows": 1,
- "cost": 1.1773,
+ "cost": 0.345585794,
"chosen": true
}
],
"index_to_merge": "b",
- "cumulated_cost": 2.3547
+ "cumulated_cost": 0.691171589
}
],
- "cost_of_reading_ranges": 2.3547,
+ "cost_of_reading_ranges": 0.691171589,
"use_roworder_union": true,
"cause": "always cheaper than non roworder retrieval",
"analyzing_roworder_scans": [
@@ -162,12 +158,16 @@ explain select * from t1 where a=1 or b=1 {
}
}
],
- "index_roworder_union_cost": 4.1484,
+ "index_roworder_union_cost": 2.484903732,
"members": 2,
"chosen": true
}
]
},
+ "group_index_range": {
+ "chosen": false,
+ "cause": "no group by or distinct"
+ },
"chosen_range_access_summary": {
"range_access_plan": {
"type": "index_roworder_union",
@@ -187,7 +187,7 @@ explain select * from t1 where a=1 or b=1 {
]
},
"rows_for_plan": 2,
- "cost_for_plan": 4.1484,
+ "cost_for_plan": 2.484903732,
"chosen": true
}
}
@@ -209,19 +209,19 @@ explain select * from t1 where a=1 or b=1 {
{
"access_type": "index_merge",
"resulting_rows": 2,
- "cost": 4.1484,
+ "cost": 2.484903732,
"chosen": true
}
],
"chosen_access_method": {
"type": "index_merge",
"records": 2,
- "cost": 4.1484,
+ "cost": 2.484903732,
"uses_join_buffering": false
}
},
"rows_for_plan": 2,
- "cost_for_plan": 4.5484,
+ "cost_for_plan": 2.884903732,
"estimated_join_cardinality": 2
}
]
@@ -322,7 +322,7 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives'))
"using_mrr": false,
"index_only": false,
"rows": 2243,
- "cost": 2844.1,
+ "cost": 2700.058937,
"chosen": true
},
@@ -336,7 +336,7 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives'))
"using_mrr": false,
"index_only": false,
"rows": 2243,
- "cost": 2844.1,
+ "cost": 2700.058937,
"chosen": false,
"cause": "cost"
},
@@ -351,7 +351,7 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives'))
"using_mrr": false,
"index_only": false,
"rows": 2243,
- "cost": 2844.1,
+ "cost": 2700.058937,
"chosen": false,
"cause": "cost"
}
@@ -363,10 +363,10 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives'))
{
"index": "key1",
- "index_scan_cost": 58.252,
- "cumulated_index_scan_cost": 58.252,
- "disk_sweep_cost": 1923.1,
- "cumulative_total_cost": 1981.4,
+ "index_scan_cost": 10.31393703,
+ "cumulated_index_scan_cost": 10.31393703,
+ "disk_sweep_cost": 1923.144061,
+ "cumulative_total_cost": 1933.457998,
"usable": true,
"matching_rows_now": 2243,
"intersect_covering_with_this_index": false,
@@ -375,24 +375,24 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives'))
{
"index": "key2",
- "index_scan_cost": 58.252,
- "cumulated_index_scan_cost": 116.5,
- "disk_sweep_cost": 84.518,
- "cumulative_total_cost": 201.02,
+ "index_scan_cost": 10.31393703,
+ "cumulated_index_scan_cost": 20.62787405,
+ "disk_sweep_cost": 84.51771758,
+ "cumulative_total_cost": 105.1455916,
"usable": true,
- "matching_rows_now": 77.636,
+ "matching_rows_now": 77.6360508,
"intersect_covering_with_this_index": false,
"chosen": true
},
{
"index": "key3",
- "index_scan_cost": 58.252,
- "cumulated_index_scan_cost": 174.76,
+ "index_scan_cost": 10.31393703,
+ "cumulated_index_scan_cost": 30.94181108,
"disk_sweep_cost": 0,
- "cumulative_total_cost": 174.76,
+ "cumulative_total_cost": 30.94181108,
"usable": true,
- "matching_rows_now": 2.6872,
+ "matching_rows_now": 2.687185191,
"intersect_covering_with_this_index": true,
"chosen": true
}
@@ -403,7 +403,7 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives'))
"cause": "no clustered pk index"
},
"rows": 2,
- "cost": 174.76,
+ "cost": 30.94181108,
"covering": true,
"chosen": true
},
@@ -421,7 +421,7 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.chosen_range_access_summary'))
{
"type": "index_roworder_intersect",
"rows": 2,
- "cost": 174.76,
+ "cost": 30.94181108,
"covering": true,
"clustered_pk_scan": false,
"intersect_of":
@@ -459,7 +459,7 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.chosen_range_access_summary'))
]
},
"rows_for_plan": 2,
- "cost_for_plan": 174.76,
+ "cost_for_plan": 30.94181108,
"chosen": true
}
]
@@ -500,7 +500,7 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives'))
"using_mrr": false,
"index_only": true,
"rows": 2243,
- "cost": 152.53,
+ "cost": 457.058937,
"chosen": true
},
@@ -514,13 +514,13 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives'))
"using_mrr": false,
"index_only": true,
"rows": 2243,
- "cost": 152.53,
+ "cost": 457.058937,
"chosen": false,
"cause": "cost"
}
],
"index_to_merge": "key1",
- "cumulated_cost": 152.53
+ "cumulated_cost": 457.058937
},
{
@@ -537,7 +537,7 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives'))
"using_mrr": false,
"index_only": true,
"rows": 2243,
- "cost": 152.53,
+ "cost": 457.058937,
"chosen": true
},
@@ -551,16 +551,16 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives'))
"using_mrr": false,
"index_only": true,
"rows": 2243,
- "cost": 152.53,
+ "cost": 457.058937,
"chosen": false,
"cause": "cost"
}
],
"index_to_merge": "key3",
- "cumulated_cost": 305.05
+ "cumulated_cost": 914.1178741
}
],
- "cost_of_reading_ranges": 305.05,
+ "cost_of_reading_ranges": 914.1178741,
"use_roworder_union": true,
"cause": "always cheaper than non roworder retrieval",
"analyzing_roworder_scans":
@@ -581,10 +581,10 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives'))
{
"index": "key1",
- "index_scan_cost": 58.252,
- "cumulated_index_scan_cost": 58.252,
- "disk_sweep_cost": 1923.1,
- "cumulative_total_cost": 1981.4,
+ "index_scan_cost": 10.31393703,
+ "cumulated_index_scan_cost": 10.31393703,
+ "disk_sweep_cost": 1923.144061,
+ "cumulative_total_cost": 1933.457998,
"usable": true,
"matching_rows_now": 2243,
"intersect_covering_with_this_index": false,
@@ -593,12 +593,12 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives'))
{
"index": "key2",
- "index_scan_cost": 58.252,
- "cumulated_index_scan_cost": 116.5,
- "disk_sweep_cost": 84.518,
- "cumulative_total_cost": 201.02,
+ "index_scan_cost": 10.31393703,
+ "cumulated_index_scan_cost": 20.62787405,
+ "disk_sweep_cost": 84.51771758,
+ "cumulative_total_cost": 105.1455916,
"usable": true,
- "matching_rows_now": 77.636,
+ "matching_rows_now": 77.6360508,
"intersect_covering_with_this_index": false,
"chosen": true
}
@@ -609,7 +609,7 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives'))
"cause": "no clustered pk index"
},
"rows": 77,
- "cost": 201.02,
+ "cost": 105.1455916,
"covering": false,
"chosen": true
}
@@ -630,10 +630,10 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives'))
{
"index": "key3",
- "index_scan_cost": 58.252,
- "cumulated_index_scan_cost": 58.252,
- "disk_sweep_cost": 1923.1,
- "cumulative_total_cost": 1981.4,
+ "index_scan_cost": 10.31393703,
+ "cumulated_index_scan_cost": 10.31393703,
+ "disk_sweep_cost": 1923.144061,
+ "cumulative_total_cost": 1933.457998,
"usable": true,
"matching_rows_now": 2243,
"intersect_covering_with_this_index": false,
@@ -642,12 +642,12 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives'))
{
"index": "key4",
- "index_scan_cost": 58.252,
- "cumulated_index_scan_cost": 116.5,
- "disk_sweep_cost": 84.518,
- "cumulative_total_cost": 201.02,
+ "index_scan_cost": 10.31393703,
+ "cumulated_index_scan_cost": 20.62787405,
+ "disk_sweep_cost": 84.51771758,
+ "cumulative_total_cost": 105.1455916,
"usable": true,
- "matching_rows_now": 77.636,
+ "matching_rows_now": 77.6360508,
"intersect_covering_with_this_index": false,
"chosen": true
}
@@ -658,13 +658,13 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives'))
"cause": "no clustered pk index"
},
"rows": 77,
- "cost": 201.02,
+ "cost": 105.1455916,
"covering": false,
"chosen": true
}
}
],
- "index_roworder_union_cost": 386.73,
+ "index_roworder_union_cost": 194.9771115,
"members": 2,
"chosen": true
}
@@ -685,7 +685,7 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.chosen_range_access_summary'))
{
"type": "index_roworder_intersect",
"rows": 77,
- "cost": 201.02,
+ "cost": 105.1455916,
"covering": false,
"clustered_pk_scan": false,
"intersect_of":
@@ -716,7 +716,7 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.chosen_range_access_summary'))
{
"type": "index_roworder_intersect",
"rows": 77,
- "cost": 201.02,
+ "cost": 105.1455916,
"covering": false,
"clustered_pk_scan": false,
"intersect_of":
@@ -746,7 +746,7 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.chosen_range_access_summary'))
]
},
"rows_for_plan": 154,
- "cost_for_plan": 386.73,
+ "cost_for_plan": 194.9771115,
"chosen": true
}
]
diff --git a/mysql-test/main/opt_trace_index_merge_innodb.result b/mysql-test/main/opt_trace_index_merge_innodb.result
index 97c2c262bfc..509569021a5 100644
--- a/mysql-test/main/opt_trace_index_merge_innodb.result
+++ b/mysql-test/main/opt_trace_index_merge_innodb.result
@@ -88,7 +88,7 @@ explain select * from t1 where pk1 != 0 and key1 = 1 {
"range_analysis": {
"table_scan": {
"rows": 1000,
- "cost": 206.1
+ "cost": 206
},
"potential_range_indexes": [
{
@@ -108,10 +108,6 @@ explain select * from t1 where pk1 != 0 and key1 = 1 {
}
],
"setup_range_conditions": [],
- "group_index_range": {
- "chosen": false,
- "cause": "no group by or distinct"
- },
"analyzing_range_alternatives": {
"range_scan_alternatives": [
{
@@ -121,7 +117,7 @@ explain select * from t1 where pk1 != 0 and key1 = 1 {
"using_mrr": false,
"index_only": false,
"rows": 1000,
- "cost": 204.01,
+ "cost": 204.27,
"chosen": true
},
{
@@ -131,7 +127,7 @@ explain select * from t1 where pk1 != 0 and key1 = 1 {
"using_mrr": false,
"index_only": false,
"rows": 1,
- "cost": 2.3751,
+ "cost": 1.345146475,
"chosen": true
}
],
@@ -139,10 +135,10 @@ explain select * from t1 where pk1 != 0 and key1 = 1 {
"intersecting_indexes": [
{
"index": "key1",
- "index_scan_cost": 1.0001,
- "cumulated_index_scan_cost": 1.0001,
- "disk_sweep_cost": 1.0042,
- "cumulative_total_cost": 2.0043,
+ "index_scan_cost": 1.000146475,
+ "cumulated_index_scan_cost": 1.000146475,
+ "disk_sweep_cost": 1.004153686,
+ "cumulative_total_cost": 2.004300162,
"usable": true,
"matching_rows_now": 1,
"intersect_covering_with_this_index": false,
@@ -154,10 +150,14 @@ explain select * from t1 where pk1 != 0 and key1 = 1 {
"cause": "cost"
},
"chosen": false,
- "cause": "too few indexes to merge"
+ "cause": "cost"
},
"analyzing_index_merge_union": []
},
+ "group_index_range": {
+ "chosen": false,
+ "cause": "no group by or distinct"
+ },
"chosen_range_access_summary": {
"range_access_plan": {
"type": "range_scan",
@@ -166,7 +166,7 @@ explain select * from t1 where pk1 != 0 and key1 = 1 {
"ranges": ["(1) <= (key1) <= (1)"]
},
"rows_for_plan": 1,
- "cost_for_plan": 2.3751,
+ "cost_for_plan": 1.345146475,
"chosen": true
}
}
@@ -176,7 +176,7 @@ explain select * from t1 where pk1 != 0 and key1 = 1 {
"rowid_filters": [
{
"key": "key1",
- "build_cost": 1.1801,
+ "build_cost": 0.130146475,
"rows": 1
}
]
@@ -209,7 +209,7 @@ explain select * from t1 where pk1 != 0 and key1 = 1 {
"index": "key1",
"used_range_estimates": true,
"rows": 1,
- "cost": 2,
+ "cost": 1.125146475,
"chosen": true
},
{
@@ -221,12 +221,12 @@ explain select * from t1 where pk1 != 0 and key1 = 1 {
"chosen_access_method": {
"type": "ref",
"records": 1,
- "cost": 2,
+ "cost": 1.125146475,
"uses_join_buffering": false
}
},
"rows_for_plan": 1,
- "cost_for_plan": 2.2,
+ "cost_for_plan": 1.325146475,
"estimated_join_cardinality": 1
}
]
diff --git a/mysql-test/main/opt_trace_security.result b/mysql-test/main/opt_trace_security.result
index 6f377cd02b5..2c09f6c7d5a 100644
--- a/mysql-test/main/opt_trace_security.result
+++ b/mysql-test/main/opt_trace_security.result
@@ -80,7 +80,7 @@ select * from db1.t1 {
"table": "t1",
"table_scan": {
"rows": 3,
- "cost": 2.0051
+ "cost": 2.005126953
}
}
]
@@ -95,19 +95,19 @@ select * from db1.t1 {
{
"access_type": "scan",
"resulting_rows": 3,
- "cost": 2.0051,
+ "cost": 2.005126953,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 3,
- "cost": 2.0051,
+ "cost": 2.005126953,
"uses_join_buffering": false
}
},
"rows_for_plan": 3,
- "cost_for_plan": 2.6051,
+ "cost_for_plan": 2.605126953,
"estimated_join_cardinality": 3
}
]
@@ -203,7 +203,7 @@ select * from db1.v1 {
"table": "t1",
"table_scan": {
"rows": 3,
- "cost": 2.0051
+ "cost": 2.005126953
}
}
]
@@ -218,19 +218,19 @@ select * from db1.v1 {
{
"access_type": "scan",
"resulting_rows": 3,
- "cost": 2.0051,
+ "cost": 2.005126953,
"chosen": true
}
],
"chosen_access_method": {
"type": "scan",
"records": 3,
- "cost": 2.0051,
+ "cost": 2.005126953,
"uses_join_buffering": false
}
},
"rows_for_plan": 3,
- "cost_for_plan": 2.6051,
+ "cost_for_plan": 2.605126953,
"estimated_join_cardinality": 3
}
]
diff --git a/mysql-test/main/opt_trace_ucs2.result b/mysql-test/main/opt_trace_ucs2.result
index 306fdbf94ad..5de1fc5c3e9 100644
--- a/mysql-test/main/opt_trace_ucs2.result
+++ b/mysql-test/main/opt_trace_ucs2.result
@@ -38,7 +38,7 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives'))
"using_mrr": false,
"index_only": false,
"rows": 2,
- "cost": 3.7609,
+ "cost": 2.547733708,
"chosen": true
}
],
diff --git a/mysql-test/main/opt_tvc.result b/mysql-test/main/opt_tvc.result
index a68e70e8a25..9752aa71bfb 100644
--- a/mysql-test/main/opt_tvc.result
+++ b/mysql-test/main/opt_tvc.result
@@ -568,18 +568,18 @@ explain extended select * from t1
where (a,b) not in ((1,2),(8,9), (5,1));
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 6 100.00 Using where
-2 MATERIALIZED <derived3> ALL NULL NULL NULL NULL 3 100.00
+2 DEPENDENT SUBQUERY <derived3> index_subquery key0 key0 8 func,func 2 100.00 Using where; Full scan on NULL key
3 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used
Warnings:
-Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` where !<expr_cache><`test`.`t1`.`a`,`test`.`t1`.`b`>(<in_optimizer>((`test`.`t1`.`a`,`test`.`t1`.`b`),(`test`.`t1`.`a`,`test`.`t1`.`b`) in ( <materialize> (/* select#2 */ select `tvc_0`.`_col_1`,`tvc_0`.`_col_2` from (values (1,2),(8,9),(5,1)) `tvc_0` ), <primary_index_lookup>(`test`.`t1`.`a` in <temporary table> on distinct_key where `test`.`t1`.`a` = `<subquery2>`.`_col_1` and `test`.`t1`.`b` = `<subquery2>`.`_col_2`))))
+Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` where !<expr_cache><`test`.`t1`.`a`,`test`.`t1`.`b`>(<in_optimizer>((`test`.`t1`.`a`,`test`.`t1`.`b`),<exists>(<index_lookup>(<cache>(`test`.`t1`.`a`) in (temporary) on key0 where trigcond(<cache>(`test`.`t1`.`a`) = `tvc_0`.`_col_1`) and trigcond(<cache>(`test`.`t1`.`b`) = `tvc_0`.`_col_2`)))))
explain extended select * from t1
where (a,b) not in (select * from (values (1,2),(8,9), (5,1)) as tvc_0);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 6 100.00 Using where
-2 MATERIALIZED <derived3> ALL NULL NULL NULL NULL 3 100.00
+2 DEPENDENT SUBQUERY <derived3> index_subquery key0 key0 8 func,func 2 100.00 Using where; Full scan on NULL key
3 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used
Warnings:
-Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` where !<expr_cache><`test`.`t1`.`a`,`test`.`t1`.`b`>(<in_optimizer>((`test`.`t1`.`a`,`test`.`t1`.`b`),(`test`.`t1`.`a`,`test`.`t1`.`b`) in ( <materialize> (/* select#2 */ select `tvc_0`.`1`,`tvc_0`.`2` from (values (1,2),(8,9),(5,1)) `tvc_0` ), <primary_index_lookup>(`test`.`t1`.`a` in <temporary table> on distinct_key where `test`.`t1`.`a` = `<subquery2>`.`1` and `test`.`t1`.`b` = `<subquery2>`.`2`))))
+Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` where !<expr_cache><`test`.`t1`.`a`,`test`.`t1`.`b`>(<in_optimizer>((`test`.`t1`.`a`,`test`.`t1`.`b`),<exists>(<index_lookup>(<cache>(`test`.`t1`.`a`) in (temporary) on key0 where trigcond(<cache>(`test`.`t1`.`a`) = `tvc_0`.`1`) and trigcond(<cache>(`test`.`t1`.`b`) = `tvc_0`.`2`)))))
select * from t1
where b < 7 and (a,b) not in ((1,2),(8,9), (5,1));
a b
@@ -590,10 +590,10 @@ explain extended select * from t1
where b < 7 and (a,b) not in ((1,2),(8,9), (5,1));
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 6 100.00 Using where
-2 MATERIALIZED <derived3> ALL NULL NULL NULL NULL 3 100.00
+2 DEPENDENT SUBQUERY <derived3> index_subquery key0 key0 8 func,func 2 100.00 Using where; Full scan on NULL key
3 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used
Warnings:
-Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` where `test`.`t1`.`b` < 7 and !<expr_cache><`test`.`t1`.`a`,`test`.`t1`.`b`>(<in_optimizer>((`test`.`t1`.`a`,`test`.`t1`.`b`),(`test`.`t1`.`a`,`test`.`t1`.`b`) in ( <materialize> (/* select#2 */ select `tvc_0`.`_col_1`,`tvc_0`.`_col_2` from (values (1,2),(8,9),(5,1)) `tvc_0` ), <primary_index_lookup>(`test`.`t1`.`a` in <temporary table> on distinct_key where `test`.`t1`.`a` = `<subquery2>`.`_col_1` and `test`.`t1`.`b` = `<subquery2>`.`_col_2`))))
+Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` where `test`.`t1`.`b` < 7 and !<expr_cache><`test`.`t1`.`a`,`test`.`t1`.`b`>(<in_optimizer>((`test`.`t1`.`a`,`test`.`t1`.`b`),<exists>(<index_lookup>(<cache>(`test`.`t1`.`a`) in (temporary) on key0 where trigcond(<cache>(`test`.`t1`.`a`) = `tvc_0`.`_col_1`) and trigcond(<cache>(`test`.`t1`.`b`) = `tvc_0`.`_col_2`)))))
select * from t2
where (a,c) not in ((1,2),(8,9), (5,1));
a b c
@@ -606,10 +606,10 @@ explain extended select * from t2
where (a,c) not in ((1,2),(8,9), (5,1));
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t2 ALL NULL NULL NULL NULL 6 100.00 Using where
-2 MATERIALIZED <derived3> ALL NULL NULL NULL NULL 3 100.00
+2 DEPENDENT SUBQUERY <derived3> index_subquery key0 key0 8 func,func 2 100.00 Using where; Full scan on NULL key
3 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used
Warnings:
-Note 1003 /* select#1 */ select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c` from `test`.`t2` where !<expr_cache><`test`.`t2`.`a`,`test`.`t2`.`c`>(<in_optimizer>((`test`.`t2`.`a`,`test`.`t2`.`c`),(`test`.`t2`.`a`,`test`.`t2`.`c`) in ( <materialize> (/* select#2 */ select `tvc_0`.`_col_1`,`tvc_0`.`_col_2` from (values (1,2),(8,9),(5,1)) `tvc_0` ), <primary_index_lookup>(`test`.`t2`.`a` in <temporary table> on distinct_key where `test`.`t2`.`a` = `<subquery2>`.`_col_1` and `test`.`t2`.`c` = `<subquery2>`.`_col_2`))))
+Note 1003 /* select#1 */ select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c` from `test`.`t2` where !<expr_cache><`test`.`t2`.`a`,`test`.`t2`.`c`>(<in_optimizer>((`test`.`t2`.`a`,`test`.`t2`.`c`),<exists>(<index_lookup>(<cache>(`test`.`t2`.`a`) in (temporary) on key0 where trigcond(<cache>(`test`.`t2`.`a`) = `tvc_0`.`_col_1`) and trigcond(<cache>(`test`.`t2`.`c`) = `tvc_0`.`_col_2`)))))
drop table t1, t2, t3;
set @@in_predicate_conversion_threshold= default;
#
diff --git a/mysql-test/main/order_by.result b/mysql-test/main/order_by.result
index 129bd8928f2..dc29859c112 100644
--- a/mysql-test/main/order_by.result
+++ b/mysql-test/main/order_by.result
@@ -1193,7 +1193,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 index k2 k3 5 NULL 111 Using where
EXPLAIN SELECT id,c3 FROM t2 WHERE c2=11 ORDER BY c3 LIMIT 4000;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 ref k2 k2 5 const 7341 Using where; Using filesort
+1 SIMPLE t2 index k2 k3 5 NULL 22318 Using where
EXPLAIN SELECT id,c3 FROM t2 WHERE c2 BETWEEN 10 AND 12 ORDER BY c3 LIMIT 20;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 index k2 k3 5 NULL 73 Using where
@@ -3120,7 +3120,7 @@ id select_type table type possible_keys key key_len ref rows Extra
# See above query
EXPLAIN SELECT id1 FROM t2 WHERE id2=1 AND id3=1 ORDER BY date DESC LIMIT 0,4;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 ref id_23_date,id_234_date id_23_date 2 const,const 8 Using where
+1 SIMPLE t2 range id_23_date,id_234_date id_23_date 2 NULL 8 Using where
drop table t1,t2;
#
# MDEV-8989: ORDER BY optimizer ignores equality propagation
@@ -3409,16 +3409,17 @@ ANALYZE
"r_total_time_ms": "REPLACED",
"r_limit": 5,
"r_used_priority_queue": false,
- "r_output_rows": 35,
- "r_sort_passes": 1,
+ "r_output_rows": 100,
"r_buffer_size": "REPLACED",
+ "r_sort_mode": "sort_key,packed_addon_fields",
"table": {
"table_name": "t1",
"access_type": "ALL",
"r_loops": 1,
"rows": 100,
"r_rows": 100,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100
}
@@ -3658,3 +3659,642 @@ set histogram_size=@tmp_h, histogram_type=@tmp_ht, use_stat_tables=@tmp_u,
optimizer_use_condition_selectivity=@tmp_o;
drop table t1,t2,t3,t4;
# End of 10.4 tests
+#
+# MDEV-21655: Server crashes in my_qsort2 / Filesort_buffer::sort_buffer
+#
+set @save_sql_mode= @@sql_mode;
+set sql_mode= 'PAD_CHAR_TO_FULL_LENGTH';
+CREATE TABLE t1 ( a CHAR(255), b CHAR(255), c TEXT);
+INSERT INTO t1 VALUES
+('1','a', 'a'), ('2','b', 'b'), ('3','c', 'c'), ('4','d','d'),
+('5','e', 'e'), ('6','f', 'f'), ('7','g','g'), ('8','h','h'),
+('9','i', 'i'), ('10','j','j'), ('11','k','k'), ('12','l','l'),
+('13','m','m'), ('14','n','n'), ('15','o','o');
+set sort_buffer_size=524*15;
+select c from t1 order by a,b;
+c
+a
+j
+k
+l
+m
+n
+o
+b
+c
+d
+e
+f
+g
+h
+i
+set sort_buffer_size= default;
+set sql_mode= @save_sql_mode;
+drop table t1;
+#
+# MDEV-21580: Allow packed sort keys in sort buffer
+#
+#
+# This example should not pack sort keys
+# all fields are fixed-size fields in the ORDER BY clause
+#
+create table t1 (a bigint, b bigint, c bigint);
+insert into t1 select seq, seq, seq from seq_1_to_100;
+# in r_sort_mode it should show sort_key and not packed_sort_key
+ANALYZE FORMAT=JSON select * from t1 order by a,b,c;
+ANALYZE
+{
+ "query_block": {
+ "select_id": 1,
+ "r_loops": 1,
+ "r_total_time_ms": "REPLACED",
+ "read_sorted_file": {
+ "r_rows": 100,
+ "filesort": {
+ "sort_key": "t1.a, t1.b, t1.c",
+ "r_loops": 1,
+ "r_total_time_ms": "REPLACED",
+ "r_used_priority_queue": false,
+ "r_output_rows": 100,
+ "r_buffer_size": "REPLACED",
+ "r_sort_mode": "sort_key,packed_addon_fields",
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "r_loops": 1,
+ "rows": 100,
+ "r_rows": 100,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 100,
+ "r_filtered": 100
+ }
+ }
+ }
+ }
+}
+select * from t1 order by a,b,c;
+a b c
+1 1 1
+2 2 2
+3 3 3
+4 4 4
+5 5 5
+6 6 6
+7 7 7
+8 8 8
+9 9 9
+10 10 10
+11 11 11
+12 12 12
+13 13 13
+14 14 14
+15 15 15
+16 16 16
+17 17 17
+18 18 18
+19 19 19
+20 20 20
+21 21 21
+22 22 22
+23 23 23
+24 24 24
+25 25 25
+26 26 26
+27 27 27
+28 28 28
+29 29 29
+30 30 30
+31 31 31
+32 32 32
+33 33 33
+34 34 34
+35 35 35
+36 36 36
+37 37 37
+38 38 38
+39 39 39
+40 40 40
+41 41 41
+42 42 42
+43 43 43
+44 44 44
+45 45 45
+46 46 46
+47 47 47
+48 48 48
+49 49 49
+50 50 50
+51 51 51
+52 52 52
+53 53 53
+54 54 54
+55 55 55
+56 56 56
+57 57 57
+58 58 58
+59 59 59
+60 60 60
+61 61 61
+62 62 62
+63 63 63
+64 64 64
+65 65 65
+66 66 66
+67 67 67
+68 68 68
+69 69 69
+70 70 70
+71 71 71
+72 72 72
+73 73 73
+74 74 74
+75 75 75
+76 76 76
+77 77 77
+78 78 78
+79 79 79
+80 80 80
+81 81 81
+82 82 82
+83 83 83
+84 84 84
+85 85 85
+86 86 86
+87 87 87
+88 88 88
+89 89 89
+90 90 90
+91 91 91
+92 92 92
+93 93 93
+94 94 94
+95 95 95
+96 96 96
+97 97 97
+98 98 98
+99 99 99
+100 100 100
+drop table t1;
+#
+# Test with Binary columns (using suffix length to determine ordering)
+# Should show packed_sortkey in the r_sort_mode
+#
+create table t1 (a int, b blob);
+set @save_max_sort_length= @@max_sort_length;
+insert into t1 select 1, CONCAT(repeat('a', @save_max_sort_length), 'A');
+insert into t1 select 2, CONCAT(repeat('a', @save_max_sort_length), 'AB');
+insert into t1 select 3, CONCAT(repeat('a', @save_max_sort_length), 'ABE');
+insert into t1 select 4, CONCAT(repeat('a', @save_max_sort_length), 'APBX');
+insert into t1 select 5, CONCAT(repeat('a', @save_max_sort_length), 'ABAAX');
+show variables like '%sort_buffer_size';
+Variable_name Value
+aria_sort_buffer_size 268434432
+myisam_sort_buffer_size 134216704
+sort_buffer_size 262144
+select a, substr(b, @save_max_sort_length+1) from t1 order by b desc;
+a substr(b, @save_max_sort_length+1)
+5 ABAAX
+4 APBX
+3 ABE
+2 AB
+1 A
+analyze format=json
+select a, substr(b, @save_max_sort_length+1) from t1 order by b desc;
+ANALYZE
+{
+ "query_block": {
+ "select_id": 1,
+ "r_loops": 1,
+ "r_total_time_ms": "REPLACED",
+ "read_sorted_file": {
+ "r_rows": 5,
+ "filesort": {
+ "sort_key": "t1.b desc",
+ "r_loops": 1,
+ "r_total_time_ms": "REPLACED",
+ "r_used_priority_queue": false,
+ "r_output_rows": 5,
+ "r_buffer_size": "REPLACED",
+ "r_sort_mode": "packed_sort_key,rowid",
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "r_loops": 1,
+ "rows": 5,
+ "r_rows": 5,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 100,
+ "r_filtered": 100
+ }
+ }
+ }
+ }
+}
+drop table t1;
+#
+# Packing sort keys with complex collations
+#
+create table t1(a varchar(255) charset utf8, b int, c decimal);
+insert into t1 values ('abc', 1, 1) , ('bcd', 2, 2), ('cde',3, 3);
+insert into t1 values ('def', 4, 4) , ('efg', 5, 5), ('fgh', 6, 6);
+#
+# Should show packed_sortkey in the r_sort_mode
+#
+ANALYZE FORMAT=JSON select a, b, c from t1 order by a, b;
+ANALYZE
+{
+ "query_block": {
+ "select_id": 1,
+ "r_loops": 1,
+ "r_total_time_ms": "REPLACED",
+ "read_sorted_file": {
+ "r_rows": 6,
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "r_loops": 1,
+ "r_total_time_ms": "REPLACED",
+ "r_used_priority_queue": false,
+ "r_output_rows": 6,
+ "r_buffer_size": "REPLACED",
+ "r_sort_mode": "packed_sort_key,rowid",
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "r_loops": 1,
+ "rows": 6,
+ "r_rows": 6,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 100,
+ "r_filtered": 100
+ }
+ }
+ }
+ }
+}
+select a, b, c from t1 order by a, b;
+a b c
+abc 1 1
+bcd 2 2
+cde 3 3
+def 4 4
+efg 5 5
+fgh 6 6
+set @save_max_sort_length= @@max_sort_length;
+set max_sort_length=5;
+Warnings:
+Warning 1292 Truncated incorrect max_sort_length value: '5'
+#
+# should show sortkey in r_sort_mode as the collation is complex and
+# truncation is not possible
+#
+ANALYZE FORMAT=JSON select a, b, c from t1 order by a, b;
+ANALYZE
+{
+ "query_block": {
+ "select_id": 1,
+ "r_loops": 1,
+ "r_total_time_ms": "REPLACED",
+ "read_sorted_file": {
+ "r_rows": 6,
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "r_loops": 1,
+ "r_total_time_ms": "REPLACED",
+ "r_used_priority_queue": false,
+ "r_output_rows": 6,
+ "r_buffer_size": "REPLACED",
+ "r_sort_mode": "sort_key,packed_addon_fields",
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "r_loops": 1,
+ "rows": 6,
+ "r_rows": 6,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 100,
+ "r_filtered": 100
+ }
+ }
+ }
+ }
+}
+select a, b, c from t1 order by a, b;
+a b c
+abc 1 1
+bcd 2 2
+cde 3 3
+def 4 4
+efg 5 5
+fgh 6 6
+set max_sort_length= @save_max_sort_length;
+drop table t1;
+#
+# MDEV-21922: Allow packing addon fields even if they don't honour max_length_for_sort_data
+#
+create table t1 (a varchar(200) character set utf8, b int);
+insert into t1 select seq, seq from seq_1_to_10;
+select * from t1 order by a;
+a b
+1 1
+10 10
+2 2
+3 3
+4 4
+5 5
+6 6
+7 7
+8 8
+9 9
+#
+# r_sort_mode should show both packed_sort_key and packed_addon_fields
+#
+analyze format=json select * from t1 order by a;
+ANALYZE
+{
+ "query_block": {
+ "select_id": 1,
+ "r_loops": 1,
+ "r_total_time_ms": "REPLACED",
+ "read_sorted_file": {
+ "r_rows": 10,
+ "filesort": {
+ "sort_key": "t1.a",
+ "r_loops": 1,
+ "r_total_time_ms": "REPLACED",
+ "r_used_priority_queue": false,
+ "r_output_rows": 10,
+ "r_buffer_size": "REPLACED",
+ "r_sort_mode": "packed_sort_key,packed_addon_fields",
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "r_loops": 1,
+ "rows": 10,
+ "r_rows": 10,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 100,
+ "r_filtered": 100
+ }
+ }
+ }
+ }
+}
+drop table t1;
+#
+# MDEV-21946: Server crash in store_length upon GROUP BY WITH ROLLUP with geometry field
+#
+create table t1 ( a longblob);
+insert into t1 select repeat('a', 256);
+insert into t1 select repeat('b', 256);
+insert into t1 select repeat('c', 256);
+insert into t1 select repeat('d', 256);
+SELECT IF( 0, NULL, a ) AS f FROM t1 GROUP BY f WITH ROLLUP;
+f
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
+cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
+dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
+NULL
+DROP TABLE t1;
+#
+# MDEV-22303: Incorrect ordering with REGEXP_REPLACE and OFFSET/LIMIT
+#
+CREATE TABLE t1 (name VARCHAR(20) CHARACTER SET utf8 NOT NULL);
+INSERT INTO t1 (name) VALUES ('Charles Dickens'), ('Roald Dahl');
+SELECT name, REGEXP_REPLACE(name, '^(.*) (.*)$', '\\2, \\1') AS surname_first FROM t1
+ORDER BY surname_first ASC;
+name surname_first
+Roald Dahl Dahl, Roald
+Charles Dickens Dickens, Charles
+SELECT name, REGEXP_REPLACE(name, '^(.*) (.*)$', '\\2, \\1') AS surname_first FROM t1
+ORDER BY surname_first ASC LIMIT 1;
+name surname_first
+Roald Dahl Dahl, Roald
+SELECT name, REGEXP_REPLACE(name, '^(.*) (.*)$', '\\2, \\1') AS surname_first FROM t1
+ORDER BY surname_first ASC LIMIT 1 OFFSET 1;
+name surname_first
+Charles Dickens Dickens, Charles
+DROP TABLE t1;
+#
+# MDEV-22836: Server crashes in err_conv / ErrBuff::set_str
+#
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (0),(1);
+SELECT * FROM t1 ORDER BY CONVERT(AES_ENCRYPT(1,a), CHAR(4));
+a
+1
+0
+DROP TABLE t1;
+#
+# MDEV-22819:Wrong result or Assertion `ix > 0' failed in read_to_buffer upon select
+# with GROUP BY and GROUP_CONCAT
+#
+CREATE TABLE t1 (a VARCHAR(1000), b CHAR(1));
+INSERT INTO t1 VALUES
+(REPEAT('a',1000),'a'),(REPEAT('t',932),'t'),('x',NULL),('x',NULL),
+(REPEAT('z',298),'z'),(REPEAT('p',1000),'p'),(REPEAT('k',468),'k'),
+(REPEAT('c',1000),'c'),(REPEAT('o',648),'o'),('x',NULL),('x',NULL),
+(REPEAT('c',258),'c'),(REPEAT('t',414),'t'),(REPEAT('f',966),'f'),
+(REPEAT('y',746),'y'),(REPEAT('f',1000),'f');
+INSERT INTO t1 SELECT * FROM t1;
+INSERT INTO t1 SELECT * FROM t1;
+INSERT INTO t1 SELECT * FROM t1;
+INSERT INTO t1 SELECT * FROM t1;
+SET @save_sort_buffer_size= @@sort_buffer_size;
+SET sort_buffer_size= 16384;
+SELECT LEFT(a,1), GROUP_CONCAT(b) FROM t1 GROUP BY a;
+LEFT(a,1) GROUP_CONCAT(b)
+a a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a
+c c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c
+c c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c
+f f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f
+f f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f
+k k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k
+o o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o
+p p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p
+t t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t
+t t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t
+x NULL
+y y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y
+z z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z
+SELECT SUBSTR(a,1,1), LENGTH(a), GROUP_CONCAT(b), COUNT(*) FROM t1 GROUP BY a;
+SUBSTR(a,1,1) LENGTH(a) GROUP_CONCAT(b) COUNT(*)
+a 1000 a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a 16
+c 258 c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c 16
+c 1000 c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c 16
+f 966 f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f 16
+f 1000 f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f 16
+k 468 k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k 16
+o 648 o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o 16
+p 1000 p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p 16
+t 414 t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t 16
+t 932 t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t 16
+x 1 NULL 64
+y 746 y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y 16
+z 298 z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z 16
+SET @@sort_buffer_size= @save_sort_buffer_size;
+DROP TABLE t1;
+CREATE TABLE t1(a VARCHAR(1027), b INT);
+INSERT INTO t1 SELECT seq, seq from seq_1_to_34;
+SET @save_tmp_memory_table_size= @@tmp_memory_table_size;
+SET tmp_memory_table_size= 1056*2;
+SELECT COUNT(DISTINCT a) FROM t1;
+COUNT(DISTINCT a)
+34
+SET @@tmp_memory_table_size= @save_tmp_memory_table_size;
+DROP TABLE t1;
+#
+# MDEV-23216: LONGTEXT column with collation doesn't sort
+#
+CREATE TABLE t1 (a LONGTEXT COLLATE utf8mb4_swedish_ci);
+INSERT INTO t1 VALUES ('A'),('Z'),('B'),('Y');
+SELECT * FROM t1 ORDER BY a;
+a
+A
+B
+Y
+Z
+SELECT * FROM t1 ORDER BY a DESC;
+a
+Z
+Y
+B
+A
+DROP TABLE t1;
+#
+# MDEV-23414 Assertion `res->charset() == item->collation.collation' failed in Type_handler_string_result::make_packed_sort_key_part
+#
+CREATE TABLE t1 (a CHAR(3), b BINARY(255));
+INSERT t1 VALUES ('foo','bar'),('baz','qux');
+SELECT COALESCE(a, b) AS f FROM t1 ORDER BY f;
+f
+baz
+foo
+DROP TABLE t1;
+#
+# MDEV-24015: SQL Error (1038): Out of sort memory when enough memory for the
+# sort buffer is provided
+#
+CREATE TABLE t1 (a VARCHAR(100), b INT);
+CREATE TABLE t2 (a VARCHAR(100), b INT);
+INSERT INTO t1 SELECT 'abc', seq FROM seq_1_to_50;
+INSERT INTO t2 SELECT seq, seq FROM seq_1_to_50;
+set @save_sort_buffer_size= @@sort_buffer_size;
+set sort_buffer_size=2000;
+ANALYZE FORMAT=JSON
+SELECT (SELECT sum(t2.b) FROM t2 WHERE t1.b=t2.b GROUP BY t2.a) FROM t1;
+ANALYZE
+{
+ "query_block": {
+ "select_id": 1,
+ "r_loops": 1,
+ "r_total_time_ms": "REPLACED",
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "r_loops": 1,
+ "rows": 50,
+ "r_rows": 50,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 100,
+ "r_filtered": 100
+ },
+ "subqueries": [
+ {
+ "expression_cache": {
+ "r_loops": 50,
+ "r_hit_ratio": 0,
+ "query_block": {
+ "select_id": 2,
+ "r_loops": 50,
+ "r_total_time_ms": "REPLACED",
+ "filesort": {
+ "sort_key": "t2.a",
+ "r_loops": 50,
+ "r_total_time_ms": "REPLACED",
+ "r_used_priority_queue": false,
+ "r_output_rows": 1,
+ "r_buffer_size": "REPLACED" across executions)",
+ "r_sort_mode": "sort_key,rowid",
+ "temporary_table": {
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "r_loops": 50,
+ "rows": 50,
+ "r_rows": 50,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 100,
+ "r_filtered": 2,
+ "attached_condition": "t1.b = t2.b"
+ }
+ }
+ }
+ }
+ }
+ }
+ ]
+ }
+}
+SELECT (SELECT sum(t2.b) FROM t2 WHERE t1.b=t2.b GROUP BY t2.a) FROM t1;
+(SELECT sum(t2.b) FROM t2 WHERE t1.b=t2.b GROUP BY t2.a)
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+set sort_buffer_size= @save_sort_buffer_size;
+DROP TABLE t1,t2;
+# End of 10.5 tests
diff --git a/mysql-test/main/order_by.test b/mysql-test/main/order_by.test
index 0bf0311a642..4cdd8d0b1c2 100644
--- a/mysql-test/main/order_by.test
+++ b/mysql-test/main/order_by.test
@@ -9,6 +9,7 @@ drop table if exists t1,t2,t3;
--enable_warnings
call mtr.add_suppression("Out of sort memory; increase server sort buffer size");
+--source include/have_sequence.inc
#
# Test old ORDER BY bug
@@ -2388,3 +2389,228 @@ set histogram_size=@tmp_h, histogram_type=@tmp_ht, use_stat_tables=@tmp_u,
drop table t1,t2,t3,t4;
--echo # End of 10.4 tests
+
+--echo #
+--echo # MDEV-21655: Server crashes in my_qsort2 / Filesort_buffer::sort_buffer
+--echo #
+
+set @save_sql_mode= @@sql_mode;
+set sql_mode= 'PAD_CHAR_TO_FULL_LENGTH';
+CREATE TABLE t1 ( a CHAR(255), b CHAR(255), c TEXT);
+INSERT INTO t1 VALUES
+('1','a', 'a'), ('2','b', 'b'), ('3','c', 'c'), ('4','d','d'),
+('5','e', 'e'), ('6','f', 'f'), ('7','g','g'), ('8','h','h'),
+('9','i', 'i'), ('10','j','j'), ('11','k','k'), ('12','l','l'),
+('13','m','m'), ('14','n','n'), ('15','o','o');
+
+set sort_buffer_size=524*15;
+select c from t1 order by a,b;
+set sort_buffer_size= default;
+set sql_mode= @save_sql_mode;
+drop table t1;
+
+--echo #
+--echo # MDEV-21580: Allow packed sort keys in sort buffer
+--echo #
+
+--echo #
+--echo # This example should not pack sort keys
+--echo # all fields are fixed-size fields in the ORDER BY clause
+--echo #
+
+create table t1 (a bigint, b bigint, c bigint);
+insert into t1 select seq, seq, seq from seq_1_to_100;
+
+--echo # in r_sort_mode it should show sort_key and not packed_sort_key
+--source include/analyze-format.inc
+ANALYZE FORMAT=JSON select * from t1 order by a,b,c;
+select * from t1 order by a,b,c;
+
+drop table t1;
+
+--echo #
+--echo # Test with Binary columns (using suffix length to determine ordering)
+--echo # Should show packed_sortkey in the r_sort_mode
+--echo #
+
+create table t1 (a int, b blob);
+
+set @save_max_sort_length= @@max_sort_length;
+insert into t1 select 1, CONCAT(repeat('a', @save_max_sort_length), 'A');
+insert into t1 select 2, CONCAT(repeat('a', @save_max_sort_length), 'AB');
+insert into t1 select 3, CONCAT(repeat('a', @save_max_sort_length), 'ABE');
+insert into t1 select 4, CONCAT(repeat('a', @save_max_sort_length), 'APBX');
+insert into t1 select 5, CONCAT(repeat('a', @save_max_sort_length), 'ABAAX');
+
+show variables like '%sort_buffer_size';
+
+select a, substr(b, @save_max_sort_length+1) from t1 order by b desc;
+--source include/analyze-format.inc
+analyze format=json
+select a, substr(b, @save_max_sort_length+1) from t1 order by b desc;
+
+drop table t1;
+
+--echo #
+--echo # Packing sort keys with complex collations
+--echo #
+
+create table t1(a varchar(255) charset utf8, b int, c decimal);
+insert into t1 values ('abc', 1, 1) , ('bcd', 2, 2), ('cde',3, 3);
+insert into t1 values ('def', 4, 4) , ('efg', 5, 5), ('fgh', 6, 6);
+
+--echo #
+--echo # Should show packed_sortkey in the r_sort_mode
+--echo #
+
+--source include/analyze-format.inc
+ANALYZE FORMAT=JSON select a, b, c from t1 order by a, b;
+select a, b, c from t1 order by a, b;
+
+set @save_max_sort_length= @@max_sort_length;
+set max_sort_length=5;
+
+--echo #
+--echo # should show sortkey in r_sort_mode as the collation is complex and
+--echo # truncation is not possible
+--echo #
+
+--source include/analyze-format.inc
+ANALYZE FORMAT=JSON select a, b, c from t1 order by a, b;
+select a, b, c from t1 order by a, b;
+
+set max_sort_length= @save_max_sort_length;
+
+drop table t1;
+
+--echo #
+--echo # MDEV-21922: Allow packing addon fields even if they don't honour max_length_for_sort_data
+--echo #
+
+create table t1 (a varchar(200) character set utf8, b int);
+insert into t1 select seq, seq from seq_1_to_10;
+select * from t1 order by a;
+--echo #
+--echo # r_sort_mode should show both packed_sort_key and packed_addon_fields
+--echo #
+--source include/analyze-format.inc
+analyze format=json select * from t1 order by a;
+drop table t1;
+
+--echo #
+--echo # MDEV-21946: Server crash in store_length upon GROUP BY WITH ROLLUP with geometry field
+--echo #
+
+create table t1 ( a longblob);
+insert into t1 select repeat('a', 256);
+insert into t1 select repeat('b', 256);
+insert into t1 select repeat('c', 256);
+insert into t1 select repeat('d', 256);
+
+SELECT IF( 0, NULL, a ) AS f FROM t1 GROUP BY f WITH ROLLUP;
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-22303: Incorrect ordering with REGEXP_REPLACE and OFFSET/LIMIT
+--echo #
+
+CREATE TABLE t1 (name VARCHAR(20) CHARACTER SET utf8 NOT NULL);
+INSERT INTO t1 (name) VALUES ('Charles Dickens'), ('Roald Dahl');
+
+SELECT name, REGEXP_REPLACE(name, '^(.*) (.*)$', '\\2, \\1') AS surname_first FROM t1
+ORDER BY surname_first ASC;
+
+SELECT name, REGEXP_REPLACE(name, '^(.*) (.*)$', '\\2, \\1') AS surname_first FROM t1
+ORDER BY surname_first ASC LIMIT 1;
+
+SELECT name, REGEXP_REPLACE(name, '^(.*) (.*)$', '\\2, \\1') AS surname_first FROM t1
+ORDER BY surname_first ASC LIMIT 1 OFFSET 1;
+
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-22836: Server crashes in err_conv / ErrBuff::set_str
+--echo #
+
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (0),(1);
+--disable_warnings
+SELECT * FROM t1 ORDER BY CONVERT(AES_ENCRYPT(1,a), CHAR(4));
+--enable_warnings
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-22819:Wrong result or Assertion `ix > 0' failed in read_to_buffer upon select
+--echo # with GROUP BY and GROUP_CONCAT
+--echo #
+
+CREATE TABLE t1 (a VARCHAR(1000), b CHAR(1));
+
+INSERT INTO t1 VALUES
+ (REPEAT('a',1000),'a'),(REPEAT('t',932),'t'),('x',NULL),('x',NULL),
+ (REPEAT('z',298),'z'),(REPEAT('p',1000),'p'),(REPEAT('k',468),'k'),
+ (REPEAT('c',1000),'c'),(REPEAT('o',648),'o'),('x',NULL),('x',NULL),
+ (REPEAT('c',258),'c'),(REPEAT('t',414),'t'),(REPEAT('f',966),'f'),
+ (REPEAT('y',746),'y'),(REPEAT('f',1000),'f');
+
+INSERT INTO t1 SELECT * FROM t1;
+INSERT INTO t1 SELECT * FROM t1;
+INSERT INTO t1 SELECT * FROM t1;
+INSERT INTO t1 SELECT * FROM t1;
+
+SET @save_sort_buffer_size= @@sort_buffer_size;
+SET sort_buffer_size= 16384;
+SELECT LEFT(a,1), GROUP_CONCAT(b) FROM t1 GROUP BY a;
+SELECT SUBSTR(a,1,1), LENGTH(a), GROUP_CONCAT(b), COUNT(*) FROM t1 GROUP BY a;
+
+SET @@sort_buffer_size= @save_sort_buffer_size;
+DROP TABLE t1;
+
+CREATE TABLE t1(a VARCHAR(1027), b INT);
+INSERT INTO t1 SELECT seq, seq from seq_1_to_34;
+SET @save_tmp_memory_table_size= @@tmp_memory_table_size;
+SET tmp_memory_table_size= 1056*2;
+SELECT COUNT(DISTINCT a) FROM t1;
+SET @@tmp_memory_table_size= @save_tmp_memory_table_size;
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-23216: LONGTEXT column with collation doesn't sort
+--echo #
+
+CREATE TABLE t1 (a LONGTEXT COLLATE utf8mb4_swedish_ci);
+INSERT INTO t1 VALUES ('A'),('Z'),('B'),('Y');
+SELECT * FROM t1 ORDER BY a;
+SELECT * FROM t1 ORDER BY a DESC;
+
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-23414 Assertion `res->charset() == item->collation.collation' failed in Type_handler_string_result::make_packed_sort_key_part
+--echo #
+CREATE TABLE t1 (a CHAR(3), b BINARY(255));
+INSERT t1 VALUES ('foo','bar'),('baz','qux');
+SELECT COALESCE(a, b) AS f FROM t1 ORDER BY f;
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-24015: SQL Error (1038): Out of sort memory when enough memory for the
+--echo # sort buffer is provided
+--echo #
+
+CREATE TABLE t1 (a VARCHAR(100), b INT);
+CREATE TABLE t2 (a VARCHAR(100), b INT);
+
+INSERT INTO t1 SELECT 'abc', seq FROM seq_1_to_50;
+INSERT INTO t2 SELECT seq, seq FROM seq_1_to_50;
+
+set @save_sort_buffer_size= @@sort_buffer_size;
+set sort_buffer_size=2000;
+--source include/analyze-format.inc
+ANALYZE FORMAT=JSON
+SELECT (SELECT sum(t2.b) FROM t2 WHERE t1.b=t2.b GROUP BY t2.a) FROM t1;
+SELECT (SELECT sum(t2.b) FROM t2 WHERE t1.b=t2.b GROUP BY t2.a) FROM t1;
+
+set sort_buffer_size= @save_sort_buffer_size;
+DROP TABLE t1,t2;
+--echo # End of 10.5 tests
diff --git a/mysql-test/main/order_by_pack_big.result b/mysql-test/main/order_by_pack_big.result
new file mode 100644
index 00000000000..a7cf2436bcc
--- /dev/null
+++ b/mysql-test/main/order_by_pack_big.result
@@ -0,0 +1,499 @@
+set @save_rand_seed1= @@RAND_SEED1;
+set @save_rand_seed2= @@RAND_SEED2;
+set @@RAND_SEED1=810763568, @@RAND_SEED2=600681772;
+create table t1(a int);
+insert into t1 select seq from seq_1_to_10000 order by rand(),seq;
+#
+# parameters:
+# mean mean for the column to be considered
+# max_val max_value for the column to be considered
+#
+# This function generate a sample of a normal distribution
+# This function return a point
+# of the normal distribution with a given mean.
+#
+CREATE FUNCTION
+generate_normal_distribution_sample(mean DOUBLE, max_val DOUBLE)RETURNS DOUBLE
+BEGIN
+DECLARE z DOUBLE DEFAULT 0;
+SET z= (rand() + rand() + rand() + rand() + rand() + rand())/6;
+SET z= 2*(max_val-mean)*z;
+SET z= z + mean - (max_val-mean);
+return z;
+END|
+#
+# parameters:
+# len length of the random string to be generated
+#
+# This function generates a random string for the length passed
+# as an argument with characters in the range of [A,Z]
+#
+CREATE FUNCTION generate_random_string(len INT) RETURNS varchar(128)
+BEGIN
+DECLARE str VARCHAR(256) DEFAULT '';
+DECLARE x INT DEFAULT 0;
+WHILE (len > 0) DO
+SET x =round(rand()*25);
+SET str= CONCAT(str, CHAR(65 + x));
+SET len= len-1;
+END WHILE;
+RETURN str;
+END|
+#
+# parameters:
+# mean mean for the column to be considered
+# min_val min_value for the column to be considered
+# max_val max_value for the column to be considered
+#
+# This function generate a normal distribution sample in the range of
+# [min_val, max_val]
+#
+CREATE FUNCTION
+clipped_normal_distribution(mean DOUBLE, min_val DOUBLE, max_val DOUBLE)
+RETURNS INT
+BEGIN
+DECLARE r DOUBLE DEFAULT 0;
+WHILE 1=1 DO
+set r= generate_normal_distribution_sample(mean, max_val);
+IF (r >= min_val AND r <= max_val) THEN
+RETURN round(r);
+end if;
+END WHILE;
+RETURN 0;
+END|
+create table t2 (id INT NOT NULL, a INT, b int);
+insert into t2
+select a, clipped_normal_distribution(12, 0, 64),
+clipped_normal_distribution(32, 0, 128)
+from t1;
+CREATE TABLE t3(
+id INT NOT NULL,
+names VARCHAR(64),
+address VARCHAR(128),
+PRIMARY KEY (id)
+);
+#
+# table t3 stores random strings calculated from the length stored in
+# table t2
+#
+insert into t3
+select id, generate_random_string(a), generate_random_string(b) from t2;
+#
+# All records fit in memory
+#
+set sort_buffer_size=262144*10;
+analyze format=json select id DIV 100 as x,
+MD5(group_concat(substring(names,1,3), substring(address,1,3)
+order by id))
+FROM t3
+GROUP BY x;
+ANALYZE
+{
+ "query_block": {
+ "select_id": 1,
+ "r_loops": 1,
+ "r_total_time_ms": "REPLACED",
+ "read_sorted_file": {
+ "r_rows": 10000,
+ "filesort": {
+ "sort_key": "t3.`id` DIV 100",
+ "r_loops": 1,
+ "r_total_time_ms": "REPLACED",
+ "r_used_priority_queue": false,
+ "r_output_rows": 10000,
+ "r_buffer_size": "REPLACED",
+ "r_sort_mode": "sort_key,packed_addon_fields",
+ "table": {
+ "table_name": "t3",
+ "access_type": "ALL",
+ "r_loops": 1,
+ "rows": 10000,
+ "r_rows": 10000,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 100,
+ "r_filtered": 100
+ }
+ }
+ }
+ }
+}
+flush status;
+select id DIV 100 as x,
+MD5(group_concat(substring(names,1,3), substring(address,1,3)
+order by id))
+FROM t3
+GROUP BY x;
+x MD5(group_concat(substring(names,1,3), substring(address,1,3)
+order by id))
+0 3d24cb0237caf81aa74a2dddf367ac23
+1 618f9b8b6cefaa268dcb5477eece5e90
+2 fbfe93cc7713f852852f66e578d999aa
+3 34802712af9c95664f41e789d19fb6e7
+4 2d9a4d628013b45cea5301143ec559c5
+5 324b8e682ad2233498f36979fddddf30
+6 31ccc1ab69c00dcade71f7fda2fad599
+7 e059e0279a5654a1c5f6596d220691bf
+8 a21e5021cfb19be280f7fa2c2e70608e
+9 6230b389a5bb0f9cd464b839e8824d0d
+10 f2db66b6c4ad49e406f965a80ff5d224
+11 75f39127d968cad28d30707889191d81
+12 2e75191c0f32966a9e7675d0ddcf1c1c
+13 808b4ecabb9cbb40ff3549c81b21d2f5
+14 c7c0c0bbf0ab7558793a86eaca714a3f
+15 3065d81035dc9c596bc235ab553f92de
+16 13b1b17e93649fe49d6da356c2072c63
+17 e3ce0af10608e6467ba4d38b135ff873
+18 0f172b310ad772e13630b647e09ef79a
+19 26bbfb77888fa151215fe8ff75e448e7
+20 fcd6d5113e8178766dc370b470eb053a
+21 d3860a17be6da02e17432f2ff80a261f
+22 1d0cb7cd3f54c15bd41491e6fa449f12
+23 15f95be2574a94677fa7e76ead23e025
+24 924abdbb21c79cc7fd11d4d5b87ac339
+25 7493978704b5223a4f5dc6d8beb51d90
+26 f4ac4696b05577ba4a05334cd131cf94
+27 cfd45d4915f342978fb6982a825f6cc2
+28 2bd8981c6245c32ea1dc27ef394df94e
+29 0e47838fe4be239939424fcef1289002
+30 18e291b42da10b04434bdad010a5b66c
+31 cbd1bf2554378ef7edd9087d4a8562d4
+32 ddb1e7282bb637f7fe3aa3aed149b482
+33 1963f2400c8870d67f99c391bc5040c2
+34 d2b44d3c13a7a2c83de840892a370f47
+35 7ff20517acf5ea901757262eae1edf5e
+36 685fbfc47faad4243944d7331a2dee36
+37 9d58b82b5f9d369a16c4f2bcc424b412
+38 be15aa080dda65c9489892c34a330c30
+39 4b52ddf7b599c9a00d094008a464c18c
+40 441b03789e58aec883138d9c657a005e
+41 e76cc7b1cadcb4f31e0232a0a8458620
+42 3581a040fbf210f6942fe591621f0e41
+43 acc552d3cba6a900054093c3c6876fc5
+44 fd7fa7a0a4a58485a1aa30e804f024af
+45 56afedd4f2e8101fbb4402051e9857e8
+46 019e4178eccbdd84150f196668e40888
+47 132c8e314dd7c9064e1cb4980856531c
+48 dcc08184bf2f7cfb640af0c603ff7506
+49 691b29183f64480003f8a1a74cd3ac13
+50 105da23f1b4a63d755414beca9df20d5
+51 30b2e973a0186721f9a7720be6be09e5
+52 b307d14c06fd6f27173d683a5596b542
+53 2125a788f107a4ba6a364984f7145156
+54 aa0793982ae401cd2c1bea949d726ae1
+55 e1797ba6b7ecf5f84cda2703f79c878c
+56 78fc3f94127c0d5c6b3fa82ac3a8c167
+57 b8c6d1e26cfd94aade5e32cf89e05da6
+58 1e3481d6ff3b22f6ad739b93afe4c341
+59 59e9d5be4a87ee707578a3a8e5d624e9
+60 7a00e357826e950ffbe688c3f9a99a97
+61 e5a8c0d404f6fb59d9e3dd88b13ba5a7
+62 19d22c20fbf76b5b9ac746679ade26e7
+63 c96f912f54b9b862532ce959398c76ca
+64 86c167171b777a150356f1f083203d24
+65 e1bca8d6cc1904a919cce1090e62f34d
+66 f5dd3f6267376875239222dbefac87b1
+67 d6a2aa26124dd42a9df9fa21b7eb8bce
+68 ecd36ba9a56f89d4bf6fa83c2b800985
+69 87b64475fd3f4db6dd68a45fb9a825dc
+70 f5f7aa5569558b3e6556c72c9dfc429b
+71 9e1cc67e0c13d00c771b6bed2fd566cf
+72 3a6e7c6ce76a04fa2503d094121d84d5
+73 5fd8ba2dd8d36814d06a1d278002e437
+74 10db883700dde7289eb640df3a6d6676
+75 3ebd59ed119d6dfda3eedc5bf05fd425
+76 5008d3ce585f3b2dda2b313c57ebcb0a
+77 ac7cee33e39827de02acedb7584acae5
+78 3f440facefbd95f905942c75bfe60bbb
+79 89639b3145c988c775d9d997c9d356ff
+80 a6f8b29a83b2305188c241f2724ea998
+81 d79f9bd47505cee69627e8044f7745c2
+82 5f8d8b55bc9d5b44f817ada0b9bab2f7
+83 411a99ef2e2af45640f0224274979fb5
+84 60706cd1eb7dffae3d7a34133c5cb67e
+85 272a5d09070b5a0569fb18e144100f8b
+86 0f969fd16dd186e9eb099213a82fb119
+87 6c48f63ec50e26ba42d8ca074daee9a6
+88 83512539cc5a2561426564590d307a58
+89 c57cf49bbeaa12aaba2106278681c9cd
+90 d248507181561f0aba09182c4326fb11
+91 a1e153dd8bb1334bccd73890fafc5ba9
+92 d7a0ba2d1241a07abf3691074cecff76
+93 466034794d577c41a9716bc9eb903ee2
+94 b5e2158feb4290b04a7bdfdec0a17976
+95 8a16a27008d033dd6e9074b042021e60
+96 ccaa12e89f6de3058b3a2baddc4eff00
+97 7fdbf02f369546d0fde2b7db85752e33
+98 63b286bb777298397f3acf03fc3e9deb
+99 b271f751a4952f86b002b9730bd02c8b
+100 cbd5cef546acc0bfa33117d7c1ae58a8
+show status like '%sort%';
+Variable_name Value
+Sort_merge_passes 0
+Sort_priority_queue_sorts 0
+Sort_range 0
+Sort_rows 10000
+Sort_scan 1
+set sort_buffer_size=default;
+#
+# Test for merge_many_buff
+#
+set sort_buffer_size=32768;
+analyze format=json select id DIV 100 as x,
+MD5(group_concat(substring(names,1,3), substring(address,1,3)
+order by id))
+FROM t3
+GROUP BY x;
+ANALYZE
+{
+ "query_block": {
+ "select_id": 1,
+ "r_loops": 1,
+ "r_total_time_ms": "REPLACED",
+ "read_sorted_file": {
+ "r_rows": 10000,
+ "filesort": {
+ "sort_key": "t3.`id` DIV 100",
+ "r_loops": 1,
+ "r_total_time_ms": "REPLACED",
+ "r_used_priority_queue": false,
+ "r_output_rows": 10000,
+ "r_sort_passes": 4,
+ "r_buffer_size": "REPLACED",
+ "r_sort_mode": "sort_key,packed_addon_fields",
+ "table": {
+ "table_name": "t3",
+ "access_type": "ALL",
+ "r_loops": 1,
+ "rows": 10000,
+ "r_rows": 10000,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 100,
+ "r_filtered": 100
+ }
+ }
+ }
+ }
+}
+flush status;
+select id DIV 100 as x,
+MD5(group_concat(substring(names,1,3), substring(address,1,3)
+order by id))
+FROM t3
+GROUP BY x;
+x MD5(group_concat(substring(names,1,3), substring(address,1,3)
+order by id))
+0 3d24cb0237caf81aa74a2dddf367ac23
+1 618f9b8b6cefaa268dcb5477eece5e90
+2 fbfe93cc7713f852852f66e578d999aa
+3 34802712af9c95664f41e789d19fb6e7
+4 2d9a4d628013b45cea5301143ec559c5
+5 324b8e682ad2233498f36979fddddf30
+6 31ccc1ab69c00dcade71f7fda2fad599
+7 e059e0279a5654a1c5f6596d220691bf
+8 a21e5021cfb19be280f7fa2c2e70608e
+9 6230b389a5bb0f9cd464b839e8824d0d
+10 f2db66b6c4ad49e406f965a80ff5d224
+11 75f39127d968cad28d30707889191d81
+12 2e75191c0f32966a9e7675d0ddcf1c1c
+13 808b4ecabb9cbb40ff3549c81b21d2f5
+14 c7c0c0bbf0ab7558793a86eaca714a3f
+15 3065d81035dc9c596bc235ab553f92de
+16 13b1b17e93649fe49d6da356c2072c63
+17 e3ce0af10608e6467ba4d38b135ff873
+18 0f172b310ad772e13630b647e09ef79a
+19 26bbfb77888fa151215fe8ff75e448e7
+20 fcd6d5113e8178766dc370b470eb053a
+21 d3860a17be6da02e17432f2ff80a261f
+22 1d0cb7cd3f54c15bd41491e6fa449f12
+23 15f95be2574a94677fa7e76ead23e025
+24 924abdbb21c79cc7fd11d4d5b87ac339
+25 7493978704b5223a4f5dc6d8beb51d90
+26 f4ac4696b05577ba4a05334cd131cf94
+27 cfd45d4915f342978fb6982a825f6cc2
+28 2bd8981c6245c32ea1dc27ef394df94e
+29 0e47838fe4be239939424fcef1289002
+30 18e291b42da10b04434bdad010a5b66c
+31 cbd1bf2554378ef7edd9087d4a8562d4
+32 ddb1e7282bb637f7fe3aa3aed149b482
+33 1963f2400c8870d67f99c391bc5040c2
+34 d2b44d3c13a7a2c83de840892a370f47
+35 7ff20517acf5ea901757262eae1edf5e
+36 685fbfc47faad4243944d7331a2dee36
+37 9d58b82b5f9d369a16c4f2bcc424b412
+38 be15aa080dda65c9489892c34a330c30
+39 4b52ddf7b599c9a00d094008a464c18c
+40 441b03789e58aec883138d9c657a005e
+41 e76cc7b1cadcb4f31e0232a0a8458620
+42 3581a040fbf210f6942fe591621f0e41
+43 acc552d3cba6a900054093c3c6876fc5
+44 fd7fa7a0a4a58485a1aa30e804f024af
+45 56afedd4f2e8101fbb4402051e9857e8
+46 019e4178eccbdd84150f196668e40888
+47 132c8e314dd7c9064e1cb4980856531c
+48 dcc08184bf2f7cfb640af0c603ff7506
+49 691b29183f64480003f8a1a74cd3ac13
+50 105da23f1b4a63d755414beca9df20d5
+51 30b2e973a0186721f9a7720be6be09e5
+52 b307d14c06fd6f27173d683a5596b542
+53 2125a788f107a4ba6a364984f7145156
+54 aa0793982ae401cd2c1bea949d726ae1
+55 e1797ba6b7ecf5f84cda2703f79c878c
+56 78fc3f94127c0d5c6b3fa82ac3a8c167
+57 b8c6d1e26cfd94aade5e32cf89e05da6
+58 1e3481d6ff3b22f6ad739b93afe4c341
+59 59e9d5be4a87ee707578a3a8e5d624e9
+60 7a00e357826e950ffbe688c3f9a99a97
+61 e5a8c0d404f6fb59d9e3dd88b13ba5a7
+62 19d22c20fbf76b5b9ac746679ade26e7
+63 c96f912f54b9b862532ce959398c76ca
+64 86c167171b777a150356f1f083203d24
+65 e1bca8d6cc1904a919cce1090e62f34d
+66 f5dd3f6267376875239222dbefac87b1
+67 d6a2aa26124dd42a9df9fa21b7eb8bce
+68 ecd36ba9a56f89d4bf6fa83c2b800985
+69 87b64475fd3f4db6dd68a45fb9a825dc
+70 f5f7aa5569558b3e6556c72c9dfc429b
+71 9e1cc67e0c13d00c771b6bed2fd566cf
+72 3a6e7c6ce76a04fa2503d094121d84d5
+73 5fd8ba2dd8d36814d06a1d278002e437
+74 10db883700dde7289eb640df3a6d6676
+75 3ebd59ed119d6dfda3eedc5bf05fd425
+76 5008d3ce585f3b2dda2b313c57ebcb0a
+77 ac7cee33e39827de02acedb7584acae5
+78 3f440facefbd95f905942c75bfe60bbb
+79 89639b3145c988c775d9d997c9d356ff
+80 a6f8b29a83b2305188c241f2724ea998
+81 d79f9bd47505cee69627e8044f7745c2
+82 5f8d8b55bc9d5b44f817ada0b9bab2f7
+83 411a99ef2e2af45640f0224274979fb5
+84 60706cd1eb7dffae3d7a34133c5cb67e
+85 272a5d09070b5a0569fb18e144100f8b
+86 0f969fd16dd186e9eb099213a82fb119
+87 6c48f63ec50e26ba42d8ca074daee9a6
+88 83512539cc5a2561426564590d307a58
+89 c57cf49bbeaa12aaba2106278681c9cd
+90 d248507181561f0aba09182c4326fb11
+91 a1e153dd8bb1334bccd73890fafc5ba9
+92 d7a0ba2d1241a07abf3691074cecff76
+93 466034794d577c41a9716bc9eb903ee2
+94 b5e2158feb4290b04a7bdfdec0a17976
+95 8a16a27008d033dd6e9074b042021e60
+96 ccaa12e89f6de3058b3a2baddc4eff00
+97 7fdbf02f369546d0fde2b7db85752e33
+98 63b286bb777298397f3acf03fc3e9deb
+99 b271f751a4952f86b002b9730bd02c8b
+100 cbd5cef546acc0bfa33117d7c1ae58a8
+show status like '%sort%';
+Variable_name Value
+Sort_merge_passes 4
+Sort_priority_queue_sorts 0
+Sort_range 0
+Sort_rows 10000
+Sort_scan 1
+set sort_buffer_size=default;
+#
+# CASE #1 Packed sort keys with addon fields
+#
+ALTER TABLE t3 ADD INDEX idx(names, address);
+set sort_buffer_size= 2097152;
+ANALYZE FORMAT=JSON SELECT id, names, address FROM t3 ORDER BY names, address;
+ANALYZE
+{
+ "query_block": {
+ "select_id": 1,
+ "r_loops": 1,
+ "r_total_time_ms": "REPLACED",
+ "read_sorted_file": {
+ "r_rows": 10000,
+ "filesort": {
+ "sort_key": "t3.`names`, t3.address",
+ "r_loops": 1,
+ "r_total_time_ms": "REPLACED",
+ "r_used_priority_queue": false,
+ "r_output_rows": 10000,
+ "r_buffer_size": "REPLACED",
+ "r_sort_mode": "packed_sort_key,packed_addon_fields",
+ "table": {
+ "table_name": "t3",
+ "access_type": "ALL",
+ "r_loops": 1,
+ "rows": 10000,
+ "r_rows": 10000,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 100,
+ "r_filtered": 100
+ }
+ }
+ }
+ }
+}
+flush status;
+SELECT id, names, address INTO OUTFILE '$file1' FROM t3 ORDER BY names, address;
+# Sort_merge_passes should be 0
+show status like '%sort%';
+Variable_name Value
+Sort_merge_passes 0
+Sort_priority_queue_sorts 0
+Sort_range 0
+Sort_rows 10000
+Sort_scan 1
+SELECT id, names, address INTO OUTFILE '$file2' FROM t3 FORCE INDEX(idx) ORDER BY names, address;
+#
+# CASE #2 Packed sort keys and ROW_ID
+#
+set @save_max_length_for_sort_data=@@max_length_for_sort_data;
+set max_length_for_sort_data= 300;
+set sort_buffer_size= 1097152;
+ANALYZE FORMAT=JSON SELECT id, names, address FROM t3 ORDER BY names, address;
+ANALYZE
+{
+ "query_block": {
+ "select_id": 1,
+ "r_loops": 1,
+ "r_total_time_ms": "REPLACED",
+ "read_sorted_file": {
+ "r_rows": 10000,
+ "filesort": {
+ "sort_key": "t3.`names`, t3.address",
+ "r_loops": 1,
+ "r_total_time_ms": "REPLACED",
+ "r_used_priority_queue": false,
+ "r_output_rows": 10000,
+ "r_buffer_size": "REPLACED",
+ "r_sort_mode": "packed_sort_key,rowid",
+ "table": {
+ "table_name": "t3",
+ "access_type": "ALL",
+ "r_loops": 1,
+ "rows": 10000,
+ "r_rows": 10000,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 100,
+ "r_filtered": 100
+ }
+ }
+ }
+ }
+}
+flush status;
+SELECT id, names, address INTO OUTFILE '$file1' FROM t3 ORDER BY names, address;
+# Sort_merge_passes should be 0
+show status like '%sort%';
+Variable_name Value
+Sort_merge_passes 0
+Sort_priority_queue_sorts 0
+Sort_range 0
+Sort_rows 10000
+Sort_scan 1
+set @@max_length_for_sort_data=@save_max_length_for_sort_data;
+set @@sort_buffer_size=default;
+set @@RAND_SEED1= @save_rand_seed1;
+set @@RAND_SEED2= @save_rand_seed2;
+drop function generate_normal_distribution_sample;
+drop function generate_random_string;
+drop function clipped_normal_distribution;
+drop table t1, t2, t3;
diff --git a/mysql-test/main/order_by_pack_big.test b/mysql-test/main/order_by_pack_big.test
new file mode 100644
index 00000000000..dce7bcb905c
--- /dev/null
+++ b/mysql-test/main/order_by_pack_big.test
@@ -0,0 +1,185 @@
+--source include/big_test.inc
+--source include/have_sequence.inc
+--source include/have_64bit.inc
+
+set @save_rand_seed1= @@RAND_SEED1;
+set @save_rand_seed2= @@RAND_SEED2;
+set @@RAND_SEED1=810763568, @@RAND_SEED2=600681772;
+
+create table t1(a int);
+insert into t1 select seq from seq_1_to_10000 order by rand(),seq;
+delimiter |;
+
+--echo #
+--echo # parameters:
+--echo # mean mean for the column to be considered
+--echo # max_val max_value for the column to be considered
+--echo #
+--echo # This function generate a sample of a normal distribution
+--echo # This function return a point
+--echo # of the normal distribution with a given mean.
+--echo #
+
+CREATE FUNCTION
+generate_normal_distribution_sample(mean DOUBLE, max_val DOUBLE)RETURNS DOUBLE
+BEGIN
+ DECLARE z DOUBLE DEFAULT 0;
+ SET z= (rand() + rand() + rand() + rand() + rand() + rand())/6;
+ SET z= 2*(max_val-mean)*z;
+ SET z= z + mean - (max_val-mean);
+ return z;
+END|
+
+--echo #
+--echo # parameters:
+--echo # len length of the random string to be generated
+--echo #
+--echo # This function generates a random string for the length passed
+--echo # as an argument with characters in the range of [A,Z]
+--echo #
+
+CREATE FUNCTION generate_random_string(len INT) RETURNS varchar(128)
+BEGIN
+ DECLARE str VARCHAR(256) DEFAULT '';
+ DECLARE x INT DEFAULT 0;
+ WHILE (len > 0) DO
+ SET x =round(rand()*25);
+ SET str= CONCAT(str, CHAR(65 + x));
+ SET len= len-1;
+ END WHILE;
+RETURN str;
+END|
+
+--echo #
+--echo # parameters:
+--echo # mean mean for the column to be considered
+--echo # min_val min_value for the column to be considered
+--echo # max_val max_value for the column to be considered
+--echo #
+--echo # This function generate a normal distribution sample in the range of
+--echo # [min_val, max_val]
+--echo #
+
+CREATE FUNCTION
+clipped_normal_distribution(mean DOUBLE, min_val DOUBLE, max_val DOUBLE)
+RETURNS INT
+BEGIN
+ DECLARE r DOUBLE DEFAULT 0;
+ WHILE 1=1 DO
+ set r= generate_normal_distribution_sample(mean, max_val);
+ IF (r >= min_val AND r <= max_val) THEN
+ RETURN round(r);
+ end if;
+ END WHILE;
+ RETURN 0;
+END|
+
+delimiter ;|
+
+create table t2 (id INT NOT NULL, a INT, b int);
+insert into t2
+select a, clipped_normal_distribution(12, 0, 64),
+ clipped_normal_distribution(32, 0, 128)
+from t1;
+
+CREATE TABLE t3(
+ id INT NOT NULL,
+ names VARCHAR(64),
+ address VARCHAR(128),
+ PRIMARY KEY (id)
+);
+
+--echo #
+--echo # table t3 stores random strings calculated from the length stored in
+--echo # table t2
+--echo #
+
+insert into t3
+select id, generate_random_string(a), generate_random_string(b) from t2;
+
+
+let $query= select id DIV 100 as x,
+ MD5(group_concat(substring(names,1,3), substring(address,1,3)
+ order by id))
+ FROM t3
+ GROUP BY x;
+
+--echo #
+--echo # All records fit in memory
+--echo #
+
+set sort_buffer_size=262144*10;
+--source include/analyze-format.inc
+eval analyze format=json $query;
+flush status;
+eval $query;
+show status like '%sort%';
+set sort_buffer_size=default;
+
+--echo #
+--echo # Test for merge_many_buff
+--echo #
+
+set sort_buffer_size=32768;
+--source include/analyze-format.inc
+eval analyze format=json $query;
+flush status;
+eval $query;
+show status like '%sort%';
+set sort_buffer_size=default;
+
+--echo #
+--echo # CASE #1 Packed sort keys with addon fields
+--echo #
+
+ALTER TABLE t3 ADD INDEX idx(names, address);
+
+let $file1 = `SELECT CONCAT(@@datadir, "t1.txt")`;
+let $file2 = `SELECT CONCAT(@@datadir, "t2.txt")`;
+
+set sort_buffer_size= 2097152;
+--source include/analyze-format.inc
+eval ANALYZE FORMAT=JSON SELECT id, names, address FROM t3 ORDER BY names, address;
+flush status;
+evalp SELECT id, names, address INTO OUTFILE '$file1' FROM t3 ORDER BY names, address;
+
+--echo # Sort_merge_passes should be 0
+show status like '%sort%';
+
+evalp SELECT id, names, address INTO OUTFILE '$file2' FROM t3 FORCE INDEX(idx) ORDER BY names, address;
+
+diff_files $file1 $file2;
+
+--remove_file $file1
+
+--echo #
+--echo # CASE #2 Packed sort keys and ROW_ID
+--echo #
+
+set @save_max_length_for_sort_data=@@max_length_for_sort_data;
+set max_length_for_sort_data= 300;
+
+set sort_buffer_size= 1097152;
+--source include/analyze-format.inc
+eval ANALYZE FORMAT=JSON SELECT id, names, address FROM t3 ORDER BY names, address;
+flush status;
+evalp SELECT id, names, address INTO OUTFILE '$file1' FROM t3 ORDER BY names, address;
+
+--echo # Sort_merge_passes should be 0
+show status like '%sort%';
+
+diff_files $file1 $file2;
+
+--remove_file $file1
+--remove_file $file2
+
+set @@max_length_for_sort_data=@save_max_length_for_sort_data;
+set @@sort_buffer_size=default;
+
+set @@RAND_SEED1= @save_rand_seed1;
+set @@RAND_SEED2= @save_rand_seed2;
+
+drop function generate_normal_distribution_sample;
+drop function generate_random_string;
+drop function clipped_normal_distribution;
+drop table t1, t2, t3;
diff --git a/mysql-test/main/parser.result b/mysql-test/main/parser.result
index 5ca0e099026..f16978854ac 100644
--- a/mysql-test/main/parser.result
+++ b/mysql-test/main/parser.result
@@ -1400,6 +1400,7 @@ CALL p1(name, 'SELECT name TRANSACTION FROM t1');
CALL p1(name, 'SELECT name VALUE FROM t1');
CALL p1(name, 'SELECT name VERSIONING FROM t1');
CALL p1(name, 'SELECT name WITHOUT FROM t1');
+CALL p1(name, 'SELECT name OVERLAPS FROM t1');
DROP TABLE t1;
END;
$$
@@ -1426,6 +1427,7 @@ SELECT date TRANSACTION FROM t1
SELECT date VALUE FROM t1
SELECT date VERSIONING FROM t1
SELECT date WITHOUT FROM t1
+SELECT date OVERLAPS FROM t1
CALL p2('history');
BEGIN NOT ATOMIC DECLARE history INT; SET history=10; SELECT history; END
10
@@ -1448,6 +1450,7 @@ SELECT history TRANSACTION FROM t1
SELECT history VALUE FROM t1
SELECT history VERSIONING FROM t1
SELECT history WITHOUT FROM t1
+SELECT history OVERLAPS FROM t1
CALL p2('next');
BEGIN NOT ATOMIC DECLARE next INT; SET next=10; SELECT next; END
10
@@ -1471,6 +1474,7 @@ SELECT next VALUE FROM t1
Error 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'FROM t1' at line 1
SELECT next VERSIONING FROM t1
SELECT next WITHOUT FROM t1
+SELECT next OVERLAPS FROM t1
CALL p2('period');
BEGIN NOT ATOMIC DECLARE period INT; SET period=10; SELECT period; END
10
@@ -1493,6 +1497,7 @@ SELECT period TRANSACTION FROM t1
SELECT period VALUE FROM t1
SELECT period VERSIONING FROM t1
SELECT period WITHOUT FROM t1
+SELECT period OVERLAPS FROM t1
CALL p2('previous');
BEGIN NOT ATOMIC DECLARE previous INT; SET previous=10; SELECT previous; END
10
@@ -1516,6 +1521,7 @@ SELECT previous VALUE FROM t1
Error 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'FROM t1' at line 1
SELECT previous VERSIONING FROM t1
SELECT previous WITHOUT FROM t1
+SELECT previous OVERLAPS FROM t1
CALL p2('system');
BEGIN NOT ATOMIC DECLARE system INT; SET system=10; SELECT system; END
10
@@ -1538,6 +1544,7 @@ SELECT system TRANSACTION FROM t1
SELECT system VALUE FROM t1
SELECT system VERSIONING FROM t1
SELECT system WITHOUT FROM t1
+SELECT system OVERLAPS FROM t1
CALL p2('system_time');
BEGIN NOT ATOMIC DECLARE system_time INT; SET system_time=10; SELECT system_time; END
10
@@ -1560,6 +1567,7 @@ SELECT system_time TRANSACTION FROM t1
SELECT system_time VALUE FROM t1
SELECT system_time VERSIONING FROM t1
SELECT system_time WITHOUT FROM t1
+SELECT system_time OVERLAPS FROM t1
CALL p2('time');
BEGIN NOT ATOMIC DECLARE time INT; SET time=10; SELECT time; END
10
@@ -1583,6 +1591,7 @@ SELECT time TRANSACTION FROM t1
SELECT time VALUE FROM t1
SELECT time VERSIONING FROM t1
SELECT time WITHOUT FROM t1
+SELECT time OVERLAPS FROM t1
CALL p2('timestamp');
BEGIN NOT ATOMIC DECLARE timestamp INT; SET timestamp=10; SELECT timestamp; END
10
@@ -1606,6 +1615,7 @@ SELECT timestamp TRANSACTION FROM t1
SELECT timestamp VALUE FROM t1
SELECT timestamp VERSIONING FROM t1
SELECT timestamp WITHOUT FROM t1
+SELECT timestamp OVERLAPS FROM t1
CALL p2('transaction');
BEGIN NOT ATOMIC DECLARE transaction INT; SET transaction=10; SELECT transaction; END
10
@@ -1628,6 +1638,7 @@ SELECT transaction TRANSACTION FROM t1
SELECT transaction VALUE FROM t1
SELECT transaction VERSIONING FROM t1
SELECT transaction WITHOUT FROM t1
+SELECT transaction OVERLAPS FROM t1
CALL p2('value');
BEGIN NOT ATOMIC DECLARE value INT; SET value=10; SELECT value; END
10
@@ -1650,6 +1661,7 @@ SELECT value TRANSACTION FROM t1
SELECT value VALUE FROM t1
SELECT value VERSIONING FROM t1
SELECT value WITHOUT FROM t1
+SELECT value OVERLAPS FROM t1
CALL p2('versioning');
BEGIN NOT ATOMIC DECLARE versioning INT; SET versioning=10; SELECT versioning; END
10
@@ -1672,6 +1684,7 @@ SELECT versioning TRANSACTION FROM t1
SELECT versioning VALUE FROM t1
SELECT versioning VERSIONING FROM t1
SELECT versioning WITHOUT FROM t1
+SELECT versioning OVERLAPS FROM t1
CALL p2('without');
BEGIN NOT ATOMIC DECLARE without INT; SET without=10; SELECT without; END
10
@@ -1694,6 +1707,30 @@ SELECT without TRANSACTION FROM t1
SELECT without VALUE FROM t1
SELECT without VERSIONING FROM t1
SELECT without WITHOUT FROM t1
+SELECT without OVERLAPS FROM t1
+CALL p2('overlaps');
+BEGIN NOT ATOMIC DECLARE overlaps INT; SET overlaps=10; SELECT overlaps; END
+10
+SELECT overlaps FROM t1
+SELECT overlaps 'alias' FROM t1
+SELECT overlaps()
+Error 1582 Incorrect parameter count in the call to native function 'overlaps()'
+SELECT overlaps.overlaps()
+Error 1630 FUNCTION overlaps.overlaps does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual
+SELECT overlaps DATE FROM t1
+SELECT overlaps HISTORY FROM t1
+SELECT overlaps NEXT FROM t1
+SELECT overlaps PERIOD FROM t1
+SELECT overlaps PREVIOUS FROM t1
+SELECT overlaps SYSTEM FROM t1
+SELECT overlaps SYSTEM_TIME FROM t1
+SELECT overlaps TIME FROM t1
+SELECT overlaps TIMESTAMP FROM t1
+SELECT overlaps TRANSACTION FROM t1
+SELECT overlaps VALUE FROM t1
+SELECT overlaps VERSIONING FROM t1
+SELECT overlaps WITHOUT FROM t1
+SELECT overlaps OVERLAPS FROM t1
DROP PROCEDURE p2;
DROP PROCEDURE p1;
#
@@ -2024,3 +2061,47 @@ call p1(1,2);
drop procedure p1;
drop table t1,t2;
# End of 10.4 tests
+#
+# Start of 10.5 tests
+#
+#
+# MDEV-20734 Allow reserved keywords as user defined type names
+#
+CREATE TABLE t1 (a DUAL);
+ERROR HY000: Unknown data type: 'DUAL'
+SELECT CAST(1 AS DUAL);
+ERROR HY000: Unknown data type: 'DUAL'
+#
+# MDEV-20735 Allow non-reserved keywords as user defined type names
+#
+CREATE TABLE t1 (a ASCII);
+ERROR HY000: Unknown data type: 'ASCII'
+SELECT CAST(1 AS ASCII);
+ERROR HY000: Unknown data type: 'ASCII'
+CREATE TABLE t1 (a LANGUAGE);
+ERROR HY000: Unknown data type: 'LANGUAGE'
+SELECT CAST(1 AS LANGUAGE);
+ERROR HY000: Unknown data type: 'LANGUAGE'
+CREATE TABLE t1 (a CLOSE);
+ERROR HY000: Unknown data type: 'CLOSE'
+SELECT CAST(1 AS CLOSE);
+ERROR HY000: Unknown data type: 'CLOSE'
+CREATE TABLE t1 (a NAMES);
+ERROR HY000: Unknown data type: 'NAMES'
+SELECT CAST(1 AS NAMES);
+ERROR HY000: Unknown data type: 'NAMES'
+CREATE TABLE t1 (a END);
+ERROR HY000: Unknown data type: 'END'
+SELECT CAST(1 AS END);
+ERROR HY000: Unknown data type: 'END'
+CREATE TABLE t1 (a GLOBAL);
+ERROR HY000: Unknown data type: 'GLOBAL'
+SELECT CAST(1 AS GLOBAL);
+ERROR HY000: Unknown data type: 'GLOBAL'
+CREATE TABLE t1 (a ACTION);
+ERROR HY000: Unknown data type: 'ACTION'
+SELECT CAST(1 AS ACTION);
+ERROR HY000: Unknown data type: 'ACTION'
+#
+# End of 10.5 tests
+#
diff --git a/mysql-test/main/parser.test b/mysql-test/main/parser.test
index d9a6c2df191..fae459740ad 100644
--- a/mysql-test/main/parser.test
+++ b/mysql-test/main/parser.test
@@ -1442,6 +1442,7 @@ BEGIN
CALL p1(name, 'SELECT name VALUE FROM t1');
CALL p1(name, 'SELECT name VERSIONING FROM t1');
CALL p1(name, 'SELECT name WITHOUT FROM t1');
+ CALL p1(name, 'SELECT name OVERLAPS FROM t1');
DROP TABLE t1;
END;
$$
@@ -1461,6 +1462,7 @@ CALL p2('transaction');
CALL p2('value');
CALL p2('versioning');
CALL p2('without');
+CALL p2('overlaps');
--enable_column_names
DROP PROCEDURE p2;
@@ -1823,3 +1825,61 @@ drop procedure p1;
drop table t1,t2;
--echo # End of 10.4 tests
+
+
+--echo #
+--echo # Start of 10.5 tests
+--echo #
+
+--echo #
+--echo # MDEV-20734 Allow reserved keywords as user defined type names
+--echo #
+
+--error ER_UNKNOWN_DATA_TYPE
+CREATE TABLE t1 (a DUAL);
+--error ER_UNKNOWN_DATA_TYPE
+SELECT CAST(1 AS DUAL);
+
+--echo #
+--echo # MDEV-20735 Allow non-reserved keywords as user defined type names
+--echo #
+
+--error ER_UNKNOWN_DATA_TYPE
+CREATE TABLE t1 (a ASCII);
+--error ER_UNKNOWN_DATA_TYPE
+SELECT CAST(1 AS ASCII);
+
+--error ER_UNKNOWN_DATA_TYPE
+CREATE TABLE t1 (a LANGUAGE);
+--error ER_UNKNOWN_DATA_TYPE
+SELECT CAST(1 AS LANGUAGE);
+
+--error ER_UNKNOWN_DATA_TYPE
+CREATE TABLE t1 (a CLOSE);
+--error ER_UNKNOWN_DATA_TYPE
+SELECT CAST(1 AS CLOSE);
+
+--error ER_UNKNOWN_DATA_TYPE
+CREATE TABLE t1 (a NAMES);
+--error ER_UNKNOWN_DATA_TYPE
+SELECT CAST(1 AS NAMES);
+
+--error ER_UNKNOWN_DATA_TYPE
+CREATE TABLE t1 (a END);
+--error ER_UNKNOWN_DATA_TYPE
+SELECT CAST(1 AS END);
+
+--error ER_UNKNOWN_DATA_TYPE
+CREATE TABLE t1 (a GLOBAL);
+--error ER_UNKNOWN_DATA_TYPE
+SELECT CAST(1 AS GLOBAL);
+
+--error ER_UNKNOWN_DATA_TYPE
+CREATE TABLE t1 (a ACTION);
+--error ER_UNKNOWN_DATA_TYPE
+SELECT CAST(1 AS ACTION);
+
+
+--echo #
+--echo # End of 10.5 tests
+--echo #
diff --git a/mysql-test/main/partition.result b/mysql-test/main/partition.result
index c07f1bcd85a..373522ded40 100644
--- a/mysql-test/main/partition.result
+++ b/mysql-test/main/partition.result
@@ -306,7 +306,7 @@ drop table t1;
CREATE TABLE t1 (a INT, FOREIGN KEY (a) REFERENCES t0 (a))
ENGINE=MyISAM
PARTITION BY HASH (a);
-ERROR HY000: Foreign key clause is not yet supported in conjunction with partitioning
+ERROR HY000: Partitioned tables do not support FOREIGN KEY
CREATE TABLE t1 (
pk INT NOT NULL AUTO_INCREMENT,
PRIMARY KEY (pk)
@@ -551,7 +551,7 @@ INSERT INTO `t1` VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11),(12),(13),
INSERT INTO `t2` VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11),(12),(13),(14),(15),(16),(17),(18),(19),(20);
EXPLAIN PARTITIONS SELECT c1 FROM t1 WHERE (c1 > 10 AND c1 < 13) OR (c1 > 17 AND c1 < 20);
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 NULL index c1 c1 5 NULL 20 Using where; Using index
+1 SIMPLE t1 NULL range c1 c1 5 NULL 4 Using where; Using index
FLUSH STATUS;
SELECT c1 FROM t1 WHERE (c1 > 10 AND c1 < 13) OR (c1 > 17 AND c1 < 20);
c1
@@ -561,10 +561,10 @@ c1
19
SHOW STATUS LIKE 'Handler_read_%';
Variable_name Value
-Handler_read_first 1
-Handler_read_key 0
+Handler_read_first 0
+Handler_read_key 2
Handler_read_last 0
-Handler_read_next 20
+Handler_read_next 4
Handler_read_prev 0
Handler_read_retry 0
Handler_read_rnd 0
@@ -572,7 +572,7 @@ Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
EXPLAIN PARTITIONS SELECT c1 FROM t2 WHERE (c1 > 10 AND c1 < 13) OR (c1 > 17 AND c1 < 20);
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 a index c1 c1 5 NULL 20 Using where; Using index
+1 SIMPLE t2 a range c1 c1 5 NULL 4 Using where; Using index
FLUSH STATUS;
SELECT c1 FROM t2 WHERE (c1 > 10 AND c1 < 13) OR (c1 > 17 AND c1 < 20);
c1
@@ -582,10 +582,10 @@ c1
19
SHOW STATUS LIKE 'Handler_read_%';
Variable_name Value
-Handler_read_first 1
-Handler_read_key 0
+Handler_read_first 0
+Handler_read_key 2
Handler_read_last 0
-Handler_read_next 20
+Handler_read_next 4
Handler_read_prev 0
Handler_read_retry 0
Handler_read_rnd 0
@@ -1514,7 +1514,7 @@ s1
2
drop table t2;
create temporary table t1 (a int) partition by hash(a);
-ERROR HY000: Cannot create temporary table with partitions
+ERROR HY000: Partitioned tables do not support CREATE TEMPORARY TABLE
create table t1 (a int, b int) partition by list (a)
(partition p1 values in (1), partition p2 values in (2));
alter table t1 add primary key (b);
@@ -2362,6 +2362,10 @@ EXPLAIN
SELECT b, c FROM t1 WHERE b = 1 GROUP BY b, c;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range bc bc 10 NULL 8 Using where; Using index for group-by
+EXPLAIN
+SELECT b, c FROM t1 WHERE b = 1 or b=2 GROUP BY b, c;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range bc bc 10 NULL 8 Using where; Using index for group-by
DROP TABLE t1;
#
# Bug #45807: crash accessing partitioned table and sql_mode
diff --git a/mysql-test/main/partition.test b/mysql-test/main/partition.test
index cc19bb83494..5d5dafdb206 100644
--- a/mysql-test/main/partition.test
+++ b/mysql-test/main/partition.test
@@ -290,7 +290,7 @@ drop table t1;
#
# Bug#36001: Partitions: spelling and using some error messages
#
---error ER_FOREIGN_KEY_ON_PARTITIONED
+--error ER_FEATURE_NOT_SUPPORTED_WITH_PARTITIONING
CREATE TABLE t1 (a INT, FOREIGN KEY (a) REFERENCES t0 (a))
ENGINE=MyISAM
PARTITION BY HASH (a);
@@ -1054,7 +1054,7 @@ drop table t1;
#
# Bug #17754 Change to explicit removal of partitioning scheme
# Also added a number of tests to ensure that proper engine is
-# choosen in all kinds of scenarios.
+# chosen in all kinds of scenarios.
#
create table t1 (a int)
@@ -1422,7 +1422,7 @@ drop table t2;
#
# Bug #17497: Partitions: crash if add partition on temporary table
#
---error ER_PARTITION_NO_TEMPORARY
+--error ER_FEATURE_NOT_SUPPORTED_WITH_PARTITIONING
create temporary table t1 (a int) partition by hash(a);
#
@@ -2293,6 +2293,9 @@ SELECT b, c FROM t1 WHERE b = 1 GROUP BY b, c;
EXPLAIN
SELECT b, c FROM t1 WHERE b = 1 GROUP BY b, c;
+EXPLAIN
+SELECT b, c FROM t1 WHERE b = 1 or b=2 GROUP BY b, c;
+
DROP TABLE t1;
--echo #
diff --git a/mysql-test/main/partition_alter.test b/mysql-test/main/partition_alter.test
index 804b43dc3c2..cca25d0989f 100644
--- a/mysql-test/main/partition_alter.test
+++ b/mysql-test/main/partition_alter.test
@@ -86,7 +86,11 @@ show create table t1;
--error ER_CONSTRAINT_FAILED
insert t1 values (2, '2020-01-03', 20);
drop table t1;
---list_files $datadir/test
+--let $regexp=/#sql-ib[0-9a-f]+\.ibd\n//
+--list_files_write_file $datadir.files.txt $datadir/test
+--replace_regex $regexp
+--cat_file $datadir.files.txt
+--remove_file $datadir.files.txt
# MyISAM, different execution path
create table t1(id int, d date not null, b bool not null default 0, primary key(id,d))
@@ -102,7 +106,10 @@ show create table t1;
--error ER_CONSTRAINT_FAILED
insert t1 values (2, '2020-01-03', 20);
drop table t1;
---list_files $datadir/test
+--list_files_write_file $datadir.files.txt $datadir/test
+--replace_regex $regexp
+--cat_file $datadir.files.txt
+--remove_file $datadir.files.txt
#
# MDEV-13097 Online alter of a partitioned MyISAM table with auto_increment
diff --git a/mysql-test/main/partition_cache.result b/mysql-test/main/partition_cache.result
index 697ba1bcd15..0bd8d70e9cb 100644
--- a/mysql-test/main/partition_cache.result
+++ b/mysql-test/main/partition_cache.result
@@ -1,6 +1,6 @@
SET global query_cache_type=ON;
SET local query_cache_type=ON;
-SET SESSION STORAGE_ENGINE = InnoDB;
+SET SESSION DEFAULT_STORAGE_ENGINE = InnoDB;
drop table if exists t1,t2,t3;
set @save_query_cache_size = @@global.query_cache_size;
set GLOBAL query_cache_size = 1355776;
@@ -114,7 +114,7 @@ count(*)
1
drop table t1;
connect connection1,localhost,root,,;
-SET SESSION STORAGE_ENGINE = InnoDB;
+SET SESSION DEFAULT_STORAGE_ENGINE = InnoDB;
SET @@autocommit=1;
connection default;
SHOW VARIABLES LIKE 'have_query_cache';
@@ -123,7 +123,7 @@ have_query_cache YES
SET GLOBAL query_cache_size = 204800;
flush status;
SET @@autocommit=1;
-SET SESSION STORAGE_ENGINE = InnoDB;
+SET SESSION DEFAULT_STORAGE_ENGINE = InnoDB;
CREATE TABLE t2 (s1 int, s2 varchar(1000), key(s1)) PARTITION BY KEY (s1) PARTITIONS 3;
INSERT INTO t2 VALUES (1,repeat('a',10)),(2,repeat('a',10)),(3,repeat('a',10)),(4,repeat('a',10));
COMMIT;
diff --git a/mysql-test/main/partition_cache_innodb.result b/mysql-test/main/partition_cache_innodb.result
index e6e69ee686e..0cd60fa11a0 100644
--- a/mysql-test/main/partition_cache_innodb.result
+++ b/mysql-test/main/partition_cache_innodb.result
@@ -1,6 +1,6 @@
SET global query_cache_type=ON;
SET local query_cache_type=ON;
-SET SESSION STORAGE_ENGINE = innodb;
+SET SESSION DEFAULT_STORAGE_ENGINE = innodb;
drop table if exists t1;
set @save_query_cache_size = @@global.query_cache_size;
# Test that partitions works with query cache
diff --git a/mysql-test/main/partition_cache_myisam.result b/mysql-test/main/partition_cache_myisam.result
index d8e4f837ff7..441a7d080c3 100644
--- a/mysql-test/main/partition_cache_myisam.result
+++ b/mysql-test/main/partition_cache_myisam.result
@@ -1,6 +1,6 @@
SET global query_cache_type=ON;
SET local query_cache_type=ON;
-SET SESSION STORAGE_ENGINE = myisam;
+SET SESSION DEFAULT_STORAGE_ENGINE = myisam;
drop table if exists t1;
set @save_query_cache_size = @@global.query_cache_size;
# Test that partitions works with query cache
diff --git a/mysql-test/main/partition_error.result b/mysql-test/main/partition_error.result
index d99473d0718..25c29938f91 100644
--- a/mysql-test/main/partition_error.result
+++ b/mysql-test/main/partition_error.result
@@ -754,7 +754,7 @@ ERROR HY000: Field 'c' is of a not allowed type for this type of partitioning
#
CREATE TABLE t1 (a INT) PARTITION BY HASH(a);
CREATE TEMPORARY TABLE tmp_t1 LIKE t1;
-ERROR HY000: Cannot create temporary table with partitions
+ERROR HY000: Partitioned tables do not support CREATE TEMPORARY TABLE
DROP TABLE t1;
#
# Bug#42954: SQL MODE 'NO_DIR_IN_CREATE' does not work with
diff --git a/mysql-test/main/partition_error.test b/mysql-test/main/partition_error.test
index 8739c93fe92..7436bb060d2 100644
--- a/mysql-test/main/partition_error.test
+++ b/mysql-test/main/partition_error.test
@@ -788,7 +788,7 @@ PARTITION BY HASH (c) PARTITIONS 4;
--echo # with temporary table and partitions
--echo #
CREATE TABLE t1 (a INT) PARTITION BY HASH(a);
---error ER_PARTITION_NO_TEMPORARY
+--error ER_FEATURE_NOT_SUPPORTED_WITH_PARTITIONING
CREATE TEMPORARY TABLE tmp_t1 LIKE t1;
DROP TABLE t1;
--echo #
diff --git a/mysql-test/main/partition_explicit_prune.result b/mysql-test/main/partition_explicit_prune.result
index 56fd0ff569a..5b3049c146f 100644
--- a/mysql-test/main/partition_explicit_prune.result
+++ b/mysql-test/main/partition_explicit_prune.result
@@ -546,7 +546,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 2
+HANDLER_READ_KEY 1
HANDLER_TMP_WRITE 24
HANDLER_UPDATE 2
HANDLER_WRITE 2
@@ -628,7 +628,7 @@ WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
VARIABLE_NAME VARIABLE_VALUE
HANDLER_COMMIT 4
HANDLER_DELETE 2
-HANDLER_READ_KEY 3
+HANDLER_READ_KEY 2
HANDLER_READ_NEXT 1
HANDLER_READ_RND_NEXT 112
HANDLER_ROLLBACK 1
@@ -651,7 +651,7 @@ VARIABLE_NAME VARIABLE_VALUE
HANDLER_COMMIT 5
HANDLER_DELETE 2
HANDLER_READ_FIRST 1
-HANDLER_READ_KEY 3
+HANDLER_READ_KEY 2
HANDLER_READ_NEXT 4
HANDLER_READ_RND_NEXT 140
HANDLER_ROLLBACK 1
@@ -671,7 +671,7 @@ VARIABLE_NAME VARIABLE_VALUE
HANDLER_COMMIT 5
HANDLER_DELETE 2
HANDLER_READ_FIRST 1
-HANDLER_READ_KEY 3
+HANDLER_READ_KEY 2
HANDLER_READ_NEXT 4
HANDLER_READ_RND_NEXT 168
HANDLER_ROLLBACK 1
diff --git a/mysql-test/main/partition_innodb.result b/mysql-test/main/partition_innodb.result
index 6be6721f0d1..67829fd46d9 100644
--- a/mysql-test/main/partition_innodb.result
+++ b/mysql-test/main/partition_innodb.result
@@ -246,10 +246,10 @@ KEY parent_id (parent_id)
) ENGINE=InnoDB;
ALTER TABLE t1 PARTITION BY HASH (id) PARTITIONS 1;
ALTER TABLE t1 ADD CONSTRAINT test_ibfk_1 FOREIGN KEY (parent_id) REFERENCES t2 (id);
-ERROR HY000: Foreign key clause is not yet supported in conjunction with partitioning
+ERROR HY000: Partitioned tables do not support FOREIGN KEY
ALTER TABLE t1 PARTITION BY HASH (id) PARTITIONS 2;
ALTER TABLE t1 ADD CONSTRAINT test_ibfk_1 FOREIGN KEY (parent_id) REFERENCES t2 (id);
-ERROR HY000: Foreign key clause is not yet supported in conjunction with partitioning
+ERROR HY000: Partitioned tables do not support FOREIGN KEY
DROP TABLE t1, t2;
create table t1 (a varchar(5), b int signed, c varchar(10), d datetime)
partition by range columns(b,c)
@@ -699,7 +699,7 @@ EXPLAIN SELECT * FROM t1 WHERE col1 = 1 AND col2 = 2
AND col3 BETWEEN '2013-03-08 00:00:00' AND '2013-03-12 12:00:00'
GROUP BY 1, 2, 3;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref PRIMARY,col1,col2 col1 8 const # Using where; Using filesort
+1 SIMPLE t1 range PRIMARY,col1,col2 PRIMARY 5 NULL # Using where; Using filesort
SELECT * FROM t1 USE INDEX () WHERE col1 = 1 AND col2 = 2
AND col3 BETWEEN '2013-03-08 00:00:00' AND '2013-03-12 12:00:00'
GROUP BY 1, 2, 3;
diff --git a/mysql-test/main/partition_innodb.test b/mysql-test/main/partition_innodb.test
index 16fd7ea60ef..cdf4e257e70 100644
--- a/mysql-test/main/partition_innodb.test
+++ b/mysql-test/main/partition_innodb.test
@@ -240,12 +240,12 @@ CREATE TABLE t1 (
ALTER TABLE t1 PARTITION BY HASH (id) PARTITIONS 1;
---error ER_FOREIGN_KEY_ON_PARTITIONED
+--error ER_FEATURE_NOT_SUPPORTED_WITH_PARTITIONING
ALTER TABLE t1 ADD CONSTRAINT test_ibfk_1 FOREIGN KEY (parent_id) REFERENCES t2 (id);
ALTER TABLE t1 PARTITION BY HASH (id) PARTITIONS 2;
---error ER_FOREIGN_KEY_ON_PARTITIONED
+--error ER_FEATURE_NOT_SUPPORTED_WITH_PARTITIONING
ALTER TABLE t1 ADD CONSTRAINT test_ibfk_1 FOREIGN KEY (parent_id) REFERENCES t2 (id);
DROP TABLE t1, t2;
diff --git a/mysql-test/main/partition_mrr_aria.result b/mysql-test/main/partition_mrr_aria.result
index ccef491242b..99fb17338c3 100644
--- a/mysql-test/main/partition_mrr_aria.result
+++ b/mysql-test/main/partition_mrr_aria.result
@@ -4,8 +4,8 @@ drop table if exists t1,t3;
#
create table t1(a int);
insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
-set @tmp=@@storage_engine;
-set storage_engine=Aria;
+set @tmp=@@default_storage_engine;
+set default_storage_engine=Aria;
create table t3 (
ID bigint(20) NOT NULL AUTO_INCREMENT,
part_id int,
@@ -32,7 +32,7 @@ t3 CREATE TABLE `t3` (
(PARTITION `p1` VALUES LESS THAN (3) ENGINE = Aria,
PARTITION `p2` VALUES LESS THAN (7) ENGINE = Aria,
PARTITION `p3` VALUES LESS THAN (10) ENGINE = Aria)
-set storage_engine= @tmp;
+set default_storage_engine= @tmp;
insert into t3 select
A.a+10*B.a,
A.a,
@@ -129,7 +129,7 @@ set join_cache_level=6;
set optimizer_switch='mrr=on';
explain extended select * from t0,t2 where t2.a in (3,4) and t0.a=t2.a and (t0.b / 10) = t2.a-1;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t2 index idx idx 5 NULL 20 10.00 Using where; Using index
+1 SIMPLE t2 range idx idx 5 NULL 2 100.00 Using where; Using index
1 SIMPLE t0 ref idx idx 5 test.t2.a 12 100.00 Using index condition(BKA); Using join buffer (flat, BKA join); Rowid-ordered scan
Warnings:
Note 1003 select `test`.`t0`.`tp` AS `tp`,`test`.`t0`.`a` AS `a`,`test`.`t0`.`b` AS `b`,`test`.`t0`.`c` AS `c`,`test`.`t2`.`a` AS `a` from `test`.`t0` join `test`.`t2` where `test`.`t0`.`a` = `test`.`t2`.`a` and `test`.`t2`.`a` in (3,4) and `test`.`t0`.`b` / 10 = `test`.`t2`.`a` - 1
@@ -146,7 +146,7 @@ tp a b c a
3 4 30 zzzyy 4
explain extended select * from t1,t2 where t2.a in (3,4) and t1.a=t2.a and (t1.b / 10) = t2.a-1;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t2 index idx idx 5 NULL 20 10.00 Using where; Using index
+1 SIMPLE t2 range idx idx 5 NULL 2 100.00 Using where; Using index
1 SIMPLE t1 ref idx idx 5 test.t2.a 12 100.00 Using index condition(BKA); Using join buffer (flat, BKA join); Rowid-ordered scan
Warnings:
Note 1003 select `test`.`t1`.`tp` AS `tp`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,`test`.`t2`.`a` AS `a` from `test`.`t1` join `test`.`t2` where `test`.`t1`.`a` = `test`.`t2`.`a` and `test`.`t2`.`a` in (3,4) and `test`.`t1`.`b` / 10 = `test`.`t2`.`a` - 1
@@ -163,7 +163,7 @@ tp a b c a
3 4 30 zzzyy 4
explain extended select * from t0,t2 where t2.a in (3,4) and t0.a=t2.a and (t0.b / 10) = 4;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t2 index idx idx 5 NULL 20 10.00 Using where; Using index
+1 SIMPLE t2 range idx idx 5 NULL 2 100.00 Using where; Using index
1 SIMPLE t0 ref idx idx 5 test.t2.a 12 100.00 Using index condition; Using join buffer (flat, BKA join); Rowid-ordered scan
Warnings:
Note 1003 select `test`.`t0`.`tp` AS `tp`,`test`.`t0`.`a` AS `a`,`test`.`t0`.`b` AS `b`,`test`.`t0`.`c` AS `c`,`test`.`t2`.`a` AS `a` from `test`.`t0` join `test`.`t2` where `test`.`t0`.`a` = `test`.`t2`.`a` and `test`.`t2`.`a` in (3,4) and `test`.`t0`.`b` / 10 = 4
@@ -189,7 +189,7 @@ tp a b c a
2 4 40 xxzy 4
explain extended select * from t1,t2 where t2.a in (3,4) and t1.a=t2.a and (t1.b / 10) = 4;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t2 index idx idx 5 NULL 20 10.00 Using where; Using index
+1 SIMPLE t2 range idx idx 5 NULL 2 100.00 Using where; Using index
1 SIMPLE t1 ref idx idx 5 test.t2.a 12 100.00 Using index condition(BKA); Using join buffer (flat, BKA join); Rowid-ordered scan
Warnings:
Note 1003 select `test`.`t1`.`tp` AS `tp`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,`test`.`t2`.`a` AS `a` from `test`.`t1` join `test`.`t2` where `test`.`t1`.`a` = `test`.`t2`.`a` and `test`.`t2`.`a` in (3,4) and `test`.`t1`.`b` / 10 = 4
@@ -221,7 +221,7 @@ test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
explain extended select * from t2 left join t0 on t2.a=t0.a where t2.a in (3,4) and t0.b is null;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t2 index idx idx 5 NULL 23 17.39 Using where; Using index
+1 SIMPLE t2 range idx idx 5 NULL 4 100.00 Using where; Using index
1 SIMPLE t0 ref idx idx 5 test.t2.a 12 100.00 Using where; Not exists; Using join buffer (flat, BKA join); Rowid-ordered scan
Warnings:
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t0`.`tp` AS `tp`,`test`.`t0`.`a` AS `a`,`test`.`t0`.`b` AS `b`,`test`.`t0`.`c` AS `c` from `test`.`t2` left join `test`.`t0` on(`test`.`t0`.`a` = `test`.`t2`.`a` and `test`.`t2`.`a` is not null) where `test`.`t2`.`a` in (3,4) and `test`.`t0`.`b` is null
@@ -229,7 +229,7 @@ select * from t2 left join t0 on t2.a=t0.a where t2.a in (3,4) and t0.b is null;
a tp a b c
explain extended select * from t2 left join t1 on t2.a=t1.a where t2.a in (3,4) and t1.b is null;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t2 index idx idx 5 NULL 23 17.39 Using where; Using index
+1 SIMPLE t2 range idx idx 5 NULL 4 100.00 Using where; Using index
1 SIMPLE t1 ref idx idx 5 test.t2.a 12 100.00 Using where; Not exists; Using join buffer (flat, BKA join); Rowid-ordered scan
Warnings:
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t1`.`tp` AS `tp`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c` from `test`.`t2` left join `test`.`t1` on(`test`.`t1`.`a` = `test`.`t2`.`a` and `test`.`t2`.`a` is not null) where `test`.`t2`.`a` in (3,4) and `test`.`t1`.`b` is null
diff --git a/mysql-test/main/partition_mrr_innodb.result b/mysql-test/main/partition_mrr_innodb.result
index 4aad8134866..8e34914a6e3 100644
--- a/mysql-test/main/partition_mrr_innodb.result
+++ b/mysql-test/main/partition_mrr_innodb.result
@@ -4,8 +4,8 @@ drop table if exists t1,t3;
#
create table t1(a int);
insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
-set @tmp=@@storage_engine;
-set storage_engine=InnoDB;
+set @tmp=@@default_storage_engine;
+set default_storage_engine=InnoDB;
create table t3 (
ID bigint(20) NOT NULL AUTO_INCREMENT,
part_id int,
@@ -32,7 +32,7 @@ t3 CREATE TABLE `t3` (
(PARTITION `p1` VALUES LESS THAN (3) ENGINE = InnoDB,
PARTITION `p2` VALUES LESS THAN (7) ENGINE = InnoDB,
PARTITION `p3` VALUES LESS THAN (10) ENGINE = InnoDB)
-set storage_engine= @tmp;
+set default_storage_engine= @tmp;
insert into t3 select
A.a+10*B.a,
A.a,
@@ -129,7 +129,7 @@ set join_cache_level=6;
set optimizer_switch='mrr=on';
explain extended select * from t0,t2 where t2.a in (3,4) and t0.a=t2.a and (t0.b / 10) = t2.a-1;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t2 index idx idx 5 NULL 20 10.00 Using where; Using index
+1 SIMPLE t2 range idx idx 5 NULL 2 100.00 Using where; Using index
1 SIMPLE t0 ref idx idx 5 test.t2.a 12 100.00 Using index condition(BKA); Using join buffer (flat, BKA join); Rowid-ordered scan
Warnings:
Note 1003 select `test`.`t0`.`tp` AS `tp`,`test`.`t0`.`a` AS `a`,`test`.`t0`.`b` AS `b`,`test`.`t0`.`c` AS `c`,`test`.`t2`.`a` AS `a` from `test`.`t0` join `test`.`t2` where `test`.`t0`.`a` = `test`.`t2`.`a` and `test`.`t2`.`a` in (3,4) and `test`.`t0`.`b` / 10 = `test`.`t2`.`a` - 1
@@ -146,7 +146,7 @@ tp a b c a
3 4 30 zzzyy 4
explain extended select * from t1,t2 where t2.a in (3,4) and t1.a=t2.a and (t1.b / 10) = t2.a-1;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t2 index idx idx 5 NULL 20 10.00 Using where; Using index
+1 SIMPLE t2 range idx idx 5 NULL 2 100.00 Using where; Using index
1 SIMPLE t1 ref idx idx 5 test.t2.a 12 100.00 Using index condition(BKA); Using join buffer (flat, BKA join); Rowid-ordered scan
Warnings:
Note 1003 select `test`.`t1`.`tp` AS `tp`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,`test`.`t2`.`a` AS `a` from `test`.`t1` join `test`.`t2` where `test`.`t1`.`a` = `test`.`t2`.`a` and `test`.`t2`.`a` in (3,4) and `test`.`t1`.`b` / 10 = `test`.`t2`.`a` - 1
@@ -163,7 +163,7 @@ tp a b c a
3 4 30 zzzyy 4
explain extended select * from t0,t2 where t2.a in (3,4) and t0.a=t2.a and (t0.b / 10) = 4;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t2 index idx idx 5 NULL 20 10.00 Using where; Using index
+1 SIMPLE t2 range idx idx 5 NULL 2 100.00 Using where; Using index
1 SIMPLE t0 ref idx idx 5 test.t2.a 12 100.00 Using index condition; Using join buffer (flat, BKA join); Rowid-ordered scan
Warnings:
Note 1003 select `test`.`t0`.`tp` AS `tp`,`test`.`t0`.`a` AS `a`,`test`.`t0`.`b` AS `b`,`test`.`t0`.`c` AS `c`,`test`.`t2`.`a` AS `a` from `test`.`t0` join `test`.`t2` where `test`.`t0`.`a` = `test`.`t2`.`a` and `test`.`t2`.`a` in (3,4) and `test`.`t0`.`b` / 10 = 4
@@ -189,7 +189,7 @@ tp a b c a
2 4 40 xxzy 4
explain extended select * from t1,t2 where t2.a in (3,4) and t1.a=t2.a and (t1.b / 10) = 4;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t2 index idx idx 5 NULL 20 10.00 Using where; Using index
+1 SIMPLE t2 range idx idx 5 NULL 2 100.00 Using where; Using index
1 SIMPLE t1 ref idx idx 5 test.t2.a 12 100.00 Using index condition(BKA); Using join buffer (flat, BKA join); Rowid-ordered scan
Warnings:
Note 1003 select `test`.`t1`.`tp` AS `tp`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,`test`.`t2`.`a` AS `a` from `test`.`t1` join `test`.`t2` where `test`.`t1`.`a` = `test`.`t2`.`a` and `test`.`t2`.`a` in (3,4) and `test`.`t1`.`b` / 10 = 4
@@ -221,7 +221,7 @@ test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
explain extended select * from t2 left join t0 on t2.a=t0.a where t2.a in (3,4) and t0.b is null;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t2 index idx idx 5 NULL 23 17.39 Using where; Using index
+1 SIMPLE t2 range idx idx 5 NULL 4 100.00 Using where; Using index
1 SIMPLE t0 ref idx idx 5 test.t2.a 12 100.00 Using where; Not exists; Using join buffer (flat, BKA join); Rowid-ordered scan
Warnings:
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t0`.`tp` AS `tp`,`test`.`t0`.`a` AS `a`,`test`.`t0`.`b` AS `b`,`test`.`t0`.`c` AS `c` from `test`.`t2` left join `test`.`t0` on(`test`.`t0`.`a` = `test`.`t2`.`a` and `test`.`t2`.`a` is not null) where `test`.`t2`.`a` in (3,4) and `test`.`t0`.`b` is null
@@ -229,7 +229,7 @@ select * from t2 left join t0 on t2.a=t0.a where t2.a in (3,4) and t0.b is null;
a tp a b c
explain extended select * from t2 left join t1 on t2.a=t1.a where t2.a in (3,4) and t1.b is null;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t2 index idx idx 5 NULL 23 17.39 Using where; Using index
+1 SIMPLE t2 range idx idx 5 NULL 4 100.00 Using where; Using index
1 SIMPLE t1 ref idx idx 5 test.t2.a 12 100.00 Using where; Not exists; Using join buffer (flat, BKA join); Rowid-ordered scan
Warnings:
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t1`.`tp` AS `tp`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c` from `test`.`t2` left join `test`.`t1` on(`test`.`t1`.`a` = `test`.`t2`.`a` and `test`.`t2`.`a` is not null) where `test`.`t2`.`a` in (3,4) and `test`.`t1`.`b` is null
diff --git a/mysql-test/main/partition_mrr_myisam.result b/mysql-test/main/partition_mrr_myisam.result
index 7e060b35c53..395b64ffb11 100644
--- a/mysql-test/main/partition_mrr_myisam.result
+++ b/mysql-test/main/partition_mrr_myisam.result
@@ -4,8 +4,8 @@ drop table if exists t1,t3;
#
create table t1(a int);
insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
-set @tmp=@@storage_engine;
-set storage_engine=myisam;
+set @tmp=@@default_storage_engine;
+set default_storage_engine=myisam;
create table t3 (
ID bigint(20) NOT NULL AUTO_INCREMENT,
part_id int,
@@ -32,7 +32,7 @@ t3 CREATE TABLE `t3` (
(PARTITION `p1` VALUES LESS THAN (3) ENGINE = MyISAM,
PARTITION `p2` VALUES LESS THAN (7) ENGINE = MyISAM,
PARTITION `p3` VALUES LESS THAN (10) ENGINE = MyISAM)
-set storage_engine= @tmp;
+set default_storage_engine= @tmp;
insert into t3 select
A.a+10*B.a,
A.a,
@@ -129,7 +129,7 @@ set join_cache_level=6;
set optimizer_switch='mrr=on';
explain extended select * from t0,t2 where t2.a in (3,4) and t0.a=t2.a and (t0.b / 10) = t2.a-1;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t2 index idx idx 5 NULL 20 10.00 Using where; Using index
+1 SIMPLE t2 range idx idx 5 NULL 2 100.00 Using where; Using index
1 SIMPLE t0 ref idx idx 5 test.t2.a 12 100.00 Using index condition(BKA); Using join buffer (flat, BKA join); Rowid-ordered scan
Warnings:
Note 1003 select `test`.`t0`.`tp` AS `tp`,`test`.`t0`.`a` AS `a`,`test`.`t0`.`b` AS `b`,`test`.`t0`.`c` AS `c`,`test`.`t2`.`a` AS `a` from `test`.`t0` join `test`.`t2` where `test`.`t0`.`a` = `test`.`t2`.`a` and `test`.`t2`.`a` in (3,4) and `test`.`t0`.`b` / 10 = `test`.`t2`.`a` - 1
@@ -146,7 +146,7 @@ tp a b c a
3 4 30 zzzyy 4
explain extended select * from t1,t2 where t2.a in (3,4) and t1.a=t2.a and (t1.b / 10) = t2.a-1;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t2 index idx idx 5 NULL 20 10.00 Using where; Using index
+1 SIMPLE t2 range idx idx 5 NULL 2 100.00 Using where; Using index
1 SIMPLE t1 ref idx idx 5 test.t2.a 12 100.00 Using index condition(BKA); Using join buffer (flat, BKA join); Rowid-ordered scan
Warnings:
Note 1003 select `test`.`t1`.`tp` AS `tp`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,`test`.`t2`.`a` AS `a` from `test`.`t1` join `test`.`t2` where `test`.`t1`.`a` = `test`.`t2`.`a` and `test`.`t2`.`a` in (3,4) and `test`.`t1`.`b` / 10 = `test`.`t2`.`a` - 1
@@ -163,7 +163,7 @@ tp a b c a
3 4 30 zzzyy 4
explain extended select * from t0,t2 where t2.a in (3,4) and t0.a=t2.a and (t0.b / 10) = 4;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t2 index idx idx 5 NULL 20 10.00 Using where; Using index
+1 SIMPLE t2 range idx idx 5 NULL 2 100.00 Using where; Using index
1 SIMPLE t0 ref idx idx 5 test.t2.a 12 100.00 Using index condition; Using join buffer (flat, BKA join); Rowid-ordered scan
Warnings:
Note 1003 select `test`.`t0`.`tp` AS `tp`,`test`.`t0`.`a` AS `a`,`test`.`t0`.`b` AS `b`,`test`.`t0`.`c` AS `c`,`test`.`t2`.`a` AS `a` from `test`.`t0` join `test`.`t2` where `test`.`t0`.`a` = `test`.`t2`.`a` and `test`.`t2`.`a` in (3,4) and `test`.`t0`.`b` / 10 = 4
@@ -189,7 +189,7 @@ tp a b c a
2 4 40 xxzy 4
explain extended select * from t1,t2 where t2.a in (3,4) and t1.a=t2.a and (t1.b / 10) = 4;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t2 index idx idx 5 NULL 20 10.00 Using where; Using index
+1 SIMPLE t2 range idx idx 5 NULL 2 100.00 Using where; Using index
1 SIMPLE t1 ref idx idx 5 test.t2.a 12 100.00 Using index condition(BKA); Using join buffer (flat, BKA join); Rowid-ordered scan
Warnings:
Note 1003 select `test`.`t1`.`tp` AS `tp`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,`test`.`t2`.`a` AS `a` from `test`.`t1` join `test`.`t2` where `test`.`t1`.`a` = `test`.`t2`.`a` and `test`.`t2`.`a` in (3,4) and `test`.`t1`.`b` / 10 = 4
@@ -221,7 +221,7 @@ test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
explain extended select * from t2 left join t0 on t2.a=t0.a where t2.a in (3,4) and t0.b is null;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t2 index idx idx 5 NULL 23 17.39 Using where; Using index
+1 SIMPLE t2 range idx idx 5 NULL 4 100.00 Using where; Using index
1 SIMPLE t0 ref idx idx 5 test.t2.a 12 100.00 Using where; Not exists; Using join buffer (flat, BKA join); Rowid-ordered scan
Warnings:
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t0`.`tp` AS `tp`,`test`.`t0`.`a` AS `a`,`test`.`t0`.`b` AS `b`,`test`.`t0`.`c` AS `c` from `test`.`t2` left join `test`.`t0` on(`test`.`t0`.`a` = `test`.`t2`.`a` and `test`.`t2`.`a` is not null) where `test`.`t2`.`a` in (3,4) and `test`.`t0`.`b` is null
@@ -229,7 +229,7 @@ select * from t2 left join t0 on t2.a=t0.a where t2.a in (3,4) and t0.b is null;
a tp a b c
explain extended select * from t2 left join t1 on t2.a=t1.a where t2.a in (3,4) and t1.b is null;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t2 index idx idx 5 NULL 23 17.39 Using where; Using index
+1 SIMPLE t2 range idx idx 5 NULL 4 100.00 Using where; Using index
1 SIMPLE t1 ref idx idx 5 test.t2.a 12 100.00 Using where; Not exists; Using join buffer (flat, BKA join); Rowid-ordered scan
Warnings:
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t1`.`tp` AS `tp`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c` from `test`.`t2` left join `test`.`t1` on(`test`.`t1`.`a` = `test`.`t2`.`a` and `test`.`t2`.`a` is not null) where `test`.`t2`.`a` in (3,4) and `test`.`t1`.`b` is null
@@ -287,13 +287,13 @@ set join_cache_level=6, optimizer_switch='mrr=on';
explain
select * from t0,t2 where t2.a in (3,4) and t0.a=t2.a and (t0.b / 10) = 4;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 index idx idx 5 NULL 20 Using where; Using index
+1 SIMPLE t2 range idx idx 5 NULL 2 Using where; Using index
1 SIMPLE t0 ref idx idx 5 test.t2.a 12 Using index condition; Using join buffer (flat, BKA join); Rowid-ordered scan
# This will use "Using index condition(BKA)"
explain
select * from t1,t2 where t2.a in (3,4) and t1.a=t2.a and (t1.b / 10) = 4;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 index idx idx 5 NULL 20 Using where; Using index
+1 SIMPLE t2 range idx idx 5 NULL 2 Using where; Using index
1 SIMPLE t1 ref idx idx 5 test.t2.a 12 Using index condition(BKA); Using join buffer (flat, BKA join); Rowid-ordered scan
set join_cache_level=@tmp1, optimizer_switch=@tmp2;
drop table t0,t1,t2;
diff --git a/mysql-test/main/partition_myisam.result b/mysql-test/main/partition_myisam.result
index 8f35075261a..3a549060d8e 100644
--- a/mysql-test/main/partition_myisam.result
+++ b/mysql-test/main/partition_myisam.result
@@ -87,10 +87,9 @@ test.t1 check Error Failed to read from the .par file
test.t1 check error Corrupt
SELECT * FROM t1;
ERROR HY000: Failed to read from the .par file
-# Note that it is currently impossible to drop a partitioned table
-# without the .par file
DROP TABLE t1;
-ERROR HY000: Got error 1 "Operation not permitted" from storage engine partition
+Warnings:
+Warning 1017 Can't find file: './test/t1.par' (errno: 2 "No such file or directory")
#
# Bug#50392: insert_id is not reset for partitioned tables
# auto_increment on duplicate entry
diff --git a/mysql-test/main/partition_myisam.test b/mysql-test/main/partition_myisam.test
index 4d083c37b68..b26b619a958 100644
--- a/mysql-test/main/partition_myisam.test
+++ b/mysql-test/main/partition_myisam.test
@@ -121,12 +121,8 @@ FLUSH TABLES;
CHECK TABLE t1;
--error ER_FAILED_READ_FROM_PAR_FILE
SELECT * FROM t1;
---echo # Note that it is currently impossible to drop a partitioned table
---echo # without the .par file
---replace_result "Not owner" "Operation not permitted"
---error ER_GET_ERRNO
+--replace_result $MYSQLD_DATADIR ./
DROP TABLE t1;
---remove_file $MYSQLD_DATADIR/test/t1.frm
--remove_file $MYSQLD_DATADIR/test/t1#P#p0.MYI
--remove_file $MYSQLD_DATADIR/test/t1#P#p0.MYD
diff --git a/mysql-test/main/partition_not_blackhole.result b/mysql-test/main/partition_not_blackhole.result
index ff1e51df892..6cb8dea80c8 100644
--- a/mysql-test/main/partition_not_blackhole.result
+++ b/mysql-test/main/partition_not_blackhole.result
@@ -11,6 +11,6 @@ t1
SHOW CREATE TABLE t1;
ERROR HY000: Failed to read from the .par file
DROP TABLE t1;
-ERROR HY000: Got error 1 "Operation not permitted" from storage engine partition
+ERROR HY000: Got error 175 "File too short; Expected more data in file" from storage engine partition
t1.frm
t1.par
diff --git a/mysql-test/main/partition_pruning.result b/mysql-test/main/partition_pruning.result
index f8ae65fbcea..519bf590b9b 100644
--- a/mysql-test/main/partition_pruning.result
+++ b/mysql-test/main/partition_pruning.result
@@ -18,7 +18,7 @@ id select_type table partitions type possible_keys key key_len ref rows Extra
# # # # # # # # # 3 #
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < 7;
id select_type table partitions type possible_keys key key_len ref rows Extra
-# # # # # # # # # 10 #
+# # # # # # # # # 8 #
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= 1;
id select_type table partitions type possible_keys key key_len ref rows Extra
# # # # # # # # # 3 #
@@ -42,7 +42,7 @@ a
0
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < 1;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0 index PRIMARY PRIMARY 4 NULL 2 Using where; Using index
+1 SIMPLE t1 p0 range PRIMARY PRIMARY 4 NULL 2 Using where; Using index
SELECT * FROM t1 WHERE a < 2;
a
-1
@@ -50,7 +50,7 @@ a
1
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < 2;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0,p1 index PRIMARY PRIMARY 4 NULL 3 Using where; Using index
+1 SIMPLE t1 p0,p1 range PRIMARY PRIMARY 4 NULL 3 Using where; Using index
SELECT * FROM t1 WHERE a < 3;
a
-1
@@ -59,7 +59,7 @@ a
2
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < 3;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0,p1,p2 index PRIMARY PRIMARY 4 NULL 4 Using where; Using index
+1 SIMPLE t1 p0,p1,p2 range PRIMARY PRIMARY 4 NULL 4 Using where; Using index
SELECT * FROM t1 WHERE a < 4;
a
-1
@@ -69,7 +69,7 @@ a
3
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < 4;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0,p1,p2,p3 index PRIMARY PRIMARY 4 NULL 5 Using where; Using index
+1 SIMPLE t1 p0,p1,p2,p3 range PRIMARY PRIMARY 4 NULL 5 Using where; Using index
SELECT * FROM t1 WHERE a < 5;
a
-1
@@ -80,7 +80,7 @@ a
4
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < 5;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0,p1,p2,p3,p4 index PRIMARY PRIMARY 4 NULL 6 Using where; Using index
+1 SIMPLE t1 p0,p1,p2,p3,p4 range PRIMARY PRIMARY 4 NULL 6 Using where; Using index
SELECT * FROM t1 WHERE a < 6;
a
-1
@@ -92,7 +92,7 @@ a
5
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < 6;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0,p1,p2,p3,p4,p5 index PRIMARY PRIMARY 4 NULL 7 Using where; Using index
+1 SIMPLE t1 p0,p1,p2,p3,p4,p5 range PRIMARY PRIMARY 4 NULL 7 Using where; Using index
SELECT * FROM t1 WHERE a < 7;
a
-1
@@ -105,7 +105,7 @@ a
6
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < 7;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0,p1,p2,p3,p4,p5,max index PRIMARY PRIMARY 4 NULL 10 Using where; Using index
+1 SIMPLE t1 p0,p1,p2,p3,p4,p5,max range PRIMARY PRIMARY 4 NULL 8 Using where; Using index
SELECT * FROM t1 WHERE a <= 1;
a
-1
@@ -113,7 +113,7 @@ a
1
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= 1;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0,p1 index PRIMARY PRIMARY 4 NULL 3 Using where; Using index
+1 SIMPLE t1 p0,p1 range PRIMARY PRIMARY 4 NULL 3 Using where; Using index
SELECT * FROM t1 WHERE a <= 2;
a
-1
@@ -122,7 +122,7 @@ a
2
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= 2;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0,p1,p2 index PRIMARY PRIMARY 4 NULL 4 Using where; Using index
+1 SIMPLE t1 p0,p1,p2 range PRIMARY PRIMARY 4 NULL 4 Using where; Using index
SELECT * FROM t1 WHERE a <= 3;
a
-1
@@ -132,7 +132,7 @@ a
3
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= 3;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0,p1,p2,p3 index PRIMARY PRIMARY 4 NULL 5 Using where; Using index
+1 SIMPLE t1 p0,p1,p2,p3 range PRIMARY PRIMARY 4 NULL 5 Using where; Using index
SELECT * FROM t1 WHERE a <= 4;
a
-1
@@ -143,7 +143,7 @@ a
4
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= 4;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0,p1,p2,p3,p4 index PRIMARY PRIMARY 4 NULL 6 Using where; Using index
+1 SIMPLE t1 p0,p1,p2,p3,p4 range PRIMARY PRIMARY 4 NULL 6 Using where; Using index
SELECT * FROM t1 WHERE a <= 5;
a
-1
@@ -155,7 +155,7 @@ a
5
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= 5;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0,p1,p2,p3,p4,p5 index PRIMARY PRIMARY 4 NULL 7 Using where; Using index
+1 SIMPLE t1 p0,p1,p2,p3,p4,p5 range PRIMARY PRIMARY 4 NULL 7 Using where; Using index
SELECT * FROM t1 WHERE a <= 6;
a
-1
@@ -168,7 +168,7 @@ a
6
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= 6;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0,p1,p2,p3,p4,p5,max index PRIMARY PRIMARY 4 NULL 10 Using where; Using index
+1 SIMPLE t1 p0,p1,p2,p3,p4,p5,max range PRIMARY PRIMARY 4 NULL 8 Using where; Using index
SELECT * FROM t1 WHERE a <= 7;
a
-1
@@ -182,7 +182,7 @@ a
7
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= 7;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0,p1,p2,p3,p4,p5,max index PRIMARY PRIMARY 4 NULL 10 Using where; Using index
+1 SIMPLE t1 p0,p1,p2,p3,p4,p5,max range PRIMARY PRIMARY 4 NULL 9 Using where; Using index
SELECT * FROM t1 WHERE a = 1;
a
1
@@ -237,7 +237,7 @@ a
8
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 1;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p1,p2,p3,p4,p5,max index PRIMARY PRIMARY 4 NULL 8 Using where; Using index
+1 SIMPLE t1 p1,p2,p3,p4,p5,max range PRIMARY PRIMARY 4 NULL 8 Using where; Using index
SELECT * FROM t1 WHERE a >= 2;
a
2
@@ -249,7 +249,7 @@ a
8
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 2;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p2,p3,p4,p5,max index PRIMARY PRIMARY 4 NULL 7 Using where; Using index
+1 SIMPLE t1 p2,p3,p4,p5,max range PRIMARY PRIMARY 4 NULL 7 Using where; Using index
SELECT * FROM t1 WHERE a >= 3;
a
3
@@ -260,7 +260,7 @@ a
8
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 3;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p3,p4,p5,max index PRIMARY PRIMARY 4 NULL 6 Using where; Using index
+1 SIMPLE t1 p3,p4,p5,max range PRIMARY PRIMARY 4 NULL 6 Using where; Using index
SELECT * FROM t1 WHERE a >= 4;
a
4
@@ -270,7 +270,7 @@ a
8
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 4;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p4,p5,max index PRIMARY PRIMARY 4 NULL 5 Using where; Using index
+1 SIMPLE t1 p4,p5,max range PRIMARY PRIMARY 4 NULL 5 Using where; Using index
SELECT * FROM t1 WHERE a >= 5;
a
5
@@ -279,7 +279,7 @@ a
8
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 5;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p5,max index PRIMARY PRIMARY 4 NULL 4 Using where; Using index
+1 SIMPLE t1 p5,max range PRIMARY PRIMARY 4 NULL 4 Using where; Using index
SELECT * FROM t1 WHERE a >= 6;
a
6
@@ -287,14 +287,14 @@ a
8
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 6;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 max index PRIMARY PRIMARY 4 NULL 3 Using where; Using index
+1 SIMPLE t1 max range PRIMARY PRIMARY 4 NULL 3 Using where; Using index
SELECT * FROM t1 WHERE a >= 7;
a
7
8
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 7;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 max index PRIMARY PRIMARY 4 NULL 3 Using where; Using index
+1 SIMPLE t1 max range PRIMARY PRIMARY 4 NULL 2 Using where; Using index
SELECT * FROM t1 WHERE a > 1;
a
2
@@ -306,7 +306,7 @@ a
8
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 1;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p2,p3,p4,p5,max index PRIMARY PRIMARY 4 NULL 7 Using where; Using index
+1 SIMPLE t1 p2,p3,p4,p5,max range PRIMARY PRIMARY 4 NULL 7 Using where; Using index
SELECT * FROM t1 WHERE a > 2;
a
3
@@ -317,7 +317,7 @@ a
8
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 2;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p3,p4,p5,max index PRIMARY PRIMARY 4 NULL 6 Using where; Using index
+1 SIMPLE t1 p3,p4,p5,max range PRIMARY PRIMARY 4 NULL 6 Using where; Using index
SELECT * FROM t1 WHERE a > 3;
a
4
@@ -327,7 +327,7 @@ a
8
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 3;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p4,p5,max index PRIMARY PRIMARY 4 NULL 5 Using where; Using index
+1 SIMPLE t1 p4,p5,max range PRIMARY PRIMARY 4 NULL 5 Using where; Using index
SELECT * FROM t1 WHERE a > 4;
a
5
@@ -336,7 +336,7 @@ a
8
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 4;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p5,max index PRIMARY PRIMARY 4 NULL 4 Using where; Using index
+1 SIMPLE t1 p5,max range PRIMARY PRIMARY 4 NULL 4 Using where; Using index
SELECT * FROM t1 WHERE a > 5;
a
6
@@ -344,20 +344,20 @@ a
8
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 5;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 max index PRIMARY PRIMARY 4 NULL 3 Using where; Using index
+1 SIMPLE t1 max range PRIMARY PRIMARY 4 NULL 3 Using where; Using index
SELECT * FROM t1 WHERE a > 6;
a
7
8
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 6;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 max index PRIMARY PRIMARY 4 NULL 3 Using where; Using index
+1 SIMPLE t1 max range PRIMARY PRIMARY 4 NULL 2 Using where; Using index
SELECT * FROM t1 WHERE a > 7;
a
8
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 7;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 max index PRIMARY PRIMARY 4 NULL 3 Using where; Using index
+1 SIMPLE t1 max range PRIMARY PRIMARY 4 NULL 1 Using where; Using index
DROP TABLE t1;
CREATE TABLE t1 (a INT PRIMARY KEY)
PARTITION BY RANGE (a) (
@@ -374,7 +374,7 @@ a
0
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < 1;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0 index PRIMARY PRIMARY 4 NULL 2 Using where; Using index
+1 SIMPLE t1 p0 range PRIMARY PRIMARY 4 NULL 2 Using where; Using index
SELECT * FROM t1 WHERE a < 2;
a
-1
@@ -382,7 +382,7 @@ a
1
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < 2;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0,p1 index PRIMARY PRIMARY 4 NULL 3 Using where; Using index
+1 SIMPLE t1 p0,p1 range PRIMARY PRIMARY 4 NULL 3 Using where; Using index
SELECT * FROM t1 WHERE a < 3;
a
-1
@@ -391,7 +391,7 @@ a
2
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < 3;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0,p1,p2 index PRIMARY PRIMARY 4 NULL 4 Using where; Using index
+1 SIMPLE t1 p0,p1,p2 range PRIMARY PRIMARY 4 NULL 4 Using where; Using index
SELECT * FROM t1 WHERE a < 4;
a
-1
@@ -401,7 +401,7 @@ a
3
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < 4;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0,p1,p2,p3 index PRIMARY PRIMARY 4 NULL 5 Using where; Using index
+1 SIMPLE t1 p0,p1,p2,p3 range PRIMARY PRIMARY 4 NULL 5 Using where; Using index
SELECT * FROM t1 WHERE a < 5;
a
-1
@@ -412,7 +412,7 @@ a
4
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < 5;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0,p1,p2,p3,p4 index PRIMARY PRIMARY 4 NULL 6 Using where; Using index
+1 SIMPLE t1 p0,p1,p2,p3,p4 range PRIMARY PRIMARY 4 NULL 6 Using where; Using index
SELECT * FROM t1 WHERE a < 6;
a
-1
@@ -424,7 +424,7 @@ a
5
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < 6;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0,p1,p2,p3,p4,max index PRIMARY PRIMARY 4 NULL 9 Using where; Using index
+1 SIMPLE t1 p0,p1,p2,p3,p4,max range PRIMARY PRIMARY 4 NULL 7 Using where; Using index
SELECT * FROM t1 WHERE a <= 1;
a
-1
@@ -432,7 +432,7 @@ a
1
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= 1;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0,p1 index PRIMARY PRIMARY 4 NULL 3 Using where; Using index
+1 SIMPLE t1 p0,p1 range PRIMARY PRIMARY 4 NULL 3 Using where; Using index
SELECT * FROM t1 WHERE a <= 2;
a
-1
@@ -441,7 +441,7 @@ a
2
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= 2;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0,p1,p2 index PRIMARY PRIMARY 4 NULL 4 Using where; Using index
+1 SIMPLE t1 p0,p1,p2 range PRIMARY PRIMARY 4 NULL 4 Using where; Using index
SELECT * FROM t1 WHERE a <= 3;
a
-1
@@ -451,7 +451,7 @@ a
3
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= 3;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0,p1,p2,p3 index PRIMARY PRIMARY 4 NULL 5 Using where; Using index
+1 SIMPLE t1 p0,p1,p2,p3 range PRIMARY PRIMARY 4 NULL 5 Using where; Using index
SELECT * FROM t1 WHERE a <= 4;
a
-1
@@ -462,7 +462,7 @@ a
4
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= 4;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0,p1,p2,p3,p4 index PRIMARY PRIMARY 4 NULL 6 Using where; Using index
+1 SIMPLE t1 p0,p1,p2,p3,p4 range PRIMARY PRIMARY 4 NULL 6 Using where; Using index
SELECT * FROM t1 WHERE a <= 5;
a
-1
@@ -474,7 +474,7 @@ a
5
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= 5;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0,p1,p2,p3,p4,max index PRIMARY PRIMARY 4 NULL 9 Using where; Using index
+1 SIMPLE t1 p0,p1,p2,p3,p4,max range PRIMARY PRIMARY 4 NULL 7 Using where; Using index
SELECT * FROM t1 WHERE a <= 6;
a
-1
@@ -487,7 +487,7 @@ a
6
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= 6;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0,p1,p2,p3,p4,max index PRIMARY PRIMARY 4 NULL 9 Using where; Using index
+1 SIMPLE t1 p0,p1,p2,p3,p4,max range PRIMARY PRIMARY 4 NULL 8 Using where; Using index
SELECT * FROM t1 WHERE a = 1;
a
1
@@ -535,7 +535,7 @@ a
7
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 1;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p1,p2,p3,p4,max index PRIMARY PRIMARY 4 NULL 7 Using where; Using index
+1 SIMPLE t1 p1,p2,p3,p4,max range PRIMARY PRIMARY 4 NULL 7 Using where; Using index
SELECT * FROM t1 WHERE a >= 2;
a
2
@@ -546,7 +546,7 @@ a
7
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 2;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p2,p3,p4,max index PRIMARY PRIMARY 4 NULL 6 Using where; Using index
+1 SIMPLE t1 p2,p3,p4,max range PRIMARY PRIMARY 4 NULL 6 Using where; Using index
SELECT * FROM t1 WHERE a >= 3;
a
3
@@ -556,7 +556,7 @@ a
7
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 3;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p3,p4,max index PRIMARY PRIMARY 4 NULL 5 Using where; Using index
+1 SIMPLE t1 p3,p4,max range PRIMARY PRIMARY 4 NULL 5 Using where; Using index
SELECT * FROM t1 WHERE a >= 4;
a
4
@@ -565,7 +565,7 @@ a
7
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 4;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p4,max index PRIMARY PRIMARY 4 NULL 4 Using where; Using index
+1 SIMPLE t1 p4,max range PRIMARY PRIMARY 4 NULL 4 Using where; Using index
SELECT * FROM t1 WHERE a >= 5;
a
5
@@ -573,14 +573,14 @@ a
7
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 5;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 max index PRIMARY PRIMARY 4 NULL 3 Using where; Using index
+1 SIMPLE t1 max range PRIMARY PRIMARY 4 NULL 3 Using where; Using index
SELECT * FROM t1 WHERE a >= 6;
a
6
7
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 6;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 max index PRIMARY PRIMARY 4 NULL 3 Using where; Using index
+1 SIMPLE t1 max range PRIMARY PRIMARY 4 NULL 2 Using where; Using index
SELECT * FROM t1 WHERE a > 1;
a
2
@@ -591,7 +591,7 @@ a
7
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 1;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p2,p3,p4,max index PRIMARY PRIMARY 4 NULL 6 Using where; Using index
+1 SIMPLE t1 p2,p3,p4,max range PRIMARY PRIMARY 4 NULL 6 Using where; Using index
SELECT * FROM t1 WHERE a > 2;
a
3
@@ -601,7 +601,7 @@ a
7
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 2;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p3,p4,max index PRIMARY PRIMARY 4 NULL 5 Using where; Using index
+1 SIMPLE t1 p3,p4,max range PRIMARY PRIMARY 4 NULL 5 Using where; Using index
SELECT * FROM t1 WHERE a > 3;
a
4
@@ -610,7 +610,7 @@ a
7
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 3;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p4,max index PRIMARY PRIMARY 4 NULL 4 Using where; Using index
+1 SIMPLE t1 p4,max range PRIMARY PRIMARY 4 NULL 4 Using where; Using index
SELECT * FROM t1 WHERE a > 4;
a
5
@@ -618,20 +618,20 @@ a
7
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 4;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 max index PRIMARY PRIMARY 4 NULL 3 Using where; Using index
+1 SIMPLE t1 max range PRIMARY PRIMARY 4 NULL 3 Using where; Using index
SELECT * FROM t1 WHERE a > 5;
a
6
7
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 5;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 max index PRIMARY PRIMARY 4 NULL 3 Using where; Using index
+1 SIMPLE t1 max range PRIMARY PRIMARY 4 NULL 2 Using where; Using index
SELECT * FROM t1 WHERE a > 6;
a
7
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 6;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 max index PRIMARY PRIMARY 4 NULL 3 Using where; Using index
+1 SIMPLE t1 max range PRIMARY PRIMARY 4 NULL 1 Using where; Using index
DROP TABLE t1;
# test of RANGE and index
CREATE TABLE t1 (a DATE, KEY(a))
@@ -744,62 +744,62 @@ a
1001-01-01
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < '1001-01-01';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 pNULL,p0001-01-01,p1001-01-01 index a a 4 NULL 6 Using where; Using index
+1 SIMPLE t1 pNULL,p0001-01-01,p1001-01-01 range a a 4 NULL 5 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= '1001-01-01';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 pNULL,p0001-01-01,p1001-01-01 index a a 4 NULL 6 Using where; Using index
+1 SIMPLE t1 pNULL,p0001-01-01,p1001-01-01 range a a 4 NULL 5 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= '1001-01-01';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 pNULL,p1001-01-01,p2001-01-01 index a a 4 NULL 5 Using where; Using index
+1 SIMPLE t1 pNULL,p1001-01-01,p2001-01-01 range a a 4 NULL 3 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > '1001-01-01';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 pNULL,p2001-01-01 index a a 4 NULL 4 Using where; Using index
+1 SIMPLE t1 pNULL,p2001-01-01 range a a 4 NULL 2 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = '1001-01-01';
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 p1001-01-01 system a NULL NULL NULL 1
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < '1001-00-00';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 pNULL,p0001-01-01,p1001-01-01 index a a 4 NULL 6 Using where; Using index
+1 SIMPLE t1 pNULL,p0001-01-01,p1001-01-01 range a a 4 NULL 4 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= '1001-00-00';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 pNULL,p0001-01-01,p1001-01-01 index a a 4 NULL 6 Using where; Using index
+1 SIMPLE t1 pNULL,p0001-01-01,p1001-01-01 range a a 4 NULL 5 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= '1001-00-00';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 pNULL,p1001-01-01,p2001-01-01 index a a 4 NULL 5 Using where; Using index
+1 SIMPLE t1 pNULL,p1001-01-01,p2001-01-01 range a a 4 NULL 4 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > '1001-00-00';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 pNULL,p1001-01-01,p2001-01-01 index a a 4 NULL 5 Using where; Using index
+1 SIMPLE t1 pNULL,p1001-01-01,p2001-01-01 range a a 4 NULL 3 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = '1001-00-00';
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 pNULL ref a a 4 const 1 Using index
# Disabling warnings for the invalid date
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < '1999-02-31';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 pNULL,p0001-01-01,p1001-01-01,p2001-01-01 index a a 4 NULL 7 Using where; Using index
+1 SIMPLE t1 pNULL,p0001-01-01,p1001-01-01,p2001-01-01 range a a 4 NULL 7 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= '1999-02-31';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 pNULL,p0001-01-01,p1001-01-01,p2001-01-01 index a a 4 NULL 7 Using where; Using index
+1 SIMPLE t1 pNULL,p0001-01-01,p1001-01-01,p2001-01-01 range a a 4 NULL 7 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= '1999-02-31';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 pNULL,p2001-01-01 index a a 4 NULL 4 Using where; Using index
+1 SIMPLE t1 pNULL,p2001-01-01 range a a 4 NULL 2 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > '1999-02-31';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 pNULL,p2001-01-01 index a a 4 NULL 4 Using where; Using index
+1 SIMPLE t1 pNULL,p2001-01-01 range a a 4 NULL 2 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = '1999-02-31';
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 pNULL ref a a 4 const 1 Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1002-00-00';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 pNULL,p0001-01-01,p1001-01-01,p2001-01-01 index a a 4 NULL 7 Using where; Using index
+1 SIMPLE t1 pNULL,p0001-01-01,p1001-01-01,p2001-01-01 range a a 4 NULL 7 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1001-01-01';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 pNULL,p0001-01-01,p1001-01-01 index a a 4 NULL 6 Using where; Using index
+1 SIMPLE t1 pNULL,p0001-01-01,p1001-01-01 range a a 4 NULL 5 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a BETWEEN '0001-01-02' AND '1002-00-00';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 pNULL,p1001-01-01,p2001-01-01 index a a 4 NULL 5 Using where; Using index
+1 SIMPLE t1 pNULL,p1001-01-01,p2001-01-01 range a a 4 NULL 4 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a BETWEEN '0001-01-01' AND '1001-01-01';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 pNULL,p0001-01-01,p1001-01-01 index a a 4 NULL 6 Using where; Using index
+1 SIMPLE t1 pNULL,p0001-01-01,p1001-01-01 range a a 4 NULL 3 Using where; Using index
# test without index
ALTER TABLE t1 DROP KEY a;
SELECT * FROM t1 WHERE a < '1001-01-01';
@@ -1073,62 +1073,62 @@ a
1001-01-01
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < '1001-01-01';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02 index a a 4 NULL 5 Using where; Using index
+1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02 range a a 4 NULL 4 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= '1001-01-01';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02,p1001-01-01 index a a 4 NULL 6 Using where; Using index
+1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02,p1001-01-01 range a a 4 NULL 5 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= '1001-01-01';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p2001-01-01,pNULL,p1001-01-01 index a a 4 NULL 5 Using where; Using index
+1 SIMPLE t1 p2001-01-01,pNULL,p1001-01-01 range a a 4 NULL 3 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > '1001-01-01';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p2001-01-01,pNULL index a a 4 NULL 4 Using where; Using index
+1 SIMPLE t1 p2001-01-01,pNULL range a a 4 NULL 2 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = '1001-01-01';
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 p1001-01-01 system a NULL NULL NULL 1
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < '1001-00-00';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02 index a a 4 NULL 5 Using where; Using index
+1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02 range a a 4 NULL 3 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= '1001-00-00';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02 index a a 4 NULL 5 Using where; Using index
+1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02 range a a 4 NULL 4 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= '1001-00-00';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p2001-01-01,pNULL,p1001-01-01 index a a 4 NULL 5 Using where; Using index
+1 SIMPLE t1 p2001-01-01,pNULL,p1001-01-01 range a a 4 NULL 4 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > '1001-00-00';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p2001-01-01,pNULL,p1001-01-01 index a a 4 NULL 5 Using where; Using index
+1 SIMPLE t1 p2001-01-01,pNULL,p1001-01-01 range a a 4 NULL 3 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = '1001-00-00';
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 pNULL ref a a 4 const 1 Using index
# Disabling warnings for the invalid date
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < '1999-02-31';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02,p1001-01-01 index a a 4 NULL 6 Using where; Using index
+1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02,p1001-01-01 range a a 4 NULL 6 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= '1999-02-31';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02,p1001-01-01 index a a 4 NULL 6 Using where; Using index
+1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02,p1001-01-01 range a a 4 NULL 6 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= '1999-02-31';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p2001-01-01,pNULL index a a 4 NULL 4 Using where; Using index
+1 SIMPLE t1 p2001-01-01,pNULL range a a 4 NULL 2 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > '1999-02-31';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p2001-01-01,pNULL index a a 4 NULL 4 Using where; Using index
+1 SIMPLE t1 p2001-01-01,pNULL range a a 4 NULL 2 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = '1999-02-31';
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 pNULL ref a a 4 const 1 Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1002-00-00';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02,p1001-01-01 index a a 4 NULL 6 Using where; Using index
+1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02,p1001-01-01 range a a 4 NULL 6 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1001-01-01';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02,p1001-01-01 index a a 4 NULL 6 Using where; Using index
+1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02,p1001-01-01 range a a 4 NULL 5 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a BETWEEN '0001-01-02' AND '1002-00-00';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 pNULL,p1001-01-01 index a a 4 NULL 4 Using where; Using index
+1 SIMPLE t1 pNULL,p1001-01-01 range a a 4 NULL 3 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a BETWEEN '0001-01-01' AND '1001-01-01';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0001-01-01,pNULL,p1001-01-01 index a a 4 NULL 5 Using where; Using index
+1 SIMPLE t1 p0001-01-01,pNULL,p1001-01-01 range a a 4 NULL 3 Using where; Using index
# test without index
ALTER TABLE t1 DROP KEY a;
SELECT * FROM t1 WHERE a < '1001-01-01';
@@ -1402,62 +1402,62 @@ a
1001-01-01
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < '1001-01-01';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02 index a a 4 NULL 5 Using where; Using index
+1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02 range a a 4 NULL 4 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= '1001-01-01';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02,p1001-01-01 index a a 4 NULL 6 Using where; Using index
+1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02,p1001-01-01 range a a 4 NULL 5 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= '1001-01-01';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p2001-01-01,pNULL,p1001-01-01 index a a 4 NULL 5 Using where; Using index
+1 SIMPLE t1 p2001-01-01,pNULL,p1001-01-01 range a a 4 NULL 3 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > '1001-01-01';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p2001-01-01,pNULL index a a 4 NULL 4 Using where; Using index
+1 SIMPLE t1 p2001-01-01,pNULL range a a 4 NULL 2 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = '1001-01-01';
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 p1001-01-01 system a NULL NULL NULL 1
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < '1001-00-00';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02 index a a 4 NULL 5 Using where; Using index
+1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02 range a a 4 NULL 3 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= '1001-00-00';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02 index a a 4 NULL 5 Using where; Using index
+1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02 range a a 4 NULL 4 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= '1001-00-00';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p2001-01-01,pNULL,p1001-01-01 index a a 4 NULL 5 Using where; Using index
+1 SIMPLE t1 p2001-01-01,pNULL,p1001-01-01 range a a 4 NULL 4 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > '1001-00-00';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p2001-01-01,pNULL,p1001-01-01 index a a 4 NULL 5 Using where; Using index
+1 SIMPLE t1 p2001-01-01,pNULL,p1001-01-01 range a a 4 NULL 3 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = '1001-00-00';
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 pNULL ref a a 4 const 1 Using index
# Disabling warnings for the invalid date
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < '1999-02-31';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02,p1001-01-01 index a a 4 NULL 6 Using where; Using index
+1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02,p1001-01-01 range a a 4 NULL 6 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= '1999-02-31';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02,p1001-01-01 index a a 4 NULL 6 Using where; Using index
+1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02,p1001-01-01 range a a 4 NULL 6 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= '1999-02-31';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p2001-01-01,pNULL index a a 4 NULL 4 Using where; Using index
+1 SIMPLE t1 p2001-01-01,pNULL range a a 4 NULL 2 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > '1999-02-31';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p2001-01-01,pNULL index a a 4 NULL 4 Using where; Using index
+1 SIMPLE t1 p2001-01-01,pNULL range a a 4 NULL 2 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = '1999-02-31';
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 pNULL ref a a 4 const 1 Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1002-00-00';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02,p1001-01-01 index a a 4 NULL 6 Using where; Using index
+1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02,p1001-01-01 range a a 4 NULL 6 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1001-01-01';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02,p1001-01-01 index a a 4 NULL 6 Using where; Using index
+1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02,p1001-01-01 range a a 4 NULL 5 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a BETWEEN '0001-01-02' AND '1002-00-00';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 pNULL,p1001-01-01 index a a 4 NULL 4 Using where; Using index
+1 SIMPLE t1 pNULL,p1001-01-01 range a a 4 NULL 3 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a BETWEEN '0001-01-01' AND '1001-01-01';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0001-01-01,pNULL,p1001-01-01 index a a 4 NULL 5 Using where; Using index
+1 SIMPLE t1 p0001-01-01,pNULL,p1001-01-01 range a a 4 NULL 3 Using where; Using index
# test without index
ALTER TABLE t1 DROP KEY a;
SELECT * FROM t1 WHERE a < '1001-01-01';
@@ -2676,13 +2676,13 @@ explain partitions
select * from t1 X, t1 Y
where X.b = Y.b and (X.a=1 or X.a=2) and (Y.a=2 or Y.a=3);
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE X p1,p2 ALL a,b NULL NULL NULL 8 Using where
-1 SIMPLE Y p2,p3 ALL a,b NULL NULL NULL 8 Using where; Using join buffer (flat, BNL join)
+1 SIMPLE X p1,p2 range a,b a 4 NULL 4 Using where
+1 SIMPLE Y p2,p3 ref|filter a,b b|a 4|4 test.X.b 2 (50%) Using where; Using rowid filter
explain partitions
select * from t1 X, t1 Y where X.a = Y.a and (X.a=1 or X.a=2);
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE X p1,p2 ALL a NULL NULL NULL 8 Using where
-1 SIMPLE Y p1,p2 ALL a NULL NULL NULL 8 Using where; Using join buffer (flat, BNL join)
+1 SIMPLE X p1,p2 range a a 4 NULL 4 Using where
+1 SIMPLE Y p1,p2 ref a a 4 test.X.a 2
drop table t1;
create table t1 (a int) partition by hash(a) partitions 20;
insert into t1 values (1),(2),(3);
diff --git a/mysql-test/main/partition_range.result b/mysql-test/main/partition_range.result
index 6eb7147b461..ac8d34c71a2 100644
--- a/mysql-test/main/partition_range.result
+++ b/mysql-test/main/partition_range.result
@@ -2,16 +2,25 @@ drop table if exists t1, t2;
#
# Bug#48229: group by performance issue of partitioned table
#
-CREATE TABLE t1 (
-a INT,
-b INT,
-KEY a (a,b)
-)
-PARTITION BY HASH (a) PARTITIONS 1;
-INSERT INTO t1 VALUES (0, 580092), (3, 894076), (4, 805483), (4, 913540), (6, 611137), (8, 171602), (9, 599495), (9, 746305), (10, 272829), (10, 847519), (12, 258869), (12, 929028), (13, 288970), (15, 20971), (15, 105839), (16, 788272), (17, 76914), (18, 827274), (19, 802258), (20, 123677), (20, 587729), (22, 701449), (25, 31565), (25, 230782), (25, 442887), (25, 733139), (25, 851020);
-EXPLAIN SELECT a, MAX(b) FROM t1 WHERE a IN (10, 100, 3) GROUP BY a;
+CREATE TABLE t1 (a INT,b INT,KEY a (a,b));
+INSERT INTO `t1` VALUES (0,580092),(3000,894076),(4000,805483),(4000,913540),(6000,611137),(8000,171602),(9000,599495),(9000,746305),(10000,272829),(10000,847519),(12000,258869),(12000,929028),(13000,288970),(15000,20971),(15000,105839),(16000,788272),(17000,76914),(18000,827274),(19000,802258),(20000,123677),(20000,587729),(22000,701449),(25000,31565),(25000,230782),(25000,442887),(25000,733139),(25000,851020);
+EXPLAIN SELECT a, MAX(b) FROM t1 WHERE a IN (10000, 1000000, 3000) GROUP BY a;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range a a 5 NULL 1 Using where; Using index for group-by
+alter table t1 partition by hash(a) partitions 1;
+EXPLAIN SELECT a, MAX(b) FROM t1 WHERE a IN (10000, 1000000, 3000) GROUP BY a;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range a a 5 NULL 1 Using where; Using index for group-by
+alter table t1 remove partitioning;
+insert into t1 (a,b) select seq,seq from seq_4001_to_4100;
+insert into t1 (a,b) select seq,seq from seq_10001_to_10100;
+EXPLAIN SELECT a, MAX(b) FROM t1 WHERE a IN (10000, 1000000, 3000) GROUP BY a;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range a a 5 NULL 4 Using where; Using index
+alter table t1 partition by hash(a) partitions 1;
+EXPLAIN SELECT a, MAX(b) FROM t1 WHERE a IN (10000, 1000000, 3000) GROUP BY a;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range a a 5 NULL 4 Using where; Using index
DROP TABLE t1;
create table t1 (a DATETIME)
partition by range (TO_DAYS(a))
diff --git a/mysql-test/main/partition_range.test b/mysql-test/main/partition_range.test
index 52497764241..f56851217cf 100644
--- a/mysql-test/main/partition_range.test
+++ b/mysql-test/main/partition_range.test
@@ -3,7 +3,8 @@
# Simple test for the partition storage engine
# Focuses on range partitioning tests
#
--- source include/have_partition.inc
+--source include/have_partition.inc
+--source include/have_sequence.inc
--disable_warnings
drop table if exists t1, t2;
@@ -12,19 +13,23 @@ drop table if exists t1, t2;
--echo #
--echo # Bug#48229: group by performance issue of partitioned table
--echo #
-CREATE TABLE t1 (
- a INT,
- b INT,
- KEY a (a,b)
-)
-PARTITION BY HASH (a) PARTITIONS 1;
-# insert some rows (i.e. so that rows/blocks > 1)
-INSERT INTO t1 VALUES (0, 580092), (3, 894076), (4, 805483), (4, 913540), (6, 611137), (8, 171602), (9, 599495), (9, 746305), (10, 272829), (10, 847519), (12, 258869), (12, 929028), (13, 288970), (15, 20971), (15, 105839), (16, 788272), (17, 76914), (18, 827274), (19, 802258), (20, 123677), (20, 587729), (22, 701449), (25, 31565), (25, 230782), (25, 442887), (25, 733139), (25, 851020);
+CREATE TABLE t1 (a INT,b INT,KEY a (a,b));
+INSERT INTO `t1` VALUES (0,580092),(3000,894076),(4000,805483),(4000,913540),(6000,611137),(8000,171602),(9000,599495),(9000,746305),(10000,272829),(10000,847519),(12000,258869),(12000,929028),(13000,288970),(15000,20971),(15000,105839),(16000,788272),(17000,76914),(18000,827274),(19000,802258),(20000,123677),(20000,587729),(22000,701449),(25000,31565),(25000,230782),(25000,442887),(25000,733139),(25000,851020);
+
+EXPLAIN SELECT a, MAX(b) FROM t1 WHERE a IN (10000, 1000000, 3000) GROUP BY a;
+
+alter table t1 partition by hash(a) partitions 1;
+EXPLAIN SELECT a, MAX(b) FROM t1 WHERE a IN (10000, 1000000, 3000) GROUP BY a;
+alter table t1 remove partitioning;
+
+insert into t1 (a,b) select seq,seq from seq_4001_to_4100;
+insert into t1 (a,b) select seq,seq from seq_10001_to_10100;
-# Before the fix the 'Extra' column showed 'Using index for group-by'
-EXPLAIN SELECT a, MAX(b) FROM t1 WHERE a IN (10, 100, 3) GROUP BY a;
+EXPLAIN SELECT a, MAX(b) FROM t1 WHERE a IN (10000, 1000000, 3000) GROUP BY a;
+alter table t1 partition by hash(a) partitions 1;
+EXPLAIN SELECT a, MAX(b) FROM t1 WHERE a IN (10000, 1000000, 3000) GROUP BY a;
DROP TABLE t1;
#
diff --git a/mysql-test/main/partition_utf8-debug.result b/mysql-test/main/partition_utf8-debug.result
new file mode 100644
index 00000000000..569bec3ea8a
--- /dev/null
+++ b/mysql-test/main/partition_utf8-debug.result
@@ -0,0 +1,88 @@
+#
+# Start of 10.5 tests
+#
+#
+# MDEV-20856 Bad values in metadata views for partitions on VARBINARY
+#
+SET NAMES utf8;
+SET @save_dbug = @@debug_dbug;
+SET SESSION debug_dbug="+d,generate_partition_syntax_for_frm";
+CREATE OR REPLACE TABLE t1 (a VARCHAR(10)) CHARACTER SET latin1
+PARTITION BY LIST COLUMNS (a) (PARTITION p0 VALUES IN (_utf8'á¹ '));
+ERROR HY000: This partition function is not allowed
+CREATE OR REPLACE TABLE t1 (a VARCHAR(10)) CHARACTER SET latin1
+PARTITION BY LIST COLUMNS (a) (PARTITION p0 VALUES IN ('á¹ '));
+ERROR HY000: This partition function is not allowed
+CREATE OR REPLACE TABLE t1 (a VARCHAR(10)) CHARACTER SET latin1
+PARTITION BY LIST COLUMNS (a) (PARTITION p0 VALUES IN (_latin1 0xDF));
+Warnings:
+Note 1003 PARTITION BY LIST COLUMNS(`a`)
+(PARTITION `p0` VALUES IN (_latin1 0xdf) ENGINE = MyISAM)
+SELECT PARTITION_DESCRIPTION FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_NAME='t1';
+PARTITION_DESCRIPTION
+'ß'
+DROP TABLE t1;
+CREATE OR REPLACE TABLE t1 (a VARCHAR(10)) CHARACTER SET latin1
+PARTITION BY LIST COLUMNS (a) (PARTITION p0 VALUES IN (_utf8'ß'));
+Warnings:
+Note 1003 PARTITION BY LIST COLUMNS(`a`)
+(PARTITION `p0` VALUES IN (_latin1 0xdf) ENGINE = MyISAM)
+SELECT PARTITION_DESCRIPTION FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_NAME='t1';
+PARTITION_DESCRIPTION
+'ß'
+DROP TABLE t1;
+CREATE OR REPLACE TABLE t1 (a VARCHAR(10)) CHARACTER SET latin1
+PARTITION BY LIST COLUMNS (a) (PARTITION p0 VALUES IN ('ß'));
+Warnings:
+Note 1003 PARTITION BY LIST COLUMNS(`a`)
+(PARTITION `p0` VALUES IN (_latin1 0xdf) ENGINE = MyISAM)
+DROP TABLE t1;
+CREATE OR REPLACE TABLE t1 (a VARCHAR(10)) CHARACTER SET utf8
+PARTITION BY LIST COLUMNS (a) (PARTITION p0 VALUES IN (_utf8'ß'));
+Warnings:
+Note 1003 PARTITION BY LIST COLUMNS(`a`)
+(PARTITION `p0` VALUES IN (_utf8 0xc39f) ENGINE = MyISAM)
+SELECT PARTITION_DESCRIPTION FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_NAME='t1';
+PARTITION_DESCRIPTION
+'ß'
+DROP TABLE t1;
+CREATE OR REPLACE TABLE t1 (a VARCHAR(10)) CHARACTER SET utf8
+PARTITION BY LIST COLUMNS (a) (PARTITION p0 VALUES IN ('ß'));
+Warnings:
+Note 1003 PARTITION BY LIST COLUMNS(`a`)
+(PARTITION `p0` VALUES IN (_utf8 0xc39f) ENGINE = MyISAM)
+SELECT PARTITION_DESCRIPTION FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_NAME='t1';
+PARTITION_DESCRIPTION
+'ß'
+DROP TABLE t1;
+CREATE OR REPLACE TABLE t1 (a VARBINARY(10)) CHARACTER SET utf8
+PARTITION BY LIST COLUMNS (a) (PARTITION p0 VALUES IN (0xFF));
+Warnings:
+Note 1003 PARTITION BY LIST COLUMNS(`a`)
+(PARTITION `p0` VALUES IN (_binary 0xff) ENGINE = MyISAM)
+SELECT PARTITION_DESCRIPTION FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_NAME='t1';
+PARTITION_DESCRIPTION
+_binary 0xff
+DROP TABLE t1;
+CREATE OR REPLACE TABLE t1 (a DATE) CHARACTER SET utf8
+PARTITION BY LIST COLUMNS (a) (PARTITION p0 VALUES IN (FROM_DAYS(NULL)));
+Warnings:
+Note 1003 PARTITION BY LIST COLUMNS(`a`)
+(PARTITION `p0` VALUES IN (NULL) ENGINE = MyISAM)
+SELECT PARTITION_DESCRIPTION FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_NAME='t1';
+PARTITION_DESCRIPTION
+NULL
+DROP TABLE t1;
+CREATE OR REPLACE TABLE t1 (a DATE) CHARACTER SET utf8
+PARTITION BY LIST COLUMNS (a) (PARTITION p0 VALUES IN (FROM_DAYS(100)));
+Warnings:
+Note 1003 PARTITION BY LIST COLUMNS(`a`)
+(PARTITION `p0` VALUES IN (_utf8 0x303030302d30302d3030) ENGINE = MyISAM)
+SELECT PARTITION_DESCRIPTION FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_NAME='t1';
+PARTITION_DESCRIPTION
+'0000-00-00'
+DROP TABLE t1;
+SET debug_dbug=@save_dbug;
+#
+# End of 10.5 tests
+#
diff --git a/mysql-test/main/partition_utf8-debug.test b/mysql-test/main/partition_utf8-debug.test
new file mode 100644
index 00000000000..c321c944676
--- /dev/null
+++ b/mysql-test/main/partition_utf8-debug.test
@@ -0,0 +1,71 @@
+--source include/have_partition.inc
+--source include/have_debug_sync.inc
+
+--echo #
+--echo # Start of 10.5 tests
+--echo #
+
+--echo #
+--echo # MDEV-20856 Bad values in metadata views for partitions on VARBINARY
+--echo #
+
+SET NAMES utf8;
+SET @save_dbug = @@debug_dbug;
+SET SESSION debug_dbug="+d,generate_partition_syntax_for_frm";
+
+
+--error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
+CREATE OR REPLACE TABLE t1 (a VARCHAR(10)) CHARACTER SET latin1
+ PARTITION BY LIST COLUMNS (a) (PARTITION p0 VALUES IN (_utf8'á¹ '));
+
+--error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
+CREATE OR REPLACE TABLE t1 (a VARCHAR(10)) CHARACTER SET latin1
+ PARTITION BY LIST COLUMNS (a) (PARTITION p0 VALUES IN ('á¹ '));
+
+CREATE OR REPLACE TABLE t1 (a VARCHAR(10)) CHARACTER SET latin1
+ PARTITION BY LIST COLUMNS (a) (PARTITION p0 VALUES IN (_latin1 0xDF));
+SELECT PARTITION_DESCRIPTION FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_NAME='t1';
+DROP TABLE t1;
+
+CREATE OR REPLACE TABLE t1 (a VARCHAR(10)) CHARACTER SET latin1
+ PARTITION BY LIST COLUMNS (a) (PARTITION p0 VALUES IN (_utf8'ß'));
+SELECT PARTITION_DESCRIPTION FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_NAME='t1';
+DROP TABLE t1;
+
+CREATE OR REPLACE TABLE t1 (a VARCHAR(10)) CHARACTER SET latin1
+ PARTITION BY LIST COLUMNS (a) (PARTITION p0 VALUES IN ('ß'));
+DROP TABLE t1;
+
+CREATE OR REPLACE TABLE t1 (a VARCHAR(10)) CHARACTER SET utf8
+ PARTITION BY LIST COLUMNS (a) (PARTITION p0 VALUES IN (_utf8'ß'));
+SELECT PARTITION_DESCRIPTION FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_NAME='t1';
+DROP TABLE t1;
+
+CREATE OR REPLACE TABLE t1 (a VARCHAR(10)) CHARACTER SET utf8
+ PARTITION BY LIST COLUMNS (a) (PARTITION p0 VALUES IN ('ß'));
+SELECT PARTITION_DESCRIPTION FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_NAME='t1';
+DROP TABLE t1;
+
+
+CREATE OR REPLACE TABLE t1 (a VARBINARY(10)) CHARACTER SET utf8
+ PARTITION BY LIST COLUMNS (a) (PARTITION p0 VALUES IN (0xFF));
+SELECT PARTITION_DESCRIPTION FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_NAME='t1';
+DROP TABLE t1;
+
+
+CREATE OR REPLACE TABLE t1 (a DATE) CHARACTER SET utf8
+ PARTITION BY LIST COLUMNS (a) (PARTITION p0 VALUES IN (FROM_DAYS(NULL)));
+SELECT PARTITION_DESCRIPTION FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_NAME='t1';
+DROP TABLE t1;
+
+CREATE OR REPLACE TABLE t1 (a DATE) CHARACTER SET utf8
+ PARTITION BY LIST COLUMNS (a) (PARTITION p0 VALUES IN (FROM_DAYS(100)));
+SELECT PARTITION_DESCRIPTION FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_NAME='t1';
+DROP TABLE t1;
+
+
+SET debug_dbug=@save_dbug;
+
+--echo #
+--echo # End of 10.5 tests
+--echo #
diff --git a/mysql-test/main/partition_utf8.result b/mysql-test/main/partition_utf8.result
index 956ee790160..185d081b1c9 100644
--- a/mysql-test/main/partition_utf8.result
+++ b/mysql-test/main/partition_utf8.result
@@ -67,3 +67,25 @@ ERROR HY000: This partition function is not allowed
#
# End of 10.3 tests
#
+#
+# Start of 10.5 tests
+#
+#
+# MDEV-20856 Bad values in metadata views for partitions on VARBINARY
+#
+CREATE TABLE t1 (a VARBINARY(10)) CHARACTER SET utf8
+PARTITION BY LIST COLUMNS (a) (PARTITION p0 VALUES IN (0xFF));
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varbinary(10) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=utf8
+ PARTITION BY LIST COLUMNS(`a`)
+(PARTITION `p0` VALUES IN (_binary 0xff) ENGINE = MyISAM)
+SELECT PARTITION_DESCRIPTION FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_NAME='t1';
+PARTITION_DESCRIPTION
+_binary 0xff
+DROP TABLE t1;
+#
+# End of 10.5 tests
+#
diff --git a/mysql-test/main/partition_utf8.test b/mysql-test/main/partition_utf8.test
index 65050429a52..9bfa352ab25 100644
--- a/mysql-test/main/partition_utf8.test
+++ b/mysql-test/main/partition_utf8.test
@@ -62,3 +62,22 @@ CREATE OR REPLACE TABLE t1 (a TIME)
--echo #
--echo # End of 10.3 tests
--echo #
+
+--echo #
+--echo # Start of 10.5 tests
+--echo #
+
+--echo #
+--echo # MDEV-20856 Bad values in metadata views for partitions on VARBINARY
+--echo #
+
+CREATE TABLE t1 (a VARBINARY(10)) CHARACTER SET utf8
+ PARTITION BY LIST COLUMNS (a) (PARTITION p0 VALUES IN (0xFF));
+SHOW CREATE TABLE t1;
+SELECT PARTITION_DESCRIPTION FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_NAME='t1';
+DROP TABLE t1;
+
+
+--echo #
+--echo # End of 10.5 tests
+--echo #
diff --git a/mysql-test/main/percona_nonflushing_analyze_debug.result b/mysql-test/main/percona_nonflushing_analyze_debug.result
new file mode 100644
index 00000000000..78da085f26f
--- /dev/null
+++ b/mysql-test/main/percona_nonflushing_analyze_debug.result
@@ -0,0 +1,28 @@
+CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1), (2), (3);
+connect con1,localhost,root;
+SET DEBUG_SYNC="handler_ha_index_next_end SIGNAL idx_scan_in_progress WAIT_FOR finish_scan";
+SELECT * FROM t1;
+connection default;
+SET DEBUG_SYNC="now WAIT_FOR idx_scan_in_progress";
+set @tmp=@@use_stat_tables;
+set use_stat_tables='preferably_for_queries';
+ANALYZE TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status OK
+set use_stat_tables=@tmp;
+SELECT * FROM t1;
+a
+1
+2
+3
+SET DEBUG_SYNC="now SIGNAL finish_scan";
+connection con1;
+a
+1
+2
+3
+disconnect con1;
+connection default;
+SET DEBUG_SYNC='reset';
+DROP TABLE t1;
diff --git a/mysql-test/main/percona_nonflushing_analyze_debug.test b/mysql-test/main/percona_nonflushing_analyze_debug.test
new file mode 100644
index 00000000000..4c9c2dcb768
--- /dev/null
+++ b/mysql-test/main/percona_nonflushing_analyze_debug.test
@@ -0,0 +1,12 @@
+--source include/have_debug_sync.inc
+--source include/have_innodb.inc
+
+#set use_stat_tables='preferably_for_queries';
+CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1), (2), (3);
+
+--let $percona_nonflushing_analyze_table= t1
+--source include/percona_nonflushing_analyze_debug.inc
+
+DROP TABLE t1;
+
diff --git a/mysql-test/main/plugin_innodb.result b/mysql-test/main/plugin_innodb.result
index c55bfd779c2..f1d9a28ec95 100644
--- a/mysql-test/main/plugin_innodb.result
+++ b/mysql-test/main/plugin_innodb.result
@@ -1,8 +1,8 @@
-install plugin example soname 'ha_example.so';
+install plugin example soname 'ha_example';
create table t1(a int) engine=example;
drop table t1;
alter table mysql.plugin engine=innodb;
-restart
+ --example[=name] Enable or disable EXAMPLE plugin. One of: ON, OFF, FORCE
# restart
create table t1(a int) engine=example;
select * from t1;
diff --git a/mysql-test/main/plugin_innodb.test b/mysql-test/main/plugin_innodb.test
index a9c7f04bd4a..d458299a900 100644
--- a/mysql-test/main/plugin_innodb.test
+++ b/mysql-test/main/plugin_innodb.test
@@ -2,14 +2,22 @@
--source include/have_example_plugin.inc
--source include/have_static_innodb.inc
---replace_regex /\.dll/.so/
-eval install plugin example soname '$HA_EXAMPLE_SO';
+install plugin example soname 'ha_example';
create table t1(a int) engine=example;
drop table t1;
alter table mysql.plugin engine=innodb;
---echo restart
---source include/restart_mysqld.inc
+--source include/shutdown_mysqld.inc
+
+--exec $MYSQLD_CMD --innodb --help --verbose > $MYSQL_TMP_DIR/plugin_innodb.txt 2> $MYSQL_TMP_DIR/plugin_innodb.err
+perl;
+ open(F, '<', "$ENV{MYSQL_TMP_DIR}/plugin_innodb.txt") or die;
+ while (<F>) {
+ print if /EXAMPLE/;
+ }
+EOF
+
+--source include/start_mysqld.inc
create table t1(a int) engine=example;
select * from t1;
diff --git a/mysql-test/main/pool_of_threads.result b/mysql-test/main/pool_of_threads.result
index 3f5ce1a37e5..d4a7d9092f4 100644
--- a/mysql-test/main/pool_of_threads.result
+++ b/mysql-test/main/pool_of_threads.result
@@ -509,7 +509,7 @@ insert into tmp select * from t3;
insert into t3 select * from tmp;
alter table t3 add t2nr int not null auto_increment primary key first;
drop table tmp;
-SET BIG_TABLES=1;
+set tmp_memory_table_size=0;
select distinct concat(fld3," ",fld3) as namn from t2,t3 where t2.fld1=t3.t2nr order by namn limit 10;
namn
Abraham Abraham
@@ -522,7 +522,7 @@ ammonium ammonium
analyzable analyzable
animals animals
animized animized
-SET BIG_TABLES=0;
+set tmp_memory_table_size=default;
select distinct concat(fld3," ",fld3) from t2,t3 where t2.fld1=t3.t2nr order by fld3 limit 10;
concat(fld3," ",fld3)
Abraham Abraham
@@ -559,7 +559,7 @@ attendants 1
bedlam 1
bedpost 1
boasted 1
-SET BIG_TABLES=1;
+set tmp_memory_table_size=0;
select distinct fld3,count(*) from t2 group by companynr,fld3 limit 10;
fld3 count(*)
affixed 1
@@ -572,7 +572,7 @@ attendants 1
bedlam 1
bedpost 1
boasted 1
-SET BIG_TABLES=0;
+set tmp_memory_table_size=default;
select distinct fld3,repeat("a",length(fld3)),count(*) from t2 group by companynr,fld3 limit 100,10;
fld3 repeat("a",length(fld3)) count(*)
circus aaaaaa 1
diff --git a/mysql-test/main/profiling.result b/mysql-test/main/profiling.result
index 6590d89bc89..f1403c3ec2f 100644
--- a/mysql-test/main/profiling.result
+++ b/mysql-test/main/profiling.result
@@ -123,8 +123,7 @@ select query_id, count(*), sum(duration) from information_schema.profiling group
select CPU_user, CPU_system, Context_voluntary, Context_involuntary, Block_ops_in, Block_ops_out, Messages_sent, Messages_received, Page_faults_major, Page_faults_minor, Swaps, Source_function, Source_file, Source_line from information_schema.profiling;
drop table if exists t1, t2, t3;
Warnings:
-Note 1051 Unknown table 'test.t2'
-Note 1051 Unknown table 'test.t3'
+Note 1051 Unknown table 'test.t2,test.t3'
create table t1 (id int );
create table t2 (id int not null);
create table t3 (id int not null primary key);
diff --git a/mysql-test/main/ps.result b/mysql-test/main/ps.result
index 7ca8499ba76..1b77d713185 100644
--- a/mysql-test/main/ps.result
+++ b/mysql-test/main/ps.result
@@ -2856,12 +2856,10 @@ Level Code Message
Note 1051 Unknown table 'test.t2'
drop table if exists t1, t2;
Warnings:
-Note 1051 Unknown table 'test.t1'
-Note 1051 Unknown table 'test.t2'
+Note 1051 Unknown table 'test.t1,test.t2'
call proc_1();
Level Code Message
-Note 1051 Unknown table 'test.t1'
-Note 1051 Unknown table 'test.t2'
+Note 1051 Unknown table 'test.t1,test.t2'
drop procedure proc_1;
create function func_1() returns int begin show warnings; return 1; end|
ERROR 0A000: Not allowed to return a result set from a function
@@ -2880,12 +2878,10 @@ Level Code Message
Note 1051 Unknown table 'test.t2'
drop table if exists t1, t2;
Warnings:
-Note 1051 Unknown table 'test.t1'
-Note 1051 Unknown table 'test.t2'
+Note 1051 Unknown table 'test.t1,test.t2'
execute abc;
Level Code Message
-Note 1051 Unknown table 'test.t1'
-Note 1051 Unknown table 'test.t2'
+Note 1051 Unknown table 'test.t1,test.t2'
deallocate prepare abc;
set @my_password="password";
set @my_data="clear text to encode";
diff --git a/mysql-test/main/ps_1general.result b/mysql-test/main/ps_1general.result
index 2ef5571cdca..46812425ebc 100644
--- a/mysql-test/main/ps_1general.result
+++ b/mysql-test/main/ps_1general.result
@@ -462,15 +462,15 @@ Catalog Database Table Table_alias Column Column_alias Type Length Max length Is
def id 8 3 1 Y 32928 0 63
def select_type 253 19 6 N 1 39 8
def table 253 64 2 Y 0 39 8
-def type 253 10 3 Y 0 39 8
+def type 253 10 5 Y 0 39 8
def possible_keys 253 4_OR_8_K 7 Y 0 39 8
-def key 253 64 0 Y 0 39 8
-def key_len 253 4_OR_8_K 0 Y 0 39 8
+def key 253 64 7 Y 0 39 8
+def key_len 253 4_OR_8_K 1 Y 0 39 8
def ref 253 2048 0 Y 0 39 8
def rows 253 64 1 Y 0 39 8
-def Extra 253 255 27 N 1 39 8
+def Extra 253 255 37 N 1 39 8
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 filesort
+1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 3 Using index condition; Using filesort
drop table if exists t2;
create table t2 (id smallint, name varchar(20)) ;
prepare stmt1 from ' insert into t2 values(?, ?) ' ;
@@ -528,9 +528,11 @@ drop table if exists new_t2;
prepare stmt3 from ' rename table t2 to new_t2 ';
execute stmt3;
execute stmt3;
+ERROR 42S02: Table 'test.t2' doesn't exist
+create table t2 like new_t2;
+execute stmt3;
ERROR 42S01: Table 'new_t2' already exists
-rename table new_t2 to t2;
-drop table t2;
+drop table new_t2,t2;
prepare stmt1 from ' rename table t5 to t6, t7 to t8 ' ;
create table t5 (a int) ;
execute stmt1 ;
@@ -538,7 +540,7 @@ ERROR 42S02: Table 'test.t7' doesn't exist
create table t7 (a int) ;
execute stmt1 ;
execute stmt1 ;
-ERROR 42S01: Table 't6' already exists
+ERROR 42S02: Table 'test.t5' doesn't exist
rename table t6 to t5, t8 to t7 ;
execute stmt1 ;
drop table t6, t8 ;
diff --git a/mysql-test/main/ps_1general.test b/mysql-test/main/ps_1general.test
index 01a0164722d..47db79cb6c6 100644
--- a/mysql-test/main/ps_1general.test
+++ b/mysql-test/main/ps_1general.test
@@ -60,7 +60,7 @@ select * from t1 where a = @var ;
# 3. DEALLOCATE PREPARE stmt_name;
#
-# Send the server the order to drop the parse informations.
+# Send the server the order to drop the parse information.
# The server will reply with "Query Ok" or an error message.
DEALLOCATE PREPARE stmt ;
@@ -576,10 +576,12 @@ drop table if exists new_t2;
--enable_warnings
prepare stmt3 from ' rename table t2 to new_t2 ';
execute stmt3;
+--error ER_NO_SUCH_TABLE
+execute stmt3;
+create table t2 like new_t2;
--error ER_TABLE_EXISTS_ERROR
execute stmt3;
-rename table new_t2 to t2;
-drop table t2;
+drop table new_t2,t2;
## RENAME more than on TABLE within one statement
# cases derived from client_test.c: test_rename()
prepare stmt1 from ' rename table t5 to t6, t7 to t8 ' ;
@@ -590,7 +592,7 @@ create table t7 (a int) ;
# rename, t5 -> t6 and t7 -> t8
execute stmt1 ;
# rename must fail, t5 and t7 does not exist t6 and t8 already exist
---error ER_TABLE_EXISTS_ERROR
+--error ER_NO_SUCH_TABLE
execute stmt1 ;
rename table t6 to t5, t8 to t7 ;
# rename, t5 -> t6 and t7 -> t8
diff --git a/mysql-test/main/ps_show_log.result b/mysql-test/main/ps_show_log.result
index 54eabaeded6..63cd7789de4 100644
--- a/mysql-test/main/ps_show_log.result
+++ b/mysql-test/main/ps_show_log.result
@@ -54,10 +54,10 @@ DEALLOCATE PREPARE stmt_1;
connect con2,localhost,u1,,test;
PREPARE stmt_1 FROM 'SHOW BINLOG EVENTS';
EXECUTE stmt_1;
-ERROR 42000: Access denied; you need (at least one of) the REPLICATION SLAVE privilege(s) for this operation
+ERROR 42000: Access denied; you need (at least one of) the BINLOG MONITOR privilege(s) for this operation
PREPARE stmt_1 FROM 'SHOW RELAYLOG EVENTS';
EXECUTE stmt_1;
-ERROR 42000: Access denied; you need (at least one of) the REPLICATION SLAVE privilege(s) for this operation
+ERROR 42000: Access denied; you need (at least one of) the SLAVE MONITOR privilege(s) for this operation
DEALLOCATE PREPARE stmt_1;
include/rpl_end.inc
connection default;
diff --git a/mysql-test/main/query_cache.result b/mysql-test/main/query_cache.result
index fc7ca726c48..bff04de6520 100644
--- a/mysql-test/main/query_cache.result
+++ b/mysql-test/main/query_cache.result
@@ -2207,6 +2207,10 @@ Variable_name Value
Qcache_queries_in_cache 0
DROP FUNCTION foo;
drop table t1;
+#
+# MDEV-24858 SIGABRT in DbugExit from my_malloc in Query_cache::init_cache Regression
+#
+set global Query_cache_size=18446744073709547520;
restore defaults
SET GLOBAL query_cache_type= default;
SET GLOBAL query_cache_size=@save_query_cache_size;
diff --git a/mysql-test/main/query_cache.test b/mysql-test/main/query_cache.test
index 6e113f0cdb7..4d769b46213 100644
--- a/mysql-test/main/query_cache.test
+++ b/mysql-test/main/query_cache.test
@@ -1800,6 +1800,13 @@ show status like "Qcache_queries_in_cache";
DROP FUNCTION foo;
drop table t1;
+--echo #
+--echo # MDEV-24858 SIGABRT in DbugExit from my_malloc in Query_cache::init_cache Regression
+--echo #
+--disable_warnings
+set global Query_cache_size=18446744073709547520;
+--enable_warnings
+
--echo restore defaults
SET GLOBAL query_cache_type= default;
SET GLOBAL query_cache_size=@save_query_cache_size;
diff --git a/mysql-test/main/range.result b/mysql-test/main/range.result
index afd1571283f..d97cfb2b587 100644
--- a/mysql-test/main/range.result
+++ b/mysql-test/main/range.result
@@ -252,7 +252,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref x x 5 const 1 Using index
explain select count(*) from t1 where x in (1,2,3,4);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index x x 5 NULL 9 Using where; Using index
+1 SIMPLE t1 range x x 5 NULL 4 Using where; Using index
drop table t1;
CREATE TABLE t1 (key1 int(11) NOT NULL default '0', KEY i1 (key1));
INSERT INTO t1 VALUES (0),(0),(0),(0),(0),(1),(1);
@@ -261,12 +261,12 @@ INSERT INTO t2 VALUES (0),(0),(1),(1),(2),(2);
explain select * from t1, t2 where (t1.key1 <t2.keya + 1) and t2.keya=3;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ref j1 j1 4 const 1 Using index
-1 SIMPLE t1 index i1 i1 4 NULL 7 Using where; Using index; Using join buffer (flat, BNL join)
+1 SIMPLE t1 range i1 i1 4 NULL 7 Using where; Using index; Using join buffer (flat, BNL join)
explain select * from t1 force index(i1), t2 force index(j1) where
(t1.key1 <t2.keya + 1) and t2.keya=3;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ref j1 j1 4 const 1 Using index
-1 SIMPLE t1 index i1 i1 4 NULL 7 Using where; Using index; Using join buffer (flat, BNL join)
+1 SIMPLE t1 range i1 i1 4 NULL 7 Using where; Using index; Using join buffer (flat, BNL join)
DROP TABLE t1,t2;
CREATE TABLE t1 (
a int(11) default NULL,
@@ -327,8 +327,8 @@ KEY recount( owner, line )
INSERT into t1 (owner,id,columnid,line) values (11,15,15,1),(11,13,13,5);
SELECT id, columnid, tableid, content, showid, line, ordinal FROM t1 WHERE owner=11 AND ((columnid IN ( 15, 13, 14 ) AND line IN ( 1, 2, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 31 )) OR (columnid IN ( 13, 14 ) AND line IN ( 15 ))) LIMIT 0 , 30;
id columnid tableid content showid line ordinal
-13 13 1 188 1 5 0
15 15 1 188 1 1 0
+13 13 1 188 1 5 0
drop table t1;
create table t1 (id int(10) primary key);
insert into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9);
@@ -723,7 +723,7 @@ WHERE
v.oxrootid ='d8c4177d09f8b11f5.52725521' AND
s.oxleft > v.oxleft AND s.oxleft < v.oxright;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE v ref OXLEFT,OXRIGHT,OXROOTID OXROOTID 34 const 6 Using index condition
+1 SIMPLE v ALL OXLEFT,OXRIGHT,OXROOTID NULL NULL NULL 12 Using where
1 SIMPLE s ALL OXLEFT NULL NULL NULL 12 Range checked for each record (index map: 0x4)
SELECT s.oxid FROM t1 v, t1 s
WHERE
@@ -1047,10 +1047,10 @@ INSERT INTO `t1` VALUES
,(13,2),(14,2),(15,3),(16,3),(17,3),(18,3),(19,3);
explain select * from t1 where a in (3,4) and b in (1,2,3);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index PRIMARY PRIMARY 8 NULL # Using where; Using index
+1 SIMPLE t1 range PRIMARY PRIMARY 8 NULL # Using where; Using index
explain select * from v1 where a in (3,4) and b in (1,2,3);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index PRIMARY PRIMARY 8 NULL # Using where; Using index
+1 SIMPLE t1 range PRIMARY PRIMARY 8 NULL # Using where; Using index
explain select * from t1 where a between 3 and 4 and b between 1 and 2;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range PRIMARY PRIMARY 8 NULL # Using where; Using index
@@ -1427,7 +1427,7 @@ SELECT * FROM t3 WHERE
a < 5 OR
a < 10;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t3 index a a 10 NULL 23 Using where; Using index
+1 SIMPLE t3 range a a 5 NULL 9 Using where; Using index
DROP TABLE t1, t2, t3;
#
# Bug #47123: Endless 100% CPU loop with STRAIGHT_JOIN
@@ -1981,7 +1981,7 @@ insert into t1 values (0,0,0), (2,2,0), (1,1,1), (2,2,1);
explain
select * from t1 force index (idx) where a >=1 and c <= 1 and a=b and b > 1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index idx idx 15 NULL 4 Using where; Using index
+1 SIMPLE t1 range idx idx 5 NULL 2 Using where; Using index
select * from t1 force index (idx) where a >=1 and c <= 1 and a=b and b > 1;
a b c
2 2 0
@@ -2530,7 +2530,7 @@ insert into t2 values
explain select * from t1,t2
where a = d and (a,e) in ((3,3),(7,7),(2,2));
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range idx1,idx2 idx1 5 NULL 3 Using index condition; Using where
+1 SIMPLE t2 range|filter idx1,idx2 idx1|idx2 5|5 NULL 3 (60%) Using index condition; Using where; Using rowid 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),(2,2));
@@ -2545,6 +2545,14 @@ EXPLAIN
"key": "idx1",
"key_length": "5",
"used_key_parts": ["d"],
+ "rowid_filter": {
+ "range": {
+ "key": "idx2",
+ "used_key_parts": ["e"]
+ },
+ "rows": 12,
+ "selectivity_pct": 60
+ },
"rows": 3,
"filtered": 60,
"index_condition": "t2.d is not null",
@@ -2623,10 +2631,10 @@ EXPLAIN
"used_key_parts": ["e"]
},
"rows": 15,
- "selectivity_pct": 14.423
+ "selectivity_pct": 14.42307692
},
"rows": 8,
- "filtered": 14.423,
+ "filtered": 14.42307663,
"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"
},
@@ -2728,10 +2736,10 @@ EXPLAIN
"used_key_parts": ["e"]
},
"rows": 7,
- "selectivity_pct": 6.7308
+ "selectivity_pct": 6.730769231
},
"rows": 7,
- "filtered": 6.7308,
+ "filtered": 6.730769157,
"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"
},
@@ -3287,14 +3295,325 @@ insert into t2 select A.a + B.a*10 + C.a*100 from ten A, ten B,ten C where A.a +
# expected type=range, rows=1487 , reason=using index dives
analyze SELECT * FROM t1 where a in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198);
id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
-1 SIMPLE t1 index a a 5 NULL 2000 2000.00 74.35 59.95 Using where; Using index
+1 SIMPLE t1 range a a 5 NULL 1487 1199.00 100.00 100.00 Using where; Using index
insert into t2 values (200),(201);
# expected type=range, rows=201 , reason=using index statistics
analyze SELECT * FROM t1 where a in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,200,201);
id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
-1 SIMPLE t1 index a a 5 NULL 2000 2000.00 10.05 60.05 Using where; Using index
+1 SIMPLE t1 range a a 5 NULL 201 1201.00 100.00 100.00 Using where; Using index
drop table t1,ten,t2;
# End of 10.4 tests
+#
+# MDEV-15777: Use inferred IS NOT NULL predicates in the range optimizer
+#
+set @@optimizer_switch='not_null_range_scan=on';
+create table ten(a int);
+insert into ten values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+create table one_k(a int);
+insert into one_k select A.a + B.a* 10 + C.a * 100 from ten A, ten B, ten C;
+create table t1 (
+id int NOT NULL,
+subset_id int DEFAULT NULL,
+PRIMARY KEY (id),
+KEY t1_subset_id (subset_id));
+create table t2 (
+id int,
+col int NOT NULL,
+key (id)
+);
+insert into t1 select a,a from one_k limit 5;
+insert into t1 select a+5,NULL from one_k limit 995;
+insert into t2 select a,a from one_k;
+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
+# expected for t1: range access and rows = 4 (not 1000)
+explain SELECT * FROM t1,t2 WHERE t1.subset_id=t2.id;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range t1_subset_id t1_subset_id 5 NULL 3 Using index condition
+1 SIMPLE t2 ref id id 5 test.t1.subset_id 1
+SELECT * FROM t1,t2 WHERE t1.subset_id=t2.id;
+id subset_id id col
+0 0 0 0
+1 1 1 1
+2 2 2 2
+3 3 3 3
+4 4 4 4
+# with a subquery
+# expected the same plan as above
+explain SELECT * FROM t1 WHERE t1.subset_id IN (SELECT t2.id FROM t2);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 range t1_subset_id t1_subset_id 5 NULL 3 Using index condition
+1 PRIMARY t2 ref id id 5 test.t1.subset_id 1 Using index; FirstMatch(t1)
+SELECT * FROM t1 WHERE t1.subset_id IN (SELECT t2.id FROM t2);
+id subset_id
+0 0
+1 1
+2 2
+3 3
+4 4
+# non-mergable subquery
+# expected for t1: range access and rows = 4 (not 1000)
+explain SELECT * FROM t1
+WHERE t1.subset_id IN (SELECT max(t2.id) FROM t2 group by t2.col);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 range t1_subset_id t1_subset_id 5 NULL 3 Using index condition
+1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 test.t1.subset_id 1
+2 MATERIALIZED t2 ALL NULL NULL NULL NULL 1000 Using temporary
+SELECT * FROM t1
+WHERE t1.subset_id IN (SELECT max(t2.id) FROM t2 group by t2.col);
+id subset_id
+0 0
+1 1
+2 2
+3 3
+4 4
+create view v1 as SELECT t2.id FROM t2;
+create view v2 as SELECT t2.id FROM t2 group by t2.col;
+# with mergeable view
+# expected for t1: range access and rows = 4 (not 1000)
+explain SELECT * FROM t1, v1 where t1.subset_id=v1.id;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range t1_subset_id t1_subset_id 5 NULL 3 Using index condition
+1 SIMPLE t2 ref id id 5 test.t1.subset_id 1 Using index
+SELECT * FROM t1, v1 where t1.subset_id=v1.id;
+id subset_id id
+0 0 0
+1 1 1
+2 2 2
+3 3 3
+4 4 4
+# with non-mergeable view
+# expected for t1: range access and rows = 4 (not 1000)
+explain SELECT * FROM t1, v2 where t1.subset_id=v2.id;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 range t1_subset_id t1_subset_id 5 NULL 3 Using index condition
+1 PRIMARY <derived2> ref key0 key0 5 test.t1.subset_id 10
+2 DERIVED t2 ALL NULL NULL NULL NULL 1000 Using temporary; Using filesort
+SELECT * FROM t1, v2 where t1.subset_id=v2.id;
+id subset_id id
+0 0 0
+1 1 1
+2 2 2
+3 3 3
+4 4 4
+# expected for t2 and for t1: range access
+explain SELECT * FROM t2 LEFT JOIN t1 ON t1.subset_id != 5 WHERE t2.id in (0,2,4);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t2 range id id 5 NULL 3 Using index condition
+1 SIMPLE t1 range t1_subset_id t1_subset_id 5 NULL 4 Using where; Using join buffer (flat, BNL join)
+SELECT * FROM t2 LEFT JOIN t1 ON t1.subset_id != 5 WHERE t2.id in (0,2,4);
+id col id subset_id
+0 0 0 0
+2 2 0 0
+4 4 0 0
+0 0 1 1
+2 2 1 1
+4 4 1 1
+0 0 2 2
+2 2 2 2
+4 4 2 2
+0 0 3 3
+2 2 3 3
+4 4 3 3
+0 0 4 4
+2 2 4 4
+4 4 4 4
+# no range access expected for t1
+explain SELECT * FROM t1 LEFT JOIN t2 ON t1.subset_id=t2.id LIMIT 10;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 1000
+1 SIMPLE t2 ref id id 5 test.t1.subset_id 1 Using where
+SELECT * FROM t1 LEFT JOIN t2 ON t1.subset_id=t2.id LIMIT 10;
+id subset_id id col
+0 0 0 0
+1 1 1 1
+2 2 2 2
+3 3 3 3
+4 4 4 4
+5 NULL NULL NULL
+6 NULL NULL NULL
+7 NULL NULL NULL
+8 NULL NULL NULL
+9 NULL NULL NULL
+# expected for t1: range access
+explain SELECT * FROM ten LEFT JOIN (t1,t2) ON ten.a=t2.col AND t1.subset_id=t2.id;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE ten ALL NULL NULL NULL NULL 10
+1 SIMPLE t1 range t1_subset_id t1_subset_id 5 NULL 3 Using where
+1 SIMPLE t2 ref id id 5 test.t1.subset_id 1 Using where
+SELECT * FROM ten LEFT JOIN (t1,t2) ON ten.a=t2.col AND t1.subset_id=t2.id;
+a id subset_id id col
+0 0 0 0 0
+1 1 1 1 1
+2 2 2 2 2
+3 3 3 3 3
+4 4 4 4 4
+5 NULL NULL NULL NULL
+6 NULL NULL NULL NULL
+7 NULL NULL NULL NULL
+8 NULL NULL NULL NULL
+9 NULL NULL NULL NULL
+# no range access expected for t1
+explain SELECT * FROM t1 LEFT JOIN (t2,ten) ON ten.a=t2.col AND t1.subset_id=t2.id
+LIMIT 10;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 1000
+1 SIMPLE t2 ref id id 5 test.t1.subset_id 1 Using where
+1 SIMPLE ten ALL NULL NULL NULL NULL 10 Using where
+SELECT * FROM t1 LEFT JOIN (t2,ten) ON ten.a=t2.col AND t1.subset_id=t2.id
+LIMIT 10;
+id subset_id id col a
+0 0 0 0 0
+1 1 1 1 1
+2 2 2 2 2
+3 3 3 3 3
+4 4 4 4 4
+5 NULL NULL NULL NULL
+6 NULL NULL NULL NULL
+7 NULL NULL NULL NULL
+8 NULL NULL NULL NULL
+9 NULL NULL NULL NULL
+drop index id on t2;
+# expected for t1: range access
+explain SELECT * FROM t1,t2 WHERE t1.subset_id=t2.id;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range t1_subset_id t1_subset_id 5 NULL 3 Using index condition
+1 SIMPLE t2 ALL NULL NULL NULL NULL 1000 Using where; Using join buffer (flat, BNL join)
+SELECT * FROM t1,t2 WHERE t1.subset_id=t2.id;
+id subset_id id col
+0 0 0 0
+1 1 1 1
+2 2 2 2
+3 3 3 3
+4 4 4 4
+# expected impossible where after reading const tables
+explain SELECT * FROM t1,t2 WHERE t1.subset_id > t2.id AND t1.subset_id IS NULL;
+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 * FROM t1,t2 WHERE t1.subset_id > t2.id AND t1.subset_id IS NULL;
+id subset_id id col
+# expected impossible where after reading const tables
+explain SELECT * FROM t1,t2 WHERE t1.subset_id > t2.id AND t2.id IS NULL;
+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 * FROM t1,t2 WHERE t1.subset_id > t2.id AND t2.id IS NULL;
+id subset_id id col
+drop index t1_subset_id on t1;
+alter table t1 add column m int not null default 0;
+alter table t1 add index idx(m,subset_id);
+alter table t2 add index (id);
+update t1 set m = id mod 2;
+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
+# expected for t1: range access by idx (keylen=9)
+explain SELECT * FROM t1,t2 WHERE t1.subset_id=t2.id and t1.m=0 ;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range idx idx 9 NULL 4 Using index condition
+1 SIMPLE t2 ref id id 5 test.t1.subset_id 1
+SELECT * FROM t1,t2 WHERE t1.subset_id=t2.id and t1.m=0 ;
+id subset_id m id col
+0 0 0 0 0
+2 2 0 2 2
+4 4 0 4 4
+drop view v1,v2;
+drop table t1,t2;
+create table t1 (
+id int NOT NULL,
+subset_id int DEFAULT NULL,
+KEY key1(id, subset_id),
+KEY t1_subset_id (subset_id)
+);
+create table t2 (
+id int NOT NULL,
+col int NOT NULL,
+key (id)
+);
+insert into t1 select 1,a from one_k limit 5;
+insert into t1 select 1,NULL from one_k limit 495;
+insert into t2 select a,a from one_k;
+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
+# expected for t1 :range access by index key1
+# rows 4 instead of 500
+explain SELECT * FROM t1,t2 WHERE t1.id>=1 and t1.subset_id=t2.id;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range key1,t1_subset_id key1 9 NULL 3 Using where; Using index
+1 SIMPLE t2 ref id id 4 test.t1.subset_id 1
+SELECT * FROM t1,t2 WHERE t1.id>=1 and t1.subset_id=t2.id;
+id subset_id id col
+1 0 0 0
+1 1 1 1
+1 2 2 2
+1 3 3 3
+1 4 4 4
+drop table t1,t2;
+create table t1 (id int unsigned,col int, KEY key1(id));
+create table t2 (id int unsigned,col int DEFAULT NULL,key (id));
+insert into t1 select a,2 from one_k limit 50;
+insert into t1 select NULL,2 from one_k limit 450;
+insert into t2 select a,a from one_k;
+insert into t2 select a,a from one_k;
+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
+# using key1 for range access on t1 and also using index for sorting,
+# no filesort, rows should be 75 not 500
+explain SELECT * FROM t1,t2 WHERE t1.id=t2.id AND t1.col=2 ORDER BY t2.id LIMIT 10;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range key1 key1 5 NULL 74 Using index condition; Using where
+1 SIMPLE t2 ref id id 5 test.t1.id 2
+SELECT * FROM t1,t2 WHERE t1.id=t2.id AND t1.col=2 ORDER BY t2.id LIMIT 10;
+id col id col
+0 2 0 0
+0 2 0 0
+1 2 1 1
+1 2 1 1
+2 2 2 2
+2 2 2 2
+3 2 3 3
+3 2 3 3
+4 2 4 4
+4 2 4 4
+drop table t1,t2;
+drop table ten,one_k;
+set @@optimizer_switch= @save_optimizer_switch;
+#
+# MDEV-21683: ANDing of the range from inferred NOT NULL condition and
+# the range from other conditions produces IMPOSSIBLE range
+#
+SET @save_optimizer_switch= @@optimizer_switch;
+CREATE TABLE t1 (a INT, KEY(a));
+INSERT INTO t1 VALUES (8),(9);
+CREATE TABLE t2 (pk INT, b INT, PRIMARY KEY(pk));
+INSERT INTO t2 VALUES (1,1),(2,2);
+SET optimizer_switch = 'not_null_range_scan=on';
+EXPLAIN EXTENDED SELECT * FROM t1 LEFT JOIN t2 ON a = pk WHERE b >= 0 AND pk IS NULL;
+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 noticed after reading const tables
+Warnings:
+Note 1003 select NULL AS `a`,0 AS `pk`,NULL AS `b` from `test`.`t1` join `test`.`t2` where 0
+SELECT * FROM t1 LEFT JOIN t2 ON a = pk WHERE b >= 0 AND pk IS NULL;
+a pk b
+DROP TABLE t1, t2;
+SET @@optimizer_switch= @save_optimizer_switch;
+#
+# End of 10.5 tests
+#
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/range.test b/mysql-test/main/range.test
index de2a428c49a..6d43ad9090d 100644
--- a/mysql-test/main/range.test
+++ b/mysql-test/main/range.test
@@ -2268,6 +2268,210 @@ drop table t1,ten,t2;
--echo # End of 10.4 tests
+--echo #
+--echo # MDEV-15777: Use inferred IS NOT NULL predicates in the range optimizer
+--echo #
+
+set @@optimizer_switch='not_null_range_scan=on';
+create table ten(a int);
+insert into ten values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+
+create table one_k(a int);
+insert into one_k select A.a + B.a* 10 + C.a * 100 from ten A, ten B, ten C;
+
+create table t1 (
+ id int NOT NULL,
+ subset_id int DEFAULT NULL,
+ PRIMARY KEY (id),
+ KEY t1_subset_id (subset_id));
+
+create table t2 (
+ id int,
+ col int NOT NULL,
+ key (id)
+);
+
+insert into t1 select a,a from one_k limit 5;
+insert into t1 select a+5,NULL from one_k limit 995;
+insert into t2 select a,a from one_k;
+
+analyze table t1,t2;
+
+let $q=
+SELECT * FROM t1,t2 WHERE t1.subset_id=t2.id;
+--echo # expected for t1: range access and rows = 4 (not 1000)
+eval explain $q;
+eval $q;
+
+let $q=
+SELECT * FROM t1 WHERE t1.subset_id IN (SELECT t2.id FROM t2);
+--echo # with a subquery
+--echo # expected the same plan as above
+eval explain $q;
+eval $q;
+
+let $q=
+SELECT * FROM t1
+ WHERE t1.subset_id IN (SELECT max(t2.id) FROM t2 group by t2.col);
+--echo # non-mergable subquery
+--echo # expected for t1: range access and rows = 4 (not 1000)
+eval explain $q;
+eval $q;
+
+create view v1 as SELECT t2.id FROM t2;
+create view v2 as SELECT t2.id FROM t2 group by t2.col;
+
+let $q=
+SELECT * FROM t1, v1 where t1.subset_id=v1.id;
+--echo # with mergeable view
+--echo # expected for t1: range access and rows = 4 (not 1000)
+eval explain $q;
+eval $q;
+
+let $q= SELECT * FROM t1, v2 where t1.subset_id=v2.id;
+--echo # with non-mergeable view
+--echo # expected for t1: range access and rows = 4 (not 1000)
+eval explain $q;
+eval $q;
+
+let $q=
+SELECT * FROM t2 LEFT JOIN t1 ON t1.subset_id != 5 WHERE t2.id in (0,2,4);
+--echo # expected for t2 and for t1: range access
+eval explain $q;
+eval $q;
+
+let $q=
+SELECT * FROM t1 LEFT JOIN t2 ON t1.subset_id=t2.id LIMIT 10;
+--echo # no range access expected for t1
+eval explain $q;
+eval $q;
+
+let $q=
+SELECT * FROM ten LEFT JOIN (t1,t2) ON ten.a=t2.col AND t1.subset_id=t2.id;
+--echo # expected for t1: range access
+eval explain $q;
+eval $q;
+
+let $q=
+SELECT * FROM t1 LEFT JOIN (t2,ten) ON ten.a=t2.col AND t1.subset_id=t2.id
+LIMIT 10;
+--echo # no range access expected for t1
+eval explain $q;
+eval $q;
+
+drop index id on t2;
+
+let $q=
+SELECT * FROM t1,t2 WHERE t1.subset_id=t2.id;
+--echo # expected for t1: range access
+eval explain $q;
+eval $q;
+
+let $q=
+SELECT * FROM t1,t2 WHERE t1.subset_id > t2.id AND t1.subset_id IS NULL;
+--echo # expected impossible where after reading const tables
+eval explain $q;
+eval $q;
+
+let $q=
+SELECT * FROM t1,t2 WHERE t1.subset_id > t2.id AND t2.id IS NULL;
+--echo # expected impossible where after reading const tables
+eval explain $q;
+eval $q;
+
+drop index t1_subset_id on t1;
+alter table t1 add column m int not null default 0;
+alter table t1 add index idx(m,subset_id);
+alter table t2 add index (id);
+update t1 set m = id mod 2;
+analyze table t1,t2;
+
+let $q=
+SELECT * FROM t1,t2 WHERE t1.subset_id=t2.id and t1.m=0 ;
+--echo # expected for t1: range access by idx (keylen=9)
+eval explain $q;
+eval $q;
+
+
+drop view v1,v2;
+drop table t1,t2;
+
+create table t1 (
+ id int NOT NULL,
+ subset_id int DEFAULT NULL,
+ KEY key1(id, subset_id),
+ KEY t1_subset_id (subset_id)
+);
+
+create table t2 (
+ id int NOT NULL,
+ col int NOT NULL,
+ key (id)
+);
+
+insert into t1 select 1,a from one_k limit 5;
+insert into t1 select 1,NULL from one_k limit 495;
+insert into t2 select a,a from one_k;
+
+analyze table t1,t2;
+
+let $q=
+SELECT * FROM t1,t2 WHERE t1.id>=1 and t1.subset_id=t2.id;
+--echo # expected for t1 :range access by index key1
+--echo # rows 4 instead of 500
+eval explain $q;
+eval $q;
+
+drop table t1,t2;
+
+create table t1 (id int unsigned,col int, KEY key1(id));
+create table t2 (id int unsigned,col int DEFAULT NULL,key (id));
+insert into t1 select a,2 from one_k limit 50;
+insert into t1 select NULL,2 from one_k limit 450;
+insert into t2 select a,a from one_k;
+insert into t2 select a,a from one_k;
+
+analyze table t1,t2;
+
+let $q=
+SELECT * FROM t1,t2 WHERE t1.id=t2.id AND t1.col=2 ORDER BY t2.id LIMIT 10;
+--echo # using key1 for range access on t1 and also using index for sorting,
+--echo # no filesort, rows should be 75 not 500
+eval explain $q;
+eval $q;
+
+drop table t1,t2;
+
+drop table ten,one_k;
+set @@optimizer_switch= @save_optimizer_switch;
+
+--echo #
+--echo # MDEV-21683: ANDing of the range from inferred NOT NULL condition and
+--echo # the range from other conditions produces IMPOSSIBLE range
+--echo #
+
+SET @save_optimizer_switch= @@optimizer_switch;
+
+CREATE TABLE t1 (a INT, KEY(a));
+INSERT INTO t1 VALUES (8),(9);
+
+CREATE TABLE t2 (pk INT, b INT, PRIMARY KEY(pk));
+INSERT INTO t2 VALUES (1,1),(2,2);
+
+SET optimizer_switch = 'not_null_range_scan=on';
+let $q=
+SELECT * FROM t1 LEFT JOIN t2 ON a = pk WHERE b >= 0 AND pk IS NULL;
+eval EXPLAIN EXTENDED $q;
+eval $q;
+
+DROP TABLE t1, t2;
+
+SET @@optimizer_switch= @save_optimizer_switch;
+
+--echo #
+--echo # End of 10.5 tests
+--echo #
+
set global innodb_stats_persistent= @innodb_stats_persistent_save;
set global innodb_stats_persistent_sample_pages=
- @innodb_stats_persistent_sample_pages_save;
+ @innodb_stats_persistent_sample_pages_save;
diff --git a/mysql-test/main/range_innodb.result b/mysql-test/main/range_innodb.result
index 66a1e6e6c87..be7e89b9fd2 100644
--- a/mysql-test/main/range_innodb.result
+++ b/mysql-test/main/range_innodb.result
@@ -58,8 +58,8 @@ explain
select pk, a, b from t1,t2,t3 where b >= d and pk < c and b = '0';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 2
-1 SIMPLE t3 ALL NULL NULL NULL NULL 3 Using join buffer (flat, BNL join)
-1 SIMPLE t1 ALL PRIMARY,idx1,idx2 NULL NULL NULL 4 Using where; Using join buffer (incremental, BNL join)
+1 SIMPLE t1 ref PRIMARY,idx1,idx2 idx1 5 const 3 Using index condition
+1 SIMPLE t3 ALL NULL NULL NULL NULL 3 Using where; Using join buffer (flat, BNL join)
select pk, a, b from t1,t2,t3 where b >= d and pk < c and b = '0';
pk a b
1 6 0
@@ -123,7 +123,7 @@ KEY (a,b)
INSERT INTO t1 VALUES (1,'a',1),(2,'b',2);
explain SELECT a FROM t1 WHERE pk < 0 AND a <= 'w' and b > 0;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index PRIMARY,a a 9 NULL 2 Using where; Using index
+1 SIMPLE t1 range PRIMARY,a PRIMARY 4 NULL 1 Using where
SELECT a FROM t1 WHERE pk < 0 AND a <= 'w' and b > 0;
a
drop table t1;
diff --git a/mysql-test/main/range_mrr_icp.result b/mysql-test/main/range_mrr_icp.result
index 3fce8b0fc23..9fa7bd29851 100644
--- a/mysql-test/main/range_mrr_icp.result
+++ b/mysql-test/main/range_mrr_icp.result
@@ -255,7 +255,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref x x 5 const 1 Using index
explain select count(*) from t1 where x in (1,2,3,4);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index x x 5 NULL 9 Using where; Using index
+1 SIMPLE t1 range x x 5 NULL 4 Using where; Using index
drop table t1;
CREATE TABLE t1 (key1 int(11) NOT NULL default '0', KEY i1 (key1));
INSERT INTO t1 VALUES (0),(0),(0),(0),(0),(1),(1);
@@ -264,12 +264,12 @@ INSERT INTO t2 VALUES (0),(0),(1),(1),(2),(2);
explain select * from t1, t2 where (t1.key1 <t2.keya + 1) and t2.keya=3;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ref j1 j1 4 const 1 Using index
-1 SIMPLE t1 index i1 i1 4 NULL 7 Using where; Using index; Using join buffer (flat, BNL join)
+1 SIMPLE t1 range i1 i1 4 NULL 7 Using where; Using index; Using join buffer (flat, BNL join)
explain select * from t1 force index(i1), t2 force index(j1) where
(t1.key1 <t2.keya + 1) and t2.keya=3;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ref j1 j1 4 const 1 Using index
-1 SIMPLE t1 index i1 i1 4 NULL 7 Using where; Using index; Using join buffer (flat, BNL join)
+1 SIMPLE t1 range i1 i1 4 NULL 7 Using where; Using index; Using join buffer (flat, BNL join)
DROP TABLE t1,t2;
CREATE TABLE t1 (
a int(11) default NULL,
@@ -330,8 +330,8 @@ KEY recount( owner, line )
INSERT into t1 (owner,id,columnid,line) values (11,15,15,1),(11,13,13,5);
SELECT id, columnid, tableid, content, showid, line, ordinal FROM t1 WHERE owner=11 AND ((columnid IN ( 15, 13, 14 ) AND line IN ( 1, 2, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 31 )) OR (columnid IN ( 13, 14 ) AND line IN ( 15 ))) LIMIT 0 , 30;
id columnid tableid content showid line ordinal
-13 13 1 188 1 5 0
15 15 1 188 1 1 0
+13 13 1 188 1 5 0
drop table t1;
create table t1 (id int(10) primary key);
insert into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9);
@@ -726,7 +726,7 @@ WHERE
v.oxrootid ='d8c4177d09f8b11f5.52725521' AND
s.oxleft > v.oxleft AND s.oxleft < v.oxright;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE v ref OXLEFT,OXRIGHT,OXROOTID OXROOTID 34 const 6 Using index condition
+1 SIMPLE v ALL OXLEFT,OXRIGHT,OXROOTID NULL NULL NULL 12 Using where
1 SIMPLE s ALL OXLEFT NULL NULL NULL 12 Range checked for each record (index map: 0x4)
SELECT s.oxid FROM t1 v, t1 s
WHERE
@@ -1050,10 +1050,10 @@ INSERT INTO `t1` VALUES
,(13,2),(14,2),(15,3),(16,3),(17,3),(18,3),(19,3);
explain select * from t1 where a in (3,4) and b in (1,2,3);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index PRIMARY PRIMARY 8 NULL # Using where; Using index
+1 SIMPLE t1 range PRIMARY PRIMARY 8 NULL # Using where; Using index
explain select * from v1 where a in (3,4) and b in (1,2,3);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index PRIMARY PRIMARY 8 NULL # Using where; Using index
+1 SIMPLE t1 range PRIMARY PRIMARY 8 NULL # Using where; Using index
explain select * from t1 where a between 3 and 4 and b between 1 and 2;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range PRIMARY PRIMARY 8 NULL # Using where; Using index
@@ -1430,7 +1430,7 @@ SELECT * FROM t3 WHERE
a < 5 OR
a < 10;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t3 index a a 10 NULL 23 Using where; Using index
+1 SIMPLE t3 range a a 5 NULL 9 Using where; Using index
DROP TABLE t1, t2, t3;
#
# Bug #47123: Endless 100% CPU loop with STRAIGHT_JOIN
@@ -1984,7 +1984,7 @@ insert into t1 values (0,0,0), (2,2,0), (1,1,1), (2,2,1);
explain
select * from t1 force index (idx) where a >=1 and c <= 1 and a=b and b > 1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index idx idx 15 NULL 4 Using where; Using index
+1 SIMPLE t1 range idx idx 5 NULL 2 Using where; Using index
select * from t1 force index (idx) where a >=1 and c <= 1 and a=b and b > 1;
a b c
2 2 0
@@ -2625,7 +2625,7 @@ EXPLAIN
"key_length": "5",
"used_key_parts": ["d"],
"rows": 8,
- "filtered": 14.423,
+ "filtered": 14.42307663,
"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"
@@ -2723,7 +2723,7 @@ EXPLAIN
"key_length": "5",
"used_key_parts": ["d"],
"rows": 7,
- "filtered": 6.7308,
+ "filtered": 6.730769157,
"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"
@@ -3284,14 +3284,325 @@ insert into t2 select A.a + B.a*10 + C.a*100 from ten A, ten B,ten C where A.a +
# expected type=range, rows=1487 , reason=using index dives
analyze SELECT * FROM t1 where a in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198);
id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
-1 SIMPLE t1 index a a 5 NULL 2000 2000.00 74.35 59.95 Using where; Using index
+1 SIMPLE t1 range a a 5 NULL 1487 1199.00 100.00 100.00 Using where; Using index
insert into t2 values (200),(201);
# expected type=range, rows=201 , reason=using index statistics
analyze SELECT * FROM t1 where a in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,200,201);
id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
-1 SIMPLE t1 index a a 5 NULL 2000 2000.00 10.05 60.05 Using where; Using index
+1 SIMPLE t1 range a a 5 NULL 201 1201.00 100.00 100.00 Using where; Using index
drop table t1,ten,t2;
# End of 10.4 tests
+#
+# MDEV-15777: Use inferred IS NOT NULL predicates in the range optimizer
+#
+set @@optimizer_switch='not_null_range_scan=on';
+create table ten(a int);
+insert into ten values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+create table one_k(a int);
+insert into one_k select A.a + B.a* 10 + C.a * 100 from ten A, ten B, ten C;
+create table t1 (
+id int NOT NULL,
+subset_id int DEFAULT NULL,
+PRIMARY KEY (id),
+KEY t1_subset_id (subset_id));
+create table t2 (
+id int,
+col int NOT NULL,
+key (id)
+);
+insert into t1 select a,a from one_k limit 5;
+insert into t1 select a+5,NULL from one_k limit 995;
+insert into t2 select a,a from one_k;
+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
+# expected for t1: range access and rows = 4 (not 1000)
+explain SELECT * FROM t1,t2 WHERE t1.subset_id=t2.id;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range t1_subset_id t1_subset_id 5 NULL 3 Using index condition; Rowid-ordered scan
+1 SIMPLE t2 ref id id 5 test.t1.subset_id 1
+SELECT * FROM t1,t2 WHERE t1.subset_id=t2.id;
+id subset_id id col
+0 0 0 0
+1 1 1 1
+2 2 2 2
+3 3 3 3
+4 4 4 4
+# with a subquery
+# expected the same plan as above
+explain SELECT * FROM t1 WHERE t1.subset_id IN (SELECT t2.id FROM t2);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 range t1_subset_id t1_subset_id 5 NULL 3 Using index condition; Rowid-ordered scan
+1 PRIMARY t2 ref id id 5 test.t1.subset_id 1 Using index; FirstMatch(t1)
+SELECT * FROM t1 WHERE t1.subset_id IN (SELECT t2.id FROM t2);
+id subset_id
+0 0
+1 1
+2 2
+3 3
+4 4
+# non-mergable subquery
+# expected for t1: range access and rows = 4 (not 1000)
+explain SELECT * FROM t1
+WHERE t1.subset_id IN (SELECT max(t2.id) FROM t2 group by t2.col);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 range t1_subset_id t1_subset_id 5 NULL 3 Using index condition; Rowid-ordered scan
+1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 test.t1.subset_id 1
+2 MATERIALIZED t2 ALL NULL NULL NULL NULL 1000 Using temporary
+SELECT * FROM t1
+WHERE t1.subset_id IN (SELECT max(t2.id) FROM t2 group by t2.col);
+id subset_id
+0 0
+1 1
+2 2
+3 3
+4 4
+create view v1 as SELECT t2.id FROM t2;
+create view v2 as SELECT t2.id FROM t2 group by t2.col;
+# with mergeable view
+# expected for t1: range access and rows = 4 (not 1000)
+explain SELECT * FROM t1, v1 where t1.subset_id=v1.id;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range t1_subset_id t1_subset_id 5 NULL 3 Using index condition; Rowid-ordered scan
+1 SIMPLE t2 ref id id 5 test.t1.subset_id 1 Using index
+SELECT * FROM t1, v1 where t1.subset_id=v1.id;
+id subset_id id
+0 0 0
+1 1 1
+2 2 2
+3 3 3
+4 4 4
+# with non-mergeable view
+# expected for t1: range access and rows = 4 (not 1000)
+explain SELECT * FROM t1, v2 where t1.subset_id=v2.id;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 range t1_subset_id t1_subset_id 5 NULL 3 Using index condition; Rowid-ordered scan
+1 PRIMARY <derived2> ref key0 key0 5 test.t1.subset_id 10
+2 DERIVED t2 ALL NULL NULL NULL NULL 1000 Using temporary; Using filesort
+SELECT * FROM t1, v2 where t1.subset_id=v2.id;
+id subset_id id
+0 0 0
+1 1 1
+2 2 2
+3 3 3
+4 4 4
+# expected for t2 and for t1: range access
+explain SELECT * FROM t2 LEFT JOIN t1 ON t1.subset_id != 5 WHERE t2.id in (0,2,4);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t2 range id id 5 NULL 3 Using index condition; Rowid-ordered scan
+1 SIMPLE t1 range t1_subset_id t1_subset_id 5 NULL 4 Using where; Rowid-ordered scan; Using join buffer (flat, BNL join)
+SELECT * FROM t2 LEFT JOIN t1 ON t1.subset_id != 5 WHERE t2.id in (0,2,4);
+id col id subset_id
+0 0 0 0
+2 2 0 0
+4 4 0 0
+0 0 1 1
+2 2 1 1
+4 4 1 1
+0 0 2 2
+2 2 2 2
+4 4 2 2
+0 0 3 3
+2 2 3 3
+4 4 3 3
+0 0 4 4
+2 2 4 4
+4 4 4 4
+# no range access expected for t1
+explain SELECT * FROM t1 LEFT JOIN t2 ON t1.subset_id=t2.id LIMIT 10;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 1000
+1 SIMPLE t2 ref id id 5 test.t1.subset_id 1 Using where
+SELECT * FROM t1 LEFT JOIN t2 ON t1.subset_id=t2.id LIMIT 10;
+id subset_id id col
+0 0 0 0
+1 1 1 1
+2 2 2 2
+3 3 3 3
+4 4 4 4
+5 NULL NULL NULL
+6 NULL NULL NULL
+7 NULL NULL NULL
+8 NULL NULL NULL
+9 NULL NULL NULL
+# expected for t1: range access
+explain SELECT * FROM ten LEFT JOIN (t1,t2) ON ten.a=t2.col AND t1.subset_id=t2.id;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE ten ALL NULL NULL NULL NULL 10
+1 SIMPLE t1 range t1_subset_id t1_subset_id 5 NULL 3 Using where; Rowid-ordered scan
+1 SIMPLE t2 ref id id 5 test.t1.subset_id 1 Using where
+SELECT * FROM ten LEFT JOIN (t1,t2) ON ten.a=t2.col AND t1.subset_id=t2.id;
+a id subset_id id col
+0 0 0 0 0
+1 1 1 1 1
+2 2 2 2 2
+3 3 3 3 3
+4 4 4 4 4
+5 NULL NULL NULL NULL
+6 NULL NULL NULL NULL
+7 NULL NULL NULL NULL
+8 NULL NULL NULL NULL
+9 NULL NULL NULL NULL
+# no range access expected for t1
+explain SELECT * FROM t1 LEFT JOIN (t2,ten) ON ten.a=t2.col AND t1.subset_id=t2.id
+LIMIT 10;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 1000
+1 SIMPLE t2 ref id id 5 test.t1.subset_id 1 Using where
+1 SIMPLE ten ALL NULL NULL NULL NULL 10 Using where
+SELECT * FROM t1 LEFT JOIN (t2,ten) ON ten.a=t2.col AND t1.subset_id=t2.id
+LIMIT 10;
+id subset_id id col a
+0 0 0 0 0
+1 1 1 1 1
+2 2 2 2 2
+3 3 3 3 3
+4 4 4 4 4
+5 NULL NULL NULL NULL
+6 NULL NULL NULL NULL
+7 NULL NULL NULL NULL
+8 NULL NULL NULL NULL
+9 NULL NULL NULL NULL
+drop index id on t2;
+# expected for t1: range access
+explain SELECT * FROM t1,t2 WHERE t1.subset_id=t2.id;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range t1_subset_id t1_subset_id 5 NULL 3 Using index condition; Rowid-ordered scan
+1 SIMPLE t2 ALL NULL NULL NULL NULL 1000 Using where; Using join buffer (flat, BNL join)
+SELECT * FROM t1,t2 WHERE t1.subset_id=t2.id;
+id subset_id id col
+0 0 0 0
+1 1 1 1
+2 2 2 2
+3 3 3 3
+4 4 4 4
+# expected impossible where after reading const tables
+explain SELECT * FROM t1,t2 WHERE t1.subset_id > t2.id AND t1.subset_id IS NULL;
+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 * FROM t1,t2 WHERE t1.subset_id > t2.id AND t1.subset_id IS NULL;
+id subset_id id col
+# expected impossible where after reading const tables
+explain SELECT * FROM t1,t2 WHERE t1.subset_id > t2.id AND t2.id IS NULL;
+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 * FROM t1,t2 WHERE t1.subset_id > t2.id AND t2.id IS NULL;
+id subset_id id col
+drop index t1_subset_id on t1;
+alter table t1 add column m int not null default 0;
+alter table t1 add index idx(m,subset_id);
+alter table t2 add index (id);
+update t1 set m = id mod 2;
+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
+# expected for t1: range access by idx (keylen=9)
+explain SELECT * FROM t1,t2 WHERE t1.subset_id=t2.id and t1.m=0 ;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range idx idx 9 NULL 4 Using index condition; Rowid-ordered scan
+1 SIMPLE t2 ref id id 5 test.t1.subset_id 1
+SELECT * FROM t1,t2 WHERE t1.subset_id=t2.id and t1.m=0 ;
+id subset_id m id col
+0 0 0 0 0
+2 2 0 2 2
+4 4 0 4 4
+drop view v1,v2;
+drop table t1,t2;
+create table t1 (
+id int NOT NULL,
+subset_id int DEFAULT NULL,
+KEY key1(id, subset_id),
+KEY t1_subset_id (subset_id)
+);
+create table t2 (
+id int NOT NULL,
+col int NOT NULL,
+key (id)
+);
+insert into t1 select 1,a from one_k limit 5;
+insert into t1 select 1,NULL from one_k limit 495;
+insert into t2 select a,a from one_k;
+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
+# expected for t1 :range access by index key1
+# rows 4 instead of 500
+explain SELECT * FROM t1,t2 WHERE t1.id>=1 and t1.subset_id=t2.id;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range key1,t1_subset_id key1 9 NULL 3 Using where; Using index
+1 SIMPLE t2 ref id id 4 test.t1.subset_id 1
+SELECT * FROM t1,t2 WHERE t1.id>=1 and t1.subset_id=t2.id;
+id subset_id id col
+1 0 0 0
+1 1 1 1
+1 2 2 2
+1 3 3 3
+1 4 4 4
+drop table t1,t2;
+create table t1 (id int unsigned,col int, KEY key1(id));
+create table t2 (id int unsigned,col int DEFAULT NULL,key (id));
+insert into t1 select a,2 from one_k limit 50;
+insert into t1 select NULL,2 from one_k limit 450;
+insert into t2 select a,a from one_k;
+insert into t2 select a,a from one_k;
+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
+# using key1 for range access on t1 and also using index for sorting,
+# no filesort, rows should be 75 not 500
+explain SELECT * FROM t1,t2 WHERE t1.id=t2.id AND t1.col=2 ORDER BY t2.id LIMIT 10;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range key1 key1 5 NULL 74 Using index condition; Using where
+1 SIMPLE t2 ref id id 5 test.t1.id 2
+SELECT * FROM t1,t2 WHERE t1.id=t2.id AND t1.col=2 ORDER BY t2.id LIMIT 10;
+id col id col
+0 2 0 0
+0 2 0 0
+1 2 1 1
+1 2 1 1
+2 2 2 2
+2 2 2 2
+3 2 3 3
+3 2 3 3
+4 2 4 4
+4 2 4 4
+drop table t1,t2;
+drop table ten,one_k;
+set @@optimizer_switch= @save_optimizer_switch;
+#
+# MDEV-21683: ANDing of the range from inferred NOT NULL condition and
+# the range from other conditions produces IMPOSSIBLE range
+#
+SET @save_optimizer_switch= @@optimizer_switch;
+CREATE TABLE t1 (a INT, KEY(a));
+INSERT INTO t1 VALUES (8),(9);
+CREATE TABLE t2 (pk INT, b INT, PRIMARY KEY(pk));
+INSERT INTO t2 VALUES (1,1),(2,2);
+SET optimizer_switch = 'not_null_range_scan=on';
+EXPLAIN EXTENDED SELECT * FROM t1 LEFT JOIN t2 ON a = pk WHERE b >= 0 AND pk IS NULL;
+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 noticed after reading const tables
+Warnings:
+Note 1003 select NULL AS `a`,0 AS `pk`,NULL AS `b` from `test`.`t1` join `test`.`t2` where 0
+SELECT * FROM t1 LEFT JOIN t2 ON a = pk WHERE b >= 0 AND pk IS NULL;
+a pk b
+DROP TABLE t1, t2;
+SET @@optimizer_switch= @save_optimizer_switch;
+#
+# End of 10.5 tests
+#
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/range_notembedded.result b/mysql-test/main/range_notembedded.result
index 7084e0ca7a0..eeab230e72f 100644
--- a/mysql-test/main/range_notembedded.result
+++ b/mysql-test/main/range_notembedded.result
@@ -13,7 +13,7 @@ set @tmp_21958=@@optimizer_trace;
set optimizer_trace=1;
explain select * from t2 where key1 in (1,2,3) and pk not in (1,2,3);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 ALL PRIMARY,key1 NULL NULL NULL 5 Using where
+1 SIMPLE t2 range PRIMARY,key1 key1 5 NULL 3 Using index condition
# This should show only ranges in form "(1) <= (key1) <= (1)"
# ranges over "pk" should not be constructed.
select json_detailed(JSON_EXTRACT(trace, '$**.ranges'))
@@ -25,7 +25,226 @@ json_detailed(JSON_EXTRACT(trace, '$**.ranges'))
"(1) <= (key1) <= (1)",
"(2) <= (key1) <= (2)",
"(3) <= (key1) <= (3)"
+ ],
+
+ [
+ "(1) <= (key1) <= (1)",
+ "(2) <= (key1) <= (2)",
+ "(3) <= (key1) <= (3)"
]
]
set optimizer_trace=@tmp_21958;
drop table t2;
+#
+# MDEV-9750: Quick memory exhaustion with 'extended_keys=on'...
+#
+create table t1 (
+kp1 int,
+kp2 int,
+kp3 int,
+kp4 int,
+key key1(kp1, kp2, kp3,kp4)
+);
+insert into t1 values (1,1,1,1),(2,2,2,2),(3,3,3,3);
+analyze table t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
+show variables like 'optimizer_max_sel_arg_weight';
+Variable_name Value
+optimizer_max_sel_arg_weight 32000
+set @tmp_9750=@@optimizer_trace;
+set optimizer_trace=1;
+explain select * from t1 where
+kp1 in (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20) and
+kp2 in (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20) and
+kp3 in (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20) and
+kp4 in (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20)
+;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 index key1 key1 20 NULL 3 Using where; Using index
+set @json= (select json_detailed(JSON_EXTRACT(trace, '$**.range_scan_alternatives'))
+from information_schema.optimizer_trace);
+# This will show 3-component ranges.
+# The ranges were produced, but the optimizer has cut away kp4
+# to keep the number of ranges at manageable level:
+select left(@json, 500);
+left(@json, 500)
+[
+
+ [
+
+ {
+ "index": "key1",
+ "ranges":
+ [
+ "(1,1,1) <= (kp1,kp2,kp3) <= (1,1,1)",
+ "(1,1,2) <= (kp1,kp2,kp3) <= (1,1,2)",
+ "(1,1,3) <= (kp1,kp2,kp3) <= (1,1,3)",
+ "(1,1,4) <= (kp1,kp2,kp3) <= (1,1,4)",
+ "(1,1,5) <= (kp1,kp2,kp3) <= (1,1,5)",
+ "(1,1,6) <= (kp1,kp2,kp3) <= (1,1,6)",
+ "(1,1,7) <= (kp1,kp2,kp3) <= (1,1,7)",
+ "
+## Repeat the above with low max_weight:
+set @tmp9750_weight=@@optimizer_max_sel_arg_weight;
+set optimizer_max_sel_arg_weight=20;
+explain select * from t1 where
+kp1 in (1,2,3,4,5,6,7,8,9,10) and
+kp2 in (1,2,3,4,5,6,7,8,9,10) and
+kp3 in (1,2,3,4,5,6,7,8,9,10) and
+kp4 in (1,2,3,4,5,6,7,8,9,10)
+;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 index key1 key1 20 NULL 3 Using where; Using index
+set @trace= (select trace from information_schema.optimizer_trace);
+set @json= json_detailed(json_extract(@trace, '$**.range_scan_alternatives'));
+select left(@json, 500);
+left(@json, 500)
+[
+
+ [
+
+ {
+ "index": "key1",
+ "ranges":
+ [
+ "(1) <= (kp1) <= (1)",
+ "(2) <= (kp1) <= (2)",
+ "(3) <= (kp1) <= (3)",
+ "(4) <= (kp1) <= (4)",
+ "(5) <= (kp1) <= (5)",
+ "(6) <= (kp1) <= (6)",
+ "(7) <= (kp1) <= (7)",
+ "(8) <= (kp1) <= (8)",
+ "(9) <= (kp1) <= (9)",
+ "(10) <= (kp1) <= (10)"
+
+set @json= json_detailed(json_extract(@trace, '$**.setup_range_conditions'));
+select left(@json, 2500);
+left(@json, 2500)
+[
+
+ [
+
+ {
+ "sel_arg_weight_heuristic":
+ {
+ "key1_field": "kp1",
+ "key2_field": "kp2",
+ "key1_weight": 10,
+ "key2_weight": 10
+ }
+ },
+
+ {
+ "sel_arg_weight_heuristic":
+ {
+ "key1_field": "kp1",
+ "key2_field": "kp3",
+ "key1_weight": 10,
+ "key2_weight": 10
+ }
+ },
+
+ {
+ "sel_arg_weight_heuristic":
+ {
+ "key1_field": "kp1",
+ "key2_field": "kp4",
+ "key1_weight": 10,
+ "key2_weight": 10
+ }
+ }
+ ]
+]
+## Repeat the above with a bit higher max_weight:
+set optimizer_max_sel_arg_weight=120;
+explain select * from t1 where
+kp1 in (1,2,3,4,5,6,7,8,9,10) and
+kp2 in (1,2,3,4,5,6,7,8,9,10) and
+kp3 in (1,2,3,4,5,6,7,8,9,10) and
+kp4 in (1,2,3,4,5,6,7,8,9,10)
+;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 index key1 key1 20 NULL 3 Using where; Using index
+set @json= (select json_detailed(JSON_EXTRACT(trace, '$**.range_scan_alternatives'))
+from information_schema.optimizer_trace);
+select left(@json, 1500);
+left(@json, 1500)
+[
+
+ [
+
+ {
+ "index": "key1",
+ "ranges":
+ [
+ "(1,1) <= (kp1,kp2) <= (1,1)",
+ "(1,2) <= (kp1,kp2) <= (1,2)",
+ "(1,3) <= (kp1,kp2) <= (1,3)",
+ "(1,4) <= (kp1,kp2) <= (1,4)",
+ "(1,5) <= (kp1,kp2) <= (1,5)",
+ "(1,6) <= (kp1,kp2) <= (1,6)",
+ "(1,7) <= (kp1,kp2) <= (1,7)",
+ "(1,8) <= (kp1,kp2) <= (1,8)",
+ "(1,9) <= (kp1,kp2) <= (1,9)",
+ "(1,10) <= (kp1,kp2) <= (1,10)",
+ "(2,1) <= (kp1,kp2) <= (2,1)",
+ "(2,2) <= (kp1,kp2) <= (2,2)",
+ "(2,3) <= (kp1,kp2) <= (2,3)",
+ "(2,4) <= (kp1,kp2) <= (2,4)",
+ "(2,5) <= (kp1,kp2) <= (2,5)",
+ "(2,6) <= (kp1,kp2) <= (2,6)",
+ "(2,7) <= (kp1,kp2) <= (2,7)",
+ "(2,8) <= (kp1,kp2) <= (2,8)",
+ "(2,9) <= (kp1,kp2) <= (2,9)",
+ "(2,10) <= (kp1,kp2) <= (2,10)",
+ "(3,1) <= (kp1,kp2) <= (3,1)",
+ "(3,2) <= (kp1,kp2) <= (3,2)",
+ "(3,3) <= (kp1,kp2) <= (3,3)",
+ "(3,4) <= (kp1,kp2) <= (3,4)",
+ "(3,5) <= (kp1,kp2) <= (3,5)",
+ "(3,6) <= (kp1,kp2) <= (3,6)",
+ "(3,7) <= (kp1,kp2) <= (3,7)",
+ "(3,8) <= (kp1,kp2) <= (3,8)",
+ "(3,9) <= (kp1,kp2) <= (3,9)",
+ "(3,10) <= (kp1,kp2
+set optimizer_max_sel_arg_weight= @tmp9750_weight;
+set optimizer_trace=@tmp_9750;
+drop table t1;
+#
+# MDEV-24739: Assertion `root->weight >= ...' failed in SEL_ARG::tree_delete
+#
+SELECT *
+FROM mysql.help_relation
+WHERE NOT (help_topic_id != 8 AND help_keyword_id != 0 OR help_keyword_id = 2 OR help_topic_id < 1900);
+help_topic_id help_keyword_id
+SELECT *
+FROM mysql.help_relation ignore index (help_topic_id)
+WHERE (help_topic_id = 8 OR help_keyword_id = 0) AND help_keyword_id != 2 AND help_topic_id >= 1900;
+help_topic_id help_keyword_id
+#
+# MDEV-24953: 10.5.9 crashes with large IN() list
+#
+CREATE TABLE t1 (
+notification_type_id smallint(4) unsigned NOT NULL DEFAULT 0,
+item_id int(10) unsigned NOT NULL DEFAULT 0,
+item_parent_id int(10) unsigned NOT NULL DEFAULT 0,
+user_id int(10) unsigned NOT NULL DEFAULT 0,
+PRIMARY KEY (notification_type_id,item_id,item_parent_id,user_id)
+);
+insert into t1 values (1,1,1,1), (2,2,2,2), (3,3,3,3);
+# Run crashing query
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range PRIMARY PRIMARY 2 NULL 3 Using where
+drop table t1;
+#
+# MDEV-25069: Assertion `root->weight >= ...' failed in SEL_ARG::tree_delete #2
+#
+SELECT *
+FROM mysql.help_relation
+WHERE
+(help_topic_id < '2' OR help_topic_id != 8 OR help_topic_id < 1) AND
+help_keyword_id = help_topic_id;
+help_topic_id help_keyword_id
diff --git a/mysql-test/main/range_notembedded.test b/mysql-test/main/range_notembedded.test
index 4dc49429ff1..4e77d6a4810 100644
--- a/mysql-test/main/range_notembedded.test
+++ b/mysql-test/main/range_notembedded.test
@@ -31,3 +31,122 @@ from information_schema.optimizer_trace;
set optimizer_trace=@tmp_21958;
drop table t2;
+--echo #
+--echo # MDEV-9750: Quick memory exhaustion with 'extended_keys=on'...
+--echo #
+
+create table t1 (
+ kp1 int,
+ kp2 int,
+ kp3 int,
+ kp4 int,
+ key key1(kp1, kp2, kp3,kp4)
+);
+
+insert into t1 values (1,1,1,1),(2,2,2,2),(3,3,3,3);
+analyze table t1;
+
+show variables like 'optimizer_max_sel_arg_weight';
+
+# 20 * 20 * 20 *20 = 400*400 = 160,000 ranges
+set @tmp_9750=@@optimizer_trace;
+set optimizer_trace=1;
+explain select * from t1 where
+ kp1 in (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20) and
+ kp2 in (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20) and
+ kp3 in (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20) and
+ kp4 in (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20)
+;
+
+set @json= (select json_detailed(JSON_EXTRACT(trace, '$**.range_scan_alternatives'))
+ from information_schema.optimizer_trace);
+--echo # This will show 3-component ranges.
+--echo # The ranges were produced, but the optimizer has cut away kp4
+--echo # to keep the number of ranges at manageable level:
+select left(@json, 500);
+
+--echo ## Repeat the above with low max_weight:
+set @tmp9750_weight=@@optimizer_max_sel_arg_weight;
+set optimizer_max_sel_arg_weight=20;
+explain select * from t1 where
+ kp1 in (1,2,3,4,5,6,7,8,9,10) and
+ kp2 in (1,2,3,4,5,6,7,8,9,10) and
+ kp3 in (1,2,3,4,5,6,7,8,9,10) and
+ kp4 in (1,2,3,4,5,6,7,8,9,10)
+;
+set @trace= (select trace from information_schema.optimizer_trace);
+set @json= json_detailed(json_extract(@trace, '$**.range_scan_alternatives'));
+select left(@json, 500);
+
+set @json= json_detailed(json_extract(@trace, '$**.setup_range_conditions'));
+select left(@json, 2500);
+
+--echo ## Repeat the above with a bit higher max_weight:
+set optimizer_max_sel_arg_weight=120;
+explain select * from t1 where
+ kp1 in (1,2,3,4,5,6,7,8,9,10) and
+ kp2 in (1,2,3,4,5,6,7,8,9,10) and
+ kp3 in (1,2,3,4,5,6,7,8,9,10) and
+ kp4 in (1,2,3,4,5,6,7,8,9,10)
+;
+set @json= (select json_detailed(JSON_EXTRACT(trace, '$**.range_scan_alternatives'))
+ from information_schema.optimizer_trace);
+select left(@json, 1500);
+
+set optimizer_max_sel_arg_weight= @tmp9750_weight;
+set optimizer_trace=@tmp_9750;
+
+drop table t1;
+
+--echo #
+--echo # MDEV-24739: Assertion `root->weight >= ...' failed in SEL_ARG::tree_delete
+--echo #
+SELECT *
+FROM mysql.help_relation
+WHERE NOT (help_topic_id != 8 AND help_keyword_id != 0 OR help_keyword_id = 2 OR help_topic_id < 1900);
+
+SELECT *
+FROM mysql.help_relation ignore index (help_topic_id)
+WHERE (help_topic_id = 8 OR help_keyword_id = 0) AND help_keyword_id != 2 AND help_topic_id >= 1900;
+
+--echo #
+--echo # MDEV-24953: 10.5.9 crashes with large IN() list
+--echo #
+--source include/have_sequence.inc
+
+CREATE TABLE t1 (
+ notification_type_id smallint(4) unsigned NOT NULL DEFAULT 0,
+ item_id int(10) unsigned NOT NULL DEFAULT 0,
+ item_parent_id int(10) unsigned NOT NULL DEFAULT 0,
+ user_id int(10) unsigned NOT NULL DEFAULT 0,
+ PRIMARY KEY (notification_type_id,item_id,item_parent_id,user_id)
+);
+insert into t1 values (1,1,1,1), (2,2,2,2), (3,3,3,3);
+
+let $consts=`select group_concat(concat("'",seq,"'")) from seq_1_to_4642`;
+
+--echo # Run crashing query
+--disable_query_log
+eval
+explain
+DELETE FROM t1
+WHERE
+ notification_type_id IN (3, 4, 5, 6, 23)
+ AND
+ user_id = '5044'
+ AND
+ item_parent_id IN ($consts)
+;
+--enable_query_log
+
+drop table t1;
+
+--echo #
+--echo # MDEV-25069: Assertion `root->weight >= ...' failed in SEL_ARG::tree_delete #2
+--echo #
+
+SELECT *
+FROM mysql.help_relation
+WHERE
+ (help_topic_id < '2' OR help_topic_id != 8 OR help_topic_id < 1) AND
+ help_keyword_id = help_topic_id;
diff --git a/mysql-test/main/range_vs_index_merge.result b/mysql-test/main/range_vs_index_merge.result
index 286338d0433..207e012b825 100644
--- a/mysql-test/main/range_vs_index_merge.result
+++ b/mysql-test/main/range_vs_index_merge.result
@@ -951,7 +951,7 @@ WHERE ((Population > 101000 AND Population < 11000) OR
ID BETWEEN 3500 AND 3800) AND Country='USA'
AND (Name LIKE 'P%' OR ID BETWEEN 4000 AND 4300);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City range PRIMARY,Population,Country,Name,CountryPopulation,CountryName CountryName 38 NULL 23 Using index condition; Using where
+1 SIMPLE City range|filter PRIMARY,Population,Country,Name,CountryPopulation,CountryName CountryName|PRIMARY 38|4 NULL 23 (7%) Using index condition; Using where; Using rowid filter
EXPLAIN
SELECT * FROM City
WHERE ((Population > 101000 AND Population < 11000) OR
diff --git a/mysql-test/main/range_vs_index_merge_innodb.result b/mysql-test/main/range_vs_index_merge_innodb.result
index 65800e7397b..4ac62e24940 100644
--- a/mysql-test/main/range_vs_index_merge_innodb.result
+++ b/mysql-test/main/range_vs_index_merge_innodb.result
@@ -1,4 +1,4 @@
-SET SESSION STORAGE_ENGINE='InnoDB';
+SET SESSION DEFAULT_STORAGE_ENGINE='InnoDB';
set @innodb_stats_persistent_save= @@innodb_stats_persistent;
set @innodb_stats_persistent_sample_pages_save=
@@innodb_stats_persistent_sample_pages;
@@ -55,7 +55,7 @@ SELECT * FROM City
WHERE (Population >= 100000 OR Name LIKE 'P%') AND Country='CAN' OR
(Population < 100000 OR Name Like 'T%') AND Country='ARG';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City index_merge Population,Country,Name Population,Name,Country 4,35,3 NULL 821 Using sort_union(Population,Name,Country); Using where
+1 SIMPLE City range Population,Country,Name Country 3 NULL 106 Using index condition; Using where
EXPLAIN
SELECT * FROM City
WHERE Population < 200000 AND Name LIKE 'P%' AND
@@ -622,7 +622,7 @@ WHERE ((Population > 101000 AND Population < 102000) AND
((ID BETWEEN 3400 AND 3800) AND
(Country < 'AGO' OR Name LIKE 'Pa%'));
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City index_merge PRIMARY,Population,Country,Name Country,Name 3,35 NULL 831 Using sort_union(Country,Name); Using where
+1 SIMPLE City index_merge PRIMARY,Population,Country,Name Population,PRIMARY 4,4 NULL 440 Using sort_union(Population,PRIMARY); Using where
EXPLAIN
SELECT * FROM City
WHERE ((Population > 101000 AND Population < 110000) AND
@@ -630,7 +630,7 @@ WHERE ((Population > 101000 AND Population < 110000) AND
((ID BETWEEN 3790 AND 3800) AND
(Country < 'C' OR Name LIKE 'P%'));
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City index_merge PRIMARY,Population,Country,Name Country,Name 7,39 NULL 678 Using sort_union(Country,Name); Using where
+1 SIMPLE City index_merge PRIMARY,Population,Country,Name Country,Name,PRIMARY 3,35,4 NULL 87 Using sort_union(Country,Name,PRIMARY); Using where
SELECT * FROM City USE INDEX ()
WHERE ((Population > 101000 AND Population < 102000) AND
(Country < 'C' OR Name BETWEEN 'P' AND 'S')) OR
@@ -1085,7 +1085,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 27 Using sort_union(CountryName,CityName); Using where
+1 SIMPLE City range Country,CountryPopulation,CountryName,CityName CountryName 38 NULL 27 Using index condition
SELECT Name, Country, Population FROM City WHERE
(Name='Manila' AND Country='PHL') OR
(Name='Addis Abeba' AND Country='ETH') OR
@@ -1806,7 +1806,7 @@ SELECT * FROM t1
WHERE t1.a>300 AND t1.c!=0 AND t1.b>=350 AND t1.b<=400 AND
(t1.c=0 OR t1.a=500);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index PRIMARY,idx idx 10 NULL 2 Using where; Using index
+1 SIMPLE t1 range PRIMARY,idx idx 5 NULL 2 Using where; Using index
SELECT * FROM t1
WHERE t1.a>300 AND t1.c!=0 AND t1.b>=350 AND t1.b<=400 AND
(t1.c=0 OR t1.a=500);
@@ -1952,4 +1952,4 @@ set session optimizer_switch='index_merge_sort_intersection=default';
set global innodb_stats_persistent= @innodb_stats_persistent_save;
set global innodb_stats_persistent_sample_pages=
@innodb_stats_persistent_sample_pages_save;
-SET SESSION STORAGE_ENGINE=DEFAULT;
+SET SESSION DEFAULT_STORAGE_ENGINE=DEFAULT;
diff --git a/mysql-test/main/range_vs_index_merge_innodb.test b/mysql-test/main/range_vs_index_merge_innodb.test
index 5117ee3668a..4f58bbec1f2 100644
--- a/mysql-test/main/range_vs_index_merge_innodb.test
+++ b/mysql-test/main/range_vs_index_merge_innodb.test
@@ -1,6 +1,6 @@
--source include/have_innodb.inc
-SET SESSION STORAGE_ENGINE='InnoDB';
+SET SESSION DEFAULT_STORAGE_ENGINE='InnoDB';
set @innodb_stats_persistent_save= @@innodb_stats_persistent;
set @innodb_stats_persistent_sample_pages_save=
@@ -13,4 +13,4 @@ set global innodb_stats_persistent= @innodb_stats_persistent_save;
set global innodb_stats_persistent_sample_pages=
@innodb_stats_persistent_sample_pages_save;
-SET SESSION STORAGE_ENGINE=DEFAULT;
+SET SESSION DEFAULT_STORAGE_ENGINE=DEFAULT;
diff --git a/mysql-test/main/read_many_rows_innodb.result b/mysql-test/main/read_many_rows_innodb.result
index 24f9a2d54a5..80e831ca045 100644
--- a/mysql-test/main/read_many_rows_innodb.result
+++ b/mysql-test/main/read_many_rows_innodb.result
@@ -1,4 +1,4 @@
-SET SESSION STORAGE_ENGINE = InnoDB;
+SET SESSION DEFAULT_STORAGE_ENGINE = InnoDB;
DROP TABLE IF EXISTS t1, t2, t3, t4;
CREATE TABLE t1 (id INTEGER) ENGINE=MyISAM;
CREATE TABLE t2 (id INTEGER PRIMARY KEY);
diff --git a/mysql-test/main/rename.result b/mysql-test/main/rename.result
index da9e4b62ecd..15c744e158c 100644
--- a/mysql-test/main/rename.result
+++ b/mysql-test/main/rename.result
@@ -148,3 +148,28 @@ create table t1 (a int) engine=memory;
rename table t1 to non_existent.t2;
ERROR 42000: Unknown database 'non_existent'
drop table t1;
+#
+# Test rename IF EXISTS
+#
+rename table if exists t1 to t2;
+Warnings:
+Note 1146 Table 'test.t1' doesn't exist
+alter table if exists t1 rename to t2;
+Warnings:
+Error 1146 Table 'test.t1' doesn't exist
+create table t2 (a int);
+alter table if exists t1 rename to t2;
+Warnings:
+Error 1146 Table 'test.t1' doesn't exist
+rename table if exists t1 to t2;
+Warnings:
+Note 1146 Table 'test.t1' doesn't exist
+create table t1 (a int);
+rename table if exists t1 to t2;
+ERROR 42S01: Table 't2' already exists
+alter table if exists t1 rename to t2;
+ERROR 42S01: Table 't2' already exists
+drop table t2;
+rename table if exists t1 to t2;
+alter table if exists t2 rename to t1;
+drop table t1;
diff --git a/mysql-test/main/rename.test b/mysql-test/main/rename.test
index 215ecbcbb18..a0b9f38ae2e 100644
--- a/mysql-test/main/rename.test
+++ b/mysql-test/main/rename.test
@@ -148,3 +148,21 @@ create table t1 (a int) engine=memory;
--error ER_BAD_DB_ERROR
rename table t1 to non_existent.t2;
drop table t1;
+
+--echo #
+--echo # Test rename IF EXISTS
+--echo #
+rename table if exists t1 to t2;
+alter table if exists t1 rename to t2;
+create table t2 (a int);
+alter table if exists t1 rename to t2;
+rename table if exists t1 to t2;
+create table t1 (a int);
+--error ER_TABLE_EXISTS_ERROR
+rename table if exists t1 to t2;
+--error ER_TABLE_EXISTS_ERROR
+alter table if exists t1 rename to t2;
+drop table t2;
+rename table if exists t1 to t2;
+alter table if exists t2 rename to t1;
+drop table t1;
diff --git a/mysql-test/main/repair.result b/mysql-test/main/repair.result
index a8d82afc626..899ca1e1a32 100644
--- a/mysql-test/main/repair.result
+++ b/mysql-test/main/repair.result
@@ -192,14 +192,14 @@ drop tables t1, t2;
SET @save_global_character_set_server= @@global.character_set_server;
set @@global.character_set_server=@@character_set_server;
select count(*) from t1;
-ERROR HY000: Got error 190 "Incompatible key or row definition between the MariaDB .frm file and the information in the storage engine. You have to dump an" from storage engine MyISAM
+ERROR HY000: Got error 190 "Incompatible key or row definition between the MariaDB .frm file and the information in the storage engine. You may have retry " from storage engine MyISAM
check table t1;
Table Op Msg_type Msg_text
-test.t1 check Error Got error 190 "Incompatible key or row definition between the MariaDB .frm file and the information in the storage engine. You have to dump an" from storage engine MyISAM
+test.t1 check Error Got error 190 "Incompatible key or row definition between the MariaDB .frm file and the information in the storage engine. You may have retry " from storage engine MyISAM
test.t1 check error Corrupt
repair table t1;
Table Op Msg_type Msg_text
-test.t1 repair Error Got error 190 "Incompatible key or row definition between the MariaDB .frm file and the information in the storage engine. You have to dump an" from storage engine MyISAM
+test.t1 repair Error Got error 190 "Incompatible key or row definition between the MariaDB .frm file and the information in the storage engine. You may have retry " from storage engine MyISAM
test.t1 repair error Corrupt
repair table t1 use_frm;
Table Op Msg_type Msg_text
diff --git a/mysql-test/main/repair_symlink-5543.test b/mysql-test/main/repair_symlink-5543.test
index ac7bb497f24..7c4ad7db0dc 100644
--- a/mysql-test/main/repair_symlink-5543.test
+++ b/mysql-test/main/repair_symlink-5543.test
@@ -11,7 +11,7 @@ insert t1 values (1);
--system ln -s $MYSQL_TMP_DIR/foobar5543 $MYSQL_TMP_DIR/t1.TMD
--echo # Some systems fail with errcode 40, or 90 (MIPS) when doing openat,
--echo # while others don't have openat and fail with errcode 20.
---replace_regex / '.*\/t1/ 'MYSQL_TMP_DIR\/t1/ /[49]0/20/ /".*"/"<errmsg>"/
+--replace_regex / '.*\/t1/ 'MYSQL_TMP_DIR\/t1/ /[49]0/20/ /85/20/ /".*"/"<errmsg>"/
repair table t1;
drop table t1;
@@ -19,7 +19,7 @@ drop table t1;
eval create table t2 (a int) engine=aria data directory='$MYSQL_TMP_DIR';
insert t2 values (1);
--system ln -s $MYSQL_TMP_DIR/foobar5543 $MYSQL_TMP_DIR/t2.TMD
---replace_regex / '.*\/t2/ 'MYSQL_TMP_DIR\/t2/ /[49]0/20/ /".*"/"<errmsg>"/
+--replace_regex / '.*\/t2/ 'MYSQL_TMP_DIR\/t2/ /[49]0/20/ /85/20/ /".*"/"<errmsg>"/
repair table t2;
drop table t2;
diff --git a/mysql-test/main/replace_returning.result b/mysql-test/main/replace_returning.result
new file mode 100644
index 00000000000..1bc9bbd4cc5
--- /dev/null
+++ b/mysql-test/main/replace_returning.result
@@ -0,0 +1,262 @@
+# Test for REPLACE...RETURNING
+CREATE TABLE t1(id1 INT PRIMARY KEY, val1 VARCHAR(1));
+CREATE TABLE t2(id2 INT PRIMARY KEY, val2 VARCHAR(1));
+INSERT INTO t2 VALUES (1,'a'),(2,'b'),(3,'c');
+CREATE FUNCTION f(arg INT) RETURNS INT
+BEGIN
+RETURN (SELECT arg+arg);
+END|
+#
+# Simple replace statement...RETURNING
+#
+REPLACE INTO t1 (id1, val1) VALUES (1, 'a');
+REPLACE INTO t1 (id1, val1) VALUES (1, 'b') RETURNING *;
+id1 val1
+1 b
+REPLACE INTO t1 (id1, val1) VALUES (1, 'c') RETURNING id1+id1 AS total,
+id1&&id1, id1|id1,UPPER(val1),f(id1);
+total id1&&id1 id1|id1 UPPER(val1) f(id1)
+2 1 1 C 2
+REPLACE INTO t1(id1,val1) VALUES (1,'d') RETURNING (SELECT GROUP_CONCAT(val2)
+FROM t2 WHERE id2=1);
+(SELECT GROUP_CONCAT(val2)
+FROM t2 WHERE id2=1)
+a
+REPLACE INTO t1(id1,val1) VALUES(1,'e') RETURNING (SELECT GROUP_CONCAT(val2)
+FROM t2 GROUP BY id2 HAVING id2=id2+1);
+(SELECT GROUP_CONCAT(val2)
+FROM t2 GROUP BY id2 HAVING id2=id2+1)
+NULL
+PREPARE stmt FROM "REPLACE INTO t1 (id1,val1) VALUES (1,'f') RETURNING
+id1,(SELECT id2 FROM t2 WHERE val2='b')";
+EXECUTE stmt;
+id1 (SELECT id2 FROM t2 WHERE val2='b')
+1 2
+DEALLOCATE PREPARE stmt;
+REPLACE INTO t1 (id1, val1) VALUES (1, 'g') RETURNING t1.*;
+id1 val1
+1 g
+SELECT * FROM t1;
+id1 val1
+1 g
+TRUNCATE TABLE t1;
+#
+# Multiple values in one replace statement...RETURNING
+#
+REPLACE INTO t1 VALUES (1,'a'),(2,'b');
+REPLACE INTO t1 VALUES (1,'c'),(2,'d') RETURNING *;
+id1 val1
+1 c
+2 d
+REPLACE INTO t1 VALUES (1,'e'),(2,'f') RETURNING id1+id1 AS total,
+id1&&id1, id1|id1,UPPER(val1),f(id1);
+total id1&&id1 id1|id1 UPPER(val1) f(id1)
+2 1 1 E 2
+4 1 2 F 4
+REPLACE INTO t1 VALUES (1,'o'),(2,'p') RETURNING (SELECT GROUP_CONCAT(val2)
+FROM t2 WHERE id2=1);
+(SELECT GROUP_CONCAT(val2)
+FROM t2 WHERE id2=1)
+a
+a
+REPLACE INTO t1 VALUES (1,'q'),(2,'r') RETURNING (SELECT GROUP_CONCAT(val2)
+FROM t2 GROUP BY id2 HAVING id2=id2+1);
+(SELECT GROUP_CONCAT(val2)
+FROM t2 GROUP BY id2 HAVING id2=id2+1)
+NULL
+NULL
+PREPARE stmt FROM "REPLACE INTO t1 VALUES (1,'s'),(2,'t') RETURNING id1,
+(SELECT id2 FROM t2 WHERE val2='b')";
+EXECUTE stmt;
+id1 (SELECT id2 FROM t2 WHERE val2='b')
+1 2
+2 2
+DEALLOCATE PREPARE stmt;
+REPLACE INTO t1 VALUES (1,'u'),(2,'v') RETURNING t1.*;
+id1 val1
+1 u
+2 v
+SELECT * FROM t1;
+id1 val1
+1 u
+2 v
+TRUNCATE TABLE t1;
+#
+# REPLACE...SET...RETURNING
+#
+REPLACE INTO t1 SET id1=1, val1 = 'a';
+REPLACE INTO t1 SET id1=2, val1 = 'b' RETURNING *;
+id1 val1
+2 b
+REPLACE INTO t1 SET id1=3, val1 = 'c' RETURNING id1+id1 AS total,
+id1&&id1, id1|id1,UPPER(val1),f(id1);
+total id1&&id1 id1|id1 UPPER(val1) f(id1)
+6 1 3 C 6
+REPLACE INTO t1 SET id1=1, val1 = 'i' RETURNING (SELECT GROUP_CONCAT(val2)
+FROM t2 WHERE id2=1);
+(SELECT GROUP_CONCAT(val2)
+FROM t2 WHERE id2=1)
+a
+REPLACE INTO t1 SET id1=2, val1='j' RETURNING (SELECT GROUP_CONCAT(val2)
+FROM t2 GROUP BY id2 HAVING id2=id2+1);
+(SELECT GROUP_CONCAT(val2)
+FROM t2 GROUP BY id2 HAVING id2=id2+1)
+NULL
+PREPARE stmt FROM "REPLACE INTO t1 SET id1=3, val1='k' RETURNING id1,
+(SELECT id2 FROM t2 WHERE val2='b')";
+EXECUTE stmt;
+id1 (SELECT id2 FROM t2 WHERE val2='b')
+3 2
+DEALLOCATE PREPARE stmt;
+REPLACE INTO t1 SET id1=1, val1 = 'o' RETURNING t1.*;
+id1 val1
+1 o
+SELECT * FROM t1;
+id1 val1
+1 o
+2 j
+3 k
+#
+# REPLACE...SELECT...RETURNING
+#
+TRUNCATE TABLE t2;
+REPLACE INTO t2(id2,val2) SELECT * FROM t1;
+REPLACE INTO t2 SELECT * FROM t1 WHERE id1=1 RETURNING *;
+id2 val2
+1 o
+REPLACE INTO t2 SELECT * FROM t1 WHERE id1=2 RETURNING id2+id2 AS total,
+id2&&id2, id2|id2,UPPER(val2),f(id2);
+total id2&&id2 id2|id2 UPPER(val2) f(id2)
+4 1 2 J 4
+REPLACE INTO t2 SELECT * FROM t1 WHERE id1=3 RETURNING (SELECT
+GROUP_CONCAT(val1) FROM t1 WHERE id1=1);
+(SELECT
+GROUP_CONCAT(val1) FROM t1 WHERE id1=1)
+o
+REPLACE INTO t2 SELECT * FROM t1 WHERE id1=1 RETURNING (SELECT
+GROUP_CONCAT(val1) FROM t1 GROUP BY id1 HAVING id1=id1+1);
+(SELECT
+GROUP_CONCAT(val1) FROM t1 GROUP BY id1 HAVING id1=id1+1)
+NULL
+PREPARE stmt FROM "REPLACE INTO t2 SELECT * FROM t1 WHERE id1=2 RETURNING
+id2,(SELECT id1 FROM t1 WHERE val1='b')";
+EXECUTE stmt;
+id2 (SELECT id1 FROM t1 WHERE val1='b')
+2 NULL
+DEALLOCATE PREPARE stmt;
+REPLACE INTO t2 SELECT * FROM t1 WHERE id1=3 RETURNING (SELECT id1+id2
+FROM t1 WHERE id1=1);
+(SELECT id1+id2
+FROM t1 WHERE id1=1)
+4
+REPLACE INTO t2 SELECT * FROM t1 WHERE id1=1 RETURNING (SELECT id1+id2
+FROM t2 WHERE id2=0);
+(SELECT id1+id2
+FROM t2 WHERE id2=0)
+NULL
+REPLACE INTO t2 SELECT * FROM t1 WHERE id1=2 RETURNING t2.*;
+id2 val2
+2 j
+SELECT * FROM t2;
+id2 val2
+1 o
+2 j
+3 k
+DROP TABLE t1;
+DROP TABLE t2;
+DROP FUNCTION f;
+#
+# checking errors
+#
+CREATE TABLE t1(id1 INT,val1 VARCHAR(1));
+CREATE TABLE t2(id2 INT,val2 VARCHAR(1));
+REPLACE INTO t1 VALUES(1,'a'),(2,'b'),(3,'c');
+#
+# SIMLPE REPLACE STATEMENT
+#
+REPLACE INTO t2(id2,val2) VALUES(1,'a') RETURNING id1;
+ERROR 42S22: Unknown column 'id1' in 'field list'
+REPLACE INTO t2(id2,val2) values(2,'b') RETURNING SUM(id2);
+ERROR HY000: Invalid use of group function
+REPLACE INTO t2(id2,val2) VALUES(3,'c') RETURNING (SELECT id1 FROM t1);
+ERROR 21000: Subquery returns more than 1 row
+REPLACE INTO t2(id2,val2) VALUES(4,'d') RETURNING (SELECT * FROM t1);
+ERROR 21000: Operand should contain 1 column(s)
+REPLACE INTO t2(id2,val2) VALUES(4,'d') RETURNING (SELECT * FROM t2);
+ERROR 21000: Operand should contain 1 column(s)
+REPLACE INTO t2(id2,val2) VALUES(5,'e') RETURNING id2, (SELECT id1+id2 FROM
+t1 WHERE id1=1);
+id2 (SELECT id1+id2 FROM
+t1 WHERE id1=1)
+5 6
+REPLACE INTO t2(id2,val2) VALUES(5,'f') RETURNING (SELECT id2 FROM t2);
+ERROR HY000: Table 't2' is specified twice, both as a target for 'INSERT' and as a separate source for data
+REPLACE INTO t2 (id2, val2) VALUES (6,'f') RETURNING t1.*;
+ERROR 42S02: Unknown table 'test.t1'
+#
+# Multiple rows in single insert statement
+#
+REPLACE INTO t2 VALUES(1,'a'),(2,'b') RETURNING id1;
+ERROR 42S22: Unknown column 'id1' in 'field list'
+REPLACE INTO t2 VALUES(3,'c'),(4,'d') RETURNING MAX(id2);
+ERROR HY000: Invalid use of group function
+REPLACE INTO t2 VALUES(5,'c'),(6,'f') RETURNING (SELECT id1 FROM t1);
+ERROR 21000: Subquery returns more than 1 row
+REPLACE INTO t2 VALUES(7,'g'),(8,'h') RETURNING (SELECT * FROM t1);
+ERROR 21000: Operand should contain 1 column(s)
+REPLACE INTO t2 VALUES(9,'g'),(10,'h') RETURNING (SELECT * FROM t2);
+ERROR 21000: Operand should contain 1 column(s)
+REPLACE INTO t2 VALUES(11,'e'),(12,'f') RETURNING id2, (SELECT id1+id2 FROM
+t1 WHERE id1=1);
+id2 (SELECT id1+id2 FROM
+t1 WHERE id1=1)
+11 12
+12 13
+REPLACE INTO t2 VALUES(13,'f'),(14,'g') RETURNING (SELECT id2 FROM t2);
+ERROR HY000: Table 't2' is specified twice, both as a target for 'INSERT' and as a separate source for data
+REPLACE INTO t2 VALUES(13,'f'),(14,'g') RETURNING t1.*;
+ERROR 42S02: Unknown table 'test.t1'
+#
+# REPLACE ... SET
+#
+REPLACE INTO t2 SET id2=1, val2='a' RETURNING id1;
+ERROR 42S22: Unknown column 'id1' in 'field list'
+REPLACE INTO t2 SET id2=2, val2='b' RETURNING COUNT(id2);
+ERROR HY000: Invalid use of group function
+REPLACE INTO t2 SET id2=3, val2='c' RETURNING (SELECT id1 FROM t1);
+ERROR 21000: Subquery returns more than 1 row
+REPLACE INTO t2 SET id2=4, val2='d' RETURNING (SELECT * FROM t1);
+ERROR 21000: Operand should contain 1 column(s)
+REPLACE INTO t2 SET id2=4, val2='d' RETURNING (SELECT * FROM t2);
+ERROR 21000: Operand should contain 1 column(s)
+REPLACE INTO t2 SET id2=5, val2='e' RETURNING id2, (SELECT id1+id2 FROM t1
+WHERE id1=1);
+id2 (SELECT id1+id2 FROM t1
+WHERE id1=1)
+5 6
+REPLACE INTO t2 SET id2=5, val2='f' RETURNING (SELECT id2 FROM t2);
+ERROR HY000: Table 't2' is specified twice, both as a target for 'INSERT' and as a separate source for data
+REPLACE INTO t2 SET id2=5, val2='f' RETURNING t1.*;
+ERROR 42S02: Unknown table 'test.t1'
+#
+# REPLACE...SELECT
+#
+REPLACE INTO t2(id2, val2) SELECT * FROM t1 WHERE id1=1 RETURNING id1;
+ERROR 42S22: Unknown column 'id1' in 'field list'
+REPLACE INTO t2(id2, val2) SELECT * FROM t1 WHERE id1=2 RETURNING MAX(id2);
+ERROR HY000: Invalid use of group function
+REPLACE INTO t2(id2, val2) SELECT * FROM t1 WHERE id1=2 RETURNING (SELECT
+id1 FROM t1);
+ERROR 21000: Subquery returns more than 1 row
+REPLACE INTO t2(id2, val2) SELECT * FROM t1 WHERE id1=2 RETURNING (SELECT
+* FROM t1);
+ERROR 21000: Operand should contain 1 column(s)
+REPLACE INTO t2(id2, val2) SELECT * FROM t1 WHERE id1=2 RETURNING(SELECT
+* FROM t2);
+ERROR 21000: Operand should contain 1 column(s)
+REPLACE INTO t2(id2,val2) SELECT * FROM t1 WHERE id1=2 RETURNING (SELECT
+id2 FROM t2);
+ERROR 21000: Subquery returns more than 1 row
+REPLACE INTO t2(id2,val2) SELECT t1.* FROM t1 WHERE id1=2 RETURNING t1.*;
+ERROR 42S02: Unknown table 'test.t1'
+DROP TABLE t1,t2;
diff --git a/mysql-test/main/replace_returning.test b/mysql-test/main/replace_returning.test
new file mode 100644
index 00000000000..8b8a1c24e3e
--- /dev/null
+++ b/mysql-test/main/replace_returning.test
@@ -0,0 +1,192 @@
+--echo # Test for REPLACE...RETURNING
+
+CREATE TABLE t1(id1 INT PRIMARY KEY, val1 VARCHAR(1));
+CREATE TABLE t2(id2 INT PRIMARY KEY, val2 VARCHAR(1));
+INSERT INTO t2 VALUES (1,'a'),(2,'b'),(3,'c');
+
+DELIMITER |;
+
+CREATE FUNCTION f(arg INT) RETURNS INT
+BEGIN
+ RETURN (SELECT arg+arg);
+END|
+
+DELIMITER ;|
+
+--echo #
+--echo # Simple replace statement...RETURNING
+--echo #
+REPLACE INTO t1 (id1, val1) VALUES (1, 'a');
+REPLACE INTO t1 (id1, val1) VALUES (1, 'b') RETURNING *;
+REPLACE INTO t1 (id1, val1) VALUES (1, 'c') RETURNING id1+id1 AS total,
+id1&&id1, id1|id1,UPPER(val1),f(id1);
+REPLACE INTO t1(id1,val1) VALUES (1,'d') RETURNING (SELECT GROUP_CONCAT(val2)
+FROM t2 WHERE id2=1);
+REPLACE INTO t1(id1,val1) VALUES(1,'e') RETURNING (SELECT GROUP_CONCAT(val2)
+FROM t2 GROUP BY id2 HAVING id2=id2+1);
+PREPARE stmt FROM "REPLACE INTO t1 (id1,val1) VALUES (1,'f') RETURNING
+id1,(SELECT id2 FROM t2 WHERE val2='b')";
+EXECUTE stmt;
+DEALLOCATE PREPARE stmt;
+REPLACE INTO t1 (id1, val1) VALUES (1, 'g') RETURNING t1.*;
+SELECT * FROM t1;
+TRUNCATE TABLE t1;
+
+--echo #
+--echo # Multiple values in one replace statement...RETURNING
+--echo #
+REPLACE INTO t1 VALUES (1,'a'),(2,'b');
+REPLACE INTO t1 VALUES (1,'c'),(2,'d') RETURNING *;
+REPLACE INTO t1 VALUES (1,'e'),(2,'f') RETURNING id1+id1 AS total,
+id1&&id1, id1|id1,UPPER(val1),f(id1);
+REPLACE INTO t1 VALUES (1,'o'),(2,'p') RETURNING (SELECT GROUP_CONCAT(val2)
+FROM t2 WHERE id2=1);
+REPLACE INTO t1 VALUES (1,'q'),(2,'r') RETURNING (SELECT GROUP_CONCAT(val2)
+FROM t2 GROUP BY id2 HAVING id2=id2+1);
+PREPARE stmt FROM "REPLACE INTO t1 VALUES (1,'s'),(2,'t') RETURNING id1,
+(SELECT id2 FROM t2 WHERE val2='b')";
+EXECUTE stmt;
+DEALLOCATE PREPARE stmt;
+REPLACE INTO t1 VALUES (1,'u'),(2,'v') RETURNING t1.*;
+SELECT * FROM t1;
+TRUNCATE TABLE t1;
+
+--echo #
+--echo # REPLACE...SET...RETURNING
+--echo #
+REPLACE INTO t1 SET id1=1, val1 = 'a';
+REPLACE INTO t1 SET id1=2, val1 = 'b' RETURNING *;
+REPLACE INTO t1 SET id1=3, val1 = 'c' RETURNING id1+id1 AS total,
+id1&&id1, id1|id1,UPPER(val1),f(id1);
+REPLACE INTO t1 SET id1=1, val1 = 'i' RETURNING (SELECT GROUP_CONCAT(val2)
+FROM t2 WHERE id2=1);
+REPLACE INTO t1 SET id1=2, val1='j' RETURNING (SELECT GROUP_CONCAT(val2)
+FROM t2 GROUP BY id2 HAVING id2=id2+1);
+PREPARE stmt FROM "REPLACE INTO t1 SET id1=3, val1='k' RETURNING id1,
+(SELECT id2 FROM t2 WHERE val2='b')";
+EXECUTE stmt;
+DEALLOCATE PREPARE stmt;
+REPLACE INTO t1 SET id1=1, val1 = 'o' RETURNING t1.*;
+
+SELECT * FROM t1;
+
+--echo #
+--echo # REPLACE...SELECT...RETURNING
+--echo #
+TRUNCATE TABLE t2;
+REPLACE INTO t2(id2,val2) SELECT * FROM t1;
+REPLACE INTO t2 SELECT * FROM t1 WHERE id1=1 RETURNING *;
+REPLACE INTO t2 SELECT * FROM t1 WHERE id1=2 RETURNING id2+id2 AS total,
+id2&&id2, id2|id2,UPPER(val2),f(id2);
+REPLACE INTO t2 SELECT * FROM t1 WHERE id1=3 RETURNING (SELECT
+GROUP_CONCAT(val1) FROM t1 WHERE id1=1);
+REPLACE INTO t2 SELECT * FROM t1 WHERE id1=1 RETURNING (SELECT
+GROUP_CONCAT(val1) FROM t1 GROUP BY id1 HAVING id1=id1+1);
+PREPARE stmt FROM "REPLACE INTO t2 SELECT * FROM t1 WHERE id1=2 RETURNING
+id2,(SELECT id1 FROM t1 WHERE val1='b')";
+EXECUTE stmt;
+DEALLOCATE PREPARE stmt;
+REPLACE INTO t2 SELECT * FROM t1 WHERE id1=3 RETURNING (SELECT id1+id2
+FROM t1 WHERE id1=1);
+REPLACE INTO t2 SELECT * FROM t1 WHERE id1=1 RETURNING (SELECT id1+id2
+FROM t2 WHERE id2=0);
+REPLACE INTO t2 SELECT * FROM t1 WHERE id1=2 RETURNING t2.*;
+SELECT * FROM t2;
+
+DROP TABLE t1;
+DROP TABLE t2;
+DROP FUNCTION f;
+
+--echo #
+--echo # checking errors
+--echo #
+
+CREATE TABLE t1(id1 INT,val1 VARCHAR(1));
+CREATE TABLE t2(id2 INT,val2 VARCHAR(1));
+
+REPLACE INTO t1 VALUES(1,'a'),(2,'b'),(3,'c');
+
+--echo #
+--echo # SIMLPE REPLACE STATEMENT
+--echo #
+--error ER_BAD_FIELD_ERROR
+REPLACE INTO t2(id2,val2) VALUES(1,'a') RETURNING id1;
+--error ER_INVALID_GROUP_FUNC_USE
+REPLACE INTO t2(id2,val2) values(2,'b') RETURNING SUM(id2);
+--error ER_SUBQUERY_NO_1_ROW
+REPLACE INTO t2(id2,val2) VALUES(3,'c') RETURNING (SELECT id1 FROM t1);
+--error ER_OPERAND_COLUMNS
+REPLACE INTO t2(id2,val2) VALUES(4,'d') RETURNING (SELECT * FROM t1);
+--error ER_OPERAND_COLUMNS
+REPLACE INTO t2(id2,val2) VALUES(4,'d') RETURNING (SELECT * FROM t2);
+REPLACE INTO t2(id2,val2) VALUES(5,'e') RETURNING id2, (SELECT id1+id2 FROM
+t1 WHERE id1=1);
+--error ER_UPDATE_TABLE_USED
+REPLACE INTO t2(id2,val2) VALUES(5,'f') RETURNING (SELECT id2 FROM t2);
+--error ER_BAD_TABLE_ERROR
+REPLACE INTO t2 (id2, val2) VALUES (6,'f') RETURNING t1.*;
+
+--echo #
+--echo # Multiple rows in single insert statement
+--echo #
+--error ER_BAD_FIELD_ERROR
+REPLACE INTO t2 VALUES(1,'a'),(2,'b') RETURNING id1;
+--error ER_INVALID_GROUP_FUNC_USE
+REPLACE INTO t2 VALUES(3,'c'),(4,'d') RETURNING MAX(id2);
+--error ER_SUBQUERY_NO_1_ROW
+REPLACE INTO t2 VALUES(5,'c'),(6,'f') RETURNING (SELECT id1 FROM t1);
+--error ER_OPERAND_COLUMNS
+REPLACE INTO t2 VALUES(7,'g'),(8,'h') RETURNING (SELECT * FROM t1);
+--error ER_OPERAND_COLUMNS
+REPLACE INTO t2 VALUES(9,'g'),(10,'h') RETURNING (SELECT * FROM t2);
+REPLACE INTO t2 VALUES(11,'e'),(12,'f') RETURNING id2, (SELECT id1+id2 FROM
+t1 WHERE id1=1);
+--error ER_UPDATE_TABLE_USED
+REPLACE INTO t2 VALUES(13,'f'),(14,'g') RETURNING (SELECT id2 FROM t2);
+--error ER_BAD_TABLE_ERROR
+REPLACE INTO t2 VALUES(13,'f'),(14,'g') RETURNING t1.*;
+
+--echo #
+--echo # REPLACE ... SET
+--echo #
+--error ER_BAD_FIELD_ERROR
+REPLACE INTO t2 SET id2=1, val2='a' RETURNING id1;
+--error ER_INVALID_GROUP_FUNC_USE
+REPLACE INTO t2 SET id2=2, val2='b' RETURNING COUNT(id2);
+--error ER_SUBQUERY_NO_1_ROW
+REPLACE INTO t2 SET id2=3, val2='c' RETURNING (SELECT id1 FROM t1);
+--error ER_OPERAND_COLUMNS
+REPLACE INTO t2 SET id2=4, val2='d' RETURNING (SELECT * FROM t1);
+--error ER_OPERAND_COLUMNS
+REPLACE INTO t2 SET id2=4, val2='d' RETURNING (SELECT * FROM t2);
+REPLACE INTO t2 SET id2=5, val2='e' RETURNING id2, (SELECT id1+id2 FROM t1
+WHERE id1=1);
+--error ER_UPDATE_TABLE_USED
+REPLACE INTO t2 SET id2=5, val2='f' RETURNING (SELECT id2 FROM t2);
+--error ER_BAD_TABLE_ERROR
+REPLACE INTO t2 SET id2=5, val2='f' RETURNING t1.*;
+
+--echo #
+--echo # REPLACE...SELECT
+--echo #
+--error ER_BAD_FIELD_ERROR
+REPLACE INTO t2(id2, val2) SELECT * FROM t1 WHERE id1=1 RETURNING id1;
+--error ER_INVALID_GROUP_FUNC_USE
+REPLACE INTO t2(id2, val2) SELECT * FROM t1 WHERE id1=2 RETURNING MAX(id2);
+--error ER_SUBQUERY_NO_1_ROW
+REPLACE INTO t2(id2, val2) SELECT * FROM t1 WHERE id1=2 RETURNING (SELECT
+id1 FROM t1);
+--error ER_OPERAND_COLUMNS
+REPLACE INTO t2(id2, val2) SELECT * FROM t1 WHERE id1=2 RETURNING (SELECT
+* FROM t1);
+--error ER_OPERAND_COLUMNS
+REPLACE INTO t2(id2, val2) SELECT * FROM t1 WHERE id1=2 RETURNING(SELECT
+* FROM t2);
+--error ER_SUBQUERY_NO_1_ROW
+REPLACE INTO t2(id2,val2) SELECT * FROM t1 WHERE id1=2 RETURNING (SELECT
+id2 FROM t2);
+--error ER_BAD_TABLE_ERROR
+REPLACE INTO t2(id2,val2) SELECT t1.* FROM t1 WHERE id1=2 RETURNING t1.*;
+
+
+DROP TABLE t1,t2;
diff --git a/mysql-test/main/replace_returning_datatypes.result b/mysql-test/main/replace_returning_datatypes.result
new file mode 100644
index 00000000000..2dc7b5404c2
--- /dev/null
+++ b/mysql-test/main/replace_returning_datatypes.result
@@ -0,0 +1,61 @@
+CREATE TABLE t1(num_int1 INT(2) PRIMARY KEY,
+num_bit1 BIT(8),
+num_float1 FLOAT(5,2),
+num_double1 DOUBLE(5,2),
+char_enum1 ENUM('A','B','C','D'),
+char_set1 SET('a','b','c','d','e'),
+str_varchar1 VARCHAR(2),
+d1 DATE,
+dt1 DATETIME,
+ts1 TIMESTAMP,
+y1 YEAR,
+b1 BOOL);
+CREATE TABLE t2(num_int2 INT(2) PRIMARY KEY,
+num_bit2 BIT(8),
+num_float2 FLOAT(5,2),
+num_double2 DOUBLE(5,2),
+char_enum2 ENUM('A','B','C','D'),
+char_set2 SET('a','b','c','d','e'),
+str_varchar2 VARCHAR(2),
+d2 DATE,
+dt2 DATETIME,
+ts2 TIMESTAMP,
+y2 YEAR,
+b2 BOOL);
+#
+# SIMLPE REPLACE STATEMENT
+#
+REPLACE INTO t1(num_int1,num_bit1,num_float1,num_double1,char_enum1,char_set1,
+str_varchar1, d1,dt1,ts1,y1,b1) VALUES(1,b'1000011', 123.45, 123.55,
+'A','b,e', 'V','120314',"2012-04-19 13:08:22", '2001-07-22 12:12:12',
+2012,0) RETURNING *;
+num_int1 num_bit1 num_float1 num_double1 char_enum1 char_set1 str_varchar1 d1 dt1 ts1 y1 b1
+1 C 123.45 123.55 A b,e V 2012-03-14 2012-04-19 13:08:22 2001-07-22 12:12:12 2012 0
+#
+# MULTIPLE ROWS IN SINGLE STATEMENT
+#
+REPLACE INTO t1 VALUES(1,b'1000011', 123.45, 123.55, 'A','b,e', 'V',
+'120314',"2012-04-19 13:08:22", '2001-07-22 12:12:12',2012,0),(3,b'1000011',
+123.45, 123.55, 'A','b,e', 'V','120314',"2012-04-19 13:08:22",
+'2001-07-22 12:12:12',2012,1) RETURNING *;
+num_int1 num_bit1 num_float1 num_double1 char_enum1 char_set1 str_varchar1 d1 dt1 ts1 y1 b1
+1 C 123.45 123.55 A b,e V 2012-03-14 2012-04-19 13:08:22 2001-07-22 12:12:12 2012 0
+3 C 123.45 123.55 A b,e V 2012-03-14 2012-04-19 13:08:22 2001-07-22 12:12:12 2012 1
+#
+# REPLACE...SET...RETURNING
+#
+REPLACE INTO t1 SET num_int1=1,num_bit1=b'1000011',num_float1=124.67,
+num_double1=231.12,char_enum1='B',char_set1='a,d,e',
+str_varchar1='AB',d1='120314',dt1="2012-04-19 13:08:22",
+ts1='2001-07-22 12:12:1',y1=2014,b1=1 RETURNING *;
+num_int1 num_bit1 num_float1 num_double1 char_enum1 char_set1 str_varchar1 d1 dt1 ts1 y1 b1
+1 C 124.67 231.12 B a,d,e AB 2012-03-14 2012-04-19 13:08:22 2001-07-22 12:12:01 2014 1
+#
+# REPLACE...SELECT...RETURNING
+#
+REPLACE INTO t2 SELECT * FROM t1 RETURNING *;
+num_int2 num_bit2 num_float2 num_double2 char_enum2 char_set2 str_varchar2 d2 dt2 ts2 y2 b2
+1 C 124.67 231.12 B a,d,e AB 2012-03-14 2012-04-19 13:08:22 2001-07-22 12:12:01 2014 1
+3 C 123.45 123.55 A b,e V 2012-03-14 2012-04-19 13:08:22 2001-07-22 12:12:12 2012 1
+DROP TABLE t1;
+DROP TABLE t2;
diff --git a/mysql-test/main/replace_returning_datatypes.test b/mysql-test/main/replace_returning_datatypes.test
new file mode 100644
index 00000000000..f063865ecb7
--- /dev/null
+++ b/mysql-test/main/replace_returning_datatypes.test
@@ -0,0 +1,66 @@
+#Test for checking all dataypes are returned
+
+CREATE TABLE t1(num_int1 INT(2) PRIMARY KEY,
+num_bit1 BIT(8),
+num_float1 FLOAT(5,2),
+num_double1 DOUBLE(5,2),
+char_enum1 ENUM('A','B','C','D'),
+char_set1 SET('a','b','c','d','e'),
+str_varchar1 VARCHAR(2),
+d1 DATE,
+dt1 DATETIME,
+ts1 TIMESTAMP,
+y1 YEAR,
+b1 BOOL);
+
+CREATE TABLE t2(num_int2 INT(2) PRIMARY KEY,
+num_bit2 BIT(8),
+num_float2 FLOAT(5,2),
+num_double2 DOUBLE(5,2),
+char_enum2 ENUM('A','B','C','D'),
+char_set2 SET('a','b','c','d','e'),
+str_varchar2 VARCHAR(2),
+d2 DATE,
+dt2 DATETIME,
+ts2 TIMESTAMP,
+y2 YEAR,
+b2 BOOL);
+
+
+--echo #
+--echo # SIMLPE REPLACE STATEMENT
+--echo #
+REPLACE INTO t1(num_int1,num_bit1,num_float1,num_double1,char_enum1,char_set1,
+str_varchar1, d1,dt1,ts1,y1,b1) VALUES(1,b'1000011', 123.45, 123.55,
+'A','b,e', 'V','120314',"2012-04-19 13:08:22", '2001-07-22 12:12:12',
+2012,0) RETURNING *;
+
+
+--echo #
+--echo # MULTIPLE ROWS IN SINGLE STATEMENT
+--echo #
+REPLACE INTO t1 VALUES(1,b'1000011', 123.45, 123.55, 'A','b,e', 'V',
+'120314',"2012-04-19 13:08:22", '2001-07-22 12:12:12',2012,0),(3,b'1000011',
+123.45, 123.55, 'A','b,e', 'V','120314',"2012-04-19 13:08:22",
+'2001-07-22 12:12:12',2012,1) RETURNING *;
+
+
+
+--echo #
+--echo # REPLACE...SET...RETURNING
+--echo #
+REPLACE INTO t1 SET num_int1=1,num_bit1=b'1000011',num_float1=124.67,
+num_double1=231.12,char_enum1='B',char_set1='a,d,e',
+str_varchar1='AB',d1='120314',dt1="2012-04-19 13:08:22",
+ts1='2001-07-22 12:12:1',y1=2014,b1=1 RETURNING *;
+
+
+
+--echo #
+--echo # REPLACE...SELECT...RETURNING
+--echo #
+REPLACE INTO t2 SELECT * FROM t1 RETURNING *;
+
+
+DROP TABLE t1;
+DROP TABLE t2;
diff --git a/mysql-test/main/replace_returning_err.result b/mysql-test/main/replace_returning_err.result
new file mode 100644
index 00000000000..04ccdb6c5a5
--- /dev/null
+++ b/mysql-test/main/replace_returning_err.result
@@ -0,0 +1,69 @@
+CREATE TABLE t1(id1 INT PRIMARY KEY, val1 VARCHAR(1));
+CREATE TABLE t2(id2 INT PRIMARY KEY, val2 VARCHAR(1));
+INSERT INTO t1 VALUES(1, 'a'), (2, 'b'), (3, 'c');
+#
+# SIMLPE REPLACE STATEMENT
+#
+REPLACE INTO t2(id2, val2) VALUES(1, 'a') RETURNING id1;
+ERROR 42S22: Unknown column 'id1' in 'field list'
+REPLACE INTO t2(id2, val2) values(2, 'b') RETURNING SUM(id2);
+ERROR HY000: Invalid use of group function
+REPLACE INTO t2(id2, val2) VALUES(3, 'c') RETURNING(SELECT id1 FROM t1);
+ERROR 21000: Subquery returns more than 1 row
+REPLACE INTO t2(id2, val2) VALUES(4, 'd') RETURNING(SELECT* FROM t1);
+ERROR 21000: Operand should contain 1 column(s)
+REPLACE INTO t2(id2, val2) VALUES(4, 'd') RETURNING(SELECT* FROM t2);
+ERROR 21000: Operand should contain 1 column(s)
+REPLACE INTO t2(id2, val2) VALUES(5, 'f') RETURNING(SELECT id2 FROM t2);
+ERROR HY000: Table 't2' is specified twice, both as a target for 'INSERT' and as a separate source for data
+#
+# Multiple rows in single replace statement
+#
+REPLACE INTO t2 VALUES(1, 'a'), (2, 'b') RETURNING id1;
+ERROR 42S22: Unknown column 'id1' in 'field list'
+REPLACE INTO t2 VALUES(3, 'c'), (4, 'd') RETURNING MAX(id2);
+ERROR HY000: Invalid use of group function
+REPLACE INTO t2 VALUES(5, 'c'), (6, 'f') RETURNING(SELECT id1 FROM t1);
+ERROR 21000: Subquery returns more than 1 row
+REPLACE INTO t2 VALUES(7, 'g'), (8, 'h') RETURNING(SELECT* FROM t1);
+ERROR 21000: Operand should contain 1 column(s)
+REPLACE INTO t2 VALUES(9, 'g'), (10, 'h') RETURNING(SELECT* FROM t2);
+ERROR 21000: Operand should contain 1 column(s)
+REPLACE INTO t2 VALUES(13, 'f'), (14, 'g') RETURNING(SELECT id2 FROM t2);
+ERROR HY000: Table 't2' is specified twice, both as a target for 'INSERT' and as a separate source for data
+#
+# REPLACE ... SET
+#
+REPLACE INTO t2 SET id2 = 1, val2 = 'a' RETURNING id1;
+ERROR 42S22: Unknown column 'id1' in 'field list'
+REPLACE INTO t2 SET id2 = 2, val2 = 'b' RETURNING COUNT(id2);
+ERROR HY000: Invalid use of group function
+REPLACE INTO t2 SET id2 = 3, val2 = 'c' RETURNING(SELECT id1 FROM t1);
+ERROR 21000: Subquery returns more than 1 row
+REPLACE INTO t2 SET id2 = 4, val2 = 'd' RETURNING(SELECT * FROM t1);
+ERROR 21000: Operand should contain 1 column(s)
+REPLACE INTO t2 SET id2 = 4, val2 = 'd' RETURNING(SELECT * FROM t2);
+ERROR 21000: Operand should contain 1 column(s)
+REPLACE INTO t2 SET id2 = 5, val2 = 'f' RETURNING(SELECT id2 FROM t2);
+ERROR HY000: Table 't2' is specified twice, both as a target for 'INSERT' and as a separate source for data
+#
+# REPLACE...SELECT
+#
+REPLACE INTO t2(id2, val2) SELECT* FROM t1 WHERE id1 = 1 RETURNING id1;
+ERROR 42S22: Unknown column 'id1' in 'field list'
+REPLACE INTO t2(id2, val2) SELECT* FROM t1 WHERE id1 = 2 RETURNING MAX(id2);
+ERROR HY000: Invalid use of group function
+REPLACE INTO t2(id2, val2) SELECT* FROM t1 WHERE id1 = 2 RETURNING(SELECT id1
+FROM t1);
+ERROR 21000: Subquery returns more than 1 row
+REPLACE INTO t2(id2, val2) SELECT* FROM t1 WHERE id1 = 2 RETURNING(SELECT *
+FROM t1);
+ERROR 21000: Operand should contain 1 column(s)
+REPLACE INTO t2(id2, val2) SELECT* FROM t1 WHERE id1 = 2 RETURNING(SELECT *
+FROM t2);
+ERROR 21000: Operand should contain 1 column(s)
+REPLACE INTO t2(id2, val2) SELECT* FROM t1 WHERE id1 = 2 RETURNING(SELECT id2
+FROM t2);
+ERROR 21000: Subquery returns more than 1 row
+DROP TABLE t1;
+DROP TABLE t2;
diff --git a/mysql-test/main/replace_returning_err.test b/mysql-test/main/replace_returning_err.test
new file mode 100644
index 00000000000..383bd1e1c8b
--- /dev/null
+++ b/mysql-test/main/replace_returning_err.test
@@ -0,0 +1,86 @@
+#
+# Test for checking error message for REPLACE...RETURNING
+#
+
+#REPLACE INTO <table> ... RETURNING <not existing col>
+#REPLACE INTO <table> ... RETURNING <expr with aggr function>
+#REPLACE INTO ... RETURNING subquery with more than 1 row
+#REPLACE INTO ... RETURNING operand should contain 1 colunm(s)
+#REPLACE INTO ... RETURNING operand should contain 1 colunm(s)
+#REPLACE INTO ... SELECT...RETURNING < SELECT <colname> FROM <REPLACE TABLE>
+
+CREATE TABLE t1(id1 INT PRIMARY KEY, val1 VARCHAR(1));
+CREATE TABLE t2(id2 INT PRIMARY KEY, val2 VARCHAR(1));
+
+INSERT INTO t1 VALUES(1, 'a'), (2, 'b'), (3, 'c');
+
+--echo #
+--echo # SIMLPE REPLACE STATEMENT
+--echo #
+--error ER_BAD_FIELD_ERROR
+REPLACE INTO t2(id2, val2) VALUES(1, 'a') RETURNING id1;
+--error ER_INVALID_GROUP_FUNC_USE
+REPLACE INTO t2(id2, val2) values(2, 'b') RETURNING SUM(id2);
+--error ER_SUBQUERY_NO_1_ROW
+REPLACE INTO t2(id2, val2) VALUES(3, 'c') RETURNING(SELECT id1 FROM t1);
+--error ER_OPERAND_COLUMNS
+REPLACE INTO t2(id2, val2) VALUES(4, 'd') RETURNING(SELECT* FROM t1);
+--error ER_OPERAND_COLUMNS
+REPLACE INTO t2(id2, val2) VALUES(4, 'd') RETURNING(SELECT* FROM t2);
+--error ER_UPDATE_TABLE_USED
+REPLACE INTO t2(id2, val2) VALUES(5, 'f') RETURNING(SELECT id2 FROM t2);
+
+--echo #
+--echo # Multiple rows in single replace statement
+--echo #
+--error ER_BAD_FIELD_ERROR
+REPLACE INTO t2 VALUES(1, 'a'), (2, 'b') RETURNING id1;
+--error ER_INVALID_GROUP_FUNC_USE
+REPLACE INTO t2 VALUES(3, 'c'), (4, 'd') RETURNING MAX(id2);
+--error ER_SUBQUERY_NO_1_ROW
+REPLACE INTO t2 VALUES(5, 'c'), (6, 'f') RETURNING(SELECT id1 FROM t1);
+--error ER_OPERAND_COLUMNS
+REPLACE INTO t2 VALUES(7, 'g'), (8, 'h') RETURNING(SELECT* FROM t1);
+--error ER_OPERAND_COLUMNS
+REPLACE INTO t2 VALUES(9, 'g'), (10, 'h') RETURNING(SELECT* FROM t2);
+--error ER_UPDATE_TABLE_USED
+REPLACE INTO t2 VALUES(13, 'f'), (14, 'g') RETURNING(SELECT id2 FROM t2);
+
+--echo #
+--echo # REPLACE ... SET
+--echo #
+--error ER_BAD_FIELD_ERROR
+REPLACE INTO t2 SET id2 = 1, val2 = 'a' RETURNING id1;
+--error ER_INVALID_GROUP_FUNC_USE
+REPLACE INTO t2 SET id2 = 2, val2 = 'b' RETURNING COUNT(id2);
+--error ER_SUBQUERY_NO_1_ROW
+REPLACE INTO t2 SET id2 = 3, val2 = 'c' RETURNING(SELECT id1 FROM t1);
+--error ER_OPERAND_COLUMNS
+REPLACE INTO t2 SET id2 = 4, val2 = 'd' RETURNING(SELECT * FROM t1);
+--error ER_OPERAND_COLUMNS
+REPLACE INTO t2 SET id2 = 4, val2 = 'd' RETURNING(SELECT * FROM t2);
+--error ER_UPDATE_TABLE_USED
+REPLACE INTO t2 SET id2 = 5, val2 = 'f' RETURNING(SELECT id2 FROM t2);
+
+--echo #
+--echo # REPLACE...SELECT
+--echo #
+--error ER_BAD_FIELD_ERROR
+REPLACE INTO t2(id2, val2) SELECT* FROM t1 WHERE id1 = 1 RETURNING id1;
+--error ER_INVALID_GROUP_FUNC_USE
+REPLACE INTO t2(id2, val2) SELECT* FROM t1 WHERE id1 = 2 RETURNING MAX(id2);
+--error ER_SUBQUERY_NO_1_ROW
+REPLACE INTO t2(id2, val2) SELECT* FROM t1 WHERE id1 = 2 RETURNING(SELECT id1
+FROM t1);
+--error ER_OPERAND_COLUMNS
+REPLACE INTO t2(id2, val2) SELECT* FROM t1 WHERE id1 = 2 RETURNING(SELECT *
+FROM t1);
+--error ER_OPERAND_COLUMNS
+REPLACE INTO t2(id2, val2) SELECT* FROM t1 WHERE id1 = 2 RETURNING(SELECT *
+FROM t2);
+--error ER_SUBQUERY_NO_1_ROW
+REPLACE INTO t2(id2, val2) SELECT* FROM t1 WHERE id1 = 2 RETURNING(SELECT id2
+FROM t2);
+
+DROP TABLE t1;
+DROP TABLE t2;
diff --git a/mysql-test/main/require_secure_transport-master.opt b/mysql-test/main/require_secure_transport-master.opt
new file mode 100644
index 00000000000..0a25b054d71
--- /dev/null
+++ b/mysql-test/main/require_secure_transport-master.opt
@@ -0,0 +1 @@
+--require-secure-transport=0
diff --git a/mysql-test/main/require_secure_transport.result b/mysql-test/main/require_secure_transport.result
new file mode 100644
index 00000000000..c9df2f90b45
--- /dev/null
+++ b/mysql-test/main/require_secure_transport.result
@@ -0,0 +1,8 @@
+CREATE TABLE t1 (t int(1));
+SET GLOBAL require_secure_transport=ON;
+ERROR 28000: Access denied for user 'root'@'localhost' (using password: NO)
+connection default;
+SET GLOBAL require_secure_transport=OFF;
+disconnect without_ssl;
+connection default;
+DROP TABLE t1;
diff --git a/mysql-test/main/require_secure_transport.test b/mysql-test/main/require_secure_transport.test
new file mode 100644
index 00000000000..ce62e7d5492
--- /dev/null
+++ b/mysql-test/main/require_secure_transport.test
@@ -0,0 +1,15 @@
+-- source include/have_ssl_communication.inc
+CREATE TABLE t1 (t int(1));
+SET GLOBAL require_secure_transport=ON;
+--disable_query_log
+--error ER_ACCESS_DENIED_ERROR
+connect without_ssl,localhost,root,,,,,TCP NOSSL;
+--enable_query_log
+connection default;
+SET GLOBAL require_secure_transport=OFF;
+--disable_query_log
+connect without_ssl,localhost,root,,,,,TCP NOSSL;
+--enable_query_log
+disconnect without_ssl;
+connection default;
+DROP TABLE t1;
diff --git a/mysql-test/main/row.result b/mysql-test/main/row.result
index 40d3e2640f0..12ab4208c11 100644
--- a/mysql-test/main/row.result
+++ b/mysql-test/main/row.result
@@ -545,3 +545,16 @@ SELECT (1,null) NOT IN ((2,2),(3,3)), (1,null) NOT IN ((2,2)), (1,null) NOT IN (
#
# End of 10.1 tests
#
+#
+# Start of 10.5 tests
+#
+#
+# MDEV-20809 EXTRACT from INET6 value does not produce any warnings
+#
+CREATE TABLE t1 (a GEOMETRY);
+SELECT EXTRACT(DAY FROM a) FROM t1;
+ERROR HY000: Illegal parameter data type geometry for operation 'extract(day)'
+DROP TABLE t1;
+#
+# End of 10.5 tests
+#
diff --git a/mysql-test/main/row.test b/mysql-test/main/row.test
index 80c61c414bf..d78d61b078a 100644
--- a/mysql-test/main/row.test
+++ b/mysql-test/main/row.test
@@ -314,3 +314,21 @@ SELECT (1,null) NOT IN ((2,2),(3,3)), (1,null) NOT IN ((2,2)), (1,null) NOT IN (
--echo #
--echo # End of 10.1 tests
--echo #
+
+
+--echo #
+--echo # Start of 10.5 tests
+--echo #
+
+--echo #
+--echo # MDEV-20809 EXTRACT from INET6 value does not produce any warnings
+--echo #
+
+CREATE TABLE t1 (a GEOMETRY);
+--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION
+SELECT EXTRACT(DAY FROM a) FROM t1;
+DROP TABLE t1;
+
+--echo #
+--echo # End of 10.5 tests
+--echo #
diff --git a/mysql-test/main/rowid_filter.result b/mysql-test/main/rowid_filter.result
index b1660a8aba3..376cb63944a 100644
--- a/mysql-test/main/rowid_filter.result
+++ b/mysql-test/main/rowid_filter.result
@@ -90,10 +90,10 @@ EXPLAIN
"used_key_parts": ["l_quantity"]
},
"rows": 702,
- "selectivity_pct": 11.69
+ "selectivity_pct": 11.69025812
},
"rows": 509,
- "filtered": 11.69,
+ "filtered": 11.69025803,
"index_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'",
"attached_condition": "lineitem.l_quantity > 45"
}
@@ -126,17 +126,18 @@ ANALYZE
"used_key_parts": ["l_quantity"]
},
"rows": 702,
- "selectivity_pct": 11.69,
+ "selectivity_pct": 11.69025812,
"r_rows": 605,
- "r_selectivity_pct": 11.765,
+ "r_selectivity_pct": 11.76470588,
"r_buffer_size": "REPLACED",
"r_filling_time_ms": "REPLACED"
},
"r_loops": 1,
"rows": 509,
"r_rows": 60,
- "r_total_time_ms": "REPLACED",
- "filtered": 11.69,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 11.69025803,
"r_filtered": 100,
"index_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'",
"attached_condition": "lineitem.l_quantity > 45"
@@ -227,7 +228,7 @@ EXPLAIN
"key_length": "4",
"used_key_parts": ["l_shipDATE"],
"rows": 509,
- "filtered": 11.69,
+ "filtered": 11.69025803,
"index_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'",
"attached_condition": "lineitem.l_quantity > 45"
}
@@ -257,9 +258,10 @@ ANALYZE
"r_loops": 1,
"rows": 509,
"r_rows": 510,
- "r_total_time_ms": "REPLACED",
- "filtered": 11.69,
- "r_filtered": 11.765,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 11.69025803,
+ "r_filtered": 11.76470588,
"index_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'",
"attached_condition": "lineitem.l_quantity > 45"
}
@@ -377,7 +379,7 @@ EXPLAIN
"selectivity_pct": 4.6
},
"rows": 1,
- "filtered": 4.6,
+ "filtered": 4.599999905,
"attached_condition": "orders.o_totalprice between 200000 and 230000"
}
}
@@ -414,7 +416,8 @@ ANALYZE
"r_loops": 1,
"rows": 98,
"r_rows": 98,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100,
"index_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-01-31'"
@@ -435,15 +438,16 @@ ANALYZE
"rows": 69,
"selectivity_pct": 4.6,
"r_rows": 71,
- "r_selectivity_pct": 10.417,
+ "r_selectivity_pct": 10.41666667,
"r_buffer_size": "REPLACED",
"r_filling_time_ms": "REPLACED"
},
"r_loops": 98,
"rows": 1,
- "r_rows": 0.1122,
- "r_total_time_ms": "REPLACED",
- "filtered": 4.6,
+ "r_rows": 0.112244898,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 4.599999905,
"r_filtered": 100,
"attached_condition": "orders.o_totalprice between 200000 and 230000"
}
@@ -505,7 +509,7 @@ EXPLAIN
"used_key_parts": ["o_orderkey"],
"ref": ["dbt3_s001.lineitem.l_orderkey"],
"rows": 1,
- "filtered": 4.6,
+ "filtered": 4.599999905,
"attached_condition": "orders.o_totalprice between 200000 and 230000"
}
}
@@ -542,7 +546,8 @@ ANALYZE
"r_loops": 1,
"rows": 98,
"r_rows": 98,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100,
"index_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-01-31'"
@@ -558,9 +563,10 @@ ANALYZE
"r_loops": 98,
"rows": 1,
"r_rows": 1,
- "r_total_time_ms": "REPLACED",
- "filtered": 4.6,
- "r_filtered": 11.224,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 4.599999905,
+ "r_filtered": 11.2244898,
"attached_condition": "orders.o_totalprice between 200000 and 230000"
}
}
@@ -617,10 +623,10 @@ EXPLAIN
"used_key_parts": ["l_quantity"]
},
"rows": 702,
- "selectivity_pct": 11.69
+ "selectivity_pct": 11.69025812
},
"rows": 509,
- "filtered": 11.69,
+ "filtered": 11.69025803,
"index_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'",
"attached_condition": "lineitem.l_quantity > 45"
},
@@ -638,10 +644,10 @@ EXPLAIN
"used_key_parts": ["o_totalprice"]
},
"rows": 139,
- "selectivity_pct": 9.2667
+ "selectivity_pct": 9.266666667
},
"rows": 1,
- "filtered": 9.2667,
+ "filtered": 9.266666412,
"attached_condition": "orders.o_totalprice between 180000 and 230000"
}
}
@@ -684,17 +690,18 @@ ANALYZE
"used_key_parts": ["l_quantity"]
},
"rows": 702,
- "selectivity_pct": 11.69,
+ "selectivity_pct": 11.69025812,
"r_rows": 605,
- "r_selectivity_pct": 11.765,
+ "r_selectivity_pct": 11.76470588,
"r_buffer_size": "REPLACED",
"r_filling_time_ms": "REPLACED"
},
"r_loops": 1,
"rows": 509,
"r_rows": 60,
- "r_total_time_ms": "REPLACED",
- "filtered": 11.69,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 11.69025803,
"r_filtered": 100,
"index_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'",
"attached_condition": "lineitem.l_quantity > 45"
@@ -713,17 +720,18 @@ ANALYZE
"used_key_parts": ["o_totalprice"]
},
"rows": 139,
- "selectivity_pct": 9.2667,
+ "selectivity_pct": 9.266666667,
"r_rows": 144,
- "r_selectivity_pct": 25.424,
+ "r_selectivity_pct": 25.42372881,
"r_buffer_size": "REPLACED",
"r_filling_time_ms": "REPLACED"
},
"r_loops": 60,
"rows": 1,
- "r_rows": 0.2667,
- "r_total_time_ms": "REPLACED",
- "filtered": 9.2667,
+ "r_rows": 0.266666667,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 9.266666412,
"r_filtered": 100,
"attached_condition": "orders.o_totalprice between 180000 and 230000"
}
@@ -782,7 +790,7 @@ EXPLAIN
"key_length": "4",
"used_key_parts": ["l_shipDATE"],
"rows": 509,
- "filtered": 11.69,
+ "filtered": 11.69025803,
"index_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'",
"attached_condition": "lineitem.l_quantity > 45"
},
@@ -795,7 +803,7 @@ EXPLAIN
"used_key_parts": ["o_orderkey"],
"ref": ["dbt3_s001.lineitem.l_orderkey"],
"rows": 1,
- "filtered": 9.2667,
+ "filtered": 9.266666412,
"attached_condition": "orders.o_totalprice between 180000 and 230000"
}
}
@@ -835,9 +843,10 @@ ANALYZE
"r_loops": 1,
"rows": 509,
"r_rows": 510,
- "r_total_time_ms": "REPLACED",
- "filtered": 11.69,
- "r_filtered": 11.765,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 11.69025803,
+ "r_filtered": 11.76470588,
"index_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'",
"attached_condition": "lineitem.l_quantity > 45"
},
@@ -852,9 +861,10 @@ ANALYZE
"r_loops": 60,
"rows": 1,
"r_rows": 1,
- "r_total_time_ms": "REPLACED",
- "filtered": 9.2667,
- "r_filtered": 26.667,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 9.266666412,
+ "r_filtered": 26.66666667,
"attached_condition": "orders.o_totalprice between 180000 and 230000"
}
}
@@ -887,7 +897,7 @@ WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
o_totalprice between 200000 and 230000;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE orders range PRIMARY,i_o_totalprice i_o_totalprice 9 NULL 69 Using index condition
-1 SIMPLE lineitem ref|filter PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity PRIMARY|i_l_shipdate 4|4 dbt3_s001.orders.o_orderkey 4 (8%) Using where; Using rowid filter
+1 SIMPLE lineitem ref|filter PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity i_l_orderkey|i_l_shipdate 4|4 dbt3_s001.orders.o_orderkey 4 (8%) Using where; Using rowid filter
set statement optimizer_switch='rowid_filter=on' for EXPLAIN FORMAT=JSON SELECT o_orderkey, l_linenumber, l_shipdate, o_totalprice
FROM orders JOIN lineitem ON o_orderkey=l_orderkey
WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
@@ -916,7 +926,7 @@ EXPLAIN
"i_l_orderkey",
"i_l_orderkey_quantity"
],
- "key": "PRIMARY",
+ "key": "i_l_orderkey",
"key_length": "4",
"used_key_parts": ["l_orderkey"],
"ref": ["dbt3_s001.orders.o_orderkey"],
@@ -926,10 +936,10 @@ EXPLAIN
"used_key_parts": ["l_shipDATE"]
},
"rows": 509,
- "selectivity_pct": 8.4763
+ "selectivity_pct": 8.476269775
},
"rows": 4,
- "filtered": 8.4763,
+ "filtered": 8.476269722,
"attached_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'"
}
}
@@ -940,7 +950,7 @@ WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
o_totalprice between 200000 and 230000;
id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
1 SIMPLE orders range PRIMARY,i_o_totalprice i_o_totalprice 9 NULL 69 71.00 100.00 100.00 Using index condition
-1 SIMPLE lineitem ref|filter PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity PRIMARY|i_l_shipdate 4|4 dbt3_s001.orders.o_orderkey 4 (8%) 0.52 (7%) 8.48 100.00 Using where; Using rowid filter
+1 SIMPLE lineitem ref|filter PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity i_l_orderkey|i_l_shipdate 4|4 dbt3_s001.orders.o_orderkey 4 (8%) 0.52 (7%) 8.48 100.00 Using where; Using rowid filter
set statement optimizer_switch='rowid_filter=on' for ANALYZE FORMAT=JSON SELECT o_orderkey, l_linenumber, l_shipdate, o_totalprice
FROM orders JOIN lineitem ON o_orderkey=l_orderkey
WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
@@ -961,7 +971,8 @@ ANALYZE
"r_loops": 1,
"rows": 69,
"r_rows": 71,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100,
"index_condition": "orders.o_totalprice between 200000 and 230000"
@@ -975,7 +986,7 @@ ANALYZE
"i_l_orderkey",
"i_l_orderkey_quantity"
],
- "key": "PRIMARY",
+ "key": "i_l_orderkey",
"key_length": "4",
"used_key_parts": ["l_orderkey"],
"ref": ["dbt3_s001.orders.o_orderkey"],
@@ -985,17 +996,18 @@ ANALYZE
"used_key_parts": ["l_shipDATE"]
},
"rows": 509,
- "selectivity_pct": 8.4763,
+ "selectivity_pct": 8.476269775,
"r_rows": 510,
- "r_selectivity_pct": 7.7731,
+ "r_selectivity_pct": 7.773109244,
"r_buffer_size": "REPLACED",
"r_filling_time_ms": "REPLACED"
},
"r_loops": 71,
"rows": 4,
- "r_rows": 0.5211,
- "r_total_time_ms": "REPLACED",
- "filtered": 8.4763,
+ "r_rows": 0.521126761,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 8.476269722,
"r_filtered": 100,
"attached_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'"
}
@@ -1049,7 +1061,7 @@ WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
o_totalprice between 200000 and 230000;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE orders range PRIMARY,i_o_totalprice i_o_totalprice 9 NULL 69 Using index condition
-1 SIMPLE lineitem ref PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity PRIMARY 4 dbt3_s001.orders.o_orderkey 4 Using where
+1 SIMPLE lineitem ref PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity i_l_orderkey 4 dbt3_s001.orders.o_orderkey 4 Using where
set statement optimizer_switch='rowid_filter=off' for EXPLAIN FORMAT=JSON SELECT o_orderkey, l_linenumber, l_shipdate, o_totalprice
FROM orders JOIN lineitem ON o_orderkey=l_orderkey
WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
@@ -1078,12 +1090,12 @@ EXPLAIN
"i_l_orderkey",
"i_l_orderkey_quantity"
],
- "key": "PRIMARY",
+ "key": "i_l_orderkey",
"key_length": "4",
"used_key_parts": ["l_orderkey"],
"ref": ["dbt3_s001.orders.o_orderkey"],
"rows": 4,
- "filtered": 8.4763,
+ "filtered": 8.476269722,
"attached_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'"
}
}
@@ -1094,7 +1106,7 @@ WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
o_totalprice between 200000 and 230000;
id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
1 SIMPLE orders range PRIMARY,i_o_totalprice i_o_totalprice 9 NULL 69 71.00 100.00 100.00 Using index condition
-1 SIMPLE lineitem ref PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity PRIMARY 4 dbt3_s001.orders.o_orderkey 4 6.70 8.48 7.77 Using where
+1 SIMPLE lineitem ref PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity i_l_orderkey 4 dbt3_s001.orders.o_orderkey 4 6.70 8.48 7.77 Using where
set statement optimizer_switch='rowid_filter=off' for ANALYZE FORMAT=JSON SELECT o_orderkey, l_linenumber, l_shipdate, o_totalprice
FROM orders JOIN lineitem ON o_orderkey=l_orderkey
WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
@@ -1115,7 +1127,8 @@ ANALYZE
"r_loops": 1,
"rows": 69,
"r_rows": 71,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100,
"index_condition": "orders.o_totalprice between 200000 and 230000"
@@ -1129,16 +1142,17 @@ ANALYZE
"i_l_orderkey",
"i_l_orderkey_quantity"
],
- "key": "PRIMARY",
+ "key": "i_l_orderkey",
"key_length": "4",
"used_key_parts": ["l_orderkey"],
"ref": ["dbt3_s001.orders.o_orderkey"],
"r_loops": 71,
"rows": 4,
- "r_rows": 6.7042,
- "r_total_time_ms": "REPLACED",
- "filtered": 8.4763,
- "r_filtered": 7.7731,
+ "r_rows": 6.704225352,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 8.476269722,
+ "r_filtered": 7.773109244,
"attached_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'"
}
}
@@ -1225,7 +1239,7 @@ EXPLAIN
"key_length": "4",
"used_key_parts": ["l_receiptDATE"],
"rows": 18,
- "filtered": 0.5662,
+ "filtered": 0.566194832,
"index_condition": "lineitem.l_receiptDATE between '1996-10-05' and '1996-10-10'",
"attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-10-10'"
},
@@ -1238,7 +1252,7 @@ EXPLAIN
"used_key_parts": ["o_orderkey"],
"ref": ["dbt3_s001.lineitem.l_orderkey"],
"rows": 1,
- "filtered": 7.4667,
+ "filtered": 7.466666698,
"attached_condition": "orders.o_totalprice between 200000 and 250000"
}
}
@@ -1280,9 +1294,10 @@ ANALYZE
"r_loops": 1,
"rows": 18,
"r_rows": 18,
- "r_total_time_ms": "REPLACED",
- "filtered": 0.5662,
- "r_filtered": 38.889,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 0.566194832,
+ "r_filtered": 38.88888889,
"index_condition": "lineitem.l_receiptDATE between '1996-10-05' and '1996-10-10'",
"attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-10-10'"
},
@@ -1297,9 +1312,10 @@ ANALYZE
"r_loops": 7,
"rows": 1,
"r_rows": 1,
- "r_total_time_ms": "REPLACED",
- "filtered": 7.4667,
- "r_filtered": 14.286,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 7.466666698,
+ "r_filtered": 14.28571429,
"attached_condition": "orders.o_totalprice between 200000 and 250000"
}
}
@@ -1345,7 +1361,7 @@ EXPLAIN
"key_length": "4",
"used_key_parts": ["l_receiptDATE"],
"rows": 18,
- "filtered": 0.5662,
+ "filtered": 0.566194832,
"index_condition": "lineitem.l_receiptDATE between '1996-10-05' and '1996-10-10'",
"attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-10-10'"
},
@@ -1358,7 +1374,7 @@ EXPLAIN
"used_key_parts": ["o_orderkey"],
"ref": ["dbt3_s001.lineitem.l_orderkey"],
"rows": 1,
- "filtered": 7.4667,
+ "filtered": 7.466666698,
"attached_condition": "orders.o_totalprice between 200000 and 250000"
}
}
@@ -1400,9 +1416,10 @@ ANALYZE
"r_loops": 1,
"rows": 18,
"r_rows": 18,
- "r_total_time_ms": "REPLACED",
- "filtered": 0.5662,
- "r_filtered": 38.889,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 0.566194832,
+ "r_filtered": 38.88888889,
"index_condition": "lineitem.l_receiptDATE between '1996-10-05' and '1996-10-10'",
"attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-10-10'"
},
@@ -1417,9 +1434,10 @@ ANALYZE
"r_loops": 7,
"rows": 1,
"r_rows": 1,
- "r_total_time_ms": "REPLACED",
- "filtered": 7.4667,
- "r_filtered": 14.286,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 7.466666698,
+ "r_filtered": 14.28571429,
"attached_condition": "orders.o_totalprice between 200000 and 250000"
}
}
@@ -1447,7 +1465,7 @@ o_totalprice BETWEEN 200000 AND 220000 AND
l_shipdate BETWEEN '1996-10-01' AND '1996-12-01';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE orders range PRIMARY,i_o_totalprice,i_o_totaldiscount i_o_totaldiscount 9 NULL 39 Using index condition; Using where
-1 SIMPLE lineitem ref PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity PRIMARY 4 dbt3_s001.orders.o_orderkey 4 Using where
+1 SIMPLE lineitem ref PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity i_l_orderkey 4 dbt3_s001.orders.o_orderkey 4 Using where
set statement optimizer_switch='rowid_filter=on' for EXPLAIN FORMAT=JSON SELECT o_totaldiscount, o_totalprice, l_shipdate
FROM orders, lineitem
WHERE o_orderkey=l_orderkey AND
@@ -1466,7 +1484,7 @@ EXPLAIN
"key_length": "9",
"used_key_parts": ["o_totaldiscount"],
"rows": 39,
- "filtered": 3.2,
+ "filtered": 3.200000048,
"index_condition": "orders.o_totaldiscount between 18000 and 20000",
"attached_condition": "orders.o_totalprice between 200000 and 220000"
},
@@ -1479,12 +1497,12 @@ EXPLAIN
"i_l_orderkey",
"i_l_orderkey_quantity"
],
- "key": "PRIMARY",
+ "key": "i_l_orderkey",
"key_length": "4",
"used_key_parts": ["l_orderkey"],
"ref": ["dbt3_s001.orders.o_orderkey"],
"rows": 4,
- "filtered": 3.0475,
+ "filtered": 3.047460556,
"attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-12-01'"
}
}
@@ -1497,7 +1515,7 @@ o_totalprice BETWEEN 200000 AND 220000 AND
l_shipdate BETWEEN '1996-10-01' AND '1996-12-01';
id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
1 SIMPLE orders range PRIMARY,i_o_totalprice,i_o_totaldiscount i_o_totaldiscount 9 NULL 39 41.00 3.20 2.44 Using index condition; Using where
-1 SIMPLE lineitem ref PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity PRIMARY 4 dbt3_s001.orders.o_orderkey 4 6.00 3.05 66.67 Using where
+1 SIMPLE lineitem ref PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity i_l_orderkey 4 dbt3_s001.orders.o_orderkey 4 6.00 3.05 66.67 Using where
set statement optimizer_switch='rowid_filter=on' for ANALYZE FORMAT=JSON SELECT o_totaldiscount, o_totalprice, l_shipdate
FROM orders, lineitem
WHERE o_orderkey=l_orderkey AND
@@ -1520,9 +1538,10 @@ ANALYZE
"r_loops": 1,
"rows": 39,
"r_rows": 41,
- "r_total_time_ms": "REPLACED",
- "filtered": 3.2,
- "r_filtered": 2.439,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 3.200000048,
+ "r_filtered": 2.43902439,
"index_condition": "orders.o_totaldiscount between 18000 and 20000",
"attached_condition": "orders.o_totalprice between 200000 and 220000"
},
@@ -1535,16 +1554,17 @@ ANALYZE
"i_l_orderkey",
"i_l_orderkey_quantity"
],
- "key": "PRIMARY",
+ "key": "i_l_orderkey",
"key_length": "4",
"used_key_parts": ["l_orderkey"],
"ref": ["dbt3_s001.orders.o_orderkey"],
"r_loops": 1,
"rows": 4,
"r_rows": 6,
- "r_total_time_ms": "REPLACED",
- "filtered": 3.0475,
- "r_filtered": 66.667,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 3.047460556,
+ "r_filtered": 66.66666667,
"attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-12-01'"
}
}
@@ -1568,7 +1588,7 @@ o_totalprice BETWEEN 200000 AND 220000 AND
l_shipdate BETWEEN '1996-10-01' AND '1996-12-01';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE orders range PRIMARY,i_o_totalprice,i_o_totaldiscount i_o_totaldiscount 9 NULL 39 Using index condition; Using where
-1 SIMPLE lineitem ref PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity PRIMARY 4 dbt3_s001.orders.o_orderkey 4 Using where
+1 SIMPLE lineitem ref PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity i_l_orderkey 4 dbt3_s001.orders.o_orderkey 4 Using where
set statement optimizer_switch='rowid_filter=off' for EXPLAIN FORMAT=JSON SELECT o_totaldiscount, o_totalprice, l_shipdate
FROM orders, lineitem
WHERE o_orderkey=l_orderkey AND
@@ -1587,7 +1607,7 @@ EXPLAIN
"key_length": "9",
"used_key_parts": ["o_totaldiscount"],
"rows": 39,
- "filtered": 3.2,
+ "filtered": 3.200000048,
"index_condition": "orders.o_totaldiscount between 18000 and 20000",
"attached_condition": "orders.o_totalprice between 200000 and 220000"
},
@@ -1600,12 +1620,12 @@ EXPLAIN
"i_l_orderkey",
"i_l_orderkey_quantity"
],
- "key": "PRIMARY",
+ "key": "i_l_orderkey",
"key_length": "4",
"used_key_parts": ["l_orderkey"],
"ref": ["dbt3_s001.orders.o_orderkey"],
"rows": 4,
- "filtered": 3.0475,
+ "filtered": 3.047460556,
"attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-12-01'"
}
}
@@ -1618,7 +1638,7 @@ o_totalprice BETWEEN 200000 AND 220000 AND
l_shipdate BETWEEN '1996-10-01' AND '1996-12-01';
id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
1 SIMPLE orders range PRIMARY,i_o_totalprice,i_o_totaldiscount i_o_totaldiscount 9 NULL 39 41.00 3.20 2.44 Using index condition; Using where
-1 SIMPLE lineitem ref PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity PRIMARY 4 dbt3_s001.orders.o_orderkey 4 6.00 3.05 66.67 Using where
+1 SIMPLE lineitem ref PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity i_l_orderkey 4 dbt3_s001.orders.o_orderkey 4 6.00 3.05 66.67 Using where
set statement optimizer_switch='rowid_filter=off' for ANALYZE FORMAT=JSON SELECT o_totaldiscount, o_totalprice, l_shipdate
FROM orders, lineitem
WHERE o_orderkey=l_orderkey AND
@@ -1641,9 +1661,10 @@ ANALYZE
"r_loops": 1,
"rows": 39,
"r_rows": 41,
- "r_total_time_ms": "REPLACED",
- "filtered": 3.2,
- "r_filtered": 2.439,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 3.200000048,
+ "r_filtered": 2.43902439,
"index_condition": "orders.o_totaldiscount between 18000 and 20000",
"attached_condition": "orders.o_totalprice between 200000 and 220000"
},
@@ -1656,16 +1677,17 @@ ANALYZE
"i_l_orderkey",
"i_l_orderkey_quantity"
],
- "key": "PRIMARY",
+ "key": "i_l_orderkey",
"key_length": "4",
"used_key_parts": ["l_orderkey"],
"ref": ["dbt3_s001.orders.o_orderkey"],
"r_loops": 1,
"rows": 4,
"r_rows": 6,
- "r_total_time_ms": "REPLACED",
- "filtered": 3.0475,
- "r_filtered": 66.667,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 3.047460556,
+ "r_filtered": 66.66666667,
"attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-12-01'"
}
}
@@ -1692,7 +1714,7 @@ o_totalprice BETWEEN 200000 AND 220000 AND
l_shipdate BETWEEN '1996-10-01' AND '1996-12-01';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE orders range PRIMARY,i_o_orderdate,i_o_totalprice,i_o_totaldiscount i_o_totaldiscount 9 NULL 39 Using index condition; Using where
-1 SIMPLE lineitem ref PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity PRIMARY 4 dbt3_s001.orders.o_orderkey 4 Using where
+1 SIMPLE lineitem ref PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity i_l_orderkey 4 dbt3_s001.orders.o_orderkey 4 Using where
set statement optimizer_switch='rowid_filter=on' for EXPLAIN FORMAT=JSON SELECT o_totaldiscount, o_totalprice, l_shipdate
FROM v1, lineitem
WHERE o_orderkey=l_orderkey AND
@@ -1729,7 +1751,7 @@ EXPLAIN
"i_l_orderkey",
"i_l_orderkey_quantity"
],
- "key": "PRIMARY",
+ "key": "i_l_orderkey",
"key_length": "4",
"used_key_parts": ["l_orderkey"],
"ref": ["dbt3_s001.orders.o_orderkey"],
@@ -1747,7 +1769,7 @@ o_totalprice BETWEEN 200000 AND 220000 AND
l_shipdate BETWEEN '1996-10-01' AND '1996-12-01';
id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
1 SIMPLE orders range PRIMARY,i_o_orderdate,i_o_totalprice,i_o_totaldiscount i_o_totaldiscount 9 NULL 39 41.00 # 2.44 Using index condition; Using where
-1 SIMPLE lineitem ref PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity PRIMARY 4 dbt3_s001.orders.o_orderkey 4 6.00 # 66.67 Using where
+1 SIMPLE lineitem ref PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity i_l_orderkey 4 dbt3_s001.orders.o_orderkey 4 6.00 # 66.67 Using where
set statement optimizer_switch='rowid_filter=on' for ANALYZE FORMAT=JSON SELECT o_totaldiscount, o_totalprice, l_shipdate
FROM v1, lineitem
WHERE o_orderkey=l_orderkey AND
@@ -1775,9 +1797,10 @@ ANALYZE
"r_loops": 1,
"rows": 39,
"r_rows": 41,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": "REPLACED",
- "r_filtered": 2.439,
+ "r_filtered": 2.43902439,
"index_condition": "orders.o_totaldiscount between 18000 and 20000",
"attached_condition": "orders.o_totalprice between 200000 and 220000 and orders.o_orderDATE between '1992-12-01' and '1997-01-01'"
},
@@ -1790,16 +1813,17 @@ ANALYZE
"i_l_orderkey",
"i_l_orderkey_quantity"
],
- "key": "PRIMARY",
+ "key": "i_l_orderkey",
"key_length": "4",
"used_key_parts": ["l_orderkey"],
"ref": ["dbt3_s001.orders.o_orderkey"],
"r_loops": 1,
"rows": 4,
"r_rows": 6,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": "REPLACED",
- "r_filtered": 66.667,
+ "r_filtered": 66.66666667,
"attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-12-01'"
}
}
@@ -1823,7 +1847,7 @@ o_totalprice BETWEEN 200000 AND 220000 AND
l_shipdate BETWEEN '1996-10-01' AND '1996-12-01';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE orders range PRIMARY,i_o_orderdate,i_o_totalprice,i_o_totaldiscount i_o_totaldiscount 9 NULL 39 Using index condition; Using where
-1 SIMPLE lineitem ref PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity PRIMARY 4 dbt3_s001.orders.o_orderkey 4 Using where
+1 SIMPLE lineitem ref PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity i_l_orderkey 4 dbt3_s001.orders.o_orderkey 4 Using where
set statement optimizer_switch='rowid_filter=off' for EXPLAIN FORMAT=JSON SELECT o_totaldiscount, o_totalprice, l_shipdate
FROM v1, lineitem
WHERE o_orderkey=l_orderkey AND
@@ -1860,7 +1884,7 @@ EXPLAIN
"i_l_orderkey",
"i_l_orderkey_quantity"
],
- "key": "PRIMARY",
+ "key": "i_l_orderkey",
"key_length": "4",
"used_key_parts": ["l_orderkey"],
"ref": ["dbt3_s001.orders.o_orderkey"],
@@ -1878,7 +1902,7 @@ o_totalprice BETWEEN 200000 AND 220000 AND
l_shipdate BETWEEN '1996-10-01' AND '1996-12-01';
id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
1 SIMPLE orders range PRIMARY,i_o_orderdate,i_o_totalprice,i_o_totaldiscount i_o_totaldiscount 9 NULL 39 41.00 # 2.44 Using index condition; Using where
-1 SIMPLE lineitem ref PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity PRIMARY 4 dbt3_s001.orders.o_orderkey 4 6.00 # 66.67 Using where
+1 SIMPLE lineitem ref PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity i_l_orderkey 4 dbt3_s001.orders.o_orderkey 4 6.00 # 66.67 Using where
set statement optimizer_switch='rowid_filter=off' for ANALYZE FORMAT=JSON SELECT o_totaldiscount, o_totalprice, l_shipdate
FROM v1, lineitem
WHERE o_orderkey=l_orderkey AND
@@ -1906,9 +1930,10 @@ ANALYZE
"r_loops": 1,
"rows": 39,
"r_rows": 41,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": "REPLACED",
- "r_filtered": 2.439,
+ "r_filtered": 2.43902439,
"index_condition": "orders.o_totaldiscount between 18000 and 20000",
"attached_condition": "orders.o_totalprice between 200000 and 220000 and orders.o_orderDATE between '1992-12-01' and '1997-01-01'"
},
@@ -1921,16 +1946,17 @@ ANALYZE
"i_l_orderkey",
"i_l_orderkey_quantity"
],
- "key": "PRIMARY",
+ "key": "i_l_orderkey",
"key_length": "4",
"used_key_parts": ["l_orderkey"],
"ref": ["dbt3_s001.orders.o_orderkey"],
"r_loops": 1,
"rows": 4,
"r_rows": 6,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": "REPLACED",
- "r_filtered": 66.667,
+ "r_filtered": 66.66666667,
"attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-12-01'"
}
}
diff --git a/mysql-test/main/rowid_filter.test b/mysql-test/main/rowid_filter.test
index a68c32cf0de..163b71b6153 100644
--- a/mysql-test/main/rowid_filter.test
+++ b/mysql-test/main/rowid_filter.test
@@ -220,7 +220,7 @@ eval $with_filter EXPLAIN $q7;
eval $with_filter EXPLAIN FORMAT=JSON $q7;
--replace_column 11 #
eval $with_filter ANALYZE $q7;
---replace_regex /("(r_total_time_ms|r_buffer_size|r_filling_time_ms|filtered)": )[^, \n]*/\1"REPLACED"/
+--replace_regex /("(r_(total|table|other)_time_ms|r_buffer_size|r_filling_time_ms|filtered)": )[^, \n]*/\1"REPLACED"/
eval $with_filter ANALYZE FORMAT=JSON $q7;
--sorted_result
eval $with_filter $q7;
@@ -230,7 +230,7 @@ eval $without_filter EXPLAIN $q7;
eval $without_filter EXPLAIN FORMAT=JSON $q7;
--replace_column 11 #
eval $without_filter ANALYZE $q7;
---replace_regex /("(r_total_time_ms|r_buffer_size|r_filling_time_ms|filtered)": )[^, \n]*/\1"REPLACED"/
+--replace_regex /("(r_(total|table|other)_time_ms|r_buffer_size|r_filling_time_ms|filtered)": )[^, \n]*/\1"REPLACED"/
eval $without_filter ANALYZE FORMAT=JSON $q7;
--sorted_result
eval $without_filter $q7;
diff --git a/mysql-test/main/rowid_filter_innodb.result b/mysql-test/main/rowid_filter_innodb.result
index af7ff3210a5..ae52f9416b9 100644
--- a/mysql-test/main/rowid_filter_innodb.result
+++ b/mysql-test/main/rowid_filter_innodb.result
@@ -1,4 +1,4 @@
-SET SESSION STORAGE_ENGINE='InnoDB';
+SET SESSION DEFAULT_STORAGE_ENGINE='InnoDB';
DROP DATABASE IF EXISTS dbt3_s001;
CREATE DATABASE dbt3_s001;
use dbt3_s001;
@@ -91,10 +91,10 @@ EXPLAIN
"used_key_parts": ["l_quantity"]
},
"rows": 605,
- "selectivity_pct": 10.075
+ "selectivity_pct": 10.07493755
},
"rows": 510,
- "filtered": 10.075,
+ "filtered": 10.07493782,
"index_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'",
"attached_condition": "lineitem.l_quantity > 45"
}
@@ -127,17 +127,18 @@ ANALYZE
"used_key_parts": ["l_quantity"]
},
"rows": 605,
- "selectivity_pct": 10.075,
+ "selectivity_pct": 10.07493755,
"r_rows": 605,
- "r_selectivity_pct": 11.765,
+ "r_selectivity_pct": 11.76470588,
"r_buffer_size": "REPLACED",
"r_filling_time_ms": "REPLACED"
},
"r_loops": 1,
"rows": 510,
"r_rows": 60,
- "r_total_time_ms": "REPLACED",
- "filtered": 10.075,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 10.07493782,
"r_filtered": 100,
"index_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'",
"attached_condition": "lineitem.l_quantity > 45"
@@ -228,7 +229,7 @@ EXPLAIN
"key_length": "4",
"used_key_parts": ["l_shipDATE"],
"rows": 510,
- "filtered": 10.075,
+ "filtered": 10.07493782,
"index_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'",
"attached_condition": "lineitem.l_quantity > 45"
}
@@ -258,9 +259,10 @@ ANALYZE
"r_loops": 1,
"rows": 510,
"r_rows": 510,
- "r_total_time_ms": "REPLACED",
- "filtered": 10.075,
- "r_filtered": 11.765,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 10.07493782,
+ "r_filtered": 11.76470588,
"index_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'",
"attached_condition": "lineitem.l_quantity > 45"
}
@@ -371,7 +373,7 @@ EXPLAIN
"used_key_parts": ["o_orderkey"],
"ref": ["dbt3_s001.lineitem.l_orderkey"],
"rows": 1,
- "filtered": 4.7333,
+ "filtered": 4.733333111,
"attached_condition": "orders.o_totalprice between 200000 and 230000"
}
}
@@ -408,7 +410,8 @@ ANALYZE
"r_loops": 1,
"rows": 98,
"r_rows": 98,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100,
"attached_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-01-31'",
@@ -425,9 +428,10 @@ ANALYZE
"r_loops": 98,
"rows": 1,
"r_rows": 1,
- "r_total_time_ms": "REPLACED",
- "filtered": 4.7333,
- "r_filtered": 11.224,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 4.733333111,
+ "r_filtered": 11.2244898,
"attached_condition": "orders.o_totalprice between 200000 and 230000"
}
}
@@ -489,7 +493,7 @@ EXPLAIN
"used_key_parts": ["o_orderkey"],
"ref": ["dbt3_s001.lineitem.l_orderkey"],
"rows": 1,
- "filtered": 4.7333,
+ "filtered": 4.733333111,
"attached_condition": "orders.o_totalprice between 200000 and 230000"
}
}
@@ -526,7 +530,8 @@ ANALYZE
"r_loops": 1,
"rows": 98,
"r_rows": 98,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100,
"attached_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-01-31'",
@@ -543,9 +548,10 @@ ANALYZE
"r_loops": 98,
"rows": 1,
"r_rows": 1,
- "r_total_time_ms": "REPLACED",
- "filtered": 4.7333,
- "r_filtered": 11.224,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 4.733333111,
+ "r_filtered": 11.2244898,
"attached_condition": "orders.o_totalprice between 200000 and 230000"
}
}
@@ -572,8 +578,8 @@ WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
l_quantity > 45 AND
o_totalprice between 180000 and 230000;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE orders range PRIMARY,i_o_totalprice i_o_totalprice 9 NULL 144 Using where; Using index
-1 SIMPLE lineitem ref PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity,i_l_quantity PRIMARY 4 dbt3_s001.orders.o_orderkey 4 Using where
+1 SIMPLE lineitem range|filter PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity,i_l_quantity i_l_shipdate|i_l_quantity 4|9 NULL 510 (10%) Using index condition; Using where; Using rowid filter
+1 SIMPLE orders eq_ref PRIMARY,i_o_totalprice PRIMARY 4 dbt3_s001.lineitem.l_orderkey 1 Using where
set statement optimizer_switch='rowid_filter=on' for EXPLAIN FORMAT=JSON SELECT o_orderkey, l_linenumber, l_shipdate, l_quantity, o_totalprice
FROM orders JOIN lineitem ON o_orderkey=l_orderkey
WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
@@ -584,20 +590,8 @@ EXPLAIN
"query_block": {
"select_id": 1,
"table": {
- "table_name": "orders",
- "access_type": "range",
- "possible_keys": ["PRIMARY", "i_o_totalprice"],
- "key": "i_o_totalprice",
- "key_length": "9",
- "used_key_parts": ["o_totalprice"],
- "rows": 144,
- "filtered": 100,
- "attached_condition": "orders.o_totalprice between 180000 and 230000",
- "using_index": true
- },
- "table": {
"table_name": "lineitem",
- "access_type": "ref",
+ "access_type": "range",
"possible_keys": [
"PRIMARY",
"i_l_shipdate",
@@ -605,13 +599,33 @@ EXPLAIN
"i_l_orderkey_quantity",
"i_l_quantity"
],
+ "key": "i_l_shipdate",
+ "key_length": "4",
+ "used_key_parts": ["l_shipDATE"],
+ "rowid_filter": {
+ "range": {
+ "key": "i_l_quantity",
+ "used_key_parts": ["l_quantity"]
+ },
+ "rows": 605,
+ "selectivity_pct": 10.07493755
+ },
+ "rows": 510,
+ "filtered": 10.07493782,
+ "index_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'",
+ "attached_condition": "lineitem.l_quantity > 45"
+ },
+ "table": {
+ "table_name": "orders",
+ "access_type": "eq_ref",
+ "possible_keys": ["PRIMARY", "i_o_totalprice"],
"key": "PRIMARY",
"key_length": "4",
- "used_key_parts": ["l_orderkey"],
- "ref": ["dbt3_s001.orders.o_orderkey"],
- "rows": 4,
- "filtered": 0.8557,
- "attached_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30' and lineitem.l_quantity > 45"
+ "used_key_parts": ["o_orderkey"],
+ "ref": ["dbt3_s001.lineitem.l_orderkey"],
+ "rows": 1,
+ "filtered": 9.600000381,
+ "attached_condition": "orders.o_totalprice between 180000 and 230000"
}
}
}
@@ -621,8 +635,8 @@ WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
l_quantity > 45 AND
o_totalprice between 180000 and 230000;
id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
-1 SIMPLE orders range PRIMARY,i_o_totalprice i_o_totalprice 9 NULL 144 144.00 100.00 100.00 Using where; Using index
-1 SIMPLE lineitem ref PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity,i_l_quantity PRIMARY 4 dbt3_s001.orders.o_orderkey 4 6.62 0.86 1.68 Using where
+1 SIMPLE lineitem range|filter PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity,i_l_quantity i_l_shipdate|i_l_quantity 4|9 NULL 510 (10%) 60.00 (11%) 10.07 100.00 Using index condition; Using where; Using rowid filter
+1 SIMPLE orders eq_ref PRIMARY,i_o_totalprice PRIMARY 4 dbt3_s001.lineitem.l_orderkey 1 1.00 9.60 26.67 Using where
set statement optimizer_switch='rowid_filter=on' for ANALYZE FORMAT=JSON SELECT o_orderkey, l_linenumber, l_shipdate, l_quantity, o_totalprice
FROM orders JOIN lineitem ON o_orderkey=l_orderkey
WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
@@ -635,24 +649,8 @@ ANALYZE
"r_loops": 1,
"r_total_time_ms": "REPLACED",
"table": {
- "table_name": "orders",
- "access_type": "range",
- "possible_keys": ["PRIMARY", "i_o_totalprice"],
- "key": "i_o_totalprice",
- "key_length": "9",
- "used_key_parts": ["o_totalprice"],
- "r_loops": 1,
- "rows": 144,
- "r_rows": 144,
- "r_total_time_ms": "REPLACED",
- "filtered": 100,
- "r_filtered": 100,
- "attached_condition": "orders.o_totalprice between 180000 and 230000",
- "using_index": true
- },
- "table": {
"table_name": "lineitem",
- "access_type": "ref",
+ "access_type": "range",
"possible_keys": [
"PRIMARY",
"i_l_shipdate",
@@ -660,17 +658,47 @@ ANALYZE
"i_l_orderkey_quantity",
"i_l_quantity"
],
+ "key": "i_l_shipdate",
+ "key_length": "4",
+ "used_key_parts": ["l_shipDATE"],
+ "rowid_filter": {
+ "range": {
+ "key": "i_l_quantity",
+ "used_key_parts": ["l_quantity"]
+ },
+ "rows": 605,
+ "selectivity_pct": 10.07493755,
+ "r_rows": 605,
+ "r_selectivity_pct": 11.76470588,
+ "r_buffer_size": "REPLACED",
+ "r_filling_time_ms": "REPLACED"
+ },
+ "r_loops": 1,
+ "rows": 510,
+ "r_rows": 60,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 10.07493782,
+ "r_filtered": 100,
+ "index_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'",
+ "attached_condition": "lineitem.l_quantity > 45"
+ },
+ "table": {
+ "table_name": "orders",
+ "access_type": "eq_ref",
+ "possible_keys": ["PRIMARY", "i_o_totalprice"],
"key": "PRIMARY",
"key_length": "4",
- "used_key_parts": ["l_orderkey"],
- "ref": ["dbt3_s001.orders.o_orderkey"],
- "r_loops": 144,
- "rows": 4,
- "r_rows": 6.625,
- "r_total_time_ms": "REPLACED",
- "filtered": 0.8557,
- "r_filtered": 1.6771,
- "attached_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30' and lineitem.l_quantity > 45"
+ "used_key_parts": ["o_orderkey"],
+ "ref": ["dbt3_s001.lineitem.l_orderkey"],
+ "r_loops": 60,
+ "rows": 1,
+ "r_rows": 1,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 9.600000381,
+ "r_filtered": 26.66666667,
+ "attached_condition": "orders.o_totalprice between 180000 and 230000"
}
}
}
@@ -740,7 +768,7 @@ EXPLAIN
"used_key_parts": ["l_orderkey"],
"ref": ["dbt3_s001.orders.o_orderkey"],
"rows": 4,
- "filtered": 0.8557,
+ "filtered": 0.855656624,
"attached_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30' and lineitem.l_quantity > 45"
}
}
@@ -774,7 +802,8 @@ ANALYZE
"r_loops": 1,
"rows": 144,
"r_rows": 144,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100,
"attached_condition": "orders.o_totalprice between 180000 and 230000",
@@ -797,9 +826,10 @@ ANALYZE
"r_loops": 144,
"rows": 4,
"r_rows": 6.625,
- "r_total_time_ms": "REPLACED",
- "filtered": 0.8557,
- "r_filtered": 1.6771,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 0.855656624,
+ "r_filtered": 1.677148847,
"attached_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30' and lineitem.l_quantity > 45"
}
}
@@ -867,7 +897,7 @@ EXPLAIN
"used_key_parts": ["l_orderkey"],
"ref": ["dbt3_s001.orders.o_orderkey"],
"rows": 4,
- "filtered": 8.4929,
+ "filtered": 8.492922783,
"attached_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'"
}
}
@@ -899,7 +929,8 @@ ANALYZE
"r_loops": 1,
"rows": 71,
"r_rows": 71,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100,
"attached_condition": "orders.o_totalprice between 200000 and 230000",
@@ -920,10 +951,11 @@ ANALYZE
"ref": ["dbt3_s001.orders.o_orderkey"],
"r_loops": 71,
"rows": 4,
- "r_rows": 6.7042,
- "r_total_time_ms": "REPLACED",
- "filtered": 8.4929,
- "r_filtered": 7.7731,
+ "r_rows": 6.704225352,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 8.492922783,
+ "r_filtered": 7.773109244,
"attached_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'"
}
}
@@ -1011,7 +1043,7 @@ EXPLAIN
"used_key_parts": ["l_orderkey"],
"ref": ["dbt3_s001.orders.o_orderkey"],
"rows": 4,
- "filtered": 8.4929,
+ "filtered": 8.492922783,
"attached_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'"
}
}
@@ -1043,7 +1075,8 @@ ANALYZE
"r_loops": 1,
"rows": 71,
"r_rows": 71,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100,
"attached_condition": "orders.o_totalprice between 200000 and 230000",
@@ -1064,10 +1097,11 @@ ANALYZE
"ref": ["dbt3_s001.orders.o_orderkey"],
"r_loops": 71,
"rows": 4,
- "r_rows": 6.7042,
- "r_total_time_ms": "REPLACED",
- "filtered": 8.4929,
- "r_filtered": 7.7731,
+ "r_rows": 6.704225352,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 8.492922783,
+ "r_filtered": 7.773109244,
"attached_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'"
}
}
@@ -1154,7 +1188,7 @@ EXPLAIN
"key_length": "4",
"used_key_parts": ["l_receiptDATE"],
"rows": 18,
- "filtered": 0.5662,
+ "filtered": 0.566194832,
"index_condition": "lineitem.l_receiptDATE between '1996-10-05' and '1996-10-10'",
"attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-10-10'"
},
@@ -1167,7 +1201,7 @@ EXPLAIN
"used_key_parts": ["o_orderkey"],
"ref": ["dbt3_s001.lineitem.l_orderkey"],
"rows": 1,
- "filtered": 5.6667,
+ "filtered": 5.666666508,
"attached_condition": "orders.o_totalprice between 200000 and 250000"
}
}
@@ -1209,9 +1243,10 @@ ANALYZE
"r_loops": 1,
"rows": 18,
"r_rows": 18,
- "r_total_time_ms": "REPLACED",
- "filtered": 0.5662,
- "r_filtered": 38.889,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 0.566194832,
+ "r_filtered": 38.88888889,
"index_condition": "lineitem.l_receiptDATE between '1996-10-05' and '1996-10-10'",
"attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-10-10'"
},
@@ -1226,9 +1261,10 @@ ANALYZE
"r_loops": 7,
"rows": 1,
"r_rows": 1,
- "r_total_time_ms": "REPLACED",
- "filtered": 5.6667,
- "r_filtered": 14.286,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 5.666666508,
+ "r_filtered": 14.28571429,
"attached_condition": "orders.o_totalprice between 200000 and 250000"
}
}
@@ -1274,7 +1310,7 @@ EXPLAIN
"key_length": "4",
"used_key_parts": ["l_receiptDATE"],
"rows": 18,
- "filtered": 0.5662,
+ "filtered": 0.566194832,
"index_condition": "lineitem.l_receiptDATE between '1996-10-05' and '1996-10-10'",
"attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-10-10'"
},
@@ -1287,7 +1323,7 @@ EXPLAIN
"used_key_parts": ["o_orderkey"],
"ref": ["dbt3_s001.lineitem.l_orderkey"],
"rows": 1,
- "filtered": 5.6667,
+ "filtered": 5.666666508,
"attached_condition": "orders.o_totalprice between 200000 and 250000"
}
}
@@ -1329,9 +1365,10 @@ ANALYZE
"r_loops": 1,
"rows": 18,
"r_rows": 18,
- "r_total_time_ms": "REPLACED",
- "filtered": 0.5662,
- "r_filtered": 38.889,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 0.566194832,
+ "r_filtered": 38.88888889,
"index_condition": "lineitem.l_receiptDATE between '1996-10-05' and '1996-10-10'",
"attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-10-10'"
},
@@ -1346,9 +1383,10 @@ ANALYZE
"r_loops": 7,
"rows": 1,
"r_rows": 1,
- "r_total_time_ms": "REPLACED",
- "filtered": 5.6667,
- "r_filtered": 14.286,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 5.666666508,
+ "r_filtered": 14.28571429,
"attached_condition": "orders.o_totalprice between 200000 and 250000"
}
}
@@ -1395,7 +1433,7 @@ EXPLAIN
"key_length": "9",
"used_key_parts": ["o_totaldiscount"],
"rows": 41,
- "filtered": 3.3333,
+ "filtered": 3.333333254,
"index_condition": "orders.o_totaldiscount between 18000 and 20000",
"attached_condition": "orders.o_totalprice between 200000 and 220000"
},
@@ -1413,7 +1451,7 @@ EXPLAIN
"used_key_parts": ["l_orderkey"],
"ref": ["dbt3_s001.orders.o_orderkey"],
"rows": 4,
- "filtered": 3.0475,
+ "filtered": 3.047460556,
"attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-12-01'"
}
}
@@ -1449,9 +1487,10 @@ ANALYZE
"r_loops": 1,
"rows": 41,
"r_rows": 41,
- "r_total_time_ms": "REPLACED",
- "filtered": 3.3333,
- "r_filtered": 2.439,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 3.333333254,
+ "r_filtered": 2.43902439,
"index_condition": "orders.o_totaldiscount between 18000 and 20000",
"attached_condition": "orders.o_totalprice between 200000 and 220000"
},
@@ -1471,9 +1510,10 @@ ANALYZE
"r_loops": 1,
"rows": 4,
"r_rows": 6,
- "r_total_time_ms": "REPLACED",
- "filtered": 3.0475,
- "r_filtered": 66.667,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 3.047460556,
+ "r_filtered": 66.66666667,
"attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-12-01'"
}
}
@@ -1516,7 +1556,7 @@ EXPLAIN
"key_length": "9",
"used_key_parts": ["o_totaldiscount"],
"rows": 41,
- "filtered": 3.3333,
+ "filtered": 3.333333254,
"index_condition": "orders.o_totaldiscount between 18000 and 20000",
"attached_condition": "orders.o_totalprice between 200000 and 220000"
},
@@ -1534,7 +1574,7 @@ EXPLAIN
"used_key_parts": ["l_orderkey"],
"ref": ["dbt3_s001.orders.o_orderkey"],
"rows": 4,
- "filtered": 3.0475,
+ "filtered": 3.047460556,
"attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-12-01'"
}
}
@@ -1570,9 +1610,10 @@ ANALYZE
"r_loops": 1,
"rows": 41,
"r_rows": 41,
- "r_total_time_ms": "REPLACED",
- "filtered": 3.3333,
- "r_filtered": 2.439,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 3.333333254,
+ "r_filtered": 2.43902439,
"index_condition": "orders.o_totaldiscount between 18000 and 20000",
"attached_condition": "orders.o_totalprice between 200000 and 220000"
},
@@ -1592,9 +1633,10 @@ ANALYZE
"r_loops": 1,
"rows": 4,
"r_rows": 6,
- "r_total_time_ms": "REPLACED",
- "filtered": 3.0475,
- "r_filtered": 66.667,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 3.047460556,
+ "r_filtered": 66.66666667,
"attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-12-01'"
}
}
@@ -1704,9 +1746,10 @@ ANALYZE
"r_loops": 1,
"rows": 41,
"r_rows": 41,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": "REPLACED",
- "r_filtered": 2.439,
+ "r_filtered": 2.43902439,
"index_condition": "orders.o_totaldiscount between 18000 and 20000",
"attached_condition": "orders.o_totalprice between 200000 and 220000 and orders.o_orderDATE between '1992-12-01' and '1997-01-01'"
},
@@ -1726,9 +1769,10 @@ ANALYZE
"r_loops": 1,
"rows": 4,
"r_rows": 6,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": "REPLACED",
- "r_filtered": 66.667,
+ "r_filtered": 66.66666667,
"attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-12-01'"
}
}
@@ -1835,9 +1879,10 @@ ANALYZE
"r_loops": 1,
"rows": 41,
"r_rows": 41,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": "REPLACED",
- "r_filtered": 2.439,
+ "r_filtered": 2.43902439,
"index_condition": "orders.o_totaldiscount between 18000 and 20000",
"attached_condition": "orders.o_totalprice between 200000 and 220000 and orders.o_orderDATE between '1992-12-01' and '1997-01-01'"
},
@@ -1857,9 +1902,10 @@ ANALYZE
"r_loops": 1,
"rows": 4,
"r_rows": 6,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": "REPLACED",
- "r_filtered": 66.667,
+ "r_filtered": 66.66666667,
"attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-12-01'"
}
}
@@ -2133,8 +2179,8 @@ union
( select * from t1
where (f1 is null and f2 is null) and (f2 between 'a' and 'z' or f1 in ('a')));
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t1 index_merge f1,f2 f1,f2 13,33 NULL 1 Using intersect(f1,f2); Using where
-2 UNION t1 index_merge f1,f2 f1,f2 13,33 NULL 1 Using intersect(f1,f2); Using where
+1 PRIMARY t1 ref|filter f1,f2 f1|f1 13|13 const 1 (2%) Using index condition; Using where; Using rowid filter
+2 UNION t1 ref|filter f1,f2 f1|f1 13|13 const 1 (2%) Using index condition; Using where; Using rowid filter
NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL
explain format=json ( select * from t1
where (f1 is null and f2 is null) and (f2 between 'a' and 'z' or f1 in ('a')))
@@ -2153,24 +2199,24 @@ EXPLAIN
"select_id": 1,
"table": {
"table_name": "t1",
- "access_type": "index_merge",
+ "access_type": "ref",
"possible_keys": ["f1", "f2"],
- "key_length": "13,33",
- "index_merge": {
- "intersect": {
- "range": {
- "key": "f1",
- "used_key_parts": ["f1"]
- },
- "range": {
- "key": "f2",
- "used_key_parts": ["f2"]
- }
- }
+ "key": "f1",
+ "key_length": "13",
+ "used_key_parts": ["f1"],
+ "ref": ["const"],
+ "rowid_filter": {
+ "range": {
+ "key": "f1",
+ "used_key_parts": ["f1"]
+ },
+ "rows": 1,
+ "selectivity_pct": 1.587301587
},
"rows": 1,
- "filtered": 1.5873,
- "attached_condition": "t1.f1 is null and t1.f2 is null and (t1.f2 between 'a' and 'z' or t1.f1 = 'a')"
+ "filtered": 1.587301612,
+ "index_condition": "t1.f1 is null",
+ "attached_condition": "t1.f2 is null and (t1.f2 between 'a' and 'z' or t1.f1 = 'a')"
}
}
},
@@ -2180,24 +2226,24 @@ EXPLAIN
"operation": "UNION",
"table": {
"table_name": "t1",
- "access_type": "index_merge",
+ "access_type": "ref",
"possible_keys": ["f1", "f2"],
- "key_length": "13,33",
- "index_merge": {
- "intersect": {
- "range": {
- "key": "f1",
- "used_key_parts": ["f1"]
- },
- "range": {
- "key": "f2",
- "used_key_parts": ["f2"]
- }
- }
+ "key": "f1",
+ "key_length": "13",
+ "used_key_parts": ["f1"],
+ "ref": ["const"],
+ "rowid_filter": {
+ "range": {
+ "key": "f1",
+ "used_key_parts": ["f1"]
+ },
+ "rows": 1,
+ "selectivity_pct": 1.587301587
},
"rows": 1,
- "filtered": 1.5873,
- "attached_condition": "t1.f1 is null and t1.f2 is null and (t1.f2 between 'a' and 'z' or t1.f1 = 'a')"
+ "filtered": 1.587301612,
+ "index_condition": "t1.f1 is null",
+ "attached_condition": "t1.f2 is null and (t1.f2 between 'a' and 'z' or t1.f1 = 'a')"
}
}
}
@@ -2222,7 +2268,7 @@ id y x
explain extended select * from t1 join t2 on t1.id = t2.x where t2.y = 2 and t1.id = 1;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1 100.00 Using index
-1 SIMPLE t2 index_merge x,y y,x 5,5 NULL 1 100.00 Using intersect(y,x); Using where; Using index
+1 SIMPLE t2 ref x,y y 5 const 2 100.00 Using where
Warnings:
Note 1003 select 1 AS `id`,`test`.`t2`.`y` AS `y`,`test`.`t2`.`x` AS `x` from `test`.`t1` join `test`.`t2` where `test`.`t2`.`y` = 2 and `test`.`t2`.`x` = 1
drop table t1, t2;
@@ -2243,17 +2289,17 @@ count(*)
6
explain extended select count(*) from t1 where a in (22,83,11) and b=2;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t1 ref b,a b 5 const 59 3.30 Using where
+1 SIMPLE t1 range b,a a 5 NULL 33 5.90 Using index condition; Using where
Warnings:
Note 1003 select count(0) AS `count(*)` from `test`.`t1` where `test`.`t1`.`b` = 2 and `test`.`t1`.`a` in (22,83,11)
select * from t1 where a in (22,83,11) and b=2;
a b
11 2
11 2
-83 2
11 2
-83 2
22 2
+83 2
+83 2
set optimizer_switch='rowid_filter=on';
select count(*) from t1 where a in (22,83,11) and b=2;
count(*)
@@ -2273,7 +2319,7 @@ a b
22 2
drop table t1;
set optimizer_switch=@save_optimizer_switch;
-SET SESSION STORAGE_ENGINE=DEFAULT;
+SET SESSION DEFAULT_STORAGE_ENGINE=DEFAULT;
#
# MDEV-19919: use of rowid filter for innodb table + ORDER BY
#
@@ -2849,7 +2895,8 @@ ANALYZE
"r_loops": 1,
"rows": 2,
"r_rows": 3,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100,
"attached_condition": "t.tp = 121 and t.rid = 'B5FCC8C7111E4E3CBC21AAF5012F59C2'",
@@ -2867,7 +2914,8 @@ ANALYZE
"r_loops": 1,
"rows": 1,
"r_rows": 3,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100
},
@@ -2893,7 +2941,7 @@ ANALYZE
"used_key_parts": ["fh"]
},
"rows": 6,
- "selectivity_pct": 17.143,
+ "selectivity_pct": 17.14285714,
"r_rows": 5,
"r_selectivity_pct": 40,
"r_buffer_size": "REPLACED",
@@ -2902,8 +2950,9 @@ ANALYZE
"r_loops": 1,
"rows": 1,
"r_rows": 2,
- "r_total_time_ms": "REPLACED",
- "filtered": 17.143,
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
+ "filtered": 17.1428566,
"r_filtered": 100
},
"buffer_type": "incremental",
diff --git a/mysql-test/main/rowid_filter_innodb.test b/mysql-test/main/rowid_filter_innodb.test
index 74349b8c6bb..ab65a40e89e 100644
--- a/mysql-test/main/rowid_filter_innodb.test
+++ b/mysql-test/main/rowid_filter_innodb.test
@@ -1,6 +1,6 @@
--source include/have_innodb.inc
-SET SESSION STORAGE_ENGINE='InnoDB';
+SET SESSION DEFAULT_STORAGE_ENGINE='InnoDB';
--source rowid_filter.test
--source include/have_sequence.inc
@@ -95,7 +95,7 @@ eval $q1;
drop table t1;
set optimizer_switch=@save_optimizer_switch;
-SET SESSION STORAGE_ENGINE=DEFAULT;
+SET SESSION DEFAULT_STORAGE_ENGINE=DEFAULT;
--echo #
--echo # MDEV-19919: use of rowid filter for innodb table + ORDER BY
diff --git a/mysql-test/main/rowid_order_innodb.result b/mysql-test/main/rowid_order_innodb.result
index dc339304041..9b32bf6018f 100644
--- a/mysql-test/main/rowid_order_innodb.result
+++ b/mysql-test/main/rowid_order_innodb.result
@@ -1,4 +1,4 @@
-SET SESSION STORAGE_ENGINE = InnoDB;
+SET SESSION DEFAULT_STORAGE_ENGINE = InnoDB;
drop table if exists t1, t2, t3,t4;
create table t1 (
pk1 int not NULL,
diff --git a/mysql-test/main/select.result b/mysql-test/main/select.result
index 0f84ed684da..7547b5b1347 100644
--- a/mysql-test/main/select.result
+++ b/mysql-test/main/select.result
@@ -512,7 +512,7 @@ insert into tmp select * from t3;
insert into t3 select * from tmp;
alter table t3 add t2nr int not null auto_increment primary key first;
drop table tmp;
-SET BIG_TABLES=1;
+set tmp_memory_table_size=0;
select distinct concat(fld3," ",fld3) as namn from t2,t3 where t2.fld1=t3.t2nr order by namn limit 10;
namn
Abraham Abraham
@@ -525,7 +525,7 @@ ammonium ammonium
analyzable analyzable
animals animals
animized animized
-SET BIG_TABLES=0;
+set tmp_memory_table_size=default;
select distinct concat(fld3," ",fld3) from t2,t3 where t2.fld1=t3.t2nr order by fld3 limit 10;
concat(fld3," ",fld3)
Abraham Abraham
@@ -562,7 +562,7 @@ attendants 1
bedlam 1
bedpost 1
boasted 1
-SET BIG_TABLES=1;
+set tmp_memory_table_size=0;
select distinct fld3,count(*) from t2 group by companynr,fld3 limit 10;
fld3 count(*)
affixed 1
@@ -575,7 +575,7 @@ attendants 1
bedlam 1
bedpost 1
boasted 1
-SET BIG_TABLES=0;
+set tmp_memory_table_size=default;
select distinct fld3,repeat("a",length(fld3)),count(*) from t2 group by companynr,fld3 limit 100,10;
fld3 repeat("a",length(fld3)) count(*)
circus aaaaaa 1
@@ -2782,10 +2782,10 @@ 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
explain select max(key1) from t1 where key1 <= 0.6158 and rand() + 0.5 >= 0.5;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index key1 key1 5 NULL 4 Using where; Using index
+1 SIMPLE t1 range key1 key1 5 NULL 3 Using where; Using index
explain select min(key1) from t1 where key1 >= 0.3762 and rand() + 0.5 >= 0.5;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index key1 key1 5 NULL 4 Using where; Using index
+1 SIMPLE t1 range key1 key1 5 NULL 3 Using where; Using index
select max(key1) from t1 where key1 <= 0.6158;
max(key1)
0.6158
@@ -3632,7 +3632,7 @@ t3.c IN ('bb','ee');
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1
1 SIMPLE t2 range si si 5 NULL 2 Using index condition; Using where
-1 SIMPLE t3 eq_ref PRIMARY,ci PRIMARY 4 test.t2.a 1 Using where
+1 SIMPLE t3 eq_ref|filter PRIMARY,ci PRIMARY|ci 4|5 test.t2.a 1 (30%) Using where; Using rowid filter
EXPLAIN
SELECT t3.a FROM t1,t2,t3
WHERE t1.id = 8 AND (t2.i=t1.b OR t2.i=t1.e) AND t3.a=t2.a AND
@@ -3640,7 +3640,7 @@ t3.c IN ('bb','ee');
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1
1 SIMPLE t2 range si,ai si 5 NULL 2 Using index condition; Using where
-1 SIMPLE t3 eq_ref PRIMARY,ci PRIMARY 4 test.t2.a 1 Using where
+1 SIMPLE t3 eq_ref|filter PRIMARY,ci PRIMARY|ci 4|5 test.t2.a 1 (30%) Using where; Using rowid filter
DROP TABLE t1,t2,t3;
CREATE TABLE t1 ( f1 int primary key, f2 int, f3 int, f4 int, f5 int, f6 int, checked_out int);
CREATE TABLE t2 ( f11 int PRIMARY KEY );
@@ -3717,7 +3717,7 @@ COUNT(*)
EXPLAIN SELECT * FROM t1
WHERE ID_better=1 AND ID1_with_null IS NULL AND ID2_with_null=3 ;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref idx1,idx2 idx2 4 const 2 Using where
+1 SIMPLE t1 ref|filter idx1,idx2 idx2|idx1 4|10 const 2 (6%) Using where; Using rowid filter
EXPLAIN SELECT * FROM t1
WHERE ID_better=1 AND ID1_with_null=3 AND ID2_with_null=3 IS NULL ;
id select_type table type possible_keys key key_len ref rows Extra
@@ -3731,7 +3731,7 @@ CREATE UNIQUE INDEX idx1 ON t1(ID1_with_null,ID2_with_null);
EXPLAIN SELECT * FROM t1
WHERE ID_better=1 AND ID1_with_null IS NULL AND ID2_with_null=3 ;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref idx1,idx2 idx2 4 const 2 Using where
+1 SIMPLE t1 ref|filter idx1,idx2 idx2|idx1 4|10 const 2 (7%) Using where; Using rowid filter
EXPLAIN SELECT * FROM t1
WHERE ID_better=1 AND ID1_with_null=3 AND ID2_with_null IS NULL ;
id select_type table type possible_keys key key_len ref rows Extra
@@ -4031,7 +4031,7 @@ EXPLAIN SELECT COUNT(*) FROM t1 f1 INNER JOIN t1 f2
ON ( f1.b=f2.b AND f1.a<f2.a )
WHERE 1 AND f1.b NOT IN (100,2232,3343,51111);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE f1 index inx inx 10 NULL 7 Using where; Using index
+1 SIMPLE f1 range inx inx 5 NULL 7 Using where; Using index
1 SIMPLE f2 ref inx inx 5 test.f1.b 1 Using where; Using index
DROP TABLE t1;
CREATE TABLE t1 (c1 INT, c2 INT);
@@ -5134,8 +5134,8 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t5 system PRIMARY NULL NULL NULL 1
1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1 Using index
1 SIMPLE t2 ref f22 f22 5 const 1
-1 SIMPLE t6 ref f61 f61 5 const 1 Using where
1 SIMPLE t4 ref f42 f42 5 const 1 Using index
+1 SIMPLE t6 ref f61 f61 5 const 1 Using where
1 SIMPLE t7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join)
SELECT t2.f23 FROM
(t1 LEFT JOIN (t2 JOIN t3 ON t2.f22=t3.f32) ON t1.f11=t3.f31)
diff --git a/mysql-test/main/select.test b/mysql-test/main/select.test
index 43984810c66..22baccc625c 100644
--- a/mysql-test/main/select.test
+++ b/mysql-test/main/select.test
@@ -1425,9 +1425,9 @@ drop table tmp;
# big table done
-SET BIG_TABLES=1;
+set tmp_memory_table_size=0; # force on-disk tmp table
select distinct concat(fld3," ",fld3) as namn from t2,t3 where t2.fld1=t3.t2nr order by namn limit 10;
-SET BIG_TABLES=0;
+set tmp_memory_table_size=default;
select distinct concat(fld3," ",fld3) from t2,t3 where t2.fld1=t3.t2nr order by fld3 limit 10;
select distinct fld5 from t2 limit 10;
@@ -1436,9 +1436,9 @@ select distinct fld5 from t2 limit 10;
#
select distinct fld3,count(*) from t2 group by companynr,fld3 limit 10;
-SET BIG_TABLES=1; # Force use of MyISAM
+set tmp_memory_table_size=0; # force on-disk tmp table
select distinct fld3,count(*) from t2 group by companynr,fld3 limit 10;
-SET BIG_TABLES=0;
+set tmp_memory_table_size=default;
select distinct fld3,repeat("a",length(fld3)),count(*) from t2 group by companynr,fld3 limit 100,10;
#
diff --git a/mysql-test/main/select_jcl6.result b/mysql-test/main/select_jcl6.result
index 7276814114f..6a8174d124c 100644
--- a/mysql-test/main/select_jcl6.result
+++ b/mysql-test/main/select_jcl6.result
@@ -523,7 +523,7 @@ insert into tmp select * from t3;
insert into t3 select * from tmp;
alter table t3 add t2nr int not null auto_increment primary key first;
drop table tmp;
-SET BIG_TABLES=1;
+set tmp_memory_table_size=0;
select distinct concat(fld3," ",fld3) as namn from t2,t3 where t2.fld1=t3.t2nr order by namn limit 10;
namn
Abraham Abraham
@@ -536,7 +536,7 @@ ammonium ammonium
analyzable analyzable
animals animals
animized animized
-SET BIG_TABLES=0;
+set tmp_memory_table_size=default;
select distinct concat(fld3," ",fld3) from t2,t3 where t2.fld1=t3.t2nr order by fld3 limit 10;
concat(fld3," ",fld3)
Abraham Abraham
@@ -573,7 +573,7 @@ attendants 1
bedlam 1
bedpost 1
boasted 1
-SET BIG_TABLES=1;
+set tmp_memory_table_size=0;
select distinct fld3,count(*) from t2 group by companynr,fld3 limit 10;
fld3 count(*)
affixed 1
@@ -586,7 +586,7 @@ attendants 1
bedlam 1
bedpost 1
boasted 1
-SET BIG_TABLES=0;
+set tmp_memory_table_size=default;
select distinct fld3,repeat("a",length(fld3)),count(*) from t2 group by companynr,fld3 limit 100,10;
fld3 repeat("a",length(fld3)) count(*)
circus aaaaaa 1
@@ -2793,10 +2793,10 @@ 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
explain select max(key1) from t1 where key1 <= 0.6158 and rand() + 0.5 >= 0.5;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index key1 key1 5 NULL 4 Using where; Using index
+1 SIMPLE t1 range key1 key1 5 NULL 3 Using where; Using index
explain select min(key1) from t1 where key1 >= 0.3762 and rand() + 0.5 >= 0.5;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index key1 key1 5 NULL 4 Using where; Using index
+1 SIMPLE t1 range key1 key1 5 NULL 3 Using where; Using index
select max(key1) from t1 where key1 <= 0.6158;
max(key1)
0.6158
@@ -3643,7 +3643,7 @@ t3.c IN ('bb','ee');
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1
1 SIMPLE t2 range si si 5 NULL 2 Using index condition; Using where; Rowid-ordered scan
-1 SIMPLE t3 eq_ref PRIMARY,ci PRIMARY 4 test.t2.a 1 Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
+1 SIMPLE t3 eq_ref|filter PRIMARY,ci PRIMARY|ci 4|5 test.t2.a 1 (30%) Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan; Using rowid filter
EXPLAIN
SELECT t3.a FROM t1,t2,t3
WHERE t1.id = 8 AND (t2.i=t1.b OR t2.i=t1.e) AND t3.a=t2.a AND
@@ -3651,7 +3651,7 @@ t3.c IN ('bb','ee');
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1
1 SIMPLE t2 range si,ai si 5 NULL 2 Using index condition; Using where; Rowid-ordered scan
-1 SIMPLE t3 eq_ref PRIMARY,ci PRIMARY 4 test.t2.a 1 Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
+1 SIMPLE t3 eq_ref|filter PRIMARY,ci PRIMARY|ci 4|5 test.t2.a 1 (30%) Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan; Using rowid filter
DROP TABLE t1,t2,t3;
CREATE TABLE t1 ( f1 int primary key, f2 int, f3 int, f4 int, f5 int, f6 int, checked_out int);
CREATE TABLE t2 ( f11 int PRIMARY KEY );
@@ -3728,7 +3728,7 @@ COUNT(*)
EXPLAIN SELECT * FROM t1
WHERE ID_better=1 AND ID1_with_null IS NULL AND ID2_with_null=3 ;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref idx1,idx2 idx2 4 const 2 Using where
+1 SIMPLE t1 ref|filter idx1,idx2 idx2|idx1 4|10 const 2 (6%) Using where; Using rowid filter
EXPLAIN SELECT * FROM t1
WHERE ID_better=1 AND ID1_with_null=3 AND ID2_with_null=3 IS NULL ;
id select_type table type possible_keys key key_len ref rows Extra
@@ -3742,7 +3742,7 @@ CREATE UNIQUE INDEX idx1 ON t1(ID1_with_null,ID2_with_null);
EXPLAIN SELECT * FROM t1
WHERE ID_better=1 AND ID1_with_null IS NULL AND ID2_with_null=3 ;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref idx1,idx2 idx2 4 const 2 Using where
+1 SIMPLE t1 ref|filter idx1,idx2 idx2|idx1 4|10 const 2 (7%) Using where; Using rowid filter
EXPLAIN SELECT * FROM t1
WHERE ID_better=1 AND ID1_with_null=3 AND ID2_with_null IS NULL ;
id select_type table type possible_keys key key_len ref rows Extra
@@ -4042,7 +4042,7 @@ EXPLAIN SELECT COUNT(*) FROM t1 f1 INNER JOIN t1 f2
ON ( f1.b=f2.b AND f1.a<f2.a )
WHERE 1 AND f1.b NOT IN (100,2232,3343,51111);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE f1 index inx inx 10 NULL 7 Using where; Using index
+1 SIMPLE f1 range inx inx 5 NULL 7 Using where; Using index
1 SIMPLE f2 ref inx inx 5 test.f1.b 1 Using where; Using index
DROP TABLE t1;
CREATE TABLE t1 (c1 INT, c2 INT);
@@ -5145,9 +5145,9 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t5 system PRIMARY NULL NULL NULL 1
1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1 Using index
1 SIMPLE t2 ref f22 f22 5 const 1
-1 SIMPLE t6 ref f61 f61 5 const 1 Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
1 SIMPLE t4 ref f42 f42 5 const 1 Using index
-1 SIMPLE t7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join)
+1 SIMPLE t6 ref f61 f61 5 const 1 Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
+1 SIMPLE t7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
SELECT t2.f23 FROM
(t1 LEFT JOIN (t2 JOIN t3 ON t2.f22=t3.f32) ON t1.f11=t3.f31)
LEFT JOIN
diff --git a/mysql-test/main/select_pkeycache.result b/mysql-test/main/select_pkeycache.result
index 0f84ed684da..7547b5b1347 100644
--- a/mysql-test/main/select_pkeycache.result
+++ b/mysql-test/main/select_pkeycache.result
@@ -512,7 +512,7 @@ insert into tmp select * from t3;
insert into t3 select * from tmp;
alter table t3 add t2nr int not null auto_increment primary key first;
drop table tmp;
-SET BIG_TABLES=1;
+set tmp_memory_table_size=0;
select distinct concat(fld3," ",fld3) as namn from t2,t3 where t2.fld1=t3.t2nr order by namn limit 10;
namn
Abraham Abraham
@@ -525,7 +525,7 @@ ammonium ammonium
analyzable analyzable
animals animals
animized animized
-SET BIG_TABLES=0;
+set tmp_memory_table_size=default;
select distinct concat(fld3," ",fld3) from t2,t3 where t2.fld1=t3.t2nr order by fld3 limit 10;
concat(fld3," ",fld3)
Abraham Abraham
@@ -562,7 +562,7 @@ attendants 1
bedlam 1
bedpost 1
boasted 1
-SET BIG_TABLES=1;
+set tmp_memory_table_size=0;
select distinct fld3,count(*) from t2 group by companynr,fld3 limit 10;
fld3 count(*)
affixed 1
@@ -575,7 +575,7 @@ attendants 1
bedlam 1
bedpost 1
boasted 1
-SET BIG_TABLES=0;
+set tmp_memory_table_size=default;
select distinct fld3,repeat("a",length(fld3)),count(*) from t2 group by companynr,fld3 limit 100,10;
fld3 repeat("a",length(fld3)) count(*)
circus aaaaaa 1
@@ -2782,10 +2782,10 @@ 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
explain select max(key1) from t1 where key1 <= 0.6158 and rand() + 0.5 >= 0.5;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index key1 key1 5 NULL 4 Using where; Using index
+1 SIMPLE t1 range key1 key1 5 NULL 3 Using where; Using index
explain select min(key1) from t1 where key1 >= 0.3762 and rand() + 0.5 >= 0.5;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index key1 key1 5 NULL 4 Using where; Using index
+1 SIMPLE t1 range key1 key1 5 NULL 3 Using where; Using index
select max(key1) from t1 where key1 <= 0.6158;
max(key1)
0.6158
@@ -3632,7 +3632,7 @@ t3.c IN ('bb','ee');
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1
1 SIMPLE t2 range si si 5 NULL 2 Using index condition; Using where
-1 SIMPLE t3 eq_ref PRIMARY,ci PRIMARY 4 test.t2.a 1 Using where
+1 SIMPLE t3 eq_ref|filter PRIMARY,ci PRIMARY|ci 4|5 test.t2.a 1 (30%) Using where; Using rowid filter
EXPLAIN
SELECT t3.a FROM t1,t2,t3
WHERE t1.id = 8 AND (t2.i=t1.b OR t2.i=t1.e) AND t3.a=t2.a AND
@@ -3640,7 +3640,7 @@ t3.c IN ('bb','ee');
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1
1 SIMPLE t2 range si,ai si 5 NULL 2 Using index condition; Using where
-1 SIMPLE t3 eq_ref PRIMARY,ci PRIMARY 4 test.t2.a 1 Using where
+1 SIMPLE t3 eq_ref|filter PRIMARY,ci PRIMARY|ci 4|5 test.t2.a 1 (30%) Using where; Using rowid filter
DROP TABLE t1,t2,t3;
CREATE TABLE t1 ( f1 int primary key, f2 int, f3 int, f4 int, f5 int, f6 int, checked_out int);
CREATE TABLE t2 ( f11 int PRIMARY KEY );
@@ -3717,7 +3717,7 @@ COUNT(*)
EXPLAIN SELECT * FROM t1
WHERE ID_better=1 AND ID1_with_null IS NULL AND ID2_with_null=3 ;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref idx1,idx2 idx2 4 const 2 Using where
+1 SIMPLE t1 ref|filter idx1,idx2 idx2|idx1 4|10 const 2 (6%) Using where; Using rowid filter
EXPLAIN SELECT * FROM t1
WHERE ID_better=1 AND ID1_with_null=3 AND ID2_with_null=3 IS NULL ;
id select_type table type possible_keys key key_len ref rows Extra
@@ -3731,7 +3731,7 @@ CREATE UNIQUE INDEX idx1 ON t1(ID1_with_null,ID2_with_null);
EXPLAIN SELECT * FROM t1
WHERE ID_better=1 AND ID1_with_null IS NULL AND ID2_with_null=3 ;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref idx1,idx2 idx2 4 const 2 Using where
+1 SIMPLE t1 ref|filter idx1,idx2 idx2|idx1 4|10 const 2 (7%) Using where; Using rowid filter
EXPLAIN SELECT * FROM t1
WHERE ID_better=1 AND ID1_with_null=3 AND ID2_with_null IS NULL ;
id select_type table type possible_keys key key_len ref rows Extra
@@ -4031,7 +4031,7 @@ EXPLAIN SELECT COUNT(*) FROM t1 f1 INNER JOIN t1 f2
ON ( f1.b=f2.b AND f1.a<f2.a )
WHERE 1 AND f1.b NOT IN (100,2232,3343,51111);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE f1 index inx inx 10 NULL 7 Using where; Using index
+1 SIMPLE f1 range inx inx 5 NULL 7 Using where; Using index
1 SIMPLE f2 ref inx inx 5 test.f1.b 1 Using where; Using index
DROP TABLE t1;
CREATE TABLE t1 (c1 INT, c2 INT);
@@ -5134,8 +5134,8 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t5 system PRIMARY NULL NULL NULL 1
1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1 Using index
1 SIMPLE t2 ref f22 f22 5 const 1
-1 SIMPLE t6 ref f61 f61 5 const 1 Using where
1 SIMPLE t4 ref f42 f42 5 const 1 Using index
+1 SIMPLE t6 ref f61 f61 5 const 1 Using where
1 SIMPLE t7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join)
SELECT t2.f23 FROM
(t1 LEFT JOIN (t2 JOIN t3 ON t2.f22=t3.f32) ON t1.f11=t3.f31)
diff --git a/mysql-test/main/selectivity.result b/mysql-test/main/selectivity.result
index 7e3202337ec..40ab309fffd 100644
--- a/mysql-test/main/selectivity.result
+++ b/mysql-test/main/selectivity.result
@@ -73,12 +73,12 @@ order by
s_acctbal desc, n_name, s_name, p_partkey;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY part ALL PRIMARY NULL NULL NULL 200 0.31 Using where; Using temporary; Using filesort
-1 PRIMARY partsupp ref PRIMARY,i_ps_partkey,i_ps_suppkey PRIMARY 4 dbt3_s001.part.p_partkey 3 100.00 Using where
+1 PRIMARY partsupp ref PRIMARY,i_ps_partkey,i_ps_suppkey i_ps_partkey 4 dbt3_s001.part.p_partkey 3 100.00 Using where
1 PRIMARY supplier eq_ref PRIMARY,i_s_nationkey PRIMARY 4 dbt3_s001.partsupp.ps_suppkey 1 100.00 Using where
1 PRIMARY nation eq_ref PRIMARY,i_n_regionkey PRIMARY 4 dbt3_s001.supplier.s_nationkey 1 100.00 Using where
1 PRIMARY region eq_ref PRIMARY PRIMARY 4 dbt3_s001.nation.n_regionkey 1 20.00 Using where
2 DEPENDENT SUBQUERY region ALL PRIMARY NULL NULL NULL 5 20.00 Using where
-2 DEPENDENT SUBQUERY partsupp ref PRIMARY,i_ps_partkey,i_ps_suppkey PRIMARY 4 dbt3_s001.part.p_partkey 3 100.00
+2 DEPENDENT SUBQUERY partsupp ref PRIMARY,i_ps_partkey,i_ps_suppkey i_ps_partkey 4 dbt3_s001.part.p_partkey 3 100.00
2 DEPENDENT SUBQUERY supplier eq_ref PRIMARY,i_s_nationkey PRIMARY 4 dbt3_s001.partsupp.ps_suppkey 1 100.00 Using where
2 DEPENDENT SUBQUERY nation eq_ref PRIMARY,i_n_regionkey PRIMARY 4 dbt3_s001.supplier.s_nationkey 1 100.00 Using where
Warnings:
@@ -119,7 +119,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY part ALL PRIMARY NULL NULL NULL 200 2.08 Using where; Using join buffer (flat, BNL join)
1 PRIMARY partsupp eq_ref PRIMARY,i_ps_partkey,i_ps_suppkey PRIMARY 8 dbt3_s001.part.p_partkey,dbt3_s001.supplier.s_suppkey 1 100.00 Using where
2 DEPENDENT SUBQUERY region ALL PRIMARY NULL NULL NULL 5 20.00 Using where
-2 DEPENDENT SUBQUERY partsupp ref PRIMARY,i_ps_partkey,i_ps_suppkey PRIMARY 4 dbt3_s001.part.p_partkey 3 100.00
+2 DEPENDENT SUBQUERY partsupp ref PRIMARY,i_ps_partkey,i_ps_suppkey i_ps_partkey 4 dbt3_s001.part.p_partkey 3 100.00
2 DEPENDENT SUBQUERY supplier eq_ref PRIMARY,i_s_nationkey PRIMARY 4 dbt3_s001.partsupp.ps_suppkey 1 100.00 Using where
2 DEPENDENT SUBQUERY nation eq_ref PRIMARY,i_n_regionkey PRIMARY 4 dbt3_s001.supplier.s_nationkey 1 100.00 Using where
Warnings:
@@ -489,7 +489,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 100.00
1 PRIMARY nation eq_ref PRIMARY PRIMARY 4 dbt3_s001.supplier.s_nationkey 1 100.00 Using where
2 MATERIALIZED part ALL PRIMARY NULL NULL NULL 200 100.00 Using where
-2 MATERIALIZED partsupp ref PRIMARY,i_ps_partkey,i_ps_suppkey PRIMARY 4 dbt3_s001.part.p_partkey 3 100.00 Using where
+2 MATERIALIZED partsupp ref PRIMARY,i_ps_partkey,i_ps_suppkey i_ps_partkey 4 dbt3_s001.part.p_partkey 3 100.00 Using where
4 DEPENDENT SUBQUERY lineitem ref i_l_shipdate,i_l_suppkey_partkey,i_l_partkey,i_l_suppkey i_l_suppkey_partkey 10 dbt3_s001.partsupp.ps_partkey,dbt3_s001.partsupp.ps_suppkey 8 100.00 Using where
Warnings:
Note 1276 Field or reference 'dbt3_s001.partsupp.ps_partkey' of SELECT #4 was resolved in SELECT #2
@@ -1850,7 +1850,7 @@ WHERE A.a=t1.a AND t2.b < 20);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 100 Using where
2 DEPENDENT SUBQUERY A ref PRIMARY,a a 5 test.t1.a 1
-2 DEPENDENT SUBQUERY t2 ref a,b a 5 test.A.id 1 Using where
+2 DEPENDENT SUBQUERY t2 ref|filter a,b a|b 5|5 test.A.id 1 (10%) Using where; Using rowid filter
EXPLAIN SELECT * FROM t1 A, t1 B WHERE A.a = B.a and A.id = 65;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE A const PRIMARY,a PRIMARY 4 const 1
@@ -1862,7 +1862,7 @@ WHERE A.a=t1.a AND t2.b < 20);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 100 Using where
2 DEPENDENT SUBQUERY A ref PRIMARY,a a 5 test.t1.a 1
-2 DEPENDENT SUBQUERY t2 ref a,b a 5 test.A.id 1 Using where
+2 DEPENDENT SUBQUERY t2 ref|filter a,b a|b 5|5 test.A.id 1 (10%) Using where; Using rowid filter
set optimizer_switch= @save_optimizer_switch;
set optimizer_use_condition_selectivity= @save_optimizer_use_condition_selectivity;
drop table t1,t2;
diff --git a/mysql-test/main/selectivity_innodb.result b/mysql-test/main/selectivity_innodb.result
index 2159989597a..a1d227a9baa 100644
--- a/mysql-test/main/selectivity_innodb.result
+++ b/mysql-test/main/selectivity_innodb.result
@@ -1,4 +1,4 @@
-SET SESSION STORAGE_ENGINE='InnoDB';
+SET SESSION DEFAULT_STORAGE_ENGINE='InnoDB';
set @save_optimizer_switch_for_selectivity_test=@@optimizer_switch;
set optimizer_switch='extended_keys=on';
drop table if exists t0,t1,t2,t3;
@@ -1860,7 +1860,7 @@ WHERE A.a=t1.a AND t2.b < 20);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 index NULL a 5 NULL 100 Using where; Using index
2 DEPENDENT SUBQUERY A ref PRIMARY,a a 5 test.t1.a 1 Using index
-2 DEPENDENT SUBQUERY t2 ref a,b a 5 test.A.id 1 Using where
+2 DEPENDENT SUBQUERY t2 ref|filter a,b a|b 5|5 test.A.id 1 (19%) Using where; Using rowid filter
EXPLAIN SELECT * FROM t1 A, t1 B WHERE A.a = B.a and A.id = 65;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE A const PRIMARY,a PRIMARY 4 const 1
@@ -1872,7 +1872,7 @@ WHERE A.a=t1.a AND t2.b < 20);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 index NULL a 5 NULL 100 Using where; Using index
2 DEPENDENT SUBQUERY A ref PRIMARY,a a 5 test.t1.a 1 Using index
-2 DEPENDENT SUBQUERY t2 ref a,b a 5 test.A.id 1 Using where
+2 DEPENDENT SUBQUERY t2 ref|filter a,b a|b 5|5 test.A.id 1 (19%) Using where; Using rowid filter
set optimizer_switch= @save_optimizer_switch;
set optimizer_use_condition_selectivity= @save_optimizer_use_condition_selectivity;
drop table t1,t2;
@@ -2152,4 +2152,4 @@ drop table t1;
set use_stat_tables= @tmp_ust;
set optimizer_use_condition_selectivity= @tmp_oucs;
set @@global.histogram_size=@save_histogram_size;
-SET SESSION STORAGE_ENGINE=DEFAULT;
+SET SESSION DEFAULT_STORAGE_ENGINE=DEFAULT;
diff --git a/mysql-test/main/selectivity_innodb.test b/mysql-test/main/selectivity_innodb.test
index 057a36fcf62..4bcdb5d6ec9 100644
--- a/mysql-test/main/selectivity_innodb.test
+++ b/mysql-test/main/selectivity_innodb.test
@@ -3,7 +3,7 @@
--source include/big_test.inc
--source include/default_optimizer_switch.inc
-SET SESSION STORAGE_ENGINE='InnoDB';
+SET SESSION DEFAULT_STORAGE_ENGINE='InnoDB';
set @save_optimizer_switch_for_selectivity_test=@@optimizer_switch;
set optimizer_switch='extended_keys=on';
@@ -232,4 +232,4 @@ drop table t1;
set use_stat_tables= @tmp_ust;
set optimizer_use_condition_selectivity= @tmp_oucs;
set @@global.histogram_size=@save_histogram_size;
-SET SESSION STORAGE_ENGINE=DEFAULT;
+SET SESSION DEFAULT_STORAGE_ENGINE=DEFAULT;
diff --git a/mysql-test/main/set_operation.result b/mysql-test/main/set_operation.result
new file mode 100644
index 00000000000..24d2c7fbdd6
--- /dev/null
+++ b/mysql-test/main/set_operation.result
@@ -0,0 +1,1191 @@
+create table t1 (a int, b int) engine=MyISAM;
+create table t2 (c int, d int) engine=MyISAM;
+create table t3 (e int, f int) engine=MyISAM;
+create table t4 (g int, h int) engine=MyISAM;
+insert into t1 values (1,1),(2,2),(3,3),(2,2),(3,3);
+insert into t2 values (2,2),(3,3),(5,5),(2,2),(2,2),(3,3);
+insert into t3 values (4,4),(2,2),(2,2),(1,1),(3,3);
+insert into t4 values (2,2),(4,4),(1,1);
+create view v0(g, h) as select a,c from t1,t2;
+# test optimization
+select * from t1
+INTERSECT ALL
+select * from t2
+INTERSECT ALL
+select * from t3;
+a b
+2 2
+2 2
+3 3
+EXPLAIN EXTENDED select * from t1
+INTERSECT ALL
+select * from t2
+INTERSECT ALL
+select * from t3;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 5 100.00
+2 INTERSECT t2 ALL NULL NULL NULL NULL 6 100.00
+3 INTERSECT t3 ALL NULL NULL NULL NULL 5 100.00
+NULL INTERSECT RESULT <intersect1,2,3> ALL NULL NULL NULL NULL NULL NULL
+Warnings:
+Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` intersect all /* select#2 */ select `test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t2` intersect all /* select#3 */ select `test`.`t3`.`e` AS `e`,`test`.`t3`.`f` AS `f` from `test`.`t3`
+select * from t1
+INTERSECT ALL
+select * from t2
+INTERSECT ALL
+select * from t3
+INTERSECT
+select * from t1;
+a b
+2 2
+3 3
+EXPLAIN EXTENDED select * from t1
+INTERSECT ALL
+select * from t2
+INTERSECT ALL
+select * from t3
+INTERSECT
+select * from t1;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 5 100.00
+2 INTERSECT t2 ALL NULL NULL NULL NULL 6 100.00
+3 INTERSECT t3 ALL NULL NULL NULL NULL 5 100.00
+4 INTERSECT t1 ALL NULL NULL NULL NULL 5 100.00
+NULL INTERSECT RESULT <intersect1,2,3,4> ALL NULL NULL NULL NULL NULL NULL
+Warnings:
+Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` intersect /* select#2 */ select `test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t2` intersect /* select#3 */ select `test`.`t3`.`e` AS `e`,`test`.`t3`.`f` AS `f` from `test`.`t3` intersect /* select#4 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1`
+select * from t1
+INTERSECT ALL
+select * from t2
+INTERSECT ALL
+select * from t3
+EXCEPT ALL
+select * from t4;
+a b
+2 2
+3 3
+EXPLAIN EXTENDED select * from t1
+INTERSECT ALL
+select * from t2
+INTERSECT ALL
+select * from t3
+EXCEPT ALL
+select * from t4;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 5 100.00
+2 INTERSECT t2 ALL NULL NULL NULL NULL 6 100.00
+3 INTERSECT t3 ALL NULL NULL NULL NULL 5 100.00
+4 EXCEPT t4 ALL NULL NULL NULL NULL 3 100.00
+NULL UNIT RESULT <unit1,2,3,4> ALL NULL NULL NULL NULL NULL NULL
+Warnings:
+Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` intersect all /* select#2 */ select `test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t2` intersect all /* select#3 */ select `test`.`t3`.`e` AS `e`,`test`.`t3`.`f` AS `f` from `test`.`t3` except all /* select#4 */ select `test`.`t4`.`g` AS `g`,`test`.`t4`.`h` AS `h` from `test`.`t4`
+select * from t1
+INTERSECT
+select * from t2
+EXCEPT ALL
+select * from t4;
+a b
+3 3
+EXPLAIN EXTENDED select * from t1
+INTERSECT
+select * from t2
+EXCEPT ALL
+select * from t4;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 5 100.00
+2 INTERSECT t2 ALL NULL NULL NULL NULL 6 100.00
+3 EXCEPT t4 ALL NULL NULL NULL NULL 3 100.00
+NULL UNIT RESULT <unit1,2,3> ALL NULL NULL NULL NULL NULL NULL
+Warnings:
+Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` intersect /* select#2 */ select `test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t2` except /* select#3 */ select `test`.`t4`.`g` AS `g`,`test`.`t4`.`h` AS `h` from `test`.`t4`
+insert into t4 values (1,1),(9,9);
+select * from t1
+UNION ALL
+select * from t2
+UNION ALL
+select * from t3
+EXCEPT
+select * from t4;
+a b
+3 3
+5 5
+EXPLAIN EXTENDED select * from t1
+UNION ALL
+select * from t2
+UNION ALL
+select * from t3
+EXCEPT
+select * from t4;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 5 100.00
+2 UNION t2 ALL NULL NULL NULL NULL 6 100.00
+3 UNION t3 ALL NULL NULL NULL NULL 5 100.00
+4 EXCEPT t4 ALL NULL NULL NULL NULL 5 100.00
+NULL UNIT RESULT <unit1,2,3,4> ALL NULL NULL NULL NULL NULL NULL
+Warnings:
+Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` union /* select#2 */ select `test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t2` union /* select#3 */ select `test`.`t3`.`e` AS `e`,`test`.`t3`.`f` AS `f` from `test`.`t3` except /* select#4 */ select `test`.`t4`.`g` AS `g`,`test`.`t4`.`h` AS `h` from `test`.`t4`
+delete from t4;
+insert into t4 values (3,3),(3,3);
+select * from t1
+INTERSECT ALL
+select * from t2
+UNION ALL
+select * from t3
+EXCEPT ALL
+select * from t1
+UNION
+select * from t4
+EXCEPT
+select * from t3
+UNION ALL
+select * from t1;
+a b
+2 2
+2 2
+1 1
+3 3
+3 3
+EXPLAIN EXTENDED select * from t1
+INTERSECT ALL
+select * from t2
+UNION ALL
+select * from t3
+EXCEPT ALL
+select * from t1
+UNION
+select * from t4
+EXCEPT
+select * from t3
+UNION ALL
+select * from t1;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 5 100.00
+2 INTERSECT t2 ALL NULL NULL NULL NULL 6 100.00
+3 UNION t3 ALL NULL NULL NULL NULL 5 100.00
+4 EXCEPT t1 ALL NULL NULL NULL NULL 5 100.00
+5 UNION t4 ALL NULL NULL NULL NULL 2 100.00
+6 EXCEPT t3 ALL NULL NULL NULL NULL 5 100.00
+7 UNION t1 ALL NULL NULL NULL NULL 5 100.00
+NULL UNIT RESULT <unit1,2,3,4,5,6,7> ALL NULL NULL NULL NULL NULL NULL
+Warnings:
+Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` intersect all /* select#2 */ select `test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t2` union all /* select#3 */ select `test`.`t3`.`e` AS `e`,`test`.`t3`.`f` AS `f` from `test`.`t3` except all /* select#4 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` union /* select#5 */ select `test`.`t4`.`g` AS `g`,`test`.`t4`.`h` AS `h` from `test`.`t4` except /* select#6 */ select `test`.`t3`.`e` AS `e`,`test`.`t3`.`f` AS `f` from `test`.`t3` union all /* select#7 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1`
+drop table t4;
+# test optimization with brackets
+(
+(select 1 except select 5 union all select 6)
+union
+(select 2 intersect all select 3 intersect all select 4)
+except
+(select 7 intersect all select 8)
+)
+union all
+(select 9 union all select 10)
+except all
+select 11;
+1
+1
+6
+9
+10
+EXPLAIN EXTENDED (
+(select 1 except select 5 union all select 6)
+union
+(select 2 intersect all select 3 intersect all select 4)
+except
+(select 7 intersect all select 8)
+)
+union all
+(select 9 union all select 10)
+except all
+select 11;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY <derived8> ALL NULL NULL NULL NULL 4 100.00
+8 DERIVED <derived2> ALL NULL NULL NULL NULL 2 100.00
+2 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used
+3 EXCEPT NULL NULL NULL NULL NULL NULL NULL NULL No tables used
+4 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used
+NULL UNIT RESULT <unit2,3,4> ALL NULL NULL NULL NULL NULL NULL
+9 UNION <derived5> ALL NULL NULL NULL NULL 2 100.00
+5 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used
+6 INTERSECT NULL NULL NULL NULL NULL NULL NULL NULL No tables used
+7 INTERSECT NULL NULL NULL NULL NULL NULL NULL NULL No tables used
+NULL INTERSECT RESULT <intersect5,6,7> ALL NULL NULL NULL NULL NULL NULL
+12 EXCEPT <derived10> ALL NULL NULL NULL NULL 2 100.00
+10 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used
+11 INTERSECT NULL NULL NULL NULL NULL NULL NULL NULL No tables used
+NULL INTERSECT RESULT <intersect10,11> ALL NULL NULL NULL NULL NULL NULL
+NULL UNIT RESULT <unit8,9,12> ALL NULL NULL NULL NULL NULL NULL
+15 UNION <derived13> ALL NULL NULL NULL NULL 2 100.00
+13 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used
+14 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used
+16 EXCEPT NULL NULL NULL NULL NULL NULL NULL NULL No tables used
+NULL UNIT RESULT <unit1,15,16> ALL NULL NULL NULL NULL NULL NULL
+Warnings:
+Note 1003 /* select#1 */ select `__14`.`1` AS `1` from (/* select#8 */ select `__7`.`1` AS `1` from (/* select#2 */ select 1 AS `1` except /* select#3 */ select 5 AS `5` union /* select#4 */ select 6 AS `6`) `__7` union /* select#9 */ select `__8`.`2` AS `2` from (/* select#5 */ select 2 AS `2` intersect /* select#6 */ select 3 AS `3` intersect /* select#7 */ select 4 AS `4`) `__8` except /* select#12 */ select `__11`.`7` AS `7` from (/* select#10 */ select 7 AS `7` intersect /* select#11 */ select 8 AS `8`) `__11`) `__14` union all /* select#15 */ select `__15`.`9` AS `9` from (/* select#13 */ select 9 AS `9` union all /* select#14 */ select 10 AS `10`) `__15` except all /* select#16 */ select 11 AS `11`
+(select 1 union all select 2)
+union
+(select 3 union all select 4);
+1
+1
+2
+3
+4
+EXPLAIN EXTENDED (select 1 union all select 2)
+union
+(select 3 union all select 4);
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY <derived2> ALL NULL NULL NULL NULL 2 100.00
+2 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used
+3 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used
+6 UNION <derived4> ALL NULL NULL NULL NULL 2 100.00
+4 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used
+5 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used
+NULL UNION RESULT <union1,6> ALL NULL NULL NULL NULL NULL NULL
+Warnings:
+Note 1003 /* select#1 */ select `__5`.`1` AS `1` from (/* select#2 */ select 1 AS `1` union /* select#3 */ select 2 AS `2`) `__5` union /* select#6 */ select `__6`.`3` AS `3` from (/* select#4 */ select 3 AS `3` union /* select#5 */ select 4 AS `4`) `__6`
+(select 1 intersect all select 2)
+except
+select 3;
+1
+EXPLAIN EXTENDED (select 1 intersect all select 2)
+except
+select 3;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY <derived2> ALL NULL NULL NULL NULL 2 100.00
+2 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used
+3 INTERSECT NULL NULL NULL NULL NULL NULL NULL NULL No tables used
+NULL INTERSECT RESULT <intersect2,3> ALL NULL NULL NULL NULL NULL NULL
+4 EXCEPT NULL NULL NULL NULL NULL NULL NULL NULL No tables used
+NULL EXCEPT RESULT <except1,4> ALL NULL NULL NULL NULL NULL NULL
+Warnings:
+Note 1003 /* select#1 */ select `__4`.`1` AS `1` from (/* select#2 */ select 1 AS `1` intersect /* select#3 */ select 2 AS `2`) `__4` except /* select#4 */ select 3 AS `3`
+(select 1 intersect all select 2 intersect all select 3)
+intersect
+(select 4 intersect all select 5);
+1
+EXPLAIN EXTENDED (select 1 intersect all select 2 intersect all select 3)
+intersect
+(select 4 intersect all select 5);
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY <derived2> ALL NULL NULL NULL NULL 2 100.00
+2 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used
+3 INTERSECT NULL NULL NULL NULL NULL NULL NULL NULL No tables used
+4 INTERSECT NULL NULL NULL NULL NULL NULL NULL NULL No tables used
+NULL INTERSECT RESULT <intersect2,3,4> ALL NULL NULL NULL NULL NULL NULL
+7 INTERSECT <derived5> ALL NULL NULL NULL NULL 2 100.00
+5 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used
+6 INTERSECT NULL NULL NULL NULL NULL NULL NULL NULL No tables used
+NULL INTERSECT RESULT <intersect5,6> ALL NULL NULL NULL NULL NULL NULL
+NULL INTERSECT RESULT <intersect1,7> ALL NULL NULL NULL NULL NULL NULL
+Warnings:
+Note 1003 /* select#1 */ select `__6`.`1` AS `1` from (/* select#2 */ select 1 AS `1` intersect /* select#3 */ select 2 AS `2` intersect /* select#4 */ select 3 AS `3`) `__6` intersect /* select#7 */ select `__7`.`4` AS `4` from (/* select#5 */ select 4 AS `4` intersect /* select#6 */ select 5 AS `5`) `__7`
+# test set operations with table value constructor
+(values (1,1),(1,1),(1,1),(2,2),(2,2),(3,3),(9,9))
+INTERSECT ALL
+(values (1,1),(2,2),(2,2),(3,3),(3,3),(3,3),(8,8))
+EXCEPT ALL
+(values (7,7),(1,1));
+1 1
+2 2
+2 2
+3 3
+delete from t1;
+insert into t1 values(1,1),(1,1),(2,2),(4,4),(9,9);
+select * from t1
+UNION ALL
+(values (11,12),(3,3),(2,2),(3,3),(4,4),(8,8))
+INTERSECT
+(values (13,14),(7,7),(2,2),(3,3),(1,1))
+INTERSECT ALL
+(values (15,16),(2,2),(1,1))
+EXCEPT
+(values (17,18),(1,1));
+a b
+2 2
+4 4
+9 9
+# test set operations with derived table
+select * from (
+select * from t1
+UNION ALL
+select * from t2
+)dt1
+INTERSECT ALL
+select * from (
+select * from t2
+EXCEPT ALL
+select * from t3
+)dt2;
+a b
+2 2
+3 3
+5 5
+select * from (
+select * from t1
+UNION ALL
+select * from t3
+)dt1
+EXCEPT ALL
+select * from (
+select * from t2
+INTERSECT ALL
+select * from t2
+)dt2;
+a b
+1 1
+1 1
+4 4
+9 9
+1 1
+4 4
+SELECT * from(
+select * from (
+select * from t1
+UNION ALL
+select * from t2
+)dt1
+INTERSECT ALL
+select * from (
+select * from t2
+EXCEPT ALL
+select * from t3
+)dt2
+)dt3;
+a b
+2 2
+3 3
+5 5
+# integration test
+select * from t1
+UNION ALL
+select * from t2
+INTERSECT ALL
+(values (1,1), (2,2), (2,2), (5,5), (2,2))
+INTERSECT ALL
+select * from (select * from t1 union all select * from t1) sq
+EXCEPT ALL
+select * from t3
+UNION ALL
+select * from t2
+UNION
+select * from t3
+EXCEPT
+select a,c from t1,t2
+UNION ALL
+select * from v0 where g < 4
+UNION ALL
+select * from t3;
+a b
+1 1
+1 2
+3 3
+9 9
+5 5
+4 4
+1 2
+2 2
+1 3
+1 3
+2 3
+1 5
+1 5
+2 5
+1 2
+1 2
+2 2
+1 2
+1 2
+2 2
+1 3
+1 3
+2 3
+4 4
+2 2
+2 2
+1 1
+3 3
+select * from t1
+UNION ALL
+select * from t2
+INTERSECT ALL
+(values (1,1), (2,2), (2,2), (5,5), (2,2))
+INTERSECT ALL
+select * from (select * from t1 union all select * from t1) sq
+EXCEPT ALL
+select * from t3
+UNION ALL
+select * from t2
+UNION
+select * from t3
+EXCEPT
+select a,c from t1,t2
+UNION ALL
+select * from v0 where g < 4
+UNION ALL
+select * from t3
+ORDER BY a;
+a b
+1 1
+1 1
+1 2
+1 2
+1 2
+1 2
+1 2
+1 2
+1 3
+1 3
+1 3
+1 3
+1 5
+1 5
+2 2
+2 2
+2 2
+2 2
+2 2
+2 3
+2 3
+2 5
+3 3
+3 3
+4 4
+4 4
+5 5
+9 9
+select * from (
+select * from t1
+UNION ALL
+select * from t2
+INTERSECT ALL
+(values (1,1), (2,2), (2,2), (5,5), (2,2) )
+INTERSECT ALL
+select * from (select * from t1 union all select * from t1) sq
+EXCEPT ALL
+select * from t3
+UNION ALL
+select * from t2
+UNION
+select * from t3
+EXCEPT
+select a,c from t1,t2
+UNION ALL
+select * from v0 where g < 4
+UNION ALL
+select * from t3
+) dt;
+a b
+1 1
+1 2
+3 3
+9 9
+5 5
+4 4
+1 2
+2 2
+1 3
+1 3
+2 3
+1 5
+1 5
+2 5
+1 2
+1 2
+2 2
+1 2
+1 2
+2 2
+1 3
+1 3
+2 3
+4 4
+2 2
+2 2
+1 1
+3 3
+EXPLAIN
+select * from t1
+UNION ALL
+select * from t2
+INTERSECT ALL
+(values (1,1), (2,2), (2,2), (5,5), (2,2) )
+INTERSECT ALL
+select * from (select * from t1 union all select * from t1) sq
+EXCEPT ALL
+select * from t3
+UNION ALL
+select * from t2
+UNION
+select * from t3
+EXCEPT
+select a,c from t1,t2
+UNION ALL
+select * from v0 where g < 4
+UNION ALL
+select * from t3;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 5
+8 UNION <derived2> ALL NULL NULL NULL NULL 5
+2 DERIVED t2 ALL NULL NULL NULL NULL 6
+3 INTERSECT NULL NULL NULL NULL NULL NULL NULL No tables used
+4 INTERSECT <derived5> ALL NULL NULL NULL NULL 10
+5 DERIVED t1 ALL NULL NULL NULL NULL 5
+6 UNION t1 ALL NULL NULL NULL NULL 5
+NULL INTERSECT RESULT <intersect2,3,4> ALL NULL NULL NULL NULL NULL
+7 EXCEPT t3 ALL NULL NULL NULL NULL 5
+9 UNION t2 ALL NULL NULL NULL NULL 6
+10 UNION t3 ALL NULL NULL NULL NULL 5
+11 EXCEPT t1 ALL NULL NULL NULL NULL 5
+11 EXCEPT t2 ALL NULL NULL NULL NULL 6 Using join buffer (flat, BNL join)
+12 UNION t1 ALL NULL NULL NULL NULL 5 Using where
+12 UNION t2 ALL NULL NULL NULL NULL 6 Using join buffer (flat, BNL join)
+13 UNION t3 ALL NULL NULL NULL NULL 5
+NULL UNIT RESULT <unit1,8,7,9,10,11,12,13> ALL NULL NULL NULL NULL NULL
+EXPLAIN format=json
+select * from t1
+UNION ALL
+select * from t2
+INTERSECT ALL
+(values (1,1), (2,2), (2,2), (5,5), (2,2) )
+INTERSECT ALL
+select * from (select * from t1 union all select * from t1) sq
+EXCEPT ALL
+select * from t3
+UNION ALL
+select * from t2
+UNION
+select * from t3
+EXCEPT
+select a,c from t1,t2
+UNION ALL
+select * from v0 where g < 4
+UNION ALL
+select * from t3;
+EXPLAIN
+{
+ "query_block": {
+ "union_result": {
+ "table_name": "<unit1,8,7,9,10,11,12,13>",
+ "access_type": "ALL",
+ "query_specifications": [
+ {
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100
+ }
+ }
+ },
+ {
+ "query_block": {
+ "select_id": 8,
+ "operation": "UNION",
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "materialized": {
+ "query_block": {
+ "union_result": {
+ "table_name": "<intersect2,3,4>",
+ "access_type": "ALL",
+ "query_specifications": [
+ {
+ "query_block": {
+ "select_id": 2,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 6,
+ "filtered": 100
+ }
+ }
+ },
+ {
+ "query_block": {
+ "select_id": 3,
+ "operation": "INTERSECT",
+ "table": {
+ "message": "No tables used"
+ }
+ }
+ },
+ {
+ "query_block": {
+ "select_id": 4,
+ "operation": "INTERSECT",
+ "table": {
+ "table_name": "<derived5>",
+ "access_type": "ALL",
+ "rows": 10,
+ "filtered": 100,
+ "materialized": {
+ "query_block": {
+ "union_result": {
+ "table_name": "<union5,6>",
+ "access_type": "ALL",
+ "query_specifications": [
+ {
+ "query_block": {
+ "select_id": 5,
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100
+ }
+ }
+ },
+ {
+ "query_block": {
+ "select_id": 6,
+ "operation": "UNION",
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ }
+ },
+ {
+ "query_block": {
+ "select_id": 7,
+ "operation": "EXCEPT",
+ "table": {
+ "table_name": "t3",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100
+ }
+ }
+ },
+ {
+ "query_block": {
+ "select_id": 9,
+ "operation": "UNION",
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 6,
+ "filtered": 100
+ }
+ }
+ },
+ {
+ "query_block": {
+ "select_id": 10,
+ "operation": "UNION",
+ "table": {
+ "table_name": "t3",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100
+ }
+ }
+ },
+ {
+ "query_block": {
+ "select_id": 11,
+ "operation": "EXCEPT",
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100
+ },
+ "block-nl-join": {
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 6,
+ "filtered": 100
+ },
+ "buffer_type": "flat",
+ "buffer_size": "65",
+ "join_type": "BNL"
+ }
+ }
+ },
+ {
+ "query_block": {
+ "select_id": 12,
+ "operation": "UNION",
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.a < 4"
+ },
+ "block-nl-join": {
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 6,
+ "filtered": 100
+ },
+ "buffer_type": "flat",
+ "buffer_size": "65",
+ "join_type": "BNL"
+ }
+ }
+ },
+ {
+ "query_block": {
+ "select_id": 13,
+ "operation": "UNION",
+ "table": {
+ "table_name": "t3",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100
+ }
+ }
+ }
+ ]
+ }
+ }
+}
+EXPLAIN EXTENDED
+select * from t1
+UNION ALL
+select * from t2
+INTERSECT ALL
+(values (1,1), (2,2), (2,2), (5,5), (2,2) )
+INTERSECT ALL
+select * from (select * from t1 union all select * from t1) sq
+EXCEPT ALL
+select * from t3
+UNION ALL
+select * from t2
+UNION
+select * from t3
+EXCEPT
+select a,c from t1,t2
+UNION ALL
+select * from v0 where g < 4
+UNION ALL
+select * from t3;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 5 100.00
+8 UNION <derived2> ALL NULL NULL NULL NULL 5 100.00
+2 DERIVED t2 ALL NULL NULL NULL NULL 6 100.00
+3 INTERSECT NULL NULL NULL NULL NULL NULL NULL NULL No tables used
+4 INTERSECT <derived5> ALL NULL NULL NULL NULL 10 100.00
+5 DERIVED t1 ALL NULL NULL NULL NULL 5 100.00
+6 UNION t1 ALL NULL NULL NULL NULL 5 100.00
+NULL INTERSECT RESULT <intersect2,3,4> ALL NULL NULL NULL NULL NULL NULL
+7 EXCEPT t3 ALL NULL NULL NULL NULL 5 100.00
+9 UNION t2 ALL NULL NULL NULL NULL 6 100.00
+10 UNION t3 ALL NULL NULL NULL NULL 5 100.00
+11 EXCEPT t1 ALL NULL NULL NULL NULL 5 100.00
+11 EXCEPT t2 ALL NULL NULL NULL NULL 6 100.00 Using join buffer (flat, BNL join)
+12 UNION t1 ALL NULL NULL NULL NULL 5 100.00 Using where
+12 UNION t2 ALL NULL NULL NULL NULL 6 100.00 Using join buffer (flat, BNL join)
+13 UNION t3 ALL NULL NULL NULL NULL 5 100.00
+NULL UNIT RESULT <unit1,8,7,9,10,11,12,13> ALL NULL NULL NULL NULL NULL NULL
+Warnings:
+Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` union all /* select#8 */ select `__8`.`c` AS `c`,`__8`.`d` AS `d` from (/* select#2 */ select `test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t2` intersect all (values (1,1),(2,2),(2,2),(5,5),(2,2)) intersect all /* select#4 */ select `sq`.`a` AS `a`,`sq`.`b` AS `b` from (/* select#5 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` union all /* select#6 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1`) `sq`) `__8` except all /* select#7 */ select `test`.`t3`.`e` AS `e`,`test`.`t3`.`f` AS `f` from `test`.`t3` union /* select#9 */ select `test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t2` union /* select#10 */ select `test`.`t3`.`e` AS `e`,`test`.`t3`.`f` AS `f` from `test`.`t3` except /* select#11 */ select `test`.`t1`.`a` AS `a`,`test`.`t2`.`c` AS `c` from `test`.`t1` join `test`.`t2` union all /* select#12 */ select `test`.`t1`.`a` AS `g`,`test`.`t2`.`c` AS `h` from `test`.`t1` join `test`.`t2` where `test`.`t1`.`a` < 4 union all /* select#13 */ select `test`.`t3`.`e` AS `e`,`test`.`t3`.`f` AS `f` from `test`.`t3`
+PREPARE stmt from"
+ select * from t1
+ UNION ALL
+ select * from t2
+ INTERSECT ALL
+ (values (1,1), (2,2), (2,2), (5,5), (2,2) )
+ INTERSECT ALL
+ select * from (select * from t1 union all select * from t1) sq
+ EXCEPT ALL
+ select * from t3
+ UNION ALL
+ select * from t2
+ UNION
+ select * from t3
+ EXCEPT
+ select a,c from t1,t2
+ UNION ALL
+ select * from v0 where g < 4
+ UNION ALL
+ select * from t3
+";
+EXECUTE stmt;
+a b
+1 1
+1 2
+3 3
+9 9
+5 5
+4 4
+1 2
+2 2
+1 3
+1 3
+2 3
+1 5
+1 5
+2 5
+1 2
+1 2
+2 2
+1 2
+1 2
+2 2
+1 3
+1 3
+2 3
+4 4
+2 2
+2 2
+1 1
+3 3
+EXECUTE stmt;
+a b
+1 1
+1 2
+3 3
+9 9
+5 5
+4 4
+1 2
+2 2
+1 3
+1 3
+2 3
+1 5
+1 5
+2 5
+1 2
+1 2
+2 2
+1 2
+1 2
+2 2
+1 3
+1 3
+2 3
+4 4
+2 2
+2 2
+1 1
+3 3
+deallocate prepare stmt;
+create view v1(i1, i2) as
+select * from t1
+UNION ALL
+select * from t2
+INTERSECT ALL
+(values (1,1), (2,2), (2,2), (5,5), (2,2) )
+INTERSECT ALL
+select * from (select * from t1 union all select * from t1) sq
+EXCEPT ALL
+select * from t3
+UNION ALL
+select * from t2
+UNION
+select * from t3
+EXCEPT
+select a,c from t1,t2
+UNION ALL
+select * from v0 where g < 4
+UNION ALL
+select * from t3;
+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 `test`.`t1`.`a` AS `i1`,`test`.`t1`.`b` AS `i2` from `test`.`t1` union all select `__9`.`c` AS `c`,`__9`.`d` AS `d` from (select `test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t2` intersect all (values (1,1),(2,2),(2,2),(5,5),(2,2)) intersect all select `sq`.`a` AS `a`,`sq`.`b` AS `b` from (select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` union all select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1`) `sq`) `__9` except all select `test`.`t3`.`e` AS `e`,`test`.`t3`.`f` AS `f` from `test`.`t3` union all select `test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t2` union select `test`.`t3`.`e` AS `e`,`test`.`t3`.`f` AS `f` from `test`.`t3` except select `test`.`t1`.`a` AS `a`,`test`.`t2`.`c` AS `c` from (`test`.`t1` join `test`.`t2`) union all select `v0`.`g` AS `g`,`v0`.`h` AS `h` from `test`.`v0` where `v0`.`g` < 4 union all select `test`.`t3`.`e` AS `e`,`test`.`t3`.`f` AS `f` from `test`.`t3` latin1 latin1_swedish_ci
+select * from v1 limit 14;
+i1 i2
+1 1
+1 2
+3 3
+9 9
+5 5
+4 4
+1 2
+2 2
+1 3
+1 3
+2 3
+1 5
+1 5
+2 5
+select * from v1 order by i1 limit 14;
+i1 i2
+1 1
+1 1
+1 2
+1 2
+1 2
+1 2
+1 2
+1 2
+1 3
+1 3
+1 3
+1 3
+1 5
+1 5
+drop table t1,t2,t3;
+drop view v0,v1;
+# compare result
+create table t1 (a int, b int);
+create table t2 (c int, d int);
+create table t3 (e int, f int);
+create table t4 (g int, h int);
+insert into t1 values (1,1),(1,1),(2,2);
+insert into t2 values (1,1),(1,1),(2,2),(3,3);
+insert into t3 values (1,1);
+insert into t4 values (4,4);
+select * from t1 intersect all select * from t2 except select * from t3 union select * from t4;
+a b
+4 4
+2 2
+select * from t1 intersect all select * from t2 except ALL select * from t3 union select * from t4;
+a b
+1 1
+2 2
+4 4
+select * from t1 intersect DISTINCT select * from t2 except select * from t3 union select * from t4;
+a b
+4 4
+2 2
+select * from t1 intersect DISTINCT select * from t2 except ALL select * from t3 union select * from t4;
+a b
+4 4
+2 2
+delete from t1;
+delete from t2;
+delete from t3;
+delete from t4;
+insert into t1 values (1,1),(1,1),(1,1),(2,2),(2,2),(4,4),(5,5);
+insert into t2 values (1,1),(1,1),(1,1),(2,2),(2,2),(3,3);
+insert into t3 values (1,1),(2,2),(2,2);
+select * from t1 intersect all select * from t2 intersect all select * from t3;
+a b
+1 1
+2 2
+2 2
+select * from t1 intersect all select * from t2 intersect select * from t3;
+a b
+1 1
+2 2
+select * from t1 intersect all select * from t1 intersect all select * from t2 intersect select * from t3;
+a b
+1 1
+2 2
+delete from t1;
+delete from t2;
+delete from t3;
+insert into t1 values (1,1),(1,1),(2,2);
+insert into t2 values (1,1),(1,1),(2,2),(3,3);
+insert into t3 values (1,1),(5,5);
+insert into t4 values (4,4),(4,4),(4,4);
+select * from t1 intersect all select * from t2 union all select * from t3 union select * from t4;
+a b
+1 1
+2 2
+5 5
+4 4
+select * from t1 intersect DISTINCT select * from t2 union DISTINCT select * from t3 union select * from t4;
+a b
+1 1
+2 2
+5 5
+4 4
+select * from t1 intersect all select * from t2 intersect all select * from t3 union select * from t4;
+a b
+1 1
+4 4
+select * from t1 intersect all select * from t2 intersect DISTINCT select * from t3 union select * from t4;
+a b
+1 1
+4 4
+select * from t1 intersect DISTINCT select * from t2 intersect DISTINCT select * from t3 union select * from t4;
+a b
+1 1
+4 4
+select * from t1 intersect all select * from t2 EXCEPT select * from t3 union select * from t4;
+a b
+4 4
+2 2
+select * from t1 intersect DISTINCT select * from t2 EXCEPT select * from t3 union select * from t4;
+a b
+4 4
+2 2
+select * from t1 intersect all select * from t2 EXCEPT ALL select * from t3 union select * from t4;
+a b
+1 1
+2 2
+4 4
+select * from t1 EXCEPT select * from t2 union all select * from t3 union select * from t4;
+a b
+5 5
+1 1
+4 4
+select * from t1 EXCEPT select * from t2 union DISTINCT select * from t3 union select * from t4;
+a b
+5 5
+1 1
+4 4
+delete from t1;
+delete from t2;
+delete from t3;
+delete from t4;
+insert into t1 values (1,1),(2,2);
+insert into t2 values (1,1),(2,2);
+insert into t3 values (1,1),(3,3);
+select * from t1 union all select * from t2 except all select * from t3;
+a b
+1 1
+2 2
+2 2
+select * from t1 union all select * from t2 except DISTINCT select * from t3;
+a b
+2 2
+select * from t1 union DISTINCT select * from t2 except all select * from t3;
+a b
+2 2
+select * from t1 union DISTINCT select * from t2 except DISTINCT select * from t3;
+a b
+2 2
+drop table t1;
+drop table t2;
+drop table t3;
+drop table t4;
+select 1 intersect all select 2 intersect all select 3 intersect select 4 union select 5;
+1
+5
+select 1 intersect all select 2 intersect all select 3 union select 4 except select 5;
+1
+4
+select 1 union select 2 except all select 3 union select 4;
+1
+1
+2
+4
+select 1 union all select 2 union all select 3 union select 4;
+1
+1
+2
+3
+4
+# test with limited resource
+set @@max_heap_table_size= 1024;
+Warnings:
+Warning 1292 Truncated incorrect max_heap_table_size value: '1024'
+set @@tmp_table_size= 1024;
+create table t1 (a int, b int);
+insert into t1 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(0,0);
+insert into t1 select * from t1;
+insert into t1 select * from t1;
+insert into t1 select * from t1;
+insert into t1 select a+100, b+100 from t1;
+create table t2 (a int, b int);
+insert into t2 values (10,10),(11,11),(12,12),(13,13),(14,14),(5,5),(6,6),(7,7),(8,8),(9,9);
+insert into t2 select * from t2;
+insert into t2 select * from t2;
+insert into t2 select * from t2;
+insert into t2 select a+100, b+100 from t2;
+select count(*) from
+(
+select * from t1
+INTERSECT ALL
+select * from t2
+) c;
+count(*)
+80
+select count(*) from
+(
+select * from t1
+EXCEPT ALL
+select * from t2
+) c;
+count(*)
+80
+select count(*) from
+(
+select * from t1
+INTERSECT ALL
+select * from t2
+UNION ALL
+select * from t1
+EXCEPT ALL
+select * from t2
+) c;
+count(*)
+160
+delete from t1;
+delete from t2;
+insert into t1 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(0,0);
+insert into t1 select a+10, b+10 from t1;
+insert into t1 select a+20, b+20 from t1;
+insert into t1 select a+40, b+40 from t1;
+insert into t1 select a+80, b+80 from t1;
+insert into t2 values (1110,1110),(1111,1111),(1112,1112),(1113,1113),(1114,1114),(1105,1105),(1106,1106),(1107,1107),(1108,1108),(1109,1109);
+insert into t2 select a+10, b+10 from t2;
+insert into t2 select a+20, b+20 from t2;
+insert into t2 select a+40, b+40 from t2;
+insert into t2 select a+80, b+80 from t2;
+select count(*) from
+(
+select * from t1
+UNION ALL
+select * from t2
+EXCEPT ALL
+values (1,1)
+) c;
+count(*)
+319
+drop table t1;
+drop table t2;
+#
+# MDEV-24242: set expression with empty intermediate result
+# when tmp_memory_table_size is set to 0
+#
+create table t1 (a int, b int) engine=MyISAM;
+insert into t1 values (1,1), (2,2);
+create table t2 (a int, b int) engine=MyISAM;
+insert into t2 values (11,11), (12,12), (13,13);
+select * from t1
+except all
+select * from t1
+except
+select * from t1
+union all
+select * from t2;
+a b
+12 12
+11 11
+13 13
+set tmp_memory_table_size=0;
+select * from t1
+except all
+select * from t1
+except
+select * from t1
+union all
+select * from t2;
+a b
+12 12
+11 11
+13 13
+set tmp_memory_table_size=default;
+drop table t1,t2;
+# End of 10.4 tests
diff --git a/mysql-test/main/set_operation.test b/mysql-test/main/set_operation.test
new file mode 100644
index 00000000000..c422042f371
--- /dev/null
+++ b/mysql-test/main/set_operation.test
@@ -0,0 +1,554 @@
+create table t1 (a int, b int) engine=MyISAM;
+create table t2 (c int, d int) engine=MyISAM;
+create table t3 (e int, f int) engine=MyISAM;
+create table t4 (g int, h int) engine=MyISAM;
+insert into t1 values (1,1),(2,2),(3,3),(2,2),(3,3);
+insert into t2 values (2,2),(3,3),(5,5),(2,2),(2,2),(3,3);
+insert into t3 values (4,4),(2,2),(2,2),(1,1),(3,3);
+insert into t4 values (2,2),(4,4),(1,1);
+create view v0(g, h) as select a,c from t1,t2;
+
+--echo # test optimization
+
+let $q=
+ select * from t1
+ INTERSECT ALL
+ select * from t2
+ INTERSECT ALL
+ select * from t3;
+eval $q;
+eval EXPLAIN EXTENDED $q;
+
+let $q=
+ select * from t1
+ INTERSECT ALL
+ select * from t2
+ INTERSECT ALL
+ select * from t3
+ INTERSECT
+ select * from t1;
+eval $q;
+eval EXPLAIN EXTENDED $q;
+
+let $q=
+ select * from t1
+ INTERSECT ALL
+ select * from t2
+ INTERSECT ALL
+ select * from t3
+ EXCEPT ALL
+ select * from t4;
+eval $q;
+eval EXPLAIN EXTENDED $q;
+
+let $q=
+ select * from t1
+ INTERSECT
+ select * from t2
+ EXCEPT ALL
+ select * from t4;
+eval $q;
+eval EXPLAIN EXTENDED $q;
+
+insert into t4 values (1,1),(9,9);
+let $q=
+ select * from t1
+ UNION ALL
+ select * from t2
+ UNION ALL
+ select * from t3
+ EXCEPT
+ select * from t4;
+eval $q;
+eval EXPLAIN EXTENDED $q;
+
+delete from t4;
+insert into t4 values (3,3),(3,3);
+let $q=
+ select * from t1
+ INTERSECT ALL
+ select * from t2
+ UNION ALL
+ select * from t3
+ EXCEPT ALL
+ select * from t1
+ UNION
+ select * from t4
+ EXCEPT
+ select * from t3
+ UNION ALL
+ select * from t1;
+
+eval $q;
+eval EXPLAIN EXTENDED $q;
+drop table t4;
+
+--echo # test optimization with brackets
+
+let $q=
+(
+ (select 1 except select 5 union all select 6)
+ union
+ (select 2 intersect all select 3 intersect all select 4)
+ except
+ (select 7 intersect all select 8)
+)
+ union all
+(select 9 union all select 10)
+ except all
+select 11;
+eval $q;
+eval EXPLAIN EXTENDED $q;
+
+let $q=
+(select 1 union all select 2)
+ union
+(select 3 union all select 4);
+eval $q;
+eval EXPLAIN EXTENDED $q;
+
+let $q=
+(select 1 intersect all select 2)
+ except
+select 3;
+eval $q;
+eval EXPLAIN EXTENDED $q;
+
+let $q=
+(select 1 intersect all select 2 intersect all select 3)
+ intersect
+(select 4 intersect all select 5);
+eval $q;
+eval EXPLAIN EXTENDED $q;
+
+
+--echo # test set operations with table value constructor
+
+(values (1,1),(1,1),(1,1),(2,2),(2,2),(3,3),(9,9))
+INTERSECT ALL
+(values (1,1),(2,2),(2,2),(3,3),(3,3),(3,3),(8,8))
+EXCEPT ALL
+(values (7,7),(1,1));
+
+delete from t1;
+insert into t1 values(1,1),(1,1),(2,2),(4,4),(9,9);
+
+select * from t1
+UNION ALL
+(values (11,12),(3,3),(2,2),(3,3),(4,4),(8,8))
+INTERSECT
+(values (13,14),(7,7),(2,2),(3,3),(1,1))
+INTERSECT ALL
+(values (15,16),(2,2),(1,1))
+EXCEPT
+(values (17,18),(1,1));
+
+--echo # test set operations with derived table
+
+select * from (
+ select * from t1
+ UNION ALL
+ select * from t2
+)dt1
+INTERSECT ALL
+select * from (
+ select * from t2
+ EXCEPT ALL
+ select * from t3
+)dt2;
+
+select * from (
+ select * from t1
+ UNION ALL
+ select * from t3
+)dt1
+EXCEPT ALL
+select * from (
+ select * from t2
+ INTERSECT ALL
+ select * from t2
+)dt2;
+
+SELECT * from(
+ select * from (
+ select * from t1
+ UNION ALL
+ select * from t2
+ )dt1
+ INTERSECT ALL
+ select * from (
+ select * from t2
+ EXCEPT ALL
+ select * from t3
+ )dt2
+)dt3;
+
+--echo # integration test
+
+
+select * from t1
+UNION ALL
+select * from t2
+INTERSECT ALL
+(values (1,1), (2,2), (2,2), (5,5), (2,2))
+INTERSECT ALL
+select * from (select * from t1 union all select * from t1) sq
+EXCEPT ALL
+select * from t3
+UNION ALL
+select * from t2
+UNION
+select * from t3
+EXCEPT
+select a,c from t1,t2
+UNION ALL
+select * from v0 where g < 4
+UNION ALL
+select * from t3;
+
+--sorted_result
+select * from t1
+UNION ALL
+select * from t2
+INTERSECT ALL
+(values (1,1), (2,2), (2,2), (5,5), (2,2))
+INTERSECT ALL
+select * from (select * from t1 union all select * from t1) sq
+EXCEPT ALL
+select * from t3
+UNION ALL
+select * from t2
+UNION
+select * from t3
+EXCEPT
+select a,c from t1,t2
+UNION ALL
+select * from v0 where g < 4
+UNION ALL
+select * from t3
+ORDER BY a;
+
+
+select * from (
+ select * from t1
+ UNION ALL
+ select * from t2
+ INTERSECT ALL
+ (values (1,1), (2,2), (2,2), (5,5), (2,2) )
+ INTERSECT ALL
+ select * from (select * from t1 union all select * from t1) sq
+ EXCEPT ALL
+ select * from t3
+ UNION ALL
+ select * from t2
+ UNION
+ select * from t3
+ EXCEPT
+ select a,c from t1,t2
+ UNION ALL
+ select * from v0 where g < 4
+ UNION ALL
+ select * from t3
+) dt;
+
+EXPLAIN
+select * from t1
+UNION ALL
+select * from t2
+INTERSECT ALL
+(values (1,1), (2,2), (2,2), (5,5), (2,2) )
+INTERSECT ALL
+select * from (select * from t1 union all select * from t1) sq
+EXCEPT ALL
+select * from t3
+UNION ALL
+select * from t2
+UNION
+select * from t3
+EXCEPT
+select a,c from t1,t2
+UNION ALL
+select * from v0 where g < 4
+UNION ALL
+select * from t3;
+
+EXPLAIN format=json
+select * from t1
+UNION ALL
+select * from t2
+INTERSECT ALL
+(values (1,1), (2,2), (2,2), (5,5), (2,2) )
+INTERSECT ALL
+select * from (select * from t1 union all select * from t1) sq
+EXCEPT ALL
+select * from t3
+UNION ALL
+select * from t2
+UNION
+select * from t3
+EXCEPT
+select a,c from t1,t2
+UNION ALL
+select * from v0 where g < 4
+UNION ALL
+select * from t3;
+
+EXPLAIN EXTENDED
+select * from t1
+UNION ALL
+select * from t2
+INTERSECT ALL
+(values (1,1), (2,2), (2,2), (5,5), (2,2) )
+INTERSECT ALL
+select * from (select * from t1 union all select * from t1) sq
+EXCEPT ALL
+select * from t3
+UNION ALL
+select * from t2
+UNION
+select * from t3
+EXCEPT
+select a,c from t1,t2
+UNION ALL
+select * from v0 where g < 4
+UNION ALL
+select * from t3;
+
+PREPARE stmt from"
+ select * from t1
+ UNION ALL
+ select * from t2
+ INTERSECT ALL
+ (values (1,1), (2,2), (2,2), (5,5), (2,2) )
+ INTERSECT ALL
+ select * from (select * from t1 union all select * from t1) sq
+ EXCEPT ALL
+ select * from t3
+ UNION ALL
+ select * from t2
+ UNION
+ select * from t3
+ EXCEPT
+ select a,c from t1,t2
+ UNION ALL
+ select * from v0 where g < 4
+ UNION ALL
+ select * from t3
+";
+
+
+EXECUTE stmt;
+
+EXECUTE stmt;
+deallocate prepare stmt;
+
+create view v1(i1, i2) as
+ select * from t1
+ UNION ALL
+ select * from t2
+ INTERSECT ALL
+ (values (1,1), (2,2), (2,2), (5,5), (2,2) )
+ INTERSECT ALL
+ select * from (select * from t1 union all select * from t1) sq
+ EXCEPT ALL
+ select * from t3
+ UNION ALL
+ select * from t2
+ UNION
+ select * from t3
+ EXCEPT
+ select a,c from t1,t2
+ UNION ALL
+ select * from v0 where g < 4
+ UNION ALL
+ select * from t3;
+
+show create view v1;
+
+select * from v1 limit 14;
+--sorted_result
+select * from v1 order by i1 limit 14;
+
+drop table t1,t2,t3;
+drop view v0,v1;
+
+--echo # compare result
+
+create table t1 (a int, b int);
+create table t2 (c int, d int);
+create table t3 (e int, f int);
+create table t4 (g int, h int);
+
+
+insert into t1 values (1,1),(1,1),(2,2);
+insert into t2 values (1,1),(1,1),(2,2),(3,3);
+insert into t3 values (1,1);
+insert into t4 values (4,4);
+
+select * from t1 intersect all select * from t2 except select * from t3 union select * from t4;
+select * from t1 intersect all select * from t2 except ALL select * from t3 union select * from t4;
+
+select * from t1 intersect DISTINCT select * from t2 except select * from t3 union select * from t4;
+select * from t1 intersect DISTINCT select * from t2 except ALL select * from t3 union select * from t4;
+
+delete from t1;
+delete from t2;
+delete from t3;
+delete from t4;
+
+
+insert into t1 values (1,1),(1,1),(1,1),(2,2),(2,2),(4,4),(5,5);
+insert into t2 values (1,1),(1,1),(1,1),(2,2),(2,2),(3,3);
+insert into t3 values (1,1),(2,2),(2,2);
+
+select * from t1 intersect all select * from t2 intersect all select * from t3;
+select * from t1 intersect all select * from t2 intersect select * from t3;
+select * from t1 intersect all select * from t1 intersect all select * from t2 intersect select * from t3;
+
+delete from t1;
+delete from t2;
+delete from t3;
+
+
+insert into t1 values (1,1),(1,1),(2,2);
+insert into t2 values (1,1),(1,1),(2,2),(3,3);
+insert into t3 values (1,1),(5,5);
+insert into t4 values (4,4),(4,4),(4,4);
+
+select * from t1 intersect all select * from t2 union all select * from t3 union select * from t4;
+select * from t1 intersect DISTINCT select * from t2 union DISTINCT select * from t3 union select * from t4;
+
+select * from t1 intersect all select * from t2 intersect all select * from t3 union select * from t4;
+select * from t1 intersect all select * from t2 intersect DISTINCT select * from t3 union select * from t4;
+select * from t1 intersect DISTINCT select * from t2 intersect DISTINCT select * from t3 union select * from t4;
+
+select * from t1 intersect all select * from t2 EXCEPT select * from t3 union select * from t4;
+select * from t1 intersect DISTINCT select * from t2 EXCEPT select * from t3 union select * from t4;
+select * from t1 intersect all select * from t2 EXCEPT ALL select * from t3 union select * from t4;
+
+select * from t1 EXCEPT select * from t2 union all select * from t3 union select * from t4;
+select * from t1 EXCEPT select * from t2 union DISTINCT select * from t3 union select * from t4;
+
+delete from t1;
+delete from t2;
+delete from t3;
+delete from t4;
+
+
+insert into t1 values (1,1),(2,2);
+insert into t2 values (1,1),(2,2);
+insert into t3 values (1,1),(3,3);
+
+select * from t1 union all select * from t2 except all select * from t3;
+select * from t1 union all select * from t2 except DISTINCT select * from t3;
+select * from t1 union DISTINCT select * from t2 except all select * from t3;
+select * from t1 union DISTINCT select * from t2 except DISTINCT select * from t3;
+
+drop table t1;
+drop table t2;
+drop table t3;
+drop table t4;
+
+
+select 1 intersect all select 2 intersect all select 3 intersect select 4 union select 5;
+select 1 intersect all select 2 intersect all select 3 union select 4 except select 5;
+select 1 union select 2 except all select 3 union select 4;
+select 1 union all select 2 union all select 3 union select 4;
+
+--echo # test with limited resource
+
+set @@max_heap_table_size= 1024;
+set @@tmp_table_size= 1024;
+
+create table t1 (a int, b int);
+insert into t1 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(0,0);
+insert into t1 select * from t1;
+insert into t1 select * from t1;
+insert into t1 select * from t1;
+insert into t1 select a+100, b+100 from t1;
+create table t2 (a int, b int);
+insert into t2 values (10,10),(11,11),(12,12),(13,13),(14,14),(5,5),(6,6),(7,7),(8,8),(9,9);
+insert into t2 select * from t2;
+insert into t2 select * from t2;
+insert into t2 select * from t2;
+insert into t2 select a+100, b+100 from t2;
+
+
+select count(*) from
+(
+ select * from t1
+ INTERSECT ALL
+ select * from t2
+) c;
+
+select count(*) from
+(
+ select * from t1
+ EXCEPT ALL
+ select * from t2
+) c;
+
+select count(*) from
+(
+ select * from t1
+ INTERSECT ALL
+ select * from t2
+ UNION ALL
+ select * from t1
+ EXCEPT ALL
+ select * from t2
+) c;
+
+delete from t1;
+delete from t2;
+
+insert into t1 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(0,0);
+insert into t1 select a+10, b+10 from t1;
+insert into t1 select a+20, b+20 from t1;
+insert into t1 select a+40, b+40 from t1;
+insert into t1 select a+80, b+80 from t1;
+insert into t2 values (1110,1110),(1111,1111),(1112,1112),(1113,1113),(1114,1114),(1105,1105),(1106,1106),(1107,1107),(1108,1108),(1109,1109);
+insert into t2 select a+10, b+10 from t2;
+insert into t2 select a+20, b+20 from t2;
+insert into t2 select a+40, b+40 from t2;
+insert into t2 select a+80, b+80 from t2;
+
+select count(*) from
+(
+ select * from t1
+ UNION ALL
+ select * from t2
+ EXCEPT ALL
+ values (1,1)
+) c;
+
+drop table t1;
+drop table t2;
+
+--echo #
+--echo # MDEV-24242: set expression with empty intermediate result
+--echo # when tmp_memory_table_size is set to 0
+--echo #
+
+create table t1 (a int, b int) engine=MyISAM;
+insert into t1 values (1,1), (2,2);
+create table t2 (a int, b int) engine=MyISAM;
+insert into t2 values (11,11), (12,12), (13,13);
+
+let $q=
+select * from t1
+except all
+select * from t1
+except
+select * from t1
+union all
+select * from t2;
+
+eval $q;
+set tmp_memory_table_size=0;
+eval $q;
+set tmp_memory_table_size=default;
+
+drop table t1,t2;
+
+--echo # End of 10.4 tests
diff --git a/mysql-test/main/set_operation_oracle.result b/mysql-test/main/set_operation_oracle.result
new file mode 100644
index 00000000000..947e5e9a11c
--- /dev/null
+++ b/mysql-test/main/set_operation_oracle.result
@@ -0,0 +1,127 @@
+create table t1 (a int, b blob) engine=MyISAM;
+create table t2 (c int, d blob) engine=MyISAM;
+create table t3 (e int, f blob) engine=MyISAM;
+insert into t1 values (5,5),(6,6);
+insert into t2 values (2,2),(3,3);
+insert into t3 values (1,1),(3,3);
+set SQL_MODE=ORACLE;
+(select a,b from t1) union (select c,d from t2) intersect (select e,f from t3) union (select 4,4);
+a b
+4 4
+3 3
+explain extended
+(select a,b from t1) union (select c,d from t2) intersect (select e,f from t3) union (select 4,4);
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 2 100.00
+2 UNION t2 ALL NULL NULL NULL NULL 2 100.00
+3 INTERSECT t3 ALL NULL NULL NULL NULL 2 100.00
+4 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used
+NULL UNIT RESULT <unit1,2,3,4> ALL NULL NULL NULL NULL NULL NULL
+Warnings:
+Note 1003 (/* select#1 */ select "test"."t1"."a" AS "a","test"."t1"."b" AS "b" from "test"."t1") union (/* select#2 */ select "test"."t2"."c" AS "c","test"."t2"."d" AS "d" from "test"."t2") intersect (/* select#3 */ select "test"."t3"."e" AS "e","test"."t3"."f" AS "f" from "test"."t3") union (/* select#4 */ select 4 AS "4",4 AS "4")
+(select e,f from t3) intersect (select c,d from t2) union (select a,b from t1) union (select 4,4);
+e f
+5 5
+3 3
+6 6
+4 4
+explain extended
+(select e,f from t3) intersect (select c,d from t2) union (select a,b from t1) union (select 4,4);
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY t3 ALL NULL NULL NULL NULL 2 100.00
+2 INTERSECT t2 ALL NULL NULL NULL NULL 2 100.00
+3 UNION t1 ALL NULL NULL NULL NULL 2 100.00
+4 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used
+NULL UNIT RESULT <unit1,2,3,4> ALL NULL NULL NULL NULL NULL NULL
+Warnings:
+Note 1003 (/* select#1 */ select "test"."t3"."e" AS "e","test"."t3"."f" AS "f" from "test"."t3") intersect (/* select#2 */ select "test"."t2"."c" AS "c","test"."t2"."d" AS "d" from "test"."t2") union (/* select#3 */ select "test"."t1"."a" AS "a","test"."t1"."b" AS "b" from "test"."t1") union (/* select#4 */ select 4 AS "4",4 AS "4")
+create table t12(c1 int);
+insert into t12 values(1);
+insert into t12 values(2);
+create table t13(c1 int);
+insert into t13 values(1);
+insert into t13 values(3);
+create table t234(c1 int);
+insert into t234 values(2);
+insert into t234 values(3);
+insert into t234 values(4);
+select * from t13 union select * from t234 intersect select * from t12;
+c1
+1
+2
+set SQL_MODE=default;
+drop table t1,t2,t3;
+drop table t12,t13, t234;
+create table t1 (a int, b blob) engine=MyISAM;
+create table t2 (c int, d blob) engine=MyISAM;
+create table t3 (e int, f blob) engine=MyISAM;
+insert into t1 values (5,5),(6,6);
+insert into t2 values (2,2),(3,3);
+insert into t3 values (1,1),(3,3);
+set SQL_MODE=ORACLE;
+select a,b from t1 union all select c,d from t2 intersect select e,f from t3 union all select 4,'4' from dual;
+a b
+4 4
+3 3
+explain extended
+select a,b from t1 union all select c,d from t2 intersect select e,f from t3 union all select 4,'4' from dual;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 2 100.00
+2 UNION t2 ALL NULL NULL NULL NULL 2 100.00
+3 INTERSECT t3 ALL NULL NULL NULL NULL 2 100.00
+4 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used
+NULL UNIT RESULT <unit1,2,3,4> ALL NULL NULL NULL NULL NULL NULL
+Warnings:
+Note 1003 /* select#1 */ select "test"."t1"."a" AS "a","test"."t1"."b" AS "b" from "test"."t1" union all /* select#2 */ select "test"."t2"."c" AS "c","test"."t2"."d" AS "d" from "test"."t2" intersect /* select#3 */ select "test"."t3"."e" AS "e","test"."t3"."f" AS "f" from "test"."t3" union all /* select#4 */ select 4 AS "4",'4' AS "4"
+select a,b from t1 union all select c,d from t2 intersect all select e,f from t3 union all select 4,'4' from dual;
+a b
+3 3
+4 4
+explain extended
+select a,b from t1 union all select c,d from t2 intersect all select e,f from t3 union all select 4,'4' from dual;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 2 100.00
+2 UNION t2 ALL NULL NULL NULL NULL 2 100.00
+3 INTERSECT t3 ALL NULL NULL NULL NULL 2 100.00
+4 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used
+NULL UNIT RESULT <unit1,2,3,4> ALL NULL NULL NULL NULL NULL NULL
+Warnings:
+Note 1003 /* select#1 */ select "test"."t1"."a" AS "a","test"."t1"."b" AS "b" from "test"."t1" union all /* select#2 */ select "test"."t2"."c" AS "c","test"."t2"."d" AS "d" from "test"."t2" intersect all /* select#3 */ select "test"."t3"."e" AS "e","test"."t3"."f" AS "f" from "test"."t3" union all /* select#4 */ select 4 AS "4",'4' AS "4"
+select e,f from t3 intersect select c,d from t2 union all select a,b from t1 union all select 4,'4' from dual;
+e f
+5 5
+3 3
+6 6
+4 4
+explain extended
+select e,f from t3 intersect select c,d from t2 union all select a,b from t1 union all select 4,'4' from dual;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY t3 ALL NULL NULL NULL NULL 2 100.00
+2 INTERSECT t2 ALL NULL NULL NULL NULL 2 100.00
+3 UNION t1 ALL NULL NULL NULL NULL 2 100.00
+4 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used
+NULL UNIT RESULT <unit1,2,3,4> ALL NULL NULL NULL NULL NULL NULL
+Warnings:
+Note 1003 /* select#1 */ select "test"."t3"."e" AS "e","test"."t3"."f" AS "f" from "test"."t3" intersect /* select#2 */ select "test"."t2"."c" AS "c","test"."t2"."d" AS "d" from "test"."t2" union all /* select#3 */ select "test"."t1"."a" AS "a","test"."t1"."b" AS "b" from "test"."t1" union all /* select#4 */ select 4 AS "4",'4' AS "4"
+select e,f from t3 intersect all select c,d from t2 union all select a,b from t1 union all select 4,'4' from dual;
+e f
+3 3
+5 5
+6 6
+4 4
+explain extended
+select e,f from t3 intersect all select c,d from t2 union all select a,b from t1 union all select 4,'4' from dual;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY t3 ALL NULL NULL NULL NULL 2 100.00
+2 INTERSECT t2 ALL NULL NULL NULL NULL 2 100.00
+3 UNION t1 ALL NULL NULL NULL NULL 2 100.00
+4 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used
+NULL UNIT RESULT <unit1,2,3,4> ALL NULL NULL NULL NULL NULL NULL
+Warnings:
+Note 1003 /* select#1 */ select "test"."t3"."e" AS "e","test"."t3"."f" AS "f" from "test"."t3" intersect all /* select#2 */ select "test"."t2"."c" AS "c","test"."t2"."d" AS "d" from "test"."t2" union all /* select#3 */ select "test"."t1"."a" AS "a","test"."t1"."b" AS "b" from "test"."t1" union all /* select#4 */ select 4 AS "4",'4' AS "4"
+set SQL_MODE=default;
+drop table t1,t2,t3;
+set SQL_MODE=oracle;
+select * from t13 union select * from t234 intersect all select * from t12;
+ERROR 42S02: Table 'test.t13' doesn't exist
+set SQL_MODE=default;
diff --git a/mysql-test/main/set_operation_oracle.test b/mysql-test/main/set_operation_oracle.test
new file mode 100644
index 00000000000..60fda4a5cb5
--- /dev/null
+++ b/mysql-test/main/set_operation_oracle.test
@@ -0,0 +1,71 @@
+# from intersect.test
+create table t1 (a int, b blob) engine=MyISAM;
+create table t2 (c int, d blob) engine=MyISAM;
+create table t3 (e int, f blob) engine=MyISAM;
+insert into t1 values (5,5),(6,6);
+insert into t2 values (2,2),(3,3);
+insert into t3 values (1,1),(3,3);
+
+set SQL_MODE=ORACLE;
+
+(select a,b from t1) union (select c,d from t2) intersect (select e,f from t3) union (select 4,4);
+explain extended
+(select a,b from t1) union (select c,d from t2) intersect (select e,f from t3) union (select 4,4);
+
+
+(select e,f from t3) intersect (select c,d from t2) union (select a,b from t1) union (select 4,4);
+explain extended
+(select e,f from t3) intersect (select c,d from t2) union (select a,b from t1) union (select 4,4);
+
+create table t12(c1 int);
+insert into t12 values(1);
+insert into t12 values(2);
+create table t13(c1 int);
+insert into t13 values(1);
+insert into t13 values(3);
+create table t234(c1 int);
+insert into t234 values(2);
+insert into t234 values(3);
+insert into t234 values(4);
+
+
+select * from t13 union select * from t234 intersect select * from t12;
+set SQL_MODE=default;
+
+drop table t1,t2,t3;
+drop table t12,t13, t234;
+
+#from intersect_all.test
+create table t1 (a int, b blob) engine=MyISAM;
+create table t2 (c int, d blob) engine=MyISAM;
+create table t3 (e int, f blob) engine=MyISAM;
+insert into t1 values (5,5),(6,6);
+insert into t2 values (2,2),(3,3);
+insert into t3 values (1,1),(3,3);
+
+set SQL_MODE=ORACLE;
+
+select a,b from t1 union all select c,d from t2 intersect select e,f from t3 union all select 4,'4' from dual;
+explain extended
+select a,b from t1 union all select c,d from t2 intersect select e,f from t3 union all select 4,'4' from dual;
+
+select a,b from t1 union all select c,d from t2 intersect all select e,f from t3 union all select 4,'4' from dual;
+explain extended
+select a,b from t1 union all select c,d from t2 intersect all select e,f from t3 union all select 4,'4' from dual;
+
+select e,f from t3 intersect select c,d from t2 union all select a,b from t1 union all select 4,'4' from dual;
+explain extended
+select e,f from t3 intersect select c,d from t2 union all select a,b from t1 union all select 4,'4' from dual;
+
+select e,f from t3 intersect all select c,d from t2 union all select a,b from t1 union all select 4,'4' from dual;
+explain extended
+select e,f from t3 intersect all select c,d from t2 union all select a,b from t1 union all select 4,'4' from dual;
+
+set SQL_MODE=default;
+
+drop table t1,t2,t3;
+
+set SQL_MODE=oracle;
+--error ER_NO_SUCH_TABLE
+select * from t13 union select * from t234 intersect all select * from t12;
+set SQL_MODE=default;
diff --git a/mysql-test/main/shutdown.result b/mysql-test/main/shutdown.result
index 7a69f58ffd9..681c184f640 100644
--- a/mysql-test/main/shutdown.result
+++ b/mysql-test/main/shutdown.result
@@ -13,4 +13,4 @@ drop user user1@localhost;
#
# MDEV-8491 - On shutdown, report the user and the host executed that.
#
-FOUND 2 /mysqld(\.exe)? \(initiated by: root\[root\] @ localhost \[(::1)?\]\): Normal shutdown/ in mysqld.1.err
+FOUND 3 /(mysqld|mariadbd)(\.exe)? \(initiated by: root\[root\] @ localhost \[(::1)?\]\): Normal shutdown/ in mysqld.1.err
diff --git a/mysql-test/main/shutdown.test b/mysql-test/main/shutdown.test
index e423725177b..69616f535b2 100644
--- a/mysql-test/main/shutdown.test
+++ b/mysql-test/main/shutdown.test
@@ -34,5 +34,5 @@ drop user user1@localhost;
--echo # MDEV-8491 - On shutdown, report the user and the host executed that.
--echo #
--let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err
---let SEARCH_PATTERN=mysqld(\.exe)? \(initiated by: root\[root\] @ localhost \[(::1)?\]\): Normal shutdown
+--let SEARCH_PATTERN=(mysqld|mariadbd)(\.exe)? \(initiated by: root\[root\] @ localhost \[(::1)?\]\): Normal shutdown
--source include/search_pattern_in_file.inc
diff --git a/mysql-test/main/sp-code.result b/mysql-test/main/sp-code.result
index 46324c534e8..f9cbdcce691 100644
--- a/mysql-test/main/sp-code.result
+++ b/mysql-test/main/sp-code.result
@@ -847,8 +847,8 @@ drop procedure if exists p_20906_b;
create procedure p_20906_a() SET @a=@a+1, @b=@b+1;
show procedure code p_20906_a;
Pos Instruction
-0 stmt 31 "SET @a=@a+1"
-1 stmt 31 "SET @b=@b+1"
+0 stmt 31 "SET @a=@a+1"
+1 stmt 31 "SET @b=@b+1"
set @a=1;
set @b=1;
call p_20906_a();
@@ -858,9 +858,9 @@ select @a, @b;
create procedure p_20906_b() SET @a=@a+1, @b=@b+1, @c=@c+1;
show procedure code p_20906_b;
Pos Instruction
-0 stmt 31 "SET @a=@a+1"
-1 stmt 31 "SET @b=@b+1"
-2 stmt 31 "SET @c=@c+1"
+0 stmt 31 "SET @a=@a+1"
+1 stmt 31 "SET @b=@b+1"
+2 stmt 31 "SET @c=@c+1"
set @a=1;
set @b=1;
set @c=1;
@@ -1329,3 +1329,18 @@ Pos Instruction
4 jump 2
5 hpop 1
drop function f1;
+#
+# MDEV-19640 Wrong SHOW PROCEDURE output for SET GLOBAL sysvar1=expr, sysvar2=expr
+#
+CREATE OR REPLACE PROCEDURE p1()
+BEGIN
+SET GLOBAL max_allowed_packet=16000000, max_error_count=60;
+SELECT @@GLOBAL.max_allowed_packet, @@GLOBAL.max_error_count;
+END;
+$$
+SHOW PROCEDURE CODE p1;
+Pos Instruction
+0 stmt 31 "SET GLOBAL max_allowed_packet=16000000"
+1 stmt 31 "SET GLOBAL max_error_count=60"
+2 stmt 0 "SELECT @@GLOBAL.max_allowed_packet, @..."
+DROP PROCEDURE p1;
diff --git a/mysql-test/main/sp-code.test b/mysql-test/main/sp-code.test
index e03ce5048fb..10bf1ba1322 100644
--- a/mysql-test/main/sp-code.test
+++ b/mysql-test/main/sp-code.test
@@ -947,3 +947,19 @@ end|
delimiter ;|
show function code f1;
drop function f1;
+
+
+--echo #
+--echo # MDEV-19640 Wrong SHOW PROCEDURE output for SET GLOBAL sysvar1=expr, sysvar2=expr
+--echo #
+
+DELIMITER $$;
+CREATE OR REPLACE PROCEDURE p1()
+BEGIN
+ SET GLOBAL max_allowed_packet=16000000, max_error_count=60;
+ SELECT @@GLOBAL.max_allowed_packet, @@GLOBAL.max_error_count;
+END;
+$$
+DELIMITER ;$$
+SHOW PROCEDURE CODE p1;
+DROP PROCEDURE p1;
diff --git a/mysql-test/main/sp-error.result b/mysql-test/main/sp-error.result
index 1fe5bd6b77b..f64735f8006 100644
--- a/mysql-test/main/sp-error.result
+++ b/mysql-test/main/sp-error.result
@@ -443,9 +443,7 @@ create procedure nodb.bug3339() begin end|
ERROR 42000: Unknown database 'nodb'
create procedure bug2653_1(a int, out b int)
set b = aa|
-call bug2653_1(1, @b)|
-ERROR 42S22: Unknown column 'aa' in 'field list'
-drop procedure bug2653_1|
+ERROR 42000: Undeclared variable: aa
create procedure bug2653_2(a int, out b int)
begin
if aa < 0 then
@@ -1205,9 +1203,7 @@ set selectstr = concat(selectstr,
c.operatorid,
'in (',conditionstr, ')');
end|
-call bug15091();
-ERROR 42S02: Unknown table 'c' in field list
-drop procedure bug15091;
+ERROR 42000: Undeclared variable: c
drop function if exists bug16896;
create aggregate function bug16896() returns int return 1;
ERROR HY000: Aggregate specific instruction(FETCH GROUP NEXT ROW) missing from the aggregate function
@@ -2246,7 +2242,7 @@ H2
Warnings:
Warning 1642 Unhandled user-defined warning condition
-# -- Check that handlers are choosen properly in case of deep stack and
+# -- Check that handlers are chosen properly in case of deep stack and
# -- nested SQL-blocks.
CREATE PROCEDURE p10()
diff --git a/mysql-test/main/sp-error.test b/mysql-test/main/sp-error.test
index 45a54fddad4..d2af9834823 100644
--- a/mysql-test/main/sp-error.test
+++ b/mysql-test/main/sp-error.test
@@ -607,13 +607,10 @@ create procedure nodb.bug3339() begin end|
#
# BUG#2653
#
+--error ER_SP_UNDECLARED_VAR
create procedure bug2653_1(a int, out b int)
set b = aa|
---error ER_BAD_FIELD_ERROR
-call bug2653_1(1, @b)|
-
-drop procedure bug2653_1|
--error ER_SP_UNDECLARED_VAR
create procedure bug2653_2(a int, out b int)
@@ -1714,6 +1711,7 @@ drop procedure if exists bug15091;
--enable_warnings
delimiter |;
+--error ER_SP_UNDECLARED_VAR
create procedure bug15091()
begin
declare selectstr varchar(6000) default ' ';
@@ -1726,15 +1724,6 @@ begin
end|
delimiter ;|
-# The error message used to be:
-# ERROR 1109 (42S02): Unknown table 'c' in order clause
-# but is now rephrased to something less misleading:
-# ERROR 1109 (42S02): Unknown table 'c' in field list
---error ER_UNKNOWN_TABLE
-call bug15091();
-
-drop procedure bug15091;
-
#
# BUG#16896: Stored function: unused AGGREGATE-clause in CREATE FUNCTION
@@ -3173,7 +3162,7 @@ END|
CALL p9()|
--echo
---echo # -- Check that handlers are choosen properly in case of deep stack and
+--echo # -- Check that handlers are chosen properly in case of deep stack and
--echo # -- nested SQL-blocks.
--echo
diff --git a/mysql-test/main/sp-row.result b/mysql-test/main/sp-row.result
index 4b87798e0bb..7c257297934 100644
--- a/mysql-test/main/sp-row.result
+++ b/mysql-test/main/sp-row.result
@@ -189,7 +189,7 @@ SELECT a+1;
END;
$$
CALL p1();
-ERROR 21000: Operand should contain 1 column(s)
+ERROR HY000: Illegal parameter data types row and int for operation '+'
DROP PROCEDURE p1;
CREATE PROCEDURE p1()
BEGIN
@@ -198,7 +198,7 @@ SELECT a+1;
END;
$$
CALL p1();
-ERROR 21000: Operand should contain 1 column(s)
+ERROR HY000: Illegal parameter data types row and int for operation '+'
DROP PROCEDURE p1;
#
# Comparing the entire ROW to a scalar value
diff --git a/mysql-test/main/sp-row.test b/mysql-test/main/sp-row.test
index 3352c940cb6..b9143b1113b 100644
--- a/mysql-test/main/sp-row.test
+++ b/mysql-test/main/sp-row.test
@@ -244,7 +244,7 @@ BEGIN
END;
$$
DELIMITER ;$$
---error ER_OPERAND_COLUMNS
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
CALL p1();
DROP PROCEDURE p1;
@@ -257,7 +257,7 @@ BEGIN
END;
$$
DELIMITER ;$$
---error ER_OPERAND_COLUMNS
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
CALL p1();
DROP PROCEDURE p1;
diff --git a/mysql-test/main/sp-security.result b/mysql-test/main/sp-security.result
index 5050955c806..2c48883a509 100644
--- a/mysql-test/main/sp-security.result
+++ b/mysql-test/main/sp-security.result
@@ -417,7 +417,7 @@ CREATE DATABASE mysqltest;
CREATE USER mysqltest_1@localhost;
GRANT ALL PRIVILEGES ON mysqltest.* TO mysqltest_1@localhost;
CREATE USER mysqltest_2@localhost;
-GRANT SUPER ON *.* TO mysqltest_2@localhost;
+GRANT SET USER ON *.* TO mysqltest_2@localhost;
GRANT ALL PRIVILEGES ON mysqltest.* TO mysqltest_2@localhost;
connect mysqltest_2_con,localhost,mysqltest_2,,mysqltest;
connect mysqltest_1_con,localhost,mysqltest_1,,mysqltest;
@@ -428,9 +428,9 @@ CREATE FUNCTION wl2897_f1() RETURNS INT RETURN 1;
connection mysqltest_1_con;
USE mysqltest;
CREATE DEFINER=root@localhost PROCEDURE wl2897_p2() SELECT 2;
-ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
+ERROR 42000: Access denied; you need (at least one of) the SUPER, SET USER privilege(s) for this operation
CREATE DEFINER=root@localhost FUNCTION wl2897_f2() RETURNS INT RETURN 2;
-ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
+ERROR 42000: Access denied; you need (at least one of) the SUPER, SET USER privilege(s) for this operation
connection mysqltest_2_con;
use mysqltest;
CREATE DEFINER='a @ b @ c'@localhost PROCEDURE wl2897_p3() SELECT 3;
@@ -802,3 +802,21 @@ connection default;
DROP DATABASE u1;
DROP USER u1@localhost;
set @@global.character_set_server=@save_character_set_server;
+#
+# Start of 10.5 tests
+#
+#
+# MDEV-20366 Server crashes in get_current_user upon SET PASSWORD via SP
+#
+CREATE PROCEDURE p1() SET PASSWORD FOR foo@localhost=PASSWORD('x');
+CALL p1();
+ERROR 28000: Can't find any matching row in the user table
+DROP PROCEDURE p1;
+CREATE USER foo@localhost;
+CREATE PROCEDURE p1() SET PASSWORD FOR foo@localhost=PASSWORD('x');
+CALL p1();
+DROP PROCEDURE p1;
+DROP USER foo@localhost;
+#
+# End of 10.5 tests
+#
diff --git a/mysql-test/main/sp-security.test b/mysql-test/main/sp-security.test
index acc05cafa21..e7790bf703a 100644
--- a/mysql-test/main/sp-security.test
+++ b/mysql-test/main/sp-security.test
@@ -594,7 +594,7 @@ CREATE USER mysqltest_1@localhost;
GRANT ALL PRIVILEGES ON mysqltest.* TO mysqltest_1@localhost;
CREATE USER mysqltest_2@localhost;
-GRANT SUPER ON *.* TO mysqltest_2@localhost;
+GRANT SET USER ON *.* TO mysqltest_2@localhost;
GRANT ALL PRIVILEGES ON mysqltest.* TO mysqltest_2@localhost;
--connect (mysqltest_2_con,localhost,mysqltest_2,,mysqltest)
@@ -1078,3 +1078,30 @@ DROP DATABASE u1;
DROP USER u1@localhost;
set @@global.character_set_server=@save_character_set_server;
+
+
+--echo #
+--echo # Start of 10.5 tests
+--echo #
+
+--echo #
+--echo # MDEV-20366 Server crashes in get_current_user upon SET PASSWORD via SP
+--echo #
+
+# Testing without the user
+CREATE PROCEDURE p1() SET PASSWORD FOR foo@localhost=PASSWORD('x');
+--error ER_PASSWORD_NO_MATCH
+CALL p1();
+DROP PROCEDURE p1;
+
+# Testing with the user
+CREATE USER foo@localhost;
+CREATE PROCEDURE p1() SET PASSWORD FOR foo@localhost=PASSWORD('x');
+CALL p1();
+DROP PROCEDURE p1;
+DROP USER foo@localhost;
+
+
+--echo #
+--echo # End of 10.5 tests
+--echo #
diff --git a/mysql-test/main/sp-vars.result b/mysql-test/main/sp-vars.result
index 236695a6c0f..4952746c4e0 100644
--- a/mysql-test/main/sp-vars.result
+++ b/mysql-test/main/sp-vars.result
@@ -1310,3 +1310,406 @@ t1 CREATE TABLE "t1" (
"var" char(1) DEFAULT NULL
)
DROP TABLE t1;
+#
+# MDEV-14347 CREATE PROCEDURE returns no error when using an unknown variable
+#
+#
+# Simple cases (without subqueries) - the most typical problem:
+# a typo in an SP variable name
+#
+CREATE PROCEDURE p1(a INT)
+BEGIN
+DECLARE res INT DEFAULT 0;
+IF (a < 0) THEN
+SET res= a_long_variable_name_with_a_typo;
+END IF;
+END;
+$$
+ERROR 42000: Undeclared variable: a_long_variable_name_with_a_typo
+CREATE PROCEDURE p1(a INT)
+BEGIN
+DECLARE res INT DEFAULT 0;
+IF (a < 0) THEN
+SET res= 1 + a_long_variable_name_with_a_typo;
+END IF;
+END;
+$$
+ERROR 42000: Undeclared variable: a_long_variable_name_with_a_typo
+#
+# Complex cases with subqueries
+#
+#
+# Maybe a table field identifier (there are some tables) - no error
+#
+CREATE PROCEDURE p1()
+BEGIN
+DECLARE res INT DEFAULT 0;
+SET res=(SELECT * FROM t1 LEFT OUTER JOIN t2 USING (c1));
+END;
+$$
+DROP PROCEDURE p1;
+CREATE PROCEDURE p1()
+BEGIN
+DECLARE res INT DEFAULT 0;
+SET res=(SELECT * FROM t1 LEFT OUTER JOIN t2 ON (c1=c2));
+END;
+$$
+DROP PROCEDURE p1;
+#
+# One unknown identifier, no tables
+#
+CREATE PROCEDURE p1()
+BEGIN
+DECLARE a INT;
+SET a=unknown_ident;
+END;
+$$
+ERROR 42000: Undeclared variable: unknown_ident
+CREATE PROCEDURE p1()
+BEGIN
+DECLARE a INT;
+SET a=unknown_ident1.unknown_ident2;
+END;
+$$
+ERROR 42000: Undeclared variable: unknown_ident1
+CREATE PROCEDURE p1()
+BEGIN
+DECLARE a INT;
+SET a=unknown_ident1.unknown_ident2.unknown_ident3;
+END;
+$$
+ERROR 42000: Undeclared variable: unknown_ident1
+CREATE PROCEDURE p1()
+BEGIN
+DECLARE a INT;
+SET a=(SELECT unknown_ident);
+END;
+$$
+ERROR 42000: Undeclared variable: unknown_ident
+CREATE PROCEDURE p1()
+BEGIN
+DECLARE a INT;
+SET a=(SELECT unknown_ident FROM dual);
+END;
+$$
+ERROR 42000: Undeclared variable: unknown_ident
+CREATE PROCEDURE p1()
+BEGIN
+DECLARE a INT;
+SET a=(SELECT (SELECT unknown_ident));
+END;
+$$
+ERROR 42000: Undeclared variable: unknown_ident
+CREATE PROCEDURE p1()
+BEGIN
+DECLARE a INT;
+SET a=(SELECT (SELECT unknown_ident FROM dual));
+END;
+$$
+ERROR 42000: Undeclared variable: unknown_ident
+CREATE PROCEDURE p1()
+BEGIN
+DECLARE a INT;
+SET a=(SELECT 1 WHERE unknown_ident);
+END;
+$$
+ERROR 42000: Undeclared variable: unknown_ident
+CREATE PROCEDURE p1()
+BEGIN
+DECLARE a INT;
+SET a=(SELECT 1 WHERE unknown_ident=1);
+END;
+$$
+ERROR 42000: Undeclared variable: unknown_ident
+CREATE PROCEDURE p1()
+BEGIN
+DECLARE a INT;
+SET a=(SELECT 1 LIMIT unknown_ident);
+END;
+$$
+ERROR 42000: Undeclared variable: unknown_ident
+#
+# GROUP, HAVING, ORDER are not tested yet for unknown identifiers
+#
+CREATE PROCEDURE p1()
+BEGIN
+DECLARE a INT;
+SET a=(SELECT 1 GROUP BY unknown_ident);
+END;
+$$
+DROP PROCEDURE p1;
+CREATE PROCEDURE p1()
+BEGIN
+DECLARE res INT DEFAULT 0;
+SET res=(SELECT 1 HAVING unknown_ident);
+END;
+$$
+DROP PROCEDURE p1;
+CREATE PROCEDURE p1()
+BEGIN
+DECLARE a INT;
+SET a=(SELECT 1 ORDER BY unknown_ident);
+END;
+$$
+DROP PROCEDURE p1;
+#
+# HAVING + aggregate_function(unknown_identifier) is a special case
+#
+CREATE PROCEDURE p1()
+BEGIN
+DECLARE res INT DEFAULT 0;
+SET res=(SELECT 1 HAVING SUM(unknown_ident));
+END;
+$$
+ERROR 42000: Undeclared variable: unknown_ident
+#
+# Known indentifier + unknown identifier, no tables
+#
+CREATE PROCEDURE p1()
+BEGIN
+DECLARE a INT;
+SET a=a+unknown_ident;
+END;
+$$
+ERROR 42000: Undeclared variable: unknown_ident
+CREATE PROCEDURE p1()
+BEGIN
+DECLARE a INT;
+SET a=a+(SELECT unknown_ident);
+END;
+$$
+ERROR 42000: Undeclared variable: unknown_ident
+CREATE PROCEDURE p1()
+BEGIN
+DECLARE a INT;
+SET a=a+(SELECT unknown_ident FROM dual);
+END;
+$$
+ERROR 42000: Undeclared variable: unknown_ident
+CREATE PROCEDURE p1()
+BEGIN
+DECLARE a INT;
+SET a=(SELECT (a+(SELECT unknown_ident)));
+END;
+$$
+ERROR 42000: Undeclared variable: unknown_ident
+CREATE PROCEDURE p1()
+BEGIN
+DECLARE a INT;
+SET a=(SELECT (a+(SELECT unknown_ident FROM dual)));
+END;
+$$
+ERROR 42000: Undeclared variable: unknown_ident
+#
+# Unknown indentifier + known identifier, no tables
+#
+CREATE PROCEDURE p1()
+BEGIN
+DECLARE a INT;
+SET a=unknown_ident+a;
+END;
+$$
+ERROR 42000: Undeclared variable: unknown_ident
+CREATE PROCEDURE p1()
+BEGIN
+DECLARE a INT;
+SET a=(SELECT unknown_ident)+a;
+END;
+$$
+ERROR 42000: Undeclared variable: unknown_ident
+CREATE PROCEDURE p1()
+BEGIN
+DECLARE a INT;
+SET a=(SELECT unknown_ident FROM dual)+a;
+END;
+$$
+ERROR 42000: Undeclared variable: unknown_ident
+CREATE PROCEDURE p1()
+BEGIN
+DECLARE a INT;
+SET a=(SELECT (SELECT unknown_ident)+a);
+END;
+$$
+ERROR 42000: Undeclared variable: unknown_ident
+CREATE PROCEDURE p1()
+BEGIN
+DECLARE a INT;
+SET a=(SELECT (SELECT unknown_ident FROM dual)+a);
+END;
+$$
+ERROR 42000: Undeclared variable: unknown_ident
+#
+# Maybe a table field indentifier + unknown identifier
+#
+CREATE PROCEDURE p1()
+BEGIN
+DECLARE a INT;
+SET a=(SELECT c1 FROM t1)+unknown_ident;
+END;
+$$
+ERROR 42000: Undeclared variable: unknown_ident
+CREATE PROCEDURE p1()
+BEGIN
+DECLARE a INT;
+SET a=(SELECT c1 FROM t1)+(SELECT unknown_ident);
+END;
+$$
+ERROR 42000: Undeclared variable: unknown_ident
+CREATE PROCEDURE p1()
+BEGIN
+DECLARE a INT;
+SET a=(SELECT c1 FROM t1)+(SELECT unknown_ident FROM dual);
+END;
+$$
+ERROR 42000: Undeclared variable: unknown_ident
+CREATE PROCEDURE p1()
+BEGIN
+DECLARE a INT;
+SET a=(SELECT ((SELECT c1 FROM t1)+(SELECT unknown_ident)));
+END;
+$$
+ERROR 42000: Undeclared variable: unknown_ident
+CREATE PROCEDURE p1()
+BEGIN
+DECLARE a INT;
+SET a=(SELECT ((SELECT c1 FROM t1)+(SELECT unknown_ident FROM dual)));
+END;
+$$
+ERROR 42000: Undeclared variable: unknown_ident
+#
+# Unknown indentifier + maybe a table field identifier
+#
+CREATE PROCEDURE p1()
+BEGIN
+DECLARE a INT;
+SET a=unknown_ident+(SELECT c1 FROM t1);
+END;
+$$
+ERROR 42000: Undeclared variable: unknown_ident
+CREATE PROCEDURE p1()
+BEGIN
+DECLARE a INT;
+SET a=(SELECT unknown_ident)+(SELECT c1 FROM t1);
+END;
+$$
+ERROR 42000: Undeclared variable: unknown_ident
+CREATE PROCEDURE p1()
+BEGIN
+DECLARE a INT;
+SET a=(SELECT unknown_ident FROM dual)+(SELECT c1 FROM t1);
+END;
+$$
+ERROR 42000: Undeclared variable: unknown_ident
+CREATE PROCEDURE p1()
+BEGIN
+DECLARE a INT;
+SET a=(SELECT (SELECT unknown_ident)+(SELECT c1 FROM t1));
+END;
+$$
+ERROR 42000: Undeclared variable: unknown_ident
+CREATE PROCEDURE p1()
+BEGIN
+DECLARE a INT;
+SET a=(SELECT (SELECT unknown_ident FROM dual)+(SELECT c1 FROM t1));
+END;
+$$
+ERROR 42000: Undeclared variable: unknown_ident
+#
+# Maybe a table field identifier + maybe a field table identifier
+#
+CREATE PROCEDURE p1()
+BEGIN
+DECLARE a INT;
+-- c2 does not have a table on its level
+-- but it can be a field of a table on the uppder level, i.e. t1
+SET a=(SELECT c1+(SELECT c2) FROM t1);
+END;
+$$
+DROP PROCEDURE p1;
+#
+# TVC - unknown identifier
+#
+CREATE PROCEDURE p1(a INT)
+BEGIN
+DECLARE res INT DEFAULT 0;
+SET res=(VALUES(unknown_ident));
+END;
+$$
+ERROR 42000: Undeclared variable: unknown_ident
+CREATE PROCEDURE p1(a INT)
+BEGIN
+DECLARE res INT DEFAULT 0;
+SET res=(VALUES(1),(unknown_ident));
+END;
+$$
+ERROR 42000: Undeclared variable: unknown_ident
+CREATE PROCEDURE p1(a INT)
+BEGIN
+DECLARE res INT DEFAULT 0;
+SET res=(VALUES((SELECT unknown_ident)));
+END;
+$$
+ERROR 42000: Undeclared variable: unknown_ident
+CREATE PROCEDURE p1(a INT)
+BEGIN
+DECLARE res INT DEFAULT 0;
+SET res=(VALUES(1),((SELECT unknown_ident)));
+END;
+$$
+ERROR 42000: Undeclared variable: unknown_ident
+CREATE PROCEDURE p1(a INT)
+BEGIN
+DECLARE res INT DEFAULT 0;
+SET res=(VALUES(1) LIMIT unknown_ident);
+END;
+$$
+ERROR 42000: Undeclared variable: unknown_ident
+#
+# TVC - ORDER BY - not tested yet for unknown identifiers
+#
+CREATE PROCEDURE p1(a INT)
+BEGIN
+DECLARE res INT DEFAULT 0;
+SET res=(VALUES(1) ORDER BY unknown_ident);
+END;
+$$
+DROP PROCEDURE p1;
+#
+# TVC - maybe a table field identifier - no error
+#
+CREATE PROCEDURE p1(a INT)
+BEGIN
+DECLARE res INT DEFAULT 0;
+SET res=(VALUES((SELECT c1 FROM t1)));
+END;
+$$
+DROP PROCEDURE p1;
+CREATE PROCEDURE p1(a INT)
+BEGIN
+DECLARE res INT DEFAULT 0;
+SET res=(VALUES(1),((SELECT c1 FROM t1)));
+END;
+$$
+DROP PROCEDURE p1;
+#
+# Functions DEFAULT(x) and VALUE(x)
+#
+CREATE PROCEDURE p1()
+BEGIN
+DECLARE res INT DEFAULT 0;
+SET res=DEFAULT(unknown_ident);
+SELECT res;
+END;
+$$
+ERROR 42000: Undeclared variable: unknown_ident
+CREATE PROCEDURE p1()
+BEGIN
+DECLARE res INT DEFAULT 0;
+SET res=VALUE(unknown_ident);
+SELECT res;
+END;
+$$
+ERROR 42000: Undeclared variable: unknown_ident
+#
+# End of MDEV-14347 CREATE PROCEDURE returns no error when using an unknown variable
+#
diff --git a/mysql-test/main/sp-vars.test b/mysql-test/main/sp-vars.test
index ba8cd4f5ca8..9edf245acbe 100644
--- a/mysql-test/main/sp-vars.test
+++ b/mysql-test/main/sp-vars.test
@@ -1603,3 +1603,594 @@ $$
DELIMITER ;$$
SHOW CREATE TABLE t1;
DROP TABLE t1;
+
+
+
+--echo #
+--echo # MDEV-14347 CREATE PROCEDURE returns no error when using an unknown variable
+--echo #
+
+--echo #
+--echo # Simple cases (without subqueries) - the most typical problem:
+--echo # a typo in an SP variable name
+--echo #
+
+DELIMITER $$;
+--error ER_SP_UNDECLARED_VAR
+CREATE PROCEDURE p1(a INT)
+BEGIN
+ DECLARE res INT DEFAULT 0;
+ IF (a < 0) THEN
+ SET res= a_long_variable_name_with_a_typo;
+ END IF;
+END;
+$$
+DELIMITER ;$$
+
+DELIMITER $$;
+--error ER_SP_UNDECLARED_VAR
+CREATE PROCEDURE p1(a INT)
+BEGIN
+ DECLARE res INT DEFAULT 0;
+ IF (a < 0) THEN
+ SET res= 1 + a_long_variable_name_with_a_typo;
+ END IF;
+END;
+$$
+DELIMITER ;$$
+
+
+--echo #
+--echo # Complex cases with subqueries
+--echo #
+
+--echo #
+--echo # Maybe a table field identifier (there are some tables) - no error
+--echo #
+
+DELIMITER $$;
+CREATE PROCEDURE p1()
+BEGIN
+ DECLARE res INT DEFAULT 0;
+ SET res=(SELECT * FROM t1 LEFT OUTER JOIN t2 USING (c1));
+END;
+$$
+DELIMITER ;$$
+DROP PROCEDURE p1;
+
+DELIMITER $$;
+CREATE PROCEDURE p1()
+BEGIN
+ DECLARE res INT DEFAULT 0;
+ SET res=(SELECT * FROM t1 LEFT OUTER JOIN t2 ON (c1=c2));
+END;
+$$
+DELIMITER ;$$
+DROP PROCEDURE p1;
+
+
+--echo #
+--echo # One unknown identifier, no tables
+--echo #
+
+DELIMITER $$;
+--error ER_SP_UNDECLARED_VAR
+CREATE PROCEDURE p1()
+BEGIN
+ DECLARE a INT;
+ SET a=unknown_ident;
+END;
+$$
+DELIMITER ;$$
+
+DELIMITER $$;
+--error ER_SP_UNDECLARED_VAR
+CREATE PROCEDURE p1()
+BEGIN
+ DECLARE a INT;
+ SET a=unknown_ident1.unknown_ident2;
+END;
+$$
+DELIMITER ;$$
+
+DELIMITER $$;
+--error ER_SP_UNDECLARED_VAR
+CREATE PROCEDURE p1()
+BEGIN
+ DECLARE a INT;
+ SET a=unknown_ident1.unknown_ident2.unknown_ident3;
+END;
+$$
+DELIMITER ;$$
+
+
+DELIMITER $$;
+--error ER_SP_UNDECLARED_VAR
+CREATE PROCEDURE p1()
+BEGIN
+ DECLARE a INT;
+ SET a=(SELECT unknown_ident);
+END;
+$$
+DELIMITER ;$$
+
+DELIMITER $$;
+--error ER_SP_UNDECLARED_VAR
+CREATE PROCEDURE p1()
+BEGIN
+ DECLARE a INT;
+ SET a=(SELECT unknown_ident FROM dual);
+END;
+$$
+DELIMITER ;$$
+
+
+DELIMITER $$;
+--error ER_SP_UNDECLARED_VAR
+CREATE PROCEDURE p1()
+BEGIN
+ DECLARE a INT;
+ SET a=(SELECT (SELECT unknown_ident));
+END;
+$$
+DELIMITER ;$$
+
+DELIMITER $$;
+--error ER_SP_UNDECLARED_VAR
+CREATE PROCEDURE p1()
+BEGIN
+ DECLARE a INT;
+ SET a=(SELECT (SELECT unknown_ident FROM dual));
+END;
+$$
+DELIMITER ;$$
+
+DELIMITER $$;
+--error ER_SP_UNDECLARED_VAR
+CREATE PROCEDURE p1()
+BEGIN
+ DECLARE a INT;
+ SET a=(SELECT 1 WHERE unknown_ident);
+END;
+$$
+DELIMITER ;$$
+
+DELIMITER $$;
+--error ER_SP_UNDECLARED_VAR
+CREATE PROCEDURE p1()
+BEGIN
+ DECLARE a INT;
+ SET a=(SELECT 1 WHERE unknown_ident=1);
+END;
+$$
+DELIMITER ;$$
+
+DELIMITER $$;
+--error ER_SP_UNDECLARED_VAR
+CREATE PROCEDURE p1()
+BEGIN
+ DECLARE a INT;
+ SET a=(SELECT 1 LIMIT unknown_ident);
+END;
+$$
+DELIMITER ;$$
+
+
+--echo #
+--echo # GROUP, HAVING, ORDER are not tested yet for unknown identifiers
+--echo #
+
+DELIMITER $$;
+CREATE PROCEDURE p1()
+BEGIN
+ DECLARE a INT;
+ SET a=(SELECT 1 GROUP BY unknown_ident);
+END;
+$$
+DELIMITER ;$$
+DROP PROCEDURE p1;
+
+
+DELIMITER $$;
+CREATE PROCEDURE p1()
+BEGIN
+ DECLARE res INT DEFAULT 0;
+ SET res=(SELECT 1 HAVING unknown_ident);
+END;
+$$
+DELIMITER ;$$
+DROP PROCEDURE p1;
+
+
+DELIMITER $$;
+CREATE PROCEDURE p1()
+BEGIN
+ DECLARE a INT;
+ SET a=(SELECT 1 ORDER BY unknown_ident);
+END;
+$$
+DELIMITER ;$$
+DROP PROCEDURE p1;
+
+
+--echo #
+--echo # HAVING + aggregate_function(unknown_identifier) is a special case
+--echo #
+
+DELIMITER $$;
+--error ER_SP_UNDECLARED_VAR
+CREATE PROCEDURE p1()
+BEGIN
+ DECLARE res INT DEFAULT 0;
+ SET res=(SELECT 1 HAVING SUM(unknown_ident));
+END;
+$$
+DELIMITER ;$$
+
+
+--echo #
+--echo # Known indentifier + unknown identifier, no tables
+--echo #
+
+DELIMITER $$;
+--error ER_SP_UNDECLARED_VAR
+CREATE PROCEDURE p1()
+BEGIN
+ DECLARE a INT;
+ SET a=a+unknown_ident;
+END;
+$$
+DELIMITER ;$$
+
+DELIMITER $$;
+--error ER_SP_UNDECLARED_VAR
+CREATE PROCEDURE p1()
+BEGIN
+ DECLARE a INT;
+ SET a=a+(SELECT unknown_ident);
+END;
+$$
+DELIMITER ;$$
+
+DELIMITER $$;
+--error ER_SP_UNDECLARED_VAR
+CREATE PROCEDURE p1()
+BEGIN
+ DECLARE a INT;
+ SET a=a+(SELECT unknown_ident FROM dual);
+END;
+$$
+DELIMITER ;$$
+
+
+DELIMITER $$;
+--error ER_SP_UNDECLARED_VAR
+CREATE PROCEDURE p1()
+BEGIN
+ DECLARE a INT;
+ SET a=(SELECT (a+(SELECT unknown_ident)));
+END;
+$$
+DELIMITER ;$$
+
+
+DELIMITER $$;
+--error ER_SP_UNDECLARED_VAR
+CREATE PROCEDURE p1()
+BEGIN
+ DECLARE a INT;
+ SET a=(SELECT (a+(SELECT unknown_ident FROM dual)));
+END;
+$$
+DELIMITER ;$$
+
+
+--echo #
+--echo # Unknown indentifier + known identifier, no tables
+--echo #
+
+DELIMITER $$;
+--error ER_SP_UNDECLARED_VAR
+CREATE PROCEDURE p1()
+BEGIN
+ DECLARE a INT;
+ SET a=unknown_ident+a;
+END;
+$$
+DELIMITER ;$$
+
+DELIMITER $$;
+--error ER_SP_UNDECLARED_VAR
+CREATE PROCEDURE p1()
+BEGIN
+ DECLARE a INT;
+ SET a=(SELECT unknown_ident)+a;
+END;
+$$
+DELIMITER ;$$
+
+DELIMITER $$;
+--error ER_SP_UNDECLARED_VAR
+CREATE PROCEDURE p1()
+BEGIN
+ DECLARE a INT;
+ SET a=(SELECT unknown_ident FROM dual)+a;
+END;
+$$
+DELIMITER ;$$
+
+DELIMITER $$;
+--error ER_SP_UNDECLARED_VAR
+CREATE PROCEDURE p1()
+BEGIN
+ DECLARE a INT;
+ SET a=(SELECT (SELECT unknown_ident)+a);
+END;
+$$
+DELIMITER ;$$
+
+DELIMITER $$;
+--error ER_SP_UNDECLARED_VAR
+CREATE PROCEDURE p1()
+BEGIN
+ DECLARE a INT;
+ SET a=(SELECT (SELECT unknown_ident FROM dual)+a);
+END;
+$$
+DELIMITER ;$$
+
+
+--echo #
+--echo # Maybe a table field indentifier + unknown identifier
+--echo #
+
+DELIMITER $$;
+--error ER_SP_UNDECLARED_VAR
+CREATE PROCEDURE p1()
+BEGIN
+ DECLARE a INT;
+ SET a=(SELECT c1 FROM t1)+unknown_ident;
+END;
+$$
+DELIMITER ;$$
+
+DELIMITER $$;
+--error ER_SP_UNDECLARED_VAR
+CREATE PROCEDURE p1()
+BEGIN
+ DECLARE a INT;
+ SET a=(SELECT c1 FROM t1)+(SELECT unknown_ident);
+END;
+$$
+DELIMITER ;$$
+
+DELIMITER $$;
+--error ER_SP_UNDECLARED_VAR
+CREATE PROCEDURE p1()
+BEGIN
+ DECLARE a INT;
+ SET a=(SELECT c1 FROM t1)+(SELECT unknown_ident FROM dual);
+END;
+$$
+DELIMITER ;$$
+
+
+DELIMITER $$;
+--error ER_SP_UNDECLARED_VAR
+CREATE PROCEDURE p1()
+BEGIN
+ DECLARE a INT;
+ SET a=(SELECT ((SELECT c1 FROM t1)+(SELECT unknown_ident)));
+END;
+$$
+DELIMITER ;$$
+
+DELIMITER $$;
+--error ER_SP_UNDECLARED_VAR
+CREATE PROCEDURE p1()
+BEGIN
+ DECLARE a INT;
+ SET a=(SELECT ((SELECT c1 FROM t1)+(SELECT unknown_ident FROM dual)));
+END;
+$$
+DELIMITER ;$$
+
+
+--echo #
+--echo # Unknown indentifier + maybe a table field identifier
+--echo #
+
+DELIMITER $$;
+--error ER_SP_UNDECLARED_VAR
+CREATE PROCEDURE p1()
+BEGIN
+ DECLARE a INT;
+ SET a=unknown_ident+(SELECT c1 FROM t1);
+END;
+$$
+DELIMITER ;$$
+
+DELIMITER $$;
+--error ER_SP_UNDECLARED_VAR
+CREATE PROCEDURE p1()
+BEGIN
+ DECLARE a INT;
+ SET a=(SELECT unknown_ident)+(SELECT c1 FROM t1);
+END;
+$$
+DELIMITER ;$$
+
+DELIMITER $$;
+--error ER_SP_UNDECLARED_VAR
+CREATE PROCEDURE p1()
+BEGIN
+ DECLARE a INT;
+ SET a=(SELECT unknown_ident FROM dual)+(SELECT c1 FROM t1);
+END;
+$$
+DELIMITER ;$$
+
+DELIMITER $$;
+--error ER_SP_UNDECLARED_VAR
+CREATE PROCEDURE p1()
+BEGIN
+ DECLARE a INT;
+ SET a=(SELECT (SELECT unknown_ident)+(SELECT c1 FROM t1));
+END;
+$$
+DELIMITER ;$$
+
+DELIMITER $$;
+--error ER_SP_UNDECLARED_VAR
+CREATE PROCEDURE p1()
+BEGIN
+ DECLARE a INT;
+ SET a=(SELECT (SELECT unknown_ident FROM dual)+(SELECT c1 FROM t1));
+END;
+$$
+DELIMITER ;$$
+
+
+--echo #
+--echo # Maybe a table field identifier + maybe a field table identifier
+--echo #
+
+DELIMITER $$;
+CREATE PROCEDURE p1()
+BEGIN
+ DECLARE a INT;
+ -- c2 does not have a table on its level
+ -- but it can be a field of a table on the uppder level, i.e. t1
+ SET a=(SELECT c1+(SELECT c2) FROM t1);
+END;
+$$
+DELIMITER ;$$
+DROP PROCEDURE p1;
+
+
+--echo #
+--echo # TVC - unknown identifier
+--echo #
+
+DELIMITER $$;
+--error ER_SP_UNDECLARED_VAR
+CREATE PROCEDURE p1(a INT)
+BEGIN
+ DECLARE res INT DEFAULT 0;
+ SET res=(VALUES(unknown_ident));
+END;
+$$
+DELIMITER ;$$
+
+DELIMITER $$;
+--error ER_SP_UNDECLARED_VAR
+CREATE PROCEDURE p1(a INT)
+BEGIN
+ DECLARE res INT DEFAULT 0;
+ SET res=(VALUES(1),(unknown_ident));
+END;
+$$
+DELIMITER ;$$
+
+DELIMITER $$;
+--error ER_SP_UNDECLARED_VAR
+CREATE PROCEDURE p1(a INT)
+BEGIN
+ DECLARE res INT DEFAULT 0;
+ SET res=(VALUES((SELECT unknown_ident)));
+END;
+$$
+DELIMITER ;$$
+
+DELIMITER $$;
+--error ER_SP_UNDECLARED_VAR
+CREATE PROCEDURE p1(a INT)
+BEGIN
+ DECLARE res INT DEFAULT 0;
+ SET res=(VALUES(1),((SELECT unknown_ident)));
+END;
+$$
+DELIMITER ;$$
+
+
+DELIMITER $$;
+--error ER_SP_UNDECLARED_VAR
+CREATE PROCEDURE p1(a INT)
+BEGIN
+ DECLARE res INT DEFAULT 0;
+ SET res=(VALUES(1) LIMIT unknown_ident);
+END;
+$$
+DELIMITER ;$$
+
+
+--echo #
+--echo # TVC - ORDER BY - not tested yet for unknown identifiers
+--echo #
+
+DELIMITER $$;
+CREATE PROCEDURE p1(a INT)
+BEGIN
+ DECLARE res INT DEFAULT 0;
+ SET res=(VALUES(1) ORDER BY unknown_ident);
+END;
+$$
+DELIMITER ;$$
+DROP PROCEDURE p1;
+
+
+--echo #
+--echo # TVC - maybe a table field identifier - no error
+--echo #
+
+DELIMITER $$;
+CREATE PROCEDURE p1(a INT)
+BEGIN
+ DECLARE res INT DEFAULT 0;
+ SET res=(VALUES((SELECT c1 FROM t1)));
+END;
+$$
+DELIMITER ;$$
+DROP PROCEDURE p1;
+
+DELIMITER $$;
+CREATE PROCEDURE p1(a INT)
+BEGIN
+ DECLARE res INT DEFAULT 0;
+ SET res=(VALUES(1),((SELECT c1 FROM t1)));
+END;
+$$
+DELIMITER ;$$
+DROP PROCEDURE p1;
+
+
+--echo #
+--echo # Functions DEFAULT(x) and VALUE(x)
+--echo #
+
+DELIMITER $$;
+--error ER_SP_UNDECLARED_VAR
+CREATE PROCEDURE p1()
+BEGIN
+ DECLARE res INT DEFAULT 0;
+ SET res=DEFAULT(unknown_ident);
+ SELECT res;
+END;
+$$
+DELIMITER ;$$
+
+DELIMITER $$;
+--error ER_SP_UNDECLARED_VAR
+CREATE PROCEDURE p1()
+BEGIN
+ DECLARE res INT DEFAULT 0;
+ SET res=VALUE(unknown_ident);
+ SELECT res;
+END;
+$$
+DELIMITER ;$$
+
+
+--echo #
+--echo # End of MDEV-14347 CREATE PROCEDURE returns no error when using an unknown variable
+--echo #
diff --git a/mysql-test/main/sp.result b/mysql-test/main/sp.result
index 35ec5fc628f..6c0dd6d4c8a 100644
--- a/mysql-test/main/sp.result
+++ b/mysql-test/main/sp.result
@@ -3220,9 +3220,7 @@ Warnings:
Note 4092 Unknown VIEW: 'test.tv'
DROP TABLE IF EXISTS tt1,tt2,tt3|
Warnings:
-Note 1051 Unknown table 'test.tt1'
-Note 1051 Unknown table 'test.tt2'
-Note 1051 Unknown table 'test.tt3'
+Note 1051 Unknown table 'test.tt1,test.tt2,test.tt3'
CREATE TABLE tt1 (a1 int, a2 int, a3 int, data varchar(10))|
CREATE TABLE tt2 (a2 int, data2 varchar(10))|
CREATE TABLE tt3 (a3 int, data3 varchar(10))|
diff --git a/mysql-test/main/sp_gis.result b/mysql-test/main/sp_gis.result
index 7a76507754f..35c7e52e833 100644
--- a/mysql-test/main/sp_gis.result
+++ b/mysql-test/main/sp_gis.result
@@ -28,3 +28,75 @@ test.a() test.x() test.y()
drop function a;
drop function x;
drop function y;
+#
+# Start of 10.5 tests
+#
+#
+# MDEV-19944 Remove GIS data types from keyword list in lex.h
+#
+CREATE FUNCTION point() RETURNS POINT RETURN NULL;
+Warnings:
+Note 1585 This function 'point' has the same name as a native function
+SELECT point();
+point()
+NULL
+DROP FUNCTION point;
+CREATE FUNCTION point(x INT) RETURNS POINT RETURN NULL;
+Warnings:
+Note 1585 This function 'point' has the same name as a native function
+SELECT point(1);
+point(1)
+NULL
+DROP FUNCTION point;
+CREATE FUNCTION point(x INT, y INT) RETURNS POINT RETURN NULL;
+Warnings:
+Note 1585 This function 'point' has the same name as a native function
+SELECT AsText(point(1,1));
+AsText(point(1,1))
+POINT(1 1)
+DROP FUNCTION point;
+CREATE FUNCTION linestring() RETURNS POINT RETURN NULL;
+Warnings:
+Note 1585 This function 'linestring' has the same name as a native function
+SELECT linestring();
+linestring()
+NULL
+DROP FUNCTION linestring;
+CREATE FUNCTION polygon() RETURNS POINT RETURN NULL;
+Warnings:
+Note 1585 This function 'polygon' has the same name as a native function
+SELECT polygon();
+polygon()
+NULL
+DROP FUNCTION polygon;
+CREATE FUNCTION multipoint() RETURNS POINT RETURN NULL;
+Warnings:
+Note 1585 This function 'multipoint' has the same name as a native function
+SELECT multipoint();
+multipoint()
+NULL
+DROP FUNCTION multipoint;
+CREATE FUNCTION multilinestring() RETURNS POINT RETURN NULL;
+Warnings:
+Note 1585 This function 'multilinestring' has the same name as a native function
+SELECT multilinestring();
+multilinestring()
+NULL
+DROP FUNCTION multilinestring;
+CREATE FUNCTION multipolygon() RETURNS POINT RETURN NULL;
+Warnings:
+Note 1585 This function 'multipolygon' has the same name as a native function
+SELECT multipolygon();
+multipolygon()
+NULL
+DROP FUNCTION multipolygon;
+CREATE FUNCTION geometrycollection() RETURNS POINT RETURN NULL;
+Warnings:
+Note 1585 This function 'geometrycollection' has the same name as a native function
+SELECT geometrycollection();
+geometrycollection()
+NULL
+DROP FUNCTION geometrycollection;
+#
+# End of 10.5 tests
+#
diff --git a/mysql-test/main/sp_gis.test b/mysql-test/main/sp_gis.test
index 51ed78b27d5..4148a4ec423 100644
--- a/mysql-test/main/sp_gis.test
+++ b/mysql-test/main/sp_gis.test
@@ -37,3 +37,66 @@ drop function a;
drop function x;
drop function y;
+--echo #
+--echo # Start of 10.5 tests
+--echo #
+
+--echo #
+--echo # MDEV-19944 Remove GIS data types from keyword list in lex.h
+--echo #
+
+CREATE FUNCTION point() RETURNS POINT RETURN NULL;
+--disable_warnings
+SELECT point();
+--enable_warnings
+DROP FUNCTION point;
+
+CREATE FUNCTION point(x INT) RETURNS POINT RETURN NULL;
+--disable_warnings
+SELECT point(1);
+--enable_warnings
+DROP FUNCTION point;
+
+CREATE FUNCTION point(x INT, y INT) RETURNS POINT RETURN NULL;
+SELECT AsText(point(1,1));
+DROP FUNCTION point;
+
+CREATE FUNCTION linestring() RETURNS POINT RETURN NULL;
+--disable_warnings
+SELECT linestring();
+--enable_warnings
+DROP FUNCTION linestring;
+
+CREATE FUNCTION polygon() RETURNS POINT RETURN NULL;
+--disable_warnings
+SELECT polygon();
+--enable_warnings
+DROP FUNCTION polygon;
+
+CREATE FUNCTION multipoint() RETURNS POINT RETURN NULL;
+--disable_warnings
+SELECT multipoint();
+--enable_warnings
+DROP FUNCTION multipoint;
+
+CREATE FUNCTION multilinestring() RETURNS POINT RETURN NULL;
+--disable_warnings
+SELECT multilinestring();
+--enable_warnings
+DROP FUNCTION multilinestring;
+
+CREATE FUNCTION multipolygon() RETURNS POINT RETURN NULL;
+--disable_warnings
+SELECT multipolygon();
+--enable_warnings
+DROP FUNCTION multipolygon;
+
+CREATE FUNCTION geometrycollection() RETURNS POINT RETURN NULL;
+--disable_warnings
+SELECT geometrycollection();
+--enable_warnings
+DROP FUNCTION geometrycollection;
+
+--echo #
+--echo # End of 10.5 tests
+--echo #
diff --git a/mysql-test/main/sp_trans.result b/mysql-test/main/sp_trans.result
index cee2a7e5188..58ef4ad15f7 100644
--- a/mysql-test/main/sp_trans.result
+++ b/mysql-test/main/sp_trans.result
@@ -557,22 +557,22 @@ f1 bug13575(f1)
3 ccc
drop function bug13575|
drop table t3|
-SELECT @@GLOBAL.storage_engine INTO @old_engine|
-SET @@GLOBAL.storage_engine=InnoDB|
-SET @@SESSION.storage_engine=InnoDB|
-SHOW GLOBAL VARIABLES LIKE 'storage_engine'|
+SELECT @@GLOBAL.default_storage_engine INTO @old_engine|
+SET @@GLOBAL.default_storage_engine=InnoDB|
+SET @@SESSION.default_storage_engine=InnoDB|
+SHOW GLOBAL VARIABLES LIKE 'default_storage_engine'|
Variable_name Value
-storage_engine InnoDB
-SHOW SESSION VARIABLES LIKE 'storage_engine'|
+default_storage_engine InnoDB
+SHOW SESSION VARIABLES LIKE 'default_storage_engine'|
Variable_name Value
-storage_engine InnoDB
+default_storage_engine InnoDB
CREATE PROCEDURE bug11758414()
BEGIN
-SET @@GLOBAL.storage_engine="MyISAM";
-SET @@SESSION.storage_engine="MyISAM";
+SET @@GLOBAL.default_storage_engine="MyISAM";
+SET @@SESSION.default_storage_engine="MyISAM";
# show defaults at execution time / that setting them worked
-SHOW GLOBAL VARIABLES LIKE 'storage_engine';
-SHOW SESSION VARIABLES LIKE 'storage_engine';
+SHOW GLOBAL VARIABLES LIKE 'default_storage_engine';
+SHOW SESSION VARIABLES LIKE 'default_storage_engine';
CREATE TABLE t1 (id int);
CREATE TABLE t2 (id int) ENGINE=InnoDB;
# show we're heeding the default (at run-time, not parse-time!)
@@ -583,9 +583,9 @@ END;
|
CALL bug11758414|
Variable_name Value
-storage_engine MyISAM
+default_storage_engine MyISAM
Variable_name Value
-storage_engine MyISAM
+default_storage_engine MyISAM
Table Create Table
t1 CREATE TABLE `t1` (
`id` int(11) DEFAULT NULL
@@ -594,15 +594,15 @@ Table Create Table
t2 CREATE TABLE `t2` (
`id` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
-SHOW GLOBAL VARIABLES LIKE 'storage_engine'|
+SHOW GLOBAL VARIABLES LIKE 'default_storage_engine'|
Variable_name Value
-storage_engine MyISAM
-SHOW SESSION VARIABLES LIKE 'storage_engine'|
+default_storage_engine MyISAM
+SHOW SESSION VARIABLES LIKE 'default_storage_engine'|
Variable_name Value
-storage_engine MyISAM
+default_storage_engine MyISAM
DROP PROCEDURE bug11758414|
DROP TABLE t1, t2|
-SET @@GLOBAL.storage_engine=@old_engine|
+SET @@GLOBAL.default_storage_engine=@old_engine|
#
# End of 5.1 tests
#
diff --git a/mysql-test/main/sp_trans.test b/mysql-test/main/sp_trans.test
index 7d6faba9789..b39c13287ed 100644
--- a/mysql-test/main/sp_trans.test
+++ b/mysql-test/main/sp_trans.test
@@ -601,22 +601,22 @@ drop function bug13575|
drop table t3|
#
-# BUG#11758414: Default storage_engine not honored when set
+# BUG#11758414: Default default_storage_engine not honored when set
# from within a stored procedure
#
-SELECT @@GLOBAL.storage_engine INTO @old_engine|
-SET @@GLOBAL.storage_engine=InnoDB|
-SET @@SESSION.storage_engine=InnoDB|
+SELECT @@GLOBAL.default_storage_engine INTO @old_engine|
+SET @@GLOBAL.default_storage_engine=InnoDB|
+SET @@SESSION.default_storage_engine=InnoDB|
# show defaults at define-time
-SHOW GLOBAL VARIABLES LIKE 'storage_engine'|
-SHOW SESSION VARIABLES LIKE 'storage_engine'|
+SHOW GLOBAL VARIABLES LIKE 'default_storage_engine'|
+SHOW SESSION VARIABLES LIKE 'default_storage_engine'|
CREATE PROCEDURE bug11758414()
BEGIN
- SET @@GLOBAL.storage_engine="MyISAM";
- SET @@SESSION.storage_engine="MyISAM";
+ SET @@GLOBAL.default_storage_engine="MyISAM";
+ SET @@SESSION.default_storage_engine="MyISAM";
# show defaults at execution time / that setting them worked
- SHOW GLOBAL VARIABLES LIKE 'storage_engine';
- SHOW SESSION VARIABLES LIKE 'storage_engine';
+ SHOW GLOBAL VARIABLES LIKE 'default_storage_engine';
+ SHOW SESSION VARIABLES LIKE 'default_storage_engine';
CREATE TABLE t1 (id int);
CREATE TABLE t2 (id int) ENGINE=InnoDB;
# show we're heeding the default (at run-time, not parse-time!)
@@ -627,11 +627,11 @@ END;
|
CALL bug11758414|
# show that changing defaults within SP stuck
-SHOW GLOBAL VARIABLES LIKE 'storage_engine'|
-SHOW SESSION VARIABLES LIKE 'storage_engine'|
+SHOW GLOBAL VARIABLES LIKE 'default_storage_engine'|
+SHOW SESSION VARIABLES LIKE 'default_storage_engine'|
DROP PROCEDURE bug11758414|
DROP TABLE t1, t2|
-SET @@GLOBAL.storage_engine=@old_engine|
+SET @@GLOBAL.default_storage_engine=@old_engine|
--echo #
--echo # End of 5.1 tests
diff --git a/mysql-test/main/ssl.result b/mysql-test/main/ssl.result
index 00faea58fd2..40a32fdd1dd 100644
--- a/mysql-test/main/ssl.result
+++ b/mysql-test/main/ssl.result
@@ -518,7 +518,7 @@ insert into tmp select * from t3;
insert into t3 select * from tmp;
alter table t3 add t2nr int not null auto_increment primary key first;
drop table tmp;
-SET BIG_TABLES=1;
+set tmp_memory_table_size=0;
select distinct concat(fld3," ",fld3) as namn from t2,t3 where t2.fld1=t3.t2nr order by namn limit 10;
namn
Abraham Abraham
@@ -531,7 +531,7 @@ ammonium ammonium
analyzable analyzable
animals animals
animized animized
-SET BIG_TABLES=0;
+set tmp_memory_table_size=default;
select distinct concat(fld3," ",fld3) from t2,t3 where t2.fld1=t3.t2nr order by fld3 limit 10;
concat(fld3," ",fld3)
Abraham Abraham
@@ -568,7 +568,7 @@ attendants 1
bedlam 1
bedpost 1
boasted 1
-SET BIG_TABLES=1;
+set tmp_memory_table_size=0;
select distinct fld3,count(*) from t2 group by companynr,fld3 limit 10;
fld3 count(*)
affixed 1
@@ -581,7 +581,7 @@ attendants 1
bedlam 1
bedpost 1
boasted 1
-SET BIG_TABLES=0;
+set tmp_memory_table_size=default;
select distinct fld3,repeat("a",length(fld3)),count(*) from t2 group by companynr,fld3 limit 100,10;
fld3 repeat("a",length(fld3)) count(*)
circus aaaaaa 1
diff --git a/mysql-test/main/ssl_compress.result b/mysql-test/main/ssl_compress.result
index d298f8ec6e4..8c63c798afa 100644
--- a/mysql-test/main/ssl_compress.result
+++ b/mysql-test/main/ssl_compress.result
@@ -515,7 +515,7 @@ insert into tmp select * from t3;
insert into t3 select * from tmp;
alter table t3 add t2nr int not null auto_increment primary key first;
drop table tmp;
-SET BIG_TABLES=1;
+set tmp_memory_table_size=0;
select distinct concat(fld3," ",fld3) as namn from t2,t3 where t2.fld1=t3.t2nr order by namn limit 10;
namn
Abraham Abraham
@@ -528,7 +528,7 @@ ammonium ammonium
analyzable analyzable
animals animals
animized animized
-SET BIG_TABLES=0;
+set tmp_memory_table_size=default;
select distinct concat(fld3," ",fld3) from t2,t3 where t2.fld1=t3.t2nr order by fld3 limit 10;
concat(fld3," ",fld3)
Abraham Abraham
@@ -565,7 +565,7 @@ attendants 1
bedlam 1
bedpost 1
boasted 1
-SET BIG_TABLES=1;
+set tmp_memory_table_size=0;
select distinct fld3,count(*) from t2 group by companynr,fld3 limit 10;
fld3 count(*)
affixed 1
@@ -578,7 +578,7 @@ attendants 1
bedlam 1
bedpost 1
boasted 1
-SET BIG_TABLES=0;
+set tmp_memory_table_size=default;
select distinct fld3,repeat("a",length(fld3)),count(*) from t2 group by companynr,fld3 limit 100,10;
fld3 repeat("a",length(fld3)) count(*)
circus aaaaaa 1
diff --git a/mysql-test/main/stack-crash.result b/mysql-test/main/stack-crash.result
index 62870db79f3..8c0001e748a 100644
--- a/mysql-test/main/stack-crash.result
+++ b/mysql-test/main/stack-crash.result
@@ -1,7 +1,6 @@
drop table if exists t1,t2;
Warnings:
-Note 1051 Unknown table 'test.t1'
-Note 1051 Unknown table 'test.t2'
+Note 1051 Unknown table 'test.t1,test.t2'
CREATE TABLE t1 (
`sspo_id` int(11) NOT NULL AUTO_INCREMENT,
`sspo_uid` int(11) NOT NULL DEFAULT '0',
diff --git a/mysql-test/main/stat_tables.result b/mysql-test/main/stat_tables.result
index 53557b39b05..a5089c609d2 100644
--- a/mysql-test/main/stat_tables.result
+++ b/mysql-test/main/stat_tables.result
@@ -74,7 +74,7 @@ id select_type table type possible_keys key key_len ref rows Extra
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|filter PRIMARY,i_o_orderdate,i_o_custkey i_o_custkey|i_o_orderdate 5|4 dbt3_s001.customer.c_custkey 15 (12%) Using where; Using rowid 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
+1 SIMPLE lineitem ref PRIMARY,i_l_suppkey,i_l_orderkey,i_l_orderkey_quantity i_l_orderkey 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
where c_custkey = o_custkey and l_orderkey = o_orderkey
@@ -181,7 +181,7 @@ id select_type table type possible_keys key key_len ref rows Extra
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|filter PRIMARY,i_o_orderdate,i_o_custkey i_o_custkey|i_o_orderdate 5|4 dbt3_s001.customer.c_custkey 15 (12%) Using where; Using rowid 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
+1 SIMPLE lineitem ref PRIMARY,i_l_suppkey,i_l_orderkey,i_l_orderkey_quantity i_l_orderkey 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
where c_custkey = o_custkey and l_orderkey = o_orderkey
@@ -214,10 +214,10 @@ order by o_year;
id select_type table type possible_keys key key_len ref rows Extra
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 lineitem ref PRIMARY,i_l_suppkey_partkey,i_l_partkey,i_l_suppkey,i_l_orderkey,i_l_orderkey_quantity i_l_partkey 5 dbt3_s001.part.p_partkey 30 Using where
1 SIMPLE supplier eq_ref PRIMARY,i_s_nationkey PRIMARY 4 dbt3_s001.lineitem.l_suppkey 1 Using where
+1 SIMPLE orders eq_ref|filter PRIMARY,i_o_orderdate,i_o_custkey PRIMARY|i_o_orderdate 4|4 dbt3_s001.lineitem.l_orderkey 1 (27%) Using where; Using rowid filter
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,
@@ -337,7 +337,7 @@ and o_orderkey=l_orderkey and p_partkey=l_partkey;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE part range PRIMARY,i_p_retailprice i_p_retailprice 9 NULL 1 Using index condition
1 SIMPLE orders ref PRIMARY,i_o_orderdate i_o_orderdate 4 const 1
-1 SIMPLE lineitem ref PRIMARY,i_l_suppkey_partkey,i_l_partkey,i_l_orderkey,i_l_orderkey_quantity PRIMARY 4 dbt3_s001.orders.o_orderkey 4 Using where
+1 SIMPLE lineitem ref PRIMARY,i_l_suppkey_partkey,i_l_partkey,i_l_orderkey,i_l_orderkey_quantity i_l_orderkey 4 dbt3_s001.orders.o_orderkey 4 Using where
select o_orderkey, p_partkey
from part, lineitem, orders
where p_retailprice > 1100 and o_orderdate='1997-01-01'
diff --git a/mysql-test/main/stat_tables_disabled.result b/mysql-test/main/stat_tables_disabled.result
index c974bba5a4b..14be9535ea4 100644
--- a/mysql-test/main/stat_tables_disabled.result
+++ b/mysql-test/main/stat_tables_disabled.result
@@ -3,7 +3,7 @@ set @innodb_stats_persistent_sample_pages_save=
@@innodb_stats_persistent_sample_pages;
set global innodb_stats_persistent= 1;
set global innodb_stats_persistent_sample_pages=100;
-SET SESSION STORAGE_ENGINE='InnoDB';
+SET SESSION DEFAULT_STORAGE_ENGINE='InnoDB';
select @@global.use_stat_tables;
@@global.use_stat_tables
PREFERABLY
@@ -73,7 +73,7 @@ set optimizer_switch=@save_optimizer_switch;
DROP DATABASE dbt3_s001;
use test;
set use_stat_tables=@save_use_stat_tables;
-SET SESSION STORAGE_ENGINE=DEFAULT;
+SET SESSION DEFAULT_STORAGE_ENGINE=DEFAULT;
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_disabled.test b/mysql-test/main/stat_tables_disabled.test
index 427cf4874bc..e6b965afe34 100644
--- a/mysql-test/main/stat_tables_disabled.test
+++ b/mysql-test/main/stat_tables_disabled.test
@@ -6,7 +6,7 @@ set global innodb_stats_persistent= 1;
set global innodb_stats_persistent_sample_pages=100;
--source include/have_innodb.inc
-SET SESSION STORAGE_ENGINE='InnoDB';
+SET SESSION DEFAULT_STORAGE_ENGINE='InnoDB';
select @@global.use_stat_tables;
select @@session.use_stat_tables;
@@ -82,7 +82,7 @@ use test;
set use_stat_tables=@save_use_stat_tables;
-SET SESSION STORAGE_ENGINE=DEFAULT;
+SET SESSION DEFAULT_STORAGE_ENGINE=DEFAULT;
set global innodb_stats_persistent= @innodb_stats_persistent_save;
set global innodb_stats_persistent_sample_pages=
diff --git a/mysql-test/main/stat_tables_innodb.result b/mysql-test/main/stat_tables_innodb.result
index 41fd303ed4c..6fafac8776b 100644
--- a/mysql-test/main/stat_tables_innodb.result
+++ b/mysql-test/main/stat_tables_innodb.result
@@ -1,4 +1,4 @@
-SET SESSION STORAGE_ENGINE='InnoDB';
+SET SESSION DEFAULT_STORAGE_ENGINE='InnoDB';
set @save_optimizer_switch_for_stat_tables_test=@@optimizer_switch;
set optimizer_switch='extended_keys=on';
set @innodb_stats_persistent_save= @@innodb_stats_persistent;
@@ -246,7 +246,7 @@ order by o_year;
id select_type table type possible_keys key key_len ref rows Extra
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 lineitem ref PRIMARY,i_l_suppkey_partkey,i_l_partkey,i_l_suppkey,i_l_orderkey,i_l_orderkey_quantity i_l_partkey 5 dbt3_s001.part.p_partkey 30 Using where
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
@@ -964,4 +964,4 @@ test t1 a 1 1 0.0000 4.0000 60000.0000 0 NULL NULL
SET use_stat_tables= @save_use_stat_tables;
DROP TABLE t1;
# end of 10.1 tests
-SET SESSION STORAGE_ENGINE=DEFAULT;
+SET SESSION DEFAULT_STORAGE_ENGINE=DEFAULT;
diff --git a/mysql-test/main/stat_tables_innodb.test b/mysql-test/main/stat_tables_innodb.test
index 301ee8692b9..f439ec52315 100644
--- a/mysql-test/main/stat_tables_innodb.test
+++ b/mysql-test/main/stat_tables_innodb.test
@@ -1,7 +1,7 @@
--source include/have_innodb.inc
--source include/have_sequence.inc
-SET SESSION STORAGE_ENGINE='InnoDB';
+SET SESSION DEFAULT_STORAGE_ENGINE='InnoDB';
set @save_optimizer_switch_for_stat_tables_test=@@optimizer_switch;
set optimizer_switch='extended_keys=on';
@@ -38,4 +38,4 @@ DROP TABLE t1;
--echo # end of 10.1 tests
-SET SESSION STORAGE_ENGINE=DEFAULT;
+SET SESSION DEFAULT_STORAGE_ENGINE=DEFAULT;
diff --git a/mysql-test/main/stat_tables_par.inc b/mysql-test/main/stat_tables_par.inc
new file mode 100644
index 00000000000..16f64cebfe7
--- /dev/null
+++ b/mysql-test/main/stat_tables_par.inc
@@ -0,0 +1,275 @@
+# Note that this test requires a fresh restart to not have problems with the
+# old status values
+
+set @save_use_stat_tables=@@use_stat_tables;
+
+set use_stat_tables='preferably';
+
+--disable_warnings
+DROP DATABASE IF EXISTS dbt3_s001;
+--enable_warnings
+
+CREATE DATABASE dbt3_s001;
+
+use dbt3_s001;
+
+set @save_optimizer_switch=@@optimizer_switch;
+set optimizer_switch='extended_keys=off';
+
+--disable_query_log
+--disable_result_log
+--disable_warnings
+--source include/dbt3_s001.inc
+truncate mysql.table_stats;
+truncate mysql.column_stats;
+truncate mysql.index_stats;
+ANALYZE TABLE
+customer, lineitem, nation, orders, part, partsupp, region, supplier;
+--enable_warnings
+--enable_result_log
+--enable_query_log
+
+select * from mysql.table_stats;
+select * from mysql.index_stats;
+
+
+#
+# Test for parallel memory allocation for statistical data
+#
+# assumes that start the code of memory allocation for stats data has this line:
+#
+# DEBUG_SYNC(thd, "statistics_mem_alloc_start1");
+# DEBUG_SYNC(thd, "statistics_mem_alloc_start2");
+#
+
+let $Q6=
+select round(sum(l_extendedprice*l_discount),4) as revenue
+from lineitem
+where l_shipdate >= date '1994-01-01'
+ and l_shipdate < date '1994-01-01' + interval '1' year
+ and l_discount between 0.06 - 0.01 and 0.06 + 0.01
+ and l_quantity < 24;
+
+flush table lineitem;
+set use_stat_tables='never';
+eval $Q6;
+
+connect (con1, localhost, root,,);
+connect (con2, localhost, root,,);
+
+connection con1;
+set debug_sync='statistics_mem_alloc_start1 WAIT_FOR second_thread_started_too';
+set debug_sync='statistics_mem_alloc_start2 SIGNAL first_thread_working';
+use dbt3_s001;
+set use_stat_tables='preferably';
+--send_eval $Q6
+
+connection con2;
+set debug_sync='statistics_mem_alloc_start1 SIGNAL second_thread_started_too';
+set debug_sync='statistics_mem_alloc_start2 WAIT_FOR first_thread_working';
+use dbt3_s001;
+set use_stat_tables='preferably';
+--send_eval $Q6
+
+connection con1;
+--reap
+
+connection con2;
+--reap
+
+connection default;
+set use_stat_tables='preferably';
+disconnect con1;
+disconnect con2;
+set debug_sync='RESET';
+
+#
+# Test for parallel statistics collection
+#
+# assumes that start of stats collection code has this line:
+#
+# DEBUG_SYNC(thd, "statistics_collection_start1");
+# DEBUG_SYNC(thd, "statistics_collection_start2");
+#
+
+select * from mysql.index_stats where table_name='lineitem' order by index_name;
+delete from mysql.index_stats
+ where table_name='lineitem' and
+ index_name in ('i_l_shipdate', 'i_l_receiptdate');
+select * from mysql.index_stats where table_name='lineitem' order by index_name;
+--disable_result_log
+--disable_warnings
+analyze table lineitem persistent for columns() indexes (i_l_shipdate);
+--enable_warnings
+--enable_result_log
+select * from mysql.index_stats where table_name='lineitem' order by index_name;
+delete from mysql.index_stats
+ where table_name='lineitem' and index_name= 'i_l_shipdate';
+select * from mysql.index_stats where table_name='lineitem' order by index_name;
+
+connect (con1, localhost, root,,);
+connect (con2, localhost, root,,);
+
+connection con1;
+set debug_sync='statistics_collection_start1 WAIT_FOR second_thread_started_too';
+set debug_sync='statistics_collection_start2 SIGNAL first_thread_working';
+use dbt3_s001;
+set use_stat_tables='preferably';
+--send analyze table lineitem persistent for columns() indexes (i_l_shipdate)
+
+connection con2;
+set debug_sync='statistics_collection_start1 SIGNAL second_thread_started_too';
+set debug_sync='statistics_collection_start2 WAIT_FOR first_thread_working';
+use dbt3_s001;
+set use_stat_tables='preferably';
+--send analyze table lineitem persistent for columns() indexes (i_l_receiptdate)
+
+connection con1;
+--disable_result_log
+--disable_warnings
+--reap
+--enable_warnings
+--enable_result_log
+
+connection con2;
+--disable_result_log
+--disable_warnings
+--reap
+--enable_warnings
+--enable_result_log
+
+connection default;
+disconnect con1;
+disconnect con2;
+set debug_sync='RESET';
+
+select * from mysql.index_stats where table_name='lineitem' order by index_name, prefix_arity;
+
+#
+# Test for parallel statistics collection and update (innodb)
+#
+
+select * from mysql.index_stats where table_name='lineitem'
+ order by index_name, prefix_arity;
+set debug_sync='RESET';
+
+let $innodb_storage_engine= 0;
+if (`SELECT UPPER(@@default_storage_engine) = 'INNODB'`)
+{
+ let $innodb_storage_engine= 1;
+}
+
+connect (con1, localhost, root,,);
+connect (con2, localhost, root,,);
+
+connection con1;
+set debug_sync='statistics_collection_start SIGNAL parked WAIT_FOR finish';
+use dbt3_s001;
+set use_stat_tables='preferably';
+--send analyze table lineitem persistent for all
+
+connection con2;
+set debug_sync='now WAIT_FOR parked';
+use dbt3_s001;
+set use_stat_tables='never';
+if ($innodb_storage_engine)
+{
+ select * from lineitem where l_orderkey=1 and l_partkey=156;
+ delete from lineitem where l_orderkey=1 and l_partkey=156;
+ select * from lineitem where l_orderkey=1 and l_partkey=156;
+}
+set debug_sync='now SIGNAL finish';
+
+connection con1;
+--disable_result_log
+--disable_warnings
+--reap
+--enable_warnings
+--enable_result_log
+
+connection default;
+disconnect con1;
+disconnect con2;
+set debug_sync='RESET';
+
+select * from mysql.index_stats where table_name='lineitem'
+ order by index_name, prefix_arity;
+
+#
+# Bug mdev-3891: deadlock for ANALYZE and SELECT over mysql.index_stats
+#
+
+set @save_global_use_stat_tables=@@global.use_stat_tables;
+set global use_stat_tables='preferably';
+set debug_sync='RESET';
+
+connect (con1, localhost, root,,);
+connect (con2, localhost, root,,);
+
+connection con1;
+set debug_sync='statistics_update_start SIGNAL parker WAIT_FOR go1 EXECUTE 1';
+set debug_sync='thr_multi_lock_before_thr_lock SIGNAL go2 EXECUTE 3';
+use dbt3_s001;
+--send analyze table lineitem persistent for all
+
+connection con2;
+set debug_sync='open_and_process_table WAIT_FOR parker';
+set debug_sync='statistics_read_start SIGNAL go1 WAIT_FOR go2';
+use dbt3_s001;
+--send select * from mysql.index_stats, lineitem where index_name= 'i_l_shipdate' and l_orderkey=1 and l_partkey=68 order by prefix_arity;
+
+connection con1;
+--disable_result_log
+--disable_warnings
+--reap
+--enable_warnings
+--enable_result_log
+
+connection con2;
+--disable_warnings
+--reap
+--enable_warnings
+
+connection default;
+disconnect con1;
+disconnect con2;
+set debug_sync='RESET';
+
+set global use_stat_tables=@save_global_use_stat_tables;
+
+DROP DATABASE dbt3_s001;
+
+use test;
+
+#
+# Bug mdev-4019: crash when executing in parallel ANALYZE and
+# SELECT * FROM information_schema.statistics
+#
+
+set @save_global_use_stat_tables=@@global.use_stat_tables;
+set global use_stat_tables='preferably';
+set debug_sync='RESET';
+
+create table t1 (a int, b int, key(a));
+insert t1 values (1,1),(2,2);
+
+analyze table t1;
+
+SET debug_sync='after_open_table_ignore_flush WAIT_FOR go';
+send select * from information_schema.statistics where table_schema='test';
+
+connect(con1, localhost, root);
+connection con1;
+select * from t1;
+SET DEBUG_SYNC= "now SIGNAL go";
+
+connection default;
+reap;
+
+connection default;
+disconnect con1;
+set debug_sync='RESET';
+
+drop table t1;
+set global use_stat_tables=@save_global_use_stat_tables;
+set use_stat_tables=@save_use_stat_tables;
diff --git a/mysql-test/main/stat_tables_par.result b/mysql-test/main/stat_tables_par.result
index 09ee2bbf16a..33fbe079c9e 100644
--- a/mysql-test/main/stat_tables_par.result
+++ b/mysql-test/main/stat_tables_par.result
@@ -1,3 +1,4 @@
+# restart
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_par.test b/mysql-test/main/stat_tables_par.test
index 9d4038911ff..5bad16075d4 100644
--- a/mysql-test/main/stat_tables_par.test
+++ b/mysql-test/main/stat_tables_par.test
@@ -1,278 +1,9 @@
+# Note that this test requires a fresh restart to not have problems with the
+# old status values
+
--source include/have_stat_tables.inc
--source include/have_debug_sync.inc
--source include/not_embedded.inc
+--source include/restart_mysqld.inc
-set @save_use_stat_tables=@@use_stat_tables;
-
-set use_stat_tables='preferably';
-
---disable_warnings
-DROP DATABASE IF EXISTS dbt3_s001;
---enable_warnings
-
-CREATE DATABASE dbt3_s001;
-
-use dbt3_s001;
-
-set @save_optimizer_switch=@@optimizer_switch;
-set optimizer_switch='extended_keys=off';
-
---disable_query_log
---disable_result_log
---disable_warnings
---source include/dbt3_s001.inc
-delete from mysql.table_stats;
-delete from mysql.column_stats;
-delete from mysql.index_stats;
-ANALYZE TABLE
-customer, lineitem, nation, orders, part, partsupp, region, supplier;
---enable_warnings
---enable_result_log
---enable_query_log
-
-select * from mysql.table_stats;
-select * from mysql.index_stats;
-
-
-#
-# Test for parallel memory allocation for statistical data
-#
-# assumes that start the code of memory allocation for stats data has this line:
-#
-# DEBUG_SYNC(thd, "statistics_mem_alloc_start1");
-# DEBUG_SYNC(thd, "statistics_mem_alloc_start2");
-#
-
-let $Q6=
-select round(sum(l_extendedprice*l_discount),4) as revenue
-from lineitem
-where l_shipdate >= date '1994-01-01'
- and l_shipdate < date '1994-01-01' + interval '1' year
- and l_discount between 0.06 - 0.01 and 0.06 + 0.01
- and l_quantity < 24;
-
-flush table lineitem;
-set use_stat_tables='never';
-eval $Q6;
-
-connect (con1, localhost, root,,);
-connect (con2, localhost, root,,);
-
-connection con1;
-set debug_sync='statistics_mem_alloc_start1 WAIT_FOR second_thread_started_too';
-set debug_sync='statistics_mem_alloc_start2 SIGNAL first_thread_working';
-use dbt3_s001;
-set use_stat_tables='preferably';
---send_eval $Q6
-
-connection con2;
-set debug_sync='statistics_mem_alloc_start1 SIGNAL second_thread_started_too';
-set debug_sync='statistics_mem_alloc_start2 WAIT_FOR first_thread_working';
-use dbt3_s001;
-set use_stat_tables='preferably';
---send_eval $Q6
-
-connection con1;
---reap
-
-connection con2;
---reap
-
-connection default;
-set use_stat_tables='preferably';
-disconnect con1;
-disconnect con2;
-set debug_sync='RESET';
-
-#
-# Test for parallel statistics collection
-#
-# assumes that start of stats collection code has this line:
-#
-# DEBUG_SYNC(thd, "statistics_collection_start1");
-# DEBUG_SYNC(thd, "statistics_collection_start2");
-#
-
-select * from mysql.index_stats where table_name='lineitem' order by index_name;
-delete from mysql.index_stats
- where table_name='lineitem' and
- index_name in ('i_l_shipdate', 'i_l_receiptdate');
-select * from mysql.index_stats where table_name='lineitem' order by index_name;
---disable_result_log
---disable_warnings
-analyze table lineitem persistent for columns() indexes (i_l_shipdate);
---enable_warnings
---enable_result_log
-select * from mysql.index_stats where table_name='lineitem' order by index_name;
-delete from mysql.index_stats
- where table_name='lineitem' and index_name= 'i_l_shipdate';
-select * from mysql.index_stats where table_name='lineitem' order by index_name;
-
-connect (con1, localhost, root,,);
-connect (con2, localhost, root,,);
-
-connection con1;
-set debug_sync='statistics_collection_start1 WAIT_FOR second_thread_started_too';
-set debug_sync='statistics_collection_start2 SIGNAL first_thread_working';
-use dbt3_s001;
-set use_stat_tables='preferably';
---send analyze table lineitem persistent for columns() indexes (i_l_shipdate)
-
-connection con2;
-set debug_sync='statistics_collection_start1 SIGNAL second_thread_started_too';
-set debug_sync='statistics_collection_start2 WAIT_FOR first_thread_working';
-use dbt3_s001;
-set use_stat_tables='preferably';
---send analyze table lineitem persistent for columns() indexes (i_l_receiptdate)
-
-connection con1;
---disable_result_log
---disable_warnings
---reap
---enable_warnings
---enable_result_log
-
-connection con2;
---disable_result_log
---disable_warnings
---reap
---enable_warnings
---enable_result_log
-
-connection default;
-disconnect con1;
-disconnect con2;
-set debug_sync='RESET';
-
-select * from mysql.index_stats where table_name='lineitem' order by index_name, prefix_arity;
-
-#
-# Test for parallel statistics collection and update (innodb)
-#
-
-select * from mysql.index_stats where table_name='lineitem'
- order by index_name, prefix_arity;
-set debug_sync='RESET';
-
-let $innodb_storage_engine= 0;
-if (`SELECT UPPER(@@storage_engine) = 'INNODB'`)
-{
- let $innodb_storage_engine= 1;
-}
-
-connect (con1, localhost, root,,);
-connect (con2, localhost, root,,);
-
-connection con1;
-set debug_sync='statistics_collection_start SIGNAL parked WAIT_FOR finish';
-use dbt3_s001;
-set use_stat_tables='preferably';
---send analyze table lineitem persistent for all
-
-connection con2;
-set debug_sync='now WAIT_FOR parked';
-use dbt3_s001;
-set use_stat_tables='never';
-if ($innodb_storage_engine)
-{
- select * from lineitem where l_orderkey=1 and l_partkey=156;
- delete from lineitem where l_orderkey=1 and l_partkey=156;
- select * from lineitem where l_orderkey=1 and l_partkey=156;
-}
-set debug_sync='now SIGNAL finish';
-
-connection con1;
---disable_result_log
---disable_warnings
---reap
---enable_warnings
---enable_result_log
-
-connection default;
-disconnect con1;
-disconnect con2;
-set debug_sync='RESET';
-
-select * from mysql.index_stats where table_name='lineitem'
- order by index_name, prefix_arity;
-
-#
-# Bug mdev-3891: deadlock for ANALYZE and SELECT over mysql.index_stats
-#
-
-set @save_global_use_stat_tables=@@global.use_stat_tables;
-set global use_stat_tables='preferably';
-set debug_sync='RESET';
-
-connect (con1, localhost, root,,);
-connect (con2, localhost, root,,);
-
-connection con1;
-set debug_sync='statistics_update_start SIGNAL parker WAIT_FOR go1 EXECUTE 1';
-set debug_sync='thr_multi_lock_before_thr_lock SIGNAL go2 EXECUTE 3';
-use dbt3_s001;
---send analyze table lineitem persistent for all
-
-connection con2;
-set debug_sync='open_and_process_table WAIT_FOR parker';
-set debug_sync='statistics_read_start SIGNAL go1 WAIT_FOR go2';
-use dbt3_s001;
---send select * from mysql.index_stats, lineitem where index_name= 'i_l_shipdate' and l_orderkey=1 and l_partkey=68 order by prefix_arity;
-
-connection con1;
---disable_result_log
---disable_warnings
---reap
---enable_warnings
---enable_result_log
-
-connection con2;
---disable_warnings
---reap
---enable_warnings
-
-connection default;
-disconnect con1;
-disconnect con2;
-set debug_sync='RESET';
-
-set global use_stat_tables=@save_global_use_stat_tables;
-
-DROP DATABASE dbt3_s001;
-
-use test;
-
-#
-# Bug mdev-4019: crash when executing in parallel ANALYZE and
-# SELECT * FROM information_schema.statistics
-#
-
-set @save_global_use_stat_tables=@@global.use_stat_tables;
-set global use_stat_tables='preferably';
-set debug_sync='RESET';
-
-create table t1 (a int, b int, key(a));
-insert t1 values (1,1),(2,2);
-
-analyze table t1;
-
-SET debug_sync='after_open_table_ignore_flush WAIT_FOR go';
-send select * from information_schema.statistics where table_schema='test';
-
-connect(con1, localhost, root);
-connection con1;
-select * from t1;
-SET DEBUG_SYNC= "now SIGNAL go";
-
-connection default;
-reap;
-
-connection default;
-disconnect con1;
-set debug_sync='RESET';
-
-drop table t1;
-set global use_stat_tables=@save_global_use_stat_tables;
-
-
-set use_stat_tables=@save_use_stat_tables;
+--source stat_tables_par.inc
diff --git a/mysql-test/main/stat_tables_par_innodb.result b/mysql-test/main/stat_tables_par_innodb.result
index 54579aff990..c33785a9436 100644
--- a/mysql-test/main/stat_tables_par_innodb.result
+++ b/mysql-test/main/stat_tables_par_innodb.result
@@ -1,4 +1,5 @@
-SET SESSION STORAGE_ENGINE='InnoDB';
+# restart
+SET SESSION DEFAULT_STORAGE_ENGINE='InnoDB';
set @save_optimizer_switch_for_stat_tables_test=@@optimizer_switch;
set optimizer_switch='extended_keys=on';
set @save_use_stat_tables=@@use_stat_tables;
@@ -315,4 +316,4 @@ drop table t1;
set global use_stat_tables=@save_global_use_stat_tables;
set use_stat_tables=@save_use_stat_tables;
set optimizer_switch=@save_optimizer_switch_for_stat_tables_test;
-SET SESSION STORAGE_ENGINE=DEFAULT;
+SET SESSION DEFAULT_STORAGE_ENGINE=DEFAULT;
diff --git a/mysql-test/main/stat_tables_par_innodb.test b/mysql-test/main/stat_tables_par_innodb.test
index fd5833e4aaf..79ab23dcc3f 100644
--- a/mysql-test/main/stat_tables_par_innodb.test
+++ b/mysql-test/main/stat_tables_par_innodb.test
@@ -1,12 +1,19 @@
+# Note that this test requires a fresh restart to not have problems with the
+# old status values
+
+--source include/have_stat_tables.inc
+--source include/have_debug_sync.inc
+--source include/not_embedded.inc
--source include/have_innodb.inc
+--source include/restart_mysqld.inc
-SET SESSION STORAGE_ENGINE='InnoDB';
+SET SESSION DEFAULT_STORAGE_ENGINE='InnoDB';
set @save_optimizer_switch_for_stat_tables_test=@@optimizer_switch;
set optimizer_switch='extended_keys=on';
---source stat_tables_par.test
+--source stat_tables_par.inc
set optimizer_switch=@save_optimizer_switch_for_stat_tables_test;
-SET SESSION STORAGE_ENGINE=DEFAULT;
+SET SESSION DEFAULT_STORAGE_ENGINE=DEFAULT;
diff --git a/mysql-test/main/status_bug17954.test b/mysql-test/main/status_bug17954.test
index 36430cceeff..75c9ab27dfd 100644
--- a/mysql-test/main/status_bug17954.test
+++ b/mysql-test/main/status_bug17954.test
@@ -4,9 +4,6 @@
# embedded server causes different stat
-- source include/not_embedded.inc
-# thread pool causes different results
--- source include/not_threadpool.inc
-
# Save the initial number of concurrent sessions
--source include/count_sessions.inc
diff --git a/mysql-test/main/subselect.result b/mysql-test/main/subselect.result
index 15ebaa33474..167382fc328 100644
--- a/mysql-test/main/subselect.result
+++ b/mysql-test/main/subselect.result
@@ -682,8 +682,6 @@ x
3
11
11
-INSERT DELAYED INTO t1 (x) VALUES ((SELECT SUM(x) FROM t2));
-ERROR 42S22: Unknown column 'x' in 'field list'
INSERT DELAYED INTO t1 (x) VALUES ((SELECT SUM(a) FROM t2));
select * from t1;
x
@@ -1505,7 +1503,7 @@ 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 a a 5 NULL 4 100.00 Using where; Using index
-1 PRIMARY t3 index a a 5 NULL 3 100.00 Using where; Using index
+1 PRIMARY t3 range a a 5 NULL 3 100.00 Using where; Using index
1 PRIMARY t1 ref a a 10 test.t2.a,test.t3.a 116 100.00 Using index; FirstMatch(t2)
Warnings:
Note 1003 select `test`.`t2`.`a` AS `a` from `test`.`t2` semi join (`test`.`t1` join `test`.`t3`) where `test`.`t1`.`b` = `test`.`t3`.`a` and `test`.`t1`.`a` = `test`.`t2`.`a`
@@ -3178,7 +3176,7 @@ INSERT INTO t2 VALUES (1),(2),(3);
EXPLAIN SELECT a, a IN (SELECT a FROM t1) FROM t2;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t2 ALL NULL NULL NULL NULL 3
-2 SUBQUERY t1 index_subquery a a 5 func 2 Using index; Full scan on NULL key
+2 SUBQUERY t1 index_subquery a a 5 func 3 Using index; Full scan on NULL key
SELECT a, a IN (SELECT a FROM t1) FROM t2;
a a IN (SELECT a FROM t1)
1 1
@@ -7042,8 +7040,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 t2 ALL NULL NULL NULL NULL 2 Using where
-2 SUBQUERY <subquery3> eq_ref distinct_key distinct_key 4 test.t2.c 1
+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)
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;
@@ -7134,7 +7132,7 @@ drop table t1,t2,t3,t4;
# MDEV-7122
# Assertion `0' failed in subselect_hash_sj_engine::init
#
-SET SESSION big_tables=1;
+set tmp_memory_table_size=0;
CREATE TABLE t1(a char(255) DEFAULT '', KEY(a(10))) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
INSERT INTO t1 VALUES(0),(0),(0);
SELECT * FROM t1 WHERE a IN(SELECT MIN(a) FROM t1);
@@ -7143,7 +7141,7 @@ a
0
0
DROP TABLE t1;
-SET SESSION big_tables=0;
+set tmp_memory_table_size=default;
#
# MDEV-10776: Server crash on query
#
diff --git a/mysql-test/main/subselect.test b/mysql-test/main/subselect.test
index d87aba57567..a58a08e1a58 100644
--- a/mysql-test/main/subselect.test
+++ b/mysql-test/main/subselect.test
@@ -394,8 +394,6 @@ select * from t1;
# After this, only data based on old t1 records should have been added.
INSERT INTO t1 (x) select (SELECT SUM(x)+2 FROM t1) FROM t2;
select * from t1;
--- error ER_BAD_FIELD_ERROR
-INSERT DELAYED INTO t1 (x) VALUES ((SELECT SUM(x) FROM t2));
let $row_count_before= `SELECT COUNT(*) FROM t1`;
INSERT DELAYED INTO t1 (x) VALUES ((SELECT SUM(a) FROM t2));
let $wait_condition= SELECT COUNT(*) <> $row_count_before FROM t1;
@@ -5959,12 +5957,12 @@ drop table t1,t2,t3,t4;
--echo # MDEV-7122
--echo # Assertion `0' failed in subselect_hash_sj_engine::init
--echo #
-SET SESSION big_tables=1;
+set tmp_memory_table_size=0; # force on-disk tmp table
CREATE TABLE t1(a char(255) DEFAULT '', KEY(a(10))) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
INSERT INTO t1 VALUES(0),(0),(0);
SELECT * FROM t1 WHERE a IN(SELECT MIN(a) FROM t1);
DROP TABLE t1;
-SET SESSION big_tables=0;
+set tmp_memory_table_size=default;
--echo #
--echo # MDEV-10776: Server crash on query
diff --git a/mysql-test/main/subselect2.result b/mysql-test/main/subselect2.result
index a3d7fda7abc..34e6e857d14 100644
--- a/mysql-test/main/subselect2.result
+++ b/mysql-test/main/subselect2.result
@@ -287,7 +287,7 @@ ORDER BY mirror_date ASC
) AS calculated_result;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY <derived2> ALL NULL NULL NULL NULL 3
-2 DERIVED t1 ALL date NULL NULL NULL 3 Using where; Using filesort
+2 DERIVED t1 range date date 6 NULL 3 Using index condition; Using where; Rowid-ordered scan; Using filesort
SELECT * FROM (
SELECT node_uid, date, mirror_date, @result := 0 AS result
FROM t1
@@ -310,7 +310,7 @@ ORDER BY mirror_date ASC
) AS calculated_result;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY <derived2> ALL NULL NULL NULL NULL 3
-2 DERIVED t1 ALL date NULL NULL NULL 3 Using where; Using filesort
+2 DERIVED t1 range date date 6 NULL 3 Using index condition; Using where; Using filesort
SELECT * FROM (
SELECT node_uid, date, mirror_date, @result := 0 AS result
FROM t1
diff --git a/mysql-test/main/subselect3.result b/mysql-test/main/subselect3.result
index 5c4544a1b05..299faadeff7 100644
--- a/mysql-test/main/subselect3.result
+++ b/mysql-test/main/subselect3.result
@@ -96,10 +96,10 @@ explain extended
select oref, a, a in (select a from t1 where oref=t2.oref) Z from t2;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t2 ALL NULL NULL NULL NULL 4 100.00
-2 DEPENDENT SUBQUERY t1 index_subquery a a 5 func 2 100.00 Using where; Full scan on NULL key
+2 DEPENDENT SUBQUERY t1 ALL a NULL NULL NULL 8 100.00 Using where
Warnings:
Note 1276 Field or reference 'test.t2.oref' of SELECT #2 was resolved in SELECT #1
-Note 1003 /* select#1 */ select `test`.`t2`.`oref` AS `oref`,`test`.`t2`.`a` AS `a`,<expr_cache><`test`.`t2`.`a`,`test`.`t2`.`oref`>(<in_optimizer>(`test`.`t2`.`a`,<exists>(<index_lookup>(<cache>(`test`.`t2`.`a`) in t1 on a checking NULL where `test`.`t1`.`oref` = `test`.`t2`.`oref` having trigcond(`test`.`t1`.`a` is null))))) AS `Z` from `test`.`t2`
+Note 1003 /* select#1 */ select `test`.`t2`.`oref` AS `oref`,`test`.`t2`.`a` AS `a`,<expr_cache><`test`.`t2`.`a`,`test`.`t2`.`oref`>(<in_optimizer>(`test`.`t2`.`a`,<exists>(/* select#2 */ select `test`.`t1`.`a` from `test`.`t1` where `test`.`t1`.`oref` = `test`.`t2`.`oref` and trigcond(<cache>(`test`.`t2`.`a`) = `test`.`t1`.`a` or `test`.`t1`.`a` is null) having trigcond(`test`.`t1`.`a` is null)))) AS `Z` from `test`.`t2`
flush status;
select oref, a from t2 where a in (select a from t1 where oref=t2.oref);
oref a
diff --git a/mysql-test/main/subselect3_jcl6.result b/mysql-test/main/subselect3_jcl6.result
index 4260676cc37..aebeb4e0cc1 100644
--- a/mysql-test/main/subselect3_jcl6.result
+++ b/mysql-test/main/subselect3_jcl6.result
@@ -99,10 +99,10 @@ explain extended
select oref, a, a in (select a from t1 where oref=t2.oref) Z from t2;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t2 ALL NULL NULL NULL NULL 4 100.00
-2 DEPENDENT SUBQUERY t1 index_subquery a a 5 func 2 100.00 Using where; Full scan on NULL key
+2 DEPENDENT SUBQUERY t1 ALL a NULL NULL NULL 8 100.00 Using where
Warnings:
Note 1276 Field or reference 'test.t2.oref' of SELECT #2 was resolved in SELECT #1
-Note 1003 /* select#1 */ select `test`.`t2`.`oref` AS `oref`,`test`.`t2`.`a` AS `a`,<expr_cache><`test`.`t2`.`a`,`test`.`t2`.`oref`>(<in_optimizer>(`test`.`t2`.`a`,<exists>(<index_lookup>(<cache>(`test`.`t2`.`a`) in t1 on a checking NULL where `test`.`t1`.`oref` = `test`.`t2`.`oref` having trigcond(`test`.`t1`.`a` is null))))) AS `Z` from `test`.`t2`
+Note 1003 /* select#1 */ select `test`.`t2`.`oref` AS `oref`,`test`.`t2`.`a` AS `a`,<expr_cache><`test`.`t2`.`a`,`test`.`t2`.`oref`>(<in_optimizer>(`test`.`t2`.`a`,<exists>(/* select#2 */ select `test`.`t1`.`a` from `test`.`t1` where `test`.`t1`.`oref` = `test`.`t2`.`oref` and trigcond(<cache>(`test`.`t2`.`a`) = `test`.`t1`.`a` or `test`.`t1`.`a` is null) having trigcond(`test`.`t1`.`a` is null)))) AS `Z` from `test`.`t2`
flush status;
select oref, a from t2 where a in (select a from t1 where oref=t2.oref);
oref a
diff --git a/mysql-test/main/subselect4.result b/mysql-test/main/subselect4.result
index e4e9a5c8917..7b97f499768 100644
--- a/mysql-test/main/subselect4.result
+++ b/mysql-test/main/subselect4.result
@@ -1368,8 +1368,8 @@ GROUP BY SQ1_t1.f4));
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 system NULL NULL NULL NULL 1
2 SUBQUERY t2 ALL NULL NULL NULL NULL 2 Using where
-3 SUBQUERY SQ1_t1 index NULL f4 5 NULL 2 Using index; Using temporary
-3 SUBQUERY SQ1_t3 index f4 f4 5 NULL 2 Using where; Using index; Using join buffer (flat, BNL join)
+3 SUBQUERY SQ1_t3 range f4 f4 5 NULL 2 Using where; Using index; Using temporary
+3 SUBQUERY SQ1_t1 index NULL f4 5 NULL 2 Using index; Using join buffer (flat, BNL join)
SELECT * FROM t1 WHERE
(SELECT f2 FROM t2
WHERE f4 <= ALL
@@ -2784,12 +2784,13 @@ set names 'utf8';
# IN predicate to IN subquery is performed as materialization is llowed
# The character set on the inner side is a proper subset of the outer side
#
+# this test in 10.5 has only 2 rows in the IN predicate
EXPLAIN
-SELECT * FROM t2 WHERE (t2.a,t2.b) IN (('abx',1),('def',2), ('abc', 3));
+SELECT * FROM t2 WHERE (t2.a,t2.b) IN (('abc',1), ('def', 2));
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t2 ALL NULL NULL NULL NULL 5
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 16 func,func 1 Using where
-2 MATERIALIZED <derived3> ALL NULL NULL NULL NULL 3
+2 MATERIALIZED <derived3> ALL NULL NULL NULL NULL 2
3 DERIVED NULL NULL NULL NULL NULL NULL NULL No tables used
set names default;
set @@in_predicate_conversion_threshold= @save_in_predicate_conversion_threshold;
diff --git a/mysql-test/main/subselect4.test b/mysql-test/main/subselect4.test
index 329a6726a6b..2f65db875f8 100644
--- a/mysql-test/main/subselect4.test
+++ b/mysql-test/main/subselect4.test
@@ -2311,8 +2311,10 @@ set names 'utf8';
--echo # The character set on the inner side is a proper subset of the outer side
--echo #
+--echo # this test in 10.5 has only 2 rows in the IN predicate
+
EXPLAIN
-SELECT * FROM t2 WHERE (t2.a,t2.b) IN (('abx',1),('def',2), ('abc', 3));
+SELECT * FROM t2 WHERE (t2.a,t2.b) IN (('abc',1), ('def', 2));
set names default;
set @@in_predicate_conversion_threshold= @save_in_predicate_conversion_threshold;
diff --git a/mysql-test/main/subselect_cache.result b/mysql-test/main/subselect_cache.result
index abd978de9a5..e12facf8b8c 100644
--- a/mysql-test/main/subselect_cache.result
+++ b/mysql-test/main/subselect_cache.result
@@ -54,7 +54,8 @@ ANALYZE
"r_loops": 1,
"rows": 10,
"r_rows": 10,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100
},
@@ -73,7 +74,8 @@ ANALYZE
"r_loops": 4,
"rows": 4,
"r_rows": 4,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 18.75,
"attached_condition": "t1.b = t2.c"
@@ -98,7 +100,8 @@ ANALYZE
"r_loops": 1,
"rows": 10,
"r_rows": 10,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100
},
@@ -125,7 +128,8 @@ ANALYZE
"r_loops": 4,
"rows": 4,
"r_rows": 4,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 18.75,
"attached_condition": "t1.b = t2.c"
@@ -160,7 +164,8 @@ ANALYZE
"r_loops": 4,
"rows": 4,
"r_rows": 4,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 18.75,
"attached_condition": "t1.b = t2.c"
@@ -1860,8 +1865,8 @@ Variable_name Value
Subquery_cache_hit 0
Subquery_cache_miss 4
drop table t1;
-#test of sql_big_tables switch and outer table reference in subquery with grouping
-set big_tables=1;
+#test of big_tables switch and outer table reference in subquery with grouping
+set tmp_memory_table_size=0;
CREATE TABLE t1 (a INT PRIMARY KEY, b INT);
INSERT INTO t1 VALUES (1,1),(2,1),(3,2),(4,2),(5,3),(6,3);
SELECT (SELECT t1_outer.a FROM t1 AS t1_inner GROUP BY b LIMIT 1) FROM t1 AS t1_outer;
@@ -1873,7 +1878,7 @@ SELECT (SELECT t1_outer.a FROM t1 AS t1_inner GROUP BY b LIMIT 1) FROM t1 AS t1_
5
6
drop table t1;
-set big_tables=0;
+set tmp_memory_table_size=default;
#test of function reference to outer query
set local group_concat_max_len=400;
create table t2 (a int, b int);
diff --git a/mysql-test/main/subselect_cache.test b/mysql-test/main/subselect_cache.test
index 55da0000f13..8fcecf1281b 100644
--- a/mysql-test/main/subselect_cache.test
+++ b/mysql-test/main/subselect_cache.test
@@ -428,13 +428,13 @@ select a, a in (select a from t1 where -1 < benchmark(a,100)) from t1 as ext;
show status like "subquery_cache%";
drop table t1;
---echo #test of sql_big_tables switch and outer table reference in subquery with grouping
-set big_tables=1;
+--echo #test of big_tables switch and outer table reference in subquery with grouping
+set tmp_memory_table_size=0; # force on-disk tmp table
CREATE TABLE t1 (a INT PRIMARY KEY, b INT);
INSERT INTO t1 VALUES (1,1),(2,1),(3,2),(4,2),(5,3),(6,3);
SELECT (SELECT t1_outer.a FROM t1 AS t1_inner GROUP BY b LIMIT 1) FROM t1 AS t1_outer;
drop table t1;
-set big_tables=0;
+set tmp_memory_table_size=default;
--echo #test of function reference to outer query
set local group_concat_max_len=400;
diff --git a/mysql-test/main/subselect_innodb.result b/mysql-test/main/subselect_innodb.result
index f1e07ce09fe..73ca2640491 100644
--- a/mysql-test/main/subselect_innodb.result
+++ b/mysql-test/main/subselect_innodb.result
@@ -435,8 +435,7 @@ drop table t1;
#
drop table if exists `t1`,`t2`;
Warnings:
-Note 1051 Unknown table 'test.t1'
-Note 1051 Unknown table 'test.t2'
+Note 1051 Unknown table 'test.t1,test.t2'
create table `t1`(`a` char(1) character set utf8)engine=innodb;
create table `t2`(`b` char(1) character set utf8)engine=memory;
select distinct (select 1 from `t2` where `a`) `d2` from `t1`;
diff --git a/mysql-test/main/subselect_mat.result b/mysql-test/main/subselect_mat.result
index 34b58daa50e..5f38d2a5d35 100644
--- a/mysql-test/main/subselect_mat.result
+++ b/mysql-test/main/subselect_mat.result
@@ -105,7 +105,7 @@ explain extended
select * from t1i where a1 in (select b1 from t2i where b1 > '0');
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1i index NULL _it1_idx # NULL 3 100.00 Using where;
-2 MATERIALIZED t2i index it2i1,it2i3 it2i1 # NULL 5 100.00 Using where;
+2 MATERIALIZED t2i range it2i1,it2i3 it2i1 # NULL 5 100.00 Using where;
Warnings:
Note 1003 /* select#1 */ select `test`.`t1i`.`a1` AS `a1`,`test`.`t1i`.`a2` AS `a2` from `test`.`t1i` where <expr_cache><`test`.`t1i`.`a1`>(<in_optimizer>(`test`.`t1i`.`a1`,`test`.`t1i`.`a1` in ( <materialize> (/* select#2 */ select `test`.`t2i`.`b1` from `test`.`t2i` where `test`.`t2i`.`b1` > '0' ), <primary_index_lookup>(`test`.`t1i`.`a1` in <temporary table> on distinct_key where `test`.`t1i`.`a1` = `<subquery2>`.`b1`))))
select * from t1i where a1 in (select b1 from t2i where b1 > '0');
@@ -127,7 +127,7 @@ explain extended
select * from t1i where (a1, a2) in (select b1, b2 from t2i where b1 > '0');
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1i index NULL _it1_idx # NULL 3 100.00 Using where;
-2 MATERIALIZED t2i index it2i1,it2i3 it2i3 # NULL 5 100.00 Using where;
+2 MATERIALIZED t2i range it2i1,it2i3 it2i3 # NULL 5 100.00 Using where;
Warnings:
Note 1003 /* select#1 */ select `test`.`t1i`.`a1` AS `a1`,`test`.`t1i`.`a2` AS `a2` from `test`.`t1i` where <expr_cache><`test`.`t1i`.`a1`,`test`.`t1i`.`a2`>(<in_optimizer>((`test`.`t1i`.`a1`,`test`.`t1i`.`a2`),(`test`.`t1i`.`a1`,`test`.`t1i`.`a2`) in ( <materialize> (/* select#2 */ select `test`.`t2i`.`b1`,`test`.`t2i`.`b2` from `test`.`t2i` where `test`.`t2i`.`b1` > '0' ), <primary_index_lookup>(`test`.`t1i`.`a1` in <temporary table> on distinct_key where `test`.`t1i`.`a1` = `<subquery2>`.`b1` and `test`.`t1i`.`a2` = `<subquery2>`.`b2`))))
select * from t1i where (a1, a2) in (select b1, b2 from t2i where b1 > '0');
@@ -340,7 +340,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1i index NULL # # # 3 100.00 #
3 MATERIALIZED t3i index NULL # # # 4 100.00 #
4 MATERIALIZED t2i index it2i2 # # # 5 100.00 #
-2 MATERIALIZED t2i index it2i1,it2i3 # # # 5 100.00 #
+2 MATERIALIZED t2i range it2i1,it2i3 # # # 5 100.00 #
Warnings:
Note 1003 /* select#1 */ select `test`.`t1i`.`a1` AS `a1`,`test`.`t1i`.`a2` AS `a2` from `test`.`t1i` where <expr_cache><`test`.`t1i`.`a1`,`test`.`t1i`.`a2`>(<in_optimizer>((`test`.`t1i`.`a1`,`test`.`t1i`.`a2`),(`test`.`t1i`.`a1`,`test`.`t1i`.`a2`) in ( <materialize> (/* select#2 */ select `test`.`t2i`.`b1`,`test`.`t2i`.`b2` from `test`.`t2i` where `test`.`t2i`.`b1` > '0' ), <primary_index_lookup>(`test`.`t1i`.`a1` in <temporary table> on distinct_key where `test`.`t1i`.`a1` = `<subquery2>`.`b1` and `test`.`t1i`.`a2` = `<subquery2>`.`b2`)))) and <expr_cache><`test`.`t1i`.`a1`,`test`.`t1i`.`a2`>(<in_optimizer>((`test`.`t1i`.`a1`,`test`.`t1i`.`a2`),(`test`.`t1i`.`a1`,`test`.`t1i`.`a2`) in ( <materialize> (/* select#3 */ select `test`.`t3i`.`c1`,`test`.`t3i`.`c2` from `test`.`t3i` where <expr_cache><`test`.`t3i`.`c1`,`test`.`t3i`.`c2`>(<in_optimizer>((`test`.`t3i`.`c1`,`test`.`t3i`.`c2`),(`test`.`t3i`.`c1`,`test`.`t3i`.`c2`) in ( <materialize> (/* select#4 */ select `test`.`t2i`.`b1`,`test`.`t2i`.`b2` from `test`.`t2i` where `test`.`t2i`.`b2` > '0' ), <primary_index_lookup>(`test`.`t3i`.`c1` in <temporary table> on distinct_key where `test`.`t3i`.`c1` = `<subquery4>`.`b1` and `test`.`t3i`.`c2` = `<subquery4>`.`b2`)))) ), <primary_index_lookup>(`test`.`t1i`.`a1` in <temporary table> on distinct_key where `test`.`t1i`.`a1` = `<subquery3>`.`c1` and `test`.`t1i`.`a2` = `<subquery3>`.`c2`))))
select * from t1i
@@ -423,7 +423,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
7 UNION t1i index NULL # # # 3 100.00 #
9 MATERIALIZED t3i index NULL # # # 4 100.00 #
10 MATERIALIZED t2i index it2i2 # # # 5 100.00 #
-8 MATERIALIZED t2i index it2i1,it2i3 # # # 5 100.00 #
+8 MATERIALIZED t2i range it2i1,it2i3 # # # 5 100.00 #
NULL UNION RESULT <union1,7> ALL NULL # # # NULL NULL #
Warnings:
Note 1003 (/* select#1 */ select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2` from `test`.`t1` where <expr_cache><`test`.`t1`.`a1`,`test`.`t1`.`a2`>(<in_optimizer>((`test`.`t1`.`a1`,`test`.`t1`.`a2`),(`test`.`t1`.`a1`,`test`.`t1`.`a2`) in ( <materialize> (/* select#2 */ select `test`.`t2`.`b1`,`test`.`t2`.`b2` from `test`.`t2` where <expr_cache><`test`.`t2`.`b2`>(<in_optimizer>(`test`.`t2`.`b2`,`test`.`t2`.`b2` in ( <materialize> (/* select#3 */ select `test`.`t3`.`c2` from `test`.`t3` where `test`.`t3`.`c2` like '%02' ), <primary_index_lookup>(`test`.`t2`.`b2` in <temporary table> on distinct_key where `test`.`t2`.`b2` = `<subquery3>`.`c2`)))) or <expr_cache><`test`.`t2`.`b2`>(<in_optimizer>(`test`.`t2`.`b2`,`test`.`t2`.`b2` in ( <materialize> (/* select#4 */ select `test`.`t3`.`c2` from `test`.`t3` where `test`.`t3`.`c2` like '%03' ), <primary_index_lookup>(`test`.`t2`.`b2` in <temporary table> on distinct_key where `test`.`t2`.`b2` = `<subquery4>`.`c2`)))) ), <primary_index_lookup>(`test`.`t1`.`a1` in <temporary table> on distinct_key where `test`.`t1`.`a1` = `<subquery2>`.`b1` and `test`.`t1`.`a2` = `<subquery2>`.`b2`)))) and <expr_cache><`test`.`t1`.`a1`,`test`.`t1`.`a2`>(<in_optimizer>((`test`.`t1`.`a1`,`test`.`t1`.`a2`),(`test`.`t1`.`a1`,`test`.`t1`.`a2`) in ( <materialize> (/* select#5 */ select `test`.`t3`.`c1`,`test`.`t3`.`c2` from `test`.`t3` where <expr_cache><`test`.`t3`.`c1`,`test`.`t3`.`c2`>(<in_optimizer>((`test`.`t3`.`c1`,`test`.`t3`.`c2`),(`test`.`t3`.`c1`,`test`.`t3`.`c2`) in ( <materialize> (/* select#6 */ select `test`.`t2i`.`b1`,`test`.`t2i`.`b2` from `test`.`t2i` where `test`.`t2i`.`b2` > '0' ), <primary_index_lookup>(`test`.`t3`.`c1` in <temporary table> on distinct_key where `test`.`t3`.`c1` = `<subquery6>`.`b1` and `test`.`t3`.`c2` = `<subquery6>`.`b2`)))) ), <primary_index_lookup>(`test`.`t1`.`a1` in <temporary table> on distinct_key where `test`.`t1`.`a1` = `<subquery5>`.`c1` and `test`.`t1`.`a2` = `<subquery5>`.`c2`))))) union (/* select#7 */ select `test`.`t1i`.`a1` AS `a1`,`test`.`t1i`.`a2` AS `a2` from `test`.`t1i` where <expr_cache><`test`.`t1i`.`a1`,`test`.`t1i`.`a2`>(<in_optimizer>((`test`.`t1i`.`a1`,`test`.`t1i`.`a2`),(`test`.`t1i`.`a1`,`test`.`t1i`.`a2`) in ( <materialize> (/* select#8 */ select `test`.`t2i`.`b1`,`test`.`t2i`.`b2` from `test`.`t2i` where `test`.`t2i`.`b1` > '0' ), <primary_index_lookup>(`test`.`t1i`.`a1` in <temporary table> on distinct_key where `test`.`t1i`.`a1` = `<subquery8>`.`b1` and `test`.`t1i`.`a2` = `<subquery8>`.`b2`)))) and <expr_cache><`test`.`t1i`.`a1`,`test`.`t1i`.`a2`>(<in_optimizer>((`test`.`t1i`.`a1`,`test`.`t1i`.`a2`),(`test`.`t1i`.`a1`,`test`.`t1i`.`a2`) in ( <materialize> (/* select#9 */ select `test`.`t3i`.`c1`,`test`.`t3i`.`c2` from `test`.`t3i` where <expr_cache><`test`.`t3i`.`c1`,`test`.`t3i`.`c2`>(<in_optimizer>((`test`.`t3i`.`c1`,`test`.`t3i`.`c2`),(`test`.`t3i`.`c1`,`test`.`t3i`.`c2`) in ( <materialize> (/* select#10 */ select `test`.`t2i`.`b1`,`test`.`t2i`.`b2` from `test`.`t2i` where `test`.`t2i`.`b2` > '0' ), <primary_index_lookup>(`test`.`t3i`.`c1` in <temporary table> on distinct_key where `test`.`t3i`.`c1` = `<subquery10>`.`b1` and `test`.`t3i`.`c2` = `<subquery10>`.`b2`)))) ), <primary_index_lookup>(`test`.`t1i`.`a1` in <temporary table> on distinct_key where `test`.`t1i`.`a1` = `<subquery9>`.`c1` and `test`.`t1i`.`a2` = `<subquery9>`.`c2`)))))
@@ -1142,7 +1142,7 @@ a
explain extended
select a from t1 group by a having a in (select c from t2 where d >= 20);
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 PRIMARY t1 index NULL it1a 4 NULL 7 100.00 Using index
+1 PRIMARY t1 range NULL it1a 4 NULL 8 100.00 Using index for group-by
2 MATERIALIZED t2 ALL NULL NULL NULL NULL 7 100.00 Using where
Warnings:
Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a` from `test`.`t1` group by `test`.`t1`.`a` having <expr_cache><`test`.`t1`.`a`>(<in_optimizer>(`test`.`t1`.`a`,`test`.`t1`.`a` in ( <materialize> (/* select#2 */ select `test`.`t2`.`c` from `test`.`t2` where `test`.`t2`.`d` >= 20 ), <primary_index_lookup>(`test`.`t1`.`a` in <temporary table> on distinct_key where `test`.`t1`.`a` = `<subquery2>`.`c`))))
@@ -1154,7 +1154,7 @@ create index iab on t1(a, b);
explain extended
select a from t1 group by a having a in (select c from t2 where d >= 20);
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 PRIMARY t1 index NULL it1a 4 NULL 7 100.00 Using index
+1 PRIMARY t1 range NULL it1a 4 NULL 8 100.00 Using index for group-by
2 MATERIALIZED t2 ALL NULL NULL NULL NULL 7 100.00 Using where
Warnings:
Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a` from `test`.`t1` group by `test`.`t1`.`a` having <expr_cache><`test`.`t1`.`a`>(<in_optimizer>(`test`.`t1`.`a`,`test`.`t1`.`a` in ( <materialize> (/* select#2 */ select `test`.`t2`.`c` from `test`.`t2` where `test`.`t2`.`d` >= 20 ), <primary_index_lookup>(`test`.`t1`.`a` in <temporary table> on distinct_key where `test`.`t1`.`a` = `<subquery2>`.`c`))))
@@ -1166,7 +1166,7 @@ explain extended
select a from t1 group by a
having a in (select c from t2 where d >= some(select e from t3 where max(b)=e));
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 PRIMARY t1 index NULL iab 8 NULL 7 100.00 Using index
+1 PRIMARY t1 range NULL iab 4 NULL 8 100.00 Using index for group-by
2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 7 100.00 Using where
3 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 4 100.00 Using where
Warnings:
@@ -1889,8 +1889,8 @@ WHERE alias4.c = alias3.b
);
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
-3 MATERIALIZED alias3 ALL NULL NULL NULL NULL 2
-3 MATERIALIZED alias4 index c c 11 NULL 2 Using where; Using index; Using join buffer (flat, BNL join)
+3 MATERIALIZED alias3 ALL NULL NULL NULL NULL 2 Using where
+3 MATERIALIZED alias4 ref c c 11 test.alias3.b 2 Using where; Using index
DROP TABLE t1,t2;
#
# BUG#928048: Query containing IN subquery with OR in the where clause returns a wrong result
@@ -2118,8 +2118,7 @@ DROP VIEW v2;
#
# MDEV-5811: Server crashes in best_access_path with materialization+semijoin and big_tables=ON
#
-SET @tmp_mdev5811= @@big_tables;
-SET big_tables = ON;
+set tmp_memory_table_size=0;
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (1),(2);
CREATE TABLE t2 (b INT);
@@ -2128,7 +2127,7 @@ SELECT * FROM t1 AS t1_1, t1 AS t1_2
WHERE ( t1_1.a, t1_2.a ) IN ( SELECT MAX(b), MIN(b) FROM t2 );
a a
DROP TABLE t1,t2;
-SET big_tables=@tmp_mdev5811;
+set tmp_memory_table_size=default;
# End of 5.3 tests
#
# MDEV-5056: Wrong result (extra rows) with materialization+semijoin, IN subqueries
@@ -2277,7 +2276,7 @@ WHERE i3 = i2 AND f1 IN ( SELECT f3 FROM t3 ) );
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 2 100.00 Using where
2 DEPENDENT SUBQUERY <subquery3> eq_ref distinct_key distinct_key 4 func 1 100.00
-2 DEPENDENT SUBQUERY t2 index i2 i2 5 NULL 3 100.00 Using where; Using index; Using join buffer (flat, BNL join)
+2 DEPENDENT SUBQUERY t2 range i2 i2 5 NULL 3 100.00 Using where; Using index; Using join buffer (flat, BNL join)
2 DEPENDENT SUBQUERY t3 ref i3 i3 5 test.t2.i2 2 100.00 Using index
3 MATERIALIZED t3 ALL NULL NULL NULL NULL 8 100.00
Warnings:
diff --git a/mysql-test/main/subselect_mat_cost.result b/mysql-test/main/subselect_mat_cost.result
index 083917cef7e..66d48b549c4 100644
--- a/mysql-test/main/subselect_mat_cost.result
+++ b/mysql-test/main/subselect_mat_cost.result
@@ -289,7 +289,7 @@ AND Code = Country;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY CountryLanguage range PRIMARY,Language Language 30 NULL 44 Using index condition; Rowid-ordered scan
1 PRIMARY Country eq_ref PRIMARY PRIMARY 3 world.CountryLanguage.Country 1 Using where
-3 MATERIALIZED CountryLanguage ref PRIMARY,Language Language 30 const 48 Using index condition
+3 DEPENDENT SUBQUERY CountryLanguage unique_subquery PRIMARY,Language PRIMARY 33 func,const 1 Using index; Using where
set statement optimizer_switch='rowid_filter=off' for
SELECT Country.Name
FROM Country, CountryLanguage
diff --git a/mysql-test/main/subselect_mat_cost_bugs.result b/mysql-test/main/subselect_mat_cost_bugs.result
index ecceac27b2d..6a218ed5e04 100644
--- a/mysql-test/main/subselect_mat_cost_bugs.result
+++ b/mysql-test/main/subselect_mat_cost_bugs.result
@@ -196,8 +196,8 @@ ORDER BY field1 ;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY <derived2> ALL NULL NULL NULL NULL 2 Using where; Using filesort
1 PRIMARY alias1 eq_ref PRIMARY PRIMARY 4 alias2.f3 1 Using index
-3 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 2
-3 DEPENDENT SUBQUERY t1 index PRIMARY PRIMARY 4 NULL 2 Using where; Using index; Using join buffer (flat, BNL join)
+3 DEPENDENT SUBQUERY t1 range PRIMARY PRIMARY 4 NULL 2 Using where; Using index
+3 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 2 Using join buffer (flat, BNL join)
2 DERIVED t2 ALL NULL NULL NULL NULL 2
SELECT alias2.f2 AS field1
FROM t1 AS alias1 JOIN ( SELECT * FROM t2 ) AS alias2 ON alias2.f3 = alias1.f1
@@ -316,7 +316,7 @@ explain
select c1 from t1 where c1 in (select kp1 from t2 where kp2 = 10 and c2 = 4) or c1 > 7;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 3 Using where
-2 DEPENDENT SUBQUERY t2 index_subquery key1,key2,key3 key1 10 func,const 1 Using where
+2 DEPENDENT SUBQUERY t2 ref key1,key2,key3 key3 5 const 1 Using where
select c1 from t1 where c1 in (select kp1 from t2 where kp2 = 10 and c2 = 4) or c1 > 7;
c1
set @@optimizer_switch='default';
diff --git a/mysql-test/main/subselect_no_exists_to_in.result b/mysql-test/main/subselect_no_exists_to_in.result
index b1432cf0979..70add4d1740 100644
--- a/mysql-test/main/subselect_no_exists_to_in.result
+++ b/mysql-test/main/subselect_no_exists_to_in.result
@@ -686,8 +686,6 @@ x
3
11
11
-INSERT DELAYED INTO t1 (x) VALUES ((SELECT SUM(x) FROM t2));
-ERROR 42S22: Unknown column 'x' in 'field list'
INSERT DELAYED INTO t1 (x) VALUES ((SELECT SUM(a) FROM t2));
select * from t1;
x
@@ -1509,7 +1507,7 @@ 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 a a 5 NULL 4 100.00 Using where; Using index
-1 PRIMARY t3 index a a 5 NULL 3 100.00 Using where; Using index
+1 PRIMARY t3 range a a 5 NULL 3 100.00 Using where; Using index
1 PRIMARY t1 ref a a 10 test.t2.a,test.t3.a 116 100.00 Using index; FirstMatch(t2)
Warnings:
Note 1003 select `test`.`t2`.`a` AS `a` from `test`.`t2` semi join (`test`.`t1` join `test`.`t3`) where `test`.`t1`.`b` = `test`.`t3`.`a` and `test`.`t1`.`a` = `test`.`t2`.`a`
@@ -3181,7 +3179,7 @@ INSERT INTO t2 VALUES (1),(2),(3);
EXPLAIN SELECT a, a IN (SELECT a FROM t1) FROM t2;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t2 ALL NULL NULL NULL NULL 3
-2 SUBQUERY t1 index_subquery a a 5 func 2 Using index; Full scan on NULL key
+2 SUBQUERY t1 index_subquery a a 5 func 3 Using index; Full scan on NULL key
SELECT a, a IN (SELECT a FROM t1) FROM t2;
a a IN (SELECT a FROM t1)
1 1
@@ -7042,8 +7040,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 t2 ALL NULL NULL NULL NULL 2 Using where
-2 SUBQUERY <subquery3> eq_ref distinct_key distinct_key 4 test.t2.c 1
+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)
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;
@@ -7134,7 +7132,7 @@ drop table t1,t2,t3,t4;
# MDEV-7122
# Assertion `0' failed in subselect_hash_sj_engine::init
#
-SET SESSION big_tables=1;
+set tmp_memory_table_size=0;
CREATE TABLE t1(a char(255) DEFAULT '', KEY(a(10))) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
INSERT INTO t1 VALUES(0),(0),(0);
SELECT * FROM t1 WHERE a IN(SELECT MIN(a) FROM t1);
@@ -7143,7 +7141,7 @@ a
0
0
DROP TABLE t1;
-SET SESSION big_tables=0;
+set tmp_memory_table_size=default;
#
# MDEV-10776: Server crash on query
#
diff --git a/mysql-test/main/subselect_no_mat.result b/mysql-test/main/subselect_no_mat.result
index da60f98bf00..f0c7033803c 100644
--- a/mysql-test/main/subselect_no_mat.result
+++ b/mysql-test/main/subselect_no_mat.result
@@ -689,8 +689,6 @@ x
3
11
11
-INSERT DELAYED INTO t1 (x) VALUES ((SELECT SUM(x) FROM t2));
-ERROR 42S22: Unknown column 'x' in 'field list'
INSERT DELAYED INTO t1 (x) VALUES ((SELECT SUM(a) FROM t2));
select * from t1;
x
@@ -1512,7 +1510,7 @@ 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 a a 5 NULL 4 100.00 Using where; Using index
-1 PRIMARY t3 index a a 5 NULL 3 100.00 Using where; Using index
+1 PRIMARY t3 range a a 5 NULL 3 100.00 Using where; Using index
1 PRIMARY t1 ref a a 10 test.t2.a,test.t3.a 116 100.00 Using index; FirstMatch(t2)
Warnings:
Note 1003 select `test`.`t2`.`a` AS `a` from `test`.`t2` semi join (`test`.`t1` join `test`.`t3`) where `test`.`t1`.`b` = `test`.`t3`.`a` and `test`.`t1`.`a` = `test`.`t2`.`a`
@@ -3183,7 +3181,7 @@ INSERT INTO t2 VALUES (1),(2),(3);
EXPLAIN SELECT a, a IN (SELECT a FROM t1) FROM t2;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t2 ALL NULL NULL NULL NULL 3
-2 SUBQUERY t1 index_subquery a a 5 func 2 Using index; Full scan on NULL key
+2 SUBQUERY t1 index_subquery a a 5 func 3 Using index; Full scan on NULL key
SELECT a, a IN (SELECT a FROM t1) FROM t2;
a a IN (SELECT a FROM t1)
1 1
@@ -7127,7 +7125,7 @@ drop table t1,t2,t3,t4;
# MDEV-7122
# Assertion `0' failed in subselect_hash_sj_engine::init
#
-SET SESSION big_tables=1;
+set tmp_memory_table_size=0;
CREATE TABLE t1(a char(255) DEFAULT '', KEY(a(10))) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
INSERT INTO t1 VALUES(0),(0),(0);
SELECT * FROM t1 WHERE a IN(SELECT MIN(a) FROM t1);
@@ -7136,7 +7134,7 @@ a
0
0
DROP TABLE t1;
-SET SESSION big_tables=0;
+set tmp_memory_table_size=default;
#
# MDEV-10776: Server crash on query
#
diff --git a/mysql-test/main/subselect_no_opts.result b/mysql-test/main/subselect_no_opts.result
index fb99e237a1c..8ff79c1790b 100644
--- a/mysql-test/main/subselect_no_opts.result
+++ b/mysql-test/main/subselect_no_opts.result
@@ -685,8 +685,6 @@ x
3
11
11
-INSERT DELAYED INTO t1 (x) VALUES ((SELECT SUM(x) FROM t2));
-ERROR 42S22: Unknown column 'x' in 'field list'
INSERT DELAYED INTO t1 (x) VALUES ((SELECT SUM(a) FROM t2));
select * from t1;
x
@@ -1618,7 +1616,7 @@ 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; 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 having trigcond(`test`.`t2`.`s1` is null)))) AS `s1 NOT IN (SELECT s1 FROM t2)` from `test`.`t1`
+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 having trigcond(`test`.`t2`.`s1` is null))))) AS `s1 NOT IN (SELECT s1 FROM t2)` from `test`.`t1`
explain extended select s1, s1 = ANY (SELECT s1 FROM t2) 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
@@ -1630,13 +1628,13 @@ 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; 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 having trigcond(`test`.`t2`.`s1` is null)))) AS `s1 <> ALL (SELECT s1 FROM t2)` from `test`.`t1`
+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 having trigcond(`test`.`t2`.`s1` is null))))) AS `s1 <> ALL (SELECT s1 FROM t2)` from `test`.`t1`
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 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`
+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;
create table t2 (a int, b int not null);
create table t3 (a int);
@@ -1891,7 +1889,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 12 100.00 Using where
2 DEPENDENT SUBQUERY t1 unique_subquery PRIMARY PRIMARY 4 func 1 100.00 Using index; Using where
Warnings:
-Note 1003 /* select#1 */ select `test`.`t1`.`id` AS `id`,`test`.`t1`.`text` AS `text` from `test`.`t1` where !<in_optimizer>(`test`.`t1`.`id`,<exists>(<primary_index_lookup>(<cache>(`test`.`t1`.`id`) in t1 on PRIMARY where `test`.`t1`.`id` < 8 and <cache>(`test`.`t1`.`id`) = `test`.`t1`.`id`)))
+Note 1003 /* select#1 */ select `test`.`t1`.`id` AS `id`,`test`.`t1`.`text` AS `text` from `test`.`t1` where !(<in_optimizer>(`test`.`t1`.`id`,<exists>(<primary_index_lookup>(<cache>(`test`.`t1`.`id`) in t1 on PRIMARY where `test`.`t1`.`id` < 8 and <cache>(`test`.`t1`.`id`) = `test`.`t1`.`id`))))
explain extended select * from t1 as tt where not exists (select id from t1 where id < 8 and (id = tt.id or id is null) having id is not null);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY tt ALL NULL NULL NULL NULL 12 100.00 Using where
@@ -3179,7 +3177,7 @@ INSERT INTO t2 VALUES (1),(2),(3);
EXPLAIN SELECT a, a IN (SELECT a FROM t1) FROM t2;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t2 ALL NULL NULL NULL NULL 3
-2 SUBQUERY t1 index_subquery a a 5 func 2 Using index; Full scan on NULL key
+2 SUBQUERY t1 index_subquery a a 5 func 3 Using index; Full scan on NULL key
SELECT a, a IN (SELECT a FROM t1) FROM t2;
a a IN (SELECT a FROM t1)
1 1
@@ -7033,8 +7031,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 t2 ALL NULL NULL NULL NULL 2 Using where
-2 SUBQUERY <subquery3> eq_ref distinct_key distinct_key 4 test.t2.c 1
+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)
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;
@@ -7125,7 +7123,7 @@ drop table t1,t2,t3,t4;
# MDEV-7122
# Assertion `0' failed in subselect_hash_sj_engine::init
#
-SET SESSION big_tables=1;
+set tmp_memory_table_size=0;
CREATE TABLE t1(a char(255) DEFAULT '', KEY(a(10))) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
INSERT INTO t1 VALUES(0),(0),(0);
SELECT * FROM t1 WHERE a IN(SELECT MIN(a) FROM t1);
@@ -7134,7 +7132,7 @@ a
0
0
DROP TABLE t1;
-SET SESSION big_tables=0;
+set tmp_memory_table_size=default;
#
# MDEV-10776: Server crash on query
#
diff --git a/mysql-test/main/subselect_no_scache.result b/mysql-test/main/subselect_no_scache.result
index 4b910009248..37ca0d4c030 100644
--- a/mysql-test/main/subselect_no_scache.result
+++ b/mysql-test/main/subselect_no_scache.result
@@ -688,8 +688,6 @@ x
3
11
11
-INSERT DELAYED INTO t1 (x) VALUES ((SELECT SUM(x) FROM t2));
-ERROR 42S22: Unknown column 'x' in 'field list'
INSERT DELAYED INTO t1 (x) VALUES ((SELECT SUM(a) FROM t2));
select * from t1;
x
@@ -1511,7 +1509,7 @@ 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 a a 5 NULL 4 100.00 Using where; Using index
-1 PRIMARY t3 index a a 5 NULL 3 100.00 Using where; Using index
+1 PRIMARY t3 range a a 5 NULL 3 100.00 Using where; Using index
1 PRIMARY t1 ref a a 10 test.t2.a,test.t3.a 116 100.00 Using index; FirstMatch(t2)
Warnings:
Note 1003 select `test`.`t2`.`a` AS `a` from `test`.`t2` semi join (`test`.`t1` join `test`.`t3`) where `test`.`t1`.`b` = `test`.`t3`.`a` and `test`.`t1`.`a` = `test`.`t2`.`a`
@@ -1621,7 +1619,7 @@ 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; 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 having trigcond(`test`.`t2`.`s1` is null)))) AS `s1 NOT IN (SELECT s1 FROM t2)` from `test`.`t1`
+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 having trigcond(`test`.`t2`.`s1` is null))))) AS `s1 NOT IN (SELECT s1 FROM t2)` from `test`.`t1`
explain extended select s1, s1 = ANY (SELECT s1 FROM t2) 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
@@ -1633,13 +1631,13 @@ 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; 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 having trigcond(`test`.`t2`.`s1` is null)))) AS `s1 <> ALL (SELECT s1 FROM t2)` from `test`.`t1`
+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 having trigcond(`test`.`t2`.`s1` is null))))) AS `s1 <> ALL (SELECT s1 FROM t2)` from `test`.`t1`
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 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`
+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;
create table t2 (a int, b int not null);
create table t3 (a int);
@@ -1894,7 +1892,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 12 100.00 Using where
2 DEPENDENT SUBQUERY t1 unique_subquery PRIMARY PRIMARY 4 func 1 100.00 Using index; Using where
Warnings:
-Note 1003 /* select#1 */ select `test`.`t1`.`id` AS `id`,`test`.`t1`.`text` AS `text` from `test`.`t1` where !<in_optimizer>(`test`.`t1`.`id`,<exists>(<primary_index_lookup>(<cache>(`test`.`t1`.`id`) in t1 on PRIMARY where `test`.`t1`.`id` < 8 and <cache>(`test`.`t1`.`id`) = `test`.`t1`.`id`)))
+Note 1003 /* select#1 */ select `test`.`t1`.`id` AS `id`,`test`.`t1`.`text` AS `text` from `test`.`t1` where !(<in_optimizer>(`test`.`t1`.`id`,<exists>(<primary_index_lookup>(<cache>(`test`.`t1`.`id`) in t1 on PRIMARY where `test`.`t1`.`id` < 8 and <cache>(`test`.`t1`.`id`) = `test`.`t1`.`id`))))
explain extended select * from t1 as tt where not exists (select id from t1 where id < 8 and (id = tt.id or id is null) having id is not null);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY tt ALL NULL NULL NULL NULL 12 100.00 Using where
@@ -3184,7 +3182,7 @@ INSERT INTO t2 VALUES (1),(2),(3);
EXPLAIN SELECT a, a IN (SELECT a FROM t1) FROM t2;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t2 ALL NULL NULL NULL NULL 3
-2 SUBQUERY t1 index_subquery a a 5 func 2 Using index; Full scan on NULL key
+2 SUBQUERY t1 index_subquery a a 5 func 3 Using index; Full scan on NULL key
SELECT a, a IN (SELECT a FROM t1) FROM t2;
a a IN (SELECT a FROM t1)
1 1
@@ -7048,8 +7046,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 t2 ALL NULL NULL NULL NULL 2 Using where
-2 SUBQUERY <subquery3> eq_ref distinct_key distinct_key 4 test.t2.c 1
+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)
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;
@@ -7140,7 +7138,7 @@ drop table t1,t2,t3,t4;
# MDEV-7122
# Assertion `0' failed in subselect_hash_sj_engine::init
#
-SET SESSION big_tables=1;
+set tmp_memory_table_size=0;
CREATE TABLE t1(a char(255) DEFAULT '', KEY(a(10))) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
INSERT INTO t1 VALUES(0),(0),(0);
SELECT * FROM t1 WHERE a IN(SELECT MIN(a) FROM t1);
@@ -7149,7 +7147,7 @@ a
0
0
DROP TABLE t1;
-SET SESSION big_tables=0;
+set tmp_memory_table_size=default;
#
# MDEV-10776: Server crash on query
#
diff --git a/mysql-test/main/subselect_no_semijoin.result b/mysql-test/main/subselect_no_semijoin.result
index f2230718754..1abdde5ff7f 100644
--- a/mysql-test/main/subselect_no_semijoin.result
+++ b/mysql-test/main/subselect_no_semijoin.result
@@ -685,8 +685,6 @@ x
3
11
11
-INSERT DELAYED INTO t1 (x) VALUES ((SELECT SUM(x) FROM t2));
-ERROR 42S22: Unknown column 'x' in 'field list'
INSERT DELAYED INTO t1 (x) VALUES ((SELECT SUM(a) FROM t2));
select * from t1;
x
@@ -1634,7 +1632,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 MATERIALIZED t2 index s1 s1 6 NULL 2 50.00 Using where; Using index
+2 MATERIALIZED t2 range s1 s1 6 NULL 1 100.00 Using where; Using index
Warnings:
Note 1003 /* select#1 */ select `test`.`t1`.`s1` AS `s1`,!<expr_cache><`test`.`t1`.`s1`>(<in_optimizer>(`test`.`t1`.`s1`,`test`.`t1`.`s1` in ( <materialize> (/* select#2 */ select `test`.`t2`.`s1` from `test`.`t2` where `test`.`t2`.`s1` < 'a2' ), <primary_index_lookup>(`test`.`t1`.`s1` in <temporary table> on distinct_key where `test`.`t1`.`s1` = `<subquery2>`.`s1`)))) AS `s1 NOT IN (SELECT s1 FROM t2 WHERE s1 < 'a2')` from `test`.`t1`
drop table t1,t2;
@@ -7033,8 +7031,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 t2 ALL NULL NULL NULL NULL 2 Using where
-2 SUBQUERY <subquery3> eq_ref distinct_key distinct_key 4 test.t2.c 1
+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)
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;
@@ -7125,7 +7123,7 @@ drop table t1,t2,t3,t4;
# MDEV-7122
# Assertion `0' failed in subselect_hash_sj_engine::init
#
-SET SESSION big_tables=1;
+set tmp_memory_table_size=0;
CREATE TABLE t1(a char(255) DEFAULT '', KEY(a(10))) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
INSERT INTO t1 VALUES(0),(0),(0);
SELECT * FROM t1 WHERE a IN(SELECT MIN(a) FROM t1);
@@ -7134,7 +7132,7 @@ a
0
0
DROP TABLE t1;
-SET SESSION big_tables=0;
+set tmp_memory_table_size=default;
#
# MDEV-10776: Server crash on query
#
diff --git a/mysql-test/main/subselect_partial_match.result b/mysql-test/main/subselect_partial_match.result
index 5f444457794..52c30492675 100644
--- a/mysql-test/main/subselect_partial_match.result
+++ b/mysql-test/main/subselect_partial_match.result
@@ -775,7 +775,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
2 DERIVED t1 ALL NULL NULL NULL NULL 2 100.00 Using where
3 MATERIALIZED t2 ALL NULL NULL NULL NULL 2 100.00
Warnings:
-Note 1003 /* select#1 */ select `table1`.`a1` AS `a1`,`table1`.`a2` AS `a2` from (/* select#2 */ select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2` from `test`.`t1` where !<in_optimizer>(`test`.`t1`.`a1`,`test`.`t1`.`a1` in ( <materialize> (/* select#3 */ select `test`.`t2`.`b2` from `test`.`t2` ), <primary_index_lookup>(`test`.`t1`.`a1` in <temporary table> on distinct_key where `test`.`t1`.`a1` = `<subquery3>`.`b2`)))) `table1`
+Note 1003 /* select#1 */ select `table1`.`a1` AS `a1`,`table1`.`a2` AS `a2` from (/* select#2 */ select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2` from `test`.`t1` where !(<in_optimizer>(`test`.`t1`.`a1`,`test`.`t1`.`a1` in ( <materialize> (/* select#3 */ select `test`.`t2`.`b2` from `test`.`t2` ), <primary_index_lookup>(`test`.`t1`.`a1` in <temporary table> on distinct_key where `test`.`t1`.`a1` = `<subquery3>`.`b2`))))) `table1`
set optimizer_switch=@tmp_optimizer_switch;
DROP TABLE t1, t2;
#
diff --git a/mysql-test/main/subselect_sj.result b/mysql-test/main/subselect_sj.result
index f3519e1d846..b4ad66458dc 100644
--- a/mysql-test/main/subselect_sj.result
+++ b/mysql-test/main/subselect_sj.result
@@ -2768,8 +2768,8 @@ SELECT * FROM t1 AS t1_1, t1 AS t1_2
WHERE (t1_1.a, t1_2.a) IN ( SELECT a, b FROM v1 );
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1_1 ALL NULL NULL NULL NULL 11 Using where
-1 PRIMARY <derived3> ref key0 key0 5 test.t1_1.a 2 Start temporary
-1 PRIMARY t1_2 ALL NULL NULL NULL NULL 11 Using where; End temporary
+1 PRIMARY t1_2 ALL NULL NULL NULL NULL 11
+1 PRIMARY <derived3> ref key0 key0 5 test.t1_1.a 2 Using where; FirstMatch(t1_2)
3 DERIVED t1 ALL NULL NULL NULL NULL 11
SELECT * FROM t1 AS t1_1, t1 AS t1_2
WHERE (t1_1.a, t1_2.a) IN ( SELECT a, b FROM v1 );
@@ -2777,10 +2777,10 @@ a b a b
3 1 9 1
5 8 4 0
3 9 9 1
-2 4 6 8
2 4 4 0
-2 6 6 8
+2 4 6 8
2 6 4 0
+2 6 6 8
5 4 4 0
7 7 7 7
5 4 4 0
@@ -2927,8 +2927,8 @@ alias2.col_int_key = alias1.col_int_key
WHERE alias1.pk = 58 OR alias1.col_varchar_key = 'o'
);
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t2 ALL NULL NULL NULL NULL 2
1 PRIMARY alias1 index_merge PRIMARY,col_int_key,col_varchar_key PRIMARY,col_varchar_key 4,4 NULL 2 Using sort_union(PRIMARY,col_varchar_key); Using where; Start temporary
+1 PRIMARY t2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join)
1 PRIMARY alias2 ALL col_int_key NULL NULL NULL 12 Range checked for each record (index map: 0x2); End temporary
SELECT *
FROM t2
diff --git a/mysql-test/main/subselect_sj2.result b/mysql-test/main/subselect_sj2.result
index 8045a810e3f..2d0df9a05d0 100644
--- a/mysql-test/main/subselect_sj2.result
+++ b/mysql-test/main/subselect_sj2.result
@@ -304,7 +304,7 @@ from t0 where a in
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t0 ALL NULL NULL NULL NULL 10
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 8 func 1 Using where
-2 MATERIALIZED t1 index a a 5 NULL 10 Using where; Using index
+2 MATERIALIZED t1 range a a 5 NULL 10 Using where; Using index
2 MATERIALIZED t2 ref a a 5 test.t1.a 1 Using index
2 MATERIALIZED t3 ref a a 5 test.t1.a 1 Using index
drop table t0, t1,t2,t3;
@@ -957,9 +957,9 @@ SELECT d FROM t2, t1
WHERE a = d AND ( pk < 2 OR d = 'z' )
);
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t1 ALL b NULL NULL NULL 19
-1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1
-2 MATERIALIZED t2 index PRIMARY,d d 9 NULL 17 Using where; Using index
+1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 2
+1 PRIMARY t1 ref b b 4 test.t2.d 1
+2 MATERIALIZED t2 index_merge PRIMARY,d d,PRIMARY 4,4 NULL 2 Using sort_union(d,PRIMARY); Using where
2 MATERIALIZED t1 ref a a 5 test.t2.d 1 Using where; Using index
SELECT * FROM t1 WHERE b IN (
SELECT d FROM t2, t1
diff --git a/mysql-test/main/subselect_sj2_jcl6.result b/mysql-test/main/subselect_sj2_jcl6.result
index 22310ab5361..f0e8e9b4881 100644
--- a/mysql-test/main/subselect_sj2_jcl6.result
+++ b/mysql-test/main/subselect_sj2_jcl6.result
@@ -315,7 +315,7 @@ from t0 where a in
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t0 ALL NULL NULL NULL NULL 10
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 8 func 1 Using where
-2 MATERIALIZED t1 index a a 5 NULL 10 Using where; Using index
+2 MATERIALIZED t1 range a a 5 NULL 10 Using where; Using index
2 MATERIALIZED t2 ref a a 5 test.t1.a 1 Using index
2 MATERIALIZED t3 ref a a 5 test.t1.a 1 Using index
drop table t0, t1,t2,t3;
@@ -970,9 +970,9 @@ SELECT d FROM t2, t1
WHERE a = d AND ( pk < 2 OR d = 'z' )
);
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t1 ALL b NULL NULL NULL 19
-1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1
-2 MATERIALIZED t2 index PRIMARY,d d 9 NULL 17 Using where; Using index
+1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 2
+1 PRIMARY t1 ref b b 4 test.t2.d 1 Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
+2 MATERIALIZED t2 index_merge PRIMARY,d d,PRIMARY 4,4 NULL 2 Using sort_union(d,PRIMARY); Using where
2 MATERIALIZED t1 ref a a 5 test.t2.d 1 Using where; Using index
SELECT * FROM t1 WHERE b IN (
SELECT d FROM t2, t1
diff --git a/mysql-test/main/subselect_sj2_mat.result b/mysql-test/main/subselect_sj2_mat.result
index e2c9adbfc37..9b497ade58b 100644
--- a/mysql-test/main/subselect_sj2_mat.result
+++ b/mysql-test/main/subselect_sj2_mat.result
@@ -306,7 +306,7 @@ from t0 where a in
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t0 ALL NULL NULL NULL NULL 10
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 8 func 1 Using where
-2 MATERIALIZED t1 index a a 5 NULL 10 Using where; Using index
+2 MATERIALIZED t1 range a a 5 NULL 10 Using where; Using index
2 MATERIALIZED t2 ref a a 5 test.t1.a 1 Using index
2 MATERIALIZED t3 ref a a 5 test.t1.a 1 Using index
drop table t0, t1,t2,t3;
@@ -959,9 +959,9 @@ SELECT d FROM t2, t1
WHERE a = d AND ( pk < 2 OR d = 'z' )
);
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t1 ALL b NULL NULL NULL 19
-1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1
-2 MATERIALIZED t2 index PRIMARY,d d 9 NULL 17 Using where; Using index
+1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 2
+1 PRIMARY t1 ref b b 4 test.t2.d 1
+2 MATERIALIZED t2 index_merge PRIMARY,d d,PRIMARY 4,4 NULL 2 Using sort_union(d,PRIMARY); Using where
2 MATERIALIZED t1 ref a a 5 test.t2.d 1 Using where; Using index
SELECT * FROM t1 WHERE b IN (
SELECT d FROM t2, t1
@@ -1727,7 +1727,7 @@ WHERE f1 IN ( SELECT f2 FROM t2 WHERE f2 > 'bar' )
HAVING f1 != 'foo'
ORDER BY f1;
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t1 index f1 f1 11 NULL 2 Using where; Using index
+1 PRIMARY t1 range f1 f1 11 NULL 2 Using where; Using index
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 11 func 1
2 MATERIALIZED t2 ALL NULL NULL NULL NULL 3 Using where
DROP TABLE t1,t2;
@@ -1932,20 +1932,20 @@ 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 <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 t3 index PRIMARY PRIMARY 4 NULL 18 Using index
+1 PRIMARY <subquery3> 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 <subquery4> eq_ref distinct_key distinct_key 4 func 1 Using where
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 t4 eq_ref PRIMARY PRIMARY 8 test.t3.id_product,const 1 Using where; Using index
+1 PRIMARY <subquery5> 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
-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
+3 MATERIALIZED t2_2 ref id_t2,id_product id_t2 5 const 12
4 MATERIALIZED t2_3 range id_t2,id_product id_t2 5 NULL 33 Using index condition; Using where
+6 MATERIALIZED t2_5 range id_t2,id_product id_t2 5 NULL 31 Using index condition; Using where
+2 MATERIALIZED t2_1 ALL id_t2,id_product NULL NULL NULL 223 Using where
+5 MATERIALIZED t2_4 range id_t2,id_product id_t2 5 NULL 18 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;
diff --git a/mysql-test/main/subselect_sj_jcl6.result b/mysql-test/main/subselect_sj_jcl6.result
index 02e9a833db6..2301a03f973 100644
--- a/mysql-test/main/subselect_sj_jcl6.result
+++ b/mysql-test/main/subselect_sj_jcl6.result
@@ -2779,8 +2779,8 @@ SELECT * FROM t1 AS t1_1, t1 AS t1_2
WHERE (t1_1.a, t1_2.a) IN ( SELECT a, b FROM v1 );
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1_1 ALL NULL NULL NULL NULL 11 Using where
-1 PRIMARY <derived3> ref key0 key0 5 test.t1_1.a 2 Start temporary
-1 PRIMARY t1_2 ALL NULL NULL NULL NULL 11 Using where; End temporary
+1 PRIMARY t1_2 ALL NULL NULL NULL NULL 11
+1 PRIMARY <derived3> ref key0 key0 5 test.t1_1.a 2 Using where; FirstMatch(t1_2)
3 DERIVED t1 ALL NULL NULL NULL NULL 11
SELECT * FROM t1 AS t1_1, t1 AS t1_2
WHERE (t1_1.a, t1_2.a) IN ( SELECT a, b FROM v1 );
@@ -2788,10 +2788,10 @@ a b a b
3 1 9 1
5 8 4 0
3 9 9 1
-2 4 6 8
2 4 4 0
-2 6 6 8
+2 4 6 8
2 6 4 0
+2 6 6 8
5 4 4 0
7 7 7 7
5 4 4 0
@@ -2938,8 +2938,8 @@ alias2.col_int_key = alias1.col_int_key
WHERE alias1.pk = 58 OR alias1.col_varchar_key = 'o'
);
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t2 ALL NULL NULL NULL NULL 2
-1 PRIMARY alias1 index_merge PRIMARY,col_int_key,col_varchar_key PRIMARY,col_varchar_key 4,4 NULL 2 Using sort_union(PRIMARY,col_varchar_key); Using where; Start temporary; Using join buffer (flat, BNL join)
+1 PRIMARY alias1 index_merge PRIMARY,col_int_key,col_varchar_key PRIMARY,col_varchar_key 4,4 NULL 2 Using sort_union(PRIMARY,col_varchar_key); Using where; Start temporary
+1 PRIMARY t2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join)
1 PRIMARY alias2 ALL col_int_key NULL NULL NULL 12 Range checked for each record (index map: 0x2); End temporary
SELECT *
FROM t2
diff --git a/mysql-test/main/subselect_sj_mat.result b/mysql-test/main/subselect_sj_mat.result
index afc75a22962..695c010692c 100644
--- a/mysql-test/main/subselect_sj_mat.result
+++ b/mysql-test/main/subselect_sj_mat.result
@@ -107,10 +107,11 @@ a1 a2
explain extended
select * from t1i where a1 in (select b1 from t2i where b1 > '0');
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 PRIMARY t2i index it2i1,it2i3 it2i1 # NULL 5 50.00 Using where; Using index; LooseScan
-1 PRIMARY t1i ref _it1_idx _it1_idx # _ref_ 1 100.00
+1 PRIMARY t1i range _it1_idx _it1_idx # NULL 3 100.00 Using where;
+1 PRIMARY <subquery2> eq_ref distinct_key distinct_key # func 1 100.00
+2 MATERIALIZED t2i range it2i1,it2i3 it2i1 # NULL 5 100.00 Using where;
Warnings:
-Note 1003 select `test`.`t1i`.`a1` AS `a1`,`test`.`t1i`.`a2` AS `a2` from `test`.`t1i` semi join (`test`.`t2i`) where `test`.`t1i`.`a1` = `test`.`t2i`.`b1` and `test`.`t2i`.`b1` > '0'
+Note 1003 select `test`.`t1i`.`a1` AS `a1`,`test`.`t1i`.`a2` AS `a2` from `test`.`t1i` semi join (`test`.`t2i`) where `test`.`t2i`.`b1` > '0'
select * from t1i where a1 in (select b1 from t2i where b1 > '0');
a1 a2
1 - 01 2 - 01
@@ -130,10 +131,11 @@ a1 a2
explain extended
select * from t1i where (a1, a2) in (select b1, b2 from t2i where b1 > '0');
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 PRIMARY t2i index it2i1,it2i2,it2i3 it2i3 # NULL 5 50.00 Using where; Using index; LooseScan
-1 PRIMARY t1i ref _it1_idx _it1_idx # _ref_ 1 100.00
+1 PRIMARY t1i range _it1_idx _it1_idx # NULL 3 100.00 Using where;
+1 PRIMARY <subquery2> eq_ref distinct_key distinct_key # func,func 1 100.00
+2 MATERIALIZED t2i range it2i1,it2i2,it2i3 it2i3 # NULL 5 100.00 Using where;
Warnings:
-Note 1003 select `test`.`t1i`.`a1` AS `a1`,`test`.`t1i`.`a2` AS `a2` from `test`.`t1i` semi join (`test`.`t2i`) where `test`.`t1i`.`a1` = `test`.`t2i`.`b1` and `test`.`t1i`.`a2` = `test`.`t2i`.`b2` and `test`.`t2i`.`b1` > '0'
+Note 1003 select `test`.`t1i`.`a1` AS `a1`,`test`.`t1i`.`a2` AS `a2` from `test`.`t1i` semi join (`test`.`t2i`) where `test`.`t2i`.`b1` > '0'
select * from t1i where (a1, a2) in (select b1, b2 from t2i where b1 > '0');
a1 a2
1 - 01 2 - 01
@@ -350,12 +352,14 @@ where (a1, a2) in (select b1, b2 from t2i where b1 > '0') and
(a1, a2) in (select c1, c2 from t3i
where (c1, c2) in (select b1, b2 from t2i where b2 > '0'));
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 PRIMARY t2i index it2i1,it2i2,it2i3 # # # 5 50.00 #
-1 PRIMARY t1i ref it1i1,it1i2,it1i3 # # # 1 100.00 #
-1 PRIMARY t3i ref it3i1,it3i2,it3i3 # # # 1 100.00 #
-1 PRIMARY t2i ref it2i1,it2i2,it2i3 # # # 1 100.00 #
+1 PRIMARY t1i range it1i1,it1i2,it1i3 # # # 3 100.00 #
+1 PRIMARY <subquery3> eq_ref distinct_key # # # 1 100.00 #
+1 PRIMARY <subquery2> eq_ref distinct_key # # # 1 100.00 #
+3 MATERIALIZED t3i range it3i1,it3i2,it3i3 # # # 4 100.00 #
+3 MATERIALIZED t2i ref it2i1,it2i2,it2i3 # # # 1 100.00 #
+2 MATERIALIZED t2i range it2i1,it2i2,it2i3 # # # 5 100.00 #
Warnings:
-Note 1003 select `test`.`t1i`.`a1` AS `a1`,`test`.`t1i`.`a2` AS `a2` from `test`.`t1i` semi join (`test`.`t2i`) semi join (`test`.`t2i` join `test`.`t3i`) where `test`.`t1i`.`a1` = `test`.`t2i`.`b1` and `test`.`t3i`.`c1` = `test`.`t2i`.`b1` and `test`.`t2i`.`b1` = `test`.`t2i`.`b1` and `test`.`t1i`.`a2` = `test`.`t2i`.`b2` and `test`.`t3i`.`c2` = `test`.`t2i`.`b2` and `test`.`t2i`.`b2` = `test`.`t2i`.`b2` and `test`.`t2i`.`b1` > '0' and `test`.`t2i`.`b2` > '0'
+Note 1003 select `test`.`t1i`.`a1` AS `a1`,`test`.`t1i`.`a2` AS `a2` from `test`.`t1i` semi join (`test`.`t2i`) semi join (`test`.`t2i` join `test`.`t3i`) where `test`.`t2i`.`b1` = `test`.`t3i`.`c1` and `test`.`t2i`.`b2` = `test`.`t3i`.`c2` and `test`.`t2i`.`b1` > '0' and `test`.`t3i`.`c2` > '0'
select * from t1i
where (a1, a2) in (select b1, b2 from t2i where b1 > '0') and
(a1, a2) in (select c1, c2 from t3i
@@ -438,13 +442,15 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
2 MATERIALIZED t2 ALL NULL # # # 5 99.22 #
4 MATERIALIZED t3 ALL NULL # # # 4 100.00 #
3 MATERIALIZED t3 ALL NULL # # # 4 100.00 #
-7 UNION t2i index it2i1,it2i2,it2i3 # # # 5 50.00 #
-7 UNION t1i ref it1i1,it1i2,it1i3 # # # 1 100.00 #
-7 UNION t3i ref it3i1,it3i2,it3i3 # # # 1 100.00 #
-7 UNION t2i ref it2i1,it2i2,it2i3 # # # 1 100.00 #
+7 UNION t1i range it1i1,it1i2,it1i3 # # # 3 100.00 #
+7 UNION <subquery9> eq_ref distinct_key # # # 1 100.00 #
+7 UNION <subquery8> eq_ref distinct_key # # # 1 100.00 #
+9 MATERIALIZED t3i range it3i1,it3i2,it3i3 # # # 4 100.00 #
+9 MATERIALIZED t2i ref it2i1,it2i2,it2i3 # # # 1 100.00 #
+8 MATERIALIZED t2i range it2i1,it2i2,it2i3 # # # 5 100.00 #
NULL UNION RESULT <union1,7> ALL NULL # # # NULL NULL #
Warnings:
-Note 1003 (/* select#1 */ 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 (<expr_cache><`test`.`t2`.`b2`>(<in_optimizer>(`test`.`t2`.`b2`,`test`.`t2`.`b2` in ( <materialize> (/* select#3 */ select `test`.`t3`.`c2` from `test`.`t3` where `test`.`t3`.`c2` like '%02' ), <primary_index_lookup>(`test`.`t2`.`b2` in <temporary table> on distinct_key where `test`.`t2`.`b2` = `<subquery3>`.`c2`)))) or <expr_cache><`test`.`t2`.`b2`>(<in_optimizer>(`test`.`t2`.`b2`,`test`.`t2`.`b2` in ( <materialize> (/* select#4 */ select `test`.`t3`.`c2` from `test`.`t3` where `test`.`t3`.`c2` like '%03' ), <primary_index_lookup>(`test`.`t2`.`b2` in <temporary table> on distinct_key where `test`.`t2`.`b2` = `<subquery4>`.`c2`))))) and `test`.`t3`.`c2` > '0') union (/* select#7 */ select `test`.`t1i`.`a1` AS `a1`,`test`.`t1i`.`a2` AS `a2` from `test`.`t1i` semi join (`test`.`t2i`) semi join (`test`.`t2i` join `test`.`t3i`) where `test`.`t1i`.`a1` = `test`.`t2i`.`b1` and `test`.`t3i`.`c1` = `test`.`t2i`.`b1` and `test`.`t2i`.`b1` = `test`.`t2i`.`b1` and `test`.`t1i`.`a2` = `test`.`t2i`.`b2` and `test`.`t3i`.`c2` = `test`.`t2i`.`b2` and `test`.`t2i`.`b2` = `test`.`t2i`.`b2` and `test`.`t2i`.`b1` > '0' and `test`.`t2i`.`b2` > '0')
+Note 1003 (/* select#1 */ 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 (<expr_cache><`test`.`t2`.`b2`>(<in_optimizer>(`test`.`t2`.`b2`,`test`.`t2`.`b2` in ( <materialize> (/* select#3 */ select `test`.`t3`.`c2` from `test`.`t3` where `test`.`t3`.`c2` like '%02' ), <primary_index_lookup>(`test`.`t2`.`b2` in <temporary table> on distinct_key where `test`.`t2`.`b2` = `<subquery3>`.`c2`)))) or <expr_cache><`test`.`t2`.`b2`>(<in_optimizer>(`test`.`t2`.`b2`,`test`.`t2`.`b2` in ( <materialize> (/* select#4 */ select `test`.`t3`.`c2` from `test`.`t3` where `test`.`t3`.`c2` like '%03' ), <primary_index_lookup>(`test`.`t2`.`b2` in <temporary table> on distinct_key where `test`.`t2`.`b2` = `<subquery4>`.`c2`))))) and `test`.`t3`.`c2` > '0') union (/* select#7 */ select `test`.`t1i`.`a1` AS `a1`,`test`.`t1i`.`a2` AS `a2` from `test`.`t1i` semi join (`test`.`t2i`) semi join (`test`.`t2i` join `test`.`t3i`) where `test`.`t2i`.`b1` = `test`.`t3i`.`c1` and `test`.`t2i`.`b2` = `test`.`t3i`.`c2` and `test`.`t2i`.`b1` > '0' and `test`.`t3i`.`c2` > '0')
(select * from t1
where (a1, a2) in (select b1, b2 from t2
where b2 in (select c2 from t3 where c2 LIKE '%02') or
@@ -1175,7 +1181,7 @@ a
explain extended
select a from t1 group by a having a in (select c from t2 where d >= 20);
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 PRIMARY t1 index NULL it1a 4 NULL 7 100.00 Using index
+1 PRIMARY t1 range NULL it1a 4 NULL 8 100.00 Using index for group-by
2 MATERIALIZED t2 ALL NULL NULL NULL NULL 7 100.00 Using where
Warnings:
Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a` from `test`.`t1` group by `test`.`t1`.`a` having <expr_cache><`test`.`t1`.`a`>(<in_optimizer>(`test`.`t1`.`a`,`test`.`t1`.`a` in ( <materialize> (/* select#2 */ select `test`.`t2`.`c` from `test`.`t2` where `test`.`t2`.`d` >= 20 ), <primary_index_lookup>(`test`.`t1`.`a` in <temporary table> on distinct_key where `test`.`t1`.`a` = `<subquery2>`.`c`))))
@@ -1187,7 +1193,7 @@ create index iab on t1(a, b);
explain extended
select a from t1 group by a having a in (select c from t2 where d >= 20);
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 PRIMARY t1 index NULL it1a 4 NULL 7 100.00 Using index
+1 PRIMARY t1 range NULL it1a 4 NULL 8 100.00 Using index for group-by
2 MATERIALIZED t2 ALL NULL NULL NULL NULL 7 100.00 Using where
Warnings:
Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a` from `test`.`t1` group by `test`.`t1`.`a` having <expr_cache><`test`.`t1`.`a`>(<in_optimizer>(`test`.`t1`.`a`,`test`.`t1`.`a` in ( <materialize> (/* select#2 */ select `test`.`t2`.`c` from `test`.`t2` where `test`.`t2`.`d` >= 20 ), <primary_index_lookup>(`test`.`t1`.`a` in <temporary table> on distinct_key where `test`.`t1`.`a` = `<subquery2>`.`c`))))
@@ -1199,7 +1205,7 @@ explain extended
select a from t1 group by a
having a in (select c from t2 where d >= some(select e from t3 where max(b)=e));
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 PRIMARY t1 index NULL iab 8 NULL 7 100.00 Using index
+1 PRIMARY t1 range NULL iab 4 NULL 8 100.00 Using index for group-by
2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 7 100.00 Using where
3 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 4 100.00 Using where
Warnings:
@@ -2154,8 +2160,7 @@ DROP VIEW v2;
#
# MDEV-5811: Server crashes in best_access_path with materialization+semijoin and big_tables=ON
#
-SET @tmp_mdev5811= @@big_tables;
-SET big_tables = ON;
+set tmp_memory_table_size=0;
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (1),(2);
CREATE TABLE t2 (b INT);
@@ -2164,7 +2169,7 @@ SELECT * FROM t1 AS t1_1, t1 AS t1_2
WHERE ( t1_1.a, t1_2.a ) IN ( SELECT MAX(b), MIN(b) FROM t2 );
a a
DROP TABLE t1,t2;
-SET big_tables=@tmp_mdev5811;
+set tmp_memory_table_size=default;
# End of 5.3 tests
#
# MDEV-5056: Wrong result (extra rows) with materialization+semijoin, IN subqueries
@@ -2313,7 +2318,7 @@ WHERE i3 = i2 AND f1 IN ( SELECT f3 FROM t3 ) );
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 2 100.00 Using where
2 DEPENDENT SUBQUERY <subquery3> eq_ref distinct_key distinct_key 4 func 1 100.00
-2 DEPENDENT SUBQUERY t2 index i2 i2 5 NULL 3 100.00 Using where; Using index; Using join buffer (flat, BNL join)
+2 DEPENDENT SUBQUERY t2 range i2 i2 5 NULL 3 100.00 Using where; Using index; Using join buffer (flat, BNL join)
2 DEPENDENT SUBQUERY t3 ref i3 i3 5 test.t2.i2 2 100.00 Using index
3 MATERIALIZED t3 ALL NULL NULL NULL NULL 8 100.00
Warnings:
diff --git a/mysql-test/main/subselect_sj_mat.test b/mysql-test/main/subselect_sj_mat.test
index 1de8701ecbb..8d5bbd8ef82 100644
--- a/mysql-test/main/subselect_sj_mat.test
+++ b/mysql-test/main/subselect_sj_mat.test
@@ -1760,8 +1760,7 @@ DROP VIEW v2;
--echo #
--echo # MDEV-5811: Server crashes in best_access_path with materialization+semijoin and big_tables=ON
--echo #
-SET @tmp_mdev5811= @@big_tables;
-SET big_tables = ON;
+set tmp_memory_table_size=0; # force on-disk tmp table
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (1),(2);
@@ -1773,7 +1772,7 @@ SELECT * FROM t1 AS t1_1, t1 AS t1_2
WHERE ( t1_1.a, t1_2.a ) IN ( SELECT MAX(b), MIN(b) FROM t2 );
DROP TABLE t1,t2;
-SET big_tables=@tmp_mdev5811;
+set tmp_memory_table_size=default;
--echo # End of 5.3 tests
diff --git a/mysql-test/main/subselect_sj_nonmerged.result b/mysql-test/main/subselect_sj_nonmerged.result
index 7b73ae0fc57..422af02c31a 100644
--- a/mysql-test/main/subselect_sj_nonmerged.result
+++ b/mysql-test/main/subselect_sj_nonmerged.result
@@ -47,8 +47,8 @@ id select_type table type possible_keys key key_len ref rows Extra
# Compare to this which really will have 50 record combinations:
explain select * from t3 where a in (select max(t2.a) from t1, t2 group by t2.b, t1.b);
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 50
-1 PRIMARY t3 eq_ref PRIMARY PRIMARY 8 <subquery2>.max(t2.a) 1 Using where; Using index
+1 PRIMARY t3 index PRIMARY PRIMARY 8 NULL 100 Using index
+1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 test.t3.a 1 Using where
2 MATERIALIZED t2 ALL NULL NULL NULL NULL 5 Using temporary
2 MATERIALIZED t1 ALL NULL NULL NULL NULL 10 Using join buffer (flat, BNL join)
SET @save_optimizer_switch=@@optimizer_switch;
@@ -57,8 +57,8 @@ SET optimizer_switch='outer_join_with_cache=off';
explain select * from t3
where a in (select max(t2.a) from t1 left join t2 on t1.a=t2.a group by t2.b, t1.b);
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 50
-1 PRIMARY t3 eq_ref PRIMARY PRIMARY 8 <subquery2>.max(t2.a) 1 Using where; Using index
+1 PRIMARY t3 index PRIMARY PRIMARY 8 NULL 100 Using index
+1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 test.t3.a 1 Using where
2 MATERIALIZED t1 ALL NULL NULL NULL NULL 10 Using temporary
2 MATERIALIZED t2 ALL NULL NULL NULL NULL 5 Using where
SET optimizer_switch=@save_optimizer_switch;
diff --git a/mysql-test/main/sum_distinct-big.result b/mysql-test/main/sum_distinct-big.result
index 08afa1dd1b0..086dd33fad2 100644
--- a/mysql-test/main/sum_distinct-big.result
+++ b/mysql-test/main/sum_distinct-big.result
@@ -1,6 +1,6 @@
set @save_tmp_table_size=@@tmp_table_size;
set @save_max_heap_table_size=@@max_heap_table_size;
-set storage_engine=MYISAM;
+set default_storage_engine=MYISAM;
CREATE TABLE t1 (id INTEGER);
CREATE TABLE t2 (id INTEGER);
INSERT INTO t1 SELECT b.seq FROM seq_1_to_128,seq_1_to_1024 b;
diff --git a/mysql-test/main/sum_distinct-big.test b/mysql-test/main/sum_distinct-big.test
index d87569f8668..41aa5a44c19 100644
--- a/mysql-test/main/sum_distinct-big.test
+++ b/mysql-test/main/sum_distinct-big.test
@@ -3,6 +3,8 @@
#
--source include/big_test.inc
+# Test will take more than one hour with valgrind
+--source include/not_valgrind.inc
--source include/have_innodb.inc
--source include/have_sequence.inc
@@ -14,7 +16,7 @@ set @save_max_heap_table_size=@@max_heap_table_size;
# filesort is used (see uniques.cc:merge_walk)
#
-set storage_engine=MYISAM;
+set default_storage_engine=MYISAM;
CREATE TABLE t1 (id INTEGER);
CREATE TABLE t2 (id INTEGER);
diff --git a/mysql-test/main/symlink-myisam-11902.test b/mysql-test/main/symlink-myisam-11902.test
index 8fd4961d1fb..8fae41222cf 100644
--- a/mysql-test/main/symlink-myisam-11902.test
+++ b/mysql-test/main/symlink-myisam-11902.test
@@ -25,7 +25,7 @@ exec rm -r $MYSQLTEST_VARDIR/tmp/foo;
exec ln -s $datadir/mysql $MYSQLTEST_VARDIR/tmp/foo;
set debug_sync='now SIGNAL go';
connection default;
-replace_regex / '.*\/tmp\// 'MYSQLTEST_VARDIR\/tmp\// /31/20/ /40/20/ /20.*/20 <errmsg>)/;
+replace_regex / '.*\/tmp\// 'MYSQLTEST_VARDIR\/tmp\// /31/20/ /40/20/ /85/20/ /20.*/20 <errmsg>)/;
error 29;
reap;
flush tables;
@@ -49,7 +49,7 @@ exec rm -r $MYSQLTEST_VARDIR/tmp/foo;
exec ln -s $datadir/mysql $MYSQLTEST_VARDIR/tmp/foo;
set debug_sync='now SIGNAL run';
connection default;
-replace_regex / '.*\/test\// '.\/test\// /31/20/ /40/20/ /20.*/20 <errmsg>)/;
+replace_regex / '.*\/test\// '.\/test\// /31/20/ /40/20/ /85/20/ /20.*/20 <errmsg>)/;
error ER_FILE_NOT_FOUND;
reap;
flush tables;
diff --git a/mysql-test/main/system_mysql_db_error_log-master.opt b/mysql-test/main/system_mysql_db_error_log-master.opt
new file mode 100644
index 00000000000..37a865d29e0
--- /dev/null
+++ b/mysql-test/main/system_mysql_db_error_log-master.opt
@@ -0,0 +1 @@
+--log-error=$MYSQLTEST_VARDIR/tmp/system_mysql_db_error_log.err
diff --git a/mysql-test/main/system_mysql_db_error_log.result b/mysql-test/main/system_mysql_db_error_log.result
new file mode 100644
index 00000000000..5af3eda0700
--- /dev/null
+++ b/mysql-test/main/system_mysql_db_error_log.result
@@ -0,0 +1,118 @@
+#
+# MDEV-21704 Add a new JSON field "version_id" into mysql.global_priv.priv
+#
+SET @super_acl_100500= 1 << 15;
+SELECT HEX(@super_acl_100500);
+HEX(@super_acl_100500)
+8000
+SET @all_known_privileges_100500= (1 << 30) - 1;
+SELECT HEX(@all_known_privileges_100500);
+HEX(@all_known_privileges_100500)
+3FFFFFFF
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost WITH GRANT OPTION;
+SET @all_known_privileges_current=(SELECT CAST(json_value(Priv, '$.access') AS UNSIGNED) FROM mysql.global_priv WHERE host='localhost' and user='user1');
+DROP USER user1@localhost;
+SELECT HEX(@all_known_privileges_current);
+HEX(@all_known_privileges_current)
+7FFFFFFFFF
+CREATE USER bad_access1@localhost;
+UPDATE
+mysql.global_priv
+SET
+Priv=json_set(Priv, '$.access',@all_known_privileges_current+1)
+WHERE
+host='localhost' and user='bad_access1';
+FLUSH PRIVILEGES;
+SHOW GRANTS FOR bad_access1@localhost;
+Grants for bad_access1@localhost
+GRANT USAGE ON *.* TO `bad_access1`@`localhost`
+DROP USER bad_access1@localhost;
+CREATE USER bad_version_id_1000000@localhost;
+GRANT ALL PRIVILEGES ON *.* to bad_version_id_1000000@localhost;
+SHOW GRANTS FOR bad_version_id_1000000@localhost;
+Grants for bad_version_id_1000000@localhost
+GRANT ALL PRIVILEGES ON *.* TO `bad_version_id_1000000`@`localhost`
+UPDATE
+mysql.global_priv
+SET
+Priv=json_set(Priv, '$.version_id',1000000)
+WHERE
+host='localhost' and user='bad_version_id_1000000';
+FLUSH PRIVILEGES;
+SHOW GRANTS FOR bad_version_id_1000000@localhost;
+Grants for bad_version_id_1000000@localhost
+GRANT USAGE ON *.* TO `bad_version_id_1000000`@`localhost`
+DROP USER bad_version_id_1000000@localhost;
+CREATE USER bad_version_id_minus_3@localhost;
+GRANT ALL PRIVILEGES ON *.* to bad_version_id_minus_3@localhost;
+SHOW GRANTS FOR bad_version_id_minus_3@localhost;
+Grants for bad_version_id_minus_3@localhost
+GRANT ALL PRIVILEGES ON *.* TO `bad_version_id_minus_3`@`localhost`
+UPDATE
+mysql.global_priv
+SET
+Priv=json_set(Priv, '$.version_id',-3)
+WHERE
+host='localhost' and user='bad_version_id_minus_3';
+FLUSH PRIVILEGES;
+SHOW GRANTS FOR bad_version_id_minus_3@localhost;
+Grants for bad_version_id_minus_3@localhost
+GRANT USAGE ON *.* TO `bad_version_id_minus_3`@`localhost`
+DROP USER bad_version_id_minus_3@localhost;
+CREATE USER bad_version_id_100300@localhost;
+GRANT ALL PRIVILEGES ON *.* to bad_version_id_100300@localhost;
+SHOW GRANTS FOR bad_version_id_100300@localhost;
+Grants for bad_version_id_100300@localhost
+GRANT ALL PRIVILEGES ON *.* TO `bad_version_id_100300`@`localhost`
+UPDATE
+mysql.global_priv
+SET
+Priv=json_set(Priv, '$.version_id',100300)
+WHERE
+host='localhost' and user='bad_version_id_100300';
+FLUSH PRIVILEGES;
+SHOW GRANTS FOR bad_version_id_100300@localhost;
+Grants for bad_version_id_100300@localhost
+GRANT USAGE ON *.* TO `bad_version_id_100300`@`localhost`
+DROP USER bad_version_id_100300@localhost;
+CREATE USER good_version_id_100400@localhost;
+GRANT ALL PRIVILEGES ON *.* to good_version_id_100400@localhost;
+SHOW GRANTS FOR good_version_id_100400@localhost;
+Grants for good_version_id_100400@localhost
+GRANT ALL PRIVILEGES ON *.* TO `good_version_id_100400`@`localhost`
+UPDATE
+mysql.global_priv
+SET
+Priv=json_set(Priv, '$.version_id',100400, '$.access', @all_known_privileges_100500)
+WHERE
+host='localhost' and user='good_version_id_100400';
+FLUSH PRIVILEGES;
+SHOW GRANTS FOR good_version_id_100400@localhost;
+Grants for good_version_id_100400@localhost
+GRANT ALL PRIVILEGES ON *.* TO `good_version_id_100400`@`localhost` WITH GRANT OPTION
+GRANT REPLICATION MASTER ADMIN ON *.* TO good_version_id_100400@localhost;
+SHOW GRANTS FOR good_version_id_100400@localhost;
+Grants for good_version_id_100400@localhost
+GRANT ALL PRIVILEGES ON *.* TO `good_version_id_100400`@`localhost` WITH GRANT OPTION
+DROP USER good_version_id_100400@localhost;
+CREATE USER good_version_id_100500@localhost;
+GRANT SUPER ON *.* to good_version_id_100500@localhost;
+SHOW GRANTS FOR good_version_id_100500@localhost;
+Grants for good_version_id_100500@localhost
+GRANT SUPER ON *.* TO `good_version_id_100500`@`localhost`
+UPDATE
+mysql.global_priv
+SET
+Priv=json_set(Priv, '$.version_id',100500)
+WHERE
+host='localhost' and user='good_version_id_100500';
+FLUSH PRIVILEGES;
+SHOW GRANTS FOR good_version_id_100500@localhost;
+Grants for good_version_id_100500@localhost
+GRANT SUPER, SET USER, FEDERATED ADMIN, CONNECTION ADMIN, READ_ONLY ADMIN, REPLICATION SLAVE ADMIN, BINLOG ADMIN, BINLOG REPLAY ON *.* TO `good_version_id_100500`@`localhost`
+DROP USER good_version_id_100500@localhost;
+FOUND 1 /Warning.*'user' entry 'bad_access1@localhost' has a wrong 'access' value.*version_id=/ in system_mysql_db_error_log.err
+FOUND 1 /Warning.*'user' entry 'bad_version_id_1000000@localhost' has a wrong 'version_id' value 1000000/ in system_mysql_db_error_log.err
+FOUND 1 /Warning.*'user' entry 'bad_version_id_minus_3@localhost' has a wrong 'version_id' value -3/ in system_mysql_db_error_log.err
+FOUND 1 /Warning.*'user' entry 'bad_version_id_100300@localhost' has a wrong 'version_id' value 100300/ in system_mysql_db_error_log.err
diff --git a/mysql-test/main/system_mysql_db_error_log.test b/mysql-test/main/system_mysql_db_error_log.test
new file mode 100644
index 00000000000..17c04a9cc14
--- /dev/null
+++ b/mysql-test/main/system_mysql_db_error_log.test
@@ -0,0 +1,117 @@
+--source include/not_embedded.inc
+
+--echo #
+--echo # MDEV-21704 Add a new JSON field "version_id" into mysql.global_priv.priv
+--echo #
+
+SET @super_acl_100500= 1 << 15;
+SELECT HEX(@super_acl_100500);
+
+SET @all_known_privileges_100500= (1 << 30) - 1;
+SELECT HEX(@all_known_privileges_100500);
+
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost WITH GRANT OPTION;
+SET @all_known_privileges_current=(SELECT CAST(json_value(Priv, '$.access') AS UNSIGNED) FROM mysql.global_priv WHERE host='localhost' and user='user1');
+DROP USER user1@localhost;
+SELECT HEX(@all_known_privileges_current);
+
+
+CREATE USER bad_access1@localhost;
+UPDATE
+ mysql.global_priv
+SET
+ Priv=json_set(Priv, '$.access',@all_known_privileges_current+1)
+WHERE
+ host='localhost' and user='bad_access1';
+FLUSH PRIVILEGES;
+SHOW GRANTS FOR bad_access1@localhost;
+DROP USER bad_access1@localhost;
+
+
+CREATE USER bad_version_id_1000000@localhost;
+GRANT ALL PRIVILEGES ON *.* to bad_version_id_1000000@localhost;
+SHOW GRANTS FOR bad_version_id_1000000@localhost;
+UPDATE
+ mysql.global_priv
+SET
+ Priv=json_set(Priv, '$.version_id',1000000)
+WHERE
+ host='localhost' and user='bad_version_id_1000000';
+FLUSH PRIVILEGES;
+SHOW GRANTS FOR bad_version_id_1000000@localhost;
+DROP USER bad_version_id_1000000@localhost;
+
+
+CREATE USER bad_version_id_minus_3@localhost;
+GRANT ALL PRIVILEGES ON *.* to bad_version_id_minus_3@localhost;
+SHOW GRANTS FOR bad_version_id_minus_3@localhost;
+UPDATE
+ mysql.global_priv
+SET
+ Priv=json_set(Priv, '$.version_id',-3)
+WHERE
+ host='localhost' and user='bad_version_id_minus_3';
+FLUSH PRIVILEGES;
+SHOW GRANTS FOR bad_version_id_minus_3@localhost;
+DROP USER bad_version_id_minus_3@localhost;
+
+CREATE USER bad_version_id_100300@localhost;
+GRANT ALL PRIVILEGES ON *.* to bad_version_id_100300@localhost;
+SHOW GRANTS FOR bad_version_id_100300@localhost;
+UPDATE
+ mysql.global_priv
+SET
+ Priv=json_set(Priv, '$.version_id',100300)
+WHERE
+ host='localhost' and user='bad_version_id_100300';
+FLUSH PRIVILEGES;
+SHOW GRANTS FOR bad_version_id_100300@localhost;
+DROP USER bad_version_id_100300@localhost;
+
+
+CREATE USER good_version_id_100400@localhost;
+GRANT ALL PRIVILEGES ON *.* to good_version_id_100400@localhost;
+SHOW GRANTS FOR good_version_id_100400@localhost;
+UPDATE
+ mysql.global_priv
+SET
+ Priv=json_set(Priv, '$.version_id',100400, '$.access', @all_known_privileges_100500)
+WHERE
+ host='localhost' and user='good_version_id_100400';
+FLUSH PRIVILEGES;
+SHOW GRANTS FOR good_version_id_100400@localhost;
+# Testing that it's missing only "REPLICATION MASTER ADMIN".
+# Should report ALL PRIVILEGES after GRANT REPLICATION MASTER ADMIN:
+GRANT REPLICATION MASTER ADMIN ON *.* TO good_version_id_100400@localhost;
+SHOW GRANTS FOR good_version_id_100400@localhost;
+DROP USER good_version_id_100400@localhost;
+
+
+CREATE USER good_version_id_100500@localhost;
+GRANT SUPER ON *.* to good_version_id_100500@localhost;
+SHOW GRANTS FOR good_version_id_100500@localhost;
+UPDATE
+ mysql.global_priv
+SET
+ Priv=json_set(Priv, '$.version_id',100500)
+WHERE
+ host='localhost' and user='good_version_id_100500';
+FLUSH PRIVILEGES;
+SHOW GRANTS FOR good_version_id_100500@localhost;
+DROP USER good_version_id_100500@localhost;
+
+
+--let SEARCH_FILE=$MYSQLTEST_VARDIR/tmp/system_mysql_db_error_log.err
+
+--let SEARCH_PATTERN= Warning.*'user' entry 'bad_access1@localhost' has a wrong 'access' value.*version_id=
+--source include/search_pattern_in_file.inc
+
+--let SEARCH_PATTERN= Warning.*'user' entry 'bad_version_id_1000000@localhost' has a wrong 'version_id' value 1000000
+--source include/search_pattern_in_file.inc
+
+--let SEARCH_PATTERN= Warning.*'user' entry 'bad_version_id_minus_3@localhost' has a wrong 'version_id' value -3
+--source include/search_pattern_in_file.inc
+
+--let SEARCH_PATTERN= Warning.*'user' entry 'bad_version_id_100300@localhost' has a wrong 'version_id' value 100300
+--source include/search_pattern_in_file.inc
diff --git a/mysql-test/main/system_mysql_db_fix40123.result b/mysql-test/main/system_mysql_db_fix40123.result
index f76a4b37e31..c1bf2f492f1 100644
--- a/mysql-test/main/system_mysql_db_fix40123.result
+++ b/mysql-test/main/system_mysql_db_fix40123.result
@@ -1,5 +1,5 @@
use test;
-set storage_engine=myisam;
+set default_storage_engine=myisam;
CREATE TABLE db ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(16) binary 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, 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, 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, PRIMARY KEY Host (Host,Db,User), KEY User (User) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Database privileges';
Warnings:
Warning 1280 Name 'Host' ignored for PRIMARY key.
diff --git a/mysql-test/main/system_mysql_db_fix40123.test b/mysql-test/main/system_mysql_db_fix40123.test
index 00747cd7ba0..2e7ebd151d2 100644
--- a/mysql-test/main/system_mysql_db_fix40123.test
+++ b/mysql-test/main/system_mysql_db_fix40123.test
@@ -24,7 +24,7 @@ use test;
# create system tables as in mysql-4.1.23
# created by executing "./mysql_create_system_tables real ."
-set storage_engine=myisam;
+set default_storage_engine=myisam;
CREATE TABLE db ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(16) binary 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, 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, 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, PRIMARY KEY Host (Host,Db,User), KEY User (User) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Database privileges';
INSERT INTO db VALUES ('%','test','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y');
INSERT INTO db VALUES ('%','test\_%','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y');
diff --git a/mysql-test/main/system_mysql_db_fix50030.result b/mysql-test/main/system_mysql_db_fix50030.result
index a9ef62aa5d4..bb003eabffe 100644
--- a/mysql-test/main/system_mysql_db_fix50030.result
+++ b/mysql-test/main/system_mysql_db_fix50030.result
@@ -1,5 +1,5 @@
use test;
-set storage_engine=myisam;
+set default_storage_engine=myisam;
CREATE TABLE db ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(16) binary 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, 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, 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, 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, Execute_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, PRIMARY KEY Host (Host,Db,User), KEY User (User) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Database privileges';
Warnings:
Warning 1280 Name 'Host' ignored for PRIMARY key.
diff --git a/mysql-test/main/system_mysql_db_fix50030.test b/mysql-test/main/system_mysql_db_fix50030.test
index 085286637b0..77f1a97b1aa 100644
--- a/mysql-test/main/system_mysql_db_fix50030.test
+++ b/mysql-test/main/system_mysql_db_fix50030.test
@@ -24,7 +24,7 @@ use test;
# create system tables as in mysql-5.0.30
# created by executing "./mysql_create_system_tables real ."
-set storage_engine=myisam;
+set default_storage_engine=myisam;
CREATE TABLE db ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(16) binary 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, 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, 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, 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, Execute_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, PRIMARY KEY Host (Host,Db,User), KEY User (User) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Database privileges';
INSERT INTO db VALUES ('%','test','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N');
INSERT INTO db VALUES ('%','test\_%','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N');
diff --git a/mysql-test/main/table_elim.result b/mysql-test/main/table_elim.result
index b49e7b11ed6..deff0623370 100644
--- a/mysql-test/main/table_elim.result
+++ b/mysql-test/main/table_elim.result
@@ -333,11 +333,11 @@ id select_type table type possible_keys key key_len ref rows Extra
explain select t1.a from t1 left join t2 on t2.pk between 10 and 20;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 4
-1 SIMPLE t2 index PRIMARY PRIMARY 4 NULL 2 Using where; Using index
+1 SIMPLE t2 range PRIMARY PRIMARY 4 NULL 1 Using where; Using index
explain select t1.a from t1 left join t2 on t2.pk between 0.5 and 1.5;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 4
-1 SIMPLE t2 index PRIMARY PRIMARY 4 NULL 2 Using where; Using index
+1 SIMPLE t2 range PRIMARY PRIMARY 4 NULL 2 Using where; Using index
explain select t1.a from t1 left join t2 on t2.pk between 10 and 10;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 4
@@ -408,7 +408,7 @@ select t1.*
from t1 left join t2 on t2.pk=3 or t2.pk= 4;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 4
-1 SIMPLE t2 index PRIMARY PRIMARY 4 NULL 2 Using where; Using index
+1 SIMPLE t2 range PRIMARY PRIMARY 4 NULL 2 Using where; Using index
explain
select t1.*
from t1 left join t2 on t2.pk=3 or t2.pk= 3;
@@ -419,7 +419,7 @@ select t1.*
from t1 left join t2 on (t2.pk=3 and t2.b=3) or (t2.pk= 4 and t2.b=3);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 4
-1 SIMPLE t2 ALL PRIMARY NULL NULL NULL 2 Using where
+1 SIMPLE t2 range PRIMARY PRIMARY 4 NULL 2 Using where
drop table t1, t2;
#
# LPBUG#523593: Running RQG optimizer_no_subquery crashes MariaDB
diff --git a/mysql-test/main/table_value_constr.result b/mysql-test/main/table_value_constr.result
index 7cbec119a81..8b5df420269 100644
--- a/mysql-test/main/table_value_constr.result
+++ b/mysql-test/main/table_value_constr.result
@@ -2062,9 +2062,9 @@ values (1,2),(3,4,5);
ERROR HY000: The used table value constructor has a different number of values
# illegal parameter data types in TVC
values (1,point(1,1)),(1,1);
-ERROR HY000: Illegal parameter data types geometry and int for operation 'TABLE VALUE CONSTRUCTOR'
+ERROR HY000: Illegal parameter data types point and int for operation 'TABLE VALUE CONSTRUCTOR'
values (1,point(1,1)+1);
-ERROR HY000: Illegal parameter data types geometry and int for operation '+'
+ERROR HY000: Illegal parameter data types point and int for operation '+'
# field reference in TVC
select * from (values (1), (b), (2)) as new_tvc;
ERROR HY000: Field reference 'b' can't be used in table value constructor
@@ -2593,7 +2593,7 @@ ERROR 42S22: Unknown column '2' in 'order clause'
create view v1 as with t(a) as (values (2), (1)) select a from t;
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 with t(a) as (values (2),(1))select `t`.`a` AS `a` from `t` latin1 latin1_swedish_ci
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS with t(`a`) as (values (2),(1))select `t`.`a` AS `a` from `t` latin1 latin1_swedish_ci
select * from v1;
a
2
@@ -2837,9 +2837,8 @@ id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL No tables used
6 SUBQUERY <derived2> ALL NULL NULL NULL NULL 2
2 DERIVED NULL NULL NULL NULL NULL NULL NULL No tables used
-3 SUBQUERY t3 ALL NULL NULL NULL NULL 11
-3 SUBQUERY <subquery4> eq_ref distinct_key distinct_key 8 func 1 Using where
-4 MATERIALIZED <derived5> ALL NULL NULL NULL NULL 11
+3 SUBQUERY t3 ALL NULL NULL NULL NULL 11 Using where
+3 SUBQUERY <derived5> ref key0 key0 8 test.t3.a 2 Using where; FirstMatch(t3)
5 DERIVED t3 ALL NULL NULL NULL NULL 11 Using temporary; Using filesort
prepare stmt from "select
(values ((select * from t3 where a in (select * from v1))))";
@@ -2864,8 +2863,7 @@ id select_type table type possible_keys key key_len ref rows Extra
6 SUBQUERY <derived2> ALL NULL NULL NULL NULL 2
2 DERIVED NULL NULL NULL NULL NULL NULL NULL No tables used
3 SUBQUERY t3 ALL NULL NULL NULL NULL 11 Using where
-3 SUBQUERY <subquery4> eq_ref distinct_key distinct_key 8 func 1 Using where
-4 MATERIALIZED <derived5> ALL NULL NULL NULL NULL 11
+3 SUBQUERY <derived5> ref key0 key0 8 test.t3.a 2 Using where; FirstMatch(t3)
5 DERIVED t3 ALL NULL NULL NULL NULL 11 Using temporary; Using filesort
prepare stmt from "select
(values ((select * from t3
diff --git a/mysql-test/main/table_value_constr.test b/mysql-test/main/table_value_constr.test
index d131022e2e0..b3881a77d0e 100644
--- a/mysql-test/main/table_value_constr.test
+++ b/mysql-test/main/table_value_constr.test
@@ -1345,13 +1345,13 @@ DELIMITER ;$$
--echo # MDEV-21995 Server crashes in Item_field::real_type_handler with table value constructor
--echo #
---error ER_UNKNOWN_ERROR
+--error ER_NOT_ALLOWED_IN_THIS_CONTEXT
VALUES (IGNORE);
---error ER_UNKNOWN_ERROR
+--error ER_NOT_ALLOWED_IN_THIS_CONTEXT
VALUES (DEFAULT);
---error ER_UNKNOWN_ERROR
+--error ER_NOT_ALLOWED_IN_THIS_CONTEXT
EXECUTE IMMEDIATE 'VALUES (?)' USING IGNORE;
---error ER_UNKNOWN_ERROR
+--error ER_NOT_ALLOWED_IN_THIS_CONTEXT
EXECUTE IMMEDIATE 'VALUES (?)' USING DEFAULT;
--echo #
@@ -1656,14 +1656,14 @@ drop table t1;
--echo # MDEV-22610 Crash in INSERT INTO t1 (VALUES (DEFAULT) UNION VALUES (DEFAULT))
--echo #
---error ER_UNKNOWN_ERROR
+--error ER_NOT_ALLOWED_IN_THIS_CONTEXT
VALUES (DEFAULT) UNION VALUES (DEFAULT);
---error ER_UNKNOWN_ERROR
+--error ER_NOT_ALLOWED_IN_THIS_CONTEXT
VALUES (IGNORE) UNION VALUES (IGNORE);
CREATE TABLE t1 (a INT DEFAULT 10);
---error ER_UNKNOWN_ERROR
+--error ER_NOT_ALLOWED_IN_THIS_CONTEXT
INSERT INTO t1 (VALUES (DEFAULT) UNION VALUES (DEFAULT));
---error ER_UNKNOWN_ERROR
+--error ER_NOT_ALLOWED_IN_THIS_CONTEXT
INSERT INTO t1 (VALUES (IGNORE) UNION VALUES (IGNORE));
DROP TABLE t1;
diff --git a/mysql-test/main/tc_heuristic_recover.test b/mysql-test/main/tc_heuristic_recover.test
index 8cbf7d61143..86fea084de8 100644
--- a/mysql-test/main/tc_heuristic_recover.test
+++ b/mysql-test/main/tc_heuristic_recover.test
@@ -49,7 +49,7 @@ SELECT * FROM t1;
# TODO: MDEV-12700 Allow innodb_read_only startup without prior slow shutdown.
--source include/kill_mysqld.inc
--error 1
---exec $MYSQLD_LAST_CMD --log-bin=master-bin --binlog-format=mixed --core-file --loose-debug-sync-timeout=300 --innodb-force-recovery=4
+--exec $MYSQLD_LAST_CMD --log-bin=master-bin --binlog-format=mixed --core-file --loose-debug-sync-timeout=300 --debug_dbug="+d,innobase_xa_fail"
--let SEARCH_PATTERN= was in the XA prepared state
--source include/search_pattern_in_file.inc
@@ -59,7 +59,7 @@ SELECT * FROM t1;
--source include/search_pattern_in_file.inc
--error 1
---exec $MYSQLD_LAST_CMD --log-bin=master-bin --binlog-format=mixed --core-file --loose-debug-sync-timeout=300 --innodb-force-recovery=4 --tc-heuristic-recover=COMMIT
+--exec $MYSQLD_LAST_CMD --log-bin=master-bin --binlog-format=mixed --core-file --loose-debug-sync-timeout=300 --debug_dbug="+d,innobase_xa_fail" --tc-heuristic-recover=COMMIT
--let SEARCH_PATTERN= was in the XA prepared state
--source include/search_pattern_in_file.inc
--let SEARCH_PATTERN= Found 1 prepared transactions!
diff --git a/mysql-test/main/temp_table.result b/mysql-test/main/temp_table.result
index 293b6d5cd77..64a5d9b681b 100644
--- a/mysql-test/main/temp_table.result
+++ b/mysql-test/main/temp_table.result
@@ -1,5 +1,3 @@
-drop table if exists t1,t2;
-drop view if exists v1;
#
# test basic creation of temporary tables together with normal table
#
@@ -602,3 +600,22 @@ DROP TEMPORARY TABLE t1;
#
# End of 10.2 tests
#
+create function f1() returns int
+begin
+drop temporary table t1, t2;
+return 1;
+end;
+$$
+create temporary table t1 (a int);
+create temporary table t2 (a int);
+insert t1 values (2);
+insert t2 values (3);
+select a,f1() from t1;
+ERROR HY000: Can't reopen table: 't1'
+drop function f1;
+drop temporary table t1;
+drop temporary table t2;
+ERROR 42S02: Unknown table 'test.t2'
+#
+# End of 10.5 tests
+#
diff --git a/mysql-test/main/temp_table.test b/mysql-test/main/temp_table.test
index dc5fe7f3cd0..ccaa5fb93e8 100644
--- a/mysql-test/main/temp_table.test
+++ b/mysql-test/main/temp_table.test
@@ -6,11 +6,6 @@
# Test of temporary tables
#
---disable_warnings
-drop table if exists t1,t2;
-drop view if exists v1;
---enable_warnings
-
--echo #
--echo # test basic creation of temporary tables together with normal table
--echo #
@@ -658,3 +653,31 @@ DROP TEMPORARY TABLE t1;
--echo #
--echo # End of 10.2 tests
--echo #
+
+#
+# DROP TEMPORARY TABLE fails in the middle
+#
+delimiter $$;
+create function f1() returns int
+begin
+ drop temporary table t1, t2;
+ return 1;
+end;
+$$
+delimiter ;$$
+
+create temporary table t1 (a int);
+create temporary table t2 (a int);
+insert t1 values (2);
+insert t2 values (3);
+--error ER_CANT_REOPEN_TABLE
+select a,f1() from t1;
+drop function f1;
+drop temporary table t1;
+--error ER_BAD_TABLE_ERROR
+drop temporary table t2;
+
+--echo #
+--echo # End of 10.5 tests
+--echo #
+
diff --git a/mysql-test/main/temp_table_symlink.test b/mysql-test/main/temp_table_symlink.test
index 9297b472805..ea5f1dfa4de 100644
--- a/mysql-test/main/temp_table_symlink.test
+++ b/mysql-test/main/temp_table_symlink.test
@@ -10,11 +10,12 @@ create temporary table t1 (a int);
perl;
chdir "$ENV{MYSQL_TMP_DIR}/mysqld.1/";
for (<#sql*.MYI>) {
- /^#sql(.*)_([0-9a-f]+_)([0-9a-f]+)\.MYI$/ or die;
- symlink "$ENV{datadir}/test/d1.MYI", sprintf "#sql$1_$2%x.MYI", hex($3)+1;
- symlink "$ENV{datadir}/test/d1.MYI", sprintf "#sql$1_$2%x.MAI", hex($3)+1;
- symlink "$ENV{datadir}/test/d1.MYI", sprintf "#sql$1_$2%x.MAI", hex($3)+2;
- symlink "$ENV{datadir}/test/d1.MYI", "#sql_$1_0.MAI";
+ /^(#sql-temptable-[0-9a-f]+)(-[0-9a-f]+-)([0-9a-f]+)\.MYI$/ or die $_;
+ symlink "$ENV{datadir}/test/d1.MYI", sprintf "$1$2%x.MYI", hex($3)+1;
+ symlink "$ENV{datadir}/test/d1.MYI", sprintf "$1$2%x.MAI", hex($3)+2;
+ symlink "$ENV{datadir}/test/d1.MYI", sprintf "$1$2%x.MAI", hex($3)+3;
+ symlink "$ENV{datadir}/test/d1.MYI", sprintf "$1$2%x.MAI", hex($3)+4;
+ symlink "$ENV{datadir}/test/d1.MYI", "$1-0.MAI";
}
EOF
diff --git a/mysql-test/main/thread_pool_info.opt b/mysql-test/main/thread_pool_info.opt
new file mode 100644
index 00000000000..61bfc80d237
--- /dev/null
+++ b/mysql-test/main/thread_pool_info.opt
@@ -0,0 +1 @@
+--thread-handling=pool-of-threads --loose-thread-pool-mode=generic --loose-thread-pool-groups=ON --loose-thread-pool-queues=ON --thread-pool-stats=ON --thread-pool-waits=ON --thread-pool-size=1 --thread-pool-max-threads=2 --thread-pool-dedicated-listener
diff --git a/mysql-test/main/thread_pool_info.result b/mysql-test/main/thread_pool_info.result
new file mode 100644
index 00000000000..53fa1d1255d
--- /dev/null
+++ b/mysql-test/main/thread_pool_info.result
@@ -0,0 +1,111 @@
+DESC INFORMATION_SCHEMA.THREAD_POOL_GROUPS;
+Field Type Null Key Default Extra
+GROUP_ID int(6) NO 0
+CONNECTIONS int(6) NO 0
+THREADS int(6) NO 0
+ACTIVE_THREADS int(6) NO 0
+STANDBY_THREADS int(6) NO 0
+QUEUE_LENGTH int(6) NO 0
+HAS_LISTENER tinyint(1) NO 0
+IS_STALLED tinyint(1) NO 0
+SELECT COUNT(*)=@@thread_pool_size FROM INFORMATION_SCHEMA.THREAD_POOL_GROUPS;
+COUNT(*)=@@thread_pool_size
+1
+SELECT SUM(CONNECTIONS) FROM INFORMATION_SCHEMA.THREAD_POOL_GROUPS;
+SUM(CONNECTIONS)
+1
+SELECT SUM(THREADS) > 0 FROM INFORMATION_SCHEMA.THREAD_POOL_GROUPS;
+SUM(THREADS) > 0
+1
+SELECT SUM(ACTIVE_THREADS) > 0 FROM INFORMATION_SCHEMA.THREAD_POOL_GROUPS;
+SUM(ACTIVE_THREADS) > 0
+1
+SELECT SUM(QUEUE_LENGTH) FROM INFORMATION_SCHEMA.THREAD_POOL_GROUPS;
+SUM(QUEUE_LENGTH)
+0
+SELECT SUM(IS_STALLED) FROM INFORMATION_SCHEMA.THREAD_POOL_GROUPS;
+SUM(IS_STALLED)
+0
+DESC INFORMATION_SCHEMA.THREAD_POOL_STATS;
+Field Type Null Key Default Extra
+GROUP_ID int(6) NO 0
+THREAD_CREATIONS bigint(19) NO 0
+THREAD_CREATIONS_DUE_TO_STALL bigint(19) NO 0
+WAKES bigint(19) NO 0
+WAKES_DUE_TO_STALL bigint(19) NO 0
+THROTTLES bigint(19) NO 0
+STALLS bigint(19) NO 0
+POLLS_BY_LISTENER bigint(19) NO 0
+POLLS_BY_WORKER bigint(19) NO 0
+DEQUEUES_BY_LISTENER bigint(19) NO 0
+DEQUEUES_BY_WORKER bigint(19) NO 0
+SELECT SUM(DEQUEUES_BY_LISTENER+DEQUEUES_BY_WORKER) > 0 FROM INFORMATION_SCHEMA.THREAD_POOL_STATS;
+SUM(DEQUEUES_BY_LISTENER+DEQUEUES_BY_WORKER) > 0
+1
+SELECT SUM(POLLS_BY_LISTENER+POLLS_BY_WORKER) > 0 FROM INFORMATION_SCHEMA.THREAD_POOL_STATS;
+SUM(POLLS_BY_LISTENER+POLLS_BY_WORKER) > 0
+1
+FLUSH THREAD_POOL_STATS;
+SELECT SUM(DEQUEUES_BY_LISTENER+DEQUEUES_BY_WORKER) FROM INFORMATION_SCHEMA.THREAD_POOL_STATS;
+SUM(DEQUEUES_BY_LISTENER+DEQUEUES_BY_WORKER)
+1
+SELECT SUM(POLLS_BY_LISTENER) FROM INFORMATION_SCHEMA.THREAD_POOL_STATS;
+SUM(POLLS_BY_LISTENER)
+2
+SELECT SUM(POLLS_BY_WORKER) FROM INFORMATION_SCHEMA.THREAD_POOL_STATS;
+SUM(POLLS_BY_WORKER)
+0
+DESC INFORMATION_SCHEMA.THREAD_POOL_WAITS;
+Field Type Null Key Default Extra
+REASON varchar(16) NO
+COUNT bigint(19) NO 0
+SELECT REASON FROM INFORMATION_SCHEMA.THREAD_POOL_WAITS;
+REASON
+UNKNOWN
+SLEEP
+DISKIO
+ROW_LOCK
+GLOBAL_LOCK
+META_DATA_LOCK
+TABLE_LOCK
+USER_LOCK
+BINLOG
+GROUP_COMMIT
+SYNC
+NET
+SELECT COUNT FROM INFORMATION_SCHEMA.THREAD_POOL_WAITS WHERE REASON='Sleep';
+COUNT
+0
+SELECT SLEEP(0.01);
+SLEEP(0.01)
+0
+SELECT COUNT FROM INFORMATION_SCHEMA.THREAD_POOL_WAITS WHERE REASON='Sleep';
+COUNT
+1
+FLUSH THREAD_POOL_WAITS;
+DESC INFORMATION_SCHEMA.THREAD_POOL_QUEUES;
+Field Type Null Key Default Extra
+GROUP_ID int(6) NO 0
+POSITION int(6) NO 0
+PRIORITY int(1) NO 0
+CONNECTION_ID bigint(19) unsigned YES NULL
+QUEUEING_TIME_MICROSECONDS bigint(19) NO 0
+# restart: with restart_parameters
+connect con1, localhost, root,,test;
+connection con1;
+connect con2, localhost, root,,test;
+connection con2;
+connect extra_con,127.0.0.1,root,,test,$extra_port,;
+connection con1;
+SELECT SLEEP(1000);
+connection extra_con;
+connection con2;
+DO 1;
+connection extra_con;
+KILL QUERY con1_id;
+disconnect extra_con;
+connection con1;
+disconnect con1;
+connection con2;
+disconnect con2;
+connection default;
diff --git a/mysql-test/main/thread_pool_info.test b/mysql-test/main/thread_pool_info.test
new file mode 100644
index 00000000000..cd906454d8c
--- /dev/null
+++ b/mysql-test/main/thread_pool_info.test
@@ -0,0 +1,92 @@
+source include/not_embedded.inc;
+
+let $have_plugin = `SELECT COUNT(*) FROM INFORMATION_SCHEMA.PLUGINS WHERE PLUGIN_STATUS='ACTIVE' AND PLUGIN_NAME = 'THREAD_POOL_GROUPS'`;
+if(!$have_plugin)
+{
+ --skip Need thread_pool_groups plugin
+}
+
+#I_S.THREAD_POOL_GROUPS
+DESC INFORMATION_SCHEMA.THREAD_POOL_GROUPS;
+SELECT COUNT(*)=@@thread_pool_size FROM INFORMATION_SCHEMA.THREAD_POOL_GROUPS;
+SELECT SUM(CONNECTIONS) FROM INFORMATION_SCHEMA.THREAD_POOL_GROUPS;
+SELECT SUM(THREADS) > 0 FROM INFORMATION_SCHEMA.THREAD_POOL_GROUPS;
+SELECT SUM(ACTIVE_THREADS) > 0 FROM INFORMATION_SCHEMA.THREAD_POOL_GROUPS;
+SELECT SUM(QUEUE_LENGTH) FROM INFORMATION_SCHEMA.THREAD_POOL_GROUPS;
+SELECT SUM(IS_STALLED) FROM INFORMATION_SCHEMA.THREAD_POOL_GROUPS;
+
+
+# I_S.THREAD_POOL_STATS
+DESC INFORMATION_SCHEMA.THREAD_POOL_STATS;
+# The following query does not reliably give results, after FLUSH
+# so if the test runs with --repeat, it would fail
+#SELECT SUM(THREAD_CREATIONS) > 0 FROM INFORMATION_SCHEMA.THREAD_POOL_STATS;
+SELECT SUM(DEQUEUES_BY_LISTENER+DEQUEUES_BY_WORKER) > 0 FROM INFORMATION_SCHEMA.THREAD_POOL_STATS;
+SELECT SUM(POLLS_BY_LISTENER+POLLS_BY_WORKER) > 0 FROM INFORMATION_SCHEMA.THREAD_POOL_STATS;
+--disable_ps_protocol
+FLUSH THREAD_POOL_STATS;
+SELECT SUM(DEQUEUES_BY_LISTENER+DEQUEUES_BY_WORKER) FROM INFORMATION_SCHEMA.THREAD_POOL_STATS;
+SELECT SUM(POLLS_BY_LISTENER) FROM INFORMATION_SCHEMA.THREAD_POOL_STATS;
+SELECT SUM(POLLS_BY_WORKER) FROM INFORMATION_SCHEMA.THREAD_POOL_STATS;
+--enable_ps_protocol
+
+#I_S.THREAD_POOL_WAITS
+DESC INFORMATION_SCHEMA.THREAD_POOL_WAITS;
+SELECT REASON FROM INFORMATION_SCHEMA.THREAD_POOL_WAITS;
+SELECT COUNT FROM INFORMATION_SCHEMA.THREAD_POOL_WAITS WHERE REASON='Sleep';
+SELECT SLEEP(0.01);
+SELECT COUNT FROM INFORMATION_SCHEMA.THREAD_POOL_WAITS WHERE REASON='Sleep';
+FLUSH THREAD_POOL_WAITS;
+
+
+# I_S.THREAD_POOL_QUEUES
+DESC INFORMATION_SCHEMA.THREAD_POOL_QUEUES;
+let $extra_port=`select @@port+1`;
+
+let $restart_parameters=--extra-port=$extra_port;
+let $restart_noprint=1;
+source include/restart_mysqld.inc;
+
+connect (con1, localhost, root,,test);
+connection con1;
+let $con1_id=`SELECT CONNECTION_ID()`;
+
+connect (con2, localhost, root,,test);
+connection con2;
+let $con2_id=`SELECT CONNECTION_ID()`;
+
+connect(extra_con,127.0.0.1,root,,test,$extra_port,);
+
+connection con1;
+send SELECT SLEEP(1000);
+
+connection extra_con;
+let $wait_condition=
+ SELECT COUNT(*) > 0 FROM INFORMATION_SCHEMA.PROCESSLIST
+ WHERE STATE='User sleep' AND ID=$con1_id;
+--source include/wait_condition.inc
+
+connection con2;
+send DO 1;
+
+
+connection extra_con;
+let $wait_condition=
+ SELECT COUNT(*) > 0 FROM INFORMATION_SCHEMA.THREAD_POOL_QUEUES
+ WHERE CONNECTION_ID IS NOT NULL;
+--source include/wait_condition.inc
+
+--replace_result $con1_id con1_id
+eval KILL QUERY $con1_id;
+disconnect extra_con;
+
+connection con1;
+error 0,ER_QUERY_INTERRUPTED;
+reap;
+disconnect con1;
+
+connection con2;
+reap;
+disconnect con2;
+
+connection default;
diff --git a/mysql-test/main/trigger-trans.result b/mysql-test/main/trigger-trans.result
index c58c4230a40..2113377b1ab 100644
--- a/mysql-test/main/trigger-trans.result
+++ b/mysql-test/main/trigger-trans.result
@@ -229,3 +229,17 @@ INSERT INTO t2 (id) VALUES (1);
disconnect con2;
connection default;
DROP TABLE t3, t2, t1;
+#
+# MDEV-25738 Assertion `ticket->m_duration == MDL_EXPLICIT' failed in
+# void MDL_context::release_lock(MDL_ticket*)
+#
+CREATE TABLE t1 (id int(11)) ENGINE=InnoDB;
+LOCK TABLES t1 WRITE;
+SET max_statement_time= 0.001;
+CREATE TRIGGER tr16 AFTER UPDATE ON t1 FOR EACH ROW INSERT INTO t1 VALUES (1);
+SET max_statement_time= default;
+DROP TRIGGER IF EXISTS trg16;
+DROP TABLE t1;
+#
+# End of 10.5 tests
+#
diff --git a/mysql-test/main/trigger-trans.test b/mysql-test/main/trigger-trans.test
index 17656c3516e..5d7d1f8afef 100644
--- a/mysql-test/main/trigger-trans.test
+++ b/mysql-test/main/trigger-trans.test
@@ -233,3 +233,25 @@ DROP TABLE t3, t2, t1;
# Wait till we reached the initial number of concurrent sessions
--source include/wait_until_count_sessions.inc
+
+--echo #
+--echo # MDEV-25738 Assertion `ticket->m_duration == MDL_EXPLICIT' failed in
+--echo # void MDL_context::release_lock(MDL_ticket*)
+--echo #
+
+CREATE TABLE t1 (id int(11)) ENGINE=InnoDB;
+LOCK TABLES t1 WRITE;
+SET max_statement_time= 0.001;
+--error 0,1969,2013
+--disable_warnings
+CREATE TRIGGER tr16 AFTER UPDATE ON t1 FOR EACH ROW INSERT INTO t1 VALUES (1);
+--enable_warnings
+SET max_statement_time= default;
+--disable_warnings
+DROP TRIGGER IF EXISTS trg16;
+--enable_warnings
+DROP TABLE t1;
+
+--echo #
+--echo # End of 10.5 tests
+--echo #
diff --git a/mysql-test/main/trigger.test b/mysql-test/main/trigger.test
index 581015a45e6..543d516010d 100644
--- a/mysql-test/main/trigger.test
+++ b/mysql-test/main/trigger.test
@@ -2616,7 +2616,7 @@ DROP TABLE t1, t2;
--echo # End of 5.3 tests.
#
-# MDEV-4829 BEFORE INSERT triggers dont issue 1406 error
+# MDEV-4829 BEFORE INSERT triggers don't issue 1406 error
# Also check timestamp for trigger
#
diff --git a/mysql-test/main/trigger_notembedded.result b/mysql-test/main/trigger_notembedded.result
index 94e651b1340..e276ddd1e48 100644
--- a/mysql-test/main/trigger_notembedded.result
+++ b/mysql-test/main/trigger_notembedded.result
@@ -112,10 +112,10 @@ CREATE DEFINER='mysqltest_inv'@'localhost'
TRIGGER trg1 BEFORE INSERT ON t1
FOR EACH ROW
SET @new_sum = 0;
-ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
+ERROR 42000: Access denied; you need (at least one of) the SUPER, SET USER privilege(s) for this operation
connection default;
use mysqltest_db1;
-GRANT SUPER ON *.* TO mysqltest_dfn@localhost;
+GRANT SET USER ON *.* TO mysqltest_dfn@localhost;
disconnect wl2818_definer_con;
connect wl2818_definer_con,localhost,mysqltest_dfn,,mysqltest_db1;
connection wl2818_definer_con;
diff --git a/mysql-test/main/trigger_notembedded.test b/mysql-test/main/trigger_notembedded.test
index 9f89e66bbfe..313faea982c 100644
--- a/mysql-test/main/trigger_notembedded.test
+++ b/mysql-test/main/trigger_notembedded.test
@@ -255,7 +255,7 @@ CREATE DEFINER='mysqltest_inv'@'localhost'
use mysqltest_db1;
-GRANT SUPER ON *.* TO mysqltest_dfn@localhost;
+GRANT SET USER ON *.* TO mysqltest_dfn@localhost;
--disconnect wl2818_definer_con
--connect (wl2818_definer_con,localhost,mysqltest_dfn,,mysqltest_db1)
diff --git a/mysql-test/main/type_binary.result b/mysql-test/main/type_binary.result
index 7dfe44ab045..76dab6e4e93 100644
--- a/mysql-test/main/type_binary.result
+++ b/mysql-test/main/type_binary.result
@@ -180,3 +180,43 @@ DROP TABLE t1;
#
# End of 10.0 tests
#
+#
+# Start of 10.5 tests
+#
+#
+# MDEV-20818 ER_CRASHED_ON_USAGE or Assertion `length <= column->length' failed in write_block_record on temporary table
+#
+CREATE TABLE t1 (a VARCHAR(39));
+SELECT
+CAST(a AS BINARY(0)),
+CAST(a AS BINARY(1)),
+CAST(a AS BINARY(16)),
+CAST(a AS BINARY(255)),
+CAST(a AS BINARY(256)),
+CAST(a AS BINARY(512)),
+CAST(a AS BINARY(513)),
+CAST(a AS BINARY(65532)),
+CAST(a AS BINARY(65533)),
+CAST(a AS BINARY(65534)),
+CAST(a AS BINARY(65535)),
+CAST(a AS BINARY(65536)),
+CAST(a AS BINARY(16777215)),
+CAST(a AS BINARY(16777216))
+FROM t1;
+Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
+def CAST(a AS BINARY(0)) 253 0 0 Y 128 0 63
+def CAST(a AS BINARY(1)) 253 1 0 Y 128 0 63
+def CAST(a AS BINARY(16)) 253 16 0 Y 128 0 63
+def CAST(a AS BINARY(255)) 253 255 0 Y 128 0 63
+def CAST(a AS BINARY(256)) 253 256 0 Y 128 0 63
+def CAST(a AS BINARY(512)) 253 512 0 Y 128 0 63
+def CAST(a AS BINARY(513)) 253 513 0 Y 128 0 63
+def CAST(a AS BINARY(65532)) 252 65532 0 Y 128 0 63
+def CAST(a AS BINARY(65533)) 252 65533 0 Y 128 0 63
+def CAST(a AS BINARY(65534)) 252 65534 0 Y 128 0 63
+def CAST(a AS BINARY(65535)) 252 65535 0 Y 128 0 63
+def CAST(a AS BINARY(65536)) 250 65536 0 Y 128 0 63
+def CAST(a AS BINARY(16777215)) 250 16777215 0 Y 128 0 63
+def CAST(a AS BINARY(16777216)) 251 16777216 0 Y 128 0 63
+CAST(a AS BINARY(0)) CAST(a AS BINARY(1)) CAST(a AS BINARY(16)) CAST(a AS BINARY(255)) CAST(a AS BINARY(256)) CAST(a AS BINARY(512)) CAST(a AS BINARY(513)) CAST(a AS BINARY(65532)) CAST(a AS BINARY(65533)) CAST(a AS BINARY(65534)) CAST(a AS BINARY(65535)) CAST(a AS BINARY(65536)) CAST(a AS BINARY(16777215)) CAST(a AS BINARY(16777216))
+DROP TABLE t1;
diff --git a/mysql-test/main/type_binary.test b/mysql-test/main/type_binary.test
index 952bc6ef231..9f7a0db66d5 100644
--- a/mysql-test/main/type_binary.test
+++ b/mysql-test/main/type_binary.test
@@ -126,3 +126,31 @@ DROP TABLE t1;
--echo # End of 10.0 tests
--echo #
+--echo #
+--echo # Start of 10.5 tests
+--echo #
+
+--echo #
+--echo # MDEV-20818 ER_CRASHED_ON_USAGE or Assertion `length <= column->length' failed in write_block_record on temporary table
+--echo #
+
+CREATE TABLE t1 (a VARCHAR(39));
+--enable_metadata
+SELECT
+ CAST(a AS BINARY(0)),
+ CAST(a AS BINARY(1)),
+ CAST(a AS BINARY(16)),
+ CAST(a AS BINARY(255)),
+ CAST(a AS BINARY(256)),
+ CAST(a AS BINARY(512)),
+ CAST(a AS BINARY(513)),
+ CAST(a AS BINARY(65532)),
+ CAST(a AS BINARY(65533)),
+ CAST(a AS BINARY(65534)),
+ CAST(a AS BINARY(65535)),
+ CAST(a AS BINARY(65536)),
+ CAST(a AS BINARY(16777215)),
+ CAST(a AS BINARY(16777216))
+FROM t1;
+--disable_metadata
+DROP TABLE t1;
diff --git a/mysql-test/main/type_bit.result b/mysql-test/main/type_bit.result
index 4e9d698b0c2..f44bdf70c4a 100644
--- a/mysql-test/main/type_bit.result
+++ b/mysql-test/main/type_bit.result
@@ -766,7 +766,7 @@ CREATE TABLE t1 (a BIT(7), b BIT(9), KEY(a, b));
INSERT INTO t1 VALUES(0, 0), (5, 3), (5, 6), (6, 4), (7, 0);
EXPLAIN SELECT a+0, b+0 FROM t1 WHERE a > 4 and b < 7 ORDER BY 2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index a a 5 NULL 5 Using where; Using index; Using filesort
+1 SIMPLE t1 range a a 2 NULL 4 Using where; Using index; Using filesort
DROP TABLE t1;
End of 5.0 tests
create table t1(a bit(7));
@@ -1861,3 +1861,26 @@ ct 18446744073709551615
#
# End of 10.4 tests
#
+#
+# Start of 10.5 tests
+#
+#
+# MDEV-20496 Assertion `field.is_sane()' failed in Protocol_text::store_field_metadata
+#
+CREATE TABLE t1 (b BIT(1));
+SELECT MIN(CASE WHEN 0 THEN b END) FROM t1;
+Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
+def MIN(CASE WHEN 0 THEN b END) 8 1 0 Y 32928 0 63
+MIN(CASE WHEN 0 THEN b END)
+NULL
+CREATE TABLE t2 AS SELECT MIN(CASE WHEN 0 THEN b END) FROM t1;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `MIN(CASE WHEN 0 THEN b END)` bigint(1) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t2;
+DROP TABLE t1;
+#
+# End of 10.5 tests
+#
diff --git a/mysql-test/main/type_bit.test b/mysql-test/main/type_bit.test
index 2353fc535ad..2e66c7fb7cd 100644
--- a/mysql-test/main/type_bit.test
+++ b/mysql-test/main/type_bit.test
@@ -540,3 +540,26 @@ DELIMITER ;$$
--echo #
--echo # End of 10.4 tests
--echo #
+
+--echo #
+--echo # Start of 10.5 tests
+--echo #
+
+--echo #
+--echo # MDEV-20496 Assertion `field.is_sane()' failed in Protocol_text::store_field_metadata
+--echo #
+
+CREATE TABLE t1 (b BIT(1));
+--disable_ps_protocol
+--enable_metadata
+SELECT MIN(CASE WHEN 0 THEN b END) FROM t1;
+--disable_metadata
+--enable_ps_protocol
+CREATE TABLE t2 AS SELECT MIN(CASE WHEN 0 THEN b END) FROM t1;
+SHOW CREATE TABLE t2;
+DROP TABLE t2;
+DROP TABLE t1;
+
+--echo #
+--echo # End of 10.5 tests
+--echo #
diff --git a/mysql-test/main/type_blob.result b/mysql-test/main/type_blob.result
index a0a5f82a656..28f5d8fb868 100644
--- a/mysql-test/main/type_blob.result
+++ b/mysql-test/main/type_blob.result
@@ -245,7 +245,7 @@ HELLO
HELLO MY
a
hello
-set big_tables=1;
+set tmp_memory_table_size=0;
select distinct t from t1;
t
NULL
@@ -326,7 +326,7 @@ HELLO
HELLO MY
a
hello
-set big_tables=0;
+set tmp_memory_table_size=default;
select distinct * from t1;
t c b d
NULL NULL NULL NULL
@@ -625,7 +625,7 @@ id txt
3 NULL
explain select * from t1 where txt='Chevy' or txt is NULL;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL txt_index NULL NULL NULL 6 Using where
+1 SIMPLE t1 ref_or_null txt_index txt_index 23 const 3 Using where
explain select * from t1 FORCE INDEX (`txt_index`) where txt='Chevy' or txt is NULL;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref_or_null txt_index txt_index 23 const 3 Using where
diff --git a/mysql-test/main/type_blob.test b/mysql-test/main/type_blob.test
index a9b044b5318..38c8b9a83ca 100644
--- a/mysql-test/main/type_blob.test
+++ b/mysql-test/main/type_blob.test
@@ -113,7 +113,7 @@ select distinct t from t1 order by t;
select distinct b from t1 order by b;
select t from t1 group by t;
select b from t1 group by b;
-set big_tables=1;
+set tmp_memory_table_size=0; # force on-disk tmp table
select distinct t from t1;
select distinct b from t1;
select distinct t from t1 order by t;
@@ -124,7 +124,7 @@ select distinct c from t1 order by c;
select distinct d from t1 order by d;
select c from t1 group by c;
select d from t1 group by d;
-set big_tables=0;
+set tmp_memory_table_size=default;
select distinct * from t1;
select t,count(*) from t1 group by t;
select b,count(*) from t1 group by b;
diff --git a/mysql-test/main/type_date.result b/mysql-test/main/type_date.result
index 1724b7ae605..926ed1a8393 100644
--- a/mysql-test/main/type_date.result
+++ b/mysql-test/main/type_date.result
@@ -933,7 +933,7 @@ CREATE TABLE t1 (f DATE, KEY(f));
INSERT INTO t1 VALUES ('2020-01-01'),('2020-01-02');
EXPLAIN EXTENDED SELECT * FROM t1 WHERE 1995.0000000 BETWEEN f AND '2012-12-12';
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t1 index f f 4 NULL 2 50.00 Using where; Using index
+1 SIMPLE t1 range f f 4 NULL 1 100.00 Using where; Using index
Warnings:
Warning 1292 Truncated incorrect datetime value: '1995.0000000'
Note 1003 select `test`.`t1`.`f` AS `f` from `test`.`t1` where '0000-00-00' between `test`.`t1`.`f` and <cache>('2012-12-12')
diff --git a/mysql-test/main/type_datetime.result b/mysql-test/main/type_datetime.result
index bb3e86b6543..3c1baf82167 100644
--- a/mysql-test/main/type_datetime.result
+++ b/mysql-test/main/type_datetime.result
@@ -1340,7 +1340,7 @@ CREATE TABLE t1 (f DATETIME, KEY(f));
INSERT INTO t1 VALUES ('2020-01-01 00:00:00'),('2020-01-02 00:00:00');
EXPLAIN EXTENDED SELECT * FROM t1 WHERE 1995.0000000 BETWEEN f AND '2012-12-12';
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t1 index f f 6 NULL 2 50.00 Using where; Using index
+1 SIMPLE t1 range f f 6 NULL 1 100.00 Using where; Using index
Warnings:
Warning 1292 Truncated incorrect datetime value: '1995.0000000'
Note 1003 select `test`.`t1`.`f` AS `f` from `test`.`t1` where '0000-00-00 00:00:00.000000' between `test`.`t1`.`f` and <cache>('2012-12-12')
diff --git a/mysql-test/main/type_enum.result b/mysql-test/main/type_enum.result
index c8277ab832f..d8b558c7ce0 100644
--- a/mysql-test/main/type_enum.result
+++ b/mysql-test/main/type_enum.result
@@ -1932,16 +1932,14 @@ ALTER TABLE t2 ADD PRIMARY KEY(c1);
SELECT t1.* FROM t1 JOIN t2 ON t1.c1 COLLATE latin1_swedish_ci=t2.c1;
c1
a
-a
SELECT t1.* FROM t1 LEFT JOIN t2 ON t1.c1 COLLATE latin1_swedish_ci=t2.c1;
c1
a
-a
# t2 should NOT be eliminated
EXPLAIN SELECT t1.* FROM t1 LEFT JOIN t2 ON t1.c1 COLLATE latin1_swedish_ci=t2.c1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 system NULL NULL NULL NULL 1
-1 SIMPLE t2 index PRIMARY PRIMARY 1 NULL 2 Using where; Using index
+1 SIMPLE t2 range PRIMARY PRIMARY 1 NULL 1 Using where; Using index
DROP TABLE IF EXISTS t1,t2;
CREATE TABLE t1 (c1 SET('a') CHARACTER SET latin1 PRIMARY KEY);
INSERT INTO t1 VALUES ('a');
@@ -1959,16 +1957,14 @@ ALTER TABLE t2 ADD PRIMARY KEY(c1);
SELECT t1.* FROM t1 JOIN t2 ON t1.c1 COLLATE latin1_swedish_ci=t2.c1;
c1
a
-a
SELECT t1.* FROM t1 LEFT JOIN t2 ON t1.c1 COLLATE latin1_swedish_ci=t2.c1;
c1
a
-a
# t2 should NOT be eliminated
EXPLAIN SELECT t1.* FROM t1 LEFT JOIN t2 ON t1.c1 COLLATE latin1_swedish_ci=t2.c1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 system NULL NULL NULL NULL 1
-1 SIMPLE t2 index PRIMARY PRIMARY 1 NULL 2 Using where; Using index
+1 SIMPLE t2 range PRIMARY PRIMARY 1 NULL 1 Using where; Using index
DROP TABLE IF EXISTS t1,t2;
CREATE TABLE t1 (c1 VARCHAR(10) CHARACTER SET latin1 PRIMARY KEY);
INSERT INTO t1 VALUES ('a');
@@ -1986,16 +1982,14 @@ ALTER TABLE t2 ADD PRIMARY KEY(c1);
SELECT t1.* FROM t1 JOIN t2 ON t1.c1 COLLATE latin1_swedish_ci=t2.c1;
c1
a
-a
SELECT t1.* FROM t1 LEFT JOIN t2 ON t1.c1 COLLATE latin1_swedish_ci=t2.c1;
c1
a
-a
# t2 should NOT be eliminated
EXPLAIN SELECT t1.* FROM t1 LEFT JOIN t2 ON t1.c1 COLLATE latin1_swedish_ci=t2.c1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 system NULL NULL NULL NULL 1
-1 SIMPLE t2 index PRIMARY PRIMARY 1 NULL 2 Using where; Using index
+1 SIMPLE t2 range PRIMARY PRIMARY 1 NULL 1 Using where; Using index
DROP TABLE IF EXISTS t1,t2;
#
# MDEV-6991 GROUP_MIN_MAX optimization is erroneously applied in some cases
diff --git a/mysql-test/main/type_int.result b/mysql-test/main/type_int.result
index 08abf2db916..c9763a1453e 100644
--- a/mysql-test/main/type_int.result
+++ b/mysql-test/main/type_int.result
@@ -1493,3 +1493,18 @@ DROP TABLE t1;
#
# End of 10.4 tests
#
+#
+# Start of 10.5 tests
+#
+#
+# MDEV-20363 Assertion `is_unsigned() == attr.unsigned_flag' failed in Type_handler_longlong::make_table_field
+#
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1),(2);
+SELECT DISTINCT 1 FROM t1 GROUP BY 0 >> NULL WITH ROLLUP;
+1
+1
+DROP TABLE t1;
+#
+# End of 10.5 tests
+#
diff --git a/mysql-test/main/type_int.test b/mysql-test/main/type_int.test
index 0505020374d..c2edb0a9756 100644
--- a/mysql-test/main/type_int.test
+++ b/mysql-test/main/type_int.test
@@ -438,3 +438,21 @@ DROP TABLE t1;
--echo #
--echo # End of 10.4 tests
--echo #
+
+--echo #
+--echo # Start of 10.5 tests
+--echo #
+
+--echo #
+--echo # MDEV-20363 Assertion `is_unsigned() == attr.unsigned_flag' failed in Type_handler_longlong::make_table_field
+--echo #
+
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1),(2);
+SELECT DISTINCT 1 FROM t1 GROUP BY 0 >> NULL WITH ROLLUP;
+DROP TABLE t1;
+
+
+--echo #
+--echo # End of 10.5 tests
+--echo #
diff --git a/mysql-test/main/type_json.result b/mysql-test/main/type_json.result
index 96e96cca404..2c4f7b7d42b 100644
--- a/mysql-test/main/type_json.result
+++ b/mysql-test/main/type_json.result
@@ -98,3 +98,33 @@ select cast('{a:1}' as text);
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 'text)' at line 1
select cast('{a:1}' as json);
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 'json)' at line 1
+#
+# Start of 10.5 tests
+#
+#
+# MDEV-17832 Protocol: extensions for Pluggable types and JSON, GEOMETRY
+#
+SET NAMES utf8;
+CREATE TABLE t1 (
+js0 JSON,
+js1 TEXT CHECK (JSON_VALID(js1)),
+js2 TEXT CHECK (LENGTH(js2) > 0 AND JSON_VALID(js2)),
+js3 TEXT CHECK (LENGTH(js2) > 0 OR JSON_VALID(js2))
+) CHARACTER SET utf8;
+SELECT * FROM t1;
+Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
+def test t1 t1 js0 js0 252 (format=json) 4294967295 0 Y 144 0 33
+def test t1 t1 js1 js1 252 (format=json) 196605 0 Y 16 0 33
+def test t1 t1 js2 js2 252 (format=json) 196605 0 Y 16 0 33
+def test t1 t1 js3 js3 252 196605 0 Y 16 0 33
+js0 js1 js2 js3
+SELECT js0, JSON_COMPACT(js0), JSON_COMPACT('{}') FROM t1;
+Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
+def test t1 t1 js0 js0 252 (format=json) 4294967295 0 Y 144 0 33
+def JSON_COMPACT(js0) 251 (format=json) 4294967295 0 Y 128 0 63
+def JSON_COMPACT('{}') 253 (format=json) 6 0 Y 128 0 63
+js0 JSON_COMPACT(js0) JSON_COMPACT('{}')
+DROP TABLE t1;
+#
+# End of 10.5 tests
+#
diff --git a/mysql-test/main/type_json.test b/mysql-test/main/type_json.test
index bd13dc1fcf4..7ab0af20e03 100644
--- a/mysql-test/main/type_json.test
+++ b/mysql-test/main/type_json.test
@@ -64,3 +64,30 @@ drop table t1;
select cast('{a:1}' as text);
--error ER_PARSE_ERROR
select cast('{a:1}' as json);
+
+--echo #
+--echo # Start of 10.5 tests
+--echo #
+
+--echo #
+--echo # MDEV-17832 Protocol: extensions for Pluggable types and JSON, GEOMETRY
+--echo #
+
+SET NAMES utf8;
+CREATE TABLE t1 (
+ js0 JSON,
+ js1 TEXT CHECK (JSON_VALID(js1)),
+ js2 TEXT CHECK (LENGTH(js2) > 0 AND JSON_VALID(js2)),
+ js3 TEXT CHECK (LENGTH(js2) > 0 OR JSON_VALID(js2))
+) CHARACTER SET utf8;
+--disable_ps_protocol
+--enable_metadata
+SELECT * FROM t1;
+SELECT js0, JSON_COMPACT(js0), JSON_COMPACT('{}') FROM t1;
+--disable_metadata
+--enable_ps_protocol
+DROP TABLE t1;
+
+--echo #
+--echo # End of 10.5 tests
+--echo #
diff --git a/mysql-test/main/type_row.result b/mysql-test/main/type_row.result
new file mode 100644
index 00000000000..dc74cfc88a4
--- /dev/null
+++ b/mysql-test/main/type_row.result
@@ -0,0 +1,51 @@
+#
+# Start of 10.5 tests
+#
+#
+# MDEV-20175 Move Type_handler_row from Type_collection_std to Type_collection_row
+#
+SELECT LEAST(ROW(1,1), ROW(1,1));
+ERROR HY000: Illegal parameter data types row and row for operation 'least'
+SELECT GREATEST(ROW(1,1), ROW(1,1));
+ERROR HY000: Illegal parameter data types row and row for operation 'greatest'
+SELECT LEAST(ROW(1,1), 1);
+ERROR HY000: Illegal parameter data types row and int for operation 'least'
+SELECT GREATEST(ROW(1,1), 1);
+ERROR HY000: Illegal parameter data types row and int for operation 'greatest'
+SELECT LEAST(1, ROW(1,1));
+ERROR HY000: Illegal parameter data types int and row for operation 'least'
+SELECT GREATEST(1, ROW(1,1));
+ERROR HY000: Illegal parameter data types int and row for operation 'greatest'
+SELECT ROW(1,1) + ROW(1,1);
+ERROR HY000: Illegal parameter data types row and row for operation '+'
+SELECT 1 + ROW(1,1);
+ERROR HY000: Illegal parameter data types int and row for operation '+'
+SELECT ROW(1,1) + 1;
+ERROR HY000: Illegal parameter data types row and int for operation '+'
+SELECT ROW(1,1) - ROW(1,1);
+ERROR HY000: Illegal parameter data types row and row for operation '-'
+SELECT 1 - ROW(1,1);
+ERROR HY000: Illegal parameter data types int and row for operation '-'
+SELECT ROW(1,1) - 1;
+ERROR HY000: Illegal parameter data types row and int for operation '-'
+SELECT ROW(1,1) * ROW(1,1);
+ERROR HY000: Illegal parameter data types row and row for operation '*'
+SELECT 1 * ROW(1,1);
+ERROR HY000: Illegal parameter data types int and row for operation '*'
+SELECT ROW(1,1) * 1;
+ERROR HY000: Illegal parameter data types row and int for operation '*'
+SELECT ROW(1,1) / ROW(1,1);
+ERROR HY000: Illegal parameter data types row and row for operation '/'
+SELECT 1 / ROW(1,1);
+ERROR HY000: Illegal parameter data types int and row for operation '/'
+SELECT ROW(1,1) / 1;
+ERROR HY000: Illegal parameter data types row and int for operation '/'
+SELECT ROW(1,1) % ROW(1,1);
+ERROR HY000: Illegal parameter data types row and row for operation 'MOD'
+SELECT 1 % ROW(1,1);
+ERROR HY000: Illegal parameter data types int and row for operation 'MOD'
+SELECT ROW(1,1) % 1;
+ERROR HY000: Illegal parameter data types row and int for operation 'MOD'
+#
+# End of 10.5 tests
+#
diff --git a/mysql-test/main/type_row.test b/mysql-test/main/type_row.test
new file mode 100644
index 00000000000..2a5902351e2
--- /dev/null
+++ b/mysql-test/main/type_row.test
@@ -0,0 +1,62 @@
+--echo #
+--echo # Start of 10.5 tests
+--echo #
+
+--echo #
+--echo # MDEV-20175 Move Type_handler_row from Type_collection_std to Type_collection_row
+--echo #
+
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT LEAST(ROW(1,1), ROW(1,1));
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT GREATEST(ROW(1,1), ROW(1,1));
+
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT LEAST(ROW(1,1), 1);
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT GREATEST(ROW(1,1), 1);
+
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT LEAST(1, ROW(1,1));
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT GREATEST(1, ROW(1,1));
+
+
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT ROW(1,1) + ROW(1,1);
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT 1 + ROW(1,1);
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT ROW(1,1) + 1;
+
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT ROW(1,1) - ROW(1,1);
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT 1 - ROW(1,1);
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT ROW(1,1) - 1;
+
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT ROW(1,1) * ROW(1,1);
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT 1 * ROW(1,1);
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT ROW(1,1) * 1;
+
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT ROW(1,1) / ROW(1,1);
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT 1 / ROW(1,1);
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT ROW(1,1) / 1;
+
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT ROW(1,1) % ROW(1,1);
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT 1 % ROW(1,1);
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT ROW(1,1) % 1;
+
+--echo #
+--echo # End of 10.5 tests
+--echo #
diff --git a/mysql-test/main/type_temporal_mariadb53.result b/mysql-test/main/type_temporal_mariadb53.result
new file mode 100644
index 00000000000..140c74ac836
--- /dev/null
+++ b/mysql-test/main/type_temporal_mariadb53.result
@@ -0,0 +1,237 @@
+#
+# MDEV-19906 Port show_old_temporals from MySQL 5.6
+#
+TRUNCATE TABLE mariadb5312_datetime;
+SHOW CREATE TABLE mariadb5312_datetime;
+Table Create Table
+mariadb5312_datetime CREATE TABLE `mariadb5312_datetime` (
+ `t0` datetime /* mariadb-5.3 */ DEFAULT NULL,
+ `t1` datetime(1) /* mariadb-5.3 */ DEFAULT NULL,
+ `t2` datetime(2) /* mariadb-5.3 */ DEFAULT NULL,
+ `t3` datetime(3) /* mariadb-5.3 */ DEFAULT NULL,
+ `t4` datetime(4) /* mariadb-5.3 */ DEFAULT NULL,
+ `t5` datetime(5) /* mariadb-5.3 */ DEFAULT NULL,
+ `t6` datetime(6) /* mariadb-5.3 */ DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+SELECT COLUMN_NAME, DATA_TYPE, COLUMN_TYPE FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='mariadb5312_datetime';
+COLUMN_NAME t0
+DATA_TYPE datetime
+COLUMN_TYPE datetime /* mariadb-5.3 */
+COLUMN_NAME t1
+DATA_TYPE datetime
+COLUMN_TYPE datetime(1) /* mariadb-5.3 */
+COLUMN_NAME t2
+DATA_TYPE datetime
+COLUMN_TYPE datetime(2) /* mariadb-5.3 */
+COLUMN_NAME t3
+DATA_TYPE datetime
+COLUMN_TYPE datetime(3) /* mariadb-5.3 */
+COLUMN_NAME t4
+DATA_TYPE datetime
+COLUMN_TYPE datetime(4) /* mariadb-5.3 */
+COLUMN_NAME t5
+DATA_TYPE datetime
+COLUMN_TYPE datetime(5) /* mariadb-5.3 */
+COLUMN_NAME t6
+DATA_TYPE datetime
+COLUMN_TYPE datetime(6) /* mariadb-5.3 */
+DESCRIBE mariadb5312_datetime;
+Field t0
+Type datetime /* mariadb-5.3 */
+Null YES
+Key
+Default NULL
+Extra
+Field t1
+Type datetime(1) /* mariadb-5.3 */
+Null YES
+Key
+Default NULL
+Extra
+Field t2
+Type datetime(2) /* mariadb-5.3 */
+Null YES
+Key
+Default NULL
+Extra
+Field t3
+Type datetime(3) /* mariadb-5.3 */
+Null YES
+Key
+Default NULL
+Extra
+Field t4
+Type datetime(4) /* mariadb-5.3 */
+Null YES
+Key
+Default NULL
+Extra
+Field t5
+Type datetime(5) /* mariadb-5.3 */
+Null YES
+Key
+Default NULL
+Extra
+Field t6
+Type datetime(6) /* mariadb-5.3 */
+Null YES
+Key
+Default NULL
+Extra
+DROP TABLE mariadb5312_datetime;
+TRUNCATE TABLE mariadb5312_timestamp;
+SHOW CREATE TABLE mariadb5312_timestamp;
+Table Create Table
+mariadb5312_timestamp CREATE TABLE `mariadb5312_timestamp` (
+ `t0` timestamp /* mariadb-5.3 */ NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
+ `t1` timestamp(1) /* mariadb-5.3 */ NOT NULL DEFAULT '0000-00-00 00:00:00.0',
+ `t2` timestamp(2) /* mariadb-5.3 */ NOT NULL DEFAULT '0000-00-00 00:00:00.00',
+ `t3` timestamp(3) /* mariadb-5.3 */ NOT NULL DEFAULT '0000-00-00 00:00:00.000',
+ `t4` timestamp(4) /* mariadb-5.3 */ NOT NULL DEFAULT '0000-00-00 00:00:00.0000',
+ `t5` timestamp(5) /* mariadb-5.3 */ NOT NULL DEFAULT '0000-00-00 00:00:00.00000',
+ `t6` timestamp(6) /* mariadb-5.3 */ NOT NULL DEFAULT '0000-00-00 00:00:00.000000'
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+SELECT COLUMN_NAME, DATA_TYPE, COLUMN_TYPE FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='mariadb5312_timestamp';
+COLUMN_NAME t0
+DATA_TYPE timestamp
+COLUMN_TYPE timestamp /* mariadb-5.3 */
+COLUMN_NAME t1
+DATA_TYPE timestamp
+COLUMN_TYPE timestamp(1) /* mariadb-5.3 */
+COLUMN_NAME t2
+DATA_TYPE timestamp
+COLUMN_TYPE timestamp(2) /* mariadb-5.3 */
+COLUMN_NAME t3
+DATA_TYPE timestamp
+COLUMN_TYPE timestamp(3) /* mariadb-5.3 */
+COLUMN_NAME t4
+DATA_TYPE timestamp
+COLUMN_TYPE timestamp(4) /* mariadb-5.3 */
+COLUMN_NAME t5
+DATA_TYPE timestamp
+COLUMN_TYPE timestamp(5) /* mariadb-5.3 */
+COLUMN_NAME t6
+DATA_TYPE timestamp
+COLUMN_TYPE timestamp(6) /* mariadb-5.3 */
+DESCRIBE mariadb5312_timestamp;
+Field t0
+Type timestamp /* mariadb-5.3 */
+Null NO
+Key
+Default current_timestamp()
+Extra on update current_timestamp()
+Field t1
+Type timestamp(1) /* mariadb-5.3 */
+Null NO
+Key
+Default 0000-00-00 00:00:00.0
+Extra
+Field t2
+Type timestamp(2) /* mariadb-5.3 */
+Null NO
+Key
+Default 0000-00-00 00:00:00.00
+Extra
+Field t3
+Type timestamp(3) /* mariadb-5.3 */
+Null NO
+Key
+Default 0000-00-00 00:00:00.000
+Extra
+Field t4
+Type timestamp(4) /* mariadb-5.3 */
+Null NO
+Key
+Default 0000-00-00 00:00:00.0000
+Extra
+Field t5
+Type timestamp(5) /* mariadb-5.3 */
+Null NO
+Key
+Default 0000-00-00 00:00:00.00000
+Extra
+Field t6
+Type timestamp(6) /* mariadb-5.3 */
+Null NO
+Key
+Default 0000-00-00 00:00:00.000000
+Extra
+DROP TABLE mariadb5312_timestamp;
+TRUNCATE TABLE mariadb5312_time;
+SHOW CREATE TABLE mariadb5312_time;
+Table Create Table
+mariadb5312_time CREATE TABLE `mariadb5312_time` (
+ `t0` time /* mariadb-5.3 */ DEFAULT NULL,
+ `t1` time(1) /* mariadb-5.3 */ DEFAULT NULL,
+ `t2` time(2) /* mariadb-5.3 */ DEFAULT NULL,
+ `t3` time(3) /* mariadb-5.3 */ DEFAULT NULL,
+ `t4` time(4) /* mariadb-5.3 */ DEFAULT NULL,
+ `t5` time(5) /* mariadb-5.3 */ DEFAULT NULL,
+ `t6` time(6) /* mariadb-5.3 */ DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+SELECT COLUMN_NAME, DATA_TYPE, COLUMN_TYPE FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='mariadb5312_time';
+COLUMN_NAME t0
+DATA_TYPE time
+COLUMN_TYPE time /* mariadb-5.3 */
+COLUMN_NAME t1
+DATA_TYPE time
+COLUMN_TYPE time(1) /* mariadb-5.3 */
+COLUMN_NAME t2
+DATA_TYPE time
+COLUMN_TYPE time(2) /* mariadb-5.3 */
+COLUMN_NAME t3
+DATA_TYPE time
+COLUMN_TYPE time(3) /* mariadb-5.3 */
+COLUMN_NAME t4
+DATA_TYPE time
+COLUMN_TYPE time(4) /* mariadb-5.3 */
+COLUMN_NAME t5
+DATA_TYPE time
+COLUMN_TYPE time(5) /* mariadb-5.3 */
+COLUMN_NAME t6
+DATA_TYPE time
+COLUMN_TYPE time(6) /* mariadb-5.3 */
+DESCRIBE mariadb5312_time;
+Field t0
+Type time /* mariadb-5.3 */
+Null YES
+Key
+Default NULL
+Extra
+Field t1
+Type time(1) /* mariadb-5.3 */
+Null YES
+Key
+Default NULL
+Extra
+Field t2
+Type time(2) /* mariadb-5.3 */
+Null YES
+Key
+Default NULL
+Extra
+Field t3
+Type time(3) /* mariadb-5.3 */
+Null YES
+Key
+Default NULL
+Extra
+Field t4
+Type time(4) /* mariadb-5.3 */
+Null YES
+Key
+Default NULL
+Extra
+Field t5
+Type time(5) /* mariadb-5.3 */
+Null YES
+Key
+Default NULL
+Extra
+Field t6
+Type time(6) /* mariadb-5.3 */
+Null YES
+Key
+Default NULL
+Extra
+DROP TABLE mariadb5312_time;
diff --git a/mysql-test/main/type_temporal_mariadb53.test b/mysql-test/main/type_temporal_mariadb53.test
new file mode 100644
index 00000000000..452c0be578d
--- /dev/null
+++ b/mysql-test/main/type_temporal_mariadb53.test
@@ -0,0 +1,32 @@
+--let $MYSQLD_DATADIR= `select @@datadir`
+
+--echo #
+--echo # MDEV-19906 Port show_old_temporals from MySQL 5.6
+--echo #
+
+--copy_file $MYSQL_TEST_DIR/std_data/mariadb53_temporal/mariadb5312_datetime.frm $MYSQLD_DATADIR/test/mariadb5312_datetime.frm
+TRUNCATE TABLE mariadb5312_datetime;
+SHOW CREATE TABLE mariadb5312_datetime;
+--vertical_results
+SELECT COLUMN_NAME, DATA_TYPE, COLUMN_TYPE FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='mariadb5312_datetime';
+DESCRIBE mariadb5312_datetime;
+--horizontal_results
+DROP TABLE mariadb5312_datetime;
+
+--copy_file $MYSQL_TEST_DIR/std_data/mariadb53_temporal/mariadb5312_timestamp.frm $MYSQLD_DATADIR/test/mariadb5312_timestamp.frm
+TRUNCATE TABLE mariadb5312_timestamp;
+SHOW CREATE TABLE mariadb5312_timestamp;
+--vertical_results
+SELECT COLUMN_NAME, DATA_TYPE, COLUMN_TYPE FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='mariadb5312_timestamp';
+DESCRIBE mariadb5312_timestamp;
+--horizontal_results
+DROP TABLE mariadb5312_timestamp;
+
+--copy_file $MYSQL_TEST_DIR/std_data/mariadb53_temporal/mariadb5312_time.frm $MYSQLD_DATADIR/test/mariadb5312_time.frm
+TRUNCATE TABLE mariadb5312_time;
+SHOW CREATE TABLE mariadb5312_time;
+--vertical_results
+SELECT COLUMN_NAME, DATA_TYPE, COLUMN_TYPE FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='mariadb5312_time';
+DESCRIBE mariadb5312_time;
+--horizontal_results
+DROP TABLE mariadb5312_time;
diff --git a/mysql-test/main/type_temporal_mysql56_debug.result b/mysql-test/main/type_temporal_mysql56_debug.result
index a6a6c071ea3..a93ec82fa4d 100644
--- a/mysql-test/main/type_temporal_mysql56_debug.result
+++ b/mysql-test/main/type_temporal_mysql56_debug.result
@@ -61,44 +61,44 @@ CALL mdev16542;
# Original table
Table Create Table
t1 CREATE TABLE `t1` (
- `a0` time /* mysql-5.6 */ DEFAULT NULL,
- `a1` time(1) /* mysql-5.6 */ DEFAULT NULL,
- `a2` time(2) /* mysql-5.6 */ DEFAULT NULL,
- `a3` time(3) /* mysql-5.6 */ DEFAULT NULL,
- `a4` time(4) /* mysql-5.6 */ DEFAULT NULL,
- `a5` time(5) /* mysql-5.6 */ DEFAULT NULL,
- `a6` time(6) /* mysql-5.6 */ DEFAULT NULL
+ `a0` time /* mysql-5.6 */ DEFAULT NULL,
+ `a1` time(1) /* mysql-5.6 */ DEFAULT NULL,
+ `a2` time(2) /* mysql-5.6 */ DEFAULT NULL,
+ `a3` time(3) /* mysql-5.6 */ DEFAULT NULL,
+ `a4` time(4) /* mysql-5.6 */ DEFAULT NULL,
+ `a5` time(5) /* mysql-5.6 */ DEFAULT NULL,
+ `a6` time(6) /* mysql-5.6 */ DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
# CREATE..SELECT and SHOW
Table Create Table
t2 CREATE TABLE `t2` (
- `a0` time /* mysql-5.6 */ DEFAULT NULL,
- `a1` time(1) /* mysql-5.6 */ DEFAULT NULL,
- `a2` time(2) /* mysql-5.6 */ DEFAULT NULL,
- `a3` time(3) /* mysql-5.6 */ DEFAULT NULL,
- `a4` time(4) /* mysql-5.6 */ DEFAULT NULL,
- `a5` time(5) /* mysql-5.6 */ DEFAULT NULL,
- `a6` time(6) /* mysql-5.6 */ DEFAULT NULL,
- `COALESCE(a0)` time /* mysql-5.6 */ DEFAULT NULL,
- `COALESCE(a1)` time(1) /* mysql-5.6 */ DEFAULT NULL,
- `COALESCE(a2)` time(2) /* mysql-5.6 */ DEFAULT NULL,
- `COALESCE(a3)` time(3) /* mysql-5.6 */ DEFAULT NULL,
- `COALESCE(a4)` time(4) /* mysql-5.6 */ DEFAULT NULL,
- `COALESCE(a5)` time(5) /* mysql-5.6 */ DEFAULT NULL,
- `COALESCE(a6)` time(6) /* mysql-5.6 */ DEFAULT NULL
+ `a0` time /* mysql-5.6 */ DEFAULT NULL,
+ `a1` time(1) /* mysql-5.6 */ DEFAULT NULL,
+ `a2` time(2) /* mysql-5.6 */ DEFAULT NULL,
+ `a3` time(3) /* mysql-5.6 */ DEFAULT NULL,
+ `a4` time(4) /* mysql-5.6 */ DEFAULT NULL,
+ `a5` time(5) /* mysql-5.6 */ DEFAULT NULL,
+ `a6` time(6) /* mysql-5.6 */ DEFAULT NULL,
+ `COALESCE(a0)` time /* mysql-5.6 */ DEFAULT NULL,
+ `COALESCE(a1)` time(1) /* mysql-5.6 */ DEFAULT NULL,
+ `COALESCE(a2)` time(2) /* mysql-5.6 */ DEFAULT NULL,
+ `COALESCE(a3)` time(3) /* mysql-5.6 */ DEFAULT NULL,
+ `COALESCE(a4)` time(4) /* mysql-5.6 */ DEFAULT NULL,
+ `COALESCE(a5)` time(5) /* mysql-5.6 */ DEFAULT NULL,
+ `COALESCE(a6)` time(6) /* mysql-5.6 */ DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
# ALTER..FORCE and SHOW
Table Create Table
t1 CREATE TABLE `t1` (
- `a0` time /* mysql-5.6 */ DEFAULT NULL,
- `a1` time(1) /* mysql-5.6 */ DEFAULT NULL,
- `a2` time(2) /* mysql-5.6 */ DEFAULT NULL,
- `a3` time(3) /* mysql-5.6 */ DEFAULT NULL,
- `a4` time(4) /* mysql-5.6 */ DEFAULT NULL,
- `a5` time(5) /* mysql-5.6 */ DEFAULT NULL,
- `a6` time(6) /* mysql-5.6 */ DEFAULT NULL
+ `a0` time /* mysql-5.6 */ DEFAULT NULL,
+ `a1` time(1) /* mysql-5.6 */ DEFAULT NULL,
+ `a2` time(2) /* mysql-5.6 */ DEFAULT NULL,
+ `a3` time(3) /* mysql-5.6 */ DEFAULT NULL,
+ `a4` time(4) /* mysql-5.6 */ DEFAULT NULL,
+ `a5` time(5) /* mysql-5.6 */ DEFAULT NULL,
+ `a6` time(6) /* mysql-5.6 */ DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
# Setting @@global.mysql56_temporal_format=false
@@ -106,32 +106,32 @@ t1 CREATE TABLE `t1` (
# CREATE..SELECT and SHOW
Table Create Table
t2 CREATE TABLE `t2` (
- `a0` time /* mariadb-5.3 */ DEFAULT NULL,
- `a1` time(1) /* mariadb-5.3 */ DEFAULT NULL,
- `a2` time(2) /* mariadb-5.3 */ DEFAULT NULL,
- `a3` time(3) /* mariadb-5.3 */ DEFAULT NULL,
- `a4` time(4) /* mariadb-5.3 */ DEFAULT NULL,
- `a5` time(5) /* mariadb-5.3 */ DEFAULT NULL,
- `a6` time(6) /* mariadb-5.3 */ DEFAULT NULL,
- `COALESCE(a0)` time /* mariadb-5.3 */ DEFAULT NULL,
- `COALESCE(a1)` time(1) /* mariadb-5.3 */ DEFAULT NULL,
- `COALESCE(a2)` time(2) /* mariadb-5.3 */ DEFAULT NULL,
- `COALESCE(a3)` time(3) /* mariadb-5.3 */ DEFAULT NULL,
- `COALESCE(a4)` time(4) /* mariadb-5.3 */ DEFAULT NULL,
- `COALESCE(a5)` time(5) /* mariadb-5.3 */ DEFAULT NULL,
- `COALESCE(a6)` time(6) /* mariadb-5.3 */ DEFAULT NULL
+ `a0` time /* mariadb-5.3 */ DEFAULT NULL,
+ `a1` time(1) /* mariadb-5.3 */ DEFAULT NULL,
+ `a2` time(2) /* mariadb-5.3 */ DEFAULT NULL,
+ `a3` time(3) /* mariadb-5.3 */ DEFAULT NULL,
+ `a4` time(4) /* mariadb-5.3 */ DEFAULT NULL,
+ `a5` time(5) /* mariadb-5.3 */ DEFAULT NULL,
+ `a6` time(6) /* mariadb-5.3 */ DEFAULT NULL,
+ `COALESCE(a0)` time /* mariadb-5.3 */ DEFAULT NULL,
+ `COALESCE(a1)` time(1) /* mariadb-5.3 */ DEFAULT NULL,
+ `COALESCE(a2)` time(2) /* mariadb-5.3 */ DEFAULT NULL,
+ `COALESCE(a3)` time(3) /* mariadb-5.3 */ DEFAULT NULL,
+ `COALESCE(a4)` time(4) /* mariadb-5.3 */ DEFAULT NULL,
+ `COALESCE(a5)` time(5) /* mariadb-5.3 */ DEFAULT NULL,
+ `COALESCE(a6)` time(6) /* mariadb-5.3 */ DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
# ALTER..FORCE and SHOW
Table Create Table
t1 CREATE TABLE `t1` (
- `a0` time /* mariadb-5.3 */ DEFAULT NULL,
- `a1` time(1) /* mariadb-5.3 */ DEFAULT NULL,
- `a2` time(2) /* mariadb-5.3 */ DEFAULT NULL,
- `a3` time(3) /* mariadb-5.3 */ DEFAULT NULL,
- `a4` time(4) /* mariadb-5.3 */ DEFAULT NULL,
- `a5` time(5) /* mariadb-5.3 */ DEFAULT NULL,
- `a6` time(6) /* mariadb-5.3 */ DEFAULT NULL
+ `a0` time /* mariadb-5.3 */ DEFAULT NULL,
+ `a1` time(1) /* mariadb-5.3 */ DEFAULT NULL,
+ `a2` time(2) /* mariadb-5.3 */ DEFAULT NULL,
+ `a3` time(3) /* mariadb-5.3 */ DEFAULT NULL,
+ `a4` time(4) /* mariadb-5.3 */ DEFAULT NULL,
+ `a5` time(5) /* mariadb-5.3 */ DEFAULT NULL,
+ `a6` time(6) /* mariadb-5.3 */ DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
# Setting @@global.mysql56_temporal_format=true
@@ -139,32 +139,32 @@ t1 CREATE TABLE `t1` (
# CREATE..SELECT and SHOW
Table Create Table
t2 CREATE TABLE `t2` (
- `a0` time /* mysql-5.6 */ DEFAULT NULL,
- `a1` time(1) /* mysql-5.6 */ DEFAULT NULL,
- `a2` time(2) /* mysql-5.6 */ DEFAULT NULL,
- `a3` time(3) /* mysql-5.6 */ DEFAULT NULL,
- `a4` time(4) /* mysql-5.6 */ DEFAULT NULL,
- `a5` time(5) /* mysql-5.6 */ DEFAULT NULL,
- `a6` time(6) /* mysql-5.6 */ DEFAULT NULL,
- `COALESCE(a0)` time /* mysql-5.6 */ DEFAULT NULL,
- `COALESCE(a1)` time(1) /* mysql-5.6 */ DEFAULT NULL,
- `COALESCE(a2)` time(2) /* mysql-5.6 */ DEFAULT NULL,
- `COALESCE(a3)` time(3) /* mysql-5.6 */ DEFAULT NULL,
- `COALESCE(a4)` time(4) /* mysql-5.6 */ DEFAULT NULL,
- `COALESCE(a5)` time(5) /* mysql-5.6 */ DEFAULT NULL,
- `COALESCE(a6)` time(6) /* mysql-5.6 */ DEFAULT NULL
+ `a0` time /* mysql-5.6 */ DEFAULT NULL,
+ `a1` time(1) /* mysql-5.6 */ DEFAULT NULL,
+ `a2` time(2) /* mysql-5.6 */ DEFAULT NULL,
+ `a3` time(3) /* mysql-5.6 */ DEFAULT NULL,
+ `a4` time(4) /* mysql-5.6 */ DEFAULT NULL,
+ `a5` time(5) /* mysql-5.6 */ DEFAULT NULL,
+ `a6` time(6) /* mysql-5.6 */ DEFAULT NULL,
+ `COALESCE(a0)` time /* mysql-5.6 */ DEFAULT NULL,
+ `COALESCE(a1)` time(1) /* mysql-5.6 */ DEFAULT NULL,
+ `COALESCE(a2)` time(2) /* mysql-5.6 */ DEFAULT NULL,
+ `COALESCE(a3)` time(3) /* mysql-5.6 */ DEFAULT NULL,
+ `COALESCE(a4)` time(4) /* mysql-5.6 */ DEFAULT NULL,
+ `COALESCE(a5)` time(5) /* mysql-5.6 */ DEFAULT NULL,
+ `COALESCE(a6)` time(6) /* mysql-5.6 */ DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
# ALTER..FORCE and SHOW
Table Create Table
t1 CREATE TABLE `t1` (
- `a0` time /* mysql-5.6 */ DEFAULT NULL,
- `a1` time(1) /* mysql-5.6 */ DEFAULT NULL,
- `a2` time(2) /* mysql-5.6 */ DEFAULT NULL,
- `a3` time(3) /* mysql-5.6 */ DEFAULT NULL,
- `a4` time(4) /* mysql-5.6 */ DEFAULT NULL,
- `a5` time(5) /* mysql-5.6 */ DEFAULT NULL,
- `a6` time(6) /* mysql-5.6 */ DEFAULT NULL
+ `a0` time /* mysql-5.6 */ DEFAULT NULL,
+ `a1` time(1) /* mysql-5.6 */ DEFAULT NULL,
+ `a2` time(2) /* mysql-5.6 */ DEFAULT NULL,
+ `a3` time(3) /* mysql-5.6 */ DEFAULT NULL,
+ `a4` time(4) /* mysql-5.6 */ DEFAULT NULL,
+ `a5` time(5) /* mysql-5.6 */ DEFAULT NULL,
+ `a6` time(6) /* mysql-5.6 */ DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
CREATE TABLE t1 (
@@ -181,44 +181,44 @@ CALL mdev16542;
# Original table
Table Create Table
t1 CREATE TABLE `t1` (
- `a0` datetime /* mysql-5.6 */ DEFAULT NULL,
- `a1` datetime(1) /* mysql-5.6 */ DEFAULT NULL,
- `a2` datetime(2) /* mysql-5.6 */ DEFAULT NULL,
- `a3` datetime(3) /* mysql-5.6 */ DEFAULT NULL,
- `a4` datetime(4) /* mysql-5.6 */ DEFAULT NULL,
- `a5` datetime(5) /* mysql-5.6 */ DEFAULT NULL,
- `a6` datetime(6) /* mysql-5.6 */ DEFAULT NULL
+ `a0` datetime /* mysql-5.6 */ DEFAULT NULL,
+ `a1` datetime(1) /* mysql-5.6 */ DEFAULT NULL,
+ `a2` datetime(2) /* mysql-5.6 */ DEFAULT NULL,
+ `a3` datetime(3) /* mysql-5.6 */ DEFAULT NULL,
+ `a4` datetime(4) /* mysql-5.6 */ DEFAULT NULL,
+ `a5` datetime(5) /* mysql-5.6 */ DEFAULT NULL,
+ `a6` datetime(6) /* mysql-5.6 */ DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
# CREATE..SELECT and SHOW
Table Create Table
t2 CREATE TABLE `t2` (
- `a0` datetime /* mysql-5.6 */ DEFAULT NULL,
- `a1` datetime(1) /* mysql-5.6 */ DEFAULT NULL,
- `a2` datetime(2) /* mysql-5.6 */ DEFAULT NULL,
- `a3` datetime(3) /* mysql-5.6 */ DEFAULT NULL,
- `a4` datetime(4) /* mysql-5.6 */ DEFAULT NULL,
- `a5` datetime(5) /* mysql-5.6 */ DEFAULT NULL,
- `a6` datetime(6) /* mysql-5.6 */ DEFAULT NULL,
- `COALESCE(a0)` datetime /* mysql-5.6 */ DEFAULT NULL,
- `COALESCE(a1)` datetime(1) /* mysql-5.6 */ DEFAULT NULL,
- `COALESCE(a2)` datetime(2) /* mysql-5.6 */ DEFAULT NULL,
- `COALESCE(a3)` datetime(3) /* mysql-5.6 */ DEFAULT NULL,
- `COALESCE(a4)` datetime(4) /* mysql-5.6 */ DEFAULT NULL,
- `COALESCE(a5)` datetime(5) /* mysql-5.6 */ DEFAULT NULL,
- `COALESCE(a6)` datetime(6) /* mysql-5.6 */ DEFAULT NULL
+ `a0` datetime /* mysql-5.6 */ DEFAULT NULL,
+ `a1` datetime(1) /* mysql-5.6 */ DEFAULT NULL,
+ `a2` datetime(2) /* mysql-5.6 */ DEFAULT NULL,
+ `a3` datetime(3) /* mysql-5.6 */ DEFAULT NULL,
+ `a4` datetime(4) /* mysql-5.6 */ DEFAULT NULL,
+ `a5` datetime(5) /* mysql-5.6 */ DEFAULT NULL,
+ `a6` datetime(6) /* mysql-5.6 */ DEFAULT NULL,
+ `COALESCE(a0)` datetime /* mysql-5.6 */ DEFAULT NULL,
+ `COALESCE(a1)` datetime(1) /* mysql-5.6 */ DEFAULT NULL,
+ `COALESCE(a2)` datetime(2) /* mysql-5.6 */ DEFAULT NULL,
+ `COALESCE(a3)` datetime(3) /* mysql-5.6 */ DEFAULT NULL,
+ `COALESCE(a4)` datetime(4) /* mysql-5.6 */ DEFAULT NULL,
+ `COALESCE(a5)` datetime(5) /* mysql-5.6 */ DEFAULT NULL,
+ `COALESCE(a6)` datetime(6) /* mysql-5.6 */ DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
# ALTER..FORCE and SHOW
Table Create Table
t1 CREATE TABLE `t1` (
- `a0` datetime /* mysql-5.6 */ DEFAULT NULL,
- `a1` datetime(1) /* mysql-5.6 */ DEFAULT NULL,
- `a2` datetime(2) /* mysql-5.6 */ DEFAULT NULL,
- `a3` datetime(3) /* mysql-5.6 */ DEFAULT NULL,
- `a4` datetime(4) /* mysql-5.6 */ DEFAULT NULL,
- `a5` datetime(5) /* mysql-5.6 */ DEFAULT NULL,
- `a6` datetime(6) /* mysql-5.6 */ DEFAULT NULL
+ `a0` datetime /* mysql-5.6 */ DEFAULT NULL,
+ `a1` datetime(1) /* mysql-5.6 */ DEFAULT NULL,
+ `a2` datetime(2) /* mysql-5.6 */ DEFAULT NULL,
+ `a3` datetime(3) /* mysql-5.6 */ DEFAULT NULL,
+ `a4` datetime(4) /* mysql-5.6 */ DEFAULT NULL,
+ `a5` datetime(5) /* mysql-5.6 */ DEFAULT NULL,
+ `a6` datetime(6) /* mysql-5.6 */ DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
# Setting @@global.mysql56_temporal_format=false
@@ -226,32 +226,32 @@ t1 CREATE TABLE `t1` (
# CREATE..SELECT and SHOW
Table Create Table
t2 CREATE TABLE `t2` (
- `a0` datetime /* mariadb-5.3 */ DEFAULT NULL,
- `a1` datetime(1) /* mariadb-5.3 */ DEFAULT NULL,
- `a2` datetime(2) /* mariadb-5.3 */ DEFAULT NULL,
- `a3` datetime(3) /* mariadb-5.3 */ DEFAULT NULL,
- `a4` datetime(4) /* mariadb-5.3 */ DEFAULT NULL,
- `a5` datetime(5) /* mariadb-5.3 */ DEFAULT NULL,
- `a6` datetime(6) /* mariadb-5.3 */ DEFAULT NULL,
- `COALESCE(a0)` datetime /* mariadb-5.3 */ DEFAULT NULL,
- `COALESCE(a1)` datetime(1) /* mariadb-5.3 */ DEFAULT NULL,
- `COALESCE(a2)` datetime(2) /* mariadb-5.3 */ DEFAULT NULL,
- `COALESCE(a3)` datetime(3) /* mariadb-5.3 */ DEFAULT NULL,
- `COALESCE(a4)` datetime(4) /* mariadb-5.3 */ DEFAULT NULL,
- `COALESCE(a5)` datetime(5) /* mariadb-5.3 */ DEFAULT NULL,
- `COALESCE(a6)` datetime(6) /* mariadb-5.3 */ DEFAULT NULL
+ `a0` datetime /* mariadb-5.3 */ DEFAULT NULL,
+ `a1` datetime(1) /* mariadb-5.3 */ DEFAULT NULL,
+ `a2` datetime(2) /* mariadb-5.3 */ DEFAULT NULL,
+ `a3` datetime(3) /* mariadb-5.3 */ DEFAULT NULL,
+ `a4` datetime(4) /* mariadb-5.3 */ DEFAULT NULL,
+ `a5` datetime(5) /* mariadb-5.3 */ DEFAULT NULL,
+ `a6` datetime(6) /* mariadb-5.3 */ DEFAULT NULL,
+ `COALESCE(a0)` datetime /* mariadb-5.3 */ DEFAULT NULL,
+ `COALESCE(a1)` datetime(1) /* mariadb-5.3 */ DEFAULT NULL,
+ `COALESCE(a2)` datetime(2) /* mariadb-5.3 */ DEFAULT NULL,
+ `COALESCE(a3)` datetime(3) /* mariadb-5.3 */ DEFAULT NULL,
+ `COALESCE(a4)` datetime(4) /* mariadb-5.3 */ DEFAULT NULL,
+ `COALESCE(a5)` datetime(5) /* mariadb-5.3 */ DEFAULT NULL,
+ `COALESCE(a6)` datetime(6) /* mariadb-5.3 */ DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
# ALTER..FORCE and SHOW
Table Create Table
t1 CREATE TABLE `t1` (
- `a0` datetime /* mariadb-5.3 */ DEFAULT NULL,
- `a1` datetime(1) /* mariadb-5.3 */ DEFAULT NULL,
- `a2` datetime(2) /* mariadb-5.3 */ DEFAULT NULL,
- `a3` datetime(3) /* mariadb-5.3 */ DEFAULT NULL,
- `a4` datetime(4) /* mariadb-5.3 */ DEFAULT NULL,
- `a5` datetime(5) /* mariadb-5.3 */ DEFAULT NULL,
- `a6` datetime(6) /* mariadb-5.3 */ DEFAULT NULL
+ `a0` datetime /* mariadb-5.3 */ DEFAULT NULL,
+ `a1` datetime(1) /* mariadb-5.3 */ DEFAULT NULL,
+ `a2` datetime(2) /* mariadb-5.3 */ DEFAULT NULL,
+ `a3` datetime(3) /* mariadb-5.3 */ DEFAULT NULL,
+ `a4` datetime(4) /* mariadb-5.3 */ DEFAULT NULL,
+ `a5` datetime(5) /* mariadb-5.3 */ DEFAULT NULL,
+ `a6` datetime(6) /* mariadb-5.3 */ DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
# Setting @@global.mysql56_temporal_format=true
@@ -259,32 +259,32 @@ t1 CREATE TABLE `t1` (
# CREATE..SELECT and SHOW
Table Create Table
t2 CREATE TABLE `t2` (
- `a0` datetime /* mysql-5.6 */ DEFAULT NULL,
- `a1` datetime(1) /* mysql-5.6 */ DEFAULT NULL,
- `a2` datetime(2) /* mysql-5.6 */ DEFAULT NULL,
- `a3` datetime(3) /* mysql-5.6 */ DEFAULT NULL,
- `a4` datetime(4) /* mysql-5.6 */ DEFAULT NULL,
- `a5` datetime(5) /* mysql-5.6 */ DEFAULT NULL,
- `a6` datetime(6) /* mysql-5.6 */ DEFAULT NULL,
- `COALESCE(a0)` datetime /* mysql-5.6 */ DEFAULT NULL,
- `COALESCE(a1)` datetime(1) /* mysql-5.6 */ DEFAULT NULL,
- `COALESCE(a2)` datetime(2) /* mysql-5.6 */ DEFAULT NULL,
- `COALESCE(a3)` datetime(3) /* mysql-5.6 */ DEFAULT NULL,
- `COALESCE(a4)` datetime(4) /* mysql-5.6 */ DEFAULT NULL,
- `COALESCE(a5)` datetime(5) /* mysql-5.6 */ DEFAULT NULL,
- `COALESCE(a6)` datetime(6) /* mysql-5.6 */ DEFAULT NULL
+ `a0` datetime /* mysql-5.6 */ DEFAULT NULL,
+ `a1` datetime(1) /* mysql-5.6 */ DEFAULT NULL,
+ `a2` datetime(2) /* mysql-5.6 */ DEFAULT NULL,
+ `a3` datetime(3) /* mysql-5.6 */ DEFAULT NULL,
+ `a4` datetime(4) /* mysql-5.6 */ DEFAULT NULL,
+ `a5` datetime(5) /* mysql-5.6 */ DEFAULT NULL,
+ `a6` datetime(6) /* mysql-5.6 */ DEFAULT NULL,
+ `COALESCE(a0)` datetime /* mysql-5.6 */ DEFAULT NULL,
+ `COALESCE(a1)` datetime(1) /* mysql-5.6 */ DEFAULT NULL,
+ `COALESCE(a2)` datetime(2) /* mysql-5.6 */ DEFAULT NULL,
+ `COALESCE(a3)` datetime(3) /* mysql-5.6 */ DEFAULT NULL,
+ `COALESCE(a4)` datetime(4) /* mysql-5.6 */ DEFAULT NULL,
+ `COALESCE(a5)` datetime(5) /* mysql-5.6 */ DEFAULT NULL,
+ `COALESCE(a6)` datetime(6) /* mysql-5.6 */ DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
# ALTER..FORCE and SHOW
Table Create Table
t1 CREATE TABLE `t1` (
- `a0` datetime /* mysql-5.6 */ DEFAULT NULL,
- `a1` datetime(1) /* mysql-5.6 */ DEFAULT NULL,
- `a2` datetime(2) /* mysql-5.6 */ DEFAULT NULL,
- `a3` datetime(3) /* mysql-5.6 */ DEFAULT NULL,
- `a4` datetime(4) /* mysql-5.6 */ DEFAULT NULL,
- `a5` datetime(5) /* mysql-5.6 */ DEFAULT NULL,
- `a6` datetime(6) /* mysql-5.6 */ DEFAULT NULL
+ `a0` datetime /* mysql-5.6 */ DEFAULT NULL,
+ `a1` datetime(1) /* mysql-5.6 */ DEFAULT NULL,
+ `a2` datetime(2) /* mysql-5.6 */ DEFAULT NULL,
+ `a3` datetime(3) /* mysql-5.6 */ DEFAULT NULL,
+ `a4` datetime(4) /* mysql-5.6 */ DEFAULT NULL,
+ `a5` datetime(5) /* mysql-5.6 */ DEFAULT NULL,
+ `a6` datetime(6) /* mysql-5.6 */ DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
CREATE TABLE t1 (
@@ -301,44 +301,44 @@ CALL mdev16542;
# Original table
Table Create Table
t1 CREATE TABLE `t1` (
- `a0` timestamp /* mysql-5.6 */ NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
- `a1` timestamp(1) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.0',
- `a2` timestamp(2) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.00',
- `a3` timestamp(3) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.000',
- `a4` timestamp(4) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.0000',
- `a5` timestamp(5) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.00000',
- `a6` timestamp(6) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.000000'
+ `a0` timestamp /* mysql-5.6 */ NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
+ `a1` timestamp(1) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.0',
+ `a2` timestamp(2) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.00',
+ `a3` timestamp(3) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.000',
+ `a4` timestamp(4) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.0000',
+ `a5` timestamp(5) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.00000',
+ `a6` timestamp(6) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.000000'
) ENGINE=MyISAM DEFAULT CHARSET=latin1
# CREATE..SELECT and SHOW
Table Create Table
t2 CREATE TABLE `t2` (
- `a0` timestamp /* mysql-5.6 */ NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
- `a1` timestamp(1) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.0',
- `a2` timestamp(2) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.00',
- `a3` timestamp(3) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.000',
- `a4` timestamp(4) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.0000',
- `a5` timestamp(5) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.00000',
- `a6` timestamp(6) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.000000',
- `COALESCE(a0)` timestamp /* mysql-5.6 */ NULL DEFAULT NULL,
- `COALESCE(a1)` timestamp(1) /* mysql-5.6 */ NULL DEFAULT NULL,
- `COALESCE(a2)` timestamp(2) /* mysql-5.6 */ NULL DEFAULT NULL,
- `COALESCE(a3)` timestamp(3) /* mysql-5.6 */ NULL DEFAULT NULL,
- `COALESCE(a4)` timestamp(4) /* mysql-5.6 */ NULL DEFAULT NULL,
- `COALESCE(a5)` timestamp(5) /* mysql-5.6 */ NULL DEFAULT NULL,
- `COALESCE(a6)` timestamp(6) /* mysql-5.6 */ NULL DEFAULT NULL
+ `a0` timestamp /* mysql-5.6 */ NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
+ `a1` timestamp(1) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.0',
+ `a2` timestamp(2) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.00',
+ `a3` timestamp(3) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.000',
+ `a4` timestamp(4) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.0000',
+ `a5` timestamp(5) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.00000',
+ `a6` timestamp(6) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.000000',
+ `COALESCE(a0)` timestamp /* mysql-5.6 */ NULL DEFAULT NULL,
+ `COALESCE(a1)` timestamp(1) /* mysql-5.6 */ NULL DEFAULT NULL,
+ `COALESCE(a2)` timestamp(2) /* mysql-5.6 */ NULL DEFAULT NULL,
+ `COALESCE(a3)` timestamp(3) /* mysql-5.6 */ NULL DEFAULT NULL,
+ `COALESCE(a4)` timestamp(4) /* mysql-5.6 */ NULL DEFAULT NULL,
+ `COALESCE(a5)` timestamp(5) /* mysql-5.6 */ NULL DEFAULT NULL,
+ `COALESCE(a6)` timestamp(6) /* mysql-5.6 */ NULL DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
# ALTER..FORCE and SHOW
Table Create Table
t1 CREATE TABLE `t1` (
- `a0` timestamp /* mysql-5.6 */ NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
- `a1` timestamp(1) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.0',
- `a2` timestamp(2) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.00',
- `a3` timestamp(3) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.000',
- `a4` timestamp(4) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.0000',
- `a5` timestamp(5) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.00000',
- `a6` timestamp(6) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.000000'
+ `a0` timestamp /* mysql-5.6 */ NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
+ `a1` timestamp(1) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.0',
+ `a2` timestamp(2) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.00',
+ `a3` timestamp(3) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.000',
+ `a4` timestamp(4) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.0000',
+ `a5` timestamp(5) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.00000',
+ `a6` timestamp(6) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.000000'
) ENGINE=MyISAM DEFAULT CHARSET=latin1
# Setting @@global.mysql56_temporal_format=false
@@ -346,32 +346,32 @@ t1 CREATE TABLE `t1` (
# CREATE..SELECT and SHOW
Table Create Table
t2 CREATE TABLE `t2` (
- `a0` timestamp /* mariadb-5.3 */ NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
- `a1` timestamp(1) /* mariadb-5.3 */ NOT NULL DEFAULT '0000-00-00 00:00:00.0',
- `a2` timestamp(2) /* mariadb-5.3 */ NOT NULL DEFAULT '0000-00-00 00:00:00.00',
- `a3` timestamp(3) /* mariadb-5.3 */ NOT NULL DEFAULT '0000-00-00 00:00:00.000',
- `a4` timestamp(4) /* mariadb-5.3 */ NOT NULL DEFAULT '0000-00-00 00:00:00.0000',
- `a5` timestamp(5) /* mariadb-5.3 */ NOT NULL DEFAULT '0000-00-00 00:00:00.00000',
- `a6` timestamp(6) /* mariadb-5.3 */ NOT NULL DEFAULT '0000-00-00 00:00:00.000000',
- `COALESCE(a0)` timestamp /* mariadb-5.3 */ NULL DEFAULT NULL,
- `COALESCE(a1)` timestamp(1) /* mariadb-5.3 */ NULL DEFAULT NULL,
- `COALESCE(a2)` timestamp(2) /* mariadb-5.3 */ NULL DEFAULT NULL,
- `COALESCE(a3)` timestamp(3) /* mariadb-5.3 */ NULL DEFAULT NULL,
- `COALESCE(a4)` timestamp(4) /* mariadb-5.3 */ NULL DEFAULT NULL,
- `COALESCE(a5)` timestamp(5) /* mariadb-5.3 */ NULL DEFAULT NULL,
- `COALESCE(a6)` timestamp(6) /* mariadb-5.3 */ NULL DEFAULT NULL
+ `a0` timestamp /* mariadb-5.3 */ NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
+ `a1` timestamp(1) /* mariadb-5.3 */ NOT NULL DEFAULT '0000-00-00 00:00:00.0',
+ `a2` timestamp(2) /* mariadb-5.3 */ NOT NULL DEFAULT '0000-00-00 00:00:00.00',
+ `a3` timestamp(3) /* mariadb-5.3 */ NOT NULL DEFAULT '0000-00-00 00:00:00.000',
+ `a4` timestamp(4) /* mariadb-5.3 */ NOT NULL DEFAULT '0000-00-00 00:00:00.0000',
+ `a5` timestamp(5) /* mariadb-5.3 */ NOT NULL DEFAULT '0000-00-00 00:00:00.00000',
+ `a6` timestamp(6) /* mariadb-5.3 */ NOT NULL DEFAULT '0000-00-00 00:00:00.000000',
+ `COALESCE(a0)` timestamp /* mariadb-5.3 */ NULL DEFAULT NULL,
+ `COALESCE(a1)` timestamp(1) /* mariadb-5.3 */ NULL DEFAULT NULL,
+ `COALESCE(a2)` timestamp(2) /* mariadb-5.3 */ NULL DEFAULT NULL,
+ `COALESCE(a3)` timestamp(3) /* mariadb-5.3 */ NULL DEFAULT NULL,
+ `COALESCE(a4)` timestamp(4) /* mariadb-5.3 */ NULL DEFAULT NULL,
+ `COALESCE(a5)` timestamp(5) /* mariadb-5.3 */ NULL DEFAULT NULL,
+ `COALESCE(a6)` timestamp(6) /* mariadb-5.3 */ NULL DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
# ALTER..FORCE and SHOW
Table Create Table
t1 CREATE TABLE `t1` (
- `a0` timestamp /* mariadb-5.3 */ NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
- `a1` timestamp(1) /* mariadb-5.3 */ NOT NULL DEFAULT '0000-00-00 00:00:00.0',
- `a2` timestamp(2) /* mariadb-5.3 */ NOT NULL DEFAULT '0000-00-00 00:00:00.00',
- `a3` timestamp(3) /* mariadb-5.3 */ NOT NULL DEFAULT '0000-00-00 00:00:00.000',
- `a4` timestamp(4) /* mariadb-5.3 */ NOT NULL DEFAULT '0000-00-00 00:00:00.0000',
- `a5` timestamp(5) /* mariadb-5.3 */ NOT NULL DEFAULT '0000-00-00 00:00:00.00000',
- `a6` timestamp(6) /* mariadb-5.3 */ NOT NULL DEFAULT '0000-00-00 00:00:00.000000'
+ `a0` timestamp /* mariadb-5.3 */ NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
+ `a1` timestamp(1) /* mariadb-5.3 */ NOT NULL DEFAULT '0000-00-00 00:00:00.0',
+ `a2` timestamp(2) /* mariadb-5.3 */ NOT NULL DEFAULT '0000-00-00 00:00:00.00',
+ `a3` timestamp(3) /* mariadb-5.3 */ NOT NULL DEFAULT '0000-00-00 00:00:00.000',
+ `a4` timestamp(4) /* mariadb-5.3 */ NOT NULL DEFAULT '0000-00-00 00:00:00.0000',
+ `a5` timestamp(5) /* mariadb-5.3 */ NOT NULL DEFAULT '0000-00-00 00:00:00.00000',
+ `a6` timestamp(6) /* mariadb-5.3 */ NOT NULL DEFAULT '0000-00-00 00:00:00.000000'
) ENGINE=MyISAM DEFAULT CHARSET=latin1
# Setting @@global.mysql56_temporal_format=true
@@ -379,32 +379,32 @@ t1 CREATE TABLE `t1` (
# CREATE..SELECT and SHOW
Table Create Table
t2 CREATE TABLE `t2` (
- `a0` timestamp /* mysql-5.6 */ NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
- `a1` timestamp(1) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.0',
- `a2` timestamp(2) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.00',
- `a3` timestamp(3) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.000',
- `a4` timestamp(4) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.0000',
- `a5` timestamp(5) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.00000',
- `a6` timestamp(6) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.000000',
- `COALESCE(a0)` timestamp /* mysql-5.6 */ NULL DEFAULT NULL,
- `COALESCE(a1)` timestamp(1) /* mysql-5.6 */ NULL DEFAULT NULL,
- `COALESCE(a2)` timestamp(2) /* mysql-5.6 */ NULL DEFAULT NULL,
- `COALESCE(a3)` timestamp(3) /* mysql-5.6 */ NULL DEFAULT NULL,
- `COALESCE(a4)` timestamp(4) /* mysql-5.6 */ NULL DEFAULT NULL,
- `COALESCE(a5)` timestamp(5) /* mysql-5.6 */ NULL DEFAULT NULL,
- `COALESCE(a6)` timestamp(6) /* mysql-5.6 */ NULL DEFAULT NULL
+ `a0` timestamp /* mysql-5.6 */ NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
+ `a1` timestamp(1) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.0',
+ `a2` timestamp(2) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.00',
+ `a3` timestamp(3) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.000',
+ `a4` timestamp(4) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.0000',
+ `a5` timestamp(5) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.00000',
+ `a6` timestamp(6) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.000000',
+ `COALESCE(a0)` timestamp /* mysql-5.6 */ NULL DEFAULT NULL,
+ `COALESCE(a1)` timestamp(1) /* mysql-5.6 */ NULL DEFAULT NULL,
+ `COALESCE(a2)` timestamp(2) /* mysql-5.6 */ NULL DEFAULT NULL,
+ `COALESCE(a3)` timestamp(3) /* mysql-5.6 */ NULL DEFAULT NULL,
+ `COALESCE(a4)` timestamp(4) /* mysql-5.6 */ NULL DEFAULT NULL,
+ `COALESCE(a5)` timestamp(5) /* mysql-5.6 */ NULL DEFAULT NULL,
+ `COALESCE(a6)` timestamp(6) /* mysql-5.6 */ NULL DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
# ALTER..FORCE and SHOW
Table Create Table
t1 CREATE TABLE `t1` (
- `a0` timestamp /* mysql-5.6 */ NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
- `a1` timestamp(1) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.0',
- `a2` timestamp(2) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.00',
- `a3` timestamp(3) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.000',
- `a4` timestamp(4) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.0000',
- `a5` timestamp(5) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.00000',
- `a6` timestamp(6) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.000000'
+ `a0` timestamp /* mysql-5.6 */ NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
+ `a1` timestamp(1) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.0',
+ `a2` timestamp(2) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.00',
+ `a3` timestamp(3) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.000',
+ `a4` timestamp(4) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.0000',
+ `a5` timestamp(5) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.00000',
+ `a6` timestamp(6) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.000000'
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
SET @@global.mysql56_temporal_format=DEFAULT;
diff --git a/mysql-test/main/type_time.result b/mysql-test/main/type_time.result
index 69aa9561ebf..ead494e3ace 100644
--- a/mysql-test/main/type_time.result
+++ b/mysql-test/main/type_time.result
@@ -1374,7 +1374,7 @@ CREATE TABLE t1 (f TIME, KEY(f));
INSERT INTO t1 VALUES ('10:10:10'),('20:20:20');
EXPLAIN EXTENDED SELECT * FROM t1 WHERE 1995.0000000 BETWEEN f AND '23:59:59';
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t1 index f f 4 NULL 2 50.00 Using where; Using index
+1 SIMPLE t1 range f f 4 NULL 1 100.00 Using where; Using index
Warnings:
Warning 1292 Truncated incorrect time value: '1995.0000000'
Note 1003 select `test`.`t1`.`f` AS `f` from `test`.`t1` where '00:00:00.000000' between `test`.`t1`.`f` and <cache>('23:59:59')
diff --git a/mysql-test/main/type_varchar.result b/mysql-test/main/type_varchar.result
index cec279913b4..e42a363a2c2 100644
--- a/mysql-test/main/type_varchar.result
+++ b/mysql-test/main/type_varchar.result
@@ -739,3 +739,32 @@ SET sql_mode=DEFAULT;
#
# End of 10.4 tests
#
+#
+# Start of 10.5 tests
+#
+#
+# MDEV-15592 Column COMPRESSED should select a 'high order' datatype
+#
+TRUNCATE TABLE vchar;
+SHOW CREATE TABLE vchar;
+Table Create Table
+vchar CREATE TABLE `vchar` (
+ `v` varchar(30)/*old*/ DEFAULT NULL,
+ `c` char(3) DEFAULT NULL,
+ `e` enum('abc','def','ghi') DEFAULT NULL,
+ `t` text DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ALTER TABLE vchar ADD FULLTEXT INDEX(v);
+SHOW CREATE TABLE vchar;
+Table Create Table
+vchar CREATE TABLE `vchar` (
+ `v` varchar(30) DEFAULT NULL,
+ `c` char(3) DEFAULT NULL,
+ `e` enum('abc','def','ghi') DEFAULT NULL,
+ `t` text DEFAULT NULL,
+ FULLTEXT KEY `v` (`v`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE vchar;
+#
+# End of 10.5 tests
+#
diff --git a/mysql-test/main/type_varchar.test b/mysql-test/main/type_varchar.test
index 9d0ad8a128b..f63523e226b 100644
--- a/mysql-test/main/type_varchar.test
+++ b/mysql-test/main/type_varchar.test
@@ -373,3 +373,26 @@ SET sql_mode=DEFAULT;
--echo #
--echo # End of 10.4 tests
--echo #
+
+--echo #
+--echo # Start of 10.5 tests
+--echo #
+
+--echo #
+--echo # MDEV-15592 Column COMPRESSED should select a 'high order' datatype
+--echo #
+
+#
+# Old VARCHAR is automatically upgraded to new VARCHAR.
+# So we don't have to override Type_handler_var_string::Key_part_spec_init_ft()
+#
+copy_file $MYSQL_TEST_DIR/std_data/vchar.frm $MYSQLD_DATADIR/test/vchar.frm;
+TRUNCATE TABLE vchar;
+SHOW CREATE TABLE vchar;
+ALTER TABLE vchar ADD FULLTEXT INDEX(v);
+SHOW CREATE TABLE vchar;
+DROP TABLE vchar;
+
+--echo #
+--echo # End of 10.5 tests
+--echo #
diff --git a/mysql-test/main/type_year.result b/mysql-test/main/type_year.result
index 26f90757d09..a3918580e1f 100644
--- a/mysql-test/main/type_year.result
+++ b/mysql-test/main/type_year.result
@@ -677,3 +677,29 @@ DROP TABLE t2,t1;
#
# End of 10.4 tests
#
+#
+# Start of 10.5 tests
+#
+#
+# MDEV-20384 Assertion `field.is_sane()' failed in Protocol_text::store_field_metadata
+#
+CREATE TABLE t1 (a YEAR);
+INSERT INTO t1 VALUES (2000),(2001);
+SELECT MAX( NULLIF( a, 1970 ) ) AS f FROM t1;
+f
+2001
+SELECT NULLIF(a, 1970) AS f FROM t1 ORDER BY a;
+Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
+def f 13 4 4 Y 32928 0 63
+f
+2000
+2001
+SELECT MAX(NULLIF(a, 1970)) AS f FROM t1;
+Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
+def f 8 4 4 Y 32928 0 63
+f
+2001
+DROP TABLE t1;
+#
+# End of 10.5 tests
+#
diff --git a/mysql-test/main/type_year.test b/mysql-test/main/type_year.test
index c1231cc3e79..0f1f49be5d0 100644
--- a/mysql-test/main/type_year.test
+++ b/mysql-test/main/type_year.test
@@ -352,3 +352,27 @@ DROP TABLE t2,t1;
--echo #
--echo # End of 10.4 tests
--echo #
+
+--echo #
+--echo # Start of 10.5 tests
+--echo #
+
+--echo #
+--echo # MDEV-20384 Assertion `field.is_sane()' failed in Protocol_text::store_field_metadata
+--echo #
+
+CREATE TABLE t1 (a YEAR);
+INSERT INTO t1 VALUES (2000),(2001);
+SELECT MAX( NULLIF( a, 1970 ) ) AS f FROM t1;
+--disable_ps_protocol
+--enable_metadata
+SELECT NULLIF(a, 1970) AS f FROM t1 ORDER BY a;
+SELECT MAX(NULLIF(a, 1970)) AS f FROM t1;
+--disable_metadata
+--enable_ps_protocol
+DROP TABLE t1;
+
+
+--echo #
+--echo # End of 10.5 tests
+--echo #
diff --git a/mysql-test/main/unsafe_binlog_innodb-master.opt b/mysql-test/main/unsafe_binlog_innodb-master.opt
deleted file mode 100644
index 0d13f0834a5..00000000000
--- a/mysql-test/main/unsafe_binlog_innodb-master.opt
+++ /dev/null
@@ -1 +0,0 @@
---loose-innodb_locks_unsafe_for_binlog --loose-innodb_lock_wait_timeout=1
diff --git a/mysql-test/main/unsafe_binlog_innodb.result b/mysql-test/main/unsafe_binlog_innodb.result
index 0fe3d38035b..ced29926400 100644
--- a/mysql-test/main/unsafe_binlog_innodb.result
+++ b/mysql-test/main/unsafe_binlog_innodb.result
@@ -1,3 +1,7 @@
+SET @save_timeout = @@GLOBAL.innodb_lock_wait_timeout;
+SET GLOBAL innodb_lock_wait_timeout = 1;
+SET @save_isolation = @@GLOBAL.tx_isolation;
+SET GLOBAL TRANSACTION ISOLATION LEVEL READ COMMITTED;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10;
create table t1 (id int not null, f_id int not null, f int not null,
primary key(f_id, id)) engine = InnoDB;
@@ -94,15 +98,15 @@ connect a,localhost,root,,;
connect b,localhost,root,,;
connect c,localhost,root,,;
connect d,localhost,root,,;
-SET SESSION STORAGE_ENGINE = InnoDB;
+SET SESSION DEFAULT_STORAGE_ENGINE = InnoDB;
connect e,localhost,root,,;
connect f,localhost,root,,;
connect g,localhost,root,,;
-SET SESSION STORAGE_ENGINE = InnoDB;
+SET SESSION DEFAULT_STORAGE_ENGINE = InnoDB;
connect h,localhost,root,,;
connect i,localhost,root,,;
connect j,localhost,root,,;
-SET SESSION STORAGE_ENGINE = InnoDB;
+SET SESSION DEFAULT_STORAGE_ENGINE = InnoDB;
connection a;
create table t1(a int not null, b int, primary key(a)) engine = InnoDB;
insert into t1 values (1,2),(5,3),(4,2);
@@ -187,3 +191,5 @@ disconnect h;
disconnect i;
disconnect j;
drop table t1, t2, t3, t5, t6, t8, t9;
+SET GLOBAL innodb_lock_wait_timeout = @save_timeout;
+SET GLOBAL tx_isolation = @save_isolation;
diff --git a/mysql-test/main/unsafe_binlog_innodb.test b/mysql-test/main/unsafe_binlog_innodb.test
index a0516749451..abd2c58de30 100644
--- a/mysql-test/main/unsafe_binlog_innodb.test
+++ b/mysql-test/main/unsafe_binlog_innodb.test
@@ -13,4 +13,12 @@
--source include/have_innodb.inc
let $engine_type= InnoDB;
+SET @save_timeout = @@GLOBAL.innodb_lock_wait_timeout;
+SET GLOBAL innodb_lock_wait_timeout = 1;
+SET @save_isolation = @@GLOBAL.tx_isolation;
+SET GLOBAL TRANSACTION ISOLATION LEVEL READ COMMITTED;
+
--source include/unsafe_binlog.inc
+
+SET GLOBAL innodb_lock_wait_timeout = @save_timeout;
+SET GLOBAL tx_isolation = @save_isolation;
diff --git a/mysql-test/main/user_var-binlog.result b/mysql-test/main/user_var-binlog.result
index 0a9fe956aee..20d1d8e7da8 100644
--- a/mysql-test/main/user_var-binlog.result
+++ b/mysql-test/main/user_var-binlog.result
@@ -29,7 +29,7 @@ SET @`a b`:=_latin1 X'68656C6C6F' COLLATE `latin1_swedish_ci`/*!*/;
use `test`/*!*/;
SET TIMESTAMP=10000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=1411383296/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
diff --git a/mysql-test/main/user_var.result b/mysql-test/main/user_var.result
index b475a8ca60a..7b4c8e0b66e 100644
--- a/mysql-test/main/user_var.result
+++ b/mysql-test/main/user_var.result
@@ -188,7 +188,7 @@ NULL 2
set @v1=null, @v2=1, @v3=1.1, @v4=now();
select coercibility(@v1),coercibility(@v2),coercibility(@v3),coercibility(@v4);
coercibility(@v1) coercibility(@v2) coercibility(@v3) coercibility(@v4)
-2 2 2 2
+2 5 5 2
set session @honk=99;
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 '@honk=99' at line 1
select @@local.max_allowed_packet;
diff --git a/mysql-test/main/variables.result b/mysql-test/main/variables.result
index 9cf751a1ee5..5a5247cf05e 100644
--- a/mysql-test/main/variables.result
+++ b/mysql-test/main/variables.result
@@ -162,7 +162,6 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
Warnings:
Note 1003 select @@IDENTITY AS `@@IDENTITY`,last_insert_id() AS `last_insert_id()`,@@identity AS `@@identity`
-set big_tables=OFF, big_tables=ON, big_tables=0, big_tables=1, big_tables="OFF", big_tables="ON";
set global concurrent_insert=2;
show variables like 'concurrent_insert';
Variable_name Value
@@ -188,24 +187,6 @@ set global concurrent_insert=DEFAULT;
select @@concurrent_insert;
@@concurrent_insert
AUTO
-set global timed_mutexes=ON;
-Warnings:
-Warning 1287 '@@timed_mutexes' is deprecated and will be removed in a future release
-show variables like 'timed_mutexes';
-Variable_name Value
-timed_mutexes ON
-select * from information_schema.session_variables where variable_name like 'timed_mutexes';
-VARIABLE_NAME VARIABLE_VALUE
-TIMED_MUTEXES ON
-set global timed_mutexes=0;
-Warnings:
-Warning 1287 '@@timed_mutexes' is deprecated and will be removed in a future release
-show variables like 'timed_mutexes';
-Variable_name Value
-timed_mutexes OFF
-select * from information_schema.session_variables where variable_name like 'timed_mutexes';
-VARIABLE_NAME VARIABLE_VALUE
-TIMED_MUTEXES OFF
set default_storage_engine=MYISAM, default_storage_engine="HEAP", global default_storage_engine="MERGE";
show local variables like 'default_storage_engine';
Variable_name Value
@@ -422,18 +403,14 @@ SELECT @@version LIKE 'non-existent';
SELECT @@version_compile_os LIKE 'non-existent';
@@version_compile_os LIKE 'non-existent'
0
-set big_tables=OFFF;
-ERROR 42000: Variable 'big_tables' can't be set to the value of 'OFFF'
-set big_tables="OFFF";
-ERROR 42000: Variable 'big_tables' can't be set to the value of 'OFFF'
set unknown_variable=1;
ERROR HY000: Unknown system variable 'unknown_variable'
set max_join_size="hello";
ERROR 42000: Incorrect argument type to variable 'max_join_size'
set default_storage_engine=UNKNOWN_TABLE_TYPE;
ERROR 42000: Unknown storage engine 'UNKNOWN_TABLE_TYPE'
-set default_storage_engine=MERGE, big_tables=2;
-ERROR 42000: Variable 'big_tables' can't be set to the value of '2'
+set default_storage_engine=MERGE, sql_warnings=NULL;
+ERROR 42000: Variable 'sql_warnings' can't be set to the value of 'NULL'
show local variables like 'default_storage_engine';
Variable_name Value
default_storage_engine MEMORY
@@ -456,10 +433,9 @@ ERROR HY000: Variable 'myisam_max_sort_file_size' is a GLOBAL variable and shoul
set @@SQL_WARNINGS=NULL;
ERROR 42000: Variable 'sql_warnings' can't be set to the value of 'NULL'
set autocommit=1;
-set big_tables=1;
-select @@autocommit, @@big_tables;
-@@autocommit @@big_tables
-1 1
+select @@autocommit;
+@@autocommit
+1
set global binlog_cache_size=100;
Warnings:
Warning 1292 Truncated incorrect binlog_cache_size value: '100'
@@ -1532,9 +1508,6 @@ SET @@global.max_binlog_cache_size=DEFAULT;
SET @@global.max_join_size=DEFAULT;
SET @@global.key_buffer_size=@kbs;
SET @@global.key_cache_block_size=@kcbs;
-select @@max_long_data_size > 0;
-@@max_long_data_size > 0
-1
#
# Bug#11766424 59527:
# Assert in DECIMAL_BIN_SIZE:
diff --git a/mysql-test/main/variables.test b/mysql-test/main/variables.test
index 846d2665013..495ab101352 100644
--- a/mysql-test/main/variables.test
+++ b/mysql-test/main/variables.test
@@ -113,8 +113,6 @@ explain extended select last_insert_id(345);
select @@IDENTITY,last_insert_id(), @@identity;
explain extended select @@IDENTITY,last_insert_id(), @@identity;
-set big_tables=OFF, big_tables=ON, big_tables=0, big_tables=1, big_tables="OFF", big_tables="ON";
-
set global concurrent_insert=2;
show variables like 'concurrent_insert';
select * from information_schema.session_variables where variable_name like 'concurrent_insert';
@@ -127,13 +125,6 @@ select * from information_schema.session_variables where variable_name like 'con
set global concurrent_insert=DEFAULT;
select @@concurrent_insert;
-set global timed_mutexes=ON;
-show variables like 'timed_mutexes';
-select * from information_schema.session_variables where variable_name like 'timed_mutexes';
-set global timed_mutexes=0;
-show variables like 'timed_mutexes';
-select * from information_schema.session_variables where variable_name like 'timed_mutexes';
-
set default_storage_engine=MYISAM, default_storage_engine="HEAP", global default_storage_engine="MERGE";
show local variables like 'default_storage_engine';
select * from information_schema.session_variables where variable_name like 'default_storage_engine';
@@ -241,10 +232,6 @@ SELECT @@version_compile_os LIKE 'non-existent';
# The following should give errors
---error ER_WRONG_VALUE_FOR_VAR
-set big_tables=OFFF;
---error ER_WRONG_VALUE_FOR_VAR
-set big_tables="OFFF";
--error ER_UNKNOWN_SYSTEM_VARIABLE
set unknown_variable=1;
--error ER_WRONG_TYPE_FOR_VAR
@@ -252,7 +239,7 @@ set max_join_size="hello";
--error ER_UNKNOWN_STORAGE_ENGINE
set default_storage_engine=UNKNOWN_TABLE_TYPE;
--error ER_WRONG_VALUE_FOR_VAR
-set default_storage_engine=MERGE, big_tables=2;
+set default_storage_engine=MERGE, sql_warnings=NULL;
show local variables like 'default_storage_engine';
--error ER_UNKNOWN_CHARACTER_SET
set character_set_client=UNKNOWN_CHARACTER_SET;
@@ -276,8 +263,7 @@ set @@SQL_WARNINGS=NULL;
# Test setting all variables
set autocommit=1;
-set big_tables=1;
-select @@autocommit, @@big_tables;
+select @@autocommit;
set global binlog_cache_size=100;
set bulk_insert_buffer_size=100;
set character set cp1251_koi8;
@@ -1264,11 +1250,6 @@ SET @@global.max_join_size=DEFAULT;
SET @@global.key_buffer_size=@kbs;
SET @@global.key_cache_block_size=@kcbs;
-#
-# Bug#56976: added new start-up parameter
-#
-select @@max_long_data_size > 0;
-
--echo #
--echo # Bug#11766424 59527:
--echo # Assert in DECIMAL_BIN_SIZE:
diff --git a/mysql-test/main/view.result b/mysql-test/main/view.result
index de4be4efda5..9499c7a41e4 100644
--- a/mysql-test/main/view.result
+++ b/mysql-test/main/view.result
@@ -198,7 +198,7 @@ c d
drop view v100;
ERROR 42S02: Unknown VIEW: 'test.v100'
drop view t1;
-ERROR HY000: 'test.t1' is not of type 'VIEW'
+ERROR 42S02: Unknown VIEW: 'test.t1'
drop table v1;
ERROR 42S02: 'test.v1' is a view
drop view v1,v2;
@@ -2848,7 +2848,11 @@ Tables_in_test
t1
CREATE VIEW v1 AS SELECT id FROM t1;
DROP VIEW t1,v1;
-ERROR HY000: 'test.t1' is not of type 'VIEW'
+ERROR 42S02: Unknown VIEW: 'test.t1'
+show warnings;
+Level Code Message
+Warning 1347 'test.t1' is not of type 'VIEW'
+Error 4092 Unknown VIEW: 'test.t1'
SHOW TABLES;
Tables_in_test
t1
@@ -5738,8 +5742,7 @@ drop view v60;
#
# MDEV-15572: view.test, server crash with --big-tables=1
#
-set @save_big_tables=@@big_tables;
-set big_tables=ON;
+set tmp_memory_table_size=0;
CREATE TABLE t1 ( f1 int , f2 int , f3 int , f4 int);
CREATE TABLE t2 ( f1 int , f2 int , f3 int , f4 int);
CREATE VIEW v1 AS
@@ -5749,7 +5752,7 @@ SELECT f1, f2, f3, f4 FROM t1;
ERROR HY000: Can not modify more than one base table through a join view 'test.v1'
drop view v1;
drop table t1, t2;
-set big_tables=@save_big_tables;
+set tmp_memory_table_size=default;
# -----------------------------------------------------------------
# -- End of 5.5 tests.
# -----------------------------------------------------------------
diff --git a/mysql-test/main/view.test b/mysql-test/main/view.test
index ca5456930ba..3325d4e6dd5 100644
--- a/mysql-test/main/view.test
+++ b/mysql-test/main/view.test
@@ -130,7 +130,7 @@ select * from v2;
drop view v100;
# try to drop table with DROP VIEW
--- error ER_WRONG_OBJECT
+-- error ER_UNKNOWN_VIEW
drop view t1;
# try to drop VIEW with DROP TABLE
@@ -510,7 +510,7 @@ drop table t1;
#
create table t1 (a int, b int);
create view v1 as select a, sum(b) from t1 group by a;
---error ER_KEY_DOES_NOT_EXITS
+--error ER_KEY_DOES_NOT_EXISTS
select b from v1 use index (some_index) where b=1;
drop view v1;
drop table t1;
@@ -2730,8 +2730,9 @@ DROP VIEW v2,v1;
SHOW TABLES;
CREATE VIEW v1 AS SELECT id FROM t1;
---error ER_WRONG_OBJECT
+--error ER_UNKNOWN_VIEW
DROP VIEW t1,v1;
+show warnings;
SHOW TABLES;
DROP TABLE t1;
@@ -3470,11 +3471,11 @@ drop table t1;
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (1),(2);
CREATE VIEW v1 AS SELECT * FROM t1;
---error ER_KEY_DOES_NOT_EXITS
+--error ER_KEY_DOES_NOT_EXISTS
SELECT * FROM v1 USE KEY(non_existant);
---error ER_KEY_DOES_NOT_EXITS
+--error ER_KEY_DOES_NOT_EXISTS
SELECT * FROM v1 FORCE KEY(non_existant);
---error ER_KEY_DOES_NOT_EXITS
+--error ER_KEY_DOES_NOT_EXISTS
SELECT * FROM v1 IGNORE KEY(non_existant);
DROP VIEW v1;
@@ -3629,17 +3630,17 @@ SELECT * FROM t1 USE INDEX (c2) WHERE c2=2;
CREATE VIEW v1 AS SELECT c1, c2 FROM t1;
SHOW INDEX FROM v1;
---error ER_KEY_DOES_NOT_EXITS
+--error ER_KEY_DOES_NOT_EXISTS
SELECT * FROM v1 USE INDEX (PRIMARY) WHERE c1=2;
---error ER_KEY_DOES_NOT_EXITS
+--error ER_KEY_DOES_NOT_EXISTS
SELECT * FROM v1 FORCE INDEX (PRIMARY) WHERE c1=2;
---error ER_KEY_DOES_NOT_EXITS
+--error ER_KEY_DOES_NOT_EXISTS
SELECT * FROM v1 IGNORE INDEX (PRIMARY) WHERE c1=2;
---error ER_KEY_DOES_NOT_EXITS
+--error ER_KEY_DOES_NOT_EXISTS
SELECT * FROM v1 USE INDEX (c2) WHERE c2=2;
---error ER_KEY_DOES_NOT_EXITS
+--error ER_KEY_DOES_NOT_EXISTS
SELECT * FROM v1 FORCE INDEX (c2) WHERE c2=2;
---error ER_KEY_DOES_NOT_EXITS
+--error ER_KEY_DOES_NOT_EXISTS
SELECT * FROM v1 IGNORE INDEX (c2) WHERE c2=2;
DROP VIEW v1;
@@ -5628,8 +5629,7 @@ drop view v60;
--echo # MDEV-15572: view.test, server crash with --big-tables=1
--echo #
-set @save_big_tables=@@big_tables;
-set big_tables=ON;
+set tmp_memory_table_size=0; # force on-disk tmp table
CREATE TABLE t1 ( f1 int , f2 int , f3 int , f4 int);
CREATE TABLE t2 ( f1 int , f2 int , f3 int , f4 int);
@@ -5642,7 +5642,7 @@ REPLACE INTO v1 (f1, f2, f3, f4)
drop view v1;
drop table t1, t2;
-set big_tables=@save_big_tables;
+set tmp_memory_table_size=default;
--echo # -----------------------------------------------------------------
--echo # -- End of 5.5 tests.
diff --git a/mysql-test/main/view_grant.result b/mysql-test/main/view_grant.result
index 954b57db768..f091d4de2d1 100644
--- a/mysql-test/main/view_grant.result
+++ b/mysql-test/main/view_grant.result
@@ -22,7 +22,7 @@ grant create view,select on test.* to mysqltest_1@localhost;
connect user1,localhost,mysqltest_1,,test;
connection user1;
create definer=root@localhost view v1 as select * from mysqltest.t1;
-ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
+ERROR 42000: Access denied; you need (at least one of) the SUPER, SET USER privilege(s) for this operation
create view v1 as select * from mysqltest.t1;
alter view v1 as select * from mysqltest.t1;
ERROR 42000: DROP command denied to user 'mysqltest_1'@'localhost' for table 'v1'
@@ -833,12 +833,30 @@ connect def,localhost,def_17254,,db17254;
connection def;
CREATE VIEW v1 AS SELECT * FROM t1;
connection root;
+GRANT SELECT ON db17254.v1 TO inv_17254@localhost;
DROP USER def_17254@localhost;
connect inv,localhost,inv_17254,,db17254;
connection inv;
-for a user
+for a user without SET USER
SELECT * FROM v1;
-ERROR 42000: SELECT command denied to user 'inv_17254'@'localhost' for table 'v1'
+ERROR 28000: Access denied for user 'inv_17254'@'localhost' (using password: NO)
+disconnect inv;
+connection root;
+GRANT SET USER ON *.* TO inv_17254@localhost;
+connect inv2,localhost,inv_17254,,db17254;
+connection inv2;
+SHOW GRANTS;
+Grants for inv_17254@localhost
+GRANT SET USER ON *.* TO `inv_17254`@`localhost`
+GRANT SELECT ON `db17254`.`v1` TO `inv_17254`@`localhost`
+GRANT SELECT ON `db17254`.`t1` TO `inv_17254`@`localhost`
+SELECT CURRENT_USER, SYSTEM_USER(), USER();
+CURRENT_USER SYSTEM_USER() USER()
+inv_17254@localhost inv_17254@localhost inv_17254@localhost
+for a user with SET USER
+SELECT * FROM v1;
+ERROR HY000: The user specified as a definer ('def_17254'@'localhost') does not exist
+disconnect inv2;
connection root;
for a superuser
SELECT * FROM v1;
@@ -846,7 +864,6 @@ ERROR HY000: The user specified as a definer ('def_17254'@'localhost') does not
DROP USER inv_17254@localhost;
DROP DATABASE db17254;
disconnect def;
-disconnect inv;
DROP DATABASE IF EXISTS mysqltest_db1;
DROP DATABASE IF EXISTS mysqltest_db2;
DROP USER mysqltest_u1;
@@ -915,7 +932,7 @@ ERROR 42000: CREATE VIEW command denied to user 'u26813'@'localhost' for table '
ALTER VIEW v2 AS SELECT f2 FROM t1;
ERROR 42000: DROP command denied to user 'u26813'@'localhost' for table 'v2'
ALTER VIEW v3 AS SELECT f2 FROM t1;
-ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
+ERROR 42000: Access denied; you need (at least one of) the SUPER, SET USER privilege(s) for this operation
connection root;
SHOW CREATE VIEW v3;
View Create View character_set_client collation_connection
@@ -943,9 +960,9 @@ GRANT SELECT, DROP, CREATE VIEW, SHOW VIEW ON mysqltest_29908.v2 TO u29908_2@loc
GRANT SELECT ON mysqltest_29908.t1 TO u29908_2@localhost;
connect u2,localhost,u29908_2,,mysqltest_29908;
ALTER VIEW v1 AS SELECT f2 FROM t1;
-ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
+ERROR 42000: Access denied; you need (at least one of) the SUPER, SET USER privilege(s) for this operation
ALTER VIEW v2 AS SELECT f2 FROM t1;
-ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
+ERROR 42000: Access denied; you need (at least one of) the SUPER, SET USER privilege(s) for this operation
SHOW CREATE VIEW v2;
View Create View character_set_client collation_connection
v2 CREATE ALGORITHM=UNDEFINED DEFINER=`u29908_1`@`localhost` SQL SECURITY INVOKER VIEW `v2` AS select `t1`.`f1` AS `f1` from `t1` latin1 latin1_swedish_ci
diff --git a/mysql-test/main/view_grant.test b/mysql-test/main/view_grant.test
index cc17cae58d1..c9bb9569145 100644
--- a/mysql-test/main/view_grant.test
+++ b/mysql-test/main/view_grant.test
@@ -987,13 +987,27 @@ connection def;
CREATE VIEW v1 AS SELECT * FROM t1;
connection root;
+GRANT SELECT ON db17254.v1 TO inv_17254@localhost;
DROP USER def_17254@localhost;
connect (inv,localhost,inv_17254,,db17254);
connection inv;
---echo for a user
---error ER_TABLEACCESS_DENIED_ERROR
+--echo for a user without SET USER
+--error ER_ACCESS_DENIED_ERROR
+SELECT * FROM v1;
+disconnect inv;
+
+connection root;
+GRANT SET USER ON *.* TO inv_17254@localhost;
+
+connect (inv2,localhost,inv_17254,,db17254);
+connection inv2;
+SHOW GRANTS;
+SELECT CURRENT_USER, SYSTEM_USER(), USER();
+--echo for a user with SET USER
+--error ER_NO_SUCH_USER
SELECT * FROM v1;
+disconnect inv2;
connection root;
--echo for a superuser
@@ -1002,7 +1016,6 @@ SELECT * FROM v1;
DROP USER inv_17254@localhost;
DROP DATABASE db17254;
disconnect def;
-disconnect inv;
#
diff --git a/mysql-test/main/warnings_debug.result b/mysql-test/main/warnings_debug.result
index 3a9d8225795..4d815767c14 100644
--- a/mysql-test/main/warnings_debug.result
+++ b/mysql-test/main/warnings_debug.result
@@ -5,8 +5,12 @@ SET SESSION debug_dbug="+d,warn_during_ha_commit_trans";
INSERT INTO t1 VALUES (1);
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
+Warning 1196 Some non-transactional changed tables couldn't be rolled back
+Warning 1196 Some non-transactional changed tables couldn't be rolled back
SHOW WARNINGS;
Level Code Message
Warning 1196 Some non-transactional changed tables couldn't be rolled back
-drop table t1;
+Warning 1196 Some non-transactional changed tables couldn't be rolled back
+Warning 1196 Some non-transactional changed tables couldn't be rolled back
SET debug_dbug= @saved_dbug;
+drop table t1;
diff --git a/mysql-test/main/warnings_debug.test b/mysql-test/main/warnings_debug.test
index 6605daf875d..4d084b1f52c 100644
--- a/mysql-test/main/warnings_debug.test
+++ b/mysql-test/main/warnings_debug.test
@@ -17,5 +17,5 @@ INSERT INTO t1 VALUES (1);
# packet. Show the warnings manually also.
SHOW WARNINGS;
-drop table t1;
SET debug_dbug= @saved_dbug;
+drop table t1;
diff --git a/mysql-test/main/win.result b/mysql-test/main/win.result
index d4a5ac63216..095936f8b82 100644
--- a/mysql-test/main/win.result
+++ b/mysql-test/main/win.result
@@ -1742,8 +1742,7 @@ drop table t1;
#
create table t1(a int);
insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
-set @tmp=@@big_tables;
-set big_tables=1;
+set tmp_memory_table_size=0;
select rank() over (order by a) from t1;
rank() over (order by a)
1
@@ -1756,7 +1755,7 @@ rank() over (order by a)
8
9
10
-set big_tables=@tmp;
+set tmp_memory_table_size=default;
drop table t1;
#
# Check if "ORDER BY window_func" works
@@ -3763,7 +3762,8 @@ ANALYZE
"r_total_time_ms": "REPLACED",
"r_used_priority_queue": false,
"r_output_rows": 3,
- "r_buffer_size": "REPLACED"
+ "r_buffer_size": "REPLACED",
+ "r_sort_mode": "sort_key,rowid"
}
},
"temporary_table": {
@@ -3773,7 +3773,8 @@ ANALYZE
"r_loops": 1,
"rows": 3,
"r_rows": 3,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100
}
diff --git a/mysql-test/main/win.test b/mysql-test/main/win.test
index 2b3ce469990..43133386461 100644
--- a/mysql-test/main/win.test
+++ b/mysql-test/main/win.test
@@ -1068,10 +1068,9 @@ drop table t1;
--echo #
create table t1(a int);
insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
-set @tmp=@@big_tables;
-set big_tables=1;
+set tmp_memory_table_size=0; # force on-disk tmp table
select rank() over (order by a) from t1;
-set big_tables=@tmp;
+set tmp_memory_table_size=default;
drop table t1;
--echo #
diff --git a/mysql-test/main/win_percentile.result b/mysql-test/main/win_percentile.result
index a2ca775fcfb..09c2c4fc5de 100644
--- a/mysql-test/main/win_percentile.result
+++ b/mysql-test/main/win_percentile.result
@@ -99,7 +99,14 @@ Tatiana
select score, percentile_cont(0.5) within group(order by name) over (partition by score) from t1;
ERROR HY000: Numeric datatype is required for percentile_cont function
select score, percentile_disc(0.5) within group(order by name) over (partition by score) from t1;
-ERROR HY000: Numeric datatype is required for percentile_disc function
+score percentile_disc(0.5) within group(order by name) over (partition by score)
+3.0000 Chun
+3.0000 Chun
+4.0000 Tata
+4.0000 Tata
+4.0000 Tata
+7.0000 Chun
+7.0000 Chun
#parameter value should be in the range of [0,1]
select percentile_disc(1.5) within group(order by score) over (partition by name) from t1;
ERROR HY000: Argument to the percentile_disc function does not belong to the range [0,1]
@@ -452,7 +459,7 @@ Lord of the Ladybirds 30000000000.00
Lord of the Ladybirds 30000000000.00
DROP TABLE t2, t1;
#
-# MDEV-20272 PERCENTILE_DISC() crashes on a temporal type input
+# MDEV-20280 PERCENTILE_DISC() rejects temporal and string input
#
CREATE OR REPLACE TABLE t1 (name CHAR(30), star_rating TIME);
INSERT INTO t1 VALUES ('Lord of the Ladybirds', 5);
@@ -463,5 +470,28 @@ INSERT INTO t1 VALUES ('Lady of the Flies', 5);
SELECT name, PERCENTILE_DISC(0.5)
WITHIN GROUP (ORDER BY star_rating)
OVER (PARTITION BY name) AS pc FROM t1;
-ERROR HY000: Numeric datatype is required for percentile_disc function
+name pc
+Lady of the Flies 00:00:02
+Lady of the Flies 00:00:02
+Lady of the Flies 00:00:02
+Lord of the Ladybirds 00:00:03
+Lord of the Ladybirds 00:00:03
+SELECT name, PERCENTILE_DISC(0)
+WITHIN GROUP (ORDER BY star_rating)
+OVER (PARTITION BY name) AS pc FROM t1;
+name pc
+Lady of the Flies 00:00:01
+Lady of the Flies 00:00:01
+Lady of the Flies 00:00:01
+Lord of the Ladybirds 00:00:03
+Lord of the Ladybirds 00:00:03
+SELECT name, PERCENTILE_DISC(1)
+WITHIN GROUP (ORDER BY star_rating)
+OVER (PARTITION BY name) AS pc FROM t1;
+name pc
+Lady of the Flies 00:00:05
+Lady of the Flies 00:00:05
+Lady of the Flies 00:00:05
+Lord of the Ladybirds 00:00:05
+Lord of the Ladybirds 00:00:05
DROP TABLE t1;
diff --git a/mysql-test/main/win_percentile.test b/mysql-test/main/win_percentile.test
index 8705be123ff..e981dc62c41 100644
--- a/mysql-test/main/win_percentile.test
+++ b/mysql-test/main/win_percentile.test
@@ -61,7 +61,7 @@ select name from t1 a where (select percentile_disc(0.5) within group (order by
--echo #disallowed fields in order by
--error ER_WRONG_TYPE_FOR_PERCENTILE_FUNC
select score, percentile_cont(0.5) within group(order by name) over (partition by score) from t1;
---error ER_WRONG_TYPE_FOR_PERCENTILE_FUNC
+
select score, percentile_disc(0.5) within group(order by name) over (partition by score) from t1;
--echo #parameter value should be in the range of [0,1]
@@ -212,7 +212,7 @@ DROP TABLE t2, t1;
--echo #
---echo # MDEV-20272 PERCENTILE_DISC() crashes on a temporal type input
+--echo # MDEV-20280 PERCENTILE_DISC() rejects temporal and string input
--echo #
CREATE OR REPLACE TABLE t1 (name CHAR(30), star_rating TIME);
@@ -221,8 +221,13 @@ INSERT INTO t1 VALUES ('Lord of the Ladybirds', 3);
INSERT INTO t1 VALUES ('Lady of the Flies', 1);
INSERT INTO t1 VALUES ('Lady of the Flies', 2);
INSERT INTO t1 VALUES ('Lady of the Flies', 5);
---error ER_WRONG_TYPE_FOR_PERCENTILE_FUNC
SELECT name, PERCENTILE_DISC(0.5)
WITHIN GROUP (ORDER BY star_rating)
OVER (PARTITION BY name) AS pc FROM t1;
+SELECT name, PERCENTILE_DISC(0)
+ WITHIN GROUP (ORDER BY star_rating)
+ OVER (PARTITION BY name) AS pc FROM t1;
+SELECT name, PERCENTILE_DISC(1)
+ WITHIN GROUP (ORDER BY star_rating)
+ OVER (PARTITION BY name) AS pc FROM t1;
DROP TABLE t1;
diff --git a/mysql-test/main/xa.result b/mysql-test/main/xa.result
index 4717d51b09c..50089bb1d5e 100644
--- a/mysql-test/main/xa.result
+++ b/mysql-test/main/xa.result
@@ -51,7 +51,7 @@ formatID gtrid_length bqual_length data
11 5 5 testb 0@P`
1 5 5 testatestb
xa commit 'testb',0x2030405060,11;
-ERROR XAE04: XAER_NOTA: Unknown XID
+ERROR XAE09: XAER_OUTSIDE: Some work is done outside global transaction
xa rollback 'testa','testb';
xa start 'zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz';
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
@@ -59,6 +59,9 @@ select * from t1;
a
20
disconnect con1;
+xa rollback 'testb',0x2030405060,11;
+xa recover;
+formatID gtrid_length bqual_length data
connection default;
xa start 'tr1';
insert t1 values (40);
@@ -372,6 +375,61 @@ DROP TABLE t1;
disconnect con1;
connection default;
#
+# MDEV-21766 - Forbid XID with empty 'gtrid'
+#
+CREATE TABLE t1(a INT) ENGINE=InnoDB;
+XA BEGIN '';
+ERROR XAE05: XAER_INVAL: Invalid arguments (or unsupported command)
+XA BEGIN '8bytes1x8bytes2x8bytes3x8bytes4x8bytes5x8bytes6x8bytes7x8bytes8x',
+'8bytes1x8bytes2x8bytes3x8bytes4x8bytes5x8bytes6x8bytes7x8bytes8x';
+INSERT INTO t1 VALUES(1);
+XA END '8bytes1x8bytes2x8bytes3x8bytes4x8bytes5x8bytes6x8bytes7x8bytes8x',
+'8bytes1x8bytes2x8bytes3x8bytes4x8bytes5x8bytes6x8bytes7x8bytes8x';
+XA PREPARE '8bytes1x8bytes2x8bytes3x8bytes4x8bytes5x8bytes6x8bytes7x8bytes8x',
+'8bytes1x8bytes2x8bytes3x8bytes4x8bytes5x8bytes6x8bytes7x8bytes8x';
+XA ROLLBACK '8bytes1x8bytes2x8bytes3x8bytes4x8bytes5x8bytes6x8bytes7x8bytes8x',
+'8bytes1x8bytes2x8bytes3x8bytes4x8bytes5x8bytes6x8bytes7x8bytes8x';
+SET NAMES utf8;
+XA BEGIN 'Я_упала_Ñ_Ñеновала_тормозила_головой';
+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
+XA BEGIN 'Я_упaлa_c_Ñеновала_тормозила_головой';
+XA END 'Я_упaлa_c_Ñеновала_тормозила_головой';
+XA PREPARE 'Я_упaлa_c_Ñеновала_тормозила_головой';
+XA ROLLBACK 'Я_упaлa_c_Ñеновала_тормозила_головой';
+SET NAMES default;
+DROP TABLE t1;
+#
+# MDEV-21659 XA rollback foreign_xid is allowed inside active XA
+# MDEV-21854 - xa commit one phase for already prepared transaction
+# must always error out
+#
+BEGIN;
+XA COMMIT 'unknown';
+ERROR XAE09: XAER_OUTSIDE: Some work is done outside global transaction
+XA COMMIT 'unknown' ONE PHASE;
+ERROR XAE09: XAER_OUTSIDE: Some work is done outside global transaction
+BEGIN;
+XA ROLLBACK 'unknown';
+ERROR XAE09: XAER_OUTSIDE: Some work is done outside global transaction
+ROLLBACK;
+XA START 'xid1';
+XA COMMIT 'unknown';
+ERROR XAE09: XAER_OUTSIDE: Some work is done outside global transaction
+XA COMMIT 'unknown' ONE PHASE;
+ERROR XAE09: XAER_OUTSIDE: Some work is done outside global transaction
+XA ROLLBACK 'unknown';
+ERROR XAE09: XAER_OUTSIDE: Some work is done outside global transaction
+XA END 'xid1';
+XA PREPARE 'xid1';
+XA COMMIT 'xid1' ONE PHASE;
+ERROR XAE05: XAER_INVAL: Invalid arguments (or unsupported command)
+XA ROLLBACK 'xid1';
+#
+# MDEV-21856 - xid_t::formatID has to be constrained to 4 byte size
+#
+XA START 'gtrid', 'bqual', 0x80000000;
+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 '0x80000000' at line 1
+#
# XA states and SHOW commands
#
create table t1 (pk int primary key) engine=innodb;
@@ -410,3 +468,67 @@ XA ROLLBACK 'xid';
#
# End of 10.3 tests
#
+#
+# Start of 10.5 tests
+#
+# MDEV-7974 related
+# Check XA state when lock_wait_timeout happens
+# More tests added to flush_read_lock.test
+connect con_tmp,localhost,root,,;
+set session lock_wait_timeout=1;
+create table asd (a int) engine=innodb;
+xa start 'test1';
+insert into asd values(1);
+xa end 'test1';
+connection default;
+flush table with read lock;
+connection con_tmp;
+# PREPARE error will do auto rollback.
+xa prepare 'test1';
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+show errors;
+Level Code Message
+Error 1205 Lock wait timeout exceeded; try restarting transaction
+Error 1402 XA_RBROLLBACK: Transaction branch was rolled back
+connection default;
+unlock tables;
+connection con_tmp;
+xa start 'test1';
+insert into asd values(1);
+xa end 'test1';
+xa prepare 'test1';
+connection default;
+flush tables with read lock;
+connection con_tmp;
+# LOCK error during ROLLBACK will not alter transaction state.
+xa rollback 'test1';
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+show errors;
+Level Code Message
+Error 1205 Lock wait timeout exceeded; try restarting transaction
+Error 1401 XAER_RMERR: Fatal error occurred in the transaction branch - check your data for consistency
+xa recover;
+formatID gtrid_length bqual_length data
+1 5 0 test1
+# LOCK error during COMMIT will not alter transaction state.
+xa commit 'test1';
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+show errors;
+Level Code Message
+Error 1205 Lock wait timeout exceeded; try restarting transaction
+Error 1401 XAER_RMERR: Fatal error occurred in the transaction branch - check your data for consistency
+xa recover;
+formatID gtrid_length bqual_length data
+1 5 0 test1
+connection default;
+unlock tables;
+connection con_tmp;
+xa rollback 'test1';
+xa recover;
+formatID gtrid_length bqual_length data
+drop table asd;
+disconnect con_tmp;
+connection default;
+#
+# End of 10.5 tests
+#
diff --git a/mysql-test/main/xa.test b/mysql-test/main/xa.test
index 33d4f69b7d2..499cbeaa88f 100644
--- a/mysql-test/main/xa.test
+++ b/mysql-test/main/xa.test
@@ -72,7 +72,7 @@ xa prepare 'testa','testb';
xa recover;
---error ER_XAER_NOTA
+--error ER_XAER_OUTSIDE
xa commit 'testb',0x2030405060,11;
xa rollback 'testa','testb';
@@ -82,6 +82,8 @@ xa start 'zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz';
select * from t1;
disconnect con1;
--source include/wait_until_count_sessions.inc
+xa rollback 'testb',0x2030405060,11;
+xa recover;
connection default;
@@ -515,6 +517,69 @@ DROP TABLE t1;
--disconnect con1
connection default;
+--echo #
+--echo # MDEV-21766 - Forbid XID with empty 'gtrid'
+--echo #
+CREATE TABLE t1(a INT) ENGINE=InnoDB;
+
+--error ER_XAER_INVAL
+XA BEGIN '';
+
+XA BEGIN '8bytes1x8bytes2x8bytes3x8bytes4x8bytes5x8bytes6x8bytes7x8bytes8x',
+ '8bytes1x8bytes2x8bytes3x8bytes4x8bytes5x8bytes6x8bytes7x8bytes8x';
+INSERT INTO t1 VALUES(1);
+XA END '8bytes1x8bytes2x8bytes3x8bytes4x8bytes5x8bytes6x8bytes7x8bytes8x',
+ '8bytes1x8bytes2x8bytes3x8bytes4x8bytes5x8bytes6x8bytes7x8bytes8x';
+XA PREPARE '8bytes1x8bytes2x8bytes3x8bytes4x8bytes5x8bytes6x8bytes7x8bytes8x',
+ '8bytes1x8bytes2x8bytes3x8bytes4x8bytes5x8bytes6x8bytes7x8bytes8x';
+XA ROLLBACK '8bytes1x8bytes2x8bytes3x8bytes4x8bytes5x8bytes6x8bytes7x8bytes8x',
+ '8bytes1x8bytes2x8bytes3x8bytes4x8bytes5x8bytes6x8bytes7x8bytes8x';
+
+SET NAMES utf8;
+--error ER_PARSE_ERROR
+XA BEGIN 'Я_упала_Ñ_Ñеновала_тормозила_головой'; # 36 characters, 67 bytes
+XA BEGIN 'Я_упaлa_c_Ñеновала_тормозила_головой'; # 36 characters, 64 bytes
+XA END 'Я_упaлa_c_Ñеновала_тормозила_головой';
+XA PREPARE 'Я_упaлa_c_Ñеновала_тормозила_головой';
+XA ROLLBACK 'Я_упaлa_c_Ñеновала_тормозила_головой';
+SET NAMES default;
+
+DROP TABLE t1;
+--echo #
+--echo # MDEV-21659 XA rollback foreign_xid is allowed inside active XA
+--echo # MDEV-21854 - xa commit one phase for already prepared transaction
+--echo # must always error out
+--echo #
+BEGIN;
+--error ER_XAER_OUTSIDE
+XA COMMIT 'unknown';
+--error ER_XAER_OUTSIDE
+XA COMMIT 'unknown' ONE PHASE;
+BEGIN;
+--error ER_XAER_OUTSIDE
+XA ROLLBACK 'unknown';
+ROLLBACK;
+
+XA START 'xid1';
+--error ER_XAER_OUTSIDE
+XA COMMIT 'unknown';
+--error ER_XAER_OUTSIDE
+XA COMMIT 'unknown' ONE PHASE;
+--error ER_XAER_OUTSIDE
+XA ROLLBACK 'unknown';
+XA END 'xid1';
+XA PREPARE 'xid1';
+--error ER_XAER_INVAL
+XA COMMIT 'xid1' ONE PHASE;
+XA ROLLBACK 'xid1';
+
+
+--echo #
+--echo # MDEV-21856 - xid_t::formatID has to be constrained to 4 byte size
+--echo #
+--error ER_PARSE_ERROR
+XA START 'gtrid', 'bqual', 0x80000000;
+
--source include/wait_until_count_sessions.inc
--echo #
@@ -561,3 +626,58 @@ XA ROLLBACK 'xid';
--echo #
--echo # End of 10.3 tests
--echo #
+
+--echo #
+--echo # Start of 10.5 tests
+--echo #
+
+--echo # MDEV-7974 related
+--echo # Check XA state when lock_wait_timeout happens
+--echo # More tests added to flush_read_lock.test
+connect (con_tmp,localhost,root,,);
+set session lock_wait_timeout=1;
+create table asd (a int) engine=innodb;
+xa start 'test1';
+insert into asd values(1);
+xa end 'test1';
+connection default;
+flush table with read lock;
+connection con_tmp;
+--echo # PREPARE error will do auto rollback.
+--ERROR ER_LOCK_WAIT_TIMEOUT
+xa prepare 'test1';
+show errors;
+connection default;
+unlock tables;
+
+connection con_tmp;
+xa start 'test1';
+insert into asd values(1);
+xa end 'test1';
+xa prepare 'test1';
+connection default;
+flush tables with read lock;
+connection con_tmp;
+--echo # LOCK error during ROLLBACK will not alter transaction state.
+--ERROR ER_LOCK_WAIT_TIMEOUT
+xa rollback 'test1';
+show errors;
+xa recover;
+--echo # LOCK error during COMMIT will not alter transaction state.
+--ERROR ER_LOCK_WAIT_TIMEOUT
+xa commit 'test1';
+show errors;
+xa recover;
+connection default;
+unlock tables;
+connection con_tmp;
+xa rollback 'test1';
+xa recover;
+drop table asd;
+disconnect con_tmp;
+--source include/wait_until_disconnected.inc
+connection default;
+
+--echo #
+--echo # End of 10.5 tests
+--echo #
diff --git a/mysql-test/main/xa_binlog.result b/mysql-test/main/xa_binlog.result
index 619a6e08b20..a272570aac1 100644
--- a/mysql-test/main/xa_binlog.result
+++ b/mysql-test/main/xa_binlog.result
@@ -18,15 +18,68 @@ a
1
2
3
-SHOW BINLOG EVENTS LIMIT 3,9;
+DROP TABLE t1;
+CREATE TABLE t1 (a INT) ENGINE=Aria;
+INSERT INTO t1 VALUES (1),(2);
+XA BEGIN 'x';
+DELETE FROM t1;
+XA END 'x';
+XA PREPARE 'x';
+Warnings:
+Warning 1030 Got error 131 "Command not supported by the engine" from storage engine Aria
+XA COMMIT 'x';
+SELECT * from t1;
+a
+XA BEGIN 'x';
+INSERT INTO t1 VALUES (3),(4);
+XA END 'x';
+XA PREPARE 'x';
+Warnings:
+Warning 1030 Got error 131 "Command not supported by the engine" from storage engine Aria
+XA ROLLBACK 'x';
+Warnings:
+Warning 1196 Some non-transactional changed tables couldn't be rolled back
+SELECT * from t1;
+a
+3
+4
+DROP TABLE t1;
+SHOW BINLOG EVENTS LIMIT 3,100;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 # Gtid 1 # BEGIN GTID #-#-#
+master-bin.000001 # Gtid 1 # XA START X'786174657374',X'',1 GTID #-#-#
master-bin.000001 # Query 1 # use `test`; INSERT INTO t1 VALUES (1)
-master-bin.000001 # Query 1 # COMMIT
+master-bin.000001 # Query 1 # XA END X'786174657374',X'',1
+master-bin.000001 # XA_prepare 1 # XA PREPARE X'786174657374',X'',1
+master-bin.000001 # Gtid 1 # GTID #-#-#
+master-bin.000001 # Query 1 # XA COMMIT X'786174657374',X'',1
master-bin.000001 # Gtid 1 # BEGIN GTID #-#-#
master-bin.000001 # Query 1 # use `test`; INSERT INTO t1 VALUES (2)
-master-bin.000001 # Query 1 # COMMIT
+master-bin.000001 # Xid 1 # COMMIT /* xid=XX */
master-bin.000001 # Gtid 1 # BEGIN GTID #-#-#
master-bin.000001 # Query 1 # use `test`; INSERT INTO t1 VALUES (3)
master-bin.000001 # Xid 1 # COMMIT /* xid=XX */
-DROP TABLE t1;
+master-bin.000001 # Gtid 1 # GTID #-#-#
+master-bin.000001 # Query 1 # use `test`; DROP TABLE `t1` /* generated by server */
+master-bin.000001 # Gtid 1 # GTID #-#-#
+master-bin.000001 # Query 1 # use `test`; CREATE TABLE t1 (a INT) ENGINE=Aria
+master-bin.000001 # Gtid 1 # BEGIN GTID #-#-#
+master-bin.000001 # Query 1 # use `test`; INSERT INTO t1 VALUES (1),(2)
+master-bin.000001 # Query 1 # COMMIT
+master-bin.000001 # Gtid 1 # BEGIN GTID #-#-#
+master-bin.000001 # Query 1 # use `test`; DELETE FROM t1
+master-bin.000001 # Query 1 # COMMIT
+master-bin.000001 # Gtid 1 # XA START X'78',X'',1 GTID #-#-#
+master-bin.000001 # Query 1 # XA END X'78',X'',1
+master-bin.000001 # XA_prepare 1 # XA PREPARE X'78',X'',1
+master-bin.000001 # Gtid 1 # GTID #-#-#
+master-bin.000001 # Query 1 # XA COMMIT X'78',X'',1
+master-bin.000001 # Gtid 1 # BEGIN GTID #-#-#
+master-bin.000001 # Query 1 # use `test`; INSERT INTO t1 VALUES (3),(4)
+master-bin.000001 # Query 1 # COMMIT
+master-bin.000001 # Gtid 1 # XA START X'78',X'',1 GTID #-#-#
+master-bin.000001 # Query 1 # XA END X'78',X'',1
+master-bin.000001 # XA_prepare 1 # XA PREPARE X'78',X'',1
+master-bin.000001 # Gtid 1 # GTID #-#-#
+master-bin.000001 # Query 1 # XA ROLLBACK X'78',X'',1
+master-bin.000001 # Gtid 1 # GTID #-#-#
+master-bin.000001 # Query 1 # use `test`; DROP TABLE `t1` /* generated by server */
diff --git a/mysql-test/main/xa_binlog.test b/mysql-test/main/xa_binlog.test
index ecbf1f4f066..1343fa2aaee 100644
--- a/mysql-test/main/xa_binlog.test
+++ b/mysql-test/main/xa_binlog.test
@@ -24,9 +24,38 @@ INSERT INTO t1 VALUES (3);
COMMIT;
SELECT * FROM t1 ORDER BY a;
+DROP TABLE t1;
---replace_column 2 # 5 #
---replace_regex /xid=[0-9]+/xid=XX/ /GTID [0-9]+-[0-9]+-[0-9]+/GTID #-#-#/
-SHOW BINLOG EVENTS LIMIT 3,9;
+#
+# MDEV-22607 Assertion `ha_info->ht() != binlog_hton' failed in
+# MYSQL_BIN_LOG::unlog_xa_prepare
+#
+
+CREATE TABLE t1 (a INT) ENGINE=Aria;
+INSERT INTO t1 VALUES (1),(2);
+XA BEGIN 'x';
+DELETE FROM t1;
+XA END 'x';
+XA PREPARE 'x';
+
+# Cleanup
+XA COMMIT 'x';
+
+SELECT * from t1;
+XA BEGIN 'x';
+INSERT INTO t1 VALUES (3),(4);
+XA END 'x';
+XA PREPARE 'x';
+XA ROLLBACK 'x';
+
+SELECT * from t1;
DROP TABLE t1;
+
+#
+# Time to check the log
+#
+
+--replace_column 2 # 5 #
+--replace_regex /xid=[0-9]+/xid=XX/ /GTID [0-9]+-[0-9]+-[0-9]+/GTID #-#-#/
+SHOW BINLOG EVENTS LIMIT 3,100;
diff --git a/mysql-test/main/xa_prepared_binlog_off-master.opt b/mysql-test/main/xa_prepared_binlog_off-master.opt
new file mode 100644
index 00000000000..789275fa25e
--- /dev/null
+++ b/mysql-test/main/xa_prepared_binlog_off-master.opt
@@ -0,0 +1 @@
+--skip-log-bin
diff --git a/mysql-test/main/xa_prepared_binlog_off.result b/mysql-test/main/xa_prepared_binlog_off.result
new file mode 100644
index 00000000000..ca19f6cdfaf
--- /dev/null
+++ b/mysql-test/main/xa_prepared_binlog_off.result
@@ -0,0 +1,1044 @@
+call mtr.add_suppression("You need to use --log-bin to make --log-slave-updates work.");
+connection default;
+CREATE VIEW v_processlist as SELECT * FROM performance_schema.threads where type = 'FOREGROUND';
+call mtr.add_suppression("Found 10 prepared XA transactions");
+CREATE TABLE t (a INT) ENGINE=innodb;
+connect conn$index$type, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@sql_log_bin = OFF;
+CREATE TEMPORARY TABLE tmp1 (a int) ENGINE=innodb;
+XA START 'trx1tmp';
+INSERT INTO tmp1 SET a=1;
+XA END 'trx1tmp';
+XA PREPARE 'trx1tmp';
+connect conn$index$type, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@sql_log_bin = OFF;
+CREATE TEMPORARY TABLE tmp1 (a int) ENGINE=innodb;
+XA START 'trx2tmp';
+INSERT INTO tmp1 SET a=1;
+XA END 'trx2tmp';
+XA PREPARE 'trx2tmp';
+connect conn$index$type, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@sql_log_bin = OFF;
+CREATE TEMPORARY TABLE tmp1 (a int) ENGINE=innodb;
+XA START 'trx3tmp';
+INSERT INTO tmp1 SET a=1;
+XA END 'trx3tmp';
+XA PREPARE 'trx3tmp';
+connection default;
+XA COMMIT 'trx1tmp';
+ERROR XAE04: XAER_NOTA: Unknown XID
+XA ROLLBACK 'trx1tmp';
+ERROR XAE04: XAER_NOTA: Unknown XID
+XA START 'trx1tmp';
+ERROR XAE08: XAER_DUPID: The XID already exists
+connection default;
+*** 3 prepared transactions must be in the list ***
+XA RECOVER;
+formatID gtrid_length bqual_length data
+1 LEN1 LEN2 TRX_N
+1 LEN1 LEN2 TRX_N
+1 LEN1 LEN2 TRX_N
+connection conn1tmp;
+disconnect conn1tmp;
+connection default;
+XA COMMIT 'trx1tmp';
+KILL connection CONN_ID;
+XA COMMIT 'trx3tmp';
+connect conn$index$type, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'trx1ro';
+SELECT * from t ORDER BY a;
+a
+XA END 'trx1ro';
+XA PREPARE 'trx1ro';
+connect conn$index$type, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'trx2ro';
+SELECT * from t ORDER BY a;
+a
+XA END 'trx2ro';
+XA PREPARE 'trx2ro';
+connect conn$index$type, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'trx3ro';
+SELECT * from t ORDER BY a;
+a
+XA END 'trx3ro';
+XA PREPARE 'trx3ro';
+connection default;
+*** 4 prepared transactions must be in the list ***
+XA RECOVER;
+formatID gtrid_length bqual_length data
+1 LEN1 LEN2 TRX_N
+1 LEN1 LEN2 TRX_N
+1 LEN1 LEN2 TRX_N
+1 LEN1 LEN2 TRX_N
+connection conn1ro;
+disconnect conn1ro;
+connection default;
+XA ROLLBACK 'trx1ro';
+KILL connection CONN_ID;
+XA ROLLBACK 'trx3ro';
+connect conn$index$type, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'trx1empty';
+XA END 'trx1empty';
+XA PREPARE 'trx1empty';
+connect conn$index$type, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'trx2empty';
+XA END 'trx2empty';
+XA PREPARE 'trx2empty';
+connect conn$index$type, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'trx3empty';
+XA END 'trx3empty';
+XA PREPARE 'trx3empty';
+connection default;
+*** 5 prepared transactions must be in the list ***
+XA RECOVER;
+formatID gtrid_length bqual_length data
+1 LEN1 LEN2 TRX_N
+1 LEN1 LEN2 TRX_N
+1 LEN1 LEN2 TRX_N
+1 LEN1 LEN2 TRX_N
+1 LEN1 LEN2 TRX_N
+connection conn1empty;
+disconnect conn1empty;
+connection default;
+XA COMMIT 'trx1empty';
+KILL connection CONN_ID;
+XA COMMIT 'trx3empty';
+connect conn1$type, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'trx1unprepared';
+INSERT INTO t set a=0;
+XA END 'trx1unprepared';
+INSERT INTO t set a=0;
+ERROR XAE07: XAER_RMFAIL: The command cannot be executed when global transaction is in the IDLE state
+XA START 'trx1unprepared';
+ERROR XAE07: XAER_RMFAIL: The command cannot be executed when global transaction is in the IDLE state
+XA START 'trx1unprepared';
+ERROR XAE07: XAER_RMFAIL: The command cannot be executed when global transaction is in the IDLE state
+disconnect conn1unprepared;
+connection default;
+XA COMMIT 'trx1unprepared';
+ERROR XAE04: XAER_NOTA: Unknown XID
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+XA START 'trx_0';
+INSERT INTO t SET a=0;
+XA END 'trx_0';
+XA PREPARE 'trx_0';
+disconnect conn0;
+connection default;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+SET @@binlog_format = ROW;
+XA START 'trx_1';
+INSERT INTO t SET a=1;
+XA END 'trx_1';
+XA PREPARE 'trx_1';
+disconnect conn1;
+connection default;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+XA START 'trx_2';
+INSERT INTO t SET a=2;
+XA END 'trx_2';
+XA PREPARE 'trx_2';
+disconnect conn2;
+connection default;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+SET @@binlog_format = ROW;
+XA START 'trx_3';
+INSERT INTO t SET a=3;
+XA END 'trx_3';
+XA PREPARE 'trx_3';
+disconnect conn3;
+connection default;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+XA START 'trx_4';
+INSERT INTO t SET a=4;
+XA END 'trx_4';
+XA PREPARE 'trx_4';
+disconnect conn4;
+connection default;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+SET @@binlog_format = ROW;
+XA START 'trx_5';
+INSERT INTO t SET a=5;
+XA END 'trx_5';
+XA PREPARE 'trx_5';
+disconnect conn5;
+connection default;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+XA START 'trx_6';
+INSERT INTO t SET a=6;
+XA END 'trx_6';
+XA PREPARE 'trx_6';
+disconnect conn6;
+connection default;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+SET @@binlog_format = ROW;
+XA START 'trx_7';
+INSERT INTO t SET a=7;
+XA END 'trx_7';
+XA PREPARE 'trx_7';
+disconnect conn7;
+connection default;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+XA START 'trx_8';
+INSERT INTO t SET a=8;
+XA END 'trx_8';
+XA PREPARE 'trx_8';
+disconnect conn8;
+connection default;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+SET @@binlog_format = ROW;
+XA START 'trx_9';
+INSERT INTO t SET a=9;
+XA END 'trx_9';
+XA PREPARE 'trx_9';
+disconnect conn9;
+connection default;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+XA START 'trx_10';
+INSERT INTO t SET a=10;
+XA END 'trx_10';
+XA PREPARE 'trx_10';
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+SET @@binlog_format = ROW;
+XA START 'trx_11';
+INSERT INTO t SET a=11;
+XA END 'trx_11';
+XA PREPARE 'trx_11';
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+XA START 'trx_12';
+INSERT INTO t SET a=12;
+XA END 'trx_12';
+XA PREPARE 'trx_12';
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+SET @@binlog_format = ROW;
+XA START 'trx_13';
+INSERT INTO t SET a=13;
+XA END 'trx_13';
+XA PREPARE 'trx_13';
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+XA START 'trx_14';
+INSERT INTO t SET a=14;
+XA END 'trx_14';
+XA PREPARE 'trx_14';
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+SET @@binlog_format = ROW;
+XA START 'trx_15';
+INSERT INTO t SET a=15;
+XA END 'trx_15';
+XA PREPARE 'trx_15';
+connection default;
+KILL CONNECTION CONN_ID;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+XA START 'trx_16';
+INSERT INTO t SET a=16;
+XA END 'trx_16';
+XA PREPARE 'trx_16';
+connection default;
+KILL CONNECTION CONN_ID;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+SET @@binlog_format = ROW;
+XA START 'trx_17';
+INSERT INTO t SET a=17;
+XA END 'trx_17';
+XA PREPARE 'trx_17';
+connection default;
+KILL CONNECTION CONN_ID;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+XA START 'trx_18';
+INSERT INTO t SET a=18;
+XA END 'trx_18';
+XA PREPARE 'trx_18';
+connection default;
+KILL CONNECTION CONN_ID;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+SET @@binlog_format = ROW;
+XA START 'trx_19';
+INSERT INTO t SET a=19;
+XA END 'trx_19';
+XA PREPARE 'trx_19';
+connection default;
+KILL CONNECTION CONN_ID;
+connection default;
+XA ROLLBACK 'trx_0';
+XA ROLLBACK 'trx_1';
+XA ROLLBACK 'trx_2';
+XA ROLLBACK 'trx_3';
+XA ROLLBACK 'trx_4';
+XA COMMIT 'trx_5';
+XA COMMIT 'trx_6';
+XA COMMIT 'trx_7';
+XA COMMIT 'trx_8';
+XA COMMIT 'trx_9';
+# restart
+connect conn_restart_$k, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'new_trx_0';
+INSERT INTO t SET a=0;
+XA END 'new_trx_0';
+XA PREPARE 'new_trx_0';
+disconnect conn_restart_0;
+connection default;
+connect conn_restart_$k, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'new_trx_1';
+INSERT INTO t SET a=1;
+XA END 'new_trx_1';
+XA PREPARE 'new_trx_1';
+disconnect conn_restart_1;
+connection default;
+connect conn_restart_$k, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'new_trx_2';
+INSERT INTO t SET a=2;
+XA END 'new_trx_2';
+XA PREPARE 'new_trx_2';
+disconnect conn_restart_2;
+connection default;
+connect conn_restart_$k, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'new_trx_3';
+INSERT INTO t SET a=3;
+XA END 'new_trx_3';
+XA PREPARE 'new_trx_3';
+disconnect conn_restart_3;
+connection default;
+connect conn_restart_$k, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'new_trx_4';
+INSERT INTO t SET a=4;
+XA END 'new_trx_4';
+XA PREPARE 'new_trx_4';
+disconnect conn_restart_4;
+connection default;
+connect conn_restart_$k, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'new_trx_5';
+INSERT INTO t SET a=5;
+XA END 'new_trx_5';
+XA PREPARE 'new_trx_5';
+disconnect conn_restart_5;
+connection default;
+connect conn_restart_$k, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'new_trx_6';
+INSERT INTO t SET a=6;
+XA END 'new_trx_6';
+XA PREPARE 'new_trx_6';
+disconnect conn_restart_6;
+connection default;
+connect conn_restart_$k, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'new_trx_7';
+INSERT INTO t SET a=7;
+XA END 'new_trx_7';
+XA PREPARE 'new_trx_7';
+disconnect conn_restart_7;
+connection default;
+connect conn_restart_$k, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'new_trx_8';
+INSERT INTO t SET a=8;
+XA END 'new_trx_8';
+XA PREPARE 'new_trx_8';
+disconnect conn_restart_8;
+connection default;
+connect conn_restart_$k, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'new_trx_9';
+INSERT INTO t SET a=9;
+XA END 'new_trx_9';
+XA PREPARE 'new_trx_9';
+disconnect conn_restart_9;
+connection default;
+connection default;
+XA COMMIT 'new_trx_0';
+XA COMMIT 'new_trx_1';
+XA COMMIT 'new_trx_2';
+XA COMMIT 'new_trx_3';
+XA COMMIT 'new_trx_4';
+XA COMMIT 'new_trx_5';
+XA COMMIT 'new_trx_6';
+XA COMMIT 'new_trx_7';
+XA COMMIT 'new_trx_8';
+XA COMMIT 'new_trx_9';
+XA START 'trx_10';
+ERROR XAE08: XAER_DUPID: The XID already exists
+XA COMMIT 'trx_10';
+XA START 'trx_11';
+ERROR XAE08: XAER_DUPID: The XID already exists
+XA COMMIT 'trx_11';
+XA START 'trx_12';
+ERROR XAE08: XAER_DUPID: The XID already exists
+XA COMMIT 'trx_12';
+XA START 'trx_13';
+ERROR XAE08: XAER_DUPID: The XID already exists
+XA COMMIT 'trx_13';
+XA START 'trx_14';
+ERROR XAE08: XAER_DUPID: The XID already exists
+XA COMMIT 'trx_14';
+XA START 'trx_15';
+ERROR XAE08: XAER_DUPID: The XID already exists
+XA ROLLBACK 'trx_15';
+XA START 'trx_16';
+ERROR XAE08: XAER_DUPID: The XID already exists
+XA ROLLBACK 'trx_16';
+XA START 'trx_17';
+ERROR XAE08: XAER_DUPID: The XID already exists
+XA ROLLBACK 'trx_17';
+XA START 'trx_18';
+ERROR XAE08: XAER_DUPID: The XID already exists
+XA ROLLBACK 'trx_18';
+XA START 'trx_19';
+ERROR XAE08: XAER_DUPID: The XID already exists
+XA ROLLBACK 'trx_19';
+SELECT * FROM t;
+a
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+0
+1
+2
+3
+4
+5
+6
+7
+8
+9
+disconnect conn2tmp;
+disconnect conn3tmp;
+disconnect conn2ro;
+disconnect conn3ro;
+disconnect conn2empty;
+disconnect conn3empty;
+connection default;
+XA ROLLBACK 'trx_20';
+ERROR XAE04: XAER_NOTA: Unknown XID
+disconnect conn19;
+connection default;
+XA ROLLBACK 'trx_19';
+ERROR XAE04: XAER_NOTA: Unknown XID
+disconnect conn18;
+connection default;
+XA ROLLBACK 'trx_18';
+ERROR XAE04: XAER_NOTA: Unknown XID
+disconnect conn17;
+connection default;
+XA ROLLBACK 'trx_17';
+ERROR XAE04: XAER_NOTA: Unknown XID
+disconnect conn16;
+connection default;
+XA ROLLBACK 'trx_16';
+ERROR XAE04: XAER_NOTA: Unknown XID
+disconnect conn15;
+connection default;
+XA ROLLBACK 'trx_15';
+ERROR XAE04: XAER_NOTA: Unknown XID
+disconnect conn14;
+connection default;
+XA ROLLBACK 'trx_14';
+ERROR XAE04: XAER_NOTA: Unknown XID
+disconnect conn13;
+connection default;
+XA ROLLBACK 'trx_13';
+ERROR XAE04: XAER_NOTA: Unknown XID
+disconnect conn12;
+connection default;
+XA ROLLBACK 'trx_12';
+ERROR XAE04: XAER_NOTA: Unknown XID
+disconnect conn11;
+connection default;
+XA ROLLBACK 'trx_11';
+ERROR XAE04: XAER_NOTA: Unknown XID
+disconnect conn10;
+connect conn$index$type, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@sql_log_bin = OFF;
+CREATE TEMPORARY TABLE tmp1 (a int) ENGINE=innodb;
+XA START 'trx1tmp';
+INSERT INTO tmp1 SET a=1;
+XA END 'trx1tmp';
+XA PREPARE 'trx1tmp';
+connect conn$index$type, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@sql_log_bin = OFF;
+CREATE TEMPORARY TABLE tmp1 (a int) ENGINE=innodb;
+XA START 'trx2tmp';
+INSERT INTO tmp1 SET a=1;
+XA END 'trx2tmp';
+XA PREPARE 'trx2tmp';
+connect conn$index$type, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@sql_log_bin = OFF;
+CREATE TEMPORARY TABLE tmp1 (a int) ENGINE=innodb;
+XA START 'trx3tmp';
+INSERT INTO tmp1 SET a=1;
+XA END 'trx3tmp';
+XA PREPARE 'trx3tmp';
+connection default;
+XA COMMIT 'trx1tmp';
+ERROR XAE04: XAER_NOTA: Unknown XID
+XA ROLLBACK 'trx1tmp';
+ERROR XAE04: XAER_NOTA: Unknown XID
+XA START 'trx1tmp';
+ERROR XAE08: XAER_DUPID: The XID already exists
+connection default;
+*** 3 prepared transactions must be in the list ***
+XA RECOVER;
+formatID gtrid_length bqual_length data
+1 LEN1 LEN2 TRX_N
+1 LEN1 LEN2 TRX_N
+1 LEN1 LEN2 TRX_N
+connection conn1tmp;
+disconnect conn1tmp;
+connection default;
+XA COMMIT 'trx1tmp';
+KILL connection CONN_ID;
+XA COMMIT 'trx3tmp';
+connect conn$index$type, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'trx1ro';
+SELECT * from t ORDER BY a;
+a
+0
+1
+2
+3
+4
+5
+5
+6
+6
+7
+7
+8
+8
+9
+9
+10
+11
+12
+13
+14
+XA END 'trx1ro';
+XA PREPARE 'trx1ro';
+connect conn$index$type, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'trx2ro';
+SELECT * from t ORDER BY a;
+a
+0
+1
+2
+3
+4
+5
+5
+6
+6
+7
+7
+8
+8
+9
+9
+10
+11
+12
+13
+14
+XA END 'trx2ro';
+XA PREPARE 'trx2ro';
+connect conn$index$type, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'trx3ro';
+SELECT * from t ORDER BY a;
+a
+0
+1
+2
+3
+4
+5
+5
+6
+6
+7
+7
+8
+8
+9
+9
+10
+11
+12
+13
+14
+XA END 'trx3ro';
+XA PREPARE 'trx3ro';
+connection default;
+*** 4 prepared transactions must be in the list ***
+XA RECOVER;
+formatID gtrid_length bqual_length data
+1 LEN1 LEN2 TRX_N
+1 LEN1 LEN2 TRX_N
+1 LEN1 LEN2 TRX_N
+1 LEN1 LEN2 TRX_N
+connection conn1ro;
+disconnect conn1ro;
+connection default;
+XA ROLLBACK 'trx1ro';
+KILL connection CONN_ID;
+XA ROLLBACK 'trx3ro';
+connect conn$index$type, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'trx1empty';
+XA END 'trx1empty';
+XA PREPARE 'trx1empty';
+connect conn$index$type, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'trx2empty';
+XA END 'trx2empty';
+XA PREPARE 'trx2empty';
+connect conn$index$type, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'trx3empty';
+XA END 'trx3empty';
+XA PREPARE 'trx3empty';
+connection default;
+*** 5 prepared transactions must be in the list ***
+XA RECOVER;
+formatID gtrid_length bqual_length data
+1 LEN1 LEN2 TRX_N
+1 LEN1 LEN2 TRX_N
+1 LEN1 LEN2 TRX_N
+1 LEN1 LEN2 TRX_N
+1 LEN1 LEN2 TRX_N
+connection conn1empty;
+disconnect conn1empty;
+connection default;
+XA COMMIT 'trx1empty';
+KILL connection CONN_ID;
+XA COMMIT 'trx3empty';
+connect conn1$type, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'trx1unprepared';
+INSERT INTO t set a=0;
+XA END 'trx1unprepared';
+INSERT INTO t set a=0;
+ERROR XAE07: XAER_RMFAIL: The command cannot be executed when global transaction is in the IDLE state
+XA START 'trx1unprepared';
+ERROR XAE07: XAER_RMFAIL: The command cannot be executed when global transaction is in the IDLE state
+XA START 'trx1unprepared';
+ERROR XAE07: XAER_RMFAIL: The command cannot be executed when global transaction is in the IDLE state
+disconnect conn1unprepared;
+connection default;
+XA COMMIT 'trx1unprepared';
+ERROR XAE04: XAER_NOTA: Unknown XID
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+XA START 'trx_0';
+INSERT INTO t SET a=0;
+XA END 'trx_0';
+XA PREPARE 'trx_0';
+disconnect conn0;
+connection default;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+SET @@binlog_format = ROW;
+XA START 'trx_1';
+INSERT INTO t SET a=1;
+XA END 'trx_1';
+XA PREPARE 'trx_1';
+disconnect conn1;
+connection default;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+XA START 'trx_2';
+INSERT INTO t SET a=2;
+XA END 'trx_2';
+XA PREPARE 'trx_2';
+disconnect conn2;
+connection default;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+SET @@binlog_format = ROW;
+XA START 'trx_3';
+INSERT INTO t SET a=3;
+XA END 'trx_3';
+XA PREPARE 'trx_3';
+disconnect conn3;
+connection default;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+XA START 'trx_4';
+INSERT INTO t SET a=4;
+XA END 'trx_4';
+XA PREPARE 'trx_4';
+disconnect conn4;
+connection default;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+SET @@binlog_format = ROW;
+XA START 'trx_5';
+INSERT INTO t SET a=5;
+XA END 'trx_5';
+XA PREPARE 'trx_5';
+disconnect conn5;
+connection default;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+XA START 'trx_6';
+INSERT INTO t SET a=6;
+XA END 'trx_6';
+XA PREPARE 'trx_6';
+disconnect conn6;
+connection default;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+SET @@binlog_format = ROW;
+XA START 'trx_7';
+INSERT INTO t SET a=7;
+XA END 'trx_7';
+XA PREPARE 'trx_7';
+disconnect conn7;
+connection default;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+XA START 'trx_8';
+INSERT INTO t SET a=8;
+XA END 'trx_8';
+XA PREPARE 'trx_8';
+disconnect conn8;
+connection default;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+SET @@binlog_format = ROW;
+XA START 'trx_9';
+INSERT INTO t SET a=9;
+XA END 'trx_9';
+XA PREPARE 'trx_9';
+disconnect conn9;
+connection default;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+XA START 'trx_10';
+INSERT INTO t SET a=10;
+XA END 'trx_10';
+XA PREPARE 'trx_10';
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+SET @@binlog_format = ROW;
+XA START 'trx_11';
+INSERT INTO t SET a=11;
+XA END 'trx_11';
+XA PREPARE 'trx_11';
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+XA START 'trx_12';
+INSERT INTO t SET a=12;
+XA END 'trx_12';
+XA PREPARE 'trx_12';
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+SET @@binlog_format = ROW;
+XA START 'trx_13';
+INSERT INTO t SET a=13;
+XA END 'trx_13';
+XA PREPARE 'trx_13';
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+XA START 'trx_14';
+INSERT INTO t SET a=14;
+XA END 'trx_14';
+XA PREPARE 'trx_14';
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+SET @@binlog_format = ROW;
+XA START 'trx_15';
+INSERT INTO t SET a=15;
+XA END 'trx_15';
+XA PREPARE 'trx_15';
+connection default;
+KILL CONNECTION CONN_ID;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+XA START 'trx_16';
+INSERT INTO t SET a=16;
+XA END 'trx_16';
+XA PREPARE 'trx_16';
+connection default;
+KILL CONNECTION CONN_ID;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+SET @@binlog_format = ROW;
+XA START 'trx_17';
+INSERT INTO t SET a=17;
+XA END 'trx_17';
+XA PREPARE 'trx_17';
+connection default;
+KILL CONNECTION CONN_ID;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+XA START 'trx_18';
+INSERT INTO t SET a=18;
+XA END 'trx_18';
+XA PREPARE 'trx_18';
+connection default;
+KILL CONNECTION CONN_ID;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+SET @@binlog_format = ROW;
+XA START 'trx_19';
+INSERT INTO t SET a=19;
+XA END 'trx_19';
+XA PREPARE 'trx_19';
+connection default;
+KILL CONNECTION CONN_ID;
+connection default;
+XA ROLLBACK 'trx_0';
+XA ROLLBACK 'trx_1';
+XA ROLLBACK 'trx_2';
+XA ROLLBACK 'trx_3';
+XA ROLLBACK 'trx_4';
+XA COMMIT 'trx_5';
+XA COMMIT 'trx_6';
+XA COMMIT 'trx_7';
+XA COMMIT 'trx_8';
+XA COMMIT 'trx_9';
+# Kill and restart
+connect conn_restart_$k, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'new_trx_0';
+INSERT INTO t SET a=0;
+XA END 'new_trx_0';
+XA PREPARE 'new_trx_0';
+disconnect conn_restart_0;
+connection default;
+connect conn_restart_$k, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'new_trx_1';
+INSERT INTO t SET a=1;
+XA END 'new_trx_1';
+XA PREPARE 'new_trx_1';
+disconnect conn_restart_1;
+connection default;
+connect conn_restart_$k, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'new_trx_2';
+INSERT INTO t SET a=2;
+XA END 'new_trx_2';
+XA PREPARE 'new_trx_2';
+disconnect conn_restart_2;
+connection default;
+connect conn_restart_$k, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'new_trx_3';
+INSERT INTO t SET a=3;
+XA END 'new_trx_3';
+XA PREPARE 'new_trx_3';
+disconnect conn_restart_3;
+connection default;
+connect conn_restart_$k, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'new_trx_4';
+INSERT INTO t SET a=4;
+XA END 'new_trx_4';
+XA PREPARE 'new_trx_4';
+disconnect conn_restart_4;
+connection default;
+connect conn_restart_$k, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'new_trx_5';
+INSERT INTO t SET a=5;
+XA END 'new_trx_5';
+XA PREPARE 'new_trx_5';
+disconnect conn_restart_5;
+connection default;
+connect conn_restart_$k, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'new_trx_6';
+INSERT INTO t SET a=6;
+XA END 'new_trx_6';
+XA PREPARE 'new_trx_6';
+disconnect conn_restart_6;
+connection default;
+connect conn_restart_$k, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'new_trx_7';
+INSERT INTO t SET a=7;
+XA END 'new_trx_7';
+XA PREPARE 'new_trx_7';
+disconnect conn_restart_7;
+connection default;
+connect conn_restart_$k, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'new_trx_8';
+INSERT INTO t SET a=8;
+XA END 'new_trx_8';
+XA PREPARE 'new_trx_8';
+disconnect conn_restart_8;
+connection default;
+connect conn_restart_$k, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'new_trx_9';
+INSERT INTO t SET a=9;
+XA END 'new_trx_9';
+XA PREPARE 'new_trx_9';
+disconnect conn_restart_9;
+connection default;
+connection default;
+XA COMMIT 'new_trx_0';
+XA COMMIT 'new_trx_1';
+XA COMMIT 'new_trx_2';
+XA COMMIT 'new_trx_3';
+XA COMMIT 'new_trx_4';
+XA COMMIT 'new_trx_5';
+XA COMMIT 'new_trx_6';
+XA COMMIT 'new_trx_7';
+XA COMMIT 'new_trx_8';
+XA COMMIT 'new_trx_9';
+XA START 'trx_10';
+ERROR XAE08: XAER_DUPID: The XID already exists
+XA COMMIT 'trx_10';
+XA START 'trx_11';
+ERROR XAE08: XAER_DUPID: The XID already exists
+XA COMMIT 'trx_11';
+XA START 'trx_12';
+ERROR XAE08: XAER_DUPID: The XID already exists
+XA COMMIT 'trx_12';
+XA START 'trx_13';
+ERROR XAE08: XAER_DUPID: The XID already exists
+XA COMMIT 'trx_13';
+XA START 'trx_14';
+ERROR XAE08: XAER_DUPID: The XID already exists
+XA COMMIT 'trx_14';
+XA START 'trx_15';
+ERROR XAE08: XAER_DUPID: The XID already exists
+XA ROLLBACK 'trx_15';
+XA START 'trx_16';
+ERROR XAE08: XAER_DUPID: The XID already exists
+XA ROLLBACK 'trx_16';
+XA START 'trx_17';
+ERROR XAE08: XAER_DUPID: The XID already exists
+XA ROLLBACK 'trx_17';
+XA START 'trx_18';
+ERROR XAE08: XAER_DUPID: The XID already exists
+XA ROLLBACK 'trx_18';
+XA START 'trx_19';
+ERROR XAE08: XAER_DUPID: The XID already exists
+XA ROLLBACK 'trx_19';
+SELECT * FROM t;
+a
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+0
+1
+2
+3
+4
+5
+6
+7
+8
+9
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+0
+1
+2
+3
+4
+5
+6
+7
+8
+9
+disconnect conn2tmp;
+disconnect conn3tmp;
+disconnect conn2ro;
+disconnect conn3ro;
+disconnect conn2empty;
+disconnect conn3empty;
+connection default;
+XA ROLLBACK 'trx_20';
+ERROR XAE04: XAER_NOTA: Unknown XID
+disconnect conn19;
+connection default;
+XA ROLLBACK 'trx_19';
+ERROR XAE04: XAER_NOTA: Unknown XID
+disconnect conn18;
+connection default;
+XA ROLLBACK 'trx_18';
+ERROR XAE04: XAER_NOTA: Unknown XID
+disconnect conn17;
+connection default;
+XA ROLLBACK 'trx_17';
+ERROR XAE04: XAER_NOTA: Unknown XID
+disconnect conn16;
+connection default;
+XA ROLLBACK 'trx_16';
+ERROR XAE04: XAER_NOTA: Unknown XID
+disconnect conn15;
+connection default;
+XA ROLLBACK 'trx_15';
+ERROR XAE04: XAER_NOTA: Unknown XID
+disconnect conn14;
+connection default;
+XA ROLLBACK 'trx_14';
+ERROR XAE04: XAER_NOTA: Unknown XID
+disconnect conn13;
+connection default;
+XA ROLLBACK 'trx_13';
+ERROR XAE04: XAER_NOTA: Unknown XID
+disconnect conn12;
+connection default;
+XA ROLLBACK 'trx_12';
+ERROR XAE04: XAER_NOTA: Unknown XID
+disconnect conn11;
+connection default;
+XA ROLLBACK 'trx_11';
+ERROR XAE04: XAER_NOTA: Unknown XID
+disconnect conn10;
+connection default;
+XA START 'one_phase_trx_0';
+INSERT INTO t SET a=0;
+XA END 'one_phase_trx_0';
+XA COMMIT 'one_phase_trx_0' ONE PHASE;
+XA START 'one_phase_trx_1';
+INSERT INTO t SET a=1;
+XA END 'one_phase_trx_1';
+XA COMMIT 'one_phase_trx_1' ONE PHASE;
+XA START 'one_phase_trx_2';
+INSERT INTO t SET a=2;
+XA END 'one_phase_trx_2';
+XA COMMIT 'one_phase_trx_2' ONE PHASE;
+XA START 'one_phase_trx_3';
+INSERT INTO t SET a=3;
+XA END 'one_phase_trx_3';
+XA COMMIT 'one_phase_trx_3' ONE PHASE;
+XA START 'one_phase_trx_4';
+INSERT INTO t SET a=4;
+XA END 'one_phase_trx_4';
+XA COMMIT 'one_phase_trx_4' ONE PHASE;
+SELECT SUM(a) FROM t;
+SUM(a)
+290
+DROP TABLE t;
+DROP VIEW v_processlist;
+All transactions must be completed, to empty-list the following:
+XA RECOVER;
+formatID gtrid_length bqual_length data
diff --git a/mysql-test/main/xa_prepared_binlog_off.test b/mysql-test/main/xa_prepared_binlog_off.test
new file mode 100644
index 00000000000..edbfa7c2825
--- /dev/null
+++ b/mysql-test/main/xa_prepared_binlog_off.test
@@ -0,0 +1,11 @@
+###############################################################################
+# MDEV-7974 (bug#12161 Xa recovery and client disconnection)
+# Testing XA behaviour with binlog turned off.
+###############################################################################
+
+--source include/not_valgrind.inc
+--source include/not_embedded.inc
+
+# Common part with XA binlogging testing
+call mtr.add_suppression("You need to use --log-bin to make --log-slave-updates work.");
+--source suite/binlog/t/binlog_xa_prepared.inc
diff --git a/mysql-test/main/xa_sync.result b/mysql-test/main/xa_sync.result
index 1482ff5cacf..e7dd9b02847 100644
--- a/mysql-test/main/xa_sync.result
+++ b/mysql-test/main/xa_sync.result
@@ -18,6 +18,11 @@ disconnect con1;
SET debug_sync='now SIGNAL go';
connection con2;
ERROR XAE04: XAER_NOTA: Unknown XID
+*** Must have 'xatest' in the list
+XA RECOVER;
+formatID gtrid_length bqual_length data
+1 6 0 xatest
+XA COMMIT 'xatest';
disconnect con2;
connection default;
SET debug_sync='RESET';
@@ -37,6 +42,11 @@ disconnect con1;
SET debug_sync='now SIGNAL go';
connection con2;
ERROR XAE04: XAER_NOTA: Unknown XID
+*** Must have 'xatest' in the list
+XA RECOVER;
+formatID gtrid_length bqual_length data
+1 6 0 xatest
+XA ROLLBACK 'xatest';
disconnect con2;
connection default;
SET debug_sync='RESET';
diff --git a/mysql-test/main/xa_sync.test b/mysql-test/main/xa_sync.test
index bb95af7c0ba..ad1243ce6f8 100644
--- a/mysql-test/main/xa_sync.test
+++ b/mysql-test/main/xa_sync.test
@@ -35,6 +35,11 @@ while ($i)
connection con2;
--error ER_XAER_NOTA
reap;
+ --echo *** Must have 'xatest' in the list
+ XA RECOVER;
+ # second time yields no error
+ --error 0,1402
+ --eval $op
disconnect con2;
connection default;
diff --git a/mysql-test/main/xml.result b/mysql-test/main/xml.result
index 14abf503b18..efaca961b4a 100644
--- a/mysql-test/main/xml.result
+++ b/mysql-test/main/xml.result
@@ -1309,3 +1309,16 @@ DROP TABLE t1;
#
# End of 10.2 tests
#
+#
+# Start of 10.5 tests
+#
+#
+# MDEV-20818 ER_CRASHED_ON_USAGE or Assertion `length <= column->length' failed in write_block_record on temporary table
+#
+SELECT 'foo' AS f UNION SELECT BINARY( UpdateXML('<a></a>', '/a', '<b></b>')) AS f;
+f
+foo
+<b></b>
+#
+# Start of 10.5 tests
+#
diff --git a/mysql-test/main/xml.test b/mysql-test/main/xml.test
index b567f03a431..3c7ecf6d060 100644
--- a/mysql-test/main/xml.test
+++ b/mysql-test/main/xml.test
@@ -782,3 +782,17 @@ DROP TABLE t1;
--echo #
--echo # End of 10.2 tests
--echo #
+
+--echo #
+--echo # Start of 10.5 tests
+--echo #
+
+--echo #
+--echo # MDEV-20818 ER_CRASHED_ON_USAGE or Assertion `length <= column->length' failed in write_block_record on temporary table
+--echo #
+
+SELECT 'foo' AS f UNION SELECT BINARY( UpdateXML('<a></a>', '/a', '<b></b>')) AS f;
+
+--echo #
+--echo # Start of 10.5 tests
+--echo #
diff --git a/mysql-test/main/xtradb_mrr.result b/mysql-test/main/xtradb_mrr.result
index 2f18a7c287f..34fd8300423 100644
--- a/mysql-test/main/xtradb_mrr.result
+++ b/mysql-test/main/xtradb_mrr.result
@@ -1,6 +1,6 @@
drop table if exists t1,t2,t3,t4;
-set @save_storage_engine= @@storage_engine;
-set storage_engine=InnoDB;
+set @save_storage_engine= @@default_storage_engine;
+set default_storage_engine=InnoDB;
set @innodb_mrr_tmp=@@optimizer_switch;
set optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
create table t1(a int);
@@ -296,7 +296,7 @@ NULL 7 0
NULL 9 0
NULL 9 0
drop table t1, t2;
-set storage_engine= @save_storage_engine;
+set default_storage_engine= @save_storage_engine;
set @mrr_buffer_size_save= @@mrr_buffer_size;
set mrr_buffer_size=64;
Warnings:
diff --git a/mysql-test/main/xtradb_mrr.test b/mysql-test/main/xtradb_mrr.test
index 8dccd20796f..9de9b192b06 100644
--- a/mysql-test/main/xtradb_mrr.test
+++ b/mysql-test/main/xtradb_mrr.test
@@ -4,15 +4,15 @@
drop table if exists t1,t2,t3,t4;
--enable_warnings
-set @save_storage_engine= @@storage_engine;
-set storage_engine=InnoDB;
+set @save_storage_engine= @@default_storage_engine;
+set default_storage_engine=InnoDB;
set @innodb_mrr_tmp=@@optimizer_switch;
set optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
--source include/mrr_tests.inc
-set storage_engine= @save_storage_engine;
+set default_storage_engine= @save_storage_engine;
# Try big rowid sizes
set @mrr_buffer_size_save= @@mrr_buffer_size;
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index 595fa2a2722..dbe5fc4d650 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -2,7 +2,7 @@
# -*- cperl -*-
# Copyright (c) 2004, 2014, Oracle and/or its affiliates.
-# Copyright (c) 2009, 2020, MariaDB Corporation
+# Copyright (c) 2009, 2021, MariaDB Corporation
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -77,7 +77,6 @@ BEGIN {
use lib "lib";
use Cwd ;
-use Cwd 'realpath';
use Getopt::Long;
use My::File::Path; # Patched version of File::Path
use File::Basename;
@@ -103,6 +102,8 @@ use IO::Socket::INET;
use IO::Select;
use Time::HiRes qw(gettimeofday);
+sub realpath($) { (IS_WINDOWS) ? $_[0] : Cwd::realpath($_[0]) }
+
require "mtr_process.pl";
require "mtr_io.pl";
require "mtr_gprof.pl";
@@ -132,7 +133,7 @@ our $default_vardir;
our $opt_vardir; # Path to use for var/ dir
our $plugindir;
our $opt_xml_report; # XML output
-
+our $client_plugindir;
my $path_vardir_trace; # unix formatted opt_vardir for trace files
my $opt_tmpdir; # Path to use for tmp/ dir
my $opt_tmpdir_pid;
@@ -176,6 +177,7 @@ my @DEFAULT_SUITES= qw(
archive-
binlog-
binlog_encryption-
+ client-
csv-
compat/oracle-
compat/mssql-
@@ -190,6 +192,7 @@ my @DEFAULT_SUITES= qw(
innodb-
innodb_fts-
innodb_gis-
+ innodb_i_s-
innodb_zip-
json-
maria-
@@ -219,6 +222,7 @@ our $exe_mysqladmin;
our $exe_mysqltest;
our $exe_libtool;
our $exe_mysql_embedded;
+our $exe_mariadb_conv;
our $opt_big_test= 0;
our $opt_staging_run= 0;
@@ -1426,7 +1430,7 @@ sub command_line_setup {
my $vardir_location= (defined $ENV{MTR_BINDIR}
? "$ENV{MTR_BINDIR}/mysql-test"
: $glob_mysql_test_dir);
- $vardir_location= realpath $vardir_location unless IS_WINDOWS;
+ $vardir_location= realpath $vardir_location;
$default_vardir= "$vardir_location/var";
if ( ! $opt_vardir )
@@ -1527,6 +1531,20 @@ sub command_line_setup {
mtr_error("Coverage test needs the source - please use source dist");
}
+ $ENV{ASAN_OPTIONS}= "abort_on_error=1:" . ($ENV{ASAN_OPTIONS} || '');
+ $ENV{ASAN_OPTIONS}= "suppressions=${glob_mysql_test_dir}/asan.supp:" .
+ $ENV{ASAN_OPTIONS}
+ if -f "$glob_mysql_test_dir/asan.supp" and not IS_WINDOWS;
+ # The following can be useful when a test fails without any asan report
+ # on stderr like with openssl_1.test
+ # $ENV{ASAN_OPTIONS}= "log_path=${opt_vardir}/log/asan:" . $ENV{ASAN_OPTIONS};
+
+ # Add leak suppressions
+ $ENV{LSAN_OPTIONS}= "suppressions=${glob_mysql_test_dir}/lsan.supp:print_suppressions=0"
+ if -f "$glob_mysql_test_dir/lsan.supp" and not IS_WINDOWS;
+
+ mtr_verbose("ASAN_OPTIONS=$ENV{ASAN_OPTIONS}");
+
# --------------------------------------------------------------------------
# Modified behavior with --start options
# --------------------------------------------------------------------------
@@ -1782,7 +1800,7 @@ sub find_mysqld {
my ($mysqld_basedir)= $ENV{MTR_BINDIR}|| @_;
- my @mysqld_names= ("mysqld", "mysqld-max-nt", "mysqld-max",
+ my @mysqld_names= ("mariadbd", "mysqld", "mysqld-max-nt", "mysqld-max",
"mysqld-nt");
if ( $opt_debug_server ){
@@ -1805,6 +1823,7 @@ sub executable_setup () {
$exe_mysqladmin= mtr_exe_exists("$path_client_bindir/mysqladmin");
$exe_mysql= mtr_exe_exists("$path_client_bindir/mysql");
$exe_mysql_plugin= mtr_exe_exists("$path_client_bindir/mysql_plugin");
+ $exe_mariadb_conv= mtr_exe_exists("$path_client_bindir/mariadb-conv");
$exe_mysql_embedded= mtr_exe_maybe_exists("$basedir/libmysqld/examples/mysql_embedded");
@@ -2049,6 +2068,7 @@ sub environment_setup {
$ENV{'DEFAULT_MASTER_PORT'}= $mysqld_variables{'port'};
$ENV{'MYSQL_TMP_DIR'}= $opt_tmpdir;
$ENV{'MYSQLTEST_VARDIR'}= $opt_vardir;
+ $ENV{'MYSQLTEST_REAL_VARDIR'}= realpath $opt_vardir;
$ENV{'MYSQL_BINDIR'}= $bindir;
$ENV{'MYSQL_SHAREDIR'}= $path_language;
$ENV{'MYSQL_CHARSETSDIR'}= $path_charsetsdir;
@@ -2089,6 +2109,7 @@ sub environment_setup {
$ENV{'EXE_MYSQL'}= $exe_mysql;
$ENV{'MYSQL_PLUGIN'}= $exe_mysql_plugin;
$ENV{'MYSQL_EMBEDDED'}= $exe_mysql_embedded;
+ $ENV{'MARIADB_CONV'}= $exe_mariadb_conv;
if(IS_WINDOWS)
{
$ENV{'MYSQL_INSTALL_DB_EXE'}= mtr_exe_exists("$bindir/sql$opt_vs_config/mysql_install_db",
@@ -2385,12 +2406,15 @@ sub setup_vardir() {
# and make them world readable
copytree("$glob_mysql_test_dir/std_data", "$opt_vardir/std_data", "0022");
- # create a plugin dir and copy or symlink plugins into it
unless($plugindir)
{
+ # create a plugin dir and copy or symlink plugins into it
if ($source_dist)
{
$plugindir="$opt_vardir/plugins";
+ # Source builds collect both client plugins and server plugins in the
+ # same directory.
+ $client_plugindir= $plugindir;
mkpath($plugindir);
if (IS_WINDOWS)
{
@@ -2446,10 +2470,18 @@ sub setup_vardir() {
<$bindir/lib/plugin/*.so>, # bintar
<$bindir/lib/plugin/*.dll>)
{
- my $pname=basename($_);
+ my $pname= basename($_);
set_plugin_var($pname);
- $plugindir=dirname($_) unless $plugindir;
+ $plugindir= dirname($_) unless $plugindir;
+ }
+
+ # Note: client plugins can be installed separately from server plugins,
+ # as is the case for Debian packaging.
+ for (<$bindir/lib/*/libmariadb3/plugin>)
+ {
+ $client_plugindir= $_ if <$_/*.so>;
}
+ $client_plugindir= $plugindir unless $client_plugindir;
}
}
@@ -2962,7 +2994,7 @@ sub mysql_install_db {
mtr_add_arg($args, "--loose-skip-plugin-$_") for @optional_plugins;
# starting from 10.0 bootstrap scripts require InnoDB
mtr_add_arg($args, "--loose-innodb");
- mtr_add_arg($args, "--loose-innodb-log-file-size=5M");
+ mtr_add_arg($args, "--loose-innodb-log-file-size=10M");
mtr_add_arg($args, "--disable-sync-frm");
mtr_add_arg($args, "--tmpdir=%s", "$opt_vardir/tmp/");
mtr_add_arg($args, "--core-file");
@@ -4273,7 +4305,7 @@ sub extract_warning_lines ($$) {
my @patterns =
(
- qr/^Warning|mysqld: Warning|\[Warning\]/,
+ qr/^Warning|(mysqld|mariadbd): Warning|\[Warning\]/,
qr/^Error:|\[ERROR\]/,
qr/^==\d+==\s+\S/, # valgrind errors
qr/InnoDB: Warning|InnoDB: Error/,
@@ -4348,7 +4380,7 @@ sub extract_warning_lines ($$) {
qr|Access denied for user|,
qr|Aborted connection|,
qr|table.*is full|,
- qr|\[ERROR\] mysqld: \Z|, # Warning from Aria recovery
+ qr/\[ERROR\] (mysqld|mariadbd): \Z/, # Warning from Aria recovery
qr|Linux Native AIO|, # warning that aio does not work on /dev/shm
qr|InnoDB: io_setup\(\) attempt|,
qr|InnoDB: io_setup\(\) failed with EAGAIN|,
@@ -4381,6 +4413,8 @@ sub extract_warning_lines ($$) {
qr/InnoDB: User stopword table .* does not exist./,
qr/Dump thread [0-9]+ last sent to server [0-9]+ binlog file:pos .+/,
qr/Detected table cache mutex contention at instance .* waits. Additional table cache instance cannot be activated: consider raising table_open_cache_instances. Number of active instances/,
+ qr/WSREP: Failed to guess base node address/,
+ qr/WSREP: Guessing address for incoming client/,
# for UBSAN
qr/decimal\.c.*: runtime error: signed integer overflow/,
diff --git a/mysql-test/std_data/checkDBI_DBD-mysql.pl b/mysql-test/std_data/checkDBI_DBD-MariaDB.pl
index 0c26325b715..b078342c2a0 100755
--- a/mysql-test/std_data/checkDBI_DBD-mysql.pl
+++ b/mysql-test/std_data/checkDBI_DBD-MariaDB.pl
@@ -20,7 +20,7 @@
################################################################################
#
# This perl script checks for availability of the Perl modules DBI and
-# DBD::mysql using the "current" perl interpreter.
+# DBD::MariaDB using the "current" perl interpreter.
#
# Useful for test environment checking before testing executable perl scripts
# in the MySQL Server distribution.
@@ -30,8 +30,8 @@
# support running perl scripts with such a shebang without specifying the
# perl interpreter on the command line. Such a script is mysqlhotcopy.
#
-# When run as "checkDBI_DBD-mysql.pl" the shebang line will be evaluated
-# and used. When run as "perl checkDBI_DBD-mysql.pl" the shebang line is
+# When run as "checkDBI_DBD-MariaDB.pl" the shebang line will be evaluated
+# and used. When run as "perl checkDBI_DBD-MariaDB.pl" the shebang line is
# not used.
#
# NOTE: This script will create a temporary file in MTR's tmp dir.
@@ -43,13 +43,13 @@
#
# Example:
#
-# --let $perlChecker= $MYSQLTEST_VARDIR/std_data/checkDBI_DBD-mysql.pl
-# --let $resultFile= $MYSQL_TMP_DIR/dbidbd-mysql.txt
+# --let $perlChecker= $MYSQLTEST_VARDIR/std_data/checkDBI_DBD-MariaDB.pl
+# --let $resultFile= $MYSQL_TMP_DIR/dbiDBD-MariaDB.txt
# --chmod 0755 $perlChecker
# --exec $perlChecker
# --source $resultFile
# if (!$dbidbd) {
-# --skip Test needs Perl modules DBI and DBD::mysql
+# --skip Test needs Perl modules DBI and DBD::MariaDB
# }
#
# The calling script is also responsible for cleaning up after use:
@@ -59,7 +59,7 @@
# Windows notes:
# - shebangs may work differently - call this script with "perl " in front.
#
-# See mysql-test/include/have_dbi_dbd-mysql.inc for example use of this script.
+# See mysql-test/include/have_dbi_dbd-mariadb.inc for example use of this script.
# This script should be executable for the user running MTR.
#
################################################################################
@@ -69,13 +69,13 @@ BEGIN {
# We need to catch "Can't locate" as well as "Can't load" errors.
eval{
$FOUND_DBI=0;
- $FOUND_DBD_MYSQL=0;
+ $FOUND_DBD_MARIADB=0;
# Check for DBI module:
$FOUND_DBI=1 if require DBI;
- # Check for DBD::mysql module
- $FOUND_DBD_MYSQL=1 if require DBD::mysql;
+ # Check for DBD::MariaDB module
+ $FOUND_DBD_MARIADB=1 if require DBD::MariaDB;
};
};
@@ -83,11 +83,11 @@ BEGIN {
# The file must be created whether we write to it or not, otherwise mysql-test
# will complain if trying to source it.
# An empty file indicates failure to load modules.
-open(FILE, ">", $ENV{'MYSQL_TMP_DIR'}.'/dbidbd-mysql.txt');
+open(FILE, ">", $ENV{'MYSQL_TMP_DIR'}.'/dbiDBD-MariaDB.txt');
-if ($FOUND_DBI && $FOUND_DBD_MYSQL) {
+if ($FOUND_DBI && $FOUND_DBD_MARIADB) {
# write a mysql-test command setting a variable to indicate success
- print(FILE 'let $dbidbd= FOUND_DBI_DBD-MYSQL;'."\n");
+ print(FILE 'let $dbidbd= FOUND_DBI_DBD-MARIADB;'."\n");
}
# close the file.
diff --git a/mysql-test/std_data/ldml/Index.xml b/mysql-test/std_data/ldml/Index.xml
index 0435b2ab689..c4b91535af6 100644
--- a/mysql-test/std_data/ldml/Index.xml
+++ b/mysql-test/std_data/ldml/Index.xml
@@ -362,7 +362,14 @@
<alias>iso_8859-1:1987</alias>
<alias>l1</alias>
<alias>latin1</alias>
- <collation name="latin1_test" id="99" order="test"/>
+ <!--
+ The server rejects binding an existing built-in collation
+ to a different character set through Index.xml.
+ This example tries to override cp1250_polish_ci with id 99
+ and bind it to latin1:
+ -->
+ <collation name="latin1_test_replace" id="99"/>
+ <collation name="latin1_test" id="331" order="test"/>
<collation name="latin1_test2" id="332" order="test"/>
<collation name="latin1_test2_cs" id="333"/>
<collation name="latin1_swedish_nopad2_ci" id="334" flag="nopad">
diff --git a/mysql-test/std_data/mariadb-conv/file01.utf16.txt b/mysql-test/std_data/mariadb-conv/file01.utf16.txt
new file mode 100644
index 00000000000..1ff100e48a1
--- /dev/null
+++ b/mysql-test/std_data/mariadb-conv/file01.utf16.txt
Binary files differ
diff --git a/mysql-test/std_data/mariadb-conv/file01.utf8.txt b/mysql-test/std_data/mariadb-conv/file01.utf8.txt
new file mode 100644
index 00000000000..cc065b71877
--- /dev/null
+++ b/mysql-test/std_data/mariadb-conv/file01.utf8.txt
@@ -0,0 +1,3 @@
+aaa
+xxxÑÑÑxxx
+bbb
diff --git a/mysql-test/std_data/mariadb-conv/file02.latin1.txt b/mysql-test/std_data/mariadb-conv/file02.latin1.txt
new file mode 100644
index 00000000000..28648e6f1e1
--- /dev/null
+++ b/mysql-test/std_data/mariadb-conv/file02.latin1.txt
@@ -0,0 +1,3 @@
+aaa
+xxxßßßxxx
+bbb
diff --git a/mysql-test/std_data/mariadb53_temporal/mariadb5312_datetime.frm b/mysql-test/std_data/mariadb53_temporal/mariadb5312_datetime.frm
new file mode 100644
index 00000000000..46ce80a4a08
--- /dev/null
+++ b/mysql-test/std_data/mariadb53_temporal/mariadb5312_datetime.frm
Binary files differ
diff --git a/mysql-test/std_data/mariadb53_temporal/mariadb5312_time.frm b/mysql-test/std_data/mariadb53_temporal/mariadb5312_time.frm
new file mode 100644
index 00000000000..4e466a45823
--- /dev/null
+++ b/mysql-test/std_data/mariadb53_temporal/mariadb5312_time.frm
Binary files differ
diff --git a/mysql-test/std_data/mariadb53_temporal/mariadb5312_timestamp.frm b/mysql-test/std_data/mariadb53_temporal/mariadb5312_timestamp.frm
new file mode 100644
index 00000000000..8fc153ae2f4
--- /dev/null
+++ b/mysql-test/std_data/mariadb53_temporal/mariadb5312_timestamp.frm
Binary files differ
diff --git a/mysql-test/std_data/mysql_database_10.0.dump b/mysql-test/std_data/mysql_database_10.0.dump
new file mode 100644
index 00000000000..f3c9334ab6a
--- /dev/null
+++ b/mysql-test/std_data/mysql_database_10.0.dump
@@ -0,0 +1,902 @@
+-- MySQL dump 10.15 Distrib 10.0.38-MariaDB, for Linux (x86_64)
+--
+-- Host: localhost Database: mysql
+-- ------------------------------------------------------
+-- Server version 10.0.38-MariaDB
+
+/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
+/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
+/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
+/*!40101 SET NAMES utf8 */;
+/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
+/*!40103 SET TIME_ZONE='+00:00' */;
+/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
+/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
+/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
+/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
+
+--
+-- Table structure for table `column_stats`
+--
+
+DROP TABLE IF EXISTS `column_stats`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `column_stats` (
+ `db_name` varchar(64) COLLATE utf8_bin NOT NULL,
+ `table_name` varchar(64) COLLATE utf8_bin NOT NULL,
+ `column_name` varchar(64) COLLATE utf8_bin NOT NULL,
+ `min_value` varbinary(255) DEFAULT NULL,
+ `max_value` varbinary(255) DEFAULT NULL,
+ `nulls_ratio` decimal(12,4) DEFAULT NULL,
+ `avg_length` decimal(12,4) DEFAULT NULL,
+ `avg_frequency` decimal(12,4) DEFAULT NULL,
+ `hist_size` tinyint(3) unsigned DEFAULT NULL,
+ `hist_type` enum('SINGLE_PREC_HB','DOUBLE_PREC_HB') COLLATE utf8_bin DEFAULT NULL,
+ `histogram` varbinary(255) DEFAULT NULL,
+ PRIMARY KEY (`db_name`,`table_name`,`column_name`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Statistics on Columns';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `column_stats`
+--
+
+LOCK TABLES `column_stats` WRITE;
+/*!40000 ALTER TABLE `column_stats` DISABLE KEYS */;
+/*!40000 ALTER TABLE `column_stats` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `columns_priv`
+--
+
+DROP TABLE IF EXISTS `columns_priv`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `columns_priv` (
+ `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Column_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '',
+ PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`,`Column_name`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Column privileges';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `columns_priv`
+--
+
+LOCK TABLES `columns_priv` WRITE;
+/*!40000 ALTER TABLE `columns_priv` DISABLE KEYS */;
+/*!40000 ALTER TABLE `columns_priv` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `db`
+--
+
+DROP TABLE IF EXISTS `db`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `db` (
+ `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `User` char(80) COLLATE utf8_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',
+ `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',
+ `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',
+ `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',
+ `Execute_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',
+ PRIMARY KEY (`Host`,`Db`,`User`),
+ KEY `User` (`User`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Database privileges';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `db`
+--
+
+LOCK TABLES `db` WRITE;
+/*!40000 ALTER TABLE `db` DISABLE KEYS */;
+INSERT INTO `db` VALUES ('%','test','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N','Y','Y'),('%','test\\_%','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N','Y','Y');
+/*!40000 ALTER TABLE `db` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `event`
+--
+
+DROP TABLE IF EXISTS `event`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `event` (
+ `db` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
+ `name` char(64) NOT NULL DEFAULT '',
+ `body` longblob NOT NULL,
+ `definer` char(141) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
+ `execute_at` datetime DEFAULT NULL,
+ `interval_value` int(11) DEFAULT NULL,
+ `interval_field` enum('YEAR','QUARTER','MONTH','DAY','HOUR','MINUTE','WEEK','SECOND','MICROSECOND','YEAR_MONTH','DAY_HOUR','DAY_MINUTE','DAY_SECOND','HOUR_MINUTE','HOUR_SECOND','MINUTE_SECOND','DAY_MICROSECOND','HOUR_MICROSECOND','MINUTE_MICROSECOND','SECOND_MICROSECOND') DEFAULT NULL,
+ `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `last_executed` datetime DEFAULT NULL,
+ `starts` datetime DEFAULT NULL,
+ `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') 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',
+ `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,
+ `db_collation` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
+ `body_utf8` longblob,
+ PRIMARY KEY (`db`,`name`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Events';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `func`
+--
+
+DROP TABLE IF EXISTS `func`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `func` (
+ `name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `ret` tinyint(1) NOT NULL DEFAULT '0',
+ `dl` char(128) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `type` enum('function','aggregate') CHARACTER SET utf8 NOT NULL,
+ PRIMARY KEY (`name`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='User defined functions';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `func`
+--
+
+LOCK TABLES `func` WRITE;
+/*!40000 ALTER TABLE `func` DISABLE KEYS */;
+/*!40000 ALTER TABLE `func` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `gtid_slave_pos`
+--
+
+DROP TABLE IF EXISTS `gtid_slave_pos`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `gtid_slave_pos` (
+ `domain_id` int(10) unsigned NOT NULL,
+ `sub_id` bigint(20) unsigned NOT NULL,
+ `server_id` int(10) unsigned NOT NULL,
+ `seq_no` bigint(20) unsigned NOT NULL,
+ PRIMARY KEY (`domain_id`,`sub_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Replication slave GTID position';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `gtid_slave_pos`
+--
+
+LOCK TABLES `gtid_slave_pos` WRITE;
+/*!40000 ALTER TABLE `gtid_slave_pos` DISABLE KEYS */;
+/*!40000 ALTER TABLE `gtid_slave_pos` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `help_category`
+--
+
+DROP TABLE IF EXISTS `help_category`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `help_category` (
+ `help_category_id` smallint(5) unsigned NOT NULL,
+ `name` char(64) NOT NULL,
+ `parent_category_id` smallint(5) unsigned DEFAULT NULL,
+ `url` text NOT NULL,
+ PRIMARY KEY (`help_category_id`),
+ UNIQUE KEY `name` (`name`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='help categories';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `help_category`
+--
+
+LOCK TABLES `help_category` WRITE;
+/*!40000 ALTER TABLE `help_category` DISABLE KEYS */;
+INSERT INTO `help_category` VALUES (1,'Geographic',0,''),(2,'Polygon properties',34,''),(3,'WKT',34,''),(4,'Numeric Functions',38,''),(5,'Plugins',35,''),(6,'MBR',34,''),(7,'Control flow functions',38,''),(8,'Transactions',35,''),(9,'Help Metadata',35,''),(10,'Account Management',35,''),(11,'Point properties',34,''),(12,'Encryption Functions',38,''),(13,'LineString properties',34,''),(14,'Miscellaneous Functions',38,''),(15,'Logical operators',38,''),(16,'Functions and Modifiers for Use with GROUP BY',35,''),(17,'Information Functions',38,''),(18,'Comparison operators',38,''),(19,'Bit Functions',38,''),(20,'Table Maintenance',35,''),(21,'User-Defined Functions',35,''),(22,'Data Types',35,''),(23,'Compound Statements',35,''),(24,'Geometry constructors',34,''),(25,'GeometryCollection properties',1,''),(26,'Administration',35,''),(27,'Data Manipulation',35,''),(28,'Utility',35,''),(29,'Language Structure',35,''),(30,'Geometry relations',34,''),(31,'Date and Time Functions',38,''),(32,'WKB',34,''),(33,'Procedures',35,''),(34,'Geographic Features',35,''),(35,'Contents',0,''),(36,'Geometry properties',34,''),(37,'String Functions',38,''),(38,'Functions',35,''),(39,'Data Definition',35,'');
+/*!40000 ALTER TABLE `help_category` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `help_keyword`
+--
+
+DROP TABLE IF EXISTS `help_keyword`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `help_keyword` (
+ `help_keyword_id` int(10) unsigned NOT NULL,
+ `name` char(64) NOT NULL,
+ PRIMARY KEY (`help_keyword_id`),
+ UNIQUE KEY `name` (`name`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='help keywords';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `help_keyword`
+--
+
+LOCK TABLES `help_keyword` WRITE;
+/*!40000 ALTER TABLE `help_keyword` DISABLE KEYS */;
+INSERT INTO `help_keyword` VALUES (0,'JOIN'),(1,'HOST'),(2,'REPEAT'),(3,'SERIALIZABLE'),(4,'REPLACE'),(5,'AT'),(6,'SCHEDULE'),(7,'RETURNS'),(8,'STARTS'),(9,'MASTER_SSL_CA'),(10,'NCHAR'),(11,'COLUMNS'),(12,'COMPLETION'),(13,'WORK'),(14,'DATETIME'),(15,'MODE'),(16,'OPEN'),(17,'INTEGER'),(18,'ESCAPE'),(19,'VALUE'),(20,'MASTER_SSL_VERIFY_SERVER_CERT'),(21,'SQL_BIG_RESULT'),(22,'DROP'),(23,'GEOMETRYCOLLECTIONFROMWKB'),(24,'EVENTS'),(25,'MONTH'),(26,'PROFILES'),(27,'DUPLICATE'),(28,'REPLICATION'),(29,'UNLOCK'),(30,'INNODB'),(31,'YEAR_MONTH'),(32,'SUBJECT'),(33,'PREPARE'),(34,'LOCK'),(35,'NDB'),(36,'CHECK'),(37,'FULL'),(38,'INT4'),(39,'BY'),(40,'NO'),(41,'MINUTE'),(42,'PARTITION'),(43,'DATA'),(44,'DAY'),(45,'SHARE'),(46,'REAL'),(47,'SEPARATOR'),(48,'MESSAGE_TEXT'),(49,'MASTER_HEARTBEAT_PERIOD'),(50,'DELETE'),(51,'ON'),(52,'COLUMN_NAME'),(53,'CONNECTION'),(54,'CLOSE'),(55,'X509'),(56,'USE'),(57,'SUBCLASS_ORIGIN'),(58,'WHERE'),(59,'PRIVILEGES'),(60,'SPATIAL'),(61,'EVENT'),(62,'SUPER'),(63,'SQL_BUFFER_RESULT'),(64,'IGNORE'),(65,'SHA2'),(66,'QUICK'),(67,'SIGNED'),(68,'OFFLINE'),(69,'SECURITY'),(70,'AUTOEXTEND_SIZE'),(71,'NDBCLUSTER'),(72,'POLYGONFROMWKB'),(73,'FALSE'),(74,'LEVEL'),(75,'FORCE'),(76,'BINARY'),(77,'TO'),(78,'CHANGE'),(79,'CURRENT_USER'),(80,'HOUR_MINUTE'),(81,'UPDATE'),(82,'PRESERVE'),(83,'TABLE_NAME'),(84,'INTO'),(85,'FEDERATED'),(86,'VARYING'),(87,'MAX_SIZE'),(88,'HOUR_SECOND'),(89,'VARIABLE'),(90,'ROLLBACK'),(91,'PROCEDURE'),(92,'TIMESTAMP'),(93,'IMPORT'),(94,'AGAINST'),(95,'CHECKSUM'),(96,'COUNT'),(97,'LONGBINARY'),(98,'THEN'),(99,'INSERT'),(100,'ENGINES'),(101,'HANDLER'),(102,'PORT'),(103,'DAY_SECOND'),(104,'EXISTS'),(105,'MUTEX'),(106,'HELP_DATE'),(107,'RELEASE'),(108,'BOOLEAN'),(109,'MOD'),(110,'DEFAULT'),(111,'TYPE'),(112,'NO_WRITE_TO_BINLOG'),(113,'OPTIMIZE'),(114,'SQLSTATE'),(115,'RESET'),(116,'CLASS_ORIGIN'),(117,'INSTALL'),(118,'ITERATE'),(119,'DO'),(120,'BIGINT'),(121,'SET'),(122,'ISSUER'),(123,'DATE'),(124,'STATUS'),(125,'FULLTEXT'),(126,'COMMENT'),(127,'MASTER_CONNECT_RETRY'),(128,'INNER'),(129,'RELAYLOG'),(130,'STOP'),(131,'MASTER_LOG_FILE'),(132,'MRG_MYISAM'),(133,'PRECISION'),(134,'REQUIRE'),(135,'TRAILING'),(136,'PARTITIONS'),(137,'LONG'),(138,'OPTION'),(139,'REORGANIZE'),(140,'ELSE'),(141,'DEALLOCATE'),(142,'IO_THREAD'),(143,'CASE'),(144,'CIPHER'),(145,'CONTINUE'),(146,'FROM'),(147,'READ'),(148,'LEFT'),(149,'ELSEIF'),(150,'MINUTE_SECOND'),(151,'COMPACT'),(152,'DEC'),(153,'FOR'),(154,'WARNINGS'),(155,'MIN_ROWS'),(156,'STRING'),(157,'CONDITION'),(158,'ENCLOSED'),(159,'FUNCTION'),(160,'AGGREGATE'),(161,'FIELDS'),(162,'INT3'),(163,'ARCHIVE'),(164,'AVG_ROW_LENGTH'),(165,'ADD'),(166,'KILL'),(167,'FLOAT4'),(168,'TABLESPACE'),(169,'VIEW'),(170,'REPEATABLE'),(171,'INFILE'),(172,'HELP_VERSION'),(173,'ORDER'),(174,'USING'),(175,'CONSTRAINT_CATALOG'),(176,'MIDDLEINT'),(177,'GRANT'),(178,'UNSIGNED'),(179,'DECIMAL'),(180,'GEOMETRYFROMTEXT'),(181,'INDEXES'),(182,'FOREIGN'),(183,'CACHE'),(184,'HOSTS'),(185,'MYSQL_ERRNO'),(186,'COMMIT'),(187,'SCHEMAS'),(188,'LEADING'),(189,'SNAPSHOT'),(190,'CONSTRAINT_NAME'),(191,'DECLARE'),(192,'LOAD'),(193,'SQL_CACHE'),(194,'CONVERT'),(195,'DYNAMIC'),(196,'COLLATE'),(197,'POLYGONFROMTEXT'),(198,'BYTE'),(199,'GLOBAL'),(200,'LINESTRINGFROMWKB'),(201,'WHEN'),(202,'HAVING'),(203,'AS'),(204,'STARTING'),(205,'RELOAD'),(206,'AUTOCOMMIT'),(207,'REVOKE'),(208,'GRANTS'),(209,'OUTER'),(210,'CURSOR_NAME'),(211,'FLOOR'),(212,'EXPLAIN'),(213,'WITH'),(214,'AFTER'),(215,'STD'),(216,'CSV'),(217,'DISABLE'),(218,'UNINSTALL'),(219,'OUTFILE'),(220,'LOW_PRIORITY'),(221,'FILE'),(222,'NODEGROUP'),(223,'SCHEMA'),(224,'SONAME'),(225,'POW'),(226,'DUAL'),(227,'MULTIPOINTFROMWKB'),(228,'INDEX'),(229,'MULTIPOINTFROMTEXT'),(230,'DEFINER'),(231,'MASTER_BIND'),(232,'REMOVE'),(233,'EXTENDED'),(234,'MULTILINESTRINGFROMWKB'),(235,'CROSS'),(236,'CONTRIBUTORS'),(237,'NATIONAL'),(238,'GROUP'),(239,'SHA'),(240,'ONLINE'),(241,'UNDO'),(242,'IGNORE_SERVER_IDS'),(243,'ZEROFILL'),(244,'CLIENT'),(245,'MASTER_PASSWORD'),(246,'OWNER'),(247,'RELAY_LOG_FILE'),(248,'TRUE'),(249,'CHARACTER'),(250,'MASTER_USER'),(251,'SCHEMA_NAME'),(252,'TABLE'),(253,'ENGINE'),(254,'INSERT_METHOD'),(255,'CASCADE'),(256,'RELAY_LOG_POS'),(257,'SQL_CALC_FOUND_ROWS'),(258,'UNION'),(259,'MYISAM'),(260,'LEAVE'),(261,'MODIFY'),(262,'MATCH'),(263,'MASTER_LOG_POS'),(264,'DISTINCTROW'),(265,'DESC'),(266,'TIME'),(267,'NUMERIC'),(268,'EXPANSION'),(269,'CODE'),(270,'CURSOR'),(271,'GEOMETRYCOLLECTIONFROMTEXT'),(272,'CHAIN'),(273,'LOGFILE'),(274,'FLUSH'),(275,'CREATE'),(276,'DESCRIBE'),(277,'EXTENT_SIZE'),(278,'MAX_UPDATES_PER_HOUR'),(279,'INT2'),(280,'PROCESSLIST'),(281,'ENDS'),(282,'LOGS'),(283,'DISCARD'),(284,'HEAP'),(285,'SOUNDS'),(286,'BETWEEN'),(287,'MULTILINESTRINGFROMTEXT'),(288,'REPAIR'),(289,'PACK_KEYS'),(290,'FAST'),(291,'VALUES'),(292,'CALL'),(293,'LOOP'),(294,'VARCHARACTER'),(295,'BEFORE'),(296,'TRUNCATE'),(297,'SHOW'),(298,'ALL'),(299,'REDUNDANT'),(300,'USER_RESOURCES'),(301,'PARTIAL'),(302,'BINLOG'),(303,'END'),(304,'SECOND'),(305,'AND'),(306,'FLOAT8'),(307,'PREV'),(308,'HOUR'),(309,'SELECT'),(310,'DATABASES'),(311,'OR'),(312,'IDENTIFIED'),(313,'WRAPPER'),(314,'MASTER_SSL_CIPHER'),(315,'SQL_SLAVE_SKIP_COUNTER'),(316,'BOTH'),(317,'BOOL'),(318,'YEAR'),(319,'MASTER_PORT'),(320,'CONCURRENT'),(321,'HELP'),(322,'UNIQUE'),(323,'TRIGGERS'),(324,'PROCESS'),(325,'OPTIONS'),(326,'RESIGNAL'),(327,'CONSISTENT'),(328,'MASTER_SSL'),(329,'DATE_ADD'),(330,'MAX_CONNECTIONS_PER_HOUR'),(331,'LIKE'),(332,'PLUGIN'),(333,'FETCH'),(334,'IN'),(335,'COLUMN'),(336,'DUMPFILE'),(337,'USAGE'),(338,'EXECUTE'),(339,'MEMORY'),(340,'CEIL'),(341,'QUERY'),(342,'MASTER_HOST'),(343,'LINES'),(344,'SQL_THREAD'),(345,'SERVER'),(346,'MAX_QUERIES_PER_HOUR'),(347,'MASTER_SSL_CERT'),(348,'MULTIPOLYGONFROMWKB'),(349,'TRANSACTION'),(350,'DAY_MINUTE'),(351,'STDDEV'),(352,'DATE_SUB'),(353,'REBUILD'),(354,'GEOMETRYFROMWKB'),(355,'INT1'),(356,'RENAME'),(357,'PARSER'),(358,'RIGHT'),(359,'ALTER'),(360,'MAX_ROWS'),(361,'SOCKET'),(362,'STRAIGHT_JOIN'),(363,'NATURAL'),(364,'VARIABLES'),(365,'ESCAPED'),(366,'SHA1'),(367,'KEY_BLOCK_SIZE'),(368,'PASSWORD'),(369,'OFFSET'),(370,'CHAR'),(371,'NEXT'),(372,'ERRORS'),(373,'SQL_LOG_BIN'),(374,'TEMPORARY'),(375,'COMMITTED'),(376,'SQL_SMALL_RESULT'),(377,'UPGRADE'),(378,'BEGIN'),(379,'DELAY_KEY_WRITE'),(380,'PROFILE'),(381,'MEDIUM'),(382,'INTERVAL'),(383,'SSL'),(384,'DAY_HOUR'),(385,'NAME'),(386,'REFERENCES'),(387,'AES_ENCRYPT'),(388,'STORAGE'),(389,'ISOLATION'),(390,'CEILING'),(391,'EVERY'),(392,'INT8'),(393,'AUTHORS'),(394,'RESTRICT'),(395,'UNCOMMITTED'),(396,'LINESTRINGFROMTEXT'),(397,'IS'),(398,'NOT'),(399,'ANALYSE'),(400,'DATAFILE'),(401,'DES_KEY_FILE'),(402,'SIGNAL'),(403,'COMPRESSED'),(404,'START'),(405,'PLUGINS'),(406,'SAVEPOINT'),(407,'IF'),(408,'ROWS'),(409,'PRIMARY'),(410,'PURGE'),(411,'LAST'),(412,'USER'),(413,'EXIT'),(414,'KEYS'),(415,'LIMIT'),(416,'KEY'),(417,'MERGE'),(418,'UNTIL'),(419,'SQL_NO_CACHE'),(420,'DELAYED'),(421,'CONSTRAINT_SCHEMA'),(422,'ANALYZE'),(423,'CONSTRAINT'),(424,'SERIAL'),(425,'ACTION'),(426,'WRITE'),(427,'INITIAL_SIZE'),(428,'SESSION'),(429,'DATABASE'),(430,'NULL'),(431,'POWER'),(432,'USE_FRM'),(433,'TERMINATED'),(434,'SLAVE'),(435,'NVARCHAR'),(436,'ASC'),(437,'RETURN'),(438,'OPTIONALLY'),(439,'ENABLE'),(440,'DIRECTORY'),(441,'MAX_USER_CONNECTIONS'),(442,'WHILE'),(443,'LOCAL'),(444,'DISTINCT'),(445,'AES_DECRYPT'),(446,'MASTER_SSL_KEY'),(447,'NONE'),(448,'TABLES'),(449,'<>'),(450,'RLIKE'),(451,'TRIGGER'),(452,'COLLATION'),(453,'SHUTDOWN'),(454,'HIGH_PRIORITY'),(455,'BTREE'),(456,'FIRST'),(457,'COALESCE'),(458,'WAIT'),(459,'CATALOG_NAME'),(460,'MASTER'),(461,'FIXED'),(462,'MULTIPOLYGONFROMTEXT'),(463,'ROW_FORMAT');
+/*!40000 ALTER TABLE `help_keyword` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `help_relation`
+--
+
+DROP TABLE IF EXISTS `help_relation`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `help_relation` (
+ `help_topic_id` int(10) unsigned NOT NULL,
+ `help_keyword_id` int(10) unsigned NOT NULL,
+ PRIMARY KEY (`help_keyword_id`,`help_topic_id`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='keyword-topic relation';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `help_relation`
+--
+
+LOCK TABLES `help_relation` WRITE;
+/*!40000 ALTER TABLE `help_relation` DISABLE KEYS */;
+INSERT INTO `help_relation` VALUES (1,0),(356,0),(473,1),(232,2),(447,3),(3,4),(130,4),(421,4),(89,5),(89,6),(406,6),(97,7),(89,8),(185,9),(430,10),(21,11),(347,11),(421,11),(463,11),(468,11),(89,12),(406,12),(146,13),(230,14),(88,15),(356,15),(18,16),(106,16),(134,16),(347,16),(97,17),(500,17),(380,18),(3,19),(104,19),(243,19),(374,19),(459,19),(185,20),(356,21),(9,22),(30,22),(34,22),(87,22),(186,22),(237,22),(263,22),(276,22),(300,22),(331,22),(405,22),(415,22),(416,22),(463,22),(478,22),(108,23),(122,24),(170,24),(424,24),(376,25),(82,26),(104,27),(199,28),(36,29),(347,30),(468,30),(376,31),(199,32),(35,33),(237,33),(36,34),(356,34),(468,35),(417,36),(463,36),(468,36),(21,37),(294,37),(347,37),(451,37),(468,37),(500,38),(48,39),(77,39),(83,39),(130,39),(199,39),(356,39),(361,39),(421,39),(463,39),(468,39),(468,40),(472,40),(376,41),(463,42),(468,42),(212,43),(421,43),(468,43),(473,43),(376,44),(356,45),(97,46),(314,46),(361,47),(374,48),(459,48),(185,49),(48,50),(468,50),(472,50),(1,51),(89,51),(406,51),(472,51),(374,52),(459,52),(176,53),(468,53),(51,54),(106,54),(199,55),(1,56),(55,56),(194,56),(374,57),(459,57),(48,58),(83,58),(106,58),(193,59),(199,59),(249,59),(210,60),(463,60),(89,61),(300,61),(358,61),(406,61),(199,62),(356,63),(1,64),(83,64),(104,64),(130,64),(356,64),(421,64),(463,64),(66,65),(48,66),(417,66),(466,66),(230,67),(87,68),(210,68),(463,68),(199,69),(194,70),(468,71),(91,72),(482,72),(385,73),(447,74),(1,75),(39,76),(230,76),(269,76),(185,77),(269,77),(460,77),(185,78),(463,78),(89,79),(406,79),(376,80),(83,81),(104,81),(356,81),(472,81),(89,82),(406,82),(374,83),(459,83),(3,84),(104,84),(304,84),(356,84),(468,85),(257,86),(194,87),(376,88),(129,89),(146,90),(460,90),(17,91),(189,91),(302,91),(328,91),(347,91),(356,91),(416,91),(439,91),(488,91),(99,92),(188,92),(421,93),(463,93),(88,94),(401,95),(468,95),(69,96),(330,96),(433,96),(285,97),(28,98),(57,98),(85,98),(104,99),(195,99),(301,99),(486,99),(282,100),(347,100),(106,101),(313,101),(473,102),(376,103),(9,104),(30,104),(89,104),(155,104),(186,104),(276,104),(300,104),(347,105),(365,105),(109,106),(146,107),(460,107),(24,108),(88,108),(113,109),(174,109),(3,110),(104,110),(155,110),(200,110),(212,110),(243,110),(463,110),(468,110),(463,111),(115,112),(326,112),(466,112),(470,112),(115,113),(463,113),(374,114),(459,114),(38,115),(119,115),(151,115),(264,115),(374,116),(459,116),(419,117),(124,118),(89,119),(125,119),(406,119),(496,119),(221,120),(3,121),(83,121),(104,121),(129,121),(130,121),(146,121),(155,121),(182,121),(212,121),(333,121),(347,121),(356,121),(374,121),(421,121),(459,121),(463,121),(468,121),(472,121),(477,121),(494,121),(199,122),(132,123),(230,123),(262,123),(376,123),(58,124),(137,124),(215,124),(223,124),(328,124),(336,124),(347,124),(365,124),(210,125),(463,125),(468,125),(89,126),(194,126),(210,126),(406,126),(468,126),(185,127),(1,128),(424,129),(52,130),(185,131),(468,132),(314,133),(199,134),(455,135),(255,136),(285,137),(199,138),(249,138),(463,139),(57,140),(85,140),(237,141),(52,142),(324,142),(57,143),(85,143),(199,144),(313,145),(48,146),(122,146),(347,146),(356,146),(424,146),(455,146),(36,147),(106,147),(447,147),(1,148),(28,149),(376,150),(468,151),(209,152),(180,153),(313,153),(347,153),(356,153),(420,153),(330,154),(347,154),(468,155),(97,156),(180,157),(421,158),(34,159),(68,159),(97,159),(211,159),(233,159),(302,159),(336,159),(347,159),(393,159),(405,159),(416,159),(97,160),(347,161),(421,161),(252,162),(468,163),(463,164),(468,164),(60,165),(194,165),(463,165),(478,165),(176,166),(168,167),(194,168),(415,168),(463,168),(478,168),(30,169),(159,169),(454,169),(447,170),(130,171),(421,171),(190,172),(48,173),(83,173),(356,173),(361,173),(463,173),(1,174),(48,174),(86,174),(374,175),(459,175),(252,176),(199,177),(249,177),(24,178),(128,178),(168,178),(209,178),(230,178),(314,178),(500,178),(97,179),(156,179),(230,179),(411,180),(347,181),(463,182),(468,182),(472,182),(473,182),(101,183),(151,183),(304,183),(145,184),(347,184),(374,185),(459,185),(146,186),(160,187),(347,187),(455,188),(146,189),(374,190),(459,190),(180,191),(200,191),(313,191),(420,191),(304,192),(421,192),(356,193),(230,194),(377,194),(468,195),(155,196),(212,196),(468,196),(395,197),(465,198),(129,199),(137,199),(182,199),(349,199),(447,199),(452,200),(57,201),(85,201),(356,202),(1,203),(36,203),(356,203),(421,204),(199,205),(146,206),(249,207),(192,208),(347,208),(1,209),(374,210),(459,210),(221,211),(255,212),(88,213),(199,213),(210,213),(463,213),(468,213),(463,214),(260,215),(421,216),(468,216),(89,217),(406,217),(463,217),(291,218),(356,219),(3,220),(36,220),(48,220),(83,220),(104,220),(130,220),(421,220),(199,221),(194,222),(155,223),(186,223),(212,223),(309,223),(347,223),(97,224),(277,225),(279,226),(464,227),(1,228),(60,228),(87,228),(101,228),(210,228),(304,228),(308,228),(347,228),(463,228),(468,228),(425,229),(89,230),(406,230),(185,231),(463,232),(255,233),(466,233),(272,234),(1,235),(7,236),(347,236),(257,237),(430,237),(194,238),(226,238),(356,238),(427,239),(87,240),(210,240),(463,240),(313,241),(185,242),(24,243),(128,243),(168,243),(209,243),(314,243),(500,243),(199,244),(185,245),(473,246),(185,247),(385,248),(130,249),(155,249),(212,249),(257,249),(333,249),(347,249),(356,249),(421,249),(430,249),(468,249),(185,250),(374,251),(459,251),(60,252),(110,252),(115,252),(215,252),(276,252),(278,252),(321,252),(347,252),(401,252),(417,252),(463,252),(466,252),(468,252),(470,252),(194,253),(347,253),(365,253),(415,253),(463,253),(468,253),(478,253),(468,254),(30,255),(276,255),(468,255),(472,255),(185,256),(356,257),(305,258),(468,259),(310,260),(463,261),(88,262),(185,263),(356,264),(329,265),(356,265),(361,265),(230,266),(315,266),(375,266),(209,267),(88,268),(68,269),(488,269),(420,270),(246,271),(146,272),(194,273),(226,273),(151,274),(326,274),(17,275),(22,275),(60,275),(77,275),(89,275),(97,275),(155,275),(194,275),(210,275),(211,275),(278,275),(302,275),(309,275),(347,275),(358,275),(393,275),(454,275),(468,275),(473,275),(329,276),(194,277),(199,278),(234,279),(347,280),(451,280),(89,281),(39,282),(269,282),(347,282),(463,283),(468,284),(378,285),(147,286),(107,287),(463,288),(466,288),(468,289),(417,290),(3,291),(104,291),(339,292),(344,293),(257,294),(269,295),(321,296),(463,296),(7,297),(10,297),(17,297),(21,297),(25,297),(33,297),(39,297),(58,297),(68,297),(69,297),(82,297),(122,297),(134,297),(137,297),(145,297),(160,297),(170,297),(192,297),(193,297),(215,297),(223,297),(278,297),(282,297),(294,297),(308,297),(309,297),(328,297),(330,297),(333,297),(336,297),(347,297),(349,297),(358,297),(365,297),(393,297),(424,297),(451,297),(487,297),(488,297),(492,297),(38,298),(199,298),(249,298),(305,298),(356,298),(468,299),(326,300),(468,301),(122,302),(350,302),(28,303),(57,303),(85,303),(232,303),(327,303),(344,303),(496,303),(376,304),(147,305),(316,305),(314,306),(106,307),(376,308),(3,309),(104,309),(255,309),(301,309),(356,309),(160,310),(347,310),(141,311),(77,312),(130,312),(199,312),(473,313),(185,314),(182,315),(455,316),(24,317),(111,317),(376,318),(185,319),(130,320),(421,320),(118,321),(390,321),(463,322),(25,323),(347,323),(199,324),(373,325),(473,325),(374,326),(146,327),(185,328),(376,329),(199,330),(347,331),(378,331),(291,332),(347,332),(419,332),(383,333),(88,334),(122,334),(356,334),(424,334),(463,335),(356,336),(199,337),(86,338),(199,338),(356,339),(397,340),(88,341),(151,341),(176,341),(185,342),(130,343),(421,343),(52,344),(324,344),(9,345),(373,345),(473,345),(199,346),(185,347),(123,348),(146,349),(447,349),(376,350),(407,351),(376,352),(463,353),(144,354),(24,355),(110,356),(222,356),(406,356),(463,356),(210,357),(463,357),(468,357),(1,358),(60,359),(159,359),(199,359),(212,359),(226,359),(233,359),(373,359),(406,359),(439,359),(463,359),(478,359),(463,360),(468,360),(473,361),(1,362),(356,362),(1,363),(347,364),(349,364),(421,365),(427,366),(468,367),(77,368),(199,368),(473,368),(477,368),(356,369),(230,370),(465,370),(106,371),(69,372),(347,372),(494,373),(276,374),(447,375),(356,376),(212,377),(417,377),(146,378),(327,378),(468,379),(487,380),(417,381),(89,382),(376,382),(199,383),(376,384),(212,385),(199,386),(468,386),(472,386),(443,387),(282,388),(447,389),(448,390),(89,391),(128,392),(10,393),(347,393),(30,394),(276,394),(472,394),(447,395),(56,396),(84,397),(206,397),(368,397),(456,397),(84,398),(89,398),(155,398),(206,398),(312,398),(189,399),(194,400),(478,400),(326,401),(459,402),(468,403),(146,404),(324,404),(33,405),(460,406),(9,407),(28,407),(30,407),(89,407),(155,407),(186,407),(276,407),(300,407),(479,407),(130,408),(463,409),(269,410),(106,411),(77,412),(222,412),(331,412),(473,412),(313,413),(308,414),(347,414),(463,414),(48,415),(83,415),(106,415),(122,415),(356,415),(424,415),(60,416),(104,416),(463,416),(468,416),(472,416),(468,417),(232,418),(356,419),(3,420),(104,420),(486,420),(374,421),(459,421),(463,422),(470,422),(463,423),(468,423),(243,424),(468,424),(468,425),(472,425),(36,426),(194,427),(478,427),(129,428),(137,428),(349,428),(447,428),(155,429),(186,429),(212,429),(309,429),(347,429),(473,429),(84,430),(368,430),(472,430),(483,431),(466,432),(421,433),(38,434),(52,434),(89,434),(145,434),(223,434),(324,434),(406,434),(257,435),(356,436),(361,436),(491,437),(421,438),(89,439),(406,439),(463,439),(212,440),(468,440),(199,441),(496,442),(36,443),(115,443),(130,443),(326,443),(421,443),(466,443),(470,443),(0,444),(96,444),(288,444),(305,444),(356,444),(361,444),(384,444),(433,444),(497,445),(185,446),(199,447),(36,448),(134,448),(294,448),(347,448),(495,449),(27,450),(22,451),(263,451),(347,451),(347,452),(492,452),(199,453),(104,454),(356,454),(210,455),(106,456),(463,456),(468,456),(463,457),(194,458),(478,458),(374,459),(459,459),(39,460),(58,460),(185,460),(264,460),(269,460),(209,461),(468,461),(201,462),(468,463);
+/*!40000 ALTER TABLE `help_relation` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `help_topic`
+--
+
+DROP TABLE IF EXISTS `help_topic`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `help_topic` (
+ `help_topic_id` int(10) unsigned NOT NULL,
+ `name` char(64) NOT NULL,
+ `help_category_id` smallint(5) unsigned NOT NULL,
+ `description` text NOT NULL,
+ `example` text NOT NULL,
+ `url` text NOT NULL,
+ PRIMARY KEY (`help_topic_id`),
+ UNIQUE KEY `name` (`name`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='help topics';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `help_topic`
+--
+
+LOCK TABLES `help_topic` WRITE;
+/*!40000 ALTER TABLE `help_topic` DISABLE KEYS */;
+INSERT INTO `help_topic` VALUES (0,'MIN',16,'Syntax:\nMIN([DISTINCT] expr)\n\nReturns the minimum value of expr. MIN() may take a string argument; in\nsuch cases, it returns the minimum string value.\nThe DISTINCT keyword can be used to find the minimum of the distinct values\nof expr, however, this produces the same result as omitting DISTINCT.\n\nMIN() returns NULL if there were no matching rows.\n\nURL: https://mariadb.com/kb/en/min/\n\n','MariaDB> SELECT student_name, MIN(test_score), MAX(test_score)\n -> FROM student\n -> GROUP BY student_name;\n','https://mariadb.com/kb/en/min/'),(1,'JOIN',27,'MySQL supports the following JOIN syntaxes for the table_references\npart of SELECT statements and multiple-table DELETE and UPDATE\nstatements:\n\ntable_references:\n table_reference [, table_reference] ...\n\ntable_reference:\n table_factor\n | join_table\n\ntable_factor:\n tbl_name [[AS] alias] [index_hint_list]\n | table_subquery [AS] alias\n | ( table_references )\n | { OJ table_reference LEFT OUTER JOIN table_reference\n ON conditional_expr }\n\njoin_table:\n table_reference [INNER | CROSS] JOIN table_factor [join_condition]\n | table_reference STRAIGHT_JOIN table_factor\n | table_reference STRAIGHT_JOIN table_factor ON conditional_expr\n | table_reference {LEFT|RIGHT} [OUTER] JOIN table_reference join_condition\n | table_reference NATURAL [{LEFT|RIGHT} [OUTER]] JOIN table_factor\n\njoin_condition:\n ON conditional_expr\n | USING (column_list)\n\nindex_hint_list:\n index_hint [, index_hint] ...\n\nindex_hint:\n USE {INDEX|KEY}\n [FOR {JOIN|ORDER BY|GROUP BY}] ([index_list])\n | IGNORE {INDEX|KEY}\n [FOR {JOIN|ORDER BY|GROUP BY}] (index_list)\n | FORCE {INDEX|KEY}\n [FOR {JOIN|ORDER BY|GROUP BY}] (index_list)\n\nindex_list:\n index_name [, index_name] ...\n\nA table reference is also known as a join expression.\n\nThe syntax of table_factor is extended in comparison with the SQL\nStandard. The latter accepts only table_reference, not a list of them\ninside a pair of parentheses.\n\nThis is a conservative extension if we consider each comma in a list of\ntable_reference items as equivalent to an inner join. For example:\n\nSELECT * FROM t1 LEFT JOIN (t2, t3, t4)\n ON (t2.a=t1.a AND t3.b=t1.b AND t4.c=t1.c)\n\nis equivalent to:\n\nSELECT * FROM t1 LEFT JOIN (t2 CROSS JOIN t3 CROSS JOIN t4)\n ON (t2.a=t1.a AND t3.b=t1.b AND t4.c=t1.c)\n\nIn MySQL, JOIN, CROSS JOIN, and INNER JOIN are syntactic equivalents\n(they can replace each other). In standard SQL, they are not\nequivalent. INNER JOIN is used with an ON clause, CROSS JOIN is used\notherwise.\n\nIn general, parentheses can be ignored in join expressions containing\nonly inner join operations.\n\nIndex hints can be specified to affect how the MySQL optimizer makes\nuse of indexes. For more information, see\nhttps://mariadb.com/kb/en/how-to-force-query-plans/.\n\nURL: https://mariadb.com/kb/en/join-syntax/\n\n','SELECT left_tbl.*\n FROM left_tbl LEFT JOIN right_tbl ON left_tbl.id = right_tbl.id\n WHERE right_tbl.id IS NULL;\n','https://mariadb.com/kb/en/join-syntax/'),(2,'HEX',37,'Syntax:\nHEX(str), HEX(N)\n\nFor a string argument str, HEX() returns a hexadecimal string\nrepresentation of str where each character in str is converted to two\nhexadecimal digits. The inverse of this operation is performed by the\nUNHEX() function.\n\nFor a numeric argument N, HEX() returns a hexadecimal string\nrepresentation of the value of N treated as a longlong (BIGINT) number.\nThis is equivalent to CONV(N,10,16). The inverse of this operation is\nperformed by CONV(HEX(N),16,10).\n\nURL: https://mariadb.com/kb/en/hex/\n\n','MariaDB> SELECT 0x616263, HEX(\'abc\'), UNHEX(HEX(\'abc\'));\n -> \'abc\', 616263, \'abc\'\nMariaDB> SELECT HEX(255), CONV(HEX(255),16,10);\n -> \'FF\', 255\n','https://mariadb.com/kb/en/hex/'),(3,'REPLACE',27,'Syntax:\nREPLACE [LOW_PRIORITY | DELAYED]\n [INTO] tbl_name [(col_name,...)]\n {VALUES | VALUE} ({expr | DEFAULT},...),(...),...\n\nOr:\n\nREPLACE [LOW_PRIORITY | DELAYED]\n [INTO] tbl_name\n SET col_name={expr | DEFAULT}, ...\n\nOr:\n\nREPLACE [LOW_PRIORITY | DELAYED]\n [INTO] tbl_name [(col_name,...)]\n SELECT ...\n\nREPLACE works exactly like INSERT, except that if an old row in the\ntable has the same value as a new row for a PRIMARY KEY or a UNIQUE\nindex, the old row is deleted before the new row is inserted. See [HELP\nINSERT].\n\nREPLACE is a MySQL extension to the SQL standard. It either inserts, or\ndeletes and inserts. For another MySQL extension to standard SQL---that\neither inserts or updates---see\nhttps://mariadb.com/kb/en/insert-on-duplicate-key-update/.\n\nNote that unless the table has a PRIMARY KEY or UNIQUE index, using a\nREPLACE statement makes no sense. It becomes equivalent to INSERT,\nbecause there is no index to be used to determine whether a new row\nduplicates another.\n\nValues for all columns are taken from the values specified in the\nREPLACE statement. Any missing columns are set to their default values,\njust as happens for INSERT. You cannot refer to values from the current\nrow and use them in the new row. If you use an assignment such as SET\ncol_name = col_name + 1, the reference to the column name on the right\nhand side is treated as DEFAULT(col_name), so the assignment is\nequivalent to SET col_name = DEFAULT(col_name) + 1.\n\nTo use REPLACE, you must have both the INSERT and DELETE privileges for\nthe table.\n\nURL: https://mariadb.com/kb/en/replace/\n\n','','https://mariadb.com/kb/en/replace/'),(4,'CONTAINS',30,'Contains(g1,g2)\n\nReturns 1 or 0 to indicate whether g1 completely contains g2. This\ntests the opposite relationship as Within().\n\nURL: https://mariadb.com/kb/en/contains/\n\n','','https://mariadb.com/kb/en/contains/'),(5,'SRID',36,'SRID(g)\n\nReturns an integer indicating the Spatial Reference System ID for the\ngeometry value g.\n\nIn MySQL, the SRID value is just an integer associated with the\ngeometry value. All calculations are done assuming Euclidean (planar)\ngeometry.\n\nURL: https://mariadb.com/kb/en/srid/\n\n','MariaDB> SELECT SRID(GeomFromText(\'LineString(1 1,2 2)\',101));\n+-----------------------------------------------+\n| SRID(GeomFromText(\'LineString(1 1,2 2)\',101)) |\n+-----------------------------------------------+\n| 101 |\n+-----------------------------------------------+\n','https://mariadb.com/kb/en/srid/'),(6,'CURRENT_TIMESTAMP',31,'Syntax:\nCURRENT_TIMESTAMP, CURRENT_TIMESTAMP()\n\nCURRENT_TIMESTAMP and CURRENT_TIMESTAMP() are synonyms for NOW().\n\nURL: https://mariadb.com/kb/en/current_timestamp/\n\n','','https://mariadb.com/kb/en/current_timestamp/'),(7,'SHOW CONTRIBUTORS',26,'Syntax:\nSHOW CONTRIBUTORS\n\nThe SHOW CONTRIBUTORS statement displays information about the people\nwho contribute to MySQL source or to causes that we support. For each\ncontributor, it displays Name, Location, and Comment values.\n\nURL: https://mariadb.com/kb/en/show-contributors/\n\n','','https://mariadb.com/kb/en/show-contributors/'),(8,'VARIANCE',16,'Syntax:\nVARIANCE(expr)\n\nReturns the population standard variance of expr. This is an extension\nto standard SQL. The standard SQL function VAR_POP() can be used\ninstead.\n\nVARIANCE() returns NULL if there were no matching rows.\n\nURL: https://mariadb.com/kb/en/variance/\n\n','','https://mariadb.com/kb/en/variance/'),(9,'DROP SERVER',39,'Syntax:\nDROP SERVER [ IF EXISTS ] server_name\n\nDrops the server definition for the server named server_name. The\ncorresponding row within the mysql.servers table will be deleted. This\nstatement requires the SUPER privilege.\n\nDropping a server for a table does not affect any FEDERATED tables that\nused this connection information when they were created. See [HELP\nCREATE SERVER].\n\nURL: https://mariadb.com/kb/en/drop-server/\n\n','','https://mariadb.com/kb/en/drop-server/'),(10,'SHOW AUTHORS',26,'Syntax:\nSHOW AUTHORS\n\nThe SHOW AUTHORS statement displays information about the people who\nwork on MySQL. For each author, it displays Name, Location, and Comment\nvalues.\n\nURL: https://mariadb.com/kb/en/show-authors/\n\n','','https://mariadb.com/kb/en/show-authors/'),(11,'VAR_SAMP',16,'Syntax:\nVAR_SAMP(expr)\n\nReturns the sample variance of expr. That is, the denominator is the\nnumber of rows minus one.\n\nVAR_SAMP() returns NULL if there were no matching rows.\n\nURL: https://mariadb.com/kb/en/var_samp/\n\n','','https://mariadb.com/kb/en/var_samp/'),(12,'CONCAT',37,'Syntax:\nCONCAT(str1,str2,...)\n\nReturns the string that results from concatenating the arguments. May\nhave one or more arguments. If all arguments are nonbinary strings, the\nresult is a nonbinary string. If the arguments include any binary\nstrings, the result is a binary string. A numeric argument is converted\nto its equivalent string form. This is a nonbinary string as of MySQL\n5.5.3. Before 5.5.3, it is a binary string; to to avoid that and\nproduce a nonbinary string, you can use an explicit type cast, as in\nthis example:\n\nSELECT CONCAT(CAST(int_col AS CHAR), char_col);\n\nCONCAT() returns NULL if any argument is NULL.\n\nURL: https://mariadb.com/kb/en/concat/\n\n','MariaDB> SELECT CONCAT(\'My\', \'S\', \'QL\');\n -> \'MySQL\'\nMariaDB> SELECT CONCAT(\'My\', NULL, \'QL\');\n -> NULL\nMariaDB> SELECT CONCAT(14.3);\n -> \'14.3\'\n','https://mariadb.com/kb/en/concat/'),(13,'GEOMETRY HIERARCHY',34,'Geometry is the base class. It is an abstract class. The instantiable\nsubclasses of Geometry are restricted to zero-, one-, and\ntwo-dimensional geometric objects that exist in two-dimensional\ncoordinate space. All instantiable geometry classes are defined so that\nvalid instances of a geometry class are topologically closed (that is,\nall defined geometries include their boundary).\n\nThe base Geometry class has subclasses for Point, Curve, Surface, and\nGeometryCollection:\n\no Point represents zero-dimensional objects.\n\no Curve represents one-dimensional objects, and has subclass\n LineString, with sub-subclasses Line and LinearRing.\n\no Surface is designed for two-dimensional objects and has subclass\n Polygon.\n\no GeometryCollection has specialized zero-, one-, and two-dimensional\n collection classes named MultiPoint, MultiLineString, and\n MultiPolygon for modeling geometries corresponding to collections of\n Points, LineStrings, and Polygons, respectively. MultiCurve and\n MultiSurface are introduced as abstract superclasses that generalize\n the collection interfaces to handle Curves and Surfaces.\n\nGeometry, Curve, Surface, MultiCurve, and MultiSurface are defined as\nnoninstantiable classes. They define a common set of methods for their\nsubclasses and are included for extensibility.\n\nPoint, LineString, Polygon, GeometryCollection, MultiPoint,\nMultiLineString, and MultiPolygon are instantiable classes.\n\nURL: https://mariadb.com/kb/en/geometry-hierarchy/\n\n','','https://mariadb.com/kb/en/geometry-hierarchy/'),(14,'CHAR FUNCTION',37,'Syntax:\nCHAR(N,... [USING charset_name])\n\nCHAR() interprets each argument N as an integer and returns a string\nconsisting of the characters given by the code values of those\nintegers. NULL values are skipped.\nBy default, CHAR() returns a binary string. To produce a string in a\ngiven character set, use the optional USING clause:\n\nMariaDB> SELECT CHARSET(CHAR(0x65)), CHARSET(CHAR(0x65 USING utf8));\n+---------------------+--------------------------------+\n| CHARSET(CHAR(0x65)) | CHARSET(CHAR(0x65 USING utf8)) |\n+---------------------+--------------------------------+\n| binary | utf8 |\n+---------------------+--------------------------------+\n\nIf USING is given and the result string is illegal for the given\ncharacter set, a warning is issued. Also, if strict SQL mode is\nenabled, the result from CHAR() becomes NULL.\n\nURL: https://mariadb.com/kb/en/char-function/\n\n','MariaDB> SELECT CHAR(77,121,83,81,\'76\');\n -> \'MySQL\'\nMariaDB> SELECT CHAR(77,77.3,\'77.3\');\n -> \'MMM\'\n','https://mariadb.com/kb/en/char-function/'),(15,'DATETIME',22,'DATETIME\n\nA date and time combination. The supported range is \'1000-01-01\n00:00:00\' to \'9999-12-31 23:59:59\'. MySQL displays DATETIME values in\n\'YYYY-MM-DD HH:MM:SS\' format, but permits assignment of values to\nDATETIME columns using either strings or numbers.\n\nURL: https://mariadb.com/kb/en/datetime/\n\n','','https://mariadb.com/kb/en/datetime/'),(16,'SHOW CREATE TRIGGER',26,'Syntax:\nSHOW CREATE TRIGGER trigger_name\n\nThis statement shows a CREATE TRIGGER statement that creates the given\ntrigger.\n\nURL: https://mariadb.com/kb/en/show-create-trigger/\n\n','','https://mariadb.com/kb/en/show-create-trigger/'),(17,'SHOW CREATE PROCEDURE',26,'Syntax:\nSHOW CREATE PROCEDURE proc_name\n\nThis statement is a MySQL extension. It returns the exact string that\ncan be used to re-create the named stored procedure. A similar\nstatement, SHOW CREATE FUNCTION, displays information about stored\nfunctions (see [HELP SHOW CREATE FUNCTION]).\n\nBoth statements require that you be the owner of the routine or have\nSELECT access to the mysql.proc table. If you do not have privileges\nfor the routine itself, the value displayed for the Create Procedure or\nCreate Function field will be NULL.\n\nURL: https://mariadb.com/kb/en/show-create-procedure/\n\n','MariaDB> SHOW CREATE PROCEDURE test.simpleproc\\G\n*************************** 1. row ***************************\n Procedure: simpleproc\n sql_mode:\n Create Procedure: CREATE PROCEDURE `simpleproc`(OUT param1 INT)\n BEGIN\n SELECT COUNT(*) INTO param1 FROM t;\n END\ncharacter_set_client: latin1\ncollation_connection: latin1_swedish_ci\n Database Collation: latin1_swedish_ci\n\nMariaDB> SHOW CREATE FUNCTION test.hello\\G\n*************************** 1. row ***************************\n Function: hello\n sql_mode:\n Create Function: CREATE FUNCTION `hello`(s CHAR(20))\n RETURNS CHAR(50)\n RETURN CONCAT(\'Hello, \',s,\'!\')\ncharacter_set_client: latin1\ncollation_connection: latin1_swedish_ci\n Database Collation: latin1_swedish_ci\n','https://mariadb.com/kb/en/show-create-procedure/'),(18,'OPEN',23,'Syntax:\nOPEN cursor_name\n\nThis statement opens a previously declared cursor. For an example, see\nhttps://mariadb.com/kb/en/cursor-overview/.\n\nURL: https://mariadb.com/kb/en/open/\n\n','','https://mariadb.com/kb/en/open/'),(19,'INTEGER',22,'INTEGER[(M)] [UNSIGNED] [ZEROFILL]\n\nThis type is a synonym for INT.\n\nURL: https://mariadb.com/kb/en/sql_language-data_types-int\n\n','','https://mariadb.com/kb/en/sql_language-data_types-int'),(20,'LOWER',37,'Syntax:\nLOWER(str)\n\nReturns the string str with all characters changed to lowercase\naccording to the current character set mapping. The default is latin1\n(cp1252 West European).\n\nMariaDB> SELECT LOWER(\'QUADRATICALLY\');\n -> \'quadratically\'\n\nLOWER() (and UPPER()) are ineffective when applied to binary strings\n(BINARY, VARBINARY, BLOB). To perform lettercase conversion, convert\nthe string to a nonbinary string:\n\nMariaDB> SET @str = BINARY \'New York\';\nMariaDB> SELECT LOWER(@str), LOWER(CONVERT(@str USING latin1));\n+-------------+-----------------------------------+\n| LOWER(@str) | LOWER(CONVERT(@str USING latin1)) |\n+-------------+-----------------------------------+\n| New York | new york |\n+-------------+-----------------------------------+\n\nURL: https://mariadb.com/kb/en/lower/\n\n','','https://mariadb.com/kb/en/lower/'),(21,'SHOW COLUMNS',26,'Syntax:\nSHOW [FULL] COLUMNS {FROM | IN} tbl_name [{FROM | IN} db_name]\n [LIKE \'pattern\' | WHERE expr]\n\nSHOW COLUMNS displays information about the columns in a given table.\nIt also works for views. The LIKE clause, if present, indicates which\ncolumn names to match. The WHERE clause can be given to select rows\nusing more general conditions, as discussed in\nhttps://mariadb.com/kb/en/extended-show/.\n\nSHOW COLUMNS displays information only for those columns for which you\nhave some privilege.\n\nMariaDB> SHOW COLUMNS FROM City;\n+------------+----------+------+-----+---------+----------------+\n| Field | Type | Null | Key | Default | Extra |\n+------------+----------+------+-----+---------+----------------+\n| Id | int(11) | NO | PRI | NULL | auto_increment |\n| Name | char(35) | NO | | | |\n| Country | char(3) | NO | UNI | | |\n| District | char(20) | YES | MUL | | |\n| Population | int(11) | NO | | 0 | |\n+------------+----------+------+-----+---------+----------------+\n5 rows in set (0.00 sec)\n\nIf the data types differ from what you expect them to be based on a\nCREATE TABLE statement, note that MySQL sometimes changes data types\nwhen you create or alter a table. The conditions under which this\noccurs are described in\nhttps://mariadb.com/kb/en/silent-column-changes/.\n\nThe FULL keyword causes the output to include the column collation and\ncomments, as well as the privileges you have for each column.\n\nYou can use db_name.tbl_name as an alternative to the tbl_name FROM\ndb_name syntax. In other words, these two statements are equivalent:\n\nMariaDB> SHOW COLUMNS FROM mytable FROM mydb;\nMariaDB> SHOW COLUMNS FROM mydb.mytable;\n\nSHOW COLUMNS displays the following values for each table column:\n\nField indicates the column name.\n\nType indicates the column data type.\n\nCollation indicates the collation for nonbinary string columns, or NULL\nfor other columns. This value is displayed only if you use the FULL\nkeyword.\n\nThe Null field contains YES if NULL values can be stored in the column,\nNO if not.\n\nThe Key field indicates whether the column is indexed:\n\no If Key is empty, the column either is not indexed or is indexed only\n as a secondary column in a multiple-column, nonunique index.\n\no If Key is PRI, the column is a PRIMARY KEY or is one of the columns\n in a multiple-column PRIMARY KEY.\n\no If Key is UNI, the column is the first column of a UNIQUE index. (A\n UNIQUE index permits multiple NULL values, but you can tell whether\n the column permits NULL by checking the Null field.)\n\no If Key is MUL, the column is the first column of a nonunique index in\n which multiple occurrences of a given value are permitted within the\n column.\n\nIf more than one of the Key values applies to a given column of a\ntable, Key displays the one with the highest priority, in the order\nPRI, UNI, MUL.\n\nA UNIQUE index may be displayed as PRI if it cannot contain NULL values\nand there is no PRIMARY KEY in the table. A UNIQUE index may display as\nMUL if several columns form a composite UNIQUE index; although the\ncombination of the columns is unique, each column can still hold\nmultiple occurrences of a given value.\n\nThe Default field indicates the default value that is assigned to the\ncolumn. This is NULL if the column has an explicit default of NULL, or\nif the column definition has no DEFAULT clause.\n\nThe Extra field contains any additional information that is available\nabout a given column. The value is nonempty in these cases:\nauto_increment for columns that have the AUTO_INCREMENT attribute; on\nupdate CURRENT_TIMESTAMP for TIMESTAMP columns that have the ON UPDATE\nCURRENT_TIMESTAMP attribute.\n\nPrivileges indicates the privileges you have for the column. This value\nis displayed only if you use the FULL keyword.\n\nComment indicates any comment the column has. This value is displayed\nonly if you use the FULL keyword.\n\nSHOW FIELDS is a synonym for SHOW COLUMNS. You can also list a table\'s\ncolumns with the mysqlshow db_name tbl_name command.\n\nThe DESCRIBE statement provides information similar to SHOW COLUMNS.\nSee [HELP DESCRIBE].\n\nThe SHOW CREATE TABLE, SHOW TABLE STATUS, and SHOW INDEX statements\nalso provide information about tables. See [HELP SHOW].\n\nURL: https://mariadb.com/kb/en/show-columns/\n\n','','https://mariadb.com/kb/en/show-columns/'),(22,'CREATE TRIGGER',39,'Syntax:\nCREATE\n [DEFINER = { user | CURRENT_USER }]\n TRIGGER trigger_name trigger_time trigger_event\n ON tbl_name FOR EACH ROW trigger_body\n\nThis statement creates a new trigger. A trigger is a named database\nobject that is associated with a table, and that activates when a\nparticular event occurs for the table. The trigger becomes associated\nwith the table named tbl_name, which must refer to a permanent table.\nYou cannot associate a trigger with a TEMPORARY table or a view.\n\nCREATE TRIGGER requires the TRIGGER privilege for the table associated\nwith the trigger. The statement might also require the SUPER privilege,\ndepending on the DEFINER value, as described later in this section. If\nbinary logging is enabled, CREATE TRIGGER might require the SUPER\nprivilege, as described in\nhttps://mariadb.com/kb/en/binary-logging-of-stored-routines/.\n\nThe DEFINER clause determines the security context to be used when\nchecking access privileges at trigger activation time. See later in\nthis section for more information.\n\ntrigger_time is the trigger action time. It can be BEFORE or AFTER to\nindicate that the trigger activates before or after each row to be\nmodified.\n\ntrigger_event indicates the kind of statement that activates the\ntrigger. The trigger_event can be one of the following:\n\no INSERT: The trigger is activated whenever a new row is inserted into\n the table; for example, through INSERT, LOAD DATA, and REPLACE\n statements.\n\no UPDATE: The trigger is activated whenever a row is modified; for\n example, through UPDATE statements.\n\no DELETE: The trigger is activated whenever a row is deleted from the\n table; for example, through DELETE and REPLACE statements. However,\n DROP TABLE and TRUNCATE TABLE statements on the table do not activate\n this trigger, because they do not use DELETE. Dropping a partition\n does not activate DELETE triggers, either. See [HELP TRUNCATE TABLE].\n\nURL: https://mariadb.com/kb/en/create-trigger/\n\n','','https://mariadb.com/kb/en/create-trigger/'),(23,'MONTH',31,'Syntax:\nMONTH(date)\n\nReturns the month for date, in the range 1 to 12 for January to\nDecember, or 0 for dates such as \'0000-00-00\' or \'2008-00-00\' that have\na zero month part.\n\nURL: https://mariadb.com/kb/en/month/\n\n','MariaDB> SELECT MONTH(\'2008-02-03\');\n -> 2\n','https://mariadb.com/kb/en/month/'),(24,'TINYINT',22,'TINYINT[(M)] [UNSIGNED] [ZEROFILL]\n\nA very small integer. The signed range is -128 to 127. The unsigned\nrange is 0 to 255.\n\nURL: https://mariadb.com/kb/en/tinyint/\n\n','','https://mariadb.com/kb/en/tinyint/'),(25,'SHOW TRIGGERS',26,'Syntax:\nSHOW TRIGGERS [{FROM | IN} db_name]\n [LIKE \'pattern\' | WHERE expr]\n\nSHOW TRIGGERS lists the triggers currently defined for tables in a\ndatabase (the default database unless a FROM clause is given). This\nstatement returns results only for databases and tables for which you\nhave the TRIGGER privilege. The LIKE clause, if present, indicates\nwhich table names to match and causes the statement to display triggers\nfor those tables. The WHERE clause can be given to select rows using\nmore general conditions, as discussed in\nhttps://mariadb.com/kb/en/extended-show/.\n\nFor the trigger ins_sum as defined in\nhttps://mariadb.com/kb/en/triggers/, the output of\nthis statement is as shown here:\n\nMariaDB> SHOW TRIGGERS LIKE \'acc%\'\\G\n*************************** 1. row ***************************\n Trigger: ins_sum\n Event: INSERT\n Table: account\n Statement: SET @sum = @sum + NEW.amount\n Timing: BEFORE\n Created: NULL\n sql_mode:\n Definer: myname@localhost\ncharacter_set_client: latin1\ncollation_connection: latin1_swedish_ci\n Database Collation: latin1_swedish_ci\n\ncharacter_set_client is the session value of the character_set_client\nsystem variable when the trigger was created. collation_connection is\nthe session value of the collation_connection system variable when the\ntrigger was created. Database Collation is the collation of the\ndatabase with which the trigger is associated.\n\nURL: https://mariadb.com/kb/en/show-triggers/\n\n','','https://mariadb.com/kb/en/show-triggers/'),(26,'MASTER_POS_WAIT',14,'Syntax:\nMASTER_POS_WAIT(log_name,log_pos[,timeout])\n\nThis function is useful for control of master/slave synchronization. It\nblocks until the slave has read and applied all updates up to the\nspecified position in the master log. The return value is the number of\nlog events the slave had to wait for to advance to the specified\nposition. The function returns NULL if the slave SQL thread is not\nstarted, the slave\'s master information is not initialized, the\narguments are incorrect, or an error occurs. It returns -1 if the\ntimeout has been exceeded. If the slave SQL thread stops while\nMASTER_POS_WAIT() is waiting, the function returns NULL. If the slave\nis past the specified position, the function returns immediately.\n\nIf a timeout value is specified, MASTER_POS_WAIT() stops waiting when\ntimeout seconds have elapsed. timeout must be greater than 0; a zero or\nnegative timeout means no timeout.\n\nURL: https://mariadb.com/kb/en/master_pos_wait/\n\n','','https://mariadb.com/kb/en/master_pos_wait/'),(27,'REGEXP',37,'Syntax:\nexpr REGEXP pat, expr RLIKE pat\n\nPerforms a pattern match of a string expression expr against a pattern\npat. The pattern can be an extended regular expression. The syntax for\nregular expressions is discussed in\nhttps://mariadb.com/kb/en/regexp/. Returns 1 if expr\nmatches pat; otherwise it returns 0. If either expr or pat is NULL, the\nresult is NULL. RLIKE is a synonym for REGEXP, provided for mSQL\ncompatibility.\n\nThe pattern need not be a literal string. For example, it can be\nspecified as a string expression or table column.\n\n*Note*: Because MySQL uses the C escape syntax in strings (for example,\n\"\\n\" to represent the newline character), you must double any \"\\\" that\nyou use in your REGEXP strings.\n\nREGEXP is not case sensitive, except when used with binary strings.\n\nURL: https://mariadb.com/kb/en/regexp/\n\n','MariaDB> SELECT \'Monty!\' REGEXP \'.*\';\n -> 1\nMariaDB> SELECT \'new*\\n*line\' REGEXP \'new\\\\*.\\\\*line\';\n -> 1\nMariaDB> SELECT \'a\' REGEXP \'A\', \'a\' REGEXP BINARY \'A\';\n -> 1 0\nMariaDB> SELECT \'a\' REGEXP \'^[a-d]\';\n -> 1\n','https://mariadb.com/kb/en/regexp/'),(28,'IF STATEMENT',23,'Syntax:\nIF search_condition THEN statement_list\n [ELSEIF search_condition THEN statement_list] ...\n [ELSE statement_list]\nEND IF\n\nThe IF statement for stored programs implements a basic conditional\nconstruct.\n\n*Note*: There is also an IF() function, which differs from the IF\nstatement described here. See\nhttps://mariadb.com/kb/en/if-function/. The\nIF statement can have THEN, ELSE, and ELSEIF clauses, and it is\nterminated with END IF.\n\nIf the search_condition evaluates to true, the corresponding THEN or\nELSEIF clause statement_list executes. If no search_condition matches,\nthe ELSE clause statement_list executes.\n\nEach statement_list consists of one or more SQL statements; an empty\nstatement_list is not permitted.\n\nURL: https://mariadb.com/kb/en/if-statement/\n\n','','https://mariadb.com/kb/en/if-statement/'),(29,'^',19,'Syntax:\n^\n\nBitwise XOR:\n\nURL: https://mariadb.com/kb/en/bitwise-xor/\n\n','MariaDB> SELECT 1 ^ 1;\n -> 0\nMariaDB> SELECT 1 ^ 0;\n -> 1\nMariaDB> SELECT 11 ^ 3;\n -> 8\n','https://mariadb.com/kb/en/bitwise-xor/'),(30,'DROP VIEW',39,'Syntax:\nDROP VIEW [IF EXISTS]\n view_name [, view_name] ...\n [RESTRICT | CASCADE]\n\nDROP VIEW removes one or more views. You must have the DROP privilege\nfor each view. If any of the views named in the argument list do not\nexist, MySQL returns an error indicating by name which nonexisting\nviews it was unable to drop, but it also drops all of the views in the\nlist that do exist.\n\nThe IF EXISTS clause prevents an error from occurring for views that\ndon\'t exist. When this clause is given, a NOTE is generated for each\nnonexistent view. See [HELP SHOW WARNINGS].\n\nRESTRICT and CASCADE, if given, are parsed and ignored.\n\nURL: https://mariadb.com/kb/en/drop-view/\n\n','','https://mariadb.com/kb/en/drop-view/'),(31,'WITHIN',30,'Within(g1,g2)\n\nReturns 1 or 0 to indicate whether g1 is spatially within g2. This\ntests the opposite relationship as Contains().\n\nURL: https://mariadb.com/kb/en/within/\n\n','','https://mariadb.com/kb/en/within/'),(32,'WEEK',31,'Syntax:\nWEEK(date[,mode])\n\nThis function returns the week number for date. The two-argument form\nof WEEK() enables you to specify whether the week starts on Sunday or\nMonday and whether the return value should be in the range from 0 to 53\nor from 1 to 53. If the mode argument is omitted, the value of the\ndefault_week_format system variable is used. See\nhttps://mariadb.com/kb/en/server-system-variables/.\n\nURL: https://mariadb.com/kb/en/week/\n\n','MariaDB> SELECT WEEK(\'2008-02-20\');\n -> 7\nMariaDB> SELECT WEEK(\'2008-02-20\',0);\n -> 7\nMariaDB> SELECT WEEK(\'2008-02-20\',1);\n -> 8\nMariaDB> SELECT WEEK(\'2008-12-31\',1);\n -> 53\n','https://mariadb.com/kb/en/week/'),(33,'SHOW PLUGINS',26,'Syntax:\nSHOW PLUGINS\n\nSHOW PLUGINS displays information about server plugins. Plugin\ninformation is also available in the INFORMATION_SCHEMA.PLUGINS table.\nSee https://mariadb.com/kb/en/information_schemaplugins-table/.\n\nExample of SHOW PLUGINS output:\n\nMariaDB> SHOW PLUGINS\\G\n*************************** 1. row ***************************\n Name: binlog\n Status: ACTIVE\n Type: STORAGE ENGINE\nLibrary: NULL\nLicense: GPL\n*************************** 2. row ***************************\n Name: CSV\n Status: ACTIVE\n Type: STORAGE ENGINE\nLibrary: NULL\nLicense: GPL\n*************************** 3. row ***************************\n Name: MEMORY\n Status: ACTIVE\n Type: STORAGE ENGINE\nLibrary: NULL\nLicense: GPL\n*************************** 4. row ***************************\n Name: MyISAM\n Status: ACTIVE\n Type: STORAGE ENGINE\nLibrary: NULL\nLicense: GPL\n...\n\nURL: https://mariadb.com/kb/en/show-plugins/\n\n','','https://mariadb.com/kb/en/show-plugins/'),(34,'DROP FUNCTION UDF',21,'Syntax:\nDROP FUNCTION function_name\n\nThis statement drops the user-defined function (UDF) named\nfunction_name.\n\nTo drop a function, you must have the DELETE privilege for the mysql\ndatabase. This is because DROP FUNCTION removes a row from the\nmysql.func system table that records the function\'s name, type, and\nshared library name.\n\nURL: https://mariadb.com/kb/en/drop-function-udf/\n\n','','https://mariadb.com/kb/en/drop-function-udf/'),(35,'PREPARE',8,'Syntax:\nPREPARE stmt_name FROM preparable_stmt\n\nThe PREPARE statement prepares a statement and assigns it a name,\nstmt_name, by which to refer to the statement later. Statement names\nare not case sensitive. preparable_stmt is either a string literal or a\nuser variable that contains the text of the statement. The text must\nrepresent a single SQL statement, not multiple statements. Within the\nstatement, \"?\" characters can be used as parameter markers to indicate\nwhere data values are to be bound to the query later when you execute\nit. The \"?\" characters should not be enclosed within quotation marks,\neven if you intend to bind them to string values. Parameter markers can\nbe used only where data values should appear, not for SQL keywords,\nidentifiers, and so forth.\n\nIf a prepared statement with the given name already exists, it is\ndeallocated implicitly before the new statement is prepared. This means\nthat if the new statement contains an error and cannot be prepared, an\nerror is returned and no statement with the given name exists.\n\nA prepared statement is executed with EXECUTE and released with\nDEALLOCATE PREPARE.\n\nThe scope of a prepared statement is the session within which it is\ncreated. Other sessions cannot see it.\n\nURL: https://mariadb.com/kb/en/prepare-statement/\n\n','','https://mariadb.com/kb/en/prepare-statement/'),(36,'LOCK',8,'Syntax:\nLOCK TABLES\n tbl_name [[AS] alias] lock_type\n [, tbl_name [[AS] alias] lock_type] ...\n\nlock_type:\n READ [LOCAL]\n | [LOW_PRIORITY] WRITE\n\nUNLOCK TABLES\n\nMySQL enables client sessions to acquire table locks explicitly for the\npurpose of cooperating with other sessions for access to tables, or to\nprevent other sessions from modifying tables during periods when a\nsession requires exclusive access to them. A session can acquire or\nrelease locks only for itself. One session cannot acquire locks for\nanother session or release locks held by another session.\n\nLocks may be used to emulate transactions or to get more speed when\nupdating tables. This is explained in more detail later in this\nsection.\n\nLOCK TABLES explicitly acquires table locks for the current client\nsession. Table locks can be acquired for base tables or views. You must\nhave the LOCK TABLES privilege, and the SELECT privilege for each\nobject to be locked.\n\nFor view locking, LOCK TABLES adds all base tables used in the view to\nthe set of tables to be locked and locks them automatically. If you\nlock a table explicitly with LOCK TABLES, any tables used in triggers\nare also locked implicitly, as described in\nhttps://mariadb.com/kb/en/triggers-and-implicit-locks/.\n\nUNLOCK TABLES explicitly releases any table locks held by the current\nsession. LOCK TABLES implicitly releases any table locks held by the\ncurrent session before acquiring new locks.\n\nAnother use for UNLOCK TABLES is to release the global read lock\nacquired with the FLUSH TABLES WITH READ LOCK statement, which enables\nyou to lock all tables in all databases. See [HELP FLUSH]. (This is a\nvery convenient way to get backups if you have a file system such as\nVeritas that can take snapshots in time.)\n\nURL: https://mariadb.com/kb/en/transactions-lock/\n\n','','https://mariadb.com/kb/en/transactions-lock/'),(37,'UPDATEXML',37,'Syntax:\nUpdateXML(xml_target, xpath_expr, new_xml)\n\nThis function replaces a single portion of a given fragment of XML\nmarkup xml_target with a new XML fragment new_xml, and then returns the\nchanged XML. The portion of xml_target that is replaced matches an\nXPath expression xpath_expr supplied by the user. In MySQL 5.5, the\nXPath expression can contain at most 127 characters. (This limitation\nis lifted in MySQL 5.6.)\n\nIf no expression matching xpath_expr is found, or if multiple matches\nare found, the function returns the original xml_target XML fragment.\nAll three arguments should be strings.\n\nURL: https://mariadb.com/kb/en/updatexml/\n\n','MariaDB> SELECT\n -> UpdateXML(\'<a><b>ccc</b><d></d></a>\', \'/a\', \'<e>fff</e>\') AS val1,\n -> UpdateXML(\'<a><b>ccc</b><d></d></a>\', \'/b\', \'<e>fff</e>\') AS val2,\n -> UpdateXML(\'<a><b>ccc</b><d></d></a>\', \'//b\', \'<e>fff</e>\') AS val3,\n -> UpdateXML(\'<a><b>ccc</b><d></d></a>\', \'/a/d\', \'<e>fff</e>\') AS val4,\n -> UpdateXML(\'<a><d></d><b>ccc</b><d></d></a>\', \'/a/d\', \'<e>fff</e>\') AS val5\n -> \\G\n\n*************************** 1. row ***************************\nval1: <e>fff</e>\nval2: <a><b>ccc</b><d></d></a>\nval3: <a><e>fff</e><d></d></a>\nval4: <a><b>ccc</b><e>fff</e></a>\nval5: <a><d></d><b>ccc</b><d></d></a>\n','https://mariadb.com/kb/en/updatexml/'),(38,'RESET SLAVE',8,'Syntax:\nRESET SLAVE [ALL]\n\nRESET SLAVE makes the slave forget its replication position in the\nmaster\'s binary log. This statement is meant to be used for a clean\nstart: It deletes the master.info and relay-log.info files, all the\nrelay log files, and starts a new relay log file. To use RESET SLAVE,\nthe slave replication threads must be stopped (use STOP SLAVE if\nnecessary).\n\n*Note*: All relay log files are deleted, even if they have not been\ncompletely executed by the slave SQL thread. (This is a condition\nlikely to exist on a replication slave if you have issued a STOP SLAVE\nstatement or if the slave is highly loaded.)\n\nIn MySQL 5.5 (unlike the case in MySQL 5.1 and earlier), RESET SLAVE\ndoes not change any replication connection parameters such as master\nhost, master port, master user, or master password, which are retained\nin memory. This means that START SLAVE can be issued without requiring\na CHANGE MASTER TO statement following RESET SLAVE.\n\nIn MySQL 5.5.16 and later, you can use RESET SLAVE ALL to reset these\nconnection parameters (Bug #11809016). Connection parameters are also\nreset if the slave mysqld is shut down.\n\nIf the slave SQL thread was in the middle of replicating temporary\ntables when it was stopped, and RESET SLAVE is issued, these replicated\ntemporary tables are deleted on the slave.\n\nURL: https://mariadb.com/kb/en/reset-slave-connection_name/\n\n','','https://mariadb.com/kb/en/reset-slave-connection_name/'),(39,'SHOW BINARY LOGS',26,'Syntax:\nSHOW BINARY LOGS\nSHOW MASTER LOGS\n\nLists the binary log files on the server. This statement is used as\npart of the procedure described in [HELP PURGE BINARY LOGS], that shows\nhow to determine which logs can be purged.\n\nMariaDB> SHOW BINARY LOGS;\n+---------------+-----------+\n| Log_name | File_size |\n+---------------+-----------+\n| binlog.000015 | 724935 |\n| binlog.000016 | 733481 |\n+---------------+-----------+\n\nURL: https://mariadb.com/kb/en/show-binary-logs/\n\n','','https://mariadb.com/kb/en/show-binary-logs/'),(40,'POLYGON',24,'Polygon(ls1,ls2,...)\n\nConstructs a Polygon value from a number of LineString or WKB\nLineString arguments. If any argument does not represent a LinearRing\n(that is, not a closed and simple LineString), the return value is\nNULL.\n\nURL: https://mariadb.com/kb/en/polygon/\n\n','','https://mariadb.com/kb/en/polygon/'),(41,'MINUTE',31,'Syntax:\nMINUTE(time)\n\nReturns the minute for time, in the range 0 to 59.\n\nURL: https://mariadb.com/kb/en/minute/\n\n','MariaDB> SELECT MINUTE(\'2008-02-03 10:05:03\');\n -> 5\n','https://mariadb.com/kb/en/minute/'),(42,'DAY',31,'Syntax:\nDAY(date)\n\nDAY() is a synonym for DAYOFMONTH().\n\nURL: https://mariadb.com/kb/en/day/\n\n','','https://mariadb.com/kb/en/day/'),(43,'MID',37,'Syntax:\nMID(str,pos,len)\n\nMID(str,pos,len) is a synonym for SUBSTRING(str,pos,len).\n\nURL: https://mariadb.com/kb/en/mid/\n\n','','https://mariadb.com/kb/en/mid/'),(44,'UUID',14,'Syntax:\nUUID()\n\nReturns a Universal Unique Identifier (UUID) generated according to\n\"DCE 1.1: Remote Procedure Call\" (Appendix A) CAE (Common Applications\nEnvironment) Specifications published by The Open Group in October 1997\n(Document Number C706,\nhttp://www.opengroup.org/public/pubs/catalog/c706.htm).\n\nA UUID is designed as a number that is globally unique in space and\ntime. Two calls to UUID() are expected to generate two different\nvalues, even if these calls are performed on two separate computers\nthat are not connected to each other.\n\nA UUID is a 128-bit number represented by a utf8 string of five\nhexadecimal numbers in aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee format:\n\no The first three numbers are generated from a timestamp.\n\no The fourth number preserves temporal uniqueness in case the timestamp\n value loses monotonicity (for example, due to daylight saving time).\n\no The fifth number is an IEEE 802 node number that provides spatial\n uniqueness. A random number is substituted if the latter is not\n available (for example, because the host computer has no Ethernet\n card, or we do not know how to find the hardware address of an\n interface on your operating system). In this case, spatial uniqueness\n cannot be guaranteed. Nevertheless, a collision should have very low\n probability.\n\n Currently, the MAC address of an interface is taken into account only\n on FreeBSD and Linux. On other operating systems, MySQL uses a\n randomly generated 48-bit number.\n\nURL: https://mariadb.com/kb/en/uuid/\n\n','MariaDB> SELECT UUID();\n -> \'6ccd780c-baba-1026-9564-0040f4311e29\'\n','https://mariadb.com/kb/en/uuid/'),(45,'LINESTRING',24,'LineString(pt1,pt2,...)\n\nConstructs a LineString value from a number of Point or WKB Point\narguments. If the number of arguments is less than two, the return\nvalue is NULL.\n\nURL: https://mariadb.com/kb/en/linestring/\n\n','','https://mariadb.com/kb/en/linestring/'),(46,'SLEEP',14,'Syntax:\nSLEEP(duration)\n\nSleeps (pauses) for the number of seconds given by the duration\nargument, then returns 0. If SLEEP() is interrupted, it returns 1. The\nduration may have a fractional part given in microseconds.\n\nURL: https://mariadb.com/kb/en/sleep/\n\n','','https://mariadb.com/kb/en/sleep/'),(47,'CONNECTION_ID',17,'Syntax:\nCONNECTION_ID()\n\nReturns the connection ID (thread ID) for the connection. Every\nconnection has an ID that is unique among the set of currently\nconnected clients.\n\nURL: https://mariadb.com/kb/en/connection_id/\n\n','MariaDB> SELECT CONNECTION_ID();\n -> 23786\n','https://mariadb.com/kb/en/connection_id/'),(48,'DELETE',27,'Syntax:\nSingle-table syntax:\n\nDELETE [LOW_PRIORITY] [QUICK] [IGNORE] FROM tbl_name\n [WHERE where_condition]\n [ORDER BY ...]\n [LIMIT row_count]\n\nMultiple-table syntax:\n\nDELETE [LOW_PRIORITY] [QUICK] [IGNORE]\n tbl_name[.*] [, tbl_name[.*]] ...\n FROM table_references\n [WHERE where_condition]\n\nOr:\n\nDELETE [LOW_PRIORITY] [QUICK] [IGNORE]\n FROM tbl_name[.*] [, tbl_name[.*]] ...\n USING table_references\n [WHERE where_condition]\n\nFor the single-table syntax, the DELETE statement deletes rows from\ntbl_name and returns a count of the number of deleted rows. This count\ncan be obtained by calling the ROW_COUNT() function (see\nhttps://mariadb.com/kb/en/information-functions-row_count/). The\nWHERE clause, if given, specifies the conditions that identify which\nrows to delete. With no WHERE clause, all rows are deleted. If the\nORDER BY clause is specified, the rows are deleted in the order that is\nspecified. The LIMIT clause places a limit on the number of rows that\ncan be deleted.\n\nFor the multiple-table syntax, DELETE deletes from each tbl_name the\nrows that satisfy the conditions. In this case, ORDER BY and LIMIT\ncannot be used.\n\nwhere_condition is an expression that evaluates to true for each row to\nbe deleted. It is specified as described in\nhttps://mariadb.com/kb/en/select/.\n\nCurrently, you cannot delete from a table and select from the same\ntable in a subquery.\n\nYou need the DELETE privilege on a table to delete rows from it. You\nneed only the SELECT privilege for any columns that are only read, such\nas those named in the WHERE clause.\n\nAs stated, a DELETE statement with no WHERE clause deletes all rows. A\nfaster way to do this, when you do not need to know the number of\ndeleted rows, is to use TRUNCATE TABLE. However, within a transaction\nor if you have a lock on the table, TRUNCATE TABLE cannot be used\nwhereas DELETE can. See [HELP TRUNCATE TABLE], and [HELP LOCK].\n\nURL: https://mariadb.com/kb/en/delete/\n\n','','https://mariadb.com/kb/en/delete/'),(49,'ROUND',4,'Syntax:\nROUND(X), ROUND(X,D)\n\nRounds the argument X to D decimal places. The rounding algorithm\ndepends on the data type of X. D defaults to 0 if not specified. D can\nbe negative to cause D digits left of the decimal point of the value X\nto become zero.\n\nURL: https://mariadb.com/kb/en/round/\n\n','MariaDB> SELECT ROUND(-1.23);\n -> -1\nMariaDB> SELECT ROUND(-1.58);\n -> -2\nMariaDB> SELECT ROUND(1.58);\n -> 2\nMariaDB> SELECT ROUND(1.298, 1);\n -> 1.3\nMariaDB> SELECT ROUND(1.298, 0);\n -> 1\nMariaDB> SELECT ROUND(23.298, -1);\n -> 20\n','https://mariadb.com/kb/en/round/'),(50,'NULLIF',7,'Syntax:\nNULLIF(expr1,expr2)\n\nReturns NULL if expr1 = expr2 is true, otherwise returns expr1. This is\nthe same as CASE WHEN expr1 = expr2 THEN NULL ELSE expr1 END.\n\nURL: https://mariadb.com/kb/en/nullif/\n\n','MariaDB> SELECT NULLIF(1,1);\n -> NULL\nMariaDB> SELECT NULLIF(1,2);\n -> 1\n','https://mariadb.com/kb/en/nullif/'),(51,'CLOSE',23,'Syntax:\nCLOSE cursor_name\n\nThis statement closes a previously opened cursor. For an example, see\nhttps://mariadb.com/kb/en/cursor-overview/.\n\nAn error occurs if the cursor is not open.\n\nIf not closed explicitly, a cursor is closed at the end of the BEGIN\n... END block in which it was declared.\n\nURL: https://mariadb.com/kb/en/close/\n\n','','https://mariadb.com/kb/en/close/'),(52,'STOP SLAVE',8,'Syntax:\nSTOP SLAVE [thread_types]\n\nthread_types:\n [thread_type [, thread_type] ... ]\n\nthread_type: IO_THREAD | SQL_THREAD\n\nStops the slave threads. STOP SLAVE requires the SUPER privilege.\nRecommended best practice is to execute STOP SLAVE on the slave before\nstopping the slave server (see\nhttp://dev.mysql.com/doc/refman/5.5/en/server-shutdown.html, for more\ninformation).\n\nWhen using the row-based logging format: You should execute STOP SLAVE\non the slave prior to shutting down the slave server if you are\nreplicating any tables that use a nontransactional storage engine (see\nthe Note later in this section). In MySQL 5.5.9 and later, you can also\nuse STOP SLAVE SQL_THREAD for this purpose.\n\nLike START SLAVE, this statement may be used with the IO_THREAD and\nSQL_THREAD options to name the thread or threads to be stopped.\n\n*Note*: In MySQL 5.5, STOP SLAVE waits until the current replication\nevent group affecting one or more non-transactional tables has finished\nexecuting (if there is any such replication group), or until the user\nissues a KILL QUERY or KILL CONNECTION statement. (Bug #319, Bug\n#38205)\n\nURL: https://mariadb.com/kb/en/stop-slave/\n\n','','https://mariadb.com/kb/en/stop-slave/'),(53,'TIMEDIFF',31,'Syntax:\nTIMEDIFF(expr1,expr2)\n\nTIMEDIFF() returns expr1 - expr2 expressed as a time value. expr1 and\nexpr2 are time or date-and-time expressions, but both must be of the\nsame type.\n\nThe result returned by TIMEDIFF() is limited to the range allowed for\nTIME values. Alternatively, you can use either of the functions\nTIMESTAMPDIFF() and UNIX_TIMESTAMP(), both of which return integers.\n\nURL: https://mariadb.com/kb/en/timediff/\n\n','MariaDB> SELECT TIMEDIFF(\'2000:01:01 00:00:00\',\n -> \'2000:01:01 00:00:00.000001\');\n -> \'-00:00:00.000001\'\nMariaDB> SELECT TIMEDIFF(\'2008-12-31 23:59:59.000001\',\n -> \'2008-12-30 01:01:01.000002\');\n -> \'46:58:57.999999\'\n','https://mariadb.com/kb/en/timediff/'),(54,'REPLACE FUNCTION',37,'Syntax:\nREPLACE(str,from_str,to_str)\n\nReturns the string str with all occurrences of the string from_str\nreplaced by the string to_str. REPLACE() performs a case-sensitive\nmatch when searching for from_str.\n\nURL: https://mariadb.com/kb/en/replace-function/\n\n','MariaDB> SELECT REPLACE(\'www.mariadb.org\', \'w\', \'Ww\');\n -> \'WwWwWw.mariadb.org\'\n','https://mariadb.com/kb/en/replace-function/'),(55,'USE',28,'Syntax:\nUSE db_name\n\nThe USE db_name statement tells MySQL to use the db_name database as\nthe default (current) database for subsequent statements. The database\nremains the default until the end of the session or another USE\nstatement is issued:\n\nUSE db1;\nSELECT COUNT(*) FROM mytable; # selects from db1.mytable\nUSE db2;\nSELECT COUNT(*) FROM mytable; # selects from db2.mytable\n\nURL: https://mariadb.com/kb/en/use/\n\n','','https://mariadb.com/kb/en/use/'),(56,'LINEFROMTEXT',3,'LineFromText(wkt[,srid]), LineStringFromText(wkt[,srid])\n\nConstructs a LINESTRING value using its WKT representation and SRID.\n\nURL: https://mariadb.com/kb/en/linefromtext/\n\n','','https://mariadb.com/kb/en/linefromtext/'),(57,'CASE OPERATOR',7,'Syntax:\nCASE value WHEN [compare_value] THEN result [WHEN [compare_value] THEN\nresult ...] [ELSE result] END\n\nCASE WHEN [condition] THEN result [WHEN [condition] THEN result ...]\n[ELSE result] END\n\nThe first version returns the result where value=compare_value. The\nsecond version returns the result for the first condition that is true.\nIf there was no matching result value, the result after ELSE is\nreturned, or NULL if there is no ELSE part.\n\nURL: https://mariadb.com/kb/en/case-operator/\n\n','MariaDB> SELECT CASE 1 WHEN 1 THEN \'one\'\n -> WHEN 2 THEN \'two\' ELSE \'more\' END;\n -> \'one\'\nMariaDB> SELECT CASE WHEN 1>0 THEN \'true\' ELSE \'false\' END;\n -> \'true\'\nMariaDB> SELECT CASE BINARY \'B\'\n -> WHEN \'a\' THEN 1 WHEN \'b\' THEN 2 END;\n -> NULL\n','https://mariadb.com/kb/en/case-operator/'),(58,'SHOW MASTER STATUS',26,'Syntax:\nSHOW MASTER STATUS\n\nThis statement provides status information about the binary log files\nof the master. It requires either the SUPER or REPLICATION CLIENT\nprivilege.\n\nExample:\n\nMariaDB> SHOW MASTER STATUS;\n+---------------+----------+--------------+------------------+\n| File | Position | Binlog_Do_DB | Binlog_Ignore_DB |\n+---------------+----------+--------------+------------------+\n| mysql-bin.003 | 73 | test | manual,mysql |\n+---------------+----------+--------------+------------------+\n\nURL: https://mariadb.com/kb/en/show-master-status/\n\n','','https://mariadb.com/kb/en/show-master-status/'),(59,'ADDTIME',31,'Syntax:\nADDTIME(expr1,expr2)\n\nADDTIME() adds expr2 to expr1 and returns the result. expr1 is a time\nor datetime expression, and expr2 is a time expression.\n\nURL: https://mariadb.com/kb/en/addtime/\n\n','MariaDB> SELECT ADDTIME(\'2007-12-31 23:59:59.999999\', \'1 1:1:1.000002\');\n -> \'2008-01-02 01:01:01.000001\'\nMariaDB> SELECT ADDTIME(\'01:00:00.999999\', \'02:00:00.999998\');\n -> \'03:00:01.999997\'\n','https://mariadb.com/kb/en/addtime/'),(60,'SPATIAL',34,'For MyISAM tables, MySQL can create spatial indexes using syntax\nsimilar to that for creating regular indexes, but extended with the\nSPATIAL keyword. Currently, columns in spatial indexes must be declared\nNOT NULL. The following examples demonstrate how to create spatial\nindexes:\n\no With CREATE TABLE:\n\nCREATE TABLE geom (g GEOMETRY NOT NULL, SPATIAL INDEX(g)) ENGINE=MyISAM;\n\no With ALTER TABLE:\n\nALTER TABLE geom ADD SPATIAL INDEX(g);\n\no With CREATE INDEX:\n\nCREATE SPATIAL INDEX sp_index ON geom (g);\n\nFor MyISAM tables, SPATIAL INDEX creates an R-tree index. For storage\nengines that support nonspatial indexing of spatial columns, the engine\ncreates a B-tree index. A B-tree index on spatial values will be useful\nfor exact-value lookups, but not for range scans.\n\nFor more information on indexing spatial columns, see [HELP CREATE\nINDEX].\n\nTo drop spatial indexes, use ALTER TABLE or DROP INDEX:\n\no With ALTER TABLE:\n\nALTER TABLE geom DROP INDEX g;\n\no With DROP INDEX:\n\nDROP INDEX sp_index ON geom;\n\nExample: Suppose that a table geom contains more than 32,000\ngeometries, which are stored in the column g of type GEOMETRY. The\ntable also has an AUTO_INCREMENT column fid for storing object ID\nvalues.\n\nURL: https://mariadb.com/kb/en/spatial/\n\n','','https://mariadb.com/kb/en/spatial/'),(61,'TO_SECONDS',31,'Syntax:\nTO_SECONDS(expr)\n\nGiven a date or datetime expr, returns a the number of seconds since\nthe year 0. If expr is not a valid date or datetime value, returns\nNULL.\n\nURL: https://mariadb.com/kb/en/to_seconds/\n\n','MariaDB> SELECT TO_SECONDS(950501);\n -> 62966505600\nMariaDB> SELECT TO_SECONDS(\'2009-11-29\');\n -> 63426672000\nMariaDB> SELECT TO_SECONDS(\'2009-11-29 13:43:32\');\n -> 63426721412\nMariaDB> SELECT TO_SECONDS( NOW() );\n -> 63426721458\n','https://mariadb.com/kb/en/to_seconds/'),(62,'TIMESTAMPDIFF',31,'Syntax:\nTIMESTAMPDIFF(unit,datetime_expr1,datetime_expr2)\n\nReturns datetime_expr2 - datetime_expr1, where datetime_expr1 and\ndatetime_expr2 are date or datetime expressions. One expression may be\na date and the other a datetime; a date value is treated as a datetime\nhaving the time part \'00:00:00\' where necessary. The unit for the\nresult (an integer) is given by the unit argument. The legal values for\nunit are the same as those listed in the description of the\nTIMESTAMPADD() function.\n\nURL: https://mariadb.com/kb/en/timestampdiff/\n\n','MariaDB> SELECT TIMESTAMPDIFF(MONTH,\'2003-02-01\',\'2003-05-01\');\n -> 3\nMariaDB> SELECT TIMESTAMPDIFF(YEAR,\'2002-05-01\',\'2001-01-01\');\n -> -1\nMariaDB> SELECT TIMESTAMPDIFF(MINUTE,\'2003-02-01\',\'2003-05-01 12:05:55\');\n -> 128885\n','https://mariadb.com/kb/en/timestampdiff/'),(63,'UPPER',37,'Syntax:\nUPPER(str)\n\nReturns the string str with all characters changed to uppercase\naccording to the current character set mapping. The default is latin1\n(cp1252 West European).\n\nMariaDB> SELECT UPPER(\'Hej\');\n -> \'HEJ\'\n\nSee the description of LOWER() for information that also applies to\nUPPER(), such as information about how to perform lettercase conversion\nof binary strings (BINARY, VARBINARY, BLOB) for which these functions\nare ineffective.\n\nURL: https://mariadb.com/kb/en/upper/\n\n','','https://mariadb.com/kb/en/upper/'),(64,'FROM_UNIXTIME',31,'Syntax:\nFROM_UNIXTIME(unix_timestamp), FROM_UNIXTIME(unix_timestamp,format)\n\nReturns a representation of the unix_timestamp argument as a value in\n\'YYYY-MM-DD HH:MM:SS\' or YYYYMMDDHHMMSS.uuuuuu format, depending on\nwhether the function is used in a string or numeric context. The value\nis expressed in the current time zone. unix_timestamp is an internal\ntimestamp value such as is produced by the UNIX_TIMESTAMP() function.\n\nIf format is given, the result is formatted according to the format\nstring, which is used the same way as listed in the entry for the\nDATE_FORMAT() function.\n\nURL: https://mariadb.com/kb/en/from_unixtime/\n\n','MariaDB> SELECT FROM_UNIXTIME(1196440219);\n -> \'2007-11-30 10:30:19\'\nMariaDB> SELECT FROM_UNIXTIME(1196440219) + 0;\n -> 20071130103019.000000\nMariaDB> SELECT FROM_UNIXTIME(UNIX_TIMESTAMP(),\n -> \'%Y %D %M %h:%i:%s %x\');\n -> \'2007 30th November 10:30:59 2007\'\n','https://mariadb.com/kb/en/from_unixtime/'),(65,'MEDIUMBLOB',22,'MEDIUMBLOB\n\nA BLOB column with a maximum length of 16,777,215 (224 - 1) bytes. Each\nMEDIUMBLOB value is stored using a 3-byte length prefix that indicates\nthe number of bytes in the value.\n\nURL: https://mariadb.com/kb/en/mediumblob/\n\n','','https://mariadb.com/kb/en/mediumblob/'),(66,'SHA2',12,'Syntax:\nSHA2(str, hash_length)\n\nCalculates the SHA-2 family of hash functions (SHA-224, SHA-256,\nSHA-384, and SHA-512). The first argument is the cleartext string to be\nhashed. The second argument indicates the desired bit length of the\nresult, which must have a value of 224, 256, 384, 512, or 0 (which is\nequivalent to 256). If either argument is NULL or the hash length is\nnot one of the permitted values, the return value is NULL. Otherwise,\nthe function result is a hash value containing the desired number of\nbits. See the notes at the beginning of this section about storing hash\nvalues efficiently.\n\nAs of MySQL 5.5.6, the return value is a nonbinary string in the\nconnection character set. Before 5.5.6, the return value is a binary\nstring; see the notes at the beginning of this section about using the\nvalue as a nonbinary string.\n\nURL: https://mariadb.com/kb/en/sha2/\n\n','MariaDB> SELECT SHA2(\'abc\', 224);\n -> \'23097d223405d8228642a477bda255b32aadbce4bda0b3f7e36c9da7\'\n','https://mariadb.com/kb/en/sha2/'),(67,'IFNULL',7,'Syntax:\nIFNULL(expr1,expr2)\n\nIf expr1 is not NULL, IFNULL() returns expr1; otherwise it returns\nexpr2. IFNULL() returns a numeric or string value, depending on the\ncontext in which it is used.\n\nURL: https://mariadb.com/kb/en/ifnull/\n\n','MariaDB> SELECT IFNULL(1,0);\n -> 1\nMariaDB> SELECT IFNULL(NULL,10);\n -> 10\nMariaDB> SELECT IFNULL(1/0,10);\n -> 10\nMariaDB> SELECT IFNULL(1/0,\'yes\');\n -> \'yes\'\n','https://mariadb.com/kb/en/ifnull/'),(68,'SHOW FUNCTION CODE',26,'Syntax:\nSHOW FUNCTION CODE func_name\n\nThis statement is similar to SHOW PROCEDURE CODE but for stored\nfunctions. See [HELP SHOW PROCEDURE CODE].\n\nURL: https://mariadb.com/kb/en/show-function-code/\n\n','','https://mariadb.com/kb/en/show-function-code/'),(69,'SHOW ERRORS',26,'Syntax:\nSHOW ERRORS [LIMIT [offset,] row_count]\nSHOW COUNT(*) ERRORS\n\nThis statement is similar to SHOW WARNINGS, except that it displays\ninformation only for errors, rather than for errors, warnings, and\nnotes.\n\nThe LIMIT clause has the same syntax as for the SELECT statement. See\nhttps://mariadb.com/kb/en/select/.\n\nThe SHOW COUNT(*) ERRORS statement displays the number of errors. You\ncan also retrieve this number from the error_count variable:\n\nSHOW COUNT(*) ERRORS;\nSELECT @@error_count;\n\nSHOW ERRORS and error_count apply only to errors, not warnings or\nnotes. In other respects, they are similar to SHOW WARNINGS and\nwarning_count. In particular, SHOW ERRORS cannot display information\nfor more than max_error_count messages, and error_count can exceed the\nvalue of max_error_count if the number of errors exceeds\nmax_error_count.\n\nURL: https://mariadb.com/kb/en/show-errors/\n\n','','https://mariadb.com/kb/en/show-errors/'),(70,'LEAST',18,'Syntax:\nLEAST(value1,value2,...)\n\nWith two or more arguments, returns the smallest (minimum-valued)\nargument. The arguments are compared using the following rules:\n\no If any argument is NULL, the result is NULL. No comparison is needed.\n\no If the return value is used in an INTEGER context or all arguments\n are integer-valued, they are compared as integers.\n\no If the return value is used in a REAL context or all arguments are\n real-valued, they are compared as reals.\n\no If the arguments comprise a mix of numbers and strings, they are\n compared as numbers.\n\no If any argument is a nonbinary (character) string, the arguments are\n compared as nonbinary strings.\n\no In all other cases, the arguments are compared as binary strings.\n\nURL: https://mariadb.com/kb/en/least/\n\n','MariaDB> SELECT LEAST(2,0);\n -> 0\nMariaDB> SELECT LEAST(34.0,3.0,5.0,767.0);\n -> 3.0\nMariaDB> SELECT LEAST(\'B\',\'A\',\'C\');\n -> \'A\'\n','https://mariadb.com/kb/en/least/'),(71,'=',18,'=\n\nEqual:\n\nURL: https://mariadb.com/kb/en/equal/\n\n','MariaDB> SELECT 1 = 0;\n -> 0\nMariaDB> SELECT \'0\' = 0;\n -> 1\nMariaDB> SELECT \'0.0\' = 0;\n -> 1\nMariaDB> SELECT \'0.01\' = 0;\n -> 0\nMariaDB> SELECT \'.01\' = 0.01;\n -> 1\n','https://mariadb.com/kb/en/equal/'),(72,'REVERSE',37,'Syntax:\nREVERSE(str)\n\nReturns the string str with the order of the characters reversed.\n\nURL: https://mariadb.com/kb/en/reverse/\n\n','MariaDB> SELECT REVERSE(\'abc\');\n -> \'cba\'\n','https://mariadb.com/kb/en/reverse/'),(73,'ISNULL',18,'Syntax:\nISNULL(expr)\n\nIf expr is NULL, ISNULL() returns 1, otherwise it returns 0.\n\nURL: https://mariadb.com/kb/en/isnull/\n\n','MariaDB> SELECT ISNULL(1+1);\n -> 0\nMariaDB> SELECT ISNULL(1/0);\n -> 1\n','https://mariadb.com/kb/en/isnull/'),(74,'BINARY',22,'BINARY(M)\n\nThe BINARY type is similar to the CHAR type, but stores binary byte\nstrings rather than nonbinary character strings. M represents the\ncolumn length in bytes.\n\nURL: https://mariadb.com/kb/en/binary/\n\n','','https://mariadb.com/kb/en/binary/'),(75,'BLOB DATA TYPE',22,'A BLOB is a binary large object that can hold a variable amount of\ndata. The four BLOB types are TINYBLOB, BLOB, MEDIUMBLOB, and LONGBLOB.\nThese differ only in the maximum length of the values they can hold.\nThe four TEXT types are TINYTEXT, TEXT, MEDIUMTEXT, and LONGTEXT. These\ncorrespond to the four BLOB types and have the same maximum lengths and\nstorage requirements. See\nhttps://mariadb.com/kb/en/data-type-storage-requirements/.\n\nURL: https://mariadb.com/kb/en/sql_language-data_types-blob/\n\n','','https://mariadb.com/kb/en/sql_language-data_types-blob/'),(76,'BOUNDARY',36,'Boundary(g)\n\nReturns a geometry that is the closure of the combinatorial boundary of\nthe geometry value g.\n\nURL: https://mariadb.com/kb/en/boundary/\n\n','','https://mariadb.com/kb/en/boundary/'),(77,'CREATE USER',10,'Syntax:\nCREATE USER user_specification\n [, user_specification] ...\n\nuser_specification:\n user\n [\n IDENTIFIED BY [PASSWORD] \'password\'\n | IDENTIFIED WITH auth_plugin [AS \'auth_string\']\n ]\n\nThe CREATE USER statement creates new MySQL accounts. To use it, you\nmust have the global CREATE USER privilege or the INSERT privilege for\nthe mysql database. For each account, CREATE USER creates a new row in\nthe mysql.user table and assigns the account no privileges. An error\noccurs if the account already exists.\n\nEach account name uses the format described in\nhttps://mariadb.com/kb/en/create-user#account-names. For example:\n\nCREATE USER \'jeffrey\'@\'localhost\' IDENTIFIED BY \'mypass\';\n\nIf you specify only the user name part of the account name, a host name\npart of \'%\' is used.\n\nThe user specification may indicate how the user should authenticate\nwhen connecting to the server:\n\no To enable the user to connect with no password (which is insecure),\n include no IDENTIFIED BY clause:\n\nCREATE USER \'jeffrey\'@\'localhost\';\n\n In this case, the account uses built-in authentication and clients\n must provide no password.\n\no To assign a password, use IDENTIFIED BY with the literal plaintext\n password value:\n\nCREATE USER \'jeffrey\'@\'localhost\' IDENTIFIED BY \'mypass\';\n\n The account uses built-in authentication and clients must match the\n given password.\n\no To avoid specifying the plaintext password if you know its hash value\n (the value that PASSWORD() would return for the password), specify\n the hash value preceded by the keyword PASSWORD:\n\nCREATE USER \'jeffrey\'@\'localhost\'\nIDENTIFIED BY PASSWORD \'*90E462C37378CED12064BB3388827D2BA3A9B689\';\n\n The account uses built-in authentication and clients must match the\n given password.\n\no To authenticate the account using a specific authentication plugin,\n use IDENTIFIED WITH, where auth_plugin is the plugin name. It can be\n an unquoted name or a quoted string literal. \'auth_string\' is an\n optional quoted string literal to pass to the plugin. The plugin\n interprets the meaning of the string, so its format is plugin\n specific. Consult the documentation for a given plugin for\n information about the authentication string values it accepts.\n\nCREATE USER \'jeffrey\'@\'localhost\'\nIDENTIFIED WITH my_auth_plugin;\n\n For connections that use this account, the server invokes the named\n plugin and clients must provide credentials as required for the\n authentication method that the plugin implements. If the server\n cannot find the plugin, either at account-creation time or connect\n time, an error occurs. IDENTIFIED WITH can be used as of MySQL 5.5.7.\n\nThe IDENTIFIED BY and IDENTIFIED WITH clauses are mutually exclusive,\nso at most one of them can be specified for a given user.\n\nFor additional information about setting passwords, see\nhttps://mariadb.com/kb/en/create-user/.\n\nURL: https://mariadb.com/kb/en/create-user/\n\n','','https://mariadb.com/kb/en/create-user/'),(78,'POINT',24,'Point(x,y)\n\nConstructs a Point using its coordinates.\n\nURL: https://mariadb.com/kb/en/point/\n\n','','https://mariadb.com/kb/en/point/'),(79,'CURRENT_USER',17,'Syntax:\nCURRENT_USER, CURRENT_USER()\n\nReturns the user name and host name combination for the MySQL account\nthat the server used to authenticate the current client. This account\ndetermines your access privileges. The return value is a string in the\nutf8 character set.\n\nThe value of CURRENT_USER() can differ from the value of USER().\n\nURL: https://mariadb.com/kb/en/current_user/\n\n','MariaDB> SELECT USER();\n -> \'davida@localhost\'\nMariaDB> SELECT * FROM mysql.user;\nERROR 1044: Access denied for user \'\'@\'localhost\' to\ndatabase \'mysql\'\nMariaDB> SELECT CURRENT_USER();\n -> \'@localhost\'\n','https://mariadb.com/kb/en/current_user/'),(80,'LCASE',37,'Syntax:\nLCASE(str)\n\nLCASE() is a synonym for LOWER().\n\nURL: https://mariadb.com/kb/en/lcase/\n\n','','https://mariadb.com/kb/en/lcase/'),(81,'<=',18,'Syntax:\n<=\n\nLess than or equal:\n\nURL: https://mariadb.com/kb/en/less-than-or-equal/\n\n','MariaDB> SELECT 0.1 <= 2;\n -> 1\n','https://mariadb.com/kb/en/less-than-or-equal/'),(82,'SHOW PROFILES',26,'Syntax:\nSHOW PROFILES\n\nThe SHOW PROFILES statement, together with SHOW PROFILE, displays\nprofiling information that indicates resource usage for statements\nexecuted during the course of the current session. For more\ninformation, see [HELP SHOW PROFILE].\n\nURL: https://mariadb.com/kb/en/show-profiles/\n\n','','https://mariadb.com/kb/en/show-profiles/'),(83,'UPDATE',27,'Syntax:\nSingle-table syntax:\n\nUPDATE [LOW_PRIORITY] [IGNORE] table_reference\n SET col_name1={expr1|DEFAULT} [, col_name2={expr2|DEFAULT}] ...\n [WHERE where_condition]\n [ORDER BY ...]\n [LIMIT row_count]\n\nMultiple-table syntax:\n\nUPDATE [LOW_PRIORITY] [IGNORE] table_references\n SET col_name1={expr1|DEFAULT} [, col_name2={expr2|DEFAULT}] ...\n [WHERE where_condition]\n\nFor the single-table syntax, the UPDATE statement updates columns of\nexisting rows in the named table with new values. The SET clause\nindicates which columns to modify and the values they should be given.\nEach value can be given as an expression, or the keyword DEFAULT to set\na column explicitly to its default value. The WHERE clause, if given,\nspecifies the conditions that identify which rows to update. With no\nWHERE clause, all rows are updated. If the ORDER BY clause is\nspecified, the rows are updated in the order that is specified. The\nLIMIT clause places a limit on the number of rows that can be updated.\n\nFor the multiple-table syntax, UPDATE updates rows in each table named\nin table_references that satisfy the conditions. In this case, ORDER BY\nand LIMIT cannot be used.\n\nwhere_condition is an expression that evaluates to true for each row to\nbe updated. For expression syntax, see\nhttp://dev.mysql.com/doc/refman/5.5/en/expressions.html.\n\ntable_references and where_condition are is specified as described in\nhttps://mariadb.com/kb/en/select/.\n\nYou need the UPDATE privilege only for columns referenced in an UPDATE\nthat are actually updated. You need only the SELECT privilege for any\ncolumns that are read but not modified.\n\nThe UPDATE statement supports the following modifiers:\n\no With the LOW_PRIORITY keyword, execution of the UPDATE is delayed\n until no other clients are reading from the table. This affects only\n storage engines that use only table-level locking (such as MyISAM,\n MEMORY, and MERGE).\n\no With the IGNORE keyword, the update statement does not abort even if\n errors occur during the update. Rows for which duplicate-key\n conflicts occur are not updated. Rows for which columns are updated\n to values that would cause data conversion errors are updated to the\n closest valid values instead.\n\nURL: https://mariadb.com/kb/en/update/\n\n','','https://mariadb.com/kb/en/update/'),(84,'IS NOT NULL',18,'Syntax:\nIS NOT NULL\n\nTests whether a value is not NULL.\n\nURL: https://mariadb.com/kb/en/is-not-null/\n\n','MariaDB> SELECT 1 IS NOT NULL, 0 IS NOT NULL, NULL IS NOT NULL;\n -> 1, 1, 0\n','https://mariadb.com/kb/en/is-not-null/'),(85,'CASE STATEMENT',23,'Syntax:\nCASE case_value\n WHEN when_value THEN statement_list\n [WHEN when_value THEN statement_list] ...\n [ELSE statement_list]\nEND CASE\n\nOr:\n\nCASE\n WHEN search_condition THEN statement_list\n [WHEN search_condition THEN statement_list] ...\n [ELSE statement_list]\nEND CASE\n\nThe CASE statement for stored programs implements a complex conditional\nconstruct.\n\n*Note*: There is also a CASE expression, which differs from the CASE\nstatement described here. See\nhttps://mariadb.com/kb/en/case-operator/. The\nCASE statement cannot have an ELSE NULL clause, and it is terminated\nwith END CASE instead of END.\n\nFor the first syntax, case_value is an expression. This value is\ncompared to the when_value expression in each WHEN clause until one of\nthem is equal. When an equal when_value is found, the corresponding\nTHEN clause statement_list executes. If no when_value is equal, the\nELSE clause statement_list executes, if there is one.\n\nThis syntax cannot be used to test for equality with NULL because NULL\n= NULL is false. See\nhttps://mariadb.com/kb/en/null-values/.\n\nFor the second syntax, each WHEN clause search_condition expression is\nevaluated until one is true, at which point its corresponding THEN\nclause statement_list executes. If no search_condition is equal, the\nELSE clause statement_list executes, if there is one.\n\nIf no when_value or search_condition matches the value tested and the\nCASE statement contains no ELSE clause, a Case not found for CASE\nstatement error results.\n\nEach statement_list consists of one or more SQL statements; an empty\nstatement_list is not permitted.\n\nTo handle situations where no value is matched by any WHEN clause, use\nan ELSE containing an empty BEGIN ... END block, as shown in this\nexample. (The indentation used here in the ELSE clause is for purposes\nof clarity only, and is not otherwise significant.)\n\nDELIMITER |\n\nCREATE PROCEDURE p()\n BEGIN\n DECLARE v INT DEFAULT 1;\n\n CASE v\n WHEN 2 THEN SELECT v;\n WHEN 3 THEN SELECT 0;\n ELSE\n BEGIN\n END;\n END CASE;\n END;\n |\n\nURL: https://mariadb.com/kb/en/case-statement/\n\n','','https://mariadb.com/kb/en/case-statement/'),(86,'EXECUTE STATEMENT',8,'Syntax:\nEXECUTE stmt_name\n [USING @var_name [, @var_name] ...]\n\nAfter preparing a statement with PREPARE, you execute it with an\nEXECUTE statement that refers to the prepared statement name. If the\nprepared statement contains any parameter markers, you must supply a\nUSING clause that lists user variables containing the values to be\nbound to the parameters. Parameter values can be supplied only by user\nvariables, and the USING clause must name exactly as many variables as\nthe number of parameter markers in the statement.\n\nYou can execute a given prepared statement multiple times, passing\ndifferent variables to it or setting the variables to different values\nbefore each execution.\n\nURL: https://mariadb.com/kb/en/execute-statement/\n\n','','https://mariadb.com/kb/en/execute-statement/'),(87,'DROP INDEX',39,'Syntax:\nDROP [ONLINE|OFFLINE] INDEX index_name ON tbl_name\n\nDROP INDEX drops the index named index_name from the table tbl_name.\nThis statement is mapped to an ALTER TABLE statement to drop the index.\nSee [HELP ALTER TABLE].\n\nTo drop a primary key, the index name is always PRIMARY, which must be\nspecified as a quoted identifier because PRIMARY is a reserved word:\n\nDROP INDEX `PRIMARY` ON t;\n\nURL: https://mariadb.com/kb/en/drop-index/\n\n','','https://mariadb.com/kb/en/drop-index/'),(88,'MATCH AGAINST',37,'Syntax:\nMATCH (col1,col2,...) AGAINST (expr [search_modifier])\n\nMySQL has support for full-text indexing and searching:\n\no A full-text index in MySQL is an index of type FULLTEXT.\n\no Full-text indexes can be used only with MyISAM tables, and can be\n created only for CHAR, VARCHAR, or TEXT columns.\n\no A FULLTEXT index definition can be given in the CREATE TABLE\n statement when a table is created, or added later using ALTER TABLE\n or CREATE INDEX.\n\no For large data sets, it is much faster to load your data into a table\n that has no FULLTEXT index and then create the index after that, than\n to load data into a table that has an existing FULLTEXT index.\n\nFull-text searching is performed using MATCH() ... AGAINST syntax.\nMATCH() takes a comma-separated list that names the columns to be\nsearched. AGAINST takes a string to search for, and an optional\nmodifier that indicates what type of search to perform. The search\nstring must be a literal string, not a variable or a column name. There\nare three types of full-text searches:\n\no A natural language search interprets the search string as a phrase in\n natural human language (a phrase in free text). There are no special\n operators. The stopword list applies. In addition, words that are\n present in 50% or more of the rows are considered common and do not\n match.\n\n Full-text searches are natural language searches if the IN NATURAL\n LANGUAGE MODE modifier is given or if no modifier is given. For more\n information, see\n https://mariadb.com/kb/en/fulltext-index-overview#in-natural-language-mode\n .\n\no A boolean search interprets the search string using the rules of a\n special query language. The string contains the words to search for.\n It can also contain operators that specify requirements such that a\n word must be present or absent in matching rows, or that it should be\n weighted higher or lower than usual. Common words such as \"some\" or\n \"then\" are stopwords and do not match if present in the search\n string. The IN BOOLEAN MODE modifier specifies a boolean search. For\n more information, see\n https://mariadb.com/kb/en/fulltext-index-overview#in-boolean-mode.\n\no A query expansion search is a modification of a natural language\n search. The search string is used to perform a natural language\n search. Then words from the most relevant rows returned by the search\n are added to the search string and the search is done again. The\n query returns the rows from the second search. The IN NATURAL\n LANGUAGE MODE WITH QUERY EXPANSION or WITH QUERY EXPANSION modifier\n specifies a query expansion search. For more information, see\n https://mariadb.com/kb/en/fulltext-index-overview#with-query-expansion.\n\nURL: https://mariadb.com/kb/en/match-against/\n\n','MariaDB> SELECT id, body, MATCH (title,body) AGAINST\n -> (\'Security implications of running MySQL as root\'\n -> IN NATURAL LANGUAGE MODE) AS score\n -> FROM articles WHERE MATCH (title,body) AGAINST\n -> (\'Security implications of running MySQL as root\'\n -> IN NATURAL LANGUAGE MODE);\n+----+-------------------------------------+-----------------+\n| id | body | score |\n+----+-------------------------------------+-----------------+\n| 4 | 1. Never run mysqld as root. 2. ... | 1.5219271183014 |\n| 6 | When configured properly, MySQL ... | 1.3114095926285 |\n+----+-------------------------------------+-----------------+\n2 rows in set (0.00 sec)\n','https://mariadb.com/kb/en/match-against/'),(89,'CREATE EVENT',39,'Syntax:\nCREATE\n [DEFINER = { user | CURRENT_USER }]\n EVENT\n [IF NOT EXISTS]\n event_name\n ON SCHEDULE schedule\n [ON COMPLETION [NOT] PRESERVE]\n [ENABLE | DISABLE | DISABLE ON SLAVE]\n [COMMENT \'comment\']\n DO event_body;\n\nschedule:\n AT timestamp [+ INTERVAL interval] ...\n | EVERY interval\n [STARTS timestamp [+ INTERVAL interval] ...]\n [ENDS timestamp [+ INTERVAL interval] ...]\n\ninterval:\n quantity {YEAR | QUARTER | MONTH | DAY | HOUR | MINUTE |\n WEEK | SECOND | YEAR_MONTH | DAY_HOUR | DAY_MINUTE |\n DAY_SECOND | HOUR_MINUTE | HOUR_SECOND | MINUTE_SECOND}\n\nThis statement creates and schedules a new event. The event will not\nrun unless the Event Scheduler is enabled. For information about\nchecking Event Scheduler status and enabling it if necessary, see\nhttps://mariadb.com/kb/en/events/.\n\nCREATE EVENT requires the EVENT privilege for the schema in which the\nevent is to be created. It might also require the SUPER privilege,\ndepending on the DEFINER value, as described later in this section.\n\nThe minimum requirements for a valid CREATE EVENT statement are as\nfollows:\n\no The keywords CREATE EVENT plus an event name, which uniquely\n identifies the event in a database schema.\n\no An ON SCHEDULE clause, which determines when and how often the event\n executes.\n\no A DO clause, which contains the SQL statement to be executed by an\n event.\n\nThis is an example of a minimal CREATE EVENT statement:\n\nCREATE EVENT myevent\n ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR\n DO\n UPDATE myschema.mytable SET mycol = mycol + 1;\n\nThe previous statement creates an event named myevent. This event\nexecutes once---one hour following its creation---by running an SQL\nstatement that increments the value of the myschema.mytable table\'s\nmycol column by 1.\n\nThe event_name must be a valid MySQL identifier with a maximum length\nof 64 characters. Event names are not case sensitive, so you cannot\nhave two events named myevent and MyEvent in the same schema. In\ngeneral, the rules governing event names are the same as those for\nnames of stored routines. See\nhttps://mariadb.com/kb/en/identifier-names/.\n\nAn event is associated with a schema. If no schema is indicated as part\nof event_name, the default (current) schema is assumed. To create an\nevent in a specific schema, qualify the event name with a schema using\nschema_name.event_name syntax.\n\nURL: https://mariadb.com/kb/en/create-event/\n\n','','https://mariadb.com/kb/en/create-event/'),(90,'ABS',4,'Syntax:\nABS(X)\n\nReturns the absolute value of X.\n\nURL: https://mariadb.com/kb/en/abs/\n\n','MariaDB> SELECT ABS(2);\n -> 2\nMariaDB> SELECT ABS(-32);\n -> 32\n','https://mariadb.com/kb/en/abs/'),(91,'POLYFROMWKB',32,'PolyFromWKB(wkb[,srid]), PolygonFromWKB(wkb[,srid])\n\nConstructs a POLYGON value using its WKB representation and SRID.\n\nURL: https://mariadb.com/kb/en/polyfromwkb/\n\n','','https://mariadb.com/kb/en/polyfromwkb/'),(92,'NOT LIKE',37,'Syntax:\nexpr NOT LIKE pat [ESCAPE \'escape_char\']\n\nThis is the same as NOT (expr LIKE pat [ESCAPE \'escape_char\']).\n\nURL: https://mariadb.com/kb/en/not-like/\n\n','','https://mariadb.com/kb/en/not-like/'),(93,'SPACE',37,'Syntax:\nSPACE(N)\n\nReturns a string consisting of N space characters.\n\nURL: https://mariadb.com/kb/en/space/\n\n','MariaDB> SELECT SPACE(6);\n -> \' \'\n','https://mariadb.com/kb/en/space/'),(94,'MBR DEFINITION',6,'Its MBR (Minimum Bounding Rectangle), or Envelope. This is the bounding\ngeometry, formed by the minimum and maximum (X,Y) coordinates:\n\nURL: https://mariadb.com/kb/en/mbr-definition/\n\n','((MINX MINY, MAXX MINY, MAXX MAXY, MINX MAXY, MINX MINY))\n','https://mariadb.com/kb/en/mbr-definition/'),(95,'GEOMETRYCOLLECTION',24,'GeometryCollection(g1,g2,...)\n\nConstructs a GeometryCollection.\n\nURL: https://mariadb.com/kb/en/geometrycollection/\n\n','','https://mariadb.com/kb/en/geometrycollection/'),(96,'MAX',16,'Syntax:\nMAX([DISTINCT] expr)\n\nReturns the maximum value of expr. MAX() may take a string argument; in\nsuch cases, it returns the maximum string value. See\nhttps://mariadb.com/kb/en/max/. The DISTINCT\nkeyword can be used to find the maximum of the distinct values of expr,\nhowever, this produces the same result as omitting DISTINCT.\n\nMAX() returns NULL if there were no matching rows.\n\nURL: https://mariadb.com/kb/en/max/\n\n','MariaDB> SELECT student_name, MIN(test_score), MAX(test_score)\n -> FROM student\n -> GROUP BY student_name;\n','https://mariadb.com/kb/en/max/'),(97,'CREATE FUNCTION UDF',21,'Syntax:\nCREATE [AGGREGATE] FUNCTION function_name RETURNS {STRING|INTEGER|REAL|DECIMAL}\n SONAME shared_library_name\n\nA user-defined function (UDF) is a way to extend MySQL with a new\nfunction that works like a native (built-in) MySQL function such as\nABS() or CONCAT().\n\nfunction_name is the name that should be used in SQL statements to\ninvoke the function. The RETURNS clause indicates the type of the\nfunction\'s return value. DECIMAL is a legal value after RETURNS, but\ncurrently DECIMAL functions return string values and should be written\nlike STRING functions.\n\nshared_library_name is the basename of the shared object file that\ncontains the code that implements the function. The file must be\nlocated in the plugin directory. This directory is given by the value\nof the plugin_dir system variable. For more information, see\nhttp://dev.mysql.com/doc/refman/5.5/en/udf-compiling.html.\n\nTo create a function, you must have the INSERT privilege for the mysql\ndatabase. This is necessary because CREATE FUNCTION adds a row to the\nmysql.func system table that records the function\'s name, type, and\nshared library name. If you do not have this table, you should run the\nmysql_upgrade command to create it. See\nhttps://mariadb.com/kb/en/mysql_upgrade/.\n\nURL: https://mariadb.com/kb/en/create-function-udf/\n\n','','https://mariadb.com/kb/en/create-function-udf/'),(98,'*',4,'Syntax:\n*\n\nMultiplication:\n\nURL: https://mariadb.com/kb/en/multiplication-operator/\n\n','MariaDB> SELECT 3*5;\n -> 15\nMariaDB> SELECT 18014398509481984*18014398509481984.0;\n -> 324518553658426726783156020576256.0\nMariaDB> SELECT 18014398509481984*18014398509481984;\n -> 0\n','https://mariadb.com/kb/en/multiplication-operator/'),(99,'TIMESTAMP',22,'TIMESTAMP\n\nA timestamp. The range is \'1970-01-01 00:00:01\' UTC to \'2038-01-19\n03:14:07\' UTC. TIMESTAMP values are stored as the number of seconds\nsince the epoch (\'1970-01-01 00:00:00\' UTC). A TIMESTAMP cannot\nrepresent the value \'1970-01-01 00:00:00\' because that is equivalent to\n0 seconds from the epoch and the value 0 is reserved for representing\n\'0000-00-00 00:00:00\', the \"zero\" TIMESTAMP value.\n\nUnless specified otherwise, the first TIMESTAMP column in a table is\ndefined to be automatically set to the date and time of the most recent\nmodification if not explicitly assigned a value. This makes TIMESTAMP\nuseful for recording the timestamp of an INSERT or UPDATE operation.\nYou can also set any TIMESTAMP column to the current date and time by\nassigning it a NULL value, unless it has been defined with the NULL\nattribute to permit NULL values. The automatic initialization and\nupdating to the current date and time can be specified using DEFAULT\nCURRENT_TIMESTAMP and ON UPDATE CURRENT_TIMESTAMP clauses, as described\nin\nhttps://mariadb.com/kb/en/timestamp/.\n\n*Note*: The TIMESTAMP format that was used prior to MySQL 4.1 is not\nsupported in MySQL 5.5; see MySQL 3.23, 4.0, 4.1 Reference Manual for\ninformation regarding the old format.\n\nURL: https://mariadb.com/kb/en/timestamp/\n\n','','https://mariadb.com/kb/en/timestamp/'),(100,'DES_DECRYPT',12,'Syntax:\nDES_DECRYPT(crypt_str[,key_str])\n\nDecrypts a string encrypted with DES_ENCRYPT(). If an error occurs,\nthis function returns NULL.\n\nThis function works only if MySQL has been configured with SSL support.\nSee https://mariadb.com/kb/en/ssl-connections/.\n\nIf no key_str argument is given, DES_DECRYPT() examines the first byte\nof the encrypted string to determine the DES key number that was used\nto encrypt the original string, and then reads the key from the DES key\nfile to decrypt the message. For this to work, the user must have the\nSUPER privilege. The key file can be specified with the --des-key-file\nserver option.\n\nIf you pass this function a key_str argument, that string is used as\nthe key for decrypting the message.\n\nIf the crypt_str argument does not appear to be an encrypted string,\nMySQL returns the given crypt_str.\n\nURL: https://mariadb.com/kb/en/des_decrypt/\n\n','','https://mariadb.com/kb/en/des_decrypt/'),(101,'CACHE INDEX',26,'Syntax:\nCACHE INDEX\n tbl_index_list [, tbl_index_list] ...\n [PARTITION (partition_list | ALL)]\n IN key_cache_name\n\ntbl_index_list:\n tbl_name [[INDEX|KEY] (index_name[, index_name] ...)]\n\npartition_list:\n partition_name[, partition_name][, ...]\n\nThe CACHE INDEX statement assigns table indexes to a specific key\ncache. It is used only for MyISAM tables. After the indexes have been\nassigned, they can be preloaded into the cache if desired with LOAD\nINDEX INTO CACHE.\n\nThe following statement assigns indexes from the tables t1, t2, and t3\nto the key cache named hot_cache:\n\nMariaDB> CACHE INDEX t1, t2, t3 IN hot_cache;\n+---------+--------------------+----------+----------+\n| Table | Op | Msg_type | Msg_text |\n+---------+--------------------+----------+----------+\n| test.t1 | assign_to_keycache | status | OK |\n| test.t2 | assign_to_keycache | status | OK |\n| test.t3 | assign_to_keycache | status | OK |\n+---------+--------------------+----------+----------+\n\nURL: https://mariadb.com/kb/en/cache-index/\n\n','','https://mariadb.com/kb/en/cache-index/'),(102,'ENDPOINT',13,'EndPoint(ls)\n\nReturns the Point that is the endpoint of the LineString value ls.\n\nURL: https://mariadb.com/kb/en/endpoint/\n\n','MariaDB> SET @ls = \'LineString(1 1,2 2,3 3)\';\nMariaDB> SELECT AsText(EndPoint(GeomFromText(@ls)));\n+-------------------------------------+\n| AsText(EndPoint(GeomFromText(@ls))) |\n+-------------------------------------+\n| POINT(3 3) |\n+-------------------------------------+\n','https://mariadb.com/kb/en/endpoint/'),(103,'COMPRESS',12,'Syntax:\nCOMPRESS(string_to_compress)\n\nCompresses a string and returns the result as a binary string. This\nfunction requires MySQL to have been compiled with a compression\nlibrary such as zlib. Otherwise, the return value is always NULL. The\ncompressed string can be uncompressed with UNCOMPRESS().\n\nURL: https://mariadb.com/kb/en/compress/\n\n','MariaDB> SELECT LENGTH(COMPRESS(REPEAT(\'a\',1000)));\n -> 21\nMariaDB> SELECT LENGTH(COMPRESS(\'\'));\n -> 0\nMariaDB> SELECT LENGTH(COMPRESS(\'a\'));\n -> 13\nMariaDB> SELECT LENGTH(COMPRESS(REPEAT(\'a\',16)));\n -> 15\n','https://mariadb.com/kb/en/compress/'),(104,'INSERT',27,'Syntax:\nINSERT [LOW_PRIORITY | DELAYED | HIGH_PRIORITY] [IGNORE]\n [INTO] tbl_name [(col_name,...)]\n {VALUES | VALUE} ({expr | DEFAULT},...),(...),...\n [ ON DUPLICATE KEY UPDATE\n col_name=expr\n [, col_name=expr] ... ]\n\nOr:\n\nINSERT [LOW_PRIORITY | DELAYED | HIGH_PRIORITY] [IGNORE]\n [INTO] tbl_name\n SET col_name={expr | DEFAULT}, ...\n [ ON DUPLICATE KEY UPDATE\n col_name=expr\n [, col_name=expr] ... ]\n\nOr:\n\nINSERT [LOW_PRIORITY | HIGH_PRIORITY] [IGNORE]\n [INTO] tbl_name [(col_name,...)]\n SELECT ...\n [ ON DUPLICATE KEY UPDATE\n col_name=expr\n [, col_name=expr] ... ]\n\nINSERT inserts new rows into an existing table. The INSERT ... VALUES\nand INSERT ... SET forms of the statement insert rows based on\nexplicitly specified values. The INSERT ... SELECT form inserts rows\nselected from another table or tables. INSERT ... SELECT is discussed\nfurther in [HELP INSERT SELECT].\n\nURL: https://mariadb.com/kb/en/insert/\n\n','','https://mariadb.com/kb/en/insert/'),(105,'COUNT',16,'Syntax:\nCOUNT(expr)\n\nReturns a count of the number of non-NULL values of expr in the rows\nretrieved by a SELECT statement. The result is a BIGINT value.\n\nCOUNT() returns 0 if there were no matching rows.\n\nURL: https://mariadb.com/kb/en/count/\n\n','MariaDB> SELECT student.student_name,COUNT(*)\n -> FROM student,course\n -> WHERE student.student_id=course.student_id\n -> GROUP BY student_name;\n','https://mariadb.com/kb/en/count/'),(106,'HANDLER',27,'Syntax:\nHANDLER tbl_name OPEN [ [AS] alias]\n\nHANDLER tbl_name READ index_name { = | <= | >= | < | > } (value1,value2,...)\n [ WHERE where_condition ] [LIMIT ... ]\nHANDLER tbl_name READ index_name { FIRST | NEXT | PREV | LAST }\n [ WHERE where_condition ] [LIMIT ... ]\nHANDLER tbl_name READ { FIRST | NEXT }\n [ WHERE where_condition ] [LIMIT ... ]\n\nHANDLER tbl_name CLOSE\n\nThe HANDLER statement provides direct access to table storage engine\ninterfaces. It is available for MyISAM and InnoDB tables.\n\nURL: https://mariadb.com/kb/en/handler-commands/\n\n','','https://mariadb.com/kb/en/handler-commands/'),(107,'MLINEFROMTEXT',3,'MLineFromText(wkt[,srid]), MultiLineStringFromText(wkt[,srid])\n\nConstructs a MULTILINESTRING value using its WKT representation and\nSRID.\n\nURL: https://mariadb.com/kb/en/mlinefromtext/\n\n','','https://mariadb.com/kb/en/mlinefromtext/'),(108,'GEOMCOLLFROMWKB',32,'GeomCollFromWKB(wkb[,srid]), GeometryCollectionFromWKB(wkb[,srid])\n\nConstructs a GEOMETRYCOLLECTION value using its WKB representation and\nSRID.\n\nURL: https://mariadb.com/kb/en/geomcollfromwkb/\n\n','','https://mariadb.com/kb/en/geomcollfromwkb/'),(109,'HELP_DATE',9,'This help information was generated from the MySQL 5.5 Reference Manual\non: 2012-08-25\n','',''),(110,'RENAME TABLE',39,'Syntax:\nRENAME TABLE tbl_name TO new_tbl_name\n [, tbl_name2 TO new_tbl_name2] ...\n\nThis statement renames one or more tables.\n\nThe rename operation is done atomically, which means that no other\nsession can access any of the tables while the rename is running. For\nexample, if you have an existing table old_table, you can create\nanother table new_table that has the same structure but is empty, and\nthen replace the existing table with the empty one as follows (assuming\nthat backup_table does not already exist):\n\nURL: https://mariadb.com/kb/en/rename-table/\n\n','CREATE TABLE new_table (...);\nRENAME TABLE old_table TO backup_table, new_table TO old_table;\n','https://mariadb.com/kb/en/rename-table/'),(111,'BOOLEAN',22,'BOOL, BOOLEAN\n\nThese types are synonyms for TINYINT(1). A value of zero is considered\nfalse. Nonzero values are considered true:\n\nMariaDB> SELECT IF(0, \'true\', \'false\');\n+------------------------+\n| IF(0, \'true\', \'false\') |\n+------------------------+\n| false |\n+------------------------+\n\nMariaDB> SELECT IF(1, \'true\', \'false\');\n+------------------------+\n| IF(1, \'true\', \'false\') |\n+------------------------+\n| true |\n+------------------------+\n\nMariaDB> SELECT IF(2, \'true\', \'false\');\n+------------------------+\n| IF(2, \'true\', \'false\') |\n+------------------------+\n| true |\n+------------------------+\n\nHowever, the values TRUE and FALSE are merely aliases for 1 and 0,\nrespectively, as shown here:\n\nMariaDB> SELECT IF(0 = FALSE, \'true\', \'false\');\n+--------------------------------+\n| IF(0 = FALSE, \'true\', \'false\') |\n+--------------------------------+\n| true |\n+--------------------------------+\n\nMariaDB> SELECT IF(1 = TRUE, \'true\', \'false\');\n+-------------------------------+\n| IF(1 = TRUE, \'true\', \'false\') |\n+-------------------------------+\n| true |\n+-------------------------------+\n\nMariaDB> SELECT IF(2 = TRUE, \'true\', \'false\');\n+-------------------------------+\n| IF(2 = TRUE, \'true\', \'false\') |\n+-------------------------------+\n| false |\n+-------------------------------+\n\nMariaDB> SELECT IF(2 = FALSE, \'true\', \'false\');\n+--------------------------------+\n| IF(2 = FALSE, \'true\', \'false\') |\n+--------------------------------+\n| false |\n+--------------------------------+\n\nThe last two statements display the results shown because 2 is equal to\nneither 1 nor 0.\n\nURL: https://mariadb.com/kb/en/boolean/\n\n','','https://mariadb.com/kb/en/boolean/'),(112,'DEFAULT',14,'Syntax:\nDEFAULT(col_name)\n\nReturns the default value for a table column. An error results if the\ncolumn has no default value.\n\nURL: https://mariadb.com/kb/en/default/\n\n','MariaDB> UPDATE t SET i = DEFAULT(i)+1 WHERE id < 100;\n','https://mariadb.com/kb/en/default/'),(113,'MOD',4,'Syntax:\nMOD(N,M), N % M, N MOD M\n\nModulo operation. Returns the remainder of N divided by M.\n\nURL: https://mariadb.com/kb/en/mod/\n\n','MariaDB> SELECT MOD(234, 10);\n -> 4\nMariaDB> SELECT 253 % 7;\n -> 1\nMariaDB> SELECT MOD(29,9);\n -> 2\nMariaDB> SELECT 29 MOD 9;\n -> 2\n','https://mariadb.com/kb/en/mod/'),(114,'TINYTEXT',22,'TINYTEXT [CHARACTER SET charset_name] [COLLATE collation_name]\n\nA TEXT column with a maximum length of 255 (28 - 1) characters. The\neffective maximum length is less if the value contains multi-byte\ncharacters. Each TINYTEXT value is stored using a 1-byte length prefix\nthat indicates the number of bytes in the value.\n\nURL: https://mariadb.com/kb/en/tinytext/\n\n','','https://mariadb.com/kb/en/tinytext/'),(115,'OPTIMIZE TABLE',20,'Syntax:\nOPTIMIZE [NO_WRITE_TO_BINLOG | LOCAL] TABLE\n tbl_name [, tbl_name] ...\n\nOPTIMIZE TABLE should be used if you have deleted a large part of a\ntable or if you have made many changes to a table with variable-length\nrows (tables that have VARCHAR, VARBINARY, BLOB, or TEXT columns).\nDeleted rows are maintained in a linked list and subsequent INSERT\noperations reuse old row positions. You can use OPTIMIZE TABLE to\nreclaim the unused space and to defragment the data file. After\nextensive changes to a table, this statement may also improve\nperformance of statements that use the table, sometimes significantly.\n\nThis statement requires SELECT and INSERT privileges for the table.\n\nOPTIMIZE TABLE is supported for partitioned tables, and you can use\nALTER TABLE ... OPTIMIZE PARTITION to optimize one or more partitions;\nfor more information, see [HELP ALTER TABLE], and\nhttp://dev.mysql.com/doc/refman/5.5/en/partitioning-maintenance.html.\n\nURL: https://mariadb.com/kb/en/optimize-table/\n\n','','https://mariadb.com/kb/en/optimize-table/'),(116,'DECODE',12,'Syntax:\nDECODE(crypt_str,pass_str)\n\nDecrypts the encrypted string crypt_str using pass_str as the password.\ncrypt_str should be a string returned from ENCODE().\n\nURL: https://mariadb.com/kb/en/decode/\n\n','','https://mariadb.com/kb/en/decode/'),(117,'<=>',18,'Syntax:\n<=>\n\nNULL-safe equal. This operator performs an equality comparison like the\n= operator, but returns 1 rather than NULL if both operands are NULL,\nand 0 rather than NULL if one operand is NULL.\n\nURL: https://mariadb.com/kb/en/null-safe-equal/\n\n','MariaDB> SELECT 1 <=> 1, NULL <=> NULL, 1 <=> NULL;\n -> 1, 1, 0\nMariaDB> SELECT 1 = 1, NULL = NULL, 1 = NULL;\n -> 1, NULL, NULL\n','https://mariadb.com/kb/en/null-safe-equal/'),(118,'HELP STATEMENT',28,'Syntax:\nHELP \'search_string\'\n\nThe HELP statement returns online information from the MySQL Reference\nmanual. Its proper operation requires that the help tables in the mysql\ndatabase be initialized with help topic information.\n\nThe HELP statement searches the help tables for the given search string\nand displays the result of the search. The search string is not case\nsensitive.\n\nURL: https://mariadb.com/kb/en/help-command/\n\n','','https://mariadb.com/kb/en/help-command/'),(119,'RESET',26,'Syntax:\nRESET reset_option [, reset_option] ...\n\nThe RESET statement is used to clear the state of various server\noperations. You must have the RELOAD privilege to execute RESET.\n\nRESET acts as a stronger version of the FLUSH statement. See [HELP\nFLUSH].\n\nThe RESET statement causes an implicit commit. See\nhttps://mariadb.com/kb/en/sql-statements-that-cause-an-implicit-commit/.\n\nURL: https://mariadb.com/kb/en/reset/\n\n','','https://mariadb.com/kb/en/reset/'),(120,'GET_LOCK',14,'Syntax:\nGET_LOCK(str,timeout)\n\nTries to obtain a lock with a name given by the string str, using a\ntimeout of timeout seconds. Returns 1 if the lock was obtained\nsuccessfully, 0 if the attempt timed out (for example, because another\nclient has previously locked the name), or NULL if an error occurred\n(such as running out of memory or the thread was killed with mysqladmin\nkill). If you have a lock obtained with GET_LOCK(), it is released when\nyou execute RELEASE_LOCK(), execute a new GET_LOCK(), or your\nconnection terminates (either normally or abnormally). Locks obtained\nwith GET_LOCK() do not interact with transactions. That is, committing\na transaction does not release any such locks obtained during the\ntransaction.\n\nThis function can be used to implement application locks or to simulate\nrecord locks. Names are locked on a server-wide basis. If a name has\nbeen locked by one client, GET_LOCK() blocks any request by another\nclient for a lock with the same name. This enables clients that agree\non a given lock name to use the name to perform cooperative advisory\nlocking. But be aware that it also enables a client that is not among\nthe set of cooperating clients to lock a name, either inadvertently or\ndeliberately, and thus prevent any of the cooperating clients from\nlocking that name. One way to reduce the likelihood of this is to use\nlock names that are database-specific or application-specific. For\nexample, use lock names of the form db_name.str or app_name.str.\n\nURL: https://mariadb.com/kb/en/get_lock/\n\n','MariaDB> SELECT GET_LOCK(\'lock1\',10);\n -> 1\nMariaDB> SELECT IS_FREE_LOCK(\'lock2\');\n -> 1\nMariaDB> SELECT GET_LOCK(\'lock2\',10);\n -> 1\nMariaDB> SELECT RELEASE_LOCK(\'lock2\');\n -> 1\nMariaDB> SELECT RELEASE_LOCK(\'lock1\');\n -> NULL\n','https://mariadb.com/kb/en/get_lock/'),(121,'UCASE',37,'Syntax:\nUCASE(str)\n\nUCASE() is a synonym for UPPER().\n\nURL: https://mariadb.com/kb/en/ucase/\n\n','','https://mariadb.com/kb/en/ucase/'),(122,'SHOW BINLOG EVENTS',26,'Syntax:\nSHOW BINLOG EVENTS\n [IN \'log_name\'] [FROM pos] [LIMIT [offset,] row_count]\n\nShows the events in the binary log. If you do not specify \'log_name\',\nthe first binary log is displayed.\n\nURL: https://mariadb.com/kb/en/show-binlog-events/\n\n','','https://mariadb.com/kb/en/show-binlog-events/'),(123,'MPOLYFROMWKB',32,'MPolyFromWKB(wkb[,srid]), MultiPolygonFromWKB(wkb[,srid])\n\nConstructs a MULTIPOLYGON value using its WKB representation and SRID.\n\nURL: https://mariadb.com/kb/en/mpolyfromwkb/\n\n','','https://mariadb.com/kb/en/mpolyfromwkb/'),(124,'ITERATE',23,'Syntax:\nITERATE label\n\nITERATE can appear only within LOOP, REPEAT, and WHILE statements.\nITERATE means \"start the loop again.\"\n\nURL: https://mariadb.com/kb/en/iterate/\n\n','','https://mariadb.com/kb/en/iterate/'),(125,'DO',27,'Syntax:\nDO expr [, expr] ...\n\nDO executes the expressions but does not return any results. In most\nrespects, DO is shorthand for SELECT expr, ..., but has the advantage\nthat it is slightly faster when you do not care about the result.\n\nDO is useful primarily with functions that have side effects, such as\nRELEASE_LOCK().\n\nURL: https://mariadb.com/kb/en/do/\n\n','','https://mariadb.com/kb/en/do/'),(126,'CURTIME',31,'Syntax:\nCURTIME()\n\nReturns the current time as a value in \'HH:MM:SS\' or HHMMSS.uuuuuu\nformat, depending on whether the function is used in a string or\nnumeric context. The value is expressed in the current time zone.\n\nURL: https://mariadb.com/kb/en/curtime/\n\n','MariaDB> SELECT CURTIME();\n -> \'23:50:26\'\nMariaDB> SELECT CURTIME() + 0;\n -> 235026.000000\n','https://mariadb.com/kb/en/curtime/'),(127,'CHAR_LENGTH',37,'Syntax:\nCHAR_LENGTH(str)\n\nReturns the length of the string str, measured in characters. A\nmulti-byte character counts as a single character. This means that for\na string containing five 2-byte characters, LENGTH() returns 10,\nwhereas CHAR_LENGTH() returns 5.\n\nURL: https://mariadb.com/kb/en/char_length/\n\n','','https://mariadb.com/kb/en/char_length/'),(128,'BIGINT',22,'BIGINT[(M)] [UNSIGNED] [ZEROFILL]\n\nA large integer. The signed range is -9223372036854775808 to\n9223372036854775807. The unsigned range is 0 to 18446744073709551615.\n\nSERIAL is an alias for BIGINT UNSIGNED NOT NULL AUTO_INCREMENT UNIQUE.\n\nURL: https://mariadb.com/kb/en/bigint/\n\n','','https://mariadb.com/kb/en/bigint/'),(129,'SET',26,'Syntax:\nSET variable_assignment [, variable_assignment] ...\n\nvariable_assignment:\n user_var_name = expr\n | [GLOBAL | SESSION] system_var_name = expr\n | [@@global. | @@session. | @@]system_var_name = expr\n\nThe SET statement assigns values to different types of variables that\naffect the operation of the server or your client. Older versions of\nMySQL employed SET OPTION, but this syntax is deprecated in favor of\nSET without OPTION.\n\nURL: https://mariadb.com/kb/en/set/\n\n','','https://mariadb.com/kb/en/set/'),(130,'LOAD XML',27,'Syntax:\nLOAD XML [LOW_PRIORITY | CONCURRENT] [LOCAL] INFILE \'file_name\'\n [REPLACE | IGNORE]\n INTO TABLE [db_name.]tbl_name\n [CHARACTER SET charset_name]\n [ROWS IDENTIFIED BY \'<tagname>\']\n [IGNORE number {LINES | ROWS}]\n [(column_or_user_var,...)]\n [SET col_name = expr,...]\n\nThe LOAD XML statement reads data from an XML file into a table. The\nfile_name must be given as a literal string. The tagname in the\noptional ROWS IDENTIFIED BY clause must also be given as a literal\nstring, and must be surrounded by angle brackets (< and >).\n\nLOAD XML acts as the complement of running the mysql client in XML\noutput mode (that is, starting the client with the --xml option). To\nwrite data from a table to an XML file, use a command such as the\nfollowing one from the system shell:\n\nshell> mysql --xml -e \'SELECT * FROM mytable\' > file.xml\n\nTo read the file back into a table, use LOAD XML INFILE. By default,\nthe <row> element is considered to be the equivalent of a database\ntable row; this can be changed using the ROWS IDENTIFIED BY clause.\n\nThis statement supports three different XML formats:\n\no Column names as attributes and column values as attribute values:\n\n<row column1=\"value1\" column2=\"value2\" .../>\n\no Column names as tags and column values as the content of these tags:\n\n<row>\n <column1>value1</column1>\n <column2>value2</column2>\n</row>\n\no Column names are the name attributes of <field> tags, and values are\n the contents of these tags:\n\n<row>\n <field name=\'column1\'>value1</field>\n <field name=\'column2\'>value2</field>\n</row>\n\n This is the format used by other MySQL tools, such as mysqldump.\n\nAll 3 formats can be used in the same XML file; the import routine\nautomatically detects the format for each row and interprets it\ncorrectly. Tags are matched based on the tag or attribute name and the\ncolumn name.\n\nThe following clauses work essentially the same way for LOAD XML as\nthey do for LOAD DATA:\n\no LOW_PRIORITY or CONCURRENT\n\no LOCAL\n\no REPLACE or IGNORE\n\no CHARACTER SET\n\no (column_or_user_var,...)\n\no SET\n\nSee [HELP LOAD DATA], for more information about these clauses.\n\nThe IGNORE number LINES or IGNORE number ROWS clause causes the first\nnumber rows in the XML file to be skipped. It is analogous to the LOAD\nDATA statement\'s IGNORE ... LINES clause.\n\nURL: https://mariadb.com/kb/en/load-xml/\n\n','','https://mariadb.com/kb/en/load-xml/'),(131,'CONV',4,'Syntax:\nCONV(N,from_base,to_base)\n\nConverts numbers between different number bases. Returns a string\nrepresentation of the number N, converted from base from_base to base\nto_base. Returns NULL if any argument is NULL. The argument N is\ninterpreted as an integer, but may be specified as an integer or a\nstring. The minimum base is 2 and the maximum base is 36. If to_base is\na negative number, N is regarded as a signed number. Otherwise, N is\ntreated as unsigned. CONV() works with 64-bit precision.\n\nURL: https://mariadb.com/kb/en/conv/\n\n','MariaDB> SELECT CONV(\'a\',16,2);\n -> \'1010\'\nMariaDB> SELECT CONV(\'6E\',18,8);\n -> \'172\'\nMariaDB> SELECT CONV(-17,10,-18);\n -> \'-H\'\nMariaDB> SELECT CONV(10+\'10\'+\'10\'+0xa,10,10);\n -> \'40\'\n','https://mariadb.com/kb/en/conv/'),(132,'DATE',22,'DATE\n\nA date. The supported range is \'1000-01-01\' to \'9999-12-31\'. MySQL\ndisplays DATE values in \'YYYY-MM-DD\' format, but permits assignment of\nvalues to DATE columns using either strings or numbers.\n\nURL: https://mariadb.com/kb/en/date/\n\n','','https://mariadb.com/kb/en/date/'),(133,'ASSIGN-VALUE',15,'Syntax:\n:=\n\nAssignment operator. Causes the user variable on the left hand side of\nthe operator to take on the value to its right. The value on the right\nhand side may be a literal value, another variable storing a value, or\nany legal expression that yields a scalar value, including the result\nof a query (provided that this value is a scalar value). You can\nperform multiple assignments in the same SET statement. You can perform\nmultiple assignments in the same statement-\n\nUnlike =, the := operator is never interpreted as a comparison\noperator. This means you can use := in any valid SQL statement (not\njust in SET statements) to assign a value to a variable.\n\nURL: https://mariadb.com/kb/en/assignment-operator/\n\n','MariaDB> SELECT @var1, @var2;\n -> NULL, NULL\nMariaDB> SELECT @var1 := 1, @var2;\n -> 1, NULL\nMariaDB> SELECT @var1, @var2;\n -> 1, NULL\nMariaDB> SELECT @var1, @var2 := @var1;\n -> 1, 1\nMariaDB> SELECT @var1, @var2;\n -> 1, 1\n\nMariaDB> SELECT @var1:=COUNT(*) FROM t1;\n -> 4\nMariaDB> SELECT @var1;\n -> 4\n','https://mariadb.com/kb/en/assignment-operator/'),(134,'SHOW OPEN TABLES',26,'Syntax:\nSHOW OPEN TABLES [{FROM | IN} db_name]\n [LIKE \'pattern\' | WHERE expr]\n\nSHOW OPEN TABLES lists the non-TEMPORARY tables that are currently open\nin the table cache. See\nhttp://dev.mysql.com/doc/refman/5.5/en/table-cache.html. The FROM\nclause, if present, restricts the tables shown to those present in the\ndb_name database. The LIKE clause, if present, indicates which table\nnames to match. The WHERE clause can be given to select rows using more\ngeneral conditions, as discussed in\nhttps://mariadb.com/kb/en/extended-show/.\n\nURL: https://mariadb.com/kb/en/show-open-tables/\n\n','','https://mariadb.com/kb/en/show-open-tables/'),(135,'EXTRACT',31,'Syntax:\nEXTRACT(unit FROM date)\n\nThe EXTRACT() function uses the same kinds of unit specifiers as\nDATE_ADD() or DATE_SUB(), but extracts parts from the date rather than\nperforming date arithmetic.\n\nURL: https://mariadb.com/kb/en/extract/\n\n','MariaDB> SELECT EXTRACT(YEAR FROM \'2009-07-02\');\n -> 2009\nMariaDB> SELECT EXTRACT(YEAR_MONTH FROM \'2009-07-02 01:02:03\');\n -> 200907\nMariaDB> SELECT EXTRACT(DAY_MINUTE FROM \'2009-07-02 01:02:03\');\n -> 20102\nMariaDB> SELECT EXTRACT(MICROSECOND\n -> FROM \'2003-01-02 10:30:00.000123\');\n -> 123\n','https://mariadb.com/kb/en/extract/'),(136,'ENCRYPT',12,'Syntax:\nENCRYPT(str[,salt])\n\nEncrypts str using the Unix crypt() system call and returns a binary\nstring. The salt argument must be a string with at least two characters\nor the result will be NULL. If no salt argument is given, a random\nvalue is used.\n\nURL: https://mariadb.com/kb/en/encrypt/\n\n','MariaDB> SELECT ENCRYPT(\'hello\');\n -> \'VxuFAJXVARROc\'\n','https://mariadb.com/kb/en/encrypt/'),(137,'SHOW STATUS',26,'Syntax:\nSHOW [GLOBAL | SESSION] STATUS\n [LIKE \'pattern\' | WHERE expr]\n\nSHOW STATUS provides server status information. This information also\ncan be obtained using the mysqladmin extended-status command. The LIKE\nclause, if present, indicates which variable names to match. The WHERE\nclause can be given to select rows using more general conditions, as\ndiscussed in https://mariadb.com/kb/en/extended-show/.\nThis statement does not require any privilege. It requires only the\nability to connect to the server.\nWith a LIKE clause, the statement displays only rows for those\nvariables with names that match the pattern:\n\nMariaDB> SHOW STATUS LIKE \'Key%\';\n+--------------------+----------+\n| Variable_name | Value |\n+--------------------+----------+\n| Key_blocks_used | 14955 |\n| Key_read_requests | 96854827 |\n| Key_reads | 162040 |\n| Key_write_requests | 7589728 |\n| Key_writes | 3813196 |\n+--------------------+----------+\n\nWith the GLOBAL modifier, SHOW STATUS displays the status values for\nall connections to MySQL. With SESSION, it displays the status values\nfor the current connection. If no modifier is present, the default is\nSESSION. LOCAL is a synonym for SESSION.\n\nSome status variables have only a global value. For these, you get the\nsame value for both GLOBAL and SESSION. The scope for each status\nvariable is listed at\nhttps://mariadb.com/kb/en/server-status-variables/.\n\nEach invocation of the SHOW STATUS statement uses an internal temporary\ntable and increments the global Created_tmp_tables value.\n\nURL: https://mariadb.com/kb/en/show-status/\n\n','','https://mariadb.com/kb/en/show-status/'),(138,'EXTRACTVALUE',37,'Syntax:\nExtractValue(xml_frag, xpath_expr)\n\nExtractValue() takes two string arguments, a fragment of XML markup\nxml_frag and an XPath expression xpath_expr (also known as a locator);\nit returns the text (CDATA) of the first text node which is a child of\nthe elements or elements matched by the XPath expression. In MySQL 5.5,\nthe XPath expression can contain at most 127 characters. (This\nlimitation is lifted in MySQL 5.6.)\n\nUsing this function is the equivalent of performing a match using the\nxpath_expr after appending /text(). In other words,\nExtractValue(\'<a><b>Sakila</b></a>\', \'/a/b\') and\nExtractValue(\'<a><b>Sakila</b></a>\', \'/a/b/text()\') produce the same\nresult.\n\nIf multiple matches are found, the content of the first child text node\nof each matching element is returned (in the order matched) as a\nsingle, space-delimited string.\n\nIf no matching text node is found for the expression (including the\nimplicit /text())---for whatever reason, as long as xpath_expr is\nvalid, and xml_frag consists of elements which are properly nested and\nclosed---an empty string is returned. No distinction is made between a\nmatch on an empty element and no match at all. This is by design.\n\nIf you need to determine whether no matching element was found in\nxml_frag or such an element was found but contained no child text\nnodes, you should test the result of an expression that uses the XPath\ncount() function. For example, both of these statements return an empty\nstring, as shown here:\n\nMariaDB> SELECT ExtractValue(\'<a><b/></a>\', \'/a/b\');\n+-------------------------------------+\n| ExtractValue(\'<a><b/></a>\', \'/a/b\') |\n+-------------------------------------+\n| |\n+-------------------------------------+\n1 row in set (0.00 sec)\n\nMariaDB> SELECT ExtractValue(\'<a><c/></a>\', \'/a/b\');\n+-------------------------------------+\n| ExtractValue(\'<a><c/></a>\', \'/a/b\') |\n+-------------------------------------+\n| |\n+-------------------------------------+\n1 row in set (0.00 sec)\n\nHowever, you can determine whether there was actually a matching\nelement using the following:\n\nMariaDB> SELECT ExtractValue(\'<a><b/></a>\', \'count(/a/b)\');\n+-------------------------------------+\n| ExtractValue(\'<a><b/></a>\', \'count(/a/b)\') |\n+-------------------------------------+\n| 1 |\n+-------------------------------------+\n1 row in set (0.00 sec)\n\nMariaDB> SELECT ExtractValue(\'<a><c/></a>\', \'count(/a/b)\');\n+-------------------------------------+\n| ExtractValue(\'<a><c/></a>\', \'count(/a/b)\') |\n+-------------------------------------+\n| 0 |\n+-------------------------------------+\n1 row in set (0.01 sec)\n\n*Important*: ExtractValue() returns only CDATA, and does not return any\ntags that might be contained within a matching tag, nor any of their\ncontent (see the result returned as val1 in the following example).\n\nURL: https://mariadb.com/kb/en/extractvalue/\n\n','MariaDB> SELECT\n -> ExtractValue(\'<a>ccc<b>ddd</b></a>\', \'/a\') AS val1,\n -> ExtractValue(\'<a>ccc<b>ddd</b></a>\', \'/a/b\') AS val2,\n -> ExtractValue(\'<a>ccc<b>ddd</b></a>\', \'//b\') AS val3,\n -> ExtractValue(\'<a>ccc<b>ddd</b></a>\', \'/b\') AS val4,\n -> ExtractValue(\'<a>ccc<b>ddd</b><b>eee</b></a>\', \'//b\') AS val5;\n\n+------+------+------+------+---------+\n| val1 | val2 | val3 | val4 | val5 |\n+------+------+------+------+---------+\n| ccc | ddd | ddd | | ddd eee |\n+------+------+------+------+---------+\n','https://mariadb.com/kb/en/extractvalue/'),(139,'OLD_PASSWORD',12,'Syntax:\nOLD_PASSWORD(str)\n\nOLD_PASSWORD() was added when the implementation of PASSWORD() was\nchanged in MySQL 4.1 to improve security. OLD_PASSWORD() returns the\nvalue of the pre-4.1 implementation of PASSWORD() as a string, and is\nintended to permit you to reset passwords for any pre-4.1 clients that\nneed to connect to your version 5.5 MySQL server without locking them\nout. See http://dev.mysql.com/doc/refman/5.1/en/password-hashing.html.\n\nAs of MySQL 5.5.3, the return value is a nonbinary string in the\nconnection character set. Before 5.5.3, the return value is a binary\nstring.\n\nURL: https://mariadb.com/kb/en/old_password/\n\n','','https://mariadb.com/kb/en/old_password/'),(140,'FORMAT',37,'Syntax:\nFORMAT(X,D[,locale])\n\nFormats the number X to a format like \'#,###,###.##\', rounded to D\ndecimal places, and returns the result as a string. If D is 0, the\nresult has no decimal point or fractional part.\n\nThe optional third parameter enables a locale to be specified to be\nused for the result number\'s decimal point, thousands separator, and\ngrouping between separators. Permissible locale values are the same as\nthe legal values for the lc_time_names system variable (see\nhttps://mariadb.com/kb/en/server-locale/). If no\nlocale is specified, the default is \'en_US\'.\n\nURL: https://mariadb.com/kb/en/format/\n\n','MariaDB> SELECT FORMAT(12332.123456, 4);\n -> \'12,332.1235\'\nMariaDB> SELECT FORMAT(12332.1,4);\n -> \'12,332.1000\'\nMariaDB> SELECT FORMAT(12332.2,0);\n -> \'12,332\'\nMariaDB> SELECT FORMAT(12332.2,2,\'de_DE\');\n -> \'12.332,20\'\n','https://mariadb.com/kb/en/format/'),(141,'||',15,'Syntax:\nOR, ||\n\nLogical OR. When both operands are non-NULL, the result is 1 if any\noperand is nonzero, and 0 otherwise. With a NULL operand, the result is\n1 if the other operand is nonzero, and NULL otherwise. If both operands\nare NULL, the result is NULL.\n\nURL: https://mariadb.com/kb/en/or/\n\n','MariaDB> SELECT 1 || 1;\n -> 1\nMariaDB> SELECT 1 || 0;\n -> 1\nMariaDB> SELECT 0 || 0;\n -> 0\nMariaDB> SELECT 0 || NULL;\n -> NULL\nMariaDB> SELECT 1 || NULL;\n -> 1\n','https://mariadb.com/kb/en/or/'),(142,'BIT_LENGTH',37,'Syntax:\nBIT_LENGTH(str)\n\nReturns the length of the string str in bits.\n\nURL: https://mariadb.com/kb/en/bit_length/\n\n','MariaDB> SELECT BIT_LENGTH(\'text\');\n -> 32\n','https://mariadb.com/kb/en/bit_length/'),(143,'EXTERIORRING',2,'ExteriorRing(poly)\n\nReturns the exterior ring of the Polygon value poly as a LineString.\n\nURL: https://mariadb.com/kb/en/exteriorring/\n\n','MariaDB> SET @poly =\n -> \'Polygon((0 0,0 3,3 3,3 0,0 0),(1 1,1 2,2 2,2 1,1 1))\';\nMariaDB> SELECT AsText(ExteriorRing(GeomFromText(@poly)));\n+-------------------------------------------+\n| AsText(ExteriorRing(GeomFromText(@poly))) |\n+-------------------------------------------+\n| LINESTRING(0 0,0 3,3 3,3 0,0 0) |\n+-------------------------------------------+\n','https://mariadb.com/kb/en/exteriorring/'),(144,'GEOMFROMWKB',32,'GeomFromWKB(wkb[,srid]), GeometryFromWKB(wkb[,srid])\n\nConstructs a geometry value of any type using its WKB representation\nand SRID.\n\nURL: https://mariadb.com/kb/en/geomfromwkb/\n\n','','https://mariadb.com/kb/en/geomfromwkb/'),(145,'SHOW SLAVE HOSTS',26,'Syntax:\nSHOW SLAVE HOSTS\n\nDisplays a list of replication slaves currently registered with the\nmaster. (Before MySQL 5.5.3, only slaves started with the\n--report-host=host_name option are visible in this list.)\n\nThe list is displayed on any server (not just the master server). The\noutput looks like this:\n\nMariaDB> SHOW SLAVE HOSTS;\n+------------+-----------+------+-----------+\n| Server_id | Host | Port | Master_id |\n+------------+-----------+------+-----------+\n| 192168010 | iconnect2 | 3306 | 192168011 |\n| 1921680101 | athena | 3306 | 192168011 |\n+------------+-----------+------+-----------+\n\no Server_id: The unique server ID of the slave server, as configured in\n the server\'s option file, or on the command line with\n --server-id=value.\n\no Host: The host name of the slave server, as configured in the\n server\'s option file, or on the command line with\n --report-host=host_name. Note that this can differ from the machine\n name as configured in the operating system.\n\no Port: The port the slave server is listening on.\n\n In MySQL 5.5.23 and later, a zero in this column means that the slave\n port (--report-port) was not set. Prior to MySQL 5.5.23, 3306 was\n used as the default in such cases (Bug #13333431).\n\no Master_id: The unique server ID of the master server that the slave\n server is replicating from.\n\nSome MySQL versions report another variable, Rpl_recovery_rank. This\nvariable was never used, and was removed in MySQL 5.5.3. (Bug #13963)\n\nURL: https://mariadb.com/kb/en/show-slave-hosts/\n\n','','https://mariadb.com/kb/en/show-slave-hosts/'),(146,'START TRANSACTION',8,'Syntax:\nSTART TRANSACTION [WITH CONSISTENT SNAPSHOT]\nBEGIN [WORK]\nCOMMIT [WORK] [AND [NO] CHAIN] [[NO] RELEASE]\nROLLBACK [WORK] [AND [NO] CHAIN] [[NO] RELEASE]\nSET autocommit = {0 | 1}\n\nThese statements provide control over use of transactions:\n\no START TRANSACTION or BEGIN start a new transaction.\n\no COMMIT commits the current transaction, making its changes permanent.\n\no ROLLBACK rolls back the current transaction, canceling its changes.\n\no SET autocommit disables or enables the default autocommit mode for\n the current session.\n\nBy default, MySQL runs with autocommit mode enabled. This means that as\nsoon as you execute a statement that updates (modifies) a table, MySQL\nstores the update on disk to make it permanent. The change cannot be\nrolled back.\n\nTo disable autocommit mode implicitly for a single series of\nstatements, use the START TRANSACTION statement:\n\nSTART TRANSACTION;\nSELECT @A:=SUM(salary) FROM table1 WHERE type=1;\nUPDATE table2 SET summary=@A WHERE type=1;\nCOMMIT;\n\nWith START TRANSACTION, autocommit remains disabled until you end the\ntransaction with COMMIT or ROLLBACK. The autocommit mode then reverts\nto its previous state.\n\nYou can also begin a transaction like this:\n\nSTART TRANSACTION WITH CONSISTENT SNAPSHOT;\n\nThe WITH CONSISTENT SNAPSHOT option starts a consistent read for\nstorage engines that are capable of it. This applies only to InnoDB.\nThe effect is the same as issuing a START TRANSACTION followed by a\nSELECT from any InnoDB table. See\nhttp://dev.mysql.com/doc/refman/5.5/en/innodb-consistent-read.html. The\nWITH CONSISTENT SNAPSHOT option does not change the current transaction\nisolation level, so it provides a consistent snapshot only if the\ncurrent isolation level is one that permits consistent read (REPEATABLE\nREAD or SERIALIZABLE).\n\n*Important*: Many APIs used for writing MySQL client applications (such\nas JDBC) provide their own methods for starting transactions that can\n(and sometimes should) be used instead of sending a START TRANSACTION\nstatement from the client. See\nhttp://dev.mysql.com/doc/refman/5.5/en/connectors-apis.html, or the\ndocumentation for your API, for more information.\n\nTo disable autocommit mode explicitly, use the following statement:\n\nSET autocommit=0;\n\nAfter disabling autocommit mode by setting the autocommit variable to\nzero, changes to transaction-safe tables (such as those for InnoDB) are not made permanent immediately. You must use COMMIT to\nstore your changes to disk or ROLLBACK to ignore the changes.\n\nautocommit is a session variable and must be set for each session. To\ndisable autocommit mode for each new connection, see the description of\nthe autocommit system variable at\nhttps://mariadb.com/kb/en/server-system-variables/.\n\nBEGIN and BEGIN WORK are supported as aliases of START TRANSACTION for\ninitiating a transaction. START TRANSACTION is standard SQL syntax and\nis the recommended way to start an ad-hoc transaction.\n\nThe BEGIN statement differs from the use of the BEGIN keyword that\nstarts a BEGIN ... END compound statement. The latter does not begin a\ntransaction. See [HELP BEGIN END].\n\n*Note*: Within all stored programs (stored procedures and functions,\ntriggers, and events), the parser treats BEGIN [WORK] as the beginning\nof a BEGIN ... END block. Begin a transaction in this context with\nSTART TRANSACTION instead.\n\nThe optional WORK keyword is supported for COMMIT and ROLLBACK, as are\nthe CHAIN and RELEASE clauses. CHAIN and RELEASE can be used for\nadditional control over transaction completion. The value of the\ncompletion_type system variable determines the default completion\nbehavior. See\nhttps://mariadb.com/kb/en/server-system-variables/.\n\nThe AND CHAIN clause causes a new transaction to begin as soon as the\ncurrent one ends, and the new transaction has the same isolation level\nas the just-terminated transaction. The RELEASE clause causes the\nserver to disconnect the current client session after terminating the\ncurrent transaction. Including the NO keyword suppresses CHAIN or\nRELEASE completion, which can be useful if the completion_type system\nvariable is set to cause chaining or release completion by default.\n\nURL: https://mariadb.com/kb/en/start-transaction/\n\n','','https://mariadb.com/kb/en/start-transaction/'),(147,'BETWEEN AND',18,'Syntax:\nexpr BETWEEN min AND max\n\nIf expr is greater than or equal to min and expr is less than or equal\nto max, BETWEEN returns 1, otherwise it returns 0. This is equivalent\nto the expression (min <= expr AND expr <= max) if all the arguments\nare of the same type. Otherwise type conversion takes place according\nto the rules described in\nhttps://mariadb.com/kb/en/type-conversion/, but\napplied to all the three arguments.\n\nURL: https://mariadb.com/kb/en/between-and/\n\n','MariaDB> SELECT 2 BETWEEN 1 AND 3, 2 BETWEEN 3 and 1;\n -> 1, 0\nMariaDB> SELECT 1 BETWEEN 2 AND 3;\n -> 0\nMariaDB> SELECT \'b\' BETWEEN \'a\' AND \'c\';\n -> 1\nMariaDB> SELECT 2 BETWEEN 2 AND \'3\';\n -> 1\nMariaDB> SELECT 2 BETWEEN 2 AND \'x-3\';\n -> 0\n','https://mariadb.com/kb/en/between-and/'),(148,'MULTIPOLYGON',24,'MultiPolygon(poly1,poly2,...)\n\nConstructs a MultiPolygon value from a set of Polygon or WKB Polygon\narguments.\n\nURL: https://mariadb.com/kb/en/multipolygon/\n\n','','https://mariadb.com/kb/en/multipolygon/'),(149,'TIME_FORMAT',31,'Syntax:\nTIME_FORMAT(time,format)\n\nThis is used like the DATE_FORMAT() function, but the format string may\ncontain format specifiers only for hours, minutes, seconds, and\nmicroseconds. Other specifiers produce a NULL value or 0.\n\nURL: https://mariadb.com/kb/en/time_format/\n\n','MariaDB> SELECT TIME_FORMAT(\'100:00:00\', \'%H %k %h %I %l\');\n -> \'100 100 04 04 4\'\n','https://mariadb.com/kb/en/time_format/'),(150,'LEFT',37,'Syntax:\nLEFT(str,len)\n\nReturns the leftmost len characters from the string str, or NULL if any\nargument is NULL.\n\nURL: https://mariadb.com/kb/en/left/\n\n','MariaDB> SELECT LEFT(\'foobarbar\', 5);\n -> \'fooba\'\n','https://mariadb.com/kb/en/left/'),(151,'FLUSH QUERY CACHE',26,'You can defragment the query cache to better utilize its memory with\nthe FLUSH QUERY CACHE statement. The statement does not remove any\nqueries from the cache.\n\nThe RESET QUERY CACHE statement removes all query results from the\nquery cache. The FLUSH TABLES statement also does this.\n\nURL: https://mariadb.com/kb/en/flush-query-cache/\n\n','','https://mariadb.com/kb/en/flush-query-cache/'),(152,'SET DATA TYPE',22,'SET(\'value1\',\'value2\',...) [CHARACTER SET charset_name] [COLLATE\ncollation_name]\n\nA set. A string object that can have zero or more values, each of which\nmust be chosen from the list of values \'value1\', \'value2\', ... A SET\ncolumn can have a maximum of 64 members. SET values are represented\ninternally as integers.\n\nURL: https://mariadb.com/kb/en/set-data-type/\n\n','','https://mariadb.com/kb/en/set-data-type/'),(153,'RAND',4,'Syntax:\nRAND(), RAND(N)\n\nReturns a random floating-point value v in the range 0 <= v < 1.0. If a\nconstant integer argument N is specified, it is used as the seed value,\nwhich produces a repeatable sequence of column values. In the following\nexample, note that the sequences of values produced by RAND(3) is the\nsame both places where it occurs.\n\nURL: https://mariadb.com/kb/en/rand/\n\n','MariaDB> CREATE TABLE t (i INT);\nQuery OK, 0 rows affected (0.42 sec)\n\nMariaDB> INSERT INTO t VALUES(1),(2),(3);\nQuery OK, 3 rows affected (0.00 sec)\nRecords: 3 Duplicates: 0 Warnings: 0\n\nMariaDB> SELECT i, RAND() FROM t;\n+------+------------------+\n| i | RAND() |\n+------+------------------+\n| 1 | 0.61914388706828 |\n| 2 | 0.93845168309142 |\n| 3 | 0.83482678498591 |\n+------+------------------+\n3 rows in set (0.00 sec)\n\nMariaDB> SELECT i, RAND(3) FROM t;\n+------+------------------+\n| i | RAND(3) |\n+------+------------------+\n| 1 | 0.90576975597606 |\n| 2 | 0.37307905813035 |\n| 3 | 0.14808605345719 |\n+------+------------------+\n3 rows in set (0.00 sec)\n\nMariaDB> SELECT i, RAND() FROM t;\n+------+------------------+\n| i | RAND() |\n+------+------------------+\n| 1 | 0.35877890638893 |\n| 2 | 0.28941420772058 |\n| 3 | 0.37073435016976 |\n+------+------------------+\n3 rows in set (0.00 sec)\n\nMariaDB> SELECT i, RAND(3) FROM t;\n+------+------------------+\n| i | RAND(3) |\n+------+------------------+\n| 1 | 0.90576975597606 |\n| 2 | 0.37307905813035 |\n| 3 | 0.14808605345719 |\n+------+------------------+\n3 rows in set (0.01 sec)\n','https://mariadb.com/kb/en/rand/'),(154,'RPAD',37,'Syntax:\nRPAD(str,len,padstr)\n\nReturns the string str, right-padded with the string padstr to a length\nof len characters. If str is longer than len, the return value is\nshortened to len characters.\n\nURL: https://mariadb.com/kb/en/rpad/\n\n','MariaDB> SELECT RPAD(\'hi\',5,\'?\');\n -> \'hi???\'\nMariaDB> SELECT RPAD(\'hi\',1,\'?\');\n -> \'h\'\n','https://mariadb.com/kb/en/rpad/'),(155,'CREATE DATABASE',39,'Syntax:\nCREATE {DATABASE | SCHEMA} [IF NOT EXISTS] db_name\n [create_specification] ...\n\ncreate_specification:\n [DEFAULT] CHARACTER SET [=] charset_name\n | [DEFAULT] COLLATE [=] collation_name\n\nCREATE DATABASE creates a database with the given name. To use this\nstatement, you need the CREATE privilege for the database. CREATE\nSCHEMA is a synonym for CREATE DATABASE.\n\nURL: https://mariadb.com/kb/en/create-database/\n\n','','https://mariadb.com/kb/en/create-database/'),(156,'DEC',22,'DEC[(M[,D])] [UNSIGNED] [ZEROFILL], NUMERIC[(M[,D])] [UNSIGNED]\n[ZEROFILL], FIXED[(M[,D])] [UNSIGNED] [ZEROFILL]\n\nThese types are synonyms for DECIMAL. The FIXED synonym is available\nfor compatibility with other database systems.\n\nURL: https://mariadb.com/kb/en/dec-numeric-fixed/\n\n','','https://mariadb.com/kb/en/dec-numeric-fixed/'),(157,'VAR_POP',16,'Syntax:\nVAR_POP(expr)\n\nReturns the population standard variance of expr. It considers rows as\nthe whole population, not as a sample, so it has the number of rows as\nthe denominator. You can also use VARIANCE(), which is equivalent but\nis not standard SQL.\n\nVAR_POP() returns NULL if there were no matching rows.\n\nURL: https://mariadb.com/kb/en/var_pop/\n\n','','https://mariadb.com/kb/en/var_pop/'),(158,'ELT',37,'Syntax:\nELT(N,str1,str2,str3,...)\n\nReturns str1 if N = 1, str2 if N = 2, and so on. Returns NULL if N is\nless than 1 or greater than the number of arguments. ELT() is the\ncomplement of FIELD().\n\nURL: https://mariadb.com/kb/en/elt/.html\n\n','MariaDB> SELECT ELT(1, \'ej\', \'Heja\', \'hej\', \'foo\');\n -> \'ej\'\nMariaDB> SELECT ELT(4, \'ej\', \'Heja\', \'hej\', \'foo\');\n -> \'foo\'\n','https://mariadb.com/kb/en/elt/.html'),(159,'ALTER VIEW',39,'Syntax:\nALTER\n [ALGORITHM = {UNDEFINED | MERGE | TEMPTABLE}]\n [DEFINER = { user | CURRENT_USER }]\n [SQL SECURITY { DEFINER | INVOKER }]\n VIEW view_name [(column_list)]\n AS select_statement\n [WITH [CASCADED | LOCAL] CHECK OPTION]\n\nThis statement changes the definition of a view, which must exist. The\nsyntax is similar to that for CREATE VIEW and the effect is the same as\nfor CREATE OR REPLACE VIEW. See [HELP CREATE VIEW]. This statement\nrequires the CREATE VIEW and DROP privileges for the view, and some\nprivilege for each column referred to in the SELECT statement. ALTER\nVIEW is permitted only to the definer or users with the SUPER\nprivilege.\n\nURL: https://mariadb.com/kb/en/alter-view/\n\n','','https://mariadb.com/kb/en/alter-view/'),(160,'SHOW DATABASES',26,'Syntax:\nSHOW {DATABASES | SCHEMAS}\n [LIKE \'pattern\' | WHERE expr]\n\nSHOW DATABASES lists the databases on the MySQL server host. SHOW\nSCHEMAS is a synonym for SHOW DATABASES. The LIKE clause, if present,\nindicates which database names to match. The WHERE clause can be given\nto select rows using more general conditions, as discussed in\nhttps://mariadb.com/kb/en/extended-show/.\n\nYou see only those databases for which you have some kind of privilege,\nunless you have the global SHOW DATABASES privilege. You can also get\nthis list using the mysqlshow command.\n\nIf the server was started with the --skip-show-database option, you\ncannot use this statement at all unless you have the SHOW DATABASES\nprivilege.\n\nURL: https://mariadb.com/kb/en/show-databases/\n\n','','https://mariadb.com/kb/en/show-databases/'),(161,'~',19,'Syntax:\n~\n\nInvert all bits.\n\nURL: https://mariadb.com/kb/en/3489/\n\n','MariaDB> SELECT 5 & ~1;\n -> 4\n','https://mariadb.com/kb/en/3489/'),(162,'TEXT',22,'TEXT[(M)] [CHARACTER SET charset_name] [COLLATE collation_name]\n\nA TEXT column with a maximum length of 65,535 (216 - 1) characters. The\neffective maximum length is less if the value contains multi-byte\ncharacters. Each TEXT value is stored using a 2-byte length prefix that\nindicates the number of bytes in the value.\n\nAn optional length M can be given for this type. If this is done, MySQL\ncreates the column as the smallest TEXT type large enough to hold\nvalues M characters long.\n\nURL: https://mariadb.com/kb/en/text/\n\n','','https://mariadb.com/kb/en/text/'),(163,'CONCAT_WS',37,'Syntax:\nCONCAT_WS(separator,str1,str2,...)\n\nCONCAT_WS() stands for Concatenate With Separator and is a special form\nof CONCAT(). The first argument is the separator for the rest of the\narguments. The separator is added between the strings to be\nconcatenated. The separator can be a string, as can the rest of the\narguments. If the separator is NULL, the result is NULL.\n\nURL: https://mariadb.com/kb/en/concat_ws/\n\n','MariaDB> SELECT CONCAT_WS(\',\',\'First name\',\'Second name\',\'Last Name\');\n -> \'First name,Second name,Last Name\'\nMariaDB> SELECT CONCAT_WS(\',\',\'First name\',NULL,\'Last Name\');\n -> \'First name,Last Name\'\n','https://mariadb.com/kb/en/concat_ws/'),(164,'ROW_COUNT',17,'Syntax:\nROW_COUNT()\n\nBefore MySQL 5.5.5, ROW_COUNT() returns the number of rows changed,\ndeleted, or inserted by the last statement if it was an UPDATE, DELETE,\nor INSERT. For other statements, the value may not be meaningful.\n\nAs of MySQL 5.5.5, ROW_COUNT() returns a value as follows:\n\no DDL statements: 0. This applies to statements such as CREATE TABLE or\n DROP TABLE.\n\no DML statements other than SELECT: The number of affected rows. This\n applies to statements such as UPDATE, INSERT, or DELETE (as before),\n but now also to statements such as ALTER TABLE and LOAD DATA INFILE.\n\no SELECT: -1 if the statement returns a result set, or the number of\n rows \"affected\" if it does not. For example, for SELECT * FROM t1,\n ROW_COUNT() returns -1. For SELECT * FROM t1 INTO OUTFILE\n \'file_name\', ROW_COUNT() returns the number of rows written to the\n file.\n\no SIGNAL statements: 0.\n\nFor UPDATE statements, the affected-rows value by default is the number\nof rows actually changed. If you specify the CLIENT_FOUND_ROWS flag to\nmysql_real_connect() when connecting to mysqld, the affected-rows value\nis the number of rows \"found\"; that is, matched by the WHERE clause.\n\nFor REPLACE statements, the affected-rows value is 2 if the new row\nreplaced an old row, because in this case, one row was inserted after\nthe duplicate was deleted.\n\nFor INSERT ... ON DUPLICATE KEY UPDATE statements, the affected-rows\nvalue is 1 if the row is inserted as a new row and 2 if an existing row\nis updated.\n\nThe ROW_COUNT() value is similar to the value from the\nmysql_affected_rows() C API function and the row count that the mysql\nclient displays following statement execution.\n\nURL: https://mariadb.com/kb/en/information-functions-row_count/\n\n','MariaDB> INSERT INTO t VALUES(1),(2),(3);\nQuery OK, 3 rows affected (0.00 sec)\nRecords: 3 Duplicates: 0 Warnings: 0\n\nMariaDB> SELECT ROW_COUNT();\n+-------------+\n| ROW_COUNT() |\n+-------------+\n| 3 |\n+-------------+\n1 row in set (0.00 sec)\n\nMariaDB> DELETE FROM t WHERE i IN(1,2);\nQuery OK, 2 rows affected (0.00 sec)\n\nMariaDB> SELECT ROW_COUNT();\n+-------------+\n| ROW_COUNT() |\n+-------------+\n| 2 |\n+-------------+\n1 row in set (0.00 sec)\n','https://mariadb.com/kb/en/information-functions-row_count/'),(165,'ASIN',4,'Syntax:\nASIN(X)\n\nReturns the arc sine of X, that is, the value whose sine is X. Returns\nNULL if X is not in the range -1 to 1.\n\nURL: https://mariadb.com/kb/en/asin/\n\n','MariaDB> SELECT ASIN(0.2);\n -> 0.20135792079033\nMariaDB> SELECT ASIN(\'foo\');\n\n+-------------+\n| ASIN(\'foo\') |\n+-------------+\n| 0 |\n+-------------+\n1 row in set, 1 warning (0.00 sec)\n\nMariaDB> SHOW WARNINGS;\n+---------+------+-----------------------------------------+\n| Level | Code | Message |\n+---------+------+-----------------------------------------+\n| Warning | 1292 | Truncated incorrect DOUBLE value: \'foo\' |\n+---------+------+-----------------------------------------+\n','https://mariadb.com/kb/en/asin/'),(166,'SIGN',4,'Syntax:\nSIGN(X)\n\nReturns the sign of the argument as -1, 0, or 1, depending on whether X\nis negative, zero, or positive.\n\nURL: https://mariadb.com/kb/en/sign/\n\n','MariaDB> SELECT SIGN(-32);\n -> -1\nMariaDB> SELECT SIGN(0);\n -> 0\nMariaDB> SELECT SIGN(234);\n -> 1\n','https://mariadb.com/kb/en/sign/'),(167,'SEC_TO_TIME',31,'Syntax:\nSEC_TO_TIME(seconds)\n\nReturns the seconds argument, converted to hours, minutes, and seconds,\nas a TIME value. The range of the result is constrained to that of the\nTIME data type. A warning occurs if the argument corresponds to a value\noutside that range.\n\nURL: https://mariadb.com/kb/en/sec_to_time/\n\n','MariaDB> SELECT SEC_TO_TIME(2378);\n -> \'00:39:38\'\nMariaDB> SELECT SEC_TO_TIME(2378) + 0;\n -> 3938\n','https://mariadb.com/kb/en/sec_to_time/'),(168,'FLOAT',22,'FLOAT[(M,D)] [UNSIGNED] [ZEROFILL]\n\nA small (single-precision) floating-point number. Permissible values\nare -3.402823466E+38 to -1.175494351E-38, 0, and 1.175494351E-38 to\n3.402823466E+38. These are the theoretical limits, based on the IEEE\nstandard. The actual range might be slightly smaller depending on your\nhardware or operating system.\n\nM is the total number of digits and D is the number of digits following\nthe decimal point. If M and D are omitted, values are stored to the\nlimits permitted by the hardware. A single-precision floating-point\nnumber is accurate to approximately 7 decimal places.\n\nUNSIGNED, if specified, disallows negative values.\n\nUsing FLOAT might give you some unexpected problems because all\ncalculations in MySQL are done with double precision. See\nhttps://mariadb.com/kb/en/floating-point-accuracy/.\n\nURL: https://mariadb.com/kb/en/float/\n\n','','https://mariadb.com/kb/en/float/'),(169,'LOCATE',37,'Syntax:\nLOCATE(substr,str), LOCATE(substr,str,pos)\n\nThe first syntax returns the position of the first occurrence of\nsubstring substr in string str. The second syntax returns the position\nof the first occurrence of substring substr in string str, starting at\nposition pos. Returns 0 if substr is not in str.\n\nURL: https://mariadb.com/kb/en/locate/\n\n','MariaDB> SELECT LOCATE(\'bar\', \'foobarbar\');\n -> 4\nMariaDB> SELECT LOCATE(\'xbar\', \'foobar\');\n -> 0\nMariaDB> SELECT LOCATE(\'bar\', \'foobarbar\', 5);\n -> 7\n','https://mariadb.com/kb/en/locate/'),(170,'SHOW EVENTS',26,'Syntax:\nSHOW EVENTS [{FROM | IN} schema_name]\n [LIKE \'pattern\' | WHERE expr]\n\nThis statement displays information about Event Manager events. It\nrequires the EVENT privilege for the database from which the events are\nto be shown.\n\nIn its simplest form, SHOW EVENTS lists all of the events in the\ncurrent schema:\n\nMariaDB> SELECT CURRENT_USER(), SCHEMA();\n+----------------+----------+\n| CURRENT_USER() | SCHEMA() |\n+----------------+----------+\n| jon@ghidora | myschema |\n+----------------+----------+\n1 row in set (0.00 sec)\n\nMariaDB> SHOW EVENTS\\G\n*************************** 1. row ***************************\n Db: myschema\n Name: e_daily\n Definer: jon@ghidora\n Time zone: SYSTEM\n Type: RECURRING\n Execute at: NULL\n Interval value: 10\n Interval field: SECOND\n Starts: 2006-02-09 10:41:23\n Ends: NULL\n Status: ENABLED\n Originator: 0\ncharacter_set_client: latin1\ncollation_connection: latin1_swedish_ci\n Database Collation: latin1_swedish_ci\n\nTo see events for a specific schema, use the FROM clause. For example,\nto see events for the test schema, use the following statement:\n\nSHOW EVENTS FROM test;\n\nThe LIKE clause, if present, indicates which event names to match. The\nWHERE clause can be given to select rows using more general conditions,\nas discussed in\nhttps://mariadb.com/kb/en/extended-show/.\n\nURL: https://mariadb.com/kb/en/show-events/\n\n','','https://mariadb.com/kb/en/show-events/'),(171,'CHARSET',17,'Syntax:\nCHARSET(str)\n\nReturns the character set of the string argument.\n\nURL: https://mariadb.com/kb/en/charset/\n\n','MariaDB> SELECT CHARSET(\'abc\');\n -> \'latin1\'\nMariaDB> SELECT CHARSET(CONVERT(\'abc\' USING utf8));\n -> \'utf8\'\nMariaDB> SELECT CHARSET(USER());\n -> \'utf8\'\n','https://mariadb.com/kb/en/charset/'),(172,'SUBDATE',31,'Syntax:\nSUBDATE(date,INTERVAL expr unit), SUBDATE(expr,days)\n\nWhen invoked with the INTERVAL form of the second argument, SUBDATE()\nis a synonym for DATE_SUB(). For information on the INTERVAL unit\nargument, see the discussion for DATE_ADD().\n\nMariaDB> SELECT DATE_SUB(\'2008-01-02\', INTERVAL 31 DAY);\n -> \'2007-12-02\'\nMariaDB> SELECT SUBDATE(\'2008-01-02\', INTERVAL 31 DAY);\n -> \'2007-12-02\'\n\nThe second form enables the use of an integer value for days. In such\ncases, it is interpreted as the number of days to be subtracted from\nthe date or datetime expression expr.\n\nMariaDB> SELECT SUBDATE(\'2008-01-02 12:00:00\', 31);\n -> \'2007-12-02 12:00:00\'\n\nURL: https://mariadb.com/kb/en/subdate/\n\n','','https://mariadb.com/kb/en/subdate/'),(173,'DAYOFYEAR',31,'Syntax:\nDAYOFYEAR(date)\n\nReturns the day of the year for date, in the range 1 to 366.\n\nURL: https://mariadb.com/kb/en/dayofyear/\n\n','MariaDB> SELECT DAYOFYEAR(\'2007-02-03\');\n -> 34\n','https://mariadb.com/kb/en/dayofyear/'),(174,'%',4,'Syntax:\nN % M, N MOD M\n\nModulo operation. Returns the remainder of N divided by M. For more\ninformation, see the description for the MOD() function in\nhttps://mariadb.com/kb/en/mod/.\n\nURL: https://mariadb.com/kb/en/modulo-operator/\n\n','','https://mariadb.com/kb/en/modulo-operator/'),(175,'LONGTEXT',22,'LONGTEXT [CHARACTER SET charset_name] [COLLATE collation_name]\n\nA TEXT column with a maximum length of 4,294,967,295 or 4GB (232 - 1)\ncharacters. The effective maximum length is less if the value contains\nmulti-byte characters. The effective maximum length of LONGTEXT columns\nalso depends on the configured maximum packet size in the client/server\nprotocol and available memory. Each LONGTEXT value is stored using a\n4-byte length prefix that indicates the number of bytes in the value.\n\nURL: https://mariadb.com/kb/en/longtext/\n\n','','https://mariadb.com/kb/en/longtext/'),(176,'KILL',26,'Syntax:\nKILL [CONNECTION | QUERY] thread_id\n\nEach connection to mysqld runs in a separate thread. You can see which\nthreads are running with the SHOW PROCESSLIST statement and kill a\nthread with the KILL thread_id statement.\n\nKILL permits an optional CONNECTION or QUERY modifier:\n\no KILL CONNECTION is the same as KILL with no modifier: It terminates\n the connection associated with the given thread_id.\n\no KILL QUERY terminates the statement that the connection is currently\n executing, but leaves the connection itself intact.\n\nIf you have the PROCESS privilege, you can see all threads. If you have\nthe SUPER privilege, you can kill all threads and statements.\nOtherwise, you can see and kill only your own threads and statements.\n\nYou can also use the mysqladmin processlist and mysqladmin kill\ncommands to examine and kill threads.\n\n*Note*: You cannot use KILL with the Embedded MySQL Server library\nbecause the embedded server merely runs inside the threads of the host\napplication. It does not create any connection threads of its own.\n\nURL: https://mariadb.com/kb/en/data-manipulation-kill-connection-query/\n\n','','https://mariadb.com/kb/en/data-manipulation-kill-connection-query/'),(177,'DISJOINT',30,'Disjoint(g1,g2)\n\nReturns 1 or 0 to indicate whether g1 is spatially disjoint from (does\nnot intersect) g2.\n\nURL: https://mariadb.com/kb/en/disjoint/\n\n','','https://mariadb.com/kb/en/disjoint/'),(178,'ASTEXT',3,'AsText(g), AsWKT(g)\n\nConverts a value in internal geometry format to its WKT representation\nand returns the string result.\n\nURL: https://mariadb.com/kb/en/astext/\n\n','MariaDB> SET @g = \'LineString(1 1,2 2,3 3)\';\nMariaDB> SELECT AsText(GeomFromText(@g));\n+--------------------------+\n| AsText(GeomFromText(@g)) |\n+--------------------------+\n| LINESTRING(1 1,2 2,3 3) |\n+--------------------------+\n','https://mariadb.com/kb/en/astext/'),(179,'LPAD',37,'Syntax:\nLPAD(str,len,padstr)\n\nReturns the string str, left-padded with the string padstr to a length\nof len characters. If str is longer than len, the return value is\nshortened to len characters.\n\n\nURL: https://mariadb.com/kb/en/lpad/\n\n','MariaDB> SELECT LPAD(\'hi\',4,\'??\');\n -> \'??hi\'\nMariaDB> SELECT LPAD(\'hi\',1,\'??\');\n -> \'h\'\n','https://mariadb.com/kb/en/lpad/'),(180,'DECLARE CONDITION',23,'Syntax:\nDECLARE condition_name CONDITION FOR condition_value\n\ncondition_value:\n mysql_error_code\n | SQLSTATE [VALUE] sqlstate_value\n\nThe DECLARE ... CONDITION statement declares a named error condition,\nassociating a name with a condition that needs specific handling. The\nname can be referred to in a subsequent DECLARE ... HANDLER statement\n(see [HELP DECLARE HANDLER]).\n\nCondition declarations must appear before cursor or handler\ndeclarations.\n\nThe condition_value for DECLARE ... CONDITION can be a MySQL error code\n(a number) or an SQLSTATE value (a 5-character string literal). You\nshould not use MySQL error code 0 or SQLSTATE values that begin with\n\'00\', because those indicate success rather than an error condition.\nFor a list of MySQL error codes and SQLSTATE values, see\nhttps://mariadb.com/kb/en/mariadb-error-codes/.\n\nURL: https://mariadb.com/kb/en/declare-condition/\n\n','','https://mariadb.com/kb/en/declare-condition/'),(181,'OVERLAPS',30,'Overlaps(g1,g2)\n\nReturns 1 or 0 to indicate whether g1 spatially overlaps g2. The term\nspatially overlaps is used if two geometries intersect and their\nintersection results in a geometry of the same dimension but not equal\nto either of the given geometries.\n\nURL: https://mariadb.com/kb/en/overlaps/\n\n','','https://mariadb.com/kb/en/overlaps/'),(182,'SET GLOBAL SQL_SLAVE_SKIP_COUNTER',8,'Syntax:\nSET GLOBAL sql_slave_skip_counter = N\n\nThis statement skips the next N events from the master. This is useful\nfor recovering from replication stops caused by a statement.\n\nThis statement is valid only when the slave threads are not running.\nOtherwise, it produces an error.\n\nURL: https://mariadb.com/kb/en/set-global-sql_slave_skip_counter/\n\n','','https://mariadb.com/kb/en/set-global-sql_slave_skip_counter/'),(183,'NUMGEOMETRIES',25,'NumGeometries(gc)\n\nReturns the number of geometries in the GeometryCollection value gc.\n\nURL: https://mariadb.com/kb/en/numgeometries/\n\n','MariaDB> SET @gc = \'GeometryCollection(Point(1 1),LineString(2 2, 3 3))\';\nMariaDB> SELECT NumGeometries(GeomFromText(@gc));\n+----------------------------------+\n| NumGeometries(GeomFromText(@gc)) |\n+----------------------------------+\n| 2 |\n+----------------------------------+\n','https://mariadb.com/kb/en/numgeometries/'),(184,'MONTHNAME',31,'Syntax:\nMONTHNAME(date)\n\nReturns the full name of the month for date. The language used for the\nname is controlled by the value of the lc_time_names system variable\n(https://mariadb.com/kb/en/server-locale/).\n\nURL: https://mariadb.com/kb/en/monthname/\n\n','MariaDB> SELECT MONTHNAME(\'2008-02-03\');\n -> \'February\'\n','https://mariadb.com/kb/en/monthname/'),(185,'CHANGE MASTER TO',8,'Syntax:\nCHANGE MASTER TO option [, option] ...\n\noption:\n MASTER_BIND = \'interface_name\'\n | MASTER_HOST = \'host_name\'\n | MASTER_USER = \'user_name\'\n | MASTER_PASSWORD = \'password\'\n | MASTER_PORT = port_num\n | MASTER_CONNECT_RETRY = interval\n | MASTER_HEARTBEAT_PERIOD = interval\n | MASTER_LOG_FILE = \'master_log_name\'\n | MASTER_LOG_POS = master_log_pos\n | RELAY_LOG_FILE = \'relay_log_name\'\n | RELAY_LOG_POS = relay_log_pos\n | MASTER_SSL = {0|1}\n | MASTER_SSL_CA = \'ca_file_name\'\n | MASTER_SSL_CAPATH = \'ca_directory_name\'\n | MASTER_SSL_CERT = \'cert_file_name\'\n | MASTER_SSL_KEY = \'key_file_name\'\n | MASTER_SSL_CIPHER = \'cipher_list\'\n | MASTER_SSL_VERIFY_SERVER_CERT = {0|1}\n | IGNORE_SERVER_IDS = (server_id_list)\n\nserver_id_list:\n [server_id [, server_id] ... ]\n\nCHANGE MASTER TO changes the parameters that the slave server uses for\nconnecting to the master server, for reading the master binary log, and\nreading the slave relay log. It also updates the contents of the\nmaster.info and relay-log.info files. To use CHANGE MASTER TO, the\nslave replication threads must be stopped (use STOP SLAVE if\nnecessary).\n\nOptions not specified retain their value, except as indicated in the\nfollowing discussion. Thus, in most cases, there is no need to specify\noptions that do not change. For example, if the password to connect to\nyour MySQL master has changed, you just need to issue these statements\nto tell the slave about the new password:\n\nSTOP SLAVE; -- if replication was running\nCHANGE MASTER TO MASTER_PASSWORD=\'new3cret\';\nSTART SLAVE; -- if you want to restart replication\n\nMASTER_HOST, MASTER_USER, MASTER_PASSWORD, and MASTER_PORT provide\ninformation to the slave about how to connect to its master:\n\no MASTER_HOST and MASTER_PORT are the host name (or IP address) of the\n master host and its TCP/IP port.\n\n *Note*: Replication cannot use Unix socket files. You must be able to\n connect to the master MySQL server using TCP/IP.\n\n If you specify the MASTER_HOST or MASTER_PORT option, the slave\n assumes that the master server is different from before (even if the\n option value is the same as its current value.) In this case, the old\n values for the master binary log file name and position are\n considered no longer applicable, so if you do not specify\n MASTER_LOG_FILE and MASTER_LOG_POS in the statement,\n MASTER_LOG_FILE=\'\' and MASTER_LOG_POS=4 are silently appended to it.\n\n Setting MASTER_HOST=\'\' (that is, setting its value explicitly to an\n empty string) is not the same as not setting MASTER_HOST at all.\n Beginning with MySQL 5.5, trying to set MASTER_HOST to an empty\n string fails with an error. Previously, setting MASTER_HOST to an\n empty string caused START SLAVE subsequently to fail. (Bug #28796)\n\no MASTER_USER and MASTER_PASSWORD are the user name and password of the\n account to use for connecting to the master.\n\n In MySQL 5.5.20 and later, MASTER_USER cannot be made empty; setting\n MASTER_USER = \'\' or leaving it unset when setting a value for for\n MASTER_PASSWORD causes an error (Bug #13427949).\n\n Currently, a password used for a replication slave account is\n effectively limited to 32 characters in length; the password can be\n longer, but any excess characters are truncated. This is not due to\n any limit imposed by the MySQL Server generally, but rather is an\n issue specific to MySQL Replication. (For more information, see Bug\n #43439.)\n\n The text of a running CHANGE MASTER TO statement, including values\n for MASTER_USER and MASTER_PASSWORD, can be seen in the output of a\n concurrent SHOW PROCESSLIST statement.\n\nThe MASTER_SSL_xxx options provide information about using SSL for the\nconnection. They correspond to the --ssl-xxx options described in\nhttps://mariadb.com/kb/en/ssl-server-system-variables/, and\nhttp://dev.mysql.com/doc/refman/5.5/en/replication-solutions-ssl.html.\nThese options can be changed even on slaves that are compiled without\nSSL support. They are saved to the master.info file, but are ignored if\nthe slave does not have SSL support enabled.\n\nMASTER_CONNECT_RETRY specifies how many seconds to wait between connect\nretries. The default is 60. The number of reconnection attempts is\nlimited by the --master-retry-count server option; for more\ninformation, see\nhttps://mariadb.com/kb/en/replication-and-binary-log-server-system-variables/.\n\nMASTER_HEARTBEAT_PERIOD sets the interval in seconds between\nreplication heartbeats. Whenever the master\'s binary log is updated\nwith an event, the waiting period for the next heartbeat is reset.\ninterval is a decimal value having the range 0 to 4294967 seconds and a\nresolution in milliseconds; the smallest nonzero value is 0.001.\nHeartbeats are sent by the master only if there are no unsent events in\nthe binary log file for a period longer than interval.\n\nSetting interval to 0 disables heartbeats altogether. The default value\nfor interval is equal to the value of slave_net_timeout divided by 2.\n\nSetting @@global.slave_net_timeout to a value less than that of the\ncurrent heartbeat interval results in a warning being issued. The\neffect of issuing RESET SLAVE on the heartbeat interval is to reset it\nto the default value.\n\nMASTER_LOG_FILE and MASTER_LOG_POS are the coordinates at which the\nslave I/O thread should begin reading from the master the next time the\nthread starts. RELAY_LOG_FILE and RELAY_LOG_POS are the coordinates at\nwhich the slave SQL thread should begin reading from the relay log the\nnext time the thread starts. If you specify either of MASTER_LOG_FILE\nor MASTER_LOG_POS, you cannot specify RELAY_LOG_FILE or RELAY_LOG_POS.\nIf neither of MASTER_LOG_FILE or MASTER_LOG_POS is specified, the slave\nuses the last coordinates of the slave SQL thread before CHANGE MASTER\nTO was issued. This ensures that there is no discontinuity in\nreplication, even if the slave SQL thread was late compared to the\nslave I/O thread, when you merely want to change, say, the password to\nuse.\n\nCHANGE MASTER TO deletes all relay log files and starts a new one,\nunless you specify RELAY_LOG_FILE or RELAY_LOG_POS. In that case, relay\nlog files are kept; the relay_log_purge global variable is set silently\nto 0.\n\nPrior to MySQL 5.5, RELAY_LOG_FILE required an absolute path. In MySQL\n5.5, the path can be relative, in which case the path is assumed to be\nrelative to the slave\'s data directory. (Bug #12190)\n\nIGNORE_SERVER_IDS was added in MySQL 5.5. This option takes a\ncomma-separated list of 0 or more server IDs. Events originating from\nthe corresponding servers are ignored, with the exception of log\nrotation and deletion events, which are still recorded in the relay\nlog.\n\nIn circular replication, the originating server normally acts as the\nterminator of its own events, so that they are not applied more than\nonce. Thus, this option is useful in circular replication when one of\nthe servers in the circle is removed. Suppose that you have a circular\nreplication setup with 4 servers, having server IDs 1, 2, 3, and 4, and\nserver 3 fails. When bridging the gap by starting replication from\nserver 2 to server 4, you can include IGNORE_SERVER_IDS = (3) in the\nCHANGE MASTER TO statement that you issue on server 4 to tell it to use\nserver 2 as its master instead of server 3. Doing so causes it to\nignore and not to propagate any statements that originated with the\nserver that is no longer in use.\n\nIf a CHANGE MASTER TO statement is issued without any IGNORE_SERVER_IDS\noption, any existing list is preserved; RESET SLAVE also has no effect\non the server ID list. To clear the list of ignored servers, it is\nnecessary to use the option with an empty list:\n\nCHANGE MASTER TO IGNORE_SERVER_IDS = ();\n\nIf IGNORE_SERVER_IDS contains the server\'s own ID and the server was\nstarted with the --replicate-same-server-id option enabled, an error\nresults.\n\nAlso beginning with MySQL 5.5, the master.info file and the output of\nSHOW SLAVE STATUS are extended to provide the list of servers that are\ncurrently ignored. For more information, see\nhttps://mariadb.com/kb/en/show-slave-status/, and\n[HELP SHOW SLAVE STATUS].\n\nBeginning with MySQL 5.5.5, invoking CHANGE MASTER TO causes the\nprevious values for MASTER_HOST, MASTER_PORT, MASTER_LOG_FILE, and\nMASTER_LOG_POS to be written to the error log, along with other\ninformation about the slave\'s state prior to execution.\n\nCHANGE MASTER TO is useful for setting up a slave when you have the\nsnapshot of the master and have recorded the master binary log\ncoordinates corresponding to the time of the snapshot. After loading\nthe snapshot into the slave to synchronize it to the slave, you can run\nCHANGE MASTER TO MASTER_LOG_FILE=\'log_name\', MASTER_LOG_POS=log_pos on\nthe slave to specify the coordinates at which the slave should begin\nreading the master binary log.\n\nThe following example changes the master server the slave uses and\nestablishes the master binary log coordinates from which the slave\nbegins reading. This is used when you want to set up the slave to\nreplicate the master:\n\nCHANGE MASTER TO\n MASTER_HOST=\'master2.mycompany.com\',\n MASTER_USER=\'replication\',\n MASTER_PASSWORD=\'bigs3cret\',\n MASTER_PORT=3306,\n MASTER_LOG_FILE=\'master2-bin.001\',\n MASTER_LOG_POS=4,\n MASTER_CONNECT_RETRY=10;\n\nThe next example shows an operation that is less frequently employed.\nIt is used when the slave has relay log files that you want it to\nexecute again for some reason. To do this, the master need not be\nreachable. You need only use CHANGE MASTER TO and start the SQL thread\n(START SLAVE SQL_THREAD):\n\nCHANGE MASTER TO\n RELAY_LOG_FILE=\'slave-relay-bin.006\',\n RELAY_LOG_POS=4025;\n\nURL: https://mariadb.com/kb/en/change-master-to/\n\n','','https://mariadb.com/kb/en/change-master-to/'),(186,'DROP DATABASE',39,'Syntax:\nDROP {DATABASE | SCHEMA} [IF EXISTS] db_name\n\nDROP DATABASE drops all tables in the database and deletes the\ndatabase. Be very careful with this statement! To use DROP DATABASE,\nyou need the DROP privilege on the database. DROP SCHEMA is a synonym\nfor DROP DATABASE.\n\n*Important*: When a database is dropped, user privileges on the\ndatabase are not automatically dropped. See [HELP GRANT].\n\nIF EXISTS is used to prevent an error from occurring if the database\ndoes not exist.\n\nURL: https://mariadb.com/kb/en/drop-database/\n\n','','https://mariadb.com/kb/en/drop-database/'),(187,'MBREQUAL',6,'MBREqual(g1,g2)\n\nReturns 1 or 0 to indicate whether the Minimum Bounding Rectangles of\nthe two geometries g1 and g2 are the same.\n\nURL: https://mariadb.com/kb/en/mbrequal/\n\n','','https://mariadb.com/kb/en/mbrequal/'),(188,'TIMESTAMP FUNCTION',31,'Syntax:\nTIMESTAMP(expr), TIMESTAMP(expr1,expr2)\n\nWith a single argument, this function returns the date or datetime\nexpression expr as a datetime value. With two arguments, it adds the\ntime expression expr2 to the date or datetime expression expr1 and\nreturns the result as a datetime value.\n\nURL: https://mariadb.com/kb/en/timestamp-function/\n\n','MariaDB> SELECT TIMESTAMP(\'2003-12-31\');\n -> \'2003-12-31 00:00:00\'\nMariaDB> SELECT TIMESTAMP(\'2003-12-31 12:00:00\',\'12:00:00\');\n -> \'2004-01-01 00:00:00\'\n','https://mariadb.com/kb/en/timestamp-function/'),(189,'PROCEDURE ANALYSE',33,'Syntax:\nANALYSE([max_elements[,max_memory]])\n\nANALYSE() examines the result from a query and returns an analysis of\nthe results that suggests optimal data types for each column that may\nhelp reduce table sizes. To obtain this analysis, append PROCEDURE\nANALYSE to the end of a SELECT statement:\n\nSELECT ... FROM ... WHERE ... PROCEDURE ANALYSE([max_elements,[max_memory]])\n\nFor example:\n\nSELECT col1, col2 FROM table1 PROCEDURE ANALYSE(10, 2000);\n\nThe results show some statistics for the values returned by the query,\nand propose an optimal data type for the columns. This can be helpful\nfor checking your existing tables, or after importing new data. You may\nneed to try different settings for the arguments so that PROCEDURE\nANALYSE() does not suggest the ENUM data type when it is not\nappropriate.\n\nThe arguments are optional and are used as follows:\n\no max_elements (default 256) is the maximum number of distinct values\n that ANALYSE() notices per column. This is used by ANALYSE() to check\n whether the optimal data type should be of type ENUM; if there are\n more than max_elements distinct values, then ENUM is not a suggested\n type.\n\no max_memory (default 8192) is the maximum amount of memory that\n ANALYSE() should allocate per column while trying to find all\n distinct values.\n\nURL: https://mariadb.com/kb/en/procedure-analyse/\n\n','','https://mariadb.com/kb/en/procedure-analyse/'),(190,'HELP_VERSION',9,'This help information was generated from the MySQL 5.5 Reference Manual\non: 2012-08-25 (revision: 31914)\n\nThis information applies to MySQL 5.5 through 5.5.29.\n','',''),(191,'CHARACTER_LENGTH',37,'Syntax:\nCHARACTER_LENGTH(str)\n\nCHARACTER_LENGTH() is a synonym for CHAR_LENGTH().\n\nURL: https://mariadb.com/kb/en/character_length/\n\n','','https://mariadb.com/kb/en/character_length/'),(192,'SHOW GRANTS',26,'Syntax:\nSHOW GRANTS [FOR user]\n\nThis statement lists the GRANT statement or statements that must be\nissued to duplicate the privileges that are granted to a MySQL user\naccount. The account is named using the same format as for the GRANT\nstatement; for example, \'jeffrey\'@\'localhost\'. If you specify only the\nuser name part of the account name, a host name part of \'%\' is used.\nFor additional information about specifying account names, see [HELP\nGRANT].\n\nMariaDB> SHOW GRANTS FOR \'root\'@\'localhost\';\n+---------------------------------------------------------------------+\n| Grants for root@localhost |\n+---------------------------------------------------------------------+\n| GRANT ALL PRIVILEGES ON *.* TO \'root\'@\'localhost\' WITH GRANT OPTION |\n+---------------------------------------------------------------------+\n\nTo list the privileges granted to the account that you are using to\nconnect to the server, you can use any of the following statements:\n\nSHOW GRANTS;\nSHOW GRANTS FOR CURRENT_USER;\nSHOW GRANTS FOR CURRENT_USER();\n\nIf SHOW GRANTS FOR CURRENT_USER (or any of the equivalent syntaxes) is\nused in DEFINER context, such as within a stored procedure that is\ndefined with SQL SECURITY DEFINER), the grants displayed are those of\nthe definer and not the invoker.\n\nURL: https://mariadb.com/kb/en/show-grants/\n\n','','https://mariadb.com/kb/en/show-grants/'),(193,'SHOW PRIVILEGES',26,'Syntax:\nSHOW PRIVILEGES\n\nSHOW PRIVILEGES shows the list of system privileges that the MySQL\nserver supports. The exact list of privileges depends on the version of\nyour server.\n\nURL: https://mariadb.com/kb/en/show-privileges/\n\n','','https://mariadb.com/kb/en/show-privileges/'),(194,'CREATE TABLESPACE',39,'Syntax:\nCREATE TABLESPACE tablespace_name\n ADD DATAFILE \'file_name\'\n USE LOGFILE GROUP logfile_group\n [EXTENT_SIZE [=] extent_size]\n [INITIAL_SIZE [=] initial_size]\n [AUTOEXTEND_SIZE [=] autoextend_size]\n [MAX_SIZE [=] max_size]\n [NODEGROUP [=] nodegroup_id]\n [WAIT]\n [COMMENT [=] comment_text]\n ENGINE [=] engine_name\n\nThis statement is used with NDB cluster, which is not supported by MariaDB.','','https://mariadb.com/kb/en/create-tablespace/'),(195,'INSERT FUNCTION',37,'Syntax:\nINSERT(str,pos,len,newstr)\n\nReturns the string str, with the substring beginning at position pos\nand len characters long replaced by the string newstr. Returns the\noriginal string if pos is not within the length of the string. Replaces\nthe rest of the string from position pos if len is not within the\nlength of the rest of the string. Returns NULL if any argument is NULL.\n\nURL: https://mariadb.com/kb/en/insert-function/\n\n','MariaDB> SELECT INSERT(\'Quadratic\', 3, 4, \'What\');\n -> \'QuWhattic\'\nMariaDB> SELECT INSERT(\'Quadratic\', -1, 4, \'What\');\n -> \'Quadratic\'\nMariaDB> SELECT INSERT(\'Quadratic\', 3, 100, \'What\');\n -> \'QuWhat\'\n','https://mariadb.com/kb/en/insert-function/'),(196,'CRC32',4,'Syntax:\nCRC32(expr)\n\nComputes a cyclic redundancy check value and returns a 32-bit unsigned\nvalue. The result is NULL if the argument is NULL. The argument is\nexpected to be a string and (if possible) is treated as one if it is\nnot.\n\nURL: https://mariadb.com/kb/en/crc32/\n\n','MariaDB> SELECT CRC32(\'MySQL\');\n -> 3259397556\nMariaDB> SELECT CRC32(\'mysql\');\n -> 2501908538\n','https://mariadb.com/kb/en/crc32/'),(197,'XOR',15,'Syntax:\nXOR\n\nLogical XOR. Returns NULL if either operand is NULL. For non-NULL\noperands, evaluates to 1 if an odd number of operands is nonzero,\notherwise 0 is returned.\n\nURL: https://mariadb.com/kb/en/xor/\n\n','MariaDB> SELECT 1 XOR 1;\n -> 0\nMariaDB> SELECT 1 XOR 0;\n -> 1\nMariaDB> SELECT 1 XOR NULL;\n -> NULL\nMariaDB> SELECT 1 XOR 1 XOR 1;\n -> 1\n','https://mariadb.com/kb/en/xor/'),(198,'STARTPOINT',13,'StartPoint(ls)\n\nReturns the Point that is the start point of the LineString value ls.\n\nURL: https://mariadb.com/kb/en/startpoint/\n\n','MariaDB> SET @ls = \'LineString(1 1,2 2,3 3)\';\nMariaDB> SELECT AsText(StartPoint(GeomFromText(@ls)));\n+---------------------------------------+\n| AsText(StartPoint(GeomFromText(@ls))) |\n+---------------------------------------+\n| POINT(1 1) |\n+---------------------------------------+\n','https://mariadb.com/kb/en/startpoint/'),(199,'GRANT',10,'Syntax:\nGRANT\n priv_type [(column_list)]\n [, priv_type [(column_list)]] ...\n ON [object_type] priv_level\n TO user_specification [, user_specification] ...\n [REQUIRE {NONE | ssl_option [[AND] ssl_option] ...}]\n [WITH with_option ...]\n\nGRANT PROXY ON user_specification\n TO user_specification [, user_specification] ...\n [WITH GRANT OPTION]\n\nobject_type:\n TABLE\n | FUNCTION\n | PROCEDURE\n\npriv_level:\n *\n | *.*\n | db_name.*\n | db_name.tbl_name\n | tbl_name\n | db_name.routine_name\n\nuser_specification:\n user\n [\n IDENTIFIED BY [PASSWORD] \'password\'\n | IDENTIFIED WITH auth_plugin [AS \'auth_string\']\n ]\n\nssl_option:\n SSL\n | X509\n | CIPHER \'cipher\'\n | ISSUER \'issuer\'\n | SUBJECT \'subject\'\n\nwith_option:\n GRANT OPTION\n | MAX_QUERIES_PER_HOUR count\n | MAX_UPDATES_PER_HOUR count\n | MAX_CONNECTIONS_PER_HOUR count\n | MAX_USER_CONNECTIONS count\n\nThe GRANT statement grants privileges to MySQL user accounts. GRANT\nalso serves to specify other account characteristics such as use of\nsecure connections and limits on access to server resources. To use\nGRANT, you must have the GRANT OPTION privilege, and you must have the\nprivileges that you are granting.\n\nNormally, a database administrator first uses CREATE USER to create an\naccount, then GRANT to define its privileges and characteristics. For\nexample:\n\nCREATE USER \'jeffrey\'@\'localhost\' IDENTIFIED BY \'mypass\';\nGRANT ALL ON db1.* TO \'jeffrey\'@\'localhost\';\nGRANT SELECT ON db2.invoice TO \'jeffrey\'@\'localhost\';\nGRANT USAGE ON *.* TO \'jeffrey\'@\'localhost\' WITH MAX_QUERIES_PER_HOUR 90;\n\nHowever, if an account named in a GRANT statement does not already\nexist, GRANT may create it under the conditions described later in the\ndiscussion of the NO_AUTO_CREATE_USER SQL mode.\n\nThe REVOKE statement is related to GRANT and enables administrators to\nremove account privileges. See [HELP REVOKE].\n\nWhen successfully executed from the mysql program, GRANT responds with\nQuery OK, 0 rows affected. To determine what privileges result from the\noperation, use SHOW GRANTS. See [HELP SHOW GRANTS].\n\nURL: https://mariadb.com/kb/en/grant/\n\n','','https://mariadb.com/kb/en/grant/'),(200,'DECLARE VARIABLE',23,'Syntax:\nDECLARE var_name [, var_name] ... type [DEFAULT value]\n\nThis statement declares local variables within stored programs. To\nprovide a default value for a variable, include a DEFAULT clause. The\nvalue can be specified as an expression; it need not be a constant. If\nthe DEFAULT clause is missing, the initial value is NULL.\n\nLocal variables are treated like stored routine parameters with respect\nto data type and overflow checking. See [HELP CREATE PROCEDURE].\n\nVariable declarations must appear before cursor or handler\ndeclarations.\n\nLocal variable names are not case sensitive. Permissible characters and\nquoting rules are the same as for other identifiers, as described in\nhttps://mariadb.com/kb/en/identifier-names/.\n\nThe scope of a local variable is the BEGIN ... END block within which\nit is declared. The variable can be referred to in blocks nested within\nthe declaring block, except those blocks that declare a variable with\nthe same name.\n\nURL: https://mariadb.com/kb/en/declare-variable/\n\n','','https://mariadb.com/kb/en/declare-variable/'),(201,'MPOLYFROMTEXT',3,'MPolyFromText(wkt[,srid]), MultiPolygonFromText(wkt[,srid])\n\nConstructs a MULTIPOLYGON value using its WKT representation and SRID.\n\nURL: https://mariadb.com/kb/en/mpolyfromtext/\n\n','','https://mariadb.com/kb/en/mpolyfromtext/'),(202,'MBRINTERSECTS',6,'MBRIntersects(g1,g2)\n\nReturns 1 or 0 to indicate whether the Minimum Bounding Rectangles of\nthe two geometries g1 and g2 intersect.\n\nURL: https://mariadb.com/kb/en/mbrintersects/\n\n','','https://mariadb.com/kb/en/mbrintersects/'),(203,'BIT_OR',16,'Syntax:\nBIT_OR(expr)\n\nReturns the bitwise OR of all bits in expr. The calculation is\nperformed with 64-bit (BIGINT) precision.\n\nURL: https://mariadb.com/kb/en/bit_or/\n\n','','https://mariadb.com/kb/en/bit_or/'),(204,'YEARWEEK',31,'Syntax:\nYEARWEEK(date), YEARWEEK(date,mode)\n\nReturns year and week for a date. The mode argument works exactly like\nthe mode argument to WEEK(). The year in the result may be different\nfrom the year in the date argument for the first and the last week of\nthe year.\n\nURL: https://mariadb.com/kb/en/yearweek/\n\n','MariaDB> SELECT YEARWEEK(\'1987-01-01\');\n -> 198653\n','https://mariadb.com/kb/en/yearweek/'),(205,'NOT BETWEEN',18,'Syntax:\nexpr NOT BETWEEN min AND max\n\nThis is the same as NOT (expr BETWEEN min AND max).\n\nURL: https://mariadb.com/kb/en/not-between/\n\n','','https://mariadb.com/kb/en/not-between/'),(206,'IS NOT',18,'Syntax:\nIS NOT boolean_value\n\nTests a value against a boolean value, where boolean_value can be TRUE,\nFALSE, or UNKNOWN.\n\nURL: https://mariadb.com/kb/en/is-not/\n\n','MariaDB> SELECT 1 IS NOT UNKNOWN, 0 IS NOT UNKNOWN, NULL IS NOT UNKNOWN;\n -> 1, 1, 0\n','https://mariadb.com/kb/en/is-not/'),(207,'LOG10',4,'Syntax:\nLOG10(X)\n\nReturns the base-10 logarithm of X.\n\nURL: https://mariadb.com/kb/en/log10/\n\n','MariaDB> SELECT LOG10(2);\n -> 0.30102999566398\nMariaDB> SELECT LOG10(100);\n -> 2\nMariaDB> SELECT LOG10(-100);\n -> NULL\n','https://mariadb.com/kb/en/log10/'),(208,'SQRT',4,'Syntax:\nSQRT(X)\n\nReturns the square root of a nonnegative number X.\n\nURL: https://mariadb.com/kb/en/sqrt/\n\n','MariaDB> SELECT SQRT(4);\n -> 2\nMariaDB> SELECT SQRT(20);\n -> 4.4721359549996\nMariaDB> SELECT SQRT(-16);\n -> NULL\n','https://mariadb.com/kb/en/sqrt/'),(209,'DECIMAL',22,'DECIMAL[(M[,D])] [UNSIGNED] [ZEROFILL]\n\nA packed \"exact\" fixed-point number. M is the total number of digits\n(the precision) and D is the number of digits after the decimal point\n(the scale). The decimal point and (for negative numbers) the \"-\" sign\nare not counted in M. If D is 0, values have no decimal point or\nfractional part. The maximum number of digits (M) for DECIMAL is 65.\nThe maximum number of supported decimals (D) is 30. If D is omitted,\nthe default is 0. If M is omitted, the default is 10.\n\nUNSIGNED, if specified, disallows negative values.\n\nAll basic calculations (+, -, *, /) with DECIMAL columns are done with\na precision of 65 digits.\n\nURL: https://mariadb.com/kb/en/decimal/\n\n','','https://mariadb.com/kb/en/decimal/'),(210,'CREATE INDEX',39,'Syntax:\nCREATE [ONLINE|OFFLINE] [UNIQUE|FULLTEXT|SPATIAL] INDEX index_name\n [index_type]\n ON tbl_name (index_col_name,...)\n [index_option] ...\n\nindex_col_name:\n col_name [(length)] [ASC | DESC]\n\nindex_type:\n USING {BTREE | HASH}\n\nindex_option:\n KEY_BLOCK_SIZE [=] value\n | index_type\n | WITH PARSER parser_name\n | COMMENT \'string\'\n\nCREATE INDEX is mapped to an ALTER TABLE statement to create indexes.\nSee [HELP ALTER TABLE]. CREATE INDEX cannot be used to create a PRIMARY\nKEY; use ALTER TABLE instead. For more information about indexes, see\nhttps://mariadb.com/kb/en/optimization-and-indexes/.\n\nURL: https://mariadb.com/kb/en/create-index/\n\n','','https://mariadb.com/kb/en/create-index/'),(211,'CREATE FUNCTION',39,'The CREATE FUNCTION statement is used to create stored functions and\nuser-defined functions (UDFs):\n\no For information about creating stored functions, see [HELP CREATE\n PROCEDURE].\n\no For information about creating user-defined functions, see [HELP\n CREATE FUNCTION UDF].\n\nURL: https://mariadb.com/kb/en/create-function/\n\n','','https://mariadb.com/kb/en/create-function/'),(212,'ALTER DATABASE',39,'Syntax:\nALTER {DATABASE | SCHEMA} [db_name]\n alter_specification ...\nALTER {DATABASE | SCHEMA} db_name\n UPGRADE DATA DIRECTORY NAME\n\nalter_specification:\n [DEFAULT] CHARACTER SET [=] charset_name\n | [DEFAULT] COLLATE [=] collation_name\n\nALTER DATABASE enables you to change the overall characteristics of a\ndatabase. These characteristics are stored in the db.opt file in the\ndatabase directory. To use ALTER DATABASE, you need the ALTER privilege\non the database. ALTER SCHEMA is a synonym for ALTER DATABASE.\n\nThe database name can be omitted from the first syntax, in which case\nthe statement applies to the default database.\n\nNational Language Characteristics\n\nThe CHARACTER SET clause changes the default database character set.\nThe COLLATE clause changes the default database collation.\nhttps://mariadb.com/kb/en/data-types-character-sets-and-collations/, discusses\ncharacter set and collation names.\n\nYou can see what character sets and collations are available using,\nrespectively, the SHOW CHARACTER SET and SHOW COLLATION statements. See\n[HELP SHOW CHARACTER SET], and [HELP SHOW COLLATION], for more\ninformation.\n\nIf you change the default character set or collation for a database,\nstored routines that use the database defaults must be dropped and\nrecreated so that they use the new defaults. (In a stored routine,\nvariables with character data types use the database defaults if the\ncharacter set or collation are not specified explicitly. See [HELP\nCREATE PROCEDURE].)\n\nUpgrading from Versions Older than MySQL 5.1\n\nThe syntax that includes the UPGRADE DATA DIRECTORY NAME clause updates\nthe name of the directory associated with the database to use the\nencoding implemented in MySQL 5.1 for mapping database names to\ndatabase directory names (see\nhttps://mariadb.com/kb/en/identifier-to-file-name-mapping/). This\nclause is for use under these conditions:\n\no It is intended when upgrading MySQL to 5.1 or later from older\n versions.\n\no It is intended to update a database directory name to the current\n encoding format if the name contains special characters that need\n encoding.\n\no The statement is used by mysqlcheck (as invoked by mysql_upgrade).\n\nFor example, if a database in MySQL 5.0 has the name a-b-c, the name\ncontains instances of the - (dash) character. In MySQL 5.0, the\ndatabase directory is also named a-b-c, which is not necessarily safe\nfor all file systems. In MySQL 5.1 and later, the same database name is\nencoded as a@002db@002dc to produce a file system-neutral directory\nname.\n\nWhen a MySQL installation is upgraded to MySQL 5.1 or later from an\nolder version,the server displays a name such as a-b-c (which is in the\nold format) as #mysql50#a-b-c, and you must refer to the name using the\n#mysql50# prefix. Use UPGRADE DATA DIRECTORY NAME in this case to\nexplicitly tell the server to re-encode the database directory name to\nthe current encoding format:\n\nALTER DATABASE `#mysql50#a-b-c` UPGRADE DATA DIRECTORY NAME;\n\nAfter executing this statement, you can refer to the database as a-b-c\nwithout the special #mysql50# prefix.\n\nURL: https://mariadb.com/kb/en/alter-database/\n\n','','https://mariadb.com/kb/en/alter-database/'),(213,'GEOMETRYN',25,'GeometryN(gc,N)\n\nReturns the N-th geometry in the GeometryCollection value gc.\nGeometries are numbered beginning with 1.\n\nURL: https://mariadb.com/kb/en/geometryn/\n\n','MariaDB> SET @gc = \'GeometryCollection(Point(1 1),LineString(2 2, 3 3))\';\nMariaDB> SELECT AsText(GeometryN(GeomFromText(@gc),1));\n+----------------------------------------+\n| AsText(GeometryN(GeomFromText(@gc),1)) |\n+----------------------------------------+\n| POINT(1 1) |\n+----------------------------------------+\n','https://mariadb.com/kb/en/geometryn/'),(214,'<<',19,'Syntax:\n<<\n\nShifts a longlong (BIGINT) number to the left.\n\nURL: https://mariadb.com/kb/en/shift-left/\n\n','MariaDB> SELECT 1 << 2;\n -> 4\n','https://mariadb.com/kb/en/shift-left/'),(215,'SHOW TABLE STATUS',26,'Syntax:\nSHOW TABLE STATUS [{FROM | IN} db_name]\n [LIKE \'pattern\' | WHERE expr]\n\nSHOW TABLE STATUS works likes SHOW TABLES, but provides a lot of\ninformation about each non-TEMPORARY table. You can also get this list\nusing the mysqlshow --status db_name command. The LIKE clause, if\npresent, indicates which table names to match. The WHERE clause can be\ngiven to select rows using more general conditions, as discussed in\nhttps://mariadb.com/kb/en/extended-show/.\n\nURL: https://mariadb.com/kb/en/show-table-status/\n\n','','https://mariadb.com/kb/en/show-table-status/'),(216,'MD5',12,'Syntax:\nMD5(str)\n\nCalculates an MD5 128-bit checksum for the string. The value is\nreturned as a string of 32 hex digits, or NULL if the argument was\nNULL. The return value can, for example, be used as a hash key. See the\nnotes at the beginning of this section about storing hash values\nefficiently.\n\nAs of MySQL 5.5.3, the return value is a nonbinary string in the\nconnection character set. Before 5.5.3, the return value is a binary\nstring; see the notes at the beginning of this section about using the\nvalue as a nonbinary string.\n\nURL: https://mariadb.com/kb/en/md5/\n\n','MariaDB> SELECT MD5(\'testing\');\n -> \'ae2b1fca515949e5d54fb22b8ed95575\'\n','https://mariadb.com/kb/en/md5/'),(217,'<',18,'Syntax:\n<\n\nLess than:\n\nURL: https://mariadb.com/kb/en/less-than/\n\n','MariaDB> SELECT 2 < 2;\n -> 0\n','https://mariadb.com/kb/en/less-than/'),(218,'UNIX_TIMESTAMP',31,'Syntax:\nUNIX_TIMESTAMP(), UNIX_TIMESTAMP(date)\n\nIf called with no argument, returns a Unix timestamp (seconds since\n\'1970-01-01 00:00:00\' UTC) as an unsigned integer. If UNIX_TIMESTAMP()\nis called with a date argument, it returns the value of the argument as\nseconds since \'1970-01-01 00:00:00\' UTC. date may be a DATE string, a\nDATETIME string, a TIMESTAMP, or a number in the format YYMMDD or\nYYYYMMDD. The server interprets date as a value in the current time\nzone and converts it to an internal value in UTC. Clients can set their\ntime zone as described in\nhttps://mariadb.com/kb/en/time-zones/.\n\nURL: https://mariadb.com/kb/en/unix_timestamp/\n\n','MariaDB> SELECT UNIX_TIMESTAMP();\n -> 1196440210\nMariaDB> SELECT UNIX_TIMESTAMP(\'2007-11-30 10:30:19\');\n -> 1196440219\n','https://mariadb.com/kb/en/unix_timestamp/'),(219,'DAYOFMONTH',31,'Syntax:\nDAYOFMONTH(date)\n\nReturns the day of the month for date, in the range 1 to 31, or 0 for\ndates such as \'0000-00-00\' or \'2008-00-00\' that have a zero day part.\n\nURL: https://mariadb.com/kb/en/dayofmonth/\n\n','MariaDB> SELECT DAYOFMONTH(\'2007-02-03\');\n -> 3\n','https://mariadb.com/kb/en/dayofmonth/'),(220,'ASCII',37,'Syntax:\nASCII(str)\n\nReturns the numeric value of the leftmost character of the string str.\nReturns 0 if str is the empty string. Returns NULL if str is NULL.\nASCII() works for 8-bit characters.\n\nURL: https://mariadb.com/kb/en/ascii/\n\n','MariaDB> SELECT ASCII(\'2\');\n -> 50\nMariaDB> SELECT ASCII(2);\n -> 50\nMariaDB> SELECT ASCII(\'dx\');\n -> 100\n','https://mariadb.com/kb/en/ascii/'),(221,'DIV',4,'Syntax:\nDIV\n\nInteger division. Similar to FLOOR(), but is safe with BIGINT values.\n\nAs of MySQL 5.5.3, if either operand has a noninteger type, the\noperands are converted to DECIMAL and divided using DECIMAL arithmetic\nbefore converting the result to BIGINT. If the result exceeds BIGINT\nrange, an error occurs. Before MySQL 5.5.3, incorrect results may occur\nfor noninteger operands that exceed BIGINT range.\n\nURL: https://mariadb.com/kb/en/div/\n\n','MariaDB> SELECT 5 DIV 2;\n -> 2\n','https://mariadb.com/kb/en/div/'),(222,'RENAME USER',10,'Syntax:\nRENAME USER old_user TO new_user\n [, old_user TO new_user] ...\n\nThe RENAME USER statement renames existing MySQL accounts. To use it,\nyou must have the global CREATE USER privilege or the UPDATE privilege\nfor the mysql database. An error occurs if any old account does not\nexist or any new account exists. Each account name uses the format\ndescribed in https://mariadb.com/kb/en/create-user/#account-names.\nFor example:\n\nRENAME USER \'jeffrey\'@\'localhost\' TO \'jeff\'@\'127.0.0.1\';\n\nIf you specify only the user name part of the account name, a host name\npart of \'%\' is used.\n\nRENAME USER causes the privileges held by the old user to be those held\nby the new user. However, RENAME USER does not automatically drop or\ninvalidate databases or objects within them that the old user created.\nThis includes stored programs or views for which the DEFINER attribute\nnames the old user. Attempts to access such objects may produce an\nerror if they execute in definer security context. (For information\nabout security context, see\nhttps://mariadb.com/kb/en/stored-routine-privileges/.)\n\nThe privilege changes take effect as indicated in\nhttp://dev.mysql.com/doc/refman/5.5/en/privilege-changes.html.\n\nURL: https://mariadb.com/kb/en/rename-user/\n\n','','https://mariadb.com/kb/en/rename-user/'),(223,'SHOW SLAVE STATUS',26,'Syntax:\nSHOW SLAVE STATUS\n\nThis statement provides status information on essential parameters of\nthe slave threads. It requires either the SUPER or REPLICATION CLIENT\nprivilege.\n\nIf you issue this statement using the mysql client, you can use a \\G\nstatement terminator rather than a semicolon to obtain a more readable\nvertical layout:\n\nMariaDB> SHOW SLAVE STATUS\\G\n*************************** 1. row ***************************\n Slave_IO_State: Waiting for master to send event\n Master_Host: localhost\n Master_User: root\n Master_Port: 3306\n Connect_Retry: 3\n Master_Log_File: gbichot-bin.005\n Read_Master_Log_Pos: 79\n Relay_Log_File: gbichot-relay-bin.005\n Relay_Log_Pos: 548\n Relay_Master_Log_File: gbichot-bin.005\n Slave_IO_Running: Yes\n Slave_SQL_Running: Yes\n Replicate_Do_DB:\n Replicate_Ignore_DB:\n Replicate_Do_Table:\n Replicate_Ignore_Table:\n Replicate_Wild_Do_Table:\n Replicate_Wild_Ignore_Table:\n Last_Errno: 0\n Last_Error:\n Skip_Counter: 0\n Exec_Master_Log_Pos: 79\n Relay_Log_Space: 552\n Until_Condition: None\n Until_Log_File:\n Until_Log_Pos: 0\n Master_SSL_Allowed: No\n Master_SSL_CA_File:\n Master_SSL_CA_Path:\n Master_SSL_Cert:\n Master_SSL_Cipher:\n Master_SSL_Key:\n Seconds_Behind_Master: 8\nMaster_SSL_Verify_Server_Cert: No\n Last_IO_Errno: 0\n Last_IO_Error:\n Last_SQL_Errno: 0\n Last_SQL_Error:\n Replicate_Ignore_Server_Ids: 0\n Master_Server_Id: 1\n\nURL: https://mariadb.com/kb/en/show-slave-status/\n\n','','https://mariadb.com/kb/en/show-slave-status/'),(224,'GEOMETRY',34,'MySQL provides a standard way of creating spatial columns for geometry\ntypes, for example, with CREATE TABLE or ALTER TABLE. Currently,\nspatial columns are supported for MyISAM, Aria, InnoDB and ARCHIVE\ntables. See also the annotations about spatial indexes under [HELP\nSPATIAL].\n\nURL: https://mariadb.com/kb/en/gis-functionality/\n\n','CREATE TABLE geom (g GEOMETRY);\n','https://mariadb.com/kb/en/gis-functionality/'),(225,'NUMPOINTS',13,'NumPoints(ls)\n\nReturns the number of Point objects in the LineString value ls.\n\nURL: https://mariadb.com/kb/en/numpoints/\n\n','MariaDB> SET @ls = \'LineString(1 1,2 2,3 3)\';\nMariaDB> SELECT NumPoints(GeomFromText(@ls));\n+------------------------------+\n| NumPoints(GeomFromText(@ls)) |\n+------------------------------+\n| 3 |\n+------------------------------+\n','https://mariadb.com/kb/en/numpoints/'),(226,'ALTER LOGFILE GROUP',39,'Syntax:\nALTER LOGFILE GROUP logfile_group\n ADD UNDOFILE \'file_name\'\n [INITIAL_SIZE [=] size]\n [WAIT]\n ENGINE [=] engine_name\n\nThis statement is used with NDB cluster, which is not supported by MariaDB.\n','','https://mariadb.com/kb/en/alter-logfile-group/'),(227,'&',19,'Syntax:\n&\n\nBitwise AND:\n\nURL: https://mariadb.com/kb/en/bitwise_and/\n\n','MariaDB> SELECT 29 & 15;\n -> 13\n','https://mariadb.com/kb/en/bitwise_and/'),(228,'LOCALTIMESTAMP',31,'Syntax:\nLOCALTIMESTAMP, LOCALTIMESTAMP()\n\nLOCALTIMESTAMP and LOCALTIMESTAMP() are synonyms for NOW().\n\nURL: https://mariadb.com/kb/en/localtimestamp/\n\n','','https://mariadb.com/kb/en/localtimestamp/'),(229,'ASSIGN-EQUAL',15,'Syntax:\n=\n\nThis operator is used to perform value assignments in two cases,\ndescribed in the next two paragraphs.\n\nWithin a SET statement, = is treated as an assignment operator that\ncauses the user variable on the left hand side of the operator to take\non the value to its right. (In other words, when used in a SET\nstatement, = is treated identically to :=.) The value on the right hand\nside may be a literal value, another variable storing a value, or any\nlegal expression that yields a scalar value, including the result of a\nquery (provided that this value is a scalar value). You can perform\nmultiple assignments in the same SET statement.\n\nIn the SET clause of an UPDATE statement, = also acts as an assignment\noperator; in this case, however, it causes the column named on the left\nhand side of the operator to assume the value given to the right,\nprovided any WHERE conditions that are part of the UPDATE are met. You\ncan make multiple assignments in the same SET clause of an UPDATE\nstatement.\n\nIn any other context, = is treated as a comparison operator.\n\nURL: https://mariadb.com/kb/en/assignment-operators-assignment-operator/\n\n','MariaDB> SELECT @var1, @var2;\n -> NULL, NULL\nMariaDB> SELECT @var1 := 1, @var2;\n -> 1, NULL\nMariaDB> SELECT @var1, @var2;\n -> 1, NULL\nMariaDB> SELECT @var1, @var2 := @var1;\n -> 1, 1\nMariaDB> SELECT @var1, @var2;\n -> 1, 1\n','https://mariadb.com/kb/en/assignment-operators-assignment-operator/'),(230,'CONVERT',37,'Syntax:\nCONVERT(expr,type), CONVERT(expr USING transcoding_name)\n\nThe CONVERT() and CAST() functions take an expression of any type and\nproduce a result value of a specified type.\n\nThe type for the result can be one of the following values:\n\no BINARY[(N)]\n\no CHAR[(N)]\n\no DATE\n\no DATETIME\n\no DECIMAL[(M[,D])]\n\no SIGNED [INTEGER]\n\no TIME\n\no UNSIGNED [INTEGER]\n\nBINARY produces a string with the BINARY data type. See\nhttps://mariadb.com/kb/en/binary/ for a\ndescription of how this affects comparisons. If the optional length N\nis given, BINARY(N) causes the cast to use no more than N bytes of the\nargument. Values shorter than N bytes are padded with 0x00 bytes to a\nlength of N.\n\nCHAR(N) causes the cast to use no more than N characters of the\nargument.\n\nCAST() and CONVERT(... USING ...) are standard SQL syntax. The\nnon-USING form of CONVERT() is ODBC syntax.\n\nCONVERT() with USING is used to convert data between different\ncharacter sets. In MySQL, transcoding names are the same as the\ncorresponding character set names. For example, this statement converts\nthe string \'abc\' in the default character set to the corresponding\nstring in the utf8 character set:\n\nSELECT CONVERT(\'abc\' USING utf8);\n\nURL: https://mariadb.com/kb/en/convert/\n\n','SELECT enum_col FROM tbl_name ORDER BY CAST(enum_col AS CHAR);\n','https://mariadb.com/kb/en/convert/'),(231,'ADDDATE',31,'Syntax:\nADDDATE(date,INTERVAL expr unit), ADDDATE(expr,days)\n\nWhen invoked with the INTERVAL form of the second argument, ADDDATE()\nis a synonym for DATE_ADD(). The related function SUBDATE() is a\nsynonym for DATE_SUB(). For information on the INTERVAL unit argument,\nsee the discussion for DATE_ADD().\n\nMariaDB> SELECT DATE_ADD(\'2008-01-02\', INTERVAL 31 DAY);\n -> \'2008-02-02\'\nMariaDB> SELECT ADDDATE(\'2008-01-02\', INTERVAL 31 DAY);\n -> \'2008-02-02\'\n\nWhen invoked with the days form of the second argument, MySQL treats it\nas an integer number of days to be added to expr.\n\nURL: https://mariadb.com/kb/en/adddate/\n\n','MariaDB> SELECT ADDDATE(\'2008-01-02\', 31);\n -> \'2008-02-02\'\n','https://mariadb.com/kb/en/adddate/'),(232,'REPEAT LOOP',23,'Syntax:\n[begin_label:] REPEAT\n statement_list\nUNTIL search_condition\nEND REPEAT [end_label]\n\nThe statement list within a REPEAT statement is repeated until the\nsearch_condition expression is true. Thus, a REPEAT always enters the\nloop at least once. statement_list consists of one or more statements,\neach terminated by a semicolon (;) statement delimiter.\n\nA REPEAT statement can be labeled. For the rules regarding label use,\nsee [HELP labels].\n\nURL: https://mariadb.com/kb/en/repeat-loop/\n\n','MariaDB> delimiter //\n\nMariaDB> CREATE PROCEDURE dorepeat(p1 INT)\n -> BEGIN\n -> SET @x = 0;\n -> REPEAT\n -> SET @x = @x + 1;\n -> UNTIL @x > p1 END REPEAT;\n -> END\n -> //\nQuery OK, 0 rows affected (0.00 sec)\n\nMariaDB> CALL dorepeat(1000)//\nQuery OK, 0 rows affected (0.00 sec)\n\nMariaDB> SELECT @x//\n+------+\n| @x |\n+------+\n| 1001 |\n+------+\n1 row in set (0.00 sec)\n','https://mariadb.com/kb/en/repeat-loop/'),(233,'ALTER FUNCTION',39,'Syntax:\nALTER FUNCTION func_name [characteristic ...]\n\ncharacteristic:\n COMMENT \'string\'\n | LANGUAGE SQL\n | { CONTAINS SQL | NO SQL | READS SQL DATA | MODIFIES SQL DATA }\n | SQL SECURITY { DEFINER | INVOKER }\n\nThis statement can be used to change the characteristics of a stored\nfunction. More than one change may be specified in an ALTER FUNCTION\nstatement. However, you cannot change the parameters or body of a\nstored function using this statement; to make such changes, you must\ndrop and re-create the function using DROP FUNCTION and CREATE\nFUNCTION.\n\nYou must have the ALTER ROUTINE privilege for the function. (That\nprivilege is granted automatically to the function creator.) If binary\nlogging is enabled, the ALTER FUNCTION statement might also require the\nSUPER privilege, as described in\nhttps://mariadb.com/kb/en/binary-logging-of-stored-routines/.\n\nURL: https://mariadb.com/kb/en/alter-function/\n\n','','https://mariadb.com/kb/en/alter-function/'),(234,'SMALLINT',22,'SMALLINT[(M)] [UNSIGNED] [ZEROFILL]\n\nA small integer. The signed range is -32768 to 32767. The unsigned\nrange is 0 to 65535.\n\nURL: https://mariadb.com/kb/en/smallint/\n\n','','https://mariadb.com/kb/en/smallint/'),(235,'DOUBLE PRECISION',22,'DOUBLE PRECISION[(M,D)] [UNSIGNED] [ZEROFILL], REAL[(M,D)] [UNSIGNED]\n[ZEROFILL]\n\nThese types are synonyms for DOUBLE. Exception: If the REAL_AS_FLOAT\nSQL mode is enabled, REAL is a synonym for FLOAT rather than DOUBLE.\n\nURL: https://mariadb.com/kb/en/double-precision/\n\n','','https://mariadb.com/kb/en/double-precision/'),(236,'ORD',37,'Syntax:\nORD(str)\n\nIf the leftmost character of the string str is a multi-byte character,\nreturns the code for that character, calculated from the numeric values\nof its constituent bytes using this formula:\n\n (1st byte code)\n+ (2nd byte code * 256)\n+ (3rd byte code * 2562) ...\n\nIf the leftmost character is not a multi-byte character, ORD() returns\nthe same value as the ASCII() function.\n\nURL: https://mariadb.com/kb/en/ord/\n\n','MariaDB> SELECT ORD(\'2\');\n -> 50\n','https://mariadb.com/kb/en/ord/'),(237,'DEALLOCATE PREPARE',8,'Syntax:\n{DEALLOCATE | DROP} PREPARE stmt_name\n\nTo deallocate a prepared statement produced with PREPARE, use a\nDEALLOCATE PREPARE statement that refers to the prepared statement\nname. Attempting to execute a prepared statement after deallocating it\nresults in an error.\n\nURL: https://mariadb.com/kb/en/deallocate-drop-prepared-statement/\n\n','','https://mariadb.com/kb/en/deallocate-drop-prepared-statement/'),(238,'ENVELOPE',36,'Envelope(g)\n\nReturns the Minimum Bounding Rectangle (MBR) for the geometry value g.\nThe result is returned as a Polygon value.\n\nThe polygon is defined by the corner points of the bounding box:\n\nPOLYGON((MINX MINY, MAXX MINY, MAXX MAXY, MINX MAXY, MINX MINY))\n\nURL: https://mariadb.com/kb/en/envelope/\n\n','MariaDB> SELECT AsText(Envelope(GeomFromText(\'LineString(1 1,2 2)\')));\n+-------------------------------------------------------+\n| AsText(Envelope(GeomFromText(\'LineString(1 1,2 2)\'))) |\n+-------------------------------------------------------+\n| POLYGON((1 1,2 1,2 2,1 2,1 1)) |\n+-------------------------------------------------------+\n','https://mariadb.com/kb/en/envelope/'),(239,'IS_FREE_LOCK',14,'Syntax:\nIS_FREE_LOCK(str)\n\nChecks whether the lock named str is free to use (that is, not locked).\nReturns 1 if the lock is free (no one is using the lock), 0 if the lock\nis in use, and NULL if an error occurs (such as an incorrect argument).\n\nURL: https://mariadb.com/kb/en/is_free_lock/\n\n','','https://mariadb.com/kb/en/is_free_lock/'),(240,'TOUCHES',30,'Touches(g1,g2)\n\nReturns 1 or 0 to indicate whether g1 spatially touches g2. Two\ngeometries spatially touch if the interiors of the geometries do not\nintersect, but the boundary of one of the geometries intersects either\nthe boundary or the interior of the other.\n\nURL: https://mariadb.com/kb/en/touches/\n\n','','https://mariadb.com/kb/en/touches/'),(241,'INET_ATON',14,'Syntax:\nINET_ATON(expr)\n\nGiven the dotted-quad representation of an IPv4 network address as a\nstring, returns an integer that represents the numeric value of the\naddress in network byte order (big endian). INET_ATON() returns NULL if\nit does not understand its argument.\n\nURL: https://mariadb.com/kb/en/inet_aton/\n\n','MariaDB> SELECT INET_ATON(\'10.0.5.9\');\n -> 167773449\n','https://mariadb.com/kb/en/inet_aton/'),(242,'UNCOMPRESS',12,'Syntax:\nUNCOMPRESS(string_to_uncompress)\n\nUncompresses a string compressed by the COMPRESS() function. If the\nargument is not a compressed value, the result is NULL. This function\nrequires MySQL to have been compiled with a compression library such as\nzlib. Otherwise, the return value is always NULL.\n\nURL: https://mariadb.com/kb/en/uncompress/\n\n','MariaDB> SELECT UNCOMPRESS(COMPRESS(\'any string\'));\n -> \'any string\'\nMariaDB> SELECT UNCOMPRESS(\'any string\');\n -> NULL\n','https://mariadb.com/kb/en/uncompress/'),(243,'AUTO_INCREMENT',22,'The AUTO_INCREMENT attribute can be used to generate a unique identity\nfor new rows:\n\nURL: https://mariadb.com/kb/en/auto_increment/\n\n','CREATE TABLE animals (\n id MEDIUMINT NOT NULL AUTO_INCREMENT,\n name CHAR(30) NOT NULL,\n PRIMARY KEY (id)\n);\n\nINSERT INTO animals (name) VALUES\n (\'dog\'),(\'cat\'),(\'penguin\'),\n (\'lax\'),(\'whale\'),(\'ostrich\');\n\nSELECT * FROM animals;\n','https://mariadb.com/kb/en/auto_increment/'),(244,'ISSIMPLE',36,'IsSimple(g)\n\nCurrently, this function is a placeholder and should not be used. If\nimplemented, its behavior will be as described in the next paragraph.\n\nReturns 1 if the geometry value g has no anomalous geometric points,\nsuch as self-intersection or self-tangency. IsSimple() returns 0 if the\nargument is not simple, and -1 if it is NULL.\n\nThe description of each instantiable geometric class given earlier in\nthe chapter includes the specific conditions that cause an instance of\nthat class to be classified as not simple. (See [HELP Geometry\nhierarchy].)\n\nURL: https://mariadb.com/kb/en/issimple/\n\n','','https://mariadb.com/kb/en/issimple/'),(245,'- BINARY',4,'Syntax:\n-\n\nSubtraction:\n\nURL: https://mariadb.com/kb/en/subtraction-operator-/\n\n','MariaDB> SELECT 3-5;\n -> -2\n','https://mariadb.com/kb/en/subtraction-operator-/'),(246,'GEOMCOLLFROMTEXT',3,'GeomCollFromText(wkt[,srid]), GeometryCollectionFromText(wkt[,srid])\n\nConstructs a GEOMETRYCOLLECTION value using its WKT representation and\nSRID.\n\nURL: https://mariadb.com/kb/en/geomcollfromtext/\n\n','','https://mariadb.com/kb/en/geomcollfromtext/'),(247,'WKT DEFINITION',3,'The Well-Known Text (WKT) representation of Geometry is designed to\nexchange geometry data in ASCII form. For a Backus-Naur grammar that\nspecifies the formal production rules for writing WKT values, see the\nOpenGIS specification document referenced in\nhttps://mariadb.com/kb/en/gis-resources/.\n\nURL: https://mariadb.com/kb/en/wkt-definition/\n\n','','https://mariadb.com/kb/en/wkt-definition/'),(248,'CURRENT_TIME',31,'Syntax:\nCURRENT_TIME, CURRENT_TIME()\n\nCURRENT_TIME and CURRENT_TIME() are synonyms for CURTIME().\n\nURL: https://mariadb.com/kb/en/current_time/\n\n','','https://mariadb.com/kb/en/current_time/'),(249,'REVOKE',10,'Syntax:\nREVOKE\n priv_type [(column_list)]\n [, priv_type [(column_list)]] ...\n ON [object_type] priv_level\n FROM user [, user] ...\n\nREVOKE ALL PRIVILEGES, GRANT OPTION\n FROM user [, user] ...\n\nREVOKE PROXY ON user\n FROM user [, user] ...\n\nThe REVOKE statement enables system administrators to revoke privileges\nfrom MySQL accounts. Each account name uses the format described in\nhttps://mariadb.com/kb/en/create-user#account-names. For example:\n\nREVOKE INSERT ON *.* FROM \'jeffrey\'@\'localhost\';\n\nIf you specify only the user name part of the account name, a host name\npart of \'%\' is used.\n\nFor details on the levels at which privileges exist, the permissible\npriv_type and priv_level values, and the syntax for specifying users\nand passwords, see [HELP GRANT]\n\nTo use the first REVOKE syntax, you must have the GRANT OPTION\nprivilege, and you must have the privileges that you are revoking.\n\nTo revoke all privileges, use the second syntax, which drops all\nglobal, database, table, column, and routine privileges for the named\nuser or users:\n\nREVOKE ALL PRIVILEGES, GRANT OPTION FROM user [, user] ...\n\nTo use this REVOKE syntax, you must have the global CREATE USER\nprivilege or the UPDATE privilege for the mysql database.\n\nURL: https://mariadb.com/kb/en/revoke/\n\n','','https://mariadb.com/kb/en/revoke/'),(250,'LAST_INSERT_ID',17,'Syntax:\nLAST_INSERT_ID(), LAST_INSERT_ID(expr)\n\nLAST_INSERT_ID() (with no argument) returns a BIGINT (64-bit) value\nrepresenting the first automatically generated value successfully\ninserted for an AUTO_INCREMENT column as a result of the most recently\nexecuted INSERT statement. The value of LAST_INSERT_ID() remains\nunchanged if no rows are successfully inserted.\n\nFor example, after inserting a row that generates an AUTO_INCREMENT\nvalue, you can get the value like this:\n\nMariaDB> SELECT LAST_INSERT_ID();\n -> 195\n\nThe currently executing statement does not affect the value of\nLAST_INSERT_ID(). Suppose that you generate an AUTO_INCREMENT value\nwith one statement, and then refer to LAST_INSERT_ID() in a\nmultiple-row INSERT statement that inserts rows into a table with its\nown AUTO_INCREMENT column. The value of LAST_INSERT_ID() will remain\nstable in the second statement; its value for the second and later rows\nis not affected by the earlier row insertions. (However, if you mix\nreferences to LAST_INSERT_ID() and LAST_INSERT_ID(expr), the effect is\nundefined.)\n\nIf the previous statement returned an error, the value of\nLAST_INSERT_ID() is undefined. For transactional tables, if the\nstatement is rolled back due to an error, the value of LAST_INSERT_ID()\nis left undefined. For manual ROLLBACK, the value of LAST_INSERT_ID()\nis not restored to that before the transaction; it remains as it was at\nthe point of the ROLLBACK.\n\nWithin the body of a stored routine (procedure or function) or a\ntrigger, the value of LAST_INSERT_ID() changes the same way as for\nstatements executed outside the body of these kinds of objects. The\neffect of a stored routine or trigger upon the value of\nLAST_INSERT_ID() that is seen by following statements depends on the\nkind of routine:\n\no If a stored procedure executes statements that change the value of\n LAST_INSERT_ID(), the changed value is seen by statements that follow\n the procedure call.\n\no For stored functions and triggers that change the value, the value is\n restored when the function or trigger ends, so following statements\n will not see a changed value.\n\nURL: https://mariadb.com/kb/en/last_insert_id/\n\n','','https://mariadb.com/kb/en/last_insert_id/'),(251,'LAST_DAY',31,'Syntax:\nLAST_DAY(date)\n\nTakes a date or datetime value and returns the corresponding value for\nthe last day of the month. Returns NULL if the argument is invalid.\n\nURL: https://mariadb.com/kb/en/last_day/\n\n','MariaDB> SELECT LAST_DAY(\'2003-02-05\');\n -> \'2003-02-28\'\nMariaDB> SELECT LAST_DAY(\'2004-02-05\');\n -> \'2004-02-29\'\nMariaDB> SELECT LAST_DAY(\'2004-01-01 01:01:01\');\n -> \'2004-01-31\'\nMariaDB> SELECT LAST_DAY(\'2003-03-32\');\n -> NULL\n','https://mariadb.com/kb/en/last_day/'),(252,'MEDIUMINT',22,'MEDIUMINT[(M)] [UNSIGNED] [ZEROFILL]\n\nA medium-sized integer. The signed range is -8388608 to 8388607. The\nunsigned range is 0 to 16777215.\n\nURL: https://mariadb.com/kb/en/mediumint/\n\n','','https://mariadb.com/kb/en/mediumint/'),(253,'FLOOR',4,'Syntax:\nFLOOR(X)\n\nReturns the largest integer value not greater than X.\n\nURL: https://mariadb.com/kb/en/floor/\n\n','MariaDB> SELECT FLOOR(1.23);\n -> 1\nMariaDB> SELECT FLOOR(-1.23);\n -> -2\n','https://mariadb.com/kb/en/floor/'),(254,'RTRIM',37,'Syntax:\nRTRIM(str)\n\nReturns the string str with trailing space characters removed.\n\nURL: https://mariadb.com/kb/en/rtrim/\n\n','MariaDB> SELECT RTRIM(\'barbar \');\n -> \'barbar\'\n','https://mariadb.com/kb/en/rtrim/'),(255,'EXPLAIN',28,'Syntax:\nEXPLAIN [explain_type] SELECT select_options\n\nexplain_type:\n EXTENDED\n | PARTITIONS\n\nOr:\n\nEXPLAIN tbl_name\n\nThe EXPLAIN statement can be used either as a way to obtain information\nabout how MySQL executes a statement, or as a synonym for DESCRIBE:\n\no When you precede a SELECT statement with the keyword EXPLAIN, MySQL\n displays information from the optimizer about the query execution\n plan. That is, MySQL explains how it would process the statement,\n including information about how tables are joined and in which order.\n EXPLAIN EXTENDED can be used to obtain additional information.\n\n For information about using EXPLAIN and EXPLAIN EXTENDED to obtain\n query execution plan information, see\n https://mariadb.com/kb/en/explain/.\n\no EXPLAIN PARTITIONS is useful only when examining queries involving\n partitioned tables. For details, see\n http://dev.mysql.com/doc/refman/5.5/en/partitioning-info.html.\n\no EXPLAIN tbl_name is synonymous with DESCRIBE tbl_name or SHOW COLUMNS\n FROM tbl_name. For information about DESCRIBE and SHOW COLUMNS, see\n [HELP DESCRIBE], and [HELP SHOW COLUMNS].\n\nURL: https://mariadb.com/kb/en/explain/\n\n','','https://mariadb.com/kb/en/explain/'),(256,'DEGREES',4,'Syntax:\nDEGREES(X)\n\nReturns the argument X, converted from radians to degrees.\n\nURL: https://mariadb.com/kb/en/degrees/\n\n','MariaDB> SELECT DEGREES(PI());\n -> 180\nMariaDB> SELECT DEGREES(PI() / 2);\n -> 90\n','https://mariadb.com/kb/en/degrees/'),(257,'VARCHAR',22,'[NATIONAL] VARCHAR(M) [CHARACTER SET charset_name] [COLLATE\ncollation_name]\n\nA variable-length string. M represents the maximum column length in\ncharacters. The range of M is 0 to 65,535. The effective maximum length\nof a VARCHAR is subject to the maximum row size (65,535 bytes, which is\nshared among all columns) and the character set used. For example, utf8\ncharacters can require up to three bytes per character, so a VARCHAR\ncolumn that uses the utf8 character set can be declared to be a maximum\nof 21,844 characters. See\nhttp://dev.mysql.com/doc/refman/5.5/en/column-count-limit.html.\n\nMySQL stores VARCHAR values as a 1-byte or 2-byte length prefix plus\ndata. The length prefix indicates the number of bytes in the value. A\nVARCHAR column uses one length byte if values require no more than 255\nbytes, two length bytes if values may require more than 255 bytes.\n\n*Note*: MySQL 5.5 follows the standard SQL specification, and does not\nremove trailing spaces from VARCHAR values.\n\nVARCHAR is shorthand for CHARACTER VARYING. NATIONAL VARCHAR is the\nstandard SQL way to define that a VARCHAR column should use some\npredefined character set. MySQL 4.1 and up uses utf8 as this predefined\ncharacter set.\nhttps://mariadb.com/kb/en/varchar/. NVARCHAR\nis shorthand for NATIONAL VARCHAR.\n\nURL: https://mariadb.com/kb/en/varchar/\n\n','','https://mariadb.com/kb/en/varchar/'),(258,'UNHEX',37,'Syntax:\n\nUNHEX(str)\n\nFor a string argument str, UNHEX(str) performs the inverse operation of\nHEX(str). That is, it interprets each pair of characters in the\nargument as a hexadecimal number and converts it to the character\nrepresented by the number. The return value is a binary string.\n\nURL: https://mariadb.com/kb/en/unhex/\n\n','MariaDB> SELECT UNHEX(\'4D7953514C\');\n -> \'MySQL\'\nMariaDB> SELECT 0x4D7953514C;\n -> \'MySQL\'\nMariaDB> SELECT UNHEX(HEX(\'string\'));\n -> \'string\'\nMariaDB> SELECT HEX(UNHEX(\'1267\'));\n -> \'1267\'\n','https://mariadb.com/kb/en/unhex/'),(259,'- UNARY',4,'Syntax:\n-\n\nUnary minus. This operator changes the sign of the operand.\n\nURL: https://mariadb.com/kb/en/subtraction-operator-/\n\n','MariaDB> SELECT - 2;\n -> -2\n','https://mariadb.com/kb/en/subtraction-operator-/'),(260,'STD',16,'Syntax:\nSTD(expr)\n\nReturns the population standard deviation of expr. This is an extension\nto standard SQL. The standard SQL function STDDEV_POP() can be used\ninstead.\n\nThis function returns NULL if there were no matching rows.\n\nURL: https://mariadb.com/kb/en/std/\n\n','','https://mariadb.com/kb/en/std/'),(261,'COS',4,'Syntax:\nCOS(X)\n\nReturns the cosine of X, where X is given in radians.\n\nURL: https://mariadb.com/kb/en/cos/\n\n','MariaDB> SELECT COS(PI());\n -> -1\n','https://mariadb.com/kb/en/cos/'),(262,'DATE FUNCTION',31,'Syntax:\nDATE(expr)\n\nExtracts the date part of the date or datetime expression expr.\n\nURL: https://mariadb.com/kb/en/date-function/\n\n','MariaDB> SELECT DATE(\'2003-12-31 01:02:03\');\n -> \'2003-12-31\'\n','https://mariadb.com/kb/en/date-function/'),(263,'DROP TRIGGER',39,'Syntax:\nDROP TRIGGER [IF EXISTS] [schema_name.]trigger_name\n\nThis statement drops a trigger. The schema (database) name is optional.\nIf the schema is omitted, the trigger is dropped from the default\nschema. DROP TRIGGER requires the TRIGGER privilege for the table\nassociated with the trigger.\n\nUse IF EXISTS to prevent an error from occurring for a trigger that\ndoes not exist. A NOTE is generated for a nonexistent trigger when\nusing IF EXISTS. See [HELP SHOW WARNINGS].\n\nTriggers for a table are also dropped if you drop the table.\n\nURL: https://mariadb.com/kb/en/drop-trigger/\n\n','','https://mariadb.com/kb/en/drop-trigger/'),(264,'RESET MASTER',8,'Syntax:\nRESET MASTER\n\nDeletes all binary log files listed in the index file, resets the\nbinary log index file to be empty, and creates a new binary log file.\nThis statement is intended to be used only when the master is started\nfor the first time.\n\nURL: https://mariadb.com/kb/en/reset-master/\n\n','','https://mariadb.com/kb/en/reset-master/'),(265,'TAN',4,'Syntax:\nTAN(X)\n\nReturns the tangent of X, where X is given in radians.\n\nURL: https://mariadb.com/kb/en/tan/\n\n','MariaDB> SELECT TAN(PI());\n -> -1.2246063538224e-16\nMariaDB> SELECT TAN(PI()+1);\n -> 1.5574077246549\n','https://mariadb.com/kb/en/tan/'),(266,'PI',4,'Syntax:\nPI()\n\nReturns the value of π (pi). The default number of decimal places\ndisplayed is seven, but MySQL uses the full double-precision value\ninternally.\n\nURL: https://mariadb.com/kb/en/pi/\n\n','MariaDB> SELECT PI();\n -> 3.141593\nMariaDB> SELECT PI()+0.000000000000000000;\n -> 3.141592653589793116\n','https://mariadb.com/kb/en/pi/'),(267,'WEEKOFYEAR',31,'Syntax:\nWEEKOFYEAR(date)\n\nReturns the calendar week of the date as a number in the range from 1\nto 53. WEEKOFYEAR() is a compatibility function that is equivalent to\nWEEK(date,3).\n\nURL: https://mariadb.com/kb/en/weekofyear/\n\n','MariaDB> SELECT WEEKOFYEAR(\'2008-02-20\');\n -> 8\n','https://mariadb.com/kb/en/weekofyear/'),(268,'/',4,'Syntax:\n/\n\nDivision:\n\nURL: https://mariadb.com/kb/en/division-operator/\n\n','MariaDB> SELECT 3/5;\n -> 0.60\n','https://mariadb.com/kb/en/division-operator/'),(269,'PURGE BINARY LOGS',8,'Syntax:\nPURGE { BINARY | MASTER } LOGS\n { TO \'log_name\' | BEFORE datetime_expr }\n\nThe binary log is a set of files that contain information about data\nmodifications made by the MySQL server. The log consists of a set of\nbinary log files, plus an index file (see\nhttps://mariadb.com/kb/en/overview-of-the-binary-log/).\n\nThe PURGE BINARY LOGS statement deletes all the binary log files listed\nin the log index file prior to the specified log file name or date.\nBINARY and MASTER are synonyms. Deleted log files also are removed from\nthe list recorded in the index file, so that the given log file becomes\nthe first in the list.\n\nThis statement has no effect if the server was not started with the\n--log-bin option to enable binary logging.\n\nURL: https://mariadb.com/kb/en/sql-commands-purge-logs/\n\n','PURGE BINARY LOGS TO \'mysql-bin.010\';\nPURGE BINARY LOGS BEFORE \'2008-04-02 22:46:26\';\n','https://mariadb.com/kb/en/sql-commands-purge-logs/'),(270,'STDDEV_SAMP',16,'Syntax:\nSTDDEV_SAMP(expr)\n\nReturns the sample standard deviation of expr (the square root of\nVAR_SAMP().\n\nSTDDEV_SAMP() returns NULL if there were no matching rows.\n\nURL: https://mariadb.com/kb/en/stddev_samp/\n\n','','https://mariadb.com/kb/en/stddev_samp/'),(271,'SCHEMA',17,'Syntax:\nSCHEMA()\n\nThis function is a synonym for DATABASE().\n\nURL: https://mariadb.com/kb/en/schema/\n\n','','https://mariadb.com/kb/en/schema/'),(272,'MLINEFROMWKB',32,'MLineFromWKB(wkb[,srid]), MultiLineStringFromWKB(wkb[,srid])\n\nConstructs a MULTILINESTRING value using its WKB representation and\nSRID.\n\nURL: https://mariadb.com/kb/en/mlinefromwkb/\n\n','','https://mariadb.com/kb/en/mlinefromwkb/'),(273,'LOG2',4,'Syntax:\nLOG2(X)\n\nReturns the base-2 logarithm of X.\n\nURL: https://mariadb.com/kb/en/log2/\n\n','MariaDB> SELECT LOG2(65536);\n -> 16\nMariaDB> SELECT LOG2(-100);\n -> NULL\n','https://mariadb.com/kb/en/log2/'),(274,'SUBTIME',31,'Syntax:\nSUBTIME(expr1,expr2)\n\nSUBTIME() returns expr1 - expr2 expressed as a value in the same format\nas expr1. expr1 is a time or datetime expression, and expr2 is a time\nexpression.\n\nURL: https://mariadb.com/kb/en/subtime/\n\n','MariaDB> SELECT SUBTIME(\'2007-12-31 23:59:59.999999\',\'1 1:1:1.000002\');\n -> \'2007-12-30 22:58:58.999997\'\nMariaDB> SELECT SUBTIME(\'01:00:00.999999\', \'02:00:00.999998\');\n -> \'-00:59:59.999999\'\n','https://mariadb.com/kb/en/subtime/'),(275,'UNCOMPRESSED_LENGTH',12,'Syntax:\nUNCOMPRESSED_LENGTH(compressed_string)\n\nReturns the length that the compressed string had before being\ncompressed.\n\nURL: https://mariadb.com/kb/en/uncompressed_length/\n\n','MariaDB> SELECT UNCOMPRESSED_LENGTH(COMPRESS(REPEAT(\'a\',30)));\n -> 30\n','https://mariadb.com/kb/en/uncompressed_length/'),(276,'DROP TABLE',39,'Syntax:\nDROP [TEMPORARY] TABLE [IF EXISTS]\n tbl_name [, tbl_name] ...\n [RESTRICT | CASCADE]\n\nDROP TABLE removes one or more tables. You must have the DROP privilege\nfor each table. All table data and the table definition are removed, so\nbe careful with this statement! If any of the tables named in the\nargument list do not exist, MySQL returns an error indicating by name\nwhich nonexisting tables it was unable to drop, but it also drops all\nof the tables in the list that do exist.\n\n*Important*: When a table is dropped, user privileges on the table are\nnot automatically dropped. See [HELP GRANT].\n\nNote that for a partitioned table, DROP TABLE permanently removes the\ntable definition, all of its partitions, and all of the data which was\nstored in those partitions. It also removes the partitioning definition\n(.par) file associated with the dropped table.\n\nUse IF EXISTS to prevent an error from occurring for tables that do not\nexist. A NOTE is generated for each nonexistent table when using IF\nEXISTS. See [HELP SHOW WARNINGS].\n\nRESTRICT and CASCADE are permitted to make porting easier. In MySQL\n5.5, they do nothing.\n\n*Note*: DROP TABLE automatically commits the current active\ntransaction, unless you use the TEMPORARY keyword.\n\nURL: https://mariadb.com/kb/en/drop-table/\n\n','','https://mariadb.com/kb/en/drop-table/'),(277,'POW',4,'Syntax:\nPOW(X,Y)\n\nReturns the value of X raised to the power of Y.\n\nURL: https://mariadb.com/kb/en/pow/\n\n','MariaDB> SELECT POW(2,2);\n -> 4\nMariaDB> SELECT POW(2,-2);\n -> 0.25\n','https://mariadb.com/kb/en/pow/'),(278,'SHOW CREATE TABLE',26,'Syntax:\nSHOW CREATE TABLE tbl_name\n\nShows the CREATE TABLE statement that creates the given table. To use\nthis statement, you must have some privilege for the table. This\nstatement also works with views.\nSHOW CREATE TABLE quotes table and column names according to the value\nof the sql_quote_show_create option. See\nhttps://mariadb.com/kb/en/server-system-variables/.\n\nURL: https://mariadb.com/kb/en/show-create-table/\n\n','MariaDB> SHOW CREATE TABLE t\\G\n*************************** 1. row ***************************\n Table: t\nCreate Table: CREATE TABLE t (\n id INT(11) default NULL auto_increment,\n s char(60) default NULL,\n PRIMARY KEY (id)\n) ENGINE=MyISAM\n','https://mariadb.com/kb/en/show-create-table/'),(279,'DUAL',27,'You are permitted to specify DUAL as a dummy table name in situations\nwhere no tables are referenced:\n\nMariaDB> SELECT 1 + 1 FROM DUAL;\n -> 2\n\nDUAL is purely for the convenience of people who require that all\nSELECT statements should have FROM and possibly other clauses. MySQL\nmay ignore the clauses. MySQL does not require FROM DUAL if no tables\nare referenced.\n\nURL: https://mariadb.com/kb/en/dual/\n\n','','https://mariadb.com/kb/en/dual/'),(280,'INSTR',37,'Syntax:\nINSTR(str,substr)\n\nReturns the position of the first occurrence of substring substr in\nstring str. This is the same as the two-argument form of LOCATE(),\nexcept that the order of the arguments is reversed.\n\nURL: https://mariadb.com/kb/en/instr/\n\n','MariaDB> SELECT INSTR(\'foobarbar\', \'bar\');\n -> 4\nMariaDB> SELECT INSTR(\'xbar\', \'foobar\');\n -> 0\n','https://mariadb.com/kb/en/instr/'),(281,'NOW',31,'Syntax:\nNOW()\n\nReturns the current date and time as a value in \'YYYY-MM-DD HH:MM:SS\'\nor YYYYMMDDHHMMSS.uuuuuu format, depending on whether the function is\nused in a string or numeric context. The value is expressed in the\ncurrent time zone.\n\nURL: https://mariadb.com/kb/en/now/\n\n','MariaDB> SELECT NOW();\n -> \'2007-12-15 23:50:26\'\nMariaDB> SELECT NOW() + 0;\n -> 20071215235026.000000\n','https://mariadb.com/kb/en/now/'),(282,'SHOW ENGINES',26,'Syntax:\nSHOW [STORAGE] ENGINES\n\nSHOW ENGINES displays status information about the server\'s storage\nengines. This is particularly useful for checking whether a storage\nengine is supported, or to see what the default engine is.\n\nURL: https://mariadb.com/kb/en/show-engines/\n\n','','https://mariadb.com/kb/en/show-engines/'),(283,'>=',18,'Syntax:\n>=\n\nGreater than or equal:\n\nURL: https://mariadb.com/kb/en/greater-than-or-equal/\n\n','MariaDB> SELECT 2 >= 2;\n -> 1\n','https://mariadb.com/kb/en/greater-than-or-equal/'),(284,'EXP',4,'Syntax:\nEXP(X)\n\nReturns the value of e (the base of natural logarithms) raised to the\npower of X. The inverse of this function is LOG() (using a single\nargument only) or LN().\n\nURL: https://mariadb.com/kb/en/exp/\n\n','MariaDB> SELECT EXP(2);\n -> 7.3890560989307\nMariaDB> SELECT EXP(-2);\n -> 0.13533528323661\nMariaDB> SELECT EXP(0);\n -> 1\n','https://mariadb.com/kb/en/exp/'),(285,'LONGBLOB',22,'LONGBLOB\n\nA BLOB column with a maximum length of 4,294,967,295 or 4GB (232 - 1)\nbytes. The effective maximum length of LONGBLOB columns depends on the\nconfigured maximum packet size in the client/server protocol and\navailable memory. Each LONGBLOB value is stored using a 4-byte length\nprefix that indicates the number of bytes in the value.\n\nURL: https://mariadb.com/kb/en/longblob/\n\n','','https://mariadb.com/kb/en/longblob/'),(286,'POINTN',13,'PointN(ls,N)\n\nReturns the N-th Point in the Linestring value ls. Points are numbered\nbeginning with 1.\n\nURL: https://mariadb.com/kb/en/pointn/\n\n','MariaDB> SET @ls = \'LineString(1 1,2 2,3 3)\';\nMariaDB> SELECT AsText(PointN(GeomFromText(@ls),2));\n+-------------------------------------+\n| AsText(PointN(GeomFromText(@ls),2)) |\n+-------------------------------------+\n| POINT(2 2) |\n+-------------------------------------+\n','https://mariadb.com/kb/en/pointn/'),(287,'YEAR DATA TYPE',22,'YEAR[(2|4)]\n\nA year in two-digit or four-digit format. The default is four-digit\nformat. YEAR(2) or YEAR(4) differ in display format, but have the same\nrange of values. In four-digit format, values display as 1901 to 2155,\nand 0000. In two-digit format, values display as 70 to 69, representing\nyears from 1970 to 2069. MySQL displays YEAR values in YYYY or\nYYformat, but permits assignment of values to YEAR columns using either\nstrings or numbers.\n\n*Note*: The YEAR(2) data type has certain issues that you should\nconsider before choosing to use it. As of MySQL 5.5.27, YEAR(2) is\ndeprecated. For more information, see\nhttp://dev.mysql.com/doc/refman/5.5/en/migrating-to-year4.html.\n\nFor additional information about YEAR display format and inerpretation\nof input values, see https://mariadb.com/kb/en/year-data-type/.\n\nURL: https://mariadb.com/kb/en/year-data-type/\n\n','','https://mariadb.com/kb/en/year-data-type/'),(288,'SUM',16,'Syntax:\nSUM([DISTINCT] expr)\n\nReturns the sum of expr. If the return set has no rows, SUM() returns\nNULL. The DISTINCT keyword can be used to sum only the distinct values\nof expr.\n\nSUM() returns NULL if there were no matching rows.\n\nURL: https://mariadb.com/kb/en/sum/\n\n','','https://mariadb.com/kb/en/sum/'),(289,'OCT',37,'Syntax:\nOCT(N)\n\nReturns a string representation of the octal value of N, where N is a\nlonglong (BIGINT) number. This is equivalent to CONV(N,10,8). Returns\nNULL if N is NULL.\n\nURL: https://mariadb.com/kb/en/oct/\n\n','MariaDB> SELECT OCT(12);\n -> \'14\'\n','https://mariadb.com/kb/en/oct/'),(290,'SYSDATE',31,'Syntax:\nSYSDATE()\n\nReturns the current date and time as a value in \'YYYY-MM-DD HH:MM:SS\'\nor YYYYMMDDHHMMSS.uuuuuu format, depending on whether the function is\nused in a string or numeric context.\n\nSYSDATE() returns the time at which it executes. This differs from the\nbehavior for NOW(), which returns a constant time that indicates the\ntime at which the statement began to execute. (Within a stored function\nor trigger, NOW() returns the time at which the function or triggering\nstatement began to execute.)\n\nMariaDB> SELECT NOW(), SLEEP(2), NOW();\n+---------------------+----------+---------------------+\n| NOW() | SLEEP(2) | NOW() |\n+---------------------+----------+---------------------+\n| 2006-04-12 13:47:36 | 0 | 2006-04-12 13:47:36 |\n+---------------------+----------+---------------------+\n\nMariaDB> SELECT SYSDATE(), SLEEP(2), SYSDATE();\n+---------------------+----------+---------------------+\n| SYSDATE() | SLEEP(2) | SYSDATE() |\n+---------------------+----------+---------------------+\n| 2006-04-12 13:47:44 | 0 | 2006-04-12 13:47:46 |\n+---------------------+----------+---------------------+\n\nIn addition, the SET TIMESTAMP statement affects the value returned by\nNOW() but not by SYSDATE(). This means that timestamp settings in the\nbinary log have no effect on invocations of SYSDATE().\n\nBecause SYSDATE() can return different values even within the same\nstatement, and is not affected by SET TIMESTAMP, it is nondeterministic\nand therefore unsafe for replication if statement-based binary logging\nis used. If that is a problem, you can use row-based logging.\n\nAlternatively, you can use the --sysdate-is-now option to cause\nSYSDATE() to be an alias for NOW(). This works if the option is used on\nboth the master and the slave.\n\nThe nondeterministic nature of SYSDATE() also means that indexes cannot\nbe used for evaluating expressions that refer to it.\n\nURL: https://mariadb.com/kb/en/sysdate/\n\n','','https://mariadb.com/kb/en/sysdate/'),(291,'UNINSTALL PLUGIN',5,'Syntax:\nUNINSTALL PLUGIN plugin_name\n\nThis statement removes an installed server plugin. It requires the\nDELETE privilege for the mysql.plugin table.\n\nplugin_name must be the name of some plugin that is listed in the\nmysql.plugin table. The server executes the plugin\'s deinitialization\nfunction and removes the row for the plugin from the mysql.plugin\ntable, so that subsequent server restarts will not load and initialize\nthe plugin. UNINSTALL PLUGIN does not remove the plugin\'s shared\nlibrary file.\n\nURL: https://mariadb.com/kb/en/uninstall-plugin/\n\n','','https://mariadb.com/kb/en/uninstall-plugin/'),(292,'ASBINARY',32,'AsBinary(g), AsWKB(g)\n\nConverts a value in internal geometry format to its WKB representation\nand returns the binary result.\n\nURL: https://mariadb.com/kb/en/asbinary/\n\n','SELECT AsBinary(g) FROM geom;\n','https://mariadb.com/kb/en/asbinary/'),(293,'REPEAT FUNCTION',37,'Syntax:\nREPEAT(str,count)\n\nReturns a string consisting of the string str repeated count times. If\ncount is less than 1, returns an empty string. Returns NULL if str or\ncount are NULL.\n\nURL: https://mariadb.com/kb/en/repeat-function/\n\n','MariaDB> SELECT REPEAT(\'MySQL\', 3);\n -> \'MySQLMySQLMySQL\'\n','https://mariadb.com/kb/en/repeat-function/'),(294,'SHOW TABLES',26,'Syntax:\nSHOW [FULL] TABLES [{FROM | IN} db_name]\n [LIKE \'pattern\' | WHERE expr]\n\nSHOW TABLES lists the non-TEMPORARY tables in a given database. You can\nalso get this list using the mysqlshow db_name command. The LIKE\nclause, if present, indicates which table names to match. The WHERE\nclause can be given to select rows using more general conditions, as\ndiscussed in https://mariadb.com/kb/en/extended-show/.\n\nThis statement also lists any views in the database. The FULL modifier\nis supported such that SHOW FULL TABLES displays a second output\ncolumn. Values for the second column are BASE TABLE for a table and\nVIEW for a view.\n\nIf you have no privileges for a base table or view, it does not show up\nin the output from SHOW TABLES or mysqlshow db_name.\n\nURL: https://mariadb.com/kb/en/show-tables/\n\n','','https://mariadb.com/kb/en/show-tables/'),(295,'MAKEDATE',31,'Syntax:\nMAKEDATE(year,dayofyear)\n\nReturns a date, given year and day-of-year values. dayofyear must be\ngreater than 0 or the result is NULL.\n\nURL: https://mariadb.com/kb/en/makedate/\n\n','MariaDB> SELECT MAKEDATE(2011,31), MAKEDATE(2011,32);\n -> \'2011-01-31\', \'2011-02-01\'\nMariaDB> SELECT MAKEDATE(2011,365), MAKEDATE(2014,365);\n -> \'2011-12-31\', \'2014-12-31\'\nMariaDB> SELECT MAKEDATE(2011,0);\n -> NULL\n','https://mariadb.com/kb/en/makedate/'),(296,'BINARY OPERATOR',37,'Syntax:\nBINARY\n\nThe BINARY operator casts the string following it to a binary string.\nThis is an easy way to force a column comparison to be done byte by\nbyte rather than character by character. This causes the comparison to\nbe case sensitive even if the column is not defined as BINARY or BLOB.\nBINARY also causes trailing spaces to be significant.\n\nURL: https://mariadb.com/kb/en/binary-operator/\n\n','MariaDB> SELECT \'a\' = \'A\';\n -> 1\nMariaDB> SELECT BINARY \'a\' = \'A\';\n -> 0\nMariaDB> SELECT \'a\' = \'a \';\n -> 1\nMariaDB> SELECT BINARY \'a\' = \'a \';\n -> 0\n','https://mariadb.com/kb/en/binary-operator/'),(297,'MBROVERLAPS',6,'MBROverlaps(g1,g2)\n\nReturns 1 or 0 to indicate whether the Minimum Bounding Rectangles of\nthe two geometries g1 and g2 overlap. The term spatially overlaps is\nused if two geometries intersect and their intersection results in a\ngeometry of the same dimension but not equal to either of the given\ngeometries.\n\nURL: https://mariadb.com/kb/en/mbroverlaps/\n\n','','https://mariadb.com/kb/en/mbroverlaps/'),(298,'SOUNDEX',37,'Syntax:\nSOUNDEX(str)\n\nReturns a soundex string from str. Two strings that sound almost the\nsame should have identical soundex strings. A standard soundex string\nis four characters long, but the SOUNDEX() function returns an\narbitrarily long string. You can use SUBSTRING() on the result to get a\nstandard soundex string. All nonalphabetic characters in str are\nignored. All international alphabetic characters outside the A-Z range\nare treated as vowels.\n\n*Important*: When using SOUNDEX(), you should be aware of the following\nlimitations:\n\no This function, as currently implemented, is intended to work well\n with strings that are in the English language only. Strings in other\n languages may not produce reliable results.\n\no This function is not guaranteed to provide consistent results with\n strings that use multi-byte character sets, including utf-8.\n\n We hope to remove these limitations in a future release. See Bug\n #22638 for more information.\n\nURL: https://mariadb.com/kb/en/soundex/\n\n','MariaDB> SELECT SOUNDEX(\'Hello\');\n -> \'H400\'\nMariaDB> SELECT SOUNDEX(\'Quadratically\');\n -> \'Q36324\'\n','https://mariadb.com/kb/en/soundex/'),(299,'MBRTOUCHES',6,'MBRTouches(g1,g2)\n\nReturns 1 or 0 to indicate whether the Minimum Bounding Rectangles of\nthe two geometries g1 and g2 touch. Two geometries spatially touch if\nthe interiors of the geometries do not intersect, but the boundary of\none of the geometries intersects either the boundary or the interior of\nthe other.\n\nURL: https://mariadb.com/kb/en/mbrtouches/\n\n','','https://mariadb.com/kb/en/mbrtouches/'),(300,'DROP EVENT',39,'Syntax:\nDROP EVENT [IF EXISTS] event_name\n\nThis statement drops the event named event_name. The event immediately\nceases being active, and is deleted completely from the server.\n\nIf the event does not exist, the error ERROR 1517 (HY000): Unknown\nevent \'event_name\' results. You can override this and cause the\nstatement to generate a warning for nonexistent events instead using IF\nEXISTS.\n\nThis statement requires the EVENT privilege for the schema to which the\nevent to be dropped belongs.\n\nURL: https://mariadb.com/kb/en/drop-event/\n\n','','https://mariadb.com/kb/en/drop-event/'),(301,'INSERT SELECT',27,'Syntax:\nINSERT [LOW_PRIORITY | HIGH_PRIORITY] [IGNORE]\n [INTO] tbl_name [(col_name,...)]\n SELECT ...\n [ ON DUPLICATE KEY UPDATE col_name=expr, ... ]\n\nWith INSERT ... SELECT, you can quickly insert many rows into a table\nfrom one or many tables. For example:\n\nINSERT INTO tbl_temp2 (fld_id)\n SELECT tbl_temp1.fld_order_id\n FROM tbl_temp1 WHERE tbl_temp1.fld_order_id > 100;\n\nURL: https://mariadb.com/kb/en/insert-select/\n\n','','https://mariadb.com/kb/en/insert-select/'),(302,'CREATE PROCEDURE',39,'Syntax:\nCREATE\n [DEFINER = { user | CURRENT_USER }]\n PROCEDURE sp_name ([proc_parameter[,...]])\n [characteristic ...] routine_body\n\nCREATE\n [DEFINER = { user | CURRENT_USER }]\n FUNCTION sp_name ([func_parameter[,...]])\n RETURNS type\n [characteristic ...] routine_body\n\nproc_parameter:\n [ IN | OUT | INOUT ] param_name type\n\nfunc_parameter:\n param_name type\n\ntype:\n Any valid MySQL data type\n\ncharacteristic:\n COMMENT \'string\'\n | LANGUAGE SQL\n | [NOT] DETERMINISTIC\n | { CONTAINS SQL | NO SQL | READS SQL DATA | MODIFIES SQL DATA }\n | SQL SECURITY { DEFINER | INVOKER }\n\nroutine_body:\n Valid SQL routine statement\n\nThese statements create stored routines. By default, a routine is\nassociated with the default database. To associate the routine\nexplicitly with a given database, specify the name as db_name.sp_name\nwhen you create it.\n\nThe CREATE FUNCTION statement is also used in MySQL to support UDFs\n(user-defined functions). See\nhttps://mariadb.com/kb/en/create-function-udf/. A UDF can\nbe regarded as an external stored function. Stored functions share\ntheir namespace with UDFs. See\nhttp://dev.mysql.com/doc/refman/5.5/en/function-resolution.html, for\nthe rules describing how the server interprets references to different\nkinds of functions.\n\nTo invoke a stored procedure, use the CALL statement (see [HELP CALL]).\nTo invoke a stored function, refer to it in an expression. The function\nreturns a value during expression evaluation.\n\nCREATE PROCEDURE and CREATE FUNCTION require the CREATE ROUTINE\nprivilege. They might also require the SUPER privilege, depending on\nthe DEFINER value, as described later in this section. If binary\nlogging is enabled, CREATE FUNCTION might require the SUPER privilege,\nas described in\nhttps://mariadb.com/kb/en/binary-logging-of-stored-routines/.\n\nBy default, MySQL automatically grants the ALTER ROUTINE and EXECUTE\nprivileges to the routine creator. This behavior can be changed by\ndisabling the automatic_sp_privileges system variable. See\nhttps://mariadb.com/kb/en/stored-routine-privileges/.\n\nThe DEFINER and SQL SECURITY clauses specify the security context to be\nused when checking access privileges at routine execution time, as\ndescribed later in this section.\n\nIf the routine name is the same as the name of a built-in SQL function,\na syntax error occurs unless you use a space between the name and the\nfollowing parenthesis when defining the routine or invoking it later.\nFor this reason, avoid using the names of existing SQL functions for\nyour own stored routines.\n\nThe IGNORE_SPACE SQL mode applies to built-in functions, not to stored\nroutines. It is always permissible to have spaces after a stored\nroutine name, regardless of whether IGNORE_SPACE is enabled.\n\nThe parameter list enclosed within parentheses must always be present.\nIf there are no parameters, an empty parameter list of () should be\nused. Parameter names are not case sensitive.\n\nEach parameter is an IN parameter by default. To specify otherwise for\na parameter, use the keyword OUT or INOUT before the parameter name.\n\n*Note*: Specifying a parameter as IN, OUT, or INOUT is valid only for a\nPROCEDURE. For a FUNCTION, parameters are always regarded as IN\nparameters.\n\nAn IN parameter passes a value into a procedure. The procedure might\nmodify the value, but the modification is not visible to the caller\nwhen the procedure returns. An OUT parameter passes a value from the\nprocedure back to the caller. Its initial value is NULL within the\nprocedure, and its value is visible to the caller when the procedure\nreturns. An INOUT parameter is initialized by the caller, can be\nmodified by the procedure, and any change made by the procedure is\nvisible to the caller when the procedure returns.\n\nFor each OUT or INOUT parameter, pass a user-defined variable in the\nCALL statement that invokes the procedure so that you can obtain its\nvalue when the procedure returns. If you are calling the procedure from\nwithin another stored procedure or function, you can also pass a\nroutine parameter or local routine variable as an IN or INOUT\nparameter.\n\nThe following example shows a simple stored procedure that uses an OUT\nparameter:\n\nMariaDB> delimiter //\n\nMariaDB> CREATE PROCEDURE simpleproc (OUT param1 INT)\n -> BEGIN\n -> SELECT COUNT(*) INTO param1 FROM t;\n -> END//\nQuery OK, 0 rows affected (0.00 sec)\n\nMariaDB> delimiter ;\n\nMariaDB> CALL simpleproc(@a);\nQuery OK, 0 rows affected (0.00 sec)\n\nMariaDB> SELECT @a;\n+------+\n| @a |\n+------+\n| 3 |\n+------+\n1 row in set (0.00 sec)\n\nThe example uses the mysql client delimiter command to change the\nstatement delimiter from ; to // while the procedure is being defined.\nThis enables the ; delimiter used in the procedure body to be passed\nthrough to the server rather than being interpreted by mysql itself.\nSee\nhttps://mariadb.com/kb/en/stored-procedure-overview/.\n\nThe RETURNS clause may be specified only for a FUNCTION, for which it\nis mandatory. It indicates the return type of the function, and the\nfunction body must contain a RETURN value statement. If the RETURN\nstatement returns a value of a different type, the value is coerced to\nthe proper type. For example, if a function specifies an ENUM or SET\nvalue in the RETURNS clause, but the RETURN statement returns an\ninteger, the value returned from the function is the string for the\ncorresponding ENUM member of set of SET members.\n\nThe following example function takes a parameter, performs an operation\nusing an SQL function, and returns the result. In this case, it is\nunnecessary to use delimiter because the function definition contains\nno internal ; statement delimiters:\n\nMariaDB> CREATE FUNCTION hello (s CHAR(20))\nMariaDB> RETURNS CHAR(50) DETERMINISTIC\n -> RETURN CONCAT(\'Hello, \',s,\'!\');\nQuery OK, 0 rows affected (0.00 sec)\n\nMariaDB> SELECT hello(\'world\');\n+----------------+\n| hello(\'world\') |\n+----------------+\n| Hello, world! |\n+----------------+\n1 row in set (0.00 sec)\n\nParameter types and function return types can be declared to use any\nvalid data type, except that the COLLATE attribute cannot be used prior\nto MySQL 5.5.3. As of 5.5.3, COLLATE can be used if preceded by the\nCHARACTER SET attribute.\n\nThe routine_body consists of a valid SQL routine statement. This can be\na simple statement such as SELECT or INSERT, or a compound statement\nwritten using BEGIN and END. Compound statements can contain\ndeclarations, loops, and other control structure statements. The syntax\nfor these statements is described in\nhttps://mariadb.com/kb/programmatic-and-compound-statements.\n\nMySQL permits routines to contain DDL statements, such as CREATE and\nDROP. MySQL also permits stored procedures (but not stored functions)\nto contain SQL transaction statements such as COMMIT. Stored functions\nmay not contain statements that perform explicit or implicit commit or\nrollback. Support for these statements is not required by the SQL\nstandard, which states that each DBMS vendor may decide whether to\npermit them.\n\nStatements that return a result set can be used within a stored\nprocedure but not within a stored function. This prohibition includes\nSELECT statements that do not have an INTO var_list clause and other\nstatements such as SHOW, EXPLAIN, and CHECK TABLE. For statements that\ncan be determined at function definition time to return a result set, a\nNot allowed to return a result set from a function error occurs\n(ER_SP_NO_RETSET). For statements that can be determined only at\nruntime to return a result set, a PROCEDURE %s can\'t return a result\nset in the given context error occurs (ER_SP_BADSELECT).\n\nUSE statements within stored routines are not permitted. When a routine\nis invoked, an implicit USE db_name is performed (and undone when the\nroutine terminates). The causes the routine to have the given default\ndatabase while it executes. References to objects in databases other\nthan the routine default database should be qualified with the\nappropriate database name.\n\nFor additional information about statements that are not permitted in\nstored routines, see\nhttps://mariadb.com/kb/en/stored-routine-privileges/\n.\n\nFor information about invoking stored procedures from within programs\nwritten in a language that has a MySQL interface, see [HELP CALL].\n\nMySQL stores the sql_mode system variable setting that is in effect at\nthe time a routine is created, and always executes the routine with\nthis setting in force, regardless of the server SQL mode in effect when\nthe routine is invoked.\n\nThe switch from the SQL mode of the invoker to that of the routine\noccurs after evaluation of arguments and assignment of the resulting\nvalues to routine parameters. If you define a routine in strict SQL\nmode but invoke it in nonstrict mode, assignment of arguments to\nroutine parameters does not take place in strict mode. If you require\nthat expressions passed to a routine be assigned in strict SQL mode,\nyou should invoke the routine with strict mode in effect.\n\nURL: https://mariadb.com/kb/en/create-procedure/\n\n','','https://mariadb.com/kb/en/create-procedure/'),(303,'VARBINARY',22,'VARBINARY(M)\n\nThe VARBINARY type is similar to the VARCHAR type, but stores binary\nbyte strings rather than nonbinary character strings. M represents the\nmaximum column length in bytes.\n\nURL: https://mariadb.com/kb/en/varbinary/\n\n','','https://mariadb.com/kb/en/varbinary/'),(304,'LOAD INDEX',26,'Syntax:\nLOAD INDEX INTO CACHE\n tbl_index_list [, tbl_index_list] ...\n\ntbl_index_list:\n tbl_name\n [PARTITION (partition_list | ALL)]\n [[INDEX|KEY] (index_name[, index_name] ...)]\n [IGNORE LEAVES]\n\npartition_list:\n partition_name[, partition_name][, ...]\n\nThe LOAD INDEX INTO CACHE statement preloads a table index into the key\ncache to which it has been assigned by an explicit CACHE INDEX\nstatement, or into the default key cache otherwise.\n\nLOAD INDEX INTO CACHE is used only for MyISAM tables. In MySQL 5.5, it\nis also supported for partitioned MyISAM tables; in addition, indexes\non partitioned tables can be preloaded for one, several, or all\npartitions.\n\nThe IGNORE LEAVES modifier causes only blocks for the nonleaf nodes of\nthe index to be preloaded.\n\nIGNORE LEAVES is also supported for partitioned MyISAM tables.\n\nURL: https://mariadb.com/kb/en/load-index/\n\n','','https://mariadb.com/kb/en/load-index/'),(305,'UNION',27,'Syntax:\nSELECT ...\nUNION [ALL | DISTINCT] SELECT ...\n[UNION [ALL | DISTINCT] SELECT ...]\n\nUNION is used to combine the result from multiple SELECT statements\ninto a single result set.\n\nThe column names from the first SELECT statement are used as the column\nnames for the results returned. Selected columns listed in\ncorresponding positions of each SELECT statement should have the same\ndata type. (For example, the first column selected by the first\nstatement should have the same type as the first column selected by the\nother statements.)\n\nURL: https://mariadb.com/kb/en/union/\n\n','','https://mariadb.com/kb/en/union/'),(306,'TO_DAYS',31,'Syntax:\nTO_DAYS(date)\n\nGiven a date date, returns a day number (the number of days since year\n0).\n\nURL: https://mariadb.com/kb/en/to_days/\n\n','MariaDB> SELECT TO_DAYS(950501);\n -> 728779\nMariaDB> SELECT TO_DAYS(\'2007-10-07\');\n -> 733321\n','https://mariadb.com/kb/en/to_days/'),(307,'NOT REGEXP',37,'Syntax:\nexpr NOT REGEXP pat, expr NOT RLIKE pat\n\nThis is the same as NOT (expr REGEXP pat).\n\nURL: https://mariadb.com/kb/en/not-regexp/\n\n','','https://mariadb.com/kb/en/not-regexp/'),(308,'SHOW INDEX',26,'Syntax:\nSHOW {INDEX | INDEXES | KEYS}\n {FROM | IN} tbl_name\n [{FROM | IN} db_name]\n [WHERE expr]\n\nSHOW INDEX returns table index information. The format resembles that\nof the SQLStatistics call in ODBC. This statement requires some\nprivilege for any column in the table.\nYou can use db_name.tbl_name as an alternative to the tbl_name FROM\ndb_name syntax. These two statements are equivalent:\n\nSHOW INDEX FROM mytable FROM mydb;\nSHOW INDEX FROM mydb.mytable;\n\nThe WHERE clause can be given to select rows using more general\nconditions, as discussed in\nhttps://mariadb.com/kb/en/extended-show/.\n\nYou can also list a table\'s indexes with the mysqlshow -k db_name\ntbl_name command.\n\nURL: https://mariadb.com/kb/en/show-index/\n\n','','https://mariadb.com/kb/en/show-index/'),(309,'SHOW CREATE DATABASE',26,'Syntax:\nSHOW CREATE {DATABASE | SCHEMA} [IF NOT EXISTS] db_name\n\nShows the CREATE DATABASE statement that creates the given database. If\nthe SHOW statement includes an IF NOT EXISTS clause, the output too\nincludes such a clause. SHOW CREATE SCHEMA is a synonym for SHOW CREATE\nDATABASE.\n\nURL: https://mariadb.com/kb/en/show-create-database/\n\n','MariaDB> SHOW CREATE DATABASE test\\G\n*************************** 1. row ***************************\n Database: test\nCreate Database: CREATE DATABASE `test`\n /*!40100 DEFAULT CHARACTER SET latin1 */\n\nMariaDB> SHOW CREATE SCHEMA test\\G\n*************************** 1. row ***************************\n Database: test\nCreate Database: CREATE DATABASE `test`\n /*!40100 DEFAULT CHARACTER SET latin1 */\n','https://mariadb.com/kb/en/show-create-database/'),(310,'LEAVE',23,'Syntax:\nLEAVE label\n\nThis statement is used to exit the flow control construct that has the\ngiven label. If the label is for the outermost stored program block,\nLEAVE exits the program.\n\nLEAVE can be used within BEGIN ... END or loop constructs (LOOP,\nREPEAT, WHILE).\n\nURL: https://mariadb.com/kb/en/leave/\n\n','','https://mariadb.com/kb/en/leave/'),(311,'NOT IN',18,'Syntax:\nexpr NOT IN (value,...)\n\nThis is the same as NOT (expr IN (value,...)).\n\nURL: https://mariadb.com/kb/en/not-in/\n\n','','https://mariadb.com/kb/en/not-in/'),(312,'!',15,'Syntax:\nNOT, !\n\nLogical NOT. Evaluates to 1 if the operand is 0, to 0 if the operand is\nnonzero, and NOT NULL returns NULL.\n\nURL: https://mariadb.com/kb/en/not/\n\n','MariaDB> SELECT NOT 10;\n -> 0\nMariaDB> SELECT NOT 0;\n -> 1\nMariaDB> SELECT NOT NULL;\n -> NULL\nMariaDB> SELECT ! (1+1);\n -> 0\nMariaDB> SELECT ! 1+1;\n -> 1\n','https://mariadb.com/kb/en/not/'),(313,'DECLARE HANDLER',23,'Syntax:\nDECLARE handler_action HANDLER\n FOR condition_value [, condition_value] ...\n statement\n\nhandler_action:\n CONTINUE\n | EXIT\n | UNDO\n\ncondition_value:\n mysql_error_code\n | SQLSTATE [VALUE] sqlstate_value\n | condition_name\n | SQLWARNING\n | NOT FOUND\n | SQLEXCEPTION\n\nThe DECLARE ... HANDLER statement specifies a handler that deals with\none or more conditions. If one of these conditions occurs, the\nspecified statement executes. statement can be a simple statement such\nas SET var_name = value, or a compound statement written using BEGIN\nand END (see [HELP BEGIN END]).\n\nHandler declarations must appear after variable or condition\ndeclarations.\n\nThe handler_action value indicates what action the handler takes after\nexecution of the handler statement:\n\no CONTINUE: Execution of the current program continues.\n\no EXIT: Execution terminates for the BEGIN ... END compound statement\n in which the handler is declared. This is true even if the condition\n occurs in an inner block.\n\no UNDO: Not supported.\n\nThe condition_value for DECLARE ... HANDLER indicates the specific\ncondition or class of conditions that activates the handler:\n\no A MySQL error code (a number) or an SQLSTATE value (a 5-character\n string literal). You should not use MySQL error code 0 or SQLSTATE\n values that begin with \'00\', because those indicate success rather\n than an error condition. For a list of MySQL error codes and SQLSTATE\n values, see\n https://mariadb.com/kb/en/mariadb-error-codes/.\n\no A condition name previously specified with DECLARE ... CONDITION. A\n condition name can be associated with a MySQL error code or SQLSTATE\n value. See [HELP DECLARE CONDITION].\n\no SQLWARNING is shorthand for the class of SQLSTATE values that begin\n with \'01\'.\n\no NOT FOUND is shorthand for the class of SQLSTATE values that begin\n with \'02\'. This is relevant within the context of cursors and is used\n to control what happens when a cursor reaches the end of a data set.\n If no more rows are available, a No Data condition occurs with\n SQLSTATE value \'02000\'. To detect this condition, you can set up a\n handler for it (or for a NOT FOUND condition). For an example, see\n https://mariadb.com/kb/en/cursor-overview/. This condition\n also occurs for SELECT ... INTO var_list statements that retrieve no\n rows.\n\no SQLEXCEPTION is shorthand for the class of SQLSTATE values that do\n not begin with \'00\', \'01\', or \'02\'.\n\nIf a condition occurs for which no handler has been declared, the\naction taken depends on the condition class:\n\no For SQLEXCEPTION conditions, the stored program terminates at the\n statement that raised the condition, as if there were an EXIT\n handler. If the program was called by another stored program, the\n calling program handles the condition using the handler selection\n rules applied to its own handlers.\n\no For SQLWARNING conditions, the program continues executing, as if\n there were a CONTINUE handler.\n\no For NOT FOUND conditions, if the condition was raised normally, the\n action is CONTINUE. If it was raised by SIGNAL or RESIGNAL, the\n action is EXIT.\n\nURL: https://mariadb.com/kb/en/declare-handler/\n\n','MariaDB> CREATE TABLE test.t (s1 INT, PRIMARY KEY (s1));\nQuery OK, 0 rows affected (0.00 sec)\n\nMariaDB> delimiter //\n\nMariaDB> CREATE PROCEDURE handlerdemo ()\n -> BEGIN\n -> DECLARE CONTINUE HANDLER FOR SQLSTATE \'23000\' SET @x2 = 1;\n -> SET @x = 1;\n -> INSERT INTO test.t VALUES (1);\n -> SET @x = 2;\n -> INSERT INTO test.t VALUES (1);\n -> SET @x = 3;\n -> END;\n -> //\nQuery OK, 0 rows affected (0.00 sec)\n\nMariaDB> CALL handlerdemo()//\nQuery OK, 0 rows affected (0.00 sec)\n\nMariaDB> SELECT @x//\n +------+\n | @x |\n +------+\n | 3 |\n +------+\n 1 row in set (0.00 sec)\n','https://mariadb.com/kb/en/declare-handler/'),(314,'DOUBLE',22,'DOUBLE[(M,D)] [UNSIGNED] [ZEROFILL]\n\nA normal-size (double-precision) floating-point number. Permissible\nvalues are -1.7976931348623157E+308 to -2.2250738585072014E-308, 0, and\n2.2250738585072014E-308 to 1.7976931348623157E+308. These are the\ntheoretical limits, based on the IEEE standard. The actual range might\nbe slightly smaller depending on your hardware or operating system.\n\nM is the total number of digits and D is the number of digits following\nthe decimal point. If M and D are omitted, values are stored to the\nlimits permitted by the hardware. A double-precision floating-point\nnumber is accurate to approximately 15 decimal places.\n\nUNSIGNED, if specified, disallows negative values.\n\nURL: https://mariadb.com/kb/en/double/\n\n','','https://mariadb.com/kb/en/double/'),(315,'TIME',22,'TIME\n\nA time. The range is \'-838:59:59\' to \'838:59:59\'. MySQL displays TIME\nvalues in \'HH:MM:SS\' format, but permits assignment of values to TIME\ncolumns using either strings or numbers.\n\nURL: https://mariadb.com/kb/en/time/\n\n','','https://mariadb.com/kb/en/time/'),(316,'&&',15,'Syntax:\nAND, &&\n\nLogical AND. Evaluates to 1 if all operands are nonzero and not NULL,\nto 0 if one or more operands are 0, otherwise NULL is returned.\n\nURL: https://mariadb.com/kb/en/and/\n\n','MariaDB> SELECT 1 && 1;\n -> 1\nMariaDB> SELECT 1 && 0;\n -> 0\nMariaDB> SELECT 1 && NULL;\n -> NULL\nMariaDB> SELECT 0 && NULL;\n -> 0\nMariaDB> SELECT NULL && 0;\n -> 0\n','https://mariadb.com/kb/en/and/'),(317,'X',11,'X(p)\n\nReturns the X-coordinate value for the Point object p as a\ndouble-precision number.\n\nURL: https://mariadb.com/kb/en/x/\n\n','MariaDB> SELECT X(POINT(56.7, 53.34));\n+-----------------------+\n| X(POINT(56.7, 53.34)) |\n+-----------------------+\n| 56.7 |\n+-----------------------+\n','https://mariadb.com/kb/en/x/'),(318,'SYSTEM_USER',17,'Syntax:\nSYSTEM_USER()\n\nSYSTEM_USER() is a synonym for USER().\n\nURL: https://mariadb.com/kb/en/system_user/\n\n','','https://mariadb.com/kb/en/system_user/'),(319,'FOUND_ROWS',17,'Syntax:\nFOUND_ROWS()\n\nA SELECT statement may include a LIMIT clause to restrict the number of\nrows the server returns to the client. In some cases, it is desirable\nto know how many rows the statement would have returned without the\nLIMIT, but without running the statement again. To obtain this row\ncount, include a SQL_CALC_FOUND_ROWS option in the SELECT statement,\nand then invoke FOUND_ROWS() afterward:\n\nURL: https://mariadb.com/kb/en/found_rows/\n\n','MariaDB> SELECT SQL_CALC_FOUND_ROWS * FROM tbl_name\n -> WHERE id > 100 LIMIT 10;\nMariaDB> SELECT FOUND_ROWS();\n','https://mariadb.com/kb/en/found_rows/'),(320,'CROSSES',30,'Crosses(g1,g2)\n\nReturns 1 if g1 spatially crosses g2. Returns NULL if g1 is a Polygon\nor a MultiPolygon, or if g2 is a Point or a MultiPoint. Otherwise,\nreturns 0.\n\nThe term spatially crosses denotes a spatial relation between two given\ngeometries that has the following properties:\n\no The two geometries intersect\n\no Their intersection results in a geometry that has a dimension that is\n one less than the maximum dimension of the two given geometries\n\no Their intersection is not equal to either of the two given geometries\n\nURL: https://mariadb.com/kb/en/crosses/\n\n','','https://mariadb.com/kb/en/crosses/'),(321,'TRUNCATE TABLE',39,'Syntax:\nTRUNCATE [TABLE] tbl_name\n\nTRUNCATE TABLE empties a table completely. It requires the DROP\nprivilege.\n\nLogically, TRUNCATE TABLE is similar to a DELETE statement that deletes\nall rows, or a sequence of DROP TABLE and CREATE TABLE statements. To\nachieve high performance, it bypasses the DML method of deleting data.\nThus, it cannot be rolled back, it does not cause ON DELETE triggers to\nfire, and it cannot be performed for InnoDB tables with parent-child\nforeign key relationships.\n\nAlthough TRUNCATE TABLE is similar to DELETE, it is classified as a DDL\nstatement rather than a DML statement. It differs from DELETE in the\nfollowing ways in MySQL 5.5:\n\no Truncate operations drop and re-create the table, which is much\n faster than deleting rows one by one, particularly for large tables.\n\no Truncate operations cause an implicit commit, and so cannot be rolled\n back.\n\no Truncation operations cannot be performed if the session holds an\n active table lock.\n\no TRUNCATE TABLE fails for an InnoDB table if there are any FOREIGN KEY\n constraints from other tables that reference the table. Foreign key\n constraints between columns of the same table are permitted.\n\no Truncation operations do not return a meaningful value for the number\n of deleted rows. The usual result is \"0 rows affected,\" which should\n be interpreted as \"no information.\"\n\no As long as the table format file tbl_name.frm is valid, the table can\n be re-created as an empty table with TRUNCATE TABLE, even if the data\n or index files have become corrupted.\n\no Any AUTO_INCREMENT value is reset to its start value. This is true\n even for MyISAM and InnoDB, which normally do not reuse sequence\n values.\n\no When used with partitioned tables, TRUNCATE TABLE preserves the\n partitioning; that is, the data and index files are dropped and\n re-created, while the partition definitions (.par) file is\n unaffected.\n\no The TRUNCATE TABLE statement does not invoke ON DELETE triggers.\n\nURL: https://mariadb.com/kb/en/truncate-table/\n\n','','https://mariadb.com/kb/en/truncate-table/'),(322,'BIT_XOR',16,'Syntax:\nBIT_XOR(expr)\n\nReturns the bitwise XOR of all bits in expr. The calculation is\nperformed with 64-bit (BIGINT) precision.\n\nURL: https://mariadb.com/kb/en/bit_xor/\n\n','','https://mariadb.com/kb/en/bit_xor/'),(323,'CURRENT_DATE',31,'Syntax:\nCURRENT_DATE, CURRENT_DATE()\n\nCURRENT_DATE and CURRENT_DATE() are synonyms for CURDATE().\n\nURL: https://mariadb.com/kb/en/current_date/\n\n','','https://mariadb.com/kb/en/current_date/'),(324,'START SLAVE',8,'Syntax:\nSTART SLAVE [thread_types]\n\nSTART SLAVE [SQL_THREAD] UNTIL\n MASTER_LOG_FILE = \'log_name\', MASTER_LOG_POS = log_pos\n\nSTART SLAVE [SQL_THREAD] UNTIL\n RELAY_LOG_FILE = \'log_name\', RELAY_LOG_POS = log_pos\n\nthread_types:\n [thread_type [, thread_type] ... ]\n\nthread_type: IO_THREAD | SQL_THREAD\n\nSTART SLAVE with no thread_type options starts both of the slave\nthreads. The I/O thread reads events from the master server and stores\nthem in the relay log. The SQL thread reads events from the relay log\nand executes them. START SLAVE requires the SUPER privilege.\n\nIf START SLAVE succeeds in starting the slave threads, it returns\nwithout any error. However, even in that case, it might be that the\nslave threads start and then later stop (for example, because they do\nnot manage to connect to the master or read its binary log, or some\nother problem). START SLAVE does not warn you about this. You must\ncheck the slave\'s error log for error messages generated by the slave\nthreads, or check that they are running satisfactorily with SHOW SLAVE\nSTATUS.\n\nURL: https://mariadb.com/kb/en/start-slave/\n\n','','https://mariadb.com/kb/en/start-slave/'),(325,'AREA',2,'Area(poly)\n\nReturns as a double-precision number the area of the Polygon value\npoly, as measured in its spatial reference system.\n\nURL: https://mariadb.com/kb/en/area/\n\n','MariaDB> SET @poly = \'Polygon((0 0,0 3,3 0,0 0),(1 1,1 2,2 1,1 1))\';\nMariaDB> SELECT Area(GeomFromText(@poly));\n+---------------------------+\n| Area(GeomFromText(@poly)) |\n+---------------------------+\n| 4 |\n+---------------------------+\n','https://mariadb.com/kb/en/area/'),(326,'FLUSH',26,'Syntax:\nFLUSH [NO_WRITE_TO_BINLOG | LOCAL]\n flush_option [, flush_option] ...\n\nThe FLUSH statement has several variant forms that clear or reload\nvarious internal caches, flush tables, or acquire locks. To execute\nFLUSH, you must have the RELOAD privilege. Specific flush options might\nrequire additional privileges, as described later.\n\nBy default, the server writes FLUSH statements to the binary log so\nthat they replicate to replication slaves. To suppress logging, use the\noptional NO_WRITE_TO_BINLOG keyword or its alias LOCAL.\n\n*Note*: FLUSH LOGS, FLUSH MASTER, FLUSH SLAVE, and FLUSH TABLES WITH\nREAD LOCK (with or without a table list) are not written to the binary\nlog in any case because they would cause problems if replicated to a\nslave.\n\nThe FLUSH statement causes an implicit commit. See\nhttp://dev.mysql.com/doc/refman/5.5/en/implicit-commit.html.\n\nThe RESET statement is similar to FLUSH. See [HELP RESET], for\ninformation about using the RESET statement with replication.\n\nURL: https://mariadb.com/kb/en/flush/\n\n','','https://mariadb.com/kb/en/flush/'),(327,'BEGIN END',23,'Syntax:\n[begin_label:] BEGIN\n [statement_list]\nEND [end_label]\n\nBEGIN ... END syntax is used for writing compound statements, which can\nappear within stored programs (stored procedures and functions,\ntriggers, and events). A compound statement can contain multiple\nstatements, enclosed by the BEGIN and END keywords. statement_list\nrepresents a list of one or more statements, each terminated by a\nsemicolon (;) statement delimiter. The statement_list itself is\noptional, so the empty compound statement (BEGIN END) is legal.\n\nBEGIN ... END blocks can be nested.\n\nUse of multiple statements requires that a client is able to send\nstatement strings containing the ; statement delimiter. In the mysql\ncommand-line client, this is handled with the delimiter command.\nChanging the ; end-of-statement delimiter (for example, to //) permit ;\nto be used in a program body. For an example, see\nhttps://mariadb.com/kb/en/stored-procedure-overview/.\n\nA BEGIN ... END block can be labeled. See [HELP labels].\n\nURL: https://mariadb.com/kb/en/begin-end/\n\n','','https://mariadb.com/kb/en/begin-end/'),(328,'SHOW PROCEDURE STATUS',26,'Syntax:\nSHOW PROCEDURE STATUS\n [LIKE \'pattern\' | WHERE expr]\n\nThis statement is a MySQL extension. It returns characteristics of a\nstored procedure, such as the database, name, type, creator, creation\nand modification dates, and character set information. A similar\nstatement, SHOW FUNCTION STATUS, displays information about stored\nfunctions (see [HELP SHOW FUNCTION STATUS]).\n\nThe LIKE clause, if present, indicates which procedure or function\nnames to match. The WHERE clause can be given to select rows using more\ngeneral conditions, as discussed in\nhttps://mariadb.com/kb/en/extended-show/.\n\nURL: https://mariadb.com/kb/en/show-procedure-status/\n\n','MariaDB> SHOW PROCEDURE STATUS LIKE \'sp1\'\\G\n*************************** 1. row ***************************\n Db: test\n Name: sp1\n Type: PROCEDURE\n Definer: testuser@localhost\n Modified: 2004-08-03 15:29:37\n Created: 2004-08-03 15:29:37\n Security_type: DEFINER\n Comment:\ncharacter_set_client: latin1\ncollation_connection: latin1_swedish_ci\n Database Collation: latin1_swedish_ci\n','https://mariadb.com/kb/en/show-procedure-status/'),(329,'DESCRIBE',28,'Syntax:\n{DESCRIBE | DESC} tbl_name [col_name | wild]\n\nDESCRIBE provides information about the columns in a table. It is a\nshortcut for SHOW COLUMNS FROM. These statements also display\ninformation for views. (See [HELP SHOW COLUMNS].)\n\ncol_name can be a column name, or a string containing the SQL \"%\" and\n\"_\" wildcard characters to obtain output only for the columns with\nnames matching the string. There is no need to enclose the string\nwithin quotation marks unless it contains spaces or other special\ncharacters.\n\nMariaDB> DESCRIBE City;\n+------------+----------+------+-----+---------+----------------+\n| Field | Type | Null | Key | Default | Extra |\n+------------+----------+------+-----+---------+----------------+\n| Id | int(11) | NO | PRI | NULL | auto_increment |\n| Name | char(35) | NO | | | |\n| Country | char(3) | NO | UNI | | |\n| District | char(20) | YES | MUL | | |\n| Population | int(11) | NO | | 0 | |\n+------------+----------+------+-----+---------+----------------+\n5 rows in set (0.00 sec)\n\nThe description for SHOW COLUMNS provides more information about the\noutput columns (see [HELP SHOW COLUMNS]).\n\nURL: https://mariadb.com/kb/en/describe/\n\n','','https://mariadb.com/kb/en/describe/'),(330,'SHOW WARNINGS',26,'Syntax:\nSHOW WARNINGS [LIMIT [offset,] row_count]\nSHOW COUNT(*) WARNINGS\n\nSHOW WARNINGS shows information about the conditions (errors, warnings,\nand notes) that resulted from the last statement in the current session\nthat generated messages. It shows nothing if the last statement used a\ntable and generated no messages. (That is, a statement that uses a\ntable but generates no messages clears the message list.) Statements\nthat do not use tables and do not generate messages have no effect on\nthe message list.\n\nWarnings are generated for DML statements such as INSERT, UPDATE, and\nLOAD DATA INFILE as well as DDL statements such as CREATE TABLE and\nALTER TABLE.\n\nSHOW WARNINGS is also used following EXPLAIN EXTENDED, to display the\nextra information generated by EXPLAIN when the EXTENDED keyword is\nused. See https://mariadb.com/kb/en/explain#explain-extended.\n\nThe LIMIT clause has the same syntax as for the SELECT statement. See\nhttps://mariadb.com/kb/en/select/.\n\nA related statement, SHOW ERRORS, shows only the error conditions (it\nexcludes warnings and notes). See [HELP SHOW ERRORS].\n\nThe SHOW COUNT(*) WARNINGS statement displays the total number of\nerrors, warnings, and notes. You can also retrieve this number from the\nwarning_count system variable:\n\nSHOW COUNT(*) WARNINGS;\nSELECT @@warning_count;\n\nURL: https://mariadb.com/kb/en/show-warnings/\n\n','','https://mariadb.com/kb/en/show-warnings/'),(331,'DROP USER',10,'Syntax:\nDROP USER user [, user] ...\n\nThe DROP USER statement removes one or more MySQL accounts and their\nprivileges. It removes privilege rows for the account from all grant\ntables. To use this statement, you must have the global CREATE USER\nprivilege or the DELETE privilege for the mysql database. Each account\nname uses the format described in\nhttps://mariadb.com/kb/en/create-user#account-names. For example:\n\nDROP USER \'jeffrey\'@\'localhost\';\n\nIf you specify only the user name part of the account name, a host name\npart of \'%\' is used.\n\nURL: https://mariadb.com/kb/en/drop-user/\n\n','','https://mariadb.com/kb/en/drop-user/'),(332,'STDDEV_POP',16,'Syntax:\nSTDDEV_POP(expr)\n\nReturns the population standard deviation of expr (the square root of\nVAR_POP()). You can also use STD() or STDDEV(), which are equivalent\nbut not standard SQL.\n\nSTDDEV_POP() returns NULL if there were no matching rows.\n\nURL: https://mariadb.com/kb/en/stddev_pop/\n\n','','https://mariadb.com/kb/en/stddev_pop/'),(333,'SHOW CHARACTER SET',26,'Syntax:\nSHOW CHARACTER SET\n [LIKE \'pattern\' | WHERE expr]\n\nThe SHOW CHARACTER SET statement shows all available character sets.\nThe LIKE clause, if present, indicates which character set names to\nmatch. The WHERE clause can be given to select rows using more general\nconditions, as discussed in\nhttps://mariadb.com/kb/en/extended-show/. For example:\n\nMariaDB> SHOW CHARACTER SET LIKE \'latin%\';\n+---------+-----------------------------+-------------------+--------+\n| Charset | Description | Default collation | Maxlen |\n+---------+-----------------------------+-------------------+--------+\n| latin1 | cp1252 West European | latin1_swedish_ci | 1 |\n| latin2 | ISO 8859-2 Central European | latin2_general_ci | 1 |\n| latin5 | ISO 8859-9 Turkish | latin5_turkish_ci | 1 |\n| latin7 | ISO 8859-13 Baltic | latin7_general_ci | 1 |\n+---------+-----------------------------+-------------------+--------+\n\nURL: https://mariadb.com/kb/en/show-character-set/\n\n','','https://mariadb.com/kb/en/show-character-set/'),(334,'SUBSTRING',37,'Syntax:\nSUBSTRING(str,pos), SUBSTRING(str FROM pos), SUBSTRING(str,pos,len),\nSUBSTRING(str FROM pos FOR len)\n\nThe forms without a len argument return a substring from string str\nstarting at position pos. The forms with a len argument return a\nsubstring len characters long from string str, starting at position\npos. The forms that use FROM are standard SQL syntax. It is also\npossible to use a negative value for pos. In this case, the beginning\nof the substring is pos characters from the end of the string, rather\nthan the beginning. A negative value may be used for pos in any of the\nforms of this function.\n\nFor all forms of SUBSTRING(), the position of the first character in\nthe string from which the substring is to be extracted is reckoned as\n1.\n\nURL: https://mariadb.com/kb/en/substring/\n\n','MariaDB> SELECT SUBSTRING(\'Quadratically\',5);\n -> \'ratically\'\nMariaDB> SELECT SUBSTRING(\'foobarbar\' FROM 4);\n -> \'barbar\'\nMariaDB> SELECT SUBSTRING(\'Quadratically\',5,6);\n -> \'ratica\'\nMariaDB> SELECT SUBSTRING(\'Sakila\', -3);\n -> \'ila\'\nMariaDB> SELECT SUBSTRING(\'Sakila\', -5, 3);\n -> \'aki\'\nMariaDB> SELECT SUBSTRING(\'Sakila\' FROM -4 FOR 2);\n -> \'ki\'\n','https://mariadb.com/kb/en/substring/'),(335,'ISEMPTY',36,'IsEmpty(g)\n\nReturns 1 if the geometry value g is the empty geometry, 0 if it is not\nempty, and -1 if the argument is NULL. If the geometry is empty, it\nrepresents the empty point set.\n\nURL: https://mariadb.com/kb/en/isempty/\n\n','','https://mariadb.com/kb/en/isempty/'),(336,'SHOW FUNCTION STATUS',26,'Syntax:\nSHOW FUNCTION STATUS\n [LIKE \'pattern\' | WHERE expr]\n\nThis statement is similar to SHOW PROCEDURE STATUS but for stored\nfunctions. See [HELP SHOW PROCEDURE STATUS].\n\nURL: https://mariadb.com/kb/en/show-function-status/\n\n','','https://mariadb.com/kb/en/show-function-status/'),(337,'LTRIM',37,'Syntax:\nLTRIM(str)\n\nReturns the string str with leading space characters removed.\n\nURL: https://mariadb.com/kb/en/ltrim/\n\n','MariaDB> SELECT LTRIM(\' barbar\');\n -> \'barbar\'\n','https://mariadb.com/kb/en/ltrim/'),(338,'INTERSECTS',30,'Intersects(g1,g2)\n\nReturns 1 or 0 to indicate whether g1 spatially intersects g2.\n\nURL: https://mariadb.com/kb/en/intersects/\n\n','','https://mariadb.com/kb/en/intersects/'),(339,'CALL',27,'Syntax:\nCALL sp_name([parameter[,...]])\nCALL sp_name[()]\n\nThe CALL statement invokes a stored procedure that was defined\npreviously with CREATE PROCEDURE.\n\nStored procedures that take no arguments can be invoked without\nparentheses. That is, CALL p() and CALL p are equivalent.\n\nCALL can pass back values to its caller using parameters that are\ndeclared as OUT or INOUT parameters. When the procedure returns, a\nclient program can also obtain the number of rows affected for the\nfinal statement executed within the routine: At the SQL level, call the\nROW_COUNT() function; from the C API, call the mysql_affected_rows()\nfunction.\n\nURL: https://mariadb.com/kb/en/call/\n\n','','https://mariadb.com/kb/en/call/'),(340,'MBRDISJOINT',6,'MBRDisjoint(g1,g2)\n\nReturns 1 or 0 to indicate whether the Minimum Bounding Rectangles of\nthe two geometries g1 and g2 are disjoint (do not intersect).\n\nURL: https://mariadb.com/kb/en/mbrdisjoint/\n\n','','https://mariadb.com/kb/en/mbrdisjoint/'),(341,'VALUES',14,'Syntax:\nVALUES(col_name)\n\nIn an INSERT ... ON DUPLICATE KEY UPDATE statement, you can use the\nVALUES(col_name) function in the UPDATE clause to refer to column\nvalues from the INSERT portion of the statement. In other words,\nVALUES(col_name) in the UPDATE clause refers to the value of col_name\nthat would be inserted, had no duplicate-key conflict occurred. This\nfunction is especially useful in multiple-row inserts. The VALUES()\nfunction is meaningful only in the ON DUPLICATE KEY UPDATE clause of\nINSERT statements and returns NULL otherwise. See\nhttps://mariadb.com/kb/en/insert-on-duplicate-key-update/.\n\nURL: https://mariadb.com/kb/en/values/\n\n','MariaDB> INSERT INTO table (a,b,c) VALUES (1,2,3),(4,5,6)\n -> ON DUPLICATE KEY UPDATE c=VALUES(a)+VALUES(b);\n','https://mariadb.com/kb/en/values/'),(342,'SUBSTRING_INDEX',37,'Syntax:\nSUBSTRING_INDEX(str,delim,count)\n\nReturns the substring from string str before count occurrences of the\ndelimiter delim. If count is positive, everything to the left of the\nfinal delimiter (counting from the left) is returned. If count is\nnegative, everything to the right of the final delimiter (counting from\nthe right) is returned. SUBSTRING_INDEX() performs a case-sensitive\nmatch when searching for delim.\n\nURL: https://mariadb.com/kb/en/substring_index/\n\n','MariaDB> SELECT SUBSTRING_INDEX(\'www.mariadb.org\', \'.\', 2);\n -> \'www.mariadb\'\nMariaDB> SELECT SUBSTRING_INDEX(\'www.mariadb.org\', \'.\', -2);\n -> \'mariadb.org\'\n','https://mariadb.com/kb/en/substring_index/'),(343,'ENCODE',12,'Syntax:\nENCODE(str,pass_str)\n\nEncrypt str using pass_str as the password. To decrypt the result, use\nDECODE().\n\nThe result is a binary string of the same length as str.\n\nThe strength of the encryption is based on how good the random\ngenerator is. It should suffice for short strings.\n\nURL: https://mariadb.com/kb/en/encode/\n\n','','https://mariadb.com/kb/en/encode/'),(344,'LOOP',23,'Syntax:\n[begin_label:] LOOP\n statement_list\nEND LOOP [end_label]\n\nLOOP implements a simple loop construct, enabling repeated execution of\nthe statement list, which consists of one or more statements, each\nterminated by a semicolon (;) statement delimiter. The statements\nwithin the loop are repeated until the loop is terminated. Usually,\nthis is accomplished with a LEAVE statement. Within a stored function,\nRETURN can also be used, which exits the function entirely.\n\nNeglecting to include a loop-termination statement results in an\ninfinite loop.\n\nA LOOP statement can be labeled. For the rules regarding label use, see\n[HELP labels].\n\nURL: https://mariadb.com/kb/en/loop/\n\n','CREATE PROCEDURE doiterate(p1 INT)\nBEGIN\n label1: LOOP\n SET p1 = p1 + 1;\n IF p1 < 10 THEN\n ITERATE label1;\n END IF;\n LEAVE label1;\n END LOOP label1;\n SET @x = p1;\nEND;\n','https://mariadb.com/kb/en/loop/'),(345,'TRUNCATE',4,'Syntax:\nTRUNCATE(X,D)\n\nReturns the number X, truncated to D decimal places. If D is 0, the\nresult has no decimal point or fractional part. D can be negative to\ncause D digits left of the decimal point of the value X to become zero.\n\nURL: https://mariadb.com/kb/en/truncate/\n\n','MariaDB> SELECT TRUNCATE(1.223,1);\n -> 1.2\nMariaDB> SELECT TRUNCATE(1.999,1);\n -> 1.9\nMariaDB> SELECT TRUNCATE(1.999,0);\n -> 1\nMariaDB> SELECT TRUNCATE(-1.999,1);\n -> -1.9\nMariaDB> SELECT TRUNCATE(122,-2);\n -> 100\nMariaDB> SELECT TRUNCATE(10.28*100,0);\n -> 1028\n','https://mariadb.com/kb/en/truncate/'),(346,'TIMESTAMPADD',31,'Syntax:\nTIMESTAMPADD(unit,interval,datetime_expr)\n\nAdds the integer expression interval to the date or datetime expression\ndatetime_expr. The unit for interval is given by the unit argument,\nwhich should be one of the following values: MICROSECOND\n(microseconds), SECOND, MINUTE, HOUR, DAY, WEEK, MONTH, QUARTER, or\nYEAR.\n\nIt is possible to use FRAC_SECOND in place of MICROSECOND, but\nFRAC_SECOND is deprecated. FRAC_SECOND was removed in MySQL 5.5.3.\n\nThe unit value may be specified using one of keywords as shown, or with\na prefix of SQL_TSI_. For example, DAY and SQL_TSI_DAY both are legal.\n\nURL: https://mariadb.com/kb/en/timestampadd/\n\n','MariaDB> SELECT TIMESTAMPADD(MINUTE,1,\'2003-01-02\');\n -> \'2003-01-02 00:01:00\'\nMariaDB> SELECT TIMESTAMPADD(WEEK,1,\'2003-01-02\');\n -> \'2003-01-09\'\n','https://mariadb.com/kb/en/timestampadd/'),(347,'SHOW',26,'SHOW has many forms that provide information about databases, tables,\ncolumns, or status information about the server. This section describes\nthose following:\n\nSHOW AUTHORS\nSHOW {BINARY | MASTER} LOGS\nSHOW BINLOG EVENTS [IN \'log_name\'] [FROM pos] [LIMIT [offset,] row_count]\nSHOW CHARACTER SET [like_or_where]\nSHOW COLLATION [like_or_where]\nSHOW [FULL] COLUMNS FROM tbl_name [FROM db_name] [like_or_where]\nSHOW CONTRIBUTORS\nSHOW CREATE DATABASE db_name\nSHOW CREATE EVENT event_name\nSHOW CREATE FUNCTION func_name\nSHOW CREATE PROCEDURE proc_name\nSHOW CREATE TABLE tbl_name\nSHOW CREATE TRIGGER trigger_name\nSHOW CREATE VIEW view_name\nSHOW DATABASES [like_or_where]\nSHOW ENGINE engine_name {STATUS | MUTEX}\nSHOW [STORAGE] ENGINES\nSHOW ERRORS [LIMIT [offset,] row_count]\nSHOW EVENTS\nSHOW FUNCTION CODE func_name\nSHOW FUNCTION STATUS [like_or_where]\nSHOW GRANTS FOR user\nSHOW INDEX FROM tbl_name [FROM db_name]\nSHOW MASTER STATUS\nSHOW OPEN TABLES [FROM db_name] [like_or_where]\nSHOW PLUGINS\nSHOW PROCEDURE CODE proc_name\nSHOW PROCEDURE STATUS [like_or_where]\nSHOW PRIVILEGES\nSHOW [FULL] PROCESSLIST\nSHOW PROFILE [types] [FOR QUERY n] [OFFSET n] [LIMIT n]\nSHOW PROFILES\nSHOW SLAVE HOSTS\nSHOW SLAVE STATUS\nSHOW [GLOBAL | SESSION] STATUS [like_or_where]\nSHOW TABLE STATUS [FROM db_name] [like_or_where]\nSHOW [FULL] TABLES [FROM db_name] [like_or_where]\nSHOW TRIGGERS [FROM db_name] [like_or_where]\nSHOW [GLOBAL | SESSION] VARIABLES [like_or_where]\nSHOW WARNINGS [LIMIT [offset,] row_count]\n\nlike_or_where:\n LIKE \'pattern\'\n | WHERE expr\n\nIf the syntax for a given SHOW statement includes a LIKE \'pattern\'\npart, \'pattern\' is a string that can contain the SQL \"%\" and \"_\"\nwildcard characters. The pattern is useful for restricting statement\noutput to matching values.\n\nSeveral SHOW statements also accept a WHERE clause that provides more\nflexibility in specifying which rows to display. See\nhttps://mariadb.com/kb/en/extended-show/.\n\nURL: https://mariadb.com/kb/en/show/\n\n','','https://mariadb.com/kb/en/show/'),(348,'GREATEST',18,'Syntax:\nGREATEST(value1,value2,...)\n\nWith two or more arguments, returns the largest (maximum-valued)\nargument. The arguments are compared using the same rules as for\nLEAST().\n\nURL: https://mariadb.com/kb/en/greatest/\n\n','MariaDB> SELECT GREATEST(2,0);\n -> 2\nMariaDB> SELECT GREATEST(34.0,3.0,5.0,767.0);\n -> 767.0\nMariaDB> SELECT GREATEST(\'B\',\'A\',\'C\');\n -> \'C\'\n','https://mariadb.com/kb/en/greatest/'),(349,'SHOW VARIABLES',26,'Syntax:\nSHOW [GLOBAL | SESSION] VARIABLES\n [LIKE \'pattern\' | WHERE expr]\n\nSHOW VARIABLES shows the values of MySQL system variables. This\ninformation also can be obtained using the mysqladmin variables\ncommand. The LIKE clause, if present, indicates which variable names to\nmatch. The WHERE clause can be given to select rows using more general\nconditions, as discussed in\nhttps://mariadb.com/kb/en/extended-show/. This\nstatement does not require any privilege. It requires only the ability\nto connect to the server.\n\nWith the GLOBAL modifier, SHOW VARIABLES displays the values that are\nused for new connections to MySQL. As of MySQL 5.5.3, if a variable has\nno global value, no value is displayed. Before 5.5.3, the session value\nis displayed. With SESSION, SHOW VARIABLES displays the values that are\nin effect for the current connection. If no modifier is present, the\ndefault is SESSION. LOCAL is a synonym for SESSION.\nWith a LIKE clause, the statement displays only rows for those\nvariables with names that match the pattern. To obtain the row for a\nspecific variable, use a LIKE clause as shown:\n\nSHOW VARIABLES LIKE \'max_join_size\';\nSHOW SESSION VARIABLES LIKE \'max_join_size\';\n\nTo get a list of variables whose name match a pattern, use the \"%\"\nwildcard character in a LIKE clause:\n\nSHOW VARIABLES LIKE \'%size%\';\nSHOW GLOBAL VARIABLES LIKE \'%size%\';\n\nWildcard characters can be used in any position within the pattern to\nbe matched. Strictly speaking, because \"_\" is a wildcard that matches\nany single character, you should escape it as \"\\_\" to match it\nliterally. In practice, this is rarely necessary.\n\nURL: https://mariadb.com/kb/en/show-variables/\n\n','','https://mariadb.com/kb/en/show-variables/'),(350,'BINLOG',26,'Syntax:\nBINLOG \'str\'\n\nBINLOG is an internal-use statement. It is generated by the mysqlbinlog\nprogram as the printable representation of certain events in binary log\nfiles. (See https://mariadb.com/kb/en/mysqlbinlog/.)\nThe \'str\' value is a base 64-encoded string the that server decodes to\ndetermine the data change indicated by the corresponding event. This\nstatement requires the SUPER privilege.\n\nURL: https://mariadb.com/kb/en/binlog/\n\n','','https://mariadb.com/kb/en/binlog/'),(351,'BIT_AND',16,'Syntax:\nBIT_AND(expr)\n\nReturns the bitwise AND of all bits in expr. The calculation is\nperformed with 64-bit (BIGINT) precision.\n\nURL: https://mariadb.com/kb/en/bit_and/\n\n','','https://mariadb.com/kb/en/bit_and/'),(352,'SECOND',31,'Syntax:\nSECOND(time)\n\nReturns the second for time, in the range 0 to 59.\n\nURL: https://mariadb.com/kb/en/second/\n\n','MariaDB> SELECT SECOND(\'10:05:03\');\n -> 3\n','https://mariadb.com/kb/en/second/'),(353,'ATAN2',4,'Syntax:\nATAN(Y,X), ATAN2(Y,X)\n\nReturns the arc tangent of the two variables X and Y. It is similar to\ncalculating the arc tangent of Y / X, except that the signs of both\narguments are used to determine the quadrant of the result.\n\nURL: https://mariadb.com/kb/en/atan2/\n\n','MariaDB> SELECT ATAN(-2,2);\n -> -0.78539816339745\nMariaDB> SELECT ATAN2(PI(),0);\n -> 1.5707963267949\n','https://mariadb.com/kb/en/atan2/'),(354,'MBRCONTAINS',6,'MBRContains(g1,g2)\n\nReturns 1 or 0 to indicate whether the Minimum Bounding Rectangle of g1\ncontains the Minimum Bounding Rectangle of g2. This tests the opposite\nrelationship as MBRWithin().\n\nURL: https://mariadb.com/kb/en/mbrcontains/\n\n','MariaDB> SET @g1 = GeomFromText(\'Polygon((0 0,0 3,3 3,3 0,0 0))\');\nMariaDB> SET @g2 = GeomFromText(\'Point(1 1)\');\nMariaDB> SELECT MBRContains(@g1,@g2), MBRContains(@g2,@g1);\n----------------------+----------------------+\n| MBRContains(@g1,@g2) | MBRContains(@g2,@g1) |\n+----------------------+----------------------+\n| 1 | 0 |\n+----------------------+----------------------+\n','https://mariadb.com/kb/en/mbrcontains/'),(355,'HOUR',31,'Syntax:\nHOUR(time)\n\nReturns the hour for time. The range of the return value is 0 to 23 for\ntime-of-day values. However, the range of TIME values actually is much\nlarger, so HOUR can return values greater than 23.\n\nURL: https://mariadb.com/kb/en/hour/\n\n','MariaDB> SELECT HOUR(\'10:05:03\');\n -> 10\nMariaDB> SELECT HOUR(\'272:59:59\');\n -> 272\n','https://mariadb.com/kb/en/hour/'),(356,'SELECT',27,'Syntax:\nSELECT\n [ALL | DISTINCT | DISTINCTROW ]\n [HIGH_PRIORITY]\n [STRAIGHT_JOIN]\n [SQL_SMALL_RESULT] [SQL_BIG_RESULT] [SQL_BUFFER_RESULT]\n [SQL_CACHE | SQL_NO_CACHE] [SQL_CALC_FOUND_ROWS]\n select_expr [, select_expr ...]\n [FROM table_references\n [WHERE where_condition]\n [GROUP BY {col_name | expr | position}\n [ASC | DESC], ... [WITH ROLLUP]]\n [HAVING where_condition]\n [ORDER BY {col_name | expr | position}\n [ASC | DESC], ...]\n [LIMIT {[offset,] row_count | row_count OFFSET offset}]\n [PROCEDURE procedure_name(argument_list)]\n [INTO OUTFILE \'file_name\'\n [CHARACTER SET charset_name]\n export_options\n | INTO DUMPFILE \'file_name\'\n | INTO var_name [, var_name]]\n [FOR UPDATE | LOCK IN SHARE MODE]]\n\nSELECT is used to retrieve rows selected from one or more tables, and\ncan include UNION statements and subqueries. See [HELP UNION], and\nhttps://mariadb.com/kb/en/subqueries/.\n\nThe most commonly used clauses of SELECT statements are these:\n\no Each select_expr indicates a column that you want to retrieve. There\n must be at least one select_expr.\n\no table_references indicates the table or tables from which to retrieve\n rows. Its syntax is described in [HELP JOIN].\n\no The WHERE clause, if given, indicates the condition or conditions\n that rows must satisfy to be selected. where_condition is an\n expression that evaluates to true for each row to be selected. The\n statement selects all rows if there is no WHERE clause.\n\n In the WHERE expression, you can use any of the functions and\n operators that MySQL supports, except for aggregate (summary)\n functions. See\n https://mariadb.com/kb/en/select#select-expressions, and\n https://mariadb.com/kb/en/functions-and-operators/.\n\nSELECT can also be used to retrieve rows computed without reference to\nany table.\n\nURL: https://mariadb.com/kb/en/select/\n\n','','https://mariadb.com/kb/en/select/'),(357,'COT',4,'Syntax:\nCOT(X)\n\nReturns the cotangent of X.\n\nURL: https://mariadb.com/kb/en/cot/\n\n','MariaDB> SELECT COT(12);\n -> -1.5726734063977\nMariaDB> SELECT COT(0);\n -> NULL\n','https://mariadb.com/kb/en/cot/'),(358,'SHOW CREATE EVENT',26,'Syntax:\nSHOW CREATE EVENT event_name\n\nThis statement displays the CREATE EVENT statement needed to re-create\na given event. It requires the EVENT privilege for the database from\nwhich the event is to be shown. For example (using the same event\ne_daily defined and then altered in [HELP SHOW EVENTS]):\n\nURL: https://mariadb.com/kb/en/show-create-event/\n\n','MariaDB> SHOW CREATE EVENT test.e_daily\\G\n*************************** 1. row ***************************\n Event: e_daily\n sql_mode:\n time_zone: SYSTEM\n Create Event: CREATE EVENT `e_daily`\n ON SCHEDULE EVERY 1 DAY\n STARTS CURRENT_TIMESTAMP + INTERVAL 6 HOUR\n ON COMPLETION NOT PRESERVE\n ENABLE\n COMMENT \'Saves total number of sessions then\n clears the table each day\'\n DO BEGIN\n INSERT INTO site_activity.totals (time, total)\n SELECT CURRENT_TIMESTAMP, COUNT(*)\n FROM site_activity.sessions;\n DELETE FROM site_activity.sessions;\n END\ncharacter_set_client: latin1\ncollation_connection: latin1_swedish_ci\n Database Collation: latin1_swedish_ci\n','https://mariadb.com/kb/en/show-create-event/'),(359,'LOAD_FILE',37,'Syntax:\nLOAD_FILE(file_name)\n\nReads the file and returns the file contents as a string. To use this\nfunction, the file must be located on the server host, you must specify\nthe full path name to the file, and you must have the FILE privilege.\nThe file must be readable by all and its size less than\nmax_allowed_packet bytes. If the secure_file_priv system variable is\nset to a nonempty directory name, the file to be loaded must be located\nin that directory.\n\nIf the file does not exist or cannot be read because one of the\npreceding conditions is not satisfied, the function returns NULL.\n\nThe character_set_filesystem system variable controls interpretation of\nfile names that are given as literal strings.\n\nURL: https://mariadb.com/kb/en/load_file/\n\n','MariaDB> UPDATE t\n SET blob_col=LOAD_FILE(\'/tmp/picture\')\n WHERE id=1;\n','https://mariadb.com/kb/en/load_file/'),(360,'POINTFROMTEXT',3,'PointFromText(wkt[,srid])\n\nConstructs a POINT value using its WKT representation and SRID.\n\nURL: https://mariadb.com/kb/en/pointfromtext/\n\n','','https://mariadb.com/kb/en/pointfromtext/'),(361,'GROUP_CONCAT',16,'Syntax:\nGROUP_CONCAT(expr)\n\nThis function returns a string result with the concatenated non-NULL\nvalues from a group. It returns NULL if there are no non-NULL values.\nThe full syntax is as follows:\n\nGROUP_CONCAT([DISTINCT] expr [,expr ...]\n [ORDER BY {unsigned_integer | col_name | expr}\n [ASC | DESC] [,col_name ...]]\n [SEPARATOR str_val])\n\nURL: https://mariadb.com/kb/en/group_concat/\n\n','MariaDB> SELECT student_name,\n -> GROUP_CONCAT(test_score)\n -> FROM student\n -> GROUP BY student_name;\n','https://mariadb.com/kb/en/group_concat/'),(362,'DATE_FORMAT',31,'Syntax:\nDATE_FORMAT(date,format)\n\nFormats the date value according to the format string.\n\nURL: https://mariadb.com/kb/en/date_format/\n\n','MariaDB> SELECT DATE_FORMAT(\'2009-10-04 22:23:00\', \'%W %M %Y\');\n -> \'Sunday October 2009\'\nMariaDB> SELECT DATE_FORMAT(\'2007-10-04 22:23:00\', \'%H:%i:%s\');\n -> \'22:23:00\'\nMariaDB> SELECT DATE_FORMAT(\'1900-10-04 22:23:00\',\n -> \'%D %y %a %d %m %b %j\');\n -> \'4th 00 Thu 04 10 Oct 277\'\nMariaDB> SELECT DATE_FORMAT(\'1997-10-04 22:23:00\',\n -> \'%H %k %I %r %T %S %w\');\n -> \'22 22 10 10:23:00 PM 22:23:00 00 6\'\nMariaDB> SELECT DATE_FORMAT(\'1999-01-01\', \'%X %V\');\n -> \'1998 52\'\nMariaDB> SELECT DATE_FORMAT(\'2006-06-00\', \'%d\');\n -> \'00\'\n','https://mariadb.com/kb/en/date_format/'),(363,'BENCHMARK',17,'Syntax:\nBENCHMARK(count,expr)\n\nThe BENCHMARK() function executes the expression expr repeatedly count\ntimes. It may be used to time how quickly MySQL processes the\nexpression. The result value is always 0. The intended use is from\nwithin the mysql client, which reports query execution times:\n\nURL: https://mariadb.com/kb/en/benchmark/\n\n','MariaDB> SELECT BENCHMARK(1000000,ENCODE(\'hello\',\'goodbye\'));\n+----------------------------------------------+\n| BENCHMARK(1000000,ENCODE(\'hello\',\'goodbye\')) |\n+----------------------------------------------+\n| 0 |\n+----------------------------------------------+\n1 row in set (4.74 sec)\n','https://mariadb.com/kb/en/benchmark/'),(364,'YEAR',31,'Syntax:\nYEAR(date)\n\nReturns the year for date, in the range 1000 to 9999, or 0 for the\n\"zero\" date.\n\nURL: https://mariadb.com/kb/en/year/\n\n','MariaDB> SELECT YEAR(\'1987-01-01\');\n -> 1987\n','https://mariadb.com/kb/en/year/'),(365,'SHOW ENGINE',26,'Syntax:\nSHOW ENGINE engine_name {STATUS | MUTEX}\n\nSHOW ENGINE displays operational information about a storage engine.\nThe following statements currently are supported:\n\nSHOW ENGINE INNODB STATUS\nSHOW ENGINE INNODB MUTEX\nSHOW ENGINE PERFORMANCE_SCHEMA STATUS\n\nSHOW ENGINE INNODB STATUS displays extensive information from the\nstandard InnoDB Monitor about the state of the InnoDB storage engine.\nFor information about the standard monitor and other InnoDB Monitors\nthat provide information about InnoDB processing, see\nhttp://dev.mysql.com/doc/refman/5.5/en/innodb-monitors.html.\n\nSHOW ENGINE INNODB MUTEX displays InnoDB mutex statistics. The\nstatement displays the following fields:\n\no Type\n\n Always InnoDB.\n\no Name\n\n The source file where the mutex is implemented, and the line number\n in the file where the mutex is created. The line number may change\n depending on your version of MySQL.\n\no Status\n\n The mutex status. This field displays several values if UNIV_DEBUG\n was defined at MySQL compilation time (for example, in include/univ.i\n in the InnoDB part of the MySQL source tree). If UNIV_DEBUG was not\n defined, the statement displays only the os_waits value. In the\n latter case (without UNIV_DEBUG), the information on which the output\n is based is insufficient to distinguish regular mutexes and mutexes\n that protect rw-locks (which permit multiple readers or a single\n writer). Consequently, the output may appear to contain multiple rows\n for the same mutex.\n\n o count indicates how many times the mutex was requested.\n\n o spin_waits indicates how many times the spinlock had to run.\n\n o spin_rounds indicates the number of spinlock rounds. (spin_rounds\n divided by spin_waits provides the average round count.)\n\n o os_waits indicates the number of operating system waits. This\n occurs when the spinlock did not work (the mutex was not locked\n during the spinlock and it was necessary to yield to the operating\n system and wait).\n\n o os_yields indicates the number of times a the thread trying to lock\n a mutex gave up its timeslice and yielded to the operating system\n (on the presumption that permitting other threads to run will free\n the mutex so that it can be locked).\n\n o os_wait_times indicates the amount of time (in ms) spent in\n operating system waits, if the timed_mutexes system variable is 1\n (ON). If timed_mutexes is 0 (OFF), timing is disabled, so\n os_wait_times is 0. timed_mutexes is off by default.\n\nInformation from this statement can be used to diagnose system\nproblems. For example, large values of spin_waits and spin_rounds may\nindicate scalability problems.\n\nUse SHOW ENGINE PERFORMANCE_SCHEMA STATUS to inspect the internal\noperation of the Performance Schema code:\n\nMariaDB> SHOW ENGINE PERFORMANCE_SCHEMA STATUS\\G\n...\n*************************** 3. row ***************************\n Type: performance_schema\n Name: events_waits_history.row_size\nStatus: 76\n*************************** 4. row ***************************\n Type: performance_schema\n Name: events_waits_history.row_count\nStatus: 10000\n*************************** 5. row ***************************\n Type: performance_schema\n Name: events_waits_history.memory\nStatus: 760000\n...\n*************************** 57. row ***************************\n Type: performance_schema\n Name: performance_schema.memory\nStatus: 26459600\n...\n\nThe intent of this statement is to help the DBA to understand the\neffects that different options have on memory requirements.\n\nName values consist of two parts, which name an internal buffer and an\nattribute of the buffer, respectively:\n\no Internal buffers that are exposed as a table in the\n performance_schema database are named after the table. Examples:\n events_waits_history.row_size, mutex_instances.row_count.\n\no Internal buffers that are not exposed as a table are named within\n parentheses. Examples: (pfs_cond_class).row_size,\n (pfs_mutex_class).memory.\n\no Values that apply to the Performance Schema as a whole begin with\n performance_schema. Example: performance_schema.memory.\n\nAttributes have these meanings:\n\no row_size cannot be changed. It is the size of the internal record\n used by the implementation.\n\no row_count can be changed depending on the configuration options.\n\no For a table, tbl_name.memory is the product of row_size multiplied by\n row_count. For the Performance Schema as a whole,\n performance_schema.memory is the sum of all the memory used (the sum\n of all other memory values).\n\nIn some cases, there is a direct relationship between a configuration\nparameter and a SHOW ENGINE value. For example,\nevents_waits_history_long.row_count corresponds to\nperformance_schema_events_waits_history_long_size. In other cases, the\nrelationship is more complex. For example,\nevents_waits_history.row_count corresponds to\nperformance_schema_events_waits_history_size (the number of rows per\nthread) multiplied by performance_schema_max_thread_instances ( the\nnumber of threads).\n\nURL: https://mariadb.com/kb/en/show-engine/\n\n','','https://mariadb.com/kb/en/show-engine/'),(366,'NAME_CONST',14,'Syntax:\nNAME_CONST(name,value)\n\nReturns the given value. When used to produce a result set column,\nNAME_CONST() causes the column to have the given name. The arguments\nshould be constants.\n\nMariaDB> SELECT NAME_CONST(\'myname\', 14);\n+--------+\n| myname |\n+--------+\n| 14 |\n+--------+\n\nURL: https://mariadb.com/kb/en/name_const/\n\n','','https://mariadb.com/kb/en/name_const/'),(367,'RELEASE_LOCK',14,'Syntax:\nRELEASE_LOCK(str)\n\nReleases the lock named by the string str that was obtained with\nGET_LOCK(). Returns 1 if the lock was released, 0 if the lock was not\nestablished by this thread (in which case the lock is not released),\nand NULL if the named lock did not exist. The lock does not exist if it\nwas never obtained by a call to GET_LOCK() or if it has previously been\nreleased.\n\nThe DO statement is convenient to use with RELEASE_LOCK(). See [HELP\nDO].\n\nURL: https://mariadb.com/kb/en/release_lock/\n\n','','https://mariadb.com/kb/en/release_lock/'),(368,'IS NULL',18,'Syntax:\nIS NULL\n\nTests whether a value is NULL.\n\nURL: https://mariadb.com/kb/en/is-null/\n\n','MariaDB> SELECT 1 IS NULL, 0 IS NULL, NULL IS NULL;\n -> 0, 0, 1\n','https://mariadb.com/kb/en/is-null/'),(369,'CONVERT_TZ',31,'Syntax:\nCONVERT_TZ(dt,from_tz,to_tz)\n\nCONVERT_TZ() converts a datetime value dt from the time zone given by\nfrom_tz to the time zone given by to_tz and returns the resulting\nvalue. Time zones are specified as described in\nhttps://mariadb.com/kb/en/time-zones/. This\nfunction returns NULL if the arguments are invalid.\n\nURL: https://mariadb.com/kb/en/convert_tz/\n\n','MariaDB> SELECT CONVERT_TZ(\'2004-01-01 12:00:00\',\'GMT\',\'MET\');\n -> \'2004-01-01 13:00:00\'\nMariaDB> SELECT CONVERT_TZ(\'2004-01-01 12:00:00\',\'+00:00\',\'+10:00\');\n -> \'2004-01-01 22:00:00\'\n','https://mariadb.com/kb/en/convert_tz/'),(370,'TIME_TO_SEC',31,'Syntax:\nTIME_TO_SEC(time)\n\nReturns the time argument, converted to seconds.\n\nURL: https://mariadb.com/kb/en/time_to_sec/\n\n','MariaDB> SELECT TIME_TO_SEC(\'22:23:00\');\n -> 80580\nMariaDB> SELECT TIME_TO_SEC(\'00:39:38\');\n -> 2378\n','https://mariadb.com/kb/en/time_to_sec/'),(371,'WEEKDAY',31,'Syntax:\nWEEKDAY(date)\n\nReturns the weekday index for date (0 = Monday, 1 = Tuesday, ... 6 =\nSunday).\n\nURL: https://mariadb.com/kb/en/weekday/\n\n','MariaDB> SELECT WEEKDAY(\'2008-02-03 22:23:00\');\n -> 6\nMariaDB> SELECT WEEKDAY(\'2007-11-06\');\n -> 1\n','https://mariadb.com/kb/en/weekday/'),(372,'EXPORT_SET',37,'Syntax:\nEXPORT_SET(bits,on,off[,separator[,number_of_bits]])\n\nReturns a string such that for every bit set in the value bits, you get\nan on string and for every bit not set in the value, you get an off\nstring. Bits in bits are examined from right to left (from low-order to\nhigh-order bits). Strings are added to the result from left to right,\nseparated by the separator string (the default being the comma\ncharacter \",\"). The number of bits examined is given by number_of_bits,\nwhich has a default of 64 if not specified. number_of_bits is silently\nclipped to 64 if larger than 64. It is treated as an unsigned integer,\nso a value of -1 is effectively the same as 64.\n\nURL: https://mariadb.com/kb/en/export_set/\n\n','MariaDB> SELECT EXPORT_SET(5,\'Y\',\'N\',\',\',4);\n -> \'Y,N,Y,N\'\nMariaDB> SELECT EXPORT_SET(6,\'1\',\'0\',\',\',10);\n -> \'0,1,1,0,0,0,0,0,0,0\'\n','https://mariadb.com/kb/en/export_set/'),(373,'ALTER SERVER',39,'Syntax:\nALTER SERVER server_name\n OPTIONS (option [, option] ...)\n\nAlters the server information for server_name, adjusting any of the\noptions permitted in the CREATE SERVER statement. See [HELP CREATE\nSERVER]. The corresponding fields in the mysql.servers table are\nupdated accordingly. This statement requires the SUPER privilege.\n\nURL: https://mariadb.com/kb/en/alter-server/\n\n','ALTER SERVER s OPTIONS (USER \'sally\');\n','https://mariadb.com/kb/en/alter-server/'),(374,'RESIGNAL',23,'Syntax:\nRESIGNAL [condition_value]\n [SET signal_information_item\n [, signal_information_item] ...]\n\ncondition_value:\n SQLSTATE [VALUE] sqlstate_value\n | condition_name\n\nsignal_information_item:\n condition_information_item_name = simple_value_specification\n\ncondition_information_item_name:\n CLASS_ORIGIN\n | SUBCLASS_ORIGIN\n | MESSAGE_TEXT\n | MYSQL_ERRNO\n | CONSTRAINT_CATALOG\n | CONSTRAINT_SCHEMA\n | CONSTRAINT_NAME\n | CATALOG_NAME\n | SCHEMA_NAME\n | TABLE_NAME\n | COLUMN_NAME\n | CURSOR_NAME\n\ncondition_name, simple_value_specification:\n (see following discussion)\n\nRESIGNAL passes on the error condition information that is available\nduring execution of a condition handler within a compound statement\ninside a stored procedure or function, trigger, or event. RESIGNAL may\nchange some or all information before passing it on. RESIGNAL is\nrelated to SIGNAL, but instead of originating a condition as SIGNAL\ndoes, RESIGNAL relays existing condition information, possibly after\nmodifying it.\n\nRESIGNAL makes it possible to both handle an error and return the error\ninformation. Otherwise, by executing an SQL statement within the\nhandler, information that caused the handler\'s activation is destroyed.\nRESIGNAL also can make some procedures shorter if a given handler can\nhandle part of a situation, then pass the condition \"up the line\" to\nanother handler.\n\nNo special privileges are required to execute the RESIGNAL statement.\n\nFor condition_value and signal_information_item, the definitions and\nrules are the same for RESIGNAL as for SIGNAL (see [HELP SIGNAL]).\n\nThe RESIGNAL statement takes condition_value and SET clauses, both of\nwhich are optional. This leads to several possible uses:\n\no RESIGNAL alone:\n\nRESIGNAL;\n\no RESIGNAL with new signal information:\n\nRESIGNAL SET signal_information_item [, signal_information_item] ...;\n\no RESIGNAL with a condition value and possibly new signal information:\n\nRESIGNAL condition_value\n [SET signal_information_item [, signal_information_item] ...];\n\nURL: https://mariadb.com/kb/en/resignal/\n\n','','https://mariadb.com/kb/en/resignal/'),(375,'TIME FUNCTION',31,'Syntax:\nTIME(expr)\n\nExtracts the time part of the time or datetime expression expr and\nreturns it as a string.\n\nURL: https://mariadb.com/kb/en/time-function/\n\n','MariaDB> SELECT TIME(\'2003-12-31 01:02:03\');\n -> \'01:02:03\'\nMariaDB> SELECT TIME(\'2003-12-31 01:02:03.000123\');\n -> \'01:02:03.000123\'\n','https://mariadb.com/kb/en/time-function/'),(376,'DATE_ADD',31,'Syntax:\nDATE_ADD(date,INTERVAL expr unit), DATE_SUB(date,INTERVAL expr unit)\n\nThese functions perform date arithmetic. The date argument specifies\nthe starting date or datetime value. expr is an expression specifying\nthe interval value to be added or subtracted from the starting date.\nexpr is a string; it may start with a \"-\" for negative intervals. unit\nis a keyword indicating the units in which the expression should be\ninterpreted.\n\nURL: https://mariadb.com/kb/en/date_add/\n\n','MariaDB> SELECT \'2008-12-31 23:59:59\' + INTERVAL 1 SECOND;\n -> \'2009-01-01 00:00:00\'\nMariaDB> SELECT INTERVAL 1 DAY + \'2008-12-31\';\n -> \'2009-01-01\'\nMariaDB> SELECT \'2005-01-01\' - INTERVAL 1 SECOND;\n -> \'2004-12-31 23:59:59\'\nMariaDB> SELECT DATE_ADD(\'2000-12-31 23:59:59\',\n -> INTERVAL 1 SECOND);\n -> \'2001-01-01 00:00:00\'\nMariaDB> SELECT DATE_ADD(\'2010-12-31 23:59:59\',\n -> INTERVAL 1 DAY);\n -> \'2011-01-01 23:59:59\'\nMariaDB> SELECT DATE_ADD(\'2100-12-31 23:59:59\',\n -> INTERVAL \'1:1\' MINUTE_SECOND);\n -> \'2101-01-01 00:01:00\'\nMariaDB> SELECT DATE_SUB(\'2005-01-01 00:00:00\',\n -> INTERVAL \'1 1:1:1\' DAY_SECOND);\n -> \'2004-12-30 22:58:59\'\nMariaDB> SELECT DATE_ADD(\'1900-01-01 00:00:00\',\n -> INTERVAL \'-1 10\' DAY_HOUR);\n -> \'1899-12-30 14:00:00\'\nMariaDB> SELECT DATE_SUB(\'1998-01-02\', INTERVAL 31 DAY);\n -> \'1997-12-02\'\nMariaDB> SELECT DATE_ADD(\'1992-12-31 23:59:59.000002\',\n -> INTERVAL \'1.999999\' SECOND_MICROSECOND);\n -> \'1993-01-01 00:00:01.000001\'\n','https://mariadb.com/kb/en/date_add/'),(377,'CAST',37,'Syntax:\nCAST(expr AS type)\n\nThe CAST() function takes an expression of any type and produces a\nresult value of a specified type, similar to CONVERT(). See the\ndescription of CONVERT() for more information.\n\nURL: https://mariadb.com/kb/en/cast/\n\n','','https://mariadb.com/kb/en/cast/'),(378,'SOUNDS LIKE',37,'Syntax:\nexpr1 SOUNDS LIKE expr2\n\nThis is the same as SOUNDEX(expr1) = SOUNDEX(expr2).\n\nURL: https://mariadb.com/kb/en/sounds-like/\n\n','','https://mariadb.com/kb/en/sounds-like/'),(379,'PERIOD_DIFF',31,'Syntax:\nPERIOD_DIFF(P1,P2)\n\nReturns the number of months between periods P1 and P2. P1 and P2\nshould be in the format YYMM or YYYYMM. Note that the period arguments\nP1 and P2 are not date values.\n\nURL: https://mariadb.com/kb/en/period_diff/\n\n','MariaDB> SELECT PERIOD_DIFF(200802,200703);\n -> 11\n','https://mariadb.com/kb/en/period_diff/'),(380,'LIKE',37,'Syntax:\nexpr LIKE pat [ESCAPE \'escape_char\']\n\nPattern matching using SQL simple regular expression comparison.\nReturns 1 (TRUE) or 0 (FALSE). If either expr or pat is NULL, the\nresult is NULL.\n\nThe pattern need not be a literal string. For example, it can be\nspecified as a string expression or table column.\n\nURL: https://mariadb.com/kb/en/like/\n\n','MariaDB> SELECT \'David!\' LIKE \'David_\';\n -> 1\nMariaDB> SELECT \'David!\' LIKE \'%D%v%\';\n -> 1\n','https://mariadb.com/kb/en/like/'),(381,'MULTIPOINT',24,'MultiPoint(pt1,pt2,...)\n\nConstructs a MultiPoint value using Point or WKB Point arguments.\n\nURL: https://mariadb.com/kb/en/multipoint/\n\n','','https://mariadb.com/kb/en/multipoint/'),(382,'>>',19,'Syntax:\n>>\n\nShifts a longlong (BIGINT) number to the right.\n\nURL: https://mariadb.com/kb/en/shift-right/\n\n','MariaDB> SELECT 4 >> 2;\n -> 1\n','https://mariadb.com/kb/en/shift-right/'),(383,'FETCH',23,'Syntax:\nFETCH [[NEXT] FROM] cursor_name INTO var_name [, var_name] ...\n\nThis statement fetches the next row for the SELECT statement associated\nwith the specified cursor (which must be open), and advances the cursor\npointer. If a row exists, the fetched columns are stored in the named\nvariables. The number of columns retrieved by the SELECT statement must\nmatch the number of output variables specified in the FETCH statement.\n\nIf no more rows are available, a No Data condition occurs with SQLSTATE\nvalue \'02000\'. To detect this condition, you can set up a handler for\nit (or for a NOT FOUND condition). For an example, see\nhttps://mariadb.com/kb/en/cursor-overview/.\n\nURL: https://mariadb.com/kb/en/fetch/\n\n','','https://mariadb.com/kb/en/fetch/'),(384,'AVG',16,'Syntax:\nAVG([DISTINCT] expr)\n\nReturns the average value of expr. The DISTINCT option can be used to\nreturn the average of the distinct values of expr.\n\nAVG() returns NULL if there were no matching rows.\n\nURL: https://mariadb.com/kb/en/avg/\n\n','MariaDB> SELECT student_name, AVG(test_score)\n -> FROM student\n -> GROUP BY student_name;\n','https://mariadb.com/kb/en/avg/'),(385,'TRUE FALSE',29,'The constants TRUE and FALSE evaluate to 1 and 0, respectively. The\nconstant names can be written in any lettercase.\n\nMariaDB> SELECT TRUE, true, FALSE, false;\n -> 1, 1, 0, 0\n\nURL: https://mariadb.com/kb/en/true-false/\n\n','','https://mariadb.com/kb/en/true-false/'),(386,'MBRWITHIN',6,'MBRWithin(g1,g2)\n\nReturns 1 or 0 to indicate whether the Minimum Bounding Rectangle of g1\nis within the Minimum Bounding Rectangle of g2. This tests the opposite\nrelationship as MBRContains().\n\nURL: https://mariadb.com/kb/en/mbrwithin/\n\n','MariaDB> SET @g1 = GeomFromText(\'Polygon((0 0,0 3,3 3,3 0,0 0))\');\nMariaDB> SET @g2 = GeomFromText(\'Polygon((0 0,0 5,5 5,5 0,0 0))\');\nMariaDB> SELECT MBRWithin(@g1,@g2), MBRWithin(@g2,@g1);\n+--------------------+--------------------+\n| MBRWithin(@g1,@g2) | MBRWithin(@g2,@g1) |\n+--------------------+--------------------+\n| 1 | 0 |\n+--------------------+--------------------+\n','https://mariadb.com/kb/en/mbrwithin/'),(387,'SESSION_USER',17,'Syntax:\nSESSION_USER()\n\nSESSION_USER() is a synonym for USER().\n\nURL: https://mariadb.com/kb/en/session_user/\n\n','','https://mariadb.com/kb/en/session_user/'),(388,'IN',18,'Syntax:\nexpr IN (value,...)\n\nReturns 1 if expr is equal to any of the values in the IN list, else\nreturns 0. If all values are constants, they are evaluated according to\nthe type of expr and sorted. The search for the item then is done using\na binary search. This means IN is very quick if the IN value list\nconsists entirely of constants. Otherwise, type conversion takes place\naccording to the rules described in\nhttps://mariadb.com/kb/en/type-conversion/, but\napplied to all the arguments.\n\nURL: https://mariadb.com/kb/en/in/\n\n','MariaDB> SELECT 2 IN (0,3,5,7);\n -> 0\nMariaDB> SELECT \'wefwf\' IN (\'wee\',\'wefwf\',\'weg\');\n -> 1\n','https://mariadb.com/kb/en/in/'),(389,'QUOTE',37,'Syntax:\nQUOTE(str)\n\nQuotes a string to produce a result that can be used as a properly\nescaped data value in an SQL statement. The string is returned enclosed\nby single quotation marks and with each instance of backslash (\"\\\"),\nsingle quote (\"\'\"), ASCII NUL, and Control+Z preceded by a backslash.\nIf the argument is NULL, the return value is the word \"NULL\" without\nenclosing single quotation marks.\n\nURL: https://mariadb.com/kb/en/quote/\n\n','MariaDB> SELECT QUOTE(\'Don\\\'t!\');\n -> \'Don\\\'t!\'\nMariaDB> SELECT QUOTE(NULL);\n -> NULL\n','https://mariadb.com/kb/en/quote/'),(390,'HELP COMMAND',26,'Syntax:\nMariaDB> help search_string\n\nIf you provide an argument to the help command, mysql uses it as a\nsearch string to access server-side help from the contents of the MySQL\nReference Manual. The proper operation of this command requires that\nthe help tables in the mysql database be initialized with help topic\ninformation .\n\nIf there is no match for the search string, the search fails:\n\nMariaDB> help me\n\nNothing found\nPlease try to run \'help contents\' for a list of all accessible topics\n\nUse help contents to see a list of the help categories:\n\nMariaDB> help contents\nYou asked for help about help category: \"Contents\"\nFor more information, type \'help <item>\', where <item> is one of the\nfollowing categories:\n Account Management\n Administration\n Data Definition\n Data Manipulation\n Data Types\n Functions\n Functions and Modifiers for Use with GROUP BY\n Geographic Features\n Language Structure\n Plugins\n Storage Engines\n Stored Routines\n Table Maintenance\n Transactions\n Triggers\n\nIf the search string matches multiple items, mysql shows a list of\nmatching topics:\n\nMariaDB> help logs\nMany help items for your request exist.\nTo make a more specific request, please type \'help <item>\',\nwhere <item> is one of the following topics:\n SHOW\n SHOW BINARY LOGS\n SHOW ENGINE\n SHOW LOGS\n\nUse a topic as the search string to see the help entry for that topic:\n\nMariaDB> help show binary logs\nName: \'SHOW BINARY LOGS\'\nDescription:\nSyntax:\nSHOW BINARY LOGS\nSHOW MASTER LOGS\n\nLists the binary log files on the server. This statement is used as\npart of the procedure described in [purge-binary-logs], that shows how\nto determine which logs can be purged.\n\nMariaDB> SHOW BINARY LOGS;\n+---------------+-----------+\n| Log_name | File_size |\n+---------------+-----------+\n| binlog.000015 | 724935 |\n| binlog.000016 | 733481 |\n+---------------+-----------+\n\nURL: https://mariadb.com/kb/en/help-command/\n\n','','https://mariadb.com/kb/en/help-command/'),(391,'QUARTER',31,'Syntax:\nQUARTER(date)\n\nReturns the quarter of the year for date, in the range 1 to 4.\n\nURL: https://mariadb.com/kb/en/quarter/\n\n','MariaDB> SELECT QUARTER(\'2008-04-01\');\n -> 2\n','https://mariadb.com/kb/en/quarter/'),(392,'POSITION',37,'Syntax:\nPOSITION(substr IN str)\n\nPOSITION(substr IN str) is a synonym for LOCATE(substr,str).\n\nURL: https://mariadb.com/kb/en/position/\n\n','','https://mariadb.com/kb/en/position/'),(393,'SHOW CREATE FUNCTION',26,'Syntax:\nSHOW CREATE FUNCTION func_name\n\nThis statement is similar to SHOW CREATE PROCEDURE but for stored\nfunctions. See [HELP SHOW CREATE PROCEDURE].\n\nURL: https://mariadb.com/kb/en/show-create-function/\n\n','','https://mariadb.com/kb/en/show-create-function/'),(394,'IS_USED_LOCK',14,'Syntax:\nIS_USED_LOCK(str)\n\nChecks whether the lock named str is in use (that is, locked). If so,\nit returns the connection identifier of the client that holds the lock.\nOtherwise, it returns NULL.\n\nURL: https://mariadb.com/kb/en/is_used_lock/\n\n','','https://mariadb.com/kb/en/is_used_lock/'),(395,'POLYFROMTEXT',3,'PolyFromText(wkt[,srid]), PolygonFromText(wkt[,srid])\n\nConstructs a POLYGON value using its WKT representation and SRID.\n\nURL: https://mariadb.com/kb/en/polyfromtext/\n\n','','https://mariadb.com/kb/en/polyfromtext/'),(396,'DES_ENCRYPT',12,'Syntax:\nDES_ENCRYPT(str[,{key_num|key_str}])\n\nEncrypts the string with the given key using the Triple-DES algorithm.\n\nThis function works only if MySQL has been configured with SSL support.\nSee https://mariadb.com/kb/en/ssl-connections/.\n\nThe encryption key to use is chosen based on the second argument to\nDES_ENCRYPT(), if one was given. With no argument, the first key from\nthe DES key file is used. With a key_num argument, the given key number\n(0 to 9) from the DES key file is used. With a key_str argument, the\ngiven key string is used to encrypt str.\n\nThe key file can be specified with the --des-key-file server option.\n\nThe return string is a binary string where the first character is\nCHAR(128 | key_num). If an error occurs, DES_ENCRYPT() returns NULL.\n\nThe 128 is added to make it easier to recognize an encrypted key. If\nyou use a string key, key_num is 127.\n\nThe string length for the result is given by this formula:\n\nnew_len = orig_len + (8 - (orig_len % 8)) + 1\n\nEach line in the DES key file has the following format:\n\nkey_num des_key_str\n\nEach key_num value must be a number in the range from 0 to 9. Lines in\nthe file may be in any order. des_key_str is the string that is used to\nencrypt the message. There should be at least one space between the\nnumber and the key. The first key is the default key that is used if\nyou do not specify any key argument to DES_ENCRYPT().\n\nYou can tell MySQL to read new key values from the key file with the\nFLUSH DES_KEY_FILE statement. This requires the RELOAD privilege.\n\nOne benefit of having a set of default keys is that it gives\napplications a way to check for the existence of encrypted column\nvalues, without giving the end user the right to decrypt those values.\n\nURL: https://mariadb.com/kb/en/des_encrypt/\n\n','MariaDB> SELECT customer_address FROM customer_table \n > WHERE crypted_credit_card = DES_ENCRYPT(\'credit_card_number\');\n','https://mariadb.com/kb/en/des_encrypt/'),(397,'CEIL',4,'Syntax:\nCEIL(X)\n\nCEIL() is a synonym for CEILING().\n\nURL: https://mariadb.com/kb/en/ceil/\n\n','','https://mariadb.com/kb/en/ceil/'),(398,'LENGTH',37,'Syntax:\nLENGTH(str)\n\nReturns the length of the string str, measured in bytes. A multi-byte\ncharacter counts as multiple bytes. This means that for a string\ncontaining five 2-byte characters, LENGTH() returns 10, whereas\nCHAR_LENGTH() returns 5.\n\nURL: https://mariadb.com/kb/en/length/\n\n','MariaDB> SELECT LENGTH(\'text\');\n -> 4\n','https://mariadb.com/kb/en/length/'),(399,'STR_TO_DATE',31,'Syntax:\nSTR_TO_DATE(str,format)\n\nThis is the inverse of the DATE_FORMAT() function. It takes a string\nstr and a format string format. STR_TO_DATE() returns a DATETIME value\nif the format string contains both date and time parts, or a DATE or\nTIME value if the string contains only date or time parts. If the date,\ntime, or datetime value extracted from str is illegal, STR_TO_DATE()\nreturns NULL and produces a warning.\n\nThe server scans str attempting to match format to it. The format\nstring can contain literal characters and format specifiers beginning\nwith %. Literal characters in format must match literally in str.\nFormat specifiers in format must match a date or time part in str. For\nthe specifiers that can be used in format, see the DATE_FORMAT()\nfunction description.\n\nMariaDB> SELECT STR_TO_DATE(\'01,5,2013\',\'%d,%m,%Y\');\n -> \'2013-05-01\'\nMariaDB> SELECT STR_TO_DATE(\'May 1, 2013\',\'%M %d,%Y\');\n -> \'2013-05-01\'\n\nScanning starts at the beginning of str and fails if format is found\nnot to match. Extra characters at the end of str are ignored.\n\nMariaDB> SELECT STR_TO_DATE(\'a09:30:17\',\'a%h:%i:%s\');\n -> \'09:30:17\'\nMariaDB> SELECT STR_TO_DATE(\'a09:30:17\',\'%h:%i:%s\');\n -> NULL\nMariaDB> SELECT STR_TO_DATE(\'09:30:17a\',\'%h:%i:%s\');\n -> \'09:30:17\'\n\nUnspecified date or time parts have a value of 0, so incompletely\nspecified values in str produce a result with some or all parts set to\n0:\n\nMariaDB> SELECT STR_TO_DATE(\'abc\',\'abc\');\n -> \'0000-00-00\'\nMariaDB> SELECT STR_TO_DATE(\'9\',\'%m\');\n -> \'0000-09-00\'\nMariaDB> SELECT STR_TO_DATE(\'9\',\'%s\');\n -> \'00:00:09\'\n\nURL: https://mariadb.com/kb/en/str_to_date/\n\n','','https://mariadb.com/kb/en/str_to_date/'),(400,'Y',11,'Y(p)\n\nReturns the Y-coordinate value for the Point object p as a\ndouble-precision number.\n\nURL: https://mariadb.com/kb/en/y/\n\n','MariaDB> SELECT Y(POINT(56.7, 53.34));\n+-----------------------+\n| Y(POINT(56.7, 53.34)) |\n+-----------------------+\n| 53.34 |\n+-----------------------+\n','https://mariadb.com/kb/en/y/'),(401,'CHECKSUM TABLE',20,'Syntax:\nCHECKSUM TABLE tbl_name [, tbl_name] ... [ QUICK | EXTENDED ]\n\nCHECKSUM TABLE reports a table checksum. This statement requires the\nSELECT privilege for the table.\n\nWith QUICK, the live table checksum is reported if it is available, or\nNULL otherwise. This is very fast. A live checksum is enabled by\nspecifying the CHECKSUM=1 table option when you create the table;\ncurrently, this is supported only for MyISAM tables. See [HELP CREATE\nTABLE].\n\nWith EXTENDED, the entire table is read row by row and the checksum is\ncalculated. This can be very slow for large tables.\n\nIf neither QUICK nor EXTENDED is specified, MySQL returns a live\nchecksum if the table storage engine supports it and scans the table\notherwise.\n\nFor a nonexistent table, CHECKSUM TABLE returns NULL and generates a\nwarning.\n\nIn MySQL 5.5, CHECKSUM TABLE returns 0 for partitioned tables unless\nyou include the EXTENDED option. This issue is resolved in MySQL 5.6.\n(Bug #11933226, Bug #60681)\n\nThe checksum value depends on the table row format. If the row format\nchanges, the checksum also changes. For example, the storage format for\nVARCHAR changed between MySQL 4.1 and 5.0, so if a 4.1 table is\nupgraded to MySQL 5.0, the checksum value may change.\n\nURL: https://mariadb.com/kb/en/checksum-table/\n\n','','https://mariadb.com/kb/en/checksum-table/'),(402,'NUMINTERIORRINGS',2,'NumInteriorRings(poly)\n\nReturns the number of interior rings in the Polygon value poly.\n\nURL: https://mariadb.com/kb/en/numinteriorrings/\n\n','MariaDB> SET @poly =\n -> \'Polygon((0 0,0 3,3 3,3 0,0 0),(1 1,1 2,2 2,2 1,1 1))\';\nMariaDB> SELECT NumInteriorRings(GeomFromText(@poly));\n+---------------------------------------+\n| NumInteriorRings(GeomFromText(@poly)) |\n+---------------------------------------+\n| 1 |\n+---------------------------------------+\n','https://mariadb.com/kb/en/numinteriorrings/'),(403,'INTERIORRINGN',2,'InteriorRingN(poly,N)\n\nReturns the N-th interior ring for the Polygon value poly as a\nLineString. Rings are numbered beginning with 1.\n\nURL: https://mariadb.com/kb/en/interiorringn/\n\n','MariaDB> SET @poly =\n -> \'Polygon((0 0,0 3,3 3,3 0,0 0),(1 1,1 2,2 2,2 1,1 1))\';\nMariaDB> SELECT AsText(InteriorRingN(GeomFromText(@poly),1));\n+----------------------------------------------+\n| AsText(InteriorRingN(GeomFromText(@poly),1)) |\n+----------------------------------------------+\n| LINESTRING(1 1,1 2,2 2,2 1,1 1) |\n+----------------------------------------------+\n','https://mariadb.com/kb/en/interiorringn/'),(404,'UTC_TIME',31,'Syntax:\nUTC_TIME, UTC_TIME()\n\nReturns the current UTC time as a value in \'HH:MM:SS\' or HHMMSS.uuuuuu\nformat, depending on whether the function is used in a string or\nnumeric context.\n\nURL: https://mariadb.com/kb/en/utc_time/\n\n','MariaDB> SELECT UTC_TIME(), UTC_TIME() + 0;\n -> \'18:07:53\', 180753.000000\n','https://mariadb.com/kb/en/utc_time/'),(405,'DROP FUNCTION',39,'The DROP FUNCTION statement is used to drop stored functions and\nuser-defined functions (UDFs):\n\no For information about dropping stored functions, see [HELP DROP\n PROCEDURE].\n\no For information about dropping user-defined functions, see [HELP DROP\n FUNCTION UDF].\n\nURL: https://mariadb.com/kb/en/drop-function/\n\n','','https://mariadb.com/kb/en/drop-function/'),(406,'ALTER EVENT',39,'Syntax:\nALTER\n [DEFINER = { user | CURRENT_USER }]\n EVENT event_name\n [ON SCHEDULE schedule]\n [ON COMPLETION [NOT] PRESERVE]\n [RENAME TO new_event_name]\n [ENABLE | DISABLE | DISABLE ON SLAVE]\n [COMMENT \'comment\']\n [DO event_body]\n\nThe ALTER EVENT statement changes one or more of the characteristics of\nan existing event without the need to drop and recreate it. The syntax\nfor each of the DEFINER, ON SCHEDULE, ON COMPLETION, COMMENT, ENABLE /\nDISABLE, and DO clauses is exactly the same as when used with CREATE\nEVENT. (See [HELP CREATE EVENT].)\n\nAny user can alter an event defined on a database for which that user\nhas the EVENT privilege. When a user executes a successful ALTER EVENT\nstatement, that user becomes the definer for the affected event.\n\nALTER EVENT works only with an existing event:\n\nMariaDB> ALTER EVENT no_such_event \n > ON SCHEDULE \n > EVERY \'2:3\' DAY_HOUR;\nERROR 1517 (HY000): Unknown event \'no_such_event\'\n\nURL: https://mariadb.com/kb/en/alter-event/\n\n','','https://mariadb.com/kb/en/alter-event/'),(407,'STDDEV',16,'Syntax:\nSTDDEV(expr)\n\nReturns the population standard deviation of expr. This function is\nprovided for compatibility with Oracle. The standard SQL function\nSTDDEV_POP() can be used instead.\n\nThis function returns NULL if there were no matching rows.\n\nURL: https://mariadb.com/kb/en/stddev/\n\n','','https://mariadb.com/kb/en/stddev/'),(408,'DATE_SUB',31,'Syntax:\nDATE_SUB(date,INTERVAL expr unit)\n\nSee the description for DATE_ADD().\n\nURL: https://mariadb.com/kb/en/date_sub/\n\n','','https://mariadb.com/kb/en/date_sub/'),(409,'PERIOD_ADD',31,'Syntax:\nPERIOD_ADD(P,N)\n\nAdds N months to period P (in the format YYMM or YYYYMM). Returns a\nvalue in the format YYYYMM. Note that the period argument P is not a\ndate value.\n\nURL: https://mariadb.com/kb/en/period_add/\n\n','MariaDB> SELECT PERIOD_ADD(200801,2);\n -> 200803\n','https://mariadb.com/kb/en/period_add/'),(410,'|',19,'Syntax:\n|\n\nBitwise OR:\n\nURL: https://mariadb.com/kb/en/bitwise-or/\n\n','MariaDB> SELECT 29 | 15;\n -> 31\n','https://mariadb.com/kb/en/bitwise-or/'),(411,'GEOMFROMTEXT',3,'GeomFromText(wkt[,srid]), GeometryFromText(wkt[,srid])\n\nConstructs a geometry value of any type using its WKT representation\nand SRID.\n\nURL: https://mariadb.com/kb/en/geomfromtext/\n\n','','https://mariadb.com/kb/en/geomfromtext/'),(412,'UUID_SHORT',14,'Syntax:\nUUID_SHORT()\n\nReturns a \"short\" universal identifier as a 64-bit unsigned integer\n(rather than a string-form 128-bit identifier as returned by the UUID()\nfunction).\n\nThe value of UUID_SHORT() is guaranteed to be unique if the following\nconditions hold:\n\no The server_id of the current host is unique among your set of master\n and slave servers\n\no server_id is between 0 and 255\n\no You do not set back your system time for your server between mysqld\n restarts\n\no You do not invoke UUID_SHORT() on average more than 16 million times\n per second between mysqld restarts\n\nThe UUID_SHORT() return value is constructed this way:\n\n (server_id & 255) << 56\n+ (server_startup_time_in_seconds << 24)\n+ incremented_variable++;\n\nURL: https://mariadb.com/kb/en/uuid_short/\n\n','MariaDB> SELECT UUID_SHORT();\n -> 92395783831158784\n','https://mariadb.com/kb/en/uuid_short/'),(413,'RIGHT',37,'Syntax:\nRIGHT(str,len)\n\nReturns the rightmost len characters from the string str, or NULL if\nany argument is NULL.\n\nURL: https://mariadb.com/kb/en/right/\n\n','MariaDB> SELECT RIGHT(\'foobarbar\', 4);\n -> \'rbar\'\n','https://mariadb.com/kb/en/right/'),(414,'DATEDIFF',31,'Syntax:\nDATEDIFF(expr1,expr2)\n\nDATEDIFF() returns expr1 - expr2 expressed as a value in days from one\ndate to the other. expr1 and expr2 are date or date-and-time\nexpressions. Only the date parts of the values are used in the\ncalculation.\n\nURL: https://mariadb.com/kb/en/datediff/\n\n','MariaDB> SELECT DATEDIFF(\'2007-12-31 23:59:59\',\'2007-12-30\');\n -> 1\nMariaDB> SELECT DATEDIFF(\'2010-11-30 23:59:59\',\'2010-12-31\');\n -> -31\n','https://mariadb.com/kb/en/datediff/'),(415,'DROP TABLESPACE',39,'Syntax:\nDROP TABLESPACE tablespace_name\n ENGINE [=] engine_name\n\nThis statement is used with NDB cluster, which is not supported by MariaDB.\n\nURL: https://mariadb.com/kb/en/drop-tablespace/\n\n','','https://mariadb.com/kb/en/drop-tablespace/'),(416,'DROP PROCEDURE',39,'Syntax:\nDROP {PROCEDURE | FUNCTION} [IF EXISTS] sp_name\n\nThis statement is used to drop a stored procedure or function. That is,\nthe specified routine is removed from the server. You must have the\nALTER ROUTINE privilege for the routine. (If the\nautomatic_sp_privileges system variable is enabled, that privilege and\nEXECUTE are granted automatically to the routine creator when the\nroutine is created and dropped from the creator when the routine is\ndropped. See\nhttps://mariadb.com/kb/en/stored-routine-privileges/.\n)\n\nThe IF EXISTS clause is a MySQL extension. It prevents an error from\noccurring if the procedure or function does not exist. A warning is\nproduced that can be viewed with SHOW WARNINGS.\n\nURL: https://mariadb.com/kb/en/drop-procedure/\n\n','','https://mariadb.com/kb/en/drop-procedure/'),(417,'CHECK TABLE',20,'Syntax:\nCHECK TABLE tbl_name [, tbl_name] ... [option] ...\n\noption = {FOR UPGRADE | QUICK | FAST | MEDIUM | EXTENDED | CHANGED}\n\nCHECK TABLE checks a table or tables for errors. CHECK TABLE works for\nInnoDB, MyISAM, ARCHIVE, and CSV tables. For MyISAM tables, the key\nstatistics are updated as well.\n\nTo check a table, you must have some privilege for it.\n\nCHECK TABLE can also check views for problems, such as tables that are\nreferenced in the view definition that no longer exist.\n\nCHECK TABLE is supported for partitioned tables, and you can use ALTER\nTABLE ... CHECK PARTITION to check one or more partitions; for more\ninformation, see [HELP ALTER TABLE].\n\nURL: https://mariadb.com/kb/en/sql-commands-check-table/\n\n','','https://mariadb.com/kb/en/sql-commands-check-table/'),(418,'BIN',37,'Syntax:\nBIN(N)\n\nReturns a string representation of the binary value of N, where N is a\nlonglong (BIGINT) number. This is equivalent to CONV(N,10,2). Returns\nNULL if N is NULL.\n\nURL: https://mariadb.com/kb/en/bin/\n\n','MariaDB> SELECT BIN(12);\n -> \'1100\'\n','https://mariadb.com/kb/en/bin/'),(419,'INSTALL PLUGIN',5,'Syntax:\nINSTALL PLUGIN plugin_name SONAME \'shared_library_name\'\n\nThis statement installs a server plugin. It requires the INSERT\nprivilege for the mysql.plugin table.\n\nplugin_name is the name of the plugin as defined in the plugin\ndescriptor structure contained in the library file (see\nhttp://dev.mysql.com/doc/refman/5.5/en/plugin-data-structures.html).\nPlugin names are not case sensitive. For maximal compatibility, plugin\nnames should be limited to ASCII letters, digits, and underscore\nbecause they are used in C source files, shell command lines, M4 and\nBourne shell scripts, and SQL environments.\n\nshared_library_name is the name of the shared library that contains the\nplugin code. The name includes the file name extension (for example,\nlibmyplugin.so, libmyplugin.dll, or libmyplugin.dylib).\n\nThe shared library must be located in the plugin directory (the\ndirectory named by the plugin_dir system variable). The library must be\nin the plugin directory itself, not in a subdirectory. By default,\nplugin_dir is the plugin directory under the directory named by the\npkglibdir configuration variable, but it can be changed by setting the\nvalue of plugin_dir at server startup. For example, set its value in a\nmy.cnf file:\n\n[mysqld]\nplugin_dir=/path/to/plugin/directory\n\nIf the value of plugin_dir is a relative path name, it is taken to be\nrelative to the MySQL base directory (the value of the basedir system\nvariable).\n\nINSTALL PLUGIN loads and initializes the plugin code to make the plugin\navailable for use. A plugin is initialized by executing its\ninitialization function, which handles any setup that the plugin must\nperform before it can be used. When the server shuts down, it executes\nthe deinitialization function for each plugin that is loaded so that\nthe plugin has a change to perform any final cleanup.\n\nINSTALL PLUGIN also registers the plugin by adding a line that\nindicates the plugin name and library file name to the mysql.plugin\ntable. At server startup, the server loads and initializes any plugin\nthat is listed in the mysql.plugin table. This means that a plugin is\ninstalled with INSTALL PLUGIN only once, not every time the server\nstarts. Plugin loading at startup does not occur if the server is\nstarted with the --skip-grant-tables option.\n\nA plugin library can contain multiple plugins. For each of them to be\ninstalled, use a separate INSTALL PLUGIN statement. Each statement\nnames a different plugin, but all of them specify the same library\nname.\n\nURL: https://mariadb.com/kb/en/install-plugin/\n\n','','https://mariadb.com/kb/en/install-plugin/'),(420,'DECLARE CURSOR',23,'Syntax:\nDECLARE cursor_name CURSOR FOR select_statement\n\nThis statement declares a cursor and associates it with a SELECT\nstatement that retrieves the rows to be traversed by the cursor. To\nfetch the rows later, use a FETCH statement. The number of columns\nretrieved by the SELECT statement must match the number of output\nvariables specified in the FETCH statement.\n\nThe SELECT statement cannot have an INTO clause.\n\nCursor declarations must appear before handler declarations and after\nvariable and condition declarations.\n\nA stored program may contain multiple cursor declarations, but each\ncursor declared in a given block must have a unique name. For an\nexample, see https://mariadb.com/kb/en/programmatic-and-compound-statements-cursors/.\n\nFor information available through SHOW statements, it is possible in\nmany cases to obtain equivalent information by using a cursor with an\nINFORMATION_SCHEMA table.\n\nURL: https://mariadb.com/kb/en/declare-cursor/\n\n','','https://mariadb.com/kb/en/declare-cursor/'),(421,'LOAD DATA',27,'Syntax:\nLOAD DATA [LOW_PRIORITY | CONCURRENT] [LOCAL] INFILE \'file_name\'\n [REPLACE | IGNORE]\n INTO TABLE tbl_name\n [CHARACTER SET charset_name]\n [{FIELDS | COLUMNS}\n [TERMINATED BY \'string\']\n [[OPTIONALLY] ENCLOSED BY \'char\']\n [ESCAPED BY \'char\']\n ]\n [LINES\n [STARTING BY \'string\']\n [TERMINATED BY \'string\']\n ]\n [IGNORE number {LINES | ROWS}]\n [(col_name_or_user_var,...)]\n [SET col_name = expr,...]\n\nThe LOAD DATA INFILE statement reads rows from a text file into a table\nat a very high speed. The file name must be given as a literal string.\n\nLOAD DATA INFILE is the complement of SELECT ... INTO OUTFILE. (See\nhttps://mariadb.com/kb/en/select-into/.) To write data\nfrom a table to a file, use SELECT ... INTO OUTFILE. To read the file\nback into a table, use LOAD DATA INFILE. The syntax of the FIELDS and\nLINES clauses is the same for both statements. Both clauses are\noptional, but FIELDS must precede LINES if both are specified.\n\nFor more information about the efficiency of INSERT versus LOAD DATA\nINFILE and speeding up LOAD DATA INFILE, see\nhttp://dev.mysql.com/doc/refman/5.5/en/insert-speed.html.\n\nThe character set indicated by the character_set_database system\nvariable is used to interpret the information in the file. SET NAMES\nand the setting of character_set_client do not affect interpretation of\ninput. If the contents of the input file use a character set that\ndiffers from the default, it is usually preferable to specify the\ncharacter set of the file by using the CHARACTER SET clause. A\ncharacter set of binary specifies \"no conversion.\"\n\nLOAD DATA INFILE interprets all fields in the file as having the same\ncharacter set, regardless of the data types of the columns into which\nfield values are loaded. For proper interpretation of file contents,\nyou must ensure that it was written with the correct character set. For\nexample, if you write a data file with mysqldump -T or by issuing a\nSELECT ... INTO OUTFILE statement in mysql, be sure to use a\n--default-character-set option with mysqldump or mysql so that output\nis written in the character set to be used when the file is loaded with\nLOAD DATA INFILE.\n\n*Note*: It is not possible to load data files that use the ucs2, utf16,\nor utf32 character set.\n\nThe character_set_filesystem system variable controls the\ninterpretation of the file name.\n\nYou can also load data files by using the mysqlimport utility; it\noperates by sending a LOAD DATA INFILE statement to the server. The\n--local option causes mysqlimport to read data files from the client\nhost. You can specify the --compress option to get better performance\nover slow networks if the client and server support the compressed\nprotocol. See https://mariadb.com/kb/en/mysqlimport/.\n\nIf you use LOW_PRIORITY, execution of the LOAD DATA statement is\ndelayed until no other clients are reading from the table. This affects\nonly storage engines that use only table-level locking (such as MyISAM,\nMEMORY, and MERGE).\n\nIf you specify CONCURRENT with a MyISAM table that satisfies the\ncondition for concurrent inserts (that is, it contains no free blocks\nin the middle), other threads can retrieve data from the table while\nLOAD DATA is executing. Using this option affects the performance of\nLOAD DATA a bit, even if no other thread is using the table at the same\ntime.\n\nPrior to MySQL 5.5.1, CONCURRENT was not replicated when using\nstatement-based replication (see Bug #34628). However, it is replicated\nwhen using row-based replication, regardless of the version. See\nhttp://dev.mysql.com/doc/refman/5.5/en/replication-features-load-data.h\ntml, for more information.\n\nThe LOCAL keyword, if specified, is interpreted with respect to the\nclient end of the connection:\n\no If LOCAL is specified, the file is read by the client program on the\n client host and sent to the server. The file can be given as a full\n path name to specify its exact location. If given as a relative path\n name, the name is interpreted relative to the directory in which the\n client program was started.\n\n When using LOCAL with LOAD DATA, a copy of the file is created in the\n server\'s temporary directory. This is not the directory determined by\n the value of tmpdir or slave_load_tmpdir, but rather the operating\n system\'s temporary directory, and is not configurable in the MySQL\n Server. (Typically the system temporary directory is /tmp on Linux\n systems and C:\\WINDOWS\\TEMP on Windows.) Lack of sufficient space for\n the copy in this directory can cause the LOAD DATA LOCAL statement to\n fail.\n\no If LOCAL is not specified, the file must be located on the server\n host and is read directly by the server. The server uses the\n following rules to locate the file:\n\n o If the file name is an absolute path name, the server uses it as\n given.\n\n o If the file name is a relative path name with one or more leading\n components, the server searches for the file relative to the\n server\'s data directory.\n\n o If a file name with no leading components is given, the server\n looks for the file in the database directory of the default\n database.\n\nNote that, in the non-LOCAL case, these rules mean that a file named as\n./myfile.txt is read from the server\'s data directory, whereas the file\nnamed as myfile.txt is read from the database directory of the default\ndatabase. For example, if db1 is the default database, the following\nLOAD DATA statement reads the file data.txt from the database directory\nfor db1, even though the statement explicitly loads the file into a\ntable in the db2 database:\n\nLOAD DATA INFILE \'data.txt\' INTO TABLE db2.my_table;\n\nWindows path names are specified using forward slashes rather than\nbackslashes. If you do use backslashes, you must double them.\n\nFor security reasons, when reading text files located on the server,\nthe files must either reside in the database directory or be readable\nby all. Also, to use LOAD DATA INFILE on server files, you must have\nthe FILE privilege. See\nhttps://mariadb.com/kb/en/grant/. For\nnon-LOCAL load operations, if the secure_file_priv system variable is\nset to a nonempty directory name, the file to be loaded must be located\nin that directory.\n\nURL: https://mariadb.com/kb/en/load-data-infile/\n\n','','https://mariadb.com/kb/en/load-data-infile/'),(422,'MULTILINESTRING',24,'MultiLineString(ls1,ls2,...)\n\nConstructs a MultiLineString value using LineString or WKB LineString\narguments.\n\nURL: https://mariadb.com/kb/en/multilinestring/\n\n','','https://mariadb.com/kb/en/multilinestring/'),(423,'LOCALTIME',31,'Syntax:\nLOCALTIME, LOCALTIME()\n\nLOCALTIME and LOCALTIME() are synonyms for NOW().\n\nURL: https://mariadb.com/kb/en/localtime/\n\n','','https://mariadb.com/kb/en/localtime/'),(424,'SHOW RELAYLOG EVENTS',26,'Syntax:\nSHOW RELAYLOG EVENTS\n [IN \'log_name\'] [FROM pos] [LIMIT [offset,] row_count]\n\nShows the events in the relay log of a replication slave. If you do not\nspecify \'log_name\', the first relay log is displayed. This statement\nhas no effect on the master.\n\nURL: https://mariadb.com/kb/en/show-relaylog-events/\n\n','','https://mariadb.com/kb/en/show-relaylog-events/'),(425,'MPOINTFROMTEXT',3,'MPointFromText(wkt[,srid]), MultiPointFromText(wkt[,srid])\n\nConstructs a MULTIPOINT value using its WKT representation and SRID.\n\nURL: https://mariadb.com/kb/en/mpointfromtext/\n\n','','https://mariadb.com/kb/en/mpointfromtext/'),(426,'BLOB',22,'BLOB[(M)]\n\nA BLOB column with a maximum length of 65,535 (216 - 1) bytes. Each\nBLOB value is stored using a 2-byte length prefix that indicates the\nnumber of bytes in the value.\n\nAn optional length M can be given for this type. If this is done, MySQL\ncreates the column as the smallest BLOB type large enough to hold\nvalues M bytes long.\n\nURL: https://mariadb.com/kb/en/blob/\n\n','','https://mariadb.com/kb/en/blob/'),(427,'SHA1',12,'Syntax:\nSHA1(str), SHA(str)\n\nCalculates an SHA-1 160-bit checksum for the string, as described in\nRFC 3174 (Secure Hash Algorithm). The value is returned as a string of\n40 hex digits, or NULL if the argument was NULL. One of the possible\nuses for this function is as a hash key. See the notes at the beginning\nof this section about storing hash values efficiently. You can also use\nSHA1() as a cryptographic function for storing passwords. SHA() is\nsynonymous with SHA1().\n\nAs of MySQL 5.5.3, the return value is a nonbinary string in the\nconnection character set. Before 5.5.3, the return value is a binary\nstring; see the notes at the beginning of this section about using the\nvalue as a nonbinary string.\n\nURL: https://mariadb.com/kb/en/sha1/\n\n','MariaDB> SELECT SHA1(\'abc\');\n -> \'a9993e364706816aba3e25717850c26c9cd0d89d\'\n','https://mariadb.com/kb/en/sha1/'),(428,'SUBSTR',37,'Syntax:\nSUBSTR(str,pos), SUBSTR(str FROM pos), SUBSTR(str,pos,len), SUBSTR(str\nFROM pos FOR len)\n\nSUBSTR() is a synonym for SUBSTRING().\n\nURL: https://mariadb.com/kb/en/substr/\n\n','','https://mariadb.com/kb/en/substr/'),(429,'PASSWORD',12,'Syntax:\nPASSWORD(str)\n\nCalculates and returns a hashed password string from the plaintext\npassword str and returns a nonbinary string in the connection character\nset (a binary string before MySQL 5.5.3), or NULL if the argument is\nNULL. This function is the SQL interface to the algorithm used by the\nserver to encrypt MySQL passwords for storage in the mysql.user grant\ntable.\n\nThe password hashing method used by PASSWORD() depends on the value of\nthe old_passwords system variable:\n\nURL: https://mariadb.com/kb/en/password/\n\n','MariaDB> SET old_passwords = 0;\nMariaDB> SELECT PASSWORD(\'mypass\');\n+-------------------------------------------+\n| PASSWORD(\'mypass\') |\n+-------------------------------------------+\n| *6C8989366EAF75BB670AD8EA7A7FC1176A95CEF4 |\n+-------------------------------------------+\n\nMariaDB> SET old_passwords = 1;\nMariaDB> SELECT PASSWORD(\'mypass\');\n+--------------------+\n| PASSWORD(\'mypass\') |\n+--------------------+\n| 6f8c114b58f2ce9e |\n+--------------------+\n','https://mariadb.com/kb/en/password/'),(430,'CHAR',22,'[NATIONAL] CHAR[(M)] [CHARACTER SET charset_name] [COLLATE\ncollation_name]\n\nA fixed-length string that is always right-padded with spaces to the\nspecified length when stored. M represents the column length in\ncharacters. The range of M is 0 to 255. If M is omitted, the length is\n1.\n\n*Note*: Trailing spaces are removed when CHAR values are retrieved\nunless the PAD_CHAR_TO_FULL_LENGTH SQL mode is enabled.\n\nURL: https://mariadb.com/kb/en/char/\n\n','','https://mariadb.com/kb/en/char/'),(431,'UTC_DATE',31,'Syntax:\nUTC_DATE, UTC_DATE()\n\nReturns the current UTC date as a value in \'YYYY-MM-DD\' or YYYYMMDD\nformat, depending on whether the function is used in a string or\nnumeric context.\n\nURL: https://mariadb.com/kb/en/utc_date/\n\n','MariaDB> SELECT UTC_DATE(), UTC_DATE() + 0;\n -> \'2003-08-14\', 20030814\n','https://mariadb.com/kb/en/utc_date/'),(432,'DIMENSION',36,'Dimension(g)\n\nReturns the inherent dimension of the geometry value g. The result can\nbe -1, 0, 1, or 2. The meaning of these values is given in\nhttps://mariadb.com/kb/en/dimension/.\n\nURL: https://mariadb.com/kb/en/dimension/\n\n','MariaDB> SELECT Dimension(GeomFromText(\'LineString(1 1,2 2)\'));\n+------------------------------------------------+\n| Dimension(GeomFromText(\'LineString(1 1,2 2)\')) |\n+------------------------------------------------+\n| 1 |\n+------------------------------------------------+\n','https://mariadb.com/kb/en/dimension/'),(433,'COUNT DISTINCT',16,'Syntax:\nCOUNT(DISTINCT expr,[expr...])\n\nReturns a count of the number of rows with different non-NULL expr\nvalues.\n\nCOUNT(DISTINCT) returns 0 if there were no matching rows.\n\nURL: https://mariadb.com/kb/en/count-distinct/\n\n','MariaDB> SELECT COUNT(DISTINCT results) FROM student;\n','https://mariadb.com/kb/en/count-distinct/'),(434,'BIT',22,'BIT[(M)]\n\nA bit-field type. M indicates the number of bits per value, from 1 to\n64. The default is 1 if M is omitted.\n\nURL: https://mariadb.com/kb/en/bit/\n\n','','https://mariadb.com/kb/en/bit/'),(435,'EQUALS',30,'Equals(g1,g2)\n\nReturns 1 or 0 to indicate whether g1 is spatially equal to g2.\n\nURL: https://mariadb.com/kb/en/equals/\n\n','','https://mariadb.com/kb/en/equals/'),(436,'SHOW CREATE VIEW',26,'Syntax:\nSHOW CREATE VIEW view_name\n\nThis statement shows a CREATE VIEW statement that creates the given\nview.\n\nURL: https://mariadb.com/kb/en/show-create-view/\n\n','','https://mariadb.com/kb/en/show-create-view/'),(437,'INTERVAL',18,'Syntax:\nINTERVAL(N,N1,N2,N3,...)\n\nReturns 0 if N < N1, 1 if N < N2 and so on or -1 if N is NULL. All\narguments are treated as integers. It is required that N1 < N2 < N3 <\n... < Nn for this function to work correctly. This is because a binary\nsearch is used (very fast).\n\nURL: https://mariadb.com/kb/en/interval/\n\n','MariaDB> SELECT INTERVAL(23, 1, 15, 17, 30, 44, 200);\n -> 3\nMariaDB> SELECT INTERVAL(10, 1, 10, 100, 1000);\n -> 2\nMariaDB> SELECT INTERVAL(22, 23, 30, 44, 200);\n -> 0\n','https://mariadb.com/kb/en/interval/'),(438,'FROM_DAYS',31,'Syntax:\nFROM_DAYS(N)\n\nGiven a day number N, returns a DATE value.\n\nURL: https://mariadb.com/kb/en/from_days/\n\n','MariaDB> SELECT FROM_DAYS(730669);\n -> \'2007-07-03\'\n','https://mariadb.com/kb/en/from_days/'),(439,'ALTER PROCEDURE',39,'Syntax:\nALTER PROCEDURE proc_name [characteristic ...]\n\ncharacteristic:\n COMMENT \'string\'\n | LANGUAGE SQL\n | { CONTAINS SQL | NO SQL | READS SQL DATA | MODIFIES SQL DATA }\n | SQL SECURITY { DEFINER | INVOKER }\n\nThis statement can be used to change the characteristics of a stored\nprocedure. More than one change may be specified in an ALTER PROCEDURE\nstatement. However, you cannot change the parameters or body of a\nstored procedure using this statement; to make such changes, you must\ndrop and re-create the procedure using DROP PROCEDURE and CREATE\nPROCEDURE.\n\nYou must have the ALTER ROUTINE privilege for the procedure. By\ndefault, that privilege is granted automatically to the procedure\ncreator. This behavior can be changed by disabling the\nautomatic_sp_privileges system variable. See\nhttps://mariadb.com/kb/en/stored-routine-privileges/.\n\nURL: https://mariadb.com/kb/en/alter-procedure/\n\n','','https://mariadb.com/kb/en/alter-procedure/'),(440,'BIT_COUNT',19,'Syntax:\nBIT_COUNT(N)\n\nReturns the number of bits that are set in the argument N.\n\nURL: https://mariadb.com/kb/en/bit_count/\n\n','MariaDB> SELECT BIT_COUNT(29), BIT_COUNT(b\'101010\');\n -> 4, 3\n','https://mariadb.com/kb/en/bit_count/'),(441,'OCTET_LENGTH',37,'Syntax:\nOCTET_LENGTH(str)\n\nOCTET_LENGTH() is a synonym for LENGTH().\n\nURL: https://mariadb.com/kb/en/octet_length/\n\n','','https://mariadb.com/kb/en/octet_length/'),(442,'UTC_TIMESTAMP',31,'Syntax:\nUTC_TIMESTAMP, UTC_TIMESTAMP()\n\nReturns the current UTC date and time as a value in \'YYYY-MM-DD\nHH:MM:SS\' or YYYYMMDDHHMMSS.uuuuuu format, depending on whether the\nfunction is used in a string or numeric context.\n\nURL: https://mariadb.com/kb/en/utc_timestamp/\n\n','MariaDB> SELECT UTC_TIMESTAMP(), UTC_TIMESTAMP() + 0;\n -> \'2003-08-14 18:08:04\', 20030814180804.000000\n','https://mariadb.com/kb/en/utc_timestamp/'),(443,'AES_ENCRYPT',12,'Syntax:\nAES_ENCRYPT(str,key_str)\n\nAES_ENCRYPT() and AES_DECRYPT() enable encryption and decryption of\ndata using the official AES (Advanced Encryption Standard) algorithm,\npreviously known as \"Rijndael.\" Encoding with a 128-bit key length is\nused, but you can extend it up to 256 bits by modifying the source. We\nchose 128 bits because it is much faster and it is secure enough for\nmost purposes.\n\nAES_ENCRYPT() encrypts a string and returns a binary string.\nAES_DECRYPT() decrypts the encrypted string and returns the original\nstring. The input arguments may be any length. If either argument is\nNULL, the result of this function is also NULL.\n\nBecause AES is a block-level algorithm, padding is used to encode\nuneven length strings and so the result string length may be calculated\nusing this formula:\n\n16 * (trunc(string_length / 16) + 1)\n\nIf AES_DECRYPT() detects invalid data or incorrect padding, it returns\nNULL. However, it is possible for AES_DECRYPT() to return a non-NULL\nvalue (possibly garbage) if the input data or the key is invalid.\n\nYou can use the AES functions to store data in an encrypted form by\nmodifying your queries:\n\nURL: https://mariadb.com/kb/en/aes_encrypt/\n\n','INSERT INTO t VALUES (1,AES_ENCRYPT(\'text\',\'password\'));\n','https://mariadb.com/kb/en/aes_encrypt/'),(444,'+',4,'Syntax:\n+\n\nAddition:\n\nURL: https://mariadb.com/kb/en/addition-operator/\n\n','MariaDB> SELECT 3+5;\n -> 8\n','https://mariadb.com/kb/en/addition-operator/'),(445,'INET_NTOA',14,'Syntax:\nINET_NTOA(expr)\n\nGiven a numeric IPv4 network address in network byte order, returns the\ndotted-quad representation of the address as a string. INET_NTOA()\nreturns NULL if it does not understand its argument.\n\nAs of MySQL 5.5.3, the return value is a nonbinary string in the\nconnection character set. Before 5.5.3, the return value is a binary\nstring.\n\nURL: https://mariadb.com/kb/en/inet_ntoa/\n\n','MariaDB> SELECT INET_NTOA(167773449);\n -> \'10.0.5.9\'\n','https://mariadb.com/kb/en/inet_ntoa/'),(446,'ACOS',4,'Syntax:\nACOS(X)\n\nReturns the arc cosine of X, that is, the value whose cosine is X.\nReturns NULL if X is not in the range -1 to 1.\n\nURL: https://mariadb.com/kb/en/acos/\n\n','MariaDB> SELECT ACOS(1);\n -> 0\nMariaDB> SELECT ACOS(1.0001);\n -> NULL\nMariaDB> SELECT ACOS(0);\n -> 1.5707963267949\n','https://mariadb.com/kb/en/acos/'),(447,'ISOLATION',8,'Syntax:\nSET [GLOBAL | SESSION] TRANSACTION ISOLATION LEVEL\n {\n REPEATABLE READ\n | READ COMMITTED\n | READ UNCOMMITTED\n | SERIALIZABLE\n }\n\nThis statement sets the transaction isolation level, used for\noperations on InnoDB tables.\n\nScope of the Isolation Level\n\nYou can set the isolation level globally, for the current session, or\nfor the next transaction:\n\no With the GLOBAL keyword, the statement sets the default transaction\n level globally for all subsequent sessions. Existing sessions are\n unaffected.\n\no With the SESSION keyword, the statement sets the default transaction\n level for all subsequent transactions performed within the current\n session.\n\no Without any SESSION or GLOBAL keyword, the statement sets the\n isolation level for the next (not started) transaction performed\n within the current session.\n\nA change to the global default isolation level requires the SUPER\nprivilege. Any session is free to change its session isolation level\n(even in the middle of a transaction), or the isolation level for its\nnext transaction.\n\nSET TRANSACTION ISOLATION LEVEL without GLOBAL or SESSION is not\npermitted while there is an active transaction:\n\nMariaDB> START TRANSACTION;\nQuery OK, 0 rows affected (0.02 sec)\n\nMariaDB> SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;\nERROR 1568 (25001): Transaction isolation level can\'t be changed\nwhile a transaction is in progress\n\nTo set the global default isolation level at server startup, use the\n--transaction-isolation=level option to mysqld on the command line or\nin an option file. Values of level for this option use dashes rather\nthan spaces, so the permissible values are READ-UNCOMMITTED,\nREAD-COMMITTED, REPEATABLE-READ, or SERIALIZABLE. For example, to set\nthe default isolation level to REPEATABLE READ, use these lines in the\n[mysqld] section of an option file:\n\n[mysqld]\ntransaction-isolation = REPEATABLE-READ\n\nIt is possible to check or set the global and session transaction\nisolation levels at runtime by using the tx_isolation system variable:\n\nSELECT @@GLOBAL.tx_isolation, @@tx_isolation;\nSET GLOBAL tx_isolation=\'REPEATABLE-READ\';\nSET SESSION tx_isolation=\'SERIALIZABLE\';\n\nDetails and Usage of Isolation Levels\n\nInnoDB supports each of the transaction isolation levels described here\nusing different locking strategies. You can enforce a high degree of\nconsistency with the default REPEATABLE READ level, for operations on\ncrucial data where ACID compliance is important. Or you can relax the\nconsistency rules with READ COMMITTED or even READ UNCOMMITTED, in\nsituations such as bulk reporting where precise consistency and\nrepeatable results are less important than minimizing the amount of\noverhead for locking. SERIALIZABLE enforces even stricter rules than\nREPEATABLE READ, and is used mainly in specialized situations, such as\nwith XA transactions and for troubleshooting issues with concurrency\nand deadlocks.\n\nFor full information about how these isolation levels work with InnoDB\ntransactions, see\nhttp://dev.mysql.com/doc/refman/5.1/en/innodb-transaction-model.html.\nIn particular, for additional information about InnoDB record-level\nlocks and how it uses them to execute various types of statements, see\nhttp://dev.mysql.com/doc/refman/5.5/en/innodb-record-level-locks.html\nand http://dev.mysql.com/doc/refman/5.5/en/innodb-locks-set.html.\n\nThe following list describes how MySQL supports the different\ntransaction levels. The list goes from the most commonly used level to\nthe least used.\n\no REPEATABLE READ\n\n This is the default isolation level for InnoDB. For consistent reads,\n there is an important difference from the READ COMMITTED isolation\n level: All consistent reads within the same transaction read the\n snapshot established by the first read. This convention means that if\n you issue several plain (nonlocking) SELECT statements within the\n same transaction, these SELECT statements are consistent also with\n respect to each other. See\n http://dev.mysql.com/doc/refman/5.5/en/innodb-consistent-read.html.\n\n For locking reads (SELECT with FOR UPDATE or LOCK IN SHARE MODE),\n UPDATE, and DELETE statements, locking depends on whether the\n statement uses a unique index with a unique search condition, or a\n range-type search condition. For a unique index with a unique search\n condition, InnoDB locks only the index record found, not the gap\n before it. For other search conditions, InnoDB locks the index range\n scanned, using gap locks or next-key (gap plus index-record) locks to\n block insertions by other sessions into the gaps covered by the\n range.\n\no READ COMMITTED\n\n A somewhat Oracle-like isolation level with respect to consistent\n (nonlocking) reads: Each consistent read, even within the same\n transaction, sets and reads its own fresh snapshot. See\n http://dev.mysql.com/doc/refman/5.5/en/innodb-consistent-read.html.\n\n For locking reads (SELECT with FOR UPDATE or LOCK IN SHARE MODE),\n InnoDB locks only index records, not the gaps before them, and thus\n permits the free insertion of new records next to locked records. For\n UPDATE and DELETE statements, locking depends on whether the\n statement uses a unique index with a unique search condition (such as\n WHERE id = 100), or a range-type search condition (such as WHERE id >\n 100). For a unique index with a unique search condition, InnoDB locks\n only the index record found, not the gap before it. For range-type\n searches, InnoDB locks the index range scanned, using gap locks or\n next-key (gap plus index-record) locks to block insertions by other\n sessions into the gaps covered by the range. This is necessary\n because \"phantom rows\" must be blocked for MySQL replication and\n recovery to work.\n\n *Note*: In MySQL 5.5, if the READ COMMITTED isolation level is used\n or the innodb_locks_unsafe_for_binlog system variable is enabled,\n there is no InnoDB gap locking except for foreign-key constraint\n checking and duplicate-key checking. Also, record locks for\n nonmatching rows are released after MySQL has evaluated the WHERE\n condition. If you use READ COMMITTED or enable\n innodb_locks_unsafe_for_binlog, you must use row-based binary\n logging.\n\no READ UNCOMMITTED\n\n SELECT statements are performed in a nonlocking fashion, but a\n possible earlier version of a row might be used. Thus, using this\n isolation level, such reads are not consistent. This is also called a\n \"dirty read.\" Otherwise, this isolation level works like READ\n COMMITTED.\n\no SERIALIZABLE\n\n This level is like REPEATABLE READ, but InnoDB implicitly converts\n all plain SELECT statements to SELECT ... LOCK IN SHARE MODE if\n autocommit is disabled. If autocommit is enabled, the SELECT is its\n own transaction. It therefore is known to be read only and can be\n serialized if performed as a consistent (nonlocking) read and need\n not block for other transactions. (To force a plain SELECT to block\n if other transactions have modified the selected rows, disable\n autocommit.)\n\nURL: https://mariadb.com/kb/en/set-transaction-isolation-level/\n\n','','https://mariadb.com/kb/en/set-transaction-isolation-level/'),(448,'CEILING',4,'Syntax:\nCEILING(X)\n\nReturns the smallest integer value not less than X.\n\nURL: https://mariadb.com/kb/en/ceiling/\n\n','MariaDB> SELECT CEILING(1.23);\n -> 2\nMariaDB> SELECT CEILING(-1.23);\n -> -1\n','https://mariadb.com/kb/en/ceiling/'),(449,'SIN',4,'Syntax:\nSIN(X)\n\nReturns the sine of X, where X is given in radians.\n\nURL: https://mariadb.com/kb/en/sin/\n\n','MariaDB> SELECT SIN(PI());\n -> 1.2246063538224e-16\nMariaDB> SELECT ROUND(SIN(PI()));\n -> 0\n','https://mariadb.com/kb/en/sin/'),(450,'DAYOFWEEK',31,'Syntax:\nDAYOFWEEK(date)\n\nReturns the weekday index for date (1 = Sunday, 2 = Monday, ..., 7 =\nSaturday). These index values correspond to the ODBC standard.\n\nURL: https://mariadb.com/kb/en/dayofweek/\n\n','MariaDB> SELECT DAYOFWEEK(\'2007-02-03\');\n -> 7\n','https://mariadb.com/kb/en/dayofweek/'),(451,'SHOW PROCESSLIST',26,'Syntax:\nSHOW [FULL] PROCESSLIST\n\nSHOW PROCESSLIST shows you which threads are running. You can also get\nthis information from the INFORMATION_SCHEMA PROCESSLIST table or the\nmysqladmin processlist command. If you have the PROCESS privilege, you\ncan see all threads. Otherwise, you can see only your own threads (that\nis, threads associated with the MySQL account that you are using). If\nyou do not use the FULL keyword, only the first 100 characters of each\nstatement are shown in the Info field.\n\nURL: https://mariadb.com/kb/en/show-processlist/\n\n','','https://mariadb.com/kb/en/show-processlist/'),(452,'LINEFROMWKB',32,'LineFromWKB(wkb[,srid]), LineStringFromWKB(wkb[,srid])\n\nConstructs a LINESTRING value using its WKB representation and SRID.\n\nURL: https://mariadb.com/kb/en/linefromwkb/\n\n','','https://mariadb.com/kb/en/linefromwkb/'),(453,'GEOMETRYTYPE',36,'GeometryType(g)\n\nReturns as a binary string the name of the geometry type of which the\ngeometry instance g is a member. The name corresponds to one of the\ninstantiable Geometry subclasses.\n\nURL: https://mariadb.com/kb/en/geometrytype/\n\n','MariaDB> SELECT GeometryType(GeomFromText(\'POINT(1 1)\'));\n+------------------------------------------+\n| GeometryType(GeomFromText(\'POINT(1 1)\')) |\n+------------------------------------------+\n| POINT |\n+------------------------------------------+\n','https://mariadb.com/kb/en/geometrytype/'),(454,'CREATE VIEW',39,'Syntax:\nCREATE\n [OR REPLACE]\n [ALGORITHM = {UNDEFINED | MERGE | TEMPTABLE}]\n [DEFINER = { user | CURRENT_USER }]\n [SQL SECURITY { DEFINER | INVOKER }]\n VIEW view_name [(column_list)]\n AS select_statement\n [WITH [CASCADED | LOCAL] CHECK OPTION]\n\nThe CREATE VIEW statement creates a new view, or replaces an existing\none if the OR REPLACE clause is given. If the view does not exist,\nCREATE OR REPLACE VIEW is the same as CREATE VIEW. If the view does\nexist, CREATE OR REPLACE VIEW is the same as ALTER VIEW.\n\nThe select_statement is a SELECT statement that provides the definition\nof the view. (When you select from the view, you select in effect using\nthe SELECT statement.) select_statement can select from base tables or\nother views.\n\nThe view definition is \"frozen\" at creation time, so changes to the\nunderlying tables afterward do not affect the view definition. For\nexample, if a view is defined as SELECT * on a table, new columns added\nto the table later do not become part of the view.\n\nThe ALGORITHM clause affects how MySQL processes the view. The DEFINER\nand SQL SECURITY clauses specify the security context to be used when\nchecking access privileges at view invocation time. The WITH CHECK\nOPTION clause can be given to constrain inserts or updates to rows in\ntables referenced by the view. These clauses are described later in\nthis section.\n\nThe CREATE VIEW statement requires the CREATE VIEW privilege for the\nview, and some privilege for each column selected by the SELECT\nstatement. For columns used elsewhere in the SELECT statement you must\nhave the SELECT privilege. If the OR REPLACE clause is present, you\nmust also have the DROP privilege for the view. CREATE VIEW might also\nrequire the SUPER privilege, depending on the DEFINER value, as\ndescribed later in this section.\n\nWhen a view is referenced, privilege checking occurs as described later\nin this section.\n\nA view belongs to a database. By default, a new view is created in the\ndefault database. To create the view explicitly in a given database,\nspecify the name as db_name.view_name when you create it:\n\nMariaDB> CREATE VIEW test.v AS SELECT * FROM t;\n\nWithin a database, base tables and views share the same namespace, so a\nbase table and a view cannot have the same name.\n\nColumns retrieved by the SELECT statement can be simple references to\ntable columns. They can also be expressions that use functions,\nconstant values, operators, and so forth.\n\nViews must have unique column names with no duplicates, just like base\ntables. By default, the names of the columns retrieved by the SELECT\nstatement are used for the view column names. To define explicit names\nfor the view columns, the optional column_list clause can be given as a\nlist of comma-separated identifiers. The number of names in column_list\nmust be the same as the number of columns retrieved by the SELECT\nstatement.\n\nUnqualified table or view names in the SELECT statement are interpreted\nwith respect to the default database. A view can refer to tables or\nviews in other databases by qualifying the table or view name with the\nproper database name.\n\nA view can be created from many kinds of SELECT statements. It can\nrefer to base tables or other views. It can use joins, UNION, and\nsubqueries. The SELECT need not even refer to any tables. The following\nexample defines a view that selects two columns from another table, as\nwell as an expression calculated from those columns:\n\nMariaDB> CREATE TABLE t (qty INT, price INT);\nMariaDB> INSERT INTO t VALUES(3, 50);\nMariaDB> CREATE VIEW v AS SELECT qty, price, qty*price AS value FROM t;\nMariaDB> SELECT * FROM v;\n+------+-------+-------+\n| qty | price | value |\n+------+-------+-------+\n| 3 | 50 | 150 |\n+------+-------+-------+\n\nA view definition is subject to the following restrictions:\n\no The SELECT statement cannot contain a subquery in the FROM clause.\n\no The SELECT statement cannot refer to system or user variables.\n\no Within a stored program, the definition cannot refer to program\n parameters or local variables.\n\no The SELECT statement cannot refer to prepared statement parameters.\n\no Any table or view referred to in the definition must exist. However,\n after a view has been created, it is possible to drop a table or view\n that the definition refers to. In this case, use of the view results\n in an error. To check a view definition for problems of this kind,\n use the CHECK TABLE statement.\n\no The definition cannot refer to a TEMPORARY table, and you cannot\n create a TEMPORARY view.\n\no Any tables named in the view definition must exist at definition\n time.\n\no You cannot associate a trigger with a view.\n\no Aliases for column names in the SELECT statement are checked against\n the maximum column length of 64 characters (not the maximum alias\n length of 256 characters).\n\nORDER BY is permitted in a view definition, but it is ignored if you\nselect from a view using a statement that has its own ORDER BY.\n\nFor other options or clauses in the definition, they are added to the\noptions or clauses of the statement that references the view, but the\neffect is undefined. For example, if a view definition includes a LIMIT\nclause, and you select from the view using a statement that has its own\nLIMIT clause, it is undefined which limit applies. This same principle\napplies to options such as ALL, DISTINCT, or SQL_SMALL_RESULT that\nfollow the SELECT keyword, and to clauses such as INTO, FOR UPDATE,\nLOCK IN SHARE MODE, and PROCEDURE.\n\nIf you create a view and then change the query processing environment\nby changing system variables, that may affect the results that you get\nfrom the view:\n\nMariaDB> CREATE VIEW v (mycol) AS SELECT \'abc\';\nQuery OK, 0 rows affected (0.01 sec)\n\nMariaDB> SET sql_mode = \'\';\nQuery OK, 0 rows affected (0.00 sec)\n\nMariaDB> SELECT \"mycol\" FROM v;\n+-------+\n| mycol |\n+-------+\n| mycol |\n+-------+\n1 row in set (0.01 sec)\n\nMariaDB> SET sql_mode = \'ANSI_QUOTES\';\nQuery OK, 0 rows affected (0.00 sec)\n\nMariaDB> SELECT \"mycol\" FROM v;\n+-------+\n| mycol |\n+-------+\n| abc |\n+-------+\n1 row in set (0.00 sec)\n\nThe DEFINER and SQL SECURITY clauses determine which MySQL account to\nuse when checking access privileges for the view when a statement is\nexecuted that references the view. The valid SQL SECURITY\ncharacteristic values are DEFINER and INVOKER. These indicate that the\nrequired privileges must be held by the user who defined or invoked the\nview, respectively. The default SQL SECURITY value is DEFINER.\n\nIf a user value is given for the DEFINER clause, it should be a MySQL\naccount specified as \'user_name\'@\'host_name\' (the same format used in\nthe GRANT statement), CURRENT_USER, or CURRENT_USER(). The default\nDEFINER value is the user who executes the CREATE VIEW statement. This\nis the same as specifying DEFINER = CURRENT_USER explicitly.\n\nIf you specify the DEFINER clause, these rules determine the valid\nDEFINER user values:\n\no If you do not have the SUPER privilege, the only valid user value is\n your own account, either specified literally or by using\n CURRENT_USER. You cannot set the definer to some other account.\n\no If you have the SUPER privilege, you can specify any syntactically\n valid account name. If the account does not actually exist, a warning\n is generated.\n\no Although it is possible to create a view with a nonexistent DEFINER\n account, an error occurs when the view is referenced if the SQL\n SECURITY value is DEFINER but the definer account does not exist.\n\nFor more information about view security, see\nhttps://mariadb.com/kb/en/stored-routine-privileges/.\n\nWithin a view definition, CURRENT_USER returns the view\'s DEFINER value\nby default. For views defined with the SQL SECURITY INVOKER\ncharacteristic, CURRENT_USER returns the account for the view\'s\ninvoker. For information about user auditing within views, see\nhttp://dev.mysql.com/doc/refman/5.5/en/account-activity-auditing.html.\n\nWithin a stored routine that is defined with the SQL SECURITY DEFINER\ncharacteristic, CURRENT_USER returns the routine\'s DEFINER value. This\nalso affects a view defined within such a routine, if the view\ndefinition contains a DEFINER value of CURRENT_USER.\n\nView privileges are checked like this:\n\no At view definition time, the view creator must have the privileges\n needed to use the top-level objects accessed by the view. For\n example, if the view definition refers to table columns, the creator\n must have some privilege for each column in the select list of the\n definition, and the SELECT privilege for each column used elsewhere\n in the definition. If the definition refers to a stored function,\n only the privileges needed to invoke the function can be checked. The\n privileges required at function invocation time can be checked only\n as it executes: For different invocations, different execution paths\n within the function might be taken.\n\no The user who references a view must have appropriate privileges to\n access it (SELECT to select from it, INSERT to insert into it, and so\n forth.)\n\no When a view has been referenced, privileges for objects accessed by\n the view are checked against the privileges held by the view DEFINER\n account or invoker, depending on whether the SQL SECURITY\n characteristic is DEFINER or INVOKER, respectively.\n\no If reference to a view causes execution of a stored function,\n privilege checking for statements executed within the function depend\n on whether the function SQL SECURITY characteristic is DEFINER or\n INVOKER. If the security characteristic is DEFINER, the function runs\n with the privileges of the DEFINER account. If the characteristic is\n INVOKER, the function runs with the privileges determined by the\n view\'s SQL SECURITY characteristic.\n\nExample: A view might depend on a stored function, and that function\nmight invoke other stored routines. For example, the following view\ninvokes a stored function f():\n\nCREATE VIEW v AS SELECT * FROM t WHERE t.id = f(t.name);\n\nSuppose that f() contains a statement such as this:\n\nIF name IS NULL then\n CALL p1();\nELSE\n CALL p2();\nEND IF;\n\nThe privileges required for executing statements within f() need to be\nchecked when f() executes. This might mean that privileges are needed\nfor p1() or p2(), depending on the execution path within f(). Those\nprivileges must be checked at runtime, and the user who must possess\nthe privileges is determined by the SQL SECURITY values of the view v\nand the function f().\n\nThe DEFINER and SQL SECURITY clauses for views are extensions to\nstandard SQL. In standard SQL, views are handled using the rules for\nSQL SECURITY DEFINER. The standard says that the definer of the view,\nwhich is the same as the owner of the view\'s schema, gets applicable\nprivileges on the view (for example, SELECT) and may grant them. MySQL\nhas no concept of a schema \"owner\", so MySQL adds a clause to identify\nthe definer. The DEFINER clause is an extension where the intent is to\nhave what the standard has; that is, a permanent record of who defined\nthe view. This is why the default DEFINER value is the account of the\nview creator.\n\nThe optional ALGORITHM clause is a MySQL extension to standard SQL. It\naffects how MySQL processes the view. ALGORITHM takes three values:\nMERGE, TEMPTABLE, or UNDEFINED. The default algorithm is UNDEFINED if\nno ALGORITHM clause is present. For more information, see\nhttps://mariadb.com/kb/en/view-algorithms/.\n\nSome views are updatable. That is, you can use them in statements such\nas UPDATE, DELETE, or INSERT to update the contents of the underlying\ntable. For a view to be updatable, there must be a one-to-one\nrelationship between the rows in the view and the rows in the\nunderlying table. There are also certain other constructs that make a\nview nonupdatable.\n\nThe WITH CHECK OPTION clause can be given for an updatable view to\nprevent inserts or updates to rows except those for which the WHERE\nclause in the select_statement is true.\n\nIn a WITH CHECK OPTION clause for an updatable view, the LOCAL and\nCASCADED keywords determine the scope of check testing when the view is\ndefined in terms of another view. The LOCAL keyword restricts the CHECK\nOPTION only to the view being defined. CASCADED causes the checks for\nunderlying views to be evaluated as well. When neither keyword is\ngiven, the default is CASCADED.\n\nFor more information about updatable views and the WITH CHECK OPTION\nclause, see\nhttps://mariadb.com/kb/en/inserting-and-updating-with-views/.\n\nURL: https://mariadb.com/kb/en/create-view/\n\n','','https://mariadb.com/kb/en/create-view/'),(455,'TRIM',37,'Syntax:\nTRIM([{BOTH | LEADING | TRAILING} [remstr] FROM] str), TRIM([remstr\nFROM] str)\n\nReturns the string str with all remstr prefixes or suffixes removed. If\nnone of the specifiers BOTH, LEADING, or TRAILING is given, BOTH is\nassumed. remstr is optional and, if not specified, spaces are removed.\n\nURL: https://mariadb.com/kb/en/trim/\n\n','MariaDB> SELECT TRIM(\' bar \');\n -> \'bar\'\nMariaDB> SELECT TRIM(LEADING \'x\' FROM \'xxxbarxxx\');\n -> \'barxxx\'\nMariaDB> SELECT TRIM(BOTH \'x\' FROM \'xxxbarxxx\');\n -> \'bar\'\nMariaDB> SELECT TRIM(TRAILING \'xyz\' FROM \'barxxyz\');\n -> \'barx\'\n','https://mariadb.com/kb/en/trim/'),(456,'IS',18,'Syntax:\nIS boolean_value\n\nTests a value against a boolean value, where boolean_value can be TRUE,\nFALSE, or UNKNOWN.\n\nURL: https://mariadb.com/kb/en/is/\n\n','MariaDB> SELECT 1 IS TRUE, 0 IS FALSE, NULL IS UNKNOWN;\n -> 1, 1, 1\n','https://mariadb.com/kb/en/is/'),(457,'GET_FORMAT',31,'Syntax:\nGET_FORMAT({DATE|TIME|DATETIME}, {\'EUR\'|\'USA\'|\'JIS\'|\'ISO\'|\'INTERNAL\'})\n\nReturns a format string. This function is useful in combination with\nthe DATE_FORMAT() and the STR_TO_DATE() functions.\n\nURL: https://mariadb.com/kb/en/get_format/\n\n','MariaDB> SELECT DATE_FORMAT(\'2003-10-03\',GET_FORMAT(DATE,\'EUR\'));\n -> \'03.10.2003\'\nMariaDB> SELECT STR_TO_DATE(\'10.31.2003\',GET_FORMAT(DATE,\'USA\'));\n -> \'2003-10-31\'\n','https://mariadb.com/kb/en/get_format/'),(458,'TINYBLOB',22,'TINYBLOB\n\nA BLOB column with a maximum length of 255 (28 - 1) bytes. Each\nTINYBLOB value is stored using a 1-byte length prefix that indicates\nthe number of bytes in the value.\n\nURL: https://mariadb.com/kb/en/tinyblob/\n\n','','https://mariadb.com/kb/en/tinyblob/'),(459,'SIGNAL',23,'Syntax:\nSIGNAL condition_value\n [SET signal_information_item\n [, signal_information_item] ...]\n\ncondition_value:\n SQLSTATE [VALUE] sqlstate_value\n | condition_name\n\nsignal_information_item:\n condition_information_item_name = simple_value_specification\n\ncondition_information_item_name:\n CLASS_ORIGIN\n | SUBCLASS_ORIGIN\n | MESSAGE_TEXT\n | MYSQL_ERRNO\n | CONSTRAINT_CATALOG\n | CONSTRAINT_SCHEMA\n | CONSTRAINT_NAME\n | CATALOG_NAME\n | SCHEMA_NAME\n | TABLE_NAME\n | COLUMN_NAME\n | CURSOR_NAME\n\ncondition_name, simple_value_specification:\n (see following discussion)\n\nSIGNAL is the way to \"return\" an error. SIGNAL provides error\ninformation to a handler, to an outer portion of the application, or to\nthe client. Also, it provides control over the error\'s characteristics\n(error number, SQLSTATE value, message). Without SIGNAL, it is\nnecessary to resort to workarounds such as deliberately referring to a\nnonexistent table to cause a routine to return an error.\n\nNo special privileges are required to execute the SIGNAL statement.\n\nThe condition_value in a SIGNAL statement indicates the error value to\nbe returned. It can be an SQLSTATE value (a 5-character string literal)\nor a condition_name that refers to a named condition previously defined\nwith DECLARE ... CONDITION (see [HELP DECLARE CONDITION]).\n\nAn SQLSTATE value can indicate errors, warnings, or \"not found.\" The\nfirst two characters of the value indicate its error class, as\ndiscussed in\nhttps://mariadb.com/kb/en/signal/#signal-condition-inf\normation-items. Some signal values cause statement termination; see\nhttps://mariadb.com/kb/en/signal/#signal-effects.\n\nThe SQLSTATE value for a SIGNAL statement should not start with \'00\'\nbecause such values indicate success and are not valid for signaling an\nerror. This is true whether the SQLSTATE value is specified directly in\nthe SIGNAL statement or in a named condition referred to in the\nstatement. If the value is invalid, a Bad SQLSTATE error occurs.\n\nTo signal a generic SQLSTATE value, use \'45000\', which means \"unhandled\nuser-defined exception.\"\n\nThe SIGNAL statement optionally includes a SET clause that contains\nmultiple signal items, in a comma-separated list of\ncondition_information_item_name = simple_value_specification\nassignments.\n\nEach condition_information_item_name may be specified only once in the\nSET clause. Otherwise, a Duplicate condition information item error\noccurs.\n\nValid simple_value_specification designators can be specified using\nstored procedure or function parameters, stored program local variables\ndeclared with DECLARE, user-defined variables, system variables, or\nliterals. A character literal may include a _charset introducer.\n\nFor information about permissible condition_information_item_name\nvalues, see\nhttps://mariadb.com/kb/en/signal/#signal-condition-inf\normation-items.\n\nURL: https://mariadb.com/kb/en/signal/\n\n','CREATE PROCEDURE p (pval INT)\nBEGIN\n DECLARE specialty CONDITION FOR SQLSTATE \'45000\';\n IF pval = 0 THEN\n SIGNAL SQLSTATE \'01000\';\n ELSEIF pval = 1 THEN\n SIGNAL SQLSTATE \'45000\'\n SET MESSAGE_TEXT = \'An error occurred\';\n ELSEIF pval = 2 THEN\n SIGNAL specialty\n SET MESSAGE_TEXT = \'An error occurred\';\n ELSE\n SIGNAL SQLSTATE \'01000\'\n SET MESSAGE_TEXT = \'A warning occurred\', MYSQL_ERRNO = 1000;\n SIGNAL SQLSTATE \'45000\'\n SET MESSAGE_TEXT = \'An error occurred\', MYSQL_ERRNO = 1001;\n END IF;\nEND;\n','https://mariadb.com/kb/en/signal/'),(460,'SAVEPOINT',8,'Syntax:\nSAVEPOINT identifier\nROLLBACK [WORK] TO [SAVEPOINT] identifier\nRELEASE SAVEPOINT identifier\n\nInnoDB supports the SQL statements SAVEPOINT, ROLLBACK TO SAVEPOINT,\nRELEASE SAVEPOINT and the optional WORK keyword for ROLLBACK.\n\nURL: https://mariadb.com/kb/en/savepoint/\n\n','','https://mariadb.com/kb/en/savepoint/'),(461,'USER',17,'Syntax:\nUSER()\n\nReturns the current MySQL user name and host name as a string in the\nutf8 character set.\n\nURL: https://mariadb.com/kb/en/user/\n\n','MariaDB> SELECT USER();\n -> \'davida@localhost\'\n','https://mariadb.com/kb/en/user/'),(462,'LABELS',23,'Syntax:\n[begin_label:] BEGIN\n [statement_list]\nEND [end_label]\n\n[begin_label:] LOOP\n statement_list\nEND LOOP [end_label]\n\n[begin_label:] REPEAT\n statement_list\nUNTIL search_condition\nEND REPEAT [end_label]\n\n[begin_label:] WHILE search_condition DO\n statement_list\nEND WHILE [end_label]\n\nLabels are permitted for BEGIN ... END blocks and for the LOOP, REPEAT,\nand WHILE statements. Label use for those statements follows these\nrules:\n\no begin_label must be followed by a colon.\n\no begin_label can be given without end_label. If end_label is present,\n it must be the same as begin_label.\n\no end_label cannot be given without begin_label.\n\no Labels at the same nesting level must be distinct.\n\no Labels can be up to 16 characters long.\n\nTo refer to a label within the labeled construct, use an ITERATE or\nLEAVE statement. The following example uses those statements to\ncontinue iterating or terminate the loop:\n\nCREATE PROCEDURE doiterate(p1 INT)\nBEGIN\n label1: LOOP\n SET p1 = p1 + 1;\n IF p1 < 10 THEN ITERATE label1; END IF;\n LEAVE label1;\n END LOOP label1;\nEND;\n\nThe scope of a block label does not include the code for handlers\ndeclared within the block. For details, see [HELP DECLARE HANDLER].\n\nURL: https://mariadb.com/kb/en/labels/\n\n','','https://mariadb.com/kb/en/labels/'),(463,'ALTER TABLE',39,'Syntax:\nALTER [ONLINE | OFFLINE] [IGNORE] TABLE tbl_name\n [alter_specification [, alter_specification] ...]\n [partition_options]\n\nalter_specification:\n table_options\n | ADD [COLUMN] col_name column_definition\n [FIRST | AFTER col_name ]\n | ADD [COLUMN] (col_name column_definition,...)\n | ADD {INDEX|KEY} [index_name]\n [index_type] (index_col_name,...) [index_option] ...\n | ADD [CONSTRAINT [symbol]] PRIMARY KEY\n [index_type] (index_col_name,...) [index_option] ...\n | ADD [CONSTRAINT [symbol]]\n UNIQUE [INDEX|KEY] [index_name]\n [index_type] (index_col_name,...) [index_option] ...\n | ADD FULLTEXT [INDEX|KEY] [index_name]\n (index_col_name,...) [index_option] ...\n | ADD SPATIAL [INDEX|KEY] [index_name]\n (index_col_name,...) [index_option] ...\n | ADD [CONSTRAINT [symbol]]\n FOREIGN KEY [index_name] (index_col_name,...)\n reference_definition\n | ALTER [COLUMN] col_name {SET DEFAULT literal | DROP DEFAULT}\n | CHANGE [COLUMN] old_col_name new_col_name column_definition\n [FIRST|AFTER col_name]\n | MODIFY [COLUMN] col_name column_definition\n [FIRST | AFTER col_name]\n | DROP [COLUMN] col_name\n | DROP PRIMARY KEY\n | DROP {INDEX|KEY} index_name\n | DROP FOREIGN KEY fk_symbol\n | MAX_ROWS = rows\n | DISABLE KEYS\n | ENABLE KEYS\n | RENAME [TO|AS] new_tbl_name\n | ORDER BY col_name [, col_name] ...\n | CONVERT TO CHARACTER SET charset_name [COLLATE collation_name]\n | [DEFAULT] CHARACTER SET [=] charset_name [COLLATE [=] collation_name]\n | DISCARD TABLESPACE\n | IMPORT TABLESPACE\n | FORCE\n | ADD PARTITION (partition_definition)\n | DROP PARTITION partition_names\n | TRUNCATE PARTITION {partition_names | ALL}\n | COALESCE PARTITION number\n | REORGANIZE PARTITION [partition_names INTO (partition_definitions)]\n | ANALYZE PARTITION {partition_names | ALL}\n | CHECK PARTITION {partition_names | ALL}\n | OPTIMIZE PARTITION {partition_names | ALL}\n | REBUILD PARTITION {partition_names | ALL}\n | REPAIR PARTITION {partition_names | ALL}\n | PARTITION BY partitioning_expression\n | REMOVE PARTITIONING\n\nindex_col_name:\n col_name [(length)] [ASC | DESC]\n\nindex_type:\n USING {BTREE | HASH}\n\nindex_option:\n KEY_BLOCK_SIZE [=] value\n | index_type\n | WITH PARSER parser_name\n | COMMENT \'string\'\n\ntable_options:\n table_option [[,] table_option] ... (see CREATE TABLE options)\n\npartition_options:\n (see CREATE TABLE options)\n\nALTER TABLE changes the structure of a table. For example, you can add\nor delete columns, create or destroy indexes, change the type of\nexisting columns, or rename columns or the table itself. You can also\nchange characteristics such as the storage engine used for the table or\nthe table comment.\n\nPartitioning-related clauses for ALTER TABLE can be used with\npartitioned tables for repartitioning, for adding, dropping, merging,\nand splitting partitions, and for performing partitioning maintenance.\nFor more information, see\nhttp://dev.mysql.com/doc/refman/5.5/en/alter-table-partition-operations\n.html.\n\nFollowing the table name, specify the alterations to be made. If none\nare given, ALTER TABLE does nothing.\n\nURL: https://mariadb.com/kb/en/alter-table/\n\n','','https://mariadb.com/kb/en/alter-table/'),(464,'MPOINTFROMWKB',32,'MPointFromWKB(wkb[,srid]), MultiPointFromWKB(wkb[,srid])\n\nConstructs a MULTIPOINT value using its WKB representation and SRID.\n\nURL: https://mariadb.com/kb/en/mpointfromwkb/\n\n','','https://mariadb.com/kb/en/mpointfromwkb/'),(465,'CHAR BYTE',22,'The CHAR BYTE data type is an alias for the BINARY data type. This is a\ncompatibility feature.\n\nURL: https://mariadb.com/kb/en/char-byte/\n\n','','https://mariadb.com/kb/en/char-byte/'),(466,'REPAIR TABLE',20,'Syntax:\nREPAIR [NO_WRITE_TO_BINLOG | LOCAL] TABLE\n tbl_name [, tbl_name] ...\n [QUICK] [EXTENDED] [USE_FRM]\n\nREPAIR TABLE repairs a possibly corrupted table. By default, it has the\nsame effect as myisamchk --recover tbl_name. REPAIR TABLE works for\nMyISAM, ARCHIVE, and CSV tables. See\nhttps://mariadb.com/kb/en/myisam-storage-engine/, and\nhttps://mariadb.com/kb/en/archive/, and\nhttps://mariadb.com/kb/en/csv/\n\nThis statement requires SELECT and INSERT privileges for the table.\n\nREPAIR TABLE is supported for partitioned tables. However, the USE_FRM\noption cannot be used with this statement on a partitioned table.\n\nYou can use ALTER TABLE ... REPAIR PARTITION to repair one or more\npartitions; for more information, see [HELP ALTER TABLE], and\nhttp://dev.mysql.com/doc/refman/5.5/en/partitioning-maintenance.html.\n\nURL: https://mariadb.com/kb/en/repair-table/\n\n','','https://mariadb.com/kb/en/repair-table/'),(467,'MERGE',39,'The MERGE storage engine, also known as the MRG_MyISAM engine, is a\ncollection of identical MyISAM tables that can be used as one.\n\"Identical\" means that all tables have identical column and index\ninformation. You cannot merge MyISAM tables in which the columns are\nlisted in a different order, do not have exactly the same columns, or\nhave the indexes in different order. However, any or all of the MyISAM\ntables can be compressed with myisampack. See\nhttps://mariadb.com/kb/en/myisampack/. Differences in\ntable options such as AVG_ROW_LENGTH, MAX_ROWS, or PACK_KEYS do not\nmatter.\n\nURL: https://mariadb.com/kb/en/merge/\n\n','MariaDB> CREATE TABLE t1 (\n -> a INT NOT NULL AUTO_INCREMENT PRIMARY KEY,\n -> message CHAR(20)) ENGINE=MyISAM;\nMariaDB> CREATE TABLE t2 (\n -> a INT NOT NULL AUTO_INCREMENT PRIMARY KEY,\n -> message CHAR(20)) ENGINE=MyISAM;\nMariaDB> INSERT INTO t1 (message) VALUES (\'Testing\'),(\'table\'),(\'t1\');\nMariaDB> INSERT INTO t2 (message) VALUES (\'Testing\'),(\'table\'),(\'t2\');\nMariaDB> CREATE TABLE total (\n -> a INT NOT NULL AUTO_INCREMENT,\n -> message CHAR(20), INDEX(a))\n -> ENGINE=MERGE UNION=(t1,t2) INSERT_METHOD=LAST;\n','https://mariadb.com/kb/en/merge/'),(468,'CREATE TABLE',39,'Syntax:\nCREATE [TEMPORARY] TABLE [IF NOT EXISTS] tbl_name\n (create_definition,...)\n [table_options]\n [partition_options]\n\nOr:\n\nCREATE [TEMPORARY] TABLE [IF NOT EXISTS] tbl_name\n [(create_definition,...)]\n [table_options]\n [partition_options]\n select_statement\n\nOr:\n\nCREATE [TEMPORARY] TABLE [IF NOT EXISTS] tbl_name\n { LIKE old_tbl_name | (LIKE old_tbl_name) }\n\ncreate_definition:\n col_name column_definition\n | [CONSTRAINT [symbol]] PRIMARY KEY [index_type] (index_col_name,...)\n [index_option] ...\n | {INDEX|KEY} [index_name] [index_type] (index_col_name,...)\n [index_option] ...\n | [CONSTRAINT [symbol]] UNIQUE [INDEX|KEY]\n [index_name] [index_type] (index_col_name,...)\n [index_option] ...\n | {FULLTEXT|SPATIAL} [INDEX|KEY] [index_name] (index_col_name,...)\n [index_option] ...\n | [CONSTRAINT [symbol]] FOREIGN KEY\n [index_name] (index_col_name,...) reference_definition\n | CHECK (expr)\n\ncolumn_definition:\n data_type [NOT NULL | NULL] [DEFAULT default_value]\n [AUTO_INCREMENT] [UNIQUE [KEY] | [PRIMARY] KEY]\n [COMMENT \'string\']\n [COLUMN_FORMAT {FIXED|DYNAMIC|DEFAULT}]\n [STORAGE {DISK|MEMORY|DEFAULT}]\n [reference_definition]\n\ndata_type:\n BIT[(length)]\n | TINYINT[(length)] [UNSIGNED] [ZEROFILL]\n | SMALLINT[(length)] [UNSIGNED] [ZEROFILL]\n | MEDIUMINT[(length)] [UNSIGNED] [ZEROFILL]\n | INT[(length)] [UNSIGNED] [ZEROFILL]\n | INTEGER[(length)] [UNSIGNED] [ZEROFILL]\n | BIGINT[(length)] [UNSIGNED] [ZEROFILL]\n | REAL[(length,decimals)] [UNSIGNED] [ZEROFILL]\n | DOUBLE[(length,decimals)] [UNSIGNED] [ZEROFILL]\n | FLOAT[(length,decimals)] [UNSIGNED] [ZEROFILL]\n | DECIMAL[(length[,decimals])] [UNSIGNED] [ZEROFILL]\n | NUMERIC[(length[,decimals])] [UNSIGNED] [ZEROFILL]\n | DATE\n | TIME\n | TIMESTAMP\n | DATETIME\n | YEAR\n | CHAR[(length)]\n [CHARACTER SET charset_name] [COLLATE collation_name]\n | VARCHAR(length)\n [CHARACTER SET charset_name] [COLLATE collation_name]\n | BINARY[(length)]\n | VARBINARY(length)\n | TINYBLOB\n | BLOB\n | MEDIUMBLOB\n | LONGBLOB\n | TINYTEXT [BINARY]\n [CHARACTER SET charset_name] [COLLATE collation_name]\n | TEXT [BINARY]\n [CHARACTER SET charset_name] [COLLATE collation_name]\n | MEDIUMTEXT [BINARY]\n [CHARACTER SET charset_name] [COLLATE collation_name]\n | LONGTEXT [BINARY]\n [CHARACTER SET charset_name] [COLLATE collation_name]\n | ENUM(value1,value2,value3,...)\n [CHARACTER SET charset_name] [COLLATE collation_name]\n | SET(value1,value2,value3,...)\n [CHARACTER SET charset_name] [COLLATE collation_name]\n | spatial_type\n\nindex_col_name:\n col_name [(length)] [ASC | DESC]\n\nindex_type:\n USING {BTREE | HASH}\n\nindex_option:\n KEY_BLOCK_SIZE [=] value\n | index_type\n | WITH PARSER parser_name\n | COMMENT \'string\'\n\nreference_definition:\n REFERENCES tbl_name (index_col_name,...)\n [MATCH FULL | MATCH PARTIAL | MATCH SIMPLE]\n [ON DELETE reference_option]\n [ON UPDATE reference_option]\n\nreference_option:\n RESTRICT | CASCADE | SET NULL | NO ACTION\n\ntable_options:\n table_option [[,] table_option] ...\n\ntable_option:\n ENGINE [=] engine_name\n | AUTO_INCREMENT [=] value\n | AVG_ROW_LENGTH [=] value\n | [DEFAULT] CHARACTER SET [=] charset_name\n | CHECKSUM [=] {0 | 1}\n | [DEFAULT] COLLATE [=] collation_name\n | COMMENT [=] \'string\'\n | CONNECTION [=] \'connect_string\'\n | DATA DIRECTORY [=] \'absolute path to directory\'\n | DELAY_KEY_WRITE [=] {0 | 1}\n | INDEX DIRECTORY [=] \'absolute path to directory\'\n | INSERT_METHOD [=] { NO | FIRST | LAST }\n | KEY_BLOCK_SIZE [=] value\n | MAX_ROWS [=] value\n | MIN_ROWS [=] value\n | PACK_KEYS [=] {0 | 1 | DEFAULT}\n | PASSWORD [=] \'string\'\n | ROW_FORMAT [=] {DEFAULT|DYNAMIC|FIXED|COMPRESSED|REDUNDANT|COMPACT}\n | TABLESPACE tablespace_name [STORAGE {DISK|MEMORY|DEFAULT}]\n | UNION [=] (tbl_name[,tbl_name]...)\n\npartition_options:\n PARTITION BY\n { [LINEAR] HASH(expr)\n | [LINEAR] KEY(column_list)\n | RANGE{(expr) | COLUMNS(column_list)}\n | LIST{(expr) | COLUMNS(column_list)} }\n [PARTITIONS num]\n [SUBPARTITION BY\n { [LINEAR] HASH(expr)\n | [LINEAR] KEY(column_list) }\n [SUBPARTITIONS num]\n ]\n [(partition_definition [, partition_definition] ...)]\n\npartition_definition:\n PARTITION partition_name\n [VALUES \n {LESS THAN {(expr | value_list) | MAXVALUE} \n | \n IN (value_list)}]\n [[STORAGE] ENGINE [=] engine_name]\n [COMMENT [=] \'comment_text\' ]\n [DATA DIRECTORY [=] \'data_dir\']\n [INDEX DIRECTORY [=] \'index_dir\']\n [MAX_ROWS [=] max_number_of_rows]\n [MIN_ROWS [=] min_number_of_rows]\n [TABLESPACE [=] tablespace_name]\n [NODEGROUP [=] node_group_id]\n [(subpartition_definition [, subpartition_definition] ...)]\n\nsubpartition_definition:\n SUBPARTITION logical_name\n [[STORAGE] ENGINE [=] engine_name]\n [COMMENT [=] \'comment_text\' ]\n [DATA DIRECTORY [=] \'data_dir\']\n [INDEX DIRECTORY [=] \'index_dir\']\n [MAX_ROWS [=] max_number_of_rows]\n [MIN_ROWS [=] min_number_of_rows]\n [TABLESPACE [=] tablespace_name]\n [NODEGROUP [=] node_group_id]\n\nselect_statement:\n [IGNORE | REPLACE] [AS] SELECT ... (Some valid select statement)\n\nCREATE TABLE creates a table with the given name. You must have the\nCREATE privilege for the table.\n\nRules for permissible table names are given in\nhttps://mariadb.com/kb/en/identifier-names/. By default,\nthe table is created in the default database, using the InnoDB storage\nengine. An error occurs if the table exists, if there is no default\ndatabase, or if the database does not exist.\n\nURL: https://mariadb.com/kb/en/create-table/\n\n','','https://mariadb.com/kb/en/create-table/'),(469,'>',18,'Syntax:\n>\n\nGreater than:\n\nURL: https://mariadb.com/kb/en/greater-than/\n\n','MariaDB> SELECT 2 > 2;\n -> 0\n','https://mariadb.com/kb/en/greater-than/'),(470,'ANALYZE TABLE',20,'Syntax:\nANALYZE [NO_WRITE_TO_BINLOG | LOCAL] TABLE\n tbl_name [, tbl_name] ...\n\nANALYZE TABLE analyzes and stores the key distribution for a table.\nDuring the analysis, the table is locked with a read lock for InnoDB\nand MyISAM. This statement works with InnoDB, Aria and MyISAM tables.\nFor MyISAM tables, this statement is equivalent to using myisamchk\n--analyze.\n\nFor more information on how the analysis works within InnoDB, see\nhttp://dev.mysql.com/doc/refman/5.5/en/innodb-restrictions.html.\n\nMySQL uses the stored key distribution to decide the order in which\ntables should be joined when you perform a join on something other than\na constant. In addition, key distributions can be used when deciding\nwhich indexes to use for a specific table within a query.\n\nThis statement requires SELECT and INSERT privileges for the table.\n\nANALYZE TABLE is supported for partitioned tables, and you can use\nALTER TABLE ... ANALYZE PARTITION to analyze one or more partitions;\nfor more information, see [HELP ALTER TABLE], and\nhttp://dev.mysql.com/doc/refman/5.5/en/partitioning-maintenance.html.\n\nURL: https://mariadb.com/kb/en/analyze-table/\n\n','','https://mariadb.com/kb/en/analyze-table/'),(471,'MICROSECOND',31,'Syntax:\nMICROSECOND(expr)\n\nReturns the microseconds from the time or datetime expression expr as a\nnumber in the range from 0 to 999999.\n\nURL: https://mariadb.com/kb/en/microsecond/\n\n','MariaDB> SELECT MICROSECOND(\'12:00:00.123456\');\n -> 123456\nMariaDB> SELECT MICROSECOND(\'2009-12-31 23:59:59.000010\');\n -> 10\n','https://mariadb.com/kb/en/microsecond/'),(472,'CONSTRAINT',39,'InnoDB supports foreign keys, which let you cross-reference related\ndata across tables, and foreign key constraints, which help keep this\nspread-out data consistent. The syntax for an InnoDB foreign key\nconstraint definition in the CREATE TABLE or ALTER TABLE statement\nlooks like this:\n\n[CONSTRAINT [symbol]] FOREIGN KEY\n [index_name] (index_col_name, ...)\n REFERENCES tbl_name (index_col_name,...)\n [ON DELETE reference_option]\n [ON UPDATE reference_option]\n\nreference_option:\n RESTRICT | CASCADE | SET NULL | NO ACTION\n\nURL: https://mariadb.com/kb/en/constraint/\n\n','CREATE TABLE product (category INT NOT NULL, id INT NOT NULL,\n price DECIMAL,\n PRIMARY KEY(category, id)) ENGINE=INNODB;\nCREATE TABLE customer (id INT NOT NULL,\n PRIMARY KEY (id)) ENGINE=INNODB;\nCREATE TABLE product_order (no INT NOT NULL AUTO_INCREMENT,\n product_category INT NOT NULL,\n product_id INT NOT NULL,\n customer_id INT NOT NULL,\n PRIMARY KEY(no),\n INDEX (product_category, product_id),\n FOREIGN KEY (product_category, product_id)\n REFERENCES product(category, id)\n ON UPDATE CASCADE ON DELETE RESTRICT,\n INDEX (customer_id),\n FOREIGN KEY (customer_id)\n REFERENCES customer(id)) ENGINE=INNODB;\n','https://mariadb.com/kb/en/constraint/'),(473,'CREATE SERVER',39,'Syntax:\nCREATE SERVER server_name\n FOREIGN DATA WRAPPER wrapper_name\n OPTIONS (option [, option] ...)\n\noption:\n { HOST character-literal\n | DATABASE character-literal\n | USER character-literal\n | PASSWORD character-literal\n | SOCKET character-literal\n | OWNER character-literal\n | PORT numeric-literal }\n\nThis statement creates the definition of a server for use with the\nFEDERATED storage engine. The CREATE SERVER statement creates a new row\nwithin the servers table within the mysql database. This statement\nrequires the SUPER privilege.\n\nThe server_name should be a unique reference to the server. Server\ndefinitions are global within the scope of the server, it is not\npossible to qualify the server definition to a specific database.\nserver_name has a maximum length of 64 characters (names longer than 64\ncharacters are silently truncated), and is case insensitive. You may\nspecify the name as a quoted string.\n\nThe wrapper_name should be mysql, and may be quoted with single\nquotation marks. Other values for wrapper_name are not currently\nsupported.\n\nFor each option you must specify either a character literal or numeric\nliteral. Character literals are UTF-8, support a maximum length of 64\ncharacters and default to a blank (empty) string. String literals are\nsilently truncated to 64 characters. Numeric literals must be a number\nbetween 0 and 9999, default value is 0.\n\n*Note*: Note that the OWNER option is currently not applied, and has no\neffect on the ownership or operation of the server connection that is\ncreated.\n\nThe CREATE SERVER statement creates an entry in the mysql.servers table\nthat can later be used with the CREATE TABLE statement when creating a\nFEDERATED table. The options that you specify will be used to populate\nthe columns in the mysql.servers table. The table columns are\nServer_name, Host, Db, Username, Password, Port and Socket.\n\nURL: https://mariadb.com/kb/en/create-server/\n\n','CREATE SERVER s\nFOREIGN DATA WRAPPER mysql\nOPTIONS (USER \'Remote\', HOST \'192.168.1.106\', DATABASE \'test\');\n','https://mariadb.com/kb/en/create-server/'),(474,'FIELD',37,'Syntax:\nFIELD(str,str1,str2,str3,...)\n\nReturns the index (position) of str in the str1, str2, str3, ... list.\nReturns 0 if str is not found.\n\nIf all arguments to FIELD() are strings, all arguments are compared as\nstrings. If all arguments are numbers, they are compared as numbers.\nOtherwise, the arguments are compared as double.\n\nIf str is NULL, the return value is 0 because NULL fails equality\ncomparison with any value. FIELD() is the complement of ELT().\n\nURL: https://mariadb.com/kb/en/field/\n\n','MariaDB> SELECT FIELD(\'ej\', \'Hej\', \'ej\', \'Heja\', \'hej\', \'foo\');\n -> 2\nMariaDB> SELECT FIELD(\'fo\', \'Hej\', \'ej\', \'Heja\', \'hej\', \'foo\');\n -> 0\n','https://mariadb.com/kb/en/field/'),(475,'MAKETIME',31,'Syntax:\nMAKETIME(hour,minute,second)\n\nReturns a time value calculated from the hour, minute, and second\narguments.\n\nURL: https://mariadb.com/kb/en/maketime/\n\n','MariaDB> SELECT MAKETIME(12,15,30);\n -> \'12:15:30\'\n','https://mariadb.com/kb/en/maketime/'),(476,'CURDATE',31,'Syntax:\nCURDATE()\n\nReturns the current date as a value in \'YYYY-MM-DD\' or YYYYMMDD format,\ndepending on whether the function is used in a string or numeric\ncontext.\n\nURL: https://mariadb.com/kb/en/curdate/\n\n','MariaDB> SELECT CURDATE();\n -> \'2008-06-13\'\nMariaDB> SELECT CURDATE() + 0;\n -> 20080613\n','https://mariadb.com/kb/en/curdate/'),(477,'SET PASSWORD',10,'Syntax:\nSET PASSWORD [FOR user] =\n {\n PASSWORD(\'cleartext password\')\n | OLD_PASSWORD(\'cleartext password\')\n | \'encrypted password\'\n }\n\nThe SET PASSWORD statement assigns a password to an existing MySQL user\naccount. When the read_only system variable is enabled, the SUPER\nprivilege is required to use SET PASSWORD, in addition to whatever\nother privileges might be required.\n\nIf the password is specified using the PASSWORD() or OLD_PASSWORD()\nfunction, the cleartext (unencrypted) password should be given as the\nargument to the function, which hashes the password and returns the\nencrypted password string. If the password is specified without using\neither function, it should be the already encrypted password value as a\nliteral string. In all cases, the encrypted password string must be in\nthe format required by the authentication method used for the account.\n\nThe old_passwords system variable value determines the hashing method\nused by PASSWORD(). If you specify the password using that function and\nSET PASSWORD rejects the password as not being in the correct format,\nit may be necessary to set old_passwords to change the hashing method.\nFor descriptions of the permitted values, see\nhttps://mariadb.com/kb/en/server-system-variables#old_passwords.\n\nWith no FOR user clause, this statement sets the password for the\ncurrent user. (To see which account the server authenticated you as,\ninvoke the CURRENT_USER() function.) Any client who successfully\nconnects to the server using a nonanonymous account can change the\npassword for that account.\n\nWith a FOR user clause, this statement sets the password for the named\nuser. You must have the UPDATE privilege for the mysql database to do\nthis. The user account name uses the format described in\nhttps://mariadb.com/kb/en/create-user#account-names. The user\nvalue should be given as \'user_name\'@\'host_name\', where \'user_name\' and\n\'host_name\' are exactly as listed in the User and Host columns of the\nmysql.user table row. (If you specify only a user name, a host name of\n\'%\' is used.) For example, to set the password for an account with User\nand Host column values of \'bob\' and \'%.example.org\', write the\nstatement like this:\n\nSET PASSWORD FOR \'bob\'@\'%.example.org\' = PASSWORD(\'cleartext password\');\n\nURL: https://mariadb.com/kb/en/set-password/\n\n','','https://mariadb.com/kb/en/set-password/'),(478,'ALTER TABLESPACE',39,'Syntax:\nALTER TABLESPACE tablespace_name\n {ADD|DROP} DATAFILE \'file_name\'\n [INITIAL_SIZE [=] size]\n [WAIT]\n ENGINE [=] engine_name\n\nThis statement is used with NDB cluster, which is not supported by MariaDB.\n\nURL: https://mariadb.com/kb/en/alter-tablespace/\n\n','','https://mariadb.com/kb/en/alter-tablespace/'),(479,'IF FUNCTION',7,'Syntax:\nIF(expr1,expr2,expr3)\n\nIf expr1 is TRUE (expr1 <> 0 and expr1 <> NULL) then IF() returns\nexpr2; otherwise it returns expr3. IF() returns a numeric or string\nvalue, depending on the context in which it is used.\n\nURL: https://mariadb.com/kb/en/if-function/\n\n','MariaDB> SELECT IF(1>2,2,3);\n -> 3\nMariaDB> SELECT IF(1<2,\'yes\',\'no\');\n -> \'yes\'\nMariaDB> SELECT IF(STRCMP(\'test\',\'test1\'),\'no\',\'yes\');\n -> \'no\'\n','https://mariadb.com/kb/en/if-function/'),(480,'ENUM',22,'ENUM(\'value1\',\'value2\',...) [CHARACTER SET charset_name] [COLLATE\ncollation_name]\n\nAn enumeration. A string object that can have only one value, chosen\nfrom the list of values \'value1\', \'value2\', ..., NULL or the special \'\'\nerror value. An ENUM column can have a maximum of 65,535 distinct\nvalues. ENUM values are represented internally as integers.\n\nURL: https://mariadb.com/kb/en/enum/\n\n','','https://mariadb.com/kb/en/enum/'),(481,'DATABASE',17,'Syntax:\nDATABASE()\n\nReturns the default (current) database name as a string in the utf8\ncharacter set. If there is no default database, DATABASE() returns\nNULL. Within a stored routine, the default database is the database\nthat the routine is associated with, which is not necessarily the same\nas the database that is the default in the calling context.\n\nURL: https://mariadb.com/kb/en/database/\n\n','MariaDB> SELECT DATABASE();\n -> \'test\'\n','https://mariadb.com/kb/en/database/'),(482,'POINTFROMWKB',32,'PointFromWKB(wkb[,srid])\n\nConstructs a POINT value using its WKB representation and SRID.\n\nURL: https://mariadb.com/kb/en/pointfromwkb/\n\n','','https://mariadb.com/kb/en/pointfromwkb/'),(483,'POWER',4,'Syntax:\nPOWER(X,Y)\n\nThis is a synonym for POW().\n\nURL: https://mariadb.com/kb/en/power/\n\n','','https://mariadb.com/kb/en/power/'),(484,'ATAN',4,'Syntax:\nATAN(X)\n\nReturns the arc tangent of X, that is, the value whose tangent is X.\n\nURL: https://mariadb.com/kb/en/atan/\n\n','MariaDB> SELECT ATAN(2);\n -> 1.1071487177941\nMariaDB> SELECT ATAN(-2);\n -> -1.1071487177941\n','https://mariadb.com/kb/en/atan/'),(485,'STRCMP',37,'Syntax:\nSTRCMP(expr1,expr2)\n\nSTRCMP() returns 0 if the strings are the same, -1 if the first\nargument is smaller than the second according to the current sort\norder, and 1 otherwise.\n\nURL: https://mariadb.com/kb/en/strcmp/\n\n','MariaDB> SELECT STRCMP(\'text\', \'text2\');\n -> -1\nMariaDB> SELECT STRCMP(\'text2\', \'text\');\n -> 1\nMariaDB> SELECT STRCMP(\'text\', \'text\');\n -> 0\n','https://mariadb.com/kb/en/strcmp/'),(486,'INSERT DELAYED',27,'Syntax:\nINSERT DELAYED ...\n\nThe DELAYED option for the INSERT statement is a MySQL extension to\nstandard SQL that is very useful if you have clients that cannot or\nneed not wait for the INSERT to complete. This is a common situation\nwhen you use MySQL for logging and you also periodically run SELECT and\nUPDATE statements that take a long time to complete.\n\nWhen a client uses INSERT DELAYED, it gets an okay from the server at\nonce, and the row is queued to be inserted when the table is not in use\nby any other thread.\n\nAnother major benefit of using INSERT DELAYED is that inserts from many\nclients are bundled together and written in one block. This is much\nfaster than performing many separate inserts.\n\nNote that INSERT DELAYED is slower than a normal INSERT if the table is\nnot otherwise in use. There is also the additional overhead for the\nserver to handle a separate thread for each table for which there are\ndelayed rows. This means that you should use INSERT DELAYED only when\nyou are really sure that you need it.\n\nThe queued rows are held only in memory until they are inserted into\nthe table. This means that if you terminate mysqld forcibly (for\nexample, with kill -9) or if mysqld dies unexpectedly, any queued rows\nthat have not been written to disk are lost.\n\nThere are some constraints on the use of DELAYED:\n\no INSERT DELAYED works only with MyISAM, MEMORY, ARCHIVE, and BLACKHOLE\n tables. For engines that do not support DELAYED, an error occurs.\n\no An error occurs for INSERT DELAYED if used with a table that has been\n locked with LOCK TABLES because the insert must be handled by a\n separate thread, not by the session that holds the lock.\n\no For MyISAM tables, if there are no free blocks in the middle of the\n data file, concurrent SELECT and INSERT statements are supported.\n Under these circumstances, you very seldom need to use INSERT DELAYED\n with MyISAM.\n\no INSERT DELAYED should be used only for INSERT statements that specify\n value lists. The server ignores DELAYED for INSERT ... SELECT or\n INSERT ... ON DUPLICATE KEY UPDATE statements.\n\no Because the INSERT DELAYED statement returns immediately, before the\n rows are inserted, you cannot use LAST_INSERT_ID() to get the\n AUTO_INCREMENT value that the statement might generate.\n\no DELAYED rows are not visible to SELECT statements until they actually\n have been inserted.\n\no Prior to MySQL 5.5.7, INSERT DELAYED was treated as a normal INSERT\n if the statement inserted multiple rows, binary logging was enabled,\n and the global logging format was statement-based (that is, whenever\n binlog_format was set to STATEMENT). Beginning with MySQL 5.5.7,\n INSERT DELAYED is always handled as a simple INSERT (that is, without\n the DELAYED option) whenever the value of binlog_format is STATEMENT\n or MIXED. (In the latter case, the statement no longer triggers a\n switch to row-based logging, and so is logged using the\n statement-based format.)\n\n This does not apply when using row-based binary logging mode\n (binlog_format set to ROW), in which INSERT DELAYED statements are\n always executed using the DELAYED option as specified, and logged as\n row-update events.\n\no DELAYED is ignored on slave replication servers, so that INSERT\n DELAYED is treated as a normal INSERT on slaves. This is because\n DELAYED could cause the slave to have different data than the master.\n\no Pending INSERT DELAYED statements are lost if a table is write locked\n and ALTER TABLE is used to modify the table structure.\n\no INSERT DELAYED is not supported for views.\n\no INSERT DELAYED is not supported for partitioned tables.\n\nURL: https://mariadb.com/kb/en/insert-delayed/\n\n','','https://mariadb.com/kb/en/insert-delayed/'),(487,'SHOW PROFILE',26,'Syntax:\nSHOW PROFILE [type [, type] ... ]\n [FOR QUERY n]\n [LIMIT row_count [OFFSET offset]]\n\ntype:\n ALL\n | BLOCK IO\n | CONTEXT SWITCHES\n | CPU\n | IPC\n | MEMORY\n | PAGE FAULTS\n | SOURCE\n | SWAPS\n\nThe SHOW PROFILE and SHOW PROFILES statements display profiling\ninformation that indicates resource usage for statements executed\nduring the course of the current session.\n\nProfiling is controlled by the profiling session variable, which has a\ndefault value of 0 (OFF). Profiling is enabled by setting profiling to\n1 or ON:\n\nMariaDB> SET profiling = 1;\n\nSHOW PROFILES displays a list of the most recent statements sent to the\nserver. The size of the list is controlled by the\nprofiling_history_size session variable, which has a default value of\n15. The maximum value is 100. Setting the value to 0 has the practical\neffect of disabling profiling.\n\nAll statements are profiled except SHOW PROFILE and SHOW PROFILES, so\nyou will find neither of those statements in the profile list.\nMalformed statements are profiled. For example, SHOW PROFILING is an\nillegal statement, and a syntax error occurs if you try to execute it,\nbut it will show up in the profiling list.\n\nSHOW PROFILE displays detailed information about a single statement.\nWithout the FOR QUERY n clause, the output pertains to the most\nrecently executed statement. If FOR QUERY n is included, SHOW PROFILE\ndisplays information for statement n. The values of n correspond to the\nQuery_ID values displayed by SHOW PROFILES.\n\nThe LIMIT row_count clause may be given to limit the output to\nrow_count rows. If LIMIT is given, OFFSET offset may be added to begin\nthe output offset rows into the full set of rows.\n\nBy default, SHOW PROFILE displays Status and Duration columns. The\nStatus values are like the State values displayed by SHOW PROCESSLIST,\nalthough there might be some minor differences in interpretion for the\ntwo statements for some status values (see\nhttp://dev.mysql.com/doc/refman/5.5/en/thread-information.html).\n\nOptional type values may be specified to display specific additional\ntypes of information:\n\no ALL displays all information\n\no BLOCK IO displays counts for block input and output operations\n\no CONTEXT SWITCHES displays counts for voluntary and involuntary\n context switches\n\no CPU displays user and system CPU usage times\n\no IPC displays counts for messages sent and received\n\no MEMORY is not currently implemented\n\no PAGE FAULTS displays counts for major and minor page faults\n\no SOURCE displays the names of functions from the source code, together\n with the name and line number of the file in which the function\n occurs\n\no SWAPS displays swap counts\n\nProfiling is enabled per session. When a session ends, its profiling\ninformation is lost.\n\nURL: https://mariadb.com/kb/en/show-profile/\n\n','MariaDB> SELECT @@profiling;\n+-------------+\n| @@profiling |\n+-------------+\n| 0 |\n+-------------+\n1 row in set (0.00 sec)\n\nMariaDB> SET profiling = 1;\nQuery OK, 0 rows affected (0.00 sec)\n\nMariaDB> DROP TABLE IF EXISTS t1;\nQuery OK, 0 rows affected, 1 warning (0.00 sec)\n\nMariaDB> CREATE TABLE T1 (id INT);\nQuery OK, 0 rows affected (0.01 sec)\n\nMariaDB> SHOW PROFILES;\n+----------+----------+--------------------------+\n| Query_ID | Duration | Query |\n+----------+----------+--------------------------+\n| 0 | 0.000088 | SET PROFILING = 1 |\n| 1 | 0.000136 | DROP TABLE IF EXISTS t1 |\n| 2 | 0.011947 | CREATE TABLE t1 (id INT) |\n+----------+----------+--------------------------+\n3 rows in set (0.00 sec)\n\nMariaDB> SHOW PROFILE;\n+----------------------+----------+\n| Status | Duration |\n+----------------------+----------+\n| checking permissions | 0.000040 |\n| creating table | 0.000056 |\n| After create | 0.011363 |\n| query end | 0.000375 |\n| freeing items | 0.000089 |\n| logging slow query | 0.000019 |\n| cleaning up | 0.000005 |\n+----------------------+----------+\n7 rows in set (0.00 sec)\n\nMariaDB> SHOW PROFILE FOR QUERY 1;\n+--------------------+----------+\n| Status | Duration |\n+--------------------+----------+\n| query end | 0.000107 |\n| freeing items | 0.000008 |\n| logging slow query | 0.000015 |\n| cleaning up | 0.000006 |\n+--------------------+----------+\n4 rows in set (0.00 sec)\n\nMariaDB> SHOW PROFILE CPU FOR QUERY 2;\n+----------------------+----------+----------+------------+\n| Status | Duration | CPU_user | CPU_system |\n+----------------------+----------+----------+------------+\n| checking permissions | 0.000040 | 0.000038 | 0.000002 |\n| creating table | 0.000056 | 0.000028 | 0.000028 |\n| After create | 0.011363 | 0.000217 | 0.001571 |\n| query end | 0.000375 | 0.000013 | 0.000028 |\n| freeing items | 0.000089 | 0.000010 | 0.000014 |\n| logging slow query | 0.000019 | 0.000009 | 0.000010 |\n| cleaning up | 0.000005 | 0.000003 | 0.000002 |\n+----------------------+----------+----------+------------+\n7 rows in set (0.00 sec)\n','https://mariadb.com/kb/en/show-profile/'),(488,'SHOW PROCEDURE CODE',26,'Syntax:\nSHOW PROCEDURE CODE proc_name\n\nThis statement is a MySQL extension that is available only for servers\nthat have been built with debugging support. It displays a\nrepresentation of the internal implementation of the named stored\nprocedure. A similar statement, SHOW FUNCTION CODE, displays\ninformation about stored functions (see [HELP SHOW FUNCTION CODE]).\n\nBoth statements require that you be the owner of the routine or have\nSELECT access to the mysql.proc table.\n\nIf the named routine is available, each statement produces a result\nset. Each row in the result set corresponds to one \"instruction\" in the\nroutine. The first column is Pos, which is an ordinal number beginning\nwith 0. The second column is Instruction, which contains an SQL\nstatement (usually changed from the original source), or a directive\nwhich has meaning only to the stored-routine handler.\n\nURL: https://mariadb.com/kb/en/show-procedure-code/\n\n','MariaDB> DELIMITER //\nMariaDB> CREATE PROCEDURE p1 ()\n -> BEGIN\n -> DECLARE fanta INT DEFAULT 55;\n -> DROP TABLE t2;\n -> LOOP\n -> INSERT INTO t3 VALUES (fanta);\n -> END LOOP;\n -> END//\nQuery OK, 0 rows affected (0.00 sec)\n\nMariaDB> SHOW PROCEDURE CODE p1//\n+-----+----------------------------------------+\n| Pos | Instruction |\n+-----+----------------------------------------+\n| 0 | set fanta@0 55 |\n| 1 | stmt 9 \"DROP TABLE t2\" |\n| 2 | stmt 5 \"INSERT INTO t3 VALUES (fanta)\" |\n| 3 | jump 2 |\n+-----+----------------------------------------+\n4 rows in set (0.00 sec)\n','https://mariadb.com/kb/en/show-procedure-code/'),(489,'MEDIUMTEXT',22,'MEDIUMTEXT [CHARACTER SET charset_name] [COLLATE collation_name]\n\nA TEXT column with a maximum length of 16,777,215 (224 - 1) characters.\nThe effective maximum length is less if the value contains multi-byte\ncharacters. Each MEDIUMTEXT value is stored using a 3-byte length\nprefix that indicates the number of bytes in the value.\n\nURL: https://mariadb.com/kb/en/mediumtext/\n\n','','https://mariadb.com/kb/en/mediumtext/'),(490,'LN',4,'Syntax:\nLN(X)\n\nReturns the natural logarithm of X; that is, the base-e logarithm of X.\nIf X is less than or equal to 0, then NULL is returned.\n\nURL: https://mariadb.com/kb/en/ln/\n\n','MariaDB> SELECT LN(2);\n -> 0.69314718055995\nMariaDB> SELECT LN(-2);\n -> NULL\n','https://mariadb.com/kb/en/ln/'),(491,'RETURN',23,'Syntax:\nRETURN expr\n\nThe RETURN statement terminates execution of a stored function and\nreturns the value expr to the function caller. There must be at least\none RETURN statement in a stored function. There may be more than one\nif the function has multiple exit points.\n\nThis statement is not used in stored procedures, triggers, or events.\nThe LEAVE statement can be used to exit a stored program of those\ntypes.\n\nURL: https://mariadb.com/kb/en/return/\n\n','','https://mariadb.com/kb/en/return/'),(492,'SHOW COLLATION',26,'Syntax:\nSHOW COLLATION\n [LIKE \'pattern\' | WHERE expr]\n\nThis statement lists collations supported by the server. By default,\nthe output from SHOW COLLATION includes all available collations. The\nLIKE clause, if present, indicates which collation names to match. The\nWHERE clause can be given to select rows using more general conditions,\nas discussed in\nhttps://mariadb.com/kb/en/extended-show/. For example:\n\nMariaDB> SHOW COLLATION LIKE \'latin1%\';\n+-------------------+---------+----+---------+----------+---------+\n| Collation | Charset | Id | Default | Compiled | Sortlen |\n+-------------------+---------+----+---------+----------+---------+\n| latin1_german1_ci | latin1 | 5 | | | 0 |\n| latin1_swedish_ci | latin1 | 8 | Yes | Yes | 0 |\n| latin1_danish_ci | latin1 | 15 | | | 0 |\n| latin1_german2_ci | latin1 | 31 | | Yes | 2 |\n| latin1_bin | latin1 | 47 | | Yes | 0 |\n| latin1_general_ci | latin1 | 48 | | | 0 |\n| latin1_general_cs | latin1 | 49 | | | 0 |\n| latin1_spanish_ci | latin1 | 94 | | | 0 |\n+-------------------+---------+----+---------+----------+---------+\n\nURL: https://mariadb.com/kb/en/show-collation/\n\n','','https://mariadb.com/kb/en/show-collation/'),(493,'LOG',4,'Syntax:\nLOG(X), LOG(B,X)\n\nIf called with one parameter, this function returns the natural\nlogarithm of X. If X is less than or equal to 0, then NULL is returned.\n\nThe inverse of this function (when called with a single argument) is\nthe EXP() function.\n\nURL: https://mariadb.com/kb/en/log/\n\n','MariaDB> SELECT LOG(2);\n -> 0.69314718055995\nMariaDB> SELECT LOG(-2);\n -> NULL\n','https://mariadb.com/kb/en/log/'),(494,'SET SQL_LOG_BIN',8,'Syntax:\nSET sql_log_bin = {0|1}\n\nThe sql_log_bin variable controls whether logging to the binary log is\ndone. The default value is 1 (do logging). To change logging for the\ncurrent session, change the session value of this variable. The session\nuser must have the SUPER privilege to set this variable.\n\nBeginning with MySQL 5.5.5, it is no longer possible to set\n@@session.sql_log_bin within a transaction or subquery. (Bug #53437)\n\nURL: https://mariadb.com/kb/en/set-sql_log_bin/\n\n','','https://mariadb.com/kb/en/set-sql_log_bin/'),(495,'!=',18,'Syntax:\n<>, !=\n\nNot equal:\n\nURL: https://mariadb.com/kb/en/not-equal/\n\n','MariaDB> SELECT \'.01\' <> \'0.01\';\n -> 1\nMariaDB> SELECT .01 <> \'0.01\';\n -> 0\nMariaDB> SELECT \'zapp\' <> \'zappp\';\n -> 1\n','https://mariadb.com/kb/en/not-equal/'),(496,'WHILE',23,'Syntax:\n[begin_label:] WHILE search_condition DO\n statement_list\nEND WHILE [end_label]\n\nThe statement list within a WHILE statement is repeated as long as the\nsearch_condition expression is true. statement_list consists of one or\nmore SQL statements, each terminated by a semicolon (;) statement\ndelimiter.\n\nA WHILE statement can be labeled. For the rules regarding label use,\nsee [HELP labels].\n\nURL: https://mariadb.com/kb/en/while/\n\n','CREATE PROCEDURE dowhile()\nBEGIN\n DECLARE v1 INT DEFAULT 5;\n\n WHILE v1 > 0 DO\n ...\n SET v1 = v1 - 1;\n END WHILE;\nEND;\n','https://mariadb.com/kb/en/while/'),(497,'AES_DECRYPT',12,'Syntax:\nAES_DECRYPT(crypt_str,key_str)\n\nThis function decrypts data using the official AES (Advanced Encryption\nStandard) algorithm. For more information, see the description of\nAES_ENCRYPT().\n\nURL: https://mariadb.com/kb/en/aes_decrypt/\n\n','','https://mariadb.com/kb/en/aes_decrypt/'),(498,'DAYNAME',31,'Syntax:\nDAYNAME(date)\n\nReturns the name of the weekday for date. The language used for the\nname is controlled by the value of the lc_time_names system variable\n(https://mariadb.com/kb/en/server-system-variables#lc_time_names).\n\nURL: https://mariadb.com/kb/en/dayname/\n\n','MariaDB> SELECT DAYNAME(\'2007-02-03\');\n -> \'Saturday\'\n','https://mariadb.com/kb/en/dayname/'),(499,'COERCIBILITY',17,'Syntax:\nCOERCIBILITY(str)\n\nReturns the collation coercibility value of the string argument.\n\nURL: https://mariadb.com/kb/en/coercibility/\n\n','MariaDB> SELECT COERCIBILITY(\'abc\' COLLATE latin1_swedish_ci);\n -> 0\nMariaDB> SELECT COERCIBILITY(USER());\n -> 3\nMariaDB> SELECT COERCIBILITY(\'abc\');\n -> 4\n','https://mariadb.com/kb/en/coercibility/'),(500,'INT',22,'INT[(M)] [UNSIGNED] [ZEROFILL]\n\nA normal-size integer. The signed range is -2147483648 to 2147483647.\nThe unsigned range is 0 to 4294967295.\n\nURL: https://mariadb.com/kb/en/int/\n\n','','https://mariadb.com/kb/en/int/'),(501,'GLENGTH',13,'GLength(ls)\n\nReturns as a double-precision number the length of the LineString value\nls in its associated spatial reference.\n\nURL: https://mariadb.com/kb/en/glength/\n\n','MariaDB> SET @ls = \'LineString(1 1,2 2,3 3)\';\nMariaDB> SELECT GLength(GeomFromText(@ls));\n+----------------------------+\n| GLength(GeomFromText(@ls)) |\n+----------------------------+\n| 2.8284271247462 |\n+----------------------------+\n','https://mariadb.com/kb/en/glength/'),(502,'RADIANS',4,'Syntax:\nRADIANS(X)\n\nReturns the argument X, converted from degrees to radians. (Note that\nπ radians equals 180 degrees.)\n\nURL: https://mariadb.com/kb/en/radians/\n\n','MariaDB> SELECT RADIANS(90);\n -> 1.5707963267949\n','https://mariadb.com/kb/en/radians/'),(503,'COLLATION',17,'Syntax:\nCOLLATION(str)\n\nReturns the collation of the string argument.\n\nURL: https://mariadb.com/kb/en/collation/\n\n','MariaDB> SELECT COLLATION(\'abc\');\n -> \'latin1_swedish_ci\'\nMariaDB> SELECT COLLATION(_utf8\'abc\');\n -> \'utf8_general_ci\'\n','https://mariadb.com/kb/en/collation/'),(504,'COALESCE',18,'Syntax:\nCOALESCE(value,...)\n\nReturns the first non-NULL value in the list, or NULL if there are no\nnon-NULL values.\n\nURL: https://mariadb.com/kb/en/coalesce/\n\n','MariaDB> SELECT COALESCE(NULL,1);\n -> 1\nMariaDB> SELECT COALESCE(NULL,NULL,NULL);\n -> NULL\n','https://mariadb.com/kb/en/coalesce/'),(505,'VERSION',17,'Syntax:\nVERSION()\n\nReturns a string that indicates the MySQL server version. The string\nuses the utf8 character set. The value might have a suffix in addition\nto the version number. See the description of the version system\nvariable in\nhttps://mariadb.com/kb/en/server-system-variables#version.\n\nURL: https://mariadb.com/kb/en/version/\n\n','MariaDB> SELECT VERSION();\n -> \'5.5.29-standard\'\n','https://mariadb.com/kb/en/version/'),(506,'MAKE_SET',37,'Syntax:\nMAKE_SET(bits,str1,str2,...)\n\nReturns a set value (a string containing substrings separated by \",\"\ncharacters) consisting of the strings that have the corresponding bit\nin bits set. str1 corresponds to bit 0, str2 to bit 1, and so on. NULL\nvalues in str1, str2, ... are not appended to the result.\n\nURL: https://mariadb.com/kb/en/make_set/\n\n','MariaDB> SELECT MAKE_SET(1,\'a\',\'b\',\'c\');\n -> \'a\'\nMariaDB> SELECT MAKE_SET(1 | 4,\'hello\',\'nice\',\'world\');\n -> \'hello,world\'\nMariaDB> SELECT MAKE_SET(1 | 4,\'hello\',\'nice\',NULL,\'world\');\n -> \'hello\'\nMariaDB> SELECT MAKE_SET(0,\'a\',\'b\',\'c\');\n -> \'\'\n','https://mariadb.com/kb/en/make_set/'),(507,'FIND_IN_SET',37,'Syntax:\nFIND_IN_SET(str,strlist)\n\nReturns a value in the range of 1 to N if the string str is in the\nstring list strlist consisting of N substrings. A string list is a\nstring composed of substrings separated by \",\" characters. If the first\nargument is a constant string and the second is a column of type SET,\nthe FIND_IN_SET() function is optimized to use bit arithmetic. Returns\n0 if str is not in strlist or if strlist is the empty string. Returns\nNULL if either argument is NULL. This function does not work properly\nif the first argument contains a comma (\",\") character.\n\nURL: https://mariadb.com/kb/en/find_in_set/\n\n','MariaDB> SELECT FIND_IN_SET(\'b\',\'a,b,c,d\');\n -> 2\n','https://mariadb.com/kb/en/find_in_set/');
+/*!40000 ALTER TABLE `help_topic` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `host`
+--
+
+DROP TABLE IF EXISTS `host`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `host` (
+ `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Db` char(64) COLLATE utf8_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',
+ `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',
+ `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',
+ `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',
+ `Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+ `Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+ PRIMARY KEY (`Host`,`Db`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Host privileges; Merged with database privileges';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `host`
+--
+
+LOCK TABLES `host` WRITE;
+/*!40000 ALTER TABLE `host` DISABLE KEYS */;
+/*!40000 ALTER TABLE `host` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `index_stats`
+--
+
+DROP TABLE IF EXISTS `index_stats`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `index_stats` (
+ `db_name` varchar(64) COLLATE utf8_bin NOT NULL,
+ `table_name` varchar(64) COLLATE utf8_bin NOT NULL,
+ `index_name` varchar(64) COLLATE utf8_bin NOT NULL,
+ `prefix_arity` int(11) unsigned NOT NULL,
+ `avg_frequency` decimal(12,4) DEFAULT NULL,
+ PRIMARY KEY (`db_name`,`table_name`,`index_name`,`prefix_arity`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Statistics on Indexes';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `index_stats`
+--
+
+LOCK TABLES `index_stats` WRITE;
+/*!40000 ALTER TABLE `index_stats` DISABLE KEYS */;
+/*!40000 ALTER TABLE `index_stats` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `innodb_index_stats`
+--
+
+DROP TABLE IF EXISTS `innodb_index_stats`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `innodb_index_stats` (
+ `database_name` varchar(64) COLLATE utf8_bin NOT NULL,
+ `table_name` varchar(64) COLLATE utf8_bin NOT NULL,
+ `index_name` varchar(64) COLLATE utf8_bin NOT NULL,
+ `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `stat_name` varchar(64) COLLATE utf8_bin NOT NULL,
+ `stat_value` bigint(20) unsigned NOT NULL,
+ `sample_size` bigint(20) unsigned DEFAULT NULL,
+ `stat_description` varchar(1024) COLLATE utf8_bin NOT NULL,
+ PRIMARY KEY (`database_name`,`table_name`,`index_name`,`stat_name`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin STATS_PERSISTENT=0;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `innodb_index_stats`
+--
+
+LOCK TABLES `innodb_index_stats` WRITE;
+/*!40000 ALTER TABLE `innodb_index_stats` DISABLE KEYS */;
+INSERT INTO `innodb_index_stats` VALUES ('mysql','gtid_slave_pos','PRIMARY','2020-05-31 16:11:18','n_diff_pfx01',0,1,'domain_id'),('mysql','gtid_slave_pos','PRIMARY','2020-05-31 16:11:18','n_diff_pfx02',0,1,'domain_id,sub_id'),('mysql','gtid_slave_pos','PRIMARY','2020-05-31 16:11:18','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('mysql','gtid_slave_pos','PRIMARY','2020-05-31 16:11:18','size',1,NULL,'Number of pages in the index');
+/*!40000 ALTER TABLE `innodb_index_stats` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `innodb_table_stats`
+--
+
+DROP TABLE IF EXISTS `innodb_table_stats`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `innodb_table_stats` (
+ `database_name` varchar(64) COLLATE utf8_bin NOT NULL,
+ `table_name` varchar(64) COLLATE utf8_bin NOT NULL,
+ `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `n_rows` bigint(20) unsigned NOT NULL,
+ `clustered_index_size` bigint(20) unsigned NOT NULL,
+ `sum_of_other_index_sizes` bigint(20) unsigned NOT NULL,
+ PRIMARY KEY (`database_name`,`table_name`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin STATS_PERSISTENT=0;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `innodb_table_stats`
+--
+
+LOCK TABLES `innodb_table_stats` WRITE;
+/*!40000 ALTER TABLE `innodb_table_stats` DISABLE KEYS */;
+INSERT INTO `innodb_table_stats` VALUES ('mysql','gtid_slave_pos','2020-05-31 16:11:18',0,1,0);
+/*!40000 ALTER TABLE `innodb_table_stats` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `plugin`
+--
+
+DROP TABLE IF EXISTS `plugin`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `plugin` (
+ `name` varchar(64) NOT NULL DEFAULT '',
+ `dl` varchar(128) NOT NULL DEFAULT '',
+ PRIMARY KEY (`name`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='MySQL plugins';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `plugin`
+--
+
+LOCK TABLES `plugin` WRITE;
+/*!40000 ALTER TABLE `plugin` DISABLE KEYS */;
+/*!40000 ALTER TABLE `plugin` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `proc`
+--
+
+DROP TABLE IF EXISTS `proc`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `proc` (
+ `db` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
+ `name` char(64) NOT NULL DEFAULT '',
+ `type` enum('FUNCTION','PROCEDURE') NOT NULL,
+ `specific_name` char(64) NOT NULL DEFAULT '',
+ `language` enum('SQL') NOT NULL DEFAULT 'SQL',
+ `sql_data_access` enum('CONTAINS_SQL','NO_SQL','READS_SQL_DATA','MODIFIES_SQL_DATA') NOT NULL DEFAULT 'CONTAINS_SQL',
+ `is_deterministic` enum('YES','NO') NOT NULL DEFAULT 'NO',
+ `security_type` enum('INVOKER','DEFINER') NOT NULL DEFAULT 'DEFINER',
+ `param_list` blob NOT NULL,
+ `returns` longblob NOT NULL,
+ `body` longblob NOT NULL,
+ `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') 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,
+ `db_collation` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
+ `body_utf8` longblob,
+ PRIMARY KEY (`db`,`name`,`type`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Stored Procedures';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `proc`
+--
+
+LOCK TABLES `proc` WRITE;
+/*!40000 ALTER TABLE `proc` DISABLE KEYS */;
+/*!40000 ALTER TABLE `proc` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `procs_priv`
+--
+
+DROP TABLE IF EXISTS `procs_priv`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `procs_priv` (
+ `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Routine_name` char(64) CHARACTER SET utf8 NOT NULL DEFAULT '',
+ `Routine_type` enum('FUNCTION','PROCEDURE') COLLATE utf8_bin NOT NULL,
+ `Grantor` char(141) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Proc_priv` set('Execute','Alter Routine','Grant') CHARACTER SET utf8 NOT NULL DEFAULT '',
+ `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ PRIMARY KEY (`Host`,`Db`,`User`,`Routine_name`,`Routine_type`),
+ KEY `Grantor` (`Grantor`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Procedure privileges';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `procs_priv`
+--
+
+LOCK TABLES `procs_priv` WRITE;
+/*!40000 ALTER TABLE `procs_priv` DISABLE KEYS */;
+/*!40000 ALTER TABLE `procs_priv` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `proxies_priv`
+--
+
+DROP TABLE IF EXISTS `proxies_priv`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `proxies_priv` (
+ `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Proxied_host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Proxied_user` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `With_grant` tinyint(1) NOT NULL DEFAULT '0',
+ `Grantor` char(141) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ PRIMARY KEY (`Host`,`User`,`Proxied_host`,`Proxied_user`),
+ KEY `Grantor` (`Grantor`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='User proxy privileges';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `proxies_priv`
+--
+
+LOCK TABLES `proxies_priv` WRITE;
+/*!40000 ALTER TABLE `proxies_priv` DISABLE KEYS */;
+INSERT INTO `proxies_priv` VALUES ('localhost','root','','',1,'','2020-05-31 16:11:21'),('asus','root','','',1,'','2020-05-31 16:11:21');
+/*!40000 ALTER TABLE `proxies_priv` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `roles_mapping`
+--
+
+DROP TABLE IF EXISTS `roles_mapping`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `roles_mapping` (
+ `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Role` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Admin_option` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+ UNIQUE KEY `Host` (`Host`,`User`,`Role`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Granted roles';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `roles_mapping`
+--
+
+LOCK TABLES `roles_mapping` WRITE;
+/*!40000 ALTER TABLE `roles_mapping` DISABLE KEYS */;
+/*!40000 ALTER TABLE `roles_mapping` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `servers`
+--
+
+DROP TABLE IF EXISTS `servers`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `servers` (
+ `Server_name` char(64) NOT NULL DEFAULT '',
+ `Host` char(64) NOT NULL DEFAULT '',
+ `Db` char(64) NOT NULL DEFAULT '',
+ `Username` char(80) NOT NULL DEFAULT '',
+ `Password` char(64) NOT NULL DEFAULT '',
+ `Port` int(4) NOT NULL DEFAULT '0',
+ `Socket` char(64) NOT NULL DEFAULT '',
+ `Wrapper` char(64) NOT NULL DEFAULT '',
+ `Owner` char(64) NOT NULL DEFAULT '',
+ PRIMARY KEY (`Server_name`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='MySQL Foreign Servers table';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `servers`
+--
+
+LOCK TABLES `servers` WRITE;
+/*!40000 ALTER TABLE `servers` DISABLE KEYS */;
+/*!40000 ALTER TABLE `servers` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `table_stats`
+--
+
+DROP TABLE IF EXISTS `table_stats`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `table_stats` (
+ `db_name` varchar(64) COLLATE utf8_bin NOT NULL,
+ `table_name` varchar(64) COLLATE utf8_bin NOT NULL,
+ `cardinality` bigint(21) unsigned DEFAULT NULL,
+ PRIMARY KEY (`db_name`,`table_name`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Statistics on Tables';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `table_stats`
+--
+
+LOCK TABLES `table_stats` WRITE;
+/*!40000 ALTER TABLE `table_stats` DISABLE KEYS */;
+/*!40000 ALTER TABLE `table_stats` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `tables_priv`
+--
+
+DROP TABLE IF EXISTS `tables_priv`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `tables_priv` (
+ `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Grantor` char(141) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `Table_priv` set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') CHARACTER SET utf8 NOT NULL DEFAULT '',
+ `Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '',
+ PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`),
+ KEY `Grantor` (`Grantor`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Table privileges';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `tables_priv`
+--
+
+LOCK TABLES `tables_priv` WRITE;
+/*!40000 ALTER TABLE `tables_priv` DISABLE KEYS */;
+/*!40000 ALTER TABLE `tables_priv` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `time_zone`
+--
+
+DROP TABLE IF EXISTS `time_zone`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `time_zone` (
+ `Time_zone_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `Use_leap_seconds` enum('Y','N') NOT NULL DEFAULT 'N',
+ PRIMARY KEY (`Time_zone_id`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Time zones';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `time_zone`
+--
+
+LOCK TABLES `time_zone` WRITE;
+/*!40000 ALTER TABLE `time_zone` DISABLE KEYS */;
+/*!40000 ALTER TABLE `time_zone` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `time_zone_leap_second`
+--
+
+DROP TABLE IF EXISTS `time_zone_leap_second`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `time_zone_leap_second` (
+ `Transition_time` bigint(20) NOT NULL,
+ `Correction` int(11) NOT NULL,
+ PRIMARY KEY (`Transition_time`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Leap seconds information for time zones';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `time_zone_leap_second`
+--
+
+LOCK TABLES `time_zone_leap_second` WRITE;
+/*!40000 ALTER TABLE `time_zone_leap_second` DISABLE KEYS */;
+/*!40000 ALTER TABLE `time_zone_leap_second` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `time_zone_name`
+--
+
+DROP TABLE IF EXISTS `time_zone_name`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `time_zone_name` (
+ `Name` char(64) NOT NULL,
+ `Time_zone_id` int(10) unsigned NOT NULL,
+ PRIMARY KEY (`Name`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Time zone names';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `time_zone_name`
+--
+
+LOCK TABLES `time_zone_name` WRITE;
+/*!40000 ALTER TABLE `time_zone_name` DISABLE KEYS */;
+/*!40000 ALTER TABLE `time_zone_name` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `time_zone_transition`
+--
+
+DROP TABLE IF EXISTS `time_zone_transition`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `time_zone_transition` (
+ `Time_zone_id` int(10) unsigned NOT NULL,
+ `Transition_time` bigint(20) NOT NULL,
+ `Transition_type_id` int(10) unsigned NOT NULL,
+ PRIMARY KEY (`Time_zone_id`,`Transition_time`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Time zone transitions';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `time_zone_transition`
+--
+
+LOCK TABLES `time_zone_transition` WRITE;
+/*!40000 ALTER TABLE `time_zone_transition` DISABLE KEYS */;
+/*!40000 ALTER TABLE `time_zone_transition` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `time_zone_transition_type`
+--
+
+DROP TABLE IF EXISTS `time_zone_transition_type`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `time_zone_transition_type` (
+ `Time_zone_id` int(10) unsigned NOT NULL,
+ `Transition_type_id` int(10) unsigned NOT NULL,
+ `Offset` int(11) NOT NULL DEFAULT '0',
+ `Is_DST` tinyint(3) unsigned NOT NULL DEFAULT '0',
+ `Abbreviation` char(8) NOT NULL DEFAULT '',
+ PRIMARY KEY (`Time_zone_id`,`Transition_type_id`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Time zone transition types';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `time_zone_transition_type`
+--
+
+LOCK TABLES `time_zone_transition_type` WRITE;
+/*!40000 ALTER TABLE `time_zone_transition_type` DISABLE KEYS */;
+/*!40000 ALTER TABLE `time_zone_transition_type` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `user`
+--
+
+DROP TABLE IF EXISTS `user`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+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',
+ `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',
+ PRIMARY KEY (`Host`,`User`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Users and global privileges';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `user`
+--
+
+LOCK TABLES `user` WRITE;
+/*!40000 ALTER TABLE `user` DISABLE KEYS */;
+INSERT INTO `user` VALUES ('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','','','','',0,0,0,0,'','','N','N'),('asus','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','','','','',0,0,0,0,'','','N','N'),('127.0.0.1','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','','','','',0,0,0,0,'','','N','N'),('::1','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','','','','',0,0,0,0,'','','N','N'),('localhost','','','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,'','','N','N'),('asus','','','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,'','','N','N');
+/*!40000 ALTER TABLE `user` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `general_log`
+--
+
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE IF NOT EXISTS `general_log` (
+ `event_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
+ `user_host` mediumtext NOT NULL,
+ `thread_id` bigint(21) unsigned NOT NULL,
+ `server_id` int(10) unsigned NOT NULL,
+ `command_type` varchar(64) NOT NULL,
+ `argument` mediumtext NOT NULL
+) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='General log';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `slow_log`
+--
+
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE IF NOT EXISTS `slow_log` (
+ `start_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
+ `user_host` mediumtext NOT NULL,
+ `query_time` time(6) NOT NULL,
+ `lock_time` time(6) NOT NULL,
+ `rows_sent` int(11) NOT NULL,
+ `rows_examined` int(11) NOT NULL,
+ `db` varchar(512) NOT NULL,
+ `last_insert_id` int(11) NOT NULL,
+ `insert_id` int(11) NOT NULL,
+ `server_id` int(10) unsigned NOT NULL,
+ `sql_text` mediumtext NOT NULL,
+ `thread_id` bigint(21) unsigned NOT NULL
+) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log';
+/*!40101 SET character_set_client = @saved_cs_client */;
+/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
+
+/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
+/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
+/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
+/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
+/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
+/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
+/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
+
+-- Dump completed on 2020-05-31 19:11:50
diff --git a/mysql-test/std_data/mysql_database_10.1.dump b/mysql-test/std_data/mysql_database_10.1.dump
new file mode 100644
index 00000000000..c46a4be8a17
--- /dev/null
+++ b/mysql-test/std_data/mysql_database_10.1.dump
@@ -0,0 +1,906 @@
+-- MySQL dump 10.16 Distrib 10.1.45-MariaDB, for Linux (x86_64)
+--
+-- Host: localhost Database: mysql
+-- ------------------------------------------------------
+-- Server version 10.1.45-MariaDB
+
+/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
+/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
+/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
+/*!40101 SET NAMES utf8 */;
+/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
+/*!40103 SET TIME_ZONE='+00:00' */;
+/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
+/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
+/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
+/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
+
+--
+-- Table structure for table `column_stats`
+--
+
+DROP TABLE IF EXISTS `column_stats`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `column_stats` (
+ `db_name` varchar(64) COLLATE utf8_bin NOT NULL,
+ `table_name` varchar(64) COLLATE utf8_bin NOT NULL,
+ `column_name` varchar(64) COLLATE utf8_bin NOT NULL,
+ `min_value` varbinary(255) DEFAULT NULL,
+ `max_value` varbinary(255) DEFAULT NULL,
+ `nulls_ratio` decimal(12,4) DEFAULT NULL,
+ `avg_length` decimal(12,4) DEFAULT NULL,
+ `avg_frequency` decimal(12,4) DEFAULT NULL,
+ `hist_size` tinyint(3) unsigned DEFAULT NULL,
+ `hist_type` enum('SINGLE_PREC_HB','DOUBLE_PREC_HB') COLLATE utf8_bin DEFAULT NULL,
+ `histogram` varbinary(255) DEFAULT NULL,
+ PRIMARY KEY (`db_name`,`table_name`,`column_name`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Statistics on Columns';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `column_stats`
+--
+
+LOCK TABLES `column_stats` WRITE;
+/*!40000 ALTER TABLE `column_stats` DISABLE KEYS */;
+/*!40000 ALTER TABLE `column_stats` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `columns_priv`
+--
+
+DROP TABLE IF EXISTS `columns_priv`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `columns_priv` (
+ `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Column_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '',
+ PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`,`Column_name`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Column privileges';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `columns_priv`
+--
+
+LOCK TABLES `columns_priv` WRITE;
+/*!40000 ALTER TABLE `columns_priv` DISABLE KEYS */;
+/*!40000 ALTER TABLE `columns_priv` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `db`
+--
+
+DROP TABLE IF EXISTS `db`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `db` (
+ `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `User` char(80) COLLATE utf8_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',
+ `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',
+ `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',
+ `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',
+ `Execute_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',
+ PRIMARY KEY (`Host`,`Db`,`User`),
+ KEY `User` (`User`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Database privileges';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `db`
+--
+
+LOCK TABLES `db` WRITE;
+/*!40000 ALTER TABLE `db` DISABLE KEYS */;
+INSERT INTO `db` VALUES ('%','test','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N','Y','Y'),('%','test\\_%','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N','Y','Y');
+/*!40000 ALTER TABLE `db` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `event`
+--
+
+DROP TABLE IF EXISTS `event`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `event` (
+ `db` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
+ `name` char(64) NOT NULL DEFAULT '',
+ `body` longblob NOT NULL,
+ `definer` char(141) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
+ `execute_at` datetime DEFAULT NULL,
+ `interval_value` int(11) DEFAULT NULL,
+ `interval_field` enum('YEAR','QUARTER','MONTH','DAY','HOUR','MINUTE','WEEK','SECOND','MICROSECOND','YEAR_MONTH','DAY_HOUR','DAY_MINUTE','DAY_SECOND','HOUR_MINUTE','HOUR_SECOND','MINUTE_SECOND','DAY_MICROSECOND','HOUR_MICROSECOND','MINUTE_MICROSECOND','SECOND_MICROSECOND') DEFAULT NULL,
+ `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `last_executed` datetime DEFAULT NULL,
+ `starts` datetime DEFAULT NULL,
+ `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') 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',
+ `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,
+ `db_collation` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
+ `body_utf8` longblob,
+ PRIMARY KEY (`db`,`name`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Events';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `func`
+--
+
+DROP TABLE IF EXISTS `func`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `func` (
+ `name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `ret` tinyint(1) NOT NULL DEFAULT '0',
+ `dl` char(128) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `type` enum('function','aggregate') CHARACTER SET utf8 NOT NULL,
+ PRIMARY KEY (`name`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='User defined functions';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `func`
+--
+
+LOCK TABLES `func` WRITE;
+/*!40000 ALTER TABLE `func` DISABLE KEYS */;
+/*!40000 ALTER TABLE `func` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `gtid_slave_pos`
+--
+
+DROP TABLE IF EXISTS `gtid_slave_pos`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `gtid_slave_pos` (
+ `domain_id` int(10) unsigned NOT NULL,
+ `sub_id` bigint(20) unsigned NOT NULL,
+ `server_id` int(10) unsigned NOT NULL,
+ `seq_no` bigint(20) unsigned NOT NULL,
+ PRIMARY KEY (`domain_id`,`sub_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Replication slave GTID position';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `gtid_slave_pos`
+--
+
+LOCK TABLES `gtid_slave_pos` WRITE;
+/*!40000 ALTER TABLE `gtid_slave_pos` DISABLE KEYS */;
+/*!40000 ALTER TABLE `gtid_slave_pos` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `help_category`
+--
+
+DROP TABLE IF EXISTS `help_category`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `help_category` (
+ `help_category_id` smallint(5) unsigned NOT NULL,
+ `name` char(64) NOT NULL,
+ `parent_category_id` smallint(5) unsigned DEFAULT NULL,
+ `url` text NOT NULL,
+ PRIMARY KEY (`help_category_id`),
+ UNIQUE KEY `name` (`name`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='help categories';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `help_category`
+--
+
+LOCK TABLES `help_category` WRITE;
+/*!40000 ALTER TABLE `help_category` DISABLE KEYS */;
+INSERT INTO `help_category` VALUES (1,'Geographic',0,''),(2,'Polygon properties',34,''),(3,'WKT',34,''),(4,'Numeric Functions',38,''),(5,'Plugins',35,''),(6,'MBR',34,''),(7,'Control flow functions',38,''),(8,'Transactions',35,''),(9,'Help Metadata',35,''),(10,'Account Management',35,''),(11,'Point properties',34,''),(12,'Encryption Functions',38,''),(13,'LineString properties',34,''),(14,'Miscellaneous Functions',38,''),(15,'Logical operators',38,''),(16,'Functions and Modifiers for Use with GROUP BY',35,''),(17,'Information Functions',38,''),(18,'Comparison operators',38,''),(19,'Bit Functions',38,''),(20,'Table Maintenance',35,''),(21,'User-Defined Functions',35,''),(22,'Data Types',35,''),(23,'Compound Statements',35,''),(24,'Geometry constructors',34,''),(25,'GeometryCollection properties',1,''),(26,'Administration',35,''),(27,'Data Manipulation',35,''),(28,'Utility',35,''),(29,'Language Structure',35,''),(30,'Geometry relations',34,''),(31,'Date and Time Functions',38,''),(32,'WKB',34,''),(33,'Procedures',35,''),(34,'Geographic Features',35,''),(35,'Contents',0,''),(36,'Geometry properties',34,''),(37,'String Functions',38,''),(38,'Functions',35,''),(39,'Data Definition',35,'');
+/*!40000 ALTER TABLE `help_category` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `help_keyword`
+--
+
+DROP TABLE IF EXISTS `help_keyword`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `help_keyword` (
+ `help_keyword_id` int(10) unsigned NOT NULL,
+ `name` char(64) NOT NULL,
+ PRIMARY KEY (`help_keyword_id`),
+ UNIQUE KEY `name` (`name`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='help keywords';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `help_keyword`
+--
+
+LOCK TABLES `help_keyword` WRITE;
+/*!40000 ALTER TABLE `help_keyword` DISABLE KEYS */;
+INSERT INTO `help_keyword` VALUES (0,'JOIN'),(1,'HOST'),(2,'REPEAT'),(3,'SERIALIZABLE'),(4,'REPLACE'),(5,'AT'),(6,'SCHEDULE'),(7,'RETURNS'),(8,'STARTS'),(9,'MASTER_SSL_CA'),(10,'NCHAR'),(11,'COLUMNS'),(12,'COMPLETION'),(13,'WORK'),(14,'DATETIME'),(15,'MODE'),(16,'OPEN'),(17,'INTEGER'),(18,'ESCAPE'),(19,'VALUE'),(20,'MASTER_SSL_VERIFY_SERVER_CERT'),(21,'SQL_BIG_RESULT'),(22,'DROP'),(23,'GEOMETRYCOLLECTIONFROMWKB'),(24,'EVENTS'),(25,'MONTH'),(26,'PROFILES'),(27,'DUPLICATE'),(28,'REPLICATION'),(29,'UNLOCK'),(30,'INNODB'),(31,'YEAR_MONTH'),(32,'SUBJECT'),(33,'PREPARE'),(34,'LOCK'),(35,'NDB'),(36,'CHECK'),(37,'FULL'),(38,'INT4'),(39,'BY'),(40,'NO'),(41,'MINUTE'),(42,'PARTITION'),(43,'DATA'),(44,'DAY'),(45,'SHARE'),(46,'REAL'),(47,'SEPARATOR'),(48,'MESSAGE_TEXT'),(49,'MASTER_HEARTBEAT_PERIOD'),(50,'DELETE'),(51,'ON'),(52,'COLUMN_NAME'),(53,'CONNECTION'),(54,'CLOSE'),(55,'X509'),(56,'USE'),(57,'SUBCLASS_ORIGIN'),(58,'WHERE'),(59,'PRIVILEGES'),(60,'SPATIAL'),(61,'EVENT'),(62,'SUPER'),(63,'SQL_BUFFER_RESULT'),(64,'IGNORE'),(65,'SHA2'),(66,'QUICK'),(67,'SIGNED'),(68,'OFFLINE'),(69,'SECURITY'),(70,'AUTOEXTEND_SIZE'),(71,'NDBCLUSTER'),(72,'POLYGONFROMWKB'),(73,'FALSE'),(74,'LEVEL'),(75,'FORCE'),(76,'BINARY'),(77,'TO'),(78,'CHANGE'),(79,'CURRENT_USER'),(80,'HOUR_MINUTE'),(81,'UPDATE'),(82,'PRESERVE'),(83,'TABLE_NAME'),(84,'INTO'),(85,'FEDERATED'),(86,'VARYING'),(87,'MAX_SIZE'),(88,'HOUR_SECOND'),(89,'VARIABLE'),(90,'ROLLBACK'),(91,'PROCEDURE'),(92,'TIMESTAMP'),(93,'IMPORT'),(94,'AGAINST'),(95,'CHECKSUM'),(96,'COUNT'),(97,'LONGBINARY'),(98,'THEN'),(99,'INSERT'),(100,'ENGINES'),(101,'HANDLER'),(102,'PORT'),(103,'DAY_SECOND'),(104,'EXISTS'),(105,'MUTEX'),(106,'HELP_DATE'),(107,'RELEASE'),(108,'BOOLEAN'),(109,'MOD'),(110,'DEFAULT'),(111,'TYPE'),(112,'NO_WRITE_TO_BINLOG'),(113,'OPTIMIZE'),(114,'SQLSTATE'),(115,'RESET'),(116,'CLASS_ORIGIN'),(117,'INSTALL'),(118,'ITERATE'),(119,'DO'),(120,'BIGINT'),(121,'SET'),(122,'ISSUER'),(123,'DATE'),(124,'STATUS'),(125,'FULLTEXT'),(126,'COMMENT'),(127,'MASTER_CONNECT_RETRY'),(128,'INNER'),(129,'RELAYLOG'),(130,'STOP'),(131,'MASTER_LOG_FILE'),(132,'MRG_MYISAM'),(133,'PRECISION'),(134,'REQUIRE'),(135,'TRAILING'),(136,'PARTITIONS'),(137,'LONG'),(138,'OPTION'),(139,'REORGANIZE'),(140,'ELSE'),(141,'DEALLOCATE'),(142,'IO_THREAD'),(143,'CASE'),(144,'CIPHER'),(145,'CONTINUE'),(146,'FROM'),(147,'READ'),(148,'LEFT'),(149,'ELSEIF'),(150,'MINUTE_SECOND'),(151,'COMPACT'),(152,'DEC'),(153,'FOR'),(154,'WARNINGS'),(155,'MIN_ROWS'),(156,'STRING'),(157,'CONDITION'),(158,'ENCLOSED'),(159,'FUNCTION'),(160,'AGGREGATE'),(161,'FIELDS'),(162,'INT3'),(163,'ARCHIVE'),(164,'AVG_ROW_LENGTH'),(165,'ADD'),(166,'KILL'),(167,'FLOAT4'),(168,'TABLESPACE'),(169,'VIEW'),(170,'REPEATABLE'),(171,'INFILE'),(172,'HELP_VERSION'),(173,'ORDER'),(174,'USING'),(175,'CONSTRAINT_CATALOG'),(176,'MIDDLEINT'),(177,'GRANT'),(178,'UNSIGNED'),(179,'DECIMAL'),(180,'GEOMETRYFROMTEXT'),(181,'INDEXES'),(182,'FOREIGN'),(183,'CACHE'),(184,'HOSTS'),(185,'MYSQL_ERRNO'),(186,'COMMIT'),(187,'SCHEMAS'),(188,'LEADING'),(189,'SNAPSHOT'),(190,'CONSTRAINT_NAME'),(191,'DECLARE'),(192,'LOAD'),(193,'SQL_CACHE'),(194,'CONVERT'),(195,'DYNAMIC'),(196,'COLLATE'),(197,'POLYGONFROMTEXT'),(198,'BYTE'),(199,'GLOBAL'),(200,'LINESTRINGFROMWKB'),(201,'WHEN'),(202,'HAVING'),(203,'AS'),(204,'STARTING'),(205,'RELOAD'),(206,'AUTOCOMMIT'),(207,'REVOKE'),(208,'GRANTS'),(209,'OUTER'),(210,'CURSOR_NAME'),(211,'FLOOR'),(212,'EXPLAIN'),(213,'WITH'),(214,'AFTER'),(215,'STD'),(216,'CSV'),(217,'DISABLE'),(218,'UNINSTALL'),(219,'OUTFILE'),(220,'LOW_PRIORITY'),(221,'FILE'),(222,'NODEGROUP'),(223,'SCHEMA'),(224,'SONAME'),(225,'POW'),(226,'DUAL'),(227,'MULTIPOINTFROMWKB'),(228,'INDEX'),(229,'MULTIPOINTFROMTEXT'),(230,'DEFINER'),(231,'MASTER_BIND'),(232,'REMOVE'),(233,'EXTENDED'),(234,'MULTILINESTRINGFROMWKB'),(235,'CROSS'),(236,'CONTRIBUTORS'),(237,'NATIONAL'),(238,'GROUP'),(239,'SHA'),(240,'ONLINE'),(241,'UNDO'),(242,'IGNORE_SERVER_IDS'),(243,'ZEROFILL'),(244,'CLIENT'),(245,'MASTER_PASSWORD'),(246,'OWNER'),(247,'RELAY_LOG_FILE'),(248,'TRUE'),(249,'CHARACTER'),(250,'MASTER_USER'),(251,'SCHEMA_NAME'),(252,'TABLE'),(253,'ENGINE'),(254,'INSERT_METHOD'),(255,'CASCADE'),(256,'RELAY_LOG_POS'),(257,'SQL_CALC_FOUND_ROWS'),(258,'UNION'),(259,'MYISAM'),(260,'LEAVE'),(261,'MODIFY'),(262,'MATCH'),(263,'MASTER_LOG_POS'),(264,'DISTINCTROW'),(265,'DESC'),(266,'TIME'),(267,'NUMERIC'),(268,'EXPANSION'),(269,'CODE'),(270,'CURSOR'),(271,'GEOMETRYCOLLECTIONFROMTEXT'),(272,'CHAIN'),(273,'LOGFILE'),(274,'FLUSH'),(275,'CREATE'),(276,'DESCRIBE'),(277,'EXTENT_SIZE'),(278,'MAX_UPDATES_PER_HOUR'),(279,'INT2'),(280,'PROCESSLIST'),(281,'ENDS'),(282,'LOGS'),(283,'DISCARD'),(284,'HEAP'),(285,'SOUNDS'),(286,'BETWEEN'),(287,'MULTILINESTRINGFROMTEXT'),(288,'REPAIR'),(289,'PACK_KEYS'),(290,'FAST'),(291,'VALUES'),(292,'CALL'),(293,'LOOP'),(294,'VARCHARACTER'),(295,'BEFORE'),(296,'TRUNCATE'),(297,'SHOW'),(298,'ALL'),(299,'REDUNDANT'),(300,'USER_RESOURCES'),(301,'PARTIAL'),(302,'BINLOG'),(303,'END'),(304,'SECOND'),(305,'AND'),(306,'FLOAT8'),(307,'PREV'),(308,'HOUR'),(309,'SELECT'),(310,'DATABASES'),(311,'OR'),(312,'IDENTIFIED'),(313,'WRAPPER'),(314,'MASTER_SSL_CIPHER'),(315,'SQL_SLAVE_SKIP_COUNTER'),(316,'BOTH'),(317,'BOOL'),(318,'YEAR'),(319,'MASTER_PORT'),(320,'CONCURRENT'),(321,'HELP'),(322,'UNIQUE'),(323,'TRIGGERS'),(324,'PROCESS'),(325,'OPTIONS'),(326,'RESIGNAL'),(327,'CONSISTENT'),(328,'MASTER_SSL'),(329,'DATE_ADD'),(330,'MAX_CONNECTIONS_PER_HOUR'),(331,'LIKE'),(332,'PLUGIN'),(333,'FETCH'),(334,'IN'),(335,'COLUMN'),(336,'DUMPFILE'),(337,'USAGE'),(338,'EXECUTE'),(339,'MEMORY'),(340,'CEIL'),(341,'QUERY'),(342,'MASTER_HOST'),(343,'LINES'),(344,'SQL_THREAD'),(345,'SERVER'),(346,'MAX_QUERIES_PER_HOUR'),(347,'MASTER_SSL_CERT'),(348,'MULTIPOLYGONFROMWKB'),(349,'TRANSACTION'),(350,'DAY_MINUTE'),(351,'STDDEV'),(352,'DATE_SUB'),(353,'REBUILD'),(354,'GEOMETRYFROMWKB'),(355,'INT1'),(356,'RENAME'),(357,'PARSER'),(358,'RIGHT'),(359,'ALTER'),(360,'MAX_ROWS'),(361,'SOCKET'),(362,'STRAIGHT_JOIN'),(363,'NATURAL'),(364,'VARIABLES'),(365,'ESCAPED'),(366,'SHA1'),(367,'KEY_BLOCK_SIZE'),(368,'PASSWORD'),(369,'OFFSET'),(370,'CHAR'),(371,'NEXT'),(372,'ERRORS'),(373,'SQL_LOG_BIN'),(374,'TEMPORARY'),(375,'COMMITTED'),(376,'SQL_SMALL_RESULT'),(377,'UPGRADE'),(378,'BEGIN'),(379,'DELAY_KEY_WRITE'),(380,'PROFILE'),(381,'MEDIUM'),(382,'INTERVAL'),(383,'SSL'),(384,'DAY_HOUR'),(385,'NAME'),(386,'REFERENCES'),(387,'AES_ENCRYPT'),(388,'STORAGE'),(389,'ISOLATION'),(390,'CEILING'),(391,'EVERY'),(392,'INT8'),(393,'AUTHORS'),(394,'RESTRICT'),(395,'UNCOMMITTED'),(396,'LINESTRINGFROMTEXT'),(397,'IS'),(398,'NOT'),(399,'ANALYSE'),(400,'DATAFILE'),(401,'DES_KEY_FILE'),(402,'SIGNAL'),(403,'COMPRESSED'),(404,'START'),(405,'PLUGINS'),(406,'SAVEPOINT'),(407,'IF'),(408,'ROWS'),(409,'PRIMARY'),(410,'PURGE'),(411,'LAST'),(412,'USER'),(413,'EXIT'),(414,'KEYS'),(415,'LIMIT'),(416,'KEY'),(417,'MERGE'),(418,'UNTIL'),(419,'SQL_NO_CACHE'),(420,'DELAYED'),(421,'CONSTRAINT_SCHEMA'),(422,'ANALYZE'),(423,'CONSTRAINT'),(424,'SERIAL'),(425,'ACTION'),(426,'WRITE'),(427,'INITIAL_SIZE'),(428,'SESSION'),(429,'DATABASE'),(430,'NULL'),(431,'POWER'),(432,'USE_FRM'),(433,'TERMINATED'),(434,'SLAVE'),(435,'NVARCHAR'),(436,'ASC'),(437,'RETURN'),(438,'OPTIONALLY'),(439,'ENABLE'),(440,'DIRECTORY'),(441,'MAX_USER_CONNECTIONS'),(442,'WHILE'),(443,'LOCAL'),(444,'DISTINCT'),(445,'AES_DECRYPT'),(446,'MASTER_SSL_KEY'),(447,'NONE'),(448,'TABLES'),(449,'<>'),(450,'RLIKE'),(451,'TRIGGER'),(452,'COLLATION'),(453,'SHUTDOWN'),(454,'HIGH_PRIORITY'),(455,'BTREE'),(456,'FIRST'),(457,'COALESCE'),(458,'WAIT'),(459,'CATALOG_NAME'),(460,'MASTER'),(461,'FIXED'),(462,'MULTIPOLYGONFROMTEXT'),(463,'ROW_FORMAT');
+/*!40000 ALTER TABLE `help_keyword` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `help_relation`
+--
+
+DROP TABLE IF EXISTS `help_relation`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `help_relation` (
+ `help_topic_id` int(10) unsigned NOT NULL,
+ `help_keyword_id` int(10) unsigned NOT NULL,
+ PRIMARY KEY (`help_keyword_id`,`help_topic_id`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='keyword-topic relation';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `help_relation`
+--
+
+LOCK TABLES `help_relation` WRITE;
+/*!40000 ALTER TABLE `help_relation` DISABLE KEYS */;
+INSERT INTO `help_relation` VALUES (1,0),(356,0),(473,1),(232,2),(447,3),(3,4),(130,4),(421,4),(89,5),(89,6),(406,6),(97,7),(89,8),(185,9),(430,10),(21,11),(347,11),(421,11),(463,11),(468,11),(89,12),(406,12),(146,13),(230,14),(88,15),(356,15),(18,16),(106,16),(134,16),(347,16),(97,17),(500,17),(380,18),(3,19),(104,19),(243,19),(374,19),(459,19),(185,20),(356,21),(9,22),(30,22),(34,22),(87,22),(186,22),(237,22),(263,22),(276,22),(300,22),(331,22),(405,22),(415,22),(416,22),(463,22),(478,22),(108,23),(122,24),(170,24),(424,24),(376,25),(82,26),(104,27),(199,28),(36,29),(347,30),(468,30),(376,31),(199,32),(35,33),(237,33),(36,34),(356,34),(468,35),(417,36),(463,36),(468,36),(21,37),(294,37),(347,37),(451,37),(468,37),(500,38),(48,39),(77,39),(83,39),(130,39),(199,39),(356,39),(361,39),(421,39),(463,39),(468,39),(468,40),(472,40),(376,41),(463,42),(468,42),(212,43),(421,43),(468,43),(473,43),(376,44),(356,45),(97,46),(314,46),(361,47),(374,48),(459,48),(185,49),(48,50),(468,50),(472,50),(1,51),(89,51),(406,51),(472,51),(374,52),(459,52),(176,53),(468,53),(51,54),(106,54),(199,55),(1,56),(55,56),(194,56),(374,57),(459,57),(48,58),(83,58),(106,58),(193,59),(199,59),(249,59),(210,60),(463,60),(89,61),(300,61),(358,61),(406,61),(199,62),(356,63),(1,64),(83,64),(104,64),(130,64),(356,64),(421,64),(463,64),(66,65),(48,66),(417,66),(466,66),(230,67),(87,68),(210,68),(463,68),(199,69),(194,70),(468,71),(91,72),(482,72),(385,73),(447,74),(1,75),(39,76),(230,76),(269,76),(185,77),(269,77),(460,77),(185,78),(463,78),(89,79),(406,79),(376,80),(83,81),(104,81),(356,81),(472,81),(89,82),(406,82),(374,83),(459,83),(3,84),(104,84),(304,84),(356,84),(468,85),(257,86),(194,87),(376,88),(129,89),(146,90),(460,90),(17,91),(189,91),(302,91),(328,91),(347,91),(356,91),(416,91),(439,91),(488,91),(99,92),(188,92),(421,93),(463,93),(88,94),(401,95),(468,95),(69,96),(330,96),(433,96),(285,97),(28,98),(57,98),(85,98),(104,99),(195,99),(301,99),(486,99),(282,100),(347,100),(106,101),(313,101),(473,102),(376,103),(9,104),(30,104),(89,104),(155,104),(186,104),(276,104),(300,104),(347,105),(365,105),(109,106),(146,107),(460,107),(24,108),(88,108),(113,109),(174,109),(3,110),(104,110),(155,110),(200,110),(212,110),(243,110),(463,110),(468,110),(463,111),(115,112),(326,112),(466,112),(470,112),(115,113),(463,113),(374,114),(459,114),(38,115),(119,115),(151,115),(264,115),(374,116),(459,116),(419,117),(124,118),(89,119),(125,119),(406,119),(496,119),(221,120),(3,121),(83,121),(104,121),(129,121),(130,121),(146,121),(155,121),(182,121),(212,121),(333,121),(347,121),(356,121),(374,121),(421,121),(459,121),(463,121),(468,121),(472,121),(477,121),(494,121),(199,122),(132,123),(230,123),(262,123),(376,123),(58,124),(137,124),(215,124),(223,124),(328,124),(336,124),(347,124),(365,124),(210,125),(463,125),(468,125),(89,126),(194,126),(210,126),(406,126),(468,126),(185,127),(1,128),(424,129),(52,130),(185,131),(468,132),(314,133),(199,134),(455,135),(255,136),(285,137),(199,138),(249,138),(463,139),(57,140),(85,140),(237,141),(52,142),(324,142),(57,143),(85,143),(199,144),(313,145),(48,146),(122,146),(347,146),(356,146),(424,146),(455,146),(36,147),(106,147),(447,147),(1,148),(28,149),(376,150),(468,151),(209,152),(180,153),(313,153),(347,153),(356,153),(420,153),(330,154),(347,154),(468,155),(97,156),(180,157),(421,158),(34,159),(68,159),(97,159),(211,159),(233,159),(302,159),(336,159),(347,159),(393,159),(405,159),(416,159),(97,160),(347,161),(421,161),(252,162),(468,163),(463,164),(468,164),(60,165),(194,165),(463,165),(478,165),(176,166),(168,167),(194,168),(415,168),(463,168),(478,168),(30,169),(159,169),(454,169),(447,170),(130,171),(421,171),(190,172),(48,173),(83,173),(356,173),(361,173),(463,173),(1,174),(48,174),(86,174),(374,175),(459,175),(252,176),(199,177),(249,177),(24,178),(128,178),(168,178),(209,178),(230,178),(314,178),(500,178),(97,179),(156,179),(230,179),(411,180),(347,181),(463,182),(468,182),(472,182),(473,182),(101,183),(151,183),(304,183),(145,184),(347,184),(374,185),(459,185),(146,186),(160,187),(347,187),(455,188),(146,189),(374,190),(459,190),(180,191),(200,191),(313,191),(420,191),(304,192),(421,192),(356,193),(230,194),(377,194),(468,195),(155,196),(212,196),(468,196),(395,197),(465,198),(129,199),(137,199),(182,199),(349,199),(447,199),(452,200),(57,201),(85,201),(356,202),(1,203),(36,203),(356,203),(421,204),(199,205),(146,206),(249,207),(192,208),(347,208),(1,209),(374,210),(459,210),(221,211),(255,212),(88,213),(199,213),(210,213),(463,213),(468,213),(463,214),(260,215),(421,216),(468,216),(89,217),(406,217),(463,217),(291,218),(356,219),(3,220),(36,220),(48,220),(83,220),(104,220),(130,220),(421,220),(199,221),(194,222),(155,223),(186,223),(212,223),(309,223),(347,223),(97,224),(277,225),(279,226),(464,227),(1,228),(60,228),(87,228),(101,228),(210,228),(304,228),(308,228),(347,228),(463,228),(468,228),(425,229),(89,230),(406,230),(185,231),(463,232),(255,233),(466,233),(272,234),(1,235),(7,236),(347,236),(257,237),(430,237),(194,238),(226,238),(356,238),(427,239),(87,240),(210,240),(463,240),(313,241),(185,242),(24,243),(128,243),(168,243),(209,243),(314,243),(500,243),(199,244),(185,245),(473,246),(185,247),(385,248),(130,249),(155,249),(212,249),(257,249),(333,249),(347,249),(356,249),(421,249),(430,249),(468,249),(185,250),(374,251),(459,251),(60,252),(110,252),(115,252),(215,252),(276,252),(278,252),(321,252),(347,252),(401,252),(417,252),(463,252),(466,252),(468,252),(470,252),(194,253),(347,253),(365,253),(415,253),(463,253),(468,253),(478,253),(468,254),(30,255),(276,255),(468,255),(472,255),(185,256),(356,257),(305,258),(468,259),(310,260),(463,261),(88,262),(185,263),(356,264),(329,265),(356,265),(361,265),(230,266),(315,266),(375,266),(209,267),(88,268),(68,269),(488,269),(420,270),(246,271),(146,272),(194,273),(226,273),(151,274),(326,274),(17,275),(22,275),(60,275),(77,275),(89,275),(97,275),(155,275),(194,275),(210,275),(211,275),(278,275),(302,275),(309,275),(347,275),(358,275),(393,275),(454,275),(468,275),(473,275),(329,276),(194,277),(199,278),(234,279),(347,280),(451,280),(89,281),(39,282),(269,282),(347,282),(463,283),(468,284),(378,285),(147,286),(107,287),(463,288),(466,288),(468,289),(417,290),(3,291),(104,291),(339,292),(344,293),(257,294),(269,295),(321,296),(463,296),(7,297),(10,297),(17,297),(21,297),(25,297),(33,297),(39,297),(58,297),(68,297),(69,297),(82,297),(122,297),(134,297),(137,297),(145,297),(160,297),(170,297),(192,297),(193,297),(215,297),(223,297),(278,297),(282,297),(294,297),(308,297),(309,297),(328,297),(330,297),(333,297),(336,297),(347,297),(349,297),(358,297),(365,297),(393,297),(424,297),(451,297),(487,297),(488,297),(492,297),(38,298),(199,298),(249,298),(305,298),(356,298),(468,299),(326,300),(468,301),(122,302),(350,302),(28,303),(57,303),(85,303),(232,303),(327,303),(344,303),(496,303),(376,304),(147,305),(316,305),(314,306),(106,307),(376,308),(3,309),(104,309),(255,309),(301,309),(356,309),(160,310),(347,310),(141,311),(77,312),(130,312),(199,312),(473,313),(185,314),(182,315),(455,316),(24,317),(111,317),(376,318),(185,319),(130,320),(421,320),(118,321),(390,321),(463,322),(25,323),(347,323),(199,324),(373,325),(473,325),(374,326),(146,327),(185,328),(376,329),(199,330),(347,331),(378,331),(291,332),(347,332),(419,332),(383,333),(88,334),(122,334),(356,334),(424,334),(463,335),(356,336),(199,337),(86,338),(199,338),(356,339),(397,340),(88,341),(151,341),(176,341),(185,342),(130,343),(421,343),(52,344),(324,344),(9,345),(373,345),(473,345),(199,346),(185,347),(123,348),(146,349),(447,349),(376,350),(407,351),(376,352),(463,353),(144,354),(24,355),(110,356),(222,356),(406,356),(463,356),(210,357),(463,357),(468,357),(1,358),(60,359),(159,359),(199,359),(212,359),(226,359),(233,359),(373,359),(406,359),(439,359),(463,359),(478,359),(463,360),(468,360),(473,361),(1,362),(356,362),(1,363),(347,364),(349,364),(421,365),(427,366),(468,367),(77,368),(199,368),(473,368),(477,368),(356,369),(230,370),(465,370),(106,371),(69,372),(347,372),(494,373),(276,374),(447,375),(356,376),(212,377),(417,377),(146,378),(327,378),(468,379),(487,380),(417,381),(89,382),(376,382),(199,383),(376,384),(212,385),(199,386),(468,386),(472,386),(443,387),(282,388),(447,389),(448,390),(89,391),(128,392),(10,393),(347,393),(30,394),(276,394),(472,394),(447,395),(56,396),(84,397),(206,397),(368,397),(456,397),(84,398),(89,398),(155,398),(206,398),(312,398),(189,399),(194,400),(478,400),(326,401),(459,402),(468,403),(146,404),(324,404),(33,405),(460,406),(9,407),(28,407),(30,407),(89,407),(155,407),(186,407),(276,407),(300,407),(479,407),(130,408),(463,409),(269,410),(106,411),(77,412),(222,412),(331,412),(473,412),(313,413),(308,414),(347,414),(463,414),(48,415),(83,415),(106,415),(122,415),(356,415),(424,415),(60,416),(104,416),(463,416),(468,416),(472,416),(468,417),(232,418),(356,419),(3,420),(104,420),(486,420),(374,421),(459,421),(463,422),(470,422),(463,423),(468,423),(243,424),(468,424),(468,425),(472,425),(36,426),(194,427),(478,427),(129,428),(137,428),(349,428),(447,428),(155,429),(186,429),(212,429),(309,429),(347,429),(473,429),(84,430),(368,430),(472,430),(483,431),(466,432),(421,433),(38,434),(52,434),(89,434),(145,434),(223,434),(324,434),(406,434),(257,435),(356,436),(361,436),(491,437),(421,438),(89,439),(406,439),(463,439),(212,440),(468,440),(199,441),(496,442),(36,443),(115,443),(130,443),(326,443),(421,443),(466,443),(470,443),(0,444),(96,444),(288,444),(305,444),(356,444),(361,444),(384,444),(433,444),(497,445),(185,446),(199,447),(36,448),(134,448),(294,448),(347,448),(495,449),(27,450),(22,451),(263,451),(347,451),(347,452),(492,452),(199,453),(104,454),(356,454),(210,455),(106,456),(463,456),(468,456),(463,457),(194,458),(478,458),(374,459),(459,459),(39,460),(58,460),(185,460),(264,460),(269,460),(209,461),(468,461),(201,462),(468,463);
+/*!40000 ALTER TABLE `help_relation` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `help_topic`
+--
+
+DROP TABLE IF EXISTS `help_topic`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `help_topic` (
+ `help_topic_id` int(10) unsigned NOT NULL,
+ `name` char(64) NOT NULL,
+ `help_category_id` smallint(5) unsigned NOT NULL,
+ `description` text NOT NULL,
+ `example` text NOT NULL,
+ `url` text NOT NULL,
+ PRIMARY KEY (`help_topic_id`),
+ UNIQUE KEY `name` (`name`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='help topics';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `help_topic`
+--
+
+LOCK TABLES `help_topic` WRITE;
+/*!40000 ALTER TABLE `help_topic` DISABLE KEYS */;
+INSERT INTO `help_topic` VALUES (0,'MIN',16,'Syntax:\nMIN([DISTINCT] expr)\n\nReturns the minimum value of expr. MIN() may take a string argument; in\nsuch cases, it returns the minimum string value.\nThe DISTINCT keyword can be used to find the minimum of the distinct values\nof expr, however, this produces the same result as omitting DISTINCT.\n\nMIN() returns NULL if there were no matching rows.\n\nURL: https://mariadb.com/kb/en/min/\n\n','MariaDB> SELECT student_name, MIN(test_score), MAX(test_score)\n -> FROM student\n -> GROUP BY student_name;\n','https://mariadb.com/kb/en/min/'),(1,'JOIN',27,'MySQL supports the following JOIN syntaxes for the table_references\npart of SELECT statements and multiple-table DELETE and UPDATE\nstatements:\n\ntable_references:\n table_reference [, table_reference] ...\n\ntable_reference:\n table_factor\n | join_table\n\ntable_factor:\n tbl_name [[AS] alias] [index_hint_list]\n | table_subquery [AS] alias\n | ( table_references )\n | { OJ table_reference LEFT OUTER JOIN table_reference\n ON conditional_expr }\n\njoin_table:\n table_reference [INNER | CROSS] JOIN table_factor [join_condition]\n | table_reference STRAIGHT_JOIN table_factor\n | table_reference STRAIGHT_JOIN table_factor ON conditional_expr\n | table_reference {LEFT|RIGHT} [OUTER] JOIN table_reference join_condition\n | table_reference NATURAL [{LEFT|RIGHT} [OUTER]] JOIN table_factor\n\njoin_condition:\n ON conditional_expr\n | USING (column_list)\n\nindex_hint_list:\n index_hint [, index_hint] ...\n\nindex_hint:\n USE {INDEX|KEY}\n [FOR {JOIN|ORDER BY|GROUP BY}] ([index_list])\n | IGNORE {INDEX|KEY}\n [FOR {JOIN|ORDER BY|GROUP BY}] (index_list)\n | FORCE {INDEX|KEY}\n [FOR {JOIN|ORDER BY|GROUP BY}] (index_list)\n\nindex_list:\n index_name [, index_name] ...\n\nA table reference is also known as a join expression.\n\nThe syntax of table_factor is extended in comparison with the SQL\nStandard. The latter accepts only table_reference, not a list of them\ninside a pair of parentheses.\n\nThis is a conservative extension if we consider each comma in a list of\ntable_reference items as equivalent to an inner join. For example:\n\nSELECT * FROM t1 LEFT JOIN (t2, t3, t4)\n ON (t2.a=t1.a AND t3.b=t1.b AND t4.c=t1.c)\n\nis equivalent to:\n\nSELECT * FROM t1 LEFT JOIN (t2 CROSS JOIN t3 CROSS JOIN t4)\n ON (t2.a=t1.a AND t3.b=t1.b AND t4.c=t1.c)\n\nIn MySQL, JOIN, CROSS JOIN, and INNER JOIN are syntactic equivalents\n(they can replace each other). In standard SQL, they are not\nequivalent. INNER JOIN is used with an ON clause, CROSS JOIN is used\notherwise.\n\nIn general, parentheses can be ignored in join expressions containing\nonly inner join operations.\n\nIndex hints can be specified to affect how the MySQL optimizer makes\nuse of indexes. For more information, see\nhttps://mariadb.com/kb/en/how-to-force-query-plans/.\n\nURL: https://mariadb.com/kb/en/join-syntax/\n\n','SELECT left_tbl.*\n FROM left_tbl LEFT JOIN right_tbl ON left_tbl.id = right_tbl.id\n WHERE right_tbl.id IS NULL;\n','https://mariadb.com/kb/en/join-syntax/'),(2,'HEX',37,'Syntax:\nHEX(str), HEX(N)\n\nFor a string argument str, HEX() returns a hexadecimal string\nrepresentation of str where each character in str is converted to two\nhexadecimal digits. The inverse of this operation is performed by the\nUNHEX() function.\n\nFor a numeric argument N, HEX() returns a hexadecimal string\nrepresentation of the value of N treated as a longlong (BIGINT) number.\nThis is equivalent to CONV(N,10,16). The inverse of this operation is\nperformed by CONV(HEX(N),16,10).\n\nURL: https://mariadb.com/kb/en/hex/\n\n','MariaDB> SELECT 0x616263, HEX(\'abc\'), UNHEX(HEX(\'abc\'));\n -> \'abc\', 616263, \'abc\'\nMariaDB> SELECT HEX(255), CONV(HEX(255),16,10);\n -> \'FF\', 255\n','https://mariadb.com/kb/en/hex/'),(3,'REPLACE',27,'Syntax:\nREPLACE [LOW_PRIORITY | DELAYED]\n [INTO] tbl_name [(col_name,...)]\n {VALUES | VALUE} ({expr | DEFAULT},...),(...),...\n\nOr:\n\nREPLACE [LOW_PRIORITY | DELAYED]\n [INTO] tbl_name\n SET col_name={expr | DEFAULT}, ...\n\nOr:\n\nREPLACE [LOW_PRIORITY | DELAYED]\n [INTO] tbl_name [(col_name,...)]\n SELECT ...\n\nREPLACE works exactly like INSERT, except that if an old row in the\ntable has the same value as a new row for a PRIMARY KEY or a UNIQUE\nindex, the old row is deleted before the new row is inserted. See [HELP\nINSERT].\n\nREPLACE is a MySQL extension to the SQL standard. It either inserts, or\ndeletes and inserts. For another MySQL extension to standard SQL---that\neither inserts or updates---see\nhttps://mariadb.com/kb/en/insert-on-duplicate-key-update/.\n\nNote that unless the table has a PRIMARY KEY or UNIQUE index, using a\nREPLACE statement makes no sense. It becomes equivalent to INSERT,\nbecause there is no index to be used to determine whether a new row\nduplicates another.\n\nValues for all columns are taken from the values specified in the\nREPLACE statement. Any missing columns are set to their default values,\njust as happens for INSERT. You cannot refer to values from the current\nrow and use them in the new row. If you use an assignment such as SET\ncol_name = col_name + 1, the reference to the column name on the right\nhand side is treated as DEFAULT(col_name), so the assignment is\nequivalent to SET col_name = DEFAULT(col_name) + 1.\n\nTo use REPLACE, you must have both the INSERT and DELETE privileges for\nthe table.\n\nURL: https://mariadb.com/kb/en/replace/\n\n','','https://mariadb.com/kb/en/replace/'),(4,'CONTAINS',30,'Contains(g1,g2)\n\nReturns 1 or 0 to indicate whether g1 completely contains g2. This\ntests the opposite relationship as Within().\n\nURL: https://mariadb.com/kb/en/contains/\n\n','','https://mariadb.com/kb/en/contains/'),(5,'SRID',36,'SRID(g)\n\nReturns an integer indicating the Spatial Reference System ID for the\ngeometry value g.\n\nIn MySQL, the SRID value is just an integer associated with the\ngeometry value. All calculations are done assuming Euclidean (planar)\ngeometry.\n\nURL: https://mariadb.com/kb/en/srid/\n\n','MariaDB> SELECT SRID(GeomFromText(\'LineString(1 1,2 2)\',101));\n+-----------------------------------------------+\n| SRID(GeomFromText(\'LineString(1 1,2 2)\',101)) |\n+-----------------------------------------------+\n| 101 |\n+-----------------------------------------------+\n','https://mariadb.com/kb/en/srid/'),(6,'CURRENT_TIMESTAMP',31,'Syntax:\nCURRENT_TIMESTAMP, CURRENT_TIMESTAMP()\n\nCURRENT_TIMESTAMP and CURRENT_TIMESTAMP() are synonyms for NOW().\n\nURL: https://mariadb.com/kb/en/current_timestamp/\n\n','','https://mariadb.com/kb/en/current_timestamp/'),(7,'SHOW CONTRIBUTORS',26,'Syntax:\nSHOW CONTRIBUTORS\n\nThe SHOW CONTRIBUTORS statement displays information about the people\nwho contribute to MySQL source or to causes that we support. For each\ncontributor, it displays Name, Location, and Comment values.\n\nURL: https://mariadb.com/kb/en/show-contributors/\n\n','','https://mariadb.com/kb/en/show-contributors/'),(8,'VARIANCE',16,'Syntax:\nVARIANCE(expr)\n\nReturns the population standard variance of expr. This is an extension\nto standard SQL. The standard SQL function VAR_POP() can be used\ninstead.\n\nVARIANCE() returns NULL if there were no matching rows.\n\nURL: https://mariadb.com/kb/en/variance/\n\n','','https://mariadb.com/kb/en/variance/'),(9,'DROP SERVER',39,'Syntax:\nDROP SERVER [ IF EXISTS ] server_name\n\nDrops the server definition for the server named server_name. The\ncorresponding row within the mysql.servers table will be deleted. This\nstatement requires the SUPER privilege.\n\nDropping a server for a table does not affect any FEDERATED tables that\nused this connection information when they were created. See [HELP\nCREATE SERVER].\n\nURL: https://mariadb.com/kb/en/drop-server/\n\n','','https://mariadb.com/kb/en/drop-server/'),(10,'SHOW AUTHORS',26,'Syntax:\nSHOW AUTHORS\n\nThe SHOW AUTHORS statement displays information about the people who\nwork on MySQL. For each author, it displays Name, Location, and Comment\nvalues.\n\nURL: https://mariadb.com/kb/en/show-authors/\n\n','','https://mariadb.com/kb/en/show-authors/'),(11,'VAR_SAMP',16,'Syntax:\nVAR_SAMP(expr)\n\nReturns the sample variance of expr. That is, the denominator is the\nnumber of rows minus one.\n\nVAR_SAMP() returns NULL if there were no matching rows.\n\nURL: https://mariadb.com/kb/en/var_samp/\n\n','','https://mariadb.com/kb/en/var_samp/'),(12,'CONCAT',37,'Syntax:\nCONCAT(str1,str2,...)\n\nReturns the string that results from concatenating the arguments. May\nhave one or more arguments. If all arguments are nonbinary strings, the\nresult is a nonbinary string. If the arguments include any binary\nstrings, the result is a binary string. A numeric argument is converted\nto its equivalent string form. This is a nonbinary string as of MySQL\n5.5.3. Before 5.5.3, it is a binary string; to to avoid that and\nproduce a nonbinary string, you can use an explicit type cast, as in\nthis example:\n\nSELECT CONCAT(CAST(int_col AS CHAR), char_col);\n\nCONCAT() returns NULL if any argument is NULL.\n\nURL: https://mariadb.com/kb/en/concat/\n\n','MariaDB> SELECT CONCAT(\'My\', \'S\', \'QL\');\n -> \'MySQL\'\nMariaDB> SELECT CONCAT(\'My\', NULL, \'QL\');\n -> NULL\nMariaDB> SELECT CONCAT(14.3);\n -> \'14.3\'\n','https://mariadb.com/kb/en/concat/'),(13,'GEOMETRY HIERARCHY',34,'Geometry is the base class. It is an abstract class. The instantiable\nsubclasses of Geometry are restricted to zero-, one-, and\ntwo-dimensional geometric objects that exist in two-dimensional\ncoordinate space. All instantiable geometry classes are defined so that\nvalid instances of a geometry class are topologically closed (that is,\nall defined geometries include their boundary).\n\nThe base Geometry class has subclasses for Point, Curve, Surface, and\nGeometryCollection:\n\no Point represents zero-dimensional objects.\n\no Curve represents one-dimensional objects, and has subclass\n LineString, with sub-subclasses Line and LinearRing.\n\no Surface is designed for two-dimensional objects and has subclass\n Polygon.\n\no GeometryCollection has specialized zero-, one-, and two-dimensional\n collection classes named MultiPoint, MultiLineString, and\n MultiPolygon for modeling geometries corresponding to collections of\n Points, LineStrings, and Polygons, respectively. MultiCurve and\n MultiSurface are introduced as abstract superclasses that generalize\n the collection interfaces to handle Curves and Surfaces.\n\nGeometry, Curve, Surface, MultiCurve, and MultiSurface are defined as\nnoninstantiable classes. They define a common set of methods for their\nsubclasses and are included for extensibility.\n\nPoint, LineString, Polygon, GeometryCollection, MultiPoint,\nMultiLineString, and MultiPolygon are instantiable classes.\n\nURL: https://mariadb.com/kb/en/geometry-hierarchy/\n\n','','https://mariadb.com/kb/en/geometry-hierarchy/'),(14,'CHAR FUNCTION',37,'Syntax:\nCHAR(N,... [USING charset_name])\n\nCHAR() interprets each argument N as an integer and returns a string\nconsisting of the characters given by the code values of those\nintegers. NULL values are skipped.\nBy default, CHAR() returns a binary string. To produce a string in a\ngiven character set, use the optional USING clause:\n\nMariaDB> SELECT CHARSET(CHAR(0x65)), CHARSET(CHAR(0x65 USING utf8));\n+---------------------+--------------------------------+\n| CHARSET(CHAR(0x65)) | CHARSET(CHAR(0x65 USING utf8)) |\n+---------------------+--------------------------------+\n| binary | utf8 |\n+---------------------+--------------------------------+\n\nIf USING is given and the result string is illegal for the given\ncharacter set, a warning is issued. Also, if strict SQL mode is\nenabled, the result from CHAR() becomes NULL.\n\nURL: https://mariadb.com/kb/en/char-function/\n\n','MariaDB> SELECT CHAR(77,121,83,81,\'76\');\n -> \'MySQL\'\nMariaDB> SELECT CHAR(77,77.3,\'77.3\');\n -> \'MMM\'\n','https://mariadb.com/kb/en/char-function/'),(15,'DATETIME',22,'DATETIME\n\nA date and time combination. The supported range is \'1000-01-01\n00:00:00\' to \'9999-12-31 23:59:59\'. MySQL displays DATETIME values in\n\'YYYY-MM-DD HH:MM:SS\' format, but permits assignment of values to\nDATETIME columns using either strings or numbers.\n\nURL: https://mariadb.com/kb/en/datetime/\n\n','','https://mariadb.com/kb/en/datetime/'),(16,'SHOW CREATE TRIGGER',26,'Syntax:\nSHOW CREATE TRIGGER trigger_name\n\nThis statement shows a CREATE TRIGGER statement that creates the given\ntrigger.\n\nURL: https://mariadb.com/kb/en/show-create-trigger/\n\n','','https://mariadb.com/kb/en/show-create-trigger/'),(17,'SHOW CREATE PROCEDURE',26,'Syntax:\nSHOW CREATE PROCEDURE proc_name\n\nThis statement is a MySQL extension. It returns the exact string that\ncan be used to re-create the named stored procedure. A similar\nstatement, SHOW CREATE FUNCTION, displays information about stored\nfunctions (see [HELP SHOW CREATE FUNCTION]).\n\nBoth statements require that you be the owner of the routine or have\nSELECT access to the mysql.proc table. If you do not have privileges\nfor the routine itself, the value displayed for the Create Procedure or\nCreate Function field will be NULL.\n\nURL: https://mariadb.com/kb/en/show-create-procedure/\n\n','MariaDB> SHOW CREATE PROCEDURE test.simpleproc\\G\n*************************** 1. row ***************************\n Procedure: simpleproc\n sql_mode:\n Create Procedure: CREATE PROCEDURE `simpleproc`(OUT param1 INT)\n BEGIN\n SELECT COUNT(*) INTO param1 FROM t;\n END\ncharacter_set_client: latin1\ncollation_connection: latin1_swedish_ci\n Database Collation: latin1_swedish_ci\n\nMariaDB> SHOW CREATE FUNCTION test.hello\\G\n*************************** 1. row ***************************\n Function: hello\n sql_mode:\n Create Function: CREATE FUNCTION `hello`(s CHAR(20))\n RETURNS CHAR(50)\n RETURN CONCAT(\'Hello, \',s,\'!\')\ncharacter_set_client: latin1\ncollation_connection: latin1_swedish_ci\n Database Collation: latin1_swedish_ci\n','https://mariadb.com/kb/en/show-create-procedure/'),(18,'OPEN',23,'Syntax:\nOPEN cursor_name\n\nThis statement opens a previously declared cursor. For an example, see\nhttps://mariadb.com/kb/en/cursor-overview/.\n\nURL: https://mariadb.com/kb/en/open/\n\n','','https://mariadb.com/kb/en/open/'),(19,'INTEGER',22,'INTEGER[(M)] [UNSIGNED] [ZEROFILL]\n\nThis type is a synonym for INT.\n\nURL: https://mariadb.com/kb/en/sql_language-data_types-int\n\n','','https://mariadb.com/kb/en/sql_language-data_types-int'),(20,'LOWER',37,'Syntax:\nLOWER(str)\n\nReturns the string str with all characters changed to lowercase\naccording to the current character set mapping. The default is latin1\n(cp1252 West European).\n\nMariaDB> SELECT LOWER(\'QUADRATICALLY\');\n -> \'quadratically\'\n\nLOWER() (and UPPER()) are ineffective when applied to binary strings\n(BINARY, VARBINARY, BLOB). To perform lettercase conversion, convert\nthe string to a nonbinary string:\n\nMariaDB> SET @str = BINARY \'New York\';\nMariaDB> SELECT LOWER(@str), LOWER(CONVERT(@str USING latin1));\n+-------------+-----------------------------------+\n| LOWER(@str) | LOWER(CONVERT(@str USING latin1)) |\n+-------------+-----------------------------------+\n| New York | new york |\n+-------------+-----------------------------------+\n\nURL: https://mariadb.com/kb/en/lower/\n\n','','https://mariadb.com/kb/en/lower/'),(21,'SHOW COLUMNS',26,'Syntax:\nSHOW [FULL] COLUMNS {FROM | IN} tbl_name [{FROM | IN} db_name]\n [LIKE \'pattern\' | WHERE expr]\n\nSHOW COLUMNS displays information about the columns in a given table.\nIt also works for views. The LIKE clause, if present, indicates which\ncolumn names to match. The WHERE clause can be given to select rows\nusing more general conditions, as discussed in\nhttps://mariadb.com/kb/en/extended-show/.\n\nSHOW COLUMNS displays information only for those columns for which you\nhave some privilege.\n\nMariaDB> SHOW COLUMNS FROM City;\n+------------+----------+------+-----+---------+----------------+\n| Field | Type | Null | Key | Default | Extra |\n+------------+----------+------+-----+---------+----------------+\n| Id | int(11) | NO | PRI | NULL | auto_increment |\n| Name | char(35) | NO | | | |\n| Country | char(3) | NO | UNI | | |\n| District | char(20) | YES | MUL | | |\n| Population | int(11) | NO | | 0 | |\n+------------+----------+------+-----+---------+----------------+\n5 rows in set (0.00 sec)\n\nIf the data types differ from what you expect them to be based on a\nCREATE TABLE statement, note that MySQL sometimes changes data types\nwhen you create or alter a table. The conditions under which this\noccurs are described in\nhttps://mariadb.com/kb/en/silent-column-changes/.\n\nThe FULL keyword causes the output to include the column collation and\ncomments, as well as the privileges you have for each column.\n\nYou can use db_name.tbl_name as an alternative to the tbl_name FROM\ndb_name syntax. In other words, these two statements are equivalent:\n\nMariaDB> SHOW COLUMNS FROM mytable FROM mydb;\nMariaDB> SHOW COLUMNS FROM mydb.mytable;\n\nSHOW COLUMNS displays the following values for each table column:\n\nField indicates the column name.\n\nType indicates the column data type.\n\nCollation indicates the collation for nonbinary string columns, or NULL\nfor other columns. This value is displayed only if you use the FULL\nkeyword.\n\nThe Null field contains YES if NULL values can be stored in the column,\nNO if not.\n\nThe Key field indicates whether the column is indexed:\n\no If Key is empty, the column either is not indexed or is indexed only\n as a secondary column in a multiple-column, nonunique index.\n\no If Key is PRI, the column is a PRIMARY KEY or is one of the columns\n in a multiple-column PRIMARY KEY.\n\no If Key is UNI, the column is the first column of a UNIQUE index. (A\n UNIQUE index permits multiple NULL values, but you can tell whether\n the column permits NULL by checking the Null field.)\n\no If Key is MUL, the column is the first column of a nonunique index in\n which multiple occurrences of a given value are permitted within the\n column.\n\nIf more than one of the Key values applies to a given column of a\ntable, Key displays the one with the highest priority, in the order\nPRI, UNI, MUL.\n\nA UNIQUE index may be displayed as PRI if it cannot contain NULL values\nand there is no PRIMARY KEY in the table. A UNIQUE index may display as\nMUL if several columns form a composite UNIQUE index; although the\ncombination of the columns is unique, each column can still hold\nmultiple occurrences of a given value.\n\nThe Default field indicates the default value that is assigned to the\ncolumn. This is NULL if the column has an explicit default of NULL, or\nif the column definition has no DEFAULT clause.\n\nThe Extra field contains any additional information that is available\nabout a given column. The value is nonempty in these cases:\nauto_increment for columns that have the AUTO_INCREMENT attribute; on\nupdate CURRENT_TIMESTAMP for TIMESTAMP columns that have the ON UPDATE\nCURRENT_TIMESTAMP attribute.\n\nPrivileges indicates the privileges you have for the column. This value\nis displayed only if you use the FULL keyword.\n\nComment indicates any comment the column has. This value is displayed\nonly if you use the FULL keyword.\n\nSHOW FIELDS is a synonym for SHOW COLUMNS. You can also list a table\'s\ncolumns with the mysqlshow db_name tbl_name command.\n\nThe DESCRIBE statement provides information similar to SHOW COLUMNS.\nSee [HELP DESCRIBE].\n\nThe SHOW CREATE TABLE, SHOW TABLE STATUS, and SHOW INDEX statements\nalso provide information about tables. See [HELP SHOW].\n\nURL: https://mariadb.com/kb/en/show-columns/\n\n','','https://mariadb.com/kb/en/show-columns/'),(22,'CREATE TRIGGER',39,'Syntax:\nCREATE\n [DEFINER = { user | CURRENT_USER }]\n TRIGGER trigger_name trigger_time trigger_event\n ON tbl_name FOR EACH ROW trigger_body\n\nThis statement creates a new trigger. A trigger is a named database\nobject that is associated with a table, and that activates when a\nparticular event occurs for the table. The trigger becomes associated\nwith the table named tbl_name, which must refer to a permanent table.\nYou cannot associate a trigger with a TEMPORARY table or a view.\n\nCREATE TRIGGER requires the TRIGGER privilege for the table associated\nwith the trigger. The statement might also require the SUPER privilege,\ndepending on the DEFINER value, as described later in this section. If\nbinary logging is enabled, CREATE TRIGGER might require the SUPER\nprivilege, as described in\nhttps://mariadb.com/kb/en/binary-logging-of-stored-routines/.\n\nThe DEFINER clause determines the security context to be used when\nchecking access privileges at trigger activation time. See later in\nthis section for more information.\n\ntrigger_time is the trigger action time. It can be BEFORE or AFTER to\nindicate that the trigger activates before or after each row to be\nmodified.\n\ntrigger_event indicates the kind of statement that activates the\ntrigger. The trigger_event can be one of the following:\n\no INSERT: The trigger is activated whenever a new row is inserted into\n the table; for example, through INSERT, LOAD DATA, and REPLACE\n statements.\n\no UPDATE: The trigger is activated whenever a row is modified; for\n example, through UPDATE statements.\n\no DELETE: The trigger is activated whenever a row is deleted from the\n table; for example, through DELETE and REPLACE statements. However,\n DROP TABLE and TRUNCATE TABLE statements on the table do not activate\n this trigger, because they do not use DELETE. Dropping a partition\n does not activate DELETE triggers, either. See [HELP TRUNCATE TABLE].\n\nURL: https://mariadb.com/kb/en/create-trigger/\n\n','','https://mariadb.com/kb/en/create-trigger/'),(23,'MONTH',31,'Syntax:\nMONTH(date)\n\nReturns the month for date, in the range 1 to 12 for January to\nDecember, or 0 for dates such as \'0000-00-00\' or \'2008-00-00\' that have\na zero month part.\n\nURL: https://mariadb.com/kb/en/month/\n\n','MariaDB> SELECT MONTH(\'2008-02-03\');\n -> 2\n','https://mariadb.com/kb/en/month/'),(24,'TINYINT',22,'TINYINT[(M)] [UNSIGNED] [ZEROFILL]\n\nA very small integer. The signed range is -128 to 127. The unsigned\nrange is 0 to 255.\n\nURL: https://mariadb.com/kb/en/tinyint/\n\n','','https://mariadb.com/kb/en/tinyint/'),(25,'SHOW TRIGGERS',26,'Syntax:\nSHOW TRIGGERS [{FROM | IN} db_name]\n [LIKE \'pattern\' | WHERE expr]\n\nSHOW TRIGGERS lists the triggers currently defined for tables in a\ndatabase (the default database unless a FROM clause is given). This\nstatement returns results only for databases and tables for which you\nhave the TRIGGER privilege. The LIKE clause, if present, indicates\nwhich table names to match and causes the statement to display triggers\nfor those tables. The WHERE clause can be given to select rows using\nmore general conditions, as discussed in\nhttps://mariadb.com/kb/en/extended-show/.\n\nFor the trigger ins_sum as defined in\nhttps://mariadb.com/kb/en/triggers/, the output of\nthis statement is as shown here:\n\nMariaDB> SHOW TRIGGERS LIKE \'acc%\'\\G\n*************************** 1. row ***************************\n Trigger: ins_sum\n Event: INSERT\n Table: account\n Statement: SET @sum = @sum + NEW.amount\n Timing: BEFORE\n Created: NULL\n sql_mode:\n Definer: myname@localhost\ncharacter_set_client: latin1\ncollation_connection: latin1_swedish_ci\n Database Collation: latin1_swedish_ci\n\ncharacter_set_client is the session value of the character_set_client\nsystem variable when the trigger was created. collation_connection is\nthe session value of the collation_connection system variable when the\ntrigger was created. Database Collation is the collation of the\ndatabase with which the trigger is associated.\n\nURL: https://mariadb.com/kb/en/show-triggers/\n\n','','https://mariadb.com/kb/en/show-triggers/'),(26,'MASTER_POS_WAIT',14,'Syntax:\nMASTER_POS_WAIT(log_name,log_pos[,timeout])\n\nThis function is useful for control of master/slave synchronization. It\nblocks until the slave has read and applied all updates up to the\nspecified position in the master log. The return value is the number of\nlog events the slave had to wait for to advance to the specified\nposition. The function returns NULL if the slave SQL thread is not\nstarted, the slave\'s master information is not initialized, the\narguments are incorrect, or an error occurs. It returns -1 if the\ntimeout has been exceeded. If the slave SQL thread stops while\nMASTER_POS_WAIT() is waiting, the function returns NULL. If the slave\nis past the specified position, the function returns immediately.\n\nIf a timeout value is specified, MASTER_POS_WAIT() stops waiting when\ntimeout seconds have elapsed. timeout must be greater than 0; a zero or\nnegative timeout means no timeout.\n\nURL: https://mariadb.com/kb/en/master_pos_wait/\n\n','','https://mariadb.com/kb/en/master_pos_wait/'),(27,'REGEXP',37,'Syntax:\nexpr REGEXP pat, expr RLIKE pat\n\nPerforms a pattern match of a string expression expr against a pattern\npat. The pattern can be an extended regular expression. The syntax for\nregular expressions is discussed in\nhttps://mariadb.com/kb/en/regexp/. Returns 1 if expr\nmatches pat; otherwise it returns 0. If either expr or pat is NULL, the\nresult is NULL. RLIKE is a synonym for REGEXP, provided for mSQL\ncompatibility.\n\nThe pattern need not be a literal string. For example, it can be\nspecified as a string expression or table column.\n\n*Note*: Because MySQL uses the C escape syntax in strings (for example,\n\"\\n\" to represent the newline character), you must double any \"\\\" that\nyou use in your REGEXP strings.\n\nREGEXP is not case sensitive, except when used with binary strings.\n\nURL: https://mariadb.com/kb/en/regexp/\n\n','MariaDB> SELECT \'Monty!\' REGEXP \'.*\';\n -> 1\nMariaDB> SELECT \'new*\\n*line\' REGEXP \'new\\\\*.\\\\*line\';\n -> 1\nMariaDB> SELECT \'a\' REGEXP \'A\', \'a\' REGEXP BINARY \'A\';\n -> 1 0\nMariaDB> SELECT \'a\' REGEXP \'^[a-d]\';\n -> 1\n','https://mariadb.com/kb/en/regexp/'),(28,'IF STATEMENT',23,'Syntax:\nIF search_condition THEN statement_list\n [ELSEIF search_condition THEN statement_list] ...\n [ELSE statement_list]\nEND IF\n\nThe IF statement for stored programs implements a basic conditional\nconstruct.\n\n*Note*: There is also an IF() function, which differs from the IF\nstatement described here. See\nhttps://mariadb.com/kb/en/if-function/. The\nIF statement can have THEN, ELSE, and ELSEIF clauses, and it is\nterminated with END IF.\n\nIf the search_condition evaluates to true, the corresponding THEN or\nELSEIF clause statement_list executes. If no search_condition matches,\nthe ELSE clause statement_list executes.\n\nEach statement_list consists of one or more SQL statements; an empty\nstatement_list is not permitted.\n\nURL: https://mariadb.com/kb/en/if-statement/\n\n','','https://mariadb.com/kb/en/if-statement/'),(29,'^',19,'Syntax:\n^\n\nBitwise XOR:\n\nURL: https://mariadb.com/kb/en/bitwise-xor/\n\n','MariaDB> SELECT 1 ^ 1;\n -> 0\nMariaDB> SELECT 1 ^ 0;\n -> 1\nMariaDB> SELECT 11 ^ 3;\n -> 8\n','https://mariadb.com/kb/en/bitwise-xor/'),(30,'DROP VIEW',39,'Syntax:\nDROP VIEW [IF EXISTS]\n view_name [, view_name] ...\n [RESTRICT | CASCADE]\n\nDROP VIEW removes one or more views. You must have the DROP privilege\nfor each view. If any of the views named in the argument list do not\nexist, MySQL returns an error indicating by name which nonexisting\nviews it was unable to drop, but it also drops all of the views in the\nlist that do exist.\n\nThe IF EXISTS clause prevents an error from occurring for views that\ndon\'t exist. When this clause is given, a NOTE is generated for each\nnonexistent view. See [HELP SHOW WARNINGS].\n\nRESTRICT and CASCADE, if given, are parsed and ignored.\n\nURL: https://mariadb.com/kb/en/drop-view/\n\n','','https://mariadb.com/kb/en/drop-view/'),(31,'WITHIN',30,'Within(g1,g2)\n\nReturns 1 or 0 to indicate whether g1 is spatially within g2. This\ntests the opposite relationship as Contains().\n\nURL: https://mariadb.com/kb/en/within/\n\n','','https://mariadb.com/kb/en/within/'),(32,'WEEK',31,'Syntax:\nWEEK(date[,mode])\n\nThis function returns the week number for date. The two-argument form\nof WEEK() enables you to specify whether the week starts on Sunday or\nMonday and whether the return value should be in the range from 0 to 53\nor from 1 to 53. If the mode argument is omitted, the value of the\ndefault_week_format system variable is used. See\nhttps://mariadb.com/kb/en/server-system-variables/.\n\nURL: https://mariadb.com/kb/en/week/\n\n','MariaDB> SELECT WEEK(\'2008-02-20\');\n -> 7\nMariaDB> SELECT WEEK(\'2008-02-20\',0);\n -> 7\nMariaDB> SELECT WEEK(\'2008-02-20\',1);\n -> 8\nMariaDB> SELECT WEEK(\'2008-12-31\',1);\n -> 53\n','https://mariadb.com/kb/en/week/'),(33,'SHOW PLUGINS',26,'Syntax:\nSHOW PLUGINS\n\nSHOW PLUGINS displays information about server plugins. Plugin\ninformation is also available in the INFORMATION_SCHEMA.PLUGINS table.\nSee https://mariadb.com/kb/en/information_schemaplugins-table/.\n\nExample of SHOW PLUGINS output:\n\nMariaDB> SHOW PLUGINS\\G\n*************************** 1. row ***************************\n Name: binlog\n Status: ACTIVE\n Type: STORAGE ENGINE\nLibrary: NULL\nLicense: GPL\n*************************** 2. row ***************************\n Name: CSV\n Status: ACTIVE\n Type: STORAGE ENGINE\nLibrary: NULL\nLicense: GPL\n*************************** 3. row ***************************\n Name: MEMORY\n Status: ACTIVE\n Type: STORAGE ENGINE\nLibrary: NULL\nLicense: GPL\n*************************** 4. row ***************************\n Name: MyISAM\n Status: ACTIVE\n Type: STORAGE ENGINE\nLibrary: NULL\nLicense: GPL\n...\n\nURL: https://mariadb.com/kb/en/show-plugins/\n\n','','https://mariadb.com/kb/en/show-plugins/'),(34,'DROP FUNCTION UDF',21,'Syntax:\nDROP FUNCTION function_name\n\nThis statement drops the user-defined function (UDF) named\nfunction_name.\n\nTo drop a function, you must have the DELETE privilege for the mysql\ndatabase. This is because DROP FUNCTION removes a row from the\nmysql.func system table that records the function\'s name, type, and\nshared library name.\n\nURL: https://mariadb.com/kb/en/drop-function-udf/\n\n','','https://mariadb.com/kb/en/drop-function-udf/'),(35,'PREPARE',8,'Syntax:\nPREPARE stmt_name FROM preparable_stmt\n\nThe PREPARE statement prepares a statement and assigns it a name,\nstmt_name, by which to refer to the statement later. Statement names\nare not case sensitive. preparable_stmt is either a string literal or a\nuser variable that contains the text of the statement. The text must\nrepresent a single SQL statement, not multiple statements. Within the\nstatement, \"?\" characters can be used as parameter markers to indicate\nwhere data values are to be bound to the query later when you execute\nit. The \"?\" characters should not be enclosed within quotation marks,\neven if you intend to bind them to string values. Parameter markers can\nbe used only where data values should appear, not for SQL keywords,\nidentifiers, and so forth.\n\nIf a prepared statement with the given name already exists, it is\ndeallocated implicitly before the new statement is prepared. This means\nthat if the new statement contains an error and cannot be prepared, an\nerror is returned and no statement with the given name exists.\n\nA prepared statement is executed with EXECUTE and released with\nDEALLOCATE PREPARE.\n\nThe scope of a prepared statement is the session within which it is\ncreated. Other sessions cannot see it.\n\nURL: https://mariadb.com/kb/en/prepare-statement/\n\n','','https://mariadb.com/kb/en/prepare-statement/'),(36,'LOCK',8,'Syntax:\nLOCK TABLES\n tbl_name [[AS] alias] lock_type\n [, tbl_name [[AS] alias] lock_type] ...\n\nlock_type:\n READ [LOCAL]\n | [LOW_PRIORITY] WRITE\n\nUNLOCK TABLES\n\nMySQL enables client sessions to acquire table locks explicitly for the\npurpose of cooperating with other sessions for access to tables, or to\nprevent other sessions from modifying tables during periods when a\nsession requires exclusive access to them. A session can acquire or\nrelease locks only for itself. One session cannot acquire locks for\nanother session or release locks held by another session.\n\nLocks may be used to emulate transactions or to get more speed when\nupdating tables. This is explained in more detail later in this\nsection.\n\nLOCK TABLES explicitly acquires table locks for the current client\nsession. Table locks can be acquired for base tables or views. You must\nhave the LOCK TABLES privilege, and the SELECT privilege for each\nobject to be locked.\n\nFor view locking, LOCK TABLES adds all base tables used in the view to\nthe set of tables to be locked and locks them automatically. If you\nlock a table explicitly with LOCK TABLES, any tables used in triggers\nare also locked implicitly, as described in\nhttps://mariadb.com/kb/en/triggers-and-implicit-locks/.\n\nUNLOCK TABLES explicitly releases any table locks held by the current\nsession. LOCK TABLES implicitly releases any table locks held by the\ncurrent session before acquiring new locks.\n\nAnother use for UNLOCK TABLES is to release the global read lock\nacquired with the FLUSH TABLES WITH READ LOCK statement, which enables\nyou to lock all tables in all databases. See [HELP FLUSH]. (This is a\nvery convenient way to get backups if you have a file system such as\nVeritas that can take snapshots in time.)\n\nURL: https://mariadb.com/kb/en/transactions-lock/\n\n','','https://mariadb.com/kb/en/transactions-lock/'),(37,'UPDATEXML',37,'Syntax:\nUpdateXML(xml_target, xpath_expr, new_xml)\n\nThis function replaces a single portion of a given fragment of XML\nmarkup xml_target with a new XML fragment new_xml, and then returns the\nchanged XML. The portion of xml_target that is replaced matches an\nXPath expression xpath_expr supplied by the user. In MySQL 5.5, the\nXPath expression can contain at most 127 characters. (This limitation\nis lifted in MySQL 5.6.)\n\nIf no expression matching xpath_expr is found, or if multiple matches\nare found, the function returns the original xml_target XML fragment.\nAll three arguments should be strings.\n\nURL: https://mariadb.com/kb/en/updatexml/\n\n','MariaDB> SELECT\n -> UpdateXML(\'<a><b>ccc</b><d></d></a>\', \'/a\', \'<e>fff</e>\') AS val1,\n -> UpdateXML(\'<a><b>ccc</b><d></d></a>\', \'/b\', \'<e>fff</e>\') AS val2,\n -> UpdateXML(\'<a><b>ccc</b><d></d></a>\', \'//b\', \'<e>fff</e>\') AS val3,\n -> UpdateXML(\'<a><b>ccc</b><d></d></a>\', \'/a/d\', \'<e>fff</e>\') AS val4,\n -> UpdateXML(\'<a><d></d><b>ccc</b><d></d></a>\', \'/a/d\', \'<e>fff</e>\') AS val5\n -> \\G\n\n*************************** 1. row ***************************\nval1: <e>fff</e>\nval2: <a><b>ccc</b><d></d></a>\nval3: <a><e>fff</e><d></d></a>\nval4: <a><b>ccc</b><e>fff</e></a>\nval5: <a><d></d><b>ccc</b><d></d></a>\n','https://mariadb.com/kb/en/updatexml/'),(38,'RESET SLAVE',8,'Syntax:\nRESET SLAVE [ALL]\n\nRESET SLAVE makes the slave forget its replication position in the\nmaster\'s binary log. This statement is meant to be used for a clean\nstart: It deletes the master.info and relay-log.info files, all the\nrelay log files, and starts a new relay log file. To use RESET SLAVE,\nthe slave replication threads must be stopped (use STOP SLAVE if\nnecessary).\n\n*Note*: All relay log files are deleted, even if they have not been\ncompletely executed by the slave SQL thread. (This is a condition\nlikely to exist on a replication slave if you have issued a STOP SLAVE\nstatement or if the slave is highly loaded.)\n\nIn MySQL 5.5 (unlike the case in MySQL 5.1 and earlier), RESET SLAVE\ndoes not change any replication connection parameters such as master\nhost, master port, master user, or master password, which are retained\nin memory. This means that START SLAVE can be issued without requiring\na CHANGE MASTER TO statement following RESET SLAVE.\n\nIn MySQL 5.5.16 and later, you can use RESET SLAVE ALL to reset these\nconnection parameters (Bug #11809016). Connection parameters are also\nreset if the slave mysqld is shut down.\n\nIf the slave SQL thread was in the middle of replicating temporary\ntables when it was stopped, and RESET SLAVE is issued, these replicated\ntemporary tables are deleted on the slave.\n\nURL: https://mariadb.com/kb/en/reset-slave-connection_name/\n\n','','https://mariadb.com/kb/en/reset-slave-connection_name/'),(39,'SHOW BINARY LOGS',26,'Syntax:\nSHOW BINARY LOGS\nSHOW MASTER LOGS\n\nLists the binary log files on the server. This statement is used as\npart of the procedure described in [HELP PURGE BINARY LOGS], that shows\nhow to determine which logs can be purged.\n\nMariaDB> SHOW BINARY LOGS;\n+---------------+-----------+\n| Log_name | File_size |\n+---------------+-----------+\n| binlog.000015 | 724935 |\n| binlog.000016 | 733481 |\n+---------------+-----------+\n\nURL: https://mariadb.com/kb/en/show-binary-logs/\n\n','','https://mariadb.com/kb/en/show-binary-logs/'),(40,'POLYGON',24,'Polygon(ls1,ls2,...)\n\nConstructs a Polygon value from a number of LineString or WKB\nLineString arguments. If any argument does not represent a LinearRing\n(that is, not a closed and simple LineString), the return value is\nNULL.\n\nURL: https://mariadb.com/kb/en/polygon/\n\n','','https://mariadb.com/kb/en/polygon/'),(41,'MINUTE',31,'Syntax:\nMINUTE(time)\n\nReturns the minute for time, in the range 0 to 59.\n\nURL: https://mariadb.com/kb/en/minute/\n\n','MariaDB> SELECT MINUTE(\'2008-02-03 10:05:03\');\n -> 5\n','https://mariadb.com/kb/en/minute/'),(42,'DAY',31,'Syntax:\nDAY(date)\n\nDAY() is a synonym for DAYOFMONTH().\n\nURL: https://mariadb.com/kb/en/day/\n\n','','https://mariadb.com/kb/en/day/'),(43,'MID',37,'Syntax:\nMID(str,pos,len)\n\nMID(str,pos,len) is a synonym for SUBSTRING(str,pos,len).\n\nURL: https://mariadb.com/kb/en/mid/\n\n','','https://mariadb.com/kb/en/mid/'),(44,'UUID',14,'Syntax:\nUUID()\n\nReturns a Universal Unique Identifier (UUID) generated according to\n\"DCE 1.1: Remote Procedure Call\" (Appendix A) CAE (Common Applications\nEnvironment) Specifications published by The Open Group in October 1997\n(Document Number C706,\nhttp://www.opengroup.org/public/pubs/catalog/c706.htm).\n\nA UUID is designed as a number that is globally unique in space and\ntime. Two calls to UUID() are expected to generate two different\nvalues, even if these calls are performed on two separate computers\nthat are not connected to each other.\n\nA UUID is a 128-bit number represented by a utf8 string of five\nhexadecimal numbers in aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee format:\n\no The first three numbers are generated from a timestamp.\n\no The fourth number preserves temporal uniqueness in case the timestamp\n value loses monotonicity (for example, due to daylight saving time).\n\no The fifth number is an IEEE 802 node number that provides spatial\n uniqueness. A random number is substituted if the latter is not\n available (for example, because the host computer has no Ethernet\n card, or we do not know how to find the hardware address of an\n interface on your operating system). In this case, spatial uniqueness\n cannot be guaranteed. Nevertheless, a collision should have very low\n probability.\n\n Currently, the MAC address of an interface is taken into account only\n on FreeBSD and Linux. On other operating systems, MySQL uses a\n randomly generated 48-bit number.\n\nURL: https://mariadb.com/kb/en/uuid/\n\n','MariaDB> SELECT UUID();\n -> \'6ccd780c-baba-1026-9564-0040f4311e29\'\n','https://mariadb.com/kb/en/uuid/'),(45,'LINESTRING',24,'LineString(pt1,pt2,...)\n\nConstructs a LineString value from a number of Point or WKB Point\narguments. If the number of arguments is less than two, the return\nvalue is NULL.\n\nURL: https://mariadb.com/kb/en/linestring/\n\n','','https://mariadb.com/kb/en/linestring/'),(46,'SLEEP',14,'Syntax:\nSLEEP(duration)\n\nSleeps (pauses) for the number of seconds given by the duration\nargument, then returns 0. If SLEEP() is interrupted, it returns 1. The\nduration may have a fractional part given in microseconds.\n\nURL: https://mariadb.com/kb/en/sleep/\n\n','','https://mariadb.com/kb/en/sleep/'),(47,'CONNECTION_ID',17,'Syntax:\nCONNECTION_ID()\n\nReturns the connection ID (thread ID) for the connection. Every\nconnection has an ID that is unique among the set of currently\nconnected clients.\n\nURL: https://mariadb.com/kb/en/connection_id/\n\n','MariaDB> SELECT CONNECTION_ID();\n -> 23786\n','https://mariadb.com/kb/en/connection_id/'),(48,'DELETE',27,'Syntax:\nSingle-table syntax:\n\nDELETE [LOW_PRIORITY] [QUICK] [IGNORE] FROM tbl_name\n [WHERE where_condition]\n [ORDER BY ...]\n [LIMIT row_count]\n\nMultiple-table syntax:\n\nDELETE [LOW_PRIORITY] [QUICK] [IGNORE]\n tbl_name[.*] [, tbl_name[.*]] ...\n FROM table_references\n [WHERE where_condition]\n\nOr:\n\nDELETE [LOW_PRIORITY] [QUICK] [IGNORE]\n FROM tbl_name[.*] [, tbl_name[.*]] ...\n USING table_references\n [WHERE where_condition]\n\nFor the single-table syntax, the DELETE statement deletes rows from\ntbl_name and returns a count of the number of deleted rows. This count\ncan be obtained by calling the ROW_COUNT() function (see\nhttps://mariadb.com/kb/en/information-functions-row_count/). The\nWHERE clause, if given, specifies the conditions that identify which\nrows to delete. With no WHERE clause, all rows are deleted. If the\nORDER BY clause is specified, the rows are deleted in the order that is\nspecified. The LIMIT clause places a limit on the number of rows that\ncan be deleted.\n\nFor the multiple-table syntax, DELETE deletes from each tbl_name the\nrows that satisfy the conditions. In this case, ORDER BY and LIMIT\ncannot be used.\n\nwhere_condition is an expression that evaluates to true for each row to\nbe deleted. It is specified as described in\nhttps://mariadb.com/kb/en/select/.\n\nCurrently, you cannot delete from a table and select from the same\ntable in a subquery.\n\nYou need the DELETE privilege on a table to delete rows from it. You\nneed only the SELECT privilege for any columns that are only read, such\nas those named in the WHERE clause.\n\nAs stated, a DELETE statement with no WHERE clause deletes all rows. A\nfaster way to do this, when you do not need to know the number of\ndeleted rows, is to use TRUNCATE TABLE. However, within a transaction\nor if you have a lock on the table, TRUNCATE TABLE cannot be used\nwhereas DELETE can. See [HELP TRUNCATE TABLE], and [HELP LOCK].\n\nURL: https://mariadb.com/kb/en/delete/\n\n','','https://mariadb.com/kb/en/delete/'),(49,'ROUND',4,'Syntax:\nROUND(X), ROUND(X,D)\n\nRounds the argument X to D decimal places. The rounding algorithm\ndepends on the data type of X. D defaults to 0 if not specified. D can\nbe negative to cause D digits left of the decimal point of the value X\nto become zero.\n\nURL: https://mariadb.com/kb/en/round/\n\n','MariaDB> SELECT ROUND(-1.23);\n -> -1\nMariaDB> SELECT ROUND(-1.58);\n -> -2\nMariaDB> SELECT ROUND(1.58);\n -> 2\nMariaDB> SELECT ROUND(1.298, 1);\n -> 1.3\nMariaDB> SELECT ROUND(1.298, 0);\n -> 1\nMariaDB> SELECT ROUND(23.298, -1);\n -> 20\n','https://mariadb.com/kb/en/round/'),(50,'NULLIF',7,'Syntax:\nNULLIF(expr1,expr2)\n\nReturns NULL if expr1 = expr2 is true, otherwise returns expr1. This is\nthe same as CASE WHEN expr1 = expr2 THEN NULL ELSE expr1 END.\n\nURL: https://mariadb.com/kb/en/nullif/\n\n','MariaDB> SELECT NULLIF(1,1);\n -> NULL\nMariaDB> SELECT NULLIF(1,2);\n -> 1\n','https://mariadb.com/kb/en/nullif/'),(51,'CLOSE',23,'Syntax:\nCLOSE cursor_name\n\nThis statement closes a previously opened cursor. For an example, see\nhttps://mariadb.com/kb/en/cursor-overview/.\n\nAn error occurs if the cursor is not open.\n\nIf not closed explicitly, a cursor is closed at the end of the BEGIN\n... END block in which it was declared.\n\nURL: https://mariadb.com/kb/en/close/\n\n','','https://mariadb.com/kb/en/close/'),(52,'STOP SLAVE',8,'Syntax:\nSTOP SLAVE [thread_types]\n\nthread_types:\n [thread_type [, thread_type] ... ]\n\nthread_type: IO_THREAD | SQL_THREAD\n\nStops the slave threads. STOP SLAVE requires the SUPER privilege.\nRecommended best practice is to execute STOP SLAVE on the slave before\nstopping the slave server (see\nhttp://dev.mysql.com/doc/refman/5.5/en/server-shutdown.html, for more\ninformation).\n\nWhen using the row-based logging format: You should execute STOP SLAVE\non the slave prior to shutting down the slave server if you are\nreplicating any tables that use a nontransactional storage engine (see\nthe Note later in this section). In MySQL 5.5.9 and later, you can also\nuse STOP SLAVE SQL_THREAD for this purpose.\n\nLike START SLAVE, this statement may be used with the IO_THREAD and\nSQL_THREAD options to name the thread or threads to be stopped.\n\n*Note*: In MySQL 5.5, STOP SLAVE waits until the current replication\nevent group affecting one or more non-transactional tables has finished\nexecuting (if there is any such replication group), or until the user\nissues a KILL QUERY or KILL CONNECTION statement. (Bug #319, Bug\n#38205)\n\nURL: https://mariadb.com/kb/en/stop-slave/\n\n','','https://mariadb.com/kb/en/stop-slave/'),(53,'TIMEDIFF',31,'Syntax:\nTIMEDIFF(expr1,expr2)\n\nTIMEDIFF() returns expr1 - expr2 expressed as a time value. expr1 and\nexpr2 are time or date-and-time expressions, but both must be of the\nsame type.\n\nThe result returned by TIMEDIFF() is limited to the range allowed for\nTIME values. Alternatively, you can use either of the functions\nTIMESTAMPDIFF() and UNIX_TIMESTAMP(), both of which return integers.\n\nURL: https://mariadb.com/kb/en/timediff/\n\n','MariaDB> SELECT TIMEDIFF(\'2000:01:01 00:00:00\',\n -> \'2000:01:01 00:00:00.000001\');\n -> \'-00:00:00.000001\'\nMariaDB> SELECT TIMEDIFF(\'2008-12-31 23:59:59.000001\',\n -> \'2008-12-30 01:01:01.000002\');\n -> \'46:58:57.999999\'\n','https://mariadb.com/kb/en/timediff/'),(54,'REPLACE FUNCTION',37,'Syntax:\nREPLACE(str,from_str,to_str)\n\nReturns the string str with all occurrences of the string from_str\nreplaced by the string to_str. REPLACE() performs a case-sensitive\nmatch when searching for from_str.\n\nURL: https://mariadb.com/kb/en/replace-function/\n\n','MariaDB> SELECT REPLACE(\'www.mariadb.org\', \'w\', \'Ww\');\n -> \'WwWwWw.mariadb.org\'\n','https://mariadb.com/kb/en/replace-function/'),(55,'USE',28,'Syntax:\nUSE db_name\n\nThe USE db_name statement tells MySQL to use the db_name database as\nthe default (current) database for subsequent statements. The database\nremains the default until the end of the session or another USE\nstatement is issued:\n\nUSE db1;\nSELECT COUNT(*) FROM mytable; # selects from db1.mytable\nUSE db2;\nSELECT COUNT(*) FROM mytable; # selects from db2.mytable\n\nURL: https://mariadb.com/kb/en/use/\n\n','','https://mariadb.com/kb/en/use/'),(56,'LINEFROMTEXT',3,'LineFromText(wkt[,srid]), LineStringFromText(wkt[,srid])\n\nConstructs a LINESTRING value using its WKT representation and SRID.\n\nURL: https://mariadb.com/kb/en/linefromtext/\n\n','','https://mariadb.com/kb/en/linefromtext/'),(57,'CASE OPERATOR',7,'Syntax:\nCASE value WHEN [compare_value] THEN result [WHEN [compare_value] THEN\nresult ...] [ELSE result] END\n\nCASE WHEN [condition] THEN result [WHEN [condition] THEN result ...]\n[ELSE result] END\n\nThe first version returns the result where value=compare_value. The\nsecond version returns the result for the first condition that is true.\nIf there was no matching result value, the result after ELSE is\nreturned, or NULL if there is no ELSE part.\n\nURL: https://mariadb.com/kb/en/case-operator/\n\n','MariaDB> SELECT CASE 1 WHEN 1 THEN \'one\'\n -> WHEN 2 THEN \'two\' ELSE \'more\' END;\n -> \'one\'\nMariaDB> SELECT CASE WHEN 1>0 THEN \'true\' ELSE \'false\' END;\n -> \'true\'\nMariaDB> SELECT CASE BINARY \'B\'\n -> WHEN \'a\' THEN 1 WHEN \'b\' THEN 2 END;\n -> NULL\n','https://mariadb.com/kb/en/case-operator/'),(58,'SHOW MASTER STATUS',26,'Syntax:\nSHOW MASTER STATUS\n\nThis statement provides status information about the binary log files\nof the master. It requires either the SUPER or REPLICATION CLIENT\nprivilege.\n\nExample:\n\nMariaDB> SHOW MASTER STATUS;\n+---------------+----------+--------------+------------------+\n| File | Position | Binlog_Do_DB | Binlog_Ignore_DB |\n+---------------+----------+--------------+------------------+\n| mysql-bin.003 | 73 | test | manual,mysql |\n+---------------+----------+--------------+------------------+\n\nURL: https://mariadb.com/kb/en/show-master-status/\n\n','','https://mariadb.com/kb/en/show-master-status/'),(59,'ADDTIME',31,'Syntax:\nADDTIME(expr1,expr2)\n\nADDTIME() adds expr2 to expr1 and returns the result. expr1 is a time\nor datetime expression, and expr2 is a time expression.\n\nURL: https://mariadb.com/kb/en/addtime/\n\n','MariaDB> SELECT ADDTIME(\'2007-12-31 23:59:59.999999\', \'1 1:1:1.000002\');\n -> \'2008-01-02 01:01:01.000001\'\nMariaDB> SELECT ADDTIME(\'01:00:00.999999\', \'02:00:00.999998\');\n -> \'03:00:01.999997\'\n','https://mariadb.com/kb/en/addtime/'),(60,'SPATIAL',34,'For MyISAM tables, MySQL can create spatial indexes using syntax\nsimilar to that for creating regular indexes, but extended with the\nSPATIAL keyword. Currently, columns in spatial indexes must be declared\nNOT NULL. The following examples demonstrate how to create spatial\nindexes:\n\no With CREATE TABLE:\n\nCREATE TABLE geom (g GEOMETRY NOT NULL, SPATIAL INDEX(g)) ENGINE=MyISAM;\n\no With ALTER TABLE:\n\nALTER TABLE geom ADD SPATIAL INDEX(g);\n\no With CREATE INDEX:\n\nCREATE SPATIAL INDEX sp_index ON geom (g);\n\nFor MyISAM tables, SPATIAL INDEX creates an R-tree index. For storage\nengines that support nonspatial indexing of spatial columns, the engine\ncreates a B-tree index. A B-tree index on spatial values will be useful\nfor exact-value lookups, but not for range scans.\n\nFor more information on indexing spatial columns, see [HELP CREATE\nINDEX].\n\nTo drop spatial indexes, use ALTER TABLE or DROP INDEX:\n\no With ALTER TABLE:\n\nALTER TABLE geom DROP INDEX g;\n\no With DROP INDEX:\n\nDROP INDEX sp_index ON geom;\n\nExample: Suppose that a table geom contains more than 32,000\ngeometries, which are stored in the column g of type GEOMETRY. The\ntable also has an AUTO_INCREMENT column fid for storing object ID\nvalues.\n\nURL: https://mariadb.com/kb/en/spatial/\n\n','','https://mariadb.com/kb/en/spatial/'),(61,'TO_SECONDS',31,'Syntax:\nTO_SECONDS(expr)\n\nGiven a date or datetime expr, returns a the number of seconds since\nthe year 0. If expr is not a valid date or datetime value, returns\nNULL.\n\nURL: https://mariadb.com/kb/en/to_seconds/\n\n','MariaDB> SELECT TO_SECONDS(950501);\n -> 62966505600\nMariaDB> SELECT TO_SECONDS(\'2009-11-29\');\n -> 63426672000\nMariaDB> SELECT TO_SECONDS(\'2009-11-29 13:43:32\');\n -> 63426721412\nMariaDB> SELECT TO_SECONDS( NOW() );\n -> 63426721458\n','https://mariadb.com/kb/en/to_seconds/'),(62,'TIMESTAMPDIFF',31,'Syntax:\nTIMESTAMPDIFF(unit,datetime_expr1,datetime_expr2)\n\nReturns datetime_expr2 - datetime_expr1, where datetime_expr1 and\ndatetime_expr2 are date or datetime expressions. One expression may be\na date and the other a datetime; a date value is treated as a datetime\nhaving the time part \'00:00:00\' where necessary. The unit for the\nresult (an integer) is given by the unit argument. The legal values for\nunit are the same as those listed in the description of the\nTIMESTAMPADD() function.\n\nURL: https://mariadb.com/kb/en/timestampdiff/\n\n','MariaDB> SELECT TIMESTAMPDIFF(MONTH,\'2003-02-01\',\'2003-05-01\');\n -> 3\nMariaDB> SELECT TIMESTAMPDIFF(YEAR,\'2002-05-01\',\'2001-01-01\');\n -> -1\nMariaDB> SELECT TIMESTAMPDIFF(MINUTE,\'2003-02-01\',\'2003-05-01 12:05:55\');\n -> 128885\n','https://mariadb.com/kb/en/timestampdiff/'),(63,'UPPER',37,'Syntax:\nUPPER(str)\n\nReturns the string str with all characters changed to uppercase\naccording to the current character set mapping. The default is latin1\n(cp1252 West European).\n\nMariaDB> SELECT UPPER(\'Hej\');\n -> \'HEJ\'\n\nSee the description of LOWER() for information that also applies to\nUPPER(), such as information about how to perform lettercase conversion\nof binary strings (BINARY, VARBINARY, BLOB) for which these functions\nare ineffective.\n\nURL: https://mariadb.com/kb/en/upper/\n\n','','https://mariadb.com/kb/en/upper/'),(64,'FROM_UNIXTIME',31,'Syntax:\nFROM_UNIXTIME(unix_timestamp), FROM_UNIXTIME(unix_timestamp,format)\n\nReturns a representation of the unix_timestamp argument as a value in\n\'YYYY-MM-DD HH:MM:SS\' or YYYYMMDDHHMMSS.uuuuuu format, depending on\nwhether the function is used in a string or numeric context. The value\nis expressed in the current time zone. unix_timestamp is an internal\ntimestamp value such as is produced by the UNIX_TIMESTAMP() function.\n\nIf format is given, the result is formatted according to the format\nstring, which is used the same way as listed in the entry for the\nDATE_FORMAT() function.\n\nURL: https://mariadb.com/kb/en/from_unixtime/\n\n','MariaDB> SELECT FROM_UNIXTIME(1196440219);\n -> \'2007-11-30 10:30:19\'\nMariaDB> SELECT FROM_UNIXTIME(1196440219) + 0;\n -> 20071130103019.000000\nMariaDB> SELECT FROM_UNIXTIME(UNIX_TIMESTAMP(),\n -> \'%Y %D %M %h:%i:%s %x\');\n -> \'2007 30th November 10:30:59 2007\'\n','https://mariadb.com/kb/en/from_unixtime/'),(65,'MEDIUMBLOB',22,'MEDIUMBLOB\n\nA BLOB column with a maximum length of 16,777,215 (224 - 1) bytes. Each\nMEDIUMBLOB value is stored using a 3-byte length prefix that indicates\nthe number of bytes in the value.\n\nURL: https://mariadb.com/kb/en/mediumblob/\n\n','','https://mariadb.com/kb/en/mediumblob/'),(66,'SHA2',12,'Syntax:\nSHA2(str, hash_length)\n\nCalculates the SHA-2 family of hash functions (SHA-224, SHA-256,\nSHA-384, and SHA-512). The first argument is the cleartext string to be\nhashed. The second argument indicates the desired bit length of the\nresult, which must have a value of 224, 256, 384, 512, or 0 (which is\nequivalent to 256). If either argument is NULL or the hash length is\nnot one of the permitted values, the return value is NULL. Otherwise,\nthe function result is a hash value containing the desired number of\nbits. See the notes at the beginning of this section about storing hash\nvalues efficiently.\n\nAs of MySQL 5.5.6, the return value is a nonbinary string in the\nconnection character set. Before 5.5.6, the return value is a binary\nstring; see the notes at the beginning of this section about using the\nvalue as a nonbinary string.\n\nURL: https://mariadb.com/kb/en/sha2/\n\n','MariaDB> SELECT SHA2(\'abc\', 224);\n -> \'23097d223405d8228642a477bda255b32aadbce4bda0b3f7e36c9da7\'\n','https://mariadb.com/kb/en/sha2/'),(67,'IFNULL',7,'Syntax:\nIFNULL(expr1,expr2)\n\nIf expr1 is not NULL, IFNULL() returns expr1; otherwise it returns\nexpr2. IFNULL() returns a numeric or string value, depending on the\ncontext in which it is used.\n\nURL: https://mariadb.com/kb/en/ifnull/\n\n','MariaDB> SELECT IFNULL(1,0);\n -> 1\nMariaDB> SELECT IFNULL(NULL,10);\n -> 10\nMariaDB> SELECT IFNULL(1/0,10);\n -> 10\nMariaDB> SELECT IFNULL(1/0,\'yes\');\n -> \'yes\'\n','https://mariadb.com/kb/en/ifnull/'),(68,'SHOW FUNCTION CODE',26,'Syntax:\nSHOW FUNCTION CODE func_name\n\nThis statement is similar to SHOW PROCEDURE CODE but for stored\nfunctions. See [HELP SHOW PROCEDURE CODE].\n\nURL: https://mariadb.com/kb/en/show-function-code/\n\n','','https://mariadb.com/kb/en/show-function-code/'),(69,'SHOW ERRORS',26,'Syntax:\nSHOW ERRORS [LIMIT [offset,] row_count]\nSHOW COUNT(*) ERRORS\n\nThis statement is similar to SHOW WARNINGS, except that it displays\ninformation only for errors, rather than for errors, warnings, and\nnotes.\n\nThe LIMIT clause has the same syntax as for the SELECT statement. See\nhttps://mariadb.com/kb/en/select/.\n\nThe SHOW COUNT(*) ERRORS statement displays the number of errors. You\ncan also retrieve this number from the error_count variable:\n\nSHOW COUNT(*) ERRORS;\nSELECT @@error_count;\n\nSHOW ERRORS and error_count apply only to errors, not warnings or\nnotes. In other respects, they are similar to SHOW WARNINGS and\nwarning_count. In particular, SHOW ERRORS cannot display information\nfor more than max_error_count messages, and error_count can exceed the\nvalue of max_error_count if the number of errors exceeds\nmax_error_count.\n\nURL: https://mariadb.com/kb/en/show-errors/\n\n','','https://mariadb.com/kb/en/show-errors/'),(70,'LEAST',18,'Syntax:\nLEAST(value1,value2,...)\n\nWith two or more arguments, returns the smallest (minimum-valued)\nargument. The arguments are compared using the following rules:\n\no If any argument is NULL, the result is NULL. No comparison is needed.\n\no If the return value is used in an INTEGER context or all arguments\n are integer-valued, they are compared as integers.\n\no If the return value is used in a REAL context or all arguments are\n real-valued, they are compared as reals.\n\no If the arguments comprise a mix of numbers and strings, they are\n compared as numbers.\n\no If any argument is a nonbinary (character) string, the arguments are\n compared as nonbinary strings.\n\no In all other cases, the arguments are compared as binary strings.\n\nURL: https://mariadb.com/kb/en/least/\n\n','MariaDB> SELECT LEAST(2,0);\n -> 0\nMariaDB> SELECT LEAST(34.0,3.0,5.0,767.0);\n -> 3.0\nMariaDB> SELECT LEAST(\'B\',\'A\',\'C\');\n -> \'A\'\n','https://mariadb.com/kb/en/least/'),(71,'=',18,'=\n\nEqual:\n\nURL: https://mariadb.com/kb/en/equal/\n\n','MariaDB> SELECT 1 = 0;\n -> 0\nMariaDB> SELECT \'0\' = 0;\n -> 1\nMariaDB> SELECT \'0.0\' = 0;\n -> 1\nMariaDB> SELECT \'0.01\' = 0;\n -> 0\nMariaDB> SELECT \'.01\' = 0.01;\n -> 1\n','https://mariadb.com/kb/en/equal/'),(72,'REVERSE',37,'Syntax:\nREVERSE(str)\n\nReturns the string str with the order of the characters reversed.\n\nURL: https://mariadb.com/kb/en/reverse/\n\n','MariaDB> SELECT REVERSE(\'abc\');\n -> \'cba\'\n','https://mariadb.com/kb/en/reverse/'),(73,'ISNULL',18,'Syntax:\nISNULL(expr)\n\nIf expr is NULL, ISNULL() returns 1, otherwise it returns 0.\n\nURL: https://mariadb.com/kb/en/isnull/\n\n','MariaDB> SELECT ISNULL(1+1);\n -> 0\nMariaDB> SELECT ISNULL(1/0);\n -> 1\n','https://mariadb.com/kb/en/isnull/'),(74,'BINARY',22,'BINARY(M)\n\nThe BINARY type is similar to the CHAR type, but stores binary byte\nstrings rather than nonbinary character strings. M represents the\ncolumn length in bytes.\n\nURL: https://mariadb.com/kb/en/binary/\n\n','','https://mariadb.com/kb/en/binary/'),(75,'BLOB DATA TYPE',22,'A BLOB is a binary large object that can hold a variable amount of\ndata. The four BLOB types are TINYBLOB, BLOB, MEDIUMBLOB, and LONGBLOB.\nThese differ only in the maximum length of the values they can hold.\nThe four TEXT types are TINYTEXT, TEXT, MEDIUMTEXT, and LONGTEXT. These\ncorrespond to the four BLOB types and have the same maximum lengths and\nstorage requirements. See\nhttps://mariadb.com/kb/en/data-type-storage-requirements/.\n\nURL: https://mariadb.com/kb/en/sql_language-data_types-blob/\n\n','','https://mariadb.com/kb/en/sql_language-data_types-blob/'),(76,'BOUNDARY',36,'Boundary(g)\n\nReturns a geometry that is the closure of the combinatorial boundary of\nthe geometry value g.\n\nURL: https://mariadb.com/kb/en/boundary/\n\n','','https://mariadb.com/kb/en/boundary/'),(77,'CREATE USER',10,'Syntax:\nCREATE USER user_specification\n [, user_specification] ...\n\nuser_specification:\n user\n [\n IDENTIFIED BY [PASSWORD] \'password\'\n | IDENTIFIED WITH auth_plugin [AS \'auth_string\']\n ]\n\nThe CREATE USER statement creates new MySQL accounts. To use it, you\nmust have the global CREATE USER privilege or the INSERT privilege for\nthe mysql database. For each account, CREATE USER creates a new row in\nthe mysql.user table and assigns the account no privileges. An error\noccurs if the account already exists.\n\nEach account name uses the format described in\nhttps://mariadb.com/kb/en/create-user#account-names. For example:\n\nCREATE USER \'jeffrey\'@\'localhost\' IDENTIFIED BY \'mypass\';\n\nIf you specify only the user name part of the account name, a host name\npart of \'%\' is used.\n\nThe user specification may indicate how the user should authenticate\nwhen connecting to the server:\n\no To enable the user to connect with no password (which is insecure),\n include no IDENTIFIED BY clause:\n\nCREATE USER \'jeffrey\'@\'localhost\';\n\n In this case, the account uses built-in authentication and clients\n must provide no password.\n\no To assign a password, use IDENTIFIED BY with the literal plaintext\n password value:\n\nCREATE USER \'jeffrey\'@\'localhost\' IDENTIFIED BY \'mypass\';\n\n The account uses built-in authentication and clients must match the\n given password.\n\no To avoid specifying the plaintext password if you know its hash value\n (the value that PASSWORD() would return for the password), specify\n the hash value preceded by the keyword PASSWORD:\n\nCREATE USER \'jeffrey\'@\'localhost\'\nIDENTIFIED BY PASSWORD \'*90E462C37378CED12064BB3388827D2BA3A9B689\';\n\n The account uses built-in authentication and clients must match the\n given password.\n\no To authenticate the account using a specific authentication plugin,\n use IDENTIFIED WITH, where auth_plugin is the plugin name. It can be\n an unquoted name or a quoted string literal. \'auth_string\' is an\n optional quoted string literal to pass to the plugin. The plugin\n interprets the meaning of the string, so its format is plugin\n specific. Consult the documentation for a given plugin for\n information about the authentication string values it accepts.\n\nCREATE USER \'jeffrey\'@\'localhost\'\nIDENTIFIED WITH my_auth_plugin;\n\n For connections that use this account, the server invokes the named\n plugin and clients must provide credentials as required for the\n authentication method that the plugin implements. If the server\n cannot find the plugin, either at account-creation time or connect\n time, an error occurs. IDENTIFIED WITH can be used as of MySQL 5.5.7.\n\nThe IDENTIFIED BY and IDENTIFIED WITH clauses are mutually exclusive,\nso at most one of them can be specified for a given user.\n\nFor additional information about setting passwords, see\nhttps://mariadb.com/kb/en/create-user/.\n\nURL: https://mariadb.com/kb/en/create-user/\n\n','','https://mariadb.com/kb/en/create-user/'),(78,'POINT',24,'Point(x,y)\n\nConstructs a Point using its coordinates.\n\nURL: https://mariadb.com/kb/en/point/\n\n','','https://mariadb.com/kb/en/point/'),(79,'CURRENT_USER',17,'Syntax:\nCURRENT_USER, CURRENT_USER()\n\nReturns the user name and host name combination for the MySQL account\nthat the server used to authenticate the current client. This account\ndetermines your access privileges. The return value is a string in the\nutf8 character set.\n\nThe value of CURRENT_USER() can differ from the value of USER().\n\nURL: https://mariadb.com/kb/en/current_user/\n\n','MariaDB> SELECT USER();\n -> \'davida@localhost\'\nMariaDB> SELECT * FROM mysql.user;\nERROR 1044: Access denied for user \'\'@\'localhost\' to\ndatabase \'mysql\'\nMariaDB> SELECT CURRENT_USER();\n -> \'@localhost\'\n','https://mariadb.com/kb/en/current_user/'),(80,'LCASE',37,'Syntax:\nLCASE(str)\n\nLCASE() is a synonym for LOWER().\n\nURL: https://mariadb.com/kb/en/lcase/\n\n','','https://mariadb.com/kb/en/lcase/'),(81,'<=',18,'Syntax:\n<=\n\nLess than or equal:\n\nURL: https://mariadb.com/kb/en/less-than-or-equal/\n\n','MariaDB> SELECT 0.1 <= 2;\n -> 1\n','https://mariadb.com/kb/en/less-than-or-equal/'),(82,'SHOW PROFILES',26,'Syntax:\nSHOW PROFILES\n\nThe SHOW PROFILES statement, together with SHOW PROFILE, displays\nprofiling information that indicates resource usage for statements\nexecuted during the course of the current session. For more\ninformation, see [HELP SHOW PROFILE].\n\nURL: https://mariadb.com/kb/en/show-profiles/\n\n','','https://mariadb.com/kb/en/show-profiles/'),(83,'UPDATE',27,'Syntax:\nSingle-table syntax:\n\nUPDATE [LOW_PRIORITY] [IGNORE] table_reference\n SET col_name1={expr1|DEFAULT} [, col_name2={expr2|DEFAULT}] ...\n [WHERE where_condition]\n [ORDER BY ...]\n [LIMIT row_count]\n\nMultiple-table syntax:\n\nUPDATE [LOW_PRIORITY] [IGNORE] table_references\n SET col_name1={expr1|DEFAULT} [, col_name2={expr2|DEFAULT}] ...\n [WHERE where_condition]\n\nFor the single-table syntax, the UPDATE statement updates columns of\nexisting rows in the named table with new values. The SET clause\nindicates which columns to modify and the values they should be given.\nEach value can be given as an expression, or the keyword DEFAULT to set\na column explicitly to its default value. The WHERE clause, if given,\nspecifies the conditions that identify which rows to update. With no\nWHERE clause, all rows are updated. If the ORDER BY clause is\nspecified, the rows are updated in the order that is specified. The\nLIMIT clause places a limit on the number of rows that can be updated.\n\nFor the multiple-table syntax, UPDATE updates rows in each table named\nin table_references that satisfy the conditions. In this case, ORDER BY\nand LIMIT cannot be used.\n\nwhere_condition is an expression that evaluates to true for each row to\nbe updated. For expression syntax, see\nhttp://dev.mysql.com/doc/refman/5.5/en/expressions.html.\n\ntable_references and where_condition are is specified as described in\nhttps://mariadb.com/kb/en/select/.\n\nYou need the UPDATE privilege only for columns referenced in an UPDATE\nthat are actually updated. You need only the SELECT privilege for any\ncolumns that are read but not modified.\n\nThe UPDATE statement supports the following modifiers:\n\no With the LOW_PRIORITY keyword, execution of the UPDATE is delayed\n until no other clients are reading from the table. This affects only\n storage engines that use only table-level locking (such as MyISAM,\n MEMORY, and MERGE).\n\no With the IGNORE keyword, the update statement does not abort even if\n errors occur during the update. Rows for which duplicate-key\n conflicts occur are not updated. Rows for which columns are updated\n to values that would cause data conversion errors are updated to the\n closest valid values instead.\n\nURL: https://mariadb.com/kb/en/update/\n\n','','https://mariadb.com/kb/en/update/'),(84,'IS NOT NULL',18,'Syntax:\nIS NOT NULL\n\nTests whether a value is not NULL.\n\nURL: https://mariadb.com/kb/en/is-not-null/\n\n','MariaDB> SELECT 1 IS NOT NULL, 0 IS NOT NULL, NULL IS NOT NULL;\n -> 1, 1, 0\n','https://mariadb.com/kb/en/is-not-null/'),(85,'CASE STATEMENT',23,'Syntax:\nCASE case_value\n WHEN when_value THEN statement_list\n [WHEN when_value THEN statement_list] ...\n [ELSE statement_list]\nEND CASE\n\nOr:\n\nCASE\n WHEN search_condition THEN statement_list\n [WHEN search_condition THEN statement_list] ...\n [ELSE statement_list]\nEND CASE\n\nThe CASE statement for stored programs implements a complex conditional\nconstruct.\n\n*Note*: There is also a CASE expression, which differs from the CASE\nstatement described here. See\nhttps://mariadb.com/kb/en/case-operator/. The\nCASE statement cannot have an ELSE NULL clause, and it is terminated\nwith END CASE instead of END.\n\nFor the first syntax, case_value is an expression. This value is\ncompared to the when_value expression in each WHEN clause until one of\nthem is equal. When an equal when_value is found, the corresponding\nTHEN clause statement_list executes. If no when_value is equal, the\nELSE clause statement_list executes, if there is one.\n\nThis syntax cannot be used to test for equality with NULL because NULL\n= NULL is false. See\nhttps://mariadb.com/kb/en/null-values/.\n\nFor the second syntax, each WHEN clause search_condition expression is\nevaluated until one is true, at which point its corresponding THEN\nclause statement_list executes. If no search_condition is equal, the\nELSE clause statement_list executes, if there is one.\n\nIf no when_value or search_condition matches the value tested and the\nCASE statement contains no ELSE clause, a Case not found for CASE\nstatement error results.\n\nEach statement_list consists of one or more SQL statements; an empty\nstatement_list is not permitted.\n\nTo handle situations where no value is matched by any WHEN clause, use\nan ELSE containing an empty BEGIN ... END block, as shown in this\nexample. (The indentation used here in the ELSE clause is for purposes\nof clarity only, and is not otherwise significant.)\n\nDELIMITER |\n\nCREATE PROCEDURE p()\n BEGIN\n DECLARE v INT DEFAULT 1;\n\n CASE v\n WHEN 2 THEN SELECT v;\n WHEN 3 THEN SELECT 0;\n ELSE\n BEGIN\n END;\n END CASE;\n END;\n |\n\nURL: https://mariadb.com/kb/en/case-statement/\n\n','','https://mariadb.com/kb/en/case-statement/'),(86,'EXECUTE STATEMENT',8,'Syntax:\nEXECUTE stmt_name\n [USING @var_name [, @var_name] ...]\n\nAfter preparing a statement with PREPARE, you execute it with an\nEXECUTE statement that refers to the prepared statement name. If the\nprepared statement contains any parameter markers, you must supply a\nUSING clause that lists user variables containing the values to be\nbound to the parameters. Parameter values can be supplied only by user\nvariables, and the USING clause must name exactly as many variables as\nthe number of parameter markers in the statement.\n\nYou can execute a given prepared statement multiple times, passing\ndifferent variables to it or setting the variables to different values\nbefore each execution.\n\nURL: https://mariadb.com/kb/en/execute-statement/\n\n','','https://mariadb.com/kb/en/execute-statement/'),(87,'DROP INDEX',39,'Syntax:\nDROP [ONLINE|OFFLINE] INDEX index_name ON tbl_name\n\nDROP INDEX drops the index named index_name from the table tbl_name.\nThis statement is mapped to an ALTER TABLE statement to drop the index.\nSee [HELP ALTER TABLE].\n\nTo drop a primary key, the index name is always PRIMARY, which must be\nspecified as a quoted identifier because PRIMARY is a reserved word:\n\nDROP INDEX `PRIMARY` ON t;\n\nURL: https://mariadb.com/kb/en/drop-index/\n\n','','https://mariadb.com/kb/en/drop-index/'),(88,'MATCH AGAINST',37,'Syntax:\nMATCH (col1,col2,...) AGAINST (expr [search_modifier])\n\nMySQL has support for full-text indexing and searching:\n\no A full-text index in MySQL is an index of type FULLTEXT.\n\no Full-text indexes can be used only with MyISAM tables, and can be\n created only for CHAR, VARCHAR, or TEXT columns.\n\no A FULLTEXT index definition can be given in the CREATE TABLE\n statement when a table is created, or added later using ALTER TABLE\n or CREATE INDEX.\n\no For large data sets, it is much faster to load your data into a table\n that has no FULLTEXT index and then create the index after that, than\n to load data into a table that has an existing FULLTEXT index.\n\nFull-text searching is performed using MATCH() ... AGAINST syntax.\nMATCH() takes a comma-separated list that names the columns to be\nsearched. AGAINST takes a string to search for, and an optional\nmodifier that indicates what type of search to perform. The search\nstring must be a literal string, not a variable or a column name. There\nare three types of full-text searches:\n\no A natural language search interprets the search string as a phrase in\n natural human language (a phrase in free text). There are no special\n operators. The stopword list applies. In addition, words that are\n present in 50% or more of the rows are considered common and do not\n match.\n\n Full-text searches are natural language searches if the IN NATURAL\n LANGUAGE MODE modifier is given or if no modifier is given. For more\n information, see\n https://mariadb.com/kb/en/fulltext-index-overview#in-natural-language-mode\n .\n\no A boolean search interprets the search string using the rules of a\n special query language. The string contains the words to search for.\n It can also contain operators that specify requirements such that a\n word must be present or absent in matching rows, or that it should be\n weighted higher or lower than usual. Common words such as \"some\" or\n \"then\" are stopwords and do not match if present in the search\n string. The IN BOOLEAN MODE modifier specifies a boolean search. For\n more information, see\n https://mariadb.com/kb/en/fulltext-index-overview#in-boolean-mode.\n\no A query expansion search is a modification of a natural language\n search. The search string is used to perform a natural language\n search. Then words from the most relevant rows returned by the search\n are added to the search string and the search is done again. The\n query returns the rows from the second search. The IN NATURAL\n LANGUAGE MODE WITH QUERY EXPANSION or WITH QUERY EXPANSION modifier\n specifies a query expansion search. For more information, see\n https://mariadb.com/kb/en/fulltext-index-overview#with-query-expansion.\n\nURL: https://mariadb.com/kb/en/match-against/\n\n','MariaDB> SELECT id, body, MATCH (title,body) AGAINST\n -> (\'Security implications of running MySQL as root\'\n -> IN NATURAL LANGUAGE MODE) AS score\n -> FROM articles WHERE MATCH (title,body) AGAINST\n -> (\'Security implications of running MySQL as root\'\n -> IN NATURAL LANGUAGE MODE);\n+----+-------------------------------------+-----------------+\n| id | body | score |\n+----+-------------------------------------+-----------------+\n| 4 | 1. Never run mysqld as root. 2. ... | 1.5219271183014 |\n| 6 | When configured properly, MySQL ... | 1.3114095926285 |\n+----+-------------------------------------+-----------------+\n2 rows in set (0.00 sec)\n','https://mariadb.com/kb/en/match-against/'),(89,'CREATE EVENT',39,'Syntax:\nCREATE\n [DEFINER = { user | CURRENT_USER }]\n EVENT\n [IF NOT EXISTS]\n event_name\n ON SCHEDULE schedule\n [ON COMPLETION [NOT] PRESERVE]\n [ENABLE | DISABLE | DISABLE ON SLAVE]\n [COMMENT \'comment\']\n DO event_body;\n\nschedule:\n AT timestamp [+ INTERVAL interval] ...\n | EVERY interval\n [STARTS timestamp [+ INTERVAL interval] ...]\n [ENDS timestamp [+ INTERVAL interval] ...]\n\ninterval:\n quantity {YEAR | QUARTER | MONTH | DAY | HOUR | MINUTE |\n WEEK | SECOND | YEAR_MONTH | DAY_HOUR | DAY_MINUTE |\n DAY_SECOND | HOUR_MINUTE | HOUR_SECOND | MINUTE_SECOND}\n\nThis statement creates and schedules a new event. The event will not\nrun unless the Event Scheduler is enabled. For information about\nchecking Event Scheduler status and enabling it if necessary, see\nhttps://mariadb.com/kb/en/events/.\n\nCREATE EVENT requires the EVENT privilege for the schema in which the\nevent is to be created. It might also require the SUPER privilege,\ndepending on the DEFINER value, as described later in this section.\n\nThe minimum requirements for a valid CREATE EVENT statement are as\nfollows:\n\no The keywords CREATE EVENT plus an event name, which uniquely\n identifies the event in a database schema.\n\no An ON SCHEDULE clause, which determines when and how often the event\n executes.\n\no A DO clause, which contains the SQL statement to be executed by an\n event.\n\nThis is an example of a minimal CREATE EVENT statement:\n\nCREATE EVENT myevent\n ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR\n DO\n UPDATE myschema.mytable SET mycol = mycol + 1;\n\nThe previous statement creates an event named myevent. This event\nexecutes once---one hour following its creation---by running an SQL\nstatement that increments the value of the myschema.mytable table\'s\nmycol column by 1.\n\nThe event_name must be a valid MySQL identifier with a maximum length\nof 64 characters. Event names are not case sensitive, so you cannot\nhave two events named myevent and MyEvent in the same schema. In\ngeneral, the rules governing event names are the same as those for\nnames of stored routines. See\nhttps://mariadb.com/kb/en/identifier-names/.\n\nAn event is associated with a schema. If no schema is indicated as part\nof event_name, the default (current) schema is assumed. To create an\nevent in a specific schema, qualify the event name with a schema using\nschema_name.event_name syntax.\n\nURL: https://mariadb.com/kb/en/create-event/\n\n','','https://mariadb.com/kb/en/create-event/'),(90,'ABS',4,'Syntax:\nABS(X)\n\nReturns the absolute value of X.\n\nURL: https://mariadb.com/kb/en/abs/\n\n','MariaDB> SELECT ABS(2);\n -> 2\nMariaDB> SELECT ABS(-32);\n -> 32\n','https://mariadb.com/kb/en/abs/'),(91,'POLYFROMWKB',32,'PolyFromWKB(wkb[,srid]), PolygonFromWKB(wkb[,srid])\n\nConstructs a POLYGON value using its WKB representation and SRID.\n\nURL: https://mariadb.com/kb/en/polyfromwkb/\n\n','','https://mariadb.com/kb/en/polyfromwkb/'),(92,'NOT LIKE',37,'Syntax:\nexpr NOT LIKE pat [ESCAPE \'escape_char\']\n\nThis is the same as NOT (expr LIKE pat [ESCAPE \'escape_char\']).\n\nURL: https://mariadb.com/kb/en/not-like/\n\n','','https://mariadb.com/kb/en/not-like/'),(93,'SPACE',37,'Syntax:\nSPACE(N)\n\nReturns a string consisting of N space characters.\n\nURL: https://mariadb.com/kb/en/space/\n\n','MariaDB> SELECT SPACE(6);\n -> \' \'\n','https://mariadb.com/kb/en/space/'),(94,'MBR DEFINITION',6,'Its MBR (Minimum Bounding Rectangle), or Envelope. This is the bounding\ngeometry, formed by the minimum and maximum (X,Y) coordinates:\n\nURL: https://mariadb.com/kb/en/mbr-definition/\n\n','((MINX MINY, MAXX MINY, MAXX MAXY, MINX MAXY, MINX MINY))\n','https://mariadb.com/kb/en/mbr-definition/'),(95,'GEOMETRYCOLLECTION',24,'GeometryCollection(g1,g2,...)\n\nConstructs a GeometryCollection.\n\nURL: https://mariadb.com/kb/en/geometrycollection/\n\n','','https://mariadb.com/kb/en/geometrycollection/'),(96,'MAX',16,'Syntax:\nMAX([DISTINCT] expr)\n\nReturns the maximum value of expr. MAX() may take a string argument; in\nsuch cases, it returns the maximum string value. See\nhttps://mariadb.com/kb/en/max/. The DISTINCT\nkeyword can be used to find the maximum of the distinct values of expr,\nhowever, this produces the same result as omitting DISTINCT.\n\nMAX() returns NULL if there were no matching rows.\n\nURL: https://mariadb.com/kb/en/max/\n\n','MariaDB> SELECT student_name, MIN(test_score), MAX(test_score)\n -> FROM student\n -> GROUP BY student_name;\n','https://mariadb.com/kb/en/max/'),(97,'CREATE FUNCTION UDF',21,'Syntax:\nCREATE [AGGREGATE] FUNCTION function_name RETURNS {STRING|INTEGER|REAL|DECIMAL}\n SONAME shared_library_name\n\nA user-defined function (UDF) is a way to extend MySQL with a new\nfunction that works like a native (built-in) MySQL function such as\nABS() or CONCAT().\n\nfunction_name is the name that should be used in SQL statements to\ninvoke the function. The RETURNS clause indicates the type of the\nfunction\'s return value. DECIMAL is a legal value after RETURNS, but\ncurrently DECIMAL functions return string values and should be written\nlike STRING functions.\n\nshared_library_name is the basename of the shared object file that\ncontains the code that implements the function. The file must be\nlocated in the plugin directory. This directory is given by the value\nof the plugin_dir system variable. For more information, see\nhttp://dev.mysql.com/doc/refman/5.5/en/udf-compiling.html.\n\nTo create a function, you must have the INSERT privilege for the mysql\ndatabase. This is necessary because CREATE FUNCTION adds a row to the\nmysql.func system table that records the function\'s name, type, and\nshared library name. If you do not have this table, you should run the\nmysql_upgrade command to create it. See\nhttps://mariadb.com/kb/en/mysql_upgrade/.\n\nURL: https://mariadb.com/kb/en/create-function-udf/\n\n','','https://mariadb.com/kb/en/create-function-udf/'),(98,'*',4,'Syntax:\n*\n\nMultiplication:\n\nURL: https://mariadb.com/kb/en/multiplication-operator/\n\n','MariaDB> SELECT 3*5;\n -> 15\nMariaDB> SELECT 18014398509481984*18014398509481984.0;\n -> 324518553658426726783156020576256.0\nMariaDB> SELECT 18014398509481984*18014398509481984;\n -> 0\n','https://mariadb.com/kb/en/multiplication-operator/'),(99,'TIMESTAMP',22,'TIMESTAMP\n\nA timestamp. The range is \'1970-01-01 00:00:01\' UTC to \'2038-01-19\n03:14:07\' UTC. TIMESTAMP values are stored as the number of seconds\nsince the epoch (\'1970-01-01 00:00:00\' UTC). A TIMESTAMP cannot\nrepresent the value \'1970-01-01 00:00:00\' because that is equivalent to\n0 seconds from the epoch and the value 0 is reserved for representing\n\'0000-00-00 00:00:00\', the \"zero\" TIMESTAMP value.\n\nUnless specified otherwise, the first TIMESTAMP column in a table is\ndefined to be automatically set to the date and time of the most recent\nmodification if not explicitly assigned a value. This makes TIMESTAMP\nuseful for recording the timestamp of an INSERT or UPDATE operation.\nYou can also set any TIMESTAMP column to the current date and time by\nassigning it a NULL value, unless it has been defined with the NULL\nattribute to permit NULL values. The automatic initialization and\nupdating to the current date and time can be specified using DEFAULT\nCURRENT_TIMESTAMP and ON UPDATE CURRENT_TIMESTAMP clauses, as described\nin\nhttps://mariadb.com/kb/en/timestamp/.\n\n*Note*: The TIMESTAMP format that was used prior to MySQL 4.1 is not\nsupported in MySQL 5.5; see MySQL 3.23, 4.0, 4.1 Reference Manual for\ninformation regarding the old format.\n\nURL: https://mariadb.com/kb/en/timestamp/\n\n','','https://mariadb.com/kb/en/timestamp/'),(100,'DES_DECRYPT',12,'Syntax:\nDES_DECRYPT(crypt_str[,key_str])\n\nDecrypts a string encrypted with DES_ENCRYPT(). If an error occurs,\nthis function returns NULL.\n\nThis function works only if MySQL has been configured with SSL support.\nSee https://mariadb.com/kb/en/ssl-connections/.\n\nIf no key_str argument is given, DES_DECRYPT() examines the first byte\nof the encrypted string to determine the DES key number that was used\nto encrypt the original string, and then reads the key from the DES key\nfile to decrypt the message. For this to work, the user must have the\nSUPER privilege. The key file can be specified with the --des-key-file\nserver option.\n\nIf you pass this function a key_str argument, that string is used as\nthe key for decrypting the message.\n\nIf the crypt_str argument does not appear to be an encrypted string,\nMySQL returns the given crypt_str.\n\nURL: https://mariadb.com/kb/en/des_decrypt/\n\n','','https://mariadb.com/kb/en/des_decrypt/'),(101,'CACHE INDEX',26,'Syntax:\nCACHE INDEX\n tbl_index_list [, tbl_index_list] ...\n [PARTITION (partition_list | ALL)]\n IN key_cache_name\n\ntbl_index_list:\n tbl_name [[INDEX|KEY] (index_name[, index_name] ...)]\n\npartition_list:\n partition_name[, partition_name][, ...]\n\nThe CACHE INDEX statement assigns table indexes to a specific key\ncache. It is used only for MyISAM tables. After the indexes have been\nassigned, they can be preloaded into the cache if desired with LOAD\nINDEX INTO CACHE.\n\nThe following statement assigns indexes from the tables t1, t2, and t3\nto the key cache named hot_cache:\n\nMariaDB> CACHE INDEX t1, t2, t3 IN hot_cache;\n+---------+--------------------+----------+----------+\n| Table | Op | Msg_type | Msg_text |\n+---------+--------------------+----------+----------+\n| test.t1 | assign_to_keycache | status | OK |\n| test.t2 | assign_to_keycache | status | OK |\n| test.t3 | assign_to_keycache | status | OK |\n+---------+--------------------+----------+----------+\n\nURL: https://mariadb.com/kb/en/cache-index/\n\n','','https://mariadb.com/kb/en/cache-index/'),(102,'ENDPOINT',13,'EndPoint(ls)\n\nReturns the Point that is the endpoint of the LineString value ls.\n\nURL: https://mariadb.com/kb/en/endpoint/\n\n','MariaDB> SET @ls = \'LineString(1 1,2 2,3 3)\';\nMariaDB> SELECT AsText(EndPoint(GeomFromText(@ls)));\n+-------------------------------------+\n| AsText(EndPoint(GeomFromText(@ls))) |\n+-------------------------------------+\n| POINT(3 3) |\n+-------------------------------------+\n','https://mariadb.com/kb/en/endpoint/'),(103,'COMPRESS',12,'Syntax:\nCOMPRESS(string_to_compress)\n\nCompresses a string and returns the result as a binary string. This\nfunction requires MySQL to have been compiled with a compression\nlibrary such as zlib. Otherwise, the return value is always NULL. The\ncompressed string can be uncompressed with UNCOMPRESS().\n\nURL: https://mariadb.com/kb/en/compress/\n\n','MariaDB> SELECT LENGTH(COMPRESS(REPEAT(\'a\',1000)));\n -> 21\nMariaDB> SELECT LENGTH(COMPRESS(\'\'));\n -> 0\nMariaDB> SELECT LENGTH(COMPRESS(\'a\'));\n -> 13\nMariaDB> SELECT LENGTH(COMPRESS(REPEAT(\'a\',16)));\n -> 15\n','https://mariadb.com/kb/en/compress/'),(104,'INSERT',27,'Syntax:\nINSERT [LOW_PRIORITY | DELAYED | HIGH_PRIORITY] [IGNORE]\n [INTO] tbl_name [(col_name,...)]\n {VALUES | VALUE} ({expr | DEFAULT},...),(...),...\n [ ON DUPLICATE KEY UPDATE\n col_name=expr\n [, col_name=expr] ... ]\n\nOr:\n\nINSERT [LOW_PRIORITY | DELAYED | HIGH_PRIORITY] [IGNORE]\n [INTO] tbl_name\n SET col_name={expr | DEFAULT}, ...\n [ ON DUPLICATE KEY UPDATE\n col_name=expr\n [, col_name=expr] ... ]\n\nOr:\n\nINSERT [LOW_PRIORITY | HIGH_PRIORITY] [IGNORE]\n [INTO] tbl_name [(col_name,...)]\n SELECT ...\n [ ON DUPLICATE KEY UPDATE\n col_name=expr\n [, col_name=expr] ... ]\n\nINSERT inserts new rows into an existing table. The INSERT ... VALUES\nand INSERT ... SET forms of the statement insert rows based on\nexplicitly specified values. The INSERT ... SELECT form inserts rows\nselected from another table or tables. INSERT ... SELECT is discussed\nfurther in [HELP INSERT SELECT].\n\nURL: https://mariadb.com/kb/en/insert/\n\n','','https://mariadb.com/kb/en/insert/'),(105,'COUNT',16,'Syntax:\nCOUNT(expr)\n\nReturns a count of the number of non-NULL values of expr in the rows\nretrieved by a SELECT statement. The result is a BIGINT value.\n\nCOUNT() returns 0 if there were no matching rows.\n\nURL: https://mariadb.com/kb/en/count/\n\n','MariaDB> SELECT student.student_name,COUNT(*)\n -> FROM student,course\n -> WHERE student.student_id=course.student_id\n -> GROUP BY student_name;\n','https://mariadb.com/kb/en/count/'),(106,'HANDLER',27,'Syntax:\nHANDLER tbl_name OPEN [ [AS] alias]\n\nHANDLER tbl_name READ index_name { = | <= | >= | < | > } (value1,value2,...)\n [ WHERE where_condition ] [LIMIT ... ]\nHANDLER tbl_name READ index_name { FIRST | NEXT | PREV | LAST }\n [ WHERE where_condition ] [LIMIT ... ]\nHANDLER tbl_name READ { FIRST | NEXT }\n [ WHERE where_condition ] [LIMIT ... ]\n\nHANDLER tbl_name CLOSE\n\nThe HANDLER statement provides direct access to table storage engine\ninterfaces. It is available for MyISAM and InnoDB tables.\n\nURL: https://mariadb.com/kb/en/handler-commands/\n\n','','https://mariadb.com/kb/en/handler-commands/'),(107,'MLINEFROMTEXT',3,'MLineFromText(wkt[,srid]), MultiLineStringFromText(wkt[,srid])\n\nConstructs a MULTILINESTRING value using its WKT representation and\nSRID.\n\nURL: https://mariadb.com/kb/en/mlinefromtext/\n\n','','https://mariadb.com/kb/en/mlinefromtext/'),(108,'GEOMCOLLFROMWKB',32,'GeomCollFromWKB(wkb[,srid]), GeometryCollectionFromWKB(wkb[,srid])\n\nConstructs a GEOMETRYCOLLECTION value using its WKB representation and\nSRID.\n\nURL: https://mariadb.com/kb/en/geomcollfromwkb/\n\n','','https://mariadb.com/kb/en/geomcollfromwkb/'),(109,'HELP_DATE',9,'This help information was generated from the MySQL 5.5 Reference Manual\non: 2012-08-25\n','',''),(110,'RENAME TABLE',39,'Syntax:\nRENAME TABLE tbl_name TO new_tbl_name\n [, tbl_name2 TO new_tbl_name2] ...\n\nThis statement renames one or more tables.\n\nThe rename operation is done atomically, which means that no other\nsession can access any of the tables while the rename is running. For\nexample, if you have an existing table old_table, you can create\nanother table new_table that has the same structure but is empty, and\nthen replace the existing table with the empty one as follows (assuming\nthat backup_table does not already exist):\n\nURL: https://mariadb.com/kb/en/rename-table/\n\n','CREATE TABLE new_table (...);\nRENAME TABLE old_table TO backup_table, new_table TO old_table;\n','https://mariadb.com/kb/en/rename-table/'),(111,'BOOLEAN',22,'BOOL, BOOLEAN\n\nThese types are synonyms for TINYINT(1). A value of zero is considered\nfalse. Nonzero values are considered true:\n\nMariaDB> SELECT IF(0, \'true\', \'false\');\n+------------------------+\n| IF(0, \'true\', \'false\') |\n+------------------------+\n| false |\n+------------------------+\n\nMariaDB> SELECT IF(1, \'true\', \'false\');\n+------------------------+\n| IF(1, \'true\', \'false\') |\n+------------------------+\n| true |\n+------------------------+\n\nMariaDB> SELECT IF(2, \'true\', \'false\');\n+------------------------+\n| IF(2, \'true\', \'false\') |\n+------------------------+\n| true |\n+------------------------+\n\nHowever, the values TRUE and FALSE are merely aliases for 1 and 0,\nrespectively, as shown here:\n\nMariaDB> SELECT IF(0 = FALSE, \'true\', \'false\');\n+--------------------------------+\n| IF(0 = FALSE, \'true\', \'false\') |\n+--------------------------------+\n| true |\n+--------------------------------+\n\nMariaDB> SELECT IF(1 = TRUE, \'true\', \'false\');\n+-------------------------------+\n| IF(1 = TRUE, \'true\', \'false\') |\n+-------------------------------+\n| true |\n+-------------------------------+\n\nMariaDB> SELECT IF(2 = TRUE, \'true\', \'false\');\n+-------------------------------+\n| IF(2 = TRUE, \'true\', \'false\') |\n+-------------------------------+\n| false |\n+-------------------------------+\n\nMariaDB> SELECT IF(2 = FALSE, \'true\', \'false\');\n+--------------------------------+\n| IF(2 = FALSE, \'true\', \'false\') |\n+--------------------------------+\n| false |\n+--------------------------------+\n\nThe last two statements display the results shown because 2 is equal to\nneither 1 nor 0.\n\nURL: https://mariadb.com/kb/en/boolean/\n\n','','https://mariadb.com/kb/en/boolean/'),(112,'DEFAULT',14,'Syntax:\nDEFAULT(col_name)\n\nReturns the default value for a table column. An error results if the\ncolumn has no default value.\n\nURL: https://mariadb.com/kb/en/default/\n\n','MariaDB> UPDATE t SET i = DEFAULT(i)+1 WHERE id < 100;\n','https://mariadb.com/kb/en/default/'),(113,'MOD',4,'Syntax:\nMOD(N,M), N % M, N MOD M\n\nModulo operation. Returns the remainder of N divided by M.\n\nURL: https://mariadb.com/kb/en/mod/\n\n','MariaDB> SELECT MOD(234, 10);\n -> 4\nMariaDB> SELECT 253 % 7;\n -> 1\nMariaDB> SELECT MOD(29,9);\n -> 2\nMariaDB> SELECT 29 MOD 9;\n -> 2\n','https://mariadb.com/kb/en/mod/'),(114,'TINYTEXT',22,'TINYTEXT [CHARACTER SET charset_name] [COLLATE collation_name]\n\nA TEXT column with a maximum length of 255 (28 - 1) characters. The\neffective maximum length is less if the value contains multi-byte\ncharacters. Each TINYTEXT value is stored using a 1-byte length prefix\nthat indicates the number of bytes in the value.\n\nURL: https://mariadb.com/kb/en/tinytext/\n\n','','https://mariadb.com/kb/en/tinytext/'),(115,'OPTIMIZE TABLE',20,'Syntax:\nOPTIMIZE [NO_WRITE_TO_BINLOG | LOCAL] TABLE\n tbl_name [, tbl_name] ...\n\nOPTIMIZE TABLE should be used if you have deleted a large part of a\ntable or if you have made many changes to a table with variable-length\nrows (tables that have VARCHAR, VARBINARY, BLOB, or TEXT columns).\nDeleted rows are maintained in a linked list and subsequent INSERT\noperations reuse old row positions. You can use OPTIMIZE TABLE to\nreclaim the unused space and to defragment the data file. After\nextensive changes to a table, this statement may also improve\nperformance of statements that use the table, sometimes significantly.\n\nThis statement requires SELECT and INSERT privileges for the table.\n\nOPTIMIZE TABLE is supported for partitioned tables, and you can use\nALTER TABLE ... OPTIMIZE PARTITION to optimize one or more partitions;\nfor more information, see [HELP ALTER TABLE], and\nhttp://dev.mysql.com/doc/refman/5.5/en/partitioning-maintenance.html.\n\nURL: https://mariadb.com/kb/en/optimize-table/\n\n','','https://mariadb.com/kb/en/optimize-table/'),(116,'DECODE',12,'Syntax:\nDECODE(crypt_str,pass_str)\n\nDecrypts the encrypted string crypt_str using pass_str as the password.\ncrypt_str should be a string returned from ENCODE().\n\nURL: https://mariadb.com/kb/en/decode/\n\n','','https://mariadb.com/kb/en/decode/'),(117,'<=>',18,'Syntax:\n<=>\n\nNULL-safe equal. This operator performs an equality comparison like the\n= operator, but returns 1 rather than NULL if both operands are NULL,\nand 0 rather than NULL if one operand is NULL.\n\nURL: https://mariadb.com/kb/en/null-safe-equal/\n\n','MariaDB> SELECT 1 <=> 1, NULL <=> NULL, 1 <=> NULL;\n -> 1, 1, 0\nMariaDB> SELECT 1 = 1, NULL = NULL, 1 = NULL;\n -> 1, NULL, NULL\n','https://mariadb.com/kb/en/null-safe-equal/'),(118,'HELP STATEMENT',28,'Syntax:\nHELP \'search_string\'\n\nThe HELP statement returns online information from the MySQL Reference\nmanual. Its proper operation requires that the help tables in the mysql\ndatabase be initialized with help topic information.\n\nThe HELP statement searches the help tables for the given search string\nand displays the result of the search. The search string is not case\nsensitive.\n\nURL: https://mariadb.com/kb/en/help-command/\n\n','','https://mariadb.com/kb/en/help-command/'),(119,'RESET',26,'Syntax:\nRESET reset_option [, reset_option] ...\n\nThe RESET statement is used to clear the state of various server\noperations. You must have the RELOAD privilege to execute RESET.\n\nRESET acts as a stronger version of the FLUSH statement. See [HELP\nFLUSH].\n\nThe RESET statement causes an implicit commit. See\nhttps://mariadb.com/kb/en/sql-statements-that-cause-an-implicit-commit/.\n\nURL: https://mariadb.com/kb/en/reset/\n\n','','https://mariadb.com/kb/en/reset/'),(120,'GET_LOCK',14,'Syntax:\nGET_LOCK(str,timeout)\n\nTries to obtain a lock with a name given by the string str, using a\ntimeout of timeout seconds. Returns 1 if the lock was obtained\nsuccessfully, 0 if the attempt timed out (for example, because another\nclient has previously locked the name), or NULL if an error occurred\n(such as running out of memory or the thread was killed with mysqladmin\nkill). If you have a lock obtained with GET_LOCK(), it is released when\nyou execute RELEASE_LOCK(), execute a new GET_LOCK(), or your\nconnection terminates (either normally or abnormally). Locks obtained\nwith GET_LOCK() do not interact with transactions. That is, committing\na transaction does not release any such locks obtained during the\ntransaction.\n\nThis function can be used to implement application locks or to simulate\nrecord locks. Names are locked on a server-wide basis. If a name has\nbeen locked by one client, GET_LOCK() blocks any request by another\nclient for a lock with the same name. This enables clients that agree\non a given lock name to use the name to perform cooperative advisory\nlocking. But be aware that it also enables a client that is not among\nthe set of cooperating clients to lock a name, either inadvertently or\ndeliberately, and thus prevent any of the cooperating clients from\nlocking that name. One way to reduce the likelihood of this is to use\nlock names that are database-specific or application-specific. For\nexample, use lock names of the form db_name.str or app_name.str.\n\nURL: https://mariadb.com/kb/en/get_lock/\n\n','MariaDB> SELECT GET_LOCK(\'lock1\',10);\n -> 1\nMariaDB> SELECT IS_FREE_LOCK(\'lock2\');\n -> 1\nMariaDB> SELECT GET_LOCK(\'lock2\',10);\n -> 1\nMariaDB> SELECT RELEASE_LOCK(\'lock2\');\n -> 1\nMariaDB> SELECT RELEASE_LOCK(\'lock1\');\n -> NULL\n','https://mariadb.com/kb/en/get_lock/'),(121,'UCASE',37,'Syntax:\nUCASE(str)\n\nUCASE() is a synonym for UPPER().\n\nURL: https://mariadb.com/kb/en/ucase/\n\n','','https://mariadb.com/kb/en/ucase/'),(122,'SHOW BINLOG EVENTS',26,'Syntax:\nSHOW BINLOG EVENTS\n [IN \'log_name\'] [FROM pos] [LIMIT [offset,] row_count]\n\nShows the events in the binary log. If you do not specify \'log_name\',\nthe first binary log is displayed.\n\nURL: https://mariadb.com/kb/en/show-binlog-events/\n\n','','https://mariadb.com/kb/en/show-binlog-events/'),(123,'MPOLYFROMWKB',32,'MPolyFromWKB(wkb[,srid]), MultiPolygonFromWKB(wkb[,srid])\n\nConstructs a MULTIPOLYGON value using its WKB representation and SRID.\n\nURL: https://mariadb.com/kb/en/mpolyfromwkb/\n\n','','https://mariadb.com/kb/en/mpolyfromwkb/'),(124,'ITERATE',23,'Syntax:\nITERATE label\n\nITERATE can appear only within LOOP, REPEAT, and WHILE statements.\nITERATE means \"start the loop again.\"\n\nURL: https://mariadb.com/kb/en/iterate/\n\n','','https://mariadb.com/kb/en/iterate/'),(125,'DO',27,'Syntax:\nDO expr [, expr] ...\n\nDO executes the expressions but does not return any results. In most\nrespects, DO is shorthand for SELECT expr, ..., but has the advantage\nthat it is slightly faster when you do not care about the result.\n\nDO is useful primarily with functions that have side effects, such as\nRELEASE_LOCK().\n\nURL: https://mariadb.com/kb/en/do/\n\n','','https://mariadb.com/kb/en/do/'),(126,'CURTIME',31,'Syntax:\nCURTIME()\n\nReturns the current time as a value in \'HH:MM:SS\' or HHMMSS.uuuuuu\nformat, depending on whether the function is used in a string or\nnumeric context. The value is expressed in the current time zone.\n\nURL: https://mariadb.com/kb/en/curtime/\n\n','MariaDB> SELECT CURTIME();\n -> \'23:50:26\'\nMariaDB> SELECT CURTIME() + 0;\n -> 235026.000000\n','https://mariadb.com/kb/en/curtime/'),(127,'CHAR_LENGTH',37,'Syntax:\nCHAR_LENGTH(str)\n\nReturns the length of the string str, measured in characters. A\nmulti-byte character counts as a single character. This means that for\na string containing five 2-byte characters, LENGTH() returns 10,\nwhereas CHAR_LENGTH() returns 5.\n\nURL: https://mariadb.com/kb/en/char_length/\n\n','','https://mariadb.com/kb/en/char_length/'),(128,'BIGINT',22,'BIGINT[(M)] [UNSIGNED] [ZEROFILL]\n\nA large integer. The signed range is -9223372036854775808 to\n9223372036854775807. The unsigned range is 0 to 18446744073709551615.\n\nSERIAL is an alias for BIGINT UNSIGNED NOT NULL AUTO_INCREMENT UNIQUE.\n\nURL: https://mariadb.com/kb/en/bigint/\n\n','','https://mariadb.com/kb/en/bigint/'),(129,'SET',26,'Syntax:\nSET variable_assignment [, variable_assignment] ...\n\nvariable_assignment:\n user_var_name = expr\n | [GLOBAL | SESSION] system_var_name = expr\n | [@@global. | @@session. | @@]system_var_name = expr\n\nThe SET statement assigns values to different types of variables that\naffect the operation of the server or your client. Older versions of\nMySQL employed SET OPTION, but this syntax is deprecated in favor of\nSET without OPTION.\n\nURL: https://mariadb.com/kb/en/set/\n\n','','https://mariadb.com/kb/en/set/'),(130,'LOAD XML',27,'Syntax:\nLOAD XML [LOW_PRIORITY | CONCURRENT] [LOCAL] INFILE \'file_name\'\n [REPLACE | IGNORE]\n INTO TABLE [db_name.]tbl_name\n [CHARACTER SET charset_name]\n [ROWS IDENTIFIED BY \'<tagname>\']\n [IGNORE number {LINES | ROWS}]\n [(column_or_user_var,...)]\n [SET col_name = expr,...]\n\nThe LOAD XML statement reads data from an XML file into a table. The\nfile_name must be given as a literal string. The tagname in the\noptional ROWS IDENTIFIED BY clause must also be given as a literal\nstring, and must be surrounded by angle brackets (< and >).\n\nLOAD XML acts as the complement of running the mysql client in XML\noutput mode (that is, starting the client with the --xml option). To\nwrite data from a table to an XML file, use a command such as the\nfollowing one from the system shell:\n\nshell> mysql --xml -e \'SELECT * FROM mytable\' > file.xml\n\nTo read the file back into a table, use LOAD XML INFILE. By default,\nthe <row> element is considered to be the equivalent of a database\ntable row; this can be changed using the ROWS IDENTIFIED BY clause.\n\nThis statement supports three different XML formats:\n\no Column names as attributes and column values as attribute values:\n\n<row column1=\"value1\" column2=\"value2\" .../>\n\no Column names as tags and column values as the content of these tags:\n\n<row>\n <column1>value1</column1>\n <column2>value2</column2>\n</row>\n\no Column names are the name attributes of <field> tags, and values are\n the contents of these tags:\n\n<row>\n <field name=\'column1\'>value1</field>\n <field name=\'column2\'>value2</field>\n</row>\n\n This is the format used by other MySQL tools, such as mysqldump.\n\nAll 3 formats can be used in the same XML file; the import routine\nautomatically detects the format for each row and interprets it\ncorrectly. Tags are matched based on the tag or attribute name and the\ncolumn name.\n\nThe following clauses work essentially the same way for LOAD XML as\nthey do for LOAD DATA:\n\no LOW_PRIORITY or CONCURRENT\n\no LOCAL\n\no REPLACE or IGNORE\n\no CHARACTER SET\n\no (column_or_user_var,...)\n\no SET\n\nSee [HELP LOAD DATA], for more information about these clauses.\n\nThe IGNORE number LINES or IGNORE number ROWS clause causes the first\nnumber rows in the XML file to be skipped. It is analogous to the LOAD\nDATA statement\'s IGNORE ... LINES clause.\n\nURL: https://mariadb.com/kb/en/load-xml/\n\n','','https://mariadb.com/kb/en/load-xml/'),(131,'CONV',4,'Syntax:\nCONV(N,from_base,to_base)\n\nConverts numbers between different number bases. Returns a string\nrepresentation of the number N, converted from base from_base to base\nto_base. Returns NULL if any argument is NULL. The argument N is\ninterpreted as an integer, but may be specified as an integer or a\nstring. The minimum base is 2 and the maximum base is 36. If to_base is\na negative number, N is regarded as a signed number. Otherwise, N is\ntreated as unsigned. CONV() works with 64-bit precision.\n\nURL: https://mariadb.com/kb/en/conv/\n\n','MariaDB> SELECT CONV(\'a\',16,2);\n -> \'1010\'\nMariaDB> SELECT CONV(\'6E\',18,8);\n -> \'172\'\nMariaDB> SELECT CONV(-17,10,-18);\n -> \'-H\'\nMariaDB> SELECT CONV(10+\'10\'+\'10\'+0xa,10,10);\n -> \'40\'\n','https://mariadb.com/kb/en/conv/'),(132,'DATE',22,'DATE\n\nA date. The supported range is \'1000-01-01\' to \'9999-12-31\'. MySQL\ndisplays DATE values in \'YYYY-MM-DD\' format, but permits assignment of\nvalues to DATE columns using either strings or numbers.\n\nURL: https://mariadb.com/kb/en/date/\n\n','','https://mariadb.com/kb/en/date/'),(133,'ASSIGN-VALUE',15,'Syntax:\n:=\n\nAssignment operator. Causes the user variable on the left hand side of\nthe operator to take on the value to its right. The value on the right\nhand side may be a literal value, another variable storing a value, or\nany legal expression that yields a scalar value, including the result\nof a query (provided that this value is a scalar value). You can\nperform multiple assignments in the same SET statement. You can perform\nmultiple assignments in the same statement-\n\nUnlike =, the := operator is never interpreted as a comparison\noperator. This means you can use := in any valid SQL statement (not\njust in SET statements) to assign a value to a variable.\n\nURL: https://mariadb.com/kb/en/assignment-operator/\n\n','MariaDB> SELECT @var1, @var2;\n -> NULL, NULL\nMariaDB> SELECT @var1 := 1, @var2;\n -> 1, NULL\nMariaDB> SELECT @var1, @var2;\n -> 1, NULL\nMariaDB> SELECT @var1, @var2 := @var1;\n -> 1, 1\nMariaDB> SELECT @var1, @var2;\n -> 1, 1\n\nMariaDB> SELECT @var1:=COUNT(*) FROM t1;\n -> 4\nMariaDB> SELECT @var1;\n -> 4\n','https://mariadb.com/kb/en/assignment-operator/'),(134,'SHOW OPEN TABLES',26,'Syntax:\nSHOW OPEN TABLES [{FROM | IN} db_name]\n [LIKE \'pattern\' | WHERE expr]\n\nSHOW OPEN TABLES lists the non-TEMPORARY tables that are currently open\nin the table cache. See\nhttp://dev.mysql.com/doc/refman/5.5/en/table-cache.html. The FROM\nclause, if present, restricts the tables shown to those present in the\ndb_name database. The LIKE clause, if present, indicates which table\nnames to match. The WHERE clause can be given to select rows using more\ngeneral conditions, as discussed in\nhttps://mariadb.com/kb/en/extended-show/.\n\nURL: https://mariadb.com/kb/en/show-open-tables/\n\n','','https://mariadb.com/kb/en/show-open-tables/'),(135,'EXTRACT',31,'Syntax:\nEXTRACT(unit FROM date)\n\nThe EXTRACT() function uses the same kinds of unit specifiers as\nDATE_ADD() or DATE_SUB(), but extracts parts from the date rather than\nperforming date arithmetic.\n\nURL: https://mariadb.com/kb/en/extract/\n\n','MariaDB> SELECT EXTRACT(YEAR FROM \'2009-07-02\');\n -> 2009\nMariaDB> SELECT EXTRACT(YEAR_MONTH FROM \'2009-07-02 01:02:03\');\n -> 200907\nMariaDB> SELECT EXTRACT(DAY_MINUTE FROM \'2009-07-02 01:02:03\');\n -> 20102\nMariaDB> SELECT EXTRACT(MICROSECOND\n -> FROM \'2003-01-02 10:30:00.000123\');\n -> 123\n','https://mariadb.com/kb/en/extract/'),(136,'ENCRYPT',12,'Syntax:\nENCRYPT(str[,salt])\n\nEncrypts str using the Unix crypt() system call and returns a binary\nstring. The salt argument must be a string with at least two characters\nor the result will be NULL. If no salt argument is given, a random\nvalue is used.\n\nURL: https://mariadb.com/kb/en/encrypt/\n\n','MariaDB> SELECT ENCRYPT(\'hello\');\n -> \'VxuFAJXVARROc\'\n','https://mariadb.com/kb/en/encrypt/'),(137,'SHOW STATUS',26,'Syntax:\nSHOW [GLOBAL | SESSION] STATUS\n [LIKE \'pattern\' | WHERE expr]\n\nSHOW STATUS provides server status information. This information also\ncan be obtained using the mysqladmin extended-status command. The LIKE\nclause, if present, indicates which variable names to match. The WHERE\nclause can be given to select rows using more general conditions, as\ndiscussed in https://mariadb.com/kb/en/extended-show/.\nThis statement does not require any privilege. It requires only the\nability to connect to the server.\nWith a LIKE clause, the statement displays only rows for those\nvariables with names that match the pattern:\n\nMariaDB> SHOW STATUS LIKE \'Key%\';\n+--------------------+----------+\n| Variable_name | Value |\n+--------------------+----------+\n| Key_blocks_used | 14955 |\n| Key_read_requests | 96854827 |\n| Key_reads | 162040 |\n| Key_write_requests | 7589728 |\n| Key_writes | 3813196 |\n+--------------------+----------+\n\nWith the GLOBAL modifier, SHOW STATUS displays the status values for\nall connections to MySQL. With SESSION, it displays the status values\nfor the current connection. If no modifier is present, the default is\nSESSION. LOCAL is a synonym for SESSION.\n\nSome status variables have only a global value. For these, you get the\nsame value for both GLOBAL and SESSION. The scope for each status\nvariable is listed at\nhttps://mariadb.com/kb/en/server-status-variables/.\n\nEach invocation of the SHOW STATUS statement uses an internal temporary\ntable and increments the global Created_tmp_tables value.\n\nURL: https://mariadb.com/kb/en/show-status/\n\n','','https://mariadb.com/kb/en/show-status/'),(138,'EXTRACTVALUE',37,'Syntax:\nExtractValue(xml_frag, xpath_expr)\n\nExtractValue() takes two string arguments, a fragment of XML markup\nxml_frag and an XPath expression xpath_expr (also known as a locator);\nit returns the text (CDATA) of the first text node which is a child of\nthe elements or elements matched by the XPath expression. In MySQL 5.5,\nthe XPath expression can contain at most 127 characters. (This\nlimitation is lifted in MySQL 5.6.)\n\nUsing this function is the equivalent of performing a match using the\nxpath_expr after appending /text(). In other words,\nExtractValue(\'<a><b>Sakila</b></a>\', \'/a/b\') and\nExtractValue(\'<a><b>Sakila</b></a>\', \'/a/b/text()\') produce the same\nresult.\n\nIf multiple matches are found, the content of the first child text node\nof each matching element is returned (in the order matched) as a\nsingle, space-delimited string.\n\nIf no matching text node is found for the expression (including the\nimplicit /text())---for whatever reason, as long as xpath_expr is\nvalid, and xml_frag consists of elements which are properly nested and\nclosed---an empty string is returned. No distinction is made between a\nmatch on an empty element and no match at all. This is by design.\n\nIf you need to determine whether no matching element was found in\nxml_frag or such an element was found but contained no child text\nnodes, you should test the result of an expression that uses the XPath\ncount() function. For example, both of these statements return an empty\nstring, as shown here:\n\nMariaDB> SELECT ExtractValue(\'<a><b/></a>\', \'/a/b\');\n+-------------------------------------+\n| ExtractValue(\'<a><b/></a>\', \'/a/b\') |\n+-------------------------------------+\n| |\n+-------------------------------------+\n1 row in set (0.00 sec)\n\nMariaDB> SELECT ExtractValue(\'<a><c/></a>\', \'/a/b\');\n+-------------------------------------+\n| ExtractValue(\'<a><c/></a>\', \'/a/b\') |\n+-------------------------------------+\n| |\n+-------------------------------------+\n1 row in set (0.00 sec)\n\nHowever, you can determine whether there was actually a matching\nelement using the following:\n\nMariaDB> SELECT ExtractValue(\'<a><b/></a>\', \'count(/a/b)\');\n+-------------------------------------+\n| ExtractValue(\'<a><b/></a>\', \'count(/a/b)\') |\n+-------------------------------------+\n| 1 |\n+-------------------------------------+\n1 row in set (0.00 sec)\n\nMariaDB> SELECT ExtractValue(\'<a><c/></a>\', \'count(/a/b)\');\n+-------------------------------------+\n| ExtractValue(\'<a><c/></a>\', \'count(/a/b)\') |\n+-------------------------------------+\n| 0 |\n+-------------------------------------+\n1 row in set (0.01 sec)\n\n*Important*: ExtractValue() returns only CDATA, and does not return any\ntags that might be contained within a matching tag, nor any of their\ncontent (see the result returned as val1 in the following example).\n\nURL: https://mariadb.com/kb/en/extractvalue/\n\n','MariaDB> SELECT\n -> ExtractValue(\'<a>ccc<b>ddd</b></a>\', \'/a\') AS val1,\n -> ExtractValue(\'<a>ccc<b>ddd</b></a>\', \'/a/b\') AS val2,\n -> ExtractValue(\'<a>ccc<b>ddd</b></a>\', \'//b\') AS val3,\n -> ExtractValue(\'<a>ccc<b>ddd</b></a>\', \'/b\') AS val4,\n -> ExtractValue(\'<a>ccc<b>ddd</b><b>eee</b></a>\', \'//b\') AS val5;\n\n+------+------+------+------+---------+\n| val1 | val2 | val3 | val4 | val5 |\n+------+------+------+------+---------+\n| ccc | ddd | ddd | | ddd eee |\n+------+------+------+------+---------+\n','https://mariadb.com/kb/en/extractvalue/'),(139,'OLD_PASSWORD',12,'Syntax:\nOLD_PASSWORD(str)\n\nOLD_PASSWORD() was added when the implementation of PASSWORD() was\nchanged in MySQL 4.1 to improve security. OLD_PASSWORD() returns the\nvalue of the pre-4.1 implementation of PASSWORD() as a string, and is\nintended to permit you to reset passwords for any pre-4.1 clients that\nneed to connect to your version 5.5 MySQL server without locking them\nout. See http://dev.mysql.com/doc/refman/5.1/en/password-hashing.html.\n\nAs of MySQL 5.5.3, the return value is a nonbinary string in the\nconnection character set. Before 5.5.3, the return value is a binary\nstring.\n\nURL: https://mariadb.com/kb/en/old_password/\n\n','','https://mariadb.com/kb/en/old_password/'),(140,'FORMAT',37,'Syntax:\nFORMAT(X,D[,locale])\n\nFormats the number X to a format like \'#,###,###.##\', rounded to D\ndecimal places, and returns the result as a string. If D is 0, the\nresult has no decimal point or fractional part.\n\nThe optional third parameter enables a locale to be specified to be\nused for the result number\'s decimal point, thousands separator, and\ngrouping between separators. Permissible locale values are the same as\nthe legal values for the lc_time_names system variable (see\nhttps://mariadb.com/kb/en/server-locale/). If no\nlocale is specified, the default is \'en_US\'.\n\nURL: https://mariadb.com/kb/en/format/\n\n','MariaDB> SELECT FORMAT(12332.123456, 4);\n -> \'12,332.1235\'\nMariaDB> SELECT FORMAT(12332.1,4);\n -> \'12,332.1000\'\nMariaDB> SELECT FORMAT(12332.2,0);\n -> \'12,332\'\nMariaDB> SELECT FORMAT(12332.2,2,\'de_DE\');\n -> \'12.332,20\'\n','https://mariadb.com/kb/en/format/'),(141,'||',15,'Syntax:\nOR, ||\n\nLogical OR. When both operands are non-NULL, the result is 1 if any\noperand is nonzero, and 0 otherwise. With a NULL operand, the result is\n1 if the other operand is nonzero, and NULL otherwise. If both operands\nare NULL, the result is NULL.\n\nURL: https://mariadb.com/kb/en/or/\n\n','MariaDB> SELECT 1 || 1;\n -> 1\nMariaDB> SELECT 1 || 0;\n -> 1\nMariaDB> SELECT 0 || 0;\n -> 0\nMariaDB> SELECT 0 || NULL;\n -> NULL\nMariaDB> SELECT 1 || NULL;\n -> 1\n','https://mariadb.com/kb/en/or/'),(142,'BIT_LENGTH',37,'Syntax:\nBIT_LENGTH(str)\n\nReturns the length of the string str in bits.\n\nURL: https://mariadb.com/kb/en/bit_length/\n\n','MariaDB> SELECT BIT_LENGTH(\'text\');\n -> 32\n','https://mariadb.com/kb/en/bit_length/'),(143,'EXTERIORRING',2,'ExteriorRing(poly)\n\nReturns the exterior ring of the Polygon value poly as a LineString.\n\nURL: https://mariadb.com/kb/en/exteriorring/\n\n','MariaDB> SET @poly =\n -> \'Polygon((0 0,0 3,3 3,3 0,0 0),(1 1,1 2,2 2,2 1,1 1))\';\nMariaDB> SELECT AsText(ExteriorRing(GeomFromText(@poly)));\n+-------------------------------------------+\n| AsText(ExteriorRing(GeomFromText(@poly))) |\n+-------------------------------------------+\n| LINESTRING(0 0,0 3,3 3,3 0,0 0) |\n+-------------------------------------------+\n','https://mariadb.com/kb/en/exteriorring/'),(144,'GEOMFROMWKB',32,'GeomFromWKB(wkb[,srid]), GeometryFromWKB(wkb[,srid])\n\nConstructs a geometry value of any type using its WKB representation\nand SRID.\n\nURL: https://mariadb.com/kb/en/geomfromwkb/\n\n','','https://mariadb.com/kb/en/geomfromwkb/'),(145,'SHOW SLAVE HOSTS',26,'Syntax:\nSHOW SLAVE HOSTS\n\nDisplays a list of replication slaves currently registered with the\nmaster. (Before MySQL 5.5.3, only slaves started with the\n--report-host=host_name option are visible in this list.)\n\nThe list is displayed on any server (not just the master server). The\noutput looks like this:\n\nMariaDB> SHOW SLAVE HOSTS;\n+------------+-----------+------+-----------+\n| Server_id | Host | Port | Master_id |\n+------------+-----------+------+-----------+\n| 192168010 | iconnect2 | 3306 | 192168011 |\n| 1921680101 | athena | 3306 | 192168011 |\n+------------+-----------+------+-----------+\n\no Server_id: The unique server ID of the slave server, as configured in\n the server\'s option file, or on the command line with\n --server-id=value.\n\no Host: The host name of the slave server, as configured in the\n server\'s option file, or on the command line with\n --report-host=host_name. Note that this can differ from the machine\n name as configured in the operating system.\n\no Port: The port the slave server is listening on.\n\n In MySQL 5.5.23 and later, a zero in this column means that the slave\n port (--report-port) was not set. Prior to MySQL 5.5.23, 3306 was\n used as the default in such cases (Bug #13333431).\n\no Master_id: The unique server ID of the master server that the slave\n server is replicating from.\n\nSome MySQL versions report another variable, Rpl_recovery_rank. This\nvariable was never used, and was removed in MySQL 5.5.3. (Bug #13963)\n\nURL: https://mariadb.com/kb/en/show-slave-hosts/\n\n','','https://mariadb.com/kb/en/show-slave-hosts/'),(146,'START TRANSACTION',8,'Syntax:\nSTART TRANSACTION [WITH CONSISTENT SNAPSHOT]\nBEGIN [WORK]\nCOMMIT [WORK] [AND [NO] CHAIN] [[NO] RELEASE]\nROLLBACK [WORK] [AND [NO] CHAIN] [[NO] RELEASE]\nSET autocommit = {0 | 1}\n\nThese statements provide control over use of transactions:\n\no START TRANSACTION or BEGIN start a new transaction.\n\no COMMIT commits the current transaction, making its changes permanent.\n\no ROLLBACK rolls back the current transaction, canceling its changes.\n\no SET autocommit disables or enables the default autocommit mode for\n the current session.\n\nBy default, MySQL runs with autocommit mode enabled. This means that as\nsoon as you execute a statement that updates (modifies) a table, MySQL\nstores the update on disk to make it permanent. The change cannot be\nrolled back.\n\nTo disable autocommit mode implicitly for a single series of\nstatements, use the START TRANSACTION statement:\n\nSTART TRANSACTION;\nSELECT @A:=SUM(salary) FROM table1 WHERE type=1;\nUPDATE table2 SET summary=@A WHERE type=1;\nCOMMIT;\n\nWith START TRANSACTION, autocommit remains disabled until you end the\ntransaction with COMMIT or ROLLBACK. The autocommit mode then reverts\nto its previous state.\n\nYou can also begin a transaction like this:\n\nSTART TRANSACTION WITH CONSISTENT SNAPSHOT;\n\nThe WITH CONSISTENT SNAPSHOT option starts a consistent read for\nstorage engines that are capable of it. This applies only to InnoDB.\nThe effect is the same as issuing a START TRANSACTION followed by a\nSELECT from any InnoDB table. See\nhttp://dev.mysql.com/doc/refman/5.5/en/innodb-consistent-read.html. The\nWITH CONSISTENT SNAPSHOT option does not change the current transaction\nisolation level, so it provides a consistent snapshot only if the\ncurrent isolation level is one that permits consistent read (REPEATABLE\nREAD or SERIALIZABLE).\n\n*Important*: Many APIs used for writing MySQL client applications (such\nas JDBC) provide their own methods for starting transactions that can\n(and sometimes should) be used instead of sending a START TRANSACTION\nstatement from the client. See\nhttp://dev.mysql.com/doc/refman/5.5/en/connectors-apis.html, or the\ndocumentation for your API, for more information.\n\nTo disable autocommit mode explicitly, use the following statement:\n\nSET autocommit=0;\n\nAfter disabling autocommit mode by setting the autocommit variable to\nzero, changes to transaction-safe tables (such as those for InnoDB) are not made permanent immediately. You must use COMMIT to\nstore your changes to disk or ROLLBACK to ignore the changes.\n\nautocommit is a session variable and must be set for each session. To\ndisable autocommit mode for each new connection, see the description of\nthe autocommit system variable at\nhttps://mariadb.com/kb/en/server-system-variables/.\n\nBEGIN and BEGIN WORK are supported as aliases of START TRANSACTION for\ninitiating a transaction. START TRANSACTION is standard SQL syntax and\nis the recommended way to start an ad-hoc transaction.\n\nThe BEGIN statement differs from the use of the BEGIN keyword that\nstarts a BEGIN ... END compound statement. The latter does not begin a\ntransaction. See [HELP BEGIN END].\n\n*Note*: Within all stored programs (stored procedures and functions,\ntriggers, and events), the parser treats BEGIN [WORK] as the beginning\nof a BEGIN ... END block. Begin a transaction in this context with\nSTART TRANSACTION instead.\n\nThe optional WORK keyword is supported for COMMIT and ROLLBACK, as are\nthe CHAIN and RELEASE clauses. CHAIN and RELEASE can be used for\nadditional control over transaction completion. The value of the\ncompletion_type system variable determines the default completion\nbehavior. See\nhttps://mariadb.com/kb/en/server-system-variables/.\n\nThe AND CHAIN clause causes a new transaction to begin as soon as the\ncurrent one ends, and the new transaction has the same isolation level\nas the just-terminated transaction. The RELEASE clause causes the\nserver to disconnect the current client session after terminating the\ncurrent transaction. Including the NO keyword suppresses CHAIN or\nRELEASE completion, which can be useful if the completion_type system\nvariable is set to cause chaining or release completion by default.\n\nURL: https://mariadb.com/kb/en/start-transaction/\n\n','','https://mariadb.com/kb/en/start-transaction/'),(147,'BETWEEN AND',18,'Syntax:\nexpr BETWEEN min AND max\n\nIf expr is greater than or equal to min and expr is less than or equal\nto max, BETWEEN returns 1, otherwise it returns 0. This is equivalent\nto the expression (min <= expr AND expr <= max) if all the arguments\nare of the same type. Otherwise type conversion takes place according\nto the rules described in\nhttps://mariadb.com/kb/en/type-conversion/, but\napplied to all the three arguments.\n\nURL: https://mariadb.com/kb/en/between-and/\n\n','MariaDB> SELECT 2 BETWEEN 1 AND 3, 2 BETWEEN 3 and 1;\n -> 1, 0\nMariaDB> SELECT 1 BETWEEN 2 AND 3;\n -> 0\nMariaDB> SELECT \'b\' BETWEEN \'a\' AND \'c\';\n -> 1\nMariaDB> SELECT 2 BETWEEN 2 AND \'3\';\n -> 1\nMariaDB> SELECT 2 BETWEEN 2 AND \'x-3\';\n -> 0\n','https://mariadb.com/kb/en/between-and/'),(148,'MULTIPOLYGON',24,'MultiPolygon(poly1,poly2,...)\n\nConstructs a MultiPolygon value from a set of Polygon or WKB Polygon\narguments.\n\nURL: https://mariadb.com/kb/en/multipolygon/\n\n','','https://mariadb.com/kb/en/multipolygon/'),(149,'TIME_FORMAT',31,'Syntax:\nTIME_FORMAT(time,format)\n\nThis is used like the DATE_FORMAT() function, but the format string may\ncontain format specifiers only for hours, minutes, seconds, and\nmicroseconds. Other specifiers produce a NULL value or 0.\n\nURL: https://mariadb.com/kb/en/time_format/\n\n','MariaDB> SELECT TIME_FORMAT(\'100:00:00\', \'%H %k %h %I %l\');\n -> \'100 100 04 04 4\'\n','https://mariadb.com/kb/en/time_format/'),(150,'LEFT',37,'Syntax:\nLEFT(str,len)\n\nReturns the leftmost len characters from the string str, or NULL if any\nargument is NULL.\n\nURL: https://mariadb.com/kb/en/left/\n\n','MariaDB> SELECT LEFT(\'foobarbar\', 5);\n -> \'fooba\'\n','https://mariadb.com/kb/en/left/'),(151,'FLUSH QUERY CACHE',26,'You can defragment the query cache to better utilize its memory with\nthe FLUSH QUERY CACHE statement. The statement does not remove any\nqueries from the cache.\n\nThe RESET QUERY CACHE statement removes all query results from the\nquery cache. The FLUSH TABLES statement also does this.\n\nURL: https://mariadb.com/kb/en/flush-query-cache/\n\n','','https://mariadb.com/kb/en/flush-query-cache/'),(152,'SET DATA TYPE',22,'SET(\'value1\',\'value2\',...) [CHARACTER SET charset_name] [COLLATE\ncollation_name]\n\nA set. A string object that can have zero or more values, each of which\nmust be chosen from the list of values \'value1\', \'value2\', ... A SET\ncolumn can have a maximum of 64 members. SET values are represented\ninternally as integers.\n\nURL: https://mariadb.com/kb/en/set-data-type/\n\n','','https://mariadb.com/kb/en/set-data-type/'),(153,'RAND',4,'Syntax:\nRAND(), RAND(N)\n\nReturns a random floating-point value v in the range 0 <= v < 1.0. If a\nconstant integer argument N is specified, it is used as the seed value,\nwhich produces a repeatable sequence of column values. In the following\nexample, note that the sequences of values produced by RAND(3) is the\nsame both places where it occurs.\n\nURL: https://mariadb.com/kb/en/rand/\n\n','MariaDB> CREATE TABLE t (i INT);\nQuery OK, 0 rows affected (0.42 sec)\n\nMariaDB> INSERT INTO t VALUES(1),(2),(3);\nQuery OK, 3 rows affected (0.00 sec)\nRecords: 3 Duplicates: 0 Warnings: 0\n\nMariaDB> SELECT i, RAND() FROM t;\n+------+------------------+\n| i | RAND() |\n+------+------------------+\n| 1 | 0.61914388706828 |\n| 2 | 0.93845168309142 |\n| 3 | 0.83482678498591 |\n+------+------------------+\n3 rows in set (0.00 sec)\n\nMariaDB> SELECT i, RAND(3) FROM t;\n+------+------------------+\n| i | RAND(3) |\n+------+------------------+\n| 1 | 0.90576975597606 |\n| 2 | 0.37307905813035 |\n| 3 | 0.14808605345719 |\n+------+------------------+\n3 rows in set (0.00 sec)\n\nMariaDB> SELECT i, RAND() FROM t;\n+------+------------------+\n| i | RAND() |\n+------+------------------+\n| 1 | 0.35877890638893 |\n| 2 | 0.28941420772058 |\n| 3 | 0.37073435016976 |\n+------+------------------+\n3 rows in set (0.00 sec)\n\nMariaDB> SELECT i, RAND(3) FROM t;\n+------+------------------+\n| i | RAND(3) |\n+------+------------------+\n| 1 | 0.90576975597606 |\n| 2 | 0.37307905813035 |\n| 3 | 0.14808605345719 |\n+------+------------------+\n3 rows in set (0.01 sec)\n','https://mariadb.com/kb/en/rand/'),(154,'RPAD',37,'Syntax:\nRPAD(str,len,padstr)\n\nReturns the string str, right-padded with the string padstr to a length\nof len characters. If str is longer than len, the return value is\nshortened to len characters.\n\nURL: https://mariadb.com/kb/en/rpad/\n\n','MariaDB> SELECT RPAD(\'hi\',5,\'?\');\n -> \'hi???\'\nMariaDB> SELECT RPAD(\'hi\',1,\'?\');\n -> \'h\'\n','https://mariadb.com/kb/en/rpad/'),(155,'CREATE DATABASE',39,'Syntax:\nCREATE {DATABASE | SCHEMA} [IF NOT EXISTS] db_name\n [create_specification] ...\n\ncreate_specification:\n [DEFAULT] CHARACTER SET [=] charset_name\n | [DEFAULT] COLLATE [=] collation_name\n\nCREATE DATABASE creates a database with the given name. To use this\nstatement, you need the CREATE privilege for the database. CREATE\nSCHEMA is a synonym for CREATE DATABASE.\n\nURL: https://mariadb.com/kb/en/create-database/\n\n','','https://mariadb.com/kb/en/create-database/'),(156,'DEC',22,'DEC[(M[,D])] [UNSIGNED] [ZEROFILL], NUMERIC[(M[,D])] [UNSIGNED]\n[ZEROFILL], FIXED[(M[,D])] [UNSIGNED] [ZEROFILL]\n\nThese types are synonyms for DECIMAL. The FIXED synonym is available\nfor compatibility with other database systems.\n\nURL: https://mariadb.com/kb/en/dec-numeric-fixed/\n\n','','https://mariadb.com/kb/en/dec-numeric-fixed/'),(157,'VAR_POP',16,'Syntax:\nVAR_POP(expr)\n\nReturns the population standard variance of expr. It considers rows as\nthe whole population, not as a sample, so it has the number of rows as\nthe denominator. You can also use VARIANCE(), which is equivalent but\nis not standard SQL.\n\nVAR_POP() returns NULL if there were no matching rows.\n\nURL: https://mariadb.com/kb/en/var_pop/\n\n','','https://mariadb.com/kb/en/var_pop/'),(158,'ELT',37,'Syntax:\nELT(N,str1,str2,str3,...)\n\nReturns str1 if N = 1, str2 if N = 2, and so on. Returns NULL if N is\nless than 1 or greater than the number of arguments. ELT() is the\ncomplement of FIELD().\n\nURL: https://mariadb.com/kb/en/elt/.html\n\n','MariaDB> SELECT ELT(1, \'ej\', \'Heja\', \'hej\', \'foo\');\n -> \'ej\'\nMariaDB> SELECT ELT(4, \'ej\', \'Heja\', \'hej\', \'foo\');\n -> \'foo\'\n','https://mariadb.com/kb/en/elt/.html'),(159,'ALTER VIEW',39,'Syntax:\nALTER\n [ALGORITHM = {UNDEFINED | MERGE | TEMPTABLE}]\n [DEFINER = { user | CURRENT_USER }]\n [SQL SECURITY { DEFINER | INVOKER }]\n VIEW view_name [(column_list)]\n AS select_statement\n [WITH [CASCADED | LOCAL] CHECK OPTION]\n\nThis statement changes the definition of a view, which must exist. The\nsyntax is similar to that for CREATE VIEW and the effect is the same as\nfor CREATE OR REPLACE VIEW. See [HELP CREATE VIEW]. This statement\nrequires the CREATE VIEW and DROP privileges for the view, and some\nprivilege for each column referred to in the SELECT statement. ALTER\nVIEW is permitted only to the definer or users with the SUPER\nprivilege.\n\nURL: https://mariadb.com/kb/en/alter-view/\n\n','','https://mariadb.com/kb/en/alter-view/'),(160,'SHOW DATABASES',26,'Syntax:\nSHOW {DATABASES | SCHEMAS}\n [LIKE \'pattern\' | WHERE expr]\n\nSHOW DATABASES lists the databases on the MySQL server host. SHOW\nSCHEMAS is a synonym for SHOW DATABASES. The LIKE clause, if present,\nindicates which database names to match. The WHERE clause can be given\nto select rows using more general conditions, as discussed in\nhttps://mariadb.com/kb/en/extended-show/.\n\nYou see only those databases for which you have some kind of privilege,\nunless you have the global SHOW DATABASES privilege. You can also get\nthis list using the mysqlshow command.\n\nIf the server was started with the --skip-show-database option, you\ncannot use this statement at all unless you have the SHOW DATABASES\nprivilege.\n\nURL: https://mariadb.com/kb/en/show-databases/\n\n','','https://mariadb.com/kb/en/show-databases/'),(161,'~',19,'Syntax:\n~\n\nInvert all bits.\n\nURL: https://mariadb.com/kb/en/3489/\n\n','MariaDB> SELECT 5 & ~1;\n -> 4\n','https://mariadb.com/kb/en/3489/'),(162,'TEXT',22,'TEXT[(M)] [CHARACTER SET charset_name] [COLLATE collation_name]\n\nA TEXT column with a maximum length of 65,535 (216 - 1) characters. The\neffective maximum length is less if the value contains multi-byte\ncharacters. Each TEXT value is stored using a 2-byte length prefix that\nindicates the number of bytes in the value.\n\nAn optional length M can be given for this type. If this is done, MySQL\ncreates the column as the smallest TEXT type large enough to hold\nvalues M characters long.\n\nURL: https://mariadb.com/kb/en/text/\n\n','','https://mariadb.com/kb/en/text/'),(163,'CONCAT_WS',37,'Syntax:\nCONCAT_WS(separator,str1,str2,...)\n\nCONCAT_WS() stands for Concatenate With Separator and is a special form\nof CONCAT(). The first argument is the separator for the rest of the\narguments. The separator is added between the strings to be\nconcatenated. The separator can be a string, as can the rest of the\narguments. If the separator is NULL, the result is NULL.\n\nURL: https://mariadb.com/kb/en/concat_ws/\n\n','MariaDB> SELECT CONCAT_WS(\',\',\'First name\',\'Second name\',\'Last Name\');\n -> \'First name,Second name,Last Name\'\nMariaDB> SELECT CONCAT_WS(\',\',\'First name\',NULL,\'Last Name\');\n -> \'First name,Last Name\'\n','https://mariadb.com/kb/en/concat_ws/'),(164,'ROW_COUNT',17,'Syntax:\nROW_COUNT()\n\nBefore MySQL 5.5.5, ROW_COUNT() returns the number of rows changed,\ndeleted, or inserted by the last statement if it was an UPDATE, DELETE,\nor INSERT. For other statements, the value may not be meaningful.\n\nAs of MySQL 5.5.5, ROW_COUNT() returns a value as follows:\n\no DDL statements: 0. This applies to statements such as CREATE TABLE or\n DROP TABLE.\n\no DML statements other than SELECT: The number of affected rows. This\n applies to statements such as UPDATE, INSERT, or DELETE (as before),\n but now also to statements such as ALTER TABLE and LOAD DATA INFILE.\n\no SELECT: -1 if the statement returns a result set, or the number of\n rows \"affected\" if it does not. For example, for SELECT * FROM t1,\n ROW_COUNT() returns -1. For SELECT * FROM t1 INTO OUTFILE\n \'file_name\', ROW_COUNT() returns the number of rows written to the\n file.\n\no SIGNAL statements: 0.\n\nFor UPDATE statements, the affected-rows value by default is the number\nof rows actually changed. If you specify the CLIENT_FOUND_ROWS flag to\nmysql_real_connect() when connecting to mysqld, the affected-rows value\nis the number of rows \"found\"; that is, matched by the WHERE clause.\n\nFor REPLACE statements, the affected-rows value is 2 if the new row\nreplaced an old row, because in this case, one row was inserted after\nthe duplicate was deleted.\n\nFor INSERT ... ON DUPLICATE KEY UPDATE statements, the affected-rows\nvalue is 1 if the row is inserted as a new row and 2 if an existing row\nis updated.\n\nThe ROW_COUNT() value is similar to the value from the\nmysql_affected_rows() C API function and the row count that the mysql\nclient displays following statement execution.\n\nURL: https://mariadb.com/kb/en/information-functions-row_count/\n\n','MariaDB> INSERT INTO t VALUES(1),(2),(3);\nQuery OK, 3 rows affected (0.00 sec)\nRecords: 3 Duplicates: 0 Warnings: 0\n\nMariaDB> SELECT ROW_COUNT();\n+-------------+\n| ROW_COUNT() |\n+-------------+\n| 3 |\n+-------------+\n1 row in set (0.00 sec)\n\nMariaDB> DELETE FROM t WHERE i IN(1,2);\nQuery OK, 2 rows affected (0.00 sec)\n\nMariaDB> SELECT ROW_COUNT();\n+-------------+\n| ROW_COUNT() |\n+-------------+\n| 2 |\n+-------------+\n1 row in set (0.00 sec)\n','https://mariadb.com/kb/en/information-functions-row_count/'),(165,'ASIN',4,'Syntax:\nASIN(X)\n\nReturns the arc sine of X, that is, the value whose sine is X. Returns\nNULL if X is not in the range -1 to 1.\n\nURL: https://mariadb.com/kb/en/asin/\n\n','MariaDB> SELECT ASIN(0.2);\n -> 0.20135792079033\nMariaDB> SELECT ASIN(\'foo\');\n\n+-------------+\n| ASIN(\'foo\') |\n+-------------+\n| 0 |\n+-------------+\n1 row in set, 1 warning (0.00 sec)\n\nMariaDB> SHOW WARNINGS;\n+---------+------+-----------------------------------------+\n| Level | Code | Message |\n+---------+------+-----------------------------------------+\n| Warning | 1292 | Truncated incorrect DOUBLE value: \'foo\' |\n+---------+------+-----------------------------------------+\n','https://mariadb.com/kb/en/asin/'),(166,'SIGN',4,'Syntax:\nSIGN(X)\n\nReturns the sign of the argument as -1, 0, or 1, depending on whether X\nis negative, zero, or positive.\n\nURL: https://mariadb.com/kb/en/sign/\n\n','MariaDB> SELECT SIGN(-32);\n -> -1\nMariaDB> SELECT SIGN(0);\n -> 0\nMariaDB> SELECT SIGN(234);\n -> 1\n','https://mariadb.com/kb/en/sign/'),(167,'SEC_TO_TIME',31,'Syntax:\nSEC_TO_TIME(seconds)\n\nReturns the seconds argument, converted to hours, minutes, and seconds,\nas a TIME value. The range of the result is constrained to that of the\nTIME data type. A warning occurs if the argument corresponds to a value\noutside that range.\n\nURL: https://mariadb.com/kb/en/sec_to_time/\n\n','MariaDB> SELECT SEC_TO_TIME(2378);\n -> \'00:39:38\'\nMariaDB> SELECT SEC_TO_TIME(2378) + 0;\n -> 3938\n','https://mariadb.com/kb/en/sec_to_time/'),(168,'FLOAT',22,'FLOAT[(M,D)] [UNSIGNED] [ZEROFILL]\n\nA small (single-precision) floating-point number. Permissible values\nare -3.402823466E+38 to -1.175494351E-38, 0, and 1.175494351E-38 to\n3.402823466E+38. These are the theoretical limits, based on the IEEE\nstandard. The actual range might be slightly smaller depending on your\nhardware or operating system.\n\nM is the total number of digits and D is the number of digits following\nthe decimal point. If M and D are omitted, values are stored to the\nlimits permitted by the hardware. A single-precision floating-point\nnumber is accurate to approximately 7 decimal places.\n\nUNSIGNED, if specified, disallows negative values.\n\nUsing FLOAT might give you some unexpected problems because all\ncalculations in MySQL are done with double precision. See\nhttps://mariadb.com/kb/en/floating-point-accuracy/.\n\nURL: https://mariadb.com/kb/en/float/\n\n','','https://mariadb.com/kb/en/float/'),(169,'LOCATE',37,'Syntax:\nLOCATE(substr,str), LOCATE(substr,str,pos)\n\nThe first syntax returns the position of the first occurrence of\nsubstring substr in string str. The second syntax returns the position\nof the first occurrence of substring substr in string str, starting at\nposition pos. Returns 0 if substr is not in str.\n\nURL: https://mariadb.com/kb/en/locate/\n\n','MariaDB> SELECT LOCATE(\'bar\', \'foobarbar\');\n -> 4\nMariaDB> SELECT LOCATE(\'xbar\', \'foobar\');\n -> 0\nMariaDB> SELECT LOCATE(\'bar\', \'foobarbar\', 5);\n -> 7\n','https://mariadb.com/kb/en/locate/'),(170,'SHOW EVENTS',26,'Syntax:\nSHOW EVENTS [{FROM | IN} schema_name]\n [LIKE \'pattern\' | WHERE expr]\n\nThis statement displays information about Event Manager events. It\nrequires the EVENT privilege for the database from which the events are\nto be shown.\n\nIn its simplest form, SHOW EVENTS lists all of the events in the\ncurrent schema:\n\nMariaDB> SELECT CURRENT_USER(), SCHEMA();\n+----------------+----------+\n| CURRENT_USER() | SCHEMA() |\n+----------------+----------+\n| jon@ghidora | myschema |\n+----------------+----------+\n1 row in set (0.00 sec)\n\nMariaDB> SHOW EVENTS\\G\n*************************** 1. row ***************************\n Db: myschema\n Name: e_daily\n Definer: jon@ghidora\n Time zone: SYSTEM\n Type: RECURRING\n Execute at: NULL\n Interval value: 10\n Interval field: SECOND\n Starts: 2006-02-09 10:41:23\n Ends: NULL\n Status: ENABLED\n Originator: 0\ncharacter_set_client: latin1\ncollation_connection: latin1_swedish_ci\n Database Collation: latin1_swedish_ci\n\nTo see events for a specific schema, use the FROM clause. For example,\nto see events for the test schema, use the following statement:\n\nSHOW EVENTS FROM test;\n\nThe LIKE clause, if present, indicates which event names to match. The\nWHERE clause can be given to select rows using more general conditions,\nas discussed in\nhttps://mariadb.com/kb/en/extended-show/.\n\nURL: https://mariadb.com/kb/en/show-events/\n\n','','https://mariadb.com/kb/en/show-events/'),(171,'CHARSET',17,'Syntax:\nCHARSET(str)\n\nReturns the character set of the string argument.\n\nURL: https://mariadb.com/kb/en/charset/\n\n','MariaDB> SELECT CHARSET(\'abc\');\n -> \'latin1\'\nMariaDB> SELECT CHARSET(CONVERT(\'abc\' USING utf8));\n -> \'utf8\'\nMariaDB> SELECT CHARSET(USER());\n -> \'utf8\'\n','https://mariadb.com/kb/en/charset/'),(172,'SUBDATE',31,'Syntax:\nSUBDATE(date,INTERVAL expr unit), SUBDATE(expr,days)\n\nWhen invoked with the INTERVAL form of the second argument, SUBDATE()\nis a synonym for DATE_SUB(). For information on the INTERVAL unit\nargument, see the discussion for DATE_ADD().\n\nMariaDB> SELECT DATE_SUB(\'2008-01-02\', INTERVAL 31 DAY);\n -> \'2007-12-02\'\nMariaDB> SELECT SUBDATE(\'2008-01-02\', INTERVAL 31 DAY);\n -> \'2007-12-02\'\n\nThe second form enables the use of an integer value for days. In such\ncases, it is interpreted as the number of days to be subtracted from\nthe date or datetime expression expr.\n\nMariaDB> SELECT SUBDATE(\'2008-01-02 12:00:00\', 31);\n -> \'2007-12-02 12:00:00\'\n\nURL: https://mariadb.com/kb/en/subdate/\n\n','','https://mariadb.com/kb/en/subdate/'),(173,'DAYOFYEAR',31,'Syntax:\nDAYOFYEAR(date)\n\nReturns the day of the year for date, in the range 1 to 366.\n\nURL: https://mariadb.com/kb/en/dayofyear/\n\n','MariaDB> SELECT DAYOFYEAR(\'2007-02-03\');\n -> 34\n','https://mariadb.com/kb/en/dayofyear/'),(174,'%',4,'Syntax:\nN % M, N MOD M\n\nModulo operation. Returns the remainder of N divided by M. For more\ninformation, see the description for the MOD() function in\nhttps://mariadb.com/kb/en/mod/.\n\nURL: https://mariadb.com/kb/en/modulo-operator/\n\n','','https://mariadb.com/kb/en/modulo-operator/'),(175,'LONGTEXT',22,'LONGTEXT [CHARACTER SET charset_name] [COLLATE collation_name]\n\nA TEXT column with a maximum length of 4,294,967,295 or 4GB (232 - 1)\ncharacters. The effective maximum length is less if the value contains\nmulti-byte characters. The effective maximum length of LONGTEXT columns\nalso depends on the configured maximum packet size in the client/server\nprotocol and available memory. Each LONGTEXT value is stored using a\n4-byte length prefix that indicates the number of bytes in the value.\n\nURL: https://mariadb.com/kb/en/longtext/\n\n','','https://mariadb.com/kb/en/longtext/'),(176,'KILL',26,'Syntax:\nKILL [CONNECTION | QUERY] thread_id\n\nEach connection to mysqld runs in a separate thread. You can see which\nthreads are running with the SHOW PROCESSLIST statement and kill a\nthread with the KILL thread_id statement.\n\nKILL permits an optional CONNECTION or QUERY modifier:\n\no KILL CONNECTION is the same as KILL with no modifier: It terminates\n the connection associated with the given thread_id.\n\no KILL QUERY terminates the statement that the connection is currently\n executing, but leaves the connection itself intact.\n\nIf you have the PROCESS privilege, you can see all threads. If you have\nthe SUPER privilege, you can kill all threads and statements.\nOtherwise, you can see and kill only your own threads and statements.\n\nYou can also use the mysqladmin processlist and mysqladmin kill\ncommands to examine and kill threads.\n\n*Note*: You cannot use KILL with the Embedded MySQL Server library\nbecause the embedded server merely runs inside the threads of the host\napplication. It does not create any connection threads of its own.\n\nURL: https://mariadb.com/kb/en/data-manipulation-kill-connection-query/\n\n','','https://mariadb.com/kb/en/data-manipulation-kill-connection-query/'),(177,'DISJOINT',30,'Disjoint(g1,g2)\n\nReturns 1 or 0 to indicate whether g1 is spatially disjoint from (does\nnot intersect) g2.\n\nURL: https://mariadb.com/kb/en/disjoint/\n\n','','https://mariadb.com/kb/en/disjoint/'),(178,'ASTEXT',3,'AsText(g), AsWKT(g)\n\nConverts a value in internal geometry format to its WKT representation\nand returns the string result.\n\nURL: https://mariadb.com/kb/en/astext/\n\n','MariaDB> SET @g = \'LineString(1 1,2 2,3 3)\';\nMariaDB> SELECT AsText(GeomFromText(@g));\n+--------------------------+\n| AsText(GeomFromText(@g)) |\n+--------------------------+\n| LINESTRING(1 1,2 2,3 3) |\n+--------------------------+\n','https://mariadb.com/kb/en/astext/'),(179,'LPAD',37,'Syntax:\nLPAD(str,len,padstr)\n\nReturns the string str, left-padded with the string padstr to a length\nof len characters. If str is longer than len, the return value is\nshortened to len characters.\n\n\nURL: https://mariadb.com/kb/en/lpad/\n\n','MariaDB> SELECT LPAD(\'hi\',4,\'??\');\n -> \'??hi\'\nMariaDB> SELECT LPAD(\'hi\',1,\'??\');\n -> \'h\'\n','https://mariadb.com/kb/en/lpad/'),(180,'DECLARE CONDITION',23,'Syntax:\nDECLARE condition_name CONDITION FOR condition_value\n\ncondition_value:\n mysql_error_code\n | SQLSTATE [VALUE] sqlstate_value\n\nThe DECLARE ... CONDITION statement declares a named error condition,\nassociating a name with a condition that needs specific handling. The\nname can be referred to in a subsequent DECLARE ... HANDLER statement\n(see [HELP DECLARE HANDLER]).\n\nCondition declarations must appear before cursor or handler\ndeclarations.\n\nThe condition_value for DECLARE ... CONDITION can be a MySQL error code\n(a number) or an SQLSTATE value (a 5-character string literal). You\nshould not use MySQL error code 0 or SQLSTATE values that begin with\n\'00\', because those indicate success rather than an error condition.\nFor a list of MySQL error codes and SQLSTATE values, see\nhttps://mariadb.com/kb/en/mariadb-error-codes/.\n\nURL: https://mariadb.com/kb/en/declare-condition/\n\n','','https://mariadb.com/kb/en/declare-condition/'),(181,'OVERLAPS',30,'Overlaps(g1,g2)\n\nReturns 1 or 0 to indicate whether g1 spatially overlaps g2. The term\nspatially overlaps is used if two geometries intersect and their\nintersection results in a geometry of the same dimension but not equal\nto either of the given geometries.\n\nURL: https://mariadb.com/kb/en/overlaps/\n\n','','https://mariadb.com/kb/en/overlaps/'),(182,'SET GLOBAL SQL_SLAVE_SKIP_COUNTER',8,'Syntax:\nSET GLOBAL sql_slave_skip_counter = N\n\nThis statement skips the next N events from the master. This is useful\nfor recovering from replication stops caused by a statement.\n\nThis statement is valid only when the slave threads are not running.\nOtherwise, it produces an error.\n\nURL: https://mariadb.com/kb/en/set-global-sql_slave_skip_counter/\n\n','','https://mariadb.com/kb/en/set-global-sql_slave_skip_counter/'),(183,'NUMGEOMETRIES',25,'NumGeometries(gc)\n\nReturns the number of geometries in the GeometryCollection value gc.\n\nURL: https://mariadb.com/kb/en/numgeometries/\n\n','MariaDB> SET @gc = \'GeometryCollection(Point(1 1),LineString(2 2, 3 3))\';\nMariaDB> SELECT NumGeometries(GeomFromText(@gc));\n+----------------------------------+\n| NumGeometries(GeomFromText(@gc)) |\n+----------------------------------+\n| 2 |\n+----------------------------------+\n','https://mariadb.com/kb/en/numgeometries/'),(184,'MONTHNAME',31,'Syntax:\nMONTHNAME(date)\n\nReturns the full name of the month for date. The language used for the\nname is controlled by the value of the lc_time_names system variable\n(https://mariadb.com/kb/en/server-locale/).\n\nURL: https://mariadb.com/kb/en/monthname/\n\n','MariaDB> SELECT MONTHNAME(\'2008-02-03\');\n -> \'February\'\n','https://mariadb.com/kb/en/monthname/'),(185,'CHANGE MASTER TO',8,'Syntax:\nCHANGE MASTER TO option [, option] ...\n\noption:\n MASTER_BIND = \'interface_name\'\n | MASTER_HOST = \'host_name\'\n | MASTER_USER = \'user_name\'\n | MASTER_PASSWORD = \'password\'\n | MASTER_PORT = port_num\n | MASTER_CONNECT_RETRY = interval\n | MASTER_HEARTBEAT_PERIOD = interval\n | MASTER_LOG_FILE = \'master_log_name\'\n | MASTER_LOG_POS = master_log_pos\n | RELAY_LOG_FILE = \'relay_log_name\'\n | RELAY_LOG_POS = relay_log_pos\n | MASTER_SSL = {0|1}\n | MASTER_SSL_CA = \'ca_file_name\'\n | MASTER_SSL_CAPATH = \'ca_directory_name\'\n | MASTER_SSL_CERT = \'cert_file_name\'\n | MASTER_SSL_KEY = \'key_file_name\'\n | MASTER_SSL_CIPHER = \'cipher_list\'\n | MASTER_SSL_VERIFY_SERVER_CERT = {0|1}\n | IGNORE_SERVER_IDS = (server_id_list)\n\nserver_id_list:\n [server_id [, server_id] ... ]\n\nCHANGE MASTER TO changes the parameters that the slave server uses for\nconnecting to the master server, for reading the master binary log, and\nreading the slave relay log. It also updates the contents of the\nmaster.info and relay-log.info files. To use CHANGE MASTER TO, the\nslave replication threads must be stopped (use STOP SLAVE if\nnecessary).\n\nOptions not specified retain their value, except as indicated in the\nfollowing discussion. Thus, in most cases, there is no need to specify\noptions that do not change. For example, if the password to connect to\nyour MySQL master has changed, you just need to issue these statements\nto tell the slave about the new password:\n\nSTOP SLAVE; -- if replication was running\nCHANGE MASTER TO MASTER_PASSWORD=\'new3cret\';\nSTART SLAVE; -- if you want to restart replication\n\nMASTER_HOST, MASTER_USER, MASTER_PASSWORD, and MASTER_PORT provide\ninformation to the slave about how to connect to its master:\n\no MASTER_HOST and MASTER_PORT are the host name (or IP address) of the\n master host and its TCP/IP port.\n\n *Note*: Replication cannot use Unix socket files. You must be able to\n connect to the master MySQL server using TCP/IP.\n\n If you specify the MASTER_HOST or MASTER_PORT option, the slave\n assumes that the master server is different from before (even if the\n option value is the same as its current value.) In this case, the old\n values for the master binary log file name and position are\n considered no longer applicable, so if you do not specify\n MASTER_LOG_FILE and MASTER_LOG_POS in the statement,\n MASTER_LOG_FILE=\'\' and MASTER_LOG_POS=4 are silently appended to it.\n\n Setting MASTER_HOST=\'\' (that is, setting its value explicitly to an\n empty string) is not the same as not setting MASTER_HOST at all.\n Beginning with MySQL 5.5, trying to set MASTER_HOST to an empty\n string fails with an error. Previously, setting MASTER_HOST to an\n empty string caused START SLAVE subsequently to fail. (Bug #28796)\n\no MASTER_USER and MASTER_PASSWORD are the user name and password of the\n account to use for connecting to the master.\n\n In MySQL 5.5.20 and later, MASTER_USER cannot be made empty; setting\n MASTER_USER = \'\' or leaving it unset when setting a value for for\n MASTER_PASSWORD causes an error (Bug #13427949).\n\n Currently, a password used for a replication slave account is\n effectively limited to 32 characters in length; the password can be\n longer, but any excess characters are truncated. This is not due to\n any limit imposed by the MySQL Server generally, but rather is an\n issue specific to MySQL Replication. (For more information, see Bug\n #43439.)\n\n The text of a running CHANGE MASTER TO statement, including values\n for MASTER_USER and MASTER_PASSWORD, can be seen in the output of a\n concurrent SHOW PROCESSLIST statement.\n\nThe MASTER_SSL_xxx options provide information about using SSL for the\nconnection. They correspond to the --ssl-xxx options described in\nhttps://mariadb.com/kb/en/ssl-server-system-variables/, and\nhttp://dev.mysql.com/doc/refman/5.5/en/replication-solutions-ssl.html.\nThese options can be changed even on slaves that are compiled without\nSSL support. They are saved to the master.info file, but are ignored if\nthe slave does not have SSL support enabled.\n\nMASTER_CONNECT_RETRY specifies how many seconds to wait between connect\nretries. The default is 60. The number of reconnection attempts is\nlimited by the --master-retry-count server option; for more\ninformation, see\nhttps://mariadb.com/kb/en/replication-and-binary-log-server-system-variables/.\n\nMASTER_HEARTBEAT_PERIOD sets the interval in seconds between\nreplication heartbeats. Whenever the master\'s binary log is updated\nwith an event, the waiting period for the next heartbeat is reset.\ninterval is a decimal value having the range 0 to 4294967 seconds and a\nresolution in milliseconds; the smallest nonzero value is 0.001.\nHeartbeats are sent by the master only if there are no unsent events in\nthe binary log file for a period longer than interval.\n\nSetting interval to 0 disables heartbeats altogether. The default value\nfor interval is equal to the value of slave_net_timeout divided by 2.\n\nSetting @@global.slave_net_timeout to a value less than that of the\ncurrent heartbeat interval results in a warning being issued. The\neffect of issuing RESET SLAVE on the heartbeat interval is to reset it\nto the default value.\n\nMASTER_LOG_FILE and MASTER_LOG_POS are the coordinates at which the\nslave I/O thread should begin reading from the master the next time the\nthread starts. RELAY_LOG_FILE and RELAY_LOG_POS are the coordinates at\nwhich the slave SQL thread should begin reading from the relay log the\nnext time the thread starts. If you specify either of MASTER_LOG_FILE\nor MASTER_LOG_POS, you cannot specify RELAY_LOG_FILE or RELAY_LOG_POS.\nIf neither of MASTER_LOG_FILE or MASTER_LOG_POS is specified, the slave\nuses the last coordinates of the slave SQL thread before CHANGE MASTER\nTO was issued. This ensures that there is no discontinuity in\nreplication, even if the slave SQL thread was late compared to the\nslave I/O thread, when you merely want to change, say, the password to\nuse.\n\nCHANGE MASTER TO deletes all relay log files and starts a new one,\nunless you specify RELAY_LOG_FILE or RELAY_LOG_POS. In that case, relay\nlog files are kept; the relay_log_purge global variable is set silently\nto 0.\n\nPrior to MySQL 5.5, RELAY_LOG_FILE required an absolute path. In MySQL\n5.5, the path can be relative, in which case the path is assumed to be\nrelative to the slave\'s data directory. (Bug #12190)\n\nIGNORE_SERVER_IDS was added in MySQL 5.5. This option takes a\ncomma-separated list of 0 or more server IDs. Events originating from\nthe corresponding servers are ignored, with the exception of log\nrotation and deletion events, which are still recorded in the relay\nlog.\n\nIn circular replication, the originating server normally acts as the\nterminator of its own events, so that they are not applied more than\nonce. Thus, this option is useful in circular replication when one of\nthe servers in the circle is removed. Suppose that you have a circular\nreplication setup with 4 servers, having server IDs 1, 2, 3, and 4, and\nserver 3 fails. When bridging the gap by starting replication from\nserver 2 to server 4, you can include IGNORE_SERVER_IDS = (3) in the\nCHANGE MASTER TO statement that you issue on server 4 to tell it to use\nserver 2 as its master instead of server 3. Doing so causes it to\nignore and not to propagate any statements that originated with the\nserver that is no longer in use.\n\nIf a CHANGE MASTER TO statement is issued without any IGNORE_SERVER_IDS\noption, any existing list is preserved; RESET SLAVE also has no effect\non the server ID list. To clear the list of ignored servers, it is\nnecessary to use the option with an empty list:\n\nCHANGE MASTER TO IGNORE_SERVER_IDS = ();\n\nIf IGNORE_SERVER_IDS contains the server\'s own ID and the server was\nstarted with the --replicate-same-server-id option enabled, an error\nresults.\n\nAlso beginning with MySQL 5.5, the master.info file and the output of\nSHOW SLAVE STATUS are extended to provide the list of servers that are\ncurrently ignored. For more information, see\nhttps://mariadb.com/kb/en/show-slave-status/, and\n[HELP SHOW SLAVE STATUS].\n\nBeginning with MySQL 5.5.5, invoking CHANGE MASTER TO causes the\nprevious values for MASTER_HOST, MASTER_PORT, MASTER_LOG_FILE, and\nMASTER_LOG_POS to be written to the error log, along with other\ninformation about the slave\'s state prior to execution.\n\nCHANGE MASTER TO is useful for setting up a slave when you have the\nsnapshot of the master and have recorded the master binary log\ncoordinates corresponding to the time of the snapshot. After loading\nthe snapshot into the slave to synchronize it to the slave, you can run\nCHANGE MASTER TO MASTER_LOG_FILE=\'log_name\', MASTER_LOG_POS=log_pos on\nthe slave to specify the coordinates at which the slave should begin\nreading the master binary log.\n\nThe following example changes the master server the slave uses and\nestablishes the master binary log coordinates from which the slave\nbegins reading. This is used when you want to set up the slave to\nreplicate the master:\n\nCHANGE MASTER TO\n MASTER_HOST=\'master2.mycompany.com\',\n MASTER_USER=\'replication\',\n MASTER_PASSWORD=\'bigs3cret\',\n MASTER_PORT=3306,\n MASTER_LOG_FILE=\'master2-bin.001\',\n MASTER_LOG_POS=4,\n MASTER_CONNECT_RETRY=10;\n\nThe next example shows an operation that is less frequently employed.\nIt is used when the slave has relay log files that you want it to\nexecute again for some reason. To do this, the master need not be\nreachable. You need only use CHANGE MASTER TO and start the SQL thread\n(START SLAVE SQL_THREAD):\n\nCHANGE MASTER TO\n RELAY_LOG_FILE=\'slave-relay-bin.006\',\n RELAY_LOG_POS=4025;\n\nURL: https://mariadb.com/kb/en/change-master-to/\n\n','','https://mariadb.com/kb/en/change-master-to/'),(186,'DROP DATABASE',39,'Syntax:\nDROP {DATABASE | SCHEMA} [IF EXISTS] db_name\n\nDROP DATABASE drops all tables in the database and deletes the\ndatabase. Be very careful with this statement! To use DROP DATABASE,\nyou need the DROP privilege on the database. DROP SCHEMA is a synonym\nfor DROP DATABASE.\n\n*Important*: When a database is dropped, user privileges on the\ndatabase are not automatically dropped. See [HELP GRANT].\n\nIF EXISTS is used to prevent an error from occurring if the database\ndoes not exist.\n\nURL: https://mariadb.com/kb/en/drop-database/\n\n','','https://mariadb.com/kb/en/drop-database/'),(187,'MBREQUAL',6,'MBREqual(g1,g2)\n\nReturns 1 or 0 to indicate whether the Minimum Bounding Rectangles of\nthe two geometries g1 and g2 are the same.\n\nURL: https://mariadb.com/kb/en/mbrequal/\n\n','','https://mariadb.com/kb/en/mbrequal/'),(188,'TIMESTAMP FUNCTION',31,'Syntax:\nTIMESTAMP(expr), TIMESTAMP(expr1,expr2)\n\nWith a single argument, this function returns the date or datetime\nexpression expr as a datetime value. With two arguments, it adds the\ntime expression expr2 to the date or datetime expression expr1 and\nreturns the result as a datetime value.\n\nURL: https://mariadb.com/kb/en/timestamp-function/\n\n','MariaDB> SELECT TIMESTAMP(\'2003-12-31\');\n -> \'2003-12-31 00:00:00\'\nMariaDB> SELECT TIMESTAMP(\'2003-12-31 12:00:00\',\'12:00:00\');\n -> \'2004-01-01 00:00:00\'\n','https://mariadb.com/kb/en/timestamp-function/'),(189,'PROCEDURE ANALYSE',33,'Syntax:\nANALYSE([max_elements[,max_memory]])\n\nANALYSE() examines the result from a query and returns an analysis of\nthe results that suggests optimal data types for each column that may\nhelp reduce table sizes. To obtain this analysis, append PROCEDURE\nANALYSE to the end of a SELECT statement:\n\nSELECT ... FROM ... WHERE ... PROCEDURE ANALYSE([max_elements,[max_memory]])\n\nFor example:\n\nSELECT col1, col2 FROM table1 PROCEDURE ANALYSE(10, 2000);\n\nThe results show some statistics for the values returned by the query,\nand propose an optimal data type for the columns. This can be helpful\nfor checking your existing tables, or after importing new data. You may\nneed to try different settings for the arguments so that PROCEDURE\nANALYSE() does not suggest the ENUM data type when it is not\nappropriate.\n\nThe arguments are optional and are used as follows:\n\no max_elements (default 256) is the maximum number of distinct values\n that ANALYSE() notices per column. This is used by ANALYSE() to check\n whether the optimal data type should be of type ENUM; if there are\n more than max_elements distinct values, then ENUM is not a suggested\n type.\n\no max_memory (default 8192) is the maximum amount of memory that\n ANALYSE() should allocate per column while trying to find all\n distinct values.\n\nURL: https://mariadb.com/kb/en/procedure-analyse/\n\n','','https://mariadb.com/kb/en/procedure-analyse/'),(190,'HELP_VERSION',9,'This help information was generated from the MySQL 5.5 Reference Manual\non: 2012-08-25 (revision: 31914)\n\nThis information applies to MySQL 5.5 through 5.5.29.\n','',''),(191,'CHARACTER_LENGTH',37,'Syntax:\nCHARACTER_LENGTH(str)\n\nCHARACTER_LENGTH() is a synonym for CHAR_LENGTH().\n\nURL: https://mariadb.com/kb/en/character_length/\n\n','','https://mariadb.com/kb/en/character_length/'),(192,'SHOW GRANTS',26,'Syntax:\nSHOW GRANTS [FOR user]\n\nThis statement lists the GRANT statement or statements that must be\nissued to duplicate the privileges that are granted to a MySQL user\naccount. The account is named using the same format as for the GRANT\nstatement; for example, \'jeffrey\'@\'localhost\'. If you specify only the\nuser name part of the account name, a host name part of \'%\' is used.\nFor additional information about specifying account names, see [HELP\nGRANT].\n\nMariaDB> SHOW GRANTS FOR \'root\'@\'localhost\';\n+---------------------------------------------------------------------+\n| Grants for root@localhost |\n+---------------------------------------------------------------------+\n| GRANT ALL PRIVILEGES ON *.* TO \'root\'@\'localhost\' WITH GRANT OPTION |\n+---------------------------------------------------------------------+\n\nTo list the privileges granted to the account that you are using to\nconnect to the server, you can use any of the following statements:\n\nSHOW GRANTS;\nSHOW GRANTS FOR CURRENT_USER;\nSHOW GRANTS FOR CURRENT_USER();\n\nIf SHOW GRANTS FOR CURRENT_USER (or any of the equivalent syntaxes) is\nused in DEFINER context, such as within a stored procedure that is\ndefined with SQL SECURITY DEFINER), the grants displayed are those of\nthe definer and not the invoker.\n\nURL: https://mariadb.com/kb/en/show-grants/\n\n','','https://mariadb.com/kb/en/show-grants/'),(193,'SHOW PRIVILEGES',26,'Syntax:\nSHOW PRIVILEGES\n\nSHOW PRIVILEGES shows the list of system privileges that the MySQL\nserver supports. The exact list of privileges depends on the version of\nyour server.\n\nURL: https://mariadb.com/kb/en/show-privileges/\n\n','','https://mariadb.com/kb/en/show-privileges/'),(194,'CREATE TABLESPACE',39,'Syntax:\nCREATE TABLESPACE tablespace_name\n ADD DATAFILE \'file_name\'\n USE LOGFILE GROUP logfile_group\n [EXTENT_SIZE [=] extent_size]\n [INITIAL_SIZE [=] initial_size]\n [AUTOEXTEND_SIZE [=] autoextend_size]\n [MAX_SIZE [=] max_size]\n [NODEGROUP [=] nodegroup_id]\n [WAIT]\n [COMMENT [=] comment_text]\n ENGINE [=] engine_name\n\nThis statement is used with NDB cluster, which is not supported by MariaDB.','','https://mariadb.com/kb/en/create-tablespace/'),(195,'INSERT FUNCTION',37,'Syntax:\nINSERT(str,pos,len,newstr)\n\nReturns the string str, with the substring beginning at position pos\nand len characters long replaced by the string newstr. Returns the\noriginal string if pos is not within the length of the string. Replaces\nthe rest of the string from position pos if len is not within the\nlength of the rest of the string. Returns NULL if any argument is NULL.\n\nURL: https://mariadb.com/kb/en/insert-function/\n\n','MariaDB> SELECT INSERT(\'Quadratic\', 3, 4, \'What\');\n -> \'QuWhattic\'\nMariaDB> SELECT INSERT(\'Quadratic\', -1, 4, \'What\');\n -> \'Quadratic\'\nMariaDB> SELECT INSERT(\'Quadratic\', 3, 100, \'What\');\n -> \'QuWhat\'\n','https://mariadb.com/kb/en/insert-function/'),(196,'CRC32',4,'Syntax:\nCRC32(expr)\n\nComputes a cyclic redundancy check value and returns a 32-bit unsigned\nvalue. The result is NULL if the argument is NULL. The argument is\nexpected to be a string and (if possible) is treated as one if it is\nnot.\n\nURL: https://mariadb.com/kb/en/crc32/\n\n','MariaDB> SELECT CRC32(\'MySQL\');\n -> 3259397556\nMariaDB> SELECT CRC32(\'mysql\');\n -> 2501908538\n','https://mariadb.com/kb/en/crc32/'),(197,'XOR',15,'Syntax:\nXOR\n\nLogical XOR. Returns NULL if either operand is NULL. For non-NULL\noperands, evaluates to 1 if an odd number of operands is nonzero,\notherwise 0 is returned.\n\nURL: https://mariadb.com/kb/en/xor/\n\n','MariaDB> SELECT 1 XOR 1;\n -> 0\nMariaDB> SELECT 1 XOR 0;\n -> 1\nMariaDB> SELECT 1 XOR NULL;\n -> NULL\nMariaDB> SELECT 1 XOR 1 XOR 1;\n -> 1\n','https://mariadb.com/kb/en/xor/'),(198,'STARTPOINT',13,'StartPoint(ls)\n\nReturns the Point that is the start point of the LineString value ls.\n\nURL: https://mariadb.com/kb/en/startpoint/\n\n','MariaDB> SET @ls = \'LineString(1 1,2 2,3 3)\';\nMariaDB> SELECT AsText(StartPoint(GeomFromText(@ls)));\n+---------------------------------------+\n| AsText(StartPoint(GeomFromText(@ls))) |\n+---------------------------------------+\n| POINT(1 1) |\n+---------------------------------------+\n','https://mariadb.com/kb/en/startpoint/'),(199,'GRANT',10,'Syntax:\nGRANT\n priv_type [(column_list)]\n [, priv_type [(column_list)]] ...\n ON [object_type] priv_level\n TO user_specification [, user_specification] ...\n [REQUIRE {NONE | ssl_option [[AND] ssl_option] ...}]\n [WITH with_option ...]\n\nGRANT PROXY ON user_specification\n TO user_specification [, user_specification] ...\n [WITH GRANT OPTION]\n\nobject_type:\n TABLE\n | FUNCTION\n | PROCEDURE\n\npriv_level:\n *\n | *.*\n | db_name.*\n | db_name.tbl_name\n | tbl_name\n | db_name.routine_name\n\nuser_specification:\n user\n [\n IDENTIFIED BY [PASSWORD] \'password\'\n | IDENTIFIED WITH auth_plugin [AS \'auth_string\']\n ]\n\nssl_option:\n SSL\n | X509\n | CIPHER \'cipher\'\n | ISSUER \'issuer\'\n | SUBJECT \'subject\'\n\nwith_option:\n GRANT OPTION\n | MAX_QUERIES_PER_HOUR count\n | MAX_UPDATES_PER_HOUR count\n | MAX_CONNECTIONS_PER_HOUR count\n | MAX_USER_CONNECTIONS count\n\nThe GRANT statement grants privileges to MySQL user accounts. GRANT\nalso serves to specify other account characteristics such as use of\nsecure connections and limits on access to server resources. To use\nGRANT, you must have the GRANT OPTION privilege, and you must have the\nprivileges that you are granting.\n\nNormally, a database administrator first uses CREATE USER to create an\naccount, then GRANT to define its privileges and characteristics. For\nexample:\n\nCREATE USER \'jeffrey\'@\'localhost\' IDENTIFIED BY \'mypass\';\nGRANT ALL ON db1.* TO \'jeffrey\'@\'localhost\';\nGRANT SELECT ON db2.invoice TO \'jeffrey\'@\'localhost\';\nGRANT USAGE ON *.* TO \'jeffrey\'@\'localhost\' WITH MAX_QUERIES_PER_HOUR 90;\n\nHowever, if an account named in a GRANT statement does not already\nexist, GRANT may create it under the conditions described later in the\ndiscussion of the NO_AUTO_CREATE_USER SQL mode.\n\nThe REVOKE statement is related to GRANT and enables administrators to\nremove account privileges. See [HELP REVOKE].\n\nWhen successfully executed from the mysql program, GRANT responds with\nQuery OK, 0 rows affected. To determine what privileges result from the\noperation, use SHOW GRANTS. See [HELP SHOW GRANTS].\n\nURL: https://mariadb.com/kb/en/grant/\n\n','','https://mariadb.com/kb/en/grant/'),(200,'DECLARE VARIABLE',23,'Syntax:\nDECLARE var_name [, var_name] ... type [DEFAULT value]\n\nThis statement declares local variables within stored programs. To\nprovide a default value for a variable, include a DEFAULT clause. The\nvalue can be specified as an expression; it need not be a constant. If\nthe DEFAULT clause is missing, the initial value is NULL.\n\nLocal variables are treated like stored routine parameters with respect\nto data type and overflow checking. See [HELP CREATE PROCEDURE].\n\nVariable declarations must appear before cursor or handler\ndeclarations.\n\nLocal variable names are not case sensitive. Permissible characters and\nquoting rules are the same as for other identifiers, as described in\nhttps://mariadb.com/kb/en/identifier-names/.\n\nThe scope of a local variable is the BEGIN ... END block within which\nit is declared. The variable can be referred to in blocks nested within\nthe declaring block, except those blocks that declare a variable with\nthe same name.\n\nURL: https://mariadb.com/kb/en/declare-variable/\n\n','','https://mariadb.com/kb/en/declare-variable/'),(201,'MPOLYFROMTEXT',3,'MPolyFromText(wkt[,srid]), MultiPolygonFromText(wkt[,srid])\n\nConstructs a MULTIPOLYGON value using its WKT representation and SRID.\n\nURL: https://mariadb.com/kb/en/mpolyfromtext/\n\n','','https://mariadb.com/kb/en/mpolyfromtext/'),(202,'MBRINTERSECTS',6,'MBRIntersects(g1,g2)\n\nReturns 1 or 0 to indicate whether the Minimum Bounding Rectangles of\nthe two geometries g1 and g2 intersect.\n\nURL: https://mariadb.com/kb/en/mbrintersects/\n\n','','https://mariadb.com/kb/en/mbrintersects/'),(203,'BIT_OR',16,'Syntax:\nBIT_OR(expr)\n\nReturns the bitwise OR of all bits in expr. The calculation is\nperformed with 64-bit (BIGINT) precision.\n\nURL: https://mariadb.com/kb/en/bit_or/\n\n','','https://mariadb.com/kb/en/bit_or/'),(204,'YEARWEEK',31,'Syntax:\nYEARWEEK(date), YEARWEEK(date,mode)\n\nReturns year and week for a date. The mode argument works exactly like\nthe mode argument to WEEK(). The year in the result may be different\nfrom the year in the date argument for the first and the last week of\nthe year.\n\nURL: https://mariadb.com/kb/en/yearweek/\n\n','MariaDB> SELECT YEARWEEK(\'1987-01-01\');\n -> 198653\n','https://mariadb.com/kb/en/yearweek/'),(205,'NOT BETWEEN',18,'Syntax:\nexpr NOT BETWEEN min AND max\n\nThis is the same as NOT (expr BETWEEN min AND max).\n\nURL: https://mariadb.com/kb/en/not-between/\n\n','','https://mariadb.com/kb/en/not-between/'),(206,'IS NOT',18,'Syntax:\nIS NOT boolean_value\n\nTests a value against a boolean value, where boolean_value can be TRUE,\nFALSE, or UNKNOWN.\n\nURL: https://mariadb.com/kb/en/is-not/\n\n','MariaDB> SELECT 1 IS NOT UNKNOWN, 0 IS NOT UNKNOWN, NULL IS NOT UNKNOWN;\n -> 1, 1, 0\n','https://mariadb.com/kb/en/is-not/'),(207,'LOG10',4,'Syntax:\nLOG10(X)\n\nReturns the base-10 logarithm of X.\n\nURL: https://mariadb.com/kb/en/log10/\n\n','MariaDB> SELECT LOG10(2);\n -> 0.30102999566398\nMariaDB> SELECT LOG10(100);\n -> 2\nMariaDB> SELECT LOG10(-100);\n -> NULL\n','https://mariadb.com/kb/en/log10/'),(208,'SQRT',4,'Syntax:\nSQRT(X)\n\nReturns the square root of a nonnegative number X.\n\nURL: https://mariadb.com/kb/en/sqrt/\n\n','MariaDB> SELECT SQRT(4);\n -> 2\nMariaDB> SELECT SQRT(20);\n -> 4.4721359549996\nMariaDB> SELECT SQRT(-16);\n -> NULL\n','https://mariadb.com/kb/en/sqrt/'),(209,'DECIMAL',22,'DECIMAL[(M[,D])] [UNSIGNED] [ZEROFILL]\n\nA packed \"exact\" fixed-point number. M is the total number of digits\n(the precision) and D is the number of digits after the decimal point\n(the scale). The decimal point and (for negative numbers) the \"-\" sign\nare not counted in M. If D is 0, values have no decimal point or\nfractional part. The maximum number of digits (M) for DECIMAL is 65.\nThe maximum number of supported decimals (D) is 30. If D is omitted,\nthe default is 0. If M is omitted, the default is 10.\n\nUNSIGNED, if specified, disallows negative values.\n\nAll basic calculations (+, -, *, /) with DECIMAL columns are done with\na precision of 65 digits.\n\nURL: https://mariadb.com/kb/en/decimal/\n\n','','https://mariadb.com/kb/en/decimal/'),(210,'CREATE INDEX',39,'Syntax:\nCREATE [ONLINE|OFFLINE] [UNIQUE|FULLTEXT|SPATIAL] INDEX index_name\n [index_type]\n ON tbl_name (index_col_name,...)\n [index_option] ...\n\nindex_col_name:\n col_name [(length)] [ASC | DESC]\n\nindex_type:\n USING {BTREE | HASH}\n\nindex_option:\n KEY_BLOCK_SIZE [=] value\n | index_type\n | WITH PARSER parser_name\n | COMMENT \'string\'\n\nCREATE INDEX is mapped to an ALTER TABLE statement to create indexes.\nSee [HELP ALTER TABLE]. CREATE INDEX cannot be used to create a PRIMARY\nKEY; use ALTER TABLE instead. For more information about indexes, see\nhttps://mariadb.com/kb/en/optimization-and-indexes/.\n\nURL: https://mariadb.com/kb/en/create-index/\n\n','','https://mariadb.com/kb/en/create-index/'),(211,'CREATE FUNCTION',39,'The CREATE FUNCTION statement is used to create stored functions and\nuser-defined functions (UDFs):\n\no For information about creating stored functions, see [HELP CREATE\n PROCEDURE].\n\no For information about creating user-defined functions, see [HELP\n CREATE FUNCTION UDF].\n\nURL: https://mariadb.com/kb/en/create-function/\n\n','','https://mariadb.com/kb/en/create-function/'),(212,'ALTER DATABASE',39,'Syntax:\nALTER {DATABASE | SCHEMA} [db_name]\n alter_specification ...\nALTER {DATABASE | SCHEMA} db_name\n UPGRADE DATA DIRECTORY NAME\n\nalter_specification:\n [DEFAULT] CHARACTER SET [=] charset_name\n | [DEFAULT] COLLATE [=] collation_name\n\nALTER DATABASE enables you to change the overall characteristics of a\ndatabase. These characteristics are stored in the db.opt file in the\ndatabase directory. To use ALTER DATABASE, you need the ALTER privilege\non the database. ALTER SCHEMA is a synonym for ALTER DATABASE.\n\nThe database name can be omitted from the first syntax, in which case\nthe statement applies to the default database.\n\nNational Language Characteristics\n\nThe CHARACTER SET clause changes the default database character set.\nThe COLLATE clause changes the default database collation.\nhttps://mariadb.com/kb/en/data-types-character-sets-and-collations/, discusses\ncharacter set and collation names.\n\nYou can see what character sets and collations are available using,\nrespectively, the SHOW CHARACTER SET and SHOW COLLATION statements. See\n[HELP SHOW CHARACTER SET], and [HELP SHOW COLLATION], for more\ninformation.\n\nIf you change the default character set or collation for a database,\nstored routines that use the database defaults must be dropped and\nrecreated so that they use the new defaults. (In a stored routine,\nvariables with character data types use the database defaults if the\ncharacter set or collation are not specified explicitly. See [HELP\nCREATE PROCEDURE].)\n\nUpgrading from Versions Older than MySQL 5.1\n\nThe syntax that includes the UPGRADE DATA DIRECTORY NAME clause updates\nthe name of the directory associated with the database to use the\nencoding implemented in MySQL 5.1 for mapping database names to\ndatabase directory names (see\nhttps://mariadb.com/kb/en/identifier-to-file-name-mapping/). This\nclause is for use under these conditions:\n\no It is intended when upgrading MySQL to 5.1 or later from older\n versions.\n\no It is intended to update a database directory name to the current\n encoding format if the name contains special characters that need\n encoding.\n\no The statement is used by mysqlcheck (as invoked by mysql_upgrade).\n\nFor example, if a database in MySQL 5.0 has the name a-b-c, the name\ncontains instances of the - (dash) character. In MySQL 5.0, the\ndatabase directory is also named a-b-c, which is not necessarily safe\nfor all file systems. In MySQL 5.1 and later, the same database name is\nencoded as a@002db@002dc to produce a file system-neutral directory\nname.\n\nWhen a MySQL installation is upgraded to MySQL 5.1 or later from an\nolder version,the server displays a name such as a-b-c (which is in the\nold format) as #mysql50#a-b-c, and you must refer to the name using the\n#mysql50# prefix. Use UPGRADE DATA DIRECTORY NAME in this case to\nexplicitly tell the server to re-encode the database directory name to\nthe current encoding format:\n\nALTER DATABASE `#mysql50#a-b-c` UPGRADE DATA DIRECTORY NAME;\n\nAfter executing this statement, you can refer to the database as a-b-c\nwithout the special #mysql50# prefix.\n\nURL: https://mariadb.com/kb/en/alter-database/\n\n','','https://mariadb.com/kb/en/alter-database/'),(213,'GEOMETRYN',25,'GeometryN(gc,N)\n\nReturns the N-th geometry in the GeometryCollection value gc.\nGeometries are numbered beginning with 1.\n\nURL: https://mariadb.com/kb/en/geometryn/\n\n','MariaDB> SET @gc = \'GeometryCollection(Point(1 1),LineString(2 2, 3 3))\';\nMariaDB> SELECT AsText(GeometryN(GeomFromText(@gc),1));\n+----------------------------------------+\n| AsText(GeometryN(GeomFromText(@gc),1)) |\n+----------------------------------------+\n| POINT(1 1) |\n+----------------------------------------+\n','https://mariadb.com/kb/en/geometryn/'),(214,'<<',19,'Syntax:\n<<\n\nShifts a longlong (BIGINT) number to the left.\n\nURL: https://mariadb.com/kb/en/shift-left/\n\n','MariaDB> SELECT 1 << 2;\n -> 4\n','https://mariadb.com/kb/en/shift-left/'),(215,'SHOW TABLE STATUS',26,'Syntax:\nSHOW TABLE STATUS [{FROM | IN} db_name]\n [LIKE \'pattern\' | WHERE expr]\n\nSHOW TABLE STATUS works likes SHOW TABLES, but provides a lot of\ninformation about each non-TEMPORARY table. You can also get this list\nusing the mysqlshow --status db_name command. The LIKE clause, if\npresent, indicates which table names to match. The WHERE clause can be\ngiven to select rows using more general conditions, as discussed in\nhttps://mariadb.com/kb/en/extended-show/.\n\nURL: https://mariadb.com/kb/en/show-table-status/\n\n','','https://mariadb.com/kb/en/show-table-status/'),(216,'MD5',12,'Syntax:\nMD5(str)\n\nCalculates an MD5 128-bit checksum for the string. The value is\nreturned as a string of 32 hex digits, or NULL if the argument was\nNULL. The return value can, for example, be used as a hash key. See the\nnotes at the beginning of this section about storing hash values\nefficiently.\n\nAs of MySQL 5.5.3, the return value is a nonbinary string in the\nconnection character set. Before 5.5.3, the return value is a binary\nstring; see the notes at the beginning of this section about using the\nvalue as a nonbinary string.\n\nURL: https://mariadb.com/kb/en/md5/\n\n','MariaDB> SELECT MD5(\'testing\');\n -> \'ae2b1fca515949e5d54fb22b8ed95575\'\n','https://mariadb.com/kb/en/md5/'),(217,'<',18,'Syntax:\n<\n\nLess than:\n\nURL: https://mariadb.com/kb/en/less-than/\n\n','MariaDB> SELECT 2 < 2;\n -> 0\n','https://mariadb.com/kb/en/less-than/'),(218,'UNIX_TIMESTAMP',31,'Syntax:\nUNIX_TIMESTAMP(), UNIX_TIMESTAMP(date)\n\nIf called with no argument, returns a Unix timestamp (seconds since\n\'1970-01-01 00:00:00\' UTC) as an unsigned integer. If UNIX_TIMESTAMP()\nis called with a date argument, it returns the value of the argument as\nseconds since \'1970-01-01 00:00:00\' UTC. date may be a DATE string, a\nDATETIME string, a TIMESTAMP, or a number in the format YYMMDD or\nYYYYMMDD. The server interprets date as a value in the current time\nzone and converts it to an internal value in UTC. Clients can set their\ntime zone as described in\nhttps://mariadb.com/kb/en/time-zones/.\n\nURL: https://mariadb.com/kb/en/unix_timestamp/\n\n','MariaDB> SELECT UNIX_TIMESTAMP();\n -> 1196440210\nMariaDB> SELECT UNIX_TIMESTAMP(\'2007-11-30 10:30:19\');\n -> 1196440219\n','https://mariadb.com/kb/en/unix_timestamp/'),(219,'DAYOFMONTH',31,'Syntax:\nDAYOFMONTH(date)\n\nReturns the day of the month for date, in the range 1 to 31, or 0 for\ndates such as \'0000-00-00\' or \'2008-00-00\' that have a zero day part.\n\nURL: https://mariadb.com/kb/en/dayofmonth/\n\n','MariaDB> SELECT DAYOFMONTH(\'2007-02-03\');\n -> 3\n','https://mariadb.com/kb/en/dayofmonth/'),(220,'ASCII',37,'Syntax:\nASCII(str)\n\nReturns the numeric value of the leftmost character of the string str.\nReturns 0 if str is the empty string. Returns NULL if str is NULL.\nASCII() works for 8-bit characters.\n\nURL: https://mariadb.com/kb/en/ascii/\n\n','MariaDB> SELECT ASCII(\'2\');\n -> 50\nMariaDB> SELECT ASCII(2);\n -> 50\nMariaDB> SELECT ASCII(\'dx\');\n -> 100\n','https://mariadb.com/kb/en/ascii/'),(221,'DIV',4,'Syntax:\nDIV\n\nInteger division. Similar to FLOOR(), but is safe with BIGINT values.\n\nAs of MySQL 5.5.3, if either operand has a noninteger type, the\noperands are converted to DECIMAL and divided using DECIMAL arithmetic\nbefore converting the result to BIGINT. If the result exceeds BIGINT\nrange, an error occurs. Before MySQL 5.5.3, incorrect results may occur\nfor noninteger operands that exceed BIGINT range.\n\nURL: https://mariadb.com/kb/en/div/\n\n','MariaDB> SELECT 5 DIV 2;\n -> 2\n','https://mariadb.com/kb/en/div/'),(222,'RENAME USER',10,'Syntax:\nRENAME USER old_user TO new_user\n [, old_user TO new_user] ...\n\nThe RENAME USER statement renames existing MySQL accounts. To use it,\nyou must have the global CREATE USER privilege or the UPDATE privilege\nfor the mysql database. An error occurs if any old account does not\nexist or any new account exists. Each account name uses the format\ndescribed in https://mariadb.com/kb/en/create-user/#account-names.\nFor example:\n\nRENAME USER \'jeffrey\'@\'localhost\' TO \'jeff\'@\'127.0.0.1\';\n\nIf you specify only the user name part of the account name, a host name\npart of \'%\' is used.\n\nRENAME USER causes the privileges held by the old user to be those held\nby the new user. However, RENAME USER does not automatically drop or\ninvalidate databases or objects within them that the old user created.\nThis includes stored programs or views for which the DEFINER attribute\nnames the old user. Attempts to access such objects may produce an\nerror if they execute in definer security context. (For information\nabout security context, see\nhttps://mariadb.com/kb/en/stored-routine-privileges/.)\n\nThe privilege changes take effect as indicated in\nhttp://dev.mysql.com/doc/refman/5.5/en/privilege-changes.html.\n\nURL: https://mariadb.com/kb/en/rename-user/\n\n','','https://mariadb.com/kb/en/rename-user/'),(223,'SHOW SLAVE STATUS',26,'Syntax:\nSHOW SLAVE STATUS\n\nThis statement provides status information on essential parameters of\nthe slave threads. It requires either the SUPER or REPLICATION CLIENT\nprivilege.\n\nIf you issue this statement using the mysql client, you can use a \\G\nstatement terminator rather than a semicolon to obtain a more readable\nvertical layout:\n\nMariaDB> SHOW SLAVE STATUS\\G\n*************************** 1. row ***************************\n Slave_IO_State: Waiting for master to send event\n Master_Host: localhost\n Master_User: root\n Master_Port: 3306\n Connect_Retry: 3\n Master_Log_File: gbichot-bin.005\n Read_Master_Log_Pos: 79\n Relay_Log_File: gbichot-relay-bin.005\n Relay_Log_Pos: 548\n Relay_Master_Log_File: gbichot-bin.005\n Slave_IO_Running: Yes\n Slave_SQL_Running: Yes\n Replicate_Do_DB:\n Replicate_Ignore_DB:\n Replicate_Do_Table:\n Replicate_Ignore_Table:\n Replicate_Wild_Do_Table:\n Replicate_Wild_Ignore_Table:\n Last_Errno: 0\n Last_Error:\n Skip_Counter: 0\n Exec_Master_Log_Pos: 79\n Relay_Log_Space: 552\n Until_Condition: None\n Until_Log_File:\n Until_Log_Pos: 0\n Master_SSL_Allowed: No\n Master_SSL_CA_File:\n Master_SSL_CA_Path:\n Master_SSL_Cert:\n Master_SSL_Cipher:\n Master_SSL_Key:\n Seconds_Behind_Master: 8\nMaster_SSL_Verify_Server_Cert: No\n Last_IO_Errno: 0\n Last_IO_Error:\n Last_SQL_Errno: 0\n Last_SQL_Error:\n Replicate_Ignore_Server_Ids: 0\n Master_Server_Id: 1\n\nURL: https://mariadb.com/kb/en/show-slave-status/\n\n','','https://mariadb.com/kb/en/show-slave-status/'),(224,'GEOMETRY',34,'MySQL provides a standard way of creating spatial columns for geometry\ntypes, for example, with CREATE TABLE or ALTER TABLE. Currently,\nspatial columns are supported for MyISAM, Aria, InnoDB and ARCHIVE\ntables. See also the annotations about spatial indexes under [HELP\nSPATIAL].\n\nURL: https://mariadb.com/kb/en/gis-functionality/\n\n','CREATE TABLE geom (g GEOMETRY);\n','https://mariadb.com/kb/en/gis-functionality/'),(225,'NUMPOINTS',13,'NumPoints(ls)\n\nReturns the number of Point objects in the LineString value ls.\n\nURL: https://mariadb.com/kb/en/numpoints/\n\n','MariaDB> SET @ls = \'LineString(1 1,2 2,3 3)\';\nMariaDB> SELECT NumPoints(GeomFromText(@ls));\n+------------------------------+\n| NumPoints(GeomFromText(@ls)) |\n+------------------------------+\n| 3 |\n+------------------------------+\n','https://mariadb.com/kb/en/numpoints/'),(226,'ALTER LOGFILE GROUP',39,'Syntax:\nALTER LOGFILE GROUP logfile_group\n ADD UNDOFILE \'file_name\'\n [INITIAL_SIZE [=] size]\n [WAIT]\n ENGINE [=] engine_name\n\nThis statement is used with NDB cluster, which is not supported by MariaDB.\n','','https://mariadb.com/kb/en/alter-logfile-group/'),(227,'&',19,'Syntax:\n&\n\nBitwise AND:\n\nURL: https://mariadb.com/kb/en/bitwise_and/\n\n','MariaDB> SELECT 29 & 15;\n -> 13\n','https://mariadb.com/kb/en/bitwise_and/'),(228,'LOCALTIMESTAMP',31,'Syntax:\nLOCALTIMESTAMP, LOCALTIMESTAMP()\n\nLOCALTIMESTAMP and LOCALTIMESTAMP() are synonyms for NOW().\n\nURL: https://mariadb.com/kb/en/localtimestamp/\n\n','','https://mariadb.com/kb/en/localtimestamp/'),(229,'ASSIGN-EQUAL',15,'Syntax:\n=\n\nThis operator is used to perform value assignments in two cases,\ndescribed in the next two paragraphs.\n\nWithin a SET statement, = is treated as an assignment operator that\ncauses the user variable on the left hand side of the operator to take\non the value to its right. (In other words, when used in a SET\nstatement, = is treated identically to :=.) The value on the right hand\nside may be a literal value, another variable storing a value, or any\nlegal expression that yields a scalar value, including the result of a\nquery (provided that this value is a scalar value). You can perform\nmultiple assignments in the same SET statement.\n\nIn the SET clause of an UPDATE statement, = also acts as an assignment\noperator; in this case, however, it causes the column named on the left\nhand side of the operator to assume the value given to the right,\nprovided any WHERE conditions that are part of the UPDATE are met. You\ncan make multiple assignments in the same SET clause of an UPDATE\nstatement.\n\nIn any other context, = is treated as a comparison operator.\n\nURL: https://mariadb.com/kb/en/assignment-operators-assignment-operator/\n\n','MariaDB> SELECT @var1, @var2;\n -> NULL, NULL\nMariaDB> SELECT @var1 := 1, @var2;\n -> 1, NULL\nMariaDB> SELECT @var1, @var2;\n -> 1, NULL\nMariaDB> SELECT @var1, @var2 := @var1;\n -> 1, 1\nMariaDB> SELECT @var1, @var2;\n -> 1, 1\n','https://mariadb.com/kb/en/assignment-operators-assignment-operator/'),(230,'CONVERT',37,'Syntax:\nCONVERT(expr,type), CONVERT(expr USING transcoding_name)\n\nThe CONVERT() and CAST() functions take an expression of any type and\nproduce a result value of a specified type.\n\nThe type for the result can be one of the following values:\n\no BINARY[(N)]\n\no CHAR[(N)]\n\no DATE\n\no DATETIME\n\no DECIMAL[(M[,D])]\n\no SIGNED [INTEGER]\n\no TIME\n\no UNSIGNED [INTEGER]\n\nBINARY produces a string with the BINARY data type. See\nhttps://mariadb.com/kb/en/binary/ for a\ndescription of how this affects comparisons. If the optional length N\nis given, BINARY(N) causes the cast to use no more than N bytes of the\nargument. Values shorter than N bytes are padded with 0x00 bytes to a\nlength of N.\n\nCHAR(N) causes the cast to use no more than N characters of the\nargument.\n\nCAST() and CONVERT(... USING ...) are standard SQL syntax. The\nnon-USING form of CONVERT() is ODBC syntax.\n\nCONVERT() with USING is used to convert data between different\ncharacter sets. In MySQL, transcoding names are the same as the\ncorresponding character set names. For example, this statement converts\nthe string \'abc\' in the default character set to the corresponding\nstring in the utf8 character set:\n\nSELECT CONVERT(\'abc\' USING utf8);\n\nURL: https://mariadb.com/kb/en/convert/\n\n','SELECT enum_col FROM tbl_name ORDER BY CAST(enum_col AS CHAR);\n','https://mariadb.com/kb/en/convert/'),(231,'ADDDATE',31,'Syntax:\nADDDATE(date,INTERVAL expr unit), ADDDATE(expr,days)\n\nWhen invoked with the INTERVAL form of the second argument, ADDDATE()\nis a synonym for DATE_ADD(). The related function SUBDATE() is a\nsynonym for DATE_SUB(). For information on the INTERVAL unit argument,\nsee the discussion for DATE_ADD().\n\nMariaDB> SELECT DATE_ADD(\'2008-01-02\', INTERVAL 31 DAY);\n -> \'2008-02-02\'\nMariaDB> SELECT ADDDATE(\'2008-01-02\', INTERVAL 31 DAY);\n -> \'2008-02-02\'\n\nWhen invoked with the days form of the second argument, MySQL treats it\nas an integer number of days to be added to expr.\n\nURL: https://mariadb.com/kb/en/adddate/\n\n','MariaDB> SELECT ADDDATE(\'2008-01-02\', 31);\n -> \'2008-02-02\'\n','https://mariadb.com/kb/en/adddate/'),(232,'REPEAT LOOP',23,'Syntax:\n[begin_label:] REPEAT\n statement_list\nUNTIL search_condition\nEND REPEAT [end_label]\n\nThe statement list within a REPEAT statement is repeated until the\nsearch_condition expression is true. Thus, a REPEAT always enters the\nloop at least once. statement_list consists of one or more statements,\neach terminated by a semicolon (;) statement delimiter.\n\nA REPEAT statement can be labeled. For the rules regarding label use,\nsee [HELP labels].\n\nURL: https://mariadb.com/kb/en/repeat-loop/\n\n','MariaDB> delimiter //\n\nMariaDB> CREATE PROCEDURE dorepeat(p1 INT)\n -> BEGIN\n -> SET @x = 0;\n -> REPEAT\n -> SET @x = @x + 1;\n -> UNTIL @x > p1 END REPEAT;\n -> END\n -> //\nQuery OK, 0 rows affected (0.00 sec)\n\nMariaDB> CALL dorepeat(1000)//\nQuery OK, 0 rows affected (0.00 sec)\n\nMariaDB> SELECT @x//\n+------+\n| @x |\n+------+\n| 1001 |\n+------+\n1 row in set (0.00 sec)\n','https://mariadb.com/kb/en/repeat-loop/'),(233,'ALTER FUNCTION',39,'Syntax:\nALTER FUNCTION func_name [characteristic ...]\n\ncharacteristic:\n COMMENT \'string\'\n | LANGUAGE SQL\n | { CONTAINS SQL | NO SQL | READS SQL DATA | MODIFIES SQL DATA }\n | SQL SECURITY { DEFINER | INVOKER }\n\nThis statement can be used to change the characteristics of a stored\nfunction. More than one change may be specified in an ALTER FUNCTION\nstatement. However, you cannot change the parameters or body of a\nstored function using this statement; to make such changes, you must\ndrop and re-create the function using DROP FUNCTION and CREATE\nFUNCTION.\n\nYou must have the ALTER ROUTINE privilege for the function. (That\nprivilege is granted automatically to the function creator.) If binary\nlogging is enabled, the ALTER FUNCTION statement might also require the\nSUPER privilege, as described in\nhttps://mariadb.com/kb/en/binary-logging-of-stored-routines/.\n\nURL: https://mariadb.com/kb/en/alter-function/\n\n','','https://mariadb.com/kb/en/alter-function/'),(234,'SMALLINT',22,'SMALLINT[(M)] [UNSIGNED] [ZEROFILL]\n\nA small integer. The signed range is -32768 to 32767. The unsigned\nrange is 0 to 65535.\n\nURL: https://mariadb.com/kb/en/smallint/\n\n','','https://mariadb.com/kb/en/smallint/'),(235,'DOUBLE PRECISION',22,'DOUBLE PRECISION[(M,D)] [UNSIGNED] [ZEROFILL], REAL[(M,D)] [UNSIGNED]\n[ZEROFILL]\n\nThese types are synonyms for DOUBLE. Exception: If the REAL_AS_FLOAT\nSQL mode is enabled, REAL is a synonym for FLOAT rather than DOUBLE.\n\nURL: https://mariadb.com/kb/en/double-precision/\n\n','','https://mariadb.com/kb/en/double-precision/'),(236,'ORD',37,'Syntax:\nORD(str)\n\nIf the leftmost character of the string str is a multi-byte character,\nreturns the code for that character, calculated from the numeric values\nof its constituent bytes using this formula:\n\n (1st byte code)\n+ (2nd byte code * 256)\n+ (3rd byte code * 2562) ...\n\nIf the leftmost character is not a multi-byte character, ORD() returns\nthe same value as the ASCII() function.\n\nURL: https://mariadb.com/kb/en/ord/\n\n','MariaDB> SELECT ORD(\'2\');\n -> 50\n','https://mariadb.com/kb/en/ord/'),(237,'DEALLOCATE PREPARE',8,'Syntax:\n{DEALLOCATE | DROP} PREPARE stmt_name\n\nTo deallocate a prepared statement produced with PREPARE, use a\nDEALLOCATE PREPARE statement that refers to the prepared statement\nname. Attempting to execute a prepared statement after deallocating it\nresults in an error.\n\nURL: https://mariadb.com/kb/en/deallocate-drop-prepared-statement/\n\n','','https://mariadb.com/kb/en/deallocate-drop-prepared-statement/'),(238,'ENVELOPE',36,'Envelope(g)\n\nReturns the Minimum Bounding Rectangle (MBR) for the geometry value g.\nThe result is returned as a Polygon value.\n\nThe polygon is defined by the corner points of the bounding box:\n\nPOLYGON((MINX MINY, MAXX MINY, MAXX MAXY, MINX MAXY, MINX MINY))\n\nURL: https://mariadb.com/kb/en/envelope/\n\n','MariaDB> SELECT AsText(Envelope(GeomFromText(\'LineString(1 1,2 2)\')));\n+-------------------------------------------------------+\n| AsText(Envelope(GeomFromText(\'LineString(1 1,2 2)\'))) |\n+-------------------------------------------------------+\n| POLYGON((1 1,2 1,2 2,1 2,1 1)) |\n+-------------------------------------------------------+\n','https://mariadb.com/kb/en/envelope/'),(239,'IS_FREE_LOCK',14,'Syntax:\nIS_FREE_LOCK(str)\n\nChecks whether the lock named str is free to use (that is, not locked).\nReturns 1 if the lock is free (no one is using the lock), 0 if the lock\nis in use, and NULL if an error occurs (such as an incorrect argument).\n\nURL: https://mariadb.com/kb/en/is_free_lock/\n\n','','https://mariadb.com/kb/en/is_free_lock/'),(240,'TOUCHES',30,'Touches(g1,g2)\n\nReturns 1 or 0 to indicate whether g1 spatially touches g2. Two\ngeometries spatially touch if the interiors of the geometries do not\nintersect, but the boundary of one of the geometries intersects either\nthe boundary or the interior of the other.\n\nURL: https://mariadb.com/kb/en/touches/\n\n','','https://mariadb.com/kb/en/touches/'),(241,'INET_ATON',14,'Syntax:\nINET_ATON(expr)\n\nGiven the dotted-quad representation of an IPv4 network address as a\nstring, returns an integer that represents the numeric value of the\naddress in network byte order (big endian). INET_ATON() returns NULL if\nit does not understand its argument.\n\nURL: https://mariadb.com/kb/en/inet_aton/\n\n','MariaDB> SELECT INET_ATON(\'10.0.5.9\');\n -> 167773449\n','https://mariadb.com/kb/en/inet_aton/'),(242,'UNCOMPRESS',12,'Syntax:\nUNCOMPRESS(string_to_uncompress)\n\nUncompresses a string compressed by the COMPRESS() function. If the\nargument is not a compressed value, the result is NULL. This function\nrequires MySQL to have been compiled with a compression library such as\nzlib. Otherwise, the return value is always NULL.\n\nURL: https://mariadb.com/kb/en/uncompress/\n\n','MariaDB> SELECT UNCOMPRESS(COMPRESS(\'any string\'));\n -> \'any string\'\nMariaDB> SELECT UNCOMPRESS(\'any string\');\n -> NULL\n','https://mariadb.com/kb/en/uncompress/'),(243,'AUTO_INCREMENT',22,'The AUTO_INCREMENT attribute can be used to generate a unique identity\nfor new rows:\n\nURL: https://mariadb.com/kb/en/auto_increment/\n\n','CREATE TABLE animals (\n id MEDIUMINT NOT NULL AUTO_INCREMENT,\n name CHAR(30) NOT NULL,\n PRIMARY KEY (id)\n);\n\nINSERT INTO animals (name) VALUES\n (\'dog\'),(\'cat\'),(\'penguin\'),\n (\'lax\'),(\'whale\'),(\'ostrich\');\n\nSELECT * FROM animals;\n','https://mariadb.com/kb/en/auto_increment/'),(244,'ISSIMPLE',36,'IsSimple(g)\n\nCurrently, this function is a placeholder and should not be used. If\nimplemented, its behavior will be as described in the next paragraph.\n\nReturns 1 if the geometry value g has no anomalous geometric points,\nsuch as self-intersection or self-tangency. IsSimple() returns 0 if the\nargument is not simple, and -1 if it is NULL.\n\nThe description of each instantiable geometric class given earlier in\nthe chapter includes the specific conditions that cause an instance of\nthat class to be classified as not simple. (See [HELP Geometry\nhierarchy].)\n\nURL: https://mariadb.com/kb/en/issimple/\n\n','','https://mariadb.com/kb/en/issimple/'),(245,'- BINARY',4,'Syntax:\n-\n\nSubtraction:\n\nURL: https://mariadb.com/kb/en/subtraction-operator-/\n\n','MariaDB> SELECT 3-5;\n -> -2\n','https://mariadb.com/kb/en/subtraction-operator-/'),(246,'GEOMCOLLFROMTEXT',3,'GeomCollFromText(wkt[,srid]), GeometryCollectionFromText(wkt[,srid])\n\nConstructs a GEOMETRYCOLLECTION value using its WKT representation and\nSRID.\n\nURL: https://mariadb.com/kb/en/geomcollfromtext/\n\n','','https://mariadb.com/kb/en/geomcollfromtext/'),(247,'WKT DEFINITION',3,'The Well-Known Text (WKT) representation of Geometry is designed to\nexchange geometry data in ASCII form. For a Backus-Naur grammar that\nspecifies the formal production rules for writing WKT values, see the\nOpenGIS specification document referenced in\nhttps://mariadb.com/kb/en/gis-resources/.\n\nURL: https://mariadb.com/kb/en/wkt-definition/\n\n','','https://mariadb.com/kb/en/wkt-definition/'),(248,'CURRENT_TIME',31,'Syntax:\nCURRENT_TIME, CURRENT_TIME()\n\nCURRENT_TIME and CURRENT_TIME() are synonyms for CURTIME().\n\nURL: https://mariadb.com/kb/en/current_time/\n\n','','https://mariadb.com/kb/en/current_time/'),(249,'REVOKE',10,'Syntax:\nREVOKE\n priv_type [(column_list)]\n [, priv_type [(column_list)]] ...\n ON [object_type] priv_level\n FROM user [, user] ...\n\nREVOKE ALL PRIVILEGES, GRANT OPTION\n FROM user [, user] ...\n\nREVOKE PROXY ON user\n FROM user [, user] ...\n\nThe REVOKE statement enables system administrators to revoke privileges\nfrom MySQL accounts. Each account name uses the format described in\nhttps://mariadb.com/kb/en/create-user#account-names. For example:\n\nREVOKE INSERT ON *.* FROM \'jeffrey\'@\'localhost\';\n\nIf you specify only the user name part of the account name, a host name\npart of \'%\' is used.\n\nFor details on the levels at which privileges exist, the permissible\npriv_type and priv_level values, and the syntax for specifying users\nand passwords, see [HELP GRANT]\n\nTo use the first REVOKE syntax, you must have the GRANT OPTION\nprivilege, and you must have the privileges that you are revoking.\n\nTo revoke all privileges, use the second syntax, which drops all\nglobal, database, table, column, and routine privileges for the named\nuser or users:\n\nREVOKE ALL PRIVILEGES, GRANT OPTION FROM user [, user] ...\n\nTo use this REVOKE syntax, you must have the global CREATE USER\nprivilege or the UPDATE privilege for the mysql database.\n\nURL: https://mariadb.com/kb/en/revoke/\n\n','','https://mariadb.com/kb/en/revoke/'),(250,'LAST_INSERT_ID',17,'Syntax:\nLAST_INSERT_ID(), LAST_INSERT_ID(expr)\n\nLAST_INSERT_ID() (with no argument) returns a BIGINT (64-bit) value\nrepresenting the first automatically generated value successfully\ninserted for an AUTO_INCREMENT column as a result of the most recently\nexecuted INSERT statement. The value of LAST_INSERT_ID() remains\nunchanged if no rows are successfully inserted.\n\nFor example, after inserting a row that generates an AUTO_INCREMENT\nvalue, you can get the value like this:\n\nMariaDB> SELECT LAST_INSERT_ID();\n -> 195\n\nThe currently executing statement does not affect the value of\nLAST_INSERT_ID(). Suppose that you generate an AUTO_INCREMENT value\nwith one statement, and then refer to LAST_INSERT_ID() in a\nmultiple-row INSERT statement that inserts rows into a table with its\nown AUTO_INCREMENT column. The value of LAST_INSERT_ID() will remain\nstable in the second statement; its value for the second and later rows\nis not affected by the earlier row insertions. (However, if you mix\nreferences to LAST_INSERT_ID() and LAST_INSERT_ID(expr), the effect is\nundefined.)\n\nIf the previous statement returned an error, the value of\nLAST_INSERT_ID() is undefined. For transactional tables, if the\nstatement is rolled back due to an error, the value of LAST_INSERT_ID()\nis left undefined. For manual ROLLBACK, the value of LAST_INSERT_ID()\nis not restored to that before the transaction; it remains as it was at\nthe point of the ROLLBACK.\n\nWithin the body of a stored routine (procedure or function) or a\ntrigger, the value of LAST_INSERT_ID() changes the same way as for\nstatements executed outside the body of these kinds of objects. The\neffect of a stored routine or trigger upon the value of\nLAST_INSERT_ID() that is seen by following statements depends on the\nkind of routine:\n\no If a stored procedure executes statements that change the value of\n LAST_INSERT_ID(), the changed value is seen by statements that follow\n the procedure call.\n\no For stored functions and triggers that change the value, the value is\n restored when the function or trigger ends, so following statements\n will not see a changed value.\n\nURL: https://mariadb.com/kb/en/last_insert_id/\n\n','','https://mariadb.com/kb/en/last_insert_id/'),(251,'LAST_DAY',31,'Syntax:\nLAST_DAY(date)\n\nTakes a date or datetime value and returns the corresponding value for\nthe last day of the month. Returns NULL if the argument is invalid.\n\nURL: https://mariadb.com/kb/en/last_day/\n\n','MariaDB> SELECT LAST_DAY(\'2003-02-05\');\n -> \'2003-02-28\'\nMariaDB> SELECT LAST_DAY(\'2004-02-05\');\n -> \'2004-02-29\'\nMariaDB> SELECT LAST_DAY(\'2004-01-01 01:01:01\');\n -> \'2004-01-31\'\nMariaDB> SELECT LAST_DAY(\'2003-03-32\');\n -> NULL\n','https://mariadb.com/kb/en/last_day/'),(252,'MEDIUMINT',22,'MEDIUMINT[(M)] [UNSIGNED] [ZEROFILL]\n\nA medium-sized integer. The signed range is -8388608 to 8388607. The\nunsigned range is 0 to 16777215.\n\nURL: https://mariadb.com/kb/en/mediumint/\n\n','','https://mariadb.com/kb/en/mediumint/'),(253,'FLOOR',4,'Syntax:\nFLOOR(X)\n\nReturns the largest integer value not greater than X.\n\nURL: https://mariadb.com/kb/en/floor/\n\n','MariaDB> SELECT FLOOR(1.23);\n -> 1\nMariaDB> SELECT FLOOR(-1.23);\n -> -2\n','https://mariadb.com/kb/en/floor/'),(254,'RTRIM',37,'Syntax:\nRTRIM(str)\n\nReturns the string str with trailing space characters removed.\n\nURL: https://mariadb.com/kb/en/rtrim/\n\n','MariaDB> SELECT RTRIM(\'barbar \');\n -> \'barbar\'\n','https://mariadb.com/kb/en/rtrim/'),(255,'EXPLAIN',28,'Syntax:\nEXPLAIN [explain_type] SELECT select_options\n\nexplain_type:\n EXTENDED\n | PARTITIONS\n\nOr:\n\nEXPLAIN tbl_name\n\nThe EXPLAIN statement can be used either as a way to obtain information\nabout how MySQL executes a statement, or as a synonym for DESCRIBE:\n\no When you precede a SELECT statement with the keyword EXPLAIN, MySQL\n displays information from the optimizer about the query execution\n plan. That is, MySQL explains how it would process the statement,\n including information about how tables are joined and in which order.\n EXPLAIN EXTENDED can be used to obtain additional information.\n\n For information about using EXPLAIN and EXPLAIN EXTENDED to obtain\n query execution plan information, see\n https://mariadb.com/kb/en/explain/.\n\no EXPLAIN PARTITIONS is useful only when examining queries involving\n partitioned tables. For details, see\n http://dev.mysql.com/doc/refman/5.5/en/partitioning-info.html.\n\no EXPLAIN tbl_name is synonymous with DESCRIBE tbl_name or SHOW COLUMNS\n FROM tbl_name. For information about DESCRIBE and SHOW COLUMNS, see\n [HELP DESCRIBE], and [HELP SHOW COLUMNS].\n\nURL: https://mariadb.com/kb/en/explain/\n\n','','https://mariadb.com/kb/en/explain/'),(256,'DEGREES',4,'Syntax:\nDEGREES(X)\n\nReturns the argument X, converted from radians to degrees.\n\nURL: https://mariadb.com/kb/en/degrees/\n\n','MariaDB> SELECT DEGREES(PI());\n -> 180\nMariaDB> SELECT DEGREES(PI() / 2);\n -> 90\n','https://mariadb.com/kb/en/degrees/'),(257,'VARCHAR',22,'[NATIONAL] VARCHAR(M) [CHARACTER SET charset_name] [COLLATE\ncollation_name]\n\nA variable-length string. M represents the maximum column length in\ncharacters. The range of M is 0 to 65,535. The effective maximum length\nof a VARCHAR is subject to the maximum row size (65,535 bytes, which is\nshared among all columns) and the character set used. For example, utf8\ncharacters can require up to three bytes per character, so a VARCHAR\ncolumn that uses the utf8 character set can be declared to be a maximum\nof 21,844 characters. See\nhttp://dev.mysql.com/doc/refman/5.5/en/column-count-limit.html.\n\nMySQL stores VARCHAR values as a 1-byte or 2-byte length prefix plus\ndata. The length prefix indicates the number of bytes in the value. A\nVARCHAR column uses one length byte if values require no more than 255\nbytes, two length bytes if values may require more than 255 bytes.\n\n*Note*: MySQL 5.5 follows the standard SQL specification, and does not\nremove trailing spaces from VARCHAR values.\n\nVARCHAR is shorthand for CHARACTER VARYING. NATIONAL VARCHAR is the\nstandard SQL way to define that a VARCHAR column should use some\npredefined character set. MySQL 4.1 and up uses utf8 as this predefined\ncharacter set.\nhttps://mariadb.com/kb/en/varchar/. NVARCHAR\nis shorthand for NATIONAL VARCHAR.\n\nURL: https://mariadb.com/kb/en/varchar/\n\n','','https://mariadb.com/kb/en/varchar/'),(258,'UNHEX',37,'Syntax:\n\nUNHEX(str)\n\nFor a string argument str, UNHEX(str) performs the inverse operation of\nHEX(str). That is, it interprets each pair of characters in the\nargument as a hexadecimal number and converts it to the character\nrepresented by the number. The return value is a binary string.\n\nURL: https://mariadb.com/kb/en/unhex/\n\n','MariaDB> SELECT UNHEX(\'4D7953514C\');\n -> \'MySQL\'\nMariaDB> SELECT 0x4D7953514C;\n -> \'MySQL\'\nMariaDB> SELECT UNHEX(HEX(\'string\'));\n -> \'string\'\nMariaDB> SELECT HEX(UNHEX(\'1267\'));\n -> \'1267\'\n','https://mariadb.com/kb/en/unhex/'),(259,'- UNARY',4,'Syntax:\n-\n\nUnary minus. This operator changes the sign of the operand.\n\nURL: https://mariadb.com/kb/en/subtraction-operator-/\n\n','MariaDB> SELECT - 2;\n -> -2\n','https://mariadb.com/kb/en/subtraction-operator-/'),(260,'STD',16,'Syntax:\nSTD(expr)\n\nReturns the population standard deviation of expr. This is an extension\nto standard SQL. The standard SQL function STDDEV_POP() can be used\ninstead.\n\nThis function returns NULL if there were no matching rows.\n\nURL: https://mariadb.com/kb/en/std/\n\n','','https://mariadb.com/kb/en/std/'),(261,'COS',4,'Syntax:\nCOS(X)\n\nReturns the cosine of X, where X is given in radians.\n\nURL: https://mariadb.com/kb/en/cos/\n\n','MariaDB> SELECT COS(PI());\n -> -1\n','https://mariadb.com/kb/en/cos/'),(262,'DATE FUNCTION',31,'Syntax:\nDATE(expr)\n\nExtracts the date part of the date or datetime expression expr.\n\nURL: https://mariadb.com/kb/en/date-function/\n\n','MariaDB> SELECT DATE(\'2003-12-31 01:02:03\');\n -> \'2003-12-31\'\n','https://mariadb.com/kb/en/date-function/'),(263,'DROP TRIGGER',39,'Syntax:\nDROP TRIGGER [IF EXISTS] [schema_name.]trigger_name\n\nThis statement drops a trigger. The schema (database) name is optional.\nIf the schema is omitted, the trigger is dropped from the default\nschema. DROP TRIGGER requires the TRIGGER privilege for the table\nassociated with the trigger.\n\nUse IF EXISTS to prevent an error from occurring for a trigger that\ndoes not exist. A NOTE is generated for a nonexistent trigger when\nusing IF EXISTS. See [HELP SHOW WARNINGS].\n\nTriggers for a table are also dropped if you drop the table.\n\nURL: https://mariadb.com/kb/en/drop-trigger/\n\n','','https://mariadb.com/kb/en/drop-trigger/'),(264,'RESET MASTER',8,'Syntax:\nRESET MASTER\n\nDeletes all binary log files listed in the index file, resets the\nbinary log index file to be empty, and creates a new binary log file.\nThis statement is intended to be used only when the master is started\nfor the first time.\n\nURL: https://mariadb.com/kb/en/reset-master/\n\n','','https://mariadb.com/kb/en/reset-master/'),(265,'TAN',4,'Syntax:\nTAN(X)\n\nReturns the tangent of X, where X is given in radians.\n\nURL: https://mariadb.com/kb/en/tan/\n\n','MariaDB> SELECT TAN(PI());\n -> -1.2246063538224e-16\nMariaDB> SELECT TAN(PI()+1);\n -> 1.5574077246549\n','https://mariadb.com/kb/en/tan/'),(266,'PI',4,'Syntax:\nPI()\n\nReturns the value of π (pi). The default number of decimal places\ndisplayed is seven, but MySQL uses the full double-precision value\ninternally.\n\nURL: https://mariadb.com/kb/en/pi/\n\n','MariaDB> SELECT PI();\n -> 3.141593\nMariaDB> SELECT PI()+0.000000000000000000;\n -> 3.141592653589793116\n','https://mariadb.com/kb/en/pi/'),(267,'WEEKOFYEAR',31,'Syntax:\nWEEKOFYEAR(date)\n\nReturns the calendar week of the date as a number in the range from 1\nto 53. WEEKOFYEAR() is a compatibility function that is equivalent to\nWEEK(date,3).\n\nURL: https://mariadb.com/kb/en/weekofyear/\n\n','MariaDB> SELECT WEEKOFYEAR(\'2008-02-20\');\n -> 8\n','https://mariadb.com/kb/en/weekofyear/'),(268,'/',4,'Syntax:\n/\n\nDivision:\n\nURL: https://mariadb.com/kb/en/division-operator/\n\n','MariaDB> SELECT 3/5;\n -> 0.60\n','https://mariadb.com/kb/en/division-operator/'),(269,'PURGE BINARY LOGS',8,'Syntax:\nPURGE { BINARY | MASTER } LOGS\n { TO \'log_name\' | BEFORE datetime_expr }\n\nThe binary log is a set of files that contain information about data\nmodifications made by the MySQL server. The log consists of a set of\nbinary log files, plus an index file (see\nhttps://mariadb.com/kb/en/overview-of-the-binary-log/).\n\nThe PURGE BINARY LOGS statement deletes all the binary log files listed\nin the log index file prior to the specified log file name or date.\nBINARY and MASTER are synonyms. Deleted log files also are removed from\nthe list recorded in the index file, so that the given log file becomes\nthe first in the list.\n\nThis statement has no effect if the server was not started with the\n--log-bin option to enable binary logging.\n\nURL: https://mariadb.com/kb/en/sql-commands-purge-logs/\n\n','PURGE BINARY LOGS TO \'mysql-bin.010\';\nPURGE BINARY LOGS BEFORE \'2008-04-02 22:46:26\';\n','https://mariadb.com/kb/en/sql-commands-purge-logs/'),(270,'STDDEV_SAMP',16,'Syntax:\nSTDDEV_SAMP(expr)\n\nReturns the sample standard deviation of expr (the square root of\nVAR_SAMP().\n\nSTDDEV_SAMP() returns NULL if there were no matching rows.\n\nURL: https://mariadb.com/kb/en/stddev_samp/\n\n','','https://mariadb.com/kb/en/stddev_samp/'),(271,'SCHEMA',17,'Syntax:\nSCHEMA()\n\nThis function is a synonym for DATABASE().\n\nURL: https://mariadb.com/kb/en/schema/\n\n','','https://mariadb.com/kb/en/schema/'),(272,'MLINEFROMWKB',32,'MLineFromWKB(wkb[,srid]), MultiLineStringFromWKB(wkb[,srid])\n\nConstructs a MULTILINESTRING value using its WKB representation and\nSRID.\n\nURL: https://mariadb.com/kb/en/mlinefromwkb/\n\n','','https://mariadb.com/kb/en/mlinefromwkb/'),(273,'LOG2',4,'Syntax:\nLOG2(X)\n\nReturns the base-2 logarithm of X.\n\nURL: https://mariadb.com/kb/en/log2/\n\n','MariaDB> SELECT LOG2(65536);\n -> 16\nMariaDB> SELECT LOG2(-100);\n -> NULL\n','https://mariadb.com/kb/en/log2/'),(274,'SUBTIME',31,'Syntax:\nSUBTIME(expr1,expr2)\n\nSUBTIME() returns expr1 - expr2 expressed as a value in the same format\nas expr1. expr1 is a time or datetime expression, and expr2 is a time\nexpression.\n\nURL: https://mariadb.com/kb/en/subtime/\n\n','MariaDB> SELECT SUBTIME(\'2007-12-31 23:59:59.999999\',\'1 1:1:1.000002\');\n -> \'2007-12-30 22:58:58.999997\'\nMariaDB> SELECT SUBTIME(\'01:00:00.999999\', \'02:00:00.999998\');\n -> \'-00:59:59.999999\'\n','https://mariadb.com/kb/en/subtime/'),(275,'UNCOMPRESSED_LENGTH',12,'Syntax:\nUNCOMPRESSED_LENGTH(compressed_string)\n\nReturns the length that the compressed string had before being\ncompressed.\n\nURL: https://mariadb.com/kb/en/uncompressed_length/\n\n','MariaDB> SELECT UNCOMPRESSED_LENGTH(COMPRESS(REPEAT(\'a\',30)));\n -> 30\n','https://mariadb.com/kb/en/uncompressed_length/'),(276,'DROP TABLE',39,'Syntax:\nDROP [TEMPORARY] TABLE [IF EXISTS]\n tbl_name [, tbl_name] ...\n [RESTRICT | CASCADE]\n\nDROP TABLE removes one or more tables. You must have the DROP privilege\nfor each table. All table data and the table definition are removed, so\nbe careful with this statement! If any of the tables named in the\nargument list do not exist, MySQL returns an error indicating by name\nwhich nonexisting tables it was unable to drop, but it also drops all\nof the tables in the list that do exist.\n\n*Important*: When a table is dropped, user privileges on the table are\nnot automatically dropped. See [HELP GRANT].\n\nNote that for a partitioned table, DROP TABLE permanently removes the\ntable definition, all of its partitions, and all of the data which was\nstored in those partitions. It also removes the partitioning definition\n(.par) file associated with the dropped table.\n\nUse IF EXISTS to prevent an error from occurring for tables that do not\nexist. A NOTE is generated for each nonexistent table when using IF\nEXISTS. See [HELP SHOW WARNINGS].\n\nRESTRICT and CASCADE are permitted to make porting easier. In MySQL\n5.5, they do nothing.\n\n*Note*: DROP TABLE automatically commits the current active\ntransaction, unless you use the TEMPORARY keyword.\n\nURL: https://mariadb.com/kb/en/drop-table/\n\n','','https://mariadb.com/kb/en/drop-table/'),(277,'POW',4,'Syntax:\nPOW(X,Y)\n\nReturns the value of X raised to the power of Y.\n\nURL: https://mariadb.com/kb/en/pow/\n\n','MariaDB> SELECT POW(2,2);\n -> 4\nMariaDB> SELECT POW(2,-2);\n -> 0.25\n','https://mariadb.com/kb/en/pow/'),(278,'SHOW CREATE TABLE',26,'Syntax:\nSHOW CREATE TABLE tbl_name\n\nShows the CREATE TABLE statement that creates the given table. To use\nthis statement, you must have some privilege for the table. This\nstatement also works with views.\nSHOW CREATE TABLE quotes table and column names according to the value\nof the sql_quote_show_create option. See\nhttps://mariadb.com/kb/en/server-system-variables/.\n\nURL: https://mariadb.com/kb/en/show-create-table/\n\n','MariaDB> SHOW CREATE TABLE t\\G\n*************************** 1. row ***************************\n Table: t\nCreate Table: CREATE TABLE t (\n id INT(11) default NULL auto_increment,\n s char(60) default NULL,\n PRIMARY KEY (id)\n) ENGINE=MyISAM\n','https://mariadb.com/kb/en/show-create-table/'),(279,'DUAL',27,'You are permitted to specify DUAL as a dummy table name in situations\nwhere no tables are referenced:\n\nMariaDB> SELECT 1 + 1 FROM DUAL;\n -> 2\n\nDUAL is purely for the convenience of people who require that all\nSELECT statements should have FROM and possibly other clauses. MySQL\nmay ignore the clauses. MySQL does not require FROM DUAL if no tables\nare referenced.\n\nURL: https://mariadb.com/kb/en/dual/\n\n','','https://mariadb.com/kb/en/dual/'),(280,'INSTR',37,'Syntax:\nINSTR(str,substr)\n\nReturns the position of the first occurrence of substring substr in\nstring str. This is the same as the two-argument form of LOCATE(),\nexcept that the order of the arguments is reversed.\n\nURL: https://mariadb.com/kb/en/instr/\n\n','MariaDB> SELECT INSTR(\'foobarbar\', \'bar\');\n -> 4\nMariaDB> SELECT INSTR(\'xbar\', \'foobar\');\n -> 0\n','https://mariadb.com/kb/en/instr/'),(281,'NOW',31,'Syntax:\nNOW()\n\nReturns the current date and time as a value in \'YYYY-MM-DD HH:MM:SS\'\nor YYYYMMDDHHMMSS.uuuuuu format, depending on whether the function is\nused in a string or numeric context. The value is expressed in the\ncurrent time zone.\n\nURL: https://mariadb.com/kb/en/now/\n\n','MariaDB> SELECT NOW();\n -> \'2007-12-15 23:50:26\'\nMariaDB> SELECT NOW() + 0;\n -> 20071215235026.000000\n','https://mariadb.com/kb/en/now/'),(282,'SHOW ENGINES',26,'Syntax:\nSHOW [STORAGE] ENGINES\n\nSHOW ENGINES displays status information about the server\'s storage\nengines. This is particularly useful for checking whether a storage\nengine is supported, or to see what the default engine is.\n\nURL: https://mariadb.com/kb/en/show-engines/\n\n','','https://mariadb.com/kb/en/show-engines/'),(283,'>=',18,'Syntax:\n>=\n\nGreater than or equal:\n\nURL: https://mariadb.com/kb/en/greater-than-or-equal/\n\n','MariaDB> SELECT 2 >= 2;\n -> 1\n','https://mariadb.com/kb/en/greater-than-or-equal/'),(284,'EXP',4,'Syntax:\nEXP(X)\n\nReturns the value of e (the base of natural logarithms) raised to the\npower of X. The inverse of this function is LOG() (using a single\nargument only) or LN().\n\nURL: https://mariadb.com/kb/en/exp/\n\n','MariaDB> SELECT EXP(2);\n -> 7.3890560989307\nMariaDB> SELECT EXP(-2);\n -> 0.13533528323661\nMariaDB> SELECT EXP(0);\n -> 1\n','https://mariadb.com/kb/en/exp/'),(285,'LONGBLOB',22,'LONGBLOB\n\nA BLOB column with a maximum length of 4,294,967,295 or 4GB (232 - 1)\nbytes. The effective maximum length of LONGBLOB columns depends on the\nconfigured maximum packet size in the client/server protocol and\navailable memory. Each LONGBLOB value is stored using a 4-byte length\nprefix that indicates the number of bytes in the value.\n\nURL: https://mariadb.com/kb/en/longblob/\n\n','','https://mariadb.com/kb/en/longblob/'),(286,'POINTN',13,'PointN(ls,N)\n\nReturns the N-th Point in the Linestring value ls. Points are numbered\nbeginning with 1.\n\nURL: https://mariadb.com/kb/en/pointn/\n\n','MariaDB> SET @ls = \'LineString(1 1,2 2,3 3)\';\nMariaDB> SELECT AsText(PointN(GeomFromText(@ls),2));\n+-------------------------------------+\n| AsText(PointN(GeomFromText(@ls),2)) |\n+-------------------------------------+\n| POINT(2 2) |\n+-------------------------------------+\n','https://mariadb.com/kb/en/pointn/'),(287,'YEAR DATA TYPE',22,'YEAR[(2|4)]\n\nA year in two-digit or four-digit format. The default is four-digit\nformat. YEAR(2) or YEAR(4) differ in display format, but have the same\nrange of values. In four-digit format, values display as 1901 to 2155,\nand 0000. In two-digit format, values display as 70 to 69, representing\nyears from 1970 to 2069. MySQL displays YEAR values in YYYY or\nYYformat, but permits assignment of values to YEAR columns using either\nstrings or numbers.\n\n*Note*: The YEAR(2) data type has certain issues that you should\nconsider before choosing to use it. As of MySQL 5.5.27, YEAR(2) is\ndeprecated. For more information, see\nhttp://dev.mysql.com/doc/refman/5.5/en/migrating-to-year4.html.\n\nFor additional information about YEAR display format and inerpretation\nof input values, see https://mariadb.com/kb/en/year-data-type/.\n\nURL: https://mariadb.com/kb/en/year-data-type/\n\n','','https://mariadb.com/kb/en/year-data-type/'),(288,'SUM',16,'Syntax:\nSUM([DISTINCT] expr)\n\nReturns the sum of expr. If the return set has no rows, SUM() returns\nNULL. The DISTINCT keyword can be used to sum only the distinct values\nof expr.\n\nSUM() returns NULL if there were no matching rows.\n\nURL: https://mariadb.com/kb/en/sum/\n\n','','https://mariadb.com/kb/en/sum/'),(289,'OCT',37,'Syntax:\nOCT(N)\n\nReturns a string representation of the octal value of N, where N is a\nlonglong (BIGINT) number. This is equivalent to CONV(N,10,8). Returns\nNULL if N is NULL.\n\nURL: https://mariadb.com/kb/en/oct/\n\n','MariaDB> SELECT OCT(12);\n -> \'14\'\n','https://mariadb.com/kb/en/oct/'),(290,'SYSDATE',31,'Syntax:\nSYSDATE()\n\nReturns the current date and time as a value in \'YYYY-MM-DD HH:MM:SS\'\nor YYYYMMDDHHMMSS.uuuuuu format, depending on whether the function is\nused in a string or numeric context.\n\nSYSDATE() returns the time at which it executes. This differs from the\nbehavior for NOW(), which returns a constant time that indicates the\ntime at which the statement began to execute. (Within a stored function\nor trigger, NOW() returns the time at which the function or triggering\nstatement began to execute.)\n\nMariaDB> SELECT NOW(), SLEEP(2), NOW();\n+---------------------+----------+---------------------+\n| NOW() | SLEEP(2) | NOW() |\n+---------------------+----------+---------------------+\n| 2006-04-12 13:47:36 | 0 | 2006-04-12 13:47:36 |\n+---------------------+----------+---------------------+\n\nMariaDB> SELECT SYSDATE(), SLEEP(2), SYSDATE();\n+---------------------+----------+---------------------+\n| SYSDATE() | SLEEP(2) | SYSDATE() |\n+---------------------+----------+---------------------+\n| 2006-04-12 13:47:44 | 0 | 2006-04-12 13:47:46 |\n+---------------------+----------+---------------------+\n\nIn addition, the SET TIMESTAMP statement affects the value returned by\nNOW() but not by SYSDATE(). This means that timestamp settings in the\nbinary log have no effect on invocations of SYSDATE().\n\nBecause SYSDATE() can return different values even within the same\nstatement, and is not affected by SET TIMESTAMP, it is nondeterministic\nand therefore unsafe for replication if statement-based binary logging\nis used. If that is a problem, you can use row-based logging.\n\nAlternatively, you can use the --sysdate-is-now option to cause\nSYSDATE() to be an alias for NOW(). This works if the option is used on\nboth the master and the slave.\n\nThe nondeterministic nature of SYSDATE() also means that indexes cannot\nbe used for evaluating expressions that refer to it.\n\nURL: https://mariadb.com/kb/en/sysdate/\n\n','','https://mariadb.com/kb/en/sysdate/'),(291,'UNINSTALL PLUGIN',5,'Syntax:\nUNINSTALL PLUGIN plugin_name\n\nThis statement removes an installed server plugin. It requires the\nDELETE privilege for the mysql.plugin table.\n\nplugin_name must be the name of some plugin that is listed in the\nmysql.plugin table. The server executes the plugin\'s deinitialization\nfunction and removes the row for the plugin from the mysql.plugin\ntable, so that subsequent server restarts will not load and initialize\nthe plugin. UNINSTALL PLUGIN does not remove the plugin\'s shared\nlibrary file.\n\nURL: https://mariadb.com/kb/en/uninstall-plugin/\n\n','','https://mariadb.com/kb/en/uninstall-plugin/'),(292,'ASBINARY',32,'AsBinary(g), AsWKB(g)\n\nConverts a value in internal geometry format to its WKB representation\nand returns the binary result.\n\nURL: https://mariadb.com/kb/en/asbinary/\n\n','SELECT AsBinary(g) FROM geom;\n','https://mariadb.com/kb/en/asbinary/'),(293,'REPEAT FUNCTION',37,'Syntax:\nREPEAT(str,count)\n\nReturns a string consisting of the string str repeated count times. If\ncount is less than 1, returns an empty string. Returns NULL if str or\ncount are NULL.\n\nURL: https://mariadb.com/kb/en/repeat-function/\n\n','MariaDB> SELECT REPEAT(\'MySQL\', 3);\n -> \'MySQLMySQLMySQL\'\n','https://mariadb.com/kb/en/repeat-function/'),(294,'SHOW TABLES',26,'Syntax:\nSHOW [FULL] TABLES [{FROM | IN} db_name]\n [LIKE \'pattern\' | WHERE expr]\n\nSHOW TABLES lists the non-TEMPORARY tables in a given database. You can\nalso get this list using the mysqlshow db_name command. The LIKE\nclause, if present, indicates which table names to match. The WHERE\nclause can be given to select rows using more general conditions, as\ndiscussed in https://mariadb.com/kb/en/extended-show/.\n\nThis statement also lists any views in the database. The FULL modifier\nis supported such that SHOW FULL TABLES displays a second output\ncolumn. Values for the second column are BASE TABLE for a table and\nVIEW for a view.\n\nIf you have no privileges for a base table or view, it does not show up\nin the output from SHOW TABLES or mysqlshow db_name.\n\nURL: https://mariadb.com/kb/en/show-tables/\n\n','','https://mariadb.com/kb/en/show-tables/'),(295,'MAKEDATE',31,'Syntax:\nMAKEDATE(year,dayofyear)\n\nReturns a date, given year and day-of-year values. dayofyear must be\ngreater than 0 or the result is NULL.\n\nURL: https://mariadb.com/kb/en/makedate/\n\n','MariaDB> SELECT MAKEDATE(2011,31), MAKEDATE(2011,32);\n -> \'2011-01-31\', \'2011-02-01\'\nMariaDB> SELECT MAKEDATE(2011,365), MAKEDATE(2014,365);\n -> \'2011-12-31\', \'2014-12-31\'\nMariaDB> SELECT MAKEDATE(2011,0);\n -> NULL\n','https://mariadb.com/kb/en/makedate/'),(296,'BINARY OPERATOR',37,'Syntax:\nBINARY\n\nThe BINARY operator casts the string following it to a binary string.\nThis is an easy way to force a column comparison to be done byte by\nbyte rather than character by character. This causes the comparison to\nbe case sensitive even if the column is not defined as BINARY or BLOB.\nBINARY also causes trailing spaces to be significant.\n\nURL: https://mariadb.com/kb/en/binary-operator/\n\n','MariaDB> SELECT \'a\' = \'A\';\n -> 1\nMariaDB> SELECT BINARY \'a\' = \'A\';\n -> 0\nMariaDB> SELECT \'a\' = \'a \';\n -> 1\nMariaDB> SELECT BINARY \'a\' = \'a \';\n -> 0\n','https://mariadb.com/kb/en/binary-operator/'),(297,'MBROVERLAPS',6,'MBROverlaps(g1,g2)\n\nReturns 1 or 0 to indicate whether the Minimum Bounding Rectangles of\nthe two geometries g1 and g2 overlap. The term spatially overlaps is\nused if two geometries intersect and their intersection results in a\ngeometry of the same dimension but not equal to either of the given\ngeometries.\n\nURL: https://mariadb.com/kb/en/mbroverlaps/\n\n','','https://mariadb.com/kb/en/mbroverlaps/'),(298,'SOUNDEX',37,'Syntax:\nSOUNDEX(str)\n\nReturns a soundex string from str. Two strings that sound almost the\nsame should have identical soundex strings. A standard soundex string\nis four characters long, but the SOUNDEX() function returns an\narbitrarily long string. You can use SUBSTRING() on the result to get a\nstandard soundex string. All nonalphabetic characters in str are\nignored. All international alphabetic characters outside the A-Z range\nare treated as vowels.\n\n*Important*: When using SOUNDEX(), you should be aware of the following\nlimitations:\n\no This function, as currently implemented, is intended to work well\n with strings that are in the English language only. Strings in other\n languages may not produce reliable results.\n\no This function is not guaranteed to provide consistent results with\n strings that use multi-byte character sets, including utf-8.\n\n We hope to remove these limitations in a future release. See Bug\n #22638 for more information.\n\nURL: https://mariadb.com/kb/en/soundex/\n\n','MariaDB> SELECT SOUNDEX(\'Hello\');\n -> \'H400\'\nMariaDB> SELECT SOUNDEX(\'Quadratically\');\n -> \'Q36324\'\n','https://mariadb.com/kb/en/soundex/'),(299,'MBRTOUCHES',6,'MBRTouches(g1,g2)\n\nReturns 1 or 0 to indicate whether the Minimum Bounding Rectangles of\nthe two geometries g1 and g2 touch. Two geometries spatially touch if\nthe interiors of the geometries do not intersect, but the boundary of\none of the geometries intersects either the boundary or the interior of\nthe other.\n\nURL: https://mariadb.com/kb/en/mbrtouches/\n\n','','https://mariadb.com/kb/en/mbrtouches/'),(300,'DROP EVENT',39,'Syntax:\nDROP EVENT [IF EXISTS] event_name\n\nThis statement drops the event named event_name. The event immediately\nceases being active, and is deleted completely from the server.\n\nIf the event does not exist, the error ERROR 1517 (HY000): Unknown\nevent \'event_name\' results. You can override this and cause the\nstatement to generate a warning for nonexistent events instead using IF\nEXISTS.\n\nThis statement requires the EVENT privilege for the schema to which the\nevent to be dropped belongs.\n\nURL: https://mariadb.com/kb/en/drop-event/\n\n','','https://mariadb.com/kb/en/drop-event/'),(301,'INSERT SELECT',27,'Syntax:\nINSERT [LOW_PRIORITY | HIGH_PRIORITY] [IGNORE]\n [INTO] tbl_name [(col_name,...)]\n SELECT ...\n [ ON DUPLICATE KEY UPDATE col_name=expr, ... ]\n\nWith INSERT ... SELECT, you can quickly insert many rows into a table\nfrom one or many tables. For example:\n\nINSERT INTO tbl_temp2 (fld_id)\n SELECT tbl_temp1.fld_order_id\n FROM tbl_temp1 WHERE tbl_temp1.fld_order_id > 100;\n\nURL: https://mariadb.com/kb/en/insert-select/\n\n','','https://mariadb.com/kb/en/insert-select/'),(302,'CREATE PROCEDURE',39,'Syntax:\nCREATE\n [DEFINER = { user | CURRENT_USER }]\n PROCEDURE sp_name ([proc_parameter[,...]])\n [characteristic ...] routine_body\n\nCREATE\n [DEFINER = { user | CURRENT_USER }]\n FUNCTION sp_name ([func_parameter[,...]])\n RETURNS type\n [characteristic ...] routine_body\n\nproc_parameter:\n [ IN | OUT | INOUT ] param_name type\n\nfunc_parameter:\n param_name type\n\ntype:\n Any valid MySQL data type\n\ncharacteristic:\n COMMENT \'string\'\n | LANGUAGE SQL\n | [NOT] DETERMINISTIC\n | { CONTAINS SQL | NO SQL | READS SQL DATA | MODIFIES SQL DATA }\n | SQL SECURITY { DEFINER | INVOKER }\n\nroutine_body:\n Valid SQL routine statement\n\nThese statements create stored routines. By default, a routine is\nassociated with the default database. To associate the routine\nexplicitly with a given database, specify the name as db_name.sp_name\nwhen you create it.\n\nThe CREATE FUNCTION statement is also used in MySQL to support UDFs\n(user-defined functions). See\nhttps://mariadb.com/kb/en/create-function-udf/. A UDF can\nbe regarded as an external stored function. Stored functions share\ntheir namespace with UDFs. See\nhttp://dev.mysql.com/doc/refman/5.5/en/function-resolution.html, for\nthe rules describing how the server interprets references to different\nkinds of functions.\n\nTo invoke a stored procedure, use the CALL statement (see [HELP CALL]).\nTo invoke a stored function, refer to it in an expression. The function\nreturns a value during expression evaluation.\n\nCREATE PROCEDURE and CREATE FUNCTION require the CREATE ROUTINE\nprivilege. They might also require the SUPER privilege, depending on\nthe DEFINER value, as described later in this section. If binary\nlogging is enabled, CREATE FUNCTION might require the SUPER privilege,\nas described in\nhttps://mariadb.com/kb/en/binary-logging-of-stored-routines/.\n\nBy default, MySQL automatically grants the ALTER ROUTINE and EXECUTE\nprivileges to the routine creator. This behavior can be changed by\ndisabling the automatic_sp_privileges system variable. See\nhttps://mariadb.com/kb/en/stored-routine-privileges/.\n\nThe DEFINER and SQL SECURITY clauses specify the security context to be\nused when checking access privileges at routine execution time, as\ndescribed later in this section.\n\nIf the routine name is the same as the name of a built-in SQL function,\na syntax error occurs unless you use a space between the name and the\nfollowing parenthesis when defining the routine or invoking it later.\nFor this reason, avoid using the names of existing SQL functions for\nyour own stored routines.\n\nThe IGNORE_SPACE SQL mode applies to built-in functions, not to stored\nroutines. It is always permissible to have spaces after a stored\nroutine name, regardless of whether IGNORE_SPACE is enabled.\n\nThe parameter list enclosed within parentheses must always be present.\nIf there are no parameters, an empty parameter list of () should be\nused. Parameter names are not case sensitive.\n\nEach parameter is an IN parameter by default. To specify otherwise for\na parameter, use the keyword OUT or INOUT before the parameter name.\n\n*Note*: Specifying a parameter as IN, OUT, or INOUT is valid only for a\nPROCEDURE. For a FUNCTION, parameters are always regarded as IN\nparameters.\n\nAn IN parameter passes a value into a procedure. The procedure might\nmodify the value, but the modification is not visible to the caller\nwhen the procedure returns. An OUT parameter passes a value from the\nprocedure back to the caller. Its initial value is NULL within the\nprocedure, and its value is visible to the caller when the procedure\nreturns. An INOUT parameter is initialized by the caller, can be\nmodified by the procedure, and any change made by the procedure is\nvisible to the caller when the procedure returns.\n\nFor each OUT or INOUT parameter, pass a user-defined variable in the\nCALL statement that invokes the procedure so that you can obtain its\nvalue when the procedure returns. If you are calling the procedure from\nwithin another stored procedure or function, you can also pass a\nroutine parameter or local routine variable as an IN or INOUT\nparameter.\n\nThe following example shows a simple stored procedure that uses an OUT\nparameter:\n\nMariaDB> delimiter //\n\nMariaDB> CREATE PROCEDURE simpleproc (OUT param1 INT)\n -> BEGIN\n -> SELECT COUNT(*) INTO param1 FROM t;\n -> END//\nQuery OK, 0 rows affected (0.00 sec)\n\nMariaDB> delimiter ;\n\nMariaDB> CALL simpleproc(@a);\nQuery OK, 0 rows affected (0.00 sec)\n\nMariaDB> SELECT @a;\n+------+\n| @a |\n+------+\n| 3 |\n+------+\n1 row in set (0.00 sec)\n\nThe example uses the mysql client delimiter command to change the\nstatement delimiter from ; to // while the procedure is being defined.\nThis enables the ; delimiter used in the procedure body to be passed\nthrough to the server rather than being interpreted by mysql itself.\nSee\nhttps://mariadb.com/kb/en/stored-procedure-overview/.\n\nThe RETURNS clause may be specified only for a FUNCTION, for which it\nis mandatory. It indicates the return type of the function, and the\nfunction body must contain a RETURN value statement. If the RETURN\nstatement returns a value of a different type, the value is coerced to\nthe proper type. For example, if a function specifies an ENUM or SET\nvalue in the RETURNS clause, but the RETURN statement returns an\ninteger, the value returned from the function is the string for the\ncorresponding ENUM member of set of SET members.\n\nThe following example function takes a parameter, performs an operation\nusing an SQL function, and returns the result. In this case, it is\nunnecessary to use delimiter because the function definition contains\nno internal ; statement delimiters:\n\nMariaDB> CREATE FUNCTION hello (s CHAR(20))\nMariaDB> RETURNS CHAR(50) DETERMINISTIC\n -> RETURN CONCAT(\'Hello, \',s,\'!\');\nQuery OK, 0 rows affected (0.00 sec)\n\nMariaDB> SELECT hello(\'world\');\n+----------------+\n| hello(\'world\') |\n+----------------+\n| Hello, world! |\n+----------------+\n1 row in set (0.00 sec)\n\nParameter types and function return types can be declared to use any\nvalid data type, except that the COLLATE attribute cannot be used prior\nto MySQL 5.5.3. As of 5.5.3, COLLATE can be used if preceded by the\nCHARACTER SET attribute.\n\nThe routine_body consists of a valid SQL routine statement. This can be\na simple statement such as SELECT or INSERT, or a compound statement\nwritten using BEGIN and END. Compound statements can contain\ndeclarations, loops, and other control structure statements. The syntax\nfor these statements is described in\nhttps://mariadb.com/kb/programmatic-and-compound-statements.\n\nMySQL permits routines to contain DDL statements, such as CREATE and\nDROP. MySQL also permits stored procedures (but not stored functions)\nto contain SQL transaction statements such as COMMIT. Stored functions\nmay not contain statements that perform explicit or implicit commit or\nrollback. Support for these statements is not required by the SQL\nstandard, which states that each DBMS vendor may decide whether to\npermit them.\n\nStatements that return a result set can be used within a stored\nprocedure but not within a stored function. This prohibition includes\nSELECT statements that do not have an INTO var_list clause and other\nstatements such as SHOW, EXPLAIN, and CHECK TABLE. For statements that\ncan be determined at function definition time to return a result set, a\nNot allowed to return a result set from a function error occurs\n(ER_SP_NO_RETSET). For statements that can be determined only at\nruntime to return a result set, a PROCEDURE %s can\'t return a result\nset in the given context error occurs (ER_SP_BADSELECT).\n\nUSE statements within stored routines are not permitted. When a routine\nis invoked, an implicit USE db_name is performed (and undone when the\nroutine terminates). The causes the routine to have the given default\ndatabase while it executes. References to objects in databases other\nthan the routine default database should be qualified with the\nappropriate database name.\n\nFor additional information about statements that are not permitted in\nstored routines, see\nhttps://mariadb.com/kb/en/stored-routine-privileges/\n.\n\nFor information about invoking stored procedures from within programs\nwritten in a language that has a MySQL interface, see [HELP CALL].\n\nMySQL stores the sql_mode system variable setting that is in effect at\nthe time a routine is created, and always executes the routine with\nthis setting in force, regardless of the server SQL mode in effect when\nthe routine is invoked.\n\nThe switch from the SQL mode of the invoker to that of the routine\noccurs after evaluation of arguments and assignment of the resulting\nvalues to routine parameters. If you define a routine in strict SQL\nmode but invoke it in nonstrict mode, assignment of arguments to\nroutine parameters does not take place in strict mode. If you require\nthat expressions passed to a routine be assigned in strict SQL mode,\nyou should invoke the routine with strict mode in effect.\n\nURL: https://mariadb.com/kb/en/create-procedure/\n\n','','https://mariadb.com/kb/en/create-procedure/'),(303,'VARBINARY',22,'VARBINARY(M)\n\nThe VARBINARY type is similar to the VARCHAR type, but stores binary\nbyte strings rather than nonbinary character strings. M represents the\nmaximum column length in bytes.\n\nURL: https://mariadb.com/kb/en/varbinary/\n\n','','https://mariadb.com/kb/en/varbinary/'),(304,'LOAD INDEX',26,'Syntax:\nLOAD INDEX INTO CACHE\n tbl_index_list [, tbl_index_list] ...\n\ntbl_index_list:\n tbl_name\n [PARTITION (partition_list | ALL)]\n [[INDEX|KEY] (index_name[, index_name] ...)]\n [IGNORE LEAVES]\n\npartition_list:\n partition_name[, partition_name][, ...]\n\nThe LOAD INDEX INTO CACHE statement preloads a table index into the key\ncache to which it has been assigned by an explicit CACHE INDEX\nstatement, or into the default key cache otherwise.\n\nLOAD INDEX INTO CACHE is used only for MyISAM tables. In MySQL 5.5, it\nis also supported for partitioned MyISAM tables; in addition, indexes\non partitioned tables can be preloaded for one, several, or all\npartitions.\n\nThe IGNORE LEAVES modifier causes only blocks for the nonleaf nodes of\nthe index to be preloaded.\n\nIGNORE LEAVES is also supported for partitioned MyISAM tables.\n\nURL: https://mariadb.com/kb/en/load-index/\n\n','','https://mariadb.com/kb/en/load-index/'),(305,'UNION',27,'Syntax:\nSELECT ...\nUNION [ALL | DISTINCT] SELECT ...\n[UNION [ALL | DISTINCT] SELECT ...]\n\nUNION is used to combine the result from multiple SELECT statements\ninto a single result set.\n\nThe column names from the first SELECT statement are used as the column\nnames for the results returned. Selected columns listed in\ncorresponding positions of each SELECT statement should have the same\ndata type. (For example, the first column selected by the first\nstatement should have the same type as the first column selected by the\nother statements.)\n\nURL: https://mariadb.com/kb/en/union/\n\n','','https://mariadb.com/kb/en/union/'),(306,'TO_DAYS',31,'Syntax:\nTO_DAYS(date)\n\nGiven a date date, returns a day number (the number of days since year\n0).\n\nURL: https://mariadb.com/kb/en/to_days/\n\n','MariaDB> SELECT TO_DAYS(950501);\n -> 728779\nMariaDB> SELECT TO_DAYS(\'2007-10-07\');\n -> 733321\n','https://mariadb.com/kb/en/to_days/'),(307,'NOT REGEXP',37,'Syntax:\nexpr NOT REGEXP pat, expr NOT RLIKE pat\n\nThis is the same as NOT (expr REGEXP pat).\n\nURL: https://mariadb.com/kb/en/not-regexp/\n\n','','https://mariadb.com/kb/en/not-regexp/'),(308,'SHOW INDEX',26,'Syntax:\nSHOW {INDEX | INDEXES | KEYS}\n {FROM | IN} tbl_name\n [{FROM | IN} db_name]\n [WHERE expr]\n\nSHOW INDEX returns table index information. The format resembles that\nof the SQLStatistics call in ODBC. This statement requires some\nprivilege for any column in the table.\nYou can use db_name.tbl_name as an alternative to the tbl_name FROM\ndb_name syntax. These two statements are equivalent:\n\nSHOW INDEX FROM mytable FROM mydb;\nSHOW INDEX FROM mydb.mytable;\n\nThe WHERE clause can be given to select rows using more general\nconditions, as discussed in\nhttps://mariadb.com/kb/en/extended-show/.\n\nYou can also list a table\'s indexes with the mysqlshow -k db_name\ntbl_name command.\n\nURL: https://mariadb.com/kb/en/show-index/\n\n','','https://mariadb.com/kb/en/show-index/'),(309,'SHOW CREATE DATABASE',26,'Syntax:\nSHOW CREATE {DATABASE | SCHEMA} [IF NOT EXISTS] db_name\n\nShows the CREATE DATABASE statement that creates the given database. If\nthe SHOW statement includes an IF NOT EXISTS clause, the output too\nincludes such a clause. SHOW CREATE SCHEMA is a synonym for SHOW CREATE\nDATABASE.\n\nURL: https://mariadb.com/kb/en/show-create-database/\n\n','MariaDB> SHOW CREATE DATABASE test\\G\n*************************** 1. row ***************************\n Database: test\nCreate Database: CREATE DATABASE `test`\n /*!40100 DEFAULT CHARACTER SET latin1 */\n\nMariaDB> SHOW CREATE SCHEMA test\\G\n*************************** 1. row ***************************\n Database: test\nCreate Database: CREATE DATABASE `test`\n /*!40100 DEFAULT CHARACTER SET latin1 */\n','https://mariadb.com/kb/en/show-create-database/'),(310,'LEAVE',23,'Syntax:\nLEAVE label\n\nThis statement is used to exit the flow control construct that has the\ngiven label. If the label is for the outermost stored program block,\nLEAVE exits the program.\n\nLEAVE can be used within BEGIN ... END or loop constructs (LOOP,\nREPEAT, WHILE).\n\nURL: https://mariadb.com/kb/en/leave/\n\n','','https://mariadb.com/kb/en/leave/'),(311,'NOT IN',18,'Syntax:\nexpr NOT IN (value,...)\n\nThis is the same as NOT (expr IN (value,...)).\n\nURL: https://mariadb.com/kb/en/not-in/\n\n','','https://mariadb.com/kb/en/not-in/'),(312,'!',15,'Syntax:\nNOT, !\n\nLogical NOT. Evaluates to 1 if the operand is 0, to 0 if the operand is\nnonzero, and NOT NULL returns NULL.\n\nURL: https://mariadb.com/kb/en/not/\n\n','MariaDB> SELECT NOT 10;\n -> 0\nMariaDB> SELECT NOT 0;\n -> 1\nMariaDB> SELECT NOT NULL;\n -> NULL\nMariaDB> SELECT ! (1+1);\n -> 0\nMariaDB> SELECT ! 1+1;\n -> 1\n','https://mariadb.com/kb/en/not/'),(313,'DECLARE HANDLER',23,'Syntax:\nDECLARE handler_action HANDLER\n FOR condition_value [, condition_value] ...\n statement\n\nhandler_action:\n CONTINUE\n | EXIT\n | UNDO\n\ncondition_value:\n mysql_error_code\n | SQLSTATE [VALUE] sqlstate_value\n | condition_name\n | SQLWARNING\n | NOT FOUND\n | SQLEXCEPTION\n\nThe DECLARE ... HANDLER statement specifies a handler that deals with\none or more conditions. If one of these conditions occurs, the\nspecified statement executes. statement can be a simple statement such\nas SET var_name = value, or a compound statement written using BEGIN\nand END (see [HELP BEGIN END]).\n\nHandler declarations must appear after variable or condition\ndeclarations.\n\nThe handler_action value indicates what action the handler takes after\nexecution of the handler statement:\n\no CONTINUE: Execution of the current program continues.\n\no EXIT: Execution terminates for the BEGIN ... END compound statement\n in which the handler is declared. This is true even if the condition\n occurs in an inner block.\n\no UNDO: Not supported.\n\nThe condition_value for DECLARE ... HANDLER indicates the specific\ncondition or class of conditions that activates the handler:\n\no A MySQL error code (a number) or an SQLSTATE value (a 5-character\n string literal). You should not use MySQL error code 0 or SQLSTATE\n values that begin with \'00\', because those indicate success rather\n than an error condition. For a list of MySQL error codes and SQLSTATE\n values, see\n https://mariadb.com/kb/en/mariadb-error-codes/.\n\no A condition name previously specified with DECLARE ... CONDITION. A\n condition name can be associated with a MySQL error code or SQLSTATE\n value. See [HELP DECLARE CONDITION].\n\no SQLWARNING is shorthand for the class of SQLSTATE values that begin\n with \'01\'.\n\no NOT FOUND is shorthand for the class of SQLSTATE values that begin\n with \'02\'. This is relevant within the context of cursors and is used\n to control what happens when a cursor reaches the end of a data set.\n If no more rows are available, a No Data condition occurs with\n SQLSTATE value \'02000\'. To detect this condition, you can set up a\n handler for it (or for a NOT FOUND condition). For an example, see\n https://mariadb.com/kb/en/cursor-overview/. This condition\n also occurs for SELECT ... INTO var_list statements that retrieve no\n rows.\n\no SQLEXCEPTION is shorthand for the class of SQLSTATE values that do\n not begin with \'00\', \'01\', or \'02\'.\n\nIf a condition occurs for which no handler has been declared, the\naction taken depends on the condition class:\n\no For SQLEXCEPTION conditions, the stored program terminates at the\n statement that raised the condition, as if there were an EXIT\n handler. If the program was called by another stored program, the\n calling program handles the condition using the handler selection\n rules applied to its own handlers.\n\no For SQLWARNING conditions, the program continues executing, as if\n there were a CONTINUE handler.\n\no For NOT FOUND conditions, if the condition was raised normally, the\n action is CONTINUE. If it was raised by SIGNAL or RESIGNAL, the\n action is EXIT.\n\nURL: https://mariadb.com/kb/en/declare-handler/\n\n','MariaDB> CREATE TABLE test.t (s1 INT, PRIMARY KEY (s1));\nQuery OK, 0 rows affected (0.00 sec)\n\nMariaDB> delimiter //\n\nMariaDB> CREATE PROCEDURE handlerdemo ()\n -> BEGIN\n -> DECLARE CONTINUE HANDLER FOR SQLSTATE \'23000\' SET @x2 = 1;\n -> SET @x = 1;\n -> INSERT INTO test.t VALUES (1);\n -> SET @x = 2;\n -> INSERT INTO test.t VALUES (1);\n -> SET @x = 3;\n -> END;\n -> //\nQuery OK, 0 rows affected (0.00 sec)\n\nMariaDB> CALL handlerdemo()//\nQuery OK, 0 rows affected (0.00 sec)\n\nMariaDB> SELECT @x//\n +------+\n | @x |\n +------+\n | 3 |\n +------+\n 1 row in set (0.00 sec)\n','https://mariadb.com/kb/en/declare-handler/'),(314,'DOUBLE',22,'DOUBLE[(M,D)] [UNSIGNED] [ZEROFILL]\n\nA normal-size (double-precision) floating-point number. Permissible\nvalues are -1.7976931348623157E+308 to -2.2250738585072014E-308, 0, and\n2.2250738585072014E-308 to 1.7976931348623157E+308. These are the\ntheoretical limits, based on the IEEE standard. The actual range might\nbe slightly smaller depending on your hardware or operating system.\n\nM is the total number of digits and D is the number of digits following\nthe decimal point. If M and D are omitted, values are stored to the\nlimits permitted by the hardware. A double-precision floating-point\nnumber is accurate to approximately 15 decimal places.\n\nUNSIGNED, if specified, disallows negative values.\n\nURL: https://mariadb.com/kb/en/double/\n\n','','https://mariadb.com/kb/en/double/'),(315,'TIME',22,'TIME\n\nA time. The range is \'-838:59:59\' to \'838:59:59\'. MySQL displays TIME\nvalues in \'HH:MM:SS\' format, but permits assignment of values to TIME\ncolumns using either strings or numbers.\n\nURL: https://mariadb.com/kb/en/time/\n\n','','https://mariadb.com/kb/en/time/'),(316,'&&',15,'Syntax:\nAND, &&\n\nLogical AND. Evaluates to 1 if all operands are nonzero and not NULL,\nto 0 if one or more operands are 0, otherwise NULL is returned.\n\nURL: https://mariadb.com/kb/en/and/\n\n','MariaDB> SELECT 1 && 1;\n -> 1\nMariaDB> SELECT 1 && 0;\n -> 0\nMariaDB> SELECT 1 && NULL;\n -> NULL\nMariaDB> SELECT 0 && NULL;\n -> 0\nMariaDB> SELECT NULL && 0;\n -> 0\n','https://mariadb.com/kb/en/and/'),(317,'X',11,'X(p)\n\nReturns the X-coordinate value for the Point object p as a\ndouble-precision number.\n\nURL: https://mariadb.com/kb/en/x/\n\n','MariaDB> SELECT X(POINT(56.7, 53.34));\n+-----------------------+\n| X(POINT(56.7, 53.34)) |\n+-----------------------+\n| 56.7 |\n+-----------------------+\n','https://mariadb.com/kb/en/x/'),(318,'SYSTEM_USER',17,'Syntax:\nSYSTEM_USER()\n\nSYSTEM_USER() is a synonym for USER().\n\nURL: https://mariadb.com/kb/en/system_user/\n\n','','https://mariadb.com/kb/en/system_user/'),(319,'FOUND_ROWS',17,'Syntax:\nFOUND_ROWS()\n\nA SELECT statement may include a LIMIT clause to restrict the number of\nrows the server returns to the client. In some cases, it is desirable\nto know how many rows the statement would have returned without the\nLIMIT, but without running the statement again. To obtain this row\ncount, include a SQL_CALC_FOUND_ROWS option in the SELECT statement,\nand then invoke FOUND_ROWS() afterward:\n\nURL: https://mariadb.com/kb/en/found_rows/\n\n','MariaDB> SELECT SQL_CALC_FOUND_ROWS * FROM tbl_name\n -> WHERE id > 100 LIMIT 10;\nMariaDB> SELECT FOUND_ROWS();\n','https://mariadb.com/kb/en/found_rows/'),(320,'CROSSES',30,'Crosses(g1,g2)\n\nReturns 1 if g1 spatially crosses g2. Returns NULL if g1 is a Polygon\nor a MultiPolygon, or if g2 is a Point or a MultiPoint. Otherwise,\nreturns 0.\n\nThe term spatially crosses denotes a spatial relation between two given\ngeometries that has the following properties:\n\no The two geometries intersect\n\no Their intersection results in a geometry that has a dimension that is\n one less than the maximum dimension of the two given geometries\n\no Their intersection is not equal to either of the two given geometries\n\nURL: https://mariadb.com/kb/en/crosses/\n\n','','https://mariadb.com/kb/en/crosses/'),(321,'TRUNCATE TABLE',39,'Syntax:\nTRUNCATE [TABLE] tbl_name\n\nTRUNCATE TABLE empties a table completely. It requires the DROP\nprivilege.\n\nLogically, TRUNCATE TABLE is similar to a DELETE statement that deletes\nall rows, or a sequence of DROP TABLE and CREATE TABLE statements. To\nachieve high performance, it bypasses the DML method of deleting data.\nThus, it cannot be rolled back, it does not cause ON DELETE triggers to\nfire, and it cannot be performed for InnoDB tables with parent-child\nforeign key relationships.\n\nAlthough TRUNCATE TABLE is similar to DELETE, it is classified as a DDL\nstatement rather than a DML statement. It differs from DELETE in the\nfollowing ways in MySQL 5.5:\n\no Truncate operations drop and re-create the table, which is much\n faster than deleting rows one by one, particularly for large tables.\n\no Truncate operations cause an implicit commit, and so cannot be rolled\n back.\n\no Truncation operations cannot be performed if the session holds an\n active table lock.\n\no TRUNCATE TABLE fails for an InnoDB table if there are any FOREIGN KEY\n constraints from other tables that reference the table. Foreign key\n constraints between columns of the same table are permitted.\n\no Truncation operations do not return a meaningful value for the number\n of deleted rows. The usual result is \"0 rows affected,\" which should\n be interpreted as \"no information.\"\n\no As long as the table format file tbl_name.frm is valid, the table can\n be re-created as an empty table with TRUNCATE TABLE, even if the data\n or index files have become corrupted.\n\no Any AUTO_INCREMENT value is reset to its start value. This is true\n even for MyISAM and InnoDB, which normally do not reuse sequence\n values.\n\no When used with partitioned tables, TRUNCATE TABLE preserves the\n partitioning; that is, the data and index files are dropped and\n re-created, while the partition definitions (.par) file is\n unaffected.\n\no The TRUNCATE TABLE statement does not invoke ON DELETE triggers.\n\nURL: https://mariadb.com/kb/en/truncate-table/\n\n','','https://mariadb.com/kb/en/truncate-table/'),(322,'BIT_XOR',16,'Syntax:\nBIT_XOR(expr)\n\nReturns the bitwise XOR of all bits in expr. The calculation is\nperformed with 64-bit (BIGINT) precision.\n\nURL: https://mariadb.com/kb/en/bit_xor/\n\n','','https://mariadb.com/kb/en/bit_xor/'),(323,'CURRENT_DATE',31,'Syntax:\nCURRENT_DATE, CURRENT_DATE()\n\nCURRENT_DATE and CURRENT_DATE() are synonyms for CURDATE().\n\nURL: https://mariadb.com/kb/en/current_date/\n\n','','https://mariadb.com/kb/en/current_date/'),(324,'START SLAVE',8,'Syntax:\nSTART SLAVE [thread_types]\n\nSTART SLAVE [SQL_THREAD] UNTIL\n MASTER_LOG_FILE = \'log_name\', MASTER_LOG_POS = log_pos\n\nSTART SLAVE [SQL_THREAD] UNTIL\n RELAY_LOG_FILE = \'log_name\', RELAY_LOG_POS = log_pos\n\nthread_types:\n [thread_type [, thread_type] ... ]\n\nthread_type: IO_THREAD | SQL_THREAD\n\nSTART SLAVE with no thread_type options starts both of the slave\nthreads. The I/O thread reads events from the master server and stores\nthem in the relay log. The SQL thread reads events from the relay log\nand executes them. START SLAVE requires the SUPER privilege.\n\nIf START SLAVE succeeds in starting the slave threads, it returns\nwithout any error. However, even in that case, it might be that the\nslave threads start and then later stop (for example, because they do\nnot manage to connect to the master or read its binary log, or some\nother problem). START SLAVE does not warn you about this. You must\ncheck the slave\'s error log for error messages generated by the slave\nthreads, or check that they are running satisfactorily with SHOW SLAVE\nSTATUS.\n\nURL: https://mariadb.com/kb/en/start-slave/\n\n','','https://mariadb.com/kb/en/start-slave/'),(325,'AREA',2,'Area(poly)\n\nReturns as a double-precision number the area of the Polygon value\npoly, as measured in its spatial reference system.\n\nURL: https://mariadb.com/kb/en/area/\n\n','MariaDB> SET @poly = \'Polygon((0 0,0 3,3 0,0 0),(1 1,1 2,2 1,1 1))\';\nMariaDB> SELECT Area(GeomFromText(@poly));\n+---------------------------+\n| Area(GeomFromText(@poly)) |\n+---------------------------+\n| 4 |\n+---------------------------+\n','https://mariadb.com/kb/en/area/'),(326,'FLUSH',26,'Syntax:\nFLUSH [NO_WRITE_TO_BINLOG | LOCAL]\n flush_option [, flush_option] ...\n\nThe FLUSH statement has several variant forms that clear or reload\nvarious internal caches, flush tables, or acquire locks. To execute\nFLUSH, you must have the RELOAD privilege. Specific flush options might\nrequire additional privileges, as described later.\n\nBy default, the server writes FLUSH statements to the binary log so\nthat they replicate to replication slaves. To suppress logging, use the\noptional NO_WRITE_TO_BINLOG keyword or its alias LOCAL.\n\n*Note*: FLUSH LOGS, FLUSH MASTER, FLUSH SLAVE, and FLUSH TABLES WITH\nREAD LOCK (with or without a table list) are not written to the binary\nlog in any case because they would cause problems if replicated to a\nslave.\n\nThe FLUSH statement causes an implicit commit. See\nhttp://dev.mysql.com/doc/refman/5.5/en/implicit-commit.html.\n\nThe RESET statement is similar to FLUSH. See [HELP RESET], for\ninformation about using the RESET statement with replication.\n\nURL: https://mariadb.com/kb/en/flush/\n\n','','https://mariadb.com/kb/en/flush/'),(327,'BEGIN END',23,'Syntax:\n[begin_label:] BEGIN\n [statement_list]\nEND [end_label]\n\nBEGIN ... END syntax is used for writing compound statements, which can\nappear within stored programs (stored procedures and functions,\ntriggers, and events). A compound statement can contain multiple\nstatements, enclosed by the BEGIN and END keywords. statement_list\nrepresents a list of one or more statements, each terminated by a\nsemicolon (;) statement delimiter. The statement_list itself is\noptional, so the empty compound statement (BEGIN END) is legal.\n\nBEGIN ... END blocks can be nested.\n\nUse of multiple statements requires that a client is able to send\nstatement strings containing the ; statement delimiter. In the mysql\ncommand-line client, this is handled with the delimiter command.\nChanging the ; end-of-statement delimiter (for example, to //) permit ;\nto be used in a program body. For an example, see\nhttps://mariadb.com/kb/en/stored-procedure-overview/.\n\nA BEGIN ... END block can be labeled. See [HELP labels].\n\nURL: https://mariadb.com/kb/en/begin-end/\n\n','','https://mariadb.com/kb/en/begin-end/'),(328,'SHOW PROCEDURE STATUS',26,'Syntax:\nSHOW PROCEDURE STATUS\n [LIKE \'pattern\' | WHERE expr]\n\nThis statement is a MySQL extension. It returns characteristics of a\nstored procedure, such as the database, name, type, creator, creation\nand modification dates, and character set information. A similar\nstatement, SHOW FUNCTION STATUS, displays information about stored\nfunctions (see [HELP SHOW FUNCTION STATUS]).\n\nThe LIKE clause, if present, indicates which procedure or function\nnames to match. The WHERE clause can be given to select rows using more\ngeneral conditions, as discussed in\nhttps://mariadb.com/kb/en/extended-show/.\n\nURL: https://mariadb.com/kb/en/show-procedure-status/\n\n','MariaDB> SHOW PROCEDURE STATUS LIKE \'sp1\'\\G\n*************************** 1. row ***************************\n Db: test\n Name: sp1\n Type: PROCEDURE\n Definer: testuser@localhost\n Modified: 2004-08-03 15:29:37\n Created: 2004-08-03 15:29:37\n Security_type: DEFINER\n Comment:\ncharacter_set_client: latin1\ncollation_connection: latin1_swedish_ci\n Database Collation: latin1_swedish_ci\n','https://mariadb.com/kb/en/show-procedure-status/'),(329,'DESCRIBE',28,'Syntax:\n{DESCRIBE | DESC} tbl_name [col_name | wild]\n\nDESCRIBE provides information about the columns in a table. It is a\nshortcut for SHOW COLUMNS FROM. These statements also display\ninformation for views. (See [HELP SHOW COLUMNS].)\n\ncol_name can be a column name, or a string containing the SQL \"%\" and\n\"_\" wildcard characters to obtain output only for the columns with\nnames matching the string. There is no need to enclose the string\nwithin quotation marks unless it contains spaces or other special\ncharacters.\n\nMariaDB> DESCRIBE City;\n+------------+----------+------+-----+---------+----------------+\n| Field | Type | Null | Key | Default | Extra |\n+------------+----------+------+-----+---------+----------------+\n| Id | int(11) | NO | PRI | NULL | auto_increment |\n| Name | char(35) | NO | | | |\n| Country | char(3) | NO | UNI | | |\n| District | char(20) | YES | MUL | | |\n| Population | int(11) | NO | | 0 | |\n+------------+----------+------+-----+---------+----------------+\n5 rows in set (0.00 sec)\n\nThe description for SHOW COLUMNS provides more information about the\noutput columns (see [HELP SHOW COLUMNS]).\n\nURL: https://mariadb.com/kb/en/describe/\n\n','','https://mariadb.com/kb/en/describe/'),(330,'SHOW WARNINGS',26,'Syntax:\nSHOW WARNINGS [LIMIT [offset,] row_count]\nSHOW COUNT(*) WARNINGS\n\nSHOW WARNINGS shows information about the conditions (errors, warnings,\nand notes) that resulted from the last statement in the current session\nthat generated messages. It shows nothing if the last statement used a\ntable and generated no messages. (That is, a statement that uses a\ntable but generates no messages clears the message list.) Statements\nthat do not use tables and do not generate messages have no effect on\nthe message list.\n\nWarnings are generated for DML statements such as INSERT, UPDATE, and\nLOAD DATA INFILE as well as DDL statements such as CREATE TABLE and\nALTER TABLE.\n\nSHOW WARNINGS is also used following EXPLAIN EXTENDED, to display the\nextra information generated by EXPLAIN when the EXTENDED keyword is\nused. See https://mariadb.com/kb/en/explain#explain-extended.\n\nThe LIMIT clause has the same syntax as for the SELECT statement. See\nhttps://mariadb.com/kb/en/select/.\n\nA related statement, SHOW ERRORS, shows only the error conditions (it\nexcludes warnings and notes). See [HELP SHOW ERRORS].\n\nThe SHOW COUNT(*) WARNINGS statement displays the total number of\nerrors, warnings, and notes. You can also retrieve this number from the\nwarning_count system variable:\n\nSHOW COUNT(*) WARNINGS;\nSELECT @@warning_count;\n\nURL: https://mariadb.com/kb/en/show-warnings/\n\n','','https://mariadb.com/kb/en/show-warnings/'),(331,'DROP USER',10,'Syntax:\nDROP USER user [, user] ...\n\nThe DROP USER statement removes one or more MySQL accounts and their\nprivileges. It removes privilege rows for the account from all grant\ntables. To use this statement, you must have the global CREATE USER\nprivilege or the DELETE privilege for the mysql database. Each account\nname uses the format described in\nhttps://mariadb.com/kb/en/create-user#account-names. For example:\n\nDROP USER \'jeffrey\'@\'localhost\';\n\nIf you specify only the user name part of the account name, a host name\npart of \'%\' is used.\n\nURL: https://mariadb.com/kb/en/drop-user/\n\n','','https://mariadb.com/kb/en/drop-user/'),(332,'STDDEV_POP',16,'Syntax:\nSTDDEV_POP(expr)\n\nReturns the population standard deviation of expr (the square root of\nVAR_POP()). You can also use STD() or STDDEV(), which are equivalent\nbut not standard SQL.\n\nSTDDEV_POP() returns NULL if there were no matching rows.\n\nURL: https://mariadb.com/kb/en/stddev_pop/\n\n','','https://mariadb.com/kb/en/stddev_pop/'),(333,'SHOW CHARACTER SET',26,'Syntax:\nSHOW CHARACTER SET\n [LIKE \'pattern\' | WHERE expr]\n\nThe SHOW CHARACTER SET statement shows all available character sets.\nThe LIKE clause, if present, indicates which character set names to\nmatch. The WHERE clause can be given to select rows using more general\nconditions, as discussed in\nhttps://mariadb.com/kb/en/extended-show/. For example:\n\nMariaDB> SHOW CHARACTER SET LIKE \'latin%\';\n+---------+-----------------------------+-------------------+--------+\n| Charset | Description | Default collation | Maxlen |\n+---------+-----------------------------+-------------------+--------+\n| latin1 | cp1252 West European | latin1_swedish_ci | 1 |\n| latin2 | ISO 8859-2 Central European | latin2_general_ci | 1 |\n| latin5 | ISO 8859-9 Turkish | latin5_turkish_ci | 1 |\n| latin7 | ISO 8859-13 Baltic | latin7_general_ci | 1 |\n+---------+-----------------------------+-------------------+--------+\n\nURL: https://mariadb.com/kb/en/show-character-set/\n\n','','https://mariadb.com/kb/en/show-character-set/'),(334,'SUBSTRING',37,'Syntax:\nSUBSTRING(str,pos), SUBSTRING(str FROM pos), SUBSTRING(str,pos,len),\nSUBSTRING(str FROM pos FOR len)\n\nThe forms without a len argument return a substring from string str\nstarting at position pos. The forms with a len argument return a\nsubstring len characters long from string str, starting at position\npos. The forms that use FROM are standard SQL syntax. It is also\npossible to use a negative value for pos. In this case, the beginning\nof the substring is pos characters from the end of the string, rather\nthan the beginning. A negative value may be used for pos in any of the\nforms of this function.\n\nFor all forms of SUBSTRING(), the position of the first character in\nthe string from which the substring is to be extracted is reckoned as\n1.\n\nURL: https://mariadb.com/kb/en/substring/\n\n','MariaDB> SELECT SUBSTRING(\'Quadratically\',5);\n -> \'ratically\'\nMariaDB> SELECT SUBSTRING(\'foobarbar\' FROM 4);\n -> \'barbar\'\nMariaDB> SELECT SUBSTRING(\'Quadratically\',5,6);\n -> \'ratica\'\nMariaDB> SELECT SUBSTRING(\'Sakila\', -3);\n -> \'ila\'\nMariaDB> SELECT SUBSTRING(\'Sakila\', -5, 3);\n -> \'aki\'\nMariaDB> SELECT SUBSTRING(\'Sakila\' FROM -4 FOR 2);\n -> \'ki\'\n','https://mariadb.com/kb/en/substring/'),(335,'ISEMPTY',36,'IsEmpty(g)\n\nReturns 1 if the geometry value g is the empty geometry, 0 if it is not\nempty, and -1 if the argument is NULL. If the geometry is empty, it\nrepresents the empty point set.\n\nURL: https://mariadb.com/kb/en/isempty/\n\n','','https://mariadb.com/kb/en/isempty/'),(336,'SHOW FUNCTION STATUS',26,'Syntax:\nSHOW FUNCTION STATUS\n [LIKE \'pattern\' | WHERE expr]\n\nThis statement is similar to SHOW PROCEDURE STATUS but for stored\nfunctions. See [HELP SHOW PROCEDURE STATUS].\n\nURL: https://mariadb.com/kb/en/show-function-status/\n\n','','https://mariadb.com/kb/en/show-function-status/'),(337,'LTRIM',37,'Syntax:\nLTRIM(str)\n\nReturns the string str with leading space characters removed.\n\nURL: https://mariadb.com/kb/en/ltrim/\n\n','MariaDB> SELECT LTRIM(\' barbar\');\n -> \'barbar\'\n','https://mariadb.com/kb/en/ltrim/'),(338,'INTERSECTS',30,'Intersects(g1,g2)\n\nReturns 1 or 0 to indicate whether g1 spatially intersects g2.\n\nURL: https://mariadb.com/kb/en/intersects/\n\n','','https://mariadb.com/kb/en/intersects/'),(339,'CALL',27,'Syntax:\nCALL sp_name([parameter[,...]])\nCALL sp_name[()]\n\nThe CALL statement invokes a stored procedure that was defined\npreviously with CREATE PROCEDURE.\n\nStored procedures that take no arguments can be invoked without\nparentheses. That is, CALL p() and CALL p are equivalent.\n\nCALL can pass back values to its caller using parameters that are\ndeclared as OUT or INOUT parameters. When the procedure returns, a\nclient program can also obtain the number of rows affected for the\nfinal statement executed within the routine: At the SQL level, call the\nROW_COUNT() function; from the C API, call the mysql_affected_rows()\nfunction.\n\nURL: https://mariadb.com/kb/en/call/\n\n','','https://mariadb.com/kb/en/call/'),(340,'MBRDISJOINT',6,'MBRDisjoint(g1,g2)\n\nReturns 1 or 0 to indicate whether the Minimum Bounding Rectangles of\nthe two geometries g1 and g2 are disjoint (do not intersect).\n\nURL: https://mariadb.com/kb/en/mbrdisjoint/\n\n','','https://mariadb.com/kb/en/mbrdisjoint/'),(341,'VALUES',14,'Syntax:\nVALUES(col_name)\n\nIn an INSERT ... ON DUPLICATE KEY UPDATE statement, you can use the\nVALUES(col_name) function in the UPDATE clause to refer to column\nvalues from the INSERT portion of the statement. In other words,\nVALUES(col_name) in the UPDATE clause refers to the value of col_name\nthat would be inserted, had no duplicate-key conflict occurred. This\nfunction is especially useful in multiple-row inserts. The VALUES()\nfunction is meaningful only in the ON DUPLICATE KEY UPDATE clause of\nINSERT statements and returns NULL otherwise. See\nhttps://mariadb.com/kb/en/insert-on-duplicate-key-update/.\n\nURL: https://mariadb.com/kb/en/values/\n\n','MariaDB> INSERT INTO table (a,b,c) VALUES (1,2,3),(4,5,6)\n -> ON DUPLICATE KEY UPDATE c=VALUES(a)+VALUES(b);\n','https://mariadb.com/kb/en/values/'),(342,'SUBSTRING_INDEX',37,'Syntax:\nSUBSTRING_INDEX(str,delim,count)\n\nReturns the substring from string str before count occurrences of the\ndelimiter delim. If count is positive, everything to the left of the\nfinal delimiter (counting from the left) is returned. If count is\nnegative, everything to the right of the final delimiter (counting from\nthe right) is returned. SUBSTRING_INDEX() performs a case-sensitive\nmatch when searching for delim.\n\nURL: https://mariadb.com/kb/en/substring_index/\n\n','MariaDB> SELECT SUBSTRING_INDEX(\'www.mariadb.org\', \'.\', 2);\n -> \'www.mariadb\'\nMariaDB> SELECT SUBSTRING_INDEX(\'www.mariadb.org\', \'.\', -2);\n -> \'mariadb.org\'\n','https://mariadb.com/kb/en/substring_index/'),(343,'ENCODE',12,'Syntax:\nENCODE(str,pass_str)\n\nEncrypt str using pass_str as the password. To decrypt the result, use\nDECODE().\n\nThe result is a binary string of the same length as str.\n\nThe strength of the encryption is based on how good the random\ngenerator is. It should suffice for short strings.\n\nURL: https://mariadb.com/kb/en/encode/\n\n','','https://mariadb.com/kb/en/encode/'),(344,'LOOP',23,'Syntax:\n[begin_label:] LOOP\n statement_list\nEND LOOP [end_label]\n\nLOOP implements a simple loop construct, enabling repeated execution of\nthe statement list, which consists of one or more statements, each\nterminated by a semicolon (;) statement delimiter. The statements\nwithin the loop are repeated until the loop is terminated. Usually,\nthis is accomplished with a LEAVE statement. Within a stored function,\nRETURN can also be used, which exits the function entirely.\n\nNeglecting to include a loop-termination statement results in an\ninfinite loop.\n\nA LOOP statement can be labeled. For the rules regarding label use, see\n[HELP labels].\n\nURL: https://mariadb.com/kb/en/loop/\n\n','CREATE PROCEDURE doiterate(p1 INT)\nBEGIN\n label1: LOOP\n SET p1 = p1 + 1;\n IF p1 < 10 THEN\n ITERATE label1;\n END IF;\n LEAVE label1;\n END LOOP label1;\n SET @x = p1;\nEND;\n','https://mariadb.com/kb/en/loop/'),(345,'TRUNCATE',4,'Syntax:\nTRUNCATE(X,D)\n\nReturns the number X, truncated to D decimal places. If D is 0, the\nresult has no decimal point or fractional part. D can be negative to\ncause D digits left of the decimal point of the value X to become zero.\n\nURL: https://mariadb.com/kb/en/truncate/\n\n','MariaDB> SELECT TRUNCATE(1.223,1);\n -> 1.2\nMariaDB> SELECT TRUNCATE(1.999,1);\n -> 1.9\nMariaDB> SELECT TRUNCATE(1.999,0);\n -> 1\nMariaDB> SELECT TRUNCATE(-1.999,1);\n -> -1.9\nMariaDB> SELECT TRUNCATE(122,-2);\n -> 100\nMariaDB> SELECT TRUNCATE(10.28*100,0);\n -> 1028\n','https://mariadb.com/kb/en/truncate/'),(346,'TIMESTAMPADD',31,'Syntax:\nTIMESTAMPADD(unit,interval,datetime_expr)\n\nAdds the integer expression interval to the date or datetime expression\ndatetime_expr. The unit for interval is given by the unit argument,\nwhich should be one of the following values: MICROSECOND\n(microseconds), SECOND, MINUTE, HOUR, DAY, WEEK, MONTH, QUARTER, or\nYEAR.\n\nIt is possible to use FRAC_SECOND in place of MICROSECOND, but\nFRAC_SECOND is deprecated. FRAC_SECOND was removed in MySQL 5.5.3.\n\nThe unit value may be specified using one of keywords as shown, or with\na prefix of SQL_TSI_. For example, DAY and SQL_TSI_DAY both are legal.\n\nURL: https://mariadb.com/kb/en/timestampadd/\n\n','MariaDB> SELECT TIMESTAMPADD(MINUTE,1,\'2003-01-02\');\n -> \'2003-01-02 00:01:00\'\nMariaDB> SELECT TIMESTAMPADD(WEEK,1,\'2003-01-02\');\n -> \'2003-01-09\'\n','https://mariadb.com/kb/en/timestampadd/'),(347,'SHOW',26,'SHOW has many forms that provide information about databases, tables,\ncolumns, or status information about the server. This section describes\nthose following:\n\nSHOW AUTHORS\nSHOW {BINARY | MASTER} LOGS\nSHOW BINLOG EVENTS [IN \'log_name\'] [FROM pos] [LIMIT [offset,] row_count]\nSHOW CHARACTER SET [like_or_where]\nSHOW COLLATION [like_or_where]\nSHOW [FULL] COLUMNS FROM tbl_name [FROM db_name] [like_or_where]\nSHOW CONTRIBUTORS\nSHOW CREATE DATABASE db_name\nSHOW CREATE EVENT event_name\nSHOW CREATE FUNCTION func_name\nSHOW CREATE PROCEDURE proc_name\nSHOW CREATE TABLE tbl_name\nSHOW CREATE TRIGGER trigger_name\nSHOW CREATE VIEW view_name\nSHOW DATABASES [like_or_where]\nSHOW ENGINE engine_name {STATUS | MUTEX}\nSHOW [STORAGE] ENGINES\nSHOW ERRORS [LIMIT [offset,] row_count]\nSHOW EVENTS\nSHOW FUNCTION CODE func_name\nSHOW FUNCTION STATUS [like_or_where]\nSHOW GRANTS FOR user\nSHOW INDEX FROM tbl_name [FROM db_name]\nSHOW MASTER STATUS\nSHOW OPEN TABLES [FROM db_name] [like_or_where]\nSHOW PLUGINS\nSHOW PROCEDURE CODE proc_name\nSHOW PROCEDURE STATUS [like_or_where]\nSHOW PRIVILEGES\nSHOW [FULL] PROCESSLIST\nSHOW PROFILE [types] [FOR QUERY n] [OFFSET n] [LIMIT n]\nSHOW PROFILES\nSHOW SLAVE HOSTS\nSHOW SLAVE STATUS\nSHOW [GLOBAL | SESSION] STATUS [like_or_where]\nSHOW TABLE STATUS [FROM db_name] [like_or_where]\nSHOW [FULL] TABLES [FROM db_name] [like_or_where]\nSHOW TRIGGERS [FROM db_name] [like_or_where]\nSHOW [GLOBAL | SESSION] VARIABLES [like_or_where]\nSHOW WARNINGS [LIMIT [offset,] row_count]\n\nlike_or_where:\n LIKE \'pattern\'\n | WHERE expr\n\nIf the syntax for a given SHOW statement includes a LIKE \'pattern\'\npart, \'pattern\' is a string that can contain the SQL \"%\" and \"_\"\nwildcard characters. The pattern is useful for restricting statement\noutput to matching values.\n\nSeveral SHOW statements also accept a WHERE clause that provides more\nflexibility in specifying which rows to display. See\nhttps://mariadb.com/kb/en/extended-show/.\n\nURL: https://mariadb.com/kb/en/show/\n\n','','https://mariadb.com/kb/en/show/'),(348,'GREATEST',18,'Syntax:\nGREATEST(value1,value2,...)\n\nWith two or more arguments, returns the largest (maximum-valued)\nargument. The arguments are compared using the same rules as for\nLEAST().\n\nURL: https://mariadb.com/kb/en/greatest/\n\n','MariaDB> SELECT GREATEST(2,0);\n -> 2\nMariaDB> SELECT GREATEST(34.0,3.0,5.0,767.0);\n -> 767.0\nMariaDB> SELECT GREATEST(\'B\',\'A\',\'C\');\n -> \'C\'\n','https://mariadb.com/kb/en/greatest/'),(349,'SHOW VARIABLES',26,'Syntax:\nSHOW [GLOBAL | SESSION] VARIABLES\n [LIKE \'pattern\' | WHERE expr]\n\nSHOW VARIABLES shows the values of MySQL system variables. This\ninformation also can be obtained using the mysqladmin variables\ncommand. The LIKE clause, if present, indicates which variable names to\nmatch. The WHERE clause can be given to select rows using more general\nconditions, as discussed in\nhttps://mariadb.com/kb/en/extended-show/. This\nstatement does not require any privilege. It requires only the ability\nto connect to the server.\n\nWith the GLOBAL modifier, SHOW VARIABLES displays the values that are\nused for new connections to MySQL. As of MySQL 5.5.3, if a variable has\nno global value, no value is displayed. Before 5.5.3, the session value\nis displayed. With SESSION, SHOW VARIABLES displays the values that are\nin effect for the current connection. If no modifier is present, the\ndefault is SESSION. LOCAL is a synonym for SESSION.\nWith a LIKE clause, the statement displays only rows for those\nvariables with names that match the pattern. To obtain the row for a\nspecific variable, use a LIKE clause as shown:\n\nSHOW VARIABLES LIKE \'max_join_size\';\nSHOW SESSION VARIABLES LIKE \'max_join_size\';\n\nTo get a list of variables whose name match a pattern, use the \"%\"\nwildcard character in a LIKE clause:\n\nSHOW VARIABLES LIKE \'%size%\';\nSHOW GLOBAL VARIABLES LIKE \'%size%\';\n\nWildcard characters can be used in any position within the pattern to\nbe matched. Strictly speaking, because \"_\" is a wildcard that matches\nany single character, you should escape it as \"\\_\" to match it\nliterally. In practice, this is rarely necessary.\n\nURL: https://mariadb.com/kb/en/show-variables/\n\n','','https://mariadb.com/kb/en/show-variables/'),(350,'BINLOG',26,'Syntax:\nBINLOG \'str\'\n\nBINLOG is an internal-use statement. It is generated by the mysqlbinlog\nprogram as the printable representation of certain events in binary log\nfiles. (See https://mariadb.com/kb/en/mysqlbinlog/.)\nThe \'str\' value is a base 64-encoded string the that server decodes to\ndetermine the data change indicated by the corresponding event. This\nstatement requires the SUPER privilege.\n\nURL: https://mariadb.com/kb/en/binlog/\n\n','','https://mariadb.com/kb/en/binlog/'),(351,'BIT_AND',16,'Syntax:\nBIT_AND(expr)\n\nReturns the bitwise AND of all bits in expr. The calculation is\nperformed with 64-bit (BIGINT) precision.\n\nURL: https://mariadb.com/kb/en/bit_and/\n\n','','https://mariadb.com/kb/en/bit_and/'),(352,'SECOND',31,'Syntax:\nSECOND(time)\n\nReturns the second for time, in the range 0 to 59.\n\nURL: https://mariadb.com/kb/en/second/\n\n','MariaDB> SELECT SECOND(\'10:05:03\');\n -> 3\n','https://mariadb.com/kb/en/second/'),(353,'ATAN2',4,'Syntax:\nATAN(Y,X), ATAN2(Y,X)\n\nReturns the arc tangent of the two variables X and Y. It is similar to\ncalculating the arc tangent of Y / X, except that the signs of both\narguments are used to determine the quadrant of the result.\n\nURL: https://mariadb.com/kb/en/atan2/\n\n','MariaDB> SELECT ATAN(-2,2);\n -> -0.78539816339745\nMariaDB> SELECT ATAN2(PI(),0);\n -> 1.5707963267949\n','https://mariadb.com/kb/en/atan2/'),(354,'MBRCONTAINS',6,'MBRContains(g1,g2)\n\nReturns 1 or 0 to indicate whether the Minimum Bounding Rectangle of g1\ncontains the Minimum Bounding Rectangle of g2. This tests the opposite\nrelationship as MBRWithin().\n\nURL: https://mariadb.com/kb/en/mbrcontains/\n\n','MariaDB> SET @g1 = GeomFromText(\'Polygon((0 0,0 3,3 3,3 0,0 0))\');\nMariaDB> SET @g2 = GeomFromText(\'Point(1 1)\');\nMariaDB> SELECT MBRContains(@g1,@g2), MBRContains(@g2,@g1);\n----------------------+----------------------+\n| MBRContains(@g1,@g2) | MBRContains(@g2,@g1) |\n+----------------------+----------------------+\n| 1 | 0 |\n+----------------------+----------------------+\n','https://mariadb.com/kb/en/mbrcontains/'),(355,'HOUR',31,'Syntax:\nHOUR(time)\n\nReturns the hour for time. The range of the return value is 0 to 23 for\ntime-of-day values. However, the range of TIME values actually is much\nlarger, so HOUR can return values greater than 23.\n\nURL: https://mariadb.com/kb/en/hour/\n\n','MariaDB> SELECT HOUR(\'10:05:03\');\n -> 10\nMariaDB> SELECT HOUR(\'272:59:59\');\n -> 272\n','https://mariadb.com/kb/en/hour/'),(356,'SELECT',27,'Syntax:\nSELECT\n [ALL | DISTINCT | DISTINCTROW ]\n [HIGH_PRIORITY]\n [STRAIGHT_JOIN]\n [SQL_SMALL_RESULT] [SQL_BIG_RESULT] [SQL_BUFFER_RESULT]\n [SQL_CACHE | SQL_NO_CACHE] [SQL_CALC_FOUND_ROWS]\n select_expr [, select_expr ...]\n [FROM table_references\n [WHERE where_condition]\n [GROUP BY {col_name | expr | position}\n [ASC | DESC], ... [WITH ROLLUP]]\n [HAVING where_condition]\n [ORDER BY {col_name | expr | position}\n [ASC | DESC], ...]\n [LIMIT {[offset,] row_count | row_count OFFSET offset}]\n [PROCEDURE procedure_name(argument_list)]\n [INTO OUTFILE \'file_name\'\n [CHARACTER SET charset_name]\n export_options\n | INTO DUMPFILE \'file_name\'\n | INTO var_name [, var_name]]\n [FOR UPDATE | LOCK IN SHARE MODE]]\n\nSELECT is used to retrieve rows selected from one or more tables, and\ncan include UNION statements and subqueries. See [HELP UNION], and\nhttps://mariadb.com/kb/en/subqueries/.\n\nThe most commonly used clauses of SELECT statements are these:\n\no Each select_expr indicates a column that you want to retrieve. There\n must be at least one select_expr.\n\no table_references indicates the table or tables from which to retrieve\n rows. Its syntax is described in [HELP JOIN].\n\no The WHERE clause, if given, indicates the condition or conditions\n that rows must satisfy to be selected. where_condition is an\n expression that evaluates to true for each row to be selected. The\n statement selects all rows if there is no WHERE clause.\n\n In the WHERE expression, you can use any of the functions and\n operators that MySQL supports, except for aggregate (summary)\n functions. See\n https://mariadb.com/kb/en/select#select-expressions, and\n https://mariadb.com/kb/en/functions-and-operators/.\n\nSELECT can also be used to retrieve rows computed without reference to\nany table.\n\nURL: https://mariadb.com/kb/en/select/\n\n','','https://mariadb.com/kb/en/select/'),(357,'COT',4,'Syntax:\nCOT(X)\n\nReturns the cotangent of X.\n\nURL: https://mariadb.com/kb/en/cot/\n\n','MariaDB> SELECT COT(12);\n -> -1.5726734063977\nMariaDB> SELECT COT(0);\n -> NULL\n','https://mariadb.com/kb/en/cot/'),(358,'SHOW CREATE EVENT',26,'Syntax:\nSHOW CREATE EVENT event_name\n\nThis statement displays the CREATE EVENT statement needed to re-create\na given event. It requires the EVENT privilege for the database from\nwhich the event is to be shown. For example (using the same event\ne_daily defined and then altered in [HELP SHOW EVENTS]):\n\nURL: https://mariadb.com/kb/en/show-create-event/\n\n','MariaDB> SHOW CREATE EVENT test.e_daily\\G\n*************************** 1. row ***************************\n Event: e_daily\n sql_mode:\n time_zone: SYSTEM\n Create Event: CREATE EVENT `e_daily`\n ON SCHEDULE EVERY 1 DAY\n STARTS CURRENT_TIMESTAMP + INTERVAL 6 HOUR\n ON COMPLETION NOT PRESERVE\n ENABLE\n COMMENT \'Saves total number of sessions then\n clears the table each day\'\n DO BEGIN\n INSERT INTO site_activity.totals (time, total)\n SELECT CURRENT_TIMESTAMP, COUNT(*)\n FROM site_activity.sessions;\n DELETE FROM site_activity.sessions;\n END\ncharacter_set_client: latin1\ncollation_connection: latin1_swedish_ci\n Database Collation: latin1_swedish_ci\n','https://mariadb.com/kb/en/show-create-event/'),(359,'LOAD_FILE',37,'Syntax:\nLOAD_FILE(file_name)\n\nReads the file and returns the file contents as a string. To use this\nfunction, the file must be located on the server host, you must specify\nthe full path name to the file, and you must have the FILE privilege.\nThe file must be readable by all and its size less than\nmax_allowed_packet bytes. If the secure_file_priv system variable is\nset to a nonempty directory name, the file to be loaded must be located\nin that directory.\n\nIf the file does not exist or cannot be read because one of the\npreceding conditions is not satisfied, the function returns NULL.\n\nThe character_set_filesystem system variable controls interpretation of\nfile names that are given as literal strings.\n\nURL: https://mariadb.com/kb/en/load_file/\n\n','MariaDB> UPDATE t\n SET blob_col=LOAD_FILE(\'/tmp/picture\')\n WHERE id=1;\n','https://mariadb.com/kb/en/load_file/'),(360,'POINTFROMTEXT',3,'PointFromText(wkt[,srid])\n\nConstructs a POINT value using its WKT representation and SRID.\n\nURL: https://mariadb.com/kb/en/pointfromtext/\n\n','','https://mariadb.com/kb/en/pointfromtext/'),(361,'GROUP_CONCAT',16,'Syntax:\nGROUP_CONCAT(expr)\n\nThis function returns a string result with the concatenated non-NULL\nvalues from a group. It returns NULL if there are no non-NULL values.\nThe full syntax is as follows:\n\nGROUP_CONCAT([DISTINCT] expr [,expr ...]\n [ORDER BY {unsigned_integer | col_name | expr}\n [ASC | DESC] [,col_name ...]]\n [SEPARATOR str_val])\n\nURL: https://mariadb.com/kb/en/group_concat/\n\n','MariaDB> SELECT student_name,\n -> GROUP_CONCAT(test_score)\n -> FROM student\n -> GROUP BY student_name;\n','https://mariadb.com/kb/en/group_concat/'),(362,'DATE_FORMAT',31,'Syntax:\nDATE_FORMAT(date,format)\n\nFormats the date value according to the format string.\n\nURL: https://mariadb.com/kb/en/date_format/\n\n','MariaDB> SELECT DATE_FORMAT(\'2009-10-04 22:23:00\', \'%W %M %Y\');\n -> \'Sunday October 2009\'\nMariaDB> SELECT DATE_FORMAT(\'2007-10-04 22:23:00\', \'%H:%i:%s\');\n -> \'22:23:00\'\nMariaDB> SELECT DATE_FORMAT(\'1900-10-04 22:23:00\',\n -> \'%D %y %a %d %m %b %j\');\n -> \'4th 00 Thu 04 10 Oct 277\'\nMariaDB> SELECT DATE_FORMAT(\'1997-10-04 22:23:00\',\n -> \'%H %k %I %r %T %S %w\');\n -> \'22 22 10 10:23:00 PM 22:23:00 00 6\'\nMariaDB> SELECT DATE_FORMAT(\'1999-01-01\', \'%X %V\');\n -> \'1998 52\'\nMariaDB> SELECT DATE_FORMAT(\'2006-06-00\', \'%d\');\n -> \'00\'\n','https://mariadb.com/kb/en/date_format/'),(363,'BENCHMARK',17,'Syntax:\nBENCHMARK(count,expr)\n\nThe BENCHMARK() function executes the expression expr repeatedly count\ntimes. It may be used to time how quickly MySQL processes the\nexpression. The result value is always 0. The intended use is from\nwithin the mysql client, which reports query execution times:\n\nURL: https://mariadb.com/kb/en/benchmark/\n\n','MariaDB> SELECT BENCHMARK(1000000,ENCODE(\'hello\',\'goodbye\'));\n+----------------------------------------------+\n| BENCHMARK(1000000,ENCODE(\'hello\',\'goodbye\')) |\n+----------------------------------------------+\n| 0 |\n+----------------------------------------------+\n1 row in set (4.74 sec)\n','https://mariadb.com/kb/en/benchmark/'),(364,'YEAR',31,'Syntax:\nYEAR(date)\n\nReturns the year for date, in the range 1000 to 9999, or 0 for the\n\"zero\" date.\n\nURL: https://mariadb.com/kb/en/year/\n\n','MariaDB> SELECT YEAR(\'1987-01-01\');\n -> 1987\n','https://mariadb.com/kb/en/year/'),(365,'SHOW ENGINE',26,'Syntax:\nSHOW ENGINE engine_name {STATUS | MUTEX}\n\nSHOW ENGINE displays operational information about a storage engine.\nThe following statements currently are supported:\n\nSHOW ENGINE INNODB STATUS\nSHOW ENGINE INNODB MUTEX\nSHOW ENGINE PERFORMANCE_SCHEMA STATUS\n\nSHOW ENGINE INNODB STATUS displays extensive information from the\nstandard InnoDB Monitor about the state of the InnoDB storage engine.\nFor information about the standard monitor and other InnoDB Monitors\nthat provide information about InnoDB processing, see\nhttp://dev.mysql.com/doc/refman/5.5/en/innodb-monitors.html.\n\nSHOW ENGINE INNODB MUTEX displays InnoDB mutex statistics. The\nstatement displays the following fields:\n\no Type\n\n Always InnoDB.\n\no Name\n\n The source file where the mutex is implemented, and the line number\n in the file where the mutex is created. The line number may change\n depending on your version of MySQL.\n\no Status\n\n The mutex status. This field displays several values if UNIV_DEBUG\n was defined at MySQL compilation time (for example, in include/univ.i\n in the InnoDB part of the MySQL source tree). If UNIV_DEBUG was not\n defined, the statement displays only the os_waits value. In the\n latter case (without UNIV_DEBUG), the information on which the output\n is based is insufficient to distinguish regular mutexes and mutexes\n that protect rw-locks (which permit multiple readers or a single\n writer). Consequently, the output may appear to contain multiple rows\n for the same mutex.\n\n o count indicates how many times the mutex was requested.\n\n o spin_waits indicates how many times the spinlock had to run.\n\n o spin_rounds indicates the number of spinlock rounds. (spin_rounds\n divided by spin_waits provides the average round count.)\n\n o os_waits indicates the number of operating system waits. This\n occurs when the spinlock did not work (the mutex was not locked\n during the spinlock and it was necessary to yield to the operating\n system and wait).\n\n o os_yields indicates the number of times a the thread trying to lock\n a mutex gave up its timeslice and yielded to the operating system\n (on the presumption that permitting other threads to run will free\n the mutex so that it can be locked).\n\n o os_wait_times indicates the amount of time (in ms) spent in\n operating system waits, if the timed_mutexes system variable is 1\n (ON). If timed_mutexes is 0 (OFF), timing is disabled, so\n os_wait_times is 0. timed_mutexes is off by default.\n\nInformation from this statement can be used to diagnose system\nproblems. For example, large values of spin_waits and spin_rounds may\nindicate scalability problems.\n\nUse SHOW ENGINE PERFORMANCE_SCHEMA STATUS to inspect the internal\noperation of the Performance Schema code:\n\nMariaDB> SHOW ENGINE PERFORMANCE_SCHEMA STATUS\\G\n...\n*************************** 3. row ***************************\n Type: performance_schema\n Name: events_waits_history.row_size\nStatus: 76\n*************************** 4. row ***************************\n Type: performance_schema\n Name: events_waits_history.row_count\nStatus: 10000\n*************************** 5. row ***************************\n Type: performance_schema\n Name: events_waits_history.memory\nStatus: 760000\n...\n*************************** 57. row ***************************\n Type: performance_schema\n Name: performance_schema.memory\nStatus: 26459600\n...\n\nThe intent of this statement is to help the DBA to understand the\neffects that different options have on memory requirements.\n\nName values consist of two parts, which name an internal buffer and an\nattribute of the buffer, respectively:\n\no Internal buffers that are exposed as a table in the\n performance_schema database are named after the table. Examples:\n events_waits_history.row_size, mutex_instances.row_count.\n\no Internal buffers that are not exposed as a table are named within\n parentheses. Examples: (pfs_cond_class).row_size,\n (pfs_mutex_class).memory.\n\no Values that apply to the Performance Schema as a whole begin with\n performance_schema. Example: performance_schema.memory.\n\nAttributes have these meanings:\n\no row_size cannot be changed. It is the size of the internal record\n used by the implementation.\n\no row_count can be changed depending on the configuration options.\n\no For a table, tbl_name.memory is the product of row_size multiplied by\n row_count. For the Performance Schema as a whole,\n performance_schema.memory is the sum of all the memory used (the sum\n of all other memory values).\n\nIn some cases, there is a direct relationship between a configuration\nparameter and a SHOW ENGINE value. For example,\nevents_waits_history_long.row_count corresponds to\nperformance_schema_events_waits_history_long_size. In other cases, the\nrelationship is more complex. For example,\nevents_waits_history.row_count corresponds to\nperformance_schema_events_waits_history_size (the number of rows per\nthread) multiplied by performance_schema_max_thread_instances ( the\nnumber of threads).\n\nURL: https://mariadb.com/kb/en/show-engine/\n\n','','https://mariadb.com/kb/en/show-engine/'),(366,'NAME_CONST',14,'Syntax:\nNAME_CONST(name,value)\n\nReturns the given value. When used to produce a result set column,\nNAME_CONST() causes the column to have the given name. The arguments\nshould be constants.\n\nMariaDB> SELECT NAME_CONST(\'myname\', 14);\n+--------+\n| myname |\n+--------+\n| 14 |\n+--------+\n\nURL: https://mariadb.com/kb/en/name_const/\n\n','','https://mariadb.com/kb/en/name_const/'),(367,'RELEASE_LOCK',14,'Syntax:\nRELEASE_LOCK(str)\n\nReleases the lock named by the string str that was obtained with\nGET_LOCK(). Returns 1 if the lock was released, 0 if the lock was not\nestablished by this thread (in which case the lock is not released),\nand NULL if the named lock did not exist. The lock does not exist if it\nwas never obtained by a call to GET_LOCK() or if it has previously been\nreleased.\n\nThe DO statement is convenient to use with RELEASE_LOCK(). See [HELP\nDO].\n\nURL: https://mariadb.com/kb/en/release_lock/\n\n','','https://mariadb.com/kb/en/release_lock/'),(368,'IS NULL',18,'Syntax:\nIS NULL\n\nTests whether a value is NULL.\n\nURL: https://mariadb.com/kb/en/is-null/\n\n','MariaDB> SELECT 1 IS NULL, 0 IS NULL, NULL IS NULL;\n -> 0, 0, 1\n','https://mariadb.com/kb/en/is-null/'),(369,'CONVERT_TZ',31,'Syntax:\nCONVERT_TZ(dt,from_tz,to_tz)\n\nCONVERT_TZ() converts a datetime value dt from the time zone given by\nfrom_tz to the time zone given by to_tz and returns the resulting\nvalue. Time zones are specified as described in\nhttps://mariadb.com/kb/en/time-zones/. This\nfunction returns NULL if the arguments are invalid.\n\nURL: https://mariadb.com/kb/en/convert_tz/\n\n','MariaDB> SELECT CONVERT_TZ(\'2004-01-01 12:00:00\',\'GMT\',\'MET\');\n -> \'2004-01-01 13:00:00\'\nMariaDB> SELECT CONVERT_TZ(\'2004-01-01 12:00:00\',\'+00:00\',\'+10:00\');\n -> \'2004-01-01 22:00:00\'\n','https://mariadb.com/kb/en/convert_tz/'),(370,'TIME_TO_SEC',31,'Syntax:\nTIME_TO_SEC(time)\n\nReturns the time argument, converted to seconds.\n\nURL: https://mariadb.com/kb/en/time_to_sec/\n\n','MariaDB> SELECT TIME_TO_SEC(\'22:23:00\');\n -> 80580\nMariaDB> SELECT TIME_TO_SEC(\'00:39:38\');\n -> 2378\n','https://mariadb.com/kb/en/time_to_sec/'),(371,'WEEKDAY',31,'Syntax:\nWEEKDAY(date)\n\nReturns the weekday index for date (0 = Monday, 1 = Tuesday, ... 6 =\nSunday).\n\nURL: https://mariadb.com/kb/en/weekday/\n\n','MariaDB> SELECT WEEKDAY(\'2008-02-03 22:23:00\');\n -> 6\nMariaDB> SELECT WEEKDAY(\'2007-11-06\');\n -> 1\n','https://mariadb.com/kb/en/weekday/'),(372,'EXPORT_SET',37,'Syntax:\nEXPORT_SET(bits,on,off[,separator[,number_of_bits]])\n\nReturns a string such that for every bit set in the value bits, you get\nan on string and for every bit not set in the value, you get an off\nstring. Bits in bits are examined from right to left (from low-order to\nhigh-order bits). Strings are added to the result from left to right,\nseparated by the separator string (the default being the comma\ncharacter \",\"). The number of bits examined is given by number_of_bits,\nwhich has a default of 64 if not specified. number_of_bits is silently\nclipped to 64 if larger than 64. It is treated as an unsigned integer,\nso a value of -1 is effectively the same as 64.\n\nURL: https://mariadb.com/kb/en/export_set/\n\n','MariaDB> SELECT EXPORT_SET(5,\'Y\',\'N\',\',\',4);\n -> \'Y,N,Y,N\'\nMariaDB> SELECT EXPORT_SET(6,\'1\',\'0\',\',\',10);\n -> \'0,1,1,0,0,0,0,0,0,0\'\n','https://mariadb.com/kb/en/export_set/'),(373,'ALTER SERVER',39,'Syntax:\nALTER SERVER server_name\n OPTIONS (option [, option] ...)\n\nAlters the server information for server_name, adjusting any of the\noptions permitted in the CREATE SERVER statement. See [HELP CREATE\nSERVER]. The corresponding fields in the mysql.servers table are\nupdated accordingly. This statement requires the SUPER privilege.\n\nURL: https://mariadb.com/kb/en/alter-server/\n\n','ALTER SERVER s OPTIONS (USER \'sally\');\n','https://mariadb.com/kb/en/alter-server/'),(374,'RESIGNAL',23,'Syntax:\nRESIGNAL [condition_value]\n [SET signal_information_item\n [, signal_information_item] ...]\n\ncondition_value:\n SQLSTATE [VALUE] sqlstate_value\n | condition_name\n\nsignal_information_item:\n condition_information_item_name = simple_value_specification\n\ncondition_information_item_name:\n CLASS_ORIGIN\n | SUBCLASS_ORIGIN\n | MESSAGE_TEXT\n | MYSQL_ERRNO\n | CONSTRAINT_CATALOG\n | CONSTRAINT_SCHEMA\n | CONSTRAINT_NAME\n | CATALOG_NAME\n | SCHEMA_NAME\n | TABLE_NAME\n | COLUMN_NAME\n | CURSOR_NAME\n\ncondition_name, simple_value_specification:\n (see following discussion)\n\nRESIGNAL passes on the error condition information that is available\nduring execution of a condition handler within a compound statement\ninside a stored procedure or function, trigger, or event. RESIGNAL may\nchange some or all information before passing it on. RESIGNAL is\nrelated to SIGNAL, but instead of originating a condition as SIGNAL\ndoes, RESIGNAL relays existing condition information, possibly after\nmodifying it.\n\nRESIGNAL makes it possible to both handle an error and return the error\ninformation. Otherwise, by executing an SQL statement within the\nhandler, information that caused the handler\'s activation is destroyed.\nRESIGNAL also can make some procedures shorter if a given handler can\nhandle part of a situation, then pass the condition \"up the line\" to\nanother handler.\n\nNo special privileges are required to execute the RESIGNAL statement.\n\nFor condition_value and signal_information_item, the definitions and\nrules are the same for RESIGNAL as for SIGNAL (see [HELP SIGNAL]).\n\nThe RESIGNAL statement takes condition_value and SET clauses, both of\nwhich are optional. This leads to several possible uses:\n\no RESIGNAL alone:\n\nRESIGNAL;\n\no RESIGNAL with new signal information:\n\nRESIGNAL SET signal_information_item [, signal_information_item] ...;\n\no RESIGNAL with a condition value and possibly new signal information:\n\nRESIGNAL condition_value\n [SET signal_information_item [, signal_information_item] ...];\n\nURL: https://mariadb.com/kb/en/resignal/\n\n','','https://mariadb.com/kb/en/resignal/'),(375,'TIME FUNCTION',31,'Syntax:\nTIME(expr)\n\nExtracts the time part of the time or datetime expression expr and\nreturns it as a string.\n\nURL: https://mariadb.com/kb/en/time-function/\n\n','MariaDB> SELECT TIME(\'2003-12-31 01:02:03\');\n -> \'01:02:03\'\nMariaDB> SELECT TIME(\'2003-12-31 01:02:03.000123\');\n -> \'01:02:03.000123\'\n','https://mariadb.com/kb/en/time-function/'),(376,'DATE_ADD',31,'Syntax:\nDATE_ADD(date,INTERVAL expr unit), DATE_SUB(date,INTERVAL expr unit)\n\nThese functions perform date arithmetic. The date argument specifies\nthe starting date or datetime value. expr is an expression specifying\nthe interval value to be added or subtracted from the starting date.\nexpr is a string; it may start with a \"-\" for negative intervals. unit\nis a keyword indicating the units in which the expression should be\ninterpreted.\n\nURL: https://mariadb.com/kb/en/date_add/\n\n','MariaDB> SELECT \'2008-12-31 23:59:59\' + INTERVAL 1 SECOND;\n -> \'2009-01-01 00:00:00\'\nMariaDB> SELECT INTERVAL 1 DAY + \'2008-12-31\';\n -> \'2009-01-01\'\nMariaDB> SELECT \'2005-01-01\' - INTERVAL 1 SECOND;\n -> \'2004-12-31 23:59:59\'\nMariaDB> SELECT DATE_ADD(\'2000-12-31 23:59:59\',\n -> INTERVAL 1 SECOND);\n -> \'2001-01-01 00:00:00\'\nMariaDB> SELECT DATE_ADD(\'2010-12-31 23:59:59\',\n -> INTERVAL 1 DAY);\n -> \'2011-01-01 23:59:59\'\nMariaDB> SELECT DATE_ADD(\'2100-12-31 23:59:59\',\n -> INTERVAL \'1:1\' MINUTE_SECOND);\n -> \'2101-01-01 00:01:00\'\nMariaDB> SELECT DATE_SUB(\'2005-01-01 00:00:00\',\n -> INTERVAL \'1 1:1:1\' DAY_SECOND);\n -> \'2004-12-30 22:58:59\'\nMariaDB> SELECT DATE_ADD(\'1900-01-01 00:00:00\',\n -> INTERVAL \'-1 10\' DAY_HOUR);\n -> \'1899-12-30 14:00:00\'\nMariaDB> SELECT DATE_SUB(\'1998-01-02\', INTERVAL 31 DAY);\n -> \'1997-12-02\'\nMariaDB> SELECT DATE_ADD(\'1992-12-31 23:59:59.000002\',\n -> INTERVAL \'1.999999\' SECOND_MICROSECOND);\n -> \'1993-01-01 00:00:01.000001\'\n','https://mariadb.com/kb/en/date_add/'),(377,'CAST',37,'Syntax:\nCAST(expr AS type)\n\nThe CAST() function takes an expression of any type and produces a\nresult value of a specified type, similar to CONVERT(). See the\ndescription of CONVERT() for more information.\n\nURL: https://mariadb.com/kb/en/cast/\n\n','','https://mariadb.com/kb/en/cast/'),(378,'SOUNDS LIKE',37,'Syntax:\nexpr1 SOUNDS LIKE expr2\n\nThis is the same as SOUNDEX(expr1) = SOUNDEX(expr2).\n\nURL: https://mariadb.com/kb/en/sounds-like/\n\n','','https://mariadb.com/kb/en/sounds-like/'),(379,'PERIOD_DIFF',31,'Syntax:\nPERIOD_DIFF(P1,P2)\n\nReturns the number of months between periods P1 and P2. P1 and P2\nshould be in the format YYMM or YYYYMM. Note that the period arguments\nP1 and P2 are not date values.\n\nURL: https://mariadb.com/kb/en/period_diff/\n\n','MariaDB> SELECT PERIOD_DIFF(200802,200703);\n -> 11\n','https://mariadb.com/kb/en/period_diff/'),(380,'LIKE',37,'Syntax:\nexpr LIKE pat [ESCAPE \'escape_char\']\n\nPattern matching using SQL simple regular expression comparison.\nReturns 1 (TRUE) or 0 (FALSE). If either expr or pat is NULL, the\nresult is NULL.\n\nThe pattern need not be a literal string. For example, it can be\nspecified as a string expression or table column.\n\nURL: https://mariadb.com/kb/en/like/\n\n','MariaDB> SELECT \'David!\' LIKE \'David_\';\n -> 1\nMariaDB> SELECT \'David!\' LIKE \'%D%v%\';\n -> 1\n','https://mariadb.com/kb/en/like/'),(381,'MULTIPOINT',24,'MultiPoint(pt1,pt2,...)\n\nConstructs a MultiPoint value using Point or WKB Point arguments.\n\nURL: https://mariadb.com/kb/en/multipoint/\n\n','','https://mariadb.com/kb/en/multipoint/'),(382,'>>',19,'Syntax:\n>>\n\nShifts a longlong (BIGINT) number to the right.\n\nURL: https://mariadb.com/kb/en/shift-right/\n\n','MariaDB> SELECT 4 >> 2;\n -> 1\n','https://mariadb.com/kb/en/shift-right/'),(383,'FETCH',23,'Syntax:\nFETCH [[NEXT] FROM] cursor_name INTO var_name [, var_name] ...\n\nThis statement fetches the next row for the SELECT statement associated\nwith the specified cursor (which must be open), and advances the cursor\npointer. If a row exists, the fetched columns are stored in the named\nvariables. The number of columns retrieved by the SELECT statement must\nmatch the number of output variables specified in the FETCH statement.\n\nIf no more rows are available, a No Data condition occurs with SQLSTATE\nvalue \'02000\'. To detect this condition, you can set up a handler for\nit (or for a NOT FOUND condition). For an example, see\nhttps://mariadb.com/kb/en/cursor-overview/.\n\nURL: https://mariadb.com/kb/en/fetch/\n\n','','https://mariadb.com/kb/en/fetch/'),(384,'AVG',16,'Syntax:\nAVG([DISTINCT] expr)\n\nReturns the average value of expr. The DISTINCT option can be used to\nreturn the average of the distinct values of expr.\n\nAVG() returns NULL if there were no matching rows.\n\nURL: https://mariadb.com/kb/en/avg/\n\n','MariaDB> SELECT student_name, AVG(test_score)\n -> FROM student\n -> GROUP BY student_name;\n','https://mariadb.com/kb/en/avg/'),(385,'TRUE FALSE',29,'The constants TRUE and FALSE evaluate to 1 and 0, respectively. The\nconstant names can be written in any lettercase.\n\nMariaDB> SELECT TRUE, true, FALSE, false;\n -> 1, 1, 0, 0\n\nURL: https://mariadb.com/kb/en/true-false/\n\n','','https://mariadb.com/kb/en/true-false/'),(386,'MBRWITHIN',6,'MBRWithin(g1,g2)\n\nReturns 1 or 0 to indicate whether the Minimum Bounding Rectangle of g1\nis within the Minimum Bounding Rectangle of g2. This tests the opposite\nrelationship as MBRContains().\n\nURL: https://mariadb.com/kb/en/mbrwithin/\n\n','MariaDB> SET @g1 = GeomFromText(\'Polygon((0 0,0 3,3 3,3 0,0 0))\');\nMariaDB> SET @g2 = GeomFromText(\'Polygon((0 0,0 5,5 5,5 0,0 0))\');\nMariaDB> SELECT MBRWithin(@g1,@g2), MBRWithin(@g2,@g1);\n+--------------------+--------------------+\n| MBRWithin(@g1,@g2) | MBRWithin(@g2,@g1) |\n+--------------------+--------------------+\n| 1 | 0 |\n+--------------------+--------------------+\n','https://mariadb.com/kb/en/mbrwithin/'),(387,'SESSION_USER',17,'Syntax:\nSESSION_USER()\n\nSESSION_USER() is a synonym for USER().\n\nURL: https://mariadb.com/kb/en/session_user/\n\n','','https://mariadb.com/kb/en/session_user/'),(388,'IN',18,'Syntax:\nexpr IN (value,...)\n\nReturns 1 if expr is equal to any of the values in the IN list, else\nreturns 0. If all values are constants, they are evaluated according to\nthe type of expr and sorted. The search for the item then is done using\na binary search. This means IN is very quick if the IN value list\nconsists entirely of constants. Otherwise, type conversion takes place\naccording to the rules described in\nhttps://mariadb.com/kb/en/type-conversion/, but\napplied to all the arguments.\n\nURL: https://mariadb.com/kb/en/in/\n\n','MariaDB> SELECT 2 IN (0,3,5,7);\n -> 0\nMariaDB> SELECT \'wefwf\' IN (\'wee\',\'wefwf\',\'weg\');\n -> 1\n','https://mariadb.com/kb/en/in/'),(389,'QUOTE',37,'Syntax:\nQUOTE(str)\n\nQuotes a string to produce a result that can be used as a properly\nescaped data value in an SQL statement. The string is returned enclosed\nby single quotation marks and with each instance of backslash (\"\\\"),\nsingle quote (\"\'\"), ASCII NUL, and Control+Z preceded by a backslash.\nIf the argument is NULL, the return value is the word \"NULL\" without\nenclosing single quotation marks.\n\nURL: https://mariadb.com/kb/en/quote/\n\n','MariaDB> SELECT QUOTE(\'Don\\\'t!\');\n -> \'Don\\\'t!\'\nMariaDB> SELECT QUOTE(NULL);\n -> NULL\n','https://mariadb.com/kb/en/quote/'),(390,'HELP COMMAND',26,'Syntax:\nMariaDB> help search_string\n\nIf you provide an argument to the help command, mysql uses it as a\nsearch string to access server-side help from the contents of the MySQL\nReference Manual. The proper operation of this command requires that\nthe help tables in the mysql database be initialized with help topic\ninformation .\n\nIf there is no match for the search string, the search fails:\n\nMariaDB> help me\n\nNothing found\nPlease try to run \'help contents\' for a list of all accessible topics\n\nUse help contents to see a list of the help categories:\n\nMariaDB> help contents\nYou asked for help about help category: \"Contents\"\nFor more information, type \'help <item>\', where <item> is one of the\nfollowing categories:\n Account Management\n Administration\n Data Definition\n Data Manipulation\n Data Types\n Functions\n Functions and Modifiers for Use with GROUP BY\n Geographic Features\n Language Structure\n Plugins\n Storage Engines\n Stored Routines\n Table Maintenance\n Transactions\n Triggers\n\nIf the search string matches multiple items, mysql shows a list of\nmatching topics:\n\nMariaDB> help logs\nMany help items for your request exist.\nTo make a more specific request, please type \'help <item>\',\nwhere <item> is one of the following topics:\n SHOW\n SHOW BINARY LOGS\n SHOW ENGINE\n SHOW LOGS\n\nUse a topic as the search string to see the help entry for that topic:\n\nMariaDB> help show binary logs\nName: \'SHOW BINARY LOGS\'\nDescription:\nSyntax:\nSHOW BINARY LOGS\nSHOW MASTER LOGS\n\nLists the binary log files on the server. This statement is used as\npart of the procedure described in [purge-binary-logs], that shows how\nto determine which logs can be purged.\n\nMariaDB> SHOW BINARY LOGS;\n+---------------+-----------+\n| Log_name | File_size |\n+---------------+-----------+\n| binlog.000015 | 724935 |\n| binlog.000016 | 733481 |\n+---------------+-----------+\n\nURL: https://mariadb.com/kb/en/help-command/\n\n','','https://mariadb.com/kb/en/help-command/'),(391,'QUARTER',31,'Syntax:\nQUARTER(date)\n\nReturns the quarter of the year for date, in the range 1 to 4.\n\nURL: https://mariadb.com/kb/en/quarter/\n\n','MariaDB> SELECT QUARTER(\'2008-04-01\');\n -> 2\n','https://mariadb.com/kb/en/quarter/'),(392,'POSITION',37,'Syntax:\nPOSITION(substr IN str)\n\nPOSITION(substr IN str) is a synonym for LOCATE(substr,str).\n\nURL: https://mariadb.com/kb/en/position/\n\n','','https://mariadb.com/kb/en/position/'),(393,'SHOW CREATE FUNCTION',26,'Syntax:\nSHOW CREATE FUNCTION func_name\n\nThis statement is similar to SHOW CREATE PROCEDURE but for stored\nfunctions. See [HELP SHOW CREATE PROCEDURE].\n\nURL: https://mariadb.com/kb/en/show-create-function/\n\n','','https://mariadb.com/kb/en/show-create-function/'),(394,'IS_USED_LOCK',14,'Syntax:\nIS_USED_LOCK(str)\n\nChecks whether the lock named str is in use (that is, locked). If so,\nit returns the connection identifier of the client that holds the lock.\nOtherwise, it returns NULL.\n\nURL: https://mariadb.com/kb/en/is_used_lock/\n\n','','https://mariadb.com/kb/en/is_used_lock/'),(395,'POLYFROMTEXT',3,'PolyFromText(wkt[,srid]), PolygonFromText(wkt[,srid])\n\nConstructs a POLYGON value using its WKT representation and SRID.\n\nURL: https://mariadb.com/kb/en/polyfromtext/\n\n','','https://mariadb.com/kb/en/polyfromtext/'),(396,'DES_ENCRYPT',12,'Syntax:\nDES_ENCRYPT(str[,{key_num|key_str}])\n\nEncrypts the string with the given key using the Triple-DES algorithm.\n\nThis function works only if MySQL has been configured with SSL support.\nSee https://mariadb.com/kb/en/ssl-connections/.\n\nThe encryption key to use is chosen based on the second argument to\nDES_ENCRYPT(), if one was given. With no argument, the first key from\nthe DES key file is used. With a key_num argument, the given key number\n(0 to 9) from the DES key file is used. With a key_str argument, the\ngiven key string is used to encrypt str.\n\nThe key file can be specified with the --des-key-file server option.\n\nThe return string is a binary string where the first character is\nCHAR(128 | key_num). If an error occurs, DES_ENCRYPT() returns NULL.\n\nThe 128 is added to make it easier to recognize an encrypted key. If\nyou use a string key, key_num is 127.\n\nThe string length for the result is given by this formula:\n\nnew_len = orig_len + (8 - (orig_len % 8)) + 1\n\nEach line in the DES key file has the following format:\n\nkey_num des_key_str\n\nEach key_num value must be a number in the range from 0 to 9. Lines in\nthe file may be in any order. des_key_str is the string that is used to\nencrypt the message. There should be at least one space between the\nnumber and the key. The first key is the default key that is used if\nyou do not specify any key argument to DES_ENCRYPT().\n\nYou can tell MySQL to read new key values from the key file with the\nFLUSH DES_KEY_FILE statement. This requires the RELOAD privilege.\n\nOne benefit of having a set of default keys is that it gives\napplications a way to check for the existence of encrypted column\nvalues, without giving the end user the right to decrypt those values.\n\nURL: https://mariadb.com/kb/en/des_encrypt/\n\n','MariaDB> SELECT customer_address FROM customer_table \n > WHERE crypted_credit_card = DES_ENCRYPT(\'credit_card_number\');\n','https://mariadb.com/kb/en/des_encrypt/'),(397,'CEIL',4,'Syntax:\nCEIL(X)\n\nCEIL() is a synonym for CEILING().\n\nURL: https://mariadb.com/kb/en/ceil/\n\n','','https://mariadb.com/kb/en/ceil/'),(398,'LENGTH',37,'Syntax:\nLENGTH(str)\n\nReturns the length of the string str, measured in bytes. A multi-byte\ncharacter counts as multiple bytes. This means that for a string\ncontaining five 2-byte characters, LENGTH() returns 10, whereas\nCHAR_LENGTH() returns 5.\n\nURL: https://mariadb.com/kb/en/length/\n\n','MariaDB> SELECT LENGTH(\'text\');\n -> 4\n','https://mariadb.com/kb/en/length/'),(399,'STR_TO_DATE',31,'Syntax:\nSTR_TO_DATE(str,format)\n\nThis is the inverse of the DATE_FORMAT() function. It takes a string\nstr and a format string format. STR_TO_DATE() returns a DATETIME value\nif the format string contains both date and time parts, or a DATE or\nTIME value if the string contains only date or time parts. If the date,\ntime, or datetime value extracted from str is illegal, STR_TO_DATE()\nreturns NULL and produces a warning.\n\nThe server scans str attempting to match format to it. The format\nstring can contain literal characters and format specifiers beginning\nwith %. Literal characters in format must match literally in str.\nFormat specifiers in format must match a date or time part in str. For\nthe specifiers that can be used in format, see the DATE_FORMAT()\nfunction description.\n\nMariaDB> SELECT STR_TO_DATE(\'01,5,2013\',\'%d,%m,%Y\');\n -> \'2013-05-01\'\nMariaDB> SELECT STR_TO_DATE(\'May 1, 2013\',\'%M %d,%Y\');\n -> \'2013-05-01\'\n\nScanning starts at the beginning of str and fails if format is found\nnot to match. Extra characters at the end of str are ignored.\n\nMariaDB> SELECT STR_TO_DATE(\'a09:30:17\',\'a%h:%i:%s\');\n -> \'09:30:17\'\nMariaDB> SELECT STR_TO_DATE(\'a09:30:17\',\'%h:%i:%s\');\n -> NULL\nMariaDB> SELECT STR_TO_DATE(\'09:30:17a\',\'%h:%i:%s\');\n -> \'09:30:17\'\n\nUnspecified date or time parts have a value of 0, so incompletely\nspecified values in str produce a result with some or all parts set to\n0:\n\nMariaDB> SELECT STR_TO_DATE(\'abc\',\'abc\');\n -> \'0000-00-00\'\nMariaDB> SELECT STR_TO_DATE(\'9\',\'%m\');\n -> \'0000-09-00\'\nMariaDB> SELECT STR_TO_DATE(\'9\',\'%s\');\n -> \'00:00:09\'\n\nURL: https://mariadb.com/kb/en/str_to_date/\n\n','','https://mariadb.com/kb/en/str_to_date/'),(400,'Y',11,'Y(p)\n\nReturns the Y-coordinate value for the Point object p as a\ndouble-precision number.\n\nURL: https://mariadb.com/kb/en/y/\n\n','MariaDB> SELECT Y(POINT(56.7, 53.34));\n+-----------------------+\n| Y(POINT(56.7, 53.34)) |\n+-----------------------+\n| 53.34 |\n+-----------------------+\n','https://mariadb.com/kb/en/y/'),(401,'CHECKSUM TABLE',20,'Syntax:\nCHECKSUM TABLE tbl_name [, tbl_name] ... [ QUICK | EXTENDED ]\n\nCHECKSUM TABLE reports a table checksum. This statement requires the\nSELECT privilege for the table.\n\nWith QUICK, the live table checksum is reported if it is available, or\nNULL otherwise. This is very fast. A live checksum is enabled by\nspecifying the CHECKSUM=1 table option when you create the table;\ncurrently, this is supported only for MyISAM tables. See [HELP CREATE\nTABLE].\n\nWith EXTENDED, the entire table is read row by row and the checksum is\ncalculated. This can be very slow for large tables.\n\nIf neither QUICK nor EXTENDED is specified, MySQL returns a live\nchecksum if the table storage engine supports it and scans the table\notherwise.\n\nFor a nonexistent table, CHECKSUM TABLE returns NULL and generates a\nwarning.\n\nIn MySQL 5.5, CHECKSUM TABLE returns 0 for partitioned tables unless\nyou include the EXTENDED option. This issue is resolved in MySQL 5.6.\n(Bug #11933226, Bug #60681)\n\nThe checksum value depends on the table row format. If the row format\nchanges, the checksum also changes. For example, the storage format for\nVARCHAR changed between MySQL 4.1 and 5.0, so if a 4.1 table is\nupgraded to MySQL 5.0, the checksum value may change.\n\nURL: https://mariadb.com/kb/en/checksum-table/\n\n','','https://mariadb.com/kb/en/checksum-table/'),(402,'NUMINTERIORRINGS',2,'NumInteriorRings(poly)\n\nReturns the number of interior rings in the Polygon value poly.\n\nURL: https://mariadb.com/kb/en/numinteriorrings/\n\n','MariaDB> SET @poly =\n -> \'Polygon((0 0,0 3,3 3,3 0,0 0),(1 1,1 2,2 2,2 1,1 1))\';\nMariaDB> SELECT NumInteriorRings(GeomFromText(@poly));\n+---------------------------------------+\n| NumInteriorRings(GeomFromText(@poly)) |\n+---------------------------------------+\n| 1 |\n+---------------------------------------+\n','https://mariadb.com/kb/en/numinteriorrings/'),(403,'INTERIORRINGN',2,'InteriorRingN(poly,N)\n\nReturns the N-th interior ring for the Polygon value poly as a\nLineString. Rings are numbered beginning with 1.\n\nURL: https://mariadb.com/kb/en/interiorringn/\n\n','MariaDB> SET @poly =\n -> \'Polygon((0 0,0 3,3 3,3 0,0 0),(1 1,1 2,2 2,2 1,1 1))\';\nMariaDB> SELECT AsText(InteriorRingN(GeomFromText(@poly),1));\n+----------------------------------------------+\n| AsText(InteriorRingN(GeomFromText(@poly),1)) |\n+----------------------------------------------+\n| LINESTRING(1 1,1 2,2 2,2 1,1 1) |\n+----------------------------------------------+\n','https://mariadb.com/kb/en/interiorringn/'),(404,'UTC_TIME',31,'Syntax:\nUTC_TIME, UTC_TIME()\n\nReturns the current UTC time as a value in \'HH:MM:SS\' or HHMMSS.uuuuuu\nformat, depending on whether the function is used in a string or\nnumeric context.\n\nURL: https://mariadb.com/kb/en/utc_time/\n\n','MariaDB> SELECT UTC_TIME(), UTC_TIME() + 0;\n -> \'18:07:53\', 180753.000000\n','https://mariadb.com/kb/en/utc_time/'),(405,'DROP FUNCTION',39,'The DROP FUNCTION statement is used to drop stored functions and\nuser-defined functions (UDFs):\n\no For information about dropping stored functions, see [HELP DROP\n PROCEDURE].\n\no For information about dropping user-defined functions, see [HELP DROP\n FUNCTION UDF].\n\nURL: https://mariadb.com/kb/en/drop-function/\n\n','','https://mariadb.com/kb/en/drop-function/'),(406,'ALTER EVENT',39,'Syntax:\nALTER\n [DEFINER = { user | CURRENT_USER }]\n EVENT event_name\n [ON SCHEDULE schedule]\n [ON COMPLETION [NOT] PRESERVE]\n [RENAME TO new_event_name]\n [ENABLE | DISABLE | DISABLE ON SLAVE]\n [COMMENT \'comment\']\n [DO event_body]\n\nThe ALTER EVENT statement changes one or more of the characteristics of\nan existing event without the need to drop and recreate it. The syntax\nfor each of the DEFINER, ON SCHEDULE, ON COMPLETION, COMMENT, ENABLE /\nDISABLE, and DO clauses is exactly the same as when used with CREATE\nEVENT. (See [HELP CREATE EVENT].)\n\nAny user can alter an event defined on a database for which that user\nhas the EVENT privilege. When a user executes a successful ALTER EVENT\nstatement, that user becomes the definer for the affected event.\n\nALTER EVENT works only with an existing event:\n\nMariaDB> ALTER EVENT no_such_event \n > ON SCHEDULE \n > EVERY \'2:3\' DAY_HOUR;\nERROR 1517 (HY000): Unknown event \'no_such_event\'\n\nURL: https://mariadb.com/kb/en/alter-event/\n\n','','https://mariadb.com/kb/en/alter-event/'),(407,'STDDEV',16,'Syntax:\nSTDDEV(expr)\n\nReturns the population standard deviation of expr. This function is\nprovided for compatibility with Oracle. The standard SQL function\nSTDDEV_POP() can be used instead.\n\nThis function returns NULL if there were no matching rows.\n\nURL: https://mariadb.com/kb/en/stddev/\n\n','','https://mariadb.com/kb/en/stddev/'),(408,'DATE_SUB',31,'Syntax:\nDATE_SUB(date,INTERVAL expr unit)\n\nSee the description for DATE_ADD().\n\nURL: https://mariadb.com/kb/en/date_sub/\n\n','','https://mariadb.com/kb/en/date_sub/'),(409,'PERIOD_ADD',31,'Syntax:\nPERIOD_ADD(P,N)\n\nAdds N months to period P (in the format YYMM or YYYYMM). Returns a\nvalue in the format YYYYMM. Note that the period argument P is not a\ndate value.\n\nURL: https://mariadb.com/kb/en/period_add/\n\n','MariaDB> SELECT PERIOD_ADD(200801,2);\n -> 200803\n','https://mariadb.com/kb/en/period_add/'),(410,'|',19,'Syntax:\n|\n\nBitwise OR:\n\nURL: https://mariadb.com/kb/en/bitwise-or/\n\n','MariaDB> SELECT 29 | 15;\n -> 31\n','https://mariadb.com/kb/en/bitwise-or/'),(411,'GEOMFROMTEXT',3,'GeomFromText(wkt[,srid]), GeometryFromText(wkt[,srid])\n\nConstructs a geometry value of any type using its WKT representation\nand SRID.\n\nURL: https://mariadb.com/kb/en/geomfromtext/\n\n','','https://mariadb.com/kb/en/geomfromtext/'),(412,'UUID_SHORT',14,'Syntax:\nUUID_SHORT()\n\nReturns a \"short\" universal identifier as a 64-bit unsigned integer\n(rather than a string-form 128-bit identifier as returned by the UUID()\nfunction).\n\nThe value of UUID_SHORT() is guaranteed to be unique if the following\nconditions hold:\n\no The server_id of the current host is unique among your set of master\n and slave servers\n\no server_id is between 0 and 255\n\no You do not set back your system time for your server between mysqld\n restarts\n\no You do not invoke UUID_SHORT() on average more than 16 million times\n per second between mysqld restarts\n\nThe UUID_SHORT() return value is constructed this way:\n\n (server_id & 255) << 56\n+ (server_startup_time_in_seconds << 24)\n+ incremented_variable++;\n\nURL: https://mariadb.com/kb/en/uuid_short/\n\n','MariaDB> SELECT UUID_SHORT();\n -> 92395783831158784\n','https://mariadb.com/kb/en/uuid_short/'),(413,'RIGHT',37,'Syntax:\nRIGHT(str,len)\n\nReturns the rightmost len characters from the string str, or NULL if\nany argument is NULL.\n\nURL: https://mariadb.com/kb/en/right/\n\n','MariaDB> SELECT RIGHT(\'foobarbar\', 4);\n -> \'rbar\'\n','https://mariadb.com/kb/en/right/'),(414,'DATEDIFF',31,'Syntax:\nDATEDIFF(expr1,expr2)\n\nDATEDIFF() returns expr1 - expr2 expressed as a value in days from one\ndate to the other. expr1 and expr2 are date or date-and-time\nexpressions. Only the date parts of the values are used in the\ncalculation.\n\nURL: https://mariadb.com/kb/en/datediff/\n\n','MariaDB> SELECT DATEDIFF(\'2007-12-31 23:59:59\',\'2007-12-30\');\n -> 1\nMariaDB> SELECT DATEDIFF(\'2010-11-30 23:59:59\',\'2010-12-31\');\n -> -31\n','https://mariadb.com/kb/en/datediff/'),(415,'DROP TABLESPACE',39,'Syntax:\nDROP TABLESPACE tablespace_name\n ENGINE [=] engine_name\n\nThis statement is used with NDB cluster, which is not supported by MariaDB.\n\nURL: https://mariadb.com/kb/en/drop-tablespace/\n\n','','https://mariadb.com/kb/en/drop-tablespace/'),(416,'DROP PROCEDURE',39,'Syntax:\nDROP {PROCEDURE | FUNCTION} [IF EXISTS] sp_name\n\nThis statement is used to drop a stored procedure or function. That is,\nthe specified routine is removed from the server. You must have the\nALTER ROUTINE privilege for the routine. (If the\nautomatic_sp_privileges system variable is enabled, that privilege and\nEXECUTE are granted automatically to the routine creator when the\nroutine is created and dropped from the creator when the routine is\ndropped. See\nhttps://mariadb.com/kb/en/stored-routine-privileges/.\n)\n\nThe IF EXISTS clause is a MySQL extension. It prevents an error from\noccurring if the procedure or function does not exist. A warning is\nproduced that can be viewed with SHOW WARNINGS.\n\nURL: https://mariadb.com/kb/en/drop-procedure/\n\n','','https://mariadb.com/kb/en/drop-procedure/'),(417,'CHECK TABLE',20,'Syntax:\nCHECK TABLE tbl_name [, tbl_name] ... [option] ...\n\noption = {FOR UPGRADE | QUICK | FAST | MEDIUM | EXTENDED | CHANGED}\n\nCHECK TABLE checks a table or tables for errors. CHECK TABLE works for\nInnoDB, MyISAM, ARCHIVE, and CSV tables. For MyISAM tables, the key\nstatistics are updated as well.\n\nTo check a table, you must have some privilege for it.\n\nCHECK TABLE can also check views for problems, such as tables that are\nreferenced in the view definition that no longer exist.\n\nCHECK TABLE is supported for partitioned tables, and you can use ALTER\nTABLE ... CHECK PARTITION to check one or more partitions; for more\ninformation, see [HELP ALTER TABLE].\n\nURL: https://mariadb.com/kb/en/sql-commands-check-table/\n\n','','https://mariadb.com/kb/en/sql-commands-check-table/'),(418,'BIN',37,'Syntax:\nBIN(N)\n\nReturns a string representation of the binary value of N, where N is a\nlonglong (BIGINT) number. This is equivalent to CONV(N,10,2). Returns\nNULL if N is NULL.\n\nURL: https://mariadb.com/kb/en/bin/\n\n','MariaDB> SELECT BIN(12);\n -> \'1100\'\n','https://mariadb.com/kb/en/bin/'),(419,'INSTALL PLUGIN',5,'Syntax:\nINSTALL PLUGIN plugin_name SONAME \'shared_library_name\'\n\nThis statement installs a server plugin. It requires the INSERT\nprivilege for the mysql.plugin table.\n\nplugin_name is the name of the plugin as defined in the plugin\ndescriptor structure contained in the library file (see\nhttp://dev.mysql.com/doc/refman/5.5/en/plugin-data-structures.html).\nPlugin names are not case sensitive. For maximal compatibility, plugin\nnames should be limited to ASCII letters, digits, and underscore\nbecause they are used in C source files, shell command lines, M4 and\nBourne shell scripts, and SQL environments.\n\nshared_library_name is the name of the shared library that contains the\nplugin code. The name includes the file name extension (for example,\nlibmyplugin.so, libmyplugin.dll, or libmyplugin.dylib).\n\nThe shared library must be located in the plugin directory (the\ndirectory named by the plugin_dir system variable). The library must be\nin the plugin directory itself, not in a subdirectory. By default,\nplugin_dir is the plugin directory under the directory named by the\npkglibdir configuration variable, but it can be changed by setting the\nvalue of plugin_dir at server startup. For example, set its value in a\nmy.cnf file:\n\n[mysqld]\nplugin_dir=/path/to/plugin/directory\n\nIf the value of plugin_dir is a relative path name, it is taken to be\nrelative to the MySQL base directory (the value of the basedir system\nvariable).\n\nINSTALL PLUGIN loads and initializes the plugin code to make the plugin\navailable for use. A plugin is initialized by executing its\ninitialization function, which handles any setup that the plugin must\nperform before it can be used. When the server shuts down, it executes\nthe deinitialization function for each plugin that is loaded so that\nthe plugin has a change to perform any final cleanup.\n\nINSTALL PLUGIN also registers the plugin by adding a line that\nindicates the plugin name and library file name to the mysql.plugin\ntable. At server startup, the server loads and initializes any plugin\nthat is listed in the mysql.plugin table. This means that a plugin is\ninstalled with INSTALL PLUGIN only once, not every time the server\nstarts. Plugin loading at startup does not occur if the server is\nstarted with the --skip-grant-tables option.\n\nA plugin library can contain multiple plugins. For each of them to be\ninstalled, use a separate INSTALL PLUGIN statement. Each statement\nnames a different plugin, but all of them specify the same library\nname.\n\nURL: https://mariadb.com/kb/en/install-plugin/\n\n','','https://mariadb.com/kb/en/install-plugin/'),(420,'DECLARE CURSOR',23,'Syntax:\nDECLARE cursor_name CURSOR FOR select_statement\n\nThis statement declares a cursor and associates it with a SELECT\nstatement that retrieves the rows to be traversed by the cursor. To\nfetch the rows later, use a FETCH statement. The number of columns\nretrieved by the SELECT statement must match the number of output\nvariables specified in the FETCH statement.\n\nThe SELECT statement cannot have an INTO clause.\n\nCursor declarations must appear before handler declarations and after\nvariable and condition declarations.\n\nA stored program may contain multiple cursor declarations, but each\ncursor declared in a given block must have a unique name. For an\nexample, see https://mariadb.com/kb/en/programmatic-and-compound-statements-cursors/.\n\nFor information available through SHOW statements, it is possible in\nmany cases to obtain equivalent information by using a cursor with an\nINFORMATION_SCHEMA table.\n\nURL: https://mariadb.com/kb/en/declare-cursor/\n\n','','https://mariadb.com/kb/en/declare-cursor/'),(421,'LOAD DATA',27,'Syntax:\nLOAD DATA [LOW_PRIORITY | CONCURRENT] [LOCAL] INFILE \'file_name\'\n [REPLACE | IGNORE]\n INTO TABLE tbl_name\n [CHARACTER SET charset_name]\n [{FIELDS | COLUMNS}\n [TERMINATED BY \'string\']\n [[OPTIONALLY] ENCLOSED BY \'char\']\n [ESCAPED BY \'char\']\n ]\n [LINES\n [STARTING BY \'string\']\n [TERMINATED BY \'string\']\n ]\n [IGNORE number {LINES | ROWS}]\n [(col_name_or_user_var,...)]\n [SET col_name = expr,...]\n\nThe LOAD DATA INFILE statement reads rows from a text file into a table\nat a very high speed. The file name must be given as a literal string.\n\nLOAD DATA INFILE is the complement of SELECT ... INTO OUTFILE. (See\nhttps://mariadb.com/kb/en/select-into/.) To write data\nfrom a table to a file, use SELECT ... INTO OUTFILE. To read the file\nback into a table, use LOAD DATA INFILE. The syntax of the FIELDS and\nLINES clauses is the same for both statements. Both clauses are\noptional, but FIELDS must precede LINES if both are specified.\n\nFor more information about the efficiency of INSERT versus LOAD DATA\nINFILE and speeding up LOAD DATA INFILE, see\nhttp://dev.mysql.com/doc/refman/5.5/en/insert-speed.html.\n\nThe character set indicated by the character_set_database system\nvariable is used to interpret the information in the file. SET NAMES\nand the setting of character_set_client do not affect interpretation of\ninput. If the contents of the input file use a character set that\ndiffers from the default, it is usually preferable to specify the\ncharacter set of the file by using the CHARACTER SET clause. A\ncharacter set of binary specifies \"no conversion.\"\n\nLOAD DATA INFILE interprets all fields in the file as having the same\ncharacter set, regardless of the data types of the columns into which\nfield values are loaded. For proper interpretation of file contents,\nyou must ensure that it was written with the correct character set. For\nexample, if you write a data file with mysqldump -T or by issuing a\nSELECT ... INTO OUTFILE statement in mysql, be sure to use a\n--default-character-set option with mysqldump or mysql so that output\nis written in the character set to be used when the file is loaded with\nLOAD DATA INFILE.\n\n*Note*: It is not possible to load data files that use the ucs2, utf16,\nor utf32 character set.\n\nThe character_set_filesystem system variable controls the\ninterpretation of the file name.\n\nYou can also load data files by using the mysqlimport utility; it\noperates by sending a LOAD DATA INFILE statement to the server. The\n--local option causes mysqlimport to read data files from the client\nhost. You can specify the --compress option to get better performance\nover slow networks if the client and server support the compressed\nprotocol. See https://mariadb.com/kb/en/mysqlimport/.\n\nIf you use LOW_PRIORITY, execution of the LOAD DATA statement is\ndelayed until no other clients are reading from the table. This affects\nonly storage engines that use only table-level locking (such as MyISAM,\nMEMORY, and MERGE).\n\nIf you specify CONCURRENT with a MyISAM table that satisfies the\ncondition for concurrent inserts (that is, it contains no free blocks\nin the middle), other threads can retrieve data from the table while\nLOAD DATA is executing. Using this option affects the performance of\nLOAD DATA a bit, even if no other thread is using the table at the same\ntime.\n\nPrior to MySQL 5.5.1, CONCURRENT was not replicated when using\nstatement-based replication (see Bug #34628). However, it is replicated\nwhen using row-based replication, regardless of the version. See\nhttp://dev.mysql.com/doc/refman/5.5/en/replication-features-load-data.h\ntml, for more information.\n\nThe LOCAL keyword, if specified, is interpreted with respect to the\nclient end of the connection:\n\no If LOCAL is specified, the file is read by the client program on the\n client host and sent to the server. The file can be given as a full\n path name to specify its exact location. If given as a relative path\n name, the name is interpreted relative to the directory in which the\n client program was started.\n\n When using LOCAL with LOAD DATA, a copy of the file is created in the\n server\'s temporary directory. This is not the directory determined by\n the value of tmpdir or slave_load_tmpdir, but rather the operating\n system\'s temporary directory, and is not configurable in the MySQL\n Server. (Typically the system temporary directory is /tmp on Linux\n systems and C:\\WINDOWS\\TEMP on Windows.) Lack of sufficient space for\n the copy in this directory can cause the LOAD DATA LOCAL statement to\n fail.\n\no If LOCAL is not specified, the file must be located on the server\n host and is read directly by the server. The server uses the\n following rules to locate the file:\n\n o If the file name is an absolute path name, the server uses it as\n given.\n\n o If the file name is a relative path name with one or more leading\n components, the server searches for the file relative to the\n server\'s data directory.\n\n o If a file name with no leading components is given, the server\n looks for the file in the database directory of the default\n database.\n\nNote that, in the non-LOCAL case, these rules mean that a file named as\n./myfile.txt is read from the server\'s data directory, whereas the file\nnamed as myfile.txt is read from the database directory of the default\ndatabase. For example, if db1 is the default database, the following\nLOAD DATA statement reads the file data.txt from the database directory\nfor db1, even though the statement explicitly loads the file into a\ntable in the db2 database:\n\nLOAD DATA INFILE \'data.txt\' INTO TABLE db2.my_table;\n\nWindows path names are specified using forward slashes rather than\nbackslashes. If you do use backslashes, you must double them.\n\nFor security reasons, when reading text files located on the server,\nthe files must either reside in the database directory or be readable\nby all. Also, to use LOAD DATA INFILE on server files, you must have\nthe FILE privilege. See\nhttps://mariadb.com/kb/en/grant/. For\nnon-LOCAL load operations, if the secure_file_priv system variable is\nset to a nonempty directory name, the file to be loaded must be located\nin that directory.\n\nURL: https://mariadb.com/kb/en/load-data-infile/\n\n','','https://mariadb.com/kb/en/load-data-infile/'),(422,'MULTILINESTRING',24,'MultiLineString(ls1,ls2,...)\n\nConstructs a MultiLineString value using LineString or WKB LineString\narguments.\n\nURL: https://mariadb.com/kb/en/multilinestring/\n\n','','https://mariadb.com/kb/en/multilinestring/'),(423,'LOCALTIME',31,'Syntax:\nLOCALTIME, LOCALTIME()\n\nLOCALTIME and LOCALTIME() are synonyms for NOW().\n\nURL: https://mariadb.com/kb/en/localtime/\n\n','','https://mariadb.com/kb/en/localtime/'),(424,'SHOW RELAYLOG EVENTS',26,'Syntax:\nSHOW RELAYLOG EVENTS\n [IN \'log_name\'] [FROM pos] [LIMIT [offset,] row_count]\n\nShows the events in the relay log of a replication slave. If you do not\nspecify \'log_name\', the first relay log is displayed. This statement\nhas no effect on the master.\n\nURL: https://mariadb.com/kb/en/show-relaylog-events/\n\n','','https://mariadb.com/kb/en/show-relaylog-events/'),(425,'MPOINTFROMTEXT',3,'MPointFromText(wkt[,srid]), MultiPointFromText(wkt[,srid])\n\nConstructs a MULTIPOINT value using its WKT representation and SRID.\n\nURL: https://mariadb.com/kb/en/mpointfromtext/\n\n','','https://mariadb.com/kb/en/mpointfromtext/'),(426,'BLOB',22,'BLOB[(M)]\n\nA BLOB column with a maximum length of 65,535 (216 - 1) bytes. Each\nBLOB value is stored using a 2-byte length prefix that indicates the\nnumber of bytes in the value.\n\nAn optional length M can be given for this type. If this is done, MySQL\ncreates the column as the smallest BLOB type large enough to hold\nvalues M bytes long.\n\nURL: https://mariadb.com/kb/en/blob/\n\n','','https://mariadb.com/kb/en/blob/'),(427,'SHA1',12,'Syntax:\nSHA1(str), SHA(str)\n\nCalculates an SHA-1 160-bit checksum for the string, as described in\nRFC 3174 (Secure Hash Algorithm). The value is returned as a string of\n40 hex digits, or NULL if the argument was NULL. One of the possible\nuses for this function is as a hash key. See the notes at the beginning\nof this section about storing hash values efficiently. You can also use\nSHA1() as a cryptographic function for storing passwords. SHA() is\nsynonymous with SHA1().\n\nAs of MySQL 5.5.3, the return value is a nonbinary string in the\nconnection character set. Before 5.5.3, the return value is a binary\nstring; see the notes at the beginning of this section about using the\nvalue as a nonbinary string.\n\nURL: https://mariadb.com/kb/en/sha1/\n\n','MariaDB> SELECT SHA1(\'abc\');\n -> \'a9993e364706816aba3e25717850c26c9cd0d89d\'\n','https://mariadb.com/kb/en/sha1/'),(428,'SUBSTR',37,'Syntax:\nSUBSTR(str,pos), SUBSTR(str FROM pos), SUBSTR(str,pos,len), SUBSTR(str\nFROM pos FOR len)\n\nSUBSTR() is a synonym for SUBSTRING().\n\nURL: https://mariadb.com/kb/en/substr/\n\n','','https://mariadb.com/kb/en/substr/'),(429,'PASSWORD',12,'Syntax:\nPASSWORD(str)\n\nCalculates and returns a hashed password string from the plaintext\npassword str and returns a nonbinary string in the connection character\nset (a binary string before MySQL 5.5.3), or NULL if the argument is\nNULL. This function is the SQL interface to the algorithm used by the\nserver to encrypt MySQL passwords for storage in the mysql.user grant\ntable.\n\nThe password hashing method used by PASSWORD() depends on the value of\nthe old_passwords system variable:\n\nURL: https://mariadb.com/kb/en/password/\n\n','MariaDB> SET old_passwords = 0;\nMariaDB> SELECT PASSWORD(\'mypass\');\n+-------------------------------------------+\n| PASSWORD(\'mypass\') |\n+-------------------------------------------+\n| *6C8989366EAF75BB670AD8EA7A7FC1176A95CEF4 |\n+-------------------------------------------+\n\nMariaDB> SET old_passwords = 1;\nMariaDB> SELECT PASSWORD(\'mypass\');\n+--------------------+\n| PASSWORD(\'mypass\') |\n+--------------------+\n| 6f8c114b58f2ce9e |\n+--------------------+\n','https://mariadb.com/kb/en/password/'),(430,'CHAR',22,'[NATIONAL] CHAR[(M)] [CHARACTER SET charset_name] [COLLATE\ncollation_name]\n\nA fixed-length string that is always right-padded with spaces to the\nspecified length when stored. M represents the column length in\ncharacters. The range of M is 0 to 255. If M is omitted, the length is\n1.\n\n*Note*: Trailing spaces are removed when CHAR values are retrieved\nunless the PAD_CHAR_TO_FULL_LENGTH SQL mode is enabled.\n\nURL: https://mariadb.com/kb/en/char/\n\n','','https://mariadb.com/kb/en/char/'),(431,'UTC_DATE',31,'Syntax:\nUTC_DATE, UTC_DATE()\n\nReturns the current UTC date as a value in \'YYYY-MM-DD\' or YYYYMMDD\nformat, depending on whether the function is used in a string or\nnumeric context.\n\nURL: https://mariadb.com/kb/en/utc_date/\n\n','MariaDB> SELECT UTC_DATE(), UTC_DATE() + 0;\n -> \'2003-08-14\', 20030814\n','https://mariadb.com/kb/en/utc_date/'),(432,'DIMENSION',36,'Dimension(g)\n\nReturns the inherent dimension of the geometry value g. The result can\nbe -1, 0, 1, or 2. The meaning of these values is given in\nhttps://mariadb.com/kb/en/dimension/.\n\nURL: https://mariadb.com/kb/en/dimension/\n\n','MariaDB> SELECT Dimension(GeomFromText(\'LineString(1 1,2 2)\'));\n+------------------------------------------------+\n| Dimension(GeomFromText(\'LineString(1 1,2 2)\')) |\n+------------------------------------------------+\n| 1 |\n+------------------------------------------------+\n','https://mariadb.com/kb/en/dimension/'),(433,'COUNT DISTINCT',16,'Syntax:\nCOUNT(DISTINCT expr,[expr...])\n\nReturns a count of the number of rows with different non-NULL expr\nvalues.\n\nCOUNT(DISTINCT) returns 0 if there were no matching rows.\n\nURL: https://mariadb.com/kb/en/count-distinct/\n\n','MariaDB> SELECT COUNT(DISTINCT results) FROM student;\n','https://mariadb.com/kb/en/count-distinct/'),(434,'BIT',22,'BIT[(M)]\n\nA bit-field type. M indicates the number of bits per value, from 1 to\n64. The default is 1 if M is omitted.\n\nURL: https://mariadb.com/kb/en/bit/\n\n','','https://mariadb.com/kb/en/bit/'),(435,'EQUALS',30,'Equals(g1,g2)\n\nReturns 1 or 0 to indicate whether g1 is spatially equal to g2.\n\nURL: https://mariadb.com/kb/en/equals/\n\n','','https://mariadb.com/kb/en/equals/'),(436,'SHOW CREATE VIEW',26,'Syntax:\nSHOW CREATE VIEW view_name\n\nThis statement shows a CREATE VIEW statement that creates the given\nview.\n\nURL: https://mariadb.com/kb/en/show-create-view/\n\n','','https://mariadb.com/kb/en/show-create-view/'),(437,'INTERVAL',18,'Syntax:\nINTERVAL(N,N1,N2,N3,...)\n\nReturns 0 if N < N1, 1 if N < N2 and so on or -1 if N is NULL. All\narguments are treated as integers. It is required that N1 < N2 < N3 <\n... < Nn for this function to work correctly. This is because a binary\nsearch is used (very fast).\n\nURL: https://mariadb.com/kb/en/interval/\n\n','MariaDB> SELECT INTERVAL(23, 1, 15, 17, 30, 44, 200);\n -> 3\nMariaDB> SELECT INTERVAL(10, 1, 10, 100, 1000);\n -> 2\nMariaDB> SELECT INTERVAL(22, 23, 30, 44, 200);\n -> 0\n','https://mariadb.com/kb/en/interval/'),(438,'FROM_DAYS',31,'Syntax:\nFROM_DAYS(N)\n\nGiven a day number N, returns a DATE value.\n\nURL: https://mariadb.com/kb/en/from_days/\n\n','MariaDB> SELECT FROM_DAYS(730669);\n -> \'2007-07-03\'\n','https://mariadb.com/kb/en/from_days/'),(439,'ALTER PROCEDURE',39,'Syntax:\nALTER PROCEDURE proc_name [characteristic ...]\n\ncharacteristic:\n COMMENT \'string\'\n | LANGUAGE SQL\n | { CONTAINS SQL | NO SQL | READS SQL DATA | MODIFIES SQL DATA }\n | SQL SECURITY { DEFINER | INVOKER }\n\nThis statement can be used to change the characteristics of a stored\nprocedure. More than one change may be specified in an ALTER PROCEDURE\nstatement. However, you cannot change the parameters or body of a\nstored procedure using this statement; to make such changes, you must\ndrop and re-create the procedure using DROP PROCEDURE and CREATE\nPROCEDURE.\n\nYou must have the ALTER ROUTINE privilege for the procedure. By\ndefault, that privilege is granted automatically to the procedure\ncreator. This behavior can be changed by disabling the\nautomatic_sp_privileges system variable. See\nhttps://mariadb.com/kb/en/stored-routine-privileges/.\n\nURL: https://mariadb.com/kb/en/alter-procedure/\n\n','','https://mariadb.com/kb/en/alter-procedure/'),(440,'BIT_COUNT',19,'Syntax:\nBIT_COUNT(N)\n\nReturns the number of bits that are set in the argument N.\n\nURL: https://mariadb.com/kb/en/bit_count/\n\n','MariaDB> SELECT BIT_COUNT(29), BIT_COUNT(b\'101010\');\n -> 4, 3\n','https://mariadb.com/kb/en/bit_count/'),(441,'OCTET_LENGTH',37,'Syntax:\nOCTET_LENGTH(str)\n\nOCTET_LENGTH() is a synonym for LENGTH().\n\nURL: https://mariadb.com/kb/en/octet_length/\n\n','','https://mariadb.com/kb/en/octet_length/'),(442,'UTC_TIMESTAMP',31,'Syntax:\nUTC_TIMESTAMP, UTC_TIMESTAMP()\n\nReturns the current UTC date and time as a value in \'YYYY-MM-DD\nHH:MM:SS\' or YYYYMMDDHHMMSS.uuuuuu format, depending on whether the\nfunction is used in a string or numeric context.\n\nURL: https://mariadb.com/kb/en/utc_timestamp/\n\n','MariaDB> SELECT UTC_TIMESTAMP(), UTC_TIMESTAMP() + 0;\n -> \'2003-08-14 18:08:04\', 20030814180804.000000\n','https://mariadb.com/kb/en/utc_timestamp/'),(443,'AES_ENCRYPT',12,'Syntax:\nAES_ENCRYPT(str,key_str)\n\nAES_ENCRYPT() and AES_DECRYPT() enable encryption and decryption of\ndata using the official AES (Advanced Encryption Standard) algorithm,\npreviously known as \"Rijndael.\" Encoding with a 128-bit key length is\nused, but you can extend it up to 256 bits by modifying the source. We\nchose 128 bits because it is much faster and it is secure enough for\nmost purposes.\n\nAES_ENCRYPT() encrypts a string and returns a binary string.\nAES_DECRYPT() decrypts the encrypted string and returns the original\nstring. The input arguments may be any length. If either argument is\nNULL, the result of this function is also NULL.\n\nBecause AES is a block-level algorithm, padding is used to encode\nuneven length strings and so the result string length may be calculated\nusing this formula:\n\n16 * (trunc(string_length / 16) + 1)\n\nIf AES_DECRYPT() detects invalid data or incorrect padding, it returns\nNULL. However, it is possible for AES_DECRYPT() to return a non-NULL\nvalue (possibly garbage) if the input data or the key is invalid.\n\nYou can use the AES functions to store data in an encrypted form by\nmodifying your queries:\n\nURL: https://mariadb.com/kb/en/aes_encrypt/\n\n','INSERT INTO t VALUES (1,AES_ENCRYPT(\'text\',\'password\'));\n','https://mariadb.com/kb/en/aes_encrypt/'),(444,'+',4,'Syntax:\n+\n\nAddition:\n\nURL: https://mariadb.com/kb/en/addition-operator/\n\n','MariaDB> SELECT 3+5;\n -> 8\n','https://mariadb.com/kb/en/addition-operator/'),(445,'INET_NTOA',14,'Syntax:\nINET_NTOA(expr)\n\nGiven a numeric IPv4 network address in network byte order, returns the\ndotted-quad representation of the address as a string. INET_NTOA()\nreturns NULL if it does not understand its argument.\n\nAs of MySQL 5.5.3, the return value is a nonbinary string in the\nconnection character set. Before 5.5.3, the return value is a binary\nstring.\n\nURL: https://mariadb.com/kb/en/inet_ntoa/\n\n','MariaDB> SELECT INET_NTOA(167773449);\n -> \'10.0.5.9\'\n','https://mariadb.com/kb/en/inet_ntoa/'),(446,'ACOS',4,'Syntax:\nACOS(X)\n\nReturns the arc cosine of X, that is, the value whose cosine is X.\nReturns NULL if X is not in the range -1 to 1.\n\nURL: https://mariadb.com/kb/en/acos/\n\n','MariaDB> SELECT ACOS(1);\n -> 0\nMariaDB> SELECT ACOS(1.0001);\n -> NULL\nMariaDB> SELECT ACOS(0);\n -> 1.5707963267949\n','https://mariadb.com/kb/en/acos/'),(447,'ISOLATION',8,'Syntax:\nSET [GLOBAL | SESSION] TRANSACTION ISOLATION LEVEL\n {\n REPEATABLE READ\n | READ COMMITTED\n | READ UNCOMMITTED\n | SERIALIZABLE\n }\n\nThis statement sets the transaction isolation level, used for\noperations on InnoDB tables.\n\nScope of the Isolation Level\n\nYou can set the isolation level globally, for the current session, or\nfor the next transaction:\n\no With the GLOBAL keyword, the statement sets the default transaction\n level globally for all subsequent sessions. Existing sessions are\n unaffected.\n\no With the SESSION keyword, the statement sets the default transaction\n level for all subsequent transactions performed within the current\n session.\n\no Without any SESSION or GLOBAL keyword, the statement sets the\n isolation level for the next (not started) transaction performed\n within the current session.\n\nA change to the global default isolation level requires the SUPER\nprivilege. Any session is free to change its session isolation level\n(even in the middle of a transaction), or the isolation level for its\nnext transaction.\n\nSET TRANSACTION ISOLATION LEVEL without GLOBAL or SESSION is not\npermitted while there is an active transaction:\n\nMariaDB> START TRANSACTION;\nQuery OK, 0 rows affected (0.02 sec)\n\nMariaDB> SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;\nERROR 1568 (25001): Transaction isolation level can\'t be changed\nwhile a transaction is in progress\n\nTo set the global default isolation level at server startup, use the\n--transaction-isolation=level option to mysqld on the command line or\nin an option file. Values of level for this option use dashes rather\nthan spaces, so the permissible values are READ-UNCOMMITTED,\nREAD-COMMITTED, REPEATABLE-READ, or SERIALIZABLE. For example, to set\nthe default isolation level to REPEATABLE READ, use these lines in the\n[mysqld] section of an option file:\n\n[mysqld]\ntransaction-isolation = REPEATABLE-READ\n\nIt is possible to check or set the global and session transaction\nisolation levels at runtime by using the tx_isolation system variable:\n\nSELECT @@GLOBAL.tx_isolation, @@tx_isolation;\nSET GLOBAL tx_isolation=\'REPEATABLE-READ\';\nSET SESSION tx_isolation=\'SERIALIZABLE\';\n\nDetails and Usage of Isolation Levels\n\nInnoDB supports each of the transaction isolation levels described here\nusing different locking strategies. You can enforce a high degree of\nconsistency with the default REPEATABLE READ level, for operations on\ncrucial data where ACID compliance is important. Or you can relax the\nconsistency rules with READ COMMITTED or even READ UNCOMMITTED, in\nsituations such as bulk reporting where precise consistency and\nrepeatable results are less important than minimizing the amount of\noverhead for locking. SERIALIZABLE enforces even stricter rules than\nREPEATABLE READ, and is used mainly in specialized situations, such as\nwith XA transactions and for troubleshooting issues with concurrency\nand deadlocks.\n\nFor full information about how these isolation levels work with InnoDB\ntransactions, see\nhttp://dev.mysql.com/doc/refman/5.1/en/innodb-transaction-model.html.\nIn particular, for additional information about InnoDB record-level\nlocks and how it uses them to execute various types of statements, see\nhttp://dev.mysql.com/doc/refman/5.5/en/innodb-record-level-locks.html\nand http://dev.mysql.com/doc/refman/5.5/en/innodb-locks-set.html.\n\nThe following list describes how MySQL supports the different\ntransaction levels. The list goes from the most commonly used level to\nthe least used.\n\no REPEATABLE READ\n\n This is the default isolation level for InnoDB. For consistent reads,\n there is an important difference from the READ COMMITTED isolation\n level: All consistent reads within the same transaction read the\n snapshot established by the first read. This convention means that if\n you issue several plain (nonlocking) SELECT statements within the\n same transaction, these SELECT statements are consistent also with\n respect to each other. See\n http://dev.mysql.com/doc/refman/5.5/en/innodb-consistent-read.html.\n\n For locking reads (SELECT with FOR UPDATE or LOCK IN SHARE MODE),\n UPDATE, and DELETE statements, locking depends on whether the\n statement uses a unique index with a unique search condition, or a\n range-type search condition. For a unique index with a unique search\n condition, InnoDB locks only the index record found, not the gap\n before it. For other search conditions, InnoDB locks the index range\n scanned, using gap locks or next-key (gap plus index-record) locks to\n block insertions by other sessions into the gaps covered by the\n range.\n\no READ COMMITTED\n\n A somewhat Oracle-like isolation level with respect to consistent\n (nonlocking) reads: Each consistent read, even within the same\n transaction, sets and reads its own fresh snapshot. See\n http://dev.mysql.com/doc/refman/5.5/en/innodb-consistent-read.html.\n\n For locking reads (SELECT with FOR UPDATE or LOCK IN SHARE MODE),\n InnoDB locks only index records, not the gaps before them, and thus\n permits the free insertion of new records next to locked records. For\n UPDATE and DELETE statements, locking depends on whether the\n statement uses a unique index with a unique search condition (such as\n WHERE id = 100), or a range-type search condition (such as WHERE id >\n 100). For a unique index with a unique search condition, InnoDB locks\n only the index record found, not the gap before it. For range-type\n searches, InnoDB locks the index range scanned, using gap locks or\n next-key (gap plus index-record) locks to block insertions by other\n sessions into the gaps covered by the range. This is necessary\n because \"phantom rows\" must be blocked for MySQL replication and\n recovery to work.\n\n *Note*: In MySQL 5.5, if the READ COMMITTED isolation level is used\n or the innodb_locks_unsafe_for_binlog system variable is enabled,\n there is no InnoDB gap locking except for foreign-key constraint\n checking and duplicate-key checking. Also, record locks for\n nonmatching rows are released after MySQL has evaluated the WHERE\n condition. If you use READ COMMITTED or enable\n innodb_locks_unsafe_for_binlog, you must use row-based binary\n logging.\n\no READ UNCOMMITTED\n\n SELECT statements are performed in a nonlocking fashion, but a\n possible earlier version of a row might be used. Thus, using this\n isolation level, such reads are not consistent. This is also called a\n \"dirty read.\" Otherwise, this isolation level works like READ\n COMMITTED.\n\no SERIALIZABLE\n\n This level is like REPEATABLE READ, but InnoDB implicitly converts\n all plain SELECT statements to SELECT ... LOCK IN SHARE MODE if\n autocommit is disabled. If autocommit is enabled, the SELECT is its\n own transaction. It therefore is known to be read only and can be\n serialized if performed as a consistent (nonlocking) read and need\n not block for other transactions. (To force a plain SELECT to block\n if other transactions have modified the selected rows, disable\n autocommit.)\n\nURL: https://mariadb.com/kb/en/set-transaction-isolation-level/\n\n','','https://mariadb.com/kb/en/set-transaction-isolation-level/'),(448,'CEILING',4,'Syntax:\nCEILING(X)\n\nReturns the smallest integer value not less than X.\n\nURL: https://mariadb.com/kb/en/ceiling/\n\n','MariaDB> SELECT CEILING(1.23);\n -> 2\nMariaDB> SELECT CEILING(-1.23);\n -> -1\n','https://mariadb.com/kb/en/ceiling/'),(449,'SIN',4,'Syntax:\nSIN(X)\n\nReturns the sine of X, where X is given in radians.\n\nURL: https://mariadb.com/kb/en/sin/\n\n','MariaDB> SELECT SIN(PI());\n -> 1.2246063538224e-16\nMariaDB> SELECT ROUND(SIN(PI()));\n -> 0\n','https://mariadb.com/kb/en/sin/'),(450,'DAYOFWEEK',31,'Syntax:\nDAYOFWEEK(date)\n\nReturns the weekday index for date (1 = Sunday, 2 = Monday, ..., 7 =\nSaturday). These index values correspond to the ODBC standard.\n\nURL: https://mariadb.com/kb/en/dayofweek/\n\n','MariaDB> SELECT DAYOFWEEK(\'2007-02-03\');\n -> 7\n','https://mariadb.com/kb/en/dayofweek/'),(451,'SHOW PROCESSLIST',26,'Syntax:\nSHOW [FULL] PROCESSLIST\n\nSHOW PROCESSLIST shows you which threads are running. You can also get\nthis information from the INFORMATION_SCHEMA PROCESSLIST table or the\nmysqladmin processlist command. If you have the PROCESS privilege, you\ncan see all threads. Otherwise, you can see only your own threads (that\nis, threads associated with the MySQL account that you are using). If\nyou do not use the FULL keyword, only the first 100 characters of each\nstatement are shown in the Info field.\n\nURL: https://mariadb.com/kb/en/show-processlist/\n\n','','https://mariadb.com/kb/en/show-processlist/'),(452,'LINEFROMWKB',32,'LineFromWKB(wkb[,srid]), LineStringFromWKB(wkb[,srid])\n\nConstructs a LINESTRING value using its WKB representation and SRID.\n\nURL: https://mariadb.com/kb/en/linefromwkb/\n\n','','https://mariadb.com/kb/en/linefromwkb/'),(453,'GEOMETRYTYPE',36,'GeometryType(g)\n\nReturns as a binary string the name of the geometry type of which the\ngeometry instance g is a member. The name corresponds to one of the\ninstantiable Geometry subclasses.\n\nURL: https://mariadb.com/kb/en/geometrytype/\n\n','MariaDB> SELECT GeometryType(GeomFromText(\'POINT(1 1)\'));\n+------------------------------------------+\n| GeometryType(GeomFromText(\'POINT(1 1)\')) |\n+------------------------------------------+\n| POINT |\n+------------------------------------------+\n','https://mariadb.com/kb/en/geometrytype/'),(454,'CREATE VIEW',39,'Syntax:\nCREATE\n [OR REPLACE]\n [ALGORITHM = {UNDEFINED | MERGE | TEMPTABLE}]\n [DEFINER = { user | CURRENT_USER }]\n [SQL SECURITY { DEFINER | INVOKER }]\n VIEW view_name [(column_list)]\n AS select_statement\n [WITH [CASCADED | LOCAL] CHECK OPTION]\n\nThe CREATE VIEW statement creates a new view, or replaces an existing\none if the OR REPLACE clause is given. If the view does not exist,\nCREATE OR REPLACE VIEW is the same as CREATE VIEW. If the view does\nexist, CREATE OR REPLACE VIEW is the same as ALTER VIEW.\n\nThe select_statement is a SELECT statement that provides the definition\nof the view. (When you select from the view, you select in effect using\nthe SELECT statement.) select_statement can select from base tables or\nother views.\n\nThe view definition is \"frozen\" at creation time, so changes to the\nunderlying tables afterward do not affect the view definition. For\nexample, if a view is defined as SELECT * on a table, new columns added\nto the table later do not become part of the view.\n\nThe ALGORITHM clause affects how MySQL processes the view. The DEFINER\nand SQL SECURITY clauses specify the security context to be used when\nchecking access privileges at view invocation time. The WITH CHECK\nOPTION clause can be given to constrain inserts or updates to rows in\ntables referenced by the view. These clauses are described later in\nthis section.\n\nThe CREATE VIEW statement requires the CREATE VIEW privilege for the\nview, and some privilege for each column selected by the SELECT\nstatement. For columns used elsewhere in the SELECT statement you must\nhave the SELECT privilege. If the OR REPLACE clause is present, you\nmust also have the DROP privilege for the view. CREATE VIEW might also\nrequire the SUPER privilege, depending on the DEFINER value, as\ndescribed later in this section.\n\nWhen a view is referenced, privilege checking occurs as described later\nin this section.\n\nA view belongs to a database. By default, a new view is created in the\ndefault database. To create the view explicitly in a given database,\nspecify the name as db_name.view_name when you create it:\n\nMariaDB> CREATE VIEW test.v AS SELECT * FROM t;\n\nWithin a database, base tables and views share the same namespace, so a\nbase table and a view cannot have the same name.\n\nColumns retrieved by the SELECT statement can be simple references to\ntable columns. They can also be expressions that use functions,\nconstant values, operators, and so forth.\n\nViews must have unique column names with no duplicates, just like base\ntables. By default, the names of the columns retrieved by the SELECT\nstatement are used for the view column names. To define explicit names\nfor the view columns, the optional column_list clause can be given as a\nlist of comma-separated identifiers. The number of names in column_list\nmust be the same as the number of columns retrieved by the SELECT\nstatement.\n\nUnqualified table or view names in the SELECT statement are interpreted\nwith respect to the default database. A view can refer to tables or\nviews in other databases by qualifying the table or view name with the\nproper database name.\n\nA view can be created from many kinds of SELECT statements. It can\nrefer to base tables or other views. It can use joins, UNION, and\nsubqueries. The SELECT need not even refer to any tables. The following\nexample defines a view that selects two columns from another table, as\nwell as an expression calculated from those columns:\n\nMariaDB> CREATE TABLE t (qty INT, price INT);\nMariaDB> INSERT INTO t VALUES(3, 50);\nMariaDB> CREATE VIEW v AS SELECT qty, price, qty*price AS value FROM t;\nMariaDB> SELECT * FROM v;\n+------+-------+-------+\n| qty | price | value |\n+------+-------+-------+\n| 3 | 50 | 150 |\n+------+-------+-------+\n\nA view definition is subject to the following restrictions:\n\no The SELECT statement cannot contain a subquery in the FROM clause.\n\no The SELECT statement cannot refer to system or user variables.\n\no Within a stored program, the definition cannot refer to program\n parameters or local variables.\n\no The SELECT statement cannot refer to prepared statement parameters.\n\no Any table or view referred to in the definition must exist. However,\n after a view has been created, it is possible to drop a table or view\n that the definition refers to. In this case, use of the view results\n in an error. To check a view definition for problems of this kind,\n use the CHECK TABLE statement.\n\no The definition cannot refer to a TEMPORARY table, and you cannot\n create a TEMPORARY view.\n\no Any tables named in the view definition must exist at definition\n time.\n\no You cannot associate a trigger with a view.\n\no Aliases for column names in the SELECT statement are checked against\n the maximum column length of 64 characters (not the maximum alias\n length of 256 characters).\n\nORDER BY is permitted in a view definition, but it is ignored if you\nselect from a view using a statement that has its own ORDER BY.\n\nFor other options or clauses in the definition, they are added to the\noptions or clauses of the statement that references the view, but the\neffect is undefined. For example, if a view definition includes a LIMIT\nclause, and you select from the view using a statement that has its own\nLIMIT clause, it is undefined which limit applies. This same principle\napplies to options such as ALL, DISTINCT, or SQL_SMALL_RESULT that\nfollow the SELECT keyword, and to clauses such as INTO, FOR UPDATE,\nLOCK IN SHARE MODE, and PROCEDURE.\n\nIf you create a view and then change the query processing environment\nby changing system variables, that may affect the results that you get\nfrom the view:\n\nMariaDB> CREATE VIEW v (mycol) AS SELECT \'abc\';\nQuery OK, 0 rows affected (0.01 sec)\n\nMariaDB> SET sql_mode = \'\';\nQuery OK, 0 rows affected (0.00 sec)\n\nMariaDB> SELECT \"mycol\" FROM v;\n+-------+\n| mycol |\n+-------+\n| mycol |\n+-------+\n1 row in set (0.01 sec)\n\nMariaDB> SET sql_mode = \'ANSI_QUOTES\';\nQuery OK, 0 rows affected (0.00 sec)\n\nMariaDB> SELECT \"mycol\" FROM v;\n+-------+\n| mycol |\n+-------+\n| abc |\n+-------+\n1 row in set (0.00 sec)\n\nThe DEFINER and SQL SECURITY clauses determine which MySQL account to\nuse when checking access privileges for the view when a statement is\nexecuted that references the view. The valid SQL SECURITY\ncharacteristic values are DEFINER and INVOKER. These indicate that the\nrequired privileges must be held by the user who defined or invoked the\nview, respectively. The default SQL SECURITY value is DEFINER.\n\nIf a user value is given for the DEFINER clause, it should be a MySQL\naccount specified as \'user_name\'@\'host_name\' (the same format used in\nthe GRANT statement), CURRENT_USER, or CURRENT_USER(). The default\nDEFINER value is the user who executes the CREATE VIEW statement. This\nis the same as specifying DEFINER = CURRENT_USER explicitly.\n\nIf you specify the DEFINER clause, these rules determine the valid\nDEFINER user values:\n\no If you do not have the SUPER privilege, the only valid user value is\n your own account, either specified literally or by using\n CURRENT_USER. You cannot set the definer to some other account.\n\no If you have the SUPER privilege, you can specify any syntactically\n valid account name. If the account does not actually exist, a warning\n is generated.\n\no Although it is possible to create a view with a nonexistent DEFINER\n account, an error occurs when the view is referenced if the SQL\n SECURITY value is DEFINER but the definer account does not exist.\n\nFor more information about view security, see\nhttps://mariadb.com/kb/en/stored-routine-privileges/.\n\nWithin a view definition, CURRENT_USER returns the view\'s DEFINER value\nby default. For views defined with the SQL SECURITY INVOKER\ncharacteristic, CURRENT_USER returns the account for the view\'s\ninvoker. For information about user auditing within views, see\nhttp://dev.mysql.com/doc/refman/5.5/en/account-activity-auditing.html.\n\nWithin a stored routine that is defined with the SQL SECURITY DEFINER\ncharacteristic, CURRENT_USER returns the routine\'s DEFINER value. This\nalso affects a view defined within such a routine, if the view\ndefinition contains a DEFINER value of CURRENT_USER.\n\nView privileges are checked like this:\n\no At view definition time, the view creator must have the privileges\n needed to use the top-level objects accessed by the view. For\n example, if the view definition refers to table columns, the creator\n must have some privilege for each column in the select list of the\n definition, and the SELECT privilege for each column used elsewhere\n in the definition. If the definition refers to a stored function,\n only the privileges needed to invoke the function can be checked. The\n privileges required at function invocation time can be checked only\n as it executes: For different invocations, different execution paths\n within the function might be taken.\n\no The user who references a view must have appropriate privileges to\n access it (SELECT to select from it, INSERT to insert into it, and so\n forth.)\n\no When a view has been referenced, privileges for objects accessed by\n the view are checked against the privileges held by the view DEFINER\n account or invoker, depending on whether the SQL SECURITY\n characteristic is DEFINER or INVOKER, respectively.\n\no If reference to a view causes execution of a stored function,\n privilege checking for statements executed within the function depend\n on whether the function SQL SECURITY characteristic is DEFINER or\n INVOKER. If the security characteristic is DEFINER, the function runs\n with the privileges of the DEFINER account. If the characteristic is\n INVOKER, the function runs with the privileges determined by the\n view\'s SQL SECURITY characteristic.\n\nExample: A view might depend on a stored function, and that function\nmight invoke other stored routines. For example, the following view\ninvokes a stored function f():\n\nCREATE VIEW v AS SELECT * FROM t WHERE t.id = f(t.name);\n\nSuppose that f() contains a statement such as this:\n\nIF name IS NULL then\n CALL p1();\nELSE\n CALL p2();\nEND IF;\n\nThe privileges required for executing statements within f() need to be\nchecked when f() executes. This might mean that privileges are needed\nfor p1() or p2(), depending on the execution path within f(). Those\nprivileges must be checked at runtime, and the user who must possess\nthe privileges is determined by the SQL SECURITY values of the view v\nand the function f().\n\nThe DEFINER and SQL SECURITY clauses for views are extensions to\nstandard SQL. In standard SQL, views are handled using the rules for\nSQL SECURITY DEFINER. The standard says that the definer of the view,\nwhich is the same as the owner of the view\'s schema, gets applicable\nprivileges on the view (for example, SELECT) and may grant them. MySQL\nhas no concept of a schema \"owner\", so MySQL adds a clause to identify\nthe definer. The DEFINER clause is an extension where the intent is to\nhave what the standard has; that is, a permanent record of who defined\nthe view. This is why the default DEFINER value is the account of the\nview creator.\n\nThe optional ALGORITHM clause is a MySQL extension to standard SQL. It\naffects how MySQL processes the view. ALGORITHM takes three values:\nMERGE, TEMPTABLE, or UNDEFINED. The default algorithm is UNDEFINED if\nno ALGORITHM clause is present. For more information, see\nhttps://mariadb.com/kb/en/view-algorithms/.\n\nSome views are updatable. That is, you can use them in statements such\nas UPDATE, DELETE, or INSERT to update the contents of the underlying\ntable. For a view to be updatable, there must be a one-to-one\nrelationship between the rows in the view and the rows in the\nunderlying table. There are also certain other constructs that make a\nview nonupdatable.\n\nThe WITH CHECK OPTION clause can be given for an updatable view to\nprevent inserts or updates to rows except those for which the WHERE\nclause in the select_statement is true.\n\nIn a WITH CHECK OPTION clause for an updatable view, the LOCAL and\nCASCADED keywords determine the scope of check testing when the view is\ndefined in terms of another view. The LOCAL keyword restricts the CHECK\nOPTION only to the view being defined. CASCADED causes the checks for\nunderlying views to be evaluated as well. When neither keyword is\ngiven, the default is CASCADED.\n\nFor more information about updatable views and the WITH CHECK OPTION\nclause, see\nhttps://mariadb.com/kb/en/inserting-and-updating-with-views/.\n\nURL: https://mariadb.com/kb/en/create-view/\n\n','','https://mariadb.com/kb/en/create-view/'),(455,'TRIM',37,'Syntax:\nTRIM([{BOTH | LEADING | TRAILING} [remstr] FROM] str), TRIM([remstr\nFROM] str)\n\nReturns the string str with all remstr prefixes or suffixes removed. If\nnone of the specifiers BOTH, LEADING, or TRAILING is given, BOTH is\nassumed. remstr is optional and, if not specified, spaces are removed.\n\nURL: https://mariadb.com/kb/en/trim/\n\n','MariaDB> SELECT TRIM(\' bar \');\n -> \'bar\'\nMariaDB> SELECT TRIM(LEADING \'x\' FROM \'xxxbarxxx\');\n -> \'barxxx\'\nMariaDB> SELECT TRIM(BOTH \'x\' FROM \'xxxbarxxx\');\n -> \'bar\'\nMariaDB> SELECT TRIM(TRAILING \'xyz\' FROM \'barxxyz\');\n -> \'barx\'\n','https://mariadb.com/kb/en/trim/'),(456,'IS',18,'Syntax:\nIS boolean_value\n\nTests a value against a boolean value, where boolean_value can be TRUE,\nFALSE, or UNKNOWN.\n\nURL: https://mariadb.com/kb/en/is/\n\n','MariaDB> SELECT 1 IS TRUE, 0 IS FALSE, NULL IS UNKNOWN;\n -> 1, 1, 1\n','https://mariadb.com/kb/en/is/'),(457,'GET_FORMAT',31,'Syntax:\nGET_FORMAT({DATE|TIME|DATETIME}, {\'EUR\'|\'USA\'|\'JIS\'|\'ISO\'|\'INTERNAL\'})\n\nReturns a format string. This function is useful in combination with\nthe DATE_FORMAT() and the STR_TO_DATE() functions.\n\nURL: https://mariadb.com/kb/en/get_format/\n\n','MariaDB> SELECT DATE_FORMAT(\'2003-10-03\',GET_FORMAT(DATE,\'EUR\'));\n -> \'03.10.2003\'\nMariaDB> SELECT STR_TO_DATE(\'10.31.2003\',GET_FORMAT(DATE,\'USA\'));\n -> \'2003-10-31\'\n','https://mariadb.com/kb/en/get_format/'),(458,'TINYBLOB',22,'TINYBLOB\n\nA BLOB column with a maximum length of 255 (28 - 1) bytes. Each\nTINYBLOB value is stored using a 1-byte length prefix that indicates\nthe number of bytes in the value.\n\nURL: https://mariadb.com/kb/en/tinyblob/\n\n','','https://mariadb.com/kb/en/tinyblob/'),(459,'SIGNAL',23,'Syntax:\nSIGNAL condition_value\n [SET signal_information_item\n [, signal_information_item] ...]\n\ncondition_value:\n SQLSTATE [VALUE] sqlstate_value\n | condition_name\n\nsignal_information_item:\n condition_information_item_name = simple_value_specification\n\ncondition_information_item_name:\n CLASS_ORIGIN\n | SUBCLASS_ORIGIN\n | MESSAGE_TEXT\n | MYSQL_ERRNO\n | CONSTRAINT_CATALOG\n | CONSTRAINT_SCHEMA\n | CONSTRAINT_NAME\n | CATALOG_NAME\n | SCHEMA_NAME\n | TABLE_NAME\n | COLUMN_NAME\n | CURSOR_NAME\n\ncondition_name, simple_value_specification:\n (see following discussion)\n\nSIGNAL is the way to \"return\" an error. SIGNAL provides error\ninformation to a handler, to an outer portion of the application, or to\nthe client. Also, it provides control over the error\'s characteristics\n(error number, SQLSTATE value, message). Without SIGNAL, it is\nnecessary to resort to workarounds such as deliberately referring to a\nnonexistent table to cause a routine to return an error.\n\nNo special privileges are required to execute the SIGNAL statement.\n\nThe condition_value in a SIGNAL statement indicates the error value to\nbe returned. It can be an SQLSTATE value (a 5-character string literal)\nor a condition_name that refers to a named condition previously defined\nwith DECLARE ... CONDITION (see [HELP DECLARE CONDITION]).\n\nAn SQLSTATE value can indicate errors, warnings, or \"not found.\" The\nfirst two characters of the value indicate its error class, as\ndiscussed in\nhttps://mariadb.com/kb/en/signal/#signal-condition-inf\normation-items. Some signal values cause statement termination; see\nhttps://mariadb.com/kb/en/signal/#signal-effects.\n\nThe SQLSTATE value for a SIGNAL statement should not start with \'00\'\nbecause such values indicate success and are not valid for signaling an\nerror. This is true whether the SQLSTATE value is specified directly in\nthe SIGNAL statement or in a named condition referred to in the\nstatement. If the value is invalid, a Bad SQLSTATE error occurs.\n\nTo signal a generic SQLSTATE value, use \'45000\', which means \"unhandled\nuser-defined exception.\"\n\nThe SIGNAL statement optionally includes a SET clause that contains\nmultiple signal items, in a comma-separated list of\ncondition_information_item_name = simple_value_specification\nassignments.\n\nEach condition_information_item_name may be specified only once in the\nSET clause. Otherwise, a Duplicate condition information item error\noccurs.\n\nValid simple_value_specification designators can be specified using\nstored procedure or function parameters, stored program local variables\ndeclared with DECLARE, user-defined variables, system variables, or\nliterals. A character literal may include a _charset introducer.\n\nFor information about permissible condition_information_item_name\nvalues, see\nhttps://mariadb.com/kb/en/signal/#signal-condition-inf\normation-items.\n\nURL: https://mariadb.com/kb/en/signal/\n\n','CREATE PROCEDURE p (pval INT)\nBEGIN\n DECLARE specialty CONDITION FOR SQLSTATE \'45000\';\n IF pval = 0 THEN\n SIGNAL SQLSTATE \'01000\';\n ELSEIF pval = 1 THEN\n SIGNAL SQLSTATE \'45000\'\n SET MESSAGE_TEXT = \'An error occurred\';\n ELSEIF pval = 2 THEN\n SIGNAL specialty\n SET MESSAGE_TEXT = \'An error occurred\';\n ELSE\n SIGNAL SQLSTATE \'01000\'\n SET MESSAGE_TEXT = \'A warning occurred\', MYSQL_ERRNO = 1000;\n SIGNAL SQLSTATE \'45000\'\n SET MESSAGE_TEXT = \'An error occurred\', MYSQL_ERRNO = 1001;\n END IF;\nEND;\n','https://mariadb.com/kb/en/signal/'),(460,'SAVEPOINT',8,'Syntax:\nSAVEPOINT identifier\nROLLBACK [WORK] TO [SAVEPOINT] identifier\nRELEASE SAVEPOINT identifier\n\nInnoDB supports the SQL statements SAVEPOINT, ROLLBACK TO SAVEPOINT,\nRELEASE SAVEPOINT and the optional WORK keyword for ROLLBACK.\n\nURL: https://mariadb.com/kb/en/savepoint/\n\n','','https://mariadb.com/kb/en/savepoint/'),(461,'USER',17,'Syntax:\nUSER()\n\nReturns the current MySQL user name and host name as a string in the\nutf8 character set.\n\nURL: https://mariadb.com/kb/en/user/\n\n','MariaDB> SELECT USER();\n -> \'davida@localhost\'\n','https://mariadb.com/kb/en/user/'),(462,'LABELS',23,'Syntax:\n[begin_label:] BEGIN\n [statement_list]\nEND [end_label]\n\n[begin_label:] LOOP\n statement_list\nEND LOOP [end_label]\n\n[begin_label:] REPEAT\n statement_list\nUNTIL search_condition\nEND REPEAT [end_label]\n\n[begin_label:] WHILE search_condition DO\n statement_list\nEND WHILE [end_label]\n\nLabels are permitted for BEGIN ... END blocks and for the LOOP, REPEAT,\nand WHILE statements. Label use for those statements follows these\nrules:\n\no begin_label must be followed by a colon.\n\no begin_label can be given without end_label. If end_label is present,\n it must be the same as begin_label.\n\no end_label cannot be given without begin_label.\n\no Labels at the same nesting level must be distinct.\n\no Labels can be up to 16 characters long.\n\nTo refer to a label within the labeled construct, use an ITERATE or\nLEAVE statement. The following example uses those statements to\ncontinue iterating or terminate the loop:\n\nCREATE PROCEDURE doiterate(p1 INT)\nBEGIN\n label1: LOOP\n SET p1 = p1 + 1;\n IF p1 < 10 THEN ITERATE label1; END IF;\n LEAVE label1;\n END LOOP label1;\nEND;\n\nThe scope of a block label does not include the code for handlers\ndeclared within the block. For details, see [HELP DECLARE HANDLER].\n\nURL: https://mariadb.com/kb/en/labels/\n\n','','https://mariadb.com/kb/en/labels/'),(463,'ALTER TABLE',39,'Syntax:\nALTER [ONLINE | OFFLINE] [IGNORE] TABLE tbl_name\n [alter_specification [, alter_specification] ...]\n [partition_options]\n\nalter_specification:\n table_options\n | ADD [COLUMN] col_name column_definition\n [FIRST | AFTER col_name ]\n | ADD [COLUMN] (col_name column_definition,...)\n | ADD {INDEX|KEY} [index_name]\n [index_type] (index_col_name,...) [index_option] ...\n | ADD [CONSTRAINT [symbol]] PRIMARY KEY\n [index_type] (index_col_name,...) [index_option] ...\n | ADD [CONSTRAINT [symbol]]\n UNIQUE [INDEX|KEY] [index_name]\n [index_type] (index_col_name,...) [index_option] ...\n | ADD FULLTEXT [INDEX|KEY] [index_name]\n (index_col_name,...) [index_option] ...\n | ADD SPATIAL [INDEX|KEY] [index_name]\n (index_col_name,...) [index_option] ...\n | ADD [CONSTRAINT [symbol]]\n FOREIGN KEY [index_name] (index_col_name,...)\n reference_definition\n | ALTER [COLUMN] col_name {SET DEFAULT literal | DROP DEFAULT}\n | CHANGE [COLUMN] old_col_name new_col_name column_definition\n [FIRST|AFTER col_name]\n | MODIFY [COLUMN] col_name column_definition\n [FIRST | AFTER col_name]\n | DROP [COLUMN] col_name\n | DROP PRIMARY KEY\n | DROP {INDEX|KEY} index_name\n | DROP FOREIGN KEY fk_symbol\n | MAX_ROWS = rows\n | DISABLE KEYS\n | ENABLE KEYS\n | RENAME [TO|AS] new_tbl_name\n | ORDER BY col_name [, col_name] ...\n | CONVERT TO CHARACTER SET charset_name [COLLATE collation_name]\n | [DEFAULT] CHARACTER SET [=] charset_name [COLLATE [=] collation_name]\n | DISCARD TABLESPACE\n | IMPORT TABLESPACE\n | FORCE\n | ADD PARTITION (partition_definition)\n | DROP PARTITION partition_names\n | TRUNCATE PARTITION {partition_names | ALL}\n | COALESCE PARTITION number\n | REORGANIZE PARTITION [partition_names INTO (partition_definitions)]\n | ANALYZE PARTITION {partition_names | ALL}\n | CHECK PARTITION {partition_names | ALL}\n | OPTIMIZE PARTITION {partition_names | ALL}\n | REBUILD PARTITION {partition_names | ALL}\n | REPAIR PARTITION {partition_names | ALL}\n | PARTITION BY partitioning_expression\n | REMOVE PARTITIONING\n\nindex_col_name:\n col_name [(length)] [ASC | DESC]\n\nindex_type:\n USING {BTREE | HASH}\n\nindex_option:\n KEY_BLOCK_SIZE [=] value\n | index_type\n | WITH PARSER parser_name\n | COMMENT \'string\'\n\ntable_options:\n table_option [[,] table_option] ... (see CREATE TABLE options)\n\npartition_options:\n (see CREATE TABLE options)\n\nALTER TABLE changes the structure of a table. For example, you can add\nor delete columns, create or destroy indexes, change the type of\nexisting columns, or rename columns or the table itself. You can also\nchange characteristics such as the storage engine used for the table or\nthe table comment.\n\nPartitioning-related clauses for ALTER TABLE can be used with\npartitioned tables for repartitioning, for adding, dropping, merging,\nand splitting partitions, and for performing partitioning maintenance.\nFor more information, see\nhttp://dev.mysql.com/doc/refman/5.5/en/alter-table-partition-operations\n.html.\n\nFollowing the table name, specify the alterations to be made. If none\nare given, ALTER TABLE does nothing.\n\nURL: https://mariadb.com/kb/en/alter-table/\n\n','','https://mariadb.com/kb/en/alter-table/'),(464,'MPOINTFROMWKB',32,'MPointFromWKB(wkb[,srid]), MultiPointFromWKB(wkb[,srid])\n\nConstructs a MULTIPOINT value using its WKB representation and SRID.\n\nURL: https://mariadb.com/kb/en/mpointfromwkb/\n\n','','https://mariadb.com/kb/en/mpointfromwkb/'),(465,'CHAR BYTE',22,'The CHAR BYTE data type is an alias for the BINARY data type. This is a\ncompatibility feature.\n\nURL: https://mariadb.com/kb/en/char-byte/\n\n','','https://mariadb.com/kb/en/char-byte/'),(466,'REPAIR TABLE',20,'Syntax:\nREPAIR [NO_WRITE_TO_BINLOG | LOCAL] TABLE\n tbl_name [, tbl_name] ...\n [QUICK] [EXTENDED] [USE_FRM]\n\nREPAIR TABLE repairs a possibly corrupted table. By default, it has the\nsame effect as myisamchk --recover tbl_name. REPAIR TABLE works for\nMyISAM, ARCHIVE, and CSV tables. See\nhttps://mariadb.com/kb/en/myisam-storage-engine/, and\nhttps://mariadb.com/kb/en/archive/, and\nhttps://mariadb.com/kb/en/csv/\n\nThis statement requires SELECT and INSERT privileges for the table.\n\nREPAIR TABLE is supported for partitioned tables. However, the USE_FRM\noption cannot be used with this statement on a partitioned table.\n\nYou can use ALTER TABLE ... REPAIR PARTITION to repair one or more\npartitions; for more information, see [HELP ALTER TABLE], and\nhttp://dev.mysql.com/doc/refman/5.5/en/partitioning-maintenance.html.\n\nURL: https://mariadb.com/kb/en/repair-table/\n\n','','https://mariadb.com/kb/en/repair-table/'),(467,'MERGE',39,'The MERGE storage engine, also known as the MRG_MyISAM engine, is a\ncollection of identical MyISAM tables that can be used as one.\n\"Identical\" means that all tables have identical column and index\ninformation. You cannot merge MyISAM tables in which the columns are\nlisted in a different order, do not have exactly the same columns, or\nhave the indexes in different order. However, any or all of the MyISAM\ntables can be compressed with myisampack. See\nhttps://mariadb.com/kb/en/myisampack/. Differences in\ntable options such as AVG_ROW_LENGTH, MAX_ROWS, or PACK_KEYS do not\nmatter.\n\nURL: https://mariadb.com/kb/en/merge/\n\n','MariaDB> CREATE TABLE t1 (\n -> a INT NOT NULL AUTO_INCREMENT PRIMARY KEY,\n -> message CHAR(20)) ENGINE=MyISAM;\nMariaDB> CREATE TABLE t2 (\n -> a INT NOT NULL AUTO_INCREMENT PRIMARY KEY,\n -> message CHAR(20)) ENGINE=MyISAM;\nMariaDB> INSERT INTO t1 (message) VALUES (\'Testing\'),(\'table\'),(\'t1\');\nMariaDB> INSERT INTO t2 (message) VALUES (\'Testing\'),(\'table\'),(\'t2\');\nMariaDB> CREATE TABLE total (\n -> a INT NOT NULL AUTO_INCREMENT,\n -> message CHAR(20), INDEX(a))\n -> ENGINE=MERGE UNION=(t1,t2) INSERT_METHOD=LAST;\n','https://mariadb.com/kb/en/merge/'),(468,'CREATE TABLE',39,'Syntax:\nCREATE [TEMPORARY] TABLE [IF NOT EXISTS] tbl_name\n (create_definition,...)\n [table_options]\n [partition_options]\n\nOr:\n\nCREATE [TEMPORARY] TABLE [IF NOT EXISTS] tbl_name\n [(create_definition,...)]\n [table_options]\n [partition_options]\n select_statement\n\nOr:\n\nCREATE [TEMPORARY] TABLE [IF NOT EXISTS] tbl_name\n { LIKE old_tbl_name | (LIKE old_tbl_name) }\n\ncreate_definition:\n col_name column_definition\n | [CONSTRAINT [symbol]] PRIMARY KEY [index_type] (index_col_name,...)\n [index_option] ...\n | {INDEX|KEY} [index_name] [index_type] (index_col_name,...)\n [index_option] ...\n | [CONSTRAINT [symbol]] UNIQUE [INDEX|KEY]\n [index_name] [index_type] (index_col_name,...)\n [index_option] ...\n | {FULLTEXT|SPATIAL} [INDEX|KEY] [index_name] (index_col_name,...)\n [index_option] ...\n | [CONSTRAINT [symbol]] FOREIGN KEY\n [index_name] (index_col_name,...) reference_definition\n | CHECK (expr)\n\ncolumn_definition:\n data_type [NOT NULL | NULL] [DEFAULT default_value]\n [AUTO_INCREMENT] [UNIQUE [KEY] | [PRIMARY] KEY]\n [COMMENT \'string\']\n [COLUMN_FORMAT {FIXED|DYNAMIC|DEFAULT}]\n [STORAGE {DISK|MEMORY|DEFAULT}]\n [reference_definition]\n\ndata_type:\n BIT[(length)]\n | TINYINT[(length)] [UNSIGNED] [ZEROFILL]\n | SMALLINT[(length)] [UNSIGNED] [ZEROFILL]\n | MEDIUMINT[(length)] [UNSIGNED] [ZEROFILL]\n | INT[(length)] [UNSIGNED] [ZEROFILL]\n | INTEGER[(length)] [UNSIGNED] [ZEROFILL]\n | BIGINT[(length)] [UNSIGNED] [ZEROFILL]\n | REAL[(length,decimals)] [UNSIGNED] [ZEROFILL]\n | DOUBLE[(length,decimals)] [UNSIGNED] [ZEROFILL]\n | FLOAT[(length,decimals)] [UNSIGNED] [ZEROFILL]\n | DECIMAL[(length[,decimals])] [UNSIGNED] [ZEROFILL]\n | NUMERIC[(length[,decimals])] [UNSIGNED] [ZEROFILL]\n | DATE\n | TIME\n | TIMESTAMP\n | DATETIME\n | YEAR\n | CHAR[(length)]\n [CHARACTER SET charset_name] [COLLATE collation_name]\n | VARCHAR(length)\n [CHARACTER SET charset_name] [COLLATE collation_name]\n | BINARY[(length)]\n | VARBINARY(length)\n | TINYBLOB\n | BLOB\n | MEDIUMBLOB\n | LONGBLOB\n | TINYTEXT [BINARY]\n [CHARACTER SET charset_name] [COLLATE collation_name]\n | TEXT [BINARY]\n [CHARACTER SET charset_name] [COLLATE collation_name]\n | MEDIUMTEXT [BINARY]\n [CHARACTER SET charset_name] [COLLATE collation_name]\n | LONGTEXT [BINARY]\n [CHARACTER SET charset_name] [COLLATE collation_name]\n | ENUM(value1,value2,value3,...)\n [CHARACTER SET charset_name] [COLLATE collation_name]\n | SET(value1,value2,value3,...)\n [CHARACTER SET charset_name] [COLLATE collation_name]\n | spatial_type\n\nindex_col_name:\n col_name [(length)] [ASC | DESC]\n\nindex_type:\n USING {BTREE | HASH}\n\nindex_option:\n KEY_BLOCK_SIZE [=] value\n | index_type\n | WITH PARSER parser_name\n | COMMENT \'string\'\n\nreference_definition:\n REFERENCES tbl_name (index_col_name,...)\n [MATCH FULL | MATCH PARTIAL | MATCH SIMPLE]\n [ON DELETE reference_option]\n [ON UPDATE reference_option]\n\nreference_option:\n RESTRICT | CASCADE | SET NULL | NO ACTION\n\ntable_options:\n table_option [[,] table_option] ...\n\ntable_option:\n ENGINE [=] engine_name\n | AUTO_INCREMENT [=] value\n | AVG_ROW_LENGTH [=] value\n | [DEFAULT] CHARACTER SET [=] charset_name\n | CHECKSUM [=] {0 | 1}\n | [DEFAULT] COLLATE [=] collation_name\n | COMMENT [=] \'string\'\n | CONNECTION [=] \'connect_string\'\n | DATA DIRECTORY [=] \'absolute path to directory\'\n | DELAY_KEY_WRITE [=] {0 | 1}\n | INDEX DIRECTORY [=] \'absolute path to directory\'\n | INSERT_METHOD [=] { NO | FIRST | LAST }\n | KEY_BLOCK_SIZE [=] value\n | MAX_ROWS [=] value\n | MIN_ROWS [=] value\n | PACK_KEYS [=] {0 | 1 | DEFAULT}\n | PASSWORD [=] \'string\'\n | ROW_FORMAT [=] {DEFAULT|DYNAMIC|FIXED|COMPRESSED|REDUNDANT|COMPACT}\n | TABLESPACE tablespace_name [STORAGE {DISK|MEMORY|DEFAULT}]\n | UNION [=] (tbl_name[,tbl_name]...)\n\npartition_options:\n PARTITION BY\n { [LINEAR] HASH(expr)\n | [LINEAR] KEY(column_list)\n | RANGE{(expr) | COLUMNS(column_list)}\n | LIST{(expr) | COLUMNS(column_list)} }\n [PARTITIONS num]\n [SUBPARTITION BY\n { [LINEAR] HASH(expr)\n | [LINEAR] KEY(column_list) }\n [SUBPARTITIONS num]\n ]\n [(partition_definition [, partition_definition] ...)]\n\npartition_definition:\n PARTITION partition_name\n [VALUES \n {LESS THAN {(expr | value_list) | MAXVALUE} \n | \n IN (value_list)}]\n [[STORAGE] ENGINE [=] engine_name]\n [COMMENT [=] \'comment_text\' ]\n [DATA DIRECTORY [=] \'data_dir\']\n [INDEX DIRECTORY [=] \'index_dir\']\n [MAX_ROWS [=] max_number_of_rows]\n [MIN_ROWS [=] min_number_of_rows]\n [TABLESPACE [=] tablespace_name]\n [NODEGROUP [=] node_group_id]\n [(subpartition_definition [, subpartition_definition] ...)]\n\nsubpartition_definition:\n SUBPARTITION logical_name\n [[STORAGE] ENGINE [=] engine_name]\n [COMMENT [=] \'comment_text\' ]\n [DATA DIRECTORY [=] \'data_dir\']\n [INDEX DIRECTORY [=] \'index_dir\']\n [MAX_ROWS [=] max_number_of_rows]\n [MIN_ROWS [=] min_number_of_rows]\n [TABLESPACE [=] tablespace_name]\n [NODEGROUP [=] node_group_id]\n\nselect_statement:\n [IGNORE | REPLACE] [AS] SELECT ... (Some valid select statement)\n\nCREATE TABLE creates a table with the given name. You must have the\nCREATE privilege for the table.\n\nRules for permissible table names are given in\nhttps://mariadb.com/kb/en/identifier-names/. By default,\nthe table is created in the default database, using the InnoDB storage\nengine. An error occurs if the table exists, if there is no default\ndatabase, or if the database does not exist.\n\nURL: https://mariadb.com/kb/en/create-table/\n\n','','https://mariadb.com/kb/en/create-table/'),(469,'>',18,'Syntax:\n>\n\nGreater than:\n\nURL: https://mariadb.com/kb/en/greater-than/\n\n','MariaDB> SELECT 2 > 2;\n -> 0\n','https://mariadb.com/kb/en/greater-than/'),(470,'ANALYZE TABLE',20,'Syntax:\nANALYZE [NO_WRITE_TO_BINLOG | LOCAL] TABLE\n tbl_name [, tbl_name] ...\n\nANALYZE TABLE analyzes and stores the key distribution for a table.\nDuring the analysis, the table is locked with a read lock for InnoDB\nand MyISAM. This statement works with InnoDB, Aria and MyISAM tables.\nFor MyISAM tables, this statement is equivalent to using myisamchk\n--analyze.\n\nFor more information on how the analysis works within InnoDB, see\nhttp://dev.mysql.com/doc/refman/5.5/en/innodb-restrictions.html.\n\nMySQL uses the stored key distribution to decide the order in which\ntables should be joined when you perform a join on something other than\na constant. In addition, key distributions can be used when deciding\nwhich indexes to use for a specific table within a query.\n\nThis statement requires SELECT and INSERT privileges for the table.\n\nANALYZE TABLE is supported for partitioned tables, and you can use\nALTER TABLE ... ANALYZE PARTITION to analyze one or more partitions;\nfor more information, see [HELP ALTER TABLE], and\nhttp://dev.mysql.com/doc/refman/5.5/en/partitioning-maintenance.html.\n\nURL: https://mariadb.com/kb/en/analyze-table/\n\n','','https://mariadb.com/kb/en/analyze-table/'),(471,'MICROSECOND',31,'Syntax:\nMICROSECOND(expr)\n\nReturns the microseconds from the time or datetime expression expr as a\nnumber in the range from 0 to 999999.\n\nURL: https://mariadb.com/kb/en/microsecond/\n\n','MariaDB> SELECT MICROSECOND(\'12:00:00.123456\');\n -> 123456\nMariaDB> SELECT MICROSECOND(\'2009-12-31 23:59:59.000010\');\n -> 10\n','https://mariadb.com/kb/en/microsecond/'),(472,'CONSTRAINT',39,'InnoDB supports foreign keys, which let you cross-reference related\ndata across tables, and foreign key constraints, which help keep this\nspread-out data consistent. The syntax for an InnoDB foreign key\nconstraint definition in the CREATE TABLE or ALTER TABLE statement\nlooks like this:\n\n[CONSTRAINT [symbol]] FOREIGN KEY\n [index_name] (index_col_name, ...)\n REFERENCES tbl_name (index_col_name,...)\n [ON DELETE reference_option]\n [ON UPDATE reference_option]\n\nreference_option:\n RESTRICT | CASCADE | SET NULL | NO ACTION\n\nURL: https://mariadb.com/kb/en/constraint/\n\n','CREATE TABLE product (category INT NOT NULL, id INT NOT NULL,\n price DECIMAL,\n PRIMARY KEY(category, id)) ENGINE=INNODB;\nCREATE TABLE customer (id INT NOT NULL,\n PRIMARY KEY (id)) ENGINE=INNODB;\nCREATE TABLE product_order (no INT NOT NULL AUTO_INCREMENT,\n product_category INT NOT NULL,\n product_id INT NOT NULL,\n customer_id INT NOT NULL,\n PRIMARY KEY(no),\n INDEX (product_category, product_id),\n FOREIGN KEY (product_category, product_id)\n REFERENCES product(category, id)\n ON UPDATE CASCADE ON DELETE RESTRICT,\n INDEX (customer_id),\n FOREIGN KEY (customer_id)\n REFERENCES customer(id)) ENGINE=INNODB;\n','https://mariadb.com/kb/en/constraint/'),(473,'CREATE SERVER',39,'Syntax:\nCREATE SERVER server_name\n FOREIGN DATA WRAPPER wrapper_name\n OPTIONS (option [, option] ...)\n\noption:\n { HOST character-literal\n | DATABASE character-literal\n | USER character-literal\n | PASSWORD character-literal\n | SOCKET character-literal\n | OWNER character-literal\n | PORT numeric-literal }\n\nThis statement creates the definition of a server for use with the\nFEDERATED storage engine. The CREATE SERVER statement creates a new row\nwithin the servers table within the mysql database. This statement\nrequires the SUPER privilege.\n\nThe server_name should be a unique reference to the server. Server\ndefinitions are global within the scope of the server, it is not\npossible to qualify the server definition to a specific database.\nserver_name has a maximum length of 64 characters (names longer than 64\ncharacters are silently truncated), and is case insensitive. You may\nspecify the name as a quoted string.\n\nThe wrapper_name should be mysql, and may be quoted with single\nquotation marks. Other values for wrapper_name are not currently\nsupported.\n\nFor each option you must specify either a character literal or numeric\nliteral. Character literals are UTF-8, support a maximum length of 64\ncharacters and default to a blank (empty) string. String literals are\nsilently truncated to 64 characters. Numeric literals must be a number\nbetween 0 and 9999, default value is 0.\n\n*Note*: Note that the OWNER option is currently not applied, and has no\neffect on the ownership or operation of the server connection that is\ncreated.\n\nThe CREATE SERVER statement creates an entry in the mysql.servers table\nthat can later be used with the CREATE TABLE statement when creating a\nFEDERATED table. The options that you specify will be used to populate\nthe columns in the mysql.servers table. The table columns are\nServer_name, Host, Db, Username, Password, Port and Socket.\n\nURL: https://mariadb.com/kb/en/create-server/\n\n','CREATE SERVER s\nFOREIGN DATA WRAPPER mysql\nOPTIONS (USER \'Remote\', HOST \'192.168.1.106\', DATABASE \'test\');\n','https://mariadb.com/kb/en/create-server/'),(474,'FIELD',37,'Syntax:\nFIELD(str,str1,str2,str3,...)\n\nReturns the index (position) of str in the str1, str2, str3, ... list.\nReturns 0 if str is not found.\n\nIf all arguments to FIELD() are strings, all arguments are compared as\nstrings. If all arguments are numbers, they are compared as numbers.\nOtherwise, the arguments are compared as double.\n\nIf str is NULL, the return value is 0 because NULL fails equality\ncomparison with any value. FIELD() is the complement of ELT().\n\nURL: https://mariadb.com/kb/en/field/\n\n','MariaDB> SELECT FIELD(\'ej\', \'Hej\', \'ej\', \'Heja\', \'hej\', \'foo\');\n -> 2\nMariaDB> SELECT FIELD(\'fo\', \'Hej\', \'ej\', \'Heja\', \'hej\', \'foo\');\n -> 0\n','https://mariadb.com/kb/en/field/'),(475,'MAKETIME',31,'Syntax:\nMAKETIME(hour,minute,second)\n\nReturns a time value calculated from the hour, minute, and second\narguments.\n\nURL: https://mariadb.com/kb/en/maketime/\n\n','MariaDB> SELECT MAKETIME(12,15,30);\n -> \'12:15:30\'\n','https://mariadb.com/kb/en/maketime/'),(476,'CURDATE',31,'Syntax:\nCURDATE()\n\nReturns the current date as a value in \'YYYY-MM-DD\' or YYYYMMDD format,\ndepending on whether the function is used in a string or numeric\ncontext.\n\nURL: https://mariadb.com/kb/en/curdate/\n\n','MariaDB> SELECT CURDATE();\n -> \'2008-06-13\'\nMariaDB> SELECT CURDATE() + 0;\n -> 20080613\n','https://mariadb.com/kb/en/curdate/'),(477,'SET PASSWORD',10,'Syntax:\nSET PASSWORD [FOR user] =\n {\n PASSWORD(\'cleartext password\')\n | OLD_PASSWORD(\'cleartext password\')\n | \'encrypted password\'\n }\n\nThe SET PASSWORD statement assigns a password to an existing MySQL user\naccount. When the read_only system variable is enabled, the SUPER\nprivilege is required to use SET PASSWORD, in addition to whatever\nother privileges might be required.\n\nIf the password is specified using the PASSWORD() or OLD_PASSWORD()\nfunction, the cleartext (unencrypted) password should be given as the\nargument to the function, which hashes the password and returns the\nencrypted password string. If the password is specified without using\neither function, it should be the already encrypted password value as a\nliteral string. In all cases, the encrypted password string must be in\nthe format required by the authentication method used for the account.\n\nThe old_passwords system variable value determines the hashing method\nused by PASSWORD(). If you specify the password using that function and\nSET PASSWORD rejects the password as not being in the correct format,\nit may be necessary to set old_passwords to change the hashing method.\nFor descriptions of the permitted values, see\nhttps://mariadb.com/kb/en/server-system-variables#old_passwords.\n\nWith no FOR user clause, this statement sets the password for the\ncurrent user. (To see which account the server authenticated you as,\ninvoke the CURRENT_USER() function.) Any client who successfully\nconnects to the server using a nonanonymous account can change the\npassword for that account.\n\nWith a FOR user clause, this statement sets the password for the named\nuser. You must have the UPDATE privilege for the mysql database to do\nthis. The user account name uses the format described in\nhttps://mariadb.com/kb/en/create-user#account-names. The user\nvalue should be given as \'user_name\'@\'host_name\', where \'user_name\' and\n\'host_name\' are exactly as listed in the User and Host columns of the\nmysql.user table row. (If you specify only a user name, a host name of\n\'%\' is used.) For example, to set the password for an account with User\nand Host column values of \'bob\' and \'%.example.org\', write the\nstatement like this:\n\nSET PASSWORD FOR \'bob\'@\'%.example.org\' = PASSWORD(\'cleartext password\');\n\nURL: https://mariadb.com/kb/en/set-password/\n\n','','https://mariadb.com/kb/en/set-password/'),(478,'ALTER TABLESPACE',39,'Syntax:\nALTER TABLESPACE tablespace_name\n {ADD|DROP} DATAFILE \'file_name\'\n [INITIAL_SIZE [=] size]\n [WAIT]\n ENGINE [=] engine_name\n\nThis statement is used with NDB cluster, which is not supported by MariaDB.\n\nURL: https://mariadb.com/kb/en/alter-tablespace/\n\n','','https://mariadb.com/kb/en/alter-tablespace/'),(479,'IF FUNCTION',7,'Syntax:\nIF(expr1,expr2,expr3)\n\nIf expr1 is TRUE (expr1 <> 0 and expr1 <> NULL) then IF() returns\nexpr2; otherwise it returns expr3. IF() returns a numeric or string\nvalue, depending on the context in which it is used.\n\nURL: https://mariadb.com/kb/en/if-function/\n\n','MariaDB> SELECT IF(1>2,2,3);\n -> 3\nMariaDB> SELECT IF(1<2,\'yes\',\'no\');\n -> \'yes\'\nMariaDB> SELECT IF(STRCMP(\'test\',\'test1\'),\'no\',\'yes\');\n -> \'no\'\n','https://mariadb.com/kb/en/if-function/'),(480,'ENUM',22,'ENUM(\'value1\',\'value2\',...) [CHARACTER SET charset_name] [COLLATE\ncollation_name]\n\nAn enumeration. A string object that can have only one value, chosen\nfrom the list of values \'value1\', \'value2\', ..., NULL or the special \'\'\nerror value. An ENUM column can have a maximum of 65,535 distinct\nvalues. ENUM values are represented internally as integers.\n\nURL: https://mariadb.com/kb/en/enum/\n\n','','https://mariadb.com/kb/en/enum/'),(481,'DATABASE',17,'Syntax:\nDATABASE()\n\nReturns the default (current) database name as a string in the utf8\ncharacter set. If there is no default database, DATABASE() returns\nNULL. Within a stored routine, the default database is the database\nthat the routine is associated with, which is not necessarily the same\nas the database that is the default in the calling context.\n\nURL: https://mariadb.com/kb/en/database/\n\n','MariaDB> SELECT DATABASE();\n -> \'test\'\n','https://mariadb.com/kb/en/database/'),(482,'POINTFROMWKB',32,'PointFromWKB(wkb[,srid])\n\nConstructs a POINT value using its WKB representation and SRID.\n\nURL: https://mariadb.com/kb/en/pointfromwkb/\n\n','','https://mariadb.com/kb/en/pointfromwkb/'),(483,'POWER',4,'Syntax:\nPOWER(X,Y)\n\nThis is a synonym for POW().\n\nURL: https://mariadb.com/kb/en/power/\n\n','','https://mariadb.com/kb/en/power/'),(484,'ATAN',4,'Syntax:\nATAN(X)\n\nReturns the arc tangent of X, that is, the value whose tangent is X.\n\nURL: https://mariadb.com/kb/en/atan/\n\n','MariaDB> SELECT ATAN(2);\n -> 1.1071487177941\nMariaDB> SELECT ATAN(-2);\n -> -1.1071487177941\n','https://mariadb.com/kb/en/atan/'),(485,'STRCMP',37,'Syntax:\nSTRCMP(expr1,expr2)\n\nSTRCMP() returns 0 if the strings are the same, -1 if the first\nargument is smaller than the second according to the current sort\norder, and 1 otherwise.\n\nURL: https://mariadb.com/kb/en/strcmp/\n\n','MariaDB> SELECT STRCMP(\'text\', \'text2\');\n -> -1\nMariaDB> SELECT STRCMP(\'text2\', \'text\');\n -> 1\nMariaDB> SELECT STRCMP(\'text\', \'text\');\n -> 0\n','https://mariadb.com/kb/en/strcmp/'),(486,'INSERT DELAYED',27,'Syntax:\nINSERT DELAYED ...\n\nThe DELAYED option for the INSERT statement is a MySQL extension to\nstandard SQL that is very useful if you have clients that cannot or\nneed not wait for the INSERT to complete. This is a common situation\nwhen you use MySQL for logging and you also periodically run SELECT and\nUPDATE statements that take a long time to complete.\n\nWhen a client uses INSERT DELAYED, it gets an okay from the server at\nonce, and the row is queued to be inserted when the table is not in use\nby any other thread.\n\nAnother major benefit of using INSERT DELAYED is that inserts from many\nclients are bundled together and written in one block. This is much\nfaster than performing many separate inserts.\n\nNote that INSERT DELAYED is slower than a normal INSERT if the table is\nnot otherwise in use. There is also the additional overhead for the\nserver to handle a separate thread for each table for which there are\ndelayed rows. This means that you should use INSERT DELAYED only when\nyou are really sure that you need it.\n\nThe queued rows are held only in memory until they are inserted into\nthe table. This means that if you terminate mysqld forcibly (for\nexample, with kill -9) or if mysqld dies unexpectedly, any queued rows\nthat have not been written to disk are lost.\n\nThere are some constraints on the use of DELAYED:\n\no INSERT DELAYED works only with MyISAM, MEMORY, ARCHIVE, and BLACKHOLE\n tables. For engines that do not support DELAYED, an error occurs.\n\no An error occurs for INSERT DELAYED if used with a table that has been\n locked with LOCK TABLES because the insert must be handled by a\n separate thread, not by the session that holds the lock.\n\no For MyISAM tables, if there are no free blocks in the middle of the\n data file, concurrent SELECT and INSERT statements are supported.\n Under these circumstances, you very seldom need to use INSERT DELAYED\n with MyISAM.\n\no INSERT DELAYED should be used only for INSERT statements that specify\n value lists. The server ignores DELAYED for INSERT ... SELECT or\n INSERT ... ON DUPLICATE KEY UPDATE statements.\n\no Because the INSERT DELAYED statement returns immediately, before the\n rows are inserted, you cannot use LAST_INSERT_ID() to get the\n AUTO_INCREMENT value that the statement might generate.\n\no DELAYED rows are not visible to SELECT statements until they actually\n have been inserted.\n\no Prior to MySQL 5.5.7, INSERT DELAYED was treated as a normal INSERT\n if the statement inserted multiple rows, binary logging was enabled,\n and the global logging format was statement-based (that is, whenever\n binlog_format was set to STATEMENT). Beginning with MySQL 5.5.7,\n INSERT DELAYED is always handled as a simple INSERT (that is, without\n the DELAYED option) whenever the value of binlog_format is STATEMENT\n or MIXED. (In the latter case, the statement no longer triggers a\n switch to row-based logging, and so is logged using the\n statement-based format.)\n\n This does not apply when using row-based binary logging mode\n (binlog_format set to ROW), in which INSERT DELAYED statements are\n always executed using the DELAYED option as specified, and logged as\n row-update events.\n\no DELAYED is ignored on slave replication servers, so that INSERT\n DELAYED is treated as a normal INSERT on slaves. This is because\n DELAYED could cause the slave to have different data than the master.\n\no Pending INSERT DELAYED statements are lost if a table is write locked\n and ALTER TABLE is used to modify the table structure.\n\no INSERT DELAYED is not supported for views.\n\no INSERT DELAYED is not supported for partitioned tables.\n\nURL: https://mariadb.com/kb/en/insert-delayed/\n\n','','https://mariadb.com/kb/en/insert-delayed/'),(487,'SHOW PROFILE',26,'Syntax:\nSHOW PROFILE [type [, type] ... ]\n [FOR QUERY n]\n [LIMIT row_count [OFFSET offset]]\n\ntype:\n ALL\n | BLOCK IO\n | CONTEXT SWITCHES\n | CPU\n | IPC\n | MEMORY\n | PAGE FAULTS\n | SOURCE\n | SWAPS\n\nThe SHOW PROFILE and SHOW PROFILES statements display profiling\ninformation that indicates resource usage for statements executed\nduring the course of the current session.\n\nProfiling is controlled by the profiling session variable, which has a\ndefault value of 0 (OFF). Profiling is enabled by setting profiling to\n1 or ON:\n\nMariaDB> SET profiling = 1;\n\nSHOW PROFILES displays a list of the most recent statements sent to the\nserver. The size of the list is controlled by the\nprofiling_history_size session variable, which has a default value of\n15. The maximum value is 100. Setting the value to 0 has the practical\neffect of disabling profiling.\n\nAll statements are profiled except SHOW PROFILE and SHOW PROFILES, so\nyou will find neither of those statements in the profile list.\nMalformed statements are profiled. For example, SHOW PROFILING is an\nillegal statement, and a syntax error occurs if you try to execute it,\nbut it will show up in the profiling list.\n\nSHOW PROFILE displays detailed information about a single statement.\nWithout the FOR QUERY n clause, the output pertains to the most\nrecently executed statement. If FOR QUERY n is included, SHOW PROFILE\ndisplays information for statement n. The values of n correspond to the\nQuery_ID values displayed by SHOW PROFILES.\n\nThe LIMIT row_count clause may be given to limit the output to\nrow_count rows. If LIMIT is given, OFFSET offset may be added to begin\nthe output offset rows into the full set of rows.\n\nBy default, SHOW PROFILE displays Status and Duration columns. The\nStatus values are like the State values displayed by SHOW PROCESSLIST,\nalthough there might be some minor differences in interpretion for the\ntwo statements for some status values (see\nhttp://dev.mysql.com/doc/refman/5.5/en/thread-information.html).\n\nOptional type values may be specified to display specific additional\ntypes of information:\n\no ALL displays all information\n\no BLOCK IO displays counts for block input and output operations\n\no CONTEXT SWITCHES displays counts for voluntary and involuntary\n context switches\n\no CPU displays user and system CPU usage times\n\no IPC displays counts for messages sent and received\n\no MEMORY is not currently implemented\n\no PAGE FAULTS displays counts for major and minor page faults\n\no SOURCE displays the names of functions from the source code, together\n with the name and line number of the file in which the function\n occurs\n\no SWAPS displays swap counts\n\nProfiling is enabled per session. When a session ends, its profiling\ninformation is lost.\n\nURL: https://mariadb.com/kb/en/show-profile/\n\n','MariaDB> SELECT @@profiling;\n+-------------+\n| @@profiling |\n+-------------+\n| 0 |\n+-------------+\n1 row in set (0.00 sec)\n\nMariaDB> SET profiling = 1;\nQuery OK, 0 rows affected (0.00 sec)\n\nMariaDB> DROP TABLE IF EXISTS t1;\nQuery OK, 0 rows affected, 1 warning (0.00 sec)\n\nMariaDB> CREATE TABLE T1 (id INT);\nQuery OK, 0 rows affected (0.01 sec)\n\nMariaDB> SHOW PROFILES;\n+----------+----------+--------------------------+\n| Query_ID | Duration | Query |\n+----------+----------+--------------------------+\n| 0 | 0.000088 | SET PROFILING = 1 |\n| 1 | 0.000136 | DROP TABLE IF EXISTS t1 |\n| 2 | 0.011947 | CREATE TABLE t1 (id INT) |\n+----------+----------+--------------------------+\n3 rows in set (0.00 sec)\n\nMariaDB> SHOW PROFILE;\n+----------------------+----------+\n| Status | Duration |\n+----------------------+----------+\n| checking permissions | 0.000040 |\n| creating table | 0.000056 |\n| After create | 0.011363 |\n| query end | 0.000375 |\n| freeing items | 0.000089 |\n| logging slow query | 0.000019 |\n| cleaning up | 0.000005 |\n+----------------------+----------+\n7 rows in set (0.00 sec)\n\nMariaDB> SHOW PROFILE FOR QUERY 1;\n+--------------------+----------+\n| Status | Duration |\n+--------------------+----------+\n| query end | 0.000107 |\n| freeing items | 0.000008 |\n| logging slow query | 0.000015 |\n| cleaning up | 0.000006 |\n+--------------------+----------+\n4 rows in set (0.00 sec)\n\nMariaDB> SHOW PROFILE CPU FOR QUERY 2;\n+----------------------+----------+----------+------------+\n| Status | Duration | CPU_user | CPU_system |\n+----------------------+----------+----------+------------+\n| checking permissions | 0.000040 | 0.000038 | 0.000002 |\n| creating table | 0.000056 | 0.000028 | 0.000028 |\n| After create | 0.011363 | 0.000217 | 0.001571 |\n| query end | 0.000375 | 0.000013 | 0.000028 |\n| freeing items | 0.000089 | 0.000010 | 0.000014 |\n| logging slow query | 0.000019 | 0.000009 | 0.000010 |\n| cleaning up | 0.000005 | 0.000003 | 0.000002 |\n+----------------------+----------+----------+------------+\n7 rows in set (0.00 sec)\n','https://mariadb.com/kb/en/show-profile/'),(488,'SHOW PROCEDURE CODE',26,'Syntax:\nSHOW PROCEDURE CODE proc_name\n\nThis statement is a MySQL extension that is available only for servers\nthat have been built with debugging support. It displays a\nrepresentation of the internal implementation of the named stored\nprocedure. A similar statement, SHOW FUNCTION CODE, displays\ninformation about stored functions (see [HELP SHOW FUNCTION CODE]).\n\nBoth statements require that you be the owner of the routine or have\nSELECT access to the mysql.proc table.\n\nIf the named routine is available, each statement produces a result\nset. Each row in the result set corresponds to one \"instruction\" in the\nroutine. The first column is Pos, which is an ordinal number beginning\nwith 0. The second column is Instruction, which contains an SQL\nstatement (usually changed from the original source), or a directive\nwhich has meaning only to the stored-routine handler.\n\nURL: https://mariadb.com/kb/en/show-procedure-code/\n\n','MariaDB> DELIMITER //\nMariaDB> CREATE PROCEDURE p1 ()\n -> BEGIN\n -> DECLARE fanta INT DEFAULT 55;\n -> DROP TABLE t2;\n -> LOOP\n -> INSERT INTO t3 VALUES (fanta);\n -> END LOOP;\n -> END//\nQuery OK, 0 rows affected (0.00 sec)\n\nMariaDB> SHOW PROCEDURE CODE p1//\n+-----+----------------------------------------+\n| Pos | Instruction |\n+-----+----------------------------------------+\n| 0 | set fanta@0 55 |\n| 1 | stmt 9 \"DROP TABLE t2\" |\n| 2 | stmt 5 \"INSERT INTO t3 VALUES (fanta)\" |\n| 3 | jump 2 |\n+-----+----------------------------------------+\n4 rows in set (0.00 sec)\n','https://mariadb.com/kb/en/show-procedure-code/'),(489,'MEDIUMTEXT',22,'MEDIUMTEXT [CHARACTER SET charset_name] [COLLATE collation_name]\n\nA TEXT column with a maximum length of 16,777,215 (224 - 1) characters.\nThe effective maximum length is less if the value contains multi-byte\ncharacters. Each MEDIUMTEXT value is stored using a 3-byte length\nprefix that indicates the number of bytes in the value.\n\nURL: https://mariadb.com/kb/en/mediumtext/\n\n','','https://mariadb.com/kb/en/mediumtext/'),(490,'LN',4,'Syntax:\nLN(X)\n\nReturns the natural logarithm of X; that is, the base-e logarithm of X.\nIf X is less than or equal to 0, then NULL is returned.\n\nURL: https://mariadb.com/kb/en/ln/\n\n','MariaDB> SELECT LN(2);\n -> 0.69314718055995\nMariaDB> SELECT LN(-2);\n -> NULL\n','https://mariadb.com/kb/en/ln/'),(491,'RETURN',23,'Syntax:\nRETURN expr\n\nThe RETURN statement terminates execution of a stored function and\nreturns the value expr to the function caller. There must be at least\none RETURN statement in a stored function. There may be more than one\nif the function has multiple exit points.\n\nThis statement is not used in stored procedures, triggers, or events.\nThe LEAVE statement can be used to exit a stored program of those\ntypes.\n\nURL: https://mariadb.com/kb/en/return/\n\n','','https://mariadb.com/kb/en/return/'),(492,'SHOW COLLATION',26,'Syntax:\nSHOW COLLATION\n [LIKE \'pattern\' | WHERE expr]\n\nThis statement lists collations supported by the server. By default,\nthe output from SHOW COLLATION includes all available collations. The\nLIKE clause, if present, indicates which collation names to match. The\nWHERE clause can be given to select rows using more general conditions,\nas discussed in\nhttps://mariadb.com/kb/en/extended-show/. For example:\n\nMariaDB> SHOW COLLATION LIKE \'latin1%\';\n+-------------------+---------+----+---------+----------+---------+\n| Collation | Charset | Id | Default | Compiled | Sortlen |\n+-------------------+---------+----+---------+----------+---------+\n| latin1_german1_ci | latin1 | 5 | | | 0 |\n| latin1_swedish_ci | latin1 | 8 | Yes | Yes | 0 |\n| latin1_danish_ci | latin1 | 15 | | | 0 |\n| latin1_german2_ci | latin1 | 31 | | Yes | 2 |\n| latin1_bin | latin1 | 47 | | Yes | 0 |\n| latin1_general_ci | latin1 | 48 | | | 0 |\n| latin1_general_cs | latin1 | 49 | | | 0 |\n| latin1_spanish_ci | latin1 | 94 | | | 0 |\n+-------------------+---------+----+---------+----------+---------+\n\nURL: https://mariadb.com/kb/en/show-collation/\n\n','','https://mariadb.com/kb/en/show-collation/'),(493,'LOG',4,'Syntax:\nLOG(X), LOG(B,X)\n\nIf called with one parameter, this function returns the natural\nlogarithm of X. If X is less than or equal to 0, then NULL is returned.\n\nThe inverse of this function (when called with a single argument) is\nthe EXP() function.\n\nURL: https://mariadb.com/kb/en/log/\n\n','MariaDB> SELECT LOG(2);\n -> 0.69314718055995\nMariaDB> SELECT LOG(-2);\n -> NULL\n','https://mariadb.com/kb/en/log/'),(494,'SET SQL_LOG_BIN',8,'Syntax:\nSET sql_log_bin = {0|1}\n\nThe sql_log_bin variable controls whether logging to the binary log is\ndone. The default value is 1 (do logging). To change logging for the\ncurrent session, change the session value of this variable. The session\nuser must have the SUPER privilege to set this variable.\n\nBeginning with MySQL 5.5.5, it is no longer possible to set\n@@session.sql_log_bin within a transaction or subquery. (Bug #53437)\n\nURL: https://mariadb.com/kb/en/set-sql_log_bin/\n\n','','https://mariadb.com/kb/en/set-sql_log_bin/'),(495,'!=',18,'Syntax:\n<>, !=\n\nNot equal:\n\nURL: https://mariadb.com/kb/en/not-equal/\n\n','MariaDB> SELECT \'.01\' <> \'0.01\';\n -> 1\nMariaDB> SELECT .01 <> \'0.01\';\n -> 0\nMariaDB> SELECT \'zapp\' <> \'zappp\';\n -> 1\n','https://mariadb.com/kb/en/not-equal/'),(496,'WHILE',23,'Syntax:\n[begin_label:] WHILE search_condition DO\n statement_list\nEND WHILE [end_label]\n\nThe statement list within a WHILE statement is repeated as long as the\nsearch_condition expression is true. statement_list consists of one or\nmore SQL statements, each terminated by a semicolon (;) statement\ndelimiter.\n\nA WHILE statement can be labeled. For the rules regarding label use,\nsee [HELP labels].\n\nURL: https://mariadb.com/kb/en/while/\n\n','CREATE PROCEDURE dowhile()\nBEGIN\n DECLARE v1 INT DEFAULT 5;\n\n WHILE v1 > 0 DO\n ...\n SET v1 = v1 - 1;\n END WHILE;\nEND;\n','https://mariadb.com/kb/en/while/'),(497,'AES_DECRYPT',12,'Syntax:\nAES_DECRYPT(crypt_str,key_str)\n\nThis function decrypts data using the official AES (Advanced Encryption\nStandard) algorithm. For more information, see the description of\nAES_ENCRYPT().\n\nURL: https://mariadb.com/kb/en/aes_decrypt/\n\n','','https://mariadb.com/kb/en/aes_decrypt/'),(498,'DAYNAME',31,'Syntax:\nDAYNAME(date)\n\nReturns the name of the weekday for date. The language used for the\nname is controlled by the value of the lc_time_names system variable\n(https://mariadb.com/kb/en/server-system-variables#lc_time_names).\n\nURL: https://mariadb.com/kb/en/dayname/\n\n','MariaDB> SELECT DAYNAME(\'2007-02-03\');\n -> \'Saturday\'\n','https://mariadb.com/kb/en/dayname/'),(499,'COERCIBILITY',17,'Syntax:\nCOERCIBILITY(str)\n\nReturns the collation coercibility value of the string argument.\n\nURL: https://mariadb.com/kb/en/coercibility/\n\n','MariaDB> SELECT COERCIBILITY(\'abc\' COLLATE latin1_swedish_ci);\n -> 0\nMariaDB> SELECT COERCIBILITY(USER());\n -> 3\nMariaDB> SELECT COERCIBILITY(\'abc\');\n -> 4\n','https://mariadb.com/kb/en/coercibility/'),(500,'INT',22,'INT[(M)] [UNSIGNED] [ZEROFILL]\n\nA normal-size integer. The signed range is -2147483648 to 2147483647.\nThe unsigned range is 0 to 4294967295.\n\nURL: https://mariadb.com/kb/en/int/\n\n','','https://mariadb.com/kb/en/int/'),(501,'GLENGTH',13,'GLength(ls)\n\nReturns as a double-precision number the length of the LineString value\nls in its associated spatial reference.\n\nURL: https://mariadb.com/kb/en/glength/\n\n','MariaDB> SET @ls = \'LineString(1 1,2 2,3 3)\';\nMariaDB> SELECT GLength(GeomFromText(@ls));\n+----------------------------+\n| GLength(GeomFromText(@ls)) |\n+----------------------------+\n| 2.8284271247462 |\n+----------------------------+\n','https://mariadb.com/kb/en/glength/'),(502,'RADIANS',4,'Syntax:\nRADIANS(X)\n\nReturns the argument X, converted from degrees to radians. (Note that\nπ radians equals 180 degrees.)\n\nURL: https://mariadb.com/kb/en/radians/\n\n','MariaDB> SELECT RADIANS(90);\n -> 1.5707963267949\n','https://mariadb.com/kb/en/radians/'),(503,'COLLATION',17,'Syntax:\nCOLLATION(str)\n\nReturns the collation of the string argument.\n\nURL: https://mariadb.com/kb/en/collation/\n\n','MariaDB> SELECT COLLATION(\'abc\');\n -> \'latin1_swedish_ci\'\nMariaDB> SELECT COLLATION(_utf8\'abc\');\n -> \'utf8_general_ci\'\n','https://mariadb.com/kb/en/collation/'),(504,'COALESCE',18,'Syntax:\nCOALESCE(value,...)\n\nReturns the first non-NULL value in the list, or NULL if there are no\nnon-NULL values.\n\nURL: https://mariadb.com/kb/en/coalesce/\n\n','MariaDB> SELECT COALESCE(NULL,1);\n -> 1\nMariaDB> SELECT COALESCE(NULL,NULL,NULL);\n -> NULL\n','https://mariadb.com/kb/en/coalesce/'),(505,'VERSION',17,'Syntax:\nVERSION()\n\nReturns a string that indicates the MySQL server version. The string\nuses the utf8 character set. The value might have a suffix in addition\nto the version number. See the description of the version system\nvariable in\nhttps://mariadb.com/kb/en/server-system-variables#version.\n\nURL: https://mariadb.com/kb/en/version/\n\n','MariaDB> SELECT VERSION();\n -> \'5.5.29-standard\'\n','https://mariadb.com/kb/en/version/'),(506,'MAKE_SET',37,'Syntax:\nMAKE_SET(bits,str1,str2,...)\n\nReturns a set value (a string containing substrings separated by \",\"\ncharacters) consisting of the strings that have the corresponding bit\nin bits set. str1 corresponds to bit 0, str2 to bit 1, and so on. NULL\nvalues in str1, str2, ... are not appended to the result.\n\nURL: https://mariadb.com/kb/en/make_set/\n\n','MariaDB> SELECT MAKE_SET(1,\'a\',\'b\',\'c\');\n -> \'a\'\nMariaDB> SELECT MAKE_SET(1 | 4,\'hello\',\'nice\',\'world\');\n -> \'hello,world\'\nMariaDB> SELECT MAKE_SET(1 | 4,\'hello\',\'nice\',NULL,\'world\');\n -> \'hello\'\nMariaDB> SELECT MAKE_SET(0,\'a\',\'b\',\'c\');\n -> \'\'\n','https://mariadb.com/kb/en/make_set/'),(507,'FIND_IN_SET',37,'Syntax:\nFIND_IN_SET(str,strlist)\n\nReturns a value in the range of 1 to N if the string str is in the\nstring list strlist consisting of N substrings. A string list is a\nstring composed of substrings separated by \",\" characters. If the first\nargument is a constant string and the second is a column of type SET,\nthe FIND_IN_SET() function is optimized to use bit arithmetic. Returns\n0 if str is not in strlist or if strlist is the empty string. Returns\nNULL if either argument is NULL. This function does not work properly\nif the first argument contains a comma (\",\") character.\n\nURL: https://mariadb.com/kb/en/find_in_set/\n\n','MariaDB> SELECT FIND_IN_SET(\'b\',\'a,b,c,d\');\n -> 2\n','https://mariadb.com/kb/en/find_in_set/');
+/*!40000 ALTER TABLE `help_topic` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `host`
+--
+
+DROP TABLE IF EXISTS `host`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `host` (
+ `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Db` char(64) COLLATE utf8_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',
+ `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',
+ `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',
+ `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',
+ `Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+ `Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+ PRIMARY KEY (`Host`,`Db`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Host privileges; Merged with database privileges';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `host`
+--
+
+LOCK TABLES `host` WRITE;
+/*!40000 ALTER TABLE `host` DISABLE KEYS */;
+/*!40000 ALTER TABLE `host` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `index_stats`
+--
+
+DROP TABLE IF EXISTS `index_stats`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `index_stats` (
+ `db_name` varchar(64) COLLATE utf8_bin NOT NULL,
+ `table_name` varchar(64) COLLATE utf8_bin NOT NULL,
+ `index_name` varchar(64) COLLATE utf8_bin NOT NULL,
+ `prefix_arity` int(11) unsigned NOT NULL,
+ `avg_frequency` decimal(12,4) DEFAULT NULL,
+ PRIMARY KEY (`db_name`,`table_name`,`index_name`,`prefix_arity`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Statistics on Indexes';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `index_stats`
+--
+
+LOCK TABLES `index_stats` WRITE;
+/*!40000 ALTER TABLE `index_stats` DISABLE KEYS */;
+/*!40000 ALTER TABLE `index_stats` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `innodb_index_stats`
+--
+
+DROP TABLE IF EXISTS `innodb_index_stats`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `innodb_index_stats` (
+ `database_name` varchar(64) COLLATE utf8_bin NOT NULL,
+ `table_name` varchar(64) COLLATE utf8_bin NOT NULL,
+ `index_name` varchar(64) COLLATE utf8_bin NOT NULL,
+ `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `stat_name` varchar(64) COLLATE utf8_bin NOT NULL,
+ `stat_value` bigint(20) unsigned NOT NULL,
+ `sample_size` bigint(20) unsigned DEFAULT NULL,
+ `stat_description` varchar(1024) COLLATE utf8_bin NOT NULL,
+ PRIMARY KEY (`database_name`,`table_name`,`index_name`,`stat_name`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin STATS_PERSISTENT=0;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `innodb_index_stats`
+--
+
+LOCK TABLES `innodb_index_stats` WRITE;
+/*!40000 ALTER TABLE `innodb_index_stats` DISABLE KEYS */;
+INSERT INTO `innodb_index_stats` VALUES ('mysql','gtid_slave_pos','PRIMARY','2020-05-31 16:12:54','n_diff_pfx01',0,1,'domain_id'),('mysql','gtid_slave_pos','PRIMARY','2020-05-31 16:12:54','n_diff_pfx02',0,1,'domain_id,sub_id'),('mysql','gtid_slave_pos','PRIMARY','2020-05-31 16:12:54','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('mysql','gtid_slave_pos','PRIMARY','2020-05-31 16:12:54','size',1,NULL,'Number of pages in the index');
+/*!40000 ALTER TABLE `innodb_index_stats` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `innodb_table_stats`
+--
+
+DROP TABLE IF EXISTS `innodb_table_stats`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `innodb_table_stats` (
+ `database_name` varchar(64) COLLATE utf8_bin NOT NULL,
+ `table_name` varchar(64) COLLATE utf8_bin NOT NULL,
+ `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `n_rows` bigint(20) unsigned NOT NULL,
+ `clustered_index_size` bigint(20) unsigned NOT NULL,
+ `sum_of_other_index_sizes` bigint(20) unsigned NOT NULL,
+ PRIMARY KEY (`database_name`,`table_name`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin STATS_PERSISTENT=0;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `innodb_table_stats`
+--
+
+LOCK TABLES `innodb_table_stats` WRITE;
+/*!40000 ALTER TABLE `innodb_table_stats` DISABLE KEYS */;
+INSERT INTO `innodb_table_stats` VALUES ('mysql','gtid_slave_pos','2020-05-31 16:12:54',0,1,0);
+/*!40000 ALTER TABLE `innodb_table_stats` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `plugin`
+--
+
+DROP TABLE IF EXISTS `plugin`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `plugin` (
+ `name` varchar(64) NOT NULL DEFAULT '',
+ `dl` varchar(128) NOT NULL DEFAULT '',
+ PRIMARY KEY (`name`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='MySQL plugins';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `plugin`
+--
+
+LOCK TABLES `plugin` WRITE;
+/*!40000 ALTER TABLE `plugin` DISABLE KEYS */;
+/*!40000 ALTER TABLE `plugin` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `proc`
+--
+
+DROP TABLE IF EXISTS `proc`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `proc` (
+ `db` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
+ `name` char(64) NOT NULL DEFAULT '',
+ `type` enum('FUNCTION','PROCEDURE') NOT NULL,
+ `specific_name` char(64) NOT NULL DEFAULT '',
+ `language` enum('SQL') NOT NULL DEFAULT 'SQL',
+ `sql_data_access` enum('CONTAINS_SQL','NO_SQL','READS_SQL_DATA','MODIFIES_SQL_DATA') NOT NULL DEFAULT 'CONTAINS_SQL',
+ `is_deterministic` enum('YES','NO') NOT NULL DEFAULT 'NO',
+ `security_type` enum('INVOKER','DEFINER') NOT NULL DEFAULT 'DEFINER',
+ `param_list` blob NOT NULL,
+ `returns` longblob NOT NULL,
+ `body` longblob NOT NULL,
+ `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') 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,
+ `db_collation` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
+ `body_utf8` longblob,
+ PRIMARY KEY (`db`,`name`,`type`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Stored Procedures';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `proc`
+--
+
+LOCK TABLES `proc` WRITE;
+/*!40000 ALTER TABLE `proc` DISABLE KEYS */;
+INSERT INTO `proc` VALUES ('mysql','AddGeometryColumn','PROCEDURE','AddGeometryColumn','SQL','CONTAINS_SQL','NO','INVOKER','catalog varchar(64), t_schema varchar(64),\n t_name varchar(64), geometry_column varchar(64), t_srid int','','begin\n set @qwe= concat(\'ALTER TABLE \', t_schema, \'.\', t_name, \' ADD \', geometry_column,\' GEOMETRY REF_SYSTEM_ID=\', t_srid); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end','root@localhost','2020-05-31 16:13:00','2020-05-31 16:13:00','','','latin1','latin1_swedish_ci','latin1_swedish_ci','begin\n set @qwe= concat(\'ALTER TABLE \', t_schema, \'.\', t_name, \' ADD \', geometry_column,\' GEOMETRY REF_SYSTEM_ID=\', t_srid); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end'),('mysql','DropGeometryColumn','PROCEDURE','DropGeometryColumn','SQL','CONTAINS_SQL','NO','INVOKER','catalog varchar(64), t_schema varchar(64),\n t_name varchar(64), geometry_column varchar(64)','','begin\n set @qwe= concat(\'ALTER TABLE \', t_schema, \'.\', t_name, \' DROP \', geometry_column); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end','root@localhost','2020-05-31 16:13:00','2020-05-31 16:13:00','','','latin1','latin1_swedish_ci','latin1_swedish_ci','begin\n set @qwe= concat(\'ALTER TABLE \', t_schema, \'.\', t_name, \' DROP \', geometry_column); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end');
+/*!40000 ALTER TABLE `proc` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `procs_priv`
+--
+
+DROP TABLE IF EXISTS `procs_priv`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `procs_priv` (
+ `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Routine_name` char(64) CHARACTER SET utf8 NOT NULL DEFAULT '',
+ `Routine_type` enum('FUNCTION','PROCEDURE') COLLATE utf8_bin NOT NULL,
+ `Grantor` char(141) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Proc_priv` set('Execute','Alter Routine','Grant') CHARACTER SET utf8 NOT NULL DEFAULT '',
+ `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ PRIMARY KEY (`Host`,`Db`,`User`,`Routine_name`,`Routine_type`),
+ KEY `Grantor` (`Grantor`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Procedure privileges';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `procs_priv`
+--
+
+LOCK TABLES `procs_priv` WRITE;
+/*!40000 ALTER TABLE `procs_priv` DISABLE KEYS */;
+/*!40000 ALTER TABLE `procs_priv` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `proxies_priv`
+--
+
+DROP TABLE IF EXISTS `proxies_priv`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `proxies_priv` (
+ `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Proxied_host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Proxied_user` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `With_grant` tinyint(1) NOT NULL DEFAULT '0',
+ `Grantor` char(141) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ PRIMARY KEY (`Host`,`User`,`Proxied_host`,`Proxied_user`),
+ KEY `Grantor` (`Grantor`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='User proxy privileges';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `proxies_priv`
+--
+
+LOCK TABLES `proxies_priv` WRITE;
+/*!40000 ALTER TABLE `proxies_priv` DISABLE KEYS */;
+INSERT INTO `proxies_priv` VALUES ('localhost','root','','',1,'','2020-05-31 16:12:54'),('asus','root','','',1,'','2020-05-31 16:12:54');
+/*!40000 ALTER TABLE `proxies_priv` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `roles_mapping`
+--
+
+DROP TABLE IF EXISTS `roles_mapping`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `roles_mapping` (
+ `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Role` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Admin_option` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+ UNIQUE KEY `Host` (`Host`,`User`,`Role`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Granted roles';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `roles_mapping`
+--
+
+LOCK TABLES `roles_mapping` WRITE;
+/*!40000 ALTER TABLE `roles_mapping` DISABLE KEYS */;
+/*!40000 ALTER TABLE `roles_mapping` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `servers`
+--
+
+DROP TABLE IF EXISTS `servers`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `servers` (
+ `Server_name` char(64) NOT NULL DEFAULT '',
+ `Host` char(64) NOT NULL DEFAULT '',
+ `Db` char(64) NOT NULL DEFAULT '',
+ `Username` char(80) NOT NULL DEFAULT '',
+ `Password` char(64) NOT NULL DEFAULT '',
+ `Port` int(4) NOT NULL DEFAULT '0',
+ `Socket` char(64) NOT NULL DEFAULT '',
+ `Wrapper` char(64) NOT NULL DEFAULT '',
+ `Owner` char(64) NOT NULL DEFAULT '',
+ PRIMARY KEY (`Server_name`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='MySQL Foreign Servers table';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `servers`
+--
+
+LOCK TABLES `servers` WRITE;
+/*!40000 ALTER TABLE `servers` DISABLE KEYS */;
+/*!40000 ALTER TABLE `servers` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `table_stats`
+--
+
+DROP TABLE IF EXISTS `table_stats`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `table_stats` (
+ `db_name` varchar(64) COLLATE utf8_bin NOT NULL,
+ `table_name` varchar(64) COLLATE utf8_bin NOT NULL,
+ `cardinality` bigint(21) unsigned DEFAULT NULL,
+ PRIMARY KEY (`db_name`,`table_name`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Statistics on Tables';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `table_stats`
+--
+
+LOCK TABLES `table_stats` WRITE;
+/*!40000 ALTER TABLE `table_stats` DISABLE KEYS */;
+/*!40000 ALTER TABLE `table_stats` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `tables_priv`
+--
+
+DROP TABLE IF EXISTS `tables_priv`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `tables_priv` (
+ `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Grantor` char(141) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `Table_priv` set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') CHARACTER SET utf8 NOT NULL DEFAULT '',
+ `Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '',
+ PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`),
+ KEY `Grantor` (`Grantor`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Table privileges';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `tables_priv`
+--
+
+LOCK TABLES `tables_priv` WRITE;
+/*!40000 ALTER TABLE `tables_priv` DISABLE KEYS */;
+/*!40000 ALTER TABLE `tables_priv` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `time_zone`
+--
+
+DROP TABLE IF EXISTS `time_zone`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `time_zone` (
+ `Time_zone_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `Use_leap_seconds` enum('Y','N') NOT NULL DEFAULT 'N',
+ PRIMARY KEY (`Time_zone_id`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Time zones';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `time_zone`
+--
+
+LOCK TABLES `time_zone` WRITE;
+/*!40000 ALTER TABLE `time_zone` DISABLE KEYS */;
+/*!40000 ALTER TABLE `time_zone` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `time_zone_leap_second`
+--
+
+DROP TABLE IF EXISTS `time_zone_leap_second`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `time_zone_leap_second` (
+ `Transition_time` bigint(20) NOT NULL,
+ `Correction` int(11) NOT NULL,
+ PRIMARY KEY (`Transition_time`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Leap seconds information for time zones';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `time_zone_leap_second`
+--
+
+LOCK TABLES `time_zone_leap_second` WRITE;
+/*!40000 ALTER TABLE `time_zone_leap_second` DISABLE KEYS */;
+/*!40000 ALTER TABLE `time_zone_leap_second` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `time_zone_name`
+--
+
+DROP TABLE IF EXISTS `time_zone_name`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `time_zone_name` (
+ `Name` char(64) NOT NULL,
+ `Time_zone_id` int(10) unsigned NOT NULL,
+ PRIMARY KEY (`Name`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Time zone names';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `time_zone_name`
+--
+
+LOCK TABLES `time_zone_name` WRITE;
+/*!40000 ALTER TABLE `time_zone_name` DISABLE KEYS */;
+/*!40000 ALTER TABLE `time_zone_name` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `time_zone_transition`
+--
+
+DROP TABLE IF EXISTS `time_zone_transition`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `time_zone_transition` (
+ `Time_zone_id` int(10) unsigned NOT NULL,
+ `Transition_time` bigint(20) NOT NULL,
+ `Transition_type_id` int(10) unsigned NOT NULL,
+ PRIMARY KEY (`Time_zone_id`,`Transition_time`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Time zone transitions';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `time_zone_transition`
+--
+
+LOCK TABLES `time_zone_transition` WRITE;
+/*!40000 ALTER TABLE `time_zone_transition` DISABLE KEYS */;
+/*!40000 ALTER TABLE `time_zone_transition` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `time_zone_transition_type`
+--
+
+DROP TABLE IF EXISTS `time_zone_transition_type`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `time_zone_transition_type` (
+ `Time_zone_id` int(10) unsigned NOT NULL,
+ `Transition_type_id` int(10) unsigned NOT NULL,
+ `Offset` int(11) NOT NULL DEFAULT '0',
+ `Is_DST` tinyint(3) unsigned NOT NULL DEFAULT '0',
+ `Abbreviation` char(8) NOT NULL DEFAULT '',
+ PRIMARY KEY (`Time_zone_id`,`Transition_type_id`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Time zone transition types';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `time_zone_transition_type`
+--
+
+LOCK TABLES `time_zone_transition_type` WRITE;
+/*!40000 ALTER TABLE `time_zone_transition_type` DISABLE KEYS */;
+/*!40000 ALTER TABLE `time_zone_transition_type` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `user`
+--
+
+DROP TABLE IF EXISTS `user`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+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',
+ `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=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Users and global privileges';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `user`
+--
+
+LOCK TABLES `user` WRITE;
+/*!40000 ALTER TABLE `user` DISABLE KEYS */;
+INSERT INTO `user` VALUES ('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','','','','',0,0,0,0,'','','N','N','',0.000000),('asus','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','','','','',0,0,0,0,'','','N','N','',0.000000),('127.0.0.1','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','','','','',0,0,0,0,'','','N','N','',0.000000),('::1','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','','','','',0,0,0,0,'','','N','N','',0.000000),('localhost','','','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,'','','N','N','',0.000000),('asus','','','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,'','','N','N','',0.000000);
+/*!40000 ALTER TABLE `user` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `general_log`
+--
+
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE IF NOT EXISTS `general_log` (
+ `event_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
+ `user_host` mediumtext NOT NULL,
+ `thread_id` bigint(21) unsigned NOT NULL,
+ `server_id` int(10) unsigned NOT NULL,
+ `command_type` varchar(64) NOT NULL,
+ `argument` mediumtext NOT NULL
+) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='General log';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `slow_log`
+--
+
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE IF NOT EXISTS `slow_log` (
+ `start_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
+ `user_host` mediumtext NOT NULL,
+ `query_time` time(6) NOT NULL,
+ `lock_time` time(6) NOT NULL,
+ `rows_sent` int(11) NOT NULL,
+ `rows_examined` int(11) NOT NULL,
+ `db` varchar(512) NOT NULL,
+ `last_insert_id` int(11) NOT NULL,
+ `insert_id` int(11) NOT NULL,
+ `server_id` int(10) unsigned NOT NULL,
+ `sql_text` mediumtext NOT NULL,
+ `thread_id` bigint(21) unsigned NOT NULL,
+ `rows_affected` int(11) NOT NULL
+) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log';
+/*!40101 SET character_set_client = @saved_cs_client */;
+/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
+
+/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
+/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
+/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
+/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
+/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
+/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
+/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
+
+-- Dump completed on 2020-05-31 19:13:29
diff --git a/mysql-test/std_data/mysql_database_10.2.dump b/mysql-test/std_data/mysql_database_10.2.dump
new file mode 100644
index 00000000000..0321955edbe
--- /dev/null
+++ b/mysql-test/std_data/mysql_database_10.2.dump
@@ -0,0 +1,906 @@
+-- MySQL dump 10.16 Distrib 10.2.32-MariaDB, for Linux (x86_64)
+--
+-- Host: localhost Database: mysql
+-- ------------------------------------------------------
+-- Server version 10.2.32-MariaDB
+
+/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
+/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
+/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
+/*!40101 SET NAMES utf8 */;
+/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
+/*!40103 SET TIME_ZONE='+00:00' */;
+/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
+/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
+/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
+/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
+
+--
+-- Table structure for table `column_stats`
+--
+
+DROP TABLE IF EXISTS `column_stats`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `column_stats` (
+ `db_name` varchar(64) COLLATE utf8_bin NOT NULL,
+ `table_name` varchar(64) COLLATE utf8_bin NOT NULL,
+ `column_name` varchar(64) COLLATE utf8_bin NOT NULL,
+ `min_value` varbinary(255) DEFAULT NULL,
+ `max_value` varbinary(255) DEFAULT NULL,
+ `nulls_ratio` decimal(12,4) DEFAULT NULL,
+ `avg_length` decimal(12,4) DEFAULT NULL,
+ `avg_frequency` decimal(12,4) DEFAULT NULL,
+ `hist_size` tinyint(3) unsigned DEFAULT NULL,
+ `hist_type` enum('SINGLE_PREC_HB','DOUBLE_PREC_HB') COLLATE utf8_bin DEFAULT NULL,
+ `histogram` varbinary(255) DEFAULT NULL,
+ PRIMARY KEY (`db_name`,`table_name`,`column_name`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Statistics on Columns';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `column_stats`
+--
+
+LOCK TABLES `column_stats` WRITE;
+/*!40000 ALTER TABLE `column_stats` DISABLE KEYS */;
+/*!40000 ALTER TABLE `column_stats` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `columns_priv`
+--
+
+DROP TABLE IF EXISTS `columns_priv`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `columns_priv` (
+ `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Column_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
+ `Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '',
+ PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`,`Column_name`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Column privileges';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `columns_priv`
+--
+
+LOCK TABLES `columns_priv` WRITE;
+/*!40000 ALTER TABLE `columns_priv` DISABLE KEYS */;
+/*!40000 ALTER TABLE `columns_priv` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `db`
+--
+
+DROP TABLE IF EXISTS `db`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `db` (
+ `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `User` char(80) COLLATE utf8_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',
+ `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',
+ `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',
+ `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',
+ `Execute_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',
+ PRIMARY KEY (`Host`,`Db`,`User`),
+ KEY `User` (`User`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Database privileges';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `db`
+--
+
+LOCK TABLES `db` WRITE;
+/*!40000 ALTER TABLE `db` DISABLE KEYS */;
+INSERT INTO `db` VALUES ('%','test','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N','Y','Y'),('%','test\\_%','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N','Y','Y');
+/*!40000 ALTER TABLE `db` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `event`
+--
+
+DROP TABLE IF EXISTS `event`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `event` (
+ `db` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
+ `name` char(64) NOT NULL DEFAULT '',
+ `body` longblob NOT NULL,
+ `definer` char(141) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
+ `execute_at` datetime DEFAULT NULL,
+ `interval_value` int(11) DEFAULT NULL,
+ `interval_field` enum('YEAR','QUARTER','MONTH','DAY','HOUR','MINUTE','WEEK','SECOND','MICROSECOND','YEAR_MONTH','DAY_HOUR','DAY_MINUTE','DAY_SECOND','HOUR_MINUTE','HOUR_SECOND','MINUTE_SECOND','DAY_MICROSECOND','HOUR_MICROSECOND','MINUTE_MICROSECOND','SECOND_MICROSECOND') DEFAULT NULL,
+ `created` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
+ `modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `last_executed` datetime DEFAULT NULL,
+ `starts` datetime DEFAULT NULL,
+ `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') 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',
+ `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,
+ `db_collation` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
+ `body_utf8` longblob DEFAULT NULL,
+ PRIMARY KEY (`db`,`name`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Events';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `func`
+--
+
+DROP TABLE IF EXISTS `func`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `func` (
+ `name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `ret` tinyint(1) NOT NULL DEFAULT 0,
+ `dl` char(128) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `type` enum('function','aggregate') CHARACTER SET utf8 NOT NULL,
+ PRIMARY KEY (`name`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='User defined functions';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `func`
+--
+
+LOCK TABLES `func` WRITE;
+/*!40000 ALTER TABLE `func` DISABLE KEYS */;
+/*!40000 ALTER TABLE `func` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `gtid_slave_pos`
+--
+
+DROP TABLE IF EXISTS `gtid_slave_pos`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `gtid_slave_pos` (
+ `domain_id` int(10) unsigned NOT NULL,
+ `sub_id` bigint(20) unsigned NOT NULL,
+ `server_id` int(10) unsigned NOT NULL,
+ `seq_no` bigint(20) unsigned NOT NULL,
+ PRIMARY KEY (`domain_id`,`sub_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Replication slave GTID position';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `gtid_slave_pos`
+--
+
+LOCK TABLES `gtid_slave_pos` WRITE;
+/*!40000 ALTER TABLE `gtid_slave_pos` DISABLE KEYS */;
+/*!40000 ALTER TABLE `gtid_slave_pos` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `help_category`
+--
+
+DROP TABLE IF EXISTS `help_category`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `help_category` (
+ `help_category_id` smallint(5) unsigned NOT NULL,
+ `name` char(64) NOT NULL,
+ `parent_category_id` smallint(5) unsigned DEFAULT NULL,
+ `url` text NOT NULL,
+ PRIMARY KEY (`help_category_id`),
+ UNIQUE KEY `name` (`name`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='help categories';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `help_category`
+--
+
+LOCK TABLES `help_category` WRITE;
+/*!40000 ALTER TABLE `help_category` DISABLE KEYS */;
+INSERT INTO `help_category` VALUES (1,'Geographic',0,''),(2,'Polygon properties',34,''),(3,'WKT',34,''),(4,'Numeric Functions',38,''),(5,'Plugins',35,''),(6,'MBR',34,''),(7,'Control flow functions',38,''),(8,'Transactions',35,''),(9,'Help Metadata',35,''),(10,'Account Management',35,''),(11,'Point properties',34,''),(12,'Encryption Functions',38,''),(13,'LineString properties',34,''),(14,'Miscellaneous Functions',38,''),(15,'Logical operators',38,''),(16,'Functions and Modifiers for Use with GROUP BY',35,''),(17,'Information Functions',38,''),(18,'Comparison operators',38,''),(19,'Bit Functions',38,''),(20,'Table Maintenance',35,''),(21,'User-Defined Functions',35,''),(22,'Data Types',35,''),(23,'Compound Statements',35,''),(24,'Geometry constructors',34,''),(25,'GeometryCollection properties',1,''),(26,'Administration',35,''),(27,'Data Manipulation',35,''),(28,'Utility',35,''),(29,'Language Structure',35,''),(30,'Geometry relations',34,''),(31,'Date and Time Functions',38,''),(32,'WKB',34,''),(33,'Procedures',35,''),(34,'Geographic Features',35,''),(35,'Contents',0,''),(36,'Geometry properties',34,''),(37,'String Functions',38,''),(38,'Functions',35,''),(39,'Data Definition',35,'');
+/*!40000 ALTER TABLE `help_category` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `help_keyword`
+--
+
+DROP TABLE IF EXISTS `help_keyword`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `help_keyword` (
+ `help_keyword_id` int(10) unsigned NOT NULL,
+ `name` char(64) NOT NULL,
+ PRIMARY KEY (`help_keyword_id`),
+ UNIQUE KEY `name` (`name`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='help keywords';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `help_keyword`
+--
+
+LOCK TABLES `help_keyword` WRITE;
+/*!40000 ALTER TABLE `help_keyword` DISABLE KEYS */;
+INSERT INTO `help_keyword` VALUES (0,'JOIN'),(1,'HOST'),(2,'REPEAT'),(3,'SERIALIZABLE'),(4,'REPLACE'),(5,'AT'),(6,'SCHEDULE'),(7,'RETURNS'),(8,'STARTS'),(9,'MASTER_SSL_CA'),(10,'NCHAR'),(11,'COLUMNS'),(12,'COMPLETION'),(13,'WORK'),(14,'DATETIME'),(15,'MODE'),(16,'OPEN'),(17,'INTEGER'),(18,'ESCAPE'),(19,'VALUE'),(20,'MASTER_SSL_VERIFY_SERVER_CERT'),(21,'SQL_BIG_RESULT'),(22,'DROP'),(23,'GEOMETRYCOLLECTIONFROMWKB'),(24,'EVENTS'),(25,'MONTH'),(26,'PROFILES'),(27,'DUPLICATE'),(28,'REPLICATION'),(29,'UNLOCK'),(30,'INNODB'),(31,'YEAR_MONTH'),(32,'SUBJECT'),(33,'PREPARE'),(34,'LOCK'),(35,'NDB'),(36,'CHECK'),(37,'FULL'),(38,'INT4'),(39,'BY'),(40,'NO'),(41,'MINUTE'),(42,'PARTITION'),(43,'DATA'),(44,'DAY'),(45,'SHARE'),(46,'REAL'),(47,'SEPARATOR'),(48,'MESSAGE_TEXT'),(49,'MASTER_HEARTBEAT_PERIOD'),(50,'DELETE'),(51,'ON'),(52,'COLUMN_NAME'),(53,'CONNECTION'),(54,'CLOSE'),(55,'X509'),(56,'USE'),(57,'SUBCLASS_ORIGIN'),(58,'WHERE'),(59,'PRIVILEGES'),(60,'SPATIAL'),(61,'EVENT'),(62,'SUPER'),(63,'SQL_BUFFER_RESULT'),(64,'IGNORE'),(65,'SHA2'),(66,'QUICK'),(67,'SIGNED'),(68,'OFFLINE'),(69,'SECURITY'),(70,'AUTOEXTEND_SIZE'),(71,'NDBCLUSTER'),(72,'POLYGONFROMWKB'),(73,'FALSE'),(74,'LEVEL'),(75,'FORCE'),(76,'BINARY'),(77,'TO'),(78,'CHANGE'),(79,'CURRENT_USER'),(80,'HOUR_MINUTE'),(81,'UPDATE'),(82,'PRESERVE'),(83,'TABLE_NAME'),(84,'INTO'),(85,'FEDERATED'),(86,'VARYING'),(87,'MAX_SIZE'),(88,'HOUR_SECOND'),(89,'VARIABLE'),(90,'ROLLBACK'),(91,'PROCEDURE'),(92,'TIMESTAMP'),(93,'IMPORT'),(94,'AGAINST'),(95,'CHECKSUM'),(96,'COUNT'),(97,'LONGBINARY'),(98,'THEN'),(99,'INSERT'),(100,'ENGINES'),(101,'HANDLER'),(102,'PORT'),(103,'DAY_SECOND'),(104,'EXISTS'),(105,'MUTEX'),(106,'HELP_DATE'),(107,'RELEASE'),(108,'BOOLEAN'),(109,'MOD'),(110,'DEFAULT'),(111,'TYPE'),(112,'NO_WRITE_TO_BINLOG'),(113,'OPTIMIZE'),(114,'SQLSTATE'),(115,'RESET'),(116,'CLASS_ORIGIN'),(117,'INSTALL'),(118,'ITERATE'),(119,'DO'),(120,'BIGINT'),(121,'SET'),(122,'ISSUER'),(123,'DATE'),(124,'STATUS'),(125,'FULLTEXT'),(126,'COMMENT'),(127,'MASTER_CONNECT_RETRY'),(128,'INNER'),(129,'RELAYLOG'),(130,'STOP'),(131,'MASTER_LOG_FILE'),(132,'MRG_MYISAM'),(133,'PRECISION'),(134,'REQUIRE'),(135,'TRAILING'),(136,'PARTITIONS'),(137,'LONG'),(138,'OPTION'),(139,'REORGANIZE'),(140,'ELSE'),(141,'DEALLOCATE'),(142,'IO_THREAD'),(143,'CASE'),(144,'CIPHER'),(145,'CONTINUE'),(146,'FROM'),(147,'READ'),(148,'LEFT'),(149,'ELSEIF'),(150,'MINUTE_SECOND'),(151,'COMPACT'),(152,'DEC'),(153,'FOR'),(154,'WARNINGS'),(155,'MIN_ROWS'),(156,'STRING'),(157,'CONDITION'),(158,'ENCLOSED'),(159,'FUNCTION'),(160,'AGGREGATE'),(161,'FIELDS'),(162,'INT3'),(163,'ARCHIVE'),(164,'AVG_ROW_LENGTH'),(165,'ADD'),(166,'KILL'),(167,'FLOAT4'),(168,'TABLESPACE'),(169,'VIEW'),(170,'REPEATABLE'),(171,'INFILE'),(172,'HELP_VERSION'),(173,'ORDER'),(174,'USING'),(175,'CONSTRAINT_CATALOG'),(176,'MIDDLEINT'),(177,'GRANT'),(178,'UNSIGNED'),(179,'DECIMAL'),(180,'GEOMETRYFROMTEXT'),(181,'INDEXES'),(182,'FOREIGN'),(183,'CACHE'),(184,'HOSTS'),(185,'MYSQL_ERRNO'),(186,'COMMIT'),(187,'SCHEMAS'),(188,'LEADING'),(189,'SNAPSHOT'),(190,'CONSTRAINT_NAME'),(191,'DECLARE'),(192,'LOAD'),(193,'SQL_CACHE'),(194,'CONVERT'),(195,'DYNAMIC'),(196,'COLLATE'),(197,'POLYGONFROMTEXT'),(198,'BYTE'),(199,'GLOBAL'),(200,'LINESTRINGFROMWKB'),(201,'WHEN'),(202,'HAVING'),(203,'AS'),(204,'STARTING'),(205,'RELOAD'),(206,'AUTOCOMMIT'),(207,'REVOKE'),(208,'GRANTS'),(209,'OUTER'),(210,'CURSOR_NAME'),(211,'FLOOR'),(212,'EXPLAIN'),(213,'WITH'),(214,'AFTER'),(215,'STD'),(216,'CSV'),(217,'DISABLE'),(218,'UNINSTALL'),(219,'OUTFILE'),(220,'LOW_PRIORITY'),(221,'FILE'),(222,'NODEGROUP'),(223,'SCHEMA'),(224,'SONAME'),(225,'POW'),(226,'DUAL'),(227,'MULTIPOINTFROMWKB'),(228,'INDEX'),(229,'MULTIPOINTFROMTEXT'),(230,'DEFINER'),(231,'MASTER_BIND'),(232,'REMOVE'),(233,'EXTENDED'),(234,'MULTILINESTRINGFROMWKB'),(235,'CROSS'),(236,'CONTRIBUTORS'),(237,'NATIONAL'),(238,'GROUP'),(239,'SHA'),(240,'ONLINE'),(241,'UNDO'),(242,'IGNORE_SERVER_IDS'),(243,'ZEROFILL'),(244,'CLIENT'),(245,'MASTER_PASSWORD'),(246,'OWNER'),(247,'RELAY_LOG_FILE'),(248,'TRUE'),(249,'CHARACTER'),(250,'MASTER_USER'),(251,'SCHEMA_NAME'),(252,'TABLE'),(253,'ENGINE'),(254,'INSERT_METHOD'),(255,'CASCADE'),(256,'RELAY_LOG_POS'),(257,'SQL_CALC_FOUND_ROWS'),(258,'UNION'),(259,'MYISAM'),(260,'LEAVE'),(261,'MODIFY'),(262,'MATCH'),(263,'MASTER_LOG_POS'),(264,'DISTINCTROW'),(265,'DESC'),(266,'TIME'),(267,'NUMERIC'),(268,'EXPANSION'),(269,'CODE'),(270,'CURSOR'),(271,'GEOMETRYCOLLECTIONFROMTEXT'),(272,'CHAIN'),(273,'LOGFILE'),(274,'FLUSH'),(275,'CREATE'),(276,'DESCRIBE'),(277,'EXTENT_SIZE'),(278,'MAX_UPDATES_PER_HOUR'),(279,'INT2'),(280,'PROCESSLIST'),(281,'ENDS'),(282,'LOGS'),(283,'DISCARD'),(284,'HEAP'),(285,'SOUNDS'),(286,'BETWEEN'),(287,'MULTILINESTRINGFROMTEXT'),(288,'REPAIR'),(289,'PACK_KEYS'),(290,'FAST'),(291,'VALUES'),(292,'CALL'),(293,'LOOP'),(294,'VARCHARACTER'),(295,'BEFORE'),(296,'TRUNCATE'),(297,'SHOW'),(298,'ALL'),(299,'REDUNDANT'),(300,'USER_RESOURCES'),(301,'PARTIAL'),(302,'BINLOG'),(303,'END'),(304,'SECOND'),(305,'AND'),(306,'FLOAT8'),(307,'PREV'),(308,'HOUR'),(309,'SELECT'),(310,'DATABASES'),(311,'OR'),(312,'IDENTIFIED'),(313,'WRAPPER'),(314,'MASTER_SSL_CIPHER'),(315,'SQL_SLAVE_SKIP_COUNTER'),(316,'BOTH'),(317,'BOOL'),(318,'YEAR'),(319,'MASTER_PORT'),(320,'CONCURRENT'),(321,'HELP'),(322,'UNIQUE'),(323,'TRIGGERS'),(324,'PROCESS'),(325,'OPTIONS'),(326,'RESIGNAL'),(327,'CONSISTENT'),(328,'MASTER_SSL'),(329,'DATE_ADD'),(330,'MAX_CONNECTIONS_PER_HOUR'),(331,'LIKE'),(332,'PLUGIN'),(333,'FETCH'),(334,'IN'),(335,'COLUMN'),(336,'DUMPFILE'),(337,'USAGE'),(338,'EXECUTE'),(339,'MEMORY'),(340,'CEIL'),(341,'QUERY'),(342,'MASTER_HOST'),(343,'LINES'),(344,'SQL_THREAD'),(345,'SERVER'),(346,'MAX_QUERIES_PER_HOUR'),(347,'MASTER_SSL_CERT'),(348,'MULTIPOLYGONFROMWKB'),(349,'TRANSACTION'),(350,'DAY_MINUTE'),(351,'STDDEV'),(352,'DATE_SUB'),(353,'REBUILD'),(354,'GEOMETRYFROMWKB'),(355,'INT1'),(356,'RENAME'),(357,'PARSER'),(358,'RIGHT'),(359,'ALTER'),(360,'MAX_ROWS'),(361,'SOCKET'),(362,'STRAIGHT_JOIN'),(363,'NATURAL'),(364,'VARIABLES'),(365,'ESCAPED'),(366,'SHA1'),(367,'KEY_BLOCK_SIZE'),(368,'PASSWORD'),(369,'OFFSET'),(370,'CHAR'),(371,'NEXT'),(372,'ERRORS'),(373,'SQL_LOG_BIN'),(374,'TEMPORARY'),(375,'COMMITTED'),(376,'SQL_SMALL_RESULT'),(377,'UPGRADE'),(378,'BEGIN'),(379,'DELAY_KEY_WRITE'),(380,'PROFILE'),(381,'MEDIUM'),(382,'INTERVAL'),(383,'SSL'),(384,'DAY_HOUR'),(385,'NAME'),(386,'REFERENCES'),(387,'AES_ENCRYPT'),(388,'STORAGE'),(389,'ISOLATION'),(390,'CEILING'),(391,'EVERY'),(392,'INT8'),(393,'AUTHORS'),(394,'RESTRICT'),(395,'UNCOMMITTED'),(396,'LINESTRINGFROMTEXT'),(397,'IS'),(398,'NOT'),(399,'ANALYSE'),(400,'DATAFILE'),(401,'DES_KEY_FILE'),(402,'SIGNAL'),(403,'COMPRESSED'),(404,'START'),(405,'PLUGINS'),(406,'SAVEPOINT'),(407,'IF'),(408,'ROWS'),(409,'PRIMARY'),(410,'PURGE'),(411,'LAST'),(412,'USER'),(413,'EXIT'),(414,'KEYS'),(415,'LIMIT'),(416,'KEY'),(417,'MERGE'),(418,'UNTIL'),(419,'SQL_NO_CACHE'),(420,'DELAYED'),(421,'CONSTRAINT_SCHEMA'),(422,'ANALYZE'),(423,'CONSTRAINT'),(424,'SERIAL'),(425,'ACTION'),(426,'WRITE'),(427,'INITIAL_SIZE'),(428,'SESSION'),(429,'DATABASE'),(430,'NULL'),(431,'POWER'),(432,'USE_FRM'),(433,'TERMINATED'),(434,'SLAVE'),(435,'NVARCHAR'),(436,'ASC'),(437,'RETURN'),(438,'OPTIONALLY'),(439,'ENABLE'),(440,'DIRECTORY'),(441,'MAX_USER_CONNECTIONS'),(442,'WHILE'),(443,'LOCAL'),(444,'DISTINCT'),(445,'AES_DECRYPT'),(446,'MASTER_SSL_KEY'),(447,'NONE'),(448,'TABLES'),(449,'<>'),(450,'RLIKE'),(451,'TRIGGER'),(452,'COLLATION'),(453,'SHUTDOWN'),(454,'HIGH_PRIORITY'),(455,'BTREE'),(456,'FIRST'),(457,'COALESCE'),(458,'WAIT'),(459,'CATALOG_NAME'),(460,'MASTER'),(461,'FIXED'),(462,'MULTIPOLYGONFROMTEXT'),(463,'ROW_FORMAT');
+/*!40000 ALTER TABLE `help_keyword` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `help_relation`
+--
+
+DROP TABLE IF EXISTS `help_relation`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `help_relation` (
+ `help_topic_id` int(10) unsigned NOT NULL,
+ `help_keyword_id` int(10) unsigned NOT NULL,
+ PRIMARY KEY (`help_keyword_id`,`help_topic_id`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='keyword-topic relation';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `help_relation`
+--
+
+LOCK TABLES `help_relation` WRITE;
+/*!40000 ALTER TABLE `help_relation` DISABLE KEYS */;
+INSERT INTO `help_relation` VALUES (1,0),(356,0),(473,1),(232,2),(447,3),(3,4),(130,4),(421,4),(89,5),(89,6),(406,6),(97,7),(89,8),(185,9),(430,10),(21,11),(347,11),(421,11),(463,11),(468,11),(89,12),(406,12),(146,13),(230,14),(88,15),(356,15),(18,16),(106,16),(134,16),(347,16),(97,17),(500,17),(380,18),(3,19),(104,19),(243,19),(374,19),(459,19),(185,20),(356,21),(9,22),(30,22),(34,22),(87,22),(186,22),(237,22),(263,22),(276,22),(300,22),(331,22),(405,22),(415,22),(416,22),(463,22),(478,22),(108,23),(122,24),(170,24),(424,24),(376,25),(82,26),(104,27),(199,28),(36,29),(347,30),(468,30),(376,31),(199,32),(35,33),(237,33),(36,34),(356,34),(468,35),(417,36),(463,36),(468,36),(21,37),(294,37),(347,37),(451,37),(468,37),(500,38),(48,39),(77,39),(83,39),(130,39),(199,39),(356,39),(361,39),(421,39),(463,39),(468,39),(468,40),(472,40),(376,41),(463,42),(468,42),(212,43),(421,43),(468,43),(473,43),(376,44),(356,45),(97,46),(314,46),(361,47),(374,48),(459,48),(185,49),(48,50),(468,50),(472,50),(1,51),(89,51),(406,51),(472,51),(374,52),(459,52),(176,53),(468,53),(51,54),(106,54),(199,55),(1,56),(55,56),(194,56),(374,57),(459,57),(48,58),(83,58),(106,58),(193,59),(199,59),(249,59),(210,60),(463,60),(89,61),(300,61),(358,61),(406,61),(199,62),(356,63),(1,64),(83,64),(104,64),(130,64),(356,64),(421,64),(463,64),(66,65),(48,66),(417,66),(466,66),(230,67),(87,68),(210,68),(463,68),(199,69),(194,70),(468,71),(91,72),(482,72),(385,73),(447,74),(1,75),(39,76),(230,76),(269,76),(185,77),(269,77),(460,77),(185,78),(463,78),(89,79),(406,79),(376,80),(83,81),(104,81),(356,81),(472,81),(89,82),(406,82),(374,83),(459,83),(3,84),(104,84),(304,84),(356,84),(468,85),(257,86),(194,87),(376,88),(129,89),(146,90),(460,90),(17,91),(189,91),(302,91),(328,91),(347,91),(356,91),(416,91),(439,91),(488,91),(99,92),(188,92),(421,93),(463,93),(88,94),(401,95),(468,95),(69,96),(330,96),(433,96),(285,97),(28,98),(57,98),(85,98),(104,99),(195,99),(301,99),(486,99),(282,100),(347,100),(106,101),(313,101),(473,102),(376,103),(9,104),(30,104),(89,104),(155,104),(186,104),(276,104),(300,104),(347,105),(365,105),(109,106),(146,107),(460,107),(24,108),(88,108),(113,109),(174,109),(3,110),(104,110),(155,110),(200,110),(212,110),(243,110),(463,110),(468,110),(463,111),(115,112),(326,112),(466,112),(470,112),(115,113),(463,113),(374,114),(459,114),(38,115),(119,115),(151,115),(264,115),(374,116),(459,116),(419,117),(124,118),(89,119),(125,119),(406,119),(496,119),(221,120),(3,121),(83,121),(104,121),(129,121),(130,121),(146,121),(155,121),(182,121),(212,121),(333,121),(347,121),(356,121),(374,121),(421,121),(459,121),(463,121),(468,121),(472,121),(477,121),(494,121),(199,122),(132,123),(230,123),(262,123),(376,123),(58,124),(137,124),(215,124),(223,124),(328,124),(336,124),(347,124),(365,124),(210,125),(463,125),(468,125),(89,126),(194,126),(210,126),(406,126),(468,126),(185,127),(1,128),(424,129),(52,130),(185,131),(468,132),(314,133),(199,134),(455,135),(255,136),(285,137),(199,138),(249,138),(463,139),(57,140),(85,140),(237,141),(52,142),(324,142),(57,143),(85,143),(199,144),(313,145),(48,146),(122,146),(347,146),(356,146),(424,146),(455,146),(36,147),(106,147),(447,147),(1,148),(28,149),(376,150),(468,151),(209,152),(180,153),(313,153),(347,153),(356,153),(420,153),(330,154),(347,154),(468,155),(97,156),(180,157),(421,158),(34,159),(68,159),(97,159),(211,159),(233,159),(302,159),(336,159),(347,159),(393,159),(405,159),(416,159),(97,160),(347,161),(421,161),(252,162),(468,163),(463,164),(468,164),(60,165),(194,165),(463,165),(478,165),(176,166),(168,167),(194,168),(415,168),(463,168),(478,168),(30,169),(159,169),(454,169),(447,170),(130,171),(421,171),(190,172),(48,173),(83,173),(356,173),(361,173),(463,173),(1,174),(48,174),(86,174),(374,175),(459,175),(252,176),(199,177),(249,177),(24,178),(128,178),(168,178),(209,178),(230,178),(314,178),(500,178),(97,179),(156,179),(230,179),(411,180),(347,181),(463,182),(468,182),(472,182),(473,182),(101,183),(151,183),(304,183),(145,184),(347,184),(374,185),(459,185),(146,186),(160,187),(347,187),(455,188),(146,189),(374,190),(459,190),(180,191),(200,191),(313,191),(420,191),(304,192),(421,192),(356,193),(230,194),(377,194),(468,195),(155,196),(212,196),(468,196),(395,197),(465,198),(129,199),(137,199),(182,199),(349,199),(447,199),(452,200),(57,201),(85,201),(356,202),(1,203),(36,203),(356,203),(421,204),(199,205),(146,206),(249,207),(192,208),(347,208),(1,209),(374,210),(459,210),(221,211),(255,212),(88,213),(199,213),(210,213),(463,213),(468,213),(463,214),(260,215),(421,216),(468,216),(89,217),(406,217),(463,217),(291,218),(356,219),(3,220),(36,220),(48,220),(83,220),(104,220),(130,220),(421,220),(199,221),(194,222),(155,223),(186,223),(212,223),(309,223),(347,223),(97,224),(277,225),(279,226),(464,227),(1,228),(60,228),(87,228),(101,228),(210,228),(304,228),(308,228),(347,228),(463,228),(468,228),(425,229),(89,230),(406,230),(185,231),(463,232),(255,233),(466,233),(272,234),(1,235),(7,236),(347,236),(257,237),(430,237),(194,238),(226,238),(356,238),(427,239),(87,240),(210,240),(463,240),(313,241),(185,242),(24,243),(128,243),(168,243),(209,243),(314,243),(500,243),(199,244),(185,245),(473,246),(185,247),(385,248),(130,249),(155,249),(212,249),(257,249),(333,249),(347,249),(356,249),(421,249),(430,249),(468,249),(185,250),(374,251),(459,251),(60,252),(110,252),(115,252),(215,252),(276,252),(278,252),(321,252),(347,252),(401,252),(417,252),(463,252),(466,252),(468,252),(470,252),(194,253),(347,253),(365,253),(415,253),(463,253),(468,253),(478,253),(468,254),(30,255),(276,255),(468,255),(472,255),(185,256),(356,257),(305,258),(468,259),(310,260),(463,261),(88,262),(185,263),(356,264),(329,265),(356,265),(361,265),(230,266),(315,266),(375,266),(209,267),(88,268),(68,269),(488,269),(420,270),(246,271),(146,272),(194,273),(226,273),(151,274),(326,274),(17,275),(22,275),(60,275),(77,275),(89,275),(97,275),(155,275),(194,275),(210,275),(211,275),(278,275),(302,275),(309,275),(347,275),(358,275),(393,275),(454,275),(468,275),(473,275),(329,276),(194,277),(199,278),(234,279),(347,280),(451,280),(89,281),(39,282),(269,282),(347,282),(463,283),(468,284),(378,285),(147,286),(107,287),(463,288),(466,288),(468,289),(417,290),(3,291),(104,291),(339,292),(344,293),(257,294),(269,295),(321,296),(463,296),(7,297),(10,297),(17,297),(21,297),(25,297),(33,297),(39,297),(58,297),(68,297),(69,297),(82,297),(122,297),(134,297),(137,297),(145,297),(160,297),(170,297),(192,297),(193,297),(215,297),(223,297),(278,297),(282,297),(294,297),(308,297),(309,297),(328,297),(330,297),(333,297),(336,297),(347,297),(349,297),(358,297),(365,297),(393,297),(424,297),(451,297),(487,297),(488,297),(492,297),(38,298),(199,298),(249,298),(305,298),(356,298),(468,299),(326,300),(468,301),(122,302),(350,302),(28,303),(57,303),(85,303),(232,303),(327,303),(344,303),(496,303),(376,304),(147,305),(316,305),(314,306),(106,307),(376,308),(3,309),(104,309),(255,309),(301,309),(356,309),(160,310),(347,310),(141,311),(77,312),(130,312),(199,312),(473,313),(185,314),(182,315),(455,316),(24,317),(111,317),(376,318),(185,319),(130,320),(421,320),(118,321),(390,321),(463,322),(25,323),(347,323),(199,324),(373,325),(473,325),(374,326),(146,327),(185,328),(376,329),(199,330),(347,331),(378,331),(291,332),(347,332),(419,332),(383,333),(88,334),(122,334),(356,334),(424,334),(463,335),(356,336),(199,337),(86,338),(199,338),(356,339),(397,340),(88,341),(151,341),(176,341),(185,342),(130,343),(421,343),(52,344),(324,344),(9,345),(373,345),(473,345),(199,346),(185,347),(123,348),(146,349),(447,349),(376,350),(407,351),(376,352),(463,353),(144,354),(24,355),(110,356),(222,356),(406,356),(463,356),(210,357),(463,357),(468,357),(1,358),(60,359),(159,359),(199,359),(212,359),(226,359),(233,359),(373,359),(406,359),(439,359),(463,359),(478,359),(463,360),(468,360),(473,361),(1,362),(356,362),(1,363),(347,364),(349,364),(421,365),(427,366),(468,367),(77,368),(199,368),(473,368),(477,368),(356,369),(230,370),(465,370),(106,371),(69,372),(347,372),(494,373),(276,374),(447,375),(356,376),(212,377),(417,377),(146,378),(327,378),(468,379),(487,380),(417,381),(89,382),(376,382),(199,383),(376,384),(212,385),(199,386),(468,386),(472,386),(443,387),(282,388),(447,389),(448,390),(89,391),(128,392),(10,393),(347,393),(30,394),(276,394),(472,394),(447,395),(56,396),(84,397),(206,397),(368,397),(456,397),(84,398),(89,398),(155,398),(206,398),(312,398),(189,399),(194,400),(478,400),(326,401),(459,402),(468,403),(146,404),(324,404),(33,405),(460,406),(9,407),(28,407),(30,407),(89,407),(155,407),(186,407),(276,407),(300,407),(479,407),(130,408),(463,409),(269,410),(106,411),(77,412),(222,412),(331,412),(473,412),(313,413),(308,414),(347,414),(463,414),(48,415),(83,415),(106,415),(122,415),(356,415),(424,415),(60,416),(104,416),(463,416),(468,416),(472,416),(468,417),(232,418),(356,419),(3,420),(104,420),(486,420),(374,421),(459,421),(463,422),(470,422),(463,423),(468,423),(243,424),(468,424),(468,425),(472,425),(36,426),(194,427),(478,427),(129,428),(137,428),(349,428),(447,428),(155,429),(186,429),(212,429),(309,429),(347,429),(473,429),(84,430),(368,430),(472,430),(483,431),(466,432),(421,433),(38,434),(52,434),(89,434),(145,434),(223,434),(324,434),(406,434),(257,435),(356,436),(361,436),(491,437),(421,438),(89,439),(406,439),(463,439),(212,440),(468,440),(199,441),(496,442),(36,443),(115,443),(130,443),(326,443),(421,443),(466,443),(470,443),(0,444),(96,444),(288,444),(305,444),(356,444),(361,444),(384,444),(433,444),(497,445),(185,446),(199,447),(36,448),(134,448),(294,448),(347,448),(495,449),(27,450),(22,451),(263,451),(347,451),(347,452),(492,452),(199,453),(104,454),(356,454),(210,455),(106,456),(463,456),(468,456),(463,457),(194,458),(478,458),(374,459),(459,459),(39,460),(58,460),(185,460),(264,460),(269,460),(209,461),(468,461),(201,462),(468,463);
+/*!40000 ALTER TABLE `help_relation` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `help_topic`
+--
+
+DROP TABLE IF EXISTS `help_topic`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `help_topic` (
+ `help_topic_id` int(10) unsigned NOT NULL,
+ `name` char(64) NOT NULL,
+ `help_category_id` smallint(5) unsigned NOT NULL,
+ `description` text NOT NULL,
+ `example` text NOT NULL,
+ `url` text NOT NULL,
+ PRIMARY KEY (`help_topic_id`),
+ UNIQUE KEY `name` (`name`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='help topics';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `help_topic`
+--
+
+LOCK TABLES `help_topic` WRITE;
+/*!40000 ALTER TABLE `help_topic` DISABLE KEYS */;
+INSERT INTO `help_topic` VALUES (0,'MIN',16,'Syntax:\nMIN([DISTINCT] expr)\n\nReturns the minimum value of expr. MIN() may take a string argument; in\nsuch cases, it returns the minimum string value.\nThe DISTINCT keyword can be used to find the minimum of the distinct values\nof expr, however, this produces the same result as omitting DISTINCT.\n\nMIN() returns NULL if there were no matching rows.\n\nURL: https://mariadb.com/kb/en/min/\n\n','MariaDB> SELECT student_name, MIN(test_score), MAX(test_score)\n -> FROM student\n -> GROUP BY student_name;\n','https://mariadb.com/kb/en/min/'),(1,'JOIN',27,'MySQL supports the following JOIN syntaxes for the table_references\npart of SELECT statements and multiple-table DELETE and UPDATE\nstatements:\n\ntable_references:\n table_reference [, table_reference] ...\n\ntable_reference:\n table_factor\n | join_table\n\ntable_factor:\n tbl_name [[AS] alias] [index_hint_list]\n | table_subquery [AS] alias\n | ( table_references )\n | { OJ table_reference LEFT OUTER JOIN table_reference\n ON conditional_expr }\n\njoin_table:\n table_reference [INNER | CROSS] JOIN table_factor [join_condition]\n | table_reference STRAIGHT_JOIN table_factor\n | table_reference STRAIGHT_JOIN table_factor ON conditional_expr\n | table_reference {LEFT|RIGHT} [OUTER] JOIN table_reference join_condition\n | table_reference NATURAL [{LEFT|RIGHT} [OUTER]] JOIN table_factor\n\njoin_condition:\n ON conditional_expr\n | USING (column_list)\n\nindex_hint_list:\n index_hint [, index_hint] ...\n\nindex_hint:\n USE {INDEX|KEY}\n [FOR {JOIN|ORDER BY|GROUP BY}] ([index_list])\n | IGNORE {INDEX|KEY}\n [FOR {JOIN|ORDER BY|GROUP BY}] (index_list)\n | FORCE {INDEX|KEY}\n [FOR {JOIN|ORDER BY|GROUP BY}] (index_list)\n\nindex_list:\n index_name [, index_name] ...\n\nA table reference is also known as a join expression.\n\nThe syntax of table_factor is extended in comparison with the SQL\nStandard. The latter accepts only table_reference, not a list of them\ninside a pair of parentheses.\n\nThis is a conservative extension if we consider each comma in a list of\ntable_reference items as equivalent to an inner join. For example:\n\nSELECT * FROM t1 LEFT JOIN (t2, t3, t4)\n ON (t2.a=t1.a AND t3.b=t1.b AND t4.c=t1.c)\n\nis equivalent to:\n\nSELECT * FROM t1 LEFT JOIN (t2 CROSS JOIN t3 CROSS JOIN t4)\n ON (t2.a=t1.a AND t3.b=t1.b AND t4.c=t1.c)\n\nIn MySQL, JOIN, CROSS JOIN, and INNER JOIN are syntactic equivalents\n(they can replace each other). In standard SQL, they are not\nequivalent. INNER JOIN is used with an ON clause, CROSS JOIN is used\notherwise.\n\nIn general, parentheses can be ignored in join expressions containing\nonly inner join operations.\n\nIndex hints can be specified to affect how the MySQL optimizer makes\nuse of indexes. For more information, see\nhttps://mariadb.com/kb/en/how-to-force-query-plans/.\n\nURL: https://mariadb.com/kb/en/join-syntax/\n\n','SELECT left_tbl.*\n FROM left_tbl LEFT JOIN right_tbl ON left_tbl.id = right_tbl.id\n WHERE right_tbl.id IS NULL;\n','https://mariadb.com/kb/en/join-syntax/'),(2,'HEX',37,'Syntax:\nHEX(str), HEX(N)\n\nFor a string argument str, HEX() returns a hexadecimal string\nrepresentation of str where each character in str is converted to two\nhexadecimal digits. The inverse of this operation is performed by the\nUNHEX() function.\n\nFor a numeric argument N, HEX() returns a hexadecimal string\nrepresentation of the value of N treated as a longlong (BIGINT) number.\nThis is equivalent to CONV(N,10,16). The inverse of this operation is\nperformed by CONV(HEX(N),16,10).\n\nURL: https://mariadb.com/kb/en/hex/\n\n','MariaDB> SELECT 0x616263, HEX(\'abc\'), UNHEX(HEX(\'abc\'));\n -> \'abc\', 616263, \'abc\'\nMariaDB> SELECT HEX(255), CONV(HEX(255),16,10);\n -> \'FF\', 255\n','https://mariadb.com/kb/en/hex/'),(3,'REPLACE',27,'Syntax:\nREPLACE [LOW_PRIORITY | DELAYED]\n [INTO] tbl_name [(col_name,...)]\n {VALUES | VALUE} ({expr | DEFAULT},...),(...),...\n\nOr:\n\nREPLACE [LOW_PRIORITY | DELAYED]\n [INTO] tbl_name\n SET col_name={expr | DEFAULT}, ...\n\nOr:\n\nREPLACE [LOW_PRIORITY | DELAYED]\n [INTO] tbl_name [(col_name,...)]\n SELECT ...\n\nREPLACE works exactly like INSERT, except that if an old row in the\ntable has the same value as a new row for a PRIMARY KEY or a UNIQUE\nindex, the old row is deleted before the new row is inserted. See [HELP\nINSERT].\n\nREPLACE is a MySQL extension to the SQL standard. It either inserts, or\ndeletes and inserts. For another MySQL extension to standard SQL---that\neither inserts or updates---see\nhttps://mariadb.com/kb/en/insert-on-duplicate-key-update/.\n\nNote that unless the table has a PRIMARY KEY or UNIQUE index, using a\nREPLACE statement makes no sense. It becomes equivalent to INSERT,\nbecause there is no index to be used to determine whether a new row\nduplicates another.\n\nValues for all columns are taken from the values specified in the\nREPLACE statement. Any missing columns are set to their default values,\njust as happens for INSERT. You cannot refer to values from the current\nrow and use them in the new row. If you use an assignment such as SET\ncol_name = col_name + 1, the reference to the column name on the right\nhand side is treated as DEFAULT(col_name), so the assignment is\nequivalent to SET col_name = DEFAULT(col_name) + 1.\n\nTo use REPLACE, you must have both the INSERT and DELETE privileges for\nthe table.\n\nURL: https://mariadb.com/kb/en/replace/\n\n','','https://mariadb.com/kb/en/replace/'),(4,'CONTAINS',30,'Contains(g1,g2)\n\nReturns 1 or 0 to indicate whether g1 completely contains g2. This\ntests the opposite relationship as Within().\n\nURL: https://mariadb.com/kb/en/contains/\n\n','','https://mariadb.com/kb/en/contains/'),(5,'SRID',36,'SRID(g)\n\nReturns an integer indicating the Spatial Reference System ID for the\ngeometry value g.\n\nIn MySQL, the SRID value is just an integer associated with the\ngeometry value. All calculations are done assuming Euclidean (planar)\ngeometry.\n\nURL: https://mariadb.com/kb/en/srid/\n\n','MariaDB> SELECT SRID(GeomFromText(\'LineString(1 1,2 2)\',101));\n+-----------------------------------------------+\n| SRID(GeomFromText(\'LineString(1 1,2 2)\',101)) |\n+-----------------------------------------------+\n| 101 |\n+-----------------------------------------------+\n','https://mariadb.com/kb/en/srid/'),(6,'CURRENT_TIMESTAMP',31,'Syntax:\nCURRENT_TIMESTAMP, CURRENT_TIMESTAMP()\n\nCURRENT_TIMESTAMP and CURRENT_TIMESTAMP() are synonyms for NOW().\n\nURL: https://mariadb.com/kb/en/current_timestamp/\n\n','','https://mariadb.com/kb/en/current_timestamp/'),(7,'SHOW CONTRIBUTORS',26,'Syntax:\nSHOW CONTRIBUTORS\n\nThe SHOW CONTRIBUTORS statement displays information about the people\nwho contribute to MySQL source or to causes that we support. For each\ncontributor, it displays Name, Location, and Comment values.\n\nURL: https://mariadb.com/kb/en/show-contributors/\n\n','','https://mariadb.com/kb/en/show-contributors/'),(8,'VARIANCE',16,'Syntax:\nVARIANCE(expr)\n\nReturns the population standard variance of expr. This is an extension\nto standard SQL. The standard SQL function VAR_POP() can be used\ninstead.\n\nVARIANCE() returns NULL if there were no matching rows.\n\nURL: https://mariadb.com/kb/en/variance/\n\n','','https://mariadb.com/kb/en/variance/'),(9,'DROP SERVER',39,'Syntax:\nDROP SERVER [ IF EXISTS ] server_name\n\nDrops the server definition for the server named server_name. The\ncorresponding row within the mysql.servers table will be deleted. This\nstatement requires the SUPER privilege.\n\nDropping a server for a table does not affect any FEDERATED tables that\nused this connection information when they were created. See [HELP\nCREATE SERVER].\n\nURL: https://mariadb.com/kb/en/drop-server/\n\n','','https://mariadb.com/kb/en/drop-server/'),(10,'SHOW AUTHORS',26,'Syntax:\nSHOW AUTHORS\n\nThe SHOW AUTHORS statement displays information about the people who\nwork on MySQL. For each author, it displays Name, Location, and Comment\nvalues.\n\nURL: https://mariadb.com/kb/en/show-authors/\n\n','','https://mariadb.com/kb/en/show-authors/'),(11,'VAR_SAMP',16,'Syntax:\nVAR_SAMP(expr)\n\nReturns the sample variance of expr. That is, the denominator is the\nnumber of rows minus one.\n\nVAR_SAMP() returns NULL if there were no matching rows.\n\nURL: https://mariadb.com/kb/en/var_samp/\n\n','','https://mariadb.com/kb/en/var_samp/'),(12,'CONCAT',37,'Syntax:\nCONCAT(str1,str2,...)\n\nReturns the string that results from concatenating the arguments. May\nhave one or more arguments. If all arguments are nonbinary strings, the\nresult is a nonbinary string. If the arguments include any binary\nstrings, the result is a binary string. A numeric argument is converted\nto its equivalent string form. This is a nonbinary string as of MySQL\n5.5.3. Before 5.5.3, it is a binary string; to to avoid that and\nproduce a nonbinary string, you can use an explicit type cast, as in\nthis example:\n\nSELECT CONCAT(CAST(int_col AS CHAR), char_col);\n\nCONCAT() returns NULL if any argument is NULL.\n\nURL: https://mariadb.com/kb/en/concat/\n\n','MariaDB> SELECT CONCAT(\'My\', \'S\', \'QL\');\n -> \'MySQL\'\nMariaDB> SELECT CONCAT(\'My\', NULL, \'QL\');\n -> NULL\nMariaDB> SELECT CONCAT(14.3);\n -> \'14.3\'\n','https://mariadb.com/kb/en/concat/'),(13,'GEOMETRY HIERARCHY',34,'Geometry is the base class. It is an abstract class. The instantiable\nsubclasses of Geometry are restricted to zero-, one-, and\ntwo-dimensional geometric objects that exist in two-dimensional\ncoordinate space. All instantiable geometry classes are defined so that\nvalid instances of a geometry class are topologically closed (that is,\nall defined geometries include their boundary).\n\nThe base Geometry class has subclasses for Point, Curve, Surface, and\nGeometryCollection:\n\no Point represents zero-dimensional objects.\n\no Curve represents one-dimensional objects, and has subclass\n LineString, with sub-subclasses Line and LinearRing.\n\no Surface is designed for two-dimensional objects and has subclass\n Polygon.\n\no GeometryCollection has specialized zero-, one-, and two-dimensional\n collection classes named MultiPoint, MultiLineString, and\n MultiPolygon for modeling geometries corresponding to collections of\n Points, LineStrings, and Polygons, respectively. MultiCurve and\n MultiSurface are introduced as abstract superclasses that generalize\n the collection interfaces to handle Curves and Surfaces.\n\nGeometry, Curve, Surface, MultiCurve, and MultiSurface are defined as\nnoninstantiable classes. They define a common set of methods for their\nsubclasses and are included for extensibility.\n\nPoint, LineString, Polygon, GeometryCollection, MultiPoint,\nMultiLineString, and MultiPolygon are instantiable classes.\n\nURL: https://mariadb.com/kb/en/geometry-hierarchy/\n\n','','https://mariadb.com/kb/en/geometry-hierarchy/'),(14,'CHAR FUNCTION',37,'Syntax:\nCHAR(N,... [USING charset_name])\n\nCHAR() interprets each argument N as an integer and returns a string\nconsisting of the characters given by the code values of those\nintegers. NULL values are skipped.\nBy default, CHAR() returns a binary string. To produce a string in a\ngiven character set, use the optional USING clause:\n\nMariaDB> SELECT CHARSET(CHAR(0x65)), CHARSET(CHAR(0x65 USING utf8));\n+---------------------+--------------------------------+\n| CHARSET(CHAR(0x65)) | CHARSET(CHAR(0x65 USING utf8)) |\n+---------------------+--------------------------------+\n| binary | utf8 |\n+---------------------+--------------------------------+\n\nIf USING is given and the result string is illegal for the given\ncharacter set, a warning is issued. Also, if strict SQL mode is\nenabled, the result from CHAR() becomes NULL.\n\nURL: https://mariadb.com/kb/en/char-function/\n\n','MariaDB> SELECT CHAR(77,121,83,81,\'76\');\n -> \'MySQL\'\nMariaDB> SELECT CHAR(77,77.3,\'77.3\');\n -> \'MMM\'\n','https://mariadb.com/kb/en/char-function/'),(15,'DATETIME',22,'DATETIME\n\nA date and time combination. The supported range is \'1000-01-01\n00:00:00\' to \'9999-12-31 23:59:59\'. MySQL displays DATETIME values in\n\'YYYY-MM-DD HH:MM:SS\' format, but permits assignment of values to\nDATETIME columns using either strings or numbers.\n\nURL: https://mariadb.com/kb/en/datetime/\n\n','','https://mariadb.com/kb/en/datetime/'),(16,'SHOW CREATE TRIGGER',26,'Syntax:\nSHOW CREATE TRIGGER trigger_name\n\nThis statement shows a CREATE TRIGGER statement that creates the given\ntrigger.\n\nURL: https://mariadb.com/kb/en/show-create-trigger/\n\n','','https://mariadb.com/kb/en/show-create-trigger/'),(17,'SHOW CREATE PROCEDURE',26,'Syntax:\nSHOW CREATE PROCEDURE proc_name\n\nThis statement is a MySQL extension. It returns the exact string that\ncan be used to re-create the named stored procedure. A similar\nstatement, SHOW CREATE FUNCTION, displays information about stored\nfunctions (see [HELP SHOW CREATE FUNCTION]).\n\nBoth statements require that you be the owner of the routine or have\nSELECT access to the mysql.proc table. If you do not have privileges\nfor the routine itself, the value displayed for the Create Procedure or\nCreate Function field will be NULL.\n\nURL: https://mariadb.com/kb/en/show-create-procedure/\n\n','MariaDB> SHOW CREATE PROCEDURE test.simpleproc\\G\n*************************** 1. row ***************************\n Procedure: simpleproc\n sql_mode:\n Create Procedure: CREATE PROCEDURE `simpleproc`(OUT param1 INT)\n BEGIN\n SELECT COUNT(*) INTO param1 FROM t;\n END\ncharacter_set_client: latin1\ncollation_connection: latin1_swedish_ci\n Database Collation: latin1_swedish_ci\n\nMariaDB> SHOW CREATE FUNCTION test.hello\\G\n*************************** 1. row ***************************\n Function: hello\n sql_mode:\n Create Function: CREATE FUNCTION `hello`(s CHAR(20))\n RETURNS CHAR(50)\n RETURN CONCAT(\'Hello, \',s,\'!\')\ncharacter_set_client: latin1\ncollation_connection: latin1_swedish_ci\n Database Collation: latin1_swedish_ci\n','https://mariadb.com/kb/en/show-create-procedure/'),(18,'OPEN',23,'Syntax:\nOPEN cursor_name\n\nThis statement opens a previously declared cursor. For an example, see\nhttps://mariadb.com/kb/en/cursor-overview/.\n\nURL: https://mariadb.com/kb/en/open/\n\n','','https://mariadb.com/kb/en/open/'),(19,'INTEGER',22,'INTEGER[(M)] [UNSIGNED] [ZEROFILL]\n\nThis type is a synonym for INT.\n\nURL: https://mariadb.com/kb/en/sql_language-data_types-int\n\n','','https://mariadb.com/kb/en/sql_language-data_types-int'),(20,'LOWER',37,'Syntax:\nLOWER(str)\n\nReturns the string str with all characters changed to lowercase\naccording to the current character set mapping. The default is latin1\n(cp1252 West European).\n\nMariaDB> SELECT LOWER(\'QUADRATICALLY\');\n -> \'quadratically\'\n\nLOWER() (and UPPER()) are ineffective when applied to binary strings\n(BINARY, VARBINARY, BLOB). To perform lettercase conversion, convert\nthe string to a nonbinary string:\n\nMariaDB> SET @str = BINARY \'New York\';\nMariaDB> SELECT LOWER(@str), LOWER(CONVERT(@str USING latin1));\n+-------------+-----------------------------------+\n| LOWER(@str) | LOWER(CONVERT(@str USING latin1)) |\n+-------------+-----------------------------------+\n| New York | new york |\n+-------------+-----------------------------------+\n\nURL: https://mariadb.com/kb/en/lower/\n\n','','https://mariadb.com/kb/en/lower/'),(21,'SHOW COLUMNS',26,'Syntax:\nSHOW [FULL] COLUMNS {FROM | IN} tbl_name [{FROM | IN} db_name]\n [LIKE \'pattern\' | WHERE expr]\n\nSHOW COLUMNS displays information about the columns in a given table.\nIt also works for views. The LIKE clause, if present, indicates which\ncolumn names to match. The WHERE clause can be given to select rows\nusing more general conditions, as discussed in\nhttps://mariadb.com/kb/en/extended-show/.\n\nSHOW COLUMNS displays information only for those columns for which you\nhave some privilege.\n\nMariaDB> SHOW COLUMNS FROM City;\n+------------+----------+------+-----+---------+----------------+\n| Field | Type | Null | Key | Default | Extra |\n+------------+----------+------+-----+---------+----------------+\n| Id | int(11) | NO | PRI | NULL | auto_increment |\n| Name | char(35) | NO | | | |\n| Country | char(3) | NO | UNI | | |\n| District | char(20) | YES | MUL | | |\n| Population | int(11) | NO | | 0 | |\n+------------+----------+------+-----+---------+----------------+\n5 rows in set (0.00 sec)\n\nIf the data types differ from what you expect them to be based on a\nCREATE TABLE statement, note that MySQL sometimes changes data types\nwhen you create or alter a table. The conditions under which this\noccurs are described in\nhttps://mariadb.com/kb/en/silent-column-changes/.\n\nThe FULL keyword causes the output to include the column collation and\ncomments, as well as the privileges you have for each column.\n\nYou can use db_name.tbl_name as an alternative to the tbl_name FROM\ndb_name syntax. In other words, these two statements are equivalent:\n\nMariaDB> SHOW COLUMNS FROM mytable FROM mydb;\nMariaDB> SHOW COLUMNS FROM mydb.mytable;\n\nSHOW COLUMNS displays the following values for each table column:\n\nField indicates the column name.\n\nType indicates the column data type.\n\nCollation indicates the collation for nonbinary string columns, or NULL\nfor other columns. This value is displayed only if you use the FULL\nkeyword.\n\nThe Null field contains YES if NULL values can be stored in the column,\nNO if not.\n\nThe Key field indicates whether the column is indexed:\n\no If Key is empty, the column either is not indexed or is indexed only\n as a secondary column in a multiple-column, nonunique index.\n\no If Key is PRI, the column is a PRIMARY KEY or is one of the columns\n in a multiple-column PRIMARY KEY.\n\no If Key is UNI, the column is the first column of a UNIQUE index. (A\n UNIQUE index permits multiple NULL values, but you can tell whether\n the column permits NULL by checking the Null field.)\n\no If Key is MUL, the column is the first column of a nonunique index in\n which multiple occurrences of a given value are permitted within the\n column.\n\nIf more than one of the Key values applies to a given column of a\ntable, Key displays the one with the highest priority, in the order\nPRI, UNI, MUL.\n\nA UNIQUE index may be displayed as PRI if it cannot contain NULL values\nand there is no PRIMARY KEY in the table. A UNIQUE index may display as\nMUL if several columns form a composite UNIQUE index; although the\ncombination of the columns is unique, each column can still hold\nmultiple occurrences of a given value.\n\nThe Default field indicates the default value that is assigned to the\ncolumn. This is NULL if the column has an explicit default of NULL, or\nif the column definition has no DEFAULT clause.\n\nThe Extra field contains any additional information that is available\nabout a given column. The value is nonempty in these cases:\nauto_increment for columns that have the AUTO_INCREMENT attribute; on\nupdate CURRENT_TIMESTAMP for TIMESTAMP columns that have the ON UPDATE\nCURRENT_TIMESTAMP attribute.\n\nPrivileges indicates the privileges you have for the column. This value\nis displayed only if you use the FULL keyword.\n\nComment indicates any comment the column has. This value is displayed\nonly if you use the FULL keyword.\n\nSHOW FIELDS is a synonym for SHOW COLUMNS. You can also list a table\'s\ncolumns with the mysqlshow db_name tbl_name command.\n\nThe DESCRIBE statement provides information similar to SHOW COLUMNS.\nSee [HELP DESCRIBE].\n\nThe SHOW CREATE TABLE, SHOW TABLE STATUS, and SHOW INDEX statements\nalso provide information about tables. See [HELP SHOW].\n\nURL: https://mariadb.com/kb/en/show-columns/\n\n','','https://mariadb.com/kb/en/show-columns/'),(22,'CREATE TRIGGER',39,'Syntax:\nCREATE\n [DEFINER = { user | CURRENT_USER }]\n TRIGGER trigger_name trigger_time trigger_event\n ON tbl_name FOR EACH ROW trigger_body\n\nThis statement creates a new trigger. A trigger is a named database\nobject that is associated with a table, and that activates when a\nparticular event occurs for the table. The trigger becomes associated\nwith the table named tbl_name, which must refer to a permanent table.\nYou cannot associate a trigger with a TEMPORARY table or a view.\n\nCREATE TRIGGER requires the TRIGGER privilege for the table associated\nwith the trigger. The statement might also require the SUPER privilege,\ndepending on the DEFINER value, as described later in this section. If\nbinary logging is enabled, CREATE TRIGGER might require the SUPER\nprivilege, as described in\nhttps://mariadb.com/kb/en/binary-logging-of-stored-routines/.\n\nThe DEFINER clause determines the security context to be used when\nchecking access privileges at trigger activation time. See later in\nthis section for more information.\n\ntrigger_time is the trigger action time. It can be BEFORE or AFTER to\nindicate that the trigger activates before or after each row to be\nmodified.\n\ntrigger_event indicates the kind of statement that activates the\ntrigger. The trigger_event can be one of the following:\n\no INSERT: The trigger is activated whenever a new row is inserted into\n the table; for example, through INSERT, LOAD DATA, and REPLACE\n statements.\n\no UPDATE: The trigger is activated whenever a row is modified; for\n example, through UPDATE statements.\n\no DELETE: The trigger is activated whenever a row is deleted from the\n table; for example, through DELETE and REPLACE statements. However,\n DROP TABLE and TRUNCATE TABLE statements on the table do not activate\n this trigger, because they do not use DELETE. Dropping a partition\n does not activate DELETE triggers, either. See [HELP TRUNCATE TABLE].\n\nURL: https://mariadb.com/kb/en/create-trigger/\n\n','','https://mariadb.com/kb/en/create-trigger/'),(23,'MONTH',31,'Syntax:\nMONTH(date)\n\nReturns the month for date, in the range 1 to 12 for January to\nDecember, or 0 for dates such as \'0000-00-00\' or \'2008-00-00\' that have\na zero month part.\n\nURL: https://mariadb.com/kb/en/month/\n\n','MariaDB> SELECT MONTH(\'2008-02-03\');\n -> 2\n','https://mariadb.com/kb/en/month/'),(24,'TINYINT',22,'TINYINT[(M)] [UNSIGNED] [ZEROFILL]\n\nA very small integer. The signed range is -128 to 127. The unsigned\nrange is 0 to 255.\n\nURL: https://mariadb.com/kb/en/tinyint/\n\n','','https://mariadb.com/kb/en/tinyint/'),(25,'SHOW TRIGGERS',26,'Syntax:\nSHOW TRIGGERS [{FROM | IN} db_name]\n [LIKE \'pattern\' | WHERE expr]\n\nSHOW TRIGGERS lists the triggers currently defined for tables in a\ndatabase (the default database unless a FROM clause is given). This\nstatement returns results only for databases and tables for which you\nhave the TRIGGER privilege. The LIKE clause, if present, indicates\nwhich table names to match and causes the statement to display triggers\nfor those tables. The WHERE clause can be given to select rows using\nmore general conditions, as discussed in\nhttps://mariadb.com/kb/en/extended-show/.\n\nFor the trigger ins_sum as defined in\nhttps://mariadb.com/kb/en/triggers/, the output of\nthis statement is as shown here:\n\nMariaDB> SHOW TRIGGERS LIKE \'acc%\'\\G\n*************************** 1. row ***************************\n Trigger: ins_sum\n Event: INSERT\n Table: account\n Statement: SET @sum = @sum + NEW.amount\n Timing: BEFORE\n Created: NULL\n sql_mode:\n Definer: myname@localhost\ncharacter_set_client: latin1\ncollation_connection: latin1_swedish_ci\n Database Collation: latin1_swedish_ci\n\ncharacter_set_client is the session value of the character_set_client\nsystem variable when the trigger was created. collation_connection is\nthe session value of the collation_connection system variable when the\ntrigger was created. Database Collation is the collation of the\ndatabase with which the trigger is associated.\n\nURL: https://mariadb.com/kb/en/show-triggers/\n\n','','https://mariadb.com/kb/en/show-triggers/'),(26,'MASTER_POS_WAIT',14,'Syntax:\nMASTER_POS_WAIT(log_name,log_pos[,timeout])\n\nThis function is useful for control of master/slave synchronization. It\nblocks until the slave has read and applied all updates up to the\nspecified position in the master log. The return value is the number of\nlog events the slave had to wait for to advance to the specified\nposition. The function returns NULL if the slave SQL thread is not\nstarted, the slave\'s master information is not initialized, the\narguments are incorrect, or an error occurs. It returns -1 if the\ntimeout has been exceeded. If the slave SQL thread stops while\nMASTER_POS_WAIT() is waiting, the function returns NULL. If the slave\nis past the specified position, the function returns immediately.\n\nIf a timeout value is specified, MASTER_POS_WAIT() stops waiting when\ntimeout seconds have elapsed. timeout must be greater than 0; a zero or\nnegative timeout means no timeout.\n\nURL: https://mariadb.com/kb/en/master_pos_wait/\n\n','','https://mariadb.com/kb/en/master_pos_wait/'),(27,'REGEXP',37,'Syntax:\nexpr REGEXP pat, expr RLIKE pat\n\nPerforms a pattern match of a string expression expr against a pattern\npat. The pattern can be an extended regular expression. The syntax for\nregular expressions is discussed in\nhttps://mariadb.com/kb/en/regexp/. Returns 1 if expr\nmatches pat; otherwise it returns 0. If either expr or pat is NULL, the\nresult is NULL. RLIKE is a synonym for REGEXP, provided for mSQL\ncompatibility.\n\nThe pattern need not be a literal string. For example, it can be\nspecified as a string expression or table column.\n\n*Note*: Because MySQL uses the C escape syntax in strings (for example,\n\"\\n\" to represent the newline character), you must double any \"\\\" that\nyou use in your REGEXP strings.\n\nREGEXP is not case sensitive, except when used with binary strings.\n\nURL: https://mariadb.com/kb/en/regexp/\n\n','MariaDB> SELECT \'Monty!\' REGEXP \'.*\';\n -> 1\nMariaDB> SELECT \'new*\\n*line\' REGEXP \'new\\\\*.\\\\*line\';\n -> 1\nMariaDB> SELECT \'a\' REGEXP \'A\', \'a\' REGEXP BINARY \'A\';\n -> 1 0\nMariaDB> SELECT \'a\' REGEXP \'^[a-d]\';\n -> 1\n','https://mariadb.com/kb/en/regexp/'),(28,'IF STATEMENT',23,'Syntax:\nIF search_condition THEN statement_list\n [ELSEIF search_condition THEN statement_list] ...\n [ELSE statement_list]\nEND IF\n\nThe IF statement for stored programs implements a basic conditional\nconstruct.\n\n*Note*: There is also an IF() function, which differs from the IF\nstatement described here. See\nhttps://mariadb.com/kb/en/if-function/. The\nIF statement can have THEN, ELSE, and ELSEIF clauses, and it is\nterminated with END IF.\n\nIf the search_condition evaluates to true, the corresponding THEN or\nELSEIF clause statement_list executes. If no search_condition matches,\nthe ELSE clause statement_list executes.\n\nEach statement_list consists of one or more SQL statements; an empty\nstatement_list is not permitted.\n\nURL: https://mariadb.com/kb/en/if-statement/\n\n','','https://mariadb.com/kb/en/if-statement/'),(29,'^',19,'Syntax:\n^\n\nBitwise XOR:\n\nURL: https://mariadb.com/kb/en/bitwise-xor/\n\n','MariaDB> SELECT 1 ^ 1;\n -> 0\nMariaDB> SELECT 1 ^ 0;\n -> 1\nMariaDB> SELECT 11 ^ 3;\n -> 8\n','https://mariadb.com/kb/en/bitwise-xor/'),(30,'DROP VIEW',39,'Syntax:\nDROP VIEW [IF EXISTS]\n view_name [, view_name] ...\n [RESTRICT | CASCADE]\n\nDROP VIEW removes one or more views. You must have the DROP privilege\nfor each view. If any of the views named in the argument list do not\nexist, MySQL returns an error indicating by name which nonexisting\nviews it was unable to drop, but it also drops all of the views in the\nlist that do exist.\n\nThe IF EXISTS clause prevents an error from occurring for views that\ndon\'t exist. When this clause is given, a NOTE is generated for each\nnonexistent view. See [HELP SHOW WARNINGS].\n\nRESTRICT and CASCADE, if given, are parsed and ignored.\n\nURL: https://mariadb.com/kb/en/drop-view/\n\n','','https://mariadb.com/kb/en/drop-view/'),(31,'WITHIN',30,'Within(g1,g2)\n\nReturns 1 or 0 to indicate whether g1 is spatially within g2. This\ntests the opposite relationship as Contains().\n\nURL: https://mariadb.com/kb/en/within/\n\n','','https://mariadb.com/kb/en/within/'),(32,'WEEK',31,'Syntax:\nWEEK(date[,mode])\n\nThis function returns the week number for date. The two-argument form\nof WEEK() enables you to specify whether the week starts on Sunday or\nMonday and whether the return value should be in the range from 0 to 53\nor from 1 to 53. If the mode argument is omitted, the value of the\ndefault_week_format system variable is used. See\nhttps://mariadb.com/kb/en/server-system-variables/.\n\nURL: https://mariadb.com/kb/en/week/\n\n','MariaDB> SELECT WEEK(\'2008-02-20\');\n -> 7\nMariaDB> SELECT WEEK(\'2008-02-20\',0);\n -> 7\nMariaDB> SELECT WEEK(\'2008-02-20\',1);\n -> 8\nMariaDB> SELECT WEEK(\'2008-12-31\',1);\n -> 53\n','https://mariadb.com/kb/en/week/'),(33,'SHOW PLUGINS',26,'Syntax:\nSHOW PLUGINS\n\nSHOW PLUGINS displays information about server plugins. Plugin\ninformation is also available in the INFORMATION_SCHEMA.PLUGINS table.\nSee https://mariadb.com/kb/en/information_schemaplugins-table/.\n\nExample of SHOW PLUGINS output:\n\nMariaDB> SHOW PLUGINS\\G\n*************************** 1. row ***************************\n Name: binlog\n Status: ACTIVE\n Type: STORAGE ENGINE\nLibrary: NULL\nLicense: GPL\n*************************** 2. row ***************************\n Name: CSV\n Status: ACTIVE\n Type: STORAGE ENGINE\nLibrary: NULL\nLicense: GPL\n*************************** 3. row ***************************\n Name: MEMORY\n Status: ACTIVE\n Type: STORAGE ENGINE\nLibrary: NULL\nLicense: GPL\n*************************** 4. row ***************************\n Name: MyISAM\n Status: ACTIVE\n Type: STORAGE ENGINE\nLibrary: NULL\nLicense: GPL\n...\n\nURL: https://mariadb.com/kb/en/show-plugins/\n\n','','https://mariadb.com/kb/en/show-plugins/'),(34,'DROP FUNCTION UDF',21,'Syntax:\nDROP FUNCTION function_name\n\nThis statement drops the user-defined function (UDF) named\nfunction_name.\n\nTo drop a function, you must have the DELETE privilege for the mysql\ndatabase. This is because DROP FUNCTION removes a row from the\nmysql.func system table that records the function\'s name, type, and\nshared library name.\n\nURL: https://mariadb.com/kb/en/drop-function-udf/\n\n','','https://mariadb.com/kb/en/drop-function-udf/'),(35,'PREPARE',8,'Syntax:\nPREPARE stmt_name FROM preparable_stmt\n\nThe PREPARE statement prepares a statement and assigns it a name,\nstmt_name, by which to refer to the statement later. Statement names\nare not case sensitive. preparable_stmt is either a string literal or a\nuser variable that contains the text of the statement. The text must\nrepresent a single SQL statement, not multiple statements. Within the\nstatement, \"?\" characters can be used as parameter markers to indicate\nwhere data values are to be bound to the query later when you execute\nit. The \"?\" characters should not be enclosed within quotation marks,\neven if you intend to bind them to string values. Parameter markers can\nbe used only where data values should appear, not for SQL keywords,\nidentifiers, and so forth.\n\nIf a prepared statement with the given name already exists, it is\ndeallocated implicitly before the new statement is prepared. This means\nthat if the new statement contains an error and cannot be prepared, an\nerror is returned and no statement with the given name exists.\n\nA prepared statement is executed with EXECUTE and released with\nDEALLOCATE PREPARE.\n\nThe scope of a prepared statement is the session within which it is\ncreated. Other sessions cannot see it.\n\nURL: https://mariadb.com/kb/en/prepare-statement/\n\n','','https://mariadb.com/kb/en/prepare-statement/'),(36,'LOCK',8,'Syntax:\nLOCK TABLES\n tbl_name [[AS] alias] lock_type\n [, tbl_name [[AS] alias] lock_type] ...\n\nlock_type:\n READ [LOCAL]\n | [LOW_PRIORITY] WRITE\n\nUNLOCK TABLES\n\nMySQL enables client sessions to acquire table locks explicitly for the\npurpose of cooperating with other sessions for access to tables, or to\nprevent other sessions from modifying tables during periods when a\nsession requires exclusive access to them. A session can acquire or\nrelease locks only for itself. One session cannot acquire locks for\nanother session or release locks held by another session.\n\nLocks may be used to emulate transactions or to get more speed when\nupdating tables. This is explained in more detail later in this\nsection.\n\nLOCK TABLES explicitly acquires table locks for the current client\nsession. Table locks can be acquired for base tables or views. You must\nhave the LOCK TABLES privilege, and the SELECT privilege for each\nobject to be locked.\n\nFor view locking, LOCK TABLES adds all base tables used in the view to\nthe set of tables to be locked and locks them automatically. If you\nlock a table explicitly with LOCK TABLES, any tables used in triggers\nare also locked implicitly, as described in\nhttps://mariadb.com/kb/en/triggers-and-implicit-locks/.\n\nUNLOCK TABLES explicitly releases any table locks held by the current\nsession. LOCK TABLES implicitly releases any table locks held by the\ncurrent session before acquiring new locks.\n\nAnother use for UNLOCK TABLES is to release the global read lock\nacquired with the FLUSH TABLES WITH READ LOCK statement, which enables\nyou to lock all tables in all databases. See [HELP FLUSH]. (This is a\nvery convenient way to get backups if you have a file system such as\nVeritas that can take snapshots in time.)\n\nURL: https://mariadb.com/kb/en/transactions-lock/\n\n','','https://mariadb.com/kb/en/transactions-lock/'),(37,'UPDATEXML',37,'Syntax:\nUpdateXML(xml_target, xpath_expr, new_xml)\n\nThis function replaces a single portion of a given fragment of XML\nmarkup xml_target with a new XML fragment new_xml, and then returns the\nchanged XML. The portion of xml_target that is replaced matches an\nXPath expression xpath_expr supplied by the user. In MySQL 5.5, the\nXPath expression can contain at most 127 characters. (This limitation\nis lifted in MySQL 5.6.)\n\nIf no expression matching xpath_expr is found, or if multiple matches\nare found, the function returns the original xml_target XML fragment.\nAll three arguments should be strings.\n\nURL: https://mariadb.com/kb/en/updatexml/\n\n','MariaDB> SELECT\n -> UpdateXML(\'<a><b>ccc</b><d></d></a>\', \'/a\', \'<e>fff</e>\') AS val1,\n -> UpdateXML(\'<a><b>ccc</b><d></d></a>\', \'/b\', \'<e>fff</e>\') AS val2,\n -> UpdateXML(\'<a><b>ccc</b><d></d></a>\', \'//b\', \'<e>fff</e>\') AS val3,\n -> UpdateXML(\'<a><b>ccc</b><d></d></a>\', \'/a/d\', \'<e>fff</e>\') AS val4,\n -> UpdateXML(\'<a><d></d><b>ccc</b><d></d></a>\', \'/a/d\', \'<e>fff</e>\') AS val5\n -> \\G\n\n*************************** 1. row ***************************\nval1: <e>fff</e>\nval2: <a><b>ccc</b><d></d></a>\nval3: <a><e>fff</e><d></d></a>\nval4: <a><b>ccc</b><e>fff</e></a>\nval5: <a><d></d><b>ccc</b><d></d></a>\n','https://mariadb.com/kb/en/updatexml/'),(38,'RESET SLAVE',8,'Syntax:\nRESET SLAVE [ALL]\n\nRESET SLAVE makes the slave forget its replication position in the\nmaster\'s binary log. This statement is meant to be used for a clean\nstart: It deletes the master.info and relay-log.info files, all the\nrelay log files, and starts a new relay log file. To use RESET SLAVE,\nthe slave replication threads must be stopped (use STOP SLAVE if\nnecessary).\n\n*Note*: All relay log files are deleted, even if they have not been\ncompletely executed by the slave SQL thread. (This is a condition\nlikely to exist on a replication slave if you have issued a STOP SLAVE\nstatement or if the slave is highly loaded.)\n\nIn MySQL 5.5 (unlike the case in MySQL 5.1 and earlier), RESET SLAVE\ndoes not change any replication connection parameters such as master\nhost, master port, master user, or master password, which are retained\nin memory. This means that START SLAVE can be issued without requiring\na CHANGE MASTER TO statement following RESET SLAVE.\n\nIn MySQL 5.5.16 and later, you can use RESET SLAVE ALL to reset these\nconnection parameters (Bug #11809016). Connection parameters are also\nreset if the slave mysqld is shut down.\n\nIf the slave SQL thread was in the middle of replicating temporary\ntables when it was stopped, and RESET SLAVE is issued, these replicated\ntemporary tables are deleted on the slave.\n\nURL: https://mariadb.com/kb/en/reset-slave-connection_name/\n\n','','https://mariadb.com/kb/en/reset-slave-connection_name/'),(39,'SHOW BINARY LOGS',26,'Syntax:\nSHOW BINARY LOGS\nSHOW MASTER LOGS\n\nLists the binary log files on the server. This statement is used as\npart of the procedure described in [HELP PURGE BINARY LOGS], that shows\nhow to determine which logs can be purged.\n\nMariaDB> SHOW BINARY LOGS;\n+---------------+-----------+\n| Log_name | File_size |\n+---------------+-----------+\n| binlog.000015 | 724935 |\n| binlog.000016 | 733481 |\n+---------------+-----------+\n\nURL: https://mariadb.com/kb/en/show-binary-logs/\n\n','','https://mariadb.com/kb/en/show-binary-logs/'),(40,'POLYGON',24,'Polygon(ls1,ls2,...)\n\nConstructs a Polygon value from a number of LineString or WKB\nLineString arguments. If any argument does not represent a LinearRing\n(that is, not a closed and simple LineString), the return value is\nNULL.\n\nURL: https://mariadb.com/kb/en/polygon/\n\n','','https://mariadb.com/kb/en/polygon/'),(41,'MINUTE',31,'Syntax:\nMINUTE(time)\n\nReturns the minute for time, in the range 0 to 59.\n\nURL: https://mariadb.com/kb/en/minute/\n\n','MariaDB> SELECT MINUTE(\'2008-02-03 10:05:03\');\n -> 5\n','https://mariadb.com/kb/en/minute/'),(42,'DAY',31,'Syntax:\nDAY(date)\n\nDAY() is a synonym for DAYOFMONTH().\n\nURL: https://mariadb.com/kb/en/day/\n\n','','https://mariadb.com/kb/en/day/'),(43,'MID',37,'Syntax:\nMID(str,pos,len)\n\nMID(str,pos,len) is a synonym for SUBSTRING(str,pos,len).\n\nURL: https://mariadb.com/kb/en/mid/\n\n','','https://mariadb.com/kb/en/mid/'),(44,'UUID',14,'Syntax:\nUUID()\n\nReturns a Universal Unique Identifier (UUID) generated according to\n\"DCE 1.1: Remote Procedure Call\" (Appendix A) CAE (Common Applications\nEnvironment) Specifications published by The Open Group in October 1997\n(Document Number C706,\nhttp://www.opengroup.org/public/pubs/catalog/c706.htm).\n\nA UUID is designed as a number that is globally unique in space and\ntime. Two calls to UUID() are expected to generate two different\nvalues, even if these calls are performed on two separate computers\nthat are not connected to each other.\n\nA UUID is a 128-bit number represented by a utf8 string of five\nhexadecimal numbers in aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee format:\n\no The first three numbers are generated from a timestamp.\n\no The fourth number preserves temporal uniqueness in case the timestamp\n value loses monotonicity (for example, due to daylight saving time).\n\no The fifth number is an IEEE 802 node number that provides spatial\n uniqueness. A random number is substituted if the latter is not\n available (for example, because the host computer has no Ethernet\n card, or we do not know how to find the hardware address of an\n interface on your operating system). In this case, spatial uniqueness\n cannot be guaranteed. Nevertheless, a collision should have very low\n probability.\n\n Currently, the MAC address of an interface is taken into account only\n on FreeBSD and Linux. On other operating systems, MySQL uses a\n randomly generated 48-bit number.\n\nURL: https://mariadb.com/kb/en/uuid/\n\n','MariaDB> SELECT UUID();\n -> \'6ccd780c-baba-1026-9564-0040f4311e29\'\n','https://mariadb.com/kb/en/uuid/'),(45,'LINESTRING',24,'LineString(pt1,pt2,...)\n\nConstructs a LineString value from a number of Point or WKB Point\narguments. If the number of arguments is less than two, the return\nvalue is NULL.\n\nURL: https://mariadb.com/kb/en/linestring/\n\n','','https://mariadb.com/kb/en/linestring/'),(46,'SLEEP',14,'Syntax:\nSLEEP(duration)\n\nSleeps (pauses) for the number of seconds given by the duration\nargument, then returns 0. If SLEEP() is interrupted, it returns 1. The\nduration may have a fractional part given in microseconds.\n\nURL: https://mariadb.com/kb/en/sleep/\n\n','','https://mariadb.com/kb/en/sleep/'),(47,'CONNECTION_ID',17,'Syntax:\nCONNECTION_ID()\n\nReturns the connection ID (thread ID) for the connection. Every\nconnection has an ID that is unique among the set of currently\nconnected clients.\n\nURL: https://mariadb.com/kb/en/connection_id/\n\n','MariaDB> SELECT CONNECTION_ID();\n -> 23786\n','https://mariadb.com/kb/en/connection_id/'),(48,'DELETE',27,'Syntax:\nSingle-table syntax:\n\nDELETE [LOW_PRIORITY] [QUICK] [IGNORE] FROM tbl_name\n [WHERE where_condition]\n [ORDER BY ...]\n [LIMIT row_count]\n\nMultiple-table syntax:\n\nDELETE [LOW_PRIORITY] [QUICK] [IGNORE]\n tbl_name[.*] [, tbl_name[.*]] ...\n FROM table_references\n [WHERE where_condition]\n\nOr:\n\nDELETE [LOW_PRIORITY] [QUICK] [IGNORE]\n FROM tbl_name[.*] [, tbl_name[.*]] ...\n USING table_references\n [WHERE where_condition]\n\nFor the single-table syntax, the DELETE statement deletes rows from\ntbl_name and returns a count of the number of deleted rows. This count\ncan be obtained by calling the ROW_COUNT() function (see\nhttps://mariadb.com/kb/en/information-functions-row_count/). The\nWHERE clause, if given, specifies the conditions that identify which\nrows to delete. With no WHERE clause, all rows are deleted. If the\nORDER BY clause is specified, the rows are deleted in the order that is\nspecified. The LIMIT clause places a limit on the number of rows that\ncan be deleted.\n\nFor the multiple-table syntax, DELETE deletes from each tbl_name the\nrows that satisfy the conditions. In this case, ORDER BY and LIMIT\ncannot be used.\n\nwhere_condition is an expression that evaluates to true for each row to\nbe deleted. It is specified as described in\nhttps://mariadb.com/kb/en/select/.\n\nCurrently, you cannot delete from a table and select from the same\ntable in a subquery.\n\nYou need the DELETE privilege on a table to delete rows from it. You\nneed only the SELECT privilege for any columns that are only read, such\nas those named in the WHERE clause.\n\nAs stated, a DELETE statement with no WHERE clause deletes all rows. A\nfaster way to do this, when you do not need to know the number of\ndeleted rows, is to use TRUNCATE TABLE. However, within a transaction\nor if you have a lock on the table, TRUNCATE TABLE cannot be used\nwhereas DELETE can. See [HELP TRUNCATE TABLE], and [HELP LOCK].\n\nURL: https://mariadb.com/kb/en/delete/\n\n','','https://mariadb.com/kb/en/delete/'),(49,'ROUND',4,'Syntax:\nROUND(X), ROUND(X,D)\n\nRounds the argument X to D decimal places. The rounding algorithm\ndepends on the data type of X. D defaults to 0 if not specified. D can\nbe negative to cause D digits left of the decimal point of the value X\nto become zero.\n\nURL: https://mariadb.com/kb/en/round/\n\n','MariaDB> SELECT ROUND(-1.23);\n -> -1\nMariaDB> SELECT ROUND(-1.58);\n -> -2\nMariaDB> SELECT ROUND(1.58);\n -> 2\nMariaDB> SELECT ROUND(1.298, 1);\n -> 1.3\nMariaDB> SELECT ROUND(1.298, 0);\n -> 1\nMariaDB> SELECT ROUND(23.298, -1);\n -> 20\n','https://mariadb.com/kb/en/round/'),(50,'NULLIF',7,'Syntax:\nNULLIF(expr1,expr2)\n\nReturns NULL if expr1 = expr2 is true, otherwise returns expr1. This is\nthe same as CASE WHEN expr1 = expr2 THEN NULL ELSE expr1 END.\n\nURL: https://mariadb.com/kb/en/nullif/\n\n','MariaDB> SELECT NULLIF(1,1);\n -> NULL\nMariaDB> SELECT NULLIF(1,2);\n -> 1\n','https://mariadb.com/kb/en/nullif/'),(51,'CLOSE',23,'Syntax:\nCLOSE cursor_name\n\nThis statement closes a previously opened cursor. For an example, see\nhttps://mariadb.com/kb/en/cursor-overview/.\n\nAn error occurs if the cursor is not open.\n\nIf not closed explicitly, a cursor is closed at the end of the BEGIN\n... END block in which it was declared.\n\nURL: https://mariadb.com/kb/en/close/\n\n','','https://mariadb.com/kb/en/close/'),(52,'STOP SLAVE',8,'Syntax:\nSTOP SLAVE [thread_types]\n\nthread_types:\n [thread_type [, thread_type] ... ]\n\nthread_type: IO_THREAD | SQL_THREAD\n\nStops the slave threads. STOP SLAVE requires the SUPER privilege.\nRecommended best practice is to execute STOP SLAVE on the slave before\nstopping the slave server (see\nhttp://dev.mysql.com/doc/refman/5.5/en/server-shutdown.html, for more\ninformation).\n\nWhen using the row-based logging format: You should execute STOP SLAVE\non the slave prior to shutting down the slave server if you are\nreplicating any tables that use a nontransactional storage engine (see\nthe Note later in this section). In MySQL 5.5.9 and later, you can also\nuse STOP SLAVE SQL_THREAD for this purpose.\n\nLike START SLAVE, this statement may be used with the IO_THREAD and\nSQL_THREAD options to name the thread or threads to be stopped.\n\n*Note*: In MySQL 5.5, STOP SLAVE waits until the current replication\nevent group affecting one or more non-transactional tables has finished\nexecuting (if there is any such replication group), or until the user\nissues a KILL QUERY or KILL CONNECTION statement. (Bug #319, Bug\n#38205)\n\nURL: https://mariadb.com/kb/en/stop-slave/\n\n','','https://mariadb.com/kb/en/stop-slave/'),(53,'TIMEDIFF',31,'Syntax:\nTIMEDIFF(expr1,expr2)\n\nTIMEDIFF() returns expr1 - expr2 expressed as a time value. expr1 and\nexpr2 are time or date-and-time expressions, but both must be of the\nsame type.\n\nThe result returned by TIMEDIFF() is limited to the range allowed for\nTIME values. Alternatively, you can use either of the functions\nTIMESTAMPDIFF() and UNIX_TIMESTAMP(), both of which return integers.\n\nURL: https://mariadb.com/kb/en/timediff/\n\n','MariaDB> SELECT TIMEDIFF(\'2000:01:01 00:00:00\',\n -> \'2000:01:01 00:00:00.000001\');\n -> \'-00:00:00.000001\'\nMariaDB> SELECT TIMEDIFF(\'2008-12-31 23:59:59.000001\',\n -> \'2008-12-30 01:01:01.000002\');\n -> \'46:58:57.999999\'\n','https://mariadb.com/kb/en/timediff/'),(54,'REPLACE FUNCTION',37,'Syntax:\nREPLACE(str,from_str,to_str)\n\nReturns the string str with all occurrences of the string from_str\nreplaced by the string to_str. REPLACE() performs a case-sensitive\nmatch when searching for from_str.\n\nURL: https://mariadb.com/kb/en/replace-function/\n\n','MariaDB> SELECT REPLACE(\'www.mariadb.org\', \'w\', \'Ww\');\n -> \'WwWwWw.mariadb.org\'\n','https://mariadb.com/kb/en/replace-function/'),(55,'USE',28,'Syntax:\nUSE db_name\n\nThe USE db_name statement tells MySQL to use the db_name database as\nthe default (current) database for subsequent statements. The database\nremains the default until the end of the session or another USE\nstatement is issued:\n\nUSE db1;\nSELECT COUNT(*) FROM mytable; # selects from db1.mytable\nUSE db2;\nSELECT COUNT(*) FROM mytable; # selects from db2.mytable\n\nURL: https://mariadb.com/kb/en/use/\n\n','','https://mariadb.com/kb/en/use/'),(56,'LINEFROMTEXT',3,'LineFromText(wkt[,srid]), LineStringFromText(wkt[,srid])\n\nConstructs a LINESTRING value using its WKT representation and SRID.\n\nURL: https://mariadb.com/kb/en/linefromtext/\n\n','','https://mariadb.com/kb/en/linefromtext/'),(57,'CASE OPERATOR',7,'Syntax:\nCASE value WHEN [compare_value] THEN result [WHEN [compare_value] THEN\nresult ...] [ELSE result] END\n\nCASE WHEN [condition] THEN result [WHEN [condition] THEN result ...]\n[ELSE result] END\n\nThe first version returns the result where value=compare_value. The\nsecond version returns the result for the first condition that is true.\nIf there was no matching result value, the result after ELSE is\nreturned, or NULL if there is no ELSE part.\n\nURL: https://mariadb.com/kb/en/case-operator/\n\n','MariaDB> SELECT CASE 1 WHEN 1 THEN \'one\'\n -> WHEN 2 THEN \'two\' ELSE \'more\' END;\n -> \'one\'\nMariaDB> SELECT CASE WHEN 1>0 THEN \'true\' ELSE \'false\' END;\n -> \'true\'\nMariaDB> SELECT CASE BINARY \'B\'\n -> WHEN \'a\' THEN 1 WHEN \'b\' THEN 2 END;\n -> NULL\n','https://mariadb.com/kb/en/case-operator/'),(58,'SHOW MASTER STATUS',26,'Syntax:\nSHOW MASTER STATUS\n\nThis statement provides status information about the binary log files\nof the master. It requires either the SUPER or REPLICATION CLIENT\nprivilege.\n\nExample:\n\nMariaDB> SHOW MASTER STATUS;\n+---------------+----------+--------------+------------------+\n| File | Position | Binlog_Do_DB | Binlog_Ignore_DB |\n+---------------+----------+--------------+------------------+\n| mysql-bin.003 | 73 | test | manual,mysql |\n+---------------+----------+--------------+------------------+\n\nURL: https://mariadb.com/kb/en/show-master-status/\n\n','','https://mariadb.com/kb/en/show-master-status/'),(59,'ADDTIME',31,'Syntax:\nADDTIME(expr1,expr2)\n\nADDTIME() adds expr2 to expr1 and returns the result. expr1 is a time\nor datetime expression, and expr2 is a time expression.\n\nURL: https://mariadb.com/kb/en/addtime/\n\n','MariaDB> SELECT ADDTIME(\'2007-12-31 23:59:59.999999\', \'1 1:1:1.000002\');\n -> \'2008-01-02 01:01:01.000001\'\nMariaDB> SELECT ADDTIME(\'01:00:00.999999\', \'02:00:00.999998\');\n -> \'03:00:01.999997\'\n','https://mariadb.com/kb/en/addtime/'),(60,'SPATIAL',34,'For MyISAM tables, MySQL can create spatial indexes using syntax\nsimilar to that for creating regular indexes, but extended with the\nSPATIAL keyword. Currently, columns in spatial indexes must be declared\nNOT NULL. The following examples demonstrate how to create spatial\nindexes:\n\no With CREATE TABLE:\n\nCREATE TABLE geom (g GEOMETRY NOT NULL, SPATIAL INDEX(g)) ENGINE=MyISAM;\n\no With ALTER TABLE:\n\nALTER TABLE geom ADD SPATIAL INDEX(g);\n\no With CREATE INDEX:\n\nCREATE SPATIAL INDEX sp_index ON geom (g);\n\nFor MyISAM tables, SPATIAL INDEX creates an R-tree index. For storage\nengines that support nonspatial indexing of spatial columns, the engine\ncreates a B-tree index. A B-tree index on spatial values will be useful\nfor exact-value lookups, but not for range scans.\n\nFor more information on indexing spatial columns, see [HELP CREATE\nINDEX].\n\nTo drop spatial indexes, use ALTER TABLE or DROP INDEX:\n\no With ALTER TABLE:\n\nALTER TABLE geom DROP INDEX g;\n\no With DROP INDEX:\n\nDROP INDEX sp_index ON geom;\n\nExample: Suppose that a table geom contains more than 32,000\ngeometries, which are stored in the column g of type GEOMETRY. The\ntable also has an AUTO_INCREMENT column fid for storing object ID\nvalues.\n\nURL: https://mariadb.com/kb/en/spatial/\n\n','','https://mariadb.com/kb/en/spatial/'),(61,'TO_SECONDS',31,'Syntax:\nTO_SECONDS(expr)\n\nGiven a date or datetime expr, returns a the number of seconds since\nthe year 0. If expr is not a valid date or datetime value, returns\nNULL.\n\nURL: https://mariadb.com/kb/en/to_seconds/\n\n','MariaDB> SELECT TO_SECONDS(950501);\n -> 62966505600\nMariaDB> SELECT TO_SECONDS(\'2009-11-29\');\n -> 63426672000\nMariaDB> SELECT TO_SECONDS(\'2009-11-29 13:43:32\');\n -> 63426721412\nMariaDB> SELECT TO_SECONDS( NOW() );\n -> 63426721458\n','https://mariadb.com/kb/en/to_seconds/'),(62,'TIMESTAMPDIFF',31,'Syntax:\nTIMESTAMPDIFF(unit,datetime_expr1,datetime_expr2)\n\nReturns datetime_expr2 - datetime_expr1, where datetime_expr1 and\ndatetime_expr2 are date or datetime expressions. One expression may be\na date and the other a datetime; a date value is treated as a datetime\nhaving the time part \'00:00:00\' where necessary. The unit for the\nresult (an integer) is given by the unit argument. The legal values for\nunit are the same as those listed in the description of the\nTIMESTAMPADD() function.\n\nURL: https://mariadb.com/kb/en/timestampdiff/\n\n','MariaDB> SELECT TIMESTAMPDIFF(MONTH,\'2003-02-01\',\'2003-05-01\');\n -> 3\nMariaDB> SELECT TIMESTAMPDIFF(YEAR,\'2002-05-01\',\'2001-01-01\');\n -> -1\nMariaDB> SELECT TIMESTAMPDIFF(MINUTE,\'2003-02-01\',\'2003-05-01 12:05:55\');\n -> 128885\n','https://mariadb.com/kb/en/timestampdiff/'),(63,'UPPER',37,'Syntax:\nUPPER(str)\n\nReturns the string str with all characters changed to uppercase\naccording to the current character set mapping. The default is latin1\n(cp1252 West European).\n\nMariaDB> SELECT UPPER(\'Hej\');\n -> \'HEJ\'\n\nSee the description of LOWER() for information that also applies to\nUPPER(), such as information about how to perform lettercase conversion\nof binary strings (BINARY, VARBINARY, BLOB) for which these functions\nare ineffective.\n\nURL: https://mariadb.com/kb/en/upper/\n\n','','https://mariadb.com/kb/en/upper/'),(64,'FROM_UNIXTIME',31,'Syntax:\nFROM_UNIXTIME(unix_timestamp), FROM_UNIXTIME(unix_timestamp,format)\n\nReturns a representation of the unix_timestamp argument as a value in\n\'YYYY-MM-DD HH:MM:SS\' or YYYYMMDDHHMMSS.uuuuuu format, depending on\nwhether the function is used in a string or numeric context. The value\nis expressed in the current time zone. unix_timestamp is an internal\ntimestamp value such as is produced by the UNIX_TIMESTAMP() function.\n\nIf format is given, the result is formatted according to the format\nstring, which is used the same way as listed in the entry for the\nDATE_FORMAT() function.\n\nURL: https://mariadb.com/kb/en/from_unixtime/\n\n','MariaDB> SELECT FROM_UNIXTIME(1196440219);\n -> \'2007-11-30 10:30:19\'\nMariaDB> SELECT FROM_UNIXTIME(1196440219) + 0;\n -> 20071130103019.000000\nMariaDB> SELECT FROM_UNIXTIME(UNIX_TIMESTAMP(),\n -> \'%Y %D %M %h:%i:%s %x\');\n -> \'2007 30th November 10:30:59 2007\'\n','https://mariadb.com/kb/en/from_unixtime/'),(65,'MEDIUMBLOB',22,'MEDIUMBLOB\n\nA BLOB column with a maximum length of 16,777,215 (224 - 1) bytes. Each\nMEDIUMBLOB value is stored using a 3-byte length prefix that indicates\nthe number of bytes in the value.\n\nURL: https://mariadb.com/kb/en/mediumblob/\n\n','','https://mariadb.com/kb/en/mediumblob/'),(66,'SHA2',12,'Syntax:\nSHA2(str, hash_length)\n\nCalculates the SHA-2 family of hash functions (SHA-224, SHA-256,\nSHA-384, and SHA-512). The first argument is the cleartext string to be\nhashed. The second argument indicates the desired bit length of the\nresult, which must have a value of 224, 256, 384, 512, or 0 (which is\nequivalent to 256). If either argument is NULL or the hash length is\nnot one of the permitted values, the return value is NULL. Otherwise,\nthe function result is a hash value containing the desired number of\nbits. See the notes at the beginning of this section about storing hash\nvalues efficiently.\n\nAs of MySQL 5.5.6, the return value is a nonbinary string in the\nconnection character set. Before 5.5.6, the return value is a binary\nstring; see the notes at the beginning of this section about using the\nvalue as a nonbinary string.\n\nURL: https://mariadb.com/kb/en/sha2/\n\n','MariaDB> SELECT SHA2(\'abc\', 224);\n -> \'23097d223405d8228642a477bda255b32aadbce4bda0b3f7e36c9da7\'\n','https://mariadb.com/kb/en/sha2/'),(67,'IFNULL',7,'Syntax:\nIFNULL(expr1,expr2)\n\nIf expr1 is not NULL, IFNULL() returns expr1; otherwise it returns\nexpr2. IFNULL() returns a numeric or string value, depending on the\ncontext in which it is used.\n\nURL: https://mariadb.com/kb/en/ifnull/\n\n','MariaDB> SELECT IFNULL(1,0);\n -> 1\nMariaDB> SELECT IFNULL(NULL,10);\n -> 10\nMariaDB> SELECT IFNULL(1/0,10);\n -> 10\nMariaDB> SELECT IFNULL(1/0,\'yes\');\n -> \'yes\'\n','https://mariadb.com/kb/en/ifnull/'),(68,'SHOW FUNCTION CODE',26,'Syntax:\nSHOW FUNCTION CODE func_name\n\nThis statement is similar to SHOW PROCEDURE CODE but for stored\nfunctions. See [HELP SHOW PROCEDURE CODE].\n\nURL: https://mariadb.com/kb/en/show-function-code/\n\n','','https://mariadb.com/kb/en/show-function-code/'),(69,'SHOW ERRORS',26,'Syntax:\nSHOW ERRORS [LIMIT [offset,] row_count]\nSHOW COUNT(*) ERRORS\n\nThis statement is similar to SHOW WARNINGS, except that it displays\ninformation only for errors, rather than for errors, warnings, and\nnotes.\n\nThe LIMIT clause has the same syntax as for the SELECT statement. See\nhttps://mariadb.com/kb/en/select/.\n\nThe SHOW COUNT(*) ERRORS statement displays the number of errors. You\ncan also retrieve this number from the error_count variable:\n\nSHOW COUNT(*) ERRORS;\nSELECT @@error_count;\n\nSHOW ERRORS and error_count apply only to errors, not warnings or\nnotes. In other respects, they are similar to SHOW WARNINGS and\nwarning_count. In particular, SHOW ERRORS cannot display information\nfor more than max_error_count messages, and error_count can exceed the\nvalue of max_error_count if the number of errors exceeds\nmax_error_count.\n\nURL: https://mariadb.com/kb/en/show-errors/\n\n','','https://mariadb.com/kb/en/show-errors/'),(70,'LEAST',18,'Syntax:\nLEAST(value1,value2,...)\n\nWith two or more arguments, returns the smallest (minimum-valued)\nargument. The arguments are compared using the following rules:\n\no If any argument is NULL, the result is NULL. No comparison is needed.\n\no If the return value is used in an INTEGER context or all arguments\n are integer-valued, they are compared as integers.\n\no If the return value is used in a REAL context or all arguments are\n real-valued, they are compared as reals.\n\no If the arguments comprise a mix of numbers and strings, they are\n compared as numbers.\n\no If any argument is a nonbinary (character) string, the arguments are\n compared as nonbinary strings.\n\no In all other cases, the arguments are compared as binary strings.\n\nURL: https://mariadb.com/kb/en/least/\n\n','MariaDB> SELECT LEAST(2,0);\n -> 0\nMariaDB> SELECT LEAST(34.0,3.0,5.0,767.0);\n -> 3.0\nMariaDB> SELECT LEAST(\'B\',\'A\',\'C\');\n -> \'A\'\n','https://mariadb.com/kb/en/least/'),(71,'=',18,'=\n\nEqual:\n\nURL: https://mariadb.com/kb/en/equal/\n\n','MariaDB> SELECT 1 = 0;\n -> 0\nMariaDB> SELECT \'0\' = 0;\n -> 1\nMariaDB> SELECT \'0.0\' = 0;\n -> 1\nMariaDB> SELECT \'0.01\' = 0;\n -> 0\nMariaDB> SELECT \'.01\' = 0.01;\n -> 1\n','https://mariadb.com/kb/en/equal/'),(72,'REVERSE',37,'Syntax:\nREVERSE(str)\n\nReturns the string str with the order of the characters reversed.\n\nURL: https://mariadb.com/kb/en/reverse/\n\n','MariaDB> SELECT REVERSE(\'abc\');\n -> \'cba\'\n','https://mariadb.com/kb/en/reverse/'),(73,'ISNULL',18,'Syntax:\nISNULL(expr)\n\nIf expr is NULL, ISNULL() returns 1, otherwise it returns 0.\n\nURL: https://mariadb.com/kb/en/isnull/\n\n','MariaDB> SELECT ISNULL(1+1);\n -> 0\nMariaDB> SELECT ISNULL(1/0);\n -> 1\n','https://mariadb.com/kb/en/isnull/'),(74,'BINARY',22,'BINARY(M)\n\nThe BINARY type is similar to the CHAR type, but stores binary byte\nstrings rather than nonbinary character strings. M represents the\ncolumn length in bytes.\n\nURL: https://mariadb.com/kb/en/binary/\n\n','','https://mariadb.com/kb/en/binary/'),(75,'BLOB DATA TYPE',22,'A BLOB is a binary large object that can hold a variable amount of\ndata. The four BLOB types are TINYBLOB, BLOB, MEDIUMBLOB, and LONGBLOB.\nThese differ only in the maximum length of the values they can hold.\nThe four TEXT types are TINYTEXT, TEXT, MEDIUMTEXT, and LONGTEXT. These\ncorrespond to the four BLOB types and have the same maximum lengths and\nstorage requirements. See\nhttps://mariadb.com/kb/en/data-type-storage-requirements/.\n\nURL: https://mariadb.com/kb/en/sql_language-data_types-blob/\n\n','','https://mariadb.com/kb/en/sql_language-data_types-blob/'),(76,'BOUNDARY',36,'Boundary(g)\n\nReturns a geometry that is the closure of the combinatorial boundary of\nthe geometry value g.\n\nURL: https://mariadb.com/kb/en/boundary/\n\n','','https://mariadb.com/kb/en/boundary/'),(77,'CREATE USER',10,'Syntax:\nCREATE USER user_specification\n [, user_specification] ...\n\nuser_specification:\n user\n [\n IDENTIFIED BY [PASSWORD] \'password\'\n | IDENTIFIED WITH auth_plugin [AS \'auth_string\']\n ]\n\nThe CREATE USER statement creates new MySQL accounts. To use it, you\nmust have the global CREATE USER privilege or the INSERT privilege for\nthe mysql database. For each account, CREATE USER creates a new row in\nthe mysql.user table and assigns the account no privileges. An error\noccurs if the account already exists.\n\nEach account name uses the format described in\nhttps://mariadb.com/kb/en/create-user#account-names. For example:\n\nCREATE USER \'jeffrey\'@\'localhost\' IDENTIFIED BY \'mypass\';\n\nIf you specify only the user name part of the account name, a host name\npart of \'%\' is used.\n\nThe user specification may indicate how the user should authenticate\nwhen connecting to the server:\n\no To enable the user to connect with no password (which is insecure),\n include no IDENTIFIED BY clause:\n\nCREATE USER \'jeffrey\'@\'localhost\';\n\n In this case, the account uses built-in authentication and clients\n must provide no password.\n\no To assign a password, use IDENTIFIED BY with the literal plaintext\n password value:\n\nCREATE USER \'jeffrey\'@\'localhost\' IDENTIFIED BY \'mypass\';\n\n The account uses built-in authentication and clients must match the\n given password.\n\no To avoid specifying the plaintext password if you know its hash value\n (the value that PASSWORD() would return for the password), specify\n the hash value preceded by the keyword PASSWORD:\n\nCREATE USER \'jeffrey\'@\'localhost\'\nIDENTIFIED BY PASSWORD \'*90E462C37378CED12064BB3388827D2BA3A9B689\';\n\n The account uses built-in authentication and clients must match the\n given password.\n\no To authenticate the account using a specific authentication plugin,\n use IDENTIFIED WITH, where auth_plugin is the plugin name. It can be\n an unquoted name or a quoted string literal. \'auth_string\' is an\n optional quoted string literal to pass to the plugin. The plugin\n interprets the meaning of the string, so its format is plugin\n specific. Consult the documentation for a given plugin for\n information about the authentication string values it accepts.\n\nCREATE USER \'jeffrey\'@\'localhost\'\nIDENTIFIED WITH my_auth_plugin;\n\n For connections that use this account, the server invokes the named\n plugin and clients must provide credentials as required for the\n authentication method that the plugin implements. If the server\n cannot find the plugin, either at account-creation time or connect\n time, an error occurs. IDENTIFIED WITH can be used as of MySQL 5.5.7.\n\nThe IDENTIFIED BY and IDENTIFIED WITH clauses are mutually exclusive,\nso at most one of them can be specified for a given user.\n\nFor additional information about setting passwords, see\nhttps://mariadb.com/kb/en/create-user/.\n\nURL: https://mariadb.com/kb/en/create-user/\n\n','','https://mariadb.com/kb/en/create-user/'),(78,'POINT',24,'Point(x,y)\n\nConstructs a Point using its coordinates.\n\nURL: https://mariadb.com/kb/en/point/\n\n','','https://mariadb.com/kb/en/point/'),(79,'CURRENT_USER',17,'Syntax:\nCURRENT_USER, CURRENT_USER()\n\nReturns the user name and host name combination for the MySQL account\nthat the server used to authenticate the current client. This account\ndetermines your access privileges. The return value is a string in the\nutf8 character set.\n\nThe value of CURRENT_USER() can differ from the value of USER().\n\nURL: https://mariadb.com/kb/en/current_user/\n\n','MariaDB> SELECT USER();\n -> \'davida@localhost\'\nMariaDB> SELECT * FROM mysql.user;\nERROR 1044: Access denied for user \'\'@\'localhost\' to\ndatabase \'mysql\'\nMariaDB> SELECT CURRENT_USER();\n -> \'@localhost\'\n','https://mariadb.com/kb/en/current_user/'),(80,'LCASE',37,'Syntax:\nLCASE(str)\n\nLCASE() is a synonym for LOWER().\n\nURL: https://mariadb.com/kb/en/lcase/\n\n','','https://mariadb.com/kb/en/lcase/'),(81,'<=',18,'Syntax:\n<=\n\nLess than or equal:\n\nURL: https://mariadb.com/kb/en/less-than-or-equal/\n\n','MariaDB> SELECT 0.1 <= 2;\n -> 1\n','https://mariadb.com/kb/en/less-than-or-equal/'),(82,'SHOW PROFILES',26,'Syntax:\nSHOW PROFILES\n\nThe SHOW PROFILES statement, together with SHOW PROFILE, displays\nprofiling information that indicates resource usage for statements\nexecuted during the course of the current session. For more\ninformation, see [HELP SHOW PROFILE].\n\nURL: https://mariadb.com/kb/en/show-profiles/\n\n','','https://mariadb.com/kb/en/show-profiles/'),(83,'UPDATE',27,'Syntax:\nSingle-table syntax:\n\nUPDATE [LOW_PRIORITY] [IGNORE] table_reference\n SET col_name1={expr1|DEFAULT} [, col_name2={expr2|DEFAULT}] ...\n [WHERE where_condition]\n [ORDER BY ...]\n [LIMIT row_count]\n\nMultiple-table syntax:\n\nUPDATE [LOW_PRIORITY] [IGNORE] table_references\n SET col_name1={expr1|DEFAULT} [, col_name2={expr2|DEFAULT}] ...\n [WHERE where_condition]\n\nFor the single-table syntax, the UPDATE statement updates columns of\nexisting rows in the named table with new values. The SET clause\nindicates which columns to modify and the values they should be given.\nEach value can be given as an expression, or the keyword DEFAULT to set\na column explicitly to its default value. The WHERE clause, if given,\nspecifies the conditions that identify which rows to update. With no\nWHERE clause, all rows are updated. If the ORDER BY clause is\nspecified, the rows are updated in the order that is specified. The\nLIMIT clause places a limit on the number of rows that can be updated.\n\nFor the multiple-table syntax, UPDATE updates rows in each table named\nin table_references that satisfy the conditions. In this case, ORDER BY\nand LIMIT cannot be used.\n\nwhere_condition is an expression that evaluates to true for each row to\nbe updated. For expression syntax, see\nhttp://dev.mysql.com/doc/refman/5.5/en/expressions.html.\n\ntable_references and where_condition are is specified as described in\nhttps://mariadb.com/kb/en/select/.\n\nYou need the UPDATE privilege only for columns referenced in an UPDATE\nthat are actually updated. You need only the SELECT privilege for any\ncolumns that are read but not modified.\n\nThe UPDATE statement supports the following modifiers:\n\no With the LOW_PRIORITY keyword, execution of the UPDATE is delayed\n until no other clients are reading from the table. This affects only\n storage engines that use only table-level locking (such as MyISAM,\n MEMORY, and MERGE).\n\no With the IGNORE keyword, the update statement does not abort even if\n errors occur during the update. Rows for which duplicate-key\n conflicts occur are not updated. Rows for which columns are updated\n to values that would cause data conversion errors are updated to the\n closest valid values instead.\n\nURL: https://mariadb.com/kb/en/update/\n\n','','https://mariadb.com/kb/en/update/'),(84,'IS NOT NULL',18,'Syntax:\nIS NOT NULL\n\nTests whether a value is not NULL.\n\nURL: https://mariadb.com/kb/en/is-not-null/\n\n','MariaDB> SELECT 1 IS NOT NULL, 0 IS NOT NULL, NULL IS NOT NULL;\n -> 1, 1, 0\n','https://mariadb.com/kb/en/is-not-null/'),(85,'CASE STATEMENT',23,'Syntax:\nCASE case_value\n WHEN when_value THEN statement_list\n [WHEN when_value THEN statement_list] ...\n [ELSE statement_list]\nEND CASE\n\nOr:\n\nCASE\n WHEN search_condition THEN statement_list\n [WHEN search_condition THEN statement_list] ...\n [ELSE statement_list]\nEND CASE\n\nThe CASE statement for stored programs implements a complex conditional\nconstruct.\n\n*Note*: There is also a CASE expression, which differs from the CASE\nstatement described here. See\nhttps://mariadb.com/kb/en/case-operator/. The\nCASE statement cannot have an ELSE NULL clause, and it is terminated\nwith END CASE instead of END.\n\nFor the first syntax, case_value is an expression. This value is\ncompared to the when_value expression in each WHEN clause until one of\nthem is equal. When an equal when_value is found, the corresponding\nTHEN clause statement_list executes. If no when_value is equal, the\nELSE clause statement_list executes, if there is one.\n\nThis syntax cannot be used to test for equality with NULL because NULL\n= NULL is false. See\nhttps://mariadb.com/kb/en/null-values/.\n\nFor the second syntax, each WHEN clause search_condition expression is\nevaluated until one is true, at which point its corresponding THEN\nclause statement_list executes. If no search_condition is equal, the\nELSE clause statement_list executes, if there is one.\n\nIf no when_value or search_condition matches the value tested and the\nCASE statement contains no ELSE clause, a Case not found for CASE\nstatement error results.\n\nEach statement_list consists of one or more SQL statements; an empty\nstatement_list is not permitted.\n\nTo handle situations where no value is matched by any WHEN clause, use\nan ELSE containing an empty BEGIN ... END block, as shown in this\nexample. (The indentation used here in the ELSE clause is for purposes\nof clarity only, and is not otherwise significant.)\n\nDELIMITER |\n\nCREATE PROCEDURE p()\n BEGIN\n DECLARE v INT DEFAULT 1;\n\n CASE v\n WHEN 2 THEN SELECT v;\n WHEN 3 THEN SELECT 0;\n ELSE\n BEGIN\n END;\n END CASE;\n END;\n |\n\nURL: https://mariadb.com/kb/en/case-statement/\n\n','','https://mariadb.com/kb/en/case-statement/'),(86,'EXECUTE STATEMENT',8,'Syntax:\nEXECUTE stmt_name\n [USING @var_name [, @var_name] ...]\n\nAfter preparing a statement with PREPARE, you execute it with an\nEXECUTE statement that refers to the prepared statement name. If the\nprepared statement contains any parameter markers, you must supply a\nUSING clause that lists user variables containing the values to be\nbound to the parameters. Parameter values can be supplied only by user\nvariables, and the USING clause must name exactly as many variables as\nthe number of parameter markers in the statement.\n\nYou can execute a given prepared statement multiple times, passing\ndifferent variables to it or setting the variables to different values\nbefore each execution.\n\nURL: https://mariadb.com/kb/en/execute-statement/\n\n','','https://mariadb.com/kb/en/execute-statement/'),(87,'DROP INDEX',39,'Syntax:\nDROP [ONLINE|OFFLINE] INDEX index_name ON tbl_name\n\nDROP INDEX drops the index named index_name from the table tbl_name.\nThis statement is mapped to an ALTER TABLE statement to drop the index.\nSee [HELP ALTER TABLE].\n\nTo drop a primary key, the index name is always PRIMARY, which must be\nspecified as a quoted identifier because PRIMARY is a reserved word:\n\nDROP INDEX `PRIMARY` ON t;\n\nURL: https://mariadb.com/kb/en/drop-index/\n\n','','https://mariadb.com/kb/en/drop-index/'),(88,'MATCH AGAINST',37,'Syntax:\nMATCH (col1,col2,...) AGAINST (expr [search_modifier])\n\nMySQL has support for full-text indexing and searching:\n\no A full-text index in MySQL is an index of type FULLTEXT.\n\no Full-text indexes can be used only with MyISAM tables, and can be\n created only for CHAR, VARCHAR, or TEXT columns.\n\no A FULLTEXT index definition can be given in the CREATE TABLE\n statement when a table is created, or added later using ALTER TABLE\n or CREATE INDEX.\n\no For large data sets, it is much faster to load your data into a table\n that has no FULLTEXT index and then create the index after that, than\n to load data into a table that has an existing FULLTEXT index.\n\nFull-text searching is performed using MATCH() ... AGAINST syntax.\nMATCH() takes a comma-separated list that names the columns to be\nsearched. AGAINST takes a string to search for, and an optional\nmodifier that indicates what type of search to perform. The search\nstring must be a literal string, not a variable or a column name. There\nare three types of full-text searches:\n\no A natural language search interprets the search string as a phrase in\n natural human language (a phrase in free text). There are no special\n operators. The stopword list applies. In addition, words that are\n present in 50% or more of the rows are considered common and do not\n match.\n\n Full-text searches are natural language searches if the IN NATURAL\n LANGUAGE MODE modifier is given or if no modifier is given. For more\n information, see\n https://mariadb.com/kb/en/fulltext-index-overview#in-natural-language-mode\n .\n\no A boolean search interprets the search string using the rules of a\n special query language. The string contains the words to search for.\n It can also contain operators that specify requirements such that a\n word must be present or absent in matching rows, or that it should be\n weighted higher or lower than usual. Common words such as \"some\" or\n \"then\" are stopwords and do not match if present in the search\n string. The IN BOOLEAN MODE modifier specifies a boolean search. For\n more information, see\n https://mariadb.com/kb/en/fulltext-index-overview#in-boolean-mode.\n\no A query expansion search is a modification of a natural language\n search. The search string is used to perform a natural language\n search. Then words from the most relevant rows returned by the search\n are added to the search string and the search is done again. The\n query returns the rows from the second search. The IN NATURAL\n LANGUAGE MODE WITH QUERY EXPANSION or WITH QUERY EXPANSION modifier\n specifies a query expansion search. For more information, see\n https://mariadb.com/kb/en/fulltext-index-overview#with-query-expansion.\n\nURL: https://mariadb.com/kb/en/match-against/\n\n','MariaDB> SELECT id, body, MATCH (title,body) AGAINST\n -> (\'Security implications of running MySQL as root\'\n -> IN NATURAL LANGUAGE MODE) AS score\n -> FROM articles WHERE MATCH (title,body) AGAINST\n -> (\'Security implications of running MySQL as root\'\n -> IN NATURAL LANGUAGE MODE);\n+----+-------------------------------------+-----------------+\n| id | body | score |\n+----+-------------------------------------+-----------------+\n| 4 | 1. Never run mysqld as root. 2. ... | 1.5219271183014 |\n| 6 | When configured properly, MySQL ... | 1.3114095926285 |\n+----+-------------------------------------+-----------------+\n2 rows in set (0.00 sec)\n','https://mariadb.com/kb/en/match-against/'),(89,'CREATE EVENT',39,'Syntax:\nCREATE\n [DEFINER = { user | CURRENT_USER }]\n EVENT\n [IF NOT EXISTS]\n event_name\n ON SCHEDULE schedule\n [ON COMPLETION [NOT] PRESERVE]\n [ENABLE | DISABLE | DISABLE ON SLAVE]\n [COMMENT \'comment\']\n DO event_body;\n\nschedule:\n AT timestamp [+ INTERVAL interval] ...\n | EVERY interval\n [STARTS timestamp [+ INTERVAL interval] ...]\n [ENDS timestamp [+ INTERVAL interval] ...]\n\ninterval:\n quantity {YEAR | QUARTER | MONTH | DAY | HOUR | MINUTE |\n WEEK | SECOND | YEAR_MONTH | DAY_HOUR | DAY_MINUTE |\n DAY_SECOND | HOUR_MINUTE | HOUR_SECOND | MINUTE_SECOND}\n\nThis statement creates and schedules a new event. The event will not\nrun unless the Event Scheduler is enabled. For information about\nchecking Event Scheduler status and enabling it if necessary, see\nhttps://mariadb.com/kb/en/events/.\n\nCREATE EVENT requires the EVENT privilege for the schema in which the\nevent is to be created. It might also require the SUPER privilege,\ndepending on the DEFINER value, as described later in this section.\n\nThe minimum requirements for a valid CREATE EVENT statement are as\nfollows:\n\no The keywords CREATE EVENT plus an event name, which uniquely\n identifies the event in a database schema.\n\no An ON SCHEDULE clause, which determines when and how often the event\n executes.\n\no A DO clause, which contains the SQL statement to be executed by an\n event.\n\nThis is an example of a minimal CREATE EVENT statement:\n\nCREATE EVENT myevent\n ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR\n DO\n UPDATE myschema.mytable SET mycol = mycol + 1;\n\nThe previous statement creates an event named myevent. This event\nexecutes once---one hour following its creation---by running an SQL\nstatement that increments the value of the myschema.mytable table\'s\nmycol column by 1.\n\nThe event_name must be a valid MySQL identifier with a maximum length\nof 64 characters. Event names are not case sensitive, so you cannot\nhave two events named myevent and MyEvent in the same schema. In\ngeneral, the rules governing event names are the same as those for\nnames of stored routines. See\nhttps://mariadb.com/kb/en/identifier-names/.\n\nAn event is associated with a schema. If no schema is indicated as part\nof event_name, the default (current) schema is assumed. To create an\nevent in a specific schema, qualify the event name with a schema using\nschema_name.event_name syntax.\n\nURL: https://mariadb.com/kb/en/create-event/\n\n','','https://mariadb.com/kb/en/create-event/'),(90,'ABS',4,'Syntax:\nABS(X)\n\nReturns the absolute value of X.\n\nURL: https://mariadb.com/kb/en/abs/\n\n','MariaDB> SELECT ABS(2);\n -> 2\nMariaDB> SELECT ABS(-32);\n -> 32\n','https://mariadb.com/kb/en/abs/'),(91,'POLYFROMWKB',32,'PolyFromWKB(wkb[,srid]), PolygonFromWKB(wkb[,srid])\n\nConstructs a POLYGON value using its WKB representation and SRID.\n\nURL: https://mariadb.com/kb/en/polyfromwkb/\n\n','','https://mariadb.com/kb/en/polyfromwkb/'),(92,'NOT LIKE',37,'Syntax:\nexpr NOT LIKE pat [ESCAPE \'escape_char\']\n\nThis is the same as NOT (expr LIKE pat [ESCAPE \'escape_char\']).\n\nURL: https://mariadb.com/kb/en/not-like/\n\n','','https://mariadb.com/kb/en/not-like/'),(93,'SPACE',37,'Syntax:\nSPACE(N)\n\nReturns a string consisting of N space characters.\n\nURL: https://mariadb.com/kb/en/space/\n\n','MariaDB> SELECT SPACE(6);\n -> \' \'\n','https://mariadb.com/kb/en/space/'),(94,'MBR DEFINITION',6,'Its MBR (Minimum Bounding Rectangle), or Envelope. This is the bounding\ngeometry, formed by the minimum and maximum (X,Y) coordinates:\n\nURL: https://mariadb.com/kb/en/mbr-definition/\n\n','((MINX MINY, MAXX MINY, MAXX MAXY, MINX MAXY, MINX MINY))\n','https://mariadb.com/kb/en/mbr-definition/'),(95,'GEOMETRYCOLLECTION',24,'GeometryCollection(g1,g2,...)\n\nConstructs a GeometryCollection.\n\nURL: https://mariadb.com/kb/en/geometrycollection/\n\n','','https://mariadb.com/kb/en/geometrycollection/'),(96,'MAX',16,'Syntax:\nMAX([DISTINCT] expr)\n\nReturns the maximum value of expr. MAX() may take a string argument; in\nsuch cases, it returns the maximum string value. See\nhttps://mariadb.com/kb/en/max/. The DISTINCT\nkeyword can be used to find the maximum of the distinct values of expr,\nhowever, this produces the same result as omitting DISTINCT.\n\nMAX() returns NULL if there were no matching rows.\n\nURL: https://mariadb.com/kb/en/max/\n\n','MariaDB> SELECT student_name, MIN(test_score), MAX(test_score)\n -> FROM student\n -> GROUP BY student_name;\n','https://mariadb.com/kb/en/max/'),(97,'CREATE FUNCTION UDF',21,'Syntax:\nCREATE [AGGREGATE] FUNCTION function_name RETURNS {STRING|INTEGER|REAL|DECIMAL}\n SONAME shared_library_name\n\nA user-defined function (UDF) is a way to extend MySQL with a new\nfunction that works like a native (built-in) MySQL function such as\nABS() or CONCAT().\n\nfunction_name is the name that should be used in SQL statements to\ninvoke the function. The RETURNS clause indicates the type of the\nfunction\'s return value. DECIMAL is a legal value after RETURNS, but\ncurrently DECIMAL functions return string values and should be written\nlike STRING functions.\n\nshared_library_name is the basename of the shared object file that\ncontains the code that implements the function. The file must be\nlocated in the plugin directory. This directory is given by the value\nof the plugin_dir system variable. For more information, see\nhttp://dev.mysql.com/doc/refman/5.5/en/udf-compiling.html.\n\nTo create a function, you must have the INSERT privilege for the mysql\ndatabase. This is necessary because CREATE FUNCTION adds a row to the\nmysql.func system table that records the function\'s name, type, and\nshared library name. If you do not have this table, you should run the\nmysql_upgrade command to create it. See\nhttps://mariadb.com/kb/en/mysql_upgrade/.\n\nURL: https://mariadb.com/kb/en/create-function-udf/\n\n','','https://mariadb.com/kb/en/create-function-udf/'),(98,'*',4,'Syntax:\n*\n\nMultiplication:\n\nURL: https://mariadb.com/kb/en/multiplication-operator/\n\n','MariaDB> SELECT 3*5;\n -> 15\nMariaDB> SELECT 18014398509481984*18014398509481984.0;\n -> 324518553658426726783156020576256.0\nMariaDB> SELECT 18014398509481984*18014398509481984;\n -> 0\n','https://mariadb.com/kb/en/multiplication-operator/'),(99,'TIMESTAMP',22,'TIMESTAMP\n\nA timestamp. The range is \'1970-01-01 00:00:01\' UTC to \'2038-01-19\n03:14:07\' UTC. TIMESTAMP values are stored as the number of seconds\nsince the epoch (\'1970-01-01 00:00:00\' UTC). A TIMESTAMP cannot\nrepresent the value \'1970-01-01 00:00:00\' because that is equivalent to\n0 seconds from the epoch and the value 0 is reserved for representing\n\'0000-00-00 00:00:00\', the \"zero\" TIMESTAMP value.\n\nUnless specified otherwise, the first TIMESTAMP column in a table is\ndefined to be automatically set to the date and time of the most recent\nmodification if not explicitly assigned a value. This makes TIMESTAMP\nuseful for recording the timestamp of an INSERT or UPDATE operation.\nYou can also set any TIMESTAMP column to the current date and time by\nassigning it a NULL value, unless it has been defined with the NULL\nattribute to permit NULL values. The automatic initialization and\nupdating to the current date and time can be specified using DEFAULT\nCURRENT_TIMESTAMP and ON UPDATE CURRENT_TIMESTAMP clauses, as described\nin\nhttps://mariadb.com/kb/en/timestamp/.\n\n*Note*: The TIMESTAMP format that was used prior to MySQL 4.1 is not\nsupported in MySQL 5.5; see MySQL 3.23, 4.0, 4.1 Reference Manual for\ninformation regarding the old format.\n\nURL: https://mariadb.com/kb/en/timestamp/\n\n','','https://mariadb.com/kb/en/timestamp/'),(100,'DES_DECRYPT',12,'Syntax:\nDES_DECRYPT(crypt_str[,key_str])\n\nDecrypts a string encrypted with DES_ENCRYPT(). If an error occurs,\nthis function returns NULL.\n\nThis function works only if MySQL has been configured with SSL support.\nSee https://mariadb.com/kb/en/ssl-connections/.\n\nIf no key_str argument is given, DES_DECRYPT() examines the first byte\nof the encrypted string to determine the DES key number that was used\nto encrypt the original string, and then reads the key from the DES key\nfile to decrypt the message. For this to work, the user must have the\nSUPER privilege. The key file can be specified with the --des-key-file\nserver option.\n\nIf you pass this function a key_str argument, that string is used as\nthe key for decrypting the message.\n\nIf the crypt_str argument does not appear to be an encrypted string,\nMySQL returns the given crypt_str.\n\nURL: https://mariadb.com/kb/en/des_decrypt/\n\n','','https://mariadb.com/kb/en/des_decrypt/'),(101,'CACHE INDEX',26,'Syntax:\nCACHE INDEX\n tbl_index_list [, tbl_index_list] ...\n [PARTITION (partition_list | ALL)]\n IN key_cache_name\n\ntbl_index_list:\n tbl_name [[INDEX|KEY] (index_name[, index_name] ...)]\n\npartition_list:\n partition_name[, partition_name][, ...]\n\nThe CACHE INDEX statement assigns table indexes to a specific key\ncache. It is used only for MyISAM tables. After the indexes have been\nassigned, they can be preloaded into the cache if desired with LOAD\nINDEX INTO CACHE.\n\nThe following statement assigns indexes from the tables t1, t2, and t3\nto the key cache named hot_cache:\n\nMariaDB> CACHE INDEX t1, t2, t3 IN hot_cache;\n+---------+--------------------+----------+----------+\n| Table | Op | Msg_type | Msg_text |\n+---------+--------------------+----------+----------+\n| test.t1 | assign_to_keycache | status | OK |\n| test.t2 | assign_to_keycache | status | OK |\n| test.t3 | assign_to_keycache | status | OK |\n+---------+--------------------+----------+----------+\n\nURL: https://mariadb.com/kb/en/cache-index/\n\n','','https://mariadb.com/kb/en/cache-index/'),(102,'ENDPOINT',13,'EndPoint(ls)\n\nReturns the Point that is the endpoint of the LineString value ls.\n\nURL: https://mariadb.com/kb/en/endpoint/\n\n','MariaDB> SET @ls = \'LineString(1 1,2 2,3 3)\';\nMariaDB> SELECT AsText(EndPoint(GeomFromText(@ls)));\n+-------------------------------------+\n| AsText(EndPoint(GeomFromText(@ls))) |\n+-------------------------------------+\n| POINT(3 3) |\n+-------------------------------------+\n','https://mariadb.com/kb/en/endpoint/'),(103,'COMPRESS',12,'Syntax:\nCOMPRESS(string_to_compress)\n\nCompresses a string and returns the result as a binary string. This\nfunction requires MySQL to have been compiled with a compression\nlibrary such as zlib. Otherwise, the return value is always NULL. The\ncompressed string can be uncompressed with UNCOMPRESS().\n\nURL: https://mariadb.com/kb/en/compress/\n\n','MariaDB> SELECT LENGTH(COMPRESS(REPEAT(\'a\',1000)));\n -> 21\nMariaDB> SELECT LENGTH(COMPRESS(\'\'));\n -> 0\nMariaDB> SELECT LENGTH(COMPRESS(\'a\'));\n -> 13\nMariaDB> SELECT LENGTH(COMPRESS(REPEAT(\'a\',16)));\n -> 15\n','https://mariadb.com/kb/en/compress/'),(104,'INSERT',27,'Syntax:\nINSERT [LOW_PRIORITY | DELAYED | HIGH_PRIORITY] [IGNORE]\n [INTO] tbl_name [(col_name,...)]\n {VALUES | VALUE} ({expr | DEFAULT},...),(...),...\n [ ON DUPLICATE KEY UPDATE\n col_name=expr\n [, col_name=expr] ... ]\n\nOr:\n\nINSERT [LOW_PRIORITY | DELAYED | HIGH_PRIORITY] [IGNORE]\n [INTO] tbl_name\n SET col_name={expr | DEFAULT}, ...\n [ ON DUPLICATE KEY UPDATE\n col_name=expr\n [, col_name=expr] ... ]\n\nOr:\n\nINSERT [LOW_PRIORITY | HIGH_PRIORITY] [IGNORE]\n [INTO] tbl_name [(col_name,...)]\n SELECT ...\n [ ON DUPLICATE KEY UPDATE\n col_name=expr\n [, col_name=expr] ... ]\n\nINSERT inserts new rows into an existing table. The INSERT ... VALUES\nand INSERT ... SET forms of the statement insert rows based on\nexplicitly specified values. The INSERT ... SELECT form inserts rows\nselected from another table or tables. INSERT ... SELECT is discussed\nfurther in [HELP INSERT SELECT].\n\nURL: https://mariadb.com/kb/en/insert/\n\n','','https://mariadb.com/kb/en/insert/'),(105,'COUNT',16,'Syntax:\nCOUNT(expr)\n\nReturns a count of the number of non-NULL values of expr in the rows\nretrieved by a SELECT statement. The result is a BIGINT value.\n\nCOUNT() returns 0 if there were no matching rows.\n\nURL: https://mariadb.com/kb/en/count/\n\n','MariaDB> SELECT student.student_name,COUNT(*)\n -> FROM student,course\n -> WHERE student.student_id=course.student_id\n -> GROUP BY student_name;\n','https://mariadb.com/kb/en/count/'),(106,'HANDLER',27,'Syntax:\nHANDLER tbl_name OPEN [ [AS] alias]\n\nHANDLER tbl_name READ index_name { = | <= | >= | < | > } (value1,value2,...)\n [ WHERE where_condition ] [LIMIT ... ]\nHANDLER tbl_name READ index_name { FIRST | NEXT | PREV | LAST }\n [ WHERE where_condition ] [LIMIT ... ]\nHANDLER tbl_name READ { FIRST | NEXT }\n [ WHERE where_condition ] [LIMIT ... ]\n\nHANDLER tbl_name CLOSE\n\nThe HANDLER statement provides direct access to table storage engine\ninterfaces. It is available for MyISAM and InnoDB tables.\n\nURL: https://mariadb.com/kb/en/handler-commands/\n\n','','https://mariadb.com/kb/en/handler-commands/'),(107,'MLINEFROMTEXT',3,'MLineFromText(wkt[,srid]), MultiLineStringFromText(wkt[,srid])\n\nConstructs a MULTILINESTRING value using its WKT representation and\nSRID.\n\nURL: https://mariadb.com/kb/en/mlinefromtext/\n\n','','https://mariadb.com/kb/en/mlinefromtext/'),(108,'GEOMCOLLFROMWKB',32,'GeomCollFromWKB(wkb[,srid]), GeometryCollectionFromWKB(wkb[,srid])\n\nConstructs a GEOMETRYCOLLECTION value using its WKB representation and\nSRID.\n\nURL: https://mariadb.com/kb/en/geomcollfromwkb/\n\n','','https://mariadb.com/kb/en/geomcollfromwkb/'),(109,'HELP_DATE',9,'This help information was generated from the MySQL 5.5 Reference Manual\non: 2012-08-25\n','',''),(110,'RENAME TABLE',39,'Syntax:\nRENAME TABLE tbl_name TO new_tbl_name\n [, tbl_name2 TO new_tbl_name2] ...\n\nThis statement renames one or more tables.\n\nThe rename operation is done atomically, which means that no other\nsession can access any of the tables while the rename is running. For\nexample, if you have an existing table old_table, you can create\nanother table new_table that has the same structure but is empty, and\nthen replace the existing table with the empty one as follows (assuming\nthat backup_table does not already exist):\n\nURL: https://mariadb.com/kb/en/rename-table/\n\n','CREATE TABLE new_table (...);\nRENAME TABLE old_table TO backup_table, new_table TO old_table;\n','https://mariadb.com/kb/en/rename-table/'),(111,'BOOLEAN',22,'BOOL, BOOLEAN\n\nThese types are synonyms for TINYINT(1). A value of zero is considered\nfalse. Nonzero values are considered true:\n\nMariaDB> SELECT IF(0, \'true\', \'false\');\n+------------------------+\n| IF(0, \'true\', \'false\') |\n+------------------------+\n| false |\n+------------------------+\n\nMariaDB> SELECT IF(1, \'true\', \'false\');\n+------------------------+\n| IF(1, \'true\', \'false\') |\n+------------------------+\n| true |\n+------------------------+\n\nMariaDB> SELECT IF(2, \'true\', \'false\');\n+------------------------+\n| IF(2, \'true\', \'false\') |\n+------------------------+\n| true |\n+------------------------+\n\nHowever, the values TRUE and FALSE are merely aliases for 1 and 0,\nrespectively, as shown here:\n\nMariaDB> SELECT IF(0 = FALSE, \'true\', \'false\');\n+--------------------------------+\n| IF(0 = FALSE, \'true\', \'false\') |\n+--------------------------------+\n| true |\n+--------------------------------+\n\nMariaDB> SELECT IF(1 = TRUE, \'true\', \'false\');\n+-------------------------------+\n| IF(1 = TRUE, \'true\', \'false\') |\n+-------------------------------+\n| true |\n+-------------------------------+\n\nMariaDB> SELECT IF(2 = TRUE, \'true\', \'false\');\n+-------------------------------+\n| IF(2 = TRUE, \'true\', \'false\') |\n+-------------------------------+\n| false |\n+-------------------------------+\n\nMariaDB> SELECT IF(2 = FALSE, \'true\', \'false\');\n+--------------------------------+\n| IF(2 = FALSE, \'true\', \'false\') |\n+--------------------------------+\n| false |\n+--------------------------------+\n\nThe last two statements display the results shown because 2 is equal to\nneither 1 nor 0.\n\nURL: https://mariadb.com/kb/en/boolean/\n\n','','https://mariadb.com/kb/en/boolean/'),(112,'DEFAULT',14,'Syntax:\nDEFAULT(col_name)\n\nReturns the default value for a table column. An error results if the\ncolumn has no default value.\n\nURL: https://mariadb.com/kb/en/default/\n\n','MariaDB> UPDATE t SET i = DEFAULT(i)+1 WHERE id < 100;\n','https://mariadb.com/kb/en/default/'),(113,'MOD',4,'Syntax:\nMOD(N,M), N % M, N MOD M\n\nModulo operation. Returns the remainder of N divided by M.\n\nURL: https://mariadb.com/kb/en/mod/\n\n','MariaDB> SELECT MOD(234, 10);\n -> 4\nMariaDB> SELECT 253 % 7;\n -> 1\nMariaDB> SELECT MOD(29,9);\n -> 2\nMariaDB> SELECT 29 MOD 9;\n -> 2\n','https://mariadb.com/kb/en/mod/'),(114,'TINYTEXT',22,'TINYTEXT [CHARACTER SET charset_name] [COLLATE collation_name]\n\nA TEXT column with a maximum length of 255 (28 - 1) characters. The\neffective maximum length is less if the value contains multi-byte\ncharacters. Each TINYTEXT value is stored using a 1-byte length prefix\nthat indicates the number of bytes in the value.\n\nURL: https://mariadb.com/kb/en/tinytext/\n\n','','https://mariadb.com/kb/en/tinytext/'),(115,'OPTIMIZE TABLE',20,'Syntax:\nOPTIMIZE [NO_WRITE_TO_BINLOG | LOCAL] TABLE\n tbl_name [, tbl_name] ...\n\nOPTIMIZE TABLE should be used if you have deleted a large part of a\ntable or if you have made many changes to a table with variable-length\nrows (tables that have VARCHAR, VARBINARY, BLOB, or TEXT columns).\nDeleted rows are maintained in a linked list and subsequent INSERT\noperations reuse old row positions. You can use OPTIMIZE TABLE to\nreclaim the unused space and to defragment the data file. After\nextensive changes to a table, this statement may also improve\nperformance of statements that use the table, sometimes significantly.\n\nThis statement requires SELECT and INSERT privileges for the table.\n\nOPTIMIZE TABLE is supported for partitioned tables, and you can use\nALTER TABLE ... OPTIMIZE PARTITION to optimize one or more partitions;\nfor more information, see [HELP ALTER TABLE], and\nhttp://dev.mysql.com/doc/refman/5.5/en/partitioning-maintenance.html.\n\nURL: https://mariadb.com/kb/en/optimize-table/\n\n','','https://mariadb.com/kb/en/optimize-table/'),(116,'DECODE',12,'Syntax:\nDECODE(crypt_str,pass_str)\n\nDecrypts the encrypted string crypt_str using pass_str as the password.\ncrypt_str should be a string returned from ENCODE().\n\nURL: https://mariadb.com/kb/en/decode/\n\n','','https://mariadb.com/kb/en/decode/'),(117,'<=>',18,'Syntax:\n<=>\n\nNULL-safe equal. This operator performs an equality comparison like the\n= operator, but returns 1 rather than NULL if both operands are NULL,\nand 0 rather than NULL if one operand is NULL.\n\nURL: https://mariadb.com/kb/en/null-safe-equal/\n\n','MariaDB> SELECT 1 <=> 1, NULL <=> NULL, 1 <=> NULL;\n -> 1, 1, 0\nMariaDB> SELECT 1 = 1, NULL = NULL, 1 = NULL;\n -> 1, NULL, NULL\n','https://mariadb.com/kb/en/null-safe-equal/'),(118,'HELP STATEMENT',28,'Syntax:\nHELP \'search_string\'\n\nThe HELP statement returns online information from the MySQL Reference\nmanual. Its proper operation requires that the help tables in the mysql\ndatabase be initialized with help topic information.\n\nThe HELP statement searches the help tables for the given search string\nand displays the result of the search. The search string is not case\nsensitive.\n\nURL: https://mariadb.com/kb/en/help-command/\n\n','','https://mariadb.com/kb/en/help-command/'),(119,'RESET',26,'Syntax:\nRESET reset_option [, reset_option] ...\n\nThe RESET statement is used to clear the state of various server\noperations. You must have the RELOAD privilege to execute RESET.\n\nRESET acts as a stronger version of the FLUSH statement. See [HELP\nFLUSH].\n\nThe RESET statement causes an implicit commit. See\nhttps://mariadb.com/kb/en/sql-statements-that-cause-an-implicit-commit/.\n\nURL: https://mariadb.com/kb/en/reset/\n\n','','https://mariadb.com/kb/en/reset/'),(120,'GET_LOCK',14,'Syntax:\nGET_LOCK(str,timeout)\n\nTries to obtain a lock with a name given by the string str, using a\ntimeout of timeout seconds. Returns 1 if the lock was obtained\nsuccessfully, 0 if the attempt timed out (for example, because another\nclient has previously locked the name), or NULL if an error occurred\n(such as running out of memory or the thread was killed with mysqladmin\nkill). If you have a lock obtained with GET_LOCK(), it is released when\nyou execute RELEASE_LOCK(), execute a new GET_LOCK(), or your\nconnection terminates (either normally or abnormally). Locks obtained\nwith GET_LOCK() do not interact with transactions. That is, committing\na transaction does not release any such locks obtained during the\ntransaction.\n\nThis function can be used to implement application locks or to simulate\nrecord locks. Names are locked on a server-wide basis. If a name has\nbeen locked by one client, GET_LOCK() blocks any request by another\nclient for a lock with the same name. This enables clients that agree\non a given lock name to use the name to perform cooperative advisory\nlocking. But be aware that it also enables a client that is not among\nthe set of cooperating clients to lock a name, either inadvertently or\ndeliberately, and thus prevent any of the cooperating clients from\nlocking that name. One way to reduce the likelihood of this is to use\nlock names that are database-specific or application-specific. For\nexample, use lock names of the form db_name.str or app_name.str.\n\nURL: https://mariadb.com/kb/en/get_lock/\n\n','MariaDB> SELECT GET_LOCK(\'lock1\',10);\n -> 1\nMariaDB> SELECT IS_FREE_LOCK(\'lock2\');\n -> 1\nMariaDB> SELECT GET_LOCK(\'lock2\',10);\n -> 1\nMariaDB> SELECT RELEASE_LOCK(\'lock2\');\n -> 1\nMariaDB> SELECT RELEASE_LOCK(\'lock1\');\n -> NULL\n','https://mariadb.com/kb/en/get_lock/'),(121,'UCASE',37,'Syntax:\nUCASE(str)\n\nUCASE() is a synonym for UPPER().\n\nURL: https://mariadb.com/kb/en/ucase/\n\n','','https://mariadb.com/kb/en/ucase/'),(122,'SHOW BINLOG EVENTS',26,'Syntax:\nSHOW BINLOG EVENTS\n [IN \'log_name\'] [FROM pos] [LIMIT [offset,] row_count]\n\nShows the events in the binary log. If you do not specify \'log_name\',\nthe first binary log is displayed.\n\nURL: https://mariadb.com/kb/en/show-binlog-events/\n\n','','https://mariadb.com/kb/en/show-binlog-events/'),(123,'MPOLYFROMWKB',32,'MPolyFromWKB(wkb[,srid]), MultiPolygonFromWKB(wkb[,srid])\n\nConstructs a MULTIPOLYGON value using its WKB representation and SRID.\n\nURL: https://mariadb.com/kb/en/mpolyfromwkb/\n\n','','https://mariadb.com/kb/en/mpolyfromwkb/'),(124,'ITERATE',23,'Syntax:\nITERATE label\n\nITERATE can appear only within LOOP, REPEAT, and WHILE statements.\nITERATE means \"start the loop again.\"\n\nURL: https://mariadb.com/kb/en/iterate/\n\n','','https://mariadb.com/kb/en/iterate/'),(125,'DO',27,'Syntax:\nDO expr [, expr] ...\n\nDO executes the expressions but does not return any results. In most\nrespects, DO is shorthand for SELECT expr, ..., but has the advantage\nthat it is slightly faster when you do not care about the result.\n\nDO is useful primarily with functions that have side effects, such as\nRELEASE_LOCK().\n\nURL: https://mariadb.com/kb/en/do/\n\n','','https://mariadb.com/kb/en/do/'),(126,'CURTIME',31,'Syntax:\nCURTIME()\n\nReturns the current time as a value in \'HH:MM:SS\' or HHMMSS.uuuuuu\nformat, depending on whether the function is used in a string or\nnumeric context. The value is expressed in the current time zone.\n\nURL: https://mariadb.com/kb/en/curtime/\n\n','MariaDB> SELECT CURTIME();\n -> \'23:50:26\'\nMariaDB> SELECT CURTIME() + 0;\n -> 235026.000000\n','https://mariadb.com/kb/en/curtime/'),(127,'CHAR_LENGTH',37,'Syntax:\nCHAR_LENGTH(str)\n\nReturns the length of the string str, measured in characters. A\nmulti-byte character counts as a single character. This means that for\na string containing five 2-byte characters, LENGTH() returns 10,\nwhereas CHAR_LENGTH() returns 5.\n\nURL: https://mariadb.com/kb/en/char_length/\n\n','','https://mariadb.com/kb/en/char_length/'),(128,'BIGINT',22,'BIGINT[(M)] [UNSIGNED] [ZEROFILL]\n\nA large integer. The signed range is -9223372036854775808 to\n9223372036854775807. The unsigned range is 0 to 18446744073709551615.\n\nSERIAL is an alias for BIGINT UNSIGNED NOT NULL AUTO_INCREMENT UNIQUE.\n\nURL: https://mariadb.com/kb/en/bigint/\n\n','','https://mariadb.com/kb/en/bigint/'),(129,'SET',26,'Syntax:\nSET variable_assignment [, variable_assignment] ...\n\nvariable_assignment:\n user_var_name = expr\n | [GLOBAL | SESSION] system_var_name = expr\n | [@@global. | @@session. | @@]system_var_name = expr\n\nThe SET statement assigns values to different types of variables that\naffect the operation of the server or your client. Older versions of\nMySQL employed SET OPTION, but this syntax is deprecated in favor of\nSET without OPTION.\n\nURL: https://mariadb.com/kb/en/set/\n\n','','https://mariadb.com/kb/en/set/'),(130,'LOAD XML',27,'Syntax:\nLOAD XML [LOW_PRIORITY | CONCURRENT] [LOCAL] INFILE \'file_name\'\n [REPLACE | IGNORE]\n INTO TABLE [db_name.]tbl_name\n [CHARACTER SET charset_name]\n [ROWS IDENTIFIED BY \'<tagname>\']\n [IGNORE number {LINES | ROWS}]\n [(column_or_user_var,...)]\n [SET col_name = expr,...]\n\nThe LOAD XML statement reads data from an XML file into a table. The\nfile_name must be given as a literal string. The tagname in the\noptional ROWS IDENTIFIED BY clause must also be given as a literal\nstring, and must be surrounded by angle brackets (< and >).\n\nLOAD XML acts as the complement of running the mysql client in XML\noutput mode (that is, starting the client with the --xml option). To\nwrite data from a table to an XML file, use a command such as the\nfollowing one from the system shell:\n\nshell> mysql --xml -e \'SELECT * FROM mytable\' > file.xml\n\nTo read the file back into a table, use LOAD XML INFILE. By default,\nthe <row> element is considered to be the equivalent of a database\ntable row; this can be changed using the ROWS IDENTIFIED BY clause.\n\nThis statement supports three different XML formats:\n\no Column names as attributes and column values as attribute values:\n\n<row column1=\"value1\" column2=\"value2\" .../>\n\no Column names as tags and column values as the content of these tags:\n\n<row>\n <column1>value1</column1>\n <column2>value2</column2>\n</row>\n\no Column names are the name attributes of <field> tags, and values are\n the contents of these tags:\n\n<row>\n <field name=\'column1\'>value1</field>\n <field name=\'column2\'>value2</field>\n</row>\n\n This is the format used by other MySQL tools, such as mysqldump.\n\nAll 3 formats can be used in the same XML file; the import routine\nautomatically detects the format for each row and interprets it\ncorrectly. Tags are matched based on the tag or attribute name and the\ncolumn name.\n\nThe following clauses work essentially the same way for LOAD XML as\nthey do for LOAD DATA:\n\no LOW_PRIORITY or CONCURRENT\n\no LOCAL\n\no REPLACE or IGNORE\n\no CHARACTER SET\n\no (column_or_user_var,...)\n\no SET\n\nSee [HELP LOAD DATA], for more information about these clauses.\n\nThe IGNORE number LINES or IGNORE number ROWS clause causes the first\nnumber rows in the XML file to be skipped. It is analogous to the LOAD\nDATA statement\'s IGNORE ... LINES clause.\n\nURL: https://mariadb.com/kb/en/load-xml/\n\n','','https://mariadb.com/kb/en/load-xml/'),(131,'CONV',4,'Syntax:\nCONV(N,from_base,to_base)\n\nConverts numbers between different number bases. Returns a string\nrepresentation of the number N, converted from base from_base to base\nto_base. Returns NULL if any argument is NULL. The argument N is\ninterpreted as an integer, but may be specified as an integer or a\nstring. The minimum base is 2 and the maximum base is 36. If to_base is\na negative number, N is regarded as a signed number. Otherwise, N is\ntreated as unsigned. CONV() works with 64-bit precision.\n\nURL: https://mariadb.com/kb/en/conv/\n\n','MariaDB> SELECT CONV(\'a\',16,2);\n -> \'1010\'\nMariaDB> SELECT CONV(\'6E\',18,8);\n -> \'172\'\nMariaDB> SELECT CONV(-17,10,-18);\n -> \'-H\'\nMariaDB> SELECT CONV(10+\'10\'+\'10\'+0xa,10,10);\n -> \'40\'\n','https://mariadb.com/kb/en/conv/'),(132,'DATE',22,'DATE\n\nA date. The supported range is \'1000-01-01\' to \'9999-12-31\'. MySQL\ndisplays DATE values in \'YYYY-MM-DD\' format, but permits assignment of\nvalues to DATE columns using either strings or numbers.\n\nURL: https://mariadb.com/kb/en/date/\n\n','','https://mariadb.com/kb/en/date/'),(133,'ASSIGN-VALUE',15,'Syntax:\n:=\n\nAssignment operator. Causes the user variable on the left hand side of\nthe operator to take on the value to its right. The value on the right\nhand side may be a literal value, another variable storing a value, or\nany legal expression that yields a scalar value, including the result\nof a query (provided that this value is a scalar value). You can\nperform multiple assignments in the same SET statement. You can perform\nmultiple assignments in the same statement-\n\nUnlike =, the := operator is never interpreted as a comparison\noperator. This means you can use := in any valid SQL statement (not\njust in SET statements) to assign a value to a variable.\n\nURL: https://mariadb.com/kb/en/assignment-operator/\n\n','MariaDB> SELECT @var1, @var2;\n -> NULL, NULL\nMariaDB> SELECT @var1 := 1, @var2;\n -> 1, NULL\nMariaDB> SELECT @var1, @var2;\n -> 1, NULL\nMariaDB> SELECT @var1, @var2 := @var1;\n -> 1, 1\nMariaDB> SELECT @var1, @var2;\n -> 1, 1\n\nMariaDB> SELECT @var1:=COUNT(*) FROM t1;\n -> 4\nMariaDB> SELECT @var1;\n -> 4\n','https://mariadb.com/kb/en/assignment-operator/'),(134,'SHOW OPEN TABLES',26,'Syntax:\nSHOW OPEN TABLES [{FROM | IN} db_name]\n [LIKE \'pattern\' | WHERE expr]\n\nSHOW OPEN TABLES lists the non-TEMPORARY tables that are currently open\nin the table cache. See\nhttp://dev.mysql.com/doc/refman/5.5/en/table-cache.html. The FROM\nclause, if present, restricts the tables shown to those present in the\ndb_name database. The LIKE clause, if present, indicates which table\nnames to match. The WHERE clause can be given to select rows using more\ngeneral conditions, as discussed in\nhttps://mariadb.com/kb/en/extended-show/.\n\nURL: https://mariadb.com/kb/en/show-open-tables/\n\n','','https://mariadb.com/kb/en/show-open-tables/'),(135,'EXTRACT',31,'Syntax:\nEXTRACT(unit FROM date)\n\nThe EXTRACT() function uses the same kinds of unit specifiers as\nDATE_ADD() or DATE_SUB(), but extracts parts from the date rather than\nperforming date arithmetic.\n\nURL: https://mariadb.com/kb/en/extract/\n\n','MariaDB> SELECT EXTRACT(YEAR FROM \'2009-07-02\');\n -> 2009\nMariaDB> SELECT EXTRACT(YEAR_MONTH FROM \'2009-07-02 01:02:03\');\n -> 200907\nMariaDB> SELECT EXTRACT(DAY_MINUTE FROM \'2009-07-02 01:02:03\');\n -> 20102\nMariaDB> SELECT EXTRACT(MICROSECOND\n -> FROM \'2003-01-02 10:30:00.000123\');\n -> 123\n','https://mariadb.com/kb/en/extract/'),(136,'ENCRYPT',12,'Syntax:\nENCRYPT(str[,salt])\n\nEncrypts str using the Unix crypt() system call and returns a binary\nstring. The salt argument must be a string with at least two characters\nor the result will be NULL. If no salt argument is given, a random\nvalue is used.\n\nURL: https://mariadb.com/kb/en/encrypt/\n\n','MariaDB> SELECT ENCRYPT(\'hello\');\n -> \'VxuFAJXVARROc\'\n','https://mariadb.com/kb/en/encrypt/'),(137,'SHOW STATUS',26,'Syntax:\nSHOW [GLOBAL | SESSION] STATUS\n [LIKE \'pattern\' | WHERE expr]\n\nSHOW STATUS provides server status information. This information also\ncan be obtained using the mysqladmin extended-status command. The LIKE\nclause, if present, indicates which variable names to match. The WHERE\nclause can be given to select rows using more general conditions, as\ndiscussed in https://mariadb.com/kb/en/extended-show/.\nThis statement does not require any privilege. It requires only the\nability to connect to the server.\nWith a LIKE clause, the statement displays only rows for those\nvariables with names that match the pattern:\n\nMariaDB> SHOW STATUS LIKE \'Key%\';\n+--------------------+----------+\n| Variable_name | Value |\n+--------------------+----------+\n| Key_blocks_used | 14955 |\n| Key_read_requests | 96854827 |\n| Key_reads | 162040 |\n| Key_write_requests | 7589728 |\n| Key_writes | 3813196 |\n+--------------------+----------+\n\nWith the GLOBAL modifier, SHOW STATUS displays the status values for\nall connections to MySQL. With SESSION, it displays the status values\nfor the current connection. If no modifier is present, the default is\nSESSION. LOCAL is a synonym for SESSION.\n\nSome status variables have only a global value. For these, you get the\nsame value for both GLOBAL and SESSION. The scope for each status\nvariable is listed at\nhttps://mariadb.com/kb/en/server-status-variables/.\n\nEach invocation of the SHOW STATUS statement uses an internal temporary\ntable and increments the global Created_tmp_tables value.\n\nURL: https://mariadb.com/kb/en/show-status/\n\n','','https://mariadb.com/kb/en/show-status/'),(138,'EXTRACTVALUE',37,'Syntax:\nExtractValue(xml_frag, xpath_expr)\n\nExtractValue() takes two string arguments, a fragment of XML markup\nxml_frag and an XPath expression xpath_expr (also known as a locator);\nit returns the text (CDATA) of the first text node which is a child of\nthe elements or elements matched by the XPath expression. In MySQL 5.5,\nthe XPath expression can contain at most 127 characters. (This\nlimitation is lifted in MySQL 5.6.)\n\nUsing this function is the equivalent of performing a match using the\nxpath_expr after appending /text(). In other words,\nExtractValue(\'<a><b>Sakila</b></a>\', \'/a/b\') and\nExtractValue(\'<a><b>Sakila</b></a>\', \'/a/b/text()\') produce the same\nresult.\n\nIf multiple matches are found, the content of the first child text node\nof each matching element is returned (in the order matched) as a\nsingle, space-delimited string.\n\nIf no matching text node is found for the expression (including the\nimplicit /text())---for whatever reason, as long as xpath_expr is\nvalid, and xml_frag consists of elements which are properly nested and\nclosed---an empty string is returned. No distinction is made between a\nmatch on an empty element and no match at all. This is by design.\n\nIf you need to determine whether no matching element was found in\nxml_frag or such an element was found but contained no child text\nnodes, you should test the result of an expression that uses the XPath\ncount() function. For example, both of these statements return an empty\nstring, as shown here:\n\nMariaDB> SELECT ExtractValue(\'<a><b/></a>\', \'/a/b\');\n+-------------------------------------+\n| ExtractValue(\'<a><b/></a>\', \'/a/b\') |\n+-------------------------------------+\n| |\n+-------------------------------------+\n1 row in set (0.00 sec)\n\nMariaDB> SELECT ExtractValue(\'<a><c/></a>\', \'/a/b\');\n+-------------------------------------+\n| ExtractValue(\'<a><c/></a>\', \'/a/b\') |\n+-------------------------------------+\n| |\n+-------------------------------------+\n1 row in set (0.00 sec)\n\nHowever, you can determine whether there was actually a matching\nelement using the following:\n\nMariaDB> SELECT ExtractValue(\'<a><b/></a>\', \'count(/a/b)\');\n+-------------------------------------+\n| ExtractValue(\'<a><b/></a>\', \'count(/a/b)\') |\n+-------------------------------------+\n| 1 |\n+-------------------------------------+\n1 row in set (0.00 sec)\n\nMariaDB> SELECT ExtractValue(\'<a><c/></a>\', \'count(/a/b)\');\n+-------------------------------------+\n| ExtractValue(\'<a><c/></a>\', \'count(/a/b)\') |\n+-------------------------------------+\n| 0 |\n+-------------------------------------+\n1 row in set (0.01 sec)\n\n*Important*: ExtractValue() returns only CDATA, and does not return any\ntags that might be contained within a matching tag, nor any of their\ncontent (see the result returned as val1 in the following example).\n\nURL: https://mariadb.com/kb/en/extractvalue/\n\n','MariaDB> SELECT\n -> ExtractValue(\'<a>ccc<b>ddd</b></a>\', \'/a\') AS val1,\n -> ExtractValue(\'<a>ccc<b>ddd</b></a>\', \'/a/b\') AS val2,\n -> ExtractValue(\'<a>ccc<b>ddd</b></a>\', \'//b\') AS val3,\n -> ExtractValue(\'<a>ccc<b>ddd</b></a>\', \'/b\') AS val4,\n -> ExtractValue(\'<a>ccc<b>ddd</b><b>eee</b></a>\', \'//b\') AS val5;\n\n+------+------+------+------+---------+\n| val1 | val2 | val3 | val4 | val5 |\n+------+------+------+------+---------+\n| ccc | ddd | ddd | | ddd eee |\n+------+------+------+------+---------+\n','https://mariadb.com/kb/en/extractvalue/'),(139,'OLD_PASSWORD',12,'Syntax:\nOLD_PASSWORD(str)\n\nOLD_PASSWORD() was added when the implementation of PASSWORD() was\nchanged in MySQL 4.1 to improve security. OLD_PASSWORD() returns the\nvalue of the pre-4.1 implementation of PASSWORD() as a string, and is\nintended to permit you to reset passwords for any pre-4.1 clients that\nneed to connect to your version 5.5 MySQL server without locking them\nout. See http://dev.mysql.com/doc/refman/5.1/en/password-hashing.html.\n\nAs of MySQL 5.5.3, the return value is a nonbinary string in the\nconnection character set. Before 5.5.3, the return value is a binary\nstring.\n\nURL: https://mariadb.com/kb/en/old_password/\n\n','','https://mariadb.com/kb/en/old_password/'),(140,'FORMAT',37,'Syntax:\nFORMAT(X,D[,locale])\n\nFormats the number X to a format like \'#,###,###.##\', rounded to D\ndecimal places, and returns the result as a string. If D is 0, the\nresult has no decimal point or fractional part.\n\nThe optional third parameter enables a locale to be specified to be\nused for the result number\'s decimal point, thousands separator, and\ngrouping between separators. Permissible locale values are the same as\nthe legal values for the lc_time_names system variable (see\nhttps://mariadb.com/kb/en/server-locale/). If no\nlocale is specified, the default is \'en_US\'.\n\nURL: https://mariadb.com/kb/en/format/\n\n','MariaDB> SELECT FORMAT(12332.123456, 4);\n -> \'12,332.1235\'\nMariaDB> SELECT FORMAT(12332.1,4);\n -> \'12,332.1000\'\nMariaDB> SELECT FORMAT(12332.2,0);\n -> \'12,332\'\nMariaDB> SELECT FORMAT(12332.2,2,\'de_DE\');\n -> \'12.332,20\'\n','https://mariadb.com/kb/en/format/'),(141,'||',15,'Syntax:\nOR, ||\n\nLogical OR. When both operands are non-NULL, the result is 1 if any\noperand is nonzero, and 0 otherwise. With a NULL operand, the result is\n1 if the other operand is nonzero, and NULL otherwise. If both operands\nare NULL, the result is NULL.\n\nURL: https://mariadb.com/kb/en/or/\n\n','MariaDB> SELECT 1 || 1;\n -> 1\nMariaDB> SELECT 1 || 0;\n -> 1\nMariaDB> SELECT 0 || 0;\n -> 0\nMariaDB> SELECT 0 || NULL;\n -> NULL\nMariaDB> SELECT 1 || NULL;\n -> 1\n','https://mariadb.com/kb/en/or/'),(142,'BIT_LENGTH',37,'Syntax:\nBIT_LENGTH(str)\n\nReturns the length of the string str in bits.\n\nURL: https://mariadb.com/kb/en/bit_length/\n\n','MariaDB> SELECT BIT_LENGTH(\'text\');\n -> 32\n','https://mariadb.com/kb/en/bit_length/'),(143,'EXTERIORRING',2,'ExteriorRing(poly)\n\nReturns the exterior ring of the Polygon value poly as a LineString.\n\nURL: https://mariadb.com/kb/en/exteriorring/\n\n','MariaDB> SET @poly =\n -> \'Polygon((0 0,0 3,3 3,3 0,0 0),(1 1,1 2,2 2,2 1,1 1))\';\nMariaDB> SELECT AsText(ExteriorRing(GeomFromText(@poly)));\n+-------------------------------------------+\n| AsText(ExteriorRing(GeomFromText(@poly))) |\n+-------------------------------------------+\n| LINESTRING(0 0,0 3,3 3,3 0,0 0) |\n+-------------------------------------------+\n','https://mariadb.com/kb/en/exteriorring/'),(144,'GEOMFROMWKB',32,'GeomFromWKB(wkb[,srid]), GeometryFromWKB(wkb[,srid])\n\nConstructs a geometry value of any type using its WKB representation\nand SRID.\n\nURL: https://mariadb.com/kb/en/geomfromwkb/\n\n','','https://mariadb.com/kb/en/geomfromwkb/'),(145,'SHOW SLAVE HOSTS',26,'Syntax:\nSHOW SLAVE HOSTS\n\nDisplays a list of replication slaves currently registered with the\nmaster. (Before MySQL 5.5.3, only slaves started with the\n--report-host=host_name option are visible in this list.)\n\nThe list is displayed on any server (not just the master server). The\noutput looks like this:\n\nMariaDB> SHOW SLAVE HOSTS;\n+------------+-----------+------+-----------+\n| Server_id | Host | Port | Master_id |\n+------------+-----------+------+-----------+\n| 192168010 | iconnect2 | 3306 | 192168011 |\n| 1921680101 | athena | 3306 | 192168011 |\n+------------+-----------+------+-----------+\n\no Server_id: The unique server ID of the slave server, as configured in\n the server\'s option file, or on the command line with\n --server-id=value.\n\no Host: The host name of the slave server, as configured in the\n server\'s option file, or on the command line with\n --report-host=host_name. Note that this can differ from the machine\n name as configured in the operating system.\n\no Port: The port the slave server is listening on.\n\n In MySQL 5.5.23 and later, a zero in this column means that the slave\n port (--report-port) was not set. Prior to MySQL 5.5.23, 3306 was\n used as the default in such cases (Bug #13333431).\n\no Master_id: The unique server ID of the master server that the slave\n server is replicating from.\n\nSome MySQL versions report another variable, Rpl_recovery_rank. This\nvariable was never used, and was removed in MySQL 5.5.3. (Bug #13963)\n\nURL: https://mariadb.com/kb/en/show-slave-hosts/\n\n','','https://mariadb.com/kb/en/show-slave-hosts/'),(146,'START TRANSACTION',8,'Syntax:\nSTART TRANSACTION [WITH CONSISTENT SNAPSHOT]\nBEGIN [WORK]\nCOMMIT [WORK] [AND [NO] CHAIN] [[NO] RELEASE]\nROLLBACK [WORK] [AND [NO] CHAIN] [[NO] RELEASE]\nSET autocommit = {0 | 1}\n\nThese statements provide control over use of transactions:\n\no START TRANSACTION or BEGIN start a new transaction.\n\no COMMIT commits the current transaction, making its changes permanent.\n\no ROLLBACK rolls back the current transaction, canceling its changes.\n\no SET autocommit disables or enables the default autocommit mode for\n the current session.\n\nBy default, MySQL runs with autocommit mode enabled. This means that as\nsoon as you execute a statement that updates (modifies) a table, MySQL\nstores the update on disk to make it permanent. The change cannot be\nrolled back.\n\nTo disable autocommit mode implicitly for a single series of\nstatements, use the START TRANSACTION statement:\n\nSTART TRANSACTION;\nSELECT @A:=SUM(salary) FROM table1 WHERE type=1;\nUPDATE table2 SET summary=@A WHERE type=1;\nCOMMIT;\n\nWith START TRANSACTION, autocommit remains disabled until you end the\ntransaction with COMMIT or ROLLBACK. The autocommit mode then reverts\nto its previous state.\n\nYou can also begin a transaction like this:\n\nSTART TRANSACTION WITH CONSISTENT SNAPSHOT;\n\nThe WITH CONSISTENT SNAPSHOT option starts a consistent read for\nstorage engines that are capable of it. This applies only to InnoDB.\nThe effect is the same as issuing a START TRANSACTION followed by a\nSELECT from any InnoDB table. See\nhttp://dev.mysql.com/doc/refman/5.5/en/innodb-consistent-read.html. The\nWITH CONSISTENT SNAPSHOT option does not change the current transaction\nisolation level, so it provides a consistent snapshot only if the\ncurrent isolation level is one that permits consistent read (REPEATABLE\nREAD or SERIALIZABLE).\n\n*Important*: Many APIs used for writing MySQL client applications (such\nas JDBC) provide their own methods for starting transactions that can\n(and sometimes should) be used instead of sending a START TRANSACTION\nstatement from the client. See\nhttp://dev.mysql.com/doc/refman/5.5/en/connectors-apis.html, or the\ndocumentation for your API, for more information.\n\nTo disable autocommit mode explicitly, use the following statement:\n\nSET autocommit=0;\n\nAfter disabling autocommit mode by setting the autocommit variable to\nzero, changes to transaction-safe tables (such as those for InnoDB) are not made permanent immediately. You must use COMMIT to\nstore your changes to disk or ROLLBACK to ignore the changes.\n\nautocommit is a session variable and must be set for each session. To\ndisable autocommit mode for each new connection, see the description of\nthe autocommit system variable at\nhttps://mariadb.com/kb/en/server-system-variables/.\n\nBEGIN and BEGIN WORK are supported as aliases of START TRANSACTION for\ninitiating a transaction. START TRANSACTION is standard SQL syntax and\nis the recommended way to start an ad-hoc transaction.\n\nThe BEGIN statement differs from the use of the BEGIN keyword that\nstarts a BEGIN ... END compound statement. The latter does not begin a\ntransaction. See [HELP BEGIN END].\n\n*Note*: Within all stored programs (stored procedures and functions,\ntriggers, and events), the parser treats BEGIN [WORK] as the beginning\nof a BEGIN ... END block. Begin a transaction in this context with\nSTART TRANSACTION instead.\n\nThe optional WORK keyword is supported for COMMIT and ROLLBACK, as are\nthe CHAIN and RELEASE clauses. CHAIN and RELEASE can be used for\nadditional control over transaction completion. The value of the\ncompletion_type system variable determines the default completion\nbehavior. See\nhttps://mariadb.com/kb/en/server-system-variables/.\n\nThe AND CHAIN clause causes a new transaction to begin as soon as the\ncurrent one ends, and the new transaction has the same isolation level\nas the just-terminated transaction. The RELEASE clause causes the\nserver to disconnect the current client session after terminating the\ncurrent transaction. Including the NO keyword suppresses CHAIN or\nRELEASE completion, which can be useful if the completion_type system\nvariable is set to cause chaining or release completion by default.\n\nURL: https://mariadb.com/kb/en/start-transaction/\n\n','','https://mariadb.com/kb/en/start-transaction/'),(147,'BETWEEN AND',18,'Syntax:\nexpr BETWEEN min AND max\n\nIf expr is greater than or equal to min and expr is less than or equal\nto max, BETWEEN returns 1, otherwise it returns 0. This is equivalent\nto the expression (min <= expr AND expr <= max) if all the arguments\nare of the same type. Otherwise type conversion takes place according\nto the rules described in\nhttps://mariadb.com/kb/en/type-conversion/, but\napplied to all the three arguments.\n\nURL: https://mariadb.com/kb/en/between-and/\n\n','MariaDB> SELECT 2 BETWEEN 1 AND 3, 2 BETWEEN 3 and 1;\n -> 1, 0\nMariaDB> SELECT 1 BETWEEN 2 AND 3;\n -> 0\nMariaDB> SELECT \'b\' BETWEEN \'a\' AND \'c\';\n -> 1\nMariaDB> SELECT 2 BETWEEN 2 AND \'3\';\n -> 1\nMariaDB> SELECT 2 BETWEEN 2 AND \'x-3\';\n -> 0\n','https://mariadb.com/kb/en/between-and/'),(148,'MULTIPOLYGON',24,'MultiPolygon(poly1,poly2,...)\n\nConstructs a MultiPolygon value from a set of Polygon or WKB Polygon\narguments.\n\nURL: https://mariadb.com/kb/en/multipolygon/\n\n','','https://mariadb.com/kb/en/multipolygon/'),(149,'TIME_FORMAT',31,'Syntax:\nTIME_FORMAT(time,format)\n\nThis is used like the DATE_FORMAT() function, but the format string may\ncontain format specifiers only for hours, minutes, seconds, and\nmicroseconds. Other specifiers produce a NULL value or 0.\n\nURL: https://mariadb.com/kb/en/time_format/\n\n','MariaDB> SELECT TIME_FORMAT(\'100:00:00\', \'%H %k %h %I %l\');\n -> \'100 100 04 04 4\'\n','https://mariadb.com/kb/en/time_format/'),(150,'LEFT',37,'Syntax:\nLEFT(str,len)\n\nReturns the leftmost len characters from the string str, or NULL if any\nargument is NULL.\n\nURL: https://mariadb.com/kb/en/left/\n\n','MariaDB> SELECT LEFT(\'foobarbar\', 5);\n -> \'fooba\'\n','https://mariadb.com/kb/en/left/'),(151,'FLUSH QUERY CACHE',26,'You can defragment the query cache to better utilize its memory with\nthe FLUSH QUERY CACHE statement. The statement does not remove any\nqueries from the cache.\n\nThe RESET QUERY CACHE statement removes all query results from the\nquery cache. The FLUSH TABLES statement also does this.\n\nURL: https://mariadb.com/kb/en/flush-query-cache/\n\n','','https://mariadb.com/kb/en/flush-query-cache/'),(152,'SET DATA TYPE',22,'SET(\'value1\',\'value2\',...) [CHARACTER SET charset_name] [COLLATE\ncollation_name]\n\nA set. A string object that can have zero or more values, each of which\nmust be chosen from the list of values \'value1\', \'value2\', ... A SET\ncolumn can have a maximum of 64 members. SET values are represented\ninternally as integers.\n\nURL: https://mariadb.com/kb/en/set-data-type/\n\n','','https://mariadb.com/kb/en/set-data-type/'),(153,'RAND',4,'Syntax:\nRAND(), RAND(N)\n\nReturns a random floating-point value v in the range 0 <= v < 1.0. If a\nconstant integer argument N is specified, it is used as the seed value,\nwhich produces a repeatable sequence of column values. In the following\nexample, note that the sequences of values produced by RAND(3) is the\nsame both places where it occurs.\n\nURL: https://mariadb.com/kb/en/rand/\n\n','MariaDB> CREATE TABLE t (i INT);\nQuery OK, 0 rows affected (0.42 sec)\n\nMariaDB> INSERT INTO t VALUES(1),(2),(3);\nQuery OK, 3 rows affected (0.00 sec)\nRecords: 3 Duplicates: 0 Warnings: 0\n\nMariaDB> SELECT i, RAND() FROM t;\n+------+------------------+\n| i | RAND() |\n+------+------------------+\n| 1 | 0.61914388706828 |\n| 2 | 0.93845168309142 |\n| 3 | 0.83482678498591 |\n+------+------------------+\n3 rows in set (0.00 sec)\n\nMariaDB> SELECT i, RAND(3) FROM t;\n+------+------------------+\n| i | RAND(3) |\n+------+------------------+\n| 1 | 0.90576975597606 |\n| 2 | 0.37307905813035 |\n| 3 | 0.14808605345719 |\n+------+------------------+\n3 rows in set (0.00 sec)\n\nMariaDB> SELECT i, RAND() FROM t;\n+------+------------------+\n| i | RAND() |\n+------+------------------+\n| 1 | 0.35877890638893 |\n| 2 | 0.28941420772058 |\n| 3 | 0.37073435016976 |\n+------+------------------+\n3 rows in set (0.00 sec)\n\nMariaDB> SELECT i, RAND(3) FROM t;\n+------+------------------+\n| i | RAND(3) |\n+------+------------------+\n| 1 | 0.90576975597606 |\n| 2 | 0.37307905813035 |\n| 3 | 0.14808605345719 |\n+------+------------------+\n3 rows in set (0.01 sec)\n','https://mariadb.com/kb/en/rand/'),(154,'RPAD',37,'Syntax:\nRPAD(str,len,padstr)\n\nReturns the string str, right-padded with the string padstr to a length\nof len characters. If str is longer than len, the return value is\nshortened to len characters.\n\nURL: https://mariadb.com/kb/en/rpad/\n\n','MariaDB> SELECT RPAD(\'hi\',5,\'?\');\n -> \'hi???\'\nMariaDB> SELECT RPAD(\'hi\',1,\'?\');\n -> \'h\'\n','https://mariadb.com/kb/en/rpad/'),(155,'CREATE DATABASE',39,'Syntax:\nCREATE {DATABASE | SCHEMA} [IF NOT EXISTS] db_name\n [create_specification] ...\n\ncreate_specification:\n [DEFAULT] CHARACTER SET [=] charset_name\n | [DEFAULT] COLLATE [=] collation_name\n\nCREATE DATABASE creates a database with the given name. To use this\nstatement, you need the CREATE privilege for the database. CREATE\nSCHEMA is a synonym for CREATE DATABASE.\n\nURL: https://mariadb.com/kb/en/create-database/\n\n','','https://mariadb.com/kb/en/create-database/'),(156,'DEC',22,'DEC[(M[,D])] [UNSIGNED] [ZEROFILL], NUMERIC[(M[,D])] [UNSIGNED]\n[ZEROFILL], FIXED[(M[,D])] [UNSIGNED] [ZEROFILL]\n\nThese types are synonyms for DECIMAL. The FIXED synonym is available\nfor compatibility with other database systems.\n\nURL: https://mariadb.com/kb/en/dec-numeric-fixed/\n\n','','https://mariadb.com/kb/en/dec-numeric-fixed/'),(157,'VAR_POP',16,'Syntax:\nVAR_POP(expr)\n\nReturns the population standard variance of expr. It considers rows as\nthe whole population, not as a sample, so it has the number of rows as\nthe denominator. You can also use VARIANCE(), which is equivalent but\nis not standard SQL.\n\nVAR_POP() returns NULL if there were no matching rows.\n\nURL: https://mariadb.com/kb/en/var_pop/\n\n','','https://mariadb.com/kb/en/var_pop/'),(158,'ELT',37,'Syntax:\nELT(N,str1,str2,str3,...)\n\nReturns str1 if N = 1, str2 if N = 2, and so on. Returns NULL if N is\nless than 1 or greater than the number of arguments. ELT() is the\ncomplement of FIELD().\n\nURL: https://mariadb.com/kb/en/elt/.html\n\n','MariaDB> SELECT ELT(1, \'ej\', \'Heja\', \'hej\', \'foo\');\n -> \'ej\'\nMariaDB> SELECT ELT(4, \'ej\', \'Heja\', \'hej\', \'foo\');\n -> \'foo\'\n','https://mariadb.com/kb/en/elt/.html'),(159,'ALTER VIEW',39,'Syntax:\nALTER\n [ALGORITHM = {UNDEFINED | MERGE | TEMPTABLE}]\n [DEFINER = { user | CURRENT_USER }]\n [SQL SECURITY { DEFINER | INVOKER }]\n VIEW view_name [(column_list)]\n AS select_statement\n [WITH [CASCADED | LOCAL] CHECK OPTION]\n\nThis statement changes the definition of a view, which must exist. The\nsyntax is similar to that for CREATE VIEW and the effect is the same as\nfor CREATE OR REPLACE VIEW. See [HELP CREATE VIEW]. This statement\nrequires the CREATE VIEW and DROP privileges for the view, and some\nprivilege for each column referred to in the SELECT statement. ALTER\nVIEW is permitted only to the definer or users with the SUPER\nprivilege.\n\nURL: https://mariadb.com/kb/en/alter-view/\n\n','','https://mariadb.com/kb/en/alter-view/'),(160,'SHOW DATABASES',26,'Syntax:\nSHOW {DATABASES | SCHEMAS}\n [LIKE \'pattern\' | WHERE expr]\n\nSHOW DATABASES lists the databases on the MySQL server host. SHOW\nSCHEMAS is a synonym for SHOW DATABASES. The LIKE clause, if present,\nindicates which database names to match. The WHERE clause can be given\nto select rows using more general conditions, as discussed in\nhttps://mariadb.com/kb/en/extended-show/.\n\nYou see only those databases for which you have some kind of privilege,\nunless you have the global SHOW DATABASES privilege. You can also get\nthis list using the mysqlshow command.\n\nIf the server was started with the --skip-show-database option, you\ncannot use this statement at all unless you have the SHOW DATABASES\nprivilege.\n\nURL: https://mariadb.com/kb/en/show-databases/\n\n','','https://mariadb.com/kb/en/show-databases/'),(161,'~',19,'Syntax:\n~\n\nInvert all bits.\n\nURL: https://mariadb.com/kb/en/3489/\n\n','MariaDB> SELECT 5 & ~1;\n -> 4\n','https://mariadb.com/kb/en/3489/'),(162,'TEXT',22,'TEXT[(M)] [CHARACTER SET charset_name] [COLLATE collation_name]\n\nA TEXT column with a maximum length of 65,535 (216 - 1) characters. The\neffective maximum length is less if the value contains multi-byte\ncharacters. Each TEXT value is stored using a 2-byte length prefix that\nindicates the number of bytes in the value.\n\nAn optional length M can be given for this type. If this is done, MySQL\ncreates the column as the smallest TEXT type large enough to hold\nvalues M characters long.\n\nURL: https://mariadb.com/kb/en/text/\n\n','','https://mariadb.com/kb/en/text/'),(163,'CONCAT_WS',37,'Syntax:\nCONCAT_WS(separator,str1,str2,...)\n\nCONCAT_WS() stands for Concatenate With Separator and is a special form\nof CONCAT(). The first argument is the separator for the rest of the\narguments. The separator is added between the strings to be\nconcatenated. The separator can be a string, as can the rest of the\narguments. If the separator is NULL, the result is NULL.\n\nURL: https://mariadb.com/kb/en/concat_ws/\n\n','MariaDB> SELECT CONCAT_WS(\',\',\'First name\',\'Second name\',\'Last Name\');\n -> \'First name,Second name,Last Name\'\nMariaDB> SELECT CONCAT_WS(\',\',\'First name\',NULL,\'Last Name\');\n -> \'First name,Last Name\'\n','https://mariadb.com/kb/en/concat_ws/'),(164,'ROW_COUNT',17,'Syntax:\nROW_COUNT()\n\nBefore MySQL 5.5.5, ROW_COUNT() returns the number of rows changed,\ndeleted, or inserted by the last statement if it was an UPDATE, DELETE,\nor INSERT. For other statements, the value may not be meaningful.\n\nAs of MySQL 5.5.5, ROW_COUNT() returns a value as follows:\n\no DDL statements: 0. This applies to statements such as CREATE TABLE or\n DROP TABLE.\n\no DML statements other than SELECT: The number of affected rows. This\n applies to statements such as UPDATE, INSERT, or DELETE (as before),\n but now also to statements such as ALTER TABLE and LOAD DATA INFILE.\n\no SELECT: -1 if the statement returns a result set, or the number of\n rows \"affected\" if it does not. For example, for SELECT * FROM t1,\n ROW_COUNT() returns -1. For SELECT * FROM t1 INTO OUTFILE\n \'file_name\', ROW_COUNT() returns the number of rows written to the\n file.\n\no SIGNAL statements: 0.\n\nFor UPDATE statements, the affected-rows value by default is the number\nof rows actually changed. If you specify the CLIENT_FOUND_ROWS flag to\nmysql_real_connect() when connecting to mysqld, the affected-rows value\nis the number of rows \"found\"; that is, matched by the WHERE clause.\n\nFor REPLACE statements, the affected-rows value is 2 if the new row\nreplaced an old row, because in this case, one row was inserted after\nthe duplicate was deleted.\n\nFor INSERT ... ON DUPLICATE KEY UPDATE statements, the affected-rows\nvalue is 1 if the row is inserted as a new row and 2 if an existing row\nis updated.\n\nThe ROW_COUNT() value is similar to the value from the\nmysql_affected_rows() C API function and the row count that the mysql\nclient displays following statement execution.\n\nURL: https://mariadb.com/kb/en/information-functions-row_count/\n\n','MariaDB> INSERT INTO t VALUES(1),(2),(3);\nQuery OK, 3 rows affected (0.00 sec)\nRecords: 3 Duplicates: 0 Warnings: 0\n\nMariaDB> SELECT ROW_COUNT();\n+-------------+\n| ROW_COUNT() |\n+-------------+\n| 3 |\n+-------------+\n1 row in set (0.00 sec)\n\nMariaDB> DELETE FROM t WHERE i IN(1,2);\nQuery OK, 2 rows affected (0.00 sec)\n\nMariaDB> SELECT ROW_COUNT();\n+-------------+\n| ROW_COUNT() |\n+-------------+\n| 2 |\n+-------------+\n1 row in set (0.00 sec)\n','https://mariadb.com/kb/en/information-functions-row_count/'),(165,'ASIN',4,'Syntax:\nASIN(X)\n\nReturns the arc sine of X, that is, the value whose sine is X. Returns\nNULL if X is not in the range -1 to 1.\n\nURL: https://mariadb.com/kb/en/asin/\n\n','MariaDB> SELECT ASIN(0.2);\n -> 0.20135792079033\nMariaDB> SELECT ASIN(\'foo\');\n\n+-------------+\n| ASIN(\'foo\') |\n+-------------+\n| 0 |\n+-------------+\n1 row in set, 1 warning (0.00 sec)\n\nMariaDB> SHOW WARNINGS;\n+---------+------+-----------------------------------------+\n| Level | Code | Message |\n+---------+------+-----------------------------------------+\n| Warning | 1292 | Truncated incorrect DOUBLE value: \'foo\' |\n+---------+------+-----------------------------------------+\n','https://mariadb.com/kb/en/asin/'),(166,'SIGN',4,'Syntax:\nSIGN(X)\n\nReturns the sign of the argument as -1, 0, or 1, depending on whether X\nis negative, zero, or positive.\n\nURL: https://mariadb.com/kb/en/sign/\n\n','MariaDB> SELECT SIGN(-32);\n -> -1\nMariaDB> SELECT SIGN(0);\n -> 0\nMariaDB> SELECT SIGN(234);\n -> 1\n','https://mariadb.com/kb/en/sign/'),(167,'SEC_TO_TIME',31,'Syntax:\nSEC_TO_TIME(seconds)\n\nReturns the seconds argument, converted to hours, minutes, and seconds,\nas a TIME value. The range of the result is constrained to that of the\nTIME data type. A warning occurs if the argument corresponds to a value\noutside that range.\n\nURL: https://mariadb.com/kb/en/sec_to_time/\n\n','MariaDB> SELECT SEC_TO_TIME(2378);\n -> \'00:39:38\'\nMariaDB> SELECT SEC_TO_TIME(2378) + 0;\n -> 3938\n','https://mariadb.com/kb/en/sec_to_time/'),(168,'FLOAT',22,'FLOAT[(M,D)] [UNSIGNED] [ZEROFILL]\n\nA small (single-precision) floating-point number. Permissible values\nare -3.402823466E+38 to -1.175494351E-38, 0, and 1.175494351E-38 to\n3.402823466E+38. These are the theoretical limits, based on the IEEE\nstandard. The actual range might be slightly smaller depending on your\nhardware or operating system.\n\nM is the total number of digits and D is the number of digits following\nthe decimal point. If M and D are omitted, values are stored to the\nlimits permitted by the hardware. A single-precision floating-point\nnumber is accurate to approximately 7 decimal places.\n\nUNSIGNED, if specified, disallows negative values.\n\nUsing FLOAT might give you some unexpected problems because all\ncalculations in MySQL are done with double precision. See\nhttps://mariadb.com/kb/en/floating-point-accuracy/.\n\nURL: https://mariadb.com/kb/en/float/\n\n','','https://mariadb.com/kb/en/float/'),(169,'LOCATE',37,'Syntax:\nLOCATE(substr,str), LOCATE(substr,str,pos)\n\nThe first syntax returns the position of the first occurrence of\nsubstring substr in string str. The second syntax returns the position\nof the first occurrence of substring substr in string str, starting at\nposition pos. Returns 0 if substr is not in str.\n\nURL: https://mariadb.com/kb/en/locate/\n\n','MariaDB> SELECT LOCATE(\'bar\', \'foobarbar\');\n -> 4\nMariaDB> SELECT LOCATE(\'xbar\', \'foobar\');\n -> 0\nMariaDB> SELECT LOCATE(\'bar\', \'foobarbar\', 5);\n -> 7\n','https://mariadb.com/kb/en/locate/'),(170,'SHOW EVENTS',26,'Syntax:\nSHOW EVENTS [{FROM | IN} schema_name]\n [LIKE \'pattern\' | WHERE expr]\n\nThis statement displays information about Event Manager events. It\nrequires the EVENT privilege for the database from which the events are\nto be shown.\n\nIn its simplest form, SHOW EVENTS lists all of the events in the\ncurrent schema:\n\nMariaDB> SELECT CURRENT_USER(), SCHEMA();\n+----------------+----------+\n| CURRENT_USER() | SCHEMA() |\n+----------------+----------+\n| jon@ghidora | myschema |\n+----------------+----------+\n1 row in set (0.00 sec)\n\nMariaDB> SHOW EVENTS\\G\n*************************** 1. row ***************************\n Db: myschema\n Name: e_daily\n Definer: jon@ghidora\n Time zone: SYSTEM\n Type: RECURRING\n Execute at: NULL\n Interval value: 10\n Interval field: SECOND\n Starts: 2006-02-09 10:41:23\n Ends: NULL\n Status: ENABLED\n Originator: 0\ncharacter_set_client: latin1\ncollation_connection: latin1_swedish_ci\n Database Collation: latin1_swedish_ci\n\nTo see events for a specific schema, use the FROM clause. For example,\nto see events for the test schema, use the following statement:\n\nSHOW EVENTS FROM test;\n\nThe LIKE clause, if present, indicates which event names to match. The\nWHERE clause can be given to select rows using more general conditions,\nas discussed in\nhttps://mariadb.com/kb/en/extended-show/.\n\nURL: https://mariadb.com/kb/en/show-events/\n\n','','https://mariadb.com/kb/en/show-events/'),(171,'CHARSET',17,'Syntax:\nCHARSET(str)\n\nReturns the character set of the string argument.\n\nURL: https://mariadb.com/kb/en/charset/\n\n','MariaDB> SELECT CHARSET(\'abc\');\n -> \'latin1\'\nMariaDB> SELECT CHARSET(CONVERT(\'abc\' USING utf8));\n -> \'utf8\'\nMariaDB> SELECT CHARSET(USER());\n -> \'utf8\'\n','https://mariadb.com/kb/en/charset/'),(172,'SUBDATE',31,'Syntax:\nSUBDATE(date,INTERVAL expr unit), SUBDATE(expr,days)\n\nWhen invoked with the INTERVAL form of the second argument, SUBDATE()\nis a synonym for DATE_SUB(). For information on the INTERVAL unit\nargument, see the discussion for DATE_ADD().\n\nMariaDB> SELECT DATE_SUB(\'2008-01-02\', INTERVAL 31 DAY);\n -> \'2007-12-02\'\nMariaDB> SELECT SUBDATE(\'2008-01-02\', INTERVAL 31 DAY);\n -> \'2007-12-02\'\n\nThe second form enables the use of an integer value for days. In such\ncases, it is interpreted as the number of days to be subtracted from\nthe date or datetime expression expr.\n\nMariaDB> SELECT SUBDATE(\'2008-01-02 12:00:00\', 31);\n -> \'2007-12-02 12:00:00\'\n\nURL: https://mariadb.com/kb/en/subdate/\n\n','','https://mariadb.com/kb/en/subdate/'),(173,'DAYOFYEAR',31,'Syntax:\nDAYOFYEAR(date)\n\nReturns the day of the year for date, in the range 1 to 366.\n\nURL: https://mariadb.com/kb/en/dayofyear/\n\n','MariaDB> SELECT DAYOFYEAR(\'2007-02-03\');\n -> 34\n','https://mariadb.com/kb/en/dayofyear/'),(174,'%',4,'Syntax:\nN % M, N MOD M\n\nModulo operation. Returns the remainder of N divided by M. For more\ninformation, see the description for the MOD() function in\nhttps://mariadb.com/kb/en/mod/.\n\nURL: https://mariadb.com/kb/en/modulo-operator/\n\n','','https://mariadb.com/kb/en/modulo-operator/'),(175,'LONGTEXT',22,'LONGTEXT [CHARACTER SET charset_name] [COLLATE collation_name]\n\nA TEXT column with a maximum length of 4,294,967,295 or 4GB (232 - 1)\ncharacters. The effective maximum length is less if the value contains\nmulti-byte characters. The effective maximum length of LONGTEXT columns\nalso depends on the configured maximum packet size in the client/server\nprotocol and available memory. Each LONGTEXT value is stored using a\n4-byte length prefix that indicates the number of bytes in the value.\n\nURL: https://mariadb.com/kb/en/longtext/\n\n','','https://mariadb.com/kb/en/longtext/'),(176,'KILL',26,'Syntax:\nKILL [CONNECTION | QUERY] thread_id\n\nEach connection to mysqld runs in a separate thread. You can see which\nthreads are running with the SHOW PROCESSLIST statement and kill a\nthread with the KILL thread_id statement.\n\nKILL permits an optional CONNECTION or QUERY modifier:\n\no KILL CONNECTION is the same as KILL with no modifier: It terminates\n the connection associated with the given thread_id.\n\no KILL QUERY terminates the statement that the connection is currently\n executing, but leaves the connection itself intact.\n\nIf you have the PROCESS privilege, you can see all threads. If you have\nthe SUPER privilege, you can kill all threads and statements.\nOtherwise, you can see and kill only your own threads and statements.\n\nYou can also use the mysqladmin processlist and mysqladmin kill\ncommands to examine and kill threads.\n\n*Note*: You cannot use KILL with the Embedded MySQL Server library\nbecause the embedded server merely runs inside the threads of the host\napplication. It does not create any connection threads of its own.\n\nURL: https://mariadb.com/kb/en/data-manipulation-kill-connection-query/\n\n','','https://mariadb.com/kb/en/data-manipulation-kill-connection-query/'),(177,'DISJOINT',30,'Disjoint(g1,g2)\n\nReturns 1 or 0 to indicate whether g1 is spatially disjoint from (does\nnot intersect) g2.\n\nURL: https://mariadb.com/kb/en/disjoint/\n\n','','https://mariadb.com/kb/en/disjoint/'),(178,'ASTEXT',3,'AsText(g), AsWKT(g)\n\nConverts a value in internal geometry format to its WKT representation\nand returns the string result.\n\nURL: https://mariadb.com/kb/en/astext/\n\n','MariaDB> SET @g = \'LineString(1 1,2 2,3 3)\';\nMariaDB> SELECT AsText(GeomFromText(@g));\n+--------------------------+\n| AsText(GeomFromText(@g)) |\n+--------------------------+\n| LINESTRING(1 1,2 2,3 3) |\n+--------------------------+\n','https://mariadb.com/kb/en/astext/'),(179,'LPAD',37,'Syntax:\nLPAD(str,len,padstr)\n\nReturns the string str, left-padded with the string padstr to a length\nof len characters. If str is longer than len, the return value is\nshortened to len characters.\n\n\nURL: https://mariadb.com/kb/en/lpad/\n\n','MariaDB> SELECT LPAD(\'hi\',4,\'??\');\n -> \'??hi\'\nMariaDB> SELECT LPAD(\'hi\',1,\'??\');\n -> \'h\'\n','https://mariadb.com/kb/en/lpad/'),(180,'DECLARE CONDITION',23,'Syntax:\nDECLARE condition_name CONDITION FOR condition_value\n\ncondition_value:\n mysql_error_code\n | SQLSTATE [VALUE] sqlstate_value\n\nThe DECLARE ... CONDITION statement declares a named error condition,\nassociating a name with a condition that needs specific handling. The\nname can be referred to in a subsequent DECLARE ... HANDLER statement\n(see [HELP DECLARE HANDLER]).\n\nCondition declarations must appear before cursor or handler\ndeclarations.\n\nThe condition_value for DECLARE ... CONDITION can be a MySQL error code\n(a number) or an SQLSTATE value (a 5-character string literal). You\nshould not use MySQL error code 0 or SQLSTATE values that begin with\n\'00\', because those indicate success rather than an error condition.\nFor a list of MySQL error codes and SQLSTATE values, see\nhttps://mariadb.com/kb/en/mariadb-error-codes/.\n\nURL: https://mariadb.com/kb/en/declare-condition/\n\n','','https://mariadb.com/kb/en/declare-condition/'),(181,'OVERLAPS',30,'Overlaps(g1,g2)\n\nReturns 1 or 0 to indicate whether g1 spatially overlaps g2. The term\nspatially overlaps is used if two geometries intersect and their\nintersection results in a geometry of the same dimension but not equal\nto either of the given geometries.\n\nURL: https://mariadb.com/kb/en/overlaps/\n\n','','https://mariadb.com/kb/en/overlaps/'),(182,'SET GLOBAL SQL_SLAVE_SKIP_COUNTER',8,'Syntax:\nSET GLOBAL sql_slave_skip_counter = N\n\nThis statement skips the next N events from the master. This is useful\nfor recovering from replication stops caused by a statement.\n\nThis statement is valid only when the slave threads are not running.\nOtherwise, it produces an error.\n\nURL: https://mariadb.com/kb/en/set-global-sql_slave_skip_counter/\n\n','','https://mariadb.com/kb/en/set-global-sql_slave_skip_counter/'),(183,'NUMGEOMETRIES',25,'NumGeometries(gc)\n\nReturns the number of geometries in the GeometryCollection value gc.\n\nURL: https://mariadb.com/kb/en/numgeometries/\n\n','MariaDB> SET @gc = \'GeometryCollection(Point(1 1),LineString(2 2, 3 3))\';\nMariaDB> SELECT NumGeometries(GeomFromText(@gc));\n+----------------------------------+\n| NumGeometries(GeomFromText(@gc)) |\n+----------------------------------+\n| 2 |\n+----------------------------------+\n','https://mariadb.com/kb/en/numgeometries/'),(184,'MONTHNAME',31,'Syntax:\nMONTHNAME(date)\n\nReturns the full name of the month for date. The language used for the\nname is controlled by the value of the lc_time_names system variable\n(https://mariadb.com/kb/en/server-locale/).\n\nURL: https://mariadb.com/kb/en/monthname/\n\n','MariaDB> SELECT MONTHNAME(\'2008-02-03\');\n -> \'February\'\n','https://mariadb.com/kb/en/monthname/'),(185,'CHANGE MASTER TO',8,'Syntax:\nCHANGE MASTER TO option [, option] ...\n\noption:\n MASTER_BIND = \'interface_name\'\n | MASTER_HOST = \'host_name\'\n | MASTER_USER = \'user_name\'\n | MASTER_PASSWORD = \'password\'\n | MASTER_PORT = port_num\n | MASTER_CONNECT_RETRY = interval\n | MASTER_HEARTBEAT_PERIOD = interval\n | MASTER_LOG_FILE = \'master_log_name\'\n | MASTER_LOG_POS = master_log_pos\n | RELAY_LOG_FILE = \'relay_log_name\'\n | RELAY_LOG_POS = relay_log_pos\n | MASTER_SSL = {0|1}\n | MASTER_SSL_CA = \'ca_file_name\'\n | MASTER_SSL_CAPATH = \'ca_directory_name\'\n | MASTER_SSL_CERT = \'cert_file_name\'\n | MASTER_SSL_KEY = \'key_file_name\'\n | MASTER_SSL_CIPHER = \'cipher_list\'\n | MASTER_SSL_VERIFY_SERVER_CERT = {0|1}\n | IGNORE_SERVER_IDS = (server_id_list)\n\nserver_id_list:\n [server_id [, server_id] ... ]\n\nCHANGE MASTER TO changes the parameters that the slave server uses for\nconnecting to the master server, for reading the master binary log, and\nreading the slave relay log. It also updates the contents of the\nmaster.info and relay-log.info files. To use CHANGE MASTER TO, the\nslave replication threads must be stopped (use STOP SLAVE if\nnecessary).\n\nOptions not specified retain their value, except as indicated in the\nfollowing discussion. Thus, in most cases, there is no need to specify\noptions that do not change. For example, if the password to connect to\nyour MySQL master has changed, you just need to issue these statements\nto tell the slave about the new password:\n\nSTOP SLAVE; -- if replication was running\nCHANGE MASTER TO MASTER_PASSWORD=\'new3cret\';\nSTART SLAVE; -- if you want to restart replication\n\nMASTER_HOST, MASTER_USER, MASTER_PASSWORD, and MASTER_PORT provide\ninformation to the slave about how to connect to its master:\n\no MASTER_HOST and MASTER_PORT are the host name (or IP address) of the\n master host and its TCP/IP port.\n\n *Note*: Replication cannot use Unix socket files. You must be able to\n connect to the master MySQL server using TCP/IP.\n\n If you specify the MASTER_HOST or MASTER_PORT option, the slave\n assumes that the master server is different from before (even if the\n option value is the same as its current value.) In this case, the old\n values for the master binary log file name and position are\n considered no longer applicable, so if you do not specify\n MASTER_LOG_FILE and MASTER_LOG_POS in the statement,\n MASTER_LOG_FILE=\'\' and MASTER_LOG_POS=4 are silently appended to it.\n\n Setting MASTER_HOST=\'\' (that is, setting its value explicitly to an\n empty string) is not the same as not setting MASTER_HOST at all.\n Beginning with MySQL 5.5, trying to set MASTER_HOST to an empty\n string fails with an error. Previously, setting MASTER_HOST to an\n empty string caused START SLAVE subsequently to fail. (Bug #28796)\n\no MASTER_USER and MASTER_PASSWORD are the user name and password of the\n account to use for connecting to the master.\n\n In MySQL 5.5.20 and later, MASTER_USER cannot be made empty; setting\n MASTER_USER = \'\' or leaving it unset when setting a value for for\n MASTER_PASSWORD causes an error (Bug #13427949).\n\n Currently, a password used for a replication slave account is\n effectively limited to 32 characters in length; the password can be\n longer, but any excess characters are truncated. This is not due to\n any limit imposed by the MySQL Server generally, but rather is an\n issue specific to MySQL Replication. (For more information, see Bug\n #43439.)\n\n The text of a running CHANGE MASTER TO statement, including values\n for MASTER_USER and MASTER_PASSWORD, can be seen in the output of a\n concurrent SHOW PROCESSLIST statement.\n\nThe MASTER_SSL_xxx options provide information about using SSL for the\nconnection. They correspond to the --ssl-xxx options described in\nhttps://mariadb.com/kb/en/ssl-server-system-variables/, and\nhttp://dev.mysql.com/doc/refman/5.5/en/replication-solutions-ssl.html.\nThese options can be changed even on slaves that are compiled without\nSSL support. They are saved to the master.info file, but are ignored if\nthe slave does not have SSL support enabled.\n\nMASTER_CONNECT_RETRY specifies how many seconds to wait between connect\nretries. The default is 60. The number of reconnection attempts is\nlimited by the --master-retry-count server option; for more\ninformation, see\nhttps://mariadb.com/kb/en/replication-and-binary-log-server-system-variables/.\n\nMASTER_HEARTBEAT_PERIOD sets the interval in seconds between\nreplication heartbeats. Whenever the master\'s binary log is updated\nwith an event, the waiting period for the next heartbeat is reset.\ninterval is a decimal value having the range 0 to 4294967 seconds and a\nresolution in milliseconds; the smallest nonzero value is 0.001.\nHeartbeats are sent by the master only if there are no unsent events in\nthe binary log file for a period longer than interval.\n\nSetting interval to 0 disables heartbeats altogether. The default value\nfor interval is equal to the value of slave_net_timeout divided by 2.\n\nSetting @@global.slave_net_timeout to a value less than that of the\ncurrent heartbeat interval results in a warning being issued. The\neffect of issuing RESET SLAVE on the heartbeat interval is to reset it\nto the default value.\n\nMASTER_LOG_FILE and MASTER_LOG_POS are the coordinates at which the\nslave I/O thread should begin reading from the master the next time the\nthread starts. RELAY_LOG_FILE and RELAY_LOG_POS are the coordinates at\nwhich the slave SQL thread should begin reading from the relay log the\nnext time the thread starts. If you specify either of MASTER_LOG_FILE\nor MASTER_LOG_POS, you cannot specify RELAY_LOG_FILE or RELAY_LOG_POS.\nIf neither of MASTER_LOG_FILE or MASTER_LOG_POS is specified, the slave\nuses the last coordinates of the slave SQL thread before CHANGE MASTER\nTO was issued. This ensures that there is no discontinuity in\nreplication, even if the slave SQL thread was late compared to the\nslave I/O thread, when you merely want to change, say, the password to\nuse.\n\nCHANGE MASTER TO deletes all relay log files and starts a new one,\nunless you specify RELAY_LOG_FILE or RELAY_LOG_POS. In that case, relay\nlog files are kept; the relay_log_purge global variable is set silently\nto 0.\n\nPrior to MySQL 5.5, RELAY_LOG_FILE required an absolute path. In MySQL\n5.5, the path can be relative, in which case the path is assumed to be\nrelative to the slave\'s data directory. (Bug #12190)\n\nIGNORE_SERVER_IDS was added in MySQL 5.5. This option takes a\ncomma-separated list of 0 or more server IDs. Events originating from\nthe corresponding servers are ignored, with the exception of log\nrotation and deletion events, which are still recorded in the relay\nlog.\n\nIn circular replication, the originating server normally acts as the\nterminator of its own events, so that they are not applied more than\nonce. Thus, this option is useful in circular replication when one of\nthe servers in the circle is removed. Suppose that you have a circular\nreplication setup with 4 servers, having server IDs 1, 2, 3, and 4, and\nserver 3 fails. When bridging the gap by starting replication from\nserver 2 to server 4, you can include IGNORE_SERVER_IDS = (3) in the\nCHANGE MASTER TO statement that you issue on server 4 to tell it to use\nserver 2 as its master instead of server 3. Doing so causes it to\nignore and not to propagate any statements that originated with the\nserver that is no longer in use.\n\nIf a CHANGE MASTER TO statement is issued without any IGNORE_SERVER_IDS\noption, any existing list is preserved; RESET SLAVE also has no effect\non the server ID list. To clear the list of ignored servers, it is\nnecessary to use the option with an empty list:\n\nCHANGE MASTER TO IGNORE_SERVER_IDS = ();\n\nIf IGNORE_SERVER_IDS contains the server\'s own ID and the server was\nstarted with the --replicate-same-server-id option enabled, an error\nresults.\n\nAlso beginning with MySQL 5.5, the master.info file and the output of\nSHOW SLAVE STATUS are extended to provide the list of servers that are\ncurrently ignored. For more information, see\nhttps://mariadb.com/kb/en/show-slave-status/, and\n[HELP SHOW SLAVE STATUS].\n\nBeginning with MySQL 5.5.5, invoking CHANGE MASTER TO causes the\nprevious values for MASTER_HOST, MASTER_PORT, MASTER_LOG_FILE, and\nMASTER_LOG_POS to be written to the error log, along with other\ninformation about the slave\'s state prior to execution.\n\nCHANGE MASTER TO is useful for setting up a slave when you have the\nsnapshot of the master and have recorded the master binary log\ncoordinates corresponding to the time of the snapshot. After loading\nthe snapshot into the slave to synchronize it to the slave, you can run\nCHANGE MASTER TO MASTER_LOG_FILE=\'log_name\', MASTER_LOG_POS=log_pos on\nthe slave to specify the coordinates at which the slave should begin\nreading the master binary log.\n\nThe following example changes the master server the slave uses and\nestablishes the master binary log coordinates from which the slave\nbegins reading. This is used when you want to set up the slave to\nreplicate the master:\n\nCHANGE MASTER TO\n MASTER_HOST=\'master2.mycompany.com\',\n MASTER_USER=\'replication\',\n MASTER_PASSWORD=\'bigs3cret\',\n MASTER_PORT=3306,\n MASTER_LOG_FILE=\'master2-bin.001\',\n MASTER_LOG_POS=4,\n MASTER_CONNECT_RETRY=10;\n\nThe next example shows an operation that is less frequently employed.\nIt is used when the slave has relay log files that you want it to\nexecute again for some reason. To do this, the master need not be\nreachable. You need only use CHANGE MASTER TO and start the SQL thread\n(START SLAVE SQL_THREAD):\n\nCHANGE MASTER TO\n RELAY_LOG_FILE=\'slave-relay-bin.006\',\n RELAY_LOG_POS=4025;\n\nURL: https://mariadb.com/kb/en/change-master-to/\n\n','','https://mariadb.com/kb/en/change-master-to/'),(186,'DROP DATABASE',39,'Syntax:\nDROP {DATABASE | SCHEMA} [IF EXISTS] db_name\n\nDROP DATABASE drops all tables in the database and deletes the\ndatabase. Be very careful with this statement! To use DROP DATABASE,\nyou need the DROP privilege on the database. DROP SCHEMA is a synonym\nfor DROP DATABASE.\n\n*Important*: When a database is dropped, user privileges on the\ndatabase are not automatically dropped. See [HELP GRANT].\n\nIF EXISTS is used to prevent an error from occurring if the database\ndoes not exist.\n\nURL: https://mariadb.com/kb/en/drop-database/\n\n','','https://mariadb.com/kb/en/drop-database/'),(187,'MBREQUAL',6,'MBREqual(g1,g2)\n\nReturns 1 or 0 to indicate whether the Minimum Bounding Rectangles of\nthe two geometries g1 and g2 are the same.\n\nURL: https://mariadb.com/kb/en/mbrequal/\n\n','','https://mariadb.com/kb/en/mbrequal/'),(188,'TIMESTAMP FUNCTION',31,'Syntax:\nTIMESTAMP(expr), TIMESTAMP(expr1,expr2)\n\nWith a single argument, this function returns the date or datetime\nexpression expr as a datetime value. With two arguments, it adds the\ntime expression expr2 to the date or datetime expression expr1 and\nreturns the result as a datetime value.\n\nURL: https://mariadb.com/kb/en/timestamp-function/\n\n','MariaDB> SELECT TIMESTAMP(\'2003-12-31\');\n -> \'2003-12-31 00:00:00\'\nMariaDB> SELECT TIMESTAMP(\'2003-12-31 12:00:00\',\'12:00:00\');\n -> \'2004-01-01 00:00:00\'\n','https://mariadb.com/kb/en/timestamp-function/'),(189,'PROCEDURE ANALYSE',33,'Syntax:\nANALYSE([max_elements[,max_memory]])\n\nANALYSE() examines the result from a query and returns an analysis of\nthe results that suggests optimal data types for each column that may\nhelp reduce table sizes. To obtain this analysis, append PROCEDURE\nANALYSE to the end of a SELECT statement:\n\nSELECT ... FROM ... WHERE ... PROCEDURE ANALYSE([max_elements,[max_memory]])\n\nFor example:\n\nSELECT col1, col2 FROM table1 PROCEDURE ANALYSE(10, 2000);\n\nThe results show some statistics for the values returned by the query,\nand propose an optimal data type for the columns. This can be helpful\nfor checking your existing tables, or after importing new data. You may\nneed to try different settings for the arguments so that PROCEDURE\nANALYSE() does not suggest the ENUM data type when it is not\nappropriate.\n\nThe arguments are optional and are used as follows:\n\no max_elements (default 256) is the maximum number of distinct values\n that ANALYSE() notices per column. This is used by ANALYSE() to check\n whether the optimal data type should be of type ENUM; if there are\n more than max_elements distinct values, then ENUM is not a suggested\n type.\n\no max_memory (default 8192) is the maximum amount of memory that\n ANALYSE() should allocate per column while trying to find all\n distinct values.\n\nURL: https://mariadb.com/kb/en/procedure-analyse/\n\n','','https://mariadb.com/kb/en/procedure-analyse/'),(190,'HELP_VERSION',9,'This help information was generated from the MySQL 5.5 Reference Manual\non: 2012-08-25 (revision: 31914)\n\nThis information applies to MySQL 5.5 through 5.5.29.\n','',''),(191,'CHARACTER_LENGTH',37,'Syntax:\nCHARACTER_LENGTH(str)\n\nCHARACTER_LENGTH() is a synonym for CHAR_LENGTH().\n\nURL: https://mariadb.com/kb/en/character_length/\n\n','','https://mariadb.com/kb/en/character_length/'),(192,'SHOW GRANTS',26,'Syntax:\nSHOW GRANTS [FOR user]\n\nThis statement lists the GRANT statement or statements that must be\nissued to duplicate the privileges that are granted to a MySQL user\naccount. The account is named using the same format as for the GRANT\nstatement; for example, \'jeffrey\'@\'localhost\'. If you specify only the\nuser name part of the account name, a host name part of \'%\' is used.\nFor additional information about specifying account names, see [HELP\nGRANT].\n\nMariaDB> SHOW GRANTS FOR \'root\'@\'localhost\';\n+---------------------------------------------------------------------+\n| Grants for root@localhost |\n+---------------------------------------------------------------------+\n| GRANT ALL PRIVILEGES ON *.* TO \'root\'@\'localhost\' WITH GRANT OPTION |\n+---------------------------------------------------------------------+\n\nTo list the privileges granted to the account that you are using to\nconnect to the server, you can use any of the following statements:\n\nSHOW GRANTS;\nSHOW GRANTS FOR CURRENT_USER;\nSHOW GRANTS FOR CURRENT_USER();\n\nIf SHOW GRANTS FOR CURRENT_USER (or any of the equivalent syntaxes) is\nused in DEFINER context, such as within a stored procedure that is\ndefined with SQL SECURITY DEFINER), the grants displayed are those of\nthe definer and not the invoker.\n\nURL: https://mariadb.com/kb/en/show-grants/\n\n','','https://mariadb.com/kb/en/show-grants/'),(193,'SHOW PRIVILEGES',26,'Syntax:\nSHOW PRIVILEGES\n\nSHOW PRIVILEGES shows the list of system privileges that the MySQL\nserver supports. The exact list of privileges depends on the version of\nyour server.\n\nURL: https://mariadb.com/kb/en/show-privileges/\n\n','','https://mariadb.com/kb/en/show-privileges/'),(194,'CREATE TABLESPACE',39,'Syntax:\nCREATE TABLESPACE tablespace_name\n ADD DATAFILE \'file_name\'\n USE LOGFILE GROUP logfile_group\n [EXTENT_SIZE [=] extent_size]\n [INITIAL_SIZE [=] initial_size]\n [AUTOEXTEND_SIZE [=] autoextend_size]\n [MAX_SIZE [=] max_size]\n [NODEGROUP [=] nodegroup_id]\n [WAIT]\n [COMMENT [=] comment_text]\n ENGINE [=] engine_name\n\nThis statement is used with NDB cluster, which is not supported by MariaDB.','','https://mariadb.com/kb/en/create-tablespace/'),(195,'INSERT FUNCTION',37,'Syntax:\nINSERT(str,pos,len,newstr)\n\nReturns the string str, with the substring beginning at position pos\nand len characters long replaced by the string newstr. Returns the\noriginal string if pos is not within the length of the string. Replaces\nthe rest of the string from position pos if len is not within the\nlength of the rest of the string. Returns NULL if any argument is NULL.\n\nURL: https://mariadb.com/kb/en/insert-function/\n\n','MariaDB> SELECT INSERT(\'Quadratic\', 3, 4, \'What\');\n -> \'QuWhattic\'\nMariaDB> SELECT INSERT(\'Quadratic\', -1, 4, \'What\');\n -> \'Quadratic\'\nMariaDB> SELECT INSERT(\'Quadratic\', 3, 100, \'What\');\n -> \'QuWhat\'\n','https://mariadb.com/kb/en/insert-function/'),(196,'CRC32',4,'Syntax:\nCRC32(expr)\n\nComputes a cyclic redundancy check value and returns a 32-bit unsigned\nvalue. The result is NULL if the argument is NULL. The argument is\nexpected to be a string and (if possible) is treated as one if it is\nnot.\n\nURL: https://mariadb.com/kb/en/crc32/\n\n','MariaDB> SELECT CRC32(\'MySQL\');\n -> 3259397556\nMariaDB> SELECT CRC32(\'mysql\');\n -> 2501908538\n','https://mariadb.com/kb/en/crc32/'),(197,'XOR',15,'Syntax:\nXOR\n\nLogical XOR. Returns NULL if either operand is NULL. For non-NULL\noperands, evaluates to 1 if an odd number of operands is nonzero,\notherwise 0 is returned.\n\nURL: https://mariadb.com/kb/en/xor/\n\n','MariaDB> SELECT 1 XOR 1;\n -> 0\nMariaDB> SELECT 1 XOR 0;\n -> 1\nMariaDB> SELECT 1 XOR NULL;\n -> NULL\nMariaDB> SELECT 1 XOR 1 XOR 1;\n -> 1\n','https://mariadb.com/kb/en/xor/'),(198,'STARTPOINT',13,'StartPoint(ls)\n\nReturns the Point that is the start point of the LineString value ls.\n\nURL: https://mariadb.com/kb/en/startpoint/\n\n','MariaDB> SET @ls = \'LineString(1 1,2 2,3 3)\';\nMariaDB> SELECT AsText(StartPoint(GeomFromText(@ls)));\n+---------------------------------------+\n| AsText(StartPoint(GeomFromText(@ls))) |\n+---------------------------------------+\n| POINT(1 1) |\n+---------------------------------------+\n','https://mariadb.com/kb/en/startpoint/'),(199,'GRANT',10,'Syntax:\nGRANT\n priv_type [(column_list)]\n [, priv_type [(column_list)]] ...\n ON [object_type] priv_level\n TO user_specification [, user_specification] ...\n [REQUIRE {NONE | ssl_option [[AND] ssl_option] ...}]\n [WITH with_option ...]\n\nGRANT PROXY ON user_specification\n TO user_specification [, user_specification] ...\n [WITH GRANT OPTION]\n\nobject_type:\n TABLE\n | FUNCTION\n | PROCEDURE\n\npriv_level:\n *\n | *.*\n | db_name.*\n | db_name.tbl_name\n | tbl_name\n | db_name.routine_name\n\nuser_specification:\n user\n [\n IDENTIFIED BY [PASSWORD] \'password\'\n | IDENTIFIED WITH auth_plugin [AS \'auth_string\']\n ]\n\nssl_option:\n SSL\n | X509\n | CIPHER \'cipher\'\n | ISSUER \'issuer\'\n | SUBJECT \'subject\'\n\nwith_option:\n GRANT OPTION\n | MAX_QUERIES_PER_HOUR count\n | MAX_UPDATES_PER_HOUR count\n | MAX_CONNECTIONS_PER_HOUR count\n | MAX_USER_CONNECTIONS count\n\nThe GRANT statement grants privileges to MySQL user accounts. GRANT\nalso serves to specify other account characteristics such as use of\nsecure connections and limits on access to server resources. To use\nGRANT, you must have the GRANT OPTION privilege, and you must have the\nprivileges that you are granting.\n\nNormally, a database administrator first uses CREATE USER to create an\naccount, then GRANT to define its privileges and characteristics. For\nexample:\n\nCREATE USER \'jeffrey\'@\'localhost\' IDENTIFIED BY \'mypass\';\nGRANT ALL ON db1.* TO \'jeffrey\'@\'localhost\';\nGRANT SELECT ON db2.invoice TO \'jeffrey\'@\'localhost\';\nGRANT USAGE ON *.* TO \'jeffrey\'@\'localhost\' WITH MAX_QUERIES_PER_HOUR 90;\n\nHowever, if an account named in a GRANT statement does not already\nexist, GRANT may create it under the conditions described later in the\ndiscussion of the NO_AUTO_CREATE_USER SQL mode.\n\nThe REVOKE statement is related to GRANT and enables administrators to\nremove account privileges. See [HELP REVOKE].\n\nWhen successfully executed from the mysql program, GRANT responds with\nQuery OK, 0 rows affected. To determine what privileges result from the\noperation, use SHOW GRANTS. See [HELP SHOW GRANTS].\n\nURL: https://mariadb.com/kb/en/grant/\n\n','','https://mariadb.com/kb/en/grant/'),(200,'DECLARE VARIABLE',23,'Syntax:\nDECLARE var_name [, var_name] ... type [DEFAULT value]\n\nThis statement declares local variables within stored programs. To\nprovide a default value for a variable, include a DEFAULT clause. The\nvalue can be specified as an expression; it need not be a constant. If\nthe DEFAULT clause is missing, the initial value is NULL.\n\nLocal variables are treated like stored routine parameters with respect\nto data type and overflow checking. See [HELP CREATE PROCEDURE].\n\nVariable declarations must appear before cursor or handler\ndeclarations.\n\nLocal variable names are not case sensitive. Permissible characters and\nquoting rules are the same as for other identifiers, as described in\nhttps://mariadb.com/kb/en/identifier-names/.\n\nThe scope of a local variable is the BEGIN ... END block within which\nit is declared. The variable can be referred to in blocks nested within\nthe declaring block, except those blocks that declare a variable with\nthe same name.\n\nURL: https://mariadb.com/kb/en/declare-variable/\n\n','','https://mariadb.com/kb/en/declare-variable/'),(201,'MPOLYFROMTEXT',3,'MPolyFromText(wkt[,srid]), MultiPolygonFromText(wkt[,srid])\n\nConstructs a MULTIPOLYGON value using its WKT representation and SRID.\n\nURL: https://mariadb.com/kb/en/mpolyfromtext/\n\n','','https://mariadb.com/kb/en/mpolyfromtext/'),(202,'MBRINTERSECTS',6,'MBRIntersects(g1,g2)\n\nReturns 1 or 0 to indicate whether the Minimum Bounding Rectangles of\nthe two geometries g1 and g2 intersect.\n\nURL: https://mariadb.com/kb/en/mbrintersects/\n\n','','https://mariadb.com/kb/en/mbrintersects/'),(203,'BIT_OR',16,'Syntax:\nBIT_OR(expr)\n\nReturns the bitwise OR of all bits in expr. The calculation is\nperformed with 64-bit (BIGINT) precision.\n\nURL: https://mariadb.com/kb/en/bit_or/\n\n','','https://mariadb.com/kb/en/bit_or/'),(204,'YEARWEEK',31,'Syntax:\nYEARWEEK(date), YEARWEEK(date,mode)\n\nReturns year and week for a date. The mode argument works exactly like\nthe mode argument to WEEK(). The year in the result may be different\nfrom the year in the date argument for the first and the last week of\nthe year.\n\nURL: https://mariadb.com/kb/en/yearweek/\n\n','MariaDB> SELECT YEARWEEK(\'1987-01-01\');\n -> 198653\n','https://mariadb.com/kb/en/yearweek/'),(205,'NOT BETWEEN',18,'Syntax:\nexpr NOT BETWEEN min AND max\n\nThis is the same as NOT (expr BETWEEN min AND max).\n\nURL: https://mariadb.com/kb/en/not-between/\n\n','','https://mariadb.com/kb/en/not-between/'),(206,'IS NOT',18,'Syntax:\nIS NOT boolean_value\n\nTests a value against a boolean value, where boolean_value can be TRUE,\nFALSE, or UNKNOWN.\n\nURL: https://mariadb.com/kb/en/is-not/\n\n','MariaDB> SELECT 1 IS NOT UNKNOWN, 0 IS NOT UNKNOWN, NULL IS NOT UNKNOWN;\n -> 1, 1, 0\n','https://mariadb.com/kb/en/is-not/'),(207,'LOG10',4,'Syntax:\nLOG10(X)\n\nReturns the base-10 logarithm of X.\n\nURL: https://mariadb.com/kb/en/log10/\n\n','MariaDB> SELECT LOG10(2);\n -> 0.30102999566398\nMariaDB> SELECT LOG10(100);\n -> 2\nMariaDB> SELECT LOG10(-100);\n -> NULL\n','https://mariadb.com/kb/en/log10/'),(208,'SQRT',4,'Syntax:\nSQRT(X)\n\nReturns the square root of a nonnegative number X.\n\nURL: https://mariadb.com/kb/en/sqrt/\n\n','MariaDB> SELECT SQRT(4);\n -> 2\nMariaDB> SELECT SQRT(20);\n -> 4.4721359549996\nMariaDB> SELECT SQRT(-16);\n -> NULL\n','https://mariadb.com/kb/en/sqrt/'),(209,'DECIMAL',22,'DECIMAL[(M[,D])] [UNSIGNED] [ZEROFILL]\n\nA packed \"exact\" fixed-point number. M is the total number of digits\n(the precision) and D is the number of digits after the decimal point\n(the scale). The decimal point and (for negative numbers) the \"-\" sign\nare not counted in M. If D is 0, values have no decimal point or\nfractional part. The maximum number of digits (M) for DECIMAL is 65.\nThe maximum number of supported decimals (D) is 30. If D is omitted,\nthe default is 0. If M is omitted, the default is 10.\n\nUNSIGNED, if specified, disallows negative values.\n\nAll basic calculations (+, -, *, /) with DECIMAL columns are done with\na precision of 65 digits.\n\nURL: https://mariadb.com/kb/en/decimal/\n\n','','https://mariadb.com/kb/en/decimal/'),(210,'CREATE INDEX',39,'Syntax:\nCREATE [ONLINE|OFFLINE] [UNIQUE|FULLTEXT|SPATIAL] INDEX index_name\n [index_type]\n ON tbl_name (index_col_name,...)\n [index_option] ...\n\nindex_col_name:\n col_name [(length)] [ASC | DESC]\n\nindex_type:\n USING {BTREE | HASH}\n\nindex_option:\n KEY_BLOCK_SIZE [=] value\n | index_type\n | WITH PARSER parser_name\n | COMMENT \'string\'\n\nCREATE INDEX is mapped to an ALTER TABLE statement to create indexes.\nSee [HELP ALTER TABLE]. CREATE INDEX cannot be used to create a PRIMARY\nKEY; use ALTER TABLE instead. For more information about indexes, see\nhttps://mariadb.com/kb/en/optimization-and-indexes/.\n\nURL: https://mariadb.com/kb/en/create-index/\n\n','','https://mariadb.com/kb/en/create-index/'),(211,'CREATE FUNCTION',39,'The CREATE FUNCTION statement is used to create stored functions and\nuser-defined functions (UDFs):\n\no For information about creating stored functions, see [HELP CREATE\n PROCEDURE].\n\no For information about creating user-defined functions, see [HELP\n CREATE FUNCTION UDF].\n\nURL: https://mariadb.com/kb/en/create-function/\n\n','','https://mariadb.com/kb/en/create-function/'),(212,'ALTER DATABASE',39,'Syntax:\nALTER {DATABASE | SCHEMA} [db_name]\n alter_specification ...\nALTER {DATABASE | SCHEMA} db_name\n UPGRADE DATA DIRECTORY NAME\n\nalter_specification:\n [DEFAULT] CHARACTER SET [=] charset_name\n | [DEFAULT] COLLATE [=] collation_name\n\nALTER DATABASE enables you to change the overall characteristics of a\ndatabase. These characteristics are stored in the db.opt file in the\ndatabase directory. To use ALTER DATABASE, you need the ALTER privilege\non the database. ALTER SCHEMA is a synonym for ALTER DATABASE.\n\nThe database name can be omitted from the first syntax, in which case\nthe statement applies to the default database.\n\nNational Language Characteristics\n\nThe CHARACTER SET clause changes the default database character set.\nThe COLLATE clause changes the default database collation.\nhttps://mariadb.com/kb/en/data-types-character-sets-and-collations/, discusses\ncharacter set and collation names.\n\nYou can see what character sets and collations are available using,\nrespectively, the SHOW CHARACTER SET and SHOW COLLATION statements. See\n[HELP SHOW CHARACTER SET], and [HELP SHOW COLLATION], for more\ninformation.\n\nIf you change the default character set or collation for a database,\nstored routines that use the database defaults must be dropped and\nrecreated so that they use the new defaults. (In a stored routine,\nvariables with character data types use the database defaults if the\ncharacter set or collation are not specified explicitly. See [HELP\nCREATE PROCEDURE].)\n\nUpgrading from Versions Older than MySQL 5.1\n\nThe syntax that includes the UPGRADE DATA DIRECTORY NAME clause updates\nthe name of the directory associated with the database to use the\nencoding implemented in MySQL 5.1 for mapping database names to\ndatabase directory names (see\nhttps://mariadb.com/kb/en/identifier-to-file-name-mapping/). This\nclause is for use under these conditions:\n\no It is intended when upgrading MySQL to 5.1 or later from older\n versions.\n\no It is intended to update a database directory name to the current\n encoding format if the name contains special characters that need\n encoding.\n\no The statement is used by mysqlcheck (as invoked by mysql_upgrade).\n\nFor example, if a database in MySQL 5.0 has the name a-b-c, the name\ncontains instances of the - (dash) character. In MySQL 5.0, the\ndatabase directory is also named a-b-c, which is not necessarily safe\nfor all file systems. In MySQL 5.1 and later, the same database name is\nencoded as a@002db@002dc to produce a file system-neutral directory\nname.\n\nWhen a MySQL installation is upgraded to MySQL 5.1 or later from an\nolder version,the server displays a name such as a-b-c (which is in the\nold format) as #mysql50#a-b-c, and you must refer to the name using the\n#mysql50# prefix. Use UPGRADE DATA DIRECTORY NAME in this case to\nexplicitly tell the server to re-encode the database directory name to\nthe current encoding format:\n\nALTER DATABASE `#mysql50#a-b-c` UPGRADE DATA DIRECTORY NAME;\n\nAfter executing this statement, you can refer to the database as a-b-c\nwithout the special #mysql50# prefix.\n\nURL: https://mariadb.com/kb/en/alter-database/\n\n','','https://mariadb.com/kb/en/alter-database/'),(213,'GEOMETRYN',25,'GeometryN(gc,N)\n\nReturns the N-th geometry in the GeometryCollection value gc.\nGeometries are numbered beginning with 1.\n\nURL: https://mariadb.com/kb/en/geometryn/\n\n','MariaDB> SET @gc = \'GeometryCollection(Point(1 1),LineString(2 2, 3 3))\';\nMariaDB> SELECT AsText(GeometryN(GeomFromText(@gc),1));\n+----------------------------------------+\n| AsText(GeometryN(GeomFromText(@gc),1)) |\n+----------------------------------------+\n| POINT(1 1) |\n+----------------------------------------+\n','https://mariadb.com/kb/en/geometryn/'),(214,'<<',19,'Syntax:\n<<\n\nShifts a longlong (BIGINT) number to the left.\n\nURL: https://mariadb.com/kb/en/shift-left/\n\n','MariaDB> SELECT 1 << 2;\n -> 4\n','https://mariadb.com/kb/en/shift-left/'),(215,'SHOW TABLE STATUS',26,'Syntax:\nSHOW TABLE STATUS [{FROM | IN} db_name]\n [LIKE \'pattern\' | WHERE expr]\n\nSHOW TABLE STATUS works likes SHOW TABLES, but provides a lot of\ninformation about each non-TEMPORARY table. You can also get this list\nusing the mysqlshow --status db_name command. The LIKE clause, if\npresent, indicates which table names to match. The WHERE clause can be\ngiven to select rows using more general conditions, as discussed in\nhttps://mariadb.com/kb/en/extended-show/.\n\nURL: https://mariadb.com/kb/en/show-table-status/\n\n','','https://mariadb.com/kb/en/show-table-status/'),(216,'MD5',12,'Syntax:\nMD5(str)\n\nCalculates an MD5 128-bit checksum for the string. The value is\nreturned as a string of 32 hex digits, or NULL if the argument was\nNULL. The return value can, for example, be used as a hash key. See the\nnotes at the beginning of this section about storing hash values\nefficiently.\n\nAs of MySQL 5.5.3, the return value is a nonbinary string in the\nconnection character set. Before 5.5.3, the return value is a binary\nstring; see the notes at the beginning of this section about using the\nvalue as a nonbinary string.\n\nURL: https://mariadb.com/kb/en/md5/\n\n','MariaDB> SELECT MD5(\'testing\');\n -> \'ae2b1fca515949e5d54fb22b8ed95575\'\n','https://mariadb.com/kb/en/md5/'),(217,'<',18,'Syntax:\n<\n\nLess than:\n\nURL: https://mariadb.com/kb/en/less-than/\n\n','MariaDB> SELECT 2 < 2;\n -> 0\n','https://mariadb.com/kb/en/less-than/'),(218,'UNIX_TIMESTAMP',31,'Syntax:\nUNIX_TIMESTAMP(), UNIX_TIMESTAMP(date)\n\nIf called with no argument, returns a Unix timestamp (seconds since\n\'1970-01-01 00:00:00\' UTC) as an unsigned integer. If UNIX_TIMESTAMP()\nis called with a date argument, it returns the value of the argument as\nseconds since \'1970-01-01 00:00:00\' UTC. date may be a DATE string, a\nDATETIME string, a TIMESTAMP, or a number in the format YYMMDD or\nYYYYMMDD. The server interprets date as a value in the current time\nzone and converts it to an internal value in UTC. Clients can set their\ntime zone as described in\nhttps://mariadb.com/kb/en/time-zones/.\n\nURL: https://mariadb.com/kb/en/unix_timestamp/\n\n','MariaDB> SELECT UNIX_TIMESTAMP();\n -> 1196440210\nMariaDB> SELECT UNIX_TIMESTAMP(\'2007-11-30 10:30:19\');\n -> 1196440219\n','https://mariadb.com/kb/en/unix_timestamp/'),(219,'DAYOFMONTH',31,'Syntax:\nDAYOFMONTH(date)\n\nReturns the day of the month for date, in the range 1 to 31, or 0 for\ndates such as \'0000-00-00\' or \'2008-00-00\' that have a zero day part.\n\nURL: https://mariadb.com/kb/en/dayofmonth/\n\n','MariaDB> SELECT DAYOFMONTH(\'2007-02-03\');\n -> 3\n','https://mariadb.com/kb/en/dayofmonth/'),(220,'ASCII',37,'Syntax:\nASCII(str)\n\nReturns the numeric value of the leftmost character of the string str.\nReturns 0 if str is the empty string. Returns NULL if str is NULL.\nASCII() works for 8-bit characters.\n\nURL: https://mariadb.com/kb/en/ascii/\n\n','MariaDB> SELECT ASCII(\'2\');\n -> 50\nMariaDB> SELECT ASCII(2);\n -> 50\nMariaDB> SELECT ASCII(\'dx\');\n -> 100\n','https://mariadb.com/kb/en/ascii/'),(221,'DIV',4,'Syntax:\nDIV\n\nInteger division. Similar to FLOOR(), but is safe with BIGINT values.\n\nAs of MySQL 5.5.3, if either operand has a noninteger type, the\noperands are converted to DECIMAL and divided using DECIMAL arithmetic\nbefore converting the result to BIGINT. If the result exceeds BIGINT\nrange, an error occurs. Before MySQL 5.5.3, incorrect results may occur\nfor noninteger operands that exceed BIGINT range.\n\nURL: https://mariadb.com/kb/en/div/\n\n','MariaDB> SELECT 5 DIV 2;\n -> 2\n','https://mariadb.com/kb/en/div/'),(222,'RENAME USER',10,'Syntax:\nRENAME USER old_user TO new_user\n [, old_user TO new_user] ...\n\nThe RENAME USER statement renames existing MySQL accounts. To use it,\nyou must have the global CREATE USER privilege or the UPDATE privilege\nfor the mysql database. An error occurs if any old account does not\nexist or any new account exists. Each account name uses the format\ndescribed in https://mariadb.com/kb/en/create-user/#account-names.\nFor example:\n\nRENAME USER \'jeffrey\'@\'localhost\' TO \'jeff\'@\'127.0.0.1\';\n\nIf you specify only the user name part of the account name, a host name\npart of \'%\' is used.\n\nRENAME USER causes the privileges held by the old user to be those held\nby the new user. However, RENAME USER does not automatically drop or\ninvalidate databases or objects within them that the old user created.\nThis includes stored programs or views for which the DEFINER attribute\nnames the old user. Attempts to access such objects may produce an\nerror if they execute in definer security context. (For information\nabout security context, see\nhttps://mariadb.com/kb/en/stored-routine-privileges/.)\n\nThe privilege changes take effect as indicated in\nhttp://dev.mysql.com/doc/refman/5.5/en/privilege-changes.html.\n\nURL: https://mariadb.com/kb/en/rename-user/\n\n','','https://mariadb.com/kb/en/rename-user/'),(223,'SHOW SLAVE STATUS',26,'Syntax:\nSHOW SLAVE STATUS\n\nThis statement provides status information on essential parameters of\nthe slave threads. It requires either the SUPER or REPLICATION CLIENT\nprivilege.\n\nIf you issue this statement using the mysql client, you can use a \\G\nstatement terminator rather than a semicolon to obtain a more readable\nvertical layout:\n\nMariaDB> SHOW SLAVE STATUS\\G\n*************************** 1. row ***************************\n Slave_IO_State: Waiting for master to send event\n Master_Host: localhost\n Master_User: root\n Master_Port: 3306\n Connect_Retry: 3\n Master_Log_File: gbichot-bin.005\n Read_Master_Log_Pos: 79\n Relay_Log_File: gbichot-relay-bin.005\n Relay_Log_Pos: 548\n Relay_Master_Log_File: gbichot-bin.005\n Slave_IO_Running: Yes\n Slave_SQL_Running: Yes\n Replicate_Do_DB:\n Replicate_Ignore_DB:\n Replicate_Do_Table:\n Replicate_Ignore_Table:\n Replicate_Wild_Do_Table:\n Replicate_Wild_Ignore_Table:\n Last_Errno: 0\n Last_Error:\n Skip_Counter: 0\n Exec_Master_Log_Pos: 79\n Relay_Log_Space: 552\n Until_Condition: None\n Until_Log_File:\n Until_Log_Pos: 0\n Master_SSL_Allowed: No\n Master_SSL_CA_File:\n Master_SSL_CA_Path:\n Master_SSL_Cert:\n Master_SSL_Cipher:\n Master_SSL_Key:\n Seconds_Behind_Master: 8\nMaster_SSL_Verify_Server_Cert: No\n Last_IO_Errno: 0\n Last_IO_Error:\n Last_SQL_Errno: 0\n Last_SQL_Error:\n Replicate_Ignore_Server_Ids: 0\n Master_Server_Id: 1\n\nURL: https://mariadb.com/kb/en/show-slave-status/\n\n','','https://mariadb.com/kb/en/show-slave-status/'),(224,'GEOMETRY',34,'MySQL provides a standard way of creating spatial columns for geometry\ntypes, for example, with CREATE TABLE or ALTER TABLE. Currently,\nspatial columns are supported for MyISAM, Aria, InnoDB and ARCHIVE\ntables. See also the annotations about spatial indexes under [HELP\nSPATIAL].\n\nURL: https://mariadb.com/kb/en/gis-functionality/\n\n','CREATE TABLE geom (g GEOMETRY);\n','https://mariadb.com/kb/en/gis-functionality/'),(225,'NUMPOINTS',13,'NumPoints(ls)\n\nReturns the number of Point objects in the LineString value ls.\n\nURL: https://mariadb.com/kb/en/numpoints/\n\n','MariaDB> SET @ls = \'LineString(1 1,2 2,3 3)\';\nMariaDB> SELECT NumPoints(GeomFromText(@ls));\n+------------------------------+\n| NumPoints(GeomFromText(@ls)) |\n+------------------------------+\n| 3 |\n+------------------------------+\n','https://mariadb.com/kb/en/numpoints/'),(226,'ALTER LOGFILE GROUP',39,'Syntax:\nALTER LOGFILE GROUP logfile_group\n ADD UNDOFILE \'file_name\'\n [INITIAL_SIZE [=] size]\n [WAIT]\n ENGINE [=] engine_name\n\nThis statement is used with NDB cluster, which is not supported by MariaDB.\n','','https://mariadb.com/kb/en/alter-logfile-group/'),(227,'&',19,'Syntax:\n&\n\nBitwise AND:\n\nURL: https://mariadb.com/kb/en/bitwise_and/\n\n','MariaDB> SELECT 29 & 15;\n -> 13\n','https://mariadb.com/kb/en/bitwise_and/'),(228,'LOCALTIMESTAMP',31,'Syntax:\nLOCALTIMESTAMP, LOCALTIMESTAMP()\n\nLOCALTIMESTAMP and LOCALTIMESTAMP() are synonyms for NOW().\n\nURL: https://mariadb.com/kb/en/localtimestamp/\n\n','','https://mariadb.com/kb/en/localtimestamp/'),(229,'ASSIGN-EQUAL',15,'Syntax:\n=\n\nThis operator is used to perform value assignments in two cases,\ndescribed in the next two paragraphs.\n\nWithin a SET statement, = is treated as an assignment operator that\ncauses the user variable on the left hand side of the operator to take\non the value to its right. (In other words, when used in a SET\nstatement, = is treated identically to :=.) The value on the right hand\nside may be a literal value, another variable storing a value, or any\nlegal expression that yields a scalar value, including the result of a\nquery (provided that this value is a scalar value). You can perform\nmultiple assignments in the same SET statement.\n\nIn the SET clause of an UPDATE statement, = also acts as an assignment\noperator; in this case, however, it causes the column named on the left\nhand side of the operator to assume the value given to the right,\nprovided any WHERE conditions that are part of the UPDATE are met. You\ncan make multiple assignments in the same SET clause of an UPDATE\nstatement.\n\nIn any other context, = is treated as a comparison operator.\n\nURL: https://mariadb.com/kb/en/assignment-operators-assignment-operator/\n\n','MariaDB> SELECT @var1, @var2;\n -> NULL, NULL\nMariaDB> SELECT @var1 := 1, @var2;\n -> 1, NULL\nMariaDB> SELECT @var1, @var2;\n -> 1, NULL\nMariaDB> SELECT @var1, @var2 := @var1;\n -> 1, 1\nMariaDB> SELECT @var1, @var2;\n -> 1, 1\n','https://mariadb.com/kb/en/assignment-operators-assignment-operator/'),(230,'CONVERT',37,'Syntax:\nCONVERT(expr,type), CONVERT(expr USING transcoding_name)\n\nThe CONVERT() and CAST() functions take an expression of any type and\nproduce a result value of a specified type.\n\nThe type for the result can be one of the following values:\n\no BINARY[(N)]\n\no CHAR[(N)]\n\no DATE\n\no DATETIME\n\no DECIMAL[(M[,D])]\n\no SIGNED [INTEGER]\n\no TIME\n\no UNSIGNED [INTEGER]\n\nBINARY produces a string with the BINARY data type. See\nhttps://mariadb.com/kb/en/binary/ for a\ndescription of how this affects comparisons. If the optional length N\nis given, BINARY(N) causes the cast to use no more than N bytes of the\nargument. Values shorter than N bytes are padded with 0x00 bytes to a\nlength of N.\n\nCHAR(N) causes the cast to use no more than N characters of the\nargument.\n\nCAST() and CONVERT(... USING ...) are standard SQL syntax. The\nnon-USING form of CONVERT() is ODBC syntax.\n\nCONVERT() with USING is used to convert data between different\ncharacter sets. In MySQL, transcoding names are the same as the\ncorresponding character set names. For example, this statement converts\nthe string \'abc\' in the default character set to the corresponding\nstring in the utf8 character set:\n\nSELECT CONVERT(\'abc\' USING utf8);\n\nURL: https://mariadb.com/kb/en/convert/\n\n','SELECT enum_col FROM tbl_name ORDER BY CAST(enum_col AS CHAR);\n','https://mariadb.com/kb/en/convert/'),(231,'ADDDATE',31,'Syntax:\nADDDATE(date,INTERVAL expr unit), ADDDATE(expr,days)\n\nWhen invoked with the INTERVAL form of the second argument, ADDDATE()\nis a synonym for DATE_ADD(). The related function SUBDATE() is a\nsynonym for DATE_SUB(). For information on the INTERVAL unit argument,\nsee the discussion for DATE_ADD().\n\nMariaDB> SELECT DATE_ADD(\'2008-01-02\', INTERVAL 31 DAY);\n -> \'2008-02-02\'\nMariaDB> SELECT ADDDATE(\'2008-01-02\', INTERVAL 31 DAY);\n -> \'2008-02-02\'\n\nWhen invoked with the days form of the second argument, MySQL treats it\nas an integer number of days to be added to expr.\n\nURL: https://mariadb.com/kb/en/adddate/\n\n','MariaDB> SELECT ADDDATE(\'2008-01-02\', 31);\n -> \'2008-02-02\'\n','https://mariadb.com/kb/en/adddate/'),(232,'REPEAT LOOP',23,'Syntax:\n[begin_label:] REPEAT\n statement_list\nUNTIL search_condition\nEND REPEAT [end_label]\n\nThe statement list within a REPEAT statement is repeated until the\nsearch_condition expression is true. Thus, a REPEAT always enters the\nloop at least once. statement_list consists of one or more statements,\neach terminated by a semicolon (;) statement delimiter.\n\nA REPEAT statement can be labeled. For the rules regarding label use,\nsee [HELP labels].\n\nURL: https://mariadb.com/kb/en/repeat-loop/\n\n','MariaDB> delimiter //\n\nMariaDB> CREATE PROCEDURE dorepeat(p1 INT)\n -> BEGIN\n -> SET @x = 0;\n -> REPEAT\n -> SET @x = @x + 1;\n -> UNTIL @x > p1 END REPEAT;\n -> END\n -> //\nQuery OK, 0 rows affected (0.00 sec)\n\nMariaDB> CALL dorepeat(1000)//\nQuery OK, 0 rows affected (0.00 sec)\n\nMariaDB> SELECT @x//\n+------+\n| @x |\n+------+\n| 1001 |\n+------+\n1 row in set (0.00 sec)\n','https://mariadb.com/kb/en/repeat-loop/'),(233,'ALTER FUNCTION',39,'Syntax:\nALTER FUNCTION func_name [characteristic ...]\n\ncharacteristic:\n COMMENT \'string\'\n | LANGUAGE SQL\n | { CONTAINS SQL | NO SQL | READS SQL DATA | MODIFIES SQL DATA }\n | SQL SECURITY { DEFINER | INVOKER }\n\nThis statement can be used to change the characteristics of a stored\nfunction. More than one change may be specified in an ALTER FUNCTION\nstatement. However, you cannot change the parameters or body of a\nstored function using this statement; to make such changes, you must\ndrop and re-create the function using DROP FUNCTION and CREATE\nFUNCTION.\n\nYou must have the ALTER ROUTINE privilege for the function. (That\nprivilege is granted automatically to the function creator.) If binary\nlogging is enabled, the ALTER FUNCTION statement might also require the\nSUPER privilege, as described in\nhttps://mariadb.com/kb/en/binary-logging-of-stored-routines/.\n\nURL: https://mariadb.com/kb/en/alter-function/\n\n','','https://mariadb.com/kb/en/alter-function/'),(234,'SMALLINT',22,'SMALLINT[(M)] [UNSIGNED] [ZEROFILL]\n\nA small integer. The signed range is -32768 to 32767. The unsigned\nrange is 0 to 65535.\n\nURL: https://mariadb.com/kb/en/smallint/\n\n','','https://mariadb.com/kb/en/smallint/'),(235,'DOUBLE PRECISION',22,'DOUBLE PRECISION[(M,D)] [UNSIGNED] [ZEROFILL], REAL[(M,D)] [UNSIGNED]\n[ZEROFILL]\n\nThese types are synonyms for DOUBLE. Exception: If the REAL_AS_FLOAT\nSQL mode is enabled, REAL is a synonym for FLOAT rather than DOUBLE.\n\nURL: https://mariadb.com/kb/en/double-precision/\n\n','','https://mariadb.com/kb/en/double-precision/'),(236,'ORD',37,'Syntax:\nORD(str)\n\nIf the leftmost character of the string str is a multi-byte character,\nreturns the code for that character, calculated from the numeric values\nof its constituent bytes using this formula:\n\n (1st byte code)\n+ (2nd byte code * 256)\n+ (3rd byte code * 2562) ...\n\nIf the leftmost character is not a multi-byte character, ORD() returns\nthe same value as the ASCII() function.\n\nURL: https://mariadb.com/kb/en/ord/\n\n','MariaDB> SELECT ORD(\'2\');\n -> 50\n','https://mariadb.com/kb/en/ord/'),(237,'DEALLOCATE PREPARE',8,'Syntax:\n{DEALLOCATE | DROP} PREPARE stmt_name\n\nTo deallocate a prepared statement produced with PREPARE, use a\nDEALLOCATE PREPARE statement that refers to the prepared statement\nname. Attempting to execute a prepared statement after deallocating it\nresults in an error.\n\nURL: https://mariadb.com/kb/en/deallocate-drop-prepared-statement/\n\n','','https://mariadb.com/kb/en/deallocate-drop-prepared-statement/'),(238,'ENVELOPE',36,'Envelope(g)\n\nReturns the Minimum Bounding Rectangle (MBR) for the geometry value g.\nThe result is returned as a Polygon value.\n\nThe polygon is defined by the corner points of the bounding box:\n\nPOLYGON((MINX MINY, MAXX MINY, MAXX MAXY, MINX MAXY, MINX MINY))\n\nURL: https://mariadb.com/kb/en/envelope/\n\n','MariaDB> SELECT AsText(Envelope(GeomFromText(\'LineString(1 1,2 2)\')));\n+-------------------------------------------------------+\n| AsText(Envelope(GeomFromText(\'LineString(1 1,2 2)\'))) |\n+-------------------------------------------------------+\n| POLYGON((1 1,2 1,2 2,1 2,1 1)) |\n+-------------------------------------------------------+\n','https://mariadb.com/kb/en/envelope/'),(239,'IS_FREE_LOCK',14,'Syntax:\nIS_FREE_LOCK(str)\n\nChecks whether the lock named str is free to use (that is, not locked).\nReturns 1 if the lock is free (no one is using the lock), 0 if the lock\nis in use, and NULL if an error occurs (such as an incorrect argument).\n\nURL: https://mariadb.com/kb/en/is_free_lock/\n\n','','https://mariadb.com/kb/en/is_free_lock/'),(240,'TOUCHES',30,'Touches(g1,g2)\n\nReturns 1 or 0 to indicate whether g1 spatially touches g2. Two\ngeometries spatially touch if the interiors of the geometries do not\nintersect, but the boundary of one of the geometries intersects either\nthe boundary or the interior of the other.\n\nURL: https://mariadb.com/kb/en/touches/\n\n','','https://mariadb.com/kb/en/touches/'),(241,'INET_ATON',14,'Syntax:\nINET_ATON(expr)\n\nGiven the dotted-quad representation of an IPv4 network address as a\nstring, returns an integer that represents the numeric value of the\naddress in network byte order (big endian). INET_ATON() returns NULL if\nit does not understand its argument.\n\nURL: https://mariadb.com/kb/en/inet_aton/\n\n','MariaDB> SELECT INET_ATON(\'10.0.5.9\');\n -> 167773449\n','https://mariadb.com/kb/en/inet_aton/'),(242,'UNCOMPRESS',12,'Syntax:\nUNCOMPRESS(string_to_uncompress)\n\nUncompresses a string compressed by the COMPRESS() function. If the\nargument is not a compressed value, the result is NULL. This function\nrequires MySQL to have been compiled with a compression library such as\nzlib. Otherwise, the return value is always NULL.\n\nURL: https://mariadb.com/kb/en/uncompress/\n\n','MariaDB> SELECT UNCOMPRESS(COMPRESS(\'any string\'));\n -> \'any string\'\nMariaDB> SELECT UNCOMPRESS(\'any string\');\n -> NULL\n','https://mariadb.com/kb/en/uncompress/'),(243,'AUTO_INCREMENT',22,'The AUTO_INCREMENT attribute can be used to generate a unique identity\nfor new rows:\n\nURL: https://mariadb.com/kb/en/auto_increment/\n\n','CREATE TABLE animals (\n id MEDIUMINT NOT NULL AUTO_INCREMENT,\n name CHAR(30) NOT NULL,\n PRIMARY KEY (id)\n);\n\nINSERT INTO animals (name) VALUES\n (\'dog\'),(\'cat\'),(\'penguin\'),\n (\'lax\'),(\'whale\'),(\'ostrich\');\n\nSELECT * FROM animals;\n','https://mariadb.com/kb/en/auto_increment/'),(244,'ISSIMPLE',36,'IsSimple(g)\n\nCurrently, this function is a placeholder and should not be used. If\nimplemented, its behavior will be as described in the next paragraph.\n\nReturns 1 if the geometry value g has no anomalous geometric points,\nsuch as self-intersection or self-tangency. IsSimple() returns 0 if the\nargument is not simple, and -1 if it is NULL.\n\nThe description of each instantiable geometric class given earlier in\nthe chapter includes the specific conditions that cause an instance of\nthat class to be classified as not simple. (See [HELP Geometry\nhierarchy].)\n\nURL: https://mariadb.com/kb/en/issimple/\n\n','','https://mariadb.com/kb/en/issimple/'),(245,'- BINARY',4,'Syntax:\n-\n\nSubtraction:\n\nURL: https://mariadb.com/kb/en/subtraction-operator-/\n\n','MariaDB> SELECT 3-5;\n -> -2\n','https://mariadb.com/kb/en/subtraction-operator-/'),(246,'GEOMCOLLFROMTEXT',3,'GeomCollFromText(wkt[,srid]), GeometryCollectionFromText(wkt[,srid])\n\nConstructs a GEOMETRYCOLLECTION value using its WKT representation and\nSRID.\n\nURL: https://mariadb.com/kb/en/geomcollfromtext/\n\n','','https://mariadb.com/kb/en/geomcollfromtext/'),(247,'WKT DEFINITION',3,'The Well-Known Text (WKT) representation of Geometry is designed to\nexchange geometry data in ASCII form. For a Backus-Naur grammar that\nspecifies the formal production rules for writing WKT values, see the\nOpenGIS specification document referenced in\nhttps://mariadb.com/kb/en/gis-resources/.\n\nURL: https://mariadb.com/kb/en/wkt-definition/\n\n','','https://mariadb.com/kb/en/wkt-definition/'),(248,'CURRENT_TIME',31,'Syntax:\nCURRENT_TIME, CURRENT_TIME()\n\nCURRENT_TIME and CURRENT_TIME() are synonyms for CURTIME().\n\nURL: https://mariadb.com/kb/en/current_time/\n\n','','https://mariadb.com/kb/en/current_time/'),(249,'REVOKE',10,'Syntax:\nREVOKE\n priv_type [(column_list)]\n [, priv_type [(column_list)]] ...\n ON [object_type] priv_level\n FROM user [, user] ...\n\nREVOKE ALL PRIVILEGES, GRANT OPTION\n FROM user [, user] ...\n\nREVOKE PROXY ON user\n FROM user [, user] ...\n\nThe REVOKE statement enables system administrators to revoke privileges\nfrom MySQL accounts. Each account name uses the format described in\nhttps://mariadb.com/kb/en/create-user#account-names. For example:\n\nREVOKE INSERT ON *.* FROM \'jeffrey\'@\'localhost\';\n\nIf you specify only the user name part of the account name, a host name\npart of \'%\' is used.\n\nFor details on the levels at which privileges exist, the permissible\npriv_type and priv_level values, and the syntax for specifying users\nand passwords, see [HELP GRANT]\n\nTo use the first REVOKE syntax, you must have the GRANT OPTION\nprivilege, and you must have the privileges that you are revoking.\n\nTo revoke all privileges, use the second syntax, which drops all\nglobal, database, table, column, and routine privileges for the named\nuser or users:\n\nREVOKE ALL PRIVILEGES, GRANT OPTION FROM user [, user] ...\n\nTo use this REVOKE syntax, you must have the global CREATE USER\nprivilege or the UPDATE privilege for the mysql database.\n\nURL: https://mariadb.com/kb/en/revoke/\n\n','','https://mariadb.com/kb/en/revoke/'),(250,'LAST_INSERT_ID',17,'Syntax:\nLAST_INSERT_ID(), LAST_INSERT_ID(expr)\n\nLAST_INSERT_ID() (with no argument) returns a BIGINT (64-bit) value\nrepresenting the first automatically generated value successfully\ninserted for an AUTO_INCREMENT column as a result of the most recently\nexecuted INSERT statement. The value of LAST_INSERT_ID() remains\nunchanged if no rows are successfully inserted.\n\nFor example, after inserting a row that generates an AUTO_INCREMENT\nvalue, you can get the value like this:\n\nMariaDB> SELECT LAST_INSERT_ID();\n -> 195\n\nThe currently executing statement does not affect the value of\nLAST_INSERT_ID(). Suppose that you generate an AUTO_INCREMENT value\nwith one statement, and then refer to LAST_INSERT_ID() in a\nmultiple-row INSERT statement that inserts rows into a table with its\nown AUTO_INCREMENT column. The value of LAST_INSERT_ID() will remain\nstable in the second statement; its value for the second and later rows\nis not affected by the earlier row insertions. (However, if you mix\nreferences to LAST_INSERT_ID() and LAST_INSERT_ID(expr), the effect is\nundefined.)\n\nIf the previous statement returned an error, the value of\nLAST_INSERT_ID() is undefined. For transactional tables, if the\nstatement is rolled back due to an error, the value of LAST_INSERT_ID()\nis left undefined. For manual ROLLBACK, the value of LAST_INSERT_ID()\nis not restored to that before the transaction; it remains as it was at\nthe point of the ROLLBACK.\n\nWithin the body of a stored routine (procedure or function) or a\ntrigger, the value of LAST_INSERT_ID() changes the same way as for\nstatements executed outside the body of these kinds of objects. The\neffect of a stored routine or trigger upon the value of\nLAST_INSERT_ID() that is seen by following statements depends on the\nkind of routine:\n\no If a stored procedure executes statements that change the value of\n LAST_INSERT_ID(), the changed value is seen by statements that follow\n the procedure call.\n\no For stored functions and triggers that change the value, the value is\n restored when the function or trigger ends, so following statements\n will not see a changed value.\n\nURL: https://mariadb.com/kb/en/last_insert_id/\n\n','','https://mariadb.com/kb/en/last_insert_id/'),(251,'LAST_DAY',31,'Syntax:\nLAST_DAY(date)\n\nTakes a date or datetime value and returns the corresponding value for\nthe last day of the month. Returns NULL if the argument is invalid.\n\nURL: https://mariadb.com/kb/en/last_day/\n\n','MariaDB> SELECT LAST_DAY(\'2003-02-05\');\n -> \'2003-02-28\'\nMariaDB> SELECT LAST_DAY(\'2004-02-05\');\n -> \'2004-02-29\'\nMariaDB> SELECT LAST_DAY(\'2004-01-01 01:01:01\');\n -> \'2004-01-31\'\nMariaDB> SELECT LAST_DAY(\'2003-03-32\');\n -> NULL\n','https://mariadb.com/kb/en/last_day/'),(252,'MEDIUMINT',22,'MEDIUMINT[(M)] [UNSIGNED] [ZEROFILL]\n\nA medium-sized integer. The signed range is -8388608 to 8388607. The\nunsigned range is 0 to 16777215.\n\nURL: https://mariadb.com/kb/en/mediumint/\n\n','','https://mariadb.com/kb/en/mediumint/'),(253,'FLOOR',4,'Syntax:\nFLOOR(X)\n\nReturns the largest integer value not greater than X.\n\nURL: https://mariadb.com/kb/en/floor/\n\n','MariaDB> SELECT FLOOR(1.23);\n -> 1\nMariaDB> SELECT FLOOR(-1.23);\n -> -2\n','https://mariadb.com/kb/en/floor/'),(254,'RTRIM',37,'Syntax:\nRTRIM(str)\n\nReturns the string str with trailing space characters removed.\n\nURL: https://mariadb.com/kb/en/rtrim/\n\n','MariaDB> SELECT RTRIM(\'barbar \');\n -> \'barbar\'\n','https://mariadb.com/kb/en/rtrim/'),(255,'EXPLAIN',28,'Syntax:\nEXPLAIN [explain_type] SELECT select_options\n\nexplain_type:\n EXTENDED\n | PARTITIONS\n\nOr:\n\nEXPLAIN tbl_name\n\nThe EXPLAIN statement can be used either as a way to obtain information\nabout how MySQL executes a statement, or as a synonym for DESCRIBE:\n\no When you precede a SELECT statement with the keyword EXPLAIN, MySQL\n displays information from the optimizer about the query execution\n plan. That is, MySQL explains how it would process the statement,\n including information about how tables are joined and in which order.\n EXPLAIN EXTENDED can be used to obtain additional information.\n\n For information about using EXPLAIN and EXPLAIN EXTENDED to obtain\n query execution plan information, see\n https://mariadb.com/kb/en/explain/.\n\no EXPLAIN PARTITIONS is useful only when examining queries involving\n partitioned tables. For details, see\n http://dev.mysql.com/doc/refman/5.5/en/partitioning-info.html.\n\no EXPLAIN tbl_name is synonymous with DESCRIBE tbl_name or SHOW COLUMNS\n FROM tbl_name. For information about DESCRIBE and SHOW COLUMNS, see\n [HELP DESCRIBE], and [HELP SHOW COLUMNS].\n\nURL: https://mariadb.com/kb/en/explain/\n\n','','https://mariadb.com/kb/en/explain/'),(256,'DEGREES',4,'Syntax:\nDEGREES(X)\n\nReturns the argument X, converted from radians to degrees.\n\nURL: https://mariadb.com/kb/en/degrees/\n\n','MariaDB> SELECT DEGREES(PI());\n -> 180\nMariaDB> SELECT DEGREES(PI() / 2);\n -> 90\n','https://mariadb.com/kb/en/degrees/'),(257,'VARCHAR',22,'[NATIONAL] VARCHAR(M) [CHARACTER SET charset_name] [COLLATE\ncollation_name]\n\nA variable-length string. M represents the maximum column length in\ncharacters. The range of M is 0 to 65,535. The effective maximum length\nof a VARCHAR is subject to the maximum row size (65,535 bytes, which is\nshared among all columns) and the character set used. For example, utf8\ncharacters can require up to three bytes per character, so a VARCHAR\ncolumn that uses the utf8 character set can be declared to be a maximum\nof 21,844 characters. See\nhttp://dev.mysql.com/doc/refman/5.5/en/column-count-limit.html.\n\nMySQL stores VARCHAR values as a 1-byte or 2-byte length prefix plus\ndata. The length prefix indicates the number of bytes in the value. A\nVARCHAR column uses one length byte if values require no more than 255\nbytes, two length bytes if values may require more than 255 bytes.\n\n*Note*: MySQL 5.5 follows the standard SQL specification, and does not\nremove trailing spaces from VARCHAR values.\n\nVARCHAR is shorthand for CHARACTER VARYING. NATIONAL VARCHAR is the\nstandard SQL way to define that a VARCHAR column should use some\npredefined character set. MySQL 4.1 and up uses utf8 as this predefined\ncharacter set.\nhttps://mariadb.com/kb/en/varchar/. NVARCHAR\nis shorthand for NATIONAL VARCHAR.\n\nURL: https://mariadb.com/kb/en/varchar/\n\n','','https://mariadb.com/kb/en/varchar/'),(258,'UNHEX',37,'Syntax:\n\nUNHEX(str)\n\nFor a string argument str, UNHEX(str) performs the inverse operation of\nHEX(str). That is, it interprets each pair of characters in the\nargument as a hexadecimal number and converts it to the character\nrepresented by the number. The return value is a binary string.\n\nURL: https://mariadb.com/kb/en/unhex/\n\n','MariaDB> SELECT UNHEX(\'4D7953514C\');\n -> \'MySQL\'\nMariaDB> SELECT 0x4D7953514C;\n -> \'MySQL\'\nMariaDB> SELECT UNHEX(HEX(\'string\'));\n -> \'string\'\nMariaDB> SELECT HEX(UNHEX(\'1267\'));\n -> \'1267\'\n','https://mariadb.com/kb/en/unhex/'),(259,'- UNARY',4,'Syntax:\n-\n\nUnary minus. This operator changes the sign of the operand.\n\nURL: https://mariadb.com/kb/en/subtraction-operator-/\n\n','MariaDB> SELECT - 2;\n -> -2\n','https://mariadb.com/kb/en/subtraction-operator-/'),(260,'STD',16,'Syntax:\nSTD(expr)\n\nReturns the population standard deviation of expr. This is an extension\nto standard SQL. The standard SQL function STDDEV_POP() can be used\ninstead.\n\nThis function returns NULL if there were no matching rows.\n\nURL: https://mariadb.com/kb/en/std/\n\n','','https://mariadb.com/kb/en/std/'),(261,'COS',4,'Syntax:\nCOS(X)\n\nReturns the cosine of X, where X is given in radians.\n\nURL: https://mariadb.com/kb/en/cos/\n\n','MariaDB> SELECT COS(PI());\n -> -1\n','https://mariadb.com/kb/en/cos/'),(262,'DATE FUNCTION',31,'Syntax:\nDATE(expr)\n\nExtracts the date part of the date or datetime expression expr.\n\nURL: https://mariadb.com/kb/en/date-function/\n\n','MariaDB> SELECT DATE(\'2003-12-31 01:02:03\');\n -> \'2003-12-31\'\n','https://mariadb.com/kb/en/date-function/'),(263,'DROP TRIGGER',39,'Syntax:\nDROP TRIGGER [IF EXISTS] [schema_name.]trigger_name\n\nThis statement drops a trigger. The schema (database) name is optional.\nIf the schema is omitted, the trigger is dropped from the default\nschema. DROP TRIGGER requires the TRIGGER privilege for the table\nassociated with the trigger.\n\nUse IF EXISTS to prevent an error from occurring for a trigger that\ndoes not exist. A NOTE is generated for a nonexistent trigger when\nusing IF EXISTS. See [HELP SHOW WARNINGS].\n\nTriggers for a table are also dropped if you drop the table.\n\nURL: https://mariadb.com/kb/en/drop-trigger/\n\n','','https://mariadb.com/kb/en/drop-trigger/'),(264,'RESET MASTER',8,'Syntax:\nRESET MASTER\n\nDeletes all binary log files listed in the index file, resets the\nbinary log index file to be empty, and creates a new binary log file.\nThis statement is intended to be used only when the master is started\nfor the first time.\n\nURL: https://mariadb.com/kb/en/reset-master/\n\n','','https://mariadb.com/kb/en/reset-master/'),(265,'TAN',4,'Syntax:\nTAN(X)\n\nReturns the tangent of X, where X is given in radians.\n\nURL: https://mariadb.com/kb/en/tan/\n\n','MariaDB> SELECT TAN(PI());\n -> -1.2246063538224e-16\nMariaDB> SELECT TAN(PI()+1);\n -> 1.5574077246549\n','https://mariadb.com/kb/en/tan/'),(266,'PI',4,'Syntax:\nPI()\n\nReturns the value of π (pi). The default number of decimal places\ndisplayed is seven, but MySQL uses the full double-precision value\ninternally.\n\nURL: https://mariadb.com/kb/en/pi/\n\n','MariaDB> SELECT PI();\n -> 3.141593\nMariaDB> SELECT PI()+0.000000000000000000;\n -> 3.141592653589793116\n','https://mariadb.com/kb/en/pi/'),(267,'WEEKOFYEAR',31,'Syntax:\nWEEKOFYEAR(date)\n\nReturns the calendar week of the date as a number in the range from 1\nto 53. WEEKOFYEAR() is a compatibility function that is equivalent to\nWEEK(date,3).\n\nURL: https://mariadb.com/kb/en/weekofyear/\n\n','MariaDB> SELECT WEEKOFYEAR(\'2008-02-20\');\n -> 8\n','https://mariadb.com/kb/en/weekofyear/'),(268,'/',4,'Syntax:\n/\n\nDivision:\n\nURL: https://mariadb.com/kb/en/division-operator/\n\n','MariaDB> SELECT 3/5;\n -> 0.60\n','https://mariadb.com/kb/en/division-operator/'),(269,'PURGE BINARY LOGS',8,'Syntax:\nPURGE { BINARY | MASTER } LOGS\n { TO \'log_name\' | BEFORE datetime_expr }\n\nThe binary log is a set of files that contain information about data\nmodifications made by the MySQL server. The log consists of a set of\nbinary log files, plus an index file (see\nhttps://mariadb.com/kb/en/overview-of-the-binary-log/).\n\nThe PURGE BINARY LOGS statement deletes all the binary log files listed\nin the log index file prior to the specified log file name or date.\nBINARY and MASTER are synonyms. Deleted log files also are removed from\nthe list recorded in the index file, so that the given log file becomes\nthe first in the list.\n\nThis statement has no effect if the server was not started with the\n--log-bin option to enable binary logging.\n\nURL: https://mariadb.com/kb/en/sql-commands-purge-logs/\n\n','PURGE BINARY LOGS TO \'mysql-bin.010\';\nPURGE BINARY LOGS BEFORE \'2008-04-02 22:46:26\';\n','https://mariadb.com/kb/en/sql-commands-purge-logs/'),(270,'STDDEV_SAMP',16,'Syntax:\nSTDDEV_SAMP(expr)\n\nReturns the sample standard deviation of expr (the square root of\nVAR_SAMP().\n\nSTDDEV_SAMP() returns NULL if there were no matching rows.\n\nURL: https://mariadb.com/kb/en/stddev_samp/\n\n','','https://mariadb.com/kb/en/stddev_samp/'),(271,'SCHEMA',17,'Syntax:\nSCHEMA()\n\nThis function is a synonym for DATABASE().\n\nURL: https://mariadb.com/kb/en/schema/\n\n','','https://mariadb.com/kb/en/schema/'),(272,'MLINEFROMWKB',32,'MLineFromWKB(wkb[,srid]), MultiLineStringFromWKB(wkb[,srid])\n\nConstructs a MULTILINESTRING value using its WKB representation and\nSRID.\n\nURL: https://mariadb.com/kb/en/mlinefromwkb/\n\n','','https://mariadb.com/kb/en/mlinefromwkb/'),(273,'LOG2',4,'Syntax:\nLOG2(X)\n\nReturns the base-2 logarithm of X.\n\nURL: https://mariadb.com/kb/en/log2/\n\n','MariaDB> SELECT LOG2(65536);\n -> 16\nMariaDB> SELECT LOG2(-100);\n -> NULL\n','https://mariadb.com/kb/en/log2/'),(274,'SUBTIME',31,'Syntax:\nSUBTIME(expr1,expr2)\n\nSUBTIME() returns expr1 - expr2 expressed as a value in the same format\nas expr1. expr1 is a time or datetime expression, and expr2 is a time\nexpression.\n\nURL: https://mariadb.com/kb/en/subtime/\n\n','MariaDB> SELECT SUBTIME(\'2007-12-31 23:59:59.999999\',\'1 1:1:1.000002\');\n -> \'2007-12-30 22:58:58.999997\'\nMariaDB> SELECT SUBTIME(\'01:00:00.999999\', \'02:00:00.999998\');\n -> \'-00:59:59.999999\'\n','https://mariadb.com/kb/en/subtime/'),(275,'UNCOMPRESSED_LENGTH',12,'Syntax:\nUNCOMPRESSED_LENGTH(compressed_string)\n\nReturns the length that the compressed string had before being\ncompressed.\n\nURL: https://mariadb.com/kb/en/uncompressed_length/\n\n','MariaDB> SELECT UNCOMPRESSED_LENGTH(COMPRESS(REPEAT(\'a\',30)));\n -> 30\n','https://mariadb.com/kb/en/uncompressed_length/'),(276,'DROP TABLE',39,'Syntax:\nDROP [TEMPORARY] TABLE [IF EXISTS]\n tbl_name [, tbl_name] ...\n [RESTRICT | CASCADE]\n\nDROP TABLE removes one or more tables. You must have the DROP privilege\nfor each table. All table data and the table definition are removed, so\nbe careful with this statement! If any of the tables named in the\nargument list do not exist, MySQL returns an error indicating by name\nwhich nonexisting tables it was unable to drop, but it also drops all\nof the tables in the list that do exist.\n\n*Important*: When a table is dropped, user privileges on the table are\nnot automatically dropped. See [HELP GRANT].\n\nNote that for a partitioned table, DROP TABLE permanently removes the\ntable definition, all of its partitions, and all of the data which was\nstored in those partitions. It also removes the partitioning definition\n(.par) file associated with the dropped table.\n\nUse IF EXISTS to prevent an error from occurring for tables that do not\nexist. A NOTE is generated for each nonexistent table when using IF\nEXISTS. See [HELP SHOW WARNINGS].\n\nRESTRICT and CASCADE are permitted to make porting easier. In MySQL\n5.5, they do nothing.\n\n*Note*: DROP TABLE automatically commits the current active\ntransaction, unless you use the TEMPORARY keyword.\n\nURL: https://mariadb.com/kb/en/drop-table/\n\n','','https://mariadb.com/kb/en/drop-table/'),(277,'POW',4,'Syntax:\nPOW(X,Y)\n\nReturns the value of X raised to the power of Y.\n\nURL: https://mariadb.com/kb/en/pow/\n\n','MariaDB> SELECT POW(2,2);\n -> 4\nMariaDB> SELECT POW(2,-2);\n -> 0.25\n','https://mariadb.com/kb/en/pow/'),(278,'SHOW CREATE TABLE',26,'Syntax:\nSHOW CREATE TABLE tbl_name\n\nShows the CREATE TABLE statement that creates the given table. To use\nthis statement, you must have some privilege for the table. This\nstatement also works with views.\nSHOW CREATE TABLE quotes table and column names according to the value\nof the sql_quote_show_create option. See\nhttps://mariadb.com/kb/en/server-system-variables/.\n\nURL: https://mariadb.com/kb/en/show-create-table/\n\n','MariaDB> SHOW CREATE TABLE t\\G\n*************************** 1. row ***************************\n Table: t\nCreate Table: CREATE TABLE t (\n id INT(11) default NULL auto_increment,\n s char(60) default NULL,\n PRIMARY KEY (id)\n) ENGINE=MyISAM\n','https://mariadb.com/kb/en/show-create-table/'),(279,'DUAL',27,'You are permitted to specify DUAL as a dummy table name in situations\nwhere no tables are referenced:\n\nMariaDB> SELECT 1 + 1 FROM DUAL;\n -> 2\n\nDUAL is purely for the convenience of people who require that all\nSELECT statements should have FROM and possibly other clauses. MySQL\nmay ignore the clauses. MySQL does not require FROM DUAL if no tables\nare referenced.\n\nURL: https://mariadb.com/kb/en/dual/\n\n','','https://mariadb.com/kb/en/dual/'),(280,'INSTR',37,'Syntax:\nINSTR(str,substr)\n\nReturns the position of the first occurrence of substring substr in\nstring str. This is the same as the two-argument form of LOCATE(),\nexcept that the order of the arguments is reversed.\n\nURL: https://mariadb.com/kb/en/instr/\n\n','MariaDB> SELECT INSTR(\'foobarbar\', \'bar\');\n -> 4\nMariaDB> SELECT INSTR(\'xbar\', \'foobar\');\n -> 0\n','https://mariadb.com/kb/en/instr/'),(281,'NOW',31,'Syntax:\nNOW()\n\nReturns the current date and time as a value in \'YYYY-MM-DD HH:MM:SS\'\nor YYYYMMDDHHMMSS.uuuuuu format, depending on whether the function is\nused in a string or numeric context. The value is expressed in the\ncurrent time zone.\n\nURL: https://mariadb.com/kb/en/now/\n\n','MariaDB> SELECT NOW();\n -> \'2007-12-15 23:50:26\'\nMariaDB> SELECT NOW() + 0;\n -> 20071215235026.000000\n','https://mariadb.com/kb/en/now/'),(282,'SHOW ENGINES',26,'Syntax:\nSHOW [STORAGE] ENGINES\n\nSHOW ENGINES displays status information about the server\'s storage\nengines. This is particularly useful for checking whether a storage\nengine is supported, or to see what the default engine is.\n\nURL: https://mariadb.com/kb/en/show-engines/\n\n','','https://mariadb.com/kb/en/show-engines/'),(283,'>=',18,'Syntax:\n>=\n\nGreater than or equal:\n\nURL: https://mariadb.com/kb/en/greater-than-or-equal/\n\n','MariaDB> SELECT 2 >= 2;\n -> 1\n','https://mariadb.com/kb/en/greater-than-or-equal/'),(284,'EXP',4,'Syntax:\nEXP(X)\n\nReturns the value of e (the base of natural logarithms) raised to the\npower of X. The inverse of this function is LOG() (using a single\nargument only) or LN().\n\nURL: https://mariadb.com/kb/en/exp/\n\n','MariaDB> SELECT EXP(2);\n -> 7.3890560989307\nMariaDB> SELECT EXP(-2);\n -> 0.13533528323661\nMariaDB> SELECT EXP(0);\n -> 1\n','https://mariadb.com/kb/en/exp/'),(285,'LONGBLOB',22,'LONGBLOB\n\nA BLOB column with a maximum length of 4,294,967,295 or 4GB (232 - 1)\nbytes. The effective maximum length of LONGBLOB columns depends on the\nconfigured maximum packet size in the client/server protocol and\navailable memory. Each LONGBLOB value is stored using a 4-byte length\nprefix that indicates the number of bytes in the value.\n\nURL: https://mariadb.com/kb/en/longblob/\n\n','','https://mariadb.com/kb/en/longblob/'),(286,'POINTN',13,'PointN(ls,N)\n\nReturns the N-th Point in the Linestring value ls. Points are numbered\nbeginning with 1.\n\nURL: https://mariadb.com/kb/en/pointn/\n\n','MariaDB> SET @ls = \'LineString(1 1,2 2,3 3)\';\nMariaDB> SELECT AsText(PointN(GeomFromText(@ls),2));\n+-------------------------------------+\n| AsText(PointN(GeomFromText(@ls),2)) |\n+-------------------------------------+\n| POINT(2 2) |\n+-------------------------------------+\n','https://mariadb.com/kb/en/pointn/'),(287,'YEAR DATA TYPE',22,'YEAR[(2|4)]\n\nA year in two-digit or four-digit format. The default is four-digit\nformat. YEAR(2) or YEAR(4) differ in display format, but have the same\nrange of values. In four-digit format, values display as 1901 to 2155,\nand 0000. In two-digit format, values display as 70 to 69, representing\nyears from 1970 to 2069. MySQL displays YEAR values in YYYY or\nYYformat, but permits assignment of values to YEAR columns using either\nstrings or numbers.\n\n*Note*: The YEAR(2) data type has certain issues that you should\nconsider before choosing to use it. As of MySQL 5.5.27, YEAR(2) is\ndeprecated. For more information, see\nhttp://dev.mysql.com/doc/refman/5.5/en/migrating-to-year4.html.\n\nFor additional information about YEAR display format and inerpretation\nof input values, see https://mariadb.com/kb/en/year-data-type/.\n\nURL: https://mariadb.com/kb/en/year-data-type/\n\n','','https://mariadb.com/kb/en/year-data-type/'),(288,'SUM',16,'Syntax:\nSUM([DISTINCT] expr)\n\nReturns the sum of expr. If the return set has no rows, SUM() returns\nNULL. The DISTINCT keyword can be used to sum only the distinct values\nof expr.\n\nSUM() returns NULL if there were no matching rows.\n\nURL: https://mariadb.com/kb/en/sum/\n\n','','https://mariadb.com/kb/en/sum/'),(289,'OCT',37,'Syntax:\nOCT(N)\n\nReturns a string representation of the octal value of N, where N is a\nlonglong (BIGINT) number. This is equivalent to CONV(N,10,8). Returns\nNULL if N is NULL.\n\nURL: https://mariadb.com/kb/en/oct/\n\n','MariaDB> SELECT OCT(12);\n -> \'14\'\n','https://mariadb.com/kb/en/oct/'),(290,'SYSDATE',31,'Syntax:\nSYSDATE()\n\nReturns the current date and time as a value in \'YYYY-MM-DD HH:MM:SS\'\nor YYYYMMDDHHMMSS.uuuuuu format, depending on whether the function is\nused in a string or numeric context.\n\nSYSDATE() returns the time at which it executes. This differs from the\nbehavior for NOW(), which returns a constant time that indicates the\ntime at which the statement began to execute. (Within a stored function\nor trigger, NOW() returns the time at which the function or triggering\nstatement began to execute.)\n\nMariaDB> SELECT NOW(), SLEEP(2), NOW();\n+---------------------+----------+---------------------+\n| NOW() | SLEEP(2) | NOW() |\n+---------------------+----------+---------------------+\n| 2006-04-12 13:47:36 | 0 | 2006-04-12 13:47:36 |\n+---------------------+----------+---------------------+\n\nMariaDB> SELECT SYSDATE(), SLEEP(2), SYSDATE();\n+---------------------+----------+---------------------+\n| SYSDATE() | SLEEP(2) | SYSDATE() |\n+---------------------+----------+---------------------+\n| 2006-04-12 13:47:44 | 0 | 2006-04-12 13:47:46 |\n+---------------------+----------+---------------------+\n\nIn addition, the SET TIMESTAMP statement affects the value returned by\nNOW() but not by SYSDATE(). This means that timestamp settings in the\nbinary log have no effect on invocations of SYSDATE().\n\nBecause SYSDATE() can return different values even within the same\nstatement, and is not affected by SET TIMESTAMP, it is nondeterministic\nand therefore unsafe for replication if statement-based binary logging\nis used. If that is a problem, you can use row-based logging.\n\nAlternatively, you can use the --sysdate-is-now option to cause\nSYSDATE() to be an alias for NOW(). This works if the option is used on\nboth the master and the slave.\n\nThe nondeterministic nature of SYSDATE() also means that indexes cannot\nbe used for evaluating expressions that refer to it.\n\nURL: https://mariadb.com/kb/en/sysdate/\n\n','','https://mariadb.com/kb/en/sysdate/'),(291,'UNINSTALL PLUGIN',5,'Syntax:\nUNINSTALL PLUGIN plugin_name\n\nThis statement removes an installed server plugin. It requires the\nDELETE privilege for the mysql.plugin table.\n\nplugin_name must be the name of some plugin that is listed in the\nmysql.plugin table. The server executes the plugin\'s deinitialization\nfunction and removes the row for the plugin from the mysql.plugin\ntable, so that subsequent server restarts will not load and initialize\nthe plugin. UNINSTALL PLUGIN does not remove the plugin\'s shared\nlibrary file.\n\nURL: https://mariadb.com/kb/en/uninstall-plugin/\n\n','','https://mariadb.com/kb/en/uninstall-plugin/'),(292,'ASBINARY',32,'AsBinary(g), AsWKB(g)\n\nConverts a value in internal geometry format to its WKB representation\nand returns the binary result.\n\nURL: https://mariadb.com/kb/en/asbinary/\n\n','SELECT AsBinary(g) FROM geom;\n','https://mariadb.com/kb/en/asbinary/'),(293,'REPEAT FUNCTION',37,'Syntax:\nREPEAT(str,count)\n\nReturns a string consisting of the string str repeated count times. If\ncount is less than 1, returns an empty string. Returns NULL if str or\ncount are NULL.\n\nURL: https://mariadb.com/kb/en/repeat-function/\n\n','MariaDB> SELECT REPEAT(\'MySQL\', 3);\n -> \'MySQLMySQLMySQL\'\n','https://mariadb.com/kb/en/repeat-function/'),(294,'SHOW TABLES',26,'Syntax:\nSHOW [FULL] TABLES [{FROM | IN} db_name]\n [LIKE \'pattern\' | WHERE expr]\n\nSHOW TABLES lists the non-TEMPORARY tables in a given database. You can\nalso get this list using the mysqlshow db_name command. The LIKE\nclause, if present, indicates which table names to match. The WHERE\nclause can be given to select rows using more general conditions, as\ndiscussed in https://mariadb.com/kb/en/extended-show/.\n\nThis statement also lists any views in the database. The FULL modifier\nis supported such that SHOW FULL TABLES displays a second output\ncolumn. Values for the second column are BASE TABLE for a table and\nVIEW for a view.\n\nIf you have no privileges for a base table or view, it does not show up\nin the output from SHOW TABLES or mysqlshow db_name.\n\nURL: https://mariadb.com/kb/en/show-tables/\n\n','','https://mariadb.com/kb/en/show-tables/'),(295,'MAKEDATE',31,'Syntax:\nMAKEDATE(year,dayofyear)\n\nReturns a date, given year and day-of-year values. dayofyear must be\ngreater than 0 or the result is NULL.\n\nURL: https://mariadb.com/kb/en/makedate/\n\n','MariaDB> SELECT MAKEDATE(2011,31), MAKEDATE(2011,32);\n -> \'2011-01-31\', \'2011-02-01\'\nMariaDB> SELECT MAKEDATE(2011,365), MAKEDATE(2014,365);\n -> \'2011-12-31\', \'2014-12-31\'\nMariaDB> SELECT MAKEDATE(2011,0);\n -> NULL\n','https://mariadb.com/kb/en/makedate/'),(296,'BINARY OPERATOR',37,'Syntax:\nBINARY\n\nThe BINARY operator casts the string following it to a binary string.\nThis is an easy way to force a column comparison to be done byte by\nbyte rather than character by character. This causes the comparison to\nbe case sensitive even if the column is not defined as BINARY or BLOB.\nBINARY also causes trailing spaces to be significant.\n\nURL: https://mariadb.com/kb/en/binary-operator/\n\n','MariaDB> SELECT \'a\' = \'A\';\n -> 1\nMariaDB> SELECT BINARY \'a\' = \'A\';\n -> 0\nMariaDB> SELECT \'a\' = \'a \';\n -> 1\nMariaDB> SELECT BINARY \'a\' = \'a \';\n -> 0\n','https://mariadb.com/kb/en/binary-operator/'),(297,'MBROVERLAPS',6,'MBROverlaps(g1,g2)\n\nReturns 1 or 0 to indicate whether the Minimum Bounding Rectangles of\nthe two geometries g1 and g2 overlap. The term spatially overlaps is\nused if two geometries intersect and their intersection results in a\ngeometry of the same dimension but not equal to either of the given\ngeometries.\n\nURL: https://mariadb.com/kb/en/mbroverlaps/\n\n','','https://mariadb.com/kb/en/mbroverlaps/'),(298,'SOUNDEX',37,'Syntax:\nSOUNDEX(str)\n\nReturns a soundex string from str. Two strings that sound almost the\nsame should have identical soundex strings. A standard soundex string\nis four characters long, but the SOUNDEX() function returns an\narbitrarily long string. You can use SUBSTRING() on the result to get a\nstandard soundex string. All nonalphabetic characters in str are\nignored. All international alphabetic characters outside the A-Z range\nare treated as vowels.\n\n*Important*: When using SOUNDEX(), you should be aware of the following\nlimitations:\n\no This function, as currently implemented, is intended to work well\n with strings that are in the English language only. Strings in other\n languages may not produce reliable results.\n\no This function is not guaranteed to provide consistent results with\n strings that use multi-byte character sets, including utf-8.\n\n We hope to remove these limitations in a future release. See Bug\n #22638 for more information.\n\nURL: https://mariadb.com/kb/en/soundex/\n\n','MariaDB> SELECT SOUNDEX(\'Hello\');\n -> \'H400\'\nMariaDB> SELECT SOUNDEX(\'Quadratically\');\n -> \'Q36324\'\n','https://mariadb.com/kb/en/soundex/'),(299,'MBRTOUCHES',6,'MBRTouches(g1,g2)\n\nReturns 1 or 0 to indicate whether the Minimum Bounding Rectangles of\nthe two geometries g1 and g2 touch. Two geometries spatially touch if\nthe interiors of the geometries do not intersect, but the boundary of\none of the geometries intersects either the boundary or the interior of\nthe other.\n\nURL: https://mariadb.com/kb/en/mbrtouches/\n\n','','https://mariadb.com/kb/en/mbrtouches/'),(300,'DROP EVENT',39,'Syntax:\nDROP EVENT [IF EXISTS] event_name\n\nThis statement drops the event named event_name. The event immediately\nceases being active, and is deleted completely from the server.\n\nIf the event does not exist, the error ERROR 1517 (HY000): Unknown\nevent \'event_name\' results. You can override this and cause the\nstatement to generate a warning for nonexistent events instead using IF\nEXISTS.\n\nThis statement requires the EVENT privilege for the schema to which the\nevent to be dropped belongs.\n\nURL: https://mariadb.com/kb/en/drop-event/\n\n','','https://mariadb.com/kb/en/drop-event/'),(301,'INSERT SELECT',27,'Syntax:\nINSERT [LOW_PRIORITY | HIGH_PRIORITY] [IGNORE]\n [INTO] tbl_name [(col_name,...)]\n SELECT ...\n [ ON DUPLICATE KEY UPDATE col_name=expr, ... ]\n\nWith INSERT ... SELECT, you can quickly insert many rows into a table\nfrom one or many tables. For example:\n\nINSERT INTO tbl_temp2 (fld_id)\n SELECT tbl_temp1.fld_order_id\n FROM tbl_temp1 WHERE tbl_temp1.fld_order_id > 100;\n\nURL: https://mariadb.com/kb/en/insert-select/\n\n','','https://mariadb.com/kb/en/insert-select/'),(302,'CREATE PROCEDURE',39,'Syntax:\nCREATE\n [DEFINER = { user | CURRENT_USER }]\n PROCEDURE sp_name ([proc_parameter[,...]])\n [characteristic ...] routine_body\n\nCREATE\n [DEFINER = { user | CURRENT_USER }]\n FUNCTION sp_name ([func_parameter[,...]])\n RETURNS type\n [characteristic ...] routine_body\n\nproc_parameter:\n [ IN | OUT | INOUT ] param_name type\n\nfunc_parameter:\n param_name type\n\ntype:\n Any valid MySQL data type\n\ncharacteristic:\n COMMENT \'string\'\n | LANGUAGE SQL\n | [NOT] DETERMINISTIC\n | { CONTAINS SQL | NO SQL | READS SQL DATA | MODIFIES SQL DATA }\n | SQL SECURITY { DEFINER | INVOKER }\n\nroutine_body:\n Valid SQL routine statement\n\nThese statements create stored routines. By default, a routine is\nassociated with the default database. To associate the routine\nexplicitly with a given database, specify the name as db_name.sp_name\nwhen you create it.\n\nThe CREATE FUNCTION statement is also used in MySQL to support UDFs\n(user-defined functions). See\nhttps://mariadb.com/kb/en/create-function-udf/. A UDF can\nbe regarded as an external stored function. Stored functions share\ntheir namespace with UDFs. See\nhttp://dev.mysql.com/doc/refman/5.5/en/function-resolution.html, for\nthe rules describing how the server interprets references to different\nkinds of functions.\n\nTo invoke a stored procedure, use the CALL statement (see [HELP CALL]).\nTo invoke a stored function, refer to it in an expression. The function\nreturns a value during expression evaluation.\n\nCREATE PROCEDURE and CREATE FUNCTION require the CREATE ROUTINE\nprivilege. They might also require the SUPER privilege, depending on\nthe DEFINER value, as described later in this section. If binary\nlogging is enabled, CREATE FUNCTION might require the SUPER privilege,\nas described in\nhttps://mariadb.com/kb/en/binary-logging-of-stored-routines/.\n\nBy default, MySQL automatically grants the ALTER ROUTINE and EXECUTE\nprivileges to the routine creator. This behavior can be changed by\ndisabling the automatic_sp_privileges system variable. See\nhttps://mariadb.com/kb/en/stored-routine-privileges/.\n\nThe DEFINER and SQL SECURITY clauses specify the security context to be\nused when checking access privileges at routine execution time, as\ndescribed later in this section.\n\nIf the routine name is the same as the name of a built-in SQL function,\na syntax error occurs unless you use a space between the name and the\nfollowing parenthesis when defining the routine or invoking it later.\nFor this reason, avoid using the names of existing SQL functions for\nyour own stored routines.\n\nThe IGNORE_SPACE SQL mode applies to built-in functions, not to stored\nroutines. It is always permissible to have spaces after a stored\nroutine name, regardless of whether IGNORE_SPACE is enabled.\n\nThe parameter list enclosed within parentheses must always be present.\nIf there are no parameters, an empty parameter list of () should be\nused. Parameter names are not case sensitive.\n\nEach parameter is an IN parameter by default. To specify otherwise for\na parameter, use the keyword OUT or INOUT before the parameter name.\n\n*Note*: Specifying a parameter as IN, OUT, or INOUT is valid only for a\nPROCEDURE. For a FUNCTION, parameters are always regarded as IN\nparameters.\n\nAn IN parameter passes a value into a procedure. The procedure might\nmodify the value, but the modification is not visible to the caller\nwhen the procedure returns. An OUT parameter passes a value from the\nprocedure back to the caller. Its initial value is NULL within the\nprocedure, and its value is visible to the caller when the procedure\nreturns. An INOUT parameter is initialized by the caller, can be\nmodified by the procedure, and any change made by the procedure is\nvisible to the caller when the procedure returns.\n\nFor each OUT or INOUT parameter, pass a user-defined variable in the\nCALL statement that invokes the procedure so that you can obtain its\nvalue when the procedure returns. If you are calling the procedure from\nwithin another stored procedure or function, you can also pass a\nroutine parameter or local routine variable as an IN or INOUT\nparameter.\n\nThe following example shows a simple stored procedure that uses an OUT\nparameter:\n\nMariaDB> delimiter //\n\nMariaDB> CREATE PROCEDURE simpleproc (OUT param1 INT)\n -> BEGIN\n -> SELECT COUNT(*) INTO param1 FROM t;\n -> END//\nQuery OK, 0 rows affected (0.00 sec)\n\nMariaDB> delimiter ;\n\nMariaDB> CALL simpleproc(@a);\nQuery OK, 0 rows affected (0.00 sec)\n\nMariaDB> SELECT @a;\n+------+\n| @a |\n+------+\n| 3 |\n+------+\n1 row in set (0.00 sec)\n\nThe example uses the mysql client delimiter command to change the\nstatement delimiter from ; to // while the procedure is being defined.\nThis enables the ; delimiter used in the procedure body to be passed\nthrough to the server rather than being interpreted by mysql itself.\nSee\nhttps://mariadb.com/kb/en/stored-procedure-overview/.\n\nThe RETURNS clause may be specified only for a FUNCTION, for which it\nis mandatory. It indicates the return type of the function, and the\nfunction body must contain a RETURN value statement. If the RETURN\nstatement returns a value of a different type, the value is coerced to\nthe proper type. For example, if a function specifies an ENUM or SET\nvalue in the RETURNS clause, but the RETURN statement returns an\ninteger, the value returned from the function is the string for the\ncorresponding ENUM member of set of SET members.\n\nThe following example function takes a parameter, performs an operation\nusing an SQL function, and returns the result. In this case, it is\nunnecessary to use delimiter because the function definition contains\nno internal ; statement delimiters:\n\nMariaDB> CREATE FUNCTION hello (s CHAR(20))\nMariaDB> RETURNS CHAR(50) DETERMINISTIC\n -> RETURN CONCAT(\'Hello, \',s,\'!\');\nQuery OK, 0 rows affected (0.00 sec)\n\nMariaDB> SELECT hello(\'world\');\n+----------------+\n| hello(\'world\') |\n+----------------+\n| Hello, world! |\n+----------------+\n1 row in set (0.00 sec)\n\nParameter types and function return types can be declared to use any\nvalid data type, except that the COLLATE attribute cannot be used prior\nto MySQL 5.5.3. As of 5.5.3, COLLATE can be used if preceded by the\nCHARACTER SET attribute.\n\nThe routine_body consists of a valid SQL routine statement. This can be\na simple statement such as SELECT or INSERT, or a compound statement\nwritten using BEGIN and END. Compound statements can contain\ndeclarations, loops, and other control structure statements. The syntax\nfor these statements is described in\nhttps://mariadb.com/kb/programmatic-and-compound-statements.\n\nMySQL permits routines to contain DDL statements, such as CREATE and\nDROP. MySQL also permits stored procedures (but not stored functions)\nto contain SQL transaction statements such as COMMIT. Stored functions\nmay not contain statements that perform explicit or implicit commit or\nrollback. Support for these statements is not required by the SQL\nstandard, which states that each DBMS vendor may decide whether to\npermit them.\n\nStatements that return a result set can be used within a stored\nprocedure but not within a stored function. This prohibition includes\nSELECT statements that do not have an INTO var_list clause and other\nstatements such as SHOW, EXPLAIN, and CHECK TABLE. For statements that\ncan be determined at function definition time to return a result set, a\nNot allowed to return a result set from a function error occurs\n(ER_SP_NO_RETSET). For statements that can be determined only at\nruntime to return a result set, a PROCEDURE %s can\'t return a result\nset in the given context error occurs (ER_SP_BADSELECT).\n\nUSE statements within stored routines are not permitted. When a routine\nis invoked, an implicit USE db_name is performed (and undone when the\nroutine terminates). The causes the routine to have the given default\ndatabase while it executes. References to objects in databases other\nthan the routine default database should be qualified with the\nappropriate database name.\n\nFor additional information about statements that are not permitted in\nstored routines, see\nhttps://mariadb.com/kb/en/stored-routine-privileges/\n.\n\nFor information about invoking stored procedures from within programs\nwritten in a language that has a MySQL interface, see [HELP CALL].\n\nMySQL stores the sql_mode system variable setting that is in effect at\nthe time a routine is created, and always executes the routine with\nthis setting in force, regardless of the server SQL mode in effect when\nthe routine is invoked.\n\nThe switch from the SQL mode of the invoker to that of the routine\noccurs after evaluation of arguments and assignment of the resulting\nvalues to routine parameters. If you define a routine in strict SQL\nmode but invoke it in nonstrict mode, assignment of arguments to\nroutine parameters does not take place in strict mode. If you require\nthat expressions passed to a routine be assigned in strict SQL mode,\nyou should invoke the routine with strict mode in effect.\n\nURL: https://mariadb.com/kb/en/create-procedure/\n\n','','https://mariadb.com/kb/en/create-procedure/'),(303,'VARBINARY',22,'VARBINARY(M)\n\nThe VARBINARY type is similar to the VARCHAR type, but stores binary\nbyte strings rather than nonbinary character strings. M represents the\nmaximum column length in bytes.\n\nURL: https://mariadb.com/kb/en/varbinary/\n\n','','https://mariadb.com/kb/en/varbinary/'),(304,'LOAD INDEX',26,'Syntax:\nLOAD INDEX INTO CACHE\n tbl_index_list [, tbl_index_list] ...\n\ntbl_index_list:\n tbl_name\n [PARTITION (partition_list | ALL)]\n [[INDEX|KEY] (index_name[, index_name] ...)]\n [IGNORE LEAVES]\n\npartition_list:\n partition_name[, partition_name][, ...]\n\nThe LOAD INDEX INTO CACHE statement preloads a table index into the key\ncache to which it has been assigned by an explicit CACHE INDEX\nstatement, or into the default key cache otherwise.\n\nLOAD INDEX INTO CACHE is used only for MyISAM tables. In MySQL 5.5, it\nis also supported for partitioned MyISAM tables; in addition, indexes\non partitioned tables can be preloaded for one, several, or all\npartitions.\n\nThe IGNORE LEAVES modifier causes only blocks for the nonleaf nodes of\nthe index to be preloaded.\n\nIGNORE LEAVES is also supported for partitioned MyISAM tables.\n\nURL: https://mariadb.com/kb/en/load-index/\n\n','','https://mariadb.com/kb/en/load-index/'),(305,'UNION',27,'Syntax:\nSELECT ...\nUNION [ALL | DISTINCT] SELECT ...\n[UNION [ALL | DISTINCT] SELECT ...]\n\nUNION is used to combine the result from multiple SELECT statements\ninto a single result set.\n\nThe column names from the first SELECT statement are used as the column\nnames for the results returned. Selected columns listed in\ncorresponding positions of each SELECT statement should have the same\ndata type. (For example, the first column selected by the first\nstatement should have the same type as the first column selected by the\nother statements.)\n\nURL: https://mariadb.com/kb/en/union/\n\n','','https://mariadb.com/kb/en/union/'),(306,'TO_DAYS',31,'Syntax:\nTO_DAYS(date)\n\nGiven a date date, returns a day number (the number of days since year\n0).\n\nURL: https://mariadb.com/kb/en/to_days/\n\n','MariaDB> SELECT TO_DAYS(950501);\n -> 728779\nMariaDB> SELECT TO_DAYS(\'2007-10-07\');\n -> 733321\n','https://mariadb.com/kb/en/to_days/'),(307,'NOT REGEXP',37,'Syntax:\nexpr NOT REGEXP pat, expr NOT RLIKE pat\n\nThis is the same as NOT (expr REGEXP pat).\n\nURL: https://mariadb.com/kb/en/not-regexp/\n\n','','https://mariadb.com/kb/en/not-regexp/'),(308,'SHOW INDEX',26,'Syntax:\nSHOW {INDEX | INDEXES | KEYS}\n {FROM | IN} tbl_name\n [{FROM | IN} db_name]\n [WHERE expr]\n\nSHOW INDEX returns table index information. The format resembles that\nof the SQLStatistics call in ODBC. This statement requires some\nprivilege for any column in the table.\nYou can use db_name.tbl_name as an alternative to the tbl_name FROM\ndb_name syntax. These two statements are equivalent:\n\nSHOW INDEX FROM mytable FROM mydb;\nSHOW INDEX FROM mydb.mytable;\n\nThe WHERE clause can be given to select rows using more general\nconditions, as discussed in\nhttps://mariadb.com/kb/en/extended-show/.\n\nYou can also list a table\'s indexes with the mysqlshow -k db_name\ntbl_name command.\n\nURL: https://mariadb.com/kb/en/show-index/\n\n','','https://mariadb.com/kb/en/show-index/'),(309,'SHOW CREATE DATABASE',26,'Syntax:\nSHOW CREATE {DATABASE | SCHEMA} [IF NOT EXISTS] db_name\n\nShows the CREATE DATABASE statement that creates the given database. If\nthe SHOW statement includes an IF NOT EXISTS clause, the output too\nincludes such a clause. SHOW CREATE SCHEMA is a synonym for SHOW CREATE\nDATABASE.\n\nURL: https://mariadb.com/kb/en/show-create-database/\n\n','MariaDB> SHOW CREATE DATABASE test\\G\n*************************** 1. row ***************************\n Database: test\nCreate Database: CREATE DATABASE `test`\n /*!40100 DEFAULT CHARACTER SET latin1 */\n\nMariaDB> SHOW CREATE SCHEMA test\\G\n*************************** 1. row ***************************\n Database: test\nCreate Database: CREATE DATABASE `test`\n /*!40100 DEFAULT CHARACTER SET latin1 */\n','https://mariadb.com/kb/en/show-create-database/'),(310,'LEAVE',23,'Syntax:\nLEAVE label\n\nThis statement is used to exit the flow control construct that has the\ngiven label. If the label is for the outermost stored program block,\nLEAVE exits the program.\n\nLEAVE can be used within BEGIN ... END or loop constructs (LOOP,\nREPEAT, WHILE).\n\nURL: https://mariadb.com/kb/en/leave/\n\n','','https://mariadb.com/kb/en/leave/'),(311,'NOT IN',18,'Syntax:\nexpr NOT IN (value,...)\n\nThis is the same as NOT (expr IN (value,...)).\n\nURL: https://mariadb.com/kb/en/not-in/\n\n','','https://mariadb.com/kb/en/not-in/'),(312,'!',15,'Syntax:\nNOT, !\n\nLogical NOT. Evaluates to 1 if the operand is 0, to 0 if the operand is\nnonzero, and NOT NULL returns NULL.\n\nURL: https://mariadb.com/kb/en/not/\n\n','MariaDB> SELECT NOT 10;\n -> 0\nMariaDB> SELECT NOT 0;\n -> 1\nMariaDB> SELECT NOT NULL;\n -> NULL\nMariaDB> SELECT ! (1+1);\n -> 0\nMariaDB> SELECT ! 1+1;\n -> 1\n','https://mariadb.com/kb/en/not/'),(313,'DECLARE HANDLER',23,'Syntax:\nDECLARE handler_action HANDLER\n FOR condition_value [, condition_value] ...\n statement\n\nhandler_action:\n CONTINUE\n | EXIT\n | UNDO\n\ncondition_value:\n mysql_error_code\n | SQLSTATE [VALUE] sqlstate_value\n | condition_name\n | SQLWARNING\n | NOT FOUND\n | SQLEXCEPTION\n\nThe DECLARE ... HANDLER statement specifies a handler that deals with\none or more conditions. If one of these conditions occurs, the\nspecified statement executes. statement can be a simple statement such\nas SET var_name = value, or a compound statement written using BEGIN\nand END (see [HELP BEGIN END]).\n\nHandler declarations must appear after variable or condition\ndeclarations.\n\nThe handler_action value indicates what action the handler takes after\nexecution of the handler statement:\n\no CONTINUE: Execution of the current program continues.\n\no EXIT: Execution terminates for the BEGIN ... END compound statement\n in which the handler is declared. This is true even if the condition\n occurs in an inner block.\n\no UNDO: Not supported.\n\nThe condition_value for DECLARE ... HANDLER indicates the specific\ncondition or class of conditions that activates the handler:\n\no A MySQL error code (a number) or an SQLSTATE value (a 5-character\n string literal). You should not use MySQL error code 0 or SQLSTATE\n values that begin with \'00\', because those indicate success rather\n than an error condition. For a list of MySQL error codes and SQLSTATE\n values, see\n https://mariadb.com/kb/en/mariadb-error-codes/.\n\no A condition name previously specified with DECLARE ... CONDITION. A\n condition name can be associated with a MySQL error code or SQLSTATE\n value. See [HELP DECLARE CONDITION].\n\no SQLWARNING is shorthand for the class of SQLSTATE values that begin\n with \'01\'.\n\no NOT FOUND is shorthand for the class of SQLSTATE values that begin\n with \'02\'. This is relevant within the context of cursors and is used\n to control what happens when a cursor reaches the end of a data set.\n If no more rows are available, a No Data condition occurs with\n SQLSTATE value \'02000\'. To detect this condition, you can set up a\n handler for it (or for a NOT FOUND condition). For an example, see\n https://mariadb.com/kb/en/cursor-overview/. This condition\n also occurs for SELECT ... INTO var_list statements that retrieve no\n rows.\n\no SQLEXCEPTION is shorthand for the class of SQLSTATE values that do\n not begin with \'00\', \'01\', or \'02\'.\n\nIf a condition occurs for which no handler has been declared, the\naction taken depends on the condition class:\n\no For SQLEXCEPTION conditions, the stored program terminates at the\n statement that raised the condition, as if there were an EXIT\n handler. If the program was called by another stored program, the\n calling program handles the condition using the handler selection\n rules applied to its own handlers.\n\no For SQLWARNING conditions, the program continues executing, as if\n there were a CONTINUE handler.\n\no For NOT FOUND conditions, if the condition was raised normally, the\n action is CONTINUE. If it was raised by SIGNAL or RESIGNAL, the\n action is EXIT.\n\nURL: https://mariadb.com/kb/en/declare-handler/\n\n','MariaDB> CREATE TABLE test.t (s1 INT, PRIMARY KEY (s1));\nQuery OK, 0 rows affected (0.00 sec)\n\nMariaDB> delimiter //\n\nMariaDB> CREATE PROCEDURE handlerdemo ()\n -> BEGIN\n -> DECLARE CONTINUE HANDLER FOR SQLSTATE \'23000\' SET @x2 = 1;\n -> SET @x = 1;\n -> INSERT INTO test.t VALUES (1);\n -> SET @x = 2;\n -> INSERT INTO test.t VALUES (1);\n -> SET @x = 3;\n -> END;\n -> //\nQuery OK, 0 rows affected (0.00 sec)\n\nMariaDB> CALL handlerdemo()//\nQuery OK, 0 rows affected (0.00 sec)\n\nMariaDB> SELECT @x//\n +------+\n | @x |\n +------+\n | 3 |\n +------+\n 1 row in set (0.00 sec)\n','https://mariadb.com/kb/en/declare-handler/'),(314,'DOUBLE',22,'DOUBLE[(M,D)] [UNSIGNED] [ZEROFILL]\n\nA normal-size (double-precision) floating-point number. Permissible\nvalues are -1.7976931348623157E+308 to -2.2250738585072014E-308, 0, and\n2.2250738585072014E-308 to 1.7976931348623157E+308. These are the\ntheoretical limits, based on the IEEE standard. The actual range might\nbe slightly smaller depending on your hardware or operating system.\n\nM is the total number of digits and D is the number of digits following\nthe decimal point. If M and D are omitted, values are stored to the\nlimits permitted by the hardware. A double-precision floating-point\nnumber is accurate to approximately 15 decimal places.\n\nUNSIGNED, if specified, disallows negative values.\n\nURL: https://mariadb.com/kb/en/double/\n\n','','https://mariadb.com/kb/en/double/'),(315,'TIME',22,'TIME\n\nA time. The range is \'-838:59:59\' to \'838:59:59\'. MySQL displays TIME\nvalues in \'HH:MM:SS\' format, but permits assignment of values to TIME\ncolumns using either strings or numbers.\n\nURL: https://mariadb.com/kb/en/time/\n\n','','https://mariadb.com/kb/en/time/'),(316,'&&',15,'Syntax:\nAND, &&\n\nLogical AND. Evaluates to 1 if all operands are nonzero and not NULL,\nto 0 if one or more operands are 0, otherwise NULL is returned.\n\nURL: https://mariadb.com/kb/en/and/\n\n','MariaDB> SELECT 1 && 1;\n -> 1\nMariaDB> SELECT 1 && 0;\n -> 0\nMariaDB> SELECT 1 && NULL;\n -> NULL\nMariaDB> SELECT 0 && NULL;\n -> 0\nMariaDB> SELECT NULL && 0;\n -> 0\n','https://mariadb.com/kb/en/and/'),(317,'X',11,'X(p)\n\nReturns the X-coordinate value for the Point object p as a\ndouble-precision number.\n\nURL: https://mariadb.com/kb/en/x/\n\n','MariaDB> SELECT X(POINT(56.7, 53.34));\n+-----------------------+\n| X(POINT(56.7, 53.34)) |\n+-----------------------+\n| 56.7 |\n+-----------------------+\n','https://mariadb.com/kb/en/x/'),(318,'SYSTEM_USER',17,'Syntax:\nSYSTEM_USER()\n\nSYSTEM_USER() is a synonym for USER().\n\nURL: https://mariadb.com/kb/en/system_user/\n\n','','https://mariadb.com/kb/en/system_user/'),(319,'FOUND_ROWS',17,'Syntax:\nFOUND_ROWS()\n\nA SELECT statement may include a LIMIT clause to restrict the number of\nrows the server returns to the client. In some cases, it is desirable\nto know how many rows the statement would have returned without the\nLIMIT, but without running the statement again. To obtain this row\ncount, include a SQL_CALC_FOUND_ROWS option in the SELECT statement,\nand then invoke FOUND_ROWS() afterward:\n\nURL: https://mariadb.com/kb/en/found_rows/\n\n','MariaDB> SELECT SQL_CALC_FOUND_ROWS * FROM tbl_name\n -> WHERE id > 100 LIMIT 10;\nMariaDB> SELECT FOUND_ROWS();\n','https://mariadb.com/kb/en/found_rows/'),(320,'CROSSES',30,'Crosses(g1,g2)\n\nReturns 1 if g1 spatially crosses g2. Returns NULL if g1 is a Polygon\nor a MultiPolygon, or if g2 is a Point or a MultiPoint. Otherwise,\nreturns 0.\n\nThe term spatially crosses denotes a spatial relation between two given\ngeometries that has the following properties:\n\no The two geometries intersect\n\no Their intersection results in a geometry that has a dimension that is\n one less than the maximum dimension of the two given geometries\n\no Their intersection is not equal to either of the two given geometries\n\nURL: https://mariadb.com/kb/en/crosses/\n\n','','https://mariadb.com/kb/en/crosses/'),(321,'TRUNCATE TABLE',39,'Syntax:\nTRUNCATE [TABLE] tbl_name\n\nTRUNCATE TABLE empties a table completely. It requires the DROP\nprivilege.\n\nLogically, TRUNCATE TABLE is similar to a DELETE statement that deletes\nall rows, or a sequence of DROP TABLE and CREATE TABLE statements. To\nachieve high performance, it bypasses the DML method of deleting data.\nThus, it cannot be rolled back, it does not cause ON DELETE triggers to\nfire, and it cannot be performed for InnoDB tables with parent-child\nforeign key relationships.\n\nAlthough TRUNCATE TABLE is similar to DELETE, it is classified as a DDL\nstatement rather than a DML statement. It differs from DELETE in the\nfollowing ways in MySQL 5.5:\n\no Truncate operations drop and re-create the table, which is much\n faster than deleting rows one by one, particularly for large tables.\n\no Truncate operations cause an implicit commit, and so cannot be rolled\n back.\n\no Truncation operations cannot be performed if the session holds an\n active table lock.\n\no TRUNCATE TABLE fails for an InnoDB table if there are any FOREIGN KEY\n constraints from other tables that reference the table. Foreign key\n constraints between columns of the same table are permitted.\n\no Truncation operations do not return a meaningful value for the number\n of deleted rows. The usual result is \"0 rows affected,\" which should\n be interpreted as \"no information.\"\n\no As long as the table format file tbl_name.frm is valid, the table can\n be re-created as an empty table with TRUNCATE TABLE, even if the data\n or index files have become corrupted.\n\no Any AUTO_INCREMENT value is reset to its start value. This is true\n even for MyISAM and InnoDB, which normally do not reuse sequence\n values.\n\no When used with partitioned tables, TRUNCATE TABLE preserves the\n partitioning; that is, the data and index files are dropped and\n re-created, while the partition definitions (.par) file is\n unaffected.\n\no The TRUNCATE TABLE statement does not invoke ON DELETE triggers.\n\nURL: https://mariadb.com/kb/en/truncate-table/\n\n','','https://mariadb.com/kb/en/truncate-table/'),(322,'BIT_XOR',16,'Syntax:\nBIT_XOR(expr)\n\nReturns the bitwise XOR of all bits in expr. The calculation is\nperformed with 64-bit (BIGINT) precision.\n\nURL: https://mariadb.com/kb/en/bit_xor/\n\n','','https://mariadb.com/kb/en/bit_xor/'),(323,'CURRENT_DATE',31,'Syntax:\nCURRENT_DATE, CURRENT_DATE()\n\nCURRENT_DATE and CURRENT_DATE() are synonyms for CURDATE().\n\nURL: https://mariadb.com/kb/en/current_date/\n\n','','https://mariadb.com/kb/en/current_date/'),(324,'START SLAVE',8,'Syntax:\nSTART SLAVE [thread_types]\n\nSTART SLAVE [SQL_THREAD] UNTIL\n MASTER_LOG_FILE = \'log_name\', MASTER_LOG_POS = log_pos\n\nSTART SLAVE [SQL_THREAD] UNTIL\n RELAY_LOG_FILE = \'log_name\', RELAY_LOG_POS = log_pos\n\nthread_types:\n [thread_type [, thread_type] ... ]\n\nthread_type: IO_THREAD | SQL_THREAD\n\nSTART SLAVE with no thread_type options starts both of the slave\nthreads. The I/O thread reads events from the master server and stores\nthem in the relay log. The SQL thread reads events from the relay log\nand executes them. START SLAVE requires the SUPER privilege.\n\nIf START SLAVE succeeds in starting the slave threads, it returns\nwithout any error. However, even in that case, it might be that the\nslave threads start and then later stop (for example, because they do\nnot manage to connect to the master or read its binary log, or some\nother problem). START SLAVE does not warn you about this. You must\ncheck the slave\'s error log for error messages generated by the slave\nthreads, or check that they are running satisfactorily with SHOW SLAVE\nSTATUS.\n\nURL: https://mariadb.com/kb/en/start-slave/\n\n','','https://mariadb.com/kb/en/start-slave/'),(325,'AREA',2,'Area(poly)\n\nReturns as a double-precision number the area of the Polygon value\npoly, as measured in its spatial reference system.\n\nURL: https://mariadb.com/kb/en/area/\n\n','MariaDB> SET @poly = \'Polygon((0 0,0 3,3 0,0 0),(1 1,1 2,2 1,1 1))\';\nMariaDB> SELECT Area(GeomFromText(@poly));\n+---------------------------+\n| Area(GeomFromText(@poly)) |\n+---------------------------+\n| 4 |\n+---------------------------+\n','https://mariadb.com/kb/en/area/'),(326,'FLUSH',26,'Syntax:\nFLUSH [NO_WRITE_TO_BINLOG | LOCAL]\n flush_option [, flush_option] ...\n\nThe FLUSH statement has several variant forms that clear or reload\nvarious internal caches, flush tables, or acquire locks. To execute\nFLUSH, you must have the RELOAD privilege. Specific flush options might\nrequire additional privileges, as described later.\n\nBy default, the server writes FLUSH statements to the binary log so\nthat they replicate to replication slaves. To suppress logging, use the\noptional NO_WRITE_TO_BINLOG keyword or its alias LOCAL.\n\n*Note*: FLUSH LOGS, FLUSH MASTER, FLUSH SLAVE, and FLUSH TABLES WITH\nREAD LOCK (with or without a table list) are not written to the binary\nlog in any case because they would cause problems if replicated to a\nslave.\n\nThe FLUSH statement causes an implicit commit. See\nhttp://dev.mysql.com/doc/refman/5.5/en/implicit-commit.html.\n\nThe RESET statement is similar to FLUSH. See [HELP RESET], for\ninformation about using the RESET statement with replication.\n\nURL: https://mariadb.com/kb/en/flush/\n\n','','https://mariadb.com/kb/en/flush/'),(327,'BEGIN END',23,'Syntax:\n[begin_label:] BEGIN\n [statement_list]\nEND [end_label]\n\nBEGIN ... END syntax is used for writing compound statements, which can\nappear within stored programs (stored procedures and functions,\ntriggers, and events). A compound statement can contain multiple\nstatements, enclosed by the BEGIN and END keywords. statement_list\nrepresents a list of one or more statements, each terminated by a\nsemicolon (;) statement delimiter. The statement_list itself is\noptional, so the empty compound statement (BEGIN END) is legal.\n\nBEGIN ... END blocks can be nested.\n\nUse of multiple statements requires that a client is able to send\nstatement strings containing the ; statement delimiter. In the mysql\ncommand-line client, this is handled with the delimiter command.\nChanging the ; end-of-statement delimiter (for example, to //) permit ;\nto be used in a program body. For an example, see\nhttps://mariadb.com/kb/en/stored-procedure-overview/.\n\nA BEGIN ... END block can be labeled. See [HELP labels].\n\nURL: https://mariadb.com/kb/en/begin-end/\n\n','','https://mariadb.com/kb/en/begin-end/'),(328,'SHOW PROCEDURE STATUS',26,'Syntax:\nSHOW PROCEDURE STATUS\n [LIKE \'pattern\' | WHERE expr]\n\nThis statement is a MySQL extension. It returns characteristics of a\nstored procedure, such as the database, name, type, creator, creation\nand modification dates, and character set information. A similar\nstatement, SHOW FUNCTION STATUS, displays information about stored\nfunctions (see [HELP SHOW FUNCTION STATUS]).\n\nThe LIKE clause, if present, indicates which procedure or function\nnames to match. The WHERE clause can be given to select rows using more\ngeneral conditions, as discussed in\nhttps://mariadb.com/kb/en/extended-show/.\n\nURL: https://mariadb.com/kb/en/show-procedure-status/\n\n','MariaDB> SHOW PROCEDURE STATUS LIKE \'sp1\'\\G\n*************************** 1. row ***************************\n Db: test\n Name: sp1\n Type: PROCEDURE\n Definer: testuser@localhost\n Modified: 2004-08-03 15:29:37\n Created: 2004-08-03 15:29:37\n Security_type: DEFINER\n Comment:\ncharacter_set_client: latin1\ncollation_connection: latin1_swedish_ci\n Database Collation: latin1_swedish_ci\n','https://mariadb.com/kb/en/show-procedure-status/'),(329,'DESCRIBE',28,'Syntax:\n{DESCRIBE | DESC} tbl_name [col_name | wild]\n\nDESCRIBE provides information about the columns in a table. It is a\nshortcut for SHOW COLUMNS FROM. These statements also display\ninformation for views. (See [HELP SHOW COLUMNS].)\n\ncol_name can be a column name, or a string containing the SQL \"%\" and\n\"_\" wildcard characters to obtain output only for the columns with\nnames matching the string. There is no need to enclose the string\nwithin quotation marks unless it contains spaces or other special\ncharacters.\n\nMariaDB> DESCRIBE City;\n+------------+----------+------+-----+---------+----------------+\n| Field | Type | Null | Key | Default | Extra |\n+------------+----------+------+-----+---------+----------------+\n| Id | int(11) | NO | PRI | NULL | auto_increment |\n| Name | char(35) | NO | | | |\n| Country | char(3) | NO | UNI | | |\n| District | char(20) | YES | MUL | | |\n| Population | int(11) | NO | | 0 | |\n+------------+----------+------+-----+---------+----------------+\n5 rows in set (0.00 sec)\n\nThe description for SHOW COLUMNS provides more information about the\noutput columns (see [HELP SHOW COLUMNS]).\n\nURL: https://mariadb.com/kb/en/describe/\n\n','','https://mariadb.com/kb/en/describe/'),(330,'SHOW WARNINGS',26,'Syntax:\nSHOW WARNINGS [LIMIT [offset,] row_count]\nSHOW COUNT(*) WARNINGS\n\nSHOW WARNINGS shows information about the conditions (errors, warnings,\nand notes) that resulted from the last statement in the current session\nthat generated messages. It shows nothing if the last statement used a\ntable and generated no messages. (That is, a statement that uses a\ntable but generates no messages clears the message list.) Statements\nthat do not use tables and do not generate messages have no effect on\nthe message list.\n\nWarnings are generated for DML statements such as INSERT, UPDATE, and\nLOAD DATA INFILE as well as DDL statements such as CREATE TABLE and\nALTER TABLE.\n\nSHOW WARNINGS is also used following EXPLAIN EXTENDED, to display the\nextra information generated by EXPLAIN when the EXTENDED keyword is\nused. See https://mariadb.com/kb/en/explain#explain-extended.\n\nThe LIMIT clause has the same syntax as for the SELECT statement. See\nhttps://mariadb.com/kb/en/select/.\n\nA related statement, SHOW ERRORS, shows only the error conditions (it\nexcludes warnings and notes). See [HELP SHOW ERRORS].\n\nThe SHOW COUNT(*) WARNINGS statement displays the total number of\nerrors, warnings, and notes. You can also retrieve this number from the\nwarning_count system variable:\n\nSHOW COUNT(*) WARNINGS;\nSELECT @@warning_count;\n\nURL: https://mariadb.com/kb/en/show-warnings/\n\n','','https://mariadb.com/kb/en/show-warnings/'),(331,'DROP USER',10,'Syntax:\nDROP USER user [, user] ...\n\nThe DROP USER statement removes one or more MySQL accounts and their\nprivileges. It removes privilege rows for the account from all grant\ntables. To use this statement, you must have the global CREATE USER\nprivilege or the DELETE privilege for the mysql database. Each account\nname uses the format described in\nhttps://mariadb.com/kb/en/create-user#account-names. For example:\n\nDROP USER \'jeffrey\'@\'localhost\';\n\nIf you specify only the user name part of the account name, a host name\npart of \'%\' is used.\n\nURL: https://mariadb.com/kb/en/drop-user/\n\n','','https://mariadb.com/kb/en/drop-user/'),(332,'STDDEV_POP',16,'Syntax:\nSTDDEV_POP(expr)\n\nReturns the population standard deviation of expr (the square root of\nVAR_POP()). You can also use STD() or STDDEV(), which are equivalent\nbut not standard SQL.\n\nSTDDEV_POP() returns NULL if there were no matching rows.\n\nURL: https://mariadb.com/kb/en/stddev_pop/\n\n','','https://mariadb.com/kb/en/stddev_pop/'),(333,'SHOW CHARACTER SET',26,'Syntax:\nSHOW CHARACTER SET\n [LIKE \'pattern\' | WHERE expr]\n\nThe SHOW CHARACTER SET statement shows all available character sets.\nThe LIKE clause, if present, indicates which character set names to\nmatch. The WHERE clause can be given to select rows using more general\nconditions, as discussed in\nhttps://mariadb.com/kb/en/extended-show/. For example:\n\nMariaDB> SHOW CHARACTER SET LIKE \'latin%\';\n+---------+-----------------------------+-------------------+--------+\n| Charset | Description | Default collation | Maxlen |\n+---------+-----------------------------+-------------------+--------+\n| latin1 | cp1252 West European | latin1_swedish_ci | 1 |\n| latin2 | ISO 8859-2 Central European | latin2_general_ci | 1 |\n| latin5 | ISO 8859-9 Turkish | latin5_turkish_ci | 1 |\n| latin7 | ISO 8859-13 Baltic | latin7_general_ci | 1 |\n+---------+-----------------------------+-------------------+--------+\n\nURL: https://mariadb.com/kb/en/show-character-set/\n\n','','https://mariadb.com/kb/en/show-character-set/'),(334,'SUBSTRING',37,'Syntax:\nSUBSTRING(str,pos), SUBSTRING(str FROM pos), SUBSTRING(str,pos,len),\nSUBSTRING(str FROM pos FOR len)\n\nThe forms without a len argument return a substring from string str\nstarting at position pos. The forms with a len argument return a\nsubstring len characters long from string str, starting at position\npos. The forms that use FROM are standard SQL syntax. It is also\npossible to use a negative value for pos. In this case, the beginning\nof the substring is pos characters from the end of the string, rather\nthan the beginning. A negative value may be used for pos in any of the\nforms of this function.\n\nFor all forms of SUBSTRING(), the position of the first character in\nthe string from which the substring is to be extracted is reckoned as\n1.\n\nURL: https://mariadb.com/kb/en/substring/\n\n','MariaDB> SELECT SUBSTRING(\'Quadratically\',5);\n -> \'ratically\'\nMariaDB> SELECT SUBSTRING(\'foobarbar\' FROM 4);\n -> \'barbar\'\nMariaDB> SELECT SUBSTRING(\'Quadratically\',5,6);\n -> \'ratica\'\nMariaDB> SELECT SUBSTRING(\'Sakila\', -3);\n -> \'ila\'\nMariaDB> SELECT SUBSTRING(\'Sakila\', -5, 3);\n -> \'aki\'\nMariaDB> SELECT SUBSTRING(\'Sakila\' FROM -4 FOR 2);\n -> \'ki\'\n','https://mariadb.com/kb/en/substring/'),(335,'ISEMPTY',36,'IsEmpty(g)\n\nReturns 1 if the geometry value g is the empty geometry, 0 if it is not\nempty, and -1 if the argument is NULL. If the geometry is empty, it\nrepresents the empty point set.\n\nURL: https://mariadb.com/kb/en/isempty/\n\n','','https://mariadb.com/kb/en/isempty/'),(336,'SHOW FUNCTION STATUS',26,'Syntax:\nSHOW FUNCTION STATUS\n [LIKE \'pattern\' | WHERE expr]\n\nThis statement is similar to SHOW PROCEDURE STATUS but for stored\nfunctions. See [HELP SHOW PROCEDURE STATUS].\n\nURL: https://mariadb.com/kb/en/show-function-status/\n\n','','https://mariadb.com/kb/en/show-function-status/'),(337,'LTRIM',37,'Syntax:\nLTRIM(str)\n\nReturns the string str with leading space characters removed.\n\nURL: https://mariadb.com/kb/en/ltrim/\n\n','MariaDB> SELECT LTRIM(\' barbar\');\n -> \'barbar\'\n','https://mariadb.com/kb/en/ltrim/'),(338,'INTERSECTS',30,'Intersects(g1,g2)\n\nReturns 1 or 0 to indicate whether g1 spatially intersects g2.\n\nURL: https://mariadb.com/kb/en/intersects/\n\n','','https://mariadb.com/kb/en/intersects/'),(339,'CALL',27,'Syntax:\nCALL sp_name([parameter[,...]])\nCALL sp_name[()]\n\nThe CALL statement invokes a stored procedure that was defined\npreviously with CREATE PROCEDURE.\n\nStored procedures that take no arguments can be invoked without\nparentheses. That is, CALL p() and CALL p are equivalent.\n\nCALL can pass back values to its caller using parameters that are\ndeclared as OUT or INOUT parameters. When the procedure returns, a\nclient program can also obtain the number of rows affected for the\nfinal statement executed within the routine: At the SQL level, call the\nROW_COUNT() function; from the C API, call the mysql_affected_rows()\nfunction.\n\nURL: https://mariadb.com/kb/en/call/\n\n','','https://mariadb.com/kb/en/call/'),(340,'MBRDISJOINT',6,'MBRDisjoint(g1,g2)\n\nReturns 1 or 0 to indicate whether the Minimum Bounding Rectangles of\nthe two geometries g1 and g2 are disjoint (do not intersect).\n\nURL: https://mariadb.com/kb/en/mbrdisjoint/\n\n','','https://mariadb.com/kb/en/mbrdisjoint/'),(341,'VALUES',14,'Syntax:\nVALUES(col_name)\n\nIn an INSERT ... ON DUPLICATE KEY UPDATE statement, you can use the\nVALUES(col_name) function in the UPDATE clause to refer to column\nvalues from the INSERT portion of the statement. In other words,\nVALUES(col_name) in the UPDATE clause refers to the value of col_name\nthat would be inserted, had no duplicate-key conflict occurred. This\nfunction is especially useful in multiple-row inserts. The VALUES()\nfunction is meaningful only in the ON DUPLICATE KEY UPDATE clause of\nINSERT statements and returns NULL otherwise. See\nhttps://mariadb.com/kb/en/insert-on-duplicate-key-update/.\n\nURL: https://mariadb.com/kb/en/values/\n\n','MariaDB> INSERT INTO table (a,b,c) VALUES (1,2,3),(4,5,6)\n -> ON DUPLICATE KEY UPDATE c=VALUES(a)+VALUES(b);\n','https://mariadb.com/kb/en/values/'),(342,'SUBSTRING_INDEX',37,'Syntax:\nSUBSTRING_INDEX(str,delim,count)\n\nReturns the substring from string str before count occurrences of the\ndelimiter delim. If count is positive, everything to the left of the\nfinal delimiter (counting from the left) is returned. If count is\nnegative, everything to the right of the final delimiter (counting from\nthe right) is returned. SUBSTRING_INDEX() performs a case-sensitive\nmatch when searching for delim.\n\nURL: https://mariadb.com/kb/en/substring_index/\n\n','MariaDB> SELECT SUBSTRING_INDEX(\'www.mariadb.org\', \'.\', 2);\n -> \'www.mariadb\'\nMariaDB> SELECT SUBSTRING_INDEX(\'www.mariadb.org\', \'.\', -2);\n -> \'mariadb.org\'\n','https://mariadb.com/kb/en/substring_index/'),(343,'ENCODE',12,'Syntax:\nENCODE(str,pass_str)\n\nEncrypt str using pass_str as the password. To decrypt the result, use\nDECODE().\n\nThe result is a binary string of the same length as str.\n\nThe strength of the encryption is based on how good the random\ngenerator is. It should suffice for short strings.\n\nURL: https://mariadb.com/kb/en/encode/\n\n','','https://mariadb.com/kb/en/encode/'),(344,'LOOP',23,'Syntax:\n[begin_label:] LOOP\n statement_list\nEND LOOP [end_label]\n\nLOOP implements a simple loop construct, enabling repeated execution of\nthe statement list, which consists of one or more statements, each\nterminated by a semicolon (;) statement delimiter. The statements\nwithin the loop are repeated until the loop is terminated. Usually,\nthis is accomplished with a LEAVE statement. Within a stored function,\nRETURN can also be used, which exits the function entirely.\n\nNeglecting to include a loop-termination statement results in an\ninfinite loop.\n\nA LOOP statement can be labeled. For the rules regarding label use, see\n[HELP labels].\n\nURL: https://mariadb.com/kb/en/loop/\n\n','CREATE PROCEDURE doiterate(p1 INT)\nBEGIN\n label1: LOOP\n SET p1 = p1 + 1;\n IF p1 < 10 THEN\n ITERATE label1;\n END IF;\n LEAVE label1;\n END LOOP label1;\n SET @x = p1;\nEND;\n','https://mariadb.com/kb/en/loop/'),(345,'TRUNCATE',4,'Syntax:\nTRUNCATE(X,D)\n\nReturns the number X, truncated to D decimal places. If D is 0, the\nresult has no decimal point or fractional part. D can be negative to\ncause D digits left of the decimal point of the value X to become zero.\n\nURL: https://mariadb.com/kb/en/truncate/\n\n','MariaDB> SELECT TRUNCATE(1.223,1);\n -> 1.2\nMariaDB> SELECT TRUNCATE(1.999,1);\n -> 1.9\nMariaDB> SELECT TRUNCATE(1.999,0);\n -> 1\nMariaDB> SELECT TRUNCATE(-1.999,1);\n -> -1.9\nMariaDB> SELECT TRUNCATE(122,-2);\n -> 100\nMariaDB> SELECT TRUNCATE(10.28*100,0);\n -> 1028\n','https://mariadb.com/kb/en/truncate/'),(346,'TIMESTAMPADD',31,'Syntax:\nTIMESTAMPADD(unit,interval,datetime_expr)\n\nAdds the integer expression interval to the date or datetime expression\ndatetime_expr. The unit for interval is given by the unit argument,\nwhich should be one of the following values: MICROSECOND\n(microseconds), SECOND, MINUTE, HOUR, DAY, WEEK, MONTH, QUARTER, or\nYEAR.\n\nIt is possible to use FRAC_SECOND in place of MICROSECOND, but\nFRAC_SECOND is deprecated. FRAC_SECOND was removed in MySQL 5.5.3.\n\nThe unit value may be specified using one of keywords as shown, or with\na prefix of SQL_TSI_. For example, DAY and SQL_TSI_DAY both are legal.\n\nURL: https://mariadb.com/kb/en/timestampadd/\n\n','MariaDB> SELECT TIMESTAMPADD(MINUTE,1,\'2003-01-02\');\n -> \'2003-01-02 00:01:00\'\nMariaDB> SELECT TIMESTAMPADD(WEEK,1,\'2003-01-02\');\n -> \'2003-01-09\'\n','https://mariadb.com/kb/en/timestampadd/'),(347,'SHOW',26,'SHOW has many forms that provide information about databases, tables,\ncolumns, or status information about the server. This section describes\nthose following:\n\nSHOW AUTHORS\nSHOW {BINARY | MASTER} LOGS\nSHOW BINLOG EVENTS [IN \'log_name\'] [FROM pos] [LIMIT [offset,] row_count]\nSHOW CHARACTER SET [like_or_where]\nSHOW COLLATION [like_or_where]\nSHOW [FULL] COLUMNS FROM tbl_name [FROM db_name] [like_or_where]\nSHOW CONTRIBUTORS\nSHOW CREATE DATABASE db_name\nSHOW CREATE EVENT event_name\nSHOW CREATE FUNCTION func_name\nSHOW CREATE PROCEDURE proc_name\nSHOW CREATE TABLE tbl_name\nSHOW CREATE TRIGGER trigger_name\nSHOW CREATE VIEW view_name\nSHOW DATABASES [like_or_where]\nSHOW ENGINE engine_name {STATUS | MUTEX}\nSHOW [STORAGE] ENGINES\nSHOW ERRORS [LIMIT [offset,] row_count]\nSHOW EVENTS\nSHOW FUNCTION CODE func_name\nSHOW FUNCTION STATUS [like_or_where]\nSHOW GRANTS FOR user\nSHOW INDEX FROM tbl_name [FROM db_name]\nSHOW MASTER STATUS\nSHOW OPEN TABLES [FROM db_name] [like_or_where]\nSHOW PLUGINS\nSHOW PROCEDURE CODE proc_name\nSHOW PROCEDURE STATUS [like_or_where]\nSHOW PRIVILEGES\nSHOW [FULL] PROCESSLIST\nSHOW PROFILE [types] [FOR QUERY n] [OFFSET n] [LIMIT n]\nSHOW PROFILES\nSHOW SLAVE HOSTS\nSHOW SLAVE STATUS\nSHOW [GLOBAL | SESSION] STATUS [like_or_where]\nSHOW TABLE STATUS [FROM db_name] [like_or_where]\nSHOW [FULL] TABLES [FROM db_name] [like_or_where]\nSHOW TRIGGERS [FROM db_name] [like_or_where]\nSHOW [GLOBAL | SESSION] VARIABLES [like_or_where]\nSHOW WARNINGS [LIMIT [offset,] row_count]\n\nlike_or_where:\n LIKE \'pattern\'\n | WHERE expr\n\nIf the syntax for a given SHOW statement includes a LIKE \'pattern\'\npart, \'pattern\' is a string that can contain the SQL \"%\" and \"_\"\nwildcard characters. The pattern is useful for restricting statement\noutput to matching values.\n\nSeveral SHOW statements also accept a WHERE clause that provides more\nflexibility in specifying which rows to display. See\nhttps://mariadb.com/kb/en/extended-show/.\n\nURL: https://mariadb.com/kb/en/show/\n\n','','https://mariadb.com/kb/en/show/'),(348,'GREATEST',18,'Syntax:\nGREATEST(value1,value2,...)\n\nWith two or more arguments, returns the largest (maximum-valued)\nargument. The arguments are compared using the same rules as for\nLEAST().\n\nURL: https://mariadb.com/kb/en/greatest/\n\n','MariaDB> SELECT GREATEST(2,0);\n -> 2\nMariaDB> SELECT GREATEST(34.0,3.0,5.0,767.0);\n -> 767.0\nMariaDB> SELECT GREATEST(\'B\',\'A\',\'C\');\n -> \'C\'\n','https://mariadb.com/kb/en/greatest/'),(349,'SHOW VARIABLES',26,'Syntax:\nSHOW [GLOBAL | SESSION] VARIABLES\n [LIKE \'pattern\' | WHERE expr]\n\nSHOW VARIABLES shows the values of MySQL system variables. This\ninformation also can be obtained using the mysqladmin variables\ncommand. The LIKE clause, if present, indicates which variable names to\nmatch. The WHERE clause can be given to select rows using more general\nconditions, as discussed in\nhttps://mariadb.com/kb/en/extended-show/. This\nstatement does not require any privilege. It requires only the ability\nto connect to the server.\n\nWith the GLOBAL modifier, SHOW VARIABLES displays the values that are\nused for new connections to MySQL. As of MySQL 5.5.3, if a variable has\nno global value, no value is displayed. Before 5.5.3, the session value\nis displayed. With SESSION, SHOW VARIABLES displays the values that are\nin effect for the current connection. If no modifier is present, the\ndefault is SESSION. LOCAL is a synonym for SESSION.\nWith a LIKE clause, the statement displays only rows for those\nvariables with names that match the pattern. To obtain the row for a\nspecific variable, use a LIKE clause as shown:\n\nSHOW VARIABLES LIKE \'max_join_size\';\nSHOW SESSION VARIABLES LIKE \'max_join_size\';\n\nTo get a list of variables whose name match a pattern, use the \"%\"\nwildcard character in a LIKE clause:\n\nSHOW VARIABLES LIKE \'%size%\';\nSHOW GLOBAL VARIABLES LIKE \'%size%\';\n\nWildcard characters can be used in any position within the pattern to\nbe matched. Strictly speaking, because \"_\" is a wildcard that matches\nany single character, you should escape it as \"\\_\" to match it\nliterally. In practice, this is rarely necessary.\n\nURL: https://mariadb.com/kb/en/show-variables/\n\n','','https://mariadb.com/kb/en/show-variables/'),(350,'BINLOG',26,'Syntax:\nBINLOG \'str\'\n\nBINLOG is an internal-use statement. It is generated by the mysqlbinlog\nprogram as the printable representation of certain events in binary log\nfiles. (See https://mariadb.com/kb/en/mysqlbinlog/.)\nThe \'str\' value is a base 64-encoded string the that server decodes to\ndetermine the data change indicated by the corresponding event. This\nstatement requires the SUPER privilege.\n\nURL: https://mariadb.com/kb/en/binlog/\n\n','','https://mariadb.com/kb/en/binlog/'),(351,'BIT_AND',16,'Syntax:\nBIT_AND(expr)\n\nReturns the bitwise AND of all bits in expr. The calculation is\nperformed with 64-bit (BIGINT) precision.\n\nURL: https://mariadb.com/kb/en/bit_and/\n\n','','https://mariadb.com/kb/en/bit_and/'),(352,'SECOND',31,'Syntax:\nSECOND(time)\n\nReturns the second for time, in the range 0 to 59.\n\nURL: https://mariadb.com/kb/en/second/\n\n','MariaDB> SELECT SECOND(\'10:05:03\');\n -> 3\n','https://mariadb.com/kb/en/second/'),(353,'ATAN2',4,'Syntax:\nATAN(Y,X), ATAN2(Y,X)\n\nReturns the arc tangent of the two variables X and Y. It is similar to\ncalculating the arc tangent of Y / X, except that the signs of both\narguments are used to determine the quadrant of the result.\n\nURL: https://mariadb.com/kb/en/atan2/\n\n','MariaDB> SELECT ATAN(-2,2);\n -> -0.78539816339745\nMariaDB> SELECT ATAN2(PI(),0);\n -> 1.5707963267949\n','https://mariadb.com/kb/en/atan2/'),(354,'MBRCONTAINS',6,'MBRContains(g1,g2)\n\nReturns 1 or 0 to indicate whether the Minimum Bounding Rectangle of g1\ncontains the Minimum Bounding Rectangle of g2. This tests the opposite\nrelationship as MBRWithin().\n\nURL: https://mariadb.com/kb/en/mbrcontains/\n\n','MariaDB> SET @g1 = GeomFromText(\'Polygon((0 0,0 3,3 3,3 0,0 0))\');\nMariaDB> SET @g2 = GeomFromText(\'Point(1 1)\');\nMariaDB> SELECT MBRContains(@g1,@g2), MBRContains(@g2,@g1);\n----------------------+----------------------+\n| MBRContains(@g1,@g2) | MBRContains(@g2,@g1) |\n+----------------------+----------------------+\n| 1 | 0 |\n+----------------------+----------------------+\n','https://mariadb.com/kb/en/mbrcontains/'),(355,'HOUR',31,'Syntax:\nHOUR(time)\n\nReturns the hour for time. The range of the return value is 0 to 23 for\ntime-of-day values. However, the range of TIME values actually is much\nlarger, so HOUR can return values greater than 23.\n\nURL: https://mariadb.com/kb/en/hour/\n\n','MariaDB> SELECT HOUR(\'10:05:03\');\n -> 10\nMariaDB> SELECT HOUR(\'272:59:59\');\n -> 272\n','https://mariadb.com/kb/en/hour/'),(356,'SELECT',27,'Syntax:\nSELECT\n [ALL | DISTINCT | DISTINCTROW ]\n [HIGH_PRIORITY]\n [STRAIGHT_JOIN]\n [SQL_SMALL_RESULT] [SQL_BIG_RESULT] [SQL_BUFFER_RESULT]\n [SQL_CACHE | SQL_NO_CACHE] [SQL_CALC_FOUND_ROWS]\n select_expr [, select_expr ...]\n [FROM table_references\n [WHERE where_condition]\n [GROUP BY {col_name | expr | position}\n [ASC | DESC], ... [WITH ROLLUP]]\n [HAVING where_condition]\n [ORDER BY {col_name | expr | position}\n [ASC | DESC], ...]\n [LIMIT {[offset,] row_count | row_count OFFSET offset}]\n [PROCEDURE procedure_name(argument_list)]\n [INTO OUTFILE \'file_name\'\n [CHARACTER SET charset_name]\n export_options\n | INTO DUMPFILE \'file_name\'\n | INTO var_name [, var_name]]\n [FOR UPDATE | LOCK IN SHARE MODE]]\n\nSELECT is used to retrieve rows selected from one or more tables, and\ncan include UNION statements and subqueries. See [HELP UNION], and\nhttps://mariadb.com/kb/en/subqueries/.\n\nThe most commonly used clauses of SELECT statements are these:\n\no Each select_expr indicates a column that you want to retrieve. There\n must be at least one select_expr.\n\no table_references indicates the table or tables from which to retrieve\n rows. Its syntax is described in [HELP JOIN].\n\no The WHERE clause, if given, indicates the condition or conditions\n that rows must satisfy to be selected. where_condition is an\n expression that evaluates to true for each row to be selected. The\n statement selects all rows if there is no WHERE clause.\n\n In the WHERE expression, you can use any of the functions and\n operators that MySQL supports, except for aggregate (summary)\n functions. See\n https://mariadb.com/kb/en/select#select-expressions, and\n https://mariadb.com/kb/en/functions-and-operators/.\n\nSELECT can also be used to retrieve rows computed without reference to\nany table.\n\nURL: https://mariadb.com/kb/en/select/\n\n','','https://mariadb.com/kb/en/select/'),(357,'COT',4,'Syntax:\nCOT(X)\n\nReturns the cotangent of X.\n\nURL: https://mariadb.com/kb/en/cot/\n\n','MariaDB> SELECT COT(12);\n -> -1.5726734063977\nMariaDB> SELECT COT(0);\n -> NULL\n','https://mariadb.com/kb/en/cot/'),(358,'SHOW CREATE EVENT',26,'Syntax:\nSHOW CREATE EVENT event_name\n\nThis statement displays the CREATE EVENT statement needed to re-create\na given event. It requires the EVENT privilege for the database from\nwhich the event is to be shown. For example (using the same event\ne_daily defined and then altered in [HELP SHOW EVENTS]):\n\nURL: https://mariadb.com/kb/en/show-create-event/\n\n','MariaDB> SHOW CREATE EVENT test.e_daily\\G\n*************************** 1. row ***************************\n Event: e_daily\n sql_mode:\n time_zone: SYSTEM\n Create Event: CREATE EVENT `e_daily`\n ON SCHEDULE EVERY 1 DAY\n STARTS CURRENT_TIMESTAMP + INTERVAL 6 HOUR\n ON COMPLETION NOT PRESERVE\n ENABLE\n COMMENT \'Saves total number of sessions then\n clears the table each day\'\n DO BEGIN\n INSERT INTO site_activity.totals (time, total)\n SELECT CURRENT_TIMESTAMP, COUNT(*)\n FROM site_activity.sessions;\n DELETE FROM site_activity.sessions;\n END\ncharacter_set_client: latin1\ncollation_connection: latin1_swedish_ci\n Database Collation: latin1_swedish_ci\n','https://mariadb.com/kb/en/show-create-event/'),(359,'LOAD_FILE',37,'Syntax:\nLOAD_FILE(file_name)\n\nReads the file and returns the file contents as a string. To use this\nfunction, the file must be located on the server host, you must specify\nthe full path name to the file, and you must have the FILE privilege.\nThe file must be readable by all and its size less than\nmax_allowed_packet bytes. If the secure_file_priv system variable is\nset to a nonempty directory name, the file to be loaded must be located\nin that directory.\n\nIf the file does not exist or cannot be read because one of the\npreceding conditions is not satisfied, the function returns NULL.\n\nThe character_set_filesystem system variable controls interpretation of\nfile names that are given as literal strings.\n\nURL: https://mariadb.com/kb/en/load_file/\n\n','MariaDB> UPDATE t\n SET blob_col=LOAD_FILE(\'/tmp/picture\')\n WHERE id=1;\n','https://mariadb.com/kb/en/load_file/'),(360,'POINTFROMTEXT',3,'PointFromText(wkt[,srid])\n\nConstructs a POINT value using its WKT representation and SRID.\n\nURL: https://mariadb.com/kb/en/pointfromtext/\n\n','','https://mariadb.com/kb/en/pointfromtext/'),(361,'GROUP_CONCAT',16,'Syntax:\nGROUP_CONCAT(expr)\n\nThis function returns a string result with the concatenated non-NULL\nvalues from a group. It returns NULL if there are no non-NULL values.\nThe full syntax is as follows:\n\nGROUP_CONCAT([DISTINCT] expr [,expr ...]\n [ORDER BY {unsigned_integer | col_name | expr}\n [ASC | DESC] [,col_name ...]]\n [SEPARATOR str_val])\n\nURL: https://mariadb.com/kb/en/group_concat/\n\n','MariaDB> SELECT student_name,\n -> GROUP_CONCAT(test_score)\n -> FROM student\n -> GROUP BY student_name;\n','https://mariadb.com/kb/en/group_concat/'),(362,'DATE_FORMAT',31,'Syntax:\nDATE_FORMAT(date,format)\n\nFormats the date value according to the format string.\n\nURL: https://mariadb.com/kb/en/date_format/\n\n','MariaDB> SELECT DATE_FORMAT(\'2009-10-04 22:23:00\', \'%W %M %Y\');\n -> \'Sunday October 2009\'\nMariaDB> SELECT DATE_FORMAT(\'2007-10-04 22:23:00\', \'%H:%i:%s\');\n -> \'22:23:00\'\nMariaDB> SELECT DATE_FORMAT(\'1900-10-04 22:23:00\',\n -> \'%D %y %a %d %m %b %j\');\n -> \'4th 00 Thu 04 10 Oct 277\'\nMariaDB> SELECT DATE_FORMAT(\'1997-10-04 22:23:00\',\n -> \'%H %k %I %r %T %S %w\');\n -> \'22 22 10 10:23:00 PM 22:23:00 00 6\'\nMariaDB> SELECT DATE_FORMAT(\'1999-01-01\', \'%X %V\');\n -> \'1998 52\'\nMariaDB> SELECT DATE_FORMAT(\'2006-06-00\', \'%d\');\n -> \'00\'\n','https://mariadb.com/kb/en/date_format/'),(363,'BENCHMARK',17,'Syntax:\nBENCHMARK(count,expr)\n\nThe BENCHMARK() function executes the expression expr repeatedly count\ntimes. It may be used to time how quickly MySQL processes the\nexpression. The result value is always 0. The intended use is from\nwithin the mysql client, which reports query execution times:\n\nURL: https://mariadb.com/kb/en/benchmark/\n\n','MariaDB> SELECT BENCHMARK(1000000,ENCODE(\'hello\',\'goodbye\'));\n+----------------------------------------------+\n| BENCHMARK(1000000,ENCODE(\'hello\',\'goodbye\')) |\n+----------------------------------------------+\n| 0 |\n+----------------------------------------------+\n1 row in set (4.74 sec)\n','https://mariadb.com/kb/en/benchmark/'),(364,'YEAR',31,'Syntax:\nYEAR(date)\n\nReturns the year for date, in the range 1000 to 9999, or 0 for the\n\"zero\" date.\n\nURL: https://mariadb.com/kb/en/year/\n\n','MariaDB> SELECT YEAR(\'1987-01-01\');\n -> 1987\n','https://mariadb.com/kb/en/year/'),(365,'SHOW ENGINE',26,'Syntax:\nSHOW ENGINE engine_name {STATUS | MUTEX}\n\nSHOW ENGINE displays operational information about a storage engine.\nThe following statements currently are supported:\n\nSHOW ENGINE INNODB STATUS\nSHOW ENGINE INNODB MUTEX\nSHOW ENGINE PERFORMANCE_SCHEMA STATUS\n\nSHOW ENGINE INNODB STATUS displays extensive information from the\nstandard InnoDB Monitor about the state of the InnoDB storage engine.\nFor information about the standard monitor and other InnoDB Monitors\nthat provide information about InnoDB processing, see\nhttp://dev.mysql.com/doc/refman/5.5/en/innodb-monitors.html.\n\nSHOW ENGINE INNODB MUTEX displays InnoDB mutex statistics. The\nstatement displays the following fields:\n\no Type\n\n Always InnoDB.\n\no Name\n\n The source file where the mutex is implemented, and the line number\n in the file where the mutex is created. The line number may change\n depending on your version of MySQL.\n\no Status\n\n The mutex status. This field displays several values if UNIV_DEBUG\n was defined at MySQL compilation time (for example, in include/univ.i\n in the InnoDB part of the MySQL source tree). If UNIV_DEBUG was not\n defined, the statement displays only the os_waits value. In the\n latter case (without UNIV_DEBUG), the information on which the output\n is based is insufficient to distinguish regular mutexes and mutexes\n that protect rw-locks (which permit multiple readers or a single\n writer). Consequently, the output may appear to contain multiple rows\n for the same mutex.\n\n o count indicates how many times the mutex was requested.\n\n o spin_waits indicates how many times the spinlock had to run.\n\n o spin_rounds indicates the number of spinlock rounds. (spin_rounds\n divided by spin_waits provides the average round count.)\n\n o os_waits indicates the number of operating system waits. This\n occurs when the spinlock did not work (the mutex was not locked\n during the spinlock and it was necessary to yield to the operating\n system and wait).\n\n o os_yields indicates the number of times a the thread trying to lock\n a mutex gave up its timeslice and yielded to the operating system\n (on the presumption that permitting other threads to run will free\n the mutex so that it can be locked).\n\n o os_wait_times indicates the amount of time (in ms) spent in\n operating system waits, if the timed_mutexes system variable is 1\n (ON). If timed_mutexes is 0 (OFF), timing is disabled, so\n os_wait_times is 0. timed_mutexes is off by default.\n\nInformation from this statement can be used to diagnose system\nproblems. For example, large values of spin_waits and spin_rounds may\nindicate scalability problems.\n\nUse SHOW ENGINE PERFORMANCE_SCHEMA STATUS to inspect the internal\noperation of the Performance Schema code:\n\nMariaDB> SHOW ENGINE PERFORMANCE_SCHEMA STATUS\\G\n...\n*************************** 3. row ***************************\n Type: performance_schema\n Name: events_waits_history.row_size\nStatus: 76\n*************************** 4. row ***************************\n Type: performance_schema\n Name: events_waits_history.row_count\nStatus: 10000\n*************************** 5. row ***************************\n Type: performance_schema\n Name: events_waits_history.memory\nStatus: 760000\n...\n*************************** 57. row ***************************\n Type: performance_schema\n Name: performance_schema.memory\nStatus: 26459600\n...\n\nThe intent of this statement is to help the DBA to understand the\neffects that different options have on memory requirements.\n\nName values consist of two parts, which name an internal buffer and an\nattribute of the buffer, respectively:\n\no Internal buffers that are exposed as a table in the\n performance_schema database are named after the table. Examples:\n events_waits_history.row_size, mutex_instances.row_count.\n\no Internal buffers that are not exposed as a table are named within\n parentheses. Examples: (pfs_cond_class).row_size,\n (pfs_mutex_class).memory.\n\no Values that apply to the Performance Schema as a whole begin with\n performance_schema. Example: performance_schema.memory.\n\nAttributes have these meanings:\n\no row_size cannot be changed. It is the size of the internal record\n used by the implementation.\n\no row_count can be changed depending on the configuration options.\n\no For a table, tbl_name.memory is the product of row_size multiplied by\n row_count. For the Performance Schema as a whole,\n performance_schema.memory is the sum of all the memory used (the sum\n of all other memory values).\n\nIn some cases, there is a direct relationship between a configuration\nparameter and a SHOW ENGINE value. For example,\nevents_waits_history_long.row_count corresponds to\nperformance_schema_events_waits_history_long_size. In other cases, the\nrelationship is more complex. For example,\nevents_waits_history.row_count corresponds to\nperformance_schema_events_waits_history_size (the number of rows per\nthread) multiplied by performance_schema_max_thread_instances ( the\nnumber of threads).\n\nURL: https://mariadb.com/kb/en/show-engine/\n\n','','https://mariadb.com/kb/en/show-engine/'),(366,'NAME_CONST',14,'Syntax:\nNAME_CONST(name,value)\n\nReturns the given value. When used to produce a result set column,\nNAME_CONST() causes the column to have the given name. The arguments\nshould be constants.\n\nMariaDB> SELECT NAME_CONST(\'myname\', 14);\n+--------+\n| myname |\n+--------+\n| 14 |\n+--------+\n\nURL: https://mariadb.com/kb/en/name_const/\n\n','','https://mariadb.com/kb/en/name_const/'),(367,'RELEASE_LOCK',14,'Syntax:\nRELEASE_LOCK(str)\n\nReleases the lock named by the string str that was obtained with\nGET_LOCK(). Returns 1 if the lock was released, 0 if the lock was not\nestablished by this thread (in which case the lock is not released),\nand NULL if the named lock did not exist. The lock does not exist if it\nwas never obtained by a call to GET_LOCK() or if it has previously been\nreleased.\n\nThe DO statement is convenient to use with RELEASE_LOCK(). See [HELP\nDO].\n\nURL: https://mariadb.com/kb/en/release_lock/\n\n','','https://mariadb.com/kb/en/release_lock/'),(368,'IS NULL',18,'Syntax:\nIS NULL\n\nTests whether a value is NULL.\n\nURL: https://mariadb.com/kb/en/is-null/\n\n','MariaDB> SELECT 1 IS NULL, 0 IS NULL, NULL IS NULL;\n -> 0, 0, 1\n','https://mariadb.com/kb/en/is-null/'),(369,'CONVERT_TZ',31,'Syntax:\nCONVERT_TZ(dt,from_tz,to_tz)\n\nCONVERT_TZ() converts a datetime value dt from the time zone given by\nfrom_tz to the time zone given by to_tz and returns the resulting\nvalue. Time zones are specified as described in\nhttps://mariadb.com/kb/en/time-zones/. This\nfunction returns NULL if the arguments are invalid.\n\nURL: https://mariadb.com/kb/en/convert_tz/\n\n','MariaDB> SELECT CONVERT_TZ(\'2004-01-01 12:00:00\',\'GMT\',\'MET\');\n -> \'2004-01-01 13:00:00\'\nMariaDB> SELECT CONVERT_TZ(\'2004-01-01 12:00:00\',\'+00:00\',\'+10:00\');\n -> \'2004-01-01 22:00:00\'\n','https://mariadb.com/kb/en/convert_tz/'),(370,'TIME_TO_SEC',31,'Syntax:\nTIME_TO_SEC(time)\n\nReturns the time argument, converted to seconds.\n\nURL: https://mariadb.com/kb/en/time_to_sec/\n\n','MariaDB> SELECT TIME_TO_SEC(\'22:23:00\');\n -> 80580\nMariaDB> SELECT TIME_TO_SEC(\'00:39:38\');\n -> 2378\n','https://mariadb.com/kb/en/time_to_sec/'),(371,'WEEKDAY',31,'Syntax:\nWEEKDAY(date)\n\nReturns the weekday index for date (0 = Monday, 1 = Tuesday, ... 6 =\nSunday).\n\nURL: https://mariadb.com/kb/en/weekday/\n\n','MariaDB> SELECT WEEKDAY(\'2008-02-03 22:23:00\');\n -> 6\nMariaDB> SELECT WEEKDAY(\'2007-11-06\');\n -> 1\n','https://mariadb.com/kb/en/weekday/'),(372,'EXPORT_SET',37,'Syntax:\nEXPORT_SET(bits,on,off[,separator[,number_of_bits]])\n\nReturns a string such that for every bit set in the value bits, you get\nan on string and for every bit not set in the value, you get an off\nstring. Bits in bits are examined from right to left (from low-order to\nhigh-order bits). Strings are added to the result from left to right,\nseparated by the separator string (the default being the comma\ncharacter \",\"). The number of bits examined is given by number_of_bits,\nwhich has a default of 64 if not specified. number_of_bits is silently\nclipped to 64 if larger than 64. It is treated as an unsigned integer,\nso a value of -1 is effectively the same as 64.\n\nURL: https://mariadb.com/kb/en/export_set/\n\n','MariaDB> SELECT EXPORT_SET(5,\'Y\',\'N\',\',\',4);\n -> \'Y,N,Y,N\'\nMariaDB> SELECT EXPORT_SET(6,\'1\',\'0\',\',\',10);\n -> \'0,1,1,0,0,0,0,0,0,0\'\n','https://mariadb.com/kb/en/export_set/'),(373,'ALTER SERVER',39,'Syntax:\nALTER SERVER server_name\n OPTIONS (option [, option] ...)\n\nAlters the server information for server_name, adjusting any of the\noptions permitted in the CREATE SERVER statement. See [HELP CREATE\nSERVER]. The corresponding fields in the mysql.servers table are\nupdated accordingly. This statement requires the SUPER privilege.\n\nURL: https://mariadb.com/kb/en/alter-server/\n\n','ALTER SERVER s OPTIONS (USER \'sally\');\n','https://mariadb.com/kb/en/alter-server/'),(374,'RESIGNAL',23,'Syntax:\nRESIGNAL [condition_value]\n [SET signal_information_item\n [, signal_information_item] ...]\n\ncondition_value:\n SQLSTATE [VALUE] sqlstate_value\n | condition_name\n\nsignal_information_item:\n condition_information_item_name = simple_value_specification\n\ncondition_information_item_name:\n CLASS_ORIGIN\n | SUBCLASS_ORIGIN\n | MESSAGE_TEXT\n | MYSQL_ERRNO\n | CONSTRAINT_CATALOG\n | CONSTRAINT_SCHEMA\n | CONSTRAINT_NAME\n | CATALOG_NAME\n | SCHEMA_NAME\n | TABLE_NAME\n | COLUMN_NAME\n | CURSOR_NAME\n\ncondition_name, simple_value_specification:\n (see following discussion)\n\nRESIGNAL passes on the error condition information that is available\nduring execution of a condition handler within a compound statement\ninside a stored procedure or function, trigger, or event. RESIGNAL may\nchange some or all information before passing it on. RESIGNAL is\nrelated to SIGNAL, but instead of originating a condition as SIGNAL\ndoes, RESIGNAL relays existing condition information, possibly after\nmodifying it.\n\nRESIGNAL makes it possible to both handle an error and return the error\ninformation. Otherwise, by executing an SQL statement within the\nhandler, information that caused the handler\'s activation is destroyed.\nRESIGNAL also can make some procedures shorter if a given handler can\nhandle part of a situation, then pass the condition \"up the line\" to\nanother handler.\n\nNo special privileges are required to execute the RESIGNAL statement.\n\nFor condition_value and signal_information_item, the definitions and\nrules are the same for RESIGNAL as for SIGNAL (see [HELP SIGNAL]).\n\nThe RESIGNAL statement takes condition_value and SET clauses, both of\nwhich are optional. This leads to several possible uses:\n\no RESIGNAL alone:\n\nRESIGNAL;\n\no RESIGNAL with new signal information:\n\nRESIGNAL SET signal_information_item [, signal_information_item] ...;\n\no RESIGNAL with a condition value and possibly new signal information:\n\nRESIGNAL condition_value\n [SET signal_information_item [, signal_information_item] ...];\n\nURL: https://mariadb.com/kb/en/resignal/\n\n','','https://mariadb.com/kb/en/resignal/'),(375,'TIME FUNCTION',31,'Syntax:\nTIME(expr)\n\nExtracts the time part of the time or datetime expression expr and\nreturns it as a string.\n\nURL: https://mariadb.com/kb/en/time-function/\n\n','MariaDB> SELECT TIME(\'2003-12-31 01:02:03\');\n -> \'01:02:03\'\nMariaDB> SELECT TIME(\'2003-12-31 01:02:03.000123\');\n -> \'01:02:03.000123\'\n','https://mariadb.com/kb/en/time-function/'),(376,'DATE_ADD',31,'Syntax:\nDATE_ADD(date,INTERVAL expr unit), DATE_SUB(date,INTERVAL expr unit)\n\nThese functions perform date arithmetic. The date argument specifies\nthe starting date or datetime value. expr is an expression specifying\nthe interval value to be added or subtracted from the starting date.\nexpr is a string; it may start with a \"-\" for negative intervals. unit\nis a keyword indicating the units in which the expression should be\ninterpreted.\n\nURL: https://mariadb.com/kb/en/date_add/\n\n','MariaDB> SELECT \'2008-12-31 23:59:59\' + INTERVAL 1 SECOND;\n -> \'2009-01-01 00:00:00\'\nMariaDB> SELECT INTERVAL 1 DAY + \'2008-12-31\';\n -> \'2009-01-01\'\nMariaDB> SELECT \'2005-01-01\' - INTERVAL 1 SECOND;\n -> \'2004-12-31 23:59:59\'\nMariaDB> SELECT DATE_ADD(\'2000-12-31 23:59:59\',\n -> INTERVAL 1 SECOND);\n -> \'2001-01-01 00:00:00\'\nMariaDB> SELECT DATE_ADD(\'2010-12-31 23:59:59\',\n -> INTERVAL 1 DAY);\n -> \'2011-01-01 23:59:59\'\nMariaDB> SELECT DATE_ADD(\'2100-12-31 23:59:59\',\n -> INTERVAL \'1:1\' MINUTE_SECOND);\n -> \'2101-01-01 00:01:00\'\nMariaDB> SELECT DATE_SUB(\'2005-01-01 00:00:00\',\n -> INTERVAL \'1 1:1:1\' DAY_SECOND);\n -> \'2004-12-30 22:58:59\'\nMariaDB> SELECT DATE_ADD(\'1900-01-01 00:00:00\',\n -> INTERVAL \'-1 10\' DAY_HOUR);\n -> \'1899-12-30 14:00:00\'\nMariaDB> SELECT DATE_SUB(\'1998-01-02\', INTERVAL 31 DAY);\n -> \'1997-12-02\'\nMariaDB> SELECT DATE_ADD(\'1992-12-31 23:59:59.000002\',\n -> INTERVAL \'1.999999\' SECOND_MICROSECOND);\n -> \'1993-01-01 00:00:01.000001\'\n','https://mariadb.com/kb/en/date_add/'),(377,'CAST',37,'Syntax:\nCAST(expr AS type)\n\nThe CAST() function takes an expression of any type and produces a\nresult value of a specified type, similar to CONVERT(). See the\ndescription of CONVERT() for more information.\n\nURL: https://mariadb.com/kb/en/cast/\n\n','','https://mariadb.com/kb/en/cast/'),(378,'SOUNDS LIKE',37,'Syntax:\nexpr1 SOUNDS LIKE expr2\n\nThis is the same as SOUNDEX(expr1) = SOUNDEX(expr2).\n\nURL: https://mariadb.com/kb/en/sounds-like/\n\n','','https://mariadb.com/kb/en/sounds-like/'),(379,'PERIOD_DIFF',31,'Syntax:\nPERIOD_DIFF(P1,P2)\n\nReturns the number of months between periods P1 and P2. P1 and P2\nshould be in the format YYMM or YYYYMM. Note that the period arguments\nP1 and P2 are not date values.\n\nURL: https://mariadb.com/kb/en/period_diff/\n\n','MariaDB> SELECT PERIOD_DIFF(200802,200703);\n -> 11\n','https://mariadb.com/kb/en/period_diff/'),(380,'LIKE',37,'Syntax:\nexpr LIKE pat [ESCAPE \'escape_char\']\n\nPattern matching using SQL simple regular expression comparison.\nReturns 1 (TRUE) or 0 (FALSE). If either expr or pat is NULL, the\nresult is NULL.\n\nThe pattern need not be a literal string. For example, it can be\nspecified as a string expression or table column.\n\nURL: https://mariadb.com/kb/en/like/\n\n','MariaDB> SELECT \'David!\' LIKE \'David_\';\n -> 1\nMariaDB> SELECT \'David!\' LIKE \'%D%v%\';\n -> 1\n','https://mariadb.com/kb/en/like/'),(381,'MULTIPOINT',24,'MultiPoint(pt1,pt2,...)\n\nConstructs a MultiPoint value using Point or WKB Point arguments.\n\nURL: https://mariadb.com/kb/en/multipoint/\n\n','','https://mariadb.com/kb/en/multipoint/'),(382,'>>',19,'Syntax:\n>>\n\nShifts a longlong (BIGINT) number to the right.\n\nURL: https://mariadb.com/kb/en/shift-right/\n\n','MariaDB> SELECT 4 >> 2;\n -> 1\n','https://mariadb.com/kb/en/shift-right/'),(383,'FETCH',23,'Syntax:\nFETCH [[NEXT] FROM] cursor_name INTO var_name [, var_name] ...\n\nThis statement fetches the next row for the SELECT statement associated\nwith the specified cursor (which must be open), and advances the cursor\npointer. If a row exists, the fetched columns are stored in the named\nvariables. The number of columns retrieved by the SELECT statement must\nmatch the number of output variables specified in the FETCH statement.\n\nIf no more rows are available, a No Data condition occurs with SQLSTATE\nvalue \'02000\'. To detect this condition, you can set up a handler for\nit (or for a NOT FOUND condition). For an example, see\nhttps://mariadb.com/kb/en/cursor-overview/.\n\nURL: https://mariadb.com/kb/en/fetch/\n\n','','https://mariadb.com/kb/en/fetch/'),(384,'AVG',16,'Syntax:\nAVG([DISTINCT] expr)\n\nReturns the average value of expr. The DISTINCT option can be used to\nreturn the average of the distinct values of expr.\n\nAVG() returns NULL if there were no matching rows.\n\nURL: https://mariadb.com/kb/en/avg/\n\n','MariaDB> SELECT student_name, AVG(test_score)\n -> FROM student\n -> GROUP BY student_name;\n','https://mariadb.com/kb/en/avg/'),(385,'TRUE FALSE',29,'The constants TRUE and FALSE evaluate to 1 and 0, respectively. The\nconstant names can be written in any lettercase.\n\nMariaDB> SELECT TRUE, true, FALSE, false;\n -> 1, 1, 0, 0\n\nURL: https://mariadb.com/kb/en/true-false/\n\n','','https://mariadb.com/kb/en/true-false/'),(386,'MBRWITHIN',6,'MBRWithin(g1,g2)\n\nReturns 1 or 0 to indicate whether the Minimum Bounding Rectangle of g1\nis within the Minimum Bounding Rectangle of g2. This tests the opposite\nrelationship as MBRContains().\n\nURL: https://mariadb.com/kb/en/mbrwithin/\n\n','MariaDB> SET @g1 = GeomFromText(\'Polygon((0 0,0 3,3 3,3 0,0 0))\');\nMariaDB> SET @g2 = GeomFromText(\'Polygon((0 0,0 5,5 5,5 0,0 0))\');\nMariaDB> SELECT MBRWithin(@g1,@g2), MBRWithin(@g2,@g1);\n+--------------------+--------------------+\n| MBRWithin(@g1,@g2) | MBRWithin(@g2,@g1) |\n+--------------------+--------------------+\n| 1 | 0 |\n+--------------------+--------------------+\n','https://mariadb.com/kb/en/mbrwithin/'),(387,'SESSION_USER',17,'Syntax:\nSESSION_USER()\n\nSESSION_USER() is a synonym for USER().\n\nURL: https://mariadb.com/kb/en/session_user/\n\n','','https://mariadb.com/kb/en/session_user/'),(388,'IN',18,'Syntax:\nexpr IN (value,...)\n\nReturns 1 if expr is equal to any of the values in the IN list, else\nreturns 0. If all values are constants, they are evaluated according to\nthe type of expr and sorted. The search for the item then is done using\na binary search. This means IN is very quick if the IN value list\nconsists entirely of constants. Otherwise, type conversion takes place\naccording to the rules described in\nhttps://mariadb.com/kb/en/type-conversion/, but\napplied to all the arguments.\n\nURL: https://mariadb.com/kb/en/in/\n\n','MariaDB> SELECT 2 IN (0,3,5,7);\n -> 0\nMariaDB> SELECT \'wefwf\' IN (\'wee\',\'wefwf\',\'weg\');\n -> 1\n','https://mariadb.com/kb/en/in/'),(389,'QUOTE',37,'Syntax:\nQUOTE(str)\n\nQuotes a string to produce a result that can be used as a properly\nescaped data value in an SQL statement. The string is returned enclosed\nby single quotation marks and with each instance of backslash (\"\\\"),\nsingle quote (\"\'\"), ASCII NUL, and Control+Z preceded by a backslash.\nIf the argument is NULL, the return value is the word \"NULL\" without\nenclosing single quotation marks.\n\nURL: https://mariadb.com/kb/en/quote/\n\n','MariaDB> SELECT QUOTE(\'Don\\\'t!\');\n -> \'Don\\\'t!\'\nMariaDB> SELECT QUOTE(NULL);\n -> NULL\n','https://mariadb.com/kb/en/quote/'),(390,'HELP COMMAND',26,'Syntax:\nMariaDB> help search_string\n\nIf you provide an argument to the help command, mysql uses it as a\nsearch string to access server-side help from the contents of the MySQL\nReference Manual. The proper operation of this command requires that\nthe help tables in the mysql database be initialized with help topic\ninformation .\n\nIf there is no match for the search string, the search fails:\n\nMariaDB> help me\n\nNothing found\nPlease try to run \'help contents\' for a list of all accessible topics\n\nUse help contents to see a list of the help categories:\n\nMariaDB> help contents\nYou asked for help about help category: \"Contents\"\nFor more information, type \'help <item>\', where <item> is one of the\nfollowing categories:\n Account Management\n Administration\n Data Definition\n Data Manipulation\n Data Types\n Functions\n Functions and Modifiers for Use with GROUP BY\n Geographic Features\n Language Structure\n Plugins\n Storage Engines\n Stored Routines\n Table Maintenance\n Transactions\n Triggers\n\nIf the search string matches multiple items, mysql shows a list of\nmatching topics:\n\nMariaDB> help logs\nMany help items for your request exist.\nTo make a more specific request, please type \'help <item>\',\nwhere <item> is one of the following topics:\n SHOW\n SHOW BINARY LOGS\n SHOW ENGINE\n SHOW LOGS\n\nUse a topic as the search string to see the help entry for that topic:\n\nMariaDB> help show binary logs\nName: \'SHOW BINARY LOGS\'\nDescription:\nSyntax:\nSHOW BINARY LOGS\nSHOW MASTER LOGS\n\nLists the binary log files on the server. This statement is used as\npart of the procedure described in [purge-binary-logs], that shows how\nto determine which logs can be purged.\n\nMariaDB> SHOW BINARY LOGS;\n+---------------+-----------+\n| Log_name | File_size |\n+---------------+-----------+\n| binlog.000015 | 724935 |\n| binlog.000016 | 733481 |\n+---------------+-----------+\n\nURL: https://mariadb.com/kb/en/help-command/\n\n','','https://mariadb.com/kb/en/help-command/'),(391,'QUARTER',31,'Syntax:\nQUARTER(date)\n\nReturns the quarter of the year for date, in the range 1 to 4.\n\nURL: https://mariadb.com/kb/en/quarter/\n\n','MariaDB> SELECT QUARTER(\'2008-04-01\');\n -> 2\n','https://mariadb.com/kb/en/quarter/'),(392,'POSITION',37,'Syntax:\nPOSITION(substr IN str)\n\nPOSITION(substr IN str) is a synonym for LOCATE(substr,str).\n\nURL: https://mariadb.com/kb/en/position/\n\n','','https://mariadb.com/kb/en/position/'),(393,'SHOW CREATE FUNCTION',26,'Syntax:\nSHOW CREATE FUNCTION func_name\n\nThis statement is similar to SHOW CREATE PROCEDURE but for stored\nfunctions. See [HELP SHOW CREATE PROCEDURE].\n\nURL: https://mariadb.com/kb/en/show-create-function/\n\n','','https://mariadb.com/kb/en/show-create-function/'),(394,'IS_USED_LOCK',14,'Syntax:\nIS_USED_LOCK(str)\n\nChecks whether the lock named str is in use (that is, locked). If so,\nit returns the connection identifier of the client that holds the lock.\nOtherwise, it returns NULL.\n\nURL: https://mariadb.com/kb/en/is_used_lock/\n\n','','https://mariadb.com/kb/en/is_used_lock/'),(395,'POLYFROMTEXT',3,'PolyFromText(wkt[,srid]), PolygonFromText(wkt[,srid])\n\nConstructs a POLYGON value using its WKT representation and SRID.\n\nURL: https://mariadb.com/kb/en/polyfromtext/\n\n','','https://mariadb.com/kb/en/polyfromtext/'),(396,'DES_ENCRYPT',12,'Syntax:\nDES_ENCRYPT(str[,{key_num|key_str}])\n\nEncrypts the string with the given key using the Triple-DES algorithm.\n\nThis function works only if MySQL has been configured with SSL support.\nSee https://mariadb.com/kb/en/ssl-connections/.\n\nThe encryption key to use is chosen based on the second argument to\nDES_ENCRYPT(), if one was given. With no argument, the first key from\nthe DES key file is used. With a key_num argument, the given key number\n(0 to 9) from the DES key file is used. With a key_str argument, the\ngiven key string is used to encrypt str.\n\nThe key file can be specified with the --des-key-file server option.\n\nThe return string is a binary string where the first character is\nCHAR(128 | key_num). If an error occurs, DES_ENCRYPT() returns NULL.\n\nThe 128 is added to make it easier to recognize an encrypted key. If\nyou use a string key, key_num is 127.\n\nThe string length for the result is given by this formula:\n\nnew_len = orig_len + (8 - (orig_len % 8)) + 1\n\nEach line in the DES key file has the following format:\n\nkey_num des_key_str\n\nEach key_num value must be a number in the range from 0 to 9. Lines in\nthe file may be in any order. des_key_str is the string that is used to\nencrypt the message. There should be at least one space between the\nnumber and the key. The first key is the default key that is used if\nyou do not specify any key argument to DES_ENCRYPT().\n\nYou can tell MySQL to read new key values from the key file with the\nFLUSH DES_KEY_FILE statement. This requires the RELOAD privilege.\n\nOne benefit of having a set of default keys is that it gives\napplications a way to check for the existence of encrypted column\nvalues, without giving the end user the right to decrypt those values.\n\nURL: https://mariadb.com/kb/en/des_encrypt/\n\n','MariaDB> SELECT customer_address FROM customer_table \n > WHERE crypted_credit_card = DES_ENCRYPT(\'credit_card_number\');\n','https://mariadb.com/kb/en/des_encrypt/'),(397,'CEIL',4,'Syntax:\nCEIL(X)\n\nCEIL() is a synonym for CEILING().\n\nURL: https://mariadb.com/kb/en/ceil/\n\n','','https://mariadb.com/kb/en/ceil/'),(398,'LENGTH',37,'Syntax:\nLENGTH(str)\n\nReturns the length of the string str, measured in bytes. A multi-byte\ncharacter counts as multiple bytes. This means that for a string\ncontaining five 2-byte characters, LENGTH() returns 10, whereas\nCHAR_LENGTH() returns 5.\n\nURL: https://mariadb.com/kb/en/length/\n\n','MariaDB> SELECT LENGTH(\'text\');\n -> 4\n','https://mariadb.com/kb/en/length/'),(399,'STR_TO_DATE',31,'Syntax:\nSTR_TO_DATE(str,format)\n\nThis is the inverse of the DATE_FORMAT() function. It takes a string\nstr and a format string format. STR_TO_DATE() returns a DATETIME value\nif the format string contains both date and time parts, or a DATE or\nTIME value if the string contains only date or time parts. If the date,\ntime, or datetime value extracted from str is illegal, STR_TO_DATE()\nreturns NULL and produces a warning.\n\nThe server scans str attempting to match format to it. The format\nstring can contain literal characters and format specifiers beginning\nwith %. Literal characters in format must match literally in str.\nFormat specifiers in format must match a date or time part in str. For\nthe specifiers that can be used in format, see the DATE_FORMAT()\nfunction description.\n\nMariaDB> SELECT STR_TO_DATE(\'01,5,2013\',\'%d,%m,%Y\');\n -> \'2013-05-01\'\nMariaDB> SELECT STR_TO_DATE(\'May 1, 2013\',\'%M %d,%Y\');\n -> \'2013-05-01\'\n\nScanning starts at the beginning of str and fails if format is found\nnot to match. Extra characters at the end of str are ignored.\n\nMariaDB> SELECT STR_TO_DATE(\'a09:30:17\',\'a%h:%i:%s\');\n -> \'09:30:17\'\nMariaDB> SELECT STR_TO_DATE(\'a09:30:17\',\'%h:%i:%s\');\n -> NULL\nMariaDB> SELECT STR_TO_DATE(\'09:30:17a\',\'%h:%i:%s\');\n -> \'09:30:17\'\n\nUnspecified date or time parts have a value of 0, so incompletely\nspecified values in str produce a result with some or all parts set to\n0:\n\nMariaDB> SELECT STR_TO_DATE(\'abc\',\'abc\');\n -> \'0000-00-00\'\nMariaDB> SELECT STR_TO_DATE(\'9\',\'%m\');\n -> \'0000-09-00\'\nMariaDB> SELECT STR_TO_DATE(\'9\',\'%s\');\n -> \'00:00:09\'\n\nURL: https://mariadb.com/kb/en/str_to_date/\n\n','','https://mariadb.com/kb/en/str_to_date/'),(400,'Y',11,'Y(p)\n\nReturns the Y-coordinate value for the Point object p as a\ndouble-precision number.\n\nURL: https://mariadb.com/kb/en/y/\n\n','MariaDB> SELECT Y(POINT(56.7, 53.34));\n+-----------------------+\n| Y(POINT(56.7, 53.34)) |\n+-----------------------+\n| 53.34 |\n+-----------------------+\n','https://mariadb.com/kb/en/y/'),(401,'CHECKSUM TABLE',20,'Syntax:\nCHECKSUM TABLE tbl_name [, tbl_name] ... [ QUICK | EXTENDED ]\n\nCHECKSUM TABLE reports a table checksum. This statement requires the\nSELECT privilege for the table.\n\nWith QUICK, the live table checksum is reported if it is available, or\nNULL otherwise. This is very fast. A live checksum is enabled by\nspecifying the CHECKSUM=1 table option when you create the table;\ncurrently, this is supported only for MyISAM tables. See [HELP CREATE\nTABLE].\n\nWith EXTENDED, the entire table is read row by row and the checksum is\ncalculated. This can be very slow for large tables.\n\nIf neither QUICK nor EXTENDED is specified, MySQL returns a live\nchecksum if the table storage engine supports it and scans the table\notherwise.\n\nFor a nonexistent table, CHECKSUM TABLE returns NULL and generates a\nwarning.\n\nIn MySQL 5.5, CHECKSUM TABLE returns 0 for partitioned tables unless\nyou include the EXTENDED option. This issue is resolved in MySQL 5.6.\n(Bug #11933226, Bug #60681)\n\nThe checksum value depends on the table row format. If the row format\nchanges, the checksum also changes. For example, the storage format for\nVARCHAR changed between MySQL 4.1 and 5.0, so if a 4.1 table is\nupgraded to MySQL 5.0, the checksum value may change.\n\nURL: https://mariadb.com/kb/en/checksum-table/\n\n','','https://mariadb.com/kb/en/checksum-table/'),(402,'NUMINTERIORRINGS',2,'NumInteriorRings(poly)\n\nReturns the number of interior rings in the Polygon value poly.\n\nURL: https://mariadb.com/kb/en/numinteriorrings/\n\n','MariaDB> SET @poly =\n -> \'Polygon((0 0,0 3,3 3,3 0,0 0),(1 1,1 2,2 2,2 1,1 1))\';\nMariaDB> SELECT NumInteriorRings(GeomFromText(@poly));\n+---------------------------------------+\n| NumInteriorRings(GeomFromText(@poly)) |\n+---------------------------------------+\n| 1 |\n+---------------------------------------+\n','https://mariadb.com/kb/en/numinteriorrings/'),(403,'INTERIORRINGN',2,'InteriorRingN(poly,N)\n\nReturns the N-th interior ring for the Polygon value poly as a\nLineString. Rings are numbered beginning with 1.\n\nURL: https://mariadb.com/kb/en/interiorringn/\n\n','MariaDB> SET @poly =\n -> \'Polygon((0 0,0 3,3 3,3 0,0 0),(1 1,1 2,2 2,2 1,1 1))\';\nMariaDB> SELECT AsText(InteriorRingN(GeomFromText(@poly),1));\n+----------------------------------------------+\n| AsText(InteriorRingN(GeomFromText(@poly),1)) |\n+----------------------------------------------+\n| LINESTRING(1 1,1 2,2 2,2 1,1 1) |\n+----------------------------------------------+\n','https://mariadb.com/kb/en/interiorringn/'),(404,'UTC_TIME',31,'Syntax:\nUTC_TIME, UTC_TIME()\n\nReturns the current UTC time as a value in \'HH:MM:SS\' or HHMMSS.uuuuuu\nformat, depending on whether the function is used in a string or\nnumeric context.\n\nURL: https://mariadb.com/kb/en/utc_time/\n\n','MariaDB> SELECT UTC_TIME(), UTC_TIME() + 0;\n -> \'18:07:53\', 180753.000000\n','https://mariadb.com/kb/en/utc_time/'),(405,'DROP FUNCTION',39,'The DROP FUNCTION statement is used to drop stored functions and\nuser-defined functions (UDFs):\n\no For information about dropping stored functions, see [HELP DROP\n PROCEDURE].\n\no For information about dropping user-defined functions, see [HELP DROP\n FUNCTION UDF].\n\nURL: https://mariadb.com/kb/en/drop-function/\n\n','','https://mariadb.com/kb/en/drop-function/'),(406,'ALTER EVENT',39,'Syntax:\nALTER\n [DEFINER = { user | CURRENT_USER }]\n EVENT event_name\n [ON SCHEDULE schedule]\n [ON COMPLETION [NOT] PRESERVE]\n [RENAME TO new_event_name]\n [ENABLE | DISABLE | DISABLE ON SLAVE]\n [COMMENT \'comment\']\n [DO event_body]\n\nThe ALTER EVENT statement changes one or more of the characteristics of\nan existing event without the need to drop and recreate it. The syntax\nfor each of the DEFINER, ON SCHEDULE, ON COMPLETION, COMMENT, ENABLE /\nDISABLE, and DO clauses is exactly the same as when used with CREATE\nEVENT. (See [HELP CREATE EVENT].)\n\nAny user can alter an event defined on a database for which that user\nhas the EVENT privilege. When a user executes a successful ALTER EVENT\nstatement, that user becomes the definer for the affected event.\n\nALTER EVENT works only with an existing event:\n\nMariaDB> ALTER EVENT no_such_event \n > ON SCHEDULE \n > EVERY \'2:3\' DAY_HOUR;\nERROR 1517 (HY000): Unknown event \'no_such_event\'\n\nURL: https://mariadb.com/kb/en/alter-event/\n\n','','https://mariadb.com/kb/en/alter-event/'),(407,'STDDEV',16,'Syntax:\nSTDDEV(expr)\n\nReturns the population standard deviation of expr. This function is\nprovided for compatibility with Oracle. The standard SQL function\nSTDDEV_POP() can be used instead.\n\nThis function returns NULL if there were no matching rows.\n\nURL: https://mariadb.com/kb/en/stddev/\n\n','','https://mariadb.com/kb/en/stddev/'),(408,'DATE_SUB',31,'Syntax:\nDATE_SUB(date,INTERVAL expr unit)\n\nSee the description for DATE_ADD().\n\nURL: https://mariadb.com/kb/en/date_sub/\n\n','','https://mariadb.com/kb/en/date_sub/'),(409,'PERIOD_ADD',31,'Syntax:\nPERIOD_ADD(P,N)\n\nAdds N months to period P (in the format YYMM or YYYYMM). Returns a\nvalue in the format YYYYMM. Note that the period argument P is not a\ndate value.\n\nURL: https://mariadb.com/kb/en/period_add/\n\n','MariaDB> SELECT PERIOD_ADD(200801,2);\n -> 200803\n','https://mariadb.com/kb/en/period_add/'),(410,'|',19,'Syntax:\n|\n\nBitwise OR:\n\nURL: https://mariadb.com/kb/en/bitwise-or/\n\n','MariaDB> SELECT 29 | 15;\n -> 31\n','https://mariadb.com/kb/en/bitwise-or/'),(411,'GEOMFROMTEXT',3,'GeomFromText(wkt[,srid]), GeometryFromText(wkt[,srid])\n\nConstructs a geometry value of any type using its WKT representation\nand SRID.\n\nURL: https://mariadb.com/kb/en/geomfromtext/\n\n','','https://mariadb.com/kb/en/geomfromtext/'),(412,'UUID_SHORT',14,'Syntax:\nUUID_SHORT()\n\nReturns a \"short\" universal identifier as a 64-bit unsigned integer\n(rather than a string-form 128-bit identifier as returned by the UUID()\nfunction).\n\nThe value of UUID_SHORT() is guaranteed to be unique if the following\nconditions hold:\n\no The server_id of the current host is unique among your set of master\n and slave servers\n\no server_id is between 0 and 255\n\no You do not set back your system time for your server between mysqld\n restarts\n\no You do not invoke UUID_SHORT() on average more than 16 million times\n per second between mysqld restarts\n\nThe UUID_SHORT() return value is constructed this way:\n\n (server_id & 255) << 56\n+ (server_startup_time_in_seconds << 24)\n+ incremented_variable++;\n\nURL: https://mariadb.com/kb/en/uuid_short/\n\n','MariaDB> SELECT UUID_SHORT();\n -> 92395783831158784\n','https://mariadb.com/kb/en/uuid_short/'),(413,'RIGHT',37,'Syntax:\nRIGHT(str,len)\n\nReturns the rightmost len characters from the string str, or NULL if\nany argument is NULL.\n\nURL: https://mariadb.com/kb/en/right/\n\n','MariaDB> SELECT RIGHT(\'foobarbar\', 4);\n -> \'rbar\'\n','https://mariadb.com/kb/en/right/'),(414,'DATEDIFF',31,'Syntax:\nDATEDIFF(expr1,expr2)\n\nDATEDIFF() returns expr1 - expr2 expressed as a value in days from one\ndate to the other. expr1 and expr2 are date or date-and-time\nexpressions. Only the date parts of the values are used in the\ncalculation.\n\nURL: https://mariadb.com/kb/en/datediff/\n\n','MariaDB> SELECT DATEDIFF(\'2007-12-31 23:59:59\',\'2007-12-30\');\n -> 1\nMariaDB> SELECT DATEDIFF(\'2010-11-30 23:59:59\',\'2010-12-31\');\n -> -31\n','https://mariadb.com/kb/en/datediff/'),(415,'DROP TABLESPACE',39,'Syntax:\nDROP TABLESPACE tablespace_name\n ENGINE [=] engine_name\n\nThis statement is used with NDB cluster, which is not supported by MariaDB.\n\nURL: https://mariadb.com/kb/en/drop-tablespace/\n\n','','https://mariadb.com/kb/en/drop-tablespace/'),(416,'DROP PROCEDURE',39,'Syntax:\nDROP {PROCEDURE | FUNCTION} [IF EXISTS] sp_name\n\nThis statement is used to drop a stored procedure or function. That is,\nthe specified routine is removed from the server. You must have the\nALTER ROUTINE privilege for the routine. (If the\nautomatic_sp_privileges system variable is enabled, that privilege and\nEXECUTE are granted automatically to the routine creator when the\nroutine is created and dropped from the creator when the routine is\ndropped. See\nhttps://mariadb.com/kb/en/stored-routine-privileges/.\n)\n\nThe IF EXISTS clause is a MySQL extension. It prevents an error from\noccurring if the procedure or function does not exist. A warning is\nproduced that can be viewed with SHOW WARNINGS.\n\nURL: https://mariadb.com/kb/en/drop-procedure/\n\n','','https://mariadb.com/kb/en/drop-procedure/'),(417,'CHECK TABLE',20,'Syntax:\nCHECK TABLE tbl_name [, tbl_name] ... [option] ...\n\noption = {FOR UPGRADE | QUICK | FAST | MEDIUM | EXTENDED | CHANGED}\n\nCHECK TABLE checks a table or tables for errors. CHECK TABLE works for\nInnoDB, MyISAM, ARCHIVE, and CSV tables. For MyISAM tables, the key\nstatistics are updated as well.\n\nTo check a table, you must have some privilege for it.\n\nCHECK TABLE can also check views for problems, such as tables that are\nreferenced in the view definition that no longer exist.\n\nCHECK TABLE is supported for partitioned tables, and you can use ALTER\nTABLE ... CHECK PARTITION to check one or more partitions; for more\ninformation, see [HELP ALTER TABLE].\n\nURL: https://mariadb.com/kb/en/sql-commands-check-table/\n\n','','https://mariadb.com/kb/en/sql-commands-check-table/'),(418,'BIN',37,'Syntax:\nBIN(N)\n\nReturns a string representation of the binary value of N, where N is a\nlonglong (BIGINT) number. This is equivalent to CONV(N,10,2). Returns\nNULL if N is NULL.\n\nURL: https://mariadb.com/kb/en/bin/\n\n','MariaDB> SELECT BIN(12);\n -> \'1100\'\n','https://mariadb.com/kb/en/bin/'),(419,'INSTALL PLUGIN',5,'Syntax:\nINSTALL PLUGIN plugin_name SONAME \'shared_library_name\'\n\nThis statement installs a server plugin. It requires the INSERT\nprivilege for the mysql.plugin table.\n\nplugin_name is the name of the plugin as defined in the plugin\ndescriptor structure contained in the library file (see\nhttp://dev.mysql.com/doc/refman/5.5/en/plugin-data-structures.html).\nPlugin names are not case sensitive. For maximal compatibility, plugin\nnames should be limited to ASCII letters, digits, and underscore\nbecause they are used in C source files, shell command lines, M4 and\nBourne shell scripts, and SQL environments.\n\nshared_library_name is the name of the shared library that contains the\nplugin code. The name includes the file name extension (for example,\nlibmyplugin.so, libmyplugin.dll, or libmyplugin.dylib).\n\nThe shared library must be located in the plugin directory (the\ndirectory named by the plugin_dir system variable). The library must be\nin the plugin directory itself, not in a subdirectory. By default,\nplugin_dir is the plugin directory under the directory named by the\npkglibdir configuration variable, but it can be changed by setting the\nvalue of plugin_dir at server startup. For example, set its value in a\nmy.cnf file:\n\n[mysqld]\nplugin_dir=/path/to/plugin/directory\n\nIf the value of plugin_dir is a relative path name, it is taken to be\nrelative to the MySQL base directory (the value of the basedir system\nvariable).\n\nINSTALL PLUGIN loads and initializes the plugin code to make the plugin\navailable for use. A plugin is initialized by executing its\ninitialization function, which handles any setup that the plugin must\nperform before it can be used. When the server shuts down, it executes\nthe deinitialization function for each plugin that is loaded so that\nthe plugin has a change to perform any final cleanup.\n\nINSTALL PLUGIN also registers the plugin by adding a line that\nindicates the plugin name and library file name to the mysql.plugin\ntable. At server startup, the server loads and initializes any plugin\nthat is listed in the mysql.plugin table. This means that a plugin is\ninstalled with INSTALL PLUGIN only once, not every time the server\nstarts. Plugin loading at startup does not occur if the server is\nstarted with the --skip-grant-tables option.\n\nA plugin library can contain multiple plugins. For each of them to be\ninstalled, use a separate INSTALL PLUGIN statement. Each statement\nnames a different plugin, but all of them specify the same library\nname.\n\nURL: https://mariadb.com/kb/en/install-plugin/\n\n','','https://mariadb.com/kb/en/install-plugin/'),(420,'DECLARE CURSOR',23,'Syntax:\nDECLARE cursor_name CURSOR FOR select_statement\n\nThis statement declares a cursor and associates it with a SELECT\nstatement that retrieves the rows to be traversed by the cursor. To\nfetch the rows later, use a FETCH statement. The number of columns\nretrieved by the SELECT statement must match the number of output\nvariables specified in the FETCH statement.\n\nThe SELECT statement cannot have an INTO clause.\n\nCursor declarations must appear before handler declarations and after\nvariable and condition declarations.\n\nA stored program may contain multiple cursor declarations, but each\ncursor declared in a given block must have a unique name. For an\nexample, see https://mariadb.com/kb/en/programmatic-and-compound-statements-cursors/.\n\nFor information available through SHOW statements, it is possible in\nmany cases to obtain equivalent information by using a cursor with an\nINFORMATION_SCHEMA table.\n\nURL: https://mariadb.com/kb/en/declare-cursor/\n\n','','https://mariadb.com/kb/en/declare-cursor/'),(421,'LOAD DATA',27,'Syntax:\nLOAD DATA [LOW_PRIORITY | CONCURRENT] [LOCAL] INFILE \'file_name\'\n [REPLACE | IGNORE]\n INTO TABLE tbl_name\n [CHARACTER SET charset_name]\n [{FIELDS | COLUMNS}\n [TERMINATED BY \'string\']\n [[OPTIONALLY] ENCLOSED BY \'char\']\n [ESCAPED BY \'char\']\n ]\n [LINES\n [STARTING BY \'string\']\n [TERMINATED BY \'string\']\n ]\n [IGNORE number {LINES | ROWS}]\n [(col_name_or_user_var,...)]\n [SET col_name = expr,...]\n\nThe LOAD DATA INFILE statement reads rows from a text file into a table\nat a very high speed. The file name must be given as a literal string.\n\nLOAD DATA INFILE is the complement of SELECT ... INTO OUTFILE. (See\nhttps://mariadb.com/kb/en/select-into/.) To write data\nfrom a table to a file, use SELECT ... INTO OUTFILE. To read the file\nback into a table, use LOAD DATA INFILE. The syntax of the FIELDS and\nLINES clauses is the same for both statements. Both clauses are\noptional, but FIELDS must precede LINES if both are specified.\n\nFor more information about the efficiency of INSERT versus LOAD DATA\nINFILE and speeding up LOAD DATA INFILE, see\nhttp://dev.mysql.com/doc/refman/5.5/en/insert-speed.html.\n\nThe character set indicated by the character_set_database system\nvariable is used to interpret the information in the file. SET NAMES\nand the setting of character_set_client do not affect interpretation of\ninput. If the contents of the input file use a character set that\ndiffers from the default, it is usually preferable to specify the\ncharacter set of the file by using the CHARACTER SET clause. A\ncharacter set of binary specifies \"no conversion.\"\n\nLOAD DATA INFILE interprets all fields in the file as having the same\ncharacter set, regardless of the data types of the columns into which\nfield values are loaded. For proper interpretation of file contents,\nyou must ensure that it was written with the correct character set. For\nexample, if you write a data file with mysqldump -T or by issuing a\nSELECT ... INTO OUTFILE statement in mysql, be sure to use a\n--default-character-set option with mysqldump or mysql so that output\nis written in the character set to be used when the file is loaded with\nLOAD DATA INFILE.\n\n*Note*: It is not possible to load data files that use the ucs2, utf16,\nor utf32 character set.\n\nThe character_set_filesystem system variable controls the\ninterpretation of the file name.\n\nYou can also load data files by using the mysqlimport utility; it\noperates by sending a LOAD DATA INFILE statement to the server. The\n--local option causes mysqlimport to read data files from the client\nhost. You can specify the --compress option to get better performance\nover slow networks if the client and server support the compressed\nprotocol. See https://mariadb.com/kb/en/mysqlimport/.\n\nIf you use LOW_PRIORITY, execution of the LOAD DATA statement is\ndelayed until no other clients are reading from the table. This affects\nonly storage engines that use only table-level locking (such as MyISAM,\nMEMORY, and MERGE).\n\nIf you specify CONCURRENT with a MyISAM table that satisfies the\ncondition for concurrent inserts (that is, it contains no free blocks\nin the middle), other threads can retrieve data from the table while\nLOAD DATA is executing. Using this option affects the performance of\nLOAD DATA a bit, even if no other thread is using the table at the same\ntime.\n\nPrior to MySQL 5.5.1, CONCURRENT was not replicated when using\nstatement-based replication (see Bug #34628). However, it is replicated\nwhen using row-based replication, regardless of the version. See\nhttp://dev.mysql.com/doc/refman/5.5/en/replication-features-load-data.h\ntml, for more information.\n\nThe LOCAL keyword, if specified, is interpreted with respect to the\nclient end of the connection:\n\no If LOCAL is specified, the file is read by the client program on the\n client host and sent to the server. The file can be given as a full\n path name to specify its exact location. If given as a relative path\n name, the name is interpreted relative to the directory in which the\n client program was started.\n\n When using LOCAL with LOAD DATA, a copy of the file is created in the\n server\'s temporary directory. This is not the directory determined by\n the value of tmpdir or slave_load_tmpdir, but rather the operating\n system\'s temporary directory, and is not configurable in the MySQL\n Server. (Typically the system temporary directory is /tmp on Linux\n systems and C:\\WINDOWS\\TEMP on Windows.) Lack of sufficient space for\n the copy in this directory can cause the LOAD DATA LOCAL statement to\n fail.\n\no If LOCAL is not specified, the file must be located on the server\n host and is read directly by the server. The server uses the\n following rules to locate the file:\n\n o If the file name is an absolute path name, the server uses it as\n given.\n\n o If the file name is a relative path name with one or more leading\n components, the server searches for the file relative to the\n server\'s data directory.\n\n o If a file name with no leading components is given, the server\n looks for the file in the database directory of the default\n database.\n\nNote that, in the non-LOCAL case, these rules mean that a file named as\n./myfile.txt is read from the server\'s data directory, whereas the file\nnamed as myfile.txt is read from the database directory of the default\ndatabase. For example, if db1 is the default database, the following\nLOAD DATA statement reads the file data.txt from the database directory\nfor db1, even though the statement explicitly loads the file into a\ntable in the db2 database:\n\nLOAD DATA INFILE \'data.txt\' INTO TABLE db2.my_table;\n\nWindows path names are specified using forward slashes rather than\nbackslashes. If you do use backslashes, you must double them.\n\nFor security reasons, when reading text files located on the server,\nthe files must either reside in the database directory or be readable\nby all. Also, to use LOAD DATA INFILE on server files, you must have\nthe FILE privilege. See\nhttps://mariadb.com/kb/en/grant/. For\nnon-LOCAL load operations, if the secure_file_priv system variable is\nset to a nonempty directory name, the file to be loaded must be located\nin that directory.\n\nURL: https://mariadb.com/kb/en/load-data-infile/\n\n','','https://mariadb.com/kb/en/load-data-infile/'),(422,'MULTILINESTRING',24,'MultiLineString(ls1,ls2,...)\n\nConstructs a MultiLineString value using LineString or WKB LineString\narguments.\n\nURL: https://mariadb.com/kb/en/multilinestring/\n\n','','https://mariadb.com/kb/en/multilinestring/'),(423,'LOCALTIME',31,'Syntax:\nLOCALTIME, LOCALTIME()\n\nLOCALTIME and LOCALTIME() are synonyms for NOW().\n\nURL: https://mariadb.com/kb/en/localtime/\n\n','','https://mariadb.com/kb/en/localtime/'),(424,'SHOW RELAYLOG EVENTS',26,'Syntax:\nSHOW RELAYLOG EVENTS\n [IN \'log_name\'] [FROM pos] [LIMIT [offset,] row_count]\n\nShows the events in the relay log of a replication slave. If you do not\nspecify \'log_name\', the first relay log is displayed. This statement\nhas no effect on the master.\n\nURL: https://mariadb.com/kb/en/show-relaylog-events/\n\n','','https://mariadb.com/kb/en/show-relaylog-events/'),(425,'MPOINTFROMTEXT',3,'MPointFromText(wkt[,srid]), MultiPointFromText(wkt[,srid])\n\nConstructs a MULTIPOINT value using its WKT representation and SRID.\n\nURL: https://mariadb.com/kb/en/mpointfromtext/\n\n','','https://mariadb.com/kb/en/mpointfromtext/'),(426,'BLOB',22,'BLOB[(M)]\n\nA BLOB column with a maximum length of 65,535 (216 - 1) bytes. Each\nBLOB value is stored using a 2-byte length prefix that indicates the\nnumber of bytes in the value.\n\nAn optional length M can be given for this type. If this is done, MySQL\ncreates the column as the smallest BLOB type large enough to hold\nvalues M bytes long.\n\nURL: https://mariadb.com/kb/en/blob/\n\n','','https://mariadb.com/kb/en/blob/'),(427,'SHA1',12,'Syntax:\nSHA1(str), SHA(str)\n\nCalculates an SHA-1 160-bit checksum for the string, as described in\nRFC 3174 (Secure Hash Algorithm). The value is returned as a string of\n40 hex digits, or NULL if the argument was NULL. One of the possible\nuses for this function is as a hash key. See the notes at the beginning\nof this section about storing hash values efficiently. You can also use\nSHA1() as a cryptographic function for storing passwords. SHA() is\nsynonymous with SHA1().\n\nAs of MySQL 5.5.3, the return value is a nonbinary string in the\nconnection character set. Before 5.5.3, the return value is a binary\nstring; see the notes at the beginning of this section about using the\nvalue as a nonbinary string.\n\nURL: https://mariadb.com/kb/en/sha1/\n\n','MariaDB> SELECT SHA1(\'abc\');\n -> \'a9993e364706816aba3e25717850c26c9cd0d89d\'\n','https://mariadb.com/kb/en/sha1/'),(428,'SUBSTR',37,'Syntax:\nSUBSTR(str,pos), SUBSTR(str FROM pos), SUBSTR(str,pos,len), SUBSTR(str\nFROM pos FOR len)\n\nSUBSTR() is a synonym for SUBSTRING().\n\nURL: https://mariadb.com/kb/en/substr/\n\n','','https://mariadb.com/kb/en/substr/'),(429,'PASSWORD',12,'Syntax:\nPASSWORD(str)\n\nCalculates and returns a hashed password string from the plaintext\npassword str and returns a nonbinary string in the connection character\nset (a binary string before MySQL 5.5.3), or NULL if the argument is\nNULL. This function is the SQL interface to the algorithm used by the\nserver to encrypt MySQL passwords for storage in the mysql.user grant\ntable.\n\nThe password hashing method used by PASSWORD() depends on the value of\nthe old_passwords system variable:\n\nURL: https://mariadb.com/kb/en/password/\n\n','MariaDB> SET old_passwords = 0;\nMariaDB> SELECT PASSWORD(\'mypass\');\n+-------------------------------------------+\n| PASSWORD(\'mypass\') |\n+-------------------------------------------+\n| *6C8989366EAF75BB670AD8EA7A7FC1176A95CEF4 |\n+-------------------------------------------+\n\nMariaDB> SET old_passwords = 1;\nMariaDB> SELECT PASSWORD(\'mypass\');\n+--------------------+\n| PASSWORD(\'mypass\') |\n+--------------------+\n| 6f8c114b58f2ce9e |\n+--------------------+\n','https://mariadb.com/kb/en/password/'),(430,'CHAR',22,'[NATIONAL] CHAR[(M)] [CHARACTER SET charset_name] [COLLATE\ncollation_name]\n\nA fixed-length string that is always right-padded with spaces to the\nspecified length when stored. M represents the column length in\ncharacters. The range of M is 0 to 255. If M is omitted, the length is\n1.\n\n*Note*: Trailing spaces are removed when CHAR values are retrieved\nunless the PAD_CHAR_TO_FULL_LENGTH SQL mode is enabled.\n\nURL: https://mariadb.com/kb/en/char/\n\n','','https://mariadb.com/kb/en/char/'),(431,'UTC_DATE',31,'Syntax:\nUTC_DATE, UTC_DATE()\n\nReturns the current UTC date as a value in \'YYYY-MM-DD\' or YYYYMMDD\nformat, depending on whether the function is used in a string or\nnumeric context.\n\nURL: https://mariadb.com/kb/en/utc_date/\n\n','MariaDB> SELECT UTC_DATE(), UTC_DATE() + 0;\n -> \'2003-08-14\', 20030814\n','https://mariadb.com/kb/en/utc_date/'),(432,'DIMENSION',36,'Dimension(g)\n\nReturns the inherent dimension of the geometry value g. The result can\nbe -1, 0, 1, or 2. The meaning of these values is given in\nhttps://mariadb.com/kb/en/dimension/.\n\nURL: https://mariadb.com/kb/en/dimension/\n\n','MariaDB> SELECT Dimension(GeomFromText(\'LineString(1 1,2 2)\'));\n+------------------------------------------------+\n| Dimension(GeomFromText(\'LineString(1 1,2 2)\')) |\n+------------------------------------------------+\n| 1 |\n+------------------------------------------------+\n','https://mariadb.com/kb/en/dimension/'),(433,'COUNT DISTINCT',16,'Syntax:\nCOUNT(DISTINCT expr,[expr...])\n\nReturns a count of the number of rows with different non-NULL expr\nvalues.\n\nCOUNT(DISTINCT) returns 0 if there were no matching rows.\n\nURL: https://mariadb.com/kb/en/count-distinct/\n\n','MariaDB> SELECT COUNT(DISTINCT results) FROM student;\n','https://mariadb.com/kb/en/count-distinct/'),(434,'BIT',22,'BIT[(M)]\n\nA bit-field type. M indicates the number of bits per value, from 1 to\n64. The default is 1 if M is omitted.\n\nURL: https://mariadb.com/kb/en/bit/\n\n','','https://mariadb.com/kb/en/bit/'),(435,'EQUALS',30,'Equals(g1,g2)\n\nReturns 1 or 0 to indicate whether g1 is spatially equal to g2.\n\nURL: https://mariadb.com/kb/en/equals/\n\n','','https://mariadb.com/kb/en/equals/'),(436,'SHOW CREATE VIEW',26,'Syntax:\nSHOW CREATE VIEW view_name\n\nThis statement shows a CREATE VIEW statement that creates the given\nview.\n\nURL: https://mariadb.com/kb/en/show-create-view/\n\n','','https://mariadb.com/kb/en/show-create-view/'),(437,'INTERVAL',18,'Syntax:\nINTERVAL(N,N1,N2,N3,...)\n\nReturns 0 if N < N1, 1 if N < N2 and so on or -1 if N is NULL. All\narguments are treated as integers. It is required that N1 < N2 < N3 <\n... < Nn for this function to work correctly. This is because a binary\nsearch is used (very fast).\n\nURL: https://mariadb.com/kb/en/interval/\n\n','MariaDB> SELECT INTERVAL(23, 1, 15, 17, 30, 44, 200);\n -> 3\nMariaDB> SELECT INTERVAL(10, 1, 10, 100, 1000);\n -> 2\nMariaDB> SELECT INTERVAL(22, 23, 30, 44, 200);\n -> 0\n','https://mariadb.com/kb/en/interval/'),(438,'FROM_DAYS',31,'Syntax:\nFROM_DAYS(N)\n\nGiven a day number N, returns a DATE value.\n\nURL: https://mariadb.com/kb/en/from_days/\n\n','MariaDB> SELECT FROM_DAYS(730669);\n -> \'2007-07-03\'\n','https://mariadb.com/kb/en/from_days/'),(439,'ALTER PROCEDURE',39,'Syntax:\nALTER PROCEDURE proc_name [characteristic ...]\n\ncharacteristic:\n COMMENT \'string\'\n | LANGUAGE SQL\n | { CONTAINS SQL | NO SQL | READS SQL DATA | MODIFIES SQL DATA }\n | SQL SECURITY { DEFINER | INVOKER }\n\nThis statement can be used to change the characteristics of a stored\nprocedure. More than one change may be specified in an ALTER PROCEDURE\nstatement. However, you cannot change the parameters or body of a\nstored procedure using this statement; to make such changes, you must\ndrop and re-create the procedure using DROP PROCEDURE and CREATE\nPROCEDURE.\n\nYou must have the ALTER ROUTINE privilege for the procedure. By\ndefault, that privilege is granted automatically to the procedure\ncreator. This behavior can be changed by disabling the\nautomatic_sp_privileges system variable. See\nhttps://mariadb.com/kb/en/stored-routine-privileges/.\n\nURL: https://mariadb.com/kb/en/alter-procedure/\n\n','','https://mariadb.com/kb/en/alter-procedure/'),(440,'BIT_COUNT',19,'Syntax:\nBIT_COUNT(N)\n\nReturns the number of bits that are set in the argument N.\n\nURL: https://mariadb.com/kb/en/bit_count/\n\n','MariaDB> SELECT BIT_COUNT(29), BIT_COUNT(b\'101010\');\n -> 4, 3\n','https://mariadb.com/kb/en/bit_count/'),(441,'OCTET_LENGTH',37,'Syntax:\nOCTET_LENGTH(str)\n\nOCTET_LENGTH() is a synonym for LENGTH().\n\nURL: https://mariadb.com/kb/en/octet_length/\n\n','','https://mariadb.com/kb/en/octet_length/'),(442,'UTC_TIMESTAMP',31,'Syntax:\nUTC_TIMESTAMP, UTC_TIMESTAMP()\n\nReturns the current UTC date and time as a value in \'YYYY-MM-DD\nHH:MM:SS\' or YYYYMMDDHHMMSS.uuuuuu format, depending on whether the\nfunction is used in a string or numeric context.\n\nURL: https://mariadb.com/kb/en/utc_timestamp/\n\n','MariaDB> SELECT UTC_TIMESTAMP(), UTC_TIMESTAMP() + 0;\n -> \'2003-08-14 18:08:04\', 20030814180804.000000\n','https://mariadb.com/kb/en/utc_timestamp/'),(443,'AES_ENCRYPT',12,'Syntax:\nAES_ENCRYPT(str,key_str)\n\nAES_ENCRYPT() and AES_DECRYPT() enable encryption and decryption of\ndata using the official AES (Advanced Encryption Standard) algorithm,\npreviously known as \"Rijndael.\" Encoding with a 128-bit key length is\nused, but you can extend it up to 256 bits by modifying the source. We\nchose 128 bits because it is much faster and it is secure enough for\nmost purposes.\n\nAES_ENCRYPT() encrypts a string and returns a binary string.\nAES_DECRYPT() decrypts the encrypted string and returns the original\nstring. The input arguments may be any length. If either argument is\nNULL, the result of this function is also NULL.\n\nBecause AES is a block-level algorithm, padding is used to encode\nuneven length strings and so the result string length may be calculated\nusing this formula:\n\n16 * (trunc(string_length / 16) + 1)\n\nIf AES_DECRYPT() detects invalid data or incorrect padding, it returns\nNULL. However, it is possible for AES_DECRYPT() to return a non-NULL\nvalue (possibly garbage) if the input data or the key is invalid.\n\nYou can use the AES functions to store data in an encrypted form by\nmodifying your queries:\n\nURL: https://mariadb.com/kb/en/aes_encrypt/\n\n','INSERT INTO t VALUES (1,AES_ENCRYPT(\'text\',\'password\'));\n','https://mariadb.com/kb/en/aes_encrypt/'),(444,'+',4,'Syntax:\n+\n\nAddition:\n\nURL: https://mariadb.com/kb/en/addition-operator/\n\n','MariaDB> SELECT 3+5;\n -> 8\n','https://mariadb.com/kb/en/addition-operator/'),(445,'INET_NTOA',14,'Syntax:\nINET_NTOA(expr)\n\nGiven a numeric IPv4 network address in network byte order, returns the\ndotted-quad representation of the address as a string. INET_NTOA()\nreturns NULL if it does not understand its argument.\n\nAs of MySQL 5.5.3, the return value is a nonbinary string in the\nconnection character set. Before 5.5.3, the return value is a binary\nstring.\n\nURL: https://mariadb.com/kb/en/inet_ntoa/\n\n','MariaDB> SELECT INET_NTOA(167773449);\n -> \'10.0.5.9\'\n','https://mariadb.com/kb/en/inet_ntoa/'),(446,'ACOS',4,'Syntax:\nACOS(X)\n\nReturns the arc cosine of X, that is, the value whose cosine is X.\nReturns NULL if X is not in the range -1 to 1.\n\nURL: https://mariadb.com/kb/en/acos/\n\n','MariaDB> SELECT ACOS(1);\n -> 0\nMariaDB> SELECT ACOS(1.0001);\n -> NULL\nMariaDB> SELECT ACOS(0);\n -> 1.5707963267949\n','https://mariadb.com/kb/en/acos/'),(447,'ISOLATION',8,'Syntax:\nSET [GLOBAL | SESSION] TRANSACTION ISOLATION LEVEL\n {\n REPEATABLE READ\n | READ COMMITTED\n | READ UNCOMMITTED\n | SERIALIZABLE\n }\n\nThis statement sets the transaction isolation level, used for\noperations on InnoDB tables.\n\nScope of the Isolation Level\n\nYou can set the isolation level globally, for the current session, or\nfor the next transaction:\n\no With the GLOBAL keyword, the statement sets the default transaction\n level globally for all subsequent sessions. Existing sessions are\n unaffected.\n\no With the SESSION keyword, the statement sets the default transaction\n level for all subsequent transactions performed within the current\n session.\n\no Without any SESSION or GLOBAL keyword, the statement sets the\n isolation level for the next (not started) transaction performed\n within the current session.\n\nA change to the global default isolation level requires the SUPER\nprivilege. Any session is free to change its session isolation level\n(even in the middle of a transaction), or the isolation level for its\nnext transaction.\n\nSET TRANSACTION ISOLATION LEVEL without GLOBAL or SESSION is not\npermitted while there is an active transaction:\n\nMariaDB> START TRANSACTION;\nQuery OK, 0 rows affected (0.02 sec)\n\nMariaDB> SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;\nERROR 1568 (25001): Transaction isolation level can\'t be changed\nwhile a transaction is in progress\n\nTo set the global default isolation level at server startup, use the\n--transaction-isolation=level option to mysqld on the command line or\nin an option file. Values of level for this option use dashes rather\nthan spaces, so the permissible values are READ-UNCOMMITTED,\nREAD-COMMITTED, REPEATABLE-READ, or SERIALIZABLE. For example, to set\nthe default isolation level to REPEATABLE READ, use these lines in the\n[mysqld] section of an option file:\n\n[mysqld]\ntransaction-isolation = REPEATABLE-READ\n\nIt is possible to check or set the global and session transaction\nisolation levels at runtime by using the tx_isolation system variable:\n\nSELECT @@GLOBAL.tx_isolation, @@tx_isolation;\nSET GLOBAL tx_isolation=\'REPEATABLE-READ\';\nSET SESSION tx_isolation=\'SERIALIZABLE\';\n\nDetails and Usage of Isolation Levels\n\nInnoDB supports each of the transaction isolation levels described here\nusing different locking strategies. You can enforce a high degree of\nconsistency with the default REPEATABLE READ level, for operations on\ncrucial data where ACID compliance is important. Or you can relax the\nconsistency rules with READ COMMITTED or even READ UNCOMMITTED, in\nsituations such as bulk reporting where precise consistency and\nrepeatable results are less important than minimizing the amount of\noverhead for locking. SERIALIZABLE enforces even stricter rules than\nREPEATABLE READ, and is used mainly in specialized situations, such as\nwith XA transactions and for troubleshooting issues with concurrency\nand deadlocks.\n\nFor full information about how these isolation levels work with InnoDB\ntransactions, see\nhttp://dev.mysql.com/doc/refman/5.1/en/innodb-transaction-model.html.\nIn particular, for additional information about InnoDB record-level\nlocks and how it uses them to execute various types of statements, see\nhttp://dev.mysql.com/doc/refman/5.5/en/innodb-record-level-locks.html\nand http://dev.mysql.com/doc/refman/5.5/en/innodb-locks-set.html.\n\nThe following list describes how MySQL supports the different\ntransaction levels. The list goes from the most commonly used level to\nthe least used.\n\no REPEATABLE READ\n\n This is the default isolation level for InnoDB. For consistent reads,\n there is an important difference from the READ COMMITTED isolation\n level: All consistent reads within the same transaction read the\n snapshot established by the first read. This convention means that if\n you issue several plain (nonlocking) SELECT statements within the\n same transaction, these SELECT statements are consistent also with\n respect to each other. See\n http://dev.mysql.com/doc/refman/5.5/en/innodb-consistent-read.html.\n\n For locking reads (SELECT with FOR UPDATE or LOCK IN SHARE MODE),\n UPDATE, and DELETE statements, locking depends on whether the\n statement uses a unique index with a unique search condition, or a\n range-type search condition. For a unique index with a unique search\n condition, InnoDB locks only the index record found, not the gap\n before it. For other search conditions, InnoDB locks the index range\n scanned, using gap locks or next-key (gap plus index-record) locks to\n block insertions by other sessions into the gaps covered by the\n range.\n\no READ COMMITTED\n\n A somewhat Oracle-like isolation level with respect to consistent\n (nonlocking) reads: Each consistent read, even within the same\n transaction, sets and reads its own fresh snapshot. See\n http://dev.mysql.com/doc/refman/5.5/en/innodb-consistent-read.html.\n\n For locking reads (SELECT with FOR UPDATE or LOCK IN SHARE MODE),\n InnoDB locks only index records, not the gaps before them, and thus\n permits the free insertion of new records next to locked records. For\n UPDATE and DELETE statements, locking depends on whether the\n statement uses a unique index with a unique search condition (such as\n WHERE id = 100), or a range-type search condition (such as WHERE id >\n 100). For a unique index with a unique search condition, InnoDB locks\n only the index record found, not the gap before it. For range-type\n searches, InnoDB locks the index range scanned, using gap locks or\n next-key (gap plus index-record) locks to block insertions by other\n sessions into the gaps covered by the range. This is necessary\n because \"phantom rows\" must be blocked for MySQL replication and\n recovery to work.\n\n *Note*: In MySQL 5.5, if the READ COMMITTED isolation level is used\n or the innodb_locks_unsafe_for_binlog system variable is enabled,\n there is no InnoDB gap locking except for foreign-key constraint\n checking and duplicate-key checking. Also, record locks for\n nonmatching rows are released after MySQL has evaluated the WHERE\n condition. If you use READ COMMITTED or enable\n innodb_locks_unsafe_for_binlog, you must use row-based binary\n logging.\n\no READ UNCOMMITTED\n\n SELECT statements are performed in a nonlocking fashion, but a\n possible earlier version of a row might be used. Thus, using this\n isolation level, such reads are not consistent. This is also called a\n \"dirty read.\" Otherwise, this isolation level works like READ\n COMMITTED.\n\no SERIALIZABLE\n\n This level is like REPEATABLE READ, but InnoDB implicitly converts\n all plain SELECT statements to SELECT ... LOCK IN SHARE MODE if\n autocommit is disabled. If autocommit is enabled, the SELECT is its\n own transaction. It therefore is known to be read only and can be\n serialized if performed as a consistent (nonlocking) read and need\n not block for other transactions. (To force a plain SELECT to block\n if other transactions have modified the selected rows, disable\n autocommit.)\n\nURL: https://mariadb.com/kb/en/set-transaction-isolation-level/\n\n','','https://mariadb.com/kb/en/set-transaction-isolation-level/'),(448,'CEILING',4,'Syntax:\nCEILING(X)\n\nReturns the smallest integer value not less than X.\n\nURL: https://mariadb.com/kb/en/ceiling/\n\n','MariaDB> SELECT CEILING(1.23);\n -> 2\nMariaDB> SELECT CEILING(-1.23);\n -> -1\n','https://mariadb.com/kb/en/ceiling/'),(449,'SIN',4,'Syntax:\nSIN(X)\n\nReturns the sine of X, where X is given in radians.\n\nURL: https://mariadb.com/kb/en/sin/\n\n','MariaDB> SELECT SIN(PI());\n -> 1.2246063538224e-16\nMariaDB> SELECT ROUND(SIN(PI()));\n -> 0\n','https://mariadb.com/kb/en/sin/'),(450,'DAYOFWEEK',31,'Syntax:\nDAYOFWEEK(date)\n\nReturns the weekday index for date (1 = Sunday, 2 = Monday, ..., 7 =\nSaturday). These index values correspond to the ODBC standard.\n\nURL: https://mariadb.com/kb/en/dayofweek/\n\n','MariaDB> SELECT DAYOFWEEK(\'2007-02-03\');\n -> 7\n','https://mariadb.com/kb/en/dayofweek/'),(451,'SHOW PROCESSLIST',26,'Syntax:\nSHOW [FULL] PROCESSLIST\n\nSHOW PROCESSLIST shows you which threads are running. You can also get\nthis information from the INFORMATION_SCHEMA PROCESSLIST table or the\nmysqladmin processlist command. If you have the PROCESS privilege, you\ncan see all threads. Otherwise, you can see only your own threads (that\nis, threads associated with the MySQL account that you are using). If\nyou do not use the FULL keyword, only the first 100 characters of each\nstatement are shown in the Info field.\n\nURL: https://mariadb.com/kb/en/show-processlist/\n\n','','https://mariadb.com/kb/en/show-processlist/'),(452,'LINEFROMWKB',32,'LineFromWKB(wkb[,srid]), LineStringFromWKB(wkb[,srid])\n\nConstructs a LINESTRING value using its WKB representation and SRID.\n\nURL: https://mariadb.com/kb/en/linefromwkb/\n\n','','https://mariadb.com/kb/en/linefromwkb/'),(453,'GEOMETRYTYPE',36,'GeometryType(g)\n\nReturns as a binary string the name of the geometry type of which the\ngeometry instance g is a member. The name corresponds to one of the\ninstantiable Geometry subclasses.\n\nURL: https://mariadb.com/kb/en/geometrytype/\n\n','MariaDB> SELECT GeometryType(GeomFromText(\'POINT(1 1)\'));\n+------------------------------------------+\n| GeometryType(GeomFromText(\'POINT(1 1)\')) |\n+------------------------------------------+\n| POINT |\n+------------------------------------------+\n','https://mariadb.com/kb/en/geometrytype/'),(454,'CREATE VIEW',39,'Syntax:\nCREATE\n [OR REPLACE]\n [ALGORITHM = {UNDEFINED | MERGE | TEMPTABLE}]\n [DEFINER = { user | CURRENT_USER }]\n [SQL SECURITY { DEFINER | INVOKER }]\n VIEW view_name [(column_list)]\n AS select_statement\n [WITH [CASCADED | LOCAL] CHECK OPTION]\n\nThe CREATE VIEW statement creates a new view, or replaces an existing\none if the OR REPLACE clause is given. If the view does not exist,\nCREATE OR REPLACE VIEW is the same as CREATE VIEW. If the view does\nexist, CREATE OR REPLACE VIEW is the same as ALTER VIEW.\n\nThe select_statement is a SELECT statement that provides the definition\nof the view. (When you select from the view, you select in effect using\nthe SELECT statement.) select_statement can select from base tables or\nother views.\n\nThe view definition is \"frozen\" at creation time, so changes to the\nunderlying tables afterward do not affect the view definition. For\nexample, if a view is defined as SELECT * on a table, new columns added\nto the table later do not become part of the view.\n\nThe ALGORITHM clause affects how MySQL processes the view. The DEFINER\nand SQL SECURITY clauses specify the security context to be used when\nchecking access privileges at view invocation time. The WITH CHECK\nOPTION clause can be given to constrain inserts or updates to rows in\ntables referenced by the view. These clauses are described later in\nthis section.\n\nThe CREATE VIEW statement requires the CREATE VIEW privilege for the\nview, and some privilege for each column selected by the SELECT\nstatement. For columns used elsewhere in the SELECT statement you must\nhave the SELECT privilege. If the OR REPLACE clause is present, you\nmust also have the DROP privilege for the view. CREATE VIEW might also\nrequire the SUPER privilege, depending on the DEFINER value, as\ndescribed later in this section.\n\nWhen a view is referenced, privilege checking occurs as described later\nin this section.\n\nA view belongs to a database. By default, a new view is created in the\ndefault database. To create the view explicitly in a given database,\nspecify the name as db_name.view_name when you create it:\n\nMariaDB> CREATE VIEW test.v AS SELECT * FROM t;\n\nWithin a database, base tables and views share the same namespace, so a\nbase table and a view cannot have the same name.\n\nColumns retrieved by the SELECT statement can be simple references to\ntable columns. They can also be expressions that use functions,\nconstant values, operators, and so forth.\n\nViews must have unique column names with no duplicates, just like base\ntables. By default, the names of the columns retrieved by the SELECT\nstatement are used for the view column names. To define explicit names\nfor the view columns, the optional column_list clause can be given as a\nlist of comma-separated identifiers. The number of names in column_list\nmust be the same as the number of columns retrieved by the SELECT\nstatement.\n\nUnqualified table or view names in the SELECT statement are interpreted\nwith respect to the default database. A view can refer to tables or\nviews in other databases by qualifying the table or view name with the\nproper database name.\n\nA view can be created from many kinds of SELECT statements. It can\nrefer to base tables or other views. It can use joins, UNION, and\nsubqueries. The SELECT need not even refer to any tables. The following\nexample defines a view that selects two columns from another table, as\nwell as an expression calculated from those columns:\n\nMariaDB> CREATE TABLE t (qty INT, price INT);\nMariaDB> INSERT INTO t VALUES(3, 50);\nMariaDB> CREATE VIEW v AS SELECT qty, price, qty*price AS value FROM t;\nMariaDB> SELECT * FROM v;\n+------+-------+-------+\n| qty | price | value |\n+------+-------+-------+\n| 3 | 50 | 150 |\n+------+-------+-------+\n\nA view definition is subject to the following restrictions:\n\no The SELECT statement cannot contain a subquery in the FROM clause.\n\no The SELECT statement cannot refer to system or user variables.\n\no Within a stored program, the definition cannot refer to program\n parameters or local variables.\n\no The SELECT statement cannot refer to prepared statement parameters.\n\no Any table or view referred to in the definition must exist. However,\n after a view has been created, it is possible to drop a table or view\n that the definition refers to. In this case, use of the view results\n in an error. To check a view definition for problems of this kind,\n use the CHECK TABLE statement.\n\no The definition cannot refer to a TEMPORARY table, and you cannot\n create a TEMPORARY view.\n\no Any tables named in the view definition must exist at definition\n time.\n\no You cannot associate a trigger with a view.\n\no Aliases for column names in the SELECT statement are checked against\n the maximum column length of 64 characters (not the maximum alias\n length of 256 characters).\n\nORDER BY is permitted in a view definition, but it is ignored if you\nselect from a view using a statement that has its own ORDER BY.\n\nFor other options or clauses in the definition, they are added to the\noptions or clauses of the statement that references the view, but the\neffect is undefined. For example, if a view definition includes a LIMIT\nclause, and you select from the view using a statement that has its own\nLIMIT clause, it is undefined which limit applies. This same principle\napplies to options such as ALL, DISTINCT, or SQL_SMALL_RESULT that\nfollow the SELECT keyword, and to clauses such as INTO, FOR UPDATE,\nLOCK IN SHARE MODE, and PROCEDURE.\n\nIf you create a view and then change the query processing environment\nby changing system variables, that may affect the results that you get\nfrom the view:\n\nMariaDB> CREATE VIEW v (mycol) AS SELECT \'abc\';\nQuery OK, 0 rows affected (0.01 sec)\n\nMariaDB> SET sql_mode = \'\';\nQuery OK, 0 rows affected (0.00 sec)\n\nMariaDB> SELECT \"mycol\" FROM v;\n+-------+\n| mycol |\n+-------+\n| mycol |\n+-------+\n1 row in set (0.01 sec)\n\nMariaDB> SET sql_mode = \'ANSI_QUOTES\';\nQuery OK, 0 rows affected (0.00 sec)\n\nMariaDB> SELECT \"mycol\" FROM v;\n+-------+\n| mycol |\n+-------+\n| abc |\n+-------+\n1 row in set (0.00 sec)\n\nThe DEFINER and SQL SECURITY clauses determine which MySQL account to\nuse when checking access privileges for the view when a statement is\nexecuted that references the view. The valid SQL SECURITY\ncharacteristic values are DEFINER and INVOKER. These indicate that the\nrequired privileges must be held by the user who defined or invoked the\nview, respectively. The default SQL SECURITY value is DEFINER.\n\nIf a user value is given for the DEFINER clause, it should be a MySQL\naccount specified as \'user_name\'@\'host_name\' (the same format used in\nthe GRANT statement), CURRENT_USER, or CURRENT_USER(). The default\nDEFINER value is the user who executes the CREATE VIEW statement. This\nis the same as specifying DEFINER = CURRENT_USER explicitly.\n\nIf you specify the DEFINER clause, these rules determine the valid\nDEFINER user values:\n\no If you do not have the SUPER privilege, the only valid user value is\n your own account, either specified literally or by using\n CURRENT_USER. You cannot set the definer to some other account.\n\no If you have the SUPER privilege, you can specify any syntactically\n valid account name. If the account does not actually exist, a warning\n is generated.\n\no Although it is possible to create a view with a nonexistent DEFINER\n account, an error occurs when the view is referenced if the SQL\n SECURITY value is DEFINER but the definer account does not exist.\n\nFor more information about view security, see\nhttps://mariadb.com/kb/en/stored-routine-privileges/.\n\nWithin a view definition, CURRENT_USER returns the view\'s DEFINER value\nby default. For views defined with the SQL SECURITY INVOKER\ncharacteristic, CURRENT_USER returns the account for the view\'s\ninvoker. For information about user auditing within views, see\nhttp://dev.mysql.com/doc/refman/5.5/en/account-activity-auditing.html.\n\nWithin a stored routine that is defined with the SQL SECURITY DEFINER\ncharacteristic, CURRENT_USER returns the routine\'s DEFINER value. This\nalso affects a view defined within such a routine, if the view\ndefinition contains a DEFINER value of CURRENT_USER.\n\nView privileges are checked like this:\n\no At view definition time, the view creator must have the privileges\n needed to use the top-level objects accessed by the view. For\n example, if the view definition refers to table columns, the creator\n must have some privilege for each column in the select list of the\n definition, and the SELECT privilege for each column used elsewhere\n in the definition. If the definition refers to a stored function,\n only the privileges needed to invoke the function can be checked. The\n privileges required at function invocation time can be checked only\n as it executes: For different invocations, different execution paths\n within the function might be taken.\n\no The user who references a view must have appropriate privileges to\n access it (SELECT to select from it, INSERT to insert into it, and so\n forth.)\n\no When a view has been referenced, privileges for objects accessed by\n the view are checked against the privileges held by the view DEFINER\n account or invoker, depending on whether the SQL SECURITY\n characteristic is DEFINER or INVOKER, respectively.\n\no If reference to a view causes execution of a stored function,\n privilege checking for statements executed within the function depend\n on whether the function SQL SECURITY characteristic is DEFINER or\n INVOKER. If the security characteristic is DEFINER, the function runs\n with the privileges of the DEFINER account. If the characteristic is\n INVOKER, the function runs with the privileges determined by the\n view\'s SQL SECURITY characteristic.\n\nExample: A view might depend on a stored function, and that function\nmight invoke other stored routines. For example, the following view\ninvokes a stored function f():\n\nCREATE VIEW v AS SELECT * FROM t WHERE t.id = f(t.name);\n\nSuppose that f() contains a statement such as this:\n\nIF name IS NULL then\n CALL p1();\nELSE\n CALL p2();\nEND IF;\n\nThe privileges required for executing statements within f() need to be\nchecked when f() executes. This might mean that privileges are needed\nfor p1() or p2(), depending on the execution path within f(). Those\nprivileges must be checked at runtime, and the user who must possess\nthe privileges is determined by the SQL SECURITY values of the view v\nand the function f().\n\nThe DEFINER and SQL SECURITY clauses for views are extensions to\nstandard SQL. In standard SQL, views are handled using the rules for\nSQL SECURITY DEFINER. The standard says that the definer of the view,\nwhich is the same as the owner of the view\'s schema, gets applicable\nprivileges on the view (for example, SELECT) and may grant them. MySQL\nhas no concept of a schema \"owner\", so MySQL adds a clause to identify\nthe definer. The DEFINER clause is an extension where the intent is to\nhave what the standard has; that is, a permanent record of who defined\nthe view. This is why the default DEFINER value is the account of the\nview creator.\n\nThe optional ALGORITHM clause is a MySQL extension to standard SQL. It\naffects how MySQL processes the view. ALGORITHM takes three values:\nMERGE, TEMPTABLE, or UNDEFINED. The default algorithm is UNDEFINED if\nno ALGORITHM clause is present. For more information, see\nhttps://mariadb.com/kb/en/view-algorithms/.\n\nSome views are updatable. That is, you can use them in statements such\nas UPDATE, DELETE, or INSERT to update the contents of the underlying\ntable. For a view to be updatable, there must be a one-to-one\nrelationship between the rows in the view and the rows in the\nunderlying table. There are also certain other constructs that make a\nview nonupdatable.\n\nThe WITH CHECK OPTION clause can be given for an updatable view to\nprevent inserts or updates to rows except those for which the WHERE\nclause in the select_statement is true.\n\nIn a WITH CHECK OPTION clause for an updatable view, the LOCAL and\nCASCADED keywords determine the scope of check testing when the view is\ndefined in terms of another view. The LOCAL keyword restricts the CHECK\nOPTION only to the view being defined. CASCADED causes the checks for\nunderlying views to be evaluated as well. When neither keyword is\ngiven, the default is CASCADED.\n\nFor more information about updatable views and the WITH CHECK OPTION\nclause, see\nhttps://mariadb.com/kb/en/inserting-and-updating-with-views/.\n\nURL: https://mariadb.com/kb/en/create-view/\n\n','','https://mariadb.com/kb/en/create-view/'),(455,'TRIM',37,'Syntax:\nTRIM([{BOTH | LEADING | TRAILING} [remstr] FROM] str), TRIM([remstr\nFROM] str)\n\nReturns the string str with all remstr prefixes or suffixes removed. If\nnone of the specifiers BOTH, LEADING, or TRAILING is given, BOTH is\nassumed. remstr is optional and, if not specified, spaces are removed.\n\nURL: https://mariadb.com/kb/en/trim/\n\n','MariaDB> SELECT TRIM(\' bar \');\n -> \'bar\'\nMariaDB> SELECT TRIM(LEADING \'x\' FROM \'xxxbarxxx\');\n -> \'barxxx\'\nMariaDB> SELECT TRIM(BOTH \'x\' FROM \'xxxbarxxx\');\n -> \'bar\'\nMariaDB> SELECT TRIM(TRAILING \'xyz\' FROM \'barxxyz\');\n -> \'barx\'\n','https://mariadb.com/kb/en/trim/'),(456,'IS',18,'Syntax:\nIS boolean_value\n\nTests a value against a boolean value, where boolean_value can be TRUE,\nFALSE, or UNKNOWN.\n\nURL: https://mariadb.com/kb/en/is/\n\n','MariaDB> SELECT 1 IS TRUE, 0 IS FALSE, NULL IS UNKNOWN;\n -> 1, 1, 1\n','https://mariadb.com/kb/en/is/'),(457,'GET_FORMAT',31,'Syntax:\nGET_FORMAT({DATE|TIME|DATETIME}, {\'EUR\'|\'USA\'|\'JIS\'|\'ISO\'|\'INTERNAL\'})\n\nReturns a format string. This function is useful in combination with\nthe DATE_FORMAT() and the STR_TO_DATE() functions.\n\nURL: https://mariadb.com/kb/en/get_format/\n\n','MariaDB> SELECT DATE_FORMAT(\'2003-10-03\',GET_FORMAT(DATE,\'EUR\'));\n -> \'03.10.2003\'\nMariaDB> SELECT STR_TO_DATE(\'10.31.2003\',GET_FORMAT(DATE,\'USA\'));\n -> \'2003-10-31\'\n','https://mariadb.com/kb/en/get_format/'),(458,'TINYBLOB',22,'TINYBLOB\n\nA BLOB column with a maximum length of 255 (28 - 1) bytes. Each\nTINYBLOB value is stored using a 1-byte length prefix that indicates\nthe number of bytes in the value.\n\nURL: https://mariadb.com/kb/en/tinyblob/\n\n','','https://mariadb.com/kb/en/tinyblob/'),(459,'SIGNAL',23,'Syntax:\nSIGNAL condition_value\n [SET signal_information_item\n [, signal_information_item] ...]\n\ncondition_value:\n SQLSTATE [VALUE] sqlstate_value\n | condition_name\n\nsignal_information_item:\n condition_information_item_name = simple_value_specification\n\ncondition_information_item_name:\n CLASS_ORIGIN\n | SUBCLASS_ORIGIN\n | MESSAGE_TEXT\n | MYSQL_ERRNO\n | CONSTRAINT_CATALOG\n | CONSTRAINT_SCHEMA\n | CONSTRAINT_NAME\n | CATALOG_NAME\n | SCHEMA_NAME\n | TABLE_NAME\n | COLUMN_NAME\n | CURSOR_NAME\n\ncondition_name, simple_value_specification:\n (see following discussion)\n\nSIGNAL is the way to \"return\" an error. SIGNAL provides error\ninformation to a handler, to an outer portion of the application, or to\nthe client. Also, it provides control over the error\'s characteristics\n(error number, SQLSTATE value, message). Without SIGNAL, it is\nnecessary to resort to workarounds such as deliberately referring to a\nnonexistent table to cause a routine to return an error.\n\nNo special privileges are required to execute the SIGNAL statement.\n\nThe condition_value in a SIGNAL statement indicates the error value to\nbe returned. It can be an SQLSTATE value (a 5-character string literal)\nor a condition_name that refers to a named condition previously defined\nwith DECLARE ... CONDITION (see [HELP DECLARE CONDITION]).\n\nAn SQLSTATE value can indicate errors, warnings, or \"not found.\" The\nfirst two characters of the value indicate its error class, as\ndiscussed in\nhttps://mariadb.com/kb/en/signal/#signal-condition-inf\normation-items. Some signal values cause statement termination; see\nhttps://mariadb.com/kb/en/signal/#signal-effects.\n\nThe SQLSTATE value for a SIGNAL statement should not start with \'00\'\nbecause such values indicate success and are not valid for signaling an\nerror. This is true whether the SQLSTATE value is specified directly in\nthe SIGNAL statement or in a named condition referred to in the\nstatement. If the value is invalid, a Bad SQLSTATE error occurs.\n\nTo signal a generic SQLSTATE value, use \'45000\', which means \"unhandled\nuser-defined exception.\"\n\nThe SIGNAL statement optionally includes a SET clause that contains\nmultiple signal items, in a comma-separated list of\ncondition_information_item_name = simple_value_specification\nassignments.\n\nEach condition_information_item_name may be specified only once in the\nSET clause. Otherwise, a Duplicate condition information item error\noccurs.\n\nValid simple_value_specification designators can be specified using\nstored procedure or function parameters, stored program local variables\ndeclared with DECLARE, user-defined variables, system variables, or\nliterals. A character literal may include a _charset introducer.\n\nFor information about permissible condition_information_item_name\nvalues, see\nhttps://mariadb.com/kb/en/signal/#signal-condition-inf\normation-items.\n\nURL: https://mariadb.com/kb/en/signal/\n\n','CREATE PROCEDURE p (pval INT)\nBEGIN\n DECLARE specialty CONDITION FOR SQLSTATE \'45000\';\n IF pval = 0 THEN\n SIGNAL SQLSTATE \'01000\';\n ELSEIF pval = 1 THEN\n SIGNAL SQLSTATE \'45000\'\n SET MESSAGE_TEXT = \'An error occurred\';\n ELSEIF pval = 2 THEN\n SIGNAL specialty\n SET MESSAGE_TEXT = \'An error occurred\';\n ELSE\n SIGNAL SQLSTATE \'01000\'\n SET MESSAGE_TEXT = \'A warning occurred\', MYSQL_ERRNO = 1000;\n SIGNAL SQLSTATE \'45000\'\n SET MESSAGE_TEXT = \'An error occurred\', MYSQL_ERRNO = 1001;\n END IF;\nEND;\n','https://mariadb.com/kb/en/signal/'),(460,'SAVEPOINT',8,'Syntax:\nSAVEPOINT identifier\nROLLBACK [WORK] TO [SAVEPOINT] identifier\nRELEASE SAVEPOINT identifier\n\nInnoDB supports the SQL statements SAVEPOINT, ROLLBACK TO SAVEPOINT,\nRELEASE SAVEPOINT and the optional WORK keyword for ROLLBACK.\n\nURL: https://mariadb.com/kb/en/savepoint/\n\n','','https://mariadb.com/kb/en/savepoint/'),(461,'USER',17,'Syntax:\nUSER()\n\nReturns the current MySQL user name and host name as a string in the\nutf8 character set.\n\nURL: https://mariadb.com/kb/en/user/\n\n','MariaDB> SELECT USER();\n -> \'davida@localhost\'\n','https://mariadb.com/kb/en/user/'),(462,'LABELS',23,'Syntax:\n[begin_label:] BEGIN\n [statement_list]\nEND [end_label]\n\n[begin_label:] LOOP\n statement_list\nEND LOOP [end_label]\n\n[begin_label:] REPEAT\n statement_list\nUNTIL search_condition\nEND REPEAT [end_label]\n\n[begin_label:] WHILE search_condition DO\n statement_list\nEND WHILE [end_label]\n\nLabels are permitted for BEGIN ... END blocks and for the LOOP, REPEAT,\nand WHILE statements. Label use for those statements follows these\nrules:\n\no begin_label must be followed by a colon.\n\no begin_label can be given without end_label. If end_label is present,\n it must be the same as begin_label.\n\no end_label cannot be given without begin_label.\n\no Labels at the same nesting level must be distinct.\n\no Labels can be up to 16 characters long.\n\nTo refer to a label within the labeled construct, use an ITERATE or\nLEAVE statement. The following example uses those statements to\ncontinue iterating or terminate the loop:\n\nCREATE PROCEDURE doiterate(p1 INT)\nBEGIN\n label1: LOOP\n SET p1 = p1 + 1;\n IF p1 < 10 THEN ITERATE label1; END IF;\n LEAVE label1;\n END LOOP label1;\nEND;\n\nThe scope of a block label does not include the code for handlers\ndeclared within the block. For details, see [HELP DECLARE HANDLER].\n\nURL: https://mariadb.com/kb/en/labels/\n\n','','https://mariadb.com/kb/en/labels/'),(463,'ALTER TABLE',39,'Syntax:\nALTER [ONLINE | OFFLINE] [IGNORE] TABLE tbl_name\n [alter_specification [, alter_specification] ...]\n [partition_options]\n\nalter_specification:\n table_options\n | ADD [COLUMN] col_name column_definition\n [FIRST | AFTER col_name ]\n | ADD [COLUMN] (col_name column_definition,...)\n | ADD {INDEX|KEY} [index_name]\n [index_type] (index_col_name,...) [index_option] ...\n | ADD [CONSTRAINT [symbol]] PRIMARY KEY\n [index_type] (index_col_name,...) [index_option] ...\n | ADD [CONSTRAINT [symbol]]\n UNIQUE [INDEX|KEY] [index_name]\n [index_type] (index_col_name,...) [index_option] ...\n | ADD FULLTEXT [INDEX|KEY] [index_name]\n (index_col_name,...) [index_option] ...\n | ADD SPATIAL [INDEX|KEY] [index_name]\n (index_col_name,...) [index_option] ...\n | ADD [CONSTRAINT [symbol]]\n FOREIGN KEY [index_name] (index_col_name,...)\n reference_definition\n | ALTER [COLUMN] col_name {SET DEFAULT literal | DROP DEFAULT}\n | CHANGE [COLUMN] old_col_name new_col_name column_definition\n [FIRST|AFTER col_name]\n | MODIFY [COLUMN] col_name column_definition\n [FIRST | AFTER col_name]\n | DROP [COLUMN] col_name\n | DROP PRIMARY KEY\n | DROP {INDEX|KEY} index_name\n | DROP FOREIGN KEY fk_symbol\n | MAX_ROWS = rows\n | DISABLE KEYS\n | ENABLE KEYS\n | RENAME [TO|AS] new_tbl_name\n | ORDER BY col_name [, col_name] ...\n | CONVERT TO CHARACTER SET charset_name [COLLATE collation_name]\n | [DEFAULT] CHARACTER SET [=] charset_name [COLLATE [=] collation_name]\n | DISCARD TABLESPACE\n | IMPORT TABLESPACE\n | FORCE\n | ADD PARTITION (partition_definition)\n | DROP PARTITION partition_names\n | TRUNCATE PARTITION {partition_names | ALL}\n | COALESCE PARTITION number\n | REORGANIZE PARTITION [partition_names INTO (partition_definitions)]\n | ANALYZE PARTITION {partition_names | ALL}\n | CHECK PARTITION {partition_names | ALL}\n | OPTIMIZE PARTITION {partition_names | ALL}\n | REBUILD PARTITION {partition_names | ALL}\n | REPAIR PARTITION {partition_names | ALL}\n | PARTITION BY partitioning_expression\n | REMOVE PARTITIONING\n\nindex_col_name:\n col_name [(length)] [ASC | DESC]\n\nindex_type:\n USING {BTREE | HASH}\n\nindex_option:\n KEY_BLOCK_SIZE [=] value\n | index_type\n | WITH PARSER parser_name\n | COMMENT \'string\'\n\ntable_options:\n table_option [[,] table_option] ... (see CREATE TABLE options)\n\npartition_options:\n (see CREATE TABLE options)\n\nALTER TABLE changes the structure of a table. For example, you can add\nor delete columns, create or destroy indexes, change the type of\nexisting columns, or rename columns or the table itself. You can also\nchange characteristics such as the storage engine used for the table or\nthe table comment.\n\nPartitioning-related clauses for ALTER TABLE can be used with\npartitioned tables for repartitioning, for adding, dropping, merging,\nand splitting partitions, and for performing partitioning maintenance.\nFor more information, see\nhttp://dev.mysql.com/doc/refman/5.5/en/alter-table-partition-operations\n.html.\n\nFollowing the table name, specify the alterations to be made. If none\nare given, ALTER TABLE does nothing.\n\nURL: https://mariadb.com/kb/en/alter-table/\n\n','','https://mariadb.com/kb/en/alter-table/'),(464,'MPOINTFROMWKB',32,'MPointFromWKB(wkb[,srid]), MultiPointFromWKB(wkb[,srid])\n\nConstructs a MULTIPOINT value using its WKB representation and SRID.\n\nURL: https://mariadb.com/kb/en/mpointfromwkb/\n\n','','https://mariadb.com/kb/en/mpointfromwkb/'),(465,'CHAR BYTE',22,'The CHAR BYTE data type is an alias for the BINARY data type. This is a\ncompatibility feature.\n\nURL: https://mariadb.com/kb/en/char-byte/\n\n','','https://mariadb.com/kb/en/char-byte/'),(466,'REPAIR TABLE',20,'Syntax:\nREPAIR [NO_WRITE_TO_BINLOG | LOCAL] TABLE\n tbl_name [, tbl_name] ...\n [QUICK] [EXTENDED] [USE_FRM]\n\nREPAIR TABLE repairs a possibly corrupted table. By default, it has the\nsame effect as myisamchk --recover tbl_name. REPAIR TABLE works for\nMyISAM, ARCHIVE, and CSV tables. See\nhttps://mariadb.com/kb/en/myisam-storage-engine/, and\nhttps://mariadb.com/kb/en/archive/, and\nhttps://mariadb.com/kb/en/csv/\n\nThis statement requires SELECT and INSERT privileges for the table.\n\nREPAIR TABLE is supported for partitioned tables. However, the USE_FRM\noption cannot be used with this statement on a partitioned table.\n\nYou can use ALTER TABLE ... REPAIR PARTITION to repair one or more\npartitions; for more information, see [HELP ALTER TABLE], and\nhttp://dev.mysql.com/doc/refman/5.5/en/partitioning-maintenance.html.\n\nURL: https://mariadb.com/kb/en/repair-table/\n\n','','https://mariadb.com/kb/en/repair-table/'),(467,'MERGE',39,'The MERGE storage engine, also known as the MRG_MyISAM engine, is a\ncollection of identical MyISAM tables that can be used as one.\n\"Identical\" means that all tables have identical column and index\ninformation. You cannot merge MyISAM tables in which the columns are\nlisted in a different order, do not have exactly the same columns, or\nhave the indexes in different order. However, any or all of the MyISAM\ntables can be compressed with myisampack. See\nhttps://mariadb.com/kb/en/myisampack/. Differences in\ntable options such as AVG_ROW_LENGTH, MAX_ROWS, or PACK_KEYS do not\nmatter.\n\nURL: https://mariadb.com/kb/en/merge/\n\n','MariaDB> CREATE TABLE t1 (\n -> a INT NOT NULL AUTO_INCREMENT PRIMARY KEY,\n -> message CHAR(20)) ENGINE=MyISAM;\nMariaDB> CREATE TABLE t2 (\n -> a INT NOT NULL AUTO_INCREMENT PRIMARY KEY,\n -> message CHAR(20)) ENGINE=MyISAM;\nMariaDB> INSERT INTO t1 (message) VALUES (\'Testing\'),(\'table\'),(\'t1\');\nMariaDB> INSERT INTO t2 (message) VALUES (\'Testing\'),(\'table\'),(\'t2\');\nMariaDB> CREATE TABLE total (\n -> a INT NOT NULL AUTO_INCREMENT,\n -> message CHAR(20), INDEX(a))\n -> ENGINE=MERGE UNION=(t1,t2) INSERT_METHOD=LAST;\n','https://mariadb.com/kb/en/merge/'),(468,'CREATE TABLE',39,'Syntax:\nCREATE [TEMPORARY] TABLE [IF NOT EXISTS] tbl_name\n (create_definition,...)\n [table_options]\n [partition_options]\n\nOr:\n\nCREATE [TEMPORARY] TABLE [IF NOT EXISTS] tbl_name\n [(create_definition,...)]\n [table_options]\n [partition_options]\n select_statement\n\nOr:\n\nCREATE [TEMPORARY] TABLE [IF NOT EXISTS] tbl_name\n { LIKE old_tbl_name | (LIKE old_tbl_name) }\n\ncreate_definition:\n col_name column_definition\n | [CONSTRAINT [symbol]] PRIMARY KEY [index_type] (index_col_name,...)\n [index_option] ...\n | {INDEX|KEY} [index_name] [index_type] (index_col_name,...)\n [index_option] ...\n | [CONSTRAINT [symbol]] UNIQUE [INDEX|KEY]\n [index_name] [index_type] (index_col_name,...)\n [index_option] ...\n | {FULLTEXT|SPATIAL} [INDEX|KEY] [index_name] (index_col_name,...)\n [index_option] ...\n | [CONSTRAINT [symbol]] FOREIGN KEY\n [index_name] (index_col_name,...) reference_definition\n | CHECK (expr)\n\ncolumn_definition:\n data_type [NOT NULL | NULL] [DEFAULT default_value]\n [AUTO_INCREMENT] [UNIQUE [KEY] | [PRIMARY] KEY]\n [COMMENT \'string\']\n [COLUMN_FORMAT {FIXED|DYNAMIC|DEFAULT}]\n [STORAGE {DISK|MEMORY|DEFAULT}]\n [reference_definition]\n\ndata_type:\n BIT[(length)]\n | TINYINT[(length)] [UNSIGNED] [ZEROFILL]\n | SMALLINT[(length)] [UNSIGNED] [ZEROFILL]\n | MEDIUMINT[(length)] [UNSIGNED] [ZEROFILL]\n | INT[(length)] [UNSIGNED] [ZEROFILL]\n | INTEGER[(length)] [UNSIGNED] [ZEROFILL]\n | BIGINT[(length)] [UNSIGNED] [ZEROFILL]\n | REAL[(length,decimals)] [UNSIGNED] [ZEROFILL]\n | DOUBLE[(length,decimals)] [UNSIGNED] [ZEROFILL]\n | FLOAT[(length,decimals)] [UNSIGNED] [ZEROFILL]\n | DECIMAL[(length[,decimals])] [UNSIGNED] [ZEROFILL]\n | NUMERIC[(length[,decimals])] [UNSIGNED] [ZEROFILL]\n | DATE\n | TIME\n | TIMESTAMP\n | DATETIME\n | YEAR\n | CHAR[(length)]\n [CHARACTER SET charset_name] [COLLATE collation_name]\n | VARCHAR(length)\n [CHARACTER SET charset_name] [COLLATE collation_name]\n | BINARY[(length)]\n | VARBINARY(length)\n | TINYBLOB\n | BLOB\n | MEDIUMBLOB\n | LONGBLOB\n | TINYTEXT [BINARY]\n [CHARACTER SET charset_name] [COLLATE collation_name]\n | TEXT [BINARY]\n [CHARACTER SET charset_name] [COLLATE collation_name]\n | MEDIUMTEXT [BINARY]\n [CHARACTER SET charset_name] [COLLATE collation_name]\n | LONGTEXT [BINARY]\n [CHARACTER SET charset_name] [COLLATE collation_name]\n | ENUM(value1,value2,value3,...)\n [CHARACTER SET charset_name] [COLLATE collation_name]\n | SET(value1,value2,value3,...)\n [CHARACTER SET charset_name] [COLLATE collation_name]\n | spatial_type\n\nindex_col_name:\n col_name [(length)] [ASC | DESC]\n\nindex_type:\n USING {BTREE | HASH}\n\nindex_option:\n KEY_BLOCK_SIZE [=] value\n | index_type\n | WITH PARSER parser_name\n | COMMENT \'string\'\n\nreference_definition:\n REFERENCES tbl_name (index_col_name,...)\n [MATCH FULL | MATCH PARTIAL | MATCH SIMPLE]\n [ON DELETE reference_option]\n [ON UPDATE reference_option]\n\nreference_option:\n RESTRICT | CASCADE | SET NULL | NO ACTION\n\ntable_options:\n table_option [[,] table_option] ...\n\ntable_option:\n ENGINE [=] engine_name\n | AUTO_INCREMENT [=] value\n | AVG_ROW_LENGTH [=] value\n | [DEFAULT] CHARACTER SET [=] charset_name\n | CHECKSUM [=] {0 | 1}\n | [DEFAULT] COLLATE [=] collation_name\n | COMMENT [=] \'string\'\n | CONNECTION [=] \'connect_string\'\n | DATA DIRECTORY [=] \'absolute path to directory\'\n | DELAY_KEY_WRITE [=] {0 | 1}\n | INDEX DIRECTORY [=] \'absolute path to directory\'\n | INSERT_METHOD [=] { NO | FIRST | LAST }\n | KEY_BLOCK_SIZE [=] value\n | MAX_ROWS [=] value\n | MIN_ROWS [=] value\n | PACK_KEYS [=] {0 | 1 | DEFAULT}\n | PASSWORD [=] \'string\'\n | ROW_FORMAT [=] {DEFAULT|DYNAMIC|FIXED|COMPRESSED|REDUNDANT|COMPACT}\n | TABLESPACE tablespace_name [STORAGE {DISK|MEMORY|DEFAULT}]\n | UNION [=] (tbl_name[,tbl_name]...)\n\npartition_options:\n PARTITION BY\n { [LINEAR] HASH(expr)\n | [LINEAR] KEY(column_list)\n | RANGE{(expr) | COLUMNS(column_list)}\n | LIST{(expr) | COLUMNS(column_list)} }\n [PARTITIONS num]\n [SUBPARTITION BY\n { [LINEAR] HASH(expr)\n | [LINEAR] KEY(column_list) }\n [SUBPARTITIONS num]\n ]\n [(partition_definition [, partition_definition] ...)]\n\npartition_definition:\n PARTITION partition_name\n [VALUES \n {LESS THAN {(expr | value_list) | MAXVALUE} \n | \n IN (value_list)}]\n [[STORAGE] ENGINE [=] engine_name]\n [COMMENT [=] \'comment_text\' ]\n [DATA DIRECTORY [=] \'data_dir\']\n [INDEX DIRECTORY [=] \'index_dir\']\n [MAX_ROWS [=] max_number_of_rows]\n [MIN_ROWS [=] min_number_of_rows]\n [TABLESPACE [=] tablespace_name]\n [NODEGROUP [=] node_group_id]\n [(subpartition_definition [, subpartition_definition] ...)]\n\nsubpartition_definition:\n SUBPARTITION logical_name\n [[STORAGE] ENGINE [=] engine_name]\n [COMMENT [=] \'comment_text\' ]\n [DATA DIRECTORY [=] \'data_dir\']\n [INDEX DIRECTORY [=] \'index_dir\']\n [MAX_ROWS [=] max_number_of_rows]\n [MIN_ROWS [=] min_number_of_rows]\n [TABLESPACE [=] tablespace_name]\n [NODEGROUP [=] node_group_id]\n\nselect_statement:\n [IGNORE | REPLACE] [AS] SELECT ... (Some valid select statement)\n\nCREATE TABLE creates a table with the given name. You must have the\nCREATE privilege for the table.\n\nRules for permissible table names are given in\nhttps://mariadb.com/kb/en/identifier-names/. By default,\nthe table is created in the default database, using the InnoDB storage\nengine. An error occurs if the table exists, if there is no default\ndatabase, or if the database does not exist.\n\nURL: https://mariadb.com/kb/en/create-table/\n\n','','https://mariadb.com/kb/en/create-table/'),(469,'>',18,'Syntax:\n>\n\nGreater than:\n\nURL: https://mariadb.com/kb/en/greater-than/\n\n','MariaDB> SELECT 2 > 2;\n -> 0\n','https://mariadb.com/kb/en/greater-than/'),(470,'ANALYZE TABLE',20,'Syntax:\nANALYZE [NO_WRITE_TO_BINLOG | LOCAL] TABLE\n tbl_name [, tbl_name] ...\n\nANALYZE TABLE analyzes and stores the key distribution for a table.\nDuring the analysis, the table is locked with a read lock for InnoDB\nand MyISAM. This statement works with InnoDB, Aria and MyISAM tables.\nFor MyISAM tables, this statement is equivalent to using myisamchk\n--analyze.\n\nFor more information on how the analysis works within InnoDB, see\nhttp://dev.mysql.com/doc/refman/5.5/en/innodb-restrictions.html.\n\nMySQL uses the stored key distribution to decide the order in which\ntables should be joined when you perform a join on something other than\na constant. In addition, key distributions can be used when deciding\nwhich indexes to use for a specific table within a query.\n\nThis statement requires SELECT and INSERT privileges for the table.\n\nANALYZE TABLE is supported for partitioned tables, and you can use\nALTER TABLE ... ANALYZE PARTITION to analyze one or more partitions;\nfor more information, see [HELP ALTER TABLE], and\nhttp://dev.mysql.com/doc/refman/5.5/en/partitioning-maintenance.html.\n\nURL: https://mariadb.com/kb/en/analyze-table/\n\n','','https://mariadb.com/kb/en/analyze-table/'),(471,'MICROSECOND',31,'Syntax:\nMICROSECOND(expr)\n\nReturns the microseconds from the time or datetime expression expr as a\nnumber in the range from 0 to 999999.\n\nURL: https://mariadb.com/kb/en/microsecond/\n\n','MariaDB> SELECT MICROSECOND(\'12:00:00.123456\');\n -> 123456\nMariaDB> SELECT MICROSECOND(\'2009-12-31 23:59:59.000010\');\n -> 10\n','https://mariadb.com/kb/en/microsecond/'),(472,'CONSTRAINT',39,'InnoDB supports foreign keys, which let you cross-reference related\ndata across tables, and foreign key constraints, which help keep this\nspread-out data consistent. The syntax for an InnoDB foreign key\nconstraint definition in the CREATE TABLE or ALTER TABLE statement\nlooks like this:\n\n[CONSTRAINT [symbol]] FOREIGN KEY\n [index_name] (index_col_name, ...)\n REFERENCES tbl_name (index_col_name,...)\n [ON DELETE reference_option]\n [ON UPDATE reference_option]\n\nreference_option:\n RESTRICT | CASCADE | SET NULL | NO ACTION\n\nURL: https://mariadb.com/kb/en/constraint/\n\n','CREATE TABLE product (category INT NOT NULL, id INT NOT NULL,\n price DECIMAL,\n PRIMARY KEY(category, id)) ENGINE=INNODB;\nCREATE TABLE customer (id INT NOT NULL,\n PRIMARY KEY (id)) ENGINE=INNODB;\nCREATE TABLE product_order (no INT NOT NULL AUTO_INCREMENT,\n product_category INT NOT NULL,\n product_id INT NOT NULL,\n customer_id INT NOT NULL,\n PRIMARY KEY(no),\n INDEX (product_category, product_id),\n FOREIGN KEY (product_category, product_id)\n REFERENCES product(category, id)\n ON UPDATE CASCADE ON DELETE RESTRICT,\n INDEX (customer_id),\n FOREIGN KEY (customer_id)\n REFERENCES customer(id)) ENGINE=INNODB;\n','https://mariadb.com/kb/en/constraint/'),(473,'CREATE SERVER',39,'Syntax:\nCREATE SERVER server_name\n FOREIGN DATA WRAPPER wrapper_name\n OPTIONS (option [, option] ...)\n\noption:\n { HOST character-literal\n | DATABASE character-literal\n | USER character-literal\n | PASSWORD character-literal\n | SOCKET character-literal\n | OWNER character-literal\n | PORT numeric-literal }\n\nThis statement creates the definition of a server for use with the\nFEDERATED storage engine. The CREATE SERVER statement creates a new row\nwithin the servers table within the mysql database. This statement\nrequires the SUPER privilege.\n\nThe server_name should be a unique reference to the server. Server\ndefinitions are global within the scope of the server, it is not\npossible to qualify the server definition to a specific database.\nserver_name has a maximum length of 64 characters (names longer than 64\ncharacters are silently truncated), and is case insensitive. You may\nspecify the name as a quoted string.\n\nThe wrapper_name should be mysql, and may be quoted with single\nquotation marks. Other values for wrapper_name are not currently\nsupported.\n\nFor each option you must specify either a character literal or numeric\nliteral. Character literals are UTF-8, support a maximum length of 64\ncharacters and default to a blank (empty) string. String literals are\nsilently truncated to 64 characters. Numeric literals must be a number\nbetween 0 and 9999, default value is 0.\n\n*Note*: Note that the OWNER option is currently not applied, and has no\neffect on the ownership or operation of the server connection that is\ncreated.\n\nThe CREATE SERVER statement creates an entry in the mysql.servers table\nthat can later be used with the CREATE TABLE statement when creating a\nFEDERATED table. The options that you specify will be used to populate\nthe columns in the mysql.servers table. The table columns are\nServer_name, Host, Db, Username, Password, Port and Socket.\n\nURL: https://mariadb.com/kb/en/create-server/\n\n','CREATE SERVER s\nFOREIGN DATA WRAPPER mysql\nOPTIONS (USER \'Remote\', HOST \'192.168.1.106\', DATABASE \'test\');\n','https://mariadb.com/kb/en/create-server/'),(474,'FIELD',37,'Syntax:\nFIELD(str,str1,str2,str3,...)\n\nReturns the index (position) of str in the str1, str2, str3, ... list.\nReturns 0 if str is not found.\n\nIf all arguments to FIELD() are strings, all arguments are compared as\nstrings. If all arguments are numbers, they are compared as numbers.\nOtherwise, the arguments are compared as double.\n\nIf str is NULL, the return value is 0 because NULL fails equality\ncomparison with any value. FIELD() is the complement of ELT().\n\nURL: https://mariadb.com/kb/en/field/\n\n','MariaDB> SELECT FIELD(\'ej\', \'Hej\', \'ej\', \'Heja\', \'hej\', \'foo\');\n -> 2\nMariaDB> SELECT FIELD(\'fo\', \'Hej\', \'ej\', \'Heja\', \'hej\', \'foo\');\n -> 0\n','https://mariadb.com/kb/en/field/'),(475,'MAKETIME',31,'Syntax:\nMAKETIME(hour,minute,second)\n\nReturns a time value calculated from the hour, minute, and second\narguments.\n\nURL: https://mariadb.com/kb/en/maketime/\n\n','MariaDB> SELECT MAKETIME(12,15,30);\n -> \'12:15:30\'\n','https://mariadb.com/kb/en/maketime/'),(476,'CURDATE',31,'Syntax:\nCURDATE()\n\nReturns the current date as a value in \'YYYY-MM-DD\' or YYYYMMDD format,\ndepending on whether the function is used in a string or numeric\ncontext.\n\nURL: https://mariadb.com/kb/en/curdate/\n\n','MariaDB> SELECT CURDATE();\n -> \'2008-06-13\'\nMariaDB> SELECT CURDATE() + 0;\n -> 20080613\n','https://mariadb.com/kb/en/curdate/'),(477,'SET PASSWORD',10,'Syntax:\nSET PASSWORD [FOR user] =\n {\n PASSWORD(\'cleartext password\')\n | OLD_PASSWORD(\'cleartext password\')\n | \'encrypted password\'\n }\n\nThe SET PASSWORD statement assigns a password to an existing MySQL user\naccount. When the read_only system variable is enabled, the SUPER\nprivilege is required to use SET PASSWORD, in addition to whatever\nother privileges might be required.\n\nIf the password is specified using the PASSWORD() or OLD_PASSWORD()\nfunction, the cleartext (unencrypted) password should be given as the\nargument to the function, which hashes the password and returns the\nencrypted password string. If the password is specified without using\neither function, it should be the already encrypted password value as a\nliteral string. In all cases, the encrypted password string must be in\nthe format required by the authentication method used for the account.\n\nThe old_passwords system variable value determines the hashing method\nused by PASSWORD(). If you specify the password using that function and\nSET PASSWORD rejects the password as not being in the correct format,\nit may be necessary to set old_passwords to change the hashing method.\nFor descriptions of the permitted values, see\nhttps://mariadb.com/kb/en/server-system-variables#old_passwords.\n\nWith no FOR user clause, this statement sets the password for the\ncurrent user. (To see which account the server authenticated you as,\ninvoke the CURRENT_USER() function.) Any client who successfully\nconnects to the server using a nonanonymous account can change the\npassword for that account.\n\nWith a FOR user clause, this statement sets the password for the named\nuser. You must have the UPDATE privilege for the mysql database to do\nthis. The user account name uses the format described in\nhttps://mariadb.com/kb/en/create-user#account-names. The user\nvalue should be given as \'user_name\'@\'host_name\', where \'user_name\' and\n\'host_name\' are exactly as listed in the User and Host columns of the\nmysql.user table row. (If you specify only a user name, a host name of\n\'%\' is used.) For example, to set the password for an account with User\nand Host column values of \'bob\' and \'%.example.org\', write the\nstatement like this:\n\nSET PASSWORD FOR \'bob\'@\'%.example.org\' = PASSWORD(\'cleartext password\');\n\nURL: https://mariadb.com/kb/en/set-password/\n\n','','https://mariadb.com/kb/en/set-password/'),(478,'ALTER TABLESPACE',39,'Syntax:\nALTER TABLESPACE tablespace_name\n {ADD|DROP} DATAFILE \'file_name\'\n [INITIAL_SIZE [=] size]\n [WAIT]\n ENGINE [=] engine_name\n\nThis statement is used with NDB cluster, which is not supported by MariaDB.\n\nURL: https://mariadb.com/kb/en/alter-tablespace/\n\n','','https://mariadb.com/kb/en/alter-tablespace/'),(479,'IF FUNCTION',7,'Syntax:\nIF(expr1,expr2,expr3)\n\nIf expr1 is TRUE (expr1 <> 0 and expr1 <> NULL) then IF() returns\nexpr2; otherwise it returns expr3. IF() returns a numeric or string\nvalue, depending on the context in which it is used.\n\nURL: https://mariadb.com/kb/en/if-function/\n\n','MariaDB> SELECT IF(1>2,2,3);\n -> 3\nMariaDB> SELECT IF(1<2,\'yes\',\'no\');\n -> \'yes\'\nMariaDB> SELECT IF(STRCMP(\'test\',\'test1\'),\'no\',\'yes\');\n -> \'no\'\n','https://mariadb.com/kb/en/if-function/'),(480,'ENUM',22,'ENUM(\'value1\',\'value2\',...) [CHARACTER SET charset_name] [COLLATE\ncollation_name]\n\nAn enumeration. A string object that can have only one value, chosen\nfrom the list of values \'value1\', \'value2\', ..., NULL or the special \'\'\nerror value. An ENUM column can have a maximum of 65,535 distinct\nvalues. ENUM values are represented internally as integers.\n\nURL: https://mariadb.com/kb/en/enum/\n\n','','https://mariadb.com/kb/en/enum/'),(481,'DATABASE',17,'Syntax:\nDATABASE()\n\nReturns the default (current) database name as a string in the utf8\ncharacter set. If there is no default database, DATABASE() returns\nNULL. Within a stored routine, the default database is the database\nthat the routine is associated with, which is not necessarily the same\nas the database that is the default in the calling context.\n\nURL: https://mariadb.com/kb/en/database/\n\n','MariaDB> SELECT DATABASE();\n -> \'test\'\n','https://mariadb.com/kb/en/database/'),(482,'POINTFROMWKB',32,'PointFromWKB(wkb[,srid])\n\nConstructs a POINT value using its WKB representation and SRID.\n\nURL: https://mariadb.com/kb/en/pointfromwkb/\n\n','','https://mariadb.com/kb/en/pointfromwkb/'),(483,'POWER',4,'Syntax:\nPOWER(X,Y)\n\nThis is a synonym for POW().\n\nURL: https://mariadb.com/kb/en/power/\n\n','','https://mariadb.com/kb/en/power/'),(484,'ATAN',4,'Syntax:\nATAN(X)\n\nReturns the arc tangent of X, that is, the value whose tangent is X.\n\nURL: https://mariadb.com/kb/en/atan/\n\n','MariaDB> SELECT ATAN(2);\n -> 1.1071487177941\nMariaDB> SELECT ATAN(-2);\n -> -1.1071487177941\n','https://mariadb.com/kb/en/atan/'),(485,'STRCMP',37,'Syntax:\nSTRCMP(expr1,expr2)\n\nSTRCMP() returns 0 if the strings are the same, -1 if the first\nargument is smaller than the second according to the current sort\norder, and 1 otherwise.\n\nURL: https://mariadb.com/kb/en/strcmp/\n\n','MariaDB> SELECT STRCMP(\'text\', \'text2\');\n -> -1\nMariaDB> SELECT STRCMP(\'text2\', \'text\');\n -> 1\nMariaDB> SELECT STRCMP(\'text\', \'text\');\n -> 0\n','https://mariadb.com/kb/en/strcmp/'),(486,'INSERT DELAYED',27,'Syntax:\nINSERT DELAYED ...\n\nThe DELAYED option for the INSERT statement is a MySQL extension to\nstandard SQL that is very useful if you have clients that cannot or\nneed not wait for the INSERT to complete. This is a common situation\nwhen you use MySQL for logging and you also periodically run SELECT and\nUPDATE statements that take a long time to complete.\n\nWhen a client uses INSERT DELAYED, it gets an okay from the server at\nonce, and the row is queued to be inserted when the table is not in use\nby any other thread.\n\nAnother major benefit of using INSERT DELAYED is that inserts from many\nclients are bundled together and written in one block. This is much\nfaster than performing many separate inserts.\n\nNote that INSERT DELAYED is slower than a normal INSERT if the table is\nnot otherwise in use. There is also the additional overhead for the\nserver to handle a separate thread for each table for which there are\ndelayed rows. This means that you should use INSERT DELAYED only when\nyou are really sure that you need it.\n\nThe queued rows are held only in memory until they are inserted into\nthe table. This means that if you terminate mysqld forcibly (for\nexample, with kill -9) or if mysqld dies unexpectedly, any queued rows\nthat have not been written to disk are lost.\n\nThere are some constraints on the use of DELAYED:\n\no INSERT DELAYED works only with MyISAM, MEMORY, ARCHIVE, and BLACKHOLE\n tables. For engines that do not support DELAYED, an error occurs.\n\no An error occurs for INSERT DELAYED if used with a table that has been\n locked with LOCK TABLES because the insert must be handled by a\n separate thread, not by the session that holds the lock.\n\no For MyISAM tables, if there are no free blocks in the middle of the\n data file, concurrent SELECT and INSERT statements are supported.\n Under these circumstances, you very seldom need to use INSERT DELAYED\n with MyISAM.\n\no INSERT DELAYED should be used only for INSERT statements that specify\n value lists. The server ignores DELAYED for INSERT ... SELECT or\n INSERT ... ON DUPLICATE KEY UPDATE statements.\n\no Because the INSERT DELAYED statement returns immediately, before the\n rows are inserted, you cannot use LAST_INSERT_ID() to get the\n AUTO_INCREMENT value that the statement might generate.\n\no DELAYED rows are not visible to SELECT statements until they actually\n have been inserted.\n\no Prior to MySQL 5.5.7, INSERT DELAYED was treated as a normal INSERT\n if the statement inserted multiple rows, binary logging was enabled,\n and the global logging format was statement-based (that is, whenever\n binlog_format was set to STATEMENT). Beginning with MySQL 5.5.7,\n INSERT DELAYED is always handled as a simple INSERT (that is, without\n the DELAYED option) whenever the value of binlog_format is STATEMENT\n or MIXED. (In the latter case, the statement no longer triggers a\n switch to row-based logging, and so is logged using the\n statement-based format.)\n\n This does not apply when using row-based binary logging mode\n (binlog_format set to ROW), in which INSERT DELAYED statements are\n always executed using the DELAYED option as specified, and logged as\n row-update events.\n\no DELAYED is ignored on slave replication servers, so that INSERT\n DELAYED is treated as a normal INSERT on slaves. This is because\n DELAYED could cause the slave to have different data than the master.\n\no Pending INSERT DELAYED statements are lost if a table is write locked\n and ALTER TABLE is used to modify the table structure.\n\no INSERT DELAYED is not supported for views.\n\no INSERT DELAYED is not supported for partitioned tables.\n\nURL: https://mariadb.com/kb/en/insert-delayed/\n\n','','https://mariadb.com/kb/en/insert-delayed/'),(487,'SHOW PROFILE',26,'Syntax:\nSHOW PROFILE [type [, type] ... ]\n [FOR QUERY n]\n [LIMIT row_count [OFFSET offset]]\n\ntype:\n ALL\n | BLOCK IO\n | CONTEXT SWITCHES\n | CPU\n | IPC\n | MEMORY\n | PAGE FAULTS\n | SOURCE\n | SWAPS\n\nThe SHOW PROFILE and SHOW PROFILES statements display profiling\ninformation that indicates resource usage for statements executed\nduring the course of the current session.\n\nProfiling is controlled by the profiling session variable, which has a\ndefault value of 0 (OFF). Profiling is enabled by setting profiling to\n1 or ON:\n\nMariaDB> SET profiling = 1;\n\nSHOW PROFILES displays a list of the most recent statements sent to the\nserver. The size of the list is controlled by the\nprofiling_history_size session variable, which has a default value of\n15. The maximum value is 100. Setting the value to 0 has the practical\neffect of disabling profiling.\n\nAll statements are profiled except SHOW PROFILE and SHOW PROFILES, so\nyou will find neither of those statements in the profile list.\nMalformed statements are profiled. For example, SHOW PROFILING is an\nillegal statement, and a syntax error occurs if you try to execute it,\nbut it will show up in the profiling list.\n\nSHOW PROFILE displays detailed information about a single statement.\nWithout the FOR QUERY n clause, the output pertains to the most\nrecently executed statement. If FOR QUERY n is included, SHOW PROFILE\ndisplays information for statement n. The values of n correspond to the\nQuery_ID values displayed by SHOW PROFILES.\n\nThe LIMIT row_count clause may be given to limit the output to\nrow_count rows. If LIMIT is given, OFFSET offset may be added to begin\nthe output offset rows into the full set of rows.\n\nBy default, SHOW PROFILE displays Status and Duration columns. The\nStatus values are like the State values displayed by SHOW PROCESSLIST,\nalthough there might be some minor differences in interpretion for the\ntwo statements for some status values (see\nhttp://dev.mysql.com/doc/refman/5.5/en/thread-information.html).\n\nOptional type values may be specified to display specific additional\ntypes of information:\n\no ALL displays all information\n\no BLOCK IO displays counts for block input and output operations\n\no CONTEXT SWITCHES displays counts for voluntary and involuntary\n context switches\n\no CPU displays user and system CPU usage times\n\no IPC displays counts for messages sent and received\n\no MEMORY is not currently implemented\n\no PAGE FAULTS displays counts for major and minor page faults\n\no SOURCE displays the names of functions from the source code, together\n with the name and line number of the file in which the function\n occurs\n\no SWAPS displays swap counts\n\nProfiling is enabled per session. When a session ends, its profiling\ninformation is lost.\n\nURL: https://mariadb.com/kb/en/show-profile/\n\n','MariaDB> SELECT @@profiling;\n+-------------+\n| @@profiling |\n+-------------+\n| 0 |\n+-------------+\n1 row in set (0.00 sec)\n\nMariaDB> SET profiling = 1;\nQuery OK, 0 rows affected (0.00 sec)\n\nMariaDB> DROP TABLE IF EXISTS t1;\nQuery OK, 0 rows affected, 1 warning (0.00 sec)\n\nMariaDB> CREATE TABLE T1 (id INT);\nQuery OK, 0 rows affected (0.01 sec)\n\nMariaDB> SHOW PROFILES;\n+----------+----------+--------------------------+\n| Query_ID | Duration | Query |\n+----------+----------+--------------------------+\n| 0 | 0.000088 | SET PROFILING = 1 |\n| 1 | 0.000136 | DROP TABLE IF EXISTS t1 |\n| 2 | 0.011947 | CREATE TABLE t1 (id INT) |\n+----------+----------+--------------------------+\n3 rows in set (0.00 sec)\n\nMariaDB> SHOW PROFILE;\n+----------------------+----------+\n| Status | Duration |\n+----------------------+----------+\n| checking permissions | 0.000040 |\n| creating table | 0.000056 |\n| After create | 0.011363 |\n| query end | 0.000375 |\n| freeing items | 0.000089 |\n| logging slow query | 0.000019 |\n| cleaning up | 0.000005 |\n+----------------------+----------+\n7 rows in set (0.00 sec)\n\nMariaDB> SHOW PROFILE FOR QUERY 1;\n+--------------------+----------+\n| Status | Duration |\n+--------------------+----------+\n| query end | 0.000107 |\n| freeing items | 0.000008 |\n| logging slow query | 0.000015 |\n| cleaning up | 0.000006 |\n+--------------------+----------+\n4 rows in set (0.00 sec)\n\nMariaDB> SHOW PROFILE CPU FOR QUERY 2;\n+----------------------+----------+----------+------------+\n| Status | Duration | CPU_user | CPU_system |\n+----------------------+----------+----------+------------+\n| checking permissions | 0.000040 | 0.000038 | 0.000002 |\n| creating table | 0.000056 | 0.000028 | 0.000028 |\n| After create | 0.011363 | 0.000217 | 0.001571 |\n| query end | 0.000375 | 0.000013 | 0.000028 |\n| freeing items | 0.000089 | 0.000010 | 0.000014 |\n| logging slow query | 0.000019 | 0.000009 | 0.000010 |\n| cleaning up | 0.000005 | 0.000003 | 0.000002 |\n+----------------------+----------+----------+------------+\n7 rows in set (0.00 sec)\n','https://mariadb.com/kb/en/show-profile/'),(488,'SHOW PROCEDURE CODE',26,'Syntax:\nSHOW PROCEDURE CODE proc_name\n\nThis statement is a MySQL extension that is available only for servers\nthat have been built with debugging support. It displays a\nrepresentation of the internal implementation of the named stored\nprocedure. A similar statement, SHOW FUNCTION CODE, displays\ninformation about stored functions (see [HELP SHOW FUNCTION CODE]).\n\nBoth statements require that you be the owner of the routine or have\nSELECT access to the mysql.proc table.\n\nIf the named routine is available, each statement produces a result\nset. Each row in the result set corresponds to one \"instruction\" in the\nroutine. The first column is Pos, which is an ordinal number beginning\nwith 0. The second column is Instruction, which contains an SQL\nstatement (usually changed from the original source), or a directive\nwhich has meaning only to the stored-routine handler.\n\nURL: https://mariadb.com/kb/en/show-procedure-code/\n\n','MariaDB> DELIMITER //\nMariaDB> CREATE PROCEDURE p1 ()\n -> BEGIN\n -> DECLARE fanta INT DEFAULT 55;\n -> DROP TABLE t2;\n -> LOOP\n -> INSERT INTO t3 VALUES (fanta);\n -> END LOOP;\n -> END//\nQuery OK, 0 rows affected (0.00 sec)\n\nMariaDB> SHOW PROCEDURE CODE p1//\n+-----+----------------------------------------+\n| Pos | Instruction |\n+-----+----------------------------------------+\n| 0 | set fanta@0 55 |\n| 1 | stmt 9 \"DROP TABLE t2\" |\n| 2 | stmt 5 \"INSERT INTO t3 VALUES (fanta)\" |\n| 3 | jump 2 |\n+-----+----------------------------------------+\n4 rows in set (0.00 sec)\n','https://mariadb.com/kb/en/show-procedure-code/'),(489,'MEDIUMTEXT',22,'MEDIUMTEXT [CHARACTER SET charset_name] [COLLATE collation_name]\n\nA TEXT column with a maximum length of 16,777,215 (224 - 1) characters.\nThe effective maximum length is less if the value contains multi-byte\ncharacters. Each MEDIUMTEXT value is stored using a 3-byte length\nprefix that indicates the number of bytes in the value.\n\nURL: https://mariadb.com/kb/en/mediumtext/\n\n','','https://mariadb.com/kb/en/mediumtext/'),(490,'LN',4,'Syntax:\nLN(X)\n\nReturns the natural logarithm of X; that is, the base-e logarithm of X.\nIf X is less than or equal to 0, then NULL is returned.\n\nURL: https://mariadb.com/kb/en/ln/\n\n','MariaDB> SELECT LN(2);\n -> 0.69314718055995\nMariaDB> SELECT LN(-2);\n -> NULL\n','https://mariadb.com/kb/en/ln/'),(491,'RETURN',23,'Syntax:\nRETURN expr\n\nThe RETURN statement terminates execution of a stored function and\nreturns the value expr to the function caller. There must be at least\none RETURN statement in a stored function. There may be more than one\nif the function has multiple exit points.\n\nThis statement is not used in stored procedures, triggers, or events.\nThe LEAVE statement can be used to exit a stored program of those\ntypes.\n\nURL: https://mariadb.com/kb/en/return/\n\n','','https://mariadb.com/kb/en/return/'),(492,'SHOW COLLATION',26,'Syntax:\nSHOW COLLATION\n [LIKE \'pattern\' | WHERE expr]\n\nThis statement lists collations supported by the server. By default,\nthe output from SHOW COLLATION includes all available collations. The\nLIKE clause, if present, indicates which collation names to match. The\nWHERE clause can be given to select rows using more general conditions,\nas discussed in\nhttps://mariadb.com/kb/en/extended-show/. For example:\n\nMariaDB> SHOW COLLATION LIKE \'latin1%\';\n+-------------------+---------+----+---------+----------+---------+\n| Collation | Charset | Id | Default | Compiled | Sortlen |\n+-------------------+---------+----+---------+----------+---------+\n| latin1_german1_ci | latin1 | 5 | | | 0 |\n| latin1_swedish_ci | latin1 | 8 | Yes | Yes | 0 |\n| latin1_danish_ci | latin1 | 15 | | | 0 |\n| latin1_german2_ci | latin1 | 31 | | Yes | 2 |\n| latin1_bin | latin1 | 47 | | Yes | 0 |\n| latin1_general_ci | latin1 | 48 | | | 0 |\n| latin1_general_cs | latin1 | 49 | | | 0 |\n| latin1_spanish_ci | latin1 | 94 | | | 0 |\n+-------------------+---------+----+---------+----------+---------+\n\nURL: https://mariadb.com/kb/en/show-collation/\n\n','','https://mariadb.com/kb/en/show-collation/'),(493,'LOG',4,'Syntax:\nLOG(X), LOG(B,X)\n\nIf called with one parameter, this function returns the natural\nlogarithm of X. If X is less than or equal to 0, then NULL is returned.\n\nThe inverse of this function (when called with a single argument) is\nthe EXP() function.\n\nURL: https://mariadb.com/kb/en/log/\n\n','MariaDB> SELECT LOG(2);\n -> 0.69314718055995\nMariaDB> SELECT LOG(-2);\n -> NULL\n','https://mariadb.com/kb/en/log/'),(494,'SET SQL_LOG_BIN',8,'Syntax:\nSET sql_log_bin = {0|1}\n\nThe sql_log_bin variable controls whether logging to the binary log is\ndone. The default value is 1 (do logging). To change logging for the\ncurrent session, change the session value of this variable. The session\nuser must have the SUPER privilege to set this variable.\n\nBeginning with MySQL 5.5.5, it is no longer possible to set\n@@session.sql_log_bin within a transaction or subquery. (Bug #53437)\n\nURL: https://mariadb.com/kb/en/set-sql_log_bin/\n\n','','https://mariadb.com/kb/en/set-sql_log_bin/'),(495,'!=',18,'Syntax:\n<>, !=\n\nNot equal:\n\nURL: https://mariadb.com/kb/en/not-equal/\n\n','MariaDB> SELECT \'.01\' <> \'0.01\';\n -> 1\nMariaDB> SELECT .01 <> \'0.01\';\n -> 0\nMariaDB> SELECT \'zapp\' <> \'zappp\';\n -> 1\n','https://mariadb.com/kb/en/not-equal/'),(496,'WHILE',23,'Syntax:\n[begin_label:] WHILE search_condition DO\n statement_list\nEND WHILE [end_label]\n\nThe statement list within a WHILE statement is repeated as long as the\nsearch_condition expression is true. statement_list consists of one or\nmore SQL statements, each terminated by a semicolon (;) statement\ndelimiter.\n\nA WHILE statement can be labeled. For the rules regarding label use,\nsee [HELP labels].\n\nURL: https://mariadb.com/kb/en/while/\n\n','CREATE PROCEDURE dowhile()\nBEGIN\n DECLARE v1 INT DEFAULT 5;\n\n WHILE v1 > 0 DO\n ...\n SET v1 = v1 - 1;\n END WHILE;\nEND;\n','https://mariadb.com/kb/en/while/'),(497,'AES_DECRYPT',12,'Syntax:\nAES_DECRYPT(crypt_str,key_str)\n\nThis function decrypts data using the official AES (Advanced Encryption\nStandard) algorithm. For more information, see the description of\nAES_ENCRYPT().\n\nURL: https://mariadb.com/kb/en/aes_decrypt/\n\n','','https://mariadb.com/kb/en/aes_decrypt/'),(498,'DAYNAME',31,'Syntax:\nDAYNAME(date)\n\nReturns the name of the weekday for date. The language used for the\nname is controlled by the value of the lc_time_names system variable\n(https://mariadb.com/kb/en/server-system-variables#lc_time_names).\n\nURL: https://mariadb.com/kb/en/dayname/\n\n','MariaDB> SELECT DAYNAME(\'2007-02-03\');\n -> \'Saturday\'\n','https://mariadb.com/kb/en/dayname/'),(499,'COERCIBILITY',17,'Syntax:\nCOERCIBILITY(str)\n\nReturns the collation coercibility value of the string argument.\n\nURL: https://mariadb.com/kb/en/coercibility/\n\n','MariaDB> SELECT COERCIBILITY(\'abc\' COLLATE latin1_swedish_ci);\n -> 0\nMariaDB> SELECT COERCIBILITY(USER());\n -> 3\nMariaDB> SELECT COERCIBILITY(\'abc\');\n -> 4\n','https://mariadb.com/kb/en/coercibility/'),(500,'INT',22,'INT[(M)] [UNSIGNED] [ZEROFILL]\n\nA normal-size integer. The signed range is -2147483648 to 2147483647.\nThe unsigned range is 0 to 4294967295.\n\nURL: https://mariadb.com/kb/en/int/\n\n','','https://mariadb.com/kb/en/int/'),(501,'GLENGTH',13,'GLength(ls)\n\nReturns as a double-precision number the length of the LineString value\nls in its associated spatial reference.\n\nURL: https://mariadb.com/kb/en/glength/\n\n','MariaDB> SET @ls = \'LineString(1 1,2 2,3 3)\';\nMariaDB> SELECT GLength(GeomFromText(@ls));\n+----------------------------+\n| GLength(GeomFromText(@ls)) |\n+----------------------------+\n| 2.8284271247462 |\n+----------------------------+\n','https://mariadb.com/kb/en/glength/'),(502,'RADIANS',4,'Syntax:\nRADIANS(X)\n\nReturns the argument X, converted from degrees to radians. (Note that\nπ radians equals 180 degrees.)\n\nURL: https://mariadb.com/kb/en/radians/\n\n','MariaDB> SELECT RADIANS(90);\n -> 1.5707963267949\n','https://mariadb.com/kb/en/radians/'),(503,'COLLATION',17,'Syntax:\nCOLLATION(str)\n\nReturns the collation of the string argument.\n\nURL: https://mariadb.com/kb/en/collation/\n\n','MariaDB> SELECT COLLATION(\'abc\');\n -> \'latin1_swedish_ci\'\nMariaDB> SELECT COLLATION(_utf8\'abc\');\n -> \'utf8_general_ci\'\n','https://mariadb.com/kb/en/collation/'),(504,'COALESCE',18,'Syntax:\nCOALESCE(value,...)\n\nReturns the first non-NULL value in the list, or NULL if there are no\nnon-NULL values.\n\nURL: https://mariadb.com/kb/en/coalesce/\n\n','MariaDB> SELECT COALESCE(NULL,1);\n -> 1\nMariaDB> SELECT COALESCE(NULL,NULL,NULL);\n -> NULL\n','https://mariadb.com/kb/en/coalesce/'),(505,'VERSION',17,'Syntax:\nVERSION()\n\nReturns a string that indicates the MySQL server version. The string\nuses the utf8 character set. The value might have a suffix in addition\nto the version number. See the description of the version system\nvariable in\nhttps://mariadb.com/kb/en/server-system-variables#version.\n\nURL: https://mariadb.com/kb/en/version/\n\n','MariaDB> SELECT VERSION();\n -> \'5.5.29-standard\'\n','https://mariadb.com/kb/en/version/'),(506,'MAKE_SET',37,'Syntax:\nMAKE_SET(bits,str1,str2,...)\n\nReturns a set value (a string containing substrings separated by \",\"\ncharacters) consisting of the strings that have the corresponding bit\nin bits set. str1 corresponds to bit 0, str2 to bit 1, and so on. NULL\nvalues in str1, str2, ... are not appended to the result.\n\nURL: https://mariadb.com/kb/en/make_set/\n\n','MariaDB> SELECT MAKE_SET(1,\'a\',\'b\',\'c\');\n -> \'a\'\nMariaDB> SELECT MAKE_SET(1 | 4,\'hello\',\'nice\',\'world\');\n -> \'hello,world\'\nMariaDB> SELECT MAKE_SET(1 | 4,\'hello\',\'nice\',NULL,\'world\');\n -> \'hello\'\nMariaDB> SELECT MAKE_SET(0,\'a\',\'b\',\'c\');\n -> \'\'\n','https://mariadb.com/kb/en/make_set/'),(507,'FIND_IN_SET',37,'Syntax:\nFIND_IN_SET(str,strlist)\n\nReturns a value in the range of 1 to N if the string str is in the\nstring list strlist consisting of N substrings. A string list is a\nstring composed of substrings separated by \",\" characters. If the first\nargument is a constant string and the second is a column of type SET,\nthe FIND_IN_SET() function is optimized to use bit arithmetic. Returns\n0 if str is not in strlist or if strlist is the empty string. Returns\nNULL if either argument is NULL. This function does not work properly\nif the first argument contains a comma (\",\") character.\n\nURL: https://mariadb.com/kb/en/find_in_set/\n\n','MariaDB> SELECT FIND_IN_SET(\'b\',\'a,b,c,d\');\n -> 2\n','https://mariadb.com/kb/en/find_in_set/');
+/*!40000 ALTER TABLE `help_topic` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `host`
+--
+
+DROP TABLE IF EXISTS `host`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `host` (
+ `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Db` char(64) COLLATE utf8_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',
+ `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',
+ `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',
+ `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',
+ `Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+ `Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+ PRIMARY KEY (`Host`,`Db`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Host privileges; Merged with database privileges';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `host`
+--
+
+LOCK TABLES `host` WRITE;
+/*!40000 ALTER TABLE `host` DISABLE KEYS */;
+/*!40000 ALTER TABLE `host` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `index_stats`
+--
+
+DROP TABLE IF EXISTS `index_stats`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `index_stats` (
+ `db_name` varchar(64) COLLATE utf8_bin NOT NULL,
+ `table_name` varchar(64) COLLATE utf8_bin NOT NULL,
+ `index_name` varchar(64) COLLATE utf8_bin NOT NULL,
+ `prefix_arity` int(11) unsigned NOT NULL,
+ `avg_frequency` decimal(12,4) DEFAULT NULL,
+ PRIMARY KEY (`db_name`,`table_name`,`index_name`,`prefix_arity`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Statistics on Indexes';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `index_stats`
+--
+
+LOCK TABLES `index_stats` WRITE;
+/*!40000 ALTER TABLE `index_stats` DISABLE KEYS */;
+/*!40000 ALTER TABLE `index_stats` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `innodb_index_stats`
+--
+
+DROP TABLE IF EXISTS `innodb_index_stats`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `innodb_index_stats` (
+ `database_name` varchar(64) COLLATE utf8_bin NOT NULL,
+ `table_name` varchar(199) COLLATE utf8_bin NOT NULL,
+ `index_name` varchar(64) COLLATE utf8_bin NOT NULL,
+ `last_update` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
+ `stat_name` varchar(64) COLLATE utf8_bin NOT NULL,
+ `stat_value` bigint(20) unsigned NOT NULL,
+ `sample_size` bigint(20) unsigned DEFAULT NULL,
+ `stat_description` varchar(1024) COLLATE utf8_bin NOT NULL,
+ PRIMARY KEY (`database_name`,`table_name`,`index_name`,`stat_name`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin STATS_PERSISTENT=0;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `innodb_index_stats`
+--
+
+LOCK TABLES `innodb_index_stats` WRITE;
+/*!40000 ALTER TABLE `innodb_index_stats` DISABLE KEYS */;
+INSERT INTO `innodb_index_stats` VALUES ('mysql','gtid_slave_pos','PRIMARY','2020-05-31 16:15:02','n_diff_pfx01',0,1,'domain_id'),('mysql','gtid_slave_pos','PRIMARY','2020-05-31 16:15:02','n_diff_pfx02',0,1,'domain_id,sub_id'),('mysql','gtid_slave_pos','PRIMARY','2020-05-31 16:15:02','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('mysql','gtid_slave_pos','PRIMARY','2020-05-31 16:15:02','size',1,NULL,'Number of pages in the index');
+/*!40000 ALTER TABLE `innodb_index_stats` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `innodb_table_stats`
+--
+
+DROP TABLE IF EXISTS `innodb_table_stats`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `innodb_table_stats` (
+ `database_name` varchar(64) COLLATE utf8_bin NOT NULL,
+ `table_name` varchar(199) COLLATE utf8_bin NOT NULL,
+ `last_update` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
+ `n_rows` bigint(20) unsigned NOT NULL,
+ `clustered_index_size` bigint(20) unsigned NOT NULL,
+ `sum_of_other_index_sizes` bigint(20) unsigned NOT NULL,
+ PRIMARY KEY (`database_name`,`table_name`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin STATS_PERSISTENT=0;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `innodb_table_stats`
+--
+
+LOCK TABLES `innodb_table_stats` WRITE;
+/*!40000 ALTER TABLE `innodb_table_stats` DISABLE KEYS */;
+INSERT INTO `innodb_table_stats` VALUES ('mysql','gtid_slave_pos','2020-05-31 16:15:02',0,1,0);
+/*!40000 ALTER TABLE `innodb_table_stats` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `plugin`
+--
+
+DROP TABLE IF EXISTS `plugin`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `plugin` (
+ `name` varchar(64) NOT NULL DEFAULT '',
+ `dl` varchar(128) NOT NULL DEFAULT '',
+ PRIMARY KEY (`name`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='MySQL plugins';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `plugin`
+--
+
+LOCK TABLES `plugin` WRITE;
+/*!40000 ALTER TABLE `plugin` DISABLE KEYS */;
+/*!40000 ALTER TABLE `plugin` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `proc`
+--
+
+DROP TABLE IF EXISTS `proc`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `proc` (
+ `db` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
+ `name` char(64) NOT NULL DEFAULT '',
+ `type` enum('FUNCTION','PROCEDURE') NOT NULL,
+ `specific_name` char(64) NOT NULL DEFAULT '',
+ `language` enum('SQL') NOT NULL DEFAULT 'SQL',
+ `sql_data_access` enum('CONTAINS_SQL','NO_SQL','READS_SQL_DATA','MODIFIES_SQL_DATA') NOT NULL DEFAULT 'CONTAINS_SQL',
+ `is_deterministic` enum('YES','NO') NOT NULL DEFAULT 'NO',
+ `security_type` enum('INVOKER','DEFINER') NOT NULL DEFAULT 'DEFINER',
+ `param_list` blob NOT NULL,
+ `returns` longblob NOT NULL,
+ `body` longblob NOT NULL,
+ `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') 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,
+ `db_collation` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
+ `body_utf8` longblob DEFAULT NULL,
+ PRIMARY KEY (`db`,`name`,`type`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Stored Procedures';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `proc`
+--
+
+LOCK TABLES `proc` WRITE;
+/*!40000 ALTER TABLE `proc` DISABLE KEYS */;
+INSERT INTO `proc` VALUES ('mysql','AddGeometryColumn','PROCEDURE','AddGeometryColumn','SQL','CONTAINS_SQL','NO','INVOKER','catalog varchar(64), t_schema varchar(64),\n t_name varchar(64), geometry_column varchar(64), t_srid int','','begin\n set @qwe= concat(\'ALTER TABLE \', t_schema, \'.\', t_name, \' ADD \', geometry_column,\' GEOMETRY REF_SYSTEM_ID=\', t_srid); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end','root@localhost','2020-05-31 16:15:02','2020-05-31 16:15:02','','','utf8','utf8_general_ci','latin1_swedish_ci','begin\n set @qwe= concat(\'ALTER TABLE \', t_schema, \'.\', t_name, \' ADD \', geometry_column,\' GEOMETRY REF_SYSTEM_ID=\', t_srid); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end'),('mysql','DropGeometryColumn','PROCEDURE','DropGeometryColumn','SQL','CONTAINS_SQL','NO','INVOKER','catalog varchar(64), t_schema varchar(64),\n t_name varchar(64), geometry_column varchar(64)','','begin\n set @qwe= concat(\'ALTER TABLE \', t_schema, \'.\', t_name, \' DROP \', geometry_column); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end','root@localhost','2020-05-31 16:15:02','2020-05-31 16:15:02','','','utf8','utf8_general_ci','latin1_swedish_ci','begin\n set @qwe= concat(\'ALTER TABLE \', t_schema, \'.\', t_name, \' DROP \', geometry_column); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end');
+/*!40000 ALTER TABLE `proc` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `procs_priv`
+--
+
+DROP TABLE IF EXISTS `procs_priv`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `procs_priv` (
+ `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Routine_name` char(64) CHARACTER SET utf8 NOT NULL DEFAULT '',
+ `Routine_type` enum('FUNCTION','PROCEDURE') COLLATE utf8_bin NOT NULL,
+ `Grantor` char(141) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Proc_priv` set('Execute','Alter Routine','Grant') CHARACTER SET utf8 NOT NULL DEFAULT '',
+ `Timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
+ PRIMARY KEY (`Host`,`Db`,`User`,`Routine_name`,`Routine_type`),
+ KEY `Grantor` (`Grantor`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Procedure privileges';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `procs_priv`
+--
+
+LOCK TABLES `procs_priv` WRITE;
+/*!40000 ALTER TABLE `procs_priv` DISABLE KEYS */;
+/*!40000 ALTER TABLE `procs_priv` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `proxies_priv`
+--
+
+DROP TABLE IF EXISTS `proxies_priv`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `proxies_priv` (
+ `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Proxied_host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Proxied_user` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `With_grant` tinyint(1) NOT NULL DEFAULT 0,
+ `Grantor` char(141) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
+ PRIMARY KEY (`Host`,`User`,`Proxied_host`,`Proxied_user`),
+ KEY `Grantor` (`Grantor`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='User proxy privileges';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `proxies_priv`
+--
+
+LOCK TABLES `proxies_priv` WRITE;
+/*!40000 ALTER TABLE `proxies_priv` DISABLE KEYS */;
+INSERT INTO `proxies_priv` VALUES ('localhost','root','','',1,'','2020-05-31 16:15:02'),('asus','root','','',1,'','2020-05-31 16:15:02');
+/*!40000 ALTER TABLE `proxies_priv` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `roles_mapping`
+--
+
+DROP TABLE IF EXISTS `roles_mapping`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `roles_mapping` (
+ `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Role` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Admin_option` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+ UNIQUE KEY `Host` (`Host`,`User`,`Role`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Granted roles';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `roles_mapping`
+--
+
+LOCK TABLES `roles_mapping` WRITE;
+/*!40000 ALTER TABLE `roles_mapping` DISABLE KEYS */;
+/*!40000 ALTER TABLE `roles_mapping` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `servers`
+--
+
+DROP TABLE IF EXISTS `servers`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `servers` (
+ `Server_name` char(64) NOT NULL DEFAULT '',
+ `Host` varchar(2048) NOT NULL DEFAULT '',
+ `Db` char(64) NOT NULL DEFAULT '',
+ `Username` char(80) NOT NULL DEFAULT '',
+ `Password` char(64) NOT NULL DEFAULT '',
+ `Port` int(4) NOT NULL DEFAULT 0,
+ `Socket` char(64) NOT NULL DEFAULT '',
+ `Wrapper` char(64) NOT NULL DEFAULT '',
+ `Owner` varchar(512) NOT NULL DEFAULT '',
+ PRIMARY KEY (`Server_name`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='MySQL Foreign Servers table';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `servers`
+--
+
+LOCK TABLES `servers` WRITE;
+/*!40000 ALTER TABLE `servers` DISABLE KEYS */;
+/*!40000 ALTER TABLE `servers` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `table_stats`
+--
+
+DROP TABLE IF EXISTS `table_stats`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `table_stats` (
+ `db_name` varchar(64) COLLATE utf8_bin NOT NULL,
+ `table_name` varchar(64) COLLATE utf8_bin NOT NULL,
+ `cardinality` bigint(21) unsigned DEFAULT NULL,
+ PRIMARY KEY (`db_name`,`table_name`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Statistics on Tables';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `table_stats`
+--
+
+LOCK TABLES `table_stats` WRITE;
+/*!40000 ALTER TABLE `table_stats` DISABLE KEYS */;
+/*!40000 ALTER TABLE `table_stats` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `tables_priv`
+--
+
+DROP TABLE IF EXISTS `tables_priv`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `tables_priv` (
+ `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Grantor` char(141) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
+ `Table_priv` set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') CHARACTER SET utf8 NOT NULL DEFAULT '',
+ `Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '',
+ PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`),
+ KEY `Grantor` (`Grantor`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Table privileges';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `tables_priv`
+--
+
+LOCK TABLES `tables_priv` WRITE;
+/*!40000 ALTER TABLE `tables_priv` DISABLE KEYS */;
+/*!40000 ALTER TABLE `tables_priv` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `time_zone`
+--
+
+DROP TABLE IF EXISTS `time_zone`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `time_zone` (
+ `Time_zone_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `Use_leap_seconds` enum('Y','N') NOT NULL DEFAULT 'N',
+ PRIMARY KEY (`Time_zone_id`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Time zones';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `time_zone`
+--
+
+LOCK TABLES `time_zone` WRITE;
+/*!40000 ALTER TABLE `time_zone` DISABLE KEYS */;
+/*!40000 ALTER TABLE `time_zone` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `time_zone_leap_second`
+--
+
+DROP TABLE IF EXISTS `time_zone_leap_second`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `time_zone_leap_second` (
+ `Transition_time` bigint(20) NOT NULL,
+ `Correction` int(11) NOT NULL,
+ PRIMARY KEY (`Transition_time`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Leap seconds information for time zones';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `time_zone_leap_second`
+--
+
+LOCK TABLES `time_zone_leap_second` WRITE;
+/*!40000 ALTER TABLE `time_zone_leap_second` DISABLE KEYS */;
+/*!40000 ALTER TABLE `time_zone_leap_second` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `time_zone_name`
+--
+
+DROP TABLE IF EXISTS `time_zone_name`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `time_zone_name` (
+ `Name` char(64) NOT NULL,
+ `Time_zone_id` int(10) unsigned NOT NULL,
+ PRIMARY KEY (`Name`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Time zone names';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `time_zone_name`
+--
+
+LOCK TABLES `time_zone_name` WRITE;
+/*!40000 ALTER TABLE `time_zone_name` DISABLE KEYS */;
+/*!40000 ALTER TABLE `time_zone_name` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `time_zone_transition`
+--
+
+DROP TABLE IF EXISTS `time_zone_transition`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `time_zone_transition` (
+ `Time_zone_id` int(10) unsigned NOT NULL,
+ `Transition_time` bigint(20) NOT NULL,
+ `Transition_type_id` int(10) unsigned NOT NULL,
+ PRIMARY KEY (`Time_zone_id`,`Transition_time`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Time zone transitions';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `time_zone_transition`
+--
+
+LOCK TABLES `time_zone_transition` WRITE;
+/*!40000 ALTER TABLE `time_zone_transition` DISABLE KEYS */;
+/*!40000 ALTER TABLE `time_zone_transition` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `time_zone_transition_type`
+--
+
+DROP TABLE IF EXISTS `time_zone_transition_type`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `time_zone_transition_type` (
+ `Time_zone_id` int(10) unsigned NOT NULL,
+ `Transition_type_id` int(10) unsigned NOT NULL,
+ `Offset` int(11) NOT NULL DEFAULT 0,
+ `Is_DST` tinyint(3) unsigned NOT NULL DEFAULT 0,
+ `Abbreviation` char(8) NOT NULL DEFAULT '',
+ PRIMARY KEY (`Time_zone_id`,`Transition_type_id`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Time zone transition types';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `time_zone_transition_type`
+--
+
+LOCK TABLES `time_zone_transition_type` WRITE;
+/*!40000 ALTER TABLE `time_zone_transition_type` DISABLE KEYS */;
+/*!40000 ALTER TABLE `time_zone_transition_type` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `user`
+--
+
+DROP TABLE IF EXISTS `user`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+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',
+ `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=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Users and global privileges';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `user`
+--
+
+LOCK TABLES `user` WRITE;
+/*!40000 ALTER TABLE `user` DISABLE KEYS */;
+INSERT INTO `user` VALUES ('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','','','','',0,0,0,0,'','','N','N','',0.000000),('asus','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','','','','',0,0,0,0,'','','N','N','',0.000000),('127.0.0.1','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','','','','',0,0,0,0,'','','N','N','',0.000000),('::1','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','','','','',0,0,0,0,'','','N','N','',0.000000),('localhost','','','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,'','','N','N','',0.000000),('asus','','','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,'','','N','N','',0.000000);
+/*!40000 ALTER TABLE `user` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `general_log`
+--
+
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE IF NOT EXISTS `general_log` (
+ `event_time` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
+ `user_host` mediumtext NOT NULL,
+ `thread_id` bigint(21) unsigned NOT NULL,
+ `server_id` int(10) unsigned NOT NULL,
+ `command_type` varchar(64) NOT NULL,
+ `argument` mediumtext NOT NULL
+) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='General log';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `slow_log`
+--
+
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE IF NOT EXISTS `slow_log` (
+ `start_time` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
+ `user_host` mediumtext NOT NULL,
+ `query_time` time(6) NOT NULL,
+ `lock_time` time(6) NOT NULL,
+ `rows_sent` int(11) NOT NULL,
+ `rows_examined` int(11) NOT NULL,
+ `db` varchar(512) NOT NULL,
+ `last_insert_id` int(11) NOT NULL,
+ `insert_id` int(11) NOT NULL,
+ `server_id` int(10) unsigned NOT NULL,
+ `sql_text` mediumtext NOT NULL,
+ `thread_id` bigint(21) unsigned NOT NULL,
+ `rows_affected` int(11) NOT NULL
+) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log';
+/*!40101 SET character_set_client = @saved_cs_client */;
+/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
+
+/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
+/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
+/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
+/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
+/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
+/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
+/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
+
+-- Dump completed on 2020-05-31 19:15:21
diff --git a/mysql-test/std_data/mysql_database_10.3.dump b/mysql-test/std_data/mysql_database_10.3.dump
new file mode 100644
index 00000000000..c30b121b886
--- /dev/null
+++ b/mysql-test/std_data/mysql_database_10.3.dump
@@ -0,0 +1,928 @@
+-- MySQL dump 10.17 Distrib 10.3.23-MariaDB, for Linux (x86_64)
+--
+-- Host: localhost Database: mysql
+-- ------------------------------------------------------
+-- Server version 10.3.23-MariaDB
+
+/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
+/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
+/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
+/*!40101 SET NAMES utf8mb4 */;
+/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
+/*!40103 SET TIME_ZONE='+00:00' */;
+/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
+/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
+/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
+/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
+
+--
+-- Table structure for table `column_stats`
+--
+
+DROP TABLE IF EXISTS `column_stats`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `column_stats` (
+ `db_name` varchar(64) COLLATE utf8_bin NOT NULL,
+ `table_name` varchar(64) COLLATE utf8_bin NOT NULL,
+ `column_name` varchar(64) COLLATE utf8_bin NOT NULL,
+ `min_value` varbinary(255) DEFAULT NULL,
+ `max_value` varbinary(255) DEFAULT NULL,
+ `nulls_ratio` decimal(12,4) DEFAULT NULL,
+ `avg_length` decimal(12,4) DEFAULT NULL,
+ `avg_frequency` decimal(12,4) DEFAULT NULL,
+ `hist_size` tinyint(3) unsigned DEFAULT NULL,
+ `hist_type` enum('SINGLE_PREC_HB','DOUBLE_PREC_HB') COLLATE utf8_bin DEFAULT NULL,
+ `histogram` varbinary(255) DEFAULT NULL,
+ PRIMARY KEY (`db_name`,`table_name`,`column_name`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Statistics on Columns';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `column_stats`
+--
+
+LOCK TABLES `column_stats` WRITE;
+/*!40000 ALTER TABLE `column_stats` DISABLE KEYS */;
+/*!40000 ALTER TABLE `column_stats` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `columns_priv`
+--
+
+DROP TABLE IF EXISTS `columns_priv`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `columns_priv` (
+ `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Column_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
+ `Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '',
+ PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`,`Column_name`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Column privileges';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `columns_priv`
+--
+
+LOCK TABLES `columns_priv` WRITE;
+/*!40000 ALTER TABLE `columns_priv` DISABLE KEYS */;
+/*!40000 ALTER TABLE `columns_priv` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `db`
+--
+
+DROP TABLE IF EXISTS `db`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `db` (
+ `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `User` char(80) COLLATE utf8_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',
+ `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',
+ `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',
+ `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',
+ `Execute_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',
+ `Delete_history_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+ PRIMARY KEY (`Host`,`Db`,`User`),
+ KEY `User` (`User`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Database privileges';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `db`
+--
+
+LOCK TABLES `db` WRITE;
+/*!40000 ALTER TABLE `db` DISABLE KEYS */;
+INSERT INTO `db` VALUES ('%','test','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N','Y','Y','Y'),('%','test\\_%','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N','Y','Y','Y');
+/*!40000 ALTER TABLE `db` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `event`
+--
+
+DROP TABLE IF EXISTS `event`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `event` (
+ `db` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
+ `name` char(64) NOT NULL DEFAULT '',
+ `body` longblob NOT NULL,
+ `definer` char(141) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
+ `execute_at` datetime DEFAULT NULL,
+ `interval_value` int(11) DEFAULT NULL,
+ `interval_field` enum('YEAR','QUARTER','MONTH','DAY','HOUR','MINUTE','WEEK','SECOND','MICROSECOND','YEAR_MONTH','DAY_HOUR','DAY_MINUTE','DAY_SECOND','HOUR_MINUTE','HOUR_SECOND','MINUTE_SECOND','DAY_MICROSECOND','HOUR_MICROSECOND','MINUTE_MICROSECOND','SECOND_MICROSECOND') DEFAULT NULL,
+ `created` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
+ `modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `last_executed` datetime DEFAULT NULL,
+ `starts` datetime DEFAULT NULL,
+ `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 '',
+ `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',
+ `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,
+ `db_collation` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
+ `body_utf8` longblob DEFAULT NULL,
+ PRIMARY KEY (`db`,`name`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Events';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `func`
+--
+
+DROP TABLE IF EXISTS `func`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `func` (
+ `name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `ret` tinyint(1) NOT NULL DEFAULT 0,
+ `dl` char(128) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `type` enum('function','aggregate') CHARACTER SET utf8 NOT NULL,
+ PRIMARY KEY (`name`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='User defined functions';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `func`
+--
+
+LOCK TABLES `func` WRITE;
+/*!40000 ALTER TABLE `func` DISABLE KEYS */;
+/*!40000 ALTER TABLE `func` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `gtid_slave_pos`
+--
+
+DROP TABLE IF EXISTS `gtid_slave_pos`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `gtid_slave_pos` (
+ `domain_id` int(10) unsigned NOT NULL,
+ `sub_id` bigint(20) unsigned NOT NULL,
+ `server_id` int(10) unsigned NOT NULL,
+ `seq_no` bigint(20) unsigned NOT NULL,
+ PRIMARY KEY (`domain_id`,`sub_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Replication slave GTID position';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `gtid_slave_pos`
+--
+
+LOCK TABLES `gtid_slave_pos` WRITE;
+/*!40000 ALTER TABLE `gtid_slave_pos` DISABLE KEYS */;
+/*!40000 ALTER TABLE `gtid_slave_pos` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `help_category`
+--
+
+DROP TABLE IF EXISTS `help_category`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `help_category` (
+ `help_category_id` smallint(5) unsigned NOT NULL,
+ `name` char(64) NOT NULL,
+ `parent_category_id` smallint(5) unsigned DEFAULT NULL,
+ `url` text NOT NULL,
+ PRIMARY KEY (`help_category_id`),
+ UNIQUE KEY `name` (`name`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='help categories';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `help_category`
+--
+
+LOCK TABLES `help_category` WRITE;
+/*!40000 ALTER TABLE `help_category` DISABLE KEYS */;
+INSERT INTO `help_category` VALUES (1,'Geographic',0,''),(2,'Polygon properties',34,''),(3,'WKT',34,''),(4,'Numeric Functions',38,''),(5,'Plugins',35,''),(6,'MBR',34,''),(7,'Control flow functions',38,''),(8,'Transactions',35,''),(9,'Help Metadata',35,''),(10,'Account Management',35,''),(11,'Point properties',34,''),(12,'Encryption Functions',38,''),(13,'LineString properties',34,''),(14,'Miscellaneous Functions',38,''),(15,'Logical operators',38,''),(16,'Functions and Modifiers for Use with GROUP BY',35,''),(17,'Information Functions',38,''),(18,'Comparison operators',38,''),(19,'Bit Functions',38,''),(20,'Table Maintenance',35,''),(21,'User-Defined Functions',35,''),(22,'Data Types',35,''),(23,'Compound Statements',35,''),(24,'Geometry constructors',34,''),(25,'GeometryCollection properties',1,''),(26,'Administration',35,''),(27,'Data Manipulation',35,''),(28,'Utility',35,''),(29,'Language Structure',35,''),(30,'Geometry relations',34,''),(31,'Date and Time Functions',38,''),(32,'WKB',34,''),(33,'Procedures',35,''),(34,'Geographic Features',35,''),(35,'Contents',0,''),(36,'Geometry properties',34,''),(37,'String Functions',38,''),(38,'Functions',35,''),(39,'Data Definition',35,'');
+/*!40000 ALTER TABLE `help_category` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `help_keyword`
+--
+
+DROP TABLE IF EXISTS `help_keyword`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `help_keyword` (
+ `help_keyword_id` int(10) unsigned NOT NULL,
+ `name` char(64) NOT NULL,
+ PRIMARY KEY (`help_keyword_id`),
+ UNIQUE KEY `name` (`name`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='help keywords';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `help_keyword`
+--
+
+LOCK TABLES `help_keyword` WRITE;
+/*!40000 ALTER TABLE `help_keyword` DISABLE KEYS */;
+INSERT INTO `help_keyword` VALUES (0,'JOIN'),(1,'HOST'),(2,'REPEAT'),(3,'SERIALIZABLE'),(4,'REPLACE'),(5,'AT'),(6,'SCHEDULE'),(7,'RETURNS'),(8,'STARTS'),(9,'MASTER_SSL_CA'),(10,'NCHAR'),(11,'COLUMNS'),(12,'COMPLETION'),(13,'WORK'),(14,'DATETIME'),(15,'MODE'),(16,'OPEN'),(17,'INTEGER'),(18,'ESCAPE'),(19,'VALUE'),(20,'MASTER_SSL_VERIFY_SERVER_CERT'),(21,'SQL_BIG_RESULT'),(22,'DROP'),(23,'GEOMETRYCOLLECTIONFROMWKB'),(24,'EVENTS'),(25,'MONTH'),(26,'PROFILES'),(27,'DUPLICATE'),(28,'REPLICATION'),(29,'UNLOCK'),(30,'INNODB'),(31,'YEAR_MONTH'),(32,'SUBJECT'),(33,'PREPARE'),(34,'LOCK'),(35,'NDB'),(36,'CHECK'),(37,'FULL'),(38,'INT4'),(39,'BY'),(40,'NO'),(41,'MINUTE'),(42,'PARTITION'),(43,'DATA'),(44,'DAY'),(45,'SHARE'),(46,'REAL'),(47,'SEPARATOR'),(48,'MESSAGE_TEXT'),(49,'MASTER_HEARTBEAT_PERIOD'),(50,'DELETE'),(51,'ON'),(52,'COLUMN_NAME'),(53,'CONNECTION'),(54,'CLOSE'),(55,'X509'),(56,'USE'),(57,'SUBCLASS_ORIGIN'),(58,'WHERE'),(59,'PRIVILEGES'),(60,'SPATIAL'),(61,'EVENT'),(62,'SUPER'),(63,'SQL_BUFFER_RESULT'),(64,'IGNORE'),(65,'SHA2'),(66,'QUICK'),(67,'SIGNED'),(68,'OFFLINE'),(69,'SECURITY'),(70,'AUTOEXTEND_SIZE'),(71,'NDBCLUSTER'),(72,'POLYGONFROMWKB'),(73,'FALSE'),(74,'LEVEL'),(75,'FORCE'),(76,'BINARY'),(77,'TO'),(78,'CHANGE'),(79,'CURRENT_USER'),(80,'HOUR_MINUTE'),(81,'UPDATE'),(82,'PRESERVE'),(83,'TABLE_NAME'),(84,'INTO'),(85,'FEDERATED'),(86,'VARYING'),(87,'MAX_SIZE'),(88,'HOUR_SECOND'),(89,'VARIABLE'),(90,'ROLLBACK'),(91,'PROCEDURE'),(92,'TIMESTAMP'),(93,'IMPORT'),(94,'AGAINST'),(95,'CHECKSUM'),(96,'COUNT'),(97,'LONGBINARY'),(98,'THEN'),(99,'INSERT'),(100,'ENGINES'),(101,'HANDLER'),(102,'PORT'),(103,'DAY_SECOND'),(104,'EXISTS'),(105,'MUTEX'),(106,'HELP_DATE'),(107,'RELEASE'),(108,'BOOLEAN'),(109,'MOD'),(110,'DEFAULT'),(111,'TYPE'),(112,'NO_WRITE_TO_BINLOG'),(113,'OPTIMIZE'),(114,'SQLSTATE'),(115,'RESET'),(116,'CLASS_ORIGIN'),(117,'INSTALL'),(118,'ITERATE'),(119,'DO'),(120,'BIGINT'),(121,'SET'),(122,'ISSUER'),(123,'DATE'),(124,'STATUS'),(125,'FULLTEXT'),(126,'COMMENT'),(127,'MASTER_CONNECT_RETRY'),(128,'INNER'),(129,'RELAYLOG'),(130,'STOP'),(131,'MASTER_LOG_FILE'),(132,'MRG_MYISAM'),(133,'PRECISION'),(134,'REQUIRE'),(135,'TRAILING'),(136,'PARTITIONS'),(137,'LONG'),(138,'OPTION'),(139,'REORGANIZE'),(140,'ELSE'),(141,'DEALLOCATE'),(142,'IO_THREAD'),(143,'CASE'),(144,'CIPHER'),(145,'CONTINUE'),(146,'FROM'),(147,'READ'),(148,'LEFT'),(149,'ELSEIF'),(150,'MINUTE_SECOND'),(151,'COMPACT'),(152,'DEC'),(153,'FOR'),(154,'WARNINGS'),(155,'MIN_ROWS'),(156,'STRING'),(157,'CONDITION'),(158,'ENCLOSED'),(159,'FUNCTION'),(160,'AGGREGATE'),(161,'FIELDS'),(162,'INT3'),(163,'ARCHIVE'),(164,'AVG_ROW_LENGTH'),(165,'ADD'),(166,'KILL'),(167,'FLOAT4'),(168,'TABLESPACE'),(169,'VIEW'),(170,'REPEATABLE'),(171,'INFILE'),(172,'HELP_VERSION'),(173,'ORDER'),(174,'USING'),(175,'CONSTRAINT_CATALOG'),(176,'MIDDLEINT'),(177,'GRANT'),(178,'UNSIGNED'),(179,'DECIMAL'),(180,'GEOMETRYFROMTEXT'),(181,'INDEXES'),(182,'FOREIGN'),(183,'CACHE'),(184,'HOSTS'),(185,'MYSQL_ERRNO'),(186,'COMMIT'),(187,'SCHEMAS'),(188,'LEADING'),(189,'SNAPSHOT'),(190,'CONSTRAINT_NAME'),(191,'DECLARE'),(192,'LOAD'),(193,'SQL_CACHE'),(194,'CONVERT'),(195,'DYNAMIC'),(196,'COLLATE'),(197,'POLYGONFROMTEXT'),(198,'BYTE'),(199,'GLOBAL'),(200,'LINESTRINGFROMWKB'),(201,'WHEN'),(202,'HAVING'),(203,'AS'),(204,'STARTING'),(205,'RELOAD'),(206,'AUTOCOMMIT'),(207,'REVOKE'),(208,'GRANTS'),(209,'OUTER'),(210,'CURSOR_NAME'),(211,'FLOOR'),(212,'EXPLAIN'),(213,'WITH'),(214,'AFTER'),(215,'STD'),(216,'CSV'),(217,'DISABLE'),(218,'UNINSTALL'),(219,'OUTFILE'),(220,'LOW_PRIORITY'),(221,'FILE'),(222,'NODEGROUP'),(223,'SCHEMA'),(224,'SONAME'),(225,'POW'),(226,'DUAL'),(227,'MULTIPOINTFROMWKB'),(228,'INDEX'),(229,'MULTIPOINTFROMTEXT'),(230,'DEFINER'),(231,'MASTER_BIND'),(232,'REMOVE'),(233,'EXTENDED'),(234,'MULTILINESTRINGFROMWKB'),(235,'CROSS'),(236,'CONTRIBUTORS'),(237,'NATIONAL'),(238,'GROUP'),(239,'SHA'),(240,'ONLINE'),(241,'UNDO'),(242,'IGNORE_SERVER_IDS'),(243,'ZEROFILL'),(244,'CLIENT'),(245,'MASTER_PASSWORD'),(246,'OWNER'),(247,'RELAY_LOG_FILE'),(248,'TRUE'),(249,'CHARACTER'),(250,'MASTER_USER'),(251,'SCHEMA_NAME'),(252,'TABLE'),(253,'ENGINE'),(254,'INSERT_METHOD'),(255,'CASCADE'),(256,'RELAY_LOG_POS'),(257,'SQL_CALC_FOUND_ROWS'),(258,'UNION'),(259,'MYISAM'),(260,'LEAVE'),(261,'MODIFY'),(262,'MATCH'),(263,'MASTER_LOG_POS'),(264,'DISTINCTROW'),(265,'DESC'),(266,'TIME'),(267,'NUMERIC'),(268,'EXPANSION'),(269,'CODE'),(270,'CURSOR'),(271,'GEOMETRYCOLLECTIONFROMTEXT'),(272,'CHAIN'),(273,'LOGFILE'),(274,'FLUSH'),(275,'CREATE'),(276,'DESCRIBE'),(277,'EXTENT_SIZE'),(278,'MAX_UPDATES_PER_HOUR'),(279,'INT2'),(280,'PROCESSLIST'),(281,'ENDS'),(282,'LOGS'),(283,'DISCARD'),(284,'HEAP'),(285,'SOUNDS'),(286,'BETWEEN'),(287,'MULTILINESTRINGFROMTEXT'),(288,'REPAIR'),(289,'PACK_KEYS'),(290,'FAST'),(291,'VALUES'),(292,'CALL'),(293,'LOOP'),(294,'VARCHARACTER'),(295,'BEFORE'),(296,'TRUNCATE'),(297,'SHOW'),(298,'ALL'),(299,'REDUNDANT'),(300,'USER_RESOURCES'),(301,'PARTIAL'),(302,'BINLOG'),(303,'END'),(304,'SECOND'),(305,'AND'),(306,'FLOAT8'),(307,'PREV'),(308,'HOUR'),(309,'SELECT'),(310,'DATABASES'),(311,'OR'),(312,'IDENTIFIED'),(313,'WRAPPER'),(314,'MASTER_SSL_CIPHER'),(315,'SQL_SLAVE_SKIP_COUNTER'),(316,'BOTH'),(317,'BOOL'),(318,'YEAR'),(319,'MASTER_PORT'),(320,'CONCURRENT'),(321,'HELP'),(322,'UNIQUE'),(323,'TRIGGERS'),(324,'PROCESS'),(325,'OPTIONS'),(326,'RESIGNAL'),(327,'CONSISTENT'),(328,'MASTER_SSL'),(329,'DATE_ADD'),(330,'MAX_CONNECTIONS_PER_HOUR'),(331,'LIKE'),(332,'PLUGIN'),(333,'FETCH'),(334,'IN'),(335,'COLUMN'),(336,'DUMPFILE'),(337,'USAGE'),(338,'EXECUTE'),(339,'MEMORY'),(340,'CEIL'),(341,'QUERY'),(342,'MASTER_HOST'),(343,'LINES'),(344,'SQL_THREAD'),(345,'SERVER'),(346,'MAX_QUERIES_PER_HOUR'),(347,'MASTER_SSL_CERT'),(348,'MULTIPOLYGONFROMWKB'),(349,'TRANSACTION'),(350,'DAY_MINUTE'),(351,'STDDEV'),(352,'DATE_SUB'),(353,'REBUILD'),(354,'GEOMETRYFROMWKB'),(355,'INT1'),(356,'RENAME'),(357,'PARSER'),(358,'RIGHT'),(359,'ALTER'),(360,'MAX_ROWS'),(361,'SOCKET'),(362,'STRAIGHT_JOIN'),(363,'NATURAL'),(364,'VARIABLES'),(365,'ESCAPED'),(366,'SHA1'),(367,'KEY_BLOCK_SIZE'),(368,'PASSWORD'),(369,'OFFSET'),(370,'CHAR'),(371,'NEXT'),(372,'ERRORS'),(373,'SQL_LOG_BIN'),(374,'TEMPORARY'),(375,'COMMITTED'),(376,'SQL_SMALL_RESULT'),(377,'UPGRADE'),(378,'BEGIN'),(379,'DELAY_KEY_WRITE'),(380,'PROFILE'),(381,'MEDIUM'),(382,'INTERVAL'),(383,'SSL'),(384,'DAY_HOUR'),(385,'NAME'),(386,'REFERENCES'),(387,'AES_ENCRYPT'),(388,'STORAGE'),(389,'ISOLATION'),(390,'CEILING'),(391,'EVERY'),(392,'INT8'),(393,'AUTHORS'),(394,'RESTRICT'),(395,'UNCOMMITTED'),(396,'LINESTRINGFROMTEXT'),(397,'IS'),(398,'NOT'),(399,'ANALYSE'),(400,'DATAFILE'),(401,'DES_KEY_FILE'),(402,'SIGNAL'),(403,'COMPRESSED'),(404,'START'),(405,'PLUGINS'),(406,'SAVEPOINT'),(407,'IF'),(408,'ROWS'),(409,'PRIMARY'),(410,'PURGE'),(411,'LAST'),(412,'USER'),(413,'EXIT'),(414,'KEYS'),(415,'LIMIT'),(416,'KEY'),(417,'MERGE'),(418,'UNTIL'),(419,'SQL_NO_CACHE'),(420,'DELAYED'),(421,'CONSTRAINT_SCHEMA'),(422,'ANALYZE'),(423,'CONSTRAINT'),(424,'SERIAL'),(425,'ACTION'),(426,'WRITE'),(427,'INITIAL_SIZE'),(428,'SESSION'),(429,'DATABASE'),(430,'NULL'),(431,'POWER'),(432,'USE_FRM'),(433,'TERMINATED'),(434,'SLAVE'),(435,'NVARCHAR'),(436,'ASC'),(437,'RETURN'),(438,'OPTIONALLY'),(439,'ENABLE'),(440,'DIRECTORY'),(441,'MAX_USER_CONNECTIONS'),(442,'WHILE'),(443,'LOCAL'),(444,'DISTINCT'),(445,'AES_DECRYPT'),(446,'MASTER_SSL_KEY'),(447,'NONE'),(448,'TABLES'),(449,'<>'),(450,'RLIKE'),(451,'TRIGGER'),(452,'COLLATION'),(453,'SHUTDOWN'),(454,'HIGH_PRIORITY'),(455,'BTREE'),(456,'FIRST'),(457,'COALESCE'),(458,'WAIT'),(459,'CATALOG_NAME'),(460,'MASTER'),(461,'FIXED'),(462,'MULTIPOLYGONFROMTEXT'),(463,'ROW_FORMAT');
+/*!40000 ALTER TABLE `help_keyword` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `help_relation`
+--
+
+DROP TABLE IF EXISTS `help_relation`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `help_relation` (
+ `help_topic_id` int(10) unsigned NOT NULL,
+ `help_keyword_id` int(10) unsigned NOT NULL,
+ PRIMARY KEY (`help_keyword_id`,`help_topic_id`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='keyword-topic relation';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `help_relation`
+--
+
+LOCK TABLES `help_relation` WRITE;
+/*!40000 ALTER TABLE `help_relation` DISABLE KEYS */;
+INSERT INTO `help_relation` VALUES (1,0),(356,0),(473,1),(232,2),(447,3),(3,4),(130,4),(421,4),(89,5),(89,6),(406,6),(97,7),(89,8),(185,9),(430,10),(21,11),(347,11),(421,11),(463,11),(468,11),(89,12),(406,12),(146,13),(230,14),(88,15),(356,15),(18,16),(106,16),(134,16),(347,16),(97,17),(500,17),(380,18),(3,19),(104,19),(243,19),(374,19),(459,19),(185,20),(356,21),(9,22),(30,22),(34,22),(87,22),(186,22),(237,22),(263,22),(276,22),(300,22),(331,22),(405,22),(415,22),(416,22),(463,22),(478,22),(108,23),(122,24),(170,24),(424,24),(376,25),(82,26),(104,27),(199,28),(36,29),(347,30),(468,30),(376,31),(199,32),(35,33),(237,33),(36,34),(356,34),(468,35),(417,36),(463,36),(468,36),(21,37),(294,37),(347,37),(451,37),(468,37),(500,38),(48,39),(77,39),(83,39),(130,39),(199,39),(356,39),(361,39),(421,39),(463,39),(468,39),(468,40),(472,40),(376,41),(463,42),(468,42),(212,43),(421,43),(468,43),(473,43),(376,44),(356,45),(97,46),(314,46),(361,47),(374,48),(459,48),(185,49),(48,50),(468,50),(472,50),(1,51),(89,51),(406,51),(472,51),(374,52),(459,52),(176,53),(468,53),(51,54),(106,54),(199,55),(1,56),(55,56),(194,56),(374,57),(459,57),(48,58),(83,58),(106,58),(193,59),(199,59),(249,59),(210,60),(463,60),(89,61),(300,61),(358,61),(406,61),(199,62),(356,63),(1,64),(83,64),(104,64),(130,64),(356,64),(421,64),(463,64),(66,65),(48,66),(417,66),(466,66),(230,67),(87,68),(210,68),(463,68),(199,69),(194,70),(468,71),(91,72),(482,72),(385,73),(447,74),(1,75),(39,76),(230,76),(269,76),(185,77),(269,77),(460,77),(185,78),(463,78),(89,79),(406,79),(376,80),(83,81),(104,81),(356,81),(472,81),(89,82),(406,82),(374,83),(459,83),(3,84),(104,84),(304,84),(356,84),(468,85),(257,86),(194,87),(376,88),(129,89),(146,90),(460,90),(17,91),(189,91),(302,91),(328,91),(347,91),(356,91),(416,91),(439,91),(488,91),(99,92),(188,92),(421,93),(463,93),(88,94),(401,95),(468,95),(69,96),(330,96),(433,96),(285,97),(28,98),(57,98),(85,98),(104,99),(195,99),(301,99),(486,99),(282,100),(347,100),(106,101),(313,101),(473,102),(376,103),(9,104),(30,104),(89,104),(155,104),(186,104),(276,104),(300,104),(347,105),(365,105),(109,106),(146,107),(460,107),(24,108),(88,108),(113,109),(174,109),(3,110),(104,110),(155,110),(200,110),(212,110),(243,110),(463,110),(468,110),(463,111),(115,112),(326,112),(466,112),(470,112),(115,113),(463,113),(374,114),(459,114),(38,115),(119,115),(151,115),(264,115),(374,116),(459,116),(419,117),(124,118),(89,119),(125,119),(406,119),(496,119),(221,120),(3,121),(83,121),(104,121),(129,121),(130,121),(146,121),(155,121),(182,121),(212,121),(333,121),(347,121),(356,121),(374,121),(421,121),(459,121),(463,121),(468,121),(472,121),(477,121),(494,121),(199,122),(132,123),(230,123),(262,123),(376,123),(58,124),(137,124),(215,124),(223,124),(328,124),(336,124),(347,124),(365,124),(210,125),(463,125),(468,125),(89,126),(194,126),(210,126),(406,126),(468,126),(185,127),(1,128),(424,129),(52,130),(185,131),(468,132),(314,133),(199,134),(455,135),(255,136),(285,137),(199,138),(249,138),(463,139),(57,140),(85,140),(237,141),(52,142),(324,142),(57,143),(85,143),(199,144),(313,145),(48,146),(122,146),(347,146),(356,146),(424,146),(455,146),(36,147),(106,147),(447,147),(1,148),(28,149),(376,150),(468,151),(209,152),(180,153),(313,153),(347,153),(356,153),(420,153),(330,154),(347,154),(468,155),(97,156),(180,157),(421,158),(34,159),(68,159),(97,159),(211,159),(233,159),(302,159),(336,159),(347,159),(393,159),(405,159),(416,159),(97,160),(347,161),(421,161),(252,162),(468,163),(463,164),(468,164),(60,165),(194,165),(463,165),(478,165),(176,166),(168,167),(194,168),(415,168),(463,168),(478,168),(30,169),(159,169),(454,169),(447,170),(130,171),(421,171),(190,172),(48,173),(83,173),(356,173),(361,173),(463,173),(1,174),(48,174),(86,174),(374,175),(459,175),(252,176),(199,177),(249,177),(24,178),(128,178),(168,178),(209,178),(230,178),(314,178),(500,178),(97,179),(156,179),(230,179),(411,180),(347,181),(463,182),(468,182),(472,182),(473,182),(101,183),(151,183),(304,183),(145,184),(347,184),(374,185),(459,185),(146,186),(160,187),(347,187),(455,188),(146,189),(374,190),(459,190),(180,191),(200,191),(313,191),(420,191),(304,192),(421,192),(356,193),(230,194),(377,194),(468,195),(155,196),(212,196),(468,196),(395,197),(465,198),(129,199),(137,199),(182,199),(349,199),(447,199),(452,200),(57,201),(85,201),(356,202),(1,203),(36,203),(356,203),(421,204),(199,205),(146,206),(249,207),(192,208),(347,208),(1,209),(374,210),(459,210),(221,211),(255,212),(88,213),(199,213),(210,213),(463,213),(468,213),(463,214),(260,215),(421,216),(468,216),(89,217),(406,217),(463,217),(291,218),(356,219),(3,220),(36,220),(48,220),(83,220),(104,220),(130,220),(421,220),(199,221),(194,222),(155,223),(186,223),(212,223),(309,223),(347,223),(97,224),(277,225),(279,226),(464,227),(1,228),(60,228),(87,228),(101,228),(210,228),(304,228),(308,228),(347,228),(463,228),(468,228),(425,229),(89,230),(406,230),(185,231),(463,232),(255,233),(466,233),(272,234),(1,235),(7,236),(347,236),(257,237),(430,237),(194,238),(226,238),(356,238),(427,239),(87,240),(210,240),(463,240),(313,241),(185,242),(24,243),(128,243),(168,243),(209,243),(314,243),(500,243),(199,244),(185,245),(473,246),(185,247),(385,248),(130,249),(155,249),(212,249),(257,249),(333,249),(347,249),(356,249),(421,249),(430,249),(468,249),(185,250),(374,251),(459,251),(60,252),(110,252),(115,252),(215,252),(276,252),(278,252),(321,252),(347,252),(401,252),(417,252),(463,252),(466,252),(468,252),(470,252),(194,253),(347,253),(365,253),(415,253),(463,253),(468,253),(478,253),(468,254),(30,255),(276,255),(468,255),(472,255),(185,256),(356,257),(305,258),(468,259),(310,260),(463,261),(88,262),(185,263),(356,264),(329,265),(356,265),(361,265),(230,266),(315,266),(375,266),(209,267),(88,268),(68,269),(488,269),(420,270),(246,271),(146,272),(194,273),(226,273),(151,274),(326,274),(17,275),(22,275),(60,275),(77,275),(89,275),(97,275),(155,275),(194,275),(210,275),(211,275),(278,275),(302,275),(309,275),(347,275),(358,275),(393,275),(454,275),(468,275),(473,275),(329,276),(194,277),(199,278),(234,279),(347,280),(451,280),(89,281),(39,282),(269,282),(347,282),(463,283),(468,284),(378,285),(147,286),(107,287),(463,288),(466,288),(468,289),(417,290),(3,291),(104,291),(339,292),(344,293),(257,294),(269,295),(321,296),(463,296),(7,297),(10,297),(17,297),(21,297),(25,297),(33,297),(39,297),(58,297),(68,297),(69,297),(82,297),(122,297),(134,297),(137,297),(145,297),(160,297),(170,297),(192,297),(193,297),(215,297),(223,297),(278,297),(282,297),(294,297),(308,297),(309,297),(328,297),(330,297),(333,297),(336,297),(347,297),(349,297),(358,297),(365,297),(393,297),(424,297),(451,297),(487,297),(488,297),(492,297),(38,298),(199,298),(249,298),(305,298),(356,298),(468,299),(326,300),(468,301),(122,302),(350,302),(28,303),(57,303),(85,303),(232,303),(327,303),(344,303),(496,303),(376,304),(147,305),(316,305),(314,306),(106,307),(376,308),(3,309),(104,309),(255,309),(301,309),(356,309),(160,310),(347,310),(141,311),(77,312),(130,312),(199,312),(473,313),(185,314),(182,315),(455,316),(24,317),(111,317),(376,318),(185,319),(130,320),(421,320),(118,321),(390,321),(463,322),(25,323),(347,323),(199,324),(373,325),(473,325),(374,326),(146,327),(185,328),(376,329),(199,330),(347,331),(378,331),(291,332),(347,332),(419,332),(383,333),(88,334),(122,334),(356,334),(424,334),(463,335),(356,336),(199,337),(86,338),(199,338),(356,339),(397,340),(88,341),(151,341),(176,341),(185,342),(130,343),(421,343),(52,344),(324,344),(9,345),(373,345),(473,345),(199,346),(185,347),(123,348),(146,349),(447,349),(376,350),(407,351),(376,352),(463,353),(144,354),(24,355),(110,356),(222,356),(406,356),(463,356),(210,357),(463,357),(468,357),(1,358),(60,359),(159,359),(199,359),(212,359),(226,359),(233,359),(373,359),(406,359),(439,359),(463,359),(478,359),(463,360),(468,360),(473,361),(1,362),(356,362),(1,363),(347,364),(349,364),(421,365),(427,366),(468,367),(77,368),(199,368),(473,368),(477,368),(356,369),(230,370),(465,370),(106,371),(69,372),(347,372),(494,373),(276,374),(447,375),(356,376),(212,377),(417,377),(146,378),(327,378),(468,379),(487,380),(417,381),(89,382),(376,382),(199,383),(376,384),(212,385),(199,386),(468,386),(472,386),(443,387),(282,388),(447,389),(448,390),(89,391),(128,392),(10,393),(347,393),(30,394),(276,394),(472,394),(447,395),(56,396),(84,397),(206,397),(368,397),(456,397),(84,398),(89,398),(155,398),(206,398),(312,398),(189,399),(194,400),(478,400),(326,401),(459,402),(468,403),(146,404),(324,404),(33,405),(460,406),(9,407),(28,407),(30,407),(89,407),(155,407),(186,407),(276,407),(300,407),(479,407),(130,408),(463,409),(269,410),(106,411),(77,412),(222,412),(331,412),(473,412),(313,413),(308,414),(347,414),(463,414),(48,415),(83,415),(106,415),(122,415),(356,415),(424,415),(60,416),(104,416),(463,416),(468,416),(472,416),(468,417),(232,418),(356,419),(3,420),(104,420),(486,420),(374,421),(459,421),(463,422),(470,422),(463,423),(468,423),(243,424),(468,424),(468,425),(472,425),(36,426),(194,427),(478,427),(129,428),(137,428),(349,428),(447,428),(155,429),(186,429),(212,429),(309,429),(347,429),(473,429),(84,430),(368,430),(472,430),(483,431),(466,432),(421,433),(38,434),(52,434),(89,434),(145,434),(223,434),(324,434),(406,434),(257,435),(356,436),(361,436),(491,437),(421,438),(89,439),(406,439),(463,439),(212,440),(468,440),(199,441),(496,442),(36,443),(115,443),(130,443),(326,443),(421,443),(466,443),(470,443),(0,444),(96,444),(288,444),(305,444),(356,444),(361,444),(384,444),(433,444),(497,445),(185,446),(199,447),(36,448),(134,448),(294,448),(347,448),(495,449),(27,450),(22,451),(263,451),(347,451),(347,452),(492,452),(199,453),(104,454),(356,454),(210,455),(106,456),(463,456),(468,456),(463,457),(194,458),(478,458),(374,459),(459,459),(39,460),(58,460),(185,460),(264,460),(269,460),(209,461),(468,461),(201,462),(468,463);
+/*!40000 ALTER TABLE `help_relation` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `help_topic`
+--
+
+DROP TABLE IF EXISTS `help_topic`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `help_topic` (
+ `help_topic_id` int(10) unsigned NOT NULL,
+ `name` char(64) NOT NULL,
+ `help_category_id` smallint(5) unsigned NOT NULL,
+ `description` text NOT NULL,
+ `example` text NOT NULL,
+ `url` text NOT NULL,
+ PRIMARY KEY (`help_topic_id`),
+ UNIQUE KEY `name` (`name`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='help topics';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `help_topic`
+--
+
+LOCK TABLES `help_topic` WRITE;
+/*!40000 ALTER TABLE `help_topic` DISABLE KEYS */;
+INSERT INTO `help_topic` VALUES (0,'MIN',16,'Syntax:\nMIN([DISTINCT] expr)\n\nReturns the minimum value of expr. MIN() may take a string argument; in\nsuch cases, it returns the minimum string value.\nThe DISTINCT keyword can be used to find the minimum of the distinct values\nof expr, however, this produces the same result as omitting DISTINCT.\n\nMIN() returns NULL if there were no matching rows.\n\nURL: https://mariadb.com/kb/en/min/\n\n','MariaDB> SELECT student_name, MIN(test_score), MAX(test_score)\n -> FROM student\n -> GROUP BY student_name;\n','https://mariadb.com/kb/en/min/'),(1,'JOIN',27,'MySQL supports the following JOIN syntaxes for the table_references\npart of SELECT statements and multiple-table DELETE and UPDATE\nstatements:\n\ntable_references:\n table_reference [, table_reference] ...\n\ntable_reference:\n table_factor\n | join_table\n\ntable_factor:\n tbl_name [[AS] alias] [index_hint_list]\n | table_subquery [AS] alias\n | ( table_references )\n | { OJ table_reference LEFT OUTER JOIN table_reference\n ON conditional_expr }\n\njoin_table:\n table_reference [INNER | CROSS] JOIN table_factor [join_condition]\n | table_reference STRAIGHT_JOIN table_factor\n | table_reference STRAIGHT_JOIN table_factor ON conditional_expr\n | table_reference {LEFT|RIGHT} [OUTER] JOIN table_reference join_condition\n | table_reference NATURAL [{LEFT|RIGHT} [OUTER]] JOIN table_factor\n\njoin_condition:\n ON conditional_expr\n | USING (column_list)\n\nindex_hint_list:\n index_hint [, index_hint] ...\n\nindex_hint:\n USE {INDEX|KEY}\n [FOR {JOIN|ORDER BY|GROUP BY}] ([index_list])\n | IGNORE {INDEX|KEY}\n [FOR {JOIN|ORDER BY|GROUP BY}] (index_list)\n | FORCE {INDEX|KEY}\n [FOR {JOIN|ORDER BY|GROUP BY}] (index_list)\n\nindex_list:\n index_name [, index_name] ...\n\nA table reference is also known as a join expression.\n\nThe syntax of table_factor is extended in comparison with the SQL\nStandard. The latter accepts only table_reference, not a list of them\ninside a pair of parentheses.\n\nThis is a conservative extension if we consider each comma in a list of\ntable_reference items as equivalent to an inner join. For example:\n\nSELECT * FROM t1 LEFT JOIN (t2, t3, t4)\n ON (t2.a=t1.a AND t3.b=t1.b AND t4.c=t1.c)\n\nis equivalent to:\n\nSELECT * FROM t1 LEFT JOIN (t2 CROSS JOIN t3 CROSS JOIN t4)\n ON (t2.a=t1.a AND t3.b=t1.b AND t4.c=t1.c)\n\nIn MySQL, JOIN, CROSS JOIN, and INNER JOIN are syntactic equivalents\n(they can replace each other). In standard SQL, they are not\nequivalent. INNER JOIN is used with an ON clause, CROSS JOIN is used\notherwise.\n\nIn general, parentheses can be ignored in join expressions containing\nonly inner join operations.\n\nIndex hints can be specified to affect how the MySQL optimizer makes\nuse of indexes. For more information, see\nhttps://mariadb.com/kb/en/how-to-force-query-plans/.\n\nURL: https://mariadb.com/kb/en/join-syntax/\n\n','SELECT left_tbl.*\n FROM left_tbl LEFT JOIN right_tbl ON left_tbl.id = right_tbl.id\n WHERE right_tbl.id IS NULL;\n','https://mariadb.com/kb/en/join-syntax/'),(2,'HEX',37,'Syntax:\nHEX(str), HEX(N)\n\nFor a string argument str, HEX() returns a hexadecimal string\nrepresentation of str where each character in str is converted to two\nhexadecimal digits. The inverse of this operation is performed by the\nUNHEX() function.\n\nFor a numeric argument N, HEX() returns a hexadecimal string\nrepresentation of the value of N treated as a longlong (BIGINT) number.\nThis is equivalent to CONV(N,10,16). The inverse of this operation is\nperformed by CONV(HEX(N),16,10).\n\nURL: https://mariadb.com/kb/en/hex/\n\n','MariaDB> SELECT 0x616263, HEX(\'abc\'), UNHEX(HEX(\'abc\'));\n -> \'abc\', 616263, \'abc\'\nMariaDB> SELECT HEX(255), CONV(HEX(255),16,10);\n -> \'FF\', 255\n','https://mariadb.com/kb/en/hex/'),(3,'REPLACE',27,'Syntax:\nREPLACE [LOW_PRIORITY | DELAYED]\n [INTO] tbl_name [(col_name,...)]\n {VALUES | VALUE} ({expr | DEFAULT},...),(...),...\n\nOr:\n\nREPLACE [LOW_PRIORITY | DELAYED]\n [INTO] tbl_name\n SET col_name={expr | DEFAULT}, ...\n\nOr:\n\nREPLACE [LOW_PRIORITY | DELAYED]\n [INTO] tbl_name [(col_name,...)]\n SELECT ...\n\nREPLACE works exactly like INSERT, except that if an old row in the\ntable has the same value as a new row for a PRIMARY KEY or a UNIQUE\nindex, the old row is deleted before the new row is inserted. See [HELP\nINSERT].\n\nREPLACE is a MySQL extension to the SQL standard. It either inserts, or\ndeletes and inserts. For another MySQL extension to standard SQL---that\neither inserts or updates---see\nhttps://mariadb.com/kb/en/insert-on-duplicate-key-update/.\n\nNote that unless the table has a PRIMARY KEY or UNIQUE index, using a\nREPLACE statement makes no sense. It becomes equivalent to INSERT,\nbecause there is no index to be used to determine whether a new row\nduplicates another.\n\nValues for all columns are taken from the values specified in the\nREPLACE statement. Any missing columns are set to their default values,\njust as happens for INSERT. You cannot refer to values from the current\nrow and use them in the new row. If you use an assignment such as SET\ncol_name = col_name + 1, the reference to the column name on the right\nhand side is treated as DEFAULT(col_name), so the assignment is\nequivalent to SET col_name = DEFAULT(col_name) + 1.\n\nTo use REPLACE, you must have both the INSERT and DELETE privileges for\nthe table.\n\nURL: https://mariadb.com/kb/en/replace/\n\n','','https://mariadb.com/kb/en/replace/'),(4,'CONTAINS',30,'Contains(g1,g2)\n\nReturns 1 or 0 to indicate whether g1 completely contains g2. This\ntests the opposite relationship as Within().\n\nURL: https://mariadb.com/kb/en/contains/\n\n','','https://mariadb.com/kb/en/contains/'),(5,'SRID',36,'SRID(g)\n\nReturns an integer indicating the Spatial Reference System ID for the\ngeometry value g.\n\nIn MySQL, the SRID value is just an integer associated with the\ngeometry value. All calculations are done assuming Euclidean (planar)\ngeometry.\n\nURL: https://mariadb.com/kb/en/srid/\n\n','MariaDB> SELECT SRID(GeomFromText(\'LineString(1 1,2 2)\',101));\n+-----------------------------------------------+\n| SRID(GeomFromText(\'LineString(1 1,2 2)\',101)) |\n+-----------------------------------------------+\n| 101 |\n+-----------------------------------------------+\n','https://mariadb.com/kb/en/srid/'),(6,'CURRENT_TIMESTAMP',31,'Syntax:\nCURRENT_TIMESTAMP, CURRENT_TIMESTAMP()\n\nCURRENT_TIMESTAMP and CURRENT_TIMESTAMP() are synonyms for NOW().\n\nURL: https://mariadb.com/kb/en/current_timestamp/\n\n','','https://mariadb.com/kb/en/current_timestamp/'),(7,'SHOW CONTRIBUTORS',26,'Syntax:\nSHOW CONTRIBUTORS\n\nThe SHOW CONTRIBUTORS statement displays information about the people\nwho contribute to MySQL source or to causes that we support. For each\ncontributor, it displays Name, Location, and Comment values.\n\nURL: https://mariadb.com/kb/en/show-contributors/\n\n','','https://mariadb.com/kb/en/show-contributors/'),(8,'VARIANCE',16,'Syntax:\nVARIANCE(expr)\n\nReturns the population standard variance of expr. This is an extension\nto standard SQL. The standard SQL function VAR_POP() can be used\ninstead.\n\nVARIANCE() returns NULL if there were no matching rows.\n\nURL: https://mariadb.com/kb/en/variance/\n\n','','https://mariadb.com/kb/en/variance/'),(9,'DROP SERVER',39,'Syntax:\nDROP SERVER [ IF EXISTS ] server_name\n\nDrops the server definition for the server named server_name. The\ncorresponding row within the mysql.servers table will be deleted. This\nstatement requires the SUPER privilege.\n\nDropping a server for a table does not affect any FEDERATED tables that\nused this connection information when they were created. See [HELP\nCREATE SERVER].\n\nURL: https://mariadb.com/kb/en/drop-server/\n\n','','https://mariadb.com/kb/en/drop-server/'),(10,'SHOW AUTHORS',26,'Syntax:\nSHOW AUTHORS\n\nThe SHOW AUTHORS statement displays information about the people who\nwork on MySQL. For each author, it displays Name, Location, and Comment\nvalues.\n\nURL: https://mariadb.com/kb/en/show-authors/\n\n','','https://mariadb.com/kb/en/show-authors/'),(11,'VAR_SAMP',16,'Syntax:\nVAR_SAMP(expr)\n\nReturns the sample variance of expr. That is, the denominator is the\nnumber of rows minus one.\n\nVAR_SAMP() returns NULL if there were no matching rows.\n\nURL: https://mariadb.com/kb/en/var_samp/\n\n','','https://mariadb.com/kb/en/var_samp/'),(12,'CONCAT',37,'Syntax:\nCONCAT(str1,str2,...)\n\nReturns the string that results from concatenating the arguments. May\nhave one or more arguments. If all arguments are nonbinary strings, the\nresult is a nonbinary string. If the arguments include any binary\nstrings, the result is a binary string. A numeric argument is converted\nto its equivalent string form. This is a nonbinary string as of MySQL\n5.5.3. Before 5.5.3, it is a binary string; to to avoid that and\nproduce a nonbinary string, you can use an explicit type cast, as in\nthis example:\n\nSELECT CONCAT(CAST(int_col AS CHAR), char_col);\n\nCONCAT() returns NULL if any argument is NULL.\n\nURL: https://mariadb.com/kb/en/concat/\n\n','MariaDB> SELECT CONCAT(\'My\', \'S\', \'QL\');\n -> \'MySQL\'\nMariaDB> SELECT CONCAT(\'My\', NULL, \'QL\');\n -> NULL\nMariaDB> SELECT CONCAT(14.3);\n -> \'14.3\'\n','https://mariadb.com/kb/en/concat/'),(13,'GEOMETRY HIERARCHY',34,'Geometry is the base class. It is an abstract class. The instantiable\nsubclasses of Geometry are restricted to zero-, one-, and\ntwo-dimensional geometric objects that exist in two-dimensional\ncoordinate space. All instantiable geometry classes are defined so that\nvalid instances of a geometry class are topologically closed (that is,\nall defined geometries include their boundary).\n\nThe base Geometry class has subclasses for Point, Curve, Surface, and\nGeometryCollection:\n\no Point represents zero-dimensional objects.\n\no Curve represents one-dimensional objects, and has subclass\n LineString, with sub-subclasses Line and LinearRing.\n\no Surface is designed for two-dimensional objects and has subclass\n Polygon.\n\no GeometryCollection has specialized zero-, one-, and two-dimensional\n collection classes named MultiPoint, MultiLineString, and\n MultiPolygon for modeling geometries corresponding to collections of\n Points, LineStrings, and Polygons, respectively. MultiCurve and\n MultiSurface are introduced as abstract superclasses that generalize\n the collection interfaces to handle Curves and Surfaces.\n\nGeometry, Curve, Surface, MultiCurve, and MultiSurface are defined as\nnoninstantiable classes. They define a common set of methods for their\nsubclasses and are included for extensibility.\n\nPoint, LineString, Polygon, GeometryCollection, MultiPoint,\nMultiLineString, and MultiPolygon are instantiable classes.\n\nURL: https://mariadb.com/kb/en/geometry-hierarchy/\n\n','','https://mariadb.com/kb/en/geometry-hierarchy/'),(14,'CHAR FUNCTION',37,'Syntax:\nCHAR(N,... [USING charset_name])\n\nCHAR() interprets each argument N as an integer and returns a string\nconsisting of the characters given by the code values of those\nintegers. NULL values are skipped.\nBy default, CHAR() returns a binary string. To produce a string in a\ngiven character set, use the optional USING clause:\n\nMariaDB> SELECT CHARSET(CHAR(0x65)), CHARSET(CHAR(0x65 USING utf8));\n+---------------------+--------------------------------+\n| CHARSET(CHAR(0x65)) | CHARSET(CHAR(0x65 USING utf8)) |\n+---------------------+--------------------------------+\n| binary | utf8 |\n+---------------------+--------------------------------+\n\nIf USING is given and the result string is illegal for the given\ncharacter set, a warning is issued. Also, if strict SQL mode is\nenabled, the result from CHAR() becomes NULL.\n\nURL: https://mariadb.com/kb/en/char-function/\n\n','MariaDB> SELECT CHAR(77,121,83,81,\'76\');\n -> \'MySQL\'\nMariaDB> SELECT CHAR(77,77.3,\'77.3\');\n -> \'MMM\'\n','https://mariadb.com/kb/en/char-function/'),(15,'DATETIME',22,'DATETIME\n\nA date and time combination. The supported range is \'1000-01-01\n00:00:00\' to \'9999-12-31 23:59:59\'. MySQL displays DATETIME values in\n\'YYYY-MM-DD HH:MM:SS\' format, but permits assignment of values to\nDATETIME columns using either strings or numbers.\n\nURL: https://mariadb.com/kb/en/datetime/\n\n','','https://mariadb.com/kb/en/datetime/'),(16,'SHOW CREATE TRIGGER',26,'Syntax:\nSHOW CREATE TRIGGER trigger_name\n\nThis statement shows a CREATE TRIGGER statement that creates the given\ntrigger.\n\nURL: https://mariadb.com/kb/en/show-create-trigger/\n\n','','https://mariadb.com/kb/en/show-create-trigger/'),(17,'SHOW CREATE PROCEDURE',26,'Syntax:\nSHOW CREATE PROCEDURE proc_name\n\nThis statement is a MySQL extension. It returns the exact string that\ncan be used to re-create the named stored procedure. A similar\nstatement, SHOW CREATE FUNCTION, displays information about stored\nfunctions (see [HELP SHOW CREATE FUNCTION]).\n\nBoth statements require that you be the owner of the routine or have\nSELECT access to the mysql.proc table. If you do not have privileges\nfor the routine itself, the value displayed for the Create Procedure or\nCreate Function field will be NULL.\n\nURL: https://mariadb.com/kb/en/show-create-procedure/\n\n','MariaDB> SHOW CREATE PROCEDURE test.simpleproc\\G\n*************************** 1. row ***************************\n Procedure: simpleproc\n sql_mode:\n Create Procedure: CREATE PROCEDURE `simpleproc`(OUT param1 INT)\n BEGIN\n SELECT COUNT(*) INTO param1 FROM t;\n END\ncharacter_set_client: latin1\ncollation_connection: latin1_swedish_ci\n Database Collation: latin1_swedish_ci\n\nMariaDB> SHOW CREATE FUNCTION test.hello\\G\n*************************** 1. row ***************************\n Function: hello\n sql_mode:\n Create Function: CREATE FUNCTION `hello`(s CHAR(20))\n RETURNS CHAR(50)\n RETURN CONCAT(\'Hello, \',s,\'!\')\ncharacter_set_client: latin1\ncollation_connection: latin1_swedish_ci\n Database Collation: latin1_swedish_ci\n','https://mariadb.com/kb/en/show-create-procedure/'),(18,'OPEN',23,'Syntax:\nOPEN cursor_name\n\nThis statement opens a previously declared cursor. For an example, see\nhttps://mariadb.com/kb/en/cursor-overview/.\n\nURL: https://mariadb.com/kb/en/open/\n\n','','https://mariadb.com/kb/en/open/'),(19,'INTEGER',22,'INTEGER[(M)] [UNSIGNED] [ZEROFILL]\n\nThis type is a synonym for INT.\n\nURL: https://mariadb.com/kb/en/sql_language-data_types-int\n\n','','https://mariadb.com/kb/en/sql_language-data_types-int'),(20,'LOWER',37,'Syntax:\nLOWER(str)\n\nReturns the string str with all characters changed to lowercase\naccording to the current character set mapping. The default is latin1\n(cp1252 West European).\n\nMariaDB> SELECT LOWER(\'QUADRATICALLY\');\n -> \'quadratically\'\n\nLOWER() (and UPPER()) are ineffective when applied to binary strings\n(BINARY, VARBINARY, BLOB). To perform lettercase conversion, convert\nthe string to a nonbinary string:\n\nMariaDB> SET @str = BINARY \'New York\';\nMariaDB> SELECT LOWER(@str), LOWER(CONVERT(@str USING latin1));\n+-------------+-----------------------------------+\n| LOWER(@str) | LOWER(CONVERT(@str USING latin1)) |\n+-------------+-----------------------------------+\n| New York | new york |\n+-------------+-----------------------------------+\n\nURL: https://mariadb.com/kb/en/lower/\n\n','','https://mariadb.com/kb/en/lower/'),(21,'SHOW COLUMNS',26,'Syntax:\nSHOW [FULL] COLUMNS {FROM | IN} tbl_name [{FROM | IN} db_name]\n [LIKE \'pattern\' | WHERE expr]\n\nSHOW COLUMNS displays information about the columns in a given table.\nIt also works for views. The LIKE clause, if present, indicates which\ncolumn names to match. The WHERE clause can be given to select rows\nusing more general conditions, as discussed in\nhttps://mariadb.com/kb/en/extended-show/.\n\nSHOW COLUMNS displays information only for those columns for which you\nhave some privilege.\n\nMariaDB> SHOW COLUMNS FROM City;\n+------------+----------+------+-----+---------+----------------+\n| Field | Type | Null | Key | Default | Extra |\n+------------+----------+------+-----+---------+----------------+\n| Id | int(11) | NO | PRI | NULL | auto_increment |\n| Name | char(35) | NO | | | |\n| Country | char(3) | NO | UNI | | |\n| District | char(20) | YES | MUL | | |\n| Population | int(11) | NO | | 0 | |\n+------------+----------+------+-----+---------+----------------+\n5 rows in set (0.00 sec)\n\nIf the data types differ from what you expect them to be based on a\nCREATE TABLE statement, note that MySQL sometimes changes data types\nwhen you create or alter a table. The conditions under which this\noccurs are described in\nhttps://mariadb.com/kb/en/silent-column-changes/.\n\nThe FULL keyword causes the output to include the column collation and\ncomments, as well as the privileges you have for each column.\n\nYou can use db_name.tbl_name as an alternative to the tbl_name FROM\ndb_name syntax. In other words, these two statements are equivalent:\n\nMariaDB> SHOW COLUMNS FROM mytable FROM mydb;\nMariaDB> SHOW COLUMNS FROM mydb.mytable;\n\nSHOW COLUMNS displays the following values for each table column:\n\nField indicates the column name.\n\nType indicates the column data type.\n\nCollation indicates the collation for nonbinary string columns, or NULL\nfor other columns. This value is displayed only if you use the FULL\nkeyword.\n\nThe Null field contains YES if NULL values can be stored in the column,\nNO if not.\n\nThe Key field indicates whether the column is indexed:\n\no If Key is empty, the column either is not indexed or is indexed only\n as a secondary column in a multiple-column, nonunique index.\n\no If Key is PRI, the column is a PRIMARY KEY or is one of the columns\n in a multiple-column PRIMARY KEY.\n\no If Key is UNI, the column is the first column of a UNIQUE index. (A\n UNIQUE index permits multiple NULL values, but you can tell whether\n the column permits NULL by checking the Null field.)\n\no If Key is MUL, the column is the first column of a nonunique index in\n which multiple occurrences of a given value are permitted within the\n column.\n\nIf more than one of the Key values applies to a given column of a\ntable, Key displays the one with the highest priority, in the order\nPRI, UNI, MUL.\n\nA UNIQUE index may be displayed as PRI if it cannot contain NULL values\nand there is no PRIMARY KEY in the table. A UNIQUE index may display as\nMUL if several columns form a composite UNIQUE index; although the\ncombination of the columns is unique, each column can still hold\nmultiple occurrences of a given value.\n\nThe Default field indicates the default value that is assigned to the\ncolumn. This is NULL if the column has an explicit default of NULL, or\nif the column definition has no DEFAULT clause.\n\nThe Extra field contains any additional information that is available\nabout a given column. The value is nonempty in these cases:\nauto_increment for columns that have the AUTO_INCREMENT attribute; on\nupdate CURRENT_TIMESTAMP for TIMESTAMP columns that have the ON UPDATE\nCURRENT_TIMESTAMP attribute.\n\nPrivileges indicates the privileges you have for the column. This value\nis displayed only if you use the FULL keyword.\n\nComment indicates any comment the column has. This value is displayed\nonly if you use the FULL keyword.\n\nSHOW FIELDS is a synonym for SHOW COLUMNS. You can also list a table\'s\ncolumns with the mysqlshow db_name tbl_name command.\n\nThe DESCRIBE statement provides information similar to SHOW COLUMNS.\nSee [HELP DESCRIBE].\n\nThe SHOW CREATE TABLE, SHOW TABLE STATUS, and SHOW INDEX statements\nalso provide information about tables. See [HELP SHOW].\n\nURL: https://mariadb.com/kb/en/show-columns/\n\n','','https://mariadb.com/kb/en/show-columns/'),(22,'CREATE TRIGGER',39,'Syntax:\nCREATE\n [DEFINER = { user | CURRENT_USER }]\n TRIGGER trigger_name trigger_time trigger_event\n ON tbl_name FOR EACH ROW trigger_body\n\nThis statement creates a new trigger. A trigger is a named database\nobject that is associated with a table, and that activates when a\nparticular event occurs for the table. The trigger becomes associated\nwith the table named tbl_name, which must refer to a permanent table.\nYou cannot associate a trigger with a TEMPORARY table or a view.\n\nCREATE TRIGGER requires the TRIGGER privilege for the table associated\nwith the trigger. The statement might also require the SUPER privilege,\ndepending on the DEFINER value, as described later in this section. If\nbinary logging is enabled, CREATE TRIGGER might require the SUPER\nprivilege, as described in\nhttps://mariadb.com/kb/en/binary-logging-of-stored-routines/.\n\nThe DEFINER clause determines the security context to be used when\nchecking access privileges at trigger activation time. See later in\nthis section for more information.\n\ntrigger_time is the trigger action time. It can be BEFORE or AFTER to\nindicate that the trigger activates before or after each row to be\nmodified.\n\ntrigger_event indicates the kind of statement that activates the\ntrigger. The trigger_event can be one of the following:\n\no INSERT: The trigger is activated whenever a new row is inserted into\n the table; for example, through INSERT, LOAD DATA, and REPLACE\n statements.\n\no UPDATE: The trigger is activated whenever a row is modified; for\n example, through UPDATE statements.\n\no DELETE: The trigger is activated whenever a row is deleted from the\n table; for example, through DELETE and REPLACE statements. However,\n DROP TABLE and TRUNCATE TABLE statements on the table do not activate\n this trigger, because they do not use DELETE. Dropping a partition\n does not activate DELETE triggers, either. See [HELP TRUNCATE TABLE].\n\nURL: https://mariadb.com/kb/en/create-trigger/\n\n','','https://mariadb.com/kb/en/create-trigger/'),(23,'MONTH',31,'Syntax:\nMONTH(date)\n\nReturns the month for date, in the range 1 to 12 for January to\nDecember, or 0 for dates such as \'0000-00-00\' or \'2008-00-00\' that have\na zero month part.\n\nURL: https://mariadb.com/kb/en/month/\n\n','MariaDB> SELECT MONTH(\'2008-02-03\');\n -> 2\n','https://mariadb.com/kb/en/month/'),(24,'TINYINT',22,'TINYINT[(M)] [UNSIGNED] [ZEROFILL]\n\nA very small integer. The signed range is -128 to 127. The unsigned\nrange is 0 to 255.\n\nURL: https://mariadb.com/kb/en/tinyint/\n\n','','https://mariadb.com/kb/en/tinyint/'),(25,'SHOW TRIGGERS',26,'Syntax:\nSHOW TRIGGERS [{FROM | IN} db_name]\n [LIKE \'pattern\' | WHERE expr]\n\nSHOW TRIGGERS lists the triggers currently defined for tables in a\ndatabase (the default database unless a FROM clause is given). This\nstatement returns results only for databases and tables for which you\nhave the TRIGGER privilege. The LIKE clause, if present, indicates\nwhich table names to match and causes the statement to display triggers\nfor those tables. The WHERE clause can be given to select rows using\nmore general conditions, as discussed in\nhttps://mariadb.com/kb/en/extended-show/.\n\nFor the trigger ins_sum as defined in\nhttps://mariadb.com/kb/en/triggers/, the output of\nthis statement is as shown here:\n\nMariaDB> SHOW TRIGGERS LIKE \'acc%\'\\G\n*************************** 1. row ***************************\n Trigger: ins_sum\n Event: INSERT\n Table: account\n Statement: SET @sum = @sum + NEW.amount\n Timing: BEFORE\n Created: NULL\n sql_mode:\n Definer: myname@localhost\ncharacter_set_client: latin1\ncollation_connection: latin1_swedish_ci\n Database Collation: latin1_swedish_ci\n\ncharacter_set_client is the session value of the character_set_client\nsystem variable when the trigger was created. collation_connection is\nthe session value of the collation_connection system variable when the\ntrigger was created. Database Collation is the collation of the\ndatabase with which the trigger is associated.\n\nURL: https://mariadb.com/kb/en/show-triggers/\n\n','','https://mariadb.com/kb/en/show-triggers/'),(26,'MASTER_POS_WAIT',14,'Syntax:\nMASTER_POS_WAIT(log_name,log_pos[,timeout])\n\nThis function is useful for control of master/slave synchronization. It\nblocks until the slave has read and applied all updates up to the\nspecified position in the master log. The return value is the number of\nlog events the slave had to wait for to advance to the specified\nposition. The function returns NULL if the slave SQL thread is not\nstarted, the slave\'s master information is not initialized, the\narguments are incorrect, or an error occurs. It returns -1 if the\ntimeout has been exceeded. If the slave SQL thread stops while\nMASTER_POS_WAIT() is waiting, the function returns NULL. If the slave\nis past the specified position, the function returns immediately.\n\nIf a timeout value is specified, MASTER_POS_WAIT() stops waiting when\ntimeout seconds have elapsed. timeout must be greater than 0; a zero or\nnegative timeout means no timeout.\n\nURL: https://mariadb.com/kb/en/master_pos_wait/\n\n','','https://mariadb.com/kb/en/master_pos_wait/'),(27,'REGEXP',37,'Syntax:\nexpr REGEXP pat, expr RLIKE pat\n\nPerforms a pattern match of a string expression expr against a pattern\npat. The pattern can be an extended regular expression. The syntax for\nregular expressions is discussed in\nhttps://mariadb.com/kb/en/regexp/. Returns 1 if expr\nmatches pat; otherwise it returns 0. If either expr or pat is NULL, the\nresult is NULL. RLIKE is a synonym for REGEXP, provided for mSQL\ncompatibility.\n\nThe pattern need not be a literal string. For example, it can be\nspecified as a string expression or table column.\n\n*Note*: Because MySQL uses the C escape syntax in strings (for example,\n\"\\n\" to represent the newline character), you must double any \"\\\" that\nyou use in your REGEXP strings.\n\nREGEXP is not case sensitive, except when used with binary strings.\n\nURL: https://mariadb.com/kb/en/regexp/\n\n','MariaDB> SELECT \'Monty!\' REGEXP \'.*\';\n -> 1\nMariaDB> SELECT \'new*\\n*line\' REGEXP \'new\\\\*.\\\\*line\';\n -> 1\nMariaDB> SELECT \'a\' REGEXP \'A\', \'a\' REGEXP BINARY \'A\';\n -> 1 0\nMariaDB> SELECT \'a\' REGEXP \'^[a-d]\';\n -> 1\n','https://mariadb.com/kb/en/regexp/'),(28,'IF STATEMENT',23,'Syntax:\nIF search_condition THEN statement_list\n [ELSEIF search_condition THEN statement_list] ...\n [ELSE statement_list]\nEND IF\n\nThe IF statement for stored programs implements a basic conditional\nconstruct.\n\n*Note*: There is also an IF() function, which differs from the IF\nstatement described here. See\nhttps://mariadb.com/kb/en/if-function/. The\nIF statement can have THEN, ELSE, and ELSEIF clauses, and it is\nterminated with END IF.\n\nIf the search_condition evaluates to true, the corresponding THEN or\nELSEIF clause statement_list executes. If no search_condition matches,\nthe ELSE clause statement_list executes.\n\nEach statement_list consists of one or more SQL statements; an empty\nstatement_list is not permitted.\n\nURL: https://mariadb.com/kb/en/if-statement/\n\n','','https://mariadb.com/kb/en/if-statement/'),(29,'^',19,'Syntax:\n^\n\nBitwise XOR:\n\nURL: https://mariadb.com/kb/en/bitwise-xor/\n\n','MariaDB> SELECT 1 ^ 1;\n -> 0\nMariaDB> SELECT 1 ^ 0;\n -> 1\nMariaDB> SELECT 11 ^ 3;\n -> 8\n','https://mariadb.com/kb/en/bitwise-xor/'),(30,'DROP VIEW',39,'Syntax:\nDROP VIEW [IF EXISTS]\n view_name [, view_name] ...\n [RESTRICT | CASCADE]\n\nDROP VIEW removes one or more views. You must have the DROP privilege\nfor each view. If any of the views named in the argument list do not\nexist, MySQL returns an error indicating by name which nonexisting\nviews it was unable to drop, but it also drops all of the views in the\nlist that do exist.\n\nThe IF EXISTS clause prevents an error from occurring for views that\ndon\'t exist. When this clause is given, a NOTE is generated for each\nnonexistent view. See [HELP SHOW WARNINGS].\n\nRESTRICT and CASCADE, if given, are parsed and ignored.\n\nURL: https://mariadb.com/kb/en/drop-view/\n\n','','https://mariadb.com/kb/en/drop-view/'),(31,'WITHIN',30,'Within(g1,g2)\n\nReturns 1 or 0 to indicate whether g1 is spatially within g2. This\ntests the opposite relationship as Contains().\n\nURL: https://mariadb.com/kb/en/within/\n\n','','https://mariadb.com/kb/en/within/'),(32,'WEEK',31,'Syntax:\nWEEK(date[,mode])\n\nThis function returns the week number for date. The two-argument form\nof WEEK() enables you to specify whether the week starts on Sunday or\nMonday and whether the return value should be in the range from 0 to 53\nor from 1 to 53. If the mode argument is omitted, the value of the\ndefault_week_format system variable is used. See\nhttps://mariadb.com/kb/en/server-system-variables/.\n\nURL: https://mariadb.com/kb/en/week/\n\n','MariaDB> SELECT WEEK(\'2008-02-20\');\n -> 7\nMariaDB> SELECT WEEK(\'2008-02-20\',0);\n -> 7\nMariaDB> SELECT WEEK(\'2008-02-20\',1);\n -> 8\nMariaDB> SELECT WEEK(\'2008-12-31\',1);\n -> 53\n','https://mariadb.com/kb/en/week/'),(33,'SHOW PLUGINS',26,'Syntax:\nSHOW PLUGINS\n\nSHOW PLUGINS displays information about server plugins. Plugin\ninformation is also available in the INFORMATION_SCHEMA.PLUGINS table.\nSee https://mariadb.com/kb/en/information_schemaplugins-table/.\n\nExample of SHOW PLUGINS output:\n\nMariaDB> SHOW PLUGINS\\G\n*************************** 1. row ***************************\n Name: binlog\n Status: ACTIVE\n Type: STORAGE ENGINE\nLibrary: NULL\nLicense: GPL\n*************************** 2. row ***************************\n Name: CSV\n Status: ACTIVE\n Type: STORAGE ENGINE\nLibrary: NULL\nLicense: GPL\n*************************** 3. row ***************************\n Name: MEMORY\n Status: ACTIVE\n Type: STORAGE ENGINE\nLibrary: NULL\nLicense: GPL\n*************************** 4. row ***************************\n Name: MyISAM\n Status: ACTIVE\n Type: STORAGE ENGINE\nLibrary: NULL\nLicense: GPL\n...\n\nURL: https://mariadb.com/kb/en/show-plugins/\n\n','','https://mariadb.com/kb/en/show-plugins/'),(34,'DROP FUNCTION UDF',21,'Syntax:\nDROP FUNCTION function_name\n\nThis statement drops the user-defined function (UDF) named\nfunction_name.\n\nTo drop a function, you must have the DELETE privilege for the mysql\ndatabase. This is because DROP FUNCTION removes a row from the\nmysql.func system table that records the function\'s name, type, and\nshared library name.\n\nURL: https://mariadb.com/kb/en/drop-function-udf/\n\n','','https://mariadb.com/kb/en/drop-function-udf/'),(35,'PREPARE',8,'Syntax:\nPREPARE stmt_name FROM preparable_stmt\n\nThe PREPARE statement prepares a statement and assigns it a name,\nstmt_name, by which to refer to the statement later. Statement names\nare not case sensitive. preparable_stmt is either a string literal or a\nuser variable that contains the text of the statement. The text must\nrepresent a single SQL statement, not multiple statements. Within the\nstatement, \"?\" characters can be used as parameter markers to indicate\nwhere data values are to be bound to the query later when you execute\nit. The \"?\" characters should not be enclosed within quotation marks,\neven if you intend to bind them to string values. Parameter markers can\nbe used only where data values should appear, not for SQL keywords,\nidentifiers, and so forth.\n\nIf a prepared statement with the given name already exists, it is\ndeallocated implicitly before the new statement is prepared. This means\nthat if the new statement contains an error and cannot be prepared, an\nerror is returned and no statement with the given name exists.\n\nA prepared statement is executed with EXECUTE and released with\nDEALLOCATE PREPARE.\n\nThe scope of a prepared statement is the session within which it is\ncreated. Other sessions cannot see it.\n\nURL: https://mariadb.com/kb/en/prepare-statement/\n\n','','https://mariadb.com/kb/en/prepare-statement/'),(36,'LOCK',8,'Syntax:\nLOCK TABLES\n tbl_name [[AS] alias] lock_type\n [, tbl_name [[AS] alias] lock_type] ...\n\nlock_type:\n READ [LOCAL]\n | [LOW_PRIORITY] WRITE\n\nUNLOCK TABLES\n\nMySQL enables client sessions to acquire table locks explicitly for the\npurpose of cooperating with other sessions for access to tables, or to\nprevent other sessions from modifying tables during periods when a\nsession requires exclusive access to them. A session can acquire or\nrelease locks only for itself. One session cannot acquire locks for\nanother session or release locks held by another session.\n\nLocks may be used to emulate transactions or to get more speed when\nupdating tables. This is explained in more detail later in this\nsection.\n\nLOCK TABLES explicitly acquires table locks for the current client\nsession. Table locks can be acquired for base tables or views. You must\nhave the LOCK TABLES privilege, and the SELECT privilege for each\nobject to be locked.\n\nFor view locking, LOCK TABLES adds all base tables used in the view to\nthe set of tables to be locked and locks them automatically. If you\nlock a table explicitly with LOCK TABLES, any tables used in triggers\nare also locked implicitly, as described in\nhttps://mariadb.com/kb/en/triggers-and-implicit-locks/.\n\nUNLOCK TABLES explicitly releases any table locks held by the current\nsession. LOCK TABLES implicitly releases any table locks held by the\ncurrent session before acquiring new locks.\n\nAnother use for UNLOCK TABLES is to release the global read lock\nacquired with the FLUSH TABLES WITH READ LOCK statement, which enables\nyou to lock all tables in all databases. See [HELP FLUSH]. (This is a\nvery convenient way to get backups if you have a file system such as\nVeritas that can take snapshots in time.)\n\nURL: https://mariadb.com/kb/en/transactions-lock/\n\n','','https://mariadb.com/kb/en/transactions-lock/'),(37,'UPDATEXML',37,'Syntax:\nUpdateXML(xml_target, xpath_expr, new_xml)\n\nThis function replaces a single portion of a given fragment of XML\nmarkup xml_target with a new XML fragment new_xml, and then returns the\nchanged XML. The portion of xml_target that is replaced matches an\nXPath expression xpath_expr supplied by the user. In MySQL 5.5, the\nXPath expression can contain at most 127 characters. (This limitation\nis lifted in MySQL 5.6.)\n\nIf no expression matching xpath_expr is found, or if multiple matches\nare found, the function returns the original xml_target XML fragment.\nAll three arguments should be strings.\n\nURL: https://mariadb.com/kb/en/updatexml/\n\n','MariaDB> SELECT\n -> UpdateXML(\'<a><b>ccc</b><d></d></a>\', \'/a\', \'<e>fff</e>\') AS val1,\n -> UpdateXML(\'<a><b>ccc</b><d></d></a>\', \'/b\', \'<e>fff</e>\') AS val2,\n -> UpdateXML(\'<a><b>ccc</b><d></d></a>\', \'//b\', \'<e>fff</e>\') AS val3,\n -> UpdateXML(\'<a><b>ccc</b><d></d></a>\', \'/a/d\', \'<e>fff</e>\') AS val4,\n -> UpdateXML(\'<a><d></d><b>ccc</b><d></d></a>\', \'/a/d\', \'<e>fff</e>\') AS val5\n -> \\G\n\n*************************** 1. row ***************************\nval1: <e>fff</e>\nval2: <a><b>ccc</b><d></d></a>\nval3: <a><e>fff</e><d></d></a>\nval4: <a><b>ccc</b><e>fff</e></a>\nval5: <a><d></d><b>ccc</b><d></d></a>\n','https://mariadb.com/kb/en/updatexml/'),(38,'RESET SLAVE',8,'Syntax:\nRESET SLAVE [ALL]\n\nRESET SLAVE makes the slave forget its replication position in the\nmaster\'s binary log. This statement is meant to be used for a clean\nstart: It deletes the master.info and relay-log.info files, all the\nrelay log files, and starts a new relay log file. To use RESET SLAVE,\nthe slave replication threads must be stopped (use STOP SLAVE if\nnecessary).\n\n*Note*: All relay log files are deleted, even if they have not been\ncompletely executed by the slave SQL thread. (This is a condition\nlikely to exist on a replication slave if you have issued a STOP SLAVE\nstatement or if the slave is highly loaded.)\n\nIn MySQL 5.5 (unlike the case in MySQL 5.1 and earlier), RESET SLAVE\ndoes not change any replication connection parameters such as master\nhost, master port, master user, or master password, which are retained\nin memory. This means that START SLAVE can be issued without requiring\na CHANGE MASTER TO statement following RESET SLAVE.\n\nIn MySQL 5.5.16 and later, you can use RESET SLAVE ALL to reset these\nconnection parameters (Bug #11809016). Connection parameters are also\nreset if the slave mysqld is shut down.\n\nIf the slave SQL thread was in the middle of replicating temporary\ntables when it was stopped, and RESET SLAVE is issued, these replicated\ntemporary tables are deleted on the slave.\n\nURL: https://mariadb.com/kb/en/reset-slave-connection_name/\n\n','','https://mariadb.com/kb/en/reset-slave-connection_name/'),(39,'SHOW BINARY LOGS',26,'Syntax:\nSHOW BINARY LOGS\nSHOW MASTER LOGS\n\nLists the binary log files on the server. This statement is used as\npart of the procedure described in [HELP PURGE BINARY LOGS], that shows\nhow to determine which logs can be purged.\n\nMariaDB> SHOW BINARY LOGS;\n+---------------+-----------+\n| Log_name | File_size |\n+---------------+-----------+\n| binlog.000015 | 724935 |\n| binlog.000016 | 733481 |\n+---------------+-----------+\n\nURL: https://mariadb.com/kb/en/show-binary-logs/\n\n','','https://mariadb.com/kb/en/show-binary-logs/'),(40,'POLYGON',24,'Polygon(ls1,ls2,...)\n\nConstructs a Polygon value from a number of LineString or WKB\nLineString arguments. If any argument does not represent a LinearRing\n(that is, not a closed and simple LineString), the return value is\nNULL.\n\nURL: https://mariadb.com/kb/en/polygon/\n\n','','https://mariadb.com/kb/en/polygon/'),(41,'MINUTE',31,'Syntax:\nMINUTE(time)\n\nReturns the minute for time, in the range 0 to 59.\n\nURL: https://mariadb.com/kb/en/minute/\n\n','MariaDB> SELECT MINUTE(\'2008-02-03 10:05:03\');\n -> 5\n','https://mariadb.com/kb/en/minute/'),(42,'DAY',31,'Syntax:\nDAY(date)\n\nDAY() is a synonym for DAYOFMONTH().\n\nURL: https://mariadb.com/kb/en/day/\n\n','','https://mariadb.com/kb/en/day/'),(43,'MID',37,'Syntax:\nMID(str,pos,len)\n\nMID(str,pos,len) is a synonym for SUBSTRING(str,pos,len).\n\nURL: https://mariadb.com/kb/en/mid/\n\n','','https://mariadb.com/kb/en/mid/'),(44,'UUID',14,'Syntax:\nUUID()\n\nReturns a Universal Unique Identifier (UUID) generated according to\n\"DCE 1.1: Remote Procedure Call\" (Appendix A) CAE (Common Applications\nEnvironment) Specifications published by The Open Group in October 1997\n(Document Number C706,\nhttp://www.opengroup.org/public/pubs/catalog/c706.htm).\n\nA UUID is designed as a number that is globally unique in space and\ntime. Two calls to UUID() are expected to generate two different\nvalues, even if these calls are performed on two separate computers\nthat are not connected to each other.\n\nA UUID is a 128-bit number represented by a utf8 string of five\nhexadecimal numbers in aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee format:\n\no The first three numbers are generated from a timestamp.\n\no The fourth number preserves temporal uniqueness in case the timestamp\n value loses monotonicity (for example, due to daylight saving time).\n\no The fifth number is an IEEE 802 node number that provides spatial\n uniqueness. A random number is substituted if the latter is not\n available (for example, because the host computer has no Ethernet\n card, or we do not know how to find the hardware address of an\n interface on your operating system). In this case, spatial uniqueness\n cannot be guaranteed. Nevertheless, a collision should have very low\n probability.\n\n Currently, the MAC address of an interface is taken into account only\n on FreeBSD and Linux. On other operating systems, MySQL uses a\n randomly generated 48-bit number.\n\nURL: https://mariadb.com/kb/en/uuid/\n\n','MariaDB> SELECT UUID();\n -> \'6ccd780c-baba-1026-9564-0040f4311e29\'\n','https://mariadb.com/kb/en/uuid/'),(45,'LINESTRING',24,'LineString(pt1,pt2,...)\n\nConstructs a LineString value from a number of Point or WKB Point\narguments. If the number of arguments is less than two, the return\nvalue is NULL.\n\nURL: https://mariadb.com/kb/en/linestring/\n\n','','https://mariadb.com/kb/en/linestring/'),(46,'SLEEP',14,'Syntax:\nSLEEP(duration)\n\nSleeps (pauses) for the number of seconds given by the duration\nargument, then returns 0. If SLEEP() is interrupted, it returns 1. The\nduration may have a fractional part given in microseconds.\n\nURL: https://mariadb.com/kb/en/sleep/\n\n','','https://mariadb.com/kb/en/sleep/'),(47,'CONNECTION_ID',17,'Syntax:\nCONNECTION_ID()\n\nReturns the connection ID (thread ID) for the connection. Every\nconnection has an ID that is unique among the set of currently\nconnected clients.\n\nURL: https://mariadb.com/kb/en/connection_id/\n\n','MariaDB> SELECT CONNECTION_ID();\n -> 23786\n','https://mariadb.com/kb/en/connection_id/'),(48,'DELETE',27,'Syntax:\nSingle-table syntax:\n\nDELETE [LOW_PRIORITY] [QUICK] [IGNORE] FROM tbl_name\n [WHERE where_condition]\n [ORDER BY ...]\n [LIMIT row_count]\n\nMultiple-table syntax:\n\nDELETE [LOW_PRIORITY] [QUICK] [IGNORE]\n tbl_name[.*] [, tbl_name[.*]] ...\n FROM table_references\n [WHERE where_condition]\n\nOr:\n\nDELETE [LOW_PRIORITY] [QUICK] [IGNORE]\n FROM tbl_name[.*] [, tbl_name[.*]] ...\n USING table_references\n [WHERE where_condition]\n\nFor the single-table syntax, the DELETE statement deletes rows from\ntbl_name and returns a count of the number of deleted rows. This count\ncan be obtained by calling the ROW_COUNT() function (see\nhttps://mariadb.com/kb/en/information-functions-row_count/). The\nWHERE clause, if given, specifies the conditions that identify which\nrows to delete. With no WHERE clause, all rows are deleted. If the\nORDER BY clause is specified, the rows are deleted in the order that is\nspecified. The LIMIT clause places a limit on the number of rows that\ncan be deleted.\n\nFor the multiple-table syntax, DELETE deletes from each tbl_name the\nrows that satisfy the conditions. In this case, ORDER BY and LIMIT\ncannot be used.\n\nwhere_condition is an expression that evaluates to true for each row to\nbe deleted. It is specified as described in\nhttps://mariadb.com/kb/en/select/.\n\nCurrently, you cannot delete from a table and select from the same\ntable in a subquery.\n\nYou need the DELETE privilege on a table to delete rows from it. You\nneed only the SELECT privilege for any columns that are only read, such\nas those named in the WHERE clause.\n\nAs stated, a DELETE statement with no WHERE clause deletes all rows. A\nfaster way to do this, when you do not need to know the number of\ndeleted rows, is to use TRUNCATE TABLE. However, within a transaction\nor if you have a lock on the table, TRUNCATE TABLE cannot be used\nwhereas DELETE can. See [HELP TRUNCATE TABLE], and [HELP LOCK].\n\nURL: https://mariadb.com/kb/en/delete/\n\n','','https://mariadb.com/kb/en/delete/'),(49,'ROUND',4,'Syntax:\nROUND(X), ROUND(X,D)\n\nRounds the argument X to D decimal places. The rounding algorithm\ndepends on the data type of X. D defaults to 0 if not specified. D can\nbe negative to cause D digits left of the decimal point of the value X\nto become zero.\n\nURL: https://mariadb.com/kb/en/round/\n\n','MariaDB> SELECT ROUND(-1.23);\n -> -1\nMariaDB> SELECT ROUND(-1.58);\n -> -2\nMariaDB> SELECT ROUND(1.58);\n -> 2\nMariaDB> SELECT ROUND(1.298, 1);\n -> 1.3\nMariaDB> SELECT ROUND(1.298, 0);\n -> 1\nMariaDB> SELECT ROUND(23.298, -1);\n -> 20\n','https://mariadb.com/kb/en/round/'),(50,'NULLIF',7,'Syntax:\nNULLIF(expr1,expr2)\n\nReturns NULL if expr1 = expr2 is true, otherwise returns expr1. This is\nthe same as CASE WHEN expr1 = expr2 THEN NULL ELSE expr1 END.\n\nURL: https://mariadb.com/kb/en/nullif/\n\n','MariaDB> SELECT NULLIF(1,1);\n -> NULL\nMariaDB> SELECT NULLIF(1,2);\n -> 1\n','https://mariadb.com/kb/en/nullif/'),(51,'CLOSE',23,'Syntax:\nCLOSE cursor_name\n\nThis statement closes a previously opened cursor. For an example, see\nhttps://mariadb.com/kb/en/cursor-overview/.\n\nAn error occurs if the cursor is not open.\n\nIf not closed explicitly, a cursor is closed at the end of the BEGIN\n... END block in which it was declared.\n\nURL: https://mariadb.com/kb/en/close/\n\n','','https://mariadb.com/kb/en/close/'),(52,'STOP SLAVE',8,'Syntax:\nSTOP SLAVE [thread_types]\n\nthread_types:\n [thread_type [, thread_type] ... ]\n\nthread_type: IO_THREAD | SQL_THREAD\n\nStops the slave threads. STOP SLAVE requires the SUPER privilege.\nRecommended best practice is to execute STOP SLAVE on the slave before\nstopping the slave server (see\nhttp://dev.mysql.com/doc/refman/5.5/en/server-shutdown.html, for more\ninformation).\n\nWhen using the row-based logging format: You should execute STOP SLAVE\non the slave prior to shutting down the slave server if you are\nreplicating any tables that use a nontransactional storage engine (see\nthe Note later in this section). In MySQL 5.5.9 and later, you can also\nuse STOP SLAVE SQL_THREAD for this purpose.\n\nLike START SLAVE, this statement may be used with the IO_THREAD and\nSQL_THREAD options to name the thread or threads to be stopped.\n\n*Note*: In MySQL 5.5, STOP SLAVE waits until the current replication\nevent group affecting one or more non-transactional tables has finished\nexecuting (if there is any such replication group), or until the user\nissues a KILL QUERY or KILL CONNECTION statement. (Bug #319, Bug\n#38205)\n\nURL: https://mariadb.com/kb/en/stop-slave/\n\n','','https://mariadb.com/kb/en/stop-slave/'),(53,'TIMEDIFF',31,'Syntax:\nTIMEDIFF(expr1,expr2)\n\nTIMEDIFF() returns expr1 - expr2 expressed as a time value. expr1 and\nexpr2 are time or date-and-time expressions, but both must be of the\nsame type.\n\nThe result returned by TIMEDIFF() is limited to the range allowed for\nTIME values. Alternatively, you can use either of the functions\nTIMESTAMPDIFF() and UNIX_TIMESTAMP(), both of which return integers.\n\nURL: https://mariadb.com/kb/en/timediff/\n\n','MariaDB> SELECT TIMEDIFF(\'2000:01:01 00:00:00\',\n -> \'2000:01:01 00:00:00.000001\');\n -> \'-00:00:00.000001\'\nMariaDB> SELECT TIMEDIFF(\'2008-12-31 23:59:59.000001\',\n -> \'2008-12-30 01:01:01.000002\');\n -> \'46:58:57.999999\'\n','https://mariadb.com/kb/en/timediff/'),(54,'REPLACE FUNCTION',37,'Syntax:\nREPLACE(str,from_str,to_str)\n\nReturns the string str with all occurrences of the string from_str\nreplaced by the string to_str. REPLACE() performs a case-sensitive\nmatch when searching for from_str.\n\nURL: https://mariadb.com/kb/en/replace-function/\n\n','MariaDB> SELECT REPLACE(\'www.mariadb.org\', \'w\', \'Ww\');\n -> \'WwWwWw.mariadb.org\'\n','https://mariadb.com/kb/en/replace-function/'),(55,'USE',28,'Syntax:\nUSE db_name\n\nThe USE db_name statement tells MySQL to use the db_name database as\nthe default (current) database for subsequent statements. The database\nremains the default until the end of the session or another USE\nstatement is issued:\n\nUSE db1;\nSELECT COUNT(*) FROM mytable; # selects from db1.mytable\nUSE db2;\nSELECT COUNT(*) FROM mytable; # selects from db2.mytable\n\nURL: https://mariadb.com/kb/en/use/\n\n','','https://mariadb.com/kb/en/use/'),(56,'LINEFROMTEXT',3,'LineFromText(wkt[,srid]), LineStringFromText(wkt[,srid])\n\nConstructs a LINESTRING value using its WKT representation and SRID.\n\nURL: https://mariadb.com/kb/en/linefromtext/\n\n','','https://mariadb.com/kb/en/linefromtext/'),(57,'CASE OPERATOR',7,'Syntax:\nCASE value WHEN [compare_value] THEN result [WHEN [compare_value] THEN\nresult ...] [ELSE result] END\n\nCASE WHEN [condition] THEN result [WHEN [condition] THEN result ...]\n[ELSE result] END\n\nThe first version returns the result where value=compare_value. The\nsecond version returns the result for the first condition that is true.\nIf there was no matching result value, the result after ELSE is\nreturned, or NULL if there is no ELSE part.\n\nURL: https://mariadb.com/kb/en/case-operator/\n\n','MariaDB> SELECT CASE 1 WHEN 1 THEN \'one\'\n -> WHEN 2 THEN \'two\' ELSE \'more\' END;\n -> \'one\'\nMariaDB> SELECT CASE WHEN 1>0 THEN \'true\' ELSE \'false\' END;\n -> \'true\'\nMariaDB> SELECT CASE BINARY \'B\'\n -> WHEN \'a\' THEN 1 WHEN \'b\' THEN 2 END;\n -> NULL\n','https://mariadb.com/kb/en/case-operator/'),(58,'SHOW MASTER STATUS',26,'Syntax:\nSHOW MASTER STATUS\n\nThis statement provides status information about the binary log files\nof the master. It requires either the SUPER or REPLICATION CLIENT\nprivilege.\n\nExample:\n\nMariaDB> SHOW MASTER STATUS;\n+---------------+----------+--------------+------------------+\n| File | Position | Binlog_Do_DB | Binlog_Ignore_DB |\n+---------------+----------+--------------+------------------+\n| mysql-bin.003 | 73 | test | manual,mysql |\n+---------------+----------+--------------+------------------+\n\nURL: https://mariadb.com/kb/en/show-master-status/\n\n','','https://mariadb.com/kb/en/show-master-status/'),(59,'ADDTIME',31,'Syntax:\nADDTIME(expr1,expr2)\n\nADDTIME() adds expr2 to expr1 and returns the result. expr1 is a time\nor datetime expression, and expr2 is a time expression.\n\nURL: https://mariadb.com/kb/en/addtime/\n\n','MariaDB> SELECT ADDTIME(\'2007-12-31 23:59:59.999999\', \'1 1:1:1.000002\');\n -> \'2008-01-02 01:01:01.000001\'\nMariaDB> SELECT ADDTIME(\'01:00:00.999999\', \'02:00:00.999998\');\n -> \'03:00:01.999997\'\n','https://mariadb.com/kb/en/addtime/'),(60,'SPATIAL',34,'For MyISAM tables, MySQL can create spatial indexes using syntax\nsimilar to that for creating regular indexes, but extended with the\nSPATIAL keyword. Currently, columns in spatial indexes must be declared\nNOT NULL. The following examples demonstrate how to create spatial\nindexes:\n\no With CREATE TABLE:\n\nCREATE TABLE geom (g GEOMETRY NOT NULL, SPATIAL INDEX(g)) ENGINE=MyISAM;\n\no With ALTER TABLE:\n\nALTER TABLE geom ADD SPATIAL INDEX(g);\n\no With CREATE INDEX:\n\nCREATE SPATIAL INDEX sp_index ON geom (g);\n\nFor MyISAM tables, SPATIAL INDEX creates an R-tree index. For storage\nengines that support nonspatial indexing of spatial columns, the engine\ncreates a B-tree index. A B-tree index on spatial values will be useful\nfor exact-value lookups, but not for range scans.\n\nFor more information on indexing spatial columns, see [HELP CREATE\nINDEX].\n\nTo drop spatial indexes, use ALTER TABLE or DROP INDEX:\n\no With ALTER TABLE:\n\nALTER TABLE geom DROP INDEX g;\n\no With DROP INDEX:\n\nDROP INDEX sp_index ON geom;\n\nExample: Suppose that a table geom contains more than 32,000\ngeometries, which are stored in the column g of type GEOMETRY. The\ntable also has an AUTO_INCREMENT column fid for storing object ID\nvalues.\n\nURL: https://mariadb.com/kb/en/spatial/\n\n','','https://mariadb.com/kb/en/spatial/'),(61,'TO_SECONDS',31,'Syntax:\nTO_SECONDS(expr)\n\nGiven a date or datetime expr, returns a the number of seconds since\nthe year 0. If expr is not a valid date or datetime value, returns\nNULL.\n\nURL: https://mariadb.com/kb/en/to_seconds/\n\n','MariaDB> SELECT TO_SECONDS(950501);\n -> 62966505600\nMariaDB> SELECT TO_SECONDS(\'2009-11-29\');\n -> 63426672000\nMariaDB> SELECT TO_SECONDS(\'2009-11-29 13:43:32\');\n -> 63426721412\nMariaDB> SELECT TO_SECONDS( NOW() );\n -> 63426721458\n','https://mariadb.com/kb/en/to_seconds/'),(62,'TIMESTAMPDIFF',31,'Syntax:\nTIMESTAMPDIFF(unit,datetime_expr1,datetime_expr2)\n\nReturns datetime_expr2 - datetime_expr1, where datetime_expr1 and\ndatetime_expr2 are date or datetime expressions. One expression may be\na date and the other a datetime; a date value is treated as a datetime\nhaving the time part \'00:00:00\' where necessary. The unit for the\nresult (an integer) is given by the unit argument. The legal values for\nunit are the same as those listed in the description of the\nTIMESTAMPADD() function.\n\nURL: https://mariadb.com/kb/en/timestampdiff/\n\n','MariaDB> SELECT TIMESTAMPDIFF(MONTH,\'2003-02-01\',\'2003-05-01\');\n -> 3\nMariaDB> SELECT TIMESTAMPDIFF(YEAR,\'2002-05-01\',\'2001-01-01\');\n -> -1\nMariaDB> SELECT TIMESTAMPDIFF(MINUTE,\'2003-02-01\',\'2003-05-01 12:05:55\');\n -> 128885\n','https://mariadb.com/kb/en/timestampdiff/'),(63,'UPPER',37,'Syntax:\nUPPER(str)\n\nReturns the string str with all characters changed to uppercase\naccording to the current character set mapping. The default is latin1\n(cp1252 West European).\n\nMariaDB> SELECT UPPER(\'Hej\');\n -> \'HEJ\'\n\nSee the description of LOWER() for information that also applies to\nUPPER(), such as information about how to perform lettercase conversion\nof binary strings (BINARY, VARBINARY, BLOB) for which these functions\nare ineffective.\n\nURL: https://mariadb.com/kb/en/upper/\n\n','','https://mariadb.com/kb/en/upper/'),(64,'FROM_UNIXTIME',31,'Syntax:\nFROM_UNIXTIME(unix_timestamp), FROM_UNIXTIME(unix_timestamp,format)\n\nReturns a representation of the unix_timestamp argument as a value in\n\'YYYY-MM-DD HH:MM:SS\' or YYYYMMDDHHMMSS.uuuuuu format, depending on\nwhether the function is used in a string or numeric context. The value\nis expressed in the current time zone. unix_timestamp is an internal\ntimestamp value such as is produced by the UNIX_TIMESTAMP() function.\n\nIf format is given, the result is formatted according to the format\nstring, which is used the same way as listed in the entry for the\nDATE_FORMAT() function.\n\nURL: https://mariadb.com/kb/en/from_unixtime/\n\n','MariaDB> SELECT FROM_UNIXTIME(1196440219);\n -> \'2007-11-30 10:30:19\'\nMariaDB> SELECT FROM_UNIXTIME(1196440219) + 0;\n -> 20071130103019.000000\nMariaDB> SELECT FROM_UNIXTIME(UNIX_TIMESTAMP(),\n -> \'%Y %D %M %h:%i:%s %x\');\n -> \'2007 30th November 10:30:59 2007\'\n','https://mariadb.com/kb/en/from_unixtime/'),(65,'MEDIUMBLOB',22,'MEDIUMBLOB\n\nA BLOB column with a maximum length of 16,777,215 (224 - 1) bytes. Each\nMEDIUMBLOB value is stored using a 3-byte length prefix that indicates\nthe number of bytes in the value.\n\nURL: https://mariadb.com/kb/en/mediumblob/\n\n','','https://mariadb.com/kb/en/mediumblob/'),(66,'SHA2',12,'Syntax:\nSHA2(str, hash_length)\n\nCalculates the SHA-2 family of hash functions (SHA-224, SHA-256,\nSHA-384, and SHA-512). The first argument is the cleartext string to be\nhashed. The second argument indicates the desired bit length of the\nresult, which must have a value of 224, 256, 384, 512, or 0 (which is\nequivalent to 256). If either argument is NULL or the hash length is\nnot one of the permitted values, the return value is NULL. Otherwise,\nthe function result is a hash value containing the desired number of\nbits. See the notes at the beginning of this section about storing hash\nvalues efficiently.\n\nAs of MySQL 5.5.6, the return value is a nonbinary string in the\nconnection character set. Before 5.5.6, the return value is a binary\nstring; see the notes at the beginning of this section about using the\nvalue as a nonbinary string.\n\nURL: https://mariadb.com/kb/en/sha2/\n\n','MariaDB> SELECT SHA2(\'abc\', 224);\n -> \'23097d223405d8228642a477bda255b32aadbce4bda0b3f7e36c9da7\'\n','https://mariadb.com/kb/en/sha2/'),(67,'IFNULL',7,'Syntax:\nIFNULL(expr1,expr2)\n\nIf expr1 is not NULL, IFNULL() returns expr1; otherwise it returns\nexpr2. IFNULL() returns a numeric or string value, depending on the\ncontext in which it is used.\n\nURL: https://mariadb.com/kb/en/ifnull/\n\n','MariaDB> SELECT IFNULL(1,0);\n -> 1\nMariaDB> SELECT IFNULL(NULL,10);\n -> 10\nMariaDB> SELECT IFNULL(1/0,10);\n -> 10\nMariaDB> SELECT IFNULL(1/0,\'yes\');\n -> \'yes\'\n','https://mariadb.com/kb/en/ifnull/'),(68,'SHOW FUNCTION CODE',26,'Syntax:\nSHOW FUNCTION CODE func_name\n\nThis statement is similar to SHOW PROCEDURE CODE but for stored\nfunctions. See [HELP SHOW PROCEDURE CODE].\n\nURL: https://mariadb.com/kb/en/show-function-code/\n\n','','https://mariadb.com/kb/en/show-function-code/'),(69,'SHOW ERRORS',26,'Syntax:\nSHOW ERRORS [LIMIT [offset,] row_count]\nSHOW COUNT(*) ERRORS\n\nThis statement is similar to SHOW WARNINGS, except that it displays\ninformation only for errors, rather than for errors, warnings, and\nnotes.\n\nThe LIMIT clause has the same syntax as for the SELECT statement. See\nhttps://mariadb.com/kb/en/select/.\n\nThe SHOW COUNT(*) ERRORS statement displays the number of errors. You\ncan also retrieve this number from the error_count variable:\n\nSHOW COUNT(*) ERRORS;\nSELECT @@error_count;\n\nSHOW ERRORS and error_count apply only to errors, not warnings or\nnotes. In other respects, they are similar to SHOW WARNINGS and\nwarning_count. In particular, SHOW ERRORS cannot display information\nfor more than max_error_count messages, and error_count can exceed the\nvalue of max_error_count if the number of errors exceeds\nmax_error_count.\n\nURL: https://mariadb.com/kb/en/show-errors/\n\n','','https://mariadb.com/kb/en/show-errors/'),(70,'LEAST',18,'Syntax:\nLEAST(value1,value2,...)\n\nWith two or more arguments, returns the smallest (minimum-valued)\nargument. The arguments are compared using the following rules:\n\no If any argument is NULL, the result is NULL. No comparison is needed.\n\no If the return value is used in an INTEGER context or all arguments\n are integer-valued, they are compared as integers.\n\no If the return value is used in a REAL context or all arguments are\n real-valued, they are compared as reals.\n\no If the arguments comprise a mix of numbers and strings, they are\n compared as numbers.\n\no If any argument is a nonbinary (character) string, the arguments are\n compared as nonbinary strings.\n\no In all other cases, the arguments are compared as binary strings.\n\nURL: https://mariadb.com/kb/en/least/\n\n','MariaDB> SELECT LEAST(2,0);\n -> 0\nMariaDB> SELECT LEAST(34.0,3.0,5.0,767.0);\n -> 3.0\nMariaDB> SELECT LEAST(\'B\',\'A\',\'C\');\n -> \'A\'\n','https://mariadb.com/kb/en/least/'),(71,'=',18,'=\n\nEqual:\n\nURL: https://mariadb.com/kb/en/equal/\n\n','MariaDB> SELECT 1 = 0;\n -> 0\nMariaDB> SELECT \'0\' = 0;\n -> 1\nMariaDB> SELECT \'0.0\' = 0;\n -> 1\nMariaDB> SELECT \'0.01\' = 0;\n -> 0\nMariaDB> SELECT \'.01\' = 0.01;\n -> 1\n','https://mariadb.com/kb/en/equal/'),(72,'REVERSE',37,'Syntax:\nREVERSE(str)\n\nReturns the string str with the order of the characters reversed.\n\nURL: https://mariadb.com/kb/en/reverse/\n\n','MariaDB> SELECT REVERSE(\'abc\');\n -> \'cba\'\n','https://mariadb.com/kb/en/reverse/'),(73,'ISNULL',18,'Syntax:\nISNULL(expr)\n\nIf expr is NULL, ISNULL() returns 1, otherwise it returns 0.\n\nURL: https://mariadb.com/kb/en/isnull/\n\n','MariaDB> SELECT ISNULL(1+1);\n -> 0\nMariaDB> SELECT ISNULL(1/0);\n -> 1\n','https://mariadb.com/kb/en/isnull/'),(74,'BINARY',22,'BINARY(M)\n\nThe BINARY type is similar to the CHAR type, but stores binary byte\nstrings rather than nonbinary character strings. M represents the\ncolumn length in bytes.\n\nURL: https://mariadb.com/kb/en/binary/\n\n','','https://mariadb.com/kb/en/binary/'),(75,'BLOB DATA TYPE',22,'A BLOB is a binary large object that can hold a variable amount of\ndata. The four BLOB types are TINYBLOB, BLOB, MEDIUMBLOB, and LONGBLOB.\nThese differ only in the maximum length of the values they can hold.\nThe four TEXT types are TINYTEXT, TEXT, MEDIUMTEXT, and LONGTEXT. These\ncorrespond to the four BLOB types and have the same maximum lengths and\nstorage requirements. See\nhttps://mariadb.com/kb/en/data-type-storage-requirements/.\n\nURL: https://mariadb.com/kb/en/sql_language-data_types-blob/\n\n','','https://mariadb.com/kb/en/sql_language-data_types-blob/'),(76,'BOUNDARY',36,'Boundary(g)\n\nReturns a geometry that is the closure of the combinatorial boundary of\nthe geometry value g.\n\nURL: https://mariadb.com/kb/en/boundary/\n\n','','https://mariadb.com/kb/en/boundary/'),(77,'CREATE USER',10,'Syntax:\nCREATE USER user_specification\n [, user_specification] ...\n\nuser_specification:\n user\n [\n IDENTIFIED BY [PASSWORD] \'password\'\n | IDENTIFIED WITH auth_plugin [AS \'auth_string\']\n ]\n\nThe CREATE USER statement creates new MySQL accounts. To use it, you\nmust have the global CREATE USER privilege or the INSERT privilege for\nthe mysql database. For each account, CREATE USER creates a new row in\nthe mysql.user table and assigns the account no privileges. An error\noccurs if the account already exists.\n\nEach account name uses the format described in\nhttps://mariadb.com/kb/en/create-user#account-names. For example:\n\nCREATE USER \'jeffrey\'@\'localhost\' IDENTIFIED BY \'mypass\';\n\nIf you specify only the user name part of the account name, a host name\npart of \'%\' is used.\n\nThe user specification may indicate how the user should authenticate\nwhen connecting to the server:\n\no To enable the user to connect with no password (which is insecure),\n include no IDENTIFIED BY clause:\n\nCREATE USER \'jeffrey\'@\'localhost\';\n\n In this case, the account uses built-in authentication and clients\n must provide no password.\n\no To assign a password, use IDENTIFIED BY with the literal plaintext\n password value:\n\nCREATE USER \'jeffrey\'@\'localhost\' IDENTIFIED BY \'mypass\';\n\n The account uses built-in authentication and clients must match the\n given password.\n\no To avoid specifying the plaintext password if you know its hash value\n (the value that PASSWORD() would return for the password), specify\n the hash value preceded by the keyword PASSWORD:\n\nCREATE USER \'jeffrey\'@\'localhost\'\nIDENTIFIED BY PASSWORD \'*90E462C37378CED12064BB3388827D2BA3A9B689\';\n\n The account uses built-in authentication and clients must match the\n given password.\n\no To authenticate the account using a specific authentication plugin,\n use IDENTIFIED WITH, where auth_plugin is the plugin name. It can be\n an unquoted name or a quoted string literal. \'auth_string\' is an\n optional quoted string literal to pass to the plugin. The plugin\n interprets the meaning of the string, so its format is plugin\n specific. Consult the documentation for a given plugin for\n information about the authentication string values it accepts.\n\nCREATE USER \'jeffrey\'@\'localhost\'\nIDENTIFIED WITH my_auth_plugin;\n\n For connections that use this account, the server invokes the named\n plugin and clients must provide credentials as required for the\n authentication method that the plugin implements. If the server\n cannot find the plugin, either at account-creation time or connect\n time, an error occurs. IDENTIFIED WITH can be used as of MySQL 5.5.7.\n\nThe IDENTIFIED BY and IDENTIFIED WITH clauses are mutually exclusive,\nso at most one of them can be specified for a given user.\n\nFor additional information about setting passwords, see\nhttps://mariadb.com/kb/en/create-user/.\n\nURL: https://mariadb.com/kb/en/create-user/\n\n','','https://mariadb.com/kb/en/create-user/'),(78,'POINT',24,'Point(x,y)\n\nConstructs a Point using its coordinates.\n\nURL: https://mariadb.com/kb/en/point/\n\n','','https://mariadb.com/kb/en/point/'),(79,'CURRENT_USER',17,'Syntax:\nCURRENT_USER, CURRENT_USER()\n\nReturns the user name and host name combination for the MySQL account\nthat the server used to authenticate the current client. This account\ndetermines your access privileges. The return value is a string in the\nutf8 character set.\n\nThe value of CURRENT_USER() can differ from the value of USER().\n\nURL: https://mariadb.com/kb/en/current_user/\n\n','MariaDB> SELECT USER();\n -> \'davida@localhost\'\nMariaDB> SELECT * FROM mysql.user;\nERROR 1044: Access denied for user \'\'@\'localhost\' to\ndatabase \'mysql\'\nMariaDB> SELECT CURRENT_USER();\n -> \'@localhost\'\n','https://mariadb.com/kb/en/current_user/'),(80,'LCASE',37,'Syntax:\nLCASE(str)\n\nLCASE() is a synonym for LOWER().\n\nURL: https://mariadb.com/kb/en/lcase/\n\n','','https://mariadb.com/kb/en/lcase/'),(81,'<=',18,'Syntax:\n<=\n\nLess than or equal:\n\nURL: https://mariadb.com/kb/en/less-than-or-equal/\n\n','MariaDB> SELECT 0.1 <= 2;\n -> 1\n','https://mariadb.com/kb/en/less-than-or-equal/'),(82,'SHOW PROFILES',26,'Syntax:\nSHOW PROFILES\n\nThe SHOW PROFILES statement, together with SHOW PROFILE, displays\nprofiling information that indicates resource usage for statements\nexecuted during the course of the current session. For more\ninformation, see [HELP SHOW PROFILE].\n\nURL: https://mariadb.com/kb/en/show-profiles/\n\n','','https://mariadb.com/kb/en/show-profiles/'),(83,'UPDATE',27,'Syntax:\nSingle-table syntax:\n\nUPDATE [LOW_PRIORITY] [IGNORE] table_reference\n SET col_name1={expr1|DEFAULT} [, col_name2={expr2|DEFAULT}] ...\n [WHERE where_condition]\n [ORDER BY ...]\n [LIMIT row_count]\n\nMultiple-table syntax:\n\nUPDATE [LOW_PRIORITY] [IGNORE] table_references\n SET col_name1={expr1|DEFAULT} [, col_name2={expr2|DEFAULT}] ...\n [WHERE where_condition]\n\nFor the single-table syntax, the UPDATE statement updates columns of\nexisting rows in the named table with new values. The SET clause\nindicates which columns to modify and the values they should be given.\nEach value can be given as an expression, or the keyword DEFAULT to set\na column explicitly to its default value. The WHERE clause, if given,\nspecifies the conditions that identify which rows to update. With no\nWHERE clause, all rows are updated. If the ORDER BY clause is\nspecified, the rows are updated in the order that is specified. The\nLIMIT clause places a limit on the number of rows that can be updated.\n\nFor the multiple-table syntax, UPDATE updates rows in each table named\nin table_references that satisfy the conditions. In this case, ORDER BY\nand LIMIT cannot be used.\n\nwhere_condition is an expression that evaluates to true for each row to\nbe updated. For expression syntax, see\nhttp://dev.mysql.com/doc/refman/5.5/en/expressions.html.\n\ntable_references and where_condition are is specified as described in\nhttps://mariadb.com/kb/en/select/.\n\nYou need the UPDATE privilege only for columns referenced in an UPDATE\nthat are actually updated. You need only the SELECT privilege for any\ncolumns that are read but not modified.\n\nThe UPDATE statement supports the following modifiers:\n\no With the LOW_PRIORITY keyword, execution of the UPDATE is delayed\n until no other clients are reading from the table. This affects only\n storage engines that use only table-level locking (such as MyISAM,\n MEMORY, and MERGE).\n\no With the IGNORE keyword, the update statement does not abort even if\n errors occur during the update. Rows for which duplicate-key\n conflicts occur are not updated. Rows for which columns are updated\n to values that would cause data conversion errors are updated to the\n closest valid values instead.\n\nURL: https://mariadb.com/kb/en/update/\n\n','','https://mariadb.com/kb/en/update/'),(84,'IS NOT NULL',18,'Syntax:\nIS NOT NULL\n\nTests whether a value is not NULL.\n\nURL: https://mariadb.com/kb/en/is-not-null/\n\n','MariaDB> SELECT 1 IS NOT NULL, 0 IS NOT NULL, NULL IS NOT NULL;\n -> 1, 1, 0\n','https://mariadb.com/kb/en/is-not-null/'),(85,'CASE STATEMENT',23,'Syntax:\nCASE case_value\n WHEN when_value THEN statement_list\n [WHEN when_value THEN statement_list] ...\n [ELSE statement_list]\nEND CASE\n\nOr:\n\nCASE\n WHEN search_condition THEN statement_list\n [WHEN search_condition THEN statement_list] ...\n [ELSE statement_list]\nEND CASE\n\nThe CASE statement for stored programs implements a complex conditional\nconstruct.\n\n*Note*: There is also a CASE expression, which differs from the CASE\nstatement described here. See\nhttps://mariadb.com/kb/en/case-operator/. The\nCASE statement cannot have an ELSE NULL clause, and it is terminated\nwith END CASE instead of END.\n\nFor the first syntax, case_value is an expression. This value is\ncompared to the when_value expression in each WHEN clause until one of\nthem is equal. When an equal when_value is found, the corresponding\nTHEN clause statement_list executes. If no when_value is equal, the\nELSE clause statement_list executes, if there is one.\n\nThis syntax cannot be used to test for equality with NULL because NULL\n= NULL is false. See\nhttps://mariadb.com/kb/en/null-values/.\n\nFor the second syntax, each WHEN clause search_condition expression is\nevaluated until one is true, at which point its corresponding THEN\nclause statement_list executes. If no search_condition is equal, the\nELSE clause statement_list executes, if there is one.\n\nIf no when_value or search_condition matches the value tested and the\nCASE statement contains no ELSE clause, a Case not found for CASE\nstatement error results.\n\nEach statement_list consists of one or more SQL statements; an empty\nstatement_list is not permitted.\n\nTo handle situations where no value is matched by any WHEN clause, use\nan ELSE containing an empty BEGIN ... END block, as shown in this\nexample. (The indentation used here in the ELSE clause is for purposes\nof clarity only, and is not otherwise significant.)\n\nDELIMITER |\n\nCREATE PROCEDURE p()\n BEGIN\n DECLARE v INT DEFAULT 1;\n\n CASE v\n WHEN 2 THEN SELECT v;\n WHEN 3 THEN SELECT 0;\n ELSE\n BEGIN\n END;\n END CASE;\n END;\n |\n\nURL: https://mariadb.com/kb/en/case-statement/\n\n','','https://mariadb.com/kb/en/case-statement/'),(86,'EXECUTE STATEMENT',8,'Syntax:\nEXECUTE stmt_name\n [USING @var_name [, @var_name] ...]\n\nAfter preparing a statement with PREPARE, you execute it with an\nEXECUTE statement that refers to the prepared statement name. If the\nprepared statement contains any parameter markers, you must supply a\nUSING clause that lists user variables containing the values to be\nbound to the parameters. Parameter values can be supplied only by user\nvariables, and the USING clause must name exactly as many variables as\nthe number of parameter markers in the statement.\n\nYou can execute a given prepared statement multiple times, passing\ndifferent variables to it or setting the variables to different values\nbefore each execution.\n\nURL: https://mariadb.com/kb/en/execute-statement/\n\n','','https://mariadb.com/kb/en/execute-statement/'),(87,'DROP INDEX',39,'Syntax:\nDROP [ONLINE|OFFLINE] INDEX index_name ON tbl_name\n\nDROP INDEX drops the index named index_name from the table tbl_name.\nThis statement is mapped to an ALTER TABLE statement to drop the index.\nSee [HELP ALTER TABLE].\n\nTo drop a primary key, the index name is always PRIMARY, which must be\nspecified as a quoted identifier because PRIMARY is a reserved word:\n\nDROP INDEX `PRIMARY` ON t;\n\nURL: https://mariadb.com/kb/en/drop-index/\n\n','','https://mariadb.com/kb/en/drop-index/'),(88,'MATCH AGAINST',37,'Syntax:\nMATCH (col1,col2,...) AGAINST (expr [search_modifier])\n\nMySQL has support for full-text indexing and searching:\n\no A full-text index in MySQL is an index of type FULLTEXT.\n\no Full-text indexes can be used only with MyISAM tables, and can be\n created only for CHAR, VARCHAR, or TEXT columns.\n\no A FULLTEXT index definition can be given in the CREATE TABLE\n statement when a table is created, or added later using ALTER TABLE\n or CREATE INDEX.\n\no For large data sets, it is much faster to load your data into a table\n that has no FULLTEXT index and then create the index after that, than\n to load data into a table that has an existing FULLTEXT index.\n\nFull-text searching is performed using MATCH() ... AGAINST syntax.\nMATCH() takes a comma-separated list that names the columns to be\nsearched. AGAINST takes a string to search for, and an optional\nmodifier that indicates what type of search to perform. The search\nstring must be a literal string, not a variable or a column name. There\nare three types of full-text searches:\n\no A natural language search interprets the search string as a phrase in\n natural human language (a phrase in free text). There are no special\n operators. The stopword list applies. In addition, words that are\n present in 50% or more of the rows are considered common and do not\n match.\n\n Full-text searches are natural language searches if the IN NATURAL\n LANGUAGE MODE modifier is given or if no modifier is given. For more\n information, see\n https://mariadb.com/kb/en/fulltext-index-overview#in-natural-language-mode\n .\n\no A boolean search interprets the search string using the rules of a\n special query language. The string contains the words to search for.\n It can also contain operators that specify requirements such that a\n word must be present or absent in matching rows, or that it should be\n weighted higher or lower than usual. Common words such as \"some\" or\n \"then\" are stopwords and do not match if present in the search\n string. The IN BOOLEAN MODE modifier specifies a boolean search. For\n more information, see\n https://mariadb.com/kb/en/fulltext-index-overview#in-boolean-mode.\n\no A query expansion search is a modification of a natural language\n search. The search string is used to perform a natural language\n search. Then words from the most relevant rows returned by the search\n are added to the search string and the search is done again. The\n query returns the rows from the second search. The IN NATURAL\n LANGUAGE MODE WITH QUERY EXPANSION or WITH QUERY EXPANSION modifier\n specifies a query expansion search. For more information, see\n https://mariadb.com/kb/en/fulltext-index-overview#with-query-expansion.\n\nURL: https://mariadb.com/kb/en/match-against/\n\n','MariaDB> SELECT id, body, MATCH (title,body) AGAINST\n -> (\'Security implications of running MySQL as root\'\n -> IN NATURAL LANGUAGE MODE) AS score\n -> FROM articles WHERE MATCH (title,body) AGAINST\n -> (\'Security implications of running MySQL as root\'\n -> IN NATURAL LANGUAGE MODE);\n+----+-------------------------------------+-----------------+\n| id | body | score |\n+----+-------------------------------------+-----------------+\n| 4 | 1. Never run mysqld as root. 2. ... | 1.5219271183014 |\n| 6 | When configured properly, MySQL ... | 1.3114095926285 |\n+----+-------------------------------------+-----------------+\n2 rows in set (0.00 sec)\n','https://mariadb.com/kb/en/match-against/'),(89,'CREATE EVENT',39,'Syntax:\nCREATE\n [DEFINER = { user | CURRENT_USER }]\n EVENT\n [IF NOT EXISTS]\n event_name\n ON SCHEDULE schedule\n [ON COMPLETION [NOT] PRESERVE]\n [ENABLE | DISABLE | DISABLE ON SLAVE]\n [COMMENT \'comment\']\n DO event_body;\n\nschedule:\n AT timestamp [+ INTERVAL interval] ...\n | EVERY interval\n [STARTS timestamp [+ INTERVAL interval] ...]\n [ENDS timestamp [+ INTERVAL interval] ...]\n\ninterval:\n quantity {YEAR | QUARTER | MONTH | DAY | HOUR | MINUTE |\n WEEK | SECOND | YEAR_MONTH | DAY_HOUR | DAY_MINUTE |\n DAY_SECOND | HOUR_MINUTE | HOUR_SECOND | MINUTE_SECOND}\n\nThis statement creates and schedules a new event. The event will not\nrun unless the Event Scheduler is enabled. For information about\nchecking Event Scheduler status and enabling it if necessary, see\nhttps://mariadb.com/kb/en/events/.\n\nCREATE EVENT requires the EVENT privilege for the schema in which the\nevent is to be created. It might also require the SUPER privilege,\ndepending on the DEFINER value, as described later in this section.\n\nThe minimum requirements for a valid CREATE EVENT statement are as\nfollows:\n\no The keywords CREATE EVENT plus an event name, which uniquely\n identifies the event in a database schema.\n\no An ON SCHEDULE clause, which determines when and how often the event\n executes.\n\no A DO clause, which contains the SQL statement to be executed by an\n event.\n\nThis is an example of a minimal CREATE EVENT statement:\n\nCREATE EVENT myevent\n ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR\n DO\n UPDATE myschema.mytable SET mycol = mycol + 1;\n\nThe previous statement creates an event named myevent. This event\nexecutes once---one hour following its creation---by running an SQL\nstatement that increments the value of the myschema.mytable table\'s\nmycol column by 1.\n\nThe event_name must be a valid MySQL identifier with a maximum length\nof 64 characters. Event names are not case sensitive, so you cannot\nhave two events named myevent and MyEvent in the same schema. In\ngeneral, the rules governing event names are the same as those for\nnames of stored routines. See\nhttps://mariadb.com/kb/en/identifier-names/.\n\nAn event is associated with a schema. If no schema is indicated as part\nof event_name, the default (current) schema is assumed. To create an\nevent in a specific schema, qualify the event name with a schema using\nschema_name.event_name syntax.\n\nURL: https://mariadb.com/kb/en/create-event/\n\n','','https://mariadb.com/kb/en/create-event/'),(90,'ABS',4,'Syntax:\nABS(X)\n\nReturns the absolute value of X.\n\nURL: https://mariadb.com/kb/en/abs/\n\n','MariaDB> SELECT ABS(2);\n -> 2\nMariaDB> SELECT ABS(-32);\n -> 32\n','https://mariadb.com/kb/en/abs/'),(91,'POLYFROMWKB',32,'PolyFromWKB(wkb[,srid]), PolygonFromWKB(wkb[,srid])\n\nConstructs a POLYGON value using its WKB representation and SRID.\n\nURL: https://mariadb.com/kb/en/polyfromwkb/\n\n','','https://mariadb.com/kb/en/polyfromwkb/'),(92,'NOT LIKE',37,'Syntax:\nexpr NOT LIKE pat [ESCAPE \'escape_char\']\n\nThis is the same as NOT (expr LIKE pat [ESCAPE \'escape_char\']).\n\nURL: https://mariadb.com/kb/en/not-like/\n\n','','https://mariadb.com/kb/en/not-like/'),(93,'SPACE',37,'Syntax:\nSPACE(N)\n\nReturns a string consisting of N space characters.\n\nURL: https://mariadb.com/kb/en/space/\n\n','MariaDB> SELECT SPACE(6);\n -> \' \'\n','https://mariadb.com/kb/en/space/'),(94,'MBR DEFINITION',6,'Its MBR (Minimum Bounding Rectangle), or Envelope. This is the bounding\ngeometry, formed by the minimum and maximum (X,Y) coordinates:\n\nURL: https://mariadb.com/kb/en/mbr-definition/\n\n','((MINX MINY, MAXX MINY, MAXX MAXY, MINX MAXY, MINX MINY))\n','https://mariadb.com/kb/en/mbr-definition/'),(95,'GEOMETRYCOLLECTION',24,'GeometryCollection(g1,g2,...)\n\nConstructs a GeometryCollection.\n\nURL: https://mariadb.com/kb/en/geometrycollection/\n\n','','https://mariadb.com/kb/en/geometrycollection/'),(96,'MAX',16,'Syntax:\nMAX([DISTINCT] expr)\n\nReturns the maximum value of expr. MAX() may take a string argument; in\nsuch cases, it returns the maximum string value. See\nhttps://mariadb.com/kb/en/max/. The DISTINCT\nkeyword can be used to find the maximum of the distinct values of expr,\nhowever, this produces the same result as omitting DISTINCT.\n\nMAX() returns NULL if there were no matching rows.\n\nURL: https://mariadb.com/kb/en/max/\n\n','MariaDB> SELECT student_name, MIN(test_score), MAX(test_score)\n -> FROM student\n -> GROUP BY student_name;\n','https://mariadb.com/kb/en/max/'),(97,'CREATE FUNCTION UDF',21,'Syntax:\nCREATE [AGGREGATE] FUNCTION function_name RETURNS {STRING|INTEGER|REAL|DECIMAL}\n SONAME shared_library_name\n\nA user-defined function (UDF) is a way to extend MySQL with a new\nfunction that works like a native (built-in) MySQL function such as\nABS() or CONCAT().\n\nfunction_name is the name that should be used in SQL statements to\ninvoke the function. The RETURNS clause indicates the type of the\nfunction\'s return value. DECIMAL is a legal value after RETURNS, but\ncurrently DECIMAL functions return string values and should be written\nlike STRING functions.\n\nshared_library_name is the basename of the shared object file that\ncontains the code that implements the function. The file must be\nlocated in the plugin directory. This directory is given by the value\nof the plugin_dir system variable. For more information, see\nhttp://dev.mysql.com/doc/refman/5.5/en/udf-compiling.html.\n\nTo create a function, you must have the INSERT privilege for the mysql\ndatabase. This is necessary because CREATE FUNCTION adds a row to the\nmysql.func system table that records the function\'s name, type, and\nshared library name. If you do not have this table, you should run the\nmysql_upgrade command to create it. See\nhttps://mariadb.com/kb/en/mysql_upgrade/.\n\nURL: https://mariadb.com/kb/en/create-function-udf/\n\n','','https://mariadb.com/kb/en/create-function-udf/'),(98,'*',4,'Syntax:\n*\n\nMultiplication:\n\nURL: https://mariadb.com/kb/en/multiplication-operator/\n\n','MariaDB> SELECT 3*5;\n -> 15\nMariaDB> SELECT 18014398509481984*18014398509481984.0;\n -> 324518553658426726783156020576256.0\nMariaDB> SELECT 18014398509481984*18014398509481984;\n -> 0\n','https://mariadb.com/kb/en/multiplication-operator/'),(99,'TIMESTAMP',22,'TIMESTAMP\n\nA timestamp. The range is \'1970-01-01 00:00:01\' UTC to \'2038-01-19\n03:14:07\' UTC. TIMESTAMP values are stored as the number of seconds\nsince the epoch (\'1970-01-01 00:00:00\' UTC). A TIMESTAMP cannot\nrepresent the value \'1970-01-01 00:00:00\' because that is equivalent to\n0 seconds from the epoch and the value 0 is reserved for representing\n\'0000-00-00 00:00:00\', the \"zero\" TIMESTAMP value.\n\nUnless specified otherwise, the first TIMESTAMP column in a table is\ndefined to be automatically set to the date and time of the most recent\nmodification if not explicitly assigned a value. This makes TIMESTAMP\nuseful for recording the timestamp of an INSERT or UPDATE operation.\nYou can also set any TIMESTAMP column to the current date and time by\nassigning it a NULL value, unless it has been defined with the NULL\nattribute to permit NULL values. The automatic initialization and\nupdating to the current date and time can be specified using DEFAULT\nCURRENT_TIMESTAMP and ON UPDATE CURRENT_TIMESTAMP clauses, as described\nin\nhttps://mariadb.com/kb/en/timestamp/.\n\n*Note*: The TIMESTAMP format that was used prior to MySQL 4.1 is not\nsupported in MySQL 5.5; see MySQL 3.23, 4.0, 4.1 Reference Manual for\ninformation regarding the old format.\n\nURL: https://mariadb.com/kb/en/timestamp/\n\n','','https://mariadb.com/kb/en/timestamp/'),(100,'DES_DECRYPT',12,'Syntax:\nDES_DECRYPT(crypt_str[,key_str])\n\nDecrypts a string encrypted with DES_ENCRYPT(). If an error occurs,\nthis function returns NULL.\n\nThis function works only if MySQL has been configured with SSL support.\nSee https://mariadb.com/kb/en/ssl-connections/.\n\nIf no key_str argument is given, DES_DECRYPT() examines the first byte\nof the encrypted string to determine the DES key number that was used\nto encrypt the original string, and then reads the key from the DES key\nfile to decrypt the message. For this to work, the user must have the\nSUPER privilege. The key file can be specified with the --des-key-file\nserver option.\n\nIf you pass this function a key_str argument, that string is used as\nthe key for decrypting the message.\n\nIf the crypt_str argument does not appear to be an encrypted string,\nMySQL returns the given crypt_str.\n\nURL: https://mariadb.com/kb/en/des_decrypt/\n\n','','https://mariadb.com/kb/en/des_decrypt/'),(101,'CACHE INDEX',26,'Syntax:\nCACHE INDEX\n tbl_index_list [, tbl_index_list] ...\n [PARTITION (partition_list | ALL)]\n IN key_cache_name\n\ntbl_index_list:\n tbl_name [[INDEX|KEY] (index_name[, index_name] ...)]\n\npartition_list:\n partition_name[, partition_name][, ...]\n\nThe CACHE INDEX statement assigns table indexes to a specific key\ncache. It is used only for MyISAM tables. After the indexes have been\nassigned, they can be preloaded into the cache if desired with LOAD\nINDEX INTO CACHE.\n\nThe following statement assigns indexes from the tables t1, t2, and t3\nto the key cache named hot_cache:\n\nMariaDB> CACHE INDEX t1, t2, t3 IN hot_cache;\n+---------+--------------------+----------+----------+\n| Table | Op | Msg_type | Msg_text |\n+---------+--------------------+----------+----------+\n| test.t1 | assign_to_keycache | status | OK |\n| test.t2 | assign_to_keycache | status | OK |\n| test.t3 | assign_to_keycache | status | OK |\n+---------+--------------------+----------+----------+\n\nURL: https://mariadb.com/kb/en/cache-index/\n\n','','https://mariadb.com/kb/en/cache-index/'),(102,'ENDPOINT',13,'EndPoint(ls)\n\nReturns the Point that is the endpoint of the LineString value ls.\n\nURL: https://mariadb.com/kb/en/endpoint/\n\n','MariaDB> SET @ls = \'LineString(1 1,2 2,3 3)\';\nMariaDB> SELECT AsText(EndPoint(GeomFromText(@ls)));\n+-------------------------------------+\n| AsText(EndPoint(GeomFromText(@ls))) |\n+-------------------------------------+\n| POINT(3 3) |\n+-------------------------------------+\n','https://mariadb.com/kb/en/endpoint/'),(103,'COMPRESS',12,'Syntax:\nCOMPRESS(string_to_compress)\n\nCompresses a string and returns the result as a binary string. This\nfunction requires MySQL to have been compiled with a compression\nlibrary such as zlib. Otherwise, the return value is always NULL. The\ncompressed string can be uncompressed with UNCOMPRESS().\n\nURL: https://mariadb.com/kb/en/compress/\n\n','MariaDB> SELECT LENGTH(COMPRESS(REPEAT(\'a\',1000)));\n -> 21\nMariaDB> SELECT LENGTH(COMPRESS(\'\'));\n -> 0\nMariaDB> SELECT LENGTH(COMPRESS(\'a\'));\n -> 13\nMariaDB> SELECT LENGTH(COMPRESS(REPEAT(\'a\',16)));\n -> 15\n','https://mariadb.com/kb/en/compress/'),(104,'INSERT',27,'Syntax:\nINSERT [LOW_PRIORITY | DELAYED | HIGH_PRIORITY] [IGNORE]\n [INTO] tbl_name [(col_name,...)]\n {VALUES | VALUE} ({expr | DEFAULT},...),(...),...\n [ ON DUPLICATE KEY UPDATE\n col_name=expr\n [, col_name=expr] ... ]\n\nOr:\n\nINSERT [LOW_PRIORITY | DELAYED | HIGH_PRIORITY] [IGNORE]\n [INTO] tbl_name\n SET col_name={expr | DEFAULT}, ...\n [ ON DUPLICATE KEY UPDATE\n col_name=expr\n [, col_name=expr] ... ]\n\nOr:\n\nINSERT [LOW_PRIORITY | HIGH_PRIORITY] [IGNORE]\n [INTO] tbl_name [(col_name,...)]\n SELECT ...\n [ ON DUPLICATE KEY UPDATE\n col_name=expr\n [, col_name=expr] ... ]\n\nINSERT inserts new rows into an existing table. The INSERT ... VALUES\nand INSERT ... SET forms of the statement insert rows based on\nexplicitly specified values. The INSERT ... SELECT form inserts rows\nselected from another table or tables. INSERT ... SELECT is discussed\nfurther in [HELP INSERT SELECT].\n\nURL: https://mariadb.com/kb/en/insert/\n\n','','https://mariadb.com/kb/en/insert/'),(105,'COUNT',16,'Syntax:\nCOUNT(expr)\n\nReturns a count of the number of non-NULL values of expr in the rows\nretrieved by a SELECT statement. The result is a BIGINT value.\n\nCOUNT() returns 0 if there were no matching rows.\n\nURL: https://mariadb.com/kb/en/count/\n\n','MariaDB> SELECT student.student_name,COUNT(*)\n -> FROM student,course\n -> WHERE student.student_id=course.student_id\n -> GROUP BY student_name;\n','https://mariadb.com/kb/en/count/'),(106,'HANDLER',27,'Syntax:\nHANDLER tbl_name OPEN [ [AS] alias]\n\nHANDLER tbl_name READ index_name { = | <= | >= | < | > } (value1,value2,...)\n [ WHERE where_condition ] [LIMIT ... ]\nHANDLER tbl_name READ index_name { FIRST | NEXT | PREV | LAST }\n [ WHERE where_condition ] [LIMIT ... ]\nHANDLER tbl_name READ { FIRST | NEXT }\n [ WHERE where_condition ] [LIMIT ... ]\n\nHANDLER tbl_name CLOSE\n\nThe HANDLER statement provides direct access to table storage engine\ninterfaces. It is available for MyISAM and InnoDB tables.\n\nURL: https://mariadb.com/kb/en/handler-commands/\n\n','','https://mariadb.com/kb/en/handler-commands/'),(107,'MLINEFROMTEXT',3,'MLineFromText(wkt[,srid]), MultiLineStringFromText(wkt[,srid])\n\nConstructs a MULTILINESTRING value using its WKT representation and\nSRID.\n\nURL: https://mariadb.com/kb/en/mlinefromtext/\n\n','','https://mariadb.com/kb/en/mlinefromtext/'),(108,'GEOMCOLLFROMWKB',32,'GeomCollFromWKB(wkb[,srid]), GeometryCollectionFromWKB(wkb[,srid])\n\nConstructs a GEOMETRYCOLLECTION value using its WKB representation and\nSRID.\n\nURL: https://mariadb.com/kb/en/geomcollfromwkb/\n\n','','https://mariadb.com/kb/en/geomcollfromwkb/'),(109,'HELP_DATE',9,'This help information was generated from the MySQL 5.5 Reference Manual\non: 2012-08-25\n','',''),(110,'RENAME TABLE',39,'Syntax:\nRENAME TABLE tbl_name TO new_tbl_name\n [, tbl_name2 TO new_tbl_name2] ...\n\nThis statement renames one or more tables.\n\nThe rename operation is done atomically, which means that no other\nsession can access any of the tables while the rename is running. For\nexample, if you have an existing table old_table, you can create\nanother table new_table that has the same structure but is empty, and\nthen replace the existing table with the empty one as follows (assuming\nthat backup_table does not already exist):\n\nURL: https://mariadb.com/kb/en/rename-table/\n\n','CREATE TABLE new_table (...);\nRENAME TABLE old_table TO backup_table, new_table TO old_table;\n','https://mariadb.com/kb/en/rename-table/'),(111,'BOOLEAN',22,'BOOL, BOOLEAN\n\nThese types are synonyms for TINYINT(1). A value of zero is considered\nfalse. Nonzero values are considered true:\n\nMariaDB> SELECT IF(0, \'true\', \'false\');\n+------------------------+\n| IF(0, \'true\', \'false\') |\n+------------------------+\n| false |\n+------------------------+\n\nMariaDB> SELECT IF(1, \'true\', \'false\');\n+------------------------+\n| IF(1, \'true\', \'false\') |\n+------------------------+\n| true |\n+------------------------+\n\nMariaDB> SELECT IF(2, \'true\', \'false\');\n+------------------------+\n| IF(2, \'true\', \'false\') |\n+------------------------+\n| true |\n+------------------------+\n\nHowever, the values TRUE and FALSE are merely aliases for 1 and 0,\nrespectively, as shown here:\n\nMariaDB> SELECT IF(0 = FALSE, \'true\', \'false\');\n+--------------------------------+\n| IF(0 = FALSE, \'true\', \'false\') |\n+--------------------------------+\n| true |\n+--------------------------------+\n\nMariaDB> SELECT IF(1 = TRUE, \'true\', \'false\');\n+-------------------------------+\n| IF(1 = TRUE, \'true\', \'false\') |\n+-------------------------------+\n| true |\n+-------------------------------+\n\nMariaDB> SELECT IF(2 = TRUE, \'true\', \'false\');\n+-------------------------------+\n| IF(2 = TRUE, \'true\', \'false\') |\n+-------------------------------+\n| false |\n+-------------------------------+\n\nMariaDB> SELECT IF(2 = FALSE, \'true\', \'false\');\n+--------------------------------+\n| IF(2 = FALSE, \'true\', \'false\') |\n+--------------------------------+\n| false |\n+--------------------------------+\n\nThe last two statements display the results shown because 2 is equal to\nneither 1 nor 0.\n\nURL: https://mariadb.com/kb/en/boolean/\n\n','','https://mariadb.com/kb/en/boolean/'),(112,'DEFAULT',14,'Syntax:\nDEFAULT(col_name)\n\nReturns the default value for a table column. An error results if the\ncolumn has no default value.\n\nURL: https://mariadb.com/kb/en/default/\n\n','MariaDB> UPDATE t SET i = DEFAULT(i)+1 WHERE id < 100;\n','https://mariadb.com/kb/en/default/'),(113,'MOD',4,'Syntax:\nMOD(N,M), N % M, N MOD M\n\nModulo operation. Returns the remainder of N divided by M.\n\nURL: https://mariadb.com/kb/en/mod/\n\n','MariaDB> SELECT MOD(234, 10);\n -> 4\nMariaDB> SELECT 253 % 7;\n -> 1\nMariaDB> SELECT MOD(29,9);\n -> 2\nMariaDB> SELECT 29 MOD 9;\n -> 2\n','https://mariadb.com/kb/en/mod/'),(114,'TINYTEXT',22,'TINYTEXT [CHARACTER SET charset_name] [COLLATE collation_name]\n\nA TEXT column with a maximum length of 255 (28 - 1) characters. The\neffective maximum length is less if the value contains multi-byte\ncharacters. Each TINYTEXT value is stored using a 1-byte length prefix\nthat indicates the number of bytes in the value.\n\nURL: https://mariadb.com/kb/en/tinytext/\n\n','','https://mariadb.com/kb/en/tinytext/'),(115,'OPTIMIZE TABLE',20,'Syntax:\nOPTIMIZE [NO_WRITE_TO_BINLOG | LOCAL] TABLE\n tbl_name [, tbl_name] ...\n\nOPTIMIZE TABLE should be used if you have deleted a large part of a\ntable or if you have made many changes to a table with variable-length\nrows (tables that have VARCHAR, VARBINARY, BLOB, or TEXT columns).\nDeleted rows are maintained in a linked list and subsequent INSERT\noperations reuse old row positions. You can use OPTIMIZE TABLE to\nreclaim the unused space and to defragment the data file. After\nextensive changes to a table, this statement may also improve\nperformance of statements that use the table, sometimes significantly.\n\nThis statement requires SELECT and INSERT privileges for the table.\n\nOPTIMIZE TABLE is supported for partitioned tables, and you can use\nALTER TABLE ... OPTIMIZE PARTITION to optimize one or more partitions;\nfor more information, see [HELP ALTER TABLE], and\nhttp://dev.mysql.com/doc/refman/5.5/en/partitioning-maintenance.html.\n\nURL: https://mariadb.com/kb/en/optimize-table/\n\n','','https://mariadb.com/kb/en/optimize-table/'),(116,'DECODE',12,'Syntax:\nDECODE(crypt_str,pass_str)\n\nDecrypts the encrypted string crypt_str using pass_str as the password.\ncrypt_str should be a string returned from ENCODE().\n\nURL: https://mariadb.com/kb/en/decode/\n\n','','https://mariadb.com/kb/en/decode/'),(117,'<=>',18,'Syntax:\n<=>\n\nNULL-safe equal. This operator performs an equality comparison like the\n= operator, but returns 1 rather than NULL if both operands are NULL,\nand 0 rather than NULL if one operand is NULL.\n\nURL: https://mariadb.com/kb/en/null-safe-equal/\n\n','MariaDB> SELECT 1 <=> 1, NULL <=> NULL, 1 <=> NULL;\n -> 1, 1, 0\nMariaDB> SELECT 1 = 1, NULL = NULL, 1 = NULL;\n -> 1, NULL, NULL\n','https://mariadb.com/kb/en/null-safe-equal/'),(118,'HELP STATEMENT',28,'Syntax:\nHELP \'search_string\'\n\nThe HELP statement returns online information from the MySQL Reference\nmanual. Its proper operation requires that the help tables in the mysql\ndatabase be initialized with help topic information.\n\nThe HELP statement searches the help tables for the given search string\nand displays the result of the search. The search string is not case\nsensitive.\n\nURL: https://mariadb.com/kb/en/help-command/\n\n','','https://mariadb.com/kb/en/help-command/'),(119,'RESET',26,'Syntax:\nRESET reset_option [, reset_option] ...\n\nThe RESET statement is used to clear the state of various server\noperations. You must have the RELOAD privilege to execute RESET.\n\nRESET acts as a stronger version of the FLUSH statement. See [HELP\nFLUSH].\n\nThe RESET statement causes an implicit commit. See\nhttps://mariadb.com/kb/en/sql-statements-that-cause-an-implicit-commit/.\n\nURL: https://mariadb.com/kb/en/reset/\n\n','','https://mariadb.com/kb/en/reset/'),(120,'GET_LOCK',14,'Syntax:\nGET_LOCK(str,timeout)\n\nTries to obtain a lock with a name given by the string str, using a\ntimeout of timeout seconds. Returns 1 if the lock was obtained\nsuccessfully, 0 if the attempt timed out (for example, because another\nclient has previously locked the name), or NULL if an error occurred\n(such as running out of memory or the thread was killed with mysqladmin\nkill). If you have a lock obtained with GET_LOCK(), it is released when\nyou execute RELEASE_LOCK(), execute a new GET_LOCK(), or your\nconnection terminates (either normally or abnormally). Locks obtained\nwith GET_LOCK() do not interact with transactions. That is, committing\na transaction does not release any such locks obtained during the\ntransaction.\n\nThis function can be used to implement application locks or to simulate\nrecord locks. Names are locked on a server-wide basis. If a name has\nbeen locked by one client, GET_LOCK() blocks any request by another\nclient for a lock with the same name. This enables clients that agree\non a given lock name to use the name to perform cooperative advisory\nlocking. But be aware that it also enables a client that is not among\nthe set of cooperating clients to lock a name, either inadvertently or\ndeliberately, and thus prevent any of the cooperating clients from\nlocking that name. One way to reduce the likelihood of this is to use\nlock names that are database-specific or application-specific. For\nexample, use lock names of the form db_name.str or app_name.str.\n\nURL: https://mariadb.com/kb/en/get_lock/\n\n','MariaDB> SELECT GET_LOCK(\'lock1\',10);\n -> 1\nMariaDB> SELECT IS_FREE_LOCK(\'lock2\');\n -> 1\nMariaDB> SELECT GET_LOCK(\'lock2\',10);\n -> 1\nMariaDB> SELECT RELEASE_LOCK(\'lock2\');\n -> 1\nMariaDB> SELECT RELEASE_LOCK(\'lock1\');\n -> NULL\n','https://mariadb.com/kb/en/get_lock/'),(121,'UCASE',37,'Syntax:\nUCASE(str)\n\nUCASE() is a synonym for UPPER().\n\nURL: https://mariadb.com/kb/en/ucase/\n\n','','https://mariadb.com/kb/en/ucase/'),(122,'SHOW BINLOG EVENTS',26,'Syntax:\nSHOW BINLOG EVENTS\n [IN \'log_name\'] [FROM pos] [LIMIT [offset,] row_count]\n\nShows the events in the binary log. If you do not specify \'log_name\',\nthe first binary log is displayed.\n\nURL: https://mariadb.com/kb/en/show-binlog-events/\n\n','','https://mariadb.com/kb/en/show-binlog-events/'),(123,'MPOLYFROMWKB',32,'MPolyFromWKB(wkb[,srid]), MultiPolygonFromWKB(wkb[,srid])\n\nConstructs a MULTIPOLYGON value using its WKB representation and SRID.\n\nURL: https://mariadb.com/kb/en/mpolyfromwkb/\n\n','','https://mariadb.com/kb/en/mpolyfromwkb/'),(124,'ITERATE',23,'Syntax:\nITERATE label\n\nITERATE can appear only within LOOP, REPEAT, and WHILE statements.\nITERATE means \"start the loop again.\"\n\nURL: https://mariadb.com/kb/en/iterate/\n\n','','https://mariadb.com/kb/en/iterate/'),(125,'DO',27,'Syntax:\nDO expr [, expr] ...\n\nDO executes the expressions but does not return any results. In most\nrespects, DO is shorthand for SELECT expr, ..., but has the advantage\nthat it is slightly faster when you do not care about the result.\n\nDO is useful primarily with functions that have side effects, such as\nRELEASE_LOCK().\n\nURL: https://mariadb.com/kb/en/do/\n\n','','https://mariadb.com/kb/en/do/'),(126,'CURTIME',31,'Syntax:\nCURTIME()\n\nReturns the current time as a value in \'HH:MM:SS\' or HHMMSS.uuuuuu\nformat, depending on whether the function is used in a string or\nnumeric context. The value is expressed in the current time zone.\n\nURL: https://mariadb.com/kb/en/curtime/\n\n','MariaDB> SELECT CURTIME();\n -> \'23:50:26\'\nMariaDB> SELECT CURTIME() + 0;\n -> 235026.000000\n','https://mariadb.com/kb/en/curtime/'),(127,'CHAR_LENGTH',37,'Syntax:\nCHAR_LENGTH(str)\n\nReturns the length of the string str, measured in characters. A\nmulti-byte character counts as a single character. This means that for\na string containing five 2-byte characters, LENGTH() returns 10,\nwhereas CHAR_LENGTH() returns 5.\n\nURL: https://mariadb.com/kb/en/char_length/\n\n','','https://mariadb.com/kb/en/char_length/'),(128,'BIGINT',22,'BIGINT[(M)] [UNSIGNED] [ZEROFILL]\n\nA large integer. The signed range is -9223372036854775808 to\n9223372036854775807. The unsigned range is 0 to 18446744073709551615.\n\nSERIAL is an alias for BIGINT UNSIGNED NOT NULL AUTO_INCREMENT UNIQUE.\n\nURL: https://mariadb.com/kb/en/bigint/\n\n','','https://mariadb.com/kb/en/bigint/'),(129,'SET',26,'Syntax:\nSET variable_assignment [, variable_assignment] ...\n\nvariable_assignment:\n user_var_name = expr\n | [GLOBAL | SESSION] system_var_name = expr\n | [@@global. | @@session. | @@]system_var_name = expr\n\nThe SET statement assigns values to different types of variables that\naffect the operation of the server or your client. Older versions of\nMySQL employed SET OPTION, but this syntax is deprecated in favor of\nSET without OPTION.\n\nURL: https://mariadb.com/kb/en/set/\n\n','','https://mariadb.com/kb/en/set/'),(130,'LOAD XML',27,'Syntax:\nLOAD XML [LOW_PRIORITY | CONCURRENT] [LOCAL] INFILE \'file_name\'\n [REPLACE | IGNORE]\n INTO TABLE [db_name.]tbl_name\n [CHARACTER SET charset_name]\n [ROWS IDENTIFIED BY \'<tagname>\']\n [IGNORE number {LINES | ROWS}]\n [(column_or_user_var,...)]\n [SET col_name = expr,...]\n\nThe LOAD XML statement reads data from an XML file into a table. The\nfile_name must be given as a literal string. The tagname in the\noptional ROWS IDENTIFIED BY clause must also be given as a literal\nstring, and must be surrounded by angle brackets (< and >).\n\nLOAD XML acts as the complement of running the mysql client in XML\noutput mode (that is, starting the client with the --xml option). To\nwrite data from a table to an XML file, use a command such as the\nfollowing one from the system shell:\n\nshell> mysql --xml -e \'SELECT * FROM mytable\' > file.xml\n\nTo read the file back into a table, use LOAD XML INFILE. By default,\nthe <row> element is considered to be the equivalent of a database\ntable row; this can be changed using the ROWS IDENTIFIED BY clause.\n\nThis statement supports three different XML formats:\n\no Column names as attributes and column values as attribute values:\n\n<row column1=\"value1\" column2=\"value2\" .../>\n\no Column names as tags and column values as the content of these tags:\n\n<row>\n <column1>value1</column1>\n <column2>value2</column2>\n</row>\n\no Column names are the name attributes of <field> tags, and values are\n the contents of these tags:\n\n<row>\n <field name=\'column1\'>value1</field>\n <field name=\'column2\'>value2</field>\n</row>\n\n This is the format used by other MySQL tools, such as mysqldump.\n\nAll 3 formats can be used in the same XML file; the import routine\nautomatically detects the format for each row and interprets it\ncorrectly. Tags are matched based on the tag or attribute name and the\ncolumn name.\n\nThe following clauses work essentially the same way for LOAD XML as\nthey do for LOAD DATA:\n\no LOW_PRIORITY or CONCURRENT\n\no LOCAL\n\no REPLACE or IGNORE\n\no CHARACTER SET\n\no (column_or_user_var,...)\n\no SET\n\nSee [HELP LOAD DATA], for more information about these clauses.\n\nThe IGNORE number LINES or IGNORE number ROWS clause causes the first\nnumber rows in the XML file to be skipped. It is analogous to the LOAD\nDATA statement\'s IGNORE ... LINES clause.\n\nURL: https://mariadb.com/kb/en/load-xml/\n\n','','https://mariadb.com/kb/en/load-xml/'),(131,'CONV',4,'Syntax:\nCONV(N,from_base,to_base)\n\nConverts numbers between different number bases. Returns a string\nrepresentation of the number N, converted from base from_base to base\nto_base. Returns NULL if any argument is NULL. The argument N is\ninterpreted as an integer, but may be specified as an integer or a\nstring. The minimum base is 2 and the maximum base is 36. If to_base is\na negative number, N is regarded as a signed number. Otherwise, N is\ntreated as unsigned. CONV() works with 64-bit precision.\n\nURL: https://mariadb.com/kb/en/conv/\n\n','MariaDB> SELECT CONV(\'a\',16,2);\n -> \'1010\'\nMariaDB> SELECT CONV(\'6E\',18,8);\n -> \'172\'\nMariaDB> SELECT CONV(-17,10,-18);\n -> \'-H\'\nMariaDB> SELECT CONV(10+\'10\'+\'10\'+0xa,10,10);\n -> \'40\'\n','https://mariadb.com/kb/en/conv/'),(132,'DATE',22,'DATE\n\nA date. The supported range is \'1000-01-01\' to \'9999-12-31\'. MySQL\ndisplays DATE values in \'YYYY-MM-DD\' format, but permits assignment of\nvalues to DATE columns using either strings or numbers.\n\nURL: https://mariadb.com/kb/en/date/\n\n','','https://mariadb.com/kb/en/date/'),(133,'ASSIGN-VALUE',15,'Syntax:\n:=\n\nAssignment operator. Causes the user variable on the left hand side of\nthe operator to take on the value to its right. The value on the right\nhand side may be a literal value, another variable storing a value, or\nany legal expression that yields a scalar value, including the result\nof a query (provided that this value is a scalar value). You can\nperform multiple assignments in the same SET statement. You can perform\nmultiple assignments in the same statement-\n\nUnlike =, the := operator is never interpreted as a comparison\noperator. This means you can use := in any valid SQL statement (not\njust in SET statements) to assign a value to a variable.\n\nURL: https://mariadb.com/kb/en/assignment-operator/\n\n','MariaDB> SELECT @var1, @var2;\n -> NULL, NULL\nMariaDB> SELECT @var1 := 1, @var2;\n -> 1, NULL\nMariaDB> SELECT @var1, @var2;\n -> 1, NULL\nMariaDB> SELECT @var1, @var2 := @var1;\n -> 1, 1\nMariaDB> SELECT @var1, @var2;\n -> 1, 1\n\nMariaDB> SELECT @var1:=COUNT(*) FROM t1;\n -> 4\nMariaDB> SELECT @var1;\n -> 4\n','https://mariadb.com/kb/en/assignment-operator/'),(134,'SHOW OPEN TABLES',26,'Syntax:\nSHOW OPEN TABLES [{FROM | IN} db_name]\n [LIKE \'pattern\' | WHERE expr]\n\nSHOW OPEN TABLES lists the non-TEMPORARY tables that are currently open\nin the table cache. See\nhttp://dev.mysql.com/doc/refman/5.5/en/table-cache.html. The FROM\nclause, if present, restricts the tables shown to those present in the\ndb_name database. The LIKE clause, if present, indicates which table\nnames to match. The WHERE clause can be given to select rows using more\ngeneral conditions, as discussed in\nhttps://mariadb.com/kb/en/extended-show/.\n\nURL: https://mariadb.com/kb/en/show-open-tables/\n\n','','https://mariadb.com/kb/en/show-open-tables/'),(135,'EXTRACT',31,'Syntax:\nEXTRACT(unit FROM date)\n\nThe EXTRACT() function uses the same kinds of unit specifiers as\nDATE_ADD() or DATE_SUB(), but extracts parts from the date rather than\nperforming date arithmetic.\n\nURL: https://mariadb.com/kb/en/extract/\n\n','MariaDB> SELECT EXTRACT(YEAR FROM \'2009-07-02\');\n -> 2009\nMariaDB> SELECT EXTRACT(YEAR_MONTH FROM \'2009-07-02 01:02:03\');\n -> 200907\nMariaDB> SELECT EXTRACT(DAY_MINUTE FROM \'2009-07-02 01:02:03\');\n -> 20102\nMariaDB> SELECT EXTRACT(MICROSECOND\n -> FROM \'2003-01-02 10:30:00.000123\');\n -> 123\n','https://mariadb.com/kb/en/extract/'),(136,'ENCRYPT',12,'Syntax:\nENCRYPT(str[,salt])\n\nEncrypts str using the Unix crypt() system call and returns a binary\nstring. The salt argument must be a string with at least two characters\nor the result will be NULL. If no salt argument is given, a random\nvalue is used.\n\nURL: https://mariadb.com/kb/en/encrypt/\n\n','MariaDB> SELECT ENCRYPT(\'hello\');\n -> \'VxuFAJXVARROc\'\n','https://mariadb.com/kb/en/encrypt/'),(137,'SHOW STATUS',26,'Syntax:\nSHOW [GLOBAL | SESSION] STATUS\n [LIKE \'pattern\' | WHERE expr]\n\nSHOW STATUS provides server status information. This information also\ncan be obtained using the mysqladmin extended-status command. The LIKE\nclause, if present, indicates which variable names to match. The WHERE\nclause can be given to select rows using more general conditions, as\ndiscussed in https://mariadb.com/kb/en/extended-show/.\nThis statement does not require any privilege. It requires only the\nability to connect to the server.\nWith a LIKE clause, the statement displays only rows for those\nvariables with names that match the pattern:\n\nMariaDB> SHOW STATUS LIKE \'Key%\';\n+--------------------+----------+\n| Variable_name | Value |\n+--------------------+----------+\n| Key_blocks_used | 14955 |\n| Key_read_requests | 96854827 |\n| Key_reads | 162040 |\n| Key_write_requests | 7589728 |\n| Key_writes | 3813196 |\n+--------------------+----------+\n\nWith the GLOBAL modifier, SHOW STATUS displays the status values for\nall connections to MySQL. With SESSION, it displays the status values\nfor the current connection. If no modifier is present, the default is\nSESSION. LOCAL is a synonym for SESSION.\n\nSome status variables have only a global value. For these, you get the\nsame value for both GLOBAL and SESSION. The scope for each status\nvariable is listed at\nhttps://mariadb.com/kb/en/server-status-variables/.\n\nEach invocation of the SHOW STATUS statement uses an internal temporary\ntable and increments the global Created_tmp_tables value.\n\nURL: https://mariadb.com/kb/en/show-status/\n\n','','https://mariadb.com/kb/en/show-status/'),(138,'EXTRACTVALUE',37,'Syntax:\nExtractValue(xml_frag, xpath_expr)\n\nExtractValue() takes two string arguments, a fragment of XML markup\nxml_frag and an XPath expression xpath_expr (also known as a locator);\nit returns the text (CDATA) of the first text node which is a child of\nthe elements or elements matched by the XPath expression. In MySQL 5.5,\nthe XPath expression can contain at most 127 characters. (This\nlimitation is lifted in MySQL 5.6.)\n\nUsing this function is the equivalent of performing a match using the\nxpath_expr after appending /text(). In other words,\nExtractValue(\'<a><b>Sakila</b></a>\', \'/a/b\') and\nExtractValue(\'<a><b>Sakila</b></a>\', \'/a/b/text()\') produce the same\nresult.\n\nIf multiple matches are found, the content of the first child text node\nof each matching element is returned (in the order matched) as a\nsingle, space-delimited string.\n\nIf no matching text node is found for the expression (including the\nimplicit /text())---for whatever reason, as long as xpath_expr is\nvalid, and xml_frag consists of elements which are properly nested and\nclosed---an empty string is returned. No distinction is made between a\nmatch on an empty element and no match at all. This is by design.\n\nIf you need to determine whether no matching element was found in\nxml_frag or such an element was found but contained no child text\nnodes, you should test the result of an expression that uses the XPath\ncount() function. For example, both of these statements return an empty\nstring, as shown here:\n\nMariaDB> SELECT ExtractValue(\'<a><b/></a>\', \'/a/b\');\n+-------------------------------------+\n| ExtractValue(\'<a><b/></a>\', \'/a/b\') |\n+-------------------------------------+\n| |\n+-------------------------------------+\n1 row in set (0.00 sec)\n\nMariaDB> SELECT ExtractValue(\'<a><c/></a>\', \'/a/b\');\n+-------------------------------------+\n| ExtractValue(\'<a><c/></a>\', \'/a/b\') |\n+-------------------------------------+\n| |\n+-------------------------------------+\n1 row in set (0.00 sec)\n\nHowever, you can determine whether there was actually a matching\nelement using the following:\n\nMariaDB> SELECT ExtractValue(\'<a><b/></a>\', \'count(/a/b)\');\n+-------------------------------------+\n| ExtractValue(\'<a><b/></a>\', \'count(/a/b)\') |\n+-------------------------------------+\n| 1 |\n+-------------------------------------+\n1 row in set (0.00 sec)\n\nMariaDB> SELECT ExtractValue(\'<a><c/></a>\', \'count(/a/b)\');\n+-------------------------------------+\n| ExtractValue(\'<a><c/></a>\', \'count(/a/b)\') |\n+-------------------------------------+\n| 0 |\n+-------------------------------------+\n1 row in set (0.01 sec)\n\n*Important*: ExtractValue() returns only CDATA, and does not return any\ntags that might be contained within a matching tag, nor any of their\ncontent (see the result returned as val1 in the following example).\n\nURL: https://mariadb.com/kb/en/extractvalue/\n\n','MariaDB> SELECT\n -> ExtractValue(\'<a>ccc<b>ddd</b></a>\', \'/a\') AS val1,\n -> ExtractValue(\'<a>ccc<b>ddd</b></a>\', \'/a/b\') AS val2,\n -> ExtractValue(\'<a>ccc<b>ddd</b></a>\', \'//b\') AS val3,\n -> ExtractValue(\'<a>ccc<b>ddd</b></a>\', \'/b\') AS val4,\n -> ExtractValue(\'<a>ccc<b>ddd</b><b>eee</b></a>\', \'//b\') AS val5;\n\n+------+------+------+------+---------+\n| val1 | val2 | val3 | val4 | val5 |\n+------+------+------+------+---------+\n| ccc | ddd | ddd | | ddd eee |\n+------+------+------+------+---------+\n','https://mariadb.com/kb/en/extractvalue/'),(139,'OLD_PASSWORD',12,'Syntax:\nOLD_PASSWORD(str)\n\nOLD_PASSWORD() was added when the implementation of PASSWORD() was\nchanged in MySQL 4.1 to improve security. OLD_PASSWORD() returns the\nvalue of the pre-4.1 implementation of PASSWORD() as a string, and is\nintended to permit you to reset passwords for any pre-4.1 clients that\nneed to connect to your version 5.5 MySQL server without locking them\nout. See http://dev.mysql.com/doc/refman/5.1/en/password-hashing.html.\n\nAs of MySQL 5.5.3, the return value is a nonbinary string in the\nconnection character set. Before 5.5.3, the return value is a binary\nstring.\n\nURL: https://mariadb.com/kb/en/old_password/\n\n','','https://mariadb.com/kb/en/old_password/'),(140,'FORMAT',37,'Syntax:\nFORMAT(X,D[,locale])\n\nFormats the number X to a format like \'#,###,###.##\', rounded to D\ndecimal places, and returns the result as a string. If D is 0, the\nresult has no decimal point or fractional part.\n\nThe optional third parameter enables a locale to be specified to be\nused for the result number\'s decimal point, thousands separator, and\ngrouping between separators. Permissible locale values are the same as\nthe legal values for the lc_time_names system variable (see\nhttps://mariadb.com/kb/en/server-locale/). If no\nlocale is specified, the default is \'en_US\'.\n\nURL: https://mariadb.com/kb/en/format/\n\n','MariaDB> SELECT FORMAT(12332.123456, 4);\n -> \'12,332.1235\'\nMariaDB> SELECT FORMAT(12332.1,4);\n -> \'12,332.1000\'\nMariaDB> SELECT FORMAT(12332.2,0);\n -> \'12,332\'\nMariaDB> SELECT FORMAT(12332.2,2,\'de_DE\');\n -> \'12.332,20\'\n','https://mariadb.com/kb/en/format/'),(141,'||',15,'Syntax:\nOR, ||\n\nLogical OR. When both operands are non-NULL, the result is 1 if any\noperand is nonzero, and 0 otherwise. With a NULL operand, the result is\n1 if the other operand is nonzero, and NULL otherwise. If both operands\nare NULL, the result is NULL.\n\nURL: https://mariadb.com/kb/en/or/\n\n','MariaDB> SELECT 1 || 1;\n -> 1\nMariaDB> SELECT 1 || 0;\n -> 1\nMariaDB> SELECT 0 || 0;\n -> 0\nMariaDB> SELECT 0 || NULL;\n -> NULL\nMariaDB> SELECT 1 || NULL;\n -> 1\n','https://mariadb.com/kb/en/or/'),(142,'BIT_LENGTH',37,'Syntax:\nBIT_LENGTH(str)\n\nReturns the length of the string str in bits.\n\nURL: https://mariadb.com/kb/en/bit_length/\n\n','MariaDB> SELECT BIT_LENGTH(\'text\');\n -> 32\n','https://mariadb.com/kb/en/bit_length/'),(143,'EXTERIORRING',2,'ExteriorRing(poly)\n\nReturns the exterior ring of the Polygon value poly as a LineString.\n\nURL: https://mariadb.com/kb/en/exteriorring/\n\n','MariaDB> SET @poly =\n -> \'Polygon((0 0,0 3,3 3,3 0,0 0),(1 1,1 2,2 2,2 1,1 1))\';\nMariaDB> SELECT AsText(ExteriorRing(GeomFromText(@poly)));\n+-------------------------------------------+\n| AsText(ExteriorRing(GeomFromText(@poly))) |\n+-------------------------------------------+\n| LINESTRING(0 0,0 3,3 3,3 0,0 0) |\n+-------------------------------------------+\n','https://mariadb.com/kb/en/exteriorring/'),(144,'GEOMFROMWKB',32,'GeomFromWKB(wkb[,srid]), GeometryFromWKB(wkb[,srid])\n\nConstructs a geometry value of any type using its WKB representation\nand SRID.\n\nURL: https://mariadb.com/kb/en/geomfromwkb/\n\n','','https://mariadb.com/kb/en/geomfromwkb/'),(145,'SHOW SLAVE HOSTS',26,'Syntax:\nSHOW SLAVE HOSTS\n\nDisplays a list of replication slaves currently registered with the\nmaster. (Before MySQL 5.5.3, only slaves started with the\n--report-host=host_name option are visible in this list.)\n\nThe list is displayed on any server (not just the master server). The\noutput looks like this:\n\nMariaDB> SHOW SLAVE HOSTS;\n+------------+-----------+------+-----------+\n| Server_id | Host | Port | Master_id |\n+------------+-----------+------+-----------+\n| 192168010 | iconnect2 | 3306 | 192168011 |\n| 1921680101 | athena | 3306 | 192168011 |\n+------------+-----------+------+-----------+\n\no Server_id: The unique server ID of the slave server, as configured in\n the server\'s option file, or on the command line with\n --server-id=value.\n\no Host: The host name of the slave server, as configured in the\n server\'s option file, or on the command line with\n --report-host=host_name. Note that this can differ from the machine\n name as configured in the operating system.\n\no Port: The port the slave server is listening on.\n\n In MySQL 5.5.23 and later, a zero in this column means that the slave\n port (--report-port) was not set. Prior to MySQL 5.5.23, 3306 was\n used as the default in such cases (Bug #13333431).\n\no Master_id: The unique server ID of the master server that the slave\n server is replicating from.\n\nSome MySQL versions report another variable, Rpl_recovery_rank. This\nvariable was never used, and was removed in MySQL 5.5.3. (Bug #13963)\n\nURL: https://mariadb.com/kb/en/show-slave-hosts/\n\n','','https://mariadb.com/kb/en/show-slave-hosts/'),(146,'START TRANSACTION',8,'Syntax:\nSTART TRANSACTION [WITH CONSISTENT SNAPSHOT]\nBEGIN [WORK]\nCOMMIT [WORK] [AND [NO] CHAIN] [[NO] RELEASE]\nROLLBACK [WORK] [AND [NO] CHAIN] [[NO] RELEASE]\nSET autocommit = {0 | 1}\n\nThese statements provide control over use of transactions:\n\no START TRANSACTION or BEGIN start a new transaction.\n\no COMMIT commits the current transaction, making its changes permanent.\n\no ROLLBACK rolls back the current transaction, canceling its changes.\n\no SET autocommit disables or enables the default autocommit mode for\n the current session.\n\nBy default, MySQL runs with autocommit mode enabled. This means that as\nsoon as you execute a statement that updates (modifies) a table, MySQL\nstores the update on disk to make it permanent. The change cannot be\nrolled back.\n\nTo disable autocommit mode implicitly for a single series of\nstatements, use the START TRANSACTION statement:\n\nSTART TRANSACTION;\nSELECT @A:=SUM(salary) FROM table1 WHERE type=1;\nUPDATE table2 SET summary=@A WHERE type=1;\nCOMMIT;\n\nWith START TRANSACTION, autocommit remains disabled until you end the\ntransaction with COMMIT or ROLLBACK. The autocommit mode then reverts\nto its previous state.\n\nYou can also begin a transaction like this:\n\nSTART TRANSACTION WITH CONSISTENT SNAPSHOT;\n\nThe WITH CONSISTENT SNAPSHOT option starts a consistent read for\nstorage engines that are capable of it. This applies only to InnoDB.\nThe effect is the same as issuing a START TRANSACTION followed by a\nSELECT from any InnoDB table. See\nhttp://dev.mysql.com/doc/refman/5.5/en/innodb-consistent-read.html. The\nWITH CONSISTENT SNAPSHOT option does not change the current transaction\nisolation level, so it provides a consistent snapshot only if the\ncurrent isolation level is one that permits consistent read (REPEATABLE\nREAD or SERIALIZABLE).\n\n*Important*: Many APIs used for writing MySQL client applications (such\nas JDBC) provide their own methods for starting transactions that can\n(and sometimes should) be used instead of sending a START TRANSACTION\nstatement from the client. See\nhttp://dev.mysql.com/doc/refman/5.5/en/connectors-apis.html, or the\ndocumentation for your API, for more information.\n\nTo disable autocommit mode explicitly, use the following statement:\n\nSET autocommit=0;\n\nAfter disabling autocommit mode by setting the autocommit variable to\nzero, changes to transaction-safe tables (such as those for InnoDB) are not made permanent immediately. You must use COMMIT to\nstore your changes to disk or ROLLBACK to ignore the changes.\n\nautocommit is a session variable and must be set for each session. To\ndisable autocommit mode for each new connection, see the description of\nthe autocommit system variable at\nhttps://mariadb.com/kb/en/server-system-variables/.\n\nBEGIN and BEGIN WORK are supported as aliases of START TRANSACTION for\ninitiating a transaction. START TRANSACTION is standard SQL syntax and\nis the recommended way to start an ad-hoc transaction.\n\nThe BEGIN statement differs from the use of the BEGIN keyword that\nstarts a BEGIN ... END compound statement. The latter does not begin a\ntransaction. See [HELP BEGIN END].\n\n*Note*: Within all stored programs (stored procedures and functions,\ntriggers, and events), the parser treats BEGIN [WORK] as the beginning\nof a BEGIN ... END block. Begin a transaction in this context with\nSTART TRANSACTION instead.\n\nThe optional WORK keyword is supported for COMMIT and ROLLBACK, as are\nthe CHAIN and RELEASE clauses. CHAIN and RELEASE can be used for\nadditional control over transaction completion. The value of the\ncompletion_type system variable determines the default completion\nbehavior. See\nhttps://mariadb.com/kb/en/server-system-variables/.\n\nThe AND CHAIN clause causes a new transaction to begin as soon as the\ncurrent one ends, and the new transaction has the same isolation level\nas the just-terminated transaction. The RELEASE clause causes the\nserver to disconnect the current client session after terminating the\ncurrent transaction. Including the NO keyword suppresses CHAIN or\nRELEASE completion, which can be useful if the completion_type system\nvariable is set to cause chaining or release completion by default.\n\nURL: https://mariadb.com/kb/en/start-transaction/\n\n','','https://mariadb.com/kb/en/start-transaction/'),(147,'BETWEEN AND',18,'Syntax:\nexpr BETWEEN min AND max\n\nIf expr is greater than or equal to min and expr is less than or equal\nto max, BETWEEN returns 1, otherwise it returns 0. This is equivalent\nto the expression (min <= expr AND expr <= max) if all the arguments\nare of the same type. Otherwise type conversion takes place according\nto the rules described in\nhttps://mariadb.com/kb/en/type-conversion/, but\napplied to all the three arguments.\n\nURL: https://mariadb.com/kb/en/between-and/\n\n','MariaDB> SELECT 2 BETWEEN 1 AND 3, 2 BETWEEN 3 and 1;\n -> 1, 0\nMariaDB> SELECT 1 BETWEEN 2 AND 3;\n -> 0\nMariaDB> SELECT \'b\' BETWEEN \'a\' AND \'c\';\n -> 1\nMariaDB> SELECT 2 BETWEEN 2 AND \'3\';\n -> 1\nMariaDB> SELECT 2 BETWEEN 2 AND \'x-3\';\n -> 0\n','https://mariadb.com/kb/en/between-and/'),(148,'MULTIPOLYGON',24,'MultiPolygon(poly1,poly2,...)\n\nConstructs a MultiPolygon value from a set of Polygon or WKB Polygon\narguments.\n\nURL: https://mariadb.com/kb/en/multipolygon/\n\n','','https://mariadb.com/kb/en/multipolygon/'),(149,'TIME_FORMAT',31,'Syntax:\nTIME_FORMAT(time,format)\n\nThis is used like the DATE_FORMAT() function, but the format string may\ncontain format specifiers only for hours, minutes, seconds, and\nmicroseconds. Other specifiers produce a NULL value or 0.\n\nURL: https://mariadb.com/kb/en/time_format/\n\n','MariaDB> SELECT TIME_FORMAT(\'100:00:00\', \'%H %k %h %I %l\');\n -> \'100 100 04 04 4\'\n','https://mariadb.com/kb/en/time_format/'),(150,'LEFT',37,'Syntax:\nLEFT(str,len)\n\nReturns the leftmost len characters from the string str, or NULL if any\nargument is NULL.\n\nURL: https://mariadb.com/kb/en/left/\n\n','MariaDB> SELECT LEFT(\'foobarbar\', 5);\n -> \'fooba\'\n','https://mariadb.com/kb/en/left/'),(151,'FLUSH QUERY CACHE',26,'You can defragment the query cache to better utilize its memory with\nthe FLUSH QUERY CACHE statement. The statement does not remove any\nqueries from the cache.\n\nThe RESET QUERY CACHE statement removes all query results from the\nquery cache. The FLUSH TABLES statement also does this.\n\nURL: https://mariadb.com/kb/en/flush-query-cache/\n\n','','https://mariadb.com/kb/en/flush-query-cache/'),(152,'SET DATA TYPE',22,'SET(\'value1\',\'value2\',...) [CHARACTER SET charset_name] [COLLATE\ncollation_name]\n\nA set. A string object that can have zero or more values, each of which\nmust be chosen from the list of values \'value1\', \'value2\', ... A SET\ncolumn can have a maximum of 64 members. SET values are represented\ninternally as integers.\n\nURL: https://mariadb.com/kb/en/set-data-type/\n\n','','https://mariadb.com/kb/en/set-data-type/'),(153,'RAND',4,'Syntax:\nRAND(), RAND(N)\n\nReturns a random floating-point value v in the range 0 <= v < 1.0. If a\nconstant integer argument N is specified, it is used as the seed value,\nwhich produces a repeatable sequence of column values. In the following\nexample, note that the sequences of values produced by RAND(3) is the\nsame both places where it occurs.\n\nURL: https://mariadb.com/kb/en/rand/\n\n','MariaDB> CREATE TABLE t (i INT);\nQuery OK, 0 rows affected (0.42 sec)\n\nMariaDB> INSERT INTO t VALUES(1),(2),(3);\nQuery OK, 3 rows affected (0.00 sec)\nRecords: 3 Duplicates: 0 Warnings: 0\n\nMariaDB> SELECT i, RAND() FROM t;\n+------+------------------+\n| i | RAND() |\n+------+------------------+\n| 1 | 0.61914388706828 |\n| 2 | 0.93845168309142 |\n| 3 | 0.83482678498591 |\n+------+------------------+\n3 rows in set (0.00 sec)\n\nMariaDB> SELECT i, RAND(3) FROM t;\n+------+------------------+\n| i | RAND(3) |\n+------+------------------+\n| 1 | 0.90576975597606 |\n| 2 | 0.37307905813035 |\n| 3 | 0.14808605345719 |\n+------+------------------+\n3 rows in set (0.00 sec)\n\nMariaDB> SELECT i, RAND() FROM t;\n+------+------------------+\n| i | RAND() |\n+------+------------------+\n| 1 | 0.35877890638893 |\n| 2 | 0.28941420772058 |\n| 3 | 0.37073435016976 |\n+------+------------------+\n3 rows in set (0.00 sec)\n\nMariaDB> SELECT i, RAND(3) FROM t;\n+------+------------------+\n| i | RAND(3) |\n+------+------------------+\n| 1 | 0.90576975597606 |\n| 2 | 0.37307905813035 |\n| 3 | 0.14808605345719 |\n+------+------------------+\n3 rows in set (0.01 sec)\n','https://mariadb.com/kb/en/rand/'),(154,'RPAD',37,'Syntax:\nRPAD(str,len,padstr)\n\nReturns the string str, right-padded with the string padstr to a length\nof len characters. If str is longer than len, the return value is\nshortened to len characters.\n\nURL: https://mariadb.com/kb/en/rpad/\n\n','MariaDB> SELECT RPAD(\'hi\',5,\'?\');\n -> \'hi???\'\nMariaDB> SELECT RPAD(\'hi\',1,\'?\');\n -> \'h\'\n','https://mariadb.com/kb/en/rpad/'),(155,'CREATE DATABASE',39,'Syntax:\nCREATE {DATABASE | SCHEMA} [IF NOT EXISTS] db_name\n [create_specification] ...\n\ncreate_specification:\n [DEFAULT] CHARACTER SET [=] charset_name\n | [DEFAULT] COLLATE [=] collation_name\n\nCREATE DATABASE creates a database with the given name. To use this\nstatement, you need the CREATE privilege for the database. CREATE\nSCHEMA is a synonym for CREATE DATABASE.\n\nURL: https://mariadb.com/kb/en/create-database/\n\n','','https://mariadb.com/kb/en/create-database/'),(156,'DEC',22,'DEC[(M[,D])] [UNSIGNED] [ZEROFILL], NUMERIC[(M[,D])] [UNSIGNED]\n[ZEROFILL], FIXED[(M[,D])] [UNSIGNED] [ZEROFILL]\n\nThese types are synonyms for DECIMAL. The FIXED synonym is available\nfor compatibility with other database systems.\n\nURL: https://mariadb.com/kb/en/dec-numeric-fixed/\n\n','','https://mariadb.com/kb/en/dec-numeric-fixed/'),(157,'VAR_POP',16,'Syntax:\nVAR_POP(expr)\n\nReturns the population standard variance of expr. It considers rows as\nthe whole population, not as a sample, so it has the number of rows as\nthe denominator. You can also use VARIANCE(), which is equivalent but\nis not standard SQL.\n\nVAR_POP() returns NULL if there were no matching rows.\n\nURL: https://mariadb.com/kb/en/var_pop/\n\n','','https://mariadb.com/kb/en/var_pop/'),(158,'ELT',37,'Syntax:\nELT(N,str1,str2,str3,...)\n\nReturns str1 if N = 1, str2 if N = 2, and so on. Returns NULL if N is\nless than 1 or greater than the number of arguments. ELT() is the\ncomplement of FIELD().\n\nURL: https://mariadb.com/kb/en/elt/.html\n\n','MariaDB> SELECT ELT(1, \'ej\', \'Heja\', \'hej\', \'foo\');\n -> \'ej\'\nMariaDB> SELECT ELT(4, \'ej\', \'Heja\', \'hej\', \'foo\');\n -> \'foo\'\n','https://mariadb.com/kb/en/elt/.html'),(159,'ALTER VIEW',39,'Syntax:\nALTER\n [ALGORITHM = {UNDEFINED | MERGE | TEMPTABLE}]\n [DEFINER = { user | CURRENT_USER }]\n [SQL SECURITY { DEFINER | INVOKER }]\n VIEW view_name [(column_list)]\n AS select_statement\n [WITH [CASCADED | LOCAL] CHECK OPTION]\n\nThis statement changes the definition of a view, which must exist. The\nsyntax is similar to that for CREATE VIEW and the effect is the same as\nfor CREATE OR REPLACE VIEW. See [HELP CREATE VIEW]. This statement\nrequires the CREATE VIEW and DROP privileges for the view, and some\nprivilege for each column referred to in the SELECT statement. ALTER\nVIEW is permitted only to the definer or users with the SUPER\nprivilege.\n\nURL: https://mariadb.com/kb/en/alter-view/\n\n','','https://mariadb.com/kb/en/alter-view/'),(160,'SHOW DATABASES',26,'Syntax:\nSHOW {DATABASES | SCHEMAS}\n [LIKE \'pattern\' | WHERE expr]\n\nSHOW DATABASES lists the databases on the MySQL server host. SHOW\nSCHEMAS is a synonym for SHOW DATABASES. The LIKE clause, if present,\nindicates which database names to match. The WHERE clause can be given\nto select rows using more general conditions, as discussed in\nhttps://mariadb.com/kb/en/extended-show/.\n\nYou see only those databases for which you have some kind of privilege,\nunless you have the global SHOW DATABASES privilege. You can also get\nthis list using the mysqlshow command.\n\nIf the server was started with the --skip-show-database option, you\ncannot use this statement at all unless you have the SHOW DATABASES\nprivilege.\n\nURL: https://mariadb.com/kb/en/show-databases/\n\n','','https://mariadb.com/kb/en/show-databases/'),(161,'~',19,'Syntax:\n~\n\nInvert all bits.\n\nURL: https://mariadb.com/kb/en/3489/\n\n','MariaDB> SELECT 5 & ~1;\n -> 4\n','https://mariadb.com/kb/en/3489/'),(162,'TEXT',22,'TEXT[(M)] [CHARACTER SET charset_name] [COLLATE collation_name]\n\nA TEXT column with a maximum length of 65,535 (216 - 1) characters. The\neffective maximum length is less if the value contains multi-byte\ncharacters. Each TEXT value is stored using a 2-byte length prefix that\nindicates the number of bytes in the value.\n\nAn optional length M can be given for this type. If this is done, MySQL\ncreates the column as the smallest TEXT type large enough to hold\nvalues M characters long.\n\nURL: https://mariadb.com/kb/en/text/\n\n','','https://mariadb.com/kb/en/text/'),(163,'CONCAT_WS',37,'Syntax:\nCONCAT_WS(separator,str1,str2,...)\n\nCONCAT_WS() stands for Concatenate With Separator and is a special form\nof CONCAT(). The first argument is the separator for the rest of the\narguments. The separator is added between the strings to be\nconcatenated. The separator can be a string, as can the rest of the\narguments. If the separator is NULL, the result is NULL.\n\nURL: https://mariadb.com/kb/en/concat_ws/\n\n','MariaDB> SELECT CONCAT_WS(\',\',\'First name\',\'Second name\',\'Last Name\');\n -> \'First name,Second name,Last Name\'\nMariaDB> SELECT CONCAT_WS(\',\',\'First name\',NULL,\'Last Name\');\n -> \'First name,Last Name\'\n','https://mariadb.com/kb/en/concat_ws/'),(164,'ROW_COUNT',17,'Syntax:\nROW_COUNT()\n\nBefore MySQL 5.5.5, ROW_COUNT() returns the number of rows changed,\ndeleted, or inserted by the last statement if it was an UPDATE, DELETE,\nor INSERT. For other statements, the value may not be meaningful.\n\nAs of MySQL 5.5.5, ROW_COUNT() returns a value as follows:\n\no DDL statements: 0. This applies to statements such as CREATE TABLE or\n DROP TABLE.\n\no DML statements other than SELECT: The number of affected rows. This\n applies to statements such as UPDATE, INSERT, or DELETE (as before),\n but now also to statements such as ALTER TABLE and LOAD DATA INFILE.\n\no SELECT: -1 if the statement returns a result set, or the number of\n rows \"affected\" if it does not. For example, for SELECT * FROM t1,\n ROW_COUNT() returns -1. For SELECT * FROM t1 INTO OUTFILE\n \'file_name\', ROW_COUNT() returns the number of rows written to the\n file.\n\no SIGNAL statements: 0.\n\nFor UPDATE statements, the affected-rows value by default is the number\nof rows actually changed. If you specify the CLIENT_FOUND_ROWS flag to\nmysql_real_connect() when connecting to mysqld, the affected-rows value\nis the number of rows \"found\"; that is, matched by the WHERE clause.\n\nFor REPLACE statements, the affected-rows value is 2 if the new row\nreplaced an old row, because in this case, one row was inserted after\nthe duplicate was deleted.\n\nFor INSERT ... ON DUPLICATE KEY UPDATE statements, the affected-rows\nvalue is 1 if the row is inserted as a new row and 2 if an existing row\nis updated.\n\nThe ROW_COUNT() value is similar to the value from the\nmysql_affected_rows() C API function and the row count that the mysql\nclient displays following statement execution.\n\nURL: https://mariadb.com/kb/en/information-functions-row_count/\n\n','MariaDB> INSERT INTO t VALUES(1),(2),(3);\nQuery OK, 3 rows affected (0.00 sec)\nRecords: 3 Duplicates: 0 Warnings: 0\n\nMariaDB> SELECT ROW_COUNT();\n+-------------+\n| ROW_COUNT() |\n+-------------+\n| 3 |\n+-------------+\n1 row in set (0.00 sec)\n\nMariaDB> DELETE FROM t WHERE i IN(1,2);\nQuery OK, 2 rows affected (0.00 sec)\n\nMariaDB> SELECT ROW_COUNT();\n+-------------+\n| ROW_COUNT() |\n+-------------+\n| 2 |\n+-------------+\n1 row in set (0.00 sec)\n','https://mariadb.com/kb/en/information-functions-row_count/'),(165,'ASIN',4,'Syntax:\nASIN(X)\n\nReturns the arc sine of X, that is, the value whose sine is X. Returns\nNULL if X is not in the range -1 to 1.\n\nURL: https://mariadb.com/kb/en/asin/\n\n','MariaDB> SELECT ASIN(0.2);\n -> 0.20135792079033\nMariaDB> SELECT ASIN(\'foo\');\n\n+-------------+\n| ASIN(\'foo\') |\n+-------------+\n| 0 |\n+-------------+\n1 row in set, 1 warning (0.00 sec)\n\nMariaDB> SHOW WARNINGS;\n+---------+------+-----------------------------------------+\n| Level | Code | Message |\n+---------+------+-----------------------------------------+\n| Warning | 1292 | Truncated incorrect DOUBLE value: \'foo\' |\n+---------+------+-----------------------------------------+\n','https://mariadb.com/kb/en/asin/'),(166,'SIGN',4,'Syntax:\nSIGN(X)\n\nReturns the sign of the argument as -1, 0, or 1, depending on whether X\nis negative, zero, or positive.\n\nURL: https://mariadb.com/kb/en/sign/\n\n','MariaDB> SELECT SIGN(-32);\n -> -1\nMariaDB> SELECT SIGN(0);\n -> 0\nMariaDB> SELECT SIGN(234);\n -> 1\n','https://mariadb.com/kb/en/sign/'),(167,'SEC_TO_TIME',31,'Syntax:\nSEC_TO_TIME(seconds)\n\nReturns the seconds argument, converted to hours, minutes, and seconds,\nas a TIME value. The range of the result is constrained to that of the\nTIME data type. A warning occurs if the argument corresponds to a value\noutside that range.\n\nURL: https://mariadb.com/kb/en/sec_to_time/\n\n','MariaDB> SELECT SEC_TO_TIME(2378);\n -> \'00:39:38\'\nMariaDB> SELECT SEC_TO_TIME(2378) + 0;\n -> 3938\n','https://mariadb.com/kb/en/sec_to_time/'),(168,'FLOAT',22,'FLOAT[(M,D)] [UNSIGNED] [ZEROFILL]\n\nA small (single-precision) floating-point number. Permissible values\nare -3.402823466E+38 to -1.175494351E-38, 0, and 1.175494351E-38 to\n3.402823466E+38. These are the theoretical limits, based on the IEEE\nstandard. The actual range might be slightly smaller depending on your\nhardware or operating system.\n\nM is the total number of digits and D is the number of digits following\nthe decimal point. If M and D are omitted, values are stored to the\nlimits permitted by the hardware. A single-precision floating-point\nnumber is accurate to approximately 7 decimal places.\n\nUNSIGNED, if specified, disallows negative values.\n\nUsing FLOAT might give you some unexpected problems because all\ncalculations in MySQL are done with double precision. See\nhttps://mariadb.com/kb/en/floating-point-accuracy/.\n\nURL: https://mariadb.com/kb/en/float/\n\n','','https://mariadb.com/kb/en/float/'),(169,'LOCATE',37,'Syntax:\nLOCATE(substr,str), LOCATE(substr,str,pos)\n\nThe first syntax returns the position of the first occurrence of\nsubstring substr in string str. The second syntax returns the position\nof the first occurrence of substring substr in string str, starting at\nposition pos. Returns 0 if substr is not in str.\n\nURL: https://mariadb.com/kb/en/locate/\n\n','MariaDB> SELECT LOCATE(\'bar\', \'foobarbar\');\n -> 4\nMariaDB> SELECT LOCATE(\'xbar\', \'foobar\');\n -> 0\nMariaDB> SELECT LOCATE(\'bar\', \'foobarbar\', 5);\n -> 7\n','https://mariadb.com/kb/en/locate/'),(170,'SHOW EVENTS',26,'Syntax:\nSHOW EVENTS [{FROM | IN} schema_name]\n [LIKE \'pattern\' | WHERE expr]\n\nThis statement displays information about Event Manager events. It\nrequires the EVENT privilege for the database from which the events are\nto be shown.\n\nIn its simplest form, SHOW EVENTS lists all of the events in the\ncurrent schema:\n\nMariaDB> SELECT CURRENT_USER(), SCHEMA();\n+----------------+----------+\n| CURRENT_USER() | SCHEMA() |\n+----------------+----------+\n| jon@ghidora | myschema |\n+----------------+----------+\n1 row in set (0.00 sec)\n\nMariaDB> SHOW EVENTS\\G\n*************************** 1. row ***************************\n Db: myschema\n Name: e_daily\n Definer: jon@ghidora\n Time zone: SYSTEM\n Type: RECURRING\n Execute at: NULL\n Interval value: 10\n Interval field: SECOND\n Starts: 2006-02-09 10:41:23\n Ends: NULL\n Status: ENABLED\n Originator: 0\ncharacter_set_client: latin1\ncollation_connection: latin1_swedish_ci\n Database Collation: latin1_swedish_ci\n\nTo see events for a specific schema, use the FROM clause. For example,\nto see events for the test schema, use the following statement:\n\nSHOW EVENTS FROM test;\n\nThe LIKE clause, if present, indicates which event names to match. The\nWHERE clause can be given to select rows using more general conditions,\nas discussed in\nhttps://mariadb.com/kb/en/extended-show/.\n\nURL: https://mariadb.com/kb/en/show-events/\n\n','','https://mariadb.com/kb/en/show-events/'),(171,'CHARSET',17,'Syntax:\nCHARSET(str)\n\nReturns the character set of the string argument.\n\nURL: https://mariadb.com/kb/en/charset/\n\n','MariaDB> SELECT CHARSET(\'abc\');\n -> \'latin1\'\nMariaDB> SELECT CHARSET(CONVERT(\'abc\' USING utf8));\n -> \'utf8\'\nMariaDB> SELECT CHARSET(USER());\n -> \'utf8\'\n','https://mariadb.com/kb/en/charset/'),(172,'SUBDATE',31,'Syntax:\nSUBDATE(date,INTERVAL expr unit), SUBDATE(expr,days)\n\nWhen invoked with the INTERVAL form of the second argument, SUBDATE()\nis a synonym for DATE_SUB(). For information on the INTERVAL unit\nargument, see the discussion for DATE_ADD().\n\nMariaDB> SELECT DATE_SUB(\'2008-01-02\', INTERVAL 31 DAY);\n -> \'2007-12-02\'\nMariaDB> SELECT SUBDATE(\'2008-01-02\', INTERVAL 31 DAY);\n -> \'2007-12-02\'\n\nThe second form enables the use of an integer value for days. In such\ncases, it is interpreted as the number of days to be subtracted from\nthe date or datetime expression expr.\n\nMariaDB> SELECT SUBDATE(\'2008-01-02 12:00:00\', 31);\n -> \'2007-12-02 12:00:00\'\n\nURL: https://mariadb.com/kb/en/subdate/\n\n','','https://mariadb.com/kb/en/subdate/'),(173,'DAYOFYEAR',31,'Syntax:\nDAYOFYEAR(date)\n\nReturns the day of the year for date, in the range 1 to 366.\n\nURL: https://mariadb.com/kb/en/dayofyear/\n\n','MariaDB> SELECT DAYOFYEAR(\'2007-02-03\');\n -> 34\n','https://mariadb.com/kb/en/dayofyear/'),(174,'%',4,'Syntax:\nN % M, N MOD M\n\nModulo operation. Returns the remainder of N divided by M. For more\ninformation, see the description for the MOD() function in\nhttps://mariadb.com/kb/en/mod/.\n\nURL: https://mariadb.com/kb/en/modulo-operator/\n\n','','https://mariadb.com/kb/en/modulo-operator/'),(175,'LONGTEXT',22,'LONGTEXT [CHARACTER SET charset_name] [COLLATE collation_name]\n\nA TEXT column with a maximum length of 4,294,967,295 or 4GB (232 - 1)\ncharacters. The effective maximum length is less if the value contains\nmulti-byte characters. The effective maximum length of LONGTEXT columns\nalso depends on the configured maximum packet size in the client/server\nprotocol and available memory. Each LONGTEXT value is stored using a\n4-byte length prefix that indicates the number of bytes in the value.\n\nURL: https://mariadb.com/kb/en/longtext/\n\n','','https://mariadb.com/kb/en/longtext/'),(176,'KILL',26,'Syntax:\nKILL [CONNECTION | QUERY] thread_id\n\nEach connection to mysqld runs in a separate thread. You can see which\nthreads are running with the SHOW PROCESSLIST statement and kill a\nthread with the KILL thread_id statement.\n\nKILL permits an optional CONNECTION or QUERY modifier:\n\no KILL CONNECTION is the same as KILL with no modifier: It terminates\n the connection associated with the given thread_id.\n\no KILL QUERY terminates the statement that the connection is currently\n executing, but leaves the connection itself intact.\n\nIf you have the PROCESS privilege, you can see all threads. If you have\nthe SUPER privilege, you can kill all threads and statements.\nOtherwise, you can see and kill only your own threads and statements.\n\nYou can also use the mysqladmin processlist and mysqladmin kill\ncommands to examine and kill threads.\n\n*Note*: You cannot use KILL with the Embedded MySQL Server library\nbecause the embedded server merely runs inside the threads of the host\napplication. It does not create any connection threads of its own.\n\nURL: https://mariadb.com/kb/en/data-manipulation-kill-connection-query/\n\n','','https://mariadb.com/kb/en/data-manipulation-kill-connection-query/'),(177,'DISJOINT',30,'Disjoint(g1,g2)\n\nReturns 1 or 0 to indicate whether g1 is spatially disjoint from (does\nnot intersect) g2.\n\nURL: https://mariadb.com/kb/en/disjoint/\n\n','','https://mariadb.com/kb/en/disjoint/'),(178,'ASTEXT',3,'AsText(g), AsWKT(g)\n\nConverts a value in internal geometry format to its WKT representation\nand returns the string result.\n\nURL: https://mariadb.com/kb/en/astext/\n\n','MariaDB> SET @g = \'LineString(1 1,2 2,3 3)\';\nMariaDB> SELECT AsText(GeomFromText(@g));\n+--------------------------+\n| AsText(GeomFromText(@g)) |\n+--------------------------+\n| LINESTRING(1 1,2 2,3 3) |\n+--------------------------+\n','https://mariadb.com/kb/en/astext/'),(179,'LPAD',37,'Syntax:\nLPAD(str,len,padstr)\n\nReturns the string str, left-padded with the string padstr to a length\nof len characters. If str is longer than len, the return value is\nshortened to len characters.\n\n\nURL: https://mariadb.com/kb/en/lpad/\n\n','MariaDB> SELECT LPAD(\'hi\',4,\'??\');\n -> \'??hi\'\nMariaDB> SELECT LPAD(\'hi\',1,\'??\');\n -> \'h\'\n','https://mariadb.com/kb/en/lpad/'),(180,'DECLARE CONDITION',23,'Syntax:\nDECLARE condition_name CONDITION FOR condition_value\n\ncondition_value:\n mysql_error_code\n | SQLSTATE [VALUE] sqlstate_value\n\nThe DECLARE ... CONDITION statement declares a named error condition,\nassociating a name with a condition that needs specific handling. The\nname can be referred to in a subsequent DECLARE ... HANDLER statement\n(see [HELP DECLARE HANDLER]).\n\nCondition declarations must appear before cursor or handler\ndeclarations.\n\nThe condition_value for DECLARE ... CONDITION can be a MySQL error code\n(a number) or an SQLSTATE value (a 5-character string literal). You\nshould not use MySQL error code 0 or SQLSTATE values that begin with\n\'00\', because those indicate success rather than an error condition.\nFor a list of MySQL error codes and SQLSTATE values, see\nhttps://mariadb.com/kb/en/mariadb-error-codes/.\n\nURL: https://mariadb.com/kb/en/declare-condition/\n\n','','https://mariadb.com/kb/en/declare-condition/'),(181,'OVERLAPS',30,'Overlaps(g1,g2)\n\nReturns 1 or 0 to indicate whether g1 spatially overlaps g2. The term\nspatially overlaps is used if two geometries intersect and their\nintersection results in a geometry of the same dimension but not equal\nto either of the given geometries.\n\nURL: https://mariadb.com/kb/en/overlaps/\n\n','','https://mariadb.com/kb/en/overlaps/'),(182,'SET GLOBAL SQL_SLAVE_SKIP_COUNTER',8,'Syntax:\nSET GLOBAL sql_slave_skip_counter = N\n\nThis statement skips the next N events from the master. This is useful\nfor recovering from replication stops caused by a statement.\n\nThis statement is valid only when the slave threads are not running.\nOtherwise, it produces an error.\n\nURL: https://mariadb.com/kb/en/set-global-sql_slave_skip_counter/\n\n','','https://mariadb.com/kb/en/set-global-sql_slave_skip_counter/'),(183,'NUMGEOMETRIES',25,'NumGeometries(gc)\n\nReturns the number of geometries in the GeometryCollection value gc.\n\nURL: https://mariadb.com/kb/en/numgeometries/\n\n','MariaDB> SET @gc = \'GeometryCollection(Point(1 1),LineString(2 2, 3 3))\';\nMariaDB> SELECT NumGeometries(GeomFromText(@gc));\n+----------------------------------+\n| NumGeometries(GeomFromText(@gc)) |\n+----------------------------------+\n| 2 |\n+----------------------------------+\n','https://mariadb.com/kb/en/numgeometries/'),(184,'MONTHNAME',31,'Syntax:\nMONTHNAME(date)\n\nReturns the full name of the month for date. The language used for the\nname is controlled by the value of the lc_time_names system variable\n(https://mariadb.com/kb/en/server-locale/).\n\nURL: https://mariadb.com/kb/en/monthname/\n\n','MariaDB> SELECT MONTHNAME(\'2008-02-03\');\n -> \'February\'\n','https://mariadb.com/kb/en/monthname/'),(185,'CHANGE MASTER TO',8,'Syntax:\nCHANGE MASTER TO option [, option] ...\n\noption:\n MASTER_BIND = \'interface_name\'\n | MASTER_HOST = \'host_name\'\n | MASTER_USER = \'user_name\'\n | MASTER_PASSWORD = \'password\'\n | MASTER_PORT = port_num\n | MASTER_CONNECT_RETRY = interval\n | MASTER_HEARTBEAT_PERIOD = interval\n | MASTER_LOG_FILE = \'master_log_name\'\n | MASTER_LOG_POS = master_log_pos\n | RELAY_LOG_FILE = \'relay_log_name\'\n | RELAY_LOG_POS = relay_log_pos\n | MASTER_SSL = {0|1}\n | MASTER_SSL_CA = \'ca_file_name\'\n | MASTER_SSL_CAPATH = \'ca_directory_name\'\n | MASTER_SSL_CERT = \'cert_file_name\'\n | MASTER_SSL_KEY = \'key_file_name\'\n | MASTER_SSL_CIPHER = \'cipher_list\'\n | MASTER_SSL_VERIFY_SERVER_CERT = {0|1}\n | IGNORE_SERVER_IDS = (server_id_list)\n\nserver_id_list:\n [server_id [, server_id] ... ]\n\nCHANGE MASTER TO changes the parameters that the slave server uses for\nconnecting to the master server, for reading the master binary log, and\nreading the slave relay log. It also updates the contents of the\nmaster.info and relay-log.info files. To use CHANGE MASTER TO, the\nslave replication threads must be stopped (use STOP SLAVE if\nnecessary).\n\nOptions not specified retain their value, except as indicated in the\nfollowing discussion. Thus, in most cases, there is no need to specify\noptions that do not change. For example, if the password to connect to\nyour MySQL master has changed, you just need to issue these statements\nto tell the slave about the new password:\n\nSTOP SLAVE; -- if replication was running\nCHANGE MASTER TO MASTER_PASSWORD=\'new3cret\';\nSTART SLAVE; -- if you want to restart replication\n\nMASTER_HOST, MASTER_USER, MASTER_PASSWORD, and MASTER_PORT provide\ninformation to the slave about how to connect to its master:\n\no MASTER_HOST and MASTER_PORT are the host name (or IP address) of the\n master host and its TCP/IP port.\n\n *Note*: Replication cannot use Unix socket files. You must be able to\n connect to the master MySQL server using TCP/IP.\n\n If you specify the MASTER_HOST or MASTER_PORT option, the slave\n assumes that the master server is different from before (even if the\n option value is the same as its current value.) In this case, the old\n values for the master binary log file name and position are\n considered no longer applicable, so if you do not specify\n MASTER_LOG_FILE and MASTER_LOG_POS in the statement,\n MASTER_LOG_FILE=\'\' and MASTER_LOG_POS=4 are silently appended to it.\n\n Setting MASTER_HOST=\'\' (that is, setting its value explicitly to an\n empty string) is not the same as not setting MASTER_HOST at all.\n Beginning with MySQL 5.5, trying to set MASTER_HOST to an empty\n string fails with an error. Previously, setting MASTER_HOST to an\n empty string caused START SLAVE subsequently to fail. (Bug #28796)\n\no MASTER_USER and MASTER_PASSWORD are the user name and password of the\n account to use for connecting to the master.\n\n In MySQL 5.5.20 and later, MASTER_USER cannot be made empty; setting\n MASTER_USER = \'\' or leaving it unset when setting a value for for\n MASTER_PASSWORD causes an error (Bug #13427949).\n\n Currently, a password used for a replication slave account is\n effectively limited to 32 characters in length; the password can be\n longer, but any excess characters are truncated. This is not due to\n any limit imposed by the MySQL Server generally, but rather is an\n issue specific to MySQL Replication. (For more information, see Bug\n #43439.)\n\n The text of a running CHANGE MASTER TO statement, including values\n for MASTER_USER and MASTER_PASSWORD, can be seen in the output of a\n concurrent SHOW PROCESSLIST statement.\n\nThe MASTER_SSL_xxx options provide information about using SSL for the\nconnection. They correspond to the --ssl-xxx options described in\nhttps://mariadb.com/kb/en/ssl-server-system-variables/, and\nhttp://dev.mysql.com/doc/refman/5.5/en/replication-solutions-ssl.html.\nThese options can be changed even on slaves that are compiled without\nSSL support. They are saved to the master.info file, but are ignored if\nthe slave does not have SSL support enabled.\n\nMASTER_CONNECT_RETRY specifies how many seconds to wait between connect\nretries. The default is 60. The number of reconnection attempts is\nlimited by the --master-retry-count server option; for more\ninformation, see\nhttps://mariadb.com/kb/en/replication-and-binary-log-server-system-variables/.\n\nMASTER_HEARTBEAT_PERIOD sets the interval in seconds between\nreplication heartbeats. Whenever the master\'s binary log is updated\nwith an event, the waiting period for the next heartbeat is reset.\ninterval is a decimal value having the range 0 to 4294967 seconds and a\nresolution in milliseconds; the smallest nonzero value is 0.001.\nHeartbeats are sent by the master only if there are no unsent events in\nthe binary log file for a period longer than interval.\n\nSetting interval to 0 disables heartbeats altogether. The default value\nfor interval is equal to the value of slave_net_timeout divided by 2.\n\nSetting @@global.slave_net_timeout to a value less than that of the\ncurrent heartbeat interval results in a warning being issued. The\neffect of issuing RESET SLAVE on the heartbeat interval is to reset it\nto the default value.\n\nMASTER_LOG_FILE and MASTER_LOG_POS are the coordinates at which the\nslave I/O thread should begin reading from the master the next time the\nthread starts. RELAY_LOG_FILE and RELAY_LOG_POS are the coordinates at\nwhich the slave SQL thread should begin reading from the relay log the\nnext time the thread starts. If you specify either of MASTER_LOG_FILE\nor MASTER_LOG_POS, you cannot specify RELAY_LOG_FILE or RELAY_LOG_POS.\nIf neither of MASTER_LOG_FILE or MASTER_LOG_POS is specified, the slave\nuses the last coordinates of the slave SQL thread before CHANGE MASTER\nTO was issued. This ensures that there is no discontinuity in\nreplication, even if the slave SQL thread was late compared to the\nslave I/O thread, when you merely want to change, say, the password to\nuse.\n\nCHANGE MASTER TO deletes all relay log files and starts a new one,\nunless you specify RELAY_LOG_FILE or RELAY_LOG_POS. In that case, relay\nlog files are kept; the relay_log_purge global variable is set silently\nto 0.\n\nPrior to MySQL 5.5, RELAY_LOG_FILE required an absolute path. In MySQL\n5.5, the path can be relative, in which case the path is assumed to be\nrelative to the slave\'s data directory. (Bug #12190)\n\nIGNORE_SERVER_IDS was added in MySQL 5.5. This option takes a\ncomma-separated list of 0 or more server IDs. Events originating from\nthe corresponding servers are ignored, with the exception of log\nrotation and deletion events, which are still recorded in the relay\nlog.\n\nIn circular replication, the originating server normally acts as the\nterminator of its own events, so that they are not applied more than\nonce. Thus, this option is useful in circular replication when one of\nthe servers in the circle is removed. Suppose that you have a circular\nreplication setup with 4 servers, having server IDs 1, 2, 3, and 4, and\nserver 3 fails. When bridging the gap by starting replication from\nserver 2 to server 4, you can include IGNORE_SERVER_IDS = (3) in the\nCHANGE MASTER TO statement that you issue on server 4 to tell it to use\nserver 2 as its master instead of server 3. Doing so causes it to\nignore and not to propagate any statements that originated with the\nserver that is no longer in use.\n\nIf a CHANGE MASTER TO statement is issued without any IGNORE_SERVER_IDS\noption, any existing list is preserved; RESET SLAVE also has no effect\non the server ID list. To clear the list of ignored servers, it is\nnecessary to use the option with an empty list:\n\nCHANGE MASTER TO IGNORE_SERVER_IDS = ();\n\nIf IGNORE_SERVER_IDS contains the server\'s own ID and the server was\nstarted with the --replicate-same-server-id option enabled, an error\nresults.\n\nAlso beginning with MySQL 5.5, the master.info file and the output of\nSHOW SLAVE STATUS are extended to provide the list of servers that are\ncurrently ignored. For more information, see\nhttps://mariadb.com/kb/en/show-slave-status/, and\n[HELP SHOW SLAVE STATUS].\n\nBeginning with MySQL 5.5.5, invoking CHANGE MASTER TO causes the\nprevious values for MASTER_HOST, MASTER_PORT, MASTER_LOG_FILE, and\nMASTER_LOG_POS to be written to the error log, along with other\ninformation about the slave\'s state prior to execution.\n\nCHANGE MASTER TO is useful for setting up a slave when you have the\nsnapshot of the master and have recorded the master binary log\ncoordinates corresponding to the time of the snapshot. After loading\nthe snapshot into the slave to synchronize it to the slave, you can run\nCHANGE MASTER TO MASTER_LOG_FILE=\'log_name\', MASTER_LOG_POS=log_pos on\nthe slave to specify the coordinates at which the slave should begin\nreading the master binary log.\n\nThe following example changes the master server the slave uses and\nestablishes the master binary log coordinates from which the slave\nbegins reading. This is used when you want to set up the slave to\nreplicate the master:\n\nCHANGE MASTER TO\n MASTER_HOST=\'master2.mycompany.com\',\n MASTER_USER=\'replication\',\n MASTER_PASSWORD=\'bigs3cret\',\n MASTER_PORT=3306,\n MASTER_LOG_FILE=\'master2-bin.001\',\n MASTER_LOG_POS=4,\n MASTER_CONNECT_RETRY=10;\n\nThe next example shows an operation that is less frequently employed.\nIt is used when the slave has relay log files that you want it to\nexecute again for some reason. To do this, the master need not be\nreachable. You need only use CHANGE MASTER TO and start the SQL thread\n(START SLAVE SQL_THREAD):\n\nCHANGE MASTER TO\n RELAY_LOG_FILE=\'slave-relay-bin.006\',\n RELAY_LOG_POS=4025;\n\nURL: https://mariadb.com/kb/en/change-master-to/\n\n','','https://mariadb.com/kb/en/change-master-to/'),(186,'DROP DATABASE',39,'Syntax:\nDROP {DATABASE | SCHEMA} [IF EXISTS] db_name\n\nDROP DATABASE drops all tables in the database and deletes the\ndatabase. Be very careful with this statement! To use DROP DATABASE,\nyou need the DROP privilege on the database. DROP SCHEMA is a synonym\nfor DROP DATABASE.\n\n*Important*: When a database is dropped, user privileges on the\ndatabase are not automatically dropped. See [HELP GRANT].\n\nIF EXISTS is used to prevent an error from occurring if the database\ndoes not exist.\n\nURL: https://mariadb.com/kb/en/drop-database/\n\n','','https://mariadb.com/kb/en/drop-database/'),(187,'MBREQUAL',6,'MBREqual(g1,g2)\n\nReturns 1 or 0 to indicate whether the Minimum Bounding Rectangles of\nthe two geometries g1 and g2 are the same.\n\nURL: https://mariadb.com/kb/en/mbrequal/\n\n','','https://mariadb.com/kb/en/mbrequal/'),(188,'TIMESTAMP FUNCTION',31,'Syntax:\nTIMESTAMP(expr), TIMESTAMP(expr1,expr2)\n\nWith a single argument, this function returns the date or datetime\nexpression expr as a datetime value. With two arguments, it adds the\ntime expression expr2 to the date or datetime expression expr1 and\nreturns the result as a datetime value.\n\nURL: https://mariadb.com/kb/en/timestamp-function/\n\n','MariaDB> SELECT TIMESTAMP(\'2003-12-31\');\n -> \'2003-12-31 00:00:00\'\nMariaDB> SELECT TIMESTAMP(\'2003-12-31 12:00:00\',\'12:00:00\');\n -> \'2004-01-01 00:00:00\'\n','https://mariadb.com/kb/en/timestamp-function/'),(189,'PROCEDURE ANALYSE',33,'Syntax:\nANALYSE([max_elements[,max_memory]])\n\nANALYSE() examines the result from a query and returns an analysis of\nthe results that suggests optimal data types for each column that may\nhelp reduce table sizes. To obtain this analysis, append PROCEDURE\nANALYSE to the end of a SELECT statement:\n\nSELECT ... FROM ... WHERE ... PROCEDURE ANALYSE([max_elements,[max_memory]])\n\nFor example:\n\nSELECT col1, col2 FROM table1 PROCEDURE ANALYSE(10, 2000);\n\nThe results show some statistics for the values returned by the query,\nand propose an optimal data type for the columns. This can be helpful\nfor checking your existing tables, or after importing new data. You may\nneed to try different settings for the arguments so that PROCEDURE\nANALYSE() does not suggest the ENUM data type when it is not\nappropriate.\n\nThe arguments are optional and are used as follows:\n\no max_elements (default 256) is the maximum number of distinct values\n that ANALYSE() notices per column. This is used by ANALYSE() to check\n whether the optimal data type should be of type ENUM; if there are\n more than max_elements distinct values, then ENUM is not a suggested\n type.\n\no max_memory (default 8192) is the maximum amount of memory that\n ANALYSE() should allocate per column while trying to find all\n distinct values.\n\nURL: https://mariadb.com/kb/en/procedure-analyse/\n\n','','https://mariadb.com/kb/en/procedure-analyse/'),(190,'HELP_VERSION',9,'This help information was generated from the MySQL 5.5 Reference Manual\non: 2012-08-25 (revision: 31914)\n\nThis information applies to MySQL 5.5 through 5.5.29.\n','',''),(191,'CHARACTER_LENGTH',37,'Syntax:\nCHARACTER_LENGTH(str)\n\nCHARACTER_LENGTH() is a synonym for CHAR_LENGTH().\n\nURL: https://mariadb.com/kb/en/character_length/\n\n','','https://mariadb.com/kb/en/character_length/'),(192,'SHOW GRANTS',26,'Syntax:\nSHOW GRANTS [FOR user]\n\nThis statement lists the GRANT statement or statements that must be\nissued to duplicate the privileges that are granted to a MySQL user\naccount. The account is named using the same format as for the GRANT\nstatement; for example, \'jeffrey\'@\'localhost\'. If you specify only the\nuser name part of the account name, a host name part of \'%\' is used.\nFor additional information about specifying account names, see [HELP\nGRANT].\n\nMariaDB> SHOW GRANTS FOR \'root\'@\'localhost\';\n+---------------------------------------------------------------------+\n| Grants for root@localhost |\n+---------------------------------------------------------------------+\n| GRANT ALL PRIVILEGES ON *.* TO \'root\'@\'localhost\' WITH GRANT OPTION |\n+---------------------------------------------------------------------+\n\nTo list the privileges granted to the account that you are using to\nconnect to the server, you can use any of the following statements:\n\nSHOW GRANTS;\nSHOW GRANTS FOR CURRENT_USER;\nSHOW GRANTS FOR CURRENT_USER();\n\nIf SHOW GRANTS FOR CURRENT_USER (or any of the equivalent syntaxes) is\nused in DEFINER context, such as within a stored procedure that is\ndefined with SQL SECURITY DEFINER), the grants displayed are those of\nthe definer and not the invoker.\n\nURL: https://mariadb.com/kb/en/show-grants/\n\n','','https://mariadb.com/kb/en/show-grants/'),(193,'SHOW PRIVILEGES',26,'Syntax:\nSHOW PRIVILEGES\n\nSHOW PRIVILEGES shows the list of system privileges that the MySQL\nserver supports. The exact list of privileges depends on the version of\nyour server.\n\nURL: https://mariadb.com/kb/en/show-privileges/\n\n','','https://mariadb.com/kb/en/show-privileges/'),(194,'CREATE TABLESPACE',39,'Syntax:\nCREATE TABLESPACE tablespace_name\n ADD DATAFILE \'file_name\'\n USE LOGFILE GROUP logfile_group\n [EXTENT_SIZE [=] extent_size]\n [INITIAL_SIZE [=] initial_size]\n [AUTOEXTEND_SIZE [=] autoextend_size]\n [MAX_SIZE [=] max_size]\n [NODEGROUP [=] nodegroup_id]\n [WAIT]\n [COMMENT [=] comment_text]\n ENGINE [=] engine_name\n\nThis statement is used with NDB cluster, which is not supported by MariaDB.','','https://mariadb.com/kb/en/create-tablespace/'),(195,'INSERT FUNCTION',37,'Syntax:\nINSERT(str,pos,len,newstr)\n\nReturns the string str, with the substring beginning at position pos\nand len characters long replaced by the string newstr. Returns the\noriginal string if pos is not within the length of the string. Replaces\nthe rest of the string from position pos if len is not within the\nlength of the rest of the string. Returns NULL if any argument is NULL.\n\nURL: https://mariadb.com/kb/en/insert-function/\n\n','MariaDB> SELECT INSERT(\'Quadratic\', 3, 4, \'What\');\n -> \'QuWhattic\'\nMariaDB> SELECT INSERT(\'Quadratic\', -1, 4, \'What\');\n -> \'Quadratic\'\nMariaDB> SELECT INSERT(\'Quadratic\', 3, 100, \'What\');\n -> \'QuWhat\'\n','https://mariadb.com/kb/en/insert-function/'),(196,'CRC32',4,'Syntax:\nCRC32(expr)\n\nComputes a cyclic redundancy check value and returns a 32-bit unsigned\nvalue. The result is NULL if the argument is NULL. The argument is\nexpected to be a string and (if possible) is treated as one if it is\nnot.\n\nURL: https://mariadb.com/kb/en/crc32/\n\n','MariaDB> SELECT CRC32(\'MySQL\');\n -> 3259397556\nMariaDB> SELECT CRC32(\'mysql\');\n -> 2501908538\n','https://mariadb.com/kb/en/crc32/'),(197,'XOR',15,'Syntax:\nXOR\n\nLogical XOR. Returns NULL if either operand is NULL. For non-NULL\noperands, evaluates to 1 if an odd number of operands is nonzero,\notherwise 0 is returned.\n\nURL: https://mariadb.com/kb/en/xor/\n\n','MariaDB> SELECT 1 XOR 1;\n -> 0\nMariaDB> SELECT 1 XOR 0;\n -> 1\nMariaDB> SELECT 1 XOR NULL;\n -> NULL\nMariaDB> SELECT 1 XOR 1 XOR 1;\n -> 1\n','https://mariadb.com/kb/en/xor/'),(198,'STARTPOINT',13,'StartPoint(ls)\n\nReturns the Point that is the start point of the LineString value ls.\n\nURL: https://mariadb.com/kb/en/startpoint/\n\n','MariaDB> SET @ls = \'LineString(1 1,2 2,3 3)\';\nMariaDB> SELECT AsText(StartPoint(GeomFromText(@ls)));\n+---------------------------------------+\n| AsText(StartPoint(GeomFromText(@ls))) |\n+---------------------------------------+\n| POINT(1 1) |\n+---------------------------------------+\n','https://mariadb.com/kb/en/startpoint/'),(199,'GRANT',10,'Syntax:\nGRANT\n priv_type [(column_list)]\n [, priv_type [(column_list)]] ...\n ON [object_type] priv_level\n TO user_specification [, user_specification] ...\n [REQUIRE {NONE | ssl_option [[AND] ssl_option] ...}]\n [WITH with_option ...]\n\nGRANT PROXY ON user_specification\n TO user_specification [, user_specification] ...\n [WITH GRANT OPTION]\n\nobject_type:\n TABLE\n | FUNCTION\n | PROCEDURE\n\npriv_level:\n *\n | *.*\n | db_name.*\n | db_name.tbl_name\n | tbl_name\n | db_name.routine_name\n\nuser_specification:\n user\n [\n IDENTIFIED BY [PASSWORD] \'password\'\n | IDENTIFIED WITH auth_plugin [AS \'auth_string\']\n ]\n\nssl_option:\n SSL\n | X509\n | CIPHER \'cipher\'\n | ISSUER \'issuer\'\n | SUBJECT \'subject\'\n\nwith_option:\n GRANT OPTION\n | MAX_QUERIES_PER_HOUR count\n | MAX_UPDATES_PER_HOUR count\n | MAX_CONNECTIONS_PER_HOUR count\n | MAX_USER_CONNECTIONS count\n\nThe GRANT statement grants privileges to MySQL user accounts. GRANT\nalso serves to specify other account characteristics such as use of\nsecure connections and limits on access to server resources. To use\nGRANT, you must have the GRANT OPTION privilege, and you must have the\nprivileges that you are granting.\n\nNormally, a database administrator first uses CREATE USER to create an\naccount, then GRANT to define its privileges and characteristics. For\nexample:\n\nCREATE USER \'jeffrey\'@\'localhost\' IDENTIFIED BY \'mypass\';\nGRANT ALL ON db1.* TO \'jeffrey\'@\'localhost\';\nGRANT SELECT ON db2.invoice TO \'jeffrey\'@\'localhost\';\nGRANT USAGE ON *.* TO \'jeffrey\'@\'localhost\' WITH MAX_QUERIES_PER_HOUR 90;\n\nHowever, if an account named in a GRANT statement does not already\nexist, GRANT may create it under the conditions described later in the\ndiscussion of the NO_AUTO_CREATE_USER SQL mode.\n\nThe REVOKE statement is related to GRANT and enables administrators to\nremove account privileges. See [HELP REVOKE].\n\nWhen successfully executed from the mysql program, GRANT responds with\nQuery OK, 0 rows affected. To determine what privileges result from the\noperation, use SHOW GRANTS. See [HELP SHOW GRANTS].\n\nURL: https://mariadb.com/kb/en/grant/\n\n','','https://mariadb.com/kb/en/grant/'),(200,'DECLARE VARIABLE',23,'Syntax:\nDECLARE var_name [, var_name] ... type [DEFAULT value]\n\nThis statement declares local variables within stored programs. To\nprovide a default value for a variable, include a DEFAULT clause. The\nvalue can be specified as an expression; it need not be a constant. If\nthe DEFAULT clause is missing, the initial value is NULL.\n\nLocal variables are treated like stored routine parameters with respect\nto data type and overflow checking. See [HELP CREATE PROCEDURE].\n\nVariable declarations must appear before cursor or handler\ndeclarations.\n\nLocal variable names are not case sensitive. Permissible characters and\nquoting rules are the same as for other identifiers, as described in\nhttps://mariadb.com/kb/en/identifier-names/.\n\nThe scope of a local variable is the BEGIN ... END block within which\nit is declared. The variable can be referred to in blocks nested within\nthe declaring block, except those blocks that declare a variable with\nthe same name.\n\nURL: https://mariadb.com/kb/en/declare-variable/\n\n','','https://mariadb.com/kb/en/declare-variable/'),(201,'MPOLYFROMTEXT',3,'MPolyFromText(wkt[,srid]), MultiPolygonFromText(wkt[,srid])\n\nConstructs a MULTIPOLYGON value using its WKT representation and SRID.\n\nURL: https://mariadb.com/kb/en/mpolyfromtext/\n\n','','https://mariadb.com/kb/en/mpolyfromtext/'),(202,'MBRINTERSECTS',6,'MBRIntersects(g1,g2)\n\nReturns 1 or 0 to indicate whether the Minimum Bounding Rectangles of\nthe two geometries g1 and g2 intersect.\n\nURL: https://mariadb.com/kb/en/mbrintersects/\n\n','','https://mariadb.com/kb/en/mbrintersects/'),(203,'BIT_OR',16,'Syntax:\nBIT_OR(expr)\n\nReturns the bitwise OR of all bits in expr. The calculation is\nperformed with 64-bit (BIGINT) precision.\n\nURL: https://mariadb.com/kb/en/bit_or/\n\n','','https://mariadb.com/kb/en/bit_or/'),(204,'YEARWEEK',31,'Syntax:\nYEARWEEK(date), YEARWEEK(date,mode)\n\nReturns year and week for a date. The mode argument works exactly like\nthe mode argument to WEEK(). The year in the result may be different\nfrom the year in the date argument for the first and the last week of\nthe year.\n\nURL: https://mariadb.com/kb/en/yearweek/\n\n','MariaDB> SELECT YEARWEEK(\'1987-01-01\');\n -> 198653\n','https://mariadb.com/kb/en/yearweek/'),(205,'NOT BETWEEN',18,'Syntax:\nexpr NOT BETWEEN min AND max\n\nThis is the same as NOT (expr BETWEEN min AND max).\n\nURL: https://mariadb.com/kb/en/not-between/\n\n','','https://mariadb.com/kb/en/not-between/'),(206,'IS NOT',18,'Syntax:\nIS NOT boolean_value\n\nTests a value against a boolean value, where boolean_value can be TRUE,\nFALSE, or UNKNOWN.\n\nURL: https://mariadb.com/kb/en/is-not/\n\n','MariaDB> SELECT 1 IS NOT UNKNOWN, 0 IS NOT UNKNOWN, NULL IS NOT UNKNOWN;\n -> 1, 1, 0\n','https://mariadb.com/kb/en/is-not/'),(207,'LOG10',4,'Syntax:\nLOG10(X)\n\nReturns the base-10 logarithm of X.\n\nURL: https://mariadb.com/kb/en/log10/\n\n','MariaDB> SELECT LOG10(2);\n -> 0.30102999566398\nMariaDB> SELECT LOG10(100);\n -> 2\nMariaDB> SELECT LOG10(-100);\n -> NULL\n','https://mariadb.com/kb/en/log10/'),(208,'SQRT',4,'Syntax:\nSQRT(X)\n\nReturns the square root of a nonnegative number X.\n\nURL: https://mariadb.com/kb/en/sqrt/\n\n','MariaDB> SELECT SQRT(4);\n -> 2\nMariaDB> SELECT SQRT(20);\n -> 4.4721359549996\nMariaDB> SELECT SQRT(-16);\n -> NULL\n','https://mariadb.com/kb/en/sqrt/'),(209,'DECIMAL',22,'DECIMAL[(M[,D])] [UNSIGNED] [ZEROFILL]\n\nA packed \"exact\" fixed-point number. M is the total number of digits\n(the precision) and D is the number of digits after the decimal point\n(the scale). The decimal point and (for negative numbers) the \"-\" sign\nare not counted in M. If D is 0, values have no decimal point or\nfractional part. The maximum number of digits (M) for DECIMAL is 65.\nThe maximum number of supported decimals (D) is 30. If D is omitted,\nthe default is 0. If M is omitted, the default is 10.\n\nUNSIGNED, if specified, disallows negative values.\n\nAll basic calculations (+, -, *, /) with DECIMAL columns are done with\na precision of 65 digits.\n\nURL: https://mariadb.com/kb/en/decimal/\n\n','','https://mariadb.com/kb/en/decimal/'),(210,'CREATE INDEX',39,'Syntax:\nCREATE [ONLINE|OFFLINE] [UNIQUE|FULLTEXT|SPATIAL] INDEX index_name\n [index_type]\n ON tbl_name (index_col_name,...)\n [index_option] ...\n\nindex_col_name:\n col_name [(length)] [ASC | DESC]\n\nindex_type:\n USING {BTREE | HASH}\n\nindex_option:\n KEY_BLOCK_SIZE [=] value\n | index_type\n | WITH PARSER parser_name\n | COMMENT \'string\'\n\nCREATE INDEX is mapped to an ALTER TABLE statement to create indexes.\nSee [HELP ALTER TABLE]. CREATE INDEX cannot be used to create a PRIMARY\nKEY; use ALTER TABLE instead. For more information about indexes, see\nhttps://mariadb.com/kb/en/optimization-and-indexes/.\n\nURL: https://mariadb.com/kb/en/create-index/\n\n','','https://mariadb.com/kb/en/create-index/'),(211,'CREATE FUNCTION',39,'The CREATE FUNCTION statement is used to create stored functions and\nuser-defined functions (UDFs):\n\no For information about creating stored functions, see [HELP CREATE\n PROCEDURE].\n\no For information about creating user-defined functions, see [HELP\n CREATE FUNCTION UDF].\n\nURL: https://mariadb.com/kb/en/create-function/\n\n','','https://mariadb.com/kb/en/create-function/'),(212,'ALTER DATABASE',39,'Syntax:\nALTER {DATABASE | SCHEMA} [db_name]\n alter_specification ...\nALTER {DATABASE | SCHEMA} db_name\n UPGRADE DATA DIRECTORY NAME\n\nalter_specification:\n [DEFAULT] CHARACTER SET [=] charset_name\n | [DEFAULT] COLLATE [=] collation_name\n\nALTER DATABASE enables you to change the overall characteristics of a\ndatabase. These characteristics are stored in the db.opt file in the\ndatabase directory. To use ALTER DATABASE, you need the ALTER privilege\non the database. ALTER SCHEMA is a synonym for ALTER DATABASE.\n\nThe database name can be omitted from the first syntax, in which case\nthe statement applies to the default database.\n\nNational Language Characteristics\n\nThe CHARACTER SET clause changes the default database character set.\nThe COLLATE clause changes the default database collation.\nhttps://mariadb.com/kb/en/data-types-character-sets-and-collations/, discusses\ncharacter set and collation names.\n\nYou can see what character sets and collations are available using,\nrespectively, the SHOW CHARACTER SET and SHOW COLLATION statements. See\n[HELP SHOW CHARACTER SET], and [HELP SHOW COLLATION], for more\ninformation.\n\nIf you change the default character set or collation for a database,\nstored routines that use the database defaults must be dropped and\nrecreated so that they use the new defaults. (In a stored routine,\nvariables with character data types use the database defaults if the\ncharacter set or collation are not specified explicitly. See [HELP\nCREATE PROCEDURE].)\n\nUpgrading from Versions Older than MySQL 5.1\n\nThe syntax that includes the UPGRADE DATA DIRECTORY NAME clause updates\nthe name of the directory associated with the database to use the\nencoding implemented in MySQL 5.1 for mapping database names to\ndatabase directory names (see\nhttps://mariadb.com/kb/en/identifier-to-file-name-mapping/). This\nclause is for use under these conditions:\n\no It is intended when upgrading MySQL to 5.1 or later from older\n versions.\n\no It is intended to update a database directory name to the current\n encoding format if the name contains special characters that need\n encoding.\n\no The statement is used by mysqlcheck (as invoked by mysql_upgrade).\n\nFor example, if a database in MySQL 5.0 has the name a-b-c, the name\ncontains instances of the - (dash) character. In MySQL 5.0, the\ndatabase directory is also named a-b-c, which is not necessarily safe\nfor all file systems. In MySQL 5.1 and later, the same database name is\nencoded as a@002db@002dc to produce a file system-neutral directory\nname.\n\nWhen a MySQL installation is upgraded to MySQL 5.1 or later from an\nolder version,the server displays a name such as a-b-c (which is in the\nold format) as #mysql50#a-b-c, and you must refer to the name using the\n#mysql50# prefix. Use UPGRADE DATA DIRECTORY NAME in this case to\nexplicitly tell the server to re-encode the database directory name to\nthe current encoding format:\n\nALTER DATABASE `#mysql50#a-b-c` UPGRADE DATA DIRECTORY NAME;\n\nAfter executing this statement, you can refer to the database as a-b-c\nwithout the special #mysql50# prefix.\n\nURL: https://mariadb.com/kb/en/alter-database/\n\n','','https://mariadb.com/kb/en/alter-database/'),(213,'GEOMETRYN',25,'GeometryN(gc,N)\n\nReturns the N-th geometry in the GeometryCollection value gc.\nGeometries are numbered beginning with 1.\n\nURL: https://mariadb.com/kb/en/geometryn/\n\n','MariaDB> SET @gc = \'GeometryCollection(Point(1 1),LineString(2 2, 3 3))\';\nMariaDB> SELECT AsText(GeometryN(GeomFromText(@gc),1));\n+----------------------------------------+\n| AsText(GeometryN(GeomFromText(@gc),1)) |\n+----------------------------------------+\n| POINT(1 1) |\n+----------------------------------------+\n','https://mariadb.com/kb/en/geometryn/'),(214,'<<',19,'Syntax:\n<<\n\nShifts a longlong (BIGINT) number to the left.\n\nURL: https://mariadb.com/kb/en/shift-left/\n\n','MariaDB> SELECT 1 << 2;\n -> 4\n','https://mariadb.com/kb/en/shift-left/'),(215,'SHOW TABLE STATUS',26,'Syntax:\nSHOW TABLE STATUS [{FROM | IN} db_name]\n [LIKE \'pattern\' | WHERE expr]\n\nSHOW TABLE STATUS works likes SHOW TABLES, but provides a lot of\ninformation about each non-TEMPORARY table. You can also get this list\nusing the mysqlshow --status db_name command. The LIKE clause, if\npresent, indicates which table names to match. The WHERE clause can be\ngiven to select rows using more general conditions, as discussed in\nhttps://mariadb.com/kb/en/extended-show/.\n\nURL: https://mariadb.com/kb/en/show-table-status/\n\n','','https://mariadb.com/kb/en/show-table-status/'),(216,'MD5',12,'Syntax:\nMD5(str)\n\nCalculates an MD5 128-bit checksum for the string. The value is\nreturned as a string of 32 hex digits, or NULL if the argument was\nNULL. The return value can, for example, be used as a hash key. See the\nnotes at the beginning of this section about storing hash values\nefficiently.\n\nAs of MySQL 5.5.3, the return value is a nonbinary string in the\nconnection character set. Before 5.5.3, the return value is a binary\nstring; see the notes at the beginning of this section about using the\nvalue as a nonbinary string.\n\nURL: https://mariadb.com/kb/en/md5/\n\n','MariaDB> SELECT MD5(\'testing\');\n -> \'ae2b1fca515949e5d54fb22b8ed95575\'\n','https://mariadb.com/kb/en/md5/'),(217,'<',18,'Syntax:\n<\n\nLess than:\n\nURL: https://mariadb.com/kb/en/less-than/\n\n','MariaDB> SELECT 2 < 2;\n -> 0\n','https://mariadb.com/kb/en/less-than/'),(218,'UNIX_TIMESTAMP',31,'Syntax:\nUNIX_TIMESTAMP(), UNIX_TIMESTAMP(date)\n\nIf called with no argument, returns a Unix timestamp (seconds since\n\'1970-01-01 00:00:00\' UTC) as an unsigned integer. If UNIX_TIMESTAMP()\nis called with a date argument, it returns the value of the argument as\nseconds since \'1970-01-01 00:00:00\' UTC. date may be a DATE string, a\nDATETIME string, a TIMESTAMP, or a number in the format YYMMDD or\nYYYYMMDD. The server interprets date as a value in the current time\nzone and converts it to an internal value in UTC. Clients can set their\ntime zone as described in\nhttps://mariadb.com/kb/en/time-zones/.\n\nURL: https://mariadb.com/kb/en/unix_timestamp/\n\n','MariaDB> SELECT UNIX_TIMESTAMP();\n -> 1196440210\nMariaDB> SELECT UNIX_TIMESTAMP(\'2007-11-30 10:30:19\');\n -> 1196440219\n','https://mariadb.com/kb/en/unix_timestamp/'),(219,'DAYOFMONTH',31,'Syntax:\nDAYOFMONTH(date)\n\nReturns the day of the month for date, in the range 1 to 31, or 0 for\ndates such as \'0000-00-00\' or \'2008-00-00\' that have a zero day part.\n\nURL: https://mariadb.com/kb/en/dayofmonth/\n\n','MariaDB> SELECT DAYOFMONTH(\'2007-02-03\');\n -> 3\n','https://mariadb.com/kb/en/dayofmonth/'),(220,'ASCII',37,'Syntax:\nASCII(str)\n\nReturns the numeric value of the leftmost character of the string str.\nReturns 0 if str is the empty string. Returns NULL if str is NULL.\nASCII() works for 8-bit characters.\n\nURL: https://mariadb.com/kb/en/ascii/\n\n','MariaDB> SELECT ASCII(\'2\');\n -> 50\nMariaDB> SELECT ASCII(2);\n -> 50\nMariaDB> SELECT ASCII(\'dx\');\n -> 100\n','https://mariadb.com/kb/en/ascii/'),(221,'DIV',4,'Syntax:\nDIV\n\nInteger division. Similar to FLOOR(), but is safe with BIGINT values.\n\nAs of MySQL 5.5.3, if either operand has a noninteger type, the\noperands are converted to DECIMAL and divided using DECIMAL arithmetic\nbefore converting the result to BIGINT. If the result exceeds BIGINT\nrange, an error occurs. Before MySQL 5.5.3, incorrect results may occur\nfor noninteger operands that exceed BIGINT range.\n\nURL: https://mariadb.com/kb/en/div/\n\n','MariaDB> SELECT 5 DIV 2;\n -> 2\n','https://mariadb.com/kb/en/div/'),(222,'RENAME USER',10,'Syntax:\nRENAME USER old_user TO new_user\n [, old_user TO new_user] ...\n\nThe RENAME USER statement renames existing MySQL accounts. To use it,\nyou must have the global CREATE USER privilege or the UPDATE privilege\nfor the mysql database. An error occurs if any old account does not\nexist or any new account exists. Each account name uses the format\ndescribed in https://mariadb.com/kb/en/create-user/#account-names.\nFor example:\n\nRENAME USER \'jeffrey\'@\'localhost\' TO \'jeff\'@\'127.0.0.1\';\n\nIf you specify only the user name part of the account name, a host name\npart of \'%\' is used.\n\nRENAME USER causes the privileges held by the old user to be those held\nby the new user. However, RENAME USER does not automatically drop or\ninvalidate databases or objects within them that the old user created.\nThis includes stored programs or views for which the DEFINER attribute\nnames the old user. Attempts to access such objects may produce an\nerror if they execute in definer security context. (For information\nabout security context, see\nhttps://mariadb.com/kb/en/stored-routine-privileges/.)\n\nThe privilege changes take effect as indicated in\nhttp://dev.mysql.com/doc/refman/5.5/en/privilege-changes.html.\n\nURL: https://mariadb.com/kb/en/rename-user/\n\n','','https://mariadb.com/kb/en/rename-user/'),(223,'SHOW SLAVE STATUS',26,'Syntax:\nSHOW SLAVE STATUS\n\nThis statement provides status information on essential parameters of\nthe slave threads. It requires either the SUPER or REPLICATION CLIENT\nprivilege.\n\nIf you issue this statement using the mysql client, you can use a \\G\nstatement terminator rather than a semicolon to obtain a more readable\nvertical layout:\n\nMariaDB> SHOW SLAVE STATUS\\G\n*************************** 1. row ***************************\n Slave_IO_State: Waiting for master to send event\n Master_Host: localhost\n Master_User: root\n Master_Port: 3306\n Connect_Retry: 3\n Master_Log_File: gbichot-bin.005\n Read_Master_Log_Pos: 79\n Relay_Log_File: gbichot-relay-bin.005\n Relay_Log_Pos: 548\n Relay_Master_Log_File: gbichot-bin.005\n Slave_IO_Running: Yes\n Slave_SQL_Running: Yes\n Replicate_Do_DB:\n Replicate_Ignore_DB:\n Replicate_Do_Table:\n Replicate_Ignore_Table:\n Replicate_Wild_Do_Table:\n Replicate_Wild_Ignore_Table:\n Last_Errno: 0\n Last_Error:\n Skip_Counter: 0\n Exec_Master_Log_Pos: 79\n Relay_Log_Space: 552\n Until_Condition: None\n Until_Log_File:\n Until_Log_Pos: 0\n Master_SSL_Allowed: No\n Master_SSL_CA_File:\n Master_SSL_CA_Path:\n Master_SSL_Cert:\n Master_SSL_Cipher:\n Master_SSL_Key:\n Seconds_Behind_Master: 8\nMaster_SSL_Verify_Server_Cert: No\n Last_IO_Errno: 0\n Last_IO_Error:\n Last_SQL_Errno: 0\n Last_SQL_Error:\n Replicate_Ignore_Server_Ids: 0\n Master_Server_Id: 1\n\nURL: https://mariadb.com/kb/en/show-slave-status/\n\n','','https://mariadb.com/kb/en/show-slave-status/'),(224,'GEOMETRY',34,'MySQL provides a standard way of creating spatial columns for geometry\ntypes, for example, with CREATE TABLE or ALTER TABLE. Currently,\nspatial columns are supported for MyISAM, Aria, InnoDB and ARCHIVE\ntables. See also the annotations about spatial indexes under [HELP\nSPATIAL].\n\nURL: https://mariadb.com/kb/en/gis-functionality/\n\n','CREATE TABLE geom (g GEOMETRY);\n','https://mariadb.com/kb/en/gis-functionality/'),(225,'NUMPOINTS',13,'NumPoints(ls)\n\nReturns the number of Point objects in the LineString value ls.\n\nURL: https://mariadb.com/kb/en/numpoints/\n\n','MariaDB> SET @ls = \'LineString(1 1,2 2,3 3)\';\nMariaDB> SELECT NumPoints(GeomFromText(@ls));\n+------------------------------+\n| NumPoints(GeomFromText(@ls)) |\n+------------------------------+\n| 3 |\n+------------------------------+\n','https://mariadb.com/kb/en/numpoints/'),(226,'ALTER LOGFILE GROUP',39,'Syntax:\nALTER LOGFILE GROUP logfile_group\n ADD UNDOFILE \'file_name\'\n [INITIAL_SIZE [=] size]\n [WAIT]\n ENGINE [=] engine_name\n\nThis statement is used with NDB cluster, which is not supported by MariaDB.\n','','https://mariadb.com/kb/en/alter-logfile-group/'),(227,'&',19,'Syntax:\n&\n\nBitwise AND:\n\nURL: https://mariadb.com/kb/en/bitwise_and/\n\n','MariaDB> SELECT 29 & 15;\n -> 13\n','https://mariadb.com/kb/en/bitwise_and/'),(228,'LOCALTIMESTAMP',31,'Syntax:\nLOCALTIMESTAMP, LOCALTIMESTAMP()\n\nLOCALTIMESTAMP and LOCALTIMESTAMP() are synonyms for NOW().\n\nURL: https://mariadb.com/kb/en/localtimestamp/\n\n','','https://mariadb.com/kb/en/localtimestamp/'),(229,'ASSIGN-EQUAL',15,'Syntax:\n=\n\nThis operator is used to perform value assignments in two cases,\ndescribed in the next two paragraphs.\n\nWithin a SET statement, = is treated as an assignment operator that\ncauses the user variable on the left hand side of the operator to take\non the value to its right. (In other words, when used in a SET\nstatement, = is treated identically to :=.) The value on the right hand\nside may be a literal value, another variable storing a value, or any\nlegal expression that yields a scalar value, including the result of a\nquery (provided that this value is a scalar value). You can perform\nmultiple assignments in the same SET statement.\n\nIn the SET clause of an UPDATE statement, = also acts as an assignment\noperator; in this case, however, it causes the column named on the left\nhand side of the operator to assume the value given to the right,\nprovided any WHERE conditions that are part of the UPDATE are met. You\ncan make multiple assignments in the same SET clause of an UPDATE\nstatement.\n\nIn any other context, = is treated as a comparison operator.\n\nURL: https://mariadb.com/kb/en/assignment-operators-assignment-operator/\n\n','MariaDB> SELECT @var1, @var2;\n -> NULL, NULL\nMariaDB> SELECT @var1 := 1, @var2;\n -> 1, NULL\nMariaDB> SELECT @var1, @var2;\n -> 1, NULL\nMariaDB> SELECT @var1, @var2 := @var1;\n -> 1, 1\nMariaDB> SELECT @var1, @var2;\n -> 1, 1\n','https://mariadb.com/kb/en/assignment-operators-assignment-operator/'),(230,'CONVERT',37,'Syntax:\nCONVERT(expr,type), CONVERT(expr USING transcoding_name)\n\nThe CONVERT() and CAST() functions take an expression of any type and\nproduce a result value of a specified type.\n\nThe type for the result can be one of the following values:\n\no BINARY[(N)]\n\no CHAR[(N)]\n\no DATE\n\no DATETIME\n\no DECIMAL[(M[,D])]\n\no SIGNED [INTEGER]\n\no TIME\n\no UNSIGNED [INTEGER]\n\nBINARY produces a string with the BINARY data type. See\nhttps://mariadb.com/kb/en/binary/ for a\ndescription of how this affects comparisons. If the optional length N\nis given, BINARY(N) causes the cast to use no more than N bytes of the\nargument. Values shorter than N bytes are padded with 0x00 bytes to a\nlength of N.\n\nCHAR(N) causes the cast to use no more than N characters of the\nargument.\n\nCAST() and CONVERT(... USING ...) are standard SQL syntax. The\nnon-USING form of CONVERT() is ODBC syntax.\n\nCONVERT() with USING is used to convert data between different\ncharacter sets. In MySQL, transcoding names are the same as the\ncorresponding character set names. For example, this statement converts\nthe string \'abc\' in the default character set to the corresponding\nstring in the utf8 character set:\n\nSELECT CONVERT(\'abc\' USING utf8);\n\nURL: https://mariadb.com/kb/en/convert/\n\n','SELECT enum_col FROM tbl_name ORDER BY CAST(enum_col AS CHAR);\n','https://mariadb.com/kb/en/convert/'),(231,'ADDDATE',31,'Syntax:\nADDDATE(date,INTERVAL expr unit), ADDDATE(expr,days)\n\nWhen invoked with the INTERVAL form of the second argument, ADDDATE()\nis a synonym for DATE_ADD(). The related function SUBDATE() is a\nsynonym for DATE_SUB(). For information on the INTERVAL unit argument,\nsee the discussion for DATE_ADD().\n\nMariaDB> SELECT DATE_ADD(\'2008-01-02\', INTERVAL 31 DAY);\n -> \'2008-02-02\'\nMariaDB> SELECT ADDDATE(\'2008-01-02\', INTERVAL 31 DAY);\n -> \'2008-02-02\'\n\nWhen invoked with the days form of the second argument, MySQL treats it\nas an integer number of days to be added to expr.\n\nURL: https://mariadb.com/kb/en/adddate/\n\n','MariaDB> SELECT ADDDATE(\'2008-01-02\', 31);\n -> \'2008-02-02\'\n','https://mariadb.com/kb/en/adddate/'),(232,'REPEAT LOOP',23,'Syntax:\n[begin_label:] REPEAT\n statement_list\nUNTIL search_condition\nEND REPEAT [end_label]\n\nThe statement list within a REPEAT statement is repeated until the\nsearch_condition expression is true. Thus, a REPEAT always enters the\nloop at least once. statement_list consists of one or more statements,\neach terminated by a semicolon (;) statement delimiter.\n\nA REPEAT statement can be labeled. For the rules regarding label use,\nsee [HELP labels].\n\nURL: https://mariadb.com/kb/en/repeat-loop/\n\n','MariaDB> delimiter //\n\nMariaDB> CREATE PROCEDURE dorepeat(p1 INT)\n -> BEGIN\n -> SET @x = 0;\n -> REPEAT\n -> SET @x = @x + 1;\n -> UNTIL @x > p1 END REPEAT;\n -> END\n -> //\nQuery OK, 0 rows affected (0.00 sec)\n\nMariaDB> CALL dorepeat(1000)//\nQuery OK, 0 rows affected (0.00 sec)\n\nMariaDB> SELECT @x//\n+------+\n| @x |\n+------+\n| 1001 |\n+------+\n1 row in set (0.00 sec)\n','https://mariadb.com/kb/en/repeat-loop/'),(233,'ALTER FUNCTION',39,'Syntax:\nALTER FUNCTION func_name [characteristic ...]\n\ncharacteristic:\n COMMENT \'string\'\n | LANGUAGE SQL\n | { CONTAINS SQL | NO SQL | READS SQL DATA | MODIFIES SQL DATA }\n | SQL SECURITY { DEFINER | INVOKER }\n\nThis statement can be used to change the characteristics of a stored\nfunction. More than one change may be specified in an ALTER FUNCTION\nstatement. However, you cannot change the parameters or body of a\nstored function using this statement; to make such changes, you must\ndrop and re-create the function using DROP FUNCTION and CREATE\nFUNCTION.\n\nYou must have the ALTER ROUTINE privilege for the function. (That\nprivilege is granted automatically to the function creator.) If binary\nlogging is enabled, the ALTER FUNCTION statement might also require the\nSUPER privilege, as described in\nhttps://mariadb.com/kb/en/binary-logging-of-stored-routines/.\n\nURL: https://mariadb.com/kb/en/alter-function/\n\n','','https://mariadb.com/kb/en/alter-function/'),(234,'SMALLINT',22,'SMALLINT[(M)] [UNSIGNED] [ZEROFILL]\n\nA small integer. The signed range is -32768 to 32767. The unsigned\nrange is 0 to 65535.\n\nURL: https://mariadb.com/kb/en/smallint/\n\n','','https://mariadb.com/kb/en/smallint/'),(235,'DOUBLE PRECISION',22,'DOUBLE PRECISION[(M,D)] [UNSIGNED] [ZEROFILL], REAL[(M,D)] [UNSIGNED]\n[ZEROFILL]\n\nThese types are synonyms for DOUBLE. Exception: If the REAL_AS_FLOAT\nSQL mode is enabled, REAL is a synonym for FLOAT rather than DOUBLE.\n\nURL: https://mariadb.com/kb/en/double-precision/\n\n','','https://mariadb.com/kb/en/double-precision/'),(236,'ORD',37,'Syntax:\nORD(str)\n\nIf the leftmost character of the string str is a multi-byte character,\nreturns the code for that character, calculated from the numeric values\nof its constituent bytes using this formula:\n\n (1st byte code)\n+ (2nd byte code * 256)\n+ (3rd byte code * 2562) ...\n\nIf the leftmost character is not a multi-byte character, ORD() returns\nthe same value as the ASCII() function.\n\nURL: https://mariadb.com/kb/en/ord/\n\n','MariaDB> SELECT ORD(\'2\');\n -> 50\n','https://mariadb.com/kb/en/ord/'),(237,'DEALLOCATE PREPARE',8,'Syntax:\n{DEALLOCATE | DROP} PREPARE stmt_name\n\nTo deallocate a prepared statement produced with PREPARE, use a\nDEALLOCATE PREPARE statement that refers to the prepared statement\nname. Attempting to execute a prepared statement after deallocating it\nresults in an error.\n\nURL: https://mariadb.com/kb/en/deallocate-drop-prepared-statement/\n\n','','https://mariadb.com/kb/en/deallocate-drop-prepared-statement/'),(238,'ENVELOPE',36,'Envelope(g)\n\nReturns the Minimum Bounding Rectangle (MBR) for the geometry value g.\nThe result is returned as a Polygon value.\n\nThe polygon is defined by the corner points of the bounding box:\n\nPOLYGON((MINX MINY, MAXX MINY, MAXX MAXY, MINX MAXY, MINX MINY))\n\nURL: https://mariadb.com/kb/en/envelope/\n\n','MariaDB> SELECT AsText(Envelope(GeomFromText(\'LineString(1 1,2 2)\')));\n+-------------------------------------------------------+\n| AsText(Envelope(GeomFromText(\'LineString(1 1,2 2)\'))) |\n+-------------------------------------------------------+\n| POLYGON((1 1,2 1,2 2,1 2,1 1)) |\n+-------------------------------------------------------+\n','https://mariadb.com/kb/en/envelope/'),(239,'IS_FREE_LOCK',14,'Syntax:\nIS_FREE_LOCK(str)\n\nChecks whether the lock named str is free to use (that is, not locked).\nReturns 1 if the lock is free (no one is using the lock), 0 if the lock\nis in use, and NULL if an error occurs (such as an incorrect argument).\n\nURL: https://mariadb.com/kb/en/is_free_lock/\n\n','','https://mariadb.com/kb/en/is_free_lock/'),(240,'TOUCHES',30,'Touches(g1,g2)\n\nReturns 1 or 0 to indicate whether g1 spatially touches g2. Two\ngeometries spatially touch if the interiors of the geometries do not\nintersect, but the boundary of one of the geometries intersects either\nthe boundary or the interior of the other.\n\nURL: https://mariadb.com/kb/en/touches/\n\n','','https://mariadb.com/kb/en/touches/'),(241,'INET_ATON',14,'Syntax:\nINET_ATON(expr)\n\nGiven the dotted-quad representation of an IPv4 network address as a\nstring, returns an integer that represents the numeric value of the\naddress in network byte order (big endian). INET_ATON() returns NULL if\nit does not understand its argument.\n\nURL: https://mariadb.com/kb/en/inet_aton/\n\n','MariaDB> SELECT INET_ATON(\'10.0.5.9\');\n -> 167773449\n','https://mariadb.com/kb/en/inet_aton/'),(242,'UNCOMPRESS',12,'Syntax:\nUNCOMPRESS(string_to_uncompress)\n\nUncompresses a string compressed by the COMPRESS() function. If the\nargument is not a compressed value, the result is NULL. This function\nrequires MySQL to have been compiled with a compression library such as\nzlib. Otherwise, the return value is always NULL.\n\nURL: https://mariadb.com/kb/en/uncompress/\n\n','MariaDB> SELECT UNCOMPRESS(COMPRESS(\'any string\'));\n -> \'any string\'\nMariaDB> SELECT UNCOMPRESS(\'any string\');\n -> NULL\n','https://mariadb.com/kb/en/uncompress/'),(243,'AUTO_INCREMENT',22,'The AUTO_INCREMENT attribute can be used to generate a unique identity\nfor new rows:\n\nURL: https://mariadb.com/kb/en/auto_increment/\n\n','CREATE TABLE animals (\n id MEDIUMINT NOT NULL AUTO_INCREMENT,\n name CHAR(30) NOT NULL,\n PRIMARY KEY (id)\n);\n\nINSERT INTO animals (name) VALUES\n (\'dog\'),(\'cat\'),(\'penguin\'),\n (\'lax\'),(\'whale\'),(\'ostrich\');\n\nSELECT * FROM animals;\n','https://mariadb.com/kb/en/auto_increment/'),(244,'ISSIMPLE',36,'IsSimple(g)\n\nCurrently, this function is a placeholder and should not be used. If\nimplemented, its behavior will be as described in the next paragraph.\n\nReturns 1 if the geometry value g has no anomalous geometric points,\nsuch as self-intersection or self-tangency. IsSimple() returns 0 if the\nargument is not simple, and -1 if it is NULL.\n\nThe description of each instantiable geometric class given earlier in\nthe chapter includes the specific conditions that cause an instance of\nthat class to be classified as not simple. (See [HELP Geometry\nhierarchy].)\n\nURL: https://mariadb.com/kb/en/issimple/\n\n','','https://mariadb.com/kb/en/issimple/'),(245,'- BINARY',4,'Syntax:\n-\n\nSubtraction:\n\nURL: https://mariadb.com/kb/en/subtraction-operator-/\n\n','MariaDB> SELECT 3-5;\n -> -2\n','https://mariadb.com/kb/en/subtraction-operator-/'),(246,'GEOMCOLLFROMTEXT',3,'GeomCollFromText(wkt[,srid]), GeometryCollectionFromText(wkt[,srid])\n\nConstructs a GEOMETRYCOLLECTION value using its WKT representation and\nSRID.\n\nURL: https://mariadb.com/kb/en/geomcollfromtext/\n\n','','https://mariadb.com/kb/en/geomcollfromtext/'),(247,'WKT DEFINITION',3,'The Well-Known Text (WKT) representation of Geometry is designed to\nexchange geometry data in ASCII form. For a Backus-Naur grammar that\nspecifies the formal production rules for writing WKT values, see the\nOpenGIS specification document referenced in\nhttps://mariadb.com/kb/en/gis-resources/.\n\nURL: https://mariadb.com/kb/en/wkt-definition/\n\n','','https://mariadb.com/kb/en/wkt-definition/'),(248,'CURRENT_TIME',31,'Syntax:\nCURRENT_TIME, CURRENT_TIME()\n\nCURRENT_TIME and CURRENT_TIME() are synonyms for CURTIME().\n\nURL: https://mariadb.com/kb/en/current_time/\n\n','','https://mariadb.com/kb/en/current_time/'),(249,'REVOKE',10,'Syntax:\nREVOKE\n priv_type [(column_list)]\n [, priv_type [(column_list)]] ...\n ON [object_type] priv_level\n FROM user [, user] ...\n\nREVOKE ALL PRIVILEGES, GRANT OPTION\n FROM user [, user] ...\n\nREVOKE PROXY ON user\n FROM user [, user] ...\n\nThe REVOKE statement enables system administrators to revoke privileges\nfrom MySQL accounts. Each account name uses the format described in\nhttps://mariadb.com/kb/en/create-user#account-names. For example:\n\nREVOKE INSERT ON *.* FROM \'jeffrey\'@\'localhost\';\n\nIf you specify only the user name part of the account name, a host name\npart of \'%\' is used.\n\nFor details on the levels at which privileges exist, the permissible\npriv_type and priv_level values, and the syntax for specifying users\nand passwords, see [HELP GRANT]\n\nTo use the first REVOKE syntax, you must have the GRANT OPTION\nprivilege, and you must have the privileges that you are revoking.\n\nTo revoke all privileges, use the second syntax, which drops all\nglobal, database, table, column, and routine privileges for the named\nuser or users:\n\nREVOKE ALL PRIVILEGES, GRANT OPTION FROM user [, user] ...\n\nTo use this REVOKE syntax, you must have the global CREATE USER\nprivilege or the UPDATE privilege for the mysql database.\n\nURL: https://mariadb.com/kb/en/revoke/\n\n','','https://mariadb.com/kb/en/revoke/'),(250,'LAST_INSERT_ID',17,'Syntax:\nLAST_INSERT_ID(), LAST_INSERT_ID(expr)\n\nLAST_INSERT_ID() (with no argument) returns a BIGINT (64-bit) value\nrepresenting the first automatically generated value successfully\ninserted for an AUTO_INCREMENT column as a result of the most recently\nexecuted INSERT statement. The value of LAST_INSERT_ID() remains\nunchanged if no rows are successfully inserted.\n\nFor example, after inserting a row that generates an AUTO_INCREMENT\nvalue, you can get the value like this:\n\nMariaDB> SELECT LAST_INSERT_ID();\n -> 195\n\nThe currently executing statement does not affect the value of\nLAST_INSERT_ID(). Suppose that you generate an AUTO_INCREMENT value\nwith one statement, and then refer to LAST_INSERT_ID() in a\nmultiple-row INSERT statement that inserts rows into a table with its\nown AUTO_INCREMENT column. The value of LAST_INSERT_ID() will remain\nstable in the second statement; its value for the second and later rows\nis not affected by the earlier row insertions. (However, if you mix\nreferences to LAST_INSERT_ID() and LAST_INSERT_ID(expr), the effect is\nundefined.)\n\nIf the previous statement returned an error, the value of\nLAST_INSERT_ID() is undefined. For transactional tables, if the\nstatement is rolled back due to an error, the value of LAST_INSERT_ID()\nis left undefined. For manual ROLLBACK, the value of LAST_INSERT_ID()\nis not restored to that before the transaction; it remains as it was at\nthe point of the ROLLBACK.\n\nWithin the body of a stored routine (procedure or function) or a\ntrigger, the value of LAST_INSERT_ID() changes the same way as for\nstatements executed outside the body of these kinds of objects. The\neffect of a stored routine or trigger upon the value of\nLAST_INSERT_ID() that is seen by following statements depends on the\nkind of routine:\n\no If a stored procedure executes statements that change the value of\n LAST_INSERT_ID(), the changed value is seen by statements that follow\n the procedure call.\n\no For stored functions and triggers that change the value, the value is\n restored when the function or trigger ends, so following statements\n will not see a changed value.\n\nURL: https://mariadb.com/kb/en/last_insert_id/\n\n','','https://mariadb.com/kb/en/last_insert_id/'),(251,'LAST_DAY',31,'Syntax:\nLAST_DAY(date)\n\nTakes a date or datetime value and returns the corresponding value for\nthe last day of the month. Returns NULL if the argument is invalid.\n\nURL: https://mariadb.com/kb/en/last_day/\n\n','MariaDB> SELECT LAST_DAY(\'2003-02-05\');\n -> \'2003-02-28\'\nMariaDB> SELECT LAST_DAY(\'2004-02-05\');\n -> \'2004-02-29\'\nMariaDB> SELECT LAST_DAY(\'2004-01-01 01:01:01\');\n -> \'2004-01-31\'\nMariaDB> SELECT LAST_DAY(\'2003-03-32\');\n -> NULL\n','https://mariadb.com/kb/en/last_day/'),(252,'MEDIUMINT',22,'MEDIUMINT[(M)] [UNSIGNED] [ZEROFILL]\n\nA medium-sized integer. The signed range is -8388608 to 8388607. The\nunsigned range is 0 to 16777215.\n\nURL: https://mariadb.com/kb/en/mediumint/\n\n','','https://mariadb.com/kb/en/mediumint/'),(253,'FLOOR',4,'Syntax:\nFLOOR(X)\n\nReturns the largest integer value not greater than X.\n\nURL: https://mariadb.com/kb/en/floor/\n\n','MariaDB> SELECT FLOOR(1.23);\n -> 1\nMariaDB> SELECT FLOOR(-1.23);\n -> -2\n','https://mariadb.com/kb/en/floor/'),(254,'RTRIM',37,'Syntax:\nRTRIM(str)\n\nReturns the string str with trailing space characters removed.\n\nURL: https://mariadb.com/kb/en/rtrim/\n\n','MariaDB> SELECT RTRIM(\'barbar \');\n -> \'barbar\'\n','https://mariadb.com/kb/en/rtrim/'),(255,'EXPLAIN',28,'Syntax:\nEXPLAIN [explain_type] SELECT select_options\n\nexplain_type:\n EXTENDED\n | PARTITIONS\n\nOr:\n\nEXPLAIN tbl_name\n\nThe EXPLAIN statement can be used either as a way to obtain information\nabout how MySQL executes a statement, or as a synonym for DESCRIBE:\n\no When you precede a SELECT statement with the keyword EXPLAIN, MySQL\n displays information from the optimizer about the query execution\n plan. That is, MySQL explains how it would process the statement,\n including information about how tables are joined and in which order.\n EXPLAIN EXTENDED can be used to obtain additional information.\n\n For information about using EXPLAIN and EXPLAIN EXTENDED to obtain\n query execution plan information, see\n https://mariadb.com/kb/en/explain/.\n\no EXPLAIN PARTITIONS is useful only when examining queries involving\n partitioned tables. For details, see\n http://dev.mysql.com/doc/refman/5.5/en/partitioning-info.html.\n\no EXPLAIN tbl_name is synonymous with DESCRIBE tbl_name or SHOW COLUMNS\n FROM tbl_name. For information about DESCRIBE and SHOW COLUMNS, see\n [HELP DESCRIBE], and [HELP SHOW COLUMNS].\n\nURL: https://mariadb.com/kb/en/explain/\n\n','','https://mariadb.com/kb/en/explain/'),(256,'DEGREES',4,'Syntax:\nDEGREES(X)\n\nReturns the argument X, converted from radians to degrees.\n\nURL: https://mariadb.com/kb/en/degrees/\n\n','MariaDB> SELECT DEGREES(PI());\n -> 180\nMariaDB> SELECT DEGREES(PI() / 2);\n -> 90\n','https://mariadb.com/kb/en/degrees/'),(257,'VARCHAR',22,'[NATIONAL] VARCHAR(M) [CHARACTER SET charset_name] [COLLATE\ncollation_name]\n\nA variable-length string. M represents the maximum column length in\ncharacters. The range of M is 0 to 65,535. The effective maximum length\nof a VARCHAR is subject to the maximum row size (65,535 bytes, which is\nshared among all columns) and the character set used. For example, utf8\ncharacters can require up to three bytes per character, so a VARCHAR\ncolumn that uses the utf8 character set can be declared to be a maximum\nof 21,844 characters. See\nhttp://dev.mysql.com/doc/refman/5.5/en/column-count-limit.html.\n\nMySQL stores VARCHAR values as a 1-byte or 2-byte length prefix plus\ndata. The length prefix indicates the number of bytes in the value. A\nVARCHAR column uses one length byte if values require no more than 255\nbytes, two length bytes if values may require more than 255 bytes.\n\n*Note*: MySQL 5.5 follows the standard SQL specification, and does not\nremove trailing spaces from VARCHAR values.\n\nVARCHAR is shorthand for CHARACTER VARYING. NATIONAL VARCHAR is the\nstandard SQL way to define that a VARCHAR column should use some\npredefined character set. MySQL 4.1 and up uses utf8 as this predefined\ncharacter set.\nhttps://mariadb.com/kb/en/varchar/. NVARCHAR\nis shorthand for NATIONAL VARCHAR.\n\nURL: https://mariadb.com/kb/en/varchar/\n\n','','https://mariadb.com/kb/en/varchar/'),(258,'UNHEX',37,'Syntax:\n\nUNHEX(str)\n\nFor a string argument str, UNHEX(str) performs the inverse operation of\nHEX(str). That is, it interprets each pair of characters in the\nargument as a hexadecimal number and converts it to the character\nrepresented by the number. The return value is a binary string.\n\nURL: https://mariadb.com/kb/en/unhex/\n\n','MariaDB> SELECT UNHEX(\'4D7953514C\');\n -> \'MySQL\'\nMariaDB> SELECT 0x4D7953514C;\n -> \'MySQL\'\nMariaDB> SELECT UNHEX(HEX(\'string\'));\n -> \'string\'\nMariaDB> SELECT HEX(UNHEX(\'1267\'));\n -> \'1267\'\n','https://mariadb.com/kb/en/unhex/'),(259,'- UNARY',4,'Syntax:\n-\n\nUnary minus. This operator changes the sign of the operand.\n\nURL: https://mariadb.com/kb/en/subtraction-operator-/\n\n','MariaDB> SELECT - 2;\n -> -2\n','https://mariadb.com/kb/en/subtraction-operator-/'),(260,'STD',16,'Syntax:\nSTD(expr)\n\nReturns the population standard deviation of expr. This is an extension\nto standard SQL. The standard SQL function STDDEV_POP() can be used\ninstead.\n\nThis function returns NULL if there were no matching rows.\n\nURL: https://mariadb.com/kb/en/std/\n\n','','https://mariadb.com/kb/en/std/'),(261,'COS',4,'Syntax:\nCOS(X)\n\nReturns the cosine of X, where X is given in radians.\n\nURL: https://mariadb.com/kb/en/cos/\n\n','MariaDB> SELECT COS(PI());\n -> -1\n','https://mariadb.com/kb/en/cos/'),(262,'DATE FUNCTION',31,'Syntax:\nDATE(expr)\n\nExtracts the date part of the date or datetime expression expr.\n\nURL: https://mariadb.com/kb/en/date-function/\n\n','MariaDB> SELECT DATE(\'2003-12-31 01:02:03\');\n -> \'2003-12-31\'\n','https://mariadb.com/kb/en/date-function/'),(263,'DROP TRIGGER',39,'Syntax:\nDROP TRIGGER [IF EXISTS] [schema_name.]trigger_name\n\nThis statement drops a trigger. The schema (database) name is optional.\nIf the schema is omitted, the trigger is dropped from the default\nschema. DROP TRIGGER requires the TRIGGER privilege for the table\nassociated with the trigger.\n\nUse IF EXISTS to prevent an error from occurring for a trigger that\ndoes not exist. A NOTE is generated for a nonexistent trigger when\nusing IF EXISTS. See [HELP SHOW WARNINGS].\n\nTriggers for a table are also dropped if you drop the table.\n\nURL: https://mariadb.com/kb/en/drop-trigger/\n\n','','https://mariadb.com/kb/en/drop-trigger/'),(264,'RESET MASTER',8,'Syntax:\nRESET MASTER\n\nDeletes all binary log files listed in the index file, resets the\nbinary log index file to be empty, and creates a new binary log file.\nThis statement is intended to be used only when the master is started\nfor the first time.\n\nURL: https://mariadb.com/kb/en/reset-master/\n\n','','https://mariadb.com/kb/en/reset-master/'),(265,'TAN',4,'Syntax:\nTAN(X)\n\nReturns the tangent of X, where X is given in radians.\n\nURL: https://mariadb.com/kb/en/tan/\n\n','MariaDB> SELECT TAN(PI());\n -> -1.2246063538224e-16\nMariaDB> SELECT TAN(PI()+1);\n -> 1.5574077246549\n','https://mariadb.com/kb/en/tan/'),(266,'PI',4,'Syntax:\nPI()\n\nReturns the value of π (pi). The default number of decimal places\ndisplayed is seven, but MySQL uses the full double-precision value\ninternally.\n\nURL: https://mariadb.com/kb/en/pi/\n\n','MariaDB> SELECT PI();\n -> 3.141593\nMariaDB> SELECT PI()+0.000000000000000000;\n -> 3.141592653589793116\n','https://mariadb.com/kb/en/pi/'),(267,'WEEKOFYEAR',31,'Syntax:\nWEEKOFYEAR(date)\n\nReturns the calendar week of the date as a number in the range from 1\nto 53. WEEKOFYEAR() is a compatibility function that is equivalent to\nWEEK(date,3).\n\nURL: https://mariadb.com/kb/en/weekofyear/\n\n','MariaDB> SELECT WEEKOFYEAR(\'2008-02-20\');\n -> 8\n','https://mariadb.com/kb/en/weekofyear/'),(268,'/',4,'Syntax:\n/\n\nDivision:\n\nURL: https://mariadb.com/kb/en/division-operator/\n\n','MariaDB> SELECT 3/5;\n -> 0.60\n','https://mariadb.com/kb/en/division-operator/'),(269,'PURGE BINARY LOGS',8,'Syntax:\nPURGE { BINARY | MASTER } LOGS\n { TO \'log_name\' | BEFORE datetime_expr }\n\nThe binary log is a set of files that contain information about data\nmodifications made by the MySQL server. The log consists of a set of\nbinary log files, plus an index file (see\nhttps://mariadb.com/kb/en/overview-of-the-binary-log/).\n\nThe PURGE BINARY LOGS statement deletes all the binary log files listed\nin the log index file prior to the specified log file name or date.\nBINARY and MASTER are synonyms. Deleted log files also are removed from\nthe list recorded in the index file, so that the given log file becomes\nthe first in the list.\n\nThis statement has no effect if the server was not started with the\n--log-bin option to enable binary logging.\n\nURL: https://mariadb.com/kb/en/sql-commands-purge-logs/\n\n','PURGE BINARY LOGS TO \'mysql-bin.010\';\nPURGE BINARY LOGS BEFORE \'2008-04-02 22:46:26\';\n','https://mariadb.com/kb/en/sql-commands-purge-logs/'),(270,'STDDEV_SAMP',16,'Syntax:\nSTDDEV_SAMP(expr)\n\nReturns the sample standard deviation of expr (the square root of\nVAR_SAMP().\n\nSTDDEV_SAMP() returns NULL if there were no matching rows.\n\nURL: https://mariadb.com/kb/en/stddev_samp/\n\n','','https://mariadb.com/kb/en/stddev_samp/'),(271,'SCHEMA',17,'Syntax:\nSCHEMA()\n\nThis function is a synonym for DATABASE().\n\nURL: https://mariadb.com/kb/en/schema/\n\n','','https://mariadb.com/kb/en/schema/'),(272,'MLINEFROMWKB',32,'MLineFromWKB(wkb[,srid]), MultiLineStringFromWKB(wkb[,srid])\n\nConstructs a MULTILINESTRING value using its WKB representation and\nSRID.\n\nURL: https://mariadb.com/kb/en/mlinefromwkb/\n\n','','https://mariadb.com/kb/en/mlinefromwkb/'),(273,'LOG2',4,'Syntax:\nLOG2(X)\n\nReturns the base-2 logarithm of X.\n\nURL: https://mariadb.com/kb/en/log2/\n\n','MariaDB> SELECT LOG2(65536);\n -> 16\nMariaDB> SELECT LOG2(-100);\n -> NULL\n','https://mariadb.com/kb/en/log2/'),(274,'SUBTIME',31,'Syntax:\nSUBTIME(expr1,expr2)\n\nSUBTIME() returns expr1 - expr2 expressed as a value in the same format\nas expr1. expr1 is a time or datetime expression, and expr2 is a time\nexpression.\n\nURL: https://mariadb.com/kb/en/subtime/\n\n','MariaDB> SELECT SUBTIME(\'2007-12-31 23:59:59.999999\',\'1 1:1:1.000002\');\n -> \'2007-12-30 22:58:58.999997\'\nMariaDB> SELECT SUBTIME(\'01:00:00.999999\', \'02:00:00.999998\');\n -> \'-00:59:59.999999\'\n','https://mariadb.com/kb/en/subtime/'),(275,'UNCOMPRESSED_LENGTH',12,'Syntax:\nUNCOMPRESSED_LENGTH(compressed_string)\n\nReturns the length that the compressed string had before being\ncompressed.\n\nURL: https://mariadb.com/kb/en/uncompressed_length/\n\n','MariaDB> SELECT UNCOMPRESSED_LENGTH(COMPRESS(REPEAT(\'a\',30)));\n -> 30\n','https://mariadb.com/kb/en/uncompressed_length/'),(276,'DROP TABLE',39,'Syntax:\nDROP [TEMPORARY] TABLE [IF EXISTS]\n tbl_name [, tbl_name] ...\n [RESTRICT | CASCADE]\n\nDROP TABLE removes one or more tables. You must have the DROP privilege\nfor each table. All table data and the table definition are removed, so\nbe careful with this statement! If any of the tables named in the\nargument list do not exist, MySQL returns an error indicating by name\nwhich nonexisting tables it was unable to drop, but it also drops all\nof the tables in the list that do exist.\n\n*Important*: When a table is dropped, user privileges on the table are\nnot automatically dropped. See [HELP GRANT].\n\nNote that for a partitioned table, DROP TABLE permanently removes the\ntable definition, all of its partitions, and all of the data which was\nstored in those partitions. It also removes the partitioning definition\n(.par) file associated with the dropped table.\n\nUse IF EXISTS to prevent an error from occurring for tables that do not\nexist. A NOTE is generated for each nonexistent table when using IF\nEXISTS. See [HELP SHOW WARNINGS].\n\nRESTRICT and CASCADE are permitted to make porting easier. In MySQL\n5.5, they do nothing.\n\n*Note*: DROP TABLE automatically commits the current active\ntransaction, unless you use the TEMPORARY keyword.\n\nURL: https://mariadb.com/kb/en/drop-table/\n\n','','https://mariadb.com/kb/en/drop-table/'),(277,'POW',4,'Syntax:\nPOW(X,Y)\n\nReturns the value of X raised to the power of Y.\n\nURL: https://mariadb.com/kb/en/pow/\n\n','MariaDB> SELECT POW(2,2);\n -> 4\nMariaDB> SELECT POW(2,-2);\n -> 0.25\n','https://mariadb.com/kb/en/pow/'),(278,'SHOW CREATE TABLE',26,'Syntax:\nSHOW CREATE TABLE tbl_name\n\nShows the CREATE TABLE statement that creates the given table. To use\nthis statement, you must have some privilege for the table. This\nstatement also works with views.\nSHOW CREATE TABLE quotes table and column names according to the value\nof the sql_quote_show_create option. See\nhttps://mariadb.com/kb/en/server-system-variables/.\n\nURL: https://mariadb.com/kb/en/show-create-table/\n\n','MariaDB> SHOW CREATE TABLE t\\G\n*************************** 1. row ***************************\n Table: t\nCreate Table: CREATE TABLE t (\n id INT(11) default NULL auto_increment,\n s char(60) default NULL,\n PRIMARY KEY (id)\n) ENGINE=MyISAM\n','https://mariadb.com/kb/en/show-create-table/'),(279,'DUAL',27,'You are permitted to specify DUAL as a dummy table name in situations\nwhere no tables are referenced:\n\nMariaDB> SELECT 1 + 1 FROM DUAL;\n -> 2\n\nDUAL is purely for the convenience of people who require that all\nSELECT statements should have FROM and possibly other clauses. MySQL\nmay ignore the clauses. MySQL does not require FROM DUAL if no tables\nare referenced.\n\nURL: https://mariadb.com/kb/en/dual/\n\n','','https://mariadb.com/kb/en/dual/'),(280,'INSTR',37,'Syntax:\nINSTR(str,substr)\n\nReturns the position of the first occurrence of substring substr in\nstring str. This is the same as the two-argument form of LOCATE(),\nexcept that the order of the arguments is reversed.\n\nURL: https://mariadb.com/kb/en/instr/\n\n','MariaDB> SELECT INSTR(\'foobarbar\', \'bar\');\n -> 4\nMariaDB> SELECT INSTR(\'xbar\', \'foobar\');\n -> 0\n','https://mariadb.com/kb/en/instr/'),(281,'NOW',31,'Syntax:\nNOW()\n\nReturns the current date and time as a value in \'YYYY-MM-DD HH:MM:SS\'\nor YYYYMMDDHHMMSS.uuuuuu format, depending on whether the function is\nused in a string or numeric context. The value is expressed in the\ncurrent time zone.\n\nURL: https://mariadb.com/kb/en/now/\n\n','MariaDB> SELECT NOW();\n -> \'2007-12-15 23:50:26\'\nMariaDB> SELECT NOW() + 0;\n -> 20071215235026.000000\n','https://mariadb.com/kb/en/now/'),(282,'SHOW ENGINES',26,'Syntax:\nSHOW [STORAGE] ENGINES\n\nSHOW ENGINES displays status information about the server\'s storage\nengines. This is particularly useful for checking whether a storage\nengine is supported, or to see what the default engine is.\n\nURL: https://mariadb.com/kb/en/show-engines/\n\n','','https://mariadb.com/kb/en/show-engines/'),(283,'>=',18,'Syntax:\n>=\n\nGreater than or equal:\n\nURL: https://mariadb.com/kb/en/greater-than-or-equal/\n\n','MariaDB> SELECT 2 >= 2;\n -> 1\n','https://mariadb.com/kb/en/greater-than-or-equal/'),(284,'EXP',4,'Syntax:\nEXP(X)\n\nReturns the value of e (the base of natural logarithms) raised to the\npower of X. The inverse of this function is LOG() (using a single\nargument only) or LN().\n\nURL: https://mariadb.com/kb/en/exp/\n\n','MariaDB> SELECT EXP(2);\n -> 7.3890560989307\nMariaDB> SELECT EXP(-2);\n -> 0.13533528323661\nMariaDB> SELECT EXP(0);\n -> 1\n','https://mariadb.com/kb/en/exp/'),(285,'LONGBLOB',22,'LONGBLOB\n\nA BLOB column with a maximum length of 4,294,967,295 or 4GB (232 - 1)\nbytes. The effective maximum length of LONGBLOB columns depends on the\nconfigured maximum packet size in the client/server protocol and\navailable memory. Each LONGBLOB value is stored using a 4-byte length\nprefix that indicates the number of bytes in the value.\n\nURL: https://mariadb.com/kb/en/longblob/\n\n','','https://mariadb.com/kb/en/longblob/'),(286,'POINTN',13,'PointN(ls,N)\n\nReturns the N-th Point in the Linestring value ls. Points are numbered\nbeginning with 1.\n\nURL: https://mariadb.com/kb/en/pointn/\n\n','MariaDB> SET @ls = \'LineString(1 1,2 2,3 3)\';\nMariaDB> SELECT AsText(PointN(GeomFromText(@ls),2));\n+-------------------------------------+\n| AsText(PointN(GeomFromText(@ls),2)) |\n+-------------------------------------+\n| POINT(2 2) |\n+-------------------------------------+\n','https://mariadb.com/kb/en/pointn/'),(287,'YEAR DATA TYPE',22,'YEAR[(2|4)]\n\nA year in two-digit or four-digit format. The default is four-digit\nformat. YEAR(2) or YEAR(4) differ in display format, but have the same\nrange of values. In four-digit format, values display as 1901 to 2155,\nand 0000. In two-digit format, values display as 70 to 69, representing\nyears from 1970 to 2069. MySQL displays YEAR values in YYYY or\nYYformat, but permits assignment of values to YEAR columns using either\nstrings or numbers.\n\n*Note*: The YEAR(2) data type has certain issues that you should\nconsider before choosing to use it. As of MySQL 5.5.27, YEAR(2) is\ndeprecated. For more information, see\nhttp://dev.mysql.com/doc/refman/5.5/en/migrating-to-year4.html.\n\nFor additional information about YEAR display format and inerpretation\nof input values, see https://mariadb.com/kb/en/year-data-type/.\n\nURL: https://mariadb.com/kb/en/year-data-type/\n\n','','https://mariadb.com/kb/en/year-data-type/'),(288,'SUM',16,'Syntax:\nSUM([DISTINCT] expr)\n\nReturns the sum of expr. If the return set has no rows, SUM() returns\nNULL. The DISTINCT keyword can be used to sum only the distinct values\nof expr.\n\nSUM() returns NULL if there were no matching rows.\n\nURL: https://mariadb.com/kb/en/sum/\n\n','','https://mariadb.com/kb/en/sum/'),(289,'OCT',37,'Syntax:\nOCT(N)\n\nReturns a string representation of the octal value of N, where N is a\nlonglong (BIGINT) number. This is equivalent to CONV(N,10,8). Returns\nNULL if N is NULL.\n\nURL: https://mariadb.com/kb/en/oct/\n\n','MariaDB> SELECT OCT(12);\n -> \'14\'\n','https://mariadb.com/kb/en/oct/'),(290,'SYSDATE',31,'Syntax:\nSYSDATE()\n\nReturns the current date and time as a value in \'YYYY-MM-DD HH:MM:SS\'\nor YYYYMMDDHHMMSS.uuuuuu format, depending on whether the function is\nused in a string or numeric context.\n\nSYSDATE() returns the time at which it executes. This differs from the\nbehavior for NOW(), which returns a constant time that indicates the\ntime at which the statement began to execute. (Within a stored function\nor trigger, NOW() returns the time at which the function or triggering\nstatement began to execute.)\n\nMariaDB> SELECT NOW(), SLEEP(2), NOW();\n+---------------------+----------+---------------------+\n| NOW() | SLEEP(2) | NOW() |\n+---------------------+----------+---------------------+\n| 2006-04-12 13:47:36 | 0 | 2006-04-12 13:47:36 |\n+---------------------+----------+---------------------+\n\nMariaDB> SELECT SYSDATE(), SLEEP(2), SYSDATE();\n+---------------------+----------+---------------------+\n| SYSDATE() | SLEEP(2) | SYSDATE() |\n+---------------------+----------+---------------------+\n| 2006-04-12 13:47:44 | 0 | 2006-04-12 13:47:46 |\n+---------------------+----------+---------------------+\n\nIn addition, the SET TIMESTAMP statement affects the value returned by\nNOW() but not by SYSDATE(). This means that timestamp settings in the\nbinary log have no effect on invocations of SYSDATE().\n\nBecause SYSDATE() can return different values even within the same\nstatement, and is not affected by SET TIMESTAMP, it is nondeterministic\nand therefore unsafe for replication if statement-based binary logging\nis used. If that is a problem, you can use row-based logging.\n\nAlternatively, you can use the --sysdate-is-now option to cause\nSYSDATE() to be an alias for NOW(). This works if the option is used on\nboth the master and the slave.\n\nThe nondeterministic nature of SYSDATE() also means that indexes cannot\nbe used for evaluating expressions that refer to it.\n\nURL: https://mariadb.com/kb/en/sysdate/\n\n','','https://mariadb.com/kb/en/sysdate/'),(291,'UNINSTALL PLUGIN',5,'Syntax:\nUNINSTALL PLUGIN plugin_name\n\nThis statement removes an installed server plugin. It requires the\nDELETE privilege for the mysql.plugin table.\n\nplugin_name must be the name of some plugin that is listed in the\nmysql.plugin table. The server executes the plugin\'s deinitialization\nfunction and removes the row for the plugin from the mysql.plugin\ntable, so that subsequent server restarts will not load and initialize\nthe plugin. UNINSTALL PLUGIN does not remove the plugin\'s shared\nlibrary file.\n\nURL: https://mariadb.com/kb/en/uninstall-plugin/\n\n','','https://mariadb.com/kb/en/uninstall-plugin/'),(292,'ASBINARY',32,'AsBinary(g), AsWKB(g)\n\nConverts a value in internal geometry format to its WKB representation\nand returns the binary result.\n\nURL: https://mariadb.com/kb/en/asbinary/\n\n','SELECT AsBinary(g) FROM geom;\n','https://mariadb.com/kb/en/asbinary/'),(293,'REPEAT FUNCTION',37,'Syntax:\nREPEAT(str,count)\n\nReturns a string consisting of the string str repeated count times. If\ncount is less than 1, returns an empty string. Returns NULL if str or\ncount are NULL.\n\nURL: https://mariadb.com/kb/en/repeat-function/\n\n','MariaDB> SELECT REPEAT(\'MySQL\', 3);\n -> \'MySQLMySQLMySQL\'\n','https://mariadb.com/kb/en/repeat-function/'),(294,'SHOW TABLES',26,'Syntax:\nSHOW [FULL] TABLES [{FROM | IN} db_name]\n [LIKE \'pattern\' | WHERE expr]\n\nSHOW TABLES lists the non-TEMPORARY tables in a given database. You can\nalso get this list using the mysqlshow db_name command. The LIKE\nclause, if present, indicates which table names to match. The WHERE\nclause can be given to select rows using more general conditions, as\ndiscussed in https://mariadb.com/kb/en/extended-show/.\n\nThis statement also lists any views in the database. The FULL modifier\nis supported such that SHOW FULL TABLES displays a second output\ncolumn. Values for the second column are BASE TABLE for a table and\nVIEW for a view.\n\nIf you have no privileges for a base table or view, it does not show up\nin the output from SHOW TABLES or mysqlshow db_name.\n\nURL: https://mariadb.com/kb/en/show-tables/\n\n','','https://mariadb.com/kb/en/show-tables/'),(295,'MAKEDATE',31,'Syntax:\nMAKEDATE(year,dayofyear)\n\nReturns a date, given year and day-of-year values. dayofyear must be\ngreater than 0 or the result is NULL.\n\nURL: https://mariadb.com/kb/en/makedate/\n\n','MariaDB> SELECT MAKEDATE(2011,31), MAKEDATE(2011,32);\n -> \'2011-01-31\', \'2011-02-01\'\nMariaDB> SELECT MAKEDATE(2011,365), MAKEDATE(2014,365);\n -> \'2011-12-31\', \'2014-12-31\'\nMariaDB> SELECT MAKEDATE(2011,0);\n -> NULL\n','https://mariadb.com/kb/en/makedate/'),(296,'BINARY OPERATOR',37,'Syntax:\nBINARY\n\nThe BINARY operator casts the string following it to a binary string.\nThis is an easy way to force a column comparison to be done byte by\nbyte rather than character by character. This causes the comparison to\nbe case sensitive even if the column is not defined as BINARY or BLOB.\nBINARY also causes trailing spaces to be significant.\n\nURL: https://mariadb.com/kb/en/binary-operator/\n\n','MariaDB> SELECT \'a\' = \'A\';\n -> 1\nMariaDB> SELECT BINARY \'a\' = \'A\';\n -> 0\nMariaDB> SELECT \'a\' = \'a \';\n -> 1\nMariaDB> SELECT BINARY \'a\' = \'a \';\n -> 0\n','https://mariadb.com/kb/en/binary-operator/'),(297,'MBROVERLAPS',6,'MBROverlaps(g1,g2)\n\nReturns 1 or 0 to indicate whether the Minimum Bounding Rectangles of\nthe two geometries g1 and g2 overlap. The term spatially overlaps is\nused if two geometries intersect and their intersection results in a\ngeometry of the same dimension but not equal to either of the given\ngeometries.\n\nURL: https://mariadb.com/kb/en/mbroverlaps/\n\n','','https://mariadb.com/kb/en/mbroverlaps/'),(298,'SOUNDEX',37,'Syntax:\nSOUNDEX(str)\n\nReturns a soundex string from str. Two strings that sound almost the\nsame should have identical soundex strings. A standard soundex string\nis four characters long, but the SOUNDEX() function returns an\narbitrarily long string. You can use SUBSTRING() on the result to get a\nstandard soundex string. All nonalphabetic characters in str are\nignored. All international alphabetic characters outside the A-Z range\nare treated as vowels.\n\n*Important*: When using SOUNDEX(), you should be aware of the following\nlimitations:\n\no This function, as currently implemented, is intended to work well\n with strings that are in the English language only. Strings in other\n languages may not produce reliable results.\n\no This function is not guaranteed to provide consistent results with\n strings that use multi-byte character sets, including utf-8.\n\n We hope to remove these limitations in a future release. See Bug\n #22638 for more information.\n\nURL: https://mariadb.com/kb/en/soundex/\n\n','MariaDB> SELECT SOUNDEX(\'Hello\');\n -> \'H400\'\nMariaDB> SELECT SOUNDEX(\'Quadratically\');\n -> \'Q36324\'\n','https://mariadb.com/kb/en/soundex/'),(299,'MBRTOUCHES',6,'MBRTouches(g1,g2)\n\nReturns 1 or 0 to indicate whether the Minimum Bounding Rectangles of\nthe two geometries g1 and g2 touch. Two geometries spatially touch if\nthe interiors of the geometries do not intersect, but the boundary of\none of the geometries intersects either the boundary or the interior of\nthe other.\n\nURL: https://mariadb.com/kb/en/mbrtouches/\n\n','','https://mariadb.com/kb/en/mbrtouches/'),(300,'DROP EVENT',39,'Syntax:\nDROP EVENT [IF EXISTS] event_name\n\nThis statement drops the event named event_name. The event immediately\nceases being active, and is deleted completely from the server.\n\nIf the event does not exist, the error ERROR 1517 (HY000): Unknown\nevent \'event_name\' results. You can override this and cause the\nstatement to generate a warning for nonexistent events instead using IF\nEXISTS.\n\nThis statement requires the EVENT privilege for the schema to which the\nevent to be dropped belongs.\n\nURL: https://mariadb.com/kb/en/drop-event/\n\n','','https://mariadb.com/kb/en/drop-event/'),(301,'INSERT SELECT',27,'Syntax:\nINSERT [LOW_PRIORITY | HIGH_PRIORITY] [IGNORE]\n [INTO] tbl_name [(col_name,...)]\n SELECT ...\n [ ON DUPLICATE KEY UPDATE col_name=expr, ... ]\n\nWith INSERT ... SELECT, you can quickly insert many rows into a table\nfrom one or many tables. For example:\n\nINSERT INTO tbl_temp2 (fld_id)\n SELECT tbl_temp1.fld_order_id\n FROM tbl_temp1 WHERE tbl_temp1.fld_order_id > 100;\n\nURL: https://mariadb.com/kb/en/insert-select/\n\n','','https://mariadb.com/kb/en/insert-select/'),(302,'CREATE PROCEDURE',39,'Syntax:\nCREATE\n [DEFINER = { user | CURRENT_USER }]\n PROCEDURE sp_name ([proc_parameter[,...]])\n [characteristic ...] routine_body\n\nCREATE\n [DEFINER = { user | CURRENT_USER }]\n FUNCTION sp_name ([func_parameter[,...]])\n RETURNS type\n [characteristic ...] routine_body\n\nproc_parameter:\n [ IN | OUT | INOUT ] param_name type\n\nfunc_parameter:\n param_name type\n\ntype:\n Any valid MySQL data type\n\ncharacteristic:\n COMMENT \'string\'\n | LANGUAGE SQL\n | [NOT] DETERMINISTIC\n | { CONTAINS SQL | NO SQL | READS SQL DATA | MODIFIES SQL DATA }\n | SQL SECURITY { DEFINER | INVOKER }\n\nroutine_body:\n Valid SQL routine statement\n\nThese statements create stored routines. By default, a routine is\nassociated with the default database. To associate the routine\nexplicitly with a given database, specify the name as db_name.sp_name\nwhen you create it.\n\nThe CREATE FUNCTION statement is also used in MySQL to support UDFs\n(user-defined functions). See\nhttps://mariadb.com/kb/en/create-function-udf/. A UDF can\nbe regarded as an external stored function. Stored functions share\ntheir namespace with UDFs. See\nhttp://dev.mysql.com/doc/refman/5.5/en/function-resolution.html, for\nthe rules describing how the server interprets references to different\nkinds of functions.\n\nTo invoke a stored procedure, use the CALL statement (see [HELP CALL]).\nTo invoke a stored function, refer to it in an expression. The function\nreturns a value during expression evaluation.\n\nCREATE PROCEDURE and CREATE FUNCTION require the CREATE ROUTINE\nprivilege. They might also require the SUPER privilege, depending on\nthe DEFINER value, as described later in this section. If binary\nlogging is enabled, CREATE FUNCTION might require the SUPER privilege,\nas described in\nhttps://mariadb.com/kb/en/binary-logging-of-stored-routines/.\n\nBy default, MySQL automatically grants the ALTER ROUTINE and EXECUTE\nprivileges to the routine creator. This behavior can be changed by\ndisabling the automatic_sp_privileges system variable. See\nhttps://mariadb.com/kb/en/stored-routine-privileges/.\n\nThe DEFINER and SQL SECURITY clauses specify the security context to be\nused when checking access privileges at routine execution time, as\ndescribed later in this section.\n\nIf the routine name is the same as the name of a built-in SQL function,\na syntax error occurs unless you use a space between the name and the\nfollowing parenthesis when defining the routine or invoking it later.\nFor this reason, avoid using the names of existing SQL functions for\nyour own stored routines.\n\nThe IGNORE_SPACE SQL mode applies to built-in functions, not to stored\nroutines. It is always permissible to have spaces after a stored\nroutine name, regardless of whether IGNORE_SPACE is enabled.\n\nThe parameter list enclosed within parentheses must always be present.\nIf there are no parameters, an empty parameter list of () should be\nused. Parameter names are not case sensitive.\n\nEach parameter is an IN parameter by default. To specify otherwise for\na parameter, use the keyword OUT or INOUT before the parameter name.\n\n*Note*: Specifying a parameter as IN, OUT, or INOUT is valid only for a\nPROCEDURE. For a FUNCTION, parameters are always regarded as IN\nparameters.\n\nAn IN parameter passes a value into a procedure. The procedure might\nmodify the value, but the modification is not visible to the caller\nwhen the procedure returns. An OUT parameter passes a value from the\nprocedure back to the caller. Its initial value is NULL within the\nprocedure, and its value is visible to the caller when the procedure\nreturns. An INOUT parameter is initialized by the caller, can be\nmodified by the procedure, and any change made by the procedure is\nvisible to the caller when the procedure returns.\n\nFor each OUT or INOUT parameter, pass a user-defined variable in the\nCALL statement that invokes the procedure so that you can obtain its\nvalue when the procedure returns. If you are calling the procedure from\nwithin another stored procedure or function, you can also pass a\nroutine parameter or local routine variable as an IN or INOUT\nparameter.\n\nThe following example shows a simple stored procedure that uses an OUT\nparameter:\n\nMariaDB> delimiter //\n\nMariaDB> CREATE PROCEDURE simpleproc (OUT param1 INT)\n -> BEGIN\n -> SELECT COUNT(*) INTO param1 FROM t;\n -> END//\nQuery OK, 0 rows affected (0.00 sec)\n\nMariaDB> delimiter ;\n\nMariaDB> CALL simpleproc(@a);\nQuery OK, 0 rows affected (0.00 sec)\n\nMariaDB> SELECT @a;\n+------+\n| @a |\n+------+\n| 3 |\n+------+\n1 row in set (0.00 sec)\n\nThe example uses the mysql client delimiter command to change the\nstatement delimiter from ; to // while the procedure is being defined.\nThis enables the ; delimiter used in the procedure body to be passed\nthrough to the server rather than being interpreted by mysql itself.\nSee\nhttps://mariadb.com/kb/en/stored-procedure-overview/.\n\nThe RETURNS clause may be specified only for a FUNCTION, for which it\nis mandatory. It indicates the return type of the function, and the\nfunction body must contain a RETURN value statement. If the RETURN\nstatement returns a value of a different type, the value is coerced to\nthe proper type. For example, if a function specifies an ENUM or SET\nvalue in the RETURNS clause, but the RETURN statement returns an\ninteger, the value returned from the function is the string for the\ncorresponding ENUM member of set of SET members.\n\nThe following example function takes a parameter, performs an operation\nusing an SQL function, and returns the result. In this case, it is\nunnecessary to use delimiter because the function definition contains\nno internal ; statement delimiters:\n\nMariaDB> CREATE FUNCTION hello (s CHAR(20))\nMariaDB> RETURNS CHAR(50) DETERMINISTIC\n -> RETURN CONCAT(\'Hello, \',s,\'!\');\nQuery OK, 0 rows affected (0.00 sec)\n\nMariaDB> SELECT hello(\'world\');\n+----------------+\n| hello(\'world\') |\n+----------------+\n| Hello, world! |\n+----------------+\n1 row in set (0.00 sec)\n\nParameter types and function return types can be declared to use any\nvalid data type, except that the COLLATE attribute cannot be used prior\nto MySQL 5.5.3. As of 5.5.3, COLLATE can be used if preceded by the\nCHARACTER SET attribute.\n\nThe routine_body consists of a valid SQL routine statement. This can be\na simple statement such as SELECT or INSERT, or a compound statement\nwritten using BEGIN and END. Compound statements can contain\ndeclarations, loops, and other control structure statements. The syntax\nfor these statements is described in\nhttps://mariadb.com/kb/programmatic-and-compound-statements.\n\nMySQL permits routines to contain DDL statements, such as CREATE and\nDROP. MySQL also permits stored procedures (but not stored functions)\nto contain SQL transaction statements such as COMMIT. Stored functions\nmay not contain statements that perform explicit or implicit commit or\nrollback. Support for these statements is not required by the SQL\nstandard, which states that each DBMS vendor may decide whether to\npermit them.\n\nStatements that return a result set can be used within a stored\nprocedure but not within a stored function. This prohibition includes\nSELECT statements that do not have an INTO var_list clause and other\nstatements such as SHOW, EXPLAIN, and CHECK TABLE. For statements that\ncan be determined at function definition time to return a result set, a\nNot allowed to return a result set from a function error occurs\n(ER_SP_NO_RETSET). For statements that can be determined only at\nruntime to return a result set, a PROCEDURE %s can\'t return a result\nset in the given context error occurs (ER_SP_BADSELECT).\n\nUSE statements within stored routines are not permitted. When a routine\nis invoked, an implicit USE db_name is performed (and undone when the\nroutine terminates). The causes the routine to have the given default\ndatabase while it executes. References to objects in databases other\nthan the routine default database should be qualified with the\nappropriate database name.\n\nFor additional information about statements that are not permitted in\nstored routines, see\nhttps://mariadb.com/kb/en/stored-routine-privileges/\n.\n\nFor information about invoking stored procedures from within programs\nwritten in a language that has a MySQL interface, see [HELP CALL].\n\nMySQL stores the sql_mode system variable setting that is in effect at\nthe time a routine is created, and always executes the routine with\nthis setting in force, regardless of the server SQL mode in effect when\nthe routine is invoked.\n\nThe switch from the SQL mode of the invoker to that of the routine\noccurs after evaluation of arguments and assignment of the resulting\nvalues to routine parameters. If you define a routine in strict SQL\nmode but invoke it in nonstrict mode, assignment of arguments to\nroutine parameters does not take place in strict mode. If you require\nthat expressions passed to a routine be assigned in strict SQL mode,\nyou should invoke the routine with strict mode in effect.\n\nURL: https://mariadb.com/kb/en/create-procedure/\n\n','','https://mariadb.com/kb/en/create-procedure/'),(303,'VARBINARY',22,'VARBINARY(M)\n\nThe VARBINARY type is similar to the VARCHAR type, but stores binary\nbyte strings rather than nonbinary character strings. M represents the\nmaximum column length in bytes.\n\nURL: https://mariadb.com/kb/en/varbinary/\n\n','','https://mariadb.com/kb/en/varbinary/'),(304,'LOAD INDEX',26,'Syntax:\nLOAD INDEX INTO CACHE\n tbl_index_list [, tbl_index_list] ...\n\ntbl_index_list:\n tbl_name\n [PARTITION (partition_list | ALL)]\n [[INDEX|KEY] (index_name[, index_name] ...)]\n [IGNORE LEAVES]\n\npartition_list:\n partition_name[, partition_name][, ...]\n\nThe LOAD INDEX INTO CACHE statement preloads a table index into the key\ncache to which it has been assigned by an explicit CACHE INDEX\nstatement, or into the default key cache otherwise.\n\nLOAD INDEX INTO CACHE is used only for MyISAM tables. In MySQL 5.5, it\nis also supported for partitioned MyISAM tables; in addition, indexes\non partitioned tables can be preloaded for one, several, or all\npartitions.\n\nThe IGNORE LEAVES modifier causes only blocks for the nonleaf nodes of\nthe index to be preloaded.\n\nIGNORE LEAVES is also supported for partitioned MyISAM tables.\n\nURL: https://mariadb.com/kb/en/load-index/\n\n','','https://mariadb.com/kb/en/load-index/'),(305,'UNION',27,'Syntax:\nSELECT ...\nUNION [ALL | DISTINCT] SELECT ...\n[UNION [ALL | DISTINCT] SELECT ...]\n\nUNION is used to combine the result from multiple SELECT statements\ninto a single result set.\n\nThe column names from the first SELECT statement are used as the column\nnames for the results returned. Selected columns listed in\ncorresponding positions of each SELECT statement should have the same\ndata type. (For example, the first column selected by the first\nstatement should have the same type as the first column selected by the\nother statements.)\n\nURL: https://mariadb.com/kb/en/union/\n\n','','https://mariadb.com/kb/en/union/'),(306,'TO_DAYS',31,'Syntax:\nTO_DAYS(date)\n\nGiven a date date, returns a day number (the number of days since year\n0).\n\nURL: https://mariadb.com/kb/en/to_days/\n\n','MariaDB> SELECT TO_DAYS(950501);\n -> 728779\nMariaDB> SELECT TO_DAYS(\'2007-10-07\');\n -> 733321\n','https://mariadb.com/kb/en/to_days/'),(307,'NOT REGEXP',37,'Syntax:\nexpr NOT REGEXP pat, expr NOT RLIKE pat\n\nThis is the same as NOT (expr REGEXP pat).\n\nURL: https://mariadb.com/kb/en/not-regexp/\n\n','','https://mariadb.com/kb/en/not-regexp/'),(308,'SHOW INDEX',26,'Syntax:\nSHOW {INDEX | INDEXES | KEYS}\n {FROM | IN} tbl_name\n [{FROM | IN} db_name]\n [WHERE expr]\n\nSHOW INDEX returns table index information. The format resembles that\nof the SQLStatistics call in ODBC. This statement requires some\nprivilege for any column in the table.\nYou can use db_name.tbl_name as an alternative to the tbl_name FROM\ndb_name syntax. These two statements are equivalent:\n\nSHOW INDEX FROM mytable FROM mydb;\nSHOW INDEX FROM mydb.mytable;\n\nThe WHERE clause can be given to select rows using more general\nconditions, as discussed in\nhttps://mariadb.com/kb/en/extended-show/.\n\nYou can also list a table\'s indexes with the mysqlshow -k db_name\ntbl_name command.\n\nURL: https://mariadb.com/kb/en/show-index/\n\n','','https://mariadb.com/kb/en/show-index/'),(309,'SHOW CREATE DATABASE',26,'Syntax:\nSHOW CREATE {DATABASE | SCHEMA} [IF NOT EXISTS] db_name\n\nShows the CREATE DATABASE statement that creates the given database. If\nthe SHOW statement includes an IF NOT EXISTS clause, the output too\nincludes such a clause. SHOW CREATE SCHEMA is a synonym for SHOW CREATE\nDATABASE.\n\nURL: https://mariadb.com/kb/en/show-create-database/\n\n','MariaDB> SHOW CREATE DATABASE test\\G\n*************************** 1. row ***************************\n Database: test\nCreate Database: CREATE DATABASE `test`\n /*!40100 DEFAULT CHARACTER SET latin1 */\n\nMariaDB> SHOW CREATE SCHEMA test\\G\n*************************** 1. row ***************************\n Database: test\nCreate Database: CREATE DATABASE `test`\n /*!40100 DEFAULT CHARACTER SET latin1 */\n','https://mariadb.com/kb/en/show-create-database/'),(310,'LEAVE',23,'Syntax:\nLEAVE label\n\nThis statement is used to exit the flow control construct that has the\ngiven label. If the label is for the outermost stored program block,\nLEAVE exits the program.\n\nLEAVE can be used within BEGIN ... END or loop constructs (LOOP,\nREPEAT, WHILE).\n\nURL: https://mariadb.com/kb/en/leave/\n\n','','https://mariadb.com/kb/en/leave/'),(311,'NOT IN',18,'Syntax:\nexpr NOT IN (value,...)\n\nThis is the same as NOT (expr IN (value,...)).\n\nURL: https://mariadb.com/kb/en/not-in/\n\n','','https://mariadb.com/kb/en/not-in/'),(312,'!',15,'Syntax:\nNOT, !\n\nLogical NOT. Evaluates to 1 if the operand is 0, to 0 if the operand is\nnonzero, and NOT NULL returns NULL.\n\nURL: https://mariadb.com/kb/en/not/\n\n','MariaDB> SELECT NOT 10;\n -> 0\nMariaDB> SELECT NOT 0;\n -> 1\nMariaDB> SELECT NOT NULL;\n -> NULL\nMariaDB> SELECT ! (1+1);\n -> 0\nMariaDB> SELECT ! 1+1;\n -> 1\n','https://mariadb.com/kb/en/not/'),(313,'DECLARE HANDLER',23,'Syntax:\nDECLARE handler_action HANDLER\n FOR condition_value [, condition_value] ...\n statement\n\nhandler_action:\n CONTINUE\n | EXIT\n | UNDO\n\ncondition_value:\n mysql_error_code\n | SQLSTATE [VALUE] sqlstate_value\n | condition_name\n | SQLWARNING\n | NOT FOUND\n | SQLEXCEPTION\n\nThe DECLARE ... HANDLER statement specifies a handler that deals with\none or more conditions. If one of these conditions occurs, the\nspecified statement executes. statement can be a simple statement such\nas SET var_name = value, or a compound statement written using BEGIN\nand END (see [HELP BEGIN END]).\n\nHandler declarations must appear after variable or condition\ndeclarations.\n\nThe handler_action value indicates what action the handler takes after\nexecution of the handler statement:\n\no CONTINUE: Execution of the current program continues.\n\no EXIT: Execution terminates for the BEGIN ... END compound statement\n in which the handler is declared. This is true even if the condition\n occurs in an inner block.\n\no UNDO: Not supported.\n\nThe condition_value for DECLARE ... HANDLER indicates the specific\ncondition or class of conditions that activates the handler:\n\no A MySQL error code (a number) or an SQLSTATE value (a 5-character\n string literal). You should not use MySQL error code 0 or SQLSTATE\n values that begin with \'00\', because those indicate success rather\n than an error condition. For a list of MySQL error codes and SQLSTATE\n values, see\n https://mariadb.com/kb/en/mariadb-error-codes/.\n\no A condition name previously specified with DECLARE ... CONDITION. A\n condition name can be associated with a MySQL error code or SQLSTATE\n value. See [HELP DECLARE CONDITION].\n\no SQLWARNING is shorthand for the class of SQLSTATE values that begin\n with \'01\'.\n\no NOT FOUND is shorthand for the class of SQLSTATE values that begin\n with \'02\'. This is relevant within the context of cursors and is used\n to control what happens when a cursor reaches the end of a data set.\n If no more rows are available, a No Data condition occurs with\n SQLSTATE value \'02000\'. To detect this condition, you can set up a\n handler for it (or for a NOT FOUND condition). For an example, see\n https://mariadb.com/kb/en/cursor-overview/. This condition\n also occurs for SELECT ... INTO var_list statements that retrieve no\n rows.\n\no SQLEXCEPTION is shorthand for the class of SQLSTATE values that do\n not begin with \'00\', \'01\', or \'02\'.\n\nIf a condition occurs for which no handler has been declared, the\naction taken depends on the condition class:\n\no For SQLEXCEPTION conditions, the stored program terminates at the\n statement that raised the condition, as if there were an EXIT\n handler. If the program was called by another stored program, the\n calling program handles the condition using the handler selection\n rules applied to its own handlers.\n\no For SQLWARNING conditions, the program continues executing, as if\n there were a CONTINUE handler.\n\no For NOT FOUND conditions, if the condition was raised normally, the\n action is CONTINUE. If it was raised by SIGNAL or RESIGNAL, the\n action is EXIT.\n\nURL: https://mariadb.com/kb/en/declare-handler/\n\n','MariaDB> CREATE TABLE test.t (s1 INT, PRIMARY KEY (s1));\nQuery OK, 0 rows affected (0.00 sec)\n\nMariaDB> delimiter //\n\nMariaDB> CREATE PROCEDURE handlerdemo ()\n -> BEGIN\n -> DECLARE CONTINUE HANDLER FOR SQLSTATE \'23000\' SET @x2 = 1;\n -> SET @x = 1;\n -> INSERT INTO test.t VALUES (1);\n -> SET @x = 2;\n -> INSERT INTO test.t VALUES (1);\n -> SET @x = 3;\n -> END;\n -> //\nQuery OK, 0 rows affected (0.00 sec)\n\nMariaDB> CALL handlerdemo()//\nQuery OK, 0 rows affected (0.00 sec)\n\nMariaDB> SELECT @x//\n +------+\n | @x |\n +------+\n | 3 |\n +------+\n 1 row in set (0.00 sec)\n','https://mariadb.com/kb/en/declare-handler/'),(314,'DOUBLE',22,'DOUBLE[(M,D)] [UNSIGNED] [ZEROFILL]\n\nA normal-size (double-precision) floating-point number. Permissible\nvalues are -1.7976931348623157E+308 to -2.2250738585072014E-308, 0, and\n2.2250738585072014E-308 to 1.7976931348623157E+308. These are the\ntheoretical limits, based on the IEEE standard. The actual range might\nbe slightly smaller depending on your hardware or operating system.\n\nM is the total number of digits and D is the number of digits following\nthe decimal point. If M and D are omitted, values are stored to the\nlimits permitted by the hardware. A double-precision floating-point\nnumber is accurate to approximately 15 decimal places.\n\nUNSIGNED, if specified, disallows negative values.\n\nURL: https://mariadb.com/kb/en/double/\n\n','','https://mariadb.com/kb/en/double/'),(315,'TIME',22,'TIME\n\nA time. The range is \'-838:59:59\' to \'838:59:59\'. MySQL displays TIME\nvalues in \'HH:MM:SS\' format, but permits assignment of values to TIME\ncolumns using either strings or numbers.\n\nURL: https://mariadb.com/kb/en/time/\n\n','','https://mariadb.com/kb/en/time/'),(316,'&&',15,'Syntax:\nAND, &&\n\nLogical AND. Evaluates to 1 if all operands are nonzero and not NULL,\nto 0 if one or more operands are 0, otherwise NULL is returned.\n\nURL: https://mariadb.com/kb/en/and/\n\n','MariaDB> SELECT 1 && 1;\n -> 1\nMariaDB> SELECT 1 && 0;\n -> 0\nMariaDB> SELECT 1 && NULL;\n -> NULL\nMariaDB> SELECT 0 && NULL;\n -> 0\nMariaDB> SELECT NULL && 0;\n -> 0\n','https://mariadb.com/kb/en/and/'),(317,'X',11,'X(p)\n\nReturns the X-coordinate value for the Point object p as a\ndouble-precision number.\n\nURL: https://mariadb.com/kb/en/x/\n\n','MariaDB> SELECT X(POINT(56.7, 53.34));\n+-----------------------+\n| X(POINT(56.7, 53.34)) |\n+-----------------------+\n| 56.7 |\n+-----------------------+\n','https://mariadb.com/kb/en/x/'),(318,'SYSTEM_USER',17,'Syntax:\nSYSTEM_USER()\n\nSYSTEM_USER() is a synonym for USER().\n\nURL: https://mariadb.com/kb/en/system_user/\n\n','','https://mariadb.com/kb/en/system_user/'),(319,'FOUND_ROWS',17,'Syntax:\nFOUND_ROWS()\n\nA SELECT statement may include a LIMIT clause to restrict the number of\nrows the server returns to the client. In some cases, it is desirable\nto know how many rows the statement would have returned without the\nLIMIT, but without running the statement again. To obtain this row\ncount, include a SQL_CALC_FOUND_ROWS option in the SELECT statement,\nand then invoke FOUND_ROWS() afterward:\n\nURL: https://mariadb.com/kb/en/found_rows/\n\n','MariaDB> SELECT SQL_CALC_FOUND_ROWS * FROM tbl_name\n -> WHERE id > 100 LIMIT 10;\nMariaDB> SELECT FOUND_ROWS();\n','https://mariadb.com/kb/en/found_rows/'),(320,'CROSSES',30,'Crosses(g1,g2)\n\nReturns 1 if g1 spatially crosses g2. Returns NULL if g1 is a Polygon\nor a MultiPolygon, or if g2 is a Point or a MultiPoint. Otherwise,\nreturns 0.\n\nThe term spatially crosses denotes a spatial relation between two given\ngeometries that has the following properties:\n\no The two geometries intersect\n\no Their intersection results in a geometry that has a dimension that is\n one less than the maximum dimension of the two given geometries\n\no Their intersection is not equal to either of the two given geometries\n\nURL: https://mariadb.com/kb/en/crosses/\n\n','','https://mariadb.com/kb/en/crosses/'),(321,'TRUNCATE TABLE',39,'Syntax:\nTRUNCATE [TABLE] tbl_name\n\nTRUNCATE TABLE empties a table completely. It requires the DROP\nprivilege.\n\nLogically, TRUNCATE TABLE is similar to a DELETE statement that deletes\nall rows, or a sequence of DROP TABLE and CREATE TABLE statements. To\nachieve high performance, it bypasses the DML method of deleting data.\nThus, it cannot be rolled back, it does not cause ON DELETE triggers to\nfire, and it cannot be performed for InnoDB tables with parent-child\nforeign key relationships.\n\nAlthough TRUNCATE TABLE is similar to DELETE, it is classified as a DDL\nstatement rather than a DML statement. It differs from DELETE in the\nfollowing ways in MySQL 5.5:\n\no Truncate operations drop and re-create the table, which is much\n faster than deleting rows one by one, particularly for large tables.\n\no Truncate operations cause an implicit commit, and so cannot be rolled\n back.\n\no Truncation operations cannot be performed if the session holds an\n active table lock.\n\no TRUNCATE TABLE fails for an InnoDB table if there are any FOREIGN KEY\n constraints from other tables that reference the table. Foreign key\n constraints between columns of the same table are permitted.\n\no Truncation operations do not return a meaningful value for the number\n of deleted rows. The usual result is \"0 rows affected,\" which should\n be interpreted as \"no information.\"\n\no As long as the table format file tbl_name.frm is valid, the table can\n be re-created as an empty table with TRUNCATE TABLE, even if the data\n or index files have become corrupted.\n\no Any AUTO_INCREMENT value is reset to its start value. This is true\n even for MyISAM and InnoDB, which normally do not reuse sequence\n values.\n\no When used with partitioned tables, TRUNCATE TABLE preserves the\n partitioning; that is, the data and index files are dropped and\n re-created, while the partition definitions (.par) file is\n unaffected.\n\no The TRUNCATE TABLE statement does not invoke ON DELETE triggers.\n\nURL: https://mariadb.com/kb/en/truncate-table/\n\n','','https://mariadb.com/kb/en/truncate-table/'),(322,'BIT_XOR',16,'Syntax:\nBIT_XOR(expr)\n\nReturns the bitwise XOR of all bits in expr. The calculation is\nperformed with 64-bit (BIGINT) precision.\n\nURL: https://mariadb.com/kb/en/bit_xor/\n\n','','https://mariadb.com/kb/en/bit_xor/'),(323,'CURRENT_DATE',31,'Syntax:\nCURRENT_DATE, CURRENT_DATE()\n\nCURRENT_DATE and CURRENT_DATE() are synonyms for CURDATE().\n\nURL: https://mariadb.com/kb/en/current_date/\n\n','','https://mariadb.com/kb/en/current_date/'),(324,'START SLAVE',8,'Syntax:\nSTART SLAVE [thread_types]\n\nSTART SLAVE [SQL_THREAD] UNTIL\n MASTER_LOG_FILE = \'log_name\', MASTER_LOG_POS = log_pos\n\nSTART SLAVE [SQL_THREAD] UNTIL\n RELAY_LOG_FILE = \'log_name\', RELAY_LOG_POS = log_pos\n\nthread_types:\n [thread_type [, thread_type] ... ]\n\nthread_type: IO_THREAD | SQL_THREAD\n\nSTART SLAVE with no thread_type options starts both of the slave\nthreads. The I/O thread reads events from the master server and stores\nthem in the relay log. The SQL thread reads events from the relay log\nand executes them. START SLAVE requires the SUPER privilege.\n\nIf START SLAVE succeeds in starting the slave threads, it returns\nwithout any error. However, even in that case, it might be that the\nslave threads start and then later stop (for example, because they do\nnot manage to connect to the master or read its binary log, or some\nother problem). START SLAVE does not warn you about this. You must\ncheck the slave\'s error log for error messages generated by the slave\nthreads, or check that they are running satisfactorily with SHOW SLAVE\nSTATUS.\n\nURL: https://mariadb.com/kb/en/start-slave/\n\n','','https://mariadb.com/kb/en/start-slave/'),(325,'AREA',2,'Area(poly)\n\nReturns as a double-precision number the area of the Polygon value\npoly, as measured in its spatial reference system.\n\nURL: https://mariadb.com/kb/en/area/\n\n','MariaDB> SET @poly = \'Polygon((0 0,0 3,3 0,0 0),(1 1,1 2,2 1,1 1))\';\nMariaDB> SELECT Area(GeomFromText(@poly));\n+---------------------------+\n| Area(GeomFromText(@poly)) |\n+---------------------------+\n| 4 |\n+---------------------------+\n','https://mariadb.com/kb/en/area/'),(326,'FLUSH',26,'Syntax:\nFLUSH [NO_WRITE_TO_BINLOG | LOCAL]\n flush_option [, flush_option] ...\n\nThe FLUSH statement has several variant forms that clear or reload\nvarious internal caches, flush tables, or acquire locks. To execute\nFLUSH, you must have the RELOAD privilege. Specific flush options might\nrequire additional privileges, as described later.\n\nBy default, the server writes FLUSH statements to the binary log so\nthat they replicate to replication slaves. To suppress logging, use the\noptional NO_WRITE_TO_BINLOG keyword or its alias LOCAL.\n\n*Note*: FLUSH LOGS, FLUSH MASTER, FLUSH SLAVE, and FLUSH TABLES WITH\nREAD LOCK (with or without a table list) are not written to the binary\nlog in any case because they would cause problems if replicated to a\nslave.\n\nThe FLUSH statement causes an implicit commit. See\nhttp://dev.mysql.com/doc/refman/5.5/en/implicit-commit.html.\n\nThe RESET statement is similar to FLUSH. See [HELP RESET], for\ninformation about using the RESET statement with replication.\n\nURL: https://mariadb.com/kb/en/flush/\n\n','','https://mariadb.com/kb/en/flush/'),(327,'BEGIN END',23,'Syntax:\n[begin_label:] BEGIN\n [statement_list]\nEND [end_label]\n\nBEGIN ... END syntax is used for writing compound statements, which can\nappear within stored programs (stored procedures and functions,\ntriggers, and events). A compound statement can contain multiple\nstatements, enclosed by the BEGIN and END keywords. statement_list\nrepresents a list of one or more statements, each terminated by a\nsemicolon (;) statement delimiter. The statement_list itself is\noptional, so the empty compound statement (BEGIN END) is legal.\n\nBEGIN ... END blocks can be nested.\n\nUse of multiple statements requires that a client is able to send\nstatement strings containing the ; statement delimiter. In the mysql\ncommand-line client, this is handled with the delimiter command.\nChanging the ; end-of-statement delimiter (for example, to //) permit ;\nto be used in a program body. For an example, see\nhttps://mariadb.com/kb/en/stored-procedure-overview/.\n\nA BEGIN ... END block can be labeled. See [HELP labels].\n\nURL: https://mariadb.com/kb/en/begin-end/\n\n','','https://mariadb.com/kb/en/begin-end/'),(328,'SHOW PROCEDURE STATUS',26,'Syntax:\nSHOW PROCEDURE STATUS\n [LIKE \'pattern\' | WHERE expr]\n\nThis statement is a MySQL extension. It returns characteristics of a\nstored procedure, such as the database, name, type, creator, creation\nand modification dates, and character set information. A similar\nstatement, SHOW FUNCTION STATUS, displays information about stored\nfunctions (see [HELP SHOW FUNCTION STATUS]).\n\nThe LIKE clause, if present, indicates which procedure or function\nnames to match. The WHERE clause can be given to select rows using more\ngeneral conditions, as discussed in\nhttps://mariadb.com/kb/en/extended-show/.\n\nURL: https://mariadb.com/kb/en/show-procedure-status/\n\n','MariaDB> SHOW PROCEDURE STATUS LIKE \'sp1\'\\G\n*************************** 1. row ***************************\n Db: test\n Name: sp1\n Type: PROCEDURE\n Definer: testuser@localhost\n Modified: 2004-08-03 15:29:37\n Created: 2004-08-03 15:29:37\n Security_type: DEFINER\n Comment:\ncharacter_set_client: latin1\ncollation_connection: latin1_swedish_ci\n Database Collation: latin1_swedish_ci\n','https://mariadb.com/kb/en/show-procedure-status/'),(329,'DESCRIBE',28,'Syntax:\n{DESCRIBE | DESC} tbl_name [col_name | wild]\n\nDESCRIBE provides information about the columns in a table. It is a\nshortcut for SHOW COLUMNS FROM. These statements also display\ninformation for views. (See [HELP SHOW COLUMNS].)\n\ncol_name can be a column name, or a string containing the SQL \"%\" and\n\"_\" wildcard characters to obtain output only for the columns with\nnames matching the string. There is no need to enclose the string\nwithin quotation marks unless it contains spaces or other special\ncharacters.\n\nMariaDB> DESCRIBE City;\n+------------+----------+------+-----+---------+----------------+\n| Field | Type | Null | Key | Default | Extra |\n+------------+----------+------+-----+---------+----------------+\n| Id | int(11) | NO | PRI | NULL | auto_increment |\n| Name | char(35) | NO | | | |\n| Country | char(3) | NO | UNI | | |\n| District | char(20) | YES | MUL | | |\n| Population | int(11) | NO | | 0 | |\n+------------+----------+------+-----+---------+----------------+\n5 rows in set (0.00 sec)\n\nThe description for SHOW COLUMNS provides more information about the\noutput columns (see [HELP SHOW COLUMNS]).\n\nURL: https://mariadb.com/kb/en/describe/\n\n','','https://mariadb.com/kb/en/describe/'),(330,'SHOW WARNINGS',26,'Syntax:\nSHOW WARNINGS [LIMIT [offset,] row_count]\nSHOW COUNT(*) WARNINGS\n\nSHOW WARNINGS shows information about the conditions (errors, warnings,\nand notes) that resulted from the last statement in the current session\nthat generated messages. It shows nothing if the last statement used a\ntable and generated no messages. (That is, a statement that uses a\ntable but generates no messages clears the message list.) Statements\nthat do not use tables and do not generate messages have no effect on\nthe message list.\n\nWarnings are generated for DML statements such as INSERT, UPDATE, and\nLOAD DATA INFILE as well as DDL statements such as CREATE TABLE and\nALTER TABLE.\n\nSHOW WARNINGS is also used following EXPLAIN EXTENDED, to display the\nextra information generated by EXPLAIN when the EXTENDED keyword is\nused. See https://mariadb.com/kb/en/explain#explain-extended.\n\nThe LIMIT clause has the same syntax as for the SELECT statement. See\nhttps://mariadb.com/kb/en/select/.\n\nA related statement, SHOW ERRORS, shows only the error conditions (it\nexcludes warnings and notes). See [HELP SHOW ERRORS].\n\nThe SHOW COUNT(*) WARNINGS statement displays the total number of\nerrors, warnings, and notes. You can also retrieve this number from the\nwarning_count system variable:\n\nSHOW COUNT(*) WARNINGS;\nSELECT @@warning_count;\n\nURL: https://mariadb.com/kb/en/show-warnings/\n\n','','https://mariadb.com/kb/en/show-warnings/'),(331,'DROP USER',10,'Syntax:\nDROP USER user [, user] ...\n\nThe DROP USER statement removes one or more MySQL accounts and their\nprivileges. It removes privilege rows for the account from all grant\ntables. To use this statement, you must have the global CREATE USER\nprivilege or the DELETE privilege for the mysql database. Each account\nname uses the format described in\nhttps://mariadb.com/kb/en/create-user#account-names. For example:\n\nDROP USER \'jeffrey\'@\'localhost\';\n\nIf you specify only the user name part of the account name, a host name\npart of \'%\' is used.\n\nURL: https://mariadb.com/kb/en/drop-user/\n\n','','https://mariadb.com/kb/en/drop-user/'),(332,'STDDEV_POP',16,'Syntax:\nSTDDEV_POP(expr)\n\nReturns the population standard deviation of expr (the square root of\nVAR_POP()). You can also use STD() or STDDEV(), which are equivalent\nbut not standard SQL.\n\nSTDDEV_POP() returns NULL if there were no matching rows.\n\nURL: https://mariadb.com/kb/en/stddev_pop/\n\n','','https://mariadb.com/kb/en/stddev_pop/'),(333,'SHOW CHARACTER SET',26,'Syntax:\nSHOW CHARACTER SET\n [LIKE \'pattern\' | WHERE expr]\n\nThe SHOW CHARACTER SET statement shows all available character sets.\nThe LIKE clause, if present, indicates which character set names to\nmatch. The WHERE clause can be given to select rows using more general\nconditions, as discussed in\nhttps://mariadb.com/kb/en/extended-show/. For example:\n\nMariaDB> SHOW CHARACTER SET LIKE \'latin%\';\n+---------+-----------------------------+-------------------+--------+\n| Charset | Description | Default collation | Maxlen |\n+---------+-----------------------------+-------------------+--------+\n| latin1 | cp1252 West European | latin1_swedish_ci | 1 |\n| latin2 | ISO 8859-2 Central European | latin2_general_ci | 1 |\n| latin5 | ISO 8859-9 Turkish | latin5_turkish_ci | 1 |\n| latin7 | ISO 8859-13 Baltic | latin7_general_ci | 1 |\n+---------+-----------------------------+-------------------+--------+\n\nURL: https://mariadb.com/kb/en/show-character-set/\n\n','','https://mariadb.com/kb/en/show-character-set/'),(334,'SUBSTRING',37,'Syntax:\nSUBSTRING(str,pos), SUBSTRING(str FROM pos), SUBSTRING(str,pos,len),\nSUBSTRING(str FROM pos FOR len)\n\nThe forms without a len argument return a substring from string str\nstarting at position pos. The forms with a len argument return a\nsubstring len characters long from string str, starting at position\npos. The forms that use FROM are standard SQL syntax. It is also\npossible to use a negative value for pos. In this case, the beginning\nof the substring is pos characters from the end of the string, rather\nthan the beginning. A negative value may be used for pos in any of the\nforms of this function.\n\nFor all forms of SUBSTRING(), the position of the first character in\nthe string from which the substring is to be extracted is reckoned as\n1.\n\nURL: https://mariadb.com/kb/en/substring/\n\n','MariaDB> SELECT SUBSTRING(\'Quadratically\',5);\n -> \'ratically\'\nMariaDB> SELECT SUBSTRING(\'foobarbar\' FROM 4);\n -> \'barbar\'\nMariaDB> SELECT SUBSTRING(\'Quadratically\',5,6);\n -> \'ratica\'\nMariaDB> SELECT SUBSTRING(\'Sakila\', -3);\n -> \'ila\'\nMariaDB> SELECT SUBSTRING(\'Sakila\', -5, 3);\n -> \'aki\'\nMariaDB> SELECT SUBSTRING(\'Sakila\' FROM -4 FOR 2);\n -> \'ki\'\n','https://mariadb.com/kb/en/substring/'),(335,'ISEMPTY',36,'IsEmpty(g)\n\nReturns 1 if the geometry value g is the empty geometry, 0 if it is not\nempty, and -1 if the argument is NULL. If the geometry is empty, it\nrepresents the empty point set.\n\nURL: https://mariadb.com/kb/en/isempty/\n\n','','https://mariadb.com/kb/en/isempty/'),(336,'SHOW FUNCTION STATUS',26,'Syntax:\nSHOW FUNCTION STATUS\n [LIKE \'pattern\' | WHERE expr]\n\nThis statement is similar to SHOW PROCEDURE STATUS but for stored\nfunctions. See [HELP SHOW PROCEDURE STATUS].\n\nURL: https://mariadb.com/kb/en/show-function-status/\n\n','','https://mariadb.com/kb/en/show-function-status/'),(337,'LTRIM',37,'Syntax:\nLTRIM(str)\n\nReturns the string str with leading space characters removed.\n\nURL: https://mariadb.com/kb/en/ltrim/\n\n','MariaDB> SELECT LTRIM(\' barbar\');\n -> \'barbar\'\n','https://mariadb.com/kb/en/ltrim/'),(338,'INTERSECTS',30,'Intersects(g1,g2)\n\nReturns 1 or 0 to indicate whether g1 spatially intersects g2.\n\nURL: https://mariadb.com/kb/en/intersects/\n\n','','https://mariadb.com/kb/en/intersects/'),(339,'CALL',27,'Syntax:\nCALL sp_name([parameter[,...]])\nCALL sp_name[()]\n\nThe CALL statement invokes a stored procedure that was defined\npreviously with CREATE PROCEDURE.\n\nStored procedures that take no arguments can be invoked without\nparentheses. That is, CALL p() and CALL p are equivalent.\n\nCALL can pass back values to its caller using parameters that are\ndeclared as OUT or INOUT parameters. When the procedure returns, a\nclient program can also obtain the number of rows affected for the\nfinal statement executed within the routine: At the SQL level, call the\nROW_COUNT() function; from the C API, call the mysql_affected_rows()\nfunction.\n\nURL: https://mariadb.com/kb/en/call/\n\n','','https://mariadb.com/kb/en/call/'),(340,'MBRDISJOINT',6,'MBRDisjoint(g1,g2)\n\nReturns 1 or 0 to indicate whether the Minimum Bounding Rectangles of\nthe two geometries g1 and g2 are disjoint (do not intersect).\n\nURL: https://mariadb.com/kb/en/mbrdisjoint/\n\n','','https://mariadb.com/kb/en/mbrdisjoint/'),(341,'VALUES',14,'Syntax:\nVALUES(col_name)\n\nIn an INSERT ... ON DUPLICATE KEY UPDATE statement, you can use the\nVALUES(col_name) function in the UPDATE clause to refer to column\nvalues from the INSERT portion of the statement. In other words,\nVALUES(col_name) in the UPDATE clause refers to the value of col_name\nthat would be inserted, had no duplicate-key conflict occurred. This\nfunction is especially useful in multiple-row inserts. The VALUES()\nfunction is meaningful only in the ON DUPLICATE KEY UPDATE clause of\nINSERT statements and returns NULL otherwise. See\nhttps://mariadb.com/kb/en/insert-on-duplicate-key-update/.\n\nURL: https://mariadb.com/kb/en/values/\n\n','MariaDB> INSERT INTO table (a,b,c) VALUES (1,2,3),(4,5,6)\n -> ON DUPLICATE KEY UPDATE c=VALUES(a)+VALUES(b);\n','https://mariadb.com/kb/en/values/'),(342,'SUBSTRING_INDEX',37,'Syntax:\nSUBSTRING_INDEX(str,delim,count)\n\nReturns the substring from string str before count occurrences of the\ndelimiter delim. If count is positive, everything to the left of the\nfinal delimiter (counting from the left) is returned. If count is\nnegative, everything to the right of the final delimiter (counting from\nthe right) is returned. SUBSTRING_INDEX() performs a case-sensitive\nmatch when searching for delim.\n\nURL: https://mariadb.com/kb/en/substring_index/\n\n','MariaDB> SELECT SUBSTRING_INDEX(\'www.mariadb.org\', \'.\', 2);\n -> \'www.mariadb\'\nMariaDB> SELECT SUBSTRING_INDEX(\'www.mariadb.org\', \'.\', -2);\n -> \'mariadb.org\'\n','https://mariadb.com/kb/en/substring_index/'),(343,'ENCODE',12,'Syntax:\nENCODE(str,pass_str)\n\nEncrypt str using pass_str as the password. To decrypt the result, use\nDECODE().\n\nThe result is a binary string of the same length as str.\n\nThe strength of the encryption is based on how good the random\ngenerator is. It should suffice for short strings.\n\nURL: https://mariadb.com/kb/en/encode/\n\n','','https://mariadb.com/kb/en/encode/'),(344,'LOOP',23,'Syntax:\n[begin_label:] LOOP\n statement_list\nEND LOOP [end_label]\n\nLOOP implements a simple loop construct, enabling repeated execution of\nthe statement list, which consists of one or more statements, each\nterminated by a semicolon (;) statement delimiter. The statements\nwithin the loop are repeated until the loop is terminated. Usually,\nthis is accomplished with a LEAVE statement. Within a stored function,\nRETURN can also be used, which exits the function entirely.\n\nNeglecting to include a loop-termination statement results in an\ninfinite loop.\n\nA LOOP statement can be labeled. For the rules regarding label use, see\n[HELP labels].\n\nURL: https://mariadb.com/kb/en/loop/\n\n','CREATE PROCEDURE doiterate(p1 INT)\nBEGIN\n label1: LOOP\n SET p1 = p1 + 1;\n IF p1 < 10 THEN\n ITERATE label1;\n END IF;\n LEAVE label1;\n END LOOP label1;\n SET @x = p1;\nEND;\n','https://mariadb.com/kb/en/loop/'),(345,'TRUNCATE',4,'Syntax:\nTRUNCATE(X,D)\n\nReturns the number X, truncated to D decimal places. If D is 0, the\nresult has no decimal point or fractional part. D can be negative to\ncause D digits left of the decimal point of the value X to become zero.\n\nURL: https://mariadb.com/kb/en/truncate/\n\n','MariaDB> SELECT TRUNCATE(1.223,1);\n -> 1.2\nMariaDB> SELECT TRUNCATE(1.999,1);\n -> 1.9\nMariaDB> SELECT TRUNCATE(1.999,0);\n -> 1\nMariaDB> SELECT TRUNCATE(-1.999,1);\n -> -1.9\nMariaDB> SELECT TRUNCATE(122,-2);\n -> 100\nMariaDB> SELECT TRUNCATE(10.28*100,0);\n -> 1028\n','https://mariadb.com/kb/en/truncate/'),(346,'TIMESTAMPADD',31,'Syntax:\nTIMESTAMPADD(unit,interval,datetime_expr)\n\nAdds the integer expression interval to the date or datetime expression\ndatetime_expr. The unit for interval is given by the unit argument,\nwhich should be one of the following values: MICROSECOND\n(microseconds), SECOND, MINUTE, HOUR, DAY, WEEK, MONTH, QUARTER, or\nYEAR.\n\nIt is possible to use FRAC_SECOND in place of MICROSECOND, but\nFRAC_SECOND is deprecated. FRAC_SECOND was removed in MySQL 5.5.3.\n\nThe unit value may be specified using one of keywords as shown, or with\na prefix of SQL_TSI_. For example, DAY and SQL_TSI_DAY both are legal.\n\nURL: https://mariadb.com/kb/en/timestampadd/\n\n','MariaDB> SELECT TIMESTAMPADD(MINUTE,1,\'2003-01-02\');\n -> \'2003-01-02 00:01:00\'\nMariaDB> SELECT TIMESTAMPADD(WEEK,1,\'2003-01-02\');\n -> \'2003-01-09\'\n','https://mariadb.com/kb/en/timestampadd/'),(347,'SHOW',26,'SHOW has many forms that provide information about databases, tables,\ncolumns, or status information about the server. This section describes\nthose following:\n\nSHOW AUTHORS\nSHOW {BINARY | MASTER} LOGS\nSHOW BINLOG EVENTS [IN \'log_name\'] [FROM pos] [LIMIT [offset,] row_count]\nSHOW CHARACTER SET [like_or_where]\nSHOW COLLATION [like_or_where]\nSHOW [FULL] COLUMNS FROM tbl_name [FROM db_name] [like_or_where]\nSHOW CONTRIBUTORS\nSHOW CREATE DATABASE db_name\nSHOW CREATE EVENT event_name\nSHOW CREATE FUNCTION func_name\nSHOW CREATE PROCEDURE proc_name\nSHOW CREATE TABLE tbl_name\nSHOW CREATE TRIGGER trigger_name\nSHOW CREATE VIEW view_name\nSHOW DATABASES [like_or_where]\nSHOW ENGINE engine_name {STATUS | MUTEX}\nSHOW [STORAGE] ENGINES\nSHOW ERRORS [LIMIT [offset,] row_count]\nSHOW EVENTS\nSHOW FUNCTION CODE func_name\nSHOW FUNCTION STATUS [like_or_where]\nSHOW GRANTS FOR user\nSHOW INDEX FROM tbl_name [FROM db_name]\nSHOW MASTER STATUS\nSHOW OPEN TABLES [FROM db_name] [like_or_where]\nSHOW PLUGINS\nSHOW PROCEDURE CODE proc_name\nSHOW PROCEDURE STATUS [like_or_where]\nSHOW PRIVILEGES\nSHOW [FULL] PROCESSLIST\nSHOW PROFILE [types] [FOR QUERY n] [OFFSET n] [LIMIT n]\nSHOW PROFILES\nSHOW SLAVE HOSTS\nSHOW SLAVE STATUS\nSHOW [GLOBAL | SESSION] STATUS [like_or_where]\nSHOW TABLE STATUS [FROM db_name] [like_or_where]\nSHOW [FULL] TABLES [FROM db_name] [like_or_where]\nSHOW TRIGGERS [FROM db_name] [like_or_where]\nSHOW [GLOBAL | SESSION] VARIABLES [like_or_where]\nSHOW WARNINGS [LIMIT [offset,] row_count]\n\nlike_or_where:\n LIKE \'pattern\'\n | WHERE expr\n\nIf the syntax for a given SHOW statement includes a LIKE \'pattern\'\npart, \'pattern\' is a string that can contain the SQL \"%\" and \"_\"\nwildcard characters. The pattern is useful for restricting statement\noutput to matching values.\n\nSeveral SHOW statements also accept a WHERE clause that provides more\nflexibility in specifying which rows to display. See\nhttps://mariadb.com/kb/en/extended-show/.\n\nURL: https://mariadb.com/kb/en/show/\n\n','','https://mariadb.com/kb/en/show/'),(348,'GREATEST',18,'Syntax:\nGREATEST(value1,value2,...)\n\nWith two or more arguments, returns the largest (maximum-valued)\nargument. The arguments are compared using the same rules as for\nLEAST().\n\nURL: https://mariadb.com/kb/en/greatest/\n\n','MariaDB> SELECT GREATEST(2,0);\n -> 2\nMariaDB> SELECT GREATEST(34.0,3.0,5.0,767.0);\n -> 767.0\nMariaDB> SELECT GREATEST(\'B\',\'A\',\'C\');\n -> \'C\'\n','https://mariadb.com/kb/en/greatest/'),(349,'SHOW VARIABLES',26,'Syntax:\nSHOW [GLOBAL | SESSION] VARIABLES\n [LIKE \'pattern\' | WHERE expr]\n\nSHOW VARIABLES shows the values of MySQL system variables. This\ninformation also can be obtained using the mysqladmin variables\ncommand. The LIKE clause, if present, indicates which variable names to\nmatch. The WHERE clause can be given to select rows using more general\nconditions, as discussed in\nhttps://mariadb.com/kb/en/extended-show/. This\nstatement does not require any privilege. It requires only the ability\nto connect to the server.\n\nWith the GLOBAL modifier, SHOW VARIABLES displays the values that are\nused for new connections to MySQL. As of MySQL 5.5.3, if a variable has\nno global value, no value is displayed. Before 5.5.3, the session value\nis displayed. With SESSION, SHOW VARIABLES displays the values that are\nin effect for the current connection. If no modifier is present, the\ndefault is SESSION. LOCAL is a synonym for SESSION.\nWith a LIKE clause, the statement displays only rows for those\nvariables with names that match the pattern. To obtain the row for a\nspecific variable, use a LIKE clause as shown:\n\nSHOW VARIABLES LIKE \'max_join_size\';\nSHOW SESSION VARIABLES LIKE \'max_join_size\';\n\nTo get a list of variables whose name match a pattern, use the \"%\"\nwildcard character in a LIKE clause:\n\nSHOW VARIABLES LIKE \'%size%\';\nSHOW GLOBAL VARIABLES LIKE \'%size%\';\n\nWildcard characters can be used in any position within the pattern to\nbe matched. Strictly speaking, because \"_\" is a wildcard that matches\nany single character, you should escape it as \"\\_\" to match it\nliterally. In practice, this is rarely necessary.\n\nURL: https://mariadb.com/kb/en/show-variables/\n\n','','https://mariadb.com/kb/en/show-variables/'),(350,'BINLOG',26,'Syntax:\nBINLOG \'str\'\n\nBINLOG is an internal-use statement. It is generated by the mysqlbinlog\nprogram as the printable representation of certain events in binary log\nfiles. (See https://mariadb.com/kb/en/mysqlbinlog/.)\nThe \'str\' value is a base 64-encoded string the that server decodes to\ndetermine the data change indicated by the corresponding event. This\nstatement requires the SUPER privilege.\n\nURL: https://mariadb.com/kb/en/binlog/\n\n','','https://mariadb.com/kb/en/binlog/'),(351,'BIT_AND',16,'Syntax:\nBIT_AND(expr)\n\nReturns the bitwise AND of all bits in expr. The calculation is\nperformed with 64-bit (BIGINT) precision.\n\nURL: https://mariadb.com/kb/en/bit_and/\n\n','','https://mariadb.com/kb/en/bit_and/'),(352,'SECOND',31,'Syntax:\nSECOND(time)\n\nReturns the second for time, in the range 0 to 59.\n\nURL: https://mariadb.com/kb/en/second/\n\n','MariaDB> SELECT SECOND(\'10:05:03\');\n -> 3\n','https://mariadb.com/kb/en/second/'),(353,'ATAN2',4,'Syntax:\nATAN(Y,X), ATAN2(Y,X)\n\nReturns the arc tangent of the two variables X and Y. It is similar to\ncalculating the arc tangent of Y / X, except that the signs of both\narguments are used to determine the quadrant of the result.\n\nURL: https://mariadb.com/kb/en/atan2/\n\n','MariaDB> SELECT ATAN(-2,2);\n -> -0.78539816339745\nMariaDB> SELECT ATAN2(PI(),0);\n -> 1.5707963267949\n','https://mariadb.com/kb/en/atan2/'),(354,'MBRCONTAINS',6,'MBRContains(g1,g2)\n\nReturns 1 or 0 to indicate whether the Minimum Bounding Rectangle of g1\ncontains the Minimum Bounding Rectangle of g2. This tests the opposite\nrelationship as MBRWithin().\n\nURL: https://mariadb.com/kb/en/mbrcontains/\n\n','MariaDB> SET @g1 = GeomFromText(\'Polygon((0 0,0 3,3 3,3 0,0 0))\');\nMariaDB> SET @g2 = GeomFromText(\'Point(1 1)\');\nMariaDB> SELECT MBRContains(@g1,@g2), MBRContains(@g2,@g1);\n----------------------+----------------------+\n| MBRContains(@g1,@g2) | MBRContains(@g2,@g1) |\n+----------------------+----------------------+\n| 1 | 0 |\n+----------------------+----------------------+\n','https://mariadb.com/kb/en/mbrcontains/'),(355,'HOUR',31,'Syntax:\nHOUR(time)\n\nReturns the hour for time. The range of the return value is 0 to 23 for\ntime-of-day values. However, the range of TIME values actually is much\nlarger, so HOUR can return values greater than 23.\n\nURL: https://mariadb.com/kb/en/hour/\n\n','MariaDB> SELECT HOUR(\'10:05:03\');\n -> 10\nMariaDB> SELECT HOUR(\'272:59:59\');\n -> 272\n','https://mariadb.com/kb/en/hour/'),(356,'SELECT',27,'Syntax:\nSELECT\n [ALL | DISTINCT | DISTINCTROW ]\n [HIGH_PRIORITY]\n [STRAIGHT_JOIN]\n [SQL_SMALL_RESULT] [SQL_BIG_RESULT] [SQL_BUFFER_RESULT]\n [SQL_CACHE | SQL_NO_CACHE] [SQL_CALC_FOUND_ROWS]\n select_expr [, select_expr ...]\n [FROM table_references\n [WHERE where_condition]\n [GROUP BY {col_name | expr | position}\n [ASC | DESC], ... [WITH ROLLUP]]\n [HAVING where_condition]\n [ORDER BY {col_name | expr | position}\n [ASC | DESC], ...]\n [LIMIT {[offset,] row_count | row_count OFFSET offset}]\n [PROCEDURE procedure_name(argument_list)]\n [INTO OUTFILE \'file_name\'\n [CHARACTER SET charset_name]\n export_options\n | INTO DUMPFILE \'file_name\'\n | INTO var_name [, var_name]]\n [FOR UPDATE | LOCK IN SHARE MODE]]\n\nSELECT is used to retrieve rows selected from one or more tables, and\ncan include UNION statements and subqueries. See [HELP UNION], and\nhttps://mariadb.com/kb/en/subqueries/.\n\nThe most commonly used clauses of SELECT statements are these:\n\no Each select_expr indicates a column that you want to retrieve. There\n must be at least one select_expr.\n\no table_references indicates the table or tables from which to retrieve\n rows. Its syntax is described in [HELP JOIN].\n\no The WHERE clause, if given, indicates the condition or conditions\n that rows must satisfy to be selected. where_condition is an\n expression that evaluates to true for each row to be selected. The\n statement selects all rows if there is no WHERE clause.\n\n In the WHERE expression, you can use any of the functions and\n operators that MySQL supports, except for aggregate (summary)\n functions. See\n https://mariadb.com/kb/en/select#select-expressions, and\n https://mariadb.com/kb/en/functions-and-operators/.\n\nSELECT can also be used to retrieve rows computed without reference to\nany table.\n\nURL: https://mariadb.com/kb/en/select/\n\n','','https://mariadb.com/kb/en/select/'),(357,'COT',4,'Syntax:\nCOT(X)\n\nReturns the cotangent of X.\n\nURL: https://mariadb.com/kb/en/cot/\n\n','MariaDB> SELECT COT(12);\n -> -1.5726734063977\nMariaDB> SELECT COT(0);\n -> NULL\n','https://mariadb.com/kb/en/cot/'),(358,'SHOW CREATE EVENT',26,'Syntax:\nSHOW CREATE EVENT event_name\n\nThis statement displays the CREATE EVENT statement needed to re-create\na given event. It requires the EVENT privilege for the database from\nwhich the event is to be shown. For example (using the same event\ne_daily defined and then altered in [HELP SHOW EVENTS]):\n\nURL: https://mariadb.com/kb/en/show-create-event/\n\n','MariaDB> SHOW CREATE EVENT test.e_daily\\G\n*************************** 1. row ***************************\n Event: e_daily\n sql_mode:\n time_zone: SYSTEM\n Create Event: CREATE EVENT `e_daily`\n ON SCHEDULE EVERY 1 DAY\n STARTS CURRENT_TIMESTAMP + INTERVAL 6 HOUR\n ON COMPLETION NOT PRESERVE\n ENABLE\n COMMENT \'Saves total number of sessions then\n clears the table each day\'\n DO BEGIN\n INSERT INTO site_activity.totals (time, total)\n SELECT CURRENT_TIMESTAMP, COUNT(*)\n FROM site_activity.sessions;\n DELETE FROM site_activity.sessions;\n END\ncharacter_set_client: latin1\ncollation_connection: latin1_swedish_ci\n Database Collation: latin1_swedish_ci\n','https://mariadb.com/kb/en/show-create-event/'),(359,'LOAD_FILE',37,'Syntax:\nLOAD_FILE(file_name)\n\nReads the file and returns the file contents as a string. To use this\nfunction, the file must be located on the server host, you must specify\nthe full path name to the file, and you must have the FILE privilege.\nThe file must be readable by all and its size less than\nmax_allowed_packet bytes. If the secure_file_priv system variable is\nset to a nonempty directory name, the file to be loaded must be located\nin that directory.\n\nIf the file does not exist or cannot be read because one of the\npreceding conditions is not satisfied, the function returns NULL.\n\nThe character_set_filesystem system variable controls interpretation of\nfile names that are given as literal strings.\n\nURL: https://mariadb.com/kb/en/load_file/\n\n','MariaDB> UPDATE t\n SET blob_col=LOAD_FILE(\'/tmp/picture\')\n WHERE id=1;\n','https://mariadb.com/kb/en/load_file/'),(360,'POINTFROMTEXT',3,'PointFromText(wkt[,srid])\n\nConstructs a POINT value using its WKT representation and SRID.\n\nURL: https://mariadb.com/kb/en/pointfromtext/\n\n','','https://mariadb.com/kb/en/pointfromtext/'),(361,'GROUP_CONCAT',16,'Syntax:\nGROUP_CONCAT(expr)\n\nThis function returns a string result with the concatenated non-NULL\nvalues from a group. It returns NULL if there are no non-NULL values.\nThe full syntax is as follows:\n\nGROUP_CONCAT([DISTINCT] expr [,expr ...]\n [ORDER BY {unsigned_integer | col_name | expr}\n [ASC | DESC] [,col_name ...]]\n [SEPARATOR str_val])\n\nURL: https://mariadb.com/kb/en/group_concat/\n\n','MariaDB> SELECT student_name,\n -> GROUP_CONCAT(test_score)\n -> FROM student\n -> GROUP BY student_name;\n','https://mariadb.com/kb/en/group_concat/'),(362,'DATE_FORMAT',31,'Syntax:\nDATE_FORMAT(date,format)\n\nFormats the date value according to the format string.\n\nURL: https://mariadb.com/kb/en/date_format/\n\n','MariaDB> SELECT DATE_FORMAT(\'2009-10-04 22:23:00\', \'%W %M %Y\');\n -> \'Sunday October 2009\'\nMariaDB> SELECT DATE_FORMAT(\'2007-10-04 22:23:00\', \'%H:%i:%s\');\n -> \'22:23:00\'\nMariaDB> SELECT DATE_FORMAT(\'1900-10-04 22:23:00\',\n -> \'%D %y %a %d %m %b %j\');\n -> \'4th 00 Thu 04 10 Oct 277\'\nMariaDB> SELECT DATE_FORMAT(\'1997-10-04 22:23:00\',\n -> \'%H %k %I %r %T %S %w\');\n -> \'22 22 10 10:23:00 PM 22:23:00 00 6\'\nMariaDB> SELECT DATE_FORMAT(\'1999-01-01\', \'%X %V\');\n -> \'1998 52\'\nMariaDB> SELECT DATE_FORMAT(\'2006-06-00\', \'%d\');\n -> \'00\'\n','https://mariadb.com/kb/en/date_format/'),(363,'BENCHMARK',17,'Syntax:\nBENCHMARK(count,expr)\n\nThe BENCHMARK() function executes the expression expr repeatedly count\ntimes. It may be used to time how quickly MySQL processes the\nexpression. The result value is always 0. The intended use is from\nwithin the mysql client, which reports query execution times:\n\nURL: https://mariadb.com/kb/en/benchmark/\n\n','MariaDB> SELECT BENCHMARK(1000000,ENCODE(\'hello\',\'goodbye\'));\n+----------------------------------------------+\n| BENCHMARK(1000000,ENCODE(\'hello\',\'goodbye\')) |\n+----------------------------------------------+\n| 0 |\n+----------------------------------------------+\n1 row in set (4.74 sec)\n','https://mariadb.com/kb/en/benchmark/'),(364,'YEAR',31,'Syntax:\nYEAR(date)\n\nReturns the year for date, in the range 1000 to 9999, or 0 for the\n\"zero\" date.\n\nURL: https://mariadb.com/kb/en/year/\n\n','MariaDB> SELECT YEAR(\'1987-01-01\');\n -> 1987\n','https://mariadb.com/kb/en/year/'),(365,'SHOW ENGINE',26,'Syntax:\nSHOW ENGINE engine_name {STATUS | MUTEX}\n\nSHOW ENGINE displays operational information about a storage engine.\nThe following statements currently are supported:\n\nSHOW ENGINE INNODB STATUS\nSHOW ENGINE INNODB MUTEX\nSHOW ENGINE PERFORMANCE_SCHEMA STATUS\n\nSHOW ENGINE INNODB STATUS displays extensive information from the\nstandard InnoDB Monitor about the state of the InnoDB storage engine.\nFor information about the standard monitor and other InnoDB Monitors\nthat provide information about InnoDB processing, see\nhttp://dev.mysql.com/doc/refman/5.5/en/innodb-monitors.html.\n\nSHOW ENGINE INNODB MUTEX displays InnoDB mutex statistics. The\nstatement displays the following fields:\n\no Type\n\n Always InnoDB.\n\no Name\n\n The source file where the mutex is implemented, and the line number\n in the file where the mutex is created. The line number may change\n depending on your version of MySQL.\n\no Status\n\n The mutex status. This field displays several values if UNIV_DEBUG\n was defined at MySQL compilation time (for example, in include/univ.i\n in the InnoDB part of the MySQL source tree). If UNIV_DEBUG was not\n defined, the statement displays only the os_waits value. In the\n latter case (without UNIV_DEBUG), the information on which the output\n is based is insufficient to distinguish regular mutexes and mutexes\n that protect rw-locks (which permit multiple readers or a single\n writer). Consequently, the output may appear to contain multiple rows\n for the same mutex.\n\n o count indicates how many times the mutex was requested.\n\n o spin_waits indicates how many times the spinlock had to run.\n\n o spin_rounds indicates the number of spinlock rounds. (spin_rounds\n divided by spin_waits provides the average round count.)\n\n o os_waits indicates the number of operating system waits. This\n occurs when the spinlock did not work (the mutex was not locked\n during the spinlock and it was necessary to yield to the operating\n system and wait).\n\n o os_yields indicates the number of times a the thread trying to lock\n a mutex gave up its timeslice and yielded to the operating system\n (on the presumption that permitting other threads to run will free\n the mutex so that it can be locked).\n\n o os_wait_times indicates the amount of time (in ms) spent in\n operating system waits, if the timed_mutexes system variable is 1\n (ON). If timed_mutexes is 0 (OFF), timing is disabled, so\n os_wait_times is 0. timed_mutexes is off by default.\n\nInformation from this statement can be used to diagnose system\nproblems. For example, large values of spin_waits and spin_rounds may\nindicate scalability problems.\n\nUse SHOW ENGINE PERFORMANCE_SCHEMA STATUS to inspect the internal\noperation of the Performance Schema code:\n\nMariaDB> SHOW ENGINE PERFORMANCE_SCHEMA STATUS\\G\n...\n*************************** 3. row ***************************\n Type: performance_schema\n Name: events_waits_history.row_size\nStatus: 76\n*************************** 4. row ***************************\n Type: performance_schema\n Name: events_waits_history.row_count\nStatus: 10000\n*************************** 5. row ***************************\n Type: performance_schema\n Name: events_waits_history.memory\nStatus: 760000\n...\n*************************** 57. row ***************************\n Type: performance_schema\n Name: performance_schema.memory\nStatus: 26459600\n...\n\nThe intent of this statement is to help the DBA to understand the\neffects that different options have on memory requirements.\n\nName values consist of two parts, which name an internal buffer and an\nattribute of the buffer, respectively:\n\no Internal buffers that are exposed as a table in the\n performance_schema database are named after the table. Examples:\n events_waits_history.row_size, mutex_instances.row_count.\n\no Internal buffers that are not exposed as a table are named within\n parentheses. Examples: (pfs_cond_class).row_size,\n (pfs_mutex_class).memory.\n\no Values that apply to the Performance Schema as a whole begin with\n performance_schema. Example: performance_schema.memory.\n\nAttributes have these meanings:\n\no row_size cannot be changed. It is the size of the internal record\n used by the implementation.\n\no row_count can be changed depending on the configuration options.\n\no For a table, tbl_name.memory is the product of row_size multiplied by\n row_count. For the Performance Schema as a whole,\n performance_schema.memory is the sum of all the memory used (the sum\n of all other memory values).\n\nIn some cases, there is a direct relationship between a configuration\nparameter and a SHOW ENGINE value. For example,\nevents_waits_history_long.row_count corresponds to\nperformance_schema_events_waits_history_long_size. In other cases, the\nrelationship is more complex. For example,\nevents_waits_history.row_count corresponds to\nperformance_schema_events_waits_history_size (the number of rows per\nthread) multiplied by performance_schema_max_thread_instances ( the\nnumber of threads).\n\nURL: https://mariadb.com/kb/en/show-engine/\n\n','','https://mariadb.com/kb/en/show-engine/'),(366,'NAME_CONST',14,'Syntax:\nNAME_CONST(name,value)\n\nReturns the given value. When used to produce a result set column,\nNAME_CONST() causes the column to have the given name. The arguments\nshould be constants.\n\nMariaDB> SELECT NAME_CONST(\'myname\', 14);\n+--------+\n| myname |\n+--------+\n| 14 |\n+--------+\n\nURL: https://mariadb.com/kb/en/name_const/\n\n','','https://mariadb.com/kb/en/name_const/'),(367,'RELEASE_LOCK',14,'Syntax:\nRELEASE_LOCK(str)\n\nReleases the lock named by the string str that was obtained with\nGET_LOCK(). Returns 1 if the lock was released, 0 if the lock was not\nestablished by this thread (in which case the lock is not released),\nand NULL if the named lock did not exist. The lock does not exist if it\nwas never obtained by a call to GET_LOCK() or if it has previously been\nreleased.\n\nThe DO statement is convenient to use with RELEASE_LOCK(). See [HELP\nDO].\n\nURL: https://mariadb.com/kb/en/release_lock/\n\n','','https://mariadb.com/kb/en/release_lock/'),(368,'IS NULL',18,'Syntax:\nIS NULL\n\nTests whether a value is NULL.\n\nURL: https://mariadb.com/kb/en/is-null/\n\n','MariaDB> SELECT 1 IS NULL, 0 IS NULL, NULL IS NULL;\n -> 0, 0, 1\n','https://mariadb.com/kb/en/is-null/'),(369,'CONVERT_TZ',31,'Syntax:\nCONVERT_TZ(dt,from_tz,to_tz)\n\nCONVERT_TZ() converts a datetime value dt from the time zone given by\nfrom_tz to the time zone given by to_tz and returns the resulting\nvalue. Time zones are specified as described in\nhttps://mariadb.com/kb/en/time-zones/. This\nfunction returns NULL if the arguments are invalid.\n\nURL: https://mariadb.com/kb/en/convert_tz/\n\n','MariaDB> SELECT CONVERT_TZ(\'2004-01-01 12:00:00\',\'GMT\',\'MET\');\n -> \'2004-01-01 13:00:00\'\nMariaDB> SELECT CONVERT_TZ(\'2004-01-01 12:00:00\',\'+00:00\',\'+10:00\');\n -> \'2004-01-01 22:00:00\'\n','https://mariadb.com/kb/en/convert_tz/'),(370,'TIME_TO_SEC',31,'Syntax:\nTIME_TO_SEC(time)\n\nReturns the time argument, converted to seconds.\n\nURL: https://mariadb.com/kb/en/time_to_sec/\n\n','MariaDB> SELECT TIME_TO_SEC(\'22:23:00\');\n -> 80580\nMariaDB> SELECT TIME_TO_SEC(\'00:39:38\');\n -> 2378\n','https://mariadb.com/kb/en/time_to_sec/'),(371,'WEEKDAY',31,'Syntax:\nWEEKDAY(date)\n\nReturns the weekday index for date (0 = Monday, 1 = Tuesday, ... 6 =\nSunday).\n\nURL: https://mariadb.com/kb/en/weekday/\n\n','MariaDB> SELECT WEEKDAY(\'2008-02-03 22:23:00\');\n -> 6\nMariaDB> SELECT WEEKDAY(\'2007-11-06\');\n -> 1\n','https://mariadb.com/kb/en/weekday/'),(372,'EXPORT_SET',37,'Syntax:\nEXPORT_SET(bits,on,off[,separator[,number_of_bits]])\n\nReturns a string such that for every bit set in the value bits, you get\nan on string and for every bit not set in the value, you get an off\nstring. Bits in bits are examined from right to left (from low-order to\nhigh-order bits). Strings are added to the result from left to right,\nseparated by the separator string (the default being the comma\ncharacter \",\"). The number of bits examined is given by number_of_bits,\nwhich has a default of 64 if not specified. number_of_bits is silently\nclipped to 64 if larger than 64. It is treated as an unsigned integer,\nso a value of -1 is effectively the same as 64.\n\nURL: https://mariadb.com/kb/en/export_set/\n\n','MariaDB> SELECT EXPORT_SET(5,\'Y\',\'N\',\',\',4);\n -> \'Y,N,Y,N\'\nMariaDB> SELECT EXPORT_SET(6,\'1\',\'0\',\',\',10);\n -> \'0,1,1,0,0,0,0,0,0,0\'\n','https://mariadb.com/kb/en/export_set/'),(373,'ALTER SERVER',39,'Syntax:\nALTER SERVER server_name\n OPTIONS (option [, option] ...)\n\nAlters the server information for server_name, adjusting any of the\noptions permitted in the CREATE SERVER statement. See [HELP CREATE\nSERVER]. The corresponding fields in the mysql.servers table are\nupdated accordingly. This statement requires the SUPER privilege.\n\nURL: https://mariadb.com/kb/en/alter-server/\n\n','ALTER SERVER s OPTIONS (USER \'sally\');\n','https://mariadb.com/kb/en/alter-server/'),(374,'RESIGNAL',23,'Syntax:\nRESIGNAL [condition_value]\n [SET signal_information_item\n [, signal_information_item] ...]\n\ncondition_value:\n SQLSTATE [VALUE] sqlstate_value\n | condition_name\n\nsignal_information_item:\n condition_information_item_name = simple_value_specification\n\ncondition_information_item_name:\n CLASS_ORIGIN\n | SUBCLASS_ORIGIN\n | MESSAGE_TEXT\n | MYSQL_ERRNO\n | CONSTRAINT_CATALOG\n | CONSTRAINT_SCHEMA\n | CONSTRAINT_NAME\n | CATALOG_NAME\n | SCHEMA_NAME\n | TABLE_NAME\n | COLUMN_NAME\n | CURSOR_NAME\n\ncondition_name, simple_value_specification:\n (see following discussion)\n\nRESIGNAL passes on the error condition information that is available\nduring execution of a condition handler within a compound statement\ninside a stored procedure or function, trigger, or event. RESIGNAL may\nchange some or all information before passing it on. RESIGNAL is\nrelated to SIGNAL, but instead of originating a condition as SIGNAL\ndoes, RESIGNAL relays existing condition information, possibly after\nmodifying it.\n\nRESIGNAL makes it possible to both handle an error and return the error\ninformation. Otherwise, by executing an SQL statement within the\nhandler, information that caused the handler\'s activation is destroyed.\nRESIGNAL also can make some procedures shorter if a given handler can\nhandle part of a situation, then pass the condition \"up the line\" to\nanother handler.\n\nNo special privileges are required to execute the RESIGNAL statement.\n\nFor condition_value and signal_information_item, the definitions and\nrules are the same for RESIGNAL as for SIGNAL (see [HELP SIGNAL]).\n\nThe RESIGNAL statement takes condition_value and SET clauses, both of\nwhich are optional. This leads to several possible uses:\n\no RESIGNAL alone:\n\nRESIGNAL;\n\no RESIGNAL with new signal information:\n\nRESIGNAL SET signal_information_item [, signal_information_item] ...;\n\no RESIGNAL with a condition value and possibly new signal information:\n\nRESIGNAL condition_value\n [SET signal_information_item [, signal_information_item] ...];\n\nURL: https://mariadb.com/kb/en/resignal/\n\n','','https://mariadb.com/kb/en/resignal/'),(375,'TIME FUNCTION',31,'Syntax:\nTIME(expr)\n\nExtracts the time part of the time or datetime expression expr and\nreturns it as a string.\n\nURL: https://mariadb.com/kb/en/time-function/\n\n','MariaDB> SELECT TIME(\'2003-12-31 01:02:03\');\n -> \'01:02:03\'\nMariaDB> SELECT TIME(\'2003-12-31 01:02:03.000123\');\n -> \'01:02:03.000123\'\n','https://mariadb.com/kb/en/time-function/'),(376,'DATE_ADD',31,'Syntax:\nDATE_ADD(date,INTERVAL expr unit), DATE_SUB(date,INTERVAL expr unit)\n\nThese functions perform date arithmetic. The date argument specifies\nthe starting date or datetime value. expr is an expression specifying\nthe interval value to be added or subtracted from the starting date.\nexpr is a string; it may start with a \"-\" for negative intervals. unit\nis a keyword indicating the units in which the expression should be\ninterpreted.\n\nURL: https://mariadb.com/kb/en/date_add/\n\n','MariaDB> SELECT \'2008-12-31 23:59:59\' + INTERVAL 1 SECOND;\n -> \'2009-01-01 00:00:00\'\nMariaDB> SELECT INTERVAL 1 DAY + \'2008-12-31\';\n -> \'2009-01-01\'\nMariaDB> SELECT \'2005-01-01\' - INTERVAL 1 SECOND;\n -> \'2004-12-31 23:59:59\'\nMariaDB> SELECT DATE_ADD(\'2000-12-31 23:59:59\',\n -> INTERVAL 1 SECOND);\n -> \'2001-01-01 00:00:00\'\nMariaDB> SELECT DATE_ADD(\'2010-12-31 23:59:59\',\n -> INTERVAL 1 DAY);\n -> \'2011-01-01 23:59:59\'\nMariaDB> SELECT DATE_ADD(\'2100-12-31 23:59:59\',\n -> INTERVAL \'1:1\' MINUTE_SECOND);\n -> \'2101-01-01 00:01:00\'\nMariaDB> SELECT DATE_SUB(\'2005-01-01 00:00:00\',\n -> INTERVAL \'1 1:1:1\' DAY_SECOND);\n -> \'2004-12-30 22:58:59\'\nMariaDB> SELECT DATE_ADD(\'1900-01-01 00:00:00\',\n -> INTERVAL \'-1 10\' DAY_HOUR);\n -> \'1899-12-30 14:00:00\'\nMariaDB> SELECT DATE_SUB(\'1998-01-02\', INTERVAL 31 DAY);\n -> \'1997-12-02\'\nMariaDB> SELECT DATE_ADD(\'1992-12-31 23:59:59.000002\',\n -> INTERVAL \'1.999999\' SECOND_MICROSECOND);\n -> \'1993-01-01 00:00:01.000001\'\n','https://mariadb.com/kb/en/date_add/'),(377,'CAST',37,'Syntax:\nCAST(expr AS type)\n\nThe CAST() function takes an expression of any type and produces a\nresult value of a specified type, similar to CONVERT(). See the\ndescription of CONVERT() for more information.\n\nURL: https://mariadb.com/kb/en/cast/\n\n','','https://mariadb.com/kb/en/cast/'),(378,'SOUNDS LIKE',37,'Syntax:\nexpr1 SOUNDS LIKE expr2\n\nThis is the same as SOUNDEX(expr1) = SOUNDEX(expr2).\n\nURL: https://mariadb.com/kb/en/sounds-like/\n\n','','https://mariadb.com/kb/en/sounds-like/'),(379,'PERIOD_DIFF',31,'Syntax:\nPERIOD_DIFF(P1,P2)\n\nReturns the number of months between periods P1 and P2. P1 and P2\nshould be in the format YYMM or YYYYMM. Note that the period arguments\nP1 and P2 are not date values.\n\nURL: https://mariadb.com/kb/en/period_diff/\n\n','MariaDB> SELECT PERIOD_DIFF(200802,200703);\n -> 11\n','https://mariadb.com/kb/en/period_diff/'),(380,'LIKE',37,'Syntax:\nexpr LIKE pat [ESCAPE \'escape_char\']\n\nPattern matching using SQL simple regular expression comparison.\nReturns 1 (TRUE) or 0 (FALSE). If either expr or pat is NULL, the\nresult is NULL.\n\nThe pattern need not be a literal string. For example, it can be\nspecified as a string expression or table column.\n\nURL: https://mariadb.com/kb/en/like/\n\n','MariaDB> SELECT \'David!\' LIKE \'David_\';\n -> 1\nMariaDB> SELECT \'David!\' LIKE \'%D%v%\';\n -> 1\n','https://mariadb.com/kb/en/like/'),(381,'MULTIPOINT',24,'MultiPoint(pt1,pt2,...)\n\nConstructs a MultiPoint value using Point or WKB Point arguments.\n\nURL: https://mariadb.com/kb/en/multipoint/\n\n','','https://mariadb.com/kb/en/multipoint/'),(382,'>>',19,'Syntax:\n>>\n\nShifts a longlong (BIGINT) number to the right.\n\nURL: https://mariadb.com/kb/en/shift-right/\n\n','MariaDB> SELECT 4 >> 2;\n -> 1\n','https://mariadb.com/kb/en/shift-right/'),(383,'FETCH',23,'Syntax:\nFETCH [[NEXT] FROM] cursor_name INTO var_name [, var_name] ...\n\nThis statement fetches the next row for the SELECT statement associated\nwith the specified cursor (which must be open), and advances the cursor\npointer. If a row exists, the fetched columns are stored in the named\nvariables. The number of columns retrieved by the SELECT statement must\nmatch the number of output variables specified in the FETCH statement.\n\nIf no more rows are available, a No Data condition occurs with SQLSTATE\nvalue \'02000\'. To detect this condition, you can set up a handler for\nit (or for a NOT FOUND condition). For an example, see\nhttps://mariadb.com/kb/en/cursor-overview/.\n\nURL: https://mariadb.com/kb/en/fetch/\n\n','','https://mariadb.com/kb/en/fetch/'),(384,'AVG',16,'Syntax:\nAVG([DISTINCT] expr)\n\nReturns the average value of expr. The DISTINCT option can be used to\nreturn the average of the distinct values of expr.\n\nAVG() returns NULL if there were no matching rows.\n\nURL: https://mariadb.com/kb/en/avg/\n\n','MariaDB> SELECT student_name, AVG(test_score)\n -> FROM student\n -> GROUP BY student_name;\n','https://mariadb.com/kb/en/avg/'),(385,'TRUE FALSE',29,'The constants TRUE and FALSE evaluate to 1 and 0, respectively. The\nconstant names can be written in any lettercase.\n\nMariaDB> SELECT TRUE, true, FALSE, false;\n -> 1, 1, 0, 0\n\nURL: https://mariadb.com/kb/en/true-false/\n\n','','https://mariadb.com/kb/en/true-false/'),(386,'MBRWITHIN',6,'MBRWithin(g1,g2)\n\nReturns 1 or 0 to indicate whether the Minimum Bounding Rectangle of g1\nis within the Minimum Bounding Rectangle of g2. This tests the opposite\nrelationship as MBRContains().\n\nURL: https://mariadb.com/kb/en/mbrwithin/\n\n','MariaDB> SET @g1 = GeomFromText(\'Polygon((0 0,0 3,3 3,3 0,0 0))\');\nMariaDB> SET @g2 = GeomFromText(\'Polygon((0 0,0 5,5 5,5 0,0 0))\');\nMariaDB> SELECT MBRWithin(@g1,@g2), MBRWithin(@g2,@g1);\n+--------------------+--------------------+\n| MBRWithin(@g1,@g2) | MBRWithin(@g2,@g1) |\n+--------------------+--------------------+\n| 1 | 0 |\n+--------------------+--------------------+\n','https://mariadb.com/kb/en/mbrwithin/'),(387,'SESSION_USER',17,'Syntax:\nSESSION_USER()\n\nSESSION_USER() is a synonym for USER().\n\nURL: https://mariadb.com/kb/en/session_user/\n\n','','https://mariadb.com/kb/en/session_user/'),(388,'IN',18,'Syntax:\nexpr IN (value,...)\n\nReturns 1 if expr is equal to any of the values in the IN list, else\nreturns 0. If all values are constants, they are evaluated according to\nthe type of expr and sorted. The search for the item then is done using\na binary search. This means IN is very quick if the IN value list\nconsists entirely of constants. Otherwise, type conversion takes place\naccording to the rules described in\nhttps://mariadb.com/kb/en/type-conversion/, but\napplied to all the arguments.\n\nURL: https://mariadb.com/kb/en/in/\n\n','MariaDB> SELECT 2 IN (0,3,5,7);\n -> 0\nMariaDB> SELECT \'wefwf\' IN (\'wee\',\'wefwf\',\'weg\');\n -> 1\n','https://mariadb.com/kb/en/in/'),(389,'QUOTE',37,'Syntax:\nQUOTE(str)\n\nQuotes a string to produce a result that can be used as a properly\nescaped data value in an SQL statement. The string is returned enclosed\nby single quotation marks and with each instance of backslash (\"\\\"),\nsingle quote (\"\'\"), ASCII NUL, and Control+Z preceded by a backslash.\nIf the argument is NULL, the return value is the word \"NULL\" without\nenclosing single quotation marks.\n\nURL: https://mariadb.com/kb/en/quote/\n\n','MariaDB> SELECT QUOTE(\'Don\\\'t!\');\n -> \'Don\\\'t!\'\nMariaDB> SELECT QUOTE(NULL);\n -> NULL\n','https://mariadb.com/kb/en/quote/'),(390,'HELP COMMAND',26,'Syntax:\nMariaDB> help search_string\n\nIf you provide an argument to the help command, mysql uses it as a\nsearch string to access server-side help from the contents of the MySQL\nReference Manual. The proper operation of this command requires that\nthe help tables in the mysql database be initialized with help topic\ninformation .\n\nIf there is no match for the search string, the search fails:\n\nMariaDB> help me\n\nNothing found\nPlease try to run \'help contents\' for a list of all accessible topics\n\nUse help contents to see a list of the help categories:\n\nMariaDB> help contents\nYou asked for help about help category: \"Contents\"\nFor more information, type \'help <item>\', where <item> is one of the\nfollowing categories:\n Account Management\n Administration\n Data Definition\n Data Manipulation\n Data Types\n Functions\n Functions and Modifiers for Use with GROUP BY\n Geographic Features\n Language Structure\n Plugins\n Storage Engines\n Stored Routines\n Table Maintenance\n Transactions\n Triggers\n\nIf the search string matches multiple items, mysql shows a list of\nmatching topics:\n\nMariaDB> help logs\nMany help items for your request exist.\nTo make a more specific request, please type \'help <item>\',\nwhere <item> is one of the following topics:\n SHOW\n SHOW BINARY LOGS\n SHOW ENGINE\n SHOW LOGS\n\nUse a topic as the search string to see the help entry for that topic:\n\nMariaDB> help show binary logs\nName: \'SHOW BINARY LOGS\'\nDescription:\nSyntax:\nSHOW BINARY LOGS\nSHOW MASTER LOGS\n\nLists the binary log files on the server. This statement is used as\npart of the procedure described in [purge-binary-logs], that shows how\nto determine which logs can be purged.\n\nMariaDB> SHOW BINARY LOGS;\n+---------------+-----------+\n| Log_name | File_size |\n+---------------+-----------+\n| binlog.000015 | 724935 |\n| binlog.000016 | 733481 |\n+---------------+-----------+\n\nURL: https://mariadb.com/kb/en/help-command/\n\n','','https://mariadb.com/kb/en/help-command/'),(391,'QUARTER',31,'Syntax:\nQUARTER(date)\n\nReturns the quarter of the year for date, in the range 1 to 4.\n\nURL: https://mariadb.com/kb/en/quarter/\n\n','MariaDB> SELECT QUARTER(\'2008-04-01\');\n -> 2\n','https://mariadb.com/kb/en/quarter/'),(392,'POSITION',37,'Syntax:\nPOSITION(substr IN str)\n\nPOSITION(substr IN str) is a synonym for LOCATE(substr,str).\n\nURL: https://mariadb.com/kb/en/position/\n\n','','https://mariadb.com/kb/en/position/'),(393,'SHOW CREATE FUNCTION',26,'Syntax:\nSHOW CREATE FUNCTION func_name\n\nThis statement is similar to SHOW CREATE PROCEDURE but for stored\nfunctions. See [HELP SHOW CREATE PROCEDURE].\n\nURL: https://mariadb.com/kb/en/show-create-function/\n\n','','https://mariadb.com/kb/en/show-create-function/'),(394,'IS_USED_LOCK',14,'Syntax:\nIS_USED_LOCK(str)\n\nChecks whether the lock named str is in use (that is, locked). If so,\nit returns the connection identifier of the client that holds the lock.\nOtherwise, it returns NULL.\n\nURL: https://mariadb.com/kb/en/is_used_lock/\n\n','','https://mariadb.com/kb/en/is_used_lock/'),(395,'POLYFROMTEXT',3,'PolyFromText(wkt[,srid]), PolygonFromText(wkt[,srid])\n\nConstructs a POLYGON value using its WKT representation and SRID.\n\nURL: https://mariadb.com/kb/en/polyfromtext/\n\n','','https://mariadb.com/kb/en/polyfromtext/'),(396,'DES_ENCRYPT',12,'Syntax:\nDES_ENCRYPT(str[,{key_num|key_str}])\n\nEncrypts the string with the given key using the Triple-DES algorithm.\n\nThis function works only if MySQL has been configured with SSL support.\nSee https://mariadb.com/kb/en/ssl-connections/.\n\nThe encryption key to use is chosen based on the second argument to\nDES_ENCRYPT(), if one was given. With no argument, the first key from\nthe DES key file is used. With a key_num argument, the given key number\n(0 to 9) from the DES key file is used. With a key_str argument, the\ngiven key string is used to encrypt str.\n\nThe key file can be specified with the --des-key-file server option.\n\nThe return string is a binary string where the first character is\nCHAR(128 | key_num). If an error occurs, DES_ENCRYPT() returns NULL.\n\nThe 128 is added to make it easier to recognize an encrypted key. If\nyou use a string key, key_num is 127.\n\nThe string length for the result is given by this formula:\n\nnew_len = orig_len + (8 - (orig_len % 8)) + 1\n\nEach line in the DES key file has the following format:\n\nkey_num des_key_str\n\nEach key_num value must be a number in the range from 0 to 9. Lines in\nthe file may be in any order. des_key_str is the string that is used to\nencrypt the message. There should be at least one space between the\nnumber and the key. The first key is the default key that is used if\nyou do not specify any key argument to DES_ENCRYPT().\n\nYou can tell MySQL to read new key values from the key file with the\nFLUSH DES_KEY_FILE statement. This requires the RELOAD privilege.\n\nOne benefit of having a set of default keys is that it gives\napplications a way to check for the existence of encrypted column\nvalues, without giving the end user the right to decrypt those values.\n\nURL: https://mariadb.com/kb/en/des_encrypt/\n\n','MariaDB> SELECT customer_address FROM customer_table \n > WHERE crypted_credit_card = DES_ENCRYPT(\'credit_card_number\');\n','https://mariadb.com/kb/en/des_encrypt/'),(397,'CEIL',4,'Syntax:\nCEIL(X)\n\nCEIL() is a synonym for CEILING().\n\nURL: https://mariadb.com/kb/en/ceil/\n\n','','https://mariadb.com/kb/en/ceil/'),(398,'LENGTH',37,'Syntax:\nLENGTH(str)\n\nReturns the length of the string str, measured in bytes. A multi-byte\ncharacter counts as multiple bytes. This means that for a string\ncontaining five 2-byte characters, LENGTH() returns 10, whereas\nCHAR_LENGTH() returns 5.\n\nURL: https://mariadb.com/kb/en/length/\n\n','MariaDB> SELECT LENGTH(\'text\');\n -> 4\n','https://mariadb.com/kb/en/length/'),(399,'STR_TO_DATE',31,'Syntax:\nSTR_TO_DATE(str,format)\n\nThis is the inverse of the DATE_FORMAT() function. It takes a string\nstr and a format string format. STR_TO_DATE() returns a DATETIME value\nif the format string contains both date and time parts, or a DATE or\nTIME value if the string contains only date or time parts. If the date,\ntime, or datetime value extracted from str is illegal, STR_TO_DATE()\nreturns NULL and produces a warning.\n\nThe server scans str attempting to match format to it. The format\nstring can contain literal characters and format specifiers beginning\nwith %. Literal characters in format must match literally in str.\nFormat specifiers in format must match a date or time part in str. For\nthe specifiers that can be used in format, see the DATE_FORMAT()\nfunction description.\n\nMariaDB> SELECT STR_TO_DATE(\'01,5,2013\',\'%d,%m,%Y\');\n -> \'2013-05-01\'\nMariaDB> SELECT STR_TO_DATE(\'May 1, 2013\',\'%M %d,%Y\');\n -> \'2013-05-01\'\n\nScanning starts at the beginning of str and fails if format is found\nnot to match. Extra characters at the end of str are ignored.\n\nMariaDB> SELECT STR_TO_DATE(\'a09:30:17\',\'a%h:%i:%s\');\n -> \'09:30:17\'\nMariaDB> SELECT STR_TO_DATE(\'a09:30:17\',\'%h:%i:%s\');\n -> NULL\nMariaDB> SELECT STR_TO_DATE(\'09:30:17a\',\'%h:%i:%s\');\n -> \'09:30:17\'\n\nUnspecified date or time parts have a value of 0, so incompletely\nspecified values in str produce a result with some or all parts set to\n0:\n\nMariaDB> SELECT STR_TO_DATE(\'abc\',\'abc\');\n -> \'0000-00-00\'\nMariaDB> SELECT STR_TO_DATE(\'9\',\'%m\');\n -> \'0000-09-00\'\nMariaDB> SELECT STR_TO_DATE(\'9\',\'%s\');\n -> \'00:00:09\'\n\nURL: https://mariadb.com/kb/en/str_to_date/\n\n','','https://mariadb.com/kb/en/str_to_date/'),(400,'Y',11,'Y(p)\n\nReturns the Y-coordinate value for the Point object p as a\ndouble-precision number.\n\nURL: https://mariadb.com/kb/en/y/\n\n','MariaDB> SELECT Y(POINT(56.7, 53.34));\n+-----------------------+\n| Y(POINT(56.7, 53.34)) |\n+-----------------------+\n| 53.34 |\n+-----------------------+\n','https://mariadb.com/kb/en/y/'),(401,'CHECKSUM TABLE',20,'Syntax:\nCHECKSUM TABLE tbl_name [, tbl_name] ... [ QUICK | EXTENDED ]\n\nCHECKSUM TABLE reports a table checksum. This statement requires the\nSELECT privilege for the table.\n\nWith QUICK, the live table checksum is reported if it is available, or\nNULL otherwise. This is very fast. A live checksum is enabled by\nspecifying the CHECKSUM=1 table option when you create the table;\ncurrently, this is supported only for MyISAM tables. See [HELP CREATE\nTABLE].\n\nWith EXTENDED, the entire table is read row by row and the checksum is\ncalculated. This can be very slow for large tables.\n\nIf neither QUICK nor EXTENDED is specified, MySQL returns a live\nchecksum if the table storage engine supports it and scans the table\notherwise.\n\nFor a nonexistent table, CHECKSUM TABLE returns NULL and generates a\nwarning.\n\nIn MySQL 5.5, CHECKSUM TABLE returns 0 for partitioned tables unless\nyou include the EXTENDED option. This issue is resolved in MySQL 5.6.\n(Bug #11933226, Bug #60681)\n\nThe checksum value depends on the table row format. If the row format\nchanges, the checksum also changes. For example, the storage format for\nVARCHAR changed between MySQL 4.1 and 5.0, so if a 4.1 table is\nupgraded to MySQL 5.0, the checksum value may change.\n\nURL: https://mariadb.com/kb/en/checksum-table/\n\n','','https://mariadb.com/kb/en/checksum-table/'),(402,'NUMINTERIORRINGS',2,'NumInteriorRings(poly)\n\nReturns the number of interior rings in the Polygon value poly.\n\nURL: https://mariadb.com/kb/en/numinteriorrings/\n\n','MariaDB> SET @poly =\n -> \'Polygon((0 0,0 3,3 3,3 0,0 0),(1 1,1 2,2 2,2 1,1 1))\';\nMariaDB> SELECT NumInteriorRings(GeomFromText(@poly));\n+---------------------------------------+\n| NumInteriorRings(GeomFromText(@poly)) |\n+---------------------------------------+\n| 1 |\n+---------------------------------------+\n','https://mariadb.com/kb/en/numinteriorrings/'),(403,'INTERIORRINGN',2,'InteriorRingN(poly,N)\n\nReturns the N-th interior ring for the Polygon value poly as a\nLineString. Rings are numbered beginning with 1.\n\nURL: https://mariadb.com/kb/en/interiorringn/\n\n','MariaDB> SET @poly =\n -> \'Polygon((0 0,0 3,3 3,3 0,0 0),(1 1,1 2,2 2,2 1,1 1))\';\nMariaDB> SELECT AsText(InteriorRingN(GeomFromText(@poly),1));\n+----------------------------------------------+\n| AsText(InteriorRingN(GeomFromText(@poly),1)) |\n+----------------------------------------------+\n| LINESTRING(1 1,1 2,2 2,2 1,1 1) |\n+----------------------------------------------+\n','https://mariadb.com/kb/en/interiorringn/'),(404,'UTC_TIME',31,'Syntax:\nUTC_TIME, UTC_TIME()\n\nReturns the current UTC time as a value in \'HH:MM:SS\' or HHMMSS.uuuuuu\nformat, depending on whether the function is used in a string or\nnumeric context.\n\nURL: https://mariadb.com/kb/en/utc_time/\n\n','MariaDB> SELECT UTC_TIME(), UTC_TIME() + 0;\n -> \'18:07:53\', 180753.000000\n','https://mariadb.com/kb/en/utc_time/'),(405,'DROP FUNCTION',39,'The DROP FUNCTION statement is used to drop stored functions and\nuser-defined functions (UDFs):\n\no For information about dropping stored functions, see [HELP DROP\n PROCEDURE].\n\no For information about dropping user-defined functions, see [HELP DROP\n FUNCTION UDF].\n\nURL: https://mariadb.com/kb/en/drop-function/\n\n','','https://mariadb.com/kb/en/drop-function/'),(406,'ALTER EVENT',39,'Syntax:\nALTER\n [DEFINER = { user | CURRENT_USER }]\n EVENT event_name\n [ON SCHEDULE schedule]\n [ON COMPLETION [NOT] PRESERVE]\n [RENAME TO new_event_name]\n [ENABLE | DISABLE | DISABLE ON SLAVE]\n [COMMENT \'comment\']\n [DO event_body]\n\nThe ALTER EVENT statement changes one or more of the characteristics of\nan existing event without the need to drop and recreate it. The syntax\nfor each of the DEFINER, ON SCHEDULE, ON COMPLETION, COMMENT, ENABLE /\nDISABLE, and DO clauses is exactly the same as when used with CREATE\nEVENT. (See [HELP CREATE EVENT].)\n\nAny user can alter an event defined on a database for which that user\nhas the EVENT privilege. When a user executes a successful ALTER EVENT\nstatement, that user becomes the definer for the affected event.\n\nALTER EVENT works only with an existing event:\n\nMariaDB> ALTER EVENT no_such_event \n > ON SCHEDULE \n > EVERY \'2:3\' DAY_HOUR;\nERROR 1517 (HY000): Unknown event \'no_such_event\'\n\nURL: https://mariadb.com/kb/en/alter-event/\n\n','','https://mariadb.com/kb/en/alter-event/'),(407,'STDDEV',16,'Syntax:\nSTDDEV(expr)\n\nReturns the population standard deviation of expr. This function is\nprovided for compatibility with Oracle. The standard SQL function\nSTDDEV_POP() can be used instead.\n\nThis function returns NULL if there were no matching rows.\n\nURL: https://mariadb.com/kb/en/stddev/\n\n','','https://mariadb.com/kb/en/stddev/'),(408,'DATE_SUB',31,'Syntax:\nDATE_SUB(date,INTERVAL expr unit)\n\nSee the description for DATE_ADD().\n\nURL: https://mariadb.com/kb/en/date_sub/\n\n','','https://mariadb.com/kb/en/date_sub/'),(409,'PERIOD_ADD',31,'Syntax:\nPERIOD_ADD(P,N)\n\nAdds N months to period P (in the format YYMM or YYYYMM). Returns a\nvalue in the format YYYYMM. Note that the period argument P is not a\ndate value.\n\nURL: https://mariadb.com/kb/en/period_add/\n\n','MariaDB> SELECT PERIOD_ADD(200801,2);\n -> 200803\n','https://mariadb.com/kb/en/period_add/'),(410,'|',19,'Syntax:\n|\n\nBitwise OR:\n\nURL: https://mariadb.com/kb/en/bitwise-or/\n\n','MariaDB> SELECT 29 | 15;\n -> 31\n','https://mariadb.com/kb/en/bitwise-or/'),(411,'GEOMFROMTEXT',3,'GeomFromText(wkt[,srid]), GeometryFromText(wkt[,srid])\n\nConstructs a geometry value of any type using its WKT representation\nand SRID.\n\nURL: https://mariadb.com/kb/en/geomfromtext/\n\n','','https://mariadb.com/kb/en/geomfromtext/'),(412,'UUID_SHORT',14,'Syntax:\nUUID_SHORT()\n\nReturns a \"short\" universal identifier as a 64-bit unsigned integer\n(rather than a string-form 128-bit identifier as returned by the UUID()\nfunction).\n\nThe value of UUID_SHORT() is guaranteed to be unique if the following\nconditions hold:\n\no The server_id of the current host is unique among your set of master\n and slave servers\n\no server_id is between 0 and 255\n\no You do not set back your system time for your server between mysqld\n restarts\n\no You do not invoke UUID_SHORT() on average more than 16 million times\n per second between mysqld restarts\n\nThe UUID_SHORT() return value is constructed this way:\n\n (server_id & 255) << 56\n+ (server_startup_time_in_seconds << 24)\n+ incremented_variable++;\n\nURL: https://mariadb.com/kb/en/uuid_short/\n\n','MariaDB> SELECT UUID_SHORT();\n -> 92395783831158784\n','https://mariadb.com/kb/en/uuid_short/'),(413,'RIGHT',37,'Syntax:\nRIGHT(str,len)\n\nReturns the rightmost len characters from the string str, or NULL if\nany argument is NULL.\n\nURL: https://mariadb.com/kb/en/right/\n\n','MariaDB> SELECT RIGHT(\'foobarbar\', 4);\n -> \'rbar\'\n','https://mariadb.com/kb/en/right/'),(414,'DATEDIFF',31,'Syntax:\nDATEDIFF(expr1,expr2)\n\nDATEDIFF() returns expr1 - expr2 expressed as a value in days from one\ndate to the other. expr1 and expr2 are date or date-and-time\nexpressions. Only the date parts of the values are used in the\ncalculation.\n\nURL: https://mariadb.com/kb/en/datediff/\n\n','MariaDB> SELECT DATEDIFF(\'2007-12-31 23:59:59\',\'2007-12-30\');\n -> 1\nMariaDB> SELECT DATEDIFF(\'2010-11-30 23:59:59\',\'2010-12-31\');\n -> -31\n','https://mariadb.com/kb/en/datediff/'),(415,'DROP TABLESPACE',39,'Syntax:\nDROP TABLESPACE tablespace_name\n ENGINE [=] engine_name\n\nThis statement is used with NDB cluster, which is not supported by MariaDB.\n\nURL: https://mariadb.com/kb/en/drop-tablespace/\n\n','','https://mariadb.com/kb/en/drop-tablespace/'),(416,'DROP PROCEDURE',39,'Syntax:\nDROP {PROCEDURE | FUNCTION} [IF EXISTS] sp_name\n\nThis statement is used to drop a stored procedure or function. That is,\nthe specified routine is removed from the server. You must have the\nALTER ROUTINE privilege for the routine. (If the\nautomatic_sp_privileges system variable is enabled, that privilege and\nEXECUTE are granted automatically to the routine creator when the\nroutine is created and dropped from the creator when the routine is\ndropped. See\nhttps://mariadb.com/kb/en/stored-routine-privileges/.\n)\n\nThe IF EXISTS clause is a MySQL extension. It prevents an error from\noccurring if the procedure or function does not exist. A warning is\nproduced that can be viewed with SHOW WARNINGS.\n\nURL: https://mariadb.com/kb/en/drop-procedure/\n\n','','https://mariadb.com/kb/en/drop-procedure/'),(417,'CHECK TABLE',20,'Syntax:\nCHECK TABLE tbl_name [, tbl_name] ... [option] ...\n\noption = {FOR UPGRADE | QUICK | FAST | MEDIUM | EXTENDED | CHANGED}\n\nCHECK TABLE checks a table or tables for errors. CHECK TABLE works for\nInnoDB, MyISAM, ARCHIVE, and CSV tables. For MyISAM tables, the key\nstatistics are updated as well.\n\nTo check a table, you must have some privilege for it.\n\nCHECK TABLE can also check views for problems, such as tables that are\nreferenced in the view definition that no longer exist.\n\nCHECK TABLE is supported for partitioned tables, and you can use ALTER\nTABLE ... CHECK PARTITION to check one or more partitions; for more\ninformation, see [HELP ALTER TABLE].\n\nURL: https://mariadb.com/kb/en/sql-commands-check-table/\n\n','','https://mariadb.com/kb/en/sql-commands-check-table/'),(418,'BIN',37,'Syntax:\nBIN(N)\n\nReturns a string representation of the binary value of N, where N is a\nlonglong (BIGINT) number. This is equivalent to CONV(N,10,2). Returns\nNULL if N is NULL.\n\nURL: https://mariadb.com/kb/en/bin/\n\n','MariaDB> SELECT BIN(12);\n -> \'1100\'\n','https://mariadb.com/kb/en/bin/'),(419,'INSTALL PLUGIN',5,'Syntax:\nINSTALL PLUGIN plugin_name SONAME \'shared_library_name\'\n\nThis statement installs a server plugin. It requires the INSERT\nprivilege for the mysql.plugin table.\n\nplugin_name is the name of the plugin as defined in the plugin\ndescriptor structure contained in the library file (see\nhttp://dev.mysql.com/doc/refman/5.5/en/plugin-data-structures.html).\nPlugin names are not case sensitive. For maximal compatibility, plugin\nnames should be limited to ASCII letters, digits, and underscore\nbecause they are used in C source files, shell command lines, M4 and\nBourne shell scripts, and SQL environments.\n\nshared_library_name is the name of the shared library that contains the\nplugin code. The name includes the file name extension (for example,\nlibmyplugin.so, libmyplugin.dll, or libmyplugin.dylib).\n\nThe shared library must be located in the plugin directory (the\ndirectory named by the plugin_dir system variable). The library must be\nin the plugin directory itself, not in a subdirectory. By default,\nplugin_dir is the plugin directory under the directory named by the\npkglibdir configuration variable, but it can be changed by setting the\nvalue of plugin_dir at server startup. For example, set its value in a\nmy.cnf file:\n\n[mysqld]\nplugin_dir=/path/to/plugin/directory\n\nIf the value of plugin_dir is a relative path name, it is taken to be\nrelative to the MySQL base directory (the value of the basedir system\nvariable).\n\nINSTALL PLUGIN loads and initializes the plugin code to make the plugin\navailable for use. A plugin is initialized by executing its\ninitialization function, which handles any setup that the plugin must\nperform before it can be used. When the server shuts down, it executes\nthe deinitialization function for each plugin that is loaded so that\nthe plugin has a change to perform any final cleanup.\n\nINSTALL PLUGIN also registers the plugin by adding a line that\nindicates the plugin name and library file name to the mysql.plugin\ntable. At server startup, the server loads and initializes any plugin\nthat is listed in the mysql.plugin table. This means that a plugin is\ninstalled with INSTALL PLUGIN only once, not every time the server\nstarts. Plugin loading at startup does not occur if the server is\nstarted with the --skip-grant-tables option.\n\nA plugin library can contain multiple plugins. For each of them to be\ninstalled, use a separate INSTALL PLUGIN statement. Each statement\nnames a different plugin, but all of them specify the same library\nname.\n\nURL: https://mariadb.com/kb/en/install-plugin/\n\n','','https://mariadb.com/kb/en/install-plugin/'),(420,'DECLARE CURSOR',23,'Syntax:\nDECLARE cursor_name CURSOR FOR select_statement\n\nThis statement declares a cursor and associates it with a SELECT\nstatement that retrieves the rows to be traversed by the cursor. To\nfetch the rows later, use a FETCH statement. The number of columns\nretrieved by the SELECT statement must match the number of output\nvariables specified in the FETCH statement.\n\nThe SELECT statement cannot have an INTO clause.\n\nCursor declarations must appear before handler declarations and after\nvariable and condition declarations.\n\nA stored program may contain multiple cursor declarations, but each\ncursor declared in a given block must have a unique name. For an\nexample, see https://mariadb.com/kb/en/programmatic-and-compound-statements-cursors/.\n\nFor information available through SHOW statements, it is possible in\nmany cases to obtain equivalent information by using a cursor with an\nINFORMATION_SCHEMA table.\n\nURL: https://mariadb.com/kb/en/declare-cursor/\n\n','','https://mariadb.com/kb/en/declare-cursor/'),(421,'LOAD DATA',27,'Syntax:\nLOAD DATA [LOW_PRIORITY | CONCURRENT] [LOCAL] INFILE \'file_name\'\n [REPLACE | IGNORE]\n INTO TABLE tbl_name\n [CHARACTER SET charset_name]\n [{FIELDS | COLUMNS}\n [TERMINATED BY \'string\']\n [[OPTIONALLY] ENCLOSED BY \'char\']\n [ESCAPED BY \'char\']\n ]\n [LINES\n [STARTING BY \'string\']\n [TERMINATED BY \'string\']\n ]\n [IGNORE number {LINES | ROWS}]\n [(col_name_or_user_var,...)]\n [SET col_name = expr,...]\n\nThe LOAD DATA INFILE statement reads rows from a text file into a table\nat a very high speed. The file name must be given as a literal string.\n\nLOAD DATA INFILE is the complement of SELECT ... INTO OUTFILE. (See\nhttps://mariadb.com/kb/en/select-into/.) To write data\nfrom a table to a file, use SELECT ... INTO OUTFILE. To read the file\nback into a table, use LOAD DATA INFILE. The syntax of the FIELDS and\nLINES clauses is the same for both statements. Both clauses are\noptional, but FIELDS must precede LINES if both are specified.\n\nFor more information about the efficiency of INSERT versus LOAD DATA\nINFILE and speeding up LOAD DATA INFILE, see\nhttp://dev.mysql.com/doc/refman/5.5/en/insert-speed.html.\n\nThe character set indicated by the character_set_database system\nvariable is used to interpret the information in the file. SET NAMES\nand the setting of character_set_client do not affect interpretation of\ninput. If the contents of the input file use a character set that\ndiffers from the default, it is usually preferable to specify the\ncharacter set of the file by using the CHARACTER SET clause. A\ncharacter set of binary specifies \"no conversion.\"\n\nLOAD DATA INFILE interprets all fields in the file as having the same\ncharacter set, regardless of the data types of the columns into which\nfield values are loaded. For proper interpretation of file contents,\nyou must ensure that it was written with the correct character set. For\nexample, if you write a data file with mysqldump -T or by issuing a\nSELECT ... INTO OUTFILE statement in mysql, be sure to use a\n--default-character-set option with mysqldump or mysql so that output\nis written in the character set to be used when the file is loaded with\nLOAD DATA INFILE.\n\n*Note*: It is not possible to load data files that use the ucs2, utf16,\nor utf32 character set.\n\nThe character_set_filesystem system variable controls the\ninterpretation of the file name.\n\nYou can also load data files by using the mysqlimport utility; it\noperates by sending a LOAD DATA INFILE statement to the server. The\n--local option causes mysqlimport to read data files from the client\nhost. You can specify the --compress option to get better performance\nover slow networks if the client and server support the compressed\nprotocol. See https://mariadb.com/kb/en/mysqlimport/.\n\nIf you use LOW_PRIORITY, execution of the LOAD DATA statement is\ndelayed until no other clients are reading from the table. This affects\nonly storage engines that use only table-level locking (such as MyISAM,\nMEMORY, and MERGE).\n\nIf you specify CONCURRENT with a MyISAM table that satisfies the\ncondition for concurrent inserts (that is, it contains no free blocks\nin the middle), other threads can retrieve data from the table while\nLOAD DATA is executing. Using this option affects the performance of\nLOAD DATA a bit, even if no other thread is using the table at the same\ntime.\n\nPrior to MySQL 5.5.1, CONCURRENT was not replicated when using\nstatement-based replication (see Bug #34628). However, it is replicated\nwhen using row-based replication, regardless of the version. See\nhttp://dev.mysql.com/doc/refman/5.5/en/replication-features-load-data.h\ntml, for more information.\n\nThe LOCAL keyword, if specified, is interpreted with respect to the\nclient end of the connection:\n\no If LOCAL is specified, the file is read by the client program on the\n client host and sent to the server. The file can be given as a full\n path name to specify its exact location. If given as a relative path\n name, the name is interpreted relative to the directory in which the\n client program was started.\n\n When using LOCAL with LOAD DATA, a copy of the file is created in the\n server\'s temporary directory. This is not the directory determined by\n the value of tmpdir or slave_load_tmpdir, but rather the operating\n system\'s temporary directory, and is not configurable in the MySQL\n Server. (Typically the system temporary directory is /tmp on Linux\n systems and C:\\WINDOWS\\TEMP on Windows.) Lack of sufficient space for\n the copy in this directory can cause the LOAD DATA LOCAL statement to\n fail.\n\no If LOCAL is not specified, the file must be located on the server\n host and is read directly by the server. The server uses the\n following rules to locate the file:\n\n o If the file name is an absolute path name, the server uses it as\n given.\n\n o If the file name is a relative path name with one or more leading\n components, the server searches for the file relative to the\n server\'s data directory.\n\n o If a file name with no leading components is given, the server\n looks for the file in the database directory of the default\n database.\n\nNote that, in the non-LOCAL case, these rules mean that a file named as\n./myfile.txt is read from the server\'s data directory, whereas the file\nnamed as myfile.txt is read from the database directory of the default\ndatabase. For example, if db1 is the default database, the following\nLOAD DATA statement reads the file data.txt from the database directory\nfor db1, even though the statement explicitly loads the file into a\ntable in the db2 database:\n\nLOAD DATA INFILE \'data.txt\' INTO TABLE db2.my_table;\n\nWindows path names are specified using forward slashes rather than\nbackslashes. If you do use backslashes, you must double them.\n\nFor security reasons, when reading text files located on the server,\nthe files must either reside in the database directory or be readable\nby all. Also, to use LOAD DATA INFILE on server files, you must have\nthe FILE privilege. See\nhttps://mariadb.com/kb/en/grant/. For\nnon-LOCAL load operations, if the secure_file_priv system variable is\nset to a nonempty directory name, the file to be loaded must be located\nin that directory.\n\nURL: https://mariadb.com/kb/en/load-data-infile/\n\n','','https://mariadb.com/kb/en/load-data-infile/'),(422,'MULTILINESTRING',24,'MultiLineString(ls1,ls2,...)\n\nConstructs a MultiLineString value using LineString or WKB LineString\narguments.\n\nURL: https://mariadb.com/kb/en/multilinestring/\n\n','','https://mariadb.com/kb/en/multilinestring/'),(423,'LOCALTIME',31,'Syntax:\nLOCALTIME, LOCALTIME()\n\nLOCALTIME and LOCALTIME() are synonyms for NOW().\n\nURL: https://mariadb.com/kb/en/localtime/\n\n','','https://mariadb.com/kb/en/localtime/'),(424,'SHOW RELAYLOG EVENTS',26,'Syntax:\nSHOW RELAYLOG EVENTS\n [IN \'log_name\'] [FROM pos] [LIMIT [offset,] row_count]\n\nShows the events in the relay log of a replication slave. If you do not\nspecify \'log_name\', the first relay log is displayed. This statement\nhas no effect on the master.\n\nURL: https://mariadb.com/kb/en/show-relaylog-events/\n\n','','https://mariadb.com/kb/en/show-relaylog-events/'),(425,'MPOINTFROMTEXT',3,'MPointFromText(wkt[,srid]), MultiPointFromText(wkt[,srid])\n\nConstructs a MULTIPOINT value using its WKT representation and SRID.\n\nURL: https://mariadb.com/kb/en/mpointfromtext/\n\n','','https://mariadb.com/kb/en/mpointfromtext/'),(426,'BLOB',22,'BLOB[(M)]\n\nA BLOB column with a maximum length of 65,535 (216 - 1) bytes. Each\nBLOB value is stored using a 2-byte length prefix that indicates the\nnumber of bytes in the value.\n\nAn optional length M can be given for this type. If this is done, MySQL\ncreates the column as the smallest BLOB type large enough to hold\nvalues M bytes long.\n\nURL: https://mariadb.com/kb/en/blob/\n\n','','https://mariadb.com/kb/en/blob/'),(427,'SHA1',12,'Syntax:\nSHA1(str), SHA(str)\n\nCalculates an SHA-1 160-bit checksum for the string, as described in\nRFC 3174 (Secure Hash Algorithm). The value is returned as a string of\n40 hex digits, or NULL if the argument was NULL. One of the possible\nuses for this function is as a hash key. See the notes at the beginning\nof this section about storing hash values efficiently. You can also use\nSHA1() as a cryptographic function for storing passwords. SHA() is\nsynonymous with SHA1().\n\nAs of MySQL 5.5.3, the return value is a nonbinary string in the\nconnection character set. Before 5.5.3, the return value is a binary\nstring; see the notes at the beginning of this section about using the\nvalue as a nonbinary string.\n\nURL: https://mariadb.com/kb/en/sha1/\n\n','MariaDB> SELECT SHA1(\'abc\');\n -> \'a9993e364706816aba3e25717850c26c9cd0d89d\'\n','https://mariadb.com/kb/en/sha1/'),(428,'SUBSTR',37,'Syntax:\nSUBSTR(str,pos), SUBSTR(str FROM pos), SUBSTR(str,pos,len), SUBSTR(str\nFROM pos FOR len)\n\nSUBSTR() is a synonym for SUBSTRING().\n\nURL: https://mariadb.com/kb/en/substr/\n\n','','https://mariadb.com/kb/en/substr/'),(429,'PASSWORD',12,'Syntax:\nPASSWORD(str)\n\nCalculates and returns a hashed password string from the plaintext\npassword str and returns a nonbinary string in the connection character\nset (a binary string before MySQL 5.5.3), or NULL if the argument is\nNULL. This function is the SQL interface to the algorithm used by the\nserver to encrypt MySQL passwords for storage in the mysql.user grant\ntable.\n\nThe password hashing method used by PASSWORD() depends on the value of\nthe old_passwords system variable:\n\nURL: https://mariadb.com/kb/en/password/\n\n','MariaDB> SET old_passwords = 0;\nMariaDB> SELECT PASSWORD(\'mypass\');\n+-------------------------------------------+\n| PASSWORD(\'mypass\') |\n+-------------------------------------------+\n| *6C8989366EAF75BB670AD8EA7A7FC1176A95CEF4 |\n+-------------------------------------------+\n\nMariaDB> SET old_passwords = 1;\nMariaDB> SELECT PASSWORD(\'mypass\');\n+--------------------+\n| PASSWORD(\'mypass\') |\n+--------------------+\n| 6f8c114b58f2ce9e |\n+--------------------+\n','https://mariadb.com/kb/en/password/'),(430,'CHAR',22,'[NATIONAL] CHAR[(M)] [CHARACTER SET charset_name] [COLLATE\ncollation_name]\n\nA fixed-length string that is always right-padded with spaces to the\nspecified length when stored. M represents the column length in\ncharacters. The range of M is 0 to 255. If M is omitted, the length is\n1.\n\n*Note*: Trailing spaces are removed when CHAR values are retrieved\nunless the PAD_CHAR_TO_FULL_LENGTH SQL mode is enabled.\n\nURL: https://mariadb.com/kb/en/char/\n\n','','https://mariadb.com/kb/en/char/'),(431,'UTC_DATE',31,'Syntax:\nUTC_DATE, UTC_DATE()\n\nReturns the current UTC date as a value in \'YYYY-MM-DD\' or YYYYMMDD\nformat, depending on whether the function is used in a string or\nnumeric context.\n\nURL: https://mariadb.com/kb/en/utc_date/\n\n','MariaDB> SELECT UTC_DATE(), UTC_DATE() + 0;\n -> \'2003-08-14\', 20030814\n','https://mariadb.com/kb/en/utc_date/'),(432,'DIMENSION',36,'Dimension(g)\n\nReturns the inherent dimension of the geometry value g. The result can\nbe -1, 0, 1, or 2. The meaning of these values is given in\nhttps://mariadb.com/kb/en/dimension/.\n\nURL: https://mariadb.com/kb/en/dimension/\n\n','MariaDB> SELECT Dimension(GeomFromText(\'LineString(1 1,2 2)\'));\n+------------------------------------------------+\n| Dimension(GeomFromText(\'LineString(1 1,2 2)\')) |\n+------------------------------------------------+\n| 1 |\n+------------------------------------------------+\n','https://mariadb.com/kb/en/dimension/'),(433,'COUNT DISTINCT',16,'Syntax:\nCOUNT(DISTINCT expr,[expr...])\n\nReturns a count of the number of rows with different non-NULL expr\nvalues.\n\nCOUNT(DISTINCT) returns 0 if there were no matching rows.\n\nURL: https://mariadb.com/kb/en/count-distinct/\n\n','MariaDB> SELECT COUNT(DISTINCT results) FROM student;\n','https://mariadb.com/kb/en/count-distinct/'),(434,'BIT',22,'BIT[(M)]\n\nA bit-field type. M indicates the number of bits per value, from 1 to\n64. The default is 1 if M is omitted.\n\nURL: https://mariadb.com/kb/en/bit/\n\n','','https://mariadb.com/kb/en/bit/'),(435,'EQUALS',30,'Equals(g1,g2)\n\nReturns 1 or 0 to indicate whether g1 is spatially equal to g2.\n\nURL: https://mariadb.com/kb/en/equals/\n\n','','https://mariadb.com/kb/en/equals/'),(436,'SHOW CREATE VIEW',26,'Syntax:\nSHOW CREATE VIEW view_name\n\nThis statement shows a CREATE VIEW statement that creates the given\nview.\n\nURL: https://mariadb.com/kb/en/show-create-view/\n\n','','https://mariadb.com/kb/en/show-create-view/'),(437,'INTERVAL',18,'Syntax:\nINTERVAL(N,N1,N2,N3,...)\n\nReturns 0 if N < N1, 1 if N < N2 and so on or -1 if N is NULL. All\narguments are treated as integers. It is required that N1 < N2 < N3 <\n... < Nn for this function to work correctly. This is because a binary\nsearch is used (very fast).\n\nURL: https://mariadb.com/kb/en/interval/\n\n','MariaDB> SELECT INTERVAL(23, 1, 15, 17, 30, 44, 200);\n -> 3\nMariaDB> SELECT INTERVAL(10, 1, 10, 100, 1000);\n -> 2\nMariaDB> SELECT INTERVAL(22, 23, 30, 44, 200);\n -> 0\n','https://mariadb.com/kb/en/interval/'),(438,'FROM_DAYS',31,'Syntax:\nFROM_DAYS(N)\n\nGiven a day number N, returns a DATE value.\n\nURL: https://mariadb.com/kb/en/from_days/\n\n','MariaDB> SELECT FROM_DAYS(730669);\n -> \'2007-07-03\'\n','https://mariadb.com/kb/en/from_days/'),(439,'ALTER PROCEDURE',39,'Syntax:\nALTER PROCEDURE proc_name [characteristic ...]\n\ncharacteristic:\n COMMENT \'string\'\n | LANGUAGE SQL\n | { CONTAINS SQL | NO SQL | READS SQL DATA | MODIFIES SQL DATA }\n | SQL SECURITY { DEFINER | INVOKER }\n\nThis statement can be used to change the characteristics of a stored\nprocedure. More than one change may be specified in an ALTER PROCEDURE\nstatement. However, you cannot change the parameters or body of a\nstored procedure using this statement; to make such changes, you must\ndrop and re-create the procedure using DROP PROCEDURE and CREATE\nPROCEDURE.\n\nYou must have the ALTER ROUTINE privilege for the procedure. By\ndefault, that privilege is granted automatically to the procedure\ncreator. This behavior can be changed by disabling the\nautomatic_sp_privileges system variable. See\nhttps://mariadb.com/kb/en/stored-routine-privileges/.\n\nURL: https://mariadb.com/kb/en/alter-procedure/\n\n','','https://mariadb.com/kb/en/alter-procedure/'),(440,'BIT_COUNT',19,'Syntax:\nBIT_COUNT(N)\n\nReturns the number of bits that are set in the argument N.\n\nURL: https://mariadb.com/kb/en/bit_count/\n\n','MariaDB> SELECT BIT_COUNT(29), BIT_COUNT(b\'101010\');\n -> 4, 3\n','https://mariadb.com/kb/en/bit_count/'),(441,'OCTET_LENGTH',37,'Syntax:\nOCTET_LENGTH(str)\n\nOCTET_LENGTH() is a synonym for LENGTH().\n\nURL: https://mariadb.com/kb/en/octet_length/\n\n','','https://mariadb.com/kb/en/octet_length/'),(442,'UTC_TIMESTAMP',31,'Syntax:\nUTC_TIMESTAMP, UTC_TIMESTAMP()\n\nReturns the current UTC date and time as a value in \'YYYY-MM-DD\nHH:MM:SS\' or YYYYMMDDHHMMSS.uuuuuu format, depending on whether the\nfunction is used in a string or numeric context.\n\nURL: https://mariadb.com/kb/en/utc_timestamp/\n\n','MariaDB> SELECT UTC_TIMESTAMP(), UTC_TIMESTAMP() + 0;\n -> \'2003-08-14 18:08:04\', 20030814180804.000000\n','https://mariadb.com/kb/en/utc_timestamp/'),(443,'AES_ENCRYPT',12,'Syntax:\nAES_ENCRYPT(str,key_str)\n\nAES_ENCRYPT() and AES_DECRYPT() enable encryption and decryption of\ndata using the official AES (Advanced Encryption Standard) algorithm,\npreviously known as \"Rijndael.\" Encoding with a 128-bit key length is\nused, but you can extend it up to 256 bits by modifying the source. We\nchose 128 bits because it is much faster and it is secure enough for\nmost purposes.\n\nAES_ENCRYPT() encrypts a string and returns a binary string.\nAES_DECRYPT() decrypts the encrypted string and returns the original\nstring. The input arguments may be any length. If either argument is\nNULL, the result of this function is also NULL.\n\nBecause AES is a block-level algorithm, padding is used to encode\nuneven length strings and so the result string length may be calculated\nusing this formula:\n\n16 * (trunc(string_length / 16) + 1)\n\nIf AES_DECRYPT() detects invalid data or incorrect padding, it returns\nNULL. However, it is possible for AES_DECRYPT() to return a non-NULL\nvalue (possibly garbage) if the input data or the key is invalid.\n\nYou can use the AES functions to store data in an encrypted form by\nmodifying your queries:\n\nURL: https://mariadb.com/kb/en/aes_encrypt/\n\n','INSERT INTO t VALUES (1,AES_ENCRYPT(\'text\',\'password\'));\n','https://mariadb.com/kb/en/aes_encrypt/'),(444,'+',4,'Syntax:\n+\n\nAddition:\n\nURL: https://mariadb.com/kb/en/addition-operator/\n\n','MariaDB> SELECT 3+5;\n -> 8\n','https://mariadb.com/kb/en/addition-operator/'),(445,'INET_NTOA',14,'Syntax:\nINET_NTOA(expr)\n\nGiven a numeric IPv4 network address in network byte order, returns the\ndotted-quad representation of the address as a string. INET_NTOA()\nreturns NULL if it does not understand its argument.\n\nAs of MySQL 5.5.3, the return value is a nonbinary string in the\nconnection character set. Before 5.5.3, the return value is a binary\nstring.\n\nURL: https://mariadb.com/kb/en/inet_ntoa/\n\n','MariaDB> SELECT INET_NTOA(167773449);\n -> \'10.0.5.9\'\n','https://mariadb.com/kb/en/inet_ntoa/'),(446,'ACOS',4,'Syntax:\nACOS(X)\n\nReturns the arc cosine of X, that is, the value whose cosine is X.\nReturns NULL if X is not in the range -1 to 1.\n\nURL: https://mariadb.com/kb/en/acos/\n\n','MariaDB> SELECT ACOS(1);\n -> 0\nMariaDB> SELECT ACOS(1.0001);\n -> NULL\nMariaDB> SELECT ACOS(0);\n -> 1.5707963267949\n','https://mariadb.com/kb/en/acos/'),(447,'ISOLATION',8,'Syntax:\nSET [GLOBAL | SESSION] TRANSACTION ISOLATION LEVEL\n {\n REPEATABLE READ\n | READ COMMITTED\n | READ UNCOMMITTED\n | SERIALIZABLE\n }\n\nThis statement sets the transaction isolation level, used for\noperations on InnoDB tables.\n\nScope of the Isolation Level\n\nYou can set the isolation level globally, for the current session, or\nfor the next transaction:\n\no With the GLOBAL keyword, the statement sets the default transaction\n level globally for all subsequent sessions. Existing sessions are\n unaffected.\n\no With the SESSION keyword, the statement sets the default transaction\n level for all subsequent transactions performed within the current\n session.\n\no Without any SESSION or GLOBAL keyword, the statement sets the\n isolation level for the next (not started) transaction performed\n within the current session.\n\nA change to the global default isolation level requires the SUPER\nprivilege. Any session is free to change its session isolation level\n(even in the middle of a transaction), or the isolation level for its\nnext transaction.\n\nSET TRANSACTION ISOLATION LEVEL without GLOBAL or SESSION is not\npermitted while there is an active transaction:\n\nMariaDB> START TRANSACTION;\nQuery OK, 0 rows affected (0.02 sec)\n\nMariaDB> SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;\nERROR 1568 (25001): Transaction isolation level can\'t be changed\nwhile a transaction is in progress\n\nTo set the global default isolation level at server startup, use the\n--transaction-isolation=level option to mysqld on the command line or\nin an option file. Values of level for this option use dashes rather\nthan spaces, so the permissible values are READ-UNCOMMITTED,\nREAD-COMMITTED, REPEATABLE-READ, or SERIALIZABLE. For example, to set\nthe default isolation level to REPEATABLE READ, use these lines in the\n[mysqld] section of an option file:\n\n[mysqld]\ntransaction-isolation = REPEATABLE-READ\n\nIt is possible to check or set the global and session transaction\nisolation levels at runtime by using the tx_isolation system variable:\n\nSELECT @@GLOBAL.tx_isolation, @@tx_isolation;\nSET GLOBAL tx_isolation=\'REPEATABLE-READ\';\nSET SESSION tx_isolation=\'SERIALIZABLE\';\n\nDetails and Usage of Isolation Levels\n\nInnoDB supports each of the transaction isolation levels described here\nusing different locking strategies. You can enforce a high degree of\nconsistency with the default REPEATABLE READ level, for operations on\ncrucial data where ACID compliance is important. Or you can relax the\nconsistency rules with READ COMMITTED or even READ UNCOMMITTED, in\nsituations such as bulk reporting where precise consistency and\nrepeatable results are less important than minimizing the amount of\noverhead for locking. SERIALIZABLE enforces even stricter rules than\nREPEATABLE READ, and is used mainly in specialized situations, such as\nwith XA transactions and for troubleshooting issues with concurrency\nand deadlocks.\n\nFor full information about how these isolation levels work with InnoDB\ntransactions, see\nhttp://dev.mysql.com/doc/refman/5.1/en/innodb-transaction-model.html.\nIn particular, for additional information about InnoDB record-level\nlocks and how it uses them to execute various types of statements, see\nhttp://dev.mysql.com/doc/refman/5.5/en/innodb-record-level-locks.html\nand http://dev.mysql.com/doc/refman/5.5/en/innodb-locks-set.html.\n\nThe following list describes how MySQL supports the different\ntransaction levels. The list goes from the most commonly used level to\nthe least used.\n\no REPEATABLE READ\n\n This is the default isolation level for InnoDB. For consistent reads,\n there is an important difference from the READ COMMITTED isolation\n level: All consistent reads within the same transaction read the\n snapshot established by the first read. This convention means that if\n you issue several plain (nonlocking) SELECT statements within the\n same transaction, these SELECT statements are consistent also with\n respect to each other. See\n http://dev.mysql.com/doc/refman/5.5/en/innodb-consistent-read.html.\n\n For locking reads (SELECT with FOR UPDATE or LOCK IN SHARE MODE),\n UPDATE, and DELETE statements, locking depends on whether the\n statement uses a unique index with a unique search condition, or a\n range-type search condition. For a unique index with a unique search\n condition, InnoDB locks only the index record found, not the gap\n before it. For other search conditions, InnoDB locks the index range\n scanned, using gap locks or next-key (gap plus index-record) locks to\n block insertions by other sessions into the gaps covered by the\n range.\n\no READ COMMITTED\n\n A somewhat Oracle-like isolation level with respect to consistent\n (nonlocking) reads: Each consistent read, even within the same\n transaction, sets and reads its own fresh snapshot. See\n http://dev.mysql.com/doc/refman/5.5/en/innodb-consistent-read.html.\n\n For locking reads (SELECT with FOR UPDATE or LOCK IN SHARE MODE),\n InnoDB locks only index records, not the gaps before them, and thus\n permits the free insertion of new records next to locked records. For\n UPDATE and DELETE statements, locking depends on whether the\n statement uses a unique index with a unique search condition (such as\n WHERE id = 100), or a range-type search condition (such as WHERE id >\n 100). For a unique index with a unique search condition, InnoDB locks\n only the index record found, not the gap before it. For range-type\n searches, InnoDB locks the index range scanned, using gap locks or\n next-key (gap plus index-record) locks to block insertions by other\n sessions into the gaps covered by the range. This is necessary\n because \"phantom rows\" must be blocked for MySQL replication and\n recovery to work.\n\n *Note*: In MySQL 5.5, if the READ COMMITTED isolation level is used\n or the innodb_locks_unsafe_for_binlog system variable is enabled,\n there is no InnoDB gap locking except for foreign-key constraint\n checking and duplicate-key checking. Also, record locks for\n nonmatching rows are released after MySQL has evaluated the WHERE\n condition. If you use READ COMMITTED or enable\n innodb_locks_unsafe_for_binlog, you must use row-based binary\n logging.\n\no READ UNCOMMITTED\n\n SELECT statements are performed in a nonlocking fashion, but a\n possible earlier version of a row might be used. Thus, using this\n isolation level, such reads are not consistent. This is also called a\n \"dirty read.\" Otherwise, this isolation level works like READ\n COMMITTED.\n\no SERIALIZABLE\n\n This level is like REPEATABLE READ, but InnoDB implicitly converts\n all plain SELECT statements to SELECT ... LOCK IN SHARE MODE if\n autocommit is disabled. If autocommit is enabled, the SELECT is its\n own transaction. It therefore is known to be read only and can be\n serialized if performed as a consistent (nonlocking) read and need\n not block for other transactions. (To force a plain SELECT to block\n if other transactions have modified the selected rows, disable\n autocommit.)\n\nURL: https://mariadb.com/kb/en/set-transaction-isolation-level/\n\n','','https://mariadb.com/kb/en/set-transaction-isolation-level/'),(448,'CEILING',4,'Syntax:\nCEILING(X)\n\nReturns the smallest integer value not less than X.\n\nURL: https://mariadb.com/kb/en/ceiling/\n\n','MariaDB> SELECT CEILING(1.23);\n -> 2\nMariaDB> SELECT CEILING(-1.23);\n -> -1\n','https://mariadb.com/kb/en/ceiling/'),(449,'SIN',4,'Syntax:\nSIN(X)\n\nReturns the sine of X, where X is given in radians.\n\nURL: https://mariadb.com/kb/en/sin/\n\n','MariaDB> SELECT SIN(PI());\n -> 1.2246063538224e-16\nMariaDB> SELECT ROUND(SIN(PI()));\n -> 0\n','https://mariadb.com/kb/en/sin/'),(450,'DAYOFWEEK',31,'Syntax:\nDAYOFWEEK(date)\n\nReturns the weekday index for date (1 = Sunday, 2 = Monday, ..., 7 =\nSaturday). These index values correspond to the ODBC standard.\n\nURL: https://mariadb.com/kb/en/dayofweek/\n\n','MariaDB> SELECT DAYOFWEEK(\'2007-02-03\');\n -> 7\n','https://mariadb.com/kb/en/dayofweek/'),(451,'SHOW PROCESSLIST',26,'Syntax:\nSHOW [FULL] PROCESSLIST\n\nSHOW PROCESSLIST shows you which threads are running. You can also get\nthis information from the INFORMATION_SCHEMA PROCESSLIST table or the\nmysqladmin processlist command. If you have the PROCESS privilege, you\ncan see all threads. Otherwise, you can see only your own threads (that\nis, threads associated with the MySQL account that you are using). If\nyou do not use the FULL keyword, only the first 100 characters of each\nstatement are shown in the Info field.\n\nURL: https://mariadb.com/kb/en/show-processlist/\n\n','','https://mariadb.com/kb/en/show-processlist/'),(452,'LINEFROMWKB',32,'LineFromWKB(wkb[,srid]), LineStringFromWKB(wkb[,srid])\n\nConstructs a LINESTRING value using its WKB representation and SRID.\n\nURL: https://mariadb.com/kb/en/linefromwkb/\n\n','','https://mariadb.com/kb/en/linefromwkb/'),(453,'GEOMETRYTYPE',36,'GeometryType(g)\n\nReturns as a binary string the name of the geometry type of which the\ngeometry instance g is a member. The name corresponds to one of the\ninstantiable Geometry subclasses.\n\nURL: https://mariadb.com/kb/en/geometrytype/\n\n','MariaDB> SELECT GeometryType(GeomFromText(\'POINT(1 1)\'));\n+------------------------------------------+\n| GeometryType(GeomFromText(\'POINT(1 1)\')) |\n+------------------------------------------+\n| POINT |\n+------------------------------------------+\n','https://mariadb.com/kb/en/geometrytype/'),(454,'CREATE VIEW',39,'Syntax:\nCREATE\n [OR REPLACE]\n [ALGORITHM = {UNDEFINED | MERGE | TEMPTABLE}]\n [DEFINER = { user | CURRENT_USER }]\n [SQL SECURITY { DEFINER | INVOKER }]\n VIEW view_name [(column_list)]\n AS select_statement\n [WITH [CASCADED | LOCAL] CHECK OPTION]\n\nThe CREATE VIEW statement creates a new view, or replaces an existing\none if the OR REPLACE clause is given. If the view does not exist,\nCREATE OR REPLACE VIEW is the same as CREATE VIEW. If the view does\nexist, CREATE OR REPLACE VIEW is the same as ALTER VIEW.\n\nThe select_statement is a SELECT statement that provides the definition\nof the view. (When you select from the view, you select in effect using\nthe SELECT statement.) select_statement can select from base tables or\nother views.\n\nThe view definition is \"frozen\" at creation time, so changes to the\nunderlying tables afterward do not affect the view definition. For\nexample, if a view is defined as SELECT * on a table, new columns added\nto the table later do not become part of the view.\n\nThe ALGORITHM clause affects how MySQL processes the view. The DEFINER\nand SQL SECURITY clauses specify the security context to be used when\nchecking access privileges at view invocation time. The WITH CHECK\nOPTION clause can be given to constrain inserts or updates to rows in\ntables referenced by the view. These clauses are described later in\nthis section.\n\nThe CREATE VIEW statement requires the CREATE VIEW privilege for the\nview, and some privilege for each column selected by the SELECT\nstatement. For columns used elsewhere in the SELECT statement you must\nhave the SELECT privilege. If the OR REPLACE clause is present, you\nmust also have the DROP privilege for the view. CREATE VIEW might also\nrequire the SUPER privilege, depending on the DEFINER value, as\ndescribed later in this section.\n\nWhen a view is referenced, privilege checking occurs as described later\nin this section.\n\nA view belongs to a database. By default, a new view is created in the\ndefault database. To create the view explicitly in a given database,\nspecify the name as db_name.view_name when you create it:\n\nMariaDB> CREATE VIEW test.v AS SELECT * FROM t;\n\nWithin a database, base tables and views share the same namespace, so a\nbase table and a view cannot have the same name.\n\nColumns retrieved by the SELECT statement can be simple references to\ntable columns. They can also be expressions that use functions,\nconstant values, operators, and so forth.\n\nViews must have unique column names with no duplicates, just like base\ntables. By default, the names of the columns retrieved by the SELECT\nstatement are used for the view column names. To define explicit names\nfor the view columns, the optional column_list clause can be given as a\nlist of comma-separated identifiers. The number of names in column_list\nmust be the same as the number of columns retrieved by the SELECT\nstatement.\n\nUnqualified table or view names in the SELECT statement are interpreted\nwith respect to the default database. A view can refer to tables or\nviews in other databases by qualifying the table or view name with the\nproper database name.\n\nA view can be created from many kinds of SELECT statements. It can\nrefer to base tables or other views. It can use joins, UNION, and\nsubqueries. The SELECT need not even refer to any tables. The following\nexample defines a view that selects two columns from another table, as\nwell as an expression calculated from those columns:\n\nMariaDB> CREATE TABLE t (qty INT, price INT);\nMariaDB> INSERT INTO t VALUES(3, 50);\nMariaDB> CREATE VIEW v AS SELECT qty, price, qty*price AS value FROM t;\nMariaDB> SELECT * FROM v;\n+------+-------+-------+\n| qty | price | value |\n+------+-------+-------+\n| 3 | 50 | 150 |\n+------+-------+-------+\n\nA view definition is subject to the following restrictions:\n\no The SELECT statement cannot contain a subquery in the FROM clause.\n\no The SELECT statement cannot refer to system or user variables.\n\no Within a stored program, the definition cannot refer to program\n parameters or local variables.\n\no The SELECT statement cannot refer to prepared statement parameters.\n\no Any table or view referred to in the definition must exist. However,\n after a view has been created, it is possible to drop a table or view\n that the definition refers to. In this case, use of the view results\n in an error. To check a view definition for problems of this kind,\n use the CHECK TABLE statement.\n\no The definition cannot refer to a TEMPORARY table, and you cannot\n create a TEMPORARY view.\n\no Any tables named in the view definition must exist at definition\n time.\n\no You cannot associate a trigger with a view.\n\no Aliases for column names in the SELECT statement are checked against\n the maximum column length of 64 characters (not the maximum alias\n length of 256 characters).\n\nORDER BY is permitted in a view definition, but it is ignored if you\nselect from a view using a statement that has its own ORDER BY.\n\nFor other options or clauses in the definition, they are added to the\noptions or clauses of the statement that references the view, but the\neffect is undefined. For example, if a view definition includes a LIMIT\nclause, and you select from the view using a statement that has its own\nLIMIT clause, it is undefined which limit applies. This same principle\napplies to options such as ALL, DISTINCT, or SQL_SMALL_RESULT that\nfollow the SELECT keyword, and to clauses such as INTO, FOR UPDATE,\nLOCK IN SHARE MODE, and PROCEDURE.\n\nIf you create a view and then change the query processing environment\nby changing system variables, that may affect the results that you get\nfrom the view:\n\nMariaDB> CREATE VIEW v (mycol) AS SELECT \'abc\';\nQuery OK, 0 rows affected (0.01 sec)\n\nMariaDB> SET sql_mode = \'\';\nQuery OK, 0 rows affected (0.00 sec)\n\nMariaDB> SELECT \"mycol\" FROM v;\n+-------+\n| mycol |\n+-------+\n| mycol |\n+-------+\n1 row in set (0.01 sec)\n\nMariaDB> SET sql_mode = \'ANSI_QUOTES\';\nQuery OK, 0 rows affected (0.00 sec)\n\nMariaDB> SELECT \"mycol\" FROM v;\n+-------+\n| mycol |\n+-------+\n| abc |\n+-------+\n1 row in set (0.00 sec)\n\nThe DEFINER and SQL SECURITY clauses determine which MySQL account to\nuse when checking access privileges for the view when a statement is\nexecuted that references the view. The valid SQL SECURITY\ncharacteristic values are DEFINER and INVOKER. These indicate that the\nrequired privileges must be held by the user who defined or invoked the\nview, respectively. The default SQL SECURITY value is DEFINER.\n\nIf a user value is given for the DEFINER clause, it should be a MySQL\naccount specified as \'user_name\'@\'host_name\' (the same format used in\nthe GRANT statement), CURRENT_USER, or CURRENT_USER(). The default\nDEFINER value is the user who executes the CREATE VIEW statement. This\nis the same as specifying DEFINER = CURRENT_USER explicitly.\n\nIf you specify the DEFINER clause, these rules determine the valid\nDEFINER user values:\n\no If you do not have the SUPER privilege, the only valid user value is\n your own account, either specified literally or by using\n CURRENT_USER. You cannot set the definer to some other account.\n\no If you have the SUPER privilege, you can specify any syntactically\n valid account name. If the account does not actually exist, a warning\n is generated.\n\no Although it is possible to create a view with a nonexistent DEFINER\n account, an error occurs when the view is referenced if the SQL\n SECURITY value is DEFINER but the definer account does not exist.\n\nFor more information about view security, see\nhttps://mariadb.com/kb/en/stored-routine-privileges/.\n\nWithin a view definition, CURRENT_USER returns the view\'s DEFINER value\nby default. For views defined with the SQL SECURITY INVOKER\ncharacteristic, CURRENT_USER returns the account for the view\'s\ninvoker. For information about user auditing within views, see\nhttp://dev.mysql.com/doc/refman/5.5/en/account-activity-auditing.html.\n\nWithin a stored routine that is defined with the SQL SECURITY DEFINER\ncharacteristic, CURRENT_USER returns the routine\'s DEFINER value. This\nalso affects a view defined within such a routine, if the view\ndefinition contains a DEFINER value of CURRENT_USER.\n\nView privileges are checked like this:\n\no At view definition time, the view creator must have the privileges\n needed to use the top-level objects accessed by the view. For\n example, if the view definition refers to table columns, the creator\n must have some privilege for each column in the select list of the\n definition, and the SELECT privilege for each column used elsewhere\n in the definition. If the definition refers to a stored function,\n only the privileges needed to invoke the function can be checked. The\n privileges required at function invocation time can be checked only\n as it executes: For different invocations, different execution paths\n within the function might be taken.\n\no The user who references a view must have appropriate privileges to\n access it (SELECT to select from it, INSERT to insert into it, and so\n forth.)\n\no When a view has been referenced, privileges for objects accessed by\n the view are checked against the privileges held by the view DEFINER\n account or invoker, depending on whether the SQL SECURITY\n characteristic is DEFINER or INVOKER, respectively.\n\no If reference to a view causes execution of a stored function,\n privilege checking for statements executed within the function depend\n on whether the function SQL SECURITY characteristic is DEFINER or\n INVOKER. If the security characteristic is DEFINER, the function runs\n with the privileges of the DEFINER account. If the characteristic is\n INVOKER, the function runs with the privileges determined by the\n view\'s SQL SECURITY characteristic.\n\nExample: A view might depend on a stored function, and that function\nmight invoke other stored routines. For example, the following view\ninvokes a stored function f():\n\nCREATE VIEW v AS SELECT * FROM t WHERE t.id = f(t.name);\n\nSuppose that f() contains a statement such as this:\n\nIF name IS NULL then\n CALL p1();\nELSE\n CALL p2();\nEND IF;\n\nThe privileges required for executing statements within f() need to be\nchecked when f() executes. This might mean that privileges are needed\nfor p1() or p2(), depending on the execution path within f(). Those\nprivileges must be checked at runtime, and the user who must possess\nthe privileges is determined by the SQL SECURITY values of the view v\nand the function f().\n\nThe DEFINER and SQL SECURITY clauses for views are extensions to\nstandard SQL. In standard SQL, views are handled using the rules for\nSQL SECURITY DEFINER. The standard says that the definer of the view,\nwhich is the same as the owner of the view\'s schema, gets applicable\nprivileges on the view (for example, SELECT) and may grant them. MySQL\nhas no concept of a schema \"owner\", so MySQL adds a clause to identify\nthe definer. The DEFINER clause is an extension where the intent is to\nhave what the standard has; that is, a permanent record of who defined\nthe view. This is why the default DEFINER value is the account of the\nview creator.\n\nThe optional ALGORITHM clause is a MySQL extension to standard SQL. It\naffects how MySQL processes the view. ALGORITHM takes three values:\nMERGE, TEMPTABLE, or UNDEFINED. The default algorithm is UNDEFINED if\nno ALGORITHM clause is present. For more information, see\nhttps://mariadb.com/kb/en/view-algorithms/.\n\nSome views are updatable. That is, you can use them in statements such\nas UPDATE, DELETE, or INSERT to update the contents of the underlying\ntable. For a view to be updatable, there must be a one-to-one\nrelationship between the rows in the view and the rows in the\nunderlying table. There are also certain other constructs that make a\nview nonupdatable.\n\nThe WITH CHECK OPTION clause can be given for an updatable view to\nprevent inserts or updates to rows except those for which the WHERE\nclause in the select_statement is true.\n\nIn a WITH CHECK OPTION clause for an updatable view, the LOCAL and\nCASCADED keywords determine the scope of check testing when the view is\ndefined in terms of another view. The LOCAL keyword restricts the CHECK\nOPTION only to the view being defined. CASCADED causes the checks for\nunderlying views to be evaluated as well. When neither keyword is\ngiven, the default is CASCADED.\n\nFor more information about updatable views and the WITH CHECK OPTION\nclause, see\nhttps://mariadb.com/kb/en/inserting-and-updating-with-views/.\n\nURL: https://mariadb.com/kb/en/create-view/\n\n','','https://mariadb.com/kb/en/create-view/'),(455,'TRIM',37,'Syntax:\nTRIM([{BOTH | LEADING | TRAILING} [remstr] FROM] str), TRIM([remstr\nFROM] str)\n\nReturns the string str with all remstr prefixes or suffixes removed. If\nnone of the specifiers BOTH, LEADING, or TRAILING is given, BOTH is\nassumed. remstr is optional and, if not specified, spaces are removed.\n\nURL: https://mariadb.com/kb/en/trim/\n\n','MariaDB> SELECT TRIM(\' bar \');\n -> \'bar\'\nMariaDB> SELECT TRIM(LEADING \'x\' FROM \'xxxbarxxx\');\n -> \'barxxx\'\nMariaDB> SELECT TRIM(BOTH \'x\' FROM \'xxxbarxxx\');\n -> \'bar\'\nMariaDB> SELECT TRIM(TRAILING \'xyz\' FROM \'barxxyz\');\n -> \'barx\'\n','https://mariadb.com/kb/en/trim/'),(456,'IS',18,'Syntax:\nIS boolean_value\n\nTests a value against a boolean value, where boolean_value can be TRUE,\nFALSE, or UNKNOWN.\n\nURL: https://mariadb.com/kb/en/is/\n\n','MariaDB> SELECT 1 IS TRUE, 0 IS FALSE, NULL IS UNKNOWN;\n -> 1, 1, 1\n','https://mariadb.com/kb/en/is/'),(457,'GET_FORMAT',31,'Syntax:\nGET_FORMAT({DATE|TIME|DATETIME}, {\'EUR\'|\'USA\'|\'JIS\'|\'ISO\'|\'INTERNAL\'})\n\nReturns a format string. This function is useful in combination with\nthe DATE_FORMAT() and the STR_TO_DATE() functions.\n\nURL: https://mariadb.com/kb/en/get_format/\n\n','MariaDB> SELECT DATE_FORMAT(\'2003-10-03\',GET_FORMAT(DATE,\'EUR\'));\n -> \'03.10.2003\'\nMariaDB> SELECT STR_TO_DATE(\'10.31.2003\',GET_FORMAT(DATE,\'USA\'));\n -> \'2003-10-31\'\n','https://mariadb.com/kb/en/get_format/'),(458,'TINYBLOB',22,'TINYBLOB\n\nA BLOB column with a maximum length of 255 (28 - 1) bytes. Each\nTINYBLOB value is stored using a 1-byte length prefix that indicates\nthe number of bytes in the value.\n\nURL: https://mariadb.com/kb/en/tinyblob/\n\n','','https://mariadb.com/kb/en/tinyblob/'),(459,'SIGNAL',23,'Syntax:\nSIGNAL condition_value\n [SET signal_information_item\n [, signal_information_item] ...]\n\ncondition_value:\n SQLSTATE [VALUE] sqlstate_value\n | condition_name\n\nsignal_information_item:\n condition_information_item_name = simple_value_specification\n\ncondition_information_item_name:\n CLASS_ORIGIN\n | SUBCLASS_ORIGIN\n | MESSAGE_TEXT\n | MYSQL_ERRNO\n | CONSTRAINT_CATALOG\n | CONSTRAINT_SCHEMA\n | CONSTRAINT_NAME\n | CATALOG_NAME\n | SCHEMA_NAME\n | TABLE_NAME\n | COLUMN_NAME\n | CURSOR_NAME\n\ncondition_name, simple_value_specification:\n (see following discussion)\n\nSIGNAL is the way to \"return\" an error. SIGNAL provides error\ninformation to a handler, to an outer portion of the application, or to\nthe client. Also, it provides control over the error\'s characteristics\n(error number, SQLSTATE value, message). Without SIGNAL, it is\nnecessary to resort to workarounds such as deliberately referring to a\nnonexistent table to cause a routine to return an error.\n\nNo special privileges are required to execute the SIGNAL statement.\n\nThe condition_value in a SIGNAL statement indicates the error value to\nbe returned. It can be an SQLSTATE value (a 5-character string literal)\nor a condition_name that refers to a named condition previously defined\nwith DECLARE ... CONDITION (see [HELP DECLARE CONDITION]).\n\nAn SQLSTATE value can indicate errors, warnings, or \"not found.\" The\nfirst two characters of the value indicate its error class, as\ndiscussed in\nhttps://mariadb.com/kb/en/signal/#signal-condition-inf\normation-items. Some signal values cause statement termination; see\nhttps://mariadb.com/kb/en/signal/#signal-effects.\n\nThe SQLSTATE value for a SIGNAL statement should not start with \'00\'\nbecause such values indicate success and are not valid for signaling an\nerror. This is true whether the SQLSTATE value is specified directly in\nthe SIGNAL statement or in a named condition referred to in the\nstatement. If the value is invalid, a Bad SQLSTATE error occurs.\n\nTo signal a generic SQLSTATE value, use \'45000\', which means \"unhandled\nuser-defined exception.\"\n\nThe SIGNAL statement optionally includes a SET clause that contains\nmultiple signal items, in a comma-separated list of\ncondition_information_item_name = simple_value_specification\nassignments.\n\nEach condition_information_item_name may be specified only once in the\nSET clause. Otherwise, a Duplicate condition information item error\noccurs.\n\nValid simple_value_specification designators can be specified using\nstored procedure or function parameters, stored program local variables\ndeclared with DECLARE, user-defined variables, system variables, or\nliterals. A character literal may include a _charset introducer.\n\nFor information about permissible condition_information_item_name\nvalues, see\nhttps://mariadb.com/kb/en/signal/#signal-condition-inf\normation-items.\n\nURL: https://mariadb.com/kb/en/signal/\n\n','CREATE PROCEDURE p (pval INT)\nBEGIN\n DECLARE specialty CONDITION FOR SQLSTATE \'45000\';\n IF pval = 0 THEN\n SIGNAL SQLSTATE \'01000\';\n ELSEIF pval = 1 THEN\n SIGNAL SQLSTATE \'45000\'\n SET MESSAGE_TEXT = \'An error occurred\';\n ELSEIF pval = 2 THEN\n SIGNAL specialty\n SET MESSAGE_TEXT = \'An error occurred\';\n ELSE\n SIGNAL SQLSTATE \'01000\'\n SET MESSAGE_TEXT = \'A warning occurred\', MYSQL_ERRNO = 1000;\n SIGNAL SQLSTATE \'45000\'\n SET MESSAGE_TEXT = \'An error occurred\', MYSQL_ERRNO = 1001;\n END IF;\nEND;\n','https://mariadb.com/kb/en/signal/'),(460,'SAVEPOINT',8,'Syntax:\nSAVEPOINT identifier\nROLLBACK [WORK] TO [SAVEPOINT] identifier\nRELEASE SAVEPOINT identifier\n\nInnoDB supports the SQL statements SAVEPOINT, ROLLBACK TO SAVEPOINT,\nRELEASE SAVEPOINT and the optional WORK keyword for ROLLBACK.\n\nURL: https://mariadb.com/kb/en/savepoint/\n\n','','https://mariadb.com/kb/en/savepoint/'),(461,'USER',17,'Syntax:\nUSER()\n\nReturns the current MySQL user name and host name as a string in the\nutf8 character set.\n\nURL: https://mariadb.com/kb/en/user/\n\n','MariaDB> SELECT USER();\n -> \'davida@localhost\'\n','https://mariadb.com/kb/en/user/'),(462,'LABELS',23,'Syntax:\n[begin_label:] BEGIN\n [statement_list]\nEND [end_label]\n\n[begin_label:] LOOP\n statement_list\nEND LOOP [end_label]\n\n[begin_label:] REPEAT\n statement_list\nUNTIL search_condition\nEND REPEAT [end_label]\n\n[begin_label:] WHILE search_condition DO\n statement_list\nEND WHILE [end_label]\n\nLabels are permitted for BEGIN ... END blocks and for the LOOP, REPEAT,\nand WHILE statements. Label use for those statements follows these\nrules:\n\no begin_label must be followed by a colon.\n\no begin_label can be given without end_label. If end_label is present,\n it must be the same as begin_label.\n\no end_label cannot be given without begin_label.\n\no Labels at the same nesting level must be distinct.\n\no Labels can be up to 16 characters long.\n\nTo refer to a label within the labeled construct, use an ITERATE or\nLEAVE statement. The following example uses those statements to\ncontinue iterating or terminate the loop:\n\nCREATE PROCEDURE doiterate(p1 INT)\nBEGIN\n label1: LOOP\n SET p1 = p1 + 1;\n IF p1 < 10 THEN ITERATE label1; END IF;\n LEAVE label1;\n END LOOP label1;\nEND;\n\nThe scope of a block label does not include the code for handlers\ndeclared within the block. For details, see [HELP DECLARE HANDLER].\n\nURL: https://mariadb.com/kb/en/labels/\n\n','','https://mariadb.com/kb/en/labels/'),(463,'ALTER TABLE',39,'Syntax:\nALTER [ONLINE | OFFLINE] [IGNORE] TABLE tbl_name\n [alter_specification [, alter_specification] ...]\n [partition_options]\n\nalter_specification:\n table_options\n | ADD [COLUMN] col_name column_definition\n [FIRST | AFTER col_name ]\n | ADD [COLUMN] (col_name column_definition,...)\n | ADD {INDEX|KEY} [index_name]\n [index_type] (index_col_name,...) [index_option] ...\n | ADD [CONSTRAINT [symbol]] PRIMARY KEY\n [index_type] (index_col_name,...) [index_option] ...\n | ADD [CONSTRAINT [symbol]]\n UNIQUE [INDEX|KEY] [index_name]\n [index_type] (index_col_name,...) [index_option] ...\n | ADD FULLTEXT [INDEX|KEY] [index_name]\n (index_col_name,...) [index_option] ...\n | ADD SPATIAL [INDEX|KEY] [index_name]\n (index_col_name,...) [index_option] ...\n | ADD [CONSTRAINT [symbol]]\n FOREIGN KEY [index_name] (index_col_name,...)\n reference_definition\n | ALTER [COLUMN] col_name {SET DEFAULT literal | DROP DEFAULT}\n | CHANGE [COLUMN] old_col_name new_col_name column_definition\n [FIRST|AFTER col_name]\n | MODIFY [COLUMN] col_name column_definition\n [FIRST | AFTER col_name]\n | DROP [COLUMN] col_name\n | DROP PRIMARY KEY\n | DROP {INDEX|KEY} index_name\n | DROP FOREIGN KEY fk_symbol\n | MAX_ROWS = rows\n | DISABLE KEYS\n | ENABLE KEYS\n | RENAME [TO|AS] new_tbl_name\n | ORDER BY col_name [, col_name] ...\n | CONVERT TO CHARACTER SET charset_name [COLLATE collation_name]\n | [DEFAULT] CHARACTER SET [=] charset_name [COLLATE [=] collation_name]\n | DISCARD TABLESPACE\n | IMPORT TABLESPACE\n | FORCE\n | ADD PARTITION (partition_definition)\n | DROP PARTITION partition_names\n | TRUNCATE PARTITION {partition_names | ALL}\n | COALESCE PARTITION number\n | REORGANIZE PARTITION [partition_names INTO (partition_definitions)]\n | ANALYZE PARTITION {partition_names | ALL}\n | CHECK PARTITION {partition_names | ALL}\n | OPTIMIZE PARTITION {partition_names | ALL}\n | REBUILD PARTITION {partition_names | ALL}\n | REPAIR PARTITION {partition_names | ALL}\n | PARTITION BY partitioning_expression\n | REMOVE PARTITIONING\n\nindex_col_name:\n col_name [(length)] [ASC | DESC]\n\nindex_type:\n USING {BTREE | HASH}\n\nindex_option:\n KEY_BLOCK_SIZE [=] value\n | index_type\n | WITH PARSER parser_name\n | COMMENT \'string\'\n\ntable_options:\n table_option [[,] table_option] ... (see CREATE TABLE options)\n\npartition_options:\n (see CREATE TABLE options)\n\nALTER TABLE changes the structure of a table. For example, you can add\nor delete columns, create or destroy indexes, change the type of\nexisting columns, or rename columns or the table itself. You can also\nchange characteristics such as the storage engine used for the table or\nthe table comment.\n\nPartitioning-related clauses for ALTER TABLE can be used with\npartitioned tables for repartitioning, for adding, dropping, merging,\nand splitting partitions, and for performing partitioning maintenance.\nFor more information, see\nhttp://dev.mysql.com/doc/refman/5.5/en/alter-table-partition-operations\n.html.\n\nFollowing the table name, specify the alterations to be made. If none\nare given, ALTER TABLE does nothing.\n\nURL: https://mariadb.com/kb/en/alter-table/\n\n','','https://mariadb.com/kb/en/alter-table/'),(464,'MPOINTFROMWKB',32,'MPointFromWKB(wkb[,srid]), MultiPointFromWKB(wkb[,srid])\n\nConstructs a MULTIPOINT value using its WKB representation and SRID.\n\nURL: https://mariadb.com/kb/en/mpointfromwkb/\n\n','','https://mariadb.com/kb/en/mpointfromwkb/'),(465,'CHAR BYTE',22,'The CHAR BYTE data type is an alias for the BINARY data type. This is a\ncompatibility feature.\n\nURL: https://mariadb.com/kb/en/char-byte/\n\n','','https://mariadb.com/kb/en/char-byte/'),(466,'REPAIR TABLE',20,'Syntax:\nREPAIR [NO_WRITE_TO_BINLOG | LOCAL] TABLE\n tbl_name [, tbl_name] ...\n [QUICK] [EXTENDED] [USE_FRM]\n\nREPAIR TABLE repairs a possibly corrupted table. By default, it has the\nsame effect as myisamchk --recover tbl_name. REPAIR TABLE works for\nMyISAM, ARCHIVE, and CSV tables. See\nhttps://mariadb.com/kb/en/myisam-storage-engine/, and\nhttps://mariadb.com/kb/en/archive/, and\nhttps://mariadb.com/kb/en/csv/\n\nThis statement requires SELECT and INSERT privileges for the table.\n\nREPAIR TABLE is supported for partitioned tables. However, the USE_FRM\noption cannot be used with this statement on a partitioned table.\n\nYou can use ALTER TABLE ... REPAIR PARTITION to repair one or more\npartitions; for more information, see [HELP ALTER TABLE], and\nhttp://dev.mysql.com/doc/refman/5.5/en/partitioning-maintenance.html.\n\nURL: https://mariadb.com/kb/en/repair-table/\n\n','','https://mariadb.com/kb/en/repair-table/'),(467,'MERGE',39,'The MERGE storage engine, also known as the MRG_MyISAM engine, is a\ncollection of identical MyISAM tables that can be used as one.\n\"Identical\" means that all tables have identical column and index\ninformation. You cannot merge MyISAM tables in which the columns are\nlisted in a different order, do not have exactly the same columns, or\nhave the indexes in different order. However, any or all of the MyISAM\ntables can be compressed with myisampack. See\nhttps://mariadb.com/kb/en/myisampack/. Differences in\ntable options such as AVG_ROW_LENGTH, MAX_ROWS, or PACK_KEYS do not\nmatter.\n\nURL: https://mariadb.com/kb/en/merge/\n\n','MariaDB> CREATE TABLE t1 (\n -> a INT NOT NULL AUTO_INCREMENT PRIMARY KEY,\n -> message CHAR(20)) ENGINE=MyISAM;\nMariaDB> CREATE TABLE t2 (\n -> a INT NOT NULL AUTO_INCREMENT PRIMARY KEY,\n -> message CHAR(20)) ENGINE=MyISAM;\nMariaDB> INSERT INTO t1 (message) VALUES (\'Testing\'),(\'table\'),(\'t1\');\nMariaDB> INSERT INTO t2 (message) VALUES (\'Testing\'),(\'table\'),(\'t2\');\nMariaDB> CREATE TABLE total (\n -> a INT NOT NULL AUTO_INCREMENT,\n -> message CHAR(20), INDEX(a))\n -> ENGINE=MERGE UNION=(t1,t2) INSERT_METHOD=LAST;\n','https://mariadb.com/kb/en/merge/'),(468,'CREATE TABLE',39,'Syntax:\nCREATE [TEMPORARY] TABLE [IF NOT EXISTS] tbl_name\n (create_definition,...)\n [table_options]\n [partition_options]\n\nOr:\n\nCREATE [TEMPORARY] TABLE [IF NOT EXISTS] tbl_name\n [(create_definition,...)]\n [table_options]\n [partition_options]\n select_statement\n\nOr:\n\nCREATE [TEMPORARY] TABLE [IF NOT EXISTS] tbl_name\n { LIKE old_tbl_name | (LIKE old_tbl_name) }\n\ncreate_definition:\n col_name column_definition\n | [CONSTRAINT [symbol]] PRIMARY KEY [index_type] (index_col_name,...)\n [index_option] ...\n | {INDEX|KEY} [index_name] [index_type] (index_col_name,...)\n [index_option] ...\n | [CONSTRAINT [symbol]] UNIQUE [INDEX|KEY]\n [index_name] [index_type] (index_col_name,...)\n [index_option] ...\n | {FULLTEXT|SPATIAL} [INDEX|KEY] [index_name] (index_col_name,...)\n [index_option] ...\n | [CONSTRAINT [symbol]] FOREIGN KEY\n [index_name] (index_col_name,...) reference_definition\n | CHECK (expr)\n\ncolumn_definition:\n data_type [NOT NULL | NULL] [DEFAULT default_value]\n [AUTO_INCREMENT] [UNIQUE [KEY] | [PRIMARY] KEY]\n [COMMENT \'string\']\n [COLUMN_FORMAT {FIXED|DYNAMIC|DEFAULT}]\n [STORAGE {DISK|MEMORY|DEFAULT}]\n [reference_definition]\n\ndata_type:\n BIT[(length)]\n | TINYINT[(length)] [UNSIGNED] [ZEROFILL]\n | SMALLINT[(length)] [UNSIGNED] [ZEROFILL]\n | MEDIUMINT[(length)] [UNSIGNED] [ZEROFILL]\n | INT[(length)] [UNSIGNED] [ZEROFILL]\n | INTEGER[(length)] [UNSIGNED] [ZEROFILL]\n | BIGINT[(length)] [UNSIGNED] [ZEROFILL]\n | REAL[(length,decimals)] [UNSIGNED] [ZEROFILL]\n | DOUBLE[(length,decimals)] [UNSIGNED] [ZEROFILL]\n | FLOAT[(length,decimals)] [UNSIGNED] [ZEROFILL]\n | DECIMAL[(length[,decimals])] [UNSIGNED] [ZEROFILL]\n | NUMERIC[(length[,decimals])] [UNSIGNED] [ZEROFILL]\n | DATE\n | TIME\n | TIMESTAMP\n | DATETIME\n | YEAR\n | CHAR[(length)]\n [CHARACTER SET charset_name] [COLLATE collation_name]\n | VARCHAR(length)\n [CHARACTER SET charset_name] [COLLATE collation_name]\n | BINARY[(length)]\n | VARBINARY(length)\n | TINYBLOB\n | BLOB\n | MEDIUMBLOB\n | LONGBLOB\n | TINYTEXT [BINARY]\n [CHARACTER SET charset_name] [COLLATE collation_name]\n | TEXT [BINARY]\n [CHARACTER SET charset_name] [COLLATE collation_name]\n | MEDIUMTEXT [BINARY]\n [CHARACTER SET charset_name] [COLLATE collation_name]\n | LONGTEXT [BINARY]\n [CHARACTER SET charset_name] [COLLATE collation_name]\n | ENUM(value1,value2,value3,...)\n [CHARACTER SET charset_name] [COLLATE collation_name]\n | SET(value1,value2,value3,...)\n [CHARACTER SET charset_name] [COLLATE collation_name]\n | spatial_type\n\nindex_col_name:\n col_name [(length)] [ASC | DESC]\n\nindex_type:\n USING {BTREE | HASH}\n\nindex_option:\n KEY_BLOCK_SIZE [=] value\n | index_type\n | WITH PARSER parser_name\n | COMMENT \'string\'\n\nreference_definition:\n REFERENCES tbl_name (index_col_name,...)\n [MATCH FULL | MATCH PARTIAL | MATCH SIMPLE]\n [ON DELETE reference_option]\n [ON UPDATE reference_option]\n\nreference_option:\n RESTRICT | CASCADE | SET NULL | NO ACTION\n\ntable_options:\n table_option [[,] table_option] ...\n\ntable_option:\n ENGINE [=] engine_name\n | AUTO_INCREMENT [=] value\n | AVG_ROW_LENGTH [=] value\n | [DEFAULT] CHARACTER SET [=] charset_name\n | CHECKSUM [=] {0 | 1}\n | [DEFAULT] COLLATE [=] collation_name\n | COMMENT [=] \'string\'\n | CONNECTION [=] \'connect_string\'\n | DATA DIRECTORY [=] \'absolute path to directory\'\n | DELAY_KEY_WRITE [=] {0 | 1}\n | INDEX DIRECTORY [=] \'absolute path to directory\'\n | INSERT_METHOD [=] { NO | FIRST | LAST }\n | KEY_BLOCK_SIZE [=] value\n | MAX_ROWS [=] value\n | MIN_ROWS [=] value\n | PACK_KEYS [=] {0 | 1 | DEFAULT}\n | PASSWORD [=] \'string\'\n | ROW_FORMAT [=] {DEFAULT|DYNAMIC|FIXED|COMPRESSED|REDUNDANT|COMPACT}\n | TABLESPACE tablespace_name [STORAGE {DISK|MEMORY|DEFAULT}]\n | UNION [=] (tbl_name[,tbl_name]...)\n\npartition_options:\n PARTITION BY\n { [LINEAR] HASH(expr)\n | [LINEAR] KEY(column_list)\n | RANGE{(expr) | COLUMNS(column_list)}\n | LIST{(expr) | COLUMNS(column_list)} }\n [PARTITIONS num]\n [SUBPARTITION BY\n { [LINEAR] HASH(expr)\n | [LINEAR] KEY(column_list) }\n [SUBPARTITIONS num]\n ]\n [(partition_definition [, partition_definition] ...)]\n\npartition_definition:\n PARTITION partition_name\n [VALUES \n {LESS THAN {(expr | value_list) | MAXVALUE} \n | \n IN (value_list)}]\n [[STORAGE] ENGINE [=] engine_name]\n [COMMENT [=] \'comment_text\' ]\n [DATA DIRECTORY [=] \'data_dir\']\n [INDEX DIRECTORY [=] \'index_dir\']\n [MAX_ROWS [=] max_number_of_rows]\n [MIN_ROWS [=] min_number_of_rows]\n [TABLESPACE [=] tablespace_name]\n [NODEGROUP [=] node_group_id]\n [(subpartition_definition [, subpartition_definition] ...)]\n\nsubpartition_definition:\n SUBPARTITION logical_name\n [[STORAGE] ENGINE [=] engine_name]\n [COMMENT [=] \'comment_text\' ]\n [DATA DIRECTORY [=] \'data_dir\']\n [INDEX DIRECTORY [=] \'index_dir\']\n [MAX_ROWS [=] max_number_of_rows]\n [MIN_ROWS [=] min_number_of_rows]\n [TABLESPACE [=] tablespace_name]\n [NODEGROUP [=] node_group_id]\n\nselect_statement:\n [IGNORE | REPLACE] [AS] SELECT ... (Some valid select statement)\n\nCREATE TABLE creates a table with the given name. You must have the\nCREATE privilege for the table.\n\nRules for permissible table names are given in\nhttps://mariadb.com/kb/en/identifier-names/. By default,\nthe table is created in the default database, using the InnoDB storage\nengine. An error occurs if the table exists, if there is no default\ndatabase, or if the database does not exist.\n\nURL: https://mariadb.com/kb/en/create-table/\n\n','','https://mariadb.com/kb/en/create-table/'),(469,'>',18,'Syntax:\n>\n\nGreater than:\n\nURL: https://mariadb.com/kb/en/greater-than/\n\n','MariaDB> SELECT 2 > 2;\n -> 0\n','https://mariadb.com/kb/en/greater-than/'),(470,'ANALYZE TABLE',20,'Syntax:\nANALYZE [NO_WRITE_TO_BINLOG | LOCAL] TABLE\n tbl_name [, tbl_name] ...\n\nANALYZE TABLE analyzes and stores the key distribution for a table.\nDuring the analysis, the table is locked with a read lock for InnoDB\nand MyISAM. This statement works with InnoDB, Aria and MyISAM tables.\nFor MyISAM tables, this statement is equivalent to using myisamchk\n--analyze.\n\nFor more information on how the analysis works within InnoDB, see\nhttp://dev.mysql.com/doc/refman/5.5/en/innodb-restrictions.html.\n\nMySQL uses the stored key distribution to decide the order in which\ntables should be joined when you perform a join on something other than\na constant. In addition, key distributions can be used when deciding\nwhich indexes to use for a specific table within a query.\n\nThis statement requires SELECT and INSERT privileges for the table.\n\nANALYZE TABLE is supported for partitioned tables, and you can use\nALTER TABLE ... ANALYZE PARTITION to analyze one or more partitions;\nfor more information, see [HELP ALTER TABLE], and\nhttp://dev.mysql.com/doc/refman/5.5/en/partitioning-maintenance.html.\n\nURL: https://mariadb.com/kb/en/analyze-table/\n\n','','https://mariadb.com/kb/en/analyze-table/'),(471,'MICROSECOND',31,'Syntax:\nMICROSECOND(expr)\n\nReturns the microseconds from the time or datetime expression expr as a\nnumber in the range from 0 to 999999.\n\nURL: https://mariadb.com/kb/en/microsecond/\n\n','MariaDB> SELECT MICROSECOND(\'12:00:00.123456\');\n -> 123456\nMariaDB> SELECT MICROSECOND(\'2009-12-31 23:59:59.000010\');\n -> 10\n','https://mariadb.com/kb/en/microsecond/'),(472,'CONSTRAINT',39,'InnoDB supports foreign keys, which let you cross-reference related\ndata across tables, and foreign key constraints, which help keep this\nspread-out data consistent. The syntax for an InnoDB foreign key\nconstraint definition in the CREATE TABLE or ALTER TABLE statement\nlooks like this:\n\n[CONSTRAINT [symbol]] FOREIGN KEY\n [index_name] (index_col_name, ...)\n REFERENCES tbl_name (index_col_name,...)\n [ON DELETE reference_option]\n [ON UPDATE reference_option]\n\nreference_option:\n RESTRICT | CASCADE | SET NULL | NO ACTION\n\nURL: https://mariadb.com/kb/en/constraint/\n\n','CREATE TABLE product (category INT NOT NULL, id INT NOT NULL,\n price DECIMAL,\n PRIMARY KEY(category, id)) ENGINE=INNODB;\nCREATE TABLE customer (id INT NOT NULL,\n PRIMARY KEY (id)) ENGINE=INNODB;\nCREATE TABLE product_order (no INT NOT NULL AUTO_INCREMENT,\n product_category INT NOT NULL,\n product_id INT NOT NULL,\n customer_id INT NOT NULL,\n PRIMARY KEY(no),\n INDEX (product_category, product_id),\n FOREIGN KEY (product_category, product_id)\n REFERENCES product(category, id)\n ON UPDATE CASCADE ON DELETE RESTRICT,\n INDEX (customer_id),\n FOREIGN KEY (customer_id)\n REFERENCES customer(id)) ENGINE=INNODB;\n','https://mariadb.com/kb/en/constraint/'),(473,'CREATE SERVER',39,'Syntax:\nCREATE SERVER server_name\n FOREIGN DATA WRAPPER wrapper_name\n OPTIONS (option [, option] ...)\n\noption:\n { HOST character-literal\n | DATABASE character-literal\n | USER character-literal\n | PASSWORD character-literal\n | SOCKET character-literal\n | OWNER character-literal\n | PORT numeric-literal }\n\nThis statement creates the definition of a server for use with the\nFEDERATED storage engine. The CREATE SERVER statement creates a new row\nwithin the servers table within the mysql database. This statement\nrequires the SUPER privilege.\n\nThe server_name should be a unique reference to the server. Server\ndefinitions are global within the scope of the server, it is not\npossible to qualify the server definition to a specific database.\nserver_name has a maximum length of 64 characters (names longer than 64\ncharacters are silently truncated), and is case insensitive. You may\nspecify the name as a quoted string.\n\nThe wrapper_name should be mysql, and may be quoted with single\nquotation marks. Other values for wrapper_name are not currently\nsupported.\n\nFor each option you must specify either a character literal or numeric\nliteral. Character literals are UTF-8, support a maximum length of 64\ncharacters and default to a blank (empty) string. String literals are\nsilently truncated to 64 characters. Numeric literals must be a number\nbetween 0 and 9999, default value is 0.\n\n*Note*: Note that the OWNER option is currently not applied, and has no\neffect on the ownership or operation of the server connection that is\ncreated.\n\nThe CREATE SERVER statement creates an entry in the mysql.servers table\nthat can later be used with the CREATE TABLE statement when creating a\nFEDERATED table. The options that you specify will be used to populate\nthe columns in the mysql.servers table. The table columns are\nServer_name, Host, Db, Username, Password, Port and Socket.\n\nURL: https://mariadb.com/kb/en/create-server/\n\n','CREATE SERVER s\nFOREIGN DATA WRAPPER mysql\nOPTIONS (USER \'Remote\', HOST \'192.168.1.106\', DATABASE \'test\');\n','https://mariadb.com/kb/en/create-server/'),(474,'FIELD',37,'Syntax:\nFIELD(str,str1,str2,str3,...)\n\nReturns the index (position) of str in the str1, str2, str3, ... list.\nReturns 0 if str is not found.\n\nIf all arguments to FIELD() are strings, all arguments are compared as\nstrings. If all arguments are numbers, they are compared as numbers.\nOtherwise, the arguments are compared as double.\n\nIf str is NULL, the return value is 0 because NULL fails equality\ncomparison with any value. FIELD() is the complement of ELT().\n\nURL: https://mariadb.com/kb/en/field/\n\n','MariaDB> SELECT FIELD(\'ej\', \'Hej\', \'ej\', \'Heja\', \'hej\', \'foo\');\n -> 2\nMariaDB> SELECT FIELD(\'fo\', \'Hej\', \'ej\', \'Heja\', \'hej\', \'foo\');\n -> 0\n','https://mariadb.com/kb/en/field/'),(475,'MAKETIME',31,'Syntax:\nMAKETIME(hour,minute,second)\n\nReturns a time value calculated from the hour, minute, and second\narguments.\n\nURL: https://mariadb.com/kb/en/maketime/\n\n','MariaDB> SELECT MAKETIME(12,15,30);\n -> \'12:15:30\'\n','https://mariadb.com/kb/en/maketime/'),(476,'CURDATE',31,'Syntax:\nCURDATE()\n\nReturns the current date as a value in \'YYYY-MM-DD\' or YYYYMMDD format,\ndepending on whether the function is used in a string or numeric\ncontext.\n\nURL: https://mariadb.com/kb/en/curdate/\n\n','MariaDB> SELECT CURDATE();\n -> \'2008-06-13\'\nMariaDB> SELECT CURDATE() + 0;\n -> 20080613\n','https://mariadb.com/kb/en/curdate/'),(477,'SET PASSWORD',10,'Syntax:\nSET PASSWORD [FOR user] =\n {\n PASSWORD(\'cleartext password\')\n | OLD_PASSWORD(\'cleartext password\')\n | \'encrypted password\'\n }\n\nThe SET PASSWORD statement assigns a password to an existing MySQL user\naccount. When the read_only system variable is enabled, the SUPER\nprivilege is required to use SET PASSWORD, in addition to whatever\nother privileges might be required.\n\nIf the password is specified using the PASSWORD() or OLD_PASSWORD()\nfunction, the cleartext (unencrypted) password should be given as the\nargument to the function, which hashes the password and returns the\nencrypted password string. If the password is specified without using\neither function, it should be the already encrypted password value as a\nliteral string. In all cases, the encrypted password string must be in\nthe format required by the authentication method used for the account.\n\nThe old_passwords system variable value determines the hashing method\nused by PASSWORD(). If you specify the password using that function and\nSET PASSWORD rejects the password as not being in the correct format,\nit may be necessary to set old_passwords to change the hashing method.\nFor descriptions of the permitted values, see\nhttps://mariadb.com/kb/en/server-system-variables#old_passwords.\n\nWith no FOR user clause, this statement sets the password for the\ncurrent user. (To see which account the server authenticated you as,\ninvoke the CURRENT_USER() function.) Any client who successfully\nconnects to the server using a nonanonymous account can change the\npassword for that account.\n\nWith a FOR user clause, this statement sets the password for the named\nuser. You must have the UPDATE privilege for the mysql database to do\nthis. The user account name uses the format described in\nhttps://mariadb.com/kb/en/create-user#account-names. The user\nvalue should be given as \'user_name\'@\'host_name\', where \'user_name\' and\n\'host_name\' are exactly as listed in the User and Host columns of the\nmysql.user table row. (If you specify only a user name, a host name of\n\'%\' is used.) For example, to set the password for an account with User\nand Host column values of \'bob\' and \'%.example.org\', write the\nstatement like this:\n\nSET PASSWORD FOR \'bob\'@\'%.example.org\' = PASSWORD(\'cleartext password\');\n\nURL: https://mariadb.com/kb/en/set-password/\n\n','','https://mariadb.com/kb/en/set-password/'),(478,'ALTER TABLESPACE',39,'Syntax:\nALTER TABLESPACE tablespace_name\n {ADD|DROP} DATAFILE \'file_name\'\n [INITIAL_SIZE [=] size]\n [WAIT]\n ENGINE [=] engine_name\n\nThis statement is used with NDB cluster, which is not supported by MariaDB.\n\nURL: https://mariadb.com/kb/en/alter-tablespace/\n\n','','https://mariadb.com/kb/en/alter-tablespace/'),(479,'IF FUNCTION',7,'Syntax:\nIF(expr1,expr2,expr3)\n\nIf expr1 is TRUE (expr1 <> 0 and expr1 <> NULL) then IF() returns\nexpr2; otherwise it returns expr3. IF() returns a numeric or string\nvalue, depending on the context in which it is used.\n\nURL: https://mariadb.com/kb/en/if-function/\n\n','MariaDB> SELECT IF(1>2,2,3);\n -> 3\nMariaDB> SELECT IF(1<2,\'yes\',\'no\');\n -> \'yes\'\nMariaDB> SELECT IF(STRCMP(\'test\',\'test1\'),\'no\',\'yes\');\n -> \'no\'\n','https://mariadb.com/kb/en/if-function/'),(480,'ENUM',22,'ENUM(\'value1\',\'value2\',...) [CHARACTER SET charset_name] [COLLATE\ncollation_name]\n\nAn enumeration. A string object that can have only one value, chosen\nfrom the list of values \'value1\', \'value2\', ..., NULL or the special \'\'\nerror value. An ENUM column can have a maximum of 65,535 distinct\nvalues. ENUM values are represented internally as integers.\n\nURL: https://mariadb.com/kb/en/enum/\n\n','','https://mariadb.com/kb/en/enum/'),(481,'DATABASE',17,'Syntax:\nDATABASE()\n\nReturns the default (current) database name as a string in the utf8\ncharacter set. If there is no default database, DATABASE() returns\nNULL. Within a stored routine, the default database is the database\nthat the routine is associated with, which is not necessarily the same\nas the database that is the default in the calling context.\n\nURL: https://mariadb.com/kb/en/database/\n\n','MariaDB> SELECT DATABASE();\n -> \'test\'\n','https://mariadb.com/kb/en/database/'),(482,'POINTFROMWKB',32,'PointFromWKB(wkb[,srid])\n\nConstructs a POINT value using its WKB representation and SRID.\n\nURL: https://mariadb.com/kb/en/pointfromwkb/\n\n','','https://mariadb.com/kb/en/pointfromwkb/'),(483,'POWER',4,'Syntax:\nPOWER(X,Y)\n\nThis is a synonym for POW().\n\nURL: https://mariadb.com/kb/en/power/\n\n','','https://mariadb.com/kb/en/power/'),(484,'ATAN',4,'Syntax:\nATAN(X)\n\nReturns the arc tangent of X, that is, the value whose tangent is X.\n\nURL: https://mariadb.com/kb/en/atan/\n\n','MariaDB> SELECT ATAN(2);\n -> 1.1071487177941\nMariaDB> SELECT ATAN(-2);\n -> -1.1071487177941\n','https://mariadb.com/kb/en/atan/'),(485,'STRCMP',37,'Syntax:\nSTRCMP(expr1,expr2)\n\nSTRCMP() returns 0 if the strings are the same, -1 if the first\nargument is smaller than the second according to the current sort\norder, and 1 otherwise.\n\nURL: https://mariadb.com/kb/en/strcmp/\n\n','MariaDB> SELECT STRCMP(\'text\', \'text2\');\n -> -1\nMariaDB> SELECT STRCMP(\'text2\', \'text\');\n -> 1\nMariaDB> SELECT STRCMP(\'text\', \'text\');\n -> 0\n','https://mariadb.com/kb/en/strcmp/'),(486,'INSERT DELAYED',27,'Syntax:\nINSERT DELAYED ...\n\nThe DELAYED option for the INSERT statement is a MySQL extension to\nstandard SQL that is very useful if you have clients that cannot or\nneed not wait for the INSERT to complete. This is a common situation\nwhen you use MySQL for logging and you also periodically run SELECT and\nUPDATE statements that take a long time to complete.\n\nWhen a client uses INSERT DELAYED, it gets an okay from the server at\nonce, and the row is queued to be inserted when the table is not in use\nby any other thread.\n\nAnother major benefit of using INSERT DELAYED is that inserts from many\nclients are bundled together and written in one block. This is much\nfaster than performing many separate inserts.\n\nNote that INSERT DELAYED is slower than a normal INSERT if the table is\nnot otherwise in use. There is also the additional overhead for the\nserver to handle a separate thread for each table for which there are\ndelayed rows. This means that you should use INSERT DELAYED only when\nyou are really sure that you need it.\n\nThe queued rows are held only in memory until they are inserted into\nthe table. This means that if you terminate mysqld forcibly (for\nexample, with kill -9) or if mysqld dies unexpectedly, any queued rows\nthat have not been written to disk are lost.\n\nThere are some constraints on the use of DELAYED:\n\no INSERT DELAYED works only with MyISAM, MEMORY, ARCHIVE, and BLACKHOLE\n tables. For engines that do not support DELAYED, an error occurs.\n\no An error occurs for INSERT DELAYED if used with a table that has been\n locked with LOCK TABLES because the insert must be handled by a\n separate thread, not by the session that holds the lock.\n\no For MyISAM tables, if there are no free blocks in the middle of the\n data file, concurrent SELECT and INSERT statements are supported.\n Under these circumstances, you very seldom need to use INSERT DELAYED\n with MyISAM.\n\no INSERT DELAYED should be used only for INSERT statements that specify\n value lists. The server ignores DELAYED for INSERT ... SELECT or\n INSERT ... ON DUPLICATE KEY UPDATE statements.\n\no Because the INSERT DELAYED statement returns immediately, before the\n rows are inserted, you cannot use LAST_INSERT_ID() to get the\n AUTO_INCREMENT value that the statement might generate.\n\no DELAYED rows are not visible to SELECT statements until they actually\n have been inserted.\n\no Prior to MySQL 5.5.7, INSERT DELAYED was treated as a normal INSERT\n if the statement inserted multiple rows, binary logging was enabled,\n and the global logging format was statement-based (that is, whenever\n binlog_format was set to STATEMENT). Beginning with MySQL 5.5.7,\n INSERT DELAYED is always handled as a simple INSERT (that is, without\n the DELAYED option) whenever the value of binlog_format is STATEMENT\n or MIXED. (In the latter case, the statement no longer triggers a\n switch to row-based logging, and so is logged using the\n statement-based format.)\n\n This does not apply when using row-based binary logging mode\n (binlog_format set to ROW), in which INSERT DELAYED statements are\n always executed using the DELAYED option as specified, and logged as\n row-update events.\n\no DELAYED is ignored on slave replication servers, so that INSERT\n DELAYED is treated as a normal INSERT on slaves. This is because\n DELAYED could cause the slave to have different data than the master.\n\no Pending INSERT DELAYED statements are lost if a table is write locked\n and ALTER TABLE is used to modify the table structure.\n\no INSERT DELAYED is not supported for views.\n\no INSERT DELAYED is not supported for partitioned tables.\n\nURL: https://mariadb.com/kb/en/insert-delayed/\n\n','','https://mariadb.com/kb/en/insert-delayed/'),(487,'SHOW PROFILE',26,'Syntax:\nSHOW PROFILE [type [, type] ... ]\n [FOR QUERY n]\n [LIMIT row_count [OFFSET offset]]\n\ntype:\n ALL\n | BLOCK IO\n | CONTEXT SWITCHES\n | CPU\n | IPC\n | MEMORY\n | PAGE FAULTS\n | SOURCE\n | SWAPS\n\nThe SHOW PROFILE and SHOW PROFILES statements display profiling\ninformation that indicates resource usage for statements executed\nduring the course of the current session.\n\nProfiling is controlled by the profiling session variable, which has a\ndefault value of 0 (OFF). Profiling is enabled by setting profiling to\n1 or ON:\n\nMariaDB> SET profiling = 1;\n\nSHOW PROFILES displays a list of the most recent statements sent to the\nserver. The size of the list is controlled by the\nprofiling_history_size session variable, which has a default value of\n15. The maximum value is 100. Setting the value to 0 has the practical\neffect of disabling profiling.\n\nAll statements are profiled except SHOW PROFILE and SHOW PROFILES, so\nyou will find neither of those statements in the profile list.\nMalformed statements are profiled. For example, SHOW PROFILING is an\nillegal statement, and a syntax error occurs if you try to execute it,\nbut it will show up in the profiling list.\n\nSHOW PROFILE displays detailed information about a single statement.\nWithout the FOR QUERY n clause, the output pertains to the most\nrecently executed statement. If FOR QUERY n is included, SHOW PROFILE\ndisplays information for statement n. The values of n correspond to the\nQuery_ID values displayed by SHOW PROFILES.\n\nThe LIMIT row_count clause may be given to limit the output to\nrow_count rows. If LIMIT is given, OFFSET offset may be added to begin\nthe output offset rows into the full set of rows.\n\nBy default, SHOW PROFILE displays Status and Duration columns. The\nStatus values are like the State values displayed by SHOW PROCESSLIST,\nalthough there might be some minor differences in interpretion for the\ntwo statements for some status values (see\nhttp://dev.mysql.com/doc/refman/5.5/en/thread-information.html).\n\nOptional type values may be specified to display specific additional\ntypes of information:\n\no ALL displays all information\n\no BLOCK IO displays counts for block input and output operations\n\no CONTEXT SWITCHES displays counts for voluntary and involuntary\n context switches\n\no CPU displays user and system CPU usage times\n\no IPC displays counts for messages sent and received\n\no MEMORY is not currently implemented\n\no PAGE FAULTS displays counts for major and minor page faults\n\no SOURCE displays the names of functions from the source code, together\n with the name and line number of the file in which the function\n occurs\n\no SWAPS displays swap counts\n\nProfiling is enabled per session. When a session ends, its profiling\ninformation is lost.\n\nURL: https://mariadb.com/kb/en/show-profile/\n\n','MariaDB> SELECT @@profiling;\n+-------------+\n| @@profiling |\n+-------------+\n| 0 |\n+-------------+\n1 row in set (0.00 sec)\n\nMariaDB> SET profiling = 1;\nQuery OK, 0 rows affected (0.00 sec)\n\nMariaDB> DROP TABLE IF EXISTS t1;\nQuery OK, 0 rows affected, 1 warning (0.00 sec)\n\nMariaDB> CREATE TABLE T1 (id INT);\nQuery OK, 0 rows affected (0.01 sec)\n\nMariaDB> SHOW PROFILES;\n+----------+----------+--------------------------+\n| Query_ID | Duration | Query |\n+----------+----------+--------------------------+\n| 0 | 0.000088 | SET PROFILING = 1 |\n| 1 | 0.000136 | DROP TABLE IF EXISTS t1 |\n| 2 | 0.011947 | CREATE TABLE t1 (id INT) |\n+----------+----------+--------------------------+\n3 rows in set (0.00 sec)\n\nMariaDB> SHOW PROFILE;\n+----------------------+----------+\n| Status | Duration |\n+----------------------+----------+\n| checking permissions | 0.000040 |\n| creating table | 0.000056 |\n| After create | 0.011363 |\n| query end | 0.000375 |\n| freeing items | 0.000089 |\n| logging slow query | 0.000019 |\n| cleaning up | 0.000005 |\n+----------------------+----------+\n7 rows in set (0.00 sec)\n\nMariaDB> SHOW PROFILE FOR QUERY 1;\n+--------------------+----------+\n| Status | Duration |\n+--------------------+----------+\n| query end | 0.000107 |\n| freeing items | 0.000008 |\n| logging slow query | 0.000015 |\n| cleaning up | 0.000006 |\n+--------------------+----------+\n4 rows in set (0.00 sec)\n\nMariaDB> SHOW PROFILE CPU FOR QUERY 2;\n+----------------------+----------+----------+------------+\n| Status | Duration | CPU_user | CPU_system |\n+----------------------+----------+----------+------------+\n| checking permissions | 0.000040 | 0.000038 | 0.000002 |\n| creating table | 0.000056 | 0.000028 | 0.000028 |\n| After create | 0.011363 | 0.000217 | 0.001571 |\n| query end | 0.000375 | 0.000013 | 0.000028 |\n| freeing items | 0.000089 | 0.000010 | 0.000014 |\n| logging slow query | 0.000019 | 0.000009 | 0.000010 |\n| cleaning up | 0.000005 | 0.000003 | 0.000002 |\n+----------------------+----------+----------+------------+\n7 rows in set (0.00 sec)\n','https://mariadb.com/kb/en/show-profile/'),(488,'SHOW PROCEDURE CODE',26,'Syntax:\nSHOW PROCEDURE CODE proc_name\n\nThis statement is a MySQL extension that is available only for servers\nthat have been built with debugging support. It displays a\nrepresentation of the internal implementation of the named stored\nprocedure. A similar statement, SHOW FUNCTION CODE, displays\ninformation about stored functions (see [HELP SHOW FUNCTION CODE]).\n\nBoth statements require that you be the owner of the routine or have\nSELECT access to the mysql.proc table.\n\nIf the named routine is available, each statement produces a result\nset. Each row in the result set corresponds to one \"instruction\" in the\nroutine. The first column is Pos, which is an ordinal number beginning\nwith 0. The second column is Instruction, which contains an SQL\nstatement (usually changed from the original source), or a directive\nwhich has meaning only to the stored-routine handler.\n\nURL: https://mariadb.com/kb/en/show-procedure-code/\n\n','MariaDB> DELIMITER //\nMariaDB> CREATE PROCEDURE p1 ()\n -> BEGIN\n -> DECLARE fanta INT DEFAULT 55;\n -> DROP TABLE t2;\n -> LOOP\n -> INSERT INTO t3 VALUES (fanta);\n -> END LOOP;\n -> END//\nQuery OK, 0 rows affected (0.00 sec)\n\nMariaDB> SHOW PROCEDURE CODE p1//\n+-----+----------------------------------------+\n| Pos | Instruction |\n+-----+----------------------------------------+\n| 0 | set fanta@0 55 |\n| 1 | stmt 9 \"DROP TABLE t2\" |\n| 2 | stmt 5 \"INSERT INTO t3 VALUES (fanta)\" |\n| 3 | jump 2 |\n+-----+----------------------------------------+\n4 rows in set (0.00 sec)\n','https://mariadb.com/kb/en/show-procedure-code/'),(489,'MEDIUMTEXT',22,'MEDIUMTEXT [CHARACTER SET charset_name] [COLLATE collation_name]\n\nA TEXT column with a maximum length of 16,777,215 (224 - 1) characters.\nThe effective maximum length is less if the value contains multi-byte\ncharacters. Each MEDIUMTEXT value is stored using a 3-byte length\nprefix that indicates the number of bytes in the value.\n\nURL: https://mariadb.com/kb/en/mediumtext/\n\n','','https://mariadb.com/kb/en/mediumtext/'),(490,'LN',4,'Syntax:\nLN(X)\n\nReturns the natural logarithm of X; that is, the base-e logarithm of X.\nIf X is less than or equal to 0, then NULL is returned.\n\nURL: https://mariadb.com/kb/en/ln/\n\n','MariaDB> SELECT LN(2);\n -> 0.69314718055995\nMariaDB> SELECT LN(-2);\n -> NULL\n','https://mariadb.com/kb/en/ln/'),(491,'RETURN',23,'Syntax:\nRETURN expr\n\nThe RETURN statement terminates execution of a stored function and\nreturns the value expr to the function caller. There must be at least\none RETURN statement in a stored function. There may be more than one\nif the function has multiple exit points.\n\nThis statement is not used in stored procedures, triggers, or events.\nThe LEAVE statement can be used to exit a stored program of those\ntypes.\n\nURL: https://mariadb.com/kb/en/return/\n\n','','https://mariadb.com/kb/en/return/'),(492,'SHOW COLLATION',26,'Syntax:\nSHOW COLLATION\n [LIKE \'pattern\' | WHERE expr]\n\nThis statement lists collations supported by the server. By default,\nthe output from SHOW COLLATION includes all available collations. The\nLIKE clause, if present, indicates which collation names to match. The\nWHERE clause can be given to select rows using more general conditions,\nas discussed in\nhttps://mariadb.com/kb/en/extended-show/. For example:\n\nMariaDB> SHOW COLLATION LIKE \'latin1%\';\n+-------------------+---------+----+---------+----------+---------+\n| Collation | Charset | Id | Default | Compiled | Sortlen |\n+-------------------+---------+----+---------+----------+---------+\n| latin1_german1_ci | latin1 | 5 | | | 0 |\n| latin1_swedish_ci | latin1 | 8 | Yes | Yes | 0 |\n| latin1_danish_ci | latin1 | 15 | | | 0 |\n| latin1_german2_ci | latin1 | 31 | | Yes | 2 |\n| latin1_bin | latin1 | 47 | | Yes | 0 |\n| latin1_general_ci | latin1 | 48 | | | 0 |\n| latin1_general_cs | latin1 | 49 | | | 0 |\n| latin1_spanish_ci | latin1 | 94 | | | 0 |\n+-------------------+---------+----+---------+----------+---------+\n\nURL: https://mariadb.com/kb/en/show-collation/\n\n','','https://mariadb.com/kb/en/show-collation/'),(493,'LOG',4,'Syntax:\nLOG(X), LOG(B,X)\n\nIf called with one parameter, this function returns the natural\nlogarithm of X. If X is less than or equal to 0, then NULL is returned.\n\nThe inverse of this function (when called with a single argument) is\nthe EXP() function.\n\nURL: https://mariadb.com/kb/en/log/\n\n','MariaDB> SELECT LOG(2);\n -> 0.69314718055995\nMariaDB> SELECT LOG(-2);\n -> NULL\n','https://mariadb.com/kb/en/log/'),(494,'SET SQL_LOG_BIN',8,'Syntax:\nSET sql_log_bin = {0|1}\n\nThe sql_log_bin variable controls whether logging to the binary log is\ndone. The default value is 1 (do logging). To change logging for the\ncurrent session, change the session value of this variable. The session\nuser must have the SUPER privilege to set this variable.\n\nBeginning with MySQL 5.5.5, it is no longer possible to set\n@@session.sql_log_bin within a transaction or subquery. (Bug #53437)\n\nURL: https://mariadb.com/kb/en/set-sql_log_bin/\n\n','','https://mariadb.com/kb/en/set-sql_log_bin/'),(495,'!=',18,'Syntax:\n<>, !=\n\nNot equal:\n\nURL: https://mariadb.com/kb/en/not-equal/\n\n','MariaDB> SELECT \'.01\' <> \'0.01\';\n -> 1\nMariaDB> SELECT .01 <> \'0.01\';\n -> 0\nMariaDB> SELECT \'zapp\' <> \'zappp\';\n -> 1\n','https://mariadb.com/kb/en/not-equal/'),(496,'WHILE',23,'Syntax:\n[begin_label:] WHILE search_condition DO\n statement_list\nEND WHILE [end_label]\n\nThe statement list within a WHILE statement is repeated as long as the\nsearch_condition expression is true. statement_list consists of one or\nmore SQL statements, each terminated by a semicolon (;) statement\ndelimiter.\n\nA WHILE statement can be labeled. For the rules regarding label use,\nsee [HELP labels].\n\nURL: https://mariadb.com/kb/en/while/\n\n','CREATE PROCEDURE dowhile()\nBEGIN\n DECLARE v1 INT DEFAULT 5;\n\n WHILE v1 > 0 DO\n ...\n SET v1 = v1 - 1;\n END WHILE;\nEND;\n','https://mariadb.com/kb/en/while/'),(497,'AES_DECRYPT',12,'Syntax:\nAES_DECRYPT(crypt_str,key_str)\n\nThis function decrypts data using the official AES (Advanced Encryption\nStandard) algorithm. For more information, see the description of\nAES_ENCRYPT().\n\nURL: https://mariadb.com/kb/en/aes_decrypt/\n\n','','https://mariadb.com/kb/en/aes_decrypt/'),(498,'DAYNAME',31,'Syntax:\nDAYNAME(date)\n\nReturns the name of the weekday for date. The language used for the\nname is controlled by the value of the lc_time_names system variable\n(https://mariadb.com/kb/en/server-system-variables#lc_time_names).\n\nURL: https://mariadb.com/kb/en/dayname/\n\n','MariaDB> SELECT DAYNAME(\'2007-02-03\');\n -> \'Saturday\'\n','https://mariadb.com/kb/en/dayname/'),(499,'COERCIBILITY',17,'Syntax:\nCOERCIBILITY(str)\n\nReturns the collation coercibility value of the string argument.\n\nURL: https://mariadb.com/kb/en/coercibility/\n\n','MariaDB> SELECT COERCIBILITY(\'abc\' COLLATE latin1_swedish_ci);\n -> 0\nMariaDB> SELECT COERCIBILITY(USER());\n -> 3\nMariaDB> SELECT COERCIBILITY(\'abc\');\n -> 4\n','https://mariadb.com/kb/en/coercibility/'),(500,'INT',22,'INT[(M)] [UNSIGNED] [ZEROFILL]\n\nA normal-size integer. The signed range is -2147483648 to 2147483647.\nThe unsigned range is 0 to 4294967295.\n\nURL: https://mariadb.com/kb/en/int/\n\n','','https://mariadb.com/kb/en/int/'),(501,'GLENGTH',13,'GLength(ls)\n\nReturns as a double-precision number the length of the LineString value\nls in its associated spatial reference.\n\nURL: https://mariadb.com/kb/en/glength/\n\n','MariaDB> SET @ls = \'LineString(1 1,2 2,3 3)\';\nMariaDB> SELECT GLength(GeomFromText(@ls));\n+----------------------------+\n| GLength(GeomFromText(@ls)) |\n+----------------------------+\n| 2.8284271247462 |\n+----------------------------+\n','https://mariadb.com/kb/en/glength/'),(502,'RADIANS',4,'Syntax:\nRADIANS(X)\n\nReturns the argument X, converted from degrees to radians. (Note that\nπ radians equals 180 degrees.)\n\nURL: https://mariadb.com/kb/en/radians/\n\n','MariaDB> SELECT RADIANS(90);\n -> 1.5707963267949\n','https://mariadb.com/kb/en/radians/'),(503,'COLLATION',17,'Syntax:\nCOLLATION(str)\n\nReturns the collation of the string argument.\n\nURL: https://mariadb.com/kb/en/collation/\n\n','MariaDB> SELECT COLLATION(\'abc\');\n -> \'latin1_swedish_ci\'\nMariaDB> SELECT COLLATION(_utf8\'abc\');\n -> \'utf8_general_ci\'\n','https://mariadb.com/kb/en/collation/'),(504,'COALESCE',18,'Syntax:\nCOALESCE(value,...)\n\nReturns the first non-NULL value in the list, or NULL if there are no\nnon-NULL values.\n\nURL: https://mariadb.com/kb/en/coalesce/\n\n','MariaDB> SELECT COALESCE(NULL,1);\n -> 1\nMariaDB> SELECT COALESCE(NULL,NULL,NULL);\n -> NULL\n','https://mariadb.com/kb/en/coalesce/'),(505,'VERSION',17,'Syntax:\nVERSION()\n\nReturns a string that indicates the MySQL server version. The string\nuses the utf8 character set. The value might have a suffix in addition\nto the version number. See the description of the version system\nvariable in\nhttps://mariadb.com/kb/en/server-system-variables#version.\n\nURL: https://mariadb.com/kb/en/version/\n\n','MariaDB> SELECT VERSION();\n -> \'5.5.29-standard\'\n','https://mariadb.com/kb/en/version/'),(506,'MAKE_SET',37,'Syntax:\nMAKE_SET(bits,str1,str2,...)\n\nReturns a set value (a string containing substrings separated by \",\"\ncharacters) consisting of the strings that have the corresponding bit\nin bits set. str1 corresponds to bit 0, str2 to bit 1, and so on. NULL\nvalues in str1, str2, ... are not appended to the result.\n\nURL: https://mariadb.com/kb/en/make_set/\n\n','MariaDB> SELECT MAKE_SET(1,\'a\',\'b\',\'c\');\n -> \'a\'\nMariaDB> SELECT MAKE_SET(1 | 4,\'hello\',\'nice\',\'world\');\n -> \'hello,world\'\nMariaDB> SELECT MAKE_SET(1 | 4,\'hello\',\'nice\',NULL,\'world\');\n -> \'hello\'\nMariaDB> SELECT MAKE_SET(0,\'a\',\'b\',\'c\');\n -> \'\'\n','https://mariadb.com/kb/en/make_set/'),(507,'FIND_IN_SET',37,'Syntax:\nFIND_IN_SET(str,strlist)\n\nReturns a value in the range of 1 to N if the string str is in the\nstring list strlist consisting of N substrings. A string list is a\nstring composed of substrings separated by \",\" characters. If the first\nargument is a constant string and the second is a column of type SET,\nthe FIND_IN_SET() function is optimized to use bit arithmetic. Returns\n0 if str is not in strlist or if strlist is the empty string. Returns\nNULL if either argument is NULL. This function does not work properly\nif the first argument contains a comma (\",\") character.\n\nURL: https://mariadb.com/kb/en/find_in_set/\n\n','MariaDB> SELECT FIND_IN_SET(\'b\',\'a,b,c,d\');\n -> 2\n','https://mariadb.com/kb/en/find_in_set/');
+/*!40000 ALTER TABLE `help_topic` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `host`
+--
+
+DROP TABLE IF EXISTS `host`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `host` (
+ `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Db` char(64) COLLATE utf8_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',
+ `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',
+ `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',
+ `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',
+ `Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+ `Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+ PRIMARY KEY (`Host`,`Db`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Host privileges; Merged with database privileges';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `host`
+--
+
+LOCK TABLES `host` WRITE;
+/*!40000 ALTER TABLE `host` DISABLE KEYS */;
+/*!40000 ALTER TABLE `host` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `index_stats`
+--
+
+DROP TABLE IF EXISTS `index_stats`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `index_stats` (
+ `db_name` varchar(64) COLLATE utf8_bin NOT NULL,
+ `table_name` varchar(64) COLLATE utf8_bin NOT NULL,
+ `index_name` varchar(64) COLLATE utf8_bin NOT NULL,
+ `prefix_arity` int(11) unsigned NOT NULL,
+ `avg_frequency` decimal(12,4) DEFAULT NULL,
+ PRIMARY KEY (`db_name`,`table_name`,`index_name`,`prefix_arity`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Statistics on Indexes';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `index_stats`
+--
+
+LOCK TABLES `index_stats` WRITE;
+/*!40000 ALTER TABLE `index_stats` DISABLE KEYS */;
+/*!40000 ALTER TABLE `index_stats` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `innodb_index_stats`
+--
+
+DROP TABLE IF EXISTS `innodb_index_stats`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `innodb_index_stats` (
+ `database_name` varchar(64) COLLATE utf8_bin NOT NULL,
+ `table_name` varchar(199) COLLATE utf8_bin NOT NULL,
+ `index_name` varchar(64) COLLATE utf8_bin NOT NULL,
+ `last_update` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
+ `stat_name` varchar(64) COLLATE utf8_bin NOT NULL,
+ `stat_value` bigint(20) unsigned NOT NULL,
+ `sample_size` bigint(20) unsigned DEFAULT NULL,
+ `stat_description` varchar(1024) COLLATE utf8_bin NOT NULL,
+ PRIMARY KEY (`database_name`,`table_name`,`index_name`,`stat_name`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin STATS_PERSISTENT=0;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `innodb_index_stats`
+--
+
+LOCK TABLES `innodb_index_stats` WRITE;
+/*!40000 ALTER TABLE `innodb_index_stats` DISABLE KEYS */;
+INSERT INTO `innodb_index_stats` VALUES ('mysql','gtid_slave_pos','PRIMARY','2020-05-31 16:16:25','n_diff_pfx01',0,1,'domain_id'),('mysql','gtid_slave_pos','PRIMARY','2020-05-31 16:16:25','n_diff_pfx02',0,1,'domain_id,sub_id'),('mysql','gtid_slave_pos','PRIMARY','2020-05-31 16:16:25','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('mysql','gtid_slave_pos','PRIMARY','2020-05-31 16:16:25','size',1,NULL,'Number of pages in the index');
+/*!40000 ALTER TABLE `innodb_index_stats` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `innodb_table_stats`
+--
+
+DROP TABLE IF EXISTS `innodb_table_stats`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `innodb_table_stats` (
+ `database_name` varchar(64) COLLATE utf8_bin NOT NULL,
+ `table_name` varchar(199) COLLATE utf8_bin NOT NULL,
+ `last_update` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
+ `n_rows` bigint(20) unsigned NOT NULL,
+ `clustered_index_size` bigint(20) unsigned NOT NULL,
+ `sum_of_other_index_sizes` bigint(20) unsigned NOT NULL,
+ PRIMARY KEY (`database_name`,`table_name`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin STATS_PERSISTENT=0;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `innodb_table_stats`
+--
+
+LOCK TABLES `innodb_table_stats` WRITE;
+/*!40000 ALTER TABLE `innodb_table_stats` DISABLE KEYS */;
+INSERT INTO `innodb_table_stats` VALUES ('mysql','gtid_slave_pos','2020-05-31 16:16:25',0,1,0);
+/*!40000 ALTER TABLE `innodb_table_stats` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `plugin`
+--
+
+DROP TABLE IF EXISTS `plugin`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `plugin` (
+ `name` varchar(64) NOT NULL DEFAULT '',
+ `dl` varchar(128) NOT NULL DEFAULT '',
+ PRIMARY KEY (`name`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='MySQL plugins';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `plugin`
+--
+
+LOCK TABLES `plugin` WRITE;
+/*!40000 ALTER TABLE `plugin` DISABLE KEYS */;
+/*!40000 ALTER TABLE `plugin` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `proc`
+--
+
+DROP TABLE IF EXISTS `proc`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `proc` (
+ `db` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
+ `name` char(64) NOT NULL DEFAULT '',
+ `type` enum('FUNCTION','PROCEDURE','PACKAGE','PACKAGE BODY') NOT NULL,
+ `specific_name` char(64) NOT NULL DEFAULT '',
+ `language` enum('SQL') NOT NULL DEFAULT 'SQL',
+ `sql_data_access` enum('CONTAINS_SQL','NO_SQL','READS_SQL_DATA','MODIFIES_SQL_DATA') NOT NULL DEFAULT 'CONTAINS_SQL',
+ `is_deterministic` enum('YES','NO') NOT NULL DEFAULT 'NO',
+ `security_type` enum('INVOKER','DEFINER') NOT NULL DEFAULT 'DEFINER',
+ `param_list` blob NOT NULL,
+ `returns` longblob NOT NULL,
+ `body` longblob NOT NULL,
+ `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 '',
+ `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,
+ `db_collation` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
+ `body_utf8` longblob DEFAULT NULL,
+ `aggregate` enum('NONE','GROUP') NOT NULL DEFAULT 'NONE',
+ PRIMARY KEY (`db`,`name`,`type`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Stored Procedures';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `proc`
+--
+
+LOCK TABLES `proc` WRITE;
+/*!40000 ALTER TABLE `proc` DISABLE KEYS */;
+INSERT INTO `proc` VALUES ('mysql','AddGeometryColumn','PROCEDURE','AddGeometryColumn','SQL','CONTAINS_SQL','NO','INVOKER','catalog varchar(64), t_schema varchar(64),\n t_name varchar(64), geometry_column varchar(64), t_srid int','','begin\n set @qwe= concat(\'ALTER TABLE \', t_schema, \'.\', t_name, \' ADD \', geometry_column,\' GEOMETRY REF_SYSTEM_ID=\', t_srid); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end','root@localhost','2020-05-31 16:16:25','2020-05-31 16:16:25','','','utf8','utf8_general_ci','latin1_swedish_ci','begin\n set @qwe= concat(\'ALTER TABLE \', t_schema, \'.\', t_name, \' ADD \', geometry_column,\' GEOMETRY REF_SYSTEM_ID=\', t_srid); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end','NONE'),('mysql','DropGeometryColumn','PROCEDURE','DropGeometryColumn','SQL','CONTAINS_SQL','NO','INVOKER','catalog varchar(64), t_schema varchar(64),\n t_name varchar(64), geometry_column varchar(64)','','begin\n set @qwe= concat(\'ALTER TABLE \', t_schema, \'.\', t_name, \' DROP \', geometry_column); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end','root@localhost','2020-05-31 16:16:25','2020-05-31 16:16:25','','','utf8','utf8_general_ci','latin1_swedish_ci','begin\n set @qwe= concat(\'ALTER TABLE \', t_schema, \'.\', t_name, \' DROP \', geometry_column); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end','NONE');
+/*!40000 ALTER TABLE `proc` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `procs_priv`
+--
+
+DROP TABLE IF EXISTS `procs_priv`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `procs_priv` (
+ `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Routine_name` char(64) CHARACTER SET utf8 NOT NULL DEFAULT '',
+ `Routine_type` enum('FUNCTION','PROCEDURE','PACKAGE','PACKAGE BODY') COLLATE utf8_bin NOT NULL,
+ `Grantor` char(141) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Proc_priv` set('Execute','Alter Routine','Grant') CHARACTER SET utf8 NOT NULL DEFAULT '',
+ `Timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
+ PRIMARY KEY (`Host`,`Db`,`User`,`Routine_name`,`Routine_type`),
+ KEY `Grantor` (`Grantor`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Procedure privileges';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `procs_priv`
+--
+
+LOCK TABLES `procs_priv` WRITE;
+/*!40000 ALTER TABLE `procs_priv` DISABLE KEYS */;
+/*!40000 ALTER TABLE `procs_priv` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `proxies_priv`
+--
+
+DROP TABLE IF EXISTS `proxies_priv`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `proxies_priv` (
+ `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Proxied_host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Proxied_user` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `With_grant` tinyint(1) NOT NULL DEFAULT 0,
+ `Grantor` char(141) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
+ PRIMARY KEY (`Host`,`User`,`Proxied_host`,`Proxied_user`),
+ KEY `Grantor` (`Grantor`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='User proxy privileges';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `proxies_priv`
+--
+
+LOCK TABLES `proxies_priv` WRITE;
+/*!40000 ALTER TABLE `proxies_priv` DISABLE KEYS */;
+INSERT INTO `proxies_priv` VALUES ('localhost','root','','',1,'','2020-05-31 16:16:25'),('asus','root','','',1,'','2020-05-31 16:16:25');
+/*!40000 ALTER TABLE `proxies_priv` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `roles_mapping`
+--
+
+DROP TABLE IF EXISTS `roles_mapping`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `roles_mapping` (
+ `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Role` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Admin_option` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+ UNIQUE KEY `Host` (`Host`,`User`,`Role`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Granted roles';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `roles_mapping`
+--
+
+LOCK TABLES `roles_mapping` WRITE;
+/*!40000 ALTER TABLE `roles_mapping` DISABLE KEYS */;
+/*!40000 ALTER TABLE `roles_mapping` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `servers`
+--
+
+DROP TABLE IF EXISTS `servers`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `servers` (
+ `Server_name` char(64) NOT NULL DEFAULT '',
+ `Host` varchar(2048) NOT NULL DEFAULT '',
+ `Db` char(64) NOT NULL DEFAULT '',
+ `Username` char(80) NOT NULL DEFAULT '',
+ `Password` char(64) NOT NULL DEFAULT '',
+ `Port` int(4) NOT NULL DEFAULT 0,
+ `Socket` char(64) NOT NULL DEFAULT '',
+ `Wrapper` char(64) NOT NULL DEFAULT '',
+ `Owner` varchar(512) NOT NULL DEFAULT '',
+ PRIMARY KEY (`Server_name`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='MySQL Foreign Servers table';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `servers`
+--
+
+LOCK TABLES `servers` WRITE;
+/*!40000 ALTER TABLE `servers` DISABLE KEYS */;
+/*!40000 ALTER TABLE `servers` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `table_stats`
+--
+
+DROP TABLE IF EXISTS `table_stats`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `table_stats` (
+ `db_name` varchar(64) COLLATE utf8_bin NOT NULL,
+ `table_name` varchar(64) COLLATE utf8_bin NOT NULL,
+ `cardinality` bigint(21) unsigned DEFAULT NULL,
+ PRIMARY KEY (`db_name`,`table_name`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Statistics on Tables';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `table_stats`
+--
+
+LOCK TABLES `table_stats` WRITE;
+/*!40000 ALTER TABLE `table_stats` DISABLE KEYS */;
+/*!40000 ALTER TABLE `table_stats` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `tables_priv`
+--
+
+DROP TABLE IF EXISTS `tables_priv`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `tables_priv` (
+ `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Grantor` char(141) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
+ `Table_priv` set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger','Delete versioning rows') CHARACTER SET utf8 NOT NULL DEFAULT '',
+ `Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '',
+ PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`),
+ KEY `Grantor` (`Grantor`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Table privileges';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `tables_priv`
+--
+
+LOCK TABLES `tables_priv` WRITE;
+/*!40000 ALTER TABLE `tables_priv` DISABLE KEYS */;
+/*!40000 ALTER TABLE `tables_priv` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `time_zone`
+--
+
+DROP TABLE IF EXISTS `time_zone`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `time_zone` (
+ `Time_zone_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `Use_leap_seconds` enum('Y','N') NOT NULL DEFAULT 'N',
+ PRIMARY KEY (`Time_zone_id`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Time zones';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `time_zone`
+--
+
+LOCK TABLES `time_zone` WRITE;
+/*!40000 ALTER TABLE `time_zone` DISABLE KEYS */;
+/*!40000 ALTER TABLE `time_zone` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `time_zone_leap_second`
+--
+
+DROP TABLE IF EXISTS `time_zone_leap_second`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `time_zone_leap_second` (
+ `Transition_time` bigint(20) NOT NULL,
+ `Correction` int(11) NOT NULL,
+ PRIMARY KEY (`Transition_time`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Leap seconds information for time zones';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `time_zone_leap_second`
+--
+
+LOCK TABLES `time_zone_leap_second` WRITE;
+/*!40000 ALTER TABLE `time_zone_leap_second` DISABLE KEYS */;
+/*!40000 ALTER TABLE `time_zone_leap_second` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `time_zone_name`
+--
+
+DROP TABLE IF EXISTS `time_zone_name`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `time_zone_name` (
+ `Name` char(64) NOT NULL,
+ `Time_zone_id` int(10) unsigned NOT NULL,
+ PRIMARY KEY (`Name`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Time zone names';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `time_zone_name`
+--
+
+LOCK TABLES `time_zone_name` WRITE;
+/*!40000 ALTER TABLE `time_zone_name` DISABLE KEYS */;
+/*!40000 ALTER TABLE `time_zone_name` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `time_zone_transition`
+--
+
+DROP TABLE IF EXISTS `time_zone_transition`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `time_zone_transition` (
+ `Time_zone_id` int(10) unsigned NOT NULL,
+ `Transition_time` bigint(20) NOT NULL,
+ `Transition_type_id` int(10) unsigned NOT NULL,
+ PRIMARY KEY (`Time_zone_id`,`Transition_time`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Time zone transitions';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `time_zone_transition`
+--
+
+LOCK TABLES `time_zone_transition` WRITE;
+/*!40000 ALTER TABLE `time_zone_transition` DISABLE KEYS */;
+/*!40000 ALTER TABLE `time_zone_transition` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `time_zone_transition_type`
+--
+
+DROP TABLE IF EXISTS `time_zone_transition_type`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `time_zone_transition_type` (
+ `Time_zone_id` int(10) unsigned NOT NULL,
+ `Transition_type_id` int(10) unsigned NOT NULL,
+ `Offset` int(11) NOT NULL DEFAULT 0,
+ `Is_DST` tinyint(3) unsigned NOT NULL DEFAULT 0,
+ `Abbreviation` char(8) NOT NULL DEFAULT '',
+ PRIMARY KEY (`Time_zone_id`,`Transition_type_id`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Time zone transition types';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `time_zone_transition_type`
+--
+
+LOCK TABLES `time_zone_transition_type` WRITE;
+/*!40000 ALTER TABLE `time_zone_transition_type` DISABLE KEYS */;
+/*!40000 ALTER TABLE `time_zone_transition_type` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `user`
+--
+
+DROP TABLE IF EXISTS `user`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+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=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Users and global privileges';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `user`
+--
+
+LOCK TABLES `user` WRITE;
+/*!40000 ALTER TABLE `user` DISABLE KEYS */;
+INSERT INTO `user` VALUES ('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),('asus','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),('127.0.0.1','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),('::1','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),('localhost','','','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,'','','N','N','',0.000000),('asus','','','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,'','','N','N','',0.000000);
+/*!40000 ALTER TABLE `user` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `general_log`
+--
+
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE IF NOT EXISTS `general_log` (
+ `event_time` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
+ `user_host` mediumtext NOT NULL,
+ `thread_id` bigint(21) unsigned NOT NULL,
+ `server_id` int(10) unsigned NOT NULL,
+ `command_type` varchar(64) NOT NULL,
+ `argument` mediumtext NOT NULL
+) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='General log';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `slow_log`
+--
+
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE IF NOT EXISTS `slow_log` (
+ `start_time` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
+ `user_host` mediumtext NOT NULL,
+ `query_time` time(6) NOT NULL,
+ `lock_time` time(6) NOT NULL,
+ `rows_sent` int(11) NOT NULL,
+ `rows_examined` int(11) NOT NULL,
+ `db` varchar(512) NOT NULL,
+ `last_insert_id` int(11) NOT NULL,
+ `insert_id` int(11) NOT NULL,
+ `server_id` int(10) unsigned NOT NULL,
+ `sql_text` mediumtext NOT NULL,
+ `thread_id` bigint(21) unsigned NOT NULL,
+ `rows_affected` int(11) NOT NULL
+) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `transaction_registry`
+--
+
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE IF NOT EXISTS `transaction_registry` (
+ `transaction_id` bigint(20) unsigned NOT NULL,
+ `commit_id` bigint(20) unsigned NOT NULL,
+ `begin_timestamp` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000',
+ `commit_timestamp` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000',
+ `isolation_level` enum('READ-UNCOMMITTED','READ-COMMITTED','REPEATABLE-READ','SERIALIZABLE') COLLATE utf8_bin NOT NULL,
+ PRIMARY KEY (`transaction_id`),
+ UNIQUE KEY `commit_id` (`commit_id`),
+ KEY `begin_timestamp` (`begin_timestamp`),
+ KEY `commit_timestamp` (`commit_timestamp`,`transaction_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin STATS_PERSISTENT=0;
+/*!40101 SET character_set_client = @saved_cs_client */;
+/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
+
+/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
+/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
+/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
+/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
+/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
+/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
+/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
+
+-- Dump completed on 2020-05-31 19:16:46
diff --git a/mysql-test/std_data/mysql_database_10.4.dump b/mysql-test/std_data/mysql_database_10.4.dump
new file mode 100644
index 00000000000..f396f4ebf76
--- /dev/null
+++ b/mysql-test/std_data/mysql_database_10.4.dump
@@ -0,0 +1,923 @@
+-- MariaDB dump 10.17 Distrib 10.4.13-MariaDB, for Linux (x86_64)
+--
+-- Host: localhost Database: mysql
+-- ------------------------------------------------------
+-- Server version 10.4.13-MariaDB
+
+/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
+/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
+/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
+/*!40101 SET NAMES utf8mb4 */;
+/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
+/*!40103 SET TIME_ZONE='+00:00' */;
+/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
+/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
+/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
+/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
+
+--
+-- Table structure for table `column_stats`
+--
+
+DROP TABLE IF EXISTS `column_stats`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `column_stats` (
+ `db_name` varchar(64) COLLATE utf8_bin NOT NULL,
+ `table_name` varchar(64) COLLATE utf8_bin NOT NULL,
+ `column_name` varchar(64) COLLATE utf8_bin NOT NULL,
+ `min_value` varbinary(255) DEFAULT NULL,
+ `max_value` varbinary(255) DEFAULT NULL,
+ `nulls_ratio` decimal(12,4) DEFAULT NULL,
+ `avg_length` decimal(12,4) DEFAULT NULL,
+ `avg_frequency` decimal(12,4) DEFAULT NULL,
+ `hist_size` tinyint(3) unsigned DEFAULT NULL,
+ `hist_type` enum('SINGLE_PREC_HB','DOUBLE_PREC_HB') COLLATE utf8_bin DEFAULT NULL,
+ `histogram` varbinary(255) DEFAULT NULL,
+ PRIMARY KEY (`db_name`,`table_name`,`column_name`)
+) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=0 COMMENT='Statistics on Columns';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `column_stats`
+--
+
+LOCK TABLES `column_stats` WRITE;
+/*!40000 ALTER TABLE `column_stats` DISABLE KEYS */;
+/*!40000 ALTER TABLE `column_stats` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `columns_priv`
+--
+
+DROP TABLE IF EXISTS `columns_priv`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `columns_priv` (
+ `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Column_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
+ `Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '',
+ PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`,`Column_name`)
+) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Column privileges';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `columns_priv`
+--
+
+LOCK TABLES `columns_priv` WRITE;
+/*!40000 ALTER TABLE `columns_priv` DISABLE KEYS */;
+/*!40000 ALTER TABLE `columns_priv` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `db`
+--
+
+DROP TABLE IF EXISTS `db`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `db` (
+ `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `User` char(80) COLLATE utf8_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',
+ `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',
+ `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',
+ `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',
+ `Execute_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',
+ `Delete_history_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+ PRIMARY KEY (`Host`,`Db`,`User`),
+ KEY `User` (`User`)
+) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Database privileges';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `db`
+--
+
+LOCK TABLES `db` WRITE;
+/*!40000 ALTER TABLE `db` DISABLE KEYS */;
+INSERT INTO `db` VALUES ('%','test','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N','Y','Y','Y'),('%','test\\_%','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N','Y','Y','Y');
+/*!40000 ALTER TABLE `db` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `event`
+--
+
+DROP TABLE IF EXISTS `event`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `event` (
+ `db` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
+ `name` char(64) NOT NULL DEFAULT '',
+ `body` longblob NOT NULL,
+ `definer` char(141) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
+ `execute_at` datetime DEFAULT NULL,
+ `interval_value` int(11) DEFAULT NULL,
+ `interval_field` enum('YEAR','QUARTER','MONTH','DAY','HOUR','MINUTE','WEEK','SECOND','MICROSECOND','YEAR_MONTH','DAY_HOUR','DAY_MINUTE','DAY_SECOND','HOUR_MINUTE','HOUR_SECOND','MINUTE_SECOND','DAY_MICROSECOND','HOUR_MICROSECOND','MINUTE_MICROSECOND','SECOND_MICROSECOND') DEFAULT NULL,
+ `created` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
+ `modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `last_executed` datetime DEFAULT NULL,
+ `starts` datetime DEFAULT NULL,
+ `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','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',
+ `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,
+ `db_collation` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
+ `body_utf8` longblob DEFAULT NULL,
+ PRIMARY KEY (`db`,`name`)
+) ENGINE=Aria DEFAULT CHARSET=utf8 PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Events';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `func`
+--
+
+DROP TABLE IF EXISTS `func`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `func` (
+ `name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `ret` tinyint(1) NOT NULL DEFAULT 0,
+ `dl` char(128) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `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';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `func`
+--
+
+LOCK TABLES `func` WRITE;
+/*!40000 ALTER TABLE `func` DISABLE KEYS */;
+/*!40000 ALTER TABLE `func` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `global_priv`
+--
+
+DROP TABLE IF EXISTS `global_priv`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+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';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `global_priv`
+--
+
+LOCK TABLES `global_priv` WRITE;
+/*!40000 ALTER TABLE `global_priv` DISABLE KEYS */;
+INSERT INTO `global_priv` VALUES ('localhost','mariadb.sys','{\"access\":0,\"plugin\":\"mysql_native_password\",\"authentication_string\":\"\",\"account_locked\":true,\"password_last_changed\":0}'),('localhost','root','{\"access\":18446744073709551615,\"plugin\":\"mysql_native_password\",\"authentication_string\":\"\",\"auth_or\":[{},{\"plugin\":\"unix_socket\"}],\"password_last_changed\":1590943617}'),('localhost','','{}'),('asus','','{}');
+/*!40000 ALTER TABLE `global_priv` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `gtid_slave_pos`
+--
+
+DROP TABLE IF EXISTS `gtid_slave_pos`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `gtid_slave_pos` (
+ `domain_id` int(10) unsigned NOT NULL,
+ `sub_id` bigint(20) unsigned NOT NULL,
+ `server_id` int(10) unsigned NOT NULL,
+ `seq_no` bigint(20) unsigned NOT NULL,
+ PRIMARY KEY (`domain_id`,`sub_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Replication slave GTID position';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `gtid_slave_pos`
+--
+
+LOCK TABLES `gtid_slave_pos` WRITE;
+/*!40000 ALTER TABLE `gtid_slave_pos` DISABLE KEYS */;
+/*!40000 ALTER TABLE `gtid_slave_pos` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `help_category`
+--
+
+DROP TABLE IF EXISTS `help_category`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `help_category` (
+ `help_category_id` smallint(5) unsigned NOT NULL,
+ `name` char(64) NOT NULL,
+ `parent_category_id` smallint(5) unsigned DEFAULT NULL,
+ `url` text NOT NULL,
+ PRIMARY KEY (`help_category_id`),
+ UNIQUE KEY `name` (`name`)
+) ENGINE=Aria DEFAULT CHARSET=utf8 PAGE_CHECKSUM=1 TRANSACTIONAL=0 COMMENT='help categories';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `help_category`
+--
+
+LOCK TABLES `help_category` WRITE;
+/*!40000 ALTER TABLE `help_category` DISABLE KEYS */;
+INSERT INTO `help_category` VALUES (1,'Geographic',0,''),(2,'Polygon Properties',34,''),(3,'WKT',34,''),(4,'Numeric Functions',38,''),(5,'Plugins',35,''),(6,'MBR',34,''),(7,'Control Flow Functions',38,''),(8,'Transactions',35,''),(9,'Help Metadata',35,''),(10,'Account Management',35,''),(11,'Point Properties',34,''),(12,'Encryption Functions',38,''),(13,'LineString Properties',34,''),(14,'Miscellaneous Functions',38,''),(15,'Logical Operators',38,''),(16,'Functions and Modifiers for Use with GROUP BY',35,''),(17,'Information Functions',38,''),(18,'Comparison Operators',38,''),(19,'Bit Functions',38,''),(20,'Table Maintenance',35,''),(21,'User-Defined Functions',35,''),(22,'Data Types',35,''),(23,'Compound Statements',35,''),(24,'Geometry Constructors',34,''),(25,'GeometryCollection Properties',1,''),(26,'Administration',35,''),(27,'Data Manipulation',35,''),(28,'Utility',35,''),(29,'Language Structure',35,''),(30,'Geometry Relations',34,''),(31,'Date and Time Functions',38,''),(32,'WKB',34,''),(33,'Procedures',35,''),(34,'Geographic Features',35,''),(35,'Contents',0,''),(36,'Geometry Properties',34,''),(37,'String Functions',38,''),(38,'Functions',35,''),(39,'Data Definition',35,''),(40,'Sequences',35,''),(41,'JSON Functions',38,''),(42,'Window Functions',38,''),(43,'Spider Functions',38,''),(44,'Dynamic Column Functions',38,''),(45,'Storage Engines',35,''),(46,'InnoDB',45,''),(47,'Optimization and Indexes',35,''),(48,'Full-text Indexes',47,'');
+/*!40000 ALTER TABLE `help_category` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `help_keyword`
+--
+
+DROP TABLE IF EXISTS `help_keyword`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `help_keyword` (
+ `help_keyword_id` int(10) unsigned NOT NULL,
+ `name` char(64) NOT NULL,
+ PRIMARY KEY (`help_keyword_id`),
+ UNIQUE KEY `name` (`name`)
+) ENGINE=Aria DEFAULT CHARSET=utf8 PAGE_CHECKSUM=1 TRANSACTIONAL=0 COMMENT='help keywords';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `help_keyword`
+--
+
+LOCK TABLES `help_keyword` WRITE;
+/*!40000 ALTER TABLE `help_keyword` DISABLE KEYS */;
+INSERT INTO `help_keyword` VALUES (1,'account'),(2,'aggregate'),(3,'add'),(4,'after'),(5,'alter'),(6,'completion'),(7,'schedule'),(8,'server'),(9,'columns'),(10,'drop'),(11,'analyze'),(12,'json'),(13,'value'),(14,'master_ssl_ca'),(15,'master_ssl_verify_cert'),(16,'nchar'),(17,'action'),(18,'create'),(19,'at'),(20,'starts'),(21,'returns'),(22,'host'),(23,'row_format'),(24,'deallocate prepare'),(25,'drop prepare'),(26,'against'),(27,'fulltext'),(28,'escape'),(29,'mode'),(30,'repeat'),(31,'sql_big_result'),(32,'isolation'),(33,'read committed'),(34,'read uncommitted'),(35,'repeatable read'),(36,'serializable'),(37,'work');
+/*!40000 ALTER TABLE `help_keyword` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `help_relation`
+--
+
+DROP TABLE IF EXISTS `help_relation`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `help_relation` (
+ `help_topic_id` int(10) unsigned NOT NULL,
+ `help_keyword_id` int(10) unsigned NOT NULL,
+ PRIMARY KEY (`help_keyword_id`,`help_topic_id`)
+) ENGINE=Aria DEFAULT CHARSET=utf8 PAGE_CHECKSUM=1 TRANSACTIONAL=0 COMMENT='keyword-topic relation';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `help_relation`
+--
+
+LOCK TABLES `help_relation` WRITE;
+/*!40000 ALTER TABLE `help_relation` DISABLE KEYS */;
+INSERT INTO `help_relation` VALUES (116,1),(118,1),(119,1),(183,2),(184,2),(185,2),(186,2),(187,2),(188,2),(189,2),(190,2),(191,2),(192,2),(193,2),(194,2),(196,2),(197,2),(199,2),(258,2),(724,2),(652,3),(751,3),(652,4),(119,5),(645,5),(646,5),(647,5),(648,5),(649,5),(650,5),(652,5),(653,5),(654,5),(646,6),(657,6),(646,7),(657,7),(651,8),(357,9),(652,9),(665,9),(97,10),(120,10),(259,10),(652,10),(669,10),(670,10),(671,10),(672,10),(673,10),(674,10),(675,10),(676,10),(677,10),(678,10),(680,10),(681,10),(251,11),(444,11),(446,11),(447,11),(280,12),(447,12),(448,12),(449,12),(264,13),(317,13),(320,13),(419,13),(435,13),(95,14),(95,15),(271,16),(655,17),(665,17),(118,18),(127,18),(258,18),(656,18),(657,18),(658,18),(659,18),(660,18),(661,18),(662,18),(663,18),(664,18),(665,18),(666,18),(667,18),(668,18),(657,19),(657,20),(258,21),(664,22),(665,23),(97,24),(97,25),(614,26),(752,26),(752,27),(753,27),(607,28),(436,29),(614,29),(316,30),(625,30),(436,31),(108,32),(108,33),(108,34),(108,35),(108,36),(110,37);
+/*!40000 ALTER TABLE `help_relation` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `help_topic`
+--
+
+DROP TABLE IF EXISTS `help_topic`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `help_topic` (
+ `help_topic_id` int(10) unsigned NOT NULL,
+ `name` char(64) NOT NULL,
+ `help_category_id` smallint(5) unsigned NOT NULL,
+ `description` text NOT NULL,
+ `example` text NOT NULL,
+ `url` text NOT NULL,
+ PRIMARY KEY (`help_topic_id`),
+ UNIQUE KEY `name` (`name`)
+) ENGINE=Aria DEFAULT CHARSET=utf8 PAGE_CHECKSUM=1 TRANSACTIONAL=0 COMMENT='help topics';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `help_topic`
+--
+
+LOCK TABLES `help_topic` WRITE;
+/*!40000 ALTER TABLE `help_topic` DISABLE KEYS */;
+INSERT INTO `help_topic` VALUES (1,'HELP_DATE',9,'This help information was generated from the MariaDB Knowledge Base\non 2 September 2019.','',''),(2,'AREA',2,'A synonym for ST_AREA.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/polygon-properties-area/','','https://mariadb.com/kb/en/polygon-properties-area/'),(3,'CENTROID',2,'A synonym for ST_CENTROID.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/centroid/','','https://mariadb.com/kb/en/centroid/'),(4,'ExteriorRing',2,'A synonym for ST_ExteriorRing.\n \n\n \n \n \n \n \n \n \n\nURL:\nhttps://mariadb.com/kb/en/polygon-properties-exteriorring/','','https://mariadb.com/kb/en/polygon-properties-exteriorring/'),(5,'InteriorRingN',2,'A synonym for ST_InteriorRingN.\n \n\n \n \n \n \n \n \n \n\nURL:\nhttps://mariadb.com/kb/en/polygon-properties-interiorringn/','','https://mariadb.com/kb/en/polygon-properties-interiorringn/'),(6,'NumInteriorRings',2,'A synonym for ST_NumInteriorRings.\n \n\n \n \n \n \n \n \n \n\nURL:\nhttps://mariadb.com/kb/en/polygon-properties-numinteriorrings/','','https://mariadb.com/kb/en/polygon-properties-numinteriorrings/'),(7,'ST_AREA',2,'Syntax\n------ \nST_Area(poly)\nArea(poly)\n \nDescription\n----------- \nReturns as a double-precision number the area of the Polygon\nvalue poly, as measured in its spatial reference system.\n \nST_Area() and Area() are synonyms.\n \nExamples\n-------- \nSET @poly = \'Polygon((0 0,0 3,3 0,0 0),(1 1,1 2,2 1,1\n1))\';\n \nSELECT Area(GeomFromText(@poly));\n+---------------------------+\n| Area(GeomFromText(@poly)) |\n+---------------------------+\n| 4 |\n+---------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_area/','','https://mariadb.com/kb/en/st_area/'),(8,'ST_CENTROID',2,'Syntax\n------ \nST_Centroid(mpoly)\nCentroid(mpoly)\n \nDescription\n----------- \nReturns a point reflecting the mathematical centroid\n(geometric center) for the MultiPolygon mpoly. The resulting\npoint will not necessarily be on the MultiPolygon. \n \nST_Centroid() and Centroid() are synonyms.\n \nExamples\n-------- \nSET @poly = ST_GeomFromText(\'POLYGON((0 0,20 0,20 20,0 20,0\n0))\');\nSELECT ST_AsText(ST_Centroid(@poly)) AS center;\n \n+--------------+\n| center |\n+--------------+\n| POINT(10 10) |\n+--------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_centroid/','','https://mariadb.com/kb/en/st_centroid/'),(9,'ST_ExteriorRing',2,'Syntax\n------ \nST_ExteriorRing(poly)\nExteriorRing(poly)\n \nDescription\n----------- \nReturns the exterior ring of the Polygon value poly as a\nLineString.\n \nST_ExteriorRing() and ExteriorRing() are synonyms.\n \nExamples\n-------- \nSET @poly = \'Polygon((0 0,0 3,3 3,3 0,0 0),(1 1,1 2,2 2,2\n1,1 1))\';\n \nSELECT AsText(ExteriorRing(GeomFromText(@poly)));\n+-------------------------------------------+\n| AsText(ExteriorRing(GeomFromText(@poly))) |\n+-------------------------------------------+\n| LINESTRING(0 0,0 3,3 3,3 0,0 0) |\n+-------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_exteriorring/','','https://mariadb.com/kb/en/st_exteriorring/'),(10,'ST_InteriorRingN',2,'Syntax\n------ \nST_InteriorRingN(poly,N)\nInteriorRingN(poly,N)\n \nDescription\n----------- \nReturns the N-th interior ring for the Polygon value poly as\na LineString. Rings are numbered beginning with 1.\n \nST_InteriorRingN() and InteriorRingN() are synonyms.\n \nExamples\n-------- \nSET @poly = \'Polygon((0 0,0 3,3 3,3 0,0 0),(1 1,1 2,2 2,2\n1,1 1))\';\n \nSELECT AsText(InteriorRingN(GeomFromText(@poly),1));\n+----------------------------------------------+\n| AsText(InteriorRingN(GeomFromText(@poly),1)) |\n+----------------------------------------------+\n| LINESTRING(1 1,1 2,2 2,2 1,1 1) |\n+----------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_interiorringn/','','https://mariadb.com/kb/en/st_interiorringn/'),(11,'ST_NumInteriorRings',2,'Syntax\n------ \nST_NumInteriorRings(poly)\nNumInteriorRings(poly)\n \nDescription\n----------- \nReturns an integer containing the number of interior rings\nin the Polygon value poly.\n \nNote that according the the OpenGIS standard, a POLYGON\nshould have exactly one ExteriorRing and all other rings\nshould lie within that ExteriorRing and thus be the\nInteriorRings. Practically, however, some systems, including\nMariaDB\'s, permit polygons to have several\n\'ExteriorRings\'. In the case of there being multiple,\nnon-overlapping exterior rings ST_NumInteriorRings() will\nreturn 1.\n \nST_NumInteriorRings() and NumInteriorRings() are synonyms.\n \nExamples\n-------- \nSET @poly = \'Polygon((0 0,0 3,3 3,3 0,0 0),(1 1,1 2,2 2,2\n1,1 1))\';\n \nSELECT NumInteriorRings(GeomFromText(@poly));\n+---------------------------------------+\n| NumInteriorRings(GeomFromText(@poly)) |\n+---------------------------------------+\n| 1 |\n+---------------------------------------+\n \nNon-overlapping \'polygon\':\n \nSELECT ST_NumInteriorRings(ST_PolyFromText(\'POLYGON((0 0,10\n0,10 10,0 10,0 0),\n (-1 -1,-5 -1,-5 -5,-1 -5,-1 -1))\')) AS NumInteriorRings;\n \n+------------------+\n| NumInteriorRings |\n+------------------+\n| 1 |\n+------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_numinteriorrings/','','https://mariadb.com/kb/en/st_numinteriorrings/'),(12,'WKT Definition',3,'Description\n----------- \nThe Well-Known Text (WKT) representation of Geometry is\ndesigned to exchange geometry data in ASCII form. Examples\nof the basic geometry types include:\n \nGeometry Types | \n \nPOINT | \n \nLINESTRING | \n \nPOLYGON | \n \nMULTIPOINT | \n \nMULTILINESTRING | \n \nMULTIPOLYGON | \n \nGEOMETRYCOLLECTION | \n \nGEOMETRY | \n \n\n\nURL: https://mariadb.com/kb/en/wkt-definition/','','https://mariadb.com/kb/en/wkt-definition/'),(13,'AsText',3,'A synonym for ST_AsText().\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/wkt-astext/','','https://mariadb.com/kb/en/wkt-astext/'),(14,'AsWKT',3,'A synonym for ST_AsText().\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/wkt-aswkt/','','https://mariadb.com/kb/en/wkt-aswkt/'),(15,'GeomCollFromText',3,'A synonym for ST_GeomCollFromText.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/wkt-geomcollfromtext/','','https://mariadb.com/kb/en/wkt-geomcollfromtext/'),(16,'GeometryCollectionFromText',3,'A synonym for ST_GeomCollFromText.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/geometrycollectionfromtext/','','https://mariadb.com/kb/en/geometrycollectionfromtext/'),(17,'GeometryFromText',3,'A synonym for ST_GeomFromText.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/geometryfromtext/','','https://mariadb.com/kb/en/geometryfromtext/'),(18,'GeomFromText',3,'A synonym for ST_GeomFromText.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/wkt-geomfromtext/','','https://mariadb.com/kb/en/wkt-geomfromtext/'),(19,'LineFromText',3,'A synonym for ST_LineFromText.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/wkt-linefromtext/','','https://mariadb.com/kb/en/wkt-linefromtext/'),(20,'LineStringFromText',3,'A synonym for ST_LineFromText.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/linestringfromtext/','','https://mariadb.com/kb/en/linestringfromtext/'),(21,'MLineFromText',3,'Syntax\n------ \nMLineFromText(wkt[,srid])\nMultiLineStringFromText(wkt[,srid])\n \nDescription\n----------- \nConstructs a MULTILINESTRING value using its WKT\nrepresentation and SRID.\n \nMLineFromText() and MultiLineStringFromText() are synonyms.\n \nExamples\n-------- \nCREATE TABLE gis_multi_line (g MULTILINESTRING);\nSHOW FIELDS FROM gis_multi_line;\n \nINSERT INTO gis_multi_line VALUES\n (MultiLineStringFromText(\'MULTILINESTRING((10 48,10 21,10\n0),(16 0,16 23,16 48))\')),\n (MLineFromText(\'MULTILINESTRING((10 48,10 21,10 0))\')),\n (MLineFromWKB(AsWKB(MultiLineString(LineString(Point(1, 2),\nPoint(3, 5)), LineString(Point(2, 5), Point(5, 8), Point(21,\n7))))));\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/mlinefromtext/','','https://mariadb.com/kb/en/mlinefromtext/'),(22,'MPointFromText',3,'Syntax\n------ \nMPointFromText(wkt[,srid])\nMultiPointFromText(wkt[,srid])\n \nDescription\n----------- \nConstructs a MULTIPOINT value using its WKT representation\nand SRID.\n \nMPointFromText() and MultiPointFromText() are synonyms.\n \nExamples\n-------- \nCREATE TABLE gis_multi_point (g MULTIPOINT);\nSHOW FIELDS FROM gis_multi_point;\n \nINSERT INTO gis_multi_point VALUES\n (MultiPointFromText(\'MULTIPOINT(0 0,10 10,10 20,20\n20)\')),\n (MPointFromText(\'MULTIPOINT(1 1,11 11,11 21,21 21)\')),\n (MPointFromWKB(AsWKB(MultiPoint(Point(3, 6), Point(4,\n10)))));\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/mpointfromtext/','','https://mariadb.com/kb/en/mpointfromtext/'),(23,'MPolyFromText',3,'Syntax\n------ \nMPolyFromText(wkt[,srid])\nMultiPolygonFromText(wkt[,srid])\n \nDescription\n----------- \nConstructs a MULTIPOLYGON value using its WKT representation\nand SRID.\n \nMPolyFromText() and MultiPolygonFromText() are synonyms.\n \nExamples\n-------- \nCREATE TABLE gis_multi_polygon (g MULTIPOLYGON);\nSHOW FIELDS FROM gis_multi_polygon;\n \nINSERT INTO gis_multi_polygon VALUES\n (MultiPolygonFromText(\'MULTIPOLYGON(((28 26,28 0,84 0,84\n42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67\n13,59 13,59 18)))\')),\n (MPolyFromText(\'MULTIPOLYGON(((28 26,28 0,84 0,84 42,28\n26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59\n13,59 18)))\')),\n (MPolyFromWKB(AsWKB(MultiPolygon(Polygon(LineString(Point(0,\n3), Point(3, 3), Point(3, 0), Point(0, 3)))))));\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/mpolyfromtext/','','https://mariadb.com/kb/en/mpolyfromtext/'),(24,'MultiLineStringFromText',3,'A synonym for MLineFromText.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/multilinestringfromtext/','','https://mariadb.com/kb/en/multilinestringfromtext/'),(25,'MultiPointFromText',3,'A synonym for MPointFromText.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/multipointfromtext/','','https://mariadb.com/kb/en/multipointfromtext/'),(26,'MultiPolygonFromText',3,'A synonym for MPolyFromText.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/multipolygonfromtext/','','https://mariadb.com/kb/en/multipolygonfromtext/'),(27,'PointFromText',3,'A synonym for ST_PointFromText.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/wkt-pointfromtext/','','https://mariadb.com/kb/en/wkt-pointfromtext/'),(28,'PolyFromText',3,'A synonym for ST_PolyFromText.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/wkt-polyfromtext/','','https://mariadb.com/kb/en/wkt-polyfromtext/'),(29,'PolygonFromText',3,'A synonym for ST_PolyFromText.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/polygonfromtext/','','https://mariadb.com/kb/en/polygonfromtext/'),(30,'ST_AsText',3,'Syntax\n------ \nST_AsText(g)\nAsText(g)\nST_AsWKT(g)\nAsWKT(g)\n \nDescription\n----------- \nConverts a value in internal geometry format to its WKT\nrepresentation and returns the string result.\n \nST_AsText(), AsText(), ST_AsWKT() and AsWKT() are all\nsynonyms.\n \nExamples\n-------- \nSET @g = \'LineString(1 1,4 4,6 6)\';\n \nSELECT ST_AsText(ST_GeomFromText(@g));\n+--------------------------------+\n| ST_AsText(ST_GeomFromText(@g)) |\n+--------------------------------+\n| LINESTRING(1 1,4 4,6 6) |\n+--------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_astext/','','https://mariadb.com/kb/en/st_astext/'),(31,'ST_ASWKT',3,'A synonym for ST_ASTEXT().\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_aswkt/','','https://mariadb.com/kb/en/st_aswkt/'),(32,'ST_GeomCollFromText',3,'Syntax\n------ \nST_GeomCollFromText(wkt[,srid])\nST_GeometryCollectionFromText(wkt[,srid])\nGeomCollFromText(wkt[,srid])\nGeometryCollectionFromText(wkt[,srid])\n \nDescription\n----------- \nConstructs a GEOMETRYCOLLECTION value using its WKT \nrepresentation and SRID.\n \nST_GeomCollFromText(), ST_GeometryCollectionFromText(),\nGeomCollFromText() and GeometryCollectionFromText() are all\nsynonyms.\n \nExample\n \nCREATE TABLE gis_geometrycollection (g GEOMETRYCOLLECTION);\nSHOW FIELDS FROM gis_geometrycollection;\n \nINSERT INTO gis_geometrycollection VALUES\n (GeomCollFromText(\'GEOMETRYCOLLECTION(POINT(0 0),\nLINESTRING(0 0,10 10))\')),\n (GeometryFromWKB(AsWKB(GeometryCollection(Point(44, 6),\nLineString(Point(3, 6), Point(7, 9)))))),\n (GeomFromText(\'GeometryCollection()\')),\n (GeomFromText(\'GeometryCollection EMPTY\'));\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_geomcollfromtext/','','https://mariadb.com/kb/en/st_geomcollfromtext/'),(33,'ST_GeometryCollectionFromText',3,'A synonym for ST_GeomCollFromText.\n \n\n \n \n \n \n \n \n \n\nURL:\nhttps://mariadb.com/kb/en/st_geometrycollectionfromtext/','','https://mariadb.com/kb/en/st_geometrycollectionfromtext/'),(34,'ST_GeometryFromText',3,'A synonym for ST_GeomFromText.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_geometryfromtext/','','https://mariadb.com/kb/en/st_geometryfromtext/'),(35,'ST_GeomFromText',3,'Syntax\n------ \nST_GeomFromText(wkt[,srid])\nST_GeometryFromText(wkt[,srid])\nGeomFromText(wkt[,srid])\nGeometryFromText(wkt[,srid])\n \nDescription\n----------- \nConstructs a geometry value of any type using its WKT\nrepresentation and SRID.\n \nGeomFromText(), GeometryFromText(), ST_GeomFromText() and\nST_GeometryFromText() are all synonyms.\n \nExample\n \nSET @g = ST_GEOMFROMTEXT(\'POLYGON((1 1,1 5,4 9,6 9,9 3,7\n2,1 1))\');\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_geomfromtext/','','https://mariadb.com/kb/en/st_geomfromtext/'),(36,'ST_LineFromText',3,'Syntax\n------ \nST_LineFromText(wkt[,srid])\nST_LineStringFromText(wkt[,srid])\nLineFromText(wkt[,srid])\nLineStringFromText(wkt[,srid])\n \nDescription\n----------- \nConstructs a LINESTRING value using its WKT representation\nand SRID.\n \nST_LineFromText(), ST_LineStringFromText(),\nST_LineFromText() and ST_LineStringFromText() are all\nsynonyms.\n \nExamples\n-------- \nCREATE TABLE gis_line (g LINESTRING);\nSHOW FIELDS FROM gis_line;\n \nINSERT INTO gis_line VALUES\n (LineFromText(\'LINESTRING(0 0,0 10,10 0)\')),\n (LineStringFromText(\'LINESTRING(10 10,20 10,20 20,10 20,10\n10)\')),\n (LineStringFromWKB(AsWKB(LineString(Point(10, 10),\nPoint(40, 10)))));\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_linefromtext/','','https://mariadb.com/kb/en/st_linefromtext/'),(37,'ST_LineStringFromText',3,'A synonym for ST_LineFromText.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_linestringfromtext/','','https://mariadb.com/kb/en/st_linestringfromtext/'),(38,'ST_PointFromText',3,'Syntax\n------ \nST_PointFromText(wkt[,srid])\nPointFromText(wkt[,srid])\n \nDescription\n----------- \nConstructs a POINT value using its WKT representation and\nSRID.\n \nST_PointFromText() and PointFromText() are synonyms.\n \nExamples\n-------- \nCREATE TABLE gis_point (g POINT);\nSHOW FIELDS FROM gis_point;\n \nINSERT INTO gis_point VALUES\n (PointFromText(\'POINT(10 10)\')),\n (PointFromText(\'POINT(20 10)\')),\n (PointFromText(\'POINT(20 20)\')),\n (PointFromWKB(AsWKB(PointFromText(\'POINT(10 20)\'))));\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_pointfromtext/','','https://mariadb.com/kb/en/st_pointfromtext/'),(39,'ST_PolyFromText',3,'Syntax\n------ \nST_PolyFromText(wkt[,srid])\nST_PolygonFromText(wkt[,srid])\nPolyFromText(wkt[,srid])\nPolygonFromText(wkt[,srid])\n \nDescription\n----------- \nConstructs a POLYGON value using its WKT representation and\nSRID.\n \nST_PolyFromText(), ST_PolygonFromText(), PolyFromText() and\nST_PolygonFromText() are all synonyms.\n \nExamples\n-------- \nCREATE TABLE gis_polygon (g POLYGON);\nINSERT INTO gis_polygon VALUES\n (PolygonFromText(\'POLYGON((10 10,20 10,20 20,10 20,10\n10))\')),\n (PolyFromText(\'POLYGON((0 0,50 0,50 50,0 50,0 0), (10\n10,20 10,20 20,10 20,10 10))\'));\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_polyfromtext/','','https://mariadb.com/kb/en/st_polyfromtext/'),(40,'ST_PolygonFromText',3,'A synonym for ST_PolyFromText.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_polygonfromtext/','','https://mariadb.com/kb/en/st_polygonfromtext/'),(41,'Addition Operator (+)',4,'Syntax\n------ \n+\n \nDescription\n----------- \nAddition.\n \nIf both operands are integers, the result is calculated with\nBIGINT precision. If either integer is unsigned, the result\nis also an unsigned integer.\n \nFor real or string operands, the operand with the highest\nprecision determines the result precision.\n \nExamples\n-------- \nSELECT 3+5;\n \n+-----+\n| 3+5 |\n+-----+\n| 8 |\n+-----+\n \n\n\nURL: https://mariadb.com/kb/en/addition-operator/','','https://mariadb.com/kb/en/addition-operator/'),(42,'Subtraction Operator (-)',4,'Syntax\n------ \n-\n \nDescription\n----------- \nSubtraction. The operator is also used as the unary minus\nfor changing sign.\n \nIf both operands are integers, the result is calculated with\nBIGINT precision. If either integer is unsigned, the result\nis also an unsigned integer, unless the\nNO_UNSIGNED_SUBTRACTION SQL_MODE is enabled, in which case\nthe result is always signed.\n \nFor real or string operands, the operand with the highest\nprecision determines the result precision.\n \nExamples\n-------- \nSELECT 96-9;\n \n+------+\n| 96-9 |\n+------+\n| 87 |\n+------+\n \nSELECT 15-17;\n \n+-------+\n| 15-17 |\n+-------+\n| -2 |\n+-------+\n \nSELECT 3.66 + 1.333;\n \n+--------------+\n| 3.66 + 1.333 |\n+--------------+\n| 4.993 |\n+--------------+\n \nUnary minus:\n \n SELECT - (3+5);\n+---------+\n| - (3+5) |\n+---------+\n| -8 |\n+---------+\n \n\n\nURL: https://mariadb.com/kb/en/subtraction-operator-/','','https://mariadb.com/kb/en/subtraction-operator-/'),(43,'Division Operator (/)',4,'Syntax\n------ \n/\n \nDescription\n----------- \nDivision operator. Dividing by zero will return NULL. By\ndefault, returns four digits after the decimal. This is\ndetermined by the server system variable\ndiv_precision_increment which by default is four. It can be\nset from 0 to 30.\n \nDividing by zero returns NULL. If the\nERROR_ON_DIVISION_BY_ZERO SQL_MODE is used (the default\nsince MariaDB 10.2.4), a division by zero also produces a\nwarning.\n \nExamples\n-------- \nSELECT 4/5;\n \n+--------+\n| 4/5 |\n+--------+\n| 0.8000 |\n+--------+\n \nSELECT 300/(2-2);\n+-----------+\n| 300/(2-2) |\n+-----------+\n| NULL |\n+-----------+\n \nSELECT 300/7;\n \n+---------+\n| 300/7 |\n+---------+\n| 42.8571 |\n+---------+\n \nChanging div_precision_increment for the session from the\ndefault of four to six:\n \nSET div_precision_increment = 6;\n \nSELECT 300/7;\n \n+-----------+\n| 300/7 |\n+-----------+\n| 42.857143 |\n+-----------+\n \nSELECT 300/7;\n \n+-----------+\n| 300/7 |\n+-----------+\n| 42.857143 |\n+-----------+\n \n\n\nURL: https://mariadb.com/kb/en/division-operator/','','https://mariadb.com/kb/en/division-operator/'),(44,'Multiplication Operator (*)',4,'Syntax\n------ \n*\n \nDescription\n----------- \nMultiplication operator.\n \nExamples\n-------- \nSELECT 7*6;\n \n+-----+\n| 7*6 |\n+-----+\n| 42 |\n+-----+\n \nSELECT 1234567890*9876543210;\n \n+-----------------------+\n| 1234567890*9876543210 |\n+-----------------------+\n| -6253480962446024716 |\n+-----------------------+\n \nSELECT 18014398509481984*18014398509481984.0;\n \n+---------------------------------------+\n| 18014398509481984*18014398509481984.0 |\n+---------------------------------------+\n| 324518553658426726783156020576256.0 |\n+---------------------------------------+\n \nSELECT 18014398509481984*18014398509481984;\n \n+-------------------------------------+\n| 18014398509481984*18014398509481984 |\n+-------------------------------------+\n| 0 |\n+-------------------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/multiplication-operator/','','https://mariadb.com/kb/en/multiplication-operator/'),(45,'Modulo Operator (%)',4,'Syntax\n------ \nN % M\n \nDescription\n----------- \nModulo operator. Returns the remainder of N divided by M.\nSee also MOD.\n \nExamples\n-------- \nSELECT 1042 % 50;\n \n+-----------+\n| 1042 % 50 |\n+-----------+\n| 42 |\n+-----------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/modulo-operator/','','https://mariadb.com/kb/en/modulo-operator/'),(46,'DIV',4,'Syntax\n------ \nDIV\n \nDescription\n----------- \nInteger division. Similar to FLOOR(), but is safe with\nBIGINT values.\nIncorrect results may occur for non-integer operands that\nexceed BIGINT range.\n \nIf the ERROR_ON_DIVISION_BY_ZERO SQL_MODE is used, a\ndivision by zero produces an error. Otherwise, it returns\nNULL.\n \nThe remainder of a division can be obtained using the MOD\noperator.\n \nExamples\n-------- \nSELECT 300 DIV 7;\n \n+-----------+\n| 300 DIV 7 |\n+-----------+\n| 42 |\n+-----------+\n \nSELECT 300 DIV 0;\n \n+-----------+\n| 300 DIV 0 |\n+-----------+\n| NULL |\n+-----------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/div/','','https://mariadb.com/kb/en/div/'),(47,'ABS',4,'Syntax\n------ \nABS(X)\n \nDescription\n----------- \nReturns the absolute (non-negative) value of X. If X is not\na number, it is converted to a numeric type.\n \nExamples\n-------- \nSELECT ABS(42);\n+---------+\n| ABS(42) |\n+---------+\n| 42 |\n+---------+\n \nSELECT ABS(-42);\n+----------+\n| ABS(-42) |\n+----------+\n| 42 |\n+----------+\n \nSELECT ABS(DATE \'1994-01-01\');\n+------------------------+\n| ABS(DATE \'1994-01-01\') |\n+------------------------+\n| 19940101 |\n+------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/abs/','','https://mariadb.com/kb/en/abs/'),(48,'ACOS',4,'Syntax\n------ \nACOS(X)\n \nDescription\n----------- \nReturns the arc cosine of X, that is, the value whose cosine\nis X.\nReturns NULL if X is not in the range -1 to 1.\n \nExamples\n-------- \nSELECT ACOS(1);\n+---------+\n| ACOS(1) |\n+---------+\n| 0 |\n+---------+\n \nSELECT ACOS(1.0001);\n+--------------+\n| ACOS(1.0001) |\n+--------------+\n| NULL |\n+--------------+\n \nSELECT ACOS(0);\n+-----------------+\n| ACOS(0) |\n+-----------------+\n| 1.5707963267949 |\n+-----------------+\n \nSELECT ACOS(0.234);\n+------------------+\n| ACOS(0.234) |\n+------------------+\n| 1.33460644244679 |\n+------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/acos/','','https://mariadb.com/kb/en/acos/'),(49,'ASIN',4,'Syntax\n------ \nASIN(X)\n \nDescription\n----------- \nReturns the arc sine of X, that is, the value whose sine is\nX. Returns\nNULL if X is not in the range -1 to 1.\n \nExamples\n-------- \nSELECT ASIN(0.2);\n+--------------------+\n| ASIN(0.2) |\n+--------------------+\n| 0.2013579207903308 |\n+--------------------+\n \nSELECT ASIN(\'foo\');\n+-------------+\n| ASIN(\'foo\') |\n+-------------+\n| 0 |\n+-------------+\n \nSHOW WARNINGS;\n \n+---------+------+-----------------------------------------+\n| Level | Code | Message |\n+---------+------+-----------------------------------------+\n| Warning | 1292 | Truncated incorrect DOUBLE value: \'foo\'\n|\n+---------+------+-----------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/asin/','','https://mariadb.com/kb/en/asin/'),(50,'ATAN',4,'Syntax\n------ \nATAN(X)\n \nDescription\n----------- \nReturns the arc tangent of X, that is, the value whose\ntangent is X.\n \nExamples\n-------- \nSELECT ATAN(2);\n+--------------------+\n| ATAN(2) |\n+--------------------+\n| 1.1071487177940904 |\n+--------------------+\n \nSELECT ATAN(-2);\n+---------------------+\n| ATAN(-2) |\n+---------------------+\n| -1.1071487177940904 |\n+---------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/atan/','','https://mariadb.com/kb/en/atan/'),(51,'ATAN2',4,'Syntax\n------ \nATAN(Y,X), ATAN2(Y,X)\n \nDescription\n----------- \nReturns the arc tangent of the two variables X and Y. It is\nsimilar to\ncalculating the arc tangent of Y / X, except that the signs\nof both\narguments are used to determine the quadrant of the result.\n \nExamples\n-------- \nSELECT ATAN(-2,2);\n+---------------------+\n| ATAN(-2,2) |\n+---------------------+\n| -0.7853981633974483 |\n+---------------------+\n \nSELECT ATAN2(PI(),0);\n+--------------------+\n| ATAN2(PI(),0) |\n+--------------------+\n| 1.5707963267948966 |\n+--------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/atan2/','','https://mariadb.com/kb/en/atan2/'),(52,'CEIL',4,'Syntax\n------ \nCEIL(X)\n \nDescription\n----------- \nCEIL() is a synonym for CEILING().\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/ceil/','','https://mariadb.com/kb/en/ceil/'),(53,'CEILING',4,'Syntax\n------ \nCEILING(X)\n \nDescription\n----------- \nReturns the smallest integer value not less than X.\n \nExamples\n-------- \nSELECT CEILING(1.23);\n+---------------+\n| CEILING(1.23) |\n+---------------+\n| 2 |\n+---------------+\n \nSELECT CEILING(-1.23);\n+----------------+\n| CEILING(-1.23) |\n+----------------+\n| -1 |\n+----------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/ceiling/','','https://mariadb.com/kb/en/ceiling/'),(54,'CONV',4,'Syntax\n------ \nCONV(N,from_base,to_base)\n \nDescription\n----------- \nConverts numbers between different number bases. Returns a\nstring\nrepresentation of the number N, converted from base\nfrom_base\nto base to_base.\n \nReturns NULL if any argument is NULL, or if the second or\nthird argument are not in the allowed range.\n \nThe argument N is interpreted as an integer, but may be\nspecified as an\ninteger or a string. The minimum base is 2 and the maximum\nbase is 36. If\nto_base is a negative number, N is regarded as a signed\nnumber.\nOtherwise, N is treated as unsigned. CONV() works with\n64-bit\nprecision.\n \nSome shortcuts for this function are also available: BIN(),\nOCT(), HEX(), UNHEX(). Also, MariaDB allows binary literal\nvalues and hexadecimal literal values.\n \nExamples\n-------- \nSELECT CONV(\'a\',16,2);\n+----------------+\n| CONV(\'a\',16,2) |\n+----------------+\n| 1010 |\n+----------------+\n \nSELECT CONV(\'6E\',18,8);\n+-----------------+\n| CONV(\'6E\',18,8) |\n+-----------------+\n| 172 |\n+-----------------+\n \nSELECT CONV(-17,10,-18);\n+------------------+\n| CONV(-17,10,-18) |\n+------------------+\n| -H |\n+------------------+\n \nSELECT CONV(12+\'10\'+\'10\'+0xa,10,10);\n+------------------------------+\n| CONV(12+\'10\'+\'10\'+0xa,10,10) |\n+------------------------------+\n| 42 |\n+------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/conv/','','https://mariadb.com/kb/en/conv/'),(55,'COS',4,'Syntax\n------ \nCOS(X)\n \nDescription\n----------- \nReturns the cosine of X, where X is given in radians.\n \nExamples\n-------- \nSELECT COS(PI());\n+-----------+\n| COS(PI()) |\n+-----------+\n| -1 |\n+-----------\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/cos/','','https://mariadb.com/kb/en/cos/'),(56,'COT',4,'Syntax\n------ \nCOT(X)\n \nDescription\n----------- \nReturns the cotangent of X.\n \nExamples\n-------- \nSELECT COT(42);\n+--------------------+\n| COT(42) |\n+--------------------+\n| 0.4364167060752729 |\n+--------------------+\n \nSELECT COT(12);\n+---------------------+\n| COT(12) |\n+---------------------+\n| -1.5726734063976893 |\n+---------------------+\n \nSELECT COT(0);\nERROR 1690 (22003): DOUBLE value is out of range in\n\'cot(0)\'\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/cot/','','https://mariadb.com/kb/en/cot/'),(57,'CRC32',4,'Syntax\n------ \nCRC32(expr)\n \nDescription\n----------- \nComputes a cyclic redundancy check value and returns a\n32-bit unsigned\nvalue. The result is NULL if the argument is NULL. The\nargument is\nexpected to be a string and (if possible) is treated as one\nif it is\nnot.\n \nExamples\n-------- \nSELECT CRC32(\'MariaDB\');\n+------------------+\n| CRC32(\'MariaDB\') |\n+------------------+\n| 4227209140 |\n+------------------+\n \nSELECT CRC32(\'mariadb\');\n+------------------+\n| CRC32(\'mariadb\') |\n+------------------+\n| 2594253378 |\n+------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/crc32/','','https://mariadb.com/kb/en/crc32/'),(58,'DEGREES',4,'Syntax\n------ \nDEGREES(X)\n \nDescription\n----------- \nReturns the argument X, converted from radians to degrees.\n \nThis is the converse of the RADIANS() function.\n \nExamples\n-------- \nSELECT DEGREES(PI());\n+---------------+\n| DEGREES(PI()) |\n+---------------+\n| 180 |\n+---------------+\n \nSELECT DEGREES(PI() / 2);\n+-------------------+\n| DEGREES(PI() / 2) |\n+-------------------+\n| 90 |\n+-------------------+\n \nSELECT DEGREES(45);\n+-----------------+\n| DEGREES(45) |\n+-----------------+\n| 2578.3100780887 |\n+-----------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/degrees/','','https://mariadb.com/kb/en/degrees/'),(59,'EXP',4,'Syntax\n------ \nEXP(X)\n \nDescription\n----------- \nReturns the value of e (the base of natural logarithms)\nraised to the\npower of X. The inverse of this function is LOG() (using a\nsingle\nargument only) or LN().\n \nIf X is NULL, this function returns NULL.\n \nExamples\n-------- \nSELECT EXP(2);\n+------------------+\n| EXP(2) |\n+------------------+\n| 7.38905609893065 |\n+------------------+\n \nSELECT EXP(-2);\n+--------------------+\n| EXP(-2) |\n+--------------------+\n| 0.1353352832366127 |\n+--------------------+\n \nSELECT EXP(0);\n+--------+\n| EXP(0) |\n+--------+\n| 1 |\n+--------+\n \nSELECT EXP(NULL);\n+-----------+\n| EXP(NULL) |\n+-----------+\n| NULL |\n+-----------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/exp/','','https://mariadb.com/kb/en/exp/'),(60,'FLOOR',4,'Syntax\n------ \nFLOOR(X)\n \nDescription\n----------- \nReturns the largest integer value not greater than X.\n \nExamples\n-------- \nSELECT FLOOR(1.23);\n+-------------+\n| FLOOR(1.23) |\n+-------------+\n| 1 |\n+-------------+\n \nSELECT FLOOR(-1.23);\n+--------------+\n| FLOOR(-1.23) |\n+--------------+\n| -2 |\n+--------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/floor/','','https://mariadb.com/kb/en/floor/'),(61,'LN',4,'Syntax\n------ \nLN(X)\n \nDescription\n----------- \nReturns the natural logarithm of X; that is, the base-e\nlogarithm of X.\nIf X is less than or equal to 0, or NULL, then NULL is\nreturned.\n \nThe inverse of this function is EXP().\n \nExamples\n-------- \nSELECT LN(2);\n+-------------------+\n| LN(2) |\n+-------------------+\n| 0.693147180559945 |\n+-------------------+\n \nSELECT LN(-2);\n+--------+\n| LN(-2) |\n+--------+\n| NULL |\n+--------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/ln/','','https://mariadb.com/kb/en/ln/'),(62,'LOG',4,'Syntax\n------ \nLOG(X), LOG(B,X)\n \nDescription\n----------- \nIf called with one parameter, this function returns the\nnatural\nlogarithm of X. If X is less than or equal to 0, then NULL\nis\nreturned.\n \nIf called with two parameters, it returns the logarithm of X\nto the base B. If B is \n\nURL: https://mariadb.com/kb/en/log/','','https://mariadb.com/kb/en/log/'),(63,'LOG10',4,'Syntax\n------ \nLOG10(X)\n \nDescription\n----------- \nReturns the base-10 logarithm of X.\n \nExamples\n-------- \nSELECT LOG10(2);\n+-------------------+\n| LOG10(2) |\n+-------------------+\n| 0.301029995663981 |\n+-------------------+\n \nSELECT LOG10(100);\n+------------+\n| LOG10(100) |\n+------------+\n| 2 |\n+------------+\n \nSELECT LOG10(-100);\n+-------------+\n| LOG10(-100) |\n+-------------+\n| NULL |\n+-------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/log10/','','https://mariadb.com/kb/en/log10/'),(64,'LOG2',4,'Syntax\n------ \nLOG2(X)\n \nDescription\n----------- \nReturns the base-2 logarithm of X.\n \nExamples\n-------- \nSELECT LOG2(4398046511104);\n+---------------------+\n| LOG2(4398046511104) |\n+---------------------+\n| 42 |\n+---------------------+\n \nSELECT LOG2(65536);\n+-------------+\n| LOG2(65536) |\n+-------------+\n| 16 |\n+-------------+\n \nSELECT LOG2(-100);\n+------------+\n| LOG2(-100) |\n+------------+\n| NULL |\n+------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/log2/','','https://mariadb.com/kb/en/log2/'),(66,'OCT',4,'Syntax\n------ \nOCT(N)\n \nDescription\n----------- \nReturns a string representation of the octal value of N,\nwhere N is a longlong (BIGINT) number. This is equivalent to\nCONV(N,10,8). Returns NULL if N is NULL.\n \nExamples\n-------- \nSELECT OCT(34);\n+---------+\n| OCT(34) |\n+---------+\n| 42 |\n+---------+\n \nSELECT OCT(12);\n+---------+\n| OCT(12) |\n+---------+\n| 14 |\n+---------+\n \n\n\nURL: https://mariadb.com/kb/en/oct/','','https://mariadb.com/kb/en/oct/'),(65,'MOD',4,'Syntax\n------ \nMOD(N,M), N % M, N MOD M\n \nDescription\n----------- \nModulo operation. Returns the remainder of N divided by M.\nSee also Modulo Operator.\n \nIf the ERROR_ON_DIVISION_BY_ZERO SQL_MODE is used, any\nnumber modulus zero produces an error. Otherwise, it returns\nNULL.\n \nThe integer part of a division can be obtained using DIV.\n \nExamples\n-------- \nSELECT 1042 % 50;\n \n+-----------+\n| 1042 % 50 |\n+-----------+\n| 42 |\n+-----------+\n \nSELECT MOD(234, 10);\n+--------------+\n| MOD(234, 10) |\n+--------------+\n| 4 |\n+--------------+\n \nSELECT 253 % 7;\n \n+---------+\n| 253 % 7 |\n+---------+\n| 1 |\n+---------+\n \nSELECT MOD(29,9);\n+-----------+\n| MOD(29,9) |\n+-----------+\n| 2 |\n+-----------+\n \nSELECT 29 MOD 9;\n \n+----------+\n| 29 MOD 9 |\n+----------+\n| 2 |\n+----------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/mod/','','https://mariadb.com/kb/en/mod/'),(67,'PI',4,'Syntax\n------ \nPI()\n \nDescription\n----------- \nReturns the value of Ï€ (pi). The default number of decimal\nplaces\ndisplayed is six, but MariaDB uses the full double-precision\nvalue\ninternally.\n \nExamples\n-------- \nSELECT PI();\n+----------+\n| PI() |\n+----------+\n| 3.141593 |\n+----------+\n \nSELECT PI()+0.0000000000000000000000;\n \n+-------------------------------+\n| PI()+0.0000000000000000000000 |\n+-------------------------------+\n| 3.1415926535897931159980 |\n+-------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/pi/','','https://mariadb.com/kb/en/pi/'),(68,'POW',4,'Syntax\n------ \nPOW(X,Y)\n \nDescription\n----------- \nReturns the value of X raised to the power of Y.\n \nPOWER() is a synonym.\n \nExamples\n-------- \nSELECT POW(2,3);\n+----------+\n| POW(2,3) |\n+----------+\n| 8 |\n+----------+\n \nSELECT POW(2,-2);\n+-----------+\n| POW(2,-2) |\n+-----------+\n| 0.25 |\n+-----------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/pow/','','https://mariadb.com/kb/en/pow/'),(69,'POWER',4,'Syntax\n------ \nPOWER(X,Y)\n \nDescription\n----------- \nThis is a synonym for POW(), which returns the value of X\nraised to the power of Y.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/power/','','https://mariadb.com/kb/en/power/'),(70,'RADIANS',4,'Syntax\n------ \nRADIANS(X)\n \nDescription\n----------- \nReturns the argument X, converted from degrees to radians.\nNote that\nÏ€ radians equals 180 degrees. \n \nThis is the converse of the DEGREES() function.\n \nExamples\n-------- \nSELECT RADIANS(45);\n+-------------------+\n| RADIANS(45) |\n+-------------------+\n| 0.785398163397448 |\n+-------------------+\n \nSELECT RADIANS(90);\n+-----------------+\n| RADIANS(90) |\n+-----------------+\n| 1.5707963267949 |\n+-----------------+\n \nSELECT RADIANS(PI());\n+--------------------+\n| RADIANS(PI()) |\n+--------------------+\n| 0.0548311355616075 |\n+--------------------+\n \nSELECT RADIANS(180);\n+------------------+\n| RADIANS(180) |\n+------------------+\n| 3.14159265358979 |\n+------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/radians/','','https://mariadb.com/kb/en/radians/'),(71,'RAND',4,'Syntax\n------ \nRAND(), RAND(N)\n \nDescription\n----------- \nReturns a random DOUBLE precision floating point value v in\nthe range 0 \n\nURL: https://mariadb.com/kb/en/rand/','','https://mariadb.com/kb/en/rand/'),(72,'ROUND',4,'Syntax\n------ \nROUND(X), ROUND(X,D)\n \nDescription\n----------- \nRounds the argument X to D decimal places. The rounding\nalgorithm\ndepends on the data type of X. D defaults to 0 if not\nspecified.\nD can be negative to cause D digits left of the decimal\npoint of the\nvalue X to become zero.\n \nExamples\n-------- \nSELECT ROUND(-1.23);\n+--------------+\n| ROUND(-1.23) |\n+--------------+\n| -1 |\n+--------------+\n \nSELECT ROUND(-1.58);\n+--------------+\n| ROUND(-1.58) |\n+--------------+\n| -2 |\n+--------------+\n \nSELECT ROUND(1.58); \n+-------------+\n| ROUND(1.58) |\n+-------------+\n| 2 |\n+-------------+\n \nSELECT ROUND(1.298, 1);\n+-----------------+\n| ROUND(1.298, 1) |\n+-----------------+\n| 1.3 |\n+-----------------+\n \nSELECT ROUND(1.298, 0);\n+-----------------+\n| ROUND(1.298, 0) |\n+-----------------+\n| 1 |\n+-----------------+\n \nSELECT ROUND(23.298, -1);\n+-------------------+\n| ROUND(23.298, -1) |\n+-------------------+\n| 20 |\n+-------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/round/','','https://mariadb.com/kb/en/round/'),(73,'SIGN',4,'Syntax\n------ \nSIGN(X)\n \nDescription\n----------- \nReturns the sign of the argument as -1, 0, or 1, depending\non whether\nX is negative, zero, or positive.\n \nExamples\n-------- \nSELECT SIGN(-32);\n+-----------+\n| SIGN(-32) |\n+-----------+\n| -1 |\n+-----------+\n \nSELECT SIGN(0);\n+---------+\n| SIGN(0) |\n+---------+\n| 0 |\n+---------+\n \nSELECT SIGN(234);\n+-----------+\n| SIGN(234) |\n+-----------+\n| 1 |\n+-----------+\n \n\n\nURL: https://mariadb.com/kb/en/sign/','','https://mariadb.com/kb/en/sign/'),(74,'SIN',4,'Syntax\n------ \nSIN(X)\n \nDescription\n----------- \nReturns the sine of X, where X is given in radians.\n \nExamples\n-------- \nSELECT SIN(1.5707963267948966);\n+-------------------------+\n| SIN(1.5707963267948966) |\n+-------------------------+\n| 1 |\n+-------------------------+\n \nSELECT SIN(PI());\n+----------------------+\n| SIN(PI()) |\n+----------------------+\n| 1.22460635382238e-16 |\n+----------------------+\n \nSELECT ROUND(SIN(PI()));\n+------------------+\n| ROUND(SIN(PI())) |\n+------------------+\n| 0 |\n+------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/sin/','','https://mariadb.com/kb/en/sin/'),(75,'SQRT',4,'Syntax\n------ \nSQRT(X)\n \nDescription\n----------- \nReturns the square root of X. If X is negative, NULL is\nreturned.\n \nExamples\n-------- \nSELECT SQRT(4);\n+---------+\n| SQRT(4) |\n+---------+\n| 2 |\n+---------+\n \nSELECT SQRT(20);\n+------------------+\n| SQRT(20) |\n+------------------+\n| 4.47213595499958 |\n+------------------+\n \nSELECT SQRT(-16);\n+-----------+\n| SQRT(-16) |\n+-----------+\n| NULL |\n+-----------+\n \nSELECT SQRT(1764);\n+------------+\n| SQRT(1764) |\n+------------+\n| 42 |\n+------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/sqrt/','','https://mariadb.com/kb/en/sqrt/'),(76,'TAN',4,'Syntax\n------ \nTAN(X)\n \nDescription\n----------- \nReturns the tangent of X, where X is given in radians.\n \nExamples\n-------- \nSELECT TAN(0.7853981633974483);\n+-------------------------+\n| TAN(0.7853981633974483) |\n+-------------------------+\n| 0.9999999999999999 |\n+-------------------------+\n \nSELECT TAN(PI());\n+-----------------------+\n| TAN(PI()) |\n+-----------------------+\n| -1.22460635382238e-16 |\n+-----------------------+\n \nSELECT TAN(PI()+1);\n+-----------------+\n| TAN(PI()+1) |\n+-----------------+\n| 1.5574077246549 |\n+-----------------+\n \nSELECT TAN(RADIANS(PI()));\n+--------------------+\n| TAN(RADIANS(PI())) |\n+--------------------+\n| 0.0548861508080033 |\n+--------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/tan/','','https://mariadb.com/kb/en/tan/'),(78,'Plugin Overview',5,'Plugins are server components that enhance MariaDB in some\nway. These can be anything from new storage engines, plugins\nfor enhancing full-text parsing, or even small enhancements,\nsuch as a plugin to get a timestamp as an integer.\n \nQuerying Plugin Information\n \nThere are a number of ways to see which plugins are\ncurrently active.\n \nA server almost always has a large number of active plugins,\nbecause the server contains a large number of built-in\nplugins, which are active by default and cannot be\nuninstalled.\n \nQuerying Plugin Information with SHOW PLUGINS\n \nThe SHOW PLUGINS statement can be used to query information\nabout all active plugins.\n \nFor example:\n \nSHOW PLUGINS;\n \n+----------------------------+----------+--------------------+---------+---------+\n| Name | Status | Type | Library | License |\n+----------------------------+----------+--------------------+---------+---------+\n...\n| mysql_native_password | ACTIVE | AUTHENTICATION | NULL |\nGPL |\n| mysql_old_password | ACTIVE | AUTHENTICATION | NULL | GPL\n|\n| MRG_MyISAM | ACTIVE | STORAGE ENGINE | NULL | GPL |\n...\n+----------------------------+----------+--------------------+---------+---------+\n \nIf a plugin\'s Library column has the NULL value, then the\nplugin is built-in, and it cannot be uninstalled.\n \nQuerying Plugin Information with information_schema.PLUGINS\n \nThe information_schema.PLUGINS table can be queried to get\nmore detailed information about plugins.\n \nFor example:\n \nSELECT * FROM information_schema.PLUGINS\\G\n...\n*************************** 6. row\n***************************\n PLUGIN_NAME: CSV\n PLUGIN_VERSION: 1.0\n PLUGIN_STATUS: ACTIVE\n PLUGIN_TYPE: STORAGE ENGINE\n PLUGIN_TYPE_VERSION: 100003.0\n PLUGIN_LIBRARY: NULL\nPLUGIN_LIBRARY_VERSION: NULL\n PLUGIN_AUTHOR: Brian Aker, MySQL AB\n PLUGIN_DESCRIPTION: CSV storage engine\n PLUGIN_LICENSE: GPL\n LOAD_OPTION: FORCE\n PLUGIN_MATURITY: Stable\n PLUGIN_AUTH_VERSION: 1.0\n*************************** 7. row\n***************************\n PLUGIN_NAME: MEMORY\n PLUGIN_VERSION: 1.0\n PLUGIN_STATUS: ACTIVE\n PLUGIN_TYPE: STORAGE ENGINE\n PLUGIN_TYPE_VERSION: 100003.0\n PLUGIN_LIBRARY: NULL\nPLUGIN_LIBRARY_VERSION: NULL\n PLUGIN_AUTHOR: MySQL AB\n PLUGIN_DESCRIPTION: Hash based, stored in memory, useful\nfor temporary tables\n PLUGIN_LICENSE: GPL\n LOAD_OPTION: FORCE\n PLUGIN_MATURITY: Stable\n PLUGIN_AUTH_VERSION: 1.0\n...\n \nIf a plugin\'s PLUGIN_LIBRARY column has the NULL value,\nthen the plugin is built-in, and it cannot be uninstalled.\n \nQuerying Plugin Information with mysql.plugin\n \nThe mysql.plugin table can be queried to get information\nabout installed plugins.\n \nThis table only contains information about plugins that have\nbeen installed via the following methods:\nThe INSTALL SONAME statement.\nThe INSTALL PLUGIN statement.\nThe mysql_plugin utility.\n \nThis table does not contain information about:\nBuilt-in plugins.\nPlugins loaded with the --plugin-load-add option.\nPlugins loaded with the --plugin-load option.\n \nThis table only contains enough information to reload the\nplugin when the server is restarted, which means it only\ncontains the plugin name and the plugin library.\n \nFor example:\n \nSELECT * FROM mysql.plugin;\n \n+------+------------+\n| name | dl |\n+------+------------+\n| PBXT | libpbxt.so |\n+------+------------+\n \nInstalling a Plugin\n \nThere are three primary ways to install a plugin:\nA plugin can be installed dynamically with an SQL statement.\nA plugin can be installed with a mysqld option, but it\nrequires a server restart.\nA plugin can be installed with the mysql_plugin utility,\nwhile the server is completely offline.\n \nWhen you are installing a plugin, you also have to ensure\nthat:\nThe server\'s plugin directory is properly configured, and\nthe plugin\'s library is in the plugin directory.\nThe server\'s minimum plugin maturity is properly\nconfigured, and the plugin is mature enough to be installed.\n \nInstalling a Plugin Dynamically\n \nA plugin can be installed dynamically by executing either\nthe INSTALL SONAME or the INSTALL PLUGIN statement.\n \nIf a plugin is installed with one of these statements, then\na record will be added to the mysql.plugins table for the\nplugin. This means that the plugin will automatically be\nloaded every time the server restarts, unless specifically\nuninstalled or deactivated.\n \nInstalling a Plugin with INSTALL SONAME\n \nYou can install a plugin dynamically by executing the\nINSTALL SONAME statement. INSTALL SONAME installs all\nplugins from the given plugin library. This could be\nrequired for some plugin libraries.\n \nFor example, to install all plugins in the server_audit\nplugin library (which is currently only the server_audit\naudit plugin), you could execute the following:\n \nINSTALL SONAME \'server_audit\';\n \nInstalling a Plugin with INSTALL PLUGIN\n \nYou can install a plugin dynamically by executing the\nINSTALL PLUGIN statement. INSTALL PLUGIN installs a single\nplugin from the given plugin library.\n \nFor example, to install the server_audit audit plugin from\nthe server_audit plugin library, you could execute the\nfollowing:\n \nINSTALL PLUGIN server_audit SONAME \'server_audit\';\n \nInstalling a Plugin with Plugin Load Options\n \nA plugin can be installed with a mysqld option by providing\neither the --plugin-load-add or the --plugin-load option.\n \nIf a plugin is installed with one of these options, then a\nrecord will not be added to the mysql.plugins table for the\nplugin. This means that if the server is restarted without\nthe same option set, then the plugin will not automatically\nbe loaded.\n \nInstalling a Plugin with --plugin-load-add\n \nYou can install a plugin with the --plugin-load-add option\nby specifying the option as a command-line argument to\nmysqld or by specifying the option in a relevant server\noption group in an option file.\n \nThe --plugin-load-add option uses the following format:\nPlugins can be specified in the format name=library, where\nname is the plugin name and library is the plugin library.\nThis format installs a single plugin from the given plugin\nlibrary.\nPlugins can also be specified in the format library, where\nlibrary is the plugin library. This format installs all\nplugins from the given plugin library.\nMultiple plugins can be specified by separating them with\nsemicolons.\n \nFor example, to install all plugins in the server_audit\nplugin library (which is currently only the server_audit\naudit plugin) and also the ed25519 authentication plugin\nfrom the auth_ed25519 plugin library, you could set the\noption to the following values on the command-line:\n \n$ mysqld --user=mysql --plugin-load-add=\'server_audit\'\n--plugin-load-add=\'ed25519=auth_ed25519\'\n \nYou could also set the option to the same values in an\noption file:\n \n[mariadb]\n...\nplugin_load_add = server_audit\nplugin_load_add = ed25519=auth_ed25519\n \nSpecial care must be taken when specifying both the\n--plugin-load option and the --plugin-load-add option\ntogether. The --plugin-load option resets the plugin load\nlist, and this can cause unexpected problems if you are not\naware. The --plugin-load-add option does not reset the\nplugin load list, so it is much safer to use. See Specifying\nMultiple Plugin Load Options for more information.\n \nInstalling a Plugin with --plugin-load\n \nYou can install a plugin with the --plugin-load option by\nspecifying the option as a command-line argument to mysqld\nor by specifying the option in a relevant server option\ngroup in an option file.\n \nThe --plugin-load option uses the following format:\nPlugins can be specified in the format name=library, where\nname is the plugin name and library is the plugin library.\nThis format installs a single plugin from the given plugin\nlibrary.\nPlugins can also be specified in the format library, where\nlibrary is the plugin library. This format installs all\nplugins from the given plugin library.\nMultiple plugins can be specified by separating them with\nsemicolons.\n \nFor example, to install all plugins in the server_audit\nplugin library (which is currently only the server_audit\naudit plugin) and also the ed25519 authentication plugin\nfrom the auth_ed25519 plugin library, you could set the\noption to the following values on the command-line:\n \n$ mysqld --user=mysql\n--plugin-load=\'server_audit;ed25519=auth_ed25519\'\n \nYou could also set the option to the same values in an\noption file:\n \n[mariadb]\n...\nplugin_load = server_audit;ed25519=auth_ed25519\n \nSpecial care must be taken when specifying the --plugin-load\noption multiple times, or when specifying both the\n--plugin-load option and the --plugin-load-add option\ntogether. The --plugin-load option resets the plugin load\nlist, and this can cause unexpected problems if you are not\naware. The --plugin-load-add option does not reset the\nplugin load list, so it is much safer to use. See Specifying\nMultiple Plugin Load Options for more information.\n \nSpecifying Multiple Plugin Load Options\n \nSpecial care must be taken when specifying the --plugin-load\noption multiple times, or when specifying both the\n--plugin-load option and the --plugin-load-add option. The\n--plugin-load option resets the plugin load list, and this\ncan cause unexpected problems if you are not aware. The\n--plugin-load-add option does not reset the plugin load\nlist, so it is much safer to use.\n \nThis can have the following consequences:\nIf the --plugin-load option is specified multiple times,\nthen only the last instance will have any effect. For\nexample, in the following case, the first instance of the\noption is reset:\n \n[mariadb]\n...\nplugin_load = server_audit\nplugin_load = ed25519=auth_ed25519\nIf the --plugin-load option is specified after the\n--plugin-load-add option, then it will also reset the\nchanges made by that option. For example, in the following\ncase, the --plugin-load-add option does not do anything,\nbecause the subsequent --plugin-load option resets the\nplugin load list:\n \n[mariadb]\n...\nplugin_load_add = server_audit\nplugin_load = ed25519=auth_ed25519\nIn contrast, if the --plugin-load option is specified before\nthe --plugin-load-add option, then it will work fine,\nbecause the --plugin-load-add option does not reset the\nplugin load list. For example, in the following case, both\nplugins are properly loaded:\n \n[mariadb]\n...\nplugin_load = server_audit\nplugin_load_add = ed25519=auth_ed25519\n \nInstalling a Plugin with mysql_plugin\n \nA plugin can be installed with the mysql_plugin utility if\nthe server is completely offline. \n \nThe syntax is:\n \nmysql_plugin [options] \n ENABLE|DISABLE\n \nFor example, to install the server_audit audit plugin, you\ncould execute the following:\n \nmysql_plugin server_audit ENABLE\n \nIf a plugin is installed with this utility, then a record\nwill be added to the mysql.plugins table for the plugin.\nThis means that the plugin will automatically be loaded\nevery time the server restarts, unless specifically\nuninstalled or deactivated.\n \nConfiguring the Plugin Directory\n \nWhen a plugin is being installed, the server looks for the\nplugin\'s library in the server\'s plugin directory. This\ndirectory is configured by the plugin_dir system variable.\nThis can be specified as a command-line argument to mysqld\nor it can be specified in a relevant server option group in\nan option file. For example:\n \n[mariadb]\n...\nplugin_dir = /usr/lib64/mysql/plugin\n \nConfiguring the Minimum Plugin Maturity\n \nWhen a plugin is being installed, the server compares the\nplugin\'s maturity level against the server\'s minimum\nallowed plugin maturity. This can help prevent users from\nusing unstable plugins on production servers. This minimum\nplugin maturity is configured by the plugin_maturity system\nvariable. This can be specified as a command-line argument\nto mysqld or it can be specified in a relevant server option\ngroup in an option file. For example:\n \n[mariadb]\n...\nplugin_maturity = stable\n \nConfiguring Plugin Activation at Server Startup\n \nA plugin will be loaded by default when the server starts\nif:\nThe plugin was installed with the INSTALL SONAME statement.\nThe plugin was installed with the INSTALL PLUGIN statement.\nThe plugin was installed with the mysql_plugin utility.\nThe server is configured to load the plugin with the\n--plugin-load-add option.\nThe server is configured to load the plugin with the\n--plugin-load option.\n \nThis behavior can be changed with special options that take\nthe form --plugin-name. For example, for the server_audit\naudit plugin, the special option is called --server-audit.\n \nThe possible values for these special options are:\n \nOption Value | Description | \n \nOFF | Disables the plugin without removing it from the\nmysql.plugins table. | \n \nON | Enables the plugin. If the plugin cannot be\ninitialized, then the server will still continue starting\nup, but the plugin will be disabled. | \n \nFORCE | Enables the plugin. If the plugin cannot be\ninitialized, then the server will fail to start with an\nerror. | \n \nFORCE_PLUS_PERMANENT | Enables the plugin. If the plugin\ncannot be initialized, then the server will fail to start\nwith an error. In addition, the plugin cannot be uninstalled\nwith UNINSTALL SONAME or UNINSTALL PLUGIN while the server\nis running. | \n \nA plugin\'s status can be found by looking at the\nPLUGIN_STATUS column of the information_schema.PLUGINS\ntable.\n \nUninstalling Plugins\n \nPlugins that are found in the mysql.plugin table, that is\nthose that were installed with INSTALL SONAME, INSTALL\nPLUGIN or mysql_plugin can be uninstalled in one of two\nways:\nThe UNINSTALL SONAME or the UNINSTALL PLUGIN statement while\nthe server is running\nWith mysql_plugin while the server is offline.\n \nPlugins that were enabled as a --plugin-load option do not\nneed to be uninstalled. If --plugin-load is omitted the next\ntime the server starts, or the plugin is not listed as one\nof the --plugin-load entries, the plugin will not be loaded.\n \nUNINSTALL PLUGIN uninstalls a single installed plugin, while\nUNINSTALL SONAME uninstalls all plugins belonging to a given\nlibrary.\n \n\n\nURL: https://mariadb.com/kb/en/plugin-overview/','','https://mariadb.com/kb/en/plugin-overview/'),(83,'MBR Definition',6,'Description\n----------- \nThe MBR (Minimum Bounding Rectangle), or Envelope is the\nbounding\ngeometry, formed by the minimum and maximum (X,Y)\ncoordinates:\n \nExamples\n-------- \n((MINX MINY, MAXX MINY, MAXX MAXY, MINX MAXY, MINX MINY))\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/mbr-definition/','','https://mariadb.com/kb/en/mbr-definition/'),(84,'MBRContains',6,'Syntax\n------ \nMBRContains(g1,g2)\n \nDescription\n----------- \nReturns 1 or 0 to indicate whether the Minimum Bounding\nRectangle of\ng1 contains the Minimum Bounding Rectangle of g2. This tests\nthe\nopposite relationship as MBRWithin().\n \nExamples\n-------- \nSET @g1 = GeomFromText(\'Polygon((0 0,0 3,3 3,3 0,0 0))\');\n \nSET @g2 = GeomFromText(\'Point(1 1)\');\n \nSELECT MBRContains(@g1,@g2), MBRContains(@g2,@g1);\n+----------------------+----------------------+\n| MBRContains(@g1,@g2) | MBRContains(@g2,@g1) |\n+----------------------+----------------------+\n| 1 | 0 |\n+----------------------+----------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/mbrcontains/','','https://mariadb.com/kb/en/mbrcontains/'),(77,'TRUNCATE',4,'This page documents the TRUNCATE function. See TRUNCATE\nTABLE for the DDL statement.\n \nSyntax\n------ \nTRUNCATE(X,D)\n \nDescription\n----------- \nReturns the number X, truncated to D decimal places. If D is\n0, the\nresult has no decimal point or fractional part. D can be\nnegative to\ncause D digits left of the decimal point of the value X to\nbecome\nzero.\n \nExamples\n-------- \nSELECT TRUNCATE(1.223,1);\n+-------------------+\n| TRUNCATE(1.223,1) |\n+-------------------+\n| 1.2 |\n+-------------------+\n \nSELECT TRUNCATE(1.999,1);\n+-------------------+\n| TRUNCATE(1.999,1) |\n+-------------------+\n| 1.9 |\n+-------------------+\n \nSELECT TRUNCATE(1.999,0); \n+-------------------+\n| TRUNCATE(1.999,0) |\n+-------------------+\n| 1 |\n+-------------------+\n \nSELECT TRUNCATE(-1.999,1);\n+--------------------+\n| TRUNCATE(-1.999,1) |\n+--------------------+\n| -1.9 |\n+--------------------+\n \nSELECT TRUNCATE(122,-2);\n+------------------+\n| TRUNCATE(122,-2) |\n+------------------+\n| 100 |\n+------------------+\n \nSELECT TRUNCATE(10.28*100,0);\n+-----------------------+\n| TRUNCATE(10.28*100,0) |\n+-----------------------+\n| 1028 |\n+-----------------------+\n \n\n\nURL: https://mariadb.com/kb/en/truncate/','','https://mariadb.com/kb/en/truncate/'),(79,'INSTALL PLUGIN',5,'Syntax\n------ \nINSTALL PLUGIN [IF NOT EXISTS] plugin_name SONAME\n\'plugin_library\'\n \nDescription\n----------- \nThis statement installs an individual plugin from the\nspecified library. To install the whole library (which could\nbe required), use INSTALL SONAME.\n \nplugin_name is the name of the plugin as defined in the\nplugin declaration structure contained in the library file.\nPlugin names are\nnot case sensitive. For maximal compatibility, plugin names\nshould be limited\nto ASCII letters, digits, and underscore, because they are\nused in C source\nfiles, shell command lines, M4 and Bourne shell scripts, and\nSQL environments.\n \nplugin_library is the name of the shared library that\ncontains the plugin code. Before MariaDB 5.5.21, the name\nshould include the file name extension (for\nexample, libmyplugin.so or libmyplugin.dll). Starting from\nMariaDB 5.5.21, the file name extension can be omitted\n(which makes the statement look the same on all\narchitectures).\n \nThe shared library must be located in the plugin directory\n(that is,\nthe directory named by the plugin_dir system variable). The\nlibrary must be in the plugin directory itself, not in a\nsubdirectory. By\ndefault, plugin_dir is plugin directory under the directory\nnamed by\nthe pkglibdir configuration variable, but it can be changed\nby setting\nthe value of plugin_dir at server startup. For example, set\nits value in a my.cnf file:\n \n[mysqld]\nplugin_dir=/path/to/plugin/directory\nIf the value of plugin_dir is a relative path name, it is\ntaken to be relative to the MySQL base directory (the value\nof the basedir\nsystem variable).\n \nINSTALL PLUGIN adds a line to the mysql.plugin table that\ndescribes the plugin. This table contains the plugin name\nand library file\nname.\n \nINSTALL PLUGIN causes the server to read\noption (my.cnf) files just as during server startup. This\nenables the plugin to\npick up any relevant options from those files. It is\npossible to add plugin\noptions to an option file even before loading a plugin (if\nthe loose prefix is\nused). It is also possible to uninstall a plugin, edit\nmy.cnf, and install the\nplugin again. Restarting the plugin this way enables it to\nthe new option\nvalues without a server restart.\n \nBefore MySQL 5.1.33, a plugin was started with each option\nset to its\ndefault value.\n \nINSTALL PLUGIN also loads and initializes the plugin code to\nmake the plugin available for use. A plugin is initialized\nby executing its\ninitialization function, which handles any setup that the\nplugin must perform\nbefore it can be used.\n \nTo use INSTALL PLUGIN, you must have the\nINSERT privilege for the mysql.plugin table.\n \nAt server startup, the server loads and initializes any\nplugin that is\nlisted in the mysql.plugin table. This means that a plugin\nis installed\nwith INSTALL PLUGIN only once, not every time the server\nstarts. Plugin loading at startup does not occur if the\nserver is started with\nthe --skip-grant-tables option.\n \nWhen the server shuts down, it executes the deinitialization\nfunction\nfor each plugin that is loaded so that the plugin has a\nchance to\nperform any final cleanup.\n \nIf you need to load plugins for a single server startup when\nthe\n--skip-grant-tables option is given (which tells the server\nnot to read system tables), use the \n--plugin-load mysqld option.\n \nIF NOT EXISTS\n \nWhen the IF NOT EXISTS clause is used, MariaDB will return a\nnote instead of an error if the specified plugin already\nexists. See SHOW WARNINGS.\n \nExamples\n-------- \nINSTALL PLUGIN sphinx SONAME \'ha_sphinx.so\';\n \nStarting from MariaDB 5.5.21, the extension can be omitted:\n \nINSTALL PLUGIN innodb SONAME \'ha_xtradb\';\n \nFrom MariaDB 10.4.0:\n \nINSTALL PLUGIN IF NOT EXISTS example SONAME \'ha_example\';\n \nQuery OK, 0 rows affected (0.104 sec)\n \nINSTALL PLUGIN IF NOT EXISTS example SONAME \'ha_example\';\n \nQuery OK, 0 rows affected, 1 warning (0.000 sec)\n \nSHOW WARNINGS;\n \n+-------+------+------------------------------------+\n| Level | Code | Message |\n+-------+------+------------------------------------+\n| Note | 1968 | Plugin \'example\' already installed |\n+-------+------+------------------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/install-plugin/','','https://mariadb.com/kb/en/install-plugin/'),(86,'MBREqual',6,'Syntax\n------ \nMBREqual(g1,g2)\n \nDescription\n----------- \nReturns 1 or 0 to indicate whether the Minimum Bounding\nRectangles of\nthe two geometries g1 and g2 are the same.\n \nExamples\n-------- \nSET @g1=GEOMFROMTEXT(\'LINESTRING(0 0, 1 2)\');\nSET @g2=GEOMFROMTEXT(\'POLYGON((0 0, 0 2, 1 2, 1 0, 0\n0))\');\nSELECT MbrEqual(@g1,@g2);\n+-------------------+\n| MbrEqual(@g1,@g2) |\n+-------------------+\n| 1 |\n+-------------------+\n \nSET @g1=GEOMFROMTEXT(\'LINESTRING(0 0, 1 3)\');\nSET @g2=GEOMFROMTEXT(\'POLYGON((0 0, 0 2, 1 4, 1 0, 0\n0))\');\nSELECT MbrEqual(@g1,@g2);\n+-------------------+\n| MbrEqual(@g1,@g2) |\n+-------------------+\n| 0 |\n+-------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/mbrequal/','','https://mariadb.com/kb/en/mbrequal/'),(90,'MBRWithin',6,'Syntax\n------ \nMBRWithin(g1,g2)\n \nDescription\n----------- \nReturns 1 or 0 to indicate whether the Minimum Bounding\nRectangle of\ng1 is within the Minimum Bounding Rectangle of g2. This\ntests the\nopposite relationship as MBRContains().\n \nExamples\n-------- \nSET @g1 = GeomFromText(\'Polygon((0 0,0 3,3 3,3 0,0 0))\');\nSET @g2 = GeomFromText(\'Polygon((0 0,0 5,5 5,5 0,0 0))\');\nSELECT MBRWithin(@g1,@g2), MBRWithin(@g2,@g1);\n+--------------------+--------------------+\n| MBRWithin(@g1,@g2) | MBRWithin(@g2,@g1) |\n+--------------------+--------------------+\n| 1 | 0 |\n+--------------------+--------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/mbrwithin/','','https://mariadb.com/kb/en/mbrwithin/'),(92,'IF Function',7,'Syntax\n------ \nIF(expr1,expr2,expr3)\n \nDescription\n----------- \nIf expr1 is TRUE (expr1 0 and expr1 NULL) then IF()\nreturns expr2; otherwise it returns expr3. IF() returns a\nnumeric\nor string value, depending on the context in which it is\nused.\n \nNote: There is also an IF statement which differs from the\nIF() function described here.\n \nExamples\n-------- \nSELECT IF(1>2,2,3);\n+-------------+\n| IF(1>2,2,3) |\n+-------------+\n| 3 |\n+-------------+\n \nSELECT IF(1\n\nURL: https://mariadb.com/kb/en/if-function/','','https://mariadb.com/kb/en/if-function/'),(80,'UNINSTALL PLUGIN',5,'Syntax\n------ \nUNINSTALL PLUGIN [IF EXISTS] plugin_name\n \nDescription\n----------- \nThis statement removes a single installed plugin. To\nuninstall the whole library which contains the plugin, use\nUNINSTALL SONAME. You cannot uninstall a plugin if any table\nthat uses it is open.\n \nplugin_name must be the name of some plugin that is listed\nin the mysql.plugin table. The server executes the plugin\'s\ndeinitialization\nfunction and removes the row for the plugin from the\nmysql.plugin\ntable, so that subsequent server restarts will not load and\ninitialize\nthe plugin. UNINSTALL PLUGIN does not remove the plugin\'s\nshared library file.\n \nTo use UNINSTALL PLUGIN, you must have the\nDELETE privilege for the mysql.plugin table.\n \nIF EXISTS\n \nIf the IF EXISTS clause is used, MariaDB will return a note\ninstead of an error if the plugin does not exist. See SHOW\nWARNINGS.\n \nExamples\n-------- \nUNINSTALL PLUGIN example;\n \nFrom MariaDB 10.4.0:\n \nUNINSTALL PLUGIN IF EXISTS example;\n \nQuery OK, 0 rows affected (0.099 sec)\n \nUNINSTALL PLUGIN IF EXISTS example;\n \nQuery OK, 0 rows affected, 1 warning (0.000 sec)\n \nSHOW WARNINGS;\n \n+-------+------+-------------------------------+\n| Level | Code | Message |\n+-------+------+-------------------------------+\n| Note | 1305 | PLUGIN example does not exist |\n+-------+------+-------------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/uninstall-plugin/','','https://mariadb.com/kb/en/uninstall-plugin/'),(81,'INSTALL SONAME',5,'INSTALL SONAME has been supported since MariaDB 5.5.21.\n \nSyntax\n------ \nINSTALL SONAME \'plugin_library\'\n \nDescription\n----------- \nThis statement is a variant of INSTALL PLUGIN. It installs\nall plugins from a given plugin_library. See INSTALL PLUGIN\nfor details.\n \nplugin_library is the name of the shared library that\ncontains the plugin code. The file name extension (for\nexample, libmyplugin.so or libmyplugin.dll) can be omitted\n(which makes the statement look the same on all\narchitectures).\n \nThe shared library must be located in the plugin directory\n(that is,\nthe directory named by the plugin_dir system variable). The\nlibrary must be in the plugin directory itself, not in a\nsubdirectory. By\ndefault, plugin_dir is plugin directory under the directory\nnamed by\nthe pkglibdir configuration variable, but it can be changed\nby setting\nthe value of plugin_dir at server startup. For example, set\nits value in a my.cnf file:\n \n[mysqld]\nplugin_dir=/path/to/plugin/directory\nIf the value of plugin_dir is a relative path name, it is\ntaken to be relative to the MySQL base directory (the value\nof the basedir\nsystem variable).\n \nINSTALL SONAME adds one or more lines to the mysql.plugin\ntable that\ndescribes the plugin. This table contains the plugin name\nand library file\nname.\n \nINSTALL SONAME causes the server to read\noption (my.cnf) files just as during server startup. This\nenables the plugin to\npick up any relevant options from those files. It is\npossible to add plugin\noptions to an option file even before loading a plugin (if\nthe loose prefix is\nused). It is also possible to uninstall a plugin, edit\nmy.cnf, and install the\nplugin again. Restarting the plugin this way enables it to\nthe new option\nvalues without a server restart.\n \nINSTALL SONAME also loads and initializes the plugin code to\nmake the plugin available for use. A plugin is initialized\nby executing its\ninitialization function, which handles any setup that the\nplugin must perform\nbefore it can be used.\n \nTo use INSTALL SONAME, you must have the\nINSERT privilege for the mysql.plugin table.\n \nAt server startup, the server loads and initializes any\nplugin that is\nlisted in the mysql.plugin table. This means that a plugin\nis installed\nwith INSTALL SONAME only once, not every time the server\nstarts. Plugin loading at startup does not occur if the\nserver is started with\nthe --skip-grant-tables option.\n \nWhen the server shuts down, it executes the deinitialization\nfunction\nfor each plugin that is loaded so that the plugin has a\nchance to\nperform any final cleanup.\n \nIf you need to load plugins for a single server startup when\nthe\n--skip-grant-tables option is given (which tells the server\nnot to read system tables), use the \n--plugin-load mysqld option.\n \nIf you need to install only one plugin from a library, use\nthe INSTALL PLUGIN statement.\n \nExamples\n-------- \nTo load the XtraDB storage engine and all of its\ninformation_schema tables with one statement, use\n \nINSTALL SONAME \'ha_xtradb\';\n \nThis statement can be used instead of INSTALL PLUGIN even\nwhen the library contains only one plugin:\n \nINSTALL SONAME \'ha_sequence\';\n \n\n\nURL: https://mariadb.com/kb/en/install-soname/','','https://mariadb.com/kb/en/install-soname/'),(82,'UNINSTALL SONAME',5,'UNINSTALL SONAME has been supported since MariaDB 5.5.21.\n \nSyntax\n------ \nUNINSTALL SONAME [IF EXISTS] \'plugin_library\'\n \nDescription\n----------- \nThis statement is a variant of UNINSTALL PLUGIN statement,\nthat removes all plugins belonging to a specified\nplugin_library. See UNINSTALL PLUGIN for details.\n \nplugin_library is the name of the shared library that\ncontains the plugin code. The file name extension (for\nexample, libmyplugin.so or libmyplugin.dll) can be omitted\n(which makes the statement look the same on all\narchitectures).\n \nTo use UNINSTALL SONAME, you must have the\nDELETE privilege for the mysql.plugin table.\n \nIF EXISTS\n \nIf the IF EXISTS clause is used, MariaDB will return a note\ninstead of an error if the plugin library does not exist.\nSee SHOW WARNINGS.\n \nExamples\n-------- \nTo uninstall the XtraDB plugin and all of its\ninformation_schema tables with one statement, use\n \nUNINSTALL SONAME \'ha_xtradb\';\n \nFrom MariaDB 10.4.0:\n \nUNINSTALL SONAME IF EXISTS \'ha_example\';\n \nQuery OK, 0 rows affected (0.099 sec)\n \nUNINSTALL SONAME IF EXISTS \'ha_example\';\n \nQuery OK, 0 rows affected, 1 warning (0.000 sec)\n \nSHOW WARNINGS;\n \n+-------+------+-------------------------------------+\n| Level | Code | Message |\n+-------+------+-------------------------------------+\n| Note | 1305 | SONAME ha_example.so does not exist |\n+-------+------+-------------------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/uninstall-soname/','','https://mariadb.com/kb/en/uninstall-soname/'),(93,'IFNULL',7,'Syntax\n------ \nIFNULL(expr1,expr2)\n \nDescription\n----------- \nIf expr1 is not NULL, IFNULL() returns expr1; otherwise it\nreturns\nexpr2. IFNULL() returns a numeric or string value, depending\non the\ncontext in which it is used.\n \nExamples\n-------- \nSELECT IFNULL(1,0); \n+-------------+\n| IFNULL(1,0) |\n+-------------+\n| 1 |\n+-------------+\n \nSELECT IFNULL(NULL,10);\n+-----------------+\n| IFNULL(NULL,10) |\n+-----------------+\n| 10 |\n+-----------------+\n \nSELECT IFNULL(1/0,10);\n+----------------+\n| IFNULL(1/0,10) |\n+----------------+\n| 10.0000 |\n+----------------+\n \nSELECT IFNULL(1/0,\'yes\');\n+-------------------+\n| IFNULL(1/0,\'yes\') |\n+-------------------+\n| yes |\n+-------------------+\n \n\n\nURL: https://mariadb.com/kb/en/ifnull/','','https://mariadb.com/kb/en/ifnull/'),(94,'NULLIF',7,'Syntax\n------ \nNULLIF(expr1,expr2)\n \nDescription\n----------- \nReturns NULL if expr1 = expr2 is true, otherwise returns\nexpr1. This is\nthe same as CASE WHEN expr1 = expr2 THEN NULL ELSE expr1\nEND.\n \nExamples\n-------- \nSELECT NULLIF(1,1);\n+-------------+\n| NULLIF(1,1) |\n+-------------+\n| NULL |\n+-------------+\n \nSELECT NULLIF(1,2);\n+-------------+\n| NULLIF(1,2) |\n+-------------+\n| 1 |\n+-------------+\n \n\n\nURL: https://mariadb.com/kb/en/nullif/','','https://mariadb.com/kb/en/nullif/'),(85,'MBRDisjoint',6,'Syntax\n------ \nMBRDisjoint(g1,g2)\n \nDescription\n----------- \nReturns 1 or 0 to indicate whether the Minimum Bounding\nRectangles of the two geometries g1 and g2 are disjoint. Two\ngeometries are disjoint if they do not intersect, that is\ntouch or overlap.\n \nExamples\n-------- \nSET @g1 = GeomFromText(\'Polygon((0 0,0 3,3 3,3 0,0 0))\');\nSET @g2 = GeomFromText(\'Polygon((4 4,4 7,7 7,7 4,4 4))\');\nSELECTmbrdisjoint(@g1,@g2);\n+----------------------+\n| mbrdisjoint(@g1,@g2) |\n+----------------------+\n| 1 |\n+----------------------+\n \nSET @g1 = GeomFromText(\'Polygon((0 0,0 3,3 3,3 0,0 0))\');\nSET @g2 = GeomFromText(\'Polygon((3 3,3 6,6 6,6 3,3 3))\');\nSELECT mbrdisjoint(@g1,@g2);\n+----------------------+\n| mbrdisjoint(@g1,@g2) |\n+----------------------+\n| 0 |\n+----------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/mbrdisjoint/','','https://mariadb.com/kb/en/mbrdisjoint/'),(87,'MBRIntersects',6,'Syntax\n------ \nMBRIntersects(g1,g2)\n \nDescription\n----------- \nReturns 1 or 0 to indicate whether the Minimum Bounding\nRectangles of the two geometries g1 and g2 intersect.\n \nExamples\n-------- \nSET @g1 = GeomFromText(\'Polygon((0 0,0 3,3 3,3 0,0 0))\');\nSET @g2 = GeomFromText(\'Polygon((3 3,3 6,6 6,6 3,3 3))\');\nSELECT mbrintersects(@g1,@g2);\n+------------------------+\n| mbrintersects(@g1,@g2) |\n+------------------------+\n| 1 |\n+------------------------+\n \nSET @g1 = GeomFromText(\'Polygon((0 0,0 3,3 3,3 0,0 0))\');\nSET @g2 = GeomFromText(\'Polygon((4 4,4 7,7 7,7 4,4 4))\');\nSELECT mbrintersects(@g1,@g2);\n+------------------------+\n| mbrintersects(@g1,@g2) |\n+------------------------+\n| 0 |\n+------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/mbrintersects/','','https://mariadb.com/kb/en/mbrintersects/'),(88,'MBROverlaps',6,'Syntax\n------ \nMBROverlaps(g1,g2)\n \nDescription\n----------- \nReturns 1 or 0 to indicate whether the Minimum Bounding\nRectangles of\nthe two geometries g1 and g2 overlap. The term spatially\noverlaps is\nused if two geometries intersect and their intersection\nresults in a\ngeometry of the same dimension but not equal to either of\nthe given\ngeometries.\n \nExamples\n-------- \nSET @g1 = GeomFromText(\'Polygon((0 0,0 3,3 3,3 0,0 0))\');\nSET @g2 = GeomFromText(\'Polygon((4 4,4 7,7 7,7 4,4 4))\');\nSELECT mbroverlaps(@g1,@g2);\n+----------------------+\n| mbroverlaps(@g1,@g2) |\n+----------------------+\n| 0 |\n+----------------------+\n \nSET @g1 = GeomFromText(\'Polygon((0 0,0 3,3 3,3 0,0 0))\');\nSET @g2 = GeomFromText(\'Polygon((3 3,3 6,6 6,6 3,3 3))\');\nSELECT mbroverlaps(@g1,@g2);\n+----------------------+\n| mbroverlaps(@g1,@g2) |\n+----------------------+\n| 0 |\n+----------------------+\n \nSET @g1 = GeomFromText(\'Polygon((0 0,0 4,4 4,4 0,0 0))\');\nSET @g2 = GeomFromText(\'Polygon((3 3,3 6,6 6,6 3,3 3))\');\nSELECT mbroverlaps(@g1,@g2);\n+----------------------+\n| mbroverlaps(@g1,@g2) |\n+----------------------+\n| 1 |\n+----------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/mbroverlaps/','','https://mariadb.com/kb/en/mbroverlaps/'),(89,'MBRTouches',6,'Syntax\n------ \nMBRTouches(g1,g2)\n \nDescription\n----------- \nReturns 1 or 0 to indicate whether the Minimum Bounding\nRectangles of\nthe two geometries g1 and g2 touch. Two geometries spatially\ntouch if\nthe interiors of the geometries do not intersect, but the\nboundary of\none of the geometries intersects either the boundary or the\ninterior\nof the other.\n \nExamples\n-------- \nSET @g1 = GeomFromText(\'Polygon((0 0,0 3,3 3,3 0,0 0))\');\nSET @g2 = GeomFromText(\'Polygon((4 4,4 7,7 7,7 4,4 4))\');\nSELECT mbrtouches(@g1,@g2);\n+---------------------+\n| mbrtouches(@g1,@g2) |\n+---------------------+\n| 0 |\n+---------------------+\n \nSET @g1 = GeomFromText(\'Polygon((0 0,0 3,3 3,3 0,0 0))\');\nSET @g2 = GeomFromText(\'Polygon((3 3,3 6,6 6,6 3,3 3))\');\nSELECT mbrtouches(@g1,@g2);\n+---------------------+\n| mbrtouches(@g1,@g2) |\n+---------------------+\n| 1 |\n+---------------------+\n \nSET @g1 = GeomFromText(\'Polygon((0 0,0 4,4 4,4 0,0 0))\');\nSET @g2 = GeomFromText(\'Polygon((3 3,3 6,6 6,6 3,3 3))\');\nSELECT mbrtouches(@g1,@g2);\n+---------------------+\n| mbrtouches(@g1,@g2) |\n+---------------------+\n| 0 |\n+---------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/mbrtouches/','','https://mariadb.com/kb/en/mbrtouches/'),(91,'CASE OPERATOR',7,'Syntax\n------ \nCASE value WHEN [compare_value] THEN result [WHEN\n[compare_value] THEN\nresult ...] [ELSE result] END\n \nCASE WHEN [condition] THEN result [WHEN [condition] THEN\nresult ...]\n[ELSE result] END\n \nDescription\n----------- \nThe first version returns the result where\nvalue=compare_value. The\nsecond version returns the result for the first condition\nthat is\ntrue. If there was no matching result value, the result\nafter ELSE is\nreturned, or NULL if there is no ELSE part.\n \nThere is also a CASE statement, which differs from the CASE\noperator described here.\n \nExamples\n-------- \nSELECT CASE 1 WHEN 1 THEN \'one\' WHEN 2 THEN \'two\' ELSE\n\'more\' END;\n \n+------------------------------------------------------------+\n| CASE 1 WHEN 1 THEN \'one\' WHEN 2 THEN \'two\' ELSE\n\'more\' END |\n+------------------------------------------------------------+\n| one |\n+------------------------------------------------------------+\n \nSELECT CASE WHEN 1>0 THEN \'true\' ELSE \'false\' END;\n \n+--------------------------------------------+\n| CASE WHEN 1>0 THEN \'true\' ELSE \'false\' END |\n+--------------------------------------------+\n| true |\n+--------------------------------------------+\n \nSELECT CASE BINARY \'B\' WHEN \'a\' THEN 1 WHEN \'b\' THEN 2\nEND;\n \n+-----------------------------------------------------+\n| CASE BINARY \'B\' WHEN \'a\' THEN 1 WHEN \'b\' THEN 2 END\n|\n+-----------------------------------------------------+\n| NULL |\n+-----------------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/case-operator/','','https://mariadb.com/kb/en/case-operator/'),(95,'CHANGE MASTER TO',8,'Syntax\n------ \nCHANGE MASTER [\'connection_name\'] TO master_def [,\nmaster_def] ...\n \nmaster_def:\n MASTER_BIND = \'interface_name\'\n | MASTER_HOST = \'host_name\'[\n | MASTER_USER = \'user_name\'\n | MASTER_PASSWORD = \'password\'\n | MASTER_PORT = port_num\n | MASTER_CONNECT_RETRY = interval\n | MASTER_HEARTBEAT_PERIOD = interval\n | MASTER_LOG_FILE = \'master_log_name\'\n | MASTER_LOG_POS = master_log_pos\n | RELAY_LOG_FILE = \'relay_log_name\'\n | RELAY_LOG_POS = relay_log_pos\n | MASTER_DELAY = interval\n | MASTER_SSL = {0|1}\n | MASTER_SSL_CA = \'ca_file_name\'\n | MASTER_SSL_CAPATH = \'ca_directory_name\'\n | MASTER_SSL_CERT = \'cert_file_name\'\n | MASTER_SSL_CRL = \'crl_file_name\'\n | MASTER_SSL_CRLPATH = \'crl_directory_name\'\n | MASTER_SSL_KEY = \'key_file_name\'\n | MASTER_SSL_CIPHER = \'cipher_list\'\n | MASTER_SSL_VERIFY_SERVER_CERT = {0|1}\n | MASTER_USE_GTID = {current_pos|slave_pos|no}\n | IGNORE_SERVER_IDS = (server_id_list)\n | DO_DOMAIN_IDS = ([N,..])\n | IGNORE_DOMAIN_IDS = ([N,..])\n \nDescription\n----------- \nThe CHANGE MASTER statement sets the options that a\nreplication slave uses to connect to and replicate from a\nreplication master. \n \nMariaDB until 10.0.7\n \nIn MariaDB 10.0.7 and before, the relay_log_purge system\nvariable was silently set to 0 when CHANGE MASTER was\nexecuted.\n \nMulti-Source Replication\n \nMulti-source replication was added in MariaDB 10.0.1.\n \nIf you are using multi-source replication, then you need to\nspecify a connection name when you execute CHANGE MASTER.\nThere are two ways to do this:\nSetting the default_master_connection system variable prior\nto executing CHANGE MASTER.\nSetting the connection_name parameter when executing CHANGE\nMASTER.\n \ndefault_master_connection\n \nSET default_master_connection = \'gandalf\';\n \nSTOP SLAVE;\n \nCHANGE MASTER TO \n MASTER_PASSWORD=\'new3cret\';\n \nSTART SLAVE;\n \nconnection_name\n \nSTOP SLAVE \'gandalf\';\n \nCHANGE MASTER \'gandalf\' TO \n MASTER_PASSWORD=\'new3cret\';\n \nSTART SLAVE \'gandalf\';\n \nOptions\n \nConnection Options\n \nMASTER_USER\n \nThe MASTER_USER option for CHANGE MASTER defines the user\naccount that the replication slave will use to connect to\nthe replication master.\n \nThis user account will need the REPLICATION SLAVE privilege\non the master.\n \nFor example:\n \nSTOP SLAVE;\n \nCHANGE MASTER TO\n MASTER_USER=\'repl\',\n MASTER_PASSWORD=\'new3cret\';\n \nSTART SLAVE;\n \nMASTER_PASSWORD\n \nThe MASTER_USER option for CHANGE MASTER defines the\npassword that the replication slave will use to connect to\nthe replication master as the user account defined by the\nMASTER_USER option.\n \nFor example:\n \nSTOP SLAVE;\n \nCHANGE MASTER TO \n MASTER_PASSWORD=\'new3cret\';\n \nSTART SLAVE;\n \nMASTER_HOST\n \nThe MASTER_HOST option for CHANGE MASTER defines the\nhostname or IP address of the replication master.\n \nIf you set the value of the MASTER_HOST option to the empty\nstring, then that is not the same as not setting the\noption\'s value at all. In MariaDB 5.5 and later, if you set\nthe value of the MASTER_HOST option to the empty string,\nthen the CHANGE MASTER command will fail with an error. In\nMariaDB 5.3 and before, if you set the value of the\nMASTER_HOST option to the empty string, then the CHANGE\nMASTER command would succeed, but the subsequent START SLAVE\ncommand would fail.\n \nFor example:\n \nSTOP SLAVE;\n \nCHANGE MASTER TO\n MASTER_HOST=\'dbserver1.example.com\',\n MASTER_USER=\'repl\',\n MASTER_PASSWORD=\'new3cret\',\n MASTER_USE_GTID=slave_pos;\n \nSTART SLAVE;\n \nIf you set the value of the MASTER_HOST option in a CHANGE\nMASTER command, then the slave assumes that the master is\ndifferent from before, even if you set the value of this\noption to the same value it had previously. In this\nscenario, the slave will consider the old values for the\nmaster\'s binary\nlog file name and position to be invalid for the new master.\nAs a side effect, if you do not explicitly set the values of\nthe MASTER_LOG_FILE and MASTER_LOG_POS options in the\nstatement, then the statement will be implicitly appended\nwith MASTER_LOG_FILE=\'\' and MASTER_LOG_POS=4. However, if\nyou enable GTID mode for replication by setting the\nMASTER_USE_GTID option to some value other than no in the\nstatement, then these values will effectively be ignored\nanyway.\n \nReplication slaves cannot connect to replication masters\nusing Unix socket files or Windows named pipes. The\nreplication slave must connect to the replication master\nusing TCP/IP.\n \nMASTER_PORT\n \nThe MASTER_PORT option for CHANGE MASTER defines the TCP/IP\nport of the replication master.\n \nFor example:\n \nSTOP SLAVE;\n \nCHANGE MASTER TO\n MASTER_HOST=\'dbserver1.example.com\',\n MASTER_PORT=3307,\n MASTER_USER=\'repl\',\n MASTER_PASSWORD=\'new3cret\',\n MASTER_USE_GTID=slave_pos;\n \nSTART SLAVE;\n \nIf you set the value of the MASTER_PORT option in a CHANGE\nMASTER command, then the slave assumes that the master is\ndifferent from before, even if you set the value of this\noption to the same value it had previously. In this\nscenario, the slave will consider the old values for the\nmaster\'s binary\nlog file name and position to be invalid for the new master.\nAs a side effect, if you do not explicitly set the values of\nthe MASTER_LOG_FILE and MASTER_LOG_POS options in the\nstatement, then the statement will be implicitly appended\nwith MASTER_LOG_FILE=\'\' and MASTER_LOG_POS=4. However, if\nyou enable GTID mode for replication by setting the\nMASTER_USE_GTID option to some value other than no in the\nstatement, then these values will effectively be ignored\nanyway.\n \nReplication slaves cannot connect to replication masters\nusing Unix socket files or Windows named pipes. The\nreplication slave must connect to the replication master\nusing TCP/IP.\n \nMASTER_CONNECT_RETRY\n \nThe MASTER_CONNECT_RETRY option for CHANGE MASTER defines\nhow many seconds that the slave will wait between connection\nretries. The default is 60.\n \nSTOP SLAVE;\n \nCHANGE MASTER TO \n MASTER_CONNECT_RETRY=20;\n \nSTART SLAVE;\n \nThe number of connection attempts is limited by the\nmaster_retry_count option. It can be set either on the\ncommand-line or in a server option group in an option file\nprior to starting up the server. For example:\n \n[mariadb]\n...\nmaster_retry_count=4294967295\n \nMASTER_BIND\n \nThe MASTER_BIND option for CHANGE MASTER is only supported\nby MySQL 5.6.2 and later and by MySQL NDB Cluster 7.3.1 and\nlater. This option is not yet supported by MariaDB. See\nMDEV-19248 for more information.\n \nThe MASTER_BIND option for CHANGE MASTER can be used on\nreplication slaves that have multiple network interfaces to\nchoose which network interface the slave will use to connect\nto the master.\n \nMASTER_HEARTBEAT_PERIOD\n \nThe MASTER_HEARTBEAT_PERIOD option for CHANGE MASTER can be\nused to set the interval in seconds between replication\nheartbeats. Whenever the master\'s binary log is updated\nwith an event, the waiting period for the next heartbeat is\nreset.\n \nThis option\'s interval argument has the following\ncharacteristics:\nIt is a decimal value with a range of 0 to 4294967 seconds.\nIt has a resolution of hundredths of a second.\nIts smallest valid non-zero value is 0.001.\nIts default value is the value of the slave_net_timeout\nsystem variable divided by 2.\nIf it\'s set to 0, then heartbeats are disabled.\n \nHeartbeats are sent by the master only if there are no\nunsent events in the binary log file for a period longer\nthan the interval.\n \nIf the RESET SLAVE statement is executed, then the heartbeat\ninterval is reset to the default.\n \nIf the slave_net_timeout system variable is set to a value\nthat is lower than the current heartbeat interval, then a\nwarning will be issued.\n \nTLS Options\n \nThe TLS options are used for providing information about\nTLS. The options can be set even on slaves that are compiled\nwithout TLS support. The TLS options are saved to either the\ndefault master.info file or the file that is configured by\nthe master_info_file option, but these TLS options are\nignored unless the slave supports TLS.\n \nSee Replication with Secure Connections for more\ninformation.\n \nMASTER_SSL\n \nThe MASTER_SSL option for CHANGE MASTER tells the slave\nwhether to force TLS for the connection. The valid values\nare 0 or 1.\n \nFor example:\n \nSTOP SLAVE;\n \nCHANGE MASTER TO\n MASTER_SSL=1;\n \nSTART SLAVE;\n \nMASTER_SSL_CA\n \nThe MASTER_SSL_CA option for CHANGE MASTER defines a path to\na PEM file that should contain one or more X509 certificates\nfor trusted Certificate Authorities (CAs) to use for TLS.\nThis option requires that you use the absolute path, not a\nrelative path. This option implies the MASTER_SSL option.\n \nFor example:\n \nSTOP SLAVE;\n \nCHANGE MASTER TO\n MASTER_SSL_CERT=\'/etc/my.cnf.d/certificates/server-cert.pem\',\n MASTER_SSL_KEY=\'/etc/my.cnf.d/certificates/server-key.pem\',\n MASTER_SSL_CA=\'/etc/my.cnf.d/certificates/ca.pem\',\n MASTER_SSL_VERIFY_SERVER_CERT=1;\n \nSTART SLAVE;\n \nSee Secure Connections Overview: Certificate Authorities\n(CAs) for more information.\n \nMASTER_SSL_CAPATH\n \nThe MASTER_SSL_CAPATH option for CHANGE MASTER defines a\npath to a directory that contains one or more PEM files that\nshould each contain one X509 certificate for a trusted\nCertificate Authority (CA) to use for TLS. This option\nrequires that you use the absolute path, not a relative\npath. The directory specified by this option needs to be run\nthrough the openssl rehash command. This option implies the\nMASTER_SSL option.\n \nFor example:\n \nSTOP SLAVE;\n \nCHANGE MASTER TO\n MASTER_SSL_CERT=\'/etc/my.cnf.d/certificates/server-cert.pem\',\n MASTER_SSL_KEY=\'/etc/my.cnf.d/certificates/server-key.pem\',\n MASTER_SSL_CAPATH=\'/etc/my.cnf.d/certificates/ca/\',\n MASTER_SSL_VERIFY_SERVER_CERT=1;\n \nSTART SLAVE;\n \nSee Secure Connections Overview: Certificate Authorities\n(CAs) for more information.\n \nMASTER_SSL_CERT\n \nThe MASTER_SSL_CERT option for CHANGE MASTER defines a path\nto the X509 certificate file to use for TLS. This option\nrequires that you use the absolute path, not a relative\npath. This option implies the MASTER_SSL option.\n \nFor example:\n \nSTOP SLAVE;\n \nCHANGE MASTER TO\n MASTER_SSL_CERT=\'/etc/my.cnf.d/certificates/server-cert.pem\',\n MASTER_SSL_KEY=\'/etc/my.cnf.d/certificates/server-key.pem\',\n MASTER_SSL_CA=\'/etc/my.cnf.d/certificates/ca.pem\',\n MASTER_SSL_VERIFY_SERVER_CERT=1;\n \nSTART SLAVE;\n \nMASTER_SSL_CRL\n \nThe MASTER_SSL_CRL option for CHANGE MASTER defines a path\nto a PEM file that should contain one or more revoked X509\ncertificates to use for TLS. This option requires that you\nuse the absolute path, not a relative path.\n \nThis option is only supported if the server was built with\nOpenSSL. If the server was built with yaSSL, then this\noption is not supported. See TLS and Cryptography Libraries\nUsed by MariaDB for more information about which libraries\nare used on which platforms.\n \nFor example:\n \nSTOP SLAVE;\n \nCHANGE MASTER TO\n MASTER_SSL_CERT=\'/etc/my.cnf.d/certificates/server-cert.pem\',\n MASTER_SSL_KEY=\'/etc/my.cnf.d/certificates/server-key.pem\',\n MASTER_SSL_CA=\'/etc/my.cnf.d/certificates/ca.pem\',\n MASTER_SSL_VERIFY_SERVER_CERT=1,\n MASTER_SSL_CRL=\'/etc/my.cnf.d/certificates/crl.pem\';\n \nSTART SLAVE;\n \nSee Secure Connections Overview: Certificate Revocation\nLists (CRLs) for more information.\n \nMASTER_SSL_CRLPATH\n \nThe MASTER_SSL_CRLPATH option for CHANGE MASTER defines a\npath to a directory that contains one or more PEM files that\nshould each contain one revoked X509 certificate to use for\nTLS. This option requires that you use the absolute path,\nnot a relative path. The directory specified by this\nvariable needs to be run through the openssl rehash command.\n \nThis option is only supported if the server was built with\nOpenSSL. If the server was built with yaSSL, then this\noption is not supported. See TLS and Cryptography Libraries\nUsed by MariaDB for more information about which libraries\nare used on which platforms.\n \nFor example:\n \nSTOP SLAVE;\n \nCHANGE MASTER TO\n MASTER_SSL_CERT=\'/etc/my.cnf.d/certificates/server-cert.pem\',\n MASTER_SSL_KEY=\'/etc/my.cnf.d/certificates/server-key.pem\',\n MASTER_SSL_CA=\'/etc/my.cnf.d/certificates/ca.pem\',\n MASTER_SSL_VERIFY_SERVER_CERT=1,\n MASTER_SSL_CRLPATH=\'/etc/my.cnf.d/certificates/crl/\';\n \nSTART SLAVE;\n \nSee Secure Connections Overview: Certificate Revocation\nLists (CRLs) for more information.\n \nMASTER_SSL_KEY\n \nThe MASTER_SSL_KEY option for CHANGE MASTER defines a path\nto a private key file to use for TLS. This option requires\nthat you use the absolute path, not a relative path. This\noption implies the MASTER_SSL option.\n \nFor example:\n \nSTOP SLAVE;\n \nCHANGE MASTER TO\n MASTER_SSL_CERT=\'/etc/my.cnf.d/certificates/server-cert.pem\',\n MASTER_SSL_KEY=\'/etc/my.cnf.d/certificates/server-key.pem\',\n MASTER_SSL_CA=\'/etc/my.cnf.d/certificates/ca.pem\',\n MASTER_SSL_VERIFY_SERVER_CERT=1;\n \nSTART SLAVE;\n \nMASTER_SSL_CIPHER\n \nThe MASTER_SSL_CIPHER option for CHANGE MASTER defines the\nlist of permitted ciphers or cipher suites to use for TLS.\nBesides cipher names, if MariaDB was compiled with OpenSSL,\nthis option could be set to \"SSLv3\" or \"TLSv1.2\" to\nallow all SSLv3 or all TLSv1.2 ciphers. Note that the\nTLSv1.3 ciphers cannot be excluded when using OpenSSL, even\nby using this option. See Using TLSv1.3 for details. This\noption implies the MASTER_SSL option.\n \nFor example:\n \nSTOP SLAVE;\n \nCHANGE MASTER TO\n MASTER_SSL_CERT=\'/etc/my.cnf.d/certificates/server-cert.pem\',\n MASTER_SSL_KEY=\'/etc/my.cnf.d/certificates/server-key.pem\',\n MASTER_SSL_CA=\'/etc/my.cnf.d/certificates/ca.pem\',\n MASTER_SSL_VERIFY_SERVER_CERT=1,\n MASTER_SSL_CIPHER=\'TLSv1.2\';\n \nSTART SLAVE;\n \nMASTER_SSL_VERIFY_SERVER_CERT\n \nThe MASTER_SSL_VERIFY_SERVER_CERT option for CHANGE MASTER\nenables server certificate verification. This option is\ndisabled by default.\n \nFor example:\n \nSTOP SLAVE;\n \nCHANGE MASTER TO\n MASTER_SSL_CERT=\'/etc/my.cnf.d/certificates/server-cert.pem\',\n MASTER_SSL_KEY=\'/etc/my.cnf.d/certificates/server-key.pem\',\n MASTER_SSL_CA=\'/etc/my.cnf.d/certificates/ca.pem\',\n MASTER_SSL_VERIFY_SERVER_CERT=1;\n \nSTART SLAVE;\n \nSee Secure Connections Overview: Server Certificate\nVerification for more information.\n \nBinary Log Options\n \nThese options are related to the binary log position on the\nmaster.\n \nMASTER_LOG_FILE\n \nThe MASTER_LOG_FILE option for CHANGE MASTER can be used\nalong with MASTER_LOG_POS to specify the coordinates at\nwhich the slave\'s I/O thread should begin reading from the\nmaster\'s binary logs the next time the thread starts.\n \nFor example:\n \nSTOP SLAVE;\n \nCHANGE MASTER TO\n MASTER_LOG_FILE=\'master2-bin.001\',\n MASTER_LOG_POS=4;\n \nSTART SLAVE;\n \nThe MASTER_LOG_FILE and MASTER_LOG_POS options cannot be\nspecified if the RELAY_LOG_FILE and RELAY_LOG_POS options\nwere also specified.\n \nThe MASTER_LOG_FILE and MASTER_LOG_POS options are\neffectively ignored if you enable GTID mode for replication\nby setting the MASTER_USE_GTID option to some value other\nthan no in the statement.\n \nMASTER_LOG_POS\n \nThe MASTER_LOG_POS option for CHANGE MASTER can be used\nalong with MASTER_LOG_FILE to specify the coordinates at\nwhich the slave\'s I/O thread should begin reading from the\nmaster\'s binary logs the next time the thread starts.\n \nFor example:\n \nSTOP SLAVE;\n \nCHANGE MASTER TO\n MASTER_LOG_FILE=\'master2-bin.001\',\n MASTER_LOG_POS=4;\n \nSTART SLAVE;\n \nThe MASTER_LOG_FILE and MASTER_LOG_POS options cannot be\nspecified if the RELAY_LOG_FILE and RELAY_LOG_POS options\nwere also specified.\n \nThe MASTER_LOG_FILE and MASTER_LOG_POS options are\neffectively ignored if you enable GTID mode for replication\nby setting the MASTER_USE_GTID option to some value other\nthan no in the statement.\n \nRelay Log Options\n \nThese options are related to the relay log position on the\nslave.\n \nRELAY_LOG_FILE\n \nThe RELAY_LOG_FILE option for CHANGE MASTER can be used\nalong with the RELAY_LOG_POS option to specify the\ncoordinates at which the slave\'s SQL thread should begin\nreading from the relay log the next time the thread starts.\n \nThe CHANGE MASTER statement usually deletes all relay log\nfiles. However, if the RELAY_LOG_FILE and/or RELAY_LOG_POS\noptions are specified, then existing relay log files are\nkept.\n \nWhen you want to change the relay log position, you only\nneed to stop the slave\'s SQL thread. The slave\'s I/O\nthread can continue running. The STOP SLAVE and START SLAVE\nstatements support the SQL_THREAD option for this scenario.\nFor example:\n \nSTOP SLAVE SQL_THREAD;\n \nCHANGE MASTER TO\n RELAY_LOG_FILE=\'slave-relay-bin.006\',\n RELAY_LOG_POS=4025;\n \nSTART SLAVE SQL_THREAD;\n \nWhen the value of this option is changed, the metadata about\nthe slave\'s SQL thread\'s position in the relay logs will\nalso be changed in the relay-log.info file or the file that\nis configured by the relay_log_info_file system variable.\n \nThe RELAY_LOG_FILE and RELAY_LOG_POS options cannot be\nspecified if the MASTER_LOG_FILE and MASTER_LOG_POS options\nwere also specified.\n \nRELAY_LOG_POS\n \nThe RELAY_LOG_POS option for CHANGE MASTER can be used along\nwith the RELAY_LOG_FILE option to specify the coordinates at\nwhich the slave\'s SQL thread should begin reading from the\nrelay log the next time the thread starts.\n \nThe CHANGE MASTER statement usually deletes all relay log\nfiles. However, if the RELAY_LOG_FILE and/or RELAY_LOG_POS\noptions are specified, then existing relay log files are\nkept.\n \nWhen you want to change the relay log position, you only\nneed to stop the slave\'s SQL thread. The slave\'s I/O\nthread can continue running. The STOP SLAVE and START SLAVE\nstatements support the SQL_THREAD option for this scenario.\nFor example:\n \nSTOP SLAVE SQL_THREAD;\n \nCHANGE MASTER TO\n RELAY_LOG_FILE=\'slave-relay-bin.006\',\n RELAY_LOG_POS=4025;\n \nSTART SLAVE SQL_THREAD;\n \nWhen the value of this option is changed, the metadata about\nthe slave\'s SQL thread\'s position in the relay logs will\nalso be changed in the relay-log.info file or the file that\nis configured by the relay_log_info_file system variable.\n \nThe RELAY_LOG_FILE and RELAY_LOG_POS options cannot be\nspecified if the MASTER_LOG_FILE and MASTER_LOG_POS options\nwere also specified.\n \nGTID Options\n \nMASTER_USE_GTID\n \nThe MASTER_USE_GTID option for CHANGE MASTER was first added\nin MariaDB 10.0.2 to enable replication with Global\nTransaction IDs (GTIDs).\n \nThe MASTER_USE_GTID option for CHANGE MASTER can be used to\nconfigure the slave to use the global transaction ID (GTID)\nwhen connecting to a master. The possible values are:\ncurrent_pos - Replicate in GTID mode and use\ngtid_current_pos as the position to start downloading\ntransactions from the master.\nslave_pos - Replicate in GTID mode and use gtid_slave_pos as\nthe position to start downloading transactions from the\nmaster.\nno - Don\'t replicate in GTID mode.\n \nFor example:\n \nSTOP SLAVE;\n \nCHANGE MASTER TO\n MASTER_USE_GTID = current_pos;\n \nSTART SLAVE;\n \nOr:\n \nSTOP SLAVE;\n \nSET GLOBAL gtid_slave_pos=\'0-1-153\';\n \nCHANGE MASTER TO\n MASTER_USE_GTID = slave_pos;\n \nSTART SLAVE;\n \nReplication Filter Options\n \nIGNORE_SERVER_IDS\n \nThe IGNORE_SERVER_IDS option for CHANGE MASTER can be used\nto configure a replication slave to ignore binary log events\nthat originated from certain servers. Filtered binary log\nevents will not get logged to the slave’s relay log, and\nthey will not be applied by the slave.\n \nThe option\'s value can be specified by providing a\ncomma-separated list of server_id values. For example:\n \nSTOP SLAVE;\n \nCHANGE MASTER TO \n IGNORE_SERVER_IDS = (3,5);\nSTART SLAVE;\n \nIf you would like to clear a previously set list, then you\ncan set the value to an empty list. For example:\n \nSTOP SLAVE;\n \nCHANGE MASTER TO \n IGNORE_SERVER_IDS = ();\nSTART SLAVE;\n \nDO_DOMAIN_IDS\n \nThe DO_DOMAIN_IDS option for CHANGE MASTER was first added\nin MariaDB 10.1.2.\n \nThe DO_DOMAIN_IDS option for CHANGE MASTER can be used to\nconfigure a replication slave to only apply binary log\nevents if the transaction\'s GTID is in a specific\ngtid_domain_id value. Filtered binary log events will not\nget logged to the slave’s relay log, and they will not be\napplied by the slave.\n \nThe option\'s value can be specified by providing a\ncomma-separated list of gtid_domain_id values. Duplicate\nvalues are automatically ignored. For example:\n \nSTOP SLAVE;\n \nCHANGE MASTER TO \n DO_DOMAIN_IDS = (1,2);\nSTART SLAVE;\n \nIf you would like to clear a previously set list, then you\ncan set the value to an empty list. For example:\n \nSTOP SLAVE;\n \nCHANGE MASTER TO \n DO_DOMAIN_IDS = ();\nSTART SLAVE;\n \nThe DO_DOMAIN_IDS option and the IGNORE_DOMAIN_IDS option\ncannot both be set to non-empty values at the same time. If\nyou want to set the DO_DOMAIN_IDS option, and the\nIGNORE_DOMAIN_IDS option was previously set, then you need\nto clear the value of the IGNORE_DOMAIN_IDS option. For\nexample:\n \nSTOP SLAVE;\n \nCHANGE MASTER TO \n IGNORE_DOMAIN_IDS = (), \n DO_DOMAIN_IDS = (1,2);\nSTART SLAVE;\n \nThe DO_DOMAIN_IDS option can only be specified if the slave\nis replicating in GTID mode. Therefore, the MASTER_USE_GTID\noption must also be set to some value other than no in order\nto use this option.\n \nIGNORE_DOMAIN_IDS\n \nThe IGNORE_DOMAIN_IDS option for CHANGE MASTER was first\nadded in MariaDB 10.1.2.\n \nThe IGNORE_DOMAIN_IDS option for CHANGE MASTER can be used\nto configure a replication slave to ignore binary log events\nif the transaction\'s GTID is in a specific gtid_domain_id\nvalue. Filtered binary log events will not get logged to the\nslave’s relay log, and they will not be applied by the\nslave.\n \nThe option\'s value can be specified by providing a\ncomma-separated list of gtid_domain_id values. Duplicate\nvalues are automatically ignored. For example:\n \nSTOP SLAVE;\n \nCHANGE MASTER TO \n IGNORE_DOMAIN_IDS = (1,2);\nSTART SLAVE;\n \nIf you would like to clear a previously set list, then you\ncan set the value to an empty list. For example:\n \nSTOP SLAVE;\n \nCHANGE MASTER TO \n IGNORE_DOMAIN_IDS = ();\nSTART SLAVE;\n \nThe DO_DOMAIN_IDS option and the IGNORE_DOMAIN_IDS option\ncannot both be set to non-empty values at the same time. If\nyou want to set the IGNORE_DOMAIN_IDS option, and the\nDO_DOMAIN_IDS option was previously set, then you need to\nclear the value of the DO_DOMAIN_IDS option. For example:\n \nSTOP SLAVE;\n \nCHANGE MASTER TO \n DO_DOMAIN_IDS = (), \n IGNORE_DOMAIN_IDS = (1,2);\nSTART SLAVE;\n \nThe IGNORE_DOMAIN_IDS option can only be specified if the\nslave is replicating in GTID mode. Therefore, the\nMASTER_USE_GTID option must also be set to some value other\nthan no in order to use this option.\n \nDelayed Replication Options\n \nMASTER_DELAY\n \nThe MASTER_DELAY option for CHANGE MASTER was first added in\nMariaDB 10.2.3 to enable delayed replication.\n \nThe MASTER_DELAY option for CHANGE MASTER can be used to\nenable delayed replication. This option specifies the time\nin seconds (at least) that a replication slave should lag\nbehind the master. Before executing an event, the slave will\nfirst wait, if necessary, until the given time has passed\nsince the event was created on the master. The result is\nthat the slave will reflect the state of the master some\ntime back in the past. The default is zero, no delay.\n \nSTOP SLAVE;\n \nCHANGE MASTER TO \n MASTER_DELAY=3600;\n \nSTART SLAVE;\n \nChanging Option Values\n \nIf you don\'t specify a given option when executing the\nCHANGE MASTER statement, then the option keeps its old value\nin most cases. Most of the time, there is no need to specify\nthe options that do not need to change. For example, if the\npassword for the user account that the slave uses to connect\nto its master has changed, but no other options need to\nchange, then you can just change the MASTER_PASSWORD option\nby executing the following commands:\n \nSTOP SLAVE;\n \nCHANGE MASTER TO \n MASTER_PASSWORD=\'new3cret\';\n \nSTART SLAVE;\n \nThere are some cases where options are implicitly reset,\nsuch as when the MASTER_HOST and MASTER_PORT options are\nchanged.\n \nOption Persistence\n \nThe values of the MASTER_LOG_FILE and MASTER_LOG_POS options\n(i.e. the binary log position on the master) and most other\noptions are written to either the default master.info file\nor the file that is configured by the master_info_file\noption. The slave\'s I/O thread keeps this binary log\nposition updated as it downloads events only when\nMASTER_USE_GTID option\n is set to NO. Otherwise the file is not updated on a per\nevent basis.\n \nThe master_info_file option can be set either on the\ncommand-line or in a server option group in an option file\nprior to starting up the server. For example:\n \n[mariadb]\n...\nmaster_info_file=/mariadb/myserver1-master.info\n \nThe values of the RELAY_LOG_FILE and RELAY_LOG_POS options\n(i.e. the relay log position) are written to either the\ndefault relay-log.info file or the file that is configured\nby the relay_log_info_file system variable. The slave\'s SQL\nthread keeps this relay log position updated as it applies\nevents.\n \nThe relay_log_info_file system variable can be set either on\nthe command-line or in a server option group in an option\nfile prior to starting up the server. For example:\n \n[mariadb]\n...\nrelay_log_info_file=/mariadb/myserver1-relay-log.info\n \nGTID Persistence\n \nIf the slave is replicating binary log events that contain\nGTIDs, then the slave\'s SQL thread will write every GTID\nthat it applies to the mysql.gtid_slave_pos table. This GTID\ncan be inspected and modified through the gtid_slave_pos\nsystem variable.\n \nIf the slave has the log_slave_updates system variable\nenabled and if the slave has the binary log enabled, then\nevery write by the slave\'s SQL thread will also go into the\nslave\'s binary log. This means that GTIDs of replicated\ntransactions would be reflected in the value of the\ngtid_binlog_pos system variable.\n \nCreating a Slave from a Backup\n \nThe CHANGE MASTER statement is useful for setting up a slave\nwhen you have a backup of the master and you also have the\nbinary log position or GTID position corresponding to the\nbackup.\n \nAfter restoring the backup on the slave, you could execute\nsomething like this to use the binary log position:\n \nCHANGE MASTER TO\n MASTER_LOG_FILE=\'master2-bin.001\',\n MASTER_LOG_POS=4;\n \nSTART SLAVE;\n \nOr you could execute something like this to use the GTID\nposition:\n \nSET GLOBAL gtid_slave_pos=\'0-1-153\';\n \nCHANGE MASTER TO\n MASTER_USE_GTID=slave_pos;\n \nSTART SLAVE;\n \nSee Setting up a Replication Slave with Mariabackup for more\ninformation on how to do this with Mariabackup.\n \nExample\n \nThe following example changes the master and master\'s\nbinary log coordinates.\nThis is used when you want to set up the slave to replicate\nthe master:\n \nCHANGE MASTER TO\n MASTER_HOST=\'master2.mycompany.com\',\n MASTER_USER=\'replication\',\n MASTER_PASSWORD=\'bigs3cret\',\n MASTER_PORT=3306,\n MASTER_LOG_FILE=\'master2-bin.001\',\n MASTER_LOG_POS=4,\n MASTER_CONNECT_RETRY=10;\n \nSTART SLAVE;\n \n\n\nURL: https://mariadb.com/kb/en/change-master-to/','','https://mariadb.com/kb/en/change-master-to/'),(106,'RESET MASTER',8,'RESET MASTER [TO #]\n \nDeletes all binary log files listed in the index file,\nresets the\nbinary log index file to be empty, and creates a new binary\nlog file with a suffix of .000001.\n \nIf TO # is given, then the first new binary log file will\nstart from number #.\n \nThis statement is for use only when the master is started\nfor the first time, and should never be used if any slaves\nare actively replicating from the binary log.\n \n\n\nURL: https://mariadb.com/kb/en/reset-master/','','https://mariadb.com/kb/en/reset-master/'),(113,'UNLOCK TABLES',8,'Syntax\n------ \nUNLOCK TABLES\n \nDescription\n----------- \nUNLOCK TABLES explicitly releases any table locks held by\nthe\ncurrent session. See LOCK TABLES for more information.\n \nIn addition to releasing table locks acquired by the LOCK\nTABLES statement, the UNLOCK TABLES statement also releases\nthe global read lock acquired by the FLUSH TABLES WITH READ\nLOCK statement. The FLUSH TABLES WITH READ LOCK statement is\nvery useful for performing backups. See FLUSH for more\ninformation about FLUSH TABLES WITH READ LOCK.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/transactions-unlock-tables/','','https://mariadb.com/kb/en/transactions-unlock-tables/'),(115,'XA Transactions',8,'Overview\n \nThe MariaDB XA implementation is based on the X/Open CAE\ndocument Distributed Transaction Processing: The XA\nSpecification. This document is published by The Open Group\nand available at\nhttp://www.opengroup.org/public/pubs/catalog/c193.htm.\n \nXA transactions are designed to allow distributed\ntransactions, where a transaction manager (the application)\ncontrols a transaction which involves multiple resources.\nSuch resources are usually DBMSs, but could be resources of\nany type. The whole set of required transactional operations\nis called a global transaction. Each subset of operations\nwhich involve a single resource is called a local\ntransaction. XA used a 2-phases commit (2PC). With the first\ncommit, the transaction manager tells each resource to\nprepare an effective commit, and waits for a confirm\nmessage. The changes are not still made effective at this\npoint. If any of the resources encountered an error, the\ntransaction manager will rollback the global transaction. If\nall resources communicate that the first commit is\nsuccessful, the transaction manager can require a second\ncommit, which makes the changes effective.\n \nIn MariaDB, XA transactions can only be used with storage\nengines that support them. At least InnoDB, TokuDB, SPIDER\nand MyRocks support them. For InnoDB, XA transactions can be\ndisabled by setting the innodb_support_xa server system\nvariable to 0. \n \nLike regular transactions, XA transactions create metadata\nlocks on accessed tables.\n \nXA transactions require REPEATABLE READ as a minimum\nisolation level. However, distributed transactions should\nalways use SERIALIZABLE.\n \nTrying to start more than one XA transaction at the same\ntime produces a 1400 error (SQLSTATE \'XAE09\'). The same\nerror is produced when attempting to start an XA transaction\nwhile a regular transaction is in effect. Trying to start a\nregular transaction while an XA transaction is in effect\nproduces a 1399 error (SQLSTATE \'XAE07\').\n \nThe statements that cause an implicit COMMIT for regular\ntransactions produce a 1400 error (SQLSTATE \'XAE09\') if a\nXA transaction is in effect.\n \nInternal XA vs External XA\n \nXA transactions are an overloaded term in MariaDB. If a\nstorage engine is XA-capable, it can mean one or both of\nthese:\nIt supports MariaDB\'s internal two-phase commit API. This\nis transparent to the user. Sometimes this is called\n\"internal XA\", since MariaDB\'s internal transaction\ncoordinator log can handle coordinating these transactions.\n \nIt supports XA transactions, with the XA START, XA PREPARE,\nXA COMMIT, etc. statements. Sometimes this is called\n\"external XA\", since it requires the use of an external\ntransaction coordinator to use this feature properly.\n \nTransaction Coordinator Log\n \nIf you have two or more XA-capable storage engines enabled,\nthen a transaction coordinator log must be available.\n \nThere are currently two implementations of the transaction\ncoordinator log:\nBinary log-based transaction coordinator log\nMemory-mapped file-based transaction coordinator log\n \nIf the binary log is enabled on a server, then the server\nwill use the binary log-based transaction coordinator log.\nOtherwise, it will use the memory-mapped file-based\ntransaction coordinator log.\n \nSee Transaction Coordinator Log for more information.\n \nSyntax\n------ \nXA {START|BEGIN} xid [JOIN|RESUME]\n \nXA END xid [SUSPEND [FOR MIGRATE]]\n \nXA PREPARE xid\n \nXA COMMIT xid [ONE PHASE]\n \nXA ROLLBACK xid\n \nXA RECOVER [FORMAT=[\'RAW\'|\'SQL\']]\n \nxid: gtrid [, bqual [, formatID ]]\n \nThe interface to XA transactions is a set of SQL statements\nstarting with XA. Each statement changes a transaction\'s\nstate, determining which actions it can perform. A\ntransaction which does not exist is in the NON-EXISTING\nstate.\n \nXA START (or BEGIN) starts a transaction and defines its xid\n(a transaction identifier). The JOIN or RESUME keywords have\nno effect. The new transaction will be in ACTIVE state.\n \nThe xid can have 3 components, though only the first one is\nmandatory. gtrid is a quoted string representing a global\ntransaction identifier. bqual is a quoted string\nrepresenting a local transaction identifier. formatID is an\nunsigned integer indicating the format used for the first\ntwo components; if not specified, defaults to 1. MariaDB\ndoes not interpret in any way these components, and only\nuses them to identify a transaction. xids of transactions in\neffect must be unique.\n \nXA END declares that the specified ACTIVE transaction is\nfinished and it changes its state to IDLE. SUSPEND [FOR\nMIGRATE] has no effect.\n \nXA PREPARE prepares an IDLE transaction for commit, changing\nits state to PREPARED. This is the first commit.\n \nXA COMMIT definitely commits and terminates a transaction\nwhich has already been PREPARED. If the ONE PHASE clause is\nspecified, this statements performs a 1-phase commit on an\nIDLE transaction.\n \nXA ROLLBACK rolls back and terminates an IDLE or PREPARED\ntransaction.\n \nXA RECOVER shows information about all PREPARED\ntransactions.\n \nWhen trying to execute an operation which is not allowed for\nthe transaction\'s current state, an error is produced:\n \nXA COMMIT \'test\' ONE PHASE;\n \nERROR 1399 (XAE07): XAER_RMFAIL: The command cannot be\nexecuted when global transaction is in the ACTIVE state\n \nXA COMMIT \'test2\';\n \nERROR 1399 (XAE07): XAER_RMFAIL: The command cannot be\nexecuted when global transaction is in the NON-EXISTING\nstate\n \nXA RECOVER\n \nThe XA RECOVER statement shows information about all\ntransactions which are in the PREPARED state. It does not\nmatter which connection created the transaction: if it has\nbeen PREPARED, it appears. But this does not mean that a\nconnection can commit or rollback a transaction which was\nstarted by another connection. Note that transactions using\na 1-phase commit are never in the PREPARED state, so they\ncannot be shown by XA RECOVER.\n \nXA RECOVER produces four columns:\n \nXA RECOVER;\n \n+----------+--------------+--------------+------+\n| formatID | gtrid_length | bqual_length | data |\n+----------+--------------+--------------+------+\n| 1 | 4 | 0 | test |\n+----------+--------------+--------------+------+\n \nYou can use XA RECOVER FORMAT=\'SQL\' to get the data in a\nhuman readable\nform that can be directly copy-pasted into XA COMMIT or XA\nROLLBACK. This is particularly useful for binary xid\ngenerated by some transaction coordinators.\n \nformatID is the formatID part of xid.\n \ndata are the gtrid and bqual parts of xid, concatenated.\n \ngtrid_length and bqual_length are the lengths of gtrid and\nbqual, respectevely.\n \nExamples\n-------- \n2-phases commit:\n \nXA START \'test\';\n \nINSERT INTO t VALUES (1,2);\n \nXA END \'test\';\n \nXA PREPARE \'test\';\n \nXA COMMIT \'test\';\n \n1-phase commit:\n \nXA START \'test\';\n \nINSERT INTO t VALUES (1,2);\n \nXA END \'test\';\n \nXA COMMIT \'test\' ONE PHASE;\n \nHuman-readable:\n \nxa start \'12\\r34\\t67\\v78\', \'abc\\ndef\', 3;\n \ninsert t1 values (40);\n \nxa end \'12\\r34\\t67\\v78\', \'abc\\ndef\', 3;\n \nxa prepare \'12\\r34\\t67\\v78\', \'abc\\ndef\', 3;\n \nxa recover format=\'RAW\';\n \n+----------+--------------+--------------+--------------------+\n| formatID | gtrid_length | bqual_length | data |\n+----------+--------------+--------------+--------------------+\n34 67v78abc 11 | 7 | 12\ndef |\n+----------+--------------+--------------+--------------------+\n \nxa recover format=\'SQL\';\n \n+----------+--------------+--------------+-----------------------------------------------+\n| formatID | gtrid_length | bqual_length | data |\n+----------+--------------+--------------+-----------------------------------------------+\n| 3 | 11 | 7 |\nX\'31320d3334093637763738\',X\'6162630a646566\',3 |\n+----------+--------------+--------------+-----------------------------------------------+\n \nxa rollback\nX\'31320d3334093637763738\',X\'6162630a646566\',3;\n \nKnown Issues\n \nMariaDB Galera Cluster\n \nMariaDB Galera Cluster does not support XA transactions. See\nMDEV-10532 for more information on that. The request to\nimplement that feature is being tracked at MDEV-17099.\n \nHowever, MariaDB Galera Cluster builds include a built-in\nplugin called wsrep. Prior to MariaDB 10.4.3, this plugin\nwas internally considered an XA-capable storage engine.\nConsequently, these MariaDB Galera Cluster builds have\nmultiple XA-capable storage engines by default, even if the\nonly \"real\" storage engine that supports external XA\ntransactions enabled on these builds by default is InnoDB.\nTherefore, when using one these builds MariaDB would be\nforced to use a transaction coordinator log by default,\nwhich could have performance implications.\n \nSee Transaction Coordinator Log Overview: MariaDB Galera\nCluster for more information.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/xa-transactions/','','https://mariadb.com/kb/en/xa-transactions/'),(117,'Authentication from MariaDB 10.4',10,'MariaDB 10.4 introduces a number of changes to the\nauthentication process, intended to make things easier and\nmore intuitive.\n \nOverview\n \nThere are four main changes relating to authentication:\nIt is possible to use more than one authentication plugin\nfor each user account. For example, this can be useful to\nslowly migrate users to the more secure ed25519\nauthentication plugin over time, while allowing the old\nmysql_native_password authentication plugin as an\nalternative for the transitional period.\nThe root@localhost user account created by mysql_install_db\nis created with the ability to use two authentication\nplugins.\nFirst, it is configured to try to use the unix_socket\nauthentication plugin. This allows the the root@localhost\nuser to login without a password via the local Unix socket\nfile defined by the socket system variable, as long as the\nlogin is attempted from a process owned by the operating\nsystem root user account.\nSecond, if authentication fails with the unix_socket\nauthentication plugin, then it is configured to try to use\nthe mysql_native_password authentication plugin. However, an\ninvalid password is initially set, so in order to\nauthenticate this way, a password must be set with SET\nPASSWORD.\nHowever, just using the unix_socket authentication plugin\nmay be fine for many users, and it is very secure. You may\nwant to try going without password authentication to see how\nwell it works for you. Remember, the best way to keep your\npassword safe is not to have one!\n \nAll user accounts, passwords, and global privileges are now\nstored in the mysql.global_priv table. The mysql.user table\nstill exists and has exactly the same set of columns as\nbefore, but it’s now a view that references the\nmysql.global_priv table. Tools that analyze the mysql.user\ntable should continue to workas before.\nMariaDB 10.4 supports User Password Expiry, which is not\nactive by default.\n \nDescription\n----------- \nAs a result of the above changes, the open-for-everyone\nall-powerful root account is finally gone. And installation\nscripts will no longer demand that you “PLEASE REMEMBER TO\nSET A PASSWORD FOR THE MariaDB root USER !â€, because the\nroot account is securely created automatically.\n \nTwo all-powerful accounts are created by default — root\nand the OS user that owns the data directory, typically\nmysql. They are created as:\n \nCREATE USER root@localhost IDENTIFIED VIA unix_socket OR\nmysql_native_password USING \'invalid\'\nCREATE USER mysql@localhost IDENTIFIED VIA unix_socket OR\nmysql_native_password USING \'invalid\'\n \nUsing unix_socket means that if you are the system root\nuser, you can login as root@locahost without a password.\nThis technique was pioneered by Otto Kekäläinen in Debian\nMariaDB packages and has been successfully used in Debian\nsince as early as MariaDB 10.0. \n \nIt is based on a simple fact that asking the system root for\na password adds no extra security — root has full access\nto all the data files and all process memory anyway. But not\nasking for a password means, there is no root password to\nforget (no need for the numerous tutorials on “how to\nreset MariaDB root passwordâ€). And if you want to script\nsome tedious database work, there is no need to store the\nroot password in plain text for the scipt to use (no need\nfor debian-sys-maint user).\n \nStill, some users may wish to log in as MariaDB root without\nusing sudo. Hence the old authentication method —\nconventional MariaDB password — is still available. By\ndefault it is disabled (“invalid†is not a valid\npassword hash), but one can set the password with a usual\nSET PASSWORD statement. And still retain the password-less\naccess via sudo.\n \nIf you install MariaDB locally (say from a tarball, you\nwould not want to use sudo to be able to login. This is why\nMariaDB creates a second all-powerful user with the same\nname as a system user that owns the data directory. In local\n(not system-wide) installations, this will be the user who\ninstalled MariaDB — they automatically get convenient\npassword-less root-like access, because they can access all\nthe data files anyway.\n \nEven if MariaDB is installed system-wide, you may not want\nto run your database maintenance scripts as system root —\nnow you can run them as system mysql user. And you will know\nthat they will never destroy your entire system, even if you\nmake a typo in a shell script.\n \nHowever, seasoned MariaDB DBAs who are used to the old ways\ndo need to makes some changes. See the examples below for\ncommon tasks. \n \nCookbook\n \nAfter installing MariaDB system-wide the first thing\nyou’ve got used to doing is logging in into the\nunprotected root account and protecting it, that is, setting\nthe root password:\n \n$ sudo dnf install MariaDB-server\n$ mysql -uroot\n...\nMariaDB> set password = password(\"XH4VmT3_jt\");\n \nThis is not only unnecessary now, it will simply not work\n— there is no unprotected root account. To login as root\nuse\n \n$ sudo dnf install MariaDB-server\n$ sudo mysql\n \nNote that it implies you are connecting via the unix socket,\nnot tcp. If you happen to have protocol=tcp in a system-wide\n/etc/my.cnf file, use sudo mysql --protocol=socket.\n \nAfter installing MariaDB locally you’ve also used to\nconnect to the unprotected root account using mysql -uroot.\nThis will not work either, simply use mysql without\nspecifying a username.\n \nIf you\'ve forgotten your root password, no problem — you\ncan still connect using sudo and change the password. And if\nyou\'ve also removed unix_socket authentication, to restore\naccess do as follows:\nrestart MariaDB with --skip-grant-tables\nlogin into the unprotected server\nrun FLUSH PRIVILEGES (note, before 10.4 this would’ve been\nthe last step, not anymore). This disables\n--skip-grant-tables and allows you to change the stored\nauthentication method.\nrun SET PASSWORD FOR root@localhost to change the root\npassword\n \nTo view inside privilege tables, the old mysql.user table\nstill exists. You can select from it as before, although you\ncannot update it anymore. It doesn’t show alternative\nauthentication plugins and this was one of the reasons for\nswitching to the mysql.global_priv table — complex\nauthentication rules did not fit into rigid structure of a\nrelational table. You can select from the new table, for\nexample: \n \nselect concat(user, \'@\', host, \' => \',\njson_detailed(priv)) from mysql.global_priv;\n \nReverting to the Previous Authentication Method for\nroot@localhost\n \nIf you don\'t want the root@localhost user account created\nby mysql_install_db to use unix_socket authentication by\ndefault, then there are a few ways to revert to the previous\nmysql_native_password authentication method for this user\naccount.\n \nConfiguring mysql_install_db to Revert to the Previous\nAuthentication Method\n \nOne way to revert to the previous mysql_native_password\nauthentication method for the root@localhost user account is\nto execute mysql_install_db with a special option. If\nmysql_install_db is executed while\n--auth-root-authentication-method=normal is specified, then\nit will create the default user accounts using the default\nbehavior of MariaDB 10.3 and before.\n \nThis means that the root@localhost user account will use\nmysql_native_password authentication by default. There are\nsome other differences as well. See mysql_install_db: User\nAccounts Created by Default for more information.\n \nFor example, the option can be set on the command-line while\nrunning mysql_install_db:\n \nmysql_install_db --user=mysql --datadir=/var/lib/mysql\n--auth-root-authentication-method=normal\n \nThe option can also be set in an option file in an option\ngroup supported by mysql_install_db. For example:\n \n[mysql_install_db]\nauth_root_authentication_method=normal\n \nIf the option is set in an option file and if\nmysql_install_db is executed, then mysql_install_db will\nread this option from the option file, and it will\nautomatically set this option.\n \nAltering the User Account to Revert to the Previous\nAuthentication Method\n \nIf you have already installed MariaDB, and if the\nroot@localhost user account is already using unix_socket\nauthentication, then you can revert to the old\nmysql_native_password authentication method for the user\naccount by executing the following:\n \nALTER USER root@localhost IDENTIFIED VIA\nmysql_native_password USING PASSWORD(\"verysecret\")\n \n\n\nURL:\nhttps://mariadb.com/kb/en/authentication-from-mariadb-104/','','https://mariadb.com/kb/en/authentication-from-mariadb-104/'),(118,'CREATE USER',10,'Syntax\n------ \nCREATE [OR REPLACE] USER [IF NOT EXISTS] \n user_specification [,user_specification ...] \n [REQUIRE {NONE | tls_option [[AND] tls_option ...] }]\n [WITH resource_option [resource_option ...] ]\n [password_option | lock_option] \n \nuser_specification:\n username [authentication_option]\n \nauthentication_option:\n IDENTIFIED BY \'password\' \n | IDENTIFIED BY PASSWORD \'password_hash\'\n | IDENTIFIED {VIA|WITH} authentication_rule [OR\nauthentication_rule ...]\n \nauthentication_rule:\n authentication_plugin\n | authentication_plugin {USING|AS}\n\'authentication_string\'\n | authentication_plugin {USING|AS} PASSWORD(\'password\')\n \ntls_option:\n SSL \n | X509\n | CIPHER \'cipher\'\n | ISSUER \'issuer\'\n | SUBJECT \'subject\'\n \nresource_option:\n MAX_QUERIES_PER_HOUR count\n | MAX_UPDATES_PER_HOUR count\n | MAX_CONNECTIONS_PER_HOUR count\n | MAX_USER_CONNECTIONS count\n | MAX_STATEMENT_TIME time\n \npassword_option:\n PASSWORD EXPIRE\n | PASSWORD EXPIRE DEFAULT\n | PASSWORD EXPIRE NEVER\n | PASSWORD EXPIRE INTERVAL N DAY\n \nlock_option:\n ACCOUNT LOCK\n | ACCOUNT UNLOCK\n}\n \nDescription\n----------- \nThe CREATE USER statement creates new MariaDB accounts. To\nuse it, you must have the global CREATE USER privilege or\nthe INSERT privilege for the mysql database. For each\naccount, CREATE USER creates a new row in\nthe mysql.user table that has no privileges.\n \nIf any of the specified accounts, or any permissions for the\nspecified accounts, already exist, then the server returns\nERROR 1396 (HY000). If an error occurs, CREATE USER will\nstill create the accounts that do not result in an error.\nOnly one error is produced for all users which have not been\ncreated:\n \nERROR 1396 (HY000): \n Operation CREATE USER failed for \'u1\'@\'%\',\'u2\'@\'%\'\n \nCREATE USER, DROP USER, CREATE ROLE, and DROP ROLE all\nproduce the\nsame error code when they fail.\n \nSee Account Names below for details on how account names are\nspecified. \n \nOR REPLACE\n \nIf the optional OR REPLACE clause is used, it is basically a\nshortcut for:\n \nDROP USER IF EXISTS name;\n \nCREATE USER name ...;\n \nFor example:\n \nCREATE USER foo2@test IDENTIFIED BY \'password\';\n \nERROR 1396 (HY000): Operation CREATE USER failed for\n\'foo2\'@\'test\'\n \nCREATE OR REPLACE USER foo2@test IDENTIFIED BY \'password\';\n \nQuery OK, 0 rows affected (0.00 sec)\n \nIF NOT EXISTS\n \nWhen the IF NOT EXISTS clause is used, MariaDB will return a\nwarning instead of an error if the specified user already\nexists.\n \nFor example:\n \nCREATE USER foo2@test IDENTIFIED BY \'password\';\n \nERROR 1396 (HY000): Operation CREATE USER failed for\n\'foo2\'@\'test\'\n \nCREATE USER IF NOT EXISTS foo2@test IDENTIFIED BY\n\'password\';\n \nQuery OK, 0 rows affected, 1 warning (0.00 sec)\n \nSHOW WARNINGS;\n \n+-------+------+----------------------------------------------------+\n| Level | Code | Message |\n+-------+------+----------------------------------------------------+\n| Note | 1973 | Can\'t create user \'foo2\'@\'test\';\n it already exists |\n+-------+------+----------------------------------------------------+\n1 row in set (0.00 sec\n \nAuthentication Options\n \nIDENTIFIED BY \'password\'\n \nThe optional IDENTIFIED BY clause can be used to provide an\naccount with a password. The password should be specified in\nplain text. It will be hashed by the PASSWORD function prior\nto being stored to the mysql.user table.\n \nFor example, if our password is mariadb, then we can create\nthe user with:\n \nCREATE USER foo2@test IDENTIFIED BY \'mariadb\';\n \nIf you do not specify a password with the IDENTIFIED BY\nclause, the user\nwill be able to connect without a password. A blank password\nis not a wildcard\nto match any password. The user must connect without\nproviding a password if no\npassword is set.\n \nThe only authentication plugins that this clause supports\nare mysql_native_password and mysql_old_password.\n \nIDENTIFIED BY PASSWORD \'password_hash\'\n \nThe optional IDENTIFIED BY PASSWORD clause can be used to\nprovide an account with a password that has already been\nhashed. The password should be specified as a hash that was\nprovided by the PASSWORD function. It will be stored to the\nmysql.user table as-is.\n \nFor example, if our password is mariadb, then we can find\nthe hash with:\n \nSELECT PASSWORD(\'mariadb\');\n+-------------------------------------------+\n| PASSWORD(\'mariadb\') |\n+-------------------------------------------+\n| *54958E764CE10E50764C2EECBB71D01F08549980 |\n+-------------------------------------------+\n1 row in set (0.00 sec)\n \nAnd then we can create a user with the hash:\n \nCREATE USER foo2@test IDENTIFIED BY PASSWORD\n\'*54958E764CE10E50764C2EECBB71D01F08549980\';\n \nIf you do not specify a password with the IDENTIFIED BY\nclause, the user\nwill be able to connect without a password. A blank password\nis not a wildcard\nto match any password. The user must connect without\nproviding a password if no\npassword is set.\n \nThe only authentication plugins that this clause supports\nare mysql_native_password and mysql_old_password.\n \nIDENTIFIED {VIA|WITH} authentication_plugin\n \nThe optional IDENTIFIED VIA authentication_plugin allows you\nto specify that the account should be authenticated by a\nspecific authentication plugin. The plugin name must be an\nactive authentication plugin as per SHOW PLUGINS. If it\ndoesn\'t show up in that output, then you will need to\ninstall it with INSTALL PLUGIN or INSTALL SONAME.\n \nFor example, this could be used with the PAM authentication\nplugin:\n \nCREATE USER foo2@test IDENTIFIED VIA pam;\n \nSome authentication plugins allow additional arguments to be\nspecified after a USING or AS keyword. For example, the PAM\nauthentication plugin accepts a service name:\n \nCREATE USER foo2@test IDENTIFIED VIA pam USING \'mariadb\';\n \nThe exact meaning of the additional argument would depend on\nthe specific authentication plugin.\n \nThe USING or AS keyword can also be used to provide a\nplain-text password to a plugin if it\'s provided as an\nargument to the PASSWORD() function. This is only valid for\nauthentication plugins that have implemented a hook for the\nPASSWORD() function. For example, the ed25519 authentication\nplugin supports this:\n \nCREATE USER safe@\'%\' IDENTIFIED VIA ed25519 USING\nPASSWORD(\'secret\');\n \nOne can specify many authentication plugins, they all works\nas alternatives ways of authenticating a user:\n \nCREATE USER safe@\'%\' IDENTIFIED VIA ed25519 USING\nPASSWORD(\'secret\') OR unix_socket;\n \nTLS Options\n \nBy default, MariaDB transmits data between the server and\nclients without encrypting it. This is generally acceptable\nwhen the server and client run on the same host or in\nnetworks where security is guaranteed through other means.\nHowever, in cases where the server and client exist on\nseparate networks or they are in a high-risk network, the\nlack of encryption does introduce security concerns as a\nmalicious actor could potentially eavesdrop on the traffic\nas it is sent over the network between them.\n \nTo mitigate this concern, MariaDB allows you to encrypt data\nin transit between the server and clients using the\nTransport Layer Security (TLS) protocol. TLS was formerly\nknown as Secure Socket Layer (SSL), but strictly speaking\nthe SSL protocol is a predecessor to TLS and, that version\nof the protocol is now considered insecure. The\ndocumentation still uses the term SSL often and for\ncompatibility reasons TLS-related server system and status\nvariables still use the prefix ssl_, but internally, MariaDB\nonly supports its secure successors.\n \nSee Secure Connections Overview for more information about\nhow to determine whether your MariaDB server has TLS\nsupport.\n \nYou can set certain TLS-related restrictions for specific\nuser accounts. For instance, you might use this with user\naccounts that require access to sensitive data while sending\nit across networks that you do not control. These\nrestrictions can be enabled for a user account with the\nCREATE USER, ALTER USER, or GRANT statements. The following\noptions are available:\n \nOption | Description | \n \nREQUIRE NONE | TLS is not required for this account, but can\nstill be used. | \n \nREQUIRE SSL | The account must use TLS, but no valid X509\ncertificate is required. This option cannot be combined with\nother TLS options. | \n \nREQUIRE X509 | The account must use TLS and must have a\nvalid X509 certificate. This option implies REQUIRE SSL.\nThis option cannot be combined with other TLS options. | \n \nREQUIRE ISSUER \'issuer\' | The account must use TLS and\nmust have a valid X509 certificate. Also, the Certificate\nAuthority must be the one specified via the string issuer.\nThis option implies REQUIRE X509. This option can be\ncombined with the SUBJECT, and CIPHER options in any order.\n| \n \nREQUIRE SUBJECT \'subject\' | The account must use TLS and\nmust have a valid X509 certificate. Also, the certificate\'s\nSubject must be the one specified via the string subject.\nThis option implies REQUIRE X509. This option can be\ncombined with the ISSUER, and CIPHER options in any order. |\n\n \nREQUIRE CIPHER \'cipher\' | The account must use TLS, but no\nvalid X509 certificate is required. Also, the encryption\nused for the connection must use one of the methods\nspecified in the string cipher. This option implies REQUIRE\nSSL. This option can be combined with the ISSUER, and\nSUBJECT options in any order. | \n \nThe REQUIRE keyword must be used only once for all specified\noptions, and the AND keyword can be used to separate\nindividual options, but it is not required.\n \nFor example, you can create a user account that requires\nthese TLS options with the following:\n \nCREATE USER \'alice\'@\'%\'\n REQUIRE SUBJECT \'/CN=alice/O=My Dom,\nInc./C=US/ST=Oregon/L=Portland\'\n AND ISSUER \'/C=FI/ST=Somewhere/L=City/ O=Some\nCompany/CN=Peter Parker/emailAddress=p.parker@marvel.com\'\n AND CIPHER \'TLSv1.2\';\n \nIf any of these options are set for a specific user account,\nthen any client who tries to connect with that user account\nwill have to be configured to connect with TLS.\n \nSee Securing Connections for Client and Server for\ninformation on how to enable TLS on the client and server.\n \nResource Limit Options\n \nMariaDB 10.2.0 introduced a number of resource limit\noptions.\n \nIt is possible to set per-account limits for certain server\nresources. The following table shows the values that can be\nset per account:\n \nLimit Type | Decription | \n \nMAX_QUERIES_PER_HOUR | Number of statements that the account\ncan issue per hour (including updates) | \n \nMAX_UPDATES_PER_HOUR | Number of updates (not queries) that\nthe account can issue per hour | \n \nMAX_CONNECTIONS_PER_HOUR | Number of connections that the\naccount can start per hour | \n \nMAX_USER_CONNECTIONS | Number of simultaneous connections\nthat can be accepted from the same account; if it is 0,\nmax_connections will be used instead; if max_connections is\n0, there is no limit for this account\'s simultaneous\nconnections. | \n \nMAX_STATEMENT_TIME | Timeout, in seconds, for statements\nexecuted by the user. See also Aborting Statements that\nExceed a Certain Time to Execute. | \n \nIf any of these limits are set to 0, then there is no limit\nfor that resource for that user.\n \nHere is an example showing how to create a user with\nresource limits:\n \nCREATE USER \'someone\'@\'localhost\' WITH\n MAX_USER_CONNECTIONS 10\n MAX_QUERIES_PER_HOUR 200;\n \nThe resources are tracked per account, which means\n\'user\'@\'server\'; not per user name or per connection.\n \nThe count can be reset for all users using FLUSH\nUSER_RESOURCES, FLUSH PRIVILEGES or mysqladmin reload.\n \nPer account resource limits are stored in the user table, in\nthe mysql database. Columns used for resources limits are\nnamed max_questions, max_updates, max_connections (for\nMAX_CONNECTIONS_PER_HOUR), and max_user_connections (for\nMAX_USER_CONNECTIONS).\n \nAccount Names\n \nAccount names have both a user name component and a host\nname component, and are specified as\n\'user_name\'@\'host_name\'.\n \nThe user name and host name may be unquoted, quoted as\nstrings using double quotes (\") or\nsingle quotes (\'), or quoted as identifiers using backticks\n(`). You must use quotes\nwhen using special characters (such as a hyphen) or wildcard\ncharacters. If you quote, you \nmust quote the user name and host name separately (for\nexample \'user_name\'@\'host_name\').\n \nHost Name Component\n \nIf the host name is not provided, it is assumed to be \'%\'.\n \nHost names may contain the wildcard characters % and _. They\nare matched as if by\nthe LIKE clause. If you need to use a wildcard character\nliterally (for example, to\nmatch a domain name with an underscore), prefix the\ncharacter with a backslash. See LIKE\nfor more information on escaping wildcard characters.\n \nHost name matches are case-insensitive. Host names can match\neither domain names or IP\naddresses. Use \'localhost\' as the host name to allow only\nlocal client connections.\n \nYou can use a netmask to match a range of IP addresses using\n\'base_ip/netmask\' as the\nhost name. A user with an IP address ip_addr will be allowed\nto connect if the following\ncondition is true:\n \nip_addr & netmask = base_ip\n \nYou can only use netmasks that specify a multiple of 8 bits\nof the address to match. That is,\nonly the following netmasks are allowed:\n \n255.0.0.0\n255.255.0.0\n255.255.255.0\n255.255.255.255\n \nUsing 255.255.255.255 is equivalent to not using a netmask\nat all.\n \nUser Name Component\n \nUser names must match exactly, including case. A user name\nthat is empty is known as an anonymous account and is\nallowed to match a login attempt with any user name\ncomponent. These are described more in the next section.\n \nFor valid identifiers to use as user names, see Identifier\nNames.\n \nIt is possible for more than one account to match when a\nuser connects. MariaDB selects\nthe first matching account after sorting according to the\nfollowing criteria:\nAccounts with an exact host name are sorted before accounts\nusing a wildcard in the\nhost name. Host names using a netmask are considered to be\nexact for sorting.\nAccounts with a wildcard in the host name are sorted\naccording to the position of\nthe first wildcard character. Those with a wildcard\ncharacter later in the host name\nsort before those with a wildcard character earlier in the\nhost name.\nAccounts with a non-empty user name sort before accounts\nwith an empty user name.\nAccounts with an empty user name are sorted last. As\nmentioned previously, these are known as anonymous accounts.\nThese are described more in the next section.\n \nThe following table shows a list of example account as\nsorted by these criteria:\n \n+---------+-------------+\n| User | Host |\n+---------+-------------+\n| joffrey | 192.168.0.3 |\n| | 192.168.0.% |\n| joffrey | 192.168.% |\n| | 192.168.% |\n+---------+-------------+\n \nOnce connected, you only have the privileges granted to the\naccount that matched,\nnot all accounts that could have matched. For example,\nconsider the following\ncommands:\n \nCREATE USER \'joffrey\'@\'192.168.0.3\';\n \nCREATE USER \'joffrey\'@\'%\';\n \nGRANT SELECT ON test.t1 to \'joffrey\'@\'192.168.0.3\';\n \nGRANT SELECT ON test.t2 to \'joffrey\'@\'%\';\n \nIf you connect as joffrey from 192.168.0.3, you will have\nthe SELECT\nprivilege on the table test.t1, but not on the table\ntest.t2. If you connect as joffrey from any other IP\naddress, you will have the SELECT privilege on the table\ntest.t2, but not\non the table test.t1.\n \nBeginning with MariaDB 5.5.31, usernames can be up to 80\ncharacters long. From MariaDB 10.0 the system tables are all\nby default this length. However, in order to enable this\nfeature in MariaDB 5.5, the following schema changes must be\nmade:\n \nALTER TABLE mysql.user MODIFY User CHAR(80) BINARY NOT NULL\nDEFAULT \'\';\n \nALTER TABLE mysql.db MODIFY User CHAR(80) BINARY NOT NULL\nDEFAULT \'\';\n \nALTER TABLE mysql.tables_priv MODIFY User CHAR(80) BINARY\nNOT NULL DEFAULT \'\';\n \nALTER TABLE mysql.columns_priv MODIFY User CHAR(80) BINARY\nNOT NULL DEFAULT \'\';\n \nALTER TABLE mysql.procs_priv MODIFY User CHAR(80) BINARY NOT\nNULL DEFAULT \'\';\n \nALTER TABLE mysql.proc MODIFY definer CHAR(141) COLLATE\nutf8_bin NOT NULL DEFAULT \'\';\n \nALTER TABLE mysql.event MODIFY definer CHAR(141) COLLATE\nutf8_bin NOT NULL DEFAULT \'\';\n \nALTER TABLE mysql.proxies_priv MODIFY User CHAR(80) COLLATE\nutf8_bin NOT NULL DEFAULT \'\';\n \nALTER TABLE mysql.proxies_priv MODIFY Proxied_user CHAR(80)\nCOLLATE utf8_bin NOT NULL DEFAULT \'\';\n \nALTER TABLE mysql.proxies_priv MODIFY Grantor CHAR(141)\nCOLLATE utf8_bin NOT NULL DEFAULT \'\';\n \nALTER TABLE mysql.servers MODIFY Username CHAR(80) NOT NULL\nDEFAULT \'\';\n \nALTER TABLE mysql.procs_priv MODIFY Grantor CHAR(141)\nCOLLATE utf8_bin NOT NULL DEFAULT \'\';\n \nALTER TABLE mysql.tables_priv MODIFY Grantor CHAR(141)\nCOLLATE utf8_bin NOT NULL DEFAULT \'\';\n \nFLUSH PRIVILEGES;\n \nAnonymous Accounts\n \nAnonymous accounts are accounts where the user name portion\nof the account name is empty. These accounts act as special\ncatch-all accounts. If a user attempts to log into the\nsystem from a host, and an anonymous account exists with a\nhost name portion that matches the user\'s host, then the\nuser will log in as the anonymous account if there is no\nmore specific account match for the user name that the user\nentered.\n \nFor example, here are some anonymous accounts:\n \nCREATE USER \'\'@\'localhost\';\n \nCREATE USER \'\'@\'192.168.0.3\';\n \nFixing a Legacy Default Anonymous Account\n \nOn some systems, the mysql.db table has some entries for the\n\'\'@\'%\' anonymous account by default. Unfortunately,\nthere is no matching entry in the mysql.user table, which\nmeans that this anonymous account doesn\'t exactly exist,\nbut it does have privileges--usually on the default test\ndatabase created by mysql_install_db. These account-less\nprivileges are a legacy that is leftover from a time when\nMySQL\'s privilege system was less advanced.\n \nThis situation means that you will run into errors if you\ntry to create a \'\'@\'%\' account. For example:\n \nCREATE USER \'\'@\'%\';\n \nERROR 1396 (HY000): Operation CREATE USER failed for\n\'\'@\'%\'\n \nThe fix is to DELETE the row in the mysql.db table and then\nexecute FLUSH PRIVILEGES:\n \nDELETE FROM mysql.db WHERE User=\'\' AND Host=\'%\';\n \nFLUSH PRIVILEGES;\n \nAnd then the account can be created:\n \nCREATE USER \'\'@\'%\';\n \nQuery OK, 0 rows affected (0.01 sec)\n \nSee MDEV-13486 for more information.\n \nPassword Expiry\n \nBesides automatic password expiry, as determined by\ndefault_password_lifetime, password expiry times can be set\non an individual user basis, overriding the global setting,\nfor example:\n \nCREATE USER \'monty\'@\'localhost\' PASSWORD EXPIRE INTERVAL\n120 DAY;\n \nSee User Password Expiry for more details.\n \nAccount Locking\n \nAccount locking permits privileged administrators to\nlock/unlock user accounts. No new client connections will be\npermitted if an account is locked (existing connections are\nnot affected). For example:\n \nCREATE USER \'marijn\'@\'localhost\' ACCOUNT LOCK;\n \nSee Account Locking for more details.\n \n\n\nURL: https://mariadb.com/kb/en/create-user/','','https://mariadb.com/kb/en/create-user/'),(119,'ALTER USER',10,'The ALTER USER statement was introduced in MariaDB 10.2.0.\n \nSyntax\n------ \nALTER USER [IF EXISTS] \n user_specification [,user_specification] ...\n [REQUIRE {NONE | tls_option [[AND] tls_option] ...}]\n [WITH resource_option [resource_option] ...]\n [password_option | lock_option] \n \nuser_specification:\n username [authentication_option]\n \nauthentication_option:\n IDENTIFIED BY \'password\' \n | IDENTIFIED BY PASSWORD \'password_hash\'\n | IDENTIFIED {VIA|WITH} authentication_plugin\n | IDENTIFIED {VIA|WITH} authentication_plugin {USING|AS}\n\'authentication_string\'\n | IDENTIFIED {VIA|WITH} authentication_plugin {USING|AS}\nPASSWORD(\'password\')\n \ntls_option\n SSL \n | X509\n | CIPHER \'cipher\'\n | ISSUER \'issuer\'\n | SUBJECT \'subject\'\n \nresource_option\n MAX_QUERIES_PER_HOUR count\n | MAX_UPDATES_PER_HOUR count\n | MAX_CONNECTIONS_PER_HOUR count\n | MAX_USER_CONNECTIONS count\n | MAX_STATEMENT_TIME time\n \npassword_option:\n PASSWORD EXPIRE\n | PASSWORD EXPIRE DEFAULT\n | PASSWORD EXPIRE NEVER\n | PASSWORD EXPIRE INTERVAL N DAY\n \nlock_option:\n ACCOUNT LOCK\n | ACCOUNT UNLOCK\n}\n \nDescription\n----------- \nThe ALTER USER statement modifies existing MariaDB accounts.\nTo use it, you must have the global CREATE USER privilege or\nthe UPDATE privilege for the mysql database. The global\nSUPER privilege is also required if the read_only system\nvariable is enabled.\n \nIf any of the specified user accounts do not yet exist, an\nerror results. If an error occurs, ALTER USER will still\nmodify the accounts that do not result in an error. Only one\nerror is produced for all users which have not been\nmodified.\n \nIF EXISTS\n \nWhen the IF EXISTS clause is used, MariaDB will return a\nwarning instead of an error for each specified user that\ndoes not exist.\n \nAccount Names\n \nFor ALTER USER statements, account names are specified as\nthe username argument in the same way as they are for CREATE\nUSER statements. See account names from the CREATE USER page\nfor details on how account names are specified.\n \nCURRENT_USER or CURRENT_USER() can also be used to alter the\naccount logged into the current session. For example, to\nchange the current user\'s password to mariadb:\n \nALTER USER CURRENT_USER() IDENTIFIED BY \'mariadb\';\n \nAuthentication Options\n \nIDENTIFIED BY \'password\'\n \nThe optional IDENTIFIED BY clause can be used to provide an\naccount with a password. The password should be specified in\nplain text. It will be hashed by the PASSWORD function prior\nto being stored to the mysql.user table.\n \nFor example, if our password is mariadb, then we can set the\naccount\'s password with:\n \nALTER USER foo2@test IDENTIFIED BY \'mariadb\';\n \nIf you do not specify a password with the IDENTIFIED BY\nclause, the user\nwill be able to connect without a password. A blank password\nis not a wildcard\nto match any password. The user must connect without\nproviding a password if no\npassword is set.\n \nThe only authentication plugins that this clause supports\nare mysql_native_password and mysql_old_password.\n \nIDENTIFIED BY PASSWORD \'password_hash\'\n \nThe optional IDENTIFIED BY PASSWORD clause can be used to\nprovide an account with a password that has already been\nhashed. The password should be specified as a hash that was\nprovided by the PASSWORD function. It will be stored to the\nmysql.user table as-is.\n \nFor example, if our password is mariadb, then we can find\nthe hash with:\n \nSELECT PASSWORD(\'mariadb\');\n+-------------------------------------------+\n| PASSWORD(\'mariadb\') |\n+-------------------------------------------+\n| *54958E764CE10E50764C2EECBB71D01F08549980 |\n+-------------------------------------------+\n1 row in set (0.00 sec)\n \nAnd then we can set an account\'s password with the hash:\n \nALTER USER foo2@test IDENTIFIED BY PASSWORD\n\'*54958E764CE10E50764C2EECBB71D01F08549980\';\n \nIf you do not specify a password with the IDENTIFIED BY\nclause, the user\nwill be able to connect without a password. A blank password\nis not a wildcard\nto match any password. The user must connect without\nproviding a password if no\npassword is set.\n \nThe only authentication plugins that this clause supports\nare mysql_native_password and mysql_old_password.\n \nIDENTIFIED {VIA|WITH} authentication_plugin\n \nThe optional IDENTIFIED VIA authentication_plugin allows you\nto specify that the account should be authenticated by a\nspecific authentication plugin. The plugin name must be an\nactive authentication plugin as per SHOW PLUGINS. If it\ndoesn\'t show up in that output, then you will need to\ninstall it with INSTALL PLUGIN or INSTALL SONAME.\n \nFor example, this could be used with the PAM authentication\nplugin:\n \nALTER USER foo2@test IDENTIFIED VIA pam;\n \nSome authentication plugins allow additional arguments to be\nspecified after a USING or AS keyword. For example, the PAM\nauthentication plugin accepts a service name:\n \nALTER USER foo2@test IDENTIFIED VIA pam USING \'mariadb\';\n \nThe exact meaning of the additional argument would depend on\nthe specific authentication plugin.\n \nIn MariaDB 10.4 and later, the USING or AS keyword can also\nbe used to provide a plain-text password to a plugin if\nit\'s provided as an argument to the PASSWORD() function.\nThis is only valid for authentication plugins that have\nimplemented a hook for the PASSWORD() function. For example,\nthe ed25519 authentication plugin supports this:\n \nALTER USER safe@\'%\' IDENTIFIED VIA ed25519 USING\nPASSWORD(\'secret\');\n \nTLS Options\n \nBy default, MariaDB transmits data between the server and\nclients without encrypting it. This is generally acceptable\nwhen the server and client run on the same host or in\nnetworks where security is guaranteed through other means.\nHowever, in cases where the server and client exist on\nseparate networks or they are in a high-risk network, the\nlack of encryption does introduce security concerns as a\nmalicious actor could potentially eavesdrop on the traffic\nas it is sent over the network between them.\n \nTo mitigate this concern, MariaDB allows you to encrypt data\nin transit between the server and clients using the\nTransport Layer Security (TLS) protocol. TLS was formerly\nknown as Secure Socket Layer (SSL), but strictly speaking\nthe SSL protocol is a predecessor to TLS and, that version\nof the protocol is now considered insecure. The\ndocumentation still uses the term SSL often and for\ncompatibility reasons TLS-related server system and status\nvariables still use the prefix ssl_, but internally, MariaDB\nonly supports its secure successors.\n \nSee Secure Connections Overview for more information about\nhow to determine whether your MariaDB server has TLS\nsupport.\n \nYou can set certain TLS-related restrictions for specific\nuser accounts. For instance, you might use this with user\naccounts that require access to sensitive data while sending\nit across networks that you do not control. These\nrestrictions can be enabled for a user account with the\nCREATE USER, ALTER USER, or GRANT statements. The following\noptions are available:\n \nOption | Description | \n \nREQUIRE NONE | TLS is not required for this account, but can\nstill be used. | \n \nREQUIRE SSL | The account must use TLS, but no valid X509\ncertificate is required. This option cannot be combined with\nother TLS options. | \n \nREQUIRE X509 | The account must use TLS and must have a\nvalid X509 certificate. This option implies REQUIRE SSL.\nThis option cannot be combined with other TLS options. | \n \nREQUIRE ISSUER \'issuer\' | The account must use TLS and\nmust have a valid X509 certificate. Also, the Certificate\nAuthority must be the one specified via the string issuer.\nThis option implies REQUIRE X509. This option can be\ncombined with the SUBJECT, and CIPHER options in any order.\n| \n \nREQUIRE SUBJECT \'subject\' | The account must use TLS and\nmust have a valid X509 certificate. Also, the certificate\'s\nSubject must be the one specified via the string subject.\nThis option implies REQUIRE X509. This option can be\ncombined with the ISSUER, and CIPHER options in any order. |\n\n \nREQUIRE CIPHER \'cipher\' | The account must use TLS, but no\nvalid X509 certificate is required. Also, the encryption\nused for the connection must use one of the methods\nspecified in the string cipher. This option implies REQUIRE\nSSL. This option can be combined with the ISSUER, and\nSUBJECT options in any order. | \n \nThe REQUIRE keyword must be used only once for all specified\noptions, and the AND keyword can be used to separate\nindividual options, but it is not required.\n \nFor example, you can alter a user account to require these\nTLS options with the following:\n \nALTER USER \'alice\'@\'%\'\n REQUIRE SUBJECT \'/CN=alice/O=My Dom,\nInc./C=US/ST=Oregon/L=Portland\'\n AND ISSUER \'/C=FI/ST=Somewhere/L=City/ O=Some\nCompany/CN=Peter Parker/emailAddress=p.parker@marvel.com\'\n AND CIPHER \'TLSv1.2\';\n \nIf any of these options are set for a specific user account,\nthen any client who tries to connect with that user account\nwill have to be configured to connect with TLS.\n \nSee Securing Connections for Client and Server for\ninformation on how to enable TLS on the client and server.\n \nResource Limit Options\n \nMariaDB 10.2.0 introduced a number of resource limit\noptions.\n \nIt is possible to set per-account limits for certain server\nresources. The following table shows the values that can be\nset per account:\n \nLimit Type | Decription | \n \nMAX_QUERIES_PER_HOUR | Number of statements that the account\ncan issue per hour (including updates) | \n \nMAX_UPDATES_PER_HOUR | Number of updates (not queries) that\nthe account can issue per hour | \n \nMAX_CONNECTIONS_PER_HOUR | Number of connections that the\naccount can start per hour | \n \nMAX_USER_CONNECTIONS | Number of simultaneous connections\nthat can be accepted from the same account; if it is 0,\nmax_connections will be used instead; if max_connections is\n0, there is no limit for this account\'s simultaneous\nconnections. | \n \nMAX_STATEMENT_TIME | Timeout, in seconds, for statements\nexecuted by the user. See also Aborting Statements that\nExceed a Certain Time to Execute. | \n \nIf any of these limits are set to 0, then there is no limit\nfor that resource for that user.\n \nHere is an example showing how to set an account\'s resource\nlimits:\n \nALTER USER \'someone\'@\'localhost\' WITH\n MAX_USER_CONNECTIONS 10\n MAX_QUERIES_PER_HOUR 200;\n \nThe resources are tracked per account, which means\n\'user\'@\'server\'; not per user name or per connection.\n \nThe count can be reset for all users using FLUSH\nUSER_RESOURCES, FLUSH PRIVILEGES or mysqladmin reload.\n \nPer account resource limits are stored in the user table, in\nthe mysql database. Columns used for resources limits are\nnamed max_questions, max_updates, max_connections (for\nMAX_CONNECTIONS_PER_HOUR), and max_user_connections (for\nMAX_USER_CONNECTIONS).\n \nPassword Expiry\n \nBesides automatic password expiry, as determined by\ndefault_password_lifetime, password expiry times can be set\non an individual user basis, overriding the global setting,\nfor example:\n \nALTER USER \'monty\'@\'localhost\' PASSWORD EXPIRE INTERVAL\n120 DAY;\n \nALTER USER \'monty\'@\'localhost\' PASSWORD EXPIRE NEVER;\n \nALTER USER \'monty\'@\'localhost\' PASSWORD EXPIRE DEFAULT;\n \nSee User Password Expiry for more details.\n \nAccount Locking\n \nAccount locking permits privileged administrators to\nlock/unlock user accounts. No new client connections will be\npermitted if an account is locked (existing connections are\nnot affected). For example:\n \nALTER USER \'marijn\'@\'localhost\' ACCOUNT LOCK;\n \nSee Account Locking for more details.\n \n\n\nURL: https://mariadb.com/kb/en/alter-user/','','https://mariadb.com/kb/en/alter-user/'),(96,'COMMIT',8,'The COMMIT statement ends a transaction, saving any changes\nto the data so that they become visible to subsequent\ntransactions. Also, unlocks metadata changed by current\ntransaction. If autocommit is set to 1, an implicit commit\nis performed after each statement. Otherwise, all\ntransactions which don\'t end with an explicit COMMIT are\nimplicitly rollbacked and the changes are lost. The ROLLBACK\nstatement can be used to do this explicitly.\n \nThe required syntax for the COMMIT statement is as follows:\n \nCOMMIT [WORK] [AND [NO] CHAIN] [[NO] RELEASE]\n \nCOMMIT is the more important transaction terminator, as well\nas the more interesting one. The basic form of the COMMIT\nstatement is simply the keyword COMMIT (the keyword WORK is\nsimply noise and can be omitted without changing the\neffect).\n \nThe optional AND CHAIN clause is a convenience for\ninitiating a new transaction as soon as the old transaction\nterminates. If AND CHAIN is specified, then there is\neffectively nothing between the old and new transactions,\nalthough they remain separate. The characteristics of the\nnew transaction will be the same as the characteristics of\nthe old one — that is, the new transaction will have the\nsame access mode, isolation level and diagnostics area size\n(we\'ll discuss all of these shortly) as the transaction\njust terminated. \n \nRELEASE tells the server to disconnect the client\nimmediately after the current transaction.\n \nThere are NO RELEASE and AND NO CHAIN options. By default,\ncommits do not RELEASE or CHAIN, but it\'s possible to\nchange this default behavior with the completion_type server\nsystem variable. In this case, the AND NO CHAIN and NO\nRELEASE options override the server default.\n \n\n\nURL: https://mariadb.com/kb/en/commit/','','https://mariadb.com/kb/en/commit/'),(97,'DEALLOCATE / DROP PREPARE',8,'Syntax\n------ \n{DEALLOCATE | DROP} PREPARE stmt_name\n \nDescription\n----------- \nTo deallocate a prepared statement produced with PREPARE,\nuse a\nDEALLOCATE PREPARE statement that refers to the prepared\nstatement\nname.\n \nA prepared statement is implicitly deallocated when a new\nPREPARE command is issued. In that case, there is no need to\nuse DEALLOCATE.\n \nAttempting to execute a prepared statement after\ndeallocating it\nresults in an error, as if it was not prepared at all:\n \nERROR 1243 (HY000): Unknown prepared statement handler\n(stmt_name) given to EXECUTE\n \nIf the specified statement has not been PREPAREd, an error\nsimilar to the following will be produced:\n \nERROR 1243 (HY000): Unknown prepared statement handler\n(stmt_name) given to DEALLOCATE PREPARE\n \nExample\n \nSee example in PREPARE.\n \n\n\nURL:\nhttps://mariadb.com/kb/en/deallocate-drop-prepared-statement/','','https://mariadb.com/kb/en/deallocate-drop-prepared-statement/'),(98,'EXECUTE Statement',8,'Syntax\n------ \nEXECUTE stmt_name\n [USING expression[, expression] ...]\n \nEXECUTE with expression as parameters was introduced in\nMariaDB 10.2.3. Before that one could only use variables\n(@var_name) as parameters.\n \nDescription\n----------- \nAfter preparing a statement with PREPARE, you execute it\nwith an\nEXECUTE statement that refers to the prepared statement\nname. If the\nprepared statement contains any parameter markers, you must\nsupply a\nUSING clause that lists user variables containing the values\nto be\nbound to the parameters. Parameter values can be supplied\nonly by user\nvariables, and the USING clause must name exactly as many\nvariables as\nthe number of parameter markers in the statement.\n \nYou can execute a given prepared statement multiple times,\npassing\ndifferent variables to it or setting the variables to\ndifferent values\nbefore each execution.\n \nIf the specified statement has not been PREPAREd, an error\nsimilar to the following is produced:\n \nERROR 1243 (HY000): Unknown prepared statement handler\n(stmt_name) given to EXECUTE\n \nExample\n \nSee example in PREPARE.\n \n\n\nURL: https://mariadb.com/kb/en/execute-statement/','','https://mariadb.com/kb/en/execute-statement/'),(102,'SAVEPOINT',8,'Syntax\n------ \nSAVEPOINT identifier\nROLLBACK [WORK] TO [SAVEPOINT] identifier\nRELEASE SAVEPOINT identifier\n \nDescription\n----------- \nInnoDB supports the SQL statements SAVEPOINT,\nROLLBACK TO SAVEPOINT, RELEASE SAVEPOINT\nand the optional WORK keyword for\nROLLBACK.\n \nEach savepoint must have a legal MariaDB identifier. A\nsavepoint is a named sub-transaction.\n \nNormally ROLLBACK undoes the changes performed by the whole\ntransaction. When used with the TO clause, it undoes the\nchanges performed after the specified savepoint, and erases\nall subsequent savepoints. However, all locks that have been\nacquired after the save point will survive. RELEASE\nSAVEPOINT does not rollback or commit any changes, but\nremoves the specified savepoint.\n \nWhen the execution of a trigger or a stored function begins,\nit is not possible to use statements which reference a\nsavepoint which was defined from out of that stored program.\n \nWhen a COMMIT (including implicit commits) or a ROLLBACK\nstatement (with no TO clause) is performed, they act on the\nwhole transaction, and all savepoints are removed.\n \nErrors\n \nIf COMMIT or ROLLBACK is issued and no transaction was\nstarted, no error is reported.\n \nIf SAVEPOINT is issued and no transaction was started, no\nerror is reported but no savepoint is created. When ROLLBACK\nTO SAVEPOINT or RELEASE SAVEPOINT is called for a savepoint\nthat does not exist, an error like this is issued:\n \nERROR 1305 (42000): SAVEPOINT svp_name does not exist\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/savepoint/','','https://mariadb.com/kb/en/savepoint/'),(121,'GRANT',10,'Syntax\n------ \nGRANT\n priv_type [(column_list)]\n [, priv_type [(column_list)]] ...\n ON [object_type] priv_level\n TO user_specification [ user_options ...]\n \nuser_specification:\n username [authentication_option]\n \nauthentication_option:\n IDENTIFIED BY \'password\' \n | IDENTIFIED BY PASSWORD \'password_hash\'\n | IDENTIFIED {VIA|WITH} authentication_rule [OR\nauthentication_rule ...]\n \nauthentication_rule:\n authentication_plugin\n | authentication_plugin {USING|AS}\n\'authentication_string\'\n | authentication_plugin {USING|AS} PASSWORD(\'password\')\n \nGRANT PROXY ON username\n TO username [, username] ...\n [WITH GRANT OPTION]\n \nuser_options:\n [REQUIRE {NONE | tls_option [[AND] tls_option] ...}]\n [WITH with_option [with_option] ...]\n \nobject_type:\n TABLE\n | FUNCTION\n | PROCEDURE\n \npriv_level:\n *\n | *.*\n | db_name.*\n | db_name.tbl_name\n | tbl_name\n | db_name.routine_name\n \nwith_option:\n GRANT OPTION\n | resource_option\n \nresource_option:\n MAX_QUERIES_PER_HOUR count\n | MAX_UPDATES_PER_HOUR count\n | MAX_CONNECTIONS_PER_HOUR count\n | MAX_USER_CONNECTIONS count\n | MAX_STATEMENT_TIME time\n \ntls_option:\n SSL \n | X509\n | CIPHER \'cipher\'\n | ISSUER \'issuer\'\n | SUBJECT \'subject\'\n \nDescription\n----------- \nThe GRANT statement allows you to grant privileges or roles\nto accounts. To use GRANT, you must have the GRANT OPTION\nprivilege, and you must have the privileges that you are\ngranting.\n \nUse the REVOKE statement to revoke privileges granted with\nthe GRANT statement.\n \nUse the SHOW GRANTS statement to determine what privileges\nan account has.\n \nAccount Names\n \nFor GRANT statements, account names are specified as the\nusername argument in the same way as they are for CREATE\nUSER statements. See account names from the CREATE USER page\nfor details on how account names are specified.\n \nImplicit Account Creation\n \nThe GRANT statement also allows you to implicitly create\naccounts in some cases.\n \nIf the account does not yet exist, then GRANT can implicitly\ncreate it. To implicitly create an account with GRANT, a\nuser is required to have the same privileges that would be\nrequired to explicitly create the account with the CREATE\nUSER statement.\n \nIf the NO_AUTO_CREATE_USER SQL_MODE is set, then accounts\ncan only be created if authentication information is\nspecified, or with a CREATE USER statement. If no\nauthentication information is provided, GRANT will produce\nan error when the specified account does not exist, for\nexample:\n \nshow variables like \'%sql_mode%\' ;\n+---------------+--------------------------------------------+\n| Variable_name | Value |\n+---------------+--------------------------------------------+\n| sql_mode | NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION |\n+---------------+--------------------------------------------+\n \nGRANT USAGE ON *.* TO \'user123\'@\'%\' IDENTIFIED BY \'\';\nERROR 1133 (28000): Can\'t find any matching row in the user\ntable\n \nGRANT USAGE ON *.* TO \'user123\'@\'%\' IDENTIFIED VIA PAM\nusing \'mariadb\' require ssl ;\nQuery OK, 0 rows affected (0.00 sec)\n \nselect host, user from mysql.user where user=\'user123\' ;\n \n+------+----------+\n| host | user |\n+------+----------+\n| % | user123 |\n+------+----------+\n \nPrivilege Levels\n \nPrivileges can be set globally, for an entire database, for\na table or routine,\nor for individual columns in a table. Certain privileges can\nonly be set at\ncertain levels.\nGlobal privileges are granted using *.* for\npriv_level. Global privileges include privileges to\nadminister the database\nand manage user accounts, as well as privileges for all\ntables, functions, and\nprocedures. Global privileges are stored in the mysql.user\ntable.\nDatabase privileges are granted using db_name.*\nfor priv_level, or using just * to use default database.\nDatabase\nprivileges include privileges to create tables and\nfunctions, as well as\nprivileges for all tables, functions, and procedures in the\ndatabase. Database privileges are stored in the mysql.db\ntable.\nTable privileges are granted using db_name.tbl_name\nfor priv_level, or using just tbl_name to specify a table in\nthe default\ndatabase. The TABLE keyword is optional. Table privileges\ninclude the\nability to select and change data in the table. Certain\ntable privileges can\nbe granted for individual columns.\nColumn privileges are granted by specifying a table for\npriv_level and providing a column list after the privilege\ntype. They allow\nyou to control exactly which columns in a table users can\nselect and change.\nFunction privileges are granted using FUNCTION\ndb_name.routine_name\nfor priv_level, or using just FUNCTION routine_name to\nspecify a function\nin the default database.\nProcedure privileges are granted using PROCEDURE\ndb_name.routine_name\nfor priv_level, or using just PROCEDURE routine_name to\nspecify a procedure\nin the default database.\n \nThe USAGE Privilege\n \nThe USAGE privilege grants no real privileges. The SHOW\nGRANTS\nstatement will show a global USAGE privilege for a\nnewly-created user. You\ncan use USAGE with the GRANT statement to change options\nlike GRANT OPTION\nand MAX_USER_CONNECTIONS without changing any account\nprivileges.\n \nThe ALL PRIVILEGES Privilege\n \nThe ALL PRIVILEGES privilege grants all available\nprivileges. Granting all\nprivileges only affects the given privilege level. For\nexample, granting all\nprivileges on a table does not grant any privileges on the\ndatabase or globally.\n \nUsing ALL PRIVILEGES does not grant the special GRANT OPTION\nprivilege.\n \nYou can use ALL instead of ALL PRIVILEGES.\n \nThe GRANT OPTION Privilege\n \nUse the WITH GRANT OPTION clause to give users the ability\nto grant privileges\nto other users at the given privilege level. Users with the\nGRANT OPTION privilege can\nonly grant privileges they have. They cannot grant\nprivileges at a higher privilege level than\nthey have the GRANT OPTION privilege.\n \nThe GRANT OPTION privilege cannot be set for individual\ncolumns.\nIf you use WITH GRANT OPTION when specifying column\nprivileges,\nthe GRANT OPTION privilege will be granted for the entire\ntable.\n \nUsing the WITH GRANT OPTION clause is equivalent to listing\nGRANT OPTION\nas a privilege.\n \nGlobal Privileges\n \nThe following table lists the privileges that can be granted\nglobally. You can\nalso grant all database, table, and function privileges\nglobally. When granted\nglobally, these privileges apply to all databases, tables,\nor functions,\nincluding those created later.\n \nTo set a global privilege, use *.* for priv_level.\n \nPrivilege | Description | \n \nCREATE USER | Create a user using the CREATE USER statement,\nor implicitly create a user with the GRANT statement. | \n \nFILE | Read and write files on the server, using statements\nlike LOAD DATA INFILE or functions like LOAD_FILE(). Also\nneeded to create CONNECT outward tables. MariaDB server must\nhave the permissions to access those files. | \n \nGRANT OPTION | Grant global privileges. You can only grant\nprivileges that you have. | \n \nPROCESS | Show information about the active processes, via\nSHOW PROCESSLIST or mysqladmin processlist. | \n \nRELOAD | Execute FLUSH statements or equivalent mysqladmin\ncommands. | \n \nREPLICATION CLIENT | Execute SHOW MASTER STATUS and SHOW\nSLAVE STATUS informative statements. | \n \nREPLICATION SLAVE | Accounts used by slave servers on the\nmaster need this privilege. This is needed to get the\nupdates made on the master. | \n \nSHOW DATABASES | List all databases using the SHOW DATABASES\nstatement. Without the SHOW DATABASES privilege, you can\nstill issue the SHOW DATABASES statement, but it will only\nlist databases containing tables on which you have\nprivileges. | \n \nSHUTDOWN | Shut down the server using SHUTDOWN or the\nmysqladmin shutdown command. | \n \nSUPER | Execute superuser statements: CHANGE MASTER TO, KILL\n(users who do not have this privilege can only KILL their\nown threads), PURGE LOGS, SET global system variables, or\nthe mysqladmin debug command. Also, this permission allows\nthe user to write data even if the read_only startup option\nis set, enable or disable logging, enable or disable\nreplication on slaves, specify a DEFINER for statements that\nsupport that clause, connect once after reaching the\nMAX_CONNECTIONS. If a statement has been specified for the\ninit-connect mysqld option, that command will not be\nexecuted when a user with SUPER privileges connects to the\nserver. | \n \nDatabase Privileges\n \nThe following table lists the privileges that can be granted\nat the database\nlevel. You can also grant all table and function privileges\nat the database\nlevel. Table and function privileges on a database apply to\nall tables or\nfunctions in that database, including those created later.\n \nTo set a privilege for a database, specify the database\nusing\ndb_name.* for priv_level, or just use *\nto specify the default database.\n \nPrivilege | Description | \n \nCREATE | Create a database using the CREATE DATABASE\nstatement, when the privilege is granted for a database. You\ncan grant the CREATE privilege on databases that do not yet\nexist. This also grants the CREATE privilege on all tables\nin the database. | \n \nCREATE ROUTINE | Create Stored Programs using the CREATE\nPROCEDURE and CREATE FUNCTION statements. | \n \nCREATE TEMPORARY TABLES | Create temporary tables with the\nCREATE TEMPORARY TABLE statement. This privilege enable\nwriting and dropping those temporary tables | \n \nDROP | Drop a database using the DROP DATABASE statement,\nwhen the privilege is granted for a database. This also\ngrants the DROP privilege on all tables in the database. | \n \nEVENT | Create, drop and alter EVENTs. Added in MySQL 5.1.6.\n| \n \nGRANT OPTION | Grant database privileges. You can only grant\nprivileges that you have. | \n \nLOCK TABLES | Acquire explicit locks using the LOCK TABLES\nstatement; you also need to have the SELECT privilege on a\ntable, in order to lock it. | \n \nTable Privileges\n \nPrivilege | Description | \n \nALTER | Change the structure of an existing table using the\nALTER TABLE statement. | \n \nCREATE | Create a table using the CREATE TABLE statement.\nYou can grant the CREATE privilege on tables that do not yet\nexist. | \n \nCREATE VIEW | Create a view using the CREATE_VIEW statement.\n| \n \nDELETE | Remove rows from a table using the DELETE\nstatement. | \n \nDELETE HISTORY | Remove historical rows from a table using\nthe DELETE HISTORY statement. Displays as DELETE VERSIONING\nROWS when running SHOW GRANTS until MariaDB 10.3.15 and\nuntil MariaDB 10.4.5 (MDEV-17655), or when running SHOW\nPRIVILEGES (MDEV-20382). From MariaDB 10.3.4. From MariaDB\n10.3.5, if a user has the SUPER privilege but not this\nprivilege, running mysql_upgrade will grant this privilege\nas well. | \n \nDROP | Drop a table using the DROP TABLE statement or a view\nusing the DROP VIEW statement. Also required to execute the\nTRUNCATE TABLE statement. | \n \nGRANT OPTION | Grant table privileges. You can only grant\nprivileges that you have. | \n \nINDEX | Create an index on a table using the CREATE INDEX\nstatement. Without the INDEX privilege, you can still create\nindexes when creating a table using the CREATE TABLE\nstatement if the you have the CREATE privilege, and you can\ncreate indexes using the ALTER TABLE statement if you have\nthe ALTER privilege. | \n \nINSERT | Add rows to a table using the INSERT statement. The\nINSERT privilege can also be set on individual columns; see\nColumn Privileges below for details. | \n \nREFERENCES | Unused. | \n \nSELECT | Read data from a table using the SELECT statement.\nThe SELECT privilege can also be set on individual columns;\nsee Column Privileges below for details. | \n \nSHOW VIEW | Show the CREATE VIEW statement to create a view\nusing the SHOW CREATE VIEW statement. | \n \nTRIGGER | Execute triggers associated to tables you update,\nexecute the CREATE TRIGGER and DROP TRIGGER statements. You\nwill still be able to see triggers. | \n \nUPDATE | Update existing rows in a table using the UPDATE\nstatement. UPDATE statements usually include a WHERE clause\nto update only certain rows. You must have SELECT privileges\non the table or the appropriate columns for the WHERE\nclause. The UPDATE privilege can also be set on individual\ncolumns; see Column Privileges below for details. | \n \nColumn Privileges\n \nSome table privileges can be set for individual columns of a\ntable. To use\ncolumn privileges, specify the table explicitly and provide\na list of column\nnames after the privilege type. For example, the following\nstatement would allow\nthe user to read the names and positions of employees, but\nnot other information\nfrom the same table, such as salaries.\n \nGRANT SELECT (name, position) on Employee to\n\'jeffrey\'@\'localhost\';\n \nPrivilege | Description | \n \nINSERT (column_list) | Add rows specifying values in columns\nusing the INSERT statement. If you only have column-level\nINSERT privileges, you must specify the columns you are\nsetting in the INSERT statement. All other columns will be\nset to their default values, or NULL. | \n \nREFERENCES (column_list) | Unused. | \n \nSELECT (column_list) | Read values in columns using the\nSELECT statement. You cannot access or query any columns for\nwhich you do not have SELECT privileges, including in WHERE,\nON, GROUP BY, and ORDER BY clauses. | \n \nUPDATE (column_list) | Update values in columns of existing\nrows using the UPDATE statement. UPDATE statements usually\ninclude a WHERE clause to update only certain rows. You must\nhave SELECT privileges on the table or the appropriate\ncolumns for the WHERE clause. | \n \nFunction Privileges\n \nPrivilege | Description | \n \nALTER ROUTINE | Change the characteristics of a stored\nfunction using the ALTER FUNCTION statement. | \n \nEXECUTE | Use a stored function. You need SELECT privileges\nfor any tables or columns accessed by the function. | \n \nGRANT OPTION | Grant function privileges. You can only grant\nprivileges that you have. | \n \nProcedure Privileges\n \nPrivilege | Description | \n \nALTER ROUTINE | Change the characteristics of a stored\nprocedure using the ALTER PROCEDURE statement. | \n \nEXECUTE | Execute a stored procedure using the CALL\nstatement. The privilege to call a procedure may allow you\nto perform actions you wouldn\'t otherwise be able to do,\nsuch as insert rows into a table. | \n \nGRANT OPTION | Grant procedure privileges. You can only\ngrant privileges that you have. | \n \nProxy Privileges\n \nPrivilege | Description | \n \nPROXY | Permits one user to be a proxy for another. | \n \nThe PROXY privilege allows one user to proxy as another\nuser, which means their privileges change to that of the\nproxy user, and the CURRENT_USER() function returns the user\nname of the proxy user.\n \nThe PROXY privilege only works with authentication plugins\nthat support it. The default mysql_native_password\nauthentication plugin does not support proxy users.\n \nThe pam authentication plugin is the only plugin included\nwith MariaDB that currently supports proxy users. The PROXY\nprivilege is commonly used with the pam authentication\nplugin to enable user and group mapping with PAM.\n \nFor example, to grant the PROXY privilege to an anonymous\naccount that authenticates with the pam authentication\nplugin, you could execute the following:\n \nCREATE USER \'dba\'@\'%\' IDENTIFIED BY \'strongpassword\';\n \nGRANT ALL PRIVILEGES ON *.* TO \'dba\'@\'%\' ;\n \nCREATE USER \'\'@\'%\' IDENTIFIED VIA pam USING \'mariadb\';\n \nGRANT PROXY ON \'dba\'@\'%\' TO \'\'@\'%\';\n \nA user account can only grant the PROXY privilege for a\nspecific user account if the granter also has the PROXY\nprivilege for that specific user account, and if that\nprivilege is defined WITH GRANT OPTION. For example, the\nfollowing example fails because the granter does not have\nthe PROXY privilege for that specific user account at all:\n \nSELECT USER(), CURRENT_USER();\n+-----------------+-----------------+\n| USER() | CURRENT_USER() |\n+-----------------+-----------------+\n| alice@localhost | alice@localhost |\n+-----------------+-----------------+\n \nSHOW GRANTS;\n \n+-----------------------------------------------------------------------------------------------------------------------+\n| Grants for alice@localhost |\n+-----------------------------------------------------------------------------------------------------------------------+\n| GRANT ALL PRIVILEGES ON *.* TO \'alice\'@\'localhost\'\nIDENTIFIED BY PASSWORD\n\'*2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19\' |\n+-----------------------------------------------------------------------------------------------------------------------+\n \nGRANT PROXY ON \'dba\'@\'localhost\' TO\n\'bob\'@\'localhost\';\n \nERROR 1698 (28000): Access denied for user\n\'alice\'@\'localhost\'\n \nAnd the following example fails because the granter does\nhave the PROXY privilege for that specific user account, but\nit is not defined WITH GRANT OPTION:\n \nSELECT USER(), CURRENT_USER();\n+-----------------+-----------------+\n| USER() | CURRENT_USER() |\n+-----------------+-----------------+\n| alice@localhost | alice@localhost |\n+-----------------+-----------------+\n \nSHOW GRANTS;\n \n+-----------------------------------------------------------------------------------------------------------------------+\n| Grants for alice@localhost |\n+-----------------------------------------------------------------------------------------------------------------------+\n| GRANT ALL PRIVILEGES ON *.* TO \'alice\'@\'localhost\'\nIDENTIFIED BY PASSWORD\n\'*2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19\' |\n| GRANT PROXY ON \'dba\'@\'localhost\' TO\n\'alice\'@\'localhost\' |\n+-----------------------------------------------------------------------------------------------------------------------+\n \nMariaDB [(none)]> GRANT PROXY ON \'dba\'@\'localhost\' TO\n\'bob\'@\'localhost\';\n \nERROR 1698 (28000): Access denied for user\n\'alice\'@\'localhost\'\n \nBut the following example succeeds because the granter does\nhave the PROXY privilege for that specific user account, and\nit is defined WITH GRANT OPTION:\n \nSELECT USER(), CURRENT_USER();\n+-----------------+-----------------+\n| USER() | CURRENT_USER() |\n+-----------------+-----------------+\n| alice@localhost | alice@localhost |\n+-----------------+-----------------+\n \nSHOW GRANTS;\n \n+-----------------------------------------------------------------------------------------------------------------------------------------+\n| Grants for alice@localhost |\n+-----------------------------------------------------------------------------------------------------------------------------------------+\n| GRANT ALL PRIVILEGES ON *.* TO \'alice\'@\'localhost\'\nIDENTIFIED BY PASSWORD\n\'*2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19\' WITH GRANT\nOPTION |\n| GRANT PROXY ON \'dba\'@\'localhost\' TO\n\'alice\'@\'localhost\' WITH GRANT OPTION |\n+-----------------------------------------------------------------------------------------------------------------------------------------+\n \nGRANT PROXY ON \'dba\'@\'localhost\' TO\n\'bob\'@\'localhost\';\n \nQuery OK, 0 rows affected (0.004 sec)\n \nA user account can grant the PROXY privilege for any other\nuser account if the granter has the PROXY privilege for the\n\'\'@\'%\' anonymous user account, like this:\n \nGRANT PROXY ON \'\'@\'%\' TO \'dba\'@\'localhost\' WITH\nGRANT OPTION;\n \nFor example, the following example succeeds because the user\ncan grant the PROXY privilege for any other user account:\n \nSELECT USER(), CURRENT_USER();\n+-----------------+-----------------+\n| USER() | CURRENT_USER() |\n+-----------------+-----------------+\n| alice@localhost | alice@localhost |\n+-----------------+-----------------+\n \nSHOW GRANTS;\n \n+-----------------------------------------------------------------------------------------------------------------------------------------+\n| Grants for alice@localhost |\n+-----------------------------------------------------------------------------------------------------------------------------------------+\n| GRANT ALL PRIVILEGES ON *.* TO \'alice\'@\'localhost\'\nIDENTIFIED BY PASSWORD\n\'*2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19\' WITH GRANT\nOPTION |\n| GRANT PROXY ON \'\'@\'%\' TO \'alice\'@\'localhost\' WITH\nGRANT OPTION |\n+-----------------------------------------------------------------------------------------------------------------------------------------+\n \nGRANT PROXY ON \'app1_dba\'@\'localhost\' TO\n\'bob\'@\'localhost\';\n \nQuery OK, 0 rows affected (0.004 sec)\n \nGRANT PROXY ON \'app2_dba\'@\'localhost\' TO\n\'carol\'@\'localhost\';\n \nQuery OK, 0 rows affected (0.004 sec)\n \nThe default root user accounts created by mysql_install_db\nhave this privilege. For example:\n \nGRANT ALL PRIVILEGES ON *.* TO \'root\'@\'localhost\' WITH\nGRANT OPTION;\n \nGRANT PROXY ON \'\'@\'%\' TO \'root\'@\'localhost\' WITH\nGRANT OPTION;\n \nThis allows the default root user accounts to grant the\nPROXY privilege for any other user account, and it also\nallows the default root user accounts to grant others the\nprivilege to do the same.\n \nAuthentication Options\n \nThe authentication options for the GRANT statement are the\nsame as those for the CREATE USER statement.\n \nIDENTIFIED BY \'password\'\n \nThe optional IDENTIFIED BY clause can be used to provide an\naccount with a password. The password should be specified in\nplain text. It will be hashed by the PASSWORD function prior\nto being stored to the mysql.user table.\n \nFor example, if our password is mariadb, then we can create\nthe user with:\n \nGRANT USAGE ON *.* TO foo2@test IDENTIFIED BY \'mariadb\';\n \nIf you do not specify a password with the IDENTIFIED BY\nclause, the user\nwill be able to connect without a password. A blank password\nis not a wildcard\nto match any password. The user must connect without\nproviding a password if no\npassword is set.\n \nIf the user account already exists and if you provide the\nIDENTIFIED BY clause, then the user\'s password will be\nchanged. You must have the privileges needed for the SET\nPASSWORD\nstatement to change a user\'s password with GRANT.\n \nThe only authentication plugins that this clause supports\nare mysql_native_password and mysql_old_password.\n \nIDENTIFIED BY PASSWORD \'password_hash\'\n \nThe optional IDENTIFIED BY PASSWORD clause can be used to\nprovide an account with a password that has already been\nhashed. The password should be specified as a hash that was\nprovided by the PASSWORD function. It will be stored to the\nmysql.user table as-is.\n \nFor example, if our password is mariadb, then we can find\nthe hash with:\n \nSELECT PASSWORD(\'mariadb\');\n+-------------------------------------------+\n| PASSWORD(\'mariadb\') |\n+-------------------------------------------+\n| *54958E764CE10E50764C2EECBB71D01F08549980 |\n+-------------------------------------------+\n1 row in set (0.00 sec)\n \nAnd then we can create a user with the hash:\n \nGRANT USAGE ON *.* TO foo2@test IDENTIFIED BY PASSWORD\n\'*54958E764CE10E50764C2EECBB71D01F08549980\';\n \nIf you do not specify a password with the IDENTIFIED BY\nclause, the user\nwill be able to connect without a password. A blank password\nis not a wildcard\nto match any password. The user must connect without\nproviding a password if no\npassword is set.\n \nIf the user account already exists and if you provide the\nIDENTIFIED BY clause, then the user\'s password will be\nchanged. You must have the privileges needed for the SET\nPASSWORD\nstatement to change a user\'s password with GRANT.\n \nThe only authentication plugins that this clause supports\nare mysql_native_password and mysql_old_password.\n \nIDENTIFIED {VIA|WITH} authentication_plugin\n \nThe optional IDENTIFIED VIA authentication_plugin allows you\nto specify that the account should be authenticated by a\nspecific authentication plugin. The plugin name must be an\nactive authentication plugin as per SHOW PLUGINS. If it\ndoesn\'t show up in that output, then you will need to\ninstall it with INSTALL PLUGIN or INSTALL SONAME.\n \nFor example, this could be used with the PAM authentication\nplugin:\n \nGRANT USAGE ON *.* TO foo2@test IDENTIFIED VIA pam;\n \nSome authentication plugins allow additional arguments to be\nspecified after a USING or AS keyword. For example, the PAM\nauthentication plugin accepts a service name:\n \nGRANT USAGE ON *.* TO foo2@test IDENTIFIED VIA pam USING\n\'mariadb\';\n \nThe exact meaning of the additional argument would depend on\nthe specific authentication plugin.\n \nThe USING or AS keyword can also be used to provide a\nplain-text password to a plugin if it\'s provided as an\nargument to the PASSWORD() function. This is only valid for\nauthentication plugins that have implemented a hook for the\nPASSWORD() function. For example, the ed25519 authentication\nplugin supports this:\n \nCREATE USER safe@\'%\' IDENTIFIED VIA ed25519 USING\nPASSWORD(\'secret\');\n \nOne can specify many authentication plugins, they all works\nas alternatives ways of authenticating a user:\n \nCREATE USER safe@\'%\' IDENTIFIED VIA ed25519 USING\nPASSWORD(\'secret\') OR unix_socket;\n \nResource Limit Options\n \nMariaDB 10.2.0 introduced a number of resource limit\noptions.\n \nIt is possible to set per-account limits for certain server\nresources. The following table shows the values that can be\nset per account:\n \nLimit Type | Decription | \n \nMAX_QUERIES_PER_HOUR | Number of statements that the account\ncan issue per hour (including updates) | \n \nMAX_UPDATES_PER_HOUR | Number of updates (not queries) that\nthe account can issue per hour | \n \nMAX_CONNECTIONS_PER_HOUR | Number of connections that the\naccount can start per hour | \n \nMAX_USER_CONNECTIONS | Number of simultaneous connections\nthat can be accepted from the same account; if it is 0,\nmax_connections will be used instead; if max_connections is\n0, there is no limit for this account\'s simultaneous\nconnections. | \n \nMAX_STATEMENT_TIME | Timeout, in seconds, for statements\nexecuted by the user. See also Aborting Statements that\nExceed a Certain Time to Execute. | \n \nIf any of these limits are set to 0, then there is no limit\nfor that resource for that user.\n \nTo set resource limits for an account, if you do not want to\nchange that account\'s privileges, you can issue a GRANT\nstatement with the USAGE privilege, which has no meaning.\nThe statement can name some or all limit types, in any\norder.\n \nHere is an example showing how to set resource limits:\n \nGRANT USAGE ON *.* TO \'someone\'@\'localhost\' WITH\n MAX_USER_CONNECTIONS 0\n MAX_QUERIES_PER_HOUR 200;\n \nThe resources are tracked per account, which means\n\'user\'@\'server\'; not per user name or per connection.\n \nThe count can be reset for all users using FLUSH\nUSER_RESOURCES, FLUSH PRIVILEGES or mysqladmin reload.\n \nPer account resource limits are stored in the user table, in\nthe mysql database. Columns used for resources limits are\nnamed max_questions, max_updates, max_connections (for\nMAX_CONNECTIONS_PER_HOUR), and max_user_connections (for\nMAX_USER_CONNECTIONS).\n \nTLS Options\n \nBy default, MariaDB transmits data between the server and\nclients without encrypting it. This is generally acceptable\nwhen the server and client run on the same host or in\nnetworks where security is guaranteed through other means.\nHowever, in cases where the server and client exist on\nseparate networks or they are in a high-risk network, the\nlack of encryption does introduce security concerns as a\nmalicious actor could potentially eavesdrop on the traffic\nas it is sent over the network between them.\n \nTo mitigate this concern, MariaDB allows you to encrypt data\nin transit between the server and clients using the\nTransport Layer Security (TLS) protocol. TLS was formerly\nknown as Secure Socket Layer (SSL), but strictly speaking\nthe SSL protocol is a predecessor to TLS and, that version\nof the protocol is now considered insecure. The\ndocumentation still uses the term SSL often and for\ncompatibility reasons TLS-related server system and status\nvariables still use the prefix ssl_, but internally, MariaDB\nonly supports its secure successors.\n \nSee Secure Connections Overview for more information about\nhow to determine whether your MariaDB server has TLS\nsupport.\n \nYou can set certain TLS-related restrictions for specific\nuser accounts. For instance, you might use this with user\naccounts that require access to sensitive data while sending\nit across networks that you do not control. These\nrestrictions can be enabled for a user account with the\nCREATE USER, ALTER USER, or GRANT statements. The following\noptions are available:\n \nOption | Description | \n \nREQUIRE NONE | TLS is not required for this account, but can\nstill be used. | \n \nREQUIRE SSL | The account must use TLS, but no valid X509\ncertificate is required. This option cannot be combined with\nother TLS options. | \n \nREQUIRE X509 | The account must use TLS and must have a\nvalid X509 certificate. This option implies REQUIRE SSL.\nThis option cannot be combined with other TLS options. | \n \nREQUIRE ISSUER \'issuer\' | The account must use TLS and\nmust have a valid X509 certificate. Also, the Certificate\nAuthority must be the one specified via the string issuer.\nThis option implies REQUIRE X509. This option can be\ncombined with the SUBJECT, and CIPHER options in any order.\n| \n \nREQUIRE SUBJECT \'subject\' | The account must use TLS and\nmust have a valid X509 certificate. Also, the certificate\'s\nSubject must be the one specified via the string subject.\nThis option implies REQUIRE X509. This option can be\ncombined with the ISSUER, and CIPHER options in any order. |\n\n \nREQUIRE CIPHER \'cipher\' | The account must use TLS, but no\nvalid X509 certificate is required. Also, the encryption\nused for the connection must use one of the methods\nspecified in the string cipher. This option implies REQUIRE\nSSL. This option can be combined with the ISSUER, and\nSUBJECT options in any order. | \n \nThe REQUIRE keyword must be used only once for all specified\noptions, and the AND keyword can be used to separate\nindividual options, but it is not required.\n \nFor example, you can create a user account that requires\nthese TLS options with the following:\n \nGRANT USAGE ON *.* TO \'alice\'@\'%\'\n REQUIRE SUBJECT \'/CN=alice/O=My Dom,\nInc./C=US/ST=Oregon/L=Portland\'\n AND ISSUER \'/C=FI/ST=Somewhere/L=City/ O=Some\nCompany/CN=Peter Parker/emailAddress=p.parker@marvel.com\'\n AND CIPHER \'TLSv1.2\';\n \nIf any of these options are set for a specific user account,\nthen any client who tries to connect with that user account\nwill have to be configured to connect with TLS.\n \nSee Securing Connections for Client and Server for\ninformation on how to enable TLS on the client and server.\n \nRoles\n \nRoles were introduced in MariaDB 10.0.5.\n \nSyntax\n------ \nGRANT role TO grantee [, grantee2 ... ]\n[ WITH ADMIN OPTION ]\n \nThe GRANT statement is also used to grant the use a role to\none or more users or other roles. In order to be able to\ngrant a role, the grantor doing so must have permission to\ndo so (see WITH ADMIN in the CREATE ROLE article).\n \nSpecifying the WITH ADMIN OPTION permits the grantee to in\nturn grant the role to another.\n \nFor example, the following commands show how to grant the\nsame role to a couple different users.\n \nGRANT journalist TO hulda;\n \nGRANT journalist TO berengar WITH ADMIN OPTION;\n \nIf a user has been granted a role, they do not automatically\nobtain all permissions associated with that role. These\npermissions are only in use when the user activates the role\nwith the SET ROLE statement.\n \nGrant Examples\n \nGranting Root-like Privileges\n \nYou can create a user that has privileges similar to the\ndefault root accounts by executing the following:\n \nCREATE USER \'alexander\'@\'localhost\';\n \nGRANT ALL PRIVILEGES ON *.* to \'alexander\'@\'localhost\'\nWITH GRANT OPTION;\n \n\n\nURL: https://mariadb.com/kb/en/grant/','','https://mariadb.com/kb/en/grant/'),(131,'ST_X',11,'Syntax\n------ \nST_X(p)\nX(p)\n \nDescription\n----------- \nReturns the X-coordinate value for the point p as a\ndouble-precision number.\n \nST_X() and X() are synonyms.\n \nExamples\n-------- \nSET @pt = \'Point(56.7 53.34)\';\n \nSELECT X(GeomFromText(@pt));\n+----------------------+\n| X(GeomFromText(@pt)) |\n+----------------------+\n| 56.7 |\n+----------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_x/','','https://mariadb.com/kb/en/st_x/'),(132,'ST_Y',11,'Syntax\n------ \nST_Y(p)\nY(p)\n \nDescription\n----------- \nReturns the Y-coordinate value for the point p as a\ndouble-precision number.\n \nST_Y() and Y() are synonyms.\n \nExamples\n-------- \nSET @pt = \'Point(56.7 53.34)\';\n \nSELECT Y(GeomFromText(@pt));\n+----------------------+\n| Y(GeomFromText(@pt)) |\n+----------------------+\n| 53.34 |\n+----------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_y/','','https://mariadb.com/kb/en/st_y/'),(133,'X',11,'A synonym for ST_X.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/point-properties-x/','','https://mariadb.com/kb/en/point-properties-x/'),(134,'Y',11,'A synonym for ST_Y.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/point-properties-y/','','https://mariadb.com/kb/en/point-properties-y/'),(135,'AES_DECRYPT',12,'Syntax\n------ \nAES_DECRYPT(crypt_str,key_str)\n \nDescription\n----------- \nThis function allows decryption of data using the official\nAES\n(Advanced Encryption Standard) algorithm. For more\ninformation, see\nthe description of AES_ENCRYPT().\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/aes_decrypt/','','https://mariadb.com/kb/en/aes_decrypt/'),(138,'DECODE',12,'Syntax\n------ \nDECODE(crypt_str,pass_str)\n \nDescription\n----------- \nDecrypts the encrypted string crypt_str using pass_str as\nthe\npassword. crypt_str should be a string returned from\nENCODE(). The resulting string will be the original string\nonly if pass_str is the same.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/decode/','','https://mariadb.com/kb/en/decode/'),(99,'EXECUTE IMMEDIATE',8,'EXECUTE IMMEDIATE was introduced in MariaDB 10.2.3.\n \nSyntax\n------ \nEXECUTE IMMEDIATE statement\n \nDescription\n----------- \nEXECUTE IMMEDIATE executes a dynamic SQL statement created\non the fly, which can reduce performance overhead.\n \nFor example:\n \nEXECUTE IMMEDIATE \'SELECT 1\' \n \nwhich is shorthand for:\n \nprepare stmt from \"select 1\";\n \nexecute stmt;\n \ndeallocate prepare stmt;\n \nEXECUTE IMMEDIATE supports complex expressions as prepare\nsource and parameters:\n \nEXECUTE IMMEDIATE CONCAT(\'SELECT COUNT(*) FROM \', \'t1\',\n\' WHERE a=?\') USING 5+5;\n \nLimitations: subselects and stored function calls are not\nsupported as a prepare source.\n \nThe following examples return an error:\n \nCREATE OR REPLACE FUNCTION f1() RETURNS VARCHAR(64) RETURN\n\'SELECT * FROM t1\';\nEXECUTE IMMEDIATE f1();\nERROR 1970 (42000): EXECUTE IMMEDIATE does not support\nsubqueries or stored functions\n \nEXECUTE IMMEDIATE (SELECT \'SELECT * FROM t1\');\nERROR 1064 (42000): You have an error in your SQL syntax;\ncheck the manual that \n corresponds to your MariaDB server version for the right\nsyntax to use near \n \'SELECT \'SELECT * FROM t1\')\' at line 1\n \nCREATE OR REPLACE FUNCTION f1() RETURNS INT RETURN 10;\nEXECUTE IMMEDIATE \'SELECT * FROM t1 WHERE a=?\' USING f1();\nERROR 1970 (42000): EXECUTE..USING does not support\nsubqueries or stored functions\n \nEXECUTE IMMEDIATE \'SELECT * FROM t1 WHERE a=?\' USING\n(SELECT 10);\nERROR 1064 (42000): You have an error in your SQL syntax;\ncheck the manual that \n corresponds to your MariaDB server version for the right\nsyntax to use near \n \'SELECT 10)\' at line 1\n \nOne can use a user or an SP variable as a workaround:\n \nCREATE OR REPLACE FUNCTION f1() RETURNS VARCHAR(64) RETURN\n\'SELECT * FROM t1\';\nSET @stmt=f1();\nEXECUTE IMMEDIATE @stmt;\n \nSET @stmt=(SELECT \'SELECT 1\');\nEXECUTE IMMEDIATE @stmt;\n \nCREATE OR REPLACE FUNCTION f1() RETURNS INT RETURN 10;\nSET @param=f1();\nEXECUTE IMMEDIATE \'SELECT * FROM t1 WHERE a=?\' USING\n@param;\n \nSET @param=(SELECT 10);\nEXECUTE IMMEDIATE \'SELECT * FROM t1 WHERE a=?\' USING\n@param;\n \nEXECUTE IMMEDIATE supports user variables and SP variables\nas OUT parameters\n \nDELIMITER $$\nCREATE OR REPLACE PROCEDURE p1(OUT a INT)\nBEGIN\n SET a:= 10;\nEND;\n$$\nDELIMITER ;\nSET @a=2;\nEXECUTE IMMEDIATE \'CALL p1(?)\' USING @a;\nSELECT @a;\n+------+\n| @a |\n+------+\n| 10 |\n+------+\n \nSimilar to PREPARE, EXECUTE IMMEDIATE is allowed in stored\nprocedures but is not allowed in stored functions.\n \nThis example uses EXECUTE IMMEDIATE inside a stored\nprocedure:\n \nDELIMITER $$\nCREATE OR REPLACE PROCEDURE p1()\nBEGIN\n EXECUTE IMMEDIATE \'SELECT 1\';\nEND;\n$$\nDELIMITER ;\nCALL p1;\n+---+\n| 1 |\n+---+\n| 1 |\n+---+\n \nThis script returns an error:\n \nDELIMITER $$\nCREATE FUNCTION f1() RETURNS INT\nBEGIN\n EXECUTE IMMEDIATE \'DO 1\';\n RETURN 1;\nEND;\n$$\nERROR 1336 (0A000): Dynamic SQL is not allowed in stored\nfunction or trigger\n \nEXECUTE IMMEDIATE can use DEFAULT and IGNORE indicators as\nbind parameters:\n \nCREATE OR REPLACE TABLE t1 (a INT DEFAULT 10);\nEXECUTE IMMEDIATE \'INSERT INTO t1 VALUES (?)\' USING\nDEFAULT;\nSELECT * FROM t1;\n+------+\n| a |\n+------+\n| 10 |\n+------+\n \nEXECUTE IMMEDIATE increments the Com_execute_immediate\nstatus variable, as well as the Com_stmt_prepare,\nCom_stmt_execute and Com_stmt_close status variables.\n \nNote, EXECUTE IMMEDIATE does not increment the\nCom_execute_sql status variable. Com_execute_sql is used\nonly for PREPARE..EXECUTE.\n \nThis session screenshot demonstrates how EXECUTE IMMEDIATE\naffects status variables:\n \nSELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE\nVARIABLE_NAME RLIKE \n (\'COM_(EXECUTE|STMT_PREPARE|STMT_EXECUTE|STMT_CLOSE)\');\n \n+-----------------------+----------------+\n| VARIABLE_NAME | VARIABLE_VALUE |\n+-----------------------+----------------+\n| COM_EXECUTE_IMMEDIATE | 0 |\n| COM_EXECUTE_SQL | 0 |\n| COM_STMT_CLOSE | 0 |\n| COM_STMT_EXECUTE | 0 |\n| COM_STMT_PREPARE | 0 |\n+-----------------------+----------------+\n \nEXECUTE IMMEDIATE \'SELECT 1\';\n+---+\n| 1 |\n+---+\n| 1 |\n+---+\n \nSELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE\nVARIABLE_NAME RLIKE \n (\'COM_(EXECUTE|STMT_PREPARE|STMT_EXECUTE|STMT_CLOSE)\');\n+-----------------------+----------------+\n| VARIABLE_NAME | VARIABLE_VALUE |\n+-----------------------+----------------+\n| COM_EXECUTE_IMMEDIATE | 1 |\n| COM_EXECUTE_SQL | 0 |\n| COM_STMT_CLOSE | 1 |\n| COM_STMT_EXECUTE | 1 |\n| COM_STMT_PREPARE | 1 |\n+-----------------------+----------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/execute-immediate/','','https://mariadb.com/kb/en/execute-immediate/'),(103,'Metadata Locking',8,'Metadata locking has been supported since MariaDB 5.5. This\nmeans that when a transaction (including XA transactions)\nuses a table, it locks its metadata until the end of\ntransaction. Non-transactional tables are also locked, as\nwell as views and objects which are related to locked\ntables/views (stored functions, triggers, etc). When a\nconnection tries to use a DDL statement (like an ALTER\nTABLE) which modifies a table that is locked, that\nconnection is queued, and has to wait until it\'s unlocked.\nUsing savepoints and performing a partial rollback does not\nrelease metadata locks.\n \nLOCK TABLES ... WRITE are also queued. Some wrong statements\nwhich produce an error may not need to wait for the lock to\nbe freed.\n \nMetadata lock\'s timeout is determined by the value of the\nlock_wait_timeout server system variable (in seconds).\nHowever, note that its default value is 31536000 (1 year).\nIf this timeout exceeds, the following error is returned:\n \nERROR 1205 (HY000): Lock wait timeout exceeded;\n try restarting transaction\n \nIf the metadata_lock_info plugin is installed, the\nInformation Schema metadata_lock_info table stores\ninformation about existing metadata locks.\n \nExample\n \nLet\'s use the following MEMORY (non-transactional) table:\n \nCREATE TABLE t (a INT) ENGINE = MEMORY;\n \nConnection 1 starts a transaction, and INSERTs a row into t:\n \nSTART TRANSACTION;\n \nINSERT INTO t SET a=1;\n \nt\'s metadata is now locked by connection 1. Connection 2\ntries to alter t, but has to wait:\n \nALTER TABLE t ADD COLUMN b INT;\n \nConnection 2\'s prompt is blocked now.\n \nNow connection 1 ends the transaction:\n \nCOMMIT;\n \n...and connection 2 finally gets the output of its command:\n \nQuery OK, 1 row affected (35.23 sec)\nRecords: 1 Duplicates: 0 Warnings: 0\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/metadata-locking/','','https://mariadb.com/kb/en/metadata-locking/'),(143,'MD5',12,'Syntax\n------ \nMD5(str)\n \nDescription\n----------- \nCalculates an MD5 128-bit checksum for the string. \n \nThe return value is a 32-hex digit string, and as of MariaDB\n5.5, is a nonbinary string in the connection character set\nand collation, determined by the values of the\ncharacter_set_connection and collation_connection system\nvariables. Before 5.5, the return value was a binary string.\n \nNULL is returned if the argument was NULL. \n \nExamples\n-------- \nSELECT MD5(\'testing\');\n+----------------------------------+\n| MD5(\'testing\') |\n+----------------------------------+\n| ae2b1fca515949e5d54fb22b8ed95575 |\n+----------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/md5/','','https://mariadb.com/kb/en/md5/'),(145,'PASSWORD',12,'Syntax\n------ \nPASSWORD(str)\n \nDescription\n----------- \nThe PASSWORD() function is used for hashing passwords for\nuse in authentication by the MariaDB server. It is not\nintended for use in other applications.\n \nCalculates and returns a hashed password string from the\nplaintext password str. Returns an empty string (>= MariaDB\n10.0.4) or NULL (\n\nURL: https://mariadb.com/kb/en/password/','','https://mariadb.com/kb/en/password/'),(100,'LOCK TABLES',8,'Syntax\n------ \nLOCK TABLE[S]\n tbl_name [[AS] alias] lock_type\n [, tbl_name [[AS] alias] lock_type] ...\n [WAIT n|NOWAIT]\n \nlock_type:\n READ [LOCAL]\n | [LOW_PRIORITY] WRITE\n | WRITE CONCURRENT\n \nUNLOCK TABLES\n \nDescription\n----------- \nThe lock_type can be one of:\n \nOption | Description | \n \nREAD | Read lock, no writes allowed | \n \nREAD LOCAL | Read lock, but allow concurrent inserts | \n \nWRITE | Exclusive write lock. No other connections can read\nor write to this table | \n \nLOW_PRIORITY WRITE | Exclusive write lock, but allow new\nread locks on the table until we get the write lock. | \n \nWRITE CONCURRENT | Exclusive write lock, but allow READ\nLOCAL locks to the table. | \n \nMariaDB enables client sessions to acquire table locks\nexplicitly for the\npurpose of cooperating with other sessions for access to\ntables, or to\nprevent other sessions from modifying tables during periods\nwhen a\nsession requires exclusive access to them. A session can\nacquire or\nrelease locks only for itself. One session cannot acquire\nlocks for\nanother session or release locks held by another session.\n \nLocks may be used to emulate transactions or to get more\nspeed when\nupdating tables.\n \nLOCK TABLES explicitly acquires table locks for the current\nclient session.\nTable locks can be acquired for base tables or views. To use\nLOCK TABLES,\nyou must have the LOCK TABLES privilege, and the SELECT\nprivilege for\neach object to be locked. See GRANT\n \nFor view locking, LOCK TABLES adds all base tables used in\nthe view to the\nset of tables to be locked and locks them automatically. If\nyou lock a table\nexplicitly with LOCK TABLES, any tables used in triggers are\nalso locked\nimplicitly, as described in Triggers and Implicit Locks.\n \nUNLOCK TABLES explicitly releases any table locks held by\nthe\ncurrent session.\n \nWAIT/NOWAIT\n \nSet the lock wait timeout. See WAIT and NOWAIT.\n \nLimitations\n \nLOCK TABLES doesn\'t work when using Galera cluster. You may\nexperience crashes or locks when used with Galera.\n \nLOCK TABLES works on XtraDB/InnoDB tables only if the\ninnodb_table_locks system variable is set to 1 (the default)\nand autocommit is set to 0 (1 is default). Please note that\nno error message will be returned on LOCK TABLES with\ninnodb_table_locks = 0.\n \nLOCK TABLES implicitly commits the active transaction, if\nany. Also, starting a transaction always releases all table\nlocks acquired with LOCK TABLES. This means that there is no\nway to have table locks and an active transaction at the\nsame time. The only exceptions are the transactions in\nautocommit mode. To preserve the data integrity between\ntransactional and non-transactional tables, the GET_LOCK()\nfunction can be used.\n \nWhile a connection holds an explicit read lock on a table,\nit cannot modify it. If you try, the following error will be\nproduced:\n \nERROR 1099 (HY000): Table \'tab_name\' was locked with a\nREAD lock and can\'t be updated\n \nWhile a connection holds an explicit lock on a table, it\ncannot access a non-locked table. If you try, the following\nerror will be produced:\n \nERROR 1100 (HY000): Table \'tab_name\' was not locked with\nLOCK TABLES\n \nWhile a connection holds an explicit lock on a table, it\ncannot issue the following: INSERT DELAYED, CREATE TABLE,\nCREATE TABLE ... LIKE, and DDL statements involving stored\nprograms and views (except for triggers). If you try, the\nfollowing error will be produced:\n \nERROR 1192 (HY000): Can\'t execute the given command because\nyou have active locked tables or an active transaction\n \nLOCK TABLES can not be used in stored routines - if you try,\nthe following error will be produced on creation:\n \nERROR 1314 (0A000): LOCK is not allowed in stored procedures\n \n\n\nURL: https://mariadb.com/kb/en/lock-tables/','','https://mariadb.com/kb/en/lock-tables/'),(105,'PURGE BINARY LOGS',8,'Syntax\n------ \nPURGE { BINARY | MASTER } LOGS\n { TO \'log_name\' | BEFORE datetime_expr }\n \nDescription\n----------- \nThe PURGE BINARY LOGS statement deletes all the binary log\nfiles listed in the log index file prior to the specified\nlog file name or\ndate. BINARY and MASTER are synonyms.\nDeleted log files also are removed from the list recorded in\nthe index file, so\nthat the given log file becomes the first in the list.\n \nThe datetime expression is in the format \'YYYY-MM-DD\nhh:mm:ss\'. \n \nIf a slave is active but has yet to read from a binary log\nfile you attempt to delete, the statement will fail with an\nerror. However, if the slave is not connected and has yet to\nread from a log file you delete, the file will be deleted,\nbut the slave will be unable to continue replicating once it\nconnects again.\n \nThis statement has no effect if the server was not started\nwith the\n--log-bin option to enable binary logging.\n \nTo list the binary log files on the server, use SHOW BINARY\nLOGS. To see which files they are reading, use SHOW SLAVE\nSTATUS. You can only delete the files that are older than\nthe oldest file that is used by the slaves.\n \nTo delete all binary log files, use RESET MASTER.\nTo move to a new log file (for example if you want to remove\nthe current log file), use FLUSH LOGS before you execute\nPURGE LOGS.\n \nIf the expire_logs_days server system variable is not set to\n0, the server automatically deletes binary log files after\nthe given number of days.\n \nExamples\n-------- \nPURGE BINARY LOGS TO \'mariadb-bin.000063\';\n \nPURGE BINARY LOGS BEFORE \'2013-04-21\';\n \nPURGE BINARY LOGS BEFORE \'2013-04-22 09:55:22\';\n \n\n\nURL: https://mariadb.com/kb/en/purge-binary-logs/','','https://mariadb.com/kb/en/purge-binary-logs/'),(150,'ENDPOINT',13,'A synonym for ST_ENDPOINT.\n \n\n \n \n \n \n \n \n \n\nURL:\nhttps://mariadb.com/kb/en/linestring-properties-endpoint/','','https://mariadb.com/kb/en/linestring-properties-endpoint/'),(151,'GLENGTH',13,'Syntax\n------ \nGLength(ls)\n \nDescription\n----------- \nReturns as a double-precision number the length of the\nLineString value ls in its associated spatial reference.\n \nExamples\n-------- \nSET @ls = \'LineString(1 1,2 2,3 3)\';\n \nSELECT GLength(GeomFromText(@ls));\n+----------------------------+\n| GLength(GeomFromText(@ls)) |\n+----------------------------+\n| 2.82842712474619 |\n+----------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/glength/','','https://mariadb.com/kb/en/glength/'),(152,'NumPoints',13,'A synonym for ST_NumPoints.\n \n\n \n \n \n \n \n \n \n\nURL:\nhttps://mariadb.com/kb/en/linestring-properties-numpoints/','','https://mariadb.com/kb/en/linestring-properties-numpoints/'),(153,'PointN',13,'A synonym for ST_PointN.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/linestring-properties-pointn/','','https://mariadb.com/kb/en/linestring-properties-pointn/'),(154,'STARTPOINT',13,'A synonym for ST_STARTPOINT.\n \n\n \n \n \n \n \n \n \n\nURL:\nhttps://mariadb.com/kb/en/linestring-properties-startpoint/','','https://mariadb.com/kb/en/linestring-properties-startpoint/'),(155,'ST_ENDPOINT',13,'Syntax\n------ \nST_EndPoint(ls)\nEndPoint(ls)\n \nDescription\n----------- \nReturns the Point that is the endpoint of the\nLineString value ls.\n \nST_EndPoint() and EndPoint() are synonyms.\n \nExamples\n-------- \nSET @ls = \'LineString(1 1,2 2,3 3)\';\n \nSELECT AsText(EndPoint(GeomFromText(@ls)));\n+-------------------------------------+\n| AsText(EndPoint(GeomFromText(@ls))) |\n+-------------------------------------+\n| POINT(3 3) |\n+-------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_endpoint/','','https://mariadb.com/kb/en/st_endpoint/'),(101,'ROLLBACK',8,'The ROLLBACK statement rolls back (ends) a transaction,\ndestroying any changes to SQL-data so that they never become\nvisible to subsequent transactions. The required syntax for\nthe ROLLBACK statement is as follows. \n \nROLLBACK [ WORK ] [ AND [ NO ] CHAIN ] \n[ TO [ SAVEPOINT ] { | } ]\n \nThe ROLLBACK statement will either end a transaction,\ndestroying all data changes that happened during any of the\ntransaction, or it will just destroy any data changes that\nhappened since you established a savepoint. The basic form\nof the ROLLBACK statement is just the keyword ROLLBACK (the\nkeyword WORK is simply noise and can be omitted without\nchanging the effect). \n \nThe optional AND CHAIN clause is a convenience for\ninitiating a new transaction as soon as the old transaction\nterminates. If AND CHAIN is specified, then there is\neffectively nothing between the old and new transactions,\nalthough they remain separate. The characteristics of the\nnew transaction will be the same as the characteristics of\nthe old one — that is, the new transaction will have the\nsame access mode, isolation level and diagnostics area size\n(we\'ll discuss all of these shortly) as the transaction\njust terminated. The AND NO CHAIN option just tells your\nDBMS to end the transaction — that is, these four SQL\nstatements are equivalent: \n \nROLLBACK;\n \nROLLBACK WORK;\n \nROLLBACK AND NO CHAIN;\n \nROLLBACK WORK AND NO CHAIN;\n \nAll of them end a transaction without saving any transaction\ncharacteristics. The only other options, the equivalent\nstatements: \n \nROLLBACK AND CHAIN;\n \nROLLBACK WORK AND CHAIN;\n \nboth tell your DBMS to end a transaction, but to save that\ntransaction\'s characteristics for the next transaction. \n \nROLLBACK is much simpler than COMMIT: it may involve no more\nthan a few deletions (of Cursors, locks, prepared SQL\nstatements and log-file entries). It\'s usually assumed that\nROLLBACK can\'t fail, although such a thing is conceivable\n(for example, an encompassing transaction might reject an\nattempt to ROLLBACK because it\'s lining up for a COMMIT). \n \nROLLBACK cancels all effects of a transaction. It does not\ncancel effects on objects outside the DBMS\'s control (for\nexample the values in host program variables or the settings\nmade by some SQL/CLI function calls). But in general, it is\na convenient statement for those situations when you say\n\"oops, this isn\'t working\" or when you simply don\'t care\nwhether your temporary work becomes permanent or not.\n \nHere is a moot question. If all you\'ve been doing is\nSELECTs, so that there have been no data changes, should you\nend the transaction with ROLLBACK or COMMIT? It shouldn\'t\nreally matter because both ROLLBACK and COMMIT do the same\ntransaction-terminating job. However, the popular conception\nis that ROLLBACK implies failure, so after a successful\nseries of SELECT statements the convention is to end the\ntransaction with COMMIT rather than ROLLBACK.\n \nMariaDB (and most other DBMSs) supports rollback of SQL-data\nchange statements, but not of SQL-Schema statements. This\nmeans that if you use any of CREATE, ALTER, DROP, GRANT,\nREVOKE, you are implicitly committing at execution time.\n \nINSERT INTO Table_2 VALUES(5); \nDROP TABLE Table_3 CASCADE;\n \nROLLBACK;\n \nThe result will be that both the INSERT and the DROP will go\nthrough as separate transactions so the ROLLBACK will have\nno effect. \n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/rollback/','','https://mariadb.com/kb/en/rollback/'),(107,'RESET SLAVE',8,'RESET SLAVE [\"connection_name\"] [ALL] \n \nRESET SLAVE makes the slave forget its replication position\nin the\nmaster\'s binary log. This statement is meant to be used for\na clean\nstart. It deletes the master.info and relay-log.info files,\nall the\nrelay log files, and starts a new relay log file. To use\nRESET SLAVE,\nthe slave replication threads must be stopped (use STOP\nSLAVE if\nnecessary).\n \nNote: All relay log files are deleted, even if they have not\nbeen\ncompletely executed by the slave SQL thread. (This is a\ncondition\nlikely to exist on a replication slave if you have issued a\nSTOP SLAVE\nstatement or if the slave is highly loaded.)\n \nConnection information stored in the master.info file is\nimmediately\nreset using any values specified in the corresponding\nstartup options.\nThis information includes values such as master host, master\nport,\nmaster user, and master password. If the slave SQL thread\nwas in the\nmiddle of replicating temporary tables when it was stopped,\nand RESET\nSLAVE is issued, these replicated temporary tables are\ndeleted on the\nslave.\n \nThe ALL also resets the PORT, HOST, USER and PASSWORD\nparameters for the slave. If you are using a connection\nname, it will permanently delete it and it will not show up\nanymore in SHOW ALL SLAVES STATUS.\n \nconnection_name\n \nThe connection_name option was added as part of multi-source\nreplication added in MariaDB 10.0\n \nIf there is only one nameless master, or the default master\n(as specified by the default_master_connection system\nvariable) is intended, connection_name can be omitted. If\nprovided, the RESET SLAVE statement will apply to the\nspecified master. connection_name is case-insensitive.\n \n\n\nURL: https://mariadb.com/kb/en/reset-slave-connection_name/','','https://mariadb.com/kb/en/reset-slave-connection_name/'),(156,'ST_NUMPOINTS',13,'Syntax\n------ \nST_NumPoints(ls)\nNumPoints(ls)\n \nDescription\n----------- \nReturns the number of Point objects in the LineString\nvalue ls.\n \nST_NumPoints() and NumPoints() are synonyms.\n \nExamples\n-------- \nSET @ls = \'LineString(1 1,2 2,3 3)\';\n \nSELECT NumPoints(GeomFromText(@ls));\n+------------------------------+\n| NumPoints(GeomFromText(@ls)) |\n+------------------------------+\n| 3 |\n+------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_numpoints/','','https://mariadb.com/kb/en/st_numpoints/'),(157,'ST_POINTN',13,'Syntax\n------ \nST_PointN(ls,N)\nPointN(ls,N)\n \nDescription\n----------- \nReturns the N-th Point in the LineString value ls.\nPoints are numbered beginning with 1.\n \nST_PointN() and PointN() are synonyms.\n \nExamples\n-------- \nSET @ls = \'LineString(1 1,2 2,3 3)\';\n \nSELECT AsText(PointN(GeomFromText(@ls),2));\n+-------------------------------------+\n| AsText(PointN(GeomFromText(@ls),2)) |\n+-------------------------------------+\n| POINT(2 2) |\n+-------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_pointn/','','https://mariadb.com/kb/en/st_pointn/'),(161,'INET_ATON',14,'Syntax\n------ \nINET_ATON(expr)\n \nDescription\n----------- \nGiven the dotted-quad representation of an IPv4 network\naddress as a string,\nreturns an integer that represents the numeric value of the\naddress.\nAddresses may be 4- or 8-byte addresses.\n \nReturns NULL if the argument is not understood.\n \nExamples\n-------- \nSELECT INET_ATON(\'192.168.1.1\');\n+--------------------------+\n| INET_ATON(\'192.168.1.1\') |\n+--------------------------+\n| 3232235777 |\n+--------------------------+\n \nThis is calculated as follows: 192 x 2563 + 168 x 256 2 + 1\nx 256 + 1\n \n\n\nURL: https://mariadb.com/kb/en/inet_aton/','','https://mariadb.com/kb/en/inet_aton/'),(162,'INET_NTOA',14,'Syntax\n------ \nINET_NTOA(expr)\n \nDescription\n----------- \nGiven a numeric IPv4 network address in network byte order\n(4 or 8 byte),\nreturns the dotted-quad representation of the address as a\nstring.\n \nExamples\n-------- \nSELECT INET_NTOA(3232235777);\n+-----------------------+\n| INET_NTOA(3232235777) |\n+-----------------------+\n| 192.168.1.1 |\n+-----------------------+\n \n192.168.1.1 corresponds to 3232235777 since 192 x 2563 + 168\nx 256 2 + 1 x 256 + 1 = 3232235777\n \n\n\nURL: https://mariadb.com/kb/en/inet_ntoa/','','https://mariadb.com/kb/en/inet_ntoa/'),(104,'PREPARE Statement',8,'Syntax\n------ \nPREPARE stmt_name FROM preparable_stmt\n \nDescription\n----------- \nThe PREPARE statement prepares a statement and assigns it a\nname,\nstmt_name, by which to refer to the statement later.\nStatement names\nare not case sensitive. preparable_stmt is either a string\nliteral or a user variable (not a local variable, an SQL\nexpression or a subquery) that contains the text of the\nstatement. The text must \nrepresent a single SQL statement, not multiple statements.\nWithin the\nstatement, \"?\" characters can be used as parameter markers\nto indicate\nwhere data values are to be bound to the query later when\nyou execute\nit. The \"?\" characters should not be enclosed within\nquotes, even if\nyou intend to bind them to string values. Parameter markers\ncan be used\nonly where data values should appear, not for SQL keywords,\nidentifiers, and so forth.\n \nThe scope of a prepared statement is the session within\nwhich it is\ncreated. Other sessions cannot see it.\n \nIf a prepared statement with the given name already exists,\nit is\ndeallocated implicitly before the new statement is prepared.\nThis means\nthat if the new statement contains an error and cannot be\nprepared, an\nerror is returned and no statement with the given name\nexists.\n \nPrepared statements can be PREPAREd and EXECUTEd in a stored\nprocedure, but not in a stored function or trigger. Also,\neven if the statement is PREPAREd in a procedure, it will\nnot be deallocated when the procedure execution ends.\n \nA prepared statement can access user-defined variables, but\nnot local variables or procedure\'s parameters.\n \nIf the prepared statement contains a syntax error, PREPARE\nwill fail. As a side effect, stored procedures can use it to\ncheck if a statement is valid. For example:\n \nCREATE PROCEDURE `test_stmt`(IN sql_text TEXT)\nBEGIN\n DECLARE EXIT HANDLER FOR SQLEXCEPTION\n BEGIN\n SELECT CONCAT(sql_text, \' is not valid\');\n END;\n SET @SQL := sql_text;\n PREPARE stmt FROM @SQL;\n DEALLOCATE PREPARE stmt;\nEND;\n \nThe FOUND_ROWS() and ROW_COUNT() functions, if called\nimmediatly after EXECUTE, return the number of rows read or\naffected by the prepared statements; however, if they are\ncalled after DEALLOCATE PREPARE, they provide information\nabout this statement. If the prepared statement produces\nerrors or warnings, GET DIAGNOSTICS return information about\nthem. DEALLOCATE PREPARE shouldn\'t clear the diagnostics\narea, unless it produces an error.\n \nA prepared statement is executed with EXECUTE and released \nwith DEALLOCATE PREPARE.\n \nThe max_prepared_stmt_count server system variable\ndetermines the number of allowed prepared statements that\ncan be prepared on the server. If it is set to 0, prepared\nstatements are not allowed. If the limit is reached, an\nerror similar to the following will be produced:\n \nERROR 1461 (42000): Can\'t create more than\nmax_prepared_stmt_count statements \n (current value: 0)\n \nOracle Mode\n \nIn Oracle mode from MariaDB 10.3, PREPARE stmt FROM \'SELECT\n:1, :2\' is used, instead of ?.\n \nPermitted Statements\n \nNot all statements can be prepared. Only the following SQL\ncommands are permitted:\nALTER TABLE\nANALYZE TABLE\nBINLOG\nCACHE INDEX\nCALL\nCHANGE MASTER\nCHECKSUM {TABLE | TABLES}\nCOMMIT\n{CREATE | DROP} DATABASE\n{CREATE | DROP} INDEX\n{CREATE | RENAME | DROP} TABLE\n{CREATE | RENAME | DROP} USER\n{CREATE | DROP} VIEW\nDELETE\nDESCRIBE\nDO\nEXPLAIN\nFLUSH {TABLE | TABLES | TABLES WITH READ LOCK | HOSTS |\nPRIVILEGES | LOGS | STATUS | \n MASTER | SLAVE | DES_KEY_FILE | USER_RESOURCES | QUERY\nCACHE | TABLE_STATISTICS | \n INDEX_STATISTICS | USER_STATISTICS | CLIENT_STATISTICS}\nGRANT\nINSERT\nINSTALL {PLUGIN | SONAME}\nHANDLER READ\nKILL\nLOAD INDEX INTO CACHE\nOPTIMIZE TABLE\nREPAIR TABLE\nREPLACE\nRESET {MASTER | SLAVE | QUERY CACHE}\nREVOKE\nROLLBACK\nSELECT\nSET\nSET GLOBAL SQL_SLAVE_SKIP_COUNTER\nSET ROLE\nSET SQL_LOG_BIN\nSET TRANSACTION ISOLATION LEVEL\nSHOW EXPLAIN\nSHOW {DATABASES | TABLES | OPEN TABLES | TABLE STATUS |\nCOLUMNS | INDEX | TRIGGERS | \n EVENTS | GRANTS | CHARACTER SET | COLLATION | ENGINES |\nPLUGINS [SONAME] | PRIVILEGES | \n PROCESSLIST | PROFILE | PROFILES | VARIABLES | STATUS |\nWARNINGS | ERRORS | \n TABLE_STATISTICS | INDEX_STATISTICS | USER_STATISTICS |\nCLIENT_STATISTICS | AUTHORS | \n CONTRIBUTORS}\nSHOW CREATE {DATABASE | TABLE | VIEW | PROCEDURE | FUNCTION\n| TRIGGER | EVENT}\nSHOW {FUNCTION | PROCEDURE} CODE\nSHOW BINLOG EVENTS\nSHOW SLAVE HOSTS\nSHOW {MASTER | BINARY} LOGS\nSHOW {MASTER | SLAVE | TABLES | INNODB | FUNCTION |\nPROCEDURE} STATUS\nSLAVE {START | STOP}\nTRUNCATE TABLE\nSHUTDOWN\nUNINSTALL {PLUGIN | SONAME}\nUPDATE\n \nSynonyms are not listed here, but can be used. For example,\nDESC can be used instead of DESCRIBE.\n \nCompound statements can be prepared too.\n \nNote that if a statement can be run in a stored routine, it\nwill work even if it is called by a prepared statement. For\nexample, SIGNAL can\'t be directly prepared. However, it is\nallowed in stored routines. If the x() procedure contains\nSIGNAL, you can still prepare and execute the \'CALL x();\'\nprepared statement.\n \nPREPARE now supports most kinds of expressions as well, for\nexample:\n \nPREPARE stmt FROM CONCAT(\'SELECT * FROM \', table_name);\n \nWhen PREPARE is used with a statement which is not\nsupported, the following error is produced:\n \nERROR 1295 (HY000): This command is not supported in the\nprepared statement protocol yet\n \nExample\n \ncreate table t1 (a int,b char(10));\ninsert into t1 values (1,\"one\"),(2,\n\"two\"),(3,\"three\");\nprepare test from \"select * from t1 where a=?\";\nset @param=2;\nexecute test using @param;\n+------+------+\n| a | b |\n+------+------+\n| 2 | two |\n+------+------+\nset @param=3;\nexecute test using @param;\n+------+-------+\n| a | b |\n+------+-------+\n| 3 | three |\n+------+-------+\ndeallocate prepare test;\n \nSince identifiers are not permitted as prepared statements\nparameters, sometimes it is necessary to dynamically compose\nan SQL statement. This technique is called dynamic SQL). The\nfollowing example shows how to use dynamic SQL:\n \nCREATE PROCEDURE test.stmt_test(IN tab_name VARCHAR(64))\nBEGIN\n SET @sql = CONCAT(\'SELECT COUNT(*) FROM \', tab_name);\n PREPARE stmt FROM @sql;\n EXECUTE stmt;\n DEALLOCATE PREPARE stmt;\nEND;\n \nCALL test.stmt_test(\'mysql.user\');\n+----------+\n| COUNT(*) |\n+----------+\n| 4 |\n+----------+\n \nUse of variables in prepared statements:\n \nPREPARE stmt FROM \'SELECT @x;\';\n \nSET @x = 1;\n \nEXECUTE stmt;\n+------+\n| @x |\n+------+\n| 1 |\n+------+\n \nSET @x = 0;\n \nEXECUTE stmt;\n+------+\n| @x |\n+------+\n| 0 |\n+------+\n \nDEALLOCATE PREPARE stmt;\n \n\n\nURL: https://mariadb.com/kb/en/prepare-statement/','','https://mariadb.com/kb/en/prepare-statement/'),(163,'IS_FREE_LOCK',14,'Syntax\n------ \nIS_FREE_LOCK(str)\n \nDescription\n----------- \nChecks whether the lock named str is free to use (that is,\nnot locked).\nReturns 1 if the lock is free (no one is using the lock),\n 0 if the lock is in use, and NULL if an\nerror occurs (such as an incorrect argument, like an empty\nstring or NULL). str is case insensitive.\n \nIf the metadata_lock_info plugin is installed, the\nInformation Schema metadata_lock_info table contains\ninformation about locks of this kind (as well as metadata\nlocks).\n \nStatements using the IS_FREE_LOCK() function are not safe\nfor replication.\n \n\n\nURL: https://mariadb.com/kb/en/is_free_lock/','','https://mariadb.com/kb/en/is_free_lock/'),(167,'IS_IPV6',14,'IS_IPV6() has been available since MariaDB 10.0.12.\n \nSyntax\n------ \nIS_IPV6(expr)\n \nDescription\n----------- \nReturns 1 if the expression is a valid IPv6 address\nspecified as a string, otherwise returns 0. Does not\nconsider IPv4 addresses to be valid IPv6 addresses.\n \nExamples\n-------- \n SELECT IS_IPV6(\'48f3::d432:1431:ba23:846f\');\n+--------------------------------------+\n| IS_IPV6(\'48f3::d432:1431:ba23:846f\') |\n+--------------------------------------+\n| 1 |\n+--------------------------------------+\n1 row in set (0.02 sec)\n \nSELECT IS_IPV6(\'10.0.1.1\');\n+---------------------+\n| IS_IPV6(\'10.0.1.1\') |\n+---------------------+\n| 0 |\n+---------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/is_ipv6/','','https://mariadb.com/kb/en/is_ipv6/'),(108,'SET TRANSACTION',8,'Syntax\n------ \nSET [GLOBAL | SESSION] TRANSACTION\n transaction_property [, transaction_property] ...\n \ntransaction_property:\n ISOLATION LEVEL level\n | READ WRITE\n | READ ONLY\n \nlevel:\n REPEATABLE READ\n | READ COMMITTED\n | READ UNCOMMITTED\n | SERIALIZABLE\n \nDescription\n----------- \nThis statement sets the transaction isolation level or the\ntransaction access mode globally, for the current session,\nor for the next transaction:\nWith the GLOBAL keyword, the statement sets the default\n transaction level globally for all subsequent sessions.\nExisting sessions are\n unaffected.\nWith the SESSION keyword, the statement sets the default\n transaction level for all subsequent transactions performed\nwithin the\n current session.\nWithout any SESSION or GLOBAL keyword,\n the statement sets the isolation level for the next (not\nstarted) transaction\n performed within the current session.\n \nA change to the global default isolation level requires the \nSUPER privilege. Any session is free to change its\nsession isolation level (even in the middle of a\ntransaction), or the isolation\nlevel for its next transaction.\n \nIsolation Level\n \nTo set the global default isolation level at server startup,\nuse the\n--transaction-isolation=level option on the command line or\nin an option file. Values of level for this option use\ndashes\nrather than spaces, so the allowable values are\nREAD-UNCOMMITTED,\nREAD-COMMITTED, REPEATABLE-READ, or\nSERIALIZABLE. For example, to set the default isolation\nlevel to REPEATABLE READ, use these lines in the [mysqld]\nsection of an option file:\n \n[mysqld]\ntransaction-isolation = REPEATABLE-READ\nTo determine the global and session transaction isolation\nlevels at\nruntime, check the value of the tx_isolation system\nvariable:\n \nSELECT @@GLOBAL.tx_isolation, @@tx_isolation;\n \nInnoDB supports each of the translation isolation levels\ndescribed here\nusing different locking strategies. The default level is \nREPEATABLE READ. For additional information about InnoDB\nrecord-level locks and how it uses them to execute various\ntypes of statements,\nsee XtraDB/InnoDB Lock Modes,\nand\nhttp://dev.mysql.com/doc/refman/en/innodb-locks-set.html.\n \nIsolation Levels\n \nThe following sections describe how MariaDB supports the\ndifferent transaction levels.\n \nREAD UNCOMMITTED\n \nSELECT statements are performed in a non-locking fashion,\nbut a possible earlier version of a row might be used. Thus,\nusing this\nisolation level, such reads are not consistent. This is also\ncalled a \"dirty\nread.\" Otherwise, this isolation level works like \nREAD COMMITTED.\n \nREAD COMMITTED\n \nA somewhat Oracle-like isolation level with respect to\nconsistent\n(non-locking) reads: Each consistent read, even within the\nsame\ntransaction, sets and reads its own fresh snapshot. See\nhttp://dev.mysql.com/doc/refman/en/innodb-consistent-read.html.\n \nFor locking reads (SELECT with FOR UPDATE\nor LOCK IN SHARE MODE), InnoDB locks only index records, not\nthe gaps before them, and thus allows the free insertion of\nnew records next to\nlocked records. For UPDATE and DELETE\nstatements, locking depends on whether the statement uses a\nunique index with a\nunique search condition (such as WHERE id = 100), or a\nrange-type search condition (such as WHERE id > 100). For a\nunique index with a unique search condition, InnoDB locks\nonly the index record\nfound, not the gap before it. For range-type searches,\nInnoDB locks the index\nrange scanned, using gap locks or next-key (gap plus\nindex-record) locks to\nblock insertions by other sessions into the gaps covered by\nthe range. This is\nnecessary because \"phantom rows\" must be blocked for MySQL\nreplication and\nrecovery to work.\n \nNote: Since MariaDB 5.1, if the READ COMMITTED isolation\nlevel is used or the innodb_locks_unsafe_for_binlog system\nvariable is enabled,\nthere is no InnoDB gap locking except for foreign-key\nconstraint checking and\nduplicate-key checking. Also, record locks for non-matching\nrows are released\nafter MariaDB has evaluated the WHERE condition. As of\nMariaDB/MySQL\n5.1, if you use READ COMMITTED or enable\ninnodb_locks_unsafe_for_binlog, you must use row-based\nbinary logging.\n \nREPEATABLE READ\n \nThis is the default isolation level for InnoDB. For\nconsistent reads,\nthere is an important difference from the READ COMMITTED\nisolation level: All consistent reads within the same\ntransaction read the\nsnapshot established by the first read. This convention\nmeans that if you issue\nseveral plain (non-locking) SELECT statements within the\nsame transaction, these SELECT statements are consistent\nalso with respect to each other. See\nhttp://dev.mysql.com/doc/refman/en/innodb-consistent-read.html.\n \nFor locking reads (SELECT with FOR UPDATE or LOCK IN SHARE\nMODE),\nUPDATE, and DELETE statements, locking depends on whether\nthe\nstatement uses a unique index with a unique search\ncondition, or a\nrange-type search condition. For a unique index with a\nunique search\ncondition, InnoDB locks only the index record found, not the\ngap\nbefore it. For other search conditions, InnoDB locks the\nindex range\nscanned, using gap locks or next-key (gap plus index-record)\nlocks to\nblock insertions by other sessions into the gaps covered by\nthe range.\n \nThis is the minimum isolation level for non-distributed XA\ntransactions.\n \nSERIALIZABLE\n \nThis level is like REPEATABLE READ, but InnoDB implicitly\nconverts all\nplain SELECT statements to SELECT ... LOCK IN SHARE MODE if\nautocommit\nis disabled. If autocommit is enabled, the SELECT is its own\ntransaction. It therefore is known to be read only and can\nbe\nserialized if performed as a consistent (non-locking) read\nand need\nnot block for other transactions. (This means that to force\na plain\nSELECT to block if other transactions have modified the\nselected rows,\nyou should disable autocommit.)\n \nDistributed XA transactions should always use this isolation\nlevel.\n \nAccess Mode\n \nThese clauses appeared in MariaDB 10.0.\n \nThe access mode specifies whether the transaction is allowed\nto write data or not. By default, transactions are in READ\nWRITE mode (see the tx_read_only system variable). READ ONLY\nmode allows the storage engine to apply optimizations that\ncannot be used for transactions which write data. The only\nexception to this rule is that read only transactions can\nperform DDL statements on temporary tables.\n \nIt is not permitted to specify both READ WRITE and READ ONLY\nin the same statement.\n \nREAD WRITE and READ ONLY can also be specified in the START\nTRANSACTION statement, in which case the specified mode is\nonly valid for one transaction.\n \nExamples\n-------- \nSET GLOBAL TRANSACTION ISOLATION LEVEL SERIALIZABLE;\n \nAttempting to set the isolation level within an existing\ntransaction without specifying GLOBAL or SESSION.\n \nSTART TRANSACTION;\n \nSET TRANSACTION ISOLATION LEVEL SERIALIZABLE;\nERROR 1568 (25001): Transaction characteristics can\'t be\nchanged while a transaction is in progress\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/set-transaction/','','https://mariadb.com/kb/en/set-transaction/'),(168,'IS_USED_LOCK',14,'Syntax\n------ \nIS_USED_LOCK(str)\n \nDescription\n----------- \nChecks whether the lock named str is in use (that is,\nlocked). If so,\nit returns the connection identifier of the client that\nholds the\nlock. Otherwise, it returns NULL. str is case insensitive.\n \nIf the metadata_lock_info plugin is installed, the\nInformation Schema metadata_lock_info table contains\ninformation about locks of this kind (as well as metadata\nlocks).\n \nStatements using the IS_USED_LOCK() function are not safe\nfor replication.\n \n\n\nURL: https://mariadb.com/kb/en/is_used_lock/','','https://mariadb.com/kb/en/is_used_lock/'),(109,'START SLAVE',8,'Syntax\n------ \nSTART SLAVE [\"connection_name\"] [thread_type [,\nthread_type] ... ]\nSTART SLAVE [\"connection_name\"] [SQL_THREAD] UNTIL \n MASTER_LOG_FILE = \'log_name\', MASTER_LOG_POS = log_pos\nSTART SLAVE [\"connection_name\"] [SQL_THREAD] UNTIL\n RELAY_LOG_FILE = \'log_name\', RELAY_LOG_POS = log_pos\nSTART SLAVE [\"connection_name\"] [SQL_THREAD] UNTIL\n MASTER_GTID_POS = \nSTART ALL SLAVES [thread_type [, thread_type]]\nthread_type: IO_THREAD | SQL_THREAD\n \nDescription\n----------- \nSTART SLAVE with no thread_type options starts both of the\nslave\nthreads (see replication). The I/O thread reads events from\nthe master server and stores\nthem in the relay log. The SQL thread reads events from the\nrelay log\nand executes them. START SLAVE requires the SUPER privilege.\n \nIf START SLAVE succeeds in starting the slave threads, it\nreturns\nwithout any error. However, even in that case, it might be\nthat the\nslave threads start and then later stop (for example,\nbecause they do\nnot manage to connect to the master or read its binary log,\nor some\nother problem). START SLAVE does not warn you about this.\nYou must\ncheck the slave\'s error log for error messages generated by\nthe slave\nthreads, or check that they are running satisfactorily with\nSHOW SLAVE\nSTATUS.\n \nSTART SLAVE UNTIL\n \nSTART SLAVE UNTIL refers to the SQL_THREAD slave position at\nwhich the SQL_THREAD replication will halt. If SQL_THREAD\nisn\'t specified both threads are started.\n \nSince version 10.0.2, START SLAVE UNTIL master_gtid_pos=xxx\nhas also been supported. See Global Transaction ID/START\nSLAVE UNTIL master_gtid_pos=xxx for more details.\n \nconnection_name\n \nThe connection_name option was added as part of multi-source\nreplication added in MariaDB 10.0\n \nIf there is only one nameless master, or the default master\n(as specified by the default_master_connection system\nvariable) is intended, connection_name can be omitted. If\nprovided, the START SLAVE statement will apply to the\nspecified master. connection_name is case-insensitive.\n \nSTART ALL SLAVES\n \nSTART ALL SLAVES starts all configured slaves (slaves with\nmaster_host not empty) that were not started before. It will\ngive a note for all started connections. You can check the\nnotes with SHOW WARNINGS.\n \n\n\nURL: https://mariadb.com/kb/en/start-slave/','','https://mariadb.com/kb/en/start-slave/'),(110,'START TRANSACTION',8,'Syntax\n------ \nSTART TRANSACTION [transaction_property [,\ntransaction_property] ...] | BEGIN [WORK]\nCOMMIT [WORK] [AND [NO] CHAIN] [[NO] RELEASE]\nROLLBACK [WORK] [AND [NO] CHAIN] [[NO] RELEASE]\nSET autocommit = {0 | 1}\n \ntransaction_property:\n WITH CONSISTENT SNAPSHOT\n | READ WRITE\n | READ ONLY\n \nDescription\n----------- \nThe START TRANSACTION or BEGIN statement\nbegins a new transaction. COMMIT commits the current\ntransaction, making its changes permanent. ROLLBACK rolls\nback the current transaction, canceling its changes. The SET\nautocommit statement disables or enables the default\nautocommit mode for the current session.\n \nSTART TRANSACTION and SET autocommit = 1 implicitly commit\nthe current transaction, if any.\n \nThe optional WORK keyword is supported for\nCOMMIT and ROLLBACK, as are the\nCHAIN and RELEASE clauses.\nCHAIN and RELEASE can be used for\nadditional control over transaction completion. The value of\nthe\ncompletion_type system variable determines the default\ncompletion behavior.\n \nThe AND CHAIN clause causes a new transaction to begin as\nsoon as the current one ends, and the new transaction has\nthe same isolation\nlevel as the just-terminated transaction. The RELEASE clause\ncauses the server to disconnect the current client session\nafter terminating\nthe current transaction. Including the NO keyword suppresses\nCHAIN or RELEASE completion, which can be\nuseful if the completion_type system variable is set to\ncause chaining or release completion by default.\n \nAccess Mode\n \nThese clauses appeared in MariaDB 10.0.\n \nThe access mode specifies whether the transaction is allowed\nto write data or not. By default, transactions are in READ\nWRITE mode (see the tx_read_only system variable). READ ONLY\nmode allows the storage engine to apply optimizations that\ncannot be used for transactions which write data. The only\nexception to this rule is that read only transactions can\nperform DDL statements on temporary tables.\n \nIt is not permitted to specify both READ WRITE and READ ONLY\nin the same statement.\n \nREAD WRITE and READ ONLY can also be specified in the SET\nTRANSACTION statement, in which case the specified mode is\nvalid for all sessions, or for all subsequent transaction\nused by the current session.\n \nautocommit\n \nBy default, MariaDB runs with autocommit mode enabled. This\nmeans that as soon as you execute a statement that updates\n(modifies) a table, MariaDB stores the update on disk to\nmake it permanent. To disable autocommit mode, use the\nfollowing statement:\n \nSET autocommit=0;\n \nAfter disabling autocommit mode by setting the autocommit\nvariable to zero, changes to transaction-safe tables (such\nas those for InnoDB or\nNDBCLUSTER) are not made permanent immediately. You must use\nCOMMIT to store your changes to disk or ROLLBACK to ignore\nthe changes.\n \nTo disable autocommit mode for a single series of\nstatements, use the START TRANSACTION statement.\n \nDDL Statements\n \nDDL statements (CREATE, ALTER, DROP) and administrative\nstatements (FLUSH, RESET, OPTIMIZE, ANALYZE, CHECK, REPAIR,\nCACHE INDEX), and LOAD DATA INFILE, cause an implicit COMMIT\nand start a new transaction. An exception to this rule are\nthe DDL that operate on temporary tables: you can CREATE,\nALTER and DROP them without causing any COMMIT, but those\nactions cannot be rolled back. This means that if you call\nROLLBACK, the temporary tables you created in the\ntransaction will remain, while the rest of the transaction\nwill be rolled back.\n \nTransactions cannot be used in Stored Functions or Triggers.\nIn Stored Procedures and Events BEGIN is not allowed, so you\nshould use START TRANSACTION instead.\n \nA transaction acquires a metadata lock on every table it\naccesses to prevent other connections from altering their\nstructure. The lock is released at the end of the\ntransaction. This happens even with non-transactional\nstorage engines (like MEMORY or CONNECT), so it makes sense\nto use transactions with non-transactional tables.\n \nin_transaction\n \nThe in_transaction system variable appeared in MariaDB 5.3.\n \nIt is a session-only, read-only variable that returns 1\ninside a transaction, and 0 if not in a transaction.\n \nWITH CONSISTENT SNAPSHOT\n \nThe WITH CONSISTENT SNAPSHOT option starts a consistent read\nfor storage engines such as XtraDB and InnoDB that can do\nso, the same as if a START TRANSACTION followed by a SELECT\nfrom any InnoDB table was issued. \n \nMariaDB 5.3 introduced enhancements to this feature. See\nEnhancements for START TRANSACTION WITH CONSISTENT SNAPSHOT.\n \nExamples\n-------- \nSTART TRANSACTION;\n \nSELECT @A:=SUM(salary) FROM table1 WHERE type=1;\n \nUPDATE table2 SET summary=@A WHERE type=1;\n \nCOMMIT;\n \n\n\nURL: https://mariadb.com/kb/en/start-transaction/','','https://mariadb.com/kb/en/start-transaction/'),(171,'NAME_CONST',14,'Syntax\n------ \nNAME_CONST(name,value)\n \nDescription\n----------- \nReturns the given value. When used to produce a result set\ncolumn,\n NAME_CONST() causes the column to have the given name. The\narguments should be constants.\n \nThis function is used internally when replicating stored\nprocedures. It makes little sense to use it explicitly in\nSQL statements, and it was not supposed to be used like\nthat.\n \nSELECT NAME_CONST(\'myname\', 14);\n+--------+\n| myname |\n+--------+\n| 14 |\n+--------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/name_const/','','https://mariadb.com/kb/en/name_const/'),(111,'STOP SLAVE',8,'Syntax\n------ \nSTOP SLAVE [\"connection_name\"] [thread_type [,\nthread_type] ... ]\n \nSTOP ALL SLAVES [thread_type [, thread_type]]\n \nthread_type: IO_THREAD | SQL_THREAD\n \nDescription\n----------- \nStops the slave threads. STOP SLAVE requires the SUPER\nprivilege.\n \nLike START SLAVE, this statement may be used with the\nIO_THREAD and\nSQL_THREAD options to name the thread or threads to be\nstopped. In almost all cases, one never need to use the\nthread_type options.\n \nSTOP SLAVE waits until any current replication event group\naffecting\none or more non-transactional tables has finished executing\n(if there\nis any such replication group), or until the user issues a\nKILL QUERY or KILL CONNECTION statement.\n \nNote that STOP SLAVE doesn\'t delete the connection\npermanently. Next time you execute START SLAVE or the\nMariaDB server restarts, the slave connection is restored\nwith it\'s original arguments. If you want to delete a\nconnection, you should execute RESET SLAVE.\n \nSTOP ALL SLAVES\n \nSTOP ALL SLAVES stops all your running slaves. It will give\nyou a note for every stopped connection. You can check the\nnotes with SHOW WARNINGS.\n \nconnection_name\n \nThe connection_name option was added as part of multi-source\nreplication added in MariaDB 10.0\n \nIf there is only one nameless master, or the default master\n(as specified by the default_master_connection system\nvariable) is intended, connection_name can be omitted. If\nprovided, the STOP SLAVE statement will apply to the\nspecified master. connection_name is case-insensitive.\n \n\n\nURL: https://mariadb.com/kb/en/stop-slave/','','https://mariadb.com/kb/en/stop-slave/'),(112,'Transaction Timeouts',8,'MariaDB has always had the wait_timeout and\ninteractive_timeout settings, which close connections after\na certain period of inactivity.\n \nHowever, these are by default set to a long wait period. In\nsituations where transactions may be started, but not\ncommitted or rolled back, more granular control and a\nshorter timeout may be desirable so as to avoid locks being\nheld for too long.\n \nMariaDB 10.3 introduced three new variables to handle this\nsituation.\nidle_transaction_timeout (all transactions)\nidle_write_transaction_timeout (write transactions - called\nidle_readwrite_transaction_timeout until MariaDB 10.3.2)\nidle_readonly_transaction_timeout (read transactions)\n \nThese accept a time in seconds to time out, by closing the\nconnection, transactions that are idle for longer than this\nperiod. By default all are set to zero, or no timeout.\n \nidle_transaction_timeout affects all transactions,\nidle_write_transaction_timeout affects write transactions\nonly and idle_readonly_transaction_timeout affects read\ntransactions only. The latter two variables work\nindependently. However, if either is set along with\nidle_transaction_timeout, the settings for\nidle_write_transaction_timeout or\nidle_readonly_transaction_timeout will take precedence.\n \nExamples\n-------- \nSET SESSION idle_transaction_timeout=2;\n \nBEGIN;\n \nSELECT * FROM t;\n \nEmpty set (0.000 sec)\n## wait 3 seconds\nSELECT * FROM t;\n \nERROR 2006 (HY000): MySQL server has gone away\n \nSET SESSION idle_write_transaction_timeout=2;\n \nBEGIN;\n \nSELECT * FROM t;\n \nEmpty set (0.000 sec)\n## wait 3 seconds\nSELECT * FROM t;\n \nEmpty set (0.000 sec)\nINSERT INTO t VALUES(1);\n## wait 3 seconds\nSELECT * FROM t;\n \nERROR 2006 (HY000): MySQL server has gone away\n \nSET SESSION idle_transaction_timeout=2, SESSION\nidle_readonly_transaction_timeout=10;\n \nBEGIN;\n \nSELECT * FROM t;\n \nEmpty set (0.000 sec)\n ## wait 3 seconds\nSELECT * FROM t;\n \nEmpty set (0.000 sec)\n## wait 11 seconds\nSELECT * FROM t;\n \nERROR 2006 (HY000): MySQL server has gone away\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/transaction-timeouts/','','https://mariadb.com/kb/en/transaction-timeouts/'),(114,'WAIT and NOWAIT',8,'MariaDB 10.3.0 introduced extended syntax so that it is\npossible to set innodb_lock_wait_timeout and\nlock_wait_timeout for the following statements:\n \nSyntax\n------ \nALTER TABLE tbl_name [WAIT n|NOWAIT] ...\nCREATE ... INDEX ON tbl_name (index_col_name, ...) [WAIT\nn|NOWAIT] ...\nDROP INDEX ... [WAIT n|NOWAIT]\nDROP TABLE tbl_name [WAIT n|NOWAIT] ...\nLOCK TABLE ... [WAIT n|NOWAIT]\nOPTIMIZE TABLE tbl_name [WAIT n|NOWAIT]\nRENAME TABLE tbl_name [WAIT n|NOWAIT] ...\nSELECT ... FOR UPDATE [WAIT n|NOWAIT]\nSELECT ... LOCK IN SHARE MODE [WAIT n|NOWAIT]\nTRUNCATE TABLE tbl_name [WAIT n|NOWAIT]\n \nDescription\n----------- \nThe lock wait timeout can be explicitly set in the statement\nby using either WAIT n (to set the wait in seconds) or\nNOWAIT, in which case the statement will immediately fail if\nthe lock cannot be obtained. WAIT 0 is equivalent to NOWAIT.\n \n\n\nURL: https://mariadb.com/kb/en/wait-and-nowait/','','https://mariadb.com/kb/en/wait-and-nowait/'),(116,'Account Locking',10,'Account locking was introduced in MariaDB 10.4.2.\n \nDescription\n----------- \nAccount locking permits privileged administrators to\nlock/unlock user accounts. No new client connections will be\npermitted if an account is locked (existing connections are\nnot affected).\n \nUser accounts can be locked at creation, with the CREATE\nUSER statement, or modified after creation with the ALTER\nUSER statement. For example:\n \nCREATE USER \'lorin\'@\'localhost\' ACCOUNT LOCK;\n \nor\n \nALTER USER \'marijn\'@\'localhost\' ACCOUNT LOCK;\n \nThe server will return an ER_ACCOUNT_HAS_BEEN_LOCKED error\nwhen locked users attempt to connect:\n \nmysql -ulorin\n ERROR 4151 (HY000): Access denied, this account is locked\n \nThe ALTER USER statement is also used to unlock a user:\n \nALTER USER \'lorin\'@\'localhost\' ACCOUNT UNLOCK;\n \nThe SHOW CREATE USER statement will show whether the account\nis locked:\n \nSHOW CREATE USER \'marijn\'@\'localhost\';\n \n+-----------------------------------------------+\n| CREATE USER for marijn@localhost |\n+-----------------------------------------------+\n| CREATE USER \'marijn\'@\'localhost\' ACCOUNT LOCK |\n+-----------------------------------------------+\n \nas well as querying the mysql.global_priv table:\n \nSELECT CONCAT(user, \'@\', host, \' => \',\nJSON_DETAILED(priv)) FROM mysql.global_priv \n WHERE user=\'marijn\';\n+--------------------------------------------------------------------------------------+\n| CONCAT(user, \'@\', host, \' => \', JSON_DETAILED(priv)) |\n+--------------------------------------------------------------------------------------+\n| marijn@localhost => {\n \"access\": 0,\n \"plugin\": \"mysql_native_password\",\n \"authentication_string\": \"\",\n \"account_locked\": true,\n \"password_last_changed\": 1558017158\n} |\n+--------------------------------------------------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/account-locking/','','https://mariadb.com/kb/en/account-locking/'),(173,'SLEEP',14,'Syntax\n------ \nSLEEP(duration)\n \nDescription\n----------- \nSleeps (pauses) for the number of seconds given by the\nduration argument, then\nreturns 0. If SLEEP() is interrupted, it\nreturns 1. The duration may have a fractional part given in\nmicroseconds.\n \nStatements using the SLEEP() function are not safe for\nreplication.\n \nExample\n \nSELECT SLEEP(5.5);\n+------------+\n| SLEEP(5.5) |\n+------------+\n| 0 |\n+------------+\n1 row in set (5.50 sec)\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/sleep/','','https://mariadb.com/kb/en/sleep/'),(175,'UUID_SHORT',14,'Syntax\n------ \nUUID_SHORT()\n \nDescription\n----------- \nReturns a \"short\" universal identifier as a 64-bit\nunsigned integer (rather\nthan a string-form 128-bit identifier as returned by the\nUUID() function).\n \nThe value of UUID_SHORT() is guaranteed to be unique if the\nfollowing conditions hold:\nThe server_id of the current host is unique among your set\nof master and\n slave servers\nserver_id is between 0 and 255\nYou don\'t set back your system time for your server between\nmysqld restarts\nYou do not invoke UUID_SHORT() on average more than 16\n million times per second between mysqld restarts\n \nThe UUID_SHORT() return value is constructed this way:\n \n (server_id & 255) \n\nURL: https://mariadb.com/kb/en/uuid_short/','','https://mariadb.com/kb/en/uuid_short/'),(120,'DROP USER',10,'Syntax\n------ \nDROP USER [IF EXISTS] user_name [, user_name] ...\n \nDescription\n----------- \nThe DROP USER statement removes one or more MariaDB\naccounts. It removes\nprivilege rows for the account from all grant tables. To use\nthis statement,\nyou must have the global CREATE USER privilege\nor the DELETE privilege for the mysql database.\nEach account is named using the same format as for the\nCREATE USER\nstatement; for example, \'jeffrey\'@\'localhost\'. If you\nspecify\nonly the user name part of the account name, a host name\npart of \'%\' is\nused. For additional information about specifying account\nnames, see\nCREATE USER.\n \nNote that, if you specify an account that is currently\nconnected, it will not\nbe deleted until the connection is closed. The connection\nwill not be\nautomatically closed.\n \nIf any of the specified user accounts do not exist, ERROR\n1396 (HY000)\nresults. If an error occurs, DROP USER will still drop the\naccounts that do\nnot result in an error. Only one error is produced for all\nusers which have not\nbeen dropped:\n \nERROR 1396 (HY000): Operation DROP USER failed for\n\'u1\'@\'%\',\'u2\'@\'%\'\n \nFailed CREATE or DROP operations, for both users and roles,\nproduce the\nsame error code.\n \nIF EXISTS\n \nThe IF EXISTS clause was added in MariaDB 10.1.3\n \nIf the IF EXISTS clause is used, MariaDB will return a note\ninstead of an error if the user does not exist.\n \nExamples\n-------- \nDROP USER bob;\n \nIF EXISTS:\n \nDROP USER bob;\n \nERROR 1396 (HY000): Operation DROP USER failed for\n\'bob\'@\'%\'\n \nDROP USER IF EXISTS bob;\n \nQuery OK, 0 rows affected, 1 warning (0.00 sec)\n \nSHOW WARNINGS;\n \n+-------+------+---------------------------------------------+\n| Level | Code | Message |\n+-------+------+---------------------------------------------+\n| Note | 1974 | Can\'t drop user \'bob\'@\'%\'; it doesn\'t\nexist |\n+-------+------+---------------------------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/drop-user/','','https://mariadb.com/kb/en/drop-user/'),(122,'User Password Expiry',10,'User password expiry was introduced in MariaDB 10.4.3.\n \nPassword expiry permits administrators to expire user\npasswords, either manually or automatically. \n \nSystem Variables\n \nThere are two system variables which affect password expiry:\ndefault_password_lifetime, which determines the amount of\ntime between requiring the user to change their password. 0,\nthe default, means automatic password expiry is not active.\n \nThe second variable, disconnect_on_expired_password\ndetermines whether a client is permitted to connect if their\npassword has expired, or whether they are permitted to\nconnect in sandbox mode, able to perform a limited subset of\nqueries related to resetting the password, in particular SET\nPASSWORD and SET.\n \nSetting a Password Expiry Limit for a User\n \nBesides automatic password expiry, as determined by\ndefault_password_lifetime, password expiry times can be set\non an individual user basis, overriding the global using the\nCREATE USER or ALTER USER statements, for example:\n \nCREATE USER \'monty\'@\'localhost\' PASSWORD EXPIRE INTERVAL\n120 DAY;\n \nALTER USER \'monty\'@\'localhost\' PASSWORD EXPIRE INTERVAL\n120 DAY;\n \nLimits can be disabled by use of the NEVER keyword, for\nexample:\n \nCREATE USER \'monty\'@\'localhost\' PASSWORD EXPIRE NEVER;\n \nALTER USER \'monty\'@\'localhost\' PASSWORD EXPIRE NEVER;\n \nA manually set limit can be restored the system default by\nuse of DEFAULT, for example:\n \nCREATE USER \'monty\'@\'localhost\' PASSWORD EXPIRE DEFAULT;\n \nALTER USER \'monty\'@\'localhost\' PASSWORD EXPIRE DEFAULT;\n \nSHOW CREATE USER\n \nThe SHOW CREATE USER statement will display information\nabout the password expiry status of the user. Unlike MySQL,\nit will not display if the user is unlocked, or if the\npassword expiry is set to default.\n \nCREATE USER \'monty\'@\'localhost\' PASSWORD EXPIRE INTERVAL\n120 DAY;\n \nCREATE USER \'konstantin\'@\'localhost\' PASSWORD EXPIRE\nNEVER;\n \nCREATE USER \'amse\'@\'localhost\' PASSWORD EXPIRE DEFAULT;\n \nSHOW CREATE USER \'monty\'@\'localhost\';\n \n+------------------------------------------------------------------+\n| CREATE USER for monty@localhost |\n+------------------------------------------------------------------+\n| CREATE USER \'monty\'@\'localhost\' PASSWORD EXPIRE\nINTERVAL 120 DAY |\n+------------------------------------------------------------------+\n \nSHOW CREATE USER \'konstantin\'@\'localhost\';\n \n+------------------------------------------------------------+\n| CREATE USER for konstantin@localhost |\n+------------------------------------------------------------+\n| CREATE USER \'konstantin\'@\'localhost\' PASSWORD EXPIRE\nNEVER |\n+------------------------------------------------------------+\n \nSHOW CREATE USER \'amse\'@\'localhost\';\n \n+--------------------------------+\n| CREATE USER for amse@localhost |\n+--------------------------------+\n| CREATE USER \'amse\'@\'localhost\' |\n+--------------------------------+\n \n--connect-expired-password Client Option\n \nThe mysql client --connect-expired-password option notifies\nthe server that the client is prepared to handle expired\npassword sandbox mode (even if the --batch option was\nspecified).\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/user-password-expiry/','','https://mariadb.com/kb/en/user-password-expiry/'),(177,'!',15,'Syntax\n------ \nNOT, !\n \nDescription\n----------- \nLogical NOT. Evaluates to 1 if the operand is 0, to 0 if the\noperand\nis non-zero, and NOT NULL returns NULL.\n \nBy default, the ! operator has a higher precedence. If the\nHIGH_NOT_PRECEDENCE SQL_MODE flag is set, NOT and ! have the\nsame precedence.\n \nExamples\n-------- \nSELECT NOT 10;\n \n+--------+\n| NOT 10 |\n+--------+\n| 0 |\n+--------+\n \nSELECT NOT 0;\n \n+-------+\n| NOT 0 |\n+-------+\n| 1 |\n+-------+\n \nSELECT NOT NULL;\n \n+----------+\n| NOT NULL |\n+----------+\n| NULL |\n+----------+\n \nSELECT ! (1+1);\n+---------+\n| ! (1+1) |\n+---------+\n| 0 |\n+---------+\n \nSELECT ! 1+1;\n \n+-------+\n| ! 1+1 |\n+-------+\n| 1 |\n+-------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/not/','','https://mariadb.com/kb/en/not/'),(178,'&amp;&amp;',15,'Syntax\n------ \nAND, &&\n \nDescription\n----------- \nLogical AND. Evaluates to 1 if all operands are non-zero and\nnot NULL,\nto 0 if one or more operands are 0, otherwise NULL is\nreturned.\n \nFor this operator, short-circuit evaluation can be used.\n \nExamples\n-------- \nSELECT 1 && 1;\n \n+--------+\n| 1 && 1 |\n+--------+\n| 1 |\n+--------+\n \nSELECT 1 && 0;\n \n+--------+\n| 1 && 0 |\n+--------+\n| 0 |\n+--------+\n \nSELECT 1 && NULL;\n \n+-----------+\n| 1 && NULL |\n+-----------+\n| NULL |\n+-----------+\n \nSELECT 0 && NULL;\n \n+-----------+\n| 0 && NULL |\n+-----------+\n| 0 |\n+-----------+\n \nSELECT NULL && 0;\n \n+-----------+\n| NULL && 0 |\n+-----------+\n| 0 |\n+-----------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/and/','','https://mariadb.com/kb/en/and/'),(180,'XOR',15,'Syntax\n------ \nXOR\n \nDescription\n----------- \nXOR stands for eXclusive OR. Returns NULL if either operand\nis NULL. For non-NULL\noperands, evaluates to 1 if an odd number of operands is\nnon-zero,\notherwise 0 is returned.\n \nExamples\n-------- \nSELECT 1 XOR 1;\n \n+---------+\n| 1 XOR 1 |\n+---------+\n| 0 |\n+---------+\n \nSELECT 1 XOR 0;\n \n+---------+\n| 1 XOR 0 |\n+---------+\n| 1 |\n+---------+\n \nSELECT 1 XOR NULL;\n \n+------------+\n| 1 XOR NULL |\n+------------+\n| NULL |\n+------------+\n \nIn the following example, the right 1 XOR 1 is evaluated\nfirst, and returns 0. Then, 1 XOR 0 is evaluated, and 1 is\nreturned.\n \nSELECT 1 XOR 1 XOR 1;\n \n+---------------+\n| 1 XOR 1 XOR 1 |\n+---------------+\n| 1 |\n+---------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/xor/','','https://mariadb.com/kb/en/xor/'),(123,'RENAME USER',10,'Syntax\n------ \nRENAME USER old_user TO new_user\n [, old_user TO new_user] ...\n \nDescription\n----------- \nThe RENAME USER statement renames existing MariaDB accounts.\nTo use it,\nyou must have the global CREATE USER privilege\nor the UPDATE privilege for the mysql database.\nEach account is named using the same format as for the\nCREATE USER\nstatement; for example, \'jeffrey\'@\'localhost\'.\nIf you specify only the user name part of the account name,\na host\nname part of \'%\' is used.\n \nIf any of the old user accounts do not exist or any of the\nnew user accounts already\nexist, ERROR 1396 (HY000) results. If an error occurs,\nRENAME USER\nwill still rename the accounts that do not result in an\nerror.\n \nExamples\n-------- \nCREATE USER \'donald\', \'mickey\';\n \nRENAME USER \'donald\' TO \'duck\'@\'localhost\', \'mickey\'\nTO \'mouse\'@\'localhost\';\n \n\n \n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/rename-user/','','https://mariadb.com/kb/en/rename-user/'),(124,'REVOKE',10,'Privileges\n \nSyntax\n------ \nREVOKE \n priv_type [(column_list)]\n [, priv_type [(column_list)]] ...\n ON [object_type] priv_level\n FROM user [, user] ...\n \nREVOKE ALL PRIVILEGES, GRANT OPTION\n FROM user [, user] ...\n \nDescription\n----------- \nThe REVOKE statement enables system administrators to revoke\nprivileges (or roles - see section below) from MariaDB\naccounts. Each account is named using the same format\nas for the GRANT statement; for example,\n\'jeffrey\'@\'localhost\'. If you specify only the user name\npart\nof the account name, a host name part of \'%\' is used. For\ndetails on the levels at which privileges exist, the\nallowable\npriv_type and priv_level values, and the\nsyntax for specifying users and passwords, see GRANT.\n \nTo use the first REVOKE syntax, you must have the\nGRANT OPTION privilege, and you must have the privileges\nthat\nyou are revoking.\n \nTo revoke all privileges, use the second syntax, which drops\nall\nglobal, database, table, column, and routine privileges for\nthe named\nuser or users:\n \nREVOKE ALL PRIVILEGES, GRANT OPTION FROM user [, user] ...\n \nTo use this REVOKE syntax, you must have the global\nCREATE USER privilege or the\nUPDATE privilege for the mysql database. See\nGRANT.\n \nExamples\n-------- \nREVOKE SUPER ON *.* FROM \'alexander\'@\'localhost\';\n \nRoles\n \nRoles were introduced in MariaDB 10.0.5.\n \nSyntax\n------ \nREVOKE role [, role ...]\n FROM grantee [, grantee2 ... ]\n \nDescription\n----------- \nREVOKE is also used to remove a role from a user or another\nrole that it\'s previously been assigned to. If a role has\npreviously been set as a default role, REVOKE does not\nremove the record of the default role from the mysql.user\ntable. If the role is subsequently granted again, it will\nagain be the user\'s default. Use SET DEFAULT ROLE NONE to\nexplicitly remove this.\n \nBefore MariaDB 10.1.13, the REVOKE role statement was not\npermitted in prepared statements.\n \nExample\n \nREVOKE journalist FROM hulda\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/revoke/','','https://mariadb.com/kb/en/revoke/'),(127,'CREATE ROLE',10,'Roles were introduced in MariaDB 10.0.5.\n \nSyntax\n------ \nCREATE [OR REPLACE] ROLE [IF NOT EXISTS] role \n [WITH ADMIN \n {CURRENT_USER | CURRENT_ROLE | user | role}]\n \nDescription\n----------- \nThe CREATE ROLE statement creates one or more MariaDB roles.\nTo\nuse it, you must have the global CREATE USER\nprivilege or the INSERT privilege for the mysql\ndatabase. For each account, CREATE ROLE creates a new row in\nthe\nmysql.user table that has no privileges, and with the\ncorresponding is_role field set to Y. It also creates a\nrecord in the\nmysql.roles_mapping table.\n \nIf any of the specified roles already exist, ERROR 1396\n(HY000) results. If\nan error occurs, CREATE ROLE will still create the roles\nthat do not result\nin an error. The maximum length for a role is 128\ncharacters. Role names can be\nquoted, as explained in the Identifier names page. Only\none error is produced for all roles which have not been\ncreated:\n \nERROR 1396 (HY000): Operation CREATE ROLE failed for\n\'a\',\'b\',\'c\'\n \nFailed CREATE or DROP operations, for both users and roles,\nproduce the\nsame error code.\n \nPUBLIC and NONE are reserved, and cannot be used as role\nnames.\n \nBefore MariaDB 10.1.13, the CREATE ROLE statement was not\npermitted in prepared statements.\n \nFor valid identifiers to use as role names, see Identifier\nNames.\n \nWITH ADMIN\n \nThe optional WITH ADMIN clause determines whether the\ncurrent user, the\ncurrent role or another user or role has use of the newly\ncreated role. If the\nclause is omitted, WITH ADMIN CURRENT_USER is treated as the\ndefault, which\nmeans that the current user will be able to GRANT this role\nto\nusers.\n \nOR REPLACE\n \nThe OR REPLACE clause was added in MariaDB 10.1.3\n \nIf the optional OR REPLACE clause is used, it acts as a\nshortcut for:\n \nDROP ROLE IF EXISTS name;\n \nCREATE ROLE name ...;\n \nIF NOT EXISTS\n \nThe IF NOT EXISTS clause was added in MariaDB 10.1.3\n \nWhen the IF NOT EXISTS clause is used, MariaDB will return a\nwarning instead of an error if the specified role already\nexists. Cannot be used together with the OR REPLACE clause.\n \nExamples\n-------- \nCREATE ROLE journalist;\n \nCREATE ROLE developer WITH ADMIN lorinda;\n \nThe OR REPLACE and IF NOT EXISTS clauses:\n \nCREATE ROLE journalist;\nERROR 1396 (HY000): Operation CREATE ROLE failed for\n\'journalist\'\n \nCREATE OR REPLACE ROLE journalist;\nQuery OK, 0 rows affected (0.00 sec)\n \nCREATE ROLE IF NOT EXISTS journalist;\nQuery OK, 0 rows affected, 1 warning (0.00 sec)\n \nSHOW WARNINGS;\n+-------+------+---------------------------------------------------+\n| Level | Code | Message |\n+-------+------+---------------------------------------------------+\n| Note | 1975 | Can\'t create role \'journalist\'; it\nalready exists |\n+-------+------+---------------------------------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/create-role/','','https://mariadb.com/kb/en/create-role/'),(182,'Assignment Operator (:=)',15,'Syntax\n------ \nvar_name := expr\n \nDescription\n----------- \nAssignment operator for assigning a value. The value on the\nright is assigned to the variable on left.\n \nUnlike the = operator, := can always be used to assign a\nvalue to a variable.\n \nThis operator works with both user-defined variables and\nlocal variables.\n \nWhen assigning the same value to several variables,\nLAST_VALUE() can be useful.\n \nExamples\n-------- \n SELECT @x := 10;\n \n+----------+\n| @x := 10 |\n+----------+\n| 10 |\n+----------+\n \nSELECT @x, @y := @x;\n \n+------+----------+\n| @x | @y := @x |\n+------+----------+\n| 10 | 10 |\n+------+----------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/assignment-operator/','','https://mariadb.com/kb/en/assignment-operator/'),(189,'GROUP_CONCAT',16,'Syntax\n------ \nGROUP_CONCAT(expr)\n \nDescription\n----------- \nThis function returns a string result with the concatenated\nnon-NULL\nvalues from a group. It returns NULL if there are no\nnon-NULL values.\n \nThe maximum returned length in bytes is determined by the\ngroup_concat_max_len server system variable, which defaults\nto 1M (>= MariaDB 10.2.4) or 1K (\n\nURL: https://mariadb.com/kb/en/group_concat/','','https://mariadb.com/kb/en/group_concat/'),(195,'STDDEV_SAMP',16,'Syntax\n------ \nSTDDEV_SAMP(expr)\n \nDescription\n----------- \nReturns the sample standard deviation of expr (the square\nroot of VAR_SAMP()).\n \nIt is an aggregate function, and so can be used with the\nGROUP BY clause.\n \nFrom MariaDB 10.2.2, STDDEV_SAMP() can be used as a window\nfunction.\n \nSTDDEV_SAMP() returns NULL if there were no matching rows.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/stddev_samp/','','https://mariadb.com/kb/en/stddev_samp/'),(125,'SET PASSWORD',10,'Syntax\n------ \nSET PASSWORD [FOR user] =\n {\n PASSWORD(\'some password\')\n | OLD_PASSWORD(\'some password\')\n | \'encrypted password\'\n }\n \nDescription\n----------- \nThe SET PASSWORD statement assigns a password to an existing\nMariaDB user\naccount.\n \nIf the password is specified using the PASSWORD() or\nOLD_PASSWORD()\nfunction, the literal text of the password should be given.\nIf the\npassword is specified without using either function, the\npassword\nshould be the already-encrypted password value as returned\nby\nPASSWORD().\n \nOLD_PASSWORD() should only be used if your MariaDB/MySQL\nclients are very old (< 4.0.0).\n \nWith no FOR clause, this statement sets the password for the\ncurrent\nuser. Any client that has connected to the server using a\nnon-anonymous\naccount can change the password for that account.\n \nWith a FOR clause, this statement sets the password for a\nspecific\naccount on the current server host. Only clients that have\nthe UPDATE\nprivilege for the mysql database can do this. The user value\nshould be\ngiven in user_name@host_name format, where user_name and\nhost_name are\nexactly as they are listed in the User and Host columns of\nthe\nmysql.user table entry. \n \nThe argument to PASSWORD() and the password given to MariaDB\nclients can be of arbitrary length.\n \nAuthentication Plugin Support\n \nIn MariaDB 10.4 and later, SET PASSWORD (with or without\nPASSWORD()) works for accounts authenticated via any\nauthentication plugin that supports passwords stored in the\nmysql.global_priv table.\n \nThe ed25519, mysql_native_password, and mysql_old_password\nauthentication plugins store passwords in the\nmysql.global_priv table.\n \nIf you run SET PASSWORD on an account that authenticates\nwith one of these authentication plugins that stores\npasswords in the mysql.global_priv table, then the\nPASSWORD() function is evaluated by the specific\nauthentication plugin used by the account. The\nauthentication plugin hashes the password with a method that\nis compatible with that specific authentication plugin.\n \nThe unix_socket, named_pipe, gssapi, and pam authentication\nplugins do not store passwords in the mysql.global_priv\ntable. These authentication plugins rely on other methods to\nauthenticate the user.\n \nIf you attempt to run SET PASSWORD on an account that\nauthenticates with one of these authentication plugins that\ndoesn\'t store a password in the mysql.global_priv table,\nthen MariaDB Server will raise a warning like the following:\n \nSET PASSWORD is ignored for users authenticating via\nunix_socket plugin\n \nSee Authentication from MariaDB 10.4 for an overview of\nauthentication changes in MariaDB 10.4.\n \nMariaDB until 10.3\n \nIn MariaDB 10.3 and before, SET PASSWORD (with or without\nPASSWORD()) only works for accounts authenticated via\nmysql_native_password or mysql_old_password authentication\nplugins\n \nPasswordless User Accounts\n \nUser accounts do not always require passwords to login.\n \nThe unix_socket , named_pipe and gssapi authentication\nplugins do not require a password to authenticate the user.\n \nThe pam authentication plugin may or may not require a\npassword to authenticate the user, depending on the specific\nconfiguration.\n \nThe mysql_native_password and mysql_old_password\nauthentication plugins require passwords for authentication,\nbut the password can be blank. In that case, no password is\nrequired.\n \nIf you provide a password while attempting to log into the\nserver as an account that doesn\'t require a password, then\nMariaDB server will simply ignore the password.\n \nIn MariaDB 10.4 and later, a user account can be defined to\nuse multiple authentication plugins in a specific order of\npreference. This specific scenario may be more noticeable in\nthese versions, since an account could be associated with\nsome authentication plugins that require a password, and\nsome that do not.\n \nExample\n \nFor example, if you had an entry with User and\nHost column values of \'bob\' and \n\'%.loc.gov\', you would write the\nstatement like this:\n \nSET PASSWORD FOR \'bob\'@\'%.loc.gov\' =\nPASSWORD(\'newpass\');\n \n\n\nURL: https://mariadb.com/kb/en/set-password/','','https://mariadb.com/kb/en/set-password/'),(128,'DROP ROLE',10,'Roles were introduced in MariaDB 10.0.5.\n \nSyntax\n------ \nDROP ROLE [IF EXISTS] role_name [,role_name ...]\n \nDescription\n----------- \nThe DROP ROLE statement removes one or more MariaDB roles.\nTo use this\nstatement, you must have the global CREATE USER privilege or\nthe DELETE privilege for the mysql database.\n \nDROP ROLE does not disable roles for connections which\nselected them with SET ROLE. If a role has previously been\nset as a default role, DROP ROLE does not remove the record\nof the default role from the mysql.user table. If the role\nis subsequently recreated and granted, it will again be the\nuser\'s default. Use SET DEFAULT ROLE NONE to explicitly\nremove this.\n \nIf any of the specified user accounts do not exist, ERROR\n1396 (HY000)\nresults. If an error occurs, DROP ROLE will still drop the\nroles that\ndo not result in an error. Only one error is produced for\nall roles which have not been dropped:\n \nERROR 1396 (HY000): Operation DROP ROLE failed for\n\'a\',\'b\',\'c\'\n \nFailed CREATE or DROP operations, for both users and roles,\nproduce the same error code.\n \nBefore MariaDB 10.1.13, the DROP ROLE statement was not\npermitted in prepared statements.\n \nIF EXISTS\n \nThe IF EXISTS clause was added in MariaDB 10.1.3\n \nIf the IF EXISTS clause is used, MariaDB will return a\nwarning instead of an error if the role does not exist.\n \nExamples\n-------- \nDROP ROLE journalist;\n \nThe same thing using the optional IF EXISTS clause:\n \nDROP ROLE journalist;\n \nERROR 1396 (HY000): Operation DROP ROLE failed for\n\'journalist\'\n \nDROP ROLE IF EXISTS journalist;\n \nQuery OK, 0 rows affected, 1 warning (0.00 sec)\n \nNote (Code 1975): Can\'t drop role \'journalist\'; it\ndoesn\'t exist\n \n\n\nURL: https://mariadb.com/kb/en/drop-role/','','https://mariadb.com/kb/en/drop-role/'),(200,'BENCHMARK',17,'Syntax\n------ \nBENCHMARK(count,expr)\n \nDescription\n----------- \nThe BENCHMARK() function executes the expression expr\nrepeatedly count\ntimes. It may be used to time how quickly MariaDB processes\nthe\nexpression. The result value is always 0. The intended use\nis from\nwithin the mysql client, which reports query execution\ntimes.\n \nExamples\n-------- \nSELECT BENCHMARK(1000000,ENCODE(\'hello\',\'goodbye\'));\n+----------------------------------------------+\n| BENCHMARK(1000000,ENCODE(\'hello\',\'goodbye\')) |\n+----------------------------------------------+\n| 0 |\n+----------------------------------------------+\n1 row in set (0.21 sec)\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/benchmark/','','https://mariadb.com/kb/en/benchmark/'),(201,'BINLOG_GTID_POS',17,'From version 10.0.2, MariaDB supports global transaction IDs\nfor replication.\n \nSyntax\n------ \nBINLOG_GTID_POS(binlog_filename,binlog_offset)\n \nDescription\n----------- \nThe BINLOG_GTID_POS() function takes as input an old-style\nbinary log position in the form of a file name and a file\noffset. It looks up the position in the current binlog, and\nreturns a string representation of the corresponding GTID\nposition. If the position is not found in the current\nbinlog, NULL is returned.\n \nExamples\n-------- \nSELECT BINLOG_GTID_POS(\"master-bin.000001\", 600);\n \n\n\nURL: https://mariadb.com/kb/en/binlog_gtid_pos/','','https://mariadb.com/kb/en/binlog_gtid_pos/'),(204,'COLLATION',17,'Syntax\n------ \nCOLLATION(str)\n \nDescription\n----------- \nReturns the collation of the string argument. If str is not\na string, it is considered as a binary string (so the\nfunction returns \'binary\'). This applies to NULL, too. The\nreturn value is a string in the utf8 character set.\n \nSee Character Sets and Collations.\n \nExamples\n-------- \nSELECT COLLATION(\'abc\');\n+-------------------+\n| COLLATION(\'abc\') |\n+-------------------+\n| latin1_swedish_ci |\n+-------------------+\n \nSELECT COLLATION(_utf8\'abc\');\n+-----------------------+\n| COLLATION(_utf8\'abc\') |\n+-----------------------+\n| utf8_general_ci |\n+-----------------------+\n \n\n\nURL: https://mariadb.com/kb/en/collation/','','https://mariadb.com/kb/en/collation/'),(126,'Roles Overview',10,'Roles were introduced in MariaDB 10.0.5.\n \nDescription\n----------- \nA role bundles a number of privileges together. It assists\nlarger organizations where, typically, a number of users\nwould have the same privileges, and, previously, the only\nway to change the privileges for a group of users was by\nchanging each user\'s privileges individually. \n \nAlternatively, multiple external users could have been\nassigned the same user, and there would have been no way to\nsee which actual user was responsible for which action.\n \nWith roles, managing this is easy. For example, there could\nbe a number of users assigned to a journalist role, with\nidentical privileges. Changing the privileges for all the\njournalists is a matter of simply changing the role\'s\nprivileges, while the individual user is still linked with\nany changes that take place.\n \nRoles are created with the CREATE ROLE statement, and\ndropped with the DROP ROLE statement. Roles are then\nassigned to a user with an extension to the GRANT statement,\nwhile privileges are assigned to a role in the regular way\nwith GRANT. Similarly, the REVOKE statement can be used to\nboth revoke a role from a user, or revoke a privilege from a\nrole.\n \nOnce a user has connected, he can obtain all privileges\nassociated with a role by setting a role with the SET ROLE\nstatement. The CURRENT_ROLE function returns the currently\nset role for the session, if any.\n \nOnly roles granted directly to a user can be set, roles\ngranted to other roles cannot. Instead the privileges\ngranted to a role, which is, in turn, granted to another\nrole (grantee), will be immediately available to any user\nwho sets this second grantee role.\n \nRoles were implemented as a GSoC 2013 project by Vicentiu\nCiorbaru. \n \nThe SET DEFAULT ROLE statement allows one to set a default\nrole for a user. A default role is automatically enabled\nwhen a user connects (an implicit SET ROLE statement is\nexecuted immediately after a connection is established).\n \nSystem Tables\n \nInformation about roles and who they\'ve been granted to can\nbe found in the Information Schema APPLICABLE_ROLES table as\nwell as the mysql.ROLES_MAPPING table.\n \nThe Information Schema ENABLED_ROLES table shows the enabled\nroles for the current session.\n \nExamples\n-------- \nCreating a role and granting a privilege:\n \nCREATE ROLE journalist;\n \nGRANT SHOW DATABASES ON *.* TO journalist;\n \nGRANT journalist to hulda;\n \nNote, that hulda has no SHOW DATABASES privilege, even\nthough she was granted the journalist role. She needs to set\nthe role first:\n \nSHOW DATABASES;\n \n+--------------------+\n| Database |\n+--------------------+\n| information_schema |\n+--------------------+\n \nSELECT CURRENT_ROLE;\n \n+--------------+\n| CURRENT_ROLE |\n+--------------+\n| NULL |\n+--------------+\n \nSET ROLE journalist;\n \nSELECT CURRENT_ROLE;\n \n+--------------+\n| CURRENT_ROLE |\n+--------------+\n| journalist |\n+--------------+\n \nSHOW DATABASES;\n \n+--------------------+\n| Database |\n+--------------------+\n| ... |\n| information_schema |\n| mysql |\n| performance_schema |\n| test |\n| ... |\n+--------------------+\n \nSET ROLE NONE;\n \nRoles can be granted to roles:\n \nCREATE ROLE writer;\n \nGRANT SELECT ON data.* TO writer;\n \nGRANT writer TO journalist;\n \nBut one does not need to set a role granted to a role. For\nexample, hulda will automatically get all writer privileges\nwhen she sets the journalist role:\n \nSELECT CURRENT_ROLE;\n \n+--------------+\n| CURRENT_ROLE |\n+--------------+\n| NULL |\n+--------------+\n \nSHOW TABLES FROM data;\n \nEmpty set (0.01 sec)\n \nSET ROLE journalist;\n \nSELECT CURRENT_ROLE;\n \n+--------------+\n| CURRENT_ROLE |\n+--------------+\n| journalist |\n+--------------+\n \nSHOW TABLES FROM data;\n \n+------------------------------+\n| Tables_in_data |\n+------------------------------+\n| set1 |\n| ... |\n+------------------------------+\n \nRoles and Views (and Stored Routines)\n \nWhen a user sets a role, he, in a sense, has two identities\nwith two associated sets of privileges.\nBut a view (or a stored routine) can have only one definer.\nSo, when a view (or a stored routine) is created with the\nSQL SECURITY DEFINER, one can specify whether the definer\nshould be CURRENT_USER (and the view will have none of the\nprivileges of the user\'s role) or CURRENT_ROLE (in this\ncase, the view will use role\'s privileges, but none of the\nuser\'s privileges). As a result, sometimes one can create a\nview that is impossible to use.\n \nCREATE ROLE r1;\n \nGRANT ALL ON db1.* TO r1;\n \nGRANT r1 TO foo@localhost;\n \nGRANT ALL ON db.* TO foo@localhost;\n \nSELECT CURRENT_USER\n+---------------+\n| current_user |\n+---------------+\n| foo@localhost |\n+---------------+\n \nSET ROLE r1;\n \nCREATE TABLE db1.t1 (i int);\n \nCREATE VIEW db.v1 AS SELECT * FROM db1.t1;\n \nSHOW CREATE VIEW db.v1;\n \n+------+------------------------------------------------------------------------------------------------------------------------------------------+----------------------+----------------------+\n| View | Create View | character_set_client |\ncollation_connection |\n+------+------------------------------------------------------------------------------------------------------------------------------------------+----------------------+----------------------+\n| v1 | CREATE ALGORITHM=UNDEFINED DEFINER=`foo`@`localhost`\nSQL SECURITY DEFINER VIEW `db`.`v1` AS SELECT `db1`.`t1`.`i`\nAS `i` from `db1`.`t1` | utf8 | utf8_general_ci |\n+------+------------------------------------------------------------------------------------------------------------------------------------------+----------------------+----------------------+\n \nCREATE DEFINER=CURRENT_ROLE VIEW db.v2 AS SELECT * FROM\ndb1.t1;\n \nSHOW CREATE VIEW db.b2;\n \n+------+-----------------------------------------------------------------------------------------------------------------------------+----------------------+----------------------+\n| View | Create View | character_set_client |\ncollation_connection |\n+------+-----------------------------------------------------------------------------------------------------------------------------+----------------------+----------------------+\n| v2 | CREATE ALGORITHM=UNDEFINED DEFINER=`r1` SQL SECURITY\nDEFINER VIEW `db`.`v2` AS select `db1`.`t1`.`a` AS `a` from\n`db1`.`t1` | utf8 | utf8_general_ci |\n+------+-----------------------------------------------------------------------------------------------------------------------------+----------------------+----------------------+\n \nOther Resources\n \nRoles Review by Peter Gulutzan\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/roles_overview/','','https://mariadb.com/kb/en/roles_overview/'),(205,'CONNECTION_ID',17,'Syntax\n------ \nCONNECTION_ID()\n \nDescription\n----------- \nReturns the connection ID (thread ID) for the connection.\nEvery\nthread (including events) has an ID that is unique among the\nset of currently\nconnected clients.\n \nUntil MariaDB 10.3.1, returns MYSQL_TYPE_LONGLONG, or\nbigint(10), in all cases. From MariaDB 10.3.1, returns\nMYSQL_TYPE_LONG, or int(10), when the result would fit\nwithin 32-bits.\n \nExamples\n-------- \nSELECT CONNECTION_ID();\n+-----------------+\n| CONNECTION_ID() |\n+-----------------+\n| 3 |\n+-----------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/connection_id/','','https://mariadb.com/kb/en/connection_id/'),(216,'SCHEMA',17,'Syntax\n------ \nSCHEMA()\n \nDescription\n----------- \nThis function is a synonym for DATABASE().\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/schema/','','https://mariadb.com/kb/en/schema/'),(129,'SET ROLE',10,'Roles were introduced in MariaDB 10.0.5.\n \nSyntax\n------ \nSET ROLE { role | NONE }\n \nDescription\n----------- \nThe SET ROLE statement enables a role, along with all of its\nassociated permissions, for the current session. To unset a\nrole, use NONE .\n \nIf a role that doesn\'t exist, or to which the user has not\nbeen assigned, is specified, an ERROR 1959 (OP000): Invalid\nrole specification error occurs.\n \nFrom MariaDB 10.1.1, an automatic SET ROLE is implicitly\nperformed when a user connects if that user has been\nassigned a default role. See SET DEFAULT ROLE.\n \nExample\n \nSELECT CURRENT_ROLE;\n \n+--------------+\n| CURRENT_ROLE |\n+--------------+\n| NULL |\n+--------------+\n \nSET ROLE staff;\n \nSELECT CURRENT_ROLE;\n \n+--------------+\n| CURRENT_ROLE |\n+--------------+\n| staff |\n+--------------+\n \nSET ROLE NONE;\n \nQuery OK, 0 rows affected (0.00 sec)\n \nSELECT CURRENT_ROLE();\n+----------------+\n| CURRENT_ROLE() |\n+----------------+\n| NULL |\n+----------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/set-role/','','https://mariadb.com/kb/en/set-role/'),(130,'SET DEFAULT ROLE',10,'Default roles were implemented in MariaDB 10.1.1.\n \nSyntax\n------ \nSET DEFAULT ROLE { role | NONE } [ FOR user@host ]\n \nDescription\n----------- \nThe SET DEFAULT ROLE statement sets a default role for a\nspecified (or current) user. A default role is automatically\nenabled when a user connects (an implicit SET ROLE statement\nis executed immediately after a connection is established).\n \nTo be able to set a role as a default, one needs the\nprivileges to enable this role (if you cannot do SET ROLE X,\nyou won\'t be able to do SET DEFAULT ROLE X). To set a\ndefault role for another user one needs to have write access\nto the mysql database.\n \nTo remove a user\'s default role, use SET DEFAULT ROLE NONE\n[ FOR user@host ]. The record of the default role is not\nremoved if the role is dropped or revoked, so if the role is\nsubsequently re-created or granted, it will again be the\nuser\'s default role.\n \nThe default role is stored in a new column in the mysql.user\ntable, and currently viewing this table is the only way to\nsee which role has been assigned to a user as the default. \n \nExamples\n-------- \nSetting a default role for the current user:\n \nSET DEFAULT ROLE journalist;\n \nRemoving a default role from the current user:\n \nSET DEFAULT ROLE NONE;\n \n\n \n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/set-default-role/','','https://mariadb.com/kb/en/set-default-role/'),(136,'AES_ENCRYPT',12,'Syntax\n------ \nAES_ENCRYPT(str,key_str)\n \nDescription\n----------- \nAES_ENCRYPT() and AES_DECRYPT() allow encryption and\ndecryption of\ndata using the official AES (Advanced Encryption Standard)\nalgorithm,\npreviously known as \"Rijndael.\" Encoding with a 128-bit\nkey length is\nused, but you can extend it up to 256 bits by modifying the\nsource. We\nchose 128 bits because it is much faster and it is secure\nenough for\nmost purposes.\n \nAES_ENCRYPT() encrypts a string str using the key key_str,\nand returns a binary string.\n \nAES_DECRYPT() decrypts the encrypted string and returns the\noriginal\nstring.\n \nThe input arguments may be any length. If either argument is\nNULL, the result of this function is also NULL.\n \nBecause AES is a block-level algorithm, padding is used to\nencode\nuneven length strings and so the result string length may be\ncalculated using this formula:\n \n16 x (trunc(string_length / 16) + 1)\n \nIf AES_DECRYPT() detects invalid data or incorrect padding,\nit returns\nNULL. However, it is possible for AES_DECRYPT() to return a\nnon-NULL\nvalue (possibly garbage) if the input data or the key is\ninvalid.\n \nExamples\n-------- \nINSERT INTO t VALUES\n(AES_ENCRYPT(\'text\',SHA2(\'password\',512)));\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/aes_encrypt/','','https://mariadb.com/kb/en/aes_encrypt/'),(137,'COMPRESS',12,'Syntax\n------ \nCOMPRESS(string_to_compress)\n \nDescription\n----------- \nCompresses a string and returns the result as a binary\nstring. This\nfunction requires MariaDB to have been compiled with a\ncompression\nlibrary such as zlib. Otherwise, the return value is always\nNULL. The\ncompressed string can be uncompressed with UNCOMPRESS().\n \nThe have_compress server system variable indicates whether a\ncompression library is present. \n \nExamples\n-------- \nSELECT LENGTH(COMPRESS(REPEAT(\'a\',1000)));\n+------------------------------------+\n| LENGTH(COMPRESS(REPEAT(\'a\',1000))) |\n+------------------------------------+\n| 21 |\n+------------------------------------+\n \nSELECT LENGTH(COMPRESS(\'\'));\n+----------------------+\n| LENGTH(COMPRESS(\'\')) |\n+----------------------+\n| 0 |\n+----------------------+\n \nSELECT LENGTH(COMPRESS(\'a\'));\n+-----------------------+\n| LENGTH(COMPRESS(\'a\')) |\n+-----------------------+\n| 13 |\n+-----------------------+\n \nSELECT LENGTH(COMPRESS(REPEAT(\'a\',16)));\n+----------------------------------+\n| LENGTH(COMPRESS(REPEAT(\'a\',16))) |\n+----------------------------------+\n| 15 |\n+----------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/compress/','','https://mariadb.com/kb/en/compress/'),(217,'SESSION_USER',17,'Syntax\n------ \nSESSION_USER()\n \nDescription\n----------- \nSESSION_USER() is a synonym for USER().\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/session_user/','','https://mariadb.com/kb/en/session_user/'),(218,'SYSTEM_USER',17,'Syntax\n------ \nSYSTEM_USER()\n \nDescription\n----------- \nSYSTEM_USER() is a synonym for USER().\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/system_user/','','https://mariadb.com/kb/en/system_user/'),(222,'&lt;',18,'Syntax\n------ \n\n\nURL: https://mariadb.com/kb/en/less-than/','','https://mariadb.com/kb/en/less-than/'),(223,'&lt;=',18,'Syntax\n------ \n\n\nURL: https://mariadb.com/kb/en/less-than-or-equal/','','https://mariadb.com/kb/en/less-than-or-equal/'),(228,'BETWEEN AND',18,'Syntax\n------ \nexpr BETWEEN min AND max\n \nDescription\n----------- \nIf expr is greater than or equal to min and expr is less\nthan or equal\nto max, BETWEEN returns 1, otherwise it returns 0. This is\nequivalent\nto the expression (min \n\nURL: https://mariadb.com/kb/en/between-and/','','https://mariadb.com/kb/en/between-and/'),(230,'GREATEST',18,'Syntax\n------ \nGREATEST(value1,value2,...)\n \nDescription\n----------- \nWith two or more arguments, returns the largest\n(maximum-valued)\nargument. The arguments are compared using the same rules as\nfor\nLEAST().\n \nExamples\n-------- \nSELECT GREATEST(2,0);\n+---------------+\n| GREATEST(2,0) |\n+---------------+\n| 2 |\n+---------------+\n \nSELECT GREATEST(34.0,3.0,5.0,767.0);\n+------------------------------+\n| GREATEST(34.0,3.0,5.0,767.0) |\n+------------------------------+\n| 767.0 |\n+------------------------------+\n \nSELECT GREATEST(\'B\',\'A\',\'C\');\n+-----------------------+\n| GREATEST(\'B\',\'A\',\'C\') |\n+-----------------------+\n| C |\n+-----------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/greatest/','','https://mariadb.com/kb/en/greatest/'),(232,'INTERVAL',18,'Syntax\n------ \nINTERVAL(N,N1,N2,N3,...)\n \nDescription\n----------- \nReturns the index of the last argument that is less than the\nfirst argument or is NULL. \n \nReturns 0 if N < N1, 1 if N < N2, 2 if N < N3 and so on or\n-1 if N is NULL. All\narguments are treated as integers. It is required that N1 <\nN2 < N3 \n\nURL: https://mariadb.com/kb/en/interval/','','https://mariadb.com/kb/en/interval/'),(235,'IS NOT NULL',18,'Syntax\n------ \nIS NOT NULL\n \nDescription\n----------- \nTests whether a value is not NULL. See also NULL Values in\nMariaDB.\n \nExamples\n-------- \nSELECT 1 IS NOT NULL, 0 IS NOT NULL, NULL IS NOT NULL;\n+---------------+---------------+------------------+\n| 1 IS NOT NULL | 0 IS NOT NULL | NULL IS NOT NULL |\n+---------------+---------------+------------------+\n| 1 | 1 | 0 |\n+---------------+---------------+------------------+\n \n\n\nURL: https://mariadb.com/kb/en/is-not-null/','','https://mariadb.com/kb/en/is-not-null/'),(139,'DES_DECRYPT',12,'Syntax\n------ \nDES_DECRYPT(crypt_str[,key_str])\n \nDescription\n----------- \nDecrypts a string encrypted with DES_ENCRYPT(). If an error\noccurs,\nthis function returns NULL.\n \nThis function works only if MariaDB has been configured with\nTLS\nsupport.\n \nIf no key_str argument is given, DES_DECRYPT() examines the\nfirst byte\nof the encrypted string to determine the DES key number that\nwas used\nto encrypt the original string, and then reads the key from\nthe DES\nkey file to decrypt the message. For this to work, the user\nmust have\nthe SUPER privilege. The key file can be specified with the\n--des-key-file server option.\n \nIf you pass this function a key_str argument, that string is\nused as\nthe key for decrypting the message.\n \nIf the crypt_str argument does not appear to be an encrypted\nstring,\nMariaDB returns the given crypt_str.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/des_decrypt/','','https://mariadb.com/kb/en/des_decrypt/'),(140,'DES_ENCRYPT',12,'Syntax\n------ \nDES_ENCRYPT(str[,{key_num|key_str}])\n \nDescription\n----------- \nEncrypts the string with the given key using the Triple-DES\nalgorithm.\n \nThis function works only if MariaDB has been configured with\nTLS support.\n \nThe encryption key to use is chosen based on the second\nargument to\nDES_ENCRYPT(), if one was given. With no argument, the first\nkey from\nthe DES key file is used. With a key_num argument, the given\nkey \nnumber (0-9) from the DES key file is used. With a key_str\nargument,\nthe given key string is used to encrypt str. \n \nThe key file can be specified with the --des-key-file server\noption.\n \nThe return string is a binary string where the first\ncharacter is \nCHAR(128 | key_num). If an error occurs, DES_ENCRYPT()\nreturns NULL.\n \nThe 128 is added to make it easier to recognize an encrypted\nkey. If\nyou use a string key, key_num is 127.\n \nThe string length for the result is given by this formula:\n \nnew_len = orig_len + (8 - (orig_len % 8)) + 1\n \nEach line in the DES key file has the following format:\n \nkey_num des_key_str\n \nEach key_num value must be a number in the range from 0 to\n9. Lines in\nthe file may be in any order. des_key_str is the string that\nis used\nto encrypt the message. There should be at least one space\nbetween the\nnumber and the key. The first key is the default key that is\nused if\nyou do not specify any key argument to DES_ENCRYPT().\n \nYou can tell MariaDB to read new key values from the key\nfile with the\nFLUSH DES_KEY_FILE statement. This requires the RELOAD\nprivilege.\n \nOne benefit of having a set of default keys is that it gives\napplications a way to check for the existence of encrypted\ncolumn\nvalues, without giving the end user the right to decrypt\nthose values.\n \nExamples\n-------- \nSELECT customer_address FROM customer_table \n WHERE crypted_credit_card =\nDES_ENCRYPT(\'credit_card_number\');\n \n\n\nURL: https://mariadb.com/kb/en/des_encrypt/','','https://mariadb.com/kb/en/des_encrypt/'),(141,'ENCODE',12,'Syntax\n------ \nENCODE(str,pass_str)\n \nDescription\n----------- \nENCODE is not considered cryptographically secure, and\nshould not be used for password encryption.\n \nEncrypt str using pass_str as the password. To decrypt the\nresult, use\nDECODE().\n \nThe result is a binary string of the same length as str.\n \nThe strength of the encryption is based on how good the\nrandom generator is. \n \nIt is not recommended to rely on the encryption performed by\nthe ENCODE function. Using a salt value (changed when a\npassword is updated) will improve matters somewhat, but for\nstoring passwords, consider a more cryptographically secure\nfunction, such as SHA2().\n \nExamples\n-------- \nENCODE(\'not so secret text\',\nCONCAT(\'random_salt\',\'password\'))\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/encode/','','https://mariadb.com/kb/en/encode/'),(142,'ENCRYPT',12,'Syntax\n------ \nENCRYPT(str[,salt])\n \nDescription\n----------- \nEncrypts a string using the Unix crypt() system call,\nreturning an encrypted binary string. The salt argument\nshould be a string with at least two characters or the\nreturned result will be NULL. If no salt argument is given,\na random value of sufficient length is used.\n \nIt is not recommended to use ENCRYPT() with utf16, utf32 or\nucs2 multi-byte character sets because the crypt() system\ncall expects a string terminated with a zero byte.\n \nNote that the underlying crypt() system call may have some\nlimitations, such as ignoring all but the first eight\ncharacters.\n \nIf the have_crypt system variable is set to NO (because the\ncrypt() system call is not available), the ENCRYPT function\nwill always return NULL.\n \nExamples\n-------- \nSELECT ENCRYPT(\'encrypt me\');\n+-----------------------+\n| ENCRYPT(\'encrypt me\') |\n+-----------------------+\n| 4I5BsEx0lqTDk |\n+-----------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/encrypt/','','https://mariadb.com/kb/en/encrypt/'),(144,'OLD_PASSWORD',12,'Syntax\n------ \nOLD_PASSWORD(str)\n \nDescription\n----------- \nOLD_PASSWORD() was added to MySQL when the implementation of\n\nPASSWORD() was changed to improve security. OLD_PASSWORD()\nreturns the\nvalue of the old (pre-MySQL 4.1) implementation of\nPASSWORD() as a\nstring, and is intended to permit you to reset passwords for\nany\npre-4.1 clients that need to connect to a more recent MySQL\nserver version, or any version of MariaDB,\nwithout locking them out.\n \nAs of MariaDB 5.5, the return value is a nonbinary string in\nthe connection character set and collation, determined by\nthe values of the character_set_connection and\ncollation_connection system variables. Before 5.5, the\nreturn value was a binary string.\n \nThe return value is 16 bytes in length, or NULL if the\nargument was NULL.\n \n\n\nURL: https://mariadb.com/kb/en/old_password/','','https://mariadb.com/kb/en/old_password/'),(237,'ISNULL',18,'Syntax\n------ \nISNULL(expr)\n \nDescription\n----------- \nIf expr is NULL, ISNULL() returns 1, otherwise it returns 0.\n \nSee also NULL Values in MariaDB.\n \nExamples\n-------- \nSELECT ISNULL(1+1);\n+-------------+\n| ISNULL(1+1) |\n+-------------+\n| 0 |\n+-------------+\n \nSELECT ISNULL(1/0);\n+-------------+\n| ISNULL(1/0) |\n+-------------+\n| 1 |\n+-------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/isnull/','','https://mariadb.com/kb/en/isnull/'),(241,'Operator Precedence',19,'The precedence is the order in which the SQL operators are\nevaluated.\n \nThe following list shows the SQL operator precedence.\nOperators that appear first in the list have a higher\nprecedence. Operators which are listed together have the\nsame precedence.\nINTERVAL\nBINARY, COLLATE\n!\n- (unary minus), [[bitwise-not|]] (unary bit inversion)\n|| (string concatenation)\n^\n*, /, DIV, %, MOD\n-, +\n \n&\n|\n= (comparison), , >=, >, \n\nURL: https://mariadb.com/kb/en/operator-precedence/','','https://mariadb.com/kb/en/operator-precedence/'),(242,'&amp;',19,'Syntax\n------ \n&\n \nDescription\n----------- \nBitwise AND. Converts the values to binary and compares\nbits. Only if both the corresponding bits are 1 is the\nresulting bit also 1.\n \nSee also bitwise OR.\n \nExamples\n-------- \nSELECT 2&1;\n+-----+\n| 2&1 |\n+-----+\n| 0 |\n+-----+\n \nSELECT 3&1;\n+-----+\n| 3&1 |\n+-----+\n| 1 |\n+-----+\n \nSELECT 29 & 15;\n+---------+\n| 29 & 15 |\n+---------+\n| 13 |\n+---------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/bitwise_and/','','https://mariadb.com/kb/en/bitwise_and/'),(243,'&lt;&lt;',19,'Syntax\n------ \nvalue1 \n\nURL: https://mariadb.com/kb/en/shift-left/','','https://mariadb.com/kb/en/shift-left/'),(146,'SHA1',12,'Syntax\n------ \nSHA1(str), SHA(str)\n \nDescription\n----------- \nCalculates an SHA-1 160-bit checksum for the string str, as\ndescribed in\nRFC 3174 (Secure Hash Algorithm).\n \nThe value is returned as a string of 40 hex digits, or NULL\nif the argument was NULL. As of MariaDB 5.5, the return\nvalue is a nonbinary string in the connection character set\nand collation, determined by the values of the\ncharacter_set_connection and collation_connection system\nvariables. Before 5.5, the return value was a binary string.\n \nExamples\n-------- \nSELECT SHA1(\'some boring text\');\n+------------------------------------------+\n| SHA1(\'some boring text\') |\n+------------------------------------------+\n| af969fc2085b1bb6d31e517d5c456def5cdd7093 |\n+------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/sha1/','','https://mariadb.com/kb/en/sha1/'),(147,'SHA2',12,'SHA2() was introduced in MariaDB 5.5\n \nSyntax\n------ \nSHA2(str,hash_len)\n \nDescription\n----------- \nGiven a string str, calculates an SHA-2 checksum, which is\nconsidered more cryptographically secure than its SHA-1\nequivalent. The SHA-2 family includes SHA-224, SHA-256,\nSHA-384, and SHA-512, and the hash_len must correspond to\none of these, i.e. 224, 256, 384 or 512. 0 is equivalent to\n256.\n \nThe return value is a nonbinary string in the connection\ncharacter set and collation, determined by the values of the\ncharacter_set_connection and collation_connection system\nvariables. \n \nNULL is returned if the hash length is not valid, or the\nstring str is NULL.\n \nSHA2 will only work if MariaDB was has been configured with\nTLS support. \n \nExamples\n-------- \nSELECT SHA2(\'Maria\',224);\n+----------------------------------------------------------+\n| SHA2(\'Maria\',224) |\n+----------------------------------------------------------+\n| 6cc67add32286412efcab9d0e1675a43a5c2ef3cec8879f81516ff83 |\n+----------------------------------------------------------+\n \nSELECT SHA2(\'Maria\',256);\n+------------------------------------------------------------------+\n| SHA2(\'Maria\',256) |\n+------------------------------------------------------------------+\n|\n9ff18ebe7449349f358e3af0b57cf7a032c1c6b2272cb2656ff85eb112232f16\n|\n+------------------------------------------------------------------+\n \nSELECT SHA2(\'Maria\',0);\n+------------------------------------------------------------------+\n| SHA2(\'Maria\',0) |\n+------------------------------------------------------------------+\n|\n9ff18ebe7449349f358e3af0b57cf7a032c1c6b2272cb2656ff85eb112232f16\n|\n+------------------------------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/sha2/','','https://mariadb.com/kb/en/sha2/'),(148,'UNCOMPRESS',12,'Syntax\n------ \nUNCOMPRESS(string_to_uncompress)\n \nDescription\n----------- \nUncompresses a string compressed by the COMPRESS() function.\nIf the\nargument is not a compressed value, the result is NULL. This\nfunction\nrequires MariaDB to have been compiled with a compression\nlibrary such\nas zlib. Otherwise, the return value is always NULL. The\nhave_compress server system variable indicates whether a\ncompression library is present. \n \nExamples\n-------- \nSELECT UNCOMPRESS(COMPRESS(\'a string\'));\n+----------------------------------+\n| UNCOMPRESS(COMPRESS(\'a string\')) |\n+----------------------------------+\n| a string |\n+----------------------------------+\n \nSELECT UNCOMPRESS(\'a string\');\n+------------------------+\n| UNCOMPRESS(\'a string\') |\n+------------------------+\n| NULL |\n+------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/uncompress/','','https://mariadb.com/kb/en/uncompress/'),(149,'UNCOMPRESSED_LENGTH',12,'Syntax\n------ \nUNCOMPRESSED_LENGTH(compressed_string)\n \nDescription\n----------- \nReturns the length that the compressed string had before\nbeing\ncompressed with COMPRESS().\n \nUNCOMPRESSED_LENGTH() returns NULL or an incorrect result if\nthe string is not compressed.\n \nUntil MariaDB 10.3.1, returns MYSQL_TYPE_LONGLONG, or\nbigint(10), in all cases. From MariaDB 10.3.1, returns\nMYSQL_TYPE_LONG, or int(10), when the result would fit\nwithin 32-bits.\n \nExamples\n-------- \nSELECT UNCOMPRESSED_LENGTH(COMPRESS(REPEAT(\'a\',30)));\n+-----------------------------------------------+\n| UNCOMPRESSED_LENGTH(COMPRESS(REPEAT(\'a\',30))) |\n+-----------------------------------------------+\n| 30 |\n+-----------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/uncompressed_length/','','https://mariadb.com/kb/en/uncompressed_length/'),(159,'INET6_ATON',14,'INET6_ATON() has been available since MariaDB 10.0.12.\n \nSyntax\n------ \nINET6_ATON(expr)\n \nDescription\n----------- \nGiven an IPv6 or IPv4 network address as a string, returns a\nbinary string that represents the numeric value of the\naddress.\n \nNo trailing zone ID\'s or traling network masks are\npermitted. For IPv4 addresses, or IPv6 addresses with IPv4\naddress parts, no classful addresses or trailing port\nnumbers are permitted and octal numbers are not supported.\n \nThe returned binary string will be VARBINARY(16) or\nVARBINARY(4) for IPv6 and IPv4 addresses respectively.\n \nReturns NULL if the argument is not understood.\n \nExamples\n-------- \nSELECT HEX(INET6_ATON(\'10.0.1.1\'));\n+-----------------------------+\n| HEX(INET6_ATON(\'10.0.1.1\')) |\n+-----------------------------+\n| 0A000101 |\n+-----------------------------+\n \nSELECT HEX(INET6_ATON(\'48f3::d432:1431:ba23:846f\'));\n+----------------------------------------------+\n| HEX(INET6_ATON(\'48f3::d432:1431:ba23:846f\')) |\n+----------------------------------------------+\n| 48F3000000000000D4321431BA23846F |\n+----------------------------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/inet6_aton/','','https://mariadb.com/kb/en/inet6_aton/'),(244,'&gt;&gt;',19,'Syntax\n------ \nvalue1 >> value2\n \nDescription\n----------- \nConverts a longlong (BIGINT) number (value1) to binary and\nshifts value2 units to the right.\n \nExamples\n-------- \nSELECT 4 >> 2;\n+--------+\n| 4 >> 2 |\n+--------+\n| 1 |\n+--------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/shift-right/','','https://mariadb.com/kb/en/shift-right/'),(245,'BIT_COUNT',19,'Syntax\n------ \nBIT_COUNT(N)\n \nDescription\n----------- \nReturns the number of bits that are set in the argument N.\n \nExamples\n-------- \nSELECT BIT_COUNT(29), BIT_COUNT(b\'101010\');\n+---------------+----------------------+\n| BIT_COUNT(29) | BIT_COUNT(b\'101010\') |\n+---------------+----------------------+\n| 4 | 3 |\n+---------------+----------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/bit_count/','','https://mariadb.com/kb/en/bit_count/'),(246,'^',19,'Syntax\n------ \n^\n \nDescription\n----------- \nBitwise XOR. Converts the values to binary and compares\nbits. If one (and only one) of the corresponding bits is 1\nis the resulting bit also 1.\n \nExamples\n-------- \nSELECT 1 ^ 1;\n+-------+\n| 1 ^ 1 |\n+-------+\n| 0 |\n+-------+\n \nSELECT 1 ^ 0;\n+-------+\n| 1 ^ 0 |\n+-------+\n| 1 |\n+-------+\n \nSELECT 11 ^ 3;\n+--------+\n| 11 ^ 3 |\n+--------+\n| 8 |\n+--------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/bitwise-xor/','','https://mariadb.com/kb/en/bitwise-xor/'),(247,'|',19,'Syntax\n------ \n|\n \nDescription\n----------- \nBitwise OR. Converts the values to binary and compares bits.\nIf either of the corresponding bits has a value of 1, the\nresulting bit is also 1.\n \nSee also bitwise AND.\n \nExamples\n-------- \nSELECT 2|1;\n+-----+\n| 2|1 |\n+-----+\n| 3 |\n+-----+\n \nSELECT 29 | 15;\n+---------+\n| 29 | 15 |\n+---------+\n| 31 |\n+---------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/bitwise-or/','','https://mariadb.com/kb/en/bitwise-or/'),(158,'GET_LOCK',14,'Syntax\n------ \nGET_LOCK(str,timeout)\n \nDescription\n----------- \nTries to obtain a lock with a name given by the string str,\nusing a timeout of timeout seconds. Returns 1 if the lock\nwas obtained successfully, 0 if the attempt timed out (for\nexample, because another client has previously locked the\nname), or NULL if an error occurred (such as running out of\nmemory or the thread was killed with mysqladmin kill).\n \nA lock is released with RELEASE_LOCK(), when the connection\nterminates (either normally or abnormally), or before\nMariaDB 10.0.2, when the connection executes another\nGET_LOCK statement. From MariaDB 10.0.2, a connection can\nhold multiple locks at the same time, so a lock that is no\nlonger needed needs to be explicitly released.\n \nThe IS_FREE_LOCK function returns whether a specified lock a\nfree or not, and the IS_USED_LOCK whether the function is in\nuse or not.\n \nLocks obtained with GET_LOCK() do not interact with\ntransactions. That is, committing a transaction does not\nrelease any such locks obtained during the transaction.\n \nFrom MariaDB 10.0.2, it is also possible to recursively set\nthe same lock. If a lock with the same name is set n times,\nit needs to be released n times as well. \n \nstr is case insensitive for GET_LOCK() and related\nfunctions. If str is an empty string or NULL, GET_LOCK()\nreturns NULL and does nothing. From MariaDB 10.2.2, timeout\nsupports microseconds. Before then, it was rounded to the\nclosest integer.\n \nIf the metadata_lock_info plugin is installed, locks\nacquired with this function are visible in the Information\nSchema METADATA_LOCK_INFO table.\n \nThis function can be used to implement application locks or\nto simulate record locks. Names are locked on a server-wide\nbasis. If a name has been locked by one client, GET_LOCK()\nblocks any request by another client for a lock with the\nsame name. This allows clients that agree on a given lock\nname to use the name to perform cooperative advisory\nlocking. But be aware that it also allows a client that is\nnot among the set of cooperating clients to lock a name,\neither inadvertently or deliberately, and thus prevent any\nof the cooperating clients from locking that name. One way\nto reduce the likelihood of this is to use lock names that\nare database-specific or application-specific. For example,\nuse lock names of the form db_name.str or app_name.str.\n \nStatements using the GET_LOCK() function are not safe for\nreplication.\n \nThe patch to permit multiple locks was contributed by\nKonstantin \"Kostja\" Osipov (MDEV-3917).\n \nExamples\n-------- \nSELECT GET_LOCK(\'lock1\',10);\n+----------------------+\n| GET_LOCK(\'lock1\',10) |\n+----------------------+\n| 1 |\n+----------------------+\n \nSELECT IS_FREE_LOCK(\'lock1\'), IS_USED_LOCK(\'lock1\');\n+-----------------------+-----------------------+\n| IS_FREE_LOCK(\'lock1\') | IS_USED_LOCK(\'lock1\') |\n+-----------------------+-----------------------+\n| 0 | 46 |\n+-----------------------+-----------------------+\n \nSELECT IS_FREE_LOCK(\'lock2\'), IS_USED_LOCK(\'lock2\');\n+-----------------------+-----------------------+\n| IS_FREE_LOCK(\'lock2\') | IS_USED_LOCK(\'lock2\') |\n+-----------------------+-----------------------+\n| 1 | NULL |\n+-----------------------+-----------------------+\n \nFrom MariaDB 10.0.2, multiple locks can be held:\n \nSELECT GET_LOCK(\'lock2\',10);\n+----------------------+\n| GET_LOCK(\'lock2\',10) |\n+----------------------+\n| 1 |\n+----------------------+\n \nSELECT IS_FREE_LOCK(\'lock1\'), IS_FREE_LOCK(\'lock2\');\n+-----------------------+-----------------------+\n| IS_FREE_LOCK(\'lock1\') | IS_FREE_LOCK(\'lock2\') |\n+-----------------------+-----------------------+\n| 0 | 0 |\n+-----------------------+-----------------------+\n \nSELECT RELEASE_LOCK(\'lock1\'), RELEASE_LOCK(\'lock2\');\n+-----------------------+-----------------------+\n| RELEASE_LOCK(\'lock1\') | RELEASE_LOCK(\'lock2\') |\n+-----------------------+-----------------------+\n| 1 | 1 |\n+-----------------------+-----------------------+\n \nBefore MariaDB 10.0.2, a connection could only hold a single\nlock:\n \nSELECT GET_LOCK(\'lock2\',10);\n+----------------------+\n| GET_LOCK(\'lock2\',10) |\n+----------------------+\n| 1 |\n+----------------------+\n \nSELECT IS_FREE_LOCK(\'lock1\'), IS_FREE_LOCK(\'lock2\');\n+-----------------------+-----------------------+\n| IS_FREE_LOCK(\'lock1\') | IS_FREE_LOCK(\'lock2\') |\n+-----------------------+-----------------------+\n| 1 | 0 |\n+-----------------------+-----------------------+\n \nSELECT RELEASE_LOCK(\'lock1\'), RELEASE_LOCK(\'lock2\');\n+-----------------------+-----------------------+\n| RELEASE_LOCK(\'lock1\') | RELEASE_LOCK(\'lock2\') |\n+-----------------------+-----------------------+\n| NULL | 1 |\n+-----------------------+-----------------------+\n \nFrom MariaDB 10.0.2, it is possible to hold the same lock\nrecursively. This example is viewed using the\nmetadata_lock_info plugin:\n \nSELECT GET_LOCK(\'lock3\',10);\n+----------------------+\n| GET_LOCK(\'lock3\',10) |\n+----------------------+\n| 1 |\n+----------------------+\n \nSELECT GET_LOCK(\'lock3\',10);\n+----------------------+\n| GET_LOCK(\'lock3\',10) |\n+----------------------+\n| 1 |\n+----------------------+\n \nSELECT * FROM INFORMATION_SCHEMA.METADATA_LOCK_INFO;\n \n+-----------+---------------------+---------------+-----------+--------------+------------+\n| THREAD_ID | LOCK_MODE | LOCK_DURATION | LOCK_TYPE |\nTABLE_SCHEMA | TABLE_NAME |\n+-----------+---------------------+---------------+-----------+--------------+------------+\n| 46 | MDL_SHARED_NO_WRITE | NULL | User lock | lock3 | |\n+-----------+---------------------+---------------+-----------+--------------+------------+\n \nSELECT RELEASE_LOCK(\'lock3\');\n+-----------------------+\n| RELEASE_LOCK(\'lock3\') |\n+-----------------------+\n| 1 |\n+-----------------------+\n \nSELECT * FROM INFORMATION_SCHEMA.METADATA_LOCK_INFO;\n \n+-----------+---------------------+---------------+-----------+--------------+------------+\n| THREAD_ID | LOCK_MODE | LOCK_DURATION | LOCK_TYPE |\nTABLE_SCHEMA | TABLE_NAME |\n+-----------+---------------------+---------------+-----------+--------------+------------+\n| 46 | MDL_SHARED_NO_WRITE | NULL | User lock | lock3 | |\n+-----------+---------------------+---------------+-----------+--------------+------------+\n \nSELECT RELEASE_LOCK(\'lock3\');\n+-----------------------+\n| RELEASE_LOCK(\'lock3\') |\n+-----------------------+\n| 1 |\n+-----------------------+\n \nSELECT * FROM INFORMATION_SCHEMA.METADATA_LOCK_INFO;\n \nEmpty set (0.000 sec)\n \nTimeout example: Connection 1:\n \nSELECT GET_LOCK(\'lock4\',10);\n+----------------------+\n| GET_LOCK(\'lock4\',10) |\n+----------------------+\n| 1 |\n+----------------------+\n \nConnection 2:\n \nSELECT GET_LOCK(\'lock4\',10);\n \nAfter 10 seconds...\n \n+----------------------+\n| GET_LOCK(\'lock4\',10) |\n+----------------------+\n| 0 |\n+----------------------+\n \nDeadlocks are automatically detected and resolved.\nConnection 1:\n \nSELECT GET_LOCK(\'lock5\',10); \n+----------------------+\n| GET_LOCK(\'lock5\',10) |\n+----------------------+\n| 1 |\n+----------------------+\n \nConnection 2:\n \nSELECT GET_LOCK(\'lock6\',10);\n+----------------------+\n| GET_LOCK(\'lock6\',10) |\n+----------------------+\n| 1 |\n+----------------------+\n \nConnection 1:\n \nSELECT GET_LOCK(\'lock6\',10); \n+----------------------+\n| GET_LOCK(\'lock6\',10) |\n+----------------------+\n| 0 |\n+----------------------+\n \nConnection 2:\n \nSELECT GET_LOCK(\'lock5\',10);\nERROR 1213 (40001): Deadlock found when trying to get lock;\n try restarting transaction\n \n\n\nURL: https://mariadb.com/kb/en/get_lock/','','https://mariadb.com/kb/en/get_lock/'),(160,'INET6_NTOA',14,'INET6_NTOA() has been available from MariaDB 10.0.12.\n \nSyntax\n------ \nINET6_NTOA(expr)\n \nDescription\n----------- \nGiven an IPv6 or IPv4 network address as a numeric binary\nstring, returns the address as a nonbinary string in the\nconnection character set.\n \nThe return string is lowercase, and is platform independent,\nsince it does not use functions specific to the operating\nsystem. It has a maximum length of 39 characters.\n \nReturns NULL if the argument is not understood.\n \nExamples\n-------- \nSELECT INET6_NTOA(UNHEX(\'0A000101\'));\n+-------------------------------+\n| INET6_NTOA(UNHEX(\'0A000101\')) |\n+-------------------------------+\n| 10.0.1.1 |\n+-------------------------------+\n \nSELECT\nINET6_NTOA(UNHEX(\'48F3000000000000D4321431BA23846F\'));\n+-------------------------------------------------------+\n| INET6_NTOA(UNHEX(\'48F3000000000000D4321431BA23846F\')) |\n+-------------------------------------------------------+\n| 48f3::d432:1431:ba23:846f |\n+-------------------------------------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/inet6_ntoa/','','https://mariadb.com/kb/en/inet6_ntoa/'),(164,'IS_IPV4',14,'IS_IPV4() has been available since MariaDB 10.0.12.\n \nSyntax\n------ \nIS_IPV4(expr)\n \nDescription\n----------- \nIf the expression is a valid IPv4 address, returns 1,\notherwise returns 0.\n \nIS_IPV4() is stricter than INET_ATON(), but as strict as\nINET6_ATON(), in determining the validity of an IPv4\naddress. This implies that if IS_IPV4 returns 1, the same\nexpression will always return a non-NULL result when passed\nto INET_ATON(), but that the reverse may not apply.\n \nExamples\n-------- \nSELECT IS_IPV4(\'1110.0.1.1\');\n+-----------------------+\n| IS_IPV4(\'1110.0.1.1\') |\n+-----------------------+\n| 0 |\n+-----------------------+\n \nSELECT IS_IPV4(\'48f3::d432:1431:ba23:846f\');\n+--------------------------------------+\n| IS_IPV4(\'48f3::d432:1431:ba23:846f\') |\n+--------------------------------------+\n| 0 |\n+--------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/is_ipv4/','','https://mariadb.com/kb/en/is_ipv4/'),(165,'IS_IPV4_COMPAT',14,'IS_IPV4_COMPAT() has been available since MariaDB 10.0.12.\n \nSyntax\n------ \nIS_IPV4_COMPAT(expr)\n \nDescription\n----------- \nReturns 1 if a given numeric binary string IPv6 address,\nsuch as returned by INET6_ATON(), is IPv4-compatible,\notherwise returns 0. \n \nExamples\n-------- \nSELECT IS_IPV4_COMPAT(INET6_ATON(\'::10.0.1.1\'));\n+------------------------------------------+\n| IS_IPV4_COMPAT(INET6_ATON(\'::10.0.1.1\')) |\n+------------------------------------------+\n| 1 |\n+------------------------------------------+\n \nSELECT\nIS_IPV4_COMPAT(INET6_ATON(\'::48f3::d432:1431:ba23:846f\'));\n+-----------------------------------------------------------+\n|\nIS_IPV4_COMPAT(INET6_ATON(\'::48f3::d432:1431:ba23:846f\'))\n|\n+-----------------------------------------------------------+\n| 0 |\n+-----------------------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/is_ipv4_compat/','','https://mariadb.com/kb/en/is_ipv4_compat/'),(166,'IS_IPV4_MAPPED',14,'IS_IPV4_MAPPED() has been available since MariaDB 10.0.12.\n \nSyntax\n------ \nIS_IPV4_MAPPED(expr)\n \nDescription\n----------- \nReturns 1 if a given a numeric binary string IPv6 address,\nsuch as returned by INET6_ATON(), is a valid IPv4-mapped\naddress, otherwise returns 0.\n \nExamples\n-------- \nSELECT IS_IPV4_MAPPED(INET6_ATON(\'::10.0.1.1\'));\n+------------------------------------------+\n| IS_IPV4_MAPPED(INET6_ATON(\'::10.0.1.1\')) |\n+------------------------------------------+\n| 0 |\n+------------------------------------------+\n \nSELECT IS_IPV4_MAPPED(INET6_ATON(\'::ffff:10.0.1.1\'));\n+-----------------------------------------------+\n| IS_IPV4_MAPPED(INET6_ATON(\'::ffff:10.0.1.1\')) |\n+-----------------------------------------------+\n| 1 |\n+-----------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/is_ipv4_mapped/','','https://mariadb.com/kb/en/is_ipv4_mapped/'),(170,'MASTER_POS_WAIT',14,'MASTER_POS_WAIT was introduced in MariaDB 10.0.9.\n \nSyntax\n------ \nMASTER_POS_WAIT(log_name,log_pos[,timeout,[\"connection_name\"]])\n \nDescription\n----------- \nThis function is useful in replication for controlling\nmaster/slave synchronization. It blocks until the slave has\nread and applied all updates up to the specified position\n(log_name,log_pos) in the master log. The return value is\nthe number of log events the slave had to wait for to\nadvance to the specified position. The function returns NULL\nif\nthe slave SQL thread is not started, the slave\'s master\ninformation is not\ninitialized, the arguments are incorrect, or an error\noccurs. It returns -1 if\nthe timeout has been exceeded. If the slave SQL thread stops\nwhile\n MASTER_POS_WAIT() is waiting, the function returns NULL. If\nthe slave is past the specified position, the function\nreturns immediately.\n \nIf a timeout value is specified, MASTER_POS_WAIT() stops\nwaiting when timeout seconds have elapsed. timeout must be\ngreater than 0; a\nzero or negative timeout means no timeout.\n \nThe connection_name is used when you are using\nmulti-source-replication. If you don\'t specify it, it\'s\nset to the value of the default_master_connection system\nvariable.\n \nStatements using the MASTER_POS_WAIT() function are not safe\nfor replication.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/master_pos_wait/','','https://mariadb.com/kb/en/master_pos_wait/'),(248,'~',19,'Syntax\n------ \n~\n \nDescription\n----------- \nBitwise NOT. Converts the value to 4 bytes binary and\ninverts all bits.\n \nExamples\n-------- \nSELECT 3 & ~1;\n+--------+\n| 3 & ~1 |\n+--------+\n| 2 |\n+--------+\n \nSELECT 5 & ~1;\n+--------+\n| 5 & ~1 |\n+--------+\n| 4 |\n+--------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/bitwise-not/','','https://mariadb.com/kb/en/bitwise-not/'),(250,'TRUE FALSE',19,'Description\n----------- \nThe constants TRUE and FALSE evaluate to 1 and 0,\nrespectively. The\nconstant names can be written in any lettercase.\n \nExamples\n-------- \nSELECT TRUE, true, FALSE, false;\n \n+------+------+-------+-------+\n| TRUE | TRUE | FALSE | FALSE |\n+------+------+-------+-------+\n| 1 | 1 | 0 | 0 |\n+------+------+-------+-------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/true-false/','','https://mariadb.com/kb/en/true-false/'),(253,'CHECK VIEW',20,'CHECK VIEW was introduced in MariaDB 10.0.18.\n \nSyntax\n------ \nCHECK VIEW view_name\n \nDescription\n----------- \nThe CHECK VIEW statement was introduced in MariaDB 10.0.18\nto assist with fixing MDEV-6916, an issue introduced in\nMariaDB 5.2 where the view algorithms were swapped. It\nchecks whether the view algorithm is correct. It is run as\npart of mysql_upgrade, and should not normally be required\nin regular use.\n \n\n\nURL: https://mariadb.com/kb/en/check-view/','','https://mariadb.com/kb/en/check-view/'),(254,'',20,'URL: https://mariadb.com/kb/en/checksum-table/','','https://mariadb.com/kb/en/checksum-table/'),(269,'BLOB and TEXT Data Types',22,'Description\n----------- \nA BLOB is a binary large object that can hold a variable\namount of\ndata. The four BLOB types are \nTINYBLOB,\nBLOB, \nMEDIUMBLOB, and\nLONGBLOB.\n \nThese differ only in the maximum length of the values they\ncan hold. \n \nThe TEXT types are \nTINYTEXT,\nTEXT,\nMEDIUMTEXT, and\nLONGTEXT.\nJSON (alias for LONGTEXT)\n \nThese correspond to the four BLOB types and have the same\nmaximum lengths and storage requirements.\n \nStarting from MariaDB 10.2.1, BLOB and TEXT columns can have\na DEFAULT value.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/blob-and-text-data-types/','','https://mariadb.com/kb/en/blob-and-text-data-types/'),(169,'MASTER_GTID_WAIT',14,'MASTER_GTID_WAIT() was included in MariaDB 10.0.9.\n \nSyntax\n------ \nMASTER_GTID_WAIT(gtid-list[, timeout)\n \nDescription\n----------- \nThis function takes a string containing a comma-separated\nlist of global transaction id\'s\n(similar to the value of, for example, gtid_binlog_pos). It\nwaits until the value of gtid_slave_pos has the same or\nhigher seq_no within all replication domains specified in\nthe gtid-list; in other words, it waits until the slave has\nreached the specified GTID position.\n \nAn optional second argument gives a timeout in seconds. If\nthe timeout\nexpires before the specified GTID position is reached, then\nthe function\nreturns -1. Passing NULL or a negative number for the\ntimeout means no timeout, and the function will wait\nindefinitely.\n \n If the wait completes without a timeout, 0 is returned.\nPassing NULL for the\n gtid-list makes the function return NULL immediately,\nwithout waiting.\n \nThe gtid-list may be the empty string, in which case\nMASTER_GTID_WAIT()\nreturns immediately. If the gtid-list contains fewer domains\nthan\ngtid_slave_pos, then only those domains are waited upon. If\ngtid-list\ncontains a domain that is not present in @@gtid_slave_pos,\nthen\nMASTER_GTID_WAIT() will wait until an event containing such\ndomain_id arrives\non the slave (or until timed out or killed).\n \nMASTER_GTID_WAIT() can be useful to ensure that a slave has\ncaught up to\na master. Simply take the value of gtid_binlog_pos on the\nmaster, and use it in a MASTER_GTID_WAIT() call on the\nslave; when the call completes, the slave\nwill have caught up with that master position.\n \nMASTER_GTID_WAIT() can also be used in client applications\ntogether with the\nlast_gtid session variable. This is useful in a\nread-scaleout replication setup, where the application\nwrites to a single master but divides the\nreads out to a number of slaves to distribute the load. In\nsuch a setup, there\nis a risk that an application could first do an update on\nthe master, and then\na bit later do a read on a slave, and if the slave is not\nfast enough, the\ndata read from the slave might not include the update just\nmade, possibly\nconfusing the application and/or the end-user. One way to\navoid this is to\nrequest the value of last_gtid on the master just after the\nupdate. Then\nbefore doing the read on the slave, do a MASTER_GTID_WAIT()\non the value\nobtained from the master; this will ensure that the read is\nnot performed\nuntil the slave has replicated sufficiently far for the\nupdate to have become\nvisible.\n \nNote that MASTER_GTID_WAIT() can be used even if the slave\nis configured not\nto use GTID for connections (CHANGE MASTER TO\nmaster_use_gtid=no). This is\nbecause from MariaDB 10, GTIDs are always logged on the\nmaster server, and\nalways recorded on the slave servers.\n \nDifferences to MASTER_POS_WAIT()\n \nMASTER_GTID_WAIT() is global; it waits for any master\nconnection to reach\n the specified GTID position. MASTER_POS_WAIT() works only\nagainst a\n specific connection. This also means that while\nMASTER_POS_WAIT() aborts if\n its master connection is terminated with STOP SLAVE or due\nto an error,\n MASTER_GTID_WAIT() continues to wait while slaves are\nstopped.\n \nMASTER_GTID_WAIT() can take its timeout as a floating-point\nvalue, so a\n timeout in fractional seconds is supported, eg.\nMASTER_GTID_WAIT(\"0-1-100\",\n 0.5). (The minimum wait is one microsecond, 0.000001\nseconds).\n \nMASTER_GTID_WAIT() allows one to specify a timeout of zero\nin order to do a\n non-blocking check to see if the slaves have progressed to\na specific GTID position\n (MASTER_POS_WAIT() takes a zero timeout as meaning an\ninfinite wait). To do\n an infinite MASTER_GTID_WAIT(), specify a negative timeout,\nor omit the\n timeout argument.\n \nMASTER_GTID_WAIT() does not return the number of events\nexecuted since the\n wait started, nor does it return NULL if a slave thread is\nstopped. It\n always returns either 0 for successful wait completed, or\n-1 for timeout\n reached (or NULL if the specified gtid-pos is NULL).\n \nSince MASTER_GTID_WAIT() looks only at the seq_no part of\nthe GTIDs, not the\nserver_id, care is needed if a slave becomes diverged from\nanother server so\nthat two different GTIDs with the same seq_no (in the same\ndomain) arrive at\nthe same server. This situation is in any case best avoided;\nsetting\ngtid_strict_mode is recommended, as this will prevent any\nsuch out-of-order sequence numbers from ever being\nreplicated on a slave.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/master_gtid_wait/','','https://mariadb.com/kb/en/master_gtid_wait/'),(174,'UUID',14,'Syntax\n------ \nUUID()\n \nDescription\n----------- \nReturns a Universal Unique Identifier (UUID) generated\naccording to \"DCE 1.1:\nRemote Procedure Call\" (Appendix A) CAE (Common\nApplications Environment)\nSpecifications published by The Open Group in October\n1997 \n(Document Number C706).\n \nA UUID is designed as a number that is globally unique in\nspace and time. Two\ncalls to UUID() are expected to generate two different\nvalues, even if these calls are performed on two separate\ncomputers that are\nnot connected to each other.\n \nA UUID is a 128-bit number represented by a utf8 string of\nfive\nhexadecimal numbers in aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\nformat:\nThe first three numbers are generated from a timestamp.\nThe fourth number preserves temporal uniqueness in case the\ntimestamp value\n loses monotonicity (for example, due to daylight saving\ntime).\nThe fifth number is an IEEE 802 node number that provides\nspatial uniqueness.\n A random number is substituted if the latter is not\navailable (for example,\n because the host computer has no Ethernet card, or we do\nnot know how to find\n the hardware address of an interface on your operating\nsystem). In this case,\n spatial uniqueness cannot be guaranteed. Nevertheless, a\ncollision should\n have very low probability.\n \nCurrently, the MAC address of an interface is taken into\naccount only on FreeBSD and Linux. On other operating\nsystems, MariaDB uses a randomly generated 48-bit number.\n \nStatements using the UUID() function are not safe for\nreplication.\n \nUUID() results are intended to be unique, but cannot always\nbe relied upon to unpredictable and unguessable, so should\nnot be relied upon for these purposes.\n \nExamples\n-------- \nSELECT UUID();\n+--------------------------------------+\n| UUID() |\n+--------------------------------------+\n| cd41294a-afb0-11df-bc9b-00241dd75637 |\n+--------------------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/uuid/','','https://mariadb.com/kb/en/uuid/'),(272,'CHAR BYTE',22,'Description\n----------- \nThe CHAR BYTE data type is an alias for the \nBINARY data type. This is a\ncompatibility feature.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/char-byte/','','https://mariadb.com/kb/en/char-byte/'),(281,'LONGBLOB',22,'Syntax\n------ \nLONGBLOB\n \nDescription\n----------- \nA BLOB column with a \nmaximum length of 4,294,967,295 bytes or 4GB (232 - 1). The\neffective maximum length of LONGBLOB columns depends on the\nconfigured maximum packet size in the client/server protocol\nand\navailable memory. Each LONGBLOB value is stored using a\nfour-byte\nlength prefix that indicates the number of bytes in the\nvalue.\n \nOracle Mode\n \nIn Oracle mode from MariaDB 10.3, BLOB is a synonym for\nLONGBLOB.\n \n\n\nURL: https://mariadb.com/kb/en/longblob/','','https://mariadb.com/kb/en/longblob/'),(282,'LONGTEXT',22,'Syntax\n------ \nLONGTEXT [CHARACTER SET charset_name] [COLLATE\ncollation_name]\n \nDescription\n----------- \nA TEXT column with a maximum length of 4,294,967,295 or 4GB\n(232 - 1) characters. The effective maximum length is less\nif the value contains multi-byte characters. The effective\nmaximum length of LONGTEXT columns also depends on the\nconfigured maximum packet size in the client/server protocol\nand available memory. Each LONGTEXT value is stored using a\nfour-byte length prefix that indicates the number of bytes\nin the value.\n \nFrom MariaDB 10.2.7, JSON is an alias for LONGTEXT. See JSON\nData Type for details.\n \nOracle Mode\n \nIn Oracle mode from MariaDB 10.3, CLOB is a synonym for\nLONGTEXT.\n \n\n\nURL: https://mariadb.com/kb/en/longtext/','','https://mariadb.com/kb/en/longtext/'),(172,'RELEASE_LOCK',14,'Syntax\n------ \nRELEASE_LOCK(str)\n \nDescription\n----------- \nReleases the lock named by the string str that was obtained\nwith GET_LOCK(). Returns 1 if the lock was released, 0 if\nthe lock was not established by this thread (in which case\nthe lock is not\nreleased), and NULL if the named lock did not exist. The\nlock does not exist if it was never obtained by a call to\nGET_LOCK() or if it has previously been released.\n \nMariaDB until 10.0.1\n \nBefore 10.0.2, GET_LOCK() released the existing lock, if\nany. Since 10.0.2 this does not happen, because multiple\nlocks are allowed.\n \nstr is case insensitive. If str is an empty string or NULL,\nRELEASE_LOCK() returns NULL and does nothing.\n \nStatements using the RELEASE_LOCK() function are not safe\nfor replication.\n \nThe DO statement is convenient to use with RELEASE_LOCK().\n \nExamples\n-------- \nConnection1:\n \nSELECT GET_LOCK(\'lock1\',10);\n+----------------------+\n| GET_LOCK(\'lock1\',10) |\n+----------------------+\n| 1 |\n+----------------------+\n \nConnection 2:\n \nSELECT GET_LOCK(\'lock2\',10);\n+----------------------+\n| GET_LOCK(\'lock2\',10) |\n+----------------------+\n| 1 |\n+----------------------+\n \nConnection 1:\n \nSELECT RELEASE_LOCK(\'lock1\'), RELEASE_LOCK(\'lock2\'),\nRELEASE_LOCK(\'lock3\');\n+-----------------------+-----------------------+-----------------------+\n| RELEASE_LOCK(\'lock1\') | RELEASE_LOCK(\'lock2\') |\nRELEASE_LOCK(\'lock3\') |\n+-----------------------+-----------------------+-----------------------+\n| 1 | 0 | NULL |\n+-----------------------+-----------------------+-----------------------+\n \nFrom MariaDB 10.0.2, it is possible to hold the same lock\nrecursively. This example is viewed using the\nmetadata_lock_info plugin:\n \nSELECT GET_LOCK(\'lock3\',10);\n+----------------------+\n| GET_LOCK(\'lock3\',10) |\n+----------------------+\n| 1 |\n+----------------------+\n \nSELECT GET_LOCK(\'lock3\',10);\n+----------------------+\n| GET_LOCK(\'lock3\',10) |\n+----------------------+\n| 1 |\n+----------------------+\n \nSELECT * FROM INFORMATION_SCHEMA.METADATA_LOCK_INFO;\n \n+-----------+---------------------+---------------+-----------+--------------+------------+\n| THREAD_ID | LOCK_MODE | LOCK_DURATION | LOCK_TYPE |\nTABLE_SCHEMA | TABLE_NAME |\n+-----------+---------------------+---------------+-----------+--------------+------------+\n| 46 | MDL_SHARED_NO_WRITE | NULL | User lock | lock3 | |\n+-----------+---------------------+---------------+-----------+--------------+------------+\n \nSELECT RELEASE_LOCK(\'lock3\');\n+-----------------------+\n| RELEASE_LOCK(\'lock3\') |\n+-----------------------+\n| 1 |\n+-----------------------+\n \nSELECT * FROM INFORMATION_SCHEMA.METADATA_LOCK_INFO;\n \n+-----------+---------------------+---------------+-----------+--------------+------------+\n| THREAD_ID | LOCK_MODE | LOCK_DURATION | LOCK_TYPE |\nTABLE_SCHEMA | TABLE_NAME |\n+-----------+---------------------+---------------+-----------+--------------+------------+\n| 46 | MDL_SHARED_NO_WRITE | NULL | User lock | lock3 | |\n+-----------+---------------------+---------------+-----------+--------------+------------+\n \nSELECT RELEASE_LOCK(\'lock3\');\n+-----------------------+\n| RELEASE_LOCK(\'lock3\') |\n+-----------------------+\n| 1 |\n+-----------------------+\n \nSELECT * FROM INFORMATION_SCHEMA.METADATA_LOCK_INFO;\n \nEmpty set (0.000 sec)\n \n\n\nURL: https://mariadb.com/kb/en/release_lock/','','https://mariadb.com/kb/en/release_lock/'),(176,'VALUES / VALUE',14,'Syntax\n------ \nVALUE(col_name) \n \nMariaDB until 10.3.2\n \nVALUES(col_name) \n \nDescription\n----------- \nIn an INSERT ... ON DUPLICATE KEY UPDATE statement, you can\nuse the VALUES(col_name) function in the UPDATE clause to\nrefer to column values from the INSERT portion of the\nstatement. In other words, VALUES(col_name) in the UPDATE\nclause refers to the value of col_name that would be\ninserted, had no duplicate-key conflict occurred. This\nfunction is especially useful in multiple-row inserts.\n \nThe VALUES() function is meaningful only in INSERT ... ON\nDUPLICATE KEY UPDATE statements and returns NULL otherwise.\n \nIn MariaDB 10.3.3 this function was renamed to VALUE(),\nbecause it\'s incompatible with the standard Table Value\nConstructors syntax, implemented in MariaDB 10.3.3.\n \nThe VALUES() function can still be used even from MariaDB\n10.3.3, but only in INSERT ... ON DUPLICATE KEY UPDATE\nstatements; it\'s a syntax error otherwise.\n \nExamples\n-------- \nINSERT INTO t (a,b,c) VALUES (1,2,3),(4,5,6)\n ON DUPLICATE KEY UPDATE c=VALUE(a)+VALUE(b);\n \nMariaDB until 10.3.2\n \nINSERT INTO t (a,b,c) VALUES (1,2,3),(4,5,6)\n ON DUPLICATE KEY UPDATE c=VALUES(a)+VALUES(b);\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/values-value/','','https://mariadb.com/kb/en/values-value/'),(179,'||',15,'Syntax\n------ \nOR, ||\n \nDescription\n----------- \nLogical OR. When both operands are non-NULL, the result is 1\nif any\noperand is non-zero, and 0 otherwise. With a NULL operand,\nthe result\nis 1 if the other operand is non-zero, and NULL otherwise.\nIf both\noperands are NULL, the result is NULL.\n \nFor this operator, short-circuit evaluation can be used.\n \nNote that, if the PIPES_AS_CONCAT SQL_MODE is set, || is\nused as a string concatenation operator. This means that a\n|| b is the same as CONCAT(a,b). See CONCAT() for details.\n \nOracle Mode\n \nIn Oracle mode from MariaDB 10.3, || ignores NULL.\n \nExamples\n-------- \nSELECT 1 || 1;\n \n+--------+\n| 1 || 1 |\n+--------+\n| 1 |\n+--------+\n \nSELECT 1 || 0;\n \n+--------+\n| 1 || 0 |\n+--------+\n| 1 |\n+--------+\n \nSELECT 0 || 0;\n \n+--------+\n| 0 || 0 |\n+--------+\n| 0 |\n+--------+\n \nSELECT 0 || NULL;\n \n+-----------+\n| 0 || NULL |\n+-----------+\n| NULL |\n+-----------+\n \nSELECT 1 || NULL;\n \n+-----------+\n| 1 || NULL |\n+-----------+\n| 1 |\n+-----------+\n \nIn Oracle mode, from MariaDB 10.3:\n \nSELECT 0 || NULL;\n \n+-----------+\n| 0 || NULL |\n+-----------+\n| 0 |\n+-----------+\n \n\n\nURL: https://mariadb.com/kb/en/or/','','https://mariadb.com/kb/en/or/'),(283,'MEDIUMBLOB',22,'Syntax\n------ \nMEDIUMBLOB\n \nDescription\n----------- \nA BLOB column with a maximum\nlength of 16,777,215 (224 - 1) bytes.\nEach MEDIUMBLOB value is stored using a three-byte length\nprefix that\nindicates the number of bytes in the value. \n \n\n\nURL: https://mariadb.com/kb/en/mediumblob/','','https://mariadb.com/kb/en/mediumblob/'),(285,'MEDIUMTEXT',22,'Syntax\n------ \nMEDIUMTEXT [CHARACTER SET charset_name] [COLLATE\ncollation_name]\n \nDescription\n----------- \nA TEXT column with a \nmaximum length of 16,777,215 (224 - 1)\ncharacters. The effective maximum length is less if the\nvalue\ncontains multi-byte characters. Each MEDIUMTEXT value is\nstored using\na three-byte length prefix that indicates the number of\nbytes in the\nvalue.\n \n\n\nURL: https://mariadb.com/kb/en/mediumtext/','','https://mariadb.com/kb/en/mediumtext/'),(287,'ROW',22,'The ROW data type was introduced in MariaDB 10.3.0.\n \nSyntax\n------ \nROW ( [{, }... ])\n \nDescription\n----------- \nROW is a data type for stored procedure variables.\n \nFeatures\n \nROW fields as normal variables\n \nROW fields (members) act as normal variables, and are able\nto appear in all\nquery parts where a stored procedure variable is allowed:\nAssignment is using the := operator and the SET command:\n \na.x:= 10;\n \na.x:= b.x;\n \nSET a.x= 10, a.y=20, a.z= b.z;\n \nPassing to functions and operators:\n \nSELECT f1(rec.a), rec.a\n\nURL: https://mariadb.com/kb/en/row/','','https://mariadb.com/kb/en/row/'),(288,'SET Data Type',22,'Syntax\n------ \nSET(\'value1\',\'value2\',...) [CHARACTER SET charset_name]\n[COLLATE collation_name]\n \nDescription\n----------- \nA set. A string object that can have zero or more values,\neach of\nwhich must be chosen from the list of values \'value1\',\n\'value2\', ... A\nSET column can have a maximum of 64 members. SET values are\nrepresented internally as integers.\n \n\n\nURL: https://mariadb.com/kb/en/set-data-type/','','https://mariadb.com/kb/en/set-data-type/'),(181,'Assignment Operator (=)',15,'Syntax\n------ \nidentifier = expr\n \nDescription\n----------- \nThe equal sign is used as both an assignment operator in\ncertain contexts, and as a comparison operator. When used as\nassignment operator, the value on the right is assigned to\nthe variable (or column, in some contexts) on the left.\n \nSince its use can be ambiguous, unlike the := assignment\noperator, the = assignment operator cannot be used in all\ncontexts, and is only valid as part of a SET statement, or\nthe SET clause of an UPDATE statement\n \nThis operator works with both user-defined variables and\nlocal variables.\n \nExamples\n-------- \nUPDATE table_name SET x = 2 WHERE x > 100;\n \nSET @x = 1, @y := 2;\n \n\n \n \n \n \n \n \n \n \n\nURL:\nhttps://mariadb.com/kb/en/assignment-operators-assignment-operator/','','https://mariadb.com/kb/en/assignment-operators-assignment-operator/'),(183,'Stored Aggregate Functions',16,'The ability to create stored aggregate functions was added\nin MariaDB 10.3.3.\n \nAggregate functions are functions that are computed over a\nsequence of rows and return one result for the sequence of\nrows.\n \nCreating a custom aggregate function is done using the\nCREATE FUNCTION statement with two main differences:\nThe addition of the AGGREGATE keyword, so CREATE AGGREGATE\nFUNCTION\nThe FETCH GROUP NEXT ROW instruction inside the loop\nOracle PL/SQL compatibility using SQL/PL is provided\n \nStandard Syntax\n \nCREATE AGGREGATE FUNCTION function_name (parameters) RETURNS\nreturn_type\nBEGIN\n All types of declarations\n DECLARE CONTINUE HANDLER FOR NOT FOUND RETURN return_val;\n LOOP\n FETCH GROUP NEXT ROW; // fetches next row from table\n other instructions\n END LOOP;\nEND\n \nStored aggregate functions were a 2016 Google Summer of Code\nproject by Varun Gupta.\n \nUsing SQL/PL\n \nSET sql_mode=Oracle;\nDELIMITER //\n \nCREATE AGGREGATE FUNCTION function_name (parameters) RETURN\nreturn_type\n declarations\nBEGIN\n LOOP\n FETCH GROUP NEXT ROW; -- fetches next row from table\n -- other instructions\n \n END LOOP;\nEXCEPTION\n WHEN NO_DATA_FOUND THEN\n RETURN return_val;\nEND //\n \nDELIMITER ;\n \nExamples\n-------- \nFirst a simplified example:\n \nCREATE TABLE marks(stud_id INT, grade_count INT);\n \nINSERT INTO marks VALUES (1,6), (2,4), (3,7), (4,5), (5,8);\n \nSELECT * FROM marks;\n \n+---------+-------------+\n| stud_id | grade_count |\n+---------+-------------+\n| 1 | 6 |\n| 2 | 4 |\n| 3 | 7 |\n| 4 | 5 |\n| 5 | 8 |\n+---------+-------------+\n \nDELIMITER //\nCREATE AGGREGATE FUNCTION IF NOT EXISTS aggregate_count(x\nINT) RETURNS INT\nBEGIN\n DECLARE count_students INT DEFAULT 0;\n \n DECLARE CONTINUE HANDLER FOR NOT FOUND\n RETURN count_students;\n \n LOOP\n FETCH GROUP NEXT ROW;\n \n IF x THEN\n SET count_students = count_students+1;\n \n END IF;\n \n END LOOP;\n \nEND //\nDELIMITER ;\n \nA non-trivial example that cannot easily be rewritten using\nexisting functions:\n \nDELIMITER //\nCREATE AGGREGATE FUNCTION medi_int(x INT) RETURNS DOUBLE\nBEGIN\n DECLARE CONTINUE HANDLER FOR NOT FOUND\n BEGIN\n DECLARE res DOUBLE;\n \n DECLARE cnt INT DEFAULT (SELECT COUNT(*) FROM tt);\n DECLARE lim INT DEFAULT (cnt-1) DIV 2;\n \n IF cnt % 2 = 0 THEN\n SET res = (SELECT AVG(a) FROM (SELECT a FROM tt ORDER BY a\nLIMIT lim,2) ttt);\n ELSE\n SET res = (SELECT a FROM tt ORDER BY a LIMIT lim,1);\n END IF;\n \n DROP TEMPORARY TABLE tt;\n \n RETURN res;\n \n END;\n \n CREATE TEMPORARY TABLE tt (a INT);\n LOOP\n FETCH GROUP NEXT ROW;\n \n INSERT INTO tt VALUES (x);\n END LOOP;\n \nEND //\nDELIMITER ;\n \nSQL/PL Example\n \nThis uses the same marks table as created above.\n \nSET sql_mode=Oracle;\n \nDELIMITER //\n \nCREATE AGGREGATE FUNCTION aggregate_count(x INT) RETURN INT\nAS count_students INT DEFAULT 0;\n \nBEGIN\n LOOP\n FETCH GROUP NEXT ROW;\n \n IF x THEN\n SET count_students := count_students+1;\n \n END IF;\n \n END LOOP;\n \nEXCEPTION\n WHEN NO_DATA_FOUND THEN\n RETURN count_students;\n \nEND aggregate_count //\nDELIMITER ;\n \nSELECT aggregate_count(stud_id) FROM marks;\n \n\n\nURL: https://mariadb.com/kb/en/stored-aggregate-functions/','','https://mariadb.com/kb/en/stored-aggregate-functions/'),(184,'AVG',16,'Syntax\n------ \nAVG([DISTINCT] expr)\n \nDescription\n----------- \nReturns the average value of expr. The DISTINCT option can\nbe used to return the average of the distinct values of\nexpr. NULL values are ignored. It is an aggregate function,\nand so can be used with the GROUP BY clause.\n \nAVG() returns NULL if there were no matching rows.\n \nFrom MariaDB 10.2.0, AVG() can be used as a window function.\n \nExamples\n-------- \nCREATE TABLE sales (sales_value INT);\n \nINSERT INTO sales VALUES(10),(20),(20),(40);\n \nSELECT AVG(sales_value) FROM sales;\n \n+------------------+\n| AVG(sales_value) |\n+------------------+\n| 22.5000 |\n+------------------+\n \nSELECT AVG(DISTINCT(sales_value)) FROM sales;\n \n+----------------------------+\n| AVG(DISTINCT(sales_value)) |\n+----------------------------+\n| 23.3333 |\n+----------------------------+\n \nCommonly, AVG() is used with a GROUP BY clause:\n \nCREATE TABLE student (name CHAR(10), test CHAR(10), score\nTINYINT); \n \nINSERT INTO student VALUES \n (\'Chun\', \'SQL\', 75), (\'Chun\', \'Tuning\', 73), \n (\'Esben\', \'SQL\', 43), (\'Esben\', \'Tuning\', 31), \n (\'Kaolin\', \'SQL\', 56), (\'Kaolin\', \'Tuning\', 88), \n (\'Tatiana\', \'SQL\', 87), (\'Tatiana\', \'Tuning\', 83);\n \nSELECT name, AVG(score) FROM student GROUP BY name;\n \n+---------+------------+\n| name | AVG(score) |\n+---------+------------+\n| Chun | 74.0000 |\n| Esben | 37.0000 |\n| Kaolin | 72.0000 |\n| Tatiana | 85.0000 |\n+---------+------------+\n \nBe careful to avoid this common mistake, not grouping\ncorrectly and returning mismatched data: \n \nSELECT name,test,AVG(score) FROM student;\n \n+------+------+------------+\n| name | test | MIN(score) |\n+------+------+------------+\n| Chun | SQL | 31 |\n+------+------+------------+\n \nAs a window function:\n \nCREATE TABLE student_test (name CHAR(10), test CHAR(10),\nscore TINYINT); \n \nINSERT INTO student_test VALUES \n (\'Chun\', \'SQL\', 75), (\'Chun\', \'Tuning\', 73), \n (\'Esben\', \'SQL\', 43), (\'Esben\', \'Tuning\', 31), \n (\'Kaolin\', \'SQL\', 56), (\'Kaolin\', \'Tuning\', 88), \n (\'Tatiana\', \'SQL\', 87), (\'Tatiana\', \'Tuning\', 83);\n \nSELECT name, test, score, AVG(score) OVER (PARTITION BY\ntest) \n AS average_by_test FROM student_test;\n \n+---------+--------+-------+-----------------+\n| name | test | score | average_by_test |\n+---------+--------+-------+-----------------+\n| Chun | SQL | 75 | 65.2500 |\n| Chun | Tuning | 73 | 68.7500 |\n| Esben | SQL | 43 | 65.2500 |\n| Esben | Tuning | 31 | 68.7500 |\n| Kaolin | SQL | 56 | 65.2500 |\n| Kaolin | Tuning | 88 | 68.7500 |\n| Tatiana | SQL | 87 | 65.2500 |\n| Tatiana | Tuning | 83 | 68.7500 |\n+---------+--------+-------+-----------------+\n \n\n\nURL: https://mariadb.com/kb/en/avg/','','https://mariadb.com/kb/en/avg/'),(293,'TIMESTAMP',22,'Syntax\n------ \nTIMESTAMP [(\n\nURL: https://mariadb.com/kb/en/timestamp/','','https://mariadb.com/kb/en/timestamp/'),(294,'TINYBLOB',22,'Syntax\n------ \nTINYBLOB\n \nDescription\n----------- \nA BLOB column with a maximum length of \n255 (28 - 1) bytes. Each\nTINYBLOB value is stored using a one-byte length prefix that\nindicates\nthe number of bytes in the value.\n \n\n\nURL: https://mariadb.com/kb/en/tinyblob/','','https://mariadb.com/kb/en/tinyblob/'),(296,'TINYTEXT',22,'Syntax\n------ \nTINYTEXT [CHARACTER SET charset_name] [COLLATE\ncollation_name]\n \nDescription\n----------- \nA TEXT column with a maximum length of 255 (28 - 1)\ncharacters. The effective maximum length is less if the\nvalue contains multi-byte characters. Each TINYTEXT value is\nstored using a one-byte length prefix that indicates the\nnumber of bytes in the value.\n \n\n\nURL: https://mariadb.com/kb/en/tinytext/','','https://mariadb.com/kb/en/tinytext/'),(185,'BIT_AND',16,'Syntax\n------ \nBIT_AND(expr)\n \nDescription\n----------- \nReturns the bitwise AND of all bits in expr. The calculation\nis performed with 64-bit (BIGINT) precision. It is an\naggregate function, and so can be used with the GROUP BY\nclause.\n \nFrom MariaDB 10.2.0, BIT_AND() can be used as a window\nfunction.\n \nExamples\n-------- \nCREATE TABLE vals (x INT);\n \nINSERT INTO vals VALUES(111),(110),(100);\n \nSELECT BIT_AND(x), BIT_OR(x), BIT_XOR(x) FROM vals;\n \n+------------+-----------+------------+\n| BIT_AND(x) | BIT_OR(x) | BIT_XOR(x) |\n+------------+-----------+------------+\n| 100 | 111 | 101 |\n+------------+-----------+------------+\n \nAs an aggregate function:\n \nCREATE TABLE vals2 (category VARCHAR(1), x INT);\n \nINSERT INTO vals2 VALUES\n (\'a\',111),(\'a\',110),(\'a\',100),\n (\'b\',\'000\'),(\'b\',001),(\'b\',011);\n \nSELECT category, BIT_AND(x), BIT_OR(x), BIT_XOR(x) \n FROM vals GROUP BY category;\n \n+----------+------------+-----------+------------+\n| category | BIT_AND(x) | BIT_OR(x) | BIT_XOR(x) |\n+----------+------------+-----------+------------+\n| a | 100 | 111 | 101 |\n| b | 0 | 11 | 10 |\n+----------+------------+-----------+------------+\n \n\n\nURL: https://mariadb.com/kb/en/bit_and/','','https://mariadb.com/kb/en/bit_and/'),(186,'BIT_OR',16,'Syntax\n------ \nBIT_OR(expr)\n \nDescription\n----------- \nReturns the bitwise OR of all bits in expr. The calculation\nis performed with 64-bit (BIGINT) precision. It is an\naggregate function, and so can be used with the GROUP BY\nclause.\n \nFrom MariaDB 10.2.0, BIT_OR can be used as a window\nfunction.\n \nExamples\n-------- \nCREATE TABLE vals (x INT);\n \nINSERT INTO vals VALUES(111),(110),(100);\n \nSELECT BIT_AND(x), BIT_OR(x), BIT_XOR(x) FROM vals;\n \n+------------+-----------+------------+\n| BIT_AND(x) | BIT_OR(x) | BIT_XOR(x) |\n+------------+-----------+------------+\n| 100 | 111 | 101 |\n+------------+-----------+------------+\n \nAs an aggregate function:\n \nCREATE TABLE vals2 (category VARCHAR(1), x INT);\n \nINSERT INTO vals2 VALUES\n (\'a\',111),(\'a\',110),(\'a\',100),\n (\'b\',\'000\'),(\'b\',001),(\'b\',011);\n \nSELECT category, BIT_AND(x), BIT_OR(x), BIT_XOR(x) \n FROM vals GROUP BY category;\n \n+----------+------------+-----------+------------+\n| category | BIT_AND(x) | BIT_OR(x) | BIT_XOR(x) |\n+----------+------------+-----------+------------+\n| a | 100 | 111 | 101 |\n| b | 0 | 11 | 10 |\n+----------+------------+-----------+------------+\n \n\n\nURL: https://mariadb.com/kb/en/bit_or/','','https://mariadb.com/kb/en/bit_or/'),(187,'BIT_XOR',16,'Syntax\n------ \nBIT_XOR(expr)\n \nDescription\n----------- \nReturns the bitwise XOR of all bits in expr. The calculation\nis performed with 64-bit (BIGINT) precision. It is an\naggregate function, and so can be used with the GROUP BY\nclause.\n \nFrom MariaDB 10.2.0, BIT_XOR() can be used as a window\nfunction.\n \nExamples\n-------- \nCREATE TABLE vals (x INT);\n \nINSERT INTO vals VALUES(111),(110),(100);\n \nSELECT BIT_AND(x), BIT_OR(x), BIT_XOR(x) FROM vals;\n \n+------------+-----------+------------+\n| BIT_AND(x) | BIT_OR(x) | BIT_XOR(x) |\n+------------+-----------+------------+\n| 100 | 111 | 101 |\n+------------+-----------+------------+\n \nAs an aggregate function:\n \nCREATE TABLE vals2 (category VARCHAR(1), x INT);\n \nINSERT INTO vals2 VALUES\n (\'a\',111),(\'a\',110),(\'a\',100),\n (\'b\',\'000\'),(\'b\',001),(\'b\',011);\n \nSELECT category, BIT_AND(x), BIT_OR(x), BIT_XOR(x) \n FROM vals GROUP BY category;\n \n+----------+------------+-----------+------------+\n| category | BIT_AND(x) | BIT_OR(x) | BIT_XOR(x) |\n+----------+------------+-----------+------------+\n| a | 100 | 111 | 101 |\n| b | 0 | 11 | 10 |\n+----------+------------+-----------+------------+\n \n\n\nURL: https://mariadb.com/kb/en/bit_xor/','','https://mariadb.com/kb/en/bit_xor/'),(188,'COUNT',16,'Syntax\n------ \nCOUNT(expr)\n \nDescription\n----------- \nReturns a count of the number of non-NULL values of expr in\nthe rows retrieved by a SELECT statement. The result is a\nBIGINT value. It is an aggregate function, and so can be\nused with the GROUP BY clause.\n \nCOUNT(*) counts the total number of rows in a table.\n \nCOUNT() returns 0 if there were no matching rows.\n \nFrom MariaDB 10.2.0, COUNT() can be used as a window\nfunction.\n \nExamples\n-------- \nCREATE TABLE student (name CHAR(10), test CHAR(10), score\nTINYINT); \n \nINSERT INTO student VALUES \n (\'Chun\', \'SQL\', 75), (\'Chun\', \'Tuning\', 73), \n (\'Esben\', \'SQL\', 43), (\'Esben\', \'Tuning\', 31), \n (\'Kaolin\', \'SQL\', 56), (\'Kaolin\', \'Tuning\', 88), \n (\'Tatiana\', \'SQL\', 87), (\'Tatiana\', \'Tuning\', 83);\n \nSELECT COUNT(*) FROM student;\n \n+----------+\n| COUNT(*) |\n+----------+\n| 8 |\n+----------+\n \nCOUNT(DISTINCT) example:\n \nSELECT COUNT(DISTINCT (name)) FROM student;\n \n+------------------------+\n| COUNT(DISTINCT (name)) |\n+------------------------+\n| 4 |\n+------------------------+\n \nAs a window function\n \nCREATE OR REPLACE TABLE student_test (name CHAR(10), test\nCHAR(10), score TINYINT);\n \nINSERT INTO student_test VALUES \n (\'Chun\', \'SQL\', 75), (\'Chun\', \'Tuning\', 73), \n (\'Esben\', \'SQL\', 43), (\'Esben\', \'Tuning\', 31), \n (\'Kaolin\', \'SQL\', 56), (\'Kaolin\', \'Tuning\', 88), \n (\'Tatiana\', \'SQL\', 87);\n \nSELECT name, test, score, COUNT(score) OVER (PARTITION BY\nname) \n AS tests_written FROM student_test;\n \n+---------+--------+-------+---------------+\n| name | test | score | tests_written |\n+---------+--------+-------+---------------+\n| Chun | SQL | 75 | 2 |\n| Chun | Tuning | 73 | 2 |\n| Esben | SQL | 43 | 2 |\n| Esben | Tuning | 31 | 2 |\n| Kaolin | SQL | 56 | 2 |\n| Kaolin | Tuning | 88 | 2 |\n| Tatiana | SQL | 87 | 1 |\n+---------+--------+-------+---------------+\n \n\n\nURL: https://mariadb.com/kb/en/count/','','https://mariadb.com/kb/en/count/'),(302,'CLOSE',23,'Syntax\n------ \nCLOSE cursor_name\n \nDescription\n----------- \nThis statement closes a previously opened cursor. The cursor\nmust have been previously opened or else an error occurs.\n \nIf not closed explicitly, a cursor is closed at the end of\nthe\ncompound statement in which it was declared.\n \nSee Cursor Overview for an example.\n \n\n\nURL: https://mariadb.com/kb/en/close/','','https://mariadb.com/kb/en/close/'),(304,'DECLARE CURSOR',23,'Syntax\n------ \n\n\nURL: https://mariadb.com/kb/en/declare-cursor/','','https://mariadb.com/kb/en/declare-cursor/'),(307,'FETCH',23,'Syntax\n------ \nFETCH cursor_name INTO var_name [, var_name] ...\n \nDescription\n----------- \nThis statement fetches the next row (if a row exists) using\nthe\nspecified open cursor, and advances the cursor pointer.\n \nvar_name can be a local variable, but not a user-defined\nvariable.\n \nIf no more rows are available, a No Data condition occurs\nwith\nSQLSTATE value 02000. To detect this condition, you can set\nup a\nhandler for it (or for a NOT FOUND condition).\n \nSee Cursor Overview for an example.\n \n\n\nURL: https://mariadb.com/kb/en/fetch/','','https://mariadb.com/kb/en/fetch/'),(309,'GOTO',23,'The GOTO statement was introduced in MariaDB 10.3 for Oracle\ncompatibility.\n \nSyntax\n------ \nGOTO label\n \nDescription\n----------- \nThe GOTO statement causes the code to jump to the specified\nlabel, and continue operating from there. It is only\naccepted when in Oracle mode.\n \nExample\n \nSET sql_mode=ORACLE;\n \nDELIMITER //\n \nCREATE OR REPLACE PROCEDURE p1 AS\n \nBEGIN\n \n SELECT 1;\n \n GOTO label;\n \n SELECT 2;\n \n SELECT 3;\n \nEND;\n \n//\n \nDELIMITER \n \ncall p1();\n+---+\n| 1 |\n+---+\n| 1 |\n+---+\n1 row in set (0.000 sec)\n \n+---+\n| 3 |\n+---+\n| 3 |\n+---+\n1 row in set (0.000 sec)\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/goto/','','https://mariadb.com/kb/en/goto/'),(190,'MAX',16,'Syntax\n------ \nMAX([DISTINCT] expr)\n \nDescription\n----------- \nReturns the largest, or maximum, value of expr. MAX() can\nalso take a string\nargument in which case it returns the maximum string value.\nThe DISTINCT\nkeyword can be used to find the maximum of the distinct\nvalues of expr,\nhowever, this produces the same result as omitting DISTINCT.\n \nNote that SET and ENUM fields are currently compared by\ntheir string value rather than their relative position in\nthe set, so MAX() may produce a different highest result\nthan ORDER BY DESC.\n \nIt is an aggregate function, and so can be used with the\nGROUP BY clause.\n \nFrom MariaDB 10.2.2, MAX() can be used as a window function.\n \nMAX() returns NULL if there were no matching rows.\n \nExamples\n-------- \nCREATE TABLE student (name CHAR(10), test CHAR(10), score\nTINYINT); \n \nINSERT INTO student VALUES \n (\'Chun\', \'SQL\', 75), (\'Chun\', \'Tuning\', 73), \n (\'Esben\', \'SQL\', 43), (\'Esben\', \'Tuning\', 31), \n (\'Kaolin\', \'SQL\', 56), (\'Kaolin\', \'Tuning\', 88), \n (\'Tatiana\', \'SQL\', 87), (\'Tatiana\', \'Tuning\', 83);\n \nSELECT name, MAX(score) FROM student GROUP BY name;\n \n+---------+------------+\n| name | MAX(score) |\n+---------+------------+\n| Chun | 75 |\n| Esben | 43 |\n| Kaolin | 88 |\n| Tatiana | 87 |\n+---------+------------+\n \nMAX string:\n \nSELECT MAX(name) FROM student;\n \n+-----------+\n| MAX(name) |\n+-----------+\n| Tatiana |\n+-----------+\n \nBe careful to avoid this common mistake, not grouping\ncorrectly and returning mismatched data: \n \nSELECT name,test,MAX(SCORE) FROM student;\n \n+------+------+------------+\n| name | test | MAX(SCORE) |\n+------+------+------------+\n| Chun | SQL | 88 |\n+------+------+------------+\n \nDifference between ORDER BY DESC and MAX():\n \nCREATE TABLE student2(name CHAR(10),grade\nENUM(\'b\',\'c\',\'a\'));\n \nINSERT INTO student2\nVALUES(\'Chun\',\'b\'),(\'Esben\',\'c\'),(\'Kaolin\',\'a\');\n \nSELECT MAX(grade) FROM student2;\n \n+------------+\n| MAX(grade) |\n+------------+\n| c |\n+------------+\n \nSELECT grade FROM student2 ORDER BY grade DESC LIMIT 1;\n \n+-------+\n| grade |\n+-------+\n| a |\n+-------+\n \nAs a window function:\n \nCREATE OR REPLACE TABLE student_test (name CHAR(10), test\nCHAR(10), score TINYINT);\nINSERT INTO student_test VALUES \n (\'Chun\', \'SQL\', 75), (\'Chun\', \'Tuning\', 73), \n (\'Esben\', \'SQL\', 43), (\'Esben\', \'Tuning\', 31), \n (\'Kaolin\', \'SQL\', 56), (\'Kaolin\', \'Tuning\', 88), \n (\'Tatiana\', \'SQL\', 87);\n \nSELECT name, test, score, MAX(score) \n OVER (PARTITION BY name) AS highest_score FROM\nstudent_test;\n \n+---------+--------+-------+---------------+\n| name | test | score | highest_score |\n+---------+--------+-------+---------------+\n| Chun | SQL | 75 | 75 |\n| Chun | Tuning | 73 | 75 |\n| Esben | SQL | 43 | 43 |\n| Esben | Tuning | 31 | 43 |\n| Kaolin | SQL | 56 | 88 |\n| Kaolin | Tuning | 88 | 88 |\n| Tatiana | SQL | 87 | 87 |\n+---------+--------+-------+---------------+\n \n\n\nURL: https://mariadb.com/kb/en/max/','','https://mariadb.com/kb/en/max/'),(191,'MIN',16,'Syntax\n------ \nMIN([DISTINCT] expr)\n \nDescription\n----------- \nReturns the minimum value of expr. MIN() may take a string\nargument, in which case it returns the minimum string value.\nThe DISTINCT\nkeyword can be used to find the minimum of the distinct\nvalues of expr,\nhowever, this produces the same result as omitting DISTINCT.\n \nNote that SET and ENUM fields are currently compared by\ntheir string value rather than their relative position in\nthe set, so MIN() may produce a different lowest result than\nORDER BY ASC.\n \nIt is an aggregate function, and so can be used with the\nGROUP BY clause.\n \nFrom MariaDB 10.2.2, MIN() can be used as a window function.\n \nMIN() returns NULL if there were no matching rows.\n \nExamples\n-------- \nCREATE TABLE student (name CHAR(10), test CHAR(10), score\nTINYINT); \n \nINSERT INTO student VALUES \n (\'Chun\', \'SQL\', 75), (\'Chun\', \'Tuning\', 73), \n (\'Esben\', \'SQL\', 43), (\'Esben\', \'Tuning\', 31), \n (\'Kaolin\', \'SQL\', 56), (\'Kaolin\', \'Tuning\', 88), \n (\'Tatiana\', \'SQL\', 87), (\'Tatiana\', \'Tuning\', 83);\n \nSELECT name, MIN(score) FROM student GROUP BY name;\n \n+---------+------------+\n| name | MIN(score) |\n+---------+------------+\n| Chun | 73 |\n| Esben | 31 |\n| Kaolin | 56 |\n| Tatiana | 83 |\n+---------+------------+\n \nMIN() with a string:\n \nSELECT MIN(name) FROM student;\n \n+-----------+\n| MIN(name) |\n+-----------+\n| Chun |\n+-----------+\n \nBe careful to avoid this common mistake, not grouping\ncorrectly and returning mismatched data: \n \nSELECT name,test,MIN(score) FROM student;\n \n+------+------+------------+\n| name | test | MIN(score) |\n+------+------+------------+\n| Chun | SQL | 31 |\n+------+------+------------+\n \nDifference between ORDER BY ASC and MIN():\n \nCREATE TABLE student2(name CHAR(10),grade\nENUM(\'b\',\'c\',\'a\'));\n \nINSERT INTO student2\nVALUES(\'Chun\',\'b\'),(\'Esben\',\'c\'),(\'Kaolin\',\'a\');\n \nSELECT MIN(grade) FROM student2;\n \n+------------+\n| MIN(grade) |\n+------------+\n| a |\n+------------+\n \nSELECT grade FROM student2 ORDER BY grade ASC LIMIT 1;\n \n+-------+\n| grade |\n+-------+\n| b |\n+-------+\n \nAs a window function:\n \nCREATE OR REPLACE TABLE student_test (name CHAR(10), test\nCHAR(10), score TINYINT);\nINSERT INTO student_test VALUES \n (\'Chun\', \'SQL\', 75), (\'Chun\', \'Tuning\', 73), \n (\'Esben\', \'SQL\', 43), (\'Esben\', \'Tuning\', 31), \n (\'Kaolin\', \'SQL\', 56), (\'Kaolin\', \'Tuning\', 88), \n (\'Tatiana\', \'SQL\', 87);\n \nSELECT name, test, score, MIN(score) \n OVER (PARTITION BY name) AS lowest_score FROM student_test;\n \n+---------+--------+-------+--------------+\n| name | test | score | lowest_score |\n+---------+--------+-------+--------------+\n| Chun | SQL | 75 | 73 |\n| Chun | Tuning | 73 | 73 |\n| Esben | SQL | 43 | 31 |\n| Esben | Tuning | 31 | 31 |\n| Kaolin | SQL | 56 | 56 |\n| Kaolin | Tuning | 88 | 56 |\n| Tatiana | SQL | 87 | 87 |\n+---------+--------+-------+--------------+\n \n\n\nURL: https://mariadb.com/kb/en/min/','','https://mariadb.com/kb/en/min/'),(310,'IF',23,'Syntax\n------ \nIF search_condition THEN statement_list\n [ELSEIF search_condition THEN statement_list] ...\n [ELSE statement_list]\nEND IF;\n \nDescription\n----------- \nIF implements a basic conditional construct. If the\nsearch_condition\nevaluates to true, the corresponding SQL statement list is\nexecuted.\nIf no search_condition matches, the statement list in the\nELSE clause\nis executed. Each statement_list consists of one or more\nstatements.\n \n\n\nURL: https://mariadb.com/kb/en/if/','','https://mariadb.com/kb/en/if/'),(311,'ITERATE',23,'Syntax\n------ \nITERATE label\n \nITERATE can appear only within LOOP, REPEAT, and WHILE\nstatements.\nITERATE means \"do the loop again\", and uses the\nstatement\'s label to determine which statements to repeat.\nThe label must be in the same stored program, not in a\ncaller procedure.\n \nIf you try to use ITERATE with a non-existing label, or if\nthe label is associated to a construct which is not a loop,\nthe following error will be produced:\n \nERROR 1308 (42000): ITERATE with no matching label: \n \nBelow is an example of how ITERATE might be used:\n \nCREATE PROCEDURE doiterate(p1 INT)\nBEGIN\n label1: LOOP\n SET p1 = p1 + 1;\n \n IF p1 \n\nURL: https://mariadb.com/kb/en/iterate/','','https://mariadb.com/kb/en/iterate/'),(314,'LOOP',23,'Syntax\n------ \n[begin_label:] LOOP\n statement_list\nEND LOOP [end_label]\n \nDescription\n----------- \nLOOP implements a simple loop construct, enabling repeated\nexecution\nof the statement list, which consists of one or more\nstatements, each\nterminated by a semicolon (i.e., ;) statement delimiter. The\nstatements\nwithin the loop are repeated until the loop is exited;\nusually this is\naccomplished with a LEAVE statement.\n \nA LOOP statement can be labeled. end_label cannot be given\nunless\nbegin_label also is present. If both are present, they must\nbe the\nsame.\n \nSee Delimiters in the mysql client for more on delimiter\nusage in the client.\n \n\n\nURL: https://mariadb.com/kb/en/loop/','','https://mariadb.com/kb/en/loop/'),(192,'STD',16,'Syntax\n------ \nSTD(expr)\n \nDescription\n----------- \nReturns the population standard deviation of expr. This is\nan extension\nto standard SQL. The standard SQL function STDDEV_POP() can\nbe used instead. \n \nIt is an aggregate function, and so can be used with the\nGROUP BY clause.\n \nFrom MariaDB 10.2.2, STD() can be used as a window function.\n \nThis function returns NULL if there were no matching rows.\n \nExamples\n-------- \nAs an aggregate function:\n \nCREATE OR REPLACE TABLE stats (category VARCHAR(2), x INT);\n \nINSERT INTO stats VALUES \n (\'a\',1),(\'a\',2),(\'a\',3),\n (\'b\',11),(\'b\',12),(\'b\',20),(\'b\',30),(\'b\',60);\n \nSELECT category, STDDEV_POP(x), STDDEV_SAMP(x), VAR_POP(x) \n FROM stats GROUP BY category;\n \n+----------+---------------+----------------+------------+\n| category | STDDEV_POP(x) | STDDEV_SAMP(x) | VAR_POP(x) |\n+----------+---------------+----------------+------------+\n| a | 0.8165 | 1.0000 | 0.6667 |\n| b | 18.0400 | 20.1693 | 325.4400 |\n+----------+---------------+----------------+------------+\n \nAs a window function:\n \nCREATE OR REPLACE TABLE student_test (name CHAR(10), test\nCHAR(10), score TINYINT);\n \nINSERT INTO student_test VALUES \n (\'Chun\', \'SQL\', 75), (\'Chun\', \'Tuning\', 73), \n (\'Esben\', \'SQL\', 43), (\'Esben\', \'Tuning\', 31), \n (\'Kaolin\', \'SQL\', 56), (\'Kaolin\', \'Tuning\', 88), \n (\'Tatiana\', \'SQL\', 87);\n \nSELECT name, test, score, STDDEV_POP(score) \n OVER (PARTITION BY test) AS stddev_results FROM\nstudent_test;\n \n+---------+--------+-------+----------------+\n| name | test | score | stddev_results |\n+---------+--------+-------+----------------+\n| Chun | SQL | 75 | 16.9466 |\n| Chun | Tuning | 73 | 24.1247 |\n| Esben | SQL | 43 | 16.9466 |\n| Esben | Tuning | 31 | 24.1247 |\n| Kaolin | SQL | 56 | 16.9466 |\n| Kaolin | Tuning | 88 | 24.1247 |\n| Tatiana | SQL | 87 | 16.9466 |\n+---------+--------+-------+----------------+\n \n\n\nURL: https://mariadb.com/kb/en/std/','','https://mariadb.com/kb/en/std/'),(193,'STDDEV',16,'Syntax\n------ \nSTDDEV(expr)\n \nDescription\n----------- \nReturns the population standard deviation of expr. This\nfunction is\nprovided for compatibility with Oracle. The standard SQL\nfunction\nSTDDEV_POP() can be used instead.\n \nIt is an aggregate function, and so can be used with the\nGROUP BY clause.\n \nFrom MariaDB 10.2.2, STDDEV() can be used as a window\nfunction.\n \nThis function returns NULL if there were no matching rows.\n \nExamples\n-------- \nAs an aggregate function:\n \nCREATE OR REPLACE TABLE stats (category VARCHAR(2), x INT);\n \nINSERT INTO stats VALUES \n (\'a\',1),(\'a\',2),(\'a\',3),\n (\'b\',11),(\'b\',12),(\'b\',20),(\'b\',30),(\'b\',60);\n \nSELECT category, STDDEV_POP(x), STDDEV_SAMP(x), VAR_POP(x) \n FROM stats GROUP BY category;\n \n+----------+---------------+----------------+------------+\n| category | STDDEV_POP(x) | STDDEV_SAMP(x) | VAR_POP(x) |\n+----------+---------------+----------------+------------+\n| a | 0.8165 | 1.0000 | 0.6667 |\n| b | 18.0400 | 20.1693 | 325.4400 |\n+----------+---------------+----------------+------------+\n \nAs a window function:\n \nCREATE OR REPLACE TABLE student_test (name CHAR(10), test\nCHAR(10), score TINYINT);\n \nINSERT INTO student_test VALUES \n (\'Chun\', \'SQL\', 75), (\'Chun\', \'Tuning\', 73), \n (\'Esben\', \'SQL\', 43), (\'Esben\', \'Tuning\', 31), \n (\'Kaolin\', \'SQL\', 56), (\'Kaolin\', \'Tuning\', 88), \n (\'Tatiana\', \'SQL\', 87);\n \nSELECT name, test, score, STDDEV_POP(score) \n OVER (PARTITION BY test) AS stddev_results FROM\nstudent_test;\n \n+---------+--------+-------+----------------+\n| name | test | score | stddev_results |\n+---------+--------+-------+----------------+\n| Chun | SQL | 75 | 16.9466 |\n| Chun | Tuning | 73 | 24.1247 |\n| Esben | SQL | 43 | 16.9466 |\n| Esben | Tuning | 31 | 24.1247 |\n| Kaolin | SQL | 56 | 16.9466 |\n| Kaolin | Tuning | 88 | 24.1247 |\n| Tatiana | SQL | 87 | 16.9466 |\n+---------+--------+-------+----------------+\n \n\n\nURL: https://mariadb.com/kb/en/stddev/','','https://mariadb.com/kb/en/stddev/'),(194,'STDDEV_POP',16,'Syntax\n------ \nSTDDEV_POP(expr)\n \nDescription\n----------- \nReturns the population standard deviation of expr (the\nsquare root of\nVAR_POP()). You can also use STD() or\nSTDDEV(), which are equivalent but not standard SQL.\n \nIt is an aggregate function, and so can be used with the\nGROUP BY clause.\n \nFrom MariaDB 10.2.2, STDDEV_POP() can be used as a window\nfunction.\n \nSTDDEV_POP() returns NULL if there were no matching rows.\n \nExamples\n-------- \nAs an aggregate function:\n \nCREATE OR REPLACE TABLE stats (category VARCHAR(2), x INT);\n \nINSERT INTO stats VALUES \n (\'a\',1),(\'a\',2),(\'a\',3),\n (\'b\',11),(\'b\',12),(\'b\',20),(\'b\',30),(\'b\',60);\n \nSELECT category, STDDEV_POP(x), STDDEV_SAMP(x), VAR_POP(x) \n FROM stats GROUP BY category;\n \n+----------+---------------+----------------+------------+\n| category | STDDEV_POP(x) | STDDEV_SAMP(x) | VAR_POP(x) |\n+----------+---------------+----------------+------------+\n| a | 0.8165 | 1.0000 | 0.6667 |\n| b | 18.0400 | 20.1693 | 325.4400 |\n+----------+---------------+----------------+------------+\n \nAs a window function:\n \nCREATE OR REPLACE TABLE student_test (name CHAR(10), test\nCHAR(10), score TINYINT);\n \nINSERT INTO student_test VALUES \n (\'Chun\', \'SQL\', 75), (\'Chun\', \'Tuning\', 73), \n (\'Esben\', \'SQL\', 43), (\'Esben\', \'Tuning\', 31), \n (\'Kaolin\', \'SQL\', 56), (\'Kaolin\', \'Tuning\', 88), \n (\'Tatiana\', \'SQL\', 87);\n \nSELECT name, test, score, STDDEV_POP(score) \n OVER (PARTITION BY test) AS stddev_results FROM\nstudent_test;\n \n+---------+--------+-------+----------------+\n| name | test | score | stddev_results |\n+---------+--------+-------+----------------+\n| Chun | SQL | 75 | 16.9466 |\n| Chun | Tuning | 73 | 24.1247 |\n| Esben | SQL | 43 | 16.9466 |\n| Esben | Tuning | 31 | 24.1247 |\n| Kaolin | SQL | 56 | 16.9466 |\n| Kaolin | Tuning | 88 | 24.1247 |\n| Tatiana | SQL | 87 | 16.9466 |\n+---------+--------+-------+----------------+\n \n\n\nURL: https://mariadb.com/kb/en/stddev_pop/','','https://mariadb.com/kb/en/stddev_pop/'),(315,'OPEN',23,'Syntax\n------ \n\n\nURL: https://mariadb.com/kb/en/open/','','https://mariadb.com/kb/en/open/'),(318,'RETURN',23,'Syntax\n------ \nRETURN expr \n \nThe RETURN statement terminates execution of a stored\nfunction and\nreturns the value expr to the function caller. There must be\nat least\none RETURN statement in a stored function. If the function\nhas multiple exit points, all exit points must have a\nRETURN.\n \nThis statement is not used in stored procedures, triggers,\nor events. LEAVE can be used instead.\n \nThe following example shows that RETURN can return the\nresult of a scalar subquery:\n \nCREATE FUNCTION users_count() RETURNS BOOL\n READS SQL DATA\nBEGIN\n RETURN (SELECT COUNT(DISTINCT User) FROM mysql.user);\nEND;\n \n\n \n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/return/','','https://mariadb.com/kb/en/return/'),(321,'WHILE',23,'Syntax\n------ \n[begin_label:] WHILE search_condition DO\n statement_list\nEND WHILE [end_label]\n \nDescription\n----------- \nThe statement list within a WHILE statement is repeated as\nlong as the\nsearch_condition is true. statement_list consists of one or\nmore\nstatements. If the loop must be executed at least once,\nREPEAT ... LOOP can be used instead.\n \nA WHILE statement can be labeled. end_label cannot be given\nunless\nbegin_label also is present. If both are present, they must\nbe the\nsame.\n \nExamples\n-------- \nCREATE PROCEDURE dowhile()\nBEGIN\n DECLARE v1 INT DEFAULT 5;\n \n WHILE v1 > 0 DO\n ...\n SET v1 = v1 - 1;\n \n END WHILE;\n \nEND\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/while/','','https://mariadb.com/kb/en/while/'),(196,'SUM',16,'Syntax\n------ \nSUM([DISTINCT] expr)\n \nDescription\n----------- \nReturns the sum of expr. If the return set has no rows,\nSUM() returns\nNULL. The DISTINCT keyword can be used to sum only the\ndistinct values\nof expr.\n \nFrom MariaDB 10.2.0, SUM() can be used as a window function,\nalthough not with the DISTINCT specifier.\n \nExamples\n-------- \nCREATE TABLE sales (sales_value INT);\nINSERT INTO sales VALUES(10),(20),(20),(40);\n \nSELECT SUM(sales_value) FROM sales;\n \n+------------------+\n| SUM(sales_value) |\n+------------------+\n| 90 |\n+------------------+\n \nSELECT SUM(DISTINCT(sales_value)) FROM sales;\n \n+----------------------------+\n| SUM(DISTINCT(sales_value)) |\n+----------------------------+\n| 70 |\n+----------------------------+\n \nCommonly, SUM is used with a GROUP BY clause:\n \nCREATE TABLE sales (name CHAR(10), month CHAR(10), units\nINT);\n \nINSERT INTO sales VALUES \n (\'Chun\', \'Jan\', 75), (\'Chun\', \'Feb\', 73),\n (\'Esben\', \'Jan\', 43), (\'Esben\', \'Feb\', 31),\n (\'Kaolin\', \'Jan\', 56), (\'Kaolin\', \'Feb\', 88),\n (\'Tatiana\', \'Jan\', 87), (\'Tatiana\', \'Feb\', 83);\n \nSELECT name, SUM(units) FROM sales GROUP BY name;\n \n+---------+------------+\n| name | SUM(units) |\n+---------+------------+\n| Chun | 148 |\n| Esben | 74 |\n| Kaolin | 144 |\n| Tatiana | 170 |\n+---------+------------+\n \nThe GROUP BY clause is required when using an aggregate\nfunction along with regular column data, otherwise the\nresult will be a mismatch, as in the following common type\nof mistake:\n \nSELECT name,SUM(units) FROM sales\n;\n+------+------------+\n| name | SUM(units) |\n+------+------------+\n| Chun | 536 |\n+------+------------+\n \nAs a window function:\n \nCREATE OR REPLACE TABLE student_test (name CHAR(10), test\nCHAR(10), score TINYINT);\nINSERT INTO student_test VALUES \n (\'Chun\', \'SQL\', 75), (\'Chun\', \'Tuning\', 73), \n (\'Esben\', \'SQL\', 43), (\'Esben\', \'Tuning\', 31), \n (\'Kaolin\', \'SQL\', 56), (\'Kaolin\', \'Tuning\', 88), \n (\'Tatiana\', \'SQL\', 87);\n \nSELECT name, test, score, SUM(score) OVER (PARTITION BY\nname) AS total_score FROM student_test;\n \n+---------+--------+-------+-------------+\n| name | test | score | total_score |\n+---------+--------+-------+-------------+\n| Chun | SQL | 75 | 148 |\n| Chun | Tuning | 73 | 148 |\n| Esben | SQL | 43 | 74 |\n| Esben | Tuning | 31 | 74 |\n| Kaolin | SQL | 56 | 144 |\n| Kaolin | Tuning | 88 | 144 |\n| Tatiana | SQL | 87 | 87 |\n+---------+--------+-------+-------------+\n \n\n\nURL: https://mariadb.com/kb/en/sum/','','https://mariadb.com/kb/en/sum/'),(197,'VARIANCE',16,'Syntax\n------ \nVARIANCE(expr) \n \nDescription\n----------- \nReturns the population standard variance of expr. This is an\nextension to\nstandard SQL. The standard SQL function VAR_POP() can be\nused\ninstead.\n \nVariance is calculated by\nworking out the mean for the set\nfor each number, subtracting the mean and squaring the\nresult\ncalculate the average of the resulting differences\n \nIt is an aggregate function, and so can be used with the\nGROUP BY clause.\n \nFrom MariaDB 10.2.2, VARIANCE() can be used as a window\nfunction.\n \nVARIANCE() returns NULL if there were no matching rows.\n \nExamples\n-------- \nCREATE TABLE v(i tinyint);\n \nINSERT INTO v VALUES(101),(99);\n \nSELECT VARIANCE(i) FROM v;\n \n+-------------+\n| VARIANCE(i) |\n+-------------+\n| 1.0000 |\n+-------------+\n \nINSERT INTO v VALUES(120),(80);\n \nSELECT VARIANCE(i) FROM v;\n \n+-------------+\n| VARIANCE(i) |\n+-------------+\n| 200.5000 |\n+-------------+\n \nAs an aggregate function:\n \nCREATE OR REPLACE TABLE stats (category VARCHAR(2), x INT);\n \nINSERT INTO stats VALUES \n (\'a\',1),(\'a\',2),(\'a\',3),\n (\'b\',11),(\'b\',12),(\'b\',20),(\'b\',30),(\'b\',60);\n \nSELECT category, STDDEV_POP(x), STDDEV_SAMP(x), VAR_POP(x) \n FROM stats GROUP BY category;\n \n+----------+---------------+----------------+------------+\n| category | STDDEV_POP(x) | STDDEV_SAMP(x) | VAR_POP(x) |\n+----------+---------------+----------------+------------+\n| a | 0.8165 | 1.0000 | 0.6667 |\n| b | 18.0400 | 20.1693 | 325.4400 |\n+----------+---------------+----------------+------------+\n \nAs a window function:\n \nCREATE OR REPLACE TABLE student_test (name CHAR(10), test\nCHAR(10), score TINYINT);\n \nINSERT INTO student_test VALUES \n (\'Chun\', \'SQL\', 75), (\'Chun\', \'Tuning\', 73), \n (\'Esben\', \'SQL\', 43), (\'Esben\', \'Tuning\', 31), \n (\'Kaolin\', \'SQL\', 56), (\'Kaolin\', \'Tuning\', 88), \n (\'Tatiana\', \'SQL\', 87);\n \nSELECT name, test, score, VAR_POP(score) \n OVER (PARTITION BY test) AS variance_results FROM\nstudent_test;\n \n+---------+--------+-------+------------------+\n| name | test | score | variance_results |\n+---------+--------+-------+------------------+\n| Chun | SQL | 75 | 287.1875 |\n| Chun | Tuning | 73 | 582.0000 |\n| Esben | SQL | 43 | 287.1875 |\n| Esben | Tuning | 31 | 582.0000 |\n| Kaolin | SQL | 56 | 287.1875 |\n| Kaolin | Tuning | 88 | 582.0000 |\n| Tatiana | SQL | 87 | 287.1875 |\n+---------+--------+-------+------------------+\n \n\n\nURL: https://mariadb.com/kb/en/variance/','','https://mariadb.com/kb/en/variance/'),(322,'BUFFER',24,'A synonym for ST_BUFFER.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/buffer/','','https://mariadb.com/kb/en/buffer/'),(323,'CONVEXHULL',24,'A synonym for ST_CONVEXHULL.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/convexhull/','','https://mariadb.com/kb/en/convexhull/'),(324,'GEOMETRYCOLLECTION',24,'Syntax\n------ \nGeometryCollection(g1,g2,...)\n \nDescription\n----------- \nConstructs a WKB GeometryCollection. If any argument is not\na well-formed WKB representation of a geometry, the return\nvalue is NULL.\n \nExamples\n-------- \nCREATE TABLE gis_geometrycollection (g GEOMETRYCOLLECTION);\nSHOW FIELDS FROM gis_geometrycollection;\n \nINSERT INTO gis_geometrycollection VALUES\n (GeomCollFromText(\'GEOMETRYCOLLECTION(POINT(0 0),\nLINESTRING(0 0,10 10))\')),\n (GeometryFromWKB(AsWKB(GeometryCollection(Point(44, 6),\nLineString(Point(3, 6), Point(7, 9)))))),\n (GeomFromText(\'GeometryCollection()\')),\n (GeomFromText(\'GeometryCollection EMPTY\'));\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/geometrycollection/','','https://mariadb.com/kb/en/geometrycollection/'),(326,'MULTILINESTRING',24,'Syntax\n------ \nMultiLineString(ls1,ls2,...)\n \nDescription\n----------- \nConstructs a WKB MultiLineString value using WKB LineString\narguments. If any argument is not a WKB LineString, the\nreturn value is\nNULL.\n \nExample\n \nCREATE TABLE gis_multi_line (g MULTILINESTRING);\nINSERT INTO gis_multi_line VALUES\n (MultiLineStringFromText(\'MULTILINESTRING((10 48,10 21,10\n0),(16 0,16 23,16 48))\')),\n (MLineFromText(\'MULTILINESTRING((10 48,10 21,10 0))\')),\n (MLineFromWKB(AsWKB(MultiLineString(LineString(Point(1, 2),\nPoint(3, 5)), LineString(Point(2, 5),Point(5, 8),Point(21,\n7))))));\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/multilinestring/','','https://mariadb.com/kb/en/multilinestring/'),(327,'MULTIPOINT',24,'Syntax\n------ \nMultiPoint(pt1,pt2,...)\n \nDescription\n----------- \nConstructs a WKB MultiPoint value using WKB Point arguments.\nIf any argument is not a WKB Point, the return value is\nNULL.\n \nExamples\n-------- \nSET @g = ST_GEOMFROMTEXT(\'MultiPoint( 1 1, 2 2, 5 3, 7 2, 9\n3, 8 4, 6 6, 6 9, 4 9, 1 5 )\');\n \nCREATE TABLE gis_multi_point (g MULTIPOINT);\nINSERT INTO gis_multi_point VALUES\n (MultiPointFromText(\'MULTIPOINT(0 0,10 10,10 20,20\n20)\')),\n (MPointFromText(\'MULTIPOINT(1 1,11 11,11 21,21 21)\')),\n (MPointFromWKB(AsWKB(MultiPoint(Point(3, 6), Point(4,\n10)))));\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/multipoint/','','https://mariadb.com/kb/en/multipoint/'),(198,'VAR_POP',16,'Syntax\n------ \nVAR_POP(expr)\n \nDescription\n----------- \nReturns the population standard variance of expr. It\nconsiders rows as\nthe whole population, not as a sample, so it has the number\nof rows as\nthe denominator. You can also use VARIANCE(), which is\nequivalent but\nis not standard SQL.\n \nVariance is calculated by\nworking out the mean for the set\nfor each number, subtracting the mean and squaring the\nresult\ncalculate the average of the resulting differences\n \nIt is an aggregate function, and so can be used with the\nGROUP BY clause.\n \nFrom MariaDB 10.2.2, VAR_POP() can be used as a window\nfunction.\n \nVAR_POP() returns NULL if there were no matching rows.\n \nExamples\n-------- \nCREATE TABLE v(i tinyint);\n \nINSERT INTO v VALUES(101),(99);\n \nSELECT VAR_POP(i) FROM v;\n \n+------------+\n| VAR_POP(i) |\n+------------+\n| 1.0000 |\n+------------+\n \nINSERT INTO v VALUES(120),(80);\n \nSELECT VAR_POP(i) FROM v;\n \n+------------+\n| VAR_POP(i) |\n+------------+\n| 200.5000 |\n+------------+\n \nAs an aggregate function:\n \nCREATE OR REPLACE TABLE stats (category VARCHAR(2), x INT);\n \nINSERT INTO stats VALUES \n (\'a\',1),(\'a\',2),(\'a\',3),\n (\'b\',11),(\'b\',12),(\'b\',20),(\'b\',30),(\'b\',60);\n \nSELECT category, STDDEV_POP(x), STDDEV_SAMP(x), VAR_POP(x) \n FROM stats GROUP BY category;\n \n+----------+---------------+----------------+------------+\n| category | STDDEV_POP(x) | STDDEV_SAMP(x) | VAR_POP(x) |\n+----------+---------------+----------------+------------+\n| a | 0.8165 | 1.0000 | 0.6667 |\n| b | 18.0400 | 20.1693 | 325.4400 |\n+----------+---------------+----------------+------------+\n \nAs a window function:\n \nCREATE OR REPLACE TABLE student_test (name CHAR(10), test\nCHAR(10), score TINYINT);\n \nINSERT INTO student_test VALUES \n (\'Chun\', \'SQL\', 75), (\'Chun\', \'Tuning\', 73), \n (\'Esben\', \'SQL\', 43), (\'Esben\', \'Tuning\', 31), \n (\'Kaolin\', \'SQL\', 56), (\'Kaolin\', \'Tuning\', 88), \n (\'Tatiana\', \'SQL\', 87);\n \nSELECT name, test, score, VAR_POP(score) \n OVER (PARTITION BY test) AS variance_results FROM\nstudent_test;\n \n+---------+--------+-------+------------------+\n| name | test | score | variance_results |\n+---------+--------+-------+------------------+\n| Chun | SQL | 75 | 287.1875 |\n| Chun | Tuning | 73 | 582.0000 |\n| Esben | SQL | 43 | 287.1875 |\n| Esben | Tuning | 31 | 582.0000 |\n| Kaolin | SQL | 56 | 287.1875 |\n| Kaolin | Tuning | 88 | 582.0000 |\n| Tatiana | SQL | 87 | 287.1875 |\n+---------+--------+-------+------------------+\n \n\n\nURL: https://mariadb.com/kb/en/var_pop/','','https://mariadb.com/kb/en/var_pop/'),(199,'VAR_SAMP',16,'Syntax\n------ \nVAR_SAMP(expr)\n \nDescription\n----------- \nReturns the sample variance of expr. That is, the\ndenominator is the number of rows minus one.\n \nIt is an aggregate function, and so can be used with the\nGROUP BY clause.\n \nFrom MariaDB 10.2.2, VAR_SAMP() can be used as a window\nfunction.\n \nVAR_SAMP() returns NULL if there were no matching rows.\n \nExamples\n-------- \nAs an aggregate function:\n \nCREATE OR REPLACE TABLE stats (category VARCHAR(2), x INT);\n \nINSERT INTO stats VALUES \n (\'a\',1),(\'a\',2),(\'a\',3),\n (\'b\',11),(\'b\',12),(\'b\',20),(\'b\',30),(\'b\',60);\n \nSELECT category, STDDEV_POP(x), STDDEV_SAMP(x), VAR_POP(x) \n FROM stats GROUP BY category;\n \n+----------+---------------+----------------+------------+\n| category | STDDEV_POP(x) | STDDEV_SAMP(x) | VAR_POP(x) |\n+----------+---------------+----------------+------------+\n| a | 0.8165 | 1.0000 | 0.6667 |\n| b | 18.0400 | 20.1693 | 325.4400 |\n+----------+---------------+----------------+------------+\n \nAs a window function:\n \nCREATE OR REPLACE TABLE student_test (name CHAR(10), test\nCHAR(10), score TINYINT);\n \nINSERT INTO student_test VALUES \n (\'Chun\', \'SQL\', 75), (\'Chun\', \'Tuning\', 73), \n (\'Esben\', \'SQL\', 43), (\'Esben\', \'Tuning\', 31), \n (\'Kaolin\', \'SQL\', 56), (\'Kaolin\', \'Tuning\', 88), \n (\'Tatiana\', \'SQL\', 87);\n \nSELECT name, test, score, VAR_SAMP(score) \n OVER (PARTITION BY test) AS variance_results FROM\nstudent_test;\n \n+---------+--------+-------+------------------+\n| name | test | score | variance_results |\n+---------+--------+-------+------------------+\n| Chun | SQL | 75 | 382.9167 |\n| Chun | Tuning | 73 | 873.0000 |\n| Esben | SQL | 43 | 382.9167 |\n| Esben | Tuning | 31 | 873.0000 |\n| Kaolin | SQL | 56 | 382.9167 |\n| Kaolin | Tuning | 88 | 873.0000 |\n| Tatiana | SQL | 87 | 382.9167 |\n+---------+--------+-------+------------------+\n \n\n\nURL: https://mariadb.com/kb/en/var_samp/','','https://mariadb.com/kb/en/var_samp/'),(202,'CHARSET',17,'Syntax\n------ \nCHARSET(str)\n \nDescription\n----------- \nReturns the character set of the string argument. If str is\nnot a string, it is considered as a binary string (so the\nfunction returns \'binary\'). This applies to NULL, too. The\nreturn value is a string in the utf8 character set.\n \nExamples\n-------- \nSELECT CHARSET(\'abc\');\n+----------------+\n| CHARSET(\'abc\') |\n+----------------+\n| latin1 |\n+----------------+\n \nSELECT CHARSET(CONVERT(\'abc\' USING utf8));\n+------------------------------------+\n| CHARSET(CONVERT(\'abc\' USING utf8)) |\n+------------------------------------+\n| utf8 |\n+------------------------------------+\n \nSELECT CHARSET(USER());\n+-----------------+\n| CHARSET(USER()) |\n+-----------------+\n| utf8 |\n+-----------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/charset/','','https://mariadb.com/kb/en/charset/'),(328,'MULTIPOLYGON',24,'Syntax\n------ \nMultiPolygon(poly1,poly2,...)\n \nDescription\n----------- \nConstructs a WKB MultiPolygon value from a set of WKB\nPolygon arguments. If any argument is not a WKB Polygon, the\nreturn value is NULL.\n \nExample\n \nCREATE TABLE gis_multi_polygon (g MULTIPOLYGON);\nINSERT INTO gis_multi_polygon VALUES\n (MultiPolygonFromText(\'MULTIPOLYGON(((28 26,28 0,84 0,84\n42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67\n13,59 13,59 18)))\')),\n (MPolyFromText(\'MULTIPOLYGON(((28 26,28 0,84 0,84 42,28\n26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59\n13,59 18)))\')),\n (MPolyFromWKB(AsWKB(MultiPolygon(Polygon(LineString(Point(0,\n3), Point(3, 3), Point(3, 0), Point(0, 3)))))));\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/multipolygon/','','https://mariadb.com/kb/en/multipolygon/'),(329,'POINT',24,'Syntax\n------ \nPoint(x,y)\n \nDescription\n----------- \nConstructs a WKB Point using the given coordinates.\n \nExamples\n-------- \nSET @g = ST_GEOMFROMTEXT(\'Point(1 1)\');\n \nCREATE TABLE gis_point (g POINT);\nINSERT INTO gis_point VALUES\n (PointFromText(\'POINT(10 10)\')),\n (PointFromText(\'POINT(20 10)\')),\n (PointFromText(\'POINT(20 20)\')),\n (PointFromWKB(AsWKB(PointFromText(\'POINT(10 20)\'))));\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/point/','','https://mariadb.com/kb/en/point/'),(330,'PointOnSurface',24,'A synonym for ST_PointOnSurface.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/pointonsurface/','','https://mariadb.com/kb/en/pointonsurface/'),(334,'ST_INTERSECTION',24,'Syntax\n------ \nST_INTERSECTION(g1,g2)\n \nDescription\n----------- \nReturns a geometry that is the intersection, or shared\nportion, of geometry g1 and geometry g2.\n \nExamples\n-------- \nSET @g1 = ST_GEOMFROMTEXT(\'POINT(2 1)\');\n \nSET @g2 = ST_GEOMFROMTEXT(\'LINESTRING(2 1, 0 2)\');\n \nSELECT ASTEXT(ST_INTERSECTION(@g1,@g2));\n+----------------------------------+\n| ASTEXT(ST_INTERSECTION(@g1,@g2)) |\n+----------------------------------+\n| POINT(2 1) |\n+----------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_intersection/','','https://mariadb.com/kb/en/st_intersection/'),(203,'COERCIBILITY',17,'Syntax\n------ \nCOERCIBILITY(str)\n \nDescription\n----------- \nReturns the collation coercibility value of the string\nargument. Coercibility defines what will be converted to\nwhat in case of collation conflict, with an expression with\nhigher coercibility being converted to the collation of an\nexpression with lower coercibility.\n \nCoercibility | Description | Example | \n \n0 | Explicit | Value using a COLLATE clause | \n \n1 | No collation | Concatenated strings using different\ncollations | \n \n2 | Implicit | Column value | \n \n3 | Constant | USER() return value | \n \n4 | Coercible | Literal string | \n \n5 | Ignorable | NULL or derived from NULL | \n \nExamples\n-------- \nSELECT COERCIBILITY(\'abc\' COLLATE latin1_swedish_ci);\n+-----------------------------------------------+\n| COERCIBILITY(\'abc\' COLLATE latin1_swedish_ci) |\n+-----------------------------------------------+\n| 0 |\n+-----------------------------------------------+\n \nSELECT COERCIBILITY(USER());\n+----------------------+\n| COERCIBILITY(USER()) |\n+----------------------+\n| 3 |\n+----------------------+\n \nSELECT COERCIBILITY(\'abc\');\n+---------------------+\n| COERCIBILITY(\'abc\') |\n+---------------------+\n| 4 |\n+---------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/coercibility/','','https://mariadb.com/kb/en/coercibility/'),(206,'CURRENT_ROLE',17,'Roles were introduced in MariaDB 10.0.5.\n \nSyntax\n------ \nCURRENT_ROLE, CURRENT_ROLE()\n \nDescription\n----------- \nReturns the current role name. This determines your access\nprivileges. The return value is a string in the\nutf8 character set.\n \nIf there is no current role, NULL is returned.\n \nThe output of SELECT CURRENT_ROLE is equivalent to the\ncontents of the ENABLED_ROLES Information Schema table.\n \nUSER() returns the combination of user and host used to\nlogin. CURRENT_USER() returns the account used to determine\ncurrent connection\'s privileges.\n \nExamples\n-------- \nSELECT CURRENT_ROLE;\n \n+--------------+\n| CURRENT_ROLE |\n+--------------+\n| NULL |\n+--------------+\n \nSET ROLE staff;\n \nSELECT CURRENT_ROLE;\n \n+--------------+\n| CURRENT_ROLE |\n+--------------+\n| staff |\n+--------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/current_role/','','https://mariadb.com/kb/en/current_role/'),(207,'CURRENT_USER',17,'Syntax\n------ \nCURRENT_USER, CURRENT_USER()\n \nDescription\n----------- \nReturns the user name and host name combination for the\nMariaDB account\nthat the server used to authenticate the current client.\nThis account\ndetermines your access privileges. The return value is a\nstring in the\nutf8 character set.\n \nThe value of CURRENT_USER() can differ from the value of\nUSER(). CURRENT_ROLE() returns the current active role.\n \nExamples\n-------- \nshell> mysql --user=\"anonymous\"\n \nMariaDB [(none)]> select user(),current_user();\n+---------------------+----------------+\n| user() | current_user() |\n+---------------------+----------------+\n| anonymous@localhost | @localhost |\n+---------------------+----------------+\n \nWhen calling CURRENT_USER() in a stored procedure, it\nreturns the owner of the stored procedure, as defined with\nDEFINER.\n \n\n\nURL: https://mariadb.com/kb/en/current_user/','','https://mariadb.com/kb/en/current_user/'),(208,'DATABASE',17,'Syntax\n------ \nDATABASE()\n \nDescription\n----------- \nReturns the default (current) database name as a string in\nthe utf8 character set. If there is no default database,\nDATABASE() returns NULL. Within a stored routine, the\ndefault database is the database that the routine is\nassociated with, which is not necessarily the same as the\ndatabase that is the default in the calling context.\n \nSCHEMA() is a synonym for DATABASE().\n \nTo select a default database, the USE statement can be run.\nAnother way to set the default database is specifying its\nname at mysql command line client startup.\n \nExamples\n-------- \nSELECT DATABASE();\n+------------+\n| DATABASE() |\n+------------+\n| NULL |\n+------------+\n \nUSE test;\n \nDatabase changed\n \nSELECT DATABASE();\n+------------+\n| DATABASE() |\n+------------+\n| test |\n+------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/database/','','https://mariadb.com/kb/en/database/'),(210,'DEFAULT',17,'Syntax\n------ \nDEFAULT(col_name)\n \nDescription\n----------- \nReturns the default value for a table column. If the column\nhas no default value, NULL is returned.\nFor integer columns using AUTO_INCREMENT, 0 is returned.\n \nWhen using DEFAULT as a value to set in an INSERT or UPDATE\nstatement, you can use the bare keyword DEFAULT without the\nparentheses and argument to\nrefer to the column in context. You can only use DEFAULT as\na bare keyword if you are using it\nalone without a surrounding expression or function.\n \nExamples\n-------- \nSelect only non-default values for a column:\n \nSELECT i FROM t WHERE i != DEFAULT(i);\n \nUpdate values to be one greater than the default value:\n \nUPDATE t SET i = DEFAULT(i)+1 WHERE i \n\nURL: https://mariadb.com/kb/en/default/','','https://mariadb.com/kb/en/default/'),(335,'ST_POINTONSURFACE',24,'ST_POINTONSURFACE() was introduced in MariaDB 10.1.2\n \nSyntax\n------ \nST_PointOnSurface(g)\nPointOnSurface(g)\n \nDescription\n----------- \nGiven a geometry, returns a POINT guaranteed to intersect a\nsurface. However, see MDEV-7514.\n \nST_PointOnSurface() and PointOnSurface() are synonyms.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_pointonsurface/','','https://mariadb.com/kb/en/st_pointonsurface/'),(340,'BINLOG',26,'Syntax\n------ \nBINLOG \'str\'\n \nDescription\n----------- \nBINLOG is an internal-use statement. It is generated by the\nmysqlbinlog program as the printable representation of\ncertain events\nin binary log files. The \'str\' value is a base 64-encoded\nstring the that server decodes to determine the data change\nindicated by the\ncorresponding event. This statement requires the SUPER\nprivilege. It was added in MySQL 5.1.5.\n \n\n\nURL: https://mariadb.com/kb/en/binlog/','','https://mariadb.com/kb/en/binlog/'),(342,'FLUSH',26,'Syntax\n------ \nFLUSH [NO_WRITE_TO_BINLOG | LOCAL]\n flush_option [, flush_option] ...\n \nor when flushing tables:\n \nFLUSH [NO_WRITE_TO_BINLOG | LOCAL] TABLES [table_list]\n[table_flush_option]\n \nwhere table_list is a list of tables separated by , (comma).\n \nDescription\n----------- \nThe FLUSH statement clears or reloads various internal\ncaches used by\nMariaDB. To execute FLUSH, you must have the RELOAD\nprivilege. See GRANT.\n \nThe RESET statement is similar to FLUSH. See\nRESET.\n \nYou cannot issue a FLUSH statement from within a stored\nfunction or a trigger. Doing so within a stored procedure is\npermitted, as long as it is not called by a stored function\nor trigger. See Stored Routine Limitations, Stored Function\nLimitations and Trigger Limitations.\n \nIf a listed table is a view, an error like the following\nwill be produced:\n \nERROR 1347 (HY000): \'test.v\' is not BASE TABLE\n \nBy default, FLUSH statements are written to the binary log\nand will be replicated. The NO_WRITE_TO_BINLOG keyword\n(LOCAL is an alias) will ensure the statement is not written\nto the binary log. \n \nThe different flush options are:\n \nOption | Description | \n \nCHANGED_PAGE_BITMAPS | Internal command used for backup\npurposes. See the Information Schema CHANGED_PAGE_BITMAPS\nTable. | \n \nCLIENT_STATISTICS | Reset client statistics (see SHOW\nCLIENT_STATISTICS). | \n \nDES_KEY_FILE | Reloads the DES key file (Specified with the\n--des-key-file startup option). | \n \nHOSTS | Flush the hostname cache (used for converting ip to\nhost names and for unblocking blocked hosts. See\nmax_connect_errors) | \n \nINDEX_STATISTICS | Reset index statistics (see SHOW\nINDEX_STATISTICS). | \n \n[ERROR | ENGINE | GENERAL | SLOW | BINARY | RELAY] LOGS |\nClose and reopen the specified log type, or all log types if\nnone are specified. FLUSH RELAY LOGS [connection-name] can\nbe used to flush the relay logs for a specific connection.\nOnly one connection can be specified per FLUSH command. See\nMulti-source replication. FLUSH ENGINE LOGS will delete all\nunneeded Aria redo logs. Since MariaDB 10.1.30 and MariaDB\n10.2.11, FLUSH BINARY LOGS\nDELETE_DOMAIN_ID=(list-of-domains) can be used to discard\nobsolete GTID domains from the server\'s binary log state.\nIn order for this to be successful, no event group from the\nlisted GTID domains can be present in existing binary log\nfiles. If some still exist, then they must be purged prior\nto executing this command. If the command completes\nsuccessfully, then it also rotates the binary log. | \n \nMASTER | Deprecated option, use RESET MASTER instead. | \n \nPRIVILEGES | Reload all privileges from the privilege tables\nin the mysql database. If the server is started with\n--skip-grant-table option, this will activate the privilege\ntables again. | \n \nQUERY CACHE | Defragment the query cache to better utilize\nits memory. If you want to reset the query cache, you can do\nit with RESET QUERY CACHE. | \n \nQUERY_RESPONSE_TIME | See the QUERY_RESPONSE_TIME plugin. | \n \nSLAVE | Deprecated option, use RESET SLAVE instead. | \n \nSSL | Used to dynamically reinitialize the server\'s TLS\ncontext by reloading the files defined by several TLS system\nvariables. See FLUSH SSL for more information. This command\nwas first added in MariaDB 10.4.1. | \n \nSTATUS | Resets all server status variables that can be\nreset to 0. Not all global status variables support this, so\nnot all global values are reset. See FLUSH STATUS for more\ninformation. | \n \nTABLE | Close tables given as options or all open tables if\nno table list was used. From MariaDB 10.4.1, using without\nany table list will only close tables not in use, and tables\nnot locked by the FLUSH TABLES connection. If there are no\nlocked tables, FLUSH TABLES will be instant and will not\ncause any waits, as it no longer waits for tables in use.\nWhen a table list is provided, from MariaDB 10.4.1, the\nserver will wait for the end of any transactions that are\nusing the tables. Previously, FLUSH TABLES only waited for\nthe statements to complete. | \n \nTABLES | Same as FLUSH TABLE. | \n \nTABLES ... FOR EXPORT | For InnoDB tables, flushes table\nchanges to disk to permit binary table copies while the\nserver is running. Introduced in MariaDB 10.0.8. See FLUSH\nTABLES ... FOR EXPORT for more. | \n \nTABLES WITH READ LOCK | Closes all open tables. New tables\nare only allowed to be opened with read locks until an\nUNLOCK TABLES is given. | \n \nTABLES WITH READ LOCK AND DISABLE CHECKPOINT | As TABLES\nWITH READ LOCK but also disable all checkpoint writes by\ntransactional table engines. This is useful when doing a\ndisk snapshot of all tables. | \n \nTABLE_STATISTICS | Reset table statistics (see SHOW\nTABLE_STATISTICS). | \n \nUSER_RESOURCES | Resets all per hour user resources. This\nenables clients that have exhausted their resources to\nconnect again. | \n \nUSER_STATISTICS | Reset user statistics (see SHOW\nUSER_STATISTICS). | \n \nYou can also use the mysqladmin client to flush things. Use\nmysqladmin --help to examine what flush commands it\nsupports.\n \nFLUSH STATUS\n \nServer status variables can be reset by executing the\nfollowing:\n \nFLUSH STATUS;\n \nGlobal Status Variables that Support FLUSH STATUS\n \nNot all global status variables support being reset by FLUSH\nSTATUS. Currently, the following status variables are reset\nby FLUSH STATUS:\nAborted_clients\nAborted_connects\nAria_pagecache_blocks_not_flushed\nAria_pagecache_blocks_unused\nAria_pagecache_blocks_used\nBinlog_cache_disk_use\nBinlog_cache_use\nBinlog_stmt_cache_disk_use\nBinlog_stmt_cache_use\nConnection_errors_accept\nConnection_errors_internal\nConnection_errors_max_connections\nConnection_errors_peer_address\nConnection_errors_select\nConnection_errors_tcpwrap\nCreated_tmp_files\nDelayed_errors\nDelayed_writes\nFeature_check_constraint\nFeature_delay_key_write\nMax_used_connections\nOpened_plugin_libraries\nPerformance_schema_accounts_lost\nPerformance_schema_cond_instances_lost\nPerformance_schema_digest_lost\nPerformance_schema_file_handles_lost\nPerformance_schema_file_instances_lost\nPerformance_schema_hosts_lost\nPerformance_schema_locker_lost\nPerformance_schema_mutex_instances_lost\nPerformance_schema_rwlock_instances_lost\nPerformance_schema_session_connect_attrs_lost\nPerformance_schema_socket_instances_lost\nPerformance_schema_stage_classes_lost\nPerformance_schema_statement_classes_lost\nPerformance_schema_table_handles_lost\nPerformance_schema_table_instances_lost\nPerformance_schema_thread_instances_lost\nPerformance_schema_users_lost\nQcache_hits\nQcache_inserts\nQcache_lowmem_prunes\nQcache_not_cached\nRpl_semi_sync_master_no_times\nRpl_semi_sync_master_no_tx\nRpl_semi_sync_master_timefunc_failures\nRpl_semi_sync_master_wait_pos_backtraverse\nRpl_semi_sync_master_yes_tx\nRpl_transactions_multi_engine\nServer_audit_writes_failed\nSlave_retried_transactions\nSlow_launch_threads\nSsl_accept_renegotiates\nSsl_accepts\nSsl_callback_cache_hits\nSsl_client_connects\nSsl_connect_renegotiates\nSsl_ctx_verify_depth\nSsl_ctx_verify_mode\nSsl_finished_accepts\nSsl_finished_connects\nSsl_session_cache_hits\nSsl_session_cache_misses\nSsl_session_cache_overflows\nSsl_session_cache_size\nSsl_session_cache_timeouts\nSsl_sessions_reused\nSsl_used_session_cache_entries\nSubquery_cache_hit\nSubquery_cache_miss\nTable_locks_immediate\nTable_locks_waited\nTc_log_max_pages_used\nTc_log_page_waits\nTransactions_gtid_foreign_engine\nTransactions_multi_engine\n \nFLUSH SSL\n \nThe FLUSH SSL command was first added in MariaDB 10.4.\n \nIn MariaDB 10.4 and later, the FLUSH SSL command can be used\nto dynamically reinitialize the server\'s TLS context. This\nis most useful if you need to replace a certificate that is\nabout to expire without restarting the server.\n \nThis operation is performed by reloading the files defined\nby the following TLS system variables:\nssl_cert\nssl_key\nssl_ca\nssl_capath\nssl_crl\nssl_crlpath\n \nThese TLS system variables are not dynamic, so their values\ncan not be changed without restarting the server.\n \nIf you want to dynamically reinitialize the server\'s TLS\ncontext, then you need to change the certificate and key\nfiles at the relevant paths defined by these TLS system\nvariables, without actually changing the values of the\nvariables. See MDEV-19341 for more information.\n \nReducing Memory Usage\n \nTo flush some of the global caches that take up memory, you\ncould execute the following command:\n \nFLUSH LOCAL HOSTS,\n QUERY CACHE, \n TABLE_STATISTICS, \n INDEX_STATISTICS, \n USER_STATISTICS;\n \n\n \n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/flush/','','https://mariadb.com/kb/en/flush/'),(343,'FLUSH QUERY CACHE',26,'Description\n----------- \nYou can defragment the query cache to better utilize its\nmemory with\nthe FLUSH QUERY CACHE statement. The statement does not\nremove any queries from the cache.\n \nThe RESET QUERY CACHE statement removes all query results\nfrom the query cache.\nThe FLUSH TABLES statement also does this.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/flush-query-cache/','','https://mariadb.com/kb/en/flush-query-cache/'),(347,'LOAD INDEX',26,'Syntax\n------ \nLOAD INDEX INTO CACHE\n tbl_index_list [, tbl_index_list] ...\n \ntbl_index_list:\n tbl_name\n [[INDEX|KEY] (index_name[, index_name] ...)]\n [IGNORE LEAVES]\n \nDescription\n----------- \nThe LOAD INDEX INTO CACHE statement preloads a table index\ninto the key\ncache to which it has been assigned by an explicit CACHE\nINDEX\nstatement, or into the default key cache otherwise. \nLOAD INDEX INTO CACHE is used only for MyISAM or Aria\ntables. Until MariaDB 5.3, it was not supported for tables\nhaving user-defined partitioning, but this limitation was\nremoved in MariaDB 5.5.\n \nThe IGNORE LEAVES modifier causes only blocks for the\nnonleaf nodes of\nthe index to be preloaded.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/load-index/','','https://mariadb.com/kb/en/load-index/'),(377,'SHOW FUNCTION CODE',26,'Syntax\n------ \nSHOW FUNCTION CODE func_name\n \nDescription\n----------- \nSHOW FUNCTION CODE shows a representation of the internal\nimplementation of the stored function.\n \nIt is similar to SHOW PROCEDURE CODE but for stored\nfunctions.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/show-function-code/','','https://mariadb.com/kb/en/show-function-code/'),(209,'DECODE_HISTOGRAM',17,'DECODE_HISTOGRAM() was introduced in MariaDB 10.0.2\n \nSyntax\n------ \nDECODE_HISTOGRAM(hist_type,histogram)\n \nNote: Before MariaDB 10.0.10 the arguments were reversed.\n \nDescription\n----------- \nReturns a string of comma separated numeric values\ncorresponding to a probability distribution represented by\nthe histogram of type hist_type (SINGLE_PREC_HB or\nDOUBLE_PREC_HB). The hist_type and histogram would be\ncommonly used from the mysql.column_stats table.\n \nSee Histogram Based Statistics for details.\n \nExamples\n-------- \nCREATE TABLE origin (\n i INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,\n v INT UNSIGNED NOT NULL\n);\n \nINSERT INTO origin(v) VALUES \n (1),(2),(3),(4),(5),(10),(20),\n (30),(40),(50),(60),(70),(80),\n (90),(100),(200),(400),(800);\n \nSET histogram_size=10,histogram_type=SINGLE_PREC_HB;\n \nANALYZE TABLE origin PERSISTENT FOR ALL;\n \n+-------------+---------+----------+-----------------------------------------+\n| Table | Op | Msg_type | Msg_text |\n+-------------+---------+----------+-----------------------------------------+\n| test.origin | analyze | status | Engine-independent\nstatistics collected |\n| test.origin | analyze | status | OK |\n+-------------+---------+----------+-----------------------------------------+\n \nSELECT db_name,table_name,column_name,hist_type,\n hex(histogram),decode_histogram(hist_type,histogram) \n FROM mysql.column_stats WHERE db_name=\'test\' and\ntable_name=\'origin\';\n \n+---------+------------+-------------+----------------+----------------------+-------------------------------------------------------------------+\n| db_name | table_name | column_name | hist_type |\nhex(histogram) | decode_histogram(hist_type,histogram) |\n+---------+------------+-------------+----------------+----------------------+-------------------------------------------------------------------+\n| test | origin | i | SINGLE_PREC_HB | 0F2D3C5A7887A5C3D2F0\n|\n0.059,0.118,0.059,0.118,0.118,0.059,0.118,0.118,0.059,0.118,0.059\n|\n| test | origin | v | SINGLE_PREC_HB | 000001060C0F161C1F7F\n|\n0.000,0.000,0.004,0.020,0.024,0.012,0.027,0.024,0.012,0.376,0.502\n|\n+---------+------------+-------------+----------------+----------------------+-------------------------------------------------------------------+\n \nSET histogram_size=20,histogram_type=DOUBLE_PREC_HB;\n \nANALYZE TABLE origin PERSISTENT FOR ALL;\n \n+-------------+---------+----------+-----------------------------------------+\n| Table | Op | Msg_type | Msg_text |\n+-------------+---------+----------+-----------------------------------------+\n| test.origin | analyze | status | Engine-independent\nstatistics collected |\n| test.origin | analyze | status | OK |\n+-------------+---------+----------+-----------------------------------------+\n \nSELECT db_name,table_name,column_name,\n hist_type,hex(histogram),decode_histogram(hist_type,histogram)\n\n FROM mysql.column_stats WHERE db_name=\'test\' and\ntable_name=\'origin\';\n \n+---------+------------+-------------+----------------+------------------------------------------+-----------------------------------------------------------------------------------------+\n| db_name | table_name | column_name | hist_type |\nhex(histogram) | decode_histogram(hist_type,histogram) |\n+---------+------------+-------------+----------------+------------------------------------------+-----------------------------------------------------------------------------------------+\n| test | origin | i | DOUBLE_PREC_HB |\n0F0F2D2D3C3C5A5A78788787A5A5C3C3D2D2F0F0 |\n0.05882,0.11765,0.05882,0.11765,0.11765,0.05882,0.11765,0.11765,0.05882,0.11765,0.05882\n|\n| test | origin | v | DOUBLE_PREC_HB |\n5200F600480116067E0CB30F1B16831CB81FD67F |\n0.00125,0.00250,0.00125,0.01877,0.02502,0.01253,0.02502,0.02502,0.01253,0.37546,0.50063\n|\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/decode_histogram/','','https://mariadb.com/kb/en/decode_histogram/'),(211,'FOUND_ROWS',17,'Syntax\n------ \nFOUND_ROWS()\n \nDescription\n----------- \nA SELECT statement may include a LIMIT clause to restrict\nthe number\nof rows the server returns to the client. In some cases, it\nis\ndesirable to know how many rows the statement would have\nreturned\nwithout the LIMIT, but without running the statement again.\nTo obtain\nthis row count, include a SQL_CALC_FOUND_ROWS option in the\nSELECT\nstatement, and then invoke FOUND_ROWS() afterwards.\n \nYou can also use FOUND_ROWS() to obtain the number of rows\nreturned by a SELECT which does not contain a LIMIT clause.\nIn this case you don\'t need to use the SQL_CALC_FOUND_ROWS\noption. This can be useful for example in a stored\nprocedure.\n \nAlso, this function works with some other statements which\nreturn a resultset, including SHOW, DESC and HELP. For\nDELETE ... RETURNING you should use ROW_COUNT(). It also\nworks as a prepared statement, or after executing a prepared\nstatement.\n \nStatements which don\'t return any results don\'t affect\nFOUND_ROWS() - the previous value will still be returned.\n \nWarning: When used after a CALL statement, this function\nreturns the number of rows selected by the last query in the\nprocedure, not by the whole procedure.\n \nStatements using the FOUND_ROWS() function are not safe for\nreplication.\n \nExamples\n-------- \nSHOW ENGINES;\n \n+--------------------+---------+----------------------------------------------------------------+--------------+------+------------+\n| Engine | Support | Comment | Transactions | XA |\nSavepoints |\n+--------------------+---------+----------------------------------------------------------------+--------------+------+------------+\n| InnoDB | DEFAULT | Supports transactions, row-level\nlocking, and foreign keys | YES | YES | YES |\n...\n| SPHINX | YES | Sphinx storage engine | NO | NO | NO |\n+--------------------+---------+----------------------------------------------------------------+--------------+------+------------+\n11 rows in set (0.01 sec)\n \nSELECT FOUND_ROWS();\n+--------------+\n| FOUND_ROWS() |\n+--------------+\n| 11 |\n+--------------+\n \nSELECT SQL_CALC_FOUND_ROWS * FROM tbl_name WHERE id > 100\nLIMIT 10;\n \nSELECT FOUND_ROWS();\n+--------------+\n| FOUND_ROWS() |\n+--------------+\n| 23 |\n+--------------+\n \n\n\nURL: https://mariadb.com/kb/en/found_rows/','','https://mariadb.com/kb/en/found_rows/'),(393,'SHOW PROFILES',26,'Syntax\n------ \nSHOW PROFILES\n \nDescription\n----------- \nThe SHOW PROFILES statement displays profiling information\nthat indicates resource usage for statements executed during\nthe course of the\ncurrent session. It is used together with \nSHOW PROFILE.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/show-profiles/','','https://mariadb.com/kb/en/show-profiles/'),(394,'SHOW QUERY_RESPONSE_TIME',26,'SHOW QUERY_RESPONSE_TIME was introduced in MariaDB 10.1.1.\n \nStarting with MariaDB 10.1.1, which introduced the\nInformation Schema plugin extension, it is possible to use\nSHOW QUERY_RESPONSE_TIME as an alternative for retrieving\ninformation from the QUERY_RESPONSE_TIME plugin.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/show-query_response_time/','','https://mariadb.com/kb/en/show-query_response_time/'),(397,'SHOW SLAVE STATUS',26,'Syntax\n------ \nSHOW SLAVE [\"connection_name\"] STATUS\n \nor\n \nSHOW ALL SLAVES STATUS\n \nDescription\n----------- \nThis statement is to be run on a slave and provides status\ninformation on essential parameters of the replication slave\nthreads.\n \nThis statement requires the SUPER or the REPLICATION_CLIENT\nprivilege.\n \nMulti-source\n \nMariaDB 10.0 introduced the FULL and \"connection_name\"\noptions to\nallow you to connect to many masters at the same time.\n \nALL SLAVES gives you a list of all connections to the\nmaster.\n \nThe rows will be sorted according to Connection_name.\n \nIf you specify a connection_name, you only get the\ninformation about that\nconnection. If connection_name is not used, then the name\nset by default_master_connection is used. If the connection\nname doesn\'t exist you will get an error:\nThere is no master connection for \'xxx\'.\n \nColumn descriptions\n \nName | Description | Added | \n \nConnection_name | Name of the master connection. Returned\nwith SHOW ALL SLAVES STATUS only. | MariaDB 10.0 | \n \nSlave_SQL_State | State of SQL thread. Returned with SHOW\nALL SLAVES STATUS only. See Slave SQL Thread States. |\nMariaDB 10.0 | \n \nSlave_IO_State | State of I/O thread. See Slave I/O Thread\nStates. | MariaDB 10.0 | \n \nMaster_host | Master host that the slave is connected to. | \n| \n \nMaster_user | Account user name being used to connect to the\nmaster. | | \n \nMaster_port | The port being used to connect to the master.\n| | \n \nConnect_Retry | Time in seconds between retries to connect.\nThe default is 60. The CHANGE MASTER TO statement can set\nthis. The master-retry-count option determines the maximum\nnumber of reconnection attempts. | | \n \nMaster_Log_File | Name of the master binary log file that\nthe I/O thread is currently reading from. | | \n \nRead_Master_Log_Pos | Position up to which the I/O thread\nhas read in the current master binary log file. | | \n \nRelay_Log_File | Name of the relay log file that the SQL\nthread is currently processing. | | \n \nRelay_Log_Pos | Position up to which the SQL thread has\nfinished processing in the current relay log file. | | \n \nRelay_Master_Log_File | Name of the master binary log file\nthat contains the most recent event executed by the SQL\nthread. | | \n \nSlave_IO_Running | Whether the slave I/O thread is running\nand connected (Yes), running but not connected to a master\n(Connecting) or not running (No). | | \n \nSlave_SQL_Running | Whether or not the SQL thread is\nrunning. | | \n \nReplicate_Do_DB | Databases specified for replicating with\nthe replicate_do_db option. | | \n \nReplicate_Ignore_DB | Databases specified for ignoring with\nthe replicate_ignore_db option. | | \n \nReplicate_Do_Table | Tables specified for replicating with\nthe replicate_do_table option. | | \n \nReplicate_Ignore_Table | Tables specified for ignoring with\nthe replicate_ignore_table option. | | \n \nReplicate_Wild_Do_Table | Tables specified for replicating\nwith the replicate_wild_do_table option. | | \n \nReplicate_Wild_Ignore_Table | Tables specified for ignoring\nwith the replicate_wild_ignore_table option. | | \n \nLast_Errno | Alias for Last_SQL_Errno (see below) | | \n \nLast Error | Alias for Last_SQL_Error (see below) | | \n \nSkip_Counter | Number of events that a slave skips from the\nmaster, as recorded in the sql_slave_skip_counter system\nvariable. | | \n \nExec_Master_Log_Pos | Position up to which the SQL thread\nhas processed in the current master binary log file. Can be\nused to start a new slave from a current slave with the\nCHANGE MASTER TO ... MASTER_LOG_POS option. | | \n \nRelay_Log_Space | Total size of all relay log files\ncombined. | | \n \nUntil_Condition | | | \n \nUntil_Log_File | The MASTER_LOG_FILE value of the START\nSLAVE UNTIL condition. | | \n \nUntil_Log_Pos | The MASTER_LOG_POS value of the START SLAVE\nUNTIL condition. | | \n \nMaster_SSL_Allowed | Whether an SSL connection is permitted\n(Yes), not permitted (No) or permitted but without the slave\nhaving SSL support enabled (Ignored) | | \n \nMaster_SSL_CA_File | The MASTER_SSL_CA option of the CHANGE\nMASTER TO statement. | | \n \nMaster_SSL_CA_Path | The MASTER_SSL_CAPATH option of the\nCHANGE MASTER TO statement. | | \n \nMaster_SSL_Cert | The MASTER_SSL_CERT option of the CHANGE\nMASTER TO statement. | | \n \nMaster_SSL_Cipher | The MASTER_SSL_CIPHER option of the\nCHANGE MASTER TO statement. | | \n \nMaster_SSL_Key | The MASTER_SSL_KEY option of the CHANGE\nMASTER TO statement. | | \n \nSeconds_Behind_Master | Difference between the timestamp\nlogged on the master for the event that the slave is\ncurrently processing, and the current timestamp on the\nslave. Zero if the slave is not currently processing an\nevent. From MariaDB 10.0.23 and MariaDB 10.1.9, with\nparallel replication, seconds_behind_master is updated only\nafter transactions commit. | | \n \nMaster_SSL_Verify_Server_Cert | The\nMASTER_SSL_VERIFY_SERVER_CERT option of the CHANGE MASTER TO\nstatement. | | \n \nLast_IO_Errno | Error code of the most recent error that\ncaused the I/O thread to stop (also recorded in the slave\'s\nerror log). 0 means no error. RESET SLAVE or RESET MASTER\nwill reset this value. | | \n \nLast_IO_Error | Error message of the most recent error that\ncaused the I/O thread to stop (also recorded in the slave\'s\nerror log). An empty string means no error. RESET SLAVE or\nRESET MASTER will reset this value. | | \n \nLast_SQL_Errno | Error code of the most recent error that\ncaused the SQL thread to stop (also recorded in the slave\'s\nerror log). 0 means no error. RESET SLAVE or RESET MASTER\nwill reset this value. | | \n \nLast_SQL_Error | Error message of the most recent error that\ncaused the SQL thread to stop (also recorded in the slave\'s\nerror log). An empty string means no error. RESET SLAVE or\nRESET MASTER will reset this value. | | \n \nReplicate_Ignore_Server_Ids | List of server_ids that are\ncurrently being ignored for replication purposes, or an\nempty string for none, as specified in the IGNORE_SERVER_IDS\noption of the CHANGE MASTER TO statement. | | \n \nMaster_Server_Id | The master\'s server_id value. | | \n \nMaster_SSL_Crl | The MASTER_SSL_CRL option of the CHANGE\nMASTER TO statement. | MariaDB 10.0 | \n \nMaster_SSL_Crlpath | The MASTER_SSL_CRLPATH option of the\nCHANGE MASTER TO statement. | MariaDB 10.0 | \n \nUsing_Gtid | Whether or not global transaction ID\'s are\nbeing used for replication (can be No, Slave_Pos, or\nCurrent_Pos). | MariaDB 10.0.2 | \n \nGtid_IO_Pos | Current global transaction ID value. | MariaDB\n10.0.2 | \n \nRetried_transactions | Number of retried transactions for\nthis connection. Returned with SHOW ALL SLAVES STATUS only.\n| MariaDB 10.0 | \n \nMax_relay_log_size | Max relay log size for this connection.\nReturned with SHOW ALL SLAVES STATUS only. | MariaDB 10.0 | \n \nExecuted_log_entries | How many log entries the slave has\nexecuted. Returned with SHOW ALL SLAVES STATUS only. |\nMariaDB 10.0 | \n \nSlave_received_heartbeats | How many heartbeats we have got\nfrom the master. Returned with SHOW ALL SLAVES STATUS only.\n| MariaDB 10.0 | \n \nSlave_heartbeat_period | How often to request a heartbeat\npacket from the master (in seconds). Returned with SHOW ALL\nSLAVES STATUS only. | MariaDB 10.0 | \n \nGtid_Slave_Pos | GTID of the last event group replicated on\na slave server, for each replication domain, as stored in\nthe gtid_slave_pos system variable. Returned with SHOW ALL\nSLAVES STATUS only. | MariaDB 10.0 | \n \nSQL_Delay | Value specified by MASTER_DELAY in CHANGE MASTER\n(or 0 if none). | MariaDB 10.2.3 | \n \nSQL_Remaining_Delay | When the slave is delaying the\nexecution of an event due to MASTER_DELAY, this is the\nnumber of seconds of delay remaining before the event will\nbe applied. Otherwise, the value is NULL. | MariaDB 10.2.3 |\n\n \nSlave_SQL_Running_State | The state of the SQL driver\nthreads, same as in SHOW PROCESSLIST. When the slave is\ndelaying the execution of an event due to MASTER_DELAY, this\nfield displays: \"Waiting until MASTER_DELAY seconds after\nmaster executed event\". | MariaDB 10.2.3 | \n \nSlave_DDL_Groups | This status variable counts the\noccurrence of DDL statements. This is a slave-side counter\nfor optimistic parallel replication. | MariaDB 10.3.7 | \n \nSlave_Non_Transactional_Groups | This status variable counts\nthe occurrence of non-transactional event groups. This is a\nslave-side counter for optimistic parallel replication. |\nMariaDB 10.3.7 | \n \nSlave_Transactional_Groups | This status variable counts the\noccurrence of transactional event groups. This is a\nslave-side counter for optimistic parallel replication. |\nMariaDB 10.3.7 | \n \nExamples\n-------- \nIf you issue this statement using the mysql client,\nyou can use a \\G statement terminator rather than a\nsemicolon to\nobtain a more readable vertical layout.\n \nSHOW SLAVE STATUS\\G\n*************************** 1. row\n***************************\n Slave_IO_State: Waiting for master to send event\n Master_Host: db01.example.com\n Master_User: replicant\n Master_Port: 3306\n Connect_Retry: 60\n Master_Log_File: mariadb-bin.000010\n Read_Master_Log_Pos: 548\n Relay_Log_File: relay-bin.000004\n Relay_Log_Pos: 837\n Relay_Master_Log_File: mariadb-bin.000010\n Slave_IO_Running: Yes\n Slave_SQL_Running: Yes\n Replicate_Do_DB: \n Replicate_Ignore_DB: \n Replicate_Do_Table: \n Replicate_Ignore_Table: \n Replicate_Wild_Do_Table: \n Replicate_Wild_Ignore_Table: \n Last_Errno: 0\n Last_Error: \n Skip_Counter: 0\n Exec_Master_Log_Pos: 548\n Relay_Log_Space: 1497\n Until_Condition: None\n Until_Log_File: \n Until_Log_Pos: 0\n Master_SSL_Allowed: No\n Master_SSL_CA_File: \n Master_SSL_CA_Path: \n Master_SSL_Cert: \n Master_SSL_Cipher: \n Master_SSL_Key: \n Seconds_Behind_Master: 0\nMaster_SSL_Verify_Server_Cert: No\n Last_IO_Errno: 0\n Last_IO_Error: \n Last_SQL_Errno: 0\n Last_SQL_Error: \n Replicate_Ignore_Server_Ids: \n Master_Server_Id: 101\n Master_SSL_Crl: \n Master_SSL_Crlpath: \n Using_Gtid: No\n Gtid_IO_Pos: \n \nMariaDB [(none)]> SHOW ALL SLAVES STATUS\\G\n*************************** 1. row\n***************************\n Connection_name: \n Slave_SQL_State: Slave has read all relay log; waiting for\nthe slave I/O thread to update it\n Slave_IO_State: Waiting for master to send event\n Master_Host: db01.example.com\n Master_User: replicant\n Master_Port: 3306\n Connect_Retry: 60\n Master_Log_File: mariadb-bin.000010\n Read_Master_Log_Pos: 3608\n Relay_Log_File: relay-bin.000004\n Relay_Log_Pos: 3897\n Relay_Master_Log_File: mariadb-bin.000010\n Slave_IO_Running: Yes\n Slave_SQL_Running: Yes\n Replicate_Do_DB: \n Replicate_Ignore_DB: \n Replicate_Do_Table: \n Replicate_Ignore_Table: \n Replicate_Wild_Do_Table: \n Replicate_Wild_Ignore_Table: \n Last_Errno: 0\n Last_Error: \n Skip_Counter: 0\n Exec_Master_Log_Pos: 3608\n Relay_Log_Space: 4557\n Until_Condition: None\n Until_Log_File: \n Until_Log_Pos: 0\n Master_SSL_Allowed: No\n Master_SSL_CA_File: \n Master_SSL_CA_Path: \n Master_SSL_Cert: \n Master_SSL_Cipher: \n Master_SSL_Key: \n Seconds_Behind_Master: 0\nMaster_SSL_Verify_Server_Cert: No\n Last_IO_Errno: 0\n Last_IO_Error: \n Last_SQL_Errno: 0\n Last_SQL_Error: \n Replicate_Ignore_Server_Ids: \n Master_Server_Id: 101\n Master_SSL_Crl: \n Master_SSL_Crlpath: \n Using_Gtid: No\n Gtid_IO_Pos:\n Retried_transactions: 0\n Max_relay_log_size: 104857600\n Executed_log_entries: 40\n Slave_received_heartbeats: 11\n Slave_heartbeat_period: 1800.000\n Gtid_Slave_Pos: 0-101-2320\n \nYou can also access some of the variables directly from\nstatus variables:\n \nSET @@default_master_connection=\"test\" ;\nshow status like \"%slave%\"\n \nVariable_name Value\nCom_show_slave_hosts 0\nCom_show_slave_status 0\nCom_start_all_slaves 0\nCom_start_slave 0\nCom_stop_all_slaves 0\nCom_stop_slave 0\nRpl_semi_sync_slave_status OFF\nSlave_connections 0\nSlave_heartbeat_period 1800.000\nSlave_open_temp_tables 0\nSlave_received_heartbeats 0\nSlave_retried_transactions 0\nSlave_running OFF\nSlaves_connected 0\nSlaves_running 1\n \n\n\nURL: https://mariadb.com/kb/en/show-slave-status/','','https://mariadb.com/kb/en/show-slave-status/'),(398,'SHOW STATUS',26,'Syntax\n------ \nSHOW [GLOBAL | SESSION] STATUS\n [LIKE \'pattern\' | WHERE expr]\n \nDescription\n----------- \nSHOW STATUS provides server status information. This\ninformation also can be obtained using the mysqladmin\nextended-status command, or by querying the Information\nSchema GLOBAL_STATUS and SESSION_STATUS tables.\nThe LIKE clause, if present, indicates which variable names\nto match. The WHERE clause can be given to select rows using\nmore general conditions.\n \nWith the GLOBAL modifier, SHOW STATUS\ndisplays the status values for all connections to MariaDB.\nWith\nSESSION, it displays the status values\nfor the current connection. If no modifier is present, the\ndefault is\n SESSION. LOCAL is a synonym for\n SESSION. If you see a lot of 0 values, the reason is\nprobably that you have used SHOW STATUS with a new\nconnection instead of SHOW GLOBAL STATUS.\n \nSome status variables have only a global value. For these,\nyou get the\nsame value for both GLOBAL and SESSION.\n \nSee Server Status Variables for a full list, scope and\ndescription of the variables that can be viewed with SHOW\nSTATUS.\n \nThe LIKE clause, if present on its own, indicates which\nvariable name to match.\n \nThe WHERE and LIKE clauses can be given to select rows using\nmore general conditions, as discussed in Extended SHOW.\n \nExamples\n-------- \nFull output from MariaDB 10.1.17:\n \nSHOW GLOBAL STATUS;\n \n+--------------------------------------------------------------+----------------------------------------+\n| Variable_name | Value |\n+--------------------------------------------------------------+----------------------------------------+\n| Aborted_clients | 0 |\n| Aborted_connects | 0 |\n| Access_denied_errors | 0 |\n| Acl_column_grants | 0 |\n| Acl_database_grants | 2 |\n| Acl_function_grants | 0 |\n| Acl_procedure_grants | 0 |\n| Acl_proxy_users | 2 |\n| Acl_role_grants | 0 |\n| Acl_roles | 0 |\n| Acl_table_grants | 0 |\n| Acl_users | 6 |\n| Aria_pagecache_blocks_not_flushed | 0 |\n| Aria_pagecache_blocks_unused | 15706 |\n| Aria_pagecache_blocks_used | 0 |\n| Aria_pagecache_read_requests | 0 |\n| Aria_pagecache_reads | 0 |\n| Aria_pagecache_write_requests | 0 |\n| Aria_pagecache_writes | 0 |\n| Aria_transaction_log_syncs | 0 |\n| Binlog_commits | 0 |\n| Binlog_group_commits | 0 |\n| Binlog_group_commit_trigger_count | 0 |\n| Binlog_group_commit_trigger_lock_wait | 0 |\n| Binlog_group_commit_trigger_timeout | 0 |\n| Binlog_snapshot_file | |\n| Binlog_snapshot_position | 0 |\n| Binlog_bytes_written | 0 |\n| Binlog_cache_disk_use | 0 |\n| Binlog_cache_use | 0 |\n| Binlog_stmt_cache_disk_use | 0 |\n| Binlog_stmt_cache_use | 0 |\n| Busy_time | 0.000000 |\n| Bytes_received | 432 |\n| Bytes_sent | 15183 |\n| Com_admin_commands | 1 |\n| Com_alter_db | 0 |\n| Com_alter_db_upgrade | 0 |\n| Com_alter_event | 0 |\n| Com_alter_function | 0 |\n| Com_alter_procedure | 0 |\n| Com_alter_server | 0 |\n| Com_alter_table | 0 |\n| Com_alter_tablespace | 0 |\n| Com_analyze | 0 |\n| Com_assign_to_keycache | 0 |\n| Com_begin | 0 |\n| Com_binlog | 0 |\n| Com_call_procedure | 0 |\n| Com_change_db | 0 |\n| Com_change_master | 0 |\n| Com_check | 0 |\n| Com_checksum | 0 |\n| Com_commit | 0 |\n| Com_compound_sql | 0 |\n| Com_create_db | 0 |\n| Com_create_event | 0 |\n| Com_create_function | 0 |\n| Com_create_index | 0 |\n| Com_create_procedure | 0 |\n| Com_create_role | 0 |\n| Com_create_server | 0 |\n| Com_create_table | 0 |\n| Com_create_temporary_table | 0 |\n| Com_create_trigger | 0 |\n| Com_create_udf | 0 |\n| Com_create_user | 0 |\n| Com_create_view | 0 |\n| Com_dealloc_sql | 0 |\n| Com_delete | 0 |\n| Com_delete_multi | 0 |\n| Com_do | 0 |\n| Com_drop_db | 0 |\n| Com_drop_event | 0 |\n| Com_drop_function | 0 |\n| Com_drop_index | 0 |\n| Com_drop_procedure | 0 |\n| Com_drop_role | 0 |\n| Com_drop_server | 0 |\n| Com_drop_table | 0 |\n| Com_drop_temporary_table | 0 |\n| Com_drop_trigger | 0 |\n| Com_drop_user | 0 |\n| Com_drop_view | 0 |\n| Com_empty_query | 0 |\n| Com_execute_sql | 0 |\n| Com_flush | 0 |\n| Com_get_diagnostics | 0 |\n| Com_grant | 0 |\n| Com_grant_role | 0 |\n| Com_ha_close | 0 |\n| Com_ha_open | 0 |\n| Com_ha_read | 0 |\n| Com_help | 0 |\n| Com_insert | 0 |\n| Com_insert_select | 0 |\n| Com_install_plugin | 0 |\n| Com_kill | 0 |\n| Com_load | 0 |\n| Com_lock_tables | 0 |\n| Com_optimize | 0 |\n| Com_preload_keys | 0 |\n| Com_prepare_sql | 0 |\n| Com_purge | 0 |\n| Com_purge_before_date | 0 |\n| Com_release_savepoint | 0 |\n| Com_rename_table | 0 |\n| Com_rename_user | 0 |\n| Com_repair | 0 |\n| Com_replace | 0 |\n| Com_replace_select | 0 |\n| Com_reset | 0 |\n| Com_resignal | 0 |\n| Com_revoke | 0 |\n| Com_revoke_all | 0 |\n| Com_revoke_role | 0 |\n| Com_rollback | 0 |\n| Com_rollback_to_savepoint | 0 |\n| Com_savepoint | 0 |\n| Com_select | 1 |\n| Com_set_option | 0 |\n| Com_show_authors | 0 |\n| Com_show_binlog_events | 0 |\n| Com_show_binlogs | 0 |\n| Com_show_charsets | 0 |\n| Com_show_collations | 0 |\n| Com_show_contributors | 0 |\n| Com_show_create_db | 0 |\n| Com_show_create_event | 0 |\n| Com_show_create_func | 0 |\n| Com_show_create_proc | 0 |\n| Com_show_create_table | 0 |\n| Com_show_create_trigger | 0 |\n| Com_show_databases | 0 |\n| Com_show_engine_logs | 0 |\n| Com_show_engine_mutex | 0 |\n| Com_show_engine_status | 0 |\n| Com_show_errors | 0 |\n| Com_show_events | 0 |\n| Com_show_explain | 0 |\n| Com_show_fields | 0 |\n| Com_show_function_status | 0 |\n| Com_show_generic | 0 |\n| Com_show_grants | 0 |\n| Com_show_keys | 0 |\n| Com_show_master_status | 0 |\n| Com_show_open_tables | 0 |\n| Com_show_plugins | 0 |\n| Com_show_privileges | 0 |\n| Com_show_procedure_status | 0 |\n| Com_show_processlist | 0 |\n| Com_show_profile | 0 |\n| Com_show_profiles | 0 |\n| Com_show_relaylog_events | 0 |\n| Com_show_slave_hosts | 0 |\n| Com_show_slave_status | 0 |\n| Com_show_status | 2 |\n| Com_show_storage_engines | 0 |\n| Com_show_table_status | 0 |\n| Com_show_tables | 0 |\n| Com_show_triggers | 0 |\n| Com_show_variables | 0 |\n| Com_show_warnings | 0 |\n| Com_shutdown | 0 |\n| Com_signal | 0 |\n| Com_start_all_slaves | 0 |\n| Com_start_slave | 0 |\n| Com_stmt_close | 0 |\n| Com_stmt_execute | 0 |\n| Com_stmt_fetch | 0 |\n| Com_stmt_prepare | 0 |\n| Com_stmt_reprepare | 0 |\n| Com_stmt_reset | 0 |\n| Com_stmt_send_long_data | 0 |\n| Com_stop_all_slaves | 0 |\n| Com_stop_slave | 0 |\n| Com_truncate | 0 |\n| Com_uninstall_plugin | 0 |\n| Com_unlock_tables | 0 |\n| Com_update | 0 |\n| Com_update_multi | 0 |\n| Com_xa_commit | 0 |\n| Com_xa_end | 0 |\n| Com_xa_prepare | 0 |\n| Com_xa_recover | 0 |\n| Com_xa_rollback | 0 |\n| Com_xa_start | 0 |\n| Compression | OFF |\n| Connection_errors_accept | 0 |\n| Connection_errors_internal | 0 |\n| Connection_errors_max_connections | 0 |\n| Connection_errors_peer_address | 0 |\n| Connection_errors_select | 0 |\n| Connection_errors_tcpwrap | 0 |\n| Connections | 4 |\n| Cpu_time | 0.000000 |\n| Created_tmp_disk_tables | 0 |\n| Created_tmp_files | 6 |\n| Created_tmp_tables | 2 |\n| Delayed_errors | 0 |\n| Delayed_insert_threads | 0 |\n| Delayed_writes | 0 |\n| Delete_scan | 0 |\n| Empty_queries | 0 |\n| Executed_events | 0 |\n| Executed_triggers | 0 |\n| Feature_delay_key_write | 0 |\n| Feature_dynamic_columns | 0 |\n| Feature_fulltext | 0 |\n| Feature_gis | 0 |\n| Feature_locale | 0 |\n| Feature_subquery | 0 |\n| Feature_timezone | 0 |\n| Feature_trigger | 0 |\n| Feature_xml | 0 |\n| Flush_commands | 1 |\n| Handler_commit | 1 |\n| Handler_delete | 0 |\n| Handler_discover | 0 |\n| Handler_external_lock | 0 |\n| Handler_icp_attempts | 0 |\n| Handler_icp_match | 0 |\n| Handler_mrr_init | 0 |\n| Handler_mrr_key_refills | 0 |\n| Handler_mrr_rowid_refills | 0 |\n| Handler_prepare | 0 |\n| Handler_read_first | 3 |\n| Handler_read_key | 0 |\n| Handler_read_last | 0 |\n| Handler_read_next | 0 |\n| Handler_read_prev | 0 |\n| Handler_read_retry | 0 |\n| Handler_read_rnd | 0 |\n| Handler_read_rnd_deleted | 0 |\n| Handler_read_rnd_next | 537 |\n| Handler_rollback | 0 |\n| Handler_savepoint | 0 |\n| Handler_savepoint_rollback | 0 |\n| Handler_tmp_update | 0 |\n| Handler_tmp_write | 516 |\n| Handler_update | 0 |\n| Handler_write | 0 |\n| Innodb_available_undo_logs | 128 |\n| Innodb_background_log_sync | 222 |\n| Innodb_buffer_pool_bytes_data | 2523136 |\n| Innodb_buffer_pool_bytes_dirty | 0 |\n| Innodb_buffer_pool_dump_status | Dumping buffer pool(s)\nnot yet started |\n| Innodb_buffer_pool_load_status | Loading buffer pool(s)\nnot yet started |\n| Innodb_buffer_pool_pages_data | 154 |\n| Innodb_buffer_pool_pages_dirty | 0 |\n| Innodb_buffer_pool_pages_flushed | 1 |\n| Innodb_buffer_pool_pages_free | 8037 |\n| Innodb_buffer_pool_pages_lru_flushed | 0 |\n| Innodb_buffer_pool_pages_made_not_young | 0 |\n| Innodb_buffer_pool_pages_made_young | 0 |\n| Innodb_buffer_pool_pages_misc | 0 |\n| Innodb_buffer_pool_pages_old | 0 |\n| Innodb_buffer_pool_pages_total | 8191 |\n| Innodb_buffer_pool_read_ahead | 0 |\n| Innodb_buffer_pool_read_ahead_evicted | 0 |\n| Innodb_buffer_pool_read_ahead_rnd | 0 |\n| Innodb_buffer_pool_read_requests | 558 |\n| Innodb_buffer_pool_reads | 155 |\n| Innodb_buffer_pool_wait_free | 0 |\n| Innodb_buffer_pool_write_requests | 1 |\n| Innodb_checkpoint_age | 0 |\n| Innodb_checkpoint_max_age | 80826164 |\n| Innodb_data_fsyncs | 5 |\n| Innodb_data_pending_fsyncs | 0 |\n| Innodb_data_pending_reads | 0 |\n| Innodb_data_pending_writes | 0 |\n| Innodb_data_read | 2609664 |\n| Innodb_data_reads | 172 |\n| Innodb_data_writes | 5 |\n| Innodb_data_written | 34304 |\n| Innodb_dblwr_pages_written | 1 |\n| Innodb_dblwr_writes | 1 |\n| Innodb_deadlocks | 0 |\n| Innodb_have_atomic_builtins | ON |\n| Innodb_history_list_length | 0 |\n| Innodb_ibuf_discarded_delete_marks | 0 |\n| Innodb_ibuf_discarded_deletes | 0 |\n| Innodb_ibuf_discarded_inserts | 0 |\n| Innodb_ibuf_free_list | 0 |\n| Innodb_ibuf_merged_delete_marks | 0 |\n| Innodb_ibuf_merged_deletes | 0 |\n| Innodb_ibuf_merged_inserts | 0 |\n| Innodb_ibuf_merges | 0 |\n| Innodb_ibuf_segment_size | 2 |\n| Innodb_ibuf_size | 1 |\n| Innodb_log_waits | 0 |\n| Innodb_log_write_requests | 0 |\n| Innodb_log_writes | 1 |\n| Innodb_lsn_current | 1616829 |\n| Innodb_lsn_flushed | 1616829 |\n| Innodb_lsn_last_checkpoint | 1616829 |\n| Innodb_master_thread_active_loops | 0 |\n| Innodb_master_thread_idle_loops | 222 |\n| Innodb_max_trx_id | 2308 |\n| Innodb_mem_adaptive_hash | 2217568 |\n| Innodb_mem_dictionary | 630703 |\n| Innodb_mem_total | 140771328 |\n| Innodb_mutex_os_waits | 1 |\n| Innodb_mutex_spin_rounds | 30 |\n| Innodb_mutex_spin_waits | 1 |\n| Innodb_oldest_view_low_limit_trx_id | 0 |\n| Innodb_os_log_fsyncs | 3 |\n| Innodb_os_log_pending_fsyncs | 0 |\n| Innodb_os_log_pending_writes | 0 |\n| Innodb_os_log_written | 512 |\n| Innodb_page_size | 16384 |\n| Innodb_pages_created | 0 |\n| Innodb_pages_read | 154 |\n| Innodb_pages_written | 1 |\n| Innodb_purge_trx_id | 0 |\n| Innodb_purge_undo_no | 0 |\n| Innodb_read_views_memory | 88 |\n| Innodb_row_lock_current_waits | 0 |\n| Innodb_row_lock_time | 0 |\n| Innodb_row_lock_time_avg | 0 |\n| Innodb_row_lock_time_max | 0 |\n| Innodb_row_lock_waits | 0 |\n| Innodb_rows_deleted | 0 |\n| Innodb_rows_inserted | 0 |\n| Innodb_rows_read | 0 |\n| Innodb_rows_updated | 0 |\n| Innodb_system_rows_deleted | 0 |\n| Innodb_system_rows_inserted | 0 |\n| Innodb_system_rows_read | 0 |\n| Innodb_system_rows_updated | 0 |\n| Innodb_s_lock_os_waits | 2 |\n| Innodb_s_lock_spin_rounds | 60 |\n| Innodb_s_lock_spin_waits | 2 |\n| Innodb_truncated_status_writes | 0 |\n| Innodb_x_lock_os_waits | 0 |\n| Innodb_x_lock_spin_rounds | 0 |\n| Innodb_x_lock_spin_waits | 0 |\n| Innodb_page_compression_saved | 0 |\n| Innodb_page_compression_trim_sect512 | 0 |\n| Innodb_page_compression_trim_sect1024 | 0 |\n| Innodb_page_compression_trim_sect2048 | 0 |\n| Innodb_page_compression_trim_sect4096 | 0 |\n| Innodb_page_compression_trim_sect8192 | 0 |\n| Innodb_page_compression_trim_sect16384 | 0 |\n| Innodb_page_compression_trim_sect32768 | 0 |\n| Innodb_num_index_pages_written | 0 |\n| Innodb_num_non_index_pages_written | 5 |\n| Innodb_num_pages_page_compressed | 0 |\n| Innodb_num_page_compressed_trim_op | 0 |\n| Innodb_num_page_compressed_trim_op_saved | 0 |\n| Innodb_num_pages_page_decompressed | 0 |\n| Innodb_num_pages_page_compression_error | 0 |\n| Innodb_num_pages_encrypted | 0 |\n| Innodb_num_pages_decrypted | 0 |\n| Innodb_have_lz4 | OFF |\n| Innodb_have_lzo | OFF |\n| Innodb_have_lzma | OFF |\n| Innodb_have_bzip2 | OFF |\n| Innodb_have_snappy | OFF |\n| Innodb_defragment_compression_failures | 0 |\n| Innodb_defragment_failures | 0 |\n| Innodb_defragment_count | 0 |\n| Innodb_onlineddl_rowlog_rows | 0 |\n| Innodb_onlineddl_rowlog_pct_used | 0 |\n| Innodb_onlineddl_pct_progress | 0 |\n| Innodb_secondary_index_triggered_cluster_reads | 0 |\n| Innodb_secondary_index_triggered_cluster_reads_avoided | 0\n|\n| Innodb_encryption_rotation_pages_read_from_cache | 0 |\n| Innodb_encryption_rotation_pages_read_from_disk | 0 |\n| Innodb_encryption_rotation_pages_modified | 0 |\n| Innodb_encryption_rotation_pages_flushed | 0 |\n| Innodb_encryption_rotation_estimated_iops | 0 |\n| Innodb_scrub_background_page_reorganizations | 0 |\n| Innodb_scrub_background_page_splits | 0 |\n| Innodb_scrub_background_page_split_failures_underflow | 0\n|\n|\nInnodb_scrub_background_page_split_failures_out_of_filespace\n| 0 |\n| Innodb_scrub_background_page_split_failures_missing_index\n| 0 |\n| Innodb_scrub_background_page_split_failures_unknown | 0 |\n| Key_blocks_not_flushed | 0 |\n| Key_blocks_unused | 107163 |\n| Key_blocks_used | 0 |\n| Key_blocks_warm | 0 |\n| Key_read_requests | 0 |\n| Key_reads | 0 |\n| Key_write_requests | 0 |\n| Key_writes | 0 |\n| Last_query_cost | 0.000000 |\n| Master_gtid_wait_count | 0 |\n| Master_gtid_wait_time | 0 |\n| Master_gtid_wait_timeouts | 0 |\n| Max_statement_time_exceeded | 0 |\n| Max_used_connections | 1 |\n| Memory_used | 273614696 |\n| Not_flushed_delayed_rows | 0 |\n| Open_files | 25 |\n| Open_streams | 0 |\n| Open_table_definitions | 18 |\n| Open_tables | 11 |\n| Opened_files | 77 |\n| Opened_plugin_libraries | 0 |\n| Opened_table_definitions | 18 |\n| Opened_tables | 18 |\n| Opened_views | 0 |\n| Performance_schema_accounts_lost | 0 |\n| Performance_schema_cond_classes_lost | 0 |\n| Performance_schema_cond_instances_lost | 0 |\n| Performance_schema_digest_lost | 0 |\n| Performance_schema_file_classes_lost | 0 |\n| Performance_schema_file_handles_lost | 0 |\n| Performance_schema_file_instances_lost | 0 |\n| Performance_schema_hosts_lost | 0 |\n| Performance_schema_locker_lost | 0 |\n| Performance_schema_mutex_classes_lost | 0 |\n| Performance_schema_mutex_instances_lost | 0 |\n| Performance_schema_rwlock_classes_lost | 0 |\n| Performance_schema_rwlock_instances_lost | 0 |\n| Performance_schema_session_connect_attrs_lost | 0 |\n| Performance_schema_socket_classes_lost | 0 |\n| Performance_schema_socket_instances_lost | 0 |\n| Performance_schema_stage_classes_lost | 0 |\n| Performance_schema_statement_classes_lost | 0 |\n| Performance_schema_table_handles_lost | 0 |\n| Performance_schema_table_instances_lost | 0 |\n| Performance_schema_thread_classes_lost | 0 |\n| Performance_schema_thread_instances_lost | 0 |\n| Performance_schema_users_lost | 0 |\n| Prepared_stmt_count | 0 |\n| Qcache_free_blocks | 1 |\n| Qcache_free_memory | 1031336 |\n| Qcache_hits | 0 |\n| Qcache_inserts | 0 |\n| Qcache_lowmem_prunes | 0 |\n| Qcache_not_cached | 0 |\n| Qcache_queries_in_cache | 0 |\n| Qcache_total_blocks | 1 |\n| Queries | 4 |\n| Questions | 4 |\n| Rows_read | 10 |\n| Rows_sent | 517 |\n| Rows_tmp_read | 516 |\n| Rpl_status | AUTH_MASTER |\n| Select_full_join | 0 |\n| Select_full_range_join | 0 |\n| Select_range | 0 |\n| Select_range_check | 0 |\n| Select_scan | 2 |\n| Slave_connections | 0 |\n| Slave_heartbeat_period | 0.000 |\n| Slave_open_temp_tables | 0 |\n| Slave_received_heartbeats | 0 |\n| Slave_retried_transactions | 0 |\n| Slave_running | OFF |\n| Slave_skipped_errors | 0 |\n| Slaves_connected | 0 |\n| Slaves_running | 0 |\n| Slow_launch_threads | 0 |\n| Slow_queries | 0 |\n| Sort_merge_passes | 0 |\n| Sort_priority_queue_sorts | 0 |\n| Sort_range | 0 |\n| Sort_rows | 0 |\n| Sort_scan | 0 |\n| Ssl_accept_renegotiates | 0 |\n| Ssl_accepts | 0 |\n| Ssl_callback_cache_hits | 0 |\n| Ssl_cipher | |\n| Ssl_cipher_list | |\n| Ssl_client_connects | 0 |\n| Ssl_connect_renegotiates | 0 |\n| Ssl_ctx_verify_depth | 0 |\n| Ssl_ctx_verify_mode | 0 |\n| Ssl_default_timeout | 0 |\n| Ssl_finished_accepts | 0 |\n| Ssl_finished_connects | 0 |\n| Ssl_server_not_after | |\n| Ssl_server_not_before | |\n| Ssl_session_cache_hits | 0 |\n| Ssl_session_cache_misses | 0 |\n| Ssl_session_cache_mode | NONE |\n| Ssl_session_cache_overflows | 0 |\n| Ssl_session_cache_size | 0 |\n| Ssl_session_cache_timeouts | 0 |\n| Ssl_sessions_reused | 0 |\n| Ssl_used_session_cache_entries | 0 |\n| Ssl_verify_depth | 0 |\n| Ssl_verify_mode | 0 |\n| Ssl_version | |\n| Subquery_cache_hit | 0 |\n| Subquery_cache_miss | 0 |\n| Syncs | 2 |\n| Table_locks_immediate | 21 |\n| Table_locks_waited | 0 |\n| Tc_log_max_pages_used | 0 |\n| Tc_log_page_size | 4096 |\n| Tc_log_page_waits | 0 |\n| Threadpool_idle_threads | 0 |\n| Threadpool_threads | 0 |\n| Threads_cached | 0 |\n| Threads_connected | 1 |\n| Threads_created | 2 |\n| Threads_running | 1 |\n| Update_scan | 0 |\n| Uptime | 223 |\n| Uptime_since_flush_status | 223 |\n| wsrep_cluster_conf_id | 18446744073709551615 |\n| wsrep_cluster_size | 0 |\n| wsrep_cluster_state_uuid | |\n| wsrep_cluster_status | Disconnected |\n| wsrep_connected | OFF |\n| wsrep_local_bf_aborts | 0 |\n| wsrep_local_index | 18446744073709551615 |\n| wsrep_provider_name | |\n| wsrep_provider_vendor | |\n| wsrep_provider_version | |\n| wsrep_ready | OFF |\n| wsrep_thread_count | 0 |\n+--------------------------------------------------------------+----------------------------------------+\n516 rows in set (0.00 sec)\n \nExample of filtered output:\n \nSHOW STATUS LIKE \'Key%\';\n \n+------------------------+--------+\n| Variable_name | Value |\n+------------------------+--------+\n| Key_blocks_not_flushed | 0 |\n| Key_blocks_unused | 107163 |\n| Key_blocks_used | 0 |\n| Key_blocks_warm | 0 |\n| Key_read_requests | 0 |\n| Key_reads | 0 |\n| Key_write_requests | 0 |\n| Key_writes | 0 |\n+------------------------+--------+\n8 rows in set (0.00 sec)\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/show-status/','','https://mariadb.com/kb/en/show-status/'),(411,'DO',27,'Syntax\n------ \nDO expr [, expr] ...\n \nDescription\n----------- \n DO executes the expressions but does not return any\nresults. In most respects, DO is shorthand for\n SELECT expr, ..., but has the advantage that it is slightly\nfaster when you do not care about the result.\n \n DO is useful primarily with functions that have side\n effects, such as RELEASE_LOCK().\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/do/','','https://mariadb.com/kb/en/do/'),(212,'LAST_INSERT_ID',17,'Syntax\n------ \nLAST_INSERT_ID(), LAST_INSERT_ID(expr)\n \nDescription\n----------- \nLAST_INSERT_ID() (no arguments) returns\nthe first automatically generated value successfully\ninserted for an\nAUTO_INCREMENT column as a result of the most recently\nexecuted INSERT\nstatement. The value of LAST_INSERT_ID() remains unchanged\nif no rows\nare successfully inserted.\n \nIf one gives an argument to LAST_INSERT_ID(), then it will\nreturn the value of the expression and\nthe next call to LAST_INSERT_ID() will return the same\nvalue. The value will also be sent to the client\nand can be accessed by the mysql_insert_id function.\n \nFor example, after inserting a row that generates an\nAUTO_INCREMENT\nvalue, you can get the value like this:\n \nSELECT LAST_INSERT_ID();\n+------------------+\n| LAST_INSERT_ID() |\n+------------------+\n| 9 |\n+------------------+\n \nYou can also use LAST_INSERT_ID() to delete the last\ninserted row:\n \nDELETE FROM product WHERE id = LAST_INSERT_ID();\n \nIf no rows were successfully inserted, LAST_INSERT_ID()\nreturns 0.\n \nThe value of LAST_INSERT_ID() will be consistent across all\nversions\nif all rows in the INSERT or UPDATE statement were\nsuccessful.\n \nThe currently executing statement does not affect the value\nof\nLAST_INSERT_ID(). Suppose that you generate an\nAUTO_INCREMENT value\nwith one statement, and then refer to LAST_INSERT_ID() in a\nmultiple-row INSERT statement that inserts rows into a table\nwith its\nown AUTO_INCREMENT column. The value of LAST_INSERT_ID()\nwill remain\nstable in the second statement; its value for the second and\nlater\nrows is not affected by the earlier row insertions.\n(However, if you\nmix references to LAST_INSERT_ID() and LAST_INSERT_ID(expr),\nthe\neffect is undefined.)\n \nIf the previous statement returned an error, the value of\nLAST_INSERT_ID() is undefined. For transactional tables, if\nthe\nstatement is rolled back due to an error, the value of\nLAST_INSERT_ID() is left undefined. For manual ROLLBACK, the\nvalue of\nLAST_INSERT_ID() is not restored to that before the\ntransaction; it\nremains as it was at the point of the ROLLBACK.\n \nWithin the body of a stored routine (procedure or function)\nor a\ntrigger, the value of LAST_INSERT_ID() changes the same way\nas for\nstatements executed outside the body of these kinds of\nobjects. The\neffect of a stored routine or trigger upon the value of\nLAST_INSERT_ID() that is seen by following statements\ndepends on the\nkind of routine:\nIf a stored procedure executes statements that change the\nvalue of LAST_INSERT_ID(), the new value will be seen by\nstatements that follow the procedure call.\n \nFor stored functions and triggers that change the value, the\nvalue is restored when the function or trigger ends, so\nfollowing statements will not see a changed value.\n \nExamples\n-------- \nCREATE TABLE t (\n id INTEGER UNSIGNED AUTO_INCREMENT PRIMARY KEY, \n f VARCHAR(1)) \nENGINE = InnoDB;\n \nINSERT INTO t(f) VALUES(\'a\');\n \nSELECT LAST_INSERT_ID();\n+------------------+\n| LAST_INSERT_ID() |\n+------------------+\n| 1 |\n+------------------+\n \nINSERT INTO t(f) VALUES(\'b\');\n \nINSERT INTO t(f) VALUES(\'c\');\n \nSELECT LAST_INSERT_ID();\n+------------------+\n| LAST_INSERT_ID() |\n+------------------+\n| 3 |\n+------------------+\n \nINSERT INTO t(f) VALUES(\'d\'),(\'e\');\n \nSELECT LAST_INSERT_ID();\n+------------------+\n| LAST_INSERT_ID() |\n+------------------+\n| 4 |\n+------------------+\n \nSELECT * FROM t;\n \n+----+------+\n| id | f |\n+----+------+\n| 1 | a |\n| 2 | b |\n| 3 | c |\n| 4 | d |\n| 5 | e |\n+----+------+\n \nSELECT LAST_INSERT_ID(12);\n+--------------------+\n| LAST_INSERT_ID(12) |\n+--------------------+\n| 12 |\n+--------------------+\n \nSELECT LAST_INSERT_ID();\n+------------------+\n| LAST_INSERT_ID() |\n+------------------+\n| 12 |\n+------------------+\n \nINSERT INTO t(f) VALUES(\'f\');\n \nSELECT LAST_INSERT_ID();\n+------------------+\n| LAST_INSERT_ID() |\n+------------------+\n| 6 |\n+------------------+\n \nSELECT * FROM t;\n \n+----+------+\n| id | f |\n+----+------+\n| 1 | a |\n| 2 | b |\n| 3 | c |\n| 4 | d |\n| 5 | e |\n| 6 | f |\n+----+------+\n \nSELECT LAST_INSERT_ID(12);\n+--------------------+\n| LAST_INSERT_ID(12) |\n+--------------------+\n| 12 |\n+--------------------+\n \nINSERT INTO t(f) VALUES(\'g\');\n \nSELECT * FROM t;\n \n+----+------+\n| id | f |\n+----+------+\n| 1 | a |\n| 2 | b |\n| 3 | c |\n| 4 | d |\n| 5 | e |\n| 6 | f |\n| 7 | g |\n+----+------+\n \n\n\nURL: https://mariadb.com/kb/en/last_insert_id/','','https://mariadb.com/kb/en/last_insert_id/'),(214,'PROCEDURE ANALYSE',17,'Syntax\n------ \nanalyse([max_elements[,max_memory]])\n \nDescription\n----------- \nThis procedure is defined in the sql/sql_analyse.cc file. It\nexamines\nthe result from a query and returns an analysis of the\nresults that\nsuggests optimal data types for each column. To obtain this\nanalysis,\nappend PROCEDURE ANALYSE to the end of a SELECT statement:\n \nSELECT ... FROM ... WHERE ... PROCEDURE\nANALYSE([max_elements,[max_memory]])\n \nFor example:\n \nSELECT col1, col2 FROM table1 PROCEDURE ANALYSE(10, 2000);\n \nThe results show some statistics for the values returned by\nthe query,\nand propose an optimal data type for the columns. This can\nbe helpful\nfor checking your existing tables, or after importing new\ndata. You\nmay need to try different settings for the arguments so that\nPROCEDURE\nANALYSE() does not suggest the ENUM data type when it is not\nappropriate.\n \nThe arguments are optional and are used as follows:\nmax_elements (default 256) is the maximum number of distinct\nvalues that analyse notices per column. This is used by\nanalyse to check whether the optimal data type should be of\ntype ENUM; if there are more than max_elements distinct\nvalues, then ENUM is not a suggested type.\nmax_memory (default 8192) is the maximum amount of memory\nthat analyse should allocate per column while trying to find\nall distinct values.\n \n\n\nURL: https://mariadb.com/kb/en/procedure-analyse/','','https://mariadb.com/kb/en/procedure-analyse/'),(412,'DUAL',27,'Description\n----------- \nYou are allowed to specify DUAL as a dummy table name in\nsituations where no tables are referenced, such as the\nfollowing SELECT statement:\n \nSELECT 1 + 1 FROM DUAL;\n \n+-------+\n| 1 + 1 |\n+-------+\n| 2 |\n+-------+\n \n DUAL is purely for the convenience of people who require\n that all SELECT statements should have\n FROM and possibly other clauses. MariaDB ignores the\n clauses. MariaDB does not require FROM DUAL if no tables\n are referenced.\n \nFROM DUAL could be used when you only SELECT computed\nvalues, but require a WHERE clause, perhaps to test that a\nscript correctly handles empty resultsets:\n \nSELECT 1 FROM DUAL WHERE FALSE;\n \nEmpty set (0.00 sec)\n \n\n\nURL: https://mariadb.com/kb/en/dual/','','https://mariadb.com/kb/en/dual/'),(414,'FOR UPDATE',27,'The FOR UPDATE clause of SELECT applies only when autocommit\nis set to 0 or the SELECT is enclosed in a transaction. A\nlock is acquired on the rows, and other transactions are\nprevented from writing the rows, acquire locks, and from\nreading them (unless their isolation level is READ\nUNCOMMITTED).\n \nIf autocommit is set to 1, the LOCK IN SHARE MODE and FOR\nUPDATE clauses have no effect.\n \nIf the isolation level is set to SERIALIZABLE, all plain\nSELECT statements are converted to SELECT ... LOCK IN SHARE\nMODE.\n \nExample\n \nSELECT * FROM trans WHERE period=2001 FOR UPDATE;\n \n\n\nURL: https://mariadb.com/kb/en/for-update/','','https://mariadb.com/kb/en/for-update/'),(213,'LAST_VALUE',17,'Syntax\n------ \nLAST_VALUE(expr,[expr,...])\n \nLAST_VALUE(expr) OVER (\n [ PARTITION BY partition_expression ]\n [ ORDER BY order_list ]\n) \n \nDescription\n----------- \nLAST_VALUE() evaluates all expressions and returns the last.\n \nThis is useful together with setting user variables to a\nvalue with @var:=expr, for example when you want to get data\nof rows updated/deleted without having to do two queries\nagainst the table.\n \nSince MariaDB 10.2.2, LAST_VALUE can be used as a window\nfunction.\n \nReturns NULL if no last value exists.\n \nExamples\n-------- \nCREATE TABLE t1 (a int, b int);\nINSERT INTO t1 VALUES(1,10),(2,20);\nDELETE FROM t1 WHERE a=1 AND last_value(@a:=a,@b:=b,1);\nSELECT @a,@b;\n \n+------+------+\n| @a | @b |\n+------+------+\n| 1 | 10 |\n+------+------+\n \nAs a window function:\n \nCREATE TABLE t1 (\n pk int primary key,\n a int,\n b int,\n c char(10),\n d decimal(10, 3),\n e real\n);\n \nINSERT INTO t1 VALUES\n( 1, 0, 1, \'one\', 0.1, 0.001),\n( 2, 0, 2, \'two\', 0.2, 0.002),\n( 3, 0, 3, \'three\', 0.3, 0.003),\n( 4, 1, 2, \'three\', 0.4, 0.004),\n( 5, 1, 1, \'two\', 0.5, 0.005),\n( 6, 1, 1, \'one\', 0.6, 0.006),\n( 7, 2, NULL, \'n_one\', 0.5, 0.007),\n( 8, 2, 1, \'n_two\', NULL, 0.008),\n( 9, 2, 2, NULL, 0.7, 0.009),\n(10, 2, 0, \'n_four\', 0.8, 0.010),\n(11, 2, 10, NULL, 0.9, NULL);\n \nSELECT pk, FIRST_VALUE(pk) OVER (ORDER BY pk) AS first_asc,\n LAST_VALUE(pk) OVER (ORDER BY pk) AS last_asc,\n FIRST_VALUE(pk) OVER (ORDER BY pk DESC) AS first_desc,\n LAST_VALUE(pk) OVER (ORDER BY pk DESC) AS last_desc\nFROM t1\nORDER BY pk DESC;\n \n+----+-----------+----------+------------+-----------+\n| pk | first_asc | last_asc | first_desc | last_desc |\n+----+-----------+----------+------------+-----------+\n| 11 | 1 | 11 | 11 | 11 |\n| 10 | 1 | 10 | 11 | 10 |\n| 9 | 1 | 9 | 11 | 9 |\n| 8 | 1 | 8 | 11 | 8 |\n| 7 | 1 | 7 | 11 | 7 |\n| 6 | 1 | 6 | 11 | 6 |\n| 5 | 1 | 5 | 11 | 5 |\n| 4 | 1 | 4 | 11 | 4 |\n| 3 | 1 | 3 | 11 | 3 |\n| 2 | 1 | 2 | 11 | 2 |\n| 1 | 1 | 1 | 11 | 1 |\n+----+-----------+----------+------------+-----------+\n \nCREATE OR REPLACE TABLE t1 (i int);\nINSERT INTO t1 VALUES\n(1),(2),(3),(4),(5),(6),(7),(8),(9),(10);\n \nSELECT i,\n FIRST_VALUE(i) OVER (ORDER BY i ROWS BETWEEN CURRENT ROW\nand 1 FOLLOWING) AS f_1f,\n LAST_VALUE(i) OVER (ORDER BY i ROWS BETWEEN CURRENT ROW and\n1 FOLLOWING) AS l_1f,\n FIRST_VALUE(i) OVER (ORDER BY i ROWS BETWEEN 1 PRECEDING\nAND 1 FOLLOWING) AS f_1p1f,\n LAST_VALUE(i) OVER (ORDER BY i ROWS BETWEEN 1 PRECEDING AND\n1 FOLLOWING) AS f_1p1f,\n FIRST_VALUE(i) OVER (ORDER BY i ROWS BETWEEN 2 PRECEDING\nAND 1 PRECEDING) AS f_2p1p,\n LAST_VALUE(i) OVER (ORDER BY i ROWS BETWEEN 2 PRECEDING AND\n1 PRECEDING) AS f_2p1p,\n FIRST_VALUE(i) OVER (ORDER BY i ROWS BETWEEN 1 FOLLOWING\nAND 2 FOLLOWING) AS f_1f2f,\n LAST_VALUE(i) OVER (ORDER BY i ROWS BETWEEN 1 FOLLOWING AND\n2 FOLLOWING) AS f_1f2f\nFROM t1;\n \n+------+------+------+--------+--------+--------+--------+--------+--------+\n| i | f_1f | l_1f | f_1p1f | f_1p1f | f_2p1p | f_2p1p |\nf_1f2f | f_1f2f |\n+------+------+------+--------+--------+--------+--------+--------+--------+\n| 1 | 1 | 2 | 1 | 2 | NULL | NULL | 2 | 3 |\n| 2 | 2 | 3 | 1 | 3 | 1 | 1 | 3 | 4 |\n| 3 | 3 | 4 | 2 | 4 | 1 | 2 | 4 | 5 |\n| 4 | 4 | 5 | 3 | 5 | 2 | 3 | 5 | 6 |\n| 5 | 5 | 6 | 4 | 6 | 3 | 4 | 6 | 7 |\n| 6 | 6 | 7 | 5 | 7 | 4 | 5 | 7 | 8 |\n| 7 | 7 | 8 | 6 | 8 | 5 | 6 | 8 | 9 |\n| 8 | 8 | 9 | 7 | 9 | 6 | 7 | 9 | 10 |\n| 9 | 9 | 10 | 8 | 10 | 7 | 8 | 10 | 10 |\n| 10 | 10 | 10 | 9 | 10 | 8 | 9 | NULL | NULL |\n+------+------+------+--------+--------+--------+--------+--------+--------+\n \n\n\nURL: https://mariadb.com/kb/en/last_value/','','https://mariadb.com/kb/en/last_value/'),(215,'ROW_COUNT',17,'Syntax\n------ \nROW_COUNT()\n \nDescription\n----------- \nROW_COUNT() returns the number of rows updated, inserted or\ndeleted\nby the preceding statement. This is the same as the row\ncount that the\nmysql client displays and the value from the\nmysql_affected_rows() C\nAPI function.\n \nGenerally:\nFor statements which return a result set (such as SELECT,\nSHOW, DESC or HELP), returns -1, even when the result set is\nempty. This is also true for administrative statements, such\nas OPTIMIZE.\nFor DML statements other than SELECT and for ALTER TABLE,\nreturns the number of affected rows.\nFor DDL statements (including TRUNCATE) and for other\nstatements which don\'t return any result set (such as USE,\nDO, SIGNAL or DEALLOCATE PREPARE), returns 0.\n \nFor UPDATE, affected rows is by default the number of rows\nthat were actually changed. If the CLIENT_FOUND_ROWS flag to\nmysql_real_connect() is specified when connecting to mysqld,\naffected rows is instead the number of rows matched by the\nWHERE clause. \n \nFor REPLACE, deleted rows are also counted. So, if REPLACE\ndeletes a row and adds a new row, ROW_COUNT() returns 2.\n \nFor INSERT ... ON DUPLICATE KEY, updated rows are counted\ntwice. So, if INSERT adds a new rows and modifies another\nrow, ROW_COUNT() returns 3.\n \nROW_COUNT() does not take into account rows that are not\ndirectly deleted/updated by the last statement. This means\nthat rows deleted by foreign keys or triggers are not\ncounted.\n \nWarning: You can use ROW_COUNT() with prepared statements,\nbut you need to call it after EXECUTE, not after DEALLOCATE\nPREPARE, because the row count for allocate prepare is\nalways 0.\n \nWarning: When used after a CALL statement, this function\nreturns the number of rows affected by the last statement in\nthe procedure, not by the whole procedure.\n \nWarning: After INSERT DELAYED, ROW_COUNT() returns the\nnumber of the rows you tried to insert, not the number of\nthe successful writes.\n \nThis information can also be found in the diagnostics area.\n \nStatements using the ROW_COUNT() function are not safe for\nreplication.\n \nExamples\n-------- \nCREATE TABLE t (A INT);\n \nINSERT INTO t VALUES(1),(2),(3);\n \nSELECT ROW_COUNT();\n+-------------+\n| ROW_COUNT() |\n+-------------+\n| 3 |\n+-------------+\n \nDELETE FROM t WHERE A IN(1,2);\n \nSELECT ROW_COUNT(); \n+-------------+\n| ROW_COUNT() |\n+-------------+\n| 2 |\n+-------------+\n \nExample with prepared statements:\n \nSET @q = \'INSERT INTO t VALUES(1),(2),(3);\';\n \nPREPARE stmt FROM @q;\n \nEXECUTE stmt;\n \nQuery OK, 3 rows affected (0.39 sec)\nRecords: 3 Duplicates: 0 Warnings: 0\n \nSELECT ROW_COUNT();\n+-------------+\n| ROW_COUNT() |\n+-------------+\n| 3 |\n+-------------+\n \n\n\nURL: https://mariadb.com/kb/en/row_count/','','https://mariadb.com/kb/en/row_count/'),(416,'HANDLER Commands',27,'Syntax\n------ \nHANDLER tbl_name OPEN [ [AS] alias]\nHANDLER tbl_name READ index_name { = | >= | = | \n\nURL: https://mariadb.com/kb/en/handler-commands/','','https://mariadb.com/kb/en/handler-commands/'),(430,'LOCK IN SHARE MODE',27,'When LOCK IN SHARE MODE is specified in a SELECT statement,\nMariaDB will wait until all transactions that have modified\nthe rows are committed. Then, a write lock is acquired. All\ntransactions can read the rows, but if they want to modify\nthem, they have to wait until your transaction is committed.\n \nInnoDB/XtraDB supports row-level locking. selected rows can\nbe locked using LOCK IN SHARE MODE or FOR UPDATE. In both\ncases, a lock is acquired on the rows read by the query, and\nit will be released when the current transaction is\ncommitted.\n \nIf autocommit is set to 1, the LOCK IN SHARE MODE and FOR\nUPDATE clauses have no effect.\n \n\n\nURL: https://mariadb.com/kb/en/lock-in-share-mode/','','https://mariadb.com/kb/en/lock-in-share-mode/'),(219,'USER',17,'Syntax\n------ \nUSER()\n \nDescription\n----------- \nReturns the current MariaDB user name and host name, given\nwhen authenticating to MariaDB, as a string in the utf8\ncharacter set.\n \nNote that the value of USER() may differ from the value of\nCURRENT_USER(), which is the user used to authenticate the\ncurrent client. \nCURRENT_ROLE() returns the current active role.\n \nSYSTEM_USER() and SESSION_USER are synonyms for USER().\n \nStatements using the USER() function or one of its synonyms\nare not safe for statement level replication.\n \nExamples\n-------- \nshell> mysql --user=\"anonymous\"\n \nMariaDB [(none)]> select user(),current_user();\n+---------------------+----------------+\n| user() | current_user() |\n+---------------------+----------------+\n| anonymous@localhost | @localhost |\n+---------------------+----------------+\n \n\n\nURL: https://mariadb.com/kb/en/user/','','https://mariadb.com/kb/en/user/'),(220,'VERSION',17,'Syntax\n------ \nVERSION()\n \nDescription\n----------- \nReturns a string that indicates the MariaDB server version.\nThe string\nuses the utf8 character set.\n \nExamples\n-------- \nSELECT VERSION();\n+----------------+\n| VERSION() |\n+----------------+\n| 10.4.7-MariaDB |\n+----------------+\n \nThe VERSION() string may have one or more of the following\nsuffixes:\n \nSuffix | Description | \n \n-embedded | The server is an embedded server (libmysqld). | \n \n-log | General logging, slow logging or binary (replication)\nlogging is enabled. | \n \n-debug | The server is compiled for debugging. | \n \n-valgrind |  The server is compiled to be instrumented with\nvalgrind. | \n \nChanging the Version String\n \nSome old legacy code may break because they are parsing the\nVERSION string and expecting a MySQL string or a simple\nversion\nstring like Joomla til API17, see MDEV-7780.\n \nFrom MariaDB 10.2, one can fool these applications by\nsetting the version string from the command line or the\nmy.cnf files with --version=....\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/version/','','https://mariadb.com/kb/en/version/'),(221,'Not Equal Operator',18,'Syntax\n------ \n, !=\n \nDescription\n----------- \nNot equal operator. Evaluates both SQL expressions and\nreturns 1 if they are not equal and 0 if they are equal, or\nNULL if either expression is NULL. If the expressions return\ndifferent data types, (for instance, a number and a string),\nperforms type conversion.\n \nWhen used in row comparisons these two queries return the\nsame results:\n \nSELECT (t1.a, t1.b) != (t2.x, t2.y) \nFROM t1 INNER JOIN t2;\n \nSELECT (t1.a != t2.x) OR (t1.b != t2.y)\nFROM t1 INNER JOIN t2;\n \nExamples\n-------- \nSELECT \'.01\' \'0.01\';\n \n+-----------------+\n| \'.01\' \'0.01\' |\n+-----------------+\n| 1 |\n+-----------------+\n \nSELECT .01 \'0.01\';\n \n+---------------+\n| .01 \'0.01\' |\n+---------------+\n| 0 |\n+---------------+\n \nSELECT \'zapp\' \'zappp\';\n \n+-------------------+\n| \'zapp\' \'zappp\' |\n+-------------------+\n| 1 |\n+-------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/not-equal/','','https://mariadb.com/kb/en/not-equal/'),(224,'&lt;=&gt;',18,'Syntax\n------ \n\n \nDescription\n----------- \nNULL-safe equal operator. It performs an equality comparison\nlike\nthe = operator, but returns 1 rather than NULL if both\noperands are\nNULL, and 0 rather than NULL if one operand is NULL.\n \na b is equivalent to a = b OR (a IS NULL AND b IS NULL).\n \nWhen used in row comparisons these two queries return the\nsame results:\n \nSELECT (t1.a, t1.b) (t2.x, t2.y) \nFROM t1 INNER JOIN t2;\n \nSELECT (t1.a t2.x) AND (t1.b t2.y)\nFROM t1 INNER JOIN t2;\n \nSee also NULL Values in MariaDB.\n \nExamples\n-------- \nSELECT 1 1, NULL NULL, 1 NULL;\n \n+---------+---------------+------------+\n| 1 1 | NULL NULL | 1 NULL |\n+---------+---------------+------------+\n| 1 | 1 | 0 |\n+---------+---------------+------------+\n \nSELECT 1 = 1, NULL = NULL, 1 = NULL;\n \n+-------+-------------+----------+\n| 1 = 1 | NULL = NULL | 1 = NULL |\n+-------+-------------+----------+\n| 1 | NULL | NULL |\n+-------+-------------+----------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/null-safe-equal/','','https://mariadb.com/kb/en/null-safe-equal/'),(225,'=',18,'Syntax\n------ \nleft_expr = right_expr\n \nDescription\n----------- \nEqual operator. Evaluates both SQL expressions and returns 1\nif they are equal, 0 if they are not equal, or NULL if\neither expression is NULL. If the expressions return\ndifferent data types (for example, a number and a string), a\ntype conversion is performed.\n \nWhen used in row comparisons these two queries are\nsynonymous and return the same results:\n \nSELECT (t1.a, t1.b) = (t2.x, t2.y) FROM t1 INNER JOIN t2;\n \nSELECT (t1.a = t2.x) AND (t1.b = t2.y) FROM t1 INNER JOIN\nt2;\n \nTo perform a NULL-safe comparison, use the operator.\n \n= can also be used as an assignment operator.\n \nExamples\n-------- \nSELECT 1 = 0;\n \n+-------+\n| 1 = 0 |\n+-------+\n| 0 |\n+-------+\n \nSELECT \'0\' = 0;\n \n+---------+\n| \'0\' = 0 |\n+---------+\n| 1 |\n+---------+\n \nSELECT \'0.0\' = 0;\n \n+-----------+\n| \'0.0\' = 0 |\n+-----------+\n| 1 |\n+-----------+\n \nSELECT \'0.01\' = 0;\n \n+------------+\n| \'0.01\' = 0 |\n+------------+\n| 0 |\n+------------+\n \nSELECT \'.01\' = 0.01;\n \n+--------------+\n| \'.01\' = 0.01 |\n+--------------+\n| 1 |\n+--------------+\n \nSELECT (5 * 2) = CONCAT(\'1\', \'0\');\n+----------------------------+\n| (5 * 2) = CONCAT(\'1\', \'0\') |\n+----------------------------+\n| 1 |\n+----------------------------+\n \nSELECT 1 = NULL;\n \n+----------+\n| 1 = NULL |\n+----------+\n| NULL |\n+----------+\n \nSELECT NULL = NULL;\n \n+-------------+\n| NULL = NULL |\n+-------------+\n| NULL |\n+-------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/equal/','','https://mariadb.com/kb/en/equal/'),(433,'PROCEDURE',27,'The PROCEDURE clause of SELECT passes the whole result set\nto a Procedure which will process it. These Procedures are\nnot Stored Procedures, and can only be written in the C\nlanguage, so it is necessary to recompile the server.\n \nCurrently, the only available procedure is ANALYSE, which\nexamines the resultset and suggests the optimal datatypes\nfor each column. It is defined in the sql/sql_analyse.cc\nfile, and can be used as an example to create more\nProcedures.\n \nThis clause cannot be used in a view\'s definition.\n \n\n\nURL: https://mariadb.com/kb/en/procedure/','','https://mariadb.com/kb/en/procedure/'),(445,'EXPLAIN',28,'Syntax\n------ \nEXPLAIN tbl_name\n \nOr\n \nEXPLAIN [EXTENDED | PARTITIONS] \n {SELECT select_options | UPDATE update_options | DELETE\ndelete_options}\n \nDescription\n----------- \nThe EXPLAIN statement can be used either as a synonym for\nDESCRIBE or as a way to obtain information about how MariaDB\nexecutes a SELECT (as well as UPDATE and DELETE since\nMariaDB 10.0.5) statement:\n\'EXPLAIN tbl_name\' is synonymous with \n \'DESCRIBE tbl_name\' or \n \'SHOW COLUMNS FROM tbl_name\'.\nWhen you precede a SELECT statement (or, since MariaDB\n10.0.5, an UPDATE or a DELETE as well) with the keyword \n EXPLAIN, MariaDB displays information from the optimizer\n about the query execution plan. That is, MariaDB explains\nhow it would\n process the SELECT, UPDATE or DELETE, including information\nabout how tables\n are joined and in which order. EXPLAIN EXTENDED can be\n used to provide additional information.\nEXPLAIN PARTITIONS has been available since MySQL 5.1.5. It\nis useful only when examining queries involving partitioned\ntables. For details, see Partition pruning and selection.\nANALYZE statement, which performs the query as well as\nproducing EXPLAIN output, and provides actual as well as\nestimated statistics, has been available from MariaDB\n10.1.0.\nSince MariaDB 10.0.5, it has been possible to have EXPLAIN\noutput printed in the slow query log. See EXPLAIN in the\nSlow Query Log for details.\n \nSince MariaDB 10.0, SHOW EXPLAIN shows the output of a\nrunning statement. In some cases, its output can be closer\nto reality than EXPLAIN.\n \nSince MariaDB 10.1, the ANALYZE statement runs a statement\nand returns information about its execution plan. It also\nshows additional columns, to check how much the optimizer\'s\nestimation about filtering and found rows are close to\nreality.\n \nThere is an online EXPLAIN Analyzer that you can use to\nshare EXPLAIN and EXPLAIN EXTENDED output with others.\n \nEXPLAIN can acquire metadata locks in the same way that\nSELECT does, as it needs to know table metadata and,\nsometimes, data as well.\n \nThe columns in EXPLAIN ... SELECT\n \nColumn name | Description | \n \nid | Sequence number that shows in which order tables are\njoined. | \n \nselect_type | What kind of SELECT the table comes from. | \n \ntable | Alias name of table. Materialized temporary tables\nfor sub queries are named | \n \ntype | How rows are found from the table (join type). | \n \npossible_keys | keys in table that could be used to find\nrows in the table | \n \nkey | The name of the key that is used to retrieve rows.\nNULL is no key was used. | \n \nkey_len | How many bytes of the key that was used (shows if\nwe are using only parts of the multi-column key). | \n \nref | The reference that is used to as the key value. | \n \nrows | An estimate of how many rows we will find in the\ntable for each key lookup. | \n \nExtra | Extra information about this join. | \n \nHere are descriptions of the values for some of the more\ncomplex columns in EXPLAIN ... SELECT:\n \n\"select_type\" column\n \nThe select_type column can have the following values:\n \nValue | Description | \n \nDEPENDENT SUBQUERY | The SUBQUERY is DEPENDENT. | \n \nDEPENDENT UNION | The UNION is DEPENDENT. | \n \nDERIVED | The SELECT is DERIVED from the PRIMARY. | \n \nMATERIALIZED | The SUBQUERY is MATERIALIZED. | \n \nPRIMARY | The SELECT is a PRIMARY one. | \n \nSIMPLE | The SELECT is a SIMPLE one. | \n \nSUBQUERY | The SELECT is a SUBQUERY of the PRIMARY. | \n \nUNCACHEABLE SUBQUERY | The SUBQUERY is UNCACHEABLE. | \n \nUNCACHEABLE UNION | The UNION is UNCACHEABLE. | \n \nUNION | The SELECT is a UNION of the PRIMARY. | \n \nUNION RESULT | The result of the UNION. | \n \n\"Type\" column\n \nThis column contains information on how the table is\naccessed.\n \nValue | Description | \n \nALL | A full table scan is done for the table (all rows are\nread). This is bad if the table is large and the table is\njoined against a previous table! This happens when the\noptimizer could not find any usable index to access rows. | \n \nconst | There is only one possibly matching row in the\ntable. The row is read before the optimization phase and all\ncolumns in the table are treated as constants. | \n \neq_ref | A unique index is used to find the rows. This is\nthe best possible plan to find the row. | \n \nfulltext | A fulltext index is used to access the rows. | \n \nindex_merge | A \'range\' access is done for for several\nindex and the found rows are merged. The key column shows\nwhich keys are used. | \n \nindex_subquery | This is similar as ref, but used for sub\nqueries that are transformed to key lookups. | \n \nindex | A full scan over the used index. Better than ALL but\nstill bad if index is large and the table is joined against\na previous table. | \n \nrange | The table will be accessed with a key over one or\nmore value ranges. | \n \nref_or_null | Like \'ref\' but in addition another search\nfor the \'null\' value is done if the first value was not\nfound. This happens usually with sub queries. | \n \nref | A non unique index or prefix of an unique index is\nused to find the rows. Good if the prefix doesn\'t match\nmany rows. | \n \nsystem | The table has 0 or 1 rows. | \n \nunique_subquery | This is similar as eq_ref, but used for\nsub queries that are transformed to key lookups | \n \n\"Extra\" column\n \nThis column consists of one or more of the following values,\nseparated by \';\'\n \n Note that some of these values are detected after the\noptimization phase.\n \nThe optimization phase can do the following changes to the\nWHERE clause:\nAdd the expressions from the ON and USING clauses to the\nWHERE\n clause.\nConstant propagation: If there is column=constant, replace\nall column\n instances with this constant.\nReplace all columns from \'const\' tables with their values.\nRemove the used key columns from the WHERE (as this will be\ntested as\n part of the key lookup).\nRemove impossible constant sub expressions.\n For example WHERE \'(a=1 and a=2) OR b=1\' becomes \'b=1\'.\nReplace columns with other columns that has identical\nvalues:\n Example: WHERE a=b and a=c may be treated\n as \'WHERE a=b and a=c and b=c\'.\nAdd extra conditions to detect impossible row conditions\nearlier. This\n happens mainly with OUTER JOIN where we in some cases add\ndetection\n of NULL values in the WHERE (Part of \'Not exists\'\noptimization).\n This can cause an unexpected \'Using where\' in the Extra\ncolumn.\nFor each table level we remove expressions that have already\nbeen tested when\n we read the previous row. Example: When joining tables t1\nwith t2\n using the following WHERE \'t1.a=1 and t1.a=t2.b\', we\ndon\'t have to\n test \'t1.a=1\' when checking rows in t2 as we already know\nthat this\n expression is true. \n \nValue | Description | \n \nconst row not found | The table was a system table (a table\nwith should exactly one row), but no row was found. | \n \nDistinct | If distinct optimization (remove duplicates) was\nused. This is marked only for the last table in the SELECT.\n| \n \nFull scan on NULL key | The table is a part of the sub query\nand if the value that is used to match the sub query will be\nNULL, we will do a full table scan. | \n \nImpossible HAVING | The used HAVING clause is always false\nso the SELECT will return no rows. | \n \nImpossible WHERE noticed after reading const tables. | The\nused WHERE clause is always false so the SELECT will return\nno rows. This case was detected after we had read all\n\'const\' tables and used the column values as constant in\nthe WHERE clause. For example: WHERE const_column=5 and\nconst_column had a value of 4. | \n \nImpossible WHERE | The used WHERE clause is always false so\nthe SELECT will return no rows. For example: WHERE 1=2 | \n \nNo matching min/max row | During early optimization of\nMIN()/MAX() values it was detected that no row could match\nthe WHERE clause. The MIN()/MAX() function will return NULL.\n| \n \nno matching row in const table | The table was a const table\n(a table with only one possible matching row), but no row\nwas found. | \n \nNo tables used | The SELECT was a sub query that did not use\nany tables. For example a there was no FROM clause or a FROM\nDUAL clause. | \n \nNot exists | Stop searching after more row if we find one\nsingle matching row. This optimization is used with LEFT\nJOIN where one is explicitly searching for rows that\ndoesn\'t exists in the LEFT JOIN TABLE. Example: SELECT *\nFROM t1 LEFT JOIN t2 on (...) WHERE t2.not_null_column IS\nNULL. As t2.not_null_column can only be NULL if there was no\nmatching row for on condition, we can stop searching if we\nfind a single matching row. | \n \nOpen_frm_only | For information_schema tables. Only the frm\n(table definition file was opened) was opened for each\nmatching row. | \n \nOpen_full_table | For information_schema tables. A full\ntable open for each matching row is done to retrieve the\nrequested information. (Slow) | \n \nOpen_trigger_only | For information_schema tables. Only the\ntrigger file definition was opened for each matching row. | \n \nRange checked for each record (index map: ...) | This only\nhappens when there was no good default index to use but\nthere may some index that could be used when we can treat\nall columns from previous table as constants. For each row\ncombination the optimizer will decide which index to use (if\nany) to fetch a row from this table. This is not fast, but\nfaster than a full table scan that is the only other choice.\nThe index map is a bitmask that shows which index are\nconsidered for each row condition. | \n \nScanned 0/1/all databases | For information_schema tables.\nShows how many times we had to do a directory scan. | \n \nSelect tables optimized away | All tables in the join was\noptimized away. This happens when we are only using\nCOUNT(*), MIN() and MAX() functions in the SELECT and we\nwhere able to replace all of these with constants. | \n \nSkip_open_table | For information_schema tables. The queried\ntable didn\'t need to be opened. | \n \nunique row not found | The table was detected to be a const\ntable (a table with only one possible matching row) during\nthe early optimization phase, but no row was found. | \n \nUsing filesort | Filesort is needed to resolve the query.\nThis means an extra phase where we first collect all columns\nto sort, sort them with a disk based merge sort and then use\nthe sorted set to retrieve the rows in sorted order. If the\ncolumn set is small, we store all the columns in the sort\nfile to not have to go to the database to retrieve them\nagain. | \n \nUsing index | Only the index is used to retrieve the needed\ninformation from the table. There is no need to perform an\nextra seek to retrieve the actual record. | \n \nUsing index condition | Like \'Using where\' but the where\ncondition is pushed down to the table engine for internal\noptimization at the index level. | \n \nUsing index condition(BKA) | Like \'Using index condition\'\nbut in addition we use batch key access to retrieve rows. | \n \nUsing index for group-by | The index is being used to\nresolve a GROUP BY or DISTINCT query. The rows are not read.\nThis is very efficient if the table has a lot of identical\nindex entries as duplicates are quickly jumped over. | \n \nUsing intersect(...) | For index_merge joins. Shows which\nindex are part of the intersect. | \n \nUsing join buffer | We store previous row combinations in a\nrow buffer to be able to match each row against all of the\nrows combinations in the join buffer at one go. | \n \nUsing sort_union(...) | For index_merge joins. Shows which\nindex are part of the union. | \n \nUsing temporary | A temporary table is created to hold the\nresult. This typically happens if you are using GROUP BY,\nDISTINCT or ORDER BY. | \n \nUsing where | A WHERE expression (in additional to the\npossible key lookup) is used to check if the row should be\naccepted. If you don\'t have \'Using where\' together with a\njoin type of ALL, you are probably doing something wrong! | \n \nUsing where with pushed condition | Like \'Using where\' but\nthe where condition is pushed down to the table engine for\ninternal optimization at the row level. | \n \nUsing buffer | The UPDATE statement will first buffer the\nrows, and then run the updates, rather than do updates on\nthe fly. See Using Buffer UPDATE Algorithm for a detailed\nexplanation. | \n \nEXPLAIN EXTENDED\n \nThe EXTENDED keyword adds another column, filtered, to the\noutput. This is a percentage estimate of the table rows that\nwill be filtered by the condition.\n \nAn EXPLAIN EXTENDED will always throw a warning, as it adds\nextra Message information to a subsequent SHOW WARNINGS\nstatement. This includes what the SELECT query would look\nlike after optimizing and rewriting rules are applied and\nhow the optimizer qualifies columns and tables.\n \nExamples\n-------- \nAs synonym for DESCRIBE or SHOW COLUMNS FROM:\n \nDESCRIBE city;\n \n+------------+----------+------+-----+---------+----------------+\n| Field | Type | Null | Key | Default | Extra |\n+------------+----------+------+-----+---------+----------------+\n| Id | int(11) | NO | PRI | NULL | auto_increment |\n| Name | char(35) | YES | | NULL | |\n| Country | char(3) | NO | UNI | | |\n| District | char(20) | YES | MUL | | |\n| Population | int(11) | YES | | NULL | |\n+------------+----------+------+-----+---------+----------------+\n \nA simple set of examples to see how EXPLAIN can identify\npoor index usage:\n \nCREATE TABLE IF NOT EXISTS `employees_example` (\n `id` int(11) NOT NULL AUTO_INCREMENT,\n `first_name` varchar(30) NOT NULL,\n `last_name` varchar(40) NOT NULL,\n `position` varchar(25) NOT NULL,\n `home_address` varchar(50) NOT NULL,\n `home_phone` varchar(12) NOT NULL,\n `employee_code` varchar(25) NOT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `employee_code` (`employee_code`),\n KEY `first_name` (`first_name`,`last_name`)\n) ENGINE=Aria;\n \nINSERT INTO `employees_example` (`first_name`, `last_name`,\n`position`, `home_address`, `home_phone`, `employee_code`)\n VALUES\n (\'Mustapha\', \'Mond\', \'Chief Executive Officer\', \'692\nPromiscuous Plaza\', \'326-555-3492\', \'MM1\'),\n (\'Henry\', \'Foster\', \'Store Manager\', \'314 Savage\nCircle\', \'326-555-3847\', \'HF1\'),\n (\'Bernard\', \'Marx\', \'Cashier\', \'1240 Ambient\nAvenue\', \'326-555-8456\', \'BM1\'),\n (\'Lenina\', \'Crowne\', \'Cashier\', \'281 Bumblepuppy\nBoulevard\', \'328-555-2349\', \'LC1\'),\n (\'Fanny\', \'Crowne\', \'Restocker\', \'1023 Bokanovsky\nLane\', \'326-555-6329\', \'FC1\'),\n (\'Helmholtz\', \'Watson\', \'Janitor\', \'944 Soma\nCourt\', \'329-555-2478\', \'HW1\');\n \nSHOW INDEXES FROM employees_example;\n \n+-------------------+------------+---------------+--------------+---------------+-----------+-------------+----------+--------+------+------------+---------+---------------+\n| Table | Non_unique | Key_name | Seq_in_index | Column_name\n| Collation | Cardinality | Sub_part | Packed | Null |\nIndex_type | Comment | Index_comment |\n+-------------------+------------+---------------+--------------+---------------+-----------+-------------+----------+--------+------+------------+---------+---------------+\n| employees_example | 0 | PRIMARY | 1 | id | A | 7 | NULL |\nNULL | | BTREE | | |\n| employees_example | 0 | employee_code | 1 | employee_code\n| A | 7 | NULL | NULL | | BTREE | | |\n| employees_example | 1 | first_name | 1 | first_name | A |\nNULL | NULL | NULL | | BTREE | | |\n| employees_example | 1 | first_name | 2 | last_name | A |\nNULL | NULL | NULL | | BTREE | | |\n+-------------------+------------+---------------+--------------+---------------+-----------+-------------+----------+--------+------+------------+---------+---------------+\n \nSELECT on a primary key:\n \nEXPLAIN SELECT * FROM employees_example WHERE id=1;\n \n+------+-------------+-------------------+-------+---------------+---------+---------+-------+------+-------+\n| id | select_type | table | type | possible_keys | key |\nkey_len | ref | rows | Extra |\n+------+-------------+-------------------+-------+---------------+---------+---------+-------+------+-------+\n| 1 | SIMPLE | employees_example | const | PRIMARY | PRIMARY\n| 4 | const | 1 | |\n+------+-------------+-------------------+-------+---------------+---------+---------+-------+------+-------+\n \nThe type is const, which means that only one possible result\ncould be returned. \nNow, returning the same record but searching by their phone\nnumber:\n \nEXPLAIN SELECT * FROM employees_example WHERE\nhome_phone=\'326-555-3492\';\n \n+------+-------------+-------------------+------+---------------+------+---------+------+------+-------------+\n| id | select_type | table | type | possible_keys | key |\nkey_len | ref | rows | Extra |\n+------+-------------+-------------------+------+---------------+------+---------+------+------+-------------+\n| 1 | SIMPLE | employees_example | ALL | NULL | NULL | NULL\n| NULL | 6 | Using where |\n+------+-------------+-------------------+------+---------------+------+---------+------+------+-------------+\n \nHere, the type is All, which means no index could be used.\nLooking at the rows count, a full table scan (all six rows)\nhad to be performed in order to retrieve the record. If\nit\'s a requirement to search by phone number, an index will\nhave to be created.\n \nSHOW EXPLAIN example:\n \nSHOW EXPLAIN FOR 1;\n \n+------+-------------+-------+-------+---------------+------+---------+------+---------+-------------+\n| id | select_type | table | type | possible_keys | key |\nkey_len | ref | rows | Extra |\n+------+-------------+-------+-------+---------------+------+---------+------+---------+-------------+\n| 1 | SIMPLE | tbl | index | NULL | a | 5 | NULL | 1000107 |\nUsing index |\n+------+-------------+-------+-------+---------------+------+---------+------+---------+-------------+\n1 row in set, 1 warning (0.00 sec)\n \nExample of ref_or_null optimization\n \nSELECT * FROM table_name\n WHERE key_column=expr OR key_column IS NULL;\n \nref_or_null is something that often happens when you use\nsubqueries with NOT IN as then one has to do an extra check\nfor NULL values if the first value didn\'t have a matching\nrow. \n \n\n\nURL: https://mariadb.com/kb/en/explain/','','https://mariadb.com/kb/en/explain/'),(446,'EXPLAIN ANALYZE',28,'The syntax for the EXPLAIN ANALYZE feature was changed to\nANALYZE statement, available since MariaDB 10.1.0. See\nANALYZE statement. \n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/explain-analyze/','','https://mariadb.com/kb/en/explain-analyze/'),(450,'CONTAINS',30,'Syntax\n------ \nContains(g1,g2)\n \nDescription\n----------- \nReturns 1 or 0 to indicate whether a geometry g1 completely\ncontains geometry g2. CONTAINS() is based on the original\nMySQL implementation and uses object bounding rectangles,\nwhile ST_CONTAINS() uses object shapes. \n \nThis tests the opposite relationship to Within().\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/contains/','','https://mariadb.com/kb/en/contains/'),(451,'CROSSES',30,'Syntax\n------ \nCrosses(g1,g2)\n \nDescription\n----------- \nReturns 1 if g1 spatially crosses g2. Returns NULL if g1 is\na Polygon or a MultiPolygon, or if g2 is a\nPoint or a MultiPoint. Otherwise, returns 0.\n \nThe term spatially crosses denotes a spatial relation\nbetween two\ngiven geometries that has the following properties:\nThe two geometries intersect\nTheir intersection results in a geometry that has a\ndimension that is one\n less than the maximum dimension of the two given geometries\nTheir intersection is not equal to either of the two given\ngeometries\n \nCROSSES() is based on the original MySQL implementation, and\nuses object bounding rectangles, while ST_CROSSES() uses\nobject shapes.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/crosses/','','https://mariadb.com/kb/en/crosses/'),(226,'&gt;',18,'Syntax\n------ \n>\n \nDescription\n----------- \nGreater than operator. Evaluates both SQL expressions and\nreturns 1 if the left value is greater than the right value\nand 0 if it is not, or NULL if either expression is NULL. If\nthe expressions return different data types, (for instance,\na number and a string), performs type conversion.\n \nWhen used in row comparisons these two queries return the\nsame results:\n \nSELECT (t1.a, t1.b) > (t2.x, t2.y) \nFROM t1 INNER JOIN t2;\n \nSELECT (t1.a > t2.x) OR ((t1.a = t2.x) AND (t1.b > t2.y))\nFROM t1 INNER JOIN t2;\n \nExamples\n-------- \nSELECT 2 > 2;\n \n+-------+\n| 2 > 2 |\n+-------+\n| 0 |\n+-------+\n \nSELECT \'b\' > \'a\';\n \n+-----------+\n| \'b\' > \'a\' |\n+-----------+\n| 1 |\n+-----------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/greater-than/','','https://mariadb.com/kb/en/greater-than/'),(227,'&gt;=',18,'Syntax\n------ \n>=\n \nDescription\n----------- \nGreater than or equal operator. Evaluates both SQL\nexpressions and returns 1 if the left value is greater than\nor equal to the right value and 0 if it is not, or NULL if\neither expression is NULL. If the expressions return\ndifferent data types, (for instance, a number and a string),\nperforms type conversion.\n \nWhen used in row comparisons these two queries return the\nsame results:\n \nSELECT (t1.a, t1.b) >= (t2.x, t2.y) \nFROM t1 INNER JOIN t2;\n \nSELECT (t1.a > t2.x) OR ((t1.a = t2.x) AND (t1.b >= t2.y))\nFROM t1 INNER JOIN t2;\n \nExamples\n-------- \nSELECT 2 >= 2;\n \n+--------+\n| 2 >= 2 |\n+--------+\n| 1 |\n+--------+\n \nSELECT \'A\' >= \'a\';\n \n+------------+\n| \'A\' >= \'a\' |\n+------------+\n| 1 |\n+------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/greater-than-or-equal/','','https://mariadb.com/kb/en/greater-than-or-equal/'),(229,'COALESCE',18,'Syntax\n------ \nCOALESCE(value,...)\n \nDescription\n----------- \nReturns the first non-NULL value in the list, or NULL if\nthere are no\nnon-NULL values. At least one parameter must be passed.\n \nSee also NULL Values in MariaDB.\n \nExamples\n-------- \nSELECT COALESCE(NULL,1);\n+------------------+\n| COALESCE(NULL,1) |\n+------------------+\n| 1 |\n+------------------+\n \nSELECT COALESCE(NULL,NULL,NULL);\n+--------------------------+\n| COALESCE(NULL,NULL,NULL) |\n+--------------------------+\n| NULL |\n+--------------------------+\n \nWhen two arguments are given, COALESCE() is the same as\nIFNULL():\n \nSET @a=NULL, @b=1;\n \nSELECT COALESCE(@a, @b), IFNULL(@a, @b);\n+------------------+----------------+\n| COALESCE(@a, @b) | IFNULL(@a, @b) |\n+------------------+----------------+\n| 1 | 1 |\n+------------------+----------------+\n \nHex type confusion:\n \nCREATE TABLE t1 (a INT, b VARCHAR(10));\nINSERT INTO t1 VALUES (0x31, 0x61),(COALESCE(0x31),\nCOALESCE(0x61));\n \nSELECT * FROM t1;\n \n+------+------+\n| a | b |\n+------+------+\n| 49 | a |\n| 1 | a |\n+------+------+\n \nThe reason for the differing results above is that when 0x31\nis inserted directly to the column, it\'s treated as a\nnumber (see Hexadecimal Literals), while when 0x31 is passed\nto COALESCE(), it\'s treated as a string, because:\nHEX values have a string data type by default.\nCOALESCE() has the same data type as the argument. \n \n\n\nURL: https://mariadb.com/kb/en/coalesce/','','https://mariadb.com/kb/en/coalesce/'),(231,'IN',18,'Syntax\n------ \nexpr IN (value,...)\n \nDescription\n----------- \nReturns 1 if expr is equal to any of the values in the IN\nlist, else\nreturns 0. If all values are constants, they are evaluated\naccording\nto the type of expr and sorted. The search for the item then\nis done\nusing a binary search. This means IN is very quick if the IN\nvalue\nlist consists entirely of constants. Otherwise, type\nconversion takes\nplace according to the rules described at Type Conversion,\nbut\napplied to all the arguments.\n \nIf expr is NULL, IN always returns NULL. If at least one of\nthe values in the list is NULL, and one of the comparisons\nis true, the result is 1. If at least one of the values in\nthe list is NULL and none of the comparisons is true, the\nresult is NULL.\n \nExamples\n-------- \nSELECT 2 IN (0,3,5,7);\n+----------------+\n| 2 IN (0,3,5,7) |\n+----------------+\n| 0 |\n+----------------+\n \nSELECT \'wefwf\' IN (\'wee\',\'wefwf\',\'weg\');\n+----------------------------------+\n| \'wefwf\' IN (\'wee\',\'wefwf\',\'weg\') |\n+----------------------------------+\n| 1 |\n+----------------------------------+ \n \nType conversion:\n \nSELECT 1 IN (\'1\', \'2\', \'3\');\n+----------------------+\n| 1 IN (\'1\', \'2\', \'3\') |\n+----------------------+\n| 1 |\n+----------------------+\n \nSELECT NULL IN (1, 2, 3);\n+-------------------+\n| NULL IN (1, 2, 3) |\n+-------------------+\n| NULL |\n+-------------------+\n \nMariaDB [(none)]> SELECT 1 IN (1, 2, NULL);\n+-------------------+\n| 1 IN (1, 2, NULL) |\n+-------------------+\n| 1 |\n+-------------------+\n \nMariaDB [(none)]> SELECT 5 IN (1, 2, NULL);\n+-------------------+\n| 5 IN (1, 2, NULL) |\n+-------------------+\n| NULL |\n+-------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/in/','','https://mariadb.com/kb/en/in/'),(452,'DISJOINT',30,'Syntax\n------ \nDisjoint(g1,g2)\n \nDescription\n----------- \nReturns 1 or 0 to indicate whether g1 is spatially disjoint\nfrom\n(does not intersect) g2.\n \nDISJOINT() tests the opposite relationship to INTERSECTS().\n \nDISJOINT() is based on the original MySQL implementation and\nuses object bounding rectangles, while ST_DISJOINT() uses\nobject shapes.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/disjoint/','','https://mariadb.com/kb/en/disjoint/'),(453,'EQUALS',30,'Syntax\n------ \nEquals(g1,g2)\n \nFrom MariaDB 10.2.3:\n \nMBREQUALS(g1,g2)\n \nDescription\n----------- \nReturns 1 or 0 to indicate whether g1 is spatially equal to\ng2.\n \nEQUALS() is based on the original MySQL implementation and\nuses object bounding rectangles, while ST_EQUALS() uses\nobject shapes.\n \nFrom MariaDB 10.2.3, MBREQUALS is a synonym for Equals.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/equals/','','https://mariadb.com/kb/en/equals/'),(454,'INTERSECTS',30,'Syntax\n------ \nINTERSECTS(g1,g2)\n \nDescription\n----------- \nReturns 1 or 0 to indicate whether geometry g1 spatially\nintersects geometry g2.\n \nINTERSECTS() is based on the original MySQL implementation\nand uses object bounding rectangles, while ST_INTERSECTS()\nuses object shapes.\n \nINTERSECTS() tests the opposite relationship to DISJOINT().\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/intersects/','','https://mariadb.com/kb/en/intersects/'),(455,'OVERLAPS',30,'Syntax\n------ \nOVERLAPS(g1,g2)\n \nDescription\n----------- \nReturns 1 or 0 to indicate whether g1 spatially overlaps g2.\nThe term spatially overlaps is used if two geometries\nintersect and their\nintersection results in a geometry of the same dimension but\nnot equal to\neither of the given geometries.\n \nOVERLAPS() is based on the original MySQL implementation and\nuses object bounding rectangles, while ST_OVERLAPS() uses\nobject shapes.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/overlaps/','','https://mariadb.com/kb/en/overlaps/'),(458,'ST_DIFFERENCE',30,'Syntax\n------ \nST_DIFFERENCE(g1,g2)\n \nDescription\n----------- \nReturns a geometry representing the point set difference of\nthe given geometry values.\n \nExample\n \nSET @g1 = POINT(10,10), @g2 = POINT(20,20);\n \nSELECT ST_AsText(ST_Difference(@g1, @g2));\n+------------------------------------+\n| ST_AsText(ST_Difference(@g1, @g2)) |\n+------------------------------------+\n| POINT(10 10) |\n+------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_difference/','','https://mariadb.com/kb/en/st_difference/'),(233,'IS',18,'Syntax\n------ \nIS boolean_value\n \nDescription\n----------- \nTests a value against a boolean value, where boolean_value\ncan be\nTRUE, FALSE, or UNKNOWN.\n \nThere is an important difference between using IS TRUE or\ncomparing a value with TRUE using =. When using =, only 1\nequals to TRUE. But when using IS TRUE, all values which are\nlogically true (like a number > 1) return TRUE.\n \nExamples\n-------- \nSELECT 1 IS TRUE, 0 IS FALSE, NULL IS UNKNOWN;\n+-----------+------------+-----------------+\n| 1 IS TRUE | 0 IS FALSE | NULL IS UNKNOWN |\n+-----------+------------+-----------------+\n| 1 | 1 | 1 |\n+-----------+------------+-----------------+\n \nDifference between = and IS TRUE:\n \nSELECT 2 = TRUE, 2 IS TRUE;\n+----------+-----------+\n| 2 = TRUE | 2 IS TRUE |\n+----------+-----------+\n| 0 | 1 |\n+----------+-----------+\n \n\n\nURL: https://mariadb.com/kb/en/is/','','https://mariadb.com/kb/en/is/'),(234,'IS NOT',18,'Syntax\n------ \nIS NOT boolean_value\n \nDescription\n----------- \nTests a value against a boolean value, where boolean_value\ncan be\nTRUE, FALSE, or UNKNOWN. \n \nExamples\n-------- \nSELECT 1 IS NOT UNKNOWN, 0 IS NOT UNKNOWN, NULL IS NOT\nUNKNOWN;\n+------------------+------------------+---------------------+\n| 1 IS NOT UNKNOWN | 0 IS NOT UNKNOWN | NULL IS NOT UNKNOWN\n|\n+------------------+------------------+---------------------+\n| 1 | 1 | 0 |\n+------------------+------------------+---------------------+\n \nSELECT NULL IS NOT TRUE, NULL IS NOT FALSE;\n+------------------+-------------------+\n| NULL IS NOT TRUE | NULL IS NOT FALSE |\n+------------------+-------------------+\n| 1 | 1 |\n+------------------+-------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/is-not/','','https://mariadb.com/kb/en/is-not/'),(236,'IS NULL',18,'Syntax\n------ \nIS NULL\n \nDescription\n----------- \nTests whether a value is NULL. See also NULL Values in\nMariaDB.\n \nExamples\n-------- \nSELECT 1 IS NULL, 0 IS NULL, NULL IS NULL;\n+-----------+-----------+--------------+\n| 1 IS NULL | 0 IS NULL | NULL IS NULL |\n+-----------+-----------+--------------+\n| 0 | 0 | 1 |\n+-----------+-----------+--------------+\n \nCompatibility\n \nSome ODBC applications use the syntax auto_increment_field\nIS NOT NULL to find the latest row that was inserted with an\nautogenerated key value. If your applications need this, you\ncan set the sql_auto_is_null variable to 1.\n \nSET @@sql_auto_is_null=1;\nCREATE TABLE t1 (auto_increment_column INT NOT NULL\nAUTO_INCREMENT PRIMARY KEY);\nINSERT INTO t1 VALUES (NULL);\nSELECT * FROM t1 WHERE auto_increment_column IS NULL;\n \n+-----------------------+\n| auto_increment_column |\n+-----------------------+\n| 1 |\n+-----------------------+\n \n\n\nURL: https://mariadb.com/kb/en/is-null/','','https://mariadb.com/kb/en/is-null/'),(238,'LEAST',18,'Syntax\n------ \nLEAST(value1,value2,...)\n \nDescription\n----------- \nWith two or more arguments, returns the smallest\n(minimum-valued)\nargument. The arguments are compared using the following\nrules:\nIf the return value is used in an INTEGER context or all\narguments are integer-valued, they are compared as integers.\nIf the return value is used in a REAL context or all\narguments are real-valued, they are compared as reals.\nIf any argument is a case-sensitive string, the arguments\nare compared as case-sensitive strings.\nIn all other cases, the arguments are compared as\ncase-insensitive strings.\n \nLEAST() returns NULL if any argument is NULL.\n \nExamples\n-------- \nSELECT LEAST(2,0);\n+------------+\n| LEAST(2,0) |\n+------------+\n| 0 |\n+------------+\n \nSELECT LEAST(34.0,3.0,5.0,767.0);\n+---------------------------+\n| LEAST(34.0,3.0,5.0,767.0) |\n+---------------------------+\n| 3.0 |\n+---------------------------+\n \nSELECT LEAST(\'B\',\'A\',\'C\');\n+--------------------+\n| LEAST(\'B\',\'A\',\'C\') |\n+--------------------+\n| A |\n+--------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/least/','','https://mariadb.com/kb/en/least/'),(239,'NOT BETWEEN',18,'Syntax\n------ \nexpr NOT BETWEEN min AND max\n \nDescription\n----------- \nThis is the same as NOT (expr BETWEEN min AND max).\n \nNote that the meaning of the alternative form NOT expr\nBETWEEN min AND max is affected by the HIGH_NOT_PRECEDENCE\nSQL_MODE flag.\n \nExamples\n-------- \nSELECT 1 NOT BETWEEN 2 AND 3;\n+-----------------------+\n| 1 NOT BETWEEN 2 AND 3 |\n+-----------------------+\n| 1 |\n+-----------------------+\n \nSELECT \'b\' NOT BETWEEN \'a\' AND \'c\';\n+-----------------------------+\n| \'b\' NOT BETWEEN \'a\' AND \'c\' |\n+-----------------------------+\n| 0 |\n+-----------------------------+\n \nNULL:\n \nSELECT 1 NOT BETWEEN 1 AND NULL;\n+--------------------------+\n| 1 NOT BETWEEN 1 AND NULL |\n+--------------------------+\n| NULL |\n+--------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/not-between/','','https://mariadb.com/kb/en/not-between/'),(240,'NOT IN',18,'Syntax\n------ \nexpr NOT IN (value,...)\n \nDescription\n----------- \nThis is the same as NOT (expr IN (value,...)).\n \nExamples\n-------- \nSELECT 2 NOT IN (0,3,5,7);\n+--------------------+\n| 2 NOT IN (0,3,5,7) |\n+--------------------+\n| 1 |\n+--------------------+\n \nSELECT \'wefwf\' NOT IN (\'wee\',\'wefwf\',\'weg\');\n+--------------------------------------+\n| \'wefwf\' NOT IN (\'wee\',\'wefwf\',\'weg\') |\n+--------------------------------------+\n| 0 |\n+--------------------------------------+\n \nSELECT 1 NOT IN (\'1\', \'2\', \'3\');\n+--------------------------+\n| 1 NOT IN (\'1\', \'2\', \'3\') |\n+--------------------------+\n| 0 |\n+--------------------------+\n \nNULL:\n \nSELECT NULL NOT IN (1, 2, 3);\n+-----------------------+\n| NULL NOT IN (1, 2, 3) |\n+-----------------------+\n| NULL |\n+-----------------------+\n \nSELECT 1 NOT IN (1, 2, NULL);\n+-----------------------+\n| 1 NOT IN (1, 2, NULL) |\n+-----------------------+\n| 0 |\n+-----------------------+\n \nSELECT 5 NOT IN (1, 2, NULL);\n+-----------------------+\n| 5 NOT IN (1, 2, NULL) |\n+-----------------------+\n| NULL |\n+-----------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/not-in/','','https://mariadb.com/kb/en/not-in/'),(460,'ST_DISTANCE',30,'ST_DISTANCE() was introduced in MariaDB 5.3.3.\n \nSyntax\n------ \nST_DISTANCE(g1,g2)\n \nDescription\n----------- \nReturns the distance between two geometries, or null if not\ngiven valid inputs.\n \nExample\n \nSELECT ST_Distance(POINT(1,2),POINT(2,2));\n+------------------------------------+\n| ST_Distance(POINT(1,2),POINT(2,2)) |\n+------------------------------------+\n| 1 |\n+------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_distance/','','https://mariadb.com/kb/en/st_distance/'),(463,'ST_LENGTH',30,'Syntax\n------ \nST_LENGTH(ls)\n \nDescription\n----------- \nReturns as a double-precision number the length of the\nLineString value ls in its associated spatial reference.\n \nExamples\n-------- \nSET @ls = \'LineString(1 1,2 2,3 3)\';\n \nSELECT ST_LENGTH(ST_GeomFromText(@ls));\n+---------------------------------+\n| ST_LENGTH(ST_GeomFromText(@ls)) |\n+---------------------------------+\n| 2.82842712474619 |\n+---------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_length/','','https://mariadb.com/kb/en/st_length/'),(464,'ST_OVERLAPS',30,'Syntax\n------ \nST_OVERLAPS(g1,g2)\n \nDescription\n----------- \nReturns 1 or 0 to indicate whether geometry g1 spatially\noverlaps geometry g2.\n \nThe term spatially overlaps is used if two geometries\nintersect and their\nintersection results in a geometry of the same dimension but\nnot equal to\neither of the given geometries.\n \nST_OVERLAPS() uses object shapes, while OVERLAPS(), based on\nthe original MySQL implementation, uses object bounding\nrectangles.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st-overlaps/','','https://mariadb.com/kb/en/st-overlaps/'),(249,'Parentheses',19,'Parentheses are sometimes called precedence operators - this\nmeans that they can be used to change the other operator\'s\nprecedence in an expression. The expressions that are\nwritten between parentheses are computed before the\nexpressions that are written outside. Parentheses must\nalways contain an expression (that is, they cannot be\nempty), and can be nested.\n \nFor example, the following expressions could return\ndifferent results:\nNOT a OR b\nNOT (a OR b)\n \nIn the first case, NOT applies to a, so if a is FALSE or b\nis TRUE, the expression returns TRUE. In the second case,\nNOT applies to the result of a OR b, so if at least one of a\nor b is TRUE, the expression is TRUE.\n \nWhen the precedence of operators is not intuitive, you can\nuse parentheses to make it immediately clear for whoever\nreads the statement.\n \nThe precedence of the NOT operator can also be affected by\nthe HIGH_NOT_PRECEDENCE SQL_MODE flag.\n \nOther uses\n \nParentheses must always be used to enclose subqueries.\n \nParentheses can also be used in a JOIN statement between\nmultiple tables to determine which tables must be joined\nfirst.\n \nAlso, parentheses are used to enclose the list of parameters\nto be passed to built-in functions, user-defined functions\nand stored routines. However, when no parameter is passed to\na stored procedure, parentheses are optional. For builtin\nfunctions and user-defined functions, spaces are not allowed\nbetween the function name and the open parenthesis, unless\nthe IGNORE_SPACE SQL_MODE is set. For stored routines (and\nfor functions if IGNORE_SPACE is set) spaces are allowed\nbefore the open parenthesis, including tab characters and\nnew line characters.\n \nSyntax errors\n \nIf there are more open parentheses than closed parentheses,\nthe error usually looks like this:\n \nERROR 1064 (42000): You have an error in your SQL syntax;\ncheck the manual that\ncorresponds to your MariaDB server version for the right\nsyntax to use near \'\' a\nt line 1\n \nNote the empty string.\n \nIf there are more closed parentheses than open parentheses,\nthe error usually looks like this:\n \nERROR 1064 (42000): You have an error in your SQL syntax;\ncheck the manual that\ncorresponds to your MariaDB server version for the right\nsyntax to use near \')\'\nat line 1\n \nNote the quoted closed parenthesis.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/parentheses/','','https://mariadb.com/kb/en/parentheses/'),(251,'ANALYZE TABLE',20,'Syntax\n------ \nANALYZE [NO_WRITE_TO_BINLOG | LOCAL] TABLE tbl_name\n[,tbl_name ...] \n [PERSISTENT FOR [ALL|COLUMNS ([col_name [,col_name ...]])] \n [INDEXES ([index_name [,index_name ...]])]] \n \nDescription\n----------- \nANALYZE TABLE analyzes and stores the key distribution for a\ntable (index statistics). During the analysis, the table is\nlocked with a read lock. This statement works with MyISAM,\nAria and InnoDB tables. For MyISAM tables, this statement is\nequivalent\nto using myisamchk --analyze.\n \nFor more information on how the analysis works within\nInnoDB, see\nInnoDB Limitations.\n \nMariaDB uses the stored key distribution to decide the order\nin which\ntables should be joined when you perform a join on something\nother than\na constant. In addition, key distributions can be used when\ndeciding\nwhich indexes to use for a specific table within a query.\n \nThis statement requires SELECT and INSERT privileges for the\ntable.\n \nBy default, ANALYZE TABLE statements are written to the\nbinary log and will be replicated. The NO_WRITE_TO_BINLOG\nkeyword (LOCAL is an alias) will ensure the statement is not\nwritten to the binary log. \n \nANALYZE TABLE is also supported for partitioned tables. You\ncan use ALTER TABLE ... ANALYZE PARTITION to analyze one or\nmore partitions.\n \nThe Aria storage engine supports progress reporting for the\nANALYZE TABLE statement.\n \nEngine-Independent Statistics\n \nIn MariaDB 10.0 and later, ANALYZE TABLE supports\nengine-independent statistics. See Engine-Independent Table\nStatistics: Collecting Statistics with the ANALYZE TABLE\nStatement for more information.\n \n\n\nURL: https://mariadb.com/kb/en/analyze-table/','','https://mariadb.com/kb/en/analyze-table/'),(252,'CHECK TABLE',20,'Syntax\n------ \nCHECK TABLE tbl_name [, tbl_name] ... [option] ...\n \noption = {FOR UPGRADE | QUICK | FAST | MEDIUM | EXTENDED |\nCHANGED}\n \nDescription\n----------- \nCHECK TABLE checks a table or tables for errors. CHECK TABLE\nworks for\nArchive, Aria, CSV, InnoDB, and MyISAM tables. For Aria and\nMyISAM tables, the\nkey statistics are updated as well. For CSV, see also\nChecking and Repairing CSV Tables.\n \nAs an alternative, myisamchk is a commandline tool for\nchecking MyISAM tables when the tables are not being\naccessed.\n \nFor checking dynamic columns integrity, COLUMN_CHECK() can\nbe used.\n \nCHECK TABLE can also check views for problems, such as\ntables\nthat are referenced in the view definition that no longer\nexist.\n \nCHECK TABLE is also supported for partitioned tables. You\ncan\nuse ALTER TABLE ... CHECK PARTITION \nto check one or more partitions.\n \nThe meaning of the different options are as follows - note\nthat this can vary a bit between\nstorage engines:\n \nFOR UPGRADE | Do a very quick check if the storage format\nfor the table has changed so that one needs to do a REPAIR.\nThis is only needed when one upgrades between major versions\nof MariaDB or MySQL. This is usually done by running\nmysql_upgrade. | \n \nFAST | Only check tables that has not been closed properly\nor are marked as corrupt. Only supported by the MyISAM and\nAria engines. For other engines the table is checked\nnormally | \n \nCHANGED | Check only tables that has changed since last\nREPAIR / CHECK. Only supported by the MyISAM and Aria\nengines. For other engines the table is checked normally. | \n \nQUICK | Do a fast check. For MyISAM and Aria engine this\nmeans we skip checking the delete link chain which may take\nsome time. | \n \nMEDIUM | Scan also the data files. Checks integrity between\ndata and index files with checksums. In most cases this\nshould find all possible errors. | \n \nEXTENDED | Does a full check to verify every possible error.\nFor MyISAM and Aria we verify for each row that all it keys\nexists and points to the row. This may take a long time on\nbig tables! | \n \nFor most cases running CHECK TABLE without options or MEDIUM\nshould be\ngood enough.\n \nSince MariaDB 5.3, the Aria storage engine supports progress\nreporting for this statement.\n \nIf you want to know if two tables are identical, take a look\nat CHECKSUM TABLE.\n \nXtraDB/InnoDB\n \nIf CHECK TABLE finds an error in an InnoDB table, MariaDB\nmight shutdown to prevent the error propagation. In this\ncase, the problem will be reported in the error log.\nOtherwise, since MariaDB 5.5, the table or an index might be\nmarked as corrupted, to prevent use. This does not happen\nwith some minor problems, like a wrong number of entries in\na secondary index. Those problems are reported in the output\nof CHECK TABLE.\n \nEach tablespace contains a header with metadata. This header\nis not checked by this statement.\n \nDuring the execution of CHECK TABLE, other threads may be\nblocked.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/sql-commands-check-table/','','https://mariadb.com/kb/en/sql-commands-check-table/'),(467,'TOUCHES',30,'Syntax\n------ \nTouches(g1,g2)\n \nDescription\n----------- \nReturns 1 or 0 to indicate whether g1 spatially touches g2.\nTwo\ngeometries spatially touch if the interiors of the\ngeometries do not intersect,\nbut the boundary of one of the geometries intersects either\nthe boundary or the\ninterior of the other.\n \nTOUCHES() is based on the original MySQL implementation and\nuses object bounding rectangles, while ST_TOUCHES() uses\nobject shapes.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/touches/','','https://mariadb.com/kb/en/touches/'),(255,'OPTIMIZE TABLE',20,'Syntax\n------ \nOPTIMIZE [NO_WRITE_TO_BINLOG | LOCAL] TABLE\n tbl_name [, tbl_name] ...\n [WAIT n | NOWAIT]\n \nDescription\n----------- \nOPTIMIZE TABLE has two main functions. It can either be used\nto defragment tables, or to update the InnoDB fulltext\nindex.\n \nWAIT/NOWAIT\n \nSet the lock wait timeout. See WAIT and NOWAIT.\n \nDefragmenting\n \nOPTIMIZE TABLE works for InnoDB (before MariaDB 10.1.1, only\nif the innodb_file_per_table server system variable is set),\nAria, MyISAM and ARCHIVE tables, and should be used if you\nhave deleted a large part of a table or if you have made\nmany changes to a table with variable-length\nrows (tables that have VARCHAR, VARBINARY, BLOB, or TEXT\ncolumns). Deleted rows are maintained in a\nlinked list and subsequent INSERT operations reuse old row\npositions.\n \nThis statement requires SELECT and INSERT privileges for the\ntable.\n \nBy default, OPTIMIZE TABLE statements are written to the\nbinary log and will be replicated. The NO_WRITE_TO_BINLOG\nkeyword (LOCAL is an alias) will ensure the statement is not\nwritten to the binary log. \n \nOPTIMIZE TABLE is also supported for partitioned tables. You\ncan use \nALTER TABLE ... OPTIMIZE PARTITION \nto optimize one or more partitions.\n \nYou can use OPTIMIZE TABLE to reclaim the unused\nspace and to defragment the data file. With other storage\nengines, OPTIMIZE TABLE does nothing by default, and returns\nthis message: \" The storage engine for the table doesn\'t\nsupport optimize\". However, if the server has been started\nwith the --skip-new option, OPTIMIZE TABLE is linked to\nALTER TABLE, and recreates the table. This operation frees\nthe unused space and updates index statistics.\n \nSince MariaDB 5.3, the Aria storage engine supports progress\nreporting for this statement.\n \nIf a MyISAM table is fragmented, concurrent inserts will not\nbe performed until an OPTIMIZE TABLE statement is executed\non that table, unless the concurrent_insert server system\nvariable is set to ALWAYS.\n \nUpdating an InnoDB fulltext index\n \nWhen rows are added or deleted to an InnoDB fulltext index,\nthe index is not immediately re-organized, as this can be an\nexpensive operation. Change statistics are stored in a\nseparate location . The fulltext index is only fully\nre-organized when an OPTIMIZE TABLE statement is run.\n \nBy default, an OPTIMIZE TABLE will defragment a table. In\norder to use it to update fulltext index statistics, the\ninnodb_optimize_fulltext_only system variable must be set to\n1. This is intended to be a temporary setting, and should be\nreset to 0 once the fulltext index has been re-organized.\n \nSince fulltext re-organization can take a long time, the\ninnodb_ft_num_word_optimize variable limits the\nre-organization to a number of words (2000 by default). You\ncan run multiple OPTIMIZE statements to fully re-organize\nthe index.\n \nDefragmenting InnoDB tablespaces\n \nMariaDB 10.1.1 merged the Facebook/Kakao defragmentation\npatch \n \nMariaDB 10.1.1 merged the Facebook/Kakao defragmentation\npatch, allowing one to use OPTIMIZE TABLE to defragment\nInnoDB tablespaces. For this functionality to be enabled,\nthe innodb_defragment system variable must be enabled. No\nnew tables are created and there is no need to copy data\nfrom old tables to new tables. Instead, this feature loads n\npages (determined by innodb-defragment-n-pages) and tries to\nmove records so that pages would be full of records and then\nfrees pages that are fully empty after the operation. Note\nthat tablespace files (including ibdata1) will not shrink as\nthe result of defragmentation, but one will get better\nmemory utilization in the InnoDB buffer pool as there are\nfewer data pages in use.\n \nSee Defragmenting InnoDB Tablespaces for more details.\n \n\n\nURL: https://mariadb.com/kb/en/optimize-table/','','https://mariadb.com/kb/en/optimize-table/'),(256,'REPAIR TABLE',20,'Syntax\n------ \nREPAIR [NO_WRITE_TO_BINLOG | LOCAL] TABLE\n tbl_name [, tbl_name] ...\n [QUICK] [EXTENDED] [USE_FRM]\n \nDescription\n----------- \nREPAIR TABLE repairs a possibly corrupted table. By default,\nit has the same effect as\n \nmyisamchk --recover tbl_name\n \nor\n \naria_chk --recover tbl_name\n \nSee aria_chk and myisamchk for more.\n \nREPAIR TABLE works for Archive, Aria, CSV and MyISAM tables.\nFor XtraDB/InnoDB, see recovery modes. For CSV, see also\nChecking and Repairing CSV Tables. For Archive, this\nstatement also improves compression. If the storage engine\ndoes not support this statement, a warning is issued.\n \nThis statement requires SELECT and INSERT privileges for the\ntable.\n \nBy default, REPAIR TABLE statements are written to the\nbinary log and will be replicated. The NO_WRITE_TO_BINLOG\nkeyword (LOCAL is an alias) will ensure the statement is not\nwritten to the binary log.\n \nWhen an index is recreated, the storage engine may use a\nconfigurable buffer in the process. Incrementing the buffer\nspeeds up the index creation. Aria and MyISAM allocate a\nbuffer whose size is defined by aria_sort_buffer_size or\nmyisam_sort_buffer_size, also used for ALTER TABLE.\n \nREPAIR TABLE is also supported for partitioned tables.\nHowever, the USE_FRM option cannot be used with this\nstatement\non a partitioned table.\n \n ALTER TABLE ... REPAIR PARTITION can be used\nto repair one or more partitions.\n \nThe Aria storage engine supports progress reporting for this\nstatement.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/repair-table/','','https://mariadb.com/kb/en/repair-table/'),(472,'CURDATE',31,'Syntax\n------ \nCURDATE()\n \nDescription\n----------- \nReturns the current date as a value in \'YYYY-MM-DD\' or\nYYYYMMDD\nformat, depending on whether the function is used in a\nstring or\nnumeric context.\n \nExamples\n-------- \nSELECT CURDATE();\n+------------+\n| CURDATE() |\n+------------+\n| 2019-03-05 |\n+------------+\n \nIn a numeric context (note this is not performing date\ncalculations):\n \nSELECT CURDATE() +0;\n \n+--------------+\n| CURDATE() +0 |\n+--------------+\n| 20190305 |\n+--------------+\n \nData calculation:\n \nSELECT CURDATE() - INTERVAL 5 DAY;\n \n+----------------------------+\n| CURDATE() - INTERVAL 5 DAY |\n+----------------------------+\n| 2019-02-28 |\n+----------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/curdate/','','https://mariadb.com/kb/en/curdate/'),(473,'CURRENT_DATE',31,'Syntax\n------ \nCURRENT_DATE, CURRENT_DATE()\n \nDescription\n----------- \nCURRENT_DATE and CURRENT_DATE() are synonyms for CURDATE().\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/current_date/','','https://mariadb.com/kb/en/current_date/'),(474,'CURRENT_TIME',31,'Syntax\n------ \nCURRENT_TIME\nCURRENT_TIME([precision])\n \nDescription\n----------- \nCURRENT_TIME and CURRENT_TIME() are synonyms for CURTIME().\n \n\n\nURL: https://mariadb.com/kb/en/current_time/','','https://mariadb.com/kb/en/current_time/'),(475,'CURRENT_TIMESTAMP',31,'Syntax\n------ \nCURRENT_TIMESTAMP\nCURRENT_TIMESTAMP([precision])\n \nDescription\n----------- \nCURRENT_TIMESTAMP and CURRENT_TIMESTAMP() are synonyms for\nNOW().\n \n\n\nURL: https://mariadb.com/kb/en/current_timestamp/','','https://mariadb.com/kb/en/current_timestamp/'),(476,'CURTIME',31,'Syntax\n------ \nCURTIME([precision])\n \nDescription\n----------- \nReturns the current time as a value in \'HH:MM:SS\' or\nHHMMSS.uuuuuu format, depending on whether the function is\nused in a string or numeric context. The value is expressed\nin the current time zone.\n \nThe optional precision determines the microsecond precision.\nSee Microseconds in MariaDB.\n \nExamples\n-------- \nSELECT CURTIME();\n+-----------+\n| CURTIME() |\n+-----------+\n| 12:45:39 |\n+-----------+\n \nSELECT CURTIME() + 0;\n \n+---------------+\n| CURTIME() + 0 |\n+---------------+\n| 124545.000000 |\n+---------------+\n \nWith precision:\n \nSELECT CURTIME(2);\n+-------------+\n| CURTIME(2) |\n+-------------+\n| 09:49:08.09 |\n+-------------+\n \n\n\nURL: https://mariadb.com/kb/en/curtime/','','https://mariadb.com/kb/en/curtime/'),(257,'REPAIR VIEW',20,'REPAIR VIEW was introduced in MariaDB 10.0.18 and MariaDB\n5.5.43.\n \nSyntax\n------ \nREPAIR [NO_WRITE_TO_BINLOG | LOCAL] VIEW view_name[,\nview_name] ... [FROM MYSQL]\n \nDescription\n----------- \nThe REPAIR VIEW statement was introduced to assist with\nfixing MDEV-6916, an issue introduced in MariaDB 5.2 where\nthe view algorithms were swapped compared to their MySQL on\ndisk representation. It checks whether the view algorithm is\ncorrect. It is run as part of mysql_upgrade, and should not\nnormally be required in regular use.\n \nBy default it corrects the checksum and if necessary adds\nthe mariadb-version field. If the optional FROM MYSQL clause\nis used, and no mariadb-version field is present, the MERGE\nand TEMPTABLE algorithms are toggled.\n \nBy default, REPAIR VIEW statements are written to the binary\nlog and will be replicated. The NO_WRITE_TO_BINLOG keyword\n(LOCAL is an alias) will ensure the statement is not written\nto the binary log.\n \nNote that REPAIR VIEW in MariaDB 10.0.18 and MariaDB 5.5.43\ncould crash the server (see MDEV-8115). Upgrade to a later\nversion.\n \n\n\nURL: https://mariadb.com/kb/en/repair-view/','','https://mariadb.com/kb/en/repair-view/'),(258,'CREATE FUNCTION UDF',21,'Syntax\n------ \nCREATE [OR REPLACE] [AGGREGATE] FUNCTION [IF NOT EXISTS]\nfunction_name\n RETURNS {STRING|INTEGER|REAL|DECIMAL}\n SONAME shared_library_name\n \nDescription\n----------- \nA user-defined function (UDF) is a way to extend MariaDB\nwith a new function\nthat works like a native (built-in) MariaDB function such as\nABS() or\nCONCAT().\n \nfunction_name is the name that should be used in SQL\nstatements to invoke\nthe function. \n \nTo create a function, you must have the INSERT privilege for\nthe\nmysql database. This is necessary because CREATE FUNCTION\nadds a row to the\nmysql.func system table that records the function\'s name,\ntype, and shared library name. If you do not have this\ntable, you should run\nthe mysql_upgrade command to create it.\n \nUDFs need to be written in C, C++ or another language that\nuses C calling\nconventions, MariaDB needs to have been dynamically\ncompiled, and your\noperating system must support dynamic loading.\n \nFor an example, see sql/udf_example.cc in the source tree.\nFor a collection of existing UDFs see\nhttp://www.mysqludf.org/.\n \nStatements making use of user-defined functions are not\nsafe for replication.\n \nFor creating a stored function as opposed to a user-defined\nfunction, see\nCREATE FUNCTION.\n \nFor valid identifiers to use as function names, see\nIdentifier Names.\n \nRETURNS\n \nThe RETURNS clause indicates the type of the function\'s\nreturn value, and can be one of STRING, INTEGER, REAL or\nDECIMAL. DECIMAL functions currently return string values\nand should be written like STRING functions.\n \nshared_library_name\n \nshared_library_name is the basename of the shared object\nfile that contains\nthe code that implements the function. The file must be\nlocated in the plugin\ndirectory. This directory is given by the value of the\nplugin_dir system variable. Note that\nbefore MariaDB/MySQL 5.1, the shared object could be located\nin any directory\nthat was searched by your system\'s dynamic linker.\n \nAGGREGATE\n \nAggregate functions are summary functions such as SUM() and\nAVG().\n \nAggregate UDF functions can be used as window functions.\n \nOR REPLACE\n \nThe OR REPLACE clause was added in MariaDB 10.1.3\n \nIf the optional OR REPLACE clause is used, it acts as a\nshortcut for:\n \nDROP FUNCTION IF EXISTS function_name;\n \nCREATE FUNCTION name ...;\n \nIF NOT EXISTS\n \nThe IF NOT EXISTS clause was added in MariaDB 10.1.3\n \nWhen the IF NOT EXISTS clause is used, MariaDB will return a\nwarning instead of an error if the specified function\nalready exists. Cannot be used together with OR REPLACE.\n \nUpgrading a UDF\n \nTo upgrade the UDF\'s shared library, first run a\nDROP FUNCTION statement, then upgrade the shared library and\nfinally run the CREATE FUNCTION statement. If you upgrade\nwithout following\nthis process, you may crash the server.\n \nExamples\n-------- \nCREATE FUNCTION jsoncontains_path RETURNS integer SONAME\n\'ha_connect.so\';\n \nQuery OK, 0 rows affected (0.00 sec)\n \nOR REPLACE and IF NOT EXISTS:\n \nCREATE FUNCTION jsoncontains_path RETURNS integer SONAME\n\'ha_connect.so\';\n \nERROR 1125 (HY000): Function \'jsoncontains_path\' already\nexists\n \nCREATE OR REPLACE FUNCTION jsoncontains_path RETURNS integer\nSONAME \'ha_connect.so\';\n \nQuery OK, 0 rows affected (0.00 sec)\n \nCREATE FUNCTION IF NOT EXISTS jsoncontains_path RETURNS\ninteger SONAME \'ha_connect.so\';\n \nQuery OK, 0 rows affected, 1 warning (0.00 sec)\n \nSHOW WARNINGS;\n \n+-------+------+---------------------------------------------+\n| Level | Code | Message |\n+-------+------+---------------------------------------------+\n| Note | 1125 | Function \'jsoncontains_path\' already\nexists |\n+-------+------+---------------------------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/create-function-udf/','','https://mariadb.com/kb/en/create-function-udf/'),(477,'DATE FUNCTION',31,'Syntax\n------ \nDATE(expr)\n \nDescription\n----------- \nExtracts the date part of the date or datetime expression\nexpr.\n \nExamples\n-------- \nSELECT DATE(\'2013-07-18 12:21:32\');\n+-----------------------------+\n| DATE(\'2013-07-18 12:21:32\') |\n+-----------------------------+\n| 2013-07-18 |\n+-----------------------------+\n \nError Handling\n \nUntil MariaDB 5.5.32, some versions of MariaDB returned\n0000-00-00 when passed an invalid date. From 5.5.32, NULL is\nreturned.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/date-function/','','https://mariadb.com/kb/en/date-function/'),(482,'DAY',31,'Syntax\n------ \nDAY(date)\n \nDescription\n----------- \nDAY() is a synonym for DAYOFMONTH().\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/day/','','https://mariadb.com/kb/en/day/'),(486,'DAYOFYEAR',31,'Syntax\n------ \nDAYOFYEAR(date)\n \nDescription\n----------- \nReturns the day of the year for date, in the range 1 to 366.\n \nExamples\n-------- \nSELECT DAYOFYEAR(\'2018-02-16\');\n+-------------------------+\n| DAYOFYEAR(\'2018-02-16\') |\n+-------------------------+\n| 47 |\n+-------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/dayofyear/','','https://mariadb.com/kb/en/dayofyear/'),(488,'FROM_DAYS',31,'Syntax\n------ \nFROM_DAYS(N)\n \nDescription\n----------- \nGiven a day number N, returns a DATE value. The day count is\nbased on the number of days from the start of the standard\ncalendar (0000-00-00). \n \nThe function is not designed for use with dates before the\nadvent of the Gregorian calendar in October 1582. Results\nwill not be reliable since it doesn\'t account for the lost\ndays when the calendar changed from the Julian calendar.\n \nThis is the converse of the TO_DAYS() function.\n \nExamples\n-------- \nSELECT FROM_DAYS(730669);\n+-------------------+\n| FROM_DAYS(730669) |\n+-------------------+\n| 2000-07-03 |\n+-------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/from_days/','','https://mariadb.com/kb/en/from_days/'),(493,'LOCALTIME',31,'Syntax\n------ \nLOCALTIME\nLOCALTIME([precision])\n \nDescription\n----------- \nLOCALTIME and LOCALTIME() are synonyms for NOW().\n \n\n\nURL: https://mariadb.com/kb/en/localtime/','','https://mariadb.com/kb/en/localtime/'),(494,'LOCALTIMESTAMP',31,'Syntax\n------ \nLOCALTIMESTAMP\nLOCALTIMESTAMP([precision])\n \nDescription\n----------- \nLOCALTIMESTAMP and LOCALTIMESTAMP() are synonyms for NOW().\n \n\n\nURL: https://mariadb.com/kb/en/localtimestamp/','','https://mariadb.com/kb/en/localtimestamp/'),(259,'DROP FUNCTION UDF',21,'Syntax\n------ \nDROP FUNCTION [IF EXISTS] function_name\n \nDescription\n----------- \nThis statement drops the user-defined function (UDF) named\nfunction_name.\n \nTo drop a function, you must have the DELETE privilege for\nthe mysql database. This is because DROP FUNCTION removes\nthe row from the mysql.func system table that records the\nfunction\'s name, type and shared library name.\n \nFor dropping a stored function, see DROP FUNCTION.\n \nUpgrading a UDF\n \nTo upgrade the UDF\'s shared library, first run a DROP\nFUNCTION statement, then upgrade the shared library and\nfinally run the CREATE FUNCTION statement. If you upgrade\nwithout following this process, you may crash the server.\n \nExamples\n-------- \nDROP FUNCTION jsoncontains_path;\n \nIF EXISTS:\n \nDROP FUNCTION jsoncontains_path;\n \nERROR 1305 (42000): FUNCTION test.jsoncontains_path does not\nexist\n \nDROP FUNCTION IF EXISTS jsoncontains_path;\n \nQuery OK, 0 rows affected, 1 warning (0.00 sec)\n \nSHOW WARNINGS;\n \n+-------+------+------------------------------------------------+\n| Level | Code | Message |\n+-------+------+------------------------------------------------+\n| Note | 1305 | FUNCTION test.jsoncontains_path does not\nexist |\n+-------+------+------------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/drop-function-udf/','','https://mariadb.com/kb/en/drop-function-udf/'),(260,'Creating User-Defined Functions',21,'User-defined functions allow MariaDB to be extended with a\nnew function that works like a native (built-in) MariaDB\nfunction such as ABS() or CONCAT(). There are alternative\nways to add a new function: writing a native function (which\nrequires modifying and compiling the server source code), or\nwriting a stored function.\n \nStatements making use of user-defined functions are not safe\nfor replication.\n \nFunctions are written in C or C++, and to make use of them,\nthe operating system must support dynamic loading. \n \nEach new SQL function requires corresponding functions\nwritten in C/C++. In the list below, at least the main\nfunction - x() - and one other, are required. x should be\nreplaced by the name of the function you are creating.\n \nAll functions need to be thread-safe, so not global or\nstatic variables that change can be allocated. Memory is\nallocated in x_init()/ and freed in x_deinit(). \n \nSimple Functions\n \nx()\n \nRequired for all UDF\'s, this is where the results are\ncalculated.\n \nC/C++ type | SQL type | \n \nchar * | STRING | \n \nlong long | INTEGER | \n \ndouble | REAL | \n \nDECIMAL functions return string values, and so should be\nwritten accordingly. It is not possible to create ROW\nfunctions.\n \nx_init()\n \nInitialization function for x(). Can be used for the\nfollowing:\nCheck the number of arguments to X() (the SQL equivalent).\nVerify the argument types, or to force arguments to be of a\nparticular type after the function is called.\nSpecify whether the result can be NULL.\nSpecify the maximum result length.\nFor REAL functions, specify the maximum number of decimals\nfor the result.\nAllocate any required memory.\n To verify that the arguments are of a required type or,\nalternatively, to tell MySQL to coerce arguments to the\nrequired types when the main function is called.\n \nx_deinit()\n \nDe-initialization function for x(). Used to de-allocate\nmemory that was allocated in x_init().\n \nDescription\n----------- \nEach time the SQL function X() is called:\nMariaDB will first call the C/C++ initialization function,\nx_init(), assuming it exists. All setup will be performed,\nand if it returns an error, the SQL statement is aborted and\nno further functions are called.\nIf there is no x_init() function, or it has been called and\ndid not return an error, x() is then called once per row.\nAfter all rows have finished processing, x_deinit() is\ncalled, if present, to clean up by de-allocating any memory\nthat was allocated in x_init().\nSee User-defined Functions Calling Sequences for more\ndetails on the functions.\n \nAggregate Functions\n \nThe following functions are required for aggregate\nfunctions, such as AVG() and SUM(). \n \nx_clear()\n \nUsed to reset the current aggregate, but without inserting\nthe argument as the initial aggregate value for the new\ngroup.\n \nx_add()\n \nUsed to add the argument to the current aggregate. \n \nx_remove()\n \nStaring from MariaDB 10.4 it improves the support of window\nfunctions (so it is not obligatory to add it) and should\nremove the argument from the current aggregate.\n \nDescription\n----------- \nEach time the aggregate SQL function X() is called:\nMariaDB will first call the C/C++ initialization function,\nx_init(), assuming it exists. All setup will be performed,\nand if it returns an error, the SQL statement is aborted and\nno further functions are called.\nIf there is no x_init() function, or it has been called and\ndid not return an error, x() is then called once per row.\nAfter all rows have finished processing, x_deinit() is\ncalled, if present, to clean up by de-allocating any memory\nthat was allocated in x_init().\n \nMariaDB will first call the C/C++ initialization function,\nx_init(), assuming it exists. All setup will be performed,\nand if it returns an error, the SQL statement is aborted and\nno further functions are called.\nThe table is sorted according to the GROUP BY expression.\nx_clear() is called for the first row of each new group.\nx_add() is called once per row for each row in the same\ngroup.\nx() is called when the group changes, or after the last row,\nto get the aggregate result. \nThe latter three steps are repeated until all rows have been\nprocessed.\nAfter all rows have finished processing, x_deinit() is\ncalled, if present, to clean up by de-allocating any memory\nthat was allocated in x_init().\n \nExamples\n-------- \nFor an example, see sql/udf_example.cc in the source tree.\nFor a collection of existing UDFs see\nhttps://github.com/mysqludf.\n \n\n\nURL:\nhttps://mariadb.com/kb/en/creating-user-defined-functions/','','https://mariadb.com/kb/en/creating-user-defined-functions/'),(498,'MINUTE',31,'Syntax\n------ \nMINUTE(time)\n \nDescription\n----------- \nReturns the minute for time, in the range 0 to 59. \n \nExamples\n-------- \nSELECT MINUTE(\'2013-08-03 11:04:03\');\n+-------------------------------+\n| MINUTE(\'2013-08-03 11:04:03\') |\n+-------------------------------+\n| 4 |\n+-------------------------------+\n \n SELECT MINUTE (\'23:12:50\');\n+---------------------+\n| MINUTE (\'23:12:50\') |\n+---------------------+\n| 12 |\n+---------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/minute/','','https://mariadb.com/kb/en/minute/'),(499,'MONTH',31,'Syntax\n------ \nMONTH(date)\n \nDescription\n----------- \nReturns the month for date in the range 1 to 12 for January\nto\nDecember, or 0 for dates such as \'0000-00-00\' or\n\'2008-00-00\' that\nhave a zero month part.\n \nExamples\n-------- \nSELECT MONTH(\'2019-01-03\');\n+---------------------+\n| MONTH(\'2019-01-03\') |\n+---------------------+\n| 1 |\n+---------------------+\n \nSELECT MONTH(\'2019-00-03\');\n+---------------------+\n| MONTH(\'2019-00-03\') |\n+---------------------+\n| 0 |\n+---------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/month/','','https://mariadb.com/kb/en/month/'),(500,'MONTHNAME',31,'Syntax\n------ \nMONTHNAME(date)\n \nDescription\n----------- \nReturns the full name of the month for date. The language\nused for the name is controlled by the value of the\nlc_time_names system variable. See server locale for more on\nthe supported locales.\n \nExamples\n-------- \nSELECT MONTHNAME(\'2019-02-03\');\n+-------------------------+\n| MONTHNAME(\'2019-02-03\') |\n+-------------------------+\n| February |\n+-------------------------+\n \nChanging the locale:\n \nSET lc_time_names = \'fr_CA\';\n \nSELECT MONTHNAME(\'2019-05-21\');\n+-------------------------+\n| MONTHNAME(\'2019-05-21\') |\n+-------------------------+\n| mai |\n+-------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/monthname/','','https://mariadb.com/kb/en/monthname/'),(261,'User-Defined Functions Calling Sequences',21,'The functions described in Creating User-defined Functions\nare expanded on this page. They are declared as follows:\n \nSimple Functions\n \nx()\n \nIf x() returns an integer, it is declared as follows:\n \nlong long x(UDF_INIT *initid, UDF_ARGS *args,\n char *is_null, char *error);\n \nIf x() returns a string (DECIMAL functions also return\nstring values), it is declared as follows:\n \nchar *x(UDF_INIT *initid, UDF_ARGS *args,\n char *result, unsigned long *length,\n char *is_null, char *error);\n \nIf x() returns a real, it is declared as follows:\n \ndouble x(UDF_INIT *initid, UDF_ARGS *args,\n char *is_null, char *error);\n \nx_init()\n \nmy_bool x_init(UDF_INIT *initid, UDF_ARGS *args, char\n*message);\n \nx_deinit()\n \nvoid x_deinit(UDF_INIT *initid);\n \nDescription\n----------- \ninitid is a parameter passed to all three functions that\npoints to a UDF_INIT structure, used for communicating\ninformation between the functions. Its structure members\nare:\nmy_bool maybe_null\nmaybe_null should be set to 1 if x_init can return a NULL\nvalue, Defaults to 1 if any arguments are declared\nmaybe_null.\n \nunsigned int decimals\nNumber of decimals after the decimal point. The default, if\nan explicit number of decimals is passed in the arguments to\nthe main function, is the maximum number of decimals, so if\n9.5, 9.55 and 9.555 are passed to the function, the default\nwould be three (based on 9.555, the maximum). If there are\nno explicit number of decimals, the default is set to 31, or\none more than the maximum for the DOUBLE, FLOAT and DECIMAL\ntypes. This default can be changed in the function to suit\nthe actual calculation.\n \nunsigned int max_length\nMaximum length of the result. For integers, the default is\n21. For strings, the length of the longest argument. For\nreals, the default is 13 plus the number of decimals\nindicated by initid->decimals. The length includes any signs\nor decimal points. Can also be set to 65KB or 16MB in order\nto return a BLOB. The memory remains unallocated, but this\nis used to decide on the data type to use if the data needs\nto be temporarily stored.\n \nchar *ptr\nA pointer for use as required by the function. Commonly,\ninitid->ptr is used to communicate allocated memory, with\nx_init() allocating the memory and assigning it to this\npointer, x() using it, and x_deinit() de-allocating it.\n \nmy_bool const_item\nShould be set to 1 in x_init() if x() always returns the\nsame value, otherwise 0.\n \n\nAggregate Functions\n \nx_clear()\n \nx_clear() is a required function for aggregate functions,\nand is declared as follows:\n \nvoid x_clear(UDF_INIT *initid, char *is_null, char *error);\n \nIt is called when the summary results need to be reset, that\nis at the beginning of each new group. but also to reset the\nvalues when there were no matching rows.\n \nis_null is set to point to CHAR(0) before calling x_clear().\n \nIn the case of an error, you can store the value to which\nthe error argument points (a single-byte variable, not a\nstring string buffer) in the variable.\n \nx_reset()\n \nx_reset() is declared as follows:\n \nvoid x_reset(UDF_INIT *initid, UDF_ARGS *args,\n char *is_null, char *error);\n \nIt is called on finding the first row in a new group. Should\nreset the summary variables, and then use UDF_ARGS as the\nfirst value in the group\'s internal summary value. The\nfunction is not required if the UDF interface uses\nx_clear().\n \nx_add()\n \nx_add() is declared as follows:\n \nvoid x_add(UDF_INIT *initid, UDF_ARGS *args,\n char *is_null, char *error);\n \nIt is called for all rows belonging to the same group, and\nshould be used to add the value in UDF_ARGS to the internal\nsummary variable.\n \nx_remove()\n \nx_remove() was added in MariaDB 10.4 and is declared as\nfollows (same as x_add()):\n \nvoid x_remove(UDF_INIT* initid, UDF_ARGS* args,\n char* is_null, char *error );\n \nIt adds more efficient support of aggregate UDFs as window\nfunctions. x_remove() should \"subtract\" the row (reverse\nx_add()). In MariaDB 10.4 aggregate UDFs will work as WINDOW\nfunctions without x_remove() but it will not be so\nefficient.\n \nIf x_remove() supported (defined) detected automatically.\n \n\n \n \n \n \n \n \n \n\nURL:\nhttps://mariadb.com/kb/en/user-defined-functions-calling-sequences/','','https://mariadb.com/kb/en/user-defined-functions-calling-sequences/'),(262,'User-Defined Functions Security',21,'The MariaDB server imposes a number of limitations on\nuser-defined functions for security purposes.\nThe INSERT privilege for the mysql database is required to\nrun CREATE FUNCTION, as a record will be added to the\nmysql.func-table.\nThe DELETE privilege for the mysql database is required to\nrun DROP FUNCTION as the corresponding record will be\nremoved from the mysql.func-table.\nUDF object files can only be placed in the plugin directory,\nas specified by the value of the plugin_dir system variable.\nAt least one symbol, beyond the required x() - corresponding\nto an SQL function X()) - is required. These can be\nx_init(), x_deinit(), xxx_reset(), x_clear() and x_add()\nfunctions (see Creating User-defined Functions). The\nallow-suspicious-udfs mysqld option (by default unset)\nprovides a workaround, permitting only one symbol to be\nused. This is not recommended, as it opens the possibility\nof loading shared objects that are not legitimate\nuser-defined functions.\n \n\n \n \n \n \n \n \n \n\nURL:\nhttps://mariadb.com/kb/en/user-defined-functions-security/','','https://mariadb.com/kb/en/user-defined-functions-security/'),(504,'QUARTER',31,'Syntax\n------ \nQUARTER(date)\n \nDescription\n----------- \nReturns the quarter of the year for date, in the range 1 to\n4. Returns 0 if month contains a zero value, or NULL if the\ngiven value is not otherwise a valid date (zero values are\naccepted).\n \nExamples\n-------- \nSELECT QUARTER(\'2008-04-01\');\n+-----------------------+\n| QUARTER(\'2008-04-01\') |\n+-----------------------+\n| 2 |\n+-----------------------+\n \nSELECT QUARTER(\'2019-00-01\');\n+-----------------------+\n| QUARTER(\'2019-00-01\') |\n+-----------------------+\n| 0 |\n+-----------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/quarter/','','https://mariadb.com/kb/en/quarter/'),(505,'SECOND',31,'Syntax\n------ \nSECOND(time)\n \nDescription\n----------- \nReturns the second for a given time (which can include\nmicroseconds), in the range 0 to 59, or NULL if not given a\nvalid time value.\n \nExamples\n-------- \nSELECT SECOND(\'10:05:03\');\n+--------------------+\n| SECOND(\'10:05:03\') |\n+--------------------+\n| 3 |\n+--------------------+\n \nSELECT SECOND(\'10:05:01.999999\');\n+---------------------------+\n| SECOND(\'10:05:01.999999\') |\n+---------------------------+\n| 1 |\n+---------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/second/','','https://mariadb.com/kb/en/second/'),(511,'TIME Function',31,'Syntax\n------ \nTIME(expr)\n \nDescription\n----------- \nExtracts the time part of the time or datetime expression\nexpr and\nreturns it as a string.\n \nExamples\n-------- \nSELECT TIME(\'2003-12-31 01:02:03\');\n+-----------------------------+\n| TIME(\'2003-12-31 01:02:03\') |\n+-----------------------------+\n| 01:02:03 |\n+-----------------------------+\n \nSELECT TIME(\'2003-12-31 01:02:03.000123\');\n+------------------------------------+\n| TIME(\'2003-12-31 01:02:03.000123\') |\n+------------------------------------+\n| 01:02:03.000123 |\n+------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/time-function/','','https://mariadb.com/kb/en/time-function/'),(263,'mysql.func Table',21,'The mysql.func table stores information about user-defined\nfunctions (UDFs) created with the CREATE FUNCTION UDF\nstatement.\n \nIn MariaDB 10.4 and later, this table uses the Aria storage\nengine.\n \nMariaDB until 10.3\n \nIn MariaDB 10.3 and before, this table uses the MyISAM\nstorage engine.\n \nThe mysql.func table contains the following fields:\n \nField | Type | Null | Key | Default | Description | \n \nname | char(64) | NO | PRI | | UDF name | \n \nret | tinyint(1) | NO | | 0 | | \n \ndl | char(128) | NO | | | Shared library name | \n \ntype | enum(\'function\',\'aggregate\') | NO | | NULL |\nType, either function or aggregate. Aggregate functions are\nsummary functions such as SUM() and AVG(). | \n \nExample\n \nSELECT * FROM mysql.func;\n+------------------------------+-----+--------------+-----------+\n| name | ret | dl | type |\n+------------------------------+-----+--------------+-----------+\n| spider_direct_sql | 2 | ha_spider.so | function |\n| spider_bg_direct_sql | 2 | ha_spider.so | aggregate |\n| spider_ping_table | 2 | ha_spider.so | function |\n| spider_copy_tables | 2 | ha_spider.so | function |\n| spider_flush_table_mon_cache | 2 | ha_spider.so | function\n|\n+------------------------------+-----+--------------+-----------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/mysqlfunc-table/','','https://mariadb.com/kb/en/mysqlfunc-table/'),(264,'AUTO_INCREMENT',22,'Description\n----------- \nThe AUTO_INCREMENT attribute can be used to generate a\nunique identity for new rows. When you insert a new record\nto the table, and the auto_increment field is NULL or\nDEFAULT, the value will automatically be incremented. This\nalso applies to 0, unless the NO_AUTO_VALUE_ON_ZERO SQL_MODE\nis enabled.\n \nAUTO_INCREMENT columns start from 1 by default. The\nautomatically generated value can never be lower than 0.\n \nEach table can have only one AUTO_INCREMENT column. It must\ndefined as a key (not necessarily the PRIMARY KEY or UNIQUE\nkey). In some storage engines (including the default\nInnoDB), if the key consists of multiple columns, the\nAUTO_INCREMENT column must be the first column. Storage\nengines that permit the column to be placed elsewhere are\nAria, MyISAM, MERGE, Spider, TokuDB, BLACKHOLE, FederatedX\nand Federated.\n \nCREATE TABLE animals (\n id MEDIUMINT NOT NULL AUTO_INCREMENT,\n name CHAR(30) NOT NULL,\n PRIMARY KEY (id)\n );\n \nINSERT INTO animals (name) VALUES\n (\'dog\'),(\'cat\'),(\'penguin\'),\n (\'fox\'),(\'whale\'),(\'ostrich\');\n \nSELECT * FROM animals;\n \n+----+---------+\n| id | name |\n+----+---------+\n| 1 | dog |\n| 2 | cat |\n| 3 | penguin |\n| 4 | fox |\n| 5 | whale |\n| 6 | ostrich |\n+----+---------+\n \nSERIAL is an alias for BIGINT UNSIGNED NOT NULL\nAUTO_INCREMENT UNIQUE.\n \nCREATE TABLE t (id SERIAL, c CHAR(1)) ENGINE=InnoDB;\n \nSHOW CREATE TABLE t \\G\n*************************** 1. row\n***************************\n Table: t\nCreate Table: CREATE TABLE `t` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,\n `c` char(1) DEFAULT NULL,\n UNIQUE KEY `id` (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=latin1\n \nSetting or Changing the Auto_Increment Value\n \nYou can use an ALTER TABLE statement to assign a new value\nto the auto_increment table option, or set the insert_id\nserver system variable to change the next AUTO_INCREMENT\nvalue inserted by the current session.\n \nLAST_INSERT_ID() can be used to see the last AUTO_INCREMENT\nvalue inserted by the current session.\n \nALTER TABLE animals AUTO_INCREMENT=8;\n \nINSERT INTO animals (name) VALUES (\'aardvark\');\n \nSELECT * FROM animals;\n \n+----+-----------+\n| id | name |\n+----+-----------+\n| 1 | dog |\n| 2 | cat |\n| 3 | penguin |\n| 4 | fox |\n| 5 | whale |\n| 6 | ostrich |\n| 8 | aardvark |\n+----+-----------+\n \nSET insert_id=12;\n \nINSERT INTO animals (name) VALUES (\'gorilla\');\n \nSELECT * FROM animals;\n \n+----+-----------+\n| id | name |\n+----+-----------+\n| 1 | dog |\n| 2 | cat |\n| 3 | penguin |\n| 4 | fox |\n| 5 | whale |\n| 6 | ostrich |\n| 8 | aardvark |\n| 12 | gorilla |\n+----+-----------+\n \nInnoDB/XtraDB\n \nUntil MariaDB 10.2.3, InnoDB and XtraDB used an\nauto-increment counter that is stored in memory. When the\nserver restarts, the counter is re-initialized to the\nhighest value used in the table, which cancels the effects\nof any AUTO_INCREMENT = N option in the table statements.\n \nFrom MariaDB 10.2.4, this restriction has been lifted and\nAUTO_INCREMENT is persistent.\n \nSee also AUTO_INCREMENT Handling in XtraDB/InnoDB.\n \nSetting Explicit Values\n \nIt is possible to specify a value for an AUTO_INCREMENT\ncolumn. The value must not exist in the key.\n \nIf the new value is higher than the current maximum value,\nthe AUTO_INCREMENT value is updated, so the next value will\nbe higher. If the new value is lower than the current\nmaximum value, the AUTO_INCREMENT value remains unchanged.\n \nThe following example demonstrates these behaviours:\n \nCREATE TABLE t (id INTEGER UNSIGNED AUTO_INCREMENT PRIMARY\nKEY) ENGINE = InnoDB;\n \nINSERT INTO t VALUES (NULL);\nSELECT id FROM t;\n \n+----+\n| id |\n+----+\n| 1 |\n+----+\n \nINSERT INTO t VALUES (10); -- higher value\nSELECT id FROM t;\n \n+----+\n| id |\n+----+\n| 1 |\n| 10 |\n+----+\n \nINSERT INTO t VALUES (2); -- lower value\nINSERT INTO t VALUES (NULL); -- auto value\nSELECT id FROM t;\n \n+----+\n| id |\n+----+\n| 1 |\n| 2 |\n| 10 |\n| 11 |\n+----+\n \nThe ARCHIVE storage engine does not allow to insert a value\nthat is lower than the current maximum.\n \nMissing Values\n \nAn AUTO_INCREMENT column normally has missing values. This\nhappens because if a row is deleted, or an AUTO_INCREMENT\nvalue is explicitly updated, old values are never re-used.\nThe REPLACE statement also deletes a row, and its value is\nwasted. With InnoDB, values can be reserved by a\ntransaction; but if the transaction fails (for example,\nbecause of a ROLLBACK) the reserved value will be lost.\n \nThus AUTO_INCREMENT values can be used to sort results in a\nchronological order, but not to create a numeric sequence.\n \nReplication\n \nTo make master-master or Galera safe to use AUTO_INCREMENT\none should use the system variables \n auto_increment_increment and auto_increment_offset to\ngenerate unique values for each server.\n \nCHECK Constraints, DEFAULT Values and Virtual Columns\n \nFrom MariaDB 10.2.6 auto_increment columns are no longer\npermitted in CHECK constraints, DEFAULT value expressions\nand virtual columns. They were permitted in earlier\nversions, but did not work correctly. See MDEV-11117.\n \n\n\nURL: https://mariadb.com/kb/en/auto_increment/','','https://mariadb.com/kb/en/auto_increment/'),(516,'TIME_FORMAT',31,'Syntax\n------ \nTIME_FORMAT(time,format)\n \nDescription\n----------- \nThis is used like the DATE_FORMAT() function, but the format\nstring\nmay contain format specifiers only for hours, minutes, and\nseconds.\nOther specifiers produce a NULL value or 0.\n \nExamples\n-------- \nSELECT TIME_FORMAT(\'100:00:00\', \'%H %k %h %I %l\');\n+--------------------------------------------+\n| TIME_FORMAT(\'100:00:00\', \'%H %k %h %I %l\') |\n+--------------------------------------------+\n| 100 100 04 04 4 |\n+--------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/time_format/','','https://mariadb.com/kb/en/time_format/'),(517,'TIME_TO_SEC',31,'Syntax\n------ \nTIME_TO_SEC(time)\n \nDescription\n----------- \nReturns the time argument, converted to seconds.\n \nThe value returned by TIME_TO_SEC is of type DOUBLE. Before\nMariaDB 5.3 (and MySQL 5.6), the type was INT. See\nMicroseconds in MariaDB.\n \nExamples\n-------- \nSELECT TIME_TO_SEC(\'22:23:00\');\n+-------------------------+\n| TIME_TO_SEC(\'22:23:00\') |\n+-------------------------+\n| 80580 |\n+-------------------------+\n \nSELECT TIME_TO_SEC(\'00:39:38\');\n+-------------------------+\n| TIME_TO_SEC(\'00:39:38\') |\n+-------------------------+\n| 2378 |\n+-------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/time_to_sec/','','https://mariadb.com/kb/en/time_to_sec/'),(265,'BIGINT',22,'Syntax\n------ \nBIGINT[(M)] [SIGNED | UNSIGNED | ZEROFILL]\n \nDescription\n----------- \nA large integer. The signed range is -9223372036854775808 to\n9223372036854775807. The unsigned range is 0 to\n18446744073709551615.\n \nIf a column has been set to ZEROFILL, all values will be\nprepended by zeros so that the BIGINT value contains a\nnumber of M digits.\n \nNote: If the ZEROFILL attribute has been specified, the\ncolumn will automatically become UNSIGNED.\n \nFor more details on the attributes, see Numeric Data Type\nOverview.\n \nSERIAL is an alias for:\n \nBIGINT UNSIGNED NOT NULL AUTO_INCREMENT UNIQUE\n \nExamples\n-------- \nCREATE TABLE bigints (a BIGINT,b BIGINT UNSIGNED,c BIGINT\nZEROFILL);\n \nINSERT INTO bigints VALUES (-10,-10,-10);\nQuery OK, 1 row affected, 2 warnings (0.08 sec)\nWarning (Code 1264): Out of range value for column \'b\' at\nrow 1\nWarning (Code 1264): Out of range value for column \'c\' at\nrow 1\n \nINSERT INTO bigints VALUES (-10,10,-10);Query OK, 1 row\naffected, 1 warning (0.08 sec)\nWarning (Code 1264): Out of range value for column \'c\' at\nrow 1\n \nINSERT INTO bigints VALUES (-10,10,10);\n \nINSERT INTO bigints VALUES\n(9223372036854775808,9223372036854775808,9223372036854775808);\nQuery OK, 1 row affected, 1 warning (0.07 sec)\nWarning (Code 1264): Out of range value for column \'a\' at\nrow 1\n \nINSERT INTO bigints VALUES\n(9223372036854775807,9223372036854775808,9223372036854775808);\n \nSELECT * FROM bigints;\n+---------------------+---------------------+----------------------+\n| a | b | c |\n+---------------------+---------------------+----------------------+\n| -10 | 0 | 00000000000000000000 |\n| -10 | 10 | 00000000000000000000 |\n| -10 | 10 | 00000000000000000010 |\n| 9223372036854775807 | 9223372036854775808 |\n09223372036854775808 |\n| 9223372036854775807 | 9223372036854775808 |\n09223372036854775808 |\n+---------------------+---------------------+----------------------+\n \n\n\nURL: https://mariadb.com/kb/en/bigint/','','https://mariadb.com/kb/en/bigint/'),(266,'BINARY',22,'Syntax\n------ \nBINARY(M)\n \nDescription\n----------- \nThe BINARY type is similar to the CHAR type, but stores\nbinary\nbyte strings rather than non-binary character strings. M\nrepresents the\ncolumn length in bytes.\n \nIt contains no character set, and comparison and sorting are\nbased on the numeric value of the bytes.\n \nIf the maximum length is exceeded, and SQL strict mode is\nnot enabled , the extra characters will be dropped with a\nwarning. If strict mode is enabled, an error will occur.\n \nBINARY values are right-padded with 0x00 (the zero byte) to\nthe specified length when inserted. The padding is not\nremoved on select, so this needs to be taken into account\nwhen sorting and comparing, where all bytes are significant.\nThe zero byte, 0x00 is less than a space for comparison\npurposes.\n \nExamples\n-------- \nInserting too many characters, first with strict mode off,\nthen with it on:\n \nCREATE TABLE bins (a BINARY(10));\n \nINSERT INTO bins VALUES(\'12345678901\');\nQuery OK, 1 row affected, 1 warning (0.04 sec)\n \nSELECT * FROM bins;\n \n+------------+\n| a |\n+------------+\n| 1234567890 |\n+------------+\n \nSET sql_mode=\'STRICT_ALL_TABLES\';\n \nINSERT INTO bins VALUES(\'12345678901\');\nERROR 1406 (22001): Data too long for column \'a\' at row 1\n \nSorting is performed with the byte value:\n \nTRUNCATE bins;\n \nINSERT INTO bins VALUES(\'A\'),(\'B\'),(\'a\'),(\'b\');\n \nSELECT * FROM bins ORDER BY a;\n \n+------+\n| a |\n+------+\n| A |\n| B |\n| a |\n| b |\n+------+\n \nUsing CAST to sort as a CHAR instead:\n \nSELECT * FROM bins ORDER BY CAST(a AS CHAR);\n+------+\n| a |\n+------+\n| a |\n| A |\n| b |\n| B |\n+------+\n \nThe field is a BINARY(10), so padding of two \'\\0\'s are\ninserted, causing comparisons that don\'t take this into\naccount to fail:\n \nTRUNCATE bins;\n \nINSERT INTO bins VALUES(\'12345678\');\n \nSELECT a = \'12345678\', a = \'12345678\\0\\0\' from bins;\n \n+----------------+--------------------+\n| a = \'12345678\' | a = \'12345678\\0\\0\' |\n+----------------+--------------------+\n| 0 | 1 |\n+----------------+--------------------+\n \n\n\nURL: https://mariadb.com/kb/en/binary/','','https://mariadb.com/kb/en/binary/'),(267,'BIT',22,'Syntax\n------ \nBIT[(M)]\n \nDescription\n----------- \nA bit-field type. M indicates the number of bits per value,\nfrom 1 to\n64. The default is 1 if M is omitted.\n \nBit values can be inserted with b\'value\' notation, where\nvalue is the bit value in 0\'s and 1\'s.\n \nBit fields are automatically zero-padded from the left to\nthe full length of the bit, so for example in a BIT(4)\nfield, \'10\' is equivalent to \'0010\'.\n \nBits are returned as binary, so to display them, either add\n0, or use a function such as HEX, OCT or BIN to convert\nthem.\n \nExamples\n-------- \nCREATE TEMPORARY TABLE b ( b1 BIT(8) );\nINSERT INTO b VALUES\n(b\'11111111\'),(b\'01010101\'),(b\'1111111111111\');\nQuery OK, 3 rows affected, 1 warning (0.10 sec)\nRecords: 3 Duplicates: 0 Warnings: 1\n \nSHOW WARNINGS;\n+---------+------+---------------------------------------------+\n| Level | Code | Message |\n+---------+------+---------------------------------------------+\n| Warning | 1264 | Out of range value for column \'b1\' at\nrow 3 |\n+---------+------+---------------------------------------------+\n \nSELECT b1+0, HEX(b1), OCT(b1), BIN(b1) FROM b;\n+------+---------+---------+----------+\n| b1+0 | HEX(b1) | OCT(b1) | BIN(b1) |\n+------+---------+---------+----------+\n| 255 | FF | 377 | 11111111 |\n| 85 | 55 | 125 | 1010101 |\n| 255 | FF | 377 | 11111111 |\n+------+---------+---------+----------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/bit/','','https://mariadb.com/kb/en/bit/'),(521,'UTC_DATE',31,'Syntax\n------ \nUTC_DATE, UTC_DATE()\n \nDescription\n----------- \nReturns the current UTC date as a value in \'YYYY-MM-DD\' or\nYYYYMMDD\nformat, depending on whether the function is used in a\nstring or numeric context. \n \nExamples\n-------- \nSELECT UTC_DATE(), UTC_DATE() + 0;\n \n+------------+----------------+\n| UTC_DATE() | UTC_DATE() + 0 |\n+------------+----------------+\n| 2010-03-27 | 20100327 |\n+------------+----------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/utc_date/','','https://mariadb.com/kb/en/utc_date/'),(522,'UTC_TIME',31,'Syntax\n------ \nUTC_TIME\nUTC_TIME([precision])\n \nDescription\n----------- \nReturns the current UTC time as a value in \'HH:MM:SS\' or\nHHMMSS.uuuuuu format, depending on whether the function is\nused in a string or numeric context. \n \nThe optional precision determines the microsecond precision.\nSee Microseconds in MariaDB.\n \nExamples\n-------- \nSELECT UTC_TIME(), UTC_TIME() + 0;\n \n+------------+----------------+\n| UTC_TIME() | UTC_TIME() + 0 |\n+------------+----------------+\n| 17:32:34 | 173234.000000 |\n+------------+----------------+\n \nWith precision:\n \nSELECT UTC_TIME(5);\n+----------------+\n| UTC_TIME(5) |\n+----------------+\n| 07:52:50.78369 |\n+----------------+\n \n\n\nURL: https://mariadb.com/kb/en/utc_time/','','https://mariadb.com/kb/en/utc_time/'),(530,'AsBinary',32,'A synonym for ST_AsBinary().\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/wkb-asbinary/','','https://mariadb.com/kb/en/wkb-asbinary/'),(531,'AsWKB',32,'A synonym for ST_AsBinary().\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/aswkb/','','https://mariadb.com/kb/en/aswkb/'),(532,'MLineFromWKB',32,'Syntax\n------ \nMLineFromWKB(wkb[,srid])\nMultiLineStringFromWKB(wkb[,srid])\n \nDescription\n----------- \nConstructs a MULTILINESTRING value using its WKB\nrepresentation and SRID.\n \nMLineFromWKB() and MultiLineStringFromWKB() are synonyms.\n \nExamples\n-------- \nSET @g = ST_AsBinary(MLineFromText(\'MULTILINESTRING((10\n48,10 21,10 0),(16 0,16 23,16 48))\'));\n \nSELECT ST_AsText(MLineFromWKB(@g));\n+--------------------------------------------------------+\n| ST_AsText(MLineFromWKB(@g)) |\n+--------------------------------------------------------+\n| MULTILINESTRING((10 48,10 21,10 0),(16 0,16 23,16 48)) |\n+--------------------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/mlinefromwkb/','','https://mariadb.com/kb/en/mlinefromwkb/'),(268,'BLOB',22,'Syntax\n------ \nBLOB[(M)]\n \nDescription\n----------- \nA BLOB column with a maximum length of 65,535 (216 - 1)\nbytes. Each\nBLOB value is stored using a two-byte length prefix that\nindicates the\nnumber of bytes in the value.\n \nAn optional length M can be given for this type. If this is\ndone,\nMariaDB creates the column as the smallest BLOB type large\nenough to\nhold values M bytes long.\n \nBLOBS can also be used to store dynamic columns.\n \nBefore MariaDB 10.2.1, BLOB and TEXT columns could not be\nassigned a DEFAULT value. This restriction was lifted in\nMariaDB 10.2.1.\n \nIndexing\n \nIn MariaDB 10.4, it is possible to set a Unique index on a\ncolumn that uses the BLOB data type. In previous releases\nthis was not possible, as the index would only guarantee the\nuniqueness of a fixed number of characters.\n \nOracle Mode\n \nIn Oracle mode from MariaDB 10.3, BLOB is a synonym for\nLONGBLOB.\n \n\n\nURL: https://mariadb.com/kb/en/blob/','','https://mariadb.com/kb/en/blob/'),(270,'BOOLEAN',22,'Syntax\n------ \nBOOL, BOOLEAN\n \nDescription\n----------- \nThese types are synonyms for TINYINT(1). \nA value of zero is considered false. Non-zero values are\nconsidered true:\n \nmysql> SELECT IF(0, \'true\', \'false\');\n+------------------------+\n| IF(0, \'true\', \'false\') |\n+------------------------+\n| false |\n+------------------------+\n \nmysql> SELECT IF(1, \'true\', \'false\');\n+------------------------+\n| IF(1, \'true\', \'false\') |\n+------------------------+\n| true |\n+------------------------+\n \nmysql> SELECT IF(2, \'true\', \'false\');\n+------------------------+\n| IF(2, \'true\', \'false\') |\n+------------------------+\n| true |\n+------------------------+\n \nHowever, the values TRUE and FALSE are merely aliases for 1\nand 0,\nrespectively, as shown here:\n \nmysql> SELECT IF(0 = FALSE, \'true\', \'false\');\n \n+--------------------------------+\n| IF(0 = FALSE, \'true\', \'false\') |\n+--------------------------------+\n| true |\n+--------------------------------+\n \nmysql> SELECT IF(1 = TRUE, \'true\', \'false\');\n+-------------------------------+\n| IF(1 = TRUE, \'true\', \'false\') |\n+-------------------------------+\n| true |\n+-------------------------------+\n \nmysql> SELECT IF(2 = TRUE, \'true\', \'false\');\n+-------------------------------+\n| IF(2 = TRUE, \'true\', \'false\') |\n+-------------------------------+\n| false |\n+-------------------------------+\n \nmysql> SELECT IF(2 = FALSE, \'true\', \'false\');\n+--------------------------------+\n| IF(2 = FALSE, \'true\', \'false\') |\n+--------------------------------+\n| false |\n+--------------------------------+\n \nUNKNOWN is an alias for NULL.\n \nThe last two statements display the results shown because 2\nis equal\nto neither 1 nor 0.\n \n\n\nURL: https://mariadb.com/kb/en/boolean/','','https://mariadb.com/kb/en/boolean/'),(271,'CHAR',22,'This article covers the CHAR data type. See CHAR Function\nfor the function.\n \nSyntax\n------ \n[NATIONAL] CHAR[(M)] [CHARACTER SET charset_name] [COLLATE\ncollation_name]\n \nDescription\n----------- \nA fixed-length string that is always right-padded with\nspaces to the specified\nlength when stored. M represents the column length in\ncharacters. The range\nof M is 0 to 255. If M is omitted, the length is 1.\n \nCHAR(0) columns can contain 2 values: an empty string or\nNULL. Such columns cannot be part of an index. The CONNECT\nstorage engine does not support CHAR(0).\n \nNote: Trailing spaces are removed when CHAR values are\nretrieved\nunless the PAD_CHAR_TO_FULL_LENGTH SQL mode is enabled.\n \nBefore MariaDB 10.2, all collations were of type PADSPACE,\nmeaning that CHAR (as well as VARCHAR and TEXT) values are\ncompared without regard for trailing spaces. This does not\napply to the LIKE pattern-matching operator, which takes\ninto account trailing spaces.\n \nIf a unique index consists of a column where trailing pad\ncharacters are stripped or ignored, inserts into that column\nwhere values differ only by the number of trailing pad\ncharacters will result in a duplicate-key error.\n \nExamples\n-------- \nTrailing spaces:\n \nCREATE TABLE strtest (c CHAR(10));\nINSERT INTO strtest VALUES(\'Maria \');\n \nSELECT c=\'Maria\',c=\'Maria \' FROM strtest;\n \n+-----------+--------------+\n| c=\'Maria\' | c=\'Maria \' |\n+-----------+--------------+\n| 1 | 1 |\n+-----------+--------------+\n \nSELECT c LIKE \'Maria\',c LIKE \'Maria \' FROM strtest;\n \n+----------------+-------------------+\n| c LIKE \'Maria\' | c LIKE \'Maria \' |\n+----------------+-------------------+\n| 1 | 0 |\n+----------------+-------------------+\n \nNO PAD Collations\n \nNO PAD collations regard trailing spaces as normal\ncharacters. You can get a list of all NO PAD collations by\nquerying the Information Schema Collations table, for\nexample:\n \nSELECT collation_name FROM information_schema.collations \n WHERE collation_name LIKE \"%nopad%\";\n \n+------------------------------+\n| collation_name |\n+------------------------------+\n| big5_chinese_nopad_ci |\n| big5_nopad_bin |\n...\n \n\n\nURL: https://mariadb.com/kb/en/char/','','https://mariadb.com/kb/en/char/'),(533,'MPointFromWKB',32,'Syntax\n------ \nMPointFromWKB(wkb[,srid])\nMultiPointFromWKB(wkb[,srid])\n \nDescription\n----------- \nConstructs a MULTIPOINT value using its WKB representation\nand SRID.\n \nMPointFromWKB() and MultiPointFromWKB() are synonyms.\n \nExamples\n-------- \nSET @g = ST_AsBinary(MPointFromText(\'MultiPoint( 1 1, 2 2,\n5 3, 7 2, 9 3, 8 4, 6 6, 6 9, 4 9, 1 5 )\'));\n \nSELECT ST_AsText(MPointFromWKB(@g));\n+-----------------------------------------------------+\n| ST_AsText(MPointFromWKB(@g)) |\n+-----------------------------------------------------+\n| MULTIPOINT(1 1,2 2,5 3,7 2,9 3,8 4,6 6,6 9,4 9,1 5) |\n+-----------------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/mpointfromwkb/','','https://mariadb.com/kb/en/mpointfromwkb/'),(535,'GeomCollFromWKB',32,'A synonym for ST_GeomCollFromWKB.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/wkb-geomcollfromwkb/','','https://mariadb.com/kb/en/wkb-geomcollfromwkb/'),(536,'GeometryCollectionFromWKB',32,'A synonym for ST_GeomCollFromWKB.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/geometrycollectionfromwkb/','','https://mariadb.com/kb/en/geometrycollectionfromwkb/'),(537,'GeometryFromWKB',32,'A synonym for ST_GeomFromWKB.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/geometryfromwkb/','','https://mariadb.com/kb/en/geometryfromwkb/'),(538,'GeomFromWKB',32,'A synonym for ST_GeomFromWKB.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/wkb-geomfromwkb/','','https://mariadb.com/kb/en/wkb-geomfromwkb/'),(539,'LineFromWKB',32,'A synonym for ST_LineFromWKB.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/wkb-linefromwkb/','','https://mariadb.com/kb/en/wkb-linefromwkb/'),(540,'LineStringFromWKB',32,'A synonym for ST_LineFromWKB.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/linestringfromwkb/','','https://mariadb.com/kb/en/linestringfromwkb/'),(541,'MultiLineStringFromWKB',32,'A synonym for MLineFromWKB().\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/multilinestringfromwkb/','','https://mariadb.com/kb/en/multilinestringfromwkb/'),(542,'MultiPointFromWKB',32,'A synonym for MPointFromWKB.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/multipointfromwkb/','','https://mariadb.com/kb/en/multipointfromwkb/'),(543,'MultiPolygonFromWKB',32,'Synonym for MPolyFromWKB.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/multipolygonfromwkb/','','https://mariadb.com/kb/en/multipolygonfromwkb/'),(544,'PointFromWKB',32,'A synonym for ST_PointFromWKB.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/wkb-pointfromwkb/','','https://mariadb.com/kb/en/wkb-pointfromwkb/'),(273,'DATE',22,'Syntax\n------ \nDATE\n \nDescription\n----------- \nA date. The supported range is \'1000-01-01\' to\n\'9999-12-31\'. MariaDB\ndisplays DATE values in \'YYYY-MM-DD\' format, but can be\nassigned dates in looser formats, including strings or\nnumbers, as long as they make sense. These include a short\nyear, YY-MM-DD, no delimiters, YYMMDD, or any other\nacceptable delimiter, for example YYYY/MM/DD. For details,\nsee date and time literals.\n \n\'0000-00-00\' is a permitted special value (zero-date),\nunless the NO_ZERO_DATE SQL_MODE is used. Also, individual\ncomponents of a date can be set to 0 (for example:\n\'2015-00-12\'), unless the NO_ZERO_IN_DATE SQL_MODE is\nused. In many cases, the result of en expression involving a\nzero-date, or a date with zero-parts, is NULL. If the\nALLOW_INVALID_DATES SQL_MODE is enabled, if the day part is\nin the range between 1 and 31, the date does not produce any\nerror, even for months that have less than 31 days.\n \nExamples\n-------- \nCREATE TABLE t1 (d DATE);\n \nINSERT INTO t1 VALUES (\"2010-01-12\"), (\"2011-2-28\"),\n(\'120314\'),(\'13*04*21\');\n \nSELECT * FROM t1;\n \n+------------+\n| d |\n+------------+\n| 2010-01-12 |\n| 2011-02-28 |\n| 2012-03-14 |\n| 2013-04-21 |\n+------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/date/','','https://mariadb.com/kb/en/date/'),(274,'DATETIME',22,'Syntax\n------ \nDATETIME [(microsecond precision)]\n \nDescription\n----------- \nA date and time combination. The supported range is\n\'1000-01-01 00:00:00.000000\' to \'9999-12-31\n23:59:59.999999\'.\nMariaDB displays DATETIME values in \'YYYY-MM-DD HH:MM:SS\'\nformat, but\nallows assignment of values to DATETIME columns using either\nstrings or\nnumbers. For details, see date and time literals.\n \nThe microsecond precision can be from 0-6. If not specified\n0 is used.\n \n\'0000-00-00\' is a permitted special value (zero-date),\nunless the NO_ZERO_DATE SQL_MODE is used. Also, individual\ncomponents of a date can be set to 0 (for example:\n\'2015-00-12\'), unless the NO_ZERO_IN_DATE SQL_MODE is\nused. In many cases, the result of en expression involving a\nzero-date, or a date with zero-parts, is NULL. If the\nALLOW_INVALID_DATES SQL_MODE is enabled, if the day part is\nin the range between 1 and 31, the date does not produce any\nerror, even for months that have less than 31 days.\n \nSince MariaDB 10.0.1, DATETIME columns also accept\nCURRENT_TIMESTAMP as the default value.\n \nMariaDB 10.1.2 introduced the --mysql56-temporal-format\noption, on by default, which allows MariaDB to store\nDATETMEs using the same low-level format MySQL 5.6 uses. For\nmore information, see Internal Format, below.\n \nFor storage requirements, see Data Type Storage\nRequirements.\n \nOracle Mode\n \nIn Oracle mode from MariaDB 10.3, DATE with a time portion\nis a synonym for DATETIME.\n \nInternal Format\n \nIn MariaDB 10.1.2 a new temporal format was introduced from\nMySQL 5.6 that alters how the TIME, DATETIME and TIMESTAMP\ncolumns operate at lower levels. These changes allow these\ntemporal data types to have fractional parts and negative\nvalues. You can disable this feature using the\nmysql56_temporal_format system variable.\n \nTables that include TIMESTAMP values that were created on an\nolder version of MariaDB or that were created while the\nmysql56_temporal_format system variable was disabled\ncontinue to store data using the older data type format.\n \nIn order to update table columns from the older format to\nthe newer format, execute an ALTER TABLE... MODIFY COLUMN\nstatement that changes the column to the *same* data type.\nThis change may be needed if you want to export the table\'s\ntablespace and import it onto a server that has\nmysql56_temporal_format=ON set (see MDEV-15225).\n \nFor instance, if you have a DATETIME column in your table: \n \nSHOW VARIABLES LIKE \'mysql56_temporal_format\';\n \n+-------------------------+-------+\n| Variable_name | Value |\n+-------------------------+-------+\n| mysql56_temporal_format | ON |\n+-------------------------+-------+\n \nALTER TABLE example_table MODIFY ts_col DATETIME;\n \nWhen MariaDB executes the ALTER TABLE statement, it converts\nthe data from the older temporal format to the newer one. \n \nIn the event that you have several tables and columns using\ntemporal data types that you want to switch over to the new\nformat, make sure the system variable is enabled, then\nperform a dump and restore using mysqldump. The columns\nusing relevant temporal data types are restored using the\nnew temporal format.\n \nExamples\n-------- \nCREATE TABLE t1 (d DATETIME);\n \nINSERT INTO t1 VALUES (\"2011-03-11\"), (\"2012-04-19\n13:08:22\"),\n (\"2013-07-18 13:44:22.123456\");\n \nSELECT * FROM t1;\n \n+---------------------+\n| d |\n+---------------------+\n| 2011-03-11 00:00:00 |\n| 2012-04-19 13:08:22 |\n| 2013-07-18 13:44:22 |\n+---------------------+\n \nCREATE TABLE t2 (d DATETIME(6));\n \nINSERT INTO t2 VALUES (\"2011-03-11\"), (\"2012-04-19\n13:08:22\"),\n (\"2013-07-18 13:44:22.123456\");\n \nSELECT * FROM t2;\n \n+----------------------------+\n| d |\n+----------------------------+\n| 2011-03-11 00:00:00.000000 |\n| 2012-04-19 13:08:22.000000 |\n| 2013-07-18 13:44:22.123456 |\n+----------------------------++\n \nStrings used in datetime context are automatically converted\nto datetime(6). If you want to have a datetime without\nseconds, you should use CONVERT(..,datetime).\n \nSELECT CONVERT(\'2007-11-30 10:30:19\',datetime);\n+-----------------------------------------+\n| CONVERT(\'2007-11-30 10:30:19\',datetime) |\n+-----------------------------------------+\n| 2007-11-30 10:30:19 |\n+-----------------------------------------+\n \nSELECT CONVERT(\'2007-11-30 10:30:19\',datetime(6));\n+--------------------------------------------+\n| CONVERT(\'2007-11-30 10:30:19\',datetime(6)) |\n+--------------------------------------------+\n| 2007-11-30 10:30:19.000000 |\n+--------------------------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/datetime/','','https://mariadb.com/kb/en/datetime/'),(545,'PolyFromWKB',32,'A synonym for ST_PolyFromWKB.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/wkb-polyfromwkb/','','https://mariadb.com/kb/en/wkb-polyfromwkb/'),(546,'PolygonFromWKB',32,'A synonym for ST_PolyFromWKB.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/polygonfromwkb/','','https://mariadb.com/kb/en/polygonfromwkb/'),(547,'ST_AsBinary',32,'Syntax\n------ \nST_AsBinary(g)\nAsBinary(g)\nST_AsWKB(g)\nAsWKB(g)\n \nDescription\n----------- \nConverts a value in internal geometry format to its WKB\nrepresentation and returns the binary result.\n \nST_AsBinary(), AsBinary(), ST_AsWKB() and AsWKB() are\nsynonyms,\n \nExamples\n-------- \nSET @poly = ST_GeomFromText(\'POLYGON((0 0,0 1,1 1,1 0,0\n0))\');\nSELECT ST_AsBinary(@poly);\n \nSELECT ST_AsText(ST_GeomFromWKB(ST_AsWKB(@poly)));\n+--------------------------------------------+\n| ST_AsText(ST_GeomFromWKB(ST_AsWKB(@poly))) |\n+--------------------------------------------+\n| POLYGON((0 0,0 1,1 1,1 0,0 0)) |\n+--------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_asbinary/','','https://mariadb.com/kb/en/st_asbinary/'),(548,'ST_AsWKB',32,'A synonym for ST_AsBinary().\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_aswkb/','','https://mariadb.com/kb/en/st_aswkb/'),(550,'ST_GeometryCollectionFromWKB',32,'A synonym for ST_GeomCollFromWKB.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_geometrycollectionfromwkb/','','https://mariadb.com/kb/en/st_geometrycollectionfromwkb/'),(551,'ST_GeometryFromWKB',32,'A synonym for ST_GeomFromWKB.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_geometryfromwkb/','','https://mariadb.com/kb/en/st_geometryfromwkb/'),(275,'DECIMAL',22,'Syntax\n------ \nDECIMAL[(M[,D])] [SIGNED | UNSIGNED | ZEROFILL]\n \nDescription\n----------- \nA packed \"exact\" fixed-point number. M is the total number\nof digits (the\nprecision) and D is the number of digits after the decimal\npoint (the\nscale). The decimal point and (for negative numbers) the\n\"-\" sign are not\ncounted in M. If D is 0, values have no decimal point or\nfractional\npart and on INSERT the value will be rounded to the nearest\nDECIMAL. The maximum number of digits (M) for DECIMAL is 65.\nThe maximum number of supported decimals (D) is 30 before\nMariadB 10.2.1 and 38 afterwards. If D is omitted, the\ndefault is 0. If M is omitted, the default is 10.\n \nUNSIGNED, if specified, disallows negative values.\n \nZEROFILL, if specified, pads the number with zeros, up to\nthe total number\nof digits specified by M.\n \nAll basic calculations (+, -, *, /) with DECIMAL columns are\ndone with\na precision of 65 digits.\n \nFor more details on the attributes, see Numeric Data Type\nOverview.\n \nOracle Mode\n \nIn Oracle mode from MariaDB 10.3, NUMBER is a synonym.\n \nExamples\n-------- \nCREATE TABLE t1 (d DECIMAL UNSIGNED ZEROFILL);\n \nINSERT INTO t1 VALUES (1),(2),(3),(4.0),(5.2),(5.7);\nQuery OK, 6 rows affected, 2 warnings (0.16 sec)\nRecords: 6 Duplicates: 0 Warnings: 2\n \nNote (Code 1265): Data truncated for column \'d\' at row 5\nNote (Code 1265): Data truncated for column \'d\' at row 6\n \nSELECT * FROM t1;\n \n+------------+\n| d |\n+------------+\n| 0000000001 |\n| 0000000002 |\n| 0000000003 |\n| 0000000004 |\n| 0000000005 |\n| 0000000006 |\n+------------+\n \nINSERT INTO t1 VALUES (-7);\nERROR 1264 (22003): Out of range value for column \'d\' at\nrow 1\n \n\n\nURL: https://mariadb.com/kb/en/decimal/','','https://mariadb.com/kb/en/decimal/'),(276,'ENUM',22,'Syntax\n------ \nENUM(\'value1\',\'value2\',...) [CHARACTER SET charset_name]\n[COLLATE collation_name]\n \nDescription\n----------- \nAn enumeration. A string object that can have only one\nvalue, chosen\nfrom the list of values \'value1\', \'value2\', ..., NULL or\nthe special \n\'\' error value. In theory, an ENUM column can have a\nmaximum of 65,535 distinct\nvalues; in practice, the real maximum depends on many\nfactors. ENUM values are represented internally as integers.\n \nTrailing spaces are automatically stripped from ENUM values\non table creation.\n \nENUMs require relatively little storage space compared to\nstrings, either one or two bytes depending on the number of\nenumeration values.\n \nNULL and empty values\n \nAn ENUM can also contain NULL and empty values. If the ENUM\ncolumn is declared to permit NULL values, NULL becomes a\nvalid value, as well as the default value (see below). If\nstrict SQL Mode is not enabled, and an invalid value is\ninserted into an ENUM, a special empty string, with an index\nvalue of zero (see Numeric index, below), is inserted, with\na warning. This may be confusing, because the empty string\nis also a possible value, and the only difference if that in\nthis case its index is not 0. Inserting will fail with an\nerror if strict mode is active.\n \nIf a DEFAULT clause is missing, the default value will be:\nNULL is the column is nullable;\notherwise, the first value in the enumaration.\n \nNumeric index\n \nENUM values are indexed numerically in the order they are\ndefined, and sorting will be performed in this numeric\norder. We suggest not using ENUM to store numerals, as there\nis little to no storage space benefit, and it is easy to\nconfuse the enum integer with the enum numeral value by\nleaving out the quotes.\n \nAn ENUM defined as ENUM(\'apple\',\'orange\',\'pear\') would\nhave the following index values:\n \nIndex | Value | \n \nNULL | NULL | \n \n0 | \'\' | \n \n1 | \'apple\' | \n \n2 | \'orange\' | \n \n3 | \'pear\' | \n \nExamples\n-------- \nCREATE TABLE fruits (\n id INT NOT NULL auto_increment PRIMARY KEY,\n fruit ENUM(\'apple\',\'orange\',\'pear\'),\n bushels INT);\n \nDESCRIBE fruits;\n \n+---------+-------------------------------+------+-----+---------+----------------+\n| Field | Type | Null | Key | Default | Extra |\n+---------+-------------------------------+------+-----+---------+----------------+\n| id | int(11) | NO | PRI | NULL | auto_increment |\n| fruit | enum(\'apple\',\'orange\',\'pear\') | YES | | NULL\n| |\n| bushels | int(11) | YES | | NULL | |\n+---------+-------------------------------+------+-----+---------+----------------+\n \nINSERT INTO fruits\n (fruit,bushels) VALUES\n (\'pear\',20),\n (\'apple\',100),\n (\'orange\',25);\n \nINSERT INTO fruits\n (fruit,bushels) VALUES\n (\'avocado\',10);\nERROR 1265 (01000): Data truncated for column \'fruit\' at\nrow 1\n \nSELECT * FROM fruits;\n \n+----+--------+---------+\n| id | fruit | bushels |\n+----+--------+---------+\n| 1 | pear | 20 |\n| 2 | apple | 100 |\n| 3 | orange | 25 |\n+----+--------+---------+\n \nSelecting by numeric index:\n \nSELECT * FROM fruits WHERE fruit=2;\n \n+----+--------+---------+\n| id | fruit | bushels |\n+----+--------+---------+\n| 3 | orange | 25 |\n+----+--------+---------+\n \nSorting is according to the index value:\n \nCREATE TABLE enums (a ENUM(\'2\',\'1\'));\n \nINSERT INTO enums VALUES (\'1\'),(\'2\');\n \nSELECT * FROM enums ORDER BY a ASC;\n \n+------+\n| a |\n+------+\n| 2 |\n| 1 |\n+------+\n \nIt\'s easy to get confused between returning the enum\ninteger with the stored value, so we don\'t suggest using\nENUM to store numerals. The first example returns the 1st\nindexed field (\'2\' has an index value of 1, as it\'s\ndefined first), while the second example returns the string\nvalue \'1\'.\n \nSELECT * FROM enums WHERE a=1;\n \n+------+\n| a |\n+------+\n| 2 |\n+------+\n \nSELECT * FROM enums WHERE a=\'1\';\n \n+------+\n| a |\n+------+\n| 1 |\n+------+\n \n\n\nURL: https://mariadb.com/kb/en/enum/','','https://mariadb.com/kb/en/enum/'),(552,'ST_GeomFromWKB',32,'Syntax\n------ \nST_GeomFromWKB(wkb[,srid])\nST_GeometryFromWKB(wkb[,srid])\nGeomFromWKB(wkb[,srid])\nGeometryFromWKB(wkb[,srid])\n \nDescription\n----------- \nConstructs a geometry value of any type using its WKB\nrepresentation and SRID.\n \nST_GeomFromWKB(), ST_GeometryFromWKB(), GeomFromWKB() and\nGeometryFromWKB() are synonyms.\n \nExamples\n-------- \nSET @g = ST_AsBinary(ST_LineFromText(\'LINESTRING(0 4, 4\n6)\'));\n \nSELECT ST_AsText(ST_GeomFromWKB(@g));\n+-------------------------------+\n| ST_AsText(ST_GeomFromWKB(@g)) |\n+-------------------------------+\n| LINESTRING(0 4,4 6) |\n+-------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_geomfromwkb/','','https://mariadb.com/kb/en/st_geomfromwkb/'),(553,'ST_LineFromWKB',32,'Syntax\n------ \nST_LineFromWKB(wkb[,srid])\nLineFromWKB(wkb[,srid])\nST_LineStringFromWKB(wkb[,srid])\nLineStringFromWKB(wkb[,srid])\n \nDescription\n----------- \nConstructs a LINESTRING value using its WKB representation\nand SRID.\n \nST_LineFromWKB(), LineFromWKB(), ST_LineStringFromWKB(), and\nLineStringFromWKB() are synonyms.\n \nExamples\n-------- \nSET @g = ST_AsBinary(ST_LineFromText(\'LineString(0 4,4\n6)\'));\n \nSELECT ST_AsText(ST_LineFromWKB(@g)) AS l;\n \n+---------------------+\n| l |\n+---------------------+\n| LINESTRING(0 4,4 6) |\n+---------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_linefromwkb/','','https://mariadb.com/kb/en/st_linefromwkb/'),(554,'ST_LineStringFromWKB',32,'A synonym for ST_LineFromWKB.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_linestringfromwkb/','','https://mariadb.com/kb/en/st_linestringfromwkb/'),(555,'ST_PointFromWKB',32,'Syntax\n------ \nST_PointFromWKB(wkb[,srid])\nPointFromWKB(wkb[,srid])\n \nDescription\n----------- \nConstructs a POINT value using its WKB representation and\nSRID.\n \nST_PointFromWKB() and PointFromWKB() are synonyms.\n \nExamples\n-------- \nSET @g = ST_AsBinary(ST_PointFromText(\'POINT(0 4)\'));\n \nSELECT ST_AsText(ST_PointFromWKB(@g)) AS p;\n \n+------------+\n| p |\n+------------+\n| POINT(0 4) |\n+------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_pointfromwkb/','','https://mariadb.com/kb/en/st_pointfromwkb/'),(277,'DOUBLE',22,'Syntax\n------ \nDOUBLE[(M,D)] [SIGNED | UNSIGNED | ZEROFILL]\nDOUBLE PRECISION[(M,D)] [SIGNED | UNSIGNED | ZEROFILL]\nREAL[(M,D)] [SIGNED | UNSIGNED | ZEROFILL]\n \nDescription\n----------- \nA normal-size (double-precision) floating-point number (see\nFLOAT for a single-precision floating-point number).\n \nAllowable values are:\n-1.7976931348623157E+308 to -2.2250738585072014E-308\n0\n2.2250738585072014E-308 to 1.7976931348623157E+308\n \nThese are the theoretical limits, based on the IEEE\nstandard. The actual range\nmight be slightly smaller depending on your hardware or\noperating system.\n \nM is the total number of digits and D is the number of\ndigits\nfollowing the decimal point. If M and D are omitted, values\nare stored\nto the limits allowed by the hardware. A double-precision\nfloating-point number is accurate to approximately 15\ndecimal places.\n \nUNSIGNED, if specified, disallows negative values.\n \nZEROFILL, if specified, pads the number with zeros, up to\nthe total number\nof digits specified by M.\n \nREAL and DOUBLE PRECISION are synonyms, unless the\nREAL_AS_FLOAT SQL mode is enabled, in which case REAL is a\nsynonym for FLOAT rather than DOUBLE.\n \nSee Floating Point Accuracy for issues when using\nfloating-point numbers.\n \nFor more details on the attributes, see Numeric Data Type\nOverview.\n \nExamples\n-------- \nCREATE TABLE t1 (d DOUBLE(5,0) zerofill);\n \nINSERT INTO t1 VALUES (1),(2),(3),(4);\n \nSELECT * FROM t1;\n \n+-------+\n| d |\n+-------+\n| 00001 |\n| 00002 |\n| 00003 |\n| 00004 |\n+-------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/double/','','https://mariadb.com/kb/en/double/'),(278,'FLOAT',22,'Syntax\n------ \nFLOAT[(M,D)] [SIGNED | UNSIGNED | ZEROFILL]\n \nDescription\n----------- \nA small (single-precision) floating-point number (see DOUBLE\nfor a regular-size floating point number). Allowable values\nare:\n-3.402823466E+38 to -1.175494351E-38\n0\n1.175494351E-38 to 3.402823466E+38. \n \nThese are the theoretical limits, based on the IEEE \nstandard. The actual range might be slightly smaller\ndepending on your\nhardware or operating system.\n \nM is the total number of digits and D is the number of\ndigits\nfollowing the decimal point. If M and D are omitted, values\nare stored\nto the limits allowed by the hardware. A single-precision\nfloating-point number is accurate to approximately 7 decimal\nplaces.\n \nUNSIGNED, if specified, disallows negative values.\n \nUsing FLOAT might give you some unexpected problems because\nall\ncalculations in MariaDB are done with double precision. See\nFloating Point Accuracy.\n \nFor more details on the attributes, see Numeric Data Type\nOverview.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/float/','','https://mariadb.com/kb/en/float/'),(280,'JSON Data Type',22,'The JSON alias was added in MariaDB 10.2.7. This was done to\nmake it possible to use JSON columns in statement based\nreplication from MySQL to MariaDB and to make it possible\nfor MariaDB to read mysqldumps from MySQL.\n \nJSON is an alias for LONGTEXT introduced for compatibility\nreasons with MySQL\'s JSON data type. MariaDB implements\nthis as a LONGTEXT rather, as the JSON data type contradicts\nthe SQL standard, and MariaDB\'s benchmarks indicate that\nperformance is at least equivalent.\n \nIn order to ensure that a a valid json document is inserted,\nthe JSON_VALID function can be used as a CHECK constraint.\nThis constraint is automatically included for types using\nthe JSON alias from MariaDB 10.4.3.\n \nExamples\n-------- \nCREATE TABLE t (j JSON);\n \nDESC t;\n+-------+----------+------+-----+---------+-------+\n| Field | Type | Null | Key | Default | Extra |\n+-------+----------+------+-----+---------+-------+\n| j | longtext | YES | | NULL | |\n+-------+----------+------+-----+---------+-------+\n \nWith validation:\n \nCREATE TABLE t2 (\n j JSON \n CHECK (JSON_VALID(j))\n);\n \nINSERT INTO t2 VALUES (\'invalid\');\nERROR 4025 (23000): CONSTRAINT `j` failed for `test`.`t2`\n \nINSERT INTO t2 VALUES (\'{\"id\": 1, \"name\":\n\"Monty\"}\');\nQuery OK, 1 row affected (0.13 sec)\n \nReplicating JSON Data Between MySQL and MariaDB\n \nThe JSON type in MySQL stores the JSON object in a compact\nform, not as LONGTEXT as in MariaDB.\nThis means that row based replication will not work for JSON\ntypes from MySQL to MariaDB.\n \nThere are a a few different ways to solve this:\nUse statement based replication.\nChange the JSON column to type TEXT in MySQL\n \nConverting a MySQL TABLE with JSON Fields to MariaDB\n \nMariaDB can\'t directly access MySQL\'s JSON format.\n \nThere are a a few different ways to move the table to\nMariaDB:\nChange the JSON column to type TEXT in MySQL. After this,\nMariaDB can directly use the table without any need for a\ndump and restore.\nUse mysqldump to copy the table.\n \nDifferences Between MySQL JSON Strings and MariaDB JSON\nStrings\n \nIn MySQL, JSON is an object and is compared according to\njson values. In MariaDB JSON strings are normal strings and\ncompared as strings. One exception is when using\nJSON_EXTRACT() in which case strings are unescaped before\ncomparison.\n \n\n\nURL: https://mariadb.com/kb/en/json-data-type/','','https://mariadb.com/kb/en/json-data-type/'),(556,'ST_PolyFromWKB',32,'Syntax\n------ \nST_PolyFromWKB(wkb[,srid])\nST_PolygonFromWKB(wkb[,srid])\nPolyFromWKB(wkb[,srid])\nPolygonFromWKB(wkb[,srid])\n \nDescription\n----------- \nConstructs a POLYGON value using its WKB representation and\nSRID.\n \nST_PolyFromWKB(), ST_PolygonFromWKB(), PolyFromWKB() and\nPolygonFromWKB() are synonyms.\n \nExamples\n-------- \nSET @g = ST_AsBinary(ST_PolyFromText(\'POLYGON((1 1,1 5,4\n9,6 9,9 3,7 2,1 1))\'));\n \nSELECT ST_AsText(ST_PolyFromWKB(@g)) AS p;\n \n+----------------------------------------+\n| p |\n+----------------------------------------+\n| POLYGON((1 1,1 5,4 9,6 9,9 3,7 2,1 1)) |\n+----------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_polyfromwkb/','','https://mariadb.com/kb/en/st_polyfromwkb/'),(557,'ST_PolygonFromWKB',32,'A synonym for ST_PolyFromWKB.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_polygonfromwkb/','','https://mariadb.com/kb/en/st_polygonfromwkb/'),(558,'BOUNDARY',36,'A synonym for ST_BOUNDARY.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/geometry-properties-boundary/','','https://mariadb.com/kb/en/geometry-properties-boundary/'),(559,'DIMENSION',36,'A synonym for ST_DIMENSION.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/dimension/','','https://mariadb.com/kb/en/dimension/'),(560,'ENVELOPE',36,'A synonym for ST_ENVELOPE.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/geometry-properties-envelope/','','https://mariadb.com/kb/en/geometry-properties-envelope/'),(561,'GeometryN',36,'A synonym for ST_GeometryN.\n \n\n \n \n \n \n \n \n \n\nURL:\nhttps://mariadb.com/kb/en/geometry-properties-geometryn/','','https://mariadb.com/kb/en/geometry-properties-geometryn/'),(562,'GeometryType',36,'A synonym for ST_GeometryType.\n \n\n \n \n \n \n \n \n \n\nURL:\nhttps://mariadb.com/kb/en/geometry-properties-geometrytype/','','https://mariadb.com/kb/en/geometry-properties-geometrytype/'),(563,'IsClosed',36,'A synonym for ST_IsClosed.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/isclosed/','','https://mariadb.com/kb/en/isclosed/'),(564,'IsEmpty',36,'A synonym for ST_IsEmpty.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/geometry-properties-isempty/','','https://mariadb.com/kb/en/geometry-properties-isempty/'),(565,'IsRing',36,'A synonym for ST_IsRing.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/isring/','','https://mariadb.com/kb/en/isring/'),(279,'Geometry Types',22,'Description\n----------- \nMariaDB provides a standard way of creating spatial columns\nfor geometry types,\nfor example, with CREATE TABLE or ALTER TABLE.\nCurrently, spatial columns are supported for MyISAM, InnoDB,\nNDB, and ARCHIVE\ntables. See also SPATIAL INDEX.\n \nThe basic geometry type is GEOMETRY. But the type can be\nmore specific. The following types are supported:\n \nGeometry Types | \n \nPOINT | \n \nLINESTRING | \n \nPOLYGON | \n \nMULTIPOINT | \n \nMULTILINESTRING | \n \nMULTIPOLYGON | \n \nGEOMETRYCOLLECTION | \n \nGEOMETRY | \n \nExamples\n-------- \nNote: For clarity, only one type is listed per table in the\nexamples below, but a table\nrow can contain multiple types. For example:\n \nCREATE TABLE object (shapeA POLYGON, shapeB LINESTRING);\n \nPOINT\n \nCREATE TABLE gis_point (g POINT);\nSHOW FIELDS FROM gis_point;\n \nINSERT INTO gis_point VALUES\n (PointFromText(\'POINT(10 10)\')),\n (PointFromText(\'POINT(20 10)\')),\n (PointFromText(\'POINT(20 20)\')),\n (PointFromWKB(AsWKB(PointFromText(\'POINT(10 20)\'))));\n \nLINESTRING\n \nCREATE TABLE gis_line (g LINESTRING);\nSHOW FIELDS FROM gis_line;\n \nINSERT INTO gis_line VALUES\n (LineFromText(\'LINESTRING(0 0,0 10,10 0)\')),\n (LineStringFromText(\'LINESTRING(10 10,20 10,20 20,10 20,10\n10)\')),\n (LineStringFromWKB(AsWKB(LineString(Point(10, 10),\nPoint(40, 10)))));\n \nPOLYGON\n \nCREATE TABLE gis_polygon (g POLYGON);\nSHOW FIELDS FROM gis_polygon;\n \nINSERT INTO gis_polygon VALUES\n (PolygonFromText(\'POLYGON((10 10,20 10,20 20,10 20,10\n10))\')),\n (PolyFromText(\'POLYGON((0 0,50 0,50 50,0 50,0 0), (10\n10,20 10,20 20,10 20,10 10))\')),\n (PolyFromWKB(AsWKB(Polygon(LineString(Point(0, 0),\nPoint(30, 0), Point(30, 30), Point(0, 0))))));\n \nMULTIPOINT\n \nCREATE TABLE gis_multi_point (g MULTIPOINT);\nSHOW FIELDS FROM gis_multi_point;\n \nINSERT INTO gis_multi_point VALUES\n (MultiPointFromText(\'MULTIPOINT(0 0,10 10,10 20,20\n20)\')),\n (MPointFromText(\'MULTIPOINT(1 1,11 11,11 21,21 21)\')),\n (MPointFromWKB(AsWKB(MultiPoint(Point(3, 6), Point(4,\n10)))));\n \nMULTILINESTRING\n \nCREATE TABLE gis_multi_line (g MULTILINESTRING);\nSHOW FIELDS FROM gis_multi_line;\n \nINSERT INTO gis_multi_line VALUES\n (MultiLineStringFromText(\'MULTILINESTRING((10 48,10 21,10\n0),(16 0,16 23,16 48))\')),\n (MLineFromText(\'MULTILINESTRING((10 48,10 21,10 0))\')),\n (MLineFromWKB(AsWKB(MultiLineString(LineString(Point(1, 2),\nPoint(3, 5)), LineString(Point(2, 5), Point(5, 8), Point(21,\n7))))));\n \nMULTIPOLYGON\n \nCREATE TABLE gis_multi_polygon (g MULTIPOLYGON);\nSHOW FIELDS FROM gis_multi_polygon;\n \nINSERT INTO gis_multi_polygon VALUES\n (MultiPolygonFromText(\'MULTIPOLYGON(((28 26,28 0,84 0,84\n42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67\n13,59 13,59 18)))\')),\n (MPolyFromText(\'MULTIPOLYGON(((28 26,28 0,84 0,84 42,28\n26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59\n13,59 18)))\')),\n (MPolyFromWKB(AsWKB(MultiPolygon(Polygon(LineString(Point(0,\n3), Point(3, 3), Point(3, 0), Point(0, 3)))))));\n \nGEOMETRYCOLLECTION\n \nCREATE TABLE gis_geometrycollection (g GEOMETRYCOLLECTION);\nSHOW FIELDS FROM gis_geometrycollection;\n \nINSERT INTO gis_geometrycollection VALUES\n (GeomCollFromText(\'GEOMETRYCOLLECTION(POINT(0 0),\nLINESTRING(0 0,10 10))\')),\n (GeometryFromWKB(AsWKB(GeometryCollection(Point(44, 6),\nLineString(Point(3, 6), Point(7, 9)))))),\n (GeomFromText(\'GeometryCollection()\')),\n (GeomFromText(\'GeometryCollection EMPTY\'));\n \nGEOMETRY\n \nCREATE TABLE gis_geometry (g GEOMETRY);\nSHOW FIELDS FROM gis_geometry;\n \nINSERT into gis_geometry SELECT * FROM gis_point;\n \nINSERT into gis_geometry SELECT * FROM gis_line;\n \nINSERT into gis_geometry SELECT * FROM gis_polygon;\n \nINSERT into gis_geometry SELECT * FROM gis_multi_point;\n \nINSERT into gis_geometry SELECT * FROM gis_multi_line;\n \nINSERT into gis_geometry SELECT * FROM gis_multi_polygon;\n \nINSERT into gis_geometry SELECT * FROM\ngis_geometrycollection;\n \n\n \n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/geometry-types/','','https://mariadb.com/kb/en/geometry-types/'),(284,'MEDIUMINT',22,'Syntax\n------ \nMEDIUMINT[(M)] [SIGNED | UNSIGNED | ZEROFILL]\n \nDescription\n----------- \nA medium-sized integer. The signed range is -8388608 to\n8388607. The\nunsigned range is 0 to 16777215.\n \nZEROFILL pads the integer with zeroes and assumes UNSIGNED\n(even if UNSIGNED is not specified).\n \nFor details on the attributes, see Numeric Data Type\nOverview.\n \nExamples\n-------- \nCREATE TABLE mediumints (a MEDIUMINT,b MEDIUMINT UNSIGNED,c\nMEDIUMINT ZEROFILL);\n \nDESCRIBE mediumints;\n+-------+--------------------------------+------+-----+---------+-------+\n| Field | Type | Null | Key | Default | Extra |\n+-------+--------------------------------+------+-----+---------+-------+\n| a | mediumint(9) | YES | | NULL | |\n| b | mediumint(8) unsigned | YES | | NULL | |\n| c | mediumint(8) unsigned zerofill | YES | | NULL | |\n+-------+--------------------------------+------+-----+---------+-------+\n \nINSERT INTO mediumints VALUES (-10,-10,-10);\nQuery OK, 1 row affected, 2 warnings (0.05 sec)\nWarning (Code 1264): Out of range value for column \'b\' at\nrow 1\nWarning (Code 1264): Out of range value for column \'c\' at\nrow 1\n \nINSERT INTO mediumints VALUES (-10,10,-10);\nQuery OK, 1 row affected, 1 warning (0.08 sec)\nWarning (Code 1264): Out of range value for column \'c\' at\nrow 1\n \nINSERT INTO mediumints VALUES (-10,10,10);\n \nINSERT INTO mediumints VALUES (8388608,8388608,8388608);\nQuery OK, 1 row affected, 1 warning (0.05 sec)\nWarning (Code 1264): Out of range value for column \'a\' at\nrow 1\n \nINSERT INTO mediumints VALUES (8388607,8388608,8388608);\n \nSELECT * FROM mediumints;\n+---------+---------+----------+\n| a | b | c |\n+---------+---------+----------+\n| -10 | 0 | 00000000 |\n| -10 | 0 | 00000000 |\n| -10 | 10 | 00000000 |\n| -10 | 10 | 00000010 |\n| 8388607 | 8388608 | 08388608 |\n| 8388607 | 8388608 | 08388608 |\n+---------+---------+----------+\n \n\n\nURL: https://mariadb.com/kb/en/mediumint/','','https://mariadb.com/kb/en/mediumint/'),(566,'IsSimple',36,'A synonym for ST_IsSImple.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/geometry-properties-issimple/','','https://mariadb.com/kb/en/geometry-properties-issimple/'),(567,'NumGeometries',36,'A synonym for ST_NumGeometries.\n \n\n \n \n \n \n \n \n \n\nURL:\nhttps://mariadb.com/kb/en/geometry-properties-numgeometries/','','https://mariadb.com/kb/en/geometry-properties-numgeometries/'),(568,'SRID',36,'A synonym for ST_SRID.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/geometry-properties-srid/','','https://mariadb.com/kb/en/geometry-properties-srid/'),(570,'ST_DIMENSION',36,'Syntax\n------ \nST_Dimension(g)\nDimension(g)\n \nDescription\n----------- \nReturns the inherent dimension of the geometry value g. The\nresult can\nbe\n \nDimension | Definition | \n \n -1 | empty geometry | \n \n 0 | geometry with no length or area | \n \n 1 | geometry with no area but nonzero length | \n \n 2 | geometry with nonzero area | \n \nST_Dimension() and Dimension() are synonyms.\n \nExamples\n-------- \nSELECT Dimension(GeomFromText(\'LineString(1 1,2 2)\'));\n+------------------------------------------------+\n| Dimension(GeomFromText(\'LineString(1 1,2 2)\')) |\n+------------------------------------------------+\n| 1 |\n+------------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_dimension/','','https://mariadb.com/kb/en/st_dimension/'),(572,'ST_GEOMETRYN',36,'Syntax\n------ \nST_GeometryN(gc,N)\nGeometryN(gc,N)\n \nDescription\n----------- \nReturns the N-th geometry in the GeometryCollection gc.\nGeometries are numbered beginning with 1.\n \nST_GeometryN() and GeometryN() are synonyms.\n \nExample\n \nSET @gc = \'GeometryCollection(Point(1 1),LineString(12 14,\n9 11))\';\n \nSELECT AsText(GeometryN(GeomFromText(@gc),1));\n+----------------------------------------+\n| AsText(GeometryN(GeomFromText(@gc),1)) |\n+----------------------------------------+\n| POINT(1 1) |\n+----------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_geometryn/','','https://mariadb.com/kb/en/st_geometryn/'),(286,'Numeric Data Type Overview',22,'There are a number of numeric data types:\nTINYINT\nBOOLEAN - Synonym for TINYINT(1)\nSMALLINT\nMEDIUMINT\nINT, INTEGER\nBIGINT\nDECIMAL, DEC, NUMERIC, FIXED\nFLOAT\nDOUBLE, DOUBLE PRECISION, REAL\nBIT\n \nSee the specific articles for detailed information on each.\n \nSIGNED, UNSIGNED and ZEROFILL\n \nMost numeric types can be defined as SIGNED, UNSIGNED or\nZEROFILL, for example:\n \nTINYINT[(M)] [SIGNED | UNSIGNED | ZEROFILL]\n \nIf SIGNED, or no attribute, is specified, a portion of the\nnumeric type will be reserved for the sign (plus or minus).\nFor example, a TINYINT SIGNED can range from -128 to 127. \n \nIf UNSIGNED is specified, no portion of the numeric type is\nreserved for the sign, so for integer types range can be\nlarger. For example, a TINYINT UNSIGNED can range from 0 to\n255. Floating point and fixed-point types also can be\nUNSIGNED, but this only prevents negative values from being\nstored and doesn\'t alter the range. \n \nIf ZEROFILL is specified, the column will be set to UNSIGNED\nand the spaces used by default to pad the field are replaced\nwith zeros. ZEROFILL is ignored in expressions or as part of\na UNION. ZEROFILL is a non-standard MySQL and MariaDB\nenhancement.\n \nNote that although the preferred syntax indicates that the\nattributes are exclusive, more than one attribute can be\nspecified.\n \nUntil MariaDB 10.2.7 (MDEV-8659), any combination of the\nattributes could be used in any order, with duplicates. In\nthis case:\nthe presence of ZEROFILL makes the column UNSIGNED ZEROFILL.\nthe presence of UNSIGNED makes the column UNSIGNED.\n \nFrom MariaDB 10.2.8, only the following combinations are\nsupported:\nSIGNED\nUNSIGNED\nZEROFILL\nUNSIGNED ZEROFILL\nZEROFILL UNSIGNED\n \nThe latter two should be replaced with simply ZEROFILL, but\nare still accepted by the parser.\n \nExamples\n-------- \nCREATE TABLE zf (\n i1 TINYINT SIGNED,\n i2 TINYINT UNSIGNED,\n i3 TINYINT ZEROFILL\n);\n \nINSERT INTO zf VALUES (2,2,2);\n \nSELECT * FROM zf;\n \n+------+------+------+\n| i1 | i2 | i3 |\n+------+------+------+\n| 2 | 2 | 002 |\n+------+------+------+\n \nRange\n \nWhen attempting to add a value that is out of the valid\nrange for the numeric type, MariaDB will react depending on\nthe strict SQL_MODE setting.\n \nIf strict_mode has been set (the default from MariaDB\n10.2.4), MariaDB will return an error.\n \nIf strict_mode has not been set (the default until MariaDB\n10.2.3), MariaDB will adjust the number to fit in the field,\nreturning a warning.\n \nExamples\n-------- \nWith strict_mode set:\n \nSHOW VARIABLES LIKE \'sql_mode\';\n \n+---------------+-------------------------------------------------------------------------------------------+\n| Variable_name | Value |\n+---------------+-------------------------------------------------------------------------------------------+\n| sql_mode |\nSTRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION\n|\n+---------------+-------------------------------------------------------------------------------------------+\n \nCREATE TABLE ranges (i1 TINYINT, i2 SMALLINT, i3 TINYINT\nUNSIGNED);\n \nINSERT INTO ranges VALUES (257,257,257);\nERROR 1264 (22003): Out of range value for column \'i1\' at\nrow 1\n \nSELECT * FROM ranges;\n \nEmpty set (0.10 sec)\n \nWith strict_mode unset:\n \nSHOW VARIABLES LIKE \'sql_mode%\';\n \n+---------------+-------+\n| Variable_name | Value |\n+---------------+-------+\n| sql_mode | |\n+---------------+-------+\n \nCREATE TABLE ranges (i1 TINYINT, i2 SMALLINT, i3 TINYINT\nUNSIGNED);\n \nINSERT INTO ranges VALUES (257,257,257);\nQuery OK, 1 row affected, 2 warnings (0.00 sec)\n \nSHOW WARNINGS;\n \n+---------+------+---------------------------------------------+\n| Level | Code | Message |\n+---------+------+---------------------------------------------+\n| Warning | 1264 | Out of range value for column \'i1\' at\nrow 1 |\n| Warning | 1264 | Out of range value for column \'i3\' at\nrow 1 |\n+---------+------+---------------------------------------------+\n2 rows in set (0.00 sec)\n \nSELECT * FROM ranges;\n \n+------+------+------+\n| i1 | i2 | i3 |\n+------+------+------+\n| 127 | 257 | 255 |\n+------+------+------+\n \nAuto_increment\n \nThe AUTO_INCREMENT attribute can be used to generate a\nunique identity for new rows. For more details, see\nauto_increment.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/numeric-data-type-overview/','','https://mariadb.com/kb/en/numeric-data-type-overview/'),(289,'SMALLINT',22,'Syntax\n------ \nSMALLINT[(M)] [SIGNED | UNSIGNED | ZEROFILL]\n \nDescription\n----------- \nA small integer. The signed range is -32768 to 32767. The\nunsigned range is 0 to 65535.\n \nIf a column has been set to ZEROFILL, all values will be\nprepended by zeros so that the SMALLINT value contains a\nnumber of M digits.\n \nNote: If the ZEROFILL attribute has been specified, the\ncolumn will automatically become UNSIGNED.\n \nFor more details on the attributes, see Numeric Data Type\nOverview.\n \nExamples\n-------- \nCREATE TABLE smallints (a SMALLINT,b SMALLINT UNSIGNED,c\nSMALLINT ZEROFILL);\n \nINSERT INTO smallints VALUES (-10,-10,-10);\nQuery OK, 1 row affected, 2 warnings (0.09 sec)\nWarning (Code 1264): Out of range value for column \'b\' at\nrow 1\nWarning (Code 1264): Out of range value for column \'c\' at\nrow 1\n \nINSERT INTO smallints VALUES (-10,10,-10);\nQuery OK, 1 row affected, 1 warning (0.08 sec)\nWarning (Code 1264): Out of range value for column \'c\' at\nrow 1\n \nINSERT INTO smallints VALUES (-10,10,10);\n \nINSERT INTO smallints VALUES (32768,32768,32768);\nQuery OK, 1 row affected, 1 warning (0.04 sec)\nWarning (Code 1264): Out of range value for column \'a\' at\nrow 1\n \nINSERT INTO smallints VALUES (32767,32768,32768);\n \nSELECT * FROM smallints;\n+-------+-------+-------+\n| a | b | c |\n+-------+-------+-------+\n| -10 | 0 | 00000 |\n| -10 | 10 | 00000 |\n| -10 | 10 | 00010 |\n| 32767 | 32768 | 32768 |\n| 32767 | 32768 | 32768 |\n+-------+-------+-------+\n \n\n\nURL: https://mariadb.com/kb/en/smallint/','','https://mariadb.com/kb/en/smallint/'),(573,'ST_GEOMETRYTYPE',36,'Syntax\n------ \nST_GeometryType(g)\nGeometryType(g)\n \nDescription\n----------- \nReturns as a string the name of the geometry type of which\nthe\ngeometry instance g is a member. The name corresponds to one\nof the\ninstantiable Geometry subclasses.\n \nST_GeometryType() and GeometryType() are synonyms.\n \nExamples\n-------- \nSELECT GeometryType(GeomFromText(\'POINT(1 1)\'));\n+------------------------------------------+\n| GeometryType(GeomFromText(\'POINT(1 1)\')) |\n+------------------------------------------+\n| POINT |\n+------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_geometrytype/','','https://mariadb.com/kb/en/st_geometrytype/'),(575,'ST_ISEMPTY',36,'Syntax\n------ \nST_IsEmpty(g)\nIsEmpty(g)\n \nDescription\n----------- \nIsEmpty is a function defined by the OpenGIS specification,\nbut is not fully implemented by MariaDB or MySQL. \n \nSince MariaDB and MySQL do not support GIS EMPTY values such\nas POINT EMPTY, as implemented it simply returns 1 if the\ngeometry value g is invalid, 0 if it is valid, and NULL if\nthe argument is NULL.\n \nST_IsEmpty() and IsEmpty() are synonyms.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_isempty/','','https://mariadb.com/kb/en/st_isempty/'),(576,'ST_IsRing',36,'The ST_IsRing function was introduced in MariaDB 10.1.2\n \nSyntax\n------ \nST_IsRing(g)\nIsRing(g)\n \nDescription\n----------- \nReturns true if a given LINESTRING is a ring, that is, both\nST_IsClosed and ST_IsSimple. A simple curve does not pass\nthrough the same point more than once. However, see\nMDEV-7510.\n \nSt_IsRing() and IsRing() are synonyms.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_isring/','','https://mariadb.com/kb/en/st_isring/'),(290,'String Literals',22,'Strings are sequences of characters and are enclosed with\nquotes.\n \nThe syntax is:\n \n[_charset_name]\'string\' [COLLATE collation_name]\n \nFor example:\n \n\'The MariaDB Foundation\'\n_utf8 \'Foundation\' COLLATE utf8_unicode_ci;\n \nStrings can either be enclosed in single quotes or in double\nquotes (the same character must be used to both open and\nclose the string).\n \nThe ANSI SQL-standard does not permit double quotes for\nenclosing strings, and although MariaDB does by default, if\nthe MariaDB server has enabled the ANSI_QUOTES_SQL SQL_MODE,\ndouble quotes will be treated as being used for identifiers\ninstead of strings.\n \nStrings that are next to each other are automatically\nconcatenated. For example:\n \n\'The \' \'MariaDB \' \'Foundation\'\n \nand\n \n\'The MariaDB Foundation\'\n \nare equivalent.\n \nThe \\ (backslash character) is used to escape characters.\nFor example:\n \n\'MariaDB\'s new features\'\n \nis not a valid string because of the single quote in the\nmiddle of the string, which is treated as if it closes the\nstring, but is actually meant as part of the string, an\napostrophe. The backslash character helps in situations like\nthis:\n \n\'MariaDB\\\'s new features\'\n \nis now a valid string, and if displayed, will appear without\nthe backslash.\n \nSELECT \'MariaDB\\\'s new features\';\n+------------------------+\n| MariaDB\'s new features |\n+------------------------+\n| MariaDB\'s new features |\n+------------------------+\n \nAnother way to escape the quoting character is repeating it\ntwice:\n \nSELECT \'I\'\'m here\', \"\"\"Double\"\"\";\n+----------+----------+\n| I\'m here | \"Double\" |\n+----------+----------+\n| I\'m here | \"Double\" |\n+----------+----------+\n \nEscape sequences\n \nThere are other escape sequences also. Here is a full list:\n \nEscape sequence | Character | \n \n\\0 | ASCII NUL (0x00). | \n \n\\\' | Single quote (“\'â€). | \n \n\\\" | Double quote (“\"â€). | \n \n\\b | Backspace. | \n \n\\n | Newline, or linefeed,. | \n \n\\r | Carriage return. | \n \n\\t | Tab. | \n \n\\Z | ASCII 26 (Control+Z). See note following the table. | \n \n\\\\ | Backslash (“\\â€). | \n \n\\% | “%†character. See note following the table. | \n \n\\_ | A “_†character. See note following the table. | \n \nEscaping the % and _ characters can be necessary when using\nthe LIKE operator, which treats them as special characters.\n \nThe ASCII 26 character (\\Z) needs to be escaped when\nincluded in a batch file which needs to be executed in\nWindows. The reason is that ASCII 26, in Windows, is the end\nof file (EOF).\n \nBackslash (\\), if not used as an escape character, must\nalways be escaped. When followed by a character that is not\nin the above table, backslashes will simply be ignored.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/string-literals/','','https://mariadb.com/kb/en/string-literals/'),(291,'TEXT',22,'Syntax\n------ \nTEXT[(M)] [CHARACTER SET charset_name] [COLLATE\ncollation_name]\n \nDescription\n----------- \nA TEXT column with a maximum length of 65,535 (216 - 1)\ncharacters. The effective maximum length is less if the\nvalue contains\nmulti-byte characters. Each TEXT value is stored using a\ntwo-byte length\nprefix that indicates the number of bytes in the value. If\nyou need a bigger storage, consider using MEDIUMTEXT\ninstead.\n \nAn optional length M can be given for this type. If this is\ndone, MariaDB\ncreates the column as the smallest TEXT type large enough to\nhold values\nM characters long.\n \nBefore MariaDB 10.2, all MariaDB collations were of type\nPADSPACE, meaning that TEXT (as well as VARCHAR and CHAR\nvalues) are compared without regard for trailing spaces.\nThis does not apply to the LIKE pattern-matching operator,\nwhich takes into account trailing spaces.\n \nBefore MariaDB 10.2.1, BLOB and TEXT columns could not be\nassigned a DEFAULT value. This restriction was lifted in\nMariaDB 10.2.1.\n \nExamples\n-------- \nTrailing spaces:\n \nCREATE TABLE strtest (d TEXT(10));\nINSERT INTO strtest VALUES(\'Maria \');\n \nSELECT d=\'Maria\',d=\'Maria \' FROM strtest;\n+-----------+--------------+\n| d=\'Maria\' | d=\'Maria \' |\n+-----------+--------------+\n| 1 | 1 |\n+-----------+--------------+\n \nSELECT d LIKE \'Maria\',d LIKE \'Maria \' FROM strtest;\n+----------------+-------------------+\n| d LIKE \'Maria\' | d LIKE \'Maria \' |\n+----------------+-------------------+\n| 0 | 1 |\n+----------------+-------------------+\n \nDifference between VARCHAR and TEXT\n \nVARCHAR columns can be fully indexed. TEXT columns can only\nbe indexed over a specified length.\nUsing TEXT or BLOB in a SELECT query that uses temporary\ntables for storing intermediate results will force the\ntemporary table to be disk based (using the Aria storage\nengine instead of the memory storage engine, which is a bit\nslower. This is not that bad as the Aria storage engine\ncaches the rows in memory. To get the benefit of this, one\nshould ensure that the aria_pagecache_buffer_size variable\nis big enough to hold most of the row and index data for\ntemporary tables.\n \nFor Storage Engine Developers\n \nInternally the full length of the VARCHAR column is\nallocated inside each TABLE objects record[] structure. As\nthere are three such buffers, each open table will allocate\n3 times max-length-to-store-varchar bytes of memory.\nTEXT and BLOB columns are stored with a pointer (4 or 8\nbytes) + a 1-4 bytes length. The TEXT data is only stored\nonce. This means that internally TEXT uses less memory for\neach open table but instead has the additional overhead that\neach TEXT object needs to be allocated and freed for each\nrow access (with some caching in between).\n \n\n\nURL: https://mariadb.com/kb/en/text/','','https://mariadb.com/kb/en/text/'),(577,'ST_IsSimple',36,'Syntax\n------ \nST_IsSimple(g)\nIsSimple(g)\n \nDescription\n----------- \nReturns true if the given Geometry has no anomalous\ngeometric points, false if it does, or NULL if given a NULL\nvalue.\n \nST_IsSimple() and IsSimple() are synonyms.\n \nExamples\n-------- \nA POINT is always simple.\n \nSET @g = \'Point(1 2)\';\n \nSELECT ST_ISSIMPLE(GEOMFROMTEXT(@g));\n+-------------------------------+\n| ST_ISSIMPLE(GEOMFROMTEXT(@g)) |\n+-------------------------------+\n| 1 |\n+-------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_issimple/','','https://mariadb.com/kb/en/st_issimple/'),(578,'ST_NUMGEOMETRIES',36,'Syntax\n------ \nST_NumGeometries(gc)\nNumGeometries(gc)\n \nDescription\n----------- \nReturns the number of geometries in the GeometryCollection\ngc.\n \nST_NumGeometries() and NumGeometries() are synonyms.\n \nExample\n \nSET @gc = \'GeometryCollection(Point(1 1),LineString(2 2, 3\n3))\';\n \nSELECT NUMGEOMETRIES(GeomFromText(@gc));\n+----------------------------------+\n| NUMGEOMETRIES(GeomFromText(@gc)) |\n+----------------------------------+\n| 2 |\n+----------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_numgeometries/','','https://mariadb.com/kb/en/st_numgeometries/'),(579,'ST_RELATE',36,'The ST_RELATE() function was introduced in MariaDB 10.1.2\n \nSyntax\n------ \nST_Relate(g1, g2, i)\n \nDescription\n----------- \nReturns true if Geometry g1 is spatially related to\nGeometryg2 by testing for intersections between the\ninterior, boundary and exterior of the two geometries as\nspecified by the values in intersection matrix pattern i.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_relate/','','https://mariadb.com/kb/en/st_relate/'),(580,'ST_SRID',36,'Syntax\n------ \nST_SRID(g)\nSRID(g)\n \nDescription\n----------- \nReturns an integer indicating the Spatial Reference System\nID for the\ngeometry value g.\n \nIn MariaDB, the SRID value is just an integer associated\nwith the\ngeometry value. All calculations are done assuming Euclidean\n(planar)\ngeometry.\n \nST_SRID() and SRID() are synonyms.\n \nExamples\n-------- \nSELECT SRID(GeomFromText(\'LineString(1 1,2 2)\',101));\n+-----------------------------------------------+\n| SRID(GeomFromText(\'LineString(1 1,2 2)\',101)) |\n+-----------------------------------------------+\n| 101 |\n+-----------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_srid/','','https://mariadb.com/kb/en/st_srid/'),(292,'TIME',22,'Syntax\n------ \nTIME [()]\n \nDescription\n----------- \nA time. The range is \'-838:59:59.999999\' to\n\'838:59:59.999999\'. Microsecond precision can be from 0-6;\nif not specified 0 is used. Microseconds have been available\nsince MariaDB 5.3. \n \nMariaDB displays TIME values in \'HH:MM:SS.ssssss\' format,\nbut allows assignment of times in looser formats, including\n\'D HH:MM:SS\', \'HH:MM:SS\', \'HH:MM\', \'D HH:MM\', \'D\nHH\', \'SS\', or \'HHMMSS\', as well as permitting dropping\nof any leading zeros when a delimiter is provided, for\nexample \'3:9:10\'. For details, see date and time literals.\n \nMariaDB 10.1.2 introduced the --mysql56-temporal-format\noption, on by default, which allows MariaDB to store TIMEs\nusing the same low-level format MySQL 5.6 uses.\n \nInternal Format\n \nIn MariaDB 10.1.2 a new temporal format was introduced from\nMySQL 5.6 that alters how the TIME, DATETIME and TIMESTAMP\ncolumns operate at lower levels. These changes allow these\ntemporal data types to have fractional parts and negative\nvalues. You can disable this feature using the\nmysql56_temporal_format system variable.\n \nTables that include TIMESTAMP values that were created on an\nolder version of MariaDB or that were created while the\nmysql56_temporal_format system variable was disabled\ncontinue to store data using the older data type format.\n \nIn order to update table columns from the older format to\nthe newer format, execute an ALTER TABLE... MODIFY COLUMN\nstatement that changes the column to the *same* data type.\nThis change may be needed if you want to export the table\'s\ntablespace and import it onto a server that has\nmysql56_temporal_format=ON set (see MDEV-15225).\n \nFor instance, if you have a TIME column in your table: \n \nSHOW VARIABLES LIKE \'mysql56_temporal_format\';\n \n+-------------------------+-------+\n| Variable_name | Value |\n+-------------------------+-------+\n| mysql56_temporal_format | ON |\n+-------------------------+-------+\n \nALTER TABLE example_table MODIFY ts_col TIME;\n \nWhen MariaDB executes the ALTER TABLE statement, it converts\nthe data from the older temporal format to the newer one. \n \nIn the event that you have several tables and columns using\ntemporal data types that you want to switch over to the new\nformat, make sure the system variable is enabled, then\nperform a dump and restore using mysqldump. The columns\nusing relevant temporal data types are restored using the\nnew temporal format.\n \nExamples\n-------- \nINSERT INTO time VALUES (\'90:00:00\'), (\'800:00:00\'),\n(800), (22), (151413), (\'9:6:3\'), (\'12 09\');\n \nSELECT * FROM time;\n+-----------+\n| t |\n+-----------+\n| 90:00:00 |\n| 800:00:00 |\n| 00:08:00 |\n| 00:00:22 |\n| 15:14:13 |\n| 09:06:03 |\n| 297:00:00 |\n+-----------+\n \n\n\nURL: https://mariadb.com/kb/en/time/','','https://mariadb.com/kb/en/time/'),(295,'TINYINT',22,'Syntax\n------ \nTINYINT[(M)] [SIGNED | UNSIGNED | ZEROFILL]\n \nDescription\n----------- \nA very small integer. The signed range is -128 to 127. The\nunsigned range is 0 to 255. For details on the attributes,\nsee Numeric Data Type Overview.\n \nExamples\n-------- \nCREATE TABLE tinyints (a TINYINT,b TINYINT UNSIGNED,c\nTINYINT ZEROFILL);\nQuery OK, 0 rows affected (0.43 sec)\n \nINSERT INTO tinyints VALUES (-10,-10,-10);\nQuery OK, 1 row affected, 2 warnings (0.08 sec)\nWarning (Code 1264): Out of range value for column \'b\' at\nrow 1\nWarning (Code 1264): Out of range value for column \'c\' at\nrow 1\n \nINSERT INTO tinyints VALUES (-10,10,-10);\nQuery OK, 1 row affected, 1 warning (0.11 sec)\nWarning (Code 1264): Out of range value for column \'c\' at\nrow 1\n \nINSERT INTO tinyints VALUES (-10,10,10);\n \nSELECT * FROM tinyints;\n+------+------+------+\n| a | b | c |\n+------+------+------+\n| -10 | 0 | 000 |\n| -10 | 10 | 000 |\n| -10 | 10 | 010 |\n+------+------+------+\n \nINSERT INTO tinyints VALUES (128,128,128);\nQuery OK, 1 row affected, 1 warning (0.19 sec)\nWarning (Code 1264): Out of range value for column \'a\' at\nrow 1\n \nINSERT INTO tinyints VALUES (127,128,128);\n \nSELECT * FROM tinyints;\n+------+------+------+\n| a | b | c |\n+------+------+------+\n| -10 | 0 | 000 |\n| -10 | 10 | 000 |\n| -10 | 10 | 010 |\n| 127 | 128 | 128 |\n| 127 | 128 | 128 |\n+------+------+------+\n \n\n\nURL: https://mariadb.com/kb/en/tinyint/','','https://mariadb.com/kb/en/tinyint/'),(297,'VARBINARY',22,'Syntax\n------ \nVARBINARY(M)\n \nDescription\n----------- \nThe VARBINARY type is similar to the VARCHAR type, but\nstores binary byte strings rather than non-binary character\nstrings. M represents the maximum column length in bytes. \n \nIt contains no character set, and comparison and sorting are\nbased on the numeric value of the bytes.\n \nIf the maximum length is exceeded, and SQL strict mode is\nnot enabled , the extra characters will be dropped with a\nwarning. If strict mode is enabled, an error will occur.\n \nUnlike BINARY values, VARBINARYs are not right-padded when\ninserting.\n \nOracle Mode\n \nIn Oracle mode from MariaDB 10.3, RAW is a synonym for\nVARBINARY.\n \nExamples\n-------- \nInserting too many characters, first with strict mode off,\nthen with it on:\n \nCREATE TABLE varbins (a VARBINARY(10));\n \nINSERT INTO varbins VALUES(\'12345678901\');\nQuery OK, 1 row affected, 1 warning (0.04 sec)\n \nSELECT * FROM varbins;\n \n+------------+\n| a |\n+------------+\n| 1234567890 |\n+------------+\n \nSET sql_mode=\'STRICT_ALL_TABLES\';\n \nINSERT INTO varbins VALUES(\'12345678901\');\nERROR 1406 (22001): Data too long for column \'a\' at row 1\n \nSorting is performed with the byte value:\n \nTRUNCATE varbins;\n \nINSERT INTO varbins VALUES(\'A\'),(\'B\'),(\'a\'),(\'b\');\n \nSELECT * FROM varbins ORDER BY a;\n \n+------+\n| a |\n+------+\n| A |\n| B |\n| a |\n| b |\n+------+\n \nUsing CAST to sort as a CHAR instead:\n \nSELECT * FROM varbins ORDER BY CAST(a AS CHAR);\n+------+\n| a |\n+------+\n| a |\n| A |\n| b |\n| B |\n+------+\n \n\n\nURL: https://mariadb.com/kb/en/varbinary/','','https://mariadb.com/kb/en/varbinary/'),(581,'ASCII',37,'Syntax\n------ \nASCII(str)\n \nDescription\n----------- \nReturns the numeric ASCII value of the leftmost character of\nthe string argument. Returns 0 if the given string is empty\nand NULL if it is NULL.\n \nASCII() works for 8-bit characters.\n \nExamples\n-------- \nSELECT ASCII(9);\n+----------+\n| ASCII(9) |\n+----------+\n| 57 |\n+----------+\n \nSELECT ASCII(\'9\');\n+------------+\n| ASCII(\'9\') |\n+------------+\n| 57 |\n+------------+\n \nSELECT ASCII(\'abc\');\n+--------------+\n| ASCII(\'abc\') |\n+--------------+\n| 97 |\n+--------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/ascii/','','https://mariadb.com/kb/en/ascii/'),(582,'BIN',37,'Syntax\n------ \nBIN(N)\n \nDescription\n----------- \nReturns a string representation of the binary value of the\ngiven longlong (that is, BIGINT) number. This is equivalent\nto CONV(N,10,2). The argument should be positive. If it is a\nFLOAT, it will be truncated. Returns NULL if the argument is\nNULL.\n \nExamples\n-------- \nSELECT BIN(12);\n+---------+\n| BIN(12) |\n+---------+\n| 1100 |\n+---------+\n \n\n\nURL: https://mariadb.com/kb/en/bin/','','https://mariadb.com/kb/en/bin/'),(584,'BIT_LENGTH',37,'Syntax\n------ \nBIT_LENGTH(str)\n \nDescription\n----------- \nReturns the length of the given string argument in bits. If\nthe argument is not a string, it will be converted to\nstring. If the argument is NULL, it returns NULL.\n \nExamples\n-------- \nSELECT BIT_LENGTH(\'text\');\n+--------------------+\n| BIT_LENGTH(\'text\') |\n+--------------------+\n| 32 |\n+--------------------+\n \nSELECT BIT_LENGTH(\'\');\n+----------------+\n| BIT_LENGTH(\'\') |\n+----------------+\n| 0 |\n+----------------+\n \nCompatibility\n \nPostgreSQL and Sybase support BIT_LENGTH().\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/bit_length/','','https://mariadb.com/kb/en/bit_length/'),(298,'VARCHAR',22,'Syntax\n------ \n[NATIONAL] VARCHAR(M) [CHARACTER SET charset_name] [COLLATE\ncollation_name]\n \nDescription\n----------- \nA variable-length string. M represents the maximum column\nlength in\ncharacters. The range of M is 0 to 65,532. The effective\nmaximum\nlength of a VARCHAR is subject to the maximum row size and\nthe character set used. For\nexample, utf8 characters can require up to three bytes per\ncharacter,\nso a VARCHAR column that uses the utf8 character set can be\ndeclared\nto be a maximum of 21,844 characters.\n \nMariaDB stores VARCHAR values as a one-byte or two-byte\nlength prefix\nplus data. The length prefix indicates the number of bytes\nin the\nvalue. A VARCHAR column uses one length byte if values\nrequire no more\nthan 255 bytes, two length bytes if values may require more\nthan 255\nbytes.\n \nNote: MariaDB 5.1 and later follow the standard SQL\nspecification, \nand do not remove trailing spaces from VARCHAR values.\n \nVARCHAR(0) columns can contain 2 values: an empty string or\nNULL. Such columns cannot be part of an index. The CONNECT\nstorage engine does not support VARCHAR(0).\n \nVARCHAR is shorthand for CHARACTER VARYING. NATIONAL VARCHAR\nis the\nstandard SQL way to define that a VARCHAR column should use\nsome\npredefined character set. MariaDB uses utf8 as this\npredefined character set, as does MySQL 4.1 and up.\nNVARCHAR is shorthand for NATIONAL VARCHAR.\n \nBefore MariaDB 10.2, all MariaDB collations were of type\nPADSPACE, meaning that VARCHAR (as well as CHAR and TEXT\nvalues) are compared without regard for trailing spaces.\nThis does not apply to the LIKE pattern-matching operator,\nwhich takes into account trailing spaces. From MariaDB 10.2,\na number of NO PAD collations are available.\n \nIf a unique index consists of a column where trailing pad\ncharacters are stripped or ignored, inserts into that column\nwhere values differ only by the number of trailing pad\ncharacters will result in a duplicate-key error.\n \nExamples\n-------- \nThe following are equivalent:\n \nVARCHAR(30) CHARACTER SET utf8\nNATIONAL VARCHAR(30)\nNVARCHAR(30)\nNCHAR VARCHAR(30)\nNATIONAL CHARACTER VARYING(30)\nNATIONAL CHAR VARYING(30)\n \nTrailing spaces:\n \nCREATE TABLE strtest (v VARCHAR(10));\nINSERT INTO strtest VALUES(\'Maria \');\n \nSELECT v=\'Maria\',v=\'Maria \' FROM strtest;\n+-----------+--------------+\n| v=\'Maria\' | v=\'Maria \' |\n+-----------+--------------+\n| 1 | 1 |\n+-----------+--------------+\n \nSELECT v LIKE \'Maria\',v LIKE \'Maria \' FROM strtest;\n+----------------+-------------------+\n| v LIKE \'Maria\' | v LIKE \'Maria \' |\n+----------------+-------------------+\n| 0 | 1 |\n+----------------+-------------------+\n \nTruncation\n \nDepending on whether or not strict sql mode is set, you will\neither get a warning or an error if you try to insert a\nstring that is too long into a VARCHAR column. If the extra\ncharacters are spaces, the spaces that can\'t fit will be\nremoved and you will always get a warning, regardless of the\nsql mode setting.\n \nDifference Between VARCHAR and TEXT\n \nVARCHAR columns can be fully indexed. TEXT columns can only\nbe indexed over a specified length.\nUsing TEXT or BLOB in a SELECT query that uses temporary\ntables for storing intermediate results will force the\ntemporary table to be disk based (using the Aria storage\nengine instead of the memory storage engine, which is a bit\nslower. This is not that bad as the Aria storage engine\ncaches the rows in memory. To get the benefit of this, one\nshould ensure that the aria_pagecache_buffer_size variable\nis big enough to hold most of the row and index data for\ntemporary tables.\n \nOracle Mode\n \nIn Oracle mode from MariaDB 10.3, VARCHAR2 is a synonym.\n \nFor Storage Engine Developers\n \nInternally the full length of the VARCHAR column is\nallocated inside each TABLE objects record[] structure. As\nthere are three such buffers, each open table will allocate\n3 times max-length-to-store-varchar bytes of memory.\nTEXT and BLOB columns are stored with a pointer (4 or 8\nbytes) + a 1-4 bytes length. The TEXT data is only stored\nonce. This means that internally TEXT uses less memory for\neach open table but instead has the additional overhead that\neach TEXT object needs to be allocated and freed for each\nrow access (with some caching in between).\n \n\n\nURL: https://mariadb.com/kb/en/varchar/','','https://mariadb.com/kb/en/varchar/'),(299,'YEAR Data Type',22,'Syntax\n------ \nYEAR[(4)]\n \nDescription\n----------- \nA year in two-digit or four-digit format. The default is\nfour-digit format. Note that the two-digit format has been\ndeprecated since 5.5.27. \n \nIn four-digit format, the allowable values are 1901 to 2155,\nand 0000. In two-digit format, the allowable values are 70\nto 69,\nrepresenting years from 1970 to 2069. MariaDB displays YEAR\nvalues in\nYYYY format, but allows you to assign values to YEAR columns\nusing\neither strings or numbers.\n \nInserting numeric zero has a different result for YEAR(4)\nand YEAR(2). For YEAR(2), the value 00 reflects the year\n2000. For YEAR(4), the value 0000 reflects the year zero.\nThis only applies to numeric zero. String zero always\nreflects the year 2000.\n \nExamples\n-------- \nAccepting a string or a number:\n \nCREATE TABLE y(y YEAR);\n \nINSERT INTO y VALUES (1990),(\'2012\');\n \nSELECT * FROM y;\n+------+\n| y |\n+------+\n| 1990 |\n| 2012 |\n+------+\n \nOut of range:\n \nINSERT INTO y VALUES (1005),(\'3080\');\nQuery OK, 2 rows affected, 2 warnings (0.05 sec)\nRecords: 2 Duplicates: 0 Warnings: 2\n \nSHOW WARNINGS;\n+---------+------+--------------------------------------------+\n| Level | Code | Message |\n+---------+------+--------------------------------------------+\n| Warning | 1264 | Out of range value for column \'y\' at\nrow 1 |\n| Warning | 1264 | Out of range value for column \'y\' at\nrow 2 |\n+---------+------+--------------------------------------------+\n \nSELECT * FROM y;\n+------+\n| y |\n+------+\n| 1990 |\n| 2012 |\n| 0000 |\n| 0000 |\n+------+\n \nTruncating:\n \nINSERT INTO y VALUES (\'2013-12-12\');\nQuery OK, 1 row affected, 1 warning (0.05 sec)\n \nSHOW WARNINGS;\n+---------+------+----------------------------------------+\n| Level | Code | Message |\n+---------+------+----------------------------------------+\n| Warning | 1265 | Data truncated for column \'y\' at row 1\n|\n+---------+------+----------------------------------------+\n \nSELECT * FROM y;\n+------+\n| y |\n+------+\n| 1990 |\n| 2012 |\n| 0000 |\n| 0000 |\n| 2013 |\n+------+\n \nDifference between YEAR(2) and YEAR(4), and string and\nnumeric zero:\n \nCREATE TABLE y2(y YEAR(4), y2 YEAR(2));\nQuery OK, 0 rows affected, 1 warning (0.40 sec)\n \nNote (Code 1287): \'YEAR(2)\' is deprecated and will be\nremoved in a future release. Please use YEAR(4) instead\n \nINSERT INTO y2 VALUES(0,0),(\'0\',\'0\');\n \nSELECT YEAR(y),YEAR(y2) FROM y;\n+---------+----------+\n| YEAR(y) | YEAR(y2) |\n+---------+----------+\n| 0 | 2000 |\n| 2000 | 2000 |\n+---------+----------+\n \n\n\nURL: https://mariadb.com/kb/en/year-data-type/','','https://mariadb.com/kb/en/year-data-type/'),(587,'CHARACTER_LENGTH',37,'Syntax\n------ \nCHARACTER_LENGTH(str)\n \nDescription\n----------- \nCHARACTER_LENGTH() is a synonym for CHAR_LENGTH().\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/character_length/','','https://mariadb.com/kb/en/character_length/'),(602,'INSTR',37,'Syntax\n------ \nINSTR(str,substr)\n \nDescription\n----------- \nReturns the position of the first occurrence of substring\nsubstr in\nstring str. This is the same as the two-argument form of\nLOCATE(),\nexcept that the order of the arguments is reversed.\n \nINSTR() performs a case-insensitive search.\n \nIf any argument is NULL, returns NULL.\n \nExamples\n-------- \nSELECT INSTR(\'foobarbar\', \'bar\');\n+---------------------------+\n| INSTR(\'foobarbar\', \'bar\') |\n+---------------------------+\n| 4 |\n+---------------------------+\n \nSELECT INSTR(\'My\', \'Maria\');\n+----------------------+\n| INSTR(\'My\', \'Maria\') |\n+----------------------+\n| 0 |\n+----------------------+\n \n\n\nURL: https://mariadb.com/kb/en/instr/','','https://mariadb.com/kb/en/instr/'),(300,'BEGIN END',23,'Syntax\n------ \n[begin_label:] BEGIN [NOT ATOMIC]\n [statement_list]\nEND [end_label]\n \nNOT ATOMIC is required when used outside of a stored\nprocedure. Inside stored procedures or within an anonymous\nblock, BEGIN alone starts a new anonymous block.\n \nDescription\n----------- \nBEGIN ... END syntax is used for writing compound\nstatements. A compound statement can contain multiple\nstatements, enclosed by the BEGIN and END keywords.\nstatement_list represents a list of one or more statements,\neach\nterminated by a semicolon (i.e., ;) statement delimiter.\nstatement_list is\noptional, which means that the empty compound statement\n(BEGIN END) is\nlegal.\n \nNote that END will perform a commit. If you are running in\nautocommit mode, every statement will be committed\nseparately. If you are not running in autocommit mode, you\nmust execute a COMMIT or ROLLBACK after END to get the\ndatabase up to date.\n \nUse of multiple statements requires that a client is able to\nsend statement strings containing the ; statement delimiter.\nThis is handled in the mysql command-line client with the\nDELIMITER command.\nChanging the ; end-of-statement delimiter (for example, to\n//) allows ; to be used in a program body.\n \nA compound statement within a stored program can be\nlabeled. end_label cannot be given unless begin_label also\nis present. If both are present, they must be the same.\n \nBEGIN ... END constructs can be nested. Each block can\ndefine its own variables, a CONDITION, a HANDLER and a\nCURSOR, which don\'t exist in the outer blocks. The most\nlocal declarations override the outer objects which use the\nsame name (see example below).\n \nThe declarations order is the following:\nDECLARE local variables;\nDECLARE CONDITIONs;\nDECLARE CURSORs;\nDECLARE HANDLERs;\n \nNote that DECLARE HANDLER contains another BEGIN ... END\nconstruct.\n \nHere is an example of a very simple, anonymous block:\n \nBEGIN NOT ATOMIC\nSET @a=1;\n \nCREATE TABLE test.t1(a INT);\nEND|\n \nBelow is an example of nested blocks in a stored procedure:\n \nCREATE PROCEDURE t( )\nBEGIN\n DECLARE x TINYINT UNSIGNED DEFAULT 1;\n \n BEGIN\n DECLARE x CHAR(2) DEFAULT \'02\';\n \n DECLARE y TINYINT UNSIGNED DEFAULT 10;\n \n SELECT x, y;\n \n END;\n \n SELECT x;\n \nEND;\n \nIn this example, a TINYINT variable, x is declared in the\noutter block. But in the inner block x is re-declared as a\nCHAR and an y variable is declared. The inner SELECT shows\nthe \"new\" value of x, and the value of y. But when x is\nselected in the outer block, the \"old\" value is returned.\nThe final SELECT doesn\'t try to read y, because it doesn\'t\nexist in that context.\n \n\n\nURL: https://mariadb.com/kb/en/begin-end/','','https://mariadb.com/kb/en/begin-end/'),(301,'CASE Statement',23,'Syntax\n------ \nCASE case_value\n WHEN when_value THEN statement_list\n [WHEN when_value THEN statement_list] ...\n [ELSE statement_list]\nEND CASE\n \nOr:\n \nCASE\n WHEN search_condition THEN statement_list\n [WHEN search_condition THEN statement_list] ...\n [ELSE statement_list] \nEND CASE\n \nDescription\n----------- \nThe CASE statement for stored programs implements a complex\nconditional\nconstruct. If a search_condition evaluates to true, the\ncorresponding SQL\nstatement list is executed. If no search condition matches,\nthe statement list\nin the ELSE clause is executed. Each statement_list consists\nof one or\nmore statements.\n \nIf no when_value or search_condition matches the value\ntested and the CASE\nstatement contains no ELSE clause, a Case not found for CASE\nstatement\nerror results.\n \nEach statement_list consists of one or more statements; an\nempty\nstatement_list is not allowed. To handle situations where no\nvalue is\nmatched by any WHEN clause, use an ELSE containing an\nempty BEGIN ... END block, as shown in this example:\n \nDELIMITER |\nCREATE PROCEDURE p()\nBEGIN\n DECLARE v INT DEFAULT 1;\n \n CASE v\n WHEN 2 THEN SELECT v;\n \n WHEN 3 THEN SELECT 0;\n \n ELSE BEGIN END;\n \n END CASE;\n \nEND;\n \n|\n \nThe indentation used here in the ELSE clause is for purposes\nof clarity only,\nand is not otherwise significant. See Delimiters in the\nmysql client for more on the use of the delimiter command.\n \nNote: The syntax of the CASE statement used inside stored\nprograms\ndiffers slightly from that of the SQL CASE expression\ndescribed in\nCASE OPERATOR.\nThe CASE statement cannot have an ELSE NULL clause, and it\nis\nterminated with END CASE instead of END.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/case-statement/','','https://mariadb.com/kb/en/case-statement/'),(303,'DECLARE CONDITION',23,'Syntax\n------ \nDECLARE condition_name CONDITION FOR condition_value\n \ncondition_value:\n SQLSTATE [VALUE] sqlstate_value\n | mysql_error_code\n \nDescription\n----------- \nThe DECLARE ... CONDITION statement defines a named error\ncondition.\nIt specifies a condition that needs specific handling and\nassociates a\nname with that condition. Later, the name can be used in a\nDECLARE ... HANDLER, SIGNAL or RESIGNAL statement (as long\nas the statement is located in the same BEGIN ... END\nblock).\n \nConditions must be declared after local variables, but\nbefore CURSORs and HANDLERs.\n \nA condition_value for DECLARE ... CONDITION can be an\nSQLSTATE value (a\n5-character string literal) or a MySQL error code (a\nnumber). You should not\nuse SQLSTATE value \'00000\' or MySQL error code 0, because\nthose indicate sucess\nrather than an error condition. If you try, or if you\nspecify an invalid SQLSTATE value, an error like this is\nproduced:\n \nERROR 1407 (42000): Bad SQLSTATE: \'00000\'\n \nFor a list of SQLSTATE values and MariaDB error\ncodes, see MariaDB Error Codes.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/declare-condition/','','https://mariadb.com/kb/en/declare-condition/'),(603,'LCASE',37,'Syntax\n------ \nLCASE(str)\n \nDescription\n----------- \nLCASE() is a synonym for LOWER().\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/lcase/','','https://mariadb.com/kb/en/lcase/'),(604,'LEFT',37,'Syntax\n------ \nLEFT(str,len)\n \nDescription\n----------- \nReturns the leftmost len characters from the string str, or\nNULL if\nany argument is NULL.\n \nExamples\n-------- \nSELECT LEFT(\'MariaDB\', 5);\n+--------------------+\n| LEFT(\'MariaDB\', 5) |\n+--------------------+\n| Maria |\n+--------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/left/','','https://mariadb.com/kb/en/left/'),(606,'LENGTHB',37,'Introduced in MariaDB 10.3.1 as part of the Oracle\ncompatibility enhancements.\n \nSyntax\n------ \nLENGTHB(str)\n \nDescription\n----------- \nLENGTHB() is a synonym for LENGTH().\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/lengthb/','','https://mariadb.com/kb/en/lengthb/'),(615,'MID',37,'Syntax\n------ \nMID(str,pos,len)\n \nDescription\n----------- \nMID(str,pos,len) is a synonym for SUBSTRING(str,pos,len).\n \nExamples\n-------- \nSELECT MID(\'abcd\',4,1);\n+-----------------+\n| MID(\'abcd\',4,1) |\n+-----------------+\n| d |\n+-----------------+\n \nSELECT MID(\'abcd\',2,2);\n+-----------------+\n| MID(\'abcd\',2,2) |\n+-----------------+\n| bc |\n+-----------------+\n \nA negative starting position:\n \nSELECT MID(\'abcd\',-2,4);\n+------------------+\n| MID(\'abcd\',-2,4) |\n+------------------+\n| cd |\n+------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/mid/','','https://mariadb.com/kb/en/mid/'),(616,'NOT LIKE',37,'Syntax\n------ \nexpr NOT LIKE pat [ESCAPE \'escape_char\']\n \nDescription\n----------- \nThis is the same as NOT (expr LIKE pat [ESCAPE\n\'escape_char\']).\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/not-like/','','https://mariadb.com/kb/en/not-like/'),(305,'DECLARE HANDLER',23,'Syntax\n------ \nDECLARE handler_type HANDLER\n FOR condition_value [, condition_value] ...\n statement\n \nhandler_type:\n CONTINUE\n | EXIT \n | UNDO\n \ncondition_value:\n SQLSTATE [VALUE] sqlstate_value\n | condition_name\n | SQLWARNING\n | NOT FOUND\n | SQLEXCEPTION\n | mariadb_error_code\n \nDescription\n----------- \nThe DECLARE ... HANDLER statement specifies handlers that\neach may\ndeal with one or more conditions. If one of these conditions\noccurs,\nthe specified statement is executed. statement can be a\nsimple\nstatement (for example, SET var_name = value), or it can be\na compound\nstatement written using BEGIN and END.\n \nHandlers must be declared after local variables, a CONDITION\nand a CURSOR.\n \nFor a CONTINUE handler, execution of the current program\ncontinues\nafter execution of the handler statement. For an EXIT\nhandler,\nexecution terminates for the BEGIN ... END compound\nstatement in which\nthe handler is declared. (This is true even if the condition\noccurs in\nan inner block.) The UNDO handler type statement is not\nsupported.\n \nIf a condition occurs for which no handler has been\ndeclared, the\ndefault action is EXIT.\n \nA condition_value for DECLARE ... HANDLER can be any of the\nfollowing\nvalues:\nAn SQLSTATE value (a 5-character string literal) or a\nMariaDB error\ncode (a number). You should not use SQLSTATE value \'00000\'\nor MariaDB\nerror code 0, because those indicate sucess rather than an\nerror\ncondition. For a list of SQLSTATE values and MariaDB error\ncodes, see\nMariaDB Error Codes.\nA condition name previously specified with DECLARE ...\nCONDITION. It must be in the same stored program. See\nDECLARE CONDITION.\nSQLWARNING is shorthand for the class of SQLSTATE values\nthat begin\nwith \'01\'.\nNOT FOUND is shorthand for the class of SQLSTATE values that\nbegin\nwith \'02\'. This is relevant only the context of cursors\nand is used to\ncontrol what happens when a cursor reaches the end of a data\nset. If\nno more rows are available, a No Data condition occurs with\nSQLSTATE\nvalue 02000. To detect this condition, you can set up a\nhandler for it\n(or for a NOT FOUND condition). An example is shown in\nCursor Overview. This condition also occurs for SELECT ...\nINTO var_list statements that retrieve no\nrows.\nSQLEXCEPTION is shorthand for the class of SQLSTATE values\nthat do\nnot begin with \'00\', \'01\', or \'02\'.\n \nWhen an error raises, in some cases it could be handled by\nmultiple HANDLERs. For example, there may be an handler for\n1050 error, a separate handler for the 42S01 SQLSTATE, and\nanother separate handler for the SQLEXCEPTION class: in\ntheory all occurrences of HANDLER may catch the 1050 error,\nbut MariaDB chooses the HANDLER with the highest precedence.\nHere are the precedence rules:\nHandlers which refer to an error code have the highest\nprecedence.\nHandlers which refer to a SQLSTATE come next.\nHandlers which refer to an error class have the lowest\nprecedence.\n \nIn some cases, a statement could produce multiple errors. If\nthis happens, in some cases multiple handlers could have the\nhighest precedence. In such cases, the choice of the handler\nis indeterminate.\n \nNote that if an error occurs within a CONTINUE HANDLER\nblock, it can be handled by another HANDLER. However, a\nHANDLER which is already in the stack (that is, it has been\ncalled to handle an error and its execution didn\'t finish\nyet) cannot handle new errors—this prevents endless loops.\nFor example, suppose that a stored procedure contains a\nCONTINUE HANDLER for SQLWARNING and another CONTINUE HANDLER\nfor NOT FOUND. At some point, a NOT FOUND error occurs, and\nthe execution enters the NOT FOUND HANDLER. But within that\nhandler, a warning occurs, and the execution enters the\nSQLWARNING HANDLER. If another NOT FOUND error occurs, it\ncannot be handled again by the NOT FOUND HANDLER, because\nits execution is not finished.\n \nWhen a DECLARE HANDLER block can handle more than one error\ncondition, it may be useful to know which errors occurred.\nTo do so, you can use the GET DIAGNOSTICS statement.\n \nAn error that is handled by a DECLARE HANDLER construct can\nbe issued again using the RESIGNAL statement.\n \nBelow is an example using DECLARE HANDLER:\n \nCREATE TABLE test.t (s1 INT, PRIMARY KEY (s1));\n \nDELIMITER //\n \nCREATE PROCEDURE handlerdemo ( )\n BEGIN\n DECLARE CONTINUE HANDLER FOR SQLSTATE \'23000\' SET @x2 =\n1;\n \n SET @x = 1;\n \n INSERT INTO test.t VALUES (1);\n SET @x = 2;\n \n INSERT INTO test.t VALUES (1);\n SET @x = 3;\n \n END;\n \n //\n \nDELIMITER ;\n \nCALL handlerdemo( );\n \nSELECT @x;\n \n+------+\n| @x |\n+------+\n| 3 |\n+------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/declare-handler/','','https://mariadb.com/kb/en/declare-handler/'),(306,'DECLARE Variable',23,'Syntax\n------ \nDECLARE var_name [, var_name] ... [[ROW] TYPE OF]] type\n[DEFAULT value]\n \nDescription\n----------- \nThis statement is used to declare local variables within\nstored programs. To\nprovide a default value for the variable, include a DEFAULT\nclause. The\nvalue can be specified as an expression (even subqueries are\npermitted); it need not be a constant. If the\nDEFAULT clause is missing, the initial value is NULL.\n \nLocal variables are treated like stored routine parameters\nwith respect to data\ntype and overflow checking. See CREATE PROCEDURE.\n \nLocal variables must be declared before CONDITIONs, CURSORs\nand HANDLERs.\n \nLocal variable names are not case sensitive.\n \nThe scope of a local variable is within the BEGIN ... END\nblock where it is\ndeclared. The variable can be referred to in blocks nested\nwithin the declaring\nblock, except those blocks that declare a variable with the\nsame name.\n \nTYPE OF / ROW TYPE OF\n \nTYPE OF and ROW TYPE OF anchored data types for stored\nroutines were introduced in MariaDB 10.3.\n \nAnchored data types allow a data type to be defined based on\nanother object, such as a table row, rather than\nspecifically set in the declaration. If the anchor object\nchanges, so will the anchored data type. This can lead to\nroutines being easier to maintain, so that if the data type\nin the table is changed, it will automatically be changed in\nthe routine as well.\n \nVariables declared with ROW TYPE OF will have the same\nfeatures as implicit ROW variables. It is not possible to\nuse ROW TYPE OF variables in a LIMIT clause.\n \nThe real data type of TYPE OF and ROW TYPE OF table_name\nwill become known at the very beginning of the stored\nroutine call. ALTER TABLE or DROP TABLE statements performed\ninside the current routine on the tables that appear in\nanchors won\'t affect the data type of the anchored\nvariables, even if the variable is declared after an ALTER\nTABLE or DROP TABLE statement.\n \nThe real data type of a ROW TYPE OF cursor_name variable\nwill become known when execution enters into the block where\nthe variable is declared. Data type instantiation will\nhappen only once. In a cursor ROW TYPE OF variable that is\ndeclared inside a loop, its data type will become known on\nthe very first iteration and won\'t change on further loop\niterations.\n \nThe tables referenced in TYPE OF and ROW TYPE OF\ndeclarations will be checked for existence at the beginning\nof the stored routine call. CREATE PROCEDURE or CREATE\nFUNCTION will not check the referenced tables for existence.\n \nExamples\n-------- \nTYPE OF and ROW TYPE OF from MariaDB 10.3:\n \nDECLARE tmp TYPE OF t1.a;\n -- Get the data type from the column {{a}} in the table\n{{t1}}\n \nDECLARE rec1 ROW TYPE OF t1;\n -- Get the row data type from the table {{t1}}\n \nDECLARE rec2 ROW TYPE OF cur1;\n -- Get the row data type from the cursor {{cur1}}\n \n\n\nURL: https://mariadb.com/kb/en/declare-variable/','','https://mariadb.com/kb/en/declare-variable/'),(308,'FOR',23,'FOR loops were introduced in MariaDB 10.3.\n \nSyntax\n------ \nInteger range FOR loop:\n \n[begin_label:]\nFOR var_name IN [ REVERSE ] lower_bound .. upper_bound\nDO statement_list\nEND FOR [ end_label ]\n \nExplicit cursor FOR loop\n \n[begin_label:]\nFOR record_name IN cursor_name [ (\ncursor_actual_parameter_list)]\nDO statement_list\nEND FOR [ end_label ]\n \nExplicit cursor FOR loop (Oracle mode)\n \n[begin_label:]\nFOR record_name IN cursor_name [ (\ncursor_actual_parameter_list)]\nLOOP\n statement_list\nEND LOOP [ end_label ]\n \nImplicit cursor FOR loop\n \n[begin_label:]\nFOR record_name IN ( select_statement )\nDO statement_list\nEND FOR [ end_label ]\n \nDescription\n----------- \nFOR loops allow code to be executed a fixed number of times.\n \nIn an integer range FOR loop, MariaDB will compare the lower\nbound and upper bound values, and assign the lower bound\nvalue to a counter. If REVERSE is not specified, and the\nupper bound value is greater than or equal to the counter,\nthe counter will be incremented and the statement will\ncontinue, after which the loop is entered again. If the\nupper bound value is greater than the counter, the loop will\nbe exited.\n \nIf REVERSE is specified, the counter is decremented, and the\nupper bound value needs to be less than or equal for the\nloop to continue.\n \nExamples\n-------- \nIntger range FOR loop:\n \nCREATE TABLE t1 (a INT);\n \nDELIMITER //\n \nFOR i IN 1..3\nDO\n INSERT INTO t1 VALUES (i);\nEND FOR;\n \n//\n \nDELIMITER ;\n \nSELECT * FROM t1;\n \n+------+\n| a |\n+------+\n| 1 |\n| 2 |\n| 3 |\n+------+\n \nREVERSE integer range FOR loop:\n \nCREATE OR REPLACE TABLE t1 (a INT);\n \nDELIMITER //\nFOR i IN REVERSE 12..4\n DO\n INSERT INTO t1 VALUES (i);\nEND FOR;\n \n//\nQuery OK, 9 rows affected (0.422 sec)\n \nDELIMITER ;\n \nSELECT * FROM t1;\n \n+------+\n| a |\n+------+\n| 12 |\n| 11 |\n| 10 |\n| 9 |\n| 8 |\n| 7 |\n| 6 |\n| 5 |\n| 4 |\n+------+\n \nExplicit cursor in Oracle mode:\n \nSET sql_mode=ORACLE;\n \nCREATE OR REPLACE TABLE t1 (a INT, b VARCHAR(32));\n \nINSERT INTO t1 VALUES (10,\'b0\');\nINSERT INTO t1 VALUES (11,\'b1\');\nINSERT INTO t1 VALUES (12,\'b2\');\n \nDELIMITER //\n \nCREATE OR REPLACE PROCEDURE p1(pa INT) AS \n CURSOR cur(va INT) IS\n SELECT a, b FROM t1 WHERE a=va;\n \nBEGIN\n FOR rec IN cur(pa)\n LOOP\n SELECT rec.a, rec.b;\n \n END LOOP;\n \nEND;\n \n//\n \nDELIMITER ;\n \nCALL p1(10);\n+-------+-------+\n| rec.a | rec.b |\n+-------+-------+\n| 10 | b0 |\n+-------+-------+\n \nCALL p1(11);\n+-------+-------+\n| rec.a | rec.b |\n+-------+-------+\n| 11 | b1 |\n+-------+-------+\n \nCALL p1(12);\n+-------+-------+\n| rec.a | rec.b |\n+-------+-------+\n| 12 | b2 |\n+-------+-------+\n \nCALL p1(13);\nQuery OK, 0 rows affected (0.000 sec)\n \n\n\nURL: https://mariadb.com/kb/en/for/','','https://mariadb.com/kb/en/for/'),(312,'Labels',23,'Syntax\n------ \nlabel: \n[label]\n \nLabels are MariaDB identifiers which can be used to identify\na BEGIN ... END construct or a loop. They have a maximum\nlength of 16 characters and can be quoted with backticks\n(i.e.., `).\n \nLabels have a start part and an end part. The start part\nmust precede the portion of code it refers to, must be\nfollowed by a colon (:) and can be on the same or different\nline. The end part is optional and adds nothing, but can\nmake the code more readable. If used, the end part must\nprecede the construct\'s delimiter (;). Constructs\nidentified by a label can be nested. Each construct can be\nidentified by only one label.\n \nLabels need not be unique in the stored program they belong\nto. However, a label for an inner loop cannot be identical\nto a label for an outer loop. In this case, the following\nerror would be produced:\n \nERROR 1309 (42000): Redefining label \n \nLEAVE and ITERATE statements can be used to exit or repeat a\nportion of code identified by a label. They must be in the\nsame Stored Routine, Trigger or Event which contains the\ntarget label.\n \nBelow is an example using a simple label that is used to\nexit a LOOP:\n \nCREATE PROCEDURE `test_sp`()\nBEGIN\n `my_label`:\n LOOP\n SELECT \'looping\';\n \n LEAVE `my_label`;\n \n END LOOP;\n \n SELECT \'out of loop\';\n \nEND;\n \nThe following label is used to exit a procedure, and has an\nend part:\n \nCREATE PROCEDURE `test_sp`()\n`my_label`:\nBEGIN\n IF @var = 1 THEN\n LEAVE `my_label`;\n \n END IF;\n \n DO something();\nEND `my_label`;\n \n\n \n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/labels/','','https://mariadb.com/kb/en/labels/'),(313,'LEAVE',23,'Syntax\n------ \nLEAVE label\n \nThis statement is used to exit the flow control construct\nthat has the\ngiven label. The label must be in the same stored program,\nnot in a caller procedure. LEAVE can be used within BEGIN\n... END or loop constructs\n(LOOP, REPEAT, WHILE). In Stored Procedures, Triggers and\nEvents, LEAVE can refer to the outmost BEGIN ... END\nconstruct; in that case, the program exits the procedure. In\nStored Functions, RETURN can be used instead.\n \nNote that LEAVE cannot be used to exit a DECLARE HANDLER\nblock.\n \nIf you try to LEAVE a non-existing label, or if you try to\nLEAVE a HANDLER block, the following error will be produced:\n \nERROR 1308 (42000): LEAVE with no matching label: \n \nThe following example uses LEAVE to exit the procedure if a\ncondition is true:\n \nCREATE PROCEDURE proc(IN p TINYINT)\nCONTAINS SQL\n`whole_proc`:\nBEGIN\n SELECT 1;\n \n IF p \n\nURL: https://mariadb.com/kb/en/leave/','','https://mariadb.com/kb/en/leave/'),(617,'NOT REGEXP',37,'Syntax\n------ \nexpr NOT REGEXP pat, expr NOT RLIKE pat\n \nDescription\n----------- \nThis is the same as NOT (expr REGEXP pat).\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/not-regexp/','','https://mariadb.com/kb/en/not-regexp/'),(618,'OCTET_LENGTH',37,'Syntax\n------ \nOCTET_LENGTH(str)\n \nDescription\n----------- \nOCTET_LENGTH() is normally a synonym for LENGTH(). When\nrunning Oracle mode from MariaDB 10.3, they are not\nsynonyms, but OCTET_LENGTH() behaves as LENGTH() would when\nnot in Oracle mode.\n \n\n\nURL: https://mariadb.com/kb/en/octet_length/','','https://mariadb.com/kb/en/octet_length/'),(619,'ORD',37,'Syntax\n------ \nORD(str)\n \nDescription\n----------- \nIf the leftmost character of the string str is a multi-byte\ncharacter,\nreturns the code for that character, calculated from the\nnumeric\nvalues of its constituent bytes using this formula:\n \n (1st byte code)\n+ (2nd byte code x 256)\n+ (3rd byte code x 256 x 256) ...\n \nIf the leftmost character is not a multi-byte character,\nORD() returns\nthe same value as the ASCII() function.\n \nExamples\n-------- \nSELECT ORD(\'2\');\n+----------+\n| ORD(\'2\') |\n+----------+\n| 50 |\n+----------+\n \n\n\nURL: https://mariadb.com/kb/en/ord/','','https://mariadb.com/kb/en/ord/'),(620,'POSITION',37,'Syntax\n------ \nPOSITION(substr IN str)\n \nDescription\n----------- \nPOSITION(substr IN str) is a synonym for LOCATE(substr,str).\n \nIt\'s part of ODBC 3.0.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/position/','','https://mariadb.com/kb/en/position/'),(621,'QUOTE',37,'Syntax\n------ \nQUOTE(str)\n \nDescription\n----------- \nQuotes a string to produce a result that can be used as a\nproperly escaped data\nvalue in an SQL statement. The string is returned enclosed\nby single quotes and\nwith each instance of single quote (\"\'\"), backslash\n(\"\\\"),\nASCII NUL, and Control-Z preceded by a backslash. If the\nargument\nis NULL, the return value is the word \"NULL\" without\nenclosing single\nquotes.\n \nExamples\n-------- \nSELECT QUOTE(\"Don\'t!\");\n+-----------------+\n| QUOTE(\"Don\'t!\") |\n+-----------------+\n| \'Don\\\'t!\' |\n+-----------------+\n \nSELECT QUOTE(NULL); \n+-------------+\n| QUOTE(NULL) |\n+-------------+\n| NULL |\n+-------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/quote/','','https://mariadb.com/kb/en/quote/'),(316,'REPEAT LOOP',23,'Syntax\n------ \n[begin_label:] REPEAT\n statement_list\nUNTIL search_condition\nEND REPEAT [end_label]\n \nThe statement list within a REPEAT statement is repeated\nuntil the\nsearch_condition is true. Thus, a REPEAT always enters the\nloop at\nleast once. statement_list consists of one or more\nstatements, each\nterminated by a semicolon (i.e., ;) statement delimiter.\n \nA REPEAT statement can be labeled. end_label cannot be given\nunless\nbegin_label also is present. If both are present, they must\nbe the\nsame.\n \nSee Delimiters in the mysql client for more on client\ndelimiter usage.\n \nDELIMITER //\n \nCREATE PROCEDURE dorepeat(p1 INT)\n BEGIN\n SET @x = 0;\n \n REPEAT SET @x = @x + 1;\n UNTIL @x > p1 END REPEAT;\n \n END\n//\n \nCALL dorepeat(1000)//\n \nSELECT @x//\n+------+\n| @x |\n+------+\n| 1001 |\n+------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/repeat-loop/','','https://mariadb.com/kb/en/repeat-loop/'),(317,'RESIGNAL',23,'Syntax\n------ \nRESIGNAL [error_condition]\n [SET error_property\n [, error_property] ...]\n \nerror_condition:\n SQLSTATE [VALUE] \'sqlstate_value\'\n | condition_name\n \nerror_property:\n error_property_name = \n \nerror_property_name:\n CLASS_ORIGIN\n | SUBCLASS_ORIGIN\n | MESSAGE_TEXT\n | MYSQL_ERRNO\n | CONSTRAINT_CATALOG\n | CONSTRAINT_SCHEMA\n | CONSTRAINT_NAME\n | CATALOG_NAME\n | SCHEMA_NAME\n | TABLE_NAME\n | COLUMN_NAME\n | CURSOR_NAME\n \nDescription\n----------- \nThe syntax of RESIGNAL and its semantics are very similar to\nSIGNAL. This statement can only be used within an error\nHANDLER. It produces an error, like SIGNAL. RESIGNAL clauses\nare the same as SIGNAL, except that they all are optional,\neven SQLSTATE. All the properties which are not specified in\nRESIGNAL, will be identical to the properties of the error\nthat was received by the error HANDLER. For a description of\nthe clauses, see diagnostics area.\n \nNote that RESIGNAL does not empty the diagnostics area: it\njust appends another error condition.\n \nRESIGNAL, without any clauses, produces an error which is\nidentical to the error that was received by HANDLER.\n \nIf used out of a HANDLER construct, RESIGNAL produces the\nfollowing error:\n \nERROR 1645 (0K000): RESIGNAL when handler not active\n \nIn MariaDB 5.5, if a HANDLER contained a CALL to another\nprocedure, that procedure could use RESIGNAL. Since MariaDB\n10.0, trying to do this raises the above error.\n \nFor a list of SQLSTATE values and MariaDB error codes, see\nMariaDB Error Codes.\n \nThe following procedure tries to query two tables which\ndon\'t exist, producing a 1146 error in both cases. Those\nerrors will trigger the HANDLER. The first time the error\nwill be ignored and the client will not receive it, but the\nsecond time, the error is re-signaled, so the client will\nreceive it.\n \nCREATE PROCEDURE test_error( )\nBEGIN\n DECLARE CONTINUE HANDLER\n FOR 1146\n BEGIN\n IF @hide_errors IS FALSE THEN\n RESIGNAL;\n \n END IF;\n \n END;\n \n SET @hide_errors = TRUE;\n \n SELECT \'Next error will be ignored\' AS msg;\n \n SELECT `c` FROM `temptab_one`;\n \n SELECT \'Next error won\'\'t be ignored\' AS msg;\n \n SET @hide_errors = FALSE;\n \n SELECT `c` FROM `temptab_two`;\n \nEND;\n \nCALL test_error( );\n \n+----------------------------+\n| msg |\n+----------------------------+\n| Next error will be ignored |\n+----------------------------+\n \n+-----------------------------+\n| msg |\n+-----------------------------+\n| Next error won\'t be ignored |\n+-----------------------------+\n \nERROR 1146 (42S02): Table \'test.temptab_two\' doesn\'t\nexist\n \nThe following procedure re-signals an error, modifying only\nthe error message to clarify the cause of the problem.\n \nCREATE PROCEDURE test_error()\nBEGIN\n DECLARE CONTINUE HANDLER\n FOR 1146\n BEGIN\n RESIGNAL SET\n MESSAGE_TEXT = \'`temptab` does not exist\';\n \n END;\n \n SELECT `c` FROM `temptab`;\n \nEND;\n \nCALL test_error( );\nERROR 1146 (42S02): `temptab` does not exist\n \nAs explained above, this works on MariaDB 5.5, but produces\na 1645 error since 10.0.\n \nCREATE PROCEDURE handle_error()\nBEGIN\n RESIGNAL;\n \nEND;\n \nCREATE PROCEDURE p()\nBEGIN\n DECLARE EXIT HANDLER FOR SQLEXCEPTION CALL p();\n SIGNAL SQLSTATE \'45000\';\n \nEND;\n \n\n\nURL: https://mariadb.com/kb/en/resignal/','','https://mariadb.com/kb/en/resignal/'),(319,'SELECT INTO',23,'Syntax\n------ \nSELECT col_name [, col_name] ...\n INTO var_name [, var_name] ...\n table_expr\n \nDescription\n----------- \nSELECT ... INTO enables selected columns to be stored\ndirectly\ninto variables. No resultset is produced. The query should\nreturn a single row. If the query\nreturns no rows, a warning with error code 1329 occurs (No\ndata), and\nthe variable values remain unchanged. If the query returns\nmultiple\nrows, error 1172 occurs (Result consisted of more than one\nrow). If it\nis possible that the statement may retrieve multiple rows,\nyou can use\nLIMIT 1 to limit the result set to a single row.\n \nThe INTO clause can also be specified at the end of the\nstatement.\n \nIn the context of such statements that occur as part of\nevents\nexecuted by the Event Scheduler, diagnostics messages (not\nonly\nerrors, but also warnings) are written to the error log,\nand, on\nWindows, to the application event log.\n \nThis statement can be used with both local variables and\nuser-defined variables.\n \nFor the complete syntax, see SELECT.\n \nAnother way to set a variable\'s value is the SET statement.\n \nSELECT ... INTO results are not stored in the query cache\neven if SQL_CACHE is specified.\n \nExamples\n-------- \nSELECT id, data INTO @x,@y \nFROM test.t1 LIMIT 1;\n \n\n\nURL: https://mariadb.com/kb/en/selectinto/','','https://mariadb.com/kb/en/selectinto/'),(625,'REPEAT Function',37,'Syntax\n------ \nREPEAT(str,count)\n \nDescription\n----------- \nReturns a string consisting of the string str repeated count\ntimes. If\ncount is less than 1, returns an empty string. Returns NULL\nif str or\ncount are NULL.\n \nExamples\n-------- \nSELECT QUOTE(REPEAT(\'MariaDB \',4));\n+------------------------------------+\n| QUOTE(REPEAT(\'MariaDB \',4)) |\n+------------------------------------+\n| \'MariaDB MariaDB MariaDB MariaDB \' |\n+------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/repeat-function/','','https://mariadb.com/kb/en/repeat-function/'),(626,'REPLACE Function',37,'Syntax\n------ \nREPLACE(str,from_str,to_str)\n \nDescription\n----------- \nReturns the string str with all occurrences of the string\nfrom_str\nreplaced by the string to_str. REPLACE() performs a\ncase-sensitive\nmatch when searching for from_str.\n \nExamples\n-------- \nSELECT REPLACE(\'www.mariadb.org\', \'w\', \'Ww\');\n+---------------------------------------+\n| REPLACE(\'www.mariadb.org\', \'w\', \'Ww\') |\n+---------------------------------------+\n| WwWwWw.mariadb.org |\n+---------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/replace-function/','','https://mariadb.com/kb/en/replace-function/'),(627,'REVERSE',37,'Syntax\n------ \nREVERSE(str)\n \nDescription\n----------- \nReturns the string str with the order of the characters\nreversed.\n \nExamples\n-------- \nSELECT REVERSE(\'desserts\');\n+---------------------+\n| REVERSE(\'desserts\') |\n+---------------------+\n| stressed |\n+---------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/reverse/','','https://mariadb.com/kb/en/reverse/'),(628,'RIGHT',37,'Syntax\n------ \nRIGHT(str,len)\n \nDescription\n----------- \nReturns the rightmost len characters from the string str, or\nNULL if\nany argument is NULL.\n \nExamples\n-------- \nSELECT RIGHT(\'MariaDB\', 2);\n+---------------------+\n| RIGHT(\'MariaDB\', 2) |\n+---------------------+\n| DB |\n+---------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/right/','','https://mariadb.com/kb/en/right/'),(320,'SIGNAL',23,'Syntax\n------ \nSIGNAL error_condition\n [SET error_property\n [, error_property] ...]\n \nerror_condition:\n SQLSTATE [VALUE] \'sqlstate_value\'\n | condition_name\n \nerror_property:\n error_property_name = \n \nerror_property_name:\n CLASS_ORIGIN\n | SUBCLASS_ORIGIN\n | MESSAGE_TEXT\n | MYSQL_ERRNO\n | CONSTRAINT_CATALOG\n | CONSTRAINT_SCHEMA\n | CONSTRAINT_NAME\n | CATALOG_NAME\n | SCHEMA_NAME\n | TABLE_NAME\n | COLUMN_NAME\n | CURSOR_NAME\n \nSIGNAL empties the diagnostics area and produces a custom\nerror. This statement can be used anywhere, but is generally\nuseful when used inside a stored program. When the error is\nproduced, it can be caught by a HANDLER. If not, the current\nstored program, or the current statement, will terminate\nwith the specified error.\n \nSometimes an error HANDLER just needs to SIGNAL the same\nerror it received, optionally with some changes. Usually the\nRESIGNAL statement is the most convenient way to do this.\n \nerror_condition can be an SQLSTATE value or a named error\ncondition defined via DECLARE CONDITION. SQLSTATE must be a\nconstant string consisting of five characters. These codes\nare standard to ODBC and ANSI SQL. For customized errors,\nthe recommended SQLSTATE is \'45000\'. For a list of\nSQLSTATE values used by MariaDB, see the MariaDB Error Codes\npage. The SQLSTATE can be read via the API method\nmysql_sqlstate( ). \n \nTo specify error properties user-defined variables and local\nvariables can be used, as well as character set conversions\n(but you can\'t set a collation).\n \nThe error properties, their type and their default values\nare explained in the diagnostics area page.\n \nErrors\n \nIf the SQLSTATE is not valid, the following error like this\nwill be produced:\n \nERROR 1407 (42000): Bad SQLSTATE: \'123456\'\n \nIf a property is specified more than once, an error like\nthis will be produced:\n \nERROR 1641 (42000): Duplicate condition information item\n\'MESSAGE_TEXT\'\n \nIf you specify a condition name which is not declared, an\nerror like this will be produced:\n \nERROR 1319 (42000): Undefined CONDITION: cond_name\n \nIf MYSQL_ERRNO is out of range, you will get an error like\nthis:\n \nERROR 1231 (42000): Variable \'MYSQL_ERRNO\' can\'t be set\nto the value of \'0\'\n \nExamples\n-------- \nHere\'s what happens if SIGNAL is used in the client to\ngenerate errors:\n \nSIGNAL SQLSTATE \'01000\';\n \nQuery OK, 0 rows affected, 1 warning (0.00 sec)\n \nSHOW WARNINGS;\n \n+---------+------+------------------------------------------+\n| Level | Code | Message |\n+---------+------+------------------------------------------+\n| Warning | 1642 | Unhandled user-defined warning condition\n|\n+---------+------+------------------------------------------+\n1 row in set (0.06 sec)\n \nSIGNAL SQLSTATE \'02000\';\n \nERROR 1643 (02000): Unhandled user-defined not found\ncondition\n \nHow to specify MYSQL_ERRNO and MESSAGE_TEXT properties:\n \nSIGNAL SQLSTATE \'45000\' SET MYSQL_ERRNO=30001,\nMESSAGE_TEXT=\'H\nello, world!\';\n \nERROR 30001 (45000): Hello, world!\n \nThe following code shows how to use user variables, local\nvariables and character set conversion with SIGNAL:\n \nCREATE PROCEDURE test_error(x INT)\nBEGIN\n DECLARE errno SMALLINT UNSIGNED DEFAULT 31001;\n \n SET @errmsg = \'Hello, world!\';\n \n IF x = 1 THEN\n SIGNAL SQLSTATE \'45000\' SET\n MYSQL_ERRNO = errno,\n MESSAGE_TEXT = @errmsg;\n \n ELSE\n SIGNAL SQLSTATE \'45000\' SET\n MYSQL_ERRNO = errno,\n MESSAGE_TEXT = _utf8\'Hello, world!\';\n \n END IF;\n \nEND;\n \nHow to use named error conditions:\n \nCREATE PROCEDURE test_error(n INT)\nBEGIN\n DECLARE `too_big` CONDITION FOR SQLSTATE \'45000\';\n \n IF n > 10 THEN\n SIGNAL `too_big`;\n \n END IF;\n \nEND;\n \nIn this example, we\'ll define a HANDLER for an error code.\nWhen the error occurs, we SIGNAL a more informative error\nwhich makes sense for our procedure:\n \nCREATE PROCEDURE test_error()\nBEGIN\n DECLARE EXIT HANDLER\n FOR 1146\n BEGIN\n SIGNAL SQLSTATE \'45000\' SET\n MESSAGE_TEXT = \'Temporary tables not found; did you call\ninit() procedure?\';\n \n END;\n \n -- this will produce a 1146 error\n SELECT `c` FROM `temptab`;\n \nEND;\n \n\n\nURL: https://mariadb.com/kb/en/signal/','','https://mariadb.com/kb/en/signal/'),(325,'LINESTRING',24,'Syntax\n------ \nLineString(pt1,pt2,...)\n \nDescription\n----------- \nConstructs a WKB LineString value from a number of WKB Point\narguments. If any argument is not a WKB Point, the return\nvalue is\nNULL. If the number of Point arguments is less than two, the\nreturn value is NULL.\n \nExamples\n-------- \nSET @ls = \'LineString(1 1,2 2,3 3)\';\n \nSELECT AsText(EndPoint(GeomFromText(@ls)));\n+-------------------------------------+\n| AsText(EndPoint(GeomFromText(@ls))) |\n+-------------------------------------+\n| POINT(3 3) |\n+-------------------------------------+\n \nCREATE TABLE gis_line (g LINESTRING);\nINSERT INTO gis_line VALUES\n (LineFromText(\'LINESTRING(0 0,0 10,10 0)\')),\n (LineStringFromText(\'LINESTRING(10 10,20 10,20 20,10 20,10\n10)\')),\n (LineStringFromWKB(AsWKB(LineString(Point(10, 10),\nPoint(40, 10)))));\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/linestring/','','https://mariadb.com/kb/en/linestring/'),(632,'SOUNDS LIKE',37,'Syntax\n------ \nexpr1 SOUNDS LIKE expr2\n \nDescription\n----------- \nThis is the same as SOUNDEX(expr1) = SOUNDEX(expr2).\n \nExample\n \nSELECT givenname, surname FROM users WHERE givenname SOUNDS\nLIKE \"robert\";\n \n+-----------+---------+\n| givenname | surname |\n+-----------+---------+\n| Roberto | Castro |\n+-----------+---------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/sounds-like/','','https://mariadb.com/kb/en/sounds-like/'),(633,'SPACE',37,'Syntax\n------ \nSPACE(N)\n \nDescription\n----------- \nReturns a string consisting of N space characters. If N is\nNULL, returns NULL.\n \nExamples\n-------- \nSELECT QUOTE(SPACE(6));\n+-----------------+\n| QUOTE(SPACE(6)) |\n+-----------------+\n| \' \' |\n+-----------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/space/','','https://mariadb.com/kb/en/space/'),(634,'STRCMP',37,'Syntax\n------ \nSTRCMP(expr1,expr2)\n \nDescription\n----------- \nSTRCMP() returns 0 if the strings are the same, -1 if the\nfirst\nargument is smaller than the second according to the current\nsort order,\nand 1 otherwise.\n \nExamples\n-------- \nSELECT STRCMP(\'text\', \'text2\');\n+-------------------------+\n| STRCMP(\'text\', \'text2\') |\n+-------------------------+\n| -1 |\n+-------------------------+\n \nSELECT STRCMP(\'text2\', \'text\');\n+-------------------------+\n| STRCMP(\'text2\', \'text\') |\n+-------------------------+\n| 1 |\n+-------------------------+\n \nSELECT STRCMP(\'text\', \'text\');\n+------------------------+\n| STRCMP(\'text\', \'text\') |\n+------------------------+\n| 0 |\n+------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/strcmp/','','https://mariadb.com/kb/en/strcmp/'),(635,'SUBSTR',37,'Description\n----------- \nSUBSTR() is a synonym for SUBSTRING().\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/substr/','','https://mariadb.com/kb/en/substr/'),(640,'UCASE',37,'Syntax\n------ \nUCASE(str)\n \nDescription\n----------- \nUCASE() is a synonym for UPPER().\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/ucase/','','https://mariadb.com/kb/en/ucase/'),(643,'UPPER',37,'Syntax\n------ \nUPPER(str)\n \nDescription\n----------- \nReturns the string str with all characters changed to\nuppercase\naccording to the current character set mapping. The default\nis latin1\n(cp1252 West European).\n \nSELECT UPPER(surname), givenname FROM users ORDER BY\nsurname;\n \n+----------------+------------+\n| UPPER(surname) | givenname |\n+----------------+------------+\n| ABEL | Jacinto |\n| CASTRO | Robert |\n| COSTA | Phestos |\n| MOSCHELLA | Hippolytos |\n+----------------+------------+\n \nUPPER() is ineffective when applied to binary strings\n(BINARY,\nVARBINARY, BLOB). The description of \nLOWER() shows how to\nperform lettercase conversion of binary strings.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/upper/','','https://mariadb.com/kb/en/upper/'),(331,'POLYGON',24,'Syntax\n------ \nPolygon(ls1,ls2,...)\n \nDescription\n----------- \nConstructs a WKB Polygon value from a number of WKB\nLineString\narguments. If any argument does not represent the WKB of a\nLinearRing (that is,\nnot a closed and simple LineString) the return value is\nNULL.\n \nNote that according to the OpenGIS standard, a POLYGON\nshould have exactly one ExteriorRing and all other rings\nshould lie within that ExteriorRing and thus be the\nInteriorRings. Practically, however, some systems, including\nMariaDB\'s, permit polygons to have several\n\'ExteriorRings\'. In the case of there being multiple,\nnon-overlapping exterior rings ST_NUMINTERIORRINGS() will\nreturn 1.\n \nExamples\n-------- \nSET @g = ST_GEOMFROMTEXT(\'POLYGON((1 1,1 5,4 9,6 9,9 3,7\n2,1 1))\');\n \nCREATE TABLE gis_polygon (g POLYGON);\nINSERT INTO gis_polygon VALUES\n (PolygonFromText(\'POLYGON((10 10,20 10,20 20,10 20,10\n10))\')),\n (PolyFromText(\'POLYGON((0 0,50 0,50 50,0 50,0 0), (10\n10,20 10,20 20,10 20,10 10))\')),\n (PolyFromWKB(AsWKB(Polygon(LineString(Point(0, 0),\nPoint(30, 0), Point(30, 30), Point(0, 0))))));\n \nNon-overlapping \'polygon\':\n \nSELECT ST_NumInteriorRings(ST_PolyFromText(\'POLYGON((0 0,10\n0,10 10,0 10,0 0),\n (-1 -1,-5 -1,-5 -5,-1 -5,-1 -1))\')) AS NumInteriorRings;\n \n+------------------+\n| NumInteriorRings |\n+------------------+\n| 1 |\n+------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/polygon/','','https://mariadb.com/kb/en/polygon/'),(332,'ST_BUFFER',24,'Syntax\n------ \nST_BUFFER(g1,r)\nBUFFER(g1,r)\n \nDescription\n----------- \nReturns a geometry that represents all points whose distance\nfrom geometry g1 is less than or equal to distance, or\nradius, r.\n \nUses for this function could include creating for example a\nnew geometry representing a buffer zone around an island.\n \nBUFFER() is a synonym.\n \nExamples\n-------- \nDetermining whether a point is within a buffer zone:\n \nSET @g1 = ST_GEOMFROMTEXT(\'POLYGON((10 10, 10 20, 20 20, 20\n10, 10 10))\');\n \nSET @g2 = ST_GEOMFROMTEXT(\'POINT(8 8)\');\n \nSELECT ST_WITHIN(@g2,ST_BUFFER(@g1,5));\n+---------------------------------+\n| ST_WITHIN(@g2,ST_BUFFER(@g1,5)) |\n+---------------------------------+\n| 1 |\n+---------------------------------+\n \nSELECT ST_WITHIN(@g2,ST_BUFFER(@g1,1));\n+---------------------------------+\n| ST_WITHIN(@g2,ST_BUFFER(@g1,1)) |\n+---------------------------------+\n| 0 |\n+---------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_buffer/','','https://mariadb.com/kb/en/st_buffer/'),(333,'ST_CONVEXHULL',24,'ST_ConvexHull() was introduced in MariaDB 10.1.2\n \nSyntax\n------ \nST_ConvexHull(g)\nConvexHull(g)\n \nDescription\n----------- \nGiven a geometry, returns a geometry that is the minimum\nconvex geometry enclosing all geometries within the set.\nReturns NULL if the geometry value is NULL or an empty\nvalue.\n \nST_ConvexHull() and ConvexHull() are synonyms.\n \nExamples\n-------- \nThe ConvexHull of a single point is simply the single point:\n \nSET @g = ST_GEOMFROMTEXT(\'Point(0 0)\');\n \nSELECT ST_ASTEXT(ST_CONVEXHULL(@g));\n+------------------------------+\n| ST_ASTEXT(ST_CONVEXHULL(@g)) |\n+------------------------------+\n| POINT(0 0) |\n+------------------------------+\n \nSET @g = ST_GEOMFROMTEXT(\'MultiPoint(0 0, 1 2, 2 3)\');\n \nSELECT ST_ASTEXT(ST_CONVEXHULL(@g));\n+------------------------------+\n| ST_ASTEXT(ST_CONVEXHULL(@g)) |\n+------------------------------+\n| POLYGON((0 0,1 2,2 3,0 0)) |\n+------------------------------+\n \nSET @g = ST_GEOMFROMTEXT(\'MultiPoint( 1 1, 2 2, 5 3, 7 2, 9\n3, 8 4, 6 6, 6 9, 4 9, 1 5 )\');\n \nSELECT ST_ASTEXT(ST_CONVEXHULL(@g));\n+----------------------------------------+\n| ST_ASTEXT(ST_CONVEXHULL(@g)) |\n+----------------------------------------+\n| POLYGON((1 1,1 5,4 9,6 9,9 3,7 2,1 1)) |\n+----------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_convexhull/','','https://mariadb.com/kb/en/st_convexhull/'),(336,'ST_SYMDIFFERENCE',24,'Syntax\n------ \nST_SYMDIFFERENCE(g1,g2)\n \nDescription\n----------- \nReturns a geometry that represents the portions of geometry\ng1 and geometry g2 that don\'t intersect.\n \nExamples\n-------- \nSET @g1 = ST_GEOMFROMTEXT(\'LINESTRING(10 20, 10 40)\');\n \nSET @g2 = ST_GEOMFROMTEXT(\'LINESTRING(10 15, 10 25)\');\n \nSELECT ASTEXT(ST_SYMDIFFERENCE(@g1,@g2));\n+----------------------------------------------+\n| ASTEXT(ST_SYMDIFFERENCE(@g1,@g2)) |\n+----------------------------------------------+\n| MULTILINESTRING((10 15,10 20),(10 25,10 40)) |\n+----------------------------------------------+\n \nSET @g2 = ST_GeomFromText(\'LINESTRING(10 20, 10 41)\');\n \nSELECT ASTEXT(ST_SYMDIFFERENCE(@g1,@g2));\n+-----------------------------------+\n| ASTEXT(ST_SYMDIFFERENCE(@g1,@g2)) |\n+-----------------------------------+\n| LINESTRING(10 40,10 41) |\n+-----------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_symdifference/','','https://mariadb.com/kb/en/st_symdifference/'),(337,'ST_UNION',24,'Syntax\n------ \nST_UNION(g1,g2)\n \nDescription\n----------- \nReturns a geometry that is the union of the geometry g1 and\ngeometry g2.\n \nExamples\n-------- \nSET @g1 = GEOMFROMTEXT(\'POINT (0 2)\');\n \nSET @g2 = GEOMFROMTEXT(\'POINT (2 0)\');\n \nSELECT ASTEXT(ST_UNION(@g1,@g2));\n+---------------------------+\n| ASTEXT(ST_UNION(@g1,@g2)) |\n+---------------------------+\n| MULTIPOINT(2 0,0 2) |\n+---------------------------+\n \nSET @g1 = GEOMFROMTEXT(\'POLYGON((0 0,0 3,3 3,3 0,0 0))\');\n \nSET @g2 = GEOMFROMTEXT(\'POLYGON((2 2,4 2,4 4,2 4,2 2))\');\n \nSELECT ASTEXT(ST_UNION(@g1,@g2));\n+------------------------------------------------+\n| ASTEXT(ST_UNION(@g1,@g2)) |\n+------------------------------------------------+\n| POLYGON((0 0,0 3,2 3,2 4,4 4,4 2,3 2,3 0,0 0)) |\n+------------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_union/','','https://mariadb.com/kb/en/st_union/'),(648,'ALTER LOGFILE GROUP',39,'Syntax\n------ \nALTER LOGFILE GROUP logfile_group\n ADD UNDOFILE \'file_name\'\n [INITIAL_SIZE [=] size]\n [WAIT]\n ENGINE [=] engine_name\n \nThe ALTER LOGFILE GROUP statement is not supported by\nMariaDB. It was originally inherited from MySQL NDB Cluster.\nSee MDEV-19295 for more information.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/alter-logfile-group/','','https://mariadb.com/kb/en/alter-logfile-group/'),(651,'ALTER SERVER',39,'Syntax\n------ \nALTER SERVER server_name\n OPTIONS (option [, option] ...)\n \nDescription\n----------- \nAlters the server information for server_name, adjusting the\nspecified\noptions as per the CREATE SERVER command. The corresponding\nfields in the mysql.servers table are updated accordingly.\nThis statement requires the SUPER privilege.\n \nExamples\n-------- \nALTER SERVER s OPTIONS (USER \'sally\');\n \n\n\nURL: https://mariadb.com/kb/en/alter-server/','','https://mariadb.com/kb/en/alter-server/'),(652,'ALTER TABLE',39,'Syntax\n------ \nALTER [ONLINE] [IGNORE] TABLE tbl_name\n [WAIT n | NOWAIT]\n alter_specification [, alter_specification] ...\n \nalter_specification:\n table_option ...\n | ADD [COLUMN] [IF NOT EXISTS] col_name column_definition\n [FIRST | AFTER col_name ]\n | ADD [COLUMN] [IF NOT EXISTS] (col_name\ncolumn_definition,...)\n | ADD {INDEX|KEY} [IF NOT EXISTS] [index_name]\n [index_type] (index_col_name,...) [index_option] ...\n | ADD [CONSTRAINT [symbol]] PRIMARY KEY\n [index_type] (index_col_name,...) [index_option] ...\n | ADD [CONSTRAINT [symbol]]\n UNIQUE [INDEX|KEY] [index_name]\n [index_type] (index_col_name,...) [index_option] ...\n | ADD FULLTEXT [INDEX|KEY] [index_name]\n (index_col_name,...) [index_option] ...\n | ADD SPATIAL [INDEX|KEY] [index_name]\n (index_col_name,...) [index_option] ...\n | ADD [CONSTRAINT [symbol]]\n FOREIGN KEY [IF NOT EXISTS] [index_name]\n(index_col_name,...)\n reference_definition\n | ADD PERIOD FOR SYSTEM_TIME (start_column_name,\nend_column_name)\n | ALTER [COLUMN] col_name SET DEFAULT literal\n| (expression)\n | ALTER [COLUMN] col_name DROP DEFAULT\n | CHANGE [COLUMN] [IF EXISTS] old_col_name new_col_name\ncolumn_definition\n [FIRST|AFTER col_name]\n | MODIFY [COLUMN] [IF EXISTS] col_name column_definition\n [FIRST | AFTER col_name]\n | DROP [COLUMN] [IF EXISTS] col_name [RESTRICT|CASCADE]\n | DROP PRIMARY KEY\n | DROP {INDEX|KEY} [IF EXISTS] index_name\n | DROP FOREIGN KEY [IF EXISTS] fk_symbol\n | DROP CONSTRAINT [IF EXISTS] constraint_name\n | DISABLE KEYS\n | ENABLE KEYS\n | RENAME [TO] new_tbl_name\n | ORDER BY col_name [, col_name] ...\n | CONVERT TO CHARACTER SET charset_name [COLLATE\ncollation_name]\n | [DEFAULT] CHARACTER SET [=] charset_name\n | [DEFAULT] COLLATE [=] collation_name\n | DISCARD TABLESPACE\n | IMPORT TABLESPACE\n | ALGORITHM [=] {DEFAULT|INPLACE|COPY|NOCOPY|INSTANT}\n | LOCK [=] {DEFAULT|NONE|SHARED|EXCLUSIVE}\n | FORCE\n | partition_options\n | ADD PARTITION (partition_definition)\n | DROP PARTITION partition_names\n | COALESCE PARTITION number\n | REORGANIZE PARTITION [partition_names INTO\n(partition_definitions)]\n | ANALYZE PARTITION partition_names\n | CHECK PARTITION partition_names\n | OPTIMIZE PARTITION partition_names\n | REBUILD PARTITION partition_names\n | REPAIR PARTITION partition_names\n | EXCHANGE PARTITION partition_name WITH TABLE tbl_name\n | REMOVE PARTITIONING\n | ADD SYSTEM VERSIONING\n | DROP SYSTEM VERSIONING\n \nindex_col_name:\n col_name [(length)] [ASC | DESC]\n \nindex_type:\n USING {BTREE | HASH | RTREE}\n \nindex_option:\n KEY_BLOCK_SIZE [=] value\n | index_type\n | WITH PARSER parser_name\n | COMMENT \'string\'\n | CLUSTERING={YES| NO}\n \ntable_options:\n table_option [[,] table_option] ...\nIn MariaDB 10.0.2 and later, IF EXISTS and IF NOT EXISTS\nclauses have been added for the following:\n \nADD COLUMN [IF NOT EXISTS]\nADD INDEX [IF NOT EXISTS]\nADD FOREIGN KEY [IF NOT EXISTS]\nADD PARTITION [IF NOT EXISTS]\nCREATE INDEX [IF NOT EXISTS]\n \nDROP COLUMN [IF EXISTS]\nDROP INDEX [IF EXISTS]\nDROP FOREIGN KEY [IF EXISTS]\nDROP PARTITION [IF EXISTS]\nCHANGE COLUMN [IF EXISTS]\nMODIFY COLUMN [IF EXISTS]\nDROP INDEX [IF EXISTS]\nWhen IF EXISTS and IF NOT EXISTS are used in clauses,\nqueries will not\nreport errors when the condition is triggered for that\nclause. A warning with\nthe same message text will be issued and the ALTER will move\non to the next\nclause in the statement (or end if finished).\n \nThis was done in MDEV-318.\n \nDescription\n----------- \nALTER TABLE enables you to change the structure of an\nexisting table.\nFor example, you can add or delete columns, create or\ndestroy indexes,\nchange the type of existing columns, or rename columns or\nthe table\nitself. You can also change the comment for the table and\nthe storage engine of the\ntable.\n \nIf another connection is using the table, a metadata lock is\nactive, and this statement will wait until the lock is\nreleased. This is also true for non-transactional tables.\n \nWhen adding a UNIQUE index on a column (or a set of columns)\nwhich have duplicated values, an error will be produced and\nthe statement will be stopped. To suppress the error and\nforce the creation of UNIQUE indexes, discarding duplicates,\nthe IGNORE option can be specified. This can be useful if a\ncolumn (or a set of columns) should be UNIQUE but it\ncontains duplicate values; however, this technique provides\nno control on which rows are preserved and which are\ndeleted. Also, note that IGNORE is accepted but ignored in\nALTER TABLE ... EXCHANGE PARTITION statements.\n \nThis statement can also be used to rename a table. For\ndetails see RENAME TABLE.\n \nWhen an index is created, the storage engine may use a\nconfigurable buffer in the process. Incrementing the buffer\nspeeds up the index creation. Aria and MyISAM allocate a\nbuffer whose size is defined by aria_sort_buffer_size or\nmyisam_sort_buffer_size, also used for REPAIR TABLE.\nInnoDB/XtraDB allocates three buffers whose size is defined\nby innodb_sort_buffer_size.\n \nPrivileges\n \nExecuting the ALTER TABLE statement generally requires at\nleast the ALTER privilege for the table or the database..\n \nIf you are renaming a table, then it also requires the DROP,\nCREATE and INSERT privileges for the table or the database\nas well.\n \nOnline DDL\n \nIn MariaDB 10.0 and later, online DDL is supported with the\nALGORITHM and LOCK clauses.\n \nSee InnoDB Online DDL Overview for more information on\nonline DDL with InnoDB.\n \nALTER ONLINE TABLE\n \nALTER ONLINE TABLE has also worked for partitioned tables\nsince MariaDB 10.0.11.\n \nOnline ALTER TABLE is available by executing the following:\n \nALTER ONLINE TABLE ...;\n \nThis statement has the following semantics:\n \nIn MariaDB 10.0.12 and later, this statement is equivalent\nto the following:\n \nALTER TABLE ... LOCK=NONE;\n \nSee the LOCK alter specification for more information.\n \nIn MariaDB 10.0.11, this statement is equivalent to the\nfollowing:\n \nALTER TABLE ... ALGORITHM=INPLACE;\n \nSee the ALGORITHM alter specification for more information.\n \nMariaDB until 10.0.10\n \nIn MariaDB 10.0.10 and before, this statement ensures that\nthe ALTER TABLE statement does not make a copy of the table.\n \nWAIT/NOWAIT\n \nSet the lock wait timeout. See WAIT and NOWAIT.\n \nColumn Definitions\n \nSee CREATE TABLE: Column Definitions for information about\ncolumn definitions.\n \nIndex Definitions\n \nSee CREATE TABLE: Index Definitions for information about\nindex definitions.\n \nThe CREATE INDEX and DROP INDEX statements can also be used\nto add or remove an index.\n \nCharacter Sets and Collations\n \nCONVERT TO CHARACTER SET charset_name [COLLATE\ncollation_name]\n[DEFAULT] CHARACTER SET [=] charset_name\n[DEFAULT] COLLATE [=] collation_name\nSee Setting Character Sets and Collations for details on\nsetting the character sets and collations.\n \nAlter Specifications\n \nTable Options\n \nSee CREATE TABLE: Table Options for information about table\noptions.\n \nADD COLUMN\n \n... ADD COLUMN [IF NOT EXISTS] (col_name\ncolumn_definition,...)\nAdds a column to the table. The syntax is the same as in\nCREATE TABLE.\nIf you are using IF NOT_EXISTS the column will not be added\nif it was not there already. This is very useful when doing\nscripts to modify tables.\n \nThe FIRST and AFTER clauses affect the physical order of\ncolumns in the datafile. Use FIRST to add a column in the\nfirst (leftmost) position, or AFTER followed by a column\nname to add the new column in any other position. Note that,\nnowadays, the physical position of a column is usually\nirrelevant.\n \nSee also Instant ADD COLUMN for InnoDB.\n \nDROP COLUMN\n \n... DROP COLUMN [IF EXISTS] col_name [CASCADE|RESTRICT]\nDrops the column from the table.\nIf you are using IF EXISTS you will not get an error if the\ncolumn didn\'t exist.\nIf the column is part of any index, the column will be\ndropped from them, except if you add a new column with\nidentical name at the same time. The index will be dropped\nif all columns from the index were dropped.\nIf the column was used in a view or trigger, you will get an\nerror next time the view or trigger is accessed.\n \nDropping a column that is part of a multi-column UNIQUE\nconstraint is not permitted. For example:\n \nCREATE TABLE a (\n a int,\n b int,\n primary key (a,b)\n);\n \nALTER TABLE x DROP COLUMN a;\n[42000][1072] Key column \'A\' doesn\'t exist in table\n \nThe reason is that dropping column a would result in the new\nconstraint that all values in column b be unique. In order\nto drop the column, an explicit DROP PRIMARY KEY and ADD\nPRIMARY KEY would be required. Up until MariaDB 10.2.7, the\ncolumn was dropped and the additional constraint applied,\nresulting in the following structure:\n \nALTER TABLE x DROP COLUMN a;\nQuery OK, 0 rows affected (0.46 sec)\n \nDESC x;\n+-------+---------+------+-----+---------+-------+\n| Field | Type | Null | Key | Default | Extra |\n+-------+---------+------+-----+---------+-------+\n| b | int(11) | NO | PRI | NULL | |\n+-------+---------+------+-----+---------+-------+\n \nMariaDB 10.4.0 supports instant DROP COLUMN. DROP COLUMN of\nan indexed column would imply DROP INDEX (and in the case of\na non-UNIQUE multi-column index, possibly ADD INDEX). These\nwill not be allowed with ALGORITHM=INSTANT, but unlike\nbefore, they can be allowed with ALGORITHM=NOCOPY\n \nRESTRICT and CASCADE are allowed to make porting from other\ndatabase systems easier. In MariaDB, they do nothing.\n \nMODIFY COLUMN\n \nAllows you to modify the type of a column. The column will\nbe at the same place as the original column and all indexes\non the column will be kept. Note that when modifying column,\nyou should specify all attributes for the new column.\n \nCREATE TABLE t1 (a INT UNSIGNED AUTO_INCREMENT, PRIMARY\nKEY((a));\nALTER TABLE t1 MODIFY a BIGINT UNSIGNED AUTO_INCREMENT;\n \nCHANGE COLUMN\n \nWorks like MODIFY COLUMN except that you can also change the\nname of the column. The column will be at the same place as\nthe original column and all index on the column will be\nkept.\n \nCREATE TABLE t1 (a INT UNSIGNED AUTO_INCREMENT, PRIMARY\nKEY(a));\nALTER TABLE t1 CHANGE a b BIGINT UNSIGNED AUTO_INCREMENT;\n \nALTER COLUMN\n \nThis lets you change column options.\n \nCREATE TABLE t1 (a INT UNSIGNED AUTO_INCREMENT, b\nvarchar(50), PRIMARY KEY(a));\nALTER TABLE t1 ALTER b SET DEFAULT \'hello\';\n \nADD PRIMARY KEY\n \nAdd a primary key.\n \nFor PRIMARY KEY indexes, you can specify a name for the\nindex, but it is silently ignored, and the name of the index\nis always PRIMARY.\n \nSee Getting Started with Indexes: Primary Key for more\ninformation.\n \nDROP PRIMARY KEY\n \nDrop a primary key.\n \nFor PRIMARY KEY indexes, you can specify a name for the\nindex, but it is silently ignored, and the name of the index\nis always PRIMARY.\n \nSee Getting Started with Indexes: Primary Key for more\ninformation.\n \nADD FOREIGN KEY\n \nAdd a foreign key.\n \nFor FOREIGN KEY indexes, a reference definition must be\nprovided.\n \nFor FOREIGN KEY indexes, you can specify a name for the\nconstraint, using the CONSTRAINT keyword. That name will be\nused in error messages.\n \nFirst, you have to specify the name of the target (parent)\ntable and a column or a column list which must be indexed\nand whose values must match to the foreign key\'s values.\nThe MATCH clause is accepted to improve the compatibility\nwith other DBMS\'s, but has no meaning in MariaDB. The ON\nDELETE and ON UPDATE clauses specify what must be done when\na DELETE (or a REPLACE) statements attempts to delete a\nreferenced row from the parent table, and when an UPDATE\nstatement attempts to modify the referenced foreign key\ncolumns in a parent table row, respectively. The following\noptions are allowed:\nRESTRICT: The delete/update operation is not performed. The\nstatement terminates with a 1451 error (SQLSTATE \'2300\').\nNO ACTION: Synonym for RESTRICT.\nCASCADE: The delete/update operation is performed in both\ntables.\nSET NULL: The update or delete goes ahead in the parent\ntable, and the corresponding foreign key fields in the child\ntable are set to NULL. (They must not be defined as NOT NULL\nfor this to succeed).\n \nMariaDB until 5.3\nSET DEFAULT: This option is currently implemented only for\nthe PBXT storage engine, which is disabled by default and no\nlonger maintained. It sets the child table\'s foreign key\nfields to their DEFAULT values when the referenced parent\ntable key entries are updated or deleted.\n \nIf either clause is omitted, the default behavior for the\nomitted clause is RESTRICT.\n \nSee Foreign Keys for more information.\n \nDROP FOREIGN KEY\n \nDrop a foreign key.\n \nSee Foreign Keys for more information.\n \nADD INDEX\n \nAdd a plain index.\n \nPlain indexes are regular indexes that are not unique, and\nare not acting as a primary key or a foreign key. They are\nalso not the \"specialized\" FULLTEXT or SPATIAL indexes.\n \nSee Getting Started with Indexes: Plain Indexes for more\ninformation.\n \nDROP INDEX\n \nDrop a plain index.\n \nPlain indexes are regular indexes that are not unique, and\nare not acting as a primary key or a foreign key. They are\nalso not the \"specialized\" FULLTEXT or SPATIAL indexes.\n \nSee Getting Started with Indexes: Plain Indexes for more\ninformation.\n \nADD UNIQUE INDEX\n \nAdd a unique index.\n \nThe UNIQUE keyword means that the index will not accept\nduplicated values, except for NULLs. An error will raise if\nyou try to insert duplicate values in a UNIQUE index.\n \nFor UNIQUE indexes, you can specify a name for the\nconstraint, using the CONSTRAINT keyword. That name will be\nused in error messages.\n \nSee Getting Started with Indexes: Unique Index for more\ninformation.\n \nDROP UNIQUE INDEX\n \nDrop a unique index.\n \nThe UNIQUE keyword means that the index will not accept\nduplicated values, except for NULLs. An error will raise if\nyou try to insert duplicate values in a UNIQUE index.\n \nFor UNIQUE indexes, you can specify a name for the\nconstraint, using the CONSTRAINT keyword. That name will be\nused in error messages.\n \nSee Getting Started with Indexes: Unique Index for more\ninformation.\n \nADD FULLTEXT INDEX\n \nAdd a FULLTEXT index.\n \nSee Full-Text Indexes for more information.\n \nDROP FULLTEXT INDEX\n \nDrop a FULLTEXT index.\n \nSee Full-Text Indexes for more information.\n \nADD SPATIAL INDEX\n \nAdd a SPATIAL index.\n \nSee SPATIAL INDEX for more information.\n \nDROP SPATIAL INDEX\n \nDrop a SPATIAL index.\n \nSee SPATIAL INDEX for more information.\n \nENABLE/ DISABLE KEYS\n \nDISABLE KEYS will disable all non unique keys for the table\nfor storage engines that support this (at least MyISAM and\nAria). This can be used to speed up inserts into empty\ntables.\n \nENABLE KEYS will enable all disabled keys.\n \nRENAME TO\n \nRenames the table. See also RENAME TABLE.\n \nADD CONSTRAINT\n \nModifies the table adding a constraint on a particular\ncolumn or columns.\n \nMariaDB 10.2.1 introduced new ways to define a constraint.\n \nNote: Before MariaDB 10.2.1, constraint expressions were\naccepted in syntax, but ignored.\n \nALTER TABLE table_name \nADD CONSTRAINT [constraint_name] CHECK(expression);\nBefore a row is inserted or updated, all constraints are\nevaluated in the order they are defined. If any constraint\nfails, then the row will not be updated. One can use most\ndeterministic functions in a constraint, including UDF\'s.\n \nCREATE TABLE account_ledger (\n id INT PRIMARY KEY AUTO_INCREMENT,\n transaction_name VARCHAR(100),\n credit_account VARCHAR(100),\n credit_amount INT,\n debit_account VARCHAR(100),\n debit_amount INT);\n \nALTER TABLE account_ledger \nADD CONSTRAINT is_balanced \n CHECK((debit_amount + credit_amount) = 0);\n \nThe constraint_name is optional. If you don\'t provide one\nin the ALTER TABLE statement, MariaDB auto-generates a name\nfor you. This is done so that you can remove it later using\nDROP CONSTRAINT clause.\n \nYou can disable all constraint expression checks by setting\nthe variable check_constraint_checks to OFF. You may find\nthis useful when loading a table that violates some\nconstraints that you want to later find and fix in SQL.\n \nTo view constraints on a table, query\ninformation_schema.TABLE_CONSTRAINTS:\n \nSELECT CONSTRAINT_NAME, TABLE_NAME, CONSTRAINT_TYPE \nFROM information_schema.TABLE_CONSTRAINTS\nWHERE TABLE_NAME = \'account_ledger\';\n \n+-----------------+----------------+-----------------+\n| CONSTRAINT_NAME | TABLE_NAME | CONSTRAINT_TYPE |\n+-----------------+----------------+-----------------+\n| is_balanced | account_ledger | CHECK |\n+-----------------+----------------+-----------------+\n \nDROP CONSTRAINT\n \nDROP CONSTRAINT for UNIQUE and FOREIGN KEY constraints was\nintroduced in MariaDB 10.2.22 and MariaDB 10.3.13.\n \nDROP CONSTRAINT for CHECK constraints was introduced in\nMariaDB 10.2.1\n \nModifies the table, removing the given constraint.\n \nALTER TABLE table_name\nDROP CONSTRAINT constraint_name;\n \nWhen you add a constraint to a table, whether through a\nCREATE TABLE or ALTER TABLE...ADD CONSTRAINT statement, you\ncan either set a constraint_name yourself, or allow MariaDB\nto auto-generate one for you. To view constraints on a\ntable, query information_schema.TABLE_CONSTRAINTS. For\ninstance,\n \nCREATE TABLE t (\n a INT,\n b INT,\n c INT,\n CONSTRAINT CHECK(a > b),\n CONSTRAINT check_equals CHECK(a = c)); \n \nSELECT CONSTRAINT_NAME, TABLE_NAME, CONSTRAINT_TYPE \nFROM information_schema.TABLE_CONSTRAINTS\nWHERE TABLE_NAME = \'t\';\n \n+-----------------+----------------+-----------------+\n| CONSTRAINT_NAME | TABLE_NAME | CONSTRAINT_TYPE |\n+-----------------+----------------+-----------------+\n| check_equals | t | CHECK |\n| CONSTRAINT_1 | t | CHECK |\n+-----------------+----------------+-----------------+\n \nTo remove a constraint from the table, issue an ALTER\nTABLE...DROP CONSTRAINT statement. For example,\n \nALTER TABLE t DROP CONSTRAINT is_unique;\n \nADD SYSTEM VERSIONING\n \nSystem-versioned tables was added in MariaDB 10.3.4.\n \nAdd system versioning.\n \nDROP SYSTEM VERSIONING\n \nSystem-versioned tables was added in MariaDB 10.3.4.\n \nDrop system versioning.\n \nADD PERIOD FOR SYSTEM_TIME\n \nSystem-versioned tables was added in MariaDB 10.3.4.\n \nFORCE\n \nALTER TABLE ... FORCE can force MariaDB to re-build the\ntable.\n \nIn MariaDB 5.5 and before, this could only be done by\nsetting the ENGINE table option to its old value. For\nexample, for an InnoDB table, one could execute the\nfollowing:\n \nALTER TABLE tab_name ENGINE = InnoDB;\n \nIn MariaDB 10.0 and later, the FORCE option can be used\ninstead. For example, :\n \nALTER TABLE tab_name FORCE;\n \nWith InnoDB, the table rebuild will only reclaim unused\nspace (i.e. the space previously used for deleted rows) if\nthe innodb_file_per_table system variable is set to ON. If\nthe system variable is OFF, then the space will not be\nreclaimed, but it will be-re-used for new data that\'s later\nadded.\n \nEXCHANGE PARTITION\n \nALTER TABLE ... EXCHANGE PARTITION was introduced in MariaDB\n10.0.4\n \nThis is used to exchange the tablespace files between a\npartition and another table.\n \nSee copying InnoDB\'s transportable tablespaces for more\ninformation.\n \nDISCARD TABLESPACE\n \nThis is used to discard an InnoDB table\'s tablespace.\n \nSee copying InnoDB\'s transportable tablespaces for more\ninformation.\n \nIMPORT TABLESPACE\n \nThis is used to import an InnoDB table\'s tablespace. The\ntablespace should have been copied from its original server\nafter executing FLUSH TABLES FOR EXPORT.\n \nSee copying InnoDB\'s transportable tablespaces for more\ninformation.\n \nALTER TABLE ... IMPORT only applies to InnoDB tables. Most\nother popular storage engines, such as Aria and MyISAM, will\nrecognize their data files as soon as they\'ve been placed\nin the proper directory under the datadir, and no special\nDDL is required to import them.\n \nALGORITHM\n \nIn MariaDB 5.5 and before, ALTER TABLE operations required\nmaking a temporary copy of the table, which can be slow for\nlarge tables.\n \nIn MariaDB 10.0 and later, the ALTER TABLE statement\nsupports the ALGORITHM clause. This clause is one of the\nclauses that is used to implement online DDL. ALTER TABLE\nsupports several different algorithms. An algorithm can be\nexplicitly chosen for an ALTER TABLE operation by setting\nthe ALGORITHM clause. The supported values are:\nALGORITHM=DEFAULT - This implies the default behavior for\nthe specific statement, such as if no ALGORITHM clause is\nspecified.\nALGORITHM=COPY\nALGORITHM=INPLACE\nALGORITHM=NOCOPY - This was added in MariaDB 10.3.7.\nALGORITHM=INSTANT - This was added in MariaDB 10.3.7.\n \nSee InnoDB Online DDL Overview: ALGORITHM for information on\nhow the ALGORITHM clause affects InnoDB.\n \nALGORITHM=DEFAULT\n \nThe default behavior, which occurs if ALGORITHM=DEFAULT is\nspecified, or if ALGORITHM is not specified at all, usually\nonly makes a copy if the operation doesn\'t support being\ndone in-place at all. In this case, the most efficient\navailable algorithm will usually be used.\n \nHowever, in MariaDB 10.3.6 and before, if the value of the\nold_alter_table system variable is set to ON, then the\ndefault behavior is to perform ALTER TABLE operations by\nmaking a copy of the table using the old algorithm.\n \nIn MariaDB 10.3.7 and later, the old_alter_table system\nvariable is deprecated. Instead, the alter_algorithm system\nvariable defines the default algorithm for ALTER TABLE\noperations.\n \nALGORITHM=COPY\n \nALGORITHM=COPY was introduced in MariaDB 10.0 as the name\nfor the original ALTER TABLE algorithm.\n \nWhen ALGORITHM=COPY is set, MariaDB essentially does the\nfollowing operations:\n \n-- Create a temporary table with the new definition\nCREATE TEMPORARY TABLE tmp_tab (\n...\n);\n \n-- Copy the data from the original table\nINSERT INTO tmp_tab\n SELECT * FROM original_tab;\n \n-- Drop the original table\nDROP TABLE original_tab;\n \n-- Rename the temporary table, so that it replaces the\noriginal one\nRENAME TABLE tmp_tab TO original_tab;\n \nThis algorithm is very inefficient, but it is generic, so it\nworks for all storage engines.\n \nIf ALGORITHM=COPY is specified, then the copy algorithm will\nbe used even if it is not necessary. This can result in a\nlengthy table copy. If multiple ALTER TABLE operations are\nrequired that each require the table to be rebuilt, then it\nis best to specify all operations in a single ALTER TABLE\nstatement, so that the table is only rebuilt once.\n \nALGORITHM=INPLACE\n \nALGORITHM=INPLACE was introduced in MariaDB 10.0.\n \nALGORITHM=COPY can be incredibly slow, because the whole\ntable has to be copied and rebuilt. ALGORITHM=INPLACE was\nintroduced as a way to avoid this by performing operations\nin-place and avoiding the table copy and rebuild, when\npossible.\n \nWhen ALGORITHM=INPLACE is set, the underlying storage engine\nuses optimizations to perform the operation while avoiding\nthe table copy and rebuild. However, INPLACE is a bit of a\nmisnomer, since some operations may still require the table\nto be rebuilt for some storage engines. Regardless, several\noperations can be performed without a full copy of the table\nfor some storage engines.\n \nA more accurate name would have been ALGORITHM=ENGINE, where\nENGINE refers to an \"engine-specific\" algorithm.\n \nIf an ALTER TABLE operation supports ALGORITHM=INPLACE, then\nit can be performed using optimizations by the underlying\nstorage engine, but it may rebuilt.\n \nSee InnoDB Online DDL Operations with ALGORITHM=INPLACE for\nmore.\n \nALGORITHM=NOCOPY\n \nALGORITHM=NOCOPY was introduced in MariaDB 10.3.7.\n \nALGORITHM=INPLACE can sometimes be surprisingly slow in\ninstances where it has to rebuild the clustered index,\nbecause when the clustered index has to be rebuilt, the\nwhole table has to be rebuilt. ALGORITHM=NOCOPY was\nintroduced as a way to avoid this. \n \nIf an ALTER TABLE operation supports ALGORITHM=NOCOPY, then\nit can be performed without rebuilding the clustered index.\n \nIf ALGORITHM=NOCOPY is specified for an ALTER TABLE\noperation that does not support ALGORITHM=NOCOPY, then an\nerror will be raised. In this case, raising an error is\npreferable, if the alternative is for the operation to\nrebuild the clustered index, and perform unexpectedly\nslowly.\n \nSee InnoDB Online DDL Operations with ALGORITHM=NOCOPY for\nmore.\n \nALGORITHM=INSTANT\n \nALGORITHM=INSTANT was introduced in MariaDB 10.3.7.\n \nALGORITHM=INPLACE can sometimes be surprisingly slow in\ninstances where it has to modify data files.\nALGORITHM=INSTANT was introduced as a way to avoid this.\n \nIf an ALTER TABLE operation supports ALGORITHM=INSTANT, then\nit can be performed without modifying any data files.\n \nIf ALGORITHM=INSTANT is specified for an ALTER TABLE\noperation that does not support ALGORITHM=INSTANT, then an\nerror will be raised. In this case, raising an error is\npreferable, if the alternative is for the operation to\nmodify data files, and perform unexpectedly slowly.\n \nSee InnoDB Online DDL Operations with ALGORITHM=INSTANT for\nmore.\n \nLOCK\n \nIn MariaDB 10.0 and later, the ALTER TABLE statement\nsupports the LOCK clause. This clause is one of the clauses\nthat is used to implement online DDL. ALTER TABLE supports\nseveral different locking strategies. A locking strategy can\nbe explicitly chosen for an ALTER TABLE operation by setting\nthe LOCK clause. The supported values are:\nDEFAULT: Acquire the least restrictive lock on the table\nthat is supported for the specific operation. Permit the\nmaximum amount of concurrency that is supported for the\nspecific operation.\nNONE: Acquire no lock on the table. Permit all concurrent\nDML. If this locking strategy is not permitted for an\noperation, then an error is raised.\nSHARED: Acquire a read lock on the table. Permit read-only\nconcurrent DML. If this locking strategy is not permitted\nfor an operation, then an error is raised.\nEXCLUSIVE: Acquire a write lock on the table. Do not permit\nconcurrent DML.\n \nDifferent storage engines support different locking\nstrategies for different operations. If a specific locking\nstrategy is chosen for an ALTER TABLE operation, and that\ntable\'s storage engine does not support that locking\nstrategy for that specific operation, then an error will be\nraised.\n \nIf the LOCK clause is not explicitly set, then the operation\nuses LOCK=DEFAULT.\n \nALTER ONLINE TABLE is equivalent to LOCK=NONE. Therefore,\nthe ALTER ONLINE TABLE statement can be used to ensure that\nyour ALTER TABLE operation allows all concurrent DML.\n \nSee InnoDB Online DDL Overview: LOCK for information on how\nthe LOCK clause affects InnoDB.\n \nProgress Reporting\n \nMariaDB provides progress reporting for ALTER TABLE\nstatement for clients\nthat support the new progress reporting protocol. For\nexample, if you were using the mysql client, then the\nprogress report might look like this::\n \nALTER TABLE test ENGINE=Aria;\nStage: 1 of 2 \'copy to tmp table\' 46% of stage\n \nThe progress report is also shown in the output of the SHOW\nPROCESSLIST statement and in the contents of the\ninformation_schema.PROCESSLIST table.\n \nSee Progress Reporting for more information.\n \nAborting ALTER TABLE Operations\n \nIf an ALTER TABLE operation is being performed and the\nconnection is killed, the changes will be rolled back in a\ncontrolled manner. The rollback can be a slow operation as\nthe time it takes is relative to how far the operation has\nprogressed.\n \nAborting ALTER TABLE ... ALGORITHM=COPY was made faster by\nremoving excessive undo logging (MDEV-11415). This\nsignificantly shortens the time it takes to abort a running\nALTER TABLE operation.\n \nExamples\n-------- \nAdding a new column:\n \nALTER TABLE t1 ADD x INT;\n \nDropping a column:\n \nALTER TABLE t1 DROP x;\n \nModifying the type of a column:\n \nALTER TABLE t1 MODIFY x bigint unsigned;\n \nChanging the name and type of a column:\n \nALTER TABLE t1 CHANGE a b bigint unsigned auto_increment;\n \nCombining multiple clauses in a single ALTER TABLE\nstatement, separated by commas:\n \nALTER TABLE t1 DROP x, ADD x2 INT, CHANGE y y2 INT;\n \nChanging the storage engine:\n \nALTER TABLE t1 ENGINE = InnoDB;\n \nRebuilding the table (the previous example will also rebuild\nthe table if it was already InnoDB):\n \nALTER TABLE t1 FORCE;\n \n\n\nURL: https://mariadb.com/kb/en/alter-table/','','https://mariadb.com/kb/en/alter-table/'),(653,'ALTER TABLESPACE',39,'The ALTER TABLESPACE statement is not supported by MariaDB.\nIt was originally inherited from MySQL NDB Cluster. In MySQL\n5.7 and later, the statement is also supported for InnoDB.\nHowever, MariaDB has chosen not to include that specific\nfeature. See MDEV-19294 for more information.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/alter-tablespace/','','https://mariadb.com/kb/en/alter-tablespace/'),(658,'CREATE FUNCTION',39,'Syntax\n------ \nCREATE [OR REPLACE]\n [DEFINER = {user | CURRENT_USER | role | CURRENT_ROLE }]\n [AGGREGATE] FUNCTION [IF NOT EXISTS] func_name\n([func_parameter[,...]])\n RETURNS type\n [characteristic ...]\n RETURN func_body\n \nfunc_parameter:\n param_name type\n \ntype:\n Any valid MariaDB data type\n \ncharacteristic:\n LANGUAGE SQL\n | [NOT] DETERMINISTIC\n | { CONTAINS SQL | NO SQL | READS SQL DATA | MODIFIES SQL\nDATA }\n | SQL SECURITY { DEFINER | INVOKER }\n | COMMENT \'string\'\n \nfunc_body:\n Valid SQL procedure statement\n \nDescription\n----------- \nUse the CREATE FUNCTION statement to create a new stored\nfunction. You must have\nthe CREATE ROUTINE database privilege to use CREATE\nFUNCTION.\nA function takes any number of arguments and returns a value\nfrom the function body. The\nfunction body can be any valid SQL expression as you would\nuse, for example, in any select\nexpression. If you have the appropriate privileges, you can\ncall the function exactly as you\nwould any built-in function. See Security below for details\non privileges.\n \nYou can also use a variant of the CREATE FUNCTION statement\nto install a user-defined\nfunction (UDF) defined by a plugin. See CREATE FUNCTION\n(UDF)\nfor details.\n \nYou can use a SELECT statement for the function body by\nenclosing it in\nparentheses, exactly as you would to use a subselect for any\nother expression. The SELECT\nstatement must return a single value. If more than one\ncolumn is returned when the function is called,\nerror 1241 results. If more than one row is returned when\nthe function is called, error 1242\nresults. Use a LIMIT clause to ensure only one row is\nreturned.\n \nYou can also replace the RETURN clause with a BEGIN...END\ncompound\nstatement. The compound statement must contain a RETURN\nstatement. When the function is\ncalled, the RETURN statement immediately returns its result,\nand any statements after RETURN\nare effectively ignored.\n \nBy default, a function is associated with the default\ndatabase. To associate the function explicitly\nwith a given database, specify the fully-qualified name as\ndb_name.func_name\nwhen you create it. If the function name is the same as the\nname of a built-in function, you must\nuse the fully qualified name when you call it.\n \nThe parameter list enclosed within parentheses must always\nbe present.\nIf there are no parameters, an empty parameter list of ()\nshould be\nused. Parameter names are not case sensitive.\n \nEach parameter can be declared to use any valid data type,\nexcept that\nthe COLLATE attribute cannot be used.\n \nFor valid identifiers to use as function names, see\nIdentifier Names.\n \nAGGREGATE\n \nFrom MariaDB 10.3.3, it is possible to create stored\naggregate functions as well. See Stored Aggregate Functions\nfor details.\n \nRETURNS\n \nThe RETURNS clause specifies the return type of the\nfunction. NULL values are permitted with all return types.\n \nWhat happens if the RETURN clause returns a value of a\ndifferent type? It depends on the SQL_MODE in effect at the\nmoment of the function creation.\n \nIf the SQL_MODE is strict (STRICT_ALL_TABLES or\nSTRICT_TRANS_TABLES flags are specified), a 1366 error will\nbe produced.\n \nOtherwise, the value is coerced to the proper type. For\nexample, if a function\nspecifies an ENUM or SET value in the RETURNS clause, but\nthe RETURN\nclause returns an integer, the value returned from the\nfunction is the string for the corresponding ENUM\nmember of set of SET members.\n \nMariaDB stores the SQL_MODE system variable setting that is\nin effect at the\ntime a routine is created, and always executes the routine\nwith this setting in\nforce, regardless of the server SQL mode in effect when the\nroutine is invoked.\n \nLANGUAGE SQL\n \nLANGUAGE SQL is a standard SQL clause, and it can be used in\nMariaDB for portability. However that clause has no meaning,\nbecause SQL is the only supported language for stored\nfunctions.\n \nA function is deterministic if it can produce only one\nresult for a given list of parameters. If the result may be\naffected by stored data, server variables, random numbers or\nany value that is not explicitly passed, then the function\nis not deterministic. Also, a function is non-deterministic\nif it uses non-deterministic functions like NOW() or\nCURRENT_TIMESTAMP(). The optimizer may choose a faster\nexecution plan if it known that the function is\ndeterministic. In such cases, you should declare the routine\nusing the DETERMINISTIC keyword. If you want to explicitly\nstate that the function is not deterministic (which is the\ndefault) you can use the NOT DETERMINISTIC keywords.\n \nIf you declare a non-deterministic function as\nDETERMINISTIC, you may get incorrect results. If you declare\na deterministic function as NOT DETERMINISTIC, in some cases\nthe queries will be slower.\n \nOR REPLACE\n \nIf the optional OR REPLACE clause is used, it acts as a\nshortcut for:\n \nDROP FUNCTION IF EXISTS function_name;\n \nCREATE FUNCTION function_name ...;\n \nwith the exception that any existing privileges for the\nfunction are not dropped.\n \nIF NOT EXISTS\n \nIf the IF NOT EXISTS clause is used, MariaDB will return a\nwarning instead of an error if the function already exists.\nCannot be used together with OR REPLACE.\n \n[NOT] DETERMINISTIC\n \nThe [NOT] DETERMINISTIC clause also affects binary logging,\nbecause the STATEMENT format can not be used to store or\nreplicate non-deterministic statements.\n \nCONTAINS SQL, NO SQL, READS SQL DATA, and MODIFIES SQL DATA\nare informative clauses that tell the server what the\nfunction does. MariaDB does not check in any way whether the\nspecified clause is correct. If none of these clauses are\nspecified, CONTAINS SQL is used by default.\n \nMODIFIES SQL DATA\n \nMODIFIES SQL DATA means that the function contains\nstatements that may modify data stored in databases. This\nhappens if the function contains statements like DELETE,\nUPDATE, INSERT, REPLACE or DDL.\n \nREADS SQL DATA\n \nREADS SQL DATA means that the function reads data stored in\ndatabases, but does not modify any data. This happens if\nSELECT statements are used, but there no write operations\nare executed.\n \nCONTAINS SQL\n \nCONTAINS SQL means that the function contains at least one\nSQL statement, but it does not read or write any data stored\nin a database. Examples include SET or DO.\n \nNO SQL\n \nNO SQL means nothing, because MariaDB does not currently\nsupport any language other than SQL.\n \nOracle Mode\n \nFrom MariaDB 10.3, a subset of Oracle\'s PL/SQL language has\nbeen supported in addition to the traditional SQL/PSM-based\nMariaDB syntax. See Oracle mode from MariaDB 10.3 for\ndetails on changes when running Oracle mode.\n \nSecurity\n \nYou must have the EXECUTE privilege on a function to call\nit.\nMariaDB automatically grants the EXECUTE and ALTER ROUTINE\nprivileges to the\naccount that called CREATE FUNCTION, even if the DEFINER\nclause was used.\n \nEach function has an account associated as the definer. By\ndefault, the definer is the account\nthat created the function. Use the DEFINER clause to specify\na different account as the\ndefiner. You must have the SUPER privilege to use the\nDEFINER\nclause. See Account Names for details on specifying\naccounts.\n \nThe SQL SECURITY clause specifies what privileges are used\nwhen a function is called.\nIf SQL SECURITY is INVOKER, the function body will be\nevaluated using the privileges\nof the user calling the function. If SQL SECURITY is\nDEFINER, the function body is\nalways evaluated using the privileges of the definer\naccount. DEFINER is the default.\n \nThis allows you to create functions that grant limited\naccess to certain data. For example, say\nyou have a table that stores some employee information, and\nthat you\'ve granted SELECT\nprivileges only on certain columns to the user account\nroger.\n \nCREATE TABLE employees (name TINYTEXT, dept TINYTEXT, salary\nINT);\nGRANT SELECT (name, dept) ON employees TO roger;\n \nTo allow the user the get the maximum salary for a\ndepartment, define a function and grant\nthe EXECUTE privilege:\n \nCREATE FUNCTION max_salary (dept TINYTEXT) RETURNS INT\nRETURN\n (SELECT MAX(salary) FROM employees WHERE employees.dept =\ndept);\nGRANT EXECUTE ON FUNCTION max_salary TO roger;\n \nSince SQL SECURITY defaults to DEFINER, whenever the user\nroger calls\nthis function, the subselect will execute with your\nprivileges. As long as you have privileges to\nselect the salary of each employee, the caller of the\nfunction will be able to get the maximum\nsalary for each department without being able to see\nindividual salaries.\n \nCharacter sets and collations\n \nFunction return types can be declared to use any valid\ncharacter set and collation. If used, the COLLATE attribute\nneeds to be preceded by a CHARACTER SET attribute.\n \nIf the character set and collation are not specifically set\nin the statement, the database defaults at the time of\ncreation will be used. If the database defaults change at a\nlater stage, the stored function character set/collation\nwill not be changed at the same time; the stored function\nneeds to be dropped and recreated to ensure the same\ncharacter set/collation as the database is used.\n \nExamples\n-------- \nThe following example function takes a parameter, performs\nan operation using\nan SQL function, and returns the result.\n \nCREATE FUNCTION hello (s CHAR(20))\n RETURNS CHAR(50) DETERMINISTIC\n RETURN CONCAT(\'Hello, \',s,\'!\');\n \nSELECT hello(\'world\');\n+----------------+\n| hello(\'world\') |\n+----------------+\n| Hello, world! |\n+----------------+\n \nYou can use a compound statement in a function to manipulate\ndata with statements\nlike INSERT and UPDATE. The following example creates a\ncounter function\nthat uses a temporary table to store the current value.\nBecause the compound statement\ncontains statements terminated with semicolons, you have to\nfirst change the statement\ndelimiter with the DELIMITER statement to allow the\nsemicolon to be used in the\nfunction body. See Delimiters in the mysql client for more.\n \nCREATE TEMPORARY TABLE counter (c INT);\nINSERT INTO counter VALUES (0);\nDELIMITER //\nCREATE FUNCTION counter () RETURNS INT\n BEGIN\n UPDATE counter SET c = c + 1;\n \n RETURN (SELECT c FROM counter LIMIT 1);\n END //\nDELIMITER ;\n \nCharacter set and collation:\n \nCREATE FUNCTION hello2 (s CHAR(20))\n RETURNS CHAR(50) CHARACTER SET \'utf8\' COLLATE\n\'utf8_bin\' DETERMINISTIC\n RETURN CONCAT(\'Hello, \',s,\'!\');\n \n\n\nURL: https://mariadb.com/kb/en/create-function/','','https://mariadb.com/kb/en/create-function/'),(662,'CREATE PROCEDURE',39,'Syntax\n------ \nCREATE\n [OR REPLACE]\n [DEFINER = { user | CURRENT_USER | role | CURRENT_ROLE }]\n PROCEDURE sp_name ([proc_parameter[,...]])\n [characteristic ...] routine_body\n \nproc_parameter:\n [ IN | OUT | INOUT ] param_name type\n \ntype:\n Any valid MariaDB data type\n \ncharacteristic:\n LANGUAGE SQL\n | [NOT] DETERMINISTIC\n | { CONTAINS SQL | NO SQL | READS SQL DATA | MODIFIES SQL\nDATA }\n | SQL SECURITY { DEFINER | INVOKER }\n | COMMENT \'string\'\n \nroutine_body:\n Valid SQL procedure statement\n \nDescription\n----------- \nCreates a stored procedure. By default, a routine is\nassociated with the default database. To associate the\nroutine\nexplicitly with a given database, specify the name as\ndb_name.sp_name\nwhen you create it.\n \nWhen the routine is invoked, an implicit USE db_name is\nperformed (and\nundone when the routine terminates). The causes the routine\nto have\nthe given default database while it executes. USE statements\nwithin\nstored routines are disallowed.\n \nWhen a stored procedure has been created, you invoke it by\nusing the CALL statement (see CALL).\n \nTo execute the CREATE PROCEDURE statement, it is\nnecessary to have the CREATE ROUTINE privilege. By default,\nMariaDB\nautomatically grants the ALTER ROUTINE and EXECUTE\nprivileges to the\nroutine creator. See also Stored Routine Privileges.\n \nThe DEFINER and SQL SECURITY clauses specify the security\ncontext to\nbe used when checking access privileges at routine execution\ntime, as\ndescribed later.\n \nIf the routine name is the same as the name of a built-in\nSQL\nfunction, you must use a space between the name and the\nfollowing\nparenthesis when defining the routine, or a syntax error\noccurs. This\nis also true when you invoke the routine later. For this\nreason, we\nsuggest that it is better to avoid re-using the names of\nexisting SQL\nfunctions for your own stored routines.\n \nThe IGNORE_SPACE SQL mode applies to built-in functions, not\nto stored\nroutines. It is always allowable to have spaces after a\nroutine name,\nregardless of whether IGNORE_SPACE is enabled.\n \nThe parameter list enclosed within parentheses must always\nbe present.\nIf there are no parameters, an empty parameter list of ()\nshould be\nused. Parameter names are not case sensitive.\n \nEach parameter can be declared to use any valid data type,\nexcept that\nthe COLLATE attribute cannot be used.\n \nFor valid identifiers to use as procedure names, see\nIdentifier Names.\n \nIN/OUT/INOUT\n \nEach parameter is an IN parameter by default. To specify\notherwise for\na parameter, use the keyword OUT or INOUT before the\nparameter name.\n \nAn IN parameter passes a value into a procedure. The\nprocedure might\nmodify the value, but the modification is not visible to the\ncaller\nwhen the procedure returns. An OUT parameter passes a value\nfrom the\nprocedure back to the caller. Its initial value is NULL\nwithin the\nprocedure, and its value is visible to the caller when the\nprocedure\nreturns. An INOUT parameter is initialized by the caller,\ncan be\nmodified by the procedure, and any change made by the\nprocedure is\nvisible to the caller when the procedure returns.\n \nFor each OUT or INOUT parameter, pass a user-defined\nvariable in the\nCALL statement that invokes the procedure so that you can\nobtain its\nvalue when the procedure returns. If you are calling the\nprocedure\nfrom within another stored procedure or function, you can\nalso pass a\nroutine parameter or local routine variable as an IN or\nINOUT\nparameter.\n \nDETERMINISTIC/NOT DETERMINISTIC\n \nDETERMINISTIC and NOT DETERMINISTIC apply only to functions.\nSpecifying DETERMINISTC or NON-DETERMINISTIC in procedures\nhas no effect. The default value is NOT DETERMINISTIC.\nFunctions are DETERMINISTIC when they always return the same\nvalue for the same input. For example, a truncate or\nsubstring function. Any function involving data, therefore,\nis always NOT DETERMINISTIC.\n \nCONTAINS SQL/NO SQL/READS SQL DATA/MODIFIES SQL DATA\n \nCONTAINS SQL, NO SQL, READS SQL DATA, and MODIFIES SQL DATA\nare informative clauses that tell the server what the\nfunction does. MariaDB does not check in any way whether the\nspecified clause is correct. If none of these clauses are\nspecified, CONTAINS SQL is used by default.\n \nMODIFIES SQL DATA means that the function contains\nstatements that may modify data stored in databases. This\nhappens if the function contains statements like DELETE,\nUPDATE, INSERT, REPLACE or DDL.\n \nREADS SQL DATA means that the function reads data stored in\ndatabases, but does not modify any data. This happens if\nSELECT statements are used, but there no write operations\nare executed.\n \nCONTAINS SQL means that the function contains at least one\nSQL statement, but it does not read or write any data stored\nin a database. Examples include SET or DO.\n \nNO SQL means nothing, because MariaDB does not currently\nsupport any language other than SQL.\n \nThe routine_body consists of a valid SQL procedure\nstatement. This can\nbe a simple statement such as SELECT or INSERT, or it can be\na\ncompound statement written using BEGIN and END. Compound\nstatements\ncan contain declarations, loops, and other control structure\nstatements. See Programmatic and Compound Statements for\nsyntax details.\n \nMariaDB allows routines to contain DDL statements, such as\nCREATE and\nDROP. MariaDB also allows stored procedures (but not stored\nfunctions)\nto contain SQL transaction statements such as COMMIT.\n \nFor additional information about statements that are not\nallowed in\nstored routines, see Stored Routine Limitations.\n \nInvoking stored procedure from within programs\n \nFor information about invoking stored procedures from within\nprograms written in a language that has a MariaDB/MySQL\ninterface, see CALL.\n \nOR REPLACE\n \nIf the optional OR REPLACE clause is used, it acts as a\nshortcut for:\n \nDROP PROCEDURE IF EXISTS name;\n \nCREATE PROCEDURE name ...;\n \nwith the exception that any existing privileges for the\nprocedure are not dropped.\n \nsql_mode\n \nMariaDB stores the sql_mode system variable setting that is\nin effect at the time a routine is created, and always\nexecutes the routine with this setting in force, regardless\nof the server SQL mode in effect when the routine is\ninvoked.\n \nCharacter Sets and Collations\n \nProcedure parameters can be declared with any character\nset/collation. If the character set and collation are not\nspecifically set, the database defaults at the time of\ncreation will be used. If the database defaults change at a\nlater stage, the stored procedure character set/collation\nwill not be changed at the same time; the stored procedure\nneeds to be dropped and recreated to ensure the same\ncharacter set/collation as the database is used.\n \nOracle Mode\n \nFrom MariaDB 10.3, a subset of Oracle\'s PL/SQL language has\nbeen supported in addition to the traditional SQL/PSM-based\nMariaDB syntax. See Oracle mode from MariaDB 10.3 for\ndetails on changes when running Oracle mode.\n \nExamples\n-------- \nThe following example shows a simple stored procedure that\nuses an OUT\nparameter. It uses the DELIMITER command to set a new\ndelimiter for the duration of the process — see Delimiters\nin the mysql client.\n \nDELIMITER //\n \nCREATE PROCEDURE simpleproc (OUT param1 INT)\n BEGIN\n SELECT COUNT(*) INTO param1 FROM t;\n END;\n//\n \nDELIMITER ;\n \nCALL simpleproc(@a);\n \nSELECT @a;\n+------+\n| @a |\n+------+\n| 1 |\n+------+\n \nCharacter set and collation:\n \nDELIMITER //\n \nCREATE PROCEDURE simpleproc2 (\n OUT param1 CHAR(10) CHARACTER SET \'utf8\' COLLATE\n\'utf8_bin\'\n)\n BEGIN\n SELECT CONCAT(\'a\'),f1 INTO param1 FROM t;\n END;\n//\n \nDELIMITER ;\n \nCREATE OR REPLACE:\n \nDELIMITER //\n \nCREATE PROCEDURE simpleproc2 (\n OUT param1 CHAR(10) CHARACTER SET \'utf8\' COLLATE\n\'utf8_bin\'\n)\n BEGIN\n SELECT CONCAT(\'a\'),f1 INTO param1 FROM t;\n \n END;\n \n//\nERROR 1304 (42000): PROCEDURE simpleproc2 already exists\n \nDELIMITER ;\n \nDELIMITER //\n \nCREATE OR REPLACE PROCEDURE simpleproc2 (\n OUT param1 CHAR(10) CHARACTER SET \'utf8\' COLLATE\n\'utf8_bin\'\n)\n BEGIN\n SELECT CONCAT(\'a\'),f1 INTO param1 FROM t;\n \n END;\n \n//\nERROR 1304 (42000): PROCEDURE simpleproc2 already exists\n \nDELIMITER ;\n \nQuery OK, 0 rows affected (0.03 sec)\n \n\n\nURL: https://mariadb.com/kb/en/create-procedure/','','https://mariadb.com/kb/en/create-procedure/'),(665,'CREATE TABLE',39,'Syntax\n------ \nCREATE [OR REPLACE] [TEMPORARY] TABLE [IF NOT EXISTS]\ntbl_name\n (create_definition,...) [table_options ]...\n[partition_options]\nCREATE [OR REPLACE] [TEMPORARY] TABLE [IF NOT EXISTS]\ntbl_name\n [(create_definition,...)] [table_options ]...\n[partition_options]\n select_statement\nCREATE [OR REPLACE] [TEMPORARY] TABLE [IF NOT EXISTS]\ntbl_name\n { LIKE old_table_name | (LIKE old_table_name) }\n \nselect_statement:\n [IGNORE | REPLACE] [AS] SELECT ... (Some legal select\nstatement)\n \nDescription\n----------- \nUse the CREATE TABLE statement to create a table with the\ngiven name.\n \nIn its most basic form, the CREATE TABLE statement provides\na table name\nfollowed by a list of columns, indexes, and constraints. By\ndefault, the table\nis created in the default database. Specify a database with\ndb_name.tbl_name.\nIf you quote the table name, you must quote the database\nname and table name\nseparately as `db_name`.`tbl_name`. This is particularly\nuseful for CREATE TABLE ... SELECT, because it allows to\ncreate a table into a database, which contains data from\nother databases. See Identifier Qualifiers.\n \nIf a table with the same name exists, error 1050 results.\nUse IF NOT EXISTS\nto suppress this error and issue a note instead. Use SHOW\nWARNINGS\nto see notes.\n \nThe CREATE TABLE statement automatically commits the current\ntransaction,\nexcept when using the TEMPORARY keyword.\n \nFor valid identifiers to use as table names, see Identifier\nNames.\n \nNote: if the default_storage_engine is set to ColumnStore\nthen it needs setting on all UMs. Otherwise when the tables\nusing the default engine are replicated across UMs they will\nuse the wrong engine. You should therefore not use this\noption as a session variable with ColumnStore.\n \nMicrosecond precision can be between 0-6. If no precision is\nspecified it is assumed to be 0, for backward compatibility\nreasons.\n \nPrivileges\n \nExecuting the CREATE TABLE statement requires the CREATE\nprivilege for the table or the database.\n \nCREATE OR REPLACE TABLE ...\n \nThe OR REPLACE clause was added in MariaDB 10.0.8.\n \nIf the OR REPLACE clause is used and if the table already\nexists, then instead of returning an error, the server will\ndrop the existing table and replace it with the newly\ndefined table.\n \nThis syntax was originally added to make replication more\nrobust if it has to rollback and repeat statements such as\nCREATE ... SELECT on slaves.\n \nCREATE OR REPLACE TABLE table_name (a int);\n \nis basically the same as:\n \nDROP TABLE IF EXISTS table_name;\nCREATE TABLE table_name (a int);\n \nwith the following exceptions:\nIf table_name was locked with LOCK TABLES it will continue\nto be locked after the statement.\nTemporary tables are only dropped if the TEMPORARY keyword\nwas used. (With DROP TABLE, temporary tables are preferred\nto be dropped before normal tables).\n \nThings to be Aware of With CREATE OR REPLACE\n \nThe table is dropped first (if it existed), after that the\nCREATE is done. Because of this, if the CREATE fails, then\nthe table will not exist anymore after the statement. If the\ntable was used with LOCK TABLES it will be unlocked.\nOne can\'t use OR REPLACE together with IF EXISTS.\nSlaves in replication will by default use CREATE OR REPLACE\nwhen replicating CREATE statements that don\'\'t use IF\nEXISTS. This can be changed by setting the variable\nslave-ddl-exec-mode to STRICT.\n \nCREATE TABLE IF NOT EXISTS ...\n \nIf the IF NOT EXISTS clause is used, then the index will\nonly be created if an index with the same name does not\nalready exist. If the index already exists, then a warning\nwill be triggered by default.\n \nCREATE TEMPORARY TABLE ...\n \nUse the TEMPORARY keyword to create a temporary table that\nis only available to your current session. Temporary tables\nare dropped when the your session ends. Temporary table\nnames are specific to your session. They will not conflict\nwith other temporary tables from other session even if they\nshare the same name. They will shadow names of non-temporary\ntables or views, if they are identical. A temporary table\ncan have the same name as a non-temporary table which is\nlocated in the same database. In that case, their name will\nreference the temporary table when used in SQL statements.\nYou must have the CREATE TEMPORARY TABLES privilege on the\ndatabase to create temporary tables. If no storage engine is\nspecified, the default_tmp_storage_engine setting will\ndetermine the engine.\n \nCREATE TABLE ... LIKE\n \nUse the LIKE clause instead of a full table definition to\ncreate a table with the same definition as another table,\nincluding columns, indexes, and table options. Foreign key\ndefinitions, as well as any DATA DIRECTORY or INDEX\nDIRECTORY table options specified on the original table,\nwill not be created.\n \nCREATE TABLE ... SELECT\n \nYou can create a table containing data from other tables\nusing the CREATE ... SELECT statement. Columns will be\ncreated in the table for each field returned by the SELECT\nquery.\n \nYou can also define some columns normally and add other\ncolumns from a SELECT. You can also create columns in the\nnormal way and assign them some values using the query, this\nis done to force a certain type or other field\ncharacteristics. The columns that are not named in the query\nwill be placed before the others. For example:\n \nCREATE TABLE test (a INT NOT NULL, b CHAR(10)) ENGINE=MyISAM\n SELECT 5 AS b, c, d FROM another_table;\n \nRemember that the query just returns data. If you want to\nuse the same indexes, or the same columns attributes ([NOT]\nNULL, DEFAULT, AUTO_INCREMENT) in the new table, you need to\nspecify them manually. Types and sizes are not automatically\npreserved if no data returned by the SELECT requires the\nfull size, and VARCHAR could be converted into CHAR. The\nCAST() function can be used to forcee the new table to use\ncertain types.\n \nAliases (AS) are taken into account, and they should always\nbe used when you SELECT an expression (function,\narithmetical operation, etc).\n \nIf an error occurs during the query, the table will not be\ncreated at all.\n \nIf the new table has a primary key or UNIQUE indexes, you\ncan use the IGNORE or REPLACE keywords to handle duplicate\nkey errors during the query. IGNORE means that the newer\nvalues must not be inserted an identical value exists in the\nindex. REPLACE means that older values must be overwritten.\n \nIf the columns in the new table are more than the rows\nreturned by the query, the columns populated by the query\nwill be placed after other columns. Note that if the strict\nSQL_MODE is on, and the columns that are not names in the\nquery do not have a DEFAULT value, an error will raise and\nno rows will be copied.\n \nConcurrent inserts are not used during the execution of a\nCREATE ... SELECT.\n \nIf the table already exists, an error similar to the\nfollowing will be returned:\n \nERROR 1050 (42S01): Table \'t\' already exists\n \nIf the IF NOT EXISTS clause is used and the table exists, a\nnote will be produced instead of an error.\n \nTo insert rows from a query into an existing table, INSERT\n... SELECT can be used.\n \nColumn Definitions\n \ncreate_definition:\n { col_name column_definition | index_definition |\nperiod_definition | CHECK (expr) }\n \ncolumn_definition:\n data_type\n [NOT NULL | NULL] [DEFAULT default_value | (expression)]\n [AUTO_INCREMENT] [ZEROFILL] [UNIQUE [KEY] | [PRIMARY] KEY]\n [INVISIBLE] [{WITH|WITHOUT} SYSTEM VERSIONING]\n [COMMENT \'string\']\n [COLUMN_FORMAT {FIXED|DYNAMIC|DEFAULT}]\n [reference_definition]\n | data_type [GENERATED ALWAYS] \n AS { { ROW {START|END} } | { (expression) [VIRTUAL |\nPERSISTENT | STORED] } }\n [UNIQUE [KEY]] [COMMENT \'string\']\n \nconstraint_definition:\n CONSTRAINT [constraint_name] CHECK (expression)\nNote: MariaDB accepts the REFERENCES clause in ALTER TABLE\nand CREATE TABLE column definitions, but that syntax does\nnothing. MariaDB simply parses it without returning any\nerror or warning, for compatibility with other DBMS\'s.\nBefore MariaDB 10.2.1 this was also true for CHECK\nconstraints. Only the syntax for indexes described below\ncreates foreign keys.\n \nEach definition either creates a column in the table or\nspecifies and index or\nconstraint on one or more columns. See Indexes below for\ndetails\non creating indexes.\n \nCreate a column by specifying a column name and a data type,\noptionally\nfollowed by column options. See Data Types for a full list\nof data types allowed in MariaDB.\n \nNULL and NOT NULL\n \nUse the NULL or NOT NULL options to specify that values in\nthe column\nmay or may not be NULL, respectively. By default, values may\nbe NULL. See also NULL Values in MariaDB.\n \nDEFAULT Column Option\n \nThe DEFAULT clause was enhanced in MariaDB 10.2.1. Some\nenhancements include\nBLOB and TEXT columns now support DEFAULT.\nThe DEFAULT clause can now be used with an expression or\nfunction.\n \nSpecify a default value using the DEFAULT clause. If you\ndon\'t specify DEFAULT then the following rules apply:\nIf the column is not defined with NOT NULL, AUTO_INCREMENT\nor TIMESTAMP, an explicit DEFAULT NULL will be added.\nNote that in MySQL and in MariaDB before 10.1.6, you may get\nan explicit DEFAULT for primary key parts, if not specified\nwith NOT NULL.\n \nThe default value will be used if you INSERT a row without\nspecifying a value for that column, or if you specify\nDEFAULT for that column.\nBefore MariaDB 10.2.1 you couldn\'t usually provide an\nexpression or function to evaluate at\ninsertion time. You had to provide a constant default value\ninstead. The one\nexception is that you may use CURRENT_TIMESTAMP as\nthe default value for a TIMESTAMP column to use the current\ntimestamp at insertion time.\n \nCURRENT_TIMESTAMP may also be used as\nthe default value for a DATETIME\n \nFrom MariaDB 10.2.1 you can use most functions in DEFAULT.\nExpressions should have parentheses around them. If you use\na non deterministic function in DEFAULT then all inserts to\nthe table will be replicated in row mode. You can even refer\nto earlier columns in the DEFAULT expression:\n \nCREATE TABLE t1 (a int DEFAULT (1+1), b int DEFAULT (a+1));\nCREATE TABLE t2 (a bigint primary key DEFAULT UUID_SHORT());\n \nThe DEFAULT clause cannot contain any stored functions or\nsubqueries, and a column used in the clause must already\nhave been defined earlier in the statement.\n \nSince MariaDB 10.2.1, it is possible to assign BLOB or TEXT\ncolumns a DEFAULT value. In earlier versions, assigning a\ndefault to these columns was not possible.\n \nStarting from 10.3.3 you can also use DEFAULT (NEXT VALUE\nFOR sequence)\n \nAUTO_INCREMENT Column Option\n \nUse AUTO_INCREMENT to create a column whose value can\ncan be set automatically from a simple counter. You can only\nuse AUTO_INCREMENT\non a column with an integer type. The column must be a key,\nand there can only be\none AUTO_INCREMENT column in a table. If you insert a row\nwithout specifying\na value for that column (or if you specify 0, NULL, or\nDEFAULT\nas the value), the actual value will be taken from the\ncounter, with each insertion\nincrementing the counter by one. You can still insert a\nvalue explicitly. If you\ninsert a value that is greater than the current counter\nvalue, the counter is\nset based on the new value. An AUTO_INCREMENT column is\nimplicitly NOT NULL.\nUse LAST_INSERT_ID to get the AUTO_INCREMENT value\nmost recently used by an INSERT statement.\n \nZEROFILL Column Option\n \nIf the ZEROFILL column option is specified for a column\nusing a numeric data type, then the column will be set to\nUNSIGNED and the spaces used by default to pad the field are\nreplaced with zeros. ZEROFILL is ignored in expressions or\nas part of a UNION. ZEROFILL is a non-standard MySQL and\nMariaDB enhancement.\n \nPRIMARY KEY Column Option\n \nUse PRIMARY KEY (or just KEY) to make a column a primary\nkey. A primary key is a special type of a unique key. There\ncan be at most one primary key per table, and it is\nimplicitly NOT NULL.\n \nSpecifying a column as a unique key creates a unique index\non that column. See the Index Definitions section below for\nmore information.\n \nUNIQUE KEY Column Option\n \nUse UNIQUE KEY (or just UNIQUE) to specify that all values\nin the column\nmust be distinct from each other. Unless the column is NOT\nNULL, there may be\nmultiple rows with NULL in the column. \n \nSpecifying a column as a unique key creates a unique index\non that column. See the Index Definitions section below for\nmore information.\n \nCOMMENT Column Option\n \nYou can provide a comment for each column using the COMMENT\nclause. The maximum length is 1024 characters (it was 255\ncharacters before MariaDB 5.5). Use\nthe SHOW FULL COLUMNS statement to see column comments.\n \nGenerated Columns\n \nA generated column is a column in a table that cannot\nexplicitly be set to a specific value in a DML query.\nInstead, its value is automatically generated based on an\nexpression. This expression might generate the value based\non the values of other columns in the table, or it might\ngenerate the value by calling built-in functions or\nuser-defined functions (UDFs).\n \nThere are two types of generated columns:\nPERSISTENT or STORED: This type\'s value is actually stored\nin the table.\nVIRTUAL: This type\'s value is not stored at all. Instead,\nthe value is generated dynamically when the table is\nqueried. This type is the default.\n \nGenerated columns are also sometimes called computed columns\nor virtual columns.\n \nFor a complete description about generated columns and their\nlimitations, see Generated (Virtual and Persistent/Stored)\nColumns.\n \nCOLUMN_FORMAT\n \nCOLUMN_FORMAT is only used by MySQL Cluster, and is silently\nignored in MariaDB.\n \nCOMPRESSED\n \nCertain columns may be compressed. See Storage-Engine\nIndependent Column Compression.\n \nINVISIBLE\n \nColumns may be made invisible, and hidden in certain\ncontexts. See Invisible Columns.\n \nWITH SYSTEM VERSIONING Column Option\n \nColumns may be explicitly marked as included from system\nversioning. See System-versioned tables for details.\n \nWITHOUT SYSTEM VERSIONING Column Option\n \nColumns may be explicitly marked as excluded from system\nversioning. See System-versioned tables for details.\n \nIndex Definitions\n \nindex_definition:\n {INDEX|KEY} [index_name] [index_type] (index_col_name,...)\n[index_option] ...\n | {FULLTEXT|SPATIAL} [INDEX|KEY] [index_name]\n(index_col_name,...) [index_option] ...\n | [CONSTRAINT [symbol]] PRIMARY KEY [index_type]\n(index_col_name,...) [index_option] ...\n | [CONSTRAINT [symbol]] UNIQUE [INDEX|KEY] [index_name]\n[index_type] (index_col_name,...) [index_option] ...\n | [CONSTRAINT [symbol]] FOREIGN KEY [index_name]\n(index_col_name,...) reference_definition\n \nindex_col_name:\n col_name [(length)] [ASC | DESC]\n \nindex_type:\n USING {BTREE | HASH | RTREE}\n \nindex_option:\n KEY_BLOCK_SIZE [=] value\n | index_type\n | WITH PARSER parser_name\n | COMMENT \'string\'\n | CLUSTERING={YES| NO}\n \nreference_definition:\n REFERENCES tbl_name (index_col_name,...)\n [MATCH FULL | MATCH PARTIAL | MATCH SIMPLE]\n [ON DELETE reference_option]\n [ON UPDATE reference_option]\n \nreference_option:\n RESTRICT | CASCADE | SET NULL | NO ACTION\nINDEX and KEY are synonyms. \n \nIndex names are optional, if not specified an automatic name\nwill be assigned. Index name are needed to drop indexes and\nappear in error messages when a constraint is violated.\n \nIndex Categories\n \nPlain Indexes\n \nPlain indexes are regular indexes that are not unique, and\nare not acting as a primary key or a foreign key. They are\nalso not the \"specialized\" FULLTEXT or SPATIAL indexes.\n \nSee Getting Started with Indexes: Plain Indexes for more\ninformation.\n \nPRIMARY KEY\n \nFor PRIMARY KEY indexes, you can specify a name for the\nindex, but it is silently ignored, and the name of the index\nis always PRIMARY.\n \nSee Getting Started with Indexes: Primary Key for more\ninformation.\n \nUNIQUE\n \nThe UNIQUE keyword means that the index will not accept\nduplicated values, except for NULLs. An error will raise if\nyou try to insert duplicate values in a UNIQUE index.\n \nFor UNIQUE indexes, you can specify a name for the\nconstraint, using the CONSTRAINT keyword. That name will be\nused in error messages.\n \nSee Getting Started with Indexes: Unique Index for more\ninformation.\n \nFOREIGN KEY\n \nFor FOREIGN KEY indexes, a reference definition must be\nprovided.\n \nFor FOREIGN KEY indexes, you can specify a name for the\nconstraint, using the CONSTRAINT keyword. That name will be\nused in error messages.\n \nFirst, you have to specify the name of the target (parent)\ntable and a column or a column list which must be indexed\nand whose values must match to the foreign key\'s values.\nThe MATCH clause is accepted to improve the compatibility\nwith other DBMS\'s, but has no meaning in MariaDB. The ON\nDELETE and ON UPDATE clauses specify what must be done when\na DELETE (or a REPLACE) statements attempts to delete a\nreferenced row from the parent table, and when an UPDATE\nstatement attempts to modify the referenced foreign key\ncolumns in a parent table row, respectively. The following\noptions are allowed:\nRESTRICT: The delete/update operation is not performed. The\nstatement terminates with a 1451 error (SQLSTATE \'2300\').\nNO ACTION: Synonym for RESTRICT.\nCASCADE: The delete/update operation is performed in both\ntables.\nSET NULL: The update or delete goes ahead in the parent\ntable, and the corresponding foreign key fields in the child\ntable are set to NULL. (They must not be defined as NOT NULL\nfor this to succeed).\nSET DEFAULT: This option is currently implemented only for\nthe PBXT storage engine, which is disabled by default and no\nlonger maintained. It sets the child table\'s foreign key\nfields to their DEFAULT values when the referenced parent\ntable key entries are updated or deleted.\n \nIf either clause is omitted, the default behavior for the\nomitted clause is RESTRICT.\n \nSee Foreign Keys for more information.\n \nFULLTEXT\n \nUse the FULLTEXT keyword to create full-text indexes.\n \nSee Full-Text Indexes for more information.\n \nSPATIAL\n \nUse the SPATIAL keyword to create geometric indexes.\n \nSee SPATIAL INDEX for more information.\n \nIndex Options\n \nKEY_BLOCK_SIZE Index Option\n \nThe KEY_BLOCK_SIZE index option is similar to the\nKEY_BLOCK_SIZE table option.\n \nWith the InnoDB storage engine, if you specify a non-zero\nvalue for the KEY_BLOCK_SIZE table option for the whole\ntable, then the table will implicitly be created with the\nROW_FORMAT table option set to COMPRESSED. However, this\ndoes not happen if you just set the KEY_BLOCK_SIZE index\noption for one or more indexes in the table. The InnoDB\nstorage engine ignores the KEY_BLOCK_SIZE index option.\nHowever, the SHOW CREATE TABLE statement may still report it\nfor the index.\n \nFor information about the KEY_BLOCK_SIZE index option, see\nthe KEY_BLOCK_SIZE table option below.\n \nIndex Types\n \nEach storage engine supports some or all index types. See\nStorage Engine Index Types for details on permitted index\ntypes for each storage engine.\n \nDifferent index types are optimized for different kind of\noperations:\nBTREE is the default type, and normally is the best choice.\nIt is supported by all storage engines. It can be used to\ncompare a column\'s value with a value using the =, >, >=,\n0) ,b int check (b> 0), constraint abc check (a>b));\n \nIf you use the second format and you don\'t give a name to\nthe constraint, then the constraint will get a auto\ngenerated name. This is done so that you can later delete\nthe constraint with ALTER TABLE DROP constraint_name.\n \nOne can disable all constraint expression checks by setting\nthe variable check_constraint_checks to OFF. This is useful\nfor example when loading a table that violates some\nconstraints that you want to later find and fix in SQL.\n \nSee CONSTRAINT for more information.\n \nTable Options\n \nFor each individual table you create (or alter), you can set\nsome table options. The general syntax for setting options\nis:\n \n = , [ = ...]\n \nThe equal sign is optional.\n \nSome options are supported by the server and can be used for\nall tables, no matter what storage engine they use; other\noptions can be specified for all storage engines, but have a\nmeaning only for some engines. Also, engines can extend\nCREATE TABLE with new options.\n \nIf the IGNORE_BAD_TABLE_OPTIONS SQL_MODE is enabled, wrong\ntable options generate a warning; otherwise, they generate\nan error.\n \ntable_option: \n [STORAGE] ENGINE [=] engine_name\n | AUTO_INCREMENT [=] value\n | AVG_ROW_LENGTH [=] value\n | [DEFAULT] CHARACTER SET [=] charset_name\n | CHECKSUM [=] {0 | 1}\n | [DEFAULT] COLLATE [=] collation_name\n | COMMENT [=] \'string\'\n | CONNECTION [=] \'connect_string\'\n | DATA DIRECTORY [=] \'absolute path to directory\'\n | DELAY_KEY_WRITE [=] {0 | 1}\n | ENCRYPTED [=] {YES | NO}\n | ENCRYPTION_KEY_ID [=] value\n | IETF_QUOTES [=] {YES | NO}\n | INDEX DIRECTORY [=] \'absolute path to directory\'\n | INSERT_METHOD [=] { NO | FIRST | LAST }\n | KEY_BLOCK_SIZE [=] value\n | MAX_ROWS [=] value\n | MIN_ROWS [=] value\n | PACK_KEYS [=] {0 | 1 | DEFAULT}\n | PAGE_CHECKSUM [=] {0 | 1}\n | PAGE_COMPRESSED [=] {0 | 1}\n | PAGE_COMPRESSION_LEVEL [=] {0 .. 9}\n | PASSWORD [=] \'string\'\n | ROW_FORMAT [=]\n{DEFAULT|DYNAMIC|FIXED|COMPRESSED|REDUNDANT|COMPACT|PAGE}\n | SEQUENCE [=] {0|1}\n | STATS_AUTO_RECALC [=] {DEFAULT|0|1}\n | STATS_PERSISTENT [=] {DEFAULT|0|1}\n | STATS_SAMPLE_PAGES [=] {DEFAULT|value}\n | TABLESPACE tablespace_name\n | TRANSACTIONAL [=] {0 | 1}\n | UNION [=] (tbl_name[,tbl_name]...)\n | WITH SYSTEM VERSIONING\n \n[STORAGE] ENGINE\n \n[STORAGE] ENGINE specifies a storage engine for the table.\nIf this option is not used, the default storage engine is\nused instead. That is, the storage_engine session option\nvalue if it is set, or the value specified for the\n--default-storage-engine mysqld startup options, or InnoDB.\nIf the specified storage engine is not installed and active,\nthe default value will be used, unless the\nNO_ENGINE_SUBSTITUTION SQL MODE is set (default since\nMariaDB 10.0). This is only true for CREATE TABLE, not for\nALTER TABLE. For a list of storage engines that are present\nin your server, issue a SHOW ENGINES.\n \nAUTO_INCREMENT\n \nAUTO_INCREMENT specifies the initial value for the\nAUTO_INCREMENT primary key. This works for MyISAM, Aria,\nInnoDB/XtraDB, MEMORY, and ARCHIVE tables. You can change\nthis option with ALTER TABLE, but in that case the new value\nmust be higher than the highest value which is present in\nthe AUTO_INCREMENT column. If the storage engine does not\nsupport this option, you can insert (and then delete) a row\nhaving the wanted value - 1 in the AUTO_INCREMENT column.\n \nAVG_ROW_LENGTH\n \nAVG_ROW_LENGTH is the average rows size. It only applies to\ntables using MyISAM and Aria storage engines that have the\nROW_FORMAT table option set to FIXED format.\n \nMyISAM uses MAX_ROWS and AVG_ROW_LENGTH to decide the\nmaximum size of a table (default: 256TB, or the maximum file\nsize allowed by the system).\n \n[DEFAULT] CHARACTER SET/CHARSET\n \n[DEFAULT] CHARACTER SET (or [DEFAULT] CHARSET) is used to\nset a default character set for the table. This is the\ncharacter set used for all columns where an explicit\ncharacter set is not specified. If this option is omitted or\nDEFAULT is specified, database\'s default character set will\nbe used. See Setting Character Sets and Collations for\ndetails on setting the character sets.\n \nCHECKSUM/TABLE_CHECKSUM\n \nCHECKSUM (or TABLE_CHECKSUM) can be set to 1 to maintain a\nlive checksum for all table\'s rows. This makes write\noperations slower, but CHECKSUM TABLE will be very fast.\nThis option is only supported for MyISAM and Aria tables.\n \n[DEFAULT] COLLATE\n \n[DEFAULT] COLLATE is used to set a default collation for the\ntable. This is the collation used for all columns where an\nexplicit character set is not specified. If this option is\nomitted or DEFAULT is specified, database\'s default option\nwill be used. See Setting Character Sets and Collations for\ndetails on setting the collations\n \nCOMMENT\n \nCOMMENT is a comment for the table. Maximum length is 2048\ncharacters (before mariaDB 5.5 it was 60 characters). Also\nused to define table parameters when creating a Spider\ntable.\n \nCONNECTION\n \nCONNECTION is used to specify a server name or a connection\nstring for a Spider, CONNECT, Federated or FederatedX table.\n \nDATA DIRECTORY/INDEX DIRECTORY\n \nDATA DIRECTORY and INDEX DIRECTORY were only supported for\nMyISAM and Aria, before MariaDB 5.5. Since 5.5, DATA\nDIRECTORY has also been supported by InnoDB if the\ninnodb_file_per_table server system variable is enabled, but\nonly in CREATE TABLE, not in ALTER TABLE. So, carefully\nchoose a path for InnoDB tables at creation time, because it\ncannot be changed without dropping and re-creating the\ntable. These options specify the paths for data files and\nindex files, respectively. If these options are omitted, the\ndatabase\'s directory will be used to store data files and\nindex files. Note that these table options do not work for\npartitioned tables (use the partition options instead), or\nif the server has been invoked with the\n--skip-symbolic-links startup option. To avoid the\noverwriting of old files with the same name that could be\npresent in the directories, you can use the\n--keep_files_on_create option (an error will be issued if\nfiles already exist). These options are ignored if the\nNO_DIR_IN_CREATE SQL_MODE is enabled (useful for replication\nslaves). Also note that symbolic links cannot be used for\nInnoDB tables.\n \nDATA DIRECTORY works by creating symlinks from where the\ntable would normally have been (inside the datadir) to where\nthe option specifies. For security reasons, to avoid\nbypassing the privilege system, the server does not permit\nsymlinks inside the datadir. Therefore, DATA DIRECTORY\ncannot be used to specify a location inside the datadir. An\nattempt to do so will result in an error 1210 (HY000)\nIncorrect arguments to DATA DIRECTORY.\n \nDELAY_KEY_WRITE\n \nDELAY_KEY_WRITE is supported by MyISAM and Aria, and can be\nset to 1 to speed up write operations. In that case, when\ndata are modified, the indexes are not updated until the\ntable is closed. Writing the changes to the index file\naltogether can be much faster. However, note that this\noption is applied only if the delay_key_write server\nvariable is set to \'ON\'. If it is \'OFF\' the delayed\nindex writes are always disabled, and if it is \'ALL\' the\ndelayed index writes are always used, disregarding the value\nof DELAY_KEY_WRITE.\n \nENCRYPTED\n \nThe ENCRYPTED table option was added in MariaDB 10.1.4\n \nThe ENCRYPTED table option can be used to manually set the\nencryption status of an InnoDB table. See InnoDB / XtraDB\nEncryption for more information.\n \nAria does not currently support the ENCRYPTED table option.\nSee MDEV-18049 about that.\n \nSee Data-at-Rest Encryption for more information.\n \nENCRYPTION_KEY_ID\n \nThe ENCRYPTION_KEY_ID table option was added in MariaDB\n10.1.4\n \nThe ENCRYPTION_KEY_ID table option can be used to manually\nset the encryption key of an InnoDB table. See InnoDB /\nXtraDB Encryption for more information.\n \nAria does not currently support the ENCRYPTION_KEY_ID table\noption. See MDEV-18049 about that.\n \nSee Data-at-Rest Encryption for more information.\n \nIETF_QUOTES\n \nThe IETF_QUOTES option was added in MariaDB 10.1.8\n \nFor the CSV storage engine, the IETF_QUOTES option, when set\nto YES, enables IETF-compatible parsing of embedded quote\nand comma characters. Enabling this option for a table\nimproves compatibility with other tools that use CSV, but is\nnot compatible with MySQL CSV tables, or MariaDB CSV tables\ncreated without this option. Disabled by default.\n \nINSERT_METHOD\n \nINSERT_METHOD is only used with MERGE tables. This option\ndetermines in which underlying table the new rows should be\ninserted. If you set it to \'NO\' (which is the default) no\nnew rows can be added to the table (but you will still be\nable to perform INSERTs directly against the underlying\ntables). FIRST means that the rows are inserted into the\nfirst table, and LAST means that thet are inserted into the\nlast table.\n \nKEY_BLOCK_SIZE\n \nKEY_BLOCK_SIZE is used to determine the size of key blocks,\nin bytes or kilobytes. However, this value is just a hint,\nand the storage engine could modify or ignore it. If\nKEY_BLOCK_SIZE is set to 0, the storage engine\'s default\nvalue will be used.\n \nWith the InnoDB storage engine, if you specify a non-zero\nvalue for the KEY_BLOCK_SIZE table option for the whole\ntable, then the table will implicitly be created with the\nROW_FORMAT table option set to COMPRESSED.\n \nMIN_ROWS/MAX_ROWS\n \nMIN_ROWS and MAX_ROWS let the storage engine know how many\nrows you are planning to store as a minimum and as a\nmaximum. These values will not be used as real limits, but\nthey help the storage engine to optimize the table. MIN_ROWS\nis only used by MEMORY storage engine to decide the minimum\nmemory that is always allocated. MAX_ROWS is used to decide\nthe minimum size for indexes.\n \nPACK_KEYS\n \nPACK_KEYS can be used to determine whether the indexes will\nbe compressed. Set it to 1 to compress all keys. With a\nvalue of 0, compression will not be used. With the DEFAULT\nvalue, only long strings will be compressed. Uncompressed\nkeys are faster.\n \nPAGE_CHECKSUM\n \nPAGE_CHECKSUM is only applicable to Aria tables, and\ndetermines whether indexes and data should use page\nchecksums for extra safety. \n \nPAGE_COMPRESSED\n \nPAGE_COMPRESSED is used to enable InnoDB page compression\nfor InnoDB tables.\n \nPAGE_COMPRESSION_LEVEL\n \nPAGE_COMPRESSION_LEVEL is used to set the compression level\nfor InnoDB page compression for InnoDB tables. The table\nmust also have the PAGE_COMPRESSED table option set to 1.\n \nValid values for PAGE_COMPRESSION_LEVEL are 1 (the best\nspeed) through 9 (the best compression), .\n \nPASSWORD\n \nPASSWORD is unused.\n \nRAID_TYPE\n \nRAID_TYPE is an obsolete option, as the raid support has\nbeen disabled since MySQL 5.0.\n \nROW_FORMAT\n \nThe ROW_FORMAT table option specifies the row format for the\ndata file. Possible values are engine-dependent.\n \nSupported MyISAM Row Formats\n \nFor MyISAM, the supported row formats are: \nFIXED\nDYNAMIC\nCOMPRESSED\n \nThe COMPRESSED row format can only be set by the myisampack\ncommand line tool.\n \nSee MyISAM Storage Formats for more information.\n \nSupported Aria Row Formats\n \nFor Aria, the supported row formats are:\nPAGE\nFIXED\nDYNAMIC.\n \nSee Aria Storage Formats for more information.\n \nSupported InnoDB Row Formats\n \nFor InnoDB/XtraDB, the supported row formats are:\nCOMPACT\nREDUNDANT\nCOMPRESSED\nDYNAMIC.\n \nIf the ROW_FORMAT table option is set to FIXED for an InnoDB\ntable, then the server will either return an error or a\nwarning depending on the value of the innodb_strict_mode\nsystem variable. If the innodb_strict_mode system variable\nis set to OFF, then a warning is issued, and MariaDB will\ncreate the table using the default row format for the\nspecific MariaDB server version. If the innodb_strict_mode\nsystem variable is set to ON, then an error will be raised.\n \nSee XtraDB/InnoDB Storage Formats for more information.\n \nOther Storage Engines and ROW_FORMAT\n \nOther storage engines do not support the ROW_FORMAT table\noption.\n \nSEQUENCE\n \nIf the table is a sequence, then it will have the SEQUENCE\nset to 1.\n \nSTATS_AUTO_RECALC\n \nSTATS_AUTO_RECALC is available only in MariaDB 10.0+. It\nindicates whether to automatically recalculate persistent\nstatistics (see STATS_PERSISTENT, below) for an InnoDB\ntable.\nIf set to 1, statistics will be recalculated when more than\n10% of the data has changed. When set to 0, stats will be\nrecalculated only when an ANALYZE TABLE is run. If set to\nDEFAULT, or left out, the value set by the\ninnodb_stats_auto_recalc system variable applies. See InnoDB\nPersistent Statistics.\n \nSTATS_PERSISTENT\n \nSTATS_PERSISTENT is available only in MariaDB 10.0+. It\nindicates whether the InnoDB statistics created by ANALYZE\nTABLE will remain on disk or not. It can be set to 1 (on\ndisk), 0 (not on disk, the pre-MariaDB 10 behavior), or\nDEFAULT (the same as leaving out the option), in which case\nthe value set by the innodb_stats_persistent system variable\nwill apply. Persistent statistics stored on disk allow the\nstatistics to survive server restarts, and provide better\nquery plan stability. See InnoDB Persistent Statistics.\n \nSTATS_SAMPLE_PAGES\n \nSTATS_SAMPLE_PAGES is available only in MariaDB 10.0+. It\nindicates how many pages are used to sample index\nstatistics. If 0 or DEFAULT, the default value, the\ninnodb_stats_sample_pages value is used. See InnoDB\nPersistent Statistics.\n \nTRANSACTIONAL\n \nTRANSACTIONAL is only applicable for Aria tables. In future\nAria tables created with this option will be fully\ntransactional, but currently this provides a form of crash\nprotection. See Aria Storage Engine for more details.\n \nUNION\n \nUNION must be specified when you create a MERGE table. This\noption contains a comma-separated list of MyISAM tables\nwhich are accessed by the new table. The list is enclosed\nbetween parenthesis. Example: UNION = (t1,t2)\n \nWITH SYSTEM VERSIONING\n \nWITH SYSTEM VERSIONING is used for creating System-versioned\ntables.\n \nPartitions\n \npartition_options:\n PARTITION BY\n { [LINEAR] HASH(expr)\n | [LINEAR] KEY(column_list)\n | RANGE(expr)\n | LIST(expr)\n | SYSTEM_TIME [INTERVAL time_quantity time_unit] [LIMIT\nnum] }\n [PARTITIONS num]\n [SUBPARTITION BY\n { [LINEAR] HASH(expr)\n | [LINEAR] KEY(column_list) }\n [SUBPARTITIONS num]\n ]\n [(partition_definition [, partition_definition] ...)]\n \npartition_definition:\n PARTITION partition_name\n [VALUES {LESS THAN {(expr) | MAXVALUE} | IN (value_list)}]\n [[STORAGE] ENGINE [=] engine_name]\n [COMMENT [=] \'comment_text\' ]\n [DATA DIRECTORY [=] \'data_dir\']\n [INDEX DIRECTORY [=] \'index_dir\']\n [MAX_ROWS [=] max_number_of_rows]\n [MIN_ROWS [=] min_number_of_rows]\n [TABLESPACE [=] tablespace_name]\n [NODEGROUP [=] node_group_id]\n [(subpartition_definition [, subpartition_definition] ...)]\n \nsubpartition_definition:\n SUBPARTITION logical_name\n [[STORAGE] ENGINE [=] engine_name]\n [COMMENT [=] \'comment_text\' ]\n [DATA DIRECTORY [=] \'data_dir\']\n [INDEX DIRECTORY [=] \'index_dir\']\n [MAX_ROWS [=] max_number_of_rows]\n [MIN_ROWS [=] min_number_of_rows]\n [TABLESPACE [=] tablespace_name]\n [NODEGROUP [=] node_group_id]\nIf the PARTITION BY clause is used, the table will be\npartitioned. A partition method must be explicitly indicated\nfor partitions and subpartitions. Partition methods are:\n[LINEAR] HASH creates a hash key which will be used to read\nand write rows. The partition function can be any valid SQL\nexpression which returns an INTEGER number. Thus, it is\npossible to use the HASH method on an integer column, or on\nfunctions which accept integer columns as an argument.\nHowever, VALUES LESS THAN and VALUES IN clauses can not be\nused with HASH. An example:\n \nCREATE TABLE t1 (a INT, b CHAR(5), c DATETIME)\n PARTITION BY HASH ( YEAR(c) );\n \n [LINEAR] HASH can be used for subpartitions, too.\n[LINEAR] KEY is similar to HASH, but the index has an even\ndistribution of data. Also, the expression can only be a\ncolumn or a list of columns. VALUES LESS THAN and VALUES IN\nclauses can not be used with KEY.\nRANGE partitions the rows using on a range of values, using\nthe VALUES LESS THAN operator. VALUES IN is not allowed with\nRANGE. The partition function can be any valid SQL\nexpression which returns a single value.\nLIST assignes partitions based on a table\'s column with a\nrestricted set of possible values. It is similar to RANGE,\nbut VALUES IN must be used for at least 1 columns, and\nVALUES LESS THAN is disallowed.\nSYSTEM_TIME partitioning is used for System-versioned tables\nto store historical data separately from current data.\n \nOnly HASH and KEY can be used for subpartitions, and they\ncan be [LINEAR].\n \nIt is possible to define up to 1024 partitions and\nsubpartitions.\n \nThe number of defined partitions can be optionally specified\nas PARTITION count. This can be done to avoid specifying all\npartitions individually. But you can also declare each\nindividual partition and, additionally, specify a PARTITIONS\ncount clause; in the case, the number of PARTITIONs must\nequal count.\n \nAlso see Partitioning Types Overview.\n \nSequences\n \nCREATE TABLE can also be used to create a SEQUENCE. See\nCREATE SEQUENCE and Sequence Overview.\n \nExamples\n-------- \ncreate table if not exists test (\na bigint auto_increment primary key,\nname varchar(128) charset utf8,\nkey name (name(32))\n) engine=InnoDB default charset latin1;\n \nThis example shows a couple of things:\nUsage of IF NOT EXISTS; If the table already existed, it\nwill not be created. There will not be any error for the\nclient, just a warning.\nHow to create a PRIMARY KEY that is automatically generated.\nHow to specify a table-specific character set and another\nfor a column.\nHow to create an index (name) that is only partly indexed\n(to save space).\n \nThe following clauses will work from MariaDB 10.2.1 only.\n \nCREATE TABLE t1(\n a int DEFAULT (1+1),\n b int DEFAULT (a+1),\n expires DATETIME DEFAULT(NOW() + INTERVAL 1 YEAR),\n x BLOB DEFAULT USER()\n);\n \n\n\nURL: https://mariadb.com/kb/en/create-table/','','https://mariadb.com/kb/en/create-table/'),(338,'BACKUP STAGE',26,'BACKUP STAGE commands are a set of commands to make it\npossible to make an efficient external backup tool. \n \nThe BACKUP STAGE command was introduced in MariaDB 10.4.1.\n \nSyntax\n------ \nBACKUP STAGE [START | FLUSH | BLOCK_DDL | BLOCK_COMMIT | END\n]\n \nIn the following text, a transactional table means InnoDB or\n\"InnoDB-like engine with redo log that can lock redo purges\nand can be copied without locks by an outside process\".\n \nIn the text we refer to mariabackup as the backup tool to\nuse. However the description should work for any tools that\nsupport BACKUP STAGEs.\n \nGoals with BACKUP STAGE Commands\n \nTo be able to do a majority of the backup with the minimum\npossible server locks. Especially for transactional tables\n(InnoDB, MyRocks etc) there is only need for a very short\nblock of new commits while copying statistics and log\ntables.\nDDL are only needed to be blocked for a very short duration\nof the backup while mariabackup is copying the tables\naffected by DDL during the initial part of the backup.\nMost non transactional tables (those that are not in use)\nwill be copied during BACKUP STAGE START. The exceptions are\nsystem statistic and log tables that are not blocked during\nthe backup until BLOCK_COMMIT.\nShould work efficiently with backup tools that use disk\nsnapshots.\nShould work as efficiently as possible for all table types\nthat store data on the local disks.\nAs little copying as possible under higher level\nstages/locks. For example, .frm (dictionary) and .trn\n(trigger) files should be copying while copying the table\ndata.\n \nBACKUP STAGE Commands\n \nBACKUP STAGE START\n \nThings Done by STAGE START\n \nBlocks purge of redo files for storage engines that needs\nthis (Aria)\nStart logging of DDL commands into \'datadir\'/ddl.log. This\nmay take a short time as the command has to wait until there\nall now active DDL commands.\n \nmariabackup Under START\n \nmariabackup can, under START:\nCopy all transactional tables, aria_log_control, aria_log.#\nand\nother engines redo logs.\nCall BACKUP STAGE FLUSH while copying the last set of files.\n \nTo copy InnoDB tables, mariabackup has to start to watch the\nInnoDB backup redo log and copy all changes to the backup to\nbe able to run the redos later on in the final backup.\n \nBACKUP STAGE FLUSH\n \nThings Done by STAGE FLUSH\n \nFLUSH all changes for inactive non-transactional tables,\nexcept for statistics and log tables.\nClose all tables that are not in use, to ensure they are\nmarked as closed for the backup.\nBLOCK all new write locks for all non transactional tables\n(except statistics and log tables). The command will not\nwait for tables that are in use by read-only transactions.\n \nDDLs don\'t have to be blocked at this stage as they can\'t\ncause the table to be in an inconsistent state. This is true\nalso for non-transactional tables.\n \nmariabackup under STAGE_FLUSH\n \nmariabackup can, under STAGE FLUSH:\nCopy all non-transactional tables that are not in use. This\nlist of used tables can be found with SHOW OPEN TABLES\nCopy all new changes to the aria_log.# tables\n \nAt this point data for all old tables should have been\ncopied (except for some system tables).\n \nBACKUP STAGE BLOCK_DDL\n \nThings Done by BLOCK_DDL\n \nWait for all statements using write locked non-transactional\ntables to end.\nBlocks CREATE TABLE, DROP TABLE, TRUNCATE TABLE, and RENAME\nTABLE.\nBlocks also start off a new ALTER TABLE and the final rename\nphase of ALTER TABLE. Running ALTER TABLES are not blocked.\n \nmariabackup under BLOCK_DDL\n \nmariabackup can, under BLOCK_DDL:\nCopy the non-transactional tables that were in use during\nSTAGE FLUSH\nCopy new tables created before BLOCK DDL. The file names can\nbe read from ddl.log. The log also allows the backup to\nexecute renames of files for which RENAME TABLE was done\ninstead of copying them.\nAdd markers to backup stream of tables that were dropped\nduring the earlier BACKUP STAGEs.\nCopy changes to system log tables (this is easy as these are\nappend only)\nCopy changes to aria_log.# tables (this is easy as these are\nappend only)\n \nBACKUP STAGE BLOCK_COMMIT\n \nThings Done by BLOCK_COMMIT\n \nLock the binary log and commit/rollback to ensure that no\nchanges are committed to any tables. If there are active\ncommits or data to be copied to the binary log this will be\nallowed to finish.\nThis doesn\'t lock temporary tables that are not used by\nreplication. However these will be blocked when it\'s time\nto write to the binary log.\nLock system log tables and statistics tables, flush them and\nmark them closed.\n \nWhen the BLOCK_COMMIT\'s stages return, this is the \'backup\ntime\'. Everything committed will be in the backup and\neverything not committed will roll back.\n \nTransactional engines will continue to do changes to the\nredo log during the BLOCK COMMIT stage, but this is not\nimportant as all of these will roll back later as the\nchanges will not be committed.\n \nmariabackup Under BLOCK_COMMIT\n \nmariabackup can, under BLOCK_COMMIT:\nCopy the last changes to the redo files for InnoDB and Aria\n(aria_log.#), and the part of the binary log that was not\ncopied before.\nMyRocks files can also be hard linked to the backup\ndirectory\nEnd of system log tables (slow_log and general_log) and all\nstatistics tables (table_stats, column_stats and\nindex_stats) should also be copied.\n \nBACKUP STAGE END\n \nThings Done by END\n \nEnd DDL logging\nFree resources\n \nmariabackup After END\n \nmariabackup can, after END:\nCopy MyRocks tables\n \nUsing BACKUP STAGE With Disk Snapshots\n \nA tool that is using disk snapshots for copying MariaDB\nfiles should do\n \nBACKUP STAGE START\nBACKUP STAGE BLOCK_COMMIT\n \ndisk snapshot\n \nBACKUP STAGE END\n \nThe above ensures that all non-transactional tables are\nproperly flushed to disk before the snapshot is done.\nUsing BACKUP STAGEs is also more efficient than using FLUSH\nTABLES WITH READ LOCK as the above set of commands will not\nblock or be blocked by write operations to transactional\ntables.\n \nNote that when the backup is completed, one should delete\nall files with the \"#sql\" prefix, as these are files used\nby concurrent running ALTER TABLE. Note that InnoDB will on\nserver restart automatically delete any tables with the\n\"#sql\" prefix.\n \nPrivileges\n \nBACKUP STAGE requires the RELOAD privilege.\n \nOther Things\n \nOnly one connection can run BACKUP STAGE START. If a second\nconnection tries, it will wait until the first one has\nexecuted BACKUP STAGE END.\nIf the user skips a BACKUP STAGE, all intermediate backup\nstages will automatically be run. This will allow us to add\nnew BACKUP STAGEs in the future with even more precise locks\nwithout causing problems for tools using an earlier version\nof BACKUP STAGEs\nWhile opening files for a table, mariabackup should use\nBACKUP LOCK to ensure that all files for a table are from\nthe same generation, that is, created at the same time.\nOne can use the max_statement_time or lock_wait_timeout\nvariables to ensure that a BACKUP STAGE command doesn\'t\nblock the server too long.\nDDL logging will only be available in MariaDB Enterprise\nserver 10.2, 10.3 and 10.4.\n \n\n\nURL: https://mariadb.com/kb/en/backup-stage/','','https://mariadb.com/kb/en/backup-stage/'),(666,'CREATE TABLESPACE',39,'The CREATE TABLESPACE statement is not supported by MariaDB.\nIt was originally inherited from MySQL NDB Cluster. In MySQL\n5.7 and later, the statement is also supported for InnoDB.\nHowever, MariaDB has chosen not to include that specific\nfeature. See MDEV-19294 for more information.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/create-tablespace/','','https://mariadb.com/kb/en/create-tablespace/'),(339,'BACKUP LOCK',26,'The BACKUP LOCK command was introduced in MariaDB 10.4.2.\n \nBACKUP LOCK blocks a table from DDL statements. This is\nmainly intended to be used by tools like mariabackup that\nneed to ensure there are no DDLs on a table while the table\nfiles are opened. For example, for an Aria table that stores\ndata in 3 files with extensions .frm, .MAI and .MAD.\nNormal read/write operations can continue as normal.\n \nSyntax\n------ \nTo lock a table:\n \nBACKUP LOCK table_name\n \nTo unlock a table:\n \nBACKUP UNLOCK\n \nUsage in a Backup Tool\n \nBACKUP LOCK [database.]table_name;\n - Open all files related to a table (for example, t.frm,\nt.MAI and t.MYD)\nBACKUP UNLOCK;\n- Copy data\n- Close files\n \nThis ensures that all files are from the same generation,\nthat is created at the same time by the MariaDB server.\n \nPrivileges\n \nBACKUP LOCK requires the RELOAD privilege.\n \nNotes\n \nThe idea is that the BACKUP LOCK should be held for as short\na time as possible by the backup tool. The time to take an\nuncontested lock is very short! One can easily do 50,000\nlocks/unlocks per second on low end hardware.\nOne should use different connections for BACKUP STAGE\ncommands and BACKUP LOCK. \n \nImplementation\n \nInternally, BACKUP LOCK is implemented by taking an\nMDLSHARED_HIGH_PRIO MDL lock on the table object, which\nprotects the table from any DDL operations.\n \n\n\nURL: https://mariadb.com/kb/en/backup-lock/','','https://mariadb.com/kb/en/backup-lock/'),(341,'CACHE INDEX',26,'Syntax\n------ \nCACHE INDEX \n tbl_index_list [, tbl_index_list] ...\n IN key_cache_name \n \ntbl_index_list:\n tbl_name [[INDEX|KEY] (index_name[, index_name] ...)]\n \nDescription\n----------- \nThe CACHE INDEX statement assigns table indexes to a\nspecific key\ncache. It is used only for MyISAM tables.\n \nA default key cache exists and cannot be destroyed. To\ncreate more key caches, the key_buffer_size server system\nvariable.\n \nThe associations between tables indexes and key caches are\nlost on server restart. To recreate them automatically, it\nis necessary to configure caches in a configuration file and\ninclude some CACHE INDEX (and optionally LOAD INDEX)\nstatements in the init file.\n \nExamples\n-------- \nThe following statement assigns indexes from the tables t1,\nt2, and t3\nto the key cache named hot_cache:\n \nCACHE INDEX t1, t2, t3 IN hot_cache;\n+---------+--------------------+----------+----------+\n| Table | Op | Msg_type | Msg_text |\n+---------+--------------------+----------+----------+\n| test.t1 | assign_to_keycache | status | OK |\n| test.t2 | assign_to_keycache | status | OK |\n| test.t3 | assign_to_keycache | status | OK |\n+---------+--------------------+----------+----------+\n \nImplementation (for MyISAM)\n \nNormally CACHE INDEX should not take a long time to execute.\nInternally it\'s implemented the following way:\nFind the right key cache (under\nLOCK_global_system_variables)\nOpen the table with a TL_READ_NO_INSERT lock.\nFlush the original key cache for the given file (under key\ncache lock)\nFlush the new key cache for the given file (safety)\nMove the file to the new key cache (under file share lock)\n \nThe only possible long operations are getting the locks for\nthe table and flushing the original key cache, if there were\nmany key blocks for the file in it.\n \nWe plan to also add CACHE INDEX for Aria tables if there is\na need for this.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/cache-index/','','https://mariadb.com/kb/en/cache-index/'),(344,'FLUSH TABLES FOR EXPORT',26,'FLUSH TABLES ... FOR EXPORT was introduced in MariaDB\n10.0.8.\n \nSyntax\n------ \nFLUSH TABLES table_name [, table_name] FOR EXPORT\n \nDescription\n----------- \nFLUSH TABLES ... FOR EXPORT flushes changes to the specified\ntables to disk so that binary copies can be made while the\nserver is still running. This works for Archive, Aria, CSV,\nInnoDB, MyISAM, MERGE, and XtraDB tables.\n \nThe table is read locked until one has issued UNLOCK TABLES.\n \nIf a storage engine does not support FLUSH TABLES FOR\nEXPORT, a 1031 error (SQLSTATE \'HY000\') is produced.\n \nIf FLUSH TABLES ... FOR EXPORT is in effect in the session,\nthe following statements will produce an error if attempted:\nFLUSH TABLES WITH READ LOCK\nFLUSH TABLES ... WITH READ LOCK\nFLUSH TABLES ... FOR EXPORT\nAny statement trying to update any table\n \nIf any of the following statements is in effect in the\nsession, attempting FLUSH TABLES ... FOR EXPORT will\nproduce an error.\nFLUSH TABLES ... WITH READ LOCK\nFLUSH TABLES ... FOR EXPORT\nLOCK TABLES ... READ\nLOCK TABLES ... WRITE\n \nFLUSH FOR EXPORT is not written to the binary log.\n \nThis statement requires the RELOAD and the LOCK TABLES\nprivileges.\n \nIf one of the specified tables cannot be locked, none of the\ntables will be locked.\n \nIf a table does not exist, an error like the following will\nbe produced:\n \nERROR 1146 (42S02): Table \'test.xxx\' doesn\'t exist\n \nIf a table is a view, an error like the following will be\nproduced:\n \nERROR 1347 (HY000): \'test.v\' is not BASE TABLE\n \nExample\n \nFLUSH TABLES test.t1 FOR EXPORT;\n# Copy files related to the table (see below)\nUNLOCK TABLES;\n \nFor a full description, please see copying MariaDB tables.\n \n\n\nURL: https://mariadb.com/kb/en/flush-tables-for-export/','','https://mariadb.com/kb/en/flush-tables-for-export/'),(668,'CREATE VIEW',39,'Syntax\n------ \nCREATE\n [OR REPLACE]\n [ALGORITHM = {UNDEFINED | MERGE | TEMPTABLE}]\n [DEFINER = { user | CURRENT_USER | role | CURRENT_ROLE }]\n [SQL SECURITY { DEFINER | INVOKER }]\n VIEW [IF NOT EXISTS] view_name [(column_list)]\n AS select_statement\n [WITH [CASCADED | LOCAL] CHECK OPTION]\n \nDescription\n----------- \nThe CREATE VIEW statement creates a new view, or replaces an\nexisting\none if the OR REPLACE clause is given. If the view does not\nexist, CREATE OR\nREPLACE VIEW is the same as CREATE VIEW. If the view does\nexist, CREATE OR\nREPLACE VIEW is the same as ALTER VIEW.\n \nThe select_statement is a SELECT statement that provides the\ndefinition of\nthe view. (When you select from the view, you select in\neffect using the SELECT\nstatement.) select_statement can select from base tables or\nother views.\n \nThe view definition is \"frozen\" at creation time, so\nchanges to the underlying\ntables afterwards do not affect the view definition. For\nexample, if a view is\ndefined as SELECT * on a table, new columns added to the\ntable later do not\nbecome part of the view. A SHOW CREATE VIEW shows that\nsuch queries are rewritten and column names are included in\nthe view\ndefinition.\n \nThe view definition must be a query that does not return\nerrors at view\ncreation times. However, the base tables used by the views\nmight be altered\nlater and the query may not be valid anymore. In this case,\nquerying the view\nwill result in an error. CHECK TABLE helps in finding this\nkind\nof problems.\n \nThe ALGORITHM clause affects how MariaDB processes the\nview. The DEFINER and SQL SECURITY clauses specify the\nsecurity context to be\nused when checking access privileges at view invocation\ntime. The WITH CHECK\nOPTION clause can be given to constrain inserts or updates\nto rows in tables\nreferenced by the view. These clauses are described later in\nthis section.\n \nThe CREATE VIEW statement requires the CREATE VIEW privilege\nfor the\nview, and some privilege for each column selected by the\nSELECT\nstatement. For columns used elsewhere in the SELECT\nstatement you must\nhave the SELECT privilege. If the OR REPLACE clause is\npresent, you\nmust also have the DROP privilege for the view.\n \nA view belongs to a database. By default, a new view is\ncreated in the\ndefault database. To create the view explicitly in a given\ndatabase,\nspecify the name as db_name.view_name when you create it.\n \nCREATE VIEW test.v AS SELECT * FROM t;\n \nBase tables and views share the same namespace within a\ndatabase, so a\ndatabase cannot contain a base table and a view that have\nthe same\nname.\n \nViews must have unique column names with no duplicates, just\nlike base\ntables. By default, the names of the columns retrieved by\nthe SELECT\nstatement are used for the view column names. To define\nexplicit names\nfor the view columns, the optional column_list clause can be\ngiven as\na list of comma-separated identifiers. The number of names\nin\ncolumn_list must be the same as the number of columns\nretrieved by the\nSELECT statement.\n \nMySQL until 5.1.28\n \nPrior to MySQL 5.1.29, When you modify an existing view, the\ncurrent view definition is backed up and saved. It is stored\nin that\ntable\'s database directory, in a subdirectory named arc.\nThe backup\nfile for a view v is named v.frm-00001. If you alter the\nview again,\nthe next backup is named v.frm-00002. The three latest view\nbackup\ndefinitions are stored. Backed up view definitions are not\npreserved\nby mysqldump, or any other such programs, but you can retain\nthem\nusing a file copy operation. However, they are not needed\nfor anything\nbut to provide you with a backup of your previous view\ndefinition. It\nis safe to remove these backup definitions, but only while\nmysqld is\nnot running. If you delete the arc subdirectory or its files\nwhile\nmysqld is running, you will receive an error the next time\nyou try to\nalter the view: \n \nMariaDB [test]> ALTER VIEW v AS SELECT * FROM t; \nERROR 6 (HY000): Error on delete of\n\'.\\test\\arc/v.frm-0004\' (Errcode: 2)\n \nColumns retrieved by the SELECT statement can be simple\nreferences to\ntable columns. They can also be expressions that use\nfunctions,\nconstant values, operators, and so forth.\n \nUnqualified table or view names in the SELECT statement are\ninterpreted with respect to the default database. A view can\nrefer to\ntables or views in other databases by qualifying the table\nor view\nname with the proper database name.\n \nA view can be created from many kinds of SELECT statements.\nIt can\nrefer to base tables or other views. It can use joins,\nUNION, and\nsubqueries. The SELECT need not even refer to any tables.\nThe\nfollowing example defines a view that selects two columns\nfrom another\ntable, as well as an expression calculated from those\ncolumns:\n \nCREATE TABLE t (qty INT, price INT);\n \nINSERT INTO t VALUES(3, 50);\n \nCREATE VIEW v AS SELECT qty, price, qty*price AS value FROM\nt;\n \nSELECT * FROM v;\n+------+-------+-------+\n| qty | price | value |\n+------+-------+-------+\n| 3 | 50 | 150 |\n+------+-------+-------+\n \nA view definition is subject to the following restrictions:\nThe SELECT statement cannot contain a subquery in the FROM\nclause.\nThe SELECT statement cannot refer to system or user\nvariables.\nWithin a stored program, the definition cannot refer to\nprogram parameters or local variables.\nThe SELECT statement cannot refer to prepared statement\nparameters.\nAny table or view referred to in the definition must exist.\nHowever, after a view has been created, it is possible to\ndrop a table or view that the definition refers to. In this\ncase, use of the view results in an error. To check a view\ndefinition for problems of this kind, use the CHECK TABLE\nstatement.\nThe definition cannot refer to a TEMPORARY table, and you\ncannot create a TEMPORARY view.\nAny tables named in the view definition must exist at\ndefinition time.\nYou cannot associate a trigger with a view.\nFor valid identifiers to use as view names, see Identifier\nNames.\n \nORDER BY is allowed in a view definition, but it is ignored\nif you\nselect from a view using a statement that has its own ORDER\nBY.\n \nFor other options or clauses in the definition, they are\nadded to the\noptions or clauses of the statement that references the\nview, but the\neffect is undefined. For example, if a view definition\nincludes a\nLIMIT clause, and you select from the view using a statement\nthat has\nits own LIMIT clause, it is undefined which limit applies.\nThis same\nprinciple applies to options such as ALL, DISTINCT, or\nSQL_SMALL_RESULT that follow the SELECT keyword, and to\nclauses such\nas INTO, FOR UPDATE, and LOCK IN SHARE MODE.\n \nThe PROCEDURE clause cannot be used in a view definition,\nand it cannot be used if a view is referenced in the FROM\nclause.\n \nIf you create a view and then change the query processing\nenvironment\nby changing system variables, that may affect the results\nthat you get\nfrom the view:\n \nCREATE VIEW v (mycol) AS SELECT \'abc\';\n \nSET sql_mode = \'\';\n \nSELECT \"mycol\" FROM v;\n+-------+\n| mycol |\n+-------+\n| mycol | \n+-------+\n \nSET sql_mode = \'ANSI_QUOTES\';\n \nSELECT \"mycol\" FROM v;\n+-------+\n| mycol |\n+-------+\n| abc | \n+-------+\n \nThe DEFINER and SQL SECURITY clauses determine which MariaDB\naccount to\nuse when checking access privileges for the view when a\nstatement is\nexecuted that references the view. They were added in MySQL\n5.1.2.\nThe legal SQL SECURITY characteristic values are DEFINER and\nINVOKER.\nThese indicate that the required privileges must be held by\nthe user\nwho defined or invoked the view, respectively. The default\nSQL\nSECURITY value is DEFINER.\n \nIf a user value is given for the DEFINER clause, it should\nbe a MariaDB\naccount in \'user_name\'@\'host_name\' format (the same\nformat used in the\nGRANT statement). The user_name and host_name values both\nare\nrequired. The definer can also be given as CURRENT_USER or\nCURRENT_USER(). The default DEFINER value is the user who\nexecutes the\nCREATE VIEW statement. This is the same as specifying\nDEFINER =\nCURRENT_USER explicitly.\n \nIf you specify the DEFINER clause, these rules determine the\nlegal\nDEFINER user values:\nIf you do not have the SUPER privilege, the only legal user\nvalue is your own account, either specified literally or by\nusing CURRENT_USER. You cannot set the definer to some other\naccount.\nIf you have the SUPER privilege, you can specify any\nsyntactically legal account name. If the account does not\nactually exist, a warning is generated.\nIf the SQL SECURITY value is DEFINER but the definer account\ndoes not exist when the view is referenced, an error occurs.\n \nWithin a view definition, CURRENT_USER returns the view\'s\nDEFINER\nvalue by default. Before MySQL 5.1.12, and for views\ndefined with the SQL SECURITY INVOKER characteristic,\nCURRENT_USER\nreturns the account for the view\'s invoker. For information\nabout user\nauditing within views, see\nhttp://dev.mysql.com/doc/refman/5.1/en/account-activity-auditing.html.\n \nWithin a stored routine that is defined with the SQL\nSECURITY DEFINER\ncharacteristic, CURRENT_USER returns the routine\'s DEFINER\nvalue. This\nalso affects a view defined within such a program, if the\nview\ndefinition contains a DEFINER value of CURRENT_USER.\n \nView privileges are checked like this:\nAt view definition time, the view creator must have the\nprivileges needed to use the top-level objects accessed by\nthe view. For example, if the view definition refers to\ntable columns, the creator must have privileges for the\ncolumns, as described previously. If the definition refers\nto a stored function, only the privileges needed to invoke\nthe function can be checked. The privileges required when\nthe function runs can be checked only as it executes: For\ndifferent invocations of the function, different execution\npaths within the function might be taken.\nWhen a view is referenced, privileges for objects accessed\nby the view are checked against the privileges held by the\nview creator or invoker, depending on whether the SQL\nSECURITY characteristic is DEFINER or INVOKER, respectively.\nIf reference to a view causes execution of a stored\nfunction, privilege checking for statements executed within\nthe function depend on whether the function is defined with\na SQL SECURITY characteristic of DEFINER or INVOKER. If the\nsecurity characteristic is DEFINER, the function runs with\nthe privileges of its creator. If the characteristic is\nINVOKER, the function runs with the privileges determined by\nthe view\'s SQL SECURITY characteristic.\n \nMySQL until 5.1.1\n \nPrior to MySQL 5.1.2 (before the DEFINER and SQL SECURITY\nclauses were\nimplemented), privileges required for objects used in a view\nare\nchecked at view creation time.\n \nExample: A view might depend on a stored function, and that\nfunction\nmight invoke other stored routines. For example, the\nfollowing view\ninvokes a stored function f():\n \nCREATE VIEW v AS SELECT * FROM t WHERE t.id = f(t.name);\n \nSuppose that f() contains a statement such as this:\n \nIF name IS NULL then\n CALL p1();\nELSE\n CALL p2();\nEND IF;\n \nThe privileges required for executing statements within f()\nneed to be\nchecked when f() executes. This might mean that privileges\nare needed\nfor p1() or p2(), depending on the execution path within\nf(). Those\nprivileges must be checked at runtime, and the user who must\npossess\nthe privileges is determined by the SQL SECURITY values of\nthe view v\nand the function f().\n \nThe DEFINER and SQL SECURITY clauses for views are\nextensions to\nstandard SQL. In standard SQL, views are handled using the\nrules for\nSQL SECURITY INVOKER.\n \nIf you invoke a view that was created before MySQL 5.1.2, it\nis\ntreated as though it was created with a SQL SECURITY DEFINER\nclause\nand with a DEFINER value that is the same as your account.\nHowever,\nbecause the actual definer is unknown, MySQL issues a\nwarning. To make\nthe warning go away, it is sufficient to re-create the view\nso that\nthe view definition includes a DEFINER clause.\n \nThe optional ALGORITHM clause is an extension to standard\nSQL. It\naffects how MariaDB processes the view. ALGORITHM takes\nthree values:\nMERGE, TEMPTABLE, or UNDEFINED. The default algorithm is\nUNDEFINED if\nno ALGORITHM clause is present. See View Algorithms for more\ninformation.\n \nSome views are updatable. That is, you can use them in\nstatements such\nas UPDATE, DELETE, or INSERT to update the contents of the\nunderlying\ntable. For a view to be updatable, there must be a\none-to-one\nrelationship between the rows in the view and the rows in\nthe\nunderlying table. There are also certain other constructs\nthat make a\nview non-updatable. See Inserting and Updating with Views.\n \nWITH CHECK OPTION\n \nThe WITH CHECK OPTION clause can be given for an updatable\nview to\nprevent inserts or updates to rows except those for which\nthe WHERE\nclause in the select_statement is true.\n \nIn a WITH CHECK OPTION clause for an updatable view, the\nLOCAL and\nCASCADED keywords determine the scope of check testing when\nthe view\nis defined in terms of another view. The LOCAL keyword\nrestricts the\nCHECK OPTION only to the view being defined. CASCADED causes\nthe\nchecks for underlying views to be evaluated as well. When\nneither\nkeyword is given, the default is CASCADED.\n \nFor more information about updatable views and the WITH\nCHECK OPTION\nclause, see\nInserting and Updating with Views.\n \nIF NOT EXISTS\n \nThe IF NOT EXISTS clause was added in MariaDB 10.1.3\n \nWhen the IF NOT EXISTS clause is used, MariaDB will return a\nwarning instead of an error if the specified view already\nexists. Cannot be used together with the OR REPLACE clause.\n \nExamples\n-------- \nCREATE TABLE t (a INT, b INT) ENGINE = InnoDB;\n \nINSERT INTO t VALUES (1,1), (2,2), (3,3);\n \nCREATE VIEW v AS SELECT a, a*2 AS a2 FROM t;\n \nSELECT * FROM v;\n \n+------+------+\n| a | a2 |\n+------+------+\n| 1 | 2 |\n| 2 | 4 |\n| 3 | 6 |\n+------+------+\n \nOR REPLACE and IF NOT EXISTS:\n \nCREATE VIEW v AS SELECT a, a*2 AS a2 FROM t;\n \nERROR 1050 (42S01): Table \'v\' already exists\n \nCREATE OR REPLACE VIEW v AS SELECT a, a*2 AS a2 FROM t;\n \nQuery OK, 0 rows affected (0.04 sec)\n \nCREATE VIEW IF NOT EXISTS v AS SELECT a, a*2 AS a2 FROM t;\n \nQuery OK, 0 rows affected, 1 warning (0.01 sec)\n \nSHOW WARNINGS;\n \n+-------+------+--------------------------+\n| Level | Code | Message |\n+-------+------+--------------------------+\n| Note | 1050 | Table \'v\' already exists |\n+-------+------+--------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/create-view/','','https://mariadb.com/kb/en/create-view/'),(673,'DROP PACKAGE',39,'Oracle-style packages were introduced in MariaDB 10.3.5.\n \nSyntax\n------ \nDROP PACKAGE [IF EXISTS] [ db_name . ] package_name\n \nDescription\n----------- \nThe DROP PACKAGE statement can be used when Oracle SQL_MODE\nis set.\n \nThe DROP PACKAGE statement drops a stored package entirely:\nDrops the package specification (earlier created using the\nCREATE PACKAGE statement).\nDrops the package implementation, if the implementation was\nalready created using the CREATE PACKAGE BODY statement.\n \n\n\nURL: https://mariadb.com/kb/en/drop-package/','','https://mariadb.com/kb/en/drop-package/'),(674,'DROP PACKAGE BODY',39,'Oracle-style packages were introduced in MariaDB 10.3.5.\n \nSyntax\n------ \nDROP PACKAGE BODY [IF EXISTS] [ db_name . ] package_name\n \nDescription\n----------- \nThe DROP PACKAGE BODY statement can be used when Oracle\nSQL_MODE is set.\n \nThe DROP PACKAGE BODY statement drops the package body (i.e\nthe implementation), previously created using the CREATE\nPACKAGE BODY statement.\n \nNote, DROP PACKAGE BODY drops only the package\nimplementation, but does not drop the package specification.\nUse DROP PACKAGE to drop the package entirely (i.e. both\nimplementation and specification).\n \n\n\nURL: https://mariadb.com/kb/en/drop-package-body/','','https://mariadb.com/kb/en/drop-package-body/'),(679,'DROP TABLESPACE',39,'The DROP TABLESPACE statement is not supported by MariaDB.\nIt was originally inherited from MySQL NDB Cluster. In MySQL\n5.7 and later, the statement is also supported for InnoDB.\nHowever, MariaDB has chosen not to include that specific\nfeature. See MDEV-19294 for more information.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/drop-tablespace/','','https://mariadb.com/kb/en/drop-tablespace/'),(687,'Generated (Virtual and Persistent/Stored) Columns',39,'Syntax\n------ \n [GENERATED ALWAYS] AS ( )\n[VIRTUAL | PERSISTENT | STORED] [UNIQUE] [UNIQUE KEY]\n[COMMENT ]\n \nMariaDB\'s generated columns syntax is designed to be\nsimilar to the syntax for Microsoft SQL Server\'s computed\ncolumns and Oracle Database\'s virtual columns. In MariaDB\n10.2 and later, the syntax is also compatible with the\nsyntax for MySQL\'s generated columns.\n \nDescription\n----------- \nA generated column is a column in a table that cannot\nexplicitly be set to a specific value in a DML query.\nInstead, its value is automatically generated based on an\nexpression. This expression might generate the value based\non the values of other columns in the table, or it might\ngenerate the value by calling built-in functions or\nuser-defined functions (UDFs).\n \nThere are two types of generated columns:\nPERSISTENT or STORED: This type\'s value is actually stored\nin the table.\nVIRTUAL: This type\'s value is not stored at all. Instead,\nthe value is generated dynamically when the table is\nqueried. This type is the default.\n \nGenerated columns are also sometimes called computed columns\nor virtual columns.\n \nSupported Features\n \nStorage Engine Support\n \nGenerated columns can only be used with storage engines\nwhich support them. If you try to use a storage engine that\ndoes not support them, then you will see an error similar to\nthe following:\n \nERROR 1910 (HY000): TokuDB storage engine does not support\ncomputed columns\nInnoDB, Aria, MyISAM and CONNECT support generated columns.\n \nA column in a MERGE table can be built on a PERSISTENT\ngenerated column.\nHowever, a column in a MERGE table can not be defined as a\nVIRTUAL and PERSISTENT generated column.\n \n\nData Type Support\n \nAll data types are supported when defining generated\ncolumns.\n \nUsing the ZEROFILL column option is supported when defining\ngenerated columns.\n \nIn MariaDB 10.2.6 and later, the following statements apply\nto data types for generated columns:\nUsing the AUTO_INCREMENT column option is not supported when\ndefining generated columns. Previously, it was supported,\nbut this support was removed, because it would not work\ncorrectly. See MDEV-11117.\n \nIndex Support\n \nUsing a generated column as a table\'s primary key is not\nsupported. See MDEV-5590 for more information. If you try to\nuse one as a primary key, then you will see an error similar\nto the following:\n \nERROR 1903 (HY000): Primary key cannot be defined upon a\ncomputed column\nUsing PERSISTENT generated columns as part of a foreign key\nis supported.\n \nReferencing PERSISTENT generated columns as part of a\nforeign key is also supported.\nHowever, using the ON UPDATE CASCADE, ON UPDATE SET NULL, or\nON DELETE SET NULL clauses is not supported. If you try to\nuse an unsupported clause, then you will see an error\nsimilar to the following:\n \nERROR 1905 (HY000): Cannot define foreign key with ON UPDATE\nSET NULL clause on a computed column\n \nIn MariaDB 10.2.3 and later, the following statements apply\nto indexes for generated columns:\nDefining indexes on both VIRTUAL and PERSISTENT generated\ncolumns is supported.\nIf an index is defined on a generated column, then the\noptimizer considers using it in the same way as indexes\nbased on \"real\" columns.\n \n\nMariaDB until 10.2.2\n \nIn MariaDB 10.2.2 and before, the following statements apply\nto indexes for generated columns:\nDefining indexes on VIRTUAL generated columns is not\nsupported.\n \nDefining indexes on PERSISTENT generated columns is\nsupported.\nIf an index is defined on a generated column, then the\noptimizer considers using it in the same way as indexes\nbased on \"real\" columns.\n \n\nStatement Support\n \nGenerated columns are used in DML queries just as if they\nwere \"real\" columns.\nHowever, VIRTUAL and PERSISTENT generated columns differ in\nhow their data is stored.\nValues for PERSISTENT generated columns are generated\nwhenever a DML queries inserts or updates the row with the\nspecial DEFAULT value. This generates the columns value, and\nit is stored in the table like the other \"real\" columns.\nThis value can be read by other DML queries just like the\nother \"real\" columns.\nValues for VIRTUAL generated columns are not stored in the\ntable. Instead, the value is generated dynamically whenever\nthe column is queried. If other columns in a row are\nqueried, but the VIRTUAL generated column is not one of the\nqueried columns, then the column\'s value is not generated.\n \nThe SELECT statement supports generated columns.\n \nGenerated columns can be referenced in the INSERT, UPDATE,\nand DELETE statements.\nHowever, VIRTUAL or PERSISTENT generated columns cannot be\nexplicitly set to any other values than NULL or DEFAULT. If\na generated column is explicitly set to any other value,\nthen the outcome depends on whether strict mode is enabled\nin SQL_MODE. If it is not enabled, then a warning will be\nraised and the default generated value will be used instead.\nIf it is enabled, then an error will be raised instead.\n \nThe CREATE TABLE statement has limited support for generated\ncolumns.\nIt supports defining generated columns in a new table.\nIt supports using generated columns to partition tables.\nIt does not support using the versioning clauses with\ngenerated columns.\n \nThe ALTER TABLE statement has limited support for generated\ncolumns.\nIt supports the MODIFY and CHANGE clauses for PERSISTENT\ngenerated columns.\nIt does not support the MODIFY clause for VIRTUAL generated\ncolumns if ALGORITHM is not set to COPY. See MDEV-15476 for\nmore information.\nIt does not support the CHANGE clause for VIRTUAL generated\ncolumns if ALGORITHM is not set to COPY. See MDEV-17035 for\nmore information.\nIt does not support altering a table if ALGORITHM is not set\nto COPY if the table has a VIRTUAL generated column that is\nindexed. See MDEV-14046 for more information.\nIt does not support adding a VIRTUAL generated column with\nthe ADD clause if the same statement is also adding other\ncolumns if ALGORITHM is not set to COPY. See MDEV-17468 for\nmore information.\nIt also does not support altering an existing column into a\nVIRTUAL generated column.\nIt supports using generated columns to partition tables.\nIt does not support using the versioning clauses with\ngenerated columns.\n \nThe SHOW CREATE TABLE statement supports generated columns.\n \nThe DESCRIBE statement can be used to check whether a table\nhas generated columns.\nYou can tell which columns are generated by looking for the\nones where the Extra column is set to either VIRTUAL or\nPERSISTENT. For example:\n \nDESCRIBE table1;\n \n+-------+-------------+------+-----+---------+------------+\n| Field | Type | Null | Key | Default | Extra |\n+-------+-------------+------+-----+---------+------------+\n| a | int(11) | NO | | NULL | |\n| b | varchar(32) | YES | | NULL | |\n| c | int(11) | YES | | NULL | VIRTUAL |\n| d | varchar(5) | YES | | NULL | PERSISTENT |\n+-------+-------------+------+-----+---------+------------+\nGenerated columns can be properly referenced in the NEW and\nOLD rows in triggers.\n \nStored procedures support generated columns.\n \nThe HANDLER statement supports generated columns.\n \nExpression Support\n \nMost legal, deterministic expressions which can be\ncalculated are supported in expressions for generated\ncolumns.\n \nMost built-in functions are supported in expressions for\ngenerated columns.\nHowever, some built-in functions can\'t be supported for\ntechnical reasons. For example, If you try to use an\nunsupported function in an expression, then you will see an\nerror similar to the following:\n \nERROR 1901 (HY000): Function or expression \'dayname()\'\ncannot be used in the GENERATED ALWAYS AS clause of `v`\nSubqueries are not supported in expressions for generated\ncolumns because the underlying data can change.\n \nUsing anything that depends on data outside the row is not\nsupported in expressions for generated columns.\n \nStored functions are not supported in expressions for\ngenerated columns. See MDEV-17587 for more information.\n \nIn MariaDB 10.2.1 and later, the following statements apply\nto expressions for generated columns:\nNon-deterministic built-in functions are supported in\nexpressions for PERSISTENT generated columns.\nIf a non-deterministic function is used for a PERSISTENT\ngenerated column, then any changes made to this table should\nbe logged to the binary log in the row-based logging format\nwhen the binlog_format system variable is set to MIXED.\nHowever, this does not always happen. Therefore, it is\nrecommended to set the binlog_format system variable to ROW.\nSee MDEV-10436 for more information.\n \nNon-deterministic built-in functions are not supported in\nexpressions for VIRTUAL generated columns.\n \nUser-defined functions (UDFs) are supported in expressions\nfor generated columns.\nHowever, MariaDB can\'t check whether a UDF is\ndeterministic, so it is up to the user to be sure that they\ndo not use non-deterministic UDFs with VIRTUAL generated\ncolumns.\n \nDefining a generated column based on other generated columns\ndefined before it in the table definition is supported. For\nexample:\n \nCREATE TABLE t1 (a int as (1), b int as (a));\nHowever, defining a generated column based on other\ngenerated columns defined after in the table definition is\nnot supported in expressions for generation columns because\ngenerated columns are calculated in the order they are\ndefined.\n \nUsing an expression that exceeds 255 characters in length is\nsupported in expressions for generated columns. The new\nlimit for the entire table definition, including all\nexpressions for generated columns, is 65,535 bytes.\n \nUsing constant expressions is supported in expressions for\ngenerated columns. For example:\n \nCREATE TABLE t1 (a int as (1));\n \nMariaDB until 10.2.0\n \nIn MariaDB 10.2.0 and before, the following statements apply\nto expressions for generated columns:\nNon-deterministic built-in functions are not supported in\nexpressions for generated columns.\n \nUser-defined functions (UDFs) are not supported in\nexpressions for generated columns.\n \nDefining a generated column based on other generated columns\ndefined in the table is not supported. Otherwise, it would\ngenerate errors like this:\n \nERROR 1900 (HY000): A computed column cannot be based on a\ncomputed column\nUsing an expression that exceeds 255 characters in length is\nnot supported in expressions for generated columns.\n \nUsing constant expressions is not supported in expressions\nfor generated columns. Otherwise, it would generate errors\nlike this:\n \nERROR 1908 (HY000): Constant expression in computed column\nfunction is not allowed\n \nMySQL Compatibility Support\n \nIn MariaDB 10.2.1 and later, the following statements apply\nto MySQL compatibility for generated columns:\nThe STORED keyword is supported as an alias for the\nPERSISTENT keyword.\n \nTables created with MySQL 5.7 or later that contain MySQL\'s\ngenerated columns can be imported into MariaDB without a\ndump and restore.\n \nMariaDB until 10.2.0\n \nIn MariaDB 10.2.0 and before, the following statements apply\nto MySQL compatibility for generated columns:\nThe STORED keyword is not supported as an alias for the\nPERSISTENT keyword.\n \nTables created with MySQL 5.7 or later that contain MySQL\'s\ngenerated columns can not be imported into MariaDB without a\ndump and restore.\n \nImplementation Differences\n \nGenerated columns are subject to various constraints in\nother DBMSs that are not present in MariaDB\'s\nimplementation. Generated columns may also be called\ncomputed columns or virtual columns in different\nimplementations. The various details for a specific\nimplementation can be found in the documentation for each\nspecific DBMS.\n \nImplementation Differences Compared to Microsoft SQL Server\n \nMariaDB\'s generated columns implementation does not enforce\nthe following\nrestrictions that are present in Microsoft SQL Server\'s\ncomputed columns implementation:\nMariaDB allows server variables in generated column\nexpressions, including those that change dynamically, such\nas warning_count.\nMariaDB allows the CONVERT_TZ() function to be called with a\nnamed time zone as an argument, even though time zone names\nand time offsets are configurable.\nMariaDB allows the CAST() function to be used with\nnon-unicode character sets, even though character sets are\nconfigurable and differ between binaries/versions.\nMariaDB allows FLOAT expressions to be used in generated\ncolumns. Microsoft SQL Server considers these expressions to\nbe \"imprecise\" due to potential cross-platform differences\nin floating-point implementations and precision.\nMicrosoft SQL Server requires the ARITHABORT mode to be set,\nso that division by zero returns an error, and not a NULL.\nMicrosoft SQL Server requires QUOTED_IDENTIFIER to be set in\nSQL_MODE. In MariaDB, if data is inserted without\nANSI_QUOTES set in SQL_MODE, then it will be processed and\nstored differently in a generated column that contains\nquoted identifiers.\nIn MariaDB 10.2.0 and before, it does not allow user-defined\nfunctions (UDFs) to be used in expressions for generated\ncolumns.\n \nMicrosoft SQL Server enforces the above restrictions by\ndoing one of the following things:\nRefusing to create computed columns.\nRefusing to allow updates to a table containing them.\nRefusing to use an index over such a column if it can not be\nguaranteed that the expression is fully deterministic.\n \nIn MariaDB, as long as the SQL_MODE, language, and other\nsettings that were in effect during the CREATE TABLE remain\nunchanged, the generated column expression will always be\nevaluated the same. If any of these things change, then\nplease be aware that the generated column expression might\nnot be\nevaluated the same way as it previously was.\n \nIn MariaDB 5.2, you will get a warning if you try to update\na virtual column. In MariaDB 5.3 and later, this warning\nwill be converted to an error if strict mode is enabled in\nSQL_MODE.\n \nDevelopment History\n \nGenerated columns was originally developed by Andrey Zhakov.\nIt was then modified by Sanja Byelkin and Igor Babaev at\nMonty Program for inclusion in MariaDB. Monty did the work\non MariaDB 10.2 to lift a some of the old limitations.\n \nExamples\n-------- \nHere is an example table that uses both VIRTUAL and\nPERSISTENT virtual columns:\n \nUSE TEST;\n \nCREATE TABLE table1 (\n a INT NOT NULL,\n b VARCHAR(32),\n c INT AS (a mod 10) VIRTUAL,\n d VARCHAR(5) AS (left(b,5)) PERSISTENT);\n \nIf you describe the table, you can easily see which columns\nare virtual by\nlooking in the \"Extra\" column:\n \nDESCRIBE table1;\n \n+-------+-------------+------+-----+---------+------------+\n| Field | Type | Null | Key | Default | Extra |\n+-------+-------------+------+-----+---------+------------+\n| a | int(11) | NO | | NULL | |\n| b | varchar(32) | YES | | NULL | |\n| c | int(11) | YES | | NULL | VIRTUAL |\n| d | varchar(5) | YES | | NULL | PERSISTENT |\n+-------+-------------+------+-----+---------+------------+\n \nTo find out what function(s) generate the value of the\nvirtual column you can use SHOW CREATE TABLE:\n \nSHOW CREATE TABLE table1;\n \n| table1 | CREATE TABLE `table1` (\n `a` int(11) NOT NULL,\n `b` varchar(32) DEFAULT NULL,\n `c` int(11) AS (a mod 10) VIRTUAL,\n `d` varchar(5) AS (left(b,5)) PERSISTENT\n) ENGINE=MyISAM DEFAULT CHARSET=latin1 |\n \nIf you try to insert non-default values into a virtual\ncolumn, you will receive\na warning and what you tried to insert will be ignored and\nthe derived value\ninserted instead:\n \nWARNINGS;\nShow warnings enabled.\n \nINSERT INTO table1 VALUES (1, \'some\ntext\',default,default);\nQuery OK, 1 row affected (0.00 sec)\n \nINSERT INTO table1 VALUES (2, \'more text\',5,default);\nQuery OK, 1 row affected, 1 warning (0.00 sec)\n \nWarning (Code 1645): The value specified for computed column\n\'c\' in table \'table1\' has been ignored.\n \nINSERT INTO table1 VALUES (123, \'even more\ntext\',default,\'something\');\nQuery OK, 1 row affected, 2 warnings (0.00 sec)\n \nWarning (Code 1645): The value specified for computed column\n\'d\' in table \'table1\' has been ignored.\nWarning (Code 1265): Data truncated for column \'d\' at row\n1\n \nSELECT * FROM table1;\n+-----+----------------+------+-------+\n| a | b | c | d |\n+-----+----------------+------+-------+\n| 1 | some text | 1 | some |\n| 2 | more text | 2 | more |\n| 123 | even more text | 3 | even |\n+-----+----------------+------+-------+\n3 rows in set (0.00 sec)\n \nIf the ZEROFILL clause is specified, it should be placed\ndirectly after the type definition, before the AS ():\n \nCREATE TABLE table2 (a INT, b INT ZEROFILL AS (a*2)\nVIRTUAL);\nINSERT INTO table2 (a) VALUES (1);\n \nSELECT * FROM table2;\n \n+------+------------+\n| a | b |\n+------+------------+\n| 1 | 0000000002 |\n+------+------------+\n1 row in set (0.00 sec)\n \nYou can also use virtual columns to implement a \"poor\nman\'s partial index\". See example at the end of Unique\nIndex.\n \n\n\nURL: https://mariadb.com/kb/en/generated-columns/','','https://mariadb.com/kb/en/generated-columns/'),(688,'LASTVAL',40,'LASTVAL is a synonym for PREVIOUS VALUE for sequence_name.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/lastval/','','https://mariadb.com/kb/en/lastval/'),(690,'NEXTVAL',40,'NEXTVAL is a synonym for NEXT VALUE for sequence_name.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/nextval/','','https://mariadb.com/kb/en/nextval/'),(345,'HELP Command',26,'Syntax\n------ \nHELP search_string\n \nDescription\n----------- \nThe HELP command can be used in any MariaDB client, such as\nthe mysql command-line client, to get basic syntax help and\na short description for most commands and functions. \n \nIf you provide an argument to the HELP command, the mysql\nclient uses it as a search string to access server-side\nhelp. The proper operation of this command requires that the\nhelp tables in the mysql database be initialized with help\ntopic information.\n \nIf there is no match for the search string, the search\nfails. Use help contents to see a list of the help\ncategories:\n \nHELP contents\nYou asked for help about help category: \"Contents\"\nFor more information, type \'help \', where is one of the\nfollowing\ncategories:\n Account Management\n Administration\n Compound Statements\n Data Definition\n Data Manipulation\n Data Types\n Functions\n Functions and Modifiers for Use with GROUP BY\n Geographic Features\n Help Metadata\n Language Structure\n Plugins\n Procedures\n Sequences\n Table Maintenance\n Transactions\n User-Defined Functions\n Utility\n \nIf a search string matches multiple items, MariaDB shows a\nlist of matching topics:\n \nHELP drop\nMany help items for your request exist.\nTo make a more specific request, please type \'help \',\nwhere is one of the following\ntopics:\n ALTER TABLE\n DROP DATABASE\n DROP EVENT\n DROP FUNCTION\n DROP FUNCTION UDF\n DROP INDEX\n DROP PACKAGE\n DROP PACKAGE BODY\n DROP PROCEDURE\n DROP ROLE\n DROP SEQUENCE\n DROP SERVER\n DROP TABLE\n DROP TRIGGER\n DROP USER\n DROP VIEW\n \nThen you can enter a topic as the search string to see the\nhelp entry for that topic.\n \nThe help is provided with the MariaDB server and makes use\nof four help tables found in the mysql database:\nhelp_relation, help_topic, help_category and help_keyword.\nThese tables are populated by the mysql_install_db or\nfill_help_table.sql scripts which, until MariaDB 10.4.7,\ncontain data generated from an old version of MySQL.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/help-command/','','https://mariadb.com/kb/en/help-command/'),(346,'KILL [CONNECTION | QUERY]',26,'Syntax\n------ \nKILL [HARD | SOFT] [CONNECTION | QUERY [ID] ] [thread_id |\nUSER user_name | query_id]\n \nMariaDB 5.3.2\n \nThe options HARD | SOFT and USER username were introduced in\nMariaDB 5.3.2\n \nMariaDB 10.0.5\n \nKILL QUERY ID query_id, which permits killing a query by\nquery id rather than thread id, was introduced in MariaDB\n10.0.5.\n \nDescription\n----------- \nEach connection to mysqld runs in a separate thread. You can\nsee which threads\nare running with the SHOW PROCESSLIST statement and kill a\nthread with the KILL thread_id statement. \nKILL allows the optional CONNECTION or\nQUERY modifier:\nKILL CONNECTION is the same as KILL with no\n modifier: It terminates the connection associated with the\ngiven thread or query id.\nKILL QUERY terminates the statement that the connection\nthread_id is\n currently executing, but leaves the connection itself\nintact.\nKILL QUERY ID (introduced in MariaDB 10.0.5) terminates the\nquery by query_id, leaving the connection intact.\n \nIf a connection is terminated that has an active\ntransaction, the transaction will be rolled back. If only a\nquery is killed, the current transaction will stay active.\nSee also idle_transaction_timeout.\n \nIf you have the PROCESS privilege, you can see all threads.\nIf\nyou have the SUPER privilege, you can kill all threads and\nstatements. Otherwise, you can see and kill only your own\nthreads and\nstatements.\n \nKilling queries that repair or create indexes on MyISAM and\nAria tables may result in corrupted tables. Use the SOFT\noption to avoid this!\n \nThe HARD option (default) kills a command as soon as\npossible. If you use\nSOFT, then critical operations that may leave a table in an\ninconsistent state will not be interrupted. Such operations\ninclude REPAIR and INDEX creation for MyISAM and Aria tables\n(REPAIR TABLE, OPTIMIZE TABLE).\n \nKILL ... USER username will kill all connections/queries for\na\ngiven user. USER can be specified one of the following ways:\nusername (Kill without regard to hostname)\nusername@hostname\nCURRENT_USER or CURRENT_USER()\n \nIf you specify a thread id and that thread does not exist,\nyou get the following error:\n \nERROR 1094 (HY000): Unknown thread id: \n \nIf you specify a query id that doesn\'t exist, you get the\nfollowing error:\n \nERROR 1957 (HY000): Unknown query id: \n \nHowever, if you specify a user name, no error is issued for\nnon-connected (or even non-existing) users. To check if the\nconnection/query has been killed, you can use the\nROW_COUNT() function.\n \nA client whose connection is killed receives the following\nerror:\n \nERROR 1317 (70100): Query execution was interrupted\n \nTo obtain a list of existing sessions, use the SHOW\nPROCESSLIST statement or query the Information Schema\nPROCESSLIST table.\n \nNote: You cannot use KILL with the Embedded MySQL Server\nlibrary because the embedded server merely runs inside the\nthreads of the host\napplication. It does not create any connection threads of\nits own.\n \nNote: You can also use \nmysqladmin kill thread_id [,thread_id...]\nto kill connections. To get a list of running queries,\nuse mysqladmin processlist. See mysqladmin.\n \nPercona Toolkit contains a program, pt-kill that can be used\nto automatically kill connections that match certain\ncriteria. For example, it can be used to terminate idle\nconnections, or connections that have been busy for more\nthan 60 seconds.\n \n\n\nURL:\nhttps://mariadb.com/kb/en/data-manipulation-kill-connection-query/','','https://mariadb.com/kb/en/data-manipulation-kill-connection-query/'),(695,'JSON_ARRAY',41,'JSON functions were added in MariaDB 10.2.3.\n \nSyntax\n------ \nJSON_ARRAY([value[, value2] ...])\n \nDescription\n----------- \nReturns a JSON array containing the listed values. The list\ncan be empty.\n \nExample\n \nSELECT Json_Array(56, 3.1416, \'My name is \"Foo\"\', NULL);\n+--------------------------------------------------+\n| Json_Array(56, 3.1416, \'My name is \"Foo\"\', NULL) |\n+--------------------------------------------------+\n| [56, 3.1416, \"My name is \\\"Foo\\\"\", null] |\n+--------------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/json_array/','','https://mariadb.com/kb/en/json_array/'),(698,'JSON_COMPACT',41,'This function was added in MariaDB 10.2.4.\n \nSyntax\n------ \nJSON_COMPACT(json_doc)\n \nDescription\n----------- \nRemoves all unnecessary spaces so the json document is as\nshort as possible.\n \nExample\n \nSET @j = \'{ \"A\": 1, \"B\": [2, 3]}\';\n \nSELECT JSON_COMPACT(@j), @j;\n+-------------------+------------------------+\n| JSON_COMPACT(@j) | @j |\n+-------------------+------------------------+\n| {\"A\":1,\"B\":[2,3]} | { \"A\": 1, \"B\": [2, 3]} |\n+-------------------+------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/json_compact/','','https://mariadb.com/kb/en/json_compact/'),(702,'JSON_DETAILED',41,'This function was added in MariaDB 10.2.4.\n \nSyntax\n------ \nJSON_DETAILED(json_doc[, tab_size])\n \nDescription\n----------- \nRepresents JSON in the most understandable way emphasizing\nnested structures.\n \nExample\n \nSET @j = \'{ \"A\":1,\"B\":[2,3]}\';\n \nSELECT @j;\n+--------------------+\n| @j |\n+--------------------+\n| { \"A\":1,\"B\":[2,3]} |\n+--------------------+\n \nSELECT JSON_DETAILED(@j);\n+------------------------------------------------------------+\n| JSON_DETAILED(@j) |\n+------------------------------------------------------------+\n| {\n \"A\": 1,\n \"B\": \n [\n 2,\n 3\n ]\n} |\n+------------------------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/json_detailed/','','https://mariadb.com/kb/en/json_detailed/'),(348,'RESET',26,'Syntax\n------ \nRESET reset_option [, reset_option] ...\n \nDescription\n----------- \nThe RESET statement is used to clear the state of various\nserver\noperations. You must have the RELOAD privilege to execute\nRESET.\n \nRESET acts as a stronger version of the FLUSH statement.\n \nThe different RESET options are:\n \nOption | Description | \n \nSLAVE [\"connection_name\"] [ALL] | Deletes all relay logs\nfrom the slave and reset the replication position in the\nmaster binary log. | \n \nMASTER | Deletes all old binary logs, makes the binary index\nfile (--log-bin-index) empty and creates a new binary log\nfile. This is useful when you want to reset the master to an\ninitial state. If you want to just delete old, not used\nbinary logs, you should use the PURGE BINARY LOGS command. |\n\n \nQUERY CACHE | Removes all queries from the query cache. See\nalso FLUSH QUERY CACHE. | \n \n\n \n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/reset/','','https://mariadb.com/kb/en/reset/'),(349,'SET',26,'Syntax\n------ \nSET variable_assignment [, variable_assignment] ...\n \nvariable_assignment:\n user_var_name = expr\n | [GLOBAL | SESSION] system_var_name = expr\n | [@@global. | @@session. | @@]system_var_name = expr\n \nOne can also set a user variable in any expression with this\nsyntax:\n \nuser_var_name:= expr\n \nDescription\n----------- \nThe SET statement assigns values to different types of\nvariables that affect the operation of the server or your\nclient. Older\nversions of MySQL employed SET OPTION, but this syntax was\ndeprecated in favor of SET without OPTION, and was removed\nin MariaDB 10.0.\n \nChanging a system variable by using the SET statement does\nnot make the change permanently. To do so, the change must\nbe made in a configuration file.\n \nFor setting variables on a per-query basis (from MariaDB\n10.1.2), see SET STATEMENT.\n \nSee SHOW VARIABLES for documentation on viewing server\nsystem variables.\n \nSee Server System Variables for a list of all the system\nvariables.\n \nGLOBAL / SESSION\n \nWhen setting a system variable, the scope can be specified\nas either GLOBAL or SESSION.\n \nA global variable change affects all new sessions. It does\nnot affect any currently open sessions, including the one\nthat made the change. \n \nA session variable change affects the current session only.\n \nIf the variable has a session value, not specifying either\nGLOBAL or SESSION will be the same as specifying SESSION. If\nthe variable only has a global value, not specifying GLOBAL\nor SESSION will apply to the change to the global value.\n \nDEFAULT\n \nSetting a global variable to DEFAULT will restore it to the\nserver default, and setting a session variable to DEFAULT\nwill restore it to the current global value.\n \nExamples\n-------- \ninnodb_sync_spin_loops is a global variable.\nskip_parallel_replication is a session variable.\nmax_error_count is both global and session.\n \nSELECT VARIABLE_NAME, SESSION_VALUE, GLOBAL_VALUE FROM\n INFORMATION_SCHEMA.SYSTEM_VARIABLES WHERE \n VARIABLE_NAME LIKE \'max_error_count\' OR \n VARIABLE_NAME LIKE \'skip_parallel_replication\' OR \n VARIABLE_NAME LIKE \'innodb_sync_spin_loops\';\n \n+---------------------------+---------------+--------------+\n| VARIABLE_NAME | SESSION_VALUE | GLOBAL_VALUE |\n+---------------------------+---------------+--------------+\n| MAX_ERROR_COUNT | 64 | 64 |\n| SKIP_PARALLEL_REPLICATION | OFF | NULL |\n| INNODB_SYNC_SPIN_LOOPS | NULL | 30 |\n+---------------------------+---------------+--------------+\n \nSetting the session values:\n \nSET max_error_count=128;\nQuery OK, 0 rows affected (0.000 sec)\n \nSET skip_parallel_replication=ON;\nQuery OK, 0 rows affected (0.000 sec)\n \nSET innodb_sync_spin_loops=60;\n \nERROR 1229 (HY000): Variable \'innodb_sync_spin_loops\' is a\nGLOBAL variable \n and should be set with SET GLOBAL\n \nSELECT VARIABLE_NAME, SESSION_VALUE, GLOBAL_VALUE FROM\n INFORMATION_SCHEMA.SYSTEM_VARIABLES WHERE \n VARIABLE_NAME LIKE \'max_error_count\' OR \n VARIABLE_NAME LIKE \'skip_parallel_replication\' OR \n VARIABLE_NAME LIKE \'innodb_sync_spin_loops\';\n \n+---------------------------+---------------+--------------+\n| VARIABLE_NAME | SESSION_VALUE | GLOBAL_VALUE |\n+---------------------------+---------------+--------------+\n| MAX_ERROR_COUNT | 128 | 64 |\n| SKIP_PARALLEL_REPLICATION | ON | NULL |\n| INNODB_SYNC_SPIN_LOOPS | NULL | 30 |\n+---------------------------+---------------+--------------+\n \nSetting the global values:\n \nSET GLOBAL max_error_count=256;\n \nSET GLOBAL skip_parallel_replication=ON;\n \nERROR 1228 (HY000): Variable \'skip_parallel_replication\'\nis a SESSION variable \n and can\'t be used with SET GLOBAL\n \nSET GLOBAL innodb_sync_spin_loops=120;\n \nSELECT VARIABLE_NAME, SESSION_VALUE, GLOBAL_VALUE FROM\n INFORMATION_SCHEMA.SYSTEM_VARIABLES WHERE \n VARIABLE_NAME LIKE \'max_error_count\' OR \n VARIABLE_NAME LIKE \'skip_parallel_replication\' OR \n VARIABLE_NAME LIKE \'innodb_sync_spin_loops\';\n \n+---------------------------+---------------+--------------+\n| VARIABLE_NAME | SESSION_VALUE | GLOBAL_VALUE |\n+---------------------------+---------------+--------------+\n| MAX_ERROR_COUNT | 128 | 256 |\n| SKIP_PARALLEL_REPLICATION | ON | NULL |\n| INNODB_SYNC_SPIN_LOOPS | NULL | 120 |\n+---------------------------+---------------+--------------+\n \nSHOW VARIABLES will by default return the session value\nunless the variable is global only.\n \nSHOW VARIABLES LIKE \'max_error_count\';\n \n+-----------------+-------+\n| Variable_name | Value |\n+-----------------+-------+\n| max_error_count | 128 |\n+-----------------+-------+\n \nSHOW VARIABLES LIKE \'skip_parallel_replication\';\n \n+---------------------------+-------+\n| Variable_name | Value |\n+---------------------------+-------+\n| skip_parallel_replication | ON |\n+---------------------------+-------+\n \nSHOW VARIABLES LIKE \'innodb_sync_spin_loops\';\n \n+------------------------+-------+\n| Variable_name | Value |\n+------------------------+-------+\n| innodb_sync_spin_loops | 120 |\n+------------------------+-------+\n \nUsing the inplace syntax:\n \nSELECT (@a:=1);\n+---------+\n| (@a:=1) |\n+---------+\n| 1 |\n+---------+\n \nSELECT @a;\n \n+------+\n| @a |\n+------+\n| 1 |\n+------+\n \n\n\nURL: https://mariadb.com/kb/en/set/','','https://mariadb.com/kb/en/set/'),(708,'JSON_LOOSE',41,'This function was added in MariaDB 10.2.4.\n \nSyntax\n------ \nJSON_LOOSE(json_doc)\n \nDescription\n----------- \nAdds spaces to a JSON document to make it look more\nreadable.\n \nExample\n \nSET @j = \'{ \"A\":1,\"B\":[2,3]}\';\n \nSELECT JSON_LOOSE(@j), @j;\n+-----------------------+--------------------+\n| JSON_LOOSE(@j) | @j |\n+-----------------------+--------------------+\n| {\"A\": 1, \"B\": [2, 3]} | { \"A\":1,\"B\":[2,3]} |\n+-----------------------+--------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/json_loose/','','https://mariadb.com/kb/en/json_loose/'),(712,'JSON_OBJECT',41,'JSON functions were added in MariaDB 10.2.3.\n \nSyntax\n------ \nJSON_OBJECT([key, value[, key, value] ...])\n \nDescription\n----------- \nReturns a JSON object containing the given key/value pairs.\nThe key/value list can be empty.\n \nAn error will occur if there are an odd number of arguments,\nor any key name is NULL.\n \nExample\n \nSELECT JSON_OBJECT(\"id\", 1, \"name\", \"Monty\");\n+---------------------------------------+\n| JSON_OBJECT(\"id\", 1, \"name\", \"Monty\") |\n+---------------------------------------+\n| {\"id\": 1, \"name\": \"Monty\"} |\n+---------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/json_object/','','https://mariadb.com/kb/en/json_object/'),(350,'About SHOW',26,'SHOW has many forms that provide information about\ndatabases, tables, columns, or status information about the\nserver. These include:\nSHOW AUTHORS\nSHOW CHARACTER SET [like_or_where]\nSHOW COLLATION [like_or_where]\nSHOW [FULL] COLUMNS FROM tbl_name [FROM db_name]\n[like_or_where]\nSHOW CONTRIBUTORS\nSHOW CREATE DATABASE db_name\nSHOW CREATE EVENT event_name\nSHOW CREATE PACKAGE package_name\nSHOW CREATE PACKAGE BODY package_name\nSHOW CREATE PROCEDURE proc_name\nSHOW CREATE TABLE tbl_name\nSHOW CREATE TRIGGER trigger_name\nSHOW CREATE VIEW view_name\nSHOW DATABASES [like_or_where]\nSHOW ENGINE engine_name {STATUS | MUTEX}\nSHOW [STORAGE] ENGINES\nSHOW ERRORS [LIMIT [offset,] row_count]\nSHOW [FULL] EVENTS\nSHOW FUNCTION CODE func_name\nSHOW FUNCTION STATUS [like_or_where]\nSHOW GRANTS FOR user\nSHOW INDEX FROM tbl_name [FROM db_name]\nSHOW INNODB STATUS\nSHOW OPEN TABLES [FROM db_name] [like_or_where]\nSHOW PLUGINS\nSHOW PROCEDURE CODE proc_name\nSHOW PROCEDURE STATUS [like_or_where]\nSHOW PRIVILEGES\nSHOW [FULL] PROCESSLIST\nSHOW PROFILE [types] [FOR QUERY n] [OFFSET n] [LIMIT n]\nSHOW PROFILES\nSHOW [GLOBAL | SESSION] STATUS [like_or_where]\nSHOW TABLE STATUS [FROM db_name] [like_or_where]\nSHOW TABLES [FROM db_name] [like_or_where]\nSHOW TRIGGERS [FROM db_name] [like_or_where]\nSHOW [GLOBAL | SESSION] VARIABLES [like_or_where]\nSHOW WARNINGS [LIMIT [offset,] row_count]\n \nlike_or_where:\n LIKE \'pattern\'\n | WHERE expr\n \nIf the syntax for a given SHOW statement includes a\nLIKE \'pattern\' part, \'pattern\' is a\nstring that can contain the SQL \"%\" and\n\"_\" wildcard characters. The pattern is useful for\nrestricting statement output to matching values.\n \nSeveral SHOW statements also accept a\nWHERE clause that provides more flexibility in specifying\nwhich rows to display. See Extended Show.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/about-show/','','https://mariadb.com/kb/en/about-show/'),(351,'SHOW AUTHORS',26,'Syntax\n------ \nSHOW AUTHORS\n \nDescription\n----------- \nThe SHOW AUTHORS statement displays information about the\npeople who work on MariaDB. For each author, it displays\nName, Location, and\nComment values. All columns are encoded as latin1.\n \nIn MariaDB 5.5 this is in somewhat random order.\n \nIn MariaDB 10.0.5 and later you have:\nFirst the active people in MariaDB are listed.\nThen the active people in MySQL.\nLast the people that has contributed to MariaDB/MySQL in the\npast.\n \nThe order is somewhat related to importance of the\ncontribution given to the MariaDB project, but this is not\n100% accurate. There is still room for improvements and\ndebate...\n \nExample\n \nSHOW AUTHORS;\n+--------------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+\n| Name | Location | Comment |\n+--------------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+\n| Michael (Monty) Widenius | Tusby, Finland | Lead developer\nand main author |\n| Sergei Golubchik | Kerpen, Germany | Architect, Full-text\nsearch, precision math, plugin framework, merges etc |\n| Igor Babaev | Bellevue, USA | Optimizer, keycache, core\nwork |\n| Sergey Petrunia | St. Petersburg, Russia | Optimizer |\n| Oleksandr Byelkin | Lugansk, Ukraine | Query Cache (4.0),\nSubqueries (4.1), Views (5.0) |\n| Timour Katchaounov | Sofia , Bulgaria | Optimizer |\n| Kristian Nielsen | Copenhagen, Denmark | Replication,\nAsync client prototocol, General buildbot stuff |\n| Alexander (Bar) Barkov | Izhevsk, Russia | Unicode and\ncharacter sets |\n| Alexey Botchkov (Holyfoot) | Izhevsk, Russia | GIS\nextensions, embedded server, precision math |\n| Daniel Bartholomew | Raleigh, USA | MariaDB documentation\n|\n| Colin Charles | Selangor, Malesia | MariaDB documentation,\ntalks at a LOT of conferences |\n| Sergey Vojtovich | Izhevsk, Russia | initial\nimplementation of plugin architecture, maintained native\nstorage engines (MyISAM, MEMORY, ARCHIVE, etc), rewrite of\ntable cache |\n| Vladislav Vaintroub | Mannheim, Germany | MariaDB Java\nconnector, new thread pool, Windows optimizations |\n| Elena Stepanova | Sankt Petersburg, Russia | QA, test\ncases |\n| Georg Richter | Heidelberg, Germany | New LGPL C\nconnector, PHP connector |\n| Jan Lindström | Ylämylly, Finland | Working on InnoDB |\n| Lixun Peng | Hangzhou, China | Multi Source replication |\n| Percona | CA, USA | XtraDB, microslow patches, extensions\nto slow log \n...\n \nSee Also\n \nSHOW CONTRIBUTORS. This list all members and sponsors of the\nMariaDB Foundation and other sponsors.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/show-authors/','','https://mariadb.com/kb/en/show-authors/'),(352,'SHOW BINARY LOGS',26,'Syntax\n------ \nSHOW BINARY LOGS\nSHOW MASTER LOGS\n \nDescription\n----------- \nLists the binary log files on the server. This statement is\nused as part of the\nprocedure described in \nPURGE BINARY LOGS, that shows how to\ndetermine which logs can be purged.\n \nExamples\n-------- \nSHOW BINARY LOGS;\n+--------------------+-----------+\n| Log_name | File_size |\n+--------------------+-----------+\n| mariadb-bin.000001 | 19039 |\n| mariadb-bin.000002 | 717389 |\n| mariadb-bin.000003 | 300 |\n| mariadb-bin.000004 | 333 |\n| mariadb-bin.000005 | 899 |\n| mariadb-bin.000006 | 125 |\n| mariadb-bin.000007 | 18907 |\n| mariadb-bin.000008 | 19530 |\n| mariadb-bin.000009 | 151 |\n| mariadb-bin.000010 | 151 |\n| mariadb-bin.000011 | 125 |\n| mariadb-bin.000012 | 151 |\n| mariadb-bin.000013 | 151 |\n| mariadb-bin.000014 | 125 |\n| mariadb-bin.000015 | 151 |\n| mariadb-bin.000016 | 314 |\n+--------------------+-----------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/show-binary-logs/','','https://mariadb.com/kb/en/show-binary-logs/'),(718,'JSON_SET',41,'JSON functions were added in MariaDB 10.2.3.\n \nSyntax\n------ \nJSON_SET(json_doc, path, val[, path, val] ...)\n \nDescription\n----------- \nUpdates or inserts data into a JSON document, returning the\nresult, or NULL if any of the arguments are NULL or the\noptional path fails to find an object.\n \nAn error will occur if the JSON document is invalid, the\npath is invalid or if the path contains a * or wildcard.\n \nJSON_SET can update or insert data, while JSON_REPLACE can\nonly update, and JSON_INSERT only insert. \n \nExamples\n-------- \n\n \n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/json_set/','','https://mariadb.com/kb/en/json_set/'),(724,'Aggregate Functions as Window Functions',42,'Window functions were first introduced in MariaDB 10.2.0.\n \nIt is possible to use aggregate functions as window\nfunctions. An aggregate function used as a window function\nmust have the OVER clause. For example, here\'s COUNT() used\nas a window function:\n \nselect COUNT(*) over (order by column) from table;\n \nMariaDB currently allows these aggregate functions to be\nused as window functions: \nAVG\nBIT_AND\nBIT_OR\nBIT_XOR\nCOUNT\nMAX\nMIN\nSTD\nSTDDEV\nSTDDEV_POP\nSTDDEV_SAMP\nSUM\nVAR_POP\nVAR_SAMP\nVARIANCE\n \n\n \n \n \n \n \n \n \n\nURL:\nhttps://mariadb.com/kb/en/library/aggregate-functions-as-window-functions/','','https://mariadb.com/kb/en/library/aggregate-functions-as-window-functions/'),(726,'CUME_DIST',42,'The CUME_DIST() function was first introduced with window\nfunctions in MariaDB 10.2.0.\n \nSyntax\n------ \nCUME_DIST() OVER ( \n [ PARTITION BY partition_expression ] \n [ ORDER BY order_list ]\n)\n \nDescription\n----------- \nCUME_DIST() is a window function that returns the cumulative\ndistribution of a given row. The following formula is used\nto calculate the value:\n \n(number of rows \n\nURL: https://mariadb.com/kb/en/cume_dist/','','https://mariadb.com/kb/en/cume_dist/'),(353,'SHOW BINLOG EVENTS',26,'Syntax\n------ \nSHOW BINLOG EVENTS\n [IN \'log_name\'] [FROM pos] [LIMIT [offset,] row_count]\n \nDescription\n----------- \nShows the events in the binary log. If you do not specify\n\'log_name\',\nthe first binary log is displayed.\n \nExample\n \nSHOW BINLOG EVENTS IN \'mysql_sandbox10019-bin.000002\';\n+-------------------------------+-----+-------------------+-----------+-------------+------------------------------------------------+\n| Log_name | Pos | Event_type | Server_id | End_log_pos |\nInfo |\n+-------------------------------+-----+-------------------+-----------+-------------+------------------------------------------------+\n| mysql_sandbox10019-bin.000002 | 4 | Format_desc | 1 | 248\n| Server ver: 10.0.19-MariaDB-log, Binlog ver: 4 |\n| mysql_sandbox10019-bin.000002 | 248 | Gtid_list | 1 | 273\n| [] |\n| mysql_sandbox10019-bin.000002 | 273 | Binlog_checkpoint |\n1 | 325 | mysql_sandbox10019-bin.000002 |\n| mysql_sandbox10019-bin.000002 | 325 | Gtid | 1 | 363 |\nGTID 0-1-1 |\n| mysql_sandbox10019-bin.000002 | 363 | Query | 1 | 446 |\nCREATE DATABASE blog |\n| mysql_sandbox10019-bin.000002 | 446 | Gtid | 1 | 484 |\nGTID 0-1-2 |\n| mysql_sandbox10019-bin.000002 | 484 | Query | 1 | 571 |\nuse `blog`; CREATE TABLE bb (id INT) |\n+-------------------------------+-----+-------------------+-----------+-------------+------------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/show-binlog-events/','','https://mariadb.com/kb/en/show-binlog-events/'),(354,'SHOW CHARACTER SET',26,'Syntax\n------ \nSHOW CHARACTER SET\n [LIKE \'pattern\' | WHERE expr]\n \nDescription\n----------- \nThe SHOW CHARACTER SET statement shows all available\ncharacter sets. The LIKE clause, if present on its own,\nindicates which character\nset names to match. The WHERE and LIKE clauses can be given\nto select rows using more general conditions, as discussed\nin Extended SHOW.\n \nThe same information can be queried from the\ninformation_schema.CHARACTER_SETS table.\n \nSee Setting Character Sets and Collations for details on\nspecifying the character set at the server, database, table\nand column levels.\n \nExamples\n-------- \nSHOW CHARACTER SET LIKE \'latin%\';\n+---------+-----------------------------+-------------------+--------+\n| Charset | Description | Default collation | Maxlen |\n+---------+-----------------------------+-------------------+--------+\n| latin1 | cp1252 West European | latin1_swedish_ci | 1 |\n| latin2 | ISO 8859-2 Central European | latin2_general_ci |\n1 |\n| latin5 | ISO 8859-9 Turkish | latin5_turkish_ci | 1 |\n| latin7 | ISO 8859-13 Baltic | latin7_general_ci | 1 |\n+---------+-----------------------------+-------------------+--------+\n \nSHOW CHARACTER SET WHERE Maxlen LIKE \'2\';\n+---------+---------------------------+-------------------+--------+\n| Charset | Description | Default collation | Maxlen |\n+---------+---------------------------+-------------------+--------+\n| big5 | Big5 Traditional Chinese | big5_chinese_ci | 2 |\n| sjis | Shift-JIS Japanese | sjis_japanese_ci | 2 |\n| euckr | EUC-KR Korean | euckr_korean_ci | 2 |\n| gb2312 | GB2312 Simplified Chinese | gb2312_chinese_ci | 2\n|\n| gbk | GBK Simplified Chinese | gbk_chinese_ci | 2 |\n| ucs2 | UCS-2 Unicode | ucs2_general_ci | 2 |\n| cp932 | SJIS for Windows Japanese | cp932_japanese_ci | 2\n|\n+---------+---------------------------+-------------------+--------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/show-character-set/','','https://mariadb.com/kb/en/show-character-set/'),(355,'SHOW CLIENT_STATISTICS',26,'MariaDB 5.2 introduced the User Statistics feature.\n \nSyntax\n------ \nSHOW CLIENT_STATISTICS\n \nDescription\n----------- \nThe SHOW CLIENT_STATISTICS statement was introduced in\nMariaDB 5.2 as part of the User Statistics feature. It was\nremoved as a separate statement in MariaDB 10.1.1, but\neffectively replaced by the generic SHOW\ninformation_schema_table statement. The\ninformation_schema.CLIENT_STATISTICS table holds statistics\nabout client connections.\n \nThe userstat system variable must be set to 1 to activate\nthis feature. See the User Statistics and\ninformation_schema.CLIENT_STATISTICS articles for more\ninformation.\n \nExample\n \nFrom MariaDB 10.0:\n \nSHOW CLIENT_STATISTICS\\G\n*************************** 1. row\n***************************\n Client: localhost\n Total_connections: 35\nConcurrent_connections: 0\n Connected_time: 708\n Busy_time: 2.5557979999999985\n Cpu_time: 0.04123740000000002\n Bytes_received: 3883\n Bytes_sent: 21595\n Binlog_bytes_written: 0\n Rows_read: 18\n Rows_sent: 115\n Rows_deleted: 0\n Rows_inserted: 0\n Rows_updated: 0\n Select_commands: 70\n Update_commands: 0\n Other_commands: 0\n Commit_transactions: 1\n Rollback_transactions: 0\n Denied_connections: 0\n Lost_connections: 0\n Access_denied: 0\n Empty_queries: 35\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/show-client-statistics/','','https://mariadb.com/kb/en/show-client-statistics/'),(356,'SHOW COLLATION',26,'Syntax\n------ \nSHOW COLLATION\n [LIKE \'pattern\' | WHERE expr]\n \nDescription\n----------- \nThe output from SHOW COLLATION includes all available\ncollations. The LIKE clause, if present on its own,\nindicates which collation names to match. The WHERE and LIKE\nclauses can be given to select rows using more general\nconditions, as discussed in Extended SHOW.\n \nThe same information can be queried from the\ninformation_schema.COLLATIONS table.\n \nSee Setting Character Sets and Collations for details on\nspecifying the collation at the server, database, table and\ncolumn levels.\n \nExamples\n-------- \nSHOW COLLATION LIKE \'latin1%\';\n+-------------------+---------+----+---------+----------+---------+\n| Collation | Charset | Id | Default | Compiled | Sortlen |\n+-------------------+---------+----+---------+----------+---------+\n| latin1_german1_ci | latin1 | 5 | | Yes | 1 |\n| latin1_swedish_ci | latin1 | 8 | Yes | Yes | 1 |\n| latin1_danish_ci | latin1 | 15 | | Yes | 1 |\n| latin1_german2_ci | latin1 | 31 | | Yes | 2 |\n| latin1_bin | latin1 | 47 | | Yes | 1 |\n| latin1_general_ci | latin1 | 48 | | Yes | 1 |\n| latin1_general_cs | latin1 | 49 | | Yes | 1 |\n| latin1_spanish_ci | latin1 | 94 | | Yes | 1 |\n+-------------------+---------+----+---------+----------+---------+\n \nSHOW COLLATION WHERE Sortlen LIKE \'8\' AND Charset LIKE\n\'utf8\';\n+--------------------+---------+-----+---------+----------+---------+\n| Collation | Charset | Id | Default | Compiled | Sortlen |\n+--------------------+---------+-----+---------+----------+---------+\n| utf8_unicode_ci | utf8 | 192 | | Yes | 8 |\n| utf8_icelandic_ci | utf8 | 193 | | Yes | 8 |\n| utf8_latvian_ci | utf8 | 194 | | Yes | 8 |\n| utf8_romanian_ci | utf8 | 195 | | Yes | 8 |\n| utf8_slovenian_ci | utf8 | 196 | | Yes | 8 |\n| utf8_polish_ci | utf8 | 197 | | Yes | 8 |\n| utf8_estonian_ci | utf8 | 198 | | Yes | 8 |\n| utf8_spanish_ci | utf8 | 199 | | Yes | 8 |\n| utf8_swedish_ci | utf8 | 200 | | Yes | 8 |\n| utf8_turkish_ci | utf8 | 201 | | Yes | 8 |\n| utf8_czech_ci | utf8 | 202 | | Yes | 8 |\n| utf8_danish_ci | utf8 | 203 | | Yes | 8 |\n| utf8_lithuanian_ci | utf8 | 204 | | Yes | 8 |\n| utf8_slovak_ci | utf8 | 205 | | Yes | 8 |\n| utf8_spanish2_ci | utf8 | 206 | | Yes | 8 |\n| utf8_roman_ci | utf8 | 207 | | Yes | 8 |\n| utf8_persian_ci | utf8 | 208 | | Yes | 8 |\n| utf8_esperanto_ci | utf8 | 209 | | Yes | 8 |\n| utf8_hungarian_ci | utf8 | 210 | | Yes | 8 |\n| utf8_sinhala_ci | utf8 | 211 | | Yes | 8 |\n| utf8_croatian_ci | utf8 | 213 | | Yes | 8 |\n+--------------------+---------+-----+---------+----------+---------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/show-collation/','','https://mariadb.com/kb/en/show-collation/'),(357,'SHOW COLUMNS',26,'Syntax\n------ \nSHOW [FULL] {COLUMNS | FIELDS} FROM tbl_name [FROM db_name]\n [LIKE \'pattern\' | WHERE expr]\n \nDescription\n----------- \nSHOW COLUMNS displays information about the columns in a\ngiven table. It also works for views. The LIKE clause, if\npresent on its own, indicates which column names to match.\nThe WHERE and LIKE clauses can be given to select rows using\nmore general conditions, as discussed in Extended SHOW.\n \nIf the data types differ from what you expect them to be\nbased on a\nCREATE TABLE statement, note that MariaDB sometimes changes\ndata types when you create or alter a table. The conditions\nunder which this\noccurs are described in the Silent Column Changes article.\n \nThe FULL keyword causes the output to include the column\ncollation and comments, as well as the privileges you have\nfor each column.\n \nYou can use db_name.tbl_name as an alternative to the\ntbl_name FROM db_name syntax. In other words, these two\nstatements are equivalent:\n \nSHOW COLUMNS FROM mytable FROM mydb;\nSHOW COLUMNS FROM mydb.mytable;\n \nSHOW COLUMNS displays the following values for each table\ncolumn:\n \nField indicates the column name.\n \nType indicates the column data type.\n \nCollation indicates the collation for non-binary string\ncolumns, or\nNULL for other columns. This value is displayed only if you\nuse the\nFULL keyword.\n \nThe Null field contains YES if NULL values can be stored in\nthe column,\nNO if not.\n \nThe Key field indicates whether the column is indexed:\nIf Key is empty, the column either is not indexed or is\nindexed only as a\n secondary column in a multiple-column, non-unique index.\nIf Key is PRI, the column is a PRIMARY KEY or\n is one of the columns in a multiple-column PRIMARY KEY.\nIf Key is UNI, the column is the first column of a\nunique-valued\n index that cannot contain NULL values.\nIf Key is MUL, multiple occurrences of a given value are\nallowed\n within the column. The column is the first column of a\nnon-unique index or a\n unique-valued index that can contain NULL values.\n \nIf more than one of the Key values applies to a given column\nof a\ntable, Key displays the one with the highest priority, in\nthe order\nPRI, UNI, MUL.\n \nA UNIQUE index may be displayed as PRI if\nit cannot contain NULL values and there is no\nPRIMARY KEY in the table. A UNIQUE index\nmay display as MUL if several columns form a composite\nUNIQUE index; although the combination of the columns is\nunique, each column can still hold multiple occurrences of a\ngiven value.\n \nThe Default field indicates the default value that is\nassigned to the\ncolumn.\n \nThe Extra field contains any additional information that is\navailable about a given column.\n \nValue | Description | \n \nAUTO_INCREMENT | The column was created with the\nAUTO_INCREMENT keyword. | \n \nPERSISTENT | The column was created with the PERSISTENT\nkeyword. (New in 5.3) | \n \nVIRTUAL | The column was created with the VIRTUAL keyword.\n(New in 5.3) | \n \non update CURRENT_TIMESTAMP | The column is a TIMESTAMP\ncolumn that is automatically updated on INSERT and UPDATE. |\n\n \nPrivileges indicates the privileges you have for the column.\nThis\nvalue is displayed only if you use the FULL keyword.\n \nComment indicates any comment the column has. This value is\ndisplayed\nonly if you use the FULL keyword.\n \nSHOW FIELDS is a synonym for\nSHOW COLUMNS. Also DESCRIBE and EXPLAIN can be used as\nshortcuts.\n \nYou can also list a table\'s columns with: \n \nmysqlshow db_name tbl_name\n \nSee the mysqlshow command for more details.\n \nThe DESCRIBE statement provides information similar to SHOW\nCOLUMNS. The information_schema.COLUMNS table provides\nsimilar, but more complete, information.\n \nThe SHOW CREATE TABLE, SHOW TABLE STATUS, and SHOW INDEX\nstatements also provide information about tables.\n \nExamples\n-------- \nSHOW COLUMNS FROM city;\n+------------+----------+------+-----+---------+----------------+\n| Field | Type | Null | Key | Default | Extra |\n+------------+----------+------+-----+---------+----------------+\n| Id | int(11) | NO | PRI | NULL | auto_increment |\n| Name | char(35) | NO | | | |\n| Country | char(3) | NO | UNI | | |\n| District | char(20) | YES | MUL | | |\n| Population | int(11) | NO | | 0 | |\n+------------+----------+------+-----+---------+----------------+\n \nSHOW COLUMNS FROM employees WHERE Type LIKE \'Varchar%\';\n+---------------+-------------+------+-----+---------+-------+\n| Field | Type | Null | Key | Default | Extra |\n+---------------+-------------+------+-----+---------+-------+\n| first_name | varchar(30) | NO | MUL | NULL | |\n| last_name | varchar(40) | NO | | NULL | |\n| position | varchar(25) | NO | | NULL | |\n| home_address | varchar(50) | NO | | NULL | |\n| home_phone | varchar(12) | NO | | NULL | |\n| employee_code | varchar(25) | NO | UNI | NULL | |\n+---------------+-------------+------+-----+---------+-------+\n \n\n\nURL: https://mariadb.com/kb/en/show-columns/','','https://mariadb.com/kb/en/show-columns/'),(732,'NTH_VALUE',42,'The NTH_VALUE() function was first introduced with other\nwindow functions in MariaDB 10.2.\n \nSyntax\n------ \nNTH_VALUE (expr[, num_row]) OVER ( \n [ PARTITION BY partition_expression ] \n [ ORDER BY order_list ]\n)\n \nDescription\n----------- \nThe NTH_VALUE function returns the value evaluated at row\nnumber num_row of the window frame, starting from 1, or NULL\nif the row does not exist.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/nth_value/','','https://mariadb.com/kb/en/nth_value/'),(742,'SPIDER_FLUSH_TABLE_MON_CACHE',43,'Syntax\n------ \nSPIDER_FLUSH_TABLE_MON_CACHE()\n \nDescription\n----------- \nA UDF installed with the Spider Storage Engine, this\nfunction is used for refreshing monitoring server\ninformation. It returns a value of 1.\n \nExamples\n-------- \nSELECT SPIDER_FLUSH_TABLE_MON_CACHE();\n+--------------------------------+\n| SPIDER_FLUSH_TABLE_MON_CACHE() |\n+--------------------------------+\n| 1 |\n+--------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/spider_flush_table_mon_cache/','','https://mariadb.com/kb/en/spider_flush_table_mon_cache/'),(744,'COLUMN_CHECK',44,'The COLUMN_CHECK function was added in MariaDB 10.0.1.\n \nSyntax\n------ \nCOLUMN_CHECK(dyncol_blob);\n \nDescription\n----------- \nCheck if dyncol_blob is a valid packed dynamic columns blob.\nReturn value of 1 means the blob is valid, return value of 0\nmeans it is not.\n \nRationale:\nNormally, one works with valid dynamic column blobs.\nFunctions like COLUMN_CREATE, COLUMN_ADD, COLUMN_DELETE\nalways return valid dynamic column blobs. However, if a\ndynamic column blob is accidentally truncated, or transcoded\nfrom one character set to another, it will be corrupted.\nThis function can be used to check if a value in a blob\nfield is a valid dynamic column blob.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/column_check/','','https://mariadb.com/kb/en/column_check/'),(746,'COLUMN_DELETE',44,'The Dynamic columns feature was introduced in MariaDB 5.3.\n \nSyntax\n------ \nCOLUMN_DELETE(dyncol_blob, column_nr, column_nr...);\nCOLUMN_DELETE(dyncol_blob, column_name, column_name...);\n \nDescription\n----------- \nDeletes a dynamic column with the specified name. Multiple\nnames can be given. The return value is a dynamic column\nblob after the modification.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/column_delete/','','https://mariadb.com/kb/en/column_delete/'),(747,'COLUMN_EXISTS',44,'The Dynamic columns feature was introduced in MariaDB 5.3.\n \nSyntax\n------ \nCOLUMN_EXISTS(dyncol_blob, column_nr);\nCOLUMN_EXISTS(dyncol_blob, column_name);\n \nDescription\n----------- \nChecks if a column with name column_name exists in\ndyncol_blob. If yes, return 1, otherwise return 0. See\ndynamic columns for more information.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/column_exists/','','https://mariadb.com/kb/en/column_exists/'),(358,'SHOW CONTRIBUTORS',26,'Syntax\n------ \nSHOW CONTRIBUTORS\n \nDescription\n----------- \nThe SHOW CONTRIBUTORS statement displays information about\nthe companies and people who financially contribute to\nMariaDB. For each contributor, it displays Name, Location,\nand Comment values. All columns are encoded as latin1.\n \nIn MariaDB 5.5 this is in somewhat random order, and the\nfeature was deprecated.\n \nIn MariaDB 10.0.5 it was un-deprecated, and since then\ndisplays all members and sponsors of the MariaDB Foundation\nas well as other financial contributors.\n \nExample\n \nSHOW CONTRIBUTORS;\n+---------------------+-------------------------------+-------------------------------------------------------------+\n| Name | Location | Comment |\n+---------------------+-------------------------------+-------------------------------------------------------------+\n| Booking.com | https://www.booking.com | Founding member,\nPlatinum Sponsor of the MariaDB Foundation |\n| Alibaba Cloud | https://www.alibabacloud.com/ | Platinum\nSponsor of the MariaDB Foundation |\n| Tencent Cloud | https://cloud.tencent.com | Platinum\nSponsor of the MariaDB Foundation |\n| Microsoft | https://microsoft.com/ | Platinum Sponsor of\nthe MariaDB Foundation |\n| MariaDB Corporation | https://mariadb.com | Founding\nmember, Platinum Sponsor of the MariaDB Foundation |\n| Visma | https://visma.com | Gold Sponsor of the MariaDB\nFoundation |\n| DBS | https://dbs.com | Gold Sponsor of the MariaDB\nFoundation |\n| IBM | https://www.ibm.com | Gold Sponsor of the MariaDB\nFoundation |\n| Tencent Games | http://game.qq.com/ | Gold Sponsor of the\nMariaDB Foundation |\n| Nexedi | https://www.nexedi.com | Silver Sponsor of the\nMariaDB Foundation |\n| Acronis | https://www.acronis.com | Silver Sponsor of the\nMariaDB Foundation |\n| Verkkokauppa.com | https://www.verkkokauppa.com | Bronze\nSponsor of the MariaDB Foundation |\n| Virtuozzo | https://virtuozzo.com | Bronze Sponsor of the\nMariaDB Foundation |\n| Tencent Game DBA | http://tencentdba.com/about | Bronze\nSponsor of the MariaDB Foundation |\n| Tencent TDSQL | http://tdsql.org | Bronze Sponsor of the\nMariaDB Foundation |\n| Percona | https://www.percona.com/ | Bronze Sponsor of the\nMariaDB Foundation |\n| Google | USA | Sponsoring encryption, parallel replication\nand GTID |\n| Facebook | USA | Sponsoring non-blocking API, LIMIT ROWS\nEXAMINED etc |\n| Ronald Bradford | Brisbane, Australia | EFF contribution\nfor UC2006 Auction |\n| Sheeri Kritzer | Boston, Mass. USA | EFF contribution for\nUC2006 Auction |\n| Mark Shuttleworth | London, UK. | EFF contribution for\nUC2006 Auction |\n+---------------------+-------------------------------+-------------------------------------------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/show-contributors/','','https://mariadb.com/kb/en/show-contributors/'),(359,'SHOW CREATE DATABASE',26,'Syntax\n------ \nSHOW CREATE {DATABASE | SCHEMA} db_name\n \nDescription\n----------- \nShows the CREATE DATABASE statement that\ncreates the given database. SHOW CREATE SCHEMA is a synonym\nfor SHOW CREATE DATABASE. SHOW CREATE DATABASE quotes\ndatabase names according to the value of the\nsql_quote_show_create server system variable.\n \nExamples\n-------- \nSHOW CREATE DATABASE test;\n+----------+-----------------------------------------------------------------+\n| Database | Create Database |\n+----------+-----------------------------------------------------------------+\n| test | CREATE DATABASE `test` /*!40100 DEFAULT CHARACTER\nSET latin1 */ |\n+----------+-----------------------------------------------------------------+\n \nSHOW CREATE SCHEMA test;\n+----------+-----------------------------------------------------------------+\n| Database | Create Database |\n+----------+-----------------------------------------------------------------+\n| test | CREATE DATABASE `test` /*!40100 DEFAULT CHARACTER\nSET latin1 */ |\n+----------+-----------------------------------------------------------------+\n \nWith sql_quote_show_create off:\n \nSHOW CREATE DATABASE test;\n+----------+---------------------------------------------------------------+\n| Database | Create Database |\n+----------+---------------------------------------------------------------+\n| test | CREATE DATABASE test /*!40100 DEFAULT CHARACTER SET\nlatin1 */ |\n+----------+---------------------------------------------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/show-create-database/','','https://mariadb.com/kb/en/show-create-database/'),(360,'SHOW CREATE EVENT',26,'Syntax\n------ \nSHOW CREATE EVENT event_name\n \nDescription\n----------- \nThis statement displays the CREATE EVENT\nstatement needed to re-create a given event, as well as the\nSQL_MODE that was used when the trigger has been created and\nthe character set used by the connection.. To find out which\nevents are present, use SHOW EVENTS.\n \nThe output of this statement is unreliably affected by the\nsql_quote_show_create server system variable - see\nhttp://bugs.mysql.com/bug.php?id=12719\n \nThe information_schema.EVENTS table provides similar, but\nmore complete, information.\n \nExamples\n-------- \nSHOW CREATE EVENT test.e_daily\\G\n*************************** 1. row\n***************************\n Event: e_daily\n sql_mode: \n time_zone: SYSTEM\n Create Event: CREATE EVENT `e_daily`\n ON SCHEDULE EVERY 1 DAY\n STARTS CURRENT_TIMESTAMP + INTERVAL 6 HOUR\n ON COMPLETION NOT PRESERVE\n ENABLE\n COMMENT \'Saves total number of sessions then\n clears the table each day\'\n DO BEGIN\n INSERT INTO site_activity.totals (time, total)\n SELECT CURRENT_TIMESTAMP, COUNT(*) \n FROM site_activity.sessions;\n DELETE FROM site_activity.sessions;\n END\ncharacter_set_client: latin1\ncollation_connection: latin1_swedish_ci\n Database Collation: latin1_swedish_ci\n \n\n\nURL: https://mariadb.com/kb/en/show-create-event/','','https://mariadb.com/kb/en/show-create-event/'),(750,'COLUMN_LIST',44,'The Dynamic columns feature was introduced in MariaDB 5.3.\n \nSyntax\n------ \nCOLUMN_LIST(dyncol_blob);\n \nDescription\n----------- \nSince MariaDB 10.0.1, this function returns a\ncomma-separated list of column names. The names are quoted\nwith backticks.\n \nBefore MariaDB 10.0.1, it returned a comma-separated list of\ncolumn numbers, not names.\n \nSee dynamic columns for more information.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/column_list/','','https://mariadb.com/kb/en/column_list/'),(361,'SHOW CREATE FUNCTION',26,'Syntax\n------ \nSHOW CREATE FUNCTION func_name\n \nDescription\n----------- \nThis statement is similar to \nSHOW CREATE PROCEDURE but for\nstored functions.\n \nThe output of this statement is unreliably affected by the\nsql_quote_show_create server system variable - see\nhttp://bugs.mysql.com/bug.php?id=12719\n \nExample\n \nMariaDB [test]> SHOW CREATE FUNCTION VatCents\\G\n*************************** 1. row\n***************************\n Function: VatCents\n sql_mode: \n Create Function: CREATE DEFINER=`root`@`localhost` FUNCTION\n`VatCents`(price DECIMAL(10,2)) RETURNS int(11)\n DETERMINISTIC\nBEGIN\n DECLARE x INT;\n SET x = price * 114;\n RETURN x;\nEND\ncharacter_set_client: utf8\ncollation_connection: utf8_general_ci\n Database Collation: latin1_swedish_ci\n \n\n\nURL: https://mariadb.com/kb/en/show-create-function/','','https://mariadb.com/kb/en/show-create-function/'),(362,'SHOW CREATE PACKAGE',26,'Oracle-style packages were introduced in MariaDB 10.3.5.\n \nSyntax\n------ \nSHOW CREATE PACKAGE [ db_name . ] package_name\n \nDescription\n----------- \nThe SHOW CREATE PACKAGE statement can be used when Oracle\nSQL_MODE is set.\n \nShows the CREATE statement that creates the given package\nspecification.\n \nExamples\n-------- \nSHOW CREATE PACKAGE employee_tools\\G\n*************************** 1. row\n***************************\n Package: employee_tools\n sql_mode:\nPIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ORACLE,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS,NO_AUTO_CREATE_USER\n Create Package: CREATE DEFINER=\"root\"@\"localhost\"\nPACKAGE \"employee_tools\" AS\n FUNCTION getSalary(eid INT) RETURN DECIMAL(10,2);\n PROCEDURE raiseSalary(eid INT, amount DECIMAL(10,2));\n PROCEDURE raiseSalaryStd(eid INT);\n PROCEDURE hire(ename TEXT, esalary DECIMAL(10,2));\nEND\ncharacter_set_client: utf8\ncollation_connection: utf8_general_ci\n Database Collation: latin1_swedish_ci\n \n\n\nURL: https://mariadb.com/kb/en/show-create-package/','','https://mariadb.com/kb/en/show-create-package/'),(363,'SHOW CREATE PACKAGE BODY',26,'Oracle-style packages were introduced in MariaDB 10.3.5.\n \nSyntax\n------ \nSHOW CREATE PACKAGE BODY [ db_name . ] package_name\n \nDescription\n----------- \nThe SHOW CREATE PACKAGE BODY statement can be used when\nOracle SQL_MODE is set.\n \nShows the CREATE statement that creates the given package\nbody (i.e. the implementation).\n \nExamples\n-------- \nSHOW CREATE PACKAGE BODY employee_tools\\G\n*************************** 1. row\n***************************\n Package body: employee_tools\n sql_mode:\nPIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ORACLE,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS,NO_AUTO_CREATE_USER\n Create Package Body: CREATE DEFINER=\"root\"@\"localhost\"\nPACKAGE BODY \"employee_tools\" AS\n \n stdRaiseAmount DECIMAL(10,2):=500;\n \n PROCEDURE log (eid INT, ecmnt TEXT) AS\n BEGIN\n INSERT INTO employee_log (id, cmnt) VALUES (eid, ecmnt);\n END;\n \n PROCEDURE hire(ename TEXT, esalary DECIMAL(10,2)) AS\n eid INT;\n BEGIN\n INSERT INTO employee (name, salary) VALUES (ename,\nesalary);\n eid:= last_insert_id();\n log(eid, \'hire \' || ename);\n END;\n \n FUNCTION getSalary(eid INT) RETURN DECIMAL(10,2) AS\n nSalary DECIMAL(10,2);\n BEGIN\n SELECT salary INTO nSalary FROM employee WHERE id=eid;\n log(eid, \'getSalary id=\' || eid || \' salary=\' ||\nnSalary);\n RETURN nSalary;\n END;\n \n PROCEDURE raiseSalary(eid INT, amount DECIMAL(10,2)) AS\n BEGIN\n UPDATE employee SET salary=salary+amount WHERE id=eid;\n log(eid, \'raiseSalary id=\' || eid || \' amount=\' ||\namount);\n END;\n \n PROCEDURE raiseSalaryStd(eid INT) AS\n BEGIN\n raiseSalary(eid, stdRaiseAmount);\n log(eid, \'raiseSalaryStd id=\' || eid);\n END;\n \nBEGIN \n log(0, \'Session \' || connection_id() || \' \' ||\ncurrent_user || \' started\');\nEND\ncharacter_set_client: utf8\ncollation_connection: utf8_general_ci\n Database Collation: latin1_swedish_ci\n \n\n\nURL: https://mariadb.com/kb/en/show-create-package-body/','','https://mariadb.com/kb/en/show-create-package-body/'),(364,'SHOW CREATE PROCEDURE',26,'Syntax\n------ \nSHOW CREATE PROCEDURE proc_name\n \nDescription\n----------- \nThis statement is a MariaDB extension. It returns the exact\nstring that\ncan be used to re-create the named stored procedure, as well\nas the SQL_MODE that was used when the trigger has been\ncreated and the character set used by the connection.. A\nsimilar\nstatement, SHOW CREATE FUNCTION,\ndisplays information about stored functions.\n \nBoth statements require that you are the owner of the\nroutine or have the SELECT privilege on the mysql.proc\ntable. When neither is true, the statements display NULL for\nthe Create Procedure or Create Function field.\n \nWarning Users with SELECT privileges on mysql.proc or USAGE\nprivileges on *.* can view the text of routines, even when\nthey do not have privileges for the function or procedure\nitself.\n \nThe output of these statements is unreliably affected by the\nsql_quote_show_create server system variable - see\nhttp://bugs.mysql.com/bug.php?id=12719\n \nExamples\n-------- \nHere\'s a comparison of the SHOW CREATE PROCEDURE and SHOW\nCREATE FUNCTION statements.\n \nSHOW CREATE PROCEDURE test.simpleproc\\G\n*************************** 1. row\n***************************\n Procedure: simpleproc\n sql_mode: \n Create Procedure: CREATE PROCEDURE `simpleproc`(OUT param1\nINT)\n BEGIN\n SELECT COUNT(*) INTO param1 FROM t;\n END\ncharacter_set_client: latin1\ncollation_connection: latin1_swedish_ci\n Database Collation: latin1_swedish_ci\n \nSHOW CREATE FUNCTION test.hello\\G\n*************************** 1. row\n***************************\n Function: hello\n sql_mode:\n Create Function: CREATE FUNCTION `hello`(s CHAR(20))\n RETURNS CHAR(50)\n RETURN CONCAT(\'Hello, \',s,\'!\')\ncharacter_set_client: latin1\ncollation_connection: latin1_swedish_ci\n Database Collation: latin1_swedish_ci\n \nWhen the user issuing the statement does not have privileges\non the routine, attempting to CALL the procedure raises\nError 1370.\n \nCALL test.prc1();\nError 1370 (42000): execute command denieed to user\n\'test_user\'@\'localhost\' for routine \'test\'.\'prc1\'\n \nIf the user neither has privilege to the routine nor the\nSELECT privilege on mysql.proc table, it raises Error 1305,\ninforming them that the procedure does not exist.\n \nSHOW CREATE TABLES test.prc1\\G\nError 1305 (42000): PROCEDURE prc1 does not exist\n \n\n\nURL: https://mariadb.com/kb/en/show-create-procedure/','','https://mariadb.com/kb/en/show-create-procedure/'),(365,'SHOW CREATE SEQUENCE',26,'Sequences were introduced in MariaDB 10.3.\n \nSyntax\n------ \nSHOW CREATE SEQUENCE sequence_name;\n \nDescription\n----------- \nShows the CREATE SEQUENCE statement that created the given\nsequence. The statement requires the SELECT privilege for\nthe table.\n \nExample\n \nCREATE SEQUENCE s1 START WITH 50;\n \nSHOW CREATE SEQUENCE s1\\G;\n \n*************************** 1. row\n***************************\n Table: t1\nCreate Table: CREATE SEQUENCE `s1` start with 50 minvalue 1\nmaxvalue 9223372036854775806\nincrement by 1 cache 1000 nocycle ENGINE=Aria\n \nNotes\n \nIf you want to see the underlying table structure used for\nthe SEQUENCE\nyou can use SHOW CREATE TABLE on the SEQUENCE. You can also\nuse SELECT to read the current recorded state of the\nSEQUENCE:\n \nCREATE SEQUENCE t1;\n \nSHOW CREATE TABLE s1\\G\n*************************** 1. row\n***************************\n Table: s1\nCreate Table: CREATE TABLE `s1` (\n `next_value` bigint(21) NOT NULL COMMENT \'next not cached\nvalue\',\n `min_value` bigint(21) NOT NULL COMMENT \'min value\',\n `max_value` bigint(21) NOT NULL COMMENT \'max value\',\n `start` bigint(21) NOT NULL COMMENT \'start value\',\n `increment` bigint(21) NOT NULL COMMENT \'increment\nvalue\',\n `cache` bigint(21) NOT NULL COMMENT \'cache size\',\n `cycle` tinyint(1) unsigned NOT NULL COMMENT \'cycle\nstate\',\n `round` bigint(21) NOT NULL COMMENT \'How many cycles has\nbeen done\'\n) ENGINE=Aria SEQUENCE=1\n \nSELECT * FROM s1;\n \n+------------+-----------+---------------------+-------+-----------+-------+-------+-------+\n| next_value | min_value | max_value | start | increment |\ncache | cycle | round |\n+------------+-----------+---------------------+-------+-----------+-------+-------+-------+\n| 1 | 1 | 9223372036854775806 | 1 | 1 | 1000 | 0 | 0 |\n+------------+-----------+---------------------+-------+-----------+-------+-------+-------+\n \n\n\nURL: https://mariadb.com/kb/en/show-create-sequence/','','https://mariadb.com/kb/en/show-create-sequence/'),(366,'SHOW CREATE TABLE',26,'Syntax\n------ \nSHOW CREATE TABLE tbl_name\n \nDescription\n----------- \nShows the CREATE TABLE statement that created the given\ntable. The statement requires the SELECT privilege for the\ntable. This statement also works with views and SEQUENCE.\n \nSHOW CREATE TABLE quotes table and\ncolumn names according to the value of the\nsql_quote_show_create server system variable.\n \nMariaDB and MySQL-specific table options, column options,\nand index options are not included in the output of this\nstatement if the NO_TABLE_OPTIONS, NO_FIELD_OPTIONS and\nNO_KEY_OPTIONS SQL_MODE flags are used.\n \nInvalid table options, column options and index options are\nnormally commented out (note, that it is possible to create\na table with invalid options, by altering a table of a\ndifferent engine, where these options were valid). To have\nthem uncommented, enable IGNORE_BAD_TABLE_OPTIONS SQL_MODE.\nRemember that replaying a CREATE TABLE statement with\nuncommented invalid options will fail with an error, unless\nIGNORE_BAD_TABLE_OPTIONS SQL_MODE is in effect.\n \nNote that SHOW CREATE TABLE is not meant to provide metadata\nabout a table. It provides information about how the table\nwas declared, but the real table structure could differ a\nbit. For example, if an index has been declared as HASH, the\nCREATE TABLE statement returned by SHOW CREATE TABLE will\ndeclare that index as HASH; however, it is possible that the\nindex is in fact a BTREE, because the storage engine does\nnot support HASH.\n \nMariaDB 10.2.1 permits TEXT and BLOB data types to be\nassigned a DEFAULT value. As a result, from MariaDB 10.2.1,\nSHOW CREATE TABLE will append a DEFAULT NULL to nullable\nTEXT or BLOB fields if no specific default is provided. \n \nFrom MariaDB 10.2.2, numbers are no longer quoted in the\nDEFAULT clause in SHOW CREATE statement. Previously, MariaDB\nquoted numbers. \n \nExamples\n-------- \nSHOW CREATE TABLE t\\G\n*************************** 1. row\n***************************\n Table: t\nCreate Table: CREATE TABLE `t` (\n `id` int(11) NOT NULL AUTO_INCREMENT,\n `s` char(60) DEFAULT NULL,\n PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=latin1\n \nWith sql_quote_show_create off:\n \nSHOW CREATE TABLE t\\G\n*************************** 1. row\n***************************\n Table: t\nCreate Table: CREATE TABLE t (\n id int(11) NOT NULL AUTO_INCREMENT,\n s char(60) DEFAULT NULL,\n PRIMARY KEY (id)\n) ENGINE=InnoDB DEFAULT CHARSET=latin1\n \nUnquoted numeric DEFAULTs, from MariaDB 10.2.2:\n \nCREATE TABLE td (link TINYINT DEFAULT 1);\n \nSHOW CREATE TABLE td\\G\n*************************** 1. row\n***************************\n Table: td\nCreate Table: CREATE TABLE `td` (\n `link` tinyint(4) DEFAULT 1\n) ENGINE=InnoDB DEFAULT CHARSET=latin1\n \nQuoted numeric DEFAULTs, until MariaDB 10.2.1:\n \nCREATE TABLE td (link TINYINT DEFAULT 1);\n \nSHOW CREATE TABLE td\\G\n*************************** 1. row\n***************************\n Table: td\nCreate Table: CREATE TABLE `td` (\n `link` tinyint(4) DEFAULT \'1\'\n) ENGINE=InnoDB DEFAULT CHARSET=latin1\n \n\n\nURL: https://mariadb.com/kb/en/show-create-table/','','https://mariadb.com/kb/en/show-create-table/'),(367,'SHOW CREATE TRIGGER',26,'Syntax\n------ \nSHOW CREATE TRIGGER trigger_name\n \nDescription\n----------- \nThis statement shows a CREATE TRIGGER\nstatement that creates the given trigger, as well as the\nSQL_MODE that was used when the trigger has been created and\nthe character set used by the connection.\n \nThe output of this statement is unreliably affected by the\nsql_quote_show_create server system variable - see\nhttp://bugs.mysql.com/bug.php?id=12719\n \nExamples\n-------- \nSHOW CREATE TRIGGER example\\G\n*************************** 1. row\n***************************\n Trigger: example\n sql_mode:\nONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,STRICT_ALL_TABLES\n,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_\nENGINE_SUBSTITUTION\nSQL Original Statement: CREATE DEFINER=`root`@`localhost`\nTRIGGER example BEFORE\n INSERT ON t FOR EACH ROW\nBEGIN\n SET NEW.c = NEW.c * 2;\nEND\n character_set_client: cp850\n collation_connection: cp850_general_ci\n Database Collation: utf8_general_ci\n Created: 2016-09-29 13:53:34.35\n \nThe Created column was added in MySQL 5.7 and MariaDB 10.2.3\nas part of introducing multiple trigger events per action.\n \n\n\nURL: https://mariadb.com/kb/en/show-create-trigger/','','https://mariadb.com/kb/en/show-create-trigger/'),(368,'SHOW CREATE USER',26,'SHOW CREATE USER was introduced in MariaDB 10.2.0\n \nSyntax\n------ \nSHOW CREATE USER user_name\n \nDescription\n----------- \nShows the CREATE USER statement that created the given\nuser. The statement requires the SELECT privilege for the\nmysql database, except for the current user.\n \nExamples\n-------- \nCREATE USER foo4@test require cipher \'text\' \n issuer \'foo_issuer\' subject \'foo_subject\';\n \nSHOW CREATE USER foo4@test\\G\n*************************** 1. row\n***************************\nCREATE USER \'foo4\'@\'test\' \n REQUIRE ISSUER \'foo_issuer\' \n SUBJECT \'foo_subject\' \n CIPHER \'text\'\n \nUser Password Expiry:\n \nCREATE USER \'monty\'@\'localhost\' PASSWORD EXPIRE INTERVAL\n120 DAY;\n \nSHOW CREATE USER \'monty\'@\'localhost\';\n \n+------------------------------------------------------------------+\n| CREATE USER for monty@localhost |\n+------------------------------------------------------------------+\n| CREATE USER \'monty\'@\'localhost\' PASSWORD EXPIRE\nINTERVAL 120 DAY |\n+------------------------------------------------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/show-create-user/','','https://mariadb.com/kb/en/show-create-user/'),(369,'SHOW CREATE VIEW',26,'Syntax\n------ \nSHOW CREATE VIEW view_name\n \nDescription\n----------- \nThis statement shows a CREATE VIEW statement that creates\nthe given view, as well as the character set used by the\nconnection when the view was created. This statement\nalso works with views.\n \nSHOW CREATE VIEW quotes table, column and stored function\nnames according to the value of the sql_quote_show_create\nserver system variable.\n \nExamples\n-------- \nSHOW CREATE VIEW example\\G\n*************************** 1. row\n***************************\n View: example\n Create View: CREATE ALGORITHM=UNDEFINED\nDEFINER=`root`@`localhost` SQL\nSECURITY DEFINER VIEW `example` AS (select `t`.`id` AS\n`id`,`t`.`s` AS `s` from\n`t`)\ncharacter_set_client: cp850\ncollation_connection: cp850_general_ci\n \nWith sql_quote_show_create off:\n \nSHOW CREATE VIEW example\\G\n*************************** 1. row\n***************************\n View: example\n Create View: CREATE ALGORITHM=UNDEFINED\nDEFINER=root@localhost SQL SECU\nRITY DEFINER VIEW example AS (select t.id AS id,t.s AS s\nfrom t)\ncharacter_set_client: cp850\ncollation_connection: cp850_general_ci\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/show-create-view/','','https://mariadb.com/kb/en/show-create-view/'),(370,'SHOW DATABASES',26,'Syntax\n------ \nSHOW {DATABASES | SCHEMAS}\n [LIKE \'pattern\' | WHERE expr]\n \nDescription\n----------- \nSHOW DATABASES lists the databases on the MariaDB server\nhost.\nSHOW SCHEMAS is a synonym for \nSHOW DATABASES. The LIKE clause, if\npresent on its own, indicates which database names to match.\nThe WHERE and LIKE clauses can be given to select rows using\nmore general conditions, as discussed in Extended SHOW.\n \nYou see only those databases for which you have some kind of\nprivilege, unless you have the global \nSHOW DATABASES privilege. You\ncan also get this list using the mysqlshow command.\n \nIf the server was started with the --skip-show-database\noption, you cannot use this statement at all unless you have\nthe\nSHOW DATABASES privilege.\n \nExample\n \nSHOW DATABASES;\n+--------------------+\n| Database |\n+--------------------+\n| information_schema |\n| mysql |\n| performance_schema |\n| test |\n+--------------------+\n \nSHOW DATABASES LIKE \'m%\';\n+---------------+\n| Database (m%) |\n+---------------+\n| mysql |\n+---------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/show-databases/','','https://mariadb.com/kb/en/show-databases/'),(373,'SHOW ENGINES',26,'Syntax\n------ \nSHOW [STORAGE] ENGINES\n \nDescription\n----------- \nSHOW ENGINES displays status information about the server\'s\nstorage engines. This is particularly useful for checking\nwhether a storage\nengine is supported, or to see what the default engine is. \nSHOW TABLE TYPES is a deprecated synonym.\n \nThe information_schema.ENGINES table provides the same\ninformation.\n \nSince storage engines are plugins, different information\nabout them is also shown in the information_schema.PLUGINS\ntable and by the SHOW PLUGINS statement.\n \nNote that both MySQL\'s InnoDB and Percona\'s XtraDB\nreplacement are labeled as InnoDB. However, if XtraDB is in\nuse, it will be specified in the COMMENT field. See XtraDB\nand InnoDB. The same applies to FederatedX.\n \nThe output consists of the following columns:\nEngine indicates the engine\'s name.\nSupport indicates whether the engine is installed, and\nwhether it is the default engine for the current session.\nComment is a brief description.\nTransactions, XA and Savepoints indicate whether\ntransactions, XA transactions and transaction savepoints are\nsupported by the engine.\n \nExamples\n-------- \nSHOW ENGINES\\G\n*************************** 1. row\n***************************\n Engine: InnoDB\n Support: DEFAULT\n Comment: Supports transactions, row-level locking, and\nforeign keys\nTransactions: YES\n XA: YES\n Savepoints: YES\n*************************** 2. row\n***************************\n Engine: CSV\n Support: YES\n Comment: CSV storage engine\nTransactions: NO\n XA: NO\n Savepoints: NO\n*************************** 3. row\n***************************\n Engine: MyISAM\n Support: YES\n Comment: MyISAM storage engine\nTransactions: NO\n XA: NO\n Savepoints: NO\n*************************** 4. row\n***************************\n Engine: BLACKHOLE\n Support: YES\n Comment: /dev/null storage engine (anything you write to it\ndisappears)\nTransactions: NO\n XA: NO\n Savepoints: NO\n*************************** 5. row\n***************************\n Engine: FEDERATED\n Support: YES\n Comment: FederatedX pluggable storage engine\nTransactions: YES\n XA: NO\n Savepoints: YES\n*************************** 6. row\n***************************\n Engine: MRG_MyISAM\n Support: YES\n Comment: Collection of identical MyISAM tables\nTransactions: NO\n XA: NO\n Savepoints: NO\n*************************** 7. row\n***************************\n Engine: ARCHIVE\n Support: YES\n Comment: Archive storage engine\nTransactions: NO\n XA: NO\n Savepoints: NO\n*************************** 8. row\n***************************\n Engine: MEMORY\n Support: YES\n Comment: Hash based, stored in memory, useful for temporary\ntables\nTransactions: NO\n XA: NO\n Savepoints: NO\n*************************** 9. row\n***************************\n Engine: PERFORMANCE_SCHEMA\n Support: YES\n Comment: Performance Schema\nTransactions: NO\n XA: NO\n Savepoints: NO\n*************************** 10. row\n***************************\n Engine: Aria\n Support: YES\n Comment: Crash-safe tables with MyISAM heritage\nTransactions: NO\n XA: NO\n Savepoints: NO\n10 rows in set (0.00 sec)\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/show-engines/','','https://mariadb.com/kb/en/show-engines/'),(371,'SHOW ENGINE',26,'Syntax\n------ \nSHOW ENGINE engine_name {STATUS | MUTEX}\n \nDescription\n----------- \nSHOW ENGINE displays operational information about a storage\nengine. The following statements currently are supported:\n \nSHOW ENGINE INNODB STATUS\nSHOW ENGINE INNODB MUTEX\nSHOW ENGINE PERFORMANCE_SCHEMA STATUS\n \nIf the Sphinx Storage Engine is installed, the following is\nalso supported:\n \nSHOW ENGINE SPHINX STATUS\n \nSee SHOW ENGINE SPHINX STATUS.\n \nOlder (and now removed) synonyms were SHOW INNODB STATUS\nfor SHOW ENGINE INNODB STATUS and \nSHOW MUTEX STATUS for \nSHOW ENGINE INNODB MUTEX.\n \nSHOW ENGINE BDB LOGS formerly displayed status information\nabout BDB log files. It was deprecated in MySQL 5.1.12 and\nremoved in MariaDB and MySQL 5.5, so now produces an error.\n \nSHOW ENGINE INNODB STATUS\n \nSHOW ENGINE INNODB STATUS displays extensive information\nfrom the standard InnoDB Monitor about the state of the\nInnoDB storage engine.\nSee SHOW ENGINE INNODB STATUS for more.\n \nSHOW ENGINE INNODB MUTEX\n \nSHOW ENGINE INNODB MUTEX displays InnoDB mutex statistics.\n \nThe statement displays the following output fields:\nType: Always InnoDB.\nName: The source file where the mutex is implemented, and\nthe line number\n in the file where the mutex is created. The line number is\ndependent on the MariaDB version.\nStatus: This field displays the following values if\nUNIV_DEBUG was defined at compilation time (for example, in\ninclude/univ.h in the InnoDB part of the source tree). Only\nthe os_waits value is displayed if UNIV_DEBUG was not\ndefined. Without UNIV_DEBUG, the information on which the\noutput is based is insufficient to distinguish regular\nmutexes and mutexes that protect\n rw-locks (which allow multiple readers or a single writer).\nConsequently, the\n output may appear to contain multiple rows for the same\nmutex.\ncount indicates how many times the mutex was requested.\nspin_waits indicates how many times the spinlock had to run.\nspin_rounds indicates the number of spinlock rounds.\n(spin_rounds divided by\n spin_waits provides the average round count.)\nos_waits indicates the number of operating system waits.\nThis occurs when\n the spinlock did not work (the mutex was not locked during\nthe spinlock and\n it was necessary to yield to the operating system and\nwait).\nos_yields indicates the number of times a the thread trying\nto lock a mutex\n gave up its timeslice and yielded to the operating system\n(on the\n presumption that allowing other threads to run will free\nthe mutex so that\n it can be locked).\nos_wait_times indicates the amount of time (in ms) spent in\noperating system\n waits, if the timed_mutexes system variable is 1 (ON). If\ntimed_mutexes is 0\n (OFF), timing is disabled, so os_wait_times is 0.\ntimed_mutexes is off by\n default.\n \nInformation from this statement can be used to diagnose\nsystem problems. For\nexample, large values of spin_waits and spin_rounds may\nindicate scalability\nproblems.\n \nThe information_schema.INNODB_MUTEXES table provides similar\ninformation.\n \nSHOW ENGINE PERFORMANCE_SCHEMA STATUS\n \nThis statement shows how much memory is used for\nperformance_schema tables and internal buffers.\n \nThe output contains the following fields:\nType: Always performance_schema.\nName: The name of a table, the name of an internal buffer,\nor the performance_schema word, followed by a dot and an\nattribute. Internal buffers names are enclosed by\nparenthesis. performance_schema means that the attribute\nrefers to the whole database (it is a total). \nStatus: The value for the attribute.\n \nThe following attributes are shown, in this order, for all\ntables:\nrow_size: The memory used for an individual record. This\nvalue will never change.\nrow_count: The number of rows in the table or buffer. For\nsome tables, this value depends on a server system variable.\nmemory: For tables and performance_schema, this is the\nresult of row_size * row_count.\n \nFor internal buffers, the attributes are:\ncount\nsize\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/show-engine/','','https://mariadb.com/kb/en/show-engine/'),(374,'SHOW ERRORS',26,'Syntax\n------ \nSHOW ERRORS [LIMIT [offset,] row_count]\nSHOW ERRORS [LIMIT row_count OFFSET offset]\nSHOW COUNT(*) ERRORS\n \nDescription\n----------- \nThis statement is similar to SHOW WARNINGS, except that\ninstead of\ndisplaying errors, warnings, and notes, it displays only\nerrors.\n \nThe LIMIT clause has the same syntax as for the\nSELECT statement.\n \nThe SHOW COUNT(*) ERRORS statement displays the number of\nerrors. You can also retrieve this number from the\nerror_count variable.\n \nSHOW COUNT(*) ERRORS;\nSELECT @@error_count;\n \nThe value of error_count might be greater than the number of\nmessages displayed by SHOW WARNINGS if the max_error_count\nsystem variable is set so low that not all messages are\nstored.\n \nFor a list of MariaDB error codes, see MariaDB Error Codes.\n \nExamples\n-------- \nSELECT f();\nERROR 1305 (42000): FUNCTION f does not exist\n \nSHOW COUNT(*) ERRORS;\n \n+-----------------------+\n| @@session.error_count |\n+-----------------------+\n| 1 |\n+-----------------------+\n \nSHOW ERRORS;\n \n+-------+------+---------------------------+\n| Level | Code | Message |\n+-------+------+---------------------------+\n| Error | 1305 | FUNCTION f does not exist |\n+-------+------+---------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/show-errors/','','https://mariadb.com/kb/en/show-errors/'),(372,'SHOW ENGINE INNODB STATUS',26,'SHOW ENGINE INNODB STATUS is a specific form of the SHOW\nENGINE statement that displays the InnoDB Monitor output,\nwhich is extensive InnoDB information which can be useful in\ndiagnosing problems.\n \nThe following sections are displayed\nStatus: Shows the timestamp, monitor name and the number of\nseconds, or the elapsed time between the current time and\nthe time the InnoDB Monitor output was last displayed. The\nper-second averages are based upon this time.\nBACKGROUND THREAD: srv_master_thread lines show work\nperformed by the main background thread.\nSEMAPHORES: Threads waiting for a semaphore and stats on how\nthe number of times threads have needed a spin or a wait on\na mutex or rw-lock semaphore. If this number of threads is\nlarge, there may be I/O or contention issues. Reducing the\nsize of the innodb_thread_concurrency system variable may\nhelp if contention is related to thread scheduling. Spin\nrounds per wait shows the number of spinlock rounds per OS\nwait for a mutex. \nLATEST FOREIGN KEY ERROR: Only shown if there has been a\nforeign key constraint error, it displays the failed\nstatement and information about the constraint and the\nrelated tables.\nLATEST DETECTED DEADLOCK: Only shown if there has been a\ndeadlock, it displays the transactions involved in the\ndeadlock and the statements being executed, held and\nrequired locked and the transaction rolled back to.\nTRANSACTIONS: The output of this section can help identify\nlock contention, as well as reasons for the deadlocks.\nFILE I/O: InnoDB thread information as well as pending I/O\noperations and I/O performance statistics.\nINSERT BUFFER AND ADAPTIVE HASH INDEX: InnoDB insert buffer\nand adaptive hash index status information, including the\nnumber of each type of operation performed, and adaptive\nhash index performance.\nLOG: InnoDB log information, including current log sequence\nnumber, how far the log has been flushed to disk, the\nposition at which InnoDB last took a checkpoint, pending\nwrites and write performance statistics.\nBUFFER POOL AND MEMORY: Information on buffer pool pages\nread and written, which allows you to see the number of data\nfile I/O operations performed by your queries. See InnoDB\nBuffer Pool for more. Similar information is also available\nfrom the INFORMATION_SCHEMA.INNODB_BUFFER_POOL_STATS table.\nROW OPERATIONS:Information about the main thread, including\nthe number and performance rate for each type of row\noperation. \n \nIf the innodb_status_output_locks system variable is set to\n1, extended lock information will be displayed.\n \nExample output:\n \n=====================================\n2016-09-12 04:42:15 7f226145fb00 INNODB MONITOR OUTPUT\n=====================================\nPer second averages calculated from the last 29 seconds\n-----------------\nBACKGROUND THREAD\n-----------------\nsrv_master_thread loops: 0 srv_active, 0 srv_shutdown, 527\nsrv_idle\nsrv_master_thread log flush and writes: 527\n----------\nSEMAPHORES\n----------\nOS WAIT ARRAY INFO: reservation count 4\nOS WAIT ARRAY INFO: signal count 4\nMutex spin waits 2, rounds 60, OS waits 2\nRW-shared spins 2, rounds 60, OS waits 2\nRW-excl spins 0, rounds 0, OS waits 0\nSpin rounds per wait: 30.00 mutex, 30.00 RW-shared, 0.00\nRW-excl\n------------\nTRANSACTIONS\n------------\nTrx id counter 2308\nPurge done for trx\'s n:o < 0 undo n:o < 0 state: running\nbut idle\nHistory list length 0\nLIST OF TRANSACTIONS FOR EACH SESSION:\n---TRANSACTION 0, not started\nMySQL thread id 3, OS thread handle 0x7f226145fb00, query id\n4 localhost root init\nSHOW ENGINE INNODB STATUS\n--------\nFILE I/O\n--------\nI/O thread 0 state: waiting for completed aio requests\n(insert buffer thread)\nI/O thread 1 state: waiting for completed aio requests (log\nthread)\nI/O thread 2 state: waiting for completed aio requests (read\nthread)\nI/O thread 3 state: waiting for completed aio requests (read\nthread)\nI/O thread 4 state: waiting for completed aio requests (read\nthread)\nI/O thread 5 state: waiting for completed aio requests (read\nthread)\nI/O thread 6 state: waiting for completed aio requests\n(write thread)\nI/O thread 7 state: waiting for completed aio requests\n(write thread)\nI/O thread 8 state: waiting for completed aio requests\n(write thread)\nI/O thread 9 state: waiting for completed aio requests\n(write thread)\nPending normal aio reads: 0 [0, 0, 0, 0] , aio writes: 0 [0,\n0, 0, 0] ,\n ibuf aio reads: 0, log i/o\'s: 0, sync i/o\'s: 0\nPending flushes (fsync) log: 0; buffer pool: 0\n172 OS file reads, 5 OS file writes, 5 OS fsyncs\n0.00 reads/s, 0 avg bytes/read, 0.00 writes/s, 0.00 fsyncs/s\n-------------------------------------\nINSERT BUFFER AND ADAPTIVE HASH INDEX\n-------------------------------------\nIbuf: size 1, free list len 0, seg size 2, 0 merges\nmerged operations:\n insert 0, delete mark 0, delete 0\ndiscarded operations:\n insert 0, delete mark 0, delete 0\n0.00 hash searches/s, 0.00 non-hash searches/s\n---\nLOG\n---\nLog sequence number 1616829\nLog flushed up to 1616829\nPages flushed up to 1616829\nLast checkpoint at 1616829\nMax checkpoint age 80826164\nCheckpoint age target 78300347\nModified age 0\nCheckpoint age 0\n0 pending log writes, 0 pending chkp writes\n8 log i/o\'s done, 0.00 log i/o\'s/second\n----------------------\nBUFFER POOL AND MEMORY\n----------------------\nTotal memory allocated 140771328; in additional pool\nallocated 0\nTotal memory allocated by read views 88\nInternal hash tables (constant factor + variable factor)\n Adaptive hash index 2217568 (2213368 + 4200)\n Page hash 139112 (buffer pool 0 only)\n Dictionary cache 630703 (554768 + 75935)\n File system 817648 (812272 + 5376)\n Lock system 333232 (332872 + 360)\n Recovery system 0 (0 + 0)\nDictionary memory allocated 75935\nBuffer pool size 8191\nBuffer pool size, bytes 134201344\nFree buffers 8037\nDatabase pages 154\nOld database pages 0\nModified db pages 0\nPercent of dirty pages(LRU & free pages): 0.000\nMax dirty pages percent: 75.000\nPending reads 0\nPending writes: LRU 0, flush list 0, single page 0\nPages made young 0, not young 0\n0.00 youngs/s, 0.00 non-youngs/s\nPages read 154, created 0, written 1\n0.00 reads/s, 0.00 creates/s, 0.00 writes/s\nNo buffer pool page gets since the last printout\nPages read ahead 0.00/s, evicted without access 0.00/s,\nRandom read ahead 0.00/s\nLRU len: 154, unzip_LRU len: 0\nI/O sum[0]:cur[0], unzip sum[0]:cur[0]\n--------------\nROW OPERATIONS\n--------------\n0 queries inside InnoDB, 0 queries in queue\n0 read views open inside InnoDB\n0 RW transactions active inside InnoDB\n0 RO transactions active inside InnoDB\n0 out of 1000 descriptors used\nMain thread process no. 3337, id 139784957703936, state:\nsleeping\nNumber of rows inserted 0, updated 0, deleted 0, read 0\n0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 0.00 reads/s\nNumber of system rows inserted 0, updated 0, deleted 0, read\n0\n0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 0.00 reads/s\n----------------------------\nEND OF INNODB MONITOR OUTPUT\n============================\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/show-engine-innodb-status/','','https://mariadb.com/kb/en/show-engine-innodb-status/'),(375,'SHOW EVENTS',26,'Syntax\n------ \nSHOW EVENTS [{FROM | IN} schema_name]\n [LIKE \'pattern\' | WHERE expr]\n \nDescription\n----------- \nShows information about Event Manager events (created with\nCREATE EVENT). Requires the EVENT privilege. Without any\narguments, SHOW EVENTS lists all of the events in the\ncurrent schema:\n \nSELECT CURRENT_USER(), SCHEMA();\n+----------------+----------+\n| CURRENT_USER() | SCHEMA() |\n+----------------+----------+\n| jon@ghidora | myschema |\n+----------------+----------+\n \nSHOW EVENTS\\G\n*************************** 1. row\n***************************\n Db: myschema\n Name: e_daily\n Definer: jon@ghidora\n Time zone: SYSTEM\n Type: RECURRING\n Execute at: NULL\n Interval value: 10\n Interval field: SECOND\n Starts: 2006-02-09 10:41:23\n Ends: NULL\n Status: ENABLED\n Originator: 0\ncharacter_set_client: latin1\ncollation_connection: latin1_swedish_ci\n Database Collation: latin1_swedish_ci\n \nTo see the event action, use SHOW CREATE EVENT instead, or\nlook at the information_schema.EVENTS table.\n \nTo see events for a specific schema, use the FROM clause.\nFor example, to see events for the test schema, use the\nfollowing statement:\n \nSHOW EVENTS FROM test;\n \nThe LIKE clause, if present, indicates which event names to\nmatch. The WHERE clause can be given to select rows using\nmore general conditions, as discussed in Extended Show.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/show-events/','','https://mariadb.com/kb/en/show-events/'),(376,'SHOW EXPLAIN',26,'The SHOW EXPLAIN command is a new feature in MariaDB 10.0.0.\n \nCommand description\n \nThe SHOW EXPLAIN command allows one to get an EXPLAIN (that\nis, a\ndescription of a query plan) of a query running in a certain\nthread.\n \nThe syntax is:\n \nSHOW EXPLAIN FOR ;\n \nwhich will produce an EXPLAIN output for the query that\nthread number thread_id is running. The thread id can be\nobtained with SHOW PROCESSLIST.\n \nSHOW EXPLAIN FOR 1;\n \n+------+-------------+-------+-------+---------------+------+---------+------+---------+-------------+\n| id | select_type | table | type | possible_keys | key |\nkey_len | ref | rows | Extra |\n+------+-------------+-------+-------+---------------+------+---------+------+---------+-------------+\n| 1 | SIMPLE | tbl | index | NULL | a | 5 | NULL | 1000107 |\nUsing index |\n+------+-------------+-------+-------+---------------+------+---------+------+---------+-------------+\n1 row in set, 1 warning (0.00 sec)\n \nThe output is always accompanied with a warning which shows\nthe query the\ntarget thread is running (this shows what the EXPLAIN is\nfor):\n \nSHOW WARNINGS;\n \n+-------+------+------------------------+\n| Level | Code | Message |\n+-------+------+------------------------+\n| Note | 1003 | select sum(a) from tbl |\n+-------+------+------------------------+\n1 row in set (0.00 sec)\n \nPossible errors\n \nThe output can be only produced if the target thread is\ncurrently running a\nquery, which has a ready query plan. If this is not the\ncase, the output will\nbe:\n \nSHOW EXPLAIN FOR 2;\n \nERROR 1932 (HY000): Target is not running an EXPLAINable\ncommand\n \nYou will get this error when:\nthe target thread is not running a command for which one can\nrun EXPLAIN\nthe target thread is running a command for which one can run\nEXPLAIN, but\nthere is no query plan yet (for example, tables are open and\nlocks are\n acquired before the query plan is produced)\n \n\nDifferences between SHOW EXPLAIN and EXPLAIN outputs\n \nBackground\n \nIn MySQL, EXPLAIN execution takes a slightly different route\nfrom the way\nthe real query (typically the SELECT) is optimized. This is\nunfortunate,\nand has caused a number of bugs in EXPLAIN. (For example,\nsee\nMDEV-326, MDEV-410, and\nlp:1013343.\nlp:992942 is not directly\nabout EXPLAIN, but it also would not have existed if MySQL\ndidn\'t try to delete\nparts of a query plan in the middle of the query) \n \nSHOW EXPLAIN examines a running SELECT, and hence its output\nmay be\nslightly different from what EXPLAIN SELECT would produce.\nWe did our best\nto make sure that either the difference is negligible, or\nSHOW EXPLAIN\'s\noutput is closer to reality than EXPLAIN\'s output.\n \nList of recorded differences\n \nSHOW EXPLAIN may have Extra=\'no matching row in const\ntable\', where EXPLAIN would produce Extra=\'Impossible\nWHERE ...\'\nFor queries with subqueries, SHOW EXPLAIN may print\nselect_type==PRIMARY where regular EXPLAIN used to print\nselect_type==SIMPLE, or vice versa.\n \nRequired permissions\n \nRunning SHOW EXPLAIN requires the same permissions as\nrunning SHOW PROCESSLIST would.\n \n\n\nURL: https://mariadb.com/kb/en/show-explain/','','https://mariadb.com/kb/en/show-explain/'),(378,'SHOW FUNCTION STATUS',26,'Syntax\n------ \nSHOW FUNCTION STATUS\n [LIKE \'pattern\' | WHERE expr]\n \nDescription\n----------- \nThis statement is similar to \nSHOW PROCEDURE STATUS but for\nstored functions.\n \nThe LIKE clause, if present on its own, indicates which\nfunction names to match. \n \nThe WHERE and LIKE clauses can be given to select rows using\nmore general conditions, as discussed in Extended SHOW.\n \nThe information_schema.ROUTINES table contains more detailed\ninformation.\n \nExamples\n-------- \nShowing all stored functions:\n \nSHOW FUNCTION STATUS\\G\n*************************** 1. row\n***************************\n Db: test\n Name: VatCents\n Type: FUNCTION\n Definer: root@localhost\n Modified: 2013-06-01 12:40:31\n Created: 2013-06-01 12:40:31\n Security_type: DEFINER\n Comment: \ncharacter_set_client: utf8\ncollation_connection: utf8_general_ci\n Database Collation: latin1_swedish_ci\n \nStored functions whose name starts with \'V\': \n \nSHOW FUNCTION STATUS LIKE \'V%\' \\G\n*************************** 1. row\n***************************\n Db: test\n Name: VatCents\n Type: FUNCTION\n Definer: root@localhost\n Modified: 2013-06-01 12:40:31\n Created: 2013-06-01 12:40:31\n Security_type: DEFINER\n Comment: \ncharacter_set_client: utf8\ncollation_connection: utf8_general_ci\n Database Collation: latin1_swedish_ci\n \nStored functions with a security type of \'DEFINER\':\n \nSHOW FUNCTION STATUS WHERE Security_type LIKE \'DEFINER\'\n\\G\n*************************** 1. row\n***************************\n Db: test\n Name: VatCents\n Type: FUNCTION\n Definer: root@localhost\n Modified: 2013-06-01 12:40:31\n Created: 2013-06-01 12:40:31\n Security_type: DEFINER\n Comment: \ncharacter_set_client: utf8\ncollation_connection: utf8_general_ci\n Database Collation: latin1_swedish_ci\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/show-function-status/','','https://mariadb.com/kb/en/show-function-status/'),(379,'SHOW GRANTS',26,'Users\n \nSyntax\n------ \nSHOW GRANTS [FOR user]\n \nDescription\n----------- \nThis statement lists the GRANT statement or\nstatements that must be issued to duplicate the privileges\nthat are granted to\na MariaDB user account. The account is named using the same\nformat as for the\nGRANT statement; for example,\n\'jeffrey\'@\'localhost\'. If you specify only the user name\npart\nof the account name, a host name part of \'%\' is used. For\nadditional information about specifying account names, see\nGRANT.\n \nSHOW GRANTS FOR \'root\'@\'localhost\';\n+---------------------------------------------------------------------+\n| Grants for root@localhost |\n+---------------------------------------------------------------------+\n| GRANT ALL PRIVILEGES ON *.* TO \'root\'@\'localhost\' WITH\nGRANT OPTION |\n+---------------------------------------------------------------------+\n \nTo list the privileges granted to the account that you are\nusing to\nconnect to the server, you can use any of the following\nstatements:\n \nSHOW GRANTS;\n \nSHOW GRANTS FOR CURRENT_USER;\n \nSHOW GRANTS FOR CURRENT_USER();\n \nIf SHOW GRANTS FOR CURRENT_USER (or any\nof the equivalent syntaxes) is used in DEFINER context (such\nas within a stored procedure that is defined with \n SQL SECURITY DEFINER), the grants displayed are those of\nthe\ndefiner and not the invoker.\n \nNote that the DELETE HISTORY privilege, introduced in\nMariaDB 10.3.4, is displayed as DELETE VERSIONING ROWS when\nrunning SHOW GRANTS (MDEV-17655).\n \nRoles\n \nRoles were introduced in MariaDB 10.0.5.\n \nSyntax\n------ \nSHOW GRANTS [FOR role]\n \nDescription\n----------- \nFrom MariaDB 10.0.5, SHOW GRANTS can also be used to view\nthe privileges granted to a role.\n \nExample\n \nSHOW GRANTS FOR journalist;\n+------------------------------------------+\n| Grants for journalist |\n+------------------------------------------+\n| GRANT USAGE ON *.* TO \'journalist\' |\n| GRANT DELETE ON `test`.* TO \'journalist\' |\n+------------------------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/show-grants/','','https://mariadb.com/kb/en/show-grants/'),(380,'SHOW INDEX',26,'Syntax\n------ \nSHOW {INDEX | INDEXES | KEYS} \n FROM tbl_name [FROM db_name]\n [WHERE expr]\n \nDescription\n----------- \nSHOW INDEX returns table index information. The format\nresembles that of the SQLStatistics call in ODBC.\n \nYou can use db_name.tbl_name as an alternative to the\n tbl_name FROM db_name syntax. These two statements are\n equivalent:\n \nSHOW INDEX FROM mytable FROM mydb;\nSHOW INDEX FROM mydb.mytable;\n \nSHOW KEYS and SHOW INDEXES are synonyms for SHOW INDEX.\n \nYou can also list a table\'s indexes with the following\ncommand: \n \nmysqlshow -k db_name tbl_name\n \nSee mysqlshow for more details.\n \nThe information_schema.STATISTICS table stores similar\ninformation.\n \nThe following fields are returned by SHOW INDEX.\n \nField | Description | \n \nTable | Table name | \n \nNon_unique | 1 if the index permits duplicate values, 0 if\nvalues must be unique. | \n \nKey_name | Index name. The primary key is always named\nPRIMARY. | \n \nSeq_in_index | The column\'s sequence in the index,\nbeginning with 1. | \n \nColumn_name | Column name. | \n \nCollation | Either A, if the column is sorted in ascending\norder in the index, or NULL if it\'s not sorted. | \n \nCardinality | Estimated number of unique values in the\nindex. The cardinality statistics are calculated at various\ntimes, and can help the optimizer make improved decisions. |\n\n \nSub_part | NULL if the entire column is included in the\nindex, or the number of included characters if not. | \n \nPacked | NULL if the index is not packed, otherwise how the\nindex is packed. | \n \nNull | NULL if NULL values are permitted in the column, an\nempty string if NULL\'s are not permitted. | \n \nIndex_type | The index type, which can be BTREE, FULLTEXT,\nHASH or RTREE. See Storage Engine Index Types. | \n \nComment | Other information, such as whether the index is\ndisabled. | \n \nIndex_comment | Contents of the COMMENT attribute when the\nindex was created. | \n \nThe WHERE and LIKE clauses can be given to select rows using\nmore general conditions, as discussed in Extended SHOW.\n \nExamples\n-------- \nCREATE TABLE IF NOT EXISTS `employees_example` (\n `id` int(11) NOT NULL AUTO_INCREMENT,\n `first_name` varchar(30) NOT NULL,\n `last_name` varchar(40) NOT NULL,\n `position` varchar(25) NOT NULL,\n `home_address` varchar(50) NOT NULL,\n `home_phone` varchar(12) NOT NULL,\n `employee_code` varchar(25) NOT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `employee_code` (`employee_code`),\n KEY `first_name` (`first_name`,`last_name`)\n) ENGINE=Aria;\n \nINSERT INTO `employees_example` (`first_name`, `last_name`,\n`position`, `home_address`, `home_phone`, `employee_code`)\n VALUES\n (\'Mustapha\', \'Mond\', \'Chief Executive Officer\', \'692\nPromiscuous Plaza\', \'326-555-3492\', \'MM1\'),\n (\'Henry\', \'Foster\', \'Store Manager\', \'314 Savage\nCircle\', \'326-555-3847\', \'HF1\'),\n (\'Bernard\', \'Marx\', \'Cashier\', \'1240 Ambient\nAvenue\', \'326-555-8456\', \'BM1\'),\n (\'Lenina\', \'Crowne\', \'Cashier\', \'281 Bumblepuppy\nBoulevard\', \'328-555-2349\', \'LC1\'),\n (\'Fanny\', \'Crowne\', \'Restocker\', \'1023 Bokanovsky\nLane\', \'326-555-6329\', \'FC1\'),\n (\'Helmholtz\', \'Watson\', \'Janitor\', \'944 Soma\nCourt\', \'329-555-2478\', \'HW1\');\n \nSHOW INDEXES FROM employees_example;\n \n+-------------------+------------+---------------+--------------+---------------+-----------+-------------+----------+--------+------+------------+---------+---------------+\n| Table | Non_unique | Key_name | Seq_in_index | Column_name\n| Collation | Cardinality | Sub_part | Packed | Null |\nIndex_type | Comment | Index_comment |\n+-------------------+------------+---------------+--------------+---------------+-----------+-------------+----------+--------+------+------------+---------+---------------+\n| employees_example | 0 | PRIMARY | 1 | id | A | 7 | NULL |\nNULL | | BTREE | | |\n| employees_example | 0 | employee_code | 1 | employee_code\n| A | 7 | NULL | NULL | | BTREE | | |\n| employees_example | 1 | first_name | 1 | first_name | A |\nNULL | NULL | NULL | | BTREE | | |\n| employees_example | 1 | first_name | 2 | last_name | A |\nNULL | NULL | NULL | | BTREE | | |\n+-------------------+------------+---------------+--------------+---------------+-----------+-------------+----------+--------+------+------------+---------+---------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/show-index/','','https://mariadb.com/kb/en/show-index/'),(381,'SHOW LOCALES',26,'SHOW LOCALES was introduced as part of the Information\nSchema plugin extension in MariaDB 10.1.1.\n \nSHOW LOCALES is used to return locales information as part\nof the Locales plugin. While the information_schema.LOCALES\ntable has 8 columns, the SHOW LOCALES statement will only\ndisplay 4 of them:\n \nExample\n \nSHOW LOCALES;\n+-----+-------+-------------------------------------+------------------------+\n| Id | Name | Description | Error_Message_Language |\n+-----+-------+-------------------------------------+------------------------+\n| 0 | en_US | English - United States | english |\n| 1 | en_GB | English - United Kingdom | english |\n| 2 | ja_JP | Japanese - Japan | japanese |\n| 3 | sv_SE | Swedish - Sweden | swedish |\n...\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/show-locales/','','https://mariadb.com/kb/en/show-locales/'),(382,'SHOW MASTER STATUS',26,'Syntax\n------ \nSHOW MASTER STATUS\n \nDescription\n----------- \nProvides status information about the binary log files of\nthe master.\n \nThis statement requires the SUPER or the REPLICATION_CLIENT\nprivilege.\n \nTo see information about the current GTIDs in the binary\nlog, use the\ngtid_binlog_pos variable.\n \nExample\n \nSHOW MASTER STATUS;\n+--------------------+----------+--------------+------------------+\n| File | Position | Binlog_Do_DB | Binlog_Ignore_DB |\n+--------------------+----------+--------------+------------------+\n| mariadb-bin.000016 | 475 | | |\n+--------------------+----------+--------------+------------------+\nSELECT @@global.gtid_binlog_pos;\n+--------------------------+\n| @@global.gtid_binlog_pos |\n+--------------------------+\n| 0-1-2 |\n+--------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/show-master-status/','','https://mariadb.com/kb/en/show-master-status/'),(383,'SHOW OPEN TABLES',26,'Syntax\n------ \nSHOW OPEN TABLES [FROM db_name]\n [LIKE \'pattern\' | WHERE expr]\n \nDescription\n----------- \n SHOW OPEN TABLES lists the non-TEMPORARY\ntables that are currently open in the table cache. See\nhttp://dev.mysql.com/doc/refman/5.1/en/table-cache.html.\n \nThe FROM and LIKE clauses may be used.\n \nThe FROM\nclause, if present, restricts the tables shown to those\npresent in the\ndb_name database. \n \nThe LIKE clause, if\npresent on its own, indicates which table names to match.\nThe WHERE and LIKE clauses can be given to select rows using\nmore general conditions, as discussed in Extended SHOW.\n \nThe following information is returned:\n \nColumn | Description | \n \nDatabase | Database name. | \n \nName | Table name. | \n \nIn_use | Number of table instances being used. | \n \nName_locked | 1 if the table is name-locked, e.g. if it is\nbeing dropped or renamed, otherwise 0. | \n \nBefore MariaDB 5.5, each use of, for example, LOCK TABLE ...\nWRITE would increment In_use for that table. With the\nimplementation of the metadata locking improvements in\nMariaDB 5.5, LOCK TABLE... WRITE acquires a strong MDL lock,\nand concurrent connections will wait on this MDL lock, so\nany subsequent LOCK TABLE... WRITE will not increment\nIn_use.\n \nExample\n \nSHOW OPEN TABLES;\n \n+----------+---------------------------+--------+-------------+\n| Database | Table | In_use | Name_locked |\n+----------+---------------------------+--------+-------------+\n...\n| test | xjson | 0 | 0 |\n| test | jauthor | 0 | 0 |\n| test | locks | 1 | 0 |\n...\n+----------+---------------------------+--------+-------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/show-open-tables/','','https://mariadb.com/kb/en/show-open-tables/'),(384,'SHOW PACKAGE BODY STATUS',26,'Oracle-style packages were introduced in MariaDB 10.3.5.\n \nSyntax\n------ \nSHOW PACKAGE BODY STATUS\n [LIKE \'pattern\' | WHERE expr]\n \nDescription\n----------- \nThe SHOW PACKAGE BODY STATUS statement returns\ncharacteristics of stored package bodies (implementations),\nsuch as the database, name, type, creator, creation and\nmodification dates, and character set information. A similar\nstatement, SHOW PACKAGE STATUS, displays information about\nstored package specifications.\n \nThe LIKE clause, if present, indicates which package names\nto match. The WHERE and LIKE clauses can be given to select\nrows using more general conditions, as discussed in Extended\nSHOW.\n \nThe ROUTINES table in the INFORMATION_SCHEMA database\ncontains more detailed information.\n \nExamples\n-------- \nSHOW PACKAGE BODY STATUS LIKE \'pkg1\'\\G\n*************************** 1. row\n***************************\n Db: test\n Name: pkg1\n Type: PACKAGE BODY\n Definer: root@localhost\n Modified: 2018-02-27 14:44:14\n Created: 2018-02-27 14:44:14\n Security_type: DEFINER\n Comment: This is my first package body\ncharacter_set_client: utf8\ncollation_connection: utf8_general_ci\n Database Collation: latin1_swedish_ci\n \n\n\nURL: https://mariadb.com/kb/en/show-package-body-status/','','https://mariadb.com/kb/en/show-package-body-status/'),(385,'SHOW PACKAGE STATUS',26,'Oracle-style packages were introduced in MariaDB 10.3.5.\n \nSyntax\n------ \nSHOW PACKAGE STATUS\n [LIKE \'pattern\' | WHERE expr]\n \nDescription\n----------- \nThe SHOW PACKAGE STATUS statement returns characteristics of\nstored package specifications, such as the database, name,\ntype, creator, creation and modification dates, and\ncharacter set information. A similar statement, SHOW PACKAGE\nBODY STATUS, displays information about stored package\nbodies (i.e. implementations).\n \nThe LIKE clause, if present, indicates which package names\nto match. The WHERE and LIKE clauses can be given to select\nrows using more general conditions, as discussed in Extended\nSHOW.\n \nThe ROUTINES table in the INFORMATION_SCHEMA database\ncontains more detailed information.\n \nExamples\n-------- \nSHOW PACKAGE STATUS LIKE \'pkg1\'\\G\n*************************** 1. row\n***************************\n Db: test\n Name: pkg1\n Type: PACKAGE\n Definer: root@localhost\n Modified: 2018-02-27 14:38:15\n Created: 2018-02-27 14:38:15\n Security_type: DEFINER\n Comment: This is my first package\ncharacter_set_client: utf8\ncollation_connection: utf8_general_ci\n Database Collation: latin1_swedish_ci\n \n\n\nURL: https://mariadb.com/kb/en/show-package-status/','','https://mariadb.com/kb/en/show-package-status/'),(386,'SHOW PLUGINS',26,'Syntax\n------ \nSHOW PLUGINS;\n \nDescription\n----------- \n SHOW PLUGINS displays information about installed plugins.\nThe Library column indicates the plugin library - if it is\nNULL, the plugin is built-in and cannot be uninstalled.\n \nThe PLUGINS table in the information_schema database\ncontains more detailed information.\n \nFor specific information about storage engines (a particular\ntype of plugin), see the information_schema.ENGINES table\nand the SHOW ENGINES statement.\n \nExamples\n-------- \nSHOW PLUGINS;\n+----------------------------+----------+--------------------+-------------+---------+\n| Name | Status | Type | Library | License |\n+----------------------------+----------+--------------------+-------------+---------+\n| binlog | ACTIVE | STORAGE ENGINE | NULL | GPL |\n| mysql_native_password | ACTIVE | AUTHENTICATION | NULL |\nGPL |\n| mysql_old_password | ACTIVE | AUTHENTICATION | NULL | GPL\n|\n| MRG_MyISAM | ACTIVE | STORAGE ENGINE | NULL | GPL |\n| MyISAM | ACTIVE | STORAGE ENGINE | NULL | GPL |\n| CSV | ACTIVE | STORAGE ENGINE | NULL | GPL |\n| MEMORY | ACTIVE | STORAGE ENGINE | NULL | GPL |\n| FEDERATED | ACTIVE | STORAGE ENGINE | NULL | GPL |\n| PERFORMANCE_SCHEMA | ACTIVE | STORAGE ENGINE | NULL | GPL\n|\n| Aria | ACTIVE | STORAGE ENGINE | NULL | GPL |\n| InnoDB | ACTIVE | STORAGE ENGINE | NULL | GPL |\n| INNODB_TRX | ACTIVE | INFORMATION SCHEMA | NULL | GPL |\n...\n| INNODB_SYS_FOREIGN | ACTIVE | INFORMATION SCHEMA | NULL |\nGPL |\n| INNODB_SYS_FOREIGN_COLS | ACTIVE | INFORMATION SCHEMA |\nNULL | GPL |\n| SPHINX | ACTIVE | STORAGE ENGINE | NULL | GPL |\n| ARCHIVE | ACTIVE | STORAGE ENGINE | NULL | GPL |\n| BLACKHOLE | ACTIVE | STORAGE ENGINE | NULL | GPL |\n| FEEDBACK | DISABLED | INFORMATION SCHEMA | NULL | GPL |\n| partition | ACTIVE | STORAGE ENGINE | NULL | GPL |\n| pam | ACTIVE | AUTHENTICATION | auth_pam.so | GPL |\n+----------------------------+----------+--------------------+-------------+---------+\n \n\n\nURL: https://mariadb.com/kb/en/show-plugins/','','https://mariadb.com/kb/en/show-plugins/'),(387,'SHOW PLUGINS SONAME',26,'MariaDB 10.0.2\n \nSHOW PLUGINS SONAME was introduced in MariaDB 10.0.2\n \nSyntax\n------ \nSHOW PLUGINS SONAME { library | LIKE \'pattern\' | WHERE\nexpr };\n \nDescription\n----------- \nSHOW PLUGINS SONAME displays information about compiled-in\nand all server plugins in the plugin_dir directory,\nincluding plugins that haven\'t been installed.\n \nExamples\n-------- \nSHOW PLUGINS SONAME \'ha_example.so\';\n+----------+---------------+----------------+---------------+---------+\n| Name | Status | Type | Library | License |\n+----------+---------------+----------------+---------------+---------+\n| EXAMPLE | NOT INSTALLED | STORAGE ENGINE | ha_example.so |\nGPL |\n| UNUSABLE | NOT INSTALLED | DAEMON | ha_example.so | GPL |\n+----------+---------------+----------------+---------------+---------+\n \nThere is also a corresponding information_schema table,\ncalled ALL_PLUGINS, which contains more complete\ninformation.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/show-plugins-soname/','','https://mariadb.com/kb/en/show-plugins-soname/'),(388,'SHOW PRIVILEGES',26,'Syntax\n------ \nSHOW PRIVILEGES\n \nDescription\n----------- \n SHOW PRIVILEGES shows the list of system privileges that\nthe MariaDB server supports. The exact list of privileges\ndepends on the version of your server.\n \nNote that the Delete history privilege displays as Delete\nversioning rows (MDEV-20382).\n \nExamples\n-------- \nSHOW PRIVILEGES;\n+-------------------------+---------------------------------------+-------------------------------------------------------+\n| Privilege | Context | Comment |\n+-------------------------+---------------------------------------+-------------------------------------------------------+\n| Alter | Tables | To alter the table |\n| Alter routine | Functions,Procedures | To alter or drop\nstored functions/procedures |\n| Create | Databases,Tables,Indexes | To create new\ndatabases and tables |\n| Create routine | Databases | To use CREATE\nFUNCTION/PROCEDURE |\n| Create temporary tables | Databases | To use CREATE\nTEMPORARY TABLE |\n| Create view | Tables | To create new views |\n| Create user | Server Admin | To create new users |\n| Delete | Tables | To delete existing rows |\n| Delete versioning rows | Tables | To delete versioning\ntable historical rows |\n| Drop | Databases,Tables | To drop databases, tables, and\nviews |\n| Event | Server Admin | To create, alter, drop and execute\nevents |\n| Execute | Functions,Procedures | To execute stored\nroutines |\n| File | File access on server | To read and write files on\nthe server |\n| Grant option | Databases,Tables,Functions,Procedures | To\ngive to other users those privileges you possess |\n| Index | Tables | To create or drop indexes |\n| Insert | Tables | To insert data into tables |\n| Lock tables | Databases | To use LOCK TABLES (together\nwith SELECT privilege) |\n| Process | Server Admin | To view the plain text of\ncurrently executing queries |\n| Proxy | Server Admin | To make proxy user possible |\n| References | Databases,Tables | To have references on\ntables |\n| Reload | Server Admin | To reload or refresh tables, logs\nand privileges |\n| Replication client | Server Admin | To ask where the slave\nor master servers are |\n| Replication slave | Server Admin | To read binary log\nevents from the master |\n| Select | Tables | To retrieve rows from table |\n| Show databases | Server Admin | To see all databases with\nSHOW DATABASES |\n| Show view | Tables | To see views with SHOW CREATE VIEW |\n| Shutdown | Server Admin | To shut down the server |\n| Super | Server Admin | To use KILL thread, SET GLOBAL,\nCHANGE MASTER, etc. |\n| Trigger | Tables | To use triggers |\n| Create tablespace | Server Admin | To create/alter/drop\ntablespaces |\n| Update | Tables | To update existing rows |\n| Usage | Server Admin | No privileges - allow connect only\n|\n+-------------------------+---------------------------------------+-------------------------------------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/show-privileges/','','https://mariadb.com/kb/en/show-privileges/'),(389,'SHOW PROCEDURE CODE',26,'Syntax\n------ \nSHOW PROCEDURE CODE proc_name\n \nDescription\n----------- \nThis statement is a MariaDB extension that is available only\nfor servers that\nhave been built with debugging support. It displays a\nrepresentation of the\ninternal implementation of the named stored procedure. A\nsimilar statement,\n SHOW FUNCTION CODE, displays\ninformation about stored functions.\n \nBoth statements require that you be the owner of the routine\nor have\n SELECT access to the mysql.proc table.\n \nIf the named routine is available, each statement produces a\nresult\nset. Each row in the result set corresponds to one\n\"instruction\" in\nthe routine. The first column is Pos, which is an ordinal\nnumber\nbeginning with 0. The second column is Instruction, which\ncontains an\nSQL statement (usually changed from the original source), or\na\ndirective which has meaning only to the stored-routine\nhandler.\n \nExamples\n-------- \nDELIMITER //\n \nCREATE PROCEDURE p1 ()\n BEGIN\n DECLARE fanta INT DEFAULT 55;\n DROP TABLE t2;\n LOOP\n INSERT INTO t3 VALUES (fanta);\n END LOOP;\n END//\nQuery OK, 0 rows affected (0.00 sec)\n \nSHOW PROCEDURE CODE p1//\n+-----+----------------------------------------+\n| Pos | Instruction |\n+-----+----------------------------------------+\n| 0 | set fanta@0 55 |\n| 1 | stmt 9 \"DROP TABLE t2\" |\n| 2 | stmt 5 \"INSERT INTO t3 VALUES (fanta)\" |\n| 3 | jump 2 |\n+-----+----------------------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/show-procedure-code/','','https://mariadb.com/kb/en/show-procedure-code/'),(390,'SHOW PROCEDURE STATUS',26,'Syntax\n------ \nSHOW PROCEDURE STATUS\n [LIKE \'pattern\' | WHERE expr]\n \nDescription\n----------- \nThis statement is a MariaDB extension. It returns\ncharacteristics of a stored\nprocedure, such as the database, name, type, creator,\ncreation and modification\ndates, and character set information. A similar statement, \n SHOW FUNCTION STATUS, displays\ninformation about stored functions.\n \nThe LIKE clause, if present, indicates which procedure or\nfunction names to match. The WHERE and LIKE clauses can be\ngiven to select rows using more general conditions, as\ndiscussed in Extended SHOW.\n \nThe ROUTINES table in the INFORMATION_SCHEMA database\ncontains more detailed information.\n \nExamples\n-------- \nSHOW PROCEDURE STATUS LIKE \'p1\'\\G\n*************************** 1. row\n***************************\n Db: test\n Name: p1\n Type: PROCEDURE\n Definer: root@localhost\n Modified: 2010-08-23 13:23:03\n Created: 2010-08-23 13:23:03\n Security_type: DEFINER\n Comment: \ncharacter_set_client: latin1\ncollation_connection: latin1_swedish_ci\n Database Collation: latin1_swedish_ci\n \n\n\nURL: https://mariadb.com/kb/en/show-procedure-status/','','https://mariadb.com/kb/en/show-procedure-status/'),(395,'SHOW RELAYLOG EVENTS',26,'Syntax\n------ \nSHOW RELAYLOG [\'connection_name\'] EVENTS\n [IN \'log_name\'] [FROM pos] [LIMIT [offset,] row_count]\n \nDescription\n----------- \nOn replication slaves this command shows the events in the\nrelay log. If \'log_name\' is not specified, the first relay\nlog is shown.\n \nSyntax for the LIMIT clause is the same as for SELECT ...\nLIMIT.\n \nUsing the LIMIT clause is highly recommended because the\nSHOW RELAYLOG EVENTS command returns the complete contents\nof the relay log, which can be quite large.\n \nThis command does not return events related to setting user\nand system variables. If you need those, use mysqlbinlog.\n \nOn the replication master, this command does nothing.\n \nconnection_name\n \nconnection_name was added as part of multi-source\nreplication added in MariaDB 10.0.1\n \nIf there is only one nameless master, or the default master\n(as specified by the default_master_connection system\nvariable) is intended, connection_name can be omitted. If\nprovided, the SHOW RELAYLOG statement will apply to the\nspecified master. connection_name is case-insensitive.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/show-relaylog-events/','','https://mariadb.com/kb/en/show-relaylog-events/'),(396,'SHOW SLAVE HOSTS',26,'Syntax\n------ \nSHOW SLAVE HOSTS\n \nDescription\n----------- \nThis command is run on the master and displays a list of\nreplication slaves that are currently registered with it.\nOnly slaves started with the --report-host=host_name option\nare visible in this list.\n \nThe list is displayed on any server (not just the master\nserver). The output\nlooks like this:\n \nSHOW SLAVE HOSTS;\n+------------+-----------+------+-----------+\n| Server_id | Host | Port | Master_id |\n+------------+-----------+------+-----------+\n| 192168010 | iconnect2 | 3306 | 192168011 |\n| 1921680101 | athena | 3306 | 192168011 |\n+------------+-----------+------+-----------+\nServer_id: The unique server ID of the slave server, as\nconfigured in the server\'s option file, or on the command\nline with --server-id=value.\nHost: The host name of the slave server, as configured in\nthe server\'s option file, or on the command line with\n--report-host=host_name. Note that this can differ from the\nmachine name as configured in the operating system.\nPort: The port the slave server is listening on.\nMaster_id: The unique server ID of the master server that\nthe slave server is replicating from.\n \nSome MariaDB and MySQL versions report another variable,\nrpl_recovery_rank. This\nvariable was never used, and was eventually removed in\nMariaDB 10.1.2 and MySQL 5.6.\n \n\n\nURL: https://mariadb.com/kb/en/show-slave-hosts/','','https://mariadb.com/kb/en/show-slave-hosts/'),(391,'SHOW PROCESSLIST',26,'Syntax\n------ \nSHOW [FULL] PROCESSLIST\n \nDescription\n----------- \n SHOW PROCESSLIST shows you which threads are running. You\ncan also get this information from the\ninformation_schema.PROCESSLIST table or the mysqladmin\nprocesslist command. If you have the \nPROCESS privilege, you can see all threads.\nOtherwise, you can see only your own threads (that is,\nthreads associated with\nthe MariaDB account that you are using). If you do not use\nthe\nFULL keyword, only the first 100 characters of each\nstatement are shown in the Info field.\n \nThe columns shown in SHOW PROCESSLIST\n are:\n \nName | Description | Introduced | \n \nID | The client\'s process ID. | | \n \nUSER | The username associated with the process. | | \n \nHOST | The host the client is connected to. | | \n \nDB | The default database of the process (NULL if no\ndefault). | | \n \nCOMMAND | The command type. See Thread Command Values. | | \n \nTIME | The amount of time, in seconds, the process has been\nin its current state. For a slave SQL thread before MariaDB\n10.1, this is the time in seconds between the last\nreplicated event\'s timestamp and the slave machine\'s real\ntime. | | \n \nSTATE | See Thread States. | | \n \nINFO | The statement being executed. | | \n \nPROGRESS | The total progress of the process (0-100%) (see\nProgress Reporting). | MariaDB 5.3 | \n \nSee TIME_MS column in information_schema.PROCESSLIST for\ndifferences in the TIME column between MariaDB and MySQL.\n \nThe information_schema.PROCESSLIST table contains the\nfollowing additional columns:\n \nName | Description | Introduced | \n \nTIME_MS | The amount of time, in milliseconds, the process\nhas been in its current state. | MariaDB 5.1 | \n \nSTAGE | The stage the process is currently in. |\nMariaDB 5.3 | \n \nMAX_STAGE | The maximum number of stages. | MariaDB 5.3 | \n \nPROGRESS | The progress of the process within the current\nstage (0-100%). | MariaDB 5.3 | \n \nMEMORY_USED | The amount of memory used by the process. |\nMariaDB 10.0.1 | \n \nEXAMINED_ROWS | The number of rows the process has examined.\n| MariaDB 10.0.1 | \n \nQUERY_ID | Query ID. | MariaDB 10.0.5 | \n \nNote that the PROGRESS field from the information schema,\nand the PROGRESS field from SHOW PROCESSLIST display\ndifferent results. SHOW PROCESSLIST shows the total\nprogress, while the information schema shows the progress\nfor the current stage only.\n \nThreads can be killed using their thread_id, or, since\nMariaDB 10.0.5, their query_id, with the KILL statement.\n \nSince queries on this table are locking, if the\nperformance_schema is enabled, you may want to query the\nTHREADS table instead.\n \nExamples\n-------- \nFrom MariaDB 5.1.x\n \nSHOW FULL PROCESSLIST;\n+---------+-------+-----------+------+---------+------+-------+-----------------------+\n| Id | User | Host | db | Command | Time | State | Info |\n+---------+-------+-----------+------+---------+------+-------+-----------------------+\n| 1988880 | dbart | localhost | NULL | Query | 0 | NULL |\nSHOW FULL PROCESSLIST |\n+---------+-------+-----------+------+---------+------+-------+-----------------------+\n \nSELECT * FROM information_schema.processlist;\n+---------+-------+-----------+------+---------+------+-----------+----------------------------------------------+---------+\n| ID | USER | HOST | DB | COMMAND | TIME | STATE | INFO |\nTIME_MS |\n+---------+-------+-----------+------+---------+------+-----------+----------------------------------------------+---------+\n| 1988880 | dbart | localhost | NULL | Query | 0 | executing\n| SELECT * FROM information_schema.processlist | 0.444 |\n+---------+-------+-----------+------+---------+------+-----------+----------------------------------------------+---------+\n \nFrom MariaDB 5.5.x\n \nSHOW FULL PROCESSLIST;\n+-----+------+-----------+------+---------+------+-------+-----------------------+----------+\n| Id | User | Host | db | Command | Time | State | Info |\nProgress |\n+-----+------+-----------+------+---------+------+-------+-----------------------+----------+\n| 126 | root | localhost | NULL | Query | 0 | NULL | SHOW\nFULL PROCESSLIST | 0.000 |\n+-----+------+-----------+------+---------+------+-------+-----------------------+----------+\n \nSELECT * FROM information_schema.processlist;\n+-----+--------+-----------+------+---------+------+-----------+----------------------------------------------+---------+-------+-----------+----------+\n| ID | USER | HOST | DB | COMMAND | TIME | STATE | INFO |\nTIME_MS | STAGE | MAX_STAGE | PROGRESS |\n+-----+--------+-----------+------+---------+------+-----------+----------------------------------------------+---------+-------+-----------+----------+\n| 126 | root | localhost | NULL | Query | 0 | executing |\nSELECT * FROM information_schema.processlist | 344.718 | 0 |\n0 | 0.000 |\n+-----+--------+-----------+------+---------+------+-----------+----------------------------------------------+---------+-------+-----------+----------+\n \nFrom MariaDB 10.0.x\n \nSHOW PROCESSLIST;\n+----+-----------------+-----------+------+---------+------+------------------------+------------------+----------+\n| Id | User | Host | db | Command | Time | State | Info |\nProgress |\n+----+-----------------+-----------+------+---------+------+------------------------+------------------+----------+\n| 2 | event_scheduler | localhost | NULL | Daemon | 2693 |\nWaiting on empty queue | NULL | 0.000 |\n| 4 | root | localhost | NULL | Query | 0 | Table lock |\nSHOW PROCESSLIST | 0.000 |\n+----+-----------------+-----------+------+---------+------+------------------------+------------------+----------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/show-processlist/','','https://mariadb.com/kb/en/show-processlist/'),(392,'SHOW PROFILE',26,'Syntax\n------ \nSHOW PROFILE [type [, type] ... ]\n [FOR QUERY n]\n [LIMIT row_count [OFFSET offset]]\n \ntype:\n ALL\n | BLOCK IO\n | CONTEXT SWITCHES\n | CPU\n | IPC\n | MEMORY\n | PAGE FAULTS\n | SOURCE\n | SWAPS\n \nDescription\n----------- \nThe SHOW PROFILE and \nSHOW PROFILES statements display profiling\ninformation that indicates resource usage for statements\nexecuted during the\ncourse of the current session.\n \nProfiling is controlled by the profiling session variable,\nwhich has a default value of 0 (OFF). Profiling is enabled\nby setting profiling to 1 or ON:\n \nSET profiling = 1;\n \nSHOW PROFILES displays a list of the most recent statements\nsent to the master. The size of the list is controlled by\nthe\nprofiling_history_size session variable, which has a default\nvalue of 15. The maximum value is 100. Setting the value to\n0 has the practical effect of disabling profiling.\n \nAll statements are profiled except SHOW PROFILES and \nSHOW PROFILE, so you will find neither of those statements\nin the profile list. Malformed statements are profiled. For\nexample, \n SHOW PROFILING is an illegal statement, and a syntax error\noccurs if you try to execute it, but it will show up in the\nprofiling list.\n \n SHOW PROFILE displays detailed information about a single\nstatement. Without the FOR QUERY n clause, the output\npertains to the most recently executed statement. If \n FOR QUERY n is included,\n SHOW PROFILE displays information for statement n. The\nvalues of n correspond to\nthe Query_ID values displayed by SHOW PROFILES.\n \nThe LIMIT row_count clause may be given to limit the\noutput to row_count rows. If LIMIT is given, \n OFFSET offset may be added to begin the output offset\nrows into the full set of rows.\n \nBy default, SHOW PROFILE displays Status and Duration\ncolumns. The Status values are like the State values\ndisplayed by \nSHOW PROCESSLIST,\nalthough there might be some minor differences in\ninterpretation for\nthe two statements for some status values (see\nhttp://dev.mysql.com/doc/refman/5.6/en/thread-information.html).\n \nOptional type values may be specified to display specific\nadditional\ntypes of information:\nALL displays all information\nBLOCK IO displays counts for block input and output\noperations\nCONTEXT SWITCHES displays counts for voluntary and\ninvoluntary context switches\nCPU displays user and system CPU usage times\nIPC displays counts for messages sent and received\nMEMORY is not currently implemented\nPAGE FAULTS displays counts for major and minor page faults\nSOURCE displays the names of functions from the source code,\ntogether with the name and line number of the file in which\nthe function occurs\nSWAPS displays swap counts\n \nProfiling is enabled per session. When a session ends, its\nprofiling information is lost.\n \nThe information_schema.PROFILING table contains similar\ninformation.\n \nExamples\n-------- \nSELECT @@profiling;\n+-------------+\n| @@profiling |\n+-------------+\n| 0 |\n+-------------+\n \nSET profiling = 1;\n \nUSE test;\n \nDROP TABLE IF EXISTS t1;\n \nCREATE TABLE T1 (id INT);\n \nSHOW PROFILES;\n+----------+------------+--------------------------+\n| Query_ID | Duration | Query |\n+----------+------------+--------------------------+\n| 1 | 0.00009200 | SELECT DATABASE() |\n| 2 | 0.00023800 | show databases |\n| 3 | 0.00018900 | show tables |\n| 4 | 0.00014700 | DROP TABLE IF EXISTS t1 |\n| 5 | 0.24476900 | CREATE TABLE T1 (id INT) |\n+----------+------------+--------------------------+\n \nSHOW PROFILE;\n+----------------------+----------+\n| Status | Duration |\n+----------------------+----------+\n| starting | 0.000042 |\n| checking permissions | 0.000044 |\n| creating table | 0.244645 |\n| After create | 0.000013 |\n| query end | 0.000003 |\n| freeing items | 0.000016 |\n| logging slow query | 0.000003 |\n| cleaning up | 0.000003 |\n+----------------------+----------+\n \nSHOW PROFILE FOR QUERY 4;\n+--------------------+----------+\n| Status | Duration |\n+--------------------+----------+\n| starting | 0.000126 |\n| query end | 0.000004 |\n| freeing items | 0.000012 |\n| logging slow query | 0.000003 |\n| cleaning up | 0.000002 |\n+--------------------+----------+\n \nSHOW PROFILE CPU FOR QUERY 5;\n+----------------------+----------+----------+------------+\n| Status | Duration | CPU_user | CPU_system |\n+----------------------+----------+----------+------------+\n| starting | 0.000042 | 0.000000 | 0.000000 |\n| checking permissions | 0.000044 | 0.000000 | 0.000000 |\n| creating table | 0.244645 | 0.000000 | 0.000000 |\n| After create | 0.000013 | 0.000000 | 0.000000 |\n| query end | 0.000003 | 0.000000 | 0.000000 |\n| freeing items | 0.000016 | 0.000000 | 0.000000 |\n| logging slow query | 0.000003 | 0.000000 | 0.000000 |\n| cleaning up | 0.000003 | 0.000000 | 0.000000 |\n+----------------------+----------+----------+------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/show-profile/','','https://mariadb.com/kb/en/show-profile/'),(399,'SHOW TABLE STATUS',26,'Syntax\n------ \nSHOW TABLE STATUS [{FROM | IN} db_name]\n [LIKE \'pattern\' | WHERE expr]\n \nDescription\n----------- \n SHOW TABLE STATUS works like \n SHOW TABLES, but provides more extensive information about\neach non-TEMPORARY table.\n \nThe LIKE clause, if present on its own, indicates which\ntable names to\nmatch. The WHERE and LIKE clauses can be given to select\nrows using more general conditions, as discussed in Extended\nSHOW.\n \nThe following information is returned:\n \nColumn | Description | \n \nName | Table name. | \n \nEngine | Table storage engine. | \n \nVersion | Version number from the table\'s .frm file. | \n \nRow_format | Row format (see InnoDB, Aria and MyISAM row\nformats). | \n \nRows | Number of rows in the table. Some engines, such as\nXtraDB and InnoDB may store an estimate. | \n \nAvg_row_length | Average row length in the table. | \n \nData_length | For InnoDB/XtraDB, the index size, in pages,\nmultiplied by the page size. For Aria and MyISAM, length of\nthe data file, in bytes. For MEMORY, the approximate\nallocated memory. | \n \nMax_data_length | Maximum length of the data file, ie the\ntotal number of bytes that could be stored in the table. Not\nused in XtraDB and InnoDB. | \n \nIndex_length | Length of the index file. | \n \nData_free | Bytes allocated but unused. For InnoDB tables in\na shared tablespace, the free space of the shared tablespace\nwith small safety margin. An estimate in the case of\npartitioned tables - see the PARTITIONS table. | \n \nAuto_increment | Next AUTO_INCREMENT value. | \n \nCreate_time | Time the table was created. | \n \nUpdate_time | Time the table was last updated. On Windows,\nthe timestamp is not updated on update, so MyISAM values\nwill be inaccurate. In InnoDB, if shared tablespaces are\nused, will be NULL, while buffering can also delay the\nupdate, so the value will differ from the actual time of the\nlast UPDATE, INSERT or DELETE. | \n \nCheck_time | Time the table was last checked. Not kept by\nall storage engines, in which case will be NULL. | \n \nCollation | Character set and collation. | \n \nChecksum | Live checksum value, if any. | \n \nCreate_options | Extra CREATE TABLE options. | \n \nComment | Table comment provided when MariaDB created the\ntable. | \n \nSimilar information can be found in the\ninformation_schema.TABLES table as well as by using\nmysqlshow:\n \nmysqlshow --status db_name\n \nExample\n \nshow table status\\G\n*************************** 1. row\n***************************\n Name: bus_routes\n Engine: InnoDB\n Version: 10\n Row_format: Dynamic\n Rows: 5\n Avg_row_length: 3276\n Data_length: 16384\nMax_data_length: 0\n Index_length: 0\n Data_free: 0\n Auto_increment: NULL\n Create_time: 2017-05-24 11:17:46\n Update_time: NULL\n Check_time: NULL\n Collation: latin1_swedish_ci\n Checksum: NULL\n Create_options: \n Comment:\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/show-table-status/','','https://mariadb.com/kb/en/show-table-status/'),(400,'SHOW TABLES',26,'Syntax\n------ \nSHOW [FULL] TABLES [FROM db_name]\n [LIKE \'pattern\' | WHERE expr]\n \nDescription\n----------- \nSHOW TABLES lists the non-TEMPORARY tables, sequences and\nviews in a given database. \n \nThe LIKE clause, if present on its own, indicates which\ntable names to match. The WHERE and LIKE clauses can be\ngiven to select rows using more general conditions, as\ndiscussed in Extended SHOW. For example, when searching for\ntables in the test database, the column name for use in the\nWHERE and LIKE clauses will be Tables_in_test\n \nThe FULL modifier is supported such that SHOW FULL TABLES\ndisplays a second output column. Values for the second\ncolumn. Table_type, are BASE TABLE for a table, VIEW for a\nview and SEQUENCE for a sequence.\n \nYou can also get this information using:\n \nmysqlshow db_name\n \nSee mysqlshow for more details.\n \nIf you have no privileges for a base table or view, it does\nnot show up in the output from SHOW TABLES or mysqlshow\ndb_name.\n \nThe information_schema.TABLES table, as well as the SHOW\nTABLE STATUS statement, provide extended information about\ntables.\n \nExamples\n-------- \nSHOW TABLES;\n+----------------------+\n| Tables_in_test |\n+----------------------+\n| animal_count |\n| animals |\n| are_the_mooses_loose |\n| aria_test2 |\n| t1 |\n| view1 |\n+----------------------+\n \nShowing the tables beginning with a only.\n \nSHOW TABLES WHERE Tables_in_test LIKE \'a%\';\n+----------------------+\n| Tables_in_test |\n+----------------------+\n| animal_count |\n| animals |\n| are_the_mooses_loose |\n| aria_test2 |\n+----------------------+\n \nShowing tables and table types:\n \nSHOW FULL TABLES;\n+----------------+------------+\n| Tables_in_test | Table_type |\n+----------------+------------+\n| s1 | SEQUENCE |\n| student | BASE TABLE |\n| v1 | VIEW |\n+----------------+------------+\n \n\n\nURL: https://mariadb.com/kb/en/show-tables/','','https://mariadb.com/kb/en/show-tables/'),(401,'SHOW TABLE_STATISTICS',26,'MariaDB 5.2 introduced the User Statistics feature.\n \nSyntax\n------ \nSHOW TABLE_STATISTICS\n \nDescription\n----------- \nThe SHOW TABLE_STATISTICS statement was introduced in\nMariaDB 5.2 as part of the User Statistics feature. It was\nremoved as a separate statement in MariaDB 10.1.1, but\neffectively replaced by the generic SHOW\ninformation_schema_table statement. The\ninformation_schema.TABLE_STATISTICS table shows statistics\non table usage\n \nThe userstat system variable must be set to 1 to activate\nthis feature. See the User Statistics and\ninformation_schema.TABLE_STATISTICS articles for more\ninformation.\n \nExample\n \nFrom MariaDB 10.0\n \nSHOW TABLE_STATISTICS\\G\n*************************** 1. row\n***************************\n Table_schema: mysql\n Table_name: proxies_priv\n Rows_read: 2\n Rows_changed: 0\nRows_changed_x_#indexes: 0\n*************************** 2. row\n***************************\n Table_schema: test\n Table_name: employees_example\n Rows_read: 7\n Rows_changed: 0\nRows_changed_x_#indexes: 0\n*************************** 3. row\n***************************\n Table_schema: mysql\n Table_name: user\n Rows_read: 16\n Rows_changed: 0\nRows_changed_x_#indexes: 0\n*************************** 4. row\n***************************\n Table_schema: mysql\n Table_name: db\n Rows_read: 2\n Rows_changed: 0\nRows_changed_x_#indexes: 0\n \n\n \n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/show-table-statistics/','','https://mariadb.com/kb/en/show-table-statistics/'),(402,'SHOW TRIGGERS',26,'Syntax\n------ \nSHOW TRIGGERS [FROM db_name]\n [LIKE \'pattern\' | WHERE expr]\n \nDescription\n----------- \n SHOW TRIGGERS lists the triggers currently defined for\ntables in a database (the default database unless a FROM\nclause is given). This statement requires the\nTRIGGER privilege (prior to MySQL\n5.1.22, it required the SUPER privilege). \n \nThe LIKE clause, if present on its own, indicates which\ntable names to\nmatch and causes the statement to display triggers for those\ntables. The WHERE and LIKE clauses can be given to select\nrows using more general conditions, as discussed in Extended\nSHOW.\n \nSimilar information is stored in the\ninformation_schema.TRIGGERS table.\n \nIf there are multiple triggers for the same action, then the\ntriggers are shown in action order.\n \nExamples\n-------- \nFor the trigger defined at Trigger Overview:\n \nSHOW triggers Like \'animals\' \\G\n*************************** 1. row\n***************************\n Trigger: the_mooses_are_loose\n Event: INSERT\n Table: animals\n Statement: BEGIN\n IF NEW.name = \'Moose\' THEN\n UPDATE animal_count SET animal_count.animals =\nanimal_count.animals+100;\n ELSE \n UPDATE animal_count SET animal_count.animals =\nanimal_count.animals+1;\n END IF;\nEND\n Timing: AFTER\n Created: 2016-09-29 13:53:34.35\n sql_mode: \n Definer: root@localhost\ncharacter_set_client: utf8\ncollation_connection: utf8_general_ci\n Database Collation: latin1_swedish_ci\n \nListing all triggers associated with a certain table:\n \nSHOW TRIGGERS FROM test WHERE `Table` = \'user\' \\G\n*************************** 1. row\n***************************\n Trigger: user_ai\n Event: INSERT\n Table: user\n Statement: BEGIN END\n Timing: AFTER\n Created: 2016-09-29 13:53:34.35\n sql_mode: \n Definer: root@%\ncharacter_set_client: utf8\ncollation_connection: utf8_general_ci\n Database Collation: latin1_swedish_ci\n \nSHOW triggers WHERE Event Like \'Insert\' \\G\n*************************** 1. row\n***************************\n Trigger: the_mooses_are_loose\n Event: INSERT\n Table: animals\n Statement: BEGIN\n IF NEW.name = \'Moose\' THEN\n UPDATE animal_count SET animal_count.animals =\nanimal_count.animals+100;\n ELSE \n UPDATE animal_count SET animal_count.animals =\nanimal_count.animals+1;\n END IF;\nEND\n Timing: AFTER\n Created: 2016-09-29 13:53:34.35\n sql_mode: \n Definer: root@localhost\ncharacter_set_client: utf8\ncollation_connection: utf8_general_ci\n Database Collation: latin1_swedish_ci\ncharacter_set_client is the session value of the\ncharacter_set_client system variable when the trigger was\ncreated. \ncollation_connection is the session value of the\ncollation_connection system variable when the trigger was\n created. \nDatabase Collation is the collation of the database \n with which the trigger is associated.\n \nThese columns were added in MariaDB/MySQL 5.1.21.\n \nOld triggers created before MySQL 5.7 and MariaDB 10.2.3 has\nNULL in the Created column.\n \n\n\nURL: https://mariadb.com/kb/en/show-triggers/','','https://mariadb.com/kb/en/show-triggers/'),(403,'SHOW USER_STATISTICS',26,'MariaDB 5.2 introduced the User Statistics feature.\n \nSyntax\n------ \nSHOW USER_STATISTICS\n \nDescription\n----------- \nThe SHOW USER_STATISTICS statement was introduced in MariaDB\n5.2 as part of the User Statistics feature. It was removed\nas a separate statement in MariaDB 10.1.1, but effectively\nreplaced by the generic SHOW information_schema_table\nstatement. The information_schema.USER_STATISTICS table\nholds statistics about user activity. You can use this table\nto find out such things as which user is causing the most\nload and which users are being abusive. You can also use\nthis table to measure how close to capacity the server may\nbe.\n \nThe userstat system variable must be set to 1 to activate\nthis feature. See the User Statistics and\ninformation_schema.USER_STATISTICS table for more\ninformation.\n \nExample\n \nFrom MariaDB 10.0:\n \nSHOW USER_STATISTICS\\G\n*************************** 1. row\n***************************\n User: root\n Total_connections: 1\nConcurrent_connections: 0\n Connected_time: 3297\n Busy_time: 0.14113400000000006\n Cpu_time: 0.017637000000000003\n Bytes_received: 969\n Bytes_sent: 22355\n Binlog_bytes_written: 0\n Rows_read: 10\n Rows_sent: 67\n Rows_deleted: 0\n Rows_inserted: 0\n Rows_updated: 0\n Select_commands: 7\n Update_commands: 0\n Other_commands: 0\n Commit_transactions: 1\n Rollback_transactions: 0\n Denied_connections: 0\n Lost_connections: 0\n Access_denied: 0\n Empty_queries: 7\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/show-user-statistics/','','https://mariadb.com/kb/en/show-user-statistics/'),(404,'SHOW VARIABLES',26,'Syntax\n------ \nSHOW [GLOBAL | SESSION] VARIABLES\n [LIKE \'pattern\' | WHERE expr]\n \nDescription\n----------- \nSHOW VARIABLES shows the values of MariaDB system variables.\nThis\ninformation also can be obtained using the mysqladmin\nvariables\ncommand. The LIKE clause, if present, indicates which\nvariable names\nto match. The WHERE clause can be given to select rows using\nmore\ngeneral conditions.\n \nWith the GLOBAL modifier, SHOW VARIABLES displays the values\nthat are\nused for new connections to MariaDB. With SESSION, it\ndisplays the\nvalues that are in effect for the current connection. If no\nmodifier\nis present, the default is SESSION. LOCAL is a synonym for\nSESSION.\nWith a LIKE clause, the statement displays only rows for\nthose\nvariables with names that match the pattern. To obtain the\nrow for a\nspecific variable, use a LIKE clause as shown:\n \nSHOW VARIABLES LIKE \'maria_group_commit\';\n \nSHOW SESSION VARIABLES LIKE \'maria_group_commit\';\n \nTo get a list of variables whose name match a pattern, use\nthe \"%\"\nwildcard character in a LIKE clause:\n \nSHOW VARIABLES LIKE \'%maria%\';\n \nSHOW GLOBAL VARIABLES LIKE \'%maria%\';\n \nWildcard characters can be used in any position within the\npattern to\nbe matched. Strictly speaking, because \"_\" is a wildcard\nthat matches\nany single character, you should escape it as \"\\_\" to\nmatch it\nliterally. In practice, this is rarely necessary.\n \nThe WHERE and LIKE clauses can be given to select rows using\nmore general conditions, as discussed in Extended SHOW.\n \nSee SET for information on setting server system variables.\n \nSee Server System Variables for a list of all the variables\nthat can be set.\n \nYou can also see the server variables by querying the\nInformation Schema GLOBAL_VARIABLES and SESSION_VARIABLES\ntables.\n \nExamples\n-------- \nSHOW VARIABLES LIKE \'aria%\';\n \n+------------------------------------------+---------------------+\n| Variable_name | Value |\n+------------------------------------------+---------------------+\n| aria_block_size | 8192 |\n| aria_checkpoint_interval | 30 |\n| aria_checkpoint_log_activity | 1048576 |\n| aria_force_start_after_recovery_failures | 0 |\n| aria_group_commit | none |\n| aria_group_commit_interval | 0 |\n| aria_log_file_size | 1073741824 |\n| aria_log_purge_type | immediate |\n| aria_max_sort_file_size | 9223372036853727232 |\n| aria_page_checksum | ON |\n| aria_pagecache_age_threshold | 300 |\n| aria_pagecache_buffer_size | 134217728 |\n| aria_pagecache_division_limit | 100 |\n| aria_recover | NORMAL |\n| aria_repair_threads | 1 |\n| aria_sort_buffer_size | 134217728 |\n| aria_stats_method | nulls_unequal |\n| aria_sync_log_dir | NEWFILE |\n| aria_used_for_temp_tables | ON |\n+------------------------------------------+---------------------+\n \nSELECT VARIABLE_NAME, SESSION_VALUE, GLOBAL_VALUE FROM\n INFORMATION_SCHEMA.SYSTEM_VARIABLES WHERE\n VARIABLE_NAME LIKE \'max_error_count\' OR\n VARIABLE_NAME LIKE \'innodb_sync_spin_loops\';\n \n+---------------------------+---------------+--------------+\n| VARIABLE_NAME | SESSION_VALUE | GLOBAL_VALUE |\n+---------------------------+---------------+--------------+\n| MAX_ERROR_COUNT | 64 | 64 |\n| INNODB_SYNC_SPIN_LOOPS | NULL | 30 |\n+---------------------------+---------------+--------------+\n \nSET GLOBAL max_error_count=128;\n \nSELECT VARIABLE_NAME, SESSION_VALUE, GLOBAL_VALUE FROM\n INFORMATION_SCHEMA.SYSTEM_VARIABLES WHERE\n VARIABLE_NAME LIKE \'max_error_count\' OR\n VARIABLE_NAME LIKE \'innodb_sync_spin_loops\';\n \n+---------------------------+---------------+--------------+\n| VARIABLE_NAME | SESSION_VALUE | GLOBAL_VALUE |\n+---------------------------+---------------+--------------+\n| MAX_ERROR_COUNT | 64 | 128 |\n| INNODB_SYNC_SPIN_LOOPS | NULL | 30 |\n+---------------------------+---------------+--------------+\n \nSET GLOBAL max_error_count=128;\n \nSHOW VARIABLES LIKE \'max_error_count\';\n \n+-----------------+-------+\n| Variable_name | Value |\n+-----------------+-------+\n| max_error_count | 64 |\n+-----------------+-------+\n \nSHOW GLOBAL VARIABLES LIKE \'max_error_count\';\n \n+-----------------+-------+\n| Variable_name | Value |\n+-----------------+-------+\n| max_error_count | 128 |\n+-----------------+-------+\n \nBecause the following variable only has a global scope, the\nglobal value is returned even when specifying SESSION (in\nthis case by default):\n \nSHOW VARIABLES LIKE \'innodb_sync_spin_loops\';\n \n+------------------------+-------+\n| Variable_name | Value |\n+------------------------+-------+\n| innodb_sync_spin_loops | 30 |\n+------------------------+-------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/show-variables/','','https://mariadb.com/kb/en/show-variables/'),(405,'SHOW WARNINGS',26,'Syntax\n------ \nSHOW WARNINGS [LIMIT [offset,] row_count]\nSHOW ERRORS [LIMIT row_count OFFSET offset]\nSHOW COUNT(*) WARNINGS\n \nDescription\n----------- \n SHOW WARNINGS shows the error, warning, and note messages\nthat resulted from the last statement that generated\nmessages in the\ncurrent session. It shows nothing if the last statement used\na table\nand generated no messages. (That is, a statement that uses a\ntable but\ngenerates no messages clears the message list.) Statements\nthat do not\nuse tables and do not generate messages have no effect on\nthe message\nlist.\n \nA note is different to a warning in that it only appears if\nthe sql_notes variable is set to 1 (the default), and is not\nconverted to an error if strict mode is enabled.\n \nA related statement, SHOW ERRORS, shows only the errors.\n \nThe SHOW COUNT(*) WARNINGS statement displays the total\nnumber of errors, warnings, and notes. You can also retrieve\nthis number from\nthe warning_count variable:\n \nSHOW COUNT(*) WARNINGS;\nSELECT @@warning_count;\n \nThe value of warning_count might be greater than the number\nof messages displayed by SHOW WARNINGS if the\nmax_error_count system variable is set so low that not all\nmessages are stored.\n \nThe LIMIT clause has the same syntax as for the\n SELECT statement.\n \nSHOW WARNINGS can be used after EXPLAIN EXTENDED to see how\na query is internally rewritten by MariaDB.\n \nIf the sql_notes server variable is set to 1, Notes are\nincluded in the output of SHOW WARNINGS; if it is set to 0,\nthis statement will not show (or count) Notes.\n \nThe results of SHOW WARNINGS and SHOW COUNT(*) WARNINGS are\ndirectly sent to the client. If you need to access those\ninformation in a stored program, you can use the GET\nDIAGNOSTICS statement instead.\n \nFor a list of MariaDB error codes, see MariaDB Error Codes.\n \nThe mysql client also has a number of options related to\nwarnings. The \\W command will show warnings after every\nstatement, while \\w will disable this. Starting the client\nwith the --show-warnings option will show warnings after\nevery statement.\n \nMariaDB 10.3.1 implements a stored routine error stack\ntrace. SHOW WARNINGS can also be used to show more\ninformation. See the example below.\n \nExamples\n-------- \nSELECT 1/0;\n+------+\n| 1/0 |\n+------+\n| NULL |\n+------+\n \nSHOW COUNT(*) WARNINGS;\n+-------------------------+\n| @@session.warning_count |\n+-------------------------+\n| 1 |\n+-------------------------+\n \nSHOW WARNINGS;\n+---------+------+---------------+\n| Level | Code | Message |\n+---------+------+---------------+\n| Warning | 1365 | Division by 0 |\n+---------+------+---------------+\n \nStack Trace\n \nFrom MariaDB 10.3.1, displaying a stack trace:\n \nDELIMITER $$\nCREATE OR REPLACE PROCEDURE p1()\n BEGIN\n DECLARE c CURSOR FOR SELECT * FROM not_existing;\n OPEN c;\n CLOSE c;\n END;\n$$\nCREATE OR REPLACE PROCEDURE p2()\n BEGIN\n CALL p1;\n END;\n$$\nDELIMITER ;\nCALL p2;\nERROR 1146 (42S02): Table \'test.not_existing\' doesn\'t\nexist\n \nSHOW WARNINGS;\n+-------+------+-----------------------------------------+\n| Level | Code | Message |\n+-------+------+-----------------------------------------+\n| Error | 1146 | Table \'test.not_existing\' doesn\'t exist\n|\n| Note | 4091 | At line 6 in test.p1 |\n| Note | 4091 | At line 4 in test.p2 |\n+-------+------+-----------------------------------------+\n \nSHOW WARNINGS displays a stack trace, showing where the\nerror actually happened:\nLine 4 in test.p1 is the OPEN command which actually raised\nthe error\nLine 3 in test.p2 is the CALL statement, calling p1 from p2.\n \n\n\nURL: https://mariadb.com/kb/en/show-warnings/','','https://mariadb.com/kb/en/show-warnings/'),(406,'SHOW WSREP_MEMBERSHIP',26,'MariaDB 10.1.2\n \nSHOW WSREP_MEMBERSHIP was introduced with the WSREP_INFO\nplugin in MariaDB 10.1.2.\n \nSyntax\n------ \nSHOW WSREP_MEMBERSHIP\n \nDescription\n----------- \nThe SHOW WSREP_MEMBERSHIP statement returns Galera node\ncluster membership information. It returns the same\ninformation as found in the\ninformation_schema.WSREP_MEMBERSHIP table. Only users with\nthe SUPER privilege can access this information.\n \nExamples\n-------- \nSHOW WSREP_MEMBERSHIP;\n+-------+--------------------------------------+----------+-----------------+\n| Index | Uuid | Name | Address |\n+-------+--------------------------------------+----------+-----------------+\n| 0 | 19058073-8940-11e4-8570-16af7bf8fced | my_node1 |\n10.0.2.15:16001 |\n| 1 | 19f2b0e0-8942-11e4-9cb8-b39e8ee0b5dd | my_node3 |\n10.0.2.15:16003 |\n| 2 | d85e62db-8941-11e4-b1ef-4bc9980e476d | my_node2 |\n10.0.2.15:16002 |\n+-------+--------------------------------------+----------+-----------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/show-wsrep_membership/','','https://mariadb.com/kb/en/show-wsrep_membership/'),(407,'SHOW WSREP_STATUS',26,'MariaDB 10.1.2\n \nSHOW WSREP_STATUS was introduced with the WSREP_INFO plugin\nin MariaDB 10.1.2.\n \nSyntax\n------ \nSHOW WSREP_STATUS\n \nDescription\n----------- \nThe SHOW WSREP_STATUS statement returns Galera node and\ncluster status information. It returns the same information\nas found in the information_schema.WSREP_STATUS table. Only\nusers with the SUPER privilege can access this information.\n \nExamples\n-------- \nSHOW WSREP_STATUS;\n+------------+-------------+----------------+--------------+\n| Node_Index | Node_Status | Cluster_Status | Cluster_Size |\n+------------+-------------+----------------+--------------+\n| 0 | Synced | Primary | 3 |\n+------------+-------------+----------------+--------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/show-wsrep_status/','','https://mariadb.com/kb/en/show-wsrep_status/'),(408,'CALL',27,'Syntax\n------ \nCALL sp_name([parameter[,...]])\nCALL sp_name[()]\n \nDescription\n----------- \nThe CALL statement invokes a stored procedure that was\ndefined previously with CREATE PROCEDURE. \n \nStored procedure names can be specified as\ndatabase_name.procedure_name. Procedure names and database\nnames can be quoted with backticks (). This is necessary if\nthey are reserved words, or contain special characters. See\nidentifier qualifiers for details.\n \nBefore MySQL 5.1.13, stored procedures that take no\narguments required parentheses. In current releases of\nMariaDB, CALL p() and CALL p are equivalent.\n \nIf parentheses are used, any number of spaces, tab\ncharacters and new line characters is allowed between the\nprocedure\'s name and the open parenthesis.\n \nCALL can pass back values to its caller using parameters\nthat are declared as OUT or INOUT\nparameters. If no value is assigned to an OUT parameter,\nNULL is assigned (and its former value is lost). To pass\nsuch values from another stored program you can use\nuser-defined variables, local variables or routine\'s\nparameters; in other contexts, you can only use user-defined\nvariables. \n \nCALL can also be executed as a prepared statement.\nPlaceholders can be used for IN parameters in all versions\nof MariaDB; for OUT and INOUT parameters, placeholders can\nbe used since MariaDB 5.5.\n \nWhen the procedure returns, a client program can also obtain\nthe\nnumber of rows affected for the final statement executed\nwithin the routine: At\nthe SQL level, call the ROW_COUNT() function; from the C\nAPI, call the mysql_affected_rows() function.\n \nIf the CLIENT_MULTI_RESULTS API flag is set, CALL can return\nany number of resultsets and the called stored procedure can\nexecute prepared statements. If it is not set, at most one\nresultset can be returned and prepared statements cannot be\nused within procedures.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/call/','','https://mariadb.com/kb/en/call/'),(409,'Concurrent Inserts',27,'The MyISAM storage engine supports concurrent inserts. This\nfeature allows SELECT statements to be executed during\nINSERT operations, reducing contention.\n \nWhether concurrent inserts can be used or not depends on the\nvalue of the concurrent_insert server system variable:\nNEVER (0) disables concurrent inserts.\nAUTO (1) allows concurrent inserts only when the target\ntable has no free blocks (no data in the middle of the table\nhas been deleted after the last OPTIMIZE TABLE). This is the\ndefault.\nALWAYS (2) always enables concurrent inserts.\n \nIf the binary log is used, CREATE TABLE ... SELECT and\nINSERT ... SELECT statements cannot use concurrent inserts.\nThese statements acquire a read lock on the table, so\nconcurrent inserts will need to wait. This way the log can\nbe safely used to restore data.\n \nConcurrent inserts is not used by slaves with the row based\nreplication (see binary log formats).\n \nIf an INSERT statement contain the HIGH_PRIORITY clause,\nconcurrent inserts cannot be used. INSERT ... DELAYED is\nusually unneeded if concurrent inserts are enabled.\n \nLOAD DATA INFILE uses concurrent inserts if the CONCURRENT\nkeyword is specified and concurrent_insert is not NEVER.\nThis makes the statement slower (even if no other sessions\naccess the table) but reduces contention.\n \nLOCK TABLES allows non-conflicting concurrent inserts if a\nREAD LOCAL lock is used. Concurrent inserts are not allowed\nif the LOCAL keyword is omitted.\n \nNotes\n \nThe decision to enable concurrent insert for a table is done\nwhen the table is opened. If you change the value of\nconcurrent_insert it will only affect new opened tables. If\nyou want it to work for also for tables in use or cached,\nyou should do FLUSH TABLES after setting the variable.\n \n\n\nURL: https://mariadb.com/kb/en/concurrent-inserts/','','https://mariadb.com/kb/en/concurrent-inserts/'),(413,'EXCEPT',27,'EXCEPT was introduced in MariaDB 10.3.0.\n \nThe result of EXCEPT is all records of the left SELECT\nresult set except records which are in right SELECT result\nset, i.e. it is subtraction of two result sets.\n \nSyntax\n------ \nSELECT ...\n(INTERSECT | EXCEPT | UNION [ALL | DISTINCT]) SELECT ...\n[(INTERSECT | EXCEPT | UNION [ALL | DISTINCT]) SELECT ...]\n[ORDER BY [column [, column ...]]]\n[LIMIT {[offset,] row_count | row_count OFFSET offset}]\n \nPlease note:\nALL is not supported by EXCEPT (and it is difficult to make\nsense of ALL with EXCEPT).\nBrackets for explicit operation precedence are not\nsupported; use a subquery in the FROM clause as a\nworkaround).\n \nDescription\n----------- \nMariaDB has supported EXCEPT and INTERSECT in addition to\nUNION since MariaDB 10.3.\n \nAll behavior for naming columns, ORDER BY and LIMIT is the\nsame as for UNION.\n \nEXCEPT implicitly supposes a DISTINCT operation.\n \nThe result of EXCEPT is all records of the left SELECT\nresult except records which are in right SELECT result set,\ni.e. it is subtraction of two result sets.\n \nEXCEPT and UNION have the same operation precedence.\n \n\nParentheses\n \nFrom MariaDB 10.4.0, parentheses can be used to specify\nprecedence. Before this, a syntax error would be returned.\n \nExamples\n-------- \nShow customers which are not employees:\n \n(SELECT e_name AS name, email FROM customers)\nEXCEPT\n(SELECT c_name AS name, email FROM employees);\n \nDifference between UNION, EXCEPT and INTERSECT:\n \nCREATE TABLE seqs (i INT);\nINSERT INTO seqs VALUES (1),(2),(3),(4),(5),(6);\n \nSELECT i FROM seqs WHERE i =3;\n \n+------+\n| i |\n+------+\n| 1 |\n| 2 |\n| 3 |\n| 4 |\n| 5 |\n| 6 |\n+------+\n \nSELECT i FROM seqs WHERE i =3;\n \n+------+\n| i |\n+------+\n| 1 |\n| 2 |\n+------+\n \nSELECT i FROM seqs WHERE i =3;\n \n+------+\n| i |\n+------+\n| 3 |\n+------+\n \nParentheses for specifying precedence, from MariaDB 10.4.0\n \nCREATE OR REPLACE TABLE t1 (a INT);\nCREATE OR REPLACE TABLE t2 (b INT);\nCREATE OR REPLACE TABLE t3 (c INT);\n \nINSERT INTO t1 VALUES (1),(2),(3),(4);\nINSERT INTO t2 VALUES (5),(6);\nINSERT INTO t3 VALUES (1),(6);\n \n((SELECT a FROM t1) UNION (SELECT b FROM t2)) EXCEPT (SELECT\nc FROM t3);\n+------+\n| a |\n+------+\n| 2 |\n| 3 |\n| 4 |\n| 5 |\n+------+\n \n(SELECT a FROM t1) UNION ((SELECT b FROM t2) EXCEPT (SELECT\nc FROM t3));\n+------+\n| a |\n+------+\n| 1 |\n| 2 |\n| 3 |\n| 4 |\n| 5 |\n+------+\n \n\n\nURL: https://mariadb.com/kb/en/except/','','https://mariadb.com/kb/en/except/'),(410,'DELETE',27,'Syntax\n------ \nSingle-table syntax:\n \nDELETE [LOW_PRIORITY] [QUICK] [IGNORE] \n FROM tbl_name [PARTITION (partition_list)]\n [WHERE where_condition]\n [ORDER BY ...]\n [LIMIT row_count]\n [RETURNING select_expr \n [, select_expr ...]]\n \nMultiple-table syntax:\n \nDELETE [LOW_PRIORITY] [QUICK] [IGNORE]\n tbl_name[.*] [, tbl_name[.*]] ...\n FROM table_references\n [WHERE where_condition]\n \nOr:\n \nDELETE [LOW_PRIORITY] [QUICK] [IGNORE]\n FROM tbl_name[.*] [, tbl_name[.*]] ...\n USING table_references\n [WHERE where_condition]\n \nTrimming history:\n \nDELETE HISTORY\n FROM tbl_name [PARTITION (partition_list)]\n [BEFORE SYSTEM_TIME [TIMESTAMP|TRANSACTION] expression]\n \nDescription\n----------- \nOption | Description | \n \nLOW_PRIORITY | Wait until all SELECT\'s are done before\nstarting the statement. Used with storage engines that uses\ntable locking (MyISAM, Aria etc). See HIGH_PRIORITY and\nLOW_PRIORITY clauses for details. | \n \nQUICK | Signal the storage engine that it should expect that\na lot of rows are deleted. The storage engine engine can do\nthings to speed up the DELETE like ignoring merging of data\nblocks until all rows are deleted from the block (instead of\nwhen a block is half full). This speeds up things at the\nexpanse of lost space in data blocks. At least MyISAM and\nAria support this feature. | \n \nIGNORE | Don\'t stop the query even if a not-critical error\noccurs (like data overflow). See How IGNORE works for a full\ndescription. | \n \nFor the single-table syntax, the DELETE statement deletes\nrows\nfrom tbl_name and returns a count of the number of deleted\nrows. This count can\nbe obtained by calling the ROW_COUNT() function. The\nWHERE clause, if given, specifies the conditions that\nidentify\nwhich rows to delete. With no WHERE clause, all rows are\ndeleted. If the ORDER BY clause is specified, the rows are\ndeleted in the order that is specified. The LIMIT clause\nplaces a limit on the number of rows that can be deleted.\n \nFor the multiple-table syntax, DELETE deletes from each\ntbl_name the rows that satisfy the conditions. In this case,\nORDER BY and LIMIT> cannot be used. A DELETE can also\nreference tables which are located in different databases;\nsee Identifier Qualifiers for the syntax.\n \nwhere_condition is an expression that evaluates to true for\neach row to be deleted. It is specified as described in\nSELECT.\n \nCurrently, you cannot delete from a table and select from\nthe same\ntable in a subquery.\n \nYou need the DELETE privilege on a table to delete rows from\nit. You need only the SELECT privilege for any columns that\nare only read, such as those named in the WHERE clause. See\nGRANT.\n \nThe PARTITION clause was introduced in MariaDB 10.0. See\nPartition Pruning and Selection for details.\n \nAs stated, a DELETE statement with no WHERE\nclause deletes all rows. A faster way to do this, when you\ndo not need to know\nthe number of deleted rows, is to use TRUNCATE TABLE.\nHowever,\nwithin a transaction or if you have a lock on the table, \nTRUNCATE TABLE cannot be used whereas DELETE\ncan. See TRUNCATE TABLE, and\nLOCK.\n \nFrom MariaDB 10.0.5, it is possible to return a resultset of\nthe deleted rows for a single table to the client by using\nthe syntax DELETE ... RETURNING select_expr [, select_expr2\n...]]\n \nAny of SQL expression that can be calculated from a single\nrow fields is allowed. Subqueries are allowed. The AS\nkeyword is allowed, so it is possible to use aliases.\n \nThe use of aggregate functions is not allowed. RETURNING\ncannot be used in multi-table DELETEs.\n \nSame Source and Target Table\n \nUntil MariaDB 10.3.1, deleting from a table with the same\nsource and target was not possible. From MariaDB 10.3.1,\nthis is now possible. For example:\n \nDELETE FROM t1 WHERE c1 IN (SELECT b.c1 FROM t1 b WHERE\nb.c2=0);\n \nOne can use DELETE HISTORY to delete historical information\nfrom System-versioned tables.\n \nExamples\n-------- \nHow to use the ORDER BY and LIMIT clauses:\n \nDELETE FROM page_hit ORDER BY timestamp LIMIT 1000000;\n \nHow to use the RETURNING clause:\n \nDELETE FROM t RETURNING f1;\n \n+------+\n| f1 |\n+------+\n| 5 |\n| 50 |\n| 500 |\n+------+ \n \nThe following statement joins two tables: one is only used\nto satisfy a WHERE condition, but no row is deleted from it;\nrows from the other table are deleted, instead.\n \nDELETE post FROM blog INNER JOIN post WHERE blog.id =\npost.blog_id;\n \nDeleting from the Same Source and Target\n \nCREATE TABLE t1 (c1 INT, c2 INT);\nDELETE FROM t1 WHERE c1 IN (SELECT b.c1 FROM t1 b WHERE\nb.c2=0);\n \nUntil MariaDB 10.3.1, this returned:\n \nERROR 1093 (HY000): Table \'t1\' is specified twice, both as\na target for \'DELETE\' \n and as a separate source for\n \nFrom MariaDB 10.3.1:\n \nQuery OK, 0 rows affected (0.00 sec)\n \n\n\nURL: https://mariadb.com/kb/en/delete/','','https://mariadb.com/kb/en/delete/'),(417,'HIGH_PRIORITY and LOW_PRIORITY',27,'The XtraDB/InnoDB storage engine uses row-level locking to\nensure data integrity. However some storage engines (such as\nMEMORY, MyISAM, Aria and MERGE) lock the whole table to\nprevent conflicts. These storage engines use two separate\nqueues to remember pending statements; one is for SELECTs\nand the other one is for write statements (INSERT, DELETE,\nUPDATE). By default, the latter has a higher priority.\n \nTo give write operations a lower priority, the\nlow_priority_updates server system variable can be set to\nON. The option is available on both the global and session\nlevels, and it can be set at startup or via the SET\nstatement.\n \nWhen too many table locks have been set by write statements,\nsome pending SELECTs are executed. The maximum number of\nwrite locks that can be acquired before this happens is\ndetermined by the max_write_lock_count server system\nvariable, which is dynamic.\n \nIf write statements have a higher priority (default), the\npriority of individual write statements (INSERT, REPLACE,\nUPDATE, DELETE) can be changed via the LOW_PRIORITY\nattribute, and the priority of a SELECT statement can be\nraised via the HIGH_PRIORITY attribute. Also, LOCK TABLES\nsupports a LOW_PRIORITY attribute for WRITE locks.\n \nIf read statements have a higher priority, the priority of\nan INSERT can be changed via the HIGH_PRIORITY attribute.\nHowever, the priority of other write statements cannot be\nraised individually.\n \nThe use of LOW_PRIORITY or HIGH_PRIORITY for an INSERT\nprevents Concurrent Inserts from being used.\n \n\n\nURL:\nhttps://mariadb.com/kb/en/high_priority-and-low_priority/','','https://mariadb.com/kb/en/high_priority-and-low_priority/'),(415,'GROUP BY',27,'Use the GROUP BY clause in a SELECT statement to group rows\ntogether that have the same value in one or more column, or\nthe same computed value using expressions with any\nfunctions and operators except\ngrouping functions. When you\nuse a GROUP BY clause, you will get a single result row for\neach group of rows\nthat have the same value for the expression given in GROUP\nBY.\n \nWhen grouping rows, grouping values are compared as if by\nthe = operator.\nFor string values, the = operator ignores trailing\nwhitespace and may normalize\ncharacters and ignore case, depending on the collation in\nuse.\n \nYou can use any of the grouping functions in your select\nexpression. Their values will\nbe calculated based on all the rows that have been grouped\ntogether for each result\nrow. If you select a non-grouped column or a value computed\nfrom a non-grouped\ncolumn, it is undefined which row the returned value is\ntaken from. This is not permitted if the ONLY_FULL_GROUP_BY\nSQL_MODE is used.\n \nYou can use multiple expressions in the GROUP BY clause,\nseparated by commas.\nRows are grouped together if they match on each of the\nexpressions.\n \nYou can also use a single integer as the grouping\nexpression. If you use an integer n,\nthe results will be grouped by the nth column in the select\nexpression.\n \nThe WHERE clause is applied before the GROUP BY clause. It\nfilters non-aggregated\nrows before the rows are grouped together. To filter grouped\nrows based on aggregate values,\nuse the HAVING clause. The HAVING clause takes any\nexpression and evaluates it as\na boolean, just like the WHERE clause. You can use grouping\nfunctions in the HAVING\nclause. As with the select expression, if you reference\nnon-grouped columns in the HAVING\nclause, the behavior is undefined.\n \nBy default, if a GROUP BY clause is present, the rows in the\noutput will be sorted by the expressions used in the GROUP\nBY. You can also specify ASC or DESC (ascending, descending)\nafter those expressions, like in ORDER BY. The default is\nASC.\n \nIf you want the rows to be sorted by another field, you can\nadd an explicit ORDER BY. If you don\'t want the result to\nbe ordered, you can add ORDER BY NULL.\n \nWITH ROLLUP\n \nThe WITH ROLLUP modifer adds extra rows to the resultset\nthat represent super-aggregate summaries. For a full\ndescription with examples, see SELECT WITH ROLLUP.\n \nGROUP BY Examples\n \nConsider the following table that records how many times\neach user has played and won a game:\n \nCREATE TABLE plays (name VARCHAR(16), plays INT, wins INT);\nINSERT INTO plays VALUES \n (\"John\", 20, 5), \n (\"Robert\", 22, 8), \n (\"Wanda\", 32, 8), \n (\"Susan\", 17, 3);\n \nGet a list of win counts along with a count:\n \nSELECT wins, COUNT(*) FROM plays GROUP BY wins;\n \n+------+----------+\n| wins | COUNT(*) |\n+------+----------+\n| 3 | 1 |\n| 5 | 1 |\n| 8 | 2 |\n+------+----------+\n3 rows in set (0.00 sec)\n \nThe GROUP BY expression can be a computed value, and can\nrefer back to an identifer\nspecified with AS. Get a list of win averages along with a\ncount:\n \nSELECT (wins / plays) AS winavg, COUNT(*) FROM plays GROUP\nBY winavg;\n \n+--------+----------+\n| winavg | COUNT(*) |\n+--------+----------+\n| 0.1765 | 1 |\n| 0.2500 | 2 |\n| 0.3636 | 1 |\n+--------+----------+\n3 rows in set (0.00 sec)\n \nYou can use any grouping function\nin the select expression. For each win average as above, get\na list of the average play\ncount taken to get that average:\n \nSELECT (wins / plays) AS winavg, AVG(plays) FROM plays \n GROUP BY winavg;\n \n+--------+------------+\n| winavg | AVG(plays) |\n+--------+------------+\n| 0.1765 | 17.0000 |\n| 0.2500 | 26.0000 |\n| 0.3636 | 22.0000 |\n+--------+------------+\n3 rows in set (0.00 sec)\n \nYou can filter on aggregate information using the HAVING\nclause. The HAVING\nclause is applied after GROUP BY and allows you to filter on\naggregate data that is\nnot available to the WHERE clause. Restrict the above\nexample to results that involve\nan average number of plays over 20:\n \nSELECT (wins / plays) AS winavg, AVG(plays) FROM plays \n GROUP BY winavg HAVING AVG(plays) > 20;\n \n+--------+------------+\n| winavg | AVG(plays) |\n+--------+------------+\n| 0.2500 | 26.0000 |\n| 0.3636 | 22.0000 |\n+--------+------------+\n2 rows in set (0.00 sec)\n \nSee Also\n \nSELECT\nJoins and Subqueries\nLIMIT\nORDER BY\nCommon Table Expressions\nSELECT WITH ROLLUP\nSELECT INTO OUTFILE\nSELECT INTO DUMPFILE\nFOR UPDATE\nLOCK IN SHARE MODE\nOptimizer Hints\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/group-by/','','https://mariadb.com/kb/en/group-by/'),(418,'IGNORE',27,'The IGNORE option tells the server to ignore some common\nerrors.\n \nIGNORE can be used with the following statements:\nDELETE\nINSERT (see also INSERT IGNORE)\nLOAD DATA INFILE\nUPDATE\nALTER TABLE\nCREATE TABLE ... SELECT\nINSERT ... SELECT\n \nThe logic used:\nVariables out of ranges are replaced with the\nmaximum/minimum value.\n \nSQL_MODEs STRICT_TRANS_TABLES, STRICT_ALL_TABLES,\nNO_ZERO_IN_DATE, NO_ZERO_DATE are ignored.\n \nInserting NULL in a NOT NULL field will insert 0 ( in a\nnumerical\n field), 0000-00-00 ( in a date field) or an empty string (\nin a character\n field).\n \nRows that cause a duplicate key error or break a foreign key\nconstraint are\n not inserted, updated, or deleted.\n \nThe following errors are ignored:\n \nError number | Symbolic error name | Description | \n \n1022 | ER_DUP_KEY | Can\'t write; duplicate key in table\n\'%s\' | \n \n1048 | ER_BAD_NULL_ERROR | Column \'%s\' cannot be null | \n \n1062 | ER_DUP_ENTRY | Duplicate entry \'%s\' for key %d | \n \n1242 | ER_SUBQUERY_NO_1_ROW | Subquery returns more than 1\nrow | \n \n1264 | ER_WARN_DATA_OUT_OF_RANGE | Out of range value for\ncolumn \'%s\' at row %ld | \n \n1265 | WARN_DATA_TRUNCATED | Data truncated for column\n\'%s\' at row %ld | \n \n1292 | ER_TRUNCATED_WRONG_VALUE | Truncated incorrect %s\nvalue: \'%s\' | \n \n1366 | ER_TRUNCATED_WRONG_VALUE_FOR_FIELD | Incorrect\ninteger value | \n \n1369 | ER_VIEW_CHECK_FAILED | CHECK OPTION failed \'%s.%s\'\n| \n \n1451 | ER_ROW_IS_REFERENCED_2 | Cannot delete or update a\nparent row | \n \n1452 | ER_NO_REFERENCED_ROW_2 | Cannot add or update a child\nrow: a foreign key constraint fails (%s) | \n \n1526 | ER_NO_PARTITION_FOR_GIVEN_VALUE | Table has no\npartition for value %s | \n \n1586 | ER_DUP_ENTRY_WITH_KEY_NAME | Duplicate entry \'%s\'\nfor key \'%s\' | \n \n1591 | ER_NO_PARTITION_FOR_GIVEN_VALUE_SILENT | Table has no\npartition for some existing values | \n \n1748 | ER_ROW_DOES_NOT_MATCH_GIVEN_PARTITION_SET | Found a\nrow not matching the given partition set | \n \nIgnored errors normally generate a warning.\n \nA property of the IGNORE clause consists in causing\ntransactional engines and non-transactional engines (like\nXtraDB and Aria) to behave the same way. For example,\nnormally a multi-row insert which tries to violate a UNIQUE\ncontraint is completely rolled back on XtraDB/InnoDB, but\nmight be partially executed on Aria. With the IGNORE clause,\nthe statement will be partially executed in both engines.\n \nStarting from MariaDB 5.5.28 duplicate key errors also\ngenerate warnings. The OLD_MODE server variable can be used\nto prevent this.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/ignore/','','https://mariadb.com/kb/en/ignore/'),(419,'INSERT',27,'Syntax\n------ \nINSERT [LOW_PRIORITY | DELAYED | HIGH_PRIORITY] [IGNORE]\n [INTO] tbl_name [PARTITION (partition_list)] [(col,...)]\n {VALUES | VALUE} ({expr | DEFAULT},...),(...),...\n [ ON DUPLICATE KEY UPDATE\n col=expr\n [, col=expr] ... ]\n \nOr:\n \nINSERT [LOW_PRIORITY | DELAYED | HIGH_PRIORITY] [IGNORE]\n [INTO] tbl_name [PARTITION (partition_list)]\n SET col={expr | DEFAULT}, ...\n [ ON DUPLICATE KEY UPDATE\n col=expr\n [, col=expr] ... ]\n \nOr:\n \nINSERT [LOW_PRIORITY | HIGH_PRIORITY] [IGNORE]\n [INTO] tbl_name [PARTITION (partition_list)] [(col,...)]\n SELECT ...\n [ ON DUPLICATE KEY UPDATE\n col=expr\n [, col=expr] ... ]\n \nThe INSERT statement is used to insert new rows into an\nexisting table. The INSERT ... VALUES\nand INSERT ... SET forms of the statement insert rows based\non explicitly specified values. The INSERT ... SELECT form\ninserts rows selected from another table or tables. INSERT\n... SELECT is discussed further in the INSERT ... SELECT\narticle.\n \nThe table name can be specified in the form db_name.tbl_name\nor, if a default database is selected, in the form tbl_name\n(see Identifier Qualifiers). This allows to use INSERT ...\nSELECT to copy rows between different databases.\n \nThe PARTITION clause was introduced in MariaDB 10.0. It can\nbe used in both the INSERT and the SELECT part. See\nPartition Pruning and Selection for details.\n \nThe columns list is optional. It specifies which values are\nexplicitly inserted, and in which order. If this clause is\nnot specified, all values must be explicitly specified, in\nthe same order they are listed in the table definition.\n \nThe list of value follow the VALUES or VALUE keyword (which\nare interchangeable, regardless how much values you want to\ninsert), and is wrapped by parenthesis. The values must be\nlisted in the same order as the columns list. It is possible\nto specify more than one list to insert more than one rows\nwith a single statement. If many rows are inserted, this is\na speed optimization.\n \nFor one-row statements, the SET clause may be more simple,\nbecause you don\'t need to remember the columns order. All\nvalues are specified in the form col = expr.\n \nValues can also be specified in the form of a SQL expression\nor subquery. However, the subquery cannot access the same\ntable that is named in the INTO clause.\n \nIf you use the LOW_PRIORITY keyword, execution of the INSERT\nis delayed until no other clients are reading from the\ntable. If you use the HIGH_PRIORITY keyword, the statement\nhas the same priority as SELECTs. This affects only storage\nengines that use only table-level locking (MyISAM, MEMORY,\nMERGE). However, if one of these keywords is specified,\nconcurrent inserts cannot be used. See HIGH_PRIORITY and\nLOW_PRIORITY clauses for details.\n \nINSERT DELAYED\n \nFor more details on the DELAYED option, see INSERT DELAYED.\n \nHIGH PRIORITY and LOW PRIORITY\n \nSee HIGH_PRIORITY and LOW_PRIORITY.\n \nDefaults and Duplicate Values\n \nSee INSERT - Default & Duplicate Values for details..\n \nINSERT IGNORE\n \nSee INSERT IGNORE.\n \nINSERT ON DUPLICATE KEY UPDATE\n \nSee INSERT ON DUPLICATE KEY UPDATE.\n \nExamples\n-------- \nSpecifying the column names:\n \nINSERT INTO person (first_name, last_name) VALUES (\'John\',\n\'Doe\');\n \nInserting more than 1 row at a time:\n \nINSERT INTO tbl_name VALUES (1, \"row 1\"), (2, \"row 2\");\n \nUsing the SET clause:\n \nINSERT INTO person SET first_name = \'John\', last_name =\n\'Doe\';\n \nSELECTing from another table:\n \nINSERT INTO contractor SELECT * FROM person WHERE status =\n\'c\';\n \nSee INSERT ON DUPLICATE KEY UPDATE and INSERT IGNORE for\nfurther examples.\n \n\n\nURL: https://mariadb.com/kb/en/insert/','','https://mariadb.com/kb/en/insert/'),(420,'INSERT - Default &amp; Duplicate Values',27,'Default Values\n \nIf the SQL_MODE contains STRICT_TRANS_TABLES and you are\ninserting into a transactional table (like InnoDB), or if\nthe SQL_MODE contains STRICT_ALL_TABLES, all NOT NULL\ncolumns which does not have a DEFAULT value (and is not\nAUTO_INCREMENT) must be explicitly referenced in INSERT\nstatements. If not, an error like this is produced:\n \nERROR 1364 (HY000): Field \'col\' doesn\'t have a default\nvalue\n \nIn all other cases, if a NOT NULL column without a DEFAULT\nvalue is not referenced, an empty value will be inserted\n(for example, 0 for INTEGER columns and \'\' for CHAR\ncolumns). See NULL Values in MariaDB:Inserting for examples.\n \nIf a NOT NULL column having a DEFAULT value is not\nreferenced, NULL will be inserted.\n \nIf a NULL column having a DEFAULT value is not referenced,\nits default value will be inserted. It is also possible to\nexplicitly assign the default value using the DEFAULT\nkeyword or the DEFAULT() function.\n \nIf the DEFAULT keyword is used but the column does not have\na DEFAULT value, an error like this is produced:\n \nERROR 1364 (HY000): Field \'col\' doesn\'t have a default\nvalue\n \nDuplicate Values\n \nBy default, if you try to insert a duplicate row and there\nis a UNIQUE index, INSERT stops and an error like this is\nproduced:\n \nERROR 1062 (23000): Duplicate entry \'dup_value\' for key\n\'col\'\n \nTo handle duplicates you can use the IGNORE clause, INSERT\nON DUPLICATE KEY UPDATE or the REPLACE statement. Note that\nthe IGNORE and DELAYED options are ignored when you use ON\nDUPLICATE KEY UPDATE.\n \n\n\nURL:\nhttps://mariadb.com/kb/en/insert-default-duplicate-values/','','https://mariadb.com/kb/en/insert-default-duplicate-values/'),(421,'INSERT DELAYED',27,'Syntax\n------ \nINSERT DELAYED ...\n \nDescription\n----------- \nThe DELAYED option for the INSERT\nstatement is a MariaDB/MySQL extension to standard SQL that\nis very useful if you have\nclients that cannot or need not wait for the INSERT to\ncomplete. This is a common situation when you use MariaDB\nfor logging and you\nalso periodically run SELECT and UPDATE\nstatements that take a long time to complete.\n \nWhen a client uses INSERT DELAYED, it gets an okay from the\nserver at once, and the row is queued to be inserted when\nthe table is not in\nuse by any other thread.\n \nAnother major benefit of using INSERT DELAYED is that\ninserts from many clients are bundled together and written\nin one block. This\nis much faster than performing many separate inserts.\n \nNote that INSERT DELAYED is slower than a normal\n INSERT if the table is not otherwise in use. There is also\nthe additional overhead for the server to handle a separate\nthread for each\ntable for which there are delayed rows. This means that you\nshould use\nINSERT DELAYED only when you are really sure that you need\nit.\n \nThe queued rows are held only in memory until they are\ninserted into the table.\nThis means that if you terminate mysqld forcibly (for\nexample, with kill -9) or\nif mysqld dies unexpectedly, any queued rows that have not\nbeen written to disk\nare lost.\n \nThe number of concurrent INSERT DELAYED threads is limited\nby the max_delayed_threads server system variables. If it is\nset to 0, INSERT DELAYED is disabled. The session value can\nbe equal to the global value, or 0 to disable this statement\nfor the current session. If this limit has been reached, the\nDELAYED clause will be silently ignore for subsequent\nstatements (no error will be produced).\n \nThere are some constraints on the use of DELAYED:\nINSERT DELAYED works only with MyISAM, MEMORY, ARCHIVE,\n and BLACKHOLE tables. If you execute INSERT DELAYED with\nanother storage engine, you will get an error like this:\nERROR 1616 (HY000): DELAYED option not supported for table\n\'tab_name\'\nFor MyISAM tables, if there are no free blocks in the middle\nof the data\n file, concurrent SELECT and INSERT statements are\nsupported. Under these\n circumstances, you very seldom need to use INSERT DELAYED\n with MyISAM.\nINSERT DELAYED should be used only for\n INSERT statements that specify value lists. The server\n ignores DELAYED for INSERT ... SELECT\n or INSERT ... ON DUPLICATE KEY UPDATE statements.\nBecause the INSERT DELAYED statement returns immediately,\n before the rows are inserted, you cannot use\n LAST_INSERT_ID() to get the\n AUTO_INCREMENT value that the statement might generate.\nDELAYED rows are not visible to SELECT\n statements until they actually have been inserted.\nAfter INSERT DELAYED, ROW_COUNT() returns the number of the\nrows you tried to insert, not the number of the successful\nwrites.\nDELAYED is ignored on slave replication servers, so that \n INSERT DELAYED is treated as a normal\n INSERT on slaves. This is because\n DELAYED could cause the slave to have different data than\n the master. INSERT DELAYED statements are not safe for\nreplication.\nPending INSERT DELAYED statements are lost if a table is\n write locked and ALTER TABLE is used to modify the table\nstructure.\nINSERT DELAYED is not supported for views. If you try, you\nwill get an error like this: ERROR 1347 (HY000):\n\'view_name\' is not BASE TABLE\nINSERT DELAYED is not supported for partitioned tables.\nINSERT DELAYED is not supported within stored programs.\n \n\n\nURL: https://mariadb.com/kb/en/insert-delayed/','','https://mariadb.com/kb/en/insert-delayed/'),(422,'INSERT IGNORE',27,'Ignoring Errors\n \nNormally INSERT stops and rolls back when it encounters an\nerror.\n \nBy using the IGNORE keyword all errors are converted to\nwarnings, which will not stop inserts of additional rows.\n \nThe IGNORE and DELAYED options are ignored when you use ON\nDUPLICATE KEY UPDATE.\n \nIncompatibilities\n \nMariaDB until 5.5.28\nMySQL and MariaDB before 5.5.28 didn\'t give warnings for\nduplicate key errors when using IGNORE.\nYou can get the old behaviour if you set OLD_MODE to\nNO_DUP_KEY_WARNINGS_WITH_IGNORE\n \nExamples\n-------- \nCREATE TABLE t1 (x INT UNIQUE);\n \nINSERT INTO t1 VALUES(1),(2);\n \nINSERT INTO t1 VALUES(2),(3);\nERROR 1062 (23000): Duplicate entry \'2\' for key \'x\'\nSELECT * FROM t1;\n \n+------+\n| x |\n+------+\n| 1 |\n| 2 |\n+------+\n2 rows in set (0.00 sec)\n \nINSERT IGNORE INTO t1 VALUES(2),(3);\nQuery OK, 1 row affected, 1 warning (0.04 sec)\n \nSHOW WARNINGS;\n \n+---------+------+---------------------------------+\n| Level | Code | Message |\n+---------+------+---------------------------------+\n| Warning | 1062 | Duplicate entry \'2\' for key \'x\' |\n+---------+------+---------------------------------+\n \nSELECT * FROM t1;\n \n+------+\n| x |\n+------+\n| 1 |\n| 2 |\n| 3 |\n+------+\n \nSee INSERT ON DUPLICATE KEY UPDATE for further examples\nusing that syntax.\n \n\n\nURL: https://mariadb.com/kb/en/insert-ignore/','','https://mariadb.com/kb/en/insert-ignore/'),(423,'INSERT ON DUPLICATE KEY UPDATE',27,'Syntax\n------ \nINSERT [LOW_PRIORITY | DELAYED | HIGH_PRIORITY] [IGNORE]\n [INTO] tbl_name [PARTITION (partition_list)] [(col,...)]\n {VALUES | VALUE} ({expr | DEFAULT},...),(...),...\n [ ON DUPLICATE KEY UPDATE\n col=expr\n [, col=expr] ... ]\n \nOr:\n \nINSERT [LOW_PRIORITY | DELAYED | HIGH_PRIORITY] [IGNORE]\n [INTO] tbl_name [PARTITION (partition_list)]\n SET col={expr | DEFAULT}, ...\n [ ON DUPLICATE KEY UPDATE\n col=expr\n [, col=expr] ... ]\n \nOr:\n \nINSERT [LOW_PRIORITY | HIGH_PRIORITY] [IGNORE]\n [INTO] tbl_name [PARTITION (partition_list)] [(col,...)]\n SELECT ...\n [ ON DUPLICATE KEY UPDATE\n col=expr\n [, col=expr] ... ]\n \nDescription\n----------- \nINSERT ... ON DUPLICATE KEY UPDATE is a MariaDB/MySQL\nextension to the INSERT statement that, if it finds a\nduplicate unique or primary key, will instead perform an\nUPDATE.\n \nThe row/s affected value is reported as 1 if a row is\ninserted, and 2 if a row is updated, unless the API\'s\nCLIENT_FOUND_ROWS flag is set.\n \nIf more than one unique index is matched, only the first is\nupdated. It is not recommended to use this statement on\ntables with more than one unique index.\n \nIf the table has an AUTO_INCREMENT primary key and the\nstatement inserts or updates a row, the LAST_INSERT_ID()\nfunction returns its AUTO_INCREMENT value.\n \nThe VALUES() function can only be used in a ON DUPLICATE KEY\nUPDATE clause and has no meaning in any other context. It\nreturns the column values from the INSERT portion of the\nstatement. This function is particularly useful for\nmulti-rows inserts.\n \nThe IGNORE and DELAYED options are ignored when you use ON\nDUPLICATE KEY UPDATE.\n \nThe PARTITION clause was introduced in MariaDB 10.0. See\nPartition Pruning and Selection for details.\n \nThis statement activates INSERT and UPDATE triggers. See\nTrigger Overview for details.\n \nSee also a similar statement, REPLACE.\n \nExamples\n-------- \nCREATE TABLE ins_duplicate (id INT PRIMARY KEY, animal\nVARCHAR(30));\nINSERT INTO ins_duplicate VALUES (1,\'Aardvark\'),\n(2,\'Cheetah\'), (3,\'Zebra\');\n \nIf there is no existing key, the statement runs as a regular\nINSERT:\n \nINSERT INTO ins_duplicate VALUES (4,\'Gorilla\') ON\nDUPLICATE KEY UPDATE animal=\'Gorilla\';\nQuery OK, 1 row affected (0.07 sec)\n \nSELECT * FROM ins_duplicate;\n+----+----------+\n| id | animal |\n+----+----------+\n| 1 | Aardvark |\n| 2 | Cheetah |\n| 3 | Zebra |\n| 4 | Gorilla |\n+----+----------+\n \nA regular INSERT with a primary key value of 1 will fail,\ndue to the existing key:\n \nINSERT INTO ins_duplicate VALUES (1,\'Antelope\');\nERROR 1062 (23000): Duplicate entry \'1\' for key\n\'PRIMARY\'\n \nHowever, we can use an INSERT ON DUPLICATE KEY UPDATE\ninstead:\n \nINSERT INTO ins_duplicate VALUES (1,\'Antelope\') ON\nDUPLICATE KEY UPDATE animal=\'Antelope\';\nQuery OK, 2 rows affected (0.09 sec)\n \nNote that there are two rows reported as affected, but this\nrefers only to the UPDATE.\n \nSELECT * FROM ins_duplicate;\n+----+----------+\n| id | animal |\n+----+----------+\n| 1 | Antelope |\n| 2 | Cheetah |\n| 3 | Zebra |\n| 4 | Gorilla |\n+----+----------+\n \nAdding a second unique column:\n \nALTER TABLE ins_duplicate ADD id2 INT;\nUPDATE ins_duplicate SET id2=id+10;\nALTER TABLE ins_duplicate ADD UNIQUE KEY(id2);\n \nWhere two rows match the unique keys match, only the first\nis updated. This can be unsafe and is not recommended unless\nyou are certain what you are doing. Note that the warning\nshown below appears in MariaDB 5.5 and before, but has been\nremoved in MariaDB 10.0, as MariaDB now assumes that the\nkeys are checked in order, as shown in SHOW CREATE TABLE.\n \nINSERT INTO ins_duplicate VALUES (2,\'Lion\',13) ON\nDUPLICATE KEY UPDATE animal=\'Lion\';\nQuery OK, 2 rows affected, 1 warning (0.06 sec)\n \nSHOW WARNINGS;\n+-------+------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n| Level | Code | Message |\n+-------+------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n| Note | 1592 | Unsafe statement written to the binary log\nusing statement format since BINLOG_FORMAT = STATEMENT.\nINSERT... ON DUPLICATE KEY UPDATE on a table with more than\none UNIQUE KEY is unsafe |\n+-------+------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n \nSELECT * FROM ins_duplicate;\n+----+----------+------+\n| id | animal | id2 |\n+----+----------+------+\n| 1 | Antelope | 11 |\n| 2 | Lion | 12 |\n| 3 | Zebra | 13 |\n| 4 | Gorilla | 14 |\n+----+----------+------+\n \nAlthough the third row with an id of 3 has an id2 of 13,\nwhich also matched, it was not updated.\n \nChanging id to an auto_increment field. If a new row is\nadded, the auto_increment is moved forward. If the row is\nupdated, it remains the same.\n \nALTER TABLE `ins_duplicate` CHANGE `id` `id` INT( 11 ) NOT\nNULL AUTO_INCREMENT;\nALTER TABLE ins_duplicate DROP id2;\nSELECT Auto_increment FROM INFORMATION_SCHEMA.TABLES WHERE\nTABLE_NAME=\'ins_duplicate\';\n+----------------+\n| Auto_increment |\n+----------------+\n| 5 |\n+----------------+\n \nINSERT INTO ins_duplicate VALUES (2,\'Leopard\') ON\nDUPLICATE KEY UPDATE animal=\'Leopard\';\nQuery OK, 2 rows affected (0.00 sec)\n \nSELECT Auto_increment FROM INFORMATION_SCHEMA.TABLES WHERE\nTABLE_NAME=\'ins_duplicate\';\n+----------------+\n| Auto_increment |\n+----------------+\n| 5 |\n+----------------+\n \nINSERT INTO ins_duplicate VALUES (5,\'Wild Dog\') ON\nDUPLICATE KEY UPDATE animal=\'Wild Dog\';\nQuery OK, 1 row affected (0.09 sec)\n \nSELECT * FROM ins_duplicate;\n+----+----------+\n| id | animal |\n+----+----------+\n| 1 | Antelope |\n| 2 | Leopard |\n| 3 | Zebra |\n| 4 | Gorilla |\n| 5 | Wild Dog |\n+----+----------+\n \nSELECT Auto_increment FROM INFORMATION_SCHEMA.TABLES WHERE\nTABLE_NAME=\'ins_duplicate\';\n+----------------+\n| Auto_increment |\n+----------------+\n| 6 |\n+----------------+\n \nRefering to column values from the INSERT portion of the\nstatement: \n \nINSERT INTO table (a,b,c) VALUES (1,2,3),(4,5,6)\n ON DUPLICATE KEY UPDATE c=VALUES(a)+VALUES(b);\n \nSee the VALUES() function for more.\n \n\n\nURL:\nhttps://mariadb.com/kb/en/insert-on-duplicate-key-update/','','https://mariadb.com/kb/en/insert-on-duplicate-key-update/'),(424,'INSERT SELECT',27,'Syntax\n------ \nINSERT [LOW_PRIORITY | HIGH_PRIORITY] [IGNORE]\n [INTO] tbl_name [(col_name,...)]\n SELECT ...\n [ ON DUPLICATE KEY UPDATE col_name=expr, ... ]\n \nDescription\n----------- \nWith INSERT ... SELECT, you can quickly insert many rows\ninto a table from one or more other tables. For example:\n \nINSERT INTO tbl_temp2 (fld_id)\n SELECT tbl_temp1.fld_order_id\n FROM tbl_temp1 WHERE tbl_temp1.fld_order_id > 100;\n \ntbl_name can also be specified in the form db_name.tbl_name\n(see Identifier Qualifiers). This allows to copy rows\nbetween different databases.\n \nIf the new table has a primary key or UNIQUE indexes, you\ncan use IGNORE to handle duplicate key errors during the\nquery. The newer values will not be inserted if an identical\nvalue already exists.\n \nREPLACE can be used instead of INSERT to prevent duplicates\non UNIQUE indexes by deleting old values. In that case, ON\nDUPLICATE KEY UPDATE cannot be used.\n \nINSERT ... SELECT works for tables which already exist. To\ncreate a table for a given resultset, you can use CREATE\nTABLE ... SELECT.\n \n\n\nURL: https://mariadb.com/kb/en/insert-select/','','https://mariadb.com/kb/en/insert-select/'),(425,'INTERSECT',27,'INTERSECT was introduced in MariaDB 10.3.0.\n \nThe result of an intersect is the intersection of right and\nleft SELECT results, i.e. only records that are present in\nboth result sets will be included in the result of the\noperation.\n \nSyntax\n------ \nSELECT ...\n(INTERSECT | EXCEPT | UNION [ALL | DISTINCT]) SELECT ...\n[(INTERSECT | EXCEPT | UNION [ALL | DISTINCT]) SELECT ...]\n[ORDER BY [column [, column ...]]]\n[LIMIT {[offset,] row_count | row_count OFFSET offset}]\n \nPlease note:\nALL is not supported by INTERSECT (and it is difficult to\nmake sense of ALL with INTERSECT).\nBrackets for explicit operation precedence are not\nsupported; use a subquery in the FROM clause as a\nworkaround).\n \nDescription\n----------- \nMariaDB has supported INTERSECT (as well as EXCEPT) in\naddition to UNION since MariaDB 10.3.\n \nAll behavior for naming columns, ORDER BY and LIMIT is the\nsame as for UNION.\n \nINTERSECT implicitly supposes a DISTINCT operation.\n \nThe result of an intersect is the intersection of right and\nleft SELECT results, i.e. only records that are present in\nboth result sets will be included in the result of the\noperation.\n \nINTERSECT has higher precedence than UNION and EXCEPT. If\npossible it will be executed linearly but if not it will be\ntranslated to a subquery in the FROM clause:\n \n(select a,b from t1)\nunion\n(select c,d from t2)\nintersect\n(select e,f from t3)\nunion\n(select 4,4);\n \nwill be translated to:\n \n(select a,b from t1)\nunion\nselect c,d from\n ((select c,d from t2)\n intersect\n (select e,f from t3)) dummy_subselect\nunion\n(select 4,4)\n \n\n \nParentheses\n \nFrom MariaDB 10.4.0, parentheses can be used to specify\nprecedence. Before this, a syntax error would be returned.\n \nExamples\n-------- \nShow customers which are employees:\n \n(SELECT e_name AS name, email FROM employees)\nINTERSECT\n(SELECT c_name AS name, email FROM customers);\n \nDifference between UNION, EXCEPT and INTERSECT:\n \nCREATE TABLE seqs (i INT);\nINSERT INTO seqs VALUES (1),(2),(3),(4),(5),(6);\n \nSELECT i FROM seqs WHERE i =3;\n \n+------+\n| i |\n+------+\n| 1 |\n| 2 |\n| 3 |\n| 4 |\n| 5 |\n| 6 |\n+------+\n \nSELECT i FROM seqs WHERE i =3;\n \n+------+\n| i |\n+------+\n| 1 |\n| 2 |\n+------+\n \nSELECT i FROM seqs WHERE i =3;\n \n+------+\n| i |\n+------+\n| 3 |\n+------+\n \nParentheses for specifying precedence, from MariaDB 10.4.0\n \nCREATE OR REPLACE TABLE t1 (a INT);\nCREATE OR REPLACE TABLE t2 (b INT);\nCREATE OR REPLACE TABLE t3 (c INT);\n \nINSERT INTO t1 VALUES (1),(2),(3),(4);\nINSERT INTO t2 VALUES (5),(6);\nINSERT INTO t3 VALUES (1),(6);\n \n((SELECT a FROM t1) UNION (SELECT b FROM t2)) INTERSECT\n(SELECT c FROM t3);\n+------+\n| a |\n+------+\n| 1 |\n| 6 |\n+------+\n \n(SELECT a FROM t1) UNION ((SELECT b FROM t2) INTERSECT\n(SELECT c FROM t3));\n+------+\n| a |\n+------+\n| 1 |\n| 2 |\n| 3 |\n| 4 |\n| 6 |\n+------+\n \n\n\nURL: https://mariadb.com/kb/en/intersect/','','https://mariadb.com/kb/en/intersect/'),(426,'JOIN Syntax',27,'Description\n----------- \nMariaDB supports the following JOIN syntaxes for\nthe table_references part of SELECT statements and\nmultiple-table DELETE and UPDATE statements:\n \ntable_references:\n table_reference [, table_reference] ...\n \ntable_reference:\n table_factor\n | join_table\n \ntable_factor:\n tbl_name [PARTITION (partition_list)]\n [query_system_time_period_specification] [[AS] alias]\n[index_hint_list]\n | table_subquery [query_system_time_period_specification]\n[AS] alias\n | ( table_references )\n | { ON table_reference LEFT OUTER JOIN table_reference\n ON conditional_expr }\n \njoin_table:\n table_reference [INNER | CROSS] JOIN table_factor\n[join_condition]\n | table_reference STRAIGHT_JOIN table_factor\n | table_reference STRAIGHT_JOIN table_factor ON\nconditional_expr\n | table_reference {LEFT|RIGHT} [OUTER] JOIN table_reference\njoin_condition\n | table_reference NATURAL [{LEFT|RIGHT} [OUTER]] JOIN\ntable_factor\n \njoin_condition:\n ON conditional_expr\n | USING (column_list)\n \nquery_system_time_period_specification:\n FOR SYSTEM_TIME AS OF point_in_time\n | FOR SYSTEM_TIME BETWEEN point_in_time AND point_in_time\n | FOR SYSTEM_TIME FROM point_in_time TO point_in_time\n | FOR SYSTEM_TIME ALL\n \npoint_in_time:\n [TIMESTAMP] expression\n | TRANSACTION expression\n \nindex_hint_list:\n index_hint [, index_hint] ...\n \nindex_hint:\n USE {INDEX|KEY}\n [{FOR {JOIN|ORDER BY|GROUP BY}] ([index_list])\n | IGNORE {INDEX|KEY}\n [{FOR {JOIN|ORDER BY|GROUP BY}] (index_list)\n | FORCE {INDEX|KEY}\n [{FOR {JOIN|ORDER BY|GROUP BY}] (index_list)\n \nindex_list:\n index_name [, index_name] ...\n \nA table reference is also known as a join expression.\n \nEach table can also be specified as db_name.tabl_name. This\nallows to write queries which involve multiple databases.\nSee Identifier Qualifiers for syntax details.\n \nThe syntax of table_factor is extended in comparison with\nthe\nSQL Standard. The latter accepts only table_reference, not a\nlist of them inside a pair of parentheses.\n \nThis is a conservative extension if we consider each comma\nin a list of\ntable_reference items as equivalent to an inner join. For\nexample:\n \nSELECT * FROM t1 LEFT JOIN (t2, t3, t4)\n ON (t2.a=t1.a AND t3.b=t1.b AND t4.c=t1.c)\n \nis equivalent to:\n \nSELECT * FROM t1 LEFT JOIN (t2 CROSS JOIN t3 CROSS JOIN t4)\n ON (t2.a=t1.a AND t3.b=t1.b AND t4.c=t1.c)\n \nIn MariaDB, CROSS JOIN is a syntactic equivalent to\nINNER JOIN (they can replace each other). In standard SQL,\nthey are not equivalent. INNER JOIN is used with an\nON clause, CROSS JOIN is used otherwise.\n \nIn general, parentheses can be ignored in join expressions\ncontaining only\ninner join operations. MariaDB also supports nested joins\n(see\nhttp://dev.mysql.com/doc/refman/5.1/en/nested-join-optimization.html).\n \nSee System-versioned tables for more information\nabout FOR SYSTEM_TIME syntax.\n \nIndex hints can be specified to affect how the MariaDB\noptimizer makes\nuse of indexes. For more information, see How to force query\nplans.\n \nExamples\n-------- \nSELECT left_tbl.*\n FROM left_tbl LEFT JOIN right_tbl ON left_tbl.id =\nright_tbl.id\n WHERE right_tbl.id IS NULL;\n \n\n \n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/join-syntax/','','https://mariadb.com/kb/en/join-syntax/'),(427,'LIMIT',27,'Description\n----------- \nUse the LIMIT clause to restrict the number of returned\nrows. When you use a single\ninteger n with LIMIT, the first n rows will be returned. Use\nthe ORDER BY\nclause to control which rows come first. You can also select\na number of rows after an offset\nusing either of the following:\n \nLIMIT offset, row_count\nLIMIT row_count OFFSET offset\n \nWhen you provide an offset m with a limit n, the first m\nrows will be ignored, and the\nfollowing n rows will be returned.\n \nExecuting an UPDATE with the LIMIT clause is not safe for\nreplication.\n \nSince MariaDB 10.0.11, LIMIT 0 has been an exception to this\nrule (see MDEV-6170).\n \nBeginning in MariaDB 5.5.21, there is a LIMIT ROWS EXAMINED\noptimization which provides the\nmeans to terminate the execution of SELECT statements which\nexamine too\nmany rows, and thus use too many resources. See LIMIT ROWS\nEXAMINED.\n \nMulti-Table Updates\n \nUntil MariaDB 10.3.1, it was not possible to use LIMIT (or\nORDER BY) in a multi-table UPDATE statement. This\nrestriction was lifted in MariaDB 10.3.2.\n \nGROUP_CONCAT\n \nStarting from MariaDB 10.3.3, it is possible to use LIMIT\nwith GROUP_CONCAT().\n \nExamples\n-------- \nCREATE TABLE members (name VARCHAR(20));\nINSERT INTO members\nVALUES(\'Jagdish\'),(\'Kenny\'),(\'Rokurou\'),(\'Immaculada\');\n \nSELECT * FROM members;\n \n+------------+\n| name |\n+------------+\n| Jagdish |\n| Kenny |\n| Rokurou |\n| Immaculada |\n+------------+\n \nSelect the first two names (no ordering specified):\n \nSELECT * FROM members LIMIT 2;\n \n+---------+\n| name |\n+---------+\n| Jagdish |\n| Kenny |\n+---------+\n \nAll the names in alphabetical order:\n \nSELECT * FROM members ORDER BY name;\n \n+------------+\n| name |\n+------------+\n| Immaculada |\n| Jagdish |\n| Kenny |\n| Rokurou |\n+------------+\n \nThe first two names, ordered alphabetically:\n \nSELECT * FROM members ORDER BY name LIMIT 2;\n \n+------------+\n| name |\n+------------+\n| Immaculada |\n| Jagdish |\n+------------+\n \nThe third name, ordered alphabetically (the first name would\nbe offset zero, so the third is offset two):\n \nSELECT * FROM members ORDER BY name LIMIT 2,1;\n \n+-------+\n| name |\n+-------+\n| Kenny |\n+-------+\n \nFrom MariaDB 10.3.2, LIMIT can be used in a multi-table\nupdate:\n \nCREATE TABLE warehouse (product_id INT, qty INT);\nINSERT INTO warehouse VALUES\n(1,100),(2,100),(3,100),(4,100);\n \nCREATE TABLE store (product_id INT, qty INT);\nINSERT INTO store VALUES (1,5),(2,5),(3,5),(4,5);\n \nUPDATE warehouse,store SET warehouse.qty = warehouse.qty-2,\nstore.qty = store.qty+2 \n WHERE (warehouse.product_id = store.product_id AND\nstore.product_id >= 1) \n ORDER BY store.product_id DESC LIMIT 2;\n \nSELECT * FROM warehouse;\n \n+------------+------+\n| product_id | qty |\n+------------+------+\n| 1 | 100 |\n| 2 | 100 |\n| 3 | 98 |\n| 4 | 98 |\n+------------+------+\n \nSELECT * FROM store;\n \n+------------+------+\n| product_id | qty |\n+------------+------+\n| 1 | 5 |\n| 2 | 5 |\n| 3 | 7 |\n| 4 | 7 |\n+------------+------+\n \nFrom MariaDB 10.3.3, LIMIT can be used with GROUP_CONCAT,\nso, for example, given the following table:\n \nCREATE TABLE d (dd DATE, cc INT);\n \nINSERT INTO d VALUES (\'2017-01-01\',1);\nINSERT INTO d VALUES (\'2017-01-02\',2);\nINSERT INTO d VALUES (\'2017-01-04\',3);\n \nthe following query:\n \nSELECT SUBSTRING_INDEX(GROUP_CONCAT(CONCAT_WS(\":\",dd,cc)\nORDER BY cc DESC),\",\",1) FROM d;\n \n+----------------------------------------------------------------------------+\n| SUBSTRING_INDEX(GROUP_CONCAT(CONCAT_WS(\":\",dd,cc) ORDER\nBY cc DESC),\",\",1) |\n+----------------------------------------------------------------------------+\n| 2017-01-04:3 |\n+----------------------------------------------------------------------------+\n \ncan be more simply rewritten as:\n \nSELECT GROUP_CONCAT(CONCAT_WS(\":\",dd,cc) ORDER BY cc DESC\nLIMIT 1) FROM d;\n \n+-------------------------------------------------------------+\n| GROUP_CONCAT(CONCAT_WS(\":\",dd,cc) ORDER BY cc DESC LIMIT\n1) |\n+-------------------------------------------------------------+\n| 2017-01-04:3 |\n+-------------------------------------------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/limit/','','https://mariadb.com/kb/en/limit/'),(429,'LOAD XML',27,'Syntax\n------ \nLOAD XML [LOW_PRIORITY | CONCURRENT] [LOCAL] INFILE\n\'file_name\'\n [REPLACE | IGNORE]\n INTO TABLE [db_name.]tbl_name\n [CHARACTER SET charset_name]\n [ROWS IDENTIFIED BY \'\']\n [IGNORE number {LINES | ROWS}]\n [(column_or_user_var,...)]\n [SET col_name = expr,...]\n \nDescription\n----------- \nThe LOAD XML statement reads data from an XML file into a\ntable. The\nfile_name must be given as a literal string. The tagname in\nthe\noptional ROWS IDENTIFIED BY clause must also be given as a\nliteral\nstring, and must be surrounded by angle brackets (< and >).\n \nLOAD XML acts as the complement of running the mysql client\nin XML\noutput mode (that is, starting the client with the --xml\noption). To\nwrite data from a table to an XML file, use a command such\nas the\nfollowing one from the system shell:\n \nshell> mysql --xml -e \'SELECT * FROM mytable\' > file.xml\n \nTo read the file back into a table, use LOAD XML INFILE. By\ndefault,\nthe element is considered to be the equivalent of a\ndatabase\ntable row; this can be changed using the ROWS IDENTIFIED BY\nclause.\n \nThis statement supports three different XML formats:\nColumn names as attributes and column values as attribute\nvalues:\n \nColumn names as tags and column values as the content of\nthese tags:\n \n value1\n value2\n \nColumn names are the name attributes of tags, and values\nare\n the contents of these tags:\n \n value1\n value2\n \n This is the format used by other tools, such as mysqldump.\n \nAll 3 formats can be used in the same XML file; the import\nroutine\nautomatically detects the format for each row and interprets\nit\ncorrectly. Tags are matched based on the tag or attribute\nname and the\ncolumn name.\n \nThe following clauses work essentially the same way for LOAD\nXML as\nthey do for LOAD DATA:\nLOW_PRIORITY or CONCURRENT\nLOCAL\nREPLACE or IGNORE\nCHARACTER SET\n(column_or_user_var,...)\nSET\n \nSee LOAD DATA for more information about these clauses.\n \nThe IGNORE number LINES or IGNORE number ROWS clause causes\nthe first\nnumber rows in the XML file to be skipped. It is analogous\nto the LOAD\nDATA statement\'s IGNORE ... LINES clause.\n \nIf the LOW_PRIORITY keyword is used, insertions are delayed\nuntil no other clients are reading from the table. The\nCONCURRENT keyword allowes the use of concurrent inserts.\nThese clauses cannot be specified together.\n \nThis statement activates INSERT triggers.\n \n\n\nURL: https://mariadb.com/kb/en/load-xml/','','https://mariadb.com/kb/en/load-xml/'),(428,'LOAD DATA INFILE',27,'Syntax\n------ \nLOAD DATA [LOW_PRIORITY | CONCURRENT] [LOCAL] INFILE\n\'file_name\'\n [REPLACE | IGNORE]\n INTO TABLE tbl_name\n [CHARACTER SET charset_name]\n [{FIELDS | COLUMNS}\n [TERMINATED BY \'string\']\n [[OPTIONALLY] ENCLOSED BY \'char\']\n [ESCAPED BY \'char\']\n ]\n [LINES\n [STARTING BY \'string\']\n [TERMINATED BY \'string\']\n ]\n [IGNORE number LINES]\n [(col_name_or_user_var,...)]\n [SET col_name = expr,...]\n \nDescription\n----------- \nReads rows from a text file into the designated table on the\ndatabase at a very high speed. The file name must be given\nas a literal string. \n \nFiles are written to disk using the SELECT INTO OUTFILE\nstatement. You can then read the files back into a table\nusing the LOAD DATA INFILE statement. The FIELDS and LINES\nclauses are the same in both statements. These clauses are\noptional, but if both are specified then the FIELDS clause\nmust precede LINES.\n \nIn releases after MariaDB 5.5, LOAD DATA INFILE is unsafe\nfor statement-based replication.\n \nExecuting this statement activates INSERT triggers.\n \nREPLACE and IGNORE\n \nIn cases where you load data from a file into a table that\nalready contains data and has a Primary Key, you may\nencounter issues where the statement attempts to insert a\nrow with a Primary Key that already exists. When this\nhappens, the statement fails with Error 1064, protecting the\ndata already on the table. In cases where you want MariaDB\nto overwrite duplicates, use the REPLACE keyword.\n \nThe REPLACE keyword works like the REPLACE statement. Here,\nthe statement attempts to load the data from the file. If\nthe row does not exist, it adds it to the table. If the row\ncontains an existing Primary Key, it replaces the table\ndata. That is, in the event of a conflict, it assumes the\nfile contains the desired row. \n \nThis operation can cause a degradation in load speed by a\nfactor of 20 or more if the part that has already been\nloaded is larger than the capacity of the InnoDB Buffer\nPool. This happens because it causes a lot of turnaround in\nthe Buffer Pool.\n \nUse the IGNORE keyword when you want to skip any rows that\ncontain a conflicting Primary Key. Here, the statement\nattempts to load the data from the file. If the row does not\nexist, it adds it to the table. If the row contains an\nexisting Primary Key, it ignores the addition request and\nmoves on to the next. That is, in the event of a conflict,\nit assumes the table contains the desired row.\n \nLOCAL\n \nWhen you issue this statement, the Server attempts to read\nfiles from the host file system. Using the LOCAL keyword,\nthe statement instead attempts to read files from the\nclient. This allows you to insert files from the client\'s\nlocal file system into the database.\n \nIn the event that you don\'t want the server to permit this\noperation, (such as for security reasons), you can disable\nsupport using local_infile. When this system variable is set\nto 0, MariaDB rejects LOAD DATA LOCAL INFILE statements,\nfailing with an error message.\n \nCharacter-sets\n \nWhen the statement opens the file, it attempts to read the\ncontents using the default character-set, as defined by the\ncharacter_set_database system variable. \n \nIn the cases where the file was written using a\ncharacter-set other than the default, you can specify the\ncharacter-set to use with the CHARACTER SET clause in the\nstatement. It ignores character-sets specified by the SET\nNAMES statement and by the character_set_client system\nvariable. Setting the CHARACTER SET clause to a value of\nbinary indicates \"no conversion.\"\n \nThe statement interprets all fields in the file as having\nthe same character-set, regardless of the column data type.\nTo properly interpret file contents, you must ensure that it\nwas written with the correct character-set. If you write a\ndata file with mysqldump -T or with the SELECT INTO OUTFILE\nstatement with the mysql client, be sure to use the\n--default-character-set option, so that the output is\nwritten with the desired character-set.\n \nWhen using mixed character sets, use the CHARACTER SET\nclause in both SELECT INTO OUTFILE and LOAD DATA INFILE to\nensure that MariaDB correctly interprets the escape\nsequences.\n \nThe character_set_filesystem system variable controls the\ninterpretation of the filename.\n \nIt is currently not possible to load data files that use the\nucs2 character set.\n \nPriority and Concurrency\n \nIn loading data from a file, there\'s a risk that the\nstatement will attempt insertions concurrent with reads from\nanother client, which can result in the read serving a\nresult-set that contains only part of the update from the\nLOAD DATA INFILE statement.\n \nUsing the LOW_PRIORITY keyword, MariaDB delays insertions\nuntil no other clients are reading from the table.\nAlternatively, you can use the CONCURRENT keyword to perform\nconcurrent insertion.\n \nThe LOW_PRIORITY and CONCURRENT keywords are mutually\nexclusive. They cannot be used in the same statement.\n \nProgress Reporting\n \nSince MariaDB 5.3, the LOAD DATA INFILE statement supports\nprogress reporting. You may find this useful when dealing\nwith long-running operations. Using another client you can\nissue a SHOW PROCESSLIST query to check the progress of the\ndata load.\n \nUsing mysqlimport\n \nMariaDB ships with a separate utility for loading data from\nfiles: mysqlimport. It operates by sending LOAD DATA INFILE\nstatements to the server.\n \nUsing mysqlimport you can compress the file using the\n--compress option, to get better performance over slow\nnetworks, providing both the client and server support the\ncompressed protocol. Use the --local option to load from the\nlocal file system.\n \nIndexing\n \nIn cases where the storage engine supports ALTER TABLE...\nDISABLE KEYS statements, the LOAD DATA INFILE statement\nautomatically disables indexes during the execution.\n \n\n\nURL: https://mariadb.com/kb/en/load-data-infile/','','https://mariadb.com/kb/en/load-data-infile/'),(431,'Non-Recursive Common Table Expressions Overview',27,'Common Table Expressions (CTEs) are a standard SQL feature,\nand are essentially temporary named result sets. There are\ntwo kinds of CTEs: Non-Recursive, which this article covers;\nand Recursive.\n \nCommon table expressions were introduced in MariaDB 10.2.1.\n \nNon-Recursive CTEs\n \nThe WITH keyword signifies a CTE. It is given a name,\nfollowed by a body (the main query) as follows:\n \nCTEs are similar to derived tables. For example\n \nWITH engineers AS \n ( SELECT * FROM employees\n WHERE dept = \'Engineering\' )\n \nSELECT * FROM engineers\nWHERE ...\n \nSELECT * FROM\n ( SELECT * FROM employees\n WHERE dept = \'Engineering\' ) AS engineers\nWHERE\n...\n \nA non-recursive CTE is basically a query-local VIEW. There\nare several advantages and caveats to them. The syntax is\nmore readable than nested FROM (SELECT ...).\nA CTE can refer to another and it can be referenced from\nmultiple places.\n \nA CTE referencing Another CTE\n \nUsing this format makes for a more readable SQL than a\nnested FROM(SELECT ...) clause. Below is an example of this:\n \nWITH engineers AS (\nSELECT * FROM employees\nWHERE dept IN(\'Development\',\'Support\') ),\neu_engineers AS ( SELECT * FROM engineers WHERE country\nIN(\'NL\',...) )\nSELECT\n...\nFROM eu_engineers;\n \nMultiple Uses of a CTE\n \nThis can be an \'anti-self join\', for example:\n \nWITH engineers AS (\nSELECT * FROM employees\nWHERE dept IN(\'Development\',\'Support\') )\n \nSELECT * FROM engineers E1\nWHERE NOT EXISTS\n (SELECT 1 FROM engineers E2\n WHERE E2.country=E1.country\n AND E2.name E1.name );\n \nOr, for year-over-year comparisons, for example:\n \nWITH sales_product_year AS (\nSELECT product, YEAR(ship_date) AS year,\nSUM(price) AS total_amt\nFROM item_sales\nGROUP BY product, year )\n \nSELECT *\nFROM sales_product_year CUR,\nsales_product_year PREV,\nWHERE CUR.product=PREV.product \nAND CUR.year=PREV.year + 1 \nAND CUR.total_amt > PREV.total_amt\n \nAnother use is to compare individuals against their group.\nBelow is an example of how this might be executed:\n \nWITH sales_product_year AS (\nSELECT product,\nYEAR(ship_date) AS year,\nSUM(price) AS total_amt\nFROM item_sales\nGROUP BY product, year\n)\n \nSELECT * \nFROM sales_product_year S1\nWHERE\ntotal_amt > \n (SELECT 0.1 * SUM(total_amt)\n FROM sales_product_year S2\n WHERE S2.year = S1.year)\n \n\n \n \n \n \n \n \n \n\nURL:\nhttps://mariadb.com/kb/en/non-recursive-common-table-expressions-overview/','','https://mariadb.com/kb/en/non-recursive-common-table-expressions-overview/'),(432,'ORDER BY',27,'Description\n----------- \nUse the ORDER BY clause to order a resultset, such as that\nare returned from a SELECT\nstatement. You can specify just a column or use any\nexpression with functions. If you are\nusing the GROUP BY clause, you can use grouping functions in\nORDER BY.\nOrdering is done after grouping.\n \nYou can use multiple ordering expressions, separated by\ncommas. Rows will be sorted by\nthe first expression, then by the second expression if they\nhave the same value for the\nfirst, and so on.\n \nYou can use the keywords ASC and DESC after each ordering\nexpression to\nforce that ordering to be ascending or descending,\nrespectively. Ordering is ascending\nby default.\n \nYou can also use a single integer as the ordering\nexpression. If you use an integer n,\nthe results will be ordered by the nth column in the select\nexpression.\n \nWhen string values are compared, they are compared as if by\nthe STRCMP\nfunction. STRCMP ignores trailing whitespace and may\nnormalize\ncharacters and ignore case, depending on the collation in\nuse.\n \nStarting from MariaDB 5.5.35 duplicated entries in the ORDER\nBY clause are removed. MySQL 5.6 also removes duplicated\nfields.\n \nORDER BY can also be used to order the activities of a\nDELETE or UPDATE statement (usually with the LIMIT clause). \n \nUntil MariaDB 10.3.1, it was not possible to use ORDER BY\n(or LIMIT) in a multi-table UPDATE statement. This\nrestriction was lifted in MariaDB 10.3.2.\n \nExamples\n-------- \nCREATE TABLE seq (i INT, x VARCHAR(1));\nINSERT INTO seq VALUES (1,\'a\'), (2,\'b\'), (3,\'b\'),\n(4,\'f\'), (5,\'e\');\n \nSELECT * FROM seq ORDER BY i;\n \n+------+------+\n| i | x |\n+------+------+\n| 1 | a |\n| 2 | b |\n| 3 | b |\n| 4 | f |\n| 5 | e |\n+------+------+\n \nSELECT * FROM seq ORDER BY i DESC;\n \n+------+------+\n| i | x |\n+------+------+\n| 5 | e |\n| 4 | f |\n| 3 | b |\n| 2 | b |\n| 1 | a |\n+------+------+\n \nSELECT * FROM seq ORDER BY x,i;\n \n+------+------+\n| i | x |\n+------+------+\n| 1 | a |\n| 2 | b |\n| 3 | b |\n| 5 | e |\n| 4 | f |\n+------+------+\n \nORDER BY in an UPDATE statement, in conjunction with LIMIT:\n \nUPDATE seq SET x=\'z\' WHERE x=\'b\' ORDER BY i DESC LIMIT\n1;\n \nSELECT * FROM seq;\n \n+------+------+\n| i | x |\n+------+------+\n| 1 | a |\n| 2 | b |\n| 3 | z |\n| 4 | f |\n| 5 | e |\n+------+------+\n \nFrom MariaDB 10.3.2, ORDER BY can be used in a multi-table\nupdate:\n \nCREATE TABLE warehouse (product_id INT, qty INT);\nINSERT INTO warehouse VALUES\n(1,100),(2,100),(3,100),(4,100);\n \nCREATE TABLE store (product_id INT, qty INT);\nINSERT INTO store VALUES (1,5),(2,5),(3,5),(4,5);\n \nUPDATE warehouse,store SET warehouse.qty = warehouse.qty-2,\nstore.qty = store.qty+2 \n WHERE (warehouse.product_id = store.product_id AND\nstore.product_id >= 1) \n ORDER BY store.product_id DESC LIMIT 2;\n \nSELECT * FROM warehouse;\n \n+------------+------+\n| product_id | qty |\n+------------+------+\n| 1 | 100 |\n| 2 | 100 |\n| 3 | 98 |\n| 4 | 98 |\n+------------+------+\n \nSELECT * FROM store;\n \n+------------+------+\n| product_id | qty |\n+------------+------+\n| 1 | 5 |\n| 2 | 5 |\n| 3 | 7 |\n| 4 | 7 |\n+------------+------+\n \n\n\nURL: https://mariadb.com/kb/en/order-by/','','https://mariadb.com/kb/en/order-by/'),(434,'Recursive Common Table Expressions Overview',27,'Recursive Common Table Expressions have been supported since\nMariaDB 10.2.2.\n \nCommon Table Expressions (CTEs) are a standard SQL feature,\nand are essentially temporary named result sets. CTEs first\nappeared in the SQL standard in 1999, and the first\nimplementations began appearing in 2007.\n \nThere are two kinds of CTEs:\nNon-recursive\nRecursive, which this article covers.\n \nSQL is generally poor at recursive structures.\n \nCTEs permit a query to reference itself. A recursive CTE\nwill repeatedly execute subsets of the data until it obtains\nthe complete result set. This makes it particularly useful\nfor handing hierarchical or tree-structured data.\n \nSyntax example\n \nWITH RECURSIVE signifies a recursive CTE. It is given a\nname, followed by a body (the main query) as follows:\n \n\nComputation\n \nGiven the following structure:\n \nFirst execute the anchor part of the query:\n \nNext, execute the recursive part of the query:\n \n\n \n\nSummary so far\n \nwith recursive R as (\n select anchor_data\n union [all]\n select recursive_part\n from R, ...\n)\nselect ...\nCompute anchor_data\nCompute recursive_part to get the new data\nif (new data is non-empty) goto 2;\n \nCAST to avoid truncating data\n \nAs currently implemented by MariaDB and by the SQL Standard,\ndata may be truncated if not correctly cast. It is necessary\nto CAST the column to the correct width if the CTE\'s\nrecursive part produces wider values for a column than the\nCTE\'s nonrecursive part. Some other DBMS give an error in\nthis situation, and MariaDB\'s behavior may change in future\n- see MDEV-12325. See the examples below.\n \nExamples\n-------- \nTransitive closure - determining bus destinations\n \nSample data:\n \nCREATE TABLE bus_routes (origin varchar(50), dst\nvarchar(50));\nINSERT INTO bus_routes VALUES \n (\'New York\', \'Boston\'), \n (\'Boston\', \'New York\'), \n (\'New York\', \'Washington\'), \n (\'Washington\', \'Boston\'), \n (\'Washington\', \'Raleigh\');\n \nNow, we want to return the bus destinations with New York as\nthe origin:\n \nWITH RECURSIVE bus_dst as ( \n SELECT origin as dst FROM bus_routes WHERE origin=\'New\nYork\' \n UNION\n SELECT bus_routes.dst FROM bus_routes, bus_dst WHERE\nbus_dst.dst= bus_routes.origin \n) \nSELECT * FROM bus_dst;\n \n+------------+\n| dst |\n+------------+\n| New York |\n| Boston |\n| Washington |\n| Raleigh |\n+------------+\n \nThe above example is computed as follows:\n \nFirst, the anchor data is calculated:\nStarting from New York\nBoston and Washington are added\n \nNext, the recursive part:\nStarting from Boston and then Washington\nRaleigh is added\nUNION excludes nodes that are already present.\n \nComputing paths - determining bus routes\n \nThis time, we are trying to get bus routes such as “New\nYork -> Washington -> Raleighâ€.\n \nUsing the same sample data as the previous example:\n \nWITH RECURSIVE paths (cur_path, cur_dest) AS (\n SELECT origin, origin FROM bus_routes WHERE origin=\'New\nYork\' \n UNION\n SELECT CONCAT(paths.cur_path, \',\', bus_routes.dst),\nbus_routes.dst \n FROM paths, bus_routes \n WHERE paths.cur_dest = bus_routes.origin AND \n LOCATE(bus_routes.dst, paths.cur_path)=0 \n) \nSELECT * FROM paths;\n \n+-----------------------------+------------+\n| cur_path | cur_dest |\n+-----------------------------+------------+\n| New York | New York |\n| New York,Boston | Boston |\n| New York,Washington | Washington |\n| New York,Washington,Boston | Boston |\n| New York,Washington,Raleigh | Raleigh |\n+-----------------------------+------------+\n \nCAST to avoid data truncation\n \nIn the following example, data is truncated because the\nresults are not specifically cast to a wide enough type:\n \nWITH RECURSIVE tbl AS (\n SELECT NULL AS col\n UNION\n SELECT \"THIS NEVER SHOWS UP\" AS col FROM tbl\n)\n+------+\n| col |\n+------+\n| NULL |\n| |\n+------+\n \nExplicitly use CAST to overcome this:\n \nWITH RECURSIVE tbl AS (\n SELECT CAST(NULL AS CHAR(50)) AS col\n UNION SELECT \"THIS NEVER SHOWS UP\" AS col FROM tbl\n) \nSELECT * FROM tbl;\n \n+---------------------+\n| col |\n+---------------------+\n| NULL |\n| THIS NEVER SHOWS UP |\n+---------------------+\n \n\n \n \n \n \n \n \n \n\nURL:\nhttps://mariadb.com/kb/en/recursive-common-table-expressions-overview/','','https://mariadb.com/kb/en/recursive-common-table-expressions-overview/'),(435,'REPLACE',27,'Syntax\n------ \nREPLACE [LOW_PRIORITY | DELAYED]\n [INTO] tbl_name [PARTITION (partition_list)] [(col,...)]\n {VALUES | VALUE} ({expr | DEFAULT},...),(...),...\n \nOr:\n \nREPLACE [LOW_PRIORITY | DELAYED]\n [INTO] tbl_name [PARTITION (partition_list)]\n SET col={expr | DEFAULT}, ...\n \nOr:\n \nREPLACE [LOW_PRIORITY | DELAYED]\n [INTO] tbl_name [PARTITION (partition_list)] [(col,...)]\n SELECT ...\n \nDescription\n----------- \n REPLACE works exactly like\n INSERT, except that if an old row in the table\n has the same value as a new row for a PRIMARY KEY or a\n UNIQUE index, the old row is deleted before the new row is\n inserted. If the table has more than one UNIQUE keys, it is\npossible that the new row conflicts with more than one row.\nIn this case, all conflicting rows will be deleted.\n \nThe table name can be specified in the form db_name.tbl_name\nor, if a default database is selected, in the form tbl_name\n(see Identifier Qualifiers). This allows to use REPLACE ...\nSELECT to copy rows between different databases.\n \nBasically it works like this:\n \nBEGIN;\nSELECT 1 FROM t1 WHERE key=# FOR UPDATE;\nIF found-row\n DELETE FROM t1 WHERE key=# ;\n INSERT INTO t1 VALUES (...);\nENDIF\nEND;\n \nThe above can be replaced with:\n \nREPLACE INTO t1 VALUES (...)\n \n REPLACE is a MariaDB/MySQL extension to the SQL standard.\nIt\n either inserts, or deletes and inserts. For other\nMariaDB/MySQL extensions to\n standard SQL --- that also handle duplicate values --- see\nIGNORE and INSERT ON DUPLICATE KEY UPDATE.\n \nNote that unless the table has a PRIMARY KEY or\n UNIQUE index, using a REPLACE statement\nmakes no sense. It becomes equivalent to INSERT, because\nthere is no index to be used to determine whether a new row\nduplicates another.\n \nValues for all columns are taken from the values specified\nin the\n REPLACE statement. Any missing columns are set to their\ndefault values, just as happens for INSERT. You cannot refer\nto values from the current row and use them in the new row.\nIf you use an\nassignment such as \'SET col = col + 1\', the\nreference to the column name on the right hand side is\ntreated as\n DEFAULT(col), so the assignment is equivalent to\n \'SET col = DEFAULT(col) + 1\'.\n \nTo use REPLACE, you must have both the\n INSERT and DELETE privileges\nfor the table.\n \nThere are some gotchas you should be aware of, before using\nREPLACE:\nIf there is an AUTO_INCREMENT field, a new value will be\ngenerated.\nIf there are foreign keys, ON DELETE action will be\nactivated by REPLACE.\nTriggers on DELETE and INSERT will be activated by REPLACE.\n \nTo avoid some of these behaviors, you can use INSERT ... ON\nDUPLICATE KEY UPDATE.\n \nThe PARTITION clause was introduced in MariaDB 10.0. See\nPartition Pruning and Selection for details.\n \nThis statement activates INSERT and DELETE triggers. See\nTrigger Overview for details.\n \n\n\nURL: https://mariadb.com/kb/en/replace/','','https://mariadb.com/kb/en/replace/'),(436,'SELECT',27,'Syntax\n------ \nSELECT\n [ALL | DISTINCT | DISTINCTROW]\n [HIGH_PRIORITY]\n [STRAIGHT_JOIN]\n [SQL_SMALL_RESULT] [SQL_BIG_RESULT] [SQL_BUFFER_RESULT]\n [SQL_CACHE | SQL_NO_CACHE] [SQL_CALC_FOUND_ROWS]\n select_expr [, select_expr ...]\n [ FROM table_references\n [WHERE where_condition]\n [GROUP BY {col_name | expr | position} [ASC | DESC], ...\n[WITH ROLLUP]]\n [HAVING where_condition]\n [ORDER BY {col_name | expr | position} [ASC | DESC], ...]\n [LIMIT {[offset,] row_count | row_count OFFSET offset}]\n procedure|[PROCEDURE procedure_name(argument_list)]\n [INTO OUTFILE \'file_name\' [CHARACTER SET charset_name]\n[export_options]\n \nINTO DUMPFILE \'file_name\' | INTO var_name [, var_name] ] |\n\n \n [[FOR UPDATE | LOCK IN SHARE MODE] [WAIT n | NOWAIT] ] ]\n \nexport_options:\n [{FIELDS | COLUMNS}\n [TERMINATED BY \'string\']\n [[OPTIONALLY] ENCLOSED BY \'char\']\n [ESCAPED BY \'char\']\n ]\n [LINES\n [STARTING BY \'string\']\n [TERMINATED BY \'string\']\n ]\n \nDescription\n----------- \nSELECT is used to retrieve rows selected from one or more\ntables, and can include UNION statements and subqueries.\nEach select_expr expression indicates a column or data that\nyou want to retrieve. You\nmust have at least one select expression. See Select\nExpressions below.\n \nThe FROM clause indicates the table or tables from which to\nretrieve rows.\nUse either a single table name or a JOIN expression. See\nJOIN\nfor details. If no table is involved, FROM DUAL can be\nspecified.\n \nThe PARTITION clause was introduced in MariaDB 10.0. See\nPartition Pruning and Selection for details.\nEach table can also be specified as db_name.tabl_name. Each\ncolumn can also be specified as tbl_name.col_name or even\ndb_name.tbl_name.col_name. This allows to write queries\nwhich involve multiple databases. See Identifier Qualifiers\nfor syntax details.\n \nThe WHERE clause, if given, indicates the condition or\n conditions that rows must satisfy to be selected.\n where_condition is an expression that evaluates to true for\n each row to be selected. The statement selects all rows if\nthere is no WHERE\n clause.\nIn the WHERE clause, you can use any of the functions and\n operators that MariaDB supports, except for aggregate\n(summary) functions. See Functions and Operators and\nFunctions and Modifiers for use with GROUP BY (aggregate).\n \nUse the ORDER BY clause to order the results.\n \nUse the LIMIT clause allows you to restrict the results to\nonly\na certain number of rows, optionally with an offset.\n \nUse the GROUP BY and HAVING clauses to group\nrows together when they have columns or computed values in\ncommon.\n \nSELECT can also be used to retrieve rows computed without\nreference to\nany table.\n \nSelect Expressions\n \nA SELECT statement must contain one or more select\nexpressions, separated\nby commas. Each select expression can be one of the\nfollowing:\nThe name of a column.\nAny expression using functions and operators.\n* to select all columns from all tables in the FROM clause.\ntbl_name.* to select all columns from just the table\ntbl_name.\n \nWhen specifying a column, you can either use just the column\nname or qualify the column\nname with the name of the table using tbl_name.col_name. The\nqualified form is\nuseful if you are joining multiple tables in the FROM\nclause. If you do not qualify the\ncolumn names when selecting from multiple tables, MariaDB\nwill try to find the column in\neach table. It is an error if that column name exists in\nmultiple tables.\n \nYou can quote column names using backticks. If you are\nqualifying column names\nwith table names, quote each part separately as\n`tbl_name`.`col_name`.\n \nIf you use any grouping functions\nin any of the select expressions, all rows in your results\nwill be implicitly grouped, as if\nyou had used GROUP BY NULL.\n \nDISTINCT\n \nA query may produce some identical rows. By default, all\nrows are retrieved, even when their values are the same. To\nexplicitly specify that you want to retrieve identical rows,\nuse the ALL option. If you want duplicates to be removed\nfrom the resultset, use the DISTINCT option. DISTINCTROW is\na synonym for DISTINCT. See also COUNT DISTINCT and SELECT\nUNIQUE in Oracle mode.\n \nINTO\n \nThe INTO clause is used to specify that the query results\nshould be written to a file or variable.\nSELECT INTO OUTFILE - formatting and writing the result to\nan external file.\nSELECT INTO DUMPFILE - binary-safe writing of the\nunformatted results to an external file.\nSELECT INTO Variable - selecting and setting variables.\n \nThe reverse of SELECT INTO OUTFILE is LOAD DATA.\n \nWAIT/NOWAIT\n \nSet the lock wait timeout. See WAIT and NOWAIT.\n \nPROCEDURE\n \nPasses the whole result set to a C Procedure. See PROCEDURE\nand PROCEDURE ANALYSE (the only built-in procedure not\nrequiring the server to be recompiled).\n \n\nmax_statement_time clause\n \nBy using max_statement_time in conjunction with SET\nSTATEMENT, it is possible to limit the execution time of\nindividual queries. For example:\n \nSET STATEMENT max_statement_time=100 FOR \n SELECT field1 FROM table_name ORDER BY field1;\n \n\n\nURL: https://mariadb.com/kb/en/select/','','https://mariadb.com/kb/en/select/'),(437,'SELECT INTO DUMPFILE',27,'Syntax\n------ \nSELECT ... INTO DUMPFILE \'file_path\'\n \nDescription\n----------- \nSELECT ... INTO DUMPFILE is a SELECT clause which writes the\nresultset into a single unformatted row, without any\nseparators, in a file. The results will not be returned to\nthe client.\n \nfile_path can be an absolute path, or a relative path\nstarting from the data directory. It can only be specified\nas a string literal, not as a variable. However, the\nstatement can be dynamically composed and executed as a\nprepared statement to work around this limitation.\n \nThis statement is binary-safe and so is particularly useful\nfor writing BLOB values to file. It can be used, for\nexample, to copy an image or an audio document from the\ndatabase to a file. SELECT ... INTO FILE can be used to save\na text file.\n \nThe file must not exist. It cannot be overwritten. A user\nneeds the FILE privilege to run this statement. Also,\nMariaDB needs permission to write files in the specified\nlocation. If the secure_file_priv system variable is set to\na non-empty directory name, the file can only be written to\nthat directory.\n \nSince MariaDB 5.1, the character_set_filesystem system\nvariable has controlled interpretation of file names that\nare given as literal strings.\n \nExample\n \nSELECT _utf8\'Hello world!\' INTO DUMPFILE \'/tmp/world\';\n \nSELECT LOAD_FILE(\'/tmp/world\') AS world;\n \n+--------------+\n| world |\n+--------------+\n| Hello world! |\n+--------------+\n \n\n\nURL: https://mariadb.com/kb/en/select-into-dumpfile/','','https://mariadb.com/kb/en/select-into-dumpfile/'),(438,'SELECT INTO OUTFILE',27,'Syntax\n------ \nSELECT ... INTO OUTFILE \'file_name\'\n [CHARACTER SET charset_name]\n [export_options]\n \nexport_options:\n [{FIELDS | COLUMNS}\n [TERMINATED BY \'string\']\n [[OPTIONALLY] ENCLOSED BY \'char\']\n [ESCAPED BY \'char\']\n ]\n [LINES\n [STARTING BY \'string\']\n [TERMINATED BY \'string\']\n ]\n \nDescription\n----------- \nSELECT INTO OUTFILE writes the resulting rows to a file, and\nallows the use of column and row terminators to specify a\nparticular output format. The default is to terminate fields\nwith tabs (\\t) and lines with newlines (\\n).\n \nThe file must not exist. It cannot be overwritten. A user\nneeds the FILE privilege to run this statement. Also,\nMariaDB needs permission to write files in the specified\nlocation. If the secure_file_priv system variable is set to\na non-empty directory name, the file can only be written to\nthat directory.\n \nThe LOAD DATA INFILE statement complements SELECT INTO\nOUTFILE.\n \nCharacter-sets\n \nThe CHARACTER SET clause specifies the character set in\nwhich the results are to be written. Without the clause, no\nconversion takes place (the binary character set). In this\ncase, if there are multiple character sets, the output will\ncontain these too, and may not easily be able to be\nreloaded.\n \nIn cases where you have two servers using different\ncharacter-sets, using SELECT INTO OUTFILE to transfer data\nfrom one to the other can have unexpected results. To ensure\nthat MariaDB correctly interprets the escape sequences, use\nthe CHARACTER SET clause on both the SELECT INTO OUTFILE\nstatement and the subsequent LOAD DATA INFILE statement.\n \nExample\n \nThe following example produces a file in the CSV format:\n \nSELECT customer_id, firstname, surname INTO OUTFILE\n\'/exportdata/customers.txt\'\n FIELDS TERMINATED BY \',\' OPTIONALLY ENCLOSED BY \'\"\'\n LINES TERMINATED BY \'\\n\'\n FROM customers;\n \n\n\nURL: https://mariadb.com/kb/en/select-into-outfile/','','https://mariadb.com/kb/en/select-into-outfile/'),(442,'WITH',27,'The WITH keyword signifies a Common Table Expression (CTE).\nIt allows you to refer to a subquery expression many times\nin a query, as if having a temporary table that only exists\nfor the duration of a query.\n \nThere are two kinds of CTEs:\nNon-Recursive\nRecursive\n \nCommon Table Expression WITH was introduced in MariaDB\n10.2.1.\n \nRecursive WITH has been supported since MariaDB 10.2.2.\n \nSyntax\n------ \nWITH [RECURSIVE] table_reference as (SELECT ...)\n SELECT ...\n \nYou can use table_reference as any normal table in the\nexternal SELECT part. You can also use WITH in sub queries.\nWITH can also be used with EXPLAIN and SELECT.\n \nBelow is an example with the WITH at the top level:\n \nWITH t AS (SELECT a FROM t1 WHERE b >= \'c\') \n SELECT * FROM t2, t WHERE t2.c = t.a;\n \nThe example below uses WITH in a subquery:\n \nSELECT t1.a, t1.b FROM t1, t2\n WHERE t1.a > t2.c \n AND t2.c IN(WITH t AS (SELECT * FROM t1 WHERE t1.a \n\nURL: https://mariadb.com/kb/en/with/','','https://mariadb.com/kb/en/with/'),(443,'DESCRIBE',28,'Syntax\n------ \n{DESCRIBE | DESC} tbl_name [col_name | wild]\n \nDescription\n----------- \nDESCRIBE provides information about the columns in a table.\nIt is a shortcut for SHOW COLUMNS FROM.\nThese statements also display information for views.\n \ncol_name can be a column name, or a string containing the\nSQL \"%\" and \"_\" wildcard characters to\nobtain output only for the columns with names matching the\nstring. There is no\nneed to enclose the string within quotes unless it contains\nspaces or other\nspecial characters.\n \nDESCRIBE city;\n \n+------------+----------+------+-----+---------+----------------+\n| Field | Type | Null | Key | Default | Extra |\n+------------+----------+------+-----+---------+----------------+\n| Id | int(11) | NO | PRI | NULL | auto_increment |\n| Name | char(35) | YES | | NULL | |\n| Country | char(3) | NO | UNI | | |\n| District | char(20) | YES | MUL | | |\n| Population | int(11) | YES | | NULL | |\n+------------+----------+------+-----+---------+----------------+\n \nThe description for SHOW COLUMNS provides\nmore information about the output columns.\n \n\n\nURL: https://mariadb.com/kb/en/describe/','','https://mariadb.com/kb/en/describe/'),(439,'SELECT WITH ROLLUP',27,'Syntax\n------ \nSee SELECT for the full syntax.\n \nDescription\n----------- \nThe WITH ROLLUP modifier adds extra rows to the resultset\nthat represent super-aggregate summaries. The\nsuper-aggregated column is represented by a NULL value.\nMultiple aggregates over different columns will be added if\nthere are multiple GROUP BY columns.\n \nThe LIMIT clause can be used at the same time, and is\napplied after the WITH ROLLUP rows have been added.\n \nWITH ROLLUP cannot be used with ORDER BY. Some sorting is\nstill possible by using ASC or DESC clauses with the GROUP\nBY column, although the super-aggregate rows will always be\nadded last.\n \nExamples\n-------- \nThese examples use the following sample table\n \nCREATE TABLE booksales ( \n country VARCHAR(35), genre\nENUM(\'fiction\',\'non-fiction\'), year YEAR, sales INT);\n \nINSERT INTO booksales VALUES\n (\'Senegal\',\'fiction\',2014,12234),\n(\'Senegal\',\'fiction\',2015,15647),\n (\'Senegal\',\'non-fiction\',2014,64980),\n(\'Senegal\',\'non-fiction\',2015,78901),\n (\'Paraguay\',\'fiction\',2014,87970),\n(\'Paraguay\',\'fiction\',2015,76940),\n (\'Paraguay\',\'non-fiction\',2014,8760),\n(\'Paraguay\',\'non-fiction\',2015,9030);\n \nThe addition of the WITH ROLLUP modifier in this example\nadds an extra row that aggregates both years:\n \nSELECT year, SUM(sales) FROM booksales GROUP BY year;\n \n+------+------------+\n| year | SUM(sales) |\n+------+------------+\n| 2014 | 173944 |\n| 2015 | 180518 |\n+------+------------+\n2 rows in set (0.08 sec)\n \nSELECT year, SUM(sales) FROM booksales GROUP BY year WITH\nROLLUP;\n \n+------+------------+\n| year | SUM(sales) |\n+------+------------+\n| 2014 | 173944 |\n| 2015 | 180518 |\n| NULL | 354462 |\n+------+------------+\n \nIn the following example, each time the genre, the year or\nthe country change, another super-aggregate row is added:\n \nSELECT country, year, genre, SUM(sales) \n FROM booksales GROUP BY country, year, genre;\n \n+----------+------+-------------+------------+\n| country | year | genre | SUM(sales) |\n+----------+------+-------------+------------+\n| Paraguay | 2014 | fiction | 87970 |\n| Paraguay | 2014 | non-fiction | 8760 |\n| Paraguay | 2015 | fiction | 76940 |\n| Paraguay | 2015 | non-fiction | 9030 |\n| Senegal | 2014 | fiction | 12234 |\n| Senegal | 2014 | non-fiction | 64980 |\n| Senegal | 2015 | fiction | 15647 |\n| Senegal | 2015 | non-fiction | 78901 |\n+----------+------+-------------+------------+\n \nSELECT country, year, genre, SUM(sales) \n FROM booksales GROUP BY country, year, genre WITH ROLLUP;\n \n+----------+------+-------------+------------+\n| country | year | genre | SUM(sales) |\n+----------+------+-------------+------------+\n| Paraguay | 2014 | fiction | 87970 |\n| Paraguay | 2014 | non-fiction | 8760 |\n| Paraguay | 2014 | NULL | 96730 |\n| Paraguay | 2015 | fiction | 76940 |\n| Paraguay | 2015 | non-fiction | 9030 |\n| Paraguay | 2015 | NULL | 85970 |\n| Paraguay | NULL | NULL | 182700 |\n| Senegal | 2014 | fiction | 12234 |\n| Senegal | 2014 | non-fiction | 64980 |\n| Senegal | 2014 | NULL | 77214 |\n| Senegal | 2015 | fiction | 15647 |\n| Senegal | 2015 | non-fiction | 78901 |\n| Senegal | 2015 | NULL | 94548 |\n| Senegal | NULL | NULL | 171762 |\n| NULL | NULL | NULL | 354462 |\n+----------+------+-------------+------------+\n \nThe LIMIT clause, applied after WITH ROLLUP:\n \nSELECT country, year, genre, SUM(sales) \n FROM booksales GROUP BY country, year, genre WITH ROLLUP\nLIMIT 4;\n \n+----------+------+-------------+------------+\n| country | year | genre | SUM(sales) |\n+----------+------+-------------+------------+\n| Paraguay | 2014 | fiction | 87970 |\n| Paraguay | 2014 | non-fiction | 8760 |\n| Paraguay | 2014 | NULL | 96730 |\n| Paraguay | 2015 | fiction | 76940 |\n+----------+------+-------------+------------+\n \nSorting by year descending:\n \nSELECT country, year, genre, SUM(sales) \n FROM booksales GROUP BY country, year DESC, genre WITH\nROLLUP;\n \n+----------+------+-------------+------------+\n| country | year | genre | SUM(sales) |\n+----------+------+-------------+------------+\n| Paraguay | 2015 | fiction | 76940 |\n| Paraguay | 2015 | non-fiction | 9030 |\n| Paraguay | 2015 | NULL | 85970 |\n| Paraguay | 2014 | fiction | 87970 |\n| Paraguay | 2014 | non-fiction | 8760 |\n| Paraguay | 2014 | NULL | 96730 |\n| Paraguay | NULL | NULL | 182700 |\n| Senegal | 2015 | fiction | 15647 |\n| Senegal | 2015 | non-fiction | 78901 |\n| Senegal | 2015 | NULL | 94548 |\n| Senegal | 2014 | fiction | 12234 |\n| Senegal | 2014 | non-fiction | 64980 |\n| Senegal | 2014 | NULL | 77214 |\n| Senegal | NULL | NULL | 171762 |\n| NULL | NULL | NULL | 354462 |\n+----------+------+-------------+------------+\n \n\n\nURL: https://mariadb.com/kb/en/select-with-rollup/','','https://mariadb.com/kb/en/select-with-rollup/');
+INSERT INTO `help_topic` VALUES (447,'ANALYZE FORMAT=JSON',28,'ANALYZE FORMAT=JSON is a mix of the EXPLAIN FORMAT=JSON and\nANALYZE statement features. ANALYZE FORMAT=JSON $statement\nwill execute $statement, and then print the output of\nEXPLAIN FORMAT=JSON, amended with the data from query\nexecution.\n \nBasic Execution Data\n \nYou can get the following also from tabular ANALYZE\nstatement form:\nr_rows is provided for any node that reads rows. It shows\nhow many rows were read, on average \nr_filtered is provided whenever there is a condition that is\nchecked. It shows the percentage of rows left after checking\nthe condition.\n \nAdvanced Execution Data\n \nThe most important data that is not available in tabula\nANALYZE statement are:\nr_loops field. This shows how many times the node was\nexecuted. Most query plan elements have this field.\nr_total_time_ms field. It shows how much time in total was\nspent executing this node. If the node has subnodes, their\nexecution time is included.\nr_buffer_size field. Query plan nodes that make use of\nbuffers report the size of buffer that was was used.\n \nData About Individual Query Plan Nodes\n \nfilesort node reports whether sorting was done with LIMIT n\nparameter, and how many rows were in the sort result. \nblock-nl-join node has r_loops field, which allows to tell\nwhether Using join buffer was efficient \nrange-checked-for-each-record reports counters that show the\nresult of the check. \nexpression-cache is used for subqueries, and it reports how\nmany times the cache was used, and what cache hit ratio was.\nunion_result node has r_rows so one can see how many rows\nwere produced after UNION operation\nand so forth\n \nUse Cases\n \nSee Examples of ANALYZE FORMAT=JSON.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/analyze-format-json/','','https://mariadb.com/kb/en/analyze-format-json/'),(440,'UNION',27,'UNION is used to combine the results from multiple SELECT\nstatements into a single result set.\n \nSyntax\n------ \nSELECT ...\nUNION [ALL | DISTINCT] SELECT ...\n[UNION [ALL | DISTINCT] SELECT ...]\n[ORDER BY [column [, column ...]]]\n[LIMIT {[offset,] row_count | row_count OFFSET offset}]\n \nDescription\n----------- \nUNION is used to combine the results from multiple SELECT\nstatements into a single result set.\n \nThe column names from the first SELECT statement are used as\nthe column names for the results returned. Selected columns\nlisted in corresponding positions of each SELECT statement\nshould have the same data type. (For example, the first\ncolumn selected by the first statement should have the same\ntype as the first column selected by the other statements.)\n \nIf they don\'t, the type and length of the columns in the\nresult take into account the values returned by all of the\nSELECTs, so there is no need for explicit casting. Note that\ncurrently this is not the case for recursive CTEs - see\nMDEV-12325.\n \nTable names can be specified as db_name.tbl_name. This\npermits writing UNIONs which involve multiple databases. See\nIdentifier Qualifiers for syntax details.\n \nUNION queries cannot be used with aggregate functions.\n \nALL/DISTINCT\n \nThe ALL keyword causes duplicate rows to be preserved. The\nDISTINCT keyword (the default if the keyword is omitted)\ncauses duplicate rows to be removed by the results.\n \nUNION ALL and UNION DISTINCT can both be present in a query.\nIn this case, UNION DISTINCT will override any UNION ALLs to\nits left.\n \nUntil MariaDB 10.1.1, all UNION ALL statements required the\nserver to create a temporary table. Since MariaDB 10.1.1,\nthe server can in most cases execute UNION ALL without\ncreating a temporary table, improving performance (see\nMDEV-334).\n \nORDER BY and LIMIT\n \nIndividual SELECTs can contain their own ORDER BY and LIMIT\nclauses. In this case, the individual queries need to be\nwrapped between parentheses. However, this does not affect\nthe order of the UNION, so they only are useful to limit the\nrecord read by one SELECT.\n \nThe UNION can have global ORDER BY and LIMIT clauses, which\naffect the whole resultset. If the columns retrieved by\nindividual SELECT statements have an alias (AS), the ORDER\nBY must use that alias, not the real column names.\n \nHIGH_PRIORITY\n \nSpecifying a query as HIGH_PRIORITY will not work inside a\nUNION. If applied to the first SELECT, it will be ignored.\nApplying to a later SELECT results in a syntax error:\n \nERROR 1234 (42000): Incorrect usage/placement of\n\'HIGH_PRIORITY\'\n \nSELECT ... INTO ...\n \nIndividual SELECTs cannot be written INTO DUMPFILE or INTO\nOUTFILE. If the last SELECT statement specifies INTO\nDUMPFILE or INTO OUTFILE, the entire result of the UNION\nwill be written. Placing the clause after any other SELECT\nwill result in a syntax error.\n \nIf the result is a single row, SELECT ... INTO @var_name can\nalso be used.\n \n\nParentheses\n \nFrom MariaDB 10.4.0, parentheses can be used to specify\nprecedence. Before this, a syntax error would be returned.\n \nExamples\n-------- \nUNION between tables having different column names:\n \n(SELECT e_name AS name, email FROM employees)\nUNION\n(SELECT c_name AS name, email FROM customers);\n \nSpecifying the UNION\'s global order and limiting total\nrows:\n \n(SELECT name, email FROM employees)\nUNION\n(SELECT name, email FROM customers)\nORDER BY name LIMIT 10;\n \nAdding a constant row:\n \n(SELECT \'John Doe\' AS name, \'john.doe@example.net\' AS\nemail)\nUNION\n(SELECT name, email FROM customers);\n \nDiffering types:\n \nSELECT CAST(\'x\' AS CHAR(1)) UNION SELECT REPEAT(\'y\',4);\n+----------------------+\n| CAST(\'x\' AS CHAR(1)) |\n+----------------------+\n| x |\n| yyyy |\n+----------------------+\n \nReturning the results in order of each individual SELECT by\nuse of a sort column:\n \n(SELECT 1 AS sort_column, e_name AS name, email FROM\nemployees)\nUNION\n(SELECT 2, c_name AS name, email FROM customers) ORDER BY\nsort_column;\n \nDifference between UNION, EXCEPT and INTERSECT:\n \nCREATE TABLE seqs (i INT);\nINSERT INTO seqs VALUES (1),(2),(3),(4),(5),(6);\n \nSELECT i FROM seqs WHERE i =3;\n \n+------+\n| i |\n+------+\n| 1 |\n| 2 |\n| 3 |\n| 4 |\n| 5 |\n| 6 |\n+------+\n \nSELECT i FROM seqs WHERE i =3;\n \n+------+\n| i |\n+------+\n| 1 |\n| 2 |\n+------+\n \nSELECT i FROM seqs WHERE i =3;\n \n+------+\n| i |\n+------+\n| 3 |\n+------+\n \nParentheses for specifying precedence, from MariaDB 10.4.0\n \nCREATE OR REPLACE TABLE t1 (a INT);\nCREATE OR REPLACE TABLE t2 (b INT);\nCREATE OR REPLACE TABLE t3 (c INT);\n \nINSERT INTO t1 VALUES (1),(2),(3),(4);\nINSERT INTO t2 VALUES (5),(6);\nINSERT INTO t3 VALUES (1),(6);\n \n((SELECT a FROM t1) UNION (SELECT b FROM t2)) INTERSECT\n(SELECT c FROM t3);\n+------+\n| a |\n+------+\n| 1 |\n| 6 |\n+------+\n \n(SELECT a FROM t1) UNION ((SELECT b FROM t2) INTERSECT\n(SELECT c FROM t3));\n+------+\n| a |\n+------+\n| 1 |\n| 2 |\n| 3 |\n| 4 |\n| 6 |\n+------+\n \n\n\nURL: https://mariadb.com/kb/en/union/','','https://mariadb.com/kb/en/union/'),(441,'UPDATE',27,'Syntax\n------ \nSingle-table syntax:\n \nUPDATE [LOW_PRIORITY] [IGNORE] table_reference \n [PARTITION (partition_list)]\n SET col1={expr1|DEFAULT} [,col2={expr2|DEFAULT}] ...\n [WHERE where_condition]\n [ORDER BY ...]\n [LIMIT row_count]\n \nMultiple-table syntax:\n \nUPDATE [LOW_PRIORITY] [IGNORE] table_references\n SET col1={expr1|DEFAULT} [, col2={expr2|DEFAULT}] ...\n [WHERE where_condition]\n \nDescription\n----------- \nFor the single-table syntax, the UPDATE statement updates\ncolumns of existing rows in the named table with new values.\nThe\nSET clause indicates which columns to modify and the values\nthey should be given. Each value can be given as an\nexpression, or the keyword\nDEFAULT to set a column explicitly to its default value. The\nWHERE clause, if given, specifies the conditions that\nidentify\nwhich rows to update. With no WHERE clause, all rows are\nupdated. If the ORDER BY clause is specified, the rows are\nupdated in the order that is specified. The LIMIT clause\nplaces a limit on the number of rows that can be updated.\n \nThe PARTITION clause was introduced in MariaDB 10.0. See\nPartition Pruning and Selection for details.\n \nUntil MariaDB 10.3.2, for the multiple-table syntax, UPDATE\nupdates rows in each\ntable named in table_references that satisfy the conditions.\nIn this case,\nORDER BY and LIMIT cannot be used. This restriction was\nlifted in MariaDB 10.3.2 and both clauses can be used with\nmultiple-table updates. An UPDATE can also reference tables\nwhich are located in different databases; see Identifier\nQualifiers for the syntax.\n \nwhere_condition is an expression that evaluates to true for\neach row to be updated.\n \ntable_references and where_condition are as\nspecified as described in SELECT.\n \nAssignments are evaluated in left-to-right order, unless the\nSIMULTANEOUS_ASSIGNMENT sql_mode (available from MariaDB\n10.3.5) is set, in which case the UPDATE statement evaluates\nall assignments simultaneously. \n \nYou need the UPDATE privilege only for columns referenced in\nan UPDATE that are actually updated. You need only the\nSELECT privilege for any columns that are read but\nnot modified. See GRANT.\n \nThe UPDATE statement supports the following modifiers:\nIf you use the LOW_PRIORITY keyword, execution of\n the UPDATE is delayed until no other clients are reading\nfrom\n the table. This affects only storage engines that use only\ntable-level\n locking (MyISAM, MEMORY, MERGE). See HIGH_PRIORITY and\nLOW_PRIORITY clauses for details.\nIf you use the IGNORE keyword, the update statement does \n not abort even if errors occur during the update. Rows for\nwhich\n duplicate-key conflicts occur are not updated. Rows for\nwhich columns are\n updated to values that would cause data conversion errors\nare updated to the\n closest valid values instead.\n \nUPDATE Statements With the Same Source and Target\n \nFrom MariaDB 10.3.2, UPDATE statements may have the same\nsource and target.\n \nFor example, given the following table:\n \nDROP TABLE t1;\n \nCREATE TABLE t1 (c1 INT, c2 INT);\nINSERT INTO t1 VALUES (10,10), (20,20);\n \nUntil MariaDB 10.3.1, the following UPDATE statement would\nnot work:\n \nUPDATE t1 SET c1=c1+1 WHERE c2=(SELECT MAX(c2) FROM t1);\nERROR 1093 (HY000): Table \'t1\' is specified twice, \n both as a target for \'UPDATE\' and as a separate source\nfor data\n \nFrom MariaDB 10.3.2, the statement executes successfully:\n \nUPDATE t1 SET c1=c1+1 WHERE c2=(SELECT MAX(c2) FROM t1);\n \nSELECT * FROM t1;\n \n+------+------+\n| c1 | c2 |\n+------+------+\n| 10 | 10 |\n| 21 | 20 |\n+------+------+\n \nExample\n \nSingle-table syntax:\n \nUPDATE table_name SET column1 = value1, column2 = value2\nWHERE id=100;\n \nMultiple-table syntax:\n \nUPDATE tab1, tab2 SET tab1.column1 = value1, tab1.column2 =\nvalue2 WHERE tab1.id = tab2.id;\n \n\n\nURL: https://mariadb.com/kb/en/update/','','https://mariadb.com/kb/en/update/'),(448,'ANALYZE FORMAT=JSON Examples',28,'Example #1\n \nCustomers who have ordered more than 1M goods.\n \nANALYZE FORMAT=JSON\nSELECT CONT(*)\nFROM customer\nWHERE\n (SELECT SUM(o_totalprice) FROM orders WHERE\no_custkey=c_custkey) > 1000*1000;\n \nThe query takes 40 seconds over cold cache\n \nEXPLAIN: {\n \"query_block\": {\n \"select_id\": 1,\n \"r_loops\": 1,\n \"r_total_time_ms\": 39872,\n \"table\": {\n \"table_name\": \"customer\",\n \"access_type\": \"index\",\n \"key\": \"i_c_nationkey\",\n \"key_length\": \"5\",\n \"used_key_parts\": [\"c_nationkey\"],\n \"r_loops\": 1,\n \"rows\": 150303,\n \"r_rows\": 150000,\n \"r_total_time_ms\": 270.3,\n \"filtered\": 100,\n \"r_filtered\": 60.691,\n \"attached_condition\": \"((subquery#2) > ((1000 *\n1000)))\",\n \"using_index\": true\n },\n \"subqueries\": [\n {\n \"query_block\": {\n \"select_id\": 2,\n \"r_loops\": 150000,\n \"r_total_time_ms\": 39531,\n \"table\": {\n \"table_name\": \"orders\",\n \"access_type\": \"ref\",\n \"possible_keys\": [\"i_o_custkey\"],\n \"key\": \"i_o_custkey\",\n \"key_length\": \"5\",\n \"used_key_parts\": [\"o_custkey\"],\n \"ref\": [\"dbt3sf1.customer.c_custkey\"],\n \"r_loops\": 150000,\n \"rows\": 7,\n \"r_rows\": 10,\n \"r_total_time_ms\": 39208,\n \"filtered\": 100,\n \"r_filtered\": 100\n }\n }\n }\n ]\n }\n}\nANALYZE shows that 39.2 seconds were spent in the subquery,\nwhich was executed 150K times (for every row of outer\ntable).\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/analyze-formatjson-examples/','','https://mariadb.com/kb/en/analyze-formatjson-examples/'),(444,'ANALYZE Statement',28,'The ANALYZE statement was introduced in MariaDB 10.1.0.\n \nDescription\n----------- \nThe ANALYZE statement is similar to the EXPLAIN statement.\nANALYZE statement will invoke the optimizer, execute the\nstatement, and then produce EXPLAIN output instead of the\nresult set. The EXPLAIN output will be annotated with\nstatistics from statement execution.\n \nThis lets one check how close the optimizer\'s estimates\nabout the query plan are to the reality. ANALYZE produces an\noverview, while the\nANALYZE FORMAT=JSON command provides a more detailed view of\nthe query plan and the query execution.\n \nThe syntax is \n \nANALYZE explainable_statement;\n \nwhere the statement is any statement for which one can run\nEXPLAIN.\n \nCommand Output\n \nConsider an example:\n \nANALYZE SELECT * FROM tbl1 \nWHERE key1 \n BETWEEN 10 AND 200 AND \n col1 LIKE \'foo%\'\\G\n \n*************************** 1. row\n***************************\n id: 1\n select_type: SIMPLE\n table: tbl1\n type: range\npossible_keys: key1\n key: key1\n key_len: 5\n ref: NULL\n rows: 181\n r_rows: 181\n filtered: 100.00\n r_filtered: 10.50\n Extra: Using index condition; Using where\n \nCompared to EXPLAIN, ANALYZE produces two extra columns:\nr_rows is an observation-based counterpart of the rows\ncolumn. It shows how many rows were actually read from the\ntable. \nr_filtered is an observation-based counterpart of the\nfiltered column. It shows which fraction of rows was left\nafter applying the WHERE condition.\n \nInterpreting the Output\n \nJoins\n \nLet\'s consider a more complicated example.\n \nANALYZE SELECT *\nFROM orders, customer \nWHERE\n customer.c_custkey=orders.o_custkey AND\n customer.c_acctbal 200*1000\n \n+----+-------------+----------+------+---------------+-------------+---------+--------------------+--------+--------+----------+------------+-------------+\n| id | select_type | table | type | possible_keys | key |\nkey_len | ref | rows | r_rows | filtered | r_filtered |\nExtra |\n+----+-------------+----------+------+---------------+-------------+---------+--------------------+--------+--------+----------+------------+-------------+\n| 1 | SIMPLE | customer | ALL | PRIMARY,... | NULL | NULL |\nNULL | 149095 | 150000 | 18.08 | 9.13 | Using where |\n| 1 | SIMPLE | orders | ref | i_o_custkey | i_o_custkey | 5\n| customer.c_custkey | 7 | 10 | 100.00 | 30.03 | Using where\n|\n+----+-------------+----------+------+---------------+-------------+---------+--------------------+--------+--------+----------+------------+-------------+\n \nHere, one can see that\nFor table customer, customer.rows=149095,\ncustomer.r_rows=150000. The estimate for number of rows we\nwill read was fairly precise\ncustomer.filtered=18.08, customer.r_filtered=9.13. The\noptimizer somewhat overestimated the number of records that\nwill match selectivity of condition attached to `customer`\ntable (in general, when you have a full scan and r_filtered\nis less than 15%, it\'s time to consider adding an\nappropriate index).\nFor table orders, orders.rows=7, orders.r_rows=10. This\nmeans that on average, there are 7 orders for a given\nc_custkey, but in our case there were 10, which is close to\nthe expectation (when this number is consistently far from\nthe expectation, it may be time to run ANALYZE TABLE, or\neven edit the table statistics manually to get better query\nplans).\norders.filtered=100, orders.r_filtered=30.03. The optimizer\ndidn\'t have any way to estimate which fraction of records\nwill be left after it checks the condition that is attached\nto table orders (it\'s orders.o_totalprice > 200*1000). So,\nit used 100%. In reality, it is 30%. 30% is typically not\nselective enough to warrant adding new indexes. For joins\nwith many tables, it might be worth to collect and use\ncolumn statistics for columns in question, this may help the\noptimizer to pick a better query plan.\n \nMeaning of NULL in r_rows and r_filtered\n \nLet\'s modify the previous example slightly\n \nANALYZE SELECT * \nFROM orders, customer \nWHERE\n customer.c_custkey=orders.o_custkey AND\n customer.c_acctbal 200*1000;\n \n+----+-------------+----------+------+---------------+-------------+---------+--------------------+--------+--------+----------+------------+-------------+\n| id | select_type | table | type | possible_keys | key |\nkey_len | ref | rows | r_rows | filtered | r_filtered |\nExtra |\n+----+-------------+----------+------+---------------+-------------+---------+--------------------+--------+--------+----------+------------+-------------+\n| 1 | SIMPLE | customer | ALL | PRIMARY,... | NULL | NULL |\nNULL | 149095 | 150000 | 18.08 | 0.00 | Using where |\n| 1 | SIMPLE | orders | ref | i_o_custkey | i_o_custkey | 5\n| customer.c_custkey | 7 | NULL | 100.00 | NULL | Using\nwhere |\n+----+-------------+----------+------+---------------+-------------+---------+--------------------+--------+--------+----------+------------+-------------+\n \nHere, one can see that orders.r_rows=NULL and\norders.r_filtered=NULL. This means that table orders was not\nscanned even once. \nIndeed, we can also see customer.r_filtered=0.00. This shows\nthat a part of WHERE attached to table `customer` was never\nsatisfied (or, satisfied in less than 0.01% of cases).\n \nANALYZE FORMAT=JSON\n \nANALYZE FORMAT=JSON produces JSON output. It produces much\nmore information than tabular ANALYZE.\n \nNotes\n \nANALYZE UPDATE or ANALYZE DELETE will actually make\nupdates/deletes (ANALYZE SELECT will perform the select\noperation and then discard the resultset).\nPostgreSQL has a similar command, EXPLAIN ANALYZE.\nThe EXPLAIN in the slow query log feature allows MariaDB to\nhave ANALYZE output of slow queries printed into the slow\nquery log (see MDEV-6388).\n \n\n\nURL: https://mariadb.com/kb/en/analyze-statement/','','https://mariadb.com/kb/en/analyze-statement/'),(449,'EXPLAIN FORMAT=JSON',28,'Starting from version 10.1.2, MariaDB supports the EXPLAIN\nFORMAT=JSON syntax.\n \nSynopsis\n \nEXPLAIN FORMAT=JSON is a variant of EXPLAIN command that\nproduces output in JSON form. The output always has one row\nwhich has only one column titled \"JSON\". The contents are\na JSON representation of the query plan, formatted for\nreadability:\n \nEXPLAIN FORMAT=JSON SELECT * FROM t1 WHERE col1=1\\G\n \n*************************** 1. row\n***************************\nEXPLAIN: {\n \"query_block\": {\n \"select_id\": 1,\n \"table\": {\n \"table_name\": \"t1\",\n \"access_type\": \"ALL\",\n \"rows\": 1000,\n \"filtered\": 100,\n \"attached_condition\": \"(t1.col1 = 1)\"\n }\n }\n}\n \nOutput is different from MySQL\n \nThe output of MariaDB\'s EXPLAIN FORMAT=JSON is different\nfrom EXPLAIN FORMAT=JSON in MySQL.The reasons for that are:\nMySQL\'s output has deficiencies. Some are listed here:\nEXPLAIN FORMAT=JSON in MySQL)\nThe output of MySQL\'s EXPLAIN FORMAT=JSON is not defined.\nEven MySQL Workbench has trouble parsing it (see this blog\npost).\nMariaDB has query optimizations that MySQL does not have.\nErgo, MariaDB generates query plans that MySQL does not\ngenerate.\n \nA (as yet incomplete) list of how MariaDB\'s output is\ndifferent from MySQL can be found here: EXPLAIN FORMAT=JSON\ndifferences from MySQL. \n \nOutput format\n \nTODO: MariaDB\'s output format description.\n \n\n\nURL: https://mariadb.com/kb/en/explain-format-json/','','https://mariadb.com/kb/en/explain-format-json/'),(456,'ST_CONTAINS',30,'Syntax\n------ \nST_CONTAINS(g1,g2)\n \nDescription\n----------- \nReturns 1 or 0 to indicate whether a geometry g1 completely\ncontains geometry g2.\n \nST_CONTAINS() uses object shapes, while CONTAINS(), based on\nthe original MySQL implementation, uses object bounding\nrectangles.\n \nST_CONTAINS tests the opposite relationship to ST_WITHIN().\n \nExamples\n-------- \nSET @g1 = ST_GEOMFROMTEXT(\'POLYGON((175 150, 20 40, 50 60,\n125 100, 175 150))\');\n \nSET @g2 = ST_GEOMFROMTEXT(\'POINT(174 149)\');\n \nSELECT ST_CONTAINS(@g1,@g2);\n+----------------------+\n| ST_CONTAINS(@g1,@g2) |\n+----------------------+\n| 1 |\n+----------------------+\n \nSET @g2 = ST_GEOMFROMTEXT(\'POINT(175 151)\');\n \nSELECT ST_CONTAINS(@g1,@g2);\n+----------------------+\n| ST_CONTAINS(@g1,@g2) |\n+----------------------+\n| 0 |\n+----------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st-contains/','','https://mariadb.com/kb/en/st-contains/'),(457,'ST_CROSSES',30,'Syntax\n------ \nST_CROSSES(g1,g2)\n \nDescription\n----------- \nReturns 1 if geometry g1 spatially crosses geometry g2.\nReturns NULL if g1 is a Polygon or a MultiPolygon, or if g2\nis a\nPoint or a MultiPoint. Otherwise, returns 0.\n \nThe term spatially crosses denotes a spatial relation\nbetween two\ngiven geometries that has the following properties:\nThe two geometries intersect\nTheir intersection results in a geometry that has a\ndimension that is one\n less than the maximum dimension of the two given geometries\nTheir intersection is not equal to either of the two given\ngeometries\n \nST_CROSSES() uses object shapes, while CROSSES(), based on\nthe original MySQL implementation, uses object bounding\nrectangles.\n \nExamples\n-------- \nSET @g1 = ST_GEOMFROMTEXT(\'LINESTRING(174 149, 176 151)\');\n \nSET @g2 = ST_GEOMFROMTEXT(\'POLYGON((175 150, 20 40, 50 60,\n125 100, 175 150))\');\n \nSELECT ST_CROSSES(@g1,@g2);\n+---------------------+\n| ST_CROSSES(@g1,@g2) |\n+---------------------+\n| 1 |\n+---------------------+\n \nSET @g1 = ST_GEOMFROMTEXT(\'LINESTRING(176 149, 176 151)\');\n \nSELECT ST_CROSSES(@g1,@g2);\n+---------------------+\n| ST_CROSSES(@g1,@g2) |\n+---------------------+\n| 0 |\n+---------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st-crosses/','','https://mariadb.com/kb/en/st-crosses/'),(459,'ST_DISJOINT',30,'Syntax\n------ \nST_DISJOINT(g1,g2)\n \nDescription\n----------- \nReturns 1 or 0 to indicate whether geometry g1 is spatially\ndisjoint from\n(does not intersect with) geometry g2.\n \nST_DISJOINT() uses object shapes, while DISJOINT(), based on\nthe original MySQL implementation, uses object bounding\nrectangles.\n \nST_DISJOINT() tests the opposite relationship to\nST_INTERSECTS().\n \nExamples\n-------- \nSET @g1 = ST_GEOMFROMTEXT(\'POINT(0 0)\');\n \nSET @g2 = ST_GEOMFROMTEXT(\'LINESTRING(2 0, 0 2)\');\n \nSELECT ST_DISJOINT(@g1,@g2);\n+----------------------+\n| ST_DISJOINT(@g1,@g2) |\n+----------------------+\n| 1 |\n+----------------------+\n \nSET @g2 = ST_GEOMFROMTEXT(\'LINESTRING(0 0, 0 2)\');\n \nSELECT ST_DISJOINT(@g1,@g2);\n+----------------------+\n| ST_DISJOINT(@g1,@g2) |\n+----------------------+\n| 0 |\n+----------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_disjoint/','','https://mariadb.com/kb/en/st_disjoint/'),(461,'ST_EQUALS',30,'Syntax\n------ \nST_EQUALS(g1,g2)\n \nDescription\n----------- \nReturns 1 or 0 to indicate whether geometry g1 is spatially\nequal to geometry g2.\n \nST_EQUALS() uses object shapes, while EQUALS(), based on the\noriginal MySQL implementation, uses object bounding\nrectangles.\n \nExamples\n-------- \nSET @g1 = ST_GEOMFROMTEXT(\'LINESTRING(174 149, 176 151)\');\n \nSET @g2 = ST_GEOMFROMTEXT(\'LINESTRING(176 151, 174 149)\');\n \nSELECT ST_EQUALS(@g1,@g2);\n+--------------------+\n| ST_EQUALS(@g1,@g2) |\n+--------------------+\n| 1 |\n+--------------------+\n \nSET @g1 = ST_GEOMFROMTEXT(\'POINT(0 2)\');\n \nSET @g1 = ST_GEOMFROMTEXT(\'POINT(2 0)\');\n \nSELECT ST_EQUALS(@g1,@g2);\n+--------------------+\n| ST_EQUALS(@g1,@g2) |\n+--------------------+\n| 0 |\n+--------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st-equals/','','https://mariadb.com/kb/en/st-equals/'),(462,'ST_INTERSECTS',30,'Syntax\n------ \nST_INTERSECTS(g1,g2)\n \nDescription\n----------- \nReturns 1 or 0 to indicate whether geometry g1 spatially\nintersects geometry g2.\n \nST_INTERSECTS() uses object shapes, while INTERSECTS(),\nbased on the original MySQL implementation, uses object\nbounding rectangles.\n \nST_INTERSECTS() tests the opposite relationship to\nST_DISJOINT().\n \nExamples\n-------- \nSET @g1 = ST_GEOMFROMTEXT(\'POINT(0 0)\');\n \nSET @g2 = ST_GEOMFROMTEXT(\'LINESTRING(0 0, 0 2)\');\n \nSELECT ST_INTERSECTS(@g1,@g2);\n+------------------------+\n| ST_INTERSECTS(@g1,@g2) |\n+------------------------+\n| 1 |\n+------------------------+\n \nSET @g2 = ST_GEOMFROMTEXT(\'LINESTRING(2 0, 0 2)\');\n \nSELECT ST_INTERSECTS(@g1,@g2);\n+------------------------+\n| ST_INTERSECTS(@g1,@g2) |\n+------------------------+\n| 0 |\n+------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st-intersects/','','https://mariadb.com/kb/en/st-intersects/'),(465,'ST_TOUCHES',30,'Syntax\n------ \nST_TOUCHES(g1,g2)\n \nDescription\n----------- \nReturns 1 or 0 to indicate whether geometry g1 spatially\ntouches geometry g2. Two geometries spatially touch if the\ninteriors of the geometries do not intersect,\nbut the boundary of one of the geometries intersects either\nthe boundary or the\ninterior of the other.\n \nST_TOUCHES() uses object shapes, while TOUCHES(), based on\nthe original MySQL implementation, uses object bounding\nrectangles.\n \nExamples\n-------- \nSET @g1 = ST_GEOMFROMTEXT(\'POINT(2 0)\');\n \nSET @g2 = ST_GEOMFROMTEXT(\'LINESTRING(2 0, 0 2)\');\n \nSELECT ST_TOUCHES(@g1,@g2);\n+---------------------+\n| ST_TOUCHES(@g1,@g2) |\n+---------------------+\n| 1 |\n+---------------------+\n \nSET @g1 = ST_GEOMFROMTEXT(\'POINT(2 1)\');\n \nSELECT ST_TOUCHES(@g1,@g2);\n+---------------------+\n| ST_TOUCHES(@g1,@g2) |\n+---------------------+\n| 0 |\n+---------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st-touches/','','https://mariadb.com/kb/en/st-touches/'),(466,'ST_WITHIN',30,'Syntax\n------ \nST_WITHIN(g1,g2)\n \nDescription\n----------- \nReturns 1 or 0 to indicate whether geometry g1 is spatially\nwithin geometry g2.\n \nThis tests the opposite relationship as ST_CONTAINS().\n \nST_WITHIN() uses object shapes, while WITHIN(), based on the\noriginal MySQL implementation, uses object bounding\nrectangles.\n \nExamples\n-------- \nSET @g1 = ST_GEOMFROMTEXT(\'POINT(174 149)\');\n \nSET @g2 = ST_GEOMFROMTEXT(\'POLYGON((175 150, 20 40, 50 60,\n125 100, 175 150))\');\n \nSELECT ST_WITHIN(@g1,@g2);\n+--------------------+\n| ST_WITHIN(@g1,@g2) |\n+--------------------+\n| 1 |\n+--------------------+\n \nSET @g1 = ST_GEOMFROMTEXT(\'POINT(176 151)\');\n \nSELECT ST_WITHIN(@g1,@g2);\n+--------------------+\n| ST_WITHIN(@g1,@g2) |\n+--------------------+\n| 0 |\n+--------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st-within/','','https://mariadb.com/kb/en/st-within/'),(468,'WITHIN',30,'Syntax\n------ \nWithin(g1,g2)\n \nDescription\n----------- \nReturns 1 or 0 to indicate whether g1 is spatially within\ng2.\nThis tests the opposite relationship as Contains().\n \nWITHIN() is based on the original MySQL implementation, and\nuses object bounding rectangles, while ST_WITHIN() uses\nobject shapes.\n \nExamples\n-------- \nSET @g1 = GEOMFROMTEXT(\'POINT(174 149)\');\nSET @g2 = GEOMFROMTEXT(\'POINT(176 151)\');\nSET @g3 = GEOMFROMTEXT(\'POLYGON((175 150, 20 40, 50 60, 125\n100, 175 150))\');\n \nSELECT within(@g1,@g3);\n+-----------------+\n| within(@g1,@g3) |\n+-----------------+\n| 1 |\n+-----------------+\n \nSELECT within(@g2,@g3);\n+-----------------+\n| within(@g2,@g3) |\n+-----------------+\n| 0 |\n+-----------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/within/','','https://mariadb.com/kb/en/within/'),(469,'ADDDATE',31,'Syntax\n------ \nADDDATE(date,INTERVAL expr unit), ADDDATE(expr,days)\n \nDescription\n----------- \nWhen invoked with the INTERVAL form of the second argument,\nADDDATE()\nis a synonym for DATE_ADD(). The related function\nSUBDATE() is a synonym for DATE_SUB(). For\ninformation on the INTERVAL unit argument, see the\ndiscussion for\nDATE_ADD().\n \nWhen invoked with the days form of the second argument,\nMariaDB treats it as an\ninteger number of days to be added to expr.\n \nExamples\n-------- \nSELECT DATE_ADD(\'2008-01-02\', INTERVAL 31 DAY);\n+-----------------------------------------+\n| DATE_ADD(\'2008-01-02\', INTERVAL 31 DAY) |\n+-----------------------------------------+\n| 2008-02-02 |\n+-----------------------------------------+\n \nSELECT ADDDATE(\'2008-01-02\', INTERVAL 31 DAY);\n+----------------------------------------+\n| ADDDATE(\'2008-01-02\', INTERVAL 31 DAY) |\n+----------------------------------------+\n| 2008-02-02 |\n+----------------------------------------+\n \nSELECT ADDDATE(\'2008-01-02\', 31);\n+---------------------------+\n| ADDDATE(\'2008-01-02\', 31) |\n+---------------------------+\n| 2008-02-02 |\n+---------------------------+\n \nCREATE TABLE t1 (d DATETIME);\nINSERT INTO t1 VALUES\n (\"2007-01-30 21:31:07\"),\n (\"1983-10-15 06:42:51\"),\n (\"2011-04-21 12:34:56\"),\n (\"2011-10-30 06:31:41\"),\n (\"2011-01-30 14:03:25\"),\n (\"2004-10-07 11:19:34\");\n \nSELECT d, ADDDATE(d, 10) from t1;\n \n+---------------------+---------------------+\n| d | ADDDATE(d, 10) |\n+---------------------+---------------------+\n| 2007-01-30 21:31:07 | 2007-02-09 21:31:07 |\n| 1983-10-15 06:42:51 | 1983-10-25 06:42:51 |\n| 2011-04-21 12:34:56 | 2011-05-01 12:34:56 |\n| 2011-10-30 06:31:41 | 2011-11-09 06:31:41 |\n| 2011-01-30 14:03:25 | 2011-02-09 14:03:25 |\n| 2004-10-07 11:19:34 | 2004-10-17 11:19:34 |\n+---------------------+---------------------+\n \nSELECT d, ADDDATE(d, INTERVAL 10 HOUR) from t1;\n \n+---------------------+------------------------------+\n| d | ADDDATE(d, INTERVAL 10 HOUR) |\n+---------------------+------------------------------+\n| 2007-01-30 21:31:07 | 2007-01-31 07:31:07 |\n| 1983-10-15 06:42:51 | 1983-10-15 16:42:51 |\n| 2011-04-21 12:34:56 | 2011-04-21 22:34:56 |\n| 2011-10-30 06:31:41 | 2011-10-30 16:31:41 |\n| 2011-01-30 14:03:25 | 2011-01-31 00:03:25 |\n| 2004-10-07 11:19:34 | 2004-10-07 21:19:34 |\n+---------------------+------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/adddate/','','https://mariadb.com/kb/en/adddate/'),(470,'ADDTIME',31,'Syntax\n------ \nADDTIME(expr1,expr2)\n \nDescription\n----------- \nADDTIME() adds expr2 to expr1 and returns the result. expr1\nis a time\nor datetime expression, and expr2 is a time expression.\n \nExamples\n-------- \nSELECT ADDTIME(\'2007-12-31 23:59:59.999999\', \'1\n1:1:1.000002\');\n+---------------------------------------------------------+\n| ADDTIME(\'2007-12-31 23:59:59.999999\', \'1\n1:1:1.000002\') |\n+---------------------------------------------------------+\n| 2008-01-02 01:01:01.000001 |\n+---------------------------------------------------------+\n \nSELECT ADDTIME(\'01:00:00.999999\', \'02:00:00.999998\');\n+-----------------------------------------------+\n| ADDTIME(\'01:00:00.999999\', \'02:00:00.999998\') |\n+-----------------------------------------------+\n| 03:00:01.999997 |\n+-----------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/addtime/','','https://mariadb.com/kb/en/addtime/'),(471,'CONVERT_TZ',31,'Syntax\n------ \nCONVERT_TZ(dt,from_tz,to_tz)\n \nDescription\n----------- \nCONVERT_TZ() converts a datetime value dt from the time zone\ngiven by from_tz to the time zone given by to_tz and returns\nthe resulting value.\n \nIn order to use named time zones, such as GMT, MET or\nAfrica/Johannesburg, the time_zone tables must be loaded\n(see mysql_tzinfo_to_sql).\n \nNo conversion will take place if the value falls outside of\nthe supported TIMESTAMP range (\'1970-01-01 00:00:01\' to\n\'2038-01-19 05:14:07\' UTC) when converted from from_tz to\nUTC.\n \nThis function returns NULL if the arguments are invalid (or\nnamed time zones have not been loaded).\n \nSee time zones for more information.\n \nExamples\n-------- \nSELECT CONVERT_TZ(\'2016-01-01\n12:00:00\',\'+00:00\',\'+10:00\');\n+-----------------------------------------------------+\n| CONVERT_TZ(\'2016-01-01 12:00:00\',\'+00:00\',\'+10:00\')\n|\n+-----------------------------------------------------+\n| 2016-01-01 22:00:00 |\n+-----------------------------------------------------+\n \nUsing named time zones (with the time zone tables loaded):\n \nSELECT CONVERT_TZ(\'2016-01-01\n12:00:00\',\'GMT\',\'Africa/Johannesburg\');\n+---------------------------------------------------------------+\n| CONVERT_TZ(\'2016-01-01\n12:00:00\',\'GMT\',\'Africa/Johannesburg\') |\n+---------------------------------------------------------------+\n| 2016-01-01 14:00:00 |\n+---------------------------------------------------------------+\n \nThe value is out of the TIMESTAMP range, so no conversion\ntakes place:\n \nSELECT CONVERT_TZ(\'1969-12-31\n22:00:00\',\'+00:00\',\'+10:00\');\n+-----------------------------------------------------+\n| CONVERT_TZ(\'1969-12-31 22:00:00\',\'+00:00\',\'+10:00\')\n|\n+-----------------------------------------------------+\n| 1969-12-31 22:00:00 |\n+-----------------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/convert_tz/','','https://mariadb.com/kb/en/convert_tz/'),(478,'DATEDIFF',31,'Syntax\n------ \nDATEDIFF(expr1,expr2)\n \nDescription\n----------- \nDATEDIFF() returns (expr1 – expr2) expressed\nas a value in days from one date to the other. expr1 and\nexpr2 are date\nor date-and-time expressions. Only the date parts of the\nvalues are used in the\ncalculation.\n \nExamples\n-------- \nSELECT DATEDIFF(\'2007-12-31 23:59:59\',\'2007-12-30\');\n+----------------------------------------------+\n| DATEDIFF(\'2007-12-31 23:59:59\',\'2007-12-30\') |\n+----------------------------------------------+\n| 1 |\n+----------------------------------------------+\n \nSELECT DATEDIFF(\'2010-11-30 23:59:59\',\'2010-12-31\');\n+----------------------------------------------+\n| DATEDIFF(\'2010-11-30 23:59:59\',\'2010-12-31\') |\n+----------------------------------------------+\n| -31 |\n+----------------------------------------------+\n \nCREATE TABLE t1 (d DATETIME);\nINSERT INTO t1 VALUES\n (\"2007-01-30 21:31:07\"),\n (\"1983-10-15 06:42:51\"),\n (\"2011-04-21 12:34:56\"),\n (\"2011-10-30 06:31:41\"),\n (\"2011-01-30 14:03:25\"),\n (\"2004-10-07 11:19:34\");\n \nSELECT NOW();\n+---------------------+\n| NOW() |\n+---------------------+\n| 2011-05-23 10:56:05 |\n+---------------------+\n \nSELECT d, DATEDIFF(NOW(),d) FROM t1;\n \n+---------------------+-------------------+\n| d | DATEDIFF(NOW(),d) |\n+---------------------+-------------------+\n| 2007-01-30 21:31:07 | 1574 |\n| 1983-10-15 06:42:51 | 10082 |\n| 2011-04-21 12:34:56 | 32 |\n| 2011-10-30 06:31:41 | -160 |\n| 2011-01-30 14:03:25 | 113 |\n| 2004-10-07 11:19:34 | 2419 |\n+---------------------+-------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/datediff/','','https://mariadb.com/kb/en/datediff/'),(479,'DATE_ADD',31,'Syntax\n------ \nDATE_ADD(date,INTERVAL expr unit)\n \nDescription\n----------- \nPerforms date arithmetic. The date argument specifies the\nstarting date or datetime value. expr is an expression\nspecifying the\ninterval value to be added or subtracted from the starting\ndate. expr is a\nstring; it may start with a \"-\" for negative intervals.\nunit is a\nkeyword indicating the units in which the expression should\nbe interpreted. See Date and Time Units for a complete list\nof permitted units. \n \nSee also DATE_SUB().\n \nExamples\n-------- \nSELECT \'2008-12-31 23:59:59\' + INTERVAL 1 SECOND;\n \n+-------------------------------------------+\n| \'2008-12-31 23:59:59\' + INTERVAL 1 SECOND |\n+-------------------------------------------+\n| 2009-01-01 00:00:00 |\n+-------------------------------------------+\n \nSELECT INTERVAL 1 DAY + \'2008-12-31\';\n \n+-------------------------------+\n| INTERVAL 1 DAY + \'2008-12-31\' |\n+-------------------------------+\n| 2009-01-01 |\n+-------------------------------+\n \nSELECT \'2005-01-01\' - INTERVAL 1 SECOND;\n \n+----------------------------------+\n| \'2005-01-01\' - INTERVAL 1 SECOND |\n+----------------------------------+\n| 2004-12-31 23:59:59 |\n+----------------------------------+\n \nSELECT DATE_ADD(\'2000-12-31 23:59:59\', INTERVAL 1 SECOND);\n+----------------------------------------------------+\n| DATE_ADD(\'2000-12-31 23:59:59\', INTERVAL 1 SECOND) |\n+----------------------------------------------------+\n| 2001-01-01 00:00:00 |\n+----------------------------------------------------+\n \nSELECT DATE_ADD(\'2010-12-31 23:59:59\', INTERVAL 1 DAY);\n+-------------------------------------------------+\n| DATE_ADD(\'2010-12-31 23:59:59\', INTERVAL 1 DAY) |\n+-------------------------------------------------+\n| 2011-01-01 23:59:59 |\n+-------------------------------------------------+\n \nSELECT DATE_ADD(\'2100-12-31 23:59:59\', INTERVAL \'1:1\'\nMINUTE_SECOND);\n+---------------------------------------------------------------+\n| DATE_ADD(\'2100-12-31 23:59:59\', INTERVAL \'1:1\'\nMINUTE_SECOND) |\n+---------------------------------------------------------------+\n| 2101-01-01 00:01:00 |\n+---------------------------------------------------------------+\n \nSELECT DATE_ADD(\'1900-01-01 00:00:00\', INTERVAL \'-1 10\'\nDAY_HOUR);\n+------------------------------------------------------------+\n| DATE_ADD(\'1900-01-01 00:00:00\', INTERVAL \'-1 10\'\nDAY_HOUR) |\n+------------------------------------------------------------+\n| 1899-12-30 14:00:00 |\n+------------------------------------------------------------+\n \nSELECT DATE_ADD(\'1992-12-31 23:59:59.000002\', INTERVAL\n\'1.999999\' SECOND_MICROSECOND);\n+--------------------------------------------------------------------------------+\n| DATE_ADD(\'1992-12-31 23:59:59.000002\', INTERVAL\n\'1.999999\' SECOND_MICROSECOND) |\n+--------------------------------------------------------------------------------+\n| 1993-01-01 00:00:01.000001 |\n+--------------------------------------------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/date_add/','','https://mariadb.com/kb/en/date_add/'),(480,'DATE_FORMAT',31,'Syntax\n------ \nDATE_FORMAT(date, format[, locale])\n \nDescription\n----------- \nFormats the date value according to the format string. \n \nThe language used for the names is controlled by the value\nof the lc_time_names system variable. See server locale for\nmore on the supported locales.\n \nThe options that can be used by DATE_FORMAT(), as well as\nits inverse STR_TO_DATE() and the FROM_UNIXTIME() function,\nare:\n \nOption | Description | \n \n%a | Short weekday name in current locale (Variable\nlc_time_names). | \n \n%b | Short form month name in current locale. For locale\nen_US this is one of:\nJan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov or Dec. | \n \n%c | Month with 1 or 2 digits. | \n \n%D | Day with English suffix \'th\', \'nd\', \'st\' or\n\'rd\'\'. (1st, 2nd, 3rd...). | \n \n%d | Day with 2 digits. | \n \n%e | Day with 1 or 2 digits. | \n \n%f | Sub seconds 6 digits. | \n \n%H | Hour with 2 digits between 00-23. | \n \n%h | Hour with 2 digits between 01-12. | \n \n%I | Hour with 2 digits between 01-12. | \n \n%i | Minute with 2 digits. | \n \n%j | Day of the year (001-366) | \n \n%k | Hour with 1 digits between 0-23. | \n \n%l | Hour with 1 digits between 1-12. | \n \n%M | Full month name in current locale (Variable\nlc_time_names). | \n \n%m | Month with 2 digits. | \n \n%p | AM/PM according to current locale (Variable\nlc_time_names). | \n \n%r | Time in 12 hour format, followed by AM/PM. Short for\n\'%I:%i:%S %p\'. | \n \n%S | Seconds with 2 digits. | \n \n%s | Seconds with 2 digits. | \n \n%T | Time in 24 hour format. Short for \'%H:%i:%S\'. | \n \n%U | Week number (00-53), when first day of the week is\nSunday. | \n \n%u | Week number (00-53), when first day of the week is\nMonday. | \n \n%V | Week number (01-53), when first day of the week is\nSunday. Used with %X. | \n \n%v | Week number (01-53), when first day of the week is\nMonday. Used with %x. | \n \n%W | Full weekday name in current locale (Variable\nlc_time_names). | \n \n%w | Day of the week. 0 = Sunday, 6 = Saturday. | \n \n%X | Year with 4 digits when first day of the week is\nSunday. Used with %V. | \n \n%x | Year with 4 digits when first day of the week is\nMonday. Used with %v. | \n \n%Y | Year with 4 digits. | \n \n%y | Year with 2 digits. | \n \n%# | For str_to_date(), skip all numbers. | \n \n%. | For str_to_date(), skip all punctation characters. | \n \n%@ | For str_to_date(), skip all alpha characters. | \n \n%% | A literal % character. | \n \nTo get a date in one of the standard formats, GET_FORMAT()\ncan be used.\n \nExamples\n-------- \nSELECT DATE_FORMAT(\'2009-10-04 22:23:00\', \'%W %M %Y\');\n+------------------------------------------------+\n| DATE_FORMAT(\'2009-10-04 22:23:00\', \'%W %M %Y\') |\n+------------------------------------------------+\n| Sunday October 2009 |\n+------------------------------------------------+\n \nSELECT DATE_FORMAT(\'2007-10-04 22:23:00\', \'%H:%i:%s\');\n+------------------------------------------------+\n| DATE_FORMAT(\'2007-10-04 22:23:00\', \'%H:%i:%s\') |\n+------------------------------------------------+\n| 22:23:00 |\n+------------------------------------------------+\n \nSELECT DATE_FORMAT(\'1900-10-04 22:23:00\', \'%D %y %a %d %m\n%b %j\');\n+------------------------------------------------------------+\n| DATE_FORMAT(\'1900-10-04 22:23:00\', \'%D %y %a %d %m %b\n%j\') |\n+------------------------------------------------------------+\n| 4th 00 Thu 04 10 Oct 277 |\n+------------------------------------------------------------+\n \nSELECT DATE_FORMAT(\'1997-10-04 22:23:00\', \'%H %k %I %r %T\n%S %w\');\n+------------------------------------------------------------+\n| DATE_FORMAT(\'1997-10-04 22:23:00\', \'%H %k %I %r %T %S\n%w\') |\n+------------------------------------------------------------+\n| 22 22 10 10:23:00 PM 22:23:00 00 6 |\n+------------------------------------------------------------+\n \nSELECT DATE_FORMAT(\'1999-01-01\', \'%X %V\');\n+------------------------------------+\n| DATE_FORMAT(\'1999-01-01\', \'%X %V\') |\n+------------------------------------+\n| 1998 52 |\n+------------------------------------+\n \nSELECT DATE_FORMAT(\'2006-06-00\', \'%d\');\n+---------------------------------+\n| DATE_FORMAT(\'2006-06-00\', \'%d\') |\n+---------------------------------+\n| 00 |\n+---------------------------------+\n \nOptionally, the locale can be explicitly specified as the\nthird DATE_FORMAT() argument. Doing so makes the function\nindependent from the session settings, and the three\nargument version of DATE_FORMAT() can be used in virtual\nindexed and persistent generated-columns:\n \nSELECT DATE_FORMAT(\'2006-01-01\', \'%W\', \'el_GR\');\n+------------------------------------------+\n| DATE_FORMAT(\'2006-01-01\', \'%W\', \'el_GR\') |\n+------------------------------------------+\n| ΚυÏιακή |\n+------------------------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/date_format/','','https://mariadb.com/kb/en/date_format/'),(481,'DATE_SUB',31,'Syntax\n------ \nDATE_SUB(date,INTERVAL expr unit)\n \nDescription\n----------- \nPerforms date arithmetic. The date argument specifies the\nstarting date or datetime value. expr is an expression\nspecifying the\ninterval value to be added or subtracted from the starting\ndate. expr is a\nstring; it may start with a \"-\" for negative intervals.\nunit is a\nkeyword indicating the units in which the expression should\nbe interpreted. See Date and Time Units for a complete list\nof permitted units. \n \nSee also DATE_ADD().\n \nExamples\n-------- \nSELECT DATE_SUB(\'1998-01-02\', INTERVAL 31 DAY);\n+-----------------------------------------+\n| DATE_SUB(\'1998-01-02\', INTERVAL 31 DAY) |\n+-----------------------------------------+\n| 1997-12-02 |\n+-----------------------------------------+\n \nSELECT DATE_SUB(\'2005-01-01 00:00:00\', INTERVAL \'1\n1:1:1\' DAY_SECOND);\n+----------------------------------------------------------------+\n| DATE_SUB(\'2005-01-01 00:00:00\', INTERVAL \'1 1:1:1\'\nDAY_SECOND) |\n+----------------------------------------------------------------+\n| 2004-12-30 22:58:59 |\n+----------------------------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/date_sub/','','https://mariadb.com/kb/en/date_sub/'),(483,'DAYNAME',31,'Syntax\n------ \nDAYNAME(date)\n \nDescription\n----------- \nReturns the name of the weekday for date. The language used\nfor the name is controlled by the value\nof the lc_time_names system variable. See server locale for\nmore on the supported locales.\n \nExamples\n-------- \nSELECT DAYNAME(\'2007-02-03\');\n+-----------------------+\n| DAYNAME(\'2007-02-03\') |\n+-----------------------+\n| Saturday |\n+-----------------------+\n \nCREATE TABLE t1 (d DATETIME);\nINSERT INTO t1 VALUES\n (\"2007-01-30 21:31:07\"),\n (\"1983-10-15 06:42:51\"),\n (\"2011-04-21 12:34:56\"),\n (\"2011-10-30 06:31:41\"),\n (\"2011-01-30 14:03:25\"),\n (\"2004-10-07 11:19:34\");\n \nSELECT d, DAYNAME(d) FROM t1;\n \n+---------------------+------------+\n| d | DAYNAME(d) |\n+---------------------+------------+\n| 2007-01-30 21:31:07 | Tuesday |\n| 1983-10-15 06:42:51 | Saturday |\n| 2011-04-21 12:34:56 | Thursday |\n| 2011-10-30 06:31:41 | Sunday |\n| 2011-01-30 14:03:25 | Sunday |\n| 2004-10-07 11:19:34 | Thursday |\n+---------------------+------------+\n \nChanging the locale:\n \nSET lc_time_names = \'fr_CA\';\n \nSELECT DAYNAME(\'2013-04-01\');\n+-----------------------+\n| DAYNAME(\'2013-04-01\') |\n+-----------------------+\n| lundi |\n+-----------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/dayname/','','https://mariadb.com/kb/en/dayname/'),(484,'DAYOFMONTH',31,'Syntax\n------ \nDAYOFMONTH(date)\n \nDescription\n----------- \nReturns the day of the month for date, in the range 1 to 31,\nor 0\nfor dates such as \'0000-00-00\' or \'2008-00-00\' which\nhave a zero day\npart.\n \nDAY() is a synonym.\n \nExamples\n-------- \nSELECT DAYOFMONTH(\'2007-02-03\');\n+--------------------------+\n| DAYOFMONTH(\'2007-02-03\') |\n+--------------------------+\n| 3 |\n+--------------------------+\n \nCREATE TABLE t1 (d DATETIME);\nINSERT INTO t1 VALUES\n (\"2007-01-30 21:31:07\"),\n (\"1983-10-15 06:42:51\"),\n (\"2011-04-21 12:34:56\"),\n (\"2011-10-30 06:31:41\"),\n (\"2011-01-30 14:03:25\"),\n (\"2004-10-07 11:19:34\");\n \nSELECT d FROM t1 where DAYOFMONTH(d) = 30;\n \n+---------------------+\n| d |\n+---------------------+\n| 2007-01-30 21:31:07 |\n| 2011-10-30 06:31:41 |\n| 2011-01-30 14:03:25 |\n+---------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/dayofmonth/','','https://mariadb.com/kb/en/dayofmonth/'),(485,'DAYOFWEEK',31,'Syntax\n------ \nDAYOFWEEK(date)\n \nDescription\n----------- \nReturns the day of the week index for the date (1 = Sunday,\n2 = Monday, ..., 7 =\nSaturday). These index values correspond to the ODBC\nstandard.\n \nThis contrasts with WEEKDAY() which follows a different\nindex numbering\n(0 = Monday, 1 = Tuesday, ... 6 = Sunday).\n \nExamples\n-------- \nSELECT DAYOFWEEK(\'2007-02-03\');\n+-------------------------+\n| DAYOFWEEK(\'2007-02-03\') |\n+-------------------------+\n| 7 |\n+-------------------------+\n \nCREATE TABLE t1 (d DATETIME);\nINSERT INTO t1 VALUES\n (\"2007-01-30 21:31:07\"),\n (\"1983-10-15 06:42:51\"),\n (\"2011-04-21 12:34:56\"),\n (\"2011-10-30 06:31:41\"),\n (\"2011-01-30 14:03:25\"),\n (\"2004-10-07 11:19:34\");\n \nSELECT d, DAYNAME(d), DAYOFWEEK(d), WEEKDAY(d) from t1;\n \n+---------------------+------------+--------------+------------+\n| d | DAYNAME(d) | DAYOFWEEK(d) | WEEKDAY(d) |\n+---------------------+------------+--------------+------------+\n| 2007-01-30 21:31:07 | Tuesday | 3 | 1 |\n| 1983-10-15 06:42:51 | Saturday | 7 | 5 |\n| 2011-04-21 12:34:56 | Thursday | 5 | 3 |\n| 2011-10-30 06:31:41 | Sunday | 1 | 6 |\n| 2011-01-30 14:03:25 | Sunday | 1 | 6 |\n| 2004-10-07 11:19:34 | Thursday | 5 | 3 |\n+---------------------+------------+--------------+------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/dayofweek/','','https://mariadb.com/kb/en/dayofweek/'),(487,'EXTRACT',31,'Syntax\n------ \nEXTRACT(unit FROM date)\n \nDescription\n----------- \nThe EXTRACT() function extracts the required unit from the\ndate. See Date and Time Units for a complete list of\npermitted units.\n \nIn MariaDB 10.0.7 and MariaDB 5.5.35, EXTRACT (HOUR FROM\n...) was changed to return a value from 0 to 23, adhering to\nthe SQL standard. Until MariaDB 10.0.6 and MariaDB 5.5.34,\nand in all versions of MySQL at least as of MySQL 5.7, it\ncould return a value > 23. HOUR() is not a standard\nfunction, so continues to adhere to the old behaviour\ninherited from MySQL.\n \nExamples\n-------- \nSELECT EXTRACT(YEAR FROM \'2009-07-02\');\n+---------------------------------+\n| EXTRACT(YEAR FROM \'2009-07-02\') |\n+---------------------------------+\n| 2009 |\n+---------------------------------+\n \nSELECT EXTRACT(YEAR_MONTH FROM \'2009-07-02 01:02:03\');\n+------------------------------------------------+\n| EXTRACT(YEAR_MONTH FROM \'2009-07-02 01:02:03\') |\n+------------------------------------------------+\n| 200907 |\n+------------------------------------------------+\n \nSELECT EXTRACT(DAY_MINUTE FROM \'2009-07-02 01:02:03\');\n+------------------------------------------------+\n| EXTRACT(DAY_MINUTE FROM \'2009-07-02 01:02:03\') |\n+------------------------------------------------+\n| 20102 |\n+------------------------------------------------+\n \nSELECT EXTRACT(MICROSECOND FROM \'2003-01-02\n10:30:00.000123\');\n+--------------------------------------------------------+\n| EXTRACT(MICROSECOND FROM \'2003-01-02 10:30:00.000123\') |\n+--------------------------------------------------------+\n| 123 |\n+--------------------------------------------------------+\n \nFrom MariaDB 10.0.7 and MariaDB 5.5.35, EXTRACT (HOUR\nFROM...) returns a value from 0 to 23, as per the SQL\nstandard. HOUR is not a standard function, so continues to\nadhere to the old behaviour inherited from MySQL.\n \nSELECT EXTRACT(HOUR FROM \'26:30:00\'), HOUR(\'26:30:00\');\n+-------------------------------+------------------+\n| EXTRACT(HOUR FROM \'26:30:00\') | HOUR(\'26:30:00\') |\n+-------------------------------+------------------+\n| 2 | 26 |\n+-------------------------------+------------------+\n \n\n\nURL: https://mariadb.com/kb/en/extract/','','https://mariadb.com/kb/en/extract/'),(489,'FROM_UNIXTIME',31,'Syntax\n------ \nFROM_UNIXTIME(unix_timestamp),\nFROM_UNIXTIME(unix_timestamp,format)\n \nDescription\n----------- \nReturns a representation of the unix_timestamp argument as a\nvalue in\n\'YYYY-MM-DD HH:MM:SS\' or YYYYMMDDHHMMSS.uuuuuu format,\ndepending on\nwhether the function is used in a string or numeric context.\nThe value\nis expressed in the current time zone. unix_timestamp is an\ninternal\ntimestamp value such as is produced by the UNIX_TIMESTAMP()\nfunction.\n \nIf format is given, the result is formatted according to the\nformat\nstring, which is used the same way as listed in the entry\nfor the\nDATE_FORMAT() function.\n \nTimestamps in MariaDB have a maximum value of 2147483647,\nequivalent to 2038-01-19 05:14:07. This is due to the\nunderlying 32-bit limitation. Using the function on a\ntimestamp beyond this will result in NULL being returned.\nUse DATETIME as a storage type if you require dates beyond\nthis.\n \nThe options that can be used by FROM_UNIXTIME(), as well as\nDATE_FORMAT() and STR_TO_DATE(), are:\n \nOption | Description | \n \n%a | Short weekday name in current locale (Variable\nlc_time_names). | \n \n%b | Short form month name in current locale. For locale\nen_US this is one of:\nJan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov or Dec. | \n \n%c | Month with 1 or 2 digits. | \n \n%D | Day with English suffix \'th\', \'nd\', \'st\' or\n\'rd\'\'. (1st, 2nd, 3rd...). | \n \n%d | Day with 2 digits. | \n \n%e | Day with 1 or 2 digits. | \n \n%f | Sub seconds 6 digits. | \n \n%H | Hour with 2 digits between 00-23. | \n \n%h | Hour with 2 digits between 01-12. | \n \n%I | Hour with 2 digits between 01-12. | \n \n%i | Minute with 2 digits. | \n \n%j | Day of the year (001-366) | \n \n%k | Hour with 1 digits between 0-23. | \n \n%l | Hour with 1 digits between 1-12. | \n \n%M | Full month name in current locale (Variable\nlc_time_names). | \n \n%m | Month with 2 digits. | \n \n%p | AM/PM according to current locale (Variable\nlc_time_names). | \n \n%r | Time in 12 hour format, followed by AM/PM. Short for\n\'%I:%i:%S %p\'. | \n \n%S | Seconds with 2 digits. | \n \n%s | Seconds with 2 digits. | \n \n%T | Time in 24 hour format. Short for \'%H:%i:%S\'. | \n \n%U | Week number (00-53), when first day of the week is\nSunday. | \n \n%u | Week number (00-53), when first day of the week is\nMonday. | \n \n%V | Week number (01-53), when first day of the week is\nSunday. Used with %X. | \n \n%v | Week number (01-53), when first day of the week is\nMonday. Used with %x. | \n \n%W | Full weekday name in current locale (Variable\nlc_time_names). | \n \n%w | Day of the week. 0 = Sunday, 1 = Saturday. | \n \n%X | Year with 4 digits when first day of the week is\nSunday. Used with %V. | \n \n%x | Year with 4 digits when first day of the week is\nSunday. Used with %v. | \n \n%Y | Year with 4 digits. | \n \n%y | Year with 2 digits. | \n \n%# | For str_to_date(), skip all numbers. | \n \n%. | For str_to_date(), skip all punctation characters. | \n \n%@ | For str_to_date(), skip all alpha characters. | \n \n%% | A literal % character. | \n \nPerformance Considerations\n \nIf your session time zone is set to SYSTEM (the default),\nFROM_UNIXTIME() will call the OS function to convert the\ndata using the system time zone. At least on Linux, the\ncorresponding function (localtime_r) uses a global mutex\ninside glibc that can cause contention under high concurrent\nload.\n \nSet your time zone to a named time zone to avoid this issue.\nSee mysql time zone tables for details on how to do this.\n \nExamples\n-------- \nSELECT FROM_UNIXTIME(1196440219);\n+---------------------------+\n| FROM_UNIXTIME(1196440219) |\n+---------------------------+\n| 2007-11-30 11:30:19 |\n+---------------------------+\n \nSELECT FROM_UNIXTIME(1196440219) + 0;\n \n+-------------------------------+\n| FROM_UNIXTIME(1196440219) + 0 |\n+-------------------------------+\n| 20071130113019.000000 |\n+-------------------------------+\n \nSELECT FROM_UNIXTIME(UNIX_TIMESTAMP(), \'%Y %D %M %h:%i:%s\n%x\');\n+---------------------------------------------------------+\n| FROM_UNIXTIME(UNIX_TIMESTAMP(), \'%Y %D %M %h:%i:%s %x\')\n|\n+---------------------------------------------------------+\n| 2010 27th March 01:03:47 2010 |\n+---------------------------------------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/from_unixtime/','','https://mariadb.com/kb/en/from_unixtime/'),(490,'GET_FORMAT',31,'Syntax\n------ \nGET_FORMAT({DATE|DATETIME|TIME},\n{\'EUR\'|\'USA\'|\'JIS\'|\'ISO\'|\'INTERNAL\'})\n \nDescription\n----------- \nReturns a format string. This function is useful in\ncombination with\nthe DATE_FORMAT() and the STR_TO_DATE() functions.\n \nPossible result formats are:\n \nFunction Call | Result Format | \n \nGET_FORMAT(DATE,\'EUR\') | \'%d.%m.%Y\' | \n \nGET_FORMAT(DATE,\'USA\') | \'%m.%d.%Y\' | \n \nGET_FORMAT(DATE,\'JIS\') | \'%Y-%m-%d\' | \n \nGET_FORMAT(DATE,\'ISO\') | \'%Y-%m-%d\' | \n \nGET_FORMAT(DATE,\'INTERNAL\') | \'%Y%m%d\' | \n \nGET_FORMAT(DATETIME,\'EUR\') | \'%Y-%m-%d %H.%i.%s\' | \n \nGET_FORMAT(DATETIME,\'USA\') | \'%Y-%m-%d %H.%i.%s\' | \n \nGET_FORMAT(DATETIME,\'JIS\') | \'%Y-%m-%d %H:%i:%s\' | \n \nGET_FORMAT(DATETIME,\'ISO\') | \'%Y-%m-%d %H:%i:%s\' | \n \nGET_FORMAT(DATETIME,\'INTERNAL\') | \'%Y%m%d%H%i%s\' | \n \nGET_FORMAT(TIME,\'EUR\') | \'%H.%i.%s\' | \n \nGET_FORMAT(TIME,\'USA\') | \'%h:%i:%s %p\' | \n \nGET_FORMAT(TIME,\'JIS\') | \'%H:%i:%s\' | \n \nGET_FORMAT(TIME,\'ISO\') | \'%H:%i:%s\' | \n \nGET_FORMAT(TIME,\'INTERNAL\') | \'%H%i%s\' | \n \nExamples\n-------- \nObtaining the string matching to the standard European date\nformat:\n \nSELECT GET_FORMAT(DATE, \'EUR\');\n+-------------------------+\n| GET_FORMAT(DATE, \'EUR\') |\n+-------------------------+\n| %d.%m.%Y |\n+-------------------------+\n \nUsing the same string to format a date:\n \nSELECT DATE_FORMAT(\'2003-10-03\',GET_FORMAT(DATE,\'EUR\'));\n+--------------------------------------------------+\n| DATE_FORMAT(\'2003-10-03\',GET_FORMAT(DATE,\'EUR\')) |\n+--------------------------------------------------+\n| 03.10.2003 |\n+--------------------------------------------------+\n \nSELECT STR_TO_DATE(\'10.31.2003\',GET_FORMAT(DATE,\'USA\'));\n+--------------------------------------------------+\n| STR_TO_DATE(\'10.31.2003\',GET_FORMAT(DATE,\'USA\')) |\n+--------------------------------------------------+\n| 2003-10-31 |\n+--------------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/get_format/','','https://mariadb.com/kb/en/get_format/'),(491,'HOUR',31,'Syntax\n------ \nHOUR(time)\n \nDescription\n----------- \nReturns the hour for time. The range of the return value is\n0 to 23\nfor time-of-day values. However, the range of TIME values\nactually is\nmuch larger, so HOUR can return values greater than 23.\n \nThe return value is always positive, even if a negative TIME\nvalue is provided.\n \nExamples\n-------- \nSELECT HOUR(\'10:05:03\');\n+------------------+\n| HOUR(\'10:05:03\') |\n+------------------+\n| 10 |\n+------------------+\n \nSELECT HOUR(\'272:59:59\');\n+-------------------+\n| HOUR(\'272:59:59\') |\n+-------------------+\n| 272 |\n+-------------------+\n \nDifference between EXTRACT (HOUR FROM ...) (>= MariaDB\n10.0.7 and MariaDB 5.5.35) and HOUR:\n \nSELECT EXTRACT(HOUR FROM \'26:30:00\'), HOUR(\'26:30:00\');\n+-------------------------------+------------------+\n| EXTRACT(HOUR FROM \'26:30:00\') | HOUR(\'26:30:00\') |\n+-------------------------------+------------------+\n| 2 | 26 |\n+-------------------------------+------------------+\n \n\n\nURL: https://mariadb.com/kb/en/hour/','','https://mariadb.com/kb/en/hour/'),(492,'LAST_DAY',31,'Syntax\n------ \nLAST_DAY(date)\n \nDescription\n----------- \nTakes a date or datetime value and returns the corresponding\nvalue for\nthe last day of the month. Returns NULL if the argument is\ninvalid.\n \nExamples\n-------- \nSELECT LAST_DAY(\'2003-02-05\');\n+------------------------+\n| LAST_DAY(\'2003-02-05\') |\n+------------------------+\n| 2003-02-28 |\n+------------------------+\n \nSELECT LAST_DAY(\'2004-02-05\');\n+------------------------+\n| LAST_DAY(\'2004-02-05\') |\n+------------------------+\n| 2004-02-29 |\n+------------------------+\n \nSELECT LAST_DAY(\'2004-01-01 01:01:01\');\n+---------------------------------+\n| LAST_DAY(\'2004-01-01 01:01:01\') |\n+---------------------------------+\n| 2004-01-31 |\n+---------------------------------+\n \nSELECT LAST_DAY(\'2003-03-32\');\n+------------------------+\n| LAST_DAY(\'2003-03-32\') |\n+------------------------+\n| NULL |\n+------------------------+\n1 row in set, 1 warning (0.00 sec)\n \nWarning (Code 1292): Incorrect datetime value:\n\'2003-03-32\'\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/last_day/','','https://mariadb.com/kb/en/last_day/'),(495,'MAKEDATE',31,'Syntax\n------ \nMAKEDATE(year,dayofyear)\n \nDescription\n----------- \nReturns a date, given year and day-of-year values. dayofyear\nmust be\ngreater than 0 or the result is NULL.\n \nExamples\n-------- \nSELECT MAKEDATE(2011,31), MAKEDATE(2011,32);\n+-------------------+-------------------+\n| MAKEDATE(2011,31) | MAKEDATE(2011,32) |\n+-------------------+-------------------+\n| 2011-01-31 | 2011-02-01 |\n+-------------------+-------------------+\n \nSELECT MAKEDATE(2011,365), MAKEDATE(2014,365);\n+--------------------+--------------------+\n| MAKEDATE(2011,365) | MAKEDATE(2014,365) |\n+--------------------+--------------------+\n| 2011-12-31 | 2014-12-31 |\n+--------------------+--------------------+\n \nSELECT MAKEDATE(2011,0);\n+------------------+\n| MAKEDATE(2011,0) |\n+------------------+\n| NULL |\n+------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/makedate/','','https://mariadb.com/kb/en/makedate/'),(496,'MAKETIME',31,'Syntax\n------ \nMAKETIME(hour,minute,second)\n \nDescription\n----------- \nReturns a time value calculated from the hour, minute, and\nsecond arguments.\n \nIf minute or second are out of the range 0 to 60, NULL is\nreturned. The hour can be in the range -838 to 838, outside\nof which the value is truncated with a warning.\n \nExamples\n-------- \nSELECT MAKETIME(13,57,33);\n+--------------------+\n| MAKETIME(13,57,33) |\n+--------------------+\n| 13:57:33 |\n+--------------------+\n \nSELECT MAKETIME(-13,57,33);\n+---------------------+\n| MAKETIME(-13,57,33) |\n+---------------------+\n| -13:57:33 |\n+---------------------+\n \nSELECT MAKETIME(13,67,33);\n+--------------------+\n| MAKETIME(13,67,33) |\n+--------------------+\n| NULL |\n+--------------------+\n \nSELECT MAKETIME(-1000,57,33);\n+-----------------------+\n| MAKETIME(-1000,57,33) |\n+-----------------------+\n| -838:59:59 |\n+-----------------------+\n1 row in set, 1 warning (0.00 sec)\n \nSHOW WARNINGS;\n \n+---------+------+-----------------------------------------------+\n| Level | Code | Message |\n+---------+------+-----------------------------------------------+\n| Warning | 1292 | Truncated incorrect time value:\n\'-1000:57:33\' |\n+---------+------+-----------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/maketime/','','https://mariadb.com/kb/en/maketime/'),(497,'MICROSECOND',31,'Syntax\n------ \nMICROSECOND(expr)\n \nDescription\n----------- \nReturns the microseconds from the time or datetime\nexpression expr as a number in the range from 0 to 999999.\n \nIf expr is a time with no microseconds, zero is returned,\nwhile if expr is a date with no time, zero with a warning is\nreturned.\n \nExamples\n-------- \nSELECT MICROSECOND(\'12:00:00.123456\');\n+--------------------------------+\n| MICROSECOND(\'12:00:00.123456\') |\n+--------------------------------+\n| 123456 |\n+--------------------------------+\n \nSELECT MICROSECOND(\'2009-12-31 23:59:59.000010\');\n+-------------------------------------------+\n| MICROSECOND(\'2009-12-31 23:59:59.000010\') |\n+-------------------------------------------+\n| 10 |\n+-------------------------------------------+\n \nSELECT MICROSECOND(\'2013-08-07 12:13:14\');\n+------------------------------------+\n| MICROSECOND(\'2013-08-07 12:13:14\') |\n+------------------------------------+\n| 0 |\n+------------------------------------+\n \nSELECT MICROSECOND(\'2013-08-07\');\n+---------------------------+\n| MICROSECOND(\'2013-08-07\') |\n+---------------------------+\n| 0 |\n+---------------------------+\n1 row in set, 1 warning (0.00 sec)\n \nSHOW WARNINGS;\n \n+---------+------+----------------------------------------------+\n| Level | Code | Message |\n+---------+------+----------------------------------------------+\n| Warning | 1292 | Truncated incorrect time value:\n\'2013-08-07\' |\n+---------+------+----------------------------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/microsecond/','','https://mariadb.com/kb/en/microsecond/'),(501,'NOW',31,'Syntax\n------ \nNOW([precision])\nCURRENT_TIMESTAMP\nCURRENT_TIMESTAMP([precision])\nLOCALTIME, LOCALTIME([precision])\nLOCALTIMESTAMP\nLOCALTIMESTAMP([precision])\n \nDescription\n----------- \nReturns the current date and time as a value in \'YYYY-MM-DD\nHH:MM:SS\'\nor YYYYMMDDHHMMSS.uuuuuu format, depending on whether the\nfunction is\nused in a string or numeric context. The value is expressed\nin the\ncurrent time zone.\n \nThe optional precision determines the microsecond precision.\nSee Microseconds in MariaDB.\n \nNOW() (or its synonyms) can be used as the default value for\nTIMESTAMP columns as well as, since MariaDB 10.0.1, DATETIME\ncolumns. Before MariaDB 10.0.1, it was only possible for a\nsingle TIMESTAMP column per table to contain the\nCURRENT_TIMESTAMP as its default.\n \nWhen displayed in the INFORMATION_SCHEMA.COLUMNS table, a\ndefault CURRENT TIMESTAMP is displayed as CURRENT_TIMESTAMP\nup until MariaDB 10.2.2, and as current_timestamp() from\nMariaDB 10.2.3, due to to MariaDB 10.2 accepting expressions\nin the DEFAULT clause.\n \nExamples\n-------- \nSELECT NOW();\n+---------------------+\n| NOW() |\n+---------------------+\n| 2010-03-27 13:13:25 |\n+---------------------+\n \nSELECT NOW() + 0;\n \n+-----------------------+\n| NOW() + 0 |\n+-----------------------+\n| 20100327131329.000000 |\n+-----------------------+\n \nWith precision:\n \nSELECT CURRENT_TIMESTAMP(2);\n+------------------------+\n| CURRENT_TIMESTAMP(2) |\n+------------------------+\n| 2018-07-10 09:47:26.24 |\n+------------------------+\n \nUsed as a default TIMESTAMP:\n \nCREATE TABLE t (createdTS TIMESTAMP NOT NULL DEFAULT\nCURRENT_TIMESTAMP);\n \nFrom MariaDB 10.2.2:\n \nSELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE\nTABLE_SCHEMA=\'test\'\n AND COLUMN_NAME LIKE \'%ts%\'\\G\n*************************** 1. row\n***************************\n TABLE_CATALOG: def\n TABLE_SCHEMA: test\n TABLE_NAME: t\n COLUMN_NAME: ts\n ORDINAL_POSITION: 1\n COLUMN_DEFAULT: current_timestamp()\n...\n \n\n\nURL: https://mariadb.com/kb/en/now/','','https://mariadb.com/kb/en/now/'),(502,'PERIOD_ADD',31,'Syntax\n------ \nPERIOD_ADD(P,N)\n \nDescription\n----------- \nAdds N months to period P. P is in the format YYMM or\nYYYYMM, and is not a date value. If P contains a two-digit\nyear, values from 00 to 69 are converted to from 2000 to\n2069, while values from 70 are converted to 1970 upwards.\n \nReturns a value in the format YYYYMM.\n \nExamples\n-------- \nSELECT PERIOD_ADD(200801,2);\n+----------------------+\n| PERIOD_ADD(200801,2) |\n+----------------------+\n| 200803 |\n+----------------------+\n \nSELECT PERIOD_ADD(6910,2);\n+--------------------+\n| PERIOD_ADD(6910,2) |\n+--------------------+\n| 206912 |\n+--------------------+\n \nSELECT PERIOD_ADD(7010,2);\n+--------------------+\n| PERIOD_ADD(7010,2) |\n+--------------------+\n| 197012 |\n+--------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/period_add/','','https://mariadb.com/kb/en/period_add/'),(503,'PERIOD_DIFF',31,'Syntax\n------ \nPERIOD_DIFF(P1,P2)\n \nDescription\n----------- \nReturns the number of months between periods P1 and P2. P1\nand P2 \ncan be in the format YYMM or YYYYMM, and are not date\nvalues.\n \nIf P1 or P2 contains a two-digit year, values from 00 to 69\nare converted to from 2000 to 2069, while values from 70 are\nconverted to 1970 upwards.\n \nExamples\n-------- \nSELECT PERIOD_DIFF(200802,200703);\n+----------------------------+\n| PERIOD_DIFF(200802,200703) |\n+----------------------------+\n| 11 |\n+----------------------------+\n \nSELECT PERIOD_DIFF(6902,6803);\n+------------------------+\n| PERIOD_DIFF(6902,6803) |\n+------------------------+\n| 11 |\n+------------------------+\n \nSELECT PERIOD_DIFF(7002,6803);\n+------------------------+\n| PERIOD_DIFF(7002,6803) |\n+------------------------+\n| -1177 |\n+------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/period_diff/','','https://mariadb.com/kb/en/period_diff/'),(506,'SEC_TO_TIME',31,'Syntax\n------ \nSEC_TO_TIME(seconds)\n \nDescription\n----------- \nReturns the seconds argument, converted to hours, minutes,\nand\nseconds, as a TIME value. The range of the result is\nconstrained to\nthat of the TIME data type. A warning occurs if the argument\ncorresponds to a value outside that range.\n \nThe time will be returned in the format hh:mm:ss, or hhmmss\nif used in a numeric calculation.\n \nExamples\n-------- \nSELECT SEC_TO_TIME(12414);\n+--------------------+\n| SEC_TO_TIME(12414) |\n+--------------------+\n| 03:26:54 |\n+--------------------+\n \nSELECT SEC_TO_TIME(12414)+0;\n \n+----------------------+\n| SEC_TO_TIME(12414)+0 |\n+----------------------+\n| 32654 |\n+----------------------+\n \nSELECT SEC_TO_TIME(9999999);\n+----------------------+\n| SEC_TO_TIME(9999999) |\n+----------------------+\n| 838:59:59 |\n+----------------------+\n1 row in set, 1 warning (0.00 sec)\n \nSHOW WARNINGS;\n \n+---------+------+-------------------------------------------+\n| Level | Code | Message |\n+---------+------+-------------------------------------------+\n| Warning | 1292 | Truncated incorrect time value:\n\'9999999\' |\n+---------+------+-------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/sec_to_time/','','https://mariadb.com/kb/en/sec_to_time/'),(507,'STR_TO_DATE',31,'Syntax\n------ \nSTR_TO_DATE(str,format)\n \nDescription\n----------- \nThis is the inverse of the DATE_FORMAT() function. It takes\na string str and a format string format. STR_TO_DATE()\nreturns a\nDATETIME value if the format string contains both date and\ntime parts, or a\nDATE or TIME value if the string contains only date or time\nparts.\n \nThe date, time, or datetime values contained in str should\nbe given in the format indicated by format. If str contains\nan illegal date, time, or datetime value, STR_TO_DATE()\nreturns NULL. An illegal value also produces a warning.\n \nThe options that can be used by STR_TO_DATE(), as well as\nits inverse DATE_FORMAT() and the FROM_UNIXTIME() function,\nare:\n \nOption | Description | \n \n%a | Short weekday name in current locale (Variable\nlc_time_names). | \n \n%b | Short form month name in current locale. For locale\nen_US this is one of:\nJan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov or Dec. | \n \n%c | Month with 1 or 2 digits. | \n \n%D | Day with English suffix \'th\', \'nd\', \'st\' or\n\'rd\'\'. (1st, 2nd, 3rd...). | \n \n%d | Day with 2 digits. | \n \n%e | Day with 1 or 2 digits. | \n \n%f | Sub seconds 6 digits. | \n \n%H | Hour with 2 digits between 00-23. | \n \n%h | Hour with 2 digits between 01-12. | \n \n%I | Hour with 2 digits between 01-12. | \n \n%i | Minute with 2 digits. | \n \n%j | Day of the year (001-366) | \n \n%k | Hour with 1 digits between 0-23. | \n \n%l | Hour with 1 digits between 1-12. | \n \n%M | Full month name in current locale (Variable\nlc_time_names). | \n \n%m | Month with 2 digits. | \n \n%p | AM/PM according to current locale (Variable\nlc_time_names). | \n \n%r | Time in 12 hour format, followed by AM/PM. Short for\n\'%I:%i:%S %p\'. | \n \n%S | Seconds with 2 digits. | \n \n%s | Seconds with 2 digits. | \n \n%T | Time in 24 hour format. Short for \'%H:%i:%S\'. | \n \n%U | Week number (00-53), when first day of the week is\nSunday. | \n \n%u | Week number (00-53), when first day of the week is\nMonday. | \n \n%V | Week number (01-53), when first day of the week is\nSunday. Used with %X. | \n \n%v | Week number (01-53), when first day of the week is\nMonday. Used with %x. | \n \n%W | Full weekday name in current locale (Variable\nlc_time_names). | \n \n%w | Day of the week. 0 = Sunday, 6 = Saturday. | \n \n%X | Year with 4 digits when first day of the week is\nSunday. Used with %V. | \n \n%x | Year with 4 digits when first day of the week is\nMonday. Used with %v. | \n \n%Y | Year with 4 digits. | \n \n%y | Year with 2 digits. | \n \n%# | For str_to_date(), skip all numbers. | \n \n%. | For str_to_date(), skip all punctation characters. | \n \n%@ | For str_to_date(), skip all alpha characters. | \n \n%% | A literal % character. | \n \nExamples\n-------- \nSELECT STR_TO_DATE(\'Wednesday, June 2, 2014\', \'%W, %M %e,\n%Y\');\n+---------------------------------------------------------+\n| STR_TO_DATE(\'Wednesday, June 2, 2014\', \'%W, %M %e,\n%Y\') |\n+---------------------------------------------------------+\n| 2014-06-02 |\n+---------------------------------------------------------+\n \nSELECT STR_TO_DATE(\'Wednesday23423, June 2, 2014\', \'%W,\n%M %e, %Y\');\n+--------------------------------------------------------------+\n| STR_TO_DATE(\'Wednesday23423, June 2, 2014\', \'%W, %M %e,\n%Y\') |\n+--------------------------------------------------------------+\n| NULL |\n+--------------------------------------------------------------+\n1 row in set, 1 warning (0.00 sec)\n \nSHOW WARNINGS;\n \n+---------+------+-----------------------------------------------------------------------------------+\n| Level | Code | Message |\n+---------+------+-----------------------------------------------------------------------------------+\n| Warning | 1411 | Incorrect datetime value:\n\'Wednesday23423, June 2, 2014\' for function str_to_date |\n+---------+------+-----------------------------------------------------------------------------------+\n \nSELECT STR_TO_DATE(\'Wednesday23423, June 2, 2014\', \'%W%#,\n%M %e, %Y\');\n+----------------------------------------------------------------+\n| STR_TO_DATE(\'Wednesday23423, June 2, 2014\', \'%W%#, %M\n%e, %Y\') |\n+----------------------------------------------------------------+\n| 2014-06-02 |\n+----------------------------------------------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/str_to_date/','','https://mariadb.com/kb/en/str_to_date/'),(508,'SUBDATE',31,'Syntax\n------ \nSUBDATE(date,INTERVAL expr unit), SUBDATE(expr,days)\n \nDescription\n----------- \nWhen invoked with the INTERVAL form of the second argument,\nSUBDATE()\nis a synonym for DATE_SUB(). See Date and Time Units for a\ncomplete list of permitted units. \n \nThe second form allows the use of an integer value for days.\nIn such\ncases, it is interpreted as the number of days to be\nsubtracted from\nthe date or datetime expression expr.\n \nExamples\n-------- \nSELECT DATE_SUB(\'2008-01-02\', INTERVAL 31 DAY);\n+-----------------------------------------+\n| DATE_SUB(\'2008-01-02\', INTERVAL 31 DAY) |\n+-----------------------------------------+\n| 2007-12-02 |\n+-----------------------------------------+\n \nSELECT SUBDATE(\'2008-01-02\', INTERVAL 31 DAY);\n+----------------------------------------+\n| SUBDATE(\'2008-01-02\', INTERVAL 31 DAY) |\n+----------------------------------------+\n| 2007-12-02 |\n+----------------------------------------+\n \nSELECT SUBDATE(\'2008-01-02 12:00:00\', 31);\n+------------------------------------+\n| SUBDATE(\'2008-01-02 12:00:00\', 31) |\n+------------------------------------+\n| 2007-12-02 12:00:00 |\n+------------------------------------+\n \nCREATE TABLE t1 (d DATETIME);\nINSERT INTO t1 VALUES\n (\"2007-01-30 21:31:07\"),\n (\"1983-10-15 06:42:51\"),\n (\"2011-04-21 12:34:56\"),\n (\"2011-10-30 06:31:41\"),\n (\"2011-01-30 14:03:25\"),\n (\"2004-10-07 11:19:34\");\n \nSELECT d, SUBDATE(d, 10) from t1;\n \n+---------------------+---------------------+\n| d | SUBDATE(d, 10) |\n+---------------------+---------------------+\n| 2007-01-30 21:31:07 | 2007-01-20 21:31:07 |\n| 1983-10-15 06:42:51 | 1983-10-05 06:42:51 |\n| 2011-04-21 12:34:56 | 2011-04-11 12:34:56 |\n| 2011-10-30 06:31:41 | 2011-10-20 06:31:41 |\n| 2011-01-30 14:03:25 | 2011-01-20 14:03:25 |\n| 2004-10-07 11:19:34 | 2004-09-27 11:19:34 |\n+---------------------+---------------------+\n \nSELECT d, SUBDATE(d, INTERVAL 10 MINUTE) from t1;\n \n+---------------------+--------------------------------+\n| d | SUBDATE(d, INTERVAL 10 MINUTE) |\n+---------------------+--------------------------------+\n| 2007-01-30 21:31:07 | 2007-01-30 21:21:07 |\n| 1983-10-15 06:42:51 | 1983-10-15 06:32:51 |\n| 2011-04-21 12:34:56 | 2011-04-21 12:24:56 |\n| 2011-10-30 06:31:41 | 2011-10-30 06:21:41 |\n| 2011-01-30 14:03:25 | 2011-01-30 13:53:25 |\n| 2004-10-07 11:19:34 | 2004-10-07 11:09:34 |\n+---------------------+--------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/subdate/','','https://mariadb.com/kb/en/subdate/'),(509,'SUBTIME',31,'Syntax\n------ \nSUBTIME(expr1,expr2)\n \nDescription\n----------- \nSUBTIME() returns expr1 - expr2 expressed as a value in the\nsame\nformat as expr1. expr1 is a time or datetime expression, and\nexpr2 is\na time expression.\n \nExamples\n-------- \nSELECT SUBTIME(\'2007-12-31 23:59:59.999999\',\'1\n1:1:1.000002\');\n+--------------------------------------------------------+\n| SUBTIME(\'2007-12-31 23:59:59.999999\',\'1 1:1:1.000002\')\n|\n+--------------------------------------------------------+\n| 2007-12-30 22:58:58.999997 |\n+--------------------------------------------------------+\n \nSELECT SUBTIME(\'01:00:00.999999\', \'02:00:00.999998\');\n+-----------------------------------------------+\n| SUBTIME(\'01:00:00.999999\', \'02:00:00.999998\') |\n+-----------------------------------------------+\n| -00:59:59.999999 |\n+-----------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/subtime/','','https://mariadb.com/kb/en/subtime/'),(510,'SYSDATE',31,'Syntax\n------ \nSYSDATE([precision])\n \nDescription\n----------- \nReturns the current date and time as a value in \'YYYY-MM-DD\nHH:MM:SS\'\nor YYYYMMDDHHMMSS.uuuuuu format, depending on whether the\nfunction is\nused in a string or numeric context.\n \nThe optional precision determines the microsecond precision.\nSee Microseconds in MariaDB.\n \nSYSDATE() returns the time at which it executes. This\ndiffers from the\nbehavior for NOW(), which returns a constant time that\nindicates the\ntime at which the statement began to execute. (Within a\nstored routine\nor trigger, NOW() returns the time at which the routine or\ntriggering\nstatement began to execute.)\n \nIn addition, changing the timestamp system variable with a\nSET timestamp statement affects the value returned by\nNOW() but not by SYSDATE(). This means that timestamp\nsettings in the\nbinary log have no effect on invocations of SYSDATE().\n \nBecause SYSDATE() can return different values even within\nthe same\nstatement, and is not affected by SET TIMESTAMP, it is\nnon-deterministic and therefore unsafe for replication if\nstatement-based binary logging is used. If that is a\nproblem, you can\nuse row-based logging, or start the server with the mysqld\noption --sysdate-is-now to cause SYSDATE() to be an alias\nfor NOW(). The non-deterministic nature of SYSDATE() also\nmeans that indexes cannot be used for evaluating expressions\nthat refer to it, and that statements using the SYSDATE()\nfunction are unsafe for statement-based replication.\n \nExamples\n-------- \nDifference between NOW() and SYSDATE():\n \nSELECT NOW(), SLEEP(2), NOW();\n+---------------------+----------+---------------------+\n| NOW() | SLEEP(2) | NOW() |\n+---------------------+----------+---------------------+\n| 2010-03-27 13:23:40 | 0 | 2010-03-27 13:23:40 |\n+---------------------+----------+---------------------+\n \nSELECT SYSDATE(), SLEEP(2), SYSDATE();\n+---------------------+----------+---------------------+\n| SYSDATE() | SLEEP(2) | SYSDATE() |\n+---------------------+----------+---------------------+\n| 2010-03-27 13:23:52 | 0 | 2010-03-27 13:23:54 |\n+---------------------+----------+---------------------+\n \nWith precision:\n \nSELECT SYSDATE(4);\n+--------------------------+\n| SYSDATE(4) |\n+--------------------------+\n| 2018-07-10 10:17:13.1689 |\n+--------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/sysdate/','','https://mariadb.com/kb/en/sysdate/'),(512,'TIMEDIFF',31,'Syntax\n------ \nTIMEDIFF(expr1,expr2)\n \nDescription\n----------- \nTIMEDIFF() returns expr1 - expr2 expressed as a time value.\nexpr1 and\nexpr2 are time or date-and-time expressions, but both must\nbe of the\nsame type.\n \nExamples\n-------- \nSELECT TIMEDIFF(\'2000:01:01 00:00:00\', \'2000:01:01\n00:00:00.000001\');\n+---------------------------------------------------------------+\n| TIMEDIFF(\'2000:01:01 00:00:00\', \'2000:01:01\n00:00:00.000001\') |\n+---------------------------------------------------------------+\n| -00:00:00.000001 |\n+---------------------------------------------------------------+\n \nSELECT TIMEDIFF(\'2008-12-31 23:59:59.000001\', \'2008-12-30\n01:01:01.000002\');\n+----------------------------------------------------------------------+\n| TIMEDIFF(\'2008-12-31 23:59:59.000001\', \'2008-12-30\n01:01:01.000002\') |\n+----------------------------------------------------------------------+\n| 46:58:57.999999 |\n+----------------------------------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/timediff/','','https://mariadb.com/kb/en/timediff/'),(513,'TIMESTAMP FUNCTION',31,'Syntax\n------ \nTIMESTAMP(expr), TIMESTAMP(expr1,expr2)\n \nDescription\n----------- \nWith a single argument, this function returns the date or\ndatetime\nexpression expr as a datetime value. With two arguments, it\nadds the\ntime expression expr2 to the date or datetime expression\nexpr1 and\nreturns the result as a datetime value.\n \nExamples\n-------- \nSELECT TIMESTAMP(\'2003-12-31\');\n+-------------------------+\n| TIMESTAMP(\'2003-12-31\') |\n+-------------------------+\n| 2003-12-31 00:00:00 |\n+-------------------------+\n \nSELECT TIMESTAMP(\'2003-12-31 12:00:00\',\'6:30:00\');\n+--------------------------------------------+\n| TIMESTAMP(\'2003-12-31 12:00:00\',\'6:30:00\') |\n+--------------------------------------------+\n| 2003-12-31 18:30:00 |\n+--------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/timestamp-function/','','https://mariadb.com/kb/en/timestamp-function/'),(514,'TIMESTAMPADD',31,'Syntax\n------ \nTIMESTAMPADD(unit,interval,datetime_expr)\n \nDescription\n----------- \nAdds the integer expression interval to the date or datetime\nexpression datetime_expr. The unit for interval is given by\nthe unit\nargument, which should be one of the following values:\nMICROSECOND, SECOND, MINUTE, HOUR, DAY, WEEK, MONTH,\nQUARTER, or YEAR.\n \nThe unit value may be specified using one of keywords as\nshown, or\nwith a prefix of SQL_TSI_. For example, DAY and SQL_TSI_DAY\nboth are\nlegal.\n \nBefore MariaDB 5.5, FRAC_SECOND was permitted as a synonym\nfor MICROSECOND.\n \nExamples\n-------- \nSELECT TIMESTAMPADD(MINUTE,1,\'2003-01-02\');\n+-------------------------------------+\n| TIMESTAMPADD(MINUTE,1,\'2003-01-02\') |\n+-------------------------------------+\n| 2003-01-02 00:01:00 |\n+-------------------------------------+\n \nSELECT TIMESTAMPADD(WEEK,1,\'2003-01-02\');\n+-----------------------------------+\n| TIMESTAMPADD(WEEK,1,\'2003-01-02\') |\n+-----------------------------------+\n| 2003-01-09 |\n+-----------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/timestampadd/','','https://mariadb.com/kb/en/timestampadd/'),(515,'TIMESTAMPDIFF',31,'Syntax\n------ \nTIMESTAMPDIFF(unit,datetime_expr1,datetime_expr2)\n \nDescription\n----------- \nReturns datetime_expr2 - datetime_expr1, where\ndatetime_expr1 and\ndatetime_expr2 are date or datetime expressions. One\nexpression may be\na date and the other a datetime; a date value is treated as\na datetime\nhaving the time part \'00:00:00\' where necessary. The unit\nfor the\nresult (an integer) is given by the unit argument. The legal\nvalues\nfor unit are the same as those listed in the description of\nthe\nTIMESTAMPADD() function, i.e MICROSECOND, SECOND, MINUTE,\nHOUR, DAY, WEEK, MONTH, QUARTER, or YEAR.\n \nTIMESTAMPDIFF can also be used to calculate age.\n \nExamples\n-------- \nSELECT TIMESTAMPDIFF(MONTH,\'2003-02-01\',\'2003-05-01\');\n+------------------------------------------------+\n| TIMESTAMPDIFF(MONTH,\'2003-02-01\',\'2003-05-01\') |\n+------------------------------------------------+\n| 3 |\n+------------------------------------------------+\n \nSELECT TIMESTAMPDIFF(YEAR,\'2002-05-01\',\'2001-01-01\');\n+-----------------------------------------------+\n| TIMESTAMPDIFF(YEAR,\'2002-05-01\',\'2001-01-01\') |\n+-----------------------------------------------+\n| -1 |\n+-----------------------------------------------+\n \nSELECT TIMESTAMPDIFF(MINUTE,\'2003-02-01\',\'2003-05-01\n12:05:55\');\n+----------------------------------------------------------+\n| TIMESTAMPDIFF(MINUTE,\'2003-02-01\',\'2003-05-01\n12:05:55\') |\n+----------------------------------------------------------+\n| 128885 |\n+----------------------------------------------------------+\n \nCalculating age:\n \nSELECT CURDATE();\n+------------+\n| CURDATE() |\n+------------+\n| 2019-05-27 |\n+------------+\n \nSELECT TIMESTAMPDIFF(YEAR, \'1971-06-06\', CURDATE()) AS\nage;\n \n+------+\n| age |\n+------+\n| 47 |\n+------+\n \nSELECT TIMESTAMPDIFF(YEAR, \'1971-05-06\', CURDATE()) AS\nage;\n \n+------+\n| age |\n+------+\n| 48 |\n+------+\n \nAge as of 2014-08-02:\n \nSELECT name, date_of_birth,\nTIMESTAMPDIFF(YEAR,date_of_birth,\'2014-08-02\') AS age \n FROM student_details;\n \n+---------+---------------+------+\n| name | date_of_birth | age |\n+---------+---------------+------+\n| Chun | 1993-12-31 | 20 |\n| Esben | 1946-01-01 | 68 |\n| Kaolin | 1996-07-16 | 18 |\n| Tatiana | 1988-04-13 | 26 |\n+---------+---------------+------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/timestampdiff/','','https://mariadb.com/kb/en/timestampdiff/'),(518,'TO_DAYS',31,'Syntax\n------ \nTO_DAYS(date)\n \nDescription\n----------- \nGiven a date date, returns the number of days since the\nstart of the current calendar (0000-00-00).\n \nThe function is not designed for use with dates before the\nadvent of the Gregorian calendar in October 1582. Results\nwill not be reliable since it doesn\'t account for the lost\ndays when the calendar changed from the Julian calendar.\n \nThis is the converse of the FROM_DAYS() function.\n \nExamples\n-------- \nSELECT TO_DAYS(\'2007-10-07\');\n+-----------------------+\n| TO_DAYS(\'2007-10-07\') |\n+-----------------------+\n| 733321 |\n+-----------------------+\n \nSELECT TO_DAYS(\'0000-01-01\');\n+-----------------------+\n| TO_DAYS(\'0000-01-01\') |\n+-----------------------+\n| 1 |\n+-----------------------+\n \nSELECT TO_DAYS(950501);\n+-----------------+\n| TO_DAYS(950501) |\n+-----------------+\n| 728779 |\n+-----------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/to_days/','','https://mariadb.com/kb/en/to_days/'),(519,'TO_SECONDS',31,'Syntax\n------ \nTO_SECONDS(expr)\n \nDescription\n----------- \nReturns the number of seconds from year 0 till expr, or NULL\nif expr is not a valid date or datetime.\n \nExamples\n-------- \nSELECT TO_SECONDS(\'2013-06-13\');\n+--------------------------+\n| TO_SECONDS(\'2013-06-13\') |\n+--------------------------+\n| 63538300800 |\n+--------------------------+\n \nSELECT TO_SECONDS(\'2013-06-13 21:45:13\');\n+-----------------------------------+\n| TO_SECONDS(\'2013-06-13 21:45:13\') |\n+-----------------------------------+\n| 63538379113 |\n+-----------------------------------+\n \nSELECT TO_SECONDS(NOW());\n+-------------------+\n| TO_SECONDS(NOW()) |\n+-------------------+\n| 63543530875 |\n+-------------------+\n \nSELECT TO_SECONDS(20130513);\n+----------------------+\n| TO_SECONDS(20130513) |\n+----------------------+\n| 63535622400 |\n+----------------------+\n1 row in set (0.00 sec)\n \nSELECT TO_SECONDS(130513);\n+--------------------+\n| TO_SECONDS(130513) |\n+--------------------+\n| 63535622400 |\n+--------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/to_seconds/','','https://mariadb.com/kb/en/to_seconds/'),(520,'UNIX_TIMESTAMP',31,'Syntax\n------ \nUNIX_TIMESTAMP()\nUNIX_TIMESTAMP(date)\n \nDescription\n----------- \nIf called with no argument, returns a Unix timestamp\n(seconds since\n\'1970-01-01 00:00:00\' UTC) as an unsigned integer. If\nUNIX_TIMESTAMP()\nis called with a date argument, it returns the value of the\nargument as seconds\nsince \'1970-01-01 00:00:00\' UTC. date may be a DATE\nstring, a\nDATETIME string, a TIMESTAMP, or a number in\nthe format YYMMDD or YYYYMMDD. The server interprets date as\na value in the\ncurrent time zone and converts it to an internal value in\nUTC. Clients can set\ntheir time zone as described in time zones.\n \nThe inverse function of UNIX_TIMESTAMP() is FROM_UNIXTIME()\n \nUNIX_TIMESTAMP() supports microseconds.\n \nTimestamps in MariaDB have a maximum value of 2147483647,\nequivalent to 2038-01-19 05:14:07. This is due to the\nunderlying 32-bit limitation. Using the function on a date\nbeyond this will result in NULL being returned. Use DATETIME\nas a storage type if you require dates beyond this.\n \nError Handling\n \nReturns NULL for wrong arguments to UNIX_TIMESTAMP(). In\nMySQL and MariaDB before 5.3 wrong arguments to\nUNIX_TIMESTAMP() returned 0. \n \nCompatibility\n \nAs you can see in the examples above,\nUNIX_TIMESTAMP(constant-date-string) returns a timestamp\nwith 6 decimals while MariaDB 5.2 and before returns it\nwithout decimals. This can cause a problem if you are using\nUNIX_TIMESTAMP() as a partitioning function. You can fix\nthis by using FLOOR(UNIX_TIMESTAMP(..)) or changing the date\nstring to a date number, like 20080101000000. \n \nExamples\n-------- \nSELECT UNIX_TIMESTAMP();\n+------------------+\n| UNIX_TIMESTAMP() |\n+------------------+\n| 1269711082 |\n+------------------+\n \nSELECT UNIX_TIMESTAMP(\'2007-11-30 10:30:19\');\n+---------------------------------------+\n| UNIX_TIMESTAMP(\'2007-11-30 10:30:19\') |\n+---------------------------------------+\n| 1196436619.000000 |\n+---------------------------------------+\n \nSELECT UNIX_TIMESTAMP(\"2007-11-30 10:30:19.123456\");\n+----------------------------------------------+\n| unix_timestamp(\"2007-11-30 10:30:19.123456\") |\n+----------------------------------------------+\n| 1196411419.123456 |\n+----------------------------------------------+\n \nSELECT FROM_UNIXTIME(UNIX_TIMESTAMP(\'2007-11-30\n10:30:19\'));\n+------------------------------------------------------+\n| FROM_UNIXTIME(UNIX_TIMESTAMP(\'2007-11-30 10:30:19\')) |\n+------------------------------------------------------+\n| 2007-11-30 10:30:19.000000 |\n+------------------------------------------------------+\n \nSELECT FROM_UNIXTIME(FLOOR(UNIX_TIMESTAMP(\'2007-11-30\n10:30:19\')));\n+-------------------------------------------------------------+\n| FROM_UNIXTIME(FLOOR(UNIX_TIMESTAMP(\'2007-11-30\n10:30:19\'))) |\n+-------------------------------------------------------------+\n| 2007-11-30 10:30:19 |\n+-------------------------------------------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/unix_timestamp/','','https://mariadb.com/kb/en/unix_timestamp/'),(523,'UTC_TIMESTAMP',31,'Syntax\n------ \nUTC_TIMESTAMP\nUTC_TIMESTAMP([precision])\n \nDescription\n----------- \nReturns the current UTC date and time as a value in\n\'YYYY-MM-DD\nHH:MM:SS\' or YYYYMMDDHHMMSS.uuuuuu format, depending on\nwhether the\nfunction is used in a string or numeric context.\n \nThe optional precision determines the microsecond precision.\nSee Microseconds in MariaDB.\n \nExamples\n-------- \nSELECT UTC_TIMESTAMP(), UTC_TIMESTAMP() + 0;\n \n+---------------------+-----------------------+\n| UTC_TIMESTAMP() | UTC_TIMESTAMP() + 0 |\n+---------------------+-----------------------+\n| 2010-03-27 17:33:16 | 20100327173316.000000 |\n+---------------------+-----------------------+\n \nWith precision:\n \nSELECT UTC_TIMESTAMP(4);\n+--------------------------+\n| UTC_TIMESTAMP(4) |\n+--------------------------+\n| 2018-07-10 07:51:09.1019 |\n+--------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/utc_timestamp/','','https://mariadb.com/kb/en/utc_timestamp/'),(524,'WEEK',31,'Syntax\n------ \nWEEK(date[,mode])\n \nDescription\n----------- \nThis function returns the week number for date. The\ntwo-argument form of\nWEEK() allows you to specify whether the week starts on\nSunday or Monday\nand whether the return value should be in the range from 0\nto 53 or from 1 to\n53. If the mode argument is omitted, the value of the\ndefault_week_format system variable is used.\n \nModes\n \nMode | 1st day of week | Range | Week 1 is the 1st week with\n| \n \n0 | Sunday | 0-53 | a Sunday in this year | \n \n1 | Monday | 0-53 | more than 3 days this year | \n \n2 | Sunday | 1-53 | a Sunday in this year | \n \n3 | Monday | 1-53 | more than 3 days this year | \n \n4 | Sunday | 0-53 | more than 3 days this year | \n \n5 | Monday | 0-53 | a Monday in this year | \n \n6 | Sunday | 1-53 | more than 3 days this year | \n \n7 | Monday | 1-53 | a Monday in this year | \n \nExamples\n-------- \nSELECT WEEK(\'2008-02-20\');\n+--------------------+\n| WEEK(\'2008-02-20\') |\n+--------------------+\n| 7 |\n+--------------------+\n \nSELECT WEEK(\'2008-02-20\',0);\n+----------------------+\n| WEEK(\'2008-02-20\',0) |\n+----------------------+\n| 7 |\n+----------------------+\n \nSELECT WEEK(\'2008-02-20\',1);\n+----------------------+\n| WEEK(\'2008-02-20\',1) |\n+----------------------+\n| 8 |\n+----------------------+\n \nSELECT WEEK(\'2008-12-31\',0);\n+----------------------+\n| WEEK(\'2008-12-31\',0) |\n+----------------------+\n| 52 |\n+----------------------+\n \nSELECT WEEK(\'2008-12-31\',1);\n+----------------------+\n| WEEK(\'2008-12-31\',1) |\n+----------------------+\n| 53 |\n+----------------------+\n \nCREATE TABLE t1 (d DATETIME);\nINSERT INTO t1 VALUES\n (\"2007-01-30 21:31:07\"),\n (\"1983-10-15 06:42:51\"),\n (\"2011-04-21 12:34:56\"),\n (\"2011-10-30 06:31:41\"),\n (\"2011-01-30 14:03:25\"),\n (\"2004-10-07 11:19:34\");\n \nSELECT d, WEEK(d,0), WEEK(d,1) from t1;\n \n+---------------------+-----------+-----------+\n| d | WEEK(d,0) | WEEK(d,1) |\n+---------------------+-----------+-----------+\n| 2007-01-30 21:31:07 | 4 | 5 |\n| 1983-10-15 06:42:51 | 41 | 41 |\n| 2011-04-21 12:34:56 | 16 | 16 |\n| 2011-10-30 06:31:41 | 44 | 43 |\n| 2011-01-30 14:03:25 | 5 | 4 |\n| 2004-10-07 11:19:34 | 40 | 41 |\n+---------------------+-----------+-----------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/week/','','https://mariadb.com/kb/en/week/'),(525,'WEEKDAY',31,'Syntax\n------ \nWEEKDAY(date)\n \nDescription\n----------- \nReturns the weekday index for date \n(0 = Monday, 1 = Tuesday, ... 6 = Sunday).\n \nThis contrasts with DAYOFWEEK() which follows the ODBC\nstandard\n(1 = Sunday, 2 = Monday, ..., 7 = Saturday).\n \nExamples\n-------- \nSELECT WEEKDAY(\'2008-02-03 22:23:00\');\n+--------------------------------+\n| WEEKDAY(\'2008-02-03 22:23:00\') |\n+--------------------------------+\n| 6 |\n+--------------------------------+\n \nSELECT WEEKDAY(\'2007-11-06\');\n+-----------------------+\n| WEEKDAY(\'2007-11-06\') |\n+-----------------------+\n| 1 |\n+-----------------------+\n \nCREATE TABLE t1 (d DATETIME);\nINSERT INTO t1 VALUES\n (\"2007-01-30 21:31:07\"),\n (\"1983-10-15 06:42:51\"),\n (\"2011-04-21 12:34:56\"),\n (\"2011-10-30 06:31:41\"),\n (\"2011-01-30 14:03:25\"),\n (\"2004-10-07 11:19:34\");\n \nSELECT d FROM t1 where WEEKDAY(d) = 6;\n \n+---------------------+\n| d |\n+---------------------+\n| 2011-10-30 06:31:41 |\n| 2011-01-30 14:03:25 |\n+---------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/weekday/','','https://mariadb.com/kb/en/weekday/'),(526,'WEEKOFYEAR',31,'Syntax\n------ \nWEEKOFYEAR(date)\n \nDescription\n----------- \nReturns the calendar week of the date as a number in the\nrange from 1\nto 53. WEEKOFYEAR() is a compatibility function that is\nequivalent to\nWEEK(date,3).\n \nExamples\n-------- \nSELECT WEEKOFYEAR(\'2008-02-20\');\n+--------------------------+\n| WEEKOFYEAR(\'2008-02-20\') |\n+--------------------------+\n| 8 |\n+--------------------------+\n \nCREATE TABLE t1 (d DATETIME);\nINSERT INTO t1 VALUES\n (\"2007-01-30 21:31:07\"),\n (\"1983-10-15 06:42:51\"),\n (\"2011-04-21 12:34:56\"),\n (\"2011-10-30 06:31:41\"),\n (\"2011-01-30 14:03:25\"),\n (\"2004-10-07 11:19:34\");\n \n select * from t1;\n \n+---------------------+\n| d |\n+---------------------+\n| 2007-01-30 21:31:07 |\n| 1983-10-15 06:42:51 |\n| 2011-04-21 12:34:56 |\n| 2011-10-30 06:31:41 |\n| 2011-01-30 14:03:25 |\n| 2004-10-07 11:19:34 |\n+---------------------+\n \nSELECT d, WEEKOFYEAR(d), WEEK(d,3) from t1;\n \n+---------------------+---------------+-----------+\n| d | WEEKOFYEAR(d) | WEEK(d,3) |\n+---------------------+---------------+-----------+\n| 2007-01-30 21:31:07 | 5 | 5 |\n| 1983-10-15 06:42:51 | 41 | 41 |\n| 2011-04-21 12:34:56 | 16 | 16 |\n| 2011-10-30 06:31:41 | 43 | 43 |\n| 2011-01-30 14:03:25 | 4 | 4 |\n| 2004-10-07 11:19:34 | 41 | 41 |\n+---------------------+---------------+-----------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/weekofyear/','','https://mariadb.com/kb/en/weekofyear/'),(527,'YEAR',31,'Syntax\n------ \nYEAR(date)\n \nDescription\n----------- \nReturns the year for the given date, in the range 1000 to\n9999, or 0 for the\n\"zero\" date.\n \nExamples\n-------- \nCREATE TABLE t1 (d DATETIME);\nINSERT INTO t1 VALUES\n (\"2007-01-30 21:31:07\"),\n (\"1983-10-15 06:42:51\"),\n (\"2011-04-21 12:34:56\"),\n (\"2011-10-30 06:31:41\"),\n (\"2011-01-30 14:03:25\"),\n (\"2004-10-07 11:19:34\");\n \nSELECT * FROM t1;\n \n+---------------------+\n| d |\n+---------------------+\n| 2007-01-30 21:31:07 |\n| 1983-10-15 06:42:51 |\n| 2011-04-21 12:34:56 |\n| 2011-10-30 06:31:41 |\n| 2011-01-30 14:03:25 |\n| 2004-10-07 11:19:34 |\n+---------------------+\n \nSELECT * FROM t1 WHERE YEAR(d) = 2011;\n \n+---------------------+\n| d |\n+---------------------+\n| 2011-04-21 12:34:56 |\n| 2011-10-30 06:31:41 |\n| 2011-01-30 14:03:25 |\n+---------------------+\n \nSELECT YEAR(\'1987-01-01\');\n+--------------------+\n| YEAR(\'1987-01-01\') |\n+--------------------+\n| 1987 |\n+--------------------+\n \n\n\nURL: https://mariadb.com/kb/en/year/','','https://mariadb.com/kb/en/year/'),(528,'YEARWEEK',31,'Syntax\n------ \nYEARWEEK(date), YEARWEEK(date,mode)\n \nDescription\n----------- \nReturns year and week for a date. The mode argument works\nexactly like the mode\nargument to WEEK(). The year in the result may be different\nfrom the\nyear in the date argument for the first and the last week of\nthe year.\n \nExamples\n-------- \nSELECT YEARWEEK(\'1987-01-01\');\n+------------------------+\n| YEARWEEK(\'1987-01-01\') |\n+------------------------+\n| 198652 |\n+------------------------+\n \nCREATE TABLE t1 (d DATETIME);\nINSERT INTO t1 VALUES\n (\"2007-01-30 21:31:07\"),\n (\"1983-10-15 06:42:51\"),\n (\"2011-04-21 12:34:56\"),\n (\"2011-10-30 06:31:41\"),\n (\"2011-01-30 14:03:25\"),\n (\"2004-10-07 11:19:34\");\n \nSELECT * FROM t1;\n \n+---------------------+\n| d |\n+---------------------+\n| 2007-01-30 21:31:07 |\n| 1983-10-15 06:42:51 |\n| 2011-04-21 12:34:56 |\n| 2011-10-30 06:31:41 |\n| 2011-01-30 14:03:25 |\n| 2004-10-07 11:19:34 |\n+---------------------+\n6 rows in set (0.02 sec)\n \nSELECT YEARWEEK(d) FROM t1 WHERE YEAR(d) = 2011;\n \n+-------------+\n| YEARWEEK(d) |\n+-------------+\n| 201116 |\n| 201144 |\n| 201105 |\n+-------------+\n3 rows in set (0.03 sec)\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/yearweek/','','https://mariadb.com/kb/en/yearweek/'),(529,'Well-Known Binary (WKB) Format',32,'WKB stands for Well-Known Binary, a format for representing\ngeographical and geometrical data.\n \nWKB uses 1-byte unsigned integers, 4-byte unsigned integers,\nand 8-byte double-precision numbers.\nThe first byte indicates the byte order. 00 for big endian,\nor 01 for little endian.\nThe next 4 bytes indicate the geometry type. Values from 1\nto 7 indicate whether the type is Point, LineString,\nPolygon, MultiPoint, MultiLineString, MultiPolygon, or\nGeometryCollection respectively. \nThe 8-byte floats represent the co-ordinates.\n \nTake the following example, a sequence of 21 bytes each\nrepresented by two hex digits:\n \n000000000140000000000000004010000000000000\nIt\'s big endian\n000000000140000000000000004010000000000000\n \nIt\'s a POINT\n000000000140000000000000004010000000000000\n \nThe X co-ordinate is 2.0\n000000000140000000000000004010000000000000\n \nThe Y-co-ordinate is 4.0\n000000000140000000000000004010000000000000\n \n\n \n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/well-known-binary-wkb-format/','','https://mariadb.com/kb/en/well-known-binary-wkb-format/'),(534,'MPolyFromWKB',32,'Syntax\n------ \nMPolyFromWKB(wkb[,srid])\nMultiPolygonFromWKB(wkb[,srid])\n \nDescription\n----------- \nConstructs a MULTIPOLYGON value using its WKB representation\nand SRID.\n \nMPolyFromWKB() and MultiPolygonFromWKB() are synonyms.\n \nExamples\n-------- \nSET @g = ST_AsBinary(MPointFromText(\'MULTIPOLYGON(((28\n26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52\n18)),((59 18,67 18,67 13,59 13,59 18)))\'));\n \nSELECT ST_AsText(MPolyFromWKB(@g));\n+---------------------------------------------------------------------------------------------------------------+\n| ST_AsText(MPolyFromWKB(@g)) |\n+---------------------------------------------------------------------------------------------------------------+\n| MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66\n23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18))) |\n+---------------------------------------------------------------------------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/mpolyfromwkb/','','https://mariadb.com/kb/en/mpolyfromwkb/'),(549,'ST_GeomCollFromWKB',32,'Syntax\n------ \nST_GeomCollFromWKB(wkb[,srid])\nST_GeometryCollectionFromWKB(wkb[,srid])\nGeomCollFromWKB(wkb[,srid])\nGeometryCollectionFromWKB(wkb[,srid])\n \nDescription\n----------- \nConstructs a GEOMETRYCOLLECTION value using its WKB\nrepresentation and SRID.\n \nST_GeomCollFromWKB(), ST_GeometryCollectionFromWKB(),\nGeomCollFromWKB() and GeometryCollectionFromWKB() are\nsynonyms.\n \nExamples\n-------- \nSET @g =\nST_AsBinary(ST_GeomFromText(\'GEOMETRYCOLLECTION(POLYGON((5\n5,10 5,10 10,5 5)),POINT(10 10))\'));\n \nSELECT ST_AsText(ST_GeomCollFromWKB(@g));\n+----------------------------------------------------------------+\n| ST_AsText(ST_GeomCollFromWKB(@g)) |\n+----------------------------------------------------------------+\n| GEOMETRYCOLLECTION(POLYGON((5 5,10 5,10 10,5 5)),POINT(10\n10)) |\n+----------------------------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_geomcollfromwkb/','','https://mariadb.com/kb/en/st_geomcollfromwkb/'),(569,'ST_BOUNDARY',36,'The ST_BOUNDARY function was introduced in MariaDB 10.1.2\n \nSyntax\n------ \nST_BOUNDARY(g)\nBOUNDARY(g)\n \nDescription\n----------- \nReturns a geometry that is the closure of the combinatorial\nboundary of the geometry value g.\n \nBOUNDARY() is a synonym.\n \nExamples\n-------- \nSELECT ST_AsText(ST_Boundary(ST_GeomFromText(\'LINESTRING(3\n3,0 0, -3 3)\')));\n+----------------------------------------------------------------------+\n| ST_AsText(ST_Boundary(ST_GeomFromText(\'LINESTRING(3 3,0\n0, -3 3)\'))) |\n+----------------------------------------------------------------------+\n| MULTIPOINT(3 3,-3 3) |\n+----------------------------------------------------------------------+\n \nSELECT ST_AsText(ST_Boundary(ST_GeomFromText(\'POLYGON((3\n3,0 0, -3 3, 3 3))\')));\n+--------------------------------------------------------------------------+\n| ST_AsText(ST_Boundary(ST_GeomFromText(\'POLYGON((3 3,0 0,\n-3 3, 3 3))\'))) |\n+--------------------------------------------------------------------------+\n| LINESTRING(3 3,0 0,-3 3,3 3) |\n+--------------------------------------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_boundary/','','https://mariadb.com/kb/en/st_boundary/'),(571,'ST_ENVELOPE',36,'Syntax\n------ \nST_ENVELOPE(g)\nENVELOPE(g)\n \nDescription\n----------- \nReturns the Minimum Bounding Rectangle (MBR) for the\ngeometry value g. The result is returned as a Polygon value.\n \nThe polygon is defined by the corner points of the bounding\nbox:\n \nPOLYGON((MINX MINY, MAXX MINY, MAXX MAXY, MINX MAXY, MINX\nMINY))\n \nST_ENVELOPE() and ENVELOPE() are synonyms.\n \nExamples\n-------- \nSELECT AsText(ST_ENVELOPE(GeomFromText(\'LineString(1 1,4\n4)\')));\n+----------------------------------------------------------+\n| AsText(ST_ENVELOPE(GeomFromText(\'LineString(1 1,4 4)\')))\n|\n+----------------------------------------------------------+\n| POLYGON((1 1,4 1,4 4,1 4,1 1)) |\n+----------------------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_envelope/','','https://mariadb.com/kb/en/st_envelope/'),(574,'ST_ISCLOSED',36,'Syntax\n------ \nST_IsClosed(g)\nIsClosed(g)\n \nDescription\n----------- \nReturns 1 if a given LINESTRING\'s start and end points are\nthe same, or 0 if they are not the same. Before MariaDB\n10.1.5, returns NULL if not given a LINESTRING. After\nMariaDB 10.1.5, returns -1.\n \nST_IsClosed() and IsClosed() are synonyms.\n \nExamples\n-------- \nSET @ls = \'LineString(0 0, 0 4, 4 4, 0 0)\';\n \nSELECT ST_ISCLOSED(GEOMFROMTEXT(@ls));\n+--------------------------------+\n| ST_ISCLOSED(GEOMFROMTEXT(@ls)) |\n+--------------------------------+\n| 1 |\n+--------------------------------+\n \nSET @ls = \'LineString(0 0, 0 4, 4 4, 0 1)\';\n \nSELECT ST_ISCLOSED(GEOMFROMTEXT(@ls));\n+--------------------------------+\n| ST_ISCLOSED(GEOMFROMTEXT(@ls)) |\n+--------------------------------+\n| 0 |\n+--------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_isclosed/','','https://mariadb.com/kb/en/st_isclosed/'),(583,'BINARY Operator',37,'Syntax\n------ \nBINARY\n \nDescription\n----------- \nThe BINARY operator casts the string following it to a\nbinary string. This is an easy way to force a column\ncomparison to be done byte by byte rather than character by\ncharacter. This causes the comparison to be case sensitive\neven if the column isn\'t defined as BINARY or BLOB. \n \nBINARY also causes trailing spaces to be significant.\n \nExamples\n-------- \nSELECT \'a\' = \'A\';\n \n+-----------+\n| \'a\' = \'A\' |\n+-----------+\n| 1 |\n+-----------+\n \nSELECT BINARY \'a\' = \'A\';\n \n+------------------+\n| BINARY \'a\' = \'A\' |\n+------------------+\n| 0 |\n+------------------+\n \nSELECT \'a\' = \'a \';\n \n+------------+\n| \'a\' = \'a \' |\n+------------+\n| 1 |\n+------------+\n \nSELECT BINARY \'a\' = \'a \';\n \n+-------------------+\n| BINARY \'a\' = \'a \' |\n+-------------------+\n| 0 |\n+-------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/binary-operator/','','https://mariadb.com/kb/en/binary-operator/'),(585,'CAST',37,'Syntax\n------ \nCAST(expr AS type)\n \nDescription\n----------- \nThe CAST() function takes a value of one type and produces a\nvalue of another type, similar to the CONVERT() function.\nFor more information, see the description of CONVERT(). \n \nThe main difference between the CAST() and CONVERT() is that\nCONVERT(expr,type) is ODBC syntax while CAST(expr as type)\nand CONVERT(... USING ...) are SQL92 syntax.\n \nIn MariaDB 10.4 and later, you can use the CAST() function\nwith the INTERVAL keyword.\n \nUntil MariaDB 5.5.31, X\'HHHH\', the standard SQL syntax for\nbinary string literals, erroneously worked in the same way\nas 0xHHHH. In 5.5.31 it was intentionally changed to behave\nas a string in all contexts (and never as a number).\n \nThis introduces an incompatibility with previous versions of\nMariaDB, and all versions of MySQL (see the example below). \n \nExamples\n-------- \nSimple casts:\n \nSELECT CAST(\"abc\" AS BINARY);\nSELECT CAST(\"1\" AS UNSIGNED INTEGER);\nSELECT CAST(123 AS CHAR CHARACTER SET utf8)\n \nNote that when one casts to CHAR without specifying the\ncharacter set, the collation_connection character set\ncollation will be used. When used with CHAR CHARACTER SET,\nthe default collation for that character set will be used.\n \nSELECT COLLATION(CAST(123 AS CHAR));\n+------------------------------+\n| COLLATION(CAST(123 AS CHAR)) |\n+------------------------------+\n| latin1_swedish_ci |\n+------------------------------+\n \nSELECT COLLATION(CAST(123 AS CHAR CHARACTER SET utf8));\n+-------------------------------------------------+\n| COLLATION(CAST(123 AS CHAR CHARACTER SET utf8)) |\n+-------------------------------------------------+\n| utf8_general_ci |\n+-------------------------------------------------+\n \nIf you also want to change the collation, you have to use\nthe COLLATE operator:\n \nSELECT COLLATION(CAST(123 AS CHAR CHARACTER SET utf8) \n COLLATE utf8_unicode_ci);\n+-------------------------------------------------------------------------+\n| COLLATION(CAST(123 AS CHAR CHARACTER SET utf8) COLLATE\nutf8_unicode_ci) |\n+-------------------------------------------------------------------------+\n| utf8_unicode_ci |\n+-------------------------------------------------------------------------+\n \nUsing CAST() to order an ENUM field as a CHAR rather than\nthe internal numerical value:\n \nCREATE TABLE enum_list (enum_field enum(\'c\',\'a\',\'b\'));\n \nINSERT INTO enum_list (enum_field) \nVALUES(\'c\'),(\'a\'),(\'c\'),(\'b\');\n \nSELECT * FROM enum_list \nORDER BY enum_field;\n \n+------------+\n| enum_field |\n+------------+\n| c |\n| c |\n| a |\n| b |\n+------------+\n \nSELECT * FROM enum_list \nORDER BY CAST(enum_field AS CHAR);\n+------------+\n| enum_field |\n+------------+\n| a |\n| b |\n| c |\n| c |\n+------------+\n \nFrom MariaDB 5.5.31, the following will trigger warnings,\nsince x\'aa\' and \'X\'aa\' no longer behave as a number.\nPreviously, and in all versions of MySQL, no warnings are\ntriggered since they did erroneously behave as a number:\n \nSELECT CAST(0xAA AS UNSIGNED), CAST(x\'aa\' AS UNSIGNED),\nCAST(X\'aa\' AS UNSIGNED);\n+------------------------+-------------------------+-------------------------+\n| CAST(0xAA AS UNSIGNED) | CAST(x\'aa\' AS UNSIGNED) |\nCAST(X\'aa\' AS UNSIGNED) |\n+------------------------+-------------------------+-------------------------+\n| 170 | 0 | 0 |\n+------------------------+-------------------------+-------------------------+\n1 row in set, 2 warnings (0.00 sec)\n \nWarning (Code 1292): Truncated incorrect INTEGER value:\n\'\\xAA\'\nWarning (Code 1292): Truncated incorrect INTEGER value:\n\'\\xAA\'\n \nCasting to intervals:\n \nSELECT CAST(2019-01-04 INTERVAL AS DAY_SECOND(2)) AS\n\"Cast\";\n \n+-------------+\n| Cast |\n+-------------+\n| 00:20:17.00 |\n+-------------+\n \n\n\nURL: https://mariadb.com/kb/en/cast/','','https://mariadb.com/kb/en/cast/'),(586,'CHAR Function',37,'Syntax\n------ \nCHAR(N,... [USING charset_name])\n \nDescription\n----------- \nCHAR() interprets each argument as an INT and returns a\nstring consisting of the characters given by the code values\nof those integers. NULL values are skipped. By default,\nCHAR() returns a binary string. To produce a string in a\ngiven character set, use the optional USING clause:\n \nSELECT CHARSET(CHAR(0x65)), CHARSET(CHAR(0x65 USING utf8));\n+---------------------+--------------------------------+\n| CHARSET(CHAR(0x65)) | CHARSET(CHAR(0x65 USING utf8)) |\n+---------------------+--------------------------------+\n| binary | utf8 |\n+---------------------+--------------------------------+\n \nIf USING is given and the result string is illegal for the\ngiven character set, a warning is issued. Also, if strict\nSQL mode is enabled, the result from CHAR() becomes NULL.\n \nExamples\n-------- \nSELECT CHAR(77,97,114,\'105\',97,\'68\',66);\n+----------------------------------+\n| CHAR(77,97,114,\'105\',97,\'68\',66) |\n+----------------------------------+\n| MariaDB |\n+----------------------------------+\n \nSELECT CHAR(77,77.3,\'77.3\');\n+----------------------+\n| CHAR(77,77.3,\'77.3\') |\n+----------------------+\n| MMM |\n+----------------------+\n1 row in set, 1 warning (0.00 sec)\n \nWarning (Code 1292): Truncated incorrect INTEGER value:\n\'77.3\'\n \n\n\nURL: https://mariadb.com/kb/en/char-function/','','https://mariadb.com/kb/en/char-function/'),(588,'CHAR_LENGTH',37,'Syntax\n------ \nCHAR_LENGTH(str)\n \nDescription\n----------- \nReturns the length of the given string argument, measured in\ncharacters. A multi-byte character counts as a single\ncharacter. This means that for a string containing five\ntwo-byte characters, LENGTH() (or OCTET_LENGTH() in Oracle\nmode) returns 10, whereas CHAR_LENGTH() returns 5. If the\nargument is NULL, it returns NULL. \n \nIf the argument is not a string value, it is converted into\na string.\n \nIt is synonymous with the CHARACTER_LENGTH() function.\n \nUntil MariaDB 10.3.1, returns MYSQL_TYPE_LONGLONG, or\nbigint(10), in all cases. From MariaDB 10.3.1, returns\nMYSQL_TYPE_LONG, or int(10), when the result would fit\nwithin 32-bits.\n \nExamples\n-------- \nSELECT CHAR_LENGTH(\'MariaDB\');\n+------------------------+\n| CHAR_LENGTH(\'MariaDB\') |\n+------------------------+\n| 7 |\n+------------------------+\n \nSELECT CHAR_LENGTH(\'Ï€\');\n+-------------------+\n| CHAR_LENGTH(\'Ï€\') |\n+-------------------+\n| 1 |\n+-------------------+\n \n\n\nURL: https://mariadb.com/kb/en/char_length/','','https://mariadb.com/kb/en/char_length/'),(589,'CHR',37,'The CHR() function was introduced in MariaDB 10.3.1 to\nprovide Oracle compatibility\n \nSyntax\n------ \nCHR(N)\n \nDescription\n----------- \nCHR() interprets each argument N as an integer and returns a\nVARCHAR(1) string consisting of the character given by the\ncode values of the integer. The character set and collation\nof the string are set according to the values of the\ncharacter_set_database and collation_database system\nvariables.\n \nCHR() is similar to the CHAR() function, but only accepts a\nsingle argument.\n \nCHR() is available in all sql_modes.\n \nExamples\n-------- \nSELECT CHR(67);\n+---------+\n| CHR(67) |\n+---------+\n| C |\n+---------+\n \nSELECT CHR(\'67\');\n+-----------+\n| CHR(\'67\') |\n+-----------+\n| C |\n+-----------+\n \nSELECT CHR(\'C\');\n+----------+\n| CHR(\'C\') |\n+----------+\n| |\n+----------+\n1 row in set, 1 warning (0.000 sec)\n \nSHOW WARNINGS;\n \n+---------+------+----------------------------------------+\n| Level | Code | Message |\n+---------+------+----------------------------------------+\n| Warning | 1292 | Truncated incorrect INTEGER value: \'C\'\n|\n+---------+------+----------------------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/chr/','','https://mariadb.com/kb/en/chr/'),(590,'CONCAT',37,'Syntax\n------ \nCONCAT(str1,str2,...)\n \nDescription\n----------- \nReturns the string that results from concatenating the\narguments. May have one or more arguments. If all arguments\nare non-binary strings, the result is a non-binary string.\nIf the arguments include any binary strings, the result is a\nbinary string. A numeric argument is converted to its\nequivalent binary string form; if you want to avoid that,\nyou can use an explicit type cast, as in this example:\n \nSELECT CONCAT(CAST(int_col AS CHAR), char_col);\n \nCONCAT() returns NULL if any argument is NULL.\n \nA NULL parameter hides all information contained in other\nparameters from the result. Sometimes this is not desirable;\nto avoid this, you can:\nUse the CONCAT_WS() function with an empty separator,\nbecause that function is NULL-safe.\nUse IFNULL() to turn NULLs into empty strings.\n \nOracle Mode\n \nIn Oracle mode from MariaDB 10.3, CONCAT ignores NULL.\n \nExamples\n-------- \nSELECT CONCAT(\'Ma\', \'ria\', \'DB\');\n+---------------------------+\n| CONCAT(\'Ma\', \'ria\', \'DB\') |\n+---------------------------+\n| MariaDB |\n+---------------------------+\n \nSELECT CONCAT(\'Ma\', \'ria\', NULL, \'DB\');\n+---------------------------------+\n| CONCAT(\'Ma\', \'ria\', NULL, \'DB\') |\n+---------------------------------+\n| NULL |\n+---------------------------------+\n \nSELECT CONCAT(42.0);\n+--------------+\n| CONCAT(42.0) |\n+--------------+\n| 42.0 |\n+--------------+\n \nUsing IFNULL() to handle NULLs:\n \nSELECT CONCAT(\'The value of @v is: \', IFNULL(@v, \'\'));\n+------------------------------------------------+\n| CONCAT(\'The value of @v is: \', IFNULL(@v, \'\')) |\n+------------------------------------------------+\n| The value of @v is: |\n+------------------------------------------------+\n \nIn Oracle mode, from MariaDB 10.3:\n \nSELECT CONCAT(\'Ma\', \'ria\', NULL, \'DB\');\n+---------------------------------+\n| CONCAT(\'Ma\', \'ria\', NULL, \'DB\') |\n+---------------------------------+\n| MariaDB |\n+---------------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/concat/','','https://mariadb.com/kb/en/concat/'),(591,'CONCAT_WS',37,'Syntax\n------ \nCONCAT_WS(separator,str1,str2,...)\n \nDescription\n----------- \nCONCAT_WS() stands for Concatenate With Separator and is a\nspecial form of CONCAT(). The first argument is the\nseparator for the rest of the arguments. The separator is\nadded between the strings to be concatenated. The separator\ncan be a string, as can the rest of the arguments.\n \nIf the separator is NULL, the result is NULL; all other NULL\nvalues are skipped. This makes CONCAT_WS() suitable when you\nwant to concatenate some values and avoid losing all\ninformation if one of them is NULL.\n \nExamples\n-------- \nSELECT CONCAT_WS(\',\',\'First name\',\'Second name\',\'Last\nName\');\n+-------------------------------------------------------+\n| CONCAT_WS(\',\',\'First name\',\'Second name\',\'Last\nName\') |\n+-------------------------------------------------------+\n| First name,Second name,Last Name |\n+-------------------------------------------------------+\n \nSELECT CONCAT_WS(\'-\',\'Floor\',NULL,\'Room\');\n+------------------------------------+\n| CONCAT_WS(\'-\',\'Floor\',NULL,\'Room\') |\n+------------------------------------+\n| Floor-Room |\n+------------------------------------+\n \nIn some cases, remember to include a space in the separator\nstring:\n \nSET @a = \'gnu\', @b = \'penguin\', @c = \'sea lion\';\n \nQuery OK, 0 rows affected (0.00 sec)\n \nSELECT CONCAT_WS(\', \', @a, @b, @c);\n+-----------------------------+\n| CONCAT_WS(\', \', @a, @b, @c) |\n+-----------------------------+\n| gnu, penguin, sea lion |\n+-----------------------------+\n \nUsing CONCAT_WS() to handle NULLs:\n \nSET @a = \'a\', @b = NULL, @c = \'c\';\n \nSELECT CONCAT_WS(\'\', @a, @b, @c);\n+---------------------------+\n| CONCAT_WS(\'\', @a, @b, @c) |\n+---------------------------+\n| ac |\n+---------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/concat_ws/','','https://mariadb.com/kb/en/concat_ws/'),(592,'CONVERT',37,'Syntax\n------ \nCONVERT(expr,type), CONVERT(expr USING transcoding_name)\n \nDescription\n----------- \nThe CONVERT() and CAST() functions take a value of one type\nand produce a value of another type.\n \nThe type can be one of the following values:\nBINARY\nCHAR\nDATE\nDATETIME \nDECIMAL[(M[,D])]\nDOUBLE \nFLOAT — From MariaDB 10.4.5\nINTEGER \nShort for SIGNED INTEGER\n \nSIGNED [INTEGER]\nTIME \nUNSIGNED [INTEGER]\n \nNote that in MariaDB, INT and INTEGER are the same thing.\n \nBINARY produces a string with the BINARY data type. If the\noptional length is given, BINARY(N) causes the cast to use\nno more than N bytes of the argument. Values shorter than\nthe given number in bytes are padded with 0x00 bytes to make\nthem equal the length value.\n \nCHAR(N) causes the cast to use no more than the number of\ncharacters given in the argument.\n \nThe main difference between the CAST() and CONVERT() is that\nCONVERT(expr,type) is ODBC syntax while CAST(expr as type)\nand CONVERT(... USING ...) are SQL92 syntax.\n \nCONVERT() with USING is used to convert data between\ndifferent character sets. In MariaDB, transcoding names are\nthe same as the\ncorresponding character set names. For example, this\nstatement\nconverts the string \'abc\' in the default character set to\nthe\ncorresponding string in the utf8 character set:\n \nSELECT CONVERT(\'abc\' USING utf8);\n \nExamples\n-------- \nSELECT enum_col FROM tbl_name \nORDER BY CAST(enum_col AS CHAR);\n \nConverting a BINARY to string to permit the LOWER function\nto work:\n \nSET @x = \'AardVark\';\n \nSET @x = BINARY \'AardVark\';\n \nSELECT LOWER(@x), LOWER(CONVERT (@x USING latin1));\n+-----------+----------------------------------+\n| LOWER(@x) | LOWER(CONVERT (@x USING latin1)) |\n+-----------+----------------------------------+\n| AardVark | aardvark |\n+-----------+----------------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/convert/','','https://mariadb.com/kb/en/convert/'),(593,'ELT',37,'Syntax\n------ \nELT(N, str1[, str2, str3,...])\n \nDescription\n----------- \nTakes a numeric argument and a series of string arguments.\nReturns the string that corresponds to the given numeric\nposition. For instance, it returns str1 if N is 1, str2 if N\nis 2, and so on. If the numeric argument is a FLOAT, MariaDB\nrounds it to the nearest INTEGER. If the numeric argument is\nless than 1, greater than the total number of arguments, or\nnot a number, ELT() returns NULL. It must have at least two\narguments.\n \nIt is complementary to the FIELD() function.\n \nExamples\n-------- \nSELECT ELT(1, \'ej\', \'Heja\', \'hej\', \'foo\');\n+------------------------------------+\n| ELT(1, \'ej\', \'Heja\', \'hej\', \'foo\') |\n+------------------------------------+\n| ej |\n+------------------------------------+\n \nSELECT ELT(4, \'ej\', \'Heja\', \'hej\', \'foo\');\n+------------------------------------+\n| ELT(4, \'ej\', \'Heja\', \'hej\', \'foo\') |\n+------------------------------------+\n| foo |\n+------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/elt/','','https://mariadb.com/kb/en/elt/'),(594,'EXPORT_SET',37,'Syntax\n------ \nEXPORT_SET(bits, on, off[, separator[, number_of_bits]])\n \nDescription\n----------- \nTakes a minimum of three arguments. Returns a string where\neach bit in the given bits argument is returned, with the\nstring values given for on and off. \n \nBits are examined from right to left, (from low-order to\nhigh-order bits). Strings are added to the result from left\nto right, separated by a separator string (defaults as\n\',\'). You can optionally limit the number of bits the\nEXPORT_SET() function examines using the number_of_bits\noption. \n \nIf any of the arguments are set as NULL, the function\nreturns NULL.\n \nExamples\n-------- \nSELECT EXPORT_SET(5,\'Y\',\'N\',\',\',4);\n+-----------------------------+\n| EXPORT_SET(5,\'Y\',\'N\',\',\',4) |\n+-----------------------------+\n| Y,N,Y,N |\n+-----------------------------+\n \nSELECT EXPORT_SET(6,\'1\',\'0\',\',\',10);\n+------------------------------+\n| EXPORT_SET(6,\'1\',\'0\',\',\',10) |\n+------------------------------+\n| 0,1,1,0,0,0,0,0,0,0 |\n+------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/export_set/','','https://mariadb.com/kb/en/export_set/'),(596,'FIELD',37,'Syntax\n------ \nFIELD(pattern, str1[,str2,...])\n \nDescription\n----------- \nReturns the index position of the string or number matching\nthe given pattern. Returns 0 in the event that none of the\narguments match the pattern. Raises an Error 1582 if not\ngiven at least two arguments.\n \nWhen all arguments given to the FIELD() function are\nstrings, they are treated as case-insensitive. When all the\narguments are numbers, they are treated as numbers.\nOtherwise, they are treated as doubles. \n \nIf the given pattern occurs more than once, the FIELD()\nfunction only returns the index of the first instance. If\nthe given pattern is NULL, the function returns 0, as a NULL\npattern always fails to match.\n \nThis function is complementary to the ELT() function.\n \nExamples\n-------- \nSELECT FIELD(\'ej\', \'Hej\', \'ej\', \'Heja\', \'hej\',\n\'foo\') \n AS \'Field Results\';\n \n+---------------+\n| Field Results | \n+---------------+\n| 2 |\n+---------------+\n \nSELECT FIELD(\'fo\', \'Hej\', \'ej\', \'Heja\', \'hej\',\n\'foo\')\n AS \'Field Results\';\n \n+---------------+\n| Field Results | \n+---------------+\n| 0 |\n+---------------+\n \nSELECT FIELD(1, 2, 3, 4, 5, 1) AS \'Field Results\';\n \n+---------------+\n| Field Results |\n+---------------+\n| 5 |\n+---------------+\n \nSELECT FIELD(NULL, 2, 3) AS \'Field Results\';\n \n+---------------+\n| Field Results |\n+---------------+\n| 0 |\n+---------------+\n \nSELECT FIELD(\'fail\') AS \'Field Results\';\n \nError 1582 (42000): Incorrect parameter count in call\nto native function \'field\'\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/field/','','https://mariadb.com/kb/en/field/'),(595,'EXTRACTVALUE',37,'Syntax\n------ \nEXTRACTVALUE(xml_frag, xpath_expr)\n \nDescription\n----------- \nThe EXTRACTVALUE() function takes two string arguments: a\nfragment of XML markup and an XPath expression, (also known\nas a locator). It returns the text (That is, CDDATA), of the\nfirst text node which is a child of the element or elements\nmatching the XPath expression. \n \nIn cases where a valid XPath expression does not match any\ntext nodes in a valid XML fragment, (including the implicit\n/text() expression), the EXTRACTVALUE() function returns an\nempty string.\n \nInvalid Arguments\n \nWhen either the XML fragment or the XPath expression is\nNULL, the EXTRACTVALUE() function returns NULL. When the XML\nfragment is invalid, it raises a warning Code 1525:\n \nWarning (Code 1525): Incorrect XML value: \'parse error at\nline 1 pos 11: unexpected END-OF-INPUT\'\n \nWhen the XPath value is invalid, it generates an Error 1105:\n \nERROR 1105 (HY000): XPATH syntax error: \')\'\n \nExplicit text() Expressions\n \nThis function is the equivalent of performing a match using\nthe XPath expression after appending /text(). In other\nwords:\n \nSELECT\n EXTRACTVALUE(\'example\', \'/cases/case\') AS \'Base\nExample\',\n EXTRACTVALUE(\'example\', \'/cases/case/text()\') AS\n\'text() Example\';\n \n+--------------+----------------+\n| Base Example | text() Example |\n+--------------+----------------+\n| example | example |\n+--------------+----------------+\n \nCount Matches\n \nWhen EXTRACTVALUE() returns multiple matches, it returns the\ncontent of the first child text node of each matching\nelement, in the matched order, as a single, space-delimited\nstring.\n \nBy design, the EXTRACTVALUE() function makes no distinction\nbetween a match on an empty element and no match at all. If\nyou need to determine whether no matching element was found\nin the XML fragment or if an element was found that\ncontained no child text nodes, use the XPath count()\nfunction. \n \nFor instance, when looking for a value that exists, but\ncontains no child text nodes, you would get a count of the\nnumber of matching instances:\n \nSELECT\n EXTRACTVALUE(\'\', \'/cases/case\') AS \'Empty Example\',\n EXTRACTVALUE(\'\', \'/cases/case/count()\') AS \'count()\nExample\';\n \n+---------------+-----------------+\n| Empty Example | count() Example |\n+---------------+-----------------+\n| | 1 |\n+---------------+-----------------+\n \nAlternatively, when looking for a value that doesn\'t exist,\ncount() returns 0.\n \nSELECT\n EXTRACTVALUE(\'\', \'/cases/person\') AS \'No Match\nExample\',\n EXTRACTVALUE(\'\', \'/cases/person/count()\') AS \'count()\nExample\';\n \n+------------------+-----------------+\n| No Match Example | count() Example |\n+------------------+-----------------+\n| | 0|\n+------------------+-----------------+\n \nMatches\n \nImportant: The EXTRACTVALUE() function only returns CDDATA.\nIt does not return tags that the element might contain or\nthe text that these child elements contain.\n \nSELECT EXTRACTVALUE(\'Personx@example.com\', \'/cases\') AS\nCase;\n \n+--------+\n| Case |\n+--------+\n| Person |\n+--------+\n \nNote, in the above example, while the XPath expression\nmatches to the parent instance, it does not return the\ncontained tag or its content.\n \nExamples\n-------- \nSELECT\n ExtractValue(\'cccddd\', \'/a\') AS val1,\n ExtractValue(\'cccddd\', \'/a/b\') AS val2,\n ExtractValue(\'cccddd\', \'//b\') AS val3,\n ExtractValue(\'cccddd\', \'/b\') AS val4,\n ExtractValue(\'cccdddeee\', \'//b\') AS val5;\n \n+------+------+------+------+---------+\n| val1 | val2 | val3 | val4 | val5 |\n+------+------+------+------+---------+\n| ccc | ddd | ddd | | ddd eee |\n+------+------+------+------+---------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/extractvalue/','','https://mariadb.com/kb/en/extractvalue/'),(597,'FIND_IN_SET',37,'Syntax\n------ \nFIND_IN_SET(pattern, strlist)\n \nDescription\n----------- \nReturns the index position where the given pattern occurs in\na string list. The first argument is the pattern you want to\nsearch for. The second argument is a string containing\ncomma-separated variables. If the second argument is of the\nSET data-type, the function is optimized to use bit\narithmetic.\n \nIf the pattern does not occur in the string list or if the\nstring list is an empty string, the function returns 0. If\neither argument is NULL, the function returns NULL. The\nfunction does not return the correct result if the pattern\ncontains a comma (\",\") character.\n \nExamples\n-------- \nSELECT FIND_IN_SET(\'b\',\'a,b,c,d\') AS \"Found Results\";\n \n+---------------+\n| Found Results |\n+---------------+\n| 2 |\n+---------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/find_in_set/','','https://mariadb.com/kb/en/find_in_set/'),(598,'FORMAT',37,'Syntax\n------ \nFORMAT(num, decimal_position[, locale])\n \nDescription\n----------- \nFormats the given number for display as a string, adding\nseparators to appropriate position and rounding the results\nto the given decimal position. For instance, it would format\n15233.345 to 15,233.35.\n \nIf the given decimal position is 0, it rounds to return no\ndecimal point or fractional part. You can optionally specify\na locale value to format numbers to the pattern appropriate\nfor the given region.\n \nExamples\n-------- \nSELECT FORMAT(1234567890.09876543210, 4) AS \'Format\';\n \n+--------------------+\n| Format |\n+--------------------+\n| 1,234,567,890.0988 |\n+--------------------+\n \nSELECT FORMAT(1234567.89, 4) AS \'Format\';\n \n+----------------+\n| Format |\n+----------------+\n| 1,234,567.8900 |\n+----------------+\n \nSELECT FORMAT(1234567.89, 0) AS \'Format\';\n \n+-----------+\n| Format |\n+-----------+\n| 1,234,568 |\n+-----------+\n \nSELECT FORMAT(123456789,2,\'rm_CH\') AS \'Format\';\n \n+----------------+\n| Format |\n+----------------+\n| 123\'456\'789,00 |\n+----------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/format/','','https://mariadb.com/kb/en/format/'),(599,'FROM_BASE64',37,'The FROM_BASE64() function was introduced in MariaDB 10.0.5.\n \nSyntax\n------ \nFROM_BASE64(str)\n \nDescription\n----------- \nDecodes the given base-64 encode string, returning the\nresult as a binary string. Returns NULL if the given string\nis NULL or if it\'s invalid.\n \nIt is the reverse of the TO_BASE64 function.\n \nThere are numerous methods to base-64 encode a string.\nMariaDB uses the following:\nIt encodes alphabet value 64 as \'+\'.\nIt encodes alphabet value 63 as \'/\'.\nIt codes output in groups of four printable characters. Each\nthree byte of data encoded uses four characters. If the\nfinal group is incomplete, it pads the difference with the\n\'=\' character.\nIt divides long output, adding a new line very 76\ncharacters.\nIn decoding, it recognizes and ignores newlines, carriage\nreturns, tabs and space whitespace characters.\n \nSELECT TO_BASE64(\'Maria\') AS \'Input\';\n \n+-----------+\n| Input |\n+-----------+\n| TWFyaWE= |\n+-----------+\n \nSELECT FROM_BASE64(\'TWFyaWE=\') AS \'Output\';\n \n+--------+\n| Output |\n+--------+\n| Maria |\n+--------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/from_base64/','','https://mariadb.com/kb/en/from_base64/'),(600,'HEX',37,'Syntax\n------ \nHEX(N_or_S)\n \nDescription\n----------- \nIf N_or_S is a number, returns a string representation of\nthe hexadecimal\nvalue of N, where N is a longlong (BIGINT) number. This is\nequivalent to CONV(N,10,16).\n \nIf N_or_S is a string, returns a hexadecimal string\nrepresentation of\nN_or_S where each byte of each character in N_or_S is\nconverted to two hexadecimal\ndigits. If N_or_S is NULL, returns NULL. The inverse of this\noperation is performed by the UNHEX()\nfunction.\n \nExamples\n-------- \nSELECT HEX(255);\n+----------+\n| HEX(255) |\n+----------+\n| FF |\n+----------+\n \nSELECT 0x4D617269614442;\n \n+------------------+\n| 0x4D617269614442 |\n+------------------+\n| MariaDB |\n+------------------+\n \nSELECT HEX(\'MariaDB\');\n+----------------+\n| HEX(\'MariaDB\') |\n+----------------+\n| 4D617269614442 |\n+----------------+\n \n\n\nURL: https://mariadb.com/kb/en/hex/','','https://mariadb.com/kb/en/hex/'),(601,'INSERT Function',37,'Syntax\n------ \nINSERT(str,pos,len,newstr)\n \nDescription\n----------- \nReturns the string str, with the substring beginning at\nposition pos\nand len characters long replaced by the string newstr.\nReturns the\noriginal string if pos is not within the length of the\nstring.\nReplaces the rest of the string from position pos if len is\nnot within\nthe length of the rest of the string. Returns NULL if any\nargument is\nNULL.\n \nExamples\n-------- \nSELECT INSERT(\'Quadratic\', 3, 4, \'What\');\n+-----------------------------------+\n| INSERT(\'Quadratic\', 3, 4, \'What\') |\n+-----------------------------------+\n| QuWhattic |\n+-----------------------------------+\n \nSELECT INSERT(\'Quadratic\', -1, 4, \'What\');\n+------------------------------------+\n| INSERT(\'Quadratic\', -1, 4, \'What\') |\n+------------------------------------+\n| Quadratic |\n+------------------------------------+\n \nSELECT INSERT(\'Quadratic\', 3, 100, \'What\');\n+-------------------------------------+\n| INSERT(\'Quadratic\', 3, 100, \'What\') |\n+-------------------------------------+\n| QuWhat |\n+-------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/insert-function/','','https://mariadb.com/kb/en/insert-function/'),(605,'LENGTH',37,'Syntax\n------ \nLENGTH(str)\n \nDescription\n----------- \nReturns the length of the string str, measured in bytes. A\nmulti-byte\ncharacter counts as multiple bytes. This means that for a\nstring\ncontaining five two-byte characters, LENGTH() returns 10,\nwhereas\nCHAR_LENGTH() returns 5. \n \nIf str is not a string value, it is converted into a string.\nIf str is NULL, the function returns NULL.\n \nUntil MariaDB 10.3.1, returns MYSQL_TYPE_LONGLONG, or\nbigint(10), in all cases. From MariaDB 10.3.1, returns\nMYSQL_TYPE_LONG, or int(10), when the result would fit\nwithin 32-bits.\n \nOracle Mode\n \nWhen running Oracle mode from MariaDB 10.3, LENGTH() is a\nsynonym for CHAR_LENGTH().\n \nExamples\n-------- \nSELECT LENGTH(\'MariaDB\');\n+-------------------+\n| LENGTH(\'MariaDB\') |\n+-------------------+\n| 7 |\n+-------------------+\n \nSELECT LENGTH(\'Ï€\');\n+--------------+\n| LENGTH(\'Ï€\') |\n+--------------+\n| 2 |\n+--------------+\n \nIn Oracle mode from MariaDB 10.3:\n \nSELECT LENGTH(\'Ï€\');\n+--------------+\n| LENGTH(\'Ï€\') |\n+--------------+\n| 1 |\n+--------------+\n \n\n\nURL: https://mariadb.com/kb/en/length/','','https://mariadb.com/kb/en/length/'),(608,'LOAD_FILE',37,'Syntax\n------ \nLOAD_FILE(file_name)\n \nDescription\n----------- \nReads the file and returns the file contents as a string. To\nuse this function, the file must be located on the server\nhost, you must specify the full path name to the file, and\nyou must have the FILE privilege. The file must be readable\nby all and it must be less than the size, in bytes, of the\nmax_allowed_packet system variable. If the secure_file_priv\nsystem variable is set to a non-empty directory name, the\nfile to be loaded must be located in that directory.\n \nIf the file does not exist or cannot be read because one of\nthe preceding conditions is not satisfied, the function\nreturns NULL.\n \nSince MariaDB 5.1, the character_set_filesystem system\nvariable has controlled interpretation of file names that\nare given as literal strings.\n \nStatements using the LOAD_FILE() function are not safe for\nstatement based replication. This is because the slave will\nexecute the LOAD_FILE() command itself. If the file doesn\'t\nexist on the slave, the function will return NULL.\n \nExamples\n-------- \nUPDATE t SET blob_col=LOAD_FILE(\'/tmp/picture\') WHERE\nid=1;\n \n\n\nURL: https://mariadb.com/kb/en/load_file/','','https://mariadb.com/kb/en/load_file/'),(607,'LIKE',37,'Syntax\n------ \nexpr LIKE pat [ESCAPE \'escape_char\']\nexpr NOT LIKE pat [ESCAPE \'escape_char\']\n \nDescription\n----------- \nTests whether expr matches the pattern pat. Returns either 1\n(TRUE) or 0 (FALSE).\nBoth expr and pat may be any valid expression and are\nevaluated to strings.\nPatterns may use the following wildcard characters:\n% matches any number of characters, including zero.\n_ matches any single character.\n \nUse NOT LIKE to test if a string does not match a pattern.\nThis is equivalent to using\nthe NOT operator on the entire LIKE expression.\n \nIf either the expression or the pattern is NULL, the result\nis NULL.\n \nLIKE performs case-insensitive substring matches if the\ncollation for the\nexpression and pattern is case-insensitive. For\ncase-sensitive matches, declare either argument\nto use a binary collation using COLLATE, or coerce either of\nthem to a BINARY\nstring using CAST. Use SHOW COLLATION to get a list of\navailable collations. Collations ending in _bin are\ncase-sensitive.\n \nNumeric arguments are coerced to binary strings.\n \nThe _ wildcard matches a single character, not byte. It will\nonly match a multi-byte character\nif it is valid in the expression\'s character set. For\nexample, _ will match _utf8\"€\", but it\nwill not match _latin1\"€\" because the Euro sign is not a\nvalid latin1 character. If necessary,\nuse CONVERT to use the expression in a different character\nset.\n \nIf you need to match the characters _ or %, you must escape\nthem. By default,\nyou can prefix the wildcard characters the backslash\ncharacter \\ to escape them.\nThe backslash is used both to encode special characters like\nnewlines when a string is\nparsed as well as to escape wildcards in a pattern after\nparsing. Thus, to match an\nactual backslash, you sometimes need to double-escape it as\n\"\\\\\\\\\".\n \nTo avoid difficulties with the backslash character, you can\nchange the wildcard escape\ncharacter using ESCAPE in a LIKE expression. The argument to\nESCAPE\nmust be a single-character string.\n \nExamples\n-------- \nSelect the days that begin with \"T\":\n \nCREATE TABLE t1 (d VARCHAR(16));\nINSERT INTO t1 VALUES (\"Monday\"), (\"Tuesday\"),\n(\"Wednesday\"), (\"Thursday\"), (\"Friday\"),\n(\"Saturday\"), (\"Sunday\");\nSELECT * FROM t1 WHERE d LIKE \"T%\";\n \nSELECT * FROM t1 WHERE d LIKE \"T%\";\n+----------+\n| d |\n+----------+\n| Tuesday |\n| Thursday |\n+----------+\n \nSelect the days that contain the substring \"es\":\n \nSELECT * FROM t1 WHERE d LIKE \"%es%\";\n \nSELECT * FROM t1 WHERE d LIKE \"%es%\";\n+-----------+\n| d |\n+-----------+\n| Tuesday |\n| Wednesday |\n+-----------+\n \nSelect the six-character day names:\n \nSELECT * FROM t1 WHERE d like \"___day\";\n \nSELECT * FROM t1 WHERE d like \"___day\";\n+---------+\n| d |\n+---------+\n| Monday |\n| Friday |\n| Sunday |\n+---------+\n \nWith the default collations, LIKE is case-insensitive:\n \nSELECT * FROM t1 where d like \"t%\";\n \nSELECT * FROM t1 where d like \"t%\";\n+----------+\n| d |\n+----------+\n| Tuesday |\n| Thursday |\n+----------+\n \nUse COLLATE to specify a binary collation, forcing\ncase-sensitive matches:\n \nSELECT * FROM t1 WHERE d like \"t%\" COLLATE latin1_bin;\n \nSELECT * FROM t1 WHERE d like \"t%\" COLLATE latin1_bin;\nEmpty set (0.00 sec)\n \nYou can include functions and operators in the expression to\nmatch. Select dates\nbased on their day name:\n \nCREATE TABLE t2 (d DATETIME);\nINSERT INTO t2 VALUES\n (\"2007-01-30 21:31:07\"),\n (\"1983-10-15 06:42:51\"),\n (\"2011-04-21 12:34:56\"),\n (\"2011-10-30 06:31:41\"),\n (\"2011-01-30 14:03:25\"),\n (\"2004-10-07 11:19:34\");\nSELECT * FROM t2 WHERE DAYNAME(d) LIKE \"T%\";\n \nSELECT * FROM t2 WHERE DAYNAME(d) LIKE \"T%\";\n+------------------+\n| d |\n+------------------+\n| 2007-01-30 21:31 |\n| 2011-04-21 12:34 |\n| 2004-10-07 11:19 |\n+------------------+\n3 rows in set, 7 warnings (0.00 sec)\n \nOptimizing LIKE\n \nMariaDB can use indexes for LIKE on string columns in the\ncase where the LIKE doesn\'t start with % or _.\nStarting from MariaDB 10.0, one can set the\noptimizer_use_condition_selectivity variable to 5. If this\nis done, then the optimizer will read\noptimizer_selectivity_sampling_limit rows to calculate the\nselectivity of the LIKE expression before starting to\ncalculate the query plan. This can help speed up some LIKE\nqueries by providing the optimizer with more information\nabout your data.\n \n\n\nURL: https://mariadb.com/kb/en/like/','','https://mariadb.com/kb/en/like/'),(609,'LOCATE',37,'Syntax\n------ \nLOCATE(substr,str), LOCATE(substr,str,pos)\n \nDescription\n----------- \nThe first syntax returns the position of the first\noccurrence of\nsubstring substr in string str. The second syntax returns\nthe position\nof the first occurrence of substring substr in string str,\nstarting at\nposition pos. Returns 0 if substr is not in str.\n \nLOCATE() performs a case-insensitive search.\n \nIf any argument is NULL, returns NULL.\n \nINSTR() is a synonym of LOCATE() without the third argument.\n \nExamples\n-------- \nSELECT LOCATE(\'bar\', \'foobarbar\');\n+----------------------------+\n| LOCATE(\'bar\', \'foobarbar\') |\n+----------------------------+\n| 4 |\n+----------------------------+\n \nSELECT LOCATE(\'My\', \'Maria\');\n+-----------------------+\n| LOCATE(\'My\', \'Maria\') |\n+-----------------------+\n| 0 |\n+-----------------------+\n \nSELECT LOCATE(\'bar\', \'foobarbar\', 5);\n+-------------------------------+\n| LOCATE(\'bar\', \'foobarbar\', 5) |\n+-------------------------------+\n| 7 |\n+-------------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/locate/','','https://mariadb.com/kb/en/locate/'),(610,'LOWER',37,'Syntax\n------ \nLOWER(str)\n \nDescription\n----------- \nReturns the string str with all characters changed to\nlowercase\naccording to the current character set mapping. The default\nis latin1\n(cp1252 West European).\n \nExamples\n-------- \n SELECT LOWER(\'QUADRATICALLY\');\n+------------------------+\n| LOWER(\'QUADRATICALLY\') |\n+------------------------+\n| quadratically |\n+------------------------+\n \nLOWER() (and UPPER()) are ineffective when applied to binary\nstrings (BINARY, VARBINARY, BLOB). \nTo perform lettercase conversion, CONVERT the string to a\nnon-binary string:\n \nSET @str = BINARY \'North Carolina\';\n \nSELECT LOWER(@str), LOWER(CONVERT(@str USING latin1));\n+----------------+-----------------------------------+\n| LOWER(@str) | LOWER(CONVERT(@str USING latin1)) |\n+----------------+-----------------------------------+\n| North Carolina | north carolina |\n+----------------+-----------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/lower/','','https://mariadb.com/kb/en/lower/'),(611,'LPAD',37,'Syntax\n------ \nLPAD(str, len [,padstr])\n \nDescription\n----------- \nReturns the string str, left-padded with the string padstr\nto a length\nof len characters. If str is longer than len, the return\nvalue is\nshortened to len characters. If padstr is omitted, the LPAD\nfunction pads spaces.\n \nPrior to MariaDB 10.3.1, the padstr parameter was mandatory.\n \nReturns NULL if given a NULL argument. If the result is\nempty (zero length), returns either an empty string or, from\nMariaDB 10.3.6 with SQL_MODE=Oracle, NULL.\n \nThe Oracle mode version of the function can be accessed\noutside of Oracle mode by using LPAD_ORACLE as the function\nname.\n \nExamples\n-------- \nSELECT LPAD(\'hello\',10,\'.\');\n+----------------------+\n| LPAD(\'hello\',10,\'.\') |\n+----------------------+\n| .....hello |\n+----------------------+\n \nSELECT LPAD(\'hello\',2,\'.\');\n+---------------------+\n| LPAD(\'hello\',2,\'.\') |\n+---------------------+\n| he |\n+---------------------+\n \nFrom MariaDB 10.3.1, with the pad string defaulting to\nspace.\n \nSELECT LPAD(\'hello\',10);\n+------------------+\n| LPAD(\'hello\',10) |\n+------------------+\n| hello |\n+------------------+\n \nOracle mode version from MariaDB 10.3.6:\n \nSELECT LPAD(\'\',0),LPAD_ORACLE(\'\',0);\n+------------+-------------------+\n| LPAD(\'\',0) | LPAD_ORACLE(\'\',0) |\n+------------+-------------------+\n| | NULL |\n+------------+-------------------+\n \n\n\nURL: https://mariadb.com/kb/en/lpad/','','https://mariadb.com/kb/en/lpad/'),(612,'LTRIM',37,'Syntax\n------ \nLTRIM(str)\n \nDescription\n----------- \nReturns the string str with leading space characters\nremoved.\n \nReturns NULL if given a NULL argument. If the result is\nempty, returns either an empty string, or, from MariaDB\n10.3.6 with SQL_MODE=Oracle, NULL.\n \nThe Oracle mode version of the function can be accessed\noutside of Oracle mode by using LTRIM_ORACLE as the function\nname.\n \nExamples\n-------- \nSELECT QUOTE(LTRIM(\' MariaDB \'));\n+-------------------------------+\n| QUOTE(LTRIM(\' MariaDB \')) |\n+-------------------------------+\n| \'MariaDB \' |\n+-------------------------------+\n \nOracle mode version from MariaDB 10.3.6:\n \nSELECT LTRIM(\'\'),LTRIM_ORACLE(\'\');\n+-----------+------------------+\n| LTRIM(\'\') | LTRIM_ORACLE(\'\') |\n+-----------+------------------+\n| | NULL |\n+-----------+------------------+\n \n\n\nURL: https://mariadb.com/kb/en/ltrim/','','https://mariadb.com/kb/en/ltrim/'),(613,'MAKE_SET',37,'Syntax\n------ \nMAKE_SET(bits,str1,str2,...)\n \nDescription\n----------- \nReturns a set value (a string containing substrings\nseparated by \",\"\ncharacters) consisting of the strings that have the\ncorresponding bit\nin bits set. str1 corresponds to bit 0, str2 to bit 1, and\nso on. NULL\nvalues in str1, str2, ... are not appended to the result.\n \nExamples\n-------- \nSELECT MAKE_SET(1,\'a\',\'b\',\'c\');\n+-------------------------+\n| MAKE_SET(1,\'a\',\'b\',\'c\') |\n+-------------------------+\n| a |\n+-------------------------+\n \nSELECT MAKE_SET(1 | 4,\'hello\',\'nice\',\'world\');\n+----------------------------------------+\n| MAKE_SET(1 | 4,\'hello\',\'nice\',\'world\') |\n+----------------------------------------+\n| hello,world |\n+----------------------------------------+\n \nSELECT MAKE_SET(1 | 4,\'hello\',\'nice\',NULL,\'world\');\n+---------------------------------------------+\n| MAKE_SET(1 | 4,\'hello\',\'nice\',NULL,\'world\') |\n+---------------------------------------------+\n| hello |\n+---------------------------------------------+\n \nSELECT QUOTE(MAKE_SET(0,\'a\',\'b\',\'c\'));\n+--------------------------------+\n| QUOTE(MAKE_SET(0,\'a\',\'b\',\'c\')) |\n+--------------------------------+\n| \'\' |\n+--------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/make_set/','','https://mariadb.com/kb/en/make_set/'),(614,'MATCH AGAINST',37,'Syntax\n------ \nMATCH (col1,col2,...) AGAINST (expr [search_modifier])\n \nDescription\n----------- \nA special construct used to perform a fulltext search on a\nfulltext index.\n \nSee Fulltext Index Overview for a full description, and\nFull-text Indexes for more articles on the topic.\n \nExamples\n-------- \nCREATE TABLE ft_myisam(copy TEXT,FULLTEXT(copy))\nENGINE=MyISAM;\n \nINSERT INTO ft_myisam(copy) VALUES (\'Once upon a time\'),\n(\'There was a wicked witch\'), \n (\'Who ate everybody up\');\n \nSELECT * FROM ft_myisam WHERE MATCH(copy)\nAGAINST(\'wicked\');\n+--------------------------+\n| copy |\n+--------------------------+\n| There was a wicked witch |\n+--------------------------+\n \nSELECT id, body, MATCH (title,body) AGAINST\n (\'Security implications of running MySQL as root\'\n IN NATURAL LANGUAGE MODE) AS score\n FROM articles WHERE MATCH (title,body) AGAINST\n (\'Security implications of running MySQL as root\'\n IN NATURAL LANGUAGE MODE);\n+----+-------------------------------------+-----------------+\n| id | body | score |\n+----+-------------------------------------+-----------------+\n| 4 | 1. Never run mysqld as root. 2. ... | 1.5219271183014\n|\n| 6 | When configured properly, MySQL ... | 1.3114095926285\n|\n+----+-------------------------------------+-----------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/match-against/','','https://mariadb.com/kb/en/match-against/'),(622,'REGEXP_INSTR',37,'REGEXP_INSTR was introduced in MariaDB 10.0.5.\n \nSyntax\n------ \nREGEXP_INSTR(subject, pattern)\n \nReturns the position of the first occurrence of the regular\nexpression pattern in the string subject, or 0 if pattern\nwas not found.\n \nThe positions start with 1 and are measured in characters\n(i.e. not in bytes), which is important for multi-byte\ncharacter sets. You can cast a multi-byte character set to\nBINARY to get offsets in bytes.\n \nThe function follows the case sensitivity rules of the\neffective collation. Matching is performed case\ninsensitively for case insensitive collations, and case\nsensitively for case sensitive collations and for binary\ndata.\n \nThe collation case sensitivity can be overwritten using the\n(?i) and (?-i) PCRE flags.\n \nMariaDB 10.0.5 switched to the PCRE regular expression\nlibrary for enhanced regular expression performance, and\nREGEXP_INSTR was introduced as part of this enhancement.\n \nExamples\n-------- \nSELECT REGEXP_INSTR(\'abc\',\'b\');\n-> 2\n \nSELECT REGEXP_INSTR(\'abc\',\'x\');\n-> 0\n \nSELECT REGEXP_INSTR(\'BJÖRN\',\'N\');\n-> 5\n \nCasting a multi-byte character set as BINARY to get offsets\nin bytes:\n \nSELECT REGEXP_INSTR(BINARY \'BJÖRN\',\'N\') AS\ncast_utf8_to_binary;\n-> 6\n \nCase sensitivity:\n \nSELECT REGEXP_INSTR(\'ABC\',\'b\');\n-> 2\n \nSELECT REGEXP_INSTR(\'ABC\' COLLATE utf8_bin,\'b\');\n-> 0\n \nSELECT REGEXP_INSTR(BINARY\'ABC\',\'b\');\n-> 0\n \nSELECT REGEXP_INSTR(\'ABC\',\'(?-i)b\');\n-> 0\n \nSELECT REGEXP_INSTR(\'ABC\' COLLATE utf8_bin,\'(?i)b\');\n-> 2\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/regexp_instr/','','https://mariadb.com/kb/en/regexp_instr/'),(623,'REGEXP_REPLACE',37,'REGEXP_REPLACE was introduced in MariaDB 10.0.5.\n \nSyntax\n------ \nREGEXP_REPLACE(subject, pattern, replace)\n \nDescription\n----------- \nREGEXP_REPLACE returns the string subject with all\noccurrences of the regular expression pattern replaced by\nthe string replace. If no occurrences are found, then\nsubject is returned as is.\n \nThe replace string can have backreferences to the\nsubexpressions in the form \\N, where N is a number from 1\nto 9.\n \nThe function follows the case sensitivity rules of the\neffective collation. Matching is performed case\ninsensitively for case insensitive collations, and case\nsensitively for case sensitive collations and for binary\ndata.\n \nThe collation case sensitivity can be overwritten using the\n(?i) and (?-i) PCRE flags.\n \nMariaDB 10.0.5 switched to the PCRE regular expression\nlibrary for enhanced regular expression performance, and\nREGEXP_REPLACE was introduced as part of this enhancement.\n \nMariaDB 10.0.11 introduced the default_regex_flags variable\nto address the remaining compatibilities between PCRE and\nthe old regex library. \n \nExamples\n-------- \nSELECT REGEXP_REPLACE(\'ab12cd\',\'[0-9]\',\'\') AS\nremove_digits;\n-> abcd\n \nSELECT REGEXP_REPLACE(\'titlebody\', \'\',\' \')\nAS strip_html;\n-> title body\n \nBackreferences to the subexpressions in the form \\N, where\nN is a number from 1 to 9:\n \nSELECT REGEXP_REPLACE(\'James Bond\',\'^(.*)\n(.*)$\',\'\\\\2, \\\\1\') AS reorder_name;\n-> Bond, James\n \nCase insensitive and case sensitive matches:\n \nSELECT REGEXP_REPLACE(\'ABC\',\'b\',\'-\') AS\ncase_insensitive;\n-> A-C\n \nSELECT REGEXP_REPLACE(\'ABC\' COLLATE utf8_bin,\'b\',\'-\')\nAS case_sensitive;\n-> ABC\n \nSELECT REGEXP_REPLACE(BINARY \'ABC\',\'b\',\'-\') AS\nbinary_data;\n-> ABC\n \nOverwriting the collation case sensitivity using the (?i)\nand (?-i) PCRE flags.\n \nSELECT REGEXP_REPLACE(\'ABC\',\'(?-i)b\',\'-\') AS\nforce_case_sensitive;\n-> ABC\n \nSELECT REGEXP_REPLACE(BINARY \'ABC\',\'(?i)b\',\'-\') AS\nforce_case_insensitive;\n-> A-C\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/regexp_replace/','','https://mariadb.com/kb/en/regexp_replace/'),(624,'REGEXP_SUBSTR',37,'REGEXP_SUBSTR was introduced in MariaDB 10.0.5.\n \nSyntax\n------ \nREGEXP_SUBSTR(subject,pattern)\n \nDescription\n----------- \nReturns the part of the string subject that matches the\nregular expression pattern, or an empty string if pattern\nwas not found.\n \nThe function follows the case sensitivity rules of the\neffective collation. Matching is performed case\ninsensitively for case insensitive collations, and case\nsensitively for case sensitive collations and for binary\ndata.\n \nThe collation case sensitivity can be overwritten using the\n(?i) and (?-i) PCRE flags.\n \nMariaDB 10.0.5 switched to the PCRE regular expression\nlibrary for enhanced regular expression performance, and\nREGEXP_SUBSTR was introduced as part of this enhancement.\n \nMariaDB 10.0.11 introduced the default_regex_flags variable\nto address the remaining compatibilities between PCRE and\nthe old regex library. \n \nExamples\n-------- \nSELECT REGEXP_SUBSTR(\'ab12cd\',\'[0-9]+\');\n-> 12\n \nSELECT REGEXP_SUBSTR(\n \'See https://mariadb.org/en/foundation/ for details\',\n \'https?://[^/]*\');\n-> https://mariadb.org\n \nSELECT REGEXP_SUBSTR(\'ABC\',\'b\');\n-> B\n \nSELECT REGEXP_SUBSTR(\'ABC\' COLLATE utf8_bin,\'b\');\n->\n \nSELECT REGEXP_SUBSTR(BINARY\'ABC\',\'b\');\n->\n \nSELECT REGEXP_SUBSTR(\'ABC\',\'(?i)b\');\n-> B\n \nSELECT REGEXP_SUBSTR(\'ABC\' COLLATE utf8_bin,\'(?+i)b\');\n-> B\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/regexp_substr/','','https://mariadb.com/kb/en/regexp_substr/'),(629,'RPAD',37,'Syntax\n------ \nRPAD(str, len [, padstr])\n \nDescription\n----------- \nReturns the string str, right-padded with the string padstr\nto a\nlength of len characters. If str is longer than len, the\nreturn value\nis shortened to len characters. If padstr is omitted, the\nRPAD function pads spaces.\n \nPrior to MariaDB 10.3.1, the padstr parameter was mandatory.\n \nReturns NULL if given a NULL argument. If the result is\nempty (a length of zero), returns either an empty string,\nor, from MariaDB 10.3.6 with SQL_MODE=Oracle, NULL.\n \nThe Oracle mode version of the function can be accessed\noutside of Oracle mode by using RPAD_ORACLE as the function\nname.\n \nExamples\n-------- \nSELECT RPAD(\'hello\',10,\'.\');\n+----------------------+\n| RPAD(\'hello\',10,\'.\') |\n+----------------------+\n| hello..... |\n+----------------------+\n \nSELECT RPAD(\'hello\',2,\'.\');\n+---------------------+\n| RPAD(\'hello\',2,\'.\') |\n+---------------------+\n| he |\n+---------------------+\n \nFrom MariaDB 10.3.1, with the pad string defaulting to\nspace.\n \nSELECT RPAD(\'hello\',30);\n+--------------------------------+\n| RPAD(\'hello\',30) |\n+--------------------------------+\n| hello |\n+--------------------------------+\n \nOracle mode version from MariaDB 10.3.6:\n \nSELECT RPAD(\'\',0),RPAD_ORACLE(\'\',0);\n+------------+-------------------+\n| RPAD(\'\',0) | RPAD_ORACLE(\'\',0) |\n+------------+-------------------+\n| | NULL |\n+------------+-------------------+\n \n\n\nURL: https://mariadb.com/kb/en/rpad/','','https://mariadb.com/kb/en/rpad/'),(630,'RTRIM',37,'Syntax\n------ \nRTRIM(str)\n \nDescription\n----------- \nReturns the string str with trailing space characters\nremoved.\n \nReturns NULL if given a NULL argument. If the result is\nempty, returns either an empty string, or, from MariaDB\n10.3.6 with SQL_MODE=Oracle, NULL.\n \nThe Oracle mode version of the function can be accessed\noutside of Oracle mode by using RTRIM_ORACLE as the function\nname.\n \nExamples\n-------- \nSELECT QUOTE(RTRIM(\'MariaDB \'));\n+-----------------------------+\n| QUOTE(RTRIM(\'MariaDB \')) |\n+-----------------------------+\n| \'MariaDB\' |\n+-----------------------------+\n \nOracle mode version from MariaDB 10.3.6:\n \nSELECT RTRIM(\'\'),RTRIM_ORACLE(\'\');\n+-----------+------------------+\n| RTRIM(\'\') | RTRIM_ORACLE(\'\') |\n+-----------+------------------+\n| | NULL |\n+-----------+------------------+\n \n\n\nURL: https://mariadb.com/kb/en/rtrim/','','https://mariadb.com/kb/en/rtrim/'),(631,'SOUNDEX',37,'Syntax\n------ \nSOUNDEX(str)\n \nDescription\n----------- \nReturns a soundex string from str. Two strings that sound\nalmost the\nsame should have identical soundex strings. A standard\nsoundex string is four\ncharacters long, but the SOUNDEX() function returns an\narbitrarily long\nstring. You can use SUBSTRING() on the result to get a\nstandard soundex\nstring. All non-alphabetic characters in str are ignored.\nAll\ninternational alphabetic characters outside the A-Z range\nare treated as\nvowels.\n \nImportant: When using SOUNDEX(), you should be aware of the\nfollowing limitations:\nThis function, as currently implemented, is intended to work\nwell with\n strings that are in the English language only. Strings in\nother languages may\n not produce reliable results.\n \nExamples\n-------- \nSOUNDEX(\'Hello\');\n+------------------+\n| SOUNDEX(\'Hello\') |\n+------------------+\n| H400 |\n+------------------+\n \nSELECT SOUNDEX(\'MariaDB\');\n+--------------------+\n| SOUNDEX(\'MariaDB\') |\n+--------------------+\n| M631 |\n+--------------------+\n \nSELECT SOUNDEX(\'Knowledgebase\');\n+--------------------------+\n| SOUNDEX(\'Knowledgebase\') |\n+--------------------------+\n| K543212 |\n+--------------------------+\n \nSELECT givenname, surname FROM users WHERE\nSOUNDEX(givenname) = SOUNDEX(\"robert\");\n+-----------+---------+\n| givenname | surname |\n+-----------+---------+\n| Roberto | Castro |\n+-----------+---------+\n \n\n\nURL: https://mariadb.com/kb/en/soundex/','','https://mariadb.com/kb/en/soundex/'),(636,'SUBSTRING',37,'Syntax\n------ \nSUBSTRING(str,pos), \nSUBSTRING(str FROM pos), \nSUBSTRING(str,pos,len),\nSUBSTRING(str FROM pos FOR len)\n \nSUBSTR(str,pos), \nSUBSTR(str FROM pos), \nSUBSTR(str,pos,len),\nSUBSTR(str FROM pos FOR len)\n \nDescription\n----------- \nThe forms without a len argument return a substring from\nstring str starting at position pos.\n \nThe forms with a len argument return a substring len\ncharacters long from string str, starting at position pos.\n \nThe forms that use FROM are standard SQL syntax.\n \nIt is also possible to use a negative value for pos. In this\ncase, the beginning of the substring is pos characters from\nthe end of the string, rather than the beginning. A negative\nvalue may be used for pos in any of the forms of this\nfunction.\n \nBy default, the position of the first character in the\nstring from which the substring is to be extracted is\nreckoned as 1. For Oracle-compatibility, from MariaDB\n10.3.3, when sql_mode is set to \'oracle\', position zero is\ntreated as position 1 (although the first character is still\nreckoned as 1).\n \nIf any argument is NULL, returns NULL.\n \nExamples\n-------- \nSELECT SUBSTRING(\'Knowledgebase\',5);\n+------------------------------+\n| SUBSTRING(\'Knowledgebase\',5) |\n+------------------------------+\n| ledgebase |\n+------------------------------+\n \nSELECT SUBSTRING(\'MariaDB\' FROM 6);\n+-----------------------------+\n| SUBSTRING(\'MariaDB\' FROM 6) |\n+-----------------------------+\n| DB |\n+-----------------------------+\n \nSELECT SUBSTRING(\'Knowledgebase\',3,7);\n+--------------------------------+\n| SUBSTRING(\'Knowledgebase\',3,7) |\n+--------------------------------+\n| owledge |\n+--------------------------------+\n \nSELECT SUBSTRING(\'Knowledgebase\', -4);\n+--------------------------------+\n| SUBSTRING(\'Knowledgebase\', -4) |\n+--------------------------------+\n| base |\n+--------------------------------+\n \nSELECT SUBSTRING(\'Knowledgebase\', -8, 4);\n+-----------------------------------+\n| SUBSTRING(\'Knowledgebase\', -8, 4) |\n+-----------------------------------+\n| edge |\n+-----------------------------------+\n \nSELECT SUBSTRING(\'Knowledgebase\' FROM -8 FOR 4);\n+------------------------------------------+\n| SUBSTRING(\'Knowledgebase\' FROM -8 FOR 4) |\n+------------------------------------------+\n| edge |\n+------------------------------------------+\n \nOracle mode from MariaDB 10.3.3:\n \nSELECT SUBSTR(\'abc\',0,3);\n+-------------------+\n| SUBSTR(\'abc\',0,3) |\n+-------------------+\n| |\n+-------------------+\n \nSELECT SUBSTR(\'abc\',1,2);\n+-------------------+\n| SUBSTR(\'abc\',1,2) |\n+-------------------+\n| ab |\n+-------------------+\n \nSET sql_mode=\'oracle\';\n \nSELECT SUBSTR(\'abc\',0,3);\n+-------------------+\n| SUBSTR(\'abc\',0,3) |\n+-------------------+\n| abc |\n+-------------------+\n \nSELECT SUBSTR(\'abc\',1,2);\n+-------------------+\n| SUBSTR(\'abc\',1,2) |\n+-------------------+\n| ab |\n+-------------------+\n \n\n\nURL: https://mariadb.com/kb/en/substring/','','https://mariadb.com/kb/en/substring/'),(637,'SUBSTRING_INDEX',37,'Syntax\n------ \nSUBSTRING_INDEX(str,delim,count)\n \nDescription\n----------- \nReturns the substring from string str before count\noccurrences of the\ndelimiter delim. If count is positive, everything to the\nleft\nof the final delimiter (counting from the left) is returned.\nIf count\nis negative, everything to the right of the final delimiter\n(counting from the\nright) is returned. SUBSTRING_INDEX() performs a\ncase-sensitive match when\nsearching for delim.\n \nIf any argument is NULL, returns NULL.\n \nExamples\n-------- \nSELECT SUBSTRING_INDEX(\'www.mariadb.org\', \'.\', 2);\n+--------------------------------------------+\n| SUBSTRING_INDEX(\'www.mariadb.org\', \'.\', 2) |\n+--------------------------------------------+\n| www.mariadb |\n+--------------------------------------------+\n \nSELECT SUBSTRING_INDEX(\'www.mariadb.org\', \'.\', -2);\n+---------------------------------------------+\n| SUBSTRING_INDEX(\'www.mariadb.org\', \'.\', -2) |\n+---------------------------------------------+\n| mariadb.org |\n+---------------------------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/substring_index/','','https://mariadb.com/kb/en/substring_index/'),(638,'TO_BASE64',37,'The TO_BASE64() function was introduced in MariaDB 10.0.5.\n \nSyntax\n------ \nTO_BASE64(str)\n \nDescription\n----------- \nConverts the string argument str to its base-64 encoded\nform, returning the result as a character string in the\nconnection character set and collation.\n \nThe argument str will be converted to string first if it is\nnot a string. A NULL argument will return a NULL result.\n \nThe reverse function, FROM_BASE64(), decodes an encoded\nbase-64 string.\n \nThere are a numerous different methods to base-64 encode a\nstring. The following are used by MariaDB and MySQL:\nAlphabet value 64 is encoded as \'+\'.\nAlphabet value 63 is encoded as \'/\'.\nEncoding output is made up of groups of four printable\ncharacters, with each three bytes of data encoded using four\ncharacters. If the final group is not complete, it is padded\nwith \'=\' characters to make up a length of four.\nTo divide long output, a newline is added after every 76\ncharacters.\nDecoding will recognize and ignore newlines, carriage\nreturns, tabs, and spaces. \n \nExamples\n-------- \nSELECT TO_BASE64(\'Maria\');\n+--------------------+\n| TO_BASE64(\'Maria\') |\n+--------------------+\n| TWFyaWE= |\n+--------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/to_base64/','','https://mariadb.com/kb/en/to_base64/'),(639,'TRIM',37,'Syntax\n------ \nTRIM([{BOTH | LEADING | TRAILING} [remstr] FROM] str),\nTRIM([remstr FROM] str)\n \nDescription\n----------- \nReturns the string str with all remstr prefixes or suffixes\nremoved. If none of the specifiers BOTH, LEADING, or\nTRAILING is given, BOTH is assumed. remstr is optional and,\nif not specified, spaces are removed.\n \nReturns NULL if given a NULL argument. If the result is\nempty, returns either an empty string, or, from MariaDB\n10.3.6 with SQL_MODE=Oracle, NULL.\n \nThe Oracle mode version of the function can be accessed\noutside of Oracle mode by using TRIM_ORACLE as the function\nname.\n \nExamples\n-------- \nSELECT TRIM(\' bar \')\\G\n*************************** 1. row\n***************************\nTRIM(\' bar \'): bar\n \nSELECT TRIM(LEADING \'x\' FROM \'xxxbarxxx\')\\G\n*************************** 1. row\n***************************\nTRIM(LEADING \'x\' FROM \'xxxbarxxx\'): barxxx\n \nSELECT TRIM(BOTH \'x\' FROM \'xxxbarxxx\')\\G\n*************************** 1. row\n***************************\nTRIM(BOTH \'x\' FROM \'xxxbarxxx\'): bar\n \nSELECT TRIM(TRAILING \'xyz\' FROM \'barxxyz\')\\G\n*************************** 1. row\n***************************\nTRIM(TRAILING \'xyz\' FROM \'barxxyz\'): barx\n \nOracle mode version from MariaDB 10.3.6:\n \nSELECT TRIM(\'\'),TRIM_ORACLE(\'\');\n+----------+-----------------+\n| TRIM(\'\') | TRIM_ORACLE(\'\') |\n+----------+-----------------+\n| | NULL |\n+----------+-----------------+\n \n\n\nURL: https://mariadb.com/kb/en/trim/','','https://mariadb.com/kb/en/trim/'),(641,'UNHEX',37,'Syntax\n------ \nUNHEX(str)\n \nDescription\n----------- \nPerforms the inverse operation of HEX(str). That is, it\ninterprets\neach pair of hexadecimal digits in the argument as a number\nand\nconverts it to the character represented by the number. The\nresulting\ncharacters are returned as a binary string.\n \nIf str is NULL, UNHEX() returns NULL.\n \nExamples\n-------- \nSELECT HEX(\'MariaDB\');\n+----------------+\n| HEX(\'MariaDB\') |\n+----------------+\n| 4D617269614442 |\n+----------------+\n \nSELECT UNHEX(\'4D617269614442\');\n+-------------------------+\n| UNHEX(\'4D617269614442\') |\n+-------------------------+\n| MariaDB |\n+-------------------------+\n \nSELECT 0x4D617269614442;\n \n+------------------+\n| 0x4D617269614442 |\n+------------------+\n| MariaDB |\n+------------------+\n \nSELECT UNHEX(HEX(\'string\'));\n+----------------------+\n| UNHEX(HEX(\'string\')) |\n+----------------------+\n| string |\n+----------------------+\n \nSELECT HEX(UNHEX(\'1267\'));\n+--------------------+\n| HEX(UNHEX(\'1267\')) |\n+--------------------+\n| 1267 |\n+--------------------+\n \n\n\nURL: https://mariadb.com/kb/en/unhex/','','https://mariadb.com/kb/en/unhex/'),(642,'UPDATEXML',37,'Syntax\n------ \nUpdateXML(xml_target, xpath_expr, new_xml)\n \nDescription\n----------- \nThis function replaces a single portion of a given fragment\nof XML markup\nxml_target with a new XML fragment new_xml, and then returns\nthe\nchanged XML. The portion of xml_target that is replaced\nmatches an XPath\nexpression xpath_expr supplied by the user. If no expression\nmatching\nxpath_expr is found, or if multiple matches are found, the\nfunction returns\nthe original xml_target XML fragment. All three arguments\nshould be\nstrings.\n \nExamples\n-------- \nSELECT\n UpdateXML(\'ccc\', \'/a\', \'fff\') AS val1,\n UpdateXML(\'ccc\', \'/b\', \'fff\') AS val2,\n UpdateXML(\'ccc\', \'//b\', \'fff\') AS val3,\n UpdateXML(\'ccc\', \'/a/d\', \'fff\') AS val4,\n UpdateXML(\'ccc\', \'/a/d\', \'fff\') AS val5\n \\G\n*************************** 1. row\n***************************\nval1: fff\nval2: ccc\nval3: fff\nval4: cccfff\nval5: ccc\n1 row in set (0.00 sec)\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/updatexml/','','https://mariadb.com/kb/en/updatexml/'),(644,'WEIGHT_STRING',37,'The WEIGHT_STRING function was introduced in MariaDB 10.0.5.\n \nSyntax\n------ \nWEIGHT_STRING(str [AS {CHAR|BINARY}(N)] [LEVEL levels]\n[flags])\n levels: N [ASC|DESC|REVERSE] [, N [ASC|DESC|REVERSE]] ... \n \nDescription\n----------- \nReturns a binary string representing the string\'s sorting\nand comparison value. A string with a lower result means\nthat for sorting purposes the string appears before a string\nwith a higher result.\n \nWEIGHT_STRING() is particularly useful when adding new\ncollations, for testing purposes.\n \nIf str is a non-binary string (CHAR, VARCHAR or TEXT),\nWEIGHT_STRING returns the string\'s collation weight. If str\nis a binary string (BINARY, VARBINARY or BLOB), the return\nvalue is simply the input value, since the weight for each\nbyte in a binary string is the byte value.\n \nWEIGHT_STRING() returns NULL if given a NULL input. \n \nThe optional AS clause permits casting the input string to a\nbinary or non-binary string, as well as to a particular\nlength.\n \nAS BINARY(N) measures the length in bytes rather than\ncharacters, and right pads with 0x00 bytes to the desired\nlength. \n \nAS CHAR(N) measures the length in characters, and right pads\nwith spaces to the desired length.\n \nN has a minimum value of 1, and if it is less than the\nlength of the input string, the string is truncated without\nwarning.\n \nThe optional LEVEL clause specifies that the return value\nshould contain weights for specific collation levels. The\nlevels specifier can either be a single integer, a\ncomma-separated list of integers, or a range of integers\nseparated by a dash (whitespace is ignored). Integers can\nrange from 1 to a maximum of 6, dependent on the collation,\nand need to be listed in ascending order.\n \nIf the LEVEL clause is no provided, a default of 1 to the\nmaximum for the collation is assumed.\n \nIf the LEVEL is specified without using a range, an optional\nmodifier is permitted.\n \nASC, the default, returns the weights without any\nmodification.\n \nDESC returns bitwise-inverted weights.\n \nREVERSE returns the weights in reverse order.\n \nExamples\n-------- \nThe examples below use the HEX() function to represent\nnon-printable results in hexadecimal format.\n \nSELECT HEX(WEIGHT_STRING(\'x\'));\n+-------------------------+\n| HEX(WEIGHT_STRING(\'x\')) |\n+-------------------------+\n| 0058 |\n+-------------------------+\n \nSELECT HEX(WEIGHT_STRING(\'x\' AS BINARY(4)));\n+--------------------------------------+\n| HEX(WEIGHT_STRING(\'x\' AS BINARY(4))) |\n+--------------------------------------+\n| 78000000 |\n+--------------------------------------+\n \nSELECT HEX(WEIGHT_STRING(\'x\' AS CHAR(4)));\n+------------------------------------+\n| HEX(WEIGHT_STRING(\'x\' AS CHAR(4))) |\n+------------------------------------+\n| 0058002000200020 |\n+------------------------------------+\n \nSELECT HEX(WEIGHT_STRING(0xaa22ee LEVEL 1));\n+--------------------------------------+\n| HEX(WEIGHT_STRING(0xaa22ee LEVEL 1)) |\n+--------------------------------------+\n| AA22EE |\n+--------------------------------------+\n \nSELECT HEX(WEIGHT_STRING(0xaa22ee LEVEL 1 DESC));\n+-------------------------------------------+\n| HEX(WEIGHT_STRING(0xaa22ee LEVEL 1 DESC)) |\n+-------------------------------------------+\n| 55DD11 |\n+-------------------------------------------+\n \nSELECT HEX(WEIGHT_STRING(0xaa22ee LEVEL 1 REVERSE));\n+----------------------------------------------+\n| HEX(WEIGHT_STRING(0xaa22ee LEVEL 1 REVERSE)) |\n+----------------------------------------------+\n| EE22AA |\n+----------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/weight_string/','','https://mariadb.com/kb/en/weight_string/'),(645,'ALTER DATABASE',39,'Modifies a database, changing its overall characteristics.\n \nSyntax\n------ \nALTER {DATABASE | SCHEMA} [db_name]\n alter_specification ...\nALTER {DATABASE | SCHEMA} db_name\n UPGRADE DATA DIRECTORY NAME\n \nalter_specification:\n [DEFAULT] CHARACTER SET [=] charset_name\n | [DEFAULT] COLLATE [=] collation_name\n \nDescription\n----------- \nALTER DATABASE enables you to change the overall\ncharacteristics of a\ndatabase. These characteristics are stored in the db.opt\nfile in the\ndatabase directory. To use ALTER DATABASE, you need the\nALTER\nprivilege on the database. ALTER SCHEMA is a synonym for\nALTER\nDATABASE.\n \nThe CHARACTER SET clause changes the default database\ncharacter set.\nThe COLLATE clause changes the default database collation.\nSee Character Sets and Collations for more.\n \nYou can see what character sets and collations are available\nusing,\nrespectively, the SHOW CHARACTER SET and SHOW COLLATION\nstatements.\n \nChanging the default character set/collation of a database\ndoes not change the character set/collation of any stored\nprocedures or stored functions that were previously created,\nand relied on the defaults. These need to be dropped and\nrecreated in order to apply the character set/collation\nchanges.\n \nThe database name can be omitted from the first syntax, in\nwhich case\nthe statement applies to the default database.\n \nThe syntax that includes the UPGRADE DATA DIRECTORY NAME\nclause was\nadded in MySQL 5.1.23. It updates the name of the directory\nassociated\nwith the database to use the encoding implemented in MySQL\n5.1 for\nmapping database names to database directory names (see\nIdentifier to File Name Mapping). This\nclause is for use under these conditions:\nIt is intended when upgrading MySQL to 5.1 or later from\nolder versions.\nIt is intended to update a database directory name to the\ncurrent encoding format if the name contains special\ncharacters that need encoding.\nThe statement is used by mysqlcheck (as invoked by\nmysql_upgrade).\n \nFor example,if a database in MySQL 5.0 has a name of a-b-c,\nthe name\ncontains instance of the `-\' character. In 5.0, the\ndatabase directory\nis also named a-b-c, which is not necessarily safe for all\nfile\nsystems. In MySQL 5.1 and up, the same database name is\nencoded as\na@002db@002dc to produce a file system-neutral directory\nname.\n \nWhen a MySQL installation is upgraded to MySQL 5.1 or later\nfrom an\nolder version,the server displays a name such as a-b-c\n(which is in\nthe old format) as #mysql50#a-b-c, and you must refer to the\nname\nusing the #mysql50# prefix. Use UPGRADE DATA DIRECTORY NAME\nin this\ncase to explicitly tell the server to re-encode the database\ndirectory\nname to the current encoding format:\n \nALTER DATABASE `#mysql50#a-b-c` UPGRADE DATA DIRECTORY NAME;\n \nAfter executing this statement, you can refer to the\ndatabase as a-b-c\nwithout the special #mysql50# prefix.\n \nExamples\n-------- \nALTER DATABASE test CHARACTER SET = \'utf8\' COLLATE =\n\'utf8_bin\';\n \n\n\nURL: https://mariadb.com/kb/en/alter-database/','','https://mariadb.com/kb/en/alter-database/'),(646,'ALTER EVENT',39,'Modifies one or more characteristics of an existing event.\n \nSyntax\n------ \nALTER\n [DEFINER = { user | CURRENT_USER }]\n EVENT event_name\n [ON SCHEDULE schedule]\n [ON COMPLETION [NOT] PRESERVE]\n [RENAME TO new_event_name]\n [ENABLE | DISABLE | DISABLE ON SLAVE]\n [COMMENT \'comment\']\n [DO sql_statement]\n \nDescription\n----------- \nThe ALTER EVENT statement is used to change one or more of\nthe\ncharacteristics of an existing event without the need to\ndrop and recreate it.\nThe syntax for each of the DEFINER, ON SCHEDULE, ON\nCOMPLETION,\nCOMMENT, ENABLE / DISABLE, and DO clauses is exactly the\nsame as when used with CREATE EVENT.\n \nThis statement requires the EVENT privilege.\nWhen a user executes a successful ALTER EVENT statement,\nthat user becomes\nthe definer for the affected event.\n \n(In MySQL 5.1.11 and earlier, an event could be altered only\nby its definer, or\nby a user having the SUPER privilege.)\n \nALTER EVENT works only with an existing event:\n \nALTER EVENT no_such_event ON SCHEDULE EVERY \'2:3\'\nDAY_HOUR;\nERROR 1539 (HY000): Unknown event \'no_such_event\'\n \nExamples\n-------- \nALTER EVENT myevent \n ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 2 HOUR \n DO \n UPDATE myschema.mytable SET mycol = mycol + 1;\n \n\n\nURL: https://mariadb.com/kb/en/alter-event/','','https://mariadb.com/kb/en/alter-event/'),(647,'ALTER FUNCTION',39,'Syntax\n------ \nALTER FUNCTION func_name [characteristic ...]\n \ncharacteristic:\n { CONTAINS SQL | NO SQL | READS SQL DATA | MODIFIES SQL\nDATA }\n | SQL SECURITY { DEFINER | INVOKER }\n | COMMENT \'string\'\n \nDescription\n----------- \nThis statement can be used to change the characteristics of\na stored\nfunction. More than one change may be specified in an ALTER\nFUNCTION\nstatement. However, you cannot change the parameters or body\nof a\nstored function using this statement; to make such changes,\nyou must\ndrop and re-create the function using DROP FUNCTION and\nCREATE FUNCTION.\n \nYou must have the ALTER ROUTINE privilege for the function.\n(That\nprivilege is granted automatically to the function creator.)\nIf binary\nlogging is enabled, the ALTER FUNCTION statement might also\nrequire\nthe SUPER privilege, as described in Binary Logging of\nStored Routines.\n \nExample\n \nALTER FUNCTION hello SQL SECURITY INVOKER;\n \n\n\nURL: https://mariadb.com/kb/en/alter-function/','','https://mariadb.com/kb/en/alter-function/'),(649,'ALTER PROCEDURE',39,'Syntax\n------ \nALTER PROCEDURE proc_name [characteristic ...]\n \ncharacteristic:\n { CONTAINS SQL | NO SQL | READS SQL DATA | MODIFIES SQL\nDATA }\n | SQL SECURITY { DEFINER | INVOKER }\n | COMMENT \'string\'\n \nDescription\n----------- \nThis statement can be used to change the characteristics of\na stored\nprocedure. More than one change may be specified in an ALTER\nPROCEDURE\nstatement. However, you cannot change the parameters or body\nof a\nstored procedure using this statement. To make such changes,\nyou must\ndrop and re-create the procedure using either CREATE OR\nREPLACE PROCEDURE (since MariaDB 10.1.3) or DROP PROCEDURE\nand CREATE PROCEDURE (MariaDB 10.1.2 and before).\n \nYou must have the ALTER ROUTINE privilege for the procedure.\nBy default, that privilege is granted automatically to the\nprocedure creator. See Stored Routine Privileges.\n \nExample\n \nALTER PROCEDURE simpleproc SQL SECURITY INVOKER;\n \n\n\nURL: https://mariadb.com/kb/en/alter-procedure/','','https://mariadb.com/kb/en/alter-procedure/'),(654,'ALTER VIEW',39,'Syntax\n------ \nALTER\n [ALGORITHM = {UNDEFINED | MERGE | TEMPTABLE}]\n [DEFINER = { user | CURRENT_USER }]\n [SQL SECURITY { DEFINER | INVOKER }]\n VIEW view_name [(column_list)]\n AS select_statement\n [WITH [CASCADED | LOCAL] CHECK OPTION]\n \nDescription\n----------- \nThis statement changes the definition of a view, which must\nexist. The\nsyntax is similar to that for CREATE VIEW and the effect is\nthe same\nas for CREATE OR REPLACE VIEW if the view exists. This\nstatement\nrequires the CREATE VIEW and DROP privileges for the view,\nand some\nprivilege for each column referred to in the SELECT\nstatement. As of\nMariaDB 5.1.23, ALTER VIEW is allowed only to the definer or\nusers with\nthe SUPER privilege.\n \nExample\n \nALTER VIEW v AS SELECT a, a*3 AS a2 FROM t;\n \n\n\nURL: https://mariadb.com/kb/en/alter-view/','','https://mariadb.com/kb/en/alter-view/'),(656,'CREATE DATABASE',39,'Syntax\n------ \nCREATE [OR REPLACE] {DATABASE | SCHEMA} [IF NOT EXISTS]\ndb_name\n [create_specification] ...\n \ncreate_specification:\n [DEFAULT] CHARACTER SET [=] charset_name\n | [DEFAULT] COLLATE [=] collation_name\n \nDescription\n----------- \nCREATE DATABASE creates a database with the given name. To\nuse this statement, you need the CREATE privilege for the\ndatabase. CREATE SCHEMA is a synonym for CREATE DATABASE.\n \nFor valid identifiers to use as database names, see\nIdentifier Names.\n \nOR REPLACE\n \nThe OR REPLACE clause was added in MariaDB 10.1.3\n \nIf the optional OR REPLACE clause is used, it acts as a\nshortcut for:\n \nDROP DATABASE IF EXISTS db_name;\n \nCREATE DATABASE db_name ...;\n \nIF NOT EXISTS\n \nWhen the IF NOT EXISTS clause is used, MariaDB will return a\nwarning instead of an error if the specified database\nalready exists.\n \nExamples\n-------- \nCREATE DATABASE db1;\n \nQuery OK, 1 row affected (0.18 sec)\n \nCREATE DATABASE db1;\n \nERROR 1007 (HY000): Can\'t create database \'db1\'; database\nexists\n \nCREATE OR REPLACE DATABASE db1;\nQuery OK, 2 rows affected (0.00 sec)\n \nCREATE DATABASE IF NOT EXISTS db1;\nQuery OK, 1 row affected, 1 warning (0.01 sec)\n \nSHOW WARNINGS;\n+-------+------+----------------------------------------------+\n| Level | Code | Message |\n+-------+------+----------------------------------------------+\n| Note | 1007 | Can\'t create database \'db1\';\n database exists |\n+-------+------+----------------------------------------------+\n \nSetting the character sets and collation. See Setting\nCharacter Sets and Collations for more details.\n \nCREATE DATABASE czech_slovak_names \n CHARACTER SET = \'keybcs2\'\n COLLATE = \'keybcs2_bin\';\n \n\n\nURL: https://mariadb.com/kb/en/create-database/','','https://mariadb.com/kb/en/create-database/'),(650,'ALTER SEQUENCE',39,'ALTER SEQUENCE was introduced in MariaDB 10.3.\n \nSyntax\n------ \nALTER SEQUENCE [IF EXISTS] sequence_name\n[ INCREMENT [ BY | = ] increment ]\n[ MINVALUE [=] minvalue | NO MINVALUE | NOMINVALUE ]\n[ MAXVALUE [=] maxvalue | NO MAXVALUE | NOMAXVALUE ]\n[ START [ WITH | = ] start ] [ CACHE [=] cache ] [ [ NO ]\nCYCLE ]\n[ RESTART [[WITH | =] restart]\n \nALTER SEQUENCE allows one to change any values for a\nSEQUENCE created with CREATE SEQUENCE.\n \nThe options for ALTER SEQUENCE can be given in any order.\n \nDescription\n----------- \nALTER SEQUENCE changes the parameters of an existing\nsequence generator. Any parameters not specifically set in\nthe ALTER SEQUENCE command retain their prior settings.\n \nALTER SEQUENCE requires the ALTER privilege.\n \nArguments to ALTER SEQUENCE\n \nThe following options may be used:\n \nOption | Default value | Description | \n \nINCREMENT | 1 | Increment to use for values. May be\nnegative. | \n \nMINVALUE | 1 if INCREMENT > 0 and -9223372036854775807 if\nINCREMENT < 0 | Minimum value for the sequence. | \n \nMAXVALUE | 9223372036854775806 if INCREMENT > 0 and -1 if\nINCREMENT < 0 | Max value for sequence. | \n \nSTART | MINVALUE if INCREMENT > 0 and MAX_VALUE if\nINCREMENT< 0 | First value that the sequence will generate.\n| \n \nCACHE | 1000 | Number of values that should be cached. 0 if\nno CACHE. The underlying table will be updated first time a\nnew sequence number is generated and each time the cache\nruns out. | \n \nCYCLE | 0 (= NO CYCLE) | 1 if the sequence should start\nagain from MINVALUE# after it has run out of values. | \n \nRESTART | START if restart value not is given |  If RESTART\noption is used, NEXT VALUE will return the restart value. | \n \nThe optional clause RESTART [ WITH restart ] sets the next\nvalue for the sequence. This is equivalent to calling the\nSETVAL() function with the is_used argument as 0. The\nspecified value will be returned by the next call of\nnextval. Using RESTART with no restart value is\nequivalent to supplying the start value that was recorded by\nCREATE SEQUENCE or last set by ALTER SEQUENCE START WITH.\n \nALTER SEQUENCE will not allow you to change the sequence so\nthat it\'s inconsistent. For example:\n \nCREATE SEQUENCE s1;\nALTER SEQUENCE s1 MINVALUE 10;\nERROR 4061 (HY000): Sequence \'test.t1\' values are\nconflicting\n \nALTER SEQUENCE s1 MINVALUE 10 RESTART 10;\nERROR 4061 (HY000): Sequence \'test.t1\' values are\nconflicting\n \nALTER SEQUENCE s1 MINVALUE 10 START 10 RESTART 10;\n \nINSERT\n \nTo allow SEQUENCE objects to be backed up by old tools, like\nmysqldump, one can use SELECT to read the current state of a\nSEQUENCE object and use an INSERT to update the SEQUENCE\nobject. INSERT is only allowed if all fields are specified:\n \nCREATE SEQUENCE s1;\nINSERT INTO s1 VALUES(1000,10,2000,1005,1,1000,0,0);\nSELECT * FROM s1;\n \n+------------+-----------+-----------+-------+-----------+-------+-------+-------+\n| next_value | min_value | max_value | start | increment |\ncache | cycle | round |\n+------------+-----------+-----------+-------+-----------+-------+-------+-------+\n| 1000 | 10 | 2000 | 1005 | 1 | 1000 | 0 | 0 |\n+------------+-----------+-----------+-------+-----------+-------+-------+-------+\n \nSHOW CREATE SEQUENCE s1;\n+-------+--------------------------------------------------------------------------------------------------------------+\n| Table | Create Table |\n+-------+--------------------------------------------------------------------------------------------------------------+\n| s1 | CREATE SEQUENCE `s1` start with 1005 minvalue 10\nmaxvalue 2000 increment by 1 cache 1000 nocycle ENGINE=Aria\n|\n+-------+--------------------------------------------------------------------------------------------------------------+\n \nNotes\n \nALTER SEQUENCE will instantly affect all future SEQUENCE\noperations. This is in contrast to some other databases\nwhere the changes requested by ALTER SEQUENCE will not be\nseen until the sequence cache has run out.\n \nALTER SEQUENCE will take a full table lock of the sequence\nobject during\nits (brief) operation. This ensures that ALTER SEQUENCE is\nreplicated\ncorrectly. If you only want to set the next sequence value\nto a\nhigher value than current, then you should use SETVAL()\ninstead, as this is not blocking.\n \nIf you want to change storage engine, sequence comment or\nrename the sequence, you can use ALTER TABLE for this.\n \n\n\nURL: https://mariadb.com/kb/en/alter-sequence/','','https://mariadb.com/kb/en/alter-sequence/'),(660,'CREATE PACKAGE',39,'Oracle-style packages were introduced in MariaDB 10.3.5.\n \nSyntax\n------ \nCREATE\n [ OR REPLACE]\n [DEFINER = { user | CURRENT_USER | role | CURRENT_ROLE }]\n PACKAGE [ IF NOT EXISTS ]\n [ db_name . ] package_name\n [ package_characteristic ... ]\n{ AS | IS }\n [ package_specification_element ... ]\nEND [ package_name ]\n \npackage_characteristic:\n COMMENT \'string\'\n | SQL SECURITY { DEFINER | INVOKER }\n \npackage_specification_element:\n FUNCTION_SYM package_specification_function ;\n | PROCEDURE_SYM package_specification_procedure ;\n \npackage_specification_function:\n func_name [ ( func_param [, func_param]... ) ]\n RETURNS func_return_type\n [ package_routine_characteristic... ]\n \npackage_specification_procedure:\n proc_name [ ( proc_param [, proc_param]... ) ]\n [ package_routine_characteristic... ]\n \nfunc_return_type:\n type\n \nfunc_param:\n param_name type\n \nproc_param:\n param_name { IN | OUT | INOUT | IN OUT } type\n \ntype:\n Any valid MariaDB explicit or anchored data type\n \npackage_routine_characteristic:\n COMMENT \'string\'\n | LANGUAGE SQL\n | { CONTAINS SQL | NO SQL | READS SQL DATA | MODIFIES SQL\nDATA }\n | SQL SECURITY { DEFINER | INVOKER }\n \nDescription\n----------- \nThe CREATE PACKAGE statement can be used when Oracle\nSQL_MODE is set.\n \nThe CREATE PACKAGE creates the specification for a stored\npackage (a collection of logically related stored objects).\nA stored package specification declares public routines\n(procedures and functions) of the package, but does not\nimplement these routines.\n \nA package whose specification was created by the CREATE\nPACKAGE statement, should later be implemented using the\nCREATE PACKAGE BODY statement.\n \nExamples\n-------- \nSET sql_mode=ORACLE;\nDELIMITER $$\nCREATE OR REPLACE PACKAGE employee_tools AS\n FUNCTION getSalary(eid INT) RETURN DECIMAL(10,2);\n PROCEDURE raiseSalary(eid INT, amount DECIMAL(10,2));\n PROCEDURE raiseSalaryStd(eid INT);\n PROCEDURE hire(ename TEXT, esalary DECIMAL(10,2));\nEND;\n$$\nDELIMITER ;\n \n\n\nURL: https://mariadb.com/kb/en/create-package/','','https://mariadb.com/kb/en/create-package/'),(655,'CONSTRAINT',39,'MariaDB supports the implementation of constraints at the\ntable-level using either CREATE TABLE or ALTER TABLE\nstatements. A table constraint restricts the data you can\nadd to the table. If you attempt to insert invalid data on a\ncolumn, MariaDB throws an error. \n \nSyntax\n------ \n[CONSTRAINT [symbol]] constraint_expression\n \nconstraint_expression:\n | PRIMARY KEY [index_type] (index_col_name, ...)\n[index_option] ...\n | FOREIGN KEY [index_name] (index_col_name, ...) \n REFERENCES tbl_name (index_col_name, ...)\n [ON DELETE reference_option]\n [ON UPDATE reference_option]\n | UNIQUE [INDEX|KEY] [index_name]\n [index_type] (index_col_name, ...) [index_option] ...\n | CHECK (check_constraints)\n \nindex_type:\n USING {BTREE | HASH | RTREE}\n \nindex_col_name:\n col_name [(length)] [ASC | DESC]\n \nindex_option:\n | KEY_BLOCK_SIZE [=] value\n | index_type\n | WITH PARSER parser_name\n | COMMENT \'string\'\n | CLUSTERING={YES|NO}\n \nreference_option:\n RESTRICT | CASCADE | SET NULL | NO ACTION | SET DEFAULT\n \nDescription\n----------- \nConstraints provide restrictions on the data you can add to\na table. This allows you to enforce data integrity from\nMariaDB, rather than through application logic. When a\nstatement violates a constraint, MariaDB throws an error.\n \nThere are four types of table constraints:\n \nConstraint | Description | \n \nPRIMARY KEY | Sets the column for referencing rows. Values\nmust be unique and not null. | \n \nFOREIGN KEY | Sets the column to reference the primary key\non another table. | \n \nUNIQUE | Requires values in column or columns only occur\nonce in the table. | \n \nCHECK | Checks whether the data meets the given condition. |\n\n \nFOREIGN KEY Constraints\n \nInnoDB supports foreign key constraints. The syntax for a\nforeign key\nconstraint definition in InnoDB looks like this:\n \n[CONSTRAINT [symbol]] FOREIGN KEY\n [index_name] (index_col_name, ...)\n REFERENCES tbl_name (index_col_name,...)\n [ON DELETE reference_option]\n [ON UPDATE reference_option]\n \nreference_option:\n RESTRICT | CASCADE | SET NULL | NO ACTION\n \nCHECK Constraints\n \nFrom MariaDB 10.2.1, constraints are enforced. Before\nMariaDB 10.2.1 constraint expressions were accepted in the\nsyntax but ignored.\n \nIn MariaDB 10.2.1 you can define constraints in 2 different\nways:\nCHECK(expression) given as part of a column definition.\nCONSTRAINT [constraint_name] CHECK (expression)\n \nBefore a row is inserted or updated, all constraints are\nevaluated in the order they are defined. If any constraint\nexpression returns false, then the row will not be inserted\nor updated.\nOne can use most deterministic functions in a constraint,\nincluding UDFs.\n \nCREATE TABLE t1 (a INT CHECK (a>2), b INT CHECK (b>2),\nCONSTRAINT a_greater CHECK (a>b));\n \nIf you use the second format and you don\'t give a name to\nthe constraint, then the constraint will get an\nautomatically generated name. This is done so that you can\nlater delete the constraint with ALTER TABLE DROP\nconstraint_name.\n \nOne can disable all constraint expression checks by setting\nthe check_constraint_checks variable to OFF. This is useful\nfor example when loading a table that violates some\nconstraints that you want to later find and fix in SQL.\n \nReplication\n \nIn row-based replication, only the master checks\nconstraints, and failed statements will not be replicated.\nIn statement-based replication, the slaves will also check\nconstraints. Constraints should therefore be identical, as\nwell as deterministic, in a replication environment.\n \nAuto_increment\n \nFrom MariaDB 10.2.6, auto_increment columns are no longer\npermitted in check constraints. Previously they were\npermitted, but would not work correctly. See MDEV-11117.\n \nExamples\n-------- \nCREATE TABLE product (category INT NOT NULL, id INT NOT\nNULL,\n price DECIMAL,\n PRIMARY KEY(category, id)) ENGINE=INNODB;\n \nCREATE TABLE customer (id INT NOT NULL,\n PRIMARY KEY (id)) ENGINE=INNODB;\n \nCREATE TABLE product_order (no INT NOT NULL AUTO_INCREMENT,\n product_category INT NOT NULL,\n product_id INT NOT NULL,\n customer_id INT NOT NULL,\n PRIMARY KEY(no),\n INDEX (product_category, product_id),\n FOREIGN KEY (product_category, product_id)\n REFERENCES product(category, id)\n ON UPDATE CASCADE ON DELETE RESTRICT,\n INDEX (customer_id),\n FOREIGN KEY (customer_id)\n REFERENCES customer(id)) ENGINE=INNODB;\n \nThe following examples will work from MariaDB 10.2.1\nonwards.\n \nNumeric constraints and comparisons:\n \nCREATE TABLE t1 (a INT CHECK (a>2), b INT CHECK (b>2),\nCONSTRAINT a_greater CHECK (a>b));\n \nINSERT INTO t1(a) VALUES (1);\nERROR 4022 (23000): CONSTRAINT `a` failed for `test`.`t1`\n \nINSERT INTO t1(a,b) VALUES (3,4);\nERROR 4022 (23000): CONSTRAINT `a_greater` failed for\n`test`.`t1`\n \nINSERT INTO t1(a,b) VALUES (4,3);\nQuery OK, 1 row affected (0.04 sec)\n \nDropping a constraint:\n \nALTER TABLE t1 DROP CONSTRAINT a_greater;\n \nAdding a constraint:\n \nALTER TABLE t1 ADD CONSTRAINT a_greater CHECK (a>b);\n \nDate comparisons and character length:\n \nCREATE TABLE t2 (name VARCHAR(30) CHECK\n(CHAR_LENGTH(name)>2), start_date DATE, \n end_date DATE CHECK (start_date IS NULL OR end_date IS NULL\nOR start_date2)), start_date DATE, \n end_date DATE CHECK (start_date IS NULL OR end_date IS NULL\nOR start_date2 is very different to CHAR_LENGTH(name>2) as\nthe latter mistakenly performs a numeric comparison on the\nname field, leading to unexpected results.\n \n\n\nURL: https://mariadb.com/kb/en/constraint/','','https://mariadb.com/kb/en/constraint/'),(657,'CREATE EVENT',39,'Syntax\n------ \nCREATE [OR REPLACE]\n [DEFINER = { user | CURRENT_USER | role | CURRENT_ROLE }]\n EVENT \n [IF NOT EXISTS]\n event_name \n ON SCHEDULE schedule\n [ON COMPLETION [NOT] PRESERVE]\n [ENABLE | DISABLE | DISABLE ON SLAVE]\n [COMMENT \'comment\']\n DO sql_statement;\n \nschedule:\n AT timestamp [+ INTERVAL interval] ...\n | EVERY interval \n [STARTS timestamp [+ INTERVAL interval] ...] \n [ENDS timestamp [+ INTERVAL interval] ...]\n \ninterval:\n quantity {YEAR | QUARTER | MONTH | DAY | HOUR | MINUTE |\n WEEK | SECOND | YEAR_MONTH | DAY_HOUR | DAY_MINUTE |\n DAY_SECOND | HOUR_MINUTE | HOUR_SECOND | MINUTE_SECOND}\n \nDescription\n----------- \nThis statement creates and schedules a new event. It\nrequires the\nEVENT privilege for the schema in which the event is to be\ncreated.\n \nThe minimum requirements for a valid CREATE EVENT statement\nare as\nfollows:\nThe keywords CREATE EVENT plus an event name, which uniquely\nidentifies\n the event in the current schema. (Prior to MySQL 5.1.12,\nthe event name\n needed to be unique only among events created by the same\nuser on a given\n database.)\nAn ON SCHEDULE clause, which determines when and how often\nthe event\n executes.\nA DO clause, which contains the SQL statement to be executed\nby an\n event.\n \nHere is an example of a minimal CREATE EVENT statement:\n \nCREATE EVENT myevent\n ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR\n DO\n UPDATE myschema.mytable SET mycol = mycol + 1;\n \nThe previous statement creates an event named myevent. This\nevent executes once\n— one hour following its creation\n— by running an SQL statement that increments the\nvalue of the myschema.mytable table\'s mycol column by 1.\n \nThe event_name must be a valid MariaDB identifier with a\nmaximum length\nof 64 characters. It may be delimited using back ticks, and\nmay be\nqualified with the name of a database schema. An event is\nassociated\nwith both a MariaDB user (the definer) and a schema, and its\nname must\nbe unique among names of events within that schema. In\ngeneral, the\nrules governing event names are the same as those for names\nof stored\nroutines. See Identifier Names.\n \nIf no schema is indicated as part of event_name, the default\n(current)\nschema is assumed.\n \nFor valid identifiers to use as event names, see Identifier\nNames.\n \nOR REPLACE\n \nThe OR REPLACE clause was included in MariaDB 10.1.4. If\nused and the event already exists, instead of an error being\nreturned, the existing event will be dropped and replaced by\nthe newly defined event.\n \nIF NOT EXISTS\n \nIf the IF NOT EXISTS clause is used, MariaDB will return a\nwarning instead of an error if the event already exists.\nCannot be used together with OR REPLACE.\n \nON SCHEDULE\n \nThe ON SCHEDULE clause can be used to specify when the event\nmust be triggered.\n \nAT\n \nIf you want to execute the event only once (one time event),\nyou can use the AT keyword, followed by a timestamp. If you\nuse CURRENT_TIMESTAMP, the event acts as soon as it is\ncreated. As a convenience, you can add one or more intervals\nto that timestamp. You can also specify a timestamp in the\npast, so that the event is stored but not triggered, until\nyou modify it via ALTER EVENT.\n \nThe following example shows how to create an event that will\nbe triggered tomorrow at a certain time:\n \nCREATE EVENT example\nON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 DAY + INTERVAL\n3 HOUR\nDO something;\n \nYou can also specify that an event must be triggered at a\nregular interval (recurring event). In such cases, use the\nEVERY clause followed by the interval.\n \nIf an event is recurring, you can specify when the first\nexecution must happen via the STARTS clause and a maximum\ntime for the last execution via the ENDS clause. STARTS and\nENDS clauses are followed by a timestamp and, optionally,\none or more intervals. The ENDS clause can specify a\ntimestamp in the past, so that the event is stored but not\nexecuted until you modify it via ALTER EVENT.\n \nIn the following example, next month a recurring event will\nbe triggered hourly for a week:\n \nCREATE EVENT example\nON SCHEDULE EVERY 1 HOUR\nSTARTS CURRENT_TIMESTAMP + INTERVAL 1 MONTH\nENDS CURRENT_TIMESTAMP + INTERVAL 1 MONTH + INTERVAL 1 WEEK\nDO some_task;\n \nIntervals consist of a quantity and a time unit. The time\nunits are the same used for other staments and time\nfunctions, except that you can\'t use microseconds for\nevents. For simple time units, like HOUR or MINUTE, the\nquantity is an integer number, for example \'10 MINUTE\'.\nFor composite time units, like HOUR_MINUTE or HOUR_SECOND,\nthe quantity must be a string with all involved simple\nvalues and their separators, for example \'2:30\' or\n\'2:30:30\'.\n \nON COMPLETION [NOT] PRESERVE\n \nThe ON COMPLETION clause can be used to specify if the event\nmust be deleted after its last execution (that is, after its\nAT or ENDS timestamp is past). By default, events are\ndropped when they are expired. To explicitly state that this\nis the desired behaviour, you can use ON COMPLETION NOT\nPRESERVE. Instead, if you want the event to be preserved,\nyou can use ON COMPLETION PRESERVE.\n \nIn you specify ON COMPLETION NOT PRESERVE, and you specify a\ntimestamp in the past for AT or ENDS clause, the event will\nbe immediatly dropped. In such cases, you will get a Note\n1558: \"Event execution time is in the past and ON\nCOMPLETION NOT PRESERVE is set. The event was dropped\nimmediately after creation\".\n \nENABLE/DISABLE/DISABLE ON SLAVE\n \nEvents are ENABLEd by default. If you want to stop MariaDB\nfrom executing\nan event, you may specify DISABLE. When it is ready to be\nactivated, you\nmay enable it using ALTER EVENT. Another option is\nDISABLE ON SLAVE, which indicates that an event was created\non a master and has been replicated to the slave, which is\nprevented from executing the event. If DISABLE ON SLAVE is\nspecifically set, the event will not be executed.\n \nCOMMENT\n \nThe COMMENT clause may be used to set a comment for the\nevent. Maximum\nlength for comments is 64 characters. The comment is a\nstring, so it must be\nquoted. To see events comments, you can query the\nINFORMATION_SCHEMA.EVENTS table (the column is named\nEVENT_COMMENT).\n \nExamples\n-------- \nMinimal CREATE EVENT statement:\n \nCREATE EVENT myevent\n ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR\n DO\n UPDATE myschema.mytable SET mycol = mycol + 1;\n \nAn event that will be triggered tomorrow at a certain time:\n \nCREATE EVENT example\nON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 DAY + INTERVAL\n3 HOUR\nDO something;\n \nNext month a recurring event will be triggered hourly for a\nweek:\n \nCREATE EVENT example\nON SCHEDULE EVERY 1 HOUR\nSTARTS CURRENT_TIMESTAMP + INTERVAL 1 MONTH\nENDS CURRENT_TIMESTAMP + INTERVAL 1 MONTH + INTERVAL 1 WEEK\nDO some_task;\n \nOR REPLACE and IF NOT EXISTS:\n \nCREATE EVENT myevent\n ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR\n DO\n UPDATE myschema.mytable SET mycol = mycol + 1;\n \nERROR 1537 (HY000): Event \'myevent\' already exists\n \nCREATE OR REPLACE EVENT myevent\n ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR\n DO\n UPDATE myschema.mytable SET mycol = mycol + 1;;\nQuery OK, 0 rows affected (0.00 sec)\n \nCREATE EVENT IF NOT EXISTS myevent\n ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR\n DO\n UPDATE myschema.mytable SET mycol = mycol + 1;\n \nQuery OK, 0 rows affected, 1 warning (0.00 sec)\n \n SHOW WARNINGS;\n \n+-------+------+--------------------------------+\n| Level | Code | Message |\n+-------+------+--------------------------------+\n| Note | 1537 | Event \'myevent\' already exists |\n+-------+------+--------------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/create-event/','','https://mariadb.com/kb/en/create-event/'),(659,'CREATE INDEX',39,'Syntax\n------ \nCREATE [OR REPLACE] [UNIQUE|FULLTEXT|SPATIAL] INDEX \n [IF NOT EXISTS] index_name\n [index_type]\n ON tbl_name (index_col_name,...)\n [WAIT n | NOWAIT]\n [index_option]\n [algorithm_option | lock_option] ...\n \nindex_col_name:\n col_name [(length)] [ASC | DESC]\n \nindex_type:\n USING {BTREE | HASH | RTREE}\n \nindex_option:\n KEY_BLOCK_SIZE [=] value\n | index_type\n | WITH PARSER parser_name\n | COMMENT \'string\'\n \nalgorithm_option:\n ALGORITHM [=] {DEFAULT|INPLACE|COPY|NOCOPY|INSTANT}\n \nlock_option:\n LOCK [=] {DEFAULT|NONE|SHARED|EXCLUSIVE}\n \nDescription\n----------- \nCREATE INDEX is mapped to an ALTER TABLE statement to create\nindexes.\nSee ALTER TABLE. CREATE INDEX cannot be used to create a\nPRIMARY KEY; use ALTER TABLE instead.\n \nIf another connection is using the table, a metadata lock is\nactive, and this statement will wait until the lock is\nreleased. This is also true for non-transactional tables.\n \nAnother shortcut, DROP INDEX, allows the removal of an\nindex.\n \nFor valid identifiers to use as index names, see Identifier\nNames.\n \nNote that KEY_BLOCK_SIZE is currently ignored in CREATE\nINDEX, although it is included in the output of SHOW CREATE\nTABLE.\n \nPrivileges\n \nExecuting the CREATE INDEX statement requires the INDEX\nprivilege for the table or the database.\n \nOnline DDL\n \nIn MariaDB 10.0 and later, online DDL is supported with the\nALGORITHM and LOCK clauses.\n \nSee InnoDB Online DDL Overview for more information on\nonline DDL with InnoDB.\n \nCREATE OR REPLACE INDEX ...\n \nThe OR REPLACE clause was added in MariaDB 10.1.4.\n \nIf the OR REPLACE clause is used and if the index already\nexists, then instead of returning an error, the server will\ndrop the existing index and replace it with the newly\ndefined index.\n \nCREATE INDEX IF NOT EXISTS ...\n \nIf the IF NOT EXISTS clause is used, then the index will\nonly be created if an index with the same name does not\nalready exist. If the index already exists, then a warning\nwill be triggered by default.\n \nIndex Definitions\n \nSee CREATE TABLE: Index Definitions for information about\nindex definitions.\n \nWAIT/NOWAIT\n \nSet the lock wait timeout. See WAIT and NOWAIT.\n \nALGORITHM\n \nSee ALTER TABLE: ALGORITHM for more information.\n \nLOCK\n \nSee ALTER TABLE: LOCK for more information.\n \nProgress Reporting\n \nMariaDB provides progress reporting for CREATE INDEX\nstatement for clients\nthat support the new progress reporting protocol. For\nexample, if you were using the mysql client, then the\nprogress report might look like this::\n \nCREATE INDEX ON tab (num);;\nStage: 1 of 2 \'copy to tmp table\' 46% of stage\n \nThe progress report is also shown in the output of the SHOW\nPROCESSLIST statement and in the contents of the\ninformation_schema.PROCESSLIST table.\n \nSee Progress Reporting for more information.\n \nExamples\n-------- \nCreating a unique index:\n \nCREATE UNIQUE INDEX HomePhone ON Employees(Home_Phone);\n \nOR REPLACE and IF NOT EXISTS:\n \nCREATE INDEX xi ON xx5 (x);\nQuery OK, 0 rows affected (0.03 sec)\n \nCREATE INDEX xi ON xx5 (x);\nERROR 1061 (42000): Duplicate key name \'xi\'\n \nCREATE OR REPLACE INDEX xi ON xx5 (x);\nQuery OK, 0 rows affected (0.03 sec)\n \nCREATE INDEX IF NOT EXISTS xi ON xx5 (x);\nQuery OK, 0 rows affected, 1 warning (0.00 sec)\n \nSHOW WARNINGS;\n \n+-------+------+-------------------------+\n| Level | Code | Message |\n+-------+------+-------------------------+\n| Note | 1061 | Duplicate key name \'xi\' |\n+-------+------+-------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/create-index/','','https://mariadb.com/kb/en/create-index/'),(663,'CREATE SEQUENCE',39,'CREATE SEQUENCE was introduced in MariaDB 10.3.\n \nSyntax\n------ \nCREATE [OR REPLACE] [TEMPORARY] SEQUENCE [IF NOT EXISTS]\nsequence_name\n[ INCREMENT [ BY | = ] increment ]\n[ MINVALUE [=] minvalue | NO MINVALUE | NOMINVALUE ]\n[ MAXVALUE [=] maxvalue | NO MAXVALUE | NOMAXVALUE ]\n[ START [ WITH | = ] start ] \n[ CACHE [=] cache | NOCACHE ] [ CYCLE | NOCYCLE] \n[table_options]\n \nThe options for CREATE SEQUENCE can be given in any order,\noptionally followed by table_options.\n \ntable_options can be any of the normal table options in\nCREATE TABLE but the most usable ones are ENGINE=... and\nCOMMENT=.\n \nNOMAXVALUE and NOMINVALUE are there to allow one to create\nSEQUENCEs using the Oracle syntax.\n \nDescription\n----------- \nCREATE SEQUENCE will create a sequence that generates new\nvalues when called with NEXT VALUE FOR sequence_name. It\'s\nan alternative to AUTO INCREMENT when one wants to have more\ncontrol of how the numbers are generated. As the SEQUENCE\ncaches values (up to CACHE) it can in some cases be much\nfaster than AUTO INCREMENT. Another benefit is that one can\naccess the last value generated by all used sequences, which\nsolves one of the limitations with LAST_INSERT_ID().\n \nCREATE SEQUENCE requires the CREATE privilege.\n \nDROP SEQUENCE can be used to drop a sequence, and ALTER\nSEQUENCE to change it.\n \nArguments to Create\n \nThe following options may be used:\n \nOption | Default value |  Description | \n \nINCREMENT |  1 | Increment to use for values. May be\nnegative. Setting an increment of 0 causes the sequence to\nuse the value of the auto_increment_increment system\nvariable at the time of creation, which is always a positive\nnumber. (see MDEV-16035). | \n \nMINVALUE | 1 if INCREMENT > 0 and -9223372036854775807 if\nINCREMENT < 0 | Minimum value for the sequence | \n \nMAXVALUE | 9223372036854775806 if INCREMENT > 0 and -1 if\nINCREMENT < 0 | Max value for sequence | \n \nSTART | MINVALUE if INCREMENT > 0 and MAX_VALUE if\nINCREMENT< 0 | First value that the sequence will generate |\n\n \nCACHE | 1000 |  Number of values that should be cached. 0\nif no CACHE. The underlying table will be updated first time\na new sequence number is generated and each time the cache\nruns out. | \n \nIf CYCLE is used then the sequence should start again from\nMINVALUE after it has run out of values. Default value is\nNOCYCLE.\n \nConstraints on Create Arguments\n \nTo be able to create a legal sequence, the following must\nhold:\nMAXVALUE >= start\nMAXVALUE > MINVALUE\nSTART >= MINVALUE\nMAXVALUE = -9223372036854775807 (LONGLONG_MIN+1)\n \nNote that sequences can\'t generate the maximum/minimum 64\nbit number because of the constraint of\nMINVALUE and MAXVALUE. \n \nExamples\n-------- \nCREATE SEQUENCE s START WITH 100 INCREMENT BY 10;\n \nCREATE SEQUENCE s2 START WITH -100 INCREMENT BY -10;\n \nThe following statement fails, as the increment conflicts\nwith the defaults\n \nCREATE SEQUENCE s3 START WITH -100 INCREMENT BY 10;\n \nERROR 4082 (HY000): Sequence \'test.s3\' values are\nconflicting\n \nThe sequence can be created by specifying workable minimum\nand maximum values:\n \nCREATE SEQUENCE s3 START WITH -100 INCREMENT BY 10\nMINVALUE=-100 MAXVALUE=1000;\n \n\n\nURL: https://mariadb.com/kb/en/create-sequence/','','https://mariadb.com/kb/en/create-sequence/'),(661,'CREATE PACKAGE BODY',39,'Oracle-style packages were introduced in MariaDB 10.3.5.\n \nSyntax\n------ \nCREATE [ OR REPLACE ]\n [DEFINER = { user | CURRENT_USER | role | CURRENT_ROLE }]\n PACKAGE BODY\n [ IF NOT EXISTS ]\n [ db_name . ] package_name\n [ package_characteristic... ]\n{ AS | IS }\n package_implementation_declare_section\n package_implementation_executable_section\nEND [ package_name]\n \npackage_implementation_declare_section:\n package_implementation_item_declaration\n [ package_implementation_item_declaration... ]\n [ package_implementation_routine_definition... ]\n | package_implementation_routine_definition\n [ package_implementation_routine_definition...]\n \npackage_implementation_item_declaration:\n variable_declaration ;\n \nvariable_declaration:\n variable_name[,...] type [:= expr ]\n \npackage_implementation_routine_definition:\n FUNCTION package_specification_function\n [ package_implementation_function_body ] ;\n | PROCEDURE package_specification_procedure\n [ package_implementation_procedure_body ] ;\n \npackage_implementation_function_body:\n { AS | IS } package_routine_body [func_name]\n \npackage_implementation_procedure_body:\n { AS | IS } package_routine_body [proc_name]\n \npackage_routine_body:\n [ package_routine_declarations ]\n BEGIN\n statements [ EXCEPTION exception_handlers ]\n END\n \npackage_routine_declarations:\n package_routine_declaration \';\'\n[package_routine_declaration \';\']...\n \npackage_routine_declaration:\n variable_declaration\n | condition_name CONDITION FOR condition_value\n | user_exception_name EXCEPTION\n | CURSOR_SYM cursor_name\n [ ( cursor_formal_parameters ) ]\n IS select_statement\n ;\n \npackage_implementation_executable_section:\n END\n | BEGIN\n statement ; [statement ; ]...\n [EXCEPTION exception_handlers]\n END\n \nexception_handlers:\n exception_handler [exception_handler...]\n \nexception_handler:\n WHEN_SYM condition_value [, condition_value]...\n THEN_SYM statement ; [statement ;]...\n \ncondition_value:\n condition_name\n | user_exception_name\n | SQLWARNING\n | SQLEXCEPTION\n | NOT FOUND\n | OTHERS_SYM\n | SQLSTATE [VALUE] sqlstate_value\n | mariadb_error_code\n \n\nDescription\n----------- \nThe CREATE PACKAGE BODY statement can be used when Oracle\nSQL_MODE is set.\n \nThe CREATE PACKAGE BODY statement creates the package body\nfor a stored package. The package specification must be\npreviously created using the CREATE PACKAGE statement.\n \nA package body provides implementations of the package\npublic routines and can optionally have:\npackage-wide private variables\npackage private routines\nforward declarations for private routines\nan executable initialization section\n \nExamples\n-------- \nSET sql_mode=ORACLE;\nDELIMITER $$\nCREATE OR REPLACE PACKAGE employee_tools AS\n FUNCTION getSalary(eid INT) RETURN DECIMAL(10,2);\n PROCEDURE raiseSalary(eid INT, amount DECIMAL(10,2));\n PROCEDURE raiseSalaryStd(eid INT);\n PROCEDURE hire(ename TEXT, esalary DECIMAL(10,2));\nEND;\n$$\nCREATE PACKAGE BODY employee_tools AS\n -- package body variables\n stdRaiseAmount DECIMAL(10,2):=500;\n \n -- private routines\n PROCEDURE log (eid INT, ecmnt TEXT) AS\n BEGIN\n INSERT INTO employee_log (id, cmnt) VALUES (eid, ecmnt);\n END;\n \n -- public routines\n PROCEDURE hire(ename TEXT, esalary DECIMAL(10,2)) AS\n eid INT;\n BEGIN\n INSERT INTO employee (name, salary) VALUES (ename,\nesalary);\n eid:= last_insert_id();\n log(eid, \'hire \' || ename);\n END;\n \n FUNCTION getSalary(eid INT) RETURN DECIMAL(10,2) AS\n nSalary DECIMAL(10,2);\n BEGIN\n SELECT salary INTO nSalary FROM employee WHERE id=eid;\n log(eid, \'getSalary id=\' || eid || \' salary=\' ||\nnSalary);\n RETURN nSalary;\n END;\n \n PROCEDURE raiseSalary(eid INT, amount DECIMAL(10,2)) AS\n BEGIN\n UPDATE employee SET salary=salary+amount WHERE id=eid;\n log(eid, \'raiseSalary id=\' || eid || \' amount=\' ||\namount);\n END;\n \n PROCEDURE raiseSalaryStd(eid INT) AS\n BEGIN\n raiseSalary(eid, stdRaiseAmount);\n log(eid, \'raiseSalaryStd id=\' || eid);\n END;\n \nBEGIN\n -- This code is executed when the current session\n -- accesses any of the package routines for the first time\n log(0, \'Session \' || connection_id() || \' \' ||\ncurrent_user || \' started\');\nEND;\n$$\n \nDELIMITER ;\n \n\n\nURL: https://mariadb.com/kb/en/create-package-body/','','https://mariadb.com/kb/en/create-package-body/'),(669,'DROP DATABASE',39,'Syntax\n------ \nDROP {DATABASE | SCHEMA} [IF EXISTS] db_name\n \nDescription\n----------- \nDROP DATABASE drops all tables in the database and deletes\nthe database. Be very careful with this statement! To use\nDROP DATABASE,\nyou need the DROP privilege on the database. DROP SCHEMA is\na synonym for DROP DATABASE.\n \nImportant: When a database is dropped, user privileges on\nthe database are not automatically dropped. See GRANT.\n \nIF EXISTS\n \nUse IF EXISTS to prevent an error from occurring for\ndatabases that do not exist. A NOTE is generated for each\nnon-existent database when using IF EXISTS. See SHOW\nWARNINGS.\n \nExamples\n-------- \nDROP DATABASE bufg;\n \nQuery OK, 0 rows affected (0.39 sec)\n \nDROP DATABASE bufg;\n \nERROR 1008 (HY000): Can\'t drop database \'bufg\'; database\ndoesn\'t exist\n \n \\W\nShow warnings enabled.\n \nDROP DATABASE IF EXISTS bufg;\n \nQuery OK, 0 rows affected, 1 warning (0.00 sec)\nNote (Code 1008): Can\'t drop database \'bufg\'; database\ndoesn\'t exist\n \n\n\nURL: https://mariadb.com/kb/en/drop-database/','','https://mariadb.com/kb/en/drop-database/'),(664,'CREATE SERVER',39,'Syntax\n------ \nCREATE [OR REPLACE] SERVER [IF NOT EXISTS] server_name\n FOREIGN DATA WRAPPER wrapper_name\n OPTIONS (option [, option] ...)\n \noption:\n { HOST character-literal\n | DATABASE character-literal\n | USER character-literal\n | PASSWORD character-literal\n | SOCKET character-literal\n | OWNER character-literal\n | PORT numeric-literal }\n \nDescription\n----------- \nThis statement creates the definition of a server for use\nwith the Spider,\nFEDERATED or FederatedX storage\nengine. The CREATE SERVER statement creates a new row within\nthe\nservers table within the mysql database. This statement\nrequires the SUPER privilege.\n \nThe server_name should be a unique reference to the server.\nServer definitions\nare global within the scope of the server, it is not\npossible to qualify the\nserver definition to a specific database. server_name has a\nmaximum length of\n64 characters (names longer than 64 characters are silently\ntruncated), and is\ncase insensitive. You may specify the name as a quoted\nstring.\n \nThe wrapper_name should be mysql, and may be quoted with\nsingle quotes.\nOther values for wrapper_name are not currently supported.\n \nFor each option you must specify either a character literal\nor numeric literal.\nCharacter literals are UTF-8, support a maximum length of 64\ncharacters and\ndefault to a blank (empty) string. String literals are\nsilently truncated to 64\ncharacters. Numeric literals must be a number between 0 and\n9999, default value\nis 0.\n \nNote: The OWNER option is currently not applied, and has no\neffect on\nthe ownership or operation of the server connection that is\ncreated.\n \nThe CREATE SERVER statement creates an entry in the\nmysql.servers table that can later be used with the\nCREATE TABLE statement when creating a Spider, FederatedX or\nFEDERATED table. The options that you specify will\nbe used to populate the columns in the mysql.servers table.\nThe table columns\nare Server_name, Host, Db, Username, Password, Port and\nSocket.\n \n DROP SERVER removes a previously created server definition.\n\n \nCREATE SERVER is not written to the binary log, irrespective\nof\nthe binary log format being used.\n \nFor valid identifiers to use as server names, see Identifier\nNames.\n \nOR REPLACE\n \nIf the optional OR REPLACE clause is used, it acts as a\nshortcut for:\n \nDROP SERVER IF EXISTS name;\n \nCREATE SERVER server_name ...;\n \nIF NOT EXISTS\n \nIf the IF NOT EXISTS clause is used, MariaDB will return a\nwarning instead of an error if the server already exists.\nCannot be used together with OR REPLACE.\n \nExamples\n-------- \nCREATE SERVER s\nFOREIGN DATA WRAPPER mysql\nOPTIONS (USER \'Remote\', HOST \'192.168.1.106\', DATABASE\n\'test\');\n \nOR REPLACE and IF NOT EXISTS:\n \nCREATE SERVER s \nFOREIGN DATA WRAPPER mysql \nOPTIONS (USER \'Remote\', HOST \'192.168.1.106\', DATABASE\n\'test\');\nERROR 1476 (HY000): The foreign server, s, you are trying to\ncreate already exists\n \nCREATE OR REPLACE SERVER s \nFOREIGN DATA WRAPPER mysql \nOPTIONS (USER \'Remote\', HOST \'192.168.1.106\', DATABASE\n\'test\');\nQuery OK, 0 rows affected (0.00 sec)\n \nCREATE SERVER IF NOT EXISTS s \nFOREIGN DATA WRAPPER mysql \nOPTIONS (USER \'Remote\', HOST \'192.168.1.106\', DATABASE\n\'test\');\nQuery OK, 0 rows affected, 1 warning (0.00 sec)\n \nSHOW WARNINGS;\n \n+-------+------+----------------------------------------------------------------+\n| Level | Code | Message |\n+-------+------+----------------------------------------------------------------+\n| Note | 1476 | The foreign server, s, you are trying to\ncreate already exists |\n+-------+------+----------------------------------------------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/create-server/','','https://mariadb.com/kb/en/create-server/'),(670,'DROP EVENT',39,'Syntax\n------ \nDROP EVENT [IF EXISTS] event_name\n \nDescription\n----------- \nThis statement drops the event named event_name. The event\nimmediately\nceases being active, and is deleted completely from the\nserver.\n \nIf the event does not exist, the error\nERROR 1517 (HY000): Unknown event \'event_name\'\nresults. You can override this and cause the\nstatement to generate a NOTE for non-existent events instead\nby using\nIF EXISTS. See SHOW WARNINGS.\n \nThis statement requires the EVENT privilege. In MySQL 5.1.11\nand earlier, an event could be dropped only\nby its definer, or by a user having the SUPER privilege.\n \nExamples\n-------- \nDROP EVENT myevent3;\n \nUsing the IF EXISTS clause:\n \nDROP EVENT IF EXISTS myevent3;\n \nQuery OK, 0 rows affected, 1 warning (0.01 sec)\n \nSHOW WARNINGS;\n \n+-------+------+-------------------------------+\n| Level | Code | Message |\n+-------+------+-------------------------------+\n| Note | 1305 | Event myevent3 does not exist |\n+-------+------+-------------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/drop-event/','','https://mariadb.com/kb/en/drop-event/'),(671,'DROP FUNCTION',39,'Syntax\n------ \nDROP FUNCTION [IF EXISTS] f_name\n \nDescription\n----------- \nThe DROP FUNCTION statement is used to drop a stored\nfunction or a user-defined function (UDF). That is, the\nspecified routine is removed from the server, along with all\nprivileges specific to the function. You must have the ALTER\nROUTINE privilege for the routine in order to drop it. If\nthe automatic_sp_privileges server system variable is set,\nboth the ALTER ROUTINE and EXECUTE privileges are granted\nautomatically to the routine creator - see Stored Routine\nPrivileges.\n \nIF EXISTS\n \nThe IF EXISTS clause is a MySQL/MariaDB extension. It\nprevents an error from occurring if the function does not\nexist. A\nNOTE is produced that can be viewed with SHOW WARNINGS.\n \nFor dropping a user-defined functions (UDF), see DROP\nFUNCTION UDF.\n \nExamples\n-------- \nDROP FUNCTION hello;\n \nQuery OK, 0 rows affected (0.042 sec)\n \nDROP FUNCTION hello;\n \nERROR 1305 (42000): FUNCTION test.hello does not exist\n \nDROP FUNCTION IF EXISTS hello;\n \nQuery OK, 0 rows affected, 1 warning (0.000 sec)\n \nSHOW WARNINGS;\n \n+-------+------+------------------------------------+\n| Level | Code | Message |\n+-------+------+------------------------------------+\n| Note | 1305 | FUNCTION test.hello does not exist |\n+-------+------+------------------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/drop-function/','','https://mariadb.com/kb/en/drop-function/'),(667,'CREATE TRIGGER',39,'Syntax\n------ \nCREATE [OR REPLACE]\n [DEFINER = { user | CURRENT_USER | role | CURRENT_ROLE }]\n TRIGGER [IF NOT EXISTS] trigger_name trigger_time\ntrigger_event\n ON tbl_name FOR EACH ROW\n [{ FOLLOWS | PRECEDES } other_trigger_name ]\n trigger_stmt\n \nDescription\n----------- \nThis statement creates a new trigger. A trigger is a named\ndatabase\nobject that is associated with a table, and that activates\nwhen a\nparticular event occurs for the table. The trigger becomes\nassociated\nwith the table named tbl_name, which must refer to a\npermanent table.\nYou cannot associate a trigger with a TEMPORARY table or a\nview.\n \nCREATE TRIGGER requires the TRIGGER privilege for the table\nassociated\nwith the trigger. (Before MySQL 5.1.6, this statement\nrequires the\nSUPER privilege.)\n \nYou can have multiple triggers for the same trigger_time and\ntrigger_event.\n \nFor valid identifiers to use as trigger names, see\nIdentifier Names.\n \nOR REPLACE\n \nIf used and the trigger already exists, instead of an error\nbeing returned, the existing trigger will be dropped and\nreplaced by the newly defined trigger.\n \nDEFINER\n \nThe DEFINER clause determines the security context to be\nused when\nchecking access privileges at trigger activation time.\n \nIF NOT EXISTS\n \nIf the IF NOT EXISTS clause is used, the trigger will only\nbe created if a trigger of the same name does not exist. If\nthe trigger already exists, by default a warning will be\nreturned.\n \ntrigger_time\n \ntrigger_time is the trigger action time. It can be BEFORE or\nAFTER to\nindicate that the trigger activates before or after each row\nto be\nmodified.\n \ntrigger_event\n \ntrigger_event indicates the kind of statement that activates\nthe\ntrigger. The trigger_event can be one of the following:\nINSERT: The trigger is activated whenever a new row is\ninserted into the table; for example, through INSERT, LOAD\nDATA, and REPLACE statements.\nUPDATE: The trigger is activated whenever a row is modified;\nfor example, through UPDATE statements.\nDELETE: The trigger is activated whenever a row is deleted\nfrom the table; for example, through DELETE and REPLACE\nstatements. However, DROP TABLE and TRUNCATE statements on\nthe table do not activate this trigger, because they do not\nuse DELETE. Dropping a partition does not activate DELETE\ntriggers, either.\n \nFOLLOWS/PRECEDES other_trigger_name\n \nThe FOLLOWS other_trigger_name and PRECEDES\nother_trigger_name options were added in MariaDB 10.2.3 as\npart of supporting multiple triggers per action time.\nThis is the same syntax used by MySQL 5.7, although MySQL\n5.7 does not have multi-trigger support.\n \nFOLLOWS adds the new trigger after another trigger while\nPRECEDES adds the new trigger before another trigger. If\nneither option is used, the new trigger is added last for\nthe given action and time.\n \nFOLLOWS and PRECEDES are not stored in the trigger\ndefinition. However the trigger order is guaranteed to not\nchange over time. mysqldump and other backup methods will\nnot change trigger order.\nYou can verify the trigger order from the ACTION_ORDER\ncolumn in INFORMATION_SCHEMA.TRIGGERS table.\n \nSELECT trigger_name, action_order FROM\ninformation_schema.triggers \n WHERE event_object_table=\'t1\';\n \nExamples\n-------- \nCREATE DEFINER=`root`@`localhost` TRIGGER increment_animal\n AFTER INSERT ON animals FOR EACH ROW \n UPDATE animal_count SET animal_count.animals =\nanimal_count.animals+1;\n \nOR REPLACE and IF NOT EXISTS\n \nCREATE DEFINER=`root`@`localhost` TRIGGER increment_animal\n AFTER INSERT ON animals FOR EACH ROW\n UPDATE animal_count SET animal_count.animals =\nanimal_count.animals+1;\n \nERROR 1359 (HY000): Trigger already exists\n \nCREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER\nincrement_animal\n AFTER INSERT ON animals FOR EACH ROW\n UPDATE animal_count SET animal_count.animals =\nanimal_count.animals+1;\n \nQuery OK, 0 rows affected (0.12 sec)\n \nCREATE DEFINER=`root`@`localhost` TRIGGER IF NOT EXISTS\nincrement_animal\n AFTER INSERT ON animals FOR EACH ROW\n UPDATE animal_count SET animal_count.animals =\nanimal_count.animals+1;\n \nQuery OK, 0 rows affected, 1 warning (0.00 sec)\n \nSHOW WARNINGS;\n \n+-------+------+------------------------+\n| Level | Code | Message |\n+-------+------+------------------------+\n| Note | 1359 | Trigger already exists |\n+-------+------+------------------------+\n1 row in set (0.00 sec)\n \n\n\nURL: https://mariadb.com/kb/en/create-trigger/','','https://mariadb.com/kb/en/create-trigger/'),(672,'DROP INDEX',39,'Syntax\n------ \nDROP INDEX [IF EXISTS] index_name ON tbl_name \n [WAIT n |NOWAIT]\n [algorithm_option | lock_option] ...\n \nalgorithm_option:\n ALGORITHM [=] {DEFAULT|INPLACE|COPY|NOCOPY|INSTANT}\n \nlock_option:\n LOCK [=] {DEFAULT|NONE|SHARED|EXCLUSIVE}\n \nDescription\n----------- \nDROP INDEX drops the index named index_name from the table\ntbl_name.\nThis statement is mapped to an ALTER TABLE statement to drop\nthe\nindex.\n \nIf another connection is using the table, a metadata lock is\nactive, and this statement will wait until the lock is\nreleased. This is also true for non-transactional tables.\n \nSee ALTER TABLE.\n \nAnother shortcut, CREATE INDEX, allows the creation of an\nindex.\n \nTo remove the primary key, `PRIMARY` must be specified as\nindex_name. Note that the quotes are necessary, because\nPRIMARY is a keyword.\n \nPrivileges\n \nExecuting the DROP INDEX statement requires the INDEX\nprivilege for the table or the database.\n \nOnline DDL\n \nIn MariaDB 10.0 and later, online DDL is supported with the\nALGORITHM and LOCK clauses.\n \nSee InnoDB Online DDL Overview for more information on\nonline DDL with InnoDB.\n \nDROP INDEX IF EXISTS ...\n \nThe IF EXISTS clause was added in MariaDB 10.1.4.\n \nIf the IF EXISTS clause is used, then MariaDB will return a\nwarning instead of an error if the index does not exist.\n \nWAIT/NOWAIT\n \nSet the lock wait timeout. See WAIT and NOWAIT.\n \nALGORITHM\n \nSee ALTER TABLE: ALGORITHM for more information.\n \nLOCK\n \nSee ALTER TABLE: LOCK for more information.\n \nProgress Reporting\n \nMariaDB provides progress reporting for DROP INDEX statement\nfor clients\nthat support the new progress reporting protocol. For\nexample, if you were using the mysql client, then the\nprogress report might look like this::\n \n\n\nURL: https://mariadb.com/kb/en/drop-index/','','https://mariadb.com/kb/en/drop-index/'),(675,'DROP PROCEDURE',39,'Syntax\n------ \nDROP PROCEDURE [IF EXISTS] sp_name\n \nDescription\n----------- \nThis statement is used to drop a stored procedure. That is,\nthe\nspecified routine is removed from the server along with all\nprivileges specific to the procedure. You must have the\nALTER ROUTINE privilege for the routine. If the\nautomatic_sp_privileges server system variable is set, that\nprivilege and EXECUTE are granted automatically to the\nroutine creator - see Stored Routine Privileges.\n \nThe IF EXISTS clause is a MySQL/MariaDB extension. It\nprevents an error from occurring if the procedure or\nfunction does not exist. A\nNOTE is produced that can be viewed with SHOW WARNINGS.\n \nWhile this statement takes effect immediately, threads which\nare executing a procedure can continue execution.\n \nExamples\n-------- \nDROP PROCEDURE simpleproc;\n \nIF EXISTS:\n \nDROP PROCEDURE simpleproc;\n \nERROR 1305 (42000): PROCEDURE test.simpleproc does not exist\n \nDROP PROCEDURE IF EXISTS simpleproc;\n \nQuery OK, 0 rows affected, 1 warning (0.00 sec)\n \nSHOW WARNINGS;\n \n+-------+------+------------------------------------------+\n| Level | Code | Message |\n+-------+------+------------------------------------------+\n| Note | 1305 | PROCEDURE test.simpleproc does not exist |\n+-------+------+------------------------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/drop-procedure/','','https://mariadb.com/kb/en/drop-procedure/'),(676,'DROP SEQUENCE',39,'DROP SEQUENCE was introduced in MariaDB 10.3.\n \nSyntax\n------ \nDROP [TEMPORARY] SEQUENCE [IF EXISTS] [/*COMMENT TO SAVE*/]\n sequence_name [, sequence_name] ...\n \nDescription\n----------- \nDROP SEQUENCE removes one or more sequences created with\nCREATE SEQUENCE. You must have the DROP privilege for each\nsequence. MariaDB returns an error indicating by name which\nnon-existing tables it was unable to drop, but it also drops\nall of the tables in the list that do exist.\n \nImportant: When a table is dropped, user privileges on the\ntable are not automatically dropped. See GRANT.\n \nIf another connection is using the sequence, a metadata lock\nis active, and this statement will wait until the lock is\nreleased. This is also true for non-transactional tables.\n \nFor each referenced sequence, DROP SEQUENCE drops a\ntemporary sequence with that name, if it exists. If it does\nnot exist, and the TEMPORARY keyword is not used, it drops a\nnon-temporary sequence with the same name, if it exists. The\nTEMPORARY keyword ensures that a non-temporary sequence will\nnot accidentally be dropped.\n \nUse IF EXISTS to prevent an error from occurring for\nsequences that do not exist. A NOTE is generated for each\nnon-existent sequence when using IF EXISTS. See SHOW\nWARNINGS.\n \nDROP SEQUENCE requires the DROP privilege.\n \nNotes\n \nDROP SEQUENCE only removes sequences, not tables. However,\nDROP TABLE can remove both sequences and tables.\n \n\n\nURL: https://mariadb.com/kb/en/drop-sequence/','','https://mariadb.com/kb/en/drop-sequence/'),(677,'DROP SERVER',39,'Syntax\n------ \nDROP SERVER [ IF EXISTS ] server_name\n \nDescription\n----------- \nDrops the server definition for the server named\nserver_name. The\ncorresponding row within the mysql.servers table will be\ndeleted. This\nstatement requires the SUPER privilege. \n \nDropping a server for a table does not affect any\nFederatedX, FEDERATED or Spider tables that used this\nconnection information when they were created. \n \nIF EXISTS\n \nIf the IF EXISTS clause is used, MariaDB will not return an\nerror if the server does not exist. Unlike all other\nstatements, DROP SERVER IF EXISTS does not issue a note if\nthe server does not exist. See MDEV-9400.\n \nExamples\n-------- \nDROP SERVER s;\n \nIF EXISTS:\n \nDROP SERVER s;\n \nERROR 1477 (HY000): The foreign server name you are trying\nto reference \n does not exist. Data source error: s\n \nDROP SERVER IF EXISTS s;\n \nQuery OK, 0 rows affected (0.00 sec)\n \n\n\nURL: https://mariadb.com/kb/en/drop-server/','','https://mariadb.com/kb/en/drop-server/'),(680,'DROP TRIGGER',39,'Syntax\n------ \nDROP TRIGGER [IF EXISTS] [schema_name.]trigger_name\n \nDescription\n----------- \nThis statement drops a trigger. The schema (database) name\nis optional. If the\nschema is omitted, the trigger is dropped from the default\nschema.\nIts use requires the TRIGGER privilege for the table\nassociated with the trigger.\n \nUse IF EXISTS to prevent an error from occurring for a\ntrigger that does not exist. A NOTE is generated for a\nnon-existent trigger\nwhen using IF EXISTS. See SHOW WARNINGS.\n \nNote: Triggers for a table are also dropped if you drop the\ntable.\n \nExamples\n-------- \nDROP TRIGGER test.example_trigger;\n \nUsing the IF EXISTS clause:\n \nDROP TRIGGER IF EXISTS test.example_trigger;\n \nQuery OK, 0 rows affected, 1 warning (0.01 sec)\n \nSHOW WARNINGS;\n \n+-------+------+------------------------+\n| Level | Code | Message |\n+-------+------+------------------------+\n| Note | 1360 | Trigger does not exist |\n+-------+------+------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/drop-trigger/','','https://mariadb.com/kb/en/drop-trigger/'),(678,'DROP TABLE',39,'Syntax\n------ \nDROP [TEMPORARY] TABLE [IF EXISTS] [/*COMMENT TO SAVE*/]\n tbl_name [, tbl_name] ...\n [WAIT n|NOWAIT]\n [RESTRICT | CASCADE]\n \nDescription\n----------- \nDROP TABLE removes one or more tables. You must have the\nDROP privilege\nfor each table. All table data and the table definition are\nremoved, as well as triggers associated to the table, so be\ncareful with this statement! If any of the tables named in\nthe argument list do\nnot exist, MariaDB returns an error indicating by name which\nnon-existing tables\nit was unable to drop, but it also drops all of the tables\nin the list that do\nexist.\n \nImportant: When a table is dropped, user privileges on the\ntable are not\nautomatically dropped. See GRANT.\n \nIf another connection is using the table, a metadata lock is\nactive, and this statement will wait until the lock is\nreleased. This is also true for non-transactional tables.\n \nNote that for a partitioned table, DROP TABLE permanently\nremoves the table\ndefinition, all of its partitions, and all of the data which\nwas stored in\nthose partitions. It also removes the partitioning\ndefinition (.par) file\nassociated with the dropped table.\n \nFor each referenced table, DROP TABLE drops a temporary\ntable with that name, if it exists. If it does not exist,\nand the TEMPORARY keyword is not used, it drops a\nnon-temporary table with the same name, if it exists. The\nTEMPORARY keyword ensures that a non-temporary table will\nnot accidentally be dropped.\n \nUse IF EXISTS to prevent an error from occurring for tables\nthat do not\nexist. A NOTE is generated for each non-existent table when\nusing\nIF EXISTS. See SHOW WARNINGS.\n \nIf a foreign key references this table, the table cannot be\ndropped. In this case, it is necessary to drop the foreign\nkey first.\n \nRESTRICT and CASCADE are allowed to make porting from other\ndatabase systems easier. In MariaDB, they do nothing.\n \nSince MariaDB 5.5.27, the comment before the tablenames\n(that /*COMMENT TO SAVE*/) is stored in the binary log. That\nfeature can be used by replication tools to send their\ninternal messages.\n \nIt is possible to specify table names as db_name.tab_name.\nThis is useful to delete tables from multiple databases with\none statement. See Identifier Qualifiers for details.\n \nThe DROP privilege is required to use DROP TABLE on\nnon-temporary tables. For temporary tables, no privilege is\nrequired, because such tables are only visible for the\ncurrent session.\n \nNote: DROP TABLE automatically commits the current active\ntransaction,\nunless you use the TEMPORARY keyword.\n \nWAIT/NOWAIT\n \nSet the lock wait timeout. See WAIT and NOWAIT.\n \nDROP TABLE in replication\n \nDROP TABLE has the following characteristics in replication:\nDROP TABLE IF EXISTS are always logged.\nDROP TABLE without IF EXISTS for tables that don\'t exist\nare not written to the binary log.\nDropping of TEMPORARY tables are prefixed in the log with\nTEMPORARY. These drops are only logged when running\nstatement or mixed mode replication.\nOne DROP TABLE statement can be logged with up to 3\ndifferent DROP statements:\nDROP TEMPORARY TABLE\nlist_of_non_transactional_temporary_tables\nDROP TEMPORARY TABLE list_of_transactional_temporary_tables\nDROP TABLE list_of_normal_tables\n \nStarting from MariaDB 10.0.8, DROP TABLE on the master is\ntreated on the slave as DROP TABLE IF EXISTS. You can change\nthat by setting slave-ddl-exec-mode to STRICT.\n \nDropping an Internal #sql-... Table\n \nIf the mysqld process is killed during an ALTER TABLE you\nmay find a table named #sql-... in your data directory. In\nMariaDB 10.3, InnoDB tables with this prefix will de deleted\nautomatically during startup.\nIn MariaDB 10.4 we will ensure that these temporary tables\nwill always be deleted automatically.\n \nIf you want to delete one of these tables explicitly you can\ndo so by using the following syntax:\n \nDROP TABLE `#mysql50##sql-...`;\n \nWhen running an ALTER TABLE…ALGORITHM=INPLACE that\nrebuilds the table, InnoDB will create an internal #sql-ib\ntable. For these tables, the .frm file will be called\nsomething else. In order to drop such a table after a server\ncrash, you must rename the #sql*.frm file to match the\n#sql-ib*.ibd file.\n \nDropping All Tables in a Database\n \nThe best way to drop all tables in a database is by\nexecuting DROP DATABASE, which will drop the database\nitself, and all tables in it.\n \nHowever, if you want to drop all tables in the database, but\nyou also want to keep the database itself and any other\nnon-table objects in it, then you would need to execute DROP\nTABLE to drop each individual table. You can construct these\nDROP TABLE commands by querying the TABLES table in the\ninformation_schema database. For example:\n \nSELECT CONCAT(\'DROP TABLE IF EXISTS `\', TABLE_SCHEMA,\n\'`.`\', TABLE_NAME, \'`;\')\nFROM information_schema.TABLES\nWHERE TABLE_SCHEMA = \'mydb\';\n \nExamples\n-------- \nDROP TABLE Employees, Customers;\n \nNotes\n \nBeware that DROP TABLE can drop both tables and sequences.\nThis is mainly done to allow old tools like mysqldump to\nwork with sequences.\n \n\n\nURL: https://mariadb.com/kb/en/drop-table/','','https://mariadb.com/kb/en/drop-table/'),(681,'DROP VIEW',39,'Syntax\n------ \nDROP VIEW [IF EXISTS]\n view_name [, view_name] ...\n [RESTRICT | CASCADE]\n \nDescription\n----------- \nDROP VIEW removes one or more views. You must have the DROP\nprivilege for\neach view. If any of the views named in the argument list do\nnot exist, MariaDB\nreturns an error indicating by name which non-existing views\nit was unable to\ndrop, but it also drops all of the views in the list that do\nexist.\n \nThe IF EXISTS clause prevents an error from occurring for\nviews that don\'t\nexist. When this clause is given, a NOTE is generated for\neach non-existent\nview. See SHOW WARNINGS.\n \nRESTRICT and CASCADE, if given, are parsed and ignored.\n \nIt is possible to specify view names as db_name.view_name.\nThis is useful to delete views from multiple databases with\none statement. See Identifier Qualifiers for details.\n \nThe DROP privilege is required to use DROP TABLE on\nnon-temporary tables. For temporary tables, no privilege is\nrequired, because such tables are only visible for the\ncurrent session.\n \nIf a view references another view, it will be possible to\ndrop the referenced view. However, the other view will\nreference a view which does not exist any more. Thus,\nquerying it will produce an error similar to the following:\n \nERROR 1356 (HY000): View \'db_name.view_name\' references\ninvalid table(s) or \ncolumn(s) or function(s) or definer/invoker of view lack\nrights to use them\n \nThis problem is reported in the output of CHECK TABLE.\n \nNote that it is not necessary to use DROP VIEW to replace an\nexisting view, because CREATE VIEW has an OR REPLACE clause.\n \nExamples\n-------- \nDROP VIEW v,v2;\n \nGiven views v and v2, but no view v3\n \nDROP VIEW v,v2,v3;\nERROR 1051 (42S02): Unknown table \'v3\'\n \nDROP VIEW IF EXISTS v,v2,v3;\nQuery OK, 0 rows affected, 1 warning (0.01 sec)\n \nSHOW WARNINGS;\n+-------+------+-------------------------+\n| Level | Code | Message |\n+-------+------+-------------------------+\n| Note | 1051 | Unknown table \'test.v3\' |\n+-------+------+-------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/drop-view/','','https://mariadb.com/kb/en/drop-view/'),(682,'Invisible Columns',39,'Invisible columns (sometimes also called hidden columns)\nfirst appeared in MariaDB 10.3.3.\n \nColumns can be given an INVISIBLE attribute in a CREATE\nTABLE or ALTER TABLE statement. These columns will then not\nbe listed in the results of a SELECT * statement, nor do\nthey need to be assigned a value in an INSERT statement,\nunless INSERT explicitly mentions them by name.\n \nSince SELECT * does not return the invisible columns, new\ntables or views created in this manner will have no trace of\nthe invisible columns. If specifically referenced in the\nSELECT statement, the columns will be brought into the\nview/new table, but the INVISIBLE attribute will not.\n \nInvisible columns can be declared as NOT NULL, but then\nrequire a DEFAULT value.\n \nIt is not possible for all columns in a table to be\ninvisible.\n \nExamples\n-------- \nCREATE TABLE t (x INT, y INT INVISIBLE, z INT INVISIBLE NOT\nNULL);\nERROR 4106 (HY000): Invisible column `z` must have a default\nvalue\n \nCREATE TABLE t (x INT, y INT INVISIBLE, z INT INVISIBLE NOT\nNULL DEFAULT 4);\n \nINSERT INTO t VALUES (1),(2);\n \nINSERT INTO t (x,y) VALUES (3,33);\n \nSELECT * FROM t;\n \n+------+\n| x |\n+------+\n| 1 |\n| 2 |\n| 3 |\n+------+\n \nSELECT x,y,z FROM t;\n \n+------+------+---+\n| x | y | z |\n+------+------+---+\n| 1 | NULL | 4 |\n| 2 | NULL | 4 |\n| 3 | 33 | 4 |\n+------+------+---+\n \nDESC t;\n \n+-------+---------+------+-----+---------+-----------+\n| Field | Type | Null | Key | Default | Extra |\n+-------+---------+------+-----+---------+-----------+\n| x | int(11) | YES | | NULL | |\n| y | int(11) | YES | | NULL | INVISIBLE |\n| z | int(11) | NO | | 4 | INVISIBLE |\n+-------+---------+------+-----+---------+-----------+\n \nALTER TABLE t MODIFY x INT INVISIBLE, MODIFY y INT, MODIFY z\nINT NOT NULL DEFAULT 4;\n \nDESC t;\n \n+-------+---------+------+-----+---------+-----------+\n| Field | Type | Null | Key | Default | Extra |\n+-------+---------+------+-----+---------+-----------+\n| x | int(11) | YES | | NULL | INVISIBLE |\n| y | int(11) | YES | | NULL | |\n| z | int(11) | NO | | 4 | |\n+-------+---------+------+-----+---------+-----------+\n \nCreating a view from a table with hidden columns:\n \nCREATE VIEW v1 AS SELECT * FROM t;\n \nDESC v1;\n \n+-------+---------+------+-----+---------+-------+\n| Field | Type | Null | Key | Default | Extra |\n+-------+---------+------+-----+---------+-------+\n| x | int(11) | YES | | NULL | |\n+-------+---------+------+-----+---------+-------+\n \nCREATE VIEW v2 AS SELECT x,y,z FROM t;\n \nDESC v2;\n \n+-------+---------+------+-----+---------+-------+\n| Field | Type | Null | Key | Default | Extra |\n+-------+---------+------+-----+---------+-------+\n| x | int(11) | YES | | NULL | |\n| y | int(11) | YES | | NULL | |\n| z | int(11) | NO | | 4 | |\n+-------+---------+------+-----+---------+-------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/invisible-columns/','','https://mariadb.com/kb/en/invisible-columns/'),(683,'MERGE',39,'Description\n----------- \nThe MERGE storage engine, also known as the MRG_MyISAM\nengine, is a\ncollection of identical MyISAM tables that can be used as\none.\n\"Identical\" means that all tables have identical column\nand index\ninformation. You cannot merge MyISAM tables in which the\ncolumns are\nlisted in a different order, do not have exactly the same\ncolumns, or\nhave the indexes in different order. However, any or all of\nthe MyISAM\ntables can be compressed with myisampack. Columns names and\nindexes names can be different, as long as data types and\nNULL/NOT NULL clauses are the same. Differences in\ntable options such as AVG_ROW_LENGTH, MAX_ROWS, or PACK_KEYS\ndo not\nmatter.\n \nEach index in a MERGE table must match an index in\nunderlying MyISAM tables, but the opposite is not true.\nAlso, a MERGE table cannot have a PRIMARY KEY or UNIQUE\nindexes, because it cannot enforce uniqueness over all\nunderlying tables.\n \nThe following options are meaningful for MERGE tables:\nUNION. This option specifies the list of the underlying\nMyISAM tables. The list is enclosed between parentheses and\nseparated with commas.\nINSERT_METHOD. This options specifies whether, and how,\nINSERTs are allowed for the table. Allowed values are: NO\n(INSERTs are not allowed), FIRST (new rows will be written\ninto the first table specified in the UNION list), LAST (new\nrows will be written into the last table specified in the\nUNION list). The default value is NO.\n \nIf you define a MERGE table with a definition which is\ndifferent from the underlying MyISAM tables, or one of the\nunderlying tables is not MyISAM, the CREATE TABLE statement\nwill not return any error. But any statement which involves\nthe table will produce an error like the following:\n \nERROR 1168 (HY000): Unable to open underlying table which is\ndifferently defined \n or of non-MyISAM type or doesn\'t exist\n \nA CHECK TABLE will show more information about the problem.\n \nThe error is also produced if the table is properly define,\nbut an underlying table\'s definition changes at some point\nin time.\n \nIf you try to insert a new row into a MERGE table with\nINSERT_METHOD=NO, you will get an error like the following:\n \nERROR 1036 (HY000): Table \'tbl_name\' is read only\n \nIt is possible to build a MERGE table on MyISAM tables which\nhave one or more virtual columns. MERGE itself does not\nsupport virtual columns, thus such columns will be seen as\nregular columns. The data types and sizes will still need to\nbe identical, and they cannot be NOT NULL.\n \nExamples\n-------- \nCREATE TABLE t1 (\n a INT NOT NULL AUTO_INCREMENT PRIMARY KEY,\n message CHAR(20)) ENGINE=MyISAM;\n \nCREATE TABLE t2 (\n a INT NOT NULL AUTO_INCREMENT PRIMARY KEY,\n message CHAR(20)) ENGINE=MyISAM;\n \nINSERT INTO t1 (message) VALUES\n(\'Testing\'),(\'table\'),(\'t1\');\n \nINSERT INTO t2 (message) VALUES\n(\'Testing\'),(\'table\'),(\'t2\');\n \nCREATE TABLE total (\n a INT NOT NULL AUTO_INCREMENT,\n message CHAR(20), INDEX(a))\n ENGINE=MERGE UNION=(t1,t2) INSERT_METHOD=LAST;\n \nSELECT * FROM total;\n \n+---+---------+\n| a | message |\n+---+---------+\n| 1 | Testing |\n| 2 | table |\n| 3 | t1 |\n| 1 | Testing |\n| 2 | table |\n| 3 | t2 |\n+---+---------+\n \nIn the following example, we\'ll create three MyISAM tables,\nand then a MERGE table on them. However, one of them uses a\ndifferent data type for the column b, so a SELECT will\nproduce an error:\n \nCREATE TABLE t1 (\n a INT,\n b INT\n) ENGINE = MyISAM;\n \nCREATE TABLE t2 (\n a INT,\n b INT\n) ENGINE = MyISAM;\n \nCREATE TABLE t3 (\n a INT,\n b TINYINT\n) ENGINE = MyISAM;\n \nCREATE TABLE t_mrg (\n a INT,\n b INT\n) ENGINE = MERGE,UNION=(t1,t2,t3);\n \nSELECT * FROM t_mrg;\n \nERROR 1168 (HY000): Unable to open underlying table which is\ndifferently defined\n or of non-MyISAM type or doesn\'t exist\n \nTo find out what\'s wrong, we\'ll use a CHECK TABLE:\n \nCHECK TABLE t_mrg;\n \n+------------+-------+----------+-----------------------------------------------------------------------------------------------------+\n| Table | Op | Msg_type | Msg_text |\n+------------+-------+----------+-----------------------------------------------------------------------------------------------------+\n| test.t_mrg | check | Error | Table \'test.t3\' is\ndifferently defined or of non-MyISAM type or doesn\'t exist\n|\n| test.t_mrg | check | Error | Unable to open underlying\ntable which is differently defined or of non-MyISAM type or\ndoesn\'t exist |\n| test.t_mrg | check | error | Corrupt |\n+------------+-------+----------+-----------------------------------------------------------------------------------------------------+\n \nNow, we know that the problem is in t3\'s definition.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/merge/','','https://mariadb.com/kb/en/merge/'),(684,'RENAME TABLE',39,'Syntax\n------ \nRENAME TABLE tbl_name \n [WAIT n | NOWAIT]\n TO new_tbl_name\n [, tbl_name2 TO new_tbl_name2] ...\n \nDescription\n----------- \nThis statement renames one or more tables or views, but not\nthe privileges associated to them.\n \nThe rename operation is done atomically, which means that no\nother session can\naccess any of the tables while the rename is running. For\nexample, if you have\nan existing table old_table, you can create another table\nnew_table that has the same structure but is empty, and then\nreplace the existing table with the empty one as follows\n(assuming that\nbackup_table does not already exist):\n \nCREATE TABLE new_table (...);\nRENAME TABLE old_table TO backup_table, new_table TO\nold_table;\n \ntbl_name can optionally be specified as db_name.tbl_name.\nSee Identifier Qualifiers. This allows to use RENAME to move\na table from a database to another (as long as they are on\nthe same filesystem):\n \nRENAME TABLE db1.t TO db2.t;\n \nNote that moving a table to another database is not possible\nif it has some triggers. Trying to do so produces the\nfollowing error:\n \nERROR 1435 (HY000): Trigger in wrong schema\n \nAlso, views cannot be moved to another database:\n \nERROR 1450 (HY000): Changing schema from \'old_db\' to\n\'new_db\' is not allowed.\n \nIf a RENAME TABLE renames more than one table and one\nrenaming fails, all renames executed by the same statement\nare rolled back.\n \nRenames are always executed in the specified order. Knowing\nthis, it is also possible to swap two tables\' names:\n \nRENAME TABLE t1 TO tmp_table,\n t2 TO t1,\n tmp_table TO t2;\n \nPrivileges\n \nExecuting the RENAME TABLE statement requires the DROP,\nCREATE and INSERT privileges for the table or the database.\n \nWAIT/NOWAIT\n \nSet the lock wait timeout. See WAIT and NOWAIT.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/rename-table/','','https://mariadb.com/kb/en/rename-table/'),(685,'Silent Column Changes',39,'When a CREATE TABLE or ALTER TABLE command is issued,\nMariaDB will silently change a column specification in the\nfollowing cases:\nPRIMARY KEY columns are always NOT NULL.\nAny trailing spaces from SET and ENUM values are discarded.\nTIMESTAMP columns are always NOT NULL, and display sizes are\ndiscarded\nA row-size limit of 65535 bytes applies\nIf strict SQL mode is not enabled, a VARCHAR column longer\nthan 65535 become TEXT, and a VARBINARY columns longer than\n65535 becomes a BLOB. If strict mode is enabled the silent\nchanges will not be made, and an error will occur.\nIf a USING clause specifies an index that\'s not permitted\nby the storage engine, the engine will instead use another\navailable index type that can be applied without affecting\nresults.\nIf the CHARACTER SET binary attribute is specified, the\ncolumn is created as the matching binary data type. A TEXT\nbecomes a BLOB, CHAR a BINARY and VARCHAR a VARBINARY. ENUMs\nand SETs are created as defined.\n \nTo ease imports from other RDBMS\'s, MariaDB will also\nsilently map the following data types:\n \nOther Vendor Type | MariaDB Type | \n \nBOOL | TINYINT | \n \nBOOLEAN | TINYINT | \n \nCHARACTER VARYING(M) | VARCHAR(M) | \n \nFIXED | DECIMAL | \n \nFLOAT4 | FLOAT | \n \nFLOAT8 | DOUBLE | \n \nINT1 | TINYINT | \n \nINT2 | SMALLINT | \n \nINT3 | MEDIUMINT | \n \nINT4 | INT | \n \nINT8 | BIGINT | \n \nLONG VARBINARY | MEDIUMBLOB | \n \nLONG VARCHAR | MEDIUMTEXT | \n \nLONG | MEDIUMTEXT | \n \nMIDDLEINT | MEDIUMINT | \n \nNUMERIC | DECIMAL | \n \nCurrently, all MySQL types are supported in MariaDB.\n \nFor type mapping between Cassandra and MariaDB, see\nCassandra storage engine.\n \nExample\n \nSilent changes in action:\n \nCREATE TABLE SilenceIsGolden\n (\n f1 TEXT CHARACTER SET binary,\n f2 VARCHAR(15) CHARACTER SET binary,\n f3 CHAR CHARACTER SET binary,\n f4 ENUM(\'x\',\'y\',\'z\') CHARACTER SET binary,\n f5 VARCHAR (65536),\n f6 VARBINARY (65536),\n f7 INT1\n );\nQuery OK, 0 rows affected, 2 warnings (0.31 sec)\n \nSHOW WARNINGS;\n \n+-------+------+-----------------------------------------------+\n| Level | Code | Message |\n+-------+------+-----------------------------------------------+\n| Note | 1246 | Converting column \'f5\' from VARCHAR to\nTEXT |\n| Note | 1246 | Converting column \'f6\' from VARBINARY to\nBLOB |\n+-------+------+-----------------------------------------------+\n \nDESCRIBE SilenceIsGolden;\n \n+-------+-------------------+------+-----+---------+-------+\n| Field | Type | Null | Key | Default | Extra |\n+-------+-------------------+------+-----+---------+-------+\n| f1 | blob | YES | | NULL | |\n| f2 | varbinary(15) | YES | | NULL | |\n| f3 | binary(1) | YES | | NULL | |\n| f4 | enum(\'x\',\'y\',\'z\') | YES | | NULL | |\n| f5 | mediumtext | YES | | NULL | |\n| f6 | mediumblob | YES | | NULL | |\n| f7 | tinyint(4) | YES | | NULL | |\n+-------+-------------------+------+-----+---------+-------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/silent-column-changes/','','https://mariadb.com/kb/en/silent-column-changes/'),(689,'NEXT VALUE for sequence_name',40,'SEQUENCEs were introduced in MariaDB 10.3\n \nSyntax\n------ \nNEXT VALUE FOR sequence\n \nor\n \nNEXTVAL(sequence_name)\n \nor in Oracle mode (SQL_MODE=ORACLE)\n \nsequence_name.nextval\n \nNEXT VALUE FOR is ANSI SQL syntax while NEXTVAL() is\nPostgreSQL syntax.\n \nDescription\n----------- \nGenerate next value for a SEQUENCE.\nYou can greatly speed up NEXT VALUE by creating the sequence\nwith the CACHE option. If not, every NEXT VALUE usage will\ncause changes in the stored SEQUENCE table.\nWhen using NEXT VALUE the value will be reserved at once and\nwill not be reused, except if the SEQUENCE was created with\nCYCLE. This means that when you are using SEQUENCEs you have\nto expect gaps in the generated sequence numbers.\nIf one updates the SEQUENCE with SETVAL() or ALTER SEQUENCE\n... RESTART, NEXT VALUE FOR will notice this and start from\nthe next requested value.\nFLUSH TABLES will close the sequence and the next sequence\nnumber generated will be according to what\'s stored in the\nSEQUENCE object. In effect, this will discard the cached\nvalues.\nNEXT VALUE requires the INSERT privilege.\n \nYou can also use NEXT VALUE FOR sequence for column DEFAULT.\n \n\n\nURL: https://mariadb.com/kb/en/next-value-for-sequence_name/','','https://mariadb.com/kb/en/next-value-for-sequence_name/'),(691,'PREVIOUS VALUE FOR sequence_name',40,'SEQUENCEs were introduced in MariaDB 10.3.\n \nSyntax\n------ \nPREVIOUS VALUE FOR sequence_name\n \nor\n \nLASTVAL(sequence_name)\n \nor in Oracle mode (SQL_MODE=ORACLE)\n \nsequence_name.currval\n \nPREVIOUS VALUE FOR is IBM DB2 syntax while LASTVAL() is\nPostgreSQL syntax.\n \nDescription\n----------- \nGet last value in the current connection generated from a\nsequence.\nIf the sequence has not yet been used by the connection,\nPREVIOUS VALUE FOR returns NULL\nIf a SEQUENCE has been dropped and re-created then it\'s\ntreated as a new SEQUENCE and PREVIOUS VALUE FOR will return\nNULL.\nFLUSH TABLES has no effect on PREVIOUS VALUE FOR.\nPrevious values for all used sequences are stored per\nconnection until connection ends.\n \nPREVIOUS VALUE FOR requires the SELECT privilege.\n \nExample\n \nSELECT PREVIOUS VALUE FOR s;\n \n+----------------------+\n| PREVIOUS VALUE FOR s |\n+----------------------+\n| 100 |\n+----------------------+\n \n\n\nURL:\nhttps://mariadb.com/kb/en/previous-value-for-sequence_name/','','https://mariadb.com/kb/en/previous-value-for-sequence_name/'),(686,'TRUNCATE TABLE',39,'Syntax\n------ \nTRUNCATE [TABLE] tbl_name\n [WAIT n | NOWAIT]\n \nDescription\n----------- \nTRUNCATE TABLE empties a table completely. It requires the\nDROP privilege. See GRANT.\n \ntbl_name can also be specified in the form db_name.tbl_name\n(see Identifier Qualifiers).\n \nLogically, TRUNCATE TABLE is equivalent to a DELETE\nstatement that deletes all rows, but there are practical\ndifferences under some circumstances.\n \nTRUNCATE TABLE will fail for an InnoDB table if any FOREIGN\nKEY constraints from other tables reference the table,\nreturning the error:\n \nERROR 1701 (42000): Cannot truncate a table referenced in a\nforeign key constraint\n \nForeign Key constraints between columns in the same table\nare permitted.\n \nFor an InnoDB table, if there are no FOREIGN KEY\nconstraints, InnoDB performs fast truncation by dropping the\noriginal table and creating an empty one with the same\ndefinition, which is much faster than deleting rows one by\none. The AUTO_INCREMENT counter is reset by TRUNCATE TABLE,\nregardless of whether there is a FOREIGN KEY constraint.\n \nThe count of rows affected by TRUNCATE TABLE is accurate\nonly\nwhen it is mapped to a DELETE statement.\n \nFor other storage engines, TRUNCATE TABLE differs from\nDELETE in the following ways:\nTruncate operations drop and re-create the table, which is\nmuch\n faster than deleting rows one by one, particularly for\nlarge tables.\nTruncate operations cause an implicit commit.\nTruncation operations cannot be performed if the session\nholds an\n active table lock.\nTruncation operations do not return a meaningful value for\nthe number\n of deleted rows. The usual result is \"0 rows affected,\"\nwhich should\n be interpreted as \"no information.\"\nAs long as the table format file tbl_name.frm is valid, the\n table can be re-created as an empty table\n with TRUNCATE TABLE, even if the data or index files have\nbecome\n corrupted.\nThe table handler does not remember the last\n used AUTO_INCREMENT value, but starts counting\n from the beginning. This is true even for MyISAM and\nInnoDB, which normally\n do not reuse sequence values.\nWhen used with partitioned tables, TRUNCATE TABLE preserves\n the partitioning; that is, the data and index files are\ndropped and\n re-created, while the partition definitions (.par) file is\n unaffected.\nSince truncation of a table does not make any use of DELETE,\n the TRUNCATE statement does not invoke ON DELETE triggers.\nTRUNCATE TABLE will only reset the values in the Performance\nSchema summary tables to zero or null, and will not remove\nthe rows.\n \nFor the purposes of binary logging and replication, TRUNCATE\nTABLE is treated as DROP TABLE followed by CREATE TABLE (DDL\nrather than DML).\n \nTRUNCATE TABLE does not work on views. Currently, TRUNCATE\nTABLE drops all historical records from a system-versioned\ntable.\n \nWAIT/NOWAIT\n \nSet the lock wait timeout. See WAIT and NOWAIT.\n \nOracle-mode\n \nOracle-mode from MariaDB 10.3 permits the optional keywords\nREUSE STORAGE or DROP STORAGE to be used.\n \nTRUNCATE [TABLE] tbl_name [{DROP | REUSE} STORAGE]\n \nThese have no effect on the operation.\n \nPerformance\n \nTRUNCATE TABLE is faster than DELETE, because it drops and\nre-creates a table.\n \nWith XtraDB/InnoDB, TRUNCATE TABLE is slower if\ninnodb_file_per_table=ON is set (the default since MariaDB\n5.5). This is because TRUNCATE TABLE unlinks the underlying\ntablespace file, which can be an expensive operation. See\nMDEV-8069 for more details.\n \nThe performance issues with innodb_file_per_table=ON can be\nexacerbated in cases where the InnoDB buffer pool is very\nlarge and innodb_adaptive_hash_index=ON is set. In that\ncase, using DROP TABLE followed by CREATE TABLE instead of\nTRUNCATE TABLE may perform better. Setting\ninnodb_adaptive_hash_index=OFF can also help. In MariaDB\n10.2.19 and later, this performance can also be improved by\nsetting innodb_safe_truncate=OFF. See MDEV-9459 for more\ndetails.\n \nSetting innodb_adaptive_hash_index=OFF can also improve\nTRUNCATE TABLE performance in general. See MDEV-16796 for\nmore details.\n \n\n\nURL: https://mariadb.com/kb/en/truncate-table/','','https://mariadb.com/kb/en/truncate-table/'),(694,'Differences between JSON_QUERY and JSON_VALUE',41,'JSON functions were added in MariaDB 10.2.3.\n \nThe primary difference between the two functions is that\nJSON_QUERY returns an object or an array, while JSON_VALUE\nreturns a scalar. \n \nTake the following JSON document as an example\n \nSET @json=\'{ \"x\": [0,1], \"y\": \"[0,1]\", \"z\":\n\"Monty\" }\';\n \nNote that data member \"x\" is an array, and data members\n\"y\" and \"z\" are strings. The following examples\ndemonstrate the differences between the two functions.\n \nSELECT JSON_QUERY(@json,\'$\'), JSON_VALUE(@json,\'$\');\n+--------------------------------------------+-----------------------+\n| JSON_QUERY(@json,\'$\') | JSON_VALUE(@json,\'$\') |\n+--------------------------------------------+-----------------------+\n| { \"x\": [0,1], \"y\": \"[0,1]\", \"z\": \"Monty\" } |\nNULL |\n+--------------------------------------------+-----------------------+\n \nSELECT JSON_QUERY(@json,\'$.x\'), JSON_VALUE(@json,\'$.x\');\n+-------------------------+-------------------------+\n| JSON_QUERY(@json,\'$.x\') | JSON_VALUE(@json,\'$.x\') |\n+-------------------------+-------------------------+\n| [0,1] | NULL |\n+-------------------------+-------------------------+\n \nSELECT JSON_QUERY(@json,\'$.y\'), JSON_VALUE(@json,\'$.y\');\n+-------------------------+-------------------------+\n| JSON_QUERY(@json,\'$.y\') | JSON_VALUE(@json,\'$.y\') |\n+-------------------------+-------------------------+\n| NULL | [0,1] |\n+-------------------------+-------------------------+\n \nSELECT JSON_QUERY(@json,\'$.z\'), JSON_VALUE(@json,\'$.z\');\n+-------------------------+-------------------------+\n| JSON_QUERY(@json,\'$.z\') | JSON_VALUE(@json,\'$.z\') |\n+-------------------------+-------------------------+\n| NULL | Monty |\n+-------------------------+-------------------------+\n \nSELECT JSON_QUERY(@json,\'$.x[0]\'),\nJSON_VALUE(@json,\'$.x[0]\');\n+----------------------------+----------------------------+\n| JSON_QUERY(@json,\'$.x[0]\') |\nJSON_VALUE(@json,\'$.x[0]\') |\n+----------------------------+----------------------------+\n| NULL | 0 |\n+----------------------------+----------------------------+\n \n\n \n \n \n \n \n \n \n\nURL:\nhttps://mariadb.com/kb/en/differences-between-json_query-and-json_value/','','https://mariadb.com/kb/en/differences-between-json_query-and-json_value/'),(692,'Sequence Overview',40,'Sequences were introduced in MariaDB 10.3.\n \nIntroduction\n \nA sequence is an object that generates a sequence of numeric\nvalues, as specified by the CREATE SEQUENCE statement. \n \nCREATE SEQUENCE will create a sequence that generates new\nvalues when called with NEXT VALUE FOR sequence_name. It\'s\nan alternative to AUTO INCREMENT when one wants to have more\ncontrol of how the numbers are generated. As the SEQUENCE\ncaches values (up to the CACHE value in the CREATE SEQUENCE\nstatement, by default 1000) it can in some cases be much\nfaster than AUTO INCREMENT. Another benefit is that one can\naccess the last value generated by all used sequences, which\nsolves one of the limitations with LAST_INSERT_ID().\n \nCreating a Sequence\n \nThe CREATE SEQUENCE statement is used to create a sequence.\nHere is an example of a sequence starting at 100,\nincrementing by 10 each time:\n \nCREATE SEQUENCE s START WITH 100 INCREMENT BY 10;\n \nThe CREATE SEQUENCE statement, along with defaults, can be\nviewd with the SHOW CREATE SEQUENCE STATEMENT, for example:\n \nSHOW CREATE SEQUENCE s\\G\n*************************** 1. row\n***************************\n Table: s\nCreate Table: CREATE SEQUENCE `s` start with 100 minvalue 1\nmaxvalue 9223372036854775806 \n increment by 10 cache 1000 nocycle ENGINE=InnoDB\n \nUsing Sequence Objects\n \nTo get the next value from a sequence, use\n \nNEXT VALUE FOR sequence_name\n \nor\n \nNEXTVAL(sequence_name)\n \nor in Oracle mode (SQL_MODE=ORACLE)\n \nsequence_name.nextval\n \nFor retrieving the last value used by the current connection\nfrom a sequence\nuse:\n \nPREVIOUS VALUE FOR sequence_name\n \nor\n \nLASTVAL(sequence_name)\n \nor in Oracle mode (SQL_MODE=ORACLE)\n \nsequence_name.currval\n \nFor example:\n \nSELECT NEXTVAL(s);\n+------------+\n| NEXTVAL(s) |\n+------------+\n| 100 |\n+------------+\n \nSELECT NEXTVAL(s);\n+------------+\n| NEXTVAL(s) |\n+------------+\n| 110 |\n+------------+\n \nSELECT LASTVAL(s);\n+------------+\n| LASTVAL(s) |\n+------------+\n| 110 |\n+------------+\n \nUsing Sequences in DEFAULT\n \nStarting from 10.3.3 you can use Sequences in DEFAULT:\n \ncreate sequence s1;\n \ncreate table t1 (a int primary key default (next value for\ns1), b int);\ninsert into t1 (b) values (1),(2);\nselect * from t1;\n \n+---+------+\n| a | b |\n+---+------+\n| 1 | 1 |\n| 2 | 2 |\n+---+------+\n \nChanging a Sequence\n \nThe ALTER SEQUENCE statement is used for changing sequences.\nFor example, to restart the sequence at another value:\n \nALTER SEQUENCE s RESTART 50;\n \nSELECT NEXTVAL(s);\n+------------+\n| NEXTVAL(s) |\n+------------+\n| 50 |\n+------------+\n \nThe SETVAL function can also be used to set the next value\nto be returned for a SEQUENCE, for example:\n \nSELECT SETVAL(s, 100);\n+----------------+\n| SETVAL(s, 100) |\n+----------------+\n| 100 |\n+----------------+\n \nSETVAL can only be used to increase the sequence value.\nAttempting to set a lower value will fail, returning NULL:\n \nSELECT SETVAL(s, 50);\n+---------------+\n| SETVAL(s, 50) |\n+---------------+\n| NULL |\n+---------------+\n \nDropping a Sequence\n \nThe DROP SEQUENCE statement is used to drop a sequence, for\nexample:\n \nDROP SEQUENCE s;\n \nReplication\n \nIf one wants to use Sequences in a master-master setup or\nwith Galera one\nshould use INCREMENT=0. This will tell the Sequence to use\nauto_increment_increment and auto_increment_offset to\ngenerate unique values for each server.\n \nStandards Compliance\n \nMariaDB 10.3 supports both ANSI SQL and Oracle syntax for\nsequences.\n \nHowever as SEQUENCE is implemented as a special kind of\ntable, it uses the same namespace as tables. The benefits\nare that sequences show up in SHOW TABLES, and one can also\ncreate a sequence with CREATE TABLE and drop it with DROP\nTABLE. One can SELECT from it as from any other table. This\nensures that all old tools that work with tables should work\nwith sequences.\n \nSince sequence objects act as regular tables in many\ncontexts, they will be affected by LOCK TABLES. This is not\nthe case in other DBMS, such as Oracle, where LOCK TABLE\ndoes not affect sequences.\n \nNotes\n \nOne of the goals with the Sequence implementation is that\nall old\ntools, such as mysqldump, should work unchanged, while still\nkeeping the\nnormal usage of sequence standard compatibly.\n \nTo make this possible, sequence is currently implemented as\na table with a few exclusive properties.\n \nThe special properties for sequence tables are:\nA sequence table has always one row.\nWhen one creates a sequence, either with CREATE TABLE or\nCREATE SEQUENCE, one row will be inserted.\nIf one tries to insert into a sequence table, the single row\nwill be updated. This allows mysqldump to work but also\ngives the additional benefit that one can change all\nproperties of a sequence with a single insert. New\napplications should of course also use ALTER SEQUENCE.\nUPDATE or DELETE can\'t be performed on Sequence objects.\nDoing a select on the sequence shows the current state of\nthe sequence, except the values that are reserved in the\ncache. The next_value column shows the next value not\nreserved by the cache.\nFLUSH TABLES will close the sequence and the next sequence\nnumber generated will be according to what\'s stored in the\nSequence object. In effect, this will discard the cached\nvalues.\nA number of normal table operations work on Sequence tables.\nSee next section.\n \nTable Operations that Work with Sequences\n \nSHOW CREATE TABLE sequence_name. This shows the table\nstructure that is behind the SEQUENCE including the field\nnames that can be used with SELECT or even CREATE TABLE.\nCREATE TABLE sequence-structure ... SEQUENCE=1\nALTER TABLE sequence RENAME TO sequence2\nRENAME TABLE sequence_name TO new_sequence_name\nDROP TABLE sequence_name. This is allowed mainly to get old\ntools like mysqldump to work with sequence tables.\nSHOW TABLES\n \nImplementation\n \nInternally, sequence tables are created as a normal table\nwithout\nrollback (the InnoDB, Aria and MySAM engines support this),\nwrapped by a\nsequence engine object. This allowed us to create sequences\nwith\nalmost no performance impact for normal tables. (The cost is\none \'if\'\nper insert if the binary log is enabled).\n \nUnderlying Table Structure\n \nThe following example shows the table structure of sequences\nand how it\ncan be used as a table.\n(Output of results are slightly edited to make them easier\nto read)\n \ncreate sequence t1;\nshow create sequence t1\\G\n***** 1. row *****\n CREATE SEQUENCE `t1` start with 1 minvalue 1 maxvalue\n9223372036854775806\n increment by 1 cache 1000 nocycle ENGINE=InnoDB\n \nshow create table t1\\G\n***** 1. row *****\nCreate Table: CREATE TABLE `t1` (\n `next_not_cached_value` bigint(21) NOT NULL,\n `minimum_value` bigint(21) NOT NULL,\n `maximum_value` bigint(21) NOT NULL,\n `start_value` bigint(21) NOT NULL COMMENT \'start value\nwhen sequences is created or value if RESTART is used\',\n `increment` bigint(21) NOT NULL COMMENT \'increment\nvalue\',\n `cache_size` bigint(21) unsigned NOT NULL,\n `cycle_option` tinyint(1) unsigned NOT NULL COMMENT \'0 if\nno cycles are allowed, 1 if the sequence should begin a new\ncycle when maximum_value is passed\',\n `cycle_count` bigint(21) NOT NULL COMMENT \'How many cycles\nhave been done\'\n) ENGINE=InnoDB SEQUENCE=1\n \nselect * from t1\\G\nnext_not_cached_value: 1\n minimum_value: 1\n maximum_value: 9223372036854775806\n start_value: 1\n increment: 1\n cache_size: 1000\n cycle_option: 0\n cycle_count: 0\nThe cycle_count column is incremented every time the\nsequence wraps around.\n \nCredits\n \nThanks to Jianwe Zhao from Aliyun for his work on SEQUENCE\nin AliSQL, which gave ideas and inspiration for this work.\nThanks to Peter Gulutzan,who helped test and gave useful\ncomments about the implementation.\n \n\n\nURL: https://mariadb.com/kb/en/sequence-overview/','','https://mariadb.com/kb/en/sequence-overview/'),(693,'SETVAL()',40,'SEQUENCEs were introduced in MariaDB 10.3.\n \nSyntax\n------ \nSETVAL(sequence_name, next_value, [is_used, [round]])\n \nDescription\n----------- \nSet the next value to be returned for a SEQUENCE.\n \nThis function is compatible with PostgreSQL syntax, extended\nwith the round argument.\n \nIf the is_used argument is not given or is 1 or true, then\nthe next used value will\none after the given value. If is_used is 0 or false then the\nnext generated value\nwill be the given value.\n \nIf round is used then it will set the round value (or the\ninternal cycle count, starting at zero) for the sequence.\nIf round is not used, it\'s assumed to be 0.\n \nnext_value must be an integer literal.\n \nFor SEQUENCE tables defined with CYCLE (see CREATE SEQUENCE)\none should use both next_value and round to define the next\nvalue. In this case the\ncurrent sequence value is defined to be round, next_value.\n \nThe result returned by SETVAL() is next_value or NULL if the\ngiven next_value and round is smaller than the current\nvalue.\n \nSETVAL() will not set the SEQUENCE value to a something that\nis less than\nits current value. This is needed to ensure that SETVAL()\nis replication safe. If you want to set the SEQUENCE to a\nsmaller number\nuse ALTER SEQUENCE.\n \nIf CYCLE is used, first round and then next_value are\ncompared\nto see if the value is bigger than the current value.\n \nInternally, in the MariaDB server, SETVAL() is used to\ninform\nslaves that a SEQUENCE has changed value. The slave may get\nSETVAL() statements out of order, but this is ok as only the\nbiggest one will have an effect.\n \nSETVAL requires the INSERT privilege.\n \nExamples\n-------- \nSELECT setval(foo, 42); -- Next nextval will return 43\nSELECT setval(foo, 42, true); -- Same as above\nSELECT setval(foo, 42, false); -- Next nextval will return\n42\n \nSETVAL setting higher and lower values on a sequence with an\nincrement of 10:\n \nSELECT NEXTVAL(s);\n+------------+\n| NEXTVAL(s) |\n+------------+\n| 50 |\n+------------+\n \nSELECT SETVAL(s, 100);\n+----------------+\n| SETVAL(s, 100) |\n+----------------+\n| 100 |\n+----------------+\n \nSELECT NEXTVAL(s);\n+------------+\n| NEXTVAL(s) |\n+------------+\n| 110 |\n+------------+\n \nSELECT SETVAL(s, 50);\n+---------------+\n| SETVAL(s, 50) |\n+---------------+\n| NULL |\n+---------------+\n \nSELECT NEXTVAL(s);\n+------------+\n| NEXTVAL(s) |\n+------------+\n| 120 |\n+------------+\n \nExample demonstrating round:\n \nCREATE OR REPLACE SEQUENCE s1\n START WITH 1\n MINVALUE 1\n MAXVALUE 99\n INCREMENT BY 1 \n CACHE 20 \n CYCLE;\n \nSELECT SETVAL(s1, 99, 1, 0);\n+----------------------+\n| SETVAL(s1, 99, 1, 0) |\n+----------------------+\n| 99 |\n+----------------------+\n \nSELECT NEXTVAL(s1);\n+-------------+\n| NEXTVAL(s1) |\n+-------------+\n| 1 |\n+-------------+\n \nThe following statement returns NULL, as the given\nnext_value and round is smaller than the current value.\n \nSELECT SETVAL(s1, 99, 1, 0);\n+----------------------+\n| SETVAL(s1, 99, 1, 0) |\n+----------------------+\n| NULL |\n+----------------------+\n \nSELECT NEXTVAL(s1);\n+-------------+\n| NEXTVAL(s1) |\n+-------------+\n| 2 |\n+-------------+\n \nIncreasing the round from zero to 1 will allow next_value to\nbe returned.\n \nSELECT SETVAL(s1, 99, 1, 1);\n+----------------------+\n| SETVAL(s1, 99, 1, 1) |\n+----------------------+\n| 99 |\n+----------------------+\n \nSELECT NEXTVAL(s1);\n+-------------+\n| NEXTVAL(s1) |\n+-------------+\n| 1 |\n+-------------+\n \n\n\nURL: https://mariadb.com/kb/en/setval/','','https://mariadb.com/kb/en/setval/'),(696,'JSON_ARRAY_APPEND',41,'JSON functions were added in MariaDB 10.2.3.\n \nSyntax\n------ \nJSON_ARRAY_APPEND(json_doc, path, value[, path, value] ...)\n \nDescription\n----------- \nAppends values to the end of the specified arrays within a\nJSON document, returning the result, or NULL if any of the\narguments are NULL.\n \nEvaluation is performed from left to right, with the\nresulting document from the previous pair becoming the new\nvalue against which the next pair is evaluated.\n \nIf the json_doc is not a valid JSON document, or if any of\nthe paths are not valid, or contain a * or ** wildcard, an\nerror is returned.\n \nExamples\n-------- \nSET @json = \'[1, 2, [3, 4]]\';\n \nSELECT JSON_ARRAY_APPEND(@json, \'$[0]\', 5)\n+-------------------------------------+\n| JSON_ARRAY_APPEND(@json, \'$[0]\', 5) |\n+-------------------------------------+\n| [[1, 5], 2, [3, 4]] |\n+-------------------------------------+\n \nSELECT JSON_ARRAY_APPEND(@json, \'$[1]\', 6);\n+-------------------------------------+\n| JSON_ARRAY_APPEND(@json, \'$[1]\', 6) |\n+-------------------------------------+\n| [1, [2, 6], [3, 4]] |\n+-------------------------------------+\n \nSELECT JSON_ARRAY_APPEND(@json, \'$[1]\', 6, \'$[2]\', 7);\n+------------------------------------------------+\n| JSON_ARRAY_APPEND(@json, \'$[1]\', 6, \'$[2]\', 7) |\n+------------------------------------------------+\n| [1, [2, 6], [3, 4, 7]] |\n+------------------------------------------------+\n \nSELECT JSON_ARRAY_APPEND(@json, \'$\', 5);\n+----------------------------------+\n| JSON_ARRAY_APPEND(@json, \'$\', 5) |\n+----------------------------------+\n| [1, 2, [3, 4], 5] |\n+----------------------------------+\n \nSET @json = \'{\"A\": 1, \"B\": [2], \"C\": [3, 4]}\';\n \nSELECT JSON_ARRAY_APPEND(@json, \'$.B\', 5);\n+------------------------------------+\n| JSON_ARRAY_APPEND(@json, \'$.B\', 5) |\n+------------------------------------+\n| {\"A\": 1, \"B\": [2, 5], \"C\": [3, 4]} |\n+------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/json_array_append/','','https://mariadb.com/kb/en/json_array_append/'),(697,'JSON_ARRAY_INSERT',41,'JSON functions were added in MariaDB 10.2.3.\n \nSyntax\n------ \nJSON_ARRAY_INSERT(json_doc, path, value[, path, value] ...)\n \nDescription\n----------- \nInserts a value into a JSON document, returning the modified\ndocument, or NULL if any of the arguments are NULL.\n \nEvaluation is performed from left to right, with the\nresulting document from the previous pair becoming the new\nvalue against which the next pair is evaluated.\n \nIf the json_doc is not a valid JSON document, or if any of\nthe paths are not valid, or contain a * or ** wildcard, an\nerror is returned.\n \nExamples\n-------- \nSET @json = \'[1, 2, [3, 4]]\';\n \nSELECT JSON_ARRAY_INSERT(@json, \'$[0]\', 5);\n+-------------------------------------+\n| JSON_ARRAY_INSERT(@json, \'$[0]\', 5) |\n+-------------------------------------+\n| [5, 1, 2, [3, 4]] |\n+-------------------------------------+\n \nSELECT JSON_ARRAY_INSERT(@json, \'$[1]\', 6);\n+-------------------------------------+\n| JSON_ARRAY_INSERT(@json, \'$[1]\', 6) |\n+-------------------------------------+\n| [1, 6, 2, [3, 4]] |\n+-------------------------------------+\n \nSELECT JSON_ARRAY_INSERT(@json, \'$[1]\', 6, \'$[2]\', 7);\n+------------------------------------------------+\n| JSON_ARRAY_INSERT(@json, \'$[1]\', 6, \'$[2]\', 7) |\n+------------------------------------------------+\n| [1, 6, 7, 2, [3, 4]] |\n+------------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/json_array_insert/','','https://mariadb.com/kb/en/json_array_insert/'),(699,'JSON_CONTAINS',41,'JSON functions were added in MariaDB 10.2.3.\n \nSyntax\n------ \nJSON_CONTAINS(json_doc, val[, path])\n \nDescription\n----------- \nReturns whether or not the specified value is found in the\ngiven JSON document or, optionally, at the specified path\nwithin the document. Returns 1 if it does, 0 if not and NULL\nif any of the arguments are null. An error occurs if the\ndocument or path is not valid, or contains the * or **\nwildcards.\n \nExamples\n-------- \nSET @json = \'{\"A\": 0, \"B\": {\"C\": 1}, \"D\": 2}\';\n \nSELECT JSON_CONTAINS(@json, \'2\', \'$.A\');\n+----------------------------------+\n| JSON_CONTAINS(@json, \'2\', \'$.A\') |\n+----------------------------------+\n| 0 |\n+----------------------------------+\n \nSELECT JSON_CONTAINS(@json, \'2\', \'$.D\');\n+----------------------------------+\n| JSON_CONTAINS(@json, \'2\', \'$.D\') |\n+----------------------------------+\n| 1 |\n+----------------------------------+\n \nSELECT JSON_CONTAINS(@json, \'{\"C\": 1}\', \'$.A\');\n+-----------------------------------------+\n| JSON_CONTAINS(@json, \'{\"C\": 1}\', \'$.A\') |\n+-----------------------------------------+\n| 0 |\n+-----------------------------------------+\n \nSELECT JSON_CONTAINS(@json, \'{\"C\": 1}\', \'$.B\');\n+-----------------------------------------+\n| JSON_CONTAINS(@json, \'{\"C\": 1}\', \'$.B\') |\n+-----------------------------------------+\n| 1 |\n+-----------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/json_contains/','','https://mariadb.com/kb/en/json_contains/'),(700,'JSON_CONTAINS_PATH',41,'JSON functions were added in MariaDB 10.2.3.\n \nSyntax\n------ \nJSON_CONTAINS_PATH(json_doc, return_arg, path[, path] ...)\n \nDescription\n----------- \nIndicates whether the given JSON document contains data at\nthe specified path or paths. Returns 1 if it does, 0 if not\nand NULL if any of the arguments are null.\n \nThe return_arg can be one or all:\none - Returns 1 if at least one path exists within the JSON\ndocument. \nall - Returns 1 only if all paths exist within the JSON\ndocument.\n \nExamples\n-------- \nSET @json = \'{\"A\": 1, \"B\": [2], \"C\": [3, 4]}\';\n \nSELECT JSON_CONTAINS_PATH(@json, \'one\', \'$.A\', \'$.D\');\n+------------------------------------------------+\n| JSON_CONTAINS_PATH(@json, \'one\', \'$.A\', \'$.D\') |\n+------------------------------------------------+\n| 1 |\n+------------------------------------------------+\n1 row in set (0.00 sec)\n \nSELECT JSON_CONTAINS_PATH(@json, \'all\', \'$.A\', \'$.D\');\n+------------------------------------------------+\n| JSON_CONTAINS_PATH(@json, \'all\', \'$.A\', \'$.D\') |\n+------------------------------------------------+\n| 0 |\n+------------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/json_contains_path/','','https://mariadb.com/kb/en/json_contains_path/'),(701,'JSON_DEPTH',41,'JSON functions were added in MariaDB 10.2.3.\n \nSyntax\n------ \nJSON_DEPTH(json_doc)\n \nDescription\n----------- \nReturns the maximum depth of the given JSON document, or\nNULL if the argument is null. An error will occur if the\nargument is an invalid JSON document.\nScalar values or empty arrays or objects have a depth of 1.\nArrays or objects that are not empty but contain only\nelements or member values of depth 1 will have a depth of 2.\nIn other cases, the depth will be greater than 2.\n \nExamples\n-------- \nSELECT JSON_DEPTH(\'[]\'), JSON_DEPTH(\'true\'),\nJSON_DEPTH(\'{}\');\n+------------------+--------------------+------------------+\n| JSON_DEPTH(\'[]\') | JSON_DEPTH(\'true\') |\nJSON_DEPTH(\'{}\') |\n+------------------+--------------------+------------------+\n| 1 | 1 | 1 |\n+------------------+--------------------+------------------+\n \nSELECT JSON_DEPTH(\'[1, 2, 3]\'), JSON_DEPTH(\'[[], {},\n[]]\');\n+-------------------------+----------------------------+\n| JSON_DEPTH(\'[1, 2, 3]\') | JSON_DEPTH(\'[[], {}, []]\') |\n+-------------------------+----------------------------+\n| 2 | 2 |\n+-------------------------+----------------------------+\n \nSELECT JSON_DEPTH(\'[1, 2, [3, 4, 5, 6], 7]\');\n+---------------------------------------+\n| JSON_DEPTH(\'[1, 2, [3, 4, 5, 6], 7]\') |\n+---------------------------------------+\n| 3 |\n+---------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/json_depth/','','https://mariadb.com/kb/en/json_depth/'),(703,'JSON_EXISTS',41,'JSON functions were added in MariaDB 10.2.3.\n \nSyntax\n------ \nDescription\n----------- \nDetermines whether a specified JSON value exists in the\ngiven data. Returns 1 if found, 0 if not, or NULL if any of\nthe inputs were NULL.\n \nExamples\n-------- \nSELECT JSON_EXISTS(\'{\"key1\":\"xxxx\", \"key2\":[1, 2,\n3]}\', \"$.key2\");\n+------------------------------------------------------------+\n| JSON_EXISTS(\'{\"key1\":\"xxxx\", \"key2\":[1, 2, 3]}\',\n\"$.key2\") |\n+------------------------------------------------------------+\n| 1 |\n+------------------------------------------------------------+\n \nSELECT JSON_EXISTS(\'{\"key1\":\"xxxx\", \"key2\":[1, 2,\n3]}\', \"$.key3\");\n+------------------------------------------------------------+\n| JSON_EXISTS(\'{\"key1\":\"xxxx\", \"key2\":[1, 2, 3]}\',\n\"$.key3\") |\n+------------------------------------------------------------+\n| 0 |\n+------------------------------------------------------------+\n \nSELECT JSON_EXISTS(\'{\"key1\":\"xxxx\", \"key2\":[1, 2,\n3]}\', \"$.key2[1]\");\n+---------------------------------------------------------------+\n| JSON_EXISTS(\'{\"key1\":\"xxxx\", \"key2\":[1, 2, 3]}\',\n\"$.key2[1]\") |\n+---------------------------------------------------------------+\n| 1 |\n+---------------------------------------------------------------+\n \nSELECT JSON_EXISTS(\'{\"key1\":\"xxxx\", \"key2\":[1, 2,\n3]}\', \"$.key2[10]\");\n+----------------------------------------------------------------+\n| JSON_EXISTS(\'{\"key1\":\"xxxx\", \"key2\":[1, 2, 3]}\',\n\"$.key2[10]\") |\n+----------------------------------------------------------------+\n| 0 |\n+----------------------------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/json_exists/','','https://mariadb.com/kb/en/json_exists/'),(704,'JSON_EXTRACT',41,'JSON functions were added in MariaDB 10.2.3.\n \nSyntax\n------ \nJSON_EXTRACT(json_doc, path[, path] ...)\n \nDescription\n----------- \nExtracts data from a JSON document. The extracted data is\nselected from the parts matching the path arguments. Returns\nall matched values; either as a single matched value, or, if\nthe arguments could return multiple values, a result\nautowrapped as an array in the matching order.\n \nReturns NULL if no paths match or if any of the arguments\nare NULL. \n \nAn error will occur if any path argument is not a valid\npath, or if the json_doc argument is not a valid JSON\ndocument.\n \nExamples\n-------- \nSET @json = \'[1, 2, [3, 4]]\';\n \nSELECT JSON_EXTRACT(@json, \'$[1]\');\n+-----------------------------+\n| JSON_EXTRACT(@json, \'$[1]\') |\n+-----------------------------+\n| 2 |\n+-----------------------------+\n \nSELECT JSON_EXTRACT(@json, \'$[2]\');\n+-----------------------------+\n| JSON_EXTRACT(@json, \'$[2]\') |\n+-----------------------------+\n| [3, 4] |\n+-----------------------------+\n \nSELECT JSON_EXTRACT(@json, \'$[2][1]\');\n+--------------------------------+\n| JSON_EXTRACT(@json, \'$[2][1]\') |\n+--------------------------------+\n| 4 |\n+--------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/json_extract/','','https://mariadb.com/kb/en/json_extract/'),(705,'JSON_INSERT',41,'JSON functions were added in MariaDB 10.2.3.\n \nSyntax\n------ \nJSON_INSERT(json_doc, path, val[, path, val] ...)\n \nDescription\n----------- \nInserts data into a JSON document, returning the resulting\ndocument or NULL if any argument is null. \n \nAn error will occur if the JSON document is not invalid, or\nif any of the paths are invalid or contain a * or **\nwildcard.\n \nJSON_INSERT can only insert data while JSON_REPLACE can only\nupdate. JSON_SET can update or insert data. \n \nExamples\n-------- \nSET @json = \'{ \"A\": 0, \"B\": [1, 2]}\';\n \nSELECT JSON_INSERT(@json, \'$.C\', \'[3, 4]\');\n+--------------------------------------+\n| JSON_INSERT(@json, \'$.C\', \'[3, 4]\') |\n+--------------------------------------+\n| { \"A\": 0, \"B\": [1, 2], \"C\":\"[3, 4]\"} |\n+--------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/json_insert/','','https://mariadb.com/kb/en/json_insert/'),(706,'JSON_KEYS',41,'JSON functions were added in MariaDB 10.2.3.\n \nSyntax\n------ \nJSON_KEYS(json_doc[, path])\n \nDescription\n----------- \nReturns the keys as a JSON array from the top-level value of\na JSON object or, if the optional path argument is provided,\nthe top-level keys from the path. \n \nExcludes keys from nested sub-objects in the top level\nvalue. The resulting array will be empty if the selected\nobject is empty.\n \nReturns NULL if any of the arguments are null, a given path\ndoes not locate an object, or if the json_doc argument is\nnot an object.\n \nAn error will occur if JSON document is invalid, the path is\ninvalid or if the path contains a * or ** wildcard.\n \nExamples\n-------- \nSELECT JSON_KEYS(\'{\"A\": 1, \"B\": {\"C\": 2}}\');\n+--------------------------------------+\n| JSON_KEYS(\'{\"A\": 1, \"B\": {\"C\": 2}}\') |\n+--------------------------------------+\n| [\"A\", \"B\"] |\n+--------------------------------------+\n \nSELECT JSON_KEYS(\'{\"A\": 1, \"B\": 2, \"C\": {\"D\":\n3}}\', \'$.C\');\n+-----------------------------------------------------+\n| JSON_KEYS(\'{\"A\": 1, \"B\": 2, \"C\": {\"D\": 3}}\',\n\'$.C\') |\n+-----------------------------------------------------+\n| [\"D\"] |\n+-----------------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/json_keys/','','https://mariadb.com/kb/en/json_keys/'),(707,'JSON_LENGTH',41,'JSON functions were added in MariaDB 10.2.3.\n \nSyntax\n------ \nJSON_LENGTH(json_doc[, path])\n \nDescription\n----------- \nReturns the length of a JSON document, or, if the optional\npath argument is given, the length of the value within the\ndocument specified by the path. \n \nReturns NULL if any of the arguments argument are null or\nthe path argument does not identify a value in the document.\n\n \nAn error will occur if the JSON document is invalid, the\npath is invalid or if the path contains a * or ** wildcard.\n \nLength will be determined as follow:\nA scalar\'s length is always 1.\nIf an array, the number of elements in the array.\nIf an object, the number of members in the object.\n \nThe length of nested arrays or objects are not counted.\n \nExamples\n-------- \n\n \n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/json_length/','','https://mariadb.com/kb/en/json_length/'),(709,'JSON_MERGE',41,'JSON functions were added in MariaDB 10.2.3.\n \nSyntax\n------ \nJSON_MERGE(json_doc, json_doc[, json_doc] ...)\n \nDescription\n----------- \nMerges the given JSON documents.\n \nReturns the merged result,or NULL if any argument is NULL.\n \nAn error occurs if any of the arguments are not valid JSON\ndocuments.\n \nJSON_MERGE has been deprecated since MariaDB 10.2.25,\nMariaDB 10.3.16 and MariaDB 10.4.5. JSON_MERGE_PATCH is an\nRFC 7396-compliant replacement, and JSON_MERGE_PRESERVE is a\nsynonym.\n \nExample\n \nSET @json1 = \'[1, 2]\';\n \nSET @json2 = \'[3, 4]\';\n \nSELECT JSON_MERGE(@json1,@json2);\n+---------------------------+\n| JSON_MERGE(@json1,@json2) |\n+---------------------------+\n| [1, 2, 3, 4] |\n+---------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/json_merge/','','https://mariadb.com/kb/en/json_merge/'),(710,'JSON_MERGE_PATCH',41,'JSON_MERGE_PATCH was introduced in MariaDB 10.2.25, MariaDB\n10.3.16 and MariaDB 10.4.5.\n \nSyntax\n------ \nJSON_MERGE_PATCH(json_doc, json_doc[, json_doc] ...)\n \nDescription\n----------- \nMerges the given JSON documents, returning the merged\nresult, or NULL if any argument is NULL.\n \nJSON_MERGE_PATCH is an RFC 7396-compliant replacement for\nJSON_MERGE, which has been deprecated.\n \nExample\n \nSET @json1 = \'[1, 2]\';\n \nSET @json2 = \'[2, 3]\';\n \nSELECT\nJSON_MERGE_PATCH(@json1,@json2),JSON_MERGE_PRESERVE(@json1,@json2);\n+---------------------------------+------------------------------------+\n| JSON_MERGE_PATCH(@json1,@json2) |\nJSON_MERGE_PRESERVE(@json1,@json2) |\n+---------------------------------+------------------------------------+\n| [2, 3] | [1, 2, 2, 3] |\n+---------------------------------+------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/json_merge_patch/','','https://mariadb.com/kb/en/json_merge_patch/'),(711,'JSON_MERGE_PRESERVE',41,'JSON_MERGE_PRESERVE was introduced in MariaDB 10.2.25,\nMariaDB 10.3.16 and MariaDB 10.4.5.\n \nSyntax\n------ \nJSON_MERGE_PRESERVE(json_doc, json_doc[, json_doc] ...)\n \nDescription\n----------- \nMerges the given JSON documents, returning the merged\nresult, or NULL if any argument is NULL.\n \nJSON_MERGE_PRESERVE was introduced in MariaDB 10.2.25,\nMariaDB 10.3.16 and MariaDB 10.4.5 as a synonym for\nJSON_MERGE, which has been deprecated.\n \nExample\n \nSET @json1 = \'[1, 2]\';\n \nSET @json2 = \'[2, 3]\';\n \nSELECT\nJSON_MERGE_PATCH(@json1,@json2),JSON_MERGE_PRESERVE(@json1,@json2);\n+---------------------------------+------------------------------------+\n| JSON_MERGE_PATCH(@json1,@json2) |\nJSON_MERGE_PRESERVE(@json1,@json2) |\n+---------------------------------+------------------------------------+\n| [2, 3] | [1, 2, 2, 3] |\n+---------------------------------+------------------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/json_merge_preserve/','','https://mariadb.com/kb/en/json_merge_preserve/'),(713,'JSON_QUERY',41,'JSON functions were added in MariaDB 10.2.3.\n \nSyntax\n------ \nJSON_QUERY(json_doc, path)\n \nDescription\n----------- \nGiven a JSON document, returns an object or array specified\nby the path. Returns NULL if not given a valid JSON\ndocument, or if there is no match.\n \nExamples\n-------- \nselect json_query(\'{\"key1\":{\"a\":1, \"b\":[1,2]}}\',\n\'$.key1\');\n+-----------------------------------------------------+\n| json_query(\'{\"key1\":{\"a\":1, \"b\":[1,2]}}\',\n\'$.key1\') |\n+-----------------------------------------------------+\n| {\"a\":1, \"b\":[1,2]} |\n+-----------------------------------------------------+\n \nselect json_query(\'{\"key1\":123, \"key1\": [1,2,3]}\',\n\'$.key1\');\n+-------------------------------------------------------+\n| json_query(\'{\"key1\":123, \"key1\": [1,2,3]}\',\n\'$.key1\') |\n+-------------------------------------------------------+\n| [1,2,3] |\n+-------------------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/json_query/','','https://mariadb.com/kb/en/json_query/'),(714,'JSON_QUOTE',41,'JSON functions were added in MariaDB 10.2.3.\n \nSyntax\n------ \nJSON_QUOTE(json_value)\n \nDescription\n----------- \nQuotes a string as a JSON value, usually for producing valid\nJSON string literals for inclusion in JSON documents. Wraps\nthe string with double quote characters and escapes interior\nquotes and other special characters, returning a utf8mb4\nstring. \n \nReturns NULL if the argument is NULL.\n \nExamples\n-------- \nSELECT JSON_QUOTE(\'A\'), JSON_QUOTE(\"B\"),\nJSON_QUOTE(\'\"C\"\');\n+-----------------+-----------------+-------------------+\n| JSON_QUOTE(\'A\') | JSON_QUOTE(\"B\") |\nJSON_QUOTE(\'\"C\"\') |\n+-----------------+-----------------+-------------------+\n| \"A\" | \"B\" | \"\\\"C\\\"\" |\n+-----------------+-----------------+-------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/json_quote/','','https://mariadb.com/kb/en/json_quote/'),(715,'JSON_REMOVE',41,'JSON functions were added in MariaDB 10.2.3.\n \nSyntax\n------ \nJSON_REMOVE(json_doc, path[, path] ...)\n \nDescription\n----------- \nRemoves data from a JSON document returning the result, or\nNULL if any of the arguments are null. If the element does\nnot exist in the document, no changes are made.\n \nAn error will occur if JSON document is invalid, the path is\ninvalid or if the path contains a * or ** wildcard.\n \nPath arguments are evaluated from left to right, with the\nresult from the earlier evaluation being used as the value\nfor the next.\n \nExamples\n-------- \nSELECT JSON_REMOVE(\'{\"A\": 1, \"B\": 2, \"C\": {\"D\":\n3}}\', \'$.C\');\n+-------------------------------------------------------+\n| JSON_REMOVE(\'{\"A\": 1, \"B\": 2, \"C\": {\"D\": 3}}\',\n\'$.C\') |\n+-------------------------------------------------------+\n| {\"A\": 1, \"B\": 2} |\n+-------------------------------------------------------+\n \nSELECT JSON_REMOVE(\'[\"A\", \"B\", [\"C\", \"D\"],\n\"E\"]\', \'$[1]\');\n+----------------------------------------------------+\n| JSON_REMOVE(\'[\"A\", \"B\", [\"C\", \"D\"], \"E\"]\',\n\'$[1]\') |\n+----------------------------------------------------+\n| [\"A\", [\"C\", \"D\"], \"E\"] |\n+----------------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/json_remove/','','https://mariadb.com/kb/en/json_remove/'),(716,'JSON_REPLACE',41,'JSON functions were added in MariaDB 10.2.3.\n \nSyntax\n------ \nJSON_REPLACE(json_doc, path, val[, path, val] ...)\n \nDescription\n----------- \nReplaces existing values in a JSON document, returning the\nresult, or NULL if any of the arguments are NULL. \n \nAn error will occur if the JSON document is invalid, the\npath is invalid or if the path contains a * or ** wildcard.\n \nPaths and values are evaluated from left to right, with the\nresult from the earlier evaluation being used as the value\nfor the next.\n \nJSON_REPLACE can only update data, while JSON_INSERT can\nonly insert. JSON_SET can update or insert data. \n \nExamples\n-------- \nSELECT JSON_REPLACE(\'{ \"A\": 1, \"B\": [2, 3]}\',\n\'$.B[1]\', 4);\n+-----------------------------------------------------+\n| JSON_REPLACE(\'{ \"A\": 1, \"B\": [2, 3]}\', \'$.B[1]\',\n4) |\n+-----------------------------------------------------+\n| { \"A\": 1, \"B\": [2, 4]} |\n+-----------------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/json_replace/','','https://mariadb.com/kb/en/json_replace/'),(717,'JSON_SEARCH',41,'JSON functions were added in MariaDB 10.2.3.\n \nSyntax\n------ \nJSON_SEARCH(json_doc, return_arg, search_str[, escape_char[,\npath] ...])\n \nDescription\n----------- \nReturns the path to the given string within a JSON document,\nor NULL if any of json_doc, search_str or a path argument is\nNULL; if the search string is not found, or if no path\nexists within the document. \n \nA warning will occur if the JSON document is not valid, any\nof the path arguments are not valid, if return_arg is\nneither one nor all, or if the escape character is not a\nconstant. NULL will be returned.\n \nreturn_arg can be one of two values:\n\'one: Terminates after finding the first match, so will\nreturn one path string. If there is more than one match, it\nis undefined which is considered first.\nall: Returns all matching path strings, without duplicates.\nMultiple strings are autowrapped as an array. The order is\nundefined.\n \nExamples\n-------- \nSET @json = \'[\"A\", [{\"B\": \"1\"}], {\"C\":\"AB\"},\n{\"D\":\"BC\"}]\';\n \nSELECT JSON_SEARCH(@json, \'one\', \'AB\');\n+---------------------------------+\n| JSON_SEARCH(@json, \'one\', \'AB\') |\n+---------------------------------+\n| \"$[2].C\" |\n+---------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/json_search/','','https://mariadb.com/kb/en/json_search/'),(719,'JSON_TYPE',41,'JSON functions were added in MariaDB 10.2.3.\n \nSyntax\n------ \nJSON_TYPE(json_val)\n \nDescription\n----------- \nReturns the type of a JSON value, or NULL if the argument is\nnull.\n \nAn error will occur if the argument is an invalid JSON\nvalue.\n \nThe following is a complete list of the possible return\ntypes:\n \nReturn type | Value | \n \nARRAY | JSON array | \n \nBIT | MariaDB BIT scalar | \n \nBLOB | MariaDB binary types (BINARY, VARBINARY or BLOB) | \n \nBOOLEAN | JSON true/false literals | \n \nDATE | MariaDB DATE scalar | \n \nDATETIME | MariaDB DATETIME or TIMESTAMP scalar | \n \nDECIMAL | MariaDB DECIMAL or NUMERIC scalar | \n \nDOUBLE | MariaDB DOUBLE FLOAT scalar | \n \nINTEGER | MariaDB integer types (TINYINT, SMALLINT,\nMEDIUMINT, INT or BIGINT) | \n \nNULL | JSON null literal or NULL argument | \n \nOBJECT | JSON object | \n \nOPAQUE | Any valid JSON value that is not one of the other\ntypes. | \n \nSTRING | MariaDB character types (CHAR, VARCHAR, TEXT, ENUM\nor SET) | \n \nTIME | MariaDB TIME scalar | \n \nExamples\n-------- \nSELECT JSON_TYPE(\'{\"A\": 1, \"B\": 2, \"C\": 3}\');\n+---------------------------------------+\n| JSON_TYPE(\'{\"A\": 1, \"B\": 2, \"C\": 3}\') |\n+---------------------------------------+\n| OBJECT |\n+---------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/json_type/','','https://mariadb.com/kb/en/json_type/'),(720,'JSON_UNQUOTE',41,'JSON functions were added in MariaDB 10.2.3.\n \nSyntax\n------ \nJSON_UNQUOTE(val)\n \nDescription\n----------- \nUnquotes a JSON value, returning a string, or NULL if the\nargument is null. \n \nAn error will occur if the given value begins and ends with\ndouble quotes and is an invalid JSON string literal.\n \nCertain character sequences have special meanings within a\nstring. Usually, a backspace is ignored, but the escape\nsequences in the table below are recognised by MariaDB,\nunless the SQL Mode is set to NO_BACKSLASH_ESCAPES SQL.\n \nEscape sequence | Character | \n \n\\\" | Double quote (\") | \n \n\\b | Backspace | \n \n\\f | Formfeed | \n \n\\n | Newline (linefeed) | \n \n\\r | Carriage return | \n \n\\t | Tab | \n \n\\\\ | Backslash (\\) | \n \n\\uXXXX | UTF-8 bytes for Unicode value XXXX | \n \nExamples\n-------- \nSELECT JSON_UNQUOTE(\'\"Monty\"\');\n+-------------------------+\n| JSON_UNQUOTE(\'\"Monty\"\') |\n+-------------------------+\n| Monty |\n+-------------------------+\n \nWith the default SQL Mode:\n \nSELECT JSON_UNQUOTE(\'Si\\bng\\ting\');\n+-----------------------------+\n| JSON_UNQUOTE(\'Si\\bng\\ting\') |\n+-----------------------------+\n| Sng ing |\n+-----------------------------+\n \nSetting NO_BACKSLASH_ESCAPES:\n \nSET @@sql_mode = \'NO_BACKSLASH_ESCAPES\';\n \nSELECT JSON_UNQUOTE(\'Si\\bng\\ting\');\n+-----------------------------+\n| JSON_UNQUOTE(\'Si\\bng\\ting\') |\n+-----------------------------+\n| Si\\bng\\ting |\n+-----------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/json_unquote/','','https://mariadb.com/kb/en/json_unquote/'),(721,'JSON_VALID',41,'JSON functions were added in MariaDB 10.2.3.\n \nSyntax\n------ \nJSON_VALID(value)\n \nDescription\n----------- \nIndicates whether the given value is a valid JSON document\nor not. Returns 1 if valid, 0 if not, and NULL if the\nargument is NULL.\n \nFrom MariaDB 10.4.3, the JSON_VALID function is\nautomatically used as a CHECK constraint for the JSON data\ntype alias in order to ensure that a valid json document is\ninserted. \n \nExamples\n-------- \nSELECT JSON_VALID(\'{\"id\": 1, \"name\": \"Monty\"}\');\n+------------------------------------------+\n| JSON_VALID(\'{\"id\": 1, \"name\": \"Monty\"}\') |\n+------------------------------------------+\n| 1 |\n+------------------------------------------+\n \nSELECT JSON_VALID(\'{\"id\": 1, \"name\": \"Monty\",\n\"oddfield\"}\');\n+------------------------------------------------------+\n| JSON_VALID(\'{\"id\": 1, \"name\": \"Monty\",\n\"oddfield\"}\') |\n+------------------------------------------------------+\n| 0 |\n+------------------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/json_valid/','','https://mariadb.com/kb/en/json_valid/'),(722,'JSON_VALUE',41,'JSON functions were added in MariaDB 10.2.3.\n \nSyntax\n------ \nJSON_VALUE(json_doc, path)\n \nDescription\n----------- \nGiven a JSON document, returns the scalar specified by the\npath. Returns NULL if not given a valid JSON document, or if\nthere is no match.\n \nExamples\n-------- \nselect json_value(\'{\"key1\":123}\', \'$.key1\');\n+--------------------------------------+\n| json_value(\'{\"key1\":123}\', \'$.key1\') |\n+--------------------------------------+\n| 123 |\n+--------------------------------------+\n \nselect json_value(\'{\"key1\": [1,2,3], \"key1\":123}\',\n\'$.key1\');\n+-------------------------------------------------------+\n| json_value(\'{\"key1\": [1,2,3], \"key1\":123}\',\n\'$.key1\') |\n+-------------------------------------------------------+\n| 123 |\n+-------------------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/json_value/','','https://mariadb.com/kb/en/json_value/'),(727,'DENSE_RANK',42,'The DENSE_RANK() function was first introduced with window\nfunctions in MariaDB 10.2.0.\n \nSyntax\n------ \nDENSE_RANK() OVER (\n [ PARTITION BY partition_expression ]\n [ ORDER BY order_list ]\n) \n \nDescription\n----------- \nDENSE_RANK() is a window function that displays the number\nof a given row, starting at one and following the ORDER BY\nsequence of the window function, with identical values\nreceiving the same result. Unlike the RANK() function, there\nare no skipped values if the preceding results are\nidentical. It is also similar to the ROW_NUMBER() function\nexcept that in that function, identical values will receive\na different row number for each result.\n \nExamples\n-------- \nThe distinction between DENSE_RANK(), RANK() and\nROW_NUMBER():\n \nCREATE TABLE student(course VARCHAR(10), mark int, name\nvarchar(10));\n \nINSERT INTO student VALUES \n (\'Maths\', 60, \'Thulile\'),\n (\'Maths\', 60, \'Pritha\'),\n (\'Maths\', 70, \'Voitto\'),\n (\'Maths\', 55, \'Chun\'),\n (\'Biology\', 60, \'Bilal\'),\n (\'Biology\', 70, \'Roger\');\n \nSELECT \n RANK() OVER (PARTITION BY course ORDER BY mark DESC) AS\nrank, \n DENSE_RANK() OVER (PARTITION BY course ORDER BY mark DESC)\nAS dense_rank, \n ROW_NUMBER() OVER (PARTITION BY course ORDER BY mark DESC)\nAS row_num, \n course, mark, name \nFROM student ORDER BY course, mark DESC;\n \n+------+------------+---------+---------+------+---------+\n| rank | dense_rank | row_num | course | mark | name |\n+------+------------+---------+---------+------+---------+\n| 1 | 1 | 1 | Biology | 70 | Roger |\n| 2 | 2 | 2 | Biology | 60 | Bilal |\n| 1 | 1 | 1 | Maths | 70 | Voitto |\n| 2 | 2 | 2 | Maths | 60 | Thulile |\n| 2 | 2 | 3 | Maths | 60 | Pritha |\n| 4 | 3 | 4 | Maths | 55 | Chun |\n+------+------------+---------+---------+------+---------+\n \n\n\nURL: https://mariadb.com/kb/en/dense_rank/','','https://mariadb.com/kb/en/dense_rank/'),(723,'Window Functions Overview',42,'Window functions were introduced in MariaDB 10.2.\n \nIntroduction\n \nWindow functions allow calculations to be performed across a\nset of rows related to the current row.\n \nSyntax\n------ \nfunction (expression) OVER (\n [ PARTITION BY expression_list ]\n [ ORDER BY order_list [ frame_clause ] ] ) \n \nfunction:\n A valid window function\n \nexpression_list:\n expression | column_name [, expr_list ]\n \norder_list:\n expression | column_name [ ASC | DESC ] \n [, ... ]\n \nframe_clause:\n {ROWS | RANGE} {frame_border | BETWEEN frame_border AND\nframe_border}\n \nframe_border:\n | UNBOUNDED PRECEDING\n | UNBOUNDED FOLLOWING\n | CURRENT ROW\n | expr PRECEDING\n | expr FOLLOWING\n \nDescription\n----------- \nIn some ways, window functions are similar to aggregate\nfunctions in that they perform calculations across a set of\nrows. However, unlike aggregate functions, the output is not\ngrouped into a single row. \n \nNon-aggregate window functions include \nCUME_DIST\nDENSE_RANK\nFIRST_VALUE\nLAG\nLAST_VALUE\nLEAD\nMEDIAN\nNTH_VALUE\nNTILE\nPERCENT_RANK\nPERCENTILE_CONT\nPERCENTILE_DISC\nRANK, ROW_NUMBER\n \nAggregate functions that can also be used as window\nfunctions include \nAVG\nBIT_AND\nBIT_OR\nBIT_XOR\nCOUNT\nMAX\nMIN\nSTD\nSTDDEV\nSTDDEV_POP\nSTDDEV_SAMP\nSUM\nVAR_POP\nVAR_SAMP\nVARIANCE\n \nWindow function queries are characterised by the OVER\nkeyword, following which the set of rows used for the\ncalculation is specified. By default, the set of rows used\nfor the calculation (the \"window) is the entire dataset,\nwhich can be ordered with the ORDER BY clause. The PARTITION\nBY clause is used to reduce the window to a particular group\nwithin the dataset.\n \nFor example, given the following data:\n \nCREATE TABLE student (name CHAR(10), test CHAR(10), score\nTINYINT); \n \nINSERT INTO student VALUES \n (\'Chun\', \'SQL\', 75), (\'Chun\', \'Tuning\', 73), \n (\'Esben\', \'SQL\', 43), (\'Esben\', \'Tuning\', 31), \n (\'Kaolin\', \'SQL\', 56), (\'Kaolin\', \'Tuning\', 88), \n (\'Tatiana\', \'SQL\', 87), (\'Tatiana\', \'Tuning\', 83);\n \nthe following two queries return the average partitioned by\ntest and by name respectively:\n \nSELECT name, test, score, AVG(score) OVER (PARTITION BY\ntest) \n AS average_by_test FROM student;\n \n+---------+--------+-------+-----------------+\n| name | test | score | average_by_test |\n+---------+--------+-------+-----------------+\n| Chun | SQL | 75 | 65.2500 |\n| Chun | Tuning | 73 | 68.7500 |\n| Esben | SQL | 43 | 65.2500 |\n| Esben | Tuning | 31 | 68.7500 |\n| Kaolin | SQL | 56 | 65.2500 |\n| Kaolin | Tuning | 88 | 68.7500 |\n| Tatiana | SQL | 87 | 65.2500 |\n| Tatiana | Tuning | 83 | 68.7500 |\n+---------+--------+-------+-----------------+\n \nSELECT name, test, score, AVG(score) OVER (PARTITION BY\nname) \n AS average_by_name FROM student;\n \n+---------+--------+-------+-----------------+\n| name | test | score | average_by_name |\n+---------+--------+-------+-----------------+\n| Chun | SQL | 75 | 74.0000 |\n| Chun | Tuning | 73 | 74.0000 |\n| Esben | SQL | 43 | 37.0000 |\n| Esben | Tuning | 31 | 37.0000 |\n| Kaolin | SQL | 56 | 72.0000 |\n| Kaolin | Tuning | 88 | 72.0000 |\n| Tatiana | SQL | 87 | 85.0000 |\n| Tatiana | Tuning | 83 | 85.0000 |\n+---------+--------+-------+-----------------+\n \nIt is also possible to specify which rows to include for the\nwindow function (for example, the current row and all\npreceding rows). See Window Frames for more details.\n \nScope\n \nWindow functions were introduced in SQL:2003, and their\ndefinition was expanded in subsequent versions of the\nstandard. The last expansion was in the latest version of\nthe standard, SQL:2011. \n \nMost database products support a subset of the standard,\nthey implement some functions defined as late as in\nSQL:2011, and at the same time leave some parts of SQL:2008\nunimplemented.\n \nMariaDB:\nSupports ROWS and RANGE-type frames\nAll kinds of frame bounds are supported, including RANGE\nPRECEDING|FOLLOWING n frame bounds (unlike PostgreSQL or MS\nSQL Server)\nDoes not yet support DATE[TIME] datatype and arithmetic for\nRANGE-type frames (MDEV-9727)\n \nDoes not support GROUPS-type frames (it seems that no\npopular database supports it, either)\n \nDoes not support frame exclusion (no other database seems to\nsupport it, either) (MDEV-9724)\nDoes not support explicit NULLS FIRST or NULLS LAST.\nDoes not support nested navigation in window functions (this\nis VALUE_OF(expr AT row_marker [, default_value) syntax)\n \nThe following window functions are supported:\n\"Streamable\" window functions: ROW_NUMBER, RANK,\nDENSE_RANK, \nWindow functions that can be streamed once the number of\nrows in partition is known: PERCENT_RANK, CUME_DIST, NTILE\n \nAggregate functions that are currently supported as window\nfunctions are: COUNT, SUM, AVG, BIT_OR, BIT_AND, BIT_XOR.\nAggregate functions with the DISTINCT specifier (e.g. COUNT(\nDISTINCT x)) are not supported as window functions.\n \nLinks\n \nMDEV-6115 is the main jira task for window functions\ndevelopment. Other tasks are are attached as sub-tasks\nbb-10.2-mdev9543 is the feature tree for window functions.\nDevelopment is ongoing, and this tree has the newest\nchanges.\nTestcases are in mysql-test/t/win*.test\n \nExamples\n-------- \nGiven the following sample data:\n \nCREATE TABLE users (\n email VARCHAR(30), \n first_name VARCHAR(30), \n last_name VARCHAR(30), \n account_type VARCHAR(30)\n);\n \nINSERT INTO users VALUES \n (\'admin@boss.org\', \'Admin\', \'Boss\', \'admin\'), \n (\'bob.carlsen@foo.bar\', \'Bob\', \'Carlsen\',\n\'regular\'),\n (\'eddie.stevens@data.org\', \'Eddie\', \'Stevens\',\n\'regular\'),\n (\'john.smith@xyz.org\', \'John\', \'Smith\', \'regular\'),\n\n (\'root@boss.org\', \'Root\', \'Chief\', \'admin\')\n \nFirst, let\'s order the records by email alphabetically,\ngiving each an ascending rnum value starting with 1. This\nwill make use of the ROW_NUMBER window function:\n \nSELECT row_number() OVER (ORDER BY email) AS rnum,\n email, first_name, last_name, account_type\nFROM users ORDER BY email;\n \n+------+------------------------+------------+-----------+--------------+\n| rnum | email | first_name | last_name | account_type |\n+------+------------------------+------------+-----------+--------------+\n| 1 | admin@boss.org | Admin | Boss | admin |\n| 2 | bob.carlsen@foo.bar | Bob | Carlsen | regular |\n| 3 | eddie.stevens@data.org | Eddie | Stevens | regular |\n| 4 | john.smith@xyz.org | John | Smith | regular |\n| 5 | root@boss.org | Root | Chief | admin |\n+------+------------------------+------------+-----------+--------------\n \nWe can generate separate sequences based on account type,\nusing the PARTITION BY clause:\n \nSELECT row_number() OVER (PARTITION BY account_type ORDER BY\nemail) AS rnum, \n email, first_name, last_name, account_type \nFROM users ORDER BY account_type,email;\n \n+------+------------------------+------------+-----------+--------------+\n| rnum | email | first_name | last_name | account_type |\n+------+------------------------+------------+-----------+--------------+\n| 1 | admin@boss.org | Admin | Boss | admin |\n| 2 | root@boss.org | Root | Chief | admin |\n| 1 | bob.carlsen@foo.bar | Bob | Carlsen | regular |\n| 2 | eddie.stevens@data.org | Eddie | Stevens | regular |\n| 3 | john.smith@xyz.org | John | Smith | regular |\n+------+------------------------+------------+-----------+--------------+\n \nGiven the following structure and data, we want to find the\ntop 5 salaries from each department. \n \nCREATE TABLE employee_salaries (dept VARCHAR(20), name\nVARCHAR(20), salary INT(11));\n \nINSERT INTO employee_salaries VALUES\n(\'Engineering\', \'Dharma\', 3500),\n(\'Engineering\', \'Bình\', 3000),\n(\'Engineering\', \'Adalynn\', 2800),\n(\'Engineering\', \'Samuel\', 2500),\n(\'Engineering\', \'Cveta\', 2200),\n(\'Engineering\', \'Ebele\', 1800),\n(\'Sales\', \'Carbry\', 500),\n(\'Sales\', \'Clytemnestra\', 400),\n(\'Sales\', \'Juraj\', 300),\n(\'Sales\', \'Kalpana\', 300),\n(\'Sales\', \'Svantepolk\', 250),\n(\'Sales\', \'Angelo\', 200);\n \nWe could do this without using window functions, as follows:\n \nselect dept, name, salary\nfrom employee_salaries as t1\nwhere (select count(t2.salary)\n from employee_salaries as t2\n where t1.name != t2.name and\n t1.dept = t2.dept and\n t2.salary > t1.salary) \n\nURL:\nhttps://mariadb.com/kb/en/library/window-functions-overview/','','https://mariadb.com/kb/en/library/window-functions-overview/'),(725,'Window Frames',42,'Window functions were first introduced in MariaDB 10.2.0.\n \nSyntax\n------ \nframe_clause:\n {ROWS | RANGE} {frame_border | BETWEEN frame_border AND\nframe_border}\n \nframe_border:\n | UNBOUNDED PRECEDING\n | UNBOUNDED FOLLOWING\n | CURRENT ROW\n | expr PRECEDING\n | expr FOLLOWING\n \nDescription\n----------- \nA basic overview of window functions is described in Window\nFunctions Overview. Window frames expand this functionality\nby allowing the function to include a specified a number of\nrows around the current row.\n \nThese include:\nAll rows before the current row (UNBOUNDED PRECEDING), for\nexample RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW\nAll rows after the current row (UNBOUNDED FOLLOWING), for\nexample RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING\nA set number of rows before the current row (expr PRECEDING)\nfor example RANGE BETWEEN 6 PRECEDING AND CURRENT ROW\nA set number of rows after the current row (expr PRECEDING\nAND expr FOLLOWING) for example RANGE BETWEEN CURRENT ROW\nAND 2 FOLLOWING\nA specified number of rows both before and after the current\nrow, for example RANGE BETWEEN 6 PRECEDING AND 3 FOLLOWING \n \nThe following functions operate on window frames:\nAVG\nBIT_AND\nBIT_OR\nBIT_XOR\nCOUNT\nLEAD\nMAX\nMIN\nNTILE\nSTD\nSTDDEV\nSTDDEV_POP\nSTDDEV_SAMP\nSUM\nVAR_POP\nVAR_SAMP\nVARIANCE\n \nWindow frames are determined by the frame_clause in the\nwindow function request. \n \nTake the following example:\n \nCREATE TABLE `student_test` (\n name char(10),\n test char(10),\n score tinyint(4)\n);\n \nINSERT INTO student_test VALUES \n (\'Chun\', \'SQL\', 75), (\'Chun\', \'Tuning\', 73), \n (\'Esben\', \'SQL\', 43), (\'Esben\', \'Tuning\', 31), \n (\'Kaolin\', \'SQL\', 56), (\'Kaolin\', \'Tuning\', 88), \n (\'Tatiana\', \'SQL\', 87);\n \nSELECT name, test, score, SUM(score) \n OVER () AS total_score \n FROM student_test;\n \n+---------+--------+-------+-------------+\n| name | test | score | total_score |\n+---------+--------+-------+-------------+\n| Chun | SQL | 75 | 453 |\n| Chun | Tuning | 73 | 453 |\n| Esben | SQL | 43 | 453 |\n| Esben | Tuning | 31 | 453 |\n| Kaolin | SQL | 56 | 453 |\n| Kaolin | Tuning | 88 | 453 |\n| Tatiana | SQL | 87 | 453 |\n+---------+--------+-------+-------------+\n \nBy not specifying an OVER condition, the SUM function is run\nover the entire dataset. However, if we specify an ORDER BY\ncondition based on score (and order the entire result in the\nsame way for clarity), the following result is returned:\n \nSELECT name, test, score, SUM(score) \n OVER (ORDER BY score) AS total_score \n FROM student_test ORDER BY score;\n \n+---------+--------+-------+-------------+\n| name | test | score | total_score |\n+---------+--------+-------+-------------+\n| Esben | Tuning | 31 | 31 |\n| Esben | SQL | 43 | 74 |\n| Kaolin | SQL | 56 | 130 |\n| Chun | Tuning | 73 | 203 |\n| Chun | SQL | 75 | 278 |\n| Tatiana | SQL | 87 | 365 |\n| Kaolin | Tuning | 88 | 453 |\n+---------+--------+-------+-------------+\n \nThe total_score column represents a running total of the\ncurrent row, and all previous rows. The window frame in this\nexample expands as the function proceeds.\n \nThe above query makes use of the default to define the\nwindow frame. It could be written explicitly as follows:\n \nSELECT name, test, score, SUM(score) \n OVER (ORDER BY score RANGE BETWEEN UNBOUNDED PRECEDING AND\nCURRENT ROW) AS total_score \n FROM student_test ORDER BY score;\n \n+---------+--------+-------+-------------+\n| name | test | score | total_score |\n+---------+--------+-------+-------------+\n| Esben | Tuning | 31 | 31 |\n| Esben | SQL | 43 | 74 |\n| Kaolin | SQL | 56 | 130 |\n| Chun | Tuning | 73 | 203 |\n| Chun | SQL | 75 | 278 |\n| Tatiana | SQL | 87 | 365 |\n| Kaolin | Tuning | 88 | 453 |\n+---------+--------+-------+-------------+\n \nLet\'s look at some alternatives:\n \nFirstly, applying the window function to the current row and\nall following rows can be done with the use of UNBOUNDED\nFOLLOWING:\n \nSELECT name, test, score, SUM(score) \n OVER (ORDER BY score RANGE BETWEEN CURRENT ROW AND\nUNBOUNDED FOLLOWING) AS total_score \n FROM student_test ORDER BY score;\n \n+---------+--------+-------+-------------+\n| name | test | score | total_score |\n+---------+--------+-------+-------------+\n| Esben | Tuning | 31 | 453 |\n| Esben | SQL | 43 | 422 |\n| Kaolin | SQL | 56 | 379 |\n| Chun | Tuning | 73 | 323 |\n| Chun | SQL | 75 | 250 |\n| Tatiana | SQL | 87 | 175 |\n| Kaolin | Tuning | 88 | 88 |\n+---------+--------+-------+-------------+\n \nIt\'s possible to specify a number of rows, rather than the\nentire unbounded following or preceding set. The following\nexample takes the current row, as well as the previous row:\n \nSELECT name, test, score, SUM(score) \n OVER (ORDER BY score ROWS BETWEEN 1 PRECEDING AND CURRENT\nROW) AS total_score \n FROM student_test ORDER BY score;\n \n+---------+--------+-------+-------------+\n| name | test | score | total_score |\n+---------+--------+-------+-------------+\n| Esben | Tuning | 31 | 31 |\n| Esben | SQL | 43 | 74 |\n| Kaolin | SQL | 56 | 99 |\n| Chun | Tuning | 73 | 129 |\n| Chun | SQL | 75 | 148 |\n| Tatiana | SQL | 87 | 162 |\n| Kaolin | Tuning | 88 | 175 |\n+---------+--------+-------+-------------+\n \nThe current row and the following row:\n \nSELECT name, test, score, SUM(score) \n OVER (ORDER BY score ROWS BETWEEN 1 PRECEDING AND 1\nFOLLOWING) AS total_score \n FROM student_test ORDER BY score;\n \n+---------+--------+-------+-------------+\n| name | test | score | total_score |\n+---------+--------+-------+-------------+\n| Esben | Tuning | 31 | 74 |\n| Esben | SQL | 43 | 130 |\n| Kaolin | SQL | 56 | 172 |\n| Chun | Tuning | 73 | 204 |\n| Chun | SQL | 75 | 235 |\n| Tatiana | SQL | 87 | 250 |\n| Kaolin | Tuning | 88 | 175 |\n+---------+--------+-------+-------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/library/window-frames/','','https://mariadb.com/kb/en/library/window-frames/'),(728,'FIRST_VALUE',42,'The FIRST_VALUE() function was first introduced with other\nwindow functions in MariaDB 10.2.\n \nSyntax\n------ \nFIRST_VALUE(expr) OVER (\n [ PARTITION BY partition_expression ]\n [ ORDER BY order_list ]\n) \n \nDescription\n----------- \nFIRST_VALUE returns the first result from an ordered set, or\nNULL if no such result exists.\n \nExamples\n-------- \nCREATE TABLE t1 (\n pk int primary key,\n a int,\n b int,\n c char(10),\n d decimal(10, 3),\n e real\n);\n \nINSERT INTO t1 VALUES\n( 1, 0, 1, \'one\', 0.1, 0.001),\n( 2, 0, 2, \'two\', 0.2, 0.002),\n( 3, 0, 3, \'three\', 0.3, 0.003),\n( 4, 1, 2, \'three\', 0.4, 0.004),\n( 5, 1, 1, \'two\', 0.5, 0.005),\n( 6, 1, 1, \'one\', 0.6, 0.006),\n( 7, 2, NULL, \'n_one\', 0.5, 0.007),\n( 8, 2, 1, \'n_two\', NULL, 0.008),\n( 9, 2, 2, NULL, 0.7, 0.009),\n(10, 2, 0, \'n_four\', 0.8, 0.010),\n(11, 2, 10, NULL, 0.9, NULL);\n \nSELECT pk, FIRST_VALUE(pk) OVER (ORDER BY pk) AS first_asc,\n LAST_VALUE(pk) OVER (ORDER BY pk) AS last_asc,\n FIRST_VALUE(pk) OVER (ORDER BY pk DESC) AS first_desc,\n LAST_VALUE(pk) OVER (ORDER BY pk DESC) AS last_desc\nFROM t1\nORDER BY pk DESC;\n \n+----+-----------+----------+------------+-----------+\n| pk | first_asc | last_asc | first_desc | last_desc |\n+----+-----------+----------+------------+-----------+\n| 11 | 1 | 11 | 11 | 11 |\n| 10 | 1 | 10 | 11 | 10 |\n| 9 | 1 | 9 | 11 | 9 |\n| 8 | 1 | 8 | 11 | 8 |\n| 7 | 1 | 7 | 11 | 7 |\n| 6 | 1 | 6 | 11 | 6 |\n| 5 | 1 | 5 | 11 | 5 |\n| 4 | 1 | 4 | 11 | 4 |\n| 3 | 1 | 3 | 11 | 3 |\n| 2 | 1 | 2 | 11 | 2 |\n| 1 | 1 | 1 | 11 | 1 |\n+----+-----------+----------+------------+-----------+\n \nCREATE OR REPLACE TABLE t1 (i int);\nINSERT INTO t1 VALUES\n(1),(2),(3),(4),(5),(6),(7),(8),(9),(10);\n \nSELECT i,\n FIRST_VALUE(i) OVER (ORDER BY i ROWS BETWEEN CURRENT ROW\nand 1 FOLLOWING) AS f_1f,\n LAST_VALUE(i) OVER (ORDER BY i ROWS BETWEEN CURRENT ROW and\n1 FOLLOWING) AS l_1f,\n FIRST_VALUE(i) OVER (ORDER BY i ROWS BETWEEN 1 PRECEDING\nAND 1 FOLLOWING) AS f_1p1f,\n LAST_VALUE(i) OVER (ORDER BY i ROWS BETWEEN 1 PRECEDING AND\n1 FOLLOWING) AS f_1p1f,\n FIRST_VALUE(i) OVER (ORDER BY i ROWS BETWEEN 2 PRECEDING\nAND 1 PRECEDING) AS f_2p1p,\n LAST_VALUE(i) OVER (ORDER BY i ROWS BETWEEN 2 PRECEDING AND\n1 PRECEDING) AS f_2p1p,\n FIRST_VALUE(i) OVER (ORDER BY i ROWS BETWEEN 1 FOLLOWING\nAND 2 FOLLOWING) AS f_1f2f,\n LAST_VALUE(i) OVER (ORDER BY i ROWS BETWEEN 1 FOLLOWING AND\n2 FOLLOWING) AS f_1f2f\nFROM t1;\n \n+------+------+------+--------+--------+--------+--------+--------+--------+\n| i | f_1f | l_1f | f_1p1f | f_1p1f | f_2p1p | f_2p1p |\nf_1f2f | f_1f2f |\n+------+------+------+--------+--------+--------+--------+--------+--------+\n| 1 | 1 | 2 | 1 | 2 | NULL | NULL | 2 | 3 |\n| 2 | 2 | 3 | 1 | 3 | 1 | 1 | 3 | 4 |\n| 3 | 3 | 4 | 2 | 4 | 1 | 2 | 4 | 5 |\n| 4 | 4 | 5 | 3 | 5 | 2 | 3 | 5 | 6 |\n| 5 | 5 | 6 | 4 | 6 | 3 | 4 | 6 | 7 |\n| 6 | 6 | 7 | 5 | 7 | 4 | 5 | 7 | 8 |\n| 7 | 7 | 8 | 6 | 8 | 5 | 6 | 8 | 9 |\n| 8 | 8 | 9 | 7 | 9 | 6 | 7 | 9 | 10 |\n| 9 | 9 | 10 | 8 | 10 | 7 | 8 | 10 | 10 |\n| 10 | 10 | 10 | 9 | 10 | 8 | 9 | NULL | NULL |\n+------+------+------+--------+--------+--------+--------+--------+--------+\n \n\n\nURL: https://mariadb.com/kb/en/first_value/','','https://mariadb.com/kb/en/first_value/'),(729,'LAG',42,'The LAG() function was first introduced with other window\nfunctions in MariaDB 10.2.\n \nSyntax\n------ \nLAG (expr[, offset]) OVER ( \n [ PARTITION BY partition_expression ] \n < ORDER BY order_list >\n)\n \nDescription\n----------- \nThe LAG function accesses data from a previous row according\nto the ORDER BY clause without the need for a self-join. The\nspecific row is determined by the offset (default 1), which\nspecifies the number of rows behind the current row to use.\nAn offset of 0 is the current row.\n \nExamples\n-------- \nCREATE TABLE t1 (pk int primary key, a int, b int, c\nchar(10), d decimal(10, 3), e real);\n \nINSERT INTO t1 VALUES\n ( 1, 0, 1, \'one\', 0.1, 0.001),\n ( 2, 0, 2, \'two\', 0.2, 0.002),\n ( 3, 0, 3, \'three\', 0.3, 0.003),\n ( 4, 1, 2, \'three\', 0.4, 0.004),\n ( 5, 1, 1, \'two\', 0.5, 0.005),\n ( 6, 1, 1, \'one\', 0.6, 0.006),\n ( 7, 2, NULL, \'n_one\', 0.5, 0.007),\n ( 8, 2, 1, \'n_two\', NULL, 0.008),\n ( 9, 2, 2, NULL, 0.7, 0.009),\n (10, 2, 0, \'n_four\', 0.8, 0.010),\n (11, 2, 10, NULL, 0.9, NULL);\n \nSELECT pk, LAG(pk) OVER (ORDER BY pk) AS l,\n LAG(pk,1) OVER (ORDER BY pk) AS l1,\n LAG(pk,2) OVER (ORDER BY pk) AS l2,\n LAG(pk,0) OVER (ORDER BY pk) AS l0,\n LAG(pk,-1) OVER (ORDER BY pk) AS lm1,\n LAG(pk,-2) OVER (ORDER BY pk) AS lm2 \nFROM t1;\n \n+----+------+------+------+------+------+------+\n| pk | l | l1 | l2 | l0 | lm1 | lm2 |\n+----+------+------+------+------+------+------+\n| 1 | NULL | NULL | NULL | 1 | 2 | 3 |\n| 2 | 1 | 1 | NULL | 2 | 3 | 4 |\n| 3 | 2 | 2 | 1 | 3 | 4 | 5 |\n| 4 | 3 | 3 | 2 | 4 | 5 | 6 |\n| 5 | 4 | 4 | 3 | 5 | 6 | 7 |\n| 6 | 5 | 5 | 4 | 6 | 7 | 8 |\n| 7 | 6 | 6 | 5 | 7 | 8 | 9 |\n| 8 | 7 | 7 | 6 | 8 | 9 | 10 |\n| 9 | 8 | 8 | 7 | 9 | 10 | 11 |\n| 10 | 9 | 9 | 8 | 10 | 11 | NULL |\n| 11 | 10 | 10 | 9 | 11 | NULL | NULL |\n+----+------+------+------+------+------+------+\n \n\n\nURL: https://mariadb.com/kb/en/lag/','','https://mariadb.com/kb/en/lag/'),(730,'LEAD',42,'The LEAD() function was first introduced with other window\nfunctions in MariaDB 10.2.\n \nSyntax\n------ \nLEAD (expr[, offset]) OVER ( \n [ PARTITION BY partition_expression ] \n [ ORDER BY order_list ]\n)\n \nDescription\n----------- \nThe LEAD function accesses data from a following row in the\nsame result set without the need for a self-join. The\nspecific row is determined by the offset (default 1), which\nspecifies the number of rows ahead the current row to use.\nAn offset of 0 is the current row.\n \nExample\n \nCREATE TABLE t1 (pk int primary key, a int, b int, c\nchar(10), d decimal(10, 3), e real);\n \nINSERT INTO t1 VALUES\n ( 1, 0, 1, \'one\', 0.1, 0.001),\n ( 2, 0, 2, \'two\', 0.2, 0.002),\n ( 3, 0, 3, \'three\', 0.3, 0.003),\n ( 4, 1, 2, \'three\', 0.4, 0.004),\n ( 5, 1, 1, \'two\', 0.5, 0.005),\n ( 6, 1, 1, \'one\', 0.6, 0.006),\n ( 7, 2, NULL, \'n_one\', 0.5, 0.007),\n ( 8, 2, 1, \'n_two\', NULL, 0.008),\n ( 9, 2, 2, NULL, 0.7, 0.009),\n (10, 2, 0, \'n_four\', 0.8, 0.010),\n (11, 2, 10, NULL, 0.9, NULL);\n \nSELECT pk, LEAD(pk) OVER (ORDER BY pk) AS l,\n LEAD(pk,1) OVER (ORDER BY pk) AS l1,\n LEAD(pk,2) OVER (ORDER BY pk) AS l2,\n LEAD(pk,0) OVER (ORDER BY pk) AS l0,\n LEAD(pk,-1) OVER (ORDER BY pk) AS lm1,\n LEAD(pk,-2) OVER (ORDER BY pk) AS lm2 \nFROM t1;\n \n+----+------+------+------+------+------+------+\n| pk | l | l1 | l2 | l0 | lm1 | lm2 |\n+----+------+------+------+------+------+------+\n| 1 | 2 | 2 | 3 | 1 | NULL | NULL |\n| 2 | 3 | 3 | 4 | 2 | 1 | NULL |\n| 3 | 4 | 4 | 5 | 3 | 2 | 1 |\n| 4 | 5 | 5 | 6 | 4 | 3 | 2 |\n| 5 | 6 | 6 | 7 | 5 | 4 | 3 |\n| 6 | 7 | 7 | 8 | 6 | 5 | 4 |\n| 7 | 8 | 8 | 9 | 7 | 6 | 5 |\n| 8 | 9 | 9 | 10 | 8 | 7 | 6 |\n| 9 | 10 | 10 | 11 | 9 | 8 | 7 |\n| 10 | 11 | 11 | NULL | 10 | 9 | 8 |\n| 11 | NULL | NULL | NULL | 11 | 10 | 9 |\n+----+------+------+------+------+------+------+\n \n\n\nURL: https://mariadb.com/kb/en/lead/','','https://mariadb.com/kb/en/lead/'),(731,'Median Window Function',42,'The MEDIAN() window function was first introduced with in\nMariaDB 10.3.3.\n \nSyntax\n------ \nMEDIAN(median expression) OVER (\n [ PARTITION BY partition_expression ] \n)\n \nDescription\n----------- \nMEDIAN() is a window function that returns the median value\nof a range of values.\n \nIt is a specific case of PERCENTILE_CONT, with an argument\nof 0.5 and the ORDER BY column the one in MEDIAN\'s\nargument. \n \nMEDIAN() OVER ( [ PARTITION BY partition_expression] )\n \nIs equivalent to:\n \nPERCENTILE_CONT(0.5) WITHIN \n GROUP (ORDER BY ) OVER ( [ PARTITION BY\npartition_expression ])\n \nExamples\n-------- \nCREATE TABLE book_rating (name CHAR(30), star_rating\nTINYINT);\n \nINSERT INTO book_rating VALUES (\'Lord of the Ladybirds\',\n5);\nINSERT INTO book_rating VALUES (\'Lord of the Ladybirds\',\n3);\nINSERT INTO book_rating VALUES (\'Lady of the Flies\', 1);\nINSERT INTO book_rating VALUES (\'Lady of the Flies\', 2);\nINSERT INTO book_rating VALUES (\'Lady of the Flies\', 5);\n \nSELECT name, median(star_rating) OVER (PARTITION BY name)\nFROM book_rating;\n \n+-----------------------+----------------------------------------------+\n| name | median(star_rating) OVER (PARTITION BY name) |\n+-----------------------+----------------------------------------------+\n| Lord of the Ladybirds | 4.0000000000 |\n| Lord of the Ladybirds | 4.0000000000 |\n| Lady of the Flies | 2.0000000000 |\n| Lady of the Flies | 2.0000000000 |\n| Lady of the Flies | 2.0000000000 |\n+-----------------------+----------------------------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/median/','','https://mariadb.com/kb/en/median/'),(733,'NTILE',42,'The NTILE() function was first introduced with window\nfunctions in MariaDB 10.2.0.\n \nSyntax\n------ \nNTILE (expr) OVER ( \n [ PARTITION BY partition_expression ] \n [ ORDER BY order_list ]\n)\n \nDescription\n----------- \nNTILE() is a window function that returns an integer\nindicating which group a given row falls into. The number of\ngroups is specified in the argument (expr), starting at one.\nOrdered rows in the partition are divided into the specified\nnumber of groups with as equal a size as possible. \n \nExamples\n-------- \ncreate table t1 (\n pk int primary key,\n a int,\n b int\n );\n \ninsert into t1 values\n (11 , 0, 10),\n (12 , 0, 10),\n (13 , 1, 10),\n (14 , 1, 10),\n (18 , 2, 10),\n (15 , 2, 20),\n (16 , 2, 20),\n (17 , 2, 20),\n (19 , 4, 20),\n (20 , 4, 20);\n \nselect pk, a, b,\n ntile(1) over (order by pk)\n from t1;\n \n+----+------+------+-----------------------------+\n| pk | a | b | ntile(1) over (order by pk) |\n+----+------+------+-----------------------------+\n| 11 | 0 | 10 | 1 |\n| 12 | 0 | 10 | 1 |\n| 13 | 1 | 10 | 1 |\n| 14 | 1 | 10 | 1 |\n| 15 | 2 | 20 | 1 |\n| 16 | 2 | 20 | 1 |\n| 17 | 2 | 20 | 1 |\n| 18 | 2 | 10 | 1 |\n| 19 | 4 | 20 | 1 |\n| 20 | 4 | 20 | 1 |\n+----+------+------+-----------------------------+\n \nselect pk, a, b,\n ntile(4) over (order by pk)\n from t1;\n \n+----+------+------+-----------------------------+\n| pk | a | b | ntile(4) over (order by pk) |\n+----+------+------+-----------------------------+\n| 11 | 0 | 10 | 1 |\n| 12 | 0 | 10 | 1 |\n| 13 | 1 | 10 | 1 |\n| 14 | 1 | 10 | 2 |\n| 15 | 2 | 20 | 2 |\n| 16 | 2 | 20 | 2 |\n| 17 | 2 | 20 | 3 |\n| 18 | 2 | 10 | 3 |\n| 19 | 4 | 20 | 4 |\n| 20 | 4 | 20 | 4 |\n+----+------+------+-----------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/ntile/','','https://mariadb.com/kb/en/ntile/'),(734,'PERCENT_RANK',42,'The PERCENT_RANK() function was first introduced with window\nfunctions in MariaDB 10.2.0.\n \nSyntax\n------ \nPERCENT_RANK() OVER (\n [ PARTITION BY partition_expression ] \n [ ORDER BY order_list ]\n)\n \nDescription\n----------- \nPERCENT_RANK() is a window function that returns the\nrelative percent rank of a given row. The following formula\nis used to calculate the percent rank:\n \n(rank - 1) / (number of rows in the window or partition - 1)\n \nExamples\n-------- \ncreate table t1 (\n pk int primary key,\n a int,\n b int\n);\n \ninsert into t1 values\n( 1 , 0, 10),\n( 2 , 0, 10),\n( 3 , 1, 10),\n( 4 , 1, 10),\n( 8 , 2, 10),\n( 5 , 2, 20),\n( 6 , 2, 20),\n( 7 , 2, 20),\n( 9 , 4, 20),\n(10 , 4, 20);\n \nselect pk, a, b,\n rank() over (order by a) as rank,\n percent_rank() over (order by a) as pct_rank,\n cume_dist() over (order by a) as cume_dist\nfrom t1;\n \n+----+------+------+------+--------------+--------------+\n| pk | a | b | rank | pct_rank | cume_dist |\n+----+------+------+------+--------------+--------------+\n| 1 | 0 | 10 | 1 | 0.0000000000 | 0.2000000000 |\n| 2 | 0 | 10 | 1 | 0.0000000000 | 0.2000000000 |\n| 3 | 1 | 10 | 3 | 0.2222222222 | 0.4000000000 |\n| 4 | 1 | 10 | 3 | 0.2222222222 | 0.4000000000 |\n| 5 | 2 | 20 | 5 | 0.4444444444 | 0.8000000000 |\n| 6 | 2 | 20 | 5 | 0.4444444444 | 0.8000000000 |\n| 7 | 2 | 20 | 5 | 0.4444444444 | 0.8000000000 |\n| 8 | 2 | 10 | 5 | 0.4444444444 | 0.8000000000 |\n| 9 | 4 | 20 | 9 | 0.8888888889 | 1.0000000000 |\n| 10 | 4 | 20 | 9 | 0.8888888889 | 1.0000000000 |\n+----+------+------+------+--------------+--------------+\n \nselect pk, a, b,\n percent_rank() over (order by pk) as pct_rank,\n cume_dist() over (order by pk) as cume_dist\nfrom t1 order by pk;\n \n+----+------+------+--------------+--------------+\n| pk | a | b | pct_rank | cume_dist |\n+----+------+------+--------------+--------------+\n| 1 | 0 | 10 | 0.0000000000 | 0.1000000000 |\n| 2 | 0 | 10 | 0.1111111111 | 0.2000000000 |\n| 3 | 1 | 10 | 0.2222222222 | 0.3000000000 |\n| 4 | 1 | 10 | 0.3333333333 | 0.4000000000 |\n| 5 | 2 | 20 | 0.4444444444 | 0.5000000000 |\n| 6 | 2 | 20 | 0.5555555556 | 0.6000000000 |\n| 7 | 2 | 20 | 0.6666666667 | 0.7000000000 |\n| 8 | 2 | 10 | 0.7777777778 | 0.8000000000 |\n| 9 | 4 | 20 | 0.8888888889 | 0.9000000000 |\n| 10 | 4 | 20 | 1.0000000000 | 1.0000000000 |\n+----+------+------+--------------+--------------+\n \nselect pk, a, b,\n percent_rank() over (partition by a order by a) as\npct_rank,\n cume_dist() over (partition by a order by a) as cume_dist\nfrom t1;\n \n+----+------+------+--------------+--------------+\n| pk | a | b | pct_rank | cume_dist |\n+----+------+------+--------------+--------------+\n| 1 | 0 | 10 | 0.0000000000 | 1.0000000000 |\n| 2 | 0 | 10 | 0.0000000000 | 1.0000000000 |\n| 3 | 1 | 10 | 0.0000000000 | 1.0000000000 |\n| 4 | 1 | 10 | 0.0000000000 | 1.0000000000 |\n| 5 | 2 | 20 | 0.0000000000 | 1.0000000000 |\n| 6 | 2 | 20 | 0.0000000000 | 1.0000000000 |\n| 7 | 2 | 20 | 0.0000000000 | 1.0000000000 |\n| 8 | 2 | 10 | 0.0000000000 | 1.0000000000 |\n| 9 | 4 | 20 | 0.0000000000 | 1.0000000000 |\n| 10 | 4 | 20 | 0.0000000000 | 1.0000000000 |\n+----+------+------+--------------+--------------+\n \n\n\nURL: https://mariadb.com/kb/en/percent_rank/','','https://mariadb.com/kb/en/percent_rank/'),(736,'PERCENTILE_DISC',42,'The PERCENTILE_DISC() window function was first introduced\nwith in MariaDB 10.3.3.\n \nSyntax\n------ \n\nDescription\n----------- \nPERCENTILE_DISC() (standing for discrete percentile) is a\nwindow function which returns the first value in the set\nwhose ordered position is the same or more than the\nspecified fraction.\n \nEssentially, the following process is followed to find the\nvalue to return:\nGet the number of rows in the partition.\nWalk through the partition, in order, until finding the the\nfirst row with CUME_DIST() > function_argument.\n \nExamples\n-------- \nCREATE TABLE book_rating (name CHAR(30), star_rating\nTINYINT);\n \nINSERT INTO book_rating VALUES (\'Lord of the Ladybirds\',\n5);\nINSERT INTO book_rating VALUES (\'Lord of the Ladybirds\',\n3);\nINSERT INTO book_rating VALUES (\'Lady of the Flies\', 1);\nINSERT INTO book_rating VALUES (\'Lady of the Flies\', 2);\nINSERT INTO book_rating VALUES (\'Lady of the Flies\', 5);\n \nSELECT name, PERCENTILE_DISC(0.5) WITHIN GROUP (ORDER BY\nstar_rating)\n OVER (PARTITION BY name) AS pc FROM book_rating;\n \n+-----------------------+------+\n| name | pc |\n+-----------------------+------+\n| Lord of the Ladybirds | 3 |\n| Lord of the Ladybirds | 3 |\n| Lady of the Flies | 2 |\n| Lady of the Flies | 2 |\n| Lady of the Flies | 2 |\n+-----------------------+------+\n5 rows in set (0.000 sec)\n \nSELECT name, PERCENTILE_DISC(0) WITHIN GROUP (ORDER BY\nstar_rating) \n OVER (PARTITION BY name) AS pc FROM book_rating;\n \n+-----------------------+------+\n| name | pc |\n+-----------------------+------+\n| Lord of the Ladybirds | 3 |\n| Lord of the Ladybirds | 3 |\n| Lady of the Flies | 1 |\n| Lady of the Flies | 1 |\n| Lady of the Flies | 1 |\n+-----------------------+------+\n5 rows in set (0.000 sec)\n \nSELECT name, PERCENTILE_DISC(1) WITHIN GROUP (ORDER BY\nstar_rating) \n OVER (PARTITION BY name) AS pc FROM book_rating;\n \n+-----------------------+------+\n| name | pc |\n+-----------------------+------+\n| Lord of the Ladybirds | 5 |\n| Lord of the Ladybirds | 5 |\n| Lady of the Flies | 5 |\n| Lady of the Flies | 5 |\n| Lady of the Flies | 5 |\n+-----------------------+------+\n5 rows in set (0.000 sec)\n \nSELECT name, PERCENTILE_DISC(0.6) WITHIN GROUP (ORDER BY\nstar_rating) \n OVER (PARTITION BY name) AS pc FROM book_rating;\n \n+-----------------------+------+\n| name | pc |\n+-----------------------+------+\n| Lord of the Ladybirds | 5 |\n| Lord of the Ladybirds | 5 |\n| Lady of the Flies | 2 |\n| Lady of the Flies | 2 |\n| Lady of the Flies | 2 |\n+-----------------------+------\n \n\n\nURL: https://mariadb.com/kb/en/percentile_disc/','','https://mariadb.com/kb/en/percentile_disc/'),(735,'PERCENTILE_CONT',42,'The PERCENTILE_CONT() window function was first introduced\nwith in MariaDB 10.3.3.\n \nSyntax\n------ \nDescription\n----------- \nPERCENTILE_CONT() (standing for continuous percentile) is a\nwindow function which returns a value which corresponds to\nthe given fraction in the sort order. If required, it will\ninterpolate between adjacent input items.\n \nEssentially, the following process is followed to find the\nvalue to return:\nGet the number of rows in the partition, denoted by N\nRN = p*(N-1), where p denotes the argument to the\nPERCENTILE_CONT function\ncalculate the FRN(floor row number) and CRN(column row\nnumber for the group( FRN= floor(RN) and CRN = ceil(RN))\nlook up rows FRN and CRN\nIf (CRN = FRN = RN) then the result is (value of expression\nfrom row at RN)\nOtherwise the result is\n(CRN - RN) * (value of expression for row at FRN) +\n(RN - FRN) * (value of expression for row at CRN)\n \nThe MEDIAN function is a specific case of PERCENTILE_CONT,\nequivalent to PERCENTILE_CONT(0.5).\n \nExamples\n-------- \nCREATE TABLE book_rating (name CHAR(30), star_rating\nTINYINT);\n \nINSERT INTO book_rating VALUES (\'Lord of the Ladybirds\',\n5);\nINSERT INTO book_rating VALUES (\'Lord of the Ladybirds\',\n3);\nINSERT INTO book_rating VALUES (\'Lady of the Flies\', 1);\nINSERT INTO book_rating VALUES (\'Lady of the Flies\', 2);\nINSERT INTO book_rating VALUES (\'Lady of the Flies\', 5);\n \nSELECT name, PERCENTILE_CONT(0.5) WITHIN GROUP (ORDER BY\nstar_rating) \n OVER (PARTITION BY name) AS pc \n FROM book_rating;\n \n+-----------------------+--------------+\n| name | pc |\n+-----------------------+--------------+\n| Lord of the Ladybirds | 4.0000000000 |\n| Lord of the Ladybirds | 4.0000000000 |\n| Lady of the Flies | 2.0000000000 |\n| Lady of the Flies | 2.0000000000 |\n| Lady of the Flies | 2.0000000000 |\n+-----------------------+--------------+\n \nSELECT name, PERCENTILE_CONT(1) WITHIN GROUP (ORDER BY\nstar_rating) \n OVER (PARTITION BY name) AS pc \n FROM book_rating;\n \n+-----------------------+--------------+\n| name | pc |\n+-----------------------+--------------+\n| Lord of the Ladybirds | 5.0000000000 |\n| Lord of the Ladybirds | 5.0000000000 |\n| Lady of the Flies | 5.0000000000 |\n| Lady of the Flies | 5.0000000000 |\n| Lady of the Flies | 5.0000000000 |\n+-----------------------+--------------+\n \nSELECT name, PERCENTILE_CONT(0) WITHIN GROUP (ORDER BY\nstar_rating) \n OVER (PARTITION BY name) AS pc \n FROM book_rating;\n \n+-----------------------+--------------+\n| name | pc |\n+-----------------------+--------------+\n| Lord of the Ladybirds | 3.0000000000 |\n| Lord of the Ladybirds | 3.0000000000 |\n| Lady of the Flies | 1.0000000000 |\n| Lady of the Flies | 1.0000000000 |\n| Lady of the Flies | 1.0000000000 |\n+-----------------------+--------------+\n \nSELECT name, PERCENTILE_CONT(0.6) WITHIN GROUP (ORDER BY\nstar_rating) \n OVER (PARTITION BY name) AS pc \n FROM book_rating;\n \n+-----------------------+--------------+\n| name | pc |\n+-----------------------+--------------+\n| Lord of the Ladybirds | 4.2000000000 |\n| Lord of the Ladybirds | 4.2000000000 |\n| Lady of the Flies | 2.6000000000 |\n| Lady of the Flies | 2.6000000000 |\n| Lady of the Flies | 2.6000000000 |\n+-----------------------+--------------+\n \n\n\nURL: https://mariadb.com/kb/en/percentile_cont/','','https://mariadb.com/kb/en/percentile_cont/'),(737,'RANK',42,'The RANK() function was first introduced with window\nfunctions in MariaDB 10.2.0.\n \nSyntax\n------ \nRANK() OVER (\n [ PARTITION BY partition_expression ]\n [ ORDER BY order_list ]\n) \n \nDescription\n----------- \nRANK() is a window function that displays the number of a\ngiven row, starting at one and following the ORDER BY\nsequence of the window function, with identical values\nreceiving the same result. It is similar to the ROW_NUMBER()\nfunction except that in that function, identical values will\nreceive a different row number for each result.\n \nExamples\n-------- \nThe distinction between DENSE_RANK(), RANK() and\nROW_NUMBER():\n \nCREATE TABLE student(course VARCHAR(10), mark int, name\nvarchar(10));\n \nINSERT INTO student VALUES \n (\'Maths\', 60, \'Thulile\'),\n (\'Maths\', 60, \'Pritha\'),\n (\'Maths\', 70, \'Voitto\'),\n (\'Maths\', 55, \'Chun\'),\n (\'Biology\', 60, \'Bilal\'),\n (\'Biology\', 70, \'Roger\');\n \nSELECT \n RANK() OVER (PARTITION BY course ORDER BY mark DESC) AS\nrank, \n DENSE_RANK() OVER (PARTITION BY course ORDER BY mark DESC)\nAS dense_rank, \n ROW_NUMBER() OVER (PARTITION BY course ORDER BY mark DESC)\nAS row_num, \n course, mark, name \nFROM student ORDER BY course, mark DESC;\n \n+------+------------+---------+---------+------+---------+\n| rank | dense_rank | row_num | course | mark | name |\n+------+------------+---------+---------+------+---------+\n| 1 | 1 | 1 | Biology | 70 | Roger |\n| 2 | 2 | 2 | Biology | 60 | Bilal |\n| 1 | 1 | 1 | Maths | 70 | Voitto |\n| 2 | 2 | 2 | Maths | 60 | Thulile |\n| 2 | 2 | 3 | Maths | 60 | Pritha |\n| 4 | 3 | 4 | Maths | 55 | Chun |\n+------+------------+---------+---------+------+---------+\n \n\n\nURL: https://mariadb.com/kb/en/rank/','','https://mariadb.com/kb/en/rank/'),(738,'ROW_NUMBER',42,'ROW_NUMBER() was first introduced with window functions in\nMariaDB 10.2.0.\n \nSyntax\n------ \nROW_NUMBER() OVER (\n [ PARTITION BY partition_expression ]\n [ ORDER BY order_list ]\n) \n \nDescription\n----------- \nROW_NUMBER() is a window function that displays the number\nof a given row, starting at one and following the ORDER BY\nsequence of the window function, with identical values\nreceiving different row numbers. It is similar to the RANK()\nand DENSE_RANK() functions except that in that function,\nidentical values will receive the same rank for each result.\n \nExamples\n-------- \nThe distinction between DENSE_RANK(), RANK() and\nROW_NUMBER():\n \nCREATE TABLE student(course VARCHAR(10), mark int, name\nvarchar(10));\n \nINSERT INTO student VALUES \n (\'Maths\', 60, \'Thulile\'),\n (\'Maths\', 60, \'Pritha\'),\n (\'Maths\', 70, \'Voitto\'),\n (\'Maths\', 55, \'Chun\'),\n (\'Biology\', 60, \'Bilal\'),\n (\'Biology\', 70, \'Roger\');\n \nSELECT \n RANK() OVER (PARTITION BY course ORDER BY mark DESC) AS\nrank, \n DENSE_RANK() OVER (PARTITION BY course ORDER BY mark DESC)\nAS dense_rank, \n ROW_NUMBER() OVER (PARTITION BY course ORDER BY mark DESC)\nAS row_num, \n course, mark, name \nFROM student ORDER BY course, mark DESC;\n \n+------+------------+---------+---------+------+---------+\n| rank | dense_rank | row_num | course | mark | name |\n+------+------------+---------+---------+------+---------+\n| 1 | 1 | 1 | Biology | 70 | Roger |\n| 2 | 2 | 2 | Biology | 60 | Bilal |\n| 1 | 1 | 1 | Maths | 70 | Voitto |\n| 2 | 2 | 2 | Maths | 60 | Thulile |\n| 2 | 2 | 3 | Maths | 60 | Pritha |\n| 4 | 3 | 4 | Maths | 55 | Chun |\n+------+------------+---------+---------+------+---------+\n \n\n\nURL: https://mariadb.com/kb/en/row_number/','','https://mariadb.com/kb/en/row_number/'),(739,'SPIDER_BG_DIRECT_SQL',43,'Syntax\n------ \nSPIDER_BG_DIRECT_SQL(\'sql\', \'tmp_table_list\',\n\'parameters\')\n \nDescription\n----------- \nExecutes the given SQL statement in the background on the\nremote server, as defined in the parameters listing. If the\nquery returns a result-set, it sttores the results in the\ngiven temporary table. When the given SQL statement executes\nsuccessfully, this function returns the number of called\nUDF\'s. It returns 0 when the given SQL statement fails.\n \nThis function is a UDF installed with the Spider storage\nengine.\n \nExamples\n-------- \nSELECT SPIDER_BG_DIRECT_SQL(\'SELECT * FROM example_table\',\n\'\', \n \'srv \"node1\", port \"8607\"\') AS \"Direct Query\";\n+--------------+\n| Direct Query | \n+--------------+\n| 1 |\n+--------------+\n \nParameters\n \nerror_rw_mode\n \nDescription: Returns empty results on network error.\n0 : Return error on getting network error.\n1: Return 0 records on getting network error.\n \nDefault Table Value: 0\nDSN Parameter Name: erwm\n \n\n\nURL: https://mariadb.com/kb/en/spider_bg_direct_sql/','','https://mariadb.com/kb/en/spider_bg_direct_sql/'),(740,'SPIDER_COPY_TABLES',43,'Syntax\n------ \nSPIDER_COPY_TABLES(spider_table_name, \n source_link_id, destination_link_id_list [,parameters])\n \nDescription\n----------- \nA UDF installed with the Spider Storage Engine, this\nfunction copies table data from source_link_id to\ndestination_link_id_list. The service does not need to be\nstopped in order to copy.\n \nIf the Spider table is partitioned, the name must be of the\nformat table_name#P#partition_name. The partition name can\nbe viewed in the mysql.spider_tables table, for example:\n \nSELECT table_name FROM mysql.spider_tables;\n+-------------+\n| table_name |\n+-------------+\n| spt_a#P#pt1 |\n| spt_a#P#pt2 |\n| spt_a#P#pt3 |\n+-------------+\n \nReturns 1 if the data was copied successfully, or 0 if\ncopying the data failed.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/spider_copy_tables/','','https://mariadb.com/kb/en/spider_copy_tables/'),(741,'SPIDER_DIRECT_SQL',43,'Syntax\n------ \nSPIDER_DIRECT_SQL(\'sql\', \'tmp_table_list\',\n\'parameters\')\n \nDescription\n----------- \nA UDF installed with the Spider Storage Engine, this\nfunction is used to execute the SQL string sql on the remote\nserver, as defined in parameters. If any resultsets are\nreturned, they are stored in the tmp_table_list.\n \nThe function returns 1 if the SQL executes successfully, or\n0 if it fails.\n \nExamples\n-------- \nSELECT SPIDER_DIRECT_SQL(\'SELECT * FROM s\', \'\', \'srv\n\"node1\", port \"8607\"\');\n+----------------------------------------------------------------------+\n| SPIDER_DIRECT_SQL(\'SELECT * FROM s\', \'\', \'srv\n\"node1\", port \"8607\"\') |\n+----------------------------------------------------------------------+\n| 1 |\n+----------------------------------------------------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/spider_direct_sql/','','https://mariadb.com/kb/en/spider_direct_sql/'),(743,'COLUMN_ADD',44,'The Dynamic columns feature was introduced in MariaDB 5.3.\n \nSyntax\n------ \nCOLUMN_ADD(dyncol_blob, column_nr, value [as type],\n[column_nr, value [as type]]...);\nCOLUMN_ADD(dyncol_blob, column_name, value [as type],\n[column_name, value [as type]]...);\n \nDescription\n----------- \nAdds or updates dynamic columns.\ndyncol_blob must be either a valid dynamic columns blob (for\nexample, COLUMN_CREATE returns such blob), or an empty\nstring.\ncolumn_name specifies the name of the column to be added. If\ndyncol_blob already has a column with this name, it will be\noverwritten.\nvalue specifies the new value for the column. Passing a NULL\nvalue will cause the column to be deleted.\nas type is optional. See #datatypes section for a discussion\nabout types.\n \nThe return value is a dynamic column blob after the\nmodifications.\n \nExamples\n-------- \n-- MariaDB 5.3+:\nUPDATE tbl SET dyncol_blob=COLUMN_ADD(dyncol_blob, 1\n/*column id*/, \"value\") WHERE id=1;\n \n-- MariaDB 10.0.1+:\nUPDATE t1 SET dyncol_blob=COLUMN_ADD(dyncol_blob,\n\"column_name\", \"value\") WHERE id=1;\n \nNote: COLUMN_ADD() is a regular function (just like\nCONCAT()), hence, in order to update the value in the table\nyou have to use the UPDATE ... SET\ndynamic_col=COLUMN_ADD(dynamic_col,\n....) pattern.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/column_add/','','https://mariadb.com/kb/en/column_add/'),(745,'COLUMN_CREATE',44,'The Dynamic columns feature was introduced in MariaDB 5.3.\n \nSyntax\n------ \nCOLUMN_CREATE(column_nr, value [as type], [column_nr, value\n[as type]]...);\nCOLUMN_CREATE(column_name, value [as type], [column_name,\nvalue [as type]]...);\n \nDescription\n----------- \nReturns a dynamic columns blob that stores the specified\ncolumns with values.\n \nThe return value is suitable for \nstoring in a table\nfurther modification with other dynamic columns functions\n \nThe as type part allows one to specify the value type. In\nmost cases,\nthis is redundant because MariaDB will be able to deduce the\ntype of the\nvalue. Explicit type specification may be needed when the\ntype of the value is\nnot apparent. For example, a literal \'2012-12-01\' has a\nCHAR type by\ndefault, one will need to specify \'2012-12-01\' AS DATE to\nhave it stored as\na date. See Dynamic Columns:Datatypes for further details.\n \nExamples\n-------- \n-- MariaDB 5.3+:\nINSERT INTO tbl SET dyncol_blob=COLUMN_CREATE(1 /*column\nid*/, \"value\");\n-- MariaDB 10.0.1+:\nINSERT INTO tbl SET\ndyncol_blob=COLUMN_CREATE(\"column_name\", \"value\");\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/column_create/','','https://mariadb.com/kb/en/column_create/'),(748,'COLUMN_GET',44,'The Dynamic columns feature was introduced in MariaDB 5.3.\n \nSyntax\n------ \nCOLUMN_GET(dyncol_blob, column_nr as type);\nCOLUMN_GET(dyncol_blob, column_name as type);\n \nDescription\n----------- \nGets the value of a dynamic column by its name. If no column\nwith the given name exists, NULL will be returned.\n \ncolumn_name as type requires that one specify the datatype\nof the dynamic column they are reading. \n \nThis may seem counter-intuitive: why would one need to\nspecify which datatype they\'re retrieving? Can\'t the\ndynamic columns system figure the datatype from the data\nbeing stored?\n \nThe answer is: SQL is a statically-typed language. The SQL\ninterpreter needs to know the datatypes of all expressions\nbefore the query is run (for example, when one is using\nprepared statements and runs \"select COLUMN_GET(...)\", the\nprepared statement API requires the server to inform the\nclient about the datatype of the column being read before\nthe query is executed and the server can see what datatype\nthe column actually has).\n \nA note about lengths\n \nIf you\'re running queries like:\n \nSELECT COLUMN_GET(blob, \'colname\' as CHAR) ...\n \nwithout specifying a maximum length (i.e. using #as CHAR#,\nnot as CHAR(n)), MariaDB will report the maximum length of\nthe resultset column to be 53,6870,911 for MariaDB\n5.3-10.0.0 and 16,777,216 for MariaDB 10.0.1+. This may\ncause excessive memory usage in some client libraries,\nbecause they try to pre-allocate a buffer of maximum\nresultset width. To avoid this problem, use CHAR(n) whenever\nyou\'re using COLUMN_GET in the select list.\n \nSee Dynamic Columns:Datatypes for more information about\ndatatypes.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/column_get/','','https://mariadb.com/kb/en/column_get/'),(749,'COLUMN_JSON',44,'COLUMN_JSON was introduced in MariaDB 10.0.1\n \nSyntax\n------ \nCOLUMN_JSON(dyncol_blob)\n \nDescription\n----------- \nReturns a JSON representation of data in dyncol_blob. Can\nalso be used to display nested columns. See dynamic columns\nfor more information.\n \nExample\n \nselect item_name, COLUMN_JSON(dynamic_cols) from assets;\n+-----------------+----------------------------------------+\n| item_name | COLUMN_JSON(dynamic_cols) |\n+-----------------+----------------------------------------+\n| MariaDB T-shirt | {\"size\":\"XL\",\"color\":\"blue\"} |\n| Thinkpad Laptop | {\"color\":\"black\",\"warranty\":\"3\nyears\"} |\n+-----------------+----------------------------------------+\n \nLimitation: COLUMN_JSON will decode nested dynamic columns\nat a nesting level of not more than 10 levels deep. Dynamic\ncolumns that are nested deeper than 10 levels will be shown\nas BINARY string, without encoding.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/column_json/','','https://mariadb.com/kb/en/column_json/'),(751,'Instant ADD COLUMN for InnoDB',46,'Instant ALTER TABLE ... ADD COLUMN for InnoDB was introduced\nin MariaDB 10.3.2. The INSTANT option for the ALGORITHM\nclause was introduced in MariaDB 10.3.7.\n \nNormally, adding a column to a table requires the full table\nto be rebuilt. The complexity of the operation is\nproportional to the size of the table, or O(n·m) where n is\nthe number of rows in the table and m is the number of\nindexes. \n \nIn MariaDB 10.0 and later, the ALTER TABLE statement\nsupports online DDL for storage engines that have\nimplemented the relevant online DDL algorithms and locking\nstrategies.\n \nThe InnoDB storage engine has implemented online DDL for\nmany operations. These online DDL optimizations allow\nconcurrent DML to the table in many cases, even if the table\nneeds to be rebuilt.\n \nSee InnoDB Online DDL Overview for more information about\nonline DDL with InnoDB.\n \nAllowing concurrent DML during the operation does not solve\nall problems. When a column was added to a table with the\nolder in-place optimization, the resulting table rebuild\ncould still significantly increase the I/O and memory\nconsumption and cause replication lag.\n \nIn contrast, with the new instant ALTER TABLE ... ADD\nCOLUMN, all that is needed is an O(log n) operation to\ninsert a special hidden record into the table, and an update\nof the data dictionary. For a large table, instead of taking\nseveral hours, the operation would be completed in the blink\nof an eye. The ALTER TABLE ... ADD COLUMN operation is only\nslightly more expensive than a regular INSERT, due to\nlocking constraints.\n \nIn the past, some developers may have implemented a kind of\n\"instant add column\" in the application by encoding\nmultiple columns in a single TEXT or BLOB column. MariaDB\nDynamic Columns was an early example of that. A more recent\nexample is JSON and related string manipulation functions.\n \nAdding real columns has the following advantages over\nencoding columns into a single \"expandable\" column:\nEfficient storage in a native binary format\nData type safety\nIndexes can be built natively\nConstraints are available: UNIQUE, CHECK, FOREIGN KEY\nDEFAULT values can be specified\nTriggers can be written more easily\n \nWith instant ALTER TABLE ... ADD COLUMN, you can enjoy all\nthe benefits of structured storage without the drawback of\nhaving to rebuild the table.\n \nInstant ALTER TABLE ... ADD COLUMN is available for both old\nand new InnoDB tables. Basically you can just upgrade from\nMySQL 5.x or MariaDB and start adding columns instantly.\n \nColumns instantly added to a table exist in a separate data\nstructure from the main table definition, similar to how\nInnoDB separates BLOB columns. If the table ever becomes\nempty, (such as from TRUNCATE or DELETE statements), InnoDB\nincorporates the instantly added columns into the main table\ndefinition. See InnoDB Online DDL Operations with\nALGORITHM=INSTANT: Non-canonical Storage Format Caused by\nSome Operations for more information.\n \nThe operation is also crash safe. If the server is killed\nwhile executing an instant ALTER TABLE ... ADD COLUMN, when\nthe table is restored InnoDB integrates the new column,\nflattening the table definition.\n \nLimitations\n \nIn MariaDB 10.3, instant ALTER TABLE ... ADD COLUMN only\napplies when the added columns appear last in the table. The\nplace specifier LAST is the default. If AFTER col is\nspecified, then col must be the last column, or the\noperation will require the table to be rebuilt. In MariaDB\n10.4, this restriction has been lifted.\n \nIf the table contains a hidden FTS_DOC_ID column due to a\nFULLTEXT INDEX, then instant ALTER TABLE ... ADD COLUMN will\nnot be possible.\n \nInnoDB data files after instant ALTER TABLE ... ADD COLUMN\ncannot be imported to older versions of MariaDB or MySQL\nwithout first being rebuilt.\n \nAfter using Instant ALTER TABLE ... ADD COLUMN, any\ntable-rebuilding operation such as ALTER TABLE … FORCE\nwill incorporate instantaneously added columns into the main\ntable body.\n \nInstant ALTER TABLE ... ADD COLUMN is not available for\nROW_FORMAT=COMPRESSED.\n \nIn MariaDB 10.3, ALTER TABLE … DROP COLUMN requires the\ntable to be rebuilt. In MariaDB 10.4, this restriction has\nbeen lifted.\n \nExample\n \nCREATE TABLE t(id INT PRIMARY KEY, u INT UNSIGNED NOT NULL\nUNIQUE)\nENGINE=InnoDB;\n \nINSERT INTO t(id,u) VALUES(1,1),(2,2),(3,3);\n \nALTER TABLE t ADD COLUMN\n(d DATETIME DEFAULT current_timestamp(),\n p POINT NOT NULL DEFAULT ST_GeomFromText(\'POINT(0 0)\'),\n t TEXT CHARSET utf8 DEFAULT \'The quick brown fox jumps\nover the lazy dog\');\n \nUPDATE t SET t=NULL WHERE id=3;\n \nSELECT id,u,d,ST_AsText(p),t FROM t;\n \nSELECT variable_value FROM information_schema.global_status\nWHERE variable_name = \'innodb_instant_alter_column\';\n \nThe above example illustrates that when the added columns\nare declared NOT NULL, a DEFAULT value must be available,\neither implied by the data type or set explicitly by the\nuser. The expression need not be constant, but it must not\nrefer to the columns of the table, such as DEFAULT u+1 (a\nMariaDB extension). The DEFAULT current_timestamp() would be\nevaluated at the time of the ALTER TABLE and apply to each\nrow, like it does for non-instant ALTER TABLE. If a\nsubsequent ALTER TABLE changes the DEFAULT value for\nsubsequent INSERT, the values of the columns in existing\nrecords will naturally be unaffected.\n \nThe design was brainstormed in April by engineers from\nMariaDB Corporation, Alibaba and Tencent. A prototype was\ndeveloped by Vin Chen (陈ç¦è£) from the Tencent Game DBA\nTeam.\n \n\n \n \n \n \n \n \n \n\nURL:\nhttps://mariadb.com/kb/en/instant-add-column-for-innodb/','','https://mariadb.com/kb/en/instant-add-column-for-innodb/'),(752,'Full-Text Index Overview',48,'MariaDB has support for full-text indexing and searching:\nA full-text index in MariaDB is an index of type FULLTEXT,\nand it allows more options when searching for portions of\ntext from a field.\nFull-text indexes can be used only with MyISAM and Aria\ntables, from MariaDB 10.0.5 with InnoDB tables and from\nMariaDB 10.0.15 with Mroonga tables, and can be created only\nfor CHAR, VARCHAR, or TEXT columns.\nPartitioned tables cannot contain fulltext indexes, even if\nthe storage engine supports them.\nA FULLTEXT index definition can be given in the CREATE TABLE\nstatement when a\n table is created, or added later using ALTER TABLE or\nCREATE INDEX.\nFor large data sets, it is much faster to load your data\ninto a table that\n has no FULLTEXT index and then create the index after that,\nthan to load data\n into a table that has an existing FULLTEXT index.\n \nFull-text searching is performed using MATCH() ... AGAINST\nsyntax.\nMATCH() takes a comma-separated list that names the columns\nto be\nsearched. AGAINST takes a string to search for, and an\noptional\nmodifier that indicates what type of search to perform. The\nsearch\nstring must be a literal string, not a variable or a column\nname.\n \nMATCH (col1,col2,...) AGAINST (expr [search_modifier])\n \nExcluded Results\n \nPartial words are excluded.\nWords less than 4 characters in length (3 or less) will not\nbe stored in the fulltext index. This value can be adjusted\nby changing the ft_min_word_length system variable (or, for\nInnoDB, innodb_ft_min_token_size).\nWords longer than 84 characters in length will also not be\nstored in the fulltext index. This values can be adjusted by\nchanging the ft_max_word_length system variable (or, for\nInnoDB, innodb_ft_max_token_size).\nStopwords are a list of common words such as \"once\" or\n\"then\" that do not reflect in the search results unless IN\nBOOLEAN MODE is used. The stopword list for MyISAM/Aria\ntables and InnoDB tables can differ. See stopwords for\ndetails and a full list, as well as for details on how to\nchange the default list.\nFor MyISAM/Aria fulltext indexes only, if a word appears in\nmore than half the rows, it is also excluded from the\nresults of a fulltext search.\nFor InnoDB indexes, only committed rows appear -\nmodifications from the current transaction do not apply.\n \nRelevance\n \nMariaDB calculates a relevance for each result, based on a\nnumber of factors, including the number of words in the\nindex, the number of unique words in a row, the total number\nof words in both the index and the result, and the weight of\nthe word. In English, \'cool\' will be weighted less than\n\'dandy\', at least at present! The relevance can be\nreturned as part of a query simply by using the MATCH\nfunction in the field list.\n \nTypes of Full-Text search\n \nIN NATURAL LANGUAGE MODE\n \nIN NATURAL LANGUAGE MODE is the default type of full-text\nsearch, and the keywords can be omitted. There are no\nspecial operators, and searches consist of one or more\ncomma-separated keywords.\n \nSearches are returned in descending order of relevance.\n \nIN BOOLEAN MODE\n \nBoolean search permits the use of a number of special\noperators:\n \nOperator | Description | \n \n+ | The word is mandatory in all rows returned. | \n \n- | The word cannot appear in any row returned. | \n \n< | The word that follows has a lower relevance than other\nwords, although rows containing it will still match | \n \n> | The word that follows has a higher relevance than other\nwords. | \n \n() | Used to group words into subexpressions. | \n \n~ | The word following contributes negatively to the\nrelevance of the row (which is different to the \'-\'\noperator, which specifically excludes the word, or the \'\n\nURL: https://mariadb.com/kb/en/full-text-index-overview/','','https://mariadb.com/kb/en/full-text-index-overview/');
+/*!40000 ALTER TABLE `help_topic` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `index_stats`
+--
+
+DROP TABLE IF EXISTS `index_stats`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `index_stats` (
+ `db_name` varchar(64) COLLATE utf8_bin NOT NULL,
+ `table_name` varchar(64) COLLATE utf8_bin NOT NULL,
+ `index_name` varchar(64) COLLATE utf8_bin NOT NULL,
+ `prefix_arity` int(11) unsigned NOT NULL,
+ `avg_frequency` decimal(12,4) DEFAULT NULL,
+ PRIMARY KEY (`db_name`,`table_name`,`index_name`,`prefix_arity`)
+) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=0 COMMENT='Statistics on Indexes';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `index_stats`
+--
+
+LOCK TABLES `index_stats` WRITE;
+/*!40000 ALTER TABLE `index_stats` DISABLE KEYS */;
+/*!40000 ALTER TABLE `index_stats` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `innodb_index_stats`
+--
+
+DROP TABLE IF EXISTS `innodb_index_stats`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `innodb_index_stats` (
+ `database_name` varchar(64) COLLATE utf8_bin NOT NULL,
+ `table_name` varchar(199) COLLATE utf8_bin NOT NULL,
+ `index_name` varchar(64) COLLATE utf8_bin NOT NULL,
+ `last_update` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
+ `stat_name` varchar(64) COLLATE utf8_bin NOT NULL,
+ `stat_value` bigint(20) unsigned NOT NULL,
+ `sample_size` bigint(20) unsigned DEFAULT NULL,
+ `stat_description` varchar(1024) COLLATE utf8_bin NOT NULL,
+ PRIMARY KEY (`database_name`,`table_name`,`index_name`,`stat_name`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin STATS_PERSISTENT=0;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `innodb_index_stats`
+--
+
+LOCK TABLES `innodb_index_stats` WRITE;
+/*!40000 ALTER TABLE `innodb_index_stats` DISABLE KEYS */;
+INSERT INTO `innodb_index_stats` VALUES ('mysql','gtid_slave_pos','PRIMARY','2020-05-31 16:18:29','n_diff_pfx01',0,1,'domain_id'),('mysql','gtid_slave_pos','PRIMARY','2020-05-31 16:18:29','n_diff_pfx02',0,1,'domain_id,sub_id'),('mysql','gtid_slave_pos','PRIMARY','2020-05-31 16:18:29','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('mysql','gtid_slave_pos','PRIMARY','2020-05-31 16:18:29','size',1,NULL,'Number of pages in the index');
+/*!40000 ALTER TABLE `innodb_index_stats` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `innodb_table_stats`
+--
+
+DROP TABLE IF EXISTS `innodb_table_stats`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `innodb_table_stats` (
+ `database_name` varchar(64) COLLATE utf8_bin NOT NULL,
+ `table_name` varchar(199) COLLATE utf8_bin NOT NULL,
+ `last_update` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
+ `n_rows` bigint(20) unsigned NOT NULL,
+ `clustered_index_size` bigint(20) unsigned NOT NULL,
+ `sum_of_other_index_sizes` bigint(20) unsigned NOT NULL,
+ PRIMARY KEY (`database_name`,`table_name`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin STATS_PERSISTENT=0;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `innodb_table_stats`
+--
+
+LOCK TABLES `innodb_table_stats` WRITE;
+/*!40000 ALTER TABLE `innodb_table_stats` DISABLE KEYS */;
+INSERT INTO `innodb_table_stats` VALUES ('mysql','gtid_slave_pos','2020-05-31 16:18:29',0,1,0);
+/*!40000 ALTER TABLE `innodb_table_stats` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `plugin`
+--
+
+DROP TABLE IF EXISTS `plugin`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `plugin` (
+ `name` varchar(64) NOT NULL DEFAULT '',
+ `dl` varchar(128) NOT NULL DEFAULT '',
+ PRIMARY KEY (`name`)
+) ENGINE=Aria DEFAULT CHARSET=utf8 PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='MySQL plugins';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `plugin`
+--
+
+LOCK TABLES `plugin` WRITE;
+/*!40000 ALTER TABLE `plugin` DISABLE KEYS */;
+/*!40000 ALTER TABLE `plugin` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `proc`
+--
+
+DROP TABLE IF EXISTS `proc`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `proc` (
+ `db` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
+ `name` char(64) NOT NULL DEFAULT '',
+ `type` enum('FUNCTION','PROCEDURE','PACKAGE','PACKAGE BODY') NOT NULL,
+ `specific_name` char(64) NOT NULL DEFAULT '',
+ `language` enum('SQL') NOT NULL DEFAULT 'SQL',
+ `sql_data_access` enum('CONTAINS_SQL','NO_SQL','READS_SQL_DATA','MODIFIES_SQL_DATA') NOT NULL DEFAULT 'CONTAINS_SQL',
+ `is_deterministic` enum('YES','NO') NOT NULL DEFAULT 'NO',
+ `security_type` enum('INVOKER','DEFINER') NOT NULL DEFAULT 'DEFINER',
+ `param_list` blob NOT NULL,
+ `returns` longblob NOT NULL,
+ `body` longblob NOT NULL,
+ `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','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,
+ `db_collation` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
+ `body_utf8` longblob DEFAULT NULL,
+ `aggregate` enum('NONE','GROUP') NOT NULL DEFAULT 'NONE',
+ PRIMARY KEY (`db`,`name`,`type`)
+) ENGINE=Aria DEFAULT CHARSET=utf8 PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Stored Procedures';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `proc`
+--
+
+LOCK TABLES `proc` WRITE;
+/*!40000 ALTER TABLE `proc` DISABLE KEYS */;
+INSERT INTO `proc` VALUES ('mysql','AddGeometryColumn','PROCEDURE','AddGeometryColumn','SQL','CONTAINS_SQL','NO','INVOKER','catalog varchar(64), t_schema varchar(64),\n t_name varchar(64), geometry_column varchar(64), t_srid int','','begin\n set @qwe= concat(\'ALTER TABLE \', t_schema, \'.\', t_name, \' ADD \', geometry_column,\' GEOMETRY REF_SYSTEM_ID=\', t_srid); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end','mariadb.sys@localhost','2020-05-31 16:18:29','2020-05-31 16:18:29','','','utf8','utf8_general_ci','latin1_swedish_ci','begin\n set @qwe= concat(\'ALTER TABLE \', t_schema, \'.\', t_name, \' ADD \', geometry_column,\' GEOMETRY REF_SYSTEM_ID=\', t_srid); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end','NONE'),('mysql','DropGeometryColumn','PROCEDURE','DropGeometryColumn','SQL','CONTAINS_SQL','NO','INVOKER','catalog varchar(64), t_schema varchar(64),\n t_name varchar(64), geometry_column varchar(64)','','begin\n set @qwe= concat(\'ALTER TABLE \', t_schema, \'.\', t_name, \' DROP \', geometry_column); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end','mariadb.sys@localhost','2020-05-31 16:18:29','2020-05-31 16:18:29','','','utf8','utf8_general_ci','latin1_swedish_ci','begin\n set @qwe= concat(\'ALTER TABLE \', t_schema, \'.\', t_name, \' DROP \', geometry_column); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end','NONE');
+/*!40000 ALTER TABLE `proc` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `procs_priv`
+--
+
+DROP TABLE IF EXISTS `procs_priv`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `procs_priv` (
+ `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Routine_name` char(64) CHARACTER SET utf8 NOT NULL DEFAULT '',
+ `Routine_type` enum('FUNCTION','PROCEDURE','PACKAGE','PACKAGE BODY') COLLATE utf8_bin NOT NULL,
+ `Grantor` char(141) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Proc_priv` set('Execute','Alter Routine','Grant') CHARACTER SET utf8 NOT NULL DEFAULT '',
+ `Timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
+ PRIMARY KEY (`Host`,`Db`,`User`,`Routine_name`,`Routine_type`),
+ KEY `Grantor` (`Grantor`)
+) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Procedure privileges';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `procs_priv`
+--
+
+LOCK TABLES `procs_priv` WRITE;
+/*!40000 ALTER TABLE `procs_priv` DISABLE KEYS */;
+/*!40000 ALTER TABLE `procs_priv` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `proxies_priv`
+--
+
+DROP TABLE IF EXISTS `proxies_priv`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `proxies_priv` (
+ `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Proxied_host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Proxied_user` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `With_grant` tinyint(1) NOT NULL DEFAULT 0,
+ `Grantor` char(141) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
+ PRIMARY KEY (`Host`,`User`,`Proxied_host`,`Proxied_user`),
+ KEY `Grantor` (`Grantor`)
+) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='User proxy privileges';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `proxies_priv`
+--
+
+LOCK TABLES `proxies_priv` WRITE;
+/*!40000 ALTER TABLE `proxies_priv` DISABLE KEYS */;
+INSERT INTO `proxies_priv` VALUES ('localhost','root','','',1,'','2020-05-31 16:18:28'),('asus','root','','',1,'','2020-05-31 16:18:29');
+/*!40000 ALTER TABLE `proxies_priv` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `roles_mapping`
+--
+
+DROP TABLE IF EXISTS `roles_mapping`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `roles_mapping` (
+ `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Role` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Admin_option` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+ UNIQUE KEY `Host` (`Host`,`User`,`Role`)
+) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Granted roles';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `roles_mapping`
+--
+
+LOCK TABLES `roles_mapping` WRITE;
+/*!40000 ALTER TABLE `roles_mapping` DISABLE KEYS */;
+/*!40000 ALTER TABLE `roles_mapping` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `servers`
+--
+
+DROP TABLE IF EXISTS `servers`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `servers` (
+ `Server_name` char(64) NOT NULL DEFAULT '',
+ `Host` varchar(2048) NOT NULL DEFAULT '',
+ `Db` char(64) NOT NULL DEFAULT '',
+ `Username` char(80) NOT NULL DEFAULT '',
+ `Password` char(64) NOT NULL DEFAULT '',
+ `Port` int(4) NOT NULL DEFAULT 0,
+ `Socket` char(64) NOT NULL DEFAULT '',
+ `Wrapper` char(64) NOT NULL DEFAULT '',
+ `Owner` varchar(512) NOT NULL DEFAULT '',
+ PRIMARY KEY (`Server_name`)
+) ENGINE=Aria DEFAULT CHARSET=utf8 PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='MySQL Foreign Servers table';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `servers`
+--
+
+LOCK TABLES `servers` WRITE;
+/*!40000 ALTER TABLE `servers` DISABLE KEYS */;
+/*!40000 ALTER TABLE `servers` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `table_stats`
+--
+
+DROP TABLE IF EXISTS `table_stats`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `table_stats` (
+ `db_name` varchar(64) COLLATE utf8_bin NOT NULL,
+ `table_name` varchar(64) COLLATE utf8_bin NOT NULL,
+ `cardinality` bigint(21) unsigned DEFAULT NULL,
+ PRIMARY KEY (`db_name`,`table_name`)
+) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=0 COMMENT='Statistics on Tables';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `table_stats`
+--
+
+LOCK TABLES `table_stats` WRITE;
+/*!40000 ALTER TABLE `table_stats` DISABLE KEYS */;
+/*!40000 ALTER TABLE `table_stats` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `tables_priv`
+--
+
+DROP TABLE IF EXISTS `tables_priv`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `tables_priv` (
+ `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Grantor` char(141) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
+ `Table_priv` set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger','Delete versioning rows') CHARACTER SET utf8 NOT NULL DEFAULT '',
+ `Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '',
+ PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`),
+ KEY `Grantor` (`Grantor`)
+) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Table privileges';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `tables_priv`
+--
+
+LOCK TABLES `tables_priv` WRITE;
+/*!40000 ALTER TABLE `tables_priv` DISABLE KEYS */;
+INSERT INTO `tables_priv` VALUES ('localhost','mysql','mariadb.sys','global_priv','root@localhost','0000-00-00 00:00:00','Select,Update,Delete','');
+/*!40000 ALTER TABLE `tables_priv` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `time_zone`
+--
+
+DROP TABLE IF EXISTS `time_zone`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `time_zone` (
+ `Time_zone_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `Use_leap_seconds` enum('Y','N') NOT NULL DEFAULT 'N',
+ PRIMARY KEY (`Time_zone_id`)
+) ENGINE=Aria DEFAULT CHARSET=utf8 PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Time zones';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `time_zone`
+--
+
+LOCK TABLES `time_zone` WRITE;
+/*!40000 ALTER TABLE `time_zone` DISABLE KEYS */;
+/*!40000 ALTER TABLE `time_zone` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `time_zone_leap_second`
+--
+
+DROP TABLE IF EXISTS `time_zone_leap_second`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `time_zone_leap_second` (
+ `Transition_time` bigint(20) NOT NULL,
+ `Correction` int(11) NOT NULL,
+ PRIMARY KEY (`Transition_time`)
+) ENGINE=Aria DEFAULT CHARSET=utf8 PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Leap seconds information for time zones';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `time_zone_leap_second`
+--
+
+LOCK TABLES `time_zone_leap_second` WRITE;
+/*!40000 ALTER TABLE `time_zone_leap_second` DISABLE KEYS */;
+/*!40000 ALTER TABLE `time_zone_leap_second` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `time_zone_name`
+--
+
+DROP TABLE IF EXISTS `time_zone_name`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `time_zone_name` (
+ `Name` char(64) NOT NULL,
+ `Time_zone_id` int(10) unsigned NOT NULL,
+ PRIMARY KEY (`Name`)
+) ENGINE=Aria DEFAULT CHARSET=utf8 PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Time zone names';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `time_zone_name`
+--
+
+LOCK TABLES `time_zone_name` WRITE;
+/*!40000 ALTER TABLE `time_zone_name` DISABLE KEYS */;
+/*!40000 ALTER TABLE `time_zone_name` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `time_zone_transition`
+--
+
+DROP TABLE IF EXISTS `time_zone_transition`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `time_zone_transition` (
+ `Time_zone_id` int(10) unsigned NOT NULL,
+ `Transition_time` bigint(20) NOT NULL,
+ `Transition_type_id` int(10) unsigned NOT NULL,
+ PRIMARY KEY (`Time_zone_id`,`Transition_time`)
+) ENGINE=Aria DEFAULT CHARSET=utf8 PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Time zone transitions';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `time_zone_transition`
+--
+
+LOCK TABLES `time_zone_transition` WRITE;
+/*!40000 ALTER TABLE `time_zone_transition` DISABLE KEYS */;
+/*!40000 ALTER TABLE `time_zone_transition` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `time_zone_transition_type`
+--
+
+DROP TABLE IF EXISTS `time_zone_transition_type`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `time_zone_transition_type` (
+ `Time_zone_id` int(10) unsigned NOT NULL,
+ `Transition_type_id` int(10) unsigned NOT NULL,
+ `Offset` int(11) NOT NULL DEFAULT 0,
+ `Is_DST` tinyint(3) unsigned NOT NULL DEFAULT 0,
+ `Abbreviation` char(8) NOT NULL DEFAULT '',
+ PRIMARY KEY (`Time_zone_id`,`Transition_type_id`)
+) ENGINE=Aria DEFAULT CHARSET=utf8 PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Time zone transition types';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `time_zone_transition_type`
+--
+
+LOCK TABLES `time_zone_transition_type` WRITE;
+/*!40000 ALTER TABLE `time_zone_transition_type` DISABLE KEYS */;
+/*!40000 ALTER TABLE `time_zone_transition_type` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Temporary table structure for view `user`
+--
+
+DROP TABLE IF EXISTS `user`;
+/*!50001 DROP VIEW IF EXISTS `user`*/;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
+/*!50001 CREATE TABLE `user` (
+ `Host` tinyint NOT NULL,
+ `User` tinyint NOT NULL,
+ `Password` tinyint NOT NULL,
+ `Select_priv` tinyint NOT NULL,
+ `Insert_priv` tinyint NOT NULL,
+ `Update_priv` tinyint NOT NULL,
+ `Delete_priv` tinyint NOT NULL,
+ `Create_priv` tinyint NOT NULL,
+ `Drop_priv` tinyint NOT NULL,
+ `Reload_priv` tinyint NOT NULL,
+ `Shutdown_priv` tinyint NOT NULL,
+ `Process_priv` tinyint NOT NULL,
+ `File_priv` tinyint NOT NULL,
+ `Grant_priv` tinyint NOT NULL,
+ `References_priv` tinyint NOT NULL,
+ `Index_priv` tinyint NOT NULL,
+ `Alter_priv` tinyint NOT NULL,
+ `Show_db_priv` tinyint NOT NULL,
+ `Super_priv` tinyint NOT NULL,
+ `Create_tmp_table_priv` tinyint NOT NULL,
+ `Lock_tables_priv` tinyint NOT NULL,
+ `Execute_priv` tinyint NOT NULL,
+ `Repl_slave_priv` tinyint NOT NULL,
+ `Repl_client_priv` tinyint NOT NULL,
+ `Create_view_priv` tinyint NOT NULL,
+ `Show_view_priv` tinyint NOT NULL,
+ `Create_routine_priv` tinyint NOT NULL,
+ `Alter_routine_priv` tinyint NOT NULL,
+ `Create_user_priv` tinyint NOT NULL,
+ `Event_priv` tinyint NOT NULL,
+ `Trigger_priv` tinyint NOT NULL,
+ `Create_tablespace_priv` tinyint NOT NULL,
+ `Delete_history_priv` tinyint NOT NULL,
+ `ssl_type` tinyint NOT NULL,
+ `ssl_cipher` tinyint NOT NULL,
+ `x509_issuer` tinyint NOT NULL,
+ `x509_subject` tinyint NOT NULL,
+ `max_questions` tinyint NOT NULL,
+ `max_updates` tinyint NOT NULL,
+ `max_connections` tinyint NOT NULL,
+ `max_user_connections` tinyint NOT NULL,
+ `plugin` tinyint NOT NULL,
+ `authentication_string` tinyint NOT NULL,
+ `password_expired` tinyint NOT NULL,
+ `is_role` tinyint NOT NULL,
+ `default_role` tinyint NOT NULL,
+ `max_statement_time` tinyint NOT NULL
+) ENGINE=MyISAM */;
+SET character_set_client = @saved_cs_client;
+
+--
+-- Table structure for table `general_log`
+--
+
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE IF NOT EXISTS `general_log` (
+ `event_time` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
+ `user_host` mediumtext NOT NULL,
+ `thread_id` bigint(21) unsigned NOT NULL,
+ `server_id` int(10) unsigned NOT NULL,
+ `command_type` varchar(64) NOT NULL,
+ `argument` mediumtext NOT NULL
+) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='General log';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `slow_log`
+--
+
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE IF NOT EXISTS `slow_log` (
+ `start_time` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
+ `user_host` mediumtext NOT NULL,
+ `query_time` time(6) NOT NULL,
+ `lock_time` time(6) NOT NULL,
+ `rows_sent` int(11) NOT NULL,
+ `rows_examined` int(11) NOT NULL,
+ `db` varchar(512) NOT NULL,
+ `last_insert_id` int(11) NOT NULL,
+ `insert_id` int(11) NOT NULL,
+ `server_id` int(10) unsigned NOT NULL,
+ `sql_text` mediumtext NOT NULL,
+ `thread_id` bigint(21) unsigned NOT NULL,
+ `rows_affected` int(11) NOT NULL
+) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `transaction_registry`
+--
+
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE IF NOT EXISTS `transaction_registry` (
+ `transaction_id` bigint(20) unsigned NOT NULL,
+ `commit_id` bigint(20) unsigned NOT NULL,
+ `begin_timestamp` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000',
+ `commit_timestamp` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000',
+ `isolation_level` enum('READ-UNCOMMITTED','READ-COMMITTED','REPEATABLE-READ','SERIALIZABLE') COLLATE utf8_bin NOT NULL,
+ PRIMARY KEY (`transaction_id`),
+ UNIQUE KEY `commit_id` (`commit_id`),
+ KEY `begin_timestamp` (`begin_timestamp`),
+ KEY `commit_timestamp` (`commit_timestamp`,`transaction_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin STATS_PERSISTENT=0;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Final view structure for view `user`
+--
+
+/*!50001 DROP TABLE IF EXISTS `user`*/;
+/*!50001 DROP VIEW IF EXISTS `user`*/;
+/*!50001 SET @saved_cs_client = @@character_set_client */;
+/*!50001 SET @saved_cs_results = @@character_set_results */;
+/*!50001 SET @saved_col_connection = @@collation_connection */;
+/*!50001 SET character_set_client = latin1 */;
+/*!50001 SET character_set_results = latin1 */;
+/*!50001 SET collation_connection = latin1_swedish_ci */;
+/*!50001 CREATE ALGORITHM=UNDEFINED */
+/*!50013 DEFINER=`mariadb.sys`@`localhost` SQL SECURITY DEFINER */
+/*!50001 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` */;
+/*!50001 SET character_set_client = @saved_cs_client */;
+/*!50001 SET character_set_results = @saved_cs_results */;
+/*!50001 SET collation_connection = @saved_col_connection */;
+/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
+
+/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
+/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
+/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
+/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
+/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
+/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
+/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
+
+-- Dump completed on 2020-05-31 20:04:10
diff --git a/mysql-test/std_data/mysql_database_5.5.dump b/mysql-test/std_data/mysql_database_5.5.dump
new file mode 100644
index 00000000000..b7a21e7f7c5
--- /dev/null
+++ b/mysql-test/std_data/mysql_database_5.5.dump
@@ -0,0 +1,737 @@
+-- MySQL dump 10.14 Distrib 5.5.68-MariaDB, for Linux (x86_64)
+--
+-- Host: localhost Database: mysql
+-- ------------------------------------------------------
+-- Server version 5.5.68-MariaDB
+
+/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
+/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
+/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
+/*!40101 SET NAMES utf8 */;
+/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
+/*!40103 SET TIME_ZONE='+00:00' */;
+/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
+/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
+/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
+/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
+
+--
+-- Table structure for table `columns_priv`
+--
+
+DROP TABLE IF EXISTS `columns_priv`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `columns_priv` (
+ `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Column_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '',
+ PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`,`Column_name`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Column privileges';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `columns_priv`
+--
+
+LOCK TABLES `columns_priv` WRITE;
+/*!40000 ALTER TABLE `columns_priv` DISABLE KEYS */;
+/*!40000 ALTER TABLE `columns_priv` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `db`
+--
+
+DROP TABLE IF EXISTS `db`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `db` (
+ `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `User` char(16) COLLATE utf8_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',
+ `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',
+ `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',
+ `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',
+ `Execute_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',
+ PRIMARY KEY (`Host`,`Db`,`User`),
+ KEY `User` (`User`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Database privileges';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `db`
+--
+
+LOCK TABLES `db` WRITE;
+/*!40000 ALTER TABLE `db` DISABLE KEYS */;
+INSERT INTO `db` VALUES ('%','test','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N','Y','Y'),('%','test\\_%','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N','Y','Y');
+/*!40000 ALTER TABLE `db` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `event`
+--
+
+DROP TABLE IF EXISTS `event`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `event` (
+ `db` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
+ `name` char(64) NOT NULL DEFAULT '',
+ `body` longblob NOT NULL,
+ `definer` char(77) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
+ `execute_at` datetime DEFAULT NULL,
+ `interval_value` int(11) DEFAULT NULL,
+ `interval_field` enum('YEAR','QUARTER','MONTH','DAY','HOUR','MINUTE','WEEK','SECOND','MICROSECOND','YEAR_MONTH','DAY_HOUR','DAY_MINUTE','DAY_SECOND','HOUR_MINUTE','HOUR_SECOND','MINUTE_SECOND','DAY_MICROSECOND','HOUR_MICROSECOND','MINUTE_MICROSECOND','SECOND_MICROSECOND') DEFAULT NULL,
+ `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `last_executed` datetime DEFAULT NULL,
+ `starts` datetime DEFAULT NULL,
+ `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') 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',
+ `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,
+ `db_collation` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
+ `body_utf8` longblob,
+ PRIMARY KEY (`db`,`name`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Events';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `func`
+--
+
+DROP TABLE IF EXISTS `func`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `func` (
+ `name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `ret` tinyint(1) NOT NULL DEFAULT '0',
+ `dl` char(128) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `type` enum('function','aggregate') CHARACTER SET utf8 NOT NULL,
+ PRIMARY KEY (`name`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='User defined functions';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `func`
+--
+
+LOCK TABLES `func` WRITE;
+/*!40000 ALTER TABLE `func` DISABLE KEYS */;
+/*!40000 ALTER TABLE `func` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `help_category`
+--
+
+DROP TABLE IF EXISTS `help_category`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `help_category` (
+ `help_category_id` smallint(5) unsigned NOT NULL,
+ `name` char(64) NOT NULL,
+ `parent_category_id` smallint(5) unsigned DEFAULT NULL,
+ `url` text NOT NULL,
+ PRIMARY KEY (`help_category_id`),
+ UNIQUE KEY `name` (`name`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='help categories';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `help_category`
+--
+
+LOCK TABLES `help_category` WRITE;
+/*!40000 ALTER TABLE `help_category` DISABLE KEYS */;
+INSERT INTO `help_category` VALUES (1,'Geographic',0,''),(2,'Polygon properties',34,''),(3,'WKT',34,''),(4,'Numeric Functions',38,''),(5,'Plugins',35,''),(6,'MBR',34,''),(7,'Control flow functions',38,''),(8,'Transactions',35,''),(9,'Help Metadata',35,''),(10,'Account Management',35,''),(11,'Point properties',34,''),(12,'Encryption Functions',38,''),(13,'LineString properties',34,''),(14,'Miscellaneous Functions',38,''),(15,'Logical operators',38,''),(16,'Functions and Modifiers for Use with GROUP BY',35,''),(17,'Information Functions',38,''),(18,'Comparison operators',38,''),(19,'Bit Functions',38,''),(20,'Table Maintenance',35,''),(21,'User-Defined Functions',35,''),(22,'Data Types',35,''),(23,'Compound Statements',35,''),(24,'Geometry constructors',34,''),(25,'GeometryCollection properties',1,''),(26,'Administration',35,''),(27,'Data Manipulation',35,''),(28,'Utility',35,''),(29,'Language Structure',35,''),(30,'Geometry relations',34,''),(31,'Date and Time Functions',38,''),(32,'WKB',34,''),(33,'Procedures',35,''),(34,'Geographic Features',35,''),(35,'Contents',0,''),(36,'Geometry properties',34,''),(37,'String Functions',38,''),(38,'Functions',35,''),(39,'Data Definition',35,'');
+/*!40000 ALTER TABLE `help_category` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `help_keyword`
+--
+
+DROP TABLE IF EXISTS `help_keyword`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `help_keyword` (
+ `help_keyword_id` int(10) unsigned NOT NULL,
+ `name` char(64) NOT NULL,
+ PRIMARY KEY (`help_keyword_id`),
+ UNIQUE KEY `name` (`name`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='help keywords';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `help_keyword`
+--
+
+LOCK TABLES `help_keyword` WRITE;
+/*!40000 ALTER TABLE `help_keyword` DISABLE KEYS */;
+INSERT INTO `help_keyword` VALUES (0,'JOIN'),(1,'HOST'),(2,'REPEAT'),(3,'SERIALIZABLE'),(4,'REPLACE'),(5,'AT'),(6,'SCHEDULE'),(7,'RETURNS'),(8,'STARTS'),(9,'MASTER_SSL_CA'),(10,'NCHAR'),(11,'COLUMNS'),(12,'COMPLETION'),(13,'WORK'),(14,'DATETIME'),(15,'MODE'),(16,'OPEN'),(17,'INTEGER'),(18,'ESCAPE'),(19,'VALUE'),(20,'MASTER_SSL_VERIFY_SERVER_CERT'),(21,'SQL_BIG_RESULT'),(22,'DROP'),(23,'GEOMETRYCOLLECTIONFROMWKB'),(24,'EVENTS'),(25,'MONTH'),(26,'PROFILES'),(27,'DUPLICATE'),(28,'REPLICATION'),(29,'UNLOCK'),(30,'INNODB'),(31,'YEAR_MONTH'),(32,'SUBJECT'),(33,'PREPARE'),(34,'LOCK'),(35,'NDB'),(36,'CHECK'),(37,'FULL'),(38,'INT4'),(39,'BY'),(40,'NO'),(41,'MINUTE'),(42,'PARTITION'),(43,'DATA'),(44,'DAY'),(45,'SHARE'),(46,'REAL'),(47,'SEPARATOR'),(48,'MESSAGE_TEXT'),(49,'MASTER_HEARTBEAT_PERIOD'),(50,'DELETE'),(51,'ON'),(52,'COLUMN_NAME'),(53,'CONNECTION'),(54,'CLOSE'),(55,'X509'),(56,'USE'),(57,'SUBCLASS_ORIGIN'),(58,'WHERE'),(59,'PRIVILEGES'),(60,'SPATIAL'),(61,'EVENT'),(62,'SUPER'),(63,'SQL_BUFFER_RESULT'),(64,'IGNORE'),(65,'SHA2'),(66,'QUICK'),(67,'SIGNED'),(68,'OFFLINE'),(69,'SECURITY'),(70,'AUTOEXTEND_SIZE'),(71,'NDBCLUSTER'),(72,'POLYGONFROMWKB'),(73,'FALSE'),(74,'LEVEL'),(75,'FORCE'),(76,'BINARY'),(77,'TO'),(78,'CHANGE'),(79,'CURRENT_USER'),(80,'HOUR_MINUTE'),(81,'UPDATE'),(82,'PRESERVE'),(83,'TABLE_NAME'),(84,'INTO'),(85,'FEDERATED'),(86,'VARYING'),(87,'MAX_SIZE'),(88,'HOUR_SECOND'),(89,'VARIABLE'),(90,'ROLLBACK'),(91,'PROCEDURE'),(92,'TIMESTAMP'),(93,'IMPORT'),(94,'AGAINST'),(95,'CHECKSUM'),(96,'COUNT'),(97,'LONGBINARY'),(98,'THEN'),(99,'INSERT'),(100,'ENGINES'),(101,'HANDLER'),(102,'PORT'),(103,'DAY_SECOND'),(104,'EXISTS'),(105,'MUTEX'),(106,'HELP_DATE'),(107,'RELEASE'),(108,'BOOLEAN'),(109,'MOD'),(110,'DEFAULT'),(111,'TYPE'),(112,'NO_WRITE_TO_BINLOG'),(113,'OPTIMIZE'),(114,'SQLSTATE'),(115,'RESET'),(116,'CLASS_ORIGIN'),(117,'INSTALL'),(118,'ITERATE'),(119,'DO'),(120,'BIGINT'),(121,'SET'),(122,'ISSUER'),(123,'DATE'),(124,'STATUS'),(125,'FULLTEXT'),(126,'COMMENT'),(127,'MASTER_CONNECT_RETRY'),(128,'INNER'),(129,'RELAYLOG'),(130,'STOP'),(131,'MASTER_LOG_FILE'),(132,'MRG_MYISAM'),(133,'PRECISION'),(134,'REQUIRE'),(135,'TRAILING'),(136,'PARTITIONS'),(137,'LONG'),(138,'OPTION'),(139,'REORGANIZE'),(140,'ELSE'),(141,'DEALLOCATE'),(142,'IO_THREAD'),(143,'CASE'),(144,'CIPHER'),(145,'CONTINUE'),(146,'FROM'),(147,'READ'),(148,'LEFT'),(149,'ELSEIF'),(150,'MINUTE_SECOND'),(151,'COMPACT'),(152,'DEC'),(153,'FOR'),(154,'WARNINGS'),(155,'MIN_ROWS'),(156,'STRING'),(157,'CONDITION'),(158,'ENCLOSED'),(159,'FUNCTION'),(160,'AGGREGATE'),(161,'FIELDS'),(162,'INT3'),(163,'ARCHIVE'),(164,'AVG_ROW_LENGTH'),(165,'ADD'),(166,'KILL'),(167,'FLOAT4'),(168,'TABLESPACE'),(169,'VIEW'),(170,'REPEATABLE'),(171,'INFILE'),(172,'HELP_VERSION'),(173,'ORDER'),(174,'USING'),(175,'CONSTRAINT_CATALOG'),(176,'MIDDLEINT'),(177,'GRANT'),(178,'UNSIGNED'),(179,'DECIMAL'),(180,'GEOMETRYFROMTEXT'),(181,'INDEXES'),(182,'FOREIGN'),(183,'CACHE'),(184,'HOSTS'),(185,'MYSQL_ERRNO'),(186,'COMMIT'),(187,'SCHEMAS'),(188,'LEADING'),(189,'SNAPSHOT'),(190,'CONSTRAINT_NAME'),(191,'DECLARE'),(192,'LOAD'),(193,'SQL_CACHE'),(194,'CONVERT'),(195,'DYNAMIC'),(196,'COLLATE'),(197,'POLYGONFROMTEXT'),(198,'BYTE'),(199,'GLOBAL'),(200,'LINESTRINGFROMWKB'),(201,'WHEN'),(202,'HAVING'),(203,'AS'),(204,'STARTING'),(205,'RELOAD'),(206,'AUTOCOMMIT'),(207,'REVOKE'),(208,'GRANTS'),(209,'OUTER'),(210,'CURSOR_NAME'),(211,'FLOOR'),(212,'EXPLAIN'),(213,'WITH'),(214,'AFTER'),(215,'STD'),(216,'CSV'),(217,'DISABLE'),(218,'UNINSTALL'),(219,'OUTFILE'),(220,'LOW_PRIORITY'),(221,'FILE'),(222,'NODEGROUP'),(223,'SCHEMA'),(224,'SONAME'),(225,'POW'),(226,'DUAL'),(227,'MULTIPOINTFROMWKB'),(228,'INDEX'),(229,'MULTIPOINTFROMTEXT'),(230,'DEFINER'),(231,'MASTER_BIND'),(232,'REMOVE'),(233,'EXTENDED'),(234,'MULTILINESTRINGFROMWKB'),(235,'CROSS'),(236,'CONTRIBUTORS'),(237,'NATIONAL'),(238,'GROUP'),(239,'SHA'),(240,'ONLINE'),(241,'UNDO'),(242,'IGNORE_SERVER_IDS'),(243,'ZEROFILL'),(244,'CLIENT'),(245,'MASTER_PASSWORD'),(246,'OWNER'),(247,'RELAY_LOG_FILE'),(248,'TRUE'),(249,'CHARACTER'),(250,'MASTER_USER'),(251,'SCHEMA_NAME'),(252,'TABLE'),(253,'ENGINE'),(254,'INSERT_METHOD'),(255,'CASCADE'),(256,'RELAY_LOG_POS'),(257,'SQL_CALC_FOUND_ROWS'),(258,'UNION'),(259,'MYISAM'),(260,'LEAVE'),(261,'MODIFY'),(262,'MATCH'),(263,'MASTER_LOG_POS'),(264,'DISTINCTROW'),(265,'DESC'),(266,'TIME'),(267,'NUMERIC'),(268,'EXPANSION'),(269,'CODE'),(270,'CURSOR'),(271,'GEOMETRYCOLLECTIONFROMTEXT'),(272,'CHAIN'),(273,'LOGFILE'),(274,'FLUSH'),(275,'CREATE'),(276,'DESCRIBE'),(277,'EXTENT_SIZE'),(278,'MAX_UPDATES_PER_HOUR'),(279,'INT2'),(280,'PROCESSLIST'),(281,'ENDS'),(282,'LOGS'),(283,'DISCARD'),(284,'HEAP'),(285,'SOUNDS'),(286,'BETWEEN'),(287,'MULTILINESTRINGFROMTEXT'),(288,'REPAIR'),(289,'PACK_KEYS'),(290,'FAST'),(291,'VALUES'),(292,'CALL'),(293,'LOOP'),(294,'VARCHARACTER'),(295,'BEFORE'),(296,'TRUNCATE'),(297,'SHOW'),(298,'ALL'),(299,'REDUNDANT'),(300,'USER_RESOURCES'),(301,'PARTIAL'),(302,'BINLOG'),(303,'END'),(304,'SECOND'),(305,'AND'),(306,'FLOAT8'),(307,'PREV'),(308,'HOUR'),(309,'SELECT'),(310,'DATABASES'),(311,'OR'),(312,'IDENTIFIED'),(313,'WRAPPER'),(314,'MASTER_SSL_CIPHER'),(315,'SQL_SLAVE_SKIP_COUNTER'),(316,'BOTH'),(317,'BOOL'),(318,'YEAR'),(319,'MASTER_PORT'),(320,'CONCURRENT'),(321,'HELP'),(322,'UNIQUE'),(323,'TRIGGERS'),(324,'PROCESS'),(325,'OPTIONS'),(326,'RESIGNAL'),(327,'CONSISTENT'),(328,'MASTER_SSL'),(329,'DATE_ADD'),(330,'MAX_CONNECTIONS_PER_HOUR'),(331,'LIKE'),(332,'PLUGIN'),(333,'FETCH'),(334,'IN'),(335,'COLUMN'),(336,'DUMPFILE'),(337,'USAGE'),(338,'EXECUTE'),(339,'MEMORY'),(340,'CEIL'),(341,'QUERY'),(342,'MASTER_HOST'),(343,'LINES'),(344,'SQL_THREAD'),(345,'SERVER'),(346,'MAX_QUERIES_PER_HOUR'),(347,'MASTER_SSL_CERT'),(348,'MULTIPOLYGONFROMWKB'),(349,'TRANSACTION'),(350,'DAY_MINUTE'),(351,'STDDEV'),(352,'DATE_SUB'),(353,'REBUILD'),(354,'GEOMETRYFROMWKB'),(355,'INT1'),(356,'RENAME'),(357,'PARSER'),(358,'RIGHT'),(359,'ALTER'),(360,'MAX_ROWS'),(361,'SOCKET'),(362,'STRAIGHT_JOIN'),(363,'NATURAL'),(364,'VARIABLES'),(365,'ESCAPED'),(366,'SHA1'),(367,'KEY_BLOCK_SIZE'),(368,'PASSWORD'),(369,'OFFSET'),(370,'CHAR'),(371,'NEXT'),(372,'ERRORS'),(373,'SQL_LOG_BIN'),(374,'TEMPORARY'),(375,'COMMITTED'),(376,'SQL_SMALL_RESULT'),(377,'UPGRADE'),(378,'BEGIN'),(379,'DELAY_KEY_WRITE'),(380,'PROFILE'),(381,'MEDIUM'),(382,'INTERVAL'),(383,'SSL'),(384,'DAY_HOUR'),(385,'NAME'),(386,'REFERENCES'),(387,'AES_ENCRYPT'),(388,'STORAGE'),(389,'ISOLATION'),(390,'CEILING'),(391,'EVERY'),(392,'INT8'),(393,'AUTHORS'),(394,'RESTRICT'),(395,'UNCOMMITTED'),(396,'LINESTRINGFROMTEXT'),(397,'IS'),(398,'NOT'),(399,'ANALYSE'),(400,'DATAFILE'),(401,'DES_KEY_FILE'),(402,'SIGNAL'),(403,'COMPRESSED'),(404,'START'),(405,'PLUGINS'),(406,'SAVEPOINT'),(407,'IF'),(408,'ROWS'),(409,'PRIMARY'),(410,'PURGE'),(411,'LAST'),(412,'USER'),(413,'EXIT'),(414,'KEYS'),(415,'LIMIT'),(416,'KEY'),(417,'MERGE'),(418,'UNTIL'),(419,'SQL_NO_CACHE'),(420,'DELAYED'),(421,'CONSTRAINT_SCHEMA'),(422,'ANALYZE'),(423,'CONSTRAINT'),(424,'SERIAL'),(425,'ACTION'),(426,'WRITE'),(427,'INITIAL_SIZE'),(428,'SESSION'),(429,'DATABASE'),(430,'NULL'),(431,'POWER'),(432,'USE_FRM'),(433,'TERMINATED'),(434,'SLAVE'),(435,'NVARCHAR'),(436,'ASC'),(437,'RETURN'),(438,'OPTIONALLY'),(439,'ENABLE'),(440,'DIRECTORY'),(441,'MAX_USER_CONNECTIONS'),(442,'WHILE'),(443,'LOCAL'),(444,'DISTINCT'),(445,'AES_DECRYPT'),(446,'MASTER_SSL_KEY'),(447,'NONE'),(448,'TABLES'),(449,'<>'),(450,'RLIKE'),(451,'TRIGGER'),(452,'COLLATION'),(453,'SHUTDOWN'),(454,'HIGH_PRIORITY'),(455,'BTREE'),(456,'FIRST'),(457,'COALESCE'),(458,'WAIT'),(459,'CATALOG_NAME'),(460,'MASTER'),(461,'FIXED'),(462,'MULTIPOLYGONFROMTEXT'),(463,'ROW_FORMAT');
+/*!40000 ALTER TABLE `help_keyword` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `help_relation`
+--
+
+DROP TABLE IF EXISTS `help_relation`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `help_relation` (
+ `help_topic_id` int(10) unsigned NOT NULL,
+ `help_keyword_id` int(10) unsigned NOT NULL,
+ PRIMARY KEY (`help_keyword_id`,`help_topic_id`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='keyword-topic relation';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `help_relation`
+--
+
+LOCK TABLES `help_relation` WRITE;
+/*!40000 ALTER TABLE `help_relation` DISABLE KEYS */;
+INSERT INTO `help_relation` VALUES (1,0),(356,0),(473,1),(232,2),(447,3),(3,4),(130,4),(421,4),(89,5),(89,6),(406,6),(97,7),(89,8),(185,9),(430,10),(21,11),(347,11),(421,11),(463,11),(468,11),(89,12),(406,12),(146,13),(230,14),(88,15),(356,15),(18,16),(106,16),(134,16),(347,16),(97,17),(500,17),(380,18),(3,19),(104,19),(243,19),(374,19),(459,19),(185,20),(356,21),(9,22),(30,22),(34,22),(87,22),(186,22),(237,22),(263,22),(276,22),(300,22),(331,22),(405,22),(415,22),(416,22),(463,22),(478,22),(108,23),(122,24),(170,24),(424,24),(376,25),(82,26),(104,27),(199,28),(36,29),(347,30),(468,30),(376,31),(199,32),(35,33),(237,33),(36,34),(356,34),(468,35),(417,36),(463,36),(468,36),(21,37),(294,37),(347,37),(451,37),(468,37),(500,38),(48,39),(77,39),(83,39),(130,39),(199,39),(356,39),(361,39),(421,39),(463,39),(468,39),(468,40),(472,40),(376,41),(463,42),(468,42),(212,43),(421,43),(468,43),(473,43),(376,44),(356,45),(97,46),(314,46),(361,47),(374,48),(459,48),(185,49),(48,50),(468,50),(472,50),(1,51),(89,51),(406,51),(472,51),(374,52),(459,52),(176,53),(468,53),(51,54),(106,54),(199,55),(1,56),(55,56),(194,56),(374,57),(459,57),(48,58),(83,58),(106,58),(193,59),(199,59),(249,59),(210,60),(463,60),(89,61),(300,61),(358,61),(406,61),(199,62),(356,63),(1,64),(83,64),(104,64),(130,64),(356,64),(421,64),(463,64),(66,65),(48,66),(417,66),(466,66),(230,67),(87,68),(210,68),(463,68),(199,69),(194,70),(468,71),(91,72),(482,72),(385,73),(447,74),(1,75),(39,76),(230,76),(269,76),(185,77),(269,77),(460,77),(185,78),(463,78),(89,79),(406,79),(376,80),(83,81),(104,81),(356,81),(472,81),(89,82),(406,82),(374,83),(459,83),(3,84),(104,84),(304,84),(356,84),(468,85),(257,86),(194,87),(376,88),(129,89),(146,90),(460,90),(17,91),(189,91),(302,91),(328,91),(347,91),(356,91),(416,91),(439,91),(488,91),(99,92),(188,92),(421,93),(463,93),(88,94),(401,95),(468,95),(69,96),(330,96),(433,96),(285,97),(28,98),(57,98),(85,98),(104,99),(195,99),(301,99),(486,99),(282,100),(347,100),(106,101),(313,101),(473,102),(376,103),(9,104),(30,104),(89,104),(155,104),(186,104),(276,104),(300,104),(347,105),(365,105),(109,106),(146,107),(460,107),(24,108),(88,108),(113,109),(174,109),(3,110),(104,110),(155,110),(200,110),(212,110),(243,110),(463,110),(468,110),(463,111),(115,112),(326,112),(466,112),(470,112),(115,113),(463,113),(374,114),(459,114),(38,115),(119,115),(151,115),(264,115),(374,116),(459,116),(419,117),(124,118),(89,119),(125,119),(406,119),(496,119),(221,120),(3,121),(83,121),(104,121),(129,121),(130,121),(146,121),(155,121),(182,121),(212,121),(333,121),(347,121),(356,121),(374,121),(421,121),(459,121),(463,121),(468,121),(472,121),(477,121),(494,121),(199,122),(132,123),(230,123),(262,123),(376,123),(58,124),(137,124),(215,124),(223,124),(328,124),(336,124),(347,124),(365,124),(210,125),(463,125),(468,125),(89,126),(194,126),(210,126),(406,126),(468,126),(185,127),(1,128),(424,129),(52,130),(185,131),(468,132),(314,133),(199,134),(455,135),(255,136),(285,137),(199,138),(249,138),(463,139),(57,140),(85,140),(237,141),(52,142),(324,142),(57,143),(85,143),(199,144),(313,145),(48,146),(122,146),(347,146),(356,146),(424,146),(455,146),(36,147),(106,147),(447,147),(1,148),(28,149),(376,150),(468,151),(209,152),(180,153),(313,153),(347,153),(356,153),(420,153),(330,154),(347,154),(468,155),(97,156),(180,157),(421,158),(34,159),(68,159),(97,159),(211,159),(233,159),(302,159),(336,159),(347,159),(393,159),(405,159),(416,159),(97,160),(347,161),(421,161),(252,162),(468,163),(463,164),(468,164),(60,165),(194,165),(463,165),(478,165),(176,166),(168,167),(194,168),(415,168),(463,168),(478,168),(30,169),(159,169),(454,169),(447,170),(130,171),(421,171),(190,172),(48,173),(83,173),(356,173),(361,173),(463,173),(1,174),(48,174),(86,174),(374,175),(459,175),(252,176),(199,177),(249,177),(24,178),(128,178),(168,178),(209,178),(230,178),(314,178),(500,178),(97,179),(156,179),(230,179),(411,180),(347,181),(463,182),(468,182),(472,182),(473,182),(101,183),(151,183),(304,183),(145,184),(347,184),(374,185),(459,185),(146,186),(160,187),(347,187),(455,188),(146,189),(374,190),(459,190),(180,191),(200,191),(313,191),(420,191),(304,192),(421,192),(356,193),(230,194),(377,194),(468,195),(155,196),(212,196),(468,196),(395,197),(465,198),(129,199),(137,199),(182,199),(349,199),(447,199),(452,200),(57,201),(85,201),(356,202),(1,203),(36,203),(356,203),(421,204),(199,205),(146,206),(249,207),(192,208),(347,208),(1,209),(374,210),(459,210),(221,211),(255,212),(88,213),(199,213),(210,213),(463,213),(468,213),(463,214),(260,215),(421,216),(468,216),(89,217),(406,217),(463,217),(291,218),(356,219),(3,220),(36,220),(48,220),(83,220),(104,220),(130,220),(421,220),(199,221),(194,222),(155,223),(186,223),(212,223),(309,223),(347,223),(97,224),(277,225),(279,226),(464,227),(1,228),(60,228),(87,228),(101,228),(210,228),(304,228),(308,228),(347,228),(463,228),(468,228),(425,229),(89,230),(406,230),(185,231),(463,232),(255,233),(466,233),(272,234),(1,235),(7,236),(347,236),(257,237),(430,237),(194,238),(226,238),(356,238),(427,239),(87,240),(210,240),(463,240),(313,241),(185,242),(24,243),(128,243),(168,243),(209,243),(314,243),(500,243),(199,244),(185,245),(473,246),(185,247),(385,248),(130,249),(155,249),(212,249),(257,249),(333,249),(347,249),(356,249),(421,249),(430,249),(468,249),(185,250),(374,251),(459,251),(60,252),(110,252),(115,252),(215,252),(276,252),(278,252),(321,252),(347,252),(401,252),(417,252),(463,252),(466,252),(468,252),(470,252),(194,253),(347,253),(365,253),(415,253),(463,253),(468,253),(478,253),(468,254),(30,255),(276,255),(468,255),(472,255),(185,256),(356,257),(305,258),(468,259),(310,260),(463,261),(88,262),(185,263),(356,264),(329,265),(356,265),(361,265),(230,266),(315,266),(375,266),(209,267),(88,268),(68,269),(488,269),(420,270),(246,271),(146,272),(194,273),(226,273),(151,274),(326,274),(17,275),(22,275),(60,275),(77,275),(89,275),(97,275),(155,275),(194,275),(210,275),(211,275),(278,275),(302,275),(309,275),(347,275),(358,275),(393,275),(454,275),(468,275),(473,275),(329,276),(194,277),(199,278),(234,279),(347,280),(451,280),(89,281),(39,282),(269,282),(347,282),(463,283),(468,284),(378,285),(147,286),(107,287),(463,288),(466,288),(468,289),(417,290),(3,291),(104,291),(339,292),(344,293),(257,294),(269,295),(321,296),(463,296),(7,297),(10,297),(17,297),(21,297),(25,297),(33,297),(39,297),(58,297),(68,297),(69,297),(82,297),(122,297),(134,297),(137,297),(145,297),(160,297),(170,297),(192,297),(193,297),(215,297),(223,297),(278,297),(282,297),(294,297),(308,297),(309,297),(328,297),(330,297),(333,297),(336,297),(347,297),(349,297),(358,297),(365,297),(393,297),(424,297),(451,297),(487,297),(488,297),(492,297),(38,298),(199,298),(249,298),(305,298),(356,298),(468,299),(326,300),(468,301),(122,302),(350,302),(28,303),(57,303),(85,303),(232,303),(327,303),(344,303),(496,303),(376,304),(147,305),(316,305),(314,306),(106,307),(376,308),(3,309),(104,309),(255,309),(301,309),(356,309),(160,310),(347,310),(141,311),(77,312),(130,312),(199,312),(473,313),(185,314),(182,315),(455,316),(24,317),(111,317),(376,318),(185,319),(130,320),(421,320),(118,321),(390,321),(463,322),(25,323),(347,323),(199,324),(373,325),(473,325),(374,326),(146,327),(185,328),(376,329),(199,330),(347,331),(378,331),(291,332),(347,332),(419,332),(383,333),(88,334),(122,334),(356,334),(424,334),(463,335),(356,336),(199,337),(86,338),(199,338),(356,339),(397,340),(88,341),(151,341),(176,341),(185,342),(130,343),(421,343),(52,344),(324,344),(9,345),(373,345),(473,345),(199,346),(185,347),(123,348),(146,349),(447,349),(376,350),(407,351),(376,352),(463,353),(144,354),(24,355),(110,356),(222,356),(406,356),(463,356),(210,357),(463,357),(468,357),(1,358),(60,359),(159,359),(199,359),(212,359),(226,359),(233,359),(373,359),(406,359),(439,359),(463,359),(478,359),(463,360),(468,360),(473,361),(1,362),(356,362),(1,363),(347,364),(349,364),(421,365),(427,366),(468,367),(77,368),(199,368),(473,368),(477,368),(356,369),(230,370),(465,370),(106,371),(69,372),(347,372),(494,373),(276,374),(447,375),(356,376),(212,377),(417,377),(146,378),(327,378),(468,379),(487,380),(417,381),(89,382),(376,382),(199,383),(376,384),(212,385),(199,386),(468,386),(472,386),(443,387),(282,388),(447,389),(448,390),(89,391),(128,392),(10,393),(347,393),(30,394),(276,394),(472,394),(447,395),(56,396),(84,397),(206,397),(368,397),(456,397),(84,398),(89,398),(155,398),(206,398),(312,398),(189,399),(194,400),(478,400),(326,401),(459,402),(468,403),(146,404),(324,404),(33,405),(460,406),(9,407),(28,407),(30,407),(89,407),(155,407),(186,407),(276,407),(300,407),(479,407),(130,408),(463,409),(269,410),(106,411),(77,412),(222,412),(331,412),(473,412),(313,413),(308,414),(347,414),(463,414),(48,415),(83,415),(106,415),(122,415),(356,415),(424,415),(60,416),(104,416),(463,416),(468,416),(472,416),(468,417),(232,418),(356,419),(3,420),(104,420),(486,420),(374,421),(459,421),(463,422),(470,422),(463,423),(468,423),(243,424),(468,424),(468,425),(472,425),(36,426),(194,427),(478,427),(129,428),(137,428),(349,428),(447,428),(155,429),(186,429),(212,429),(309,429),(347,429),(473,429),(84,430),(368,430),(472,430),(483,431),(466,432),(421,433),(38,434),(52,434),(89,434),(145,434),(223,434),(324,434),(406,434),(257,435),(356,436),(361,436),(491,437),(421,438),(89,439),(406,439),(463,439),(212,440),(468,440),(199,441),(496,442),(36,443),(115,443),(130,443),(326,443),(421,443),(466,443),(470,443),(0,444),(96,444),(288,444),(305,444),(356,444),(361,444),(384,444),(433,444),(497,445),(185,446),(199,447),(36,448),(134,448),(294,448),(347,448),(495,449),(27,450),(22,451),(263,451),(347,451),(347,452),(492,452),(199,453),(104,454),(356,454),(210,455),(106,456),(463,456),(468,456),(463,457),(194,458),(478,458),(374,459),(459,459),(39,460),(58,460),(185,460),(264,460),(269,460),(209,461),(468,461),(201,462),(468,463);
+/*!40000 ALTER TABLE `help_relation` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `help_topic`
+--
+
+DROP TABLE IF EXISTS `help_topic`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `help_topic` (
+ `help_topic_id` int(10) unsigned NOT NULL,
+ `name` char(64) NOT NULL,
+ `help_category_id` smallint(5) unsigned NOT NULL,
+ `description` text NOT NULL,
+ `example` text NOT NULL,
+ `url` text NOT NULL,
+ PRIMARY KEY (`help_topic_id`),
+ UNIQUE KEY `name` (`name`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='help topics';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `help_topic`
+--
+
+LOCK TABLES `help_topic` WRITE;
+/*!40000 ALTER TABLE `help_topic` DISABLE KEYS */;
+INSERT INTO `help_topic` VALUES (0,'MIN',16,'Syntax:\nMIN([DISTINCT] expr)\n\nReturns the minimum value of expr. MIN() may take a string argument; in\nsuch cases, it returns the minimum string value. See\nhttp://dev.mysql.com/doc/refman/5.5/en/mysql-indexes.html. The DISTINCT\nkeyword can be used to find the minimum of the distinct values of expr,\nhowever, this produces the same result as omitting DISTINCT.\n\nMIN() returns NULL if there were no matching rows.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/group-by-functions.html\n\n','mysql> SELECT student_name, MIN(test_score), MAX(test_score)\n -> FROM student\n -> GROUP BY student_name;\n','http://dev.mysql.com/doc/refman/5.5/en/group-by-functions.html'),(1,'JOIN',27,'MySQL supports the following JOIN syntaxes for the table_references\npart of SELECT statements and multiple-table DELETE and UPDATE\nstatements:\n\ntable_references:\n table_reference [, table_reference] ...\n\ntable_reference:\n table_factor\n | join_table\n\ntable_factor:\n tbl_name [[AS] alias] [index_hint_list]\n | table_subquery [AS] alias\n | ( table_references )\n | { OJ table_reference LEFT OUTER JOIN table_reference\n ON conditional_expr }\n\njoin_table:\n table_reference [INNER | CROSS] JOIN table_factor [join_condition]\n | table_reference STRAIGHT_JOIN table_factor\n | table_reference STRAIGHT_JOIN table_factor ON conditional_expr\n | table_reference {LEFT|RIGHT} [OUTER] JOIN table_reference join_condition\n | table_reference NATURAL [{LEFT|RIGHT} [OUTER]] JOIN table_factor\n\njoin_condition:\n ON conditional_expr\n | USING (column_list)\n\nindex_hint_list:\n index_hint [, index_hint] ...\n\nindex_hint:\n USE {INDEX|KEY}\n [FOR {JOIN|ORDER BY|GROUP BY}] ([index_list])\n | IGNORE {INDEX|KEY}\n [FOR {JOIN|ORDER BY|GROUP BY}] (index_list)\n | FORCE {INDEX|KEY}\n [FOR {JOIN|ORDER BY|GROUP BY}] (index_list)\n\nindex_list:\n index_name [, index_name] ...\n\nA table reference is also known as a join expression.\n\nThe syntax of table_factor is extended in comparison with the SQL\nStandard. The latter accepts only table_reference, not a list of them\ninside a pair of parentheses.\n\nThis is a conservative extension if we consider each comma in a list of\ntable_reference items as equivalent to an inner join. For example:\n\nSELECT * FROM t1 LEFT JOIN (t2, t3, t4)\n ON (t2.a=t1.a AND t3.b=t1.b AND t4.c=t1.c)\n\nis equivalent to:\n\nSELECT * FROM t1 LEFT JOIN (t2 CROSS JOIN t3 CROSS JOIN t4)\n ON (t2.a=t1.a AND t3.b=t1.b AND t4.c=t1.c)\n\nIn MySQL, JOIN, CROSS JOIN, and INNER JOIN are syntactic equivalents\n(they can replace each other). In standard SQL, they are not\nequivalent. INNER JOIN is used with an ON clause, CROSS JOIN is used\notherwise.\n\nIn general, parentheses can be ignored in join expressions containing\nonly inner join operations. MySQL also supports nested joins (see\nhttp://dev.mysql.com/doc/refman/5.5/en/nested-join-optimization.html).\n\nIndex hints can be specified to affect how the MySQL optimizer makes\nuse of indexes. For more information, see\nhttp://dev.mysql.com/doc/refman/5.5/en/index-hints.html.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/join.html\n\n','SELECT left_tbl.*\n FROM left_tbl LEFT JOIN right_tbl ON left_tbl.id = right_tbl.id\n WHERE right_tbl.id IS NULL;\n','http://dev.mysql.com/doc/refman/5.5/en/join.html'),(2,'HEX',37,'Syntax:\nHEX(str), HEX(N)\n\nFor a string argument str, HEX() returns a hexadecimal string\nrepresentation of str where each character in str is converted to two\nhexadecimal digits. The inverse of this operation is performed by the\nUNHEX() function.\n\nFor a numeric argument N, HEX() returns a hexadecimal string\nrepresentation of the value of N treated as a longlong (BIGINT) number.\nThis is equivalent to CONV(N,10,16). The inverse of this operation is\nperformed by CONV(HEX(N),16,10).\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html\n\n','mysql> SELECT 0x616263, HEX(\'abc\'), UNHEX(HEX(\'abc\'));\n -> \'abc\', 616263, \'abc\'\nmysql> SELECT HEX(255), CONV(HEX(255),16,10);\n -> \'FF\', 255\n','http://dev.mysql.com/doc/refman/5.5/en/string-functions.html'),(3,'REPLACE',27,'Syntax:\nREPLACE [LOW_PRIORITY | DELAYED]\n [INTO] tbl_name [(col_name,...)]\n {VALUES | VALUE} ({expr | DEFAULT},...),(...),...\n\nOr:\n\nREPLACE [LOW_PRIORITY | DELAYED]\n [INTO] tbl_name\n SET col_name={expr | DEFAULT}, ...\n\nOr:\n\nREPLACE [LOW_PRIORITY | DELAYED]\n [INTO] tbl_name [(col_name,...)]\n SELECT ...\n\nREPLACE works exactly like INSERT, except that if an old row in the\ntable has the same value as a new row for a PRIMARY KEY or a UNIQUE\nindex, the old row is deleted before the new row is inserted. See [HELP\nINSERT].\n\nREPLACE is a MySQL extension to the SQL standard. It either inserts, or\ndeletes and inserts. For another MySQL extension to standard SQL---that\neither inserts or updates---see\nhttp://dev.mysql.com/doc/refman/5.5/en/insert-on-duplicate.html.\n\nNote that unless the table has a PRIMARY KEY or UNIQUE index, using a\nREPLACE statement makes no sense. It becomes equivalent to INSERT,\nbecause there is no index to be used to determine whether a new row\nduplicates another.\n\nValues for all columns are taken from the values specified in the\nREPLACE statement. Any missing columns are set to their default values,\njust as happens for INSERT. You cannot refer to values from the current\nrow and use them in the new row. If you use an assignment such as SET\ncol_name = col_name + 1, the reference to the column name on the right\nhand side is treated as DEFAULT(col_name), so the assignment is\nequivalent to SET col_name = DEFAULT(col_name) + 1.\n\nTo use REPLACE, you must have both the INSERT and DELETE privileges for\nthe table.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/replace.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/replace.html'),(4,'CONTAINS',30,'Contains(g1,g2)\n\nReturns 1 or 0 to indicate whether g1 completely contains g2. This\ntests the opposite relationship as Within().\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/functions-for-testing-spatial-relations-between-geometric-objects.html#functions-that-test-spatial-relationships-between-geometries\n\n','','http://dev.mysql.com/doc/refman/5.5/en/functions-for-testing-spatial-relations-between-geometric-objects.html#functions-that-test-spatial-relationships-between-geometries'),(5,'SRID',36,'SRID(g)\n\nReturns an integer indicating the Spatial Reference System ID for the\ngeometry value g.\n\nIn MySQL, the SRID value is just an integer associated with the\ngeometry value. All calculations are done assuming Euclidean (planar)\ngeometry.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/geometry-property-functions.html#general-geometry-property-functions\n\n','mysql> SELECT SRID(GeomFromText(\'LineString(1 1,2 2)\',101));\n+-----------------------------------------------+\n| SRID(GeomFromText(\'LineString(1 1,2 2)\',101)) |\n+-----------------------------------------------+\n| 101 |\n+-----------------------------------------------+\n','http://dev.mysql.com/doc/refman/5.5/en/geometry-property-functions.html#general-geometry-property-functions'),(6,'CURRENT_TIMESTAMP',31,'Syntax:\nCURRENT_TIMESTAMP, CURRENT_TIMESTAMP()\n\nCURRENT_TIMESTAMP and CURRENT_TIMESTAMP() are synonyms for NOW().\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(7,'SHOW CONTRIBUTORS',26,'Syntax:\nSHOW CONTRIBUTORS\n\nThe SHOW CONTRIBUTORS statement displays information about the people\nwho contribute to MySQL source or to causes that we support. For each\ncontributor, it displays Name, Location, and Comment values.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/show-contributors.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/show-contributors.html'),(8,'VARIANCE',16,'Syntax:\nVARIANCE(expr)\n\nReturns the population standard variance of expr. This is an extension\nto standard SQL. The standard SQL function VAR_POP() can be used\ninstead.\n\nVARIANCE() returns NULL if there were no matching rows.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/group-by-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/group-by-functions.html'),(9,'DROP SERVER',39,'Syntax:\nDROP SERVER [ IF EXISTS ] server_name\n\nDrops the server definition for the server named server_name. The\ncorresponding row within the mysql.servers table will be deleted. This\nstatement requires the SUPER privilege.\n\nDropping a server for a table does not affect any FEDERATED tables that\nused this connection information when they were created. See [HELP\nCREATE SERVER].\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/drop-server.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/drop-server.html'),(10,'SHOW AUTHORS',26,'Syntax:\nSHOW AUTHORS\n\nThe SHOW AUTHORS statement displays information about the people who\nwork on MySQL. For each author, it displays Name, Location, and Comment\nvalues.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/show-authors.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/show-authors.html'),(11,'VAR_SAMP',16,'Syntax:\nVAR_SAMP(expr)\n\nReturns the sample variance of expr. That is, the denominator is the\nnumber of rows minus one.\n\nVAR_SAMP() returns NULL if there were no matching rows.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/group-by-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/group-by-functions.html'),(12,'CONCAT',37,'Syntax:\nCONCAT(str1,str2,...)\n\nReturns the string that results from concatenating the arguments. May\nhave one or more arguments. If all arguments are nonbinary strings, the\nresult is a nonbinary string. If the arguments include any binary\nstrings, the result is a binary string. A numeric argument is converted\nto its equivalent string form. This is a nonbinary string as of MySQL\n5.5.3. Before 5.5.3, it is a binary string; to to avoid that and\nproduce a nonbinary string, you can use an explicit type cast, as in\nthis example:\n\nSELECT CONCAT(CAST(int_col AS CHAR), char_col);\n\nCONCAT() returns NULL if any argument is NULL.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html\n\n','mysql> SELECT CONCAT(\'My\', \'S\', \'QL\');\n -> \'MySQL\'\nmysql> SELECT CONCAT(\'My\', NULL, \'QL\');\n -> NULL\nmysql> SELECT CONCAT(14.3);\n -> \'14.3\'\n','http://dev.mysql.com/doc/refman/5.5/en/string-functions.html'),(13,'GEOMETRY HIERARCHY',34,'Geometry is the base class. It is an abstract class. The instantiable\nsubclasses of Geometry are restricted to zero-, one-, and\ntwo-dimensional geometric objects that exist in two-dimensional\ncoordinate space. All instantiable geometry classes are defined so that\nvalid instances of a geometry class are topologically closed (that is,\nall defined geometries include their boundary).\n\nThe base Geometry class has subclasses for Point, Curve, Surface, and\nGeometryCollection:\n\no Point represents zero-dimensional objects.\n\no Curve represents one-dimensional objects, and has subclass\n LineString, with sub-subclasses Line and LinearRing.\n\no Surface is designed for two-dimensional objects and has subclass\n Polygon.\n\no GeometryCollection has specialized zero-, one-, and two-dimensional\n collection classes named MultiPoint, MultiLineString, and\n MultiPolygon for modeling geometries corresponding to collections of\n Points, LineStrings, and Polygons, respectively. MultiCurve and\n MultiSurface are introduced as abstract superclasses that generalize\n the collection interfaces to handle Curves and Surfaces.\n\nGeometry, Curve, Surface, MultiCurve, and MultiSurface are defined as\nnoninstantiable classes. They define a common set of methods for their\nsubclasses and are included for extensibility.\n\nPoint, LineString, Polygon, GeometryCollection, MultiPoint,\nMultiLineString, and MultiPolygon are instantiable classes.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/gis-geometry-class-hierarchy.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/gis-geometry-class-hierarchy.html'),(14,'CHAR FUNCTION',37,'Syntax:\nCHAR(N,... [USING charset_name])\n\nCHAR() interprets each argument N as an integer and returns a string\nconsisting of the characters given by the code values of those\nintegers. NULL values are skipped.\nBy default, CHAR() returns a binary string. To produce a string in a\ngiven character set, use the optional USING clause:\n\nmysql> SELECT CHARSET(CHAR(0x65)), CHARSET(CHAR(0x65 USING utf8));\n+---------------------+--------------------------------+\n| CHARSET(CHAR(0x65)) | CHARSET(CHAR(0x65 USING utf8)) |\n+---------------------+--------------------------------+\n| binary | utf8 |\n+---------------------+--------------------------------+\n\nIf USING is given and the result string is illegal for the given\ncharacter set, a warning is issued. Also, if strict SQL mode is\nenabled, the result from CHAR() becomes NULL.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html\n\n','mysql> SELECT CHAR(77,121,83,81,\'76\');\n -> \'MySQL\'\nmysql> SELECT CHAR(77,77.3,\'77.3\');\n -> \'MMM\'\n','http://dev.mysql.com/doc/refman/5.5/en/string-functions.html'),(15,'DATETIME',22,'DATETIME\n\nA date and time combination. The supported range is \'1000-01-01\n00:00:00\' to \'9999-12-31 23:59:59\'. MySQL displays DATETIME values in\n\'YYYY-MM-DD HH:MM:SS\' format, but permits assignment of values to\nDATETIME columns using either strings or numbers.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-type-overview.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-type-overview.html'),(16,'SHOW CREATE TRIGGER',26,'Syntax:\nSHOW CREATE TRIGGER trigger_name\n\nThis statement shows a CREATE TRIGGER statement that creates the given\ntrigger.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/show-create-trigger.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/show-create-trigger.html'),(17,'SHOW CREATE PROCEDURE',26,'Syntax:\nSHOW CREATE PROCEDURE proc_name\n\nThis statement is a MySQL extension. It returns the exact string that\ncan be used to re-create the named stored procedure. A similar\nstatement, SHOW CREATE FUNCTION, displays information about stored\nfunctions (see [HELP SHOW CREATE FUNCTION]).\n\nBoth statements require that you be the owner of the routine or have\nSELECT access to the mysql.proc table. If you do not have privileges\nfor the routine itself, the value displayed for the Create Procedure or\nCreate Function field will be NULL.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/show-create-procedure.html\n\n','mysql> SHOW CREATE PROCEDURE test.simpleproc\\G\n*************************** 1. row ***************************\n Procedure: simpleproc\n sql_mode:\n Create Procedure: CREATE PROCEDURE `simpleproc`(OUT param1 INT)\n BEGIN\n SELECT COUNT(*) INTO param1 FROM t;\n END\ncharacter_set_client: latin1\ncollation_connection: latin1_swedish_ci\n Database Collation: latin1_swedish_ci\n\nmysql> SHOW CREATE FUNCTION test.hello\\G\n*************************** 1. row ***************************\n Function: hello\n sql_mode:\n Create Function: CREATE FUNCTION `hello`(s CHAR(20))\n RETURNS CHAR(50)\n RETURN CONCAT(\'Hello, \',s,\'!\')\ncharacter_set_client: latin1\ncollation_connection: latin1_swedish_ci\n Database Collation: latin1_swedish_ci\n','http://dev.mysql.com/doc/refman/5.5/en/show-create-procedure.html'),(18,'OPEN',23,'Syntax:\nOPEN cursor_name\n\nThis statement opens a previously declared cursor. For an example, see\nhttp://dev.mysql.com/doc/refman/5.5/en/cursors.html.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/open.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/open.html'),(19,'INTEGER',22,'INTEGER[(M)] [UNSIGNED] [ZEROFILL]\n\nThis type is a synonym for INT.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/numeric-type-overview.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/numeric-type-overview.html'),(20,'LOWER',37,'Syntax:\nLOWER(str)\n\nReturns the string str with all characters changed to lowercase\naccording to the current character set mapping. The default is latin1\n(cp1252 West European).\n\nmysql> SELECT LOWER(\'QUADRATICALLY\');\n -> \'quadratically\'\n\nLOWER() (and UPPER()) are ineffective when applied to binary strings\n(BINARY, VARBINARY, BLOB). To perform lettercase conversion, convert\nthe string to a nonbinary string:\n\nmysql> SET @str = BINARY \'New York\';\nmysql> SELECT LOWER(@str), LOWER(CONVERT(@str USING latin1));\n+-------------+-----------------------------------+\n| LOWER(@str) | LOWER(CONVERT(@str USING latin1)) |\n+-------------+-----------------------------------+\n| New York | new york |\n+-------------+-----------------------------------+\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/string-functions.html'),(21,'SHOW COLUMNS',26,'Syntax:\nSHOW [FULL] COLUMNS {FROM | IN} tbl_name [{FROM | IN} db_name]\n [LIKE \'pattern\' | WHERE expr]\n\nSHOW COLUMNS displays information about the columns in a given table.\nIt also works for views. The LIKE clause, if present, indicates which\ncolumn names to match. The WHERE clause can be given to select rows\nusing more general conditions, as discussed in\nhttp://dev.mysql.com/doc/refman/5.5/en/extended-show.html.\n\nSHOW COLUMNS displays information only for those columns for which you\nhave some privilege.\n\nmysql> SHOW COLUMNS FROM City;\n+------------+----------+------+-----+---------+----------------+\n| Field | Type | Null | Key | Default | Extra |\n+------------+----------+------+-----+---------+----------------+\n| Id | int(11) | NO | PRI | NULL | auto_increment |\n| Name | char(35) | NO | | | |\n| Country | char(3) | NO | UNI | | |\n| District | char(20) | YES | MUL | | |\n| Population | int(11) | NO | | 0 | |\n+------------+----------+------+-----+---------+----------------+\n5 rows in set (0.00 sec)\n\nIf the data types differ from what you expect them to be based on a\nCREATE TABLE statement, note that MySQL sometimes changes data types\nwhen you create or alter a table. The conditions under which this\noccurs are described in\nhttp://dev.mysql.com/doc/refman/5.5/en/silent-column-changes.html.\n\nThe FULL keyword causes the output to include the column collation and\ncomments, as well as the privileges you have for each column.\n\nYou can use db_name.tbl_name as an alternative to the tbl_name FROM\ndb_name syntax. In other words, these two statements are equivalent:\n\nmysql> SHOW COLUMNS FROM mytable FROM mydb;\nmysql> SHOW COLUMNS FROM mydb.mytable;\n\nSHOW COLUMNS displays the following values for each table column:\n\nField indicates the column name.\n\nType indicates the column data type.\n\nCollation indicates the collation for nonbinary string columns, or NULL\nfor other columns. This value is displayed only if you use the FULL\nkeyword.\n\nThe Null field contains YES if NULL values can be stored in the column,\nNO if not.\n\nThe Key field indicates whether the column is indexed:\n\no If Key is empty, the column either is not indexed or is indexed only\n as a secondary column in a multiple-column, nonunique index.\n\no If Key is PRI, the column is a PRIMARY KEY or is one of the columns\n in a multiple-column PRIMARY KEY.\n\no If Key is UNI, the column is the first column of a UNIQUE index. (A\n UNIQUE index permits multiple NULL values, but you can tell whether\n the column permits NULL by checking the Null field.)\n\no If Key is MUL, the column is the first column of a nonunique index in\n which multiple occurrences of a given value are permitted within the\n column.\n\nIf more than one of the Key values applies to a given column of a\ntable, Key displays the one with the highest priority, in the order\nPRI, UNI, MUL.\n\nA UNIQUE index may be displayed as PRI if it cannot contain NULL values\nand there is no PRIMARY KEY in the table. A UNIQUE index may display as\nMUL if several columns form a composite UNIQUE index; although the\ncombination of the columns is unique, each column can still hold\nmultiple occurrences of a given value.\n\nThe Default field indicates the default value that is assigned to the\ncolumn. This is NULL if the column has an explicit default of NULL, or\nif the column definition has no DEFAULT clause.\n\nThe Extra field contains any additional information that is available\nabout a given column. The value is nonempty in these cases:\nauto_increment for columns that have the AUTO_INCREMENT attribute; on\nupdate CURRENT_TIMESTAMP for TIMESTAMP columns that have the ON UPDATE\nCURRENT_TIMESTAMP attribute.\n\nPrivileges indicates the privileges you have for the column. This value\nis displayed only if you use the FULL keyword.\n\nComment indicates any comment the column has. This value is displayed\nonly if you use the FULL keyword.\n\nSHOW FIELDS is a synonym for SHOW COLUMNS. You can also list a table\'s\ncolumns with the mysqlshow db_name tbl_name command.\n\nThe DESCRIBE statement provides information similar to SHOW COLUMNS.\nSee [HELP DESCRIBE].\n\nThe SHOW CREATE TABLE, SHOW TABLE STATUS, and SHOW INDEX statements\nalso provide information about tables. See [HELP SHOW].\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/show-columns.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/show-columns.html'),(22,'CREATE TRIGGER',39,'Syntax:\nCREATE\n [DEFINER = { user | CURRENT_USER }]\n TRIGGER trigger_name trigger_time trigger_event\n ON tbl_name FOR EACH ROW trigger_body\n\nThis statement creates a new trigger. A trigger is a named database\nobject that is associated with a table, and that activates when a\nparticular event occurs for the table. The trigger becomes associated\nwith the table named tbl_name, which must refer to a permanent table.\nYou cannot associate a trigger with a TEMPORARY table or a view.\n\nCREATE TRIGGER requires the TRIGGER privilege for the table associated\nwith the trigger. The statement might also require the SUPER privilege,\ndepending on the DEFINER value, as described later in this section. If\nbinary logging is enabled, CREATE TRIGGER might require the SUPER\nprivilege, as described in\nhttp://dev.mysql.com/doc/refman/5.5/en/stored-programs-logging.html.\n\nThe DEFINER clause determines the security context to be used when\nchecking access privileges at trigger activation time. See later in\nthis section for more information.\n\ntrigger_time is the trigger action time. It can be BEFORE or AFTER to\nindicate that the trigger activates before or after each row to be\nmodified.\n\ntrigger_event indicates the kind of statement that activates the\ntrigger. The trigger_event can be one of the following:\n\no INSERT: The trigger is activated whenever a new row is inserted into\n the table; for example, through INSERT, LOAD DATA, and REPLACE\n statements.\n\no UPDATE: The trigger is activated whenever a row is modified; for\n example, through UPDATE statements.\n\no DELETE: The trigger is activated whenever a row is deleted from the\n table; for example, through DELETE and REPLACE statements. However,\n DROP TABLE and TRUNCATE TABLE statements on the table do not activate\n this trigger, because they do not use DELETE. Dropping a partition\n does not activate DELETE triggers, either. See [HELP TRUNCATE TABLE].\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/create-trigger.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/create-trigger.html'),(23,'MONTH',31,'Syntax:\nMONTH(date)\n\nReturns the month for date, in the range 1 to 12 for January to\nDecember, or 0 for dates such as \'0000-00-00\' or \'2008-00-00\' that have\na zero month part.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','mysql> SELECT MONTH(\'2008-02-03\');\n -> 2\n','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(24,'TINYINT',22,'TINYINT[(M)] [UNSIGNED] [ZEROFILL]\n\nA very small integer. The signed range is -128 to 127. The unsigned\nrange is 0 to 255.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/numeric-type-overview.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/numeric-type-overview.html'),(25,'SHOW TRIGGERS',26,'Syntax:\nSHOW TRIGGERS [{FROM | IN} db_name]\n [LIKE \'pattern\' | WHERE expr]\n\nSHOW TRIGGERS lists the triggers currently defined for tables in a\ndatabase (the default database unless a FROM clause is given). This\nstatement returns results only for databases and tables for which you\nhave the TRIGGER privilege. The LIKE clause, if present, indicates\nwhich table names to match and causes the statement to display triggers\nfor those tables. The WHERE clause can be given to select rows using\nmore general conditions, as discussed in\nhttp://dev.mysql.com/doc/refman/5.5/en/extended-show.html.\n\nFor the trigger ins_sum as defined in\nhttp://dev.mysql.com/doc/refman/5.5/en/triggers.html, the output of\nthis statement is as shown here:\n\nmysql> SHOW TRIGGERS LIKE \'acc%\'\\G\n*************************** 1. row ***************************\n Trigger: ins_sum\n Event: INSERT\n Table: account\n Statement: SET @sum = @sum + NEW.amount\n Timing: BEFORE\n Created: NULL\n sql_mode:\n Definer: myname@localhost\ncharacter_set_client: latin1\ncollation_connection: latin1_swedish_ci\n Database Collation: latin1_swedish_ci\n\ncharacter_set_client is the session value of the character_set_client\nsystem variable when the trigger was created. collation_connection is\nthe session value of the collation_connection system variable when the\ntrigger was created. Database Collation is the collation of the\ndatabase with which the trigger is associated.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/show-triggers.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/show-triggers.html'),(26,'MASTER_POS_WAIT',14,'Syntax:\nMASTER_POS_WAIT(log_name,log_pos[,timeout])\n\nThis function is useful for control of master/slave synchronization. It\nblocks until the slave has read and applied all updates up to the\nspecified position in the master log. The return value is the number of\nlog events the slave had to wait for to advance to the specified\nposition. The function returns NULL if the slave SQL thread is not\nstarted, the slave\'s master information is not initialized, the\narguments are incorrect, or an error occurs. It returns -1 if the\ntimeout has been exceeded. If the slave SQL thread stops while\nMASTER_POS_WAIT() is waiting, the function returns NULL. If the slave\nis past the specified position, the function returns immediately.\n\nIf a timeout value is specified, MASTER_POS_WAIT() stops waiting when\ntimeout seconds have elapsed. timeout must be greater than 0; a zero or\nnegative timeout means no timeout.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/miscellaneous-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/miscellaneous-functions.html'),(27,'REGEXP',37,'Syntax:\nexpr REGEXP pat, expr RLIKE pat\n\nPerforms a pattern match of a string expression expr against a pattern\npat. The pattern can be an extended regular expression. The syntax for\nregular expressions is discussed in\nhttp://dev.mysql.com/doc/refman/5.5/en/regexp.html. Returns 1 if expr\nmatches pat; otherwise it returns 0. If either expr or pat is NULL, the\nresult is NULL. RLIKE is a synonym for REGEXP, provided for mSQL\ncompatibility.\n\nThe pattern need not be a literal string. For example, it can be\nspecified as a string expression or table column.\n\n*Note*: Because MySQL uses the C escape syntax in strings (for example,\n\"\\n\" to represent the newline character), you must double any \"\\\" that\nyou use in your REGEXP strings.\n\nREGEXP is not case sensitive, except when used with binary strings.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/regexp.html\n\n','mysql> SELECT \'Monty!\' REGEXP \'.*\';\n -> 1\nmysql> SELECT \'new*\\n*line\' REGEXP \'new\\\\*.\\\\*line\';\n -> 1\nmysql> SELECT \'a\' REGEXP \'A\', \'a\' REGEXP BINARY \'A\';\n -> 1 0\nmysql> SELECT \'a\' REGEXP \'^[a-d]\';\n -> 1\n','http://dev.mysql.com/doc/refman/5.5/en/regexp.html'),(28,'IF STATEMENT',23,'Syntax:\nIF search_condition THEN statement_list\n [ELSEIF search_condition THEN statement_list] ...\n [ELSE statement_list]\nEND IF\n\nThe IF statement for stored programs implements a basic conditional\nconstruct.\n\n*Note*: There is also an IF() function, which differs from the IF\nstatement described here. See\nhttp://dev.mysql.com/doc/refman/5.5/en/control-flow-functions.html. The\nIF statement can have THEN, ELSE, and ELSEIF clauses, and it is\nterminated with END IF.\n\nIf the search_condition evaluates to true, the corresponding THEN or\nELSEIF clause statement_list executes. If no search_condition matches,\nthe ELSE clause statement_list executes.\n\nEach statement_list consists of one or more SQL statements; an empty\nstatement_list is not permitted.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/if.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/if.html'),(29,'^',19,'Syntax:\n^\n\nBitwise XOR:\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/bit-functions.html\n\n','mysql> SELECT 1 ^ 1;\n -> 0\nmysql> SELECT 1 ^ 0;\n -> 1\nmysql> SELECT 11 ^ 3;\n -> 8\n','http://dev.mysql.com/doc/refman/5.5/en/bit-functions.html'),(30,'DROP VIEW',39,'Syntax:\nDROP VIEW [IF EXISTS]\n view_name [, view_name] ...\n [RESTRICT | CASCADE]\n\nDROP VIEW removes one or more views. You must have the DROP privilege\nfor each view. If any of the views named in the argument list do not\nexist, MySQL returns an error indicating by name which nonexisting\nviews it was unable to drop, but it also drops all of the views in the\nlist that do exist.\n\nThe IF EXISTS clause prevents an error from occurring for views that\ndon\'t exist. When this clause is given, a NOTE is generated for each\nnonexistent view. See [HELP SHOW WARNINGS].\n\nRESTRICT and CASCADE, if given, are parsed and ignored.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/drop-view.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/drop-view.html'),(31,'WITHIN',30,'Within(g1,g2)\n\nReturns 1 or 0 to indicate whether g1 is spatially within g2. This\ntests the opposite relationship as Contains().\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/functions-for-testing-spatial-relations-between-geometric-objects.html#functions-that-test-spatial-relationships-between-geometries\n\n','','http://dev.mysql.com/doc/refman/5.5/en/functions-for-testing-spatial-relations-between-geometric-objects.html#functions-that-test-spatial-relationships-between-geometries'),(32,'WEEK',31,'Syntax:\nWEEK(date[,mode])\n\nThis function returns the week number for date. The two-argument form\nof WEEK() enables you to specify whether the week starts on Sunday or\nMonday and whether the return value should be in the range from 0 to 53\nor from 1 to 53. If the mode argument is omitted, the value of the\ndefault_week_format system variable is used. See\nhttp://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','mysql> SELECT WEEK(\'2008-02-20\');\n -> 7\nmysql> SELECT WEEK(\'2008-02-20\',0);\n -> 7\nmysql> SELECT WEEK(\'2008-02-20\',1);\n -> 8\nmysql> SELECT WEEK(\'2008-12-31\',1);\n -> 53\n','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(33,'SHOW PLUGINS',26,'Syntax:\nSHOW PLUGINS\n\nSHOW PLUGINS displays information about server plugins. Plugin\ninformation is also available in the INFORMATION_SCHEMA.PLUGINS table.\nSee http://dev.mysql.com/doc/refman/5.5/en/plugins-table.html.\n\nExample of SHOW PLUGINS output:\n\nmysql> SHOW PLUGINS\\G\n*************************** 1. row ***************************\n Name: binlog\n Status: ACTIVE\n Type: STORAGE ENGINE\nLibrary: NULL\nLicense: GPL\n*************************** 2. row ***************************\n Name: CSV\n Status: ACTIVE\n Type: STORAGE ENGINE\nLibrary: NULL\nLicense: GPL\n*************************** 3. row ***************************\n Name: MEMORY\n Status: ACTIVE\n Type: STORAGE ENGINE\nLibrary: NULL\nLicense: GPL\n*************************** 4. row ***************************\n Name: MyISAM\n Status: ACTIVE\n Type: STORAGE ENGINE\nLibrary: NULL\nLicense: GPL\n...\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/show-plugins.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/show-plugins.html'),(34,'DROP FUNCTION UDF',21,'Syntax:\nDROP FUNCTION function_name\n\nThis statement drops the user-defined function (UDF) named\nfunction_name.\n\nTo drop a function, you must have the DELETE privilege for the mysql\ndatabase. This is because DROP FUNCTION removes a row from the\nmysql.func system table that records the function\'s name, type, and\nshared library name.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/drop-function-udf.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/drop-function-udf.html'),(35,'PREPARE',8,'Syntax:\nPREPARE stmt_name FROM preparable_stmt\n\nThe PREPARE statement prepares a statement and assigns it a name,\nstmt_name, by which to refer to the statement later. Statement names\nare not case sensitive. preparable_stmt is either a string literal or a\nuser variable that contains the text of the statement. The text must\nrepresent a single SQL statement, not multiple statements. Within the\nstatement, \"?\" characters can be used as parameter markers to indicate\nwhere data values are to be bound to the query later when you execute\nit. The \"?\" characters should not be enclosed within quotation marks,\neven if you intend to bind them to string values. Parameter markers can\nbe used only where data values should appear, not for SQL keywords,\nidentifiers, and so forth.\n\nIf a prepared statement with the given name already exists, it is\ndeallocated implicitly before the new statement is prepared. This means\nthat if the new statement contains an error and cannot be prepared, an\nerror is returned and no statement with the given name exists.\n\nA prepared statement is executed with EXECUTE and released with\nDEALLOCATE PREPARE.\n\nThe scope of a prepared statement is the session within which it is\ncreated. Other sessions cannot see it.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/prepare.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/prepare.html'),(36,'LOCK',8,'Syntax:\nLOCK TABLES\n tbl_name [[AS] alias] lock_type\n [, tbl_name [[AS] alias] lock_type] ...\n\nlock_type:\n READ [LOCAL]\n | [LOW_PRIORITY] WRITE\n\nUNLOCK TABLES\n\nMySQL enables client sessions to acquire table locks explicitly for the\npurpose of cooperating with other sessions for access to tables, or to\nprevent other sessions from modifying tables during periods when a\nsession requires exclusive access to them. A session can acquire or\nrelease locks only for itself. One session cannot acquire locks for\nanother session or release locks held by another session.\n\nLocks may be used to emulate transactions or to get more speed when\nupdating tables. This is explained in more detail later in this\nsection.\n\nLOCK TABLES explicitly acquires table locks for the current client\nsession. Table locks can be acquired for base tables or views. You must\nhave the LOCK TABLES privilege, and the SELECT privilege for each\nobject to be locked.\n\nFor view locking, LOCK TABLES adds all base tables used in the view to\nthe set of tables to be locked and locks them automatically. If you\nlock a table explicitly with LOCK TABLES, any tables used in triggers\nare also locked implicitly, as described in\nhttp://dev.mysql.com/doc/refman/5.5/en/lock-tables-and-triggers.html.\n\nUNLOCK TABLES explicitly releases any table locks held by the current\nsession. LOCK TABLES implicitly releases any table locks held by the\ncurrent session before acquiring new locks.\n\nAnother use for UNLOCK TABLES is to release the global read lock\nacquired with the FLUSH TABLES WITH READ LOCK statement, which enables\nyou to lock all tables in all databases. See [HELP FLUSH]. (This is a\nvery convenient way to get backups if you have a file system such as\nVeritas that can take snapshots in time.)\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/lock-tables.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/lock-tables.html'),(37,'UPDATEXML',37,'Syntax:\nUpdateXML(xml_target, xpath_expr, new_xml)\n\nThis function replaces a single portion of a given fragment of XML\nmarkup xml_target with a new XML fragment new_xml, and then returns the\nchanged XML. The portion of xml_target that is replaced matches an\nXPath expression xpath_expr supplied by the user. In MySQL 5.5, the\nXPath expression can contain at most 127 characters. (This limitation\nis lifted in MySQL 5.6.)\n\nIf no expression matching xpath_expr is found, or if multiple matches\nare found, the function returns the original xml_target XML fragment.\nAll three arguments should be strings.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/xml-functions.html\n\n','mysql> SELECT\n -> UpdateXML(\'<a><b>ccc</b><d></d></a>\', \'/a\', \'<e>fff</e>\') AS val1,\n -> UpdateXML(\'<a><b>ccc</b><d></d></a>\', \'/b\', \'<e>fff</e>\') AS val2,\n -> UpdateXML(\'<a><b>ccc</b><d></d></a>\', \'//b\', \'<e>fff</e>\') AS val3,\n -> UpdateXML(\'<a><b>ccc</b><d></d></a>\', \'/a/d\', \'<e>fff</e>\') AS val4,\n -> UpdateXML(\'<a><d></d><b>ccc</b><d></d></a>\', \'/a/d\', \'<e>fff</e>\') AS val5\n -> \\G\n\n*************************** 1. row ***************************\nval1: <e>fff</e>\nval2: <a><b>ccc</b><d></d></a>\nval3: <a><e>fff</e><d></d></a>\nval4: <a><b>ccc</b><e>fff</e></a>\nval5: <a><d></d><b>ccc</b><d></d></a>\n','http://dev.mysql.com/doc/refman/5.5/en/xml-functions.html'),(38,'RESET SLAVE',8,'Syntax:\nRESET SLAVE [ALL]\n\nRESET SLAVE makes the slave forget its replication position in the\nmaster\'s binary log. This statement is meant to be used for a clean\nstart: It deletes the master.info and relay-log.info files, all the\nrelay log files, and starts a new relay log file. To use RESET SLAVE,\nthe slave replication threads must be stopped (use STOP SLAVE if\nnecessary).\n\n*Note*: All relay log files are deleted, even if they have not been\ncompletely executed by the slave SQL thread. (This is a condition\nlikely to exist on a replication slave if you have issued a STOP SLAVE\nstatement or if the slave is highly loaded.)\n\nIn MySQL 5.5 (unlike the case in MySQL 5.1 and earlier), RESET SLAVE\ndoes not change any replication connection parameters such as master\nhost, master port, master user, or master password, which are retained\nin memory. This means that START SLAVE can be issued without requiring\na CHANGE MASTER TO statement following RESET SLAVE.\n\nIn MySQL 5.5.16 and later, you can use RESET SLAVE ALL to reset these\nconnection parameters (Bug #11809016). Connection parameters are also\nreset if the slave mysqld is shut down.\n\nIf the slave SQL thread was in the middle of replicating temporary\ntables when it was stopped, and RESET SLAVE is issued, these replicated\ntemporary tables are deleted on the slave.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/reset-slave.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/reset-slave.html'),(39,'SHOW BINARY LOGS',26,'Syntax:\nSHOW BINARY LOGS\nSHOW MASTER LOGS\n\nLists the binary log files on the server. This statement is used as\npart of the procedure described in [HELP PURGE BINARY LOGS], that shows\nhow to determine which logs can be purged.\n\nmysql> SHOW BINARY LOGS;\n+---------------+-----------+\n| Log_name | File_size |\n+---------------+-----------+\n| binlog.000015 | 724935 |\n| binlog.000016 | 733481 |\n+---------------+-----------+\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/show-binary-logs.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/show-binary-logs.html'),(40,'POLYGON',24,'Polygon(ls1,ls2,...)\n\nConstructs a Polygon value from a number of LineString or WKB\nLineString arguments. If any argument does not represent a LinearRing\n(that is, not a closed and simple LineString), the return value is\nNULL.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-values.html#gis-mysql-specific-functions\n\n','','http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-values.html#gis-mysql-specific-functions'),(41,'MINUTE',31,'Syntax:\nMINUTE(time)\n\nReturns the minute for time, in the range 0 to 59.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','mysql> SELECT MINUTE(\'2008-02-03 10:05:03\');\n -> 5\n','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(42,'DAY',31,'Syntax:\nDAY(date)\n\nDAY() is a synonym for DAYOFMONTH().\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(43,'MID',37,'Syntax:\nMID(str,pos,len)\n\nMID(str,pos,len) is a synonym for SUBSTRING(str,pos,len).\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/string-functions.html'),(44,'UUID',14,'Syntax:\nUUID()\n\nReturns a Universal Unique Identifier (UUID) generated according to\n\"DCE 1.1: Remote Procedure Call\" (Appendix A) CAE (Common Applications\nEnvironment) Specifications published by The Open Group in October 1997\n(Document Number C706,\nhttp://www.opengroup.org/public/pubs/catalog/c706.htm).\n\nA UUID is designed as a number that is globally unique in space and\ntime. Two calls to UUID() are expected to generate two different\nvalues, even if these calls are performed on two separate computers\nthat are not connected to each other.\n\nA UUID is a 128-bit number represented by a utf8 string of five\nhexadecimal numbers in aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee format:\n\no The first three numbers are generated from a timestamp.\n\no The fourth number preserves temporal uniqueness in case the timestamp\n value loses monotonicity (for example, due to daylight saving time).\n\no The fifth number is an IEEE 802 node number that provides spatial\n uniqueness. A random number is substituted if the latter is not\n available (for example, because the host computer has no Ethernet\n card, or we do not know how to find the hardware address of an\n interface on your operating system). In this case, spatial uniqueness\n cannot be guaranteed. Nevertheless, a collision should have very low\n probability.\n\n Currently, the MAC address of an interface is taken into account only\n on FreeBSD and Linux. On other operating systems, MySQL uses a\n randomly generated 48-bit number.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/miscellaneous-functions.html\n\n','mysql> SELECT UUID();\n -> \'6ccd780c-baba-1026-9564-0040f4311e29\'\n','http://dev.mysql.com/doc/refman/5.5/en/miscellaneous-functions.html'),(45,'LINESTRING',24,'LineString(pt1,pt2,...)\n\nConstructs a LineString value from a number of Point or WKB Point\narguments. If the number of arguments is less than two, the return\nvalue is NULL.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-values.html#gis-mysql-specific-functions\n\n','','http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-values.html#gis-mysql-specific-functions'),(46,'SLEEP',14,'Syntax:\nSLEEP(duration)\n\nSleeps (pauses) for the number of seconds given by the duration\nargument, then returns 0. If SLEEP() is interrupted, it returns 1. The\nduration may have a fractional part given in microseconds.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/miscellaneous-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/miscellaneous-functions.html'),(47,'CONNECTION_ID',17,'Syntax:\nCONNECTION_ID()\n\nReturns the connection ID (thread ID) for the connection. Every\nconnection has an ID that is unique among the set of currently\nconnected clients.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/information-functions.html\n\n','mysql> SELECT CONNECTION_ID();\n -> 23786\n','http://dev.mysql.com/doc/refman/5.5/en/information-functions.html'),(48,'DELETE',27,'Syntax:\nSingle-table syntax:\n\nDELETE [LOW_PRIORITY] [QUICK] [IGNORE] FROM tbl_name\n [WHERE where_condition]\n [ORDER BY ...]\n [LIMIT row_count]\n\nMultiple-table syntax:\n\nDELETE [LOW_PRIORITY] [QUICK] [IGNORE]\n tbl_name[.*] [, tbl_name[.*]] ...\n FROM table_references\n [WHERE where_condition]\n\nOr:\n\nDELETE [LOW_PRIORITY] [QUICK] [IGNORE]\n FROM tbl_name[.*] [, tbl_name[.*]] ...\n USING table_references\n [WHERE where_condition]\n\nFor the single-table syntax, the DELETE statement deletes rows from\ntbl_name and returns a count of the number of deleted rows. This count\ncan be obtained by calling the ROW_COUNT() function (see\nhttp://dev.mysql.com/doc/refman/5.5/en/information-functions.html). The\nWHERE clause, if given, specifies the conditions that identify which\nrows to delete. With no WHERE clause, all rows are deleted. If the\nORDER BY clause is specified, the rows are deleted in the order that is\nspecified. The LIMIT clause places a limit on the number of rows that\ncan be deleted.\n\nFor the multiple-table syntax, DELETE deletes from each tbl_name the\nrows that satisfy the conditions. In this case, ORDER BY and LIMIT\ncannot be used.\n\nwhere_condition is an expression that evaluates to true for each row to\nbe deleted. It is specified as described in\nhttp://dev.mysql.com/doc/refman/5.5/en/select.html.\n\nCurrently, you cannot delete from a table and select from the same\ntable in a subquery.\n\nYou need the DELETE privilege on a table to delete rows from it. You\nneed only the SELECT privilege for any columns that are only read, such\nas those named in the WHERE clause.\n\nAs stated, a DELETE statement with no WHERE clause deletes all rows. A\nfaster way to do this, when you do not need to know the number of\ndeleted rows, is to use TRUNCATE TABLE. However, within a transaction\nor if you have a lock on the table, TRUNCATE TABLE cannot be used\nwhereas DELETE can. See [HELP TRUNCATE TABLE], and [HELP LOCK].\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/delete.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/delete.html'),(49,'ROUND',4,'Syntax:\nROUND(X), ROUND(X,D)\n\nRounds the argument X to D decimal places. The rounding algorithm\ndepends on the data type of X. D defaults to 0 if not specified. D can\nbe negative to cause D digits left of the decimal point of the value X\nto become zero.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html\n\n','mysql> SELECT ROUND(-1.23);\n -> -1\nmysql> SELECT ROUND(-1.58);\n -> -2\nmysql> SELECT ROUND(1.58);\n -> 2\nmysql> SELECT ROUND(1.298, 1);\n -> 1.3\nmysql> SELECT ROUND(1.298, 0);\n -> 1\nmysql> SELECT ROUND(23.298, -1);\n -> 20\n','http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html'),(50,'NULLIF',7,'Syntax:\nNULLIF(expr1,expr2)\n\nReturns NULL if expr1 = expr2 is true, otherwise returns expr1. This is\nthe same as CASE WHEN expr1 = expr2 THEN NULL ELSE expr1 END.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/control-flow-functions.html\n\n','mysql> SELECT NULLIF(1,1);\n -> NULL\nmysql> SELECT NULLIF(1,2);\n -> 1\n','http://dev.mysql.com/doc/refman/5.5/en/control-flow-functions.html'),(51,'CLOSE',23,'Syntax:\nCLOSE cursor_name\n\nThis statement closes a previously opened cursor. For an example, see\nhttp://dev.mysql.com/doc/refman/5.5/en/cursors.html.\n\nAn error occurs if the cursor is not open.\n\nIf not closed explicitly, a cursor is closed at the end of the BEGIN\n... END block in which it was declared.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/close.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/close.html'),(52,'STOP SLAVE',8,'Syntax:\nSTOP SLAVE [thread_types]\n\nthread_types:\n [thread_type [, thread_type] ... ]\n\nthread_type: IO_THREAD | SQL_THREAD\n\nStops the slave threads. STOP SLAVE requires the SUPER privilege.\nRecommended best practice is to execute STOP SLAVE on the slave before\nstopping the slave server (see\nhttp://dev.mysql.com/doc/refman/5.5/en/server-shutdown.html, for more\ninformation).\n\nWhen using the row-based logging format: You should execute STOP SLAVE\non the slave prior to shutting down the slave server if you are\nreplicating any tables that use a nontransactional storage engine (see\nthe Note later in this section). In MySQL 5.5.9 and later, you can also\nuse STOP SLAVE SQL_THREAD for this purpose.\n\nLike START SLAVE, this statement may be used with the IO_THREAD and\nSQL_THREAD options to name the thread or threads to be stopped.\n\n*Note*: In MySQL 5.5, STOP SLAVE waits until the current replication\nevent group affecting one or more non-transactional tables has finished\nexecuting (if there is any such replication group), or until the user\nissues a KILL QUERY or KILL CONNECTION statement. (Bug #319, Bug\n#38205)\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/stop-slave.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/stop-slave.html'),(53,'TIMEDIFF',31,'Syntax:\nTIMEDIFF(expr1,expr2)\n\nTIMEDIFF() returns expr1 - expr2 expressed as a time value. expr1 and\nexpr2 are time or date-and-time expressions, but both must be of the\nsame type.\n\nThe result returned by TIMEDIFF() is limited to the range allowed for\nTIME values. Alternatively, you can use either of the functions\nTIMESTAMPDIFF() and UNIX_TIMESTAMP(), both of which return integers.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','mysql> SELECT TIMEDIFF(\'2000:01:01 00:00:00\',\n -> \'2000:01:01 00:00:00.000001\');\n -> \'-00:00:00.000001\'\nmysql> SELECT TIMEDIFF(\'2008-12-31 23:59:59.000001\',\n -> \'2008-12-30 01:01:01.000002\');\n -> \'46:58:57.999999\'\n','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(54,'REPLACE FUNCTION',37,'Syntax:\nREPLACE(str,from_str,to_str)\n\nReturns the string str with all occurrences of the string from_str\nreplaced by the string to_str. REPLACE() performs a case-sensitive\nmatch when searching for from_str.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html\n\n','mysql> SELECT REPLACE(\'www.mysql.com\', \'w\', \'Ww\');\n -> \'WwWwWw.mysql.com\'\n','http://dev.mysql.com/doc/refman/5.5/en/string-functions.html'),(55,'USE',28,'Syntax:\nUSE db_name\n\nThe USE db_name statement tells MySQL to use the db_name database as\nthe default (current) database for subsequent statements. The database\nremains the default until the end of the session or another USE\nstatement is issued:\n\nUSE db1;\nSELECT COUNT(*) FROM mytable; # selects from db1.mytable\nUSE db2;\nSELECT COUNT(*) FROM mytable; # selects from db2.mytable\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/use.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/use.html'),(56,'LINEFROMTEXT',3,'LineFromText(wkt[,srid]), LineStringFromText(wkt[,srid])\n\nConstructs a LINESTRING value using its WKT representation and SRID.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-values.html#gis-wkt-functions\n\n','','http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-values.html#gis-wkt-functions'),(57,'CASE OPERATOR',7,'Syntax:\nCASE value WHEN [compare_value] THEN result [WHEN [compare_value] THEN\nresult ...] [ELSE result] END\n\nCASE WHEN [condition] THEN result [WHEN [condition] THEN result ...]\n[ELSE result] END\n\nThe first version returns the result where value=compare_value. The\nsecond version returns the result for the first condition that is true.\nIf there was no matching result value, the result after ELSE is\nreturned, or NULL if there is no ELSE part.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/control-flow-functions.html\n\n','mysql> SELECT CASE 1 WHEN 1 THEN \'one\'\n -> WHEN 2 THEN \'two\' ELSE \'more\' END;\n -> \'one\'\nmysql> SELECT CASE WHEN 1>0 THEN \'true\' ELSE \'false\' END;\n -> \'true\'\nmysql> SELECT CASE BINARY \'B\'\n -> WHEN \'a\' THEN 1 WHEN \'b\' THEN 2 END;\n -> NULL\n','http://dev.mysql.com/doc/refman/5.5/en/control-flow-functions.html'),(58,'SHOW MASTER STATUS',26,'Syntax:\nSHOW MASTER STATUS\n\nThis statement provides status information about the binary log files\nof the master. It requires either the SUPER or REPLICATION CLIENT\nprivilege.\n\nExample:\n\nmysql> SHOW MASTER STATUS;\n+---------------+----------+--------------+------------------+\n| File | Position | Binlog_Do_DB | Binlog_Ignore_DB |\n+---------------+----------+--------------+------------------+\n| mysql-bin.003 | 73 | test | manual,mysql |\n+---------------+----------+--------------+------------------+\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/show-master-status.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/show-master-status.html'),(59,'ADDTIME',31,'Syntax:\nADDTIME(expr1,expr2)\n\nADDTIME() adds expr2 to expr1 and returns the result. expr1 is a time\nor datetime expression, and expr2 is a time expression.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','mysql> SELECT ADDTIME(\'2007-12-31 23:59:59.999999\', \'1 1:1:1.000002\');\n -> \'2008-01-02 01:01:01.000001\'\nmysql> SELECT ADDTIME(\'01:00:00.999999\', \'02:00:00.999998\');\n -> \'03:00:01.999997\'\n','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(60,'SPATIAL',34,'For MyISAM tables, MySQL can create spatial indexes using syntax\nsimilar to that for creating regular indexes, but extended with the\nSPATIAL keyword. Currently, columns in spatial indexes must be declared\nNOT NULL. The following examples demonstrate how to create spatial\nindexes:\n\no With CREATE TABLE:\n\nCREATE TABLE geom (g GEOMETRY NOT NULL, SPATIAL INDEX(g)) ENGINE=MyISAM;\n\no With ALTER TABLE:\n\nALTER TABLE geom ADD SPATIAL INDEX(g);\n\no With CREATE INDEX:\n\nCREATE SPATIAL INDEX sp_index ON geom (g);\n\nFor MyISAM tables, SPATIAL INDEX creates an R-tree index. For storage\nengines that support nonspatial indexing of spatial columns, the engine\ncreates a B-tree index. A B-tree index on spatial values will be useful\nfor exact-value lookups, but not for range scans.\n\nFor more information on indexing spatial columns, see [HELP CREATE\nINDEX].\n\nTo drop spatial indexes, use ALTER TABLE or DROP INDEX:\n\no With ALTER TABLE:\n\nALTER TABLE geom DROP INDEX g;\n\no With DROP INDEX:\n\nDROP INDEX sp_index ON geom;\n\nExample: Suppose that a table geom contains more than 32,000\ngeometries, which are stored in the column g of type GEOMETRY. The\ntable also has an AUTO_INCREMENT column fid for storing object ID\nvalues.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-indexes.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-indexes.html'),(61,'TO_SECONDS',31,'Syntax:\nTO_SECONDS(expr)\n\nGiven a date or datetime expr, returns a the number of seconds since\nthe year 0. If expr is not a valid date or datetime value, returns\nNULL.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','mysql> SELECT TO_SECONDS(950501);\n -> 62966505600\nmysql> SELECT TO_SECONDS(\'2009-11-29\');\n -> 63426672000\nmysql> SELECT TO_SECONDS(\'2009-11-29 13:43:32\');\n -> 63426721412\nmysql> SELECT TO_SECONDS( NOW() );\n -> 63426721458\n','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(62,'TIMESTAMPDIFF',31,'Syntax:\nTIMESTAMPDIFF(unit,datetime_expr1,datetime_expr2)\n\nReturns datetime_expr2 - datetime_expr1, where datetime_expr1 and\ndatetime_expr2 are date or datetime expressions. One expression may be\na date and the other a datetime; a date value is treated as a datetime\nhaving the time part \'00:00:00\' where necessary. The unit for the\nresult (an integer) is given by the unit argument. The legal values for\nunit are the same as those listed in the description of the\nTIMESTAMPADD() function.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','mysql> SELECT TIMESTAMPDIFF(MONTH,\'2003-02-01\',\'2003-05-01\');\n -> 3\nmysql> SELECT TIMESTAMPDIFF(YEAR,\'2002-05-01\',\'2001-01-01\');\n -> -1\nmysql> SELECT TIMESTAMPDIFF(MINUTE,\'2003-02-01\',\'2003-05-01 12:05:55\');\n -> 128885\n','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(63,'UPPER',37,'Syntax:\nUPPER(str)\n\nReturns the string str with all characters changed to uppercase\naccording to the current character set mapping. The default is latin1\n(cp1252 West European).\n\nmysql> SELECT UPPER(\'Hej\');\n -> \'HEJ\'\n\nSee the description of LOWER() for information that also applies to\nUPPER(), such as information about how to perform lettercase conversion\nof binary strings (BINARY, VARBINARY, BLOB) for which these functions\nare ineffective.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/string-functions.html'),(64,'FROM_UNIXTIME',31,'Syntax:\nFROM_UNIXTIME(unix_timestamp), FROM_UNIXTIME(unix_timestamp,format)\n\nReturns a representation of the unix_timestamp argument as a value in\n\'YYYY-MM-DD HH:MM:SS\' or YYYYMMDDHHMMSS.uuuuuu format, depending on\nwhether the function is used in a string or numeric context. The value\nis expressed in the current time zone. unix_timestamp is an internal\ntimestamp value such as is produced by the UNIX_TIMESTAMP() function.\n\nIf format is given, the result is formatted according to the format\nstring, which is used the same way as listed in the entry for the\nDATE_FORMAT() function.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','mysql> SELECT FROM_UNIXTIME(1196440219);\n -> \'2007-11-30 10:30:19\'\nmysql> SELECT FROM_UNIXTIME(1196440219) + 0;\n -> 20071130103019.000000\nmysql> SELECT FROM_UNIXTIME(UNIX_TIMESTAMP(),\n -> \'%Y %D %M %h:%i:%s %x\');\n -> \'2007 30th November 10:30:59 2007\'\n','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(65,'MEDIUMBLOB',22,'MEDIUMBLOB\n\nA BLOB column with a maximum length of 16,777,215 (224 - 1) bytes. Each\nMEDIUMBLOB value is stored using a 3-byte length prefix that indicates\nthe number of bytes in the value.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-type-overview.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/string-type-overview.html'),(66,'SHA2',12,'Syntax:\nSHA2(str, hash_length)\n\nCalculates the SHA-2 family of hash functions (SHA-224, SHA-256,\nSHA-384, and SHA-512). The first argument is the cleartext string to be\nhashed. The second argument indicates the desired bit length of the\nresult, which must have a value of 224, 256, 384, 512, or 0 (which is\nequivalent to 256). If either argument is NULL or the hash length is\nnot one of the permitted values, the return value is NULL. Otherwise,\nthe function result is a hash value containing the desired number of\nbits. See the notes at the beginning of this section about storing hash\nvalues efficiently.\n\nAs of MySQL 5.5.6, the return value is a nonbinary string in the\nconnection character set. Before 5.5.6, the return value is a binary\nstring; see the notes at the beginning of this section about using the\nvalue as a nonbinary string.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/encryption-functions.html\n\n','mysql> SELECT SHA2(\'abc\', 224);\n -> \'23097d223405d8228642a477bda255b32aadbce4bda0b3f7e36c9da7\'\n','http://dev.mysql.com/doc/refman/5.5/en/encryption-functions.html'),(67,'IFNULL',7,'Syntax:\nIFNULL(expr1,expr2)\n\nIf expr1 is not NULL, IFNULL() returns expr1; otherwise it returns\nexpr2. IFNULL() returns a numeric or string value, depending on the\ncontext in which it is used.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/control-flow-functions.html\n\n','mysql> SELECT IFNULL(1,0);\n -> 1\nmysql> SELECT IFNULL(NULL,10);\n -> 10\nmysql> SELECT IFNULL(1/0,10);\n -> 10\nmysql> SELECT IFNULL(1/0,\'yes\');\n -> \'yes\'\n','http://dev.mysql.com/doc/refman/5.5/en/control-flow-functions.html'),(68,'SHOW FUNCTION CODE',26,'Syntax:\nSHOW FUNCTION CODE func_name\n\nThis statement is similar to SHOW PROCEDURE CODE but for stored\nfunctions. See [HELP SHOW PROCEDURE CODE].\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/show-function-code.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/show-function-code.html'),(69,'SHOW ERRORS',26,'Syntax:\nSHOW ERRORS [LIMIT [offset,] row_count]\nSHOW COUNT(*) ERRORS\n\nThis statement is similar to SHOW WARNINGS, except that it displays\ninformation only for errors, rather than for errors, warnings, and\nnotes.\n\nThe LIMIT clause has the same syntax as for the SELECT statement. See\nhttp://dev.mysql.com/doc/refman/5.5/en/select.html.\n\nThe SHOW COUNT(*) ERRORS statement displays the number of errors. You\ncan also retrieve this number from the error_count variable:\n\nSHOW COUNT(*) ERRORS;\nSELECT @@error_count;\n\nSHOW ERRORS and error_count apply only to errors, not warnings or\nnotes. In other respects, they are similar to SHOW WARNINGS and\nwarning_count. In particular, SHOW ERRORS cannot display information\nfor more than max_error_count messages, and error_count can exceed the\nvalue of max_error_count if the number of errors exceeds\nmax_error_count.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/show-errors.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/show-errors.html'),(70,'LEAST',18,'Syntax:\nLEAST(value1,value2,...)\n\nWith two or more arguments, returns the smallest (minimum-valued)\nargument. The arguments are compared using the following rules:\n\no If any argument is NULL, the result is NULL. No comparison is needed.\n\no If the return value is used in an INTEGER context or all arguments\n are integer-valued, they are compared as integers.\n\no If the return value is used in a REAL context or all arguments are\n real-valued, they are compared as reals.\n\no If the arguments comprise a mix of numbers and strings, they are\n compared as numbers.\n\no If any argument is a nonbinary (character) string, the arguments are\n compared as nonbinary strings.\n\no In all other cases, the arguments are compared as binary strings.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/comparison-operators.html\n\n','mysql> SELECT LEAST(2,0);\n -> 0\nmysql> SELECT LEAST(34.0,3.0,5.0,767.0);\n -> 3.0\nmysql> SELECT LEAST(\'B\',\'A\',\'C\');\n -> \'A\'\n','http://dev.mysql.com/doc/refman/5.5/en/comparison-operators.html'),(71,'=',18,'=\n\nEqual:\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/comparison-operators.html\n\n','mysql> SELECT 1 = 0;\n -> 0\nmysql> SELECT \'0\' = 0;\n -> 1\nmysql> SELECT \'0.0\' = 0;\n -> 1\nmysql> SELECT \'0.01\' = 0;\n -> 0\nmysql> SELECT \'.01\' = 0.01;\n -> 1\n','http://dev.mysql.com/doc/refman/5.5/en/comparison-operators.html'),(72,'REVERSE',37,'Syntax:\nREVERSE(str)\n\nReturns the string str with the order of the characters reversed.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html\n\n','mysql> SELECT REVERSE(\'abc\');\n -> \'cba\'\n','http://dev.mysql.com/doc/refman/5.5/en/string-functions.html'),(73,'ISNULL',18,'Syntax:\nISNULL(expr)\n\nIf expr is NULL, ISNULL() returns 1, otherwise it returns 0.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/comparison-operators.html\n\n','mysql> SELECT ISNULL(1+1);\n -> 0\nmysql> SELECT ISNULL(1/0);\n -> 1\n','http://dev.mysql.com/doc/refman/5.5/en/comparison-operators.html'),(74,'BINARY',22,'BINARY(M)\n\nThe BINARY type is similar to the CHAR type, but stores binary byte\nstrings rather than nonbinary character strings. M represents the\ncolumn length in bytes.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-type-overview.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/string-type-overview.html'),(75,'BLOB DATA TYPE',22,'A BLOB is a binary large object that can hold a variable amount of\ndata. The four BLOB types are TINYBLOB, BLOB, MEDIUMBLOB, and LONGBLOB.\nThese differ only in the maximum length of the values they can hold.\nThe four TEXT types are TINYTEXT, TEXT, MEDIUMTEXT, and LONGTEXT. These\ncorrespond to the four BLOB types and have the same maximum lengths and\nstorage requirements. See\nhttp://dev.mysql.com/doc/refman/5.5/en/storage-requirements.html.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/blob.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/blob.html'),(76,'BOUNDARY',36,'Boundary(g)\n\nReturns a geometry that is the closure of the combinatorial boundary of\nthe geometry value g.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/geometry-property-functions.html#general-geometry-property-functions\n\n','','http://dev.mysql.com/doc/refman/5.5/en/geometry-property-functions.html#general-geometry-property-functions'),(77,'CREATE USER',10,'Syntax:\nCREATE USER user_specification\n [, user_specification] ...\n\nuser_specification:\n user\n [\n IDENTIFIED BY [PASSWORD] \'password\'\n | IDENTIFIED WITH auth_plugin [AS \'auth_string\']\n ]\n\nThe CREATE USER statement creates new MySQL accounts. To use it, you\nmust have the global CREATE USER privilege or the INSERT privilege for\nthe mysql database. For each account, CREATE USER creates a new row in\nthe mysql.user table and assigns the account no privileges. An error\noccurs if the account already exists.\n\nEach account name uses the format described in\nhttp://dev.mysql.com/doc/refman/5.5/en/account-names.html. For example:\n\nCREATE USER \'jeffrey\'@\'localhost\' IDENTIFIED BY \'mypass\';\n\nIf you specify only the user name part of the account name, a host name\npart of \'%\' is used.\n\nThe user specification may indicate how the user should authenticate\nwhen connecting to the server:\n\no To enable the user to connect with no password (which is insecure),\n include no IDENTIFIED BY clause:\n\nCREATE USER \'jeffrey\'@\'localhost\';\n\n In this case, the account uses built-in authentication and clients\n must provide no password.\n\no To assign a password, use IDENTIFIED BY with the literal plaintext\n password value:\n\nCREATE USER \'jeffrey\'@\'localhost\' IDENTIFIED BY \'mypass\';\n\n The account uses built-in authentication and clients must match the\n given password.\n\no To avoid specifying the plaintext password if you know its hash value\n (the value that PASSWORD() would return for the password), specify\n the hash value preceded by the keyword PASSWORD:\n\nCREATE USER \'jeffrey\'@\'localhost\'\nIDENTIFIED BY PASSWORD \'*90E462C37378CED12064BB3388827D2BA3A9B689\';\n\n The account uses built-in authentication and clients must match the\n given password.\n\no To authenticate the account using a specific authentication plugin,\n use IDENTIFIED WITH, where auth_plugin is the plugin name. It can be\n an unquoted name or a quoted string literal. \'auth_string\' is an\n optional quoted string literal to pass to the plugin. The plugin\n interprets the meaning of the string, so its format is plugin\n specific. Consult the documentation for a given plugin for\n information about the authentication string values it accepts.\n\nCREATE USER \'jeffrey\'@\'localhost\'\nIDENTIFIED WITH my_auth_plugin;\n\n For connections that use this account, the server invokes the named\n plugin and clients must provide credentials as required for the\n authentication method that the plugin implements. If the server\n cannot find the plugin, either at account-creation time or connect\n time, an error occurs. IDENTIFIED WITH can be used as of MySQL 5.5.7.\n\nThe IDENTIFIED BY and IDENTIFIED WITH clauses are mutually exclusive,\nso at most one of them can be specified for a given user.\n\nFor additional information about setting passwords, see\nhttp://dev.mysql.com/doc/refman/5.5/en/assigning-passwords.html.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/create-user.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/create-user.html'),(78,'POINT',24,'Point(x,y)\n\nConstructs a Point using its coordinates.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-values.html#gis-mysql-specific-functions\n\n','','http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-values.html#gis-mysql-specific-functions'),(79,'CURRENT_USER',17,'Syntax:\nCURRENT_USER, CURRENT_USER()\n\nReturns the user name and host name combination for the MySQL account\nthat the server used to authenticate the current client. This account\ndetermines your access privileges. The return value is a string in the\nutf8 character set.\n\nThe value of CURRENT_USER() can differ from the value of USER().\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/information-functions.html\n\n','mysql> SELECT USER();\n -> \'davida@localhost\'\nmysql> SELECT * FROM mysql.user;\nERROR 1044: Access denied for user \'\'@\'localhost\' to\ndatabase \'mysql\'\nmysql> SELECT CURRENT_USER();\n -> \'@localhost\'\n','http://dev.mysql.com/doc/refman/5.5/en/information-functions.html'),(80,'LCASE',37,'Syntax:\nLCASE(str)\n\nLCASE() is a synonym for LOWER().\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/string-functions.html'),(81,'<=',18,'Syntax:\n<=\n\nLess than or equal:\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/comparison-operators.html\n\n','mysql> SELECT 0.1 <= 2;\n -> 1\n','http://dev.mysql.com/doc/refman/5.5/en/comparison-operators.html'),(82,'SHOW PROFILES',26,'Syntax:\nSHOW PROFILES\n\nThe SHOW PROFILES statement, together with SHOW PROFILE, displays\nprofiling information that indicates resource usage for statements\nexecuted during the course of the current session. For more\ninformation, see [HELP SHOW PROFILE].\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/show-profiles.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/show-profiles.html'),(83,'UPDATE',27,'Syntax:\nSingle-table syntax:\n\nUPDATE [LOW_PRIORITY] [IGNORE] table_reference\n SET col_name1={expr1|DEFAULT} [, col_name2={expr2|DEFAULT}] ...\n [WHERE where_condition]\n [ORDER BY ...]\n [LIMIT row_count]\n\nMultiple-table syntax:\n\nUPDATE [LOW_PRIORITY] [IGNORE] table_references\n SET col_name1={expr1|DEFAULT} [, col_name2={expr2|DEFAULT}] ...\n [WHERE where_condition]\n\nFor the single-table syntax, the UPDATE statement updates columns of\nexisting rows in the named table with new values. The SET clause\nindicates which columns to modify and the values they should be given.\nEach value can be given as an expression, or the keyword DEFAULT to set\na column explicitly to its default value. The WHERE clause, if given,\nspecifies the conditions that identify which rows to update. With no\nWHERE clause, all rows are updated. If the ORDER BY clause is\nspecified, the rows are updated in the order that is specified. The\nLIMIT clause places a limit on the number of rows that can be updated.\n\nFor the multiple-table syntax, UPDATE updates rows in each table named\nin table_references that satisfy the conditions. In this case, ORDER BY\nand LIMIT cannot be used.\n\nwhere_condition is an expression that evaluates to true for each row to\nbe updated. For expression syntax, see\nhttp://dev.mysql.com/doc/refman/5.5/en/expressions.html.\n\ntable_references and where_condition are is specified as described in\nhttp://dev.mysql.com/doc/refman/5.5/en/select.html.\n\nYou need the UPDATE privilege only for columns referenced in an UPDATE\nthat are actually updated. You need only the SELECT privilege for any\ncolumns that are read but not modified.\n\nThe UPDATE statement supports the following modifiers:\n\no With the LOW_PRIORITY keyword, execution of the UPDATE is delayed\n until no other clients are reading from the table. This affects only\n storage engines that use only table-level locking (such as MyISAM,\n MEMORY, and MERGE).\n\no With the IGNORE keyword, the update statement does not abort even if\n errors occur during the update. Rows for which duplicate-key\n conflicts occur are not updated. Rows for which columns are updated\n to values that would cause data conversion errors are updated to the\n closest valid values instead.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/update.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/update.html'),(84,'IS NOT NULL',18,'Syntax:\nIS NOT NULL\n\nTests whether a value is not NULL.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/comparison-operators.html\n\n','mysql> SELECT 1 IS NOT NULL, 0 IS NOT NULL, NULL IS NOT NULL;\n -> 1, 1, 0\n','http://dev.mysql.com/doc/refman/5.5/en/comparison-operators.html'),(85,'CASE STATEMENT',23,'Syntax:\nCASE case_value\n WHEN when_value THEN statement_list\n [WHEN when_value THEN statement_list] ...\n [ELSE statement_list]\nEND CASE\n\nOr:\n\nCASE\n WHEN search_condition THEN statement_list\n [WHEN search_condition THEN statement_list] ...\n [ELSE statement_list]\nEND CASE\n\nThe CASE statement for stored programs implements a complex conditional\nconstruct.\n\n*Note*: There is also a CASE expression, which differs from the CASE\nstatement described here. See\nhttp://dev.mysql.com/doc/refman/5.5/en/control-flow-functions.html. The\nCASE statement cannot have an ELSE NULL clause, and it is terminated\nwith END CASE instead of END.\n\nFor the first syntax, case_value is an expression. This value is\ncompared to the when_value expression in each WHEN clause until one of\nthem is equal. When an equal when_value is found, the corresponding\nTHEN clause statement_list executes. If no when_value is equal, the\nELSE clause statement_list executes, if there is one.\n\nThis syntax cannot be used to test for equality with NULL because NULL\n= NULL is false. See\nhttp://dev.mysql.com/doc/refman/5.5/en/working-with-null.html.\n\nFor the second syntax, each WHEN clause search_condition expression is\nevaluated until one is true, at which point its corresponding THEN\nclause statement_list executes. If no search_condition is equal, the\nELSE clause statement_list executes, if there is one.\n\nIf no when_value or search_condition matches the value tested and the\nCASE statement contains no ELSE clause, a Case not found for CASE\nstatement error results.\n\nEach statement_list consists of one or more SQL statements; an empty\nstatement_list is not permitted.\n\nTo handle situations where no value is matched by any WHEN clause, use\nan ELSE containing an empty BEGIN ... END block, as shown in this\nexample. (The indentation used here in the ELSE clause is for purposes\nof clarity only, and is not otherwise significant.)\n\nDELIMITER |\n\nCREATE PROCEDURE p()\n BEGIN\n DECLARE v INT DEFAULT 1;\n\n CASE v\n WHEN 2 THEN SELECT v;\n WHEN 3 THEN SELECT 0;\n ELSE\n BEGIN\n END;\n END CASE;\n END;\n |\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/case.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/case.html'),(86,'EXECUTE STATEMENT',8,'Syntax:\nEXECUTE stmt_name\n [USING @var_name [, @var_name] ...]\n\nAfter preparing a statement with PREPARE, you execute it with an\nEXECUTE statement that refers to the prepared statement name. If the\nprepared statement contains any parameter markers, you must supply a\nUSING clause that lists user variables containing the values to be\nbound to the parameters. Parameter values can be supplied only by user\nvariables, and the USING clause must name exactly as many variables as\nthe number of parameter markers in the statement.\n\nYou can execute a given prepared statement multiple times, passing\ndifferent variables to it or setting the variables to different values\nbefore each execution.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/execute.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/execute.html'),(87,'DROP INDEX',39,'Syntax:\nDROP [ONLINE|OFFLINE] INDEX index_name ON tbl_name\n\nDROP INDEX drops the index named index_name from the table tbl_name.\nThis statement is mapped to an ALTER TABLE statement to drop the index.\nSee [HELP ALTER TABLE].\n\nTo drop a primary key, the index name is always PRIMARY, which must be\nspecified as a quoted identifier because PRIMARY is a reserved word:\n\nDROP INDEX `PRIMARY` ON t;\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/drop-index.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/drop-index.html'),(88,'MATCH AGAINST',37,'Syntax:\nMATCH (col1,col2,...) AGAINST (expr [search_modifier])\n\nMySQL has support for full-text indexing and searching:\n\no A full-text index in MySQL is an index of type FULLTEXT.\n\no Full-text indexes can be used only with MyISAM tables, and can be\n created only for CHAR, VARCHAR, or TEXT columns.\n\no A FULLTEXT index definition can be given in the CREATE TABLE\n statement when a table is created, or added later using ALTER TABLE\n or CREATE INDEX.\n\no For large data sets, it is much faster to load your data into a table\n that has no FULLTEXT index and then create the index after that, than\n to load data into a table that has an existing FULLTEXT index.\n\nFull-text searching is performed using MATCH() ... AGAINST syntax.\nMATCH() takes a comma-separated list that names the columns to be\nsearched. AGAINST takes a string to search for, and an optional\nmodifier that indicates what type of search to perform. The search\nstring must be a literal string, not a variable or a column name. There\nare three types of full-text searches:\n\no A natural language search interprets the search string as a phrase in\n natural human language (a phrase in free text). There are no special\n operators. The stopword list applies. In addition, words that are\n present in 50% or more of the rows are considered common and do not\n match.\n\n Full-text searches are natural language searches if the IN NATURAL\n LANGUAGE MODE modifier is given or if no modifier is given. For more\n information, see\n http://dev.mysql.com/doc/refman/5.5/en/fulltext-natural-language.html\n .\n\no A boolean search interprets the search string using the rules of a\n special query language. The string contains the words to search for.\n It can also contain operators that specify requirements such that a\n word must be present or absent in matching rows, or that it should be\n weighted higher or lower than usual. Common words such as \"some\" or\n \"then\" are stopwords and do not match if present in the search\n string. The IN BOOLEAN MODE modifier specifies a boolean search. For\n more information, see\n http://dev.mysql.com/doc/refman/5.5/en/fulltext-boolean.html.\n\no A query expansion search is a modification of a natural language\n search. The search string is used to perform a natural language\n search. Then words from the most relevant rows returned by the search\n are added to the search string and the search is done again. The\n query returns the rows from the second search. The IN NATURAL\n LANGUAGE MODE WITH QUERY EXPANSION or WITH QUERY EXPANSION modifier\n specifies a query expansion search. For more information, see\n http://dev.mysql.com/doc/refman/5.5/en/fulltext-query-expansion.html.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/fulltext-search.html\n\n','mysql> SELECT id, body, MATCH (title,body) AGAINST\n -> (\'Security implications of running MySQL as root\'\n -> IN NATURAL LANGUAGE MODE) AS score\n -> FROM articles WHERE MATCH (title,body) AGAINST\n -> (\'Security implications of running MySQL as root\'\n -> IN NATURAL LANGUAGE MODE);\n+----+-------------------------------------+-----------------+\n| id | body | score |\n+----+-------------------------------------+-----------------+\n| 4 | 1. Never run mysqld as root. 2. ... | 1.5219271183014 |\n| 6 | When configured properly, MySQL ... | 1.3114095926285 |\n+----+-------------------------------------+-----------------+\n2 rows in set (0.00 sec)\n','http://dev.mysql.com/doc/refman/5.5/en/fulltext-search.html'),(89,'CREATE EVENT',39,'Syntax:\nCREATE\n [DEFINER = { user | CURRENT_USER }]\n EVENT\n [IF NOT EXISTS]\n event_name\n ON SCHEDULE schedule\n [ON COMPLETION [NOT] PRESERVE]\n [ENABLE | DISABLE | DISABLE ON SLAVE]\n [COMMENT \'comment\']\n DO event_body;\n\nschedule:\n AT timestamp [+ INTERVAL interval] ...\n | EVERY interval\n [STARTS timestamp [+ INTERVAL interval] ...]\n [ENDS timestamp [+ INTERVAL interval] ...]\n\ninterval:\n quantity {YEAR | QUARTER | MONTH | DAY | HOUR | MINUTE |\n WEEK | SECOND | YEAR_MONTH | DAY_HOUR | DAY_MINUTE |\n DAY_SECOND | HOUR_MINUTE | HOUR_SECOND | MINUTE_SECOND}\n\nThis statement creates and schedules a new event. The event will not\nrun unless the Event Scheduler is enabled. For information about\nchecking Event Scheduler status and enabling it if necessary, see\nhttp://dev.mysql.com/doc/refman/5.5/en/events-configuration.html.\n\nCREATE EVENT requires the EVENT privilege for the schema in which the\nevent is to be created. It might also require the SUPER privilege,\ndepending on the DEFINER value, as described later in this section.\n\nThe minimum requirements for a valid CREATE EVENT statement are as\nfollows:\n\no The keywords CREATE EVENT plus an event name, which uniquely\n identifies the event in a database schema.\n\no An ON SCHEDULE clause, which determines when and how often the event\n executes.\n\no A DO clause, which contains the SQL statement to be executed by an\n event.\n\nThis is an example of a minimal CREATE EVENT statement:\n\nCREATE EVENT myevent\n ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR\n DO\n UPDATE myschema.mytable SET mycol = mycol + 1;\n\nThe previous statement creates an event named myevent. This event\nexecutes once---one hour following its creation---by running an SQL\nstatement that increments the value of the myschema.mytable table\'s\nmycol column by 1.\n\nThe event_name must be a valid MySQL identifier with a maximum length\nof 64 characters. Event names are not case sensitive, so you cannot\nhave two events named myevent and MyEvent in the same schema. In\ngeneral, the rules governing event names are the same as those for\nnames of stored routines. See\nhttp://dev.mysql.com/doc/refman/5.5/en/identifiers.html.\n\nAn event is associated with a schema. If no schema is indicated as part\nof event_name, the default (current) schema is assumed. To create an\nevent in a specific schema, qualify the event name with a schema using\nschema_name.event_name syntax.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/create-event.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/create-event.html'),(90,'ABS',4,'Syntax:\nABS(X)\n\nReturns the absolute value of X.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html\n\n','mysql> SELECT ABS(2);\n -> 2\nmysql> SELECT ABS(-32);\n -> 32\n','http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html'),(91,'POLYFROMWKB',32,'PolyFromWKB(wkb[,srid]), PolygonFromWKB(wkb[,srid])\n\nConstructs a POLYGON value using its WKB representation and SRID.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-values.html#gis-wkb-functions\n\n','','http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-values.html#gis-wkb-functions'),(92,'NOT LIKE',37,'Syntax:\nexpr NOT LIKE pat [ESCAPE \'escape_char\']\n\nThis is the same as NOT (expr LIKE pat [ESCAPE \'escape_char\']).\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-comparison-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/string-comparison-functions.html'),(93,'SPACE',37,'Syntax:\nSPACE(N)\n\nReturns a string consisting of N space characters.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html\n\n','mysql> SELECT SPACE(6);\n -> \' \'\n','http://dev.mysql.com/doc/refman/5.5/en/string-functions.html'),(94,'MBR DEFINITION',6,'Its MBR (Minimum Bounding Rectangle), or Envelope. This is the bounding\ngeometry, formed by the minimum and maximum (X,Y) coordinates:\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/gis-class-geometry.html\n\n','((MINX MINY, MAXX MINY, MAXX MAXY, MINX MAXY, MINX MINY))\n','http://dev.mysql.com/doc/refman/5.5/en/gis-class-geometry.html'),(95,'GEOMETRYCOLLECTION',24,'GeometryCollection(g1,g2,...)\n\nConstructs a GeometryCollection.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-values.html#gis-mysql-specific-functions\n\n','','http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-values.html#gis-mysql-specific-functions'),(96,'MAX',16,'Syntax:\nMAX([DISTINCT] expr)\n\nReturns the maximum value of expr. MAX() may take a string argument; in\nsuch cases, it returns the maximum string value. See\nhttp://dev.mysql.com/doc/refman/5.5/en/mysql-indexes.html. The DISTINCT\nkeyword can be used to find the maximum of the distinct values of expr,\nhowever, this produces the same result as omitting DISTINCT.\n\nMAX() returns NULL if there were no matching rows.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/group-by-functions.html\n\n','mysql> SELECT student_name, MIN(test_score), MAX(test_score)\n -> FROM student\n -> GROUP BY student_name;\n','http://dev.mysql.com/doc/refman/5.5/en/group-by-functions.html'),(97,'CREATE FUNCTION UDF',21,'Syntax:\nCREATE [AGGREGATE] FUNCTION function_name RETURNS {STRING|INTEGER|REAL|DECIMAL}\n SONAME shared_library_name\n\nA user-defined function (UDF) is a way to extend MySQL with a new\nfunction that works like a native (built-in) MySQL function such as\nABS() or CONCAT().\n\nfunction_name is the name that should be used in SQL statements to\ninvoke the function. The RETURNS clause indicates the type of the\nfunction\'s return value. DECIMAL is a legal value after RETURNS, but\ncurrently DECIMAL functions return string values and should be written\nlike STRING functions.\n\nshared_library_name is the basename of the shared object file that\ncontains the code that implements the function. The file must be\nlocated in the plugin directory. This directory is given by the value\nof the plugin_dir system variable. For more information, see\nhttp://dev.mysql.com/doc/refman/5.5/en/udf-compiling.html.\n\nTo create a function, you must have the INSERT privilege for the mysql\ndatabase. This is necessary because CREATE FUNCTION adds a row to the\nmysql.func system table that records the function\'s name, type, and\nshared library name. If you do not have this table, you should run the\nmysql_upgrade command to create it. See\nhttp://dev.mysql.com/doc/refman/5.5/en/mysql-upgrade.html.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/create-function-udf.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/create-function-udf.html'),(98,'*',4,'Syntax:\n*\n\nMultiplication:\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/arithmetic-functions.html\n\n','mysql> SELECT 3*5;\n -> 15\nmysql> SELECT 18014398509481984*18014398509481984.0;\n -> 324518553658426726783156020576256.0\nmysql> SELECT 18014398509481984*18014398509481984;\n -> 0\n','http://dev.mysql.com/doc/refman/5.5/en/arithmetic-functions.html'),(99,'TIMESTAMP',22,'TIMESTAMP\n\nA timestamp. The range is \'1970-01-01 00:00:01\' UTC to \'2038-01-19\n03:14:07\' UTC. TIMESTAMP values are stored as the number of seconds\nsince the epoch (\'1970-01-01 00:00:00\' UTC). A TIMESTAMP cannot\nrepresent the value \'1970-01-01 00:00:00\' because that is equivalent to\n0 seconds from the epoch and the value 0 is reserved for representing\n\'0000-00-00 00:00:00\', the \"zero\" TIMESTAMP value.\n\nUnless specified otherwise, the first TIMESTAMP column in a table is\ndefined to be automatically set to the date and time of the most recent\nmodification if not explicitly assigned a value. This makes TIMESTAMP\nuseful for recording the timestamp of an INSERT or UPDATE operation.\nYou can also set any TIMESTAMP column to the current date and time by\nassigning it a NULL value, unless it has been defined with the NULL\nattribute to permit NULL values. The automatic initialization and\nupdating to the current date and time can be specified using DEFAULT\nCURRENT_TIMESTAMP and ON UPDATE CURRENT_TIMESTAMP clauses, as described\nin\nhttp://dev.mysql.com/doc/refman/5.5/en/timestamp-initialization.html.\n\n*Note*: The TIMESTAMP format that was used prior to MySQL 4.1 is not\nsupported in MySQL 5.5; see MySQL 3.23, 4.0, 4.1 Reference Manual for\ninformation regarding the old format.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-type-overview.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-type-overview.html'),(100,'DES_DECRYPT',12,'Syntax:\nDES_DECRYPT(crypt_str[,key_str])\n\nDecrypts a string encrypted with DES_ENCRYPT(). If an error occurs,\nthis function returns NULL.\n\nThis function works only if MySQL has been configured with SSL support.\nSee http://dev.mysql.com/doc/refman/5.5/en/ssl-connections.html.\n\nIf no key_str argument is given, DES_DECRYPT() examines the first byte\nof the encrypted string to determine the DES key number that was used\nto encrypt the original string, and then reads the key from the DES key\nfile to decrypt the message. For this to work, the user must have the\nSUPER privilege. The key file can be specified with the --des-key-file\nserver option.\n\nIf you pass this function a key_str argument, that string is used as\nthe key for decrypting the message.\n\nIf the crypt_str argument does not appear to be an encrypted string,\nMySQL returns the given crypt_str.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/encryption-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/encryption-functions.html'),(101,'CACHE INDEX',26,'Syntax:\nCACHE INDEX\n tbl_index_list [, tbl_index_list] ...\n [PARTITION (partition_list | ALL)]\n IN key_cache_name\n\ntbl_index_list:\n tbl_name [[INDEX|KEY] (index_name[, index_name] ...)]\n\npartition_list:\n partition_name[, partition_name][, ...]\n\nThe CACHE INDEX statement assigns table indexes to a specific key\ncache. It is used only for MyISAM tables. After the indexes have been\nassigned, they can be preloaded into the cache if desired with LOAD\nINDEX INTO CACHE.\n\nThe following statement assigns indexes from the tables t1, t2, and t3\nto the key cache named hot_cache:\n\nmysql> CACHE INDEX t1, t2, t3 IN hot_cache;\n+---------+--------------------+----------+----------+\n| Table | Op | Msg_type | Msg_text |\n+---------+--------------------+----------+----------+\n| test.t1 | assign_to_keycache | status | OK |\n| test.t2 | assign_to_keycache | status | OK |\n| test.t3 | assign_to_keycache | status | OK |\n+---------+--------------------+----------+----------+\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/cache-index.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/cache-index.html'),(102,'ENDPOINT',13,'EndPoint(ls)\n\nReturns the Point that is the endpoint of the LineString value ls.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/geometry-property-functions.html#linestring-property-functions\n\n','mysql> SET @ls = \'LineString(1 1,2 2,3 3)\';\nmysql> SELECT AsText(EndPoint(GeomFromText(@ls)));\n+-------------------------------------+\n| AsText(EndPoint(GeomFromText(@ls))) |\n+-------------------------------------+\n| POINT(3 3) |\n+-------------------------------------+\n','http://dev.mysql.com/doc/refman/5.5/en/geometry-property-functions.html#linestring-property-functions'),(103,'COMPRESS',12,'Syntax:\nCOMPRESS(string_to_compress)\n\nCompresses a string and returns the result as a binary string. This\nfunction requires MySQL to have been compiled with a compression\nlibrary such as zlib. Otherwise, the return value is always NULL. The\ncompressed string can be uncompressed with UNCOMPRESS().\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/encryption-functions.html\n\n','mysql> SELECT LENGTH(COMPRESS(REPEAT(\'a\',1000)));\n -> 21\nmysql> SELECT LENGTH(COMPRESS(\'\'));\n -> 0\nmysql> SELECT LENGTH(COMPRESS(\'a\'));\n -> 13\nmysql> SELECT LENGTH(COMPRESS(REPEAT(\'a\',16)));\n -> 15\n','http://dev.mysql.com/doc/refman/5.5/en/encryption-functions.html'),(104,'INSERT',27,'Syntax:\nINSERT [LOW_PRIORITY | DELAYED | HIGH_PRIORITY] [IGNORE]\n [INTO] tbl_name [(col_name,...)]\n {VALUES | VALUE} ({expr | DEFAULT},...),(...),...\n [ ON DUPLICATE KEY UPDATE\n col_name=expr\n [, col_name=expr] ... ]\n\nOr:\n\nINSERT [LOW_PRIORITY | DELAYED | HIGH_PRIORITY] [IGNORE]\n [INTO] tbl_name\n SET col_name={expr | DEFAULT}, ...\n [ ON DUPLICATE KEY UPDATE\n col_name=expr\n [, col_name=expr] ... ]\n\nOr:\n\nINSERT [LOW_PRIORITY | HIGH_PRIORITY] [IGNORE]\n [INTO] tbl_name [(col_name,...)]\n SELECT ...\n [ ON DUPLICATE KEY UPDATE\n col_name=expr\n [, col_name=expr] ... ]\n\nINSERT inserts new rows into an existing table. The INSERT ... VALUES\nand INSERT ... SET forms of the statement insert rows based on\nexplicitly specified values. The INSERT ... SELECT form inserts rows\nselected from another table or tables. INSERT ... SELECT is discussed\nfurther in [HELP INSERT SELECT].\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/insert.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/insert.html'),(105,'COUNT',16,'Syntax:\nCOUNT(expr)\n\nReturns a count of the number of non-NULL values of expr in the rows\nretrieved by a SELECT statement. The result is a BIGINT value.\n\nCOUNT() returns 0 if there were no matching rows.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/group-by-functions.html\n\n','mysql> SELECT student.student_name,COUNT(*)\n -> FROM student,course\n -> WHERE student.student_id=course.student_id\n -> GROUP BY student_name;\n','http://dev.mysql.com/doc/refman/5.5/en/group-by-functions.html'),(106,'HANDLER',27,'Syntax:\nHANDLER tbl_name OPEN [ [AS] alias]\n\nHANDLER tbl_name READ index_name { = | <= | >= | < | > } (value1,value2,...)\n [ WHERE where_condition ] [LIMIT ... ]\nHANDLER tbl_name READ index_name { FIRST | NEXT | PREV | LAST }\n [ WHERE where_condition ] [LIMIT ... ]\nHANDLER tbl_name READ { FIRST | NEXT }\n [ WHERE where_condition ] [LIMIT ... ]\n\nHANDLER tbl_name CLOSE\n\nThe HANDLER statement provides direct access to table storage engine\ninterfaces. It is available for MyISAM and InnoDB tables.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/handler.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/handler.html'),(107,'MLINEFROMTEXT',3,'MLineFromText(wkt[,srid]), MultiLineStringFromText(wkt[,srid])\n\nConstructs a MULTILINESTRING value using its WKT representation and\nSRID.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-values.html#gis-wkt-functions\n\n','','http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-values.html#gis-wkt-functions'),(108,'GEOMCOLLFROMWKB',32,'GeomCollFromWKB(wkb[,srid]), GeometryCollectionFromWKB(wkb[,srid])\n\nConstructs a GEOMETRYCOLLECTION value using its WKB representation and\nSRID.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-values.html#gis-wkb-functions\n\n','','http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-values.html#gis-wkb-functions'),(109,'HELP_DATE',9,'This help information was generated from the MySQL 5.5 Reference Manual\non: 2012-08-25\n','',''),(110,'RENAME TABLE',39,'Syntax:\nRENAME TABLE tbl_name TO new_tbl_name\n [, tbl_name2 TO new_tbl_name2] ...\n\nThis statement renames one or more tables.\n\nThe rename operation is done atomically, which means that no other\nsession can access any of the tables while the rename is running. For\nexample, if you have an existing table old_table, you can create\nanother table new_table that has the same structure but is empty, and\nthen replace the existing table with the empty one as follows (assuming\nthat backup_table does not already exist):\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/rename-table.html\n\n','CREATE TABLE new_table (...);\nRENAME TABLE old_table TO backup_table, new_table TO old_table;\n','http://dev.mysql.com/doc/refman/5.5/en/rename-table.html'),(111,'BOOLEAN',22,'BOOL, BOOLEAN\n\nThese types are synonyms for TINYINT(1). A value of zero is considered\nfalse. Nonzero values are considered true:\n\nmysql> SELECT IF(0, \'true\', \'false\');\n+------------------------+\n| IF(0, \'true\', \'false\') |\n+------------------------+\n| false |\n+------------------------+\n\nmysql> SELECT IF(1, \'true\', \'false\');\n+------------------------+\n| IF(1, \'true\', \'false\') |\n+------------------------+\n| true |\n+------------------------+\n\nmysql> SELECT IF(2, \'true\', \'false\');\n+------------------------+\n| IF(2, \'true\', \'false\') |\n+------------------------+\n| true |\n+------------------------+\n\nHowever, the values TRUE and FALSE are merely aliases for 1 and 0,\nrespectively, as shown here:\n\nmysql> SELECT IF(0 = FALSE, \'true\', \'false\');\n+--------------------------------+\n| IF(0 = FALSE, \'true\', \'false\') |\n+--------------------------------+\n| true |\n+--------------------------------+\n\nmysql> SELECT IF(1 = TRUE, \'true\', \'false\');\n+-------------------------------+\n| IF(1 = TRUE, \'true\', \'false\') |\n+-------------------------------+\n| true |\n+-------------------------------+\n\nmysql> SELECT IF(2 = TRUE, \'true\', \'false\');\n+-------------------------------+\n| IF(2 = TRUE, \'true\', \'false\') |\n+-------------------------------+\n| false |\n+-------------------------------+\n\nmysql> SELECT IF(2 = FALSE, \'true\', \'false\');\n+--------------------------------+\n| IF(2 = FALSE, \'true\', \'false\') |\n+--------------------------------+\n| false |\n+--------------------------------+\n\nThe last two statements display the results shown because 2 is equal to\nneither 1 nor 0.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/numeric-type-overview.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/numeric-type-overview.html'),(112,'DEFAULT',14,'Syntax:\nDEFAULT(col_name)\n\nReturns the default value for a table column. An error results if the\ncolumn has no default value.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/miscellaneous-functions.html\n\n','mysql> UPDATE t SET i = DEFAULT(i)+1 WHERE id < 100;\n','http://dev.mysql.com/doc/refman/5.5/en/miscellaneous-functions.html'),(113,'MOD',4,'Syntax:\nMOD(N,M), N % M, N MOD M\n\nModulo operation. Returns the remainder of N divided by M.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html\n\n','mysql> SELECT MOD(234, 10);\n -> 4\nmysql> SELECT 253 % 7;\n -> 1\nmysql> SELECT MOD(29,9);\n -> 2\nmysql> SELECT 29 MOD 9;\n -> 2\n','http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html'),(114,'TINYTEXT',22,'TINYTEXT [CHARACTER SET charset_name] [COLLATE collation_name]\n\nA TEXT column with a maximum length of 255 (28 - 1) characters. The\neffective maximum length is less if the value contains multi-byte\ncharacters. Each TINYTEXT value is stored using a 1-byte length prefix\nthat indicates the number of bytes in the value.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-type-overview.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/string-type-overview.html'),(115,'OPTIMIZE TABLE',20,'Syntax:\nOPTIMIZE [NO_WRITE_TO_BINLOG | LOCAL] TABLE\n tbl_name [, tbl_name] ...\n\nOPTIMIZE TABLE should be used if you have deleted a large part of a\ntable or if you have made many changes to a table with variable-length\nrows (tables that have VARCHAR, VARBINARY, BLOB, or TEXT columns).\nDeleted rows are maintained in a linked list and subsequent INSERT\noperations reuse old row positions. You can use OPTIMIZE TABLE to\nreclaim the unused space and to defragment the data file. After\nextensive changes to a table, this statement may also improve\nperformance of statements that use the table, sometimes significantly.\n\nThis statement requires SELECT and INSERT privileges for the table.\n\nOPTIMIZE TABLE is supported for partitioned tables, and you can use\nALTER TABLE ... OPTIMIZE PARTITION to optimize one or more partitions;\nfor more information, see [HELP ALTER TABLE], and\nhttp://dev.mysql.com/doc/refman/5.5/en/partitioning-maintenance.html.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/optimize-table.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/optimize-table.html'),(116,'DECODE',12,'Syntax:\nDECODE(crypt_str,pass_str)\n\nDecrypts the encrypted string crypt_str using pass_str as the password.\ncrypt_str should be a string returned from ENCODE().\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/encryption-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/encryption-functions.html'),(117,'<=>',18,'Syntax:\n<=>\n\nNULL-safe equal. This operator performs an equality comparison like the\n= operator, but returns 1 rather than NULL if both operands are NULL,\nand 0 rather than NULL if one operand is NULL.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/comparison-operators.html\n\n','mysql> SELECT 1 <=> 1, NULL <=> NULL, 1 <=> NULL;\n -> 1, 1, 0\nmysql> SELECT 1 = 1, NULL = NULL, 1 = NULL;\n -> 1, NULL, NULL\n','http://dev.mysql.com/doc/refman/5.5/en/comparison-operators.html'),(118,'HELP STATEMENT',28,'Syntax:\nHELP \'search_string\'\n\nThe HELP statement returns online information from the MySQL Reference\nmanual. Its proper operation requires that the help tables in the mysql\ndatabase be initialized with help topic information (see\nhttp://dev.mysql.com/doc/refman/5.5/en/server-side-help-support.html).\n\nThe HELP statement searches the help tables for the given search string\nand displays the result of the search. The search string is not case\nsensitive.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/help.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/help.html'),(119,'RESET',26,'Syntax:\nRESET reset_option [, reset_option] ...\n\nThe RESET statement is used to clear the state of various server\noperations. You must have the RELOAD privilege to execute RESET.\n\nRESET acts as a stronger version of the FLUSH statement. See [HELP\nFLUSH].\n\nThe RESET statement causes an implicit commit. See\nhttp://dev.mysql.com/doc/refman/5.5/en/implicit-commit.html.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/reset.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/reset.html'),(120,'GET_LOCK',14,'Syntax:\nGET_LOCK(str,timeout)\n\nTries to obtain a lock with a name given by the string str, using a\ntimeout of timeout seconds. Returns 1 if the lock was obtained\nsuccessfully, 0 if the attempt timed out (for example, because another\nclient has previously locked the name), or NULL if an error occurred\n(such as running out of memory or the thread was killed with mysqladmin\nkill). If you have a lock obtained with GET_LOCK(), it is released when\nyou execute RELEASE_LOCK(), execute a new GET_LOCK(), or your\nconnection terminates (either normally or abnormally). Locks obtained\nwith GET_LOCK() do not interact with transactions. That is, committing\na transaction does not release any such locks obtained during the\ntransaction.\n\nThis function can be used to implement application locks or to simulate\nrecord locks. Names are locked on a server-wide basis. If a name has\nbeen locked by one client, GET_LOCK() blocks any request by another\nclient for a lock with the same name. This enables clients that agree\non a given lock name to use the name to perform cooperative advisory\nlocking. But be aware that it also enables a client that is not among\nthe set of cooperating clients to lock a name, either inadvertently or\ndeliberately, and thus prevent any of the cooperating clients from\nlocking that name. One way to reduce the likelihood of this is to use\nlock names that are database-specific or application-specific. For\nexample, use lock names of the form db_name.str or app_name.str.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/miscellaneous-functions.html\n\n','mysql> SELECT GET_LOCK(\'lock1\',10);\n -> 1\nmysql> SELECT IS_FREE_LOCK(\'lock2\');\n -> 1\nmysql> SELECT GET_LOCK(\'lock2\',10);\n -> 1\nmysql> SELECT RELEASE_LOCK(\'lock2\');\n -> 1\nmysql> SELECT RELEASE_LOCK(\'lock1\');\n -> NULL\n','http://dev.mysql.com/doc/refman/5.5/en/miscellaneous-functions.html'),(121,'UCASE',37,'Syntax:\nUCASE(str)\n\nUCASE() is a synonym for UPPER().\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/string-functions.html'),(122,'SHOW BINLOG EVENTS',26,'Syntax:\nSHOW BINLOG EVENTS\n [IN \'log_name\'] [FROM pos] [LIMIT [offset,] row_count]\n\nShows the events in the binary log. If you do not specify \'log_name\',\nthe first binary log is displayed.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/show-binlog-events.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/show-binlog-events.html'),(123,'MPOLYFROMWKB',32,'MPolyFromWKB(wkb[,srid]), MultiPolygonFromWKB(wkb[,srid])\n\nConstructs a MULTIPOLYGON value using its WKB representation and SRID.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-values.html#gis-wkb-functions\n\n','','http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-values.html#gis-wkb-functions'),(124,'ITERATE',23,'Syntax:\nITERATE label\n\nITERATE can appear only within LOOP, REPEAT, and WHILE statements.\nITERATE means \"start the loop again.\"\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/iterate.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/iterate.html'),(125,'DO',27,'Syntax:\nDO expr [, expr] ...\n\nDO executes the expressions but does not return any results. In most\nrespects, DO is shorthand for SELECT expr, ..., but has the advantage\nthat it is slightly faster when you do not care about the result.\n\nDO is useful primarily with functions that have side effects, such as\nRELEASE_LOCK().\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/do.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/do.html'),(126,'CURTIME',31,'Syntax:\nCURTIME()\n\nReturns the current time as a value in \'HH:MM:SS\' or HHMMSS.uuuuuu\nformat, depending on whether the function is used in a string or\nnumeric context. The value is expressed in the current time zone.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','mysql> SELECT CURTIME();\n -> \'23:50:26\'\nmysql> SELECT CURTIME() + 0;\n -> 235026.000000\n','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(127,'CHAR_LENGTH',37,'Syntax:\nCHAR_LENGTH(str)\n\nReturns the length of the string str, measured in characters. A\nmulti-byte character counts as a single character. This means that for\na string containing five 2-byte characters, LENGTH() returns 10,\nwhereas CHAR_LENGTH() returns 5.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/string-functions.html'),(128,'BIGINT',22,'BIGINT[(M)] [UNSIGNED] [ZEROFILL]\n\nA large integer. The signed range is -9223372036854775808 to\n9223372036854775807. The unsigned range is 0 to 18446744073709551615.\n\nSERIAL is an alias for BIGINT UNSIGNED NOT NULL AUTO_INCREMENT UNIQUE.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/numeric-type-overview.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/numeric-type-overview.html'),(129,'SET',26,'Syntax:\nSET variable_assignment [, variable_assignment] ...\n\nvariable_assignment:\n user_var_name = expr\n | [GLOBAL | SESSION] system_var_name = expr\n | [@@global. | @@session. | @@]system_var_name = expr\n\nThe SET statement assigns values to different types of variables that\naffect the operation of the server or your client. Older versions of\nMySQL employed SET OPTION, but this syntax is deprecated in favor of\nSET without OPTION.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/set-statement.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/set-statement.html'),(130,'LOAD XML',27,'Syntax:\nLOAD XML [LOW_PRIORITY | CONCURRENT] [LOCAL] INFILE \'file_name\'\n [REPLACE | IGNORE]\n INTO TABLE [db_name.]tbl_name\n [CHARACTER SET charset_name]\n [ROWS IDENTIFIED BY \'<tagname>\']\n [IGNORE number {LINES | ROWS}]\n [(column_or_user_var,...)]\n [SET col_name = expr,...]\n\nThe LOAD XML statement reads data from an XML file into a table. The\nfile_name must be given as a literal string. The tagname in the\noptional ROWS IDENTIFIED BY clause must also be given as a literal\nstring, and must be surrounded by angle brackets (< and >).\n\nLOAD XML acts as the complement of running the mysql client in XML\noutput mode (that is, starting the client with the --xml option). To\nwrite data from a table to an XML file, use a command such as the\nfollowing one from the system shell:\n\nshell> mysql --xml -e \'SELECT * FROM mytable\' > file.xml\n\nTo read the file back into a table, use LOAD XML INFILE. By default,\nthe <row> element is considered to be the equivalent of a database\ntable row; this can be changed using the ROWS IDENTIFIED BY clause.\n\nThis statement supports three different XML formats:\n\no Column names as attributes and column values as attribute values:\n\n<row column1=\"value1\" column2=\"value2\" .../>\n\no Column names as tags and column values as the content of these tags:\n\n<row>\n <column1>value1</column1>\n <column2>value2</column2>\n</row>\n\no Column names are the name attributes of <field> tags, and values are\n the contents of these tags:\n\n<row>\n <field name=\'column1\'>value1</field>\n <field name=\'column2\'>value2</field>\n</row>\n\n This is the format used by other MySQL tools, such as mysqldump.\n\nAll 3 formats can be used in the same XML file; the import routine\nautomatically detects the format for each row and interprets it\ncorrectly. Tags are matched based on the tag or attribute name and the\ncolumn name.\n\nThe following clauses work essentially the same way for LOAD XML as\nthey do for LOAD DATA:\n\no LOW_PRIORITY or CONCURRENT\n\no LOCAL\n\no REPLACE or IGNORE\n\no CHARACTER SET\n\no (column_or_user_var,...)\n\no SET\n\nSee [HELP LOAD DATA], for more information about these clauses.\n\nThe IGNORE number LINES or IGNORE number ROWS clause causes the first\nnumber rows in the XML file to be skipped. It is analogous to the LOAD\nDATA statement\'s IGNORE ... LINES clause.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/load-xml.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/load-xml.html'),(131,'CONV',4,'Syntax:\nCONV(N,from_base,to_base)\n\nConverts numbers between different number bases. Returns a string\nrepresentation of the number N, converted from base from_base to base\nto_base. Returns NULL if any argument is NULL. The argument N is\ninterpreted as an integer, but may be specified as an integer or a\nstring. The minimum base is 2 and the maximum base is 36. If to_base is\na negative number, N is regarded as a signed number. Otherwise, N is\ntreated as unsigned. CONV() works with 64-bit precision.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html\n\n','mysql> SELECT CONV(\'a\',16,2);\n -> \'1010\'\nmysql> SELECT CONV(\'6E\',18,8);\n -> \'172\'\nmysql> SELECT CONV(-17,10,-18);\n -> \'-H\'\nmysql> SELECT CONV(10+\'10\'+\'10\'+0xa,10,10);\n -> \'40\'\n','http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html'),(132,'DATE',22,'DATE\n\nA date. The supported range is \'1000-01-01\' to \'9999-12-31\'. MySQL\ndisplays DATE values in \'YYYY-MM-DD\' format, but permits assignment of\nvalues to DATE columns using either strings or numbers.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-type-overview.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-type-overview.html'),(133,'ASSIGN-VALUE',15,'Syntax:\n:=\n\nAssignment operator. Causes the user variable on the left hand side of\nthe operator to take on the value to its right. The value on the right\nhand side may be a literal value, another variable storing a value, or\nany legal expression that yields a scalar value, including the result\nof a query (provided that this value is a scalar value). You can\nperform multiple assignments in the same SET statement. You can perform\nmultiple assignments in the same statement-\n\nUnlike =, the := operator is never interpreted as a comparison\noperator. This means you can use := in any valid SQL statement (not\njust in SET statements) to assign a value to a variable.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/assignment-operators.html\n\n','mysql> SELECT @var1, @var2;\n -> NULL, NULL\nmysql> SELECT @var1 := 1, @var2;\n -> 1, NULL\nmysql> SELECT @var1, @var2;\n -> 1, NULL\nmysql> SELECT @var1, @var2 := @var1;\n -> 1, 1\nmysql> SELECT @var1, @var2;\n -> 1, 1\n\nmysql> SELECT @var1:=COUNT(*) FROM t1;\n -> 4\nmysql> SELECT @var1;\n -> 4\n','http://dev.mysql.com/doc/refman/5.5/en/assignment-operators.html'),(134,'SHOW OPEN TABLES',26,'Syntax:\nSHOW OPEN TABLES [{FROM | IN} db_name]\n [LIKE \'pattern\' | WHERE expr]\n\nSHOW OPEN TABLES lists the non-TEMPORARY tables that are currently open\nin the table cache. See\nhttp://dev.mysql.com/doc/refman/5.5/en/table-cache.html. The FROM\nclause, if present, restricts the tables shown to those present in the\ndb_name database. The LIKE clause, if present, indicates which table\nnames to match. The WHERE clause can be given to select rows using more\ngeneral conditions, as discussed in\nhttp://dev.mysql.com/doc/refman/5.5/en/extended-show.html.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/show-open-tables.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/show-open-tables.html'),(135,'EXTRACT',31,'Syntax:\nEXTRACT(unit FROM date)\n\nThe EXTRACT() function uses the same kinds of unit specifiers as\nDATE_ADD() or DATE_SUB(), but extracts parts from the date rather than\nperforming date arithmetic.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','mysql> SELECT EXTRACT(YEAR FROM \'2009-07-02\');\n -> 2009\nmysql> SELECT EXTRACT(YEAR_MONTH FROM \'2009-07-02 01:02:03\');\n -> 200907\nmysql> SELECT EXTRACT(DAY_MINUTE FROM \'2009-07-02 01:02:03\');\n -> 20102\nmysql> SELECT EXTRACT(MICROSECOND\n -> FROM \'2003-01-02 10:30:00.000123\');\n -> 123\n','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(136,'ENCRYPT',12,'Syntax:\nENCRYPT(str[,salt])\n\nEncrypts str using the Unix crypt() system call and returns a binary\nstring. The salt argument must be a string with at least two characters\nor the result will be NULL. If no salt argument is given, a random\nvalue is used.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/encryption-functions.html\n\n','mysql> SELECT ENCRYPT(\'hello\');\n -> \'VxuFAJXVARROc\'\n','http://dev.mysql.com/doc/refman/5.5/en/encryption-functions.html'),(137,'SHOW STATUS',26,'Syntax:\nSHOW [GLOBAL | SESSION] STATUS\n [LIKE \'pattern\' | WHERE expr]\n\nSHOW STATUS provides server status information. This information also\ncan be obtained using the mysqladmin extended-status command. The LIKE\nclause, if present, indicates which variable names to match. The WHERE\nclause can be given to select rows using more general conditions, as\ndiscussed in http://dev.mysql.com/doc/refman/5.5/en/extended-show.html.\nThis statement does not require any privilege. It requires only the\nability to connect to the server.\nWith a LIKE clause, the statement displays only rows for those\nvariables with names that match the pattern:\n\nmysql> SHOW STATUS LIKE \'Key%\';\n+--------------------+----------+\n| Variable_name | Value |\n+--------------------+----------+\n| Key_blocks_used | 14955 |\n| Key_read_requests | 96854827 |\n| Key_reads | 162040 |\n| Key_write_requests | 7589728 |\n| Key_writes | 3813196 |\n+--------------------+----------+\n\nWith the GLOBAL modifier, SHOW STATUS displays the status values for\nall connections to MySQL. With SESSION, it displays the status values\nfor the current connection. If no modifier is present, the default is\nSESSION. LOCAL is a synonym for SESSION.\n\nSome status variables have only a global value. For these, you get the\nsame value for both GLOBAL and SESSION. The scope for each status\nvariable is listed at\nhttp://dev.mysql.com/doc/refman/5.5/en/server-status-variables.html.\n\nEach invocation of the SHOW STATUS statement uses an internal temporary\ntable and increments the global Created_tmp_tables value.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/show-status.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/show-status.html'),(138,'EXTRACTVALUE',37,'Syntax:\nExtractValue(xml_frag, xpath_expr)\n\nExtractValue() takes two string arguments, a fragment of XML markup\nxml_frag and an XPath expression xpath_expr (also known as a locator);\nit returns the text (CDATA) of the first text node which is a child of\nthe elements or elements matched by the XPath expression. In MySQL 5.5,\nthe XPath expression can contain at most 127 characters. (This\nlimitation is lifted in MySQL 5.6.)\n\nUsing this function is the equivalent of performing a match using the\nxpath_expr after appending /text(). In other words,\nExtractValue(\'<a><b>Sakila</b></a>\', \'/a/b\') and\nExtractValue(\'<a><b>Sakila</b></a>\', \'/a/b/text()\') produce the same\nresult.\n\nIf multiple matches are found, the content of the first child text node\nof each matching element is returned (in the order matched) as a\nsingle, space-delimited string.\n\nIf no matching text node is found for the expression (including the\nimplicit /text())---for whatever reason, as long as xpath_expr is\nvalid, and xml_frag consists of elements which are properly nested and\nclosed---an empty string is returned. No distinction is made between a\nmatch on an empty element and no match at all. This is by design.\n\nIf you need to determine whether no matching element was found in\nxml_frag or such an element was found but contained no child text\nnodes, you should test the result of an expression that uses the XPath\ncount() function. For example, both of these statements return an empty\nstring, as shown here:\n\nmysql> SELECT ExtractValue(\'<a><b/></a>\', \'/a/b\');\n+-------------------------------------+\n| ExtractValue(\'<a><b/></a>\', \'/a/b\') |\n+-------------------------------------+\n| |\n+-------------------------------------+\n1 row in set (0.00 sec)\n\nmysql> SELECT ExtractValue(\'<a><c/></a>\', \'/a/b\');\n+-------------------------------------+\n| ExtractValue(\'<a><c/></a>\', \'/a/b\') |\n+-------------------------------------+\n| |\n+-------------------------------------+\n1 row in set (0.00 sec)\n\nHowever, you can determine whether there was actually a matching\nelement using the following:\n\nmysql> SELECT ExtractValue(\'<a><b/></a>\', \'count(/a/b)\');\n+-------------------------------------+\n| ExtractValue(\'<a><b/></a>\', \'count(/a/b)\') |\n+-------------------------------------+\n| 1 |\n+-------------------------------------+\n1 row in set (0.00 sec)\n\nmysql> SELECT ExtractValue(\'<a><c/></a>\', \'count(/a/b)\');\n+-------------------------------------+\n| ExtractValue(\'<a><c/></a>\', \'count(/a/b)\') |\n+-------------------------------------+\n| 0 |\n+-------------------------------------+\n1 row in set (0.01 sec)\n\n*Important*: ExtractValue() returns only CDATA, and does not return any\ntags that might be contained within a matching tag, nor any of their\ncontent (see the result returned as val1 in the following example).\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/xml-functions.html\n\n','mysql> SELECT\n -> ExtractValue(\'<a>ccc<b>ddd</b></a>\', \'/a\') AS val1,\n -> ExtractValue(\'<a>ccc<b>ddd</b></a>\', \'/a/b\') AS val2,\n -> ExtractValue(\'<a>ccc<b>ddd</b></a>\', \'//b\') AS val3,\n -> ExtractValue(\'<a>ccc<b>ddd</b></a>\', \'/b\') AS val4,\n -> ExtractValue(\'<a>ccc<b>ddd</b><b>eee</b></a>\', \'//b\') AS val5;\n\n+------+------+------+------+---------+\n| val1 | val2 | val3 | val4 | val5 |\n+------+------+------+------+---------+\n| ccc | ddd | ddd | | ddd eee |\n+------+------+------+------+---------+\n','http://dev.mysql.com/doc/refman/5.5/en/xml-functions.html'),(139,'OLD_PASSWORD',12,'Syntax:\nOLD_PASSWORD(str)\n\nOLD_PASSWORD() was added when the implementation of PASSWORD() was\nchanged in MySQL 4.1 to improve security. OLD_PASSWORD() returns the\nvalue of the pre-4.1 implementation of PASSWORD() as a string, and is\nintended to permit you to reset passwords for any pre-4.1 clients that\nneed to connect to your version 5.5 MySQL server without locking them\nout. See http://dev.mysql.com/doc/refman/5.5/en/password-hashing.html.\n\nAs of MySQL 5.5.3, the return value is a nonbinary string in the\nconnection character set. Before 5.5.3, the return value is a binary\nstring.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/encryption-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/encryption-functions.html'),(140,'FORMAT',37,'Syntax:\nFORMAT(X,D[,locale])\n\nFormats the number X to a format like \'#,###,###.##\', rounded to D\ndecimal places, and returns the result as a string. If D is 0, the\nresult has no decimal point or fractional part.\n\nThe optional third parameter enables a locale to be specified to be\nused for the result number\'s decimal point, thousands separator, and\ngrouping between separators. Permissible locale values are the same as\nthe legal values for the lc_time_names system variable (see\nhttp://dev.mysql.com/doc/refman/5.5/en/locale-support.html). If no\nlocale is specified, the default is \'en_US\'.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html\n\n','mysql> SELECT FORMAT(12332.123456, 4);\n -> \'12,332.1235\'\nmysql> SELECT FORMAT(12332.1,4);\n -> \'12,332.1000\'\nmysql> SELECT FORMAT(12332.2,0);\n -> \'12,332\'\nmysql> SELECT FORMAT(12332.2,2,\'de_DE\');\n -> \'12.332,20\'\n','http://dev.mysql.com/doc/refman/5.5/en/string-functions.html'),(141,'||',15,'Syntax:\nOR, ||\n\nLogical OR. When both operands are non-NULL, the result is 1 if any\noperand is nonzero, and 0 otherwise. With a NULL operand, the result is\n1 if the other operand is nonzero, and NULL otherwise. If both operands\nare NULL, the result is NULL.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/logical-operators.html\n\n','mysql> SELECT 1 || 1;\n -> 1\nmysql> SELECT 1 || 0;\n -> 1\nmysql> SELECT 0 || 0;\n -> 0\nmysql> SELECT 0 || NULL;\n -> NULL\nmysql> SELECT 1 || NULL;\n -> 1\n','http://dev.mysql.com/doc/refman/5.5/en/logical-operators.html'),(142,'BIT_LENGTH',37,'Syntax:\nBIT_LENGTH(str)\n\nReturns the length of the string str in bits.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html\n\n','mysql> SELECT BIT_LENGTH(\'text\');\n -> 32\n','http://dev.mysql.com/doc/refman/5.5/en/string-functions.html'),(143,'EXTERIORRING',2,'ExteriorRing(poly)\n\nReturns the exterior ring of the Polygon value poly as a LineString.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/geometry-property-functions.html#polygon-property-functions\n\n','mysql> SET @poly =\n -> \'Polygon((0 0,0 3,3 3,3 0,0 0),(1 1,1 2,2 2,2 1,1 1))\';\nmysql> SELECT AsText(ExteriorRing(GeomFromText(@poly)));\n+-------------------------------------------+\n| AsText(ExteriorRing(GeomFromText(@poly))) |\n+-------------------------------------------+\n| LINESTRING(0 0,0 3,3 3,3 0,0 0) |\n+-------------------------------------------+\n','http://dev.mysql.com/doc/refman/5.5/en/geometry-property-functions.html#polygon-property-functions'),(144,'GEOMFROMWKB',32,'GeomFromWKB(wkb[,srid]), GeometryFromWKB(wkb[,srid])\n\nConstructs a geometry value of any type using its WKB representation\nand SRID.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-values.html#gis-wkb-functions\n\n','','http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-values.html#gis-wkb-functions'),(145,'SHOW SLAVE HOSTS',26,'Syntax:\nSHOW SLAVE HOSTS\n\nDisplays a list of replication slaves currently registered with the\nmaster. (Before MySQL 5.5.3, only slaves started with the\n--report-host=host_name option are visible in this list.)\n\nThe list is displayed on any server (not just the master server). The\noutput looks like this:\n\nmysql> SHOW SLAVE HOSTS;\n+------------+-----------+------+-----------+\n| Server_id | Host | Port | Master_id |\n+------------+-----------+------+-----------+\n| 192168010 | iconnect2 | 3306 | 192168011 |\n| 1921680101 | athena | 3306 | 192168011 |\n+------------+-----------+------+-----------+\n\no Server_id: The unique server ID of the slave server, as configured in\n the server\'s option file, or on the command line with\n --server-id=value.\n\no Host: The host name of the slave server, as configured in the\n server\'s option file, or on the command line with\n --report-host=host_name. Note that this can differ from the machine\n name as configured in the operating system.\n\no Port: The port the slave server is listening on.\n\n In MySQL 5.5.23 and later, a zero in this column means that the slave\n port (--report-port) was not set. Prior to MySQL 5.5.23, 3306 was\n used as the default in such cases (Bug #13333431).\n\no Master_id: The unique server ID of the master server that the slave\n server is replicating from.\n\nSome MySQL versions report another variable, Rpl_recovery_rank. This\nvariable was never used, and was removed in MySQL 5.5.3. (Bug #13963)\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/show-slave-hosts.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/show-slave-hosts.html'),(146,'START TRANSACTION',8,'Syntax:\nSTART TRANSACTION [WITH CONSISTENT SNAPSHOT]\nBEGIN [WORK]\nCOMMIT [WORK] [AND [NO] CHAIN] [[NO] RELEASE]\nROLLBACK [WORK] [AND [NO] CHAIN] [[NO] RELEASE]\nSET autocommit = {0 | 1}\n\nThese statements provide control over use of transactions:\n\no START TRANSACTION or BEGIN start a new transaction.\n\no COMMIT commits the current transaction, making its changes permanent.\n\no ROLLBACK rolls back the current transaction, canceling its changes.\n\no SET autocommit disables or enables the default autocommit mode for\n the current session.\n\nBy default, MySQL runs with autocommit mode enabled. This means that as\nsoon as you execute a statement that updates (modifies) a table, MySQL\nstores the update on disk to make it permanent. The change cannot be\nrolled back.\n\nTo disable autocommit mode implicitly for a single series of\nstatements, use the START TRANSACTION statement:\n\nSTART TRANSACTION;\nSELECT @A:=SUM(salary) FROM table1 WHERE type=1;\nUPDATE table2 SET summary=@A WHERE type=1;\nCOMMIT;\n\nWith START TRANSACTION, autocommit remains disabled until you end the\ntransaction with COMMIT or ROLLBACK. The autocommit mode then reverts\nto its previous state.\n\nYou can also begin a transaction like this:\n\nSTART TRANSACTION WITH CONSISTENT SNAPSHOT;\n\nThe WITH CONSISTENT SNAPSHOT option starts a consistent read for\nstorage engines that are capable of it. This applies only to InnoDB.\nThe effect is the same as issuing a START TRANSACTION followed by a\nSELECT from any InnoDB table. See\nhttp://dev.mysql.com/doc/refman/5.5/en/innodb-consistent-read.html. The\nWITH CONSISTENT SNAPSHOT option does not change the current transaction\nisolation level, so it provides a consistent snapshot only if the\ncurrent isolation level is one that permits consistent read (REPEATABLE\nREAD or SERIALIZABLE).\n\n*Important*: Many APIs used for writing MySQL client applications (such\nas JDBC) provide their own methods for starting transactions that can\n(and sometimes should) be used instead of sending a START TRANSACTION\nstatement from the client. See\nhttp://dev.mysql.com/doc/refman/5.5/en/connectors-apis.html, or the\ndocumentation for your API, for more information.\n\nTo disable autocommit mode explicitly, use the following statement:\n\nSET autocommit=0;\n\nAfter disabling autocommit mode by setting the autocommit variable to\nzero, changes to transaction-safe tables (such as those for InnoDB or\nNDBCLUSTER) are not made permanent immediately. You must use COMMIT to\nstore your changes to disk or ROLLBACK to ignore the changes.\n\nautocommit is a session variable and must be set for each session. To\ndisable autocommit mode for each new connection, see the description of\nthe autocommit system variable at\nhttp://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html.\n\nBEGIN and BEGIN WORK are supported as aliases of START TRANSACTION for\ninitiating a transaction. START TRANSACTION is standard SQL syntax and\nis the recommended way to start an ad-hoc transaction.\n\nThe BEGIN statement differs from the use of the BEGIN keyword that\nstarts a BEGIN ... END compound statement. The latter does not begin a\ntransaction. See [HELP BEGIN END].\n\n*Note*: Within all stored programs (stored procedures and functions,\ntriggers, and events), the parser treats BEGIN [WORK] as the beginning\nof a BEGIN ... END block. Begin a transaction in this context with\nSTART TRANSACTION instead.\n\nThe optional WORK keyword is supported for COMMIT and ROLLBACK, as are\nthe CHAIN and RELEASE clauses. CHAIN and RELEASE can be used for\nadditional control over transaction completion. The value of the\ncompletion_type system variable determines the default completion\nbehavior. See\nhttp://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html.\n\nThe AND CHAIN clause causes a new transaction to begin as soon as the\ncurrent one ends, and the new transaction has the same isolation level\nas the just-terminated transaction. The RELEASE clause causes the\nserver to disconnect the current client session after terminating the\ncurrent transaction. Including the NO keyword suppresses CHAIN or\nRELEASE completion, which can be useful if the completion_type system\nvariable is set to cause chaining or release completion by default.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/commit.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/commit.html'),(147,'BETWEEN AND',18,'Syntax:\nexpr BETWEEN min AND max\n\nIf expr is greater than or equal to min and expr is less than or equal\nto max, BETWEEN returns 1, otherwise it returns 0. This is equivalent\nto the expression (min <= expr AND expr <= max) if all the arguments\nare of the same type. Otherwise type conversion takes place according\nto the rules described in\nhttp://dev.mysql.com/doc/refman/5.5/en/type-conversion.html, but\napplied to all the three arguments.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/comparison-operators.html\n\n','mysql> SELECT 2 BETWEEN 1 AND 3, 2 BETWEEN 3 and 1;\n -> 1, 0\nmysql> SELECT 1 BETWEEN 2 AND 3;\n -> 0\nmysql> SELECT \'b\' BETWEEN \'a\' AND \'c\';\n -> 1\nmysql> SELECT 2 BETWEEN 2 AND \'3\';\n -> 1\nmysql> SELECT 2 BETWEEN 2 AND \'x-3\';\n -> 0\n','http://dev.mysql.com/doc/refman/5.5/en/comparison-operators.html'),(148,'MULTIPOLYGON',24,'MultiPolygon(poly1,poly2,...)\n\nConstructs a MultiPolygon value from a set of Polygon or WKB Polygon\narguments.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-values.html#gis-mysql-specific-functions\n\n','','http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-values.html#gis-mysql-specific-functions'),(149,'TIME_FORMAT',31,'Syntax:\nTIME_FORMAT(time,format)\n\nThis is used like the DATE_FORMAT() function, but the format string may\ncontain format specifiers only for hours, minutes, seconds, and\nmicroseconds. Other specifiers produce a NULL value or 0.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','mysql> SELECT TIME_FORMAT(\'100:00:00\', \'%H %k %h %I %l\');\n -> \'100 100 04 04 4\'\n','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(150,'LEFT',37,'Syntax:\nLEFT(str,len)\n\nReturns the leftmost len characters from the string str, or NULL if any\nargument is NULL.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html\n\n','mysql> SELECT LEFT(\'foobarbar\', 5);\n -> \'fooba\'\n','http://dev.mysql.com/doc/refman/5.5/en/string-functions.html'),(151,'FLUSH QUERY CACHE',26,'You can defragment the query cache to better utilize its memory with\nthe FLUSH QUERY CACHE statement. The statement does not remove any\nqueries from the cache.\n\nThe RESET QUERY CACHE statement removes all query results from the\nquery cache. The FLUSH TABLES statement also does this.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/query-cache-status-and-maintenance.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/query-cache-status-and-maintenance.html'),(152,'SET DATA TYPE',22,'SET(\'value1\',\'value2\',...) [CHARACTER SET charset_name] [COLLATE\ncollation_name]\n\nA set. A string object that can have zero or more values, each of which\nmust be chosen from the list of values \'value1\', \'value2\', ... A SET\ncolumn can have a maximum of 64 members. SET values are represented\ninternally as integers.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-type-overview.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/string-type-overview.html'),(153,'RAND',4,'Syntax:\nRAND(), RAND(N)\n\nReturns a random floating-point value v in the range 0 <= v < 1.0. If a\nconstant integer argument N is specified, it is used as the seed value,\nwhich produces a repeatable sequence of column values. In the following\nexample, note that the sequences of values produced by RAND(3) is the\nsame both places where it occurs.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html\n\n','mysql> CREATE TABLE t (i INT);\nQuery OK, 0 rows affected (0.42 sec)\n\nmysql> INSERT INTO t VALUES(1),(2),(3);\nQuery OK, 3 rows affected (0.00 sec)\nRecords: 3 Duplicates: 0 Warnings: 0\n\nmysql> SELECT i, RAND() FROM t;\n+------+------------------+\n| i | RAND() |\n+------+------------------+\n| 1 | 0.61914388706828 |\n| 2 | 0.93845168309142 |\n| 3 | 0.83482678498591 |\n+------+------------------+\n3 rows in set (0.00 sec)\n\nmysql> SELECT i, RAND(3) FROM t;\n+------+------------------+\n| i | RAND(3) |\n+------+------------------+\n| 1 | 0.90576975597606 |\n| 2 | 0.37307905813035 |\n| 3 | 0.14808605345719 |\n+------+------------------+\n3 rows in set (0.00 sec)\n\nmysql> SELECT i, RAND() FROM t;\n+------+------------------+\n| i | RAND() |\n+------+------------------+\n| 1 | 0.35877890638893 |\n| 2 | 0.28941420772058 |\n| 3 | 0.37073435016976 |\n+------+------------------+\n3 rows in set (0.00 sec)\n\nmysql> SELECT i, RAND(3) FROM t;\n+------+------------------+\n| i | RAND(3) |\n+------+------------------+\n| 1 | 0.90576975597606 |\n| 2 | 0.37307905813035 |\n| 3 | 0.14808605345719 |\n+------+------------------+\n3 rows in set (0.01 sec)\n','http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html'),(154,'RPAD',37,'Syntax:\nRPAD(str,len,padstr)\n\nReturns the string str, right-padded with the string padstr to a length\nof len characters. If str is longer than len, the return value is\nshortened to len characters.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html\n\n','mysql> SELECT RPAD(\'hi\',5,\'?\');\n -> \'hi???\'\nmysql> SELECT RPAD(\'hi\',1,\'?\');\n -> \'h\'\n','http://dev.mysql.com/doc/refman/5.5/en/string-functions.html'),(155,'CREATE DATABASE',39,'Syntax:\nCREATE {DATABASE | SCHEMA} [IF NOT EXISTS] db_name\n [create_specification] ...\n\ncreate_specification:\n [DEFAULT] CHARACTER SET [=] charset_name\n | [DEFAULT] COLLATE [=] collation_name\n\nCREATE DATABASE creates a database with the given name. To use this\nstatement, you need the CREATE privilege for the database. CREATE\nSCHEMA is a synonym for CREATE DATABASE.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/create-database.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/create-database.html'),(156,'DEC',22,'DEC[(M[,D])] [UNSIGNED] [ZEROFILL], NUMERIC[(M[,D])] [UNSIGNED]\n[ZEROFILL], FIXED[(M[,D])] [UNSIGNED] [ZEROFILL]\n\nThese types are synonyms for DECIMAL. The FIXED synonym is available\nfor compatibility with other database systems.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/numeric-type-overview.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/numeric-type-overview.html'),(157,'VAR_POP',16,'Syntax:\nVAR_POP(expr)\n\nReturns the population standard variance of expr. It considers rows as\nthe whole population, not as a sample, so it has the number of rows as\nthe denominator. You can also use VARIANCE(), which is equivalent but\nis not standard SQL.\n\nVAR_POP() returns NULL if there were no matching rows.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/group-by-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/group-by-functions.html'),(158,'ELT',37,'Syntax:\nELT(N,str1,str2,str3,...)\n\nReturns str1 if N = 1, str2 if N = 2, and so on. Returns NULL if N is\nless than 1 or greater than the number of arguments. ELT() is the\ncomplement of FIELD().\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html\n\n','mysql> SELECT ELT(1, \'ej\', \'Heja\', \'hej\', \'foo\');\n -> \'ej\'\nmysql> SELECT ELT(4, \'ej\', \'Heja\', \'hej\', \'foo\');\n -> \'foo\'\n','http://dev.mysql.com/doc/refman/5.5/en/string-functions.html'),(159,'ALTER VIEW',39,'Syntax:\nALTER\n [ALGORITHM = {UNDEFINED | MERGE | TEMPTABLE}]\n [DEFINER = { user | CURRENT_USER }]\n [SQL SECURITY { DEFINER | INVOKER }]\n VIEW view_name [(column_list)]\n AS select_statement\n [WITH [CASCADED | LOCAL] CHECK OPTION]\n\nThis statement changes the definition of a view, which must exist. The\nsyntax is similar to that for CREATE VIEW and the effect is the same as\nfor CREATE OR REPLACE VIEW. See [HELP CREATE VIEW]. This statement\nrequires the CREATE VIEW and DROP privileges for the view, and some\nprivilege for each column referred to in the SELECT statement. ALTER\nVIEW is permitted only to the definer or users with the SUPER\nprivilege.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/alter-view.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/alter-view.html'),(160,'SHOW DATABASES',26,'Syntax:\nSHOW {DATABASES | SCHEMAS}\n [LIKE \'pattern\' | WHERE expr]\n\nSHOW DATABASES lists the databases on the MySQL server host. SHOW\nSCHEMAS is a synonym for SHOW DATABASES. The LIKE clause, if present,\nindicates which database names to match. The WHERE clause can be given\nto select rows using more general conditions, as discussed in\nhttp://dev.mysql.com/doc/refman/5.5/en/extended-show.html.\n\nYou see only those databases for which you have some kind of privilege,\nunless you have the global SHOW DATABASES privilege. You can also get\nthis list using the mysqlshow command.\n\nIf the server was started with the --skip-show-database option, you\ncannot use this statement at all unless you have the SHOW DATABASES\nprivilege.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/show-databases.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/show-databases.html'),(161,'~',19,'Syntax:\n~\n\nInvert all bits.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/bit-functions.html\n\n','mysql> SELECT 5 & ~1;\n -> 4\n','http://dev.mysql.com/doc/refman/5.5/en/bit-functions.html'),(162,'TEXT',22,'TEXT[(M)] [CHARACTER SET charset_name] [COLLATE collation_name]\n\nA TEXT column with a maximum length of 65,535 (216 - 1) characters. The\neffective maximum length is less if the value contains multi-byte\ncharacters. Each TEXT value is stored using a 2-byte length prefix that\nindicates the number of bytes in the value.\n\nAn optional length M can be given for this type. If this is done, MySQL\ncreates the column as the smallest TEXT type large enough to hold\nvalues M characters long.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-type-overview.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/string-type-overview.html'),(163,'CONCAT_WS',37,'Syntax:\nCONCAT_WS(separator,str1,str2,...)\n\nCONCAT_WS() stands for Concatenate With Separator and is a special form\nof CONCAT(). The first argument is the separator for the rest of the\narguments. The separator is added between the strings to be\nconcatenated. The separator can be a string, as can the rest of the\narguments. If the separator is NULL, the result is NULL.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html\n\n','mysql> SELECT CONCAT_WS(\',\',\'First name\',\'Second name\',\'Last Name\');\n -> \'First name,Second name,Last Name\'\nmysql> SELECT CONCAT_WS(\',\',\'First name\',NULL,\'Last Name\');\n -> \'First name,Last Name\'\n','http://dev.mysql.com/doc/refman/5.5/en/string-functions.html'),(164,'ROW_COUNT',17,'Syntax:\nROW_COUNT()\n\nBefore MySQL 5.5.5, ROW_COUNT() returns the number of rows changed,\ndeleted, or inserted by the last statement if it was an UPDATE, DELETE,\nor INSERT. For other statements, the value may not be meaningful.\n\nAs of MySQL 5.5.5, ROW_COUNT() returns a value as follows:\n\no DDL statements: 0. This applies to statements such as CREATE TABLE or\n DROP TABLE.\n\no DML statements other than SELECT: The number of affected rows. This\n applies to statements such as UPDATE, INSERT, or DELETE (as before),\n but now also to statements such as ALTER TABLE and LOAD DATA INFILE.\n\no SELECT: -1 if the statement returns a result set, or the number of\n rows \"affected\" if it does not. For example, for SELECT * FROM t1,\n ROW_COUNT() returns -1. For SELECT * FROM t1 INTO OUTFILE\n \'file_name\', ROW_COUNT() returns the number of rows written to the\n file.\n\no SIGNAL statements: 0.\n\nFor UPDATE statements, the affected-rows value by default is the number\nof rows actually changed. If you specify the CLIENT_FOUND_ROWS flag to\nmysql_real_connect() when connecting to mysqld, the affected-rows value\nis the number of rows \"found\"; that is, matched by the WHERE clause.\n\nFor REPLACE statements, the affected-rows value is 2 if the new row\nreplaced an old row, because in this case, one row was inserted after\nthe duplicate was deleted.\n\nFor INSERT ... ON DUPLICATE KEY UPDATE statements, the affected-rows\nvalue is 1 if the row is inserted as a new row and 2 if an existing row\nis updated.\n\nThe ROW_COUNT() value is similar to the value from the\nmysql_affected_rows() C API function and the row count that the mysql\nclient displays following statement execution.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/information-functions.html\n\n','mysql> INSERT INTO t VALUES(1),(2),(3);\nQuery OK, 3 rows affected (0.00 sec)\nRecords: 3 Duplicates: 0 Warnings: 0\n\nmysql> SELECT ROW_COUNT();\n+-------------+\n| ROW_COUNT() |\n+-------------+\n| 3 |\n+-------------+\n1 row in set (0.00 sec)\n\nmysql> DELETE FROM t WHERE i IN(1,2);\nQuery OK, 2 rows affected (0.00 sec)\n\nmysql> SELECT ROW_COUNT();\n+-------------+\n| ROW_COUNT() |\n+-------------+\n| 2 |\n+-------------+\n1 row in set (0.00 sec)\n','http://dev.mysql.com/doc/refman/5.5/en/information-functions.html'),(165,'ASIN',4,'Syntax:\nASIN(X)\n\nReturns the arc sine of X, that is, the value whose sine is X. Returns\nNULL if X is not in the range -1 to 1.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html\n\n','mysql> SELECT ASIN(0.2);\n -> 0.20135792079033\nmysql> SELECT ASIN(\'foo\');\n\n+-------------+\n| ASIN(\'foo\') |\n+-------------+\n| 0 |\n+-------------+\n1 row in set, 1 warning (0.00 sec)\n\nmysql> SHOW WARNINGS;\n+---------+------+-----------------------------------------+\n| Level | Code | Message |\n+---------+------+-----------------------------------------+\n| Warning | 1292 | Truncated incorrect DOUBLE value: \'foo\' |\n+---------+------+-----------------------------------------+\n','http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html'),(166,'SIGN',4,'Syntax:\nSIGN(X)\n\nReturns the sign of the argument as -1, 0, or 1, depending on whether X\nis negative, zero, or positive.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html\n\n','mysql> SELECT SIGN(-32);\n -> -1\nmysql> SELECT SIGN(0);\n -> 0\nmysql> SELECT SIGN(234);\n -> 1\n','http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html'),(167,'SEC_TO_TIME',31,'Syntax:\nSEC_TO_TIME(seconds)\n\nReturns the seconds argument, converted to hours, minutes, and seconds,\nas a TIME value. The range of the result is constrained to that of the\nTIME data type. A warning occurs if the argument corresponds to a value\noutside that range.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','mysql> SELECT SEC_TO_TIME(2378);\n -> \'00:39:38\'\nmysql> SELECT SEC_TO_TIME(2378) + 0;\n -> 3938\n','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(168,'FLOAT',22,'FLOAT[(M,D)] [UNSIGNED] [ZEROFILL]\n\nA small (single-precision) floating-point number. Permissible values\nare -3.402823466E+38 to -1.175494351E-38, 0, and 1.175494351E-38 to\n3.402823466E+38. These are the theoretical limits, based on the IEEE\nstandard. The actual range might be slightly smaller depending on your\nhardware or operating system.\n\nM is the total number of digits and D is the number of digits following\nthe decimal point. If M and D are omitted, values are stored to the\nlimits permitted by the hardware. A single-precision floating-point\nnumber is accurate to approximately 7 decimal places.\n\nUNSIGNED, if specified, disallows negative values.\n\nUsing FLOAT might give you some unexpected problems because all\ncalculations in MySQL are done with double precision. See\nhttp://dev.mysql.com/doc/refman/5.5/en/no-matching-rows.html.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/numeric-type-overview.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/numeric-type-overview.html'),(169,'LOCATE',37,'Syntax:\nLOCATE(substr,str), LOCATE(substr,str,pos)\n\nThe first syntax returns the position of the first occurrence of\nsubstring substr in string str. The second syntax returns the position\nof the first occurrence of substring substr in string str, starting at\nposition pos. Returns 0 if substr is not in str.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html\n\n','mysql> SELECT LOCATE(\'bar\', \'foobarbar\');\n -> 4\nmysql> SELECT LOCATE(\'xbar\', \'foobar\');\n -> 0\nmysql> SELECT LOCATE(\'bar\', \'foobarbar\', 5);\n -> 7\n','http://dev.mysql.com/doc/refman/5.5/en/string-functions.html'),(170,'SHOW EVENTS',26,'Syntax:\nSHOW EVENTS [{FROM | IN} schema_name]\n [LIKE \'pattern\' | WHERE expr]\n\nThis statement displays information about Event Manager events. It\nrequires the EVENT privilege for the database from which the events are\nto be shown.\n\nIn its simplest form, SHOW EVENTS lists all of the events in the\ncurrent schema:\n\nmysql> SELECT CURRENT_USER(), SCHEMA();\n+----------------+----------+\n| CURRENT_USER() | SCHEMA() |\n+----------------+----------+\n| jon@ghidora | myschema |\n+----------------+----------+\n1 row in set (0.00 sec)\n\nmysql> SHOW EVENTS\\G\n*************************** 1. row ***************************\n Db: myschema\n Name: e_daily\n Definer: jon@ghidora\n Time zone: SYSTEM\n Type: RECURRING\n Execute at: NULL\n Interval value: 10\n Interval field: SECOND\n Starts: 2006-02-09 10:41:23\n Ends: NULL\n Status: ENABLED\n Originator: 0\ncharacter_set_client: latin1\ncollation_connection: latin1_swedish_ci\n Database Collation: latin1_swedish_ci\n\nTo see events for a specific schema, use the FROM clause. For example,\nto see events for the test schema, use the following statement:\n\nSHOW EVENTS FROM test;\n\nThe LIKE clause, if present, indicates which event names to match. The\nWHERE clause can be given to select rows using more general conditions,\nas discussed in\nhttp://dev.mysql.com/doc/refman/5.5/en/extended-show.html.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/show-events.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/show-events.html'),(171,'CHARSET',17,'Syntax:\nCHARSET(str)\n\nReturns the character set of the string argument.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/information-functions.html\n\n','mysql> SELECT CHARSET(\'abc\');\n -> \'latin1\'\nmysql> SELECT CHARSET(CONVERT(\'abc\' USING utf8));\n -> \'utf8\'\nmysql> SELECT CHARSET(USER());\n -> \'utf8\'\n','http://dev.mysql.com/doc/refman/5.5/en/information-functions.html'),(172,'SUBDATE',31,'Syntax:\nSUBDATE(date,INTERVAL expr unit), SUBDATE(expr,days)\n\nWhen invoked with the INTERVAL form of the second argument, SUBDATE()\nis a synonym for DATE_SUB(). For information on the INTERVAL unit\nargument, see the discussion for DATE_ADD().\n\nmysql> SELECT DATE_SUB(\'2008-01-02\', INTERVAL 31 DAY);\n -> \'2007-12-02\'\nmysql> SELECT SUBDATE(\'2008-01-02\', INTERVAL 31 DAY);\n -> \'2007-12-02\'\n\nThe second form enables the use of an integer value for days. In such\ncases, it is interpreted as the number of days to be subtracted from\nthe date or datetime expression expr.\n\nmysql> SELECT SUBDATE(\'2008-01-02 12:00:00\', 31);\n -> \'2007-12-02 12:00:00\'\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(173,'DAYOFYEAR',31,'Syntax:\nDAYOFYEAR(date)\n\nReturns the day of the year for date, in the range 1 to 366.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','mysql> SELECT DAYOFYEAR(\'2007-02-03\');\n -> 34\n','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(174,'%',4,'Syntax:\nN % M, N MOD M\n\nModulo operation. Returns the remainder of N divided by M. For more\ninformation, see the description for the MOD() function in\nhttp://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/arithmetic-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/arithmetic-functions.html'),(175,'LONGTEXT',22,'LONGTEXT [CHARACTER SET charset_name] [COLLATE collation_name]\n\nA TEXT column with a maximum length of 4,294,967,295 or 4GB (232 - 1)\ncharacters. The effective maximum length is less if the value contains\nmulti-byte characters. The effective maximum length of LONGTEXT columns\nalso depends on the configured maximum packet size in the client/server\nprotocol and available memory. Each LONGTEXT value is stored using a\n4-byte length prefix that indicates the number of bytes in the value.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-type-overview.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/string-type-overview.html'),(176,'KILL',26,'Syntax:\nKILL [CONNECTION | QUERY] thread_id\n\nEach connection to mysqld runs in a separate thread. You can see which\nthreads are running with the SHOW PROCESSLIST statement and kill a\nthread with the KILL thread_id statement.\n\nKILL permits an optional CONNECTION or QUERY modifier:\n\no KILL CONNECTION is the same as KILL with no modifier: It terminates\n the connection associated with the given thread_id.\n\no KILL QUERY terminates the statement that the connection is currently\n executing, but leaves the connection itself intact.\n\nIf you have the PROCESS privilege, you can see all threads. If you have\nthe SUPER privilege, you can kill all threads and statements.\nOtherwise, you can see and kill only your own threads and statements.\n\nYou can also use the mysqladmin processlist and mysqladmin kill\ncommands to examine and kill threads.\n\n*Note*: You cannot use KILL with the Embedded MySQL Server library\nbecause the embedded server merely runs inside the threads of the host\napplication. It does not create any connection threads of its own.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/kill.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/kill.html'),(177,'DISJOINT',30,'Disjoint(g1,g2)\n\nReturns 1 or 0 to indicate whether g1 is spatially disjoint from (does\nnot intersect) g2.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/functions-for-testing-spatial-relations-between-geometric-objects.html#functions-that-test-spatial-relationships-between-geometries\n\n','','http://dev.mysql.com/doc/refman/5.5/en/functions-for-testing-spatial-relations-between-geometric-objects.html#functions-that-test-spatial-relationships-between-geometries'),(178,'ASTEXT',3,'AsText(g), AsWKT(g)\n\nConverts a value in internal geometry format to its WKT representation\nand returns the string result.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/functions-to-convert-geometries-between-formats.html\n\n','mysql> SET @g = \'LineString(1 1,2 2,3 3)\';\nmysql> SELECT AsText(GeomFromText(@g));\n+--------------------------+\n| AsText(GeomFromText(@g)) |\n+--------------------------+\n| LINESTRING(1 1,2 2,3 3) |\n+--------------------------+\n','http://dev.mysql.com/doc/refman/5.5/en/functions-to-convert-geometries-between-formats.html'),(179,'LPAD',37,'Syntax:\nLPAD(str,len,padstr)\n\nReturns the string str, left-padded with the string padstr to a length\nof len characters. If str is longer than len, the return value is\nshortened to len characters.\n\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html\n\n','mysql> SELECT LPAD(\'hi\',4,\'??\');\n -> \'??hi\'\nmysql> SELECT LPAD(\'hi\',1,\'??\');\n -> \'h\'\n','http://dev.mysql.com/doc/refman/5.5/en/string-functions.html'),(180,'DECLARE CONDITION',23,'Syntax:\nDECLARE condition_name CONDITION FOR condition_value\n\ncondition_value:\n mysql_error_code\n | SQLSTATE [VALUE] sqlstate_value\n\nThe DECLARE ... CONDITION statement declares a named error condition,\nassociating a name with a condition that needs specific handling. The\nname can be referred to in a subsequent DECLARE ... HANDLER statement\n(see [HELP DECLARE HANDLER]).\n\nCondition declarations must appear before cursor or handler\ndeclarations.\n\nThe condition_value for DECLARE ... CONDITION can be a MySQL error code\n(a number) or an SQLSTATE value (a 5-character string literal). You\nshould not use MySQL error code 0 or SQLSTATE values that begin with\n\'00\', because those indicate success rather than an error condition.\nFor a list of MySQL error codes and SQLSTATE values, see\nhttp://dev.mysql.com/doc/refman/5.5/en/error-messages-server.html.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/declare-condition.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/declare-condition.html'),(181,'OVERLAPS',30,'Overlaps(g1,g2)\n\nReturns 1 or 0 to indicate whether g1 spatially overlaps g2. The term\nspatially overlaps is used if two geometries intersect and their\nintersection results in a geometry of the same dimension but not equal\nto either of the given geometries.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/functions-for-testing-spatial-relations-between-geometric-objects.html#functions-that-test-spatial-relationships-between-geometries\n\n','','http://dev.mysql.com/doc/refman/5.5/en/functions-for-testing-spatial-relations-between-geometric-objects.html#functions-that-test-spatial-relationships-between-geometries'),(182,'SET GLOBAL SQL_SLAVE_SKIP_COUNTER',8,'Syntax:\nSET GLOBAL sql_slave_skip_counter = N\n\nThis statement skips the next N events from the master. This is useful\nfor recovering from replication stops caused by a statement.\n\nThis statement is valid only when the slave threads are not running.\nOtherwise, it produces an error.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/set-global-sql-slave-skip-counter.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/set-global-sql-slave-skip-counter.html'),(183,'NUMGEOMETRIES',25,'NumGeometries(gc)\n\nReturns the number of geometries in the GeometryCollection value gc.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/geometry-property-functions.html#geometrycollection-property-functions\n\n','mysql> SET @gc = \'GeometryCollection(Point(1 1),LineString(2 2, 3 3))\';\nmysql> SELECT NumGeometries(GeomFromText(@gc));\n+----------------------------------+\n| NumGeometries(GeomFromText(@gc)) |\n+----------------------------------+\n| 2 |\n+----------------------------------+\n','http://dev.mysql.com/doc/refman/5.5/en/geometry-property-functions.html#geometrycollection-property-functions'),(184,'MONTHNAME',31,'Syntax:\nMONTHNAME(date)\n\nReturns the full name of the month for date. The language used for the\nname is controlled by the value of the lc_time_names system variable\n(http://dev.mysql.com/doc/refman/5.5/en/locale-support.html).\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','mysql> SELECT MONTHNAME(\'2008-02-03\');\n -> \'February\'\n','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(185,'CHANGE MASTER TO',8,'Syntax:\nCHANGE MASTER TO option [, option] ...\n\noption:\n MASTER_BIND = \'interface_name\'\n | MASTER_HOST = \'host_name\'\n | MASTER_USER = \'user_name\'\n | MASTER_PASSWORD = \'password\'\n | MASTER_PORT = port_num\n | MASTER_CONNECT_RETRY = interval\n | MASTER_HEARTBEAT_PERIOD = interval\n | MASTER_LOG_FILE = \'master_log_name\'\n | MASTER_LOG_POS = master_log_pos\n | RELAY_LOG_FILE = \'relay_log_name\'\n | RELAY_LOG_POS = relay_log_pos\n | MASTER_SSL = {0|1}\n | MASTER_SSL_CA = \'ca_file_name\'\n | MASTER_SSL_CAPATH = \'ca_directory_name\'\n | MASTER_SSL_CERT = \'cert_file_name\'\n | MASTER_SSL_KEY = \'key_file_name\'\n | MASTER_SSL_CIPHER = \'cipher_list\'\n | MASTER_SSL_VERIFY_SERVER_CERT = {0|1}\n | IGNORE_SERVER_IDS = (server_id_list)\n\nserver_id_list:\n [server_id [, server_id] ... ]\n\nCHANGE MASTER TO changes the parameters that the slave server uses for\nconnecting to the master server, for reading the master binary log, and\nreading the slave relay log. It also updates the contents of the\nmaster.info and relay-log.info files. To use CHANGE MASTER TO, the\nslave replication threads must be stopped (use STOP SLAVE if\nnecessary).\n\nOptions not specified retain their value, except as indicated in the\nfollowing discussion. Thus, in most cases, there is no need to specify\noptions that do not change. For example, if the password to connect to\nyour MySQL master has changed, you just need to issue these statements\nto tell the slave about the new password:\n\nSTOP SLAVE; -- if replication was running\nCHANGE MASTER TO MASTER_PASSWORD=\'new3cret\';\nSTART SLAVE; -- if you want to restart replication\n\nMASTER_HOST, MASTER_USER, MASTER_PASSWORD, and MASTER_PORT provide\ninformation to the slave about how to connect to its master:\n\no MASTER_HOST and MASTER_PORT are the host name (or IP address) of the\n master host and its TCP/IP port.\n\n *Note*: Replication cannot use Unix socket files. You must be able to\n connect to the master MySQL server using TCP/IP.\n\n If you specify the MASTER_HOST or MASTER_PORT option, the slave\n assumes that the master server is different from before (even if the\n option value is the same as its current value.) In this case, the old\n values for the master binary log file name and position are\n considered no longer applicable, so if you do not specify\n MASTER_LOG_FILE and MASTER_LOG_POS in the statement,\n MASTER_LOG_FILE=\'\' and MASTER_LOG_POS=4 are silently appended to it.\n\n Setting MASTER_HOST=\'\' (that is, setting its value explicitly to an\n empty string) is not the same as not setting MASTER_HOST at all.\n Beginning with MySQL 5.5, trying to set MASTER_HOST to an empty\n string fails with an error. Previously, setting MASTER_HOST to an\n empty string caused START SLAVE subsequently to fail. (Bug #28796)\n\no MASTER_USER and MASTER_PASSWORD are the user name and password of the\n account to use for connecting to the master.\n\n In MySQL 5.5.20 and later, MASTER_USER cannot be made empty; setting\n MASTER_USER = \'\' or leaving it unset when setting a value for for\n MASTER_PASSWORD causes an error (Bug #13427949).\n\n Currently, a password used for a replication slave account is\n effectively limited to 32 characters in length; the password can be\n longer, but any excess characters are truncated. This is not due to\n any limit imposed by the MySQL Server generally, but rather is an\n issue specific to MySQL Replication. (For more information, see Bug\n #43439.)\n\n The text of a running CHANGE MASTER TO statement, including values\n for MASTER_USER and MASTER_PASSWORD, can be seen in the output of a\n concurrent SHOW PROCESSLIST statement.\n\nThe MASTER_SSL_xxx options provide information about using SSL for the\nconnection. They correspond to the --ssl-xxx options described in\nhttp://dev.mysql.com/doc/refman/5.5/en/ssl-options.html, and\nhttp://dev.mysql.com/doc/refman/5.5/en/replication-solutions-ssl.html.\nThese options can be changed even on slaves that are compiled without\nSSL support. They are saved to the master.info file, but are ignored if\nthe slave does not have SSL support enabled.\n\nMASTER_CONNECT_RETRY specifies how many seconds to wait between connect\nretries. The default is 60. The number of reconnection attempts is\nlimited by the --master-retry-count server option; for more\ninformation, see\nhttp://dev.mysql.com/doc/refman/5.5/en/replication-options.html.\n\nThe MASTER_BIND option is available in MySQL Cluster NDB 7.2 and later,\nbut is not supported in mainline MySQL 5.5.\n\nMASTER_BIND is for use on replication slaves having multiple network\ninterfaces, and determines which of the slave\'s network interfaces is\nchosen for connecting to the master.\n\nMASTER_HEARTBEAT_PERIOD sets the interval in seconds between\nreplication heartbeats. Whenever the master\'s binary log is updated\nwith an event, the waiting period for the next heartbeat is reset.\ninterval is a decimal value having the range 0 to 4294967 seconds and a\nresolution in milliseconds; the smallest nonzero value is 0.001.\nHeartbeats are sent by the master only if there are no unsent events in\nthe binary log file for a period longer than interval.\n\nSetting interval to 0 disables heartbeats altogether. The default value\nfor interval is equal to the value of slave_net_timeout divided by 2.\n\nSetting @@global.slave_net_timeout to a value less than that of the\ncurrent heartbeat interval results in a warning being issued. The\neffect of issuing RESET SLAVE on the heartbeat interval is to reset it\nto the default value.\n\nMASTER_LOG_FILE and MASTER_LOG_POS are the coordinates at which the\nslave I/O thread should begin reading from the master the next time the\nthread starts. RELAY_LOG_FILE and RELAY_LOG_POS are the coordinates at\nwhich the slave SQL thread should begin reading from the relay log the\nnext time the thread starts. If you specify either of MASTER_LOG_FILE\nor MASTER_LOG_POS, you cannot specify RELAY_LOG_FILE or RELAY_LOG_POS.\nIf neither of MASTER_LOG_FILE or MASTER_LOG_POS is specified, the slave\nuses the last coordinates of the slave SQL thread before CHANGE MASTER\nTO was issued. This ensures that there is no discontinuity in\nreplication, even if the slave SQL thread was late compared to the\nslave I/O thread, when you merely want to change, say, the password to\nuse.\n\nCHANGE MASTER TO deletes all relay log files and starts a new one,\nunless you specify RELAY_LOG_FILE or RELAY_LOG_POS. In that case, relay\nlog files are kept; the relay_log_purge global variable is set silently\nto 0.\n\nPrior to MySQL 5.5, RELAY_LOG_FILE required an absolute path. In MySQL\n5.5, the path can be relative, in which case the path is assumed to be\nrelative to the slave\'s data directory. (Bug #12190)\n\nIGNORE_SERVER_IDS was added in MySQL 5.5. This option takes a\ncomma-separated list of 0 or more server IDs. Events originating from\nthe corresponding servers are ignored, with the exception of log\nrotation and deletion events, which are still recorded in the relay\nlog.\n\nIn circular replication, the originating server normally acts as the\nterminator of its own events, so that they are not applied more than\nonce. Thus, this option is useful in circular replication when one of\nthe servers in the circle is removed. Suppose that you have a circular\nreplication setup with 4 servers, having server IDs 1, 2, 3, and 4, and\nserver 3 fails. When bridging the gap by starting replication from\nserver 2 to server 4, you can include IGNORE_SERVER_IDS = (3) in the\nCHANGE MASTER TO statement that you issue on server 4 to tell it to use\nserver 2 as its master instead of server 3. Doing so causes it to\nignore and not to propagate any statements that originated with the\nserver that is no longer in use.\n\nIf a CHANGE MASTER TO statement is issued without any IGNORE_SERVER_IDS\noption, any existing list is preserved; RESET SLAVE also has no effect\non the server ID list. To clear the list of ignored servers, it is\nnecessary to use the option with an empty list:\n\nCHANGE MASTER TO IGNORE_SERVER_IDS = ();\n\nIf IGNORE_SERVER_IDS contains the server\'s own ID and the server was\nstarted with the --replicate-same-server-id option enabled, an error\nresults.\n\nAlso beginning with MySQL 5.5, the master.info file and the output of\nSHOW SLAVE STATUS are extended to provide the list of servers that are\ncurrently ignored. For more information, see\nhttp://dev.mysql.com/doc/refman/5.5/en/slave-logs-status.html, and\n[HELP SHOW SLAVE STATUS].\n\nBeginning with MySQL 5.5.5, invoking CHANGE MASTER TO causes the\nprevious values for MASTER_HOST, MASTER_PORT, MASTER_LOG_FILE, and\nMASTER_LOG_POS to be written to the error log, along with other\ninformation about the slave\'s state prior to execution.\n\nCHANGE MASTER TO is useful for setting up a slave when you have the\nsnapshot of the master and have recorded the master binary log\ncoordinates corresponding to the time of the snapshot. After loading\nthe snapshot into the slave to synchronize it to the slave, you can run\nCHANGE MASTER TO MASTER_LOG_FILE=\'log_name\', MASTER_LOG_POS=log_pos on\nthe slave to specify the coordinates at which the slave should begin\nreading the master binary log.\n\nThe following example changes the master server the slave uses and\nestablishes the master binary log coordinates from which the slave\nbegins reading. This is used when you want to set up the slave to\nreplicate the master:\n\nCHANGE MASTER TO\n MASTER_HOST=\'master2.mycompany.com\',\n MASTER_USER=\'replication\',\n MASTER_PASSWORD=\'bigs3cret\',\n MASTER_PORT=3306,\n MASTER_LOG_FILE=\'master2-bin.001\',\n MASTER_LOG_POS=4,\n MASTER_CONNECT_RETRY=10;\n\nThe next example shows an operation that is less frequently employed.\nIt is used when the slave has relay log files that you want it to\nexecute again for some reason. To do this, the master need not be\nreachable. You need only use CHANGE MASTER TO and start the SQL thread\n(START SLAVE SQL_THREAD):\n\nCHANGE MASTER TO\n RELAY_LOG_FILE=\'slave-relay-bin.006\',\n RELAY_LOG_POS=4025;\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/change-master-to.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/change-master-to.html'),(186,'DROP DATABASE',39,'Syntax:\nDROP {DATABASE | SCHEMA} [IF EXISTS] db_name\n\nDROP DATABASE drops all tables in the database and deletes the\ndatabase. Be very careful with this statement! To use DROP DATABASE,\nyou need the DROP privilege on the database. DROP SCHEMA is a synonym\nfor DROP DATABASE.\n\n*Important*: When a database is dropped, user privileges on the\ndatabase are not automatically dropped. See [HELP GRANT].\n\nIF EXISTS is used to prevent an error from occurring if the database\ndoes not exist.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/drop-database.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/drop-database.html'),(187,'MBREQUAL',6,'MBREqual(g1,g2)\n\nReturns 1 or 0 to indicate whether the Minimum Bounding Rectangles of\nthe two geometries g1 and g2 are the same.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/functions-for-testing-spatial-relations-between-geometric-objects.html#relations-on-geometry-mbr\n\n','','http://dev.mysql.com/doc/refman/5.5/en/functions-for-testing-spatial-relations-between-geometric-objects.html#relations-on-geometry-mbr'),(188,'TIMESTAMP FUNCTION',31,'Syntax:\nTIMESTAMP(expr), TIMESTAMP(expr1,expr2)\n\nWith a single argument, this function returns the date or datetime\nexpression expr as a datetime value. With two arguments, it adds the\ntime expression expr2 to the date or datetime expression expr1 and\nreturns the result as a datetime value.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','mysql> SELECT TIMESTAMP(\'2003-12-31\');\n -> \'2003-12-31 00:00:00\'\nmysql> SELECT TIMESTAMP(\'2003-12-31 12:00:00\',\'12:00:00\');\n -> \'2004-01-01 00:00:00\'\n','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(189,'PROCEDURE ANALYSE',33,'Syntax:\nANALYSE([max_elements[,max_memory]])\n\nANALYSE() examines the result from a query and returns an analysis of\nthe results that suggests optimal data types for each column that may\nhelp reduce table sizes. To obtain this analysis, append PROCEDURE\nANALYSE to the end of a SELECT statement:\n\nSELECT ... FROM ... WHERE ... PROCEDURE ANALYSE([max_elements,[max_memory]])\n\nFor example:\n\nSELECT col1, col2 FROM table1 PROCEDURE ANALYSE(10, 2000);\n\nThe results show some statistics for the values returned by the query,\nand propose an optimal data type for the columns. This can be helpful\nfor checking your existing tables, or after importing new data. You may\nneed to try different settings for the arguments so that PROCEDURE\nANALYSE() does not suggest the ENUM data type when it is not\nappropriate.\n\nThe arguments are optional and are used as follows:\n\no max_elements (default 256) is the maximum number of distinct values\n that ANALYSE() notices per column. This is used by ANALYSE() to check\n whether the optimal data type should be of type ENUM; if there are\n more than max_elements distinct values, then ENUM is not a suggested\n type.\n\no max_memory (default 8192) is the maximum amount of memory that\n ANALYSE() should allocate per column while trying to find all\n distinct values.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/procedure-analyse.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/procedure-analyse.html'),(190,'HELP_VERSION',9,'This help information was generated from the MySQL 5.5 Reference Manual\non: 2012-08-25 (revision: 31914)\n\nThis information applies to MySQL 5.5 through 5.5.29.\n','',''),(191,'CHARACTER_LENGTH',37,'Syntax:\nCHARACTER_LENGTH(str)\n\nCHARACTER_LENGTH() is a synonym for CHAR_LENGTH().\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/string-functions.html'),(192,'SHOW GRANTS',26,'Syntax:\nSHOW GRANTS [FOR user]\n\nThis statement lists the GRANT statement or statements that must be\nissued to duplicate the privileges that are granted to a MySQL user\naccount. The account is named using the same format as for the GRANT\nstatement; for example, \'jeffrey\'@\'localhost\'. If you specify only the\nuser name part of the account name, a host name part of \'%\' is used.\nFor additional information about specifying account names, see [HELP\nGRANT].\n\nmysql> SHOW GRANTS FOR \'root\'@\'localhost\';\n+---------------------------------------------------------------------+\n| Grants for root@localhost |\n+---------------------------------------------------------------------+\n| GRANT ALL PRIVILEGES ON *.* TO \'root\'@\'localhost\' WITH GRANT OPTION |\n+---------------------------------------------------------------------+\n\nTo list the privileges granted to the account that you are using to\nconnect to the server, you can use any of the following statements:\n\nSHOW GRANTS;\nSHOW GRANTS FOR CURRENT_USER;\nSHOW GRANTS FOR CURRENT_USER();\n\nIf SHOW GRANTS FOR CURRENT_USER (or any of the equivalent syntaxes) is\nused in DEFINER context, such as within a stored procedure that is\ndefined with SQL SECURITY DEFINER), the grants displayed are those of\nthe definer and not the invoker.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/show-grants.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/show-grants.html'),(193,'SHOW PRIVILEGES',26,'Syntax:\nSHOW PRIVILEGES\n\nSHOW PRIVILEGES shows the list of system privileges that the MySQL\nserver supports. The exact list of privileges depends on the version of\nyour server.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/show-privileges.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/show-privileges.html'),(194,'CREATE TABLESPACE',39,'Syntax:\nCREATE TABLESPACE tablespace_name\n ADD DATAFILE \'file_name\'\n USE LOGFILE GROUP logfile_group\n [EXTENT_SIZE [=] extent_size]\n [INITIAL_SIZE [=] initial_size]\n [AUTOEXTEND_SIZE [=] autoextend_size]\n [MAX_SIZE [=] max_size]\n [NODEGROUP [=] nodegroup_id]\n [WAIT]\n [COMMENT [=] comment_text]\n ENGINE [=] engine_name\n\nThis statement is used to create a tablespace, which can contain one or\nmore data files, providing storage space for tables. One data file is\ncreated and added to the tablespace using this statement. Additional\ndata files may be added to the tablespace by using the ALTER TABLESPACE\nstatement (see [HELP ALTER TABLESPACE]). For rules covering the naming\nof tablespaces, see\nhttp://dev.mysql.com/doc/refman/5.5/en/identifiers.html.\n\n*Note*: All MySQL Cluster Disk Data objects share the same namespace.\nThis means that each Disk Data object must be uniquely named (and not\nmerely each Disk Data object of a given type). For example, you cannot\nhave a tablespace and a log file group with the same name, or a\ntablespace and a data file with the same name.\n\nA log file group of one or more UNDO log files must be assigned to the\ntablespace to be created with the USE LOGFILE GROUP clause.\nlogfile_group must be an existing log file group created with CREATE\nLOGFILE GROUP (see\nhttp://dev.mysql.com/doc/refman/5.5/en/create-logfile-group.html).\nMultiple tablespaces may use the same log file group for UNDO logging.\n\nThe EXTENT_SIZE sets the size, in bytes, of the extents used by any\nfiles belonging to the tablespace. The default value is 1M. The minimum\nsize is 32K, and theoretical maximum is 2G, although the practical\nmaximum size depends on a number of factors. In most cases, changing\nthe extent size does not have any measurable effect on performance, and\nthe default value is recommended for all but the most unusual\nsituations.\n\nAn extent is a unit of disk space allocation. One extent is filled with\nas much data as that extent can contain before another extent is used.\nIn theory, up to 65,535 (64K) extents may used per data file; however,\nthe recommended maximum is 32,768 (32K). The recommended maximum size\nfor a single data file is 32G---that is, 32K extents x 1 MB per extent.\nIn addition, once an extent is allocated to a given partition, it\ncannot be used to store data from a different partition; an extent\ncannot store data from more than one partition. This means, for example\nthat a tablespace having a single datafile whose INITIAL_SIZE is 256 MB\nand whose EXTENT_SIZE is 128M has just two extents, and so can be used\nto store data from at most two different disk data table partitions.\n\nYou can see how many extents remain free in a given data file by\nquerying the INFORMATION_SCHEMA.FILES table, and so derive an estimate\nfor how much space remains free in the file. For further discussion and\nexamples, see http://dev.mysql.com/doc/refman/5.5/en/files-table.html.\n\nThe INITIAL_SIZE parameter sets the data file\'s total size in bytes.\nOnce the file has been created, its size cannot be changed; however,\nyou can add more data files to the tablespace using ALTER TABLESPACE\n... ADD DATAFILE. See [HELP ALTER TABLESPACE].\n\nINITIAL_SIZE is optional; its default value is 128M.\n\nOn 32-bit systems, the maximum supported value for INITIAL_SIZE is 4G.\n(Bug #29186)\n\nWhen setting EXTENT_SIZE or INITIAL_SIZE (either or both), you may\noptionally follow the number with a one-letter abbreviation for an\norder of magnitude, similar to those used in my.cnf. Generally, this is\none of the letters M (for megabytes) or G (for gigabytes).\n\nINITIAL_SIZE, EXTENT_SIZE, and UNDO_BUFFER_SIZE are subject to rounding\nas follows:\n\no EXTENT_SIZE and UNDO_BUFFER_SIZE are each rounded up to the nearest\n whole multiple of 32K.\n\no INITIAL_SIZE is rounded down to the nearest whole multiple of 32K.\n\n For data files, INITIAL_SIZE is subject to further rounding; the\n result just obtained is rounded up to the nearest whole multiple of\n EXTENT_SIZE (after any rounding).\n\nThe rounding just described is done explicitly, and a warning is issued\nby the MySQL Server when any such rounding is performed. The rounded\nvalues are also used by the NDB kernel for calculating\nINFORMATION_SCHEMA.FILES column values and other purposes. However, to\navoid an unexpected result, we suggest that you always use whole\nmultiples of 32K in specifying these options.\n\nAUTOEXTEND_SIZE, MAX_SIZE, NODEGROUP, WAIT, and COMMENT are parsed but\nignored, and so currently have no effect. These options are intended\nfor future expansion.\n\nThe ENGINE parameter determines the storage engine which uses this\ntablespace, with engine_name being the name of the storage engine.\nCurrently, engine_name must be one of the values NDB or NDBCLUSTER.\n\nWhen CREATE TABLESPACE is used with ENGINE = NDB, a tablespace and\nassociated data file are created on each Cluster data node. You can\nverify that the data files were created and obtain information about\nthem by querying the INFORMATION_SCHEMA.FILES table. For example:\n\nmysql> SELECT LOGFILE_GROUP_NAME, FILE_NAME, EXTRA\n -> FROM INFORMATION_SCHEMA.FILES\n -> WHERE TABLESPACE_NAME = \'newts\' AND FILE_TYPE = \'DATAFILE\';\n+--------------------+-------------+----------------+\n| LOGFILE_GROUP_NAME | FILE_NAME | EXTRA |\n+--------------------+-------------+----------------+\n| lg_3 | newdata.dat | CLUSTER_NODE=3 |\n| lg_3 | newdata.dat | CLUSTER_NODE=4 |\n+--------------------+-------------+----------------+\n2 rows in set (0.01 sec)\n\n(See http://dev.mysql.com/doc/refman/5.5/en/files-table.html.)\n\nCREATE TABLESPACE is useful only with Disk Data storage for MySQL\nCluster. See\nhttp://dev.mysql.com/doc/refman/5.5/en/mysql-cluster-disk-data.html.\n\nTo drop a primary key, the index name is always PRIMARY, which must be\nspecified as a quoted identifier because PRIMARY is a reserved word:\n\nDROP INDEX `PRIMARY` ON t;\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/create-tablespace.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/create-tablespace.html'),(195,'INSERT FUNCTION',37,'Syntax:\nINSERT(str,pos,len,newstr)\n\nReturns the string str, with the substring beginning at position pos\nand len characters long replaced by the string newstr. Returns the\noriginal string if pos is not within the length of the string. Replaces\nthe rest of the string from position pos if len is not within the\nlength of the rest of the string. Returns NULL if any argument is NULL.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html\n\n','mysql> SELECT INSERT(\'Quadratic\', 3, 4, \'What\');\n -> \'QuWhattic\'\nmysql> SELECT INSERT(\'Quadratic\', -1, 4, \'What\');\n -> \'Quadratic\'\nmysql> SELECT INSERT(\'Quadratic\', 3, 100, \'What\');\n -> \'QuWhat\'\n','http://dev.mysql.com/doc/refman/5.5/en/string-functions.html'),(196,'CRC32',4,'Syntax:\nCRC32(expr)\n\nComputes a cyclic redundancy check value and returns a 32-bit unsigned\nvalue. The result is NULL if the argument is NULL. The argument is\nexpected to be a string and (if possible) is treated as one if it is\nnot.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html\n\n','mysql> SELECT CRC32(\'MySQL\');\n -> 3259397556\nmysql> SELECT CRC32(\'mysql\');\n -> 2501908538\n','http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html'),(197,'XOR',15,'Syntax:\nXOR\n\nLogical XOR. Returns NULL if either operand is NULL. For non-NULL\noperands, evaluates to 1 if an odd number of operands is nonzero,\notherwise 0 is returned.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/logical-operators.html\n\n','mysql> SELECT 1 XOR 1;\n -> 0\nmysql> SELECT 1 XOR 0;\n -> 1\nmysql> SELECT 1 XOR NULL;\n -> NULL\nmysql> SELECT 1 XOR 1 XOR 1;\n -> 1\n','http://dev.mysql.com/doc/refman/5.5/en/logical-operators.html'),(198,'STARTPOINT',13,'StartPoint(ls)\n\nReturns the Point that is the start point of the LineString value ls.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/geometry-property-functions.html#linestring-property-functions\n\n','mysql> SET @ls = \'LineString(1 1,2 2,3 3)\';\nmysql> SELECT AsText(StartPoint(GeomFromText(@ls)));\n+---------------------------------------+\n| AsText(StartPoint(GeomFromText(@ls))) |\n+---------------------------------------+\n| POINT(1 1) |\n+---------------------------------------+\n','http://dev.mysql.com/doc/refman/5.5/en/geometry-property-functions.html#linestring-property-functions'),(199,'GRANT',10,'Syntax:\nGRANT\n priv_type [(column_list)]\n [, priv_type [(column_list)]] ...\n ON [object_type] priv_level\n TO user_specification [, user_specification] ...\n [REQUIRE {NONE | ssl_option [[AND] ssl_option] ...}]\n [WITH with_option ...]\n\nGRANT PROXY ON user_specification\n TO user_specification [, user_specification] ...\n [WITH GRANT OPTION]\n\nobject_type:\n TABLE\n | FUNCTION\n | PROCEDURE\n\npriv_level:\n *\n | *.*\n | db_name.*\n | db_name.tbl_name\n | tbl_name\n | db_name.routine_name\n\nuser_specification:\n user\n [\n IDENTIFIED BY [PASSWORD] \'password\'\n | IDENTIFIED WITH auth_plugin [AS \'auth_string\']\n ]\n\nssl_option:\n SSL\n | X509\n | CIPHER \'cipher\'\n | ISSUER \'issuer\'\n | SUBJECT \'subject\'\n\nwith_option:\n GRANT OPTION\n | MAX_QUERIES_PER_HOUR count\n | MAX_UPDATES_PER_HOUR count\n | MAX_CONNECTIONS_PER_HOUR count\n | MAX_USER_CONNECTIONS count\n\nThe GRANT statement grants privileges to MySQL user accounts. GRANT\nalso serves to specify other account characteristics such as use of\nsecure connections and limits on access to server resources. To use\nGRANT, you must have the GRANT OPTION privilege, and you must have the\nprivileges that you are granting.\n\nNormally, a database administrator first uses CREATE USER to create an\naccount, then GRANT to define its privileges and characteristics. For\nexample:\n\nCREATE USER \'jeffrey\'@\'localhost\' IDENTIFIED BY \'mypass\';\nGRANT ALL ON db1.* TO \'jeffrey\'@\'localhost\';\nGRANT SELECT ON db2.invoice TO \'jeffrey\'@\'localhost\';\nGRANT USAGE ON *.* TO \'jeffrey\'@\'localhost\' WITH MAX_QUERIES_PER_HOUR 90;\n\nHowever, if an account named in a GRANT statement does not already\nexist, GRANT may create it under the conditions described later in the\ndiscussion of the NO_AUTO_CREATE_USER SQL mode.\n\nThe REVOKE statement is related to GRANT and enables administrators to\nremove account privileges. See [HELP REVOKE].\n\nWhen successfully executed from the mysql program, GRANT responds with\nQuery OK, 0 rows affected. To determine what privileges result from the\noperation, use SHOW GRANTS. See [HELP SHOW GRANTS].\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/grant.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/grant.html'),(200,'DECLARE VARIABLE',23,'Syntax:\nDECLARE var_name [, var_name] ... type [DEFAULT value]\n\nThis statement declares local variables within stored programs. To\nprovide a default value for a variable, include a DEFAULT clause. The\nvalue can be specified as an expression; it need not be a constant. If\nthe DEFAULT clause is missing, the initial value is NULL.\n\nLocal variables are treated like stored routine parameters with respect\nto data type and overflow checking. See [HELP CREATE PROCEDURE].\n\nVariable declarations must appear before cursor or handler\ndeclarations.\n\nLocal variable names are not case sensitive. Permissible characters and\nquoting rules are the same as for other identifiers, as described in\nhttp://dev.mysql.com/doc/refman/5.5/en/identifiers.html.\n\nThe scope of a local variable is the BEGIN ... END block within which\nit is declared. The variable can be referred to in blocks nested within\nthe declaring block, except those blocks that declare a variable with\nthe same name.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/declare-local-variable.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/declare-local-variable.html'),(201,'MPOLYFROMTEXT',3,'MPolyFromText(wkt[,srid]), MultiPolygonFromText(wkt[,srid])\n\nConstructs a MULTIPOLYGON value using its WKT representation and SRID.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-values.html#gis-wkt-functions\n\n','','http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-values.html#gis-wkt-functions'),(202,'MBRINTERSECTS',6,'MBRIntersects(g1,g2)\n\nReturns 1 or 0 to indicate whether the Minimum Bounding Rectangles of\nthe two geometries g1 and g2 intersect.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/functions-for-testing-spatial-relations-between-geometric-objects.html#relations-on-geometry-mbr\n\n','','http://dev.mysql.com/doc/refman/5.5/en/functions-for-testing-spatial-relations-between-geometric-objects.html#relations-on-geometry-mbr'),(203,'BIT_OR',16,'Syntax:\nBIT_OR(expr)\n\nReturns the bitwise OR of all bits in expr. The calculation is\nperformed with 64-bit (BIGINT) precision.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/group-by-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/group-by-functions.html'),(204,'YEARWEEK',31,'Syntax:\nYEARWEEK(date), YEARWEEK(date,mode)\n\nReturns year and week for a date. The mode argument works exactly like\nthe mode argument to WEEK(). The year in the result may be different\nfrom the year in the date argument for the first and the last week of\nthe year.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','mysql> SELECT YEARWEEK(\'1987-01-01\');\n -> 198653\n','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(205,'NOT BETWEEN',18,'Syntax:\nexpr NOT BETWEEN min AND max\n\nThis is the same as NOT (expr BETWEEN min AND max).\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/comparison-operators.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/comparison-operators.html'),(206,'IS NOT',18,'Syntax:\nIS NOT boolean_value\n\nTests a value against a boolean value, where boolean_value can be TRUE,\nFALSE, or UNKNOWN.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/comparison-operators.html\n\n','mysql> SELECT 1 IS NOT UNKNOWN, 0 IS NOT UNKNOWN, NULL IS NOT UNKNOWN;\n -> 1, 1, 0\n','http://dev.mysql.com/doc/refman/5.5/en/comparison-operators.html'),(207,'LOG10',4,'Syntax:\nLOG10(X)\n\nReturns the base-10 logarithm of X.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html\n\n','mysql> SELECT LOG10(2);\n -> 0.30102999566398\nmysql> SELECT LOG10(100);\n -> 2\nmysql> SELECT LOG10(-100);\n -> NULL\n','http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html'),(208,'SQRT',4,'Syntax:\nSQRT(X)\n\nReturns the square root of a nonnegative number X.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html\n\n','mysql> SELECT SQRT(4);\n -> 2\nmysql> SELECT SQRT(20);\n -> 4.4721359549996\nmysql> SELECT SQRT(-16);\n -> NULL\n','http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html'),(209,'DECIMAL',22,'DECIMAL[(M[,D])] [UNSIGNED] [ZEROFILL]\n\nA packed \"exact\" fixed-point number. M is the total number of digits\n(the precision) and D is the number of digits after the decimal point\n(the scale). The decimal point and (for negative numbers) the \"-\" sign\nare not counted in M. If D is 0, values have no decimal point or\nfractional part. The maximum number of digits (M) for DECIMAL is 65.\nThe maximum number of supported decimals (D) is 30. If D is omitted,\nthe default is 0. If M is omitted, the default is 10.\n\nUNSIGNED, if specified, disallows negative values.\n\nAll basic calculations (+, -, *, /) with DECIMAL columns are done with\na precision of 65 digits.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/numeric-type-overview.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/numeric-type-overview.html'),(210,'CREATE INDEX',39,'Syntax:\nCREATE [ONLINE|OFFLINE] [UNIQUE|FULLTEXT|SPATIAL] INDEX index_name\n [index_type]\n ON tbl_name (index_col_name,...)\n [index_option] ...\n\nindex_col_name:\n col_name [(length)] [ASC | DESC]\n\nindex_type:\n USING {BTREE | HASH}\n\nindex_option:\n KEY_BLOCK_SIZE [=] value\n | index_type\n | WITH PARSER parser_name\n | COMMENT \'string\'\n\nCREATE INDEX is mapped to an ALTER TABLE statement to create indexes.\nSee [HELP ALTER TABLE]. CREATE INDEX cannot be used to create a PRIMARY\nKEY; use ALTER TABLE instead. For more information about indexes, see\nhttp://dev.mysql.com/doc/refman/5.5/en/mysql-indexes.html.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/create-index.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/create-index.html'),(211,'CREATE FUNCTION',39,'The CREATE FUNCTION statement is used to create stored functions and\nuser-defined functions (UDFs):\n\no For information about creating stored functions, see [HELP CREATE\n PROCEDURE].\n\no For information about creating user-defined functions, see [HELP\n CREATE FUNCTION UDF].\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/create-function.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/create-function.html'),(212,'ALTER DATABASE',39,'Syntax:\nALTER {DATABASE | SCHEMA} [db_name]\n alter_specification ...\nALTER {DATABASE | SCHEMA} db_name\n UPGRADE DATA DIRECTORY NAME\n\nalter_specification:\n [DEFAULT] CHARACTER SET [=] charset_name\n | [DEFAULT] COLLATE [=] collation_name\n\nALTER DATABASE enables you to change the overall characteristics of a\ndatabase. These characteristics are stored in the db.opt file in the\ndatabase directory. To use ALTER DATABASE, you need the ALTER privilege\non the database. ALTER SCHEMA is a synonym for ALTER DATABASE.\n\nThe database name can be omitted from the first syntax, in which case\nthe statement applies to the default database.\n\nNational Language Characteristics\n\nThe CHARACTER SET clause changes the default database character set.\nThe COLLATE clause changes the default database collation.\nhttp://dev.mysql.com/doc/refman/5.5/en/charset.html, discusses\ncharacter set and collation names.\n\nYou can see what character sets and collations are available using,\nrespectively, the SHOW CHARACTER SET and SHOW COLLATION statements. See\n[HELP SHOW CHARACTER SET], and [HELP SHOW COLLATION], for more\ninformation.\n\nIf you change the default character set or collation for a database,\nstored routines that use the database defaults must be dropped and\nrecreated so that they use the new defaults. (In a stored routine,\nvariables with character data types use the database defaults if the\ncharacter set or collation are not specified explicitly. See [HELP\nCREATE PROCEDURE].)\n\nUpgrading from Versions Older than MySQL 5.1\n\nThe syntax that includes the UPGRADE DATA DIRECTORY NAME clause updates\nthe name of the directory associated with the database to use the\nencoding implemented in MySQL 5.1 for mapping database names to\ndatabase directory names (see\nhttp://dev.mysql.com/doc/refman/5.5/en/identifier-mapping.html). This\nclause is for use under these conditions:\n\no It is intended when upgrading MySQL to 5.1 or later from older\n versions.\n\no It is intended to update a database directory name to the current\n encoding format if the name contains special characters that need\n encoding.\n\no The statement is used by mysqlcheck (as invoked by mysql_upgrade).\n\nFor example, if a database in MySQL 5.0 has the name a-b-c, the name\ncontains instances of the - (dash) character. In MySQL 5.0, the\ndatabase directory is also named a-b-c, which is not necessarily safe\nfor all file systems. In MySQL 5.1 and later, the same database name is\nencoded as a@002db@002dc to produce a file system-neutral directory\nname.\n\nWhen a MySQL installation is upgraded to MySQL 5.1 or later from an\nolder version,the server displays a name such as a-b-c (which is in the\nold format) as #mysql50#a-b-c, and you must refer to the name using the\n#mysql50# prefix. Use UPGRADE DATA DIRECTORY NAME in this case to\nexplicitly tell the server to re-encode the database directory name to\nthe current encoding format:\n\nALTER DATABASE `#mysql50#a-b-c` UPGRADE DATA DIRECTORY NAME;\n\nAfter executing this statement, you can refer to the database as a-b-c\nwithout the special #mysql50# prefix.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/alter-database.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/alter-database.html'),(213,'GEOMETRYN',25,'GeometryN(gc,N)\n\nReturns the N-th geometry in the GeometryCollection value gc.\nGeometries are numbered beginning with 1.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/geometry-property-functions.html#geometrycollection-property-functions\n\n','mysql> SET @gc = \'GeometryCollection(Point(1 1),LineString(2 2, 3 3))\';\nmysql> SELECT AsText(GeometryN(GeomFromText(@gc),1));\n+----------------------------------------+\n| AsText(GeometryN(GeomFromText(@gc),1)) |\n+----------------------------------------+\n| POINT(1 1) |\n+----------------------------------------+\n','http://dev.mysql.com/doc/refman/5.5/en/geometry-property-functions.html#geometrycollection-property-functions'),(214,'<<',19,'Syntax:\n<<\n\nShifts a longlong (BIGINT) number to the left.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/bit-functions.html\n\n','mysql> SELECT 1 << 2;\n -> 4\n','http://dev.mysql.com/doc/refman/5.5/en/bit-functions.html'),(215,'SHOW TABLE STATUS',26,'Syntax:\nSHOW TABLE STATUS [{FROM | IN} db_name]\n [LIKE \'pattern\' | WHERE expr]\n\nSHOW TABLE STATUS works likes SHOW TABLES, but provides a lot of\ninformation about each non-TEMPORARY table. You can also get this list\nusing the mysqlshow --status db_name command. The LIKE clause, if\npresent, indicates which table names to match. The WHERE clause can be\ngiven to select rows using more general conditions, as discussed in\nhttp://dev.mysql.com/doc/refman/5.5/en/extended-show.html.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/show-table-status.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/show-table-status.html'),(216,'MD5',12,'Syntax:\nMD5(str)\n\nCalculates an MD5 128-bit checksum for the string. The value is\nreturned as a string of 32 hex digits, or NULL if the argument was\nNULL. The return value can, for example, be used as a hash key. See the\nnotes at the beginning of this section about storing hash values\nefficiently.\n\nAs of MySQL 5.5.3, the return value is a nonbinary string in the\nconnection character set. Before 5.5.3, the return value is a binary\nstring; see the notes at the beginning of this section about using the\nvalue as a nonbinary string.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/encryption-functions.html\n\n','mysql> SELECT MD5(\'testing\');\n -> \'ae2b1fca515949e5d54fb22b8ed95575\'\n','http://dev.mysql.com/doc/refman/5.5/en/encryption-functions.html'),(217,'<',18,'Syntax:\n<\n\nLess than:\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/comparison-operators.html\n\n','mysql> SELECT 2 < 2;\n -> 0\n','http://dev.mysql.com/doc/refman/5.5/en/comparison-operators.html'),(218,'UNIX_TIMESTAMP',31,'Syntax:\nUNIX_TIMESTAMP(), UNIX_TIMESTAMP(date)\n\nIf called with no argument, returns a Unix timestamp (seconds since\n\'1970-01-01 00:00:00\' UTC) as an unsigned integer. If UNIX_TIMESTAMP()\nis called with a date argument, it returns the value of the argument as\nseconds since \'1970-01-01 00:00:00\' UTC. date may be a DATE string, a\nDATETIME string, a TIMESTAMP, or a number in the format YYMMDD or\nYYYYMMDD. The server interprets date as a value in the current time\nzone and converts it to an internal value in UTC. Clients can set their\ntime zone as described in\nhttp://dev.mysql.com/doc/refman/5.5/en/time-zone-support.html.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','mysql> SELECT UNIX_TIMESTAMP();\n -> 1196440210\nmysql> SELECT UNIX_TIMESTAMP(\'2007-11-30 10:30:19\');\n -> 1196440219\n','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(219,'DAYOFMONTH',31,'Syntax:\nDAYOFMONTH(date)\n\nReturns the day of the month for date, in the range 1 to 31, or 0 for\ndates such as \'0000-00-00\' or \'2008-00-00\' that have a zero day part.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','mysql> SELECT DAYOFMONTH(\'2007-02-03\');\n -> 3\n','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(220,'ASCII',37,'Syntax:\nASCII(str)\n\nReturns the numeric value of the leftmost character of the string str.\nReturns 0 if str is the empty string. Returns NULL if str is NULL.\nASCII() works for 8-bit characters.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html\n\n','mysql> SELECT ASCII(\'2\');\n -> 50\nmysql> SELECT ASCII(2);\n -> 50\nmysql> SELECT ASCII(\'dx\');\n -> 100\n','http://dev.mysql.com/doc/refman/5.5/en/string-functions.html'),(221,'DIV',4,'Syntax:\nDIV\n\nInteger division. Similar to FLOOR(), but is safe with BIGINT values.\n\nAs of MySQL 5.5.3, if either operand has a noninteger type, the\noperands are converted to DECIMAL and divided using DECIMAL arithmetic\nbefore converting the result to BIGINT. If the result exceeds BIGINT\nrange, an error occurs. Before MySQL 5.5.3, incorrect results may occur\nfor noninteger operands that exceed BIGINT range.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/arithmetic-functions.html\n\n','mysql> SELECT 5 DIV 2;\n -> 2\n','http://dev.mysql.com/doc/refman/5.5/en/arithmetic-functions.html'),(222,'RENAME USER',10,'Syntax:\nRENAME USER old_user TO new_user\n [, old_user TO new_user] ...\n\nThe RENAME USER statement renames existing MySQL accounts. To use it,\nyou must have the global CREATE USER privilege or the UPDATE privilege\nfor the mysql database. An error occurs if any old account does not\nexist or any new account exists. Each account name uses the format\ndescribed in http://dev.mysql.com/doc/refman/5.5/en/account-names.html.\nFor example:\n\nRENAME USER \'jeffrey\'@\'localhost\' TO \'jeff\'@\'127.0.0.1\';\n\nIf you specify only the user name part of the account name, a host name\npart of \'%\' is used.\n\nRENAME USER causes the privileges held by the old user to be those held\nby the new user. However, RENAME USER does not automatically drop or\ninvalidate databases or objects within them that the old user created.\nThis includes stored programs or views for which the DEFINER attribute\nnames the old user. Attempts to access such objects may produce an\nerror if they execute in definer security context. (For information\nabout security context, see\nhttp://dev.mysql.com/doc/refman/5.5/en/stored-programs-security.html.)\n\nThe privilege changes take effect as indicated in\nhttp://dev.mysql.com/doc/refman/5.5/en/privilege-changes.html.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/rename-user.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/rename-user.html'),(223,'SHOW SLAVE STATUS',26,'Syntax:\nSHOW SLAVE STATUS\n\nThis statement provides status information on essential parameters of\nthe slave threads. It requires either the SUPER or REPLICATION CLIENT\nprivilege.\n\nIf you issue this statement using the mysql client, you can use a \\G\nstatement terminator rather than a semicolon to obtain a more readable\nvertical layout:\n\nmysql> SHOW SLAVE STATUS\\G\n*************************** 1. row ***************************\n Slave_IO_State: Waiting for master to send event\n Master_Host: localhost\n Master_User: root\n Master_Port: 3306\n Connect_Retry: 3\n Master_Log_File: gbichot-bin.005\n Read_Master_Log_Pos: 79\n Relay_Log_File: gbichot-relay-bin.005\n Relay_Log_Pos: 548\n Relay_Master_Log_File: gbichot-bin.005\n Slave_IO_Running: Yes\n Slave_SQL_Running: Yes\n Replicate_Do_DB:\n Replicate_Ignore_DB:\n Replicate_Do_Table:\n Replicate_Ignore_Table:\n Replicate_Wild_Do_Table:\n Replicate_Wild_Ignore_Table:\n Last_Errno: 0\n Last_Error:\n Skip_Counter: 0\n Exec_Master_Log_Pos: 79\n Relay_Log_Space: 552\n Until_Condition: None\n Until_Log_File:\n Until_Log_Pos: 0\n Master_SSL_Allowed: No\n Master_SSL_CA_File:\n Master_SSL_CA_Path:\n Master_SSL_Cert:\n Master_SSL_Cipher:\n Master_SSL_Key:\n Seconds_Behind_Master: 8\nMaster_SSL_Verify_Server_Cert: No\n Last_IO_Errno: 0\n Last_IO_Error:\n Last_SQL_Errno: 0\n Last_SQL_Error:\n Replicate_Ignore_Server_Ids: 0\n Master_Server_Id: 1\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/show-slave-status.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/show-slave-status.html'),(224,'GEOMETRY',34,'MySQL provides a standard way of creating spatial columns for geometry\ntypes, for example, with CREATE TABLE or ALTER TABLE. Currently,\nspatial columns are supported for MyISAM, InnoDB, NDB, and ARCHIVE\ntables. See also the annotations about spatial indexes under [HELP\nSPATIAL].\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-columns.html\n\n','CREATE TABLE geom (g GEOMETRY);\n','http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-columns.html'),(225,'NUMPOINTS',13,'NumPoints(ls)\n\nReturns the number of Point objects in the LineString value ls.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/geometry-property-functions.html#linestring-property-functions\n\n','mysql> SET @ls = \'LineString(1 1,2 2,3 3)\';\nmysql> SELECT NumPoints(GeomFromText(@ls));\n+------------------------------+\n| NumPoints(GeomFromText(@ls)) |\n+------------------------------+\n| 3 |\n+------------------------------+\n','http://dev.mysql.com/doc/refman/5.5/en/geometry-property-functions.html#linestring-property-functions'),(226,'ALTER LOGFILE GROUP',39,'Syntax:\nALTER LOGFILE GROUP logfile_group\n ADD UNDOFILE \'file_name\'\n [INITIAL_SIZE [=] size]\n [WAIT]\n ENGINE [=] engine_name\n\nThis statement adds an UNDO file named \'file_name\' to an existing log\nfile group logfile_group. An ALTER LOGFILE GROUP statement has one and\nonly one ADD UNDOFILE clause. No DROP UNDOFILE clause is currently\nsupported.\n\n*Note*: All MySQL Cluster Disk Data objects share the same namespace.\nThis means that each Disk Data object must be uniquely named (and not\nmerely each Disk Data object of a given type). For example, you cannot\nhave a tablespace and an undo log file with the same name, or an undo\nlog file and a data file with the same name.\n\nThe optional INITIAL_SIZE parameter sets the UNDO file\'s initial size\nin bytes; if not specified, the initial size default to 128M (128\nmegabytes). You may optionally follow size with a one-letter\nabbreviation for an order of magnitude, similar to those used in\nmy.cnf. Generally, this is one of the letters M (for megabytes) or G\n(for gigabytes).\n\nOn 32-bit systems, the maximum supported value for INITIAL_SIZE is 4G.\n(Bug #29186)\n\nThe minimum permitted value for INITIAL_SIZE is 1M. (Bug #29574)\n\n*Note*: WAIT is parsed but otherwise ignored. This keyword currently\nhas no effect, and is intended for future expansion.\n\nThe ENGINE parameter (required) determines the storage engine which is\nused by this log file group, with engine_name being the name of the\nstorage engine. Currently, the only accepted values for engine_name are\n\"NDBCLUSTER\" and \"NDB\". The two values are equivalent.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/alter-logfile-group.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/alter-logfile-group.html'),(227,'&',19,'Syntax:\n&\n\nBitwise AND:\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/bit-functions.html\n\n','mysql> SELECT 29 & 15;\n -> 13\n','http://dev.mysql.com/doc/refman/5.5/en/bit-functions.html'),(228,'LOCALTIMESTAMP',31,'Syntax:\nLOCALTIMESTAMP, LOCALTIMESTAMP()\n\nLOCALTIMESTAMP and LOCALTIMESTAMP() are synonyms for NOW().\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(229,'ASSIGN-EQUAL',15,'Syntax:\n=\n\nThis operator is used to perform value assignments in two cases,\ndescribed in the next two paragraphs.\n\nWithin a SET statement, = is treated as an assignment operator that\ncauses the user variable on the left hand side of the operator to take\non the value to its right. (In other words, when used in a SET\nstatement, = is treated identically to :=.) The value on the right hand\nside may be a literal value, another variable storing a value, or any\nlegal expression that yields a scalar value, including the result of a\nquery (provided that this value is a scalar value). You can perform\nmultiple assignments in the same SET statement.\n\nIn the SET clause of an UPDATE statement, = also acts as an assignment\noperator; in this case, however, it causes the column named on the left\nhand side of the operator to assume the value given to the right,\nprovided any WHERE conditions that are part of the UPDATE are met. You\ncan make multiple assignments in the same SET clause of an UPDATE\nstatement.\n\nIn any other context, = is treated as a comparison operator.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/assignment-operators.html\n\n','mysql> SELECT @var1, @var2;\n -> NULL, NULL\nmysql> SELECT @var1 := 1, @var2;\n -> 1, NULL\nmysql> SELECT @var1, @var2;\n -> 1, NULL\nmysql> SELECT @var1, @var2 := @var1;\n -> 1, 1\nmysql> SELECT @var1, @var2;\n -> 1, 1\n','http://dev.mysql.com/doc/refman/5.5/en/assignment-operators.html'),(230,'CONVERT',37,'Syntax:\nCONVERT(expr,type), CONVERT(expr USING transcoding_name)\n\nThe CONVERT() and CAST() functions take an expression of any type and\nproduce a result value of a specified type.\n\nThe type for the result can be one of the following values:\n\no BINARY[(N)]\n\no CHAR[(N)]\n\no DATE\n\no DATETIME\n\no DECIMAL[(M[,D])]\n\no SIGNED [INTEGER]\n\no TIME\n\no UNSIGNED [INTEGER]\n\nBINARY produces a string with the BINARY data type. See\nhttp://dev.mysql.com/doc/refman/5.5/en/binary-varbinary.html for a\ndescription of how this affects comparisons. If the optional length N\nis given, BINARY(N) causes the cast to use no more than N bytes of the\nargument. Values shorter than N bytes are padded with 0x00 bytes to a\nlength of N.\n\nCHAR(N) causes the cast to use no more than N characters of the\nargument.\n\nCAST() and CONVERT(... USING ...) are standard SQL syntax. The\nnon-USING form of CONVERT() is ODBC syntax.\n\nCONVERT() with USING is used to convert data between different\ncharacter sets. In MySQL, transcoding names are the same as the\ncorresponding character set names. For example, this statement converts\nthe string \'abc\' in the default character set to the corresponding\nstring in the utf8 character set:\n\nSELECT CONVERT(\'abc\' USING utf8);\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/cast-functions.html\n\n','SELECT enum_col FROM tbl_name ORDER BY CAST(enum_col AS CHAR);\n','http://dev.mysql.com/doc/refman/5.5/en/cast-functions.html'),(231,'ADDDATE',31,'Syntax:\nADDDATE(date,INTERVAL expr unit), ADDDATE(expr,days)\n\nWhen invoked with the INTERVAL form of the second argument, ADDDATE()\nis a synonym for DATE_ADD(). The related function SUBDATE() is a\nsynonym for DATE_SUB(). For information on the INTERVAL unit argument,\nsee the discussion for DATE_ADD().\n\nmysql> SELECT DATE_ADD(\'2008-01-02\', INTERVAL 31 DAY);\n -> \'2008-02-02\'\nmysql> SELECT ADDDATE(\'2008-01-02\', INTERVAL 31 DAY);\n -> \'2008-02-02\'\n\nWhen invoked with the days form of the second argument, MySQL treats it\nas an integer number of days to be added to expr.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','mysql> SELECT ADDDATE(\'2008-01-02\', 31);\n -> \'2008-02-02\'\n','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(232,'REPEAT LOOP',23,'Syntax:\n[begin_label:] REPEAT\n statement_list\nUNTIL search_condition\nEND REPEAT [end_label]\n\nThe statement list within a REPEAT statement is repeated until the\nsearch_condition expression is true. Thus, a REPEAT always enters the\nloop at least once. statement_list consists of one or more statements,\neach terminated by a semicolon (;) statement delimiter.\n\nA REPEAT statement can be labeled. For the rules regarding label use,\nsee [HELP labels].\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/repeat.html\n\n','mysql> delimiter //\n\nmysql> CREATE PROCEDURE dorepeat(p1 INT)\n -> BEGIN\n -> SET @x = 0;\n -> REPEAT\n -> SET @x = @x + 1;\n -> UNTIL @x > p1 END REPEAT;\n -> END\n -> //\nQuery OK, 0 rows affected (0.00 sec)\n\nmysql> CALL dorepeat(1000)//\nQuery OK, 0 rows affected (0.00 sec)\n\nmysql> SELECT @x//\n+------+\n| @x |\n+------+\n| 1001 |\n+------+\n1 row in set (0.00 sec)\n','http://dev.mysql.com/doc/refman/5.5/en/repeat.html'),(233,'ALTER FUNCTION',39,'Syntax:\nALTER FUNCTION func_name [characteristic ...]\n\ncharacteristic:\n COMMENT \'string\'\n | LANGUAGE SQL\n | { CONTAINS SQL | NO SQL | READS SQL DATA | MODIFIES SQL DATA }\n | SQL SECURITY { DEFINER | INVOKER }\n\nThis statement can be used to change the characteristics of a stored\nfunction. More than one change may be specified in an ALTER FUNCTION\nstatement. However, you cannot change the parameters or body of a\nstored function using this statement; to make such changes, you must\ndrop and re-create the function using DROP FUNCTION and CREATE\nFUNCTION.\n\nYou must have the ALTER ROUTINE privilege for the function. (That\nprivilege is granted automatically to the function creator.) If binary\nlogging is enabled, the ALTER FUNCTION statement might also require the\nSUPER privilege, as described in\nhttp://dev.mysql.com/doc/refman/5.5/en/stored-programs-logging.html.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/alter-function.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/alter-function.html'),(234,'SMALLINT',22,'SMALLINT[(M)] [UNSIGNED] [ZEROFILL]\n\nA small integer. The signed range is -32768 to 32767. The unsigned\nrange is 0 to 65535.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/numeric-type-overview.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/numeric-type-overview.html'),(235,'DOUBLE PRECISION',22,'DOUBLE PRECISION[(M,D)] [UNSIGNED] [ZEROFILL], REAL[(M,D)] [UNSIGNED]\n[ZEROFILL]\n\nThese types are synonyms for DOUBLE. Exception: If the REAL_AS_FLOAT\nSQL mode is enabled, REAL is a synonym for FLOAT rather than DOUBLE.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/numeric-type-overview.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/numeric-type-overview.html'),(236,'ORD',37,'Syntax:\nORD(str)\n\nIf the leftmost character of the string str is a multi-byte character,\nreturns the code for that character, calculated from the numeric values\nof its constituent bytes using this formula:\n\n (1st byte code)\n+ (2nd byte code * 256)\n+ (3rd byte code * 2562) ...\n\nIf the leftmost character is not a multi-byte character, ORD() returns\nthe same value as the ASCII() function.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html\n\n','mysql> SELECT ORD(\'2\');\n -> 50\n','http://dev.mysql.com/doc/refman/5.5/en/string-functions.html'),(237,'DEALLOCATE PREPARE',8,'Syntax:\n{DEALLOCATE | DROP} PREPARE stmt_name\n\nTo deallocate a prepared statement produced with PREPARE, use a\nDEALLOCATE PREPARE statement that refers to the prepared statement\nname. Attempting to execute a prepared statement after deallocating it\nresults in an error.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/deallocate-prepare.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/deallocate-prepare.html'),(238,'ENVELOPE',36,'Envelope(g)\n\nReturns the Minimum Bounding Rectangle (MBR) for the geometry value g.\nThe result is returned as a Polygon value.\n\nThe polygon is defined by the corner points of the bounding box:\n\nPOLYGON((MINX MINY, MAXX MINY, MAXX MAXY, MINX MAXY, MINX MINY))\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/geometry-property-functions.html#general-geometry-property-functions\n\n','mysql> SELECT AsText(Envelope(GeomFromText(\'LineString(1 1,2 2)\')));\n+-------------------------------------------------------+\n| AsText(Envelope(GeomFromText(\'LineString(1 1,2 2)\'))) |\n+-------------------------------------------------------+\n| POLYGON((1 1,2 1,2 2,1 2,1 1)) |\n+-------------------------------------------------------+\n','http://dev.mysql.com/doc/refman/5.5/en/geometry-property-functions.html#general-geometry-property-functions'),(239,'IS_FREE_LOCK',14,'Syntax:\nIS_FREE_LOCK(str)\n\nChecks whether the lock named str is free to use (that is, not locked).\nReturns 1 if the lock is free (no one is using the lock), 0 if the lock\nis in use, and NULL if an error occurs (such as an incorrect argument).\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/miscellaneous-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/miscellaneous-functions.html'),(240,'TOUCHES',30,'Touches(g1,g2)\n\nReturns 1 or 0 to indicate whether g1 spatially touches g2. Two\ngeometries spatially touch if the interiors of the geometries do not\nintersect, but the boundary of one of the geometries intersects either\nthe boundary or the interior of the other.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/functions-for-testing-spatial-relations-between-geometric-objects.html#functions-that-test-spatial-relationships-between-geometries\n\n','','http://dev.mysql.com/doc/refman/5.5/en/functions-for-testing-spatial-relations-between-geometric-objects.html#functions-that-test-spatial-relationships-between-geometries'),(241,'INET_ATON',14,'Syntax:\nINET_ATON(expr)\n\nGiven the dotted-quad representation of an IPv4 network address as a\nstring, returns an integer that represents the numeric value of the\naddress in network byte order (big endian). INET_ATON() returns NULL if\nit does not understand its argument.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/miscellaneous-functions.html\n\n','mysql> SELECT INET_ATON(\'10.0.5.9\');\n -> 167773449\n','http://dev.mysql.com/doc/refman/5.5/en/miscellaneous-functions.html'),(242,'UNCOMPRESS',12,'Syntax:\nUNCOMPRESS(string_to_uncompress)\n\nUncompresses a string compressed by the COMPRESS() function. If the\nargument is not a compressed value, the result is NULL. This function\nrequires MySQL to have been compiled with a compression library such as\nzlib. Otherwise, the return value is always NULL.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/encryption-functions.html\n\n','mysql> SELECT UNCOMPRESS(COMPRESS(\'any string\'));\n -> \'any string\'\nmysql> SELECT UNCOMPRESS(\'any string\');\n -> NULL\n','http://dev.mysql.com/doc/refman/5.5/en/encryption-functions.html'),(243,'AUTO_INCREMENT',22,'The AUTO_INCREMENT attribute can be used to generate a unique identity\nfor new rows:\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/example-auto-increment.html\n\n','CREATE TABLE animals (\n id MEDIUMINT NOT NULL AUTO_INCREMENT,\n name CHAR(30) NOT NULL,\n PRIMARY KEY (id)\n);\n\nINSERT INTO animals (name) VALUES\n (\'dog\'),(\'cat\'),(\'penguin\'),\n (\'lax\'),(\'whale\'),(\'ostrich\');\n\nSELECT * FROM animals;\n','http://dev.mysql.com/doc/refman/5.5/en/example-auto-increment.html'),(244,'ISSIMPLE',36,'IsSimple(g)\n\nCurrently, this function is a placeholder and should not be used. If\nimplemented, its behavior will be as described in the next paragraph.\n\nReturns 1 if the geometry value g has no anomalous geometric points,\nsuch as self-intersection or self-tangency. IsSimple() returns 0 if the\nargument is not simple, and -1 if it is NULL.\n\nThe description of each instantiable geometric class given earlier in\nthe chapter includes the specific conditions that cause an instance of\nthat class to be classified as not simple. (See [HELP Geometry\nhierarchy].)\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/geometry-property-functions.html#general-geometry-property-functions\n\n','','http://dev.mysql.com/doc/refman/5.5/en/geometry-property-functions.html#general-geometry-property-functions'),(245,'- BINARY',4,'Syntax:\n-\n\nSubtraction:\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/arithmetic-functions.html\n\n','mysql> SELECT 3-5;\n -> -2\n','http://dev.mysql.com/doc/refman/5.5/en/arithmetic-functions.html'),(246,'GEOMCOLLFROMTEXT',3,'GeomCollFromText(wkt[,srid]), GeometryCollectionFromText(wkt[,srid])\n\nConstructs a GEOMETRYCOLLECTION value using its WKT representation and\nSRID.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-values.html#gis-wkt-functions\n\n','','http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-values.html#gis-wkt-functions'),(247,'WKT DEFINITION',3,'The Well-Known Text (WKT) representation of Geometry is designed to\nexchange geometry data in ASCII form. For a Backus-Naur grammar that\nspecifies the formal production rules for writing WKT values, see the\nOpenGIS specification document referenced in\nhttp://dev.mysql.com/doc/refman/5.5/en/spatial-extensions.html.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/gis-wkt-format.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/gis-wkt-format.html'),(248,'CURRENT_TIME',31,'Syntax:\nCURRENT_TIME, CURRENT_TIME()\n\nCURRENT_TIME and CURRENT_TIME() are synonyms for CURTIME().\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(249,'REVOKE',10,'Syntax:\nREVOKE\n priv_type [(column_list)]\n [, priv_type [(column_list)]] ...\n ON [object_type] priv_level\n FROM user [, user] ...\n\nREVOKE ALL PRIVILEGES, GRANT OPTION\n FROM user [, user] ...\n\nREVOKE PROXY ON user\n FROM user [, user] ...\n\nThe REVOKE statement enables system administrators to revoke privileges\nfrom MySQL accounts. Each account name uses the format described in\nhttp://dev.mysql.com/doc/refman/5.5/en/account-names.html. For example:\n\nREVOKE INSERT ON *.* FROM \'jeffrey\'@\'localhost\';\n\nIf you specify only the user name part of the account name, a host name\npart of \'%\' is used.\n\nFor details on the levels at which privileges exist, the permissible\npriv_type and priv_level values, and the syntax for specifying users\nand passwords, see [HELP GRANT]\n\nTo use the first REVOKE syntax, you must have the GRANT OPTION\nprivilege, and you must have the privileges that you are revoking.\n\nTo revoke all privileges, use the second syntax, which drops all\nglobal, database, table, column, and routine privileges for the named\nuser or users:\n\nREVOKE ALL PRIVILEGES, GRANT OPTION FROM user [, user] ...\n\nTo use this REVOKE syntax, you must have the global CREATE USER\nprivilege or the UPDATE privilege for the mysql database.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/revoke.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/revoke.html'),(250,'LAST_INSERT_ID',17,'Syntax:\nLAST_INSERT_ID(), LAST_INSERT_ID(expr)\n\nLAST_INSERT_ID() (with no argument) returns a BIGINT (64-bit) value\nrepresenting the first automatically generated value successfully\ninserted for an AUTO_INCREMENT column as a result of the most recently\nexecuted INSERT statement. The value of LAST_INSERT_ID() remains\nunchanged if no rows are successfully inserted.\n\nFor example, after inserting a row that generates an AUTO_INCREMENT\nvalue, you can get the value like this:\n\nmysql> SELECT LAST_INSERT_ID();\n -> 195\n\nThe currently executing statement does not affect the value of\nLAST_INSERT_ID(). Suppose that you generate an AUTO_INCREMENT value\nwith one statement, and then refer to LAST_INSERT_ID() in a\nmultiple-row INSERT statement that inserts rows into a table with its\nown AUTO_INCREMENT column. The value of LAST_INSERT_ID() will remain\nstable in the second statement; its value for the second and later rows\nis not affected by the earlier row insertions. (However, if you mix\nreferences to LAST_INSERT_ID() and LAST_INSERT_ID(expr), the effect is\nundefined.)\n\nIf the previous statement returned an error, the value of\nLAST_INSERT_ID() is undefined. For transactional tables, if the\nstatement is rolled back due to an error, the value of LAST_INSERT_ID()\nis left undefined. For manual ROLLBACK, the value of LAST_INSERT_ID()\nis not restored to that before the transaction; it remains as it was at\nthe point of the ROLLBACK.\n\nWithin the body of a stored routine (procedure or function) or a\ntrigger, the value of LAST_INSERT_ID() changes the same way as for\nstatements executed outside the body of these kinds of objects. The\neffect of a stored routine or trigger upon the value of\nLAST_INSERT_ID() that is seen by following statements depends on the\nkind of routine:\n\no If a stored procedure executes statements that change the value of\n LAST_INSERT_ID(), the changed value is seen by statements that follow\n the procedure call.\n\no For stored functions and triggers that change the value, the value is\n restored when the function or trigger ends, so following statements\n will not see a changed value.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/information-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/information-functions.html'),(251,'LAST_DAY',31,'Syntax:\nLAST_DAY(date)\n\nTakes a date or datetime value and returns the corresponding value for\nthe last day of the month. Returns NULL if the argument is invalid.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','mysql> SELECT LAST_DAY(\'2003-02-05\');\n -> \'2003-02-28\'\nmysql> SELECT LAST_DAY(\'2004-02-05\');\n -> \'2004-02-29\'\nmysql> SELECT LAST_DAY(\'2004-01-01 01:01:01\');\n -> \'2004-01-31\'\nmysql> SELECT LAST_DAY(\'2003-03-32\');\n -> NULL\n','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(252,'MEDIUMINT',22,'MEDIUMINT[(M)] [UNSIGNED] [ZEROFILL]\n\nA medium-sized integer. The signed range is -8388608 to 8388607. The\nunsigned range is 0 to 16777215.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/numeric-type-overview.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/numeric-type-overview.html'),(253,'FLOOR',4,'Syntax:\nFLOOR(X)\n\nReturns the largest integer value not greater than X.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html\n\n','mysql> SELECT FLOOR(1.23);\n -> 1\nmysql> SELECT FLOOR(-1.23);\n -> -2\n','http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html'),(254,'RTRIM',37,'Syntax:\nRTRIM(str)\n\nReturns the string str with trailing space characters removed.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html\n\n','mysql> SELECT RTRIM(\'barbar \');\n -> \'barbar\'\n','http://dev.mysql.com/doc/refman/5.5/en/string-functions.html'),(255,'EXPLAIN',28,'Syntax:\nEXPLAIN [explain_type] SELECT select_options\n\nexplain_type:\n EXTENDED\n | PARTITIONS\n\nOr:\n\nEXPLAIN tbl_name\n\nThe EXPLAIN statement can be used either as a way to obtain information\nabout how MySQL executes a statement, or as a synonym for DESCRIBE:\n\no When you precede a SELECT statement with the keyword EXPLAIN, MySQL\n displays information from the optimizer about the query execution\n plan. That is, MySQL explains how it would process the statement,\n including information about how tables are joined and in which order.\n EXPLAIN EXTENDED can be used to obtain additional information.\n\n For information about using EXPLAIN and EXPLAIN EXTENDED to obtain\n query execution plan information, see\n http://dev.mysql.com/doc/refman/5.5/en/using-explain.html.\n\no EXPLAIN PARTITIONS is useful only when examining queries involving\n partitioned tables. For details, see\n http://dev.mysql.com/doc/refman/5.5/en/partitioning-info.html.\n\no EXPLAIN tbl_name is synonymous with DESCRIBE tbl_name or SHOW COLUMNS\n FROM tbl_name. For information about DESCRIBE and SHOW COLUMNS, see\n [HELP DESCRIBE], and [HELP SHOW COLUMNS].\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/explain.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/explain.html'),(256,'DEGREES',4,'Syntax:\nDEGREES(X)\n\nReturns the argument X, converted from radians to degrees.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html\n\n','mysql> SELECT DEGREES(PI());\n -> 180\nmysql> SELECT DEGREES(PI() / 2);\n -> 90\n','http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html'),(257,'VARCHAR',22,'[NATIONAL] VARCHAR(M) [CHARACTER SET charset_name] [COLLATE\ncollation_name]\n\nA variable-length string. M represents the maximum column length in\ncharacters. The range of M is 0 to 65,535. The effective maximum length\nof a VARCHAR is subject to the maximum row size (65,535 bytes, which is\nshared among all columns) and the character set used. For example, utf8\ncharacters can require up to three bytes per character, so a VARCHAR\ncolumn that uses the utf8 character set can be declared to be a maximum\nof 21,844 characters. See\nhttp://dev.mysql.com/doc/refman/5.5/en/column-count-limit.html.\n\nMySQL stores VARCHAR values as a 1-byte or 2-byte length prefix plus\ndata. The length prefix indicates the number of bytes in the value. A\nVARCHAR column uses one length byte if values require no more than 255\nbytes, two length bytes if values may require more than 255 bytes.\n\n*Note*: MySQL 5.5 follows the standard SQL specification, and does not\nremove trailing spaces from VARCHAR values.\n\nVARCHAR is shorthand for CHARACTER VARYING. NATIONAL VARCHAR is the\nstandard SQL way to define that a VARCHAR column should use some\npredefined character set. MySQL 4.1 and up uses utf8 as this predefined\ncharacter set.\nhttp://dev.mysql.com/doc/refman/5.5/en/charset-national.html. NVARCHAR\nis shorthand for NATIONAL VARCHAR.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-type-overview.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/string-type-overview.html'),(258,'UNHEX',37,'Syntax:\n\nUNHEX(str)\n\nFor a string argument str, UNHEX(str) performs the inverse operation of\nHEX(str). That is, it interprets each pair of characters in the\nargument as a hexadecimal number and converts it to the character\nrepresented by the number. The return value is a binary string.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html\n\n','mysql> SELECT UNHEX(\'4D7953514C\');\n -> \'MySQL\'\nmysql> SELECT 0x4D7953514C;\n -> \'MySQL\'\nmysql> SELECT UNHEX(HEX(\'string\'));\n -> \'string\'\nmysql> SELECT HEX(UNHEX(\'1267\'));\n -> \'1267\'\n','http://dev.mysql.com/doc/refman/5.5/en/string-functions.html'),(259,'- UNARY',4,'Syntax:\n-\n\nUnary minus. This operator changes the sign of the operand.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/arithmetic-functions.html\n\n','mysql> SELECT - 2;\n -> -2\n','http://dev.mysql.com/doc/refman/5.5/en/arithmetic-functions.html'),(260,'STD',16,'Syntax:\nSTD(expr)\n\nReturns the population standard deviation of expr. This is an extension\nto standard SQL. The standard SQL function STDDEV_POP() can be used\ninstead.\n\nThis function returns NULL if there were no matching rows.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/group-by-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/group-by-functions.html'),(261,'COS',4,'Syntax:\nCOS(X)\n\nReturns the cosine of X, where X is given in radians.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html\n\n','mysql> SELECT COS(PI());\n -> -1\n','http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html'),(262,'DATE FUNCTION',31,'Syntax:\nDATE(expr)\n\nExtracts the date part of the date or datetime expression expr.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','mysql> SELECT DATE(\'2003-12-31 01:02:03\');\n -> \'2003-12-31\'\n','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(263,'DROP TRIGGER',39,'Syntax:\nDROP TRIGGER [IF EXISTS] [schema_name.]trigger_name\n\nThis statement drops a trigger. The schema (database) name is optional.\nIf the schema is omitted, the trigger is dropped from the default\nschema. DROP TRIGGER requires the TRIGGER privilege for the table\nassociated with the trigger.\n\nUse IF EXISTS to prevent an error from occurring for a trigger that\ndoes not exist. A NOTE is generated for a nonexistent trigger when\nusing IF EXISTS. See [HELP SHOW WARNINGS].\n\nTriggers for a table are also dropped if you drop the table.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/drop-trigger.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/drop-trigger.html'),(264,'RESET MASTER',8,'Syntax:\nRESET MASTER\n\nDeletes all binary log files listed in the index file, resets the\nbinary log index file to be empty, and creates a new binary log file.\nThis statement is intended to be used only when the master is started\nfor the first time.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/reset-master.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/reset-master.html'),(265,'TAN',4,'Syntax:\nTAN(X)\n\nReturns the tangent of X, where X is given in radians.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html\n\n','mysql> SELECT TAN(PI());\n -> -1.2246063538224e-16\nmysql> SELECT TAN(PI()+1);\n -> 1.5574077246549\n','http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html'),(266,'PI',4,'Syntax:\nPI()\n\nReturns the value of π (pi). The default number of decimal places\ndisplayed is seven, but MySQL uses the full double-precision value\ninternally.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html\n\n','mysql> SELECT PI();\n -> 3.141593\nmysql> SELECT PI()+0.000000000000000000;\n -> 3.141592653589793116\n','http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html'),(267,'WEEKOFYEAR',31,'Syntax:\nWEEKOFYEAR(date)\n\nReturns the calendar week of the date as a number in the range from 1\nto 53. WEEKOFYEAR() is a compatibility function that is equivalent to\nWEEK(date,3).\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','mysql> SELECT WEEKOFYEAR(\'2008-02-20\');\n -> 8\n','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(268,'/',4,'Syntax:\n/\n\nDivision:\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/arithmetic-functions.html\n\n','mysql> SELECT 3/5;\n -> 0.60\n','http://dev.mysql.com/doc/refman/5.5/en/arithmetic-functions.html'),(269,'PURGE BINARY LOGS',8,'Syntax:\nPURGE { BINARY | MASTER } LOGS\n { TO \'log_name\' | BEFORE datetime_expr }\n\nThe binary log is a set of files that contain information about data\nmodifications made by the MySQL server. The log consists of a set of\nbinary log files, plus an index file (see\nhttp://dev.mysql.com/doc/refman/5.5/en/binary-log.html).\n\nThe PURGE BINARY LOGS statement deletes all the binary log files listed\nin the log index file prior to the specified log file name or date.\nBINARY and MASTER are synonyms. Deleted log files also are removed from\nthe list recorded in the index file, so that the given log file becomes\nthe first in the list.\n\nThis statement has no effect if the server was not started with the\n--log-bin option to enable binary logging.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/purge-binary-logs.html\n\n','PURGE BINARY LOGS TO \'mysql-bin.010\';\nPURGE BINARY LOGS BEFORE \'2008-04-02 22:46:26\';\n','http://dev.mysql.com/doc/refman/5.5/en/purge-binary-logs.html'),(270,'STDDEV_SAMP',16,'Syntax:\nSTDDEV_SAMP(expr)\n\nReturns the sample standard deviation of expr (the square root of\nVAR_SAMP().\n\nSTDDEV_SAMP() returns NULL if there were no matching rows.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/group-by-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/group-by-functions.html'),(271,'SCHEMA',17,'Syntax:\nSCHEMA()\n\nThis function is a synonym for DATABASE().\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/information-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/information-functions.html'),(272,'MLINEFROMWKB',32,'MLineFromWKB(wkb[,srid]), MultiLineStringFromWKB(wkb[,srid])\n\nConstructs a MULTILINESTRING value using its WKB representation and\nSRID.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-values.html#gis-wkb-functions\n\n','','http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-values.html#gis-wkb-functions'),(273,'LOG2',4,'Syntax:\nLOG2(X)\n\nReturns the base-2 logarithm of X.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html\n\n','mysql> SELECT LOG2(65536);\n -> 16\nmysql> SELECT LOG2(-100);\n -> NULL\n','http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html'),(274,'SUBTIME',31,'Syntax:\nSUBTIME(expr1,expr2)\n\nSUBTIME() returns expr1 - expr2 expressed as a value in the same format\nas expr1. expr1 is a time or datetime expression, and expr2 is a time\nexpression.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','mysql> SELECT SUBTIME(\'2007-12-31 23:59:59.999999\',\'1 1:1:1.000002\');\n -> \'2007-12-30 22:58:58.999997\'\nmysql> SELECT SUBTIME(\'01:00:00.999999\', \'02:00:00.999998\');\n -> \'-00:59:59.999999\'\n','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(275,'UNCOMPRESSED_LENGTH',12,'Syntax:\nUNCOMPRESSED_LENGTH(compressed_string)\n\nReturns the length that the compressed string had before being\ncompressed.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/encryption-functions.html\n\n','mysql> SELECT UNCOMPRESSED_LENGTH(COMPRESS(REPEAT(\'a\',30)));\n -> 30\n','http://dev.mysql.com/doc/refman/5.5/en/encryption-functions.html'),(276,'DROP TABLE',39,'Syntax:\nDROP [TEMPORARY] TABLE [IF EXISTS]\n tbl_name [, tbl_name] ...\n [RESTRICT | CASCADE]\n\nDROP TABLE removes one or more tables. You must have the DROP privilege\nfor each table. All table data and the table definition are removed, so\nbe careful with this statement! If any of the tables named in the\nargument list do not exist, MySQL returns an error indicating by name\nwhich nonexisting tables it was unable to drop, but it also drops all\nof the tables in the list that do exist.\n\n*Important*: When a table is dropped, user privileges on the table are\nnot automatically dropped. See [HELP GRANT].\n\nNote that for a partitioned table, DROP TABLE permanently removes the\ntable definition, all of its partitions, and all of the data which was\nstored in those partitions. It also removes the partitioning definition\n(.par) file associated with the dropped table.\n\nUse IF EXISTS to prevent an error from occurring for tables that do not\nexist. A NOTE is generated for each nonexistent table when using IF\nEXISTS. See [HELP SHOW WARNINGS].\n\nRESTRICT and CASCADE are permitted to make porting easier. In MySQL\n5.5, they do nothing.\n\n*Note*: DROP TABLE automatically commits the current active\ntransaction, unless you use the TEMPORARY keyword.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/drop-table.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/drop-table.html'),(277,'POW',4,'Syntax:\nPOW(X,Y)\n\nReturns the value of X raised to the power of Y.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html\n\n','mysql> SELECT POW(2,2);\n -> 4\nmysql> SELECT POW(2,-2);\n -> 0.25\n','http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html'),(278,'SHOW CREATE TABLE',26,'Syntax:\nSHOW CREATE TABLE tbl_name\n\nShows the CREATE TABLE statement that creates the given table. To use\nthis statement, you must have some privilege for the table. This\nstatement also works with views.\nSHOW CREATE TABLE quotes table and column names according to the value\nof the sql_quote_show_create option. See\nhttp://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/show-create-table.html\n\n','mysql> SHOW CREATE TABLE t\\G\n*************************** 1. row ***************************\n Table: t\nCreate Table: CREATE TABLE t (\n id INT(11) default NULL auto_increment,\n s char(60) default NULL,\n PRIMARY KEY (id)\n) ENGINE=MyISAM\n','http://dev.mysql.com/doc/refman/5.5/en/show-create-table.html'),(279,'DUAL',27,'You are permitted to specify DUAL as a dummy table name in situations\nwhere no tables are referenced:\n\nmysql> SELECT 1 + 1 FROM DUAL;\n -> 2\n\nDUAL is purely for the convenience of people who require that all\nSELECT statements should have FROM and possibly other clauses. MySQL\nmay ignore the clauses. MySQL does not require FROM DUAL if no tables\nare referenced.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/select.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/select.html'),(280,'INSTR',37,'Syntax:\nINSTR(str,substr)\n\nReturns the position of the first occurrence of substring substr in\nstring str. This is the same as the two-argument form of LOCATE(),\nexcept that the order of the arguments is reversed.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html\n\n','mysql> SELECT INSTR(\'foobarbar\', \'bar\');\n -> 4\nmysql> SELECT INSTR(\'xbar\', \'foobar\');\n -> 0\n','http://dev.mysql.com/doc/refman/5.5/en/string-functions.html'),(281,'NOW',31,'Syntax:\nNOW()\n\nReturns the current date and time as a value in \'YYYY-MM-DD HH:MM:SS\'\nor YYYYMMDDHHMMSS.uuuuuu format, depending on whether the function is\nused in a string or numeric context. The value is expressed in the\ncurrent time zone.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','mysql> SELECT NOW();\n -> \'2007-12-15 23:50:26\'\nmysql> SELECT NOW() + 0;\n -> 20071215235026.000000\n','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(282,'SHOW ENGINES',26,'Syntax:\nSHOW [STORAGE] ENGINES\n\nSHOW ENGINES displays status information about the server\'s storage\nengines. This is particularly useful for checking whether a storage\nengine is supported, or to see what the default engine is.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/show-engines.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/show-engines.html'),(283,'>=',18,'Syntax:\n>=\n\nGreater than or equal:\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/comparison-operators.html\n\n','mysql> SELECT 2 >= 2;\n -> 1\n','http://dev.mysql.com/doc/refman/5.5/en/comparison-operators.html'),(284,'EXP',4,'Syntax:\nEXP(X)\n\nReturns the value of e (the base of natural logarithms) raised to the\npower of X. The inverse of this function is LOG() (using a single\nargument only) or LN().\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html\n\n','mysql> SELECT EXP(2);\n -> 7.3890560989307\nmysql> SELECT EXP(-2);\n -> 0.13533528323661\nmysql> SELECT EXP(0);\n -> 1\n','http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html'),(285,'LONGBLOB',22,'LONGBLOB\n\nA BLOB column with a maximum length of 4,294,967,295 or 4GB (232 - 1)\nbytes. The effective maximum length of LONGBLOB columns depends on the\nconfigured maximum packet size in the client/server protocol and\navailable memory. Each LONGBLOB value is stored using a 4-byte length\nprefix that indicates the number of bytes in the value.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-type-overview.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/string-type-overview.html'),(286,'POINTN',13,'PointN(ls,N)\n\nReturns the N-th Point in the Linestring value ls. Points are numbered\nbeginning with 1.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/geometry-property-functions.html#linestring-property-functions\n\n','mysql> SET @ls = \'LineString(1 1,2 2,3 3)\';\nmysql> SELECT AsText(PointN(GeomFromText(@ls),2));\n+-------------------------------------+\n| AsText(PointN(GeomFromText(@ls),2)) |\n+-------------------------------------+\n| POINT(2 2) |\n+-------------------------------------+\n','http://dev.mysql.com/doc/refman/5.5/en/geometry-property-functions.html#linestring-property-functions'),(287,'YEAR DATA TYPE',22,'YEAR[(2|4)]\n\nA year in two-digit or four-digit format. The default is four-digit\nformat. YEAR(2) or YEAR(4) differ in display format, but have the same\nrange of values. In four-digit format, values display as 1901 to 2155,\nand 0000. In two-digit format, values display as 70 to 69, representing\nyears from 1970 to 2069. MySQL displays YEAR values in YYYY or\nYYformat, but permits assignment of values to YEAR columns using either\nstrings or numbers.\n\n*Note*: The YEAR(2) data type has certain issues that you should\nconsider before choosing to use it. As of MySQL 5.5.27, YEAR(2) is\ndeprecated. For more information, see\nhttp://dev.mysql.com/doc/refman/5.5/en/migrating-to-year4.html.\n\nFor additional information about YEAR display format and inerpretation\nof input values, see http://dev.mysql.com/doc/refman/5.5/en/year.html.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-type-overview.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-type-overview.html'),(288,'SUM',16,'Syntax:\nSUM([DISTINCT] expr)\n\nReturns the sum of expr. If the return set has no rows, SUM() returns\nNULL. The DISTINCT keyword can be used to sum only the distinct values\nof expr.\n\nSUM() returns NULL if there were no matching rows.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/group-by-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/group-by-functions.html'),(289,'OCT',37,'Syntax:\nOCT(N)\n\nReturns a string representation of the octal value of N, where N is a\nlonglong (BIGINT) number. This is equivalent to CONV(N,10,8). Returns\nNULL if N is NULL.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html\n\n','mysql> SELECT OCT(12);\n -> \'14\'\n','http://dev.mysql.com/doc/refman/5.5/en/string-functions.html'),(290,'SYSDATE',31,'Syntax:\nSYSDATE()\n\nReturns the current date and time as a value in \'YYYY-MM-DD HH:MM:SS\'\nor YYYYMMDDHHMMSS.uuuuuu format, depending on whether the function is\nused in a string or numeric context.\n\nSYSDATE() returns the time at which it executes. This differs from the\nbehavior for NOW(), which returns a constant time that indicates the\ntime at which the statement began to execute. (Within a stored function\nor trigger, NOW() returns the time at which the function or triggering\nstatement began to execute.)\n\nmysql> SELECT NOW(), SLEEP(2), NOW();\n+---------------------+----------+---------------------+\n| NOW() | SLEEP(2) | NOW() |\n+---------------------+----------+---------------------+\n| 2006-04-12 13:47:36 | 0 | 2006-04-12 13:47:36 |\n+---------------------+----------+---------------------+\n\nmysql> SELECT SYSDATE(), SLEEP(2), SYSDATE();\n+---------------------+----------+---------------------+\n| SYSDATE() | SLEEP(2) | SYSDATE() |\n+---------------------+----------+---------------------+\n| 2006-04-12 13:47:44 | 0 | 2006-04-12 13:47:46 |\n+---------------------+----------+---------------------+\n\nIn addition, the SET TIMESTAMP statement affects the value returned by\nNOW() but not by SYSDATE(). This means that timestamp settings in the\nbinary log have no effect on invocations of SYSDATE().\n\nBecause SYSDATE() can return different values even within the same\nstatement, and is not affected by SET TIMESTAMP, it is nondeterministic\nand therefore unsafe for replication if statement-based binary logging\nis used. If that is a problem, you can use row-based logging.\n\nAlternatively, you can use the --sysdate-is-now option to cause\nSYSDATE() to be an alias for NOW(). This works if the option is used on\nboth the master and the slave.\n\nThe nondeterministic nature of SYSDATE() also means that indexes cannot\nbe used for evaluating expressions that refer to it.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(291,'UNINSTALL PLUGIN',5,'Syntax:\nUNINSTALL PLUGIN plugin_name\n\nThis statement removes an installed server plugin. It requires the\nDELETE privilege for the mysql.plugin table.\n\nplugin_name must be the name of some plugin that is listed in the\nmysql.plugin table. The server executes the plugin\'s deinitialization\nfunction and removes the row for the plugin from the mysql.plugin\ntable, so that subsequent server restarts will not load and initialize\nthe plugin. UNINSTALL PLUGIN does not remove the plugin\'s shared\nlibrary file.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/uninstall-plugin.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/uninstall-plugin.html'),(292,'ASBINARY',32,'AsBinary(g), AsWKB(g)\n\nConverts a value in internal geometry format to its WKB representation\nand returns the binary result.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/functions-to-convert-geometries-between-formats.html\n\n','SELECT AsBinary(g) FROM geom;\n','http://dev.mysql.com/doc/refman/5.5/en/functions-to-convert-geometries-between-formats.html'),(293,'REPEAT FUNCTION',37,'Syntax:\nREPEAT(str,count)\n\nReturns a string consisting of the string str repeated count times. If\ncount is less than 1, returns an empty string. Returns NULL if str or\ncount are NULL.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html\n\n','mysql> SELECT REPEAT(\'MySQL\', 3);\n -> \'MySQLMySQLMySQL\'\n','http://dev.mysql.com/doc/refman/5.5/en/string-functions.html'),(294,'SHOW TABLES',26,'Syntax:\nSHOW [FULL] TABLES [{FROM | IN} db_name]\n [LIKE \'pattern\' | WHERE expr]\n\nSHOW TABLES lists the non-TEMPORARY tables in a given database. You can\nalso get this list using the mysqlshow db_name command. The LIKE\nclause, if present, indicates which table names to match. The WHERE\nclause can be given to select rows using more general conditions, as\ndiscussed in http://dev.mysql.com/doc/refman/5.5/en/extended-show.html.\n\nThis statement also lists any views in the database. The FULL modifier\nis supported such that SHOW FULL TABLES displays a second output\ncolumn. Values for the second column are BASE TABLE for a table and\nVIEW for a view.\n\nIf you have no privileges for a base table or view, it does not show up\nin the output from SHOW TABLES or mysqlshow db_name.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/show-tables.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/show-tables.html'),(295,'MAKEDATE',31,'Syntax:\nMAKEDATE(year,dayofyear)\n\nReturns a date, given year and day-of-year values. dayofyear must be\ngreater than 0 or the result is NULL.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','mysql> SELECT MAKEDATE(2011,31), MAKEDATE(2011,32);\n -> \'2011-01-31\', \'2011-02-01\'\nmysql> SELECT MAKEDATE(2011,365), MAKEDATE(2014,365);\n -> \'2011-12-31\', \'2014-12-31\'\nmysql> SELECT MAKEDATE(2011,0);\n -> NULL\n','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(296,'BINARY OPERATOR',37,'Syntax:\nBINARY\n\nThe BINARY operator casts the string following it to a binary string.\nThis is an easy way to force a column comparison to be done byte by\nbyte rather than character by character. This causes the comparison to\nbe case sensitive even if the column is not defined as BINARY or BLOB.\nBINARY also causes trailing spaces to be significant.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/cast-functions.html\n\n','mysql> SELECT \'a\' = \'A\';\n -> 1\nmysql> SELECT BINARY \'a\' = \'A\';\n -> 0\nmysql> SELECT \'a\' = \'a \';\n -> 1\nmysql> SELECT BINARY \'a\' = \'a \';\n -> 0\n','http://dev.mysql.com/doc/refman/5.5/en/cast-functions.html'),(297,'MBROVERLAPS',6,'MBROverlaps(g1,g2)\n\nReturns 1 or 0 to indicate whether the Minimum Bounding Rectangles of\nthe two geometries g1 and g2 overlap. The term spatially overlaps is\nused if two geometries intersect and their intersection results in a\ngeometry of the same dimension but not equal to either of the given\ngeometries.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/functions-for-testing-spatial-relations-between-geometric-objects.html#relations-on-geometry-mbr\n\n','','http://dev.mysql.com/doc/refman/5.5/en/functions-for-testing-spatial-relations-between-geometric-objects.html#relations-on-geometry-mbr'),(298,'SOUNDEX',37,'Syntax:\nSOUNDEX(str)\n\nReturns a soundex string from str. Two strings that sound almost the\nsame should have identical soundex strings. A standard soundex string\nis four characters long, but the SOUNDEX() function returns an\narbitrarily long string. You can use SUBSTRING() on the result to get a\nstandard soundex string. All nonalphabetic characters in str are\nignored. All international alphabetic characters outside the A-Z range\nare treated as vowels.\n\n*Important*: When using SOUNDEX(), you should be aware of the following\nlimitations:\n\no This function, as currently implemented, is intended to work well\n with strings that are in the English language only. Strings in other\n languages may not produce reliable results.\n\no This function is not guaranteed to provide consistent results with\n strings that use multi-byte character sets, including utf-8.\n\n We hope to remove these limitations in a future release. See Bug\n #22638 for more information.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html\n\n','mysql> SELECT SOUNDEX(\'Hello\');\n -> \'H400\'\nmysql> SELECT SOUNDEX(\'Quadratically\');\n -> \'Q36324\'\n','http://dev.mysql.com/doc/refman/5.5/en/string-functions.html'),(299,'MBRTOUCHES',6,'MBRTouches(g1,g2)\n\nReturns 1 or 0 to indicate whether the Minimum Bounding Rectangles of\nthe two geometries g1 and g2 touch. Two geometries spatially touch if\nthe interiors of the geometries do not intersect, but the boundary of\none of the geometries intersects either the boundary or the interior of\nthe other.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/functions-for-testing-spatial-relations-between-geometric-objects.html#relations-on-geometry-mbr\n\n','','http://dev.mysql.com/doc/refman/5.5/en/functions-for-testing-spatial-relations-between-geometric-objects.html#relations-on-geometry-mbr'),(300,'DROP EVENT',39,'Syntax:\nDROP EVENT [IF EXISTS] event_name\n\nThis statement drops the event named event_name. The event immediately\nceases being active, and is deleted completely from the server.\n\nIf the event does not exist, the error ERROR 1517 (HY000): Unknown\nevent \'event_name\' results. You can override this and cause the\nstatement to generate a warning for nonexistent events instead using IF\nEXISTS.\n\nThis statement requires the EVENT privilege for the schema to which the\nevent to be dropped belongs.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/drop-event.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/drop-event.html'),(301,'INSERT SELECT',27,'Syntax:\nINSERT [LOW_PRIORITY | HIGH_PRIORITY] [IGNORE]\n [INTO] tbl_name [(col_name,...)]\n SELECT ...\n [ ON DUPLICATE KEY UPDATE col_name=expr, ... ]\n\nWith INSERT ... SELECT, you can quickly insert many rows into a table\nfrom one or many tables. For example:\n\nINSERT INTO tbl_temp2 (fld_id)\n SELECT tbl_temp1.fld_order_id\n FROM tbl_temp1 WHERE tbl_temp1.fld_order_id > 100;\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/insert-select.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/insert-select.html'),(302,'CREATE PROCEDURE',39,'Syntax:\nCREATE\n [DEFINER = { user | CURRENT_USER }]\n PROCEDURE sp_name ([proc_parameter[,...]])\n [characteristic ...] routine_body\n\nCREATE\n [DEFINER = { user | CURRENT_USER }]\n FUNCTION sp_name ([func_parameter[,...]])\n RETURNS type\n [characteristic ...] routine_body\n\nproc_parameter:\n [ IN | OUT | INOUT ] param_name type\n\nfunc_parameter:\n param_name type\n\ntype:\n Any valid MySQL data type\n\ncharacteristic:\n COMMENT \'string\'\n | LANGUAGE SQL\n | [NOT] DETERMINISTIC\n | { CONTAINS SQL | NO SQL | READS SQL DATA | MODIFIES SQL DATA }\n | SQL SECURITY { DEFINER | INVOKER }\n\nroutine_body:\n Valid SQL routine statement\n\nThese statements create stored routines. By default, a routine is\nassociated with the default database. To associate the routine\nexplicitly with a given database, specify the name as db_name.sp_name\nwhen you create it.\n\nThe CREATE FUNCTION statement is also used in MySQL to support UDFs\n(user-defined functions). See\nhttp://dev.mysql.com/doc/refman/5.5/en/adding-functions.html. A UDF can\nbe regarded as an external stored function. Stored functions share\ntheir namespace with UDFs. See\nhttp://dev.mysql.com/doc/refman/5.5/en/function-resolution.html, for\nthe rules describing how the server interprets references to different\nkinds of functions.\n\nTo invoke a stored procedure, use the CALL statement (see [HELP CALL]).\nTo invoke a stored function, refer to it in an expression. The function\nreturns a value during expression evaluation.\n\nCREATE PROCEDURE and CREATE FUNCTION require the CREATE ROUTINE\nprivilege. They might also require the SUPER privilege, depending on\nthe DEFINER value, as described later in this section. If binary\nlogging is enabled, CREATE FUNCTION might require the SUPER privilege,\nas described in\nhttp://dev.mysql.com/doc/refman/5.5/en/stored-programs-logging.html.\n\nBy default, MySQL automatically grants the ALTER ROUTINE and EXECUTE\nprivileges to the routine creator. This behavior can be changed by\ndisabling the automatic_sp_privileges system variable. See\nhttp://dev.mysql.com/doc/refman/5.5/en/stored-routines-privileges.html.\n\nThe DEFINER and SQL SECURITY clauses specify the security context to be\nused when checking access privileges at routine execution time, as\ndescribed later in this section.\n\nIf the routine name is the same as the name of a built-in SQL function,\na syntax error occurs unless you use a space between the name and the\nfollowing parenthesis when defining the routine or invoking it later.\nFor this reason, avoid using the names of existing SQL functions for\nyour own stored routines.\n\nThe IGNORE_SPACE SQL mode applies to built-in functions, not to stored\nroutines. It is always permissible to have spaces after a stored\nroutine name, regardless of whether IGNORE_SPACE is enabled.\n\nThe parameter list enclosed within parentheses must always be present.\nIf there are no parameters, an empty parameter list of () should be\nused. Parameter names are not case sensitive.\n\nEach parameter is an IN parameter by default. To specify otherwise for\na parameter, use the keyword OUT or INOUT before the parameter name.\n\n*Note*: Specifying a parameter as IN, OUT, or INOUT is valid only for a\nPROCEDURE. For a FUNCTION, parameters are always regarded as IN\nparameters.\n\nAn IN parameter passes a value into a procedure. The procedure might\nmodify the value, but the modification is not visible to the caller\nwhen the procedure returns. An OUT parameter passes a value from the\nprocedure back to the caller. Its initial value is NULL within the\nprocedure, and its value is visible to the caller when the procedure\nreturns. An INOUT parameter is initialized by the caller, can be\nmodified by the procedure, and any change made by the procedure is\nvisible to the caller when the procedure returns.\n\nFor each OUT or INOUT parameter, pass a user-defined variable in the\nCALL statement that invokes the procedure so that you can obtain its\nvalue when the procedure returns. If you are calling the procedure from\nwithin another stored procedure or function, you can also pass a\nroutine parameter or local routine variable as an IN or INOUT\nparameter.\n\nThe following example shows a simple stored procedure that uses an OUT\nparameter:\n\nmysql> delimiter //\n\nmysql> CREATE PROCEDURE simpleproc (OUT param1 INT)\n -> BEGIN\n -> SELECT COUNT(*) INTO param1 FROM t;\n -> END//\nQuery OK, 0 rows affected (0.00 sec)\n\nmysql> delimiter ;\n\nmysql> CALL simpleproc(@a);\nQuery OK, 0 rows affected (0.00 sec)\n\nmysql> SELECT @a;\n+------+\n| @a |\n+------+\n| 3 |\n+------+\n1 row in set (0.00 sec)\n\nThe example uses the mysql client delimiter command to change the\nstatement delimiter from ; to // while the procedure is being defined.\nThis enables the ; delimiter used in the procedure body to be passed\nthrough to the server rather than being interpreted by mysql itself.\nSee\nhttp://dev.mysql.com/doc/refman/5.5/en/stored-programs-defining.html.\n\nThe RETURNS clause may be specified only for a FUNCTION, for which it\nis mandatory. It indicates the return type of the function, and the\nfunction body must contain a RETURN value statement. If the RETURN\nstatement returns a value of a different type, the value is coerced to\nthe proper type. For example, if a function specifies an ENUM or SET\nvalue in the RETURNS clause, but the RETURN statement returns an\ninteger, the value returned from the function is the string for the\ncorresponding ENUM member of set of SET members.\n\nThe following example function takes a parameter, performs an operation\nusing an SQL function, and returns the result. In this case, it is\nunnecessary to use delimiter because the function definition contains\nno internal ; statement delimiters:\n\nmysql> CREATE FUNCTION hello (s CHAR(20))\nmysql> RETURNS CHAR(50) DETERMINISTIC\n -> RETURN CONCAT(\'Hello, \',s,\'!\');\nQuery OK, 0 rows affected (0.00 sec)\n\nmysql> SELECT hello(\'world\');\n+----------------+\n| hello(\'world\') |\n+----------------+\n| Hello, world! |\n+----------------+\n1 row in set (0.00 sec)\n\nParameter types and function return types can be declared to use any\nvalid data type, except that the COLLATE attribute cannot be used prior\nto MySQL 5.5.3. As of 5.5.3, COLLATE can be used if preceded by the\nCHARACTER SET attribute.\n\nThe routine_body consists of a valid SQL routine statement. This can be\na simple statement such as SELECT or INSERT, or a compound statement\nwritten using BEGIN and END. Compound statements can contain\ndeclarations, loops, and other control structure statements. The syntax\nfor these statements is described in\nhttp://dev.mysql.com/doc/refman/5.5/en/sql-syntax-compound-statements.h\ntml.\n\nMySQL permits routines to contain DDL statements, such as CREATE and\nDROP. MySQL also permits stored procedures (but not stored functions)\nto contain SQL transaction statements such as COMMIT. Stored functions\nmay not contain statements that perform explicit or implicit commit or\nrollback. Support for these statements is not required by the SQL\nstandard, which states that each DBMS vendor may decide whether to\npermit them.\n\nStatements that return a result set can be used within a stored\nprocedure but not within a stored function. This prohibition includes\nSELECT statements that do not have an INTO var_list clause and other\nstatements such as SHOW, EXPLAIN, and CHECK TABLE. For statements that\ncan be determined at function definition time to return a result set, a\nNot allowed to return a result set from a function error occurs\n(ER_SP_NO_RETSET). For statements that can be determined only at\nruntime to return a result set, a PROCEDURE %s can\'t return a result\nset in the given context error occurs (ER_SP_BADSELECT).\n\nUSE statements within stored routines are not permitted. When a routine\nis invoked, an implicit USE db_name is performed (and undone when the\nroutine terminates). The causes the routine to have the given default\ndatabase while it executes. References to objects in databases other\nthan the routine default database should be qualified with the\nappropriate database name.\n\nFor additional information about statements that are not permitted in\nstored routines, see\nhttp://dev.mysql.com/doc/refman/5.5/en/stored-program-restrictions.html\n.\n\nFor information about invoking stored procedures from within programs\nwritten in a language that has a MySQL interface, see [HELP CALL].\n\nMySQL stores the sql_mode system variable setting that is in effect at\nthe time a routine is created, and always executes the routine with\nthis setting in force, regardless of the server SQL mode in effect when\nthe routine is invoked.\n\nThe switch from the SQL mode of the invoker to that of the routine\noccurs after evaluation of arguments and assignment of the resulting\nvalues to routine parameters. If you define a routine in strict SQL\nmode but invoke it in nonstrict mode, assignment of arguments to\nroutine parameters does not take place in strict mode. If you require\nthat expressions passed to a routine be assigned in strict SQL mode,\nyou should invoke the routine with strict mode in effect.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/create-procedure.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/create-procedure.html'),(303,'VARBINARY',22,'VARBINARY(M)\n\nThe VARBINARY type is similar to the VARCHAR type, but stores binary\nbyte strings rather than nonbinary character strings. M represents the\nmaximum column length in bytes.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-type-overview.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/string-type-overview.html'),(304,'LOAD INDEX',26,'Syntax:\nLOAD INDEX INTO CACHE\n tbl_index_list [, tbl_index_list] ...\n\ntbl_index_list:\n tbl_name\n [PARTITION (partition_list | ALL)]\n [[INDEX|KEY] (index_name[, index_name] ...)]\n [IGNORE LEAVES]\n\npartition_list:\n partition_name[, partition_name][, ...]\n\nThe LOAD INDEX INTO CACHE statement preloads a table index into the key\ncache to which it has been assigned by an explicit CACHE INDEX\nstatement, or into the default key cache otherwise.\n\nLOAD INDEX INTO CACHE is used only for MyISAM tables. In MySQL 5.5, it\nis also supported for partitioned MyISAM tables; in addition, indexes\non partitioned tables can be preloaded for one, several, or all\npartitions.\n\nThe IGNORE LEAVES modifier causes only blocks for the nonleaf nodes of\nthe index to be preloaded.\n\nIGNORE LEAVES is also supported for partitioned MyISAM tables.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/load-index.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/load-index.html'),(305,'UNION',27,'Syntax:\nSELECT ...\nUNION [ALL | DISTINCT] SELECT ...\n[UNION [ALL | DISTINCT] SELECT ...]\n\nUNION is used to combine the result from multiple SELECT statements\ninto a single result set.\n\nThe column names from the first SELECT statement are used as the column\nnames for the results returned. Selected columns listed in\ncorresponding positions of each SELECT statement should have the same\ndata type. (For example, the first column selected by the first\nstatement should have the same type as the first column selected by the\nother statements.)\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/union.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/union.html'),(306,'TO_DAYS',31,'Syntax:\nTO_DAYS(date)\n\nGiven a date date, returns a day number (the number of days since year\n0).\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','mysql> SELECT TO_DAYS(950501);\n -> 728779\nmysql> SELECT TO_DAYS(\'2007-10-07\');\n -> 733321\n','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(307,'NOT REGEXP',37,'Syntax:\nexpr NOT REGEXP pat, expr NOT RLIKE pat\n\nThis is the same as NOT (expr REGEXP pat).\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/regexp.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/regexp.html'),(308,'SHOW INDEX',26,'Syntax:\nSHOW {INDEX | INDEXES | KEYS}\n {FROM | IN} tbl_name\n [{FROM | IN} db_name]\n [WHERE expr]\n\nSHOW INDEX returns table index information. The format resembles that\nof the SQLStatistics call in ODBC. This statement requires some\nprivilege for any column in the table.\nYou can use db_name.tbl_name as an alternative to the tbl_name FROM\ndb_name syntax. These two statements are equivalent:\n\nSHOW INDEX FROM mytable FROM mydb;\nSHOW INDEX FROM mydb.mytable;\n\nThe WHERE clause can be given to select rows using more general\nconditions, as discussed in\nhttp://dev.mysql.com/doc/refman/5.5/en/extended-show.html.\n\nYou can also list a table\'s indexes with the mysqlshow -k db_name\ntbl_name command.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/show-index.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/show-index.html'),(309,'SHOW CREATE DATABASE',26,'Syntax:\nSHOW CREATE {DATABASE | SCHEMA} [IF NOT EXISTS] db_name\n\nShows the CREATE DATABASE statement that creates the given database. If\nthe SHOW statement includes an IF NOT EXISTS clause, the output too\nincludes such a clause. SHOW CREATE SCHEMA is a synonym for SHOW CREATE\nDATABASE.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/show-create-database.html\n\n','mysql> SHOW CREATE DATABASE test\\G\n*************************** 1. row ***************************\n Database: test\nCreate Database: CREATE DATABASE `test`\n /*!40100 DEFAULT CHARACTER SET latin1 */\n\nmysql> SHOW CREATE SCHEMA test\\G\n*************************** 1. row ***************************\n Database: test\nCreate Database: CREATE DATABASE `test`\n /*!40100 DEFAULT CHARACTER SET latin1 */\n','http://dev.mysql.com/doc/refman/5.5/en/show-create-database.html'),(310,'LEAVE',23,'Syntax:\nLEAVE label\n\nThis statement is used to exit the flow control construct that has the\ngiven label. If the label is for the outermost stored program block,\nLEAVE exits the program.\n\nLEAVE can be used within BEGIN ... END or loop constructs (LOOP,\nREPEAT, WHILE).\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/leave.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/leave.html'),(311,'NOT IN',18,'Syntax:\nexpr NOT IN (value,...)\n\nThis is the same as NOT (expr IN (value,...)).\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/comparison-operators.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/comparison-operators.html'),(312,'!',15,'Syntax:\nNOT, !\n\nLogical NOT. Evaluates to 1 if the operand is 0, to 0 if the operand is\nnonzero, and NOT NULL returns NULL.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/logical-operators.html\n\n','mysql> SELECT NOT 10;\n -> 0\nmysql> SELECT NOT 0;\n -> 1\nmysql> SELECT NOT NULL;\n -> NULL\nmysql> SELECT ! (1+1);\n -> 0\nmysql> SELECT ! 1+1;\n -> 1\n','http://dev.mysql.com/doc/refman/5.5/en/logical-operators.html'),(313,'DECLARE HANDLER',23,'Syntax:\nDECLARE handler_action HANDLER\n FOR condition_value [, condition_value] ...\n statement\n\nhandler_action:\n CONTINUE\n | EXIT\n | UNDO\n\ncondition_value:\n mysql_error_code\n | SQLSTATE [VALUE] sqlstate_value\n | condition_name\n | SQLWARNING\n | NOT FOUND\n | SQLEXCEPTION\n\nThe DECLARE ... HANDLER statement specifies a handler that deals with\none or more conditions. If one of these conditions occurs, the\nspecified statement executes. statement can be a simple statement such\nas SET var_name = value, or a compound statement written using BEGIN\nand END (see [HELP BEGIN END]).\n\nHandler declarations must appear after variable or condition\ndeclarations.\n\nThe handler_action value indicates what action the handler takes after\nexecution of the handler statement:\n\no CONTINUE: Execution of the current program continues.\n\no EXIT: Execution terminates for the BEGIN ... END compound statement\n in which the handler is declared. This is true even if the condition\n occurs in an inner block.\n\no UNDO: Not supported.\n\nThe condition_value for DECLARE ... HANDLER indicates the specific\ncondition or class of conditions that activates the handler:\n\no A MySQL error code (a number) or an SQLSTATE value (a 5-character\n string literal). You should not use MySQL error code 0 or SQLSTATE\n values that begin with \'00\', because those indicate success rather\n than an error condition. For a list of MySQL error codes and SQLSTATE\n values, see\n http://dev.mysql.com/doc/refman/5.5/en/error-messages-server.html.\n\no A condition name previously specified with DECLARE ... CONDITION. A\n condition name can be associated with a MySQL error code or SQLSTATE\n value. See [HELP DECLARE CONDITION].\n\no SQLWARNING is shorthand for the class of SQLSTATE values that begin\n with \'01\'.\n\no NOT FOUND is shorthand for the class of SQLSTATE values that begin\n with \'02\'. This is relevant within the context of cursors and is used\n to control what happens when a cursor reaches the end of a data set.\n If no more rows are available, a No Data condition occurs with\n SQLSTATE value \'02000\'. To detect this condition, you can set up a\n handler for it (or for a NOT FOUND condition). For an example, see\n http://dev.mysql.com/doc/refman/5.5/en/cursors.html. This condition\n also occurs for SELECT ... INTO var_list statements that retrieve no\n rows.\n\no SQLEXCEPTION is shorthand for the class of SQLSTATE values that do\n not begin with \'00\', \'01\', or \'02\'.\n\nIf a condition occurs for which no handler has been declared, the\naction taken depends on the condition class:\n\no For SQLEXCEPTION conditions, the stored program terminates at the\n statement that raised the condition, as if there were an EXIT\n handler. If the program was called by another stored program, the\n calling program handles the condition using the handler selection\n rules applied to its own handlers.\n\no For SQLWARNING conditions, the program continues executing, as if\n there were a CONTINUE handler.\n\no For NOT FOUND conditions, if the condition was raised normally, the\n action is CONTINUE. If it was raised by SIGNAL or RESIGNAL, the\n action is EXIT.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/declare-handler.html\n\n','mysql> CREATE TABLE test.t (s1 INT, PRIMARY KEY (s1));\nQuery OK, 0 rows affected (0.00 sec)\n\nmysql> delimiter //\n\nmysql> CREATE PROCEDURE handlerdemo ()\n -> BEGIN\n -> DECLARE CONTINUE HANDLER FOR SQLSTATE \'23000\' SET @x2 = 1;\n -> SET @x = 1;\n -> INSERT INTO test.t VALUES (1);\n -> SET @x = 2;\n -> INSERT INTO test.t VALUES (1);\n -> SET @x = 3;\n -> END;\n -> //\nQuery OK, 0 rows affected (0.00 sec)\n\nmysql> CALL handlerdemo()//\nQuery OK, 0 rows affected (0.00 sec)\n\nmysql> SELECT @x//\n +------+\n | @x |\n +------+\n | 3 |\n +------+\n 1 row in set (0.00 sec)\n','http://dev.mysql.com/doc/refman/5.5/en/declare-handler.html'),(314,'DOUBLE',22,'DOUBLE[(M,D)] [UNSIGNED] [ZEROFILL]\n\nA normal-size (double-precision) floating-point number. Permissible\nvalues are -1.7976931348623157E+308 to -2.2250738585072014E-308, 0, and\n2.2250738585072014E-308 to 1.7976931348623157E+308. These are the\ntheoretical limits, based on the IEEE standard. The actual range might\nbe slightly smaller depending on your hardware or operating system.\n\nM is the total number of digits and D is the number of digits following\nthe decimal point. If M and D are omitted, values are stored to the\nlimits permitted by the hardware. A double-precision floating-point\nnumber is accurate to approximately 15 decimal places.\n\nUNSIGNED, if specified, disallows negative values.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/numeric-type-overview.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/numeric-type-overview.html'),(315,'TIME',22,'TIME\n\nA time. The range is \'-838:59:59\' to \'838:59:59\'. MySQL displays TIME\nvalues in \'HH:MM:SS\' format, but permits assignment of values to TIME\ncolumns using either strings or numbers.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-type-overview.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-type-overview.html'),(316,'&&',15,'Syntax:\nAND, &&\n\nLogical AND. Evaluates to 1 if all operands are nonzero and not NULL,\nto 0 if one or more operands are 0, otherwise NULL is returned.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/logical-operators.html\n\n','mysql> SELECT 1 && 1;\n -> 1\nmysql> SELECT 1 && 0;\n -> 0\nmysql> SELECT 1 && NULL;\n -> NULL\nmysql> SELECT 0 && NULL;\n -> 0\nmysql> SELECT NULL && 0;\n -> 0\n','http://dev.mysql.com/doc/refman/5.5/en/logical-operators.html'),(317,'X',11,'X(p)\n\nReturns the X-coordinate value for the Point object p as a\ndouble-precision number.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/geometry-property-functions.html#point-property-functions\n\n','mysql> SELECT X(POINT(56.7, 53.34));\n+-----------------------+\n| X(POINT(56.7, 53.34)) |\n+-----------------------+\n| 56.7 |\n+-----------------------+\n','http://dev.mysql.com/doc/refman/5.5/en/geometry-property-functions.html#point-property-functions'),(318,'SYSTEM_USER',17,'Syntax:\nSYSTEM_USER()\n\nSYSTEM_USER() is a synonym for USER().\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/information-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/information-functions.html'),(319,'FOUND_ROWS',17,'Syntax:\nFOUND_ROWS()\n\nA SELECT statement may include a LIMIT clause to restrict the number of\nrows the server returns to the client. In some cases, it is desirable\nto know how many rows the statement would have returned without the\nLIMIT, but without running the statement again. To obtain this row\ncount, include a SQL_CALC_FOUND_ROWS option in the SELECT statement,\nand then invoke FOUND_ROWS() afterward:\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/information-functions.html\n\n','mysql> SELECT SQL_CALC_FOUND_ROWS * FROM tbl_name\n -> WHERE id > 100 LIMIT 10;\nmysql> SELECT FOUND_ROWS();\n','http://dev.mysql.com/doc/refman/5.5/en/information-functions.html'),(320,'CROSSES',30,'Crosses(g1,g2)\n\nReturns 1 if g1 spatially crosses g2. Returns NULL if g1 is a Polygon\nor a MultiPolygon, or if g2 is a Point or a MultiPoint. Otherwise,\nreturns 0.\n\nThe term spatially crosses denotes a spatial relation between two given\ngeometries that has the following properties:\n\no The two geometries intersect\n\no Their intersection results in a geometry that has a dimension that is\n one less than the maximum dimension of the two given geometries\n\no Their intersection is not equal to either of the two given geometries\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/functions-for-testing-spatial-relations-between-geometric-objects.html#functions-that-test-spatial-relationships-between-geometries\n\n','','http://dev.mysql.com/doc/refman/5.5/en/functions-for-testing-spatial-relations-between-geometric-objects.html#functions-that-test-spatial-relationships-between-geometries'),(321,'TRUNCATE TABLE',39,'Syntax:\nTRUNCATE [TABLE] tbl_name\n\nTRUNCATE TABLE empties a table completely. It requires the DROP\nprivilege.\n\nLogically, TRUNCATE TABLE is similar to a DELETE statement that deletes\nall rows, or a sequence of DROP TABLE and CREATE TABLE statements. To\nachieve high performance, it bypasses the DML method of deleting data.\nThus, it cannot be rolled back, it does not cause ON DELETE triggers to\nfire, and it cannot be performed for InnoDB tables with parent-child\nforeign key relationships.\n\nAlthough TRUNCATE TABLE is similar to DELETE, it is classified as a DDL\nstatement rather than a DML statement. It differs from DELETE in the\nfollowing ways in MySQL 5.5:\n\no Truncate operations drop and re-create the table, which is much\n faster than deleting rows one by one, particularly for large tables.\n\no Truncate operations cause an implicit commit, and so cannot be rolled\n back.\n\no Truncation operations cannot be performed if the session holds an\n active table lock.\n\no TRUNCATE TABLE fails for an InnoDB table if there are any FOREIGN KEY\n constraints from other tables that reference the table. Foreign key\n constraints between columns of the same table are permitted.\n\no Truncation operations do not return a meaningful value for the number\n of deleted rows. The usual result is \"0 rows affected,\" which should\n be interpreted as \"no information.\"\n\no As long as the table format file tbl_name.frm is valid, the table can\n be re-created as an empty table with TRUNCATE TABLE, even if the data\n or index files have become corrupted.\n\no Any AUTO_INCREMENT value is reset to its start value. This is true\n even for MyISAM and InnoDB, which normally do not reuse sequence\n values.\n\no When used with partitioned tables, TRUNCATE TABLE preserves the\n partitioning; that is, the data and index files are dropped and\n re-created, while the partition definitions (.par) file is\n unaffected.\n\no The TRUNCATE TABLE statement does not invoke ON DELETE triggers.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/truncate-table.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/truncate-table.html'),(322,'BIT_XOR',16,'Syntax:\nBIT_XOR(expr)\n\nReturns the bitwise XOR of all bits in expr. The calculation is\nperformed with 64-bit (BIGINT) precision.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/group-by-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/group-by-functions.html'),(323,'CURRENT_DATE',31,'Syntax:\nCURRENT_DATE, CURRENT_DATE()\n\nCURRENT_DATE and CURRENT_DATE() are synonyms for CURDATE().\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(324,'START SLAVE',8,'Syntax:\nSTART SLAVE [thread_types]\n\nSTART SLAVE [SQL_THREAD] UNTIL\n MASTER_LOG_FILE = \'log_name\', MASTER_LOG_POS = log_pos\n\nSTART SLAVE [SQL_THREAD] UNTIL\n RELAY_LOG_FILE = \'log_name\', RELAY_LOG_POS = log_pos\n\nthread_types:\n [thread_type [, thread_type] ... ]\n\nthread_type: IO_THREAD | SQL_THREAD\n\nSTART SLAVE with no thread_type options starts both of the slave\nthreads. The I/O thread reads events from the master server and stores\nthem in the relay log. The SQL thread reads events from the relay log\nand executes them. START SLAVE requires the SUPER privilege.\n\nIf START SLAVE succeeds in starting the slave threads, it returns\nwithout any error. However, even in that case, it might be that the\nslave threads start and then later stop (for example, because they do\nnot manage to connect to the master or read its binary log, or some\nother problem). START SLAVE does not warn you about this. You must\ncheck the slave\'s error log for error messages generated by the slave\nthreads, or check that they are running satisfactorily with SHOW SLAVE\nSTATUS.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/start-slave.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/start-slave.html'),(325,'AREA',2,'Area(poly)\n\nReturns as a double-precision number the area of the Polygon value\npoly, as measured in its spatial reference system.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/geometry-property-functions.html#polygon-property-functions\n\n','mysql> SET @poly = \'Polygon((0 0,0 3,3 0,0 0),(1 1,1 2,2 1,1 1))\';\nmysql> SELECT Area(GeomFromText(@poly));\n+---------------------------+\n| Area(GeomFromText(@poly)) |\n+---------------------------+\n| 4 |\n+---------------------------+\n','http://dev.mysql.com/doc/refman/5.5/en/geometry-property-functions.html#polygon-property-functions'),(326,'FLUSH',26,'Syntax:\nFLUSH [NO_WRITE_TO_BINLOG | LOCAL]\n flush_option [, flush_option] ...\n\nThe FLUSH statement has several variant forms that clear or reload\nvarious internal caches, flush tables, or acquire locks. To execute\nFLUSH, you must have the RELOAD privilege. Specific flush options might\nrequire additional privileges, as described later.\n\nBy default, the server writes FLUSH statements to the binary log so\nthat they replicate to replication slaves. To suppress logging, use the\noptional NO_WRITE_TO_BINLOG keyword or its alias LOCAL.\n\n*Note*: FLUSH LOGS, FLUSH MASTER, FLUSH SLAVE, and FLUSH TABLES WITH\nREAD LOCK (with or without a table list) are not written to the binary\nlog in any case because they would cause problems if replicated to a\nslave.\n\nThe FLUSH statement causes an implicit commit. See\nhttp://dev.mysql.com/doc/refman/5.5/en/implicit-commit.html.\n\nThe RESET statement is similar to FLUSH. See [HELP RESET], for\ninformation about using the RESET statement with replication.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/flush.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/flush.html'),(327,'BEGIN END',23,'Syntax:\n[begin_label:] BEGIN\n [statement_list]\nEND [end_label]\n\nBEGIN ... END syntax is used for writing compound statements, which can\nappear within stored programs (stored procedures and functions,\ntriggers, and events). A compound statement can contain multiple\nstatements, enclosed by the BEGIN and END keywords. statement_list\nrepresents a list of one or more statements, each terminated by a\nsemicolon (;) statement delimiter. The statement_list itself is\noptional, so the empty compound statement (BEGIN END) is legal.\n\nBEGIN ... END blocks can be nested.\n\nUse of multiple statements requires that a client is able to send\nstatement strings containing the ; statement delimiter. In the mysql\ncommand-line client, this is handled with the delimiter command.\nChanging the ; end-of-statement delimiter (for example, to //) permit ;\nto be used in a program body. For an example, see\nhttp://dev.mysql.com/doc/refman/5.5/en/stored-programs-defining.html.\n\nA BEGIN ... END block can be labeled. See [HELP labels].\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/begin-end.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/begin-end.html'),(328,'SHOW PROCEDURE STATUS',26,'Syntax:\nSHOW PROCEDURE STATUS\n [LIKE \'pattern\' | WHERE expr]\n\nThis statement is a MySQL extension. It returns characteristics of a\nstored procedure, such as the database, name, type, creator, creation\nand modification dates, and character set information. A similar\nstatement, SHOW FUNCTION STATUS, displays information about stored\nfunctions (see [HELP SHOW FUNCTION STATUS]).\n\nThe LIKE clause, if present, indicates which procedure or function\nnames to match. The WHERE clause can be given to select rows using more\ngeneral conditions, as discussed in\nhttp://dev.mysql.com/doc/refman/5.5/en/extended-show.html.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/show-procedure-status.html\n\n','mysql> SHOW PROCEDURE STATUS LIKE \'sp1\'\\G\n*************************** 1. row ***************************\n Db: test\n Name: sp1\n Type: PROCEDURE\n Definer: testuser@localhost\n Modified: 2004-08-03 15:29:37\n Created: 2004-08-03 15:29:37\n Security_type: DEFINER\n Comment:\ncharacter_set_client: latin1\ncollation_connection: latin1_swedish_ci\n Database Collation: latin1_swedish_ci\n','http://dev.mysql.com/doc/refman/5.5/en/show-procedure-status.html'),(329,'DESCRIBE',28,'Syntax:\n{DESCRIBE | DESC} tbl_name [col_name | wild]\n\nDESCRIBE provides information about the columns in a table. It is a\nshortcut for SHOW COLUMNS FROM. These statements also display\ninformation for views. (See [HELP SHOW COLUMNS].)\n\ncol_name can be a column name, or a string containing the SQL \"%\" and\n\"_\" wildcard characters to obtain output only for the columns with\nnames matching the string. There is no need to enclose the string\nwithin quotation marks unless it contains spaces or other special\ncharacters.\n\nmysql> DESCRIBE City;\n+------------+----------+------+-----+---------+----------------+\n| Field | Type | Null | Key | Default | Extra |\n+------------+----------+------+-----+---------+----------------+\n| Id | int(11) | NO | PRI | NULL | auto_increment |\n| Name | char(35) | NO | | | |\n| Country | char(3) | NO | UNI | | |\n| District | char(20) | YES | MUL | | |\n| Population | int(11) | NO | | 0 | |\n+------------+----------+------+-----+---------+----------------+\n5 rows in set (0.00 sec)\n\nThe description for SHOW COLUMNS provides more information about the\noutput columns (see [HELP SHOW COLUMNS]).\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/describe.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/describe.html'),(330,'SHOW WARNINGS',26,'Syntax:\nSHOW WARNINGS [LIMIT [offset,] row_count]\nSHOW COUNT(*) WARNINGS\n\nSHOW WARNINGS shows information about the conditions (errors, warnings,\nand notes) that resulted from the last statement in the current session\nthat generated messages. It shows nothing if the last statement used a\ntable and generated no messages. (That is, a statement that uses a\ntable but generates no messages clears the message list.) Statements\nthat do not use tables and do not generate messages have no effect on\nthe message list.\n\nWarnings are generated for DML statements such as INSERT, UPDATE, and\nLOAD DATA INFILE as well as DDL statements such as CREATE TABLE and\nALTER TABLE.\n\nSHOW WARNINGS is also used following EXPLAIN EXTENDED, to display the\nextra information generated by EXPLAIN when the EXTENDED keyword is\nused. See http://dev.mysql.com/doc/refman/5.5/en/explain-extended.html.\n\nThe LIMIT clause has the same syntax as for the SELECT statement. See\nhttp://dev.mysql.com/doc/refman/5.5/en/select.html.\n\nA related statement, SHOW ERRORS, shows only the error conditions (it\nexcludes warnings and notes). See [HELP SHOW ERRORS].\n\nThe SHOW COUNT(*) WARNINGS statement displays the total number of\nerrors, warnings, and notes. You can also retrieve this number from the\nwarning_count system variable:\n\nSHOW COUNT(*) WARNINGS;\nSELECT @@warning_count;\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/show-warnings.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/show-warnings.html'),(331,'DROP USER',10,'Syntax:\nDROP USER user [, user] ...\n\nThe DROP USER statement removes one or more MySQL accounts and their\nprivileges. It removes privilege rows for the account from all grant\ntables. To use this statement, you must have the global CREATE USER\nprivilege or the DELETE privilege for the mysql database. Each account\nname uses the format described in\nhttp://dev.mysql.com/doc/refman/5.5/en/account-names.html. For example:\n\nDROP USER \'jeffrey\'@\'localhost\';\n\nIf you specify only the user name part of the account name, a host name\npart of \'%\' is used.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/drop-user.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/drop-user.html'),(332,'STDDEV_POP',16,'Syntax:\nSTDDEV_POP(expr)\n\nReturns the population standard deviation of expr (the square root of\nVAR_POP()). You can also use STD() or STDDEV(), which are equivalent\nbut not standard SQL.\n\nSTDDEV_POP() returns NULL if there were no matching rows.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/group-by-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/group-by-functions.html'),(333,'SHOW CHARACTER SET',26,'Syntax:\nSHOW CHARACTER SET\n [LIKE \'pattern\' | WHERE expr]\n\nThe SHOW CHARACTER SET statement shows all available character sets.\nThe LIKE clause, if present, indicates which character set names to\nmatch. The WHERE clause can be given to select rows using more general\nconditions, as discussed in\nhttp://dev.mysql.com/doc/refman/5.5/en/extended-show.html. For example:\n\nmysql> SHOW CHARACTER SET LIKE \'latin%\';\n+---------+-----------------------------+-------------------+--------+\n| Charset | Description | Default collation | Maxlen |\n+---------+-----------------------------+-------------------+--------+\n| latin1 | cp1252 West European | latin1_swedish_ci | 1 |\n| latin2 | ISO 8859-2 Central European | latin2_general_ci | 1 |\n| latin5 | ISO 8859-9 Turkish | latin5_turkish_ci | 1 |\n| latin7 | ISO 8859-13 Baltic | latin7_general_ci | 1 |\n+---------+-----------------------------+-------------------+--------+\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/show-character-set.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/show-character-set.html'),(334,'SUBSTRING',37,'Syntax:\nSUBSTRING(str,pos), SUBSTRING(str FROM pos), SUBSTRING(str,pos,len),\nSUBSTRING(str FROM pos FOR len)\n\nThe forms without a len argument return a substring from string str\nstarting at position pos. The forms with a len argument return a\nsubstring len characters long from string str, starting at position\npos. The forms that use FROM are standard SQL syntax. It is also\npossible to use a negative value for pos. In this case, the beginning\nof the substring is pos characters from the end of the string, rather\nthan the beginning. A negative value may be used for pos in any of the\nforms of this function.\n\nFor all forms of SUBSTRING(), the position of the first character in\nthe string from which the substring is to be extracted is reckoned as\n1.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html\n\n','mysql> SELECT SUBSTRING(\'Quadratically\',5);\n -> \'ratically\'\nmysql> SELECT SUBSTRING(\'foobarbar\' FROM 4);\n -> \'barbar\'\nmysql> SELECT SUBSTRING(\'Quadratically\',5,6);\n -> \'ratica\'\nmysql> SELECT SUBSTRING(\'Sakila\', -3);\n -> \'ila\'\nmysql> SELECT SUBSTRING(\'Sakila\', -5, 3);\n -> \'aki\'\nmysql> SELECT SUBSTRING(\'Sakila\' FROM -4 FOR 2);\n -> \'ki\'\n','http://dev.mysql.com/doc/refman/5.5/en/string-functions.html'),(335,'ISEMPTY',36,'IsEmpty(g)\n\nReturns 1 if the geometry value g is the empty geometry, 0 if it is not\nempty, and -1 if the argument is NULL. If the geometry is empty, it\nrepresents the empty point set.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/geometry-property-functions.html#general-geometry-property-functions\n\n','','http://dev.mysql.com/doc/refman/5.5/en/geometry-property-functions.html#general-geometry-property-functions'),(336,'SHOW FUNCTION STATUS',26,'Syntax:\nSHOW FUNCTION STATUS\n [LIKE \'pattern\' | WHERE expr]\n\nThis statement is similar to SHOW PROCEDURE STATUS but for stored\nfunctions. See [HELP SHOW PROCEDURE STATUS].\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/show-function-status.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/show-function-status.html'),(337,'LTRIM',37,'Syntax:\nLTRIM(str)\n\nReturns the string str with leading space characters removed.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html\n\n','mysql> SELECT LTRIM(\' barbar\');\n -> \'barbar\'\n','http://dev.mysql.com/doc/refman/5.5/en/string-functions.html'),(338,'INTERSECTS',30,'Intersects(g1,g2)\n\nReturns 1 or 0 to indicate whether g1 spatially intersects g2.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/functions-for-testing-spatial-relations-between-geometric-objects.html#functions-that-test-spatial-relationships-between-geometries\n\n','','http://dev.mysql.com/doc/refman/5.5/en/functions-for-testing-spatial-relations-between-geometric-objects.html#functions-that-test-spatial-relationships-between-geometries'),(339,'CALL',27,'Syntax:\nCALL sp_name([parameter[,...]])\nCALL sp_name[()]\n\nThe CALL statement invokes a stored procedure that was defined\npreviously with CREATE PROCEDURE.\n\nStored procedures that take no arguments can be invoked without\nparentheses. That is, CALL p() and CALL p are equivalent.\n\nCALL can pass back values to its caller using parameters that are\ndeclared as OUT or INOUT parameters. When the procedure returns, a\nclient program can also obtain the number of rows affected for the\nfinal statement executed within the routine: At the SQL level, call the\nROW_COUNT() function; from the C API, call the mysql_affected_rows()\nfunction.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/call.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/call.html'),(340,'MBRDISJOINT',6,'MBRDisjoint(g1,g2)\n\nReturns 1 or 0 to indicate whether the Minimum Bounding Rectangles of\nthe two geometries g1 and g2 are disjoint (do not intersect).\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/functions-for-testing-spatial-relations-between-geometric-objects.html#relations-on-geometry-mbr\n\n','','http://dev.mysql.com/doc/refman/5.5/en/functions-for-testing-spatial-relations-between-geometric-objects.html#relations-on-geometry-mbr'),(341,'VALUES',14,'Syntax:\nVALUES(col_name)\n\nIn an INSERT ... ON DUPLICATE KEY UPDATE statement, you can use the\nVALUES(col_name) function in the UPDATE clause to refer to column\nvalues from the INSERT portion of the statement. In other words,\nVALUES(col_name) in the UPDATE clause refers to the value of col_name\nthat would be inserted, had no duplicate-key conflict occurred. This\nfunction is especially useful in multiple-row inserts. The VALUES()\nfunction is meaningful only in the ON DUPLICATE KEY UPDATE clause of\nINSERT statements and returns NULL otherwise. See\nhttp://dev.mysql.com/doc/refman/5.5/en/insert-on-duplicate.html.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/miscellaneous-functions.html\n\n','mysql> INSERT INTO table (a,b,c) VALUES (1,2,3),(4,5,6)\n -> ON DUPLICATE KEY UPDATE c=VALUES(a)+VALUES(b);\n','http://dev.mysql.com/doc/refman/5.5/en/miscellaneous-functions.html'),(342,'SUBSTRING_INDEX',37,'Syntax:\nSUBSTRING_INDEX(str,delim,count)\n\nReturns the substring from string str before count occurrences of the\ndelimiter delim. If count is positive, everything to the left of the\nfinal delimiter (counting from the left) is returned. If count is\nnegative, everything to the right of the final delimiter (counting from\nthe right) is returned. SUBSTRING_INDEX() performs a case-sensitive\nmatch when searching for delim.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html\n\n','mysql> SELECT SUBSTRING_INDEX(\'www.mysql.com\', \'.\', 2);\n -> \'www.mysql\'\nmysql> SELECT SUBSTRING_INDEX(\'www.mysql.com\', \'.\', -2);\n -> \'mysql.com\'\n','http://dev.mysql.com/doc/refman/5.5/en/string-functions.html'),(343,'ENCODE',12,'Syntax:\nENCODE(str,pass_str)\n\nEncrypt str using pass_str as the password. To decrypt the result, use\nDECODE().\n\nThe result is a binary string of the same length as str.\n\nThe strength of the encryption is based on how good the random\ngenerator is. It should suffice for short strings.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/encryption-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/encryption-functions.html'),(344,'LOOP',23,'Syntax:\n[begin_label:] LOOP\n statement_list\nEND LOOP [end_label]\n\nLOOP implements a simple loop construct, enabling repeated execution of\nthe statement list, which consists of one or more statements, each\nterminated by a semicolon (;) statement delimiter. The statements\nwithin the loop are repeated until the loop is terminated. Usually,\nthis is accomplished with a LEAVE statement. Within a stored function,\nRETURN can also be used, which exits the function entirely.\n\nNeglecting to include a loop-termination statement results in an\ninfinite loop.\n\nA LOOP statement can be labeled. For the rules regarding label use, see\n[HELP labels].\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/loop.html\n\n','CREATE PROCEDURE doiterate(p1 INT)\nBEGIN\n label1: LOOP\n SET p1 = p1 + 1;\n IF p1 < 10 THEN\n ITERATE label1;\n END IF;\n LEAVE label1;\n END LOOP label1;\n SET @x = p1;\nEND;\n','http://dev.mysql.com/doc/refman/5.5/en/loop.html'),(345,'TRUNCATE',4,'Syntax:\nTRUNCATE(X,D)\n\nReturns the number X, truncated to D decimal places. If D is 0, the\nresult has no decimal point or fractional part. D can be negative to\ncause D digits left of the decimal point of the value X to become zero.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html\n\n','mysql> SELECT TRUNCATE(1.223,1);\n -> 1.2\nmysql> SELECT TRUNCATE(1.999,1);\n -> 1.9\nmysql> SELECT TRUNCATE(1.999,0);\n -> 1\nmysql> SELECT TRUNCATE(-1.999,1);\n -> -1.9\nmysql> SELECT TRUNCATE(122,-2);\n -> 100\nmysql> SELECT TRUNCATE(10.28*100,0);\n -> 1028\n','http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html'),(346,'TIMESTAMPADD',31,'Syntax:\nTIMESTAMPADD(unit,interval,datetime_expr)\n\nAdds the integer expression interval to the date or datetime expression\ndatetime_expr. The unit for interval is given by the unit argument,\nwhich should be one of the following values: MICROSECOND\n(microseconds), SECOND, MINUTE, HOUR, DAY, WEEK, MONTH, QUARTER, or\nYEAR.\n\nIt is possible to use FRAC_SECOND in place of MICROSECOND, but\nFRAC_SECOND is deprecated. FRAC_SECOND was removed in MySQL 5.5.3.\n\nThe unit value may be specified using one of keywords as shown, or with\na prefix of SQL_TSI_. For example, DAY and SQL_TSI_DAY both are legal.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','mysql> SELECT TIMESTAMPADD(MINUTE,1,\'2003-01-02\');\n -> \'2003-01-02 00:01:00\'\nmysql> SELECT TIMESTAMPADD(WEEK,1,\'2003-01-02\');\n -> \'2003-01-09\'\n','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(347,'SHOW',26,'SHOW has many forms that provide information about databases, tables,\ncolumns, or status information about the server. This section describes\nthose following:\n\nSHOW AUTHORS\nSHOW {BINARY | MASTER} LOGS\nSHOW BINLOG EVENTS [IN \'log_name\'] [FROM pos] [LIMIT [offset,] row_count]\nSHOW CHARACTER SET [like_or_where]\nSHOW COLLATION [like_or_where]\nSHOW [FULL] COLUMNS FROM tbl_name [FROM db_name] [like_or_where]\nSHOW CONTRIBUTORS\nSHOW CREATE DATABASE db_name\nSHOW CREATE EVENT event_name\nSHOW CREATE FUNCTION func_name\nSHOW CREATE PROCEDURE proc_name\nSHOW CREATE TABLE tbl_name\nSHOW CREATE TRIGGER trigger_name\nSHOW CREATE VIEW view_name\nSHOW DATABASES [like_or_where]\nSHOW ENGINE engine_name {STATUS | MUTEX}\nSHOW [STORAGE] ENGINES\nSHOW ERRORS [LIMIT [offset,] row_count]\nSHOW EVENTS\nSHOW FUNCTION CODE func_name\nSHOW FUNCTION STATUS [like_or_where]\nSHOW GRANTS FOR user\nSHOW INDEX FROM tbl_name [FROM db_name]\nSHOW MASTER STATUS\nSHOW OPEN TABLES [FROM db_name] [like_or_where]\nSHOW PLUGINS\nSHOW PROCEDURE CODE proc_name\nSHOW PROCEDURE STATUS [like_or_where]\nSHOW PRIVILEGES\nSHOW [FULL] PROCESSLIST\nSHOW PROFILE [types] [FOR QUERY n] [OFFSET n] [LIMIT n]\nSHOW PROFILES\nSHOW SLAVE HOSTS\nSHOW SLAVE STATUS\nSHOW [GLOBAL | SESSION] STATUS [like_or_where]\nSHOW TABLE STATUS [FROM db_name] [like_or_where]\nSHOW [FULL] TABLES [FROM db_name] [like_or_where]\nSHOW TRIGGERS [FROM db_name] [like_or_where]\nSHOW [GLOBAL | SESSION] VARIABLES [like_or_where]\nSHOW WARNINGS [LIMIT [offset,] row_count]\n\nlike_or_where:\n LIKE \'pattern\'\n | WHERE expr\n\nIf the syntax for a given SHOW statement includes a LIKE \'pattern\'\npart, \'pattern\' is a string that can contain the SQL \"%\" and \"_\"\nwildcard characters. The pattern is useful for restricting statement\noutput to matching values.\n\nSeveral SHOW statements also accept a WHERE clause that provides more\nflexibility in specifying which rows to display. See\nhttp://dev.mysql.com/doc/refman/5.5/en/extended-show.html.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/show.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/show.html'),(348,'GREATEST',18,'Syntax:\nGREATEST(value1,value2,...)\n\nWith two or more arguments, returns the largest (maximum-valued)\nargument. The arguments are compared using the same rules as for\nLEAST().\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/comparison-operators.html\n\n','mysql> SELECT GREATEST(2,0);\n -> 2\nmysql> SELECT GREATEST(34.0,3.0,5.0,767.0);\n -> 767.0\nmysql> SELECT GREATEST(\'B\',\'A\',\'C\');\n -> \'C\'\n','http://dev.mysql.com/doc/refman/5.5/en/comparison-operators.html'),(349,'SHOW VARIABLES',26,'Syntax:\nSHOW [GLOBAL | SESSION] VARIABLES\n [LIKE \'pattern\' | WHERE expr]\n\nSHOW VARIABLES shows the values of MySQL system variables. This\ninformation also can be obtained using the mysqladmin variables\ncommand. The LIKE clause, if present, indicates which variable names to\nmatch. The WHERE clause can be given to select rows using more general\nconditions, as discussed in\nhttp://dev.mysql.com/doc/refman/5.5/en/extended-show.html. This\nstatement does not require any privilege. It requires only the ability\nto connect to the server.\n\nWith the GLOBAL modifier, SHOW VARIABLES displays the values that are\nused for new connections to MySQL. As of MySQL 5.5.3, if a variable has\nno global value, no value is displayed. Before 5.5.3, the session value\nis displayed. With SESSION, SHOW VARIABLES displays the values that are\nin effect for the current connection. If no modifier is present, the\ndefault is SESSION. LOCAL is a synonym for SESSION.\nWith a LIKE clause, the statement displays only rows for those\nvariables with names that match the pattern. To obtain the row for a\nspecific variable, use a LIKE clause as shown:\n\nSHOW VARIABLES LIKE \'max_join_size\';\nSHOW SESSION VARIABLES LIKE \'max_join_size\';\n\nTo get a list of variables whose name match a pattern, use the \"%\"\nwildcard character in a LIKE clause:\n\nSHOW VARIABLES LIKE \'%size%\';\nSHOW GLOBAL VARIABLES LIKE \'%size%\';\n\nWildcard characters can be used in any position within the pattern to\nbe matched. Strictly speaking, because \"_\" is a wildcard that matches\nany single character, you should escape it as \"\\_\" to match it\nliterally. In practice, this is rarely necessary.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/show-variables.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/show-variables.html'),(350,'BINLOG',26,'Syntax:\nBINLOG \'str\'\n\nBINLOG is an internal-use statement. It is generated by the mysqlbinlog\nprogram as the printable representation of certain events in binary log\nfiles. (See http://dev.mysql.com/doc/refman/5.5/en/mysqlbinlog.html.)\nThe \'str\' value is a base 64-encoded string the that server decodes to\ndetermine the data change indicated by the corresponding event. This\nstatement requires the SUPER privilege.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/binlog.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/binlog.html'),(351,'BIT_AND',16,'Syntax:\nBIT_AND(expr)\n\nReturns the bitwise AND of all bits in expr. The calculation is\nperformed with 64-bit (BIGINT) precision.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/group-by-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/group-by-functions.html'),(352,'SECOND',31,'Syntax:\nSECOND(time)\n\nReturns the second for time, in the range 0 to 59.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','mysql> SELECT SECOND(\'10:05:03\');\n -> 3\n','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(353,'ATAN2',4,'Syntax:\nATAN(Y,X), ATAN2(Y,X)\n\nReturns the arc tangent of the two variables X and Y. It is similar to\ncalculating the arc tangent of Y / X, except that the signs of both\narguments are used to determine the quadrant of the result.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html\n\n','mysql> SELECT ATAN(-2,2);\n -> -0.78539816339745\nmysql> SELECT ATAN2(PI(),0);\n -> 1.5707963267949\n','http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html'),(354,'MBRCONTAINS',6,'MBRContains(g1,g2)\n\nReturns 1 or 0 to indicate whether the Minimum Bounding Rectangle of g1\ncontains the Minimum Bounding Rectangle of g2. This tests the opposite\nrelationship as MBRWithin().\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/functions-for-testing-spatial-relations-between-geometric-objects.html#relations-on-geometry-mbr\n\n','mysql> SET @g1 = GeomFromText(\'Polygon((0 0,0 3,3 3,3 0,0 0))\');\nmysql> SET @g2 = GeomFromText(\'Point(1 1)\');\nmysql> SELECT MBRContains(@g1,@g2), MBRContains(@g2,@g1);\n----------------------+----------------------+\n| MBRContains(@g1,@g2) | MBRContains(@g2,@g1) |\n+----------------------+----------------------+\n| 1 | 0 |\n+----------------------+----------------------+\n','http://dev.mysql.com/doc/refman/5.5/en/functions-for-testing-spatial-relations-between-geometric-objects.html#relations-on-geometry-mbr'),(355,'HOUR',31,'Syntax:\nHOUR(time)\n\nReturns the hour for time. The range of the return value is 0 to 23 for\ntime-of-day values. However, the range of TIME values actually is much\nlarger, so HOUR can return values greater than 23.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','mysql> SELECT HOUR(\'10:05:03\');\n -> 10\nmysql> SELECT HOUR(\'272:59:59\');\n -> 272\n','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(356,'SELECT',27,'Syntax:\nSELECT\n [ALL | DISTINCT | DISTINCTROW ]\n [HIGH_PRIORITY]\n [STRAIGHT_JOIN]\n [SQL_SMALL_RESULT] [SQL_BIG_RESULT] [SQL_BUFFER_RESULT]\n [SQL_CACHE | SQL_NO_CACHE] [SQL_CALC_FOUND_ROWS]\n select_expr [, select_expr ...]\n [FROM table_references\n [WHERE where_condition]\n [GROUP BY {col_name | expr | position}\n [ASC | DESC], ... [WITH ROLLUP]]\n [HAVING where_condition]\n [ORDER BY {col_name | expr | position}\n [ASC | DESC], ...]\n [LIMIT {[offset,] row_count | row_count OFFSET offset}]\n [PROCEDURE procedure_name(argument_list)]\n [INTO OUTFILE \'file_name\'\n [CHARACTER SET charset_name]\n export_options\n | INTO DUMPFILE \'file_name\'\n | INTO var_name [, var_name]]\n [FOR UPDATE | LOCK IN SHARE MODE]]\n\nSELECT is used to retrieve rows selected from one or more tables, and\ncan include UNION statements and subqueries. See [HELP UNION], and\nhttp://dev.mysql.com/doc/refman/5.5/en/subqueries.html.\n\nThe most commonly used clauses of SELECT statements are these:\n\no Each select_expr indicates a column that you want to retrieve. There\n must be at least one select_expr.\n\no table_references indicates the table or tables from which to retrieve\n rows. Its syntax is described in [HELP JOIN].\n\no The WHERE clause, if given, indicates the condition or conditions\n that rows must satisfy to be selected. where_condition is an\n expression that evaluates to true for each row to be selected. The\n statement selects all rows if there is no WHERE clause.\n\n In the WHERE expression, you can use any of the functions and\n operators that MySQL supports, except for aggregate (summary)\n functions. See\n http://dev.mysql.com/doc/refman/5.5/en/expressions.html, and\n http://dev.mysql.com/doc/refman/5.5/en/functions.html.\n\nSELECT can also be used to retrieve rows computed without reference to\nany table.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/select.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/select.html'),(357,'COT',4,'Syntax:\nCOT(X)\n\nReturns the cotangent of X.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html\n\n','mysql> SELECT COT(12);\n -> -1.5726734063977\nmysql> SELECT COT(0);\n -> NULL\n','http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html'),(358,'SHOW CREATE EVENT',26,'Syntax:\nSHOW CREATE EVENT event_name\n\nThis statement displays the CREATE EVENT statement needed to re-create\na given event. It requires the EVENT privilege for the database from\nwhich the event is to be shown. For example (using the same event\ne_daily defined and then altered in [HELP SHOW EVENTS]):\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/show-create-event.html\n\n','mysql> SHOW CREATE EVENT test.e_daily\\G\n*************************** 1. row ***************************\n Event: e_daily\n sql_mode:\n time_zone: SYSTEM\n Create Event: CREATE EVENT `e_daily`\n ON SCHEDULE EVERY 1 DAY\n STARTS CURRENT_TIMESTAMP + INTERVAL 6 HOUR\n ON COMPLETION NOT PRESERVE\n ENABLE\n COMMENT \'Saves total number of sessions then\n clears the table each day\'\n DO BEGIN\n INSERT INTO site_activity.totals (time, total)\n SELECT CURRENT_TIMESTAMP, COUNT(*)\n FROM site_activity.sessions;\n DELETE FROM site_activity.sessions;\n END\ncharacter_set_client: latin1\ncollation_connection: latin1_swedish_ci\n Database Collation: latin1_swedish_ci\n','http://dev.mysql.com/doc/refman/5.5/en/show-create-event.html'),(359,'LOAD_FILE',37,'Syntax:\nLOAD_FILE(file_name)\n\nReads the file and returns the file contents as a string. To use this\nfunction, the file must be located on the server host, you must specify\nthe full path name to the file, and you must have the FILE privilege.\nThe file must be readable by all and its size less than\nmax_allowed_packet bytes. If the secure_file_priv system variable is\nset to a nonempty directory name, the file to be loaded must be located\nin that directory.\n\nIf the file does not exist or cannot be read because one of the\npreceding conditions is not satisfied, the function returns NULL.\n\nThe character_set_filesystem system variable controls interpretation of\nfile names that are given as literal strings.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html\n\n','mysql> UPDATE t\n SET blob_col=LOAD_FILE(\'/tmp/picture\')\n WHERE id=1;\n','http://dev.mysql.com/doc/refman/5.5/en/string-functions.html'),(360,'POINTFROMTEXT',3,'PointFromText(wkt[,srid])\n\nConstructs a POINT value using its WKT representation and SRID.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-values.html#gis-wkt-functions\n\n','','http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-values.html#gis-wkt-functions'),(361,'GROUP_CONCAT',16,'Syntax:\nGROUP_CONCAT(expr)\n\nThis function returns a string result with the concatenated non-NULL\nvalues from a group. It returns NULL if there are no non-NULL values.\nThe full syntax is as follows:\n\nGROUP_CONCAT([DISTINCT] expr [,expr ...]\n [ORDER BY {unsigned_integer | col_name | expr}\n [ASC | DESC] [,col_name ...]]\n [SEPARATOR str_val])\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/group-by-functions.html\n\n','mysql> SELECT student_name,\n -> GROUP_CONCAT(test_score)\n -> FROM student\n -> GROUP BY student_name;\n','http://dev.mysql.com/doc/refman/5.5/en/group-by-functions.html'),(362,'DATE_FORMAT',31,'Syntax:\nDATE_FORMAT(date,format)\n\nFormats the date value according to the format string.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','mysql> SELECT DATE_FORMAT(\'2009-10-04 22:23:00\', \'%W %M %Y\');\n -> \'Sunday October 2009\'\nmysql> SELECT DATE_FORMAT(\'2007-10-04 22:23:00\', \'%H:%i:%s\');\n -> \'22:23:00\'\nmysql> SELECT DATE_FORMAT(\'1900-10-04 22:23:00\',\n -> \'%D %y %a %d %m %b %j\');\n -> \'4th 00 Thu 04 10 Oct 277\'\nmysql> SELECT DATE_FORMAT(\'1997-10-04 22:23:00\',\n -> \'%H %k %I %r %T %S %w\');\n -> \'22 22 10 10:23:00 PM 22:23:00 00 6\'\nmysql> SELECT DATE_FORMAT(\'1999-01-01\', \'%X %V\');\n -> \'1998 52\'\nmysql> SELECT DATE_FORMAT(\'2006-06-00\', \'%d\');\n -> \'00\'\n','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(363,'BENCHMARK',17,'Syntax:\nBENCHMARK(count,expr)\n\nThe BENCHMARK() function executes the expression expr repeatedly count\ntimes. It may be used to time how quickly MySQL processes the\nexpression. The result value is always 0. The intended use is from\nwithin the mysql client, which reports query execution times:\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/information-functions.html\n\n','mysql> SELECT BENCHMARK(1000000,ENCODE(\'hello\',\'goodbye\'));\n+----------------------------------------------+\n| BENCHMARK(1000000,ENCODE(\'hello\',\'goodbye\')) |\n+----------------------------------------------+\n| 0 |\n+----------------------------------------------+\n1 row in set (4.74 sec)\n','http://dev.mysql.com/doc/refman/5.5/en/information-functions.html'),(364,'YEAR',31,'Syntax:\nYEAR(date)\n\nReturns the year for date, in the range 1000 to 9999, or 0 for the\n\"zero\" date.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','mysql> SELECT YEAR(\'1987-01-01\');\n -> 1987\n','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(365,'SHOW ENGINE',26,'Syntax:\nSHOW ENGINE engine_name {STATUS | MUTEX}\n\nSHOW ENGINE displays operational information about a storage engine.\nThe following statements currently are supported:\n\nSHOW ENGINE INNODB STATUS\nSHOW ENGINE INNODB MUTEX\nSHOW ENGINE {NDB | NDBCLUSTER} STATUS\nSHOW ENGINE PERFORMANCE_SCHEMA STATUS\n\nSHOW ENGINE INNODB STATUS displays extensive information from the\nstandard InnoDB Monitor about the state of the InnoDB storage engine.\nFor information about the standard monitor and other InnoDB Monitors\nthat provide information about InnoDB processing, see\nhttp://dev.mysql.com/doc/refman/5.5/en/innodb-monitors.html.\n\nSHOW ENGINE INNODB MUTEX displays InnoDB mutex statistics. The\nstatement displays the following fields:\n\no Type\n\n Always InnoDB.\n\no Name\n\n The source file where the mutex is implemented, and the line number\n in the file where the mutex is created. The line number may change\n depending on your version of MySQL.\n\no Status\n\n The mutex status. This field displays several values if UNIV_DEBUG\n was defined at MySQL compilation time (for example, in include/univ.i\n in the InnoDB part of the MySQL source tree). If UNIV_DEBUG was not\n defined, the statement displays only the os_waits value. In the\n latter case (without UNIV_DEBUG), the information on which the output\n is based is insufficient to distinguish regular mutexes and mutexes\n that protect rw-locks (which permit multiple readers or a single\n writer). Consequently, the output may appear to contain multiple rows\n for the same mutex.\n\n o count indicates how many times the mutex was requested.\n\n o spin_waits indicates how many times the spinlock had to run.\n\n o spin_rounds indicates the number of spinlock rounds. (spin_rounds\n divided by spin_waits provides the average round count.)\n\n o os_waits indicates the number of operating system waits. This\n occurs when the spinlock did not work (the mutex was not locked\n during the spinlock and it was necessary to yield to the operating\n system and wait).\n\n o os_yields indicates the number of times a the thread trying to lock\n a mutex gave up its timeslice and yielded to the operating system\n (on the presumption that permitting other threads to run will free\n the mutex so that it can be locked).\n\n o os_wait_times indicates the amount of time (in ms) spent in\n operating system waits, if the timed_mutexes system variable is 1\n (ON). If timed_mutexes is 0 (OFF), timing is disabled, so\n os_wait_times is 0. timed_mutexes is off by default.\n\nInformation from this statement can be used to diagnose system\nproblems. For example, large values of spin_waits and spin_rounds may\nindicate scalability problems.\n\nUse SHOW ENGINE PERFORMANCE_SCHEMA STATUS to inspect the internal\noperation of the Performance Schema code:\n\nmysql> SHOW ENGINE PERFORMANCE_SCHEMA STATUS\\G\n...\n*************************** 3. row ***************************\n Type: performance_schema\n Name: events_waits_history.row_size\nStatus: 76\n*************************** 4. row ***************************\n Type: performance_schema\n Name: events_waits_history.row_count\nStatus: 10000\n*************************** 5. row ***************************\n Type: performance_schema\n Name: events_waits_history.memory\nStatus: 760000\n...\n*************************** 57. row ***************************\n Type: performance_schema\n Name: performance_schema.memory\nStatus: 26459600\n...\n\nThe intent of this statement is to help the DBA to understand the\neffects that different options have on memory requirements.\n\nName values consist of two parts, which name an internal buffer and an\nattribute of the buffer, respectively:\n\no Internal buffers that are exposed as a table in the\n performance_schema database are named after the table. Examples:\n events_waits_history.row_size, mutex_instances.row_count.\n\no Internal buffers that are not exposed as a table are named within\n parentheses. Examples: (pfs_cond_class).row_size,\n (pfs_mutex_class).memory.\n\no Values that apply to the Performance Schema as a whole begin with\n performance_schema. Example: performance_schema.memory.\n\nAttributes have these meanings:\n\no row_size cannot be changed. It is the size of the internal record\n used by the implementation.\n\no row_count can be changed depending on the configuration options.\n\no For a table, tbl_name.memory is the product of row_size multiplied by\n row_count. For the Performance Schema as a whole,\n performance_schema.memory is the sum of all the memory used (the sum\n of all other memory values).\n\nIn some cases, there is a direct relationship between a configuration\nparameter and a SHOW ENGINE value. For example,\nevents_waits_history_long.row_count corresponds to\nperformance_schema_events_waits_history_long_size. In other cases, the\nrelationship is more complex. For example,\nevents_waits_history.row_count corresponds to\nperformance_schema_events_waits_history_size (the number of rows per\nthread) multiplied by performance_schema_max_thread_instances ( the\nnumber of threads).\n\nIf the server has the NDBCLUSTER storage engine enabled, SHOW ENGINE\nNDB STATUS displays cluster status information such as the number of\nconnected data nodes, the cluster connectstring, and cluster binlog\nepochs, as well as counts of various Cluster API objects created by the\nMySQL Server when connected to the cluster. Sample output from this\nstatement is shown here:\n\nmysql> SHOW ENGINE NDB STATUS;\n+------------+-----------------------+--------------------------------------------------+\n| Type | Name | Status |\n+------------+-----------------------+--------------------------------------------------+\n| ndbcluster | connection | cluster_node_id=7,\n connected_host=192.168.0.103, connected_port=1186, number_of_data_nodes=4,\n number_of_ready_data_nodes=3, connect_count=0 |\n| ndbcluster | NdbTransaction | created=6, free=0, sizeof=212 |\n| ndbcluster | NdbOperation | created=8, free=8, sizeof=660 |\n| ndbcluster | NdbIndexScanOperation | created=1, free=1, sizeof=744 |\n| ndbcluster | NdbIndexOperation | created=0, free=0, sizeof=664 |\n| ndbcluster | NdbRecAttr | created=1285, free=1285, sizeof=60 |\n| ndbcluster | NdbApiSignal | created=16, free=16, sizeof=136 |\n| ndbcluster | NdbLabel | created=0, free=0, sizeof=196 |\n| ndbcluster | NdbBranch | created=0, free=0, sizeof=24 |\n| ndbcluster | NdbSubroutine | created=0, free=0, sizeof=68 |\n| ndbcluster | NdbCall | created=0, free=0, sizeof=16 |\n| ndbcluster | NdbBlob | created=1, free=1, sizeof=264 |\n| ndbcluster | NdbReceiver | created=4, free=0, sizeof=68 |\n| ndbcluster | binlog | latest_epoch=155467, latest_trans_epoch=148126,\n latest_received_binlog_epoch=0, latest_handled_binlog_epoch=0,\n latest_applied_binlog_epoch=0 |\n+------------+-----------------------+--------------------------------------------------+\n\nThe rows with connection and binlog in the Name column were added to\nthe output of this statement in MySQL 5.1. The Status column in each of\nthese rows provides information about the MySQL server\'s connection to\nthe cluster and about the cluster binary log\'s status, respectively.\nThe Status information is in the form of comma-delimited set of\nname/value pairs.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/show-engine.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/show-engine.html'),(366,'NAME_CONST',14,'Syntax:\nNAME_CONST(name,value)\n\nReturns the given value. When used to produce a result set column,\nNAME_CONST() causes the column to have the given name. The arguments\nshould be constants.\n\nmysql> SELECT NAME_CONST(\'myname\', 14);\n+--------+\n| myname |\n+--------+\n| 14 |\n+--------+\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/miscellaneous-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/miscellaneous-functions.html'),(367,'RELEASE_LOCK',14,'Syntax:\nRELEASE_LOCK(str)\n\nReleases the lock named by the string str that was obtained with\nGET_LOCK(). Returns 1 if the lock was released, 0 if the lock was not\nestablished by this thread (in which case the lock is not released),\nand NULL if the named lock did not exist. The lock does not exist if it\nwas never obtained by a call to GET_LOCK() or if it has previously been\nreleased.\n\nThe DO statement is convenient to use with RELEASE_LOCK(). See [HELP\nDO].\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/miscellaneous-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/miscellaneous-functions.html'),(368,'IS NULL',18,'Syntax:\nIS NULL\n\nTests whether a value is NULL.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/comparison-operators.html\n\n','mysql> SELECT 1 IS NULL, 0 IS NULL, NULL IS NULL;\n -> 0, 0, 1\n','http://dev.mysql.com/doc/refman/5.5/en/comparison-operators.html'),(369,'CONVERT_TZ',31,'Syntax:\nCONVERT_TZ(dt,from_tz,to_tz)\n\nCONVERT_TZ() converts a datetime value dt from the time zone given by\nfrom_tz to the time zone given by to_tz and returns the resulting\nvalue. Time zones are specified as described in\nhttp://dev.mysql.com/doc/refman/5.5/en/time-zone-support.html. This\nfunction returns NULL if the arguments are invalid.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','mysql> SELECT CONVERT_TZ(\'2004-01-01 12:00:00\',\'GMT\',\'MET\');\n -> \'2004-01-01 13:00:00\'\nmysql> SELECT CONVERT_TZ(\'2004-01-01 12:00:00\',\'+00:00\',\'+10:00\');\n -> \'2004-01-01 22:00:00\'\n','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(370,'TIME_TO_SEC',31,'Syntax:\nTIME_TO_SEC(time)\n\nReturns the time argument, converted to seconds.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','mysql> SELECT TIME_TO_SEC(\'22:23:00\');\n -> 80580\nmysql> SELECT TIME_TO_SEC(\'00:39:38\');\n -> 2378\n','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(371,'WEEKDAY',31,'Syntax:\nWEEKDAY(date)\n\nReturns the weekday index for date (0 = Monday, 1 = Tuesday, ... 6 =\nSunday).\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','mysql> SELECT WEEKDAY(\'2008-02-03 22:23:00\');\n -> 6\nmysql> SELECT WEEKDAY(\'2007-11-06\');\n -> 1\n','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(372,'EXPORT_SET',37,'Syntax:\nEXPORT_SET(bits,on,off[,separator[,number_of_bits]])\n\nReturns a string such that for every bit set in the value bits, you get\nan on string and for every bit not set in the value, you get an off\nstring. Bits in bits are examined from right to left (from low-order to\nhigh-order bits). Strings are added to the result from left to right,\nseparated by the separator string (the default being the comma\ncharacter \",\"). The number of bits examined is given by number_of_bits,\nwhich has a default of 64 if not specified. number_of_bits is silently\nclipped to 64 if larger than 64. It is treated as an unsigned integer,\nso a value of -1 is effectively the same as 64.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html\n\n','mysql> SELECT EXPORT_SET(5,\'Y\',\'N\',\',\',4);\n -> \'Y,N,Y,N\'\nmysql> SELECT EXPORT_SET(6,\'1\',\'0\',\',\',10);\n -> \'0,1,1,0,0,0,0,0,0,0\'\n','http://dev.mysql.com/doc/refman/5.5/en/string-functions.html'),(373,'ALTER SERVER',39,'Syntax:\nALTER SERVER server_name\n OPTIONS (option [, option] ...)\n\nAlters the server information for server_name, adjusting any of the\noptions permitted in the CREATE SERVER statement. See [HELP CREATE\nSERVER]. The corresponding fields in the mysql.servers table are\nupdated accordingly. This statement requires the SUPER privilege.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/alter-server.html\n\n','ALTER SERVER s OPTIONS (USER \'sally\');\n','http://dev.mysql.com/doc/refman/5.5/en/alter-server.html'),(374,'RESIGNAL',23,'Syntax:\nRESIGNAL [condition_value]\n [SET signal_information_item\n [, signal_information_item] ...]\n\ncondition_value:\n SQLSTATE [VALUE] sqlstate_value\n | condition_name\n\nsignal_information_item:\n condition_information_item_name = simple_value_specification\n\ncondition_information_item_name:\n CLASS_ORIGIN\n | SUBCLASS_ORIGIN\n | MESSAGE_TEXT\n | MYSQL_ERRNO\n | CONSTRAINT_CATALOG\n | CONSTRAINT_SCHEMA\n | CONSTRAINT_NAME\n | CATALOG_NAME\n | SCHEMA_NAME\n | TABLE_NAME\n | COLUMN_NAME\n | CURSOR_NAME\n\ncondition_name, simple_value_specification:\n (see following discussion)\n\nRESIGNAL passes on the error condition information that is available\nduring execution of a condition handler within a compound statement\ninside a stored procedure or function, trigger, or event. RESIGNAL may\nchange some or all information before passing it on. RESIGNAL is\nrelated to SIGNAL, but instead of originating a condition as SIGNAL\ndoes, RESIGNAL relays existing condition information, possibly after\nmodifying it.\n\nRESIGNAL makes it possible to both handle an error and return the error\ninformation. Otherwise, by executing an SQL statement within the\nhandler, information that caused the handler\'s activation is destroyed.\nRESIGNAL also can make some procedures shorter if a given handler can\nhandle part of a situation, then pass the condition \"up the line\" to\nanother handler.\n\nNo special privileges are required to execute the RESIGNAL statement.\n\nFor condition_value and signal_information_item, the definitions and\nrules are the same for RESIGNAL as for SIGNAL (see [HELP SIGNAL]).\n\nThe RESIGNAL statement takes condition_value and SET clauses, both of\nwhich are optional. This leads to several possible uses:\n\no RESIGNAL alone:\n\nRESIGNAL;\n\no RESIGNAL with new signal information:\n\nRESIGNAL SET signal_information_item [, signal_information_item] ...;\n\no RESIGNAL with a condition value and possibly new signal information:\n\nRESIGNAL condition_value\n [SET signal_information_item [, signal_information_item] ...];\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/resignal.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/resignal.html'),(375,'TIME FUNCTION',31,'Syntax:\nTIME(expr)\n\nExtracts the time part of the time or datetime expression expr and\nreturns it as a string.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','mysql> SELECT TIME(\'2003-12-31 01:02:03\');\n -> \'01:02:03\'\nmysql> SELECT TIME(\'2003-12-31 01:02:03.000123\');\n -> \'01:02:03.000123\'\n','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(376,'DATE_ADD',31,'Syntax:\nDATE_ADD(date,INTERVAL expr unit), DATE_SUB(date,INTERVAL expr unit)\n\nThese functions perform date arithmetic. The date argument specifies\nthe starting date or datetime value. expr is an expression specifying\nthe interval value to be added or subtracted from the starting date.\nexpr is a string; it may start with a \"-\" for negative intervals. unit\nis a keyword indicating the units in which the expression should be\ninterpreted.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','mysql> SELECT \'2008-12-31 23:59:59\' + INTERVAL 1 SECOND;\n -> \'2009-01-01 00:00:00\'\nmysql> SELECT INTERVAL 1 DAY + \'2008-12-31\';\n -> \'2009-01-01\'\nmysql> SELECT \'2005-01-01\' - INTERVAL 1 SECOND;\n -> \'2004-12-31 23:59:59\'\nmysql> SELECT DATE_ADD(\'2000-12-31 23:59:59\',\n -> INTERVAL 1 SECOND);\n -> \'2001-01-01 00:00:00\'\nmysql> SELECT DATE_ADD(\'2010-12-31 23:59:59\',\n -> INTERVAL 1 DAY);\n -> \'2011-01-01 23:59:59\'\nmysql> SELECT DATE_ADD(\'2100-12-31 23:59:59\',\n -> INTERVAL \'1:1\' MINUTE_SECOND);\n -> \'2101-01-01 00:01:00\'\nmysql> SELECT DATE_SUB(\'2005-01-01 00:00:00\',\n -> INTERVAL \'1 1:1:1\' DAY_SECOND);\n -> \'2004-12-30 22:58:59\'\nmysql> SELECT DATE_ADD(\'1900-01-01 00:00:00\',\n -> INTERVAL \'-1 10\' DAY_HOUR);\n -> \'1899-12-30 14:00:00\'\nmysql> SELECT DATE_SUB(\'1998-01-02\', INTERVAL 31 DAY);\n -> \'1997-12-02\'\nmysql> SELECT DATE_ADD(\'1992-12-31 23:59:59.000002\',\n -> INTERVAL \'1.999999\' SECOND_MICROSECOND);\n -> \'1993-01-01 00:00:01.000001\'\n','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(377,'CAST',37,'Syntax:\nCAST(expr AS type)\n\nThe CAST() function takes an expression of any type and produces a\nresult value of a specified type, similar to CONVERT(). See the\ndescription of CONVERT() for more information.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/cast-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/cast-functions.html'),(378,'SOUNDS LIKE',37,'Syntax:\nexpr1 SOUNDS LIKE expr2\n\nThis is the same as SOUNDEX(expr1) = SOUNDEX(expr2).\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/string-functions.html'),(379,'PERIOD_DIFF',31,'Syntax:\nPERIOD_DIFF(P1,P2)\n\nReturns the number of months between periods P1 and P2. P1 and P2\nshould be in the format YYMM or YYYYMM. Note that the period arguments\nP1 and P2 are not date values.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','mysql> SELECT PERIOD_DIFF(200802,200703);\n -> 11\n','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(380,'LIKE',37,'Syntax:\nexpr LIKE pat [ESCAPE \'escape_char\']\n\nPattern matching using SQL simple regular expression comparison.\nReturns 1 (TRUE) or 0 (FALSE). If either expr or pat is NULL, the\nresult is NULL.\n\nThe pattern need not be a literal string. For example, it can be\nspecified as a string expression or table column.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-comparison-functions.html\n\n','mysql> SELECT \'David!\' LIKE \'David_\';\n -> 1\nmysql> SELECT \'David!\' LIKE \'%D%v%\';\n -> 1\n','http://dev.mysql.com/doc/refman/5.5/en/string-comparison-functions.html'),(381,'MULTIPOINT',24,'MultiPoint(pt1,pt2,...)\n\nConstructs a MultiPoint value using Point or WKB Point arguments.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-values.html#gis-mysql-specific-functions\n\n','','http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-values.html#gis-mysql-specific-functions'),(382,'>>',19,'Syntax:\n>>\n\nShifts a longlong (BIGINT) number to the right.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/bit-functions.html\n\n','mysql> SELECT 4 >> 2;\n -> 1\n','http://dev.mysql.com/doc/refman/5.5/en/bit-functions.html'),(383,'FETCH',23,'Syntax:\nFETCH [[NEXT] FROM] cursor_name INTO var_name [, var_name] ...\n\nThis statement fetches the next row for the SELECT statement associated\nwith the specified cursor (which must be open), and advances the cursor\npointer. If a row exists, the fetched columns are stored in the named\nvariables. The number of columns retrieved by the SELECT statement must\nmatch the number of output variables specified in the FETCH statement.\n\nIf no more rows are available, a No Data condition occurs with SQLSTATE\nvalue \'02000\'. To detect this condition, you can set up a handler for\nit (or for a NOT FOUND condition). For an example, see\nhttp://dev.mysql.com/doc/refman/5.5/en/cursors.html.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/fetch.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/fetch.html'),(384,'AVG',16,'Syntax:\nAVG([DISTINCT] expr)\n\nReturns the average value of expr. The DISTINCT option can be used to\nreturn the average of the distinct values of expr.\n\nAVG() returns NULL if there were no matching rows.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/group-by-functions.html\n\n','mysql> SELECT student_name, AVG(test_score)\n -> FROM student\n -> GROUP BY student_name;\n','http://dev.mysql.com/doc/refman/5.5/en/group-by-functions.html'),(385,'TRUE FALSE',29,'The constants TRUE and FALSE evaluate to 1 and 0, respectively. The\nconstant names can be written in any lettercase.\n\nmysql> SELECT TRUE, true, FALSE, false;\n -> 1, 1, 0, 0\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/boolean-literals.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/boolean-literals.html'),(386,'MBRWITHIN',6,'MBRWithin(g1,g2)\n\nReturns 1 or 0 to indicate whether the Minimum Bounding Rectangle of g1\nis within the Minimum Bounding Rectangle of g2. This tests the opposite\nrelationship as MBRContains().\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/functions-for-testing-spatial-relations-between-geometric-objects.html#relations-on-geometry-mbr\n\n','mysql> SET @g1 = GeomFromText(\'Polygon((0 0,0 3,3 3,3 0,0 0))\');\nmysql> SET @g2 = GeomFromText(\'Polygon((0 0,0 5,5 5,5 0,0 0))\');\nmysql> SELECT MBRWithin(@g1,@g2), MBRWithin(@g2,@g1);\n+--------------------+--------------------+\n| MBRWithin(@g1,@g2) | MBRWithin(@g2,@g1) |\n+--------------------+--------------------+\n| 1 | 0 |\n+--------------------+--------------------+\n','http://dev.mysql.com/doc/refman/5.5/en/functions-for-testing-spatial-relations-between-geometric-objects.html#relations-on-geometry-mbr'),(387,'SESSION_USER',17,'Syntax:\nSESSION_USER()\n\nSESSION_USER() is a synonym for USER().\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/information-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/information-functions.html'),(388,'IN',18,'Syntax:\nexpr IN (value,...)\n\nReturns 1 if expr is equal to any of the values in the IN list, else\nreturns 0. If all values are constants, they are evaluated according to\nthe type of expr and sorted. The search for the item then is done using\na binary search. This means IN is very quick if the IN value list\nconsists entirely of constants. Otherwise, type conversion takes place\naccording to the rules described in\nhttp://dev.mysql.com/doc/refman/5.5/en/type-conversion.html, but\napplied to all the arguments.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/comparison-operators.html\n\n','mysql> SELECT 2 IN (0,3,5,7);\n -> 0\nmysql> SELECT \'wefwf\' IN (\'wee\',\'wefwf\',\'weg\');\n -> 1\n','http://dev.mysql.com/doc/refman/5.5/en/comparison-operators.html'),(389,'QUOTE',37,'Syntax:\nQUOTE(str)\n\nQuotes a string to produce a result that can be used as a properly\nescaped data value in an SQL statement. The string is returned enclosed\nby single quotation marks and with each instance of backslash (\"\\\"),\nsingle quote (\"\'\"), ASCII NUL, and Control+Z preceded by a backslash.\nIf the argument is NULL, the return value is the word \"NULL\" without\nenclosing single quotation marks.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html\n\n','mysql> SELECT QUOTE(\'Don\\\'t!\');\n -> \'Don\\\'t!\'\nmysql> SELECT QUOTE(NULL);\n -> NULL\n','http://dev.mysql.com/doc/refman/5.5/en/string-functions.html'),(390,'HELP COMMAND',26,'Syntax:\nmysql> help search_string\n\nIf you provide an argument to the help command, mysql uses it as a\nsearch string to access server-side help from the contents of the MySQL\nReference Manual. The proper operation of this command requires that\nthe help tables in the mysql database be initialized with help topic\ninformation (see\nhttp://dev.mysql.com/doc/refman/5.5/en/server-side-help-support.html).\n\nIf there is no match for the search string, the search fails:\n\nmysql> help me\n\nNothing found\nPlease try to run \'help contents\' for a list of all accessible topics\n\nUse help contents to see a list of the help categories:\n\nmysql> help contents\nYou asked for help about help category: \"Contents\"\nFor more information, type \'help <item>\', where <item> is one of the\nfollowing categories:\n Account Management\n Administration\n Data Definition\n Data Manipulation\n Data Types\n Functions\n Functions and Modifiers for Use with GROUP BY\n Geographic Features\n Language Structure\n Plugins\n Storage Engines\n Stored Routines\n Table Maintenance\n Transactions\n Triggers\n\nIf the search string matches multiple items, mysql shows a list of\nmatching topics:\n\nmysql> help logs\nMany help items for your request exist.\nTo make a more specific request, please type \'help <item>\',\nwhere <item> is one of the following topics:\n SHOW\n SHOW BINARY LOGS\n SHOW ENGINE\n SHOW LOGS\n\nUse a topic as the search string to see the help entry for that topic:\n\nmysql> help show binary logs\nName: \'SHOW BINARY LOGS\'\nDescription:\nSyntax:\nSHOW BINARY LOGS\nSHOW MASTER LOGS\n\nLists the binary log files on the server. This statement is used as\npart of the procedure described in [purge-binary-logs], that shows how\nto determine which logs can be purged.\n\nmysql> SHOW BINARY LOGS;\n+---------------+-----------+\n| Log_name | File_size |\n+---------------+-----------+\n| binlog.000015 | 724935 |\n| binlog.000016 | 733481 |\n+---------------+-----------+\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/mysql-server-side-help.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/mysql-server-side-help.html'),(391,'QUARTER',31,'Syntax:\nQUARTER(date)\n\nReturns the quarter of the year for date, in the range 1 to 4.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','mysql> SELECT QUARTER(\'2008-04-01\');\n -> 2\n','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(392,'POSITION',37,'Syntax:\nPOSITION(substr IN str)\n\nPOSITION(substr IN str) is a synonym for LOCATE(substr,str).\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/string-functions.html'),(393,'SHOW CREATE FUNCTION',26,'Syntax:\nSHOW CREATE FUNCTION func_name\n\nThis statement is similar to SHOW CREATE PROCEDURE but for stored\nfunctions. See [HELP SHOW CREATE PROCEDURE].\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/show-create-function.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/show-create-function.html'),(394,'IS_USED_LOCK',14,'Syntax:\nIS_USED_LOCK(str)\n\nChecks whether the lock named str is in use (that is, locked). If so,\nit returns the connection identifier of the client that holds the lock.\nOtherwise, it returns NULL.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/miscellaneous-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/miscellaneous-functions.html'),(395,'POLYFROMTEXT',3,'PolyFromText(wkt[,srid]), PolygonFromText(wkt[,srid])\n\nConstructs a POLYGON value using its WKT representation and SRID.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-values.html#gis-wkt-functions\n\n','','http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-values.html#gis-wkt-functions'),(396,'DES_ENCRYPT',12,'Syntax:\nDES_ENCRYPT(str[,{key_num|key_str}])\n\nEncrypts the string with the given key using the Triple-DES algorithm.\n\nThis function works only if MySQL has been configured with SSL support.\nSee http://dev.mysql.com/doc/refman/5.5/en/ssl-connections.html.\n\nThe encryption key to use is chosen based on the second argument to\nDES_ENCRYPT(), if one was given. With no argument, the first key from\nthe DES key file is used. With a key_num argument, the given key number\n(0 to 9) from the DES key file is used. With a key_str argument, the\ngiven key string is used to encrypt str.\n\nThe key file can be specified with the --des-key-file server option.\n\nThe return string is a binary string where the first character is\nCHAR(128 | key_num). If an error occurs, DES_ENCRYPT() returns NULL.\n\nThe 128 is added to make it easier to recognize an encrypted key. If\nyou use a string key, key_num is 127.\n\nThe string length for the result is given by this formula:\n\nnew_len = orig_len + (8 - (orig_len % 8)) + 1\n\nEach line in the DES key file has the following format:\n\nkey_num des_key_str\n\nEach key_num value must be a number in the range from 0 to 9. Lines in\nthe file may be in any order. des_key_str is the string that is used to\nencrypt the message. There should be at least one space between the\nnumber and the key. The first key is the default key that is used if\nyou do not specify any key argument to DES_ENCRYPT().\n\nYou can tell MySQL to read new key values from the key file with the\nFLUSH DES_KEY_FILE statement. This requires the RELOAD privilege.\n\nOne benefit of having a set of default keys is that it gives\napplications a way to check for the existence of encrypted column\nvalues, without giving the end user the right to decrypt those values.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/encryption-functions.html\n\n','mysql> SELECT customer_address FROM customer_table \n > WHERE crypted_credit_card = DES_ENCRYPT(\'credit_card_number\');\n','http://dev.mysql.com/doc/refman/5.5/en/encryption-functions.html'),(397,'CEIL',4,'Syntax:\nCEIL(X)\n\nCEIL() is a synonym for CEILING().\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html'),(398,'LENGTH',37,'Syntax:\nLENGTH(str)\n\nReturns the length of the string str, measured in bytes. A multi-byte\ncharacter counts as multiple bytes. This means that for a string\ncontaining five 2-byte characters, LENGTH() returns 10, whereas\nCHAR_LENGTH() returns 5.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html\n\n','mysql> SELECT LENGTH(\'text\');\n -> 4\n','http://dev.mysql.com/doc/refman/5.5/en/string-functions.html'),(399,'STR_TO_DATE',31,'Syntax:\nSTR_TO_DATE(str,format)\n\nThis is the inverse of the DATE_FORMAT() function. It takes a string\nstr and a format string format. STR_TO_DATE() returns a DATETIME value\nif the format string contains both date and time parts, or a DATE or\nTIME value if the string contains only date or time parts. If the date,\ntime, or datetime value extracted from str is illegal, STR_TO_DATE()\nreturns NULL and produces a warning.\n\nThe server scans str attempting to match format to it. The format\nstring can contain literal characters and format specifiers beginning\nwith %. Literal characters in format must match literally in str.\nFormat specifiers in format must match a date or time part in str. For\nthe specifiers that can be used in format, see the DATE_FORMAT()\nfunction description.\n\nmysql> SELECT STR_TO_DATE(\'01,5,2013\',\'%d,%m,%Y\');\n -> \'2013-05-01\'\nmysql> SELECT STR_TO_DATE(\'May 1, 2013\',\'%M %d,%Y\');\n -> \'2013-05-01\'\n\nScanning starts at the beginning of str and fails if format is found\nnot to match. Extra characters at the end of str are ignored.\n\nmysql> SELECT STR_TO_DATE(\'a09:30:17\',\'a%h:%i:%s\');\n -> \'09:30:17\'\nmysql> SELECT STR_TO_DATE(\'a09:30:17\',\'%h:%i:%s\');\n -> NULL\nmysql> SELECT STR_TO_DATE(\'09:30:17a\',\'%h:%i:%s\');\n -> \'09:30:17\'\n\nUnspecified date or time parts have a value of 0, so incompletely\nspecified values in str produce a result with some or all parts set to\n0:\n\nmysql> SELECT STR_TO_DATE(\'abc\',\'abc\');\n -> \'0000-00-00\'\nmysql> SELECT STR_TO_DATE(\'9\',\'%m\');\n -> \'0000-09-00\'\nmysql> SELECT STR_TO_DATE(\'9\',\'%s\');\n -> \'00:00:09\'\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(400,'Y',11,'Y(p)\n\nReturns the Y-coordinate value for the Point object p as a\ndouble-precision number.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/geometry-property-functions.html#point-property-functions\n\n','mysql> SELECT Y(POINT(56.7, 53.34));\n+-----------------------+\n| Y(POINT(56.7, 53.34)) |\n+-----------------------+\n| 53.34 |\n+-----------------------+\n','http://dev.mysql.com/doc/refman/5.5/en/geometry-property-functions.html#point-property-functions'),(401,'CHECKSUM TABLE',20,'Syntax:\nCHECKSUM TABLE tbl_name [, tbl_name] ... [ QUICK | EXTENDED ]\n\nCHECKSUM TABLE reports a table checksum. This statement requires the\nSELECT privilege for the table.\n\nWith QUICK, the live table checksum is reported if it is available, or\nNULL otherwise. This is very fast. A live checksum is enabled by\nspecifying the CHECKSUM=1 table option when you create the table;\ncurrently, this is supported only for MyISAM tables. See [HELP CREATE\nTABLE].\n\nWith EXTENDED, the entire table is read row by row and the checksum is\ncalculated. This can be very slow for large tables.\n\nIf neither QUICK nor EXTENDED is specified, MySQL returns a live\nchecksum if the table storage engine supports it and scans the table\notherwise.\n\nFor a nonexistent table, CHECKSUM TABLE returns NULL and generates a\nwarning.\n\nIn MySQL 5.5, CHECKSUM TABLE returns 0 for partitioned tables unless\nyou include the EXTENDED option. This issue is resolved in MySQL 5.6.\n(Bug #11933226, Bug #60681)\n\nThe checksum value depends on the table row format. If the row format\nchanges, the checksum also changes. For example, the storage format for\nVARCHAR changed between MySQL 4.1 and 5.0, so if a 4.1 table is\nupgraded to MySQL 5.0, the checksum value may change.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/checksum-table.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/checksum-table.html'),(402,'NUMINTERIORRINGS',2,'NumInteriorRings(poly)\n\nReturns the number of interior rings in the Polygon value poly.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/geometry-property-functions.html#polygon-property-functions\n\n','mysql> SET @poly =\n -> \'Polygon((0 0,0 3,3 3,3 0,0 0),(1 1,1 2,2 2,2 1,1 1))\';\nmysql> SELECT NumInteriorRings(GeomFromText(@poly));\n+---------------------------------------+\n| NumInteriorRings(GeomFromText(@poly)) |\n+---------------------------------------+\n| 1 |\n+---------------------------------------+\n','http://dev.mysql.com/doc/refman/5.5/en/geometry-property-functions.html#polygon-property-functions'),(403,'INTERIORRINGN',2,'InteriorRingN(poly,N)\n\nReturns the N-th interior ring for the Polygon value poly as a\nLineString. Rings are numbered beginning with 1.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/geometry-property-functions.html#polygon-property-functions\n\n','mysql> SET @poly =\n -> \'Polygon((0 0,0 3,3 3,3 0,0 0),(1 1,1 2,2 2,2 1,1 1))\';\nmysql> SELECT AsText(InteriorRingN(GeomFromText(@poly),1));\n+----------------------------------------------+\n| AsText(InteriorRingN(GeomFromText(@poly),1)) |\n+----------------------------------------------+\n| LINESTRING(1 1,1 2,2 2,2 1,1 1) |\n+----------------------------------------------+\n','http://dev.mysql.com/doc/refman/5.5/en/geometry-property-functions.html#polygon-property-functions'),(404,'UTC_TIME',31,'Syntax:\nUTC_TIME, UTC_TIME()\n\nReturns the current UTC time as a value in \'HH:MM:SS\' or HHMMSS.uuuuuu\nformat, depending on whether the function is used in a string or\nnumeric context.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','mysql> SELECT UTC_TIME(), UTC_TIME() + 0;\n -> \'18:07:53\', 180753.000000\n','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(405,'DROP FUNCTION',39,'The DROP FUNCTION statement is used to drop stored functions and\nuser-defined functions (UDFs):\n\no For information about dropping stored functions, see [HELP DROP\n PROCEDURE].\n\no For information about dropping user-defined functions, see [HELP DROP\n FUNCTION UDF].\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/drop-function.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/drop-function.html'),(406,'ALTER EVENT',39,'Syntax:\nALTER\n [DEFINER = { user | CURRENT_USER }]\n EVENT event_name\n [ON SCHEDULE schedule]\n [ON COMPLETION [NOT] PRESERVE]\n [RENAME TO new_event_name]\n [ENABLE | DISABLE | DISABLE ON SLAVE]\n [COMMENT \'comment\']\n [DO event_body]\n\nThe ALTER EVENT statement changes one or more of the characteristics of\nan existing event without the need to drop and recreate it. The syntax\nfor each of the DEFINER, ON SCHEDULE, ON COMPLETION, COMMENT, ENABLE /\nDISABLE, and DO clauses is exactly the same as when used with CREATE\nEVENT. (See [HELP CREATE EVENT].)\n\nAny user can alter an event defined on a database for which that user\nhas the EVENT privilege. When a user executes a successful ALTER EVENT\nstatement, that user becomes the definer for the affected event.\n\nALTER EVENT works only with an existing event:\n\nmysql> ALTER EVENT no_such_event \n > ON SCHEDULE \n > EVERY \'2:3\' DAY_HOUR;\nERROR 1517 (HY000): Unknown event \'no_such_event\'\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/alter-event.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/alter-event.html'),(407,'STDDEV',16,'Syntax:\nSTDDEV(expr)\n\nReturns the population standard deviation of expr. This function is\nprovided for compatibility with Oracle. The standard SQL function\nSTDDEV_POP() can be used instead.\n\nThis function returns NULL if there were no matching rows.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/group-by-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/group-by-functions.html'),(408,'DATE_SUB',31,'Syntax:\nDATE_SUB(date,INTERVAL expr unit)\n\nSee the description for DATE_ADD().\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(409,'PERIOD_ADD',31,'Syntax:\nPERIOD_ADD(P,N)\n\nAdds N months to period P (in the format YYMM or YYYYMM). Returns a\nvalue in the format YYYYMM. Note that the period argument P is not a\ndate value.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','mysql> SELECT PERIOD_ADD(200801,2);\n -> 200803\n','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(410,'|',19,'Syntax:\n|\n\nBitwise OR:\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/bit-functions.html\n\n','mysql> SELECT 29 | 15;\n -> 31\n','http://dev.mysql.com/doc/refman/5.5/en/bit-functions.html'),(411,'GEOMFROMTEXT',3,'GeomFromText(wkt[,srid]), GeometryFromText(wkt[,srid])\n\nConstructs a geometry value of any type using its WKT representation\nand SRID.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-values.html#gis-wkt-functions\n\n','','http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-values.html#gis-wkt-functions'),(412,'UUID_SHORT',14,'Syntax:\nUUID_SHORT()\n\nReturns a \"short\" universal identifier as a 64-bit unsigned integer\n(rather than a string-form 128-bit identifier as returned by the UUID()\nfunction).\n\nThe value of UUID_SHORT() is guaranteed to be unique if the following\nconditions hold:\n\no The server_id of the current host is unique among your set of master\n and slave servers\n\no server_id is between 0 and 255\n\no You do not set back your system time for your server between mysqld\n restarts\n\no You do not invoke UUID_SHORT() on average more than 16 million times\n per second between mysqld restarts\n\nThe UUID_SHORT() return value is constructed this way:\n\n (server_id & 255) << 56\n+ (server_startup_time_in_seconds << 24)\n+ incremented_variable++;\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/miscellaneous-functions.html\n\n','mysql> SELECT UUID_SHORT();\n -> 92395783831158784\n','http://dev.mysql.com/doc/refman/5.5/en/miscellaneous-functions.html'),(413,'RIGHT',37,'Syntax:\nRIGHT(str,len)\n\nReturns the rightmost len characters from the string str, or NULL if\nany argument is NULL.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html\n\n','mysql> SELECT RIGHT(\'foobarbar\', 4);\n -> \'rbar\'\n','http://dev.mysql.com/doc/refman/5.5/en/string-functions.html'),(414,'DATEDIFF',31,'Syntax:\nDATEDIFF(expr1,expr2)\n\nDATEDIFF() returns expr1 - expr2 expressed as a value in days from one\ndate to the other. expr1 and expr2 are date or date-and-time\nexpressions. Only the date parts of the values are used in the\ncalculation.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','mysql> SELECT DATEDIFF(\'2007-12-31 23:59:59\',\'2007-12-30\');\n -> 1\nmysql> SELECT DATEDIFF(\'2010-11-30 23:59:59\',\'2010-12-31\');\n -> -31\n','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(415,'DROP TABLESPACE',39,'Syntax:\nDROP TABLESPACE tablespace_name\n ENGINE [=] engine_name\n\nThis statement drops a tablespace that was previously created using\nCREATE TABLESPACE (see [HELP CREATE TABLESPACE]).\n\n*Important*: The tablespace to be dropped must not contain any data\nfiles; in other words, before you can drop a tablespace, you must first\ndrop each of its data files using ALTER TABLESPACE ... DROP DATAFILE\n(see [HELP ALTER TABLESPACE]).\n\nThe ENGINE clause (required) specifies the storage engine used by the\ntablespace. Currently, the only accepted values for engine_name are NDB\nand NDBCLUSTER.\n\nDROP TABLESPACE is useful only with Disk Data storage for MySQL\nCluster. See\nhttp://dev.mysql.com/doc/refman/5.5/en/mysql-cluster-disk-data.html.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/drop-tablespace.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/drop-tablespace.html'),(416,'DROP PROCEDURE',39,'Syntax:\nDROP {PROCEDURE | FUNCTION} [IF EXISTS] sp_name\n\nThis statement is used to drop a stored procedure or function. That is,\nthe specified routine is removed from the server. You must have the\nALTER ROUTINE privilege for the routine. (If the\nautomatic_sp_privileges system variable is enabled, that privilege and\nEXECUTE are granted automatically to the routine creator when the\nroutine is created and dropped from the creator when the routine is\ndropped. See\nhttp://dev.mysql.com/doc/refman/5.5/en/stored-routines-privileges.html.\n)\n\nThe IF EXISTS clause is a MySQL extension. It prevents an error from\noccurring if the procedure or function does not exist. A warning is\nproduced that can be viewed with SHOW WARNINGS.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/drop-procedure.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/drop-procedure.html'),(417,'CHECK TABLE',20,'Syntax:\nCHECK TABLE tbl_name [, tbl_name] ... [option] ...\n\noption = {FOR UPGRADE | QUICK | FAST | MEDIUM | EXTENDED | CHANGED}\n\nCHECK TABLE checks a table or tables for errors. CHECK TABLE works for\nInnoDB, MyISAM, ARCHIVE, and CSV tables. For MyISAM tables, the key\nstatistics are updated as well.\n\nTo check a table, you must have some privilege for it.\n\nCHECK TABLE can also check views for problems, such as tables that are\nreferenced in the view definition that no longer exist.\n\nCHECK TABLE is supported for partitioned tables, and you can use ALTER\nTABLE ... CHECK PARTITION to check one or more partitions; for more\ninformation, see [HELP ALTER TABLE], and\nhttp://dev.mysql.com/doc/refman/5.5/en/partitioning-maintenance.html.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/check-table.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/check-table.html'),(418,'BIN',37,'Syntax:\nBIN(N)\n\nReturns a string representation of the binary value of N, where N is a\nlonglong (BIGINT) number. This is equivalent to CONV(N,10,2). Returns\nNULL if N is NULL.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html\n\n','mysql> SELECT BIN(12);\n -> \'1100\'\n','http://dev.mysql.com/doc/refman/5.5/en/string-functions.html'),(419,'INSTALL PLUGIN',5,'Syntax:\nINSTALL PLUGIN plugin_name SONAME \'shared_library_name\'\n\nThis statement installs a server plugin. It requires the INSERT\nprivilege for the mysql.plugin table.\n\nplugin_name is the name of the plugin as defined in the plugin\ndescriptor structure contained in the library file (see\nhttp://dev.mysql.com/doc/refman/5.5/en/plugin-data-structures.html).\nPlugin names are not case sensitive. For maximal compatibility, plugin\nnames should be limited to ASCII letters, digits, and underscore\nbecause they are used in C source files, shell command lines, M4 and\nBourne shell scripts, and SQL environments.\n\nshared_library_name is the name of the shared library that contains the\nplugin code. The name includes the file name extension (for example,\nlibmyplugin.so, libmyplugin.dll, or libmyplugin.dylib).\n\nThe shared library must be located in the plugin directory (the\ndirectory named by the plugin_dir system variable). The library must be\nin the plugin directory itself, not in a subdirectory. By default,\nplugin_dir is the plugin directory under the directory named by the\npkglibdir configuration variable, but it can be changed by setting the\nvalue of plugin_dir at server startup. For example, set its value in a\nmy.cnf file:\n\n[mysqld]\nplugin_dir=/path/to/plugin/directory\n\nIf the value of plugin_dir is a relative path name, it is taken to be\nrelative to the MySQL base directory (the value of the basedir system\nvariable).\n\nINSTALL PLUGIN loads and initializes the plugin code to make the plugin\navailable for use. A plugin is initialized by executing its\ninitialization function, which handles any setup that the plugin must\nperform before it can be used. When the server shuts down, it executes\nthe deinitialization function for each plugin that is loaded so that\nthe plugin has a change to perform any final cleanup.\n\nINSTALL PLUGIN also registers the plugin by adding a line that\nindicates the plugin name and library file name to the mysql.plugin\ntable. At server startup, the server loads and initializes any plugin\nthat is listed in the mysql.plugin table. This means that a plugin is\ninstalled with INSTALL PLUGIN only once, not every time the server\nstarts. Plugin loading at startup does not occur if the server is\nstarted with the --skip-grant-tables option.\n\nA plugin library can contain multiple plugins. For each of them to be\ninstalled, use a separate INSTALL PLUGIN statement. Each statement\nnames a different plugin, but all of them specify the same library\nname.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/install-plugin.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/install-plugin.html'),(420,'DECLARE CURSOR',23,'Syntax:\nDECLARE cursor_name CURSOR FOR select_statement\n\nThis statement declares a cursor and associates it with a SELECT\nstatement that retrieves the rows to be traversed by the cursor. To\nfetch the rows later, use a FETCH statement. The number of columns\nretrieved by the SELECT statement must match the number of output\nvariables specified in the FETCH statement.\n\nThe SELECT statement cannot have an INTO clause.\n\nCursor declarations must appear before handler declarations and after\nvariable and condition declarations.\n\nA stored program may contain multiple cursor declarations, but each\ncursor declared in a given block must have a unique name. For an\nexample, see http://dev.mysql.com/doc/refman/5.5/en/cursors.html.\n\nFor information available through SHOW statements, it is possible in\nmany cases to obtain equivalent information by using a cursor with an\nINFORMATION_SCHEMA table.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/declare-cursor.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/declare-cursor.html'),(421,'LOAD DATA',27,'Syntax:\nLOAD DATA [LOW_PRIORITY | CONCURRENT] [LOCAL] INFILE \'file_name\'\n [REPLACE | IGNORE]\n INTO TABLE tbl_name\n [CHARACTER SET charset_name]\n [{FIELDS | COLUMNS}\n [TERMINATED BY \'string\']\n [[OPTIONALLY] ENCLOSED BY \'char\']\n [ESCAPED BY \'char\']\n ]\n [LINES\n [STARTING BY \'string\']\n [TERMINATED BY \'string\']\n ]\n [IGNORE number {LINES | ROWS}]\n [(col_name_or_user_var,...)]\n [SET col_name = expr,...]\n\nThe LOAD DATA INFILE statement reads rows from a text file into a table\nat a very high speed. The file name must be given as a literal string.\n\nLOAD DATA INFILE is the complement of SELECT ... INTO OUTFILE. (See\nhttp://dev.mysql.com/doc/refman/5.5/en/select-into.html.) To write data\nfrom a table to a file, use SELECT ... INTO OUTFILE. To read the file\nback into a table, use LOAD DATA INFILE. The syntax of the FIELDS and\nLINES clauses is the same for both statements. Both clauses are\noptional, but FIELDS must precede LINES if both are specified.\n\nFor more information about the efficiency of INSERT versus LOAD DATA\nINFILE and speeding up LOAD DATA INFILE, see\nhttp://dev.mysql.com/doc/refman/5.5/en/insert-speed.html.\n\nThe character set indicated by the character_set_database system\nvariable is used to interpret the information in the file. SET NAMES\nand the setting of character_set_client do not affect interpretation of\ninput. If the contents of the input file use a character set that\ndiffers from the default, it is usually preferable to specify the\ncharacter set of the file by using the CHARACTER SET clause. A\ncharacter set of binary specifies \"no conversion.\"\n\nLOAD DATA INFILE interprets all fields in the file as having the same\ncharacter set, regardless of the data types of the columns into which\nfield values are loaded. For proper interpretation of file contents,\nyou must ensure that it was written with the correct character set. For\nexample, if you write a data file with mysqldump -T or by issuing a\nSELECT ... INTO OUTFILE statement in mysql, be sure to use a\n--default-character-set option with mysqldump or mysql so that output\nis written in the character set to be used when the file is loaded with\nLOAD DATA INFILE.\n\n*Note*: It is not possible to load data files that use the ucs2, utf16,\nor utf32 character set.\n\nThe character_set_filesystem system variable controls the\ninterpretation of the file name.\n\nYou can also load data files by using the mysqlimport utility; it\noperates by sending a LOAD DATA INFILE statement to the server. The\n--local option causes mysqlimport to read data files from the client\nhost. You can specify the --compress option to get better performance\nover slow networks if the client and server support the compressed\nprotocol. See http://dev.mysql.com/doc/refman/5.5/en/mysqlimport.html.\n\nIf you use LOW_PRIORITY, execution of the LOAD DATA statement is\ndelayed until no other clients are reading from the table. This affects\nonly storage engines that use only table-level locking (such as MyISAM,\nMEMORY, and MERGE).\n\nIf you specify CONCURRENT with a MyISAM table that satisfies the\ncondition for concurrent inserts (that is, it contains no free blocks\nin the middle), other threads can retrieve data from the table while\nLOAD DATA is executing. Using this option affects the performance of\nLOAD DATA a bit, even if no other thread is using the table at the same\ntime.\n\nPrior to MySQL 5.5.1, CONCURRENT was not replicated when using\nstatement-based replication (see Bug #34628). However, it is replicated\nwhen using row-based replication, regardless of the version. See\nhttp://dev.mysql.com/doc/refman/5.5/en/replication-features-load-data.h\ntml, for more information.\n\nThe LOCAL keyword, if specified, is interpreted with respect to the\nclient end of the connection:\n\no If LOCAL is specified, the file is read by the client program on the\n client host and sent to the server. The file can be given as a full\n path name to specify its exact location. If given as a relative path\n name, the name is interpreted relative to the directory in which the\n client program was started.\n\n When using LOCAL with LOAD DATA, a copy of the file is created in the\n server\'s temporary directory. This is not the directory determined by\n the value of tmpdir or slave_load_tmpdir, but rather the operating\n system\'s temporary directory, and is not configurable in the MySQL\n Server. (Typically the system temporary directory is /tmp on Linux\n systems and C:\\WINDOWS\\TEMP on Windows.) Lack of sufficient space for\n the copy in this directory can cause the LOAD DATA LOCAL statement to\n fail.\n\no If LOCAL is not specified, the file must be located on the server\n host and is read directly by the server. The server uses the\n following rules to locate the file:\n\n o If the file name is an absolute path name, the server uses it as\n given.\n\n o If the file name is a relative path name with one or more leading\n components, the server searches for the file relative to the\n server\'s data directory.\n\n o If a file name with no leading components is given, the server\n looks for the file in the database directory of the default\n database.\n\nNote that, in the non-LOCAL case, these rules mean that a file named as\n./myfile.txt is read from the server\'s data directory, whereas the file\nnamed as myfile.txt is read from the database directory of the default\ndatabase. For example, if db1 is the default database, the following\nLOAD DATA statement reads the file data.txt from the database directory\nfor db1, even though the statement explicitly loads the file into a\ntable in the db2 database:\n\nLOAD DATA INFILE \'data.txt\' INTO TABLE db2.my_table;\n\nWindows path names are specified using forward slashes rather than\nbackslashes. If you do use backslashes, you must double them.\n\nFor security reasons, when reading text files located on the server,\nthe files must either reside in the database directory or be readable\nby all. Also, to use LOAD DATA INFILE on server files, you must have\nthe FILE privilege. See\nhttp://dev.mysql.com/doc/refman/5.5/en/privileges-provided.html. For\nnon-LOCAL load operations, if the secure_file_priv system variable is\nset to a nonempty directory name, the file to be loaded must be located\nin that directory.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/load-data.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/load-data.html'),(422,'MULTILINESTRING',24,'MultiLineString(ls1,ls2,...)\n\nConstructs a MultiLineString value using LineString or WKB LineString\narguments.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-values.html#gis-mysql-specific-functions\n\n','','http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-values.html#gis-mysql-specific-functions'),(423,'LOCALTIME',31,'Syntax:\nLOCALTIME, LOCALTIME()\n\nLOCALTIME and LOCALTIME() are synonyms for NOW().\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(424,'SHOW RELAYLOG EVENTS',26,'Syntax:\nSHOW RELAYLOG EVENTS\n [IN \'log_name\'] [FROM pos] [LIMIT [offset,] row_count]\n\nShows the events in the relay log of a replication slave. If you do not\nspecify \'log_name\', the first relay log is displayed. This statement\nhas no effect on the master.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/show-relaylog-events.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/show-relaylog-events.html'),(425,'MPOINTFROMTEXT',3,'MPointFromText(wkt[,srid]), MultiPointFromText(wkt[,srid])\n\nConstructs a MULTIPOINT value using its WKT representation and SRID.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-values.html#gis-wkt-functions\n\n','','http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-values.html#gis-wkt-functions'),(426,'BLOB',22,'BLOB[(M)]\n\nA BLOB column with a maximum length of 65,535 (216 - 1) bytes. Each\nBLOB value is stored using a 2-byte length prefix that indicates the\nnumber of bytes in the value.\n\nAn optional length M can be given for this type. If this is done, MySQL\ncreates the column as the smallest BLOB type large enough to hold\nvalues M bytes long.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-type-overview.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/string-type-overview.html'),(427,'SHA1',12,'Syntax:\nSHA1(str), SHA(str)\n\nCalculates an SHA-1 160-bit checksum for the string, as described in\nRFC 3174 (Secure Hash Algorithm). The value is returned as a string of\n40 hex digits, or NULL if the argument was NULL. One of the possible\nuses for this function is as a hash key. See the notes at the beginning\nof this section about storing hash values efficiently. You can also use\nSHA1() as a cryptographic function for storing passwords. SHA() is\nsynonymous with SHA1().\n\nAs of MySQL 5.5.3, the return value is a nonbinary string in the\nconnection character set. Before 5.5.3, the return value is a binary\nstring; see the notes at the beginning of this section about using the\nvalue as a nonbinary string.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/encryption-functions.html\n\n','mysql> SELECT SHA1(\'abc\');\n -> \'a9993e364706816aba3e25717850c26c9cd0d89d\'\n','http://dev.mysql.com/doc/refman/5.5/en/encryption-functions.html'),(428,'SUBSTR',37,'Syntax:\nSUBSTR(str,pos), SUBSTR(str FROM pos), SUBSTR(str,pos,len), SUBSTR(str\nFROM pos FOR len)\n\nSUBSTR() is a synonym for SUBSTRING().\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/string-functions.html'),(429,'PASSWORD',12,'Syntax:\nPASSWORD(str)\n\nCalculates and returns a hashed password string from the plaintext\npassword str and returns a nonbinary string in the connection character\nset (a binary string before MySQL 5.5.3), or NULL if the argument is\nNULL. This function is the SQL interface to the algorithm used by the\nserver to encrypt MySQL passwords for storage in the mysql.user grant\ntable.\n\nThe password hashing method used by PASSWORD() depends on the value of\nthe old_passwords system variable:\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/encryption-functions.html\n\n','mysql> SET old_passwords = 0;\nmysql> SELECT PASSWORD(\'mypass\');\n+-------------------------------------------+\n| PASSWORD(\'mypass\') |\n+-------------------------------------------+\n| *6C8989366EAF75BB670AD8EA7A7FC1176A95CEF4 |\n+-------------------------------------------+\n\nmysql> SET old_passwords = 1;\nmysql> SELECT PASSWORD(\'mypass\');\n+--------------------+\n| PASSWORD(\'mypass\') |\n+--------------------+\n| 6f8c114b58f2ce9e |\n+--------------------+\n','http://dev.mysql.com/doc/refman/5.5/en/encryption-functions.html'),(430,'CHAR',22,'[NATIONAL] CHAR[(M)] [CHARACTER SET charset_name] [COLLATE\ncollation_name]\n\nA fixed-length string that is always right-padded with spaces to the\nspecified length when stored. M represents the column length in\ncharacters. The range of M is 0 to 255. If M is omitted, the length is\n1.\n\n*Note*: Trailing spaces are removed when CHAR values are retrieved\nunless the PAD_CHAR_TO_FULL_LENGTH SQL mode is enabled.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-type-overview.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/string-type-overview.html'),(431,'UTC_DATE',31,'Syntax:\nUTC_DATE, UTC_DATE()\n\nReturns the current UTC date as a value in \'YYYY-MM-DD\' or YYYYMMDD\nformat, depending on whether the function is used in a string or\nnumeric context.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','mysql> SELECT UTC_DATE(), UTC_DATE() + 0;\n -> \'2003-08-14\', 20030814\n','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(432,'DIMENSION',36,'Dimension(g)\n\nReturns the inherent dimension of the geometry value g. The result can\nbe -1, 0, 1, or 2. The meaning of these values is given in\nhttp://dev.mysql.com/doc/refman/5.5/en/gis-class-geometry.html.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/geometry-property-functions.html#general-geometry-property-functions\n\n','mysql> SELECT Dimension(GeomFromText(\'LineString(1 1,2 2)\'));\n+------------------------------------------------+\n| Dimension(GeomFromText(\'LineString(1 1,2 2)\')) |\n+------------------------------------------------+\n| 1 |\n+------------------------------------------------+\n','http://dev.mysql.com/doc/refman/5.5/en/geometry-property-functions.html#general-geometry-property-functions'),(433,'COUNT DISTINCT',16,'Syntax:\nCOUNT(DISTINCT expr,[expr...])\n\nReturns a count of the number of rows with different non-NULL expr\nvalues.\n\nCOUNT(DISTINCT) returns 0 if there were no matching rows.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/group-by-functions.html\n\n','mysql> SELECT COUNT(DISTINCT results) FROM student;\n','http://dev.mysql.com/doc/refman/5.5/en/group-by-functions.html'),(434,'BIT',22,'BIT[(M)]\n\nA bit-field type. M indicates the number of bits per value, from 1 to\n64. The default is 1 if M is omitted.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/numeric-type-overview.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/numeric-type-overview.html'),(435,'EQUALS',30,'Equals(g1,g2)\n\nReturns 1 or 0 to indicate whether g1 is spatially equal to g2.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/functions-for-testing-spatial-relations-between-geometric-objects.html#functions-that-test-spatial-relationships-between-geometries\n\n','','http://dev.mysql.com/doc/refman/5.5/en/functions-for-testing-spatial-relations-between-geometric-objects.html#functions-that-test-spatial-relationships-between-geometries'),(436,'SHOW CREATE VIEW',26,'Syntax:\nSHOW CREATE VIEW view_name\n\nThis statement shows a CREATE VIEW statement that creates the given\nview.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/show-create-view.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/show-create-view.html'),(437,'INTERVAL',18,'Syntax:\nINTERVAL(N,N1,N2,N3,...)\n\nReturns 0 if N < N1, 1 if N < N2 and so on or -1 if N is NULL. All\narguments are treated as integers. It is required that N1 < N2 < N3 <\n... < Nn for this function to work correctly. This is because a binary\nsearch is used (very fast).\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/comparison-operators.html\n\n','mysql> SELECT INTERVAL(23, 1, 15, 17, 30, 44, 200);\n -> 3\nmysql> SELECT INTERVAL(10, 1, 10, 100, 1000);\n -> 2\nmysql> SELECT INTERVAL(22, 23, 30, 44, 200);\n -> 0\n','http://dev.mysql.com/doc/refman/5.5/en/comparison-operators.html'),(438,'FROM_DAYS',31,'Syntax:\nFROM_DAYS(N)\n\nGiven a day number N, returns a DATE value.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','mysql> SELECT FROM_DAYS(730669);\n -> \'2007-07-03\'\n','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(439,'ALTER PROCEDURE',39,'Syntax:\nALTER PROCEDURE proc_name [characteristic ...]\n\ncharacteristic:\n COMMENT \'string\'\n | LANGUAGE SQL\n | { CONTAINS SQL | NO SQL | READS SQL DATA | MODIFIES SQL DATA }\n | SQL SECURITY { DEFINER | INVOKER }\n\nThis statement can be used to change the characteristics of a stored\nprocedure. More than one change may be specified in an ALTER PROCEDURE\nstatement. However, you cannot change the parameters or body of a\nstored procedure using this statement; to make such changes, you must\ndrop and re-create the procedure using DROP PROCEDURE and CREATE\nPROCEDURE.\n\nYou must have the ALTER ROUTINE privilege for the procedure. By\ndefault, that privilege is granted automatically to the procedure\ncreator. This behavior can be changed by disabling the\nautomatic_sp_privileges system variable. See\nhttp://dev.mysql.com/doc/refman/5.5/en/stored-routines-privileges.html.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/alter-procedure.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/alter-procedure.html'),(440,'BIT_COUNT',19,'Syntax:\nBIT_COUNT(N)\n\nReturns the number of bits that are set in the argument N.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/bit-functions.html\n\n','mysql> SELECT BIT_COUNT(29), BIT_COUNT(b\'101010\');\n -> 4, 3\n','http://dev.mysql.com/doc/refman/5.5/en/bit-functions.html'),(441,'OCTET_LENGTH',37,'Syntax:\nOCTET_LENGTH(str)\n\nOCTET_LENGTH() is a synonym for LENGTH().\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/string-functions.html'),(442,'UTC_TIMESTAMP',31,'Syntax:\nUTC_TIMESTAMP, UTC_TIMESTAMP()\n\nReturns the current UTC date and time as a value in \'YYYY-MM-DD\nHH:MM:SS\' or YYYYMMDDHHMMSS.uuuuuu format, depending on whether the\nfunction is used in a string or numeric context.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','mysql> SELECT UTC_TIMESTAMP(), UTC_TIMESTAMP() + 0;\n -> \'2003-08-14 18:08:04\', 20030814180804.000000\n','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(443,'AES_ENCRYPT',12,'Syntax:\nAES_ENCRYPT(str,key_str)\n\nAES_ENCRYPT() and AES_DECRYPT() enable encryption and decryption of\ndata using the official AES (Advanced Encryption Standard) algorithm,\npreviously known as \"Rijndael.\" Encoding with a 128-bit key length is\nused, but you can extend it up to 256 bits by modifying the source. We\nchose 128 bits because it is much faster and it is secure enough for\nmost purposes.\n\nAES_ENCRYPT() encrypts a string and returns a binary string.\nAES_DECRYPT() decrypts the encrypted string and returns the original\nstring. The input arguments may be any length. If either argument is\nNULL, the result of this function is also NULL.\n\nBecause AES is a block-level algorithm, padding is used to encode\nuneven length strings and so the result string length may be calculated\nusing this formula:\n\n16 * (trunc(string_length / 16) + 1)\n\nIf AES_DECRYPT() detects invalid data or incorrect padding, it returns\nNULL. However, it is possible for AES_DECRYPT() to return a non-NULL\nvalue (possibly garbage) if the input data or the key is invalid.\n\nYou can use the AES functions to store data in an encrypted form by\nmodifying your queries:\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/encryption-functions.html\n\n','INSERT INTO t VALUES (1,AES_ENCRYPT(\'text\',\'password\'));\n','http://dev.mysql.com/doc/refman/5.5/en/encryption-functions.html'),(444,'+',4,'Syntax:\n+\n\nAddition:\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/arithmetic-functions.html\n\n','mysql> SELECT 3+5;\n -> 8\n','http://dev.mysql.com/doc/refman/5.5/en/arithmetic-functions.html'),(445,'INET_NTOA',14,'Syntax:\nINET_NTOA(expr)\n\nGiven a numeric IPv4 network address in network byte order, returns the\ndotted-quad representation of the address as a string. INET_NTOA()\nreturns NULL if it does not understand its argument.\n\nAs of MySQL 5.5.3, the return value is a nonbinary string in the\nconnection character set. Before 5.5.3, the return value is a binary\nstring.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/miscellaneous-functions.html\n\n','mysql> SELECT INET_NTOA(167773449);\n -> \'10.0.5.9\'\n','http://dev.mysql.com/doc/refman/5.5/en/miscellaneous-functions.html'),(446,'ACOS',4,'Syntax:\nACOS(X)\n\nReturns the arc cosine of X, that is, the value whose cosine is X.\nReturns NULL if X is not in the range -1 to 1.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html\n\n','mysql> SELECT ACOS(1);\n -> 0\nmysql> SELECT ACOS(1.0001);\n -> NULL\nmysql> SELECT ACOS(0);\n -> 1.5707963267949\n','http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html'),(447,'ISOLATION',8,'Syntax:\nSET [GLOBAL | SESSION] TRANSACTION ISOLATION LEVEL\n {\n REPEATABLE READ\n | READ COMMITTED\n | READ UNCOMMITTED\n | SERIALIZABLE\n }\n\nThis statement sets the transaction isolation level, used for\noperations on InnoDB tables.\n\nScope of the Isolation Level\n\nYou can set the isolation level globally, for the current session, or\nfor the next transaction:\n\no With the GLOBAL keyword, the statement sets the default transaction\n level globally for all subsequent sessions. Existing sessions are\n unaffected.\n\no With the SESSION keyword, the statement sets the default transaction\n level for all subsequent transactions performed within the current\n session.\n\no Without any SESSION or GLOBAL keyword, the statement sets the\n isolation level for the next (not started) transaction performed\n within the current session.\n\nA change to the global default isolation level requires the SUPER\nprivilege. Any session is free to change its session isolation level\n(even in the middle of a transaction), or the isolation level for its\nnext transaction.\n\nSET TRANSACTION ISOLATION LEVEL without GLOBAL or SESSION is not\npermitted while there is an active transaction:\n\nmysql> START TRANSACTION;\nQuery OK, 0 rows affected (0.02 sec)\n\nmysql> SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;\nERROR 1568 (25001): Transaction isolation level can\'t be changed\nwhile a transaction is in progress\n\nTo set the global default isolation level at server startup, use the\n--transaction-isolation=level option to mysqld on the command line or\nin an option file. Values of level for this option use dashes rather\nthan spaces, so the permissible values are READ-UNCOMMITTED,\nREAD-COMMITTED, REPEATABLE-READ, or SERIALIZABLE. For example, to set\nthe default isolation level to REPEATABLE READ, use these lines in the\n[mysqld] section of an option file:\n\n[mysqld]\ntransaction-isolation = REPEATABLE-READ\n\nIt is possible to check or set the global and session transaction\nisolation levels at runtime by using the tx_isolation system variable:\n\nSELECT @@GLOBAL.tx_isolation, @@tx_isolation;\nSET GLOBAL tx_isolation=\'REPEATABLE-READ\';\nSET SESSION tx_isolation=\'SERIALIZABLE\';\n\nDetails and Usage of Isolation Levels\n\nInnoDB supports each of the transaction isolation levels described here\nusing different locking strategies. You can enforce a high degree of\nconsistency with the default REPEATABLE READ level, for operations on\ncrucial data where ACID compliance is important. Or you can relax the\nconsistency rules with READ COMMITTED or even READ UNCOMMITTED, in\nsituations such as bulk reporting where precise consistency and\nrepeatable results are less important than minimizing the amount of\noverhead for locking. SERIALIZABLE enforces even stricter rules than\nREPEATABLE READ, and is used mainly in specialized situations, such as\nwith XA transactions and for troubleshooting issues with concurrency\nand deadlocks.\n\nFor full information about how these isolation levels work with InnoDB\ntransactions, see\nhttp://dev.mysql.com/doc/refman/5.5/en/innodb-transaction-model.html.\nIn particular, for additional information about InnoDB record-level\nlocks and how it uses them to execute various types of statements, see\nhttp://dev.mysql.com/doc/refman/5.5/en/innodb-record-level-locks.html\nand http://dev.mysql.com/doc/refman/5.5/en/innodb-locks-set.html.\n\nThe following list describes how MySQL supports the different\ntransaction levels. The list goes from the most commonly used level to\nthe least used.\n\no REPEATABLE READ\n\n This is the default isolation level for InnoDB. For consistent reads,\n there is an important difference from the READ COMMITTED isolation\n level: All consistent reads within the same transaction read the\n snapshot established by the first read. This convention means that if\n you issue several plain (nonlocking) SELECT statements within the\n same transaction, these SELECT statements are consistent also with\n respect to each other. See\n http://dev.mysql.com/doc/refman/5.5/en/innodb-consistent-read.html.\n\n For locking reads (SELECT with FOR UPDATE or LOCK IN SHARE MODE),\n UPDATE, and DELETE statements, locking depends on whether the\n statement uses a unique index with a unique search condition, or a\n range-type search condition. For a unique index with a unique search\n condition, InnoDB locks only the index record found, not the gap\n before it. For other search conditions, InnoDB locks the index range\n scanned, using gap locks or next-key (gap plus index-record) locks to\n block insertions by other sessions into the gaps covered by the\n range.\n\no READ COMMITTED\n\n A somewhat Oracle-like isolation level with respect to consistent\n (nonlocking) reads: Each consistent read, even within the same\n transaction, sets and reads its own fresh snapshot. See\n http://dev.mysql.com/doc/refman/5.5/en/innodb-consistent-read.html.\n\n For locking reads (SELECT with FOR UPDATE or LOCK IN SHARE MODE),\n InnoDB locks only index records, not the gaps before them, and thus\n permits the free insertion of new records next to locked records. For\n UPDATE and DELETE statements, locking depends on whether the\n statement uses a unique index with a unique search condition (such as\n WHERE id = 100), or a range-type search condition (such as WHERE id >\n 100). For a unique index with a unique search condition, InnoDB locks\n only the index record found, not the gap before it. For range-type\n searches, InnoDB locks the index range scanned, using gap locks or\n next-key (gap plus index-record) locks to block insertions by other\n sessions into the gaps covered by the range. This is necessary\n because \"phantom rows\" must be blocked for MySQL replication and\n recovery to work.\n\n *Note*: In MySQL 5.5, if the READ COMMITTED isolation level is used\n or the innodb_locks_unsafe_for_binlog system variable is enabled,\n there is no InnoDB gap locking except for foreign-key constraint\n checking and duplicate-key checking. Also, record locks for\n nonmatching rows are released after MySQL has evaluated the WHERE\n condition. If you use READ COMMITTED or enable\n innodb_locks_unsafe_for_binlog, you must use row-based binary\n logging.\n\no READ UNCOMMITTED\n\n SELECT statements are performed in a nonlocking fashion, but a\n possible earlier version of a row might be used. Thus, using this\n isolation level, such reads are not consistent. This is also called a\n \"dirty read.\" Otherwise, this isolation level works like READ\n COMMITTED.\n\no SERIALIZABLE\n\n This level is like REPEATABLE READ, but InnoDB implicitly converts\n all plain SELECT statements to SELECT ... LOCK IN SHARE MODE if\n autocommit is disabled. If autocommit is enabled, the SELECT is its\n own transaction. It therefore is known to be read only and can be\n serialized if performed as a consistent (nonlocking) read and need\n not block for other transactions. (To force a plain SELECT to block\n if other transactions have modified the selected rows, disable\n autocommit.)\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/set-transaction.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/set-transaction.html'),(448,'CEILING',4,'Syntax:\nCEILING(X)\n\nReturns the smallest integer value not less than X.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html\n\n','mysql> SELECT CEILING(1.23);\n -> 2\nmysql> SELECT CEILING(-1.23);\n -> -1\n','http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html'),(449,'SIN',4,'Syntax:\nSIN(X)\n\nReturns the sine of X, where X is given in radians.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html\n\n','mysql> SELECT SIN(PI());\n -> 1.2246063538224e-16\nmysql> SELECT ROUND(SIN(PI()));\n -> 0\n','http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html'),(450,'DAYOFWEEK',31,'Syntax:\nDAYOFWEEK(date)\n\nReturns the weekday index for date (1 = Sunday, 2 = Monday, ..., 7 =\nSaturday). These index values correspond to the ODBC standard.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','mysql> SELECT DAYOFWEEK(\'2007-02-03\');\n -> 7\n','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(451,'SHOW PROCESSLIST',26,'Syntax:\nSHOW [FULL] PROCESSLIST\n\nSHOW PROCESSLIST shows you which threads are running. You can also get\nthis information from the INFORMATION_SCHEMA PROCESSLIST table or the\nmysqladmin processlist command. If you have the PROCESS privilege, you\ncan see all threads. Otherwise, you can see only your own threads (that\nis, threads associated with the MySQL account that you are using). If\nyou do not use the FULL keyword, only the first 100 characters of each\nstatement are shown in the Info field.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/show-processlist.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/show-processlist.html'),(452,'LINEFROMWKB',32,'LineFromWKB(wkb[,srid]), LineStringFromWKB(wkb[,srid])\n\nConstructs a LINESTRING value using its WKB representation and SRID.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-values.html#gis-wkb-functions\n\n','','http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-values.html#gis-wkb-functions'),(453,'GEOMETRYTYPE',36,'GeometryType(g)\n\nReturns as a binary string the name of the geometry type of which the\ngeometry instance g is a member. The name corresponds to one of the\ninstantiable Geometry subclasses.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/geometry-property-functions.html#general-geometry-property-functions\n\n','mysql> SELECT GeometryType(GeomFromText(\'POINT(1 1)\'));\n+------------------------------------------+\n| GeometryType(GeomFromText(\'POINT(1 1)\')) |\n+------------------------------------------+\n| POINT |\n+------------------------------------------+\n','http://dev.mysql.com/doc/refman/5.5/en/geometry-property-functions.html#general-geometry-property-functions'),(454,'CREATE VIEW',39,'Syntax:\nCREATE\n [OR REPLACE]\n [ALGORITHM = {UNDEFINED | MERGE | TEMPTABLE}]\n [DEFINER = { user | CURRENT_USER }]\n [SQL SECURITY { DEFINER | INVOKER }]\n VIEW view_name [(column_list)]\n AS select_statement\n [WITH [CASCADED | LOCAL] CHECK OPTION]\n\nThe CREATE VIEW statement creates a new view, or replaces an existing\none if the OR REPLACE clause is given. If the view does not exist,\nCREATE OR REPLACE VIEW is the same as CREATE VIEW. If the view does\nexist, CREATE OR REPLACE VIEW is the same as ALTER VIEW.\n\nThe select_statement is a SELECT statement that provides the definition\nof the view. (When you select from the view, you select in effect using\nthe SELECT statement.) select_statement can select from base tables or\nother views.\n\nThe view definition is \"frozen\" at creation time, so changes to the\nunderlying tables afterward do not affect the view definition. For\nexample, if a view is defined as SELECT * on a table, new columns added\nto the table later do not become part of the view.\n\nThe ALGORITHM clause affects how MySQL processes the view. The DEFINER\nand SQL SECURITY clauses specify the security context to be used when\nchecking access privileges at view invocation time. The WITH CHECK\nOPTION clause can be given to constrain inserts or updates to rows in\ntables referenced by the view. These clauses are described later in\nthis section.\n\nThe CREATE VIEW statement requires the CREATE VIEW privilege for the\nview, and some privilege for each column selected by the SELECT\nstatement. For columns used elsewhere in the SELECT statement you must\nhave the SELECT privilege. If the OR REPLACE clause is present, you\nmust also have the DROP privilege for the view. CREATE VIEW might also\nrequire the SUPER privilege, depending on the DEFINER value, as\ndescribed later in this section.\n\nWhen a view is referenced, privilege checking occurs as described later\nin this section.\n\nA view belongs to a database. By default, a new view is created in the\ndefault database. To create the view explicitly in a given database,\nspecify the name as db_name.view_name when you create it:\n\nmysql> CREATE VIEW test.v AS SELECT * FROM t;\n\nWithin a database, base tables and views share the same namespace, so a\nbase table and a view cannot have the same name.\n\nColumns retrieved by the SELECT statement can be simple references to\ntable columns. They can also be expressions that use functions,\nconstant values, operators, and so forth.\n\nViews must have unique column names with no duplicates, just like base\ntables. By default, the names of the columns retrieved by the SELECT\nstatement are used for the view column names. To define explicit names\nfor the view columns, the optional column_list clause can be given as a\nlist of comma-separated identifiers. The number of names in column_list\nmust be the same as the number of columns retrieved by the SELECT\nstatement.\n\nUnqualified table or view names in the SELECT statement are interpreted\nwith respect to the default database. A view can refer to tables or\nviews in other databases by qualifying the table or view name with the\nproper database name.\n\nA view can be created from many kinds of SELECT statements. It can\nrefer to base tables or other views. It can use joins, UNION, and\nsubqueries. The SELECT need not even refer to any tables. The following\nexample defines a view that selects two columns from another table, as\nwell as an expression calculated from those columns:\n\nmysql> CREATE TABLE t (qty INT, price INT);\nmysql> INSERT INTO t VALUES(3, 50);\nmysql> CREATE VIEW v AS SELECT qty, price, qty*price AS value FROM t;\nmysql> SELECT * FROM v;\n+------+-------+-------+\n| qty | price | value |\n+------+-------+-------+\n| 3 | 50 | 150 |\n+------+-------+-------+\n\nA view definition is subject to the following restrictions:\n\no The SELECT statement cannot contain a subquery in the FROM clause.\n\no The SELECT statement cannot refer to system or user variables.\n\no Within a stored program, the definition cannot refer to program\n parameters or local variables.\n\no The SELECT statement cannot refer to prepared statement parameters.\n\no Any table or view referred to in the definition must exist. However,\n after a view has been created, it is possible to drop a table or view\n that the definition refers to. In this case, use of the view results\n in an error. To check a view definition for problems of this kind,\n use the CHECK TABLE statement.\n\no The definition cannot refer to a TEMPORARY table, and you cannot\n create a TEMPORARY view.\n\no Any tables named in the view definition must exist at definition\n time.\n\no You cannot associate a trigger with a view.\n\no Aliases for column names in the SELECT statement are checked against\n the maximum column length of 64 characters (not the maximum alias\n length of 256 characters).\n\nORDER BY is permitted in a view definition, but it is ignored if you\nselect from a view using a statement that has its own ORDER BY.\n\nFor other options or clauses in the definition, they are added to the\noptions or clauses of the statement that references the view, but the\neffect is undefined. For example, if a view definition includes a LIMIT\nclause, and you select from the view using a statement that has its own\nLIMIT clause, it is undefined which limit applies. This same principle\napplies to options such as ALL, DISTINCT, or SQL_SMALL_RESULT that\nfollow the SELECT keyword, and to clauses such as INTO, FOR UPDATE,\nLOCK IN SHARE MODE, and PROCEDURE.\n\nIf you create a view and then change the query processing environment\nby changing system variables, that may affect the results that you get\nfrom the view:\n\nmysql> CREATE VIEW v (mycol) AS SELECT \'abc\';\nQuery OK, 0 rows affected (0.01 sec)\n\nmysql> SET sql_mode = \'\';\nQuery OK, 0 rows affected (0.00 sec)\n\nmysql> SELECT \"mycol\" FROM v;\n+-------+\n| mycol |\n+-------+\n| mycol |\n+-------+\n1 row in set (0.01 sec)\n\nmysql> SET sql_mode = \'ANSI_QUOTES\';\nQuery OK, 0 rows affected (0.00 sec)\n\nmysql> SELECT \"mycol\" FROM v;\n+-------+\n| mycol |\n+-------+\n| abc |\n+-------+\n1 row in set (0.00 sec)\n\nThe DEFINER and SQL SECURITY clauses determine which MySQL account to\nuse when checking access privileges for the view when a statement is\nexecuted that references the view. The valid SQL SECURITY\ncharacteristic values are DEFINER and INVOKER. These indicate that the\nrequired privileges must be held by the user who defined or invoked the\nview, respectively. The default SQL SECURITY value is DEFINER.\n\nIf a user value is given for the DEFINER clause, it should be a MySQL\naccount specified as \'user_name\'@\'host_name\' (the same format used in\nthe GRANT statement), CURRENT_USER, or CURRENT_USER(). The default\nDEFINER value is the user who executes the CREATE VIEW statement. This\nis the same as specifying DEFINER = CURRENT_USER explicitly.\n\nIf you specify the DEFINER clause, these rules determine the valid\nDEFINER user values:\n\no If you do not have the SUPER privilege, the only valid user value is\n your own account, either specified literally or by using\n CURRENT_USER. You cannot set the definer to some other account.\n\no If you have the SUPER privilege, you can specify any syntactically\n valid account name. If the account does not actually exist, a warning\n is generated.\n\no Although it is possible to create a view with a nonexistent DEFINER\n account, an error occurs when the view is referenced if the SQL\n SECURITY value is DEFINER but the definer account does not exist.\n\nFor more information about view security, see\nhttp://dev.mysql.com/doc/refman/5.5/en/stored-programs-security.html.\n\nWithin a view definition, CURRENT_USER returns the view\'s DEFINER value\nby default. For views defined with the SQL SECURITY INVOKER\ncharacteristic, CURRENT_USER returns the account for the view\'s\ninvoker. For information about user auditing within views, see\nhttp://dev.mysql.com/doc/refman/5.5/en/account-activity-auditing.html.\n\nWithin a stored routine that is defined with the SQL SECURITY DEFINER\ncharacteristic, CURRENT_USER returns the routine\'s DEFINER value. This\nalso affects a view defined within such a routine, if the view\ndefinition contains a DEFINER value of CURRENT_USER.\n\nView privileges are checked like this:\n\no At view definition time, the view creator must have the privileges\n needed to use the top-level objects accessed by the view. For\n example, if the view definition refers to table columns, the creator\n must have some privilege for each column in the select list of the\n definition, and the SELECT privilege for each column used elsewhere\n in the definition. If the definition refers to a stored function,\n only the privileges needed to invoke the function can be checked. The\n privileges required at function invocation time can be checked only\n as it executes: For different invocations, different execution paths\n within the function might be taken.\n\no The user who references a view must have appropriate privileges to\n access it (SELECT to select from it, INSERT to insert into it, and so\n forth.)\n\no When a view has been referenced, privileges for objects accessed by\n the view are checked against the privileges held by the view DEFINER\n account or invoker, depending on whether the SQL SECURITY\n characteristic is DEFINER or INVOKER, respectively.\n\no If reference to a view causes execution of a stored function,\n privilege checking for statements executed within the function depend\n on whether the function SQL SECURITY characteristic is DEFINER or\n INVOKER. If the security characteristic is DEFINER, the function runs\n with the privileges of the DEFINER account. If the characteristic is\n INVOKER, the function runs with the privileges determined by the\n view\'s SQL SECURITY characteristic.\n\nExample: A view might depend on a stored function, and that function\nmight invoke other stored routines. For example, the following view\ninvokes a stored function f():\n\nCREATE VIEW v AS SELECT * FROM t WHERE t.id = f(t.name);\n\nSuppose that f() contains a statement such as this:\n\nIF name IS NULL then\n CALL p1();\nELSE\n CALL p2();\nEND IF;\n\nThe privileges required for executing statements within f() need to be\nchecked when f() executes. This might mean that privileges are needed\nfor p1() or p2(), depending on the execution path within f(). Those\nprivileges must be checked at runtime, and the user who must possess\nthe privileges is determined by the SQL SECURITY values of the view v\nand the function f().\n\nThe DEFINER and SQL SECURITY clauses for views are extensions to\nstandard SQL. In standard SQL, views are handled using the rules for\nSQL SECURITY DEFINER. The standard says that the definer of the view,\nwhich is the same as the owner of the view\'s schema, gets applicable\nprivileges on the view (for example, SELECT) and may grant them. MySQL\nhas no concept of a schema \"owner\", so MySQL adds a clause to identify\nthe definer. The DEFINER clause is an extension where the intent is to\nhave what the standard has; that is, a permanent record of who defined\nthe view. This is why the default DEFINER value is the account of the\nview creator.\n\nThe optional ALGORITHM clause is a MySQL extension to standard SQL. It\naffects how MySQL processes the view. ALGORITHM takes three values:\nMERGE, TEMPTABLE, or UNDEFINED. The default algorithm is UNDEFINED if\nno ALGORITHM clause is present. For more information, see\nhttp://dev.mysql.com/doc/refman/5.5/en/view-algorithms.html.\n\nSome views are updatable. That is, you can use them in statements such\nas UPDATE, DELETE, or INSERT to update the contents of the underlying\ntable. For a view to be updatable, there must be a one-to-one\nrelationship between the rows in the view and the rows in the\nunderlying table. There are also certain other constructs that make a\nview nonupdatable.\n\nThe WITH CHECK OPTION clause can be given for an updatable view to\nprevent inserts or updates to rows except those for which the WHERE\nclause in the select_statement is true.\n\nIn a WITH CHECK OPTION clause for an updatable view, the LOCAL and\nCASCADED keywords determine the scope of check testing when the view is\ndefined in terms of another view. The LOCAL keyword restricts the CHECK\nOPTION only to the view being defined. CASCADED causes the checks for\nunderlying views to be evaluated as well. When neither keyword is\ngiven, the default is CASCADED.\n\nFor more information about updatable views and the WITH CHECK OPTION\nclause, see\nhttp://dev.mysql.com/doc/refman/5.5/en/view-updatability.html.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/create-view.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/create-view.html'),(455,'TRIM',37,'Syntax:\nTRIM([{BOTH | LEADING | TRAILING} [remstr] FROM] str), TRIM([remstr\nFROM] str)\n\nReturns the string str with all remstr prefixes or suffixes removed. If\nnone of the specifiers BOTH, LEADING, or TRAILING is given, BOTH is\nassumed. remstr is optional and, if not specified, spaces are removed.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html\n\n','mysql> SELECT TRIM(\' bar \');\n -> \'bar\'\nmysql> SELECT TRIM(LEADING \'x\' FROM \'xxxbarxxx\');\n -> \'barxxx\'\nmysql> SELECT TRIM(BOTH \'x\' FROM \'xxxbarxxx\');\n -> \'bar\'\nmysql> SELECT TRIM(TRAILING \'xyz\' FROM \'barxxyz\');\n -> \'barx\'\n','http://dev.mysql.com/doc/refman/5.5/en/string-functions.html'),(456,'IS',18,'Syntax:\nIS boolean_value\n\nTests a value against a boolean value, where boolean_value can be TRUE,\nFALSE, or UNKNOWN.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/comparison-operators.html\n\n','mysql> SELECT 1 IS TRUE, 0 IS FALSE, NULL IS UNKNOWN;\n -> 1, 1, 1\n','http://dev.mysql.com/doc/refman/5.5/en/comparison-operators.html'),(457,'GET_FORMAT',31,'Syntax:\nGET_FORMAT({DATE|TIME|DATETIME}, {\'EUR\'|\'USA\'|\'JIS\'|\'ISO\'|\'INTERNAL\'})\n\nReturns a format string. This function is useful in combination with\nthe DATE_FORMAT() and the STR_TO_DATE() functions.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','mysql> SELECT DATE_FORMAT(\'2003-10-03\',GET_FORMAT(DATE,\'EUR\'));\n -> \'03.10.2003\'\nmysql> SELECT STR_TO_DATE(\'10.31.2003\',GET_FORMAT(DATE,\'USA\'));\n -> \'2003-10-31\'\n','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(458,'TINYBLOB',22,'TINYBLOB\n\nA BLOB column with a maximum length of 255 (28 - 1) bytes. Each\nTINYBLOB value is stored using a 1-byte length prefix that indicates\nthe number of bytes in the value.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-type-overview.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/string-type-overview.html'),(459,'SIGNAL',23,'Syntax:\nSIGNAL condition_value\n [SET signal_information_item\n [, signal_information_item] ...]\n\ncondition_value:\n SQLSTATE [VALUE] sqlstate_value\n | condition_name\n\nsignal_information_item:\n condition_information_item_name = simple_value_specification\n\ncondition_information_item_name:\n CLASS_ORIGIN\n | SUBCLASS_ORIGIN\n | MESSAGE_TEXT\n | MYSQL_ERRNO\n | CONSTRAINT_CATALOG\n | CONSTRAINT_SCHEMA\n | CONSTRAINT_NAME\n | CATALOG_NAME\n | SCHEMA_NAME\n | TABLE_NAME\n | COLUMN_NAME\n | CURSOR_NAME\n\ncondition_name, simple_value_specification:\n (see following discussion)\n\nSIGNAL is the way to \"return\" an error. SIGNAL provides error\ninformation to a handler, to an outer portion of the application, or to\nthe client. Also, it provides control over the error\'s characteristics\n(error number, SQLSTATE value, message). Without SIGNAL, it is\nnecessary to resort to workarounds such as deliberately referring to a\nnonexistent table to cause a routine to return an error.\n\nNo special privileges are required to execute the SIGNAL statement.\n\nThe condition_value in a SIGNAL statement indicates the error value to\nbe returned. It can be an SQLSTATE value (a 5-character string literal)\nor a condition_name that refers to a named condition previously defined\nwith DECLARE ... CONDITION (see [HELP DECLARE CONDITION]).\n\nAn SQLSTATE value can indicate errors, warnings, or \"not found.\" The\nfirst two characters of the value indicate its error class, as\ndiscussed in\nhttp://dev.mysql.com/doc/refman/5.5/en/signal.html#signal-condition-inf\normation-items. Some signal values cause statement termination; see\nhttp://dev.mysql.com/doc/refman/5.5/en/signal.html#signal-effects.\n\nThe SQLSTATE value for a SIGNAL statement should not start with \'00\'\nbecause such values indicate success and are not valid for signaling an\nerror. This is true whether the SQLSTATE value is specified directly in\nthe SIGNAL statement or in a named condition referred to in the\nstatement. If the value is invalid, a Bad SQLSTATE error occurs.\n\nTo signal a generic SQLSTATE value, use \'45000\', which means \"unhandled\nuser-defined exception.\"\n\nThe SIGNAL statement optionally includes a SET clause that contains\nmultiple signal items, in a comma-separated list of\ncondition_information_item_name = simple_value_specification\nassignments.\n\nEach condition_information_item_name may be specified only once in the\nSET clause. Otherwise, a Duplicate condition information item error\noccurs.\n\nValid simple_value_specification designators can be specified using\nstored procedure or function parameters, stored program local variables\ndeclared with DECLARE, user-defined variables, system variables, or\nliterals. A character literal may include a _charset introducer.\n\nFor information about permissible condition_information_item_name\nvalues, see\nhttp://dev.mysql.com/doc/refman/5.5/en/signal.html#signal-condition-inf\normation-items.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/signal.html\n\n','CREATE PROCEDURE p (pval INT)\nBEGIN\n DECLARE specialty CONDITION FOR SQLSTATE \'45000\';\n IF pval = 0 THEN\n SIGNAL SQLSTATE \'01000\';\n ELSEIF pval = 1 THEN\n SIGNAL SQLSTATE \'45000\'\n SET MESSAGE_TEXT = \'An error occurred\';\n ELSEIF pval = 2 THEN\n SIGNAL specialty\n SET MESSAGE_TEXT = \'An error occurred\';\n ELSE\n SIGNAL SQLSTATE \'01000\'\n SET MESSAGE_TEXT = \'A warning occurred\', MYSQL_ERRNO = 1000;\n SIGNAL SQLSTATE \'45000\'\n SET MESSAGE_TEXT = \'An error occurred\', MYSQL_ERRNO = 1001;\n END IF;\nEND;\n','http://dev.mysql.com/doc/refman/5.5/en/signal.html'),(460,'SAVEPOINT',8,'Syntax:\nSAVEPOINT identifier\nROLLBACK [WORK] TO [SAVEPOINT] identifier\nRELEASE SAVEPOINT identifier\n\nInnoDB supports the SQL statements SAVEPOINT, ROLLBACK TO SAVEPOINT,\nRELEASE SAVEPOINT and the optional WORK keyword for ROLLBACK.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/savepoint.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/savepoint.html'),(461,'USER',17,'Syntax:\nUSER()\n\nReturns the current MySQL user name and host name as a string in the\nutf8 character set.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/information-functions.html\n\n','mysql> SELECT USER();\n -> \'davida@localhost\'\n','http://dev.mysql.com/doc/refman/5.5/en/information-functions.html'),(462,'LABELS',23,'Syntax:\n[begin_label:] BEGIN\n [statement_list]\nEND [end_label]\n\n[begin_label:] LOOP\n statement_list\nEND LOOP [end_label]\n\n[begin_label:] REPEAT\n statement_list\nUNTIL search_condition\nEND REPEAT [end_label]\n\n[begin_label:] WHILE search_condition DO\n statement_list\nEND WHILE [end_label]\n\nLabels are permitted for BEGIN ... END blocks and for the LOOP, REPEAT,\nand WHILE statements. Label use for those statements follows these\nrules:\n\no begin_label must be followed by a colon.\n\no begin_label can be given without end_label. If end_label is present,\n it must be the same as begin_label.\n\no end_label cannot be given without begin_label.\n\no Labels at the same nesting level must be distinct.\n\no Labels can be up to 16 characters long.\n\nTo refer to a label within the labeled construct, use an ITERATE or\nLEAVE statement. The following example uses those statements to\ncontinue iterating or terminate the loop:\n\nCREATE PROCEDURE doiterate(p1 INT)\nBEGIN\n label1: LOOP\n SET p1 = p1 + 1;\n IF p1 < 10 THEN ITERATE label1; END IF;\n LEAVE label1;\n END LOOP label1;\nEND;\n\nThe scope of a block label does not include the code for handlers\ndeclared within the block. For details, see [HELP DECLARE HANDLER].\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/statement-labels.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/statement-labels.html'),(463,'ALTER TABLE',39,'Syntax:\nALTER [ONLINE | OFFLINE] [IGNORE] TABLE tbl_name\n [alter_specification [, alter_specification] ...]\n [partition_options]\n\nalter_specification:\n table_options\n | ADD [COLUMN] col_name column_definition\n [FIRST | AFTER col_name ]\n | ADD [COLUMN] (col_name column_definition,...)\n | ADD {INDEX|KEY} [index_name]\n [index_type] (index_col_name,...) [index_option] ...\n | ADD [CONSTRAINT [symbol]] PRIMARY KEY\n [index_type] (index_col_name,...) [index_option] ...\n | ADD [CONSTRAINT [symbol]]\n UNIQUE [INDEX|KEY] [index_name]\n [index_type] (index_col_name,...) [index_option] ...\n | ADD FULLTEXT [INDEX|KEY] [index_name]\n (index_col_name,...) [index_option] ...\n | ADD SPATIAL [INDEX|KEY] [index_name]\n (index_col_name,...) [index_option] ...\n | ADD [CONSTRAINT [symbol]]\n FOREIGN KEY [index_name] (index_col_name,...)\n reference_definition\n | ALTER [COLUMN] col_name {SET DEFAULT literal | DROP DEFAULT}\n | CHANGE [COLUMN] old_col_name new_col_name column_definition\n [FIRST|AFTER col_name]\n | MODIFY [COLUMN] col_name column_definition\n [FIRST | AFTER col_name]\n | DROP [COLUMN] col_name\n | DROP PRIMARY KEY\n | DROP {INDEX|KEY} index_name\n | DROP FOREIGN KEY fk_symbol\n | MAX_ROWS = rows\n | DISABLE KEYS\n | ENABLE KEYS\n | RENAME [TO|AS] new_tbl_name\n | ORDER BY col_name [, col_name] ...\n | CONVERT TO CHARACTER SET charset_name [COLLATE collation_name]\n | [DEFAULT] CHARACTER SET [=] charset_name [COLLATE [=] collation_name]\n | DISCARD TABLESPACE\n | IMPORT TABLESPACE\n | FORCE\n | ADD PARTITION (partition_definition)\n | DROP PARTITION partition_names\n | TRUNCATE PARTITION {partition_names | ALL}\n | COALESCE PARTITION number\n | REORGANIZE PARTITION [partition_names INTO (partition_definitions)]\n | ANALYZE PARTITION {partition_names | ALL}\n | CHECK PARTITION {partition_names | ALL}\n | OPTIMIZE PARTITION {partition_names | ALL}\n | REBUILD PARTITION {partition_names | ALL}\n | REPAIR PARTITION {partition_names | ALL}\n | PARTITION BY partitioning_expression\n | REMOVE PARTITIONING\n\nindex_col_name:\n col_name [(length)] [ASC | DESC]\n\nindex_type:\n USING {BTREE | HASH}\n\nindex_option:\n KEY_BLOCK_SIZE [=] value\n | index_type\n | WITH PARSER parser_name\n | COMMENT \'string\'\n\ntable_options:\n table_option [[,] table_option] ... (see CREATE TABLE options)\n\npartition_options:\n (see CREATE TABLE options)\n\nALTER TABLE changes the structure of a table. For example, you can add\nor delete columns, create or destroy indexes, change the type of\nexisting columns, or rename columns or the table itself. You can also\nchange characteristics such as the storage engine used for the table or\nthe table comment.\n\nPartitioning-related clauses for ALTER TABLE can be used with\npartitioned tables for repartitioning, for adding, dropping, merging,\nand splitting partitions, and for performing partitioning maintenance.\nFor more information, see\nhttp://dev.mysql.com/doc/refman/5.5/en/alter-table-partition-operations\n.html.\n\nFollowing the table name, specify the alterations to be made. If none\nare given, ALTER TABLE does nothing.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/alter-table.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/alter-table.html'),(464,'MPOINTFROMWKB',32,'MPointFromWKB(wkb[,srid]), MultiPointFromWKB(wkb[,srid])\n\nConstructs a MULTIPOINT value using its WKB representation and SRID.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-values.html#gis-wkb-functions\n\n','','http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-values.html#gis-wkb-functions'),(465,'CHAR BYTE',22,'The CHAR BYTE data type is an alias for the BINARY data type. This is a\ncompatibility feature.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-type-overview.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/string-type-overview.html'),(466,'REPAIR TABLE',20,'Syntax:\nREPAIR [NO_WRITE_TO_BINLOG | LOCAL] TABLE\n tbl_name [, tbl_name] ...\n [QUICK] [EXTENDED] [USE_FRM]\n\nREPAIR TABLE repairs a possibly corrupted table. By default, it has the\nsame effect as myisamchk --recover tbl_name. REPAIR TABLE works for\nMyISAM, ARCHIVE, and CSV tables. See\nhttp://dev.mysql.com/doc/refman/5.5/en/myisam-storage-engine.html, and\nhttp://dev.mysql.com/doc/refman/5.5/en/archive-storage-engine.html, and\nhttp://dev.mysql.com/doc/refman/5.5/en/csv-storage-engine.html\n\nThis statement requires SELECT and INSERT privileges for the table.\n\nREPAIR TABLE is supported for partitioned tables. However, the USE_FRM\noption cannot be used with this statement on a partitioned table.\n\nYou can use ALTER TABLE ... REPAIR PARTITION to repair one or more\npartitions; for more information, see [HELP ALTER TABLE], and\nhttp://dev.mysql.com/doc/refman/5.5/en/partitioning-maintenance.html.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/repair-table.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/repair-table.html'),(467,'MERGE',39,'The MERGE storage engine, also known as the MRG_MyISAM engine, is a\ncollection of identical MyISAM tables that can be used as one.\n\"Identical\" means that all tables have identical column and index\ninformation. You cannot merge MyISAM tables in which the columns are\nlisted in a different order, do not have exactly the same columns, or\nhave the indexes in different order. However, any or all of the MyISAM\ntables can be compressed with myisampack. See\nhttp://dev.mysql.com/doc/refman/5.5/en/myisampack.html. Differences in\ntable options such as AVG_ROW_LENGTH, MAX_ROWS, or PACK_KEYS do not\nmatter.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/merge-storage-engine.html\n\n','mysql> CREATE TABLE t1 (\n -> a INT NOT NULL AUTO_INCREMENT PRIMARY KEY,\n -> message CHAR(20)) ENGINE=MyISAM;\nmysql> CREATE TABLE t2 (\n -> a INT NOT NULL AUTO_INCREMENT PRIMARY KEY,\n -> message CHAR(20)) ENGINE=MyISAM;\nmysql> INSERT INTO t1 (message) VALUES (\'Testing\'),(\'table\'),(\'t1\');\nmysql> INSERT INTO t2 (message) VALUES (\'Testing\'),(\'table\'),(\'t2\');\nmysql> CREATE TABLE total (\n -> a INT NOT NULL AUTO_INCREMENT,\n -> message CHAR(20), INDEX(a))\n -> ENGINE=MERGE UNION=(t1,t2) INSERT_METHOD=LAST;\n','http://dev.mysql.com/doc/refman/5.5/en/merge-storage-engine.html'),(468,'CREATE TABLE',39,'Syntax:\nCREATE [TEMPORARY] TABLE [IF NOT EXISTS] tbl_name\n (create_definition,...)\n [table_options]\n [partition_options]\n\nOr:\n\nCREATE [TEMPORARY] TABLE [IF NOT EXISTS] tbl_name\n [(create_definition,...)]\n [table_options]\n [partition_options]\n select_statement\n\nOr:\n\nCREATE [TEMPORARY] TABLE [IF NOT EXISTS] tbl_name\n { LIKE old_tbl_name | (LIKE old_tbl_name) }\n\ncreate_definition:\n col_name column_definition\n | [CONSTRAINT [symbol]] PRIMARY KEY [index_type] (index_col_name,...)\n [index_option] ...\n | {INDEX|KEY} [index_name] [index_type] (index_col_name,...)\n [index_option] ...\n | [CONSTRAINT [symbol]] UNIQUE [INDEX|KEY]\n [index_name] [index_type] (index_col_name,...)\n [index_option] ...\n | {FULLTEXT|SPATIAL} [INDEX|KEY] [index_name] (index_col_name,...)\n [index_option] ...\n | [CONSTRAINT [symbol]] FOREIGN KEY\n [index_name] (index_col_name,...) reference_definition\n | CHECK (expr)\n\ncolumn_definition:\n data_type [NOT NULL | NULL] [DEFAULT default_value]\n [AUTO_INCREMENT] [UNIQUE [KEY] | [PRIMARY] KEY]\n [COMMENT \'string\']\n [COLUMN_FORMAT {FIXED|DYNAMIC|DEFAULT}]\n [STORAGE {DISK|MEMORY|DEFAULT}]\n [reference_definition]\n\ndata_type:\n BIT[(length)]\n | TINYINT[(length)] [UNSIGNED] [ZEROFILL]\n | SMALLINT[(length)] [UNSIGNED] [ZEROFILL]\n | MEDIUMINT[(length)] [UNSIGNED] [ZEROFILL]\n | INT[(length)] [UNSIGNED] [ZEROFILL]\n | INTEGER[(length)] [UNSIGNED] [ZEROFILL]\n | BIGINT[(length)] [UNSIGNED] [ZEROFILL]\n | REAL[(length,decimals)] [UNSIGNED] [ZEROFILL]\n | DOUBLE[(length,decimals)] [UNSIGNED] [ZEROFILL]\n | FLOAT[(length,decimals)] [UNSIGNED] [ZEROFILL]\n | DECIMAL[(length[,decimals])] [UNSIGNED] [ZEROFILL]\n | NUMERIC[(length[,decimals])] [UNSIGNED] [ZEROFILL]\n | DATE\n | TIME\n | TIMESTAMP\n | DATETIME\n | YEAR\n | CHAR[(length)]\n [CHARACTER SET charset_name] [COLLATE collation_name]\n | VARCHAR(length)\n [CHARACTER SET charset_name] [COLLATE collation_name]\n | BINARY[(length)]\n | VARBINARY(length)\n | TINYBLOB\n | BLOB\n | MEDIUMBLOB\n | LONGBLOB\n | TINYTEXT [BINARY]\n [CHARACTER SET charset_name] [COLLATE collation_name]\n | TEXT [BINARY]\n [CHARACTER SET charset_name] [COLLATE collation_name]\n | MEDIUMTEXT [BINARY]\n [CHARACTER SET charset_name] [COLLATE collation_name]\n | LONGTEXT [BINARY]\n [CHARACTER SET charset_name] [COLLATE collation_name]\n | ENUM(value1,value2,value3,...)\n [CHARACTER SET charset_name] [COLLATE collation_name]\n | SET(value1,value2,value3,...)\n [CHARACTER SET charset_name] [COLLATE collation_name]\n | spatial_type\n\nindex_col_name:\n col_name [(length)] [ASC | DESC]\n\nindex_type:\n USING {BTREE | HASH}\n\nindex_option:\n KEY_BLOCK_SIZE [=] value\n | index_type\n | WITH PARSER parser_name\n | COMMENT \'string\'\n\nreference_definition:\n REFERENCES tbl_name (index_col_name,...)\n [MATCH FULL | MATCH PARTIAL | MATCH SIMPLE]\n [ON DELETE reference_option]\n [ON UPDATE reference_option]\n\nreference_option:\n RESTRICT | CASCADE | SET NULL | NO ACTION\n\ntable_options:\n table_option [[,] table_option] ...\n\ntable_option:\n ENGINE [=] engine_name\n | AUTO_INCREMENT [=] value\n | AVG_ROW_LENGTH [=] value\n | [DEFAULT] CHARACTER SET [=] charset_name\n | CHECKSUM [=] {0 | 1}\n | [DEFAULT] COLLATE [=] collation_name\n | COMMENT [=] \'string\'\n | CONNECTION [=] \'connect_string\'\n | DATA DIRECTORY [=] \'absolute path to directory\'\n | DELAY_KEY_WRITE [=] {0 | 1}\n | INDEX DIRECTORY [=] \'absolute path to directory\'\n | INSERT_METHOD [=] { NO | FIRST | LAST }\n | KEY_BLOCK_SIZE [=] value\n | MAX_ROWS [=] value\n | MIN_ROWS [=] value\n | PACK_KEYS [=] {0 | 1 | DEFAULT}\n | PASSWORD [=] \'string\'\n | ROW_FORMAT [=] {DEFAULT|DYNAMIC|FIXED|COMPRESSED|REDUNDANT|COMPACT}\n | TABLESPACE tablespace_name [STORAGE {DISK|MEMORY|DEFAULT}]\n | UNION [=] (tbl_name[,tbl_name]...)\n\npartition_options:\n PARTITION BY\n { [LINEAR] HASH(expr)\n | [LINEAR] KEY(column_list)\n | RANGE{(expr) | COLUMNS(column_list)}\n | LIST{(expr) | COLUMNS(column_list)} }\n [PARTITIONS num]\n [SUBPARTITION BY\n { [LINEAR] HASH(expr)\n | [LINEAR] KEY(column_list) }\n [SUBPARTITIONS num]\n ]\n [(partition_definition [, partition_definition] ...)]\n\npartition_definition:\n PARTITION partition_name\n [VALUES \n {LESS THAN {(expr | value_list) | MAXVALUE} \n | \n IN (value_list)}]\n [[STORAGE] ENGINE [=] engine_name]\n [COMMENT [=] \'comment_text\' ]\n [DATA DIRECTORY [=] \'data_dir\']\n [INDEX DIRECTORY [=] \'index_dir\']\n [MAX_ROWS [=] max_number_of_rows]\n [MIN_ROWS [=] min_number_of_rows]\n [TABLESPACE [=] tablespace_name]\n [NODEGROUP [=] node_group_id]\n [(subpartition_definition [, subpartition_definition] ...)]\n\nsubpartition_definition:\n SUBPARTITION logical_name\n [[STORAGE] ENGINE [=] engine_name]\n [COMMENT [=] \'comment_text\' ]\n [DATA DIRECTORY [=] \'data_dir\']\n [INDEX DIRECTORY [=] \'index_dir\']\n [MAX_ROWS [=] max_number_of_rows]\n [MIN_ROWS [=] min_number_of_rows]\n [TABLESPACE [=] tablespace_name]\n [NODEGROUP [=] node_group_id]\n\nselect_statement:\n [IGNORE | REPLACE] [AS] SELECT ... (Some valid select statement)\n\nCREATE TABLE creates a table with the given name. You must have the\nCREATE privilege for the table.\n\nRules for permissible table names are given in\nhttp://dev.mysql.com/doc/refman/5.5/en/identifiers.html. By default,\nthe table is created in the default database, using the InnoDB storage\nengine. An error occurs if the table exists, if there is no default\ndatabase, or if the database does not exist.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/create-table.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/create-table.html'),(469,'>',18,'Syntax:\n>\n\nGreater than:\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/comparison-operators.html\n\n','mysql> SELECT 2 > 2;\n -> 0\n','http://dev.mysql.com/doc/refman/5.5/en/comparison-operators.html'),(470,'ANALYZE TABLE',20,'Syntax:\nANALYZE [NO_WRITE_TO_BINLOG | LOCAL] TABLE\n tbl_name [, tbl_name] ...\n\nANALYZE TABLE analyzes and stores the key distribution for a table.\nDuring the analysis, the table is locked with a read lock for InnoDB\nand MyISAM. This statement works with InnoDB, NDB, and MyISAM tables.\nFor MyISAM tables, this statement is equivalent to using myisamchk\n--analyze.\n\nFor more information on how the analysis works within InnoDB, see\nhttp://dev.mysql.com/doc/refman/5.5/en/innodb-restrictions.html.\n\nMySQL uses the stored key distribution to decide the order in which\ntables should be joined when you perform a join on something other than\na constant. In addition, key distributions can be used when deciding\nwhich indexes to use for a specific table within a query.\n\nThis statement requires SELECT and INSERT privileges for the table.\n\nANALYZE TABLE is supported for partitioned tables, and you can use\nALTER TABLE ... ANALYZE PARTITION to analyze one or more partitions;\nfor more information, see [HELP ALTER TABLE], and\nhttp://dev.mysql.com/doc/refman/5.5/en/partitioning-maintenance.html.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/analyze-table.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/analyze-table.html'),(471,'MICROSECOND',31,'Syntax:\nMICROSECOND(expr)\n\nReturns the microseconds from the time or datetime expression expr as a\nnumber in the range from 0 to 999999.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','mysql> SELECT MICROSECOND(\'12:00:00.123456\');\n -> 123456\nmysql> SELECT MICROSECOND(\'2009-12-31 23:59:59.000010\');\n -> 10\n','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(472,'CONSTRAINT',39,'InnoDB supports foreign keys, which let you cross-reference related\ndata across tables, and foreign key constraints, which help keep this\nspread-out data consistent. The syntax for an InnoDB foreign key\nconstraint definition in the CREATE TABLE or ALTER TABLE statement\nlooks like this:\n\n[CONSTRAINT [symbol]] FOREIGN KEY\n [index_name] (index_col_name, ...)\n REFERENCES tbl_name (index_col_name,...)\n [ON DELETE reference_option]\n [ON UPDATE reference_option]\n\nreference_option:\n RESTRICT | CASCADE | SET NULL | NO ACTION\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/innodb-foreign-key-constraints.html\n\n','CREATE TABLE product (category INT NOT NULL, id INT NOT NULL,\n price DECIMAL,\n PRIMARY KEY(category, id)) ENGINE=INNODB;\nCREATE TABLE customer (id INT NOT NULL,\n PRIMARY KEY (id)) ENGINE=INNODB;\nCREATE TABLE product_order (no INT NOT NULL AUTO_INCREMENT,\n product_category INT NOT NULL,\n product_id INT NOT NULL,\n customer_id INT NOT NULL,\n PRIMARY KEY(no),\n INDEX (product_category, product_id),\n FOREIGN KEY (product_category, product_id)\n REFERENCES product(category, id)\n ON UPDATE CASCADE ON DELETE RESTRICT,\n INDEX (customer_id),\n FOREIGN KEY (customer_id)\n REFERENCES customer(id)) ENGINE=INNODB;\n','http://dev.mysql.com/doc/refman/5.5/en/innodb-foreign-key-constraints.html'),(473,'CREATE SERVER',39,'Syntax:\nCREATE SERVER server_name\n FOREIGN DATA WRAPPER wrapper_name\n OPTIONS (option [, option] ...)\n\noption:\n { HOST character-literal\n | DATABASE character-literal\n | USER character-literal\n | PASSWORD character-literal\n | SOCKET character-literal\n | OWNER character-literal\n | PORT numeric-literal }\n\nThis statement creates the definition of a server for use with the\nFEDERATED storage engine. The CREATE SERVER statement creates a new row\nwithin the servers table within the mysql database. This statement\nrequires the SUPER privilege.\n\nThe server_name should be a unique reference to the server. Server\ndefinitions are global within the scope of the server, it is not\npossible to qualify the server definition to a specific database.\nserver_name has a maximum length of 64 characters (names longer than 64\ncharacters are silently truncated), and is case insensitive. You may\nspecify the name as a quoted string.\n\nThe wrapper_name should be mysql, and may be quoted with single\nquotation marks. Other values for wrapper_name are not currently\nsupported.\n\nFor each option you must specify either a character literal or numeric\nliteral. Character literals are UTF-8, support a maximum length of 64\ncharacters and default to a blank (empty) string. String literals are\nsilently truncated to 64 characters. Numeric literals must be a number\nbetween 0 and 9999, default value is 0.\n\n*Note*: Note that the OWNER option is currently not applied, and has no\neffect on the ownership or operation of the server connection that is\ncreated.\n\nThe CREATE SERVER statement creates an entry in the mysql.servers table\nthat can later be used with the CREATE TABLE statement when creating a\nFEDERATED table. The options that you specify will be used to populate\nthe columns in the mysql.servers table. The table columns are\nServer_name, Host, Db, Username, Password, Port and Socket.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/create-server.html\n\n','CREATE SERVER s\nFOREIGN DATA WRAPPER mysql\nOPTIONS (USER \'Remote\', HOST \'192.168.1.106\', DATABASE \'test\');\n','http://dev.mysql.com/doc/refman/5.5/en/create-server.html'),(474,'FIELD',37,'Syntax:\nFIELD(str,str1,str2,str3,...)\n\nReturns the index (position) of str in the str1, str2, str3, ... list.\nReturns 0 if str is not found.\n\nIf all arguments to FIELD() are strings, all arguments are compared as\nstrings. If all arguments are numbers, they are compared as numbers.\nOtherwise, the arguments are compared as double.\n\nIf str is NULL, the return value is 0 because NULL fails equality\ncomparison with any value. FIELD() is the complement of ELT().\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html\n\n','mysql> SELECT FIELD(\'ej\', \'Hej\', \'ej\', \'Heja\', \'hej\', \'foo\');\n -> 2\nmysql> SELECT FIELD(\'fo\', \'Hej\', \'ej\', \'Heja\', \'hej\', \'foo\');\n -> 0\n','http://dev.mysql.com/doc/refman/5.5/en/string-functions.html'),(475,'MAKETIME',31,'Syntax:\nMAKETIME(hour,minute,second)\n\nReturns a time value calculated from the hour, minute, and second\narguments.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','mysql> SELECT MAKETIME(12,15,30);\n -> \'12:15:30\'\n','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(476,'CURDATE',31,'Syntax:\nCURDATE()\n\nReturns the current date as a value in \'YYYY-MM-DD\' or YYYYMMDD format,\ndepending on whether the function is used in a string or numeric\ncontext.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','mysql> SELECT CURDATE();\n -> \'2008-06-13\'\nmysql> SELECT CURDATE() + 0;\n -> 20080613\n','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(477,'SET PASSWORD',10,'Syntax:\nSET PASSWORD [FOR user] =\n {\n PASSWORD(\'cleartext password\')\n | OLD_PASSWORD(\'cleartext password\')\n | \'encrypted password\'\n }\n\nThe SET PASSWORD statement assigns a password to an existing MySQL user\naccount. When the read_only system variable is enabled, the SUPER\nprivilege is required to use SET PASSWORD, in addition to whatever\nother privileges might be required.\n\nIf the password is specified using the PASSWORD() or OLD_PASSWORD()\nfunction, the cleartext (unencrypted) password should be given as the\nargument to the function, which hashes the password and returns the\nencrypted password string. If the password is specified without using\neither function, it should be the already encrypted password value as a\nliteral string. In all cases, the encrypted password string must be in\nthe format required by the authentication method used for the account.\n\nThe old_passwords system variable value determines the hashing method\nused by PASSWORD(). If you specify the password using that function and\nSET PASSWORD rejects the password as not being in the correct format,\nit may be necessary to set old_passwords to change the hashing method.\nFor descriptions of the permitted values, see\nhttp://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html.\n\nWith no FOR user clause, this statement sets the password for the\ncurrent user. (To see which account the server authenticated you as,\ninvoke the CURRENT_USER() function.) Any client who successfully\nconnects to the server using a nonanonymous account can change the\npassword for that account.\n\nWith a FOR user clause, this statement sets the password for the named\nuser. You must have the UPDATE privilege for the mysql database to do\nthis. The user account name uses the format described in\nhttp://dev.mysql.com/doc/refman/5.5/en/account-names.html. The user\nvalue should be given as \'user_name\'@\'host_name\', where \'user_name\' and\n\'host_name\' are exactly as listed in the User and Host columns of the\nmysql.user table row. (If you specify only a user name, a host name of\n\'%\' is used.) For example, to set the password for an account with User\nand Host column values of \'bob\' and \'%.example.org\', write the\nstatement like this:\n\nSET PASSWORD FOR \'bob\'@\'%.example.org\' = PASSWORD(\'cleartext password\');\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/set-password.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/set-password.html'),(478,'ALTER TABLESPACE',39,'Syntax:\nALTER TABLESPACE tablespace_name\n {ADD|DROP} DATAFILE \'file_name\'\n [INITIAL_SIZE [=] size]\n [WAIT]\n ENGINE [=] engine_name\n\nThis statement can be used either to add a new data file, or to drop a\ndata file from a tablespace.\n\nThe ADD DATAFILE variant enables you to specify an initial size using\nan INITIAL_SIZE clause, where size is measured in bytes; the default\nvalue is 128M (128 megabytes). You may optionally follow this integer\nvalue with a one-letter abbreviation for an order of magnitude, similar\nto those used in my.cnf. Generally, this is one of the letters M (for\nmegabytes) or G (for gigabytes).\n\n*Note*: All MySQL Cluster Disk Data objects share the same namespace.\nThis means that each Disk Data object must be uniquely named (and not\nmerely each Disk Data object of a given type). For example, you cannot\nhave a tablespace and an data file with the same name, or an undo log\nfile and a tablespace with the same name.\n\nOn 32-bit systems, the maximum supported value for INITIAL_SIZE is 4G.\n(Bug #29186)\n\nINITIAL_SIZE is rounded, explicitly, as for CREATE TABLESPACE.\n\nOnce a data file has been created, its size cannot be changed; however,\nyou can add more data files to the tablespace using additional ALTER\nTABLESPACE ... ADD DATAFILE statements.\n\nUsing DROP DATAFILE with ALTER TABLESPACE drops the data file\n\'file_name\' from the tablespace. You cannot drop a data file from a\ntablespace which is in use by any table; in other words, the data file\nmust be empty (no extents used). See\nhttp://dev.mysql.com/doc/refman/5.5/en/mysql-cluster-disk-data-objects.\nhtml. In addition, any data file to be dropped must previously have\nbeen added to the tablespace with CREATE TABLESPACE or ALTER\nTABLESPACE.\n\nBoth ALTER TABLESPACE ... ADD DATAFILE and ALTER TABLESPACE ... DROP\nDATAFILE require an ENGINE clause which specifies the storage engine\nused by the tablespace. Currently, the only accepted values for\nengine_name are NDB and NDBCLUSTER.\n\nWAIT is parsed but otherwise ignored, and so has no effect in MySQL\n5.5. It is intended for future expansion.\n\nWhen ALTER TABLESPACE ... ADD DATAFILE is used with ENGINE = NDB, a\ndata file is created on each Cluster data node. You can verify that the\ndata files were created and obtain information about them by querying\nthe INFORMATION_SCHEMA.FILES table. For example, the following query\nshows all data files belonging to the tablespace named newts:\n\nmysql> SELECT LOGFILE_GROUP_NAME, FILE_NAME, EXTRA\n -> FROM INFORMATION_SCHEMA.FILES\n -> WHERE TABLESPACE_NAME = \'newts\' AND FILE_TYPE = \'DATAFILE\';\n+--------------------+--------------+----------------+\n| LOGFILE_GROUP_NAME | FILE_NAME | EXTRA |\n+--------------------+--------------+----------------+\n| lg_3 | newdata.dat | CLUSTER_NODE=3 |\n| lg_3 | newdata.dat | CLUSTER_NODE=4 |\n| lg_3 | newdata2.dat | CLUSTER_NODE=3 |\n| lg_3 | newdata2.dat | CLUSTER_NODE=4 |\n+--------------------+--------------+----------------+\n2 rows in set (0.03 sec)\n\nSee http://dev.mysql.com/doc/refman/5.5/en/files-table.html.\n\nALTER TABLESPACE is useful only with Disk Data storage for MySQL\nCluster. See\nhttp://dev.mysql.com/doc/refman/5.5/en/mysql-cluster-disk-data.html.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/alter-tablespace.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/alter-tablespace.html'),(479,'IF FUNCTION',7,'Syntax:\nIF(expr1,expr2,expr3)\n\nIf expr1 is TRUE (expr1 <> 0 and expr1 <> NULL) then IF() returns\nexpr2; otherwise it returns expr3. IF() returns a numeric or string\nvalue, depending on the context in which it is used.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/control-flow-functions.html\n\n','mysql> SELECT IF(1>2,2,3);\n -> 3\nmysql> SELECT IF(1<2,\'yes\',\'no\');\n -> \'yes\'\nmysql> SELECT IF(STRCMP(\'test\',\'test1\'),\'no\',\'yes\');\n -> \'no\'\n','http://dev.mysql.com/doc/refman/5.5/en/control-flow-functions.html'),(480,'ENUM',22,'ENUM(\'value1\',\'value2\',...) [CHARACTER SET charset_name] [COLLATE\ncollation_name]\n\nAn enumeration. A string object that can have only one value, chosen\nfrom the list of values \'value1\', \'value2\', ..., NULL or the special \'\'\nerror value. An ENUM column can have a maximum of 65,535 distinct\nvalues. ENUM values are represented internally as integers.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-type-overview.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/string-type-overview.html'),(481,'DATABASE',17,'Syntax:\nDATABASE()\n\nReturns the default (current) database name as a string in the utf8\ncharacter set. If there is no default database, DATABASE() returns\nNULL. Within a stored routine, the default database is the database\nthat the routine is associated with, which is not necessarily the same\nas the database that is the default in the calling context.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/information-functions.html\n\n','mysql> SELECT DATABASE();\n -> \'test\'\n','http://dev.mysql.com/doc/refman/5.5/en/information-functions.html'),(482,'POINTFROMWKB',32,'PointFromWKB(wkb[,srid])\n\nConstructs a POINT value using its WKB representation and SRID.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-values.html#gis-wkb-functions\n\n','','http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-values.html#gis-wkb-functions'),(483,'POWER',4,'Syntax:\nPOWER(X,Y)\n\nThis is a synonym for POW().\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html'),(484,'ATAN',4,'Syntax:\nATAN(X)\n\nReturns the arc tangent of X, that is, the value whose tangent is X.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html\n\n','mysql> SELECT ATAN(2);\n -> 1.1071487177941\nmysql> SELECT ATAN(-2);\n -> -1.1071487177941\n','http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html'),(485,'STRCMP',37,'Syntax:\nSTRCMP(expr1,expr2)\n\nSTRCMP() returns 0 if the strings are the same, -1 if the first\nargument is smaller than the second according to the current sort\norder, and 1 otherwise.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-comparison-functions.html\n\n','mysql> SELECT STRCMP(\'text\', \'text2\');\n -> -1\nmysql> SELECT STRCMP(\'text2\', \'text\');\n -> 1\nmysql> SELECT STRCMP(\'text\', \'text\');\n -> 0\n','http://dev.mysql.com/doc/refman/5.5/en/string-comparison-functions.html'),(486,'INSERT DELAYED',27,'Syntax:\nINSERT DELAYED ...\n\nThe DELAYED option for the INSERT statement is a MySQL extension to\nstandard SQL that is very useful if you have clients that cannot or\nneed not wait for the INSERT to complete. This is a common situation\nwhen you use MySQL for logging and you also periodically run SELECT and\nUPDATE statements that take a long time to complete.\n\nWhen a client uses INSERT DELAYED, it gets an okay from the server at\nonce, and the row is queued to be inserted when the table is not in use\nby any other thread.\n\nAnother major benefit of using INSERT DELAYED is that inserts from many\nclients are bundled together and written in one block. This is much\nfaster than performing many separate inserts.\n\nNote that INSERT DELAYED is slower than a normal INSERT if the table is\nnot otherwise in use. There is also the additional overhead for the\nserver to handle a separate thread for each table for which there are\ndelayed rows. This means that you should use INSERT DELAYED only when\nyou are really sure that you need it.\n\nThe queued rows are held only in memory until they are inserted into\nthe table. This means that if you terminate mysqld forcibly (for\nexample, with kill -9) or if mysqld dies unexpectedly, any queued rows\nthat have not been written to disk are lost.\n\nThere are some constraints on the use of DELAYED:\n\no INSERT DELAYED works only with MyISAM, MEMORY, ARCHIVE, and BLACKHOLE\n tables. For engines that do not support DELAYED, an error occurs.\n\no An error occurs for INSERT DELAYED if used with a table that has been\n locked with LOCK TABLES because the insert must be handled by a\n separate thread, not by the session that holds the lock.\n\no For MyISAM tables, if there are no free blocks in the middle of the\n data file, concurrent SELECT and INSERT statements are supported.\n Under these circumstances, you very seldom need to use INSERT DELAYED\n with MyISAM.\n\no INSERT DELAYED should be used only for INSERT statements that specify\n value lists. The server ignores DELAYED for INSERT ... SELECT or\n INSERT ... ON DUPLICATE KEY UPDATE statements.\n\no Because the INSERT DELAYED statement returns immediately, before the\n rows are inserted, you cannot use LAST_INSERT_ID() to get the\n AUTO_INCREMENT value that the statement might generate.\n\no DELAYED rows are not visible to SELECT statements until they actually\n have been inserted.\n\no Prior to MySQL 5.5.7, INSERT DELAYED was treated as a normal INSERT\n if the statement inserted multiple rows, binary logging was enabled,\n and the global logging format was statement-based (that is, whenever\n binlog_format was set to STATEMENT). Beginning with MySQL 5.5.7,\n INSERT DELAYED is always handled as a simple INSERT (that is, without\n the DELAYED option) whenever the value of binlog_format is STATEMENT\n or MIXED. (In the latter case, the statement no longer triggers a\n switch to row-based logging, and so is logged using the\n statement-based format.)\n\n This does not apply when using row-based binary logging mode\n (binlog_format set to ROW), in which INSERT DELAYED statements are\n always executed using the DELAYED option as specified, and logged as\n row-update events.\n\no DELAYED is ignored on slave replication servers, so that INSERT\n DELAYED is treated as a normal INSERT on slaves. This is because\n DELAYED could cause the slave to have different data than the master.\n\no Pending INSERT DELAYED statements are lost if a table is write locked\n and ALTER TABLE is used to modify the table structure.\n\no INSERT DELAYED is not supported for views.\n\no INSERT DELAYED is not supported for partitioned tables.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/insert-delayed.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/insert-delayed.html'),(487,'SHOW PROFILE',26,'Syntax:\nSHOW PROFILE [type [, type] ... ]\n [FOR QUERY n]\n [LIMIT row_count [OFFSET offset]]\n\ntype:\n ALL\n | BLOCK IO\n | CONTEXT SWITCHES\n | CPU\n | IPC\n | MEMORY\n | PAGE FAULTS\n | SOURCE\n | SWAPS\n\nThe SHOW PROFILE and SHOW PROFILES statements display profiling\ninformation that indicates resource usage for statements executed\nduring the course of the current session.\n\nProfiling is controlled by the profiling session variable, which has a\ndefault value of 0 (OFF). Profiling is enabled by setting profiling to\n1 or ON:\n\nmysql> SET profiling = 1;\n\nSHOW PROFILES displays a list of the most recent statements sent to the\nserver. The size of the list is controlled by the\nprofiling_history_size session variable, which has a default value of\n15. The maximum value is 100. Setting the value to 0 has the practical\neffect of disabling profiling.\n\nAll statements are profiled except SHOW PROFILE and SHOW PROFILES, so\nyou will find neither of those statements in the profile list.\nMalformed statements are profiled. For example, SHOW PROFILING is an\nillegal statement, and a syntax error occurs if you try to execute it,\nbut it will show up in the profiling list.\n\nSHOW PROFILE displays detailed information about a single statement.\nWithout the FOR QUERY n clause, the output pertains to the most\nrecently executed statement. If FOR QUERY n is included, SHOW PROFILE\ndisplays information for statement n. The values of n correspond to the\nQuery_ID values displayed by SHOW PROFILES.\n\nThe LIMIT row_count clause may be given to limit the output to\nrow_count rows. If LIMIT is given, OFFSET offset may be added to begin\nthe output offset rows into the full set of rows.\n\nBy default, SHOW PROFILE displays Status and Duration columns. The\nStatus values are like the State values displayed by SHOW PROCESSLIST,\nalthough there might be some minor differences in interpretion for the\ntwo statements for some status values (see\nhttp://dev.mysql.com/doc/refman/5.5/en/thread-information.html).\n\nOptional type values may be specified to display specific additional\ntypes of information:\n\no ALL displays all information\n\no BLOCK IO displays counts for block input and output operations\n\no CONTEXT SWITCHES displays counts for voluntary and involuntary\n context switches\n\no CPU displays user and system CPU usage times\n\no IPC displays counts for messages sent and received\n\no MEMORY is not currently implemented\n\no PAGE FAULTS displays counts for major and minor page faults\n\no SOURCE displays the names of functions from the source code, together\n with the name and line number of the file in which the function\n occurs\n\no SWAPS displays swap counts\n\nProfiling is enabled per session. When a session ends, its profiling\ninformation is lost.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/show-profile.html\n\n','mysql> SELECT @@profiling;\n+-------------+\n| @@profiling |\n+-------------+\n| 0 |\n+-------------+\n1 row in set (0.00 sec)\n\nmysql> SET profiling = 1;\nQuery OK, 0 rows affected (0.00 sec)\n\nmysql> DROP TABLE IF EXISTS t1;\nQuery OK, 0 rows affected, 1 warning (0.00 sec)\n\nmysql> CREATE TABLE T1 (id INT);\nQuery OK, 0 rows affected (0.01 sec)\n\nmysql> SHOW PROFILES;\n+----------+----------+--------------------------+\n| Query_ID | Duration | Query |\n+----------+----------+--------------------------+\n| 0 | 0.000088 | SET PROFILING = 1 |\n| 1 | 0.000136 | DROP TABLE IF EXISTS t1 |\n| 2 | 0.011947 | CREATE TABLE t1 (id INT) |\n+----------+----------+--------------------------+\n3 rows in set (0.00 sec)\n\nmysql> SHOW PROFILE;\n+----------------------+----------+\n| Status | Duration |\n+----------------------+----------+\n| checking permissions | 0.000040 |\n| creating table | 0.000056 |\n| After create | 0.011363 |\n| query end | 0.000375 |\n| freeing items | 0.000089 |\n| logging slow query | 0.000019 |\n| cleaning up | 0.000005 |\n+----------------------+----------+\n7 rows in set (0.00 sec)\n\nmysql> SHOW PROFILE FOR QUERY 1;\n+--------------------+----------+\n| Status | Duration |\n+--------------------+----------+\n| query end | 0.000107 |\n| freeing items | 0.000008 |\n| logging slow query | 0.000015 |\n| cleaning up | 0.000006 |\n+--------------------+----------+\n4 rows in set (0.00 sec)\n\nmysql> SHOW PROFILE CPU FOR QUERY 2;\n+----------------------+----------+----------+------------+\n| Status | Duration | CPU_user | CPU_system |\n+----------------------+----------+----------+------------+\n| checking permissions | 0.000040 | 0.000038 | 0.000002 |\n| creating table | 0.000056 | 0.000028 | 0.000028 |\n| After create | 0.011363 | 0.000217 | 0.001571 |\n| query end | 0.000375 | 0.000013 | 0.000028 |\n| freeing items | 0.000089 | 0.000010 | 0.000014 |\n| logging slow query | 0.000019 | 0.000009 | 0.000010 |\n| cleaning up | 0.000005 | 0.000003 | 0.000002 |\n+----------------------+----------+----------+------------+\n7 rows in set (0.00 sec)\n','http://dev.mysql.com/doc/refman/5.5/en/show-profile.html'),(488,'SHOW PROCEDURE CODE',26,'Syntax:\nSHOW PROCEDURE CODE proc_name\n\nThis statement is a MySQL extension that is available only for servers\nthat have been built with debugging support. It displays a\nrepresentation of the internal implementation of the named stored\nprocedure. A similar statement, SHOW FUNCTION CODE, displays\ninformation about stored functions (see [HELP SHOW FUNCTION CODE]).\n\nBoth statements require that you be the owner of the routine or have\nSELECT access to the mysql.proc table.\n\nIf the named routine is available, each statement produces a result\nset. Each row in the result set corresponds to one \"instruction\" in the\nroutine. The first column is Pos, which is an ordinal number beginning\nwith 0. The second column is Instruction, which contains an SQL\nstatement (usually changed from the original source), or a directive\nwhich has meaning only to the stored-routine handler.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/show-procedure-code.html\n\n','mysql> DELIMITER //\nmysql> CREATE PROCEDURE p1 ()\n -> BEGIN\n -> DECLARE fanta INT DEFAULT 55;\n -> DROP TABLE t2;\n -> LOOP\n -> INSERT INTO t3 VALUES (fanta);\n -> END LOOP;\n -> END//\nQuery OK, 0 rows affected (0.00 sec)\n\nmysql> SHOW PROCEDURE CODE p1//\n+-----+----------------------------------------+\n| Pos | Instruction |\n+-----+----------------------------------------+\n| 0 | set fanta@0 55 |\n| 1 | stmt 9 \"DROP TABLE t2\" |\n| 2 | stmt 5 \"INSERT INTO t3 VALUES (fanta)\" |\n| 3 | jump 2 |\n+-----+----------------------------------------+\n4 rows in set (0.00 sec)\n','http://dev.mysql.com/doc/refman/5.5/en/show-procedure-code.html'),(489,'MEDIUMTEXT',22,'MEDIUMTEXT [CHARACTER SET charset_name] [COLLATE collation_name]\n\nA TEXT column with a maximum length of 16,777,215 (224 - 1) characters.\nThe effective maximum length is less if the value contains multi-byte\ncharacters. Each MEDIUMTEXT value is stored using a 3-byte length\nprefix that indicates the number of bytes in the value.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-type-overview.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/string-type-overview.html'),(490,'LN',4,'Syntax:\nLN(X)\n\nReturns the natural logarithm of X; that is, the base-e logarithm of X.\nIf X is less than or equal to 0, then NULL is returned.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html\n\n','mysql> SELECT LN(2);\n -> 0.69314718055995\nmysql> SELECT LN(-2);\n -> NULL\n','http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html'),(491,'RETURN',23,'Syntax:\nRETURN expr\n\nThe RETURN statement terminates execution of a stored function and\nreturns the value expr to the function caller. There must be at least\none RETURN statement in a stored function. There may be more than one\nif the function has multiple exit points.\n\nThis statement is not used in stored procedures, triggers, or events.\nThe LEAVE statement can be used to exit a stored program of those\ntypes.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/return.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/return.html'),(492,'SHOW COLLATION',26,'Syntax:\nSHOW COLLATION\n [LIKE \'pattern\' | WHERE expr]\n\nThis statement lists collations supported by the server. By default,\nthe output from SHOW COLLATION includes all available collations. The\nLIKE clause, if present, indicates which collation names to match. The\nWHERE clause can be given to select rows using more general conditions,\nas discussed in\nhttp://dev.mysql.com/doc/refman/5.5/en/extended-show.html. For example:\n\nmysql> SHOW COLLATION LIKE \'latin1%\';\n+-------------------+---------+----+---------+----------+---------+\n| Collation | Charset | Id | Default | Compiled | Sortlen |\n+-------------------+---------+----+---------+----------+---------+\n| latin1_german1_ci | latin1 | 5 | | | 0 |\n| latin1_swedish_ci | latin1 | 8 | Yes | Yes | 0 |\n| latin1_danish_ci | latin1 | 15 | | | 0 |\n| latin1_german2_ci | latin1 | 31 | | Yes | 2 |\n| latin1_bin | latin1 | 47 | | Yes | 0 |\n| latin1_general_ci | latin1 | 48 | | | 0 |\n| latin1_general_cs | latin1 | 49 | | | 0 |\n| latin1_spanish_ci | latin1 | 94 | | | 0 |\n+-------------------+---------+----+---------+----------+---------+\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/show-collation.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/show-collation.html'),(493,'LOG',4,'Syntax:\nLOG(X), LOG(B,X)\n\nIf called with one parameter, this function returns the natural\nlogarithm of X. If X is less than or equal to 0, then NULL is returned.\n\nThe inverse of this function (when called with a single argument) is\nthe EXP() function.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html\n\n','mysql> SELECT LOG(2);\n -> 0.69314718055995\nmysql> SELECT LOG(-2);\n -> NULL\n','http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html'),(494,'SET SQL_LOG_BIN',8,'Syntax:\nSET sql_log_bin = {0|1}\n\nThe sql_log_bin variable controls whether logging to the binary log is\ndone. The default value is 1 (do logging). To change logging for the\ncurrent session, change the session value of this variable. The session\nuser must have the SUPER privilege to set this variable.\n\nBeginning with MySQL 5.5.5, it is no longer possible to set\n@@session.sql_log_bin within a transaction or subquery. (Bug #53437)\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/set-sql-log-bin.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/set-sql-log-bin.html'),(495,'!=',18,'Syntax:\n<>, !=\n\nNot equal:\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/comparison-operators.html\n\n','mysql> SELECT \'.01\' <> \'0.01\';\n -> 1\nmysql> SELECT .01 <> \'0.01\';\n -> 0\nmysql> SELECT \'zapp\' <> \'zappp\';\n -> 1\n','http://dev.mysql.com/doc/refman/5.5/en/comparison-operators.html'),(496,'WHILE',23,'Syntax:\n[begin_label:] WHILE search_condition DO\n statement_list\nEND WHILE [end_label]\n\nThe statement list within a WHILE statement is repeated as long as the\nsearch_condition expression is true. statement_list consists of one or\nmore SQL statements, each terminated by a semicolon (;) statement\ndelimiter.\n\nA WHILE statement can be labeled. For the rules regarding label use,\nsee [HELP labels].\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/while.html\n\n','CREATE PROCEDURE dowhile()\nBEGIN\n DECLARE v1 INT DEFAULT 5;\n\n WHILE v1 > 0 DO\n ...\n SET v1 = v1 - 1;\n END WHILE;\nEND;\n','http://dev.mysql.com/doc/refman/5.5/en/while.html'),(497,'AES_DECRYPT',12,'Syntax:\nAES_DECRYPT(crypt_str,key_str)\n\nThis function decrypts data using the official AES (Advanced Encryption\nStandard) algorithm. For more information, see the description of\nAES_ENCRYPT().\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/encryption-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/encryption-functions.html'),(498,'DAYNAME',31,'Syntax:\nDAYNAME(date)\n\nReturns the name of the weekday for date. The language used for the\nname is controlled by the value of the lc_time_names system variable\n(http://dev.mysql.com/doc/refman/5.5/en/locale-support.html).\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','mysql> SELECT DAYNAME(\'2007-02-03\');\n -> \'Saturday\'\n','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(499,'COERCIBILITY',17,'Syntax:\nCOERCIBILITY(str)\n\nReturns the collation coercibility value of the string argument.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/information-functions.html\n\n','mysql> SELECT COERCIBILITY(\'abc\' COLLATE latin1_swedish_ci);\n -> 0\nmysql> SELECT COERCIBILITY(USER());\n -> 3\nmysql> SELECT COERCIBILITY(\'abc\');\n -> 4\n','http://dev.mysql.com/doc/refman/5.5/en/information-functions.html'),(500,'INT',22,'INT[(M)] [UNSIGNED] [ZEROFILL]\n\nA normal-size integer. The signed range is -2147483648 to 2147483647.\nThe unsigned range is 0 to 4294967295.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/numeric-type-overview.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/numeric-type-overview.html'),(501,'GLENGTH',13,'GLength(ls)\n\nReturns as a double-precision number the length of the LineString value\nls in its associated spatial reference.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/geometry-property-functions.html#linestring-property-functions\n\n','mysql> SET @ls = \'LineString(1 1,2 2,3 3)\';\nmysql> SELECT GLength(GeomFromText(@ls));\n+----------------------------+\n| GLength(GeomFromText(@ls)) |\n+----------------------------+\n| 2.8284271247462 |\n+----------------------------+\n','http://dev.mysql.com/doc/refman/5.5/en/geometry-property-functions.html#linestring-property-functions'),(502,'RADIANS',4,'Syntax:\nRADIANS(X)\n\nReturns the argument X, converted from degrees to radians. (Note that\nπ radians equals 180 degrees.)\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html\n\n','mysql> SELECT RADIANS(90);\n -> 1.5707963267949\n','http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html'),(503,'COLLATION',17,'Syntax:\nCOLLATION(str)\n\nReturns the collation of the string argument.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/information-functions.html\n\n','mysql> SELECT COLLATION(\'abc\');\n -> \'latin1_swedish_ci\'\nmysql> SELECT COLLATION(_utf8\'abc\');\n -> \'utf8_general_ci\'\n','http://dev.mysql.com/doc/refman/5.5/en/information-functions.html'),(504,'COALESCE',18,'Syntax:\nCOALESCE(value,...)\n\nReturns the first non-NULL value in the list, or NULL if there are no\nnon-NULL values.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/comparison-operators.html\n\n','mysql> SELECT COALESCE(NULL,1);\n -> 1\nmysql> SELECT COALESCE(NULL,NULL,NULL);\n -> NULL\n','http://dev.mysql.com/doc/refman/5.5/en/comparison-operators.html'),(505,'VERSION',17,'Syntax:\nVERSION()\n\nReturns a string that indicates the MySQL server version. The string\nuses the utf8 character set. The value might have a suffix in addition\nto the version number. See the description of the version system\nvariable in\nhttp://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/information-functions.html\n\n','mysql> SELECT VERSION();\n -> \'5.5.29-standard\'\n','http://dev.mysql.com/doc/refman/5.5/en/information-functions.html'),(506,'MAKE_SET',37,'Syntax:\nMAKE_SET(bits,str1,str2,...)\n\nReturns a set value (a string containing substrings separated by \",\"\ncharacters) consisting of the strings that have the corresponding bit\nin bits set. str1 corresponds to bit 0, str2 to bit 1, and so on. NULL\nvalues in str1, str2, ... are not appended to the result.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html\n\n','mysql> SELECT MAKE_SET(1,\'a\',\'b\',\'c\');\n -> \'a\'\nmysql> SELECT MAKE_SET(1 | 4,\'hello\',\'nice\',\'world\');\n -> \'hello,world\'\nmysql> SELECT MAKE_SET(1 | 4,\'hello\',\'nice\',NULL,\'world\');\n -> \'hello\'\nmysql> SELECT MAKE_SET(0,\'a\',\'b\',\'c\');\n -> \'\'\n','http://dev.mysql.com/doc/refman/5.5/en/string-functions.html'),(507,'FIND_IN_SET',37,'Syntax:\nFIND_IN_SET(str,strlist)\n\nReturns a value in the range of 1 to N if the string str is in the\nstring list strlist consisting of N substrings. A string list is a\nstring composed of substrings separated by \",\" characters. If the first\nargument is a constant string and the second is a column of type SET,\nthe FIND_IN_SET() function is optimized to use bit arithmetic. Returns\n0 if str is not in strlist or if strlist is the empty string. Returns\nNULL if either argument is NULL. This function does not work properly\nif the first argument contains a comma (\",\") character.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html\n\n','mysql> SELECT FIND_IN_SET(\'b\',\'a,b,c,d\');\n -> 2\n','http://dev.mysql.com/doc/refman/5.5/en/string-functions.html');
+/*!40000 ALTER TABLE `help_topic` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `host`
+--
+
+DROP TABLE IF EXISTS `host`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `host` (
+ `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Db` char(64) COLLATE utf8_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',
+ `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',
+ `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',
+ `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',
+ `Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+ `Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+ PRIMARY KEY (`Host`,`Db`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Host privileges; Merged with database privileges';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `host`
+--
+
+LOCK TABLES `host` WRITE;
+/*!40000 ALTER TABLE `host` DISABLE KEYS */;
+/*!40000 ALTER TABLE `host` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `ndb_binlog_index`
+--
+
+DROP TABLE IF EXISTS `ndb_binlog_index`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `ndb_binlog_index` (
+ `Position` bigint(20) unsigned NOT NULL,
+ `File` varchar(255) NOT NULL,
+ `epoch` bigint(20) unsigned NOT NULL,
+ `inserts` bigint(20) unsigned NOT NULL,
+ `updates` bigint(20) unsigned NOT NULL,
+ `deletes` bigint(20) unsigned NOT NULL,
+ `schemaops` bigint(20) unsigned NOT NULL,
+ PRIMARY KEY (`epoch`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `ndb_binlog_index`
+--
+
+LOCK TABLES `ndb_binlog_index` WRITE;
+/*!40000 ALTER TABLE `ndb_binlog_index` DISABLE KEYS */;
+/*!40000 ALTER TABLE `ndb_binlog_index` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `plugin`
+--
+
+DROP TABLE IF EXISTS `plugin`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `plugin` (
+ `name` varchar(64) NOT NULL DEFAULT '',
+ `dl` varchar(128) NOT NULL DEFAULT '',
+ PRIMARY KEY (`name`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='MySQL plugins';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `plugin`
+--
+
+LOCK TABLES `plugin` WRITE;
+/*!40000 ALTER TABLE `plugin` DISABLE KEYS */;
+/*!40000 ALTER TABLE `plugin` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `proc`
+--
+
+DROP TABLE IF EXISTS `proc`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `proc` (
+ `db` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
+ `name` char(64) NOT NULL DEFAULT '',
+ `type` enum('FUNCTION','PROCEDURE') NOT NULL,
+ `specific_name` char(64) NOT NULL DEFAULT '',
+ `language` enum('SQL') NOT NULL DEFAULT 'SQL',
+ `sql_data_access` enum('CONTAINS_SQL','NO_SQL','READS_SQL_DATA','MODIFIES_SQL_DATA') NOT NULL DEFAULT 'CONTAINS_SQL',
+ `is_deterministic` enum('YES','NO') NOT NULL DEFAULT 'NO',
+ `security_type` enum('INVOKER','DEFINER') NOT NULL DEFAULT 'DEFINER',
+ `param_list` blob NOT NULL,
+ `returns` longblob NOT NULL,
+ `body` longblob NOT NULL,
+ `definer` char(77) 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') 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,
+ `db_collation` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
+ `body_utf8` longblob,
+ PRIMARY KEY (`db`,`name`,`type`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Stored Procedures';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `proc`
+--
+
+LOCK TABLES `proc` WRITE;
+/*!40000 ALTER TABLE `proc` DISABLE KEYS */;
+/*!40000 ALTER TABLE `proc` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `procs_priv`
+--
+
+DROP TABLE IF EXISTS `procs_priv`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `procs_priv` (
+ `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Routine_name` char(64) CHARACTER SET utf8 NOT NULL DEFAULT '',
+ `Routine_type` enum('FUNCTION','PROCEDURE') COLLATE utf8_bin NOT NULL,
+ `Grantor` char(77) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Proc_priv` set('Execute','Alter Routine','Grant') CHARACTER SET utf8 NOT NULL DEFAULT '',
+ `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ PRIMARY KEY (`Host`,`Db`,`User`,`Routine_name`,`Routine_type`),
+ KEY `Grantor` (`Grantor`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Procedure privileges';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `procs_priv`
+--
+
+LOCK TABLES `procs_priv` WRITE;
+/*!40000 ALTER TABLE `procs_priv` DISABLE KEYS */;
+/*!40000 ALTER TABLE `procs_priv` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `proxies_priv`
+--
+
+DROP TABLE IF EXISTS `proxies_priv`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `proxies_priv` (
+ `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Proxied_host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Proxied_user` char(16) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `With_grant` tinyint(1) NOT NULL DEFAULT '0',
+ `Grantor` char(77) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ PRIMARY KEY (`Host`,`User`,`Proxied_host`,`Proxied_user`),
+ KEY `Grantor` (`Grantor`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='User proxy privileges';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `proxies_priv`
+--
+
+LOCK TABLES `proxies_priv` WRITE;
+/*!40000 ALTER TABLE `proxies_priv` DISABLE KEYS */;
+INSERT INTO `proxies_priv` VALUES ('localhost','root','','',1,'','2020-05-31 14:44:49'),('asus','root','','',1,'','2020-05-31 14:44:49');
+/*!40000 ALTER TABLE `proxies_priv` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `servers`
+--
+
+DROP TABLE IF EXISTS `servers`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `servers` (
+ `Server_name` char(64) NOT NULL DEFAULT '',
+ `Host` char(64) NOT NULL DEFAULT '',
+ `Db` char(64) NOT NULL DEFAULT '',
+ `Username` char(64) NOT NULL DEFAULT '',
+ `Password` char(64) NOT NULL DEFAULT '',
+ `Port` int(4) NOT NULL DEFAULT '0',
+ `Socket` char(64) NOT NULL DEFAULT '',
+ `Wrapper` char(64) NOT NULL DEFAULT '',
+ `Owner` char(64) NOT NULL DEFAULT '',
+ PRIMARY KEY (`Server_name`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='MySQL Foreign Servers table';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `servers`
+--
+
+LOCK TABLES `servers` WRITE;
+/*!40000 ALTER TABLE `servers` DISABLE KEYS */;
+/*!40000 ALTER TABLE `servers` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `tables_priv`
+--
+
+DROP TABLE IF EXISTS `tables_priv`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `tables_priv` (
+ `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Grantor` char(77) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `Table_priv` set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') CHARACTER SET utf8 NOT NULL DEFAULT '',
+ `Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '',
+ PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`),
+ KEY `Grantor` (`Grantor`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Table privileges';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `tables_priv`
+--
+
+LOCK TABLES `tables_priv` WRITE;
+/*!40000 ALTER TABLE `tables_priv` DISABLE KEYS */;
+/*!40000 ALTER TABLE `tables_priv` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `time_zone`
+--
+
+DROP TABLE IF EXISTS `time_zone`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `time_zone` (
+ `Time_zone_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `Use_leap_seconds` enum('Y','N') NOT NULL DEFAULT 'N',
+ PRIMARY KEY (`Time_zone_id`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Time zones';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `time_zone`
+--
+
+LOCK TABLES `time_zone` WRITE;
+/*!40000 ALTER TABLE `time_zone` DISABLE KEYS */;
+/*!40000 ALTER TABLE `time_zone` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `time_zone_leap_second`
+--
+
+DROP TABLE IF EXISTS `time_zone_leap_second`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `time_zone_leap_second` (
+ `Transition_time` bigint(20) NOT NULL,
+ `Correction` int(11) NOT NULL,
+ PRIMARY KEY (`Transition_time`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Leap seconds information for time zones';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `time_zone_leap_second`
+--
+
+LOCK TABLES `time_zone_leap_second` WRITE;
+/*!40000 ALTER TABLE `time_zone_leap_second` DISABLE KEYS */;
+/*!40000 ALTER TABLE `time_zone_leap_second` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `time_zone_name`
+--
+
+DROP TABLE IF EXISTS `time_zone_name`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `time_zone_name` (
+ `Name` char(64) NOT NULL,
+ `Time_zone_id` int(10) unsigned NOT NULL,
+ PRIMARY KEY (`Name`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Time zone names';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `time_zone_name`
+--
+
+LOCK TABLES `time_zone_name` WRITE;
+/*!40000 ALTER TABLE `time_zone_name` DISABLE KEYS */;
+/*!40000 ALTER TABLE `time_zone_name` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `time_zone_transition`
+--
+
+DROP TABLE IF EXISTS `time_zone_transition`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `time_zone_transition` (
+ `Time_zone_id` int(10) unsigned NOT NULL,
+ `Transition_time` bigint(20) NOT NULL,
+ `Transition_type_id` int(10) unsigned NOT NULL,
+ PRIMARY KEY (`Time_zone_id`,`Transition_time`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Time zone transitions';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `time_zone_transition`
+--
+
+LOCK TABLES `time_zone_transition` WRITE;
+/*!40000 ALTER TABLE `time_zone_transition` DISABLE KEYS */;
+/*!40000 ALTER TABLE `time_zone_transition` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `time_zone_transition_type`
+--
+
+DROP TABLE IF EXISTS `time_zone_transition_type`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `time_zone_transition_type` (
+ `Time_zone_id` int(10) unsigned NOT NULL,
+ `Transition_type_id` int(10) unsigned NOT NULL,
+ `Offset` int(11) NOT NULL DEFAULT '0',
+ `Is_DST` tinyint(3) unsigned NOT NULL DEFAULT '0',
+ `Abbreviation` char(8) NOT NULL DEFAULT '',
+ PRIMARY KEY (`Time_zone_id`,`Transition_type_id`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Time zone transition types';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `time_zone_transition_type`
+--
+
+LOCK TABLES `time_zone_transition_type` WRITE;
+/*!40000 ALTER TABLE `time_zone_transition_type` DISABLE KEYS */;
+/*!40000 ALTER TABLE `time_zone_transition_type` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `user`
+--
+
+DROP TABLE IF EXISTS `user`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `user` (
+ `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `User` char(16) 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',
+ `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,
+ PRIMARY KEY (`Host`,`User`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Users and global privileges';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `user`
+--
+
+LOCK TABLES `user` WRITE;
+/*!40000 ALTER TABLE `user` DISABLE KEYS */;
+INSERT INTO `user` VALUES ('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','','','','',0,0,0,0,'',''),('asus','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','','','','',0,0,0,0,'',''),('127.0.0.1','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','','','','',0,0,0,0,'',''),('::1','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','','','','',0,0,0,0,'',''),('localhost','','','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,'',''),('asus','','','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,'','');
+/*!40000 ALTER TABLE `user` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `general_log`
+--
+
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE IF NOT EXISTS `general_log` (
+ `event_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `user_host` mediumtext NOT NULL,
+ `thread_id` int(11) NOT NULL,
+ `server_id` int(10) unsigned NOT NULL,
+ `command_type` varchar(64) NOT NULL,
+ `argument` mediumtext NOT NULL
+) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='General log';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `slow_log`
+--
+
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE IF NOT EXISTS `slow_log` (
+ `start_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `user_host` mediumtext NOT NULL,
+ `query_time` time(6) NOT NULL,
+ `lock_time` time(6) NOT NULL,
+ `rows_sent` int(11) NOT NULL,
+ `rows_examined` int(11) NOT NULL,
+ `db` varchar(512) NOT NULL,
+ `last_insert_id` int(11) NOT NULL,
+ `insert_id` int(11) NOT NULL,
+ `server_id` int(10) unsigned NOT NULL,
+ `sql_text` mediumtext NOT NULL
+) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log';
+/*!40101 SET character_set_client = @saved_cs_client */;
+/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
+
+/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
+/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
+/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
+/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
+/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
+/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
+/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
+
+-- Dump completed on 2020-05-31 17:58:23
diff --git a/mysql-test/std_data/mysql_json/mysql_json_test.MYD b/mysql-test/std_data/mysql_json/mysql_json_test.MYD
new file mode 100644
index 00000000000..0be8c5968b4
--- /dev/null
+++ b/mysql-test/std_data/mysql_json/mysql_json_test.MYD
Binary files differ
diff --git a/mysql-test/std_data/mysql_json/mysql_json_test.MYI b/mysql-test/std_data/mysql_json/mysql_json_test.MYI
new file mode 100644
index 00000000000..ada3ff23836
--- /dev/null
+++ b/mysql-test/std_data/mysql_json/mysql_json_test.MYI
Binary files differ
diff --git a/mysql-test/std_data/mysql_json/mysql_json_test.frm b/mysql-test/std_data/mysql_json/mysql_json_test.frm
new file mode 100644
index 00000000000..94c642f45ac
--- /dev/null
+++ b/mysql-test/std_data/mysql_json/mysql_json_test.frm
Binary files differ
diff --git a/mysql-test/std_data/mysql_json/mysql_json_test_big.MYD b/mysql-test/std_data/mysql_json/mysql_json_test_big.MYD
new file mode 100644
index 00000000000..21b1fffc4ba
--- /dev/null
+++ b/mysql-test/std_data/mysql_json/mysql_json_test_big.MYD
Binary files differ
diff --git a/mysql-test/std_data/mysql_json/mysql_json_test_big.MYI b/mysql-test/std_data/mysql_json/mysql_json_test_big.MYI
new file mode 100644
index 00000000000..79a1d9ebd89
--- /dev/null
+++ b/mysql-test/std_data/mysql_json/mysql_json_test_big.MYI
Binary files differ
diff --git a/mysql-test/std_data/mysql_json/mysql_json_test_big.frm b/mysql-test/std_data/mysql_json/mysql_json_test_big.frm
new file mode 100644
index 00000000000..94c642f45ac
--- /dev/null
+++ b/mysql-test/std_data/mysql_json/mysql_json_test_big.frm
Binary files differ
diff --git a/mysql-test/std_data/mysql_json/tempty.MYD b/mysql-test/std_data/mysql_json/tempty.MYD
new file mode 100644
index 00000000000..b4bf921b99f
--- /dev/null
+++ b/mysql-test/std_data/mysql_json/tempty.MYD
Binary files differ
diff --git a/mysql-test/std_data/mysql_json/tempty.MYI b/mysql-test/std_data/mysql_json/tempty.MYI
new file mode 100644
index 00000000000..003b7c8842f
--- /dev/null
+++ b/mysql-test/std_data/mysql_json/tempty.MYI
Binary files differ
diff --git a/mysql-test/std_data/mysql_json/tempty.frm b/mysql-test/std_data/mysql_json/tempty.frm
new file mode 100644
index 00000000000..15e6955dfb3
--- /dev/null
+++ b/mysql-test/std_data/mysql_json/tempty.frm
Binary files differ
diff --git a/mysql-test/std_data/s3_unique_table.frm b/mysql-test/std_data/s3_unique_table.frm
new file mode 100644
index 00000000000..23bb5215783
--- /dev/null
+++ b/mysql-test/std_data/s3_unique_table.frm
Binary files differ
diff --git a/mysql-test/std_data/wl5766_data.txt b/mysql-test/std_data/wl5766_data.txt
new file mode 100644
index 00000000000..cab8fb3d41e
--- /dev/null
+++ b/mysql-test/std_data/wl5766_data.txt
@@ -0,0 +1,100000 @@
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+639
+640
+641
+642
+643
+644
+645
+646
+647
+648
+649
+650
+651
+652
+653
+654
+655
+656
+657
+658
+659
+660
+661
+662
+663
+664
+665
+666
+667
+668
+669
+670
+671
+672
+673
+674
+675
+676
+677
+678
+679
+680
+681
+682
+683
+684
+685
+686
+687
+688
+689
+690
+691
+692
+693
+694
+695
+696
+697
+698
+699
+700
+701
+702
+703
+704
+705
+706
+707
+708
+709
+710
+711
+712
+713
+714
+715
+716
+717
+718
+719
+720
+721
+722
+723
+724
+725
+726
+727
+728
+729
+730
+731
+732
+733
+734
+735
+736
+737
+738
+739
+740
+741
+742
+743
+744
+745
+746
+747
+748
+749
+750
+751
+752
+753
+754
+755
+756
+757
+758
+759
+760
+761
+762
+763
+764
+765
+766
+767
+768
+769
+770
+771
+772
+773
+774
+775
+776
+777
+778
+779
+780
+781
+782
+783
+784
+785
+786
+787
+788
+789
+790
+791
+792
+793
+794
+795
+796
+797
+798
+799
+800
+801
+802
+803
+804
+805
+806
+807
+808
+809
+810
+811
+812
+813
+814
+815
+816
+817
+818
+819
+820
+821
+822
+823
+824
+825
+826
+827
+828
+829
+830
+831
+832
+833
+834
+835
+836
+837
+838
+839
+840
+841
+842
+843
+844
+845
+846
+847
+848
+849
+850
+851
+852
+853
+854
+855
+856
+857
+858
+859
+860
+861
+862
+863
+864
+865
+866
+867
+868
+869
+870
+871
+872
+873
+874
+875
+876
+877
+878
+879
+880
+881
+882
+883
+884
+885
+886
+887
+888
+889
+890
+891
+892
+893
+894
+895
+896
+897
+898
+899
+900
+901
+902
+903
+904
+905
+906
+907
+908
+909
+910
+911
+912
+913
+914
+915
+916
+917
+918
+919
+920
+921
+922
+923
+924
+925
+926
+927
+928
+929
+930
+931
+932
+933
+934
+935
+936
+937
+938
+939
+940
+941
+942
+943
+944
+945
+946
+947
+948
+949
+950
+951
+952
+953
+954
+955
+956
+957
+958
+959
+960
+961
+962
+963
+964
+965
+966
+967
+968
+969
+970
+971
+972
+973
+974
+975
+976
+977
+978
+979
+980
+981
+982
+983
+984
+985
+986
+987
+988
+989
+990
+991
+992
+993
+994
+995
+996
+997
+998
+999
+1000
+1001
+1002
+1003
+1004
+1005
+1006
+1007
+1008
+1009
+1010
+1011
+1012
+1013
+1014
+1015
+1016
+1017
+1018
+1019
+1020
+1021
+1022
+1023
+1024
+1025
+1026
+1027
+1028
+1029
+1030
+1031
+1032
+1033
+1034
+1035
+1036
+1037
+1038
+1039
+1040
+1041
+1042
+1043
+1044
+1045
+1046
+1047
+1048
+1049
+1050
+1051
+1052
+1053
+1054
+1055
+1056
+1057
+1058
+1059
+1060
+1061
+1062
+1063
+1064
+1065
+1066
+1067
+1068
+1069
+1070
+1071
+1072
+1073
+1074
+1075
+1076
+1077
+1078
+1079
+1080
+1081
+1082
+1083
+1084
+1085
+1086
+1087
+1088
+1089
+1090
+1091
+1092
+1093
+1094
+1095
+1096
+1097
+1098
+1099
+1100
+1101
+1102
+1103
+1104
+1105
+1106
+1107
+1108
+1109
+1110
+1111
+1112
+1113
+1114
+1115
+1116
+1117
+1118
+1119
+1120
+1121
+1122
+1123
+1124
+1125
+1126
+1127
+1128
+1129
+1130
+1131
+1132
+1133
+1134
+1135
+1136
+1137
+1138
+1139
+1140
+1141
+1142
+1143
+1144
+1145
+1146
+1147
+1148
+1149
+1150
+1151
+1152
+1153
+1154
+1155
+1156
+1157
+1158
+1159
+1160
+1161
+1162
+1163
+1164
+1165
+1166
+1167
+1168
+1169
+1170
+1171
+1172
+1173
+1174
+1175
+1176
+1177
+1178
+1179
+1180
+1181
+1182
+1183
+1184
+1185
+1186
+1187
+1188
+1189
+1190
+1191
+1192
+1193
+1194
+1195
+1196
+1197
+1198
+1199
+1200
+1201
+1202
+1203
+1204
+1205
+1206
+1207
+1208
+1209
+1210
+1211
+1212
+1213
+1214
+1215
+1216
+1217
+1218
+1219
+1220
+1221
+1222
+1223
+1224
+1225
+1226
+1227
+1228
+1229
+1230
+1231
+1232
+1233
+1234
+1235
+1236
+1237
+1238
+1239
+1240
+1241
+1242
+1243
+1244
+1245
+1246
+1247
+1248
+1249
+1250
+1251
+1252
+1253
+1254
+1255
+1256
+1257
+1258
+1259
+1260
+1261
+1262
+1263
+1264
+1265
+1266
+1267
+1268
+1269
+1270
+1271
+1272
+1273
+1274
+1275
+1276
+1277
+1278
+1279
+1280
+1281
+1282
+1283
+1284
+1285
+1286
+1287
+1288
+1289
+1290
+1291
+1292
+1293
+1294
+1295
+1296
+1297
+1298
+1299
+1300
+1301
+1302
+1303
+1304
+1305
+1306
+1307
+1308
+1309
+1310
+1311
+1312
+1313
+1314
+1315
+1316
+1317
+1318
+1319
+1320
+1321
+1322
+1323
+1324
+1325
+1326
+1327
+1328
+1329
+1330
+1331
+1332
+1333
+1334
+1335
+1336
+1337
+1338
+1339
+1340
+1341
+1342
+1343
+1344
+1345
+1346
+1347
+1348
+1349
+1350
+1351
+1352
+1353
+1354
+1355
+1356
+1357
+1358
+1359
+1360
+1361
+1362
+1363
+1364
+1365
+1366
+1367
+1368
+1369
+1370
+1371
+1372
+1373
+1374
+1375
+1376
+1377
+1378
+1379
+1380
+1381
+1382
+1383
+1384
+1385
+1386
+1387
+1388
+1389
+1390
+1391
+1392
+1393
+1394
+1395
+1396
+1397
+1398
+1399
+1400
+1401
+1402
+1403
+1404
+1405
+1406
+1407
+1408
+1409
+1410
+1411
+1412
+1413
+1414
+1415
+1416
+1417
+1418
+1419
+1420
+1421
+1422
+1423
+1424
+1425
+1426
+1427
+1428
+1429
+1430
+1431
+1432
+1433
+1434
+1435
+1436
+1437
+1438
+1439
+1440
+1441
+1442
+1443
+1444
+1445
+1446
+1447
+1448
+1449
+1450
+1451
+1452
+1453
+1454
+1455
+1456
+1457
+1458
+1459
+1460
+1461
+1462
+1463
+1464
+1465
+1466
+1467
+1468
+1469
+1470
+1471
+1472
+1473
+1474
+1475
+1476
+1477
+1478
+1479
+1480
+1481
+1482
+1483
+1484
+1485
+1486
+1487
+1488
+1489
+1490
+1491
+1492
+1493
+1494
+1495
+1496
+1497
+1498
+1499
+1500
+1501
+1502
+1503
+1504
+1505
+1506
+1507
+1508
+1509
+1510
+1511
+1512
+1513
+1514
+1515
+1516
+1517
+1518
+1519
+1520
+1521
+1522
+1523
+1524
+1525
+1526
+1527
+1528
+1529
+1530
+1531
+1532
+1533
+1534
+1535
+1536
+1537
+1538
+1539
+1540
+1541
+1542
+1543
+1544
+1545
+1546
+1547
+1548
+1549
+1550
+1551
+1552
+1553
+1554
+1555
+1556
+1557
+1558
+1559
+1560
+1561
+1562
+1563
+1564
+1565
+1566
+1567
+1568
+1569
+1570
+1571
+1572
+1573
+1574
+1575
+1576
+1577
+1578
+1579
+1580
+1581
+1582
+1583
+1584
+1585
+1586
+1587
+1588
+1589
+1590
+1591
+1592
+1593
+1594
+1595
+1596
+1597
+1598
+1599
+1600
+1601
+1602
+1603
+1604
+1605
+1606
+1607
+1608
+1609
+1610
+1611
+1612
+1613
+1614
+1615
+1616
+1617
+1618
+1619
+1620
+1621
+1622
+1623
+1624
+1625
+1626
+1627
+1628
+1629
+1630
+1631
+1632
+1633
+1634
+1635
+1636
+1637
+1638
+1639
+1640
+1641
+1642
+1643
+1644
+1645
+1646
+1647
+1648
+1649
+1650
+1651
+1652
+1653
+1654
+1655
+1656
+1657
+1658
+1659
+1660
+1661
+1662
+1663
+1664
+1665
+1666
+1667
+1668
+1669
+1670
+1671
+1672
+1673
+1674
+1675
+1676
+1677
+1678
+1679
+1680
+1681
+1682
+1683
+1684
+1685
+1686
+1687
+1688
+1689
+1690
+1691
+1692
+1693
+1694
+1695
+1696
+1697
+1698
+1699
+1700
+1701
+1702
+1703
+1704
+1705
+1706
+1707
+1708
+1709
+1710
+1711
+1712
+1713
+1714
+1715
+1716
+1717
+1718
+1719
+1720
+1721
+1722
+1723
+1724
+1725
+1726
+1727
+1728
+1729
+1730
+1731
+1732
+1733
+1734
+1735
+1736
+1737
+1738
+1739
+1740
+1741
+1742
+1743
+1744
+1745
+1746
+1747
+1748
+1749
+1750
+1751
+1752
+1753
+1754
+1755
+1756
+1757
+1758
+1759
+1760
+1761
+1762
+1763
+1764
+1765
+1766
+1767
+1768
+1769
+1770
+1771
+1772
+1773
+1774
+1775
+1776
+1777
+1778
+1779
+1780
+1781
+1782
+1783
+1784
+1785
+1786
+1787
+1788
+1789
+1790
+1791
+1792
+1793
+1794
+1795
+1796
+1797
+1798
+1799
+1800
+1801
+1802
+1803
+1804
+1805
+1806
+1807
+1808
+1809
+1810
+1811
+1812
+1813
+1814
+1815
+1816
+1817
+1818
+1819
+1820
+1821
+1822
+1823
+1824
+1825
+1826
+1827
+1828
+1829
+1830
+1831
+1832
+1833
+1834
+1835
+1836
+1837
+1838
+1839
+1840
+1841
+1842
+1843
+1844
+1845
+1846
+1847
+1848
+1849
+1850
+1851
+1852
+1853
+1854
+1855
+1856
+1857
+1858
+1859
+1860
+1861
+1862
+1863
+1864
+1865
+1866
+1867
+1868
+1869
+1870
+1871
+1872
+1873
+1874
+1875
+1876
+1877
+1878
+1879
+1880
+1881
+1882
+1883
+1884
+1885
+1886
+1887
+1888
+1889
+1890
+1891
+1892
+1893
+1894
+1895
+1896
+1897
+1898
+1899
+1900
+1901
+1902
+1903
+1904
+1905
+1906
+1907
+1908
+1909
+1910
+1911
+1912
+1913
+1914
+1915
+1916
+1917
+1918
+1919
+1920
+1921
+1922
+1923
+1924
+1925
+1926
+1927
+1928
+1929
+1930
+1931
+1932
+1933
+1934
+1935
+1936
+1937
+1938
+1939
+1940
+1941
+1942
+1943
+1944
+1945
+1946
+1947
+1948
+1949
+1950
+1951
+1952
+1953
+1954
+1955
+1956
+1957
+1958
+1959
+1960
+1961
+1962
+1963
+1964
+1965
+1966
+1967
+1968
+1969
+1970
+1971
+1972
+1973
+1974
+1975
+1976
+1977
+1978
+1979
+1980
+1981
+1982
+1983
+1984
+1985
+1986
+1987
+1988
+1989
+1990
+1991
+1992
+1993
+1994
+1995
+1996
+1997
+1998
+1999
+2000
+2001
+2002
+2003
+2004
+2005
+2006
+2007
+2008
+2009
+2010
+2011
+2012
+2013
+2014
+2015
+2016
+2017
+2018
+2019
+2020
+2021
+2022
+2023
+2024
+2025
+2026
+2027
+2028
+2029
+2030
+2031
+2032
+2033
+2034
+2035
+2036
+2037
+2038
+2039
+2040
+2041
+2042
+2043
+2044
+2045
+2046
+2047
+2048
+2049
+2050
+2051
+2052
+2053
+2054
+2055
+2056
+2057
+2058
+2059
+2060
+2061
+2062
+2063
+2064
+2065
+2066
+2067
+2068
+2069
+2070
+2071
+2072
+2073
+2074
+2075
+2076
+2077
+2078
+2079
+2080
+2081
+2082
+2083
+2084
+2085
+2086
+2087
+2088
+2089
+2090
+2091
+2092
+2093
+2094
+2095
+2096
+2097
+2098
+2099
+2100
+2101
+2102
+2103
+2104
+2105
+2106
+2107
+2108
+2109
+2110
+2111
+2112
+2113
+2114
+2115
+2116
+2117
+2118
+2119
+2120
+2121
+2122
+2123
+2124
+2125
+2126
+2127
+2128
+2129
+2130
+2131
+2132
+2133
+2134
+2135
+2136
+2137
+2138
+2139
+2140
+2141
+2142
+2143
+2144
+2145
+2146
+2147
+2148
+2149
+2150
+2151
+2152
+2153
+2154
+2155
+2156
+2157
+2158
+2159
+2160
+2161
+2162
+2163
+2164
+2165
+2166
+2167
+2168
+2169
+2170
+2171
+2172
+2173
+2174
+2175
+2176
+2177
+2178
+2179
+2180
+2181
+2182
+2183
+2184
+2185
+2186
+2187
+2188
+2189
+2190
+2191
+2192
+2193
+2194
+2195
+2196
+2197
+2198
+2199
+2200
+2201
+2202
+2203
+2204
+2205
+2206
+2207
+2208
+2209
+2210
+2211
+2212
+2213
+2214
+2215
+2216
+2217
+2218
+2219
+2220
+2221
+2222
+2223
+2224
+2225
+2226
+2227
+2228
+2229
+2230
+2231
+2232
+2233
+2234
+2235
+2236
+2237
+2238
+2239
+2240
+2241
+2242
+2243
+2244
+2245
+2246
+2247
+2248
+2249
+2250
+2251
+2252
+2253
+2254
+2255
+2256
+2257
+2258
+2259
+2260
+2261
+2262
+2263
+2264
+2265
+2266
+2267
+2268
+2269
+2270
+2271
+2272
+2273
+2274
+2275
+2276
+2277
+2278
+2279
+2280
+2281
+2282
+2283
+2284
+2285
+2286
+2287
+2288
+2289
+2290
+2291
+2292
+2293
+2294
+2295
+2296
+2297
+2298
+2299
+2300
+2301
+2302
+2303
+2304
+2305
+2306
+2307
+2308
+2309
+2310
+2311
+2312
+2313
+2314
+2315
+2316
+2317
+2318
+2319
+2320
+2321
+2322
+2323
+2324
+2325
+2326
+2327
+2328
+2329
+2330
+2331
+2332
+2333
+2334
+2335
+2336
+2337
+2338
+2339
+2340
+2341
+2342
+2343
+2344
+2345
+2346
+2347
+2348
+2349
+2350
+2351
+2352
+2353
+2354
+2355
+2356
+2357
+2358
+2359
+2360
+2361
+2362
+2363
+2364
+2365
+2366
+2367
+2368
+2369
+2370
+2371
+2372
+2373
+2374
+2375
+2376
+2377
+2378
+2379
+2380
+2381
+2382
+2383
+2384
+2385
+2386
+2387
+2388
+2389
+2390
+2391
+2392
+2393
+2394
+2395
+2396
+2397
+2398
+2399
+2400
+2401
+2402
+2403
+2404
+2405
+2406
+2407
+2408
+2409
+2410
+2411
+2412
+2413
+2414
+2415
+2416
+2417
+2418
+2419
+2420
+2421
+2422
+2423
+2424
+2425
+2426
+2427
+2428
+2429
+2430
+2431
+2432
+2433
+2434
+2435
+2436
+2437
+2438
+2439
+2440
+2441
+2442
+2443
+2444
+2445
+2446
+2447
+2448
+2449
+2450
+2451
+2452
+2453
+2454
+2455
+2456
+2457
+2458
+2459
+2460
+2461
+2462
+2463
+2464
+2465
+2466
+2467
+2468
+2469
+2470
+2471
+2472
+2473
+2474
+2475
+2476
+2477
+2478
+2479
+2480
+2481
+2482
+2483
+2484
+2485
+2486
+2487
+2488
+2489
+2490
+2491
+2492
+2493
+2494
+2495
+2496
+2497
+2498
+2499
+2500
+2501
+2502
+2503
+2504
+2505
+2506
+2507
+2508
+2509
+2510
+2511
+2512
+2513
+2514
+2515
+2516
+2517
+2518
+2519
+2520
+2521
+2522
+2523
+2524
+2525
+2526
+2527
+2528
+2529
+2530
+2531
+2532
+2533
+2534
+2535
+2536
+2537
+2538
+2539
+2540
+2541
+2542
+2543
+2544
+2545
+2546
+2547
+2548
+2549
+2550
+2551
+2552
+2553
+2554
+2555
+2556
+2557
+2558
+2559
+2560
+2561
+2562
+2563
+2564
+2565
+2566
+2567
+2568
+2569
+2570
+2571
+2572
+2573
+2574
+2575
+2576
+2577
+2578
+2579
+2580
+2581
+2582
+2583
+2584
+2585
+2586
+2587
+2588
+2589
+2590
+2591
+2592
+2593
+2594
+2595
+2596
+2597
+2598
+2599
+2600
+2601
+2602
+2603
+2604
+2605
+2606
+2607
+2608
+2609
+2610
+2611
+2612
+2613
+2614
+2615
+2616
+2617
+2618
+2619
+2620
+2621
+2622
+2623
+2624
+2625
+2626
+2627
+2628
+2629
+2630
+2631
+2632
+2633
+2634
+2635
+2636
+2637
+2638
+2639
+2640
+2641
+2642
+2643
+2644
+2645
+2646
+2647
+2648
+2649
+2650
+2651
+2652
+2653
+2654
+2655
+2656
+2657
+2658
+2659
+2660
+2661
+2662
+2663
+2664
+2665
+2666
+2667
+2668
+2669
+2670
+2671
+2672
+2673
+2674
+2675
+2676
+2677
+2678
+2679
+2680
+2681
+2682
+2683
+2684
+2685
+2686
+2687
+2688
+2689
+2690
+2691
+2692
+2693
+2694
+2695
+2696
+2697
+2698
+2699
+2700
+2701
+2702
+2703
+2704
+2705
+2706
+2707
+2708
+2709
+2710
+2711
+2712
+2713
+2714
+2715
+2716
+2717
+2718
+2719
+2720
+2721
+2722
+2723
+2724
+2725
+2726
+2727
+2728
+2729
+2730
+2731
+2732
+2733
+2734
+2735
+2736
+2737
+2738
+2739
+2740
+2741
+2742
+2743
+2744
+2745
+2746
+2747
+2748
+2749
+2750
+2751
+2752
+2753
+2754
+2755
+2756
+2757
+2758
+2759
+2760
+2761
+2762
+2763
+2764
+2765
+2766
+2767
+2768
+2769
+2770
+2771
+2772
+2773
+2774
+2775
+2776
+2777
+2778
+2779
+2780
+2781
+2782
+2783
+2784
+2785
+2786
+2787
+2788
+2789
+2790
+2791
+2792
+2793
+2794
+2795
+2796
+2797
+2798
+2799
+2800
+2801
+2802
+2803
+2804
+2805
+2806
+2807
+2808
+2809
+2810
+2811
+2812
+2813
+2814
+2815
+2816
+2817
+2818
+2819
+2820
+2821
+2822
+2823
+2824
+2825
+2826
+2827
+2828
+2829
+2830
+2831
+2832
+2833
+2834
+2835
+2836
+2837
+2838
+2839
+2840
+2841
+2842
+2843
+2844
+2845
+2846
+2847
+2848
+2849
+2850
+2851
+2852
+2853
+2854
+2855
+2856
+2857
+2858
+2859
+2860
+2861
+2862
+2863
+2864
+2865
+2866
+2867
+2868
+2869
+2870
+2871
+2872
+2873
+2874
+2875
+2876
+2877
+2878
+2879
+2880
+2881
+2882
+2883
+2884
+2885
+2886
+2887
+2888
+2889
+2890
+2891
+2892
+2893
+2894
+2895
+2896
+2897
+2898
+2899
+2900
+2901
+2902
+2903
+2904
+2905
+2906
+2907
+2908
+2909
+2910
+2911
+2912
+2913
+2914
+2915
+2916
+2917
+2918
+2919
+2920
+2921
+2922
+2923
+2924
+2925
+2926
+2927
+2928
+2929
+2930
+2931
+2932
+2933
+2934
+2935
+2936
+2937
+2938
+2939
+2940
+2941
+2942
+2943
+2944
+2945
+2946
+2947
+2948
+2949
+2950
+2951
+2952
+2953
+2954
+2955
+2956
+2957
+2958
+2959
+2960
+2961
+2962
+2963
+2964
+2965
+2966
+2967
+2968
+2969
+2970
+2971
+2972
+2973
+2974
+2975
+2976
+2977
+2978
+2979
+2980
+2981
+2982
+2983
+2984
+2985
+2986
+2987
+2988
+2989
+2990
+2991
+2992
+2993
+2994
+2995
+2996
+2997
+2998
+2999
+3000
+3001
+3002
+3003
+3004
+3005
+3006
+3007
+3008
+3009
+3010
+3011
+3012
+3013
+3014
+3015
+3016
+3017
+3018
+3019
+3020
+3021
+3022
+3023
+3024
+3025
+3026
+3027
+3028
+3029
+3030
+3031
+3032
+3033
+3034
+3035
+3036
+3037
+3038
+3039
+3040
+3041
+3042
+3043
+3044
+3045
+3046
+3047
+3048
+3049
+3050
+3051
+3052
+3053
+3054
+3055
+3056
+3057
+3058
+3059
+3060
+3061
+3062
+3063
+3064
+3065
+3066
+3067
+3068
+3069
+3070
+3071
+3072
+3073
+3074
+3075
+3076
+3077
+3078
+3079
+3080
+3081
+3082
+3083
+3084
+3085
+3086
+3087
+3088
+3089
+3090
+3091
+3092
+3093
+3094
+3095
+3096
+3097
+3098
+3099
+3100
+3101
+3102
+3103
+3104
+3105
+3106
+3107
+3108
+3109
+3110
+3111
+3112
+3113
+3114
+3115
+3116
+3117
+3118
+3119
+3120
+3121
+3122
+3123
+3124
+3125
+3126
+3127
+3128
+3129
+3130
+3131
+3132
+3133
+3134
+3135
+3136
+3137
+3138
+3139
+3140
+3141
+3142
+3143
+3144
+3145
+3146
+3147
+3148
+3149
+3150
+3151
+3152
+3153
+3154
+3155
+3156
+3157
+3158
+3159
+3160
+3161
+3162
+3163
+3164
+3165
+3166
+3167
+3168
+3169
+3170
+3171
+3172
+3173
+3174
+3175
+3176
+3177
+3178
+3179
+3180
+3181
+3182
+3183
+3184
+3185
+3186
+3187
+3188
+3189
+3190
+3191
+3192
+3193
+3194
+3195
+3196
+3197
+3198
+3199
+3200
+3201
+3202
+3203
+3204
+3205
+3206
+3207
+3208
+3209
+3210
+3211
+3212
+3213
+3214
+3215
+3216
+3217
+3218
+3219
+3220
+3221
+3222
+3223
+3224
+3225
+3226
+3227
+3228
+3229
+3230
+3231
+3232
+3233
+3234
+3235
+3236
+3237
+3238
+3239
+3240
+3241
+3242
+3243
+3244
+3245
+3246
+3247
+3248
+3249
+3250
+3251
+3252
+3253
+3254
+3255
+3256
+3257
+3258
+3259
+3260
+3261
+3262
+3263
+3264
+3265
+3266
+3267
+3268
+3269
+3270
+3271
+3272
+3273
+3274
+3275
+3276
+3277
+3278
+3279
+3280
+3281
+3282
+3283
+3284
+3285
+3286
+3287
+3288
+3289
+3290
+3291
+3292
+3293
+3294
+3295
+3296
+3297
+3298
+3299
+3300
+3301
+3302
+3303
+3304
+3305
+3306
+3307
+3308
+3309
+3310
+3311
+3312
+3313
+3314
+3315
+3316
+3317
+3318
+3319
+3320
+3321
+3322
+3323
+3324
+3325
+3326
+3327
+3328
+3329
+3330
+3331
+3332
+3333
+3334
+3335
+3336
+3337
+3338
+3339
+3340
+3341
+3342
+3343
+3344
+3345
+3346
+3347
+3348
+3349
+3350
+3351
+3352
+3353
+3354
+3355
+3356
+3357
+3358
+3359
+3360
+3361
+3362
+3363
+3364
+3365
+3366
+3367
+3368
+3369
+3370
+3371
+3372
+3373
+3374
+3375
+3376
+3377
+3378
+3379
+3380
+3381
+3382
+3383
+3384
+3385
+3386
+3387
+3388
+3389
+3390
+3391
+3392
+3393
+3394
+3395
+3396
+3397
+3398
+3399
+3400
+3401
+3402
+3403
+3404
+3405
+3406
+3407
+3408
+3409
+3410
+3411
+3412
+3413
+3414
+3415
+3416
+3417
+3418
+3419
+3420
+3421
+3422
+3423
+3424
+3425
+3426
+3427
+3428
+3429
+3430
+3431
+3432
+3433
+3434
+3435
+3436
+3437
+3438
+3439
+3440
+3441
+3442
+3443
+3444
+3445
+3446
+3447
+3448
+3449
+3450
+3451
+3452
+3453
+3454
+3455
+3456
+3457
+3458
+3459
+3460
+3461
+3462
+3463
+3464
+3465
+3466
+3467
+3468
+3469
+3470
+3471
+3472
+3473
+3474
+3475
+3476
+3477
+3478
+3479
+3480
+3481
+3482
+3483
+3484
+3485
+3486
+3487
+3488
+3489
+3490
+3491
+3492
+3493
+3494
+3495
+3496
+3497
+3498
+3499
+3500
+3501
+3502
+3503
+3504
+3505
+3506
+3507
+3508
+3509
+3510
+3511
+3512
+3513
+3514
+3515
+3516
+3517
+3518
+3519
+3520
+3521
+3522
+3523
+3524
+3525
+3526
+3527
+3528
+3529
+3530
+3531
+3532
+3533
+3534
+3535
+3536
+3537
+3538
+3539
+3540
+3541
+3542
+3543
+3544
+3545
+3546
+3547
+3548
+3549
+3550
+3551
+3552
+3553
+3554
+3555
+3556
+3557
+3558
+3559
+3560
+3561
+3562
+3563
+3564
+3565
+3566
+3567
+3568
+3569
+3570
+3571
+3572
+3573
+3574
+3575
+3576
+3577
+3578
+3579
+3580
+3581
+3582
+3583
+3584
+3585
+3586
+3587
+3588
+3589
+3590
+3591
+3592
+3593
+3594
+3595
+3596
+3597
+3598
+3599
+3600
+3601
+3602
+3603
+3604
+3605
+3606
+3607
+3608
+3609
+3610
+3611
+3612
+3613
+3614
+3615
+3616
+3617
+3618
+3619
+3620
+3621
+3622
+3623
+3624
+3625
+3626
+3627
+3628
+3629
+3630
+3631
+3632
+3633
+3634
+3635
+3636
+3637
+3638
+3639
+3640
+3641
+3642
+3643
+3644
+3645
+3646
+3647
+3648
+3649
+3650
+3651
+3652
+3653
+3654
+3655
+3656
+3657
+3658
+3659
+3660
+3661
+3662
+3663
+3664
+3665
+3666
+3667
+3668
+3669
+3670
+3671
+3672
+3673
+3674
+3675
+3676
+3677
+3678
+3679
+3680
+3681
+3682
+3683
+3684
+3685
+3686
+3687
+3688
+3689
+3690
+3691
+3692
+3693
+3694
+3695
+3696
+3697
+3698
+3699
+3700
+3701
+3702
+3703
+3704
+3705
+3706
+3707
+3708
+3709
+3710
+3711
+3712
+3713
+3714
+3715
+3716
+3717
+3718
+3719
+3720
+3721
+3722
+3723
+3724
+3725
+3726
+3727
+3728
+3729
+3730
+3731
+3732
+3733
+3734
+3735
+3736
+3737
+3738
+3739
+3740
+3741
+3742
+3743
+3744
+3745
+3746
+3747
+3748
+3749
+3750
+3751
+3752
+3753
+3754
+3755
+3756
+3757
+3758
+3759
+3760
+3761
+3762
+3763
+3764
+3765
+3766
+3767
+3768
+3769
+3770
+3771
+3772
+3773
+3774
+3775
+3776
+3777
+3778
+3779
+3780
+3781
+3782
+3783
+3784
+3785
+3786
+3787
+3788
+3789
+3790
+3791
+3792
+3793
+3794
+3795
+3796
+3797
+3798
+3799
+3800
+3801
+3802
+3803
+3804
+3805
+3806
+3807
+3808
+3809
+3810
+3811
+3812
+3813
+3814
+3815
+3816
+3817
+3818
+3819
+3820
+3821
+3822
+3823
+3824
+3825
+3826
+3827
+3828
+3829
+3830
+3831
+3832
+3833
+3834
+3835
+3836
+3837
+3838
+3839
+3840
+3841
+3842
+3843
+3844
+3845
+3846
+3847
+3848
+3849
+3850
+3851
+3852
+3853
+3854
+3855
+3856
+3857
+3858
+3859
+3860
+3861
+3862
+3863
+3864
+3865
+3866
+3867
+3868
+3869
+3870
+3871
+3872
+3873
+3874
+3875
+3876
+3877
+3878
+3879
+3880
+3881
+3882
+3883
+3884
+3885
+3886
+3887
+3888
+3889
+3890
+3891
+3892
+3893
+3894
+3895
+3896
+3897
+3898
+3899
+3900
+3901
+3902
+3903
+3904
+3905
+3906
+3907
+3908
+3909
+3910
+3911
+3912
+3913
+3914
+3915
+3916
+3917
+3918
+3919
+3920
+3921
+3922
+3923
+3924
+3925
+3926
+3927
+3928
+3929
+3930
+3931
+3932
+3933
+3934
+3935
+3936
+3937
+3938
+3939
+3940
+3941
+3942
+3943
+3944
+3945
+3946
+3947
+3948
+3949
+3950
+3951
+3952
+3953
+3954
+3955
+3956
+3957
+3958
+3959
+3960
+3961
+3962
+3963
+3964
+3965
+3966
+3967
+3968
+3969
+3970
+3971
+3972
+3973
+3974
+3975
+3976
+3977
+3978
+3979
+3980
+3981
+3982
+3983
+3984
+3985
+3986
+3987
+3988
+3989
+3990
+3991
+3992
+3993
+3994
+3995
+3996
+3997
+3998
+3999
+4000
+4001
+4002
+4003
+4004
+4005
+4006
+4007
+4008
+4009
+4010
+4011
+4012
+4013
+4014
+4015
+4016
+4017
+4018
+4019
+4020
+4021
+4022
+4023
+4024
+4025
+4026
+4027
+4028
+4029
+4030
+4031
+4032
+4033
+4034
+4035
+4036
+4037
+4038
+4039
+4040
+4041
+4042
+4043
+4044
+4045
+4046
+4047
+4048
+4049
+4050
+4051
+4052
+4053
+4054
+4055
+4056
+4057
+4058
+4059
+4060
+4061
+4062
+4063
+4064
+4065
+4066
+4067
+4068
+4069
+4070
+4071
+4072
+4073
+4074
+4075
+4076
+4077
+4078
+4079
+4080
+4081
+4082
+4083
+4084
+4085
+4086
+4087
+4088
+4089
+4090
+4091
+4092
+4093
+4094
+4095
+4096
+4097
+4098
+4099
+4100
+4101
+4102
+4103
+4104
+4105
+4106
+4107
+4108
+4109
+4110
+4111
+4112
+4113
+4114
+4115
+4116
+4117
+4118
+4119
+4120
+4121
+4122
+4123
+4124
+4125
+4126
+4127
+4128
+4129
+4130
+4131
+4132
+4133
+4134
+4135
+4136
+4137
+4138
+4139
+4140
+4141
+4142
+4143
+4144
+4145
+4146
+4147
+4148
+4149
+4150
+4151
+4152
+4153
+4154
+4155
+4156
+4157
+4158
+4159
+4160
+4161
+4162
+4163
+4164
+4165
+4166
+4167
+4168
+4169
+4170
+4171
+4172
+4173
+4174
+4175
+4176
+4177
+4178
+4179
+4180
+4181
+4182
+4183
+4184
+4185
+4186
+4187
+4188
+4189
+4190
+4191
+4192
+4193
+4194
+4195
+4196
+4197
+4198
+4199
+4200
+4201
+4202
+4203
+4204
+4205
+4206
+4207
+4208
+4209
+4210
+4211
+4212
+4213
+4214
+4215
+4216
+4217
+4218
+4219
+4220
+4221
+4222
+4223
+4224
+4225
+4226
+4227
+4228
+4229
+4230
+4231
+4232
+4233
+4234
+4235
+4236
+4237
+4238
+4239
+4240
+4241
+4242
+4243
+4244
+4245
+4246
+4247
+4248
+4249
+4250
+4251
+4252
+4253
+4254
+4255
+4256
+4257
+4258
+4259
+4260
+4261
+4262
+4263
+4264
+4265
+4266
+4267
+4268
+4269
+4270
+4271
+4272
+4273
+4274
+4275
+4276
+4277
+4278
+4279
+4280
+4281
+4282
+4283
+4284
+4285
+4286
+4287
+4288
+4289
+4290
+4291
+4292
+4293
+4294
+4295
+4296
+4297
+4298
+4299
+4300
+4301
+4302
+4303
+4304
+4305
+4306
+4307
+4308
+4309
+4310
+4311
+4312
+4313
+4314
+4315
+4316
+4317
+4318
+4319
+4320
+4321
+4322
+4323
+4324
+4325
+4326
+4327
+4328
+4329
+4330
+4331
+4332
+4333
+4334
+4335
+4336
+4337
+4338
+4339
+4340
+4341
+4342
+4343
+4344
+4345
+4346
+4347
+4348
+4349
+4350
+4351
+4352
+4353
+4354
+4355
+4356
+4357
+4358
+4359
+4360
+4361
+4362
+4363
+4364
+4365
+4366
+4367
+4368
+4369
+4370
+4371
+4372
+4373
+4374
+4375
+4376
+4377
+4378
+4379
+4380
+4381
+4382
+4383
+4384
+4385
+4386
+4387
+4388
+4389
+4390
+4391
+4392
+4393
+4394
+4395
+4396
+4397
+4398
+4399
+4400
+4401
+4402
+4403
+4404
+4405
+4406
+4407
+4408
+4409
+4410
+4411
+4412
+4413
+4414
+4415
+4416
+4417
+4418
+4419
+4420
+4421
+4422
+4423
+4424
+4425
+4426
+4427
+4428
+4429
+4430
+4431
+4432
+4433
+4434
+4435
+4436
+4437
+4438
+4439
+4440
+4441
+4442
+4443
+4444
+4445
+4446
+4447
+4448
+4449
+4450
+4451
+4452
+4453
+4454
+4455
+4456
+4457
+4458
+4459
+4460
+4461
+4462
+4463
+4464
+4465
+4466
+4467
+4468
+4469
+4470
+4471
+4472
+4473
+4474
+4475
+4476
+4477
+4478
+4479
+4480
+4481
+4482
+4483
+4484
+4485
+4486
+4487
+4488
+4489
+4490
+4491
+4492
+4493
+4494
+4495
+4496
+4497
+4498
+4499
+4500
+4501
+4502
+4503
+4504
+4505
+4506
+4507
+4508
+4509
+4510
+4511
+4512
+4513
+4514
+4515
+4516
+4517
+4518
+4519
+4520
+4521
+4522
+4523
+4524
+4525
+4526
+4527
+4528
+4529
+4530
+4531
+4532
+4533
+4534
+4535
+4536
+4537
+4538
+4539
+4540
+4541
+4542
+4543
+4544
+4545
+4546
+4547
+4548
+4549
+4550
+4551
+4552
+4553
+4554
+4555
+4556
+4557
+4558
+4559
+4560
+4561
+4562
+4563
+4564
+4565
+4566
+4567
+4568
+4569
+4570
+4571
+4572
+4573
+4574
+4575
+4576
+4577
+4578
+4579
+4580
+4581
+4582
+4583
+4584
+4585
+4586
+4587
+4588
+4589
+4590
+4591
+4592
+4593
+4594
+4595
+4596
+4597
+4598
+4599
+4600
+4601
+4602
+4603
+4604
+4605
+4606
+4607
+4608
+4609
+4610
+4611
+4612
+4613
+4614
+4615
+4616
+4617
+4618
+4619
+4620
+4621
+4622
+4623
+4624
+4625
+4626
+4627
+4628
+4629
+4630
+4631
+4632
+4633
+4634
+4635
+4636
+4637
+4638
+4639
+4640
+4641
+4642
+4643
+4644
+4645
+4646
+4647
+4648
+4649
+4650
+4651
+4652
+4653
+4654
+4655
+4656
+4657
+4658
+4659
+4660
+4661
+4662
+4663
+4664
+4665
+4666
+4667
+4668
+4669
+4670
+4671
+4672
+4673
+4674
+4675
+4676
+4677
+4678
+4679
+4680
+4681
+4682
+4683
+4684
+4685
+4686
+4687
+4688
+4689
+4690
+4691
+4692
+4693
+4694
+4695
+4696
+4697
+4698
+4699
+4700
+4701
+4702
+4703
+4704
+4705
+4706
+4707
+4708
+4709
+4710
+4711
+4712
+4713
+4714
+4715
+4716
+4717
+4718
+4719
+4720
+4721
+4722
+4723
+4724
+4725
+4726
+4727
+4728
+4729
+4730
+4731
+4732
+4733
+4734
+4735
+4736
+4737
+4738
+4739
+4740
+4741
+4742
+4743
+4744
+4745
+4746
+4747
+4748
+4749
+4750
+4751
+4752
+4753
+4754
+4755
+4756
+4757
+4758
+4759
+4760
+4761
+4762
+4763
+4764
+4765
+4766
+4767
+4768
+4769
+4770
+4771
+4772
+4773
+4774
+4775
+4776
+4777
+4778
+4779
+4780
+4781
+4782
+4783
+4784
+4785
+4786
+4787
+4788
+4789
+4790
+4791
+4792
+4793
+4794
+4795
+4796
+4797
+4798
+4799
+4800
+4801
+4802
+4803
+4804
+4805
+4806
+4807
+4808
+4809
+4810
+4811
+4812
+4813
+4814
+4815
+4816
+4817
+4818
+4819
+4820
+4821
+4822
+4823
+4824
+4825
+4826
+4827
+4828
+4829
+4830
+4831
+4832
+4833
+4834
+4835
+4836
+4837
+4838
+4839
+4840
+4841
+4842
+4843
+4844
+4845
+4846
+4847
+4848
+4849
+4850
+4851
+4852
+4853
+4854
+4855
+4856
+4857
+4858
+4859
+4860
+4861
+4862
+4863
+4864
+4865
+4866
+4867
+4868
+4869
+4870
+4871
+4872
+4873
+4874
+4875
+4876
+4877
+4878
+4879
+4880
+4881
+4882
+4883
+4884
+4885
+4886
+4887
+4888
+4889
+4890
+4891
+4892
+4893
+4894
+4895
+4896
+4897
+4898
+4899
+4900
+4901
+4902
+4903
+4904
+4905
+4906
+4907
+4908
+4909
+4910
+4911
+4912
+4913
+4914
+4915
+4916
+4917
+4918
+4919
+4920
+4921
+4922
+4923
+4924
+4925
+4926
+4927
+4928
+4929
+4930
+4931
+4932
+4933
+4934
+4935
+4936
+4937
+4938
+4939
+4940
+4941
+4942
+4943
+4944
+4945
+4946
+4947
+4948
+4949
+4950
+4951
+4952
+4953
+4954
+4955
+4956
+4957
+4958
+4959
+4960
+4961
+4962
+4963
+4964
+4965
+4966
+4967
+4968
+4969
+4970
+4971
+4972
+4973
+4974
+4975
+4976
+4977
+4978
+4979
+4980
+4981
+4982
+4983
+4984
+4985
+4986
+4987
+4988
+4989
+4990
+4991
+4992
+4993
+4994
+4995
+4996
+4997
+4998
+4999
+5000
+5001
+5002
+5003
+5004
+5005
+5006
+5007
+5008
+5009
+5010
+5011
+5012
+5013
+5014
+5015
+5016
+5017
+5018
+5019
+5020
+5021
+5022
+5023
+5024
+5025
+5026
+5027
+5028
+5029
+5030
+5031
+5032
+5033
+5034
+5035
+5036
+5037
+5038
+5039
+5040
+5041
+5042
+5043
+5044
+5045
+5046
+5047
+5048
+5049
+5050
+5051
+5052
+5053
+5054
+5055
+5056
+5057
+5058
+5059
+5060
+5061
+5062
+5063
+5064
+5065
+5066
+5067
+5068
+5069
+5070
+5071
+5072
+5073
+5074
+5075
+5076
+5077
+5078
+5079
+5080
+5081
+5082
+5083
+5084
+5085
+5086
+5087
+5088
+5089
+5090
+5091
+5092
+5093
+5094
+5095
+5096
+5097
+5098
+5099
+5100
+5101
+5102
+5103
+5104
+5105
+5106
+5107
+5108
+5109
+5110
+5111
+5112
+5113
+5114
+5115
+5116
+5117
+5118
+5119
+5120
+5121
+5122
+5123
+5124
+5125
+5126
+5127
+5128
+5129
+5130
+5131
+5132
+5133
+5134
+5135
+5136
+5137
+5138
+5139
+5140
+5141
+5142
+5143
+5144
+5145
+5146
+5147
+5148
+5149
+5150
+5151
+5152
+5153
+5154
+5155
+5156
+5157
+5158
+5159
+5160
+5161
+5162
+5163
+5164
+5165
+5166
+5167
+5168
+5169
+5170
+5171
+5172
+5173
+5174
+5175
+5176
+5177
+5178
+5179
+5180
+5181
+5182
+5183
+5184
+5185
+5186
+5187
+5188
+5189
+5190
+5191
+5192
+5193
+5194
+5195
+5196
+5197
+5198
+5199
+5200
+5201
+5202
+5203
+5204
+5205
+5206
+5207
+5208
+5209
+5210
+5211
+5212
+5213
+5214
+5215
+5216
+5217
+5218
+5219
+5220
+5221
+5222
+5223
+5224
+5225
+5226
+5227
+5228
+5229
+5230
+5231
+5232
+5233
+5234
+5235
+5236
+5237
+5238
+5239
+5240
+5241
+5242
+5243
+5244
+5245
+5246
+5247
+5248
+5249
+5250
+5251
+5252
+5253
+5254
+5255
+5256
+5257
+5258
+5259
+5260
+5261
+5262
+5263
+5264
+5265
+5266
+5267
+5268
+5269
+5270
+5271
+5272
+5273
+5274
+5275
+5276
+5277
+5278
+5279
+5280
+5281
+5282
+5283
+5284
+5285
+5286
+5287
+5288
+5289
+5290
+5291
+5292
+5293
+5294
+5295
+5296
+5297
+5298
+5299
+5300
+5301
+5302
+5303
+5304
+5305
+5306
+5307
+5308
+5309
+5310
+5311
+5312
+5313
+5314
+5315
+5316
+5317
+5318
+5319
+5320
+5321
+5322
+5323
+5324
+5325
+5326
+5327
+5328
+5329
+5330
+5331
+5332
+5333
+5334
+5335
+5336
+5337
+5338
+5339
+5340
+5341
+5342
+5343
+5344
+5345
+5346
+5347
+5348
+5349
+5350
+5351
+5352
+5353
+5354
+5355
+5356
+5357
+5358
+5359
+5360
+5361
+5362
+5363
+5364
+5365
+5366
+5367
+5368
+5369
+5370
+5371
+5372
+5373
+5374
+5375
+5376
+5377
+5378
+5379
+5380
+5381
+5382
+5383
+5384
+5385
+5386
+5387
+5388
+5389
+5390
+5391
+5392
+5393
+5394
+5395
+5396
+5397
+5398
+5399
+5400
+5401
+5402
+5403
+5404
+5405
+5406
+5407
+5408
+5409
+5410
+5411
+5412
+5413
+5414
+5415
+5416
+5417
+5418
+5419
+5420
+5421
+5422
+5423
+5424
+5425
+5426
+5427
+5428
+5429
+5430
+5431
+5432
+5433
+5434
+5435
+5436
+5437
+5438
+5439
+5440
+5441
+5442
+5443
+5444
+5445
+5446
+5447
+5448
+5449
+5450
+5451
+5452
+5453
+5454
+5455
+5456
+5457
+5458
+5459
+5460
+5461
+5462
+5463
+5464
+5465
+5466
+5467
+5468
+5469
+5470
+5471
+5472
+5473
+5474
+5475
+5476
+5477
+5478
+5479
+5480
+5481
+5482
+5483
+5484
+5485
+5486
+5487
+5488
+5489
+5490
+5491
+5492
+5493
+5494
+5495
+5496
+5497
+5498
+5499
+5500
+5501
+5502
+5503
+5504
+5505
+5506
+5507
+5508
+5509
+5510
+5511
+5512
+5513
+5514
+5515
+5516
+5517
+5518
+5519
+5520
+5521
+5522
+5523
+5524
+5525
+5526
+5527
+5528
+5529
+5530
+5531
+5532
+5533
+5534
+5535
+5536
+5537
+5538
+5539
+5540
+5541
+5542
+5543
+5544
+5545
+5546
+5547
+5548
+5549
+5550
+5551
+5552
+5553
+5554
+5555
+5556
+5557
+5558
+5559
+5560
+5561
+5562
+5563
+5564
+5565
+5566
+5567
+5568
+5569
+5570
+5571
+5572
+5573
+5574
+5575
+5576
+5577
+5578
+5579
+5580
+5581
+5582
+5583
+5584
+5585
+5586
+5587
+5588
+5589
+5590
+5591
+5592
+5593
+5594
+5595
+5596
+5597
+5598
+5599
+5600
+5601
+5602
+5603
+5604
+5605
+5606
+5607
+5608
+5609
+5610
+5611
+5612
+5613
+5614
+5615
+5616
+5617
+5618
+5619
+5620
+5621
+5622
+5623
+5624
+5625
+5626
+5627
+5628
+5629
+5630
+5631
+5632
+5633
+5634
+5635
+5636
+5637
+5638
+5639
+5640
+5641
+5642
+5643
+5644
+5645
+5646
+5647
+5648
+5649
+5650
+5651
+5652
+5653
+5654
+5655
+5656
+5657
+5658
+5659
+5660
+5661
+5662
+5663
+5664
+5665
+5666
+5667
+5668
+5669
+5670
+5671
+5672
+5673
+5674
+5675
+5676
+5677
+5678
+5679
+5680
+5681
+5682
+5683
+5684
+5685
+5686
+5687
+5688
+5689
+5690
+5691
+5692
+5693
+5694
+5695
+5696
+5697
+5698
+5699
+5700
+5701
+5702
+5703
+5704
+5705
+5706
+5707
+5708
+5709
+5710
+5711
+5712
+5713
+5714
+5715
+5716
+5717
+5718
+5719
+5720
+5721
+5722
+5723
+5724
+5725
+5726
+5727
+5728
+5729
+5730
+5731
+5732
+5733
+5734
+5735
+5736
+5737
+5738
+5739
+5740
+5741
+5742
+5743
+5744
+5745
+5746
+5747
+5748
+5749
+5750
+5751
+5752
+5753
+5754
+5755
+5756
+5757
+5758
+5759
+5760
+5761
+5762
+5763
+5764
+5765
+5766
+5767
+5768
+5769
+5770
+5771
+5772
+5773
+5774
+5775
+5776
+5777
+5778
+5779
+5780
+5781
+5782
+5783
+5784
+5785
+5786
+5787
+5788
+5789
+5790
+5791
+5792
+5793
+5794
+5795
+5796
+5797
+5798
+5799
+5800
+5801
+5802
+5803
+5804
+5805
+5806
+5807
+5808
+5809
+5810
+5811
+5812
+5813
+5814
+5815
+5816
+5817
+5818
+5819
+5820
+5821
+5822
+5823
+5824
+5825
+5826
+5827
+5828
+5829
+5830
+5831
+5832
+5833
+5834
+5835
+5836
+5837
+5838
+5839
+5840
+5841
+5842
+5843
+5844
+5845
+5846
+5847
+5848
+5849
+5850
+5851
+5852
+5853
+5854
+5855
+5856
+5857
+5858
+5859
+5860
+5861
+5862
+5863
+5864
+5865
+5866
+5867
+5868
+5869
+5870
+5871
+5872
+5873
+5874
+5875
+5876
+5877
+5878
+5879
+5880
+5881
+5882
+5883
+5884
+5885
+5886
+5887
+5888
+5889
+5890
+5891
+5892
+5893
+5894
+5895
+5896
+5897
+5898
+5899
+5900
+5901
+5902
+5903
+5904
+5905
+5906
+5907
+5908
+5909
+5910
+5911
+5912
+5913
+5914
+5915
+5916
+5917
+5918
+5919
+5920
+5921
+5922
+5923
+5924
+5925
+5926
+5927
+5928
+5929
+5930
+5931
+5932
+5933
+5934
+5935
+5936
+5937
+5938
+5939
+5940
+5941
+5942
+5943
+5944
+5945
+5946
+5947
+5948
+5949
+5950
+5951
+5952
+5953
+5954
+5955
+5956
+5957
+5958
+5959
+5960
+5961
+5962
+5963
+5964
+5965
+5966
+5967
+5968
+5969
+5970
+5971
+5972
+5973
+5974
+5975
+5976
+5977
+5978
+5979
+5980
+5981
+5982
+5983
+5984
+5985
+5986
+5987
+5988
+5989
+5990
+5991
+5992
+5993
+5994
+5995
+5996
+5997
+5998
+5999
+6000
+6001
+6002
+6003
+6004
+6005
+6006
+6007
+6008
+6009
+6010
+6011
+6012
+6013
+6014
+6015
+6016
+6017
+6018
+6019
+6020
+6021
+6022
+6023
+6024
+6025
+6026
+6027
+6028
+6029
+6030
+6031
+6032
+6033
+6034
+6035
+6036
+6037
+6038
+6039
+6040
+6041
+6042
+6043
+6044
+6045
+6046
+6047
+6048
+6049
+6050
+6051
+6052
+6053
+6054
+6055
+6056
+6057
+6058
+6059
+6060
+6061
+6062
+6063
+6064
+6065
+6066
+6067
+6068
+6069
+6070
+6071
+6072
+6073
+6074
+6075
+6076
+6077
+6078
+6079
+6080
+6081
+6082
+6083
+6084
+6085
+6086
+6087
+6088
+6089
+6090
+6091
+6092
+6093
+6094
+6095
+6096
+6097
+6098
+6099
+6100
+6101
+6102
+6103
+6104
+6105
+6106
+6107
+6108
+6109
+6110
+6111
+6112
+6113
+6114
+6115
+6116
+6117
+6118
+6119
+6120
+6121
+6122
+6123
+6124
+6125
+6126
+6127
+6128
+6129
+6130
+6131
+6132
+6133
+6134
+6135
+6136
+6137
+6138
+6139
+6140
+6141
+6142
+6143
+6144
+6145
+6146
+6147
+6148
+6149
+6150
+6151
+6152
+6153
+6154
+6155
+6156
+6157
+6158
+6159
+6160
+6161
+6162
+6163
+6164
+6165
+6166
+6167
+6168
+6169
+6170
+6171
+6172
+6173
+6174
+6175
+6176
+6177
+6178
+6179
+6180
+6181
+6182
+6183
+6184
+6185
+6186
+6187
+6188
+6189
+6190
+6191
+6192
+6193
+6194
+6195
+6196
+6197
+6198
+6199
+6200
+6201
+6202
+6203
+6204
+6205
+6206
+6207
+6208
+6209
+6210
+6211
+6212
+6213
+6214
+6215
+6216
+6217
+6218
+6219
+6220
+6221
+6222
+6223
+6224
+6225
+6226
+6227
+6228
+6229
+6230
+6231
+6232
+6233
+6234
+6235
+6236
+6237
+6238
+6239
+6240
+6241
+6242
+6243
+6244
+6245
+6246
+6247
+6248
+6249
+6250
+6251
+6252
+6253
+6254
+6255
+6256
+6257
+6258
+6259
+6260
+6261
+6262
+6263
+6264
+6265
+6266
+6267
+6268
+6269
+6270
+6271
+6272
+6273
+6274
+6275
+6276
+6277
+6278
+6279
+6280
+6281
+6282
+6283
+6284
+6285
+6286
+6287
+6288
+6289
+6290
+6291
+6292
+6293
+6294
+6295
+6296
+6297
+6298
+6299
+6300
+6301
+6302
+6303
+6304
+6305
+6306
+6307
+6308
+6309
+6310
+6311
+6312
+6313
+6314
+6315
+6316
+6317
+6318
+6319
+6320
+6321
+6322
+6323
+6324
+6325
+6326
+6327
+6328
+6329
+6330
+6331
+6332
+6333
+6334
+6335
+6336
+6337
+6338
+6339
+6340
+6341
+6342
+6343
+6344
+6345
+6346
+6347
+6348
+6349
+6350
+6351
+6352
+6353
+6354
+6355
+6356
+6357
+6358
+6359
+6360
+6361
+6362
+6363
+6364
+6365
+6366
+6367
+6368
+6369
+6370
+6371
+6372
+6373
+6374
+6375
+6376
+6377
+6378
+6379
+6380
+6381
+6382
+6383
+6384
+6385
+6386
+6387
+6388
+6389
+6390
+6391
+6392
+6393
+6394
+6395
+6396
+6397
+6398
+6399
+6400
+6401
+6402
+6403
+6404
+6405
+6406
+6407
+6408
+6409
+6410
+6411
+6412
+6413
+6414
+6415
+6416
+6417
+6418
+6419
+6420
+6421
+6422
+6423
+6424
+6425
+6426
+6427
+6428
+6429
+6430
+6431
+6432
+6433
+6434
+6435
+6436
+6437
+6438
+6439
+6440
+6441
+6442
+6443
+6444
+6445
+6446
+6447
+6448
+6449
+6450
+6451
+6452
+6453
+6454
+6455
+6456
+6457
+6458
+6459
+6460
+6461
+6462
+6463
+6464
+6465
+6466
+6467
+6468
+6469
+6470
+6471
+6472
+6473
+6474
+6475
+6476
+6477
+6478
+6479
+6480
+6481
+6482
+6483
+6484
+6485
+6486
+6487
+6488
+6489
+6490
+6491
+6492
+6493
+6494
+6495
+6496
+6497
+6498
+6499
+6500
+6501
+6502
+6503
+6504
+6505
+6506
+6507
+6508
+6509
+6510
+6511
+6512
+6513
+6514
+6515
+6516
+6517
+6518
+6519
+6520
+6521
+6522
+6523
+6524
+6525
+6526
+6527
+6528
+6529
+6530
+6531
+6532
+6533
+6534
+6535
+6536
+6537
+6538
+6539
+6540
+6541
+6542
+6543
+6544
+6545
+6546
+6547
+6548
+6549
+6550
+6551
+6552
+6553
+6554
+6555
+6556
+6557
+6558
+6559
+6560
+6561
+6562
+6563
+6564
+6565
+6566
+6567
+6568
+6569
+6570
+6571
+6572
+6573
+6574
+6575
+6576
+6577
+6578
+6579
+6580
+6581
+6582
+6583
+6584
+6585
+6586
+6587
+6588
+6589
+6590
+6591
+6592
+6593
+6594
+6595
+6596
+6597
+6598
+6599
+6600
+6601
+6602
+6603
+6604
+6605
+6606
+6607
+6608
+6609
+6610
+6611
+6612
+6613
+6614
+6615
+6616
+6617
+6618
+6619
+6620
+6621
+6622
+6623
+6624
+6625
+6626
+6627
+6628
+6629
+6630
+6631
+6632
+6633
+6634
+6635
+6636
+6637
+6638
+6639
+6640
+6641
+6642
+6643
+6644
+6645
+6646
+6647
+6648
+6649
+6650
+6651
+6652
+6653
+6654
+6655
+6656
+6657
+6658
+6659
+6660
+6661
+6662
+6663
+6664
+6665
+6666
+6667
+6668
+6669
+6670
+6671
+6672
+6673
+6674
+6675
+6676
+6677
+6678
+6679
+6680
+6681
+6682
+6683
+6684
+6685
+6686
+6687
+6688
+6689
+6690
+6691
+6692
+6693
+6694
+6695
+6696
+6697
+6698
+6699
+6700
+6701
+6702
+6703
+6704
+6705
+6706
+6707
+6708
+6709
+6710
+6711
+6712
+6713
+6714
+6715
+6716
+6717
+6718
+6719
+6720
+6721
+6722
+6723
+6724
+6725
+6726
+6727
+6728
+6729
+6730
+6731
+6732
+6733
+6734
+6735
+6736
+6737
+6738
+6739
+6740
+6741
+6742
+6743
+6744
+6745
+6746
+6747
+6748
+6749
+6750
+6751
+6752
+6753
+6754
+6755
+6756
+6757
+6758
+6759
+6760
+6761
+6762
+6763
+6764
+6765
+6766
+6767
+6768
+6769
+6770
+6771
+6772
+6773
+6774
+6775
+6776
+6777
+6778
+6779
+6780
+6781
+6782
+6783
+6784
+6785
+6786
+6787
+6788
+6789
+6790
+6791
+6792
+6793
+6794
+6795
+6796
+6797
+6798
+6799
+6800
+6801
+6802
+6803
+6804
+6805
+6806
+6807
+6808
+6809
+6810
+6811
+6812
+6813
+6814
+6815
+6816
+6817
+6818
+6819
+6820
+6821
+6822
+6823
+6824
+6825
+6826
+6827
+6828
+6829
+6830
+6831
+6832
+6833
+6834
+6835
+6836
+6837
+6838
+6839
+6840
+6841
+6842
+6843
+6844
+6845
+6846
+6847
+6848
+6849
+6850
+6851
+6852
+6853
+6854
+6855
+6856
+6857
+6858
+6859
+6860
+6861
+6862
+6863
+6864
+6865
+6866
+6867
+6868
+6869
+6870
+6871
+6872
+6873
+6874
+6875
+6876
+6877
+6878
+6879
+6880
+6881
+6882
+6883
+6884
+6885
+6886
+6887
+6888
+6889
+6890
+6891
+6892
+6893
+6894
+6895
+6896
+6897
+6898
+6899
+6900
+6901
+6902
+6903
+6904
+6905
+6906
+6907
+6908
+6909
+6910
+6911
+6912
+6913
+6914
+6915
+6916
+6917
+6918
+6919
+6920
+6921
+6922
+6923
+6924
+6925
+6926
+6927
+6928
+6929
+6930
+6931
+6932
+6933
+6934
+6935
+6936
+6937
+6938
+6939
+6940
+6941
+6942
+6943
+6944
+6945
+6946
+6947
+6948
+6949
+6950
+6951
+6952
+6953
+6954
+6955
+6956
+6957
+6958
+6959
+6960
+6961
+6962
+6963
+6964
+6965
+6966
+6967
+6968
+6969
+6970
+6971
+6972
+6973
+6974
+6975
+6976
+6977
+6978
+6979
+6980
+6981
+6982
+6983
+6984
+6985
+6986
+6987
+6988
+6989
+6990
+6991
+6992
+6993
+6994
+6995
+6996
+6997
+6998
+6999
+7000
+7001
+7002
+7003
+7004
+7005
+7006
+7007
+7008
+7009
+7010
+7011
+7012
+7013
+7014
+7015
+7016
+7017
+7018
+7019
+7020
+7021
+7022
+7023
+7024
+7025
+7026
+7027
+7028
+7029
+7030
+7031
+7032
+7033
+7034
+7035
+7036
+7037
+7038
+7039
+7040
+7041
+7042
+7043
+7044
+7045
+7046
+7047
+7048
+7049
+7050
+7051
+7052
+7053
+7054
+7055
+7056
+7057
+7058
+7059
+7060
+7061
+7062
+7063
+7064
+7065
+7066
+7067
+7068
+7069
+7070
+7071
+7072
+7073
+7074
+7075
+7076
+7077
+7078
+7079
+7080
+7081
+7082
+7083
+7084
+7085
+7086
+7087
+7088
+7089
+7090
+7091
+7092
+7093
+7094
+7095
+7096
+7097
+7098
+7099
+7100
+7101
+7102
+7103
+7104
+7105
+7106
+7107
+7108
+7109
+7110
+7111
+7112
+7113
+7114
+7115
+7116
+7117
+7118
+7119
+7120
+7121
+7122
+7123
+7124
+7125
+7126
+7127
+7128
+7129
+7130
+7131
+7132
+7133
+7134
+7135
+7136
+7137
+7138
+7139
+7140
+7141
+7142
+7143
+7144
+7145
+7146
+7147
+7148
+7149
+7150
+7151
+7152
+7153
+7154
+7155
+7156
+7157
+7158
+7159
+7160
+7161
+7162
+7163
+7164
+7165
+7166
+7167
+7168
+7169
+7170
+7171
+7172
+7173
+7174
+7175
+7176
+7177
+7178
+7179
+7180
+7181
+7182
+7183
+7184
+7185
+7186
+7187
+7188
+7189
+7190
+7191
+7192
+7193
+7194
+7195
+7196
+7197
+7198
+7199
+7200
+7201
+7202
+7203
+7204
+7205
+7206
+7207
+7208
+7209
+7210
+7211
+7212
+7213
+7214
+7215
+7216
+7217
+7218
+7219
+7220
+7221
+7222
+7223
+7224
+7225
+7226
+7227
+7228
+7229
+7230
+7231
+7232
+7233
+7234
+7235
+7236
+7237
+7238
+7239
+7240
+7241
+7242
+7243
+7244
+7245
+7246
+7247
+7248
+7249
+7250
+7251
+7252
+7253
+7254
+7255
+7256
+7257
+7258
+7259
+7260
+7261
+7262
+7263
+7264
+7265
+7266
+7267
+7268
+7269
+7270
+7271
+7272
+7273
+7274
+7275
+7276
+7277
+7278
+7279
+7280
+7281
+7282
+7283
+7284
+7285
+7286
+7287
+7288
+7289
+7290
+7291
+7292
+7293
+7294
+7295
+7296
+7297
+7298
+7299
+7300
+7301
+7302
+7303
+7304
+7305
+7306
+7307
+7308
+7309
+7310
+7311
+7312
+7313
+7314
+7315
+7316
+7317
+7318
+7319
+7320
+7321
+7322
+7323
+7324
+7325
+7326
+7327
+7328
+7329
+7330
+7331
+7332
+7333
+7334
+7335
+7336
+7337
+7338
+7339
+7340
+7341
+7342
+7343
+7344
+7345
+7346
+7347
+7348
+7349
+7350
+7351
+7352
+7353
+7354
+7355
+7356
+7357
+7358
+7359
+7360
+7361
+7362
+7363
+7364
+7365
+7366
+7367
+7368
+7369
+7370
+7371
+7372
+7373
+7374
+7375
+7376
+7377
+7378
+7379
+7380
+7381
+7382
+7383
+7384
+7385
+7386
+7387
+7388
+7389
+7390
+7391
+7392
+7393
+7394
+7395
+7396
+7397
+7398
+7399
+7400
+7401
+7402
+7403
+7404
+7405
+7406
+7407
+7408
+7409
+7410
+7411
+7412
+7413
+7414
+7415
+7416
+7417
+7418
+7419
+7420
+7421
+7422
+7423
+7424
+7425
+7426
+7427
+7428
+7429
+7430
+7431
+7432
+7433
+7434
+7435
+7436
+7437
+7438
+7439
+7440
+7441
+7442
+7443
+7444
+7445
+7446
+7447
+7448
+7449
+7450
+7451
+7452
+7453
+7454
+7455
+7456
+7457
+7458
+7459
+7460
+7461
+7462
+7463
+7464
+7465
+7466
+7467
+7468
+7469
+7470
+7471
+7472
+7473
+7474
+7475
+7476
+7477
+7478
+7479
+7480
+7481
+7482
+7483
+7484
+7485
+7486
+7487
+7488
+7489
+7490
+7491
+7492
+7493
+7494
+7495
+7496
+7497
+7498
+7499
+7500
+7501
+7502
+7503
+7504
+7505
+7506
+7507
+7508
+7509
+7510
+7511
+7512
+7513
+7514
+7515
+7516
+7517
+7518
+7519
+7520
+7521
+7522
+7523
+7524
+7525
+7526
+7527
+7528
+7529
+7530
+7531
+7532
+7533
+7534
+7535
+7536
+7537
+7538
+7539
+7540
+7541
+7542
+7543
+7544
+7545
+7546
+7547
+7548
+7549
+7550
+7551
+7552
+7553
+7554
+7555
+7556
+7557
+7558
+7559
+7560
+7561
+7562
+7563
+7564
+7565
+7566
+7567
+7568
+7569
+7570
+7571
+7572
+7573
+7574
+7575
+7576
+7577
+7578
+7579
+7580
+7581
+7582
+7583
+7584
+7585
+7586
+7587
+7588
+7589
+7590
+7591
+7592
+7593
+7594
+7595
+7596
+7597
+7598
+7599
+7600
+7601
+7602
+7603
+7604
+7605
+7606
+7607
+7608
+7609
+7610
+7611
+7612
+7613
+7614
+7615
+7616
+7617
+7618
+7619
+7620
+7621
+7622
+7623
+7624
+7625
+7626
+7627
+7628
+7629
+7630
+7631
+7632
+7633
+7634
+7635
+7636
+7637
+7638
+7639
+7640
+7641
+7642
+7643
+7644
+7645
+7646
+7647
+7648
+7649
+7650
+7651
+7652
+7653
+7654
+7655
+7656
+7657
+7658
+7659
+7660
+7661
+7662
+7663
+7664
+7665
+7666
+7667
+7668
+7669
+7670
+7671
+7672
+7673
+7674
+7675
+7676
+7677
+7678
+7679
+7680
+7681
+7682
+7683
+7684
+7685
+7686
+7687
+7688
+7689
+7690
+7691
+7692
+7693
+7694
+7695
+7696
+7697
+7698
+7699
+7700
+7701
+7702
+7703
+7704
+7705
+7706
+7707
+7708
+7709
+7710
+7711
+7712
+7713
+7714
+7715
+7716
+7717
+7718
+7719
+7720
+7721
+7722
+7723
+7724
+7725
+7726
+7727
+7728
+7729
+7730
+7731
+7732
+7733
+7734
+7735
+7736
+7737
+7738
+7739
+7740
+7741
+7742
+7743
+7744
+7745
+7746
+7747
+7748
+7749
+7750
+7751
+7752
+7753
+7754
+7755
+7756
+7757
+7758
+7759
+7760
+7761
+7762
+7763
+7764
+7765
+7766
+7767
+7768
+7769
+7770
+7771
+7772
+7773
+7774
+7775
+7776
+7777
+7778
+7779
+7780
+7781
+7782
+7783
+7784
+7785
+7786
+7787
+7788
+7789
+7790
+7791
+7792
+7793
+7794
+7795
+7796
+7797
+7798
+7799
+7800
+7801
+7802
+7803
+7804
+7805
+7806
+7807
+7808
+7809
+7810
+7811
+7812
+7813
+7814
+7815
+7816
+7817
+7818
+7819
+7820
+7821
+7822
+7823
+7824
+7825
+7826
+7827
+7828
+7829
+7830
+7831
+7832
+7833
+7834
+7835
+7836
+7837
+7838
+7839
+7840
+7841
+7842
+7843
+7844
+7845
+7846
+7847
+7848
+7849
+7850
+7851
+7852
+7853
+7854
+7855
+7856
+7857
+7858
+7859
+7860
+7861
+7862
+7863
+7864
+7865
+7866
+7867
+7868
+7869
+7870
+7871
+7872
+7873
+7874
+7875
+7876
+7877
+7878
+7879
+7880
+7881
+7882
+7883
+7884
+7885
+7886
+7887
+7888
+7889
+7890
+7891
+7892
+7893
+7894
+7895
+7896
+7897
+7898
+7899
+7900
+7901
+7902
+7903
+7904
+7905
+7906
+7907
+7908
+7909
+7910
+7911
+7912
+7913
+7914
+7915
+7916
+7917
+7918
+7919
+7920
+7921
+7922
+7923
+7924
+7925
+7926
+7927
+7928
+7929
+7930
+7931
+7932
+7933
+7934
+7935
+7936
+7937
+7938
+7939
+7940
+7941
+7942
+7943
+7944
+7945
+7946
+7947
+7948
+7949
+7950
+7951
+7952
+7953
+7954
+7955
+7956
+7957
+7958
+7959
+7960
+7961
+7962
+7963
+7964
+7965
+7966
+7967
+7968
+7969
+7970
+7971
+7972
+7973
+7974
+7975
+7976
+7977
+7978
+7979
+7980
+7981
+7982
+7983
+7984
+7985
+7986
+7987
+7988
+7989
+7990
+7991
+7992
+7993
+7994
+7995
+7996
+7997
+7998
+7999
+8000
+8001
+8002
+8003
+8004
+8005
+8006
+8007
+8008
+8009
+8010
+8011
+8012
+8013
+8014
+8015
+8016
+8017
+8018
+8019
+8020
+8021
+8022
+8023
+8024
+8025
+8026
+8027
+8028
+8029
+8030
+8031
+8032
+8033
+8034
+8035
+8036
+8037
+8038
+8039
+8040
+8041
+8042
+8043
+8044
+8045
+8046
+8047
+8048
+8049
+8050
+8051
+8052
+8053
+8054
+8055
+8056
+8057
+8058
+8059
+8060
+8061
+8062
+8063
+8064
+8065
+8066
+8067
+8068
+8069
+8070
+8071
+8072
+8073
+8074
+8075
+8076
+8077
+8078
+8079
+8080
+8081
+8082
+8083
+8084
+8085
+8086
+8087
+8088
+8089
+8090
+8091
+8092
+8093
+8094
+8095
+8096
+8097
+8098
+8099
+8100
+8101
+8102
+8103
+8104
+8105
+8106
+8107
+8108
+8109
+8110
+8111
+8112
+8113
+8114
+8115
+8116
+8117
+8118
+8119
+8120
+8121
+8122
+8123
+8124
+8125
+8126
+8127
+8128
+8129
+8130
+8131
+8132
+8133
+8134
+8135
+8136
+8137
+8138
+8139
+8140
+8141
+8142
+8143
+8144
+8145
+8146
+8147
+8148
+8149
+8150
+8151
+8152
+8153
+8154
+8155
+8156
+8157
+8158
+8159
+8160
+8161
+8162
+8163
+8164
+8165
+8166
+8167
+8168
+8169
+8170
+8171
+8172
+8173
+8174
+8175
+8176
+8177
+8178
+8179
+8180
+8181
+8182
+8183
+8184
+8185
+8186
+8187
+8188
+8189
+8190
+8191
+8192
+8193
+8194
+8195
+8196
+8197
+8198
+8199
+8200
+8201
+8202
+8203
+8204
+8205
+8206
+8207
+8208
+8209
+8210
+8211
+8212
+8213
+8214
+8215
+8216
+8217
+8218
+8219
+8220
+8221
+8222
+8223
+8224
+8225
+8226
+8227
+8228
+8229
+8230
+8231
+8232
+8233
+8234
+8235
+8236
+8237
+8238
+8239
+8240
+8241
+8242
+8243
+8244
+8245
+8246
+8247
+8248
+8249
+8250
+8251
+8252
+8253
+8254
+8255
+8256
+8257
+8258
+8259
+8260
+8261
+8262
+8263
+8264
+8265
+8266
+8267
+8268
+8269
+8270
+8271
+8272
+8273
+8274
+8275
+8276
+8277
+8278
+8279
+8280
+8281
+8282
+8283
+8284
+8285
+8286
+8287
+8288
+8289
+8290
+8291
+8292
+8293
+8294
+8295
+8296
+8297
+8298
+8299
+8300
+8301
+8302
+8303
+8304
+8305
+8306
+8307
+8308
+8309
+8310
+8311
+8312
+8313
+8314
+8315
+8316
+8317
+8318
+8319
+8320
+8321
+8322
+8323
+8324
+8325
+8326
+8327
+8328
+8329
+8330
+8331
+8332
+8333
+8334
+8335
+8336
+8337
+8338
+8339
+8340
+8341
+8342
+8343
+8344
+8345
+8346
+8347
+8348
+8349
+8350
+8351
+8352
+8353
+8354
+8355
+8356
+8357
+8358
+8359
+8360
+8361
+8362
+8363
+8364
+8365
+8366
+8367
+8368
+8369
+8370
+8371
+8372
+8373
+8374
+8375
+8376
+8377
+8378
+8379
+8380
+8381
+8382
+8383
+8384
+8385
+8386
+8387
+8388
+8389
+8390
+8391
+8392
+8393
+8394
+8395
+8396
+8397
+8398
+8399
+8400
+8401
+8402
+8403
+8404
+8405
+8406
+8407
+8408
+8409
+8410
+8411
+8412
+8413
+8414
+8415
+8416
+8417
+8418
+8419
+8420
+8421
+8422
+8423
+8424
+8425
+8426
+8427
+8428
+8429
+8430
+8431
+8432
+8433
+8434
+8435
+8436
+8437
+8438
+8439
+8440
+8441
+8442
+8443
+8444
+8445
+8446
+8447
+8448
+8449
+8450
+8451
+8452
+8453
+8454
+8455
+8456
+8457
+8458
+8459
+8460
+8461
+8462
+8463
+8464
+8465
+8466
+8467
+8468
+8469
+8470
+8471
+8472
+8473
+8474
+8475
+8476
+8477
+8478
+8479
+8480
+8481
+8482
+8483
+8484
+8485
+8486
+8487
+8488
+8489
+8490
+8491
+8492
+8493
+8494
+8495
+8496
+8497
+8498
+8499
+8500
+8501
+8502
+8503
+8504
+8505
+8506
+8507
+8508
+8509
+8510
+8511
+8512
+8513
+8514
+8515
+8516
+8517
+8518
+8519
+8520
+8521
+8522
+8523
+8524
+8525
+8526
+8527
+8528
+8529
+8530
+8531
+8532
+8533
+8534
+8535
+8536
+8537
+8538
+8539
+8540
+8541
+8542
+8543
+8544
+8545
+8546
+8547
+8548
+8549
+8550
+8551
+8552
+8553
+8554
+8555
+8556
+8557
+8558
+8559
+8560
+8561
+8562
+8563
+8564
+8565
+8566
+8567
+8568
+8569
+8570
+8571
+8572
+8573
+8574
+8575
+8576
+8577
+8578
+8579
+8580
+8581
+8582
+8583
+8584
+8585
+8586
+8587
+8588
+8589
+8590
+8591
+8592
+8593
+8594
+8595
+8596
+8597
+8598
+8599
+8600
+8601
+8602
+8603
+8604
+8605
+8606
+8607
+8608
+8609
+8610
+8611
+8612
+8613
+8614
+8615
+8616
+8617
+8618
+8619
+8620
+8621
+8622
+8623
+8624
+8625
+8626
+8627
+8628
+8629
+8630
+8631
+8632
+8633
+8634
+8635
+8636
+8637
+8638
+8639
+8640
+8641
+8642
+8643
+8644
+8645
+8646
+8647
+8648
+8649
+8650
+8651
+8652
+8653
+8654
+8655
+8656
+8657
+8658
+8659
+8660
+8661
+8662
+8663
+8664
+8665
+8666
+8667
+8668
+8669
+8670
+8671
+8672
+8673
+8674
+8675
+8676
+8677
+8678
+8679
+8680
+8681
+8682
+8683
+8684
+8685
+8686
+8687
+8688
+8689
+8690
+8691
+8692
+8693
+8694
+8695
+8696
+8697
+8698
+8699
+8700
+8701
+8702
+8703
+8704
+8705
+8706
+8707
+8708
+8709
+8710
+8711
+8712
+8713
+8714
+8715
+8716
+8717
+8718
+8719
+8720
+8721
+8722
+8723
+8724
+8725
+8726
+8727
+8728
+8729
+8730
+8731
+8732
+8733
+8734
+8735
+8736
+8737
+8738
+8739
+8740
+8741
+8742
+8743
+8744
+8745
+8746
+8747
+8748
+8749
+8750
+8751
+8752
+8753
+8754
+8755
+8756
+8757
+8758
+8759
+8760
+8761
+8762
+8763
+8764
+8765
+8766
+8767
+8768
+8769
+8770
+8771
+8772
+8773
+8774
+8775
+8776
+8777
+8778
+8779
+8780
+8781
+8782
+8783
+8784
+8785
+8786
+8787
+8788
+8789
+8790
+8791
+8792
+8793
+8794
+8795
+8796
+8797
+8798
+8799
+8800
+8801
+8802
+8803
+8804
+8805
+8806
+8807
+8808
+8809
+8810
+8811
+8812
+8813
+8814
+8815
+8816
+8817
+8818
+8819
+8820
+8821
+8822
+8823
+8824
+8825
+8826
+8827
+8828
+8829
+8830
+8831
+8832
+8833
+8834
+8835
+8836
+8837
+8838
+8839
+8840
+8841
+8842
+8843
+8844
+8845
+8846
+8847
+8848
+8849
+8850
+8851
+8852
+8853
+8854
+8855
+8856
+8857
+8858
+8859
+8860
+8861
+8862
+8863
+8864
+8865
+8866
+8867
+8868
+8869
+8870
+8871
+8872
+8873
+8874
+8875
+8876
+8877
+8878
+8879
+8880
+8881
+8882
+8883
+8884
+8885
+8886
+8887
+8888
+8889
+8890
+8891
+8892
+8893
+8894
+8895
+8896
+8897
+8898
+8899
+8900
+8901
+8902
+8903
+8904
+8905
+8906
+8907
+8908
+8909
+8910
+8911
+8912
+8913
+8914
+8915
+8916
+8917
+8918
+8919
+8920
+8921
+8922
+8923
+8924
+8925
+8926
+8927
+8928
+8929
+8930
+8931
+8932
+8933
+8934
+8935
+8936
+8937
+8938
+8939
+8940
+8941
+8942
+8943
+8944
+8945
+8946
+8947
+8948
+8949
+8950
+8951
+8952
+8953
+8954
+8955
+8956
+8957
+8958
+8959
+8960
+8961
+8962
+8963
+8964
+8965
+8966
+8967
+8968
+8969
+8970
+8971
+8972
+8973
+8974
+8975
+8976
+8977
+8978
+8979
+8980
+8981
+8982
+8983
+8984
+8985
+8986
+8987
+8988
+8989
+8990
+8991
+8992
+8993
+8994
+8995
+8996
+8997
+8998
+8999
+9000
+9001
+9002
+9003
+9004
+9005
+9006
+9007
+9008
+9009
+9010
+9011
+9012
+9013
+9014
+9015
+9016
+9017
+9018
+9019
+9020
+9021
+9022
+9023
+9024
+9025
+9026
+9027
+9028
+9029
+9030
+9031
+9032
+9033
+9034
+9035
+9036
+9037
+9038
+9039
+9040
+9041
+9042
+9043
+9044
+9045
+9046
+9047
+9048
+9049
+9050
+9051
+9052
+9053
+9054
+9055
+9056
+9057
+9058
+9059
+9060
+9061
+9062
+9063
+9064
+9065
+9066
+9067
+9068
+9069
+9070
+9071
+9072
+9073
+9074
+9075
+9076
+9077
+9078
+9079
+9080
+9081
+9082
+9083
+9084
+9085
+9086
+9087
+9088
+9089
+9090
+9091
+9092
+9093
+9094
+9095
+9096
+9097
+9098
+9099
+9100
+9101
+9102
+9103
+9104
+9105
+9106
+9107
+9108
+9109
+9110
+9111
+9112
+9113
+9114
+9115
+9116
+9117
+9118
+9119
+9120
+9121
+9122
+9123
+9124
+9125
+9126
+9127
+9128
+9129
+9130
+9131
+9132
+9133
+9134
+9135
+9136
+9137
+9138
+9139
+9140
+9141
+9142
+9143
+9144
+9145
+9146
+9147
+9148
+9149
+9150
+9151
+9152
+9153
+9154
+9155
+9156
+9157
+9158
+9159
+9160
+9161
+9162
+9163
+9164
+9165
+9166
+9167
+9168
+9169
+9170
+9171
+9172
+9173
+9174
+9175
+9176
+9177
+9178
+9179
+9180
+9181
+9182
+9183
+9184
+9185
+9186
+9187
+9188
+9189
+9190
+9191
+9192
+9193
+9194
+9195
+9196
+9197
+9198
+9199
+9200
+9201
+9202
+9203
+9204
+9205
+9206
+9207
+9208
+9209
+9210
+9211
+9212
+9213
+9214
+9215
+9216
+9217
+9218
+9219
+9220
+9221
+9222
+9223
+9224
+9225
+9226
+9227
+9228
+9229
+9230
+9231
+9232
+9233
+9234
+9235
+9236
+9237
+9238
+9239
+9240
+9241
+9242
+9243
+9244
+9245
+9246
+9247
+9248
+9249
+9250
+9251
+9252
+9253
+9254
+9255
+9256
+9257
+9258
+9259
+9260
+9261
+9262
+9263
+9264
+9265
+9266
+9267
+9268
+9269
+9270
+9271
+9272
+9273
+9274
+9275
+9276
+9277
+9278
+9279
+9280
+9281
+9282
+9283
+9284
+9285
+9286
+9287
+9288
+9289
+9290
+9291
+9292
+9293
+9294
+9295
+9296
+9297
+9298
+9299
+9300
+9301
+9302
+9303
+9304
+9305
+9306
+9307
+9308
+9309
+9310
+9311
+9312
+9313
+9314
+9315
+9316
+9317
+9318
+9319
+9320
+9321
+9322
+9323
+9324
+9325
+9326
+9327
+9328
+9329
+9330
+9331
+9332
+9333
+9334
+9335
+9336
+9337
+9338
+9339
+9340
+9341
+9342
+9343
+9344
+9345
+9346
+9347
+9348
+9349
+9350
+9351
+9352
+9353
+9354
+9355
+9356
+9357
+9358
+9359
+9360
+9361
+9362
+9363
+9364
+9365
+9366
+9367
+9368
+9369
+9370
+9371
+9372
+9373
+9374
+9375
+9376
+9377
+9378
+9379
+9380
+9381
+9382
+9383
+9384
+9385
+9386
+9387
+9388
+9389
+9390
+9391
+9392
+9393
+9394
+9395
+9396
+9397
+9398
+9399
+9400
+9401
+9402
+9403
+9404
+9405
+9406
+9407
+9408
+9409
+9410
+9411
+9412
+9413
+9414
+9415
+9416
+9417
+9418
+9419
+9420
+9421
+9422
+9423
+9424
+9425
+9426
+9427
+9428
+9429
+9430
+9431
+9432
+9433
+9434
+9435
+9436
+9437
+9438
+9439
+9440
+9441
+9442
+9443
+9444
+9445
+9446
+9447
+9448
+9449
+9450
+9451
+9452
+9453
+9454
+9455
+9456
+9457
+9458
+9459
+9460
+9461
+9462
+9463
+9464
+9465
+9466
+9467
+9468
+9469
+9470
+9471
+9472
+9473
+9474
+9475
+9476
+9477
+9478
+9479
+9480
+9481
+9482
+9483
+9484
+9485
+9486
+9487
+9488
+9489
+9490
+9491
+9492
+9493
+9494
+9495
+9496
+9497
+9498
+9499
+9500
+9501
+9502
+9503
+9504
+9505
+9506
+9507
+9508
+9509
+9510
+9511
+9512
+9513
+9514
+9515
+9516
+9517
+9518
+9519
+9520
+9521
+9522
+9523
+9524
+9525
+9526
+9527
+9528
+9529
+9530
+9531
+9532
+9533
+9534
+9535
+9536
+9537
+9538
+9539
+9540
+9541
+9542
+9543
+9544
+9545
+9546
+9547
+9548
+9549
+9550
+9551
+9552
+9553
+9554
+9555
+9556
+9557
+9558
+9559
+9560
+9561
+9562
+9563
+9564
+9565
+9566
+9567
+9568
+9569
+9570
+9571
+9572
+9573
+9574
+9575
+9576
+9577
+9578
+9579
+9580
+9581
+9582
+9583
+9584
+9585
+9586
+9587
+9588
+9589
+9590
+9591
+9592
+9593
+9594
+9595
+9596
+9597
+9598
+9599
+9600
+9601
+9602
+9603
+9604
+9605
+9606
+9607
+9608
+9609
+9610
+9611
+9612
+9613
+9614
+9615
+9616
+9617
+9618
+9619
+9620
+9621
+9622
+9623
+9624
+9625
+9626
+9627
+9628
+9629
+9630
+9631
+9632
+9633
+9634
+9635
+9636
+9637
+9638
+9639
+9640
+9641
+9642
+9643
+9644
+9645
+9646
+9647
+9648
+9649
+9650
+9651
+9652
+9653
+9654
+9655
+9656
+9657
+9658
+9659
+9660
+9661
+9662
+9663
+9664
+9665
+9666
+9667
+9668
+9669
+9670
+9671
+9672
+9673
+9674
+9675
+9676
+9677
+9678
+9679
+9680
+9681
+9682
+9683
+9684
+9685
+9686
+9687
+9688
+9689
+9690
+9691
+9692
+9693
+9694
+9695
+9696
+9697
+9698
+9699
+9700
+9701
+9702
+9703
+9704
+9705
+9706
+9707
+9708
+9709
+9710
+9711
+9712
+9713
+9714
+9715
+9716
+9717
+9718
+9719
+9720
+9721
+9722
+9723
+9724
+9725
+9726
+9727
+9728
+9729
+9730
+9731
+9732
+9733
+9734
+9735
+9736
+9737
+9738
+9739
+9740
+9741
+9742
+9743
+9744
+9745
+9746
+9747
+9748
+9749
+9750
+9751
+9752
+9753
+9754
+9755
+9756
+9757
+9758
+9759
+9760
+9761
+9762
+9763
+9764
+9765
+9766
+9767
+9768
+9769
+9770
+9771
+9772
+9773
+9774
+9775
+9776
+9777
+9778
+9779
+9780
+9781
+9782
+9783
+9784
+9785
+9786
+9787
+9788
+9789
+9790
+9791
+9792
+9793
+9794
+9795
+9796
+9797
+9798
+9799
+9800
+9801
+9802
+9803
+9804
+9805
+9806
+9807
+9808
+9809
+9810
+9811
+9812
+9813
+9814
+9815
+9816
+9817
+9818
+9819
+9820
+9821
+9822
+9823
+9824
+9825
+9826
+9827
+9828
+9829
+9830
+9831
+9832
+9833
+9834
+9835
+9836
+9837
+9838
+9839
+9840
+9841
+9842
+9843
+9844
+9845
+9846
+9847
+9848
+9849
+9850
+9851
+9852
+9853
+9854
+9855
+9856
+9857
+9858
+9859
+9860
+9861
+9862
+9863
+9864
+9865
+9866
+9867
+9868
+9869
+9870
+9871
+9872
+9873
+9874
+9875
+9876
+9877
+9878
+9879
+9880
+9881
+9882
+9883
+9884
+9885
+9886
+9887
+9888
+9889
+9890
+9891
+9892
+9893
+9894
+9895
+9896
+9897
+9898
+9899
+9900
+9901
+9902
+9903
+9904
+9905
+9906
+9907
+9908
+9909
+9910
+9911
+9912
+9913
+9914
+9915
+9916
+9917
+9918
+9919
+9920
+9921
+9922
+9923
+9924
+9925
+9926
+9927
+9928
+9929
+9930
+9931
+9932
+9933
+9934
+9935
+9936
+9937
+9938
+9939
+9940
+9941
+9942
+9943
+9944
+9945
+9946
+9947
+9948
+9949
+9950
+9951
+9952
+9953
+9954
+9955
+9956
+9957
+9958
+9959
+9960
+9961
+9962
+9963
+9964
+9965
+9966
+9967
+9968
+9969
+9970
+9971
+9972
+9973
+9974
+9975
+9976
+9977
+9978
+9979
+9980
+9981
+9982
+9983
+9984
+9985
+9986
+9987
+9988
+9989
+9990
+9991
+9992
+9993
+9994
+9995
+9996
+9997
+9998
+9999
+10000
+10001
+10002
+10003
+10004
+10005
+10006
+10007
+10008
+10009
+10010
+10011
+10012
+10013
+10014
+10015
+10016
+10017
+10018
+10019
+10020
+10021
+10022
+10023
+10024
+10025
+10026
+10027
+10028
+10029
+10030
+10031
+10032
+10033
+10034
+10035
+10036
+10037
+10038
+10039
+10040
+10041
+10042
+10043
+10044
+10045
+10046
+10047
+10048
+10049
+10050
+10051
+10052
+10053
+10054
+10055
+10056
+10057
+10058
+10059
+10060
+10061
+10062
+10063
+10064
+10065
+10066
+10067
+10068
+10069
+10070
+10071
+10072
+10073
+10074
+10075
+10076
+10077
+10078
+10079
+10080
+10081
+10082
+10083
+10084
+10085
+10086
+10087
+10088
+10089
+10090
+10091
+10092
+10093
+10094
+10095
+10096
+10097
+10098
+10099
+10100
+10101
+10102
+10103
+10104
+10105
+10106
+10107
+10108
+10109
+10110
+10111
+10112
+10113
+10114
+10115
+10116
+10117
+10118
+10119
+10120
+10121
+10122
+10123
+10124
+10125
+10126
+10127
+10128
+10129
+10130
+10131
+10132
+10133
+10134
+10135
+10136
+10137
+10138
+10139
+10140
+10141
+10142
+10143
+10144
+10145
+10146
+10147
+10148
+10149
+10150
+10151
+10152
+10153
+10154
+10155
+10156
+10157
+10158
+10159
+10160
+10161
+10162
+10163
+10164
+10165
+10166
+10167
+10168
+10169
+10170
+10171
+10172
+10173
+10174
+10175
+10176
+10177
+10178
+10179
+10180
+10181
+10182
+10183
+10184
+10185
+10186
+10187
+10188
+10189
+10190
+10191
+10192
+10193
+10194
+10195
+10196
+10197
+10198
+10199
+10200
+10201
+10202
+10203
+10204
+10205
+10206
+10207
+10208
+10209
+10210
+10211
+10212
+10213
+10214
+10215
+10216
+10217
+10218
+10219
+10220
+10221
+10222
+10223
+10224
+10225
+10226
+10227
+10228
+10229
+10230
+10231
+10232
+10233
+10234
+10235
+10236
+10237
+10238
+10239
+10240
+10241
+10242
+10243
+10244
+10245
+10246
+10247
+10248
+10249
+10250
+10251
+10252
+10253
+10254
+10255
+10256
+10257
+10258
+10259
+10260
+10261
+10262
+10263
+10264
+10265
+10266
+10267
+10268
+10269
+10270
+10271
+10272
+10273
+10274
+10275
+10276
+10277
+10278
+10279
+10280
+10281
+10282
+10283
+10284
+10285
+10286
+10287
+10288
+10289
+10290
+10291
+10292
+10293
+10294
+10295
+10296
+10297
+10298
+10299
+10300
+10301
+10302
+10303
+10304
+10305
+10306
+10307
+10308
+10309
+10310
+10311
+10312
+10313
+10314
+10315
+10316
+10317
+10318
+10319
+10320
+10321
+10322
+10323
+10324
+10325
+10326
+10327
+10328
+10329
+10330
+10331
+10332
+10333
+10334
+10335
+10336
+10337
+10338
+10339
+10340
+10341
+10342
+10343
+10344
+10345
+10346
+10347
+10348
+10349
+10350
+10351
+10352
+10353
+10354
+10355
+10356
+10357
+10358
+10359
+10360
+10361
+10362
+10363
+10364
+10365
+10366
+10367
+10368
+10369
+10370
+10371
+10372
+10373
+10374
+10375
+10376
+10377
+10378
+10379
+10380
+10381
+10382
+10383
+10384
+10385
+10386
+10387
+10388
+10389
+10390
+10391
+10392
+10393
+10394
+10395
+10396
+10397
+10398
+10399
+10400
+10401
+10402
+10403
+10404
+10405
+10406
+10407
+10408
+10409
+10410
+10411
+10412
+10413
+10414
+10415
+10416
+10417
+10418
+10419
+10420
+10421
+10422
+10423
+10424
+10425
+10426
+10427
+10428
+10429
+10430
+10431
+10432
+10433
+10434
+10435
+10436
+10437
+10438
+10439
+10440
+10441
+10442
+10443
+10444
+10445
+10446
+10447
+10448
+10449
+10450
+10451
+10452
+10453
+10454
+10455
+10456
+10457
+10458
+10459
+10460
+10461
+10462
+10463
+10464
+10465
+10466
+10467
+10468
+10469
+10470
+10471
+10472
+10473
+10474
+10475
+10476
+10477
+10478
+10479
+10480
+10481
+10482
+10483
+10484
+10485
+10486
+10487
+10488
+10489
+10490
+10491
+10492
+10493
+10494
+10495
+10496
+10497
+10498
+10499
+10500
+10501
+10502
+10503
+10504
+10505
+10506
+10507
+10508
+10509
+10510
+10511
+10512
+10513
+10514
+10515
+10516
+10517
+10518
+10519
+10520
+10521
+10522
+10523
+10524
+10525
+10526
+10527
+10528
+10529
+10530
+10531
+10532
+10533
+10534
+10535
+10536
+10537
+10538
+10539
+10540
+10541
+10542
+10543
+10544
+10545
+10546
+10547
+10548
+10549
+10550
+10551
+10552
+10553
+10554
+10555
+10556
+10557
+10558
+10559
+10560
+10561
+10562
+10563
+10564
+10565
+10566
+10567
+10568
+10569
+10570
+10571
+10572
+10573
+10574
+10575
+10576
+10577
+10578
+10579
+10580
+10581
+10582
+10583
+10584
+10585
+10586
+10587
+10588
+10589
+10590
+10591
+10592
+10593
+10594
+10595
+10596
+10597
+10598
+10599
+10600
+10601
+10602
+10603
+10604
+10605
+10606
+10607
+10608
+10609
+10610
+10611
+10612
+10613
+10614
+10615
+10616
+10617
+10618
+10619
+10620
+10621
+10622
+10623
+10624
+10625
+10626
+10627
+10628
+10629
+10630
+10631
+10632
+10633
+10634
+10635
+10636
+10637
+10638
+10639
+10640
+10641
+10642
+10643
+10644
+10645
+10646
+10647
+10648
+10649
+10650
+10651
+10652
+10653
+10654
+10655
+10656
+10657
+10658
+10659
+10660
+10661
+10662
+10663
+10664
+10665
+10666
+10667
+10668
+10669
+10670
+10671
+10672
+10673
+10674
+10675
+10676
+10677
+10678
+10679
+10680
+10681
+10682
+10683
+10684
+10685
+10686
+10687
+10688
+10689
+10690
+10691
+10692
+10693
+10694
+10695
+10696
+10697
+10698
+10699
+10700
+10701
+10702
+10703
+10704
+10705
+10706
+10707
+10708
+10709
+10710
+10711
+10712
+10713
+10714
+10715
+10716
+10717
+10718
+10719
+10720
+10721
+10722
+10723
+10724
+10725
+10726
+10727
+10728
+10729
+10730
+10731
+10732
+10733
+10734
+10735
+10736
+10737
+10738
+10739
+10740
+10741
+10742
+10743
+10744
+10745
+10746
+10747
+10748
+10749
+10750
+10751
+10752
+10753
+10754
+10755
+10756
+10757
+10758
+10759
+10760
+10761
+10762
+10763
+10764
+10765
+10766
+10767
+10768
+10769
+10770
+10771
+10772
+10773
+10774
+10775
+10776
+10777
+10778
+10779
+10780
+10781
+10782
+10783
+10784
+10785
+10786
+10787
+10788
+10789
+10790
+10791
+10792
+10793
+10794
+10795
+10796
+10797
+10798
+10799
+10800
+10801
+10802
+10803
+10804
+10805
+10806
+10807
+10808
+10809
+10810
+10811
+10812
+10813
+10814
+10815
+10816
+10817
+10818
+10819
+10820
+10821
+10822
+10823
+10824
+10825
+10826
+10827
+10828
+10829
+10830
+10831
+10832
+10833
+10834
+10835
+10836
+10837
+10838
+10839
+10840
+10841
+10842
+10843
+10844
+10845
+10846
+10847
+10848
+10849
+10850
+10851
+10852
+10853
+10854
+10855
+10856
+10857
+10858
+10859
+10860
+10861
+10862
+10863
+10864
+10865
+10866
+10867
+10868
+10869
+10870
+10871
+10872
+10873
+10874
+10875
+10876
+10877
+10878
+10879
+10880
+10881
+10882
+10883
+10884
+10885
+10886
+10887
+10888
+10889
+10890
+10891
+10892
+10893
+10894
+10895
+10896
+10897
+10898
+10899
+10900
+10901
+10902
+10903
+10904
+10905
+10906
+10907
+10908
+10909
+10910
+10911
+10912
+10913
+10914
+10915
+10916
+10917
+10918
+10919
+10920
+10921
+10922
+10923
+10924
+10925
+10926
+10927
+10928
+10929
+10930
+10931
+10932
+10933
+10934
+10935
+10936
+10937
+10938
+10939
+10940
+10941
+10942
+10943
+10944
+10945
+10946
+10947
+10948
+10949
+10950
+10951
+10952
+10953
+10954
+10955
+10956
+10957
+10958
+10959
+10960
+10961
+10962
+10963
+10964
+10965
+10966
+10967
+10968
+10969
+10970
+10971
+10972
+10973
+10974
+10975
+10976
+10977
+10978
+10979
+10980
+10981
+10982
+10983
+10984
+10985
+10986
+10987
+10988
+10989
+10990
+10991
+10992
+10993
+10994
+10995
+10996
+10997
+10998
+10999
+11000
+11001
+11002
+11003
+11004
+11005
+11006
+11007
+11008
+11009
+11010
+11011
+11012
+11013
+11014
+11015
+11016
+11017
+11018
+11019
+11020
+11021
+11022
+11023
+11024
+11025
+11026
+11027
+11028
+11029
+11030
+11031
+11032
+11033
+11034
+11035
+11036
+11037
+11038
+11039
+11040
+11041
+11042
+11043
+11044
+11045
+11046
+11047
+11048
+11049
+11050
+11051
+11052
+11053
+11054
+11055
+11056
+11057
+11058
+11059
+11060
+11061
+11062
+11063
+11064
+11065
+11066
+11067
+11068
+11069
+11070
+11071
+11072
+11073
+11074
+11075
+11076
+11077
+11078
+11079
+11080
+11081
+11082
+11083
+11084
+11085
+11086
+11087
+11088
+11089
+11090
+11091
+11092
+11093
+11094
+11095
+11096
+11097
+11098
+11099
+11100
+11101
+11102
+11103
+11104
+11105
+11106
+11107
+11108
+11109
+11110
+11111
+11112
+11113
+11114
+11115
+11116
+11117
+11118
+11119
+11120
+11121
+11122
+11123
+11124
+11125
+11126
+11127
+11128
+11129
+11130
+11131
+11132
+11133
+11134
+11135
+11136
+11137
+11138
+11139
+11140
+11141
+11142
+11143
+11144
+11145
+11146
+11147
+11148
+11149
+11150
+11151
+11152
+11153
+11154
+11155
+11156
+11157
+11158
+11159
+11160
+11161
+11162
+11163
+11164
+11165
+11166
+11167
+11168
+11169
+11170
+11171
+11172
+11173
+11174
+11175
+11176
+11177
+11178
+11179
+11180
+11181
+11182
+11183
+11184
+11185
+11186
+11187
+11188
+11189
+11190
+11191
+11192
+11193
+11194
+11195
+11196
+11197
+11198
+11199
+11200
+11201
+11202
+11203
+11204
+11205
+11206
+11207
+11208
+11209
+11210
+11211
+11212
+11213
+11214
+11215
+11216
+11217
+11218
+11219
+11220
+11221
+11222
+11223
+11224
+11225
+11226
+11227
+11228
+11229
+11230
+11231
+11232
+11233
+11234
+11235
+11236
+11237
+11238
+11239
+11240
+11241
+11242
+11243
+11244
+11245
+11246
+11247
+11248
+11249
+11250
+11251
+11252
+11253
+11254
+11255
+11256
+11257
+11258
+11259
+11260
+11261
+11262
+11263
+11264
+11265
+11266
+11267
+11268
+11269
+11270
+11271
+11272
+11273
+11274
+11275
+11276
+11277
+11278
+11279
+11280
+11281
+11282
+11283
+11284
+11285
+11286
+11287
+11288
+11289
+11290
+11291
+11292
+11293
+11294
+11295
+11296
+11297
+11298
+11299
+11300
+11301
+11302
+11303
+11304
+11305
+11306
+11307
+11308
+11309
+11310
+11311
+11312
+11313
+11314
+11315
+11316
+11317
+11318
+11319
+11320
+11321
+11322
+11323
+11324
+11325
+11326
+11327
+11328
+11329
+11330
+11331
+11332
+11333
+11334
+11335
+11336
+11337
+11338
+11339
+11340
+11341
+11342
+11343
+11344
+11345
+11346
+11347
+11348
+11349
+11350
+11351
+11352
+11353
+11354
+11355
+11356
+11357
+11358
+11359
+11360
+11361
+11362
+11363
+11364
+11365
+11366
+11367
+11368
+11369
+11370
+11371
+11372
+11373
+11374
+11375
+11376
+11377
+11378
+11379
+11380
+11381
+11382
+11383
+11384
+11385
+11386
+11387
+11388
+11389
+11390
+11391
+11392
+11393
+11394
+11395
+11396
+11397
+11398
+11399
+11400
+11401
+11402
+11403
+11404
+11405
+11406
+11407
+11408
+11409
+11410
+11411
+11412
+11413
+11414
+11415
+11416
+11417
+11418
+11419
+11420
+11421
+11422
+11423
+11424
+11425
+11426
+11427
+11428
+11429
+11430
+11431
+11432
+11433
+11434
+11435
+11436
+11437
+11438
+11439
+11440
+11441
+11442
+11443
+11444
+11445
+11446
+11447
+11448
+11449
+11450
+11451
+11452
+11453
+11454
+11455
+11456
+11457
+11458
+11459
+11460
+11461
+11462
+11463
+11464
+11465
+11466
+11467
+11468
+11469
+11470
+11471
+11472
+11473
+11474
+11475
+11476
+11477
+11478
+11479
+11480
+11481
+11482
+11483
+11484
+11485
+11486
+11487
+11488
+11489
+11490
+11491
+11492
+11493
+11494
+11495
+11496
+11497
+11498
+11499
+11500
+11501
+11502
+11503
+11504
+11505
+11506
+11507
+11508
+11509
+11510
+11511
+11512
+11513
+11514
+11515
+11516
+11517
+11518
+11519
+11520
+11521
+11522
+11523
+11524
+11525
+11526
+11527
+11528
+11529
+11530
+11531
+11532
+11533
+11534
+11535
+11536
+11537
+11538
+11539
+11540
+11541
+11542
+11543
+11544
+11545
+11546
+11547
+11548
+11549
+11550
+11551
+11552
+11553
+11554
+11555
+11556
+11557
+11558
+11559
+11560
+11561
+11562
+11563
+11564
+11565
+11566
+11567
+11568
+11569
+11570
+11571
+11572
+11573
+11574
+11575
+11576
+11577
+11578
+11579
+11580
+11581
+11582
+11583
+11584
+11585
+11586
+11587
+11588
+11589
+11590
+11591
+11592
+11593
+11594
+11595
+11596
+11597
+11598
+11599
+11600
+11601
+11602
+11603
+11604
+11605
+11606
+11607
+11608
+11609
+11610
+11611
+11612
+11613
+11614
+11615
+11616
+11617
+11618
+11619
+11620
+11621
+11622
+11623
+11624
+11625
+11626
+11627
+11628
+11629
+11630
+11631
+11632
+11633
+11634
+11635
+11636
+11637
+11638
+11639
+11640
+11641
+11642
+11643
+11644
+11645
+11646
+11647
+11648
+11649
+11650
+11651
+11652
+11653
+11654
+11655
+11656
+11657
+11658
+11659
+11660
+11661
+11662
+11663
+11664
+11665
+11666
+11667
+11668
+11669
+11670
+11671
+11672
+11673
+11674
+11675
+11676
+11677
+11678
+11679
+11680
+11681
+11682
+11683
+11684
+11685
+11686
+11687
+11688
+11689
+11690
+11691
+11692
+11693
+11694
+11695
+11696
+11697
+11698
+11699
+11700
+11701
+11702
+11703
+11704
+11705
+11706
+11707
+11708
+11709
+11710
+11711
+11712
+11713
+11714
+11715
+11716
+11717
+11718
+11719
+11720
+11721
+11722
+11723
+11724
+11725
+11726
+11727
+11728
+11729
+11730
+11731
+11732
+11733
+11734
+11735
+11736
+11737
+11738
+11739
+11740
+11741
+11742
+11743
+11744
+11745
+11746
+11747
+11748
+11749
+11750
+11751
+11752
+11753
+11754
+11755
+11756
+11757
+11758
+11759
+11760
+11761
+11762
+11763
+11764
+11765
+11766
+11767
+11768
+11769
+11770
+11771
+11772
+11773
+11774
+11775
+11776
+11777
+11778
+11779
+11780
+11781
+11782
+11783
+11784
+11785
+11786
+11787
+11788
+11789
+11790
+11791
+11792
+11793
+11794
+11795
+11796
+11797
+11798
+11799
+11800
+11801
+11802
+11803
+11804
+11805
+11806
+11807
+11808
+11809
+11810
+11811
+11812
+11813
+11814
+11815
+11816
+11817
+11818
+11819
+11820
+11821
+11822
+11823
+11824
+11825
+11826
+11827
+11828
+11829
+11830
+11831
+11832
+11833
+11834
+11835
+11836
+11837
+11838
+11839
+11840
+11841
+11842
+11843
+11844
+11845
+11846
+11847
+11848
+11849
+11850
+11851
+11852
+11853
+11854
+11855
+11856
+11857
+11858
+11859
+11860
+11861
+11862
+11863
+11864
+11865
+11866
+11867
+11868
+11869
+11870
+11871
+11872
+11873
+11874
+11875
+11876
+11877
+11878
+11879
+11880
+11881
+11882
+11883
+11884
+11885
+11886
+11887
+11888
+11889
+11890
+11891
+11892
+11893
+11894
+11895
+11896
+11897
+11898
+11899
+11900
+11901
+11902
+11903
+11904
+11905
+11906
+11907
+11908
+11909
+11910
+11911
+11912
+11913
+11914
+11915
+11916
+11917
+11918
+11919
+11920
+11921
+11922
+11923
+11924
+11925
+11926
+11927
+11928
+11929
+11930
+11931
+11932
+11933
+11934
+11935
+11936
+11937
+11938
+11939
+11940
+11941
+11942
+11943
+11944
+11945
+11946
+11947
+11948
+11949
+11950
+11951
+11952
+11953
+11954
+11955
+11956
+11957
+11958
+11959
+11960
+11961
+11962
+11963
+11964
+11965
+11966
+11967
+11968
+11969
+11970
+11971
+11972
+11973
+11974
+11975
+11976
+11977
+11978
+11979
+11980
+11981
+11982
+11983
+11984
+11985
+11986
+11987
+11988
+11989
+11990
+11991
+11992
+11993
+11994
+11995
+11996
+11997
+11998
+11999
+12000
+12001
+12002
+12003
+12004
+12005
+12006
+12007
+12008
+12009
+12010
+12011
+12012
+12013
+12014
+12015
+12016
+12017
+12018
+12019
+12020
+12021
+12022
+12023
+12024
+12025
+12026
+12027
+12028
+12029
+12030
+12031
+12032
+12033
+12034
+12035
+12036
+12037
+12038
+12039
+12040
+12041
+12042
+12043
+12044
+12045
+12046
+12047
+12048
+12049
+12050
+12051
+12052
+12053
+12054
+12055
+12056
+12057
+12058
+12059
+12060
+12061
+12062
+12063
+12064
+12065
+12066
+12067
+12068
+12069
+12070
+12071
+12072
+12073
+12074
+12075
+12076
+12077
+12078
+12079
+12080
+12081
+12082
+12083
+12084
+12085
+12086
+12087
+12088
+12089
+12090
+12091
+12092
+12093
+12094
+12095
+12096
+12097
+12098
+12099
+12100
+12101
+12102
+12103
+12104
+12105
+12106
+12107
+12108
+12109
+12110
+12111
+12112
+12113
+12114
+12115
+12116
+12117
+12118
+12119
+12120
+12121
+12122
+12123
+12124
+12125
+12126
+12127
+12128
+12129
+12130
+12131
+12132
+12133
+12134
+12135
+12136
+12137
+12138
+12139
+12140
+12141
+12142
+12143
+12144
+12145
+12146
+12147
+12148
+12149
+12150
+12151
+12152
+12153
+12154
+12155
+12156
+12157
+12158
+12159
+12160
+12161
+12162
+12163
+12164
+12165
+12166
+12167
+12168
+12169
+12170
+12171
+12172
+12173
+12174
+12175
+12176
+12177
+12178
+12179
+12180
+12181
+12182
+12183
+12184
+12185
+12186
+12187
+12188
+12189
+12190
+12191
+12192
+12193
+12194
+12195
+12196
+12197
+12198
+12199
+12200
+12201
+12202
+12203
+12204
+12205
+12206
+12207
+12208
+12209
+12210
+12211
+12212
+12213
+12214
+12215
+12216
+12217
+12218
+12219
+12220
+12221
+12222
+12223
+12224
+12225
+12226
+12227
+12228
+12229
+12230
+12231
+12232
+12233
+12234
+12235
+12236
+12237
+12238
+12239
+12240
+12241
+12242
+12243
+12244
+12245
+12246
+12247
+12248
+12249
+12250
+12251
+12252
+12253
+12254
+12255
+12256
+12257
+12258
+12259
+12260
+12261
+12262
+12263
+12264
+12265
+12266
+12267
+12268
+12269
+12270
+12271
+12272
+12273
+12274
+12275
+12276
+12277
+12278
+12279
+12280
+12281
+12282
+12283
+12284
+12285
+12286
+12287
+12288
+12289
+12290
+12291
+12292
+12293
+12294
+12295
+12296
+12297
+12298
+12299
+12300
+12301
+12302
+12303
+12304
+12305
+12306
+12307
+12308
+12309
+12310
+12311
+12312
+12313
+12314
+12315
+12316
+12317
+12318
+12319
+12320
+12321
+12322
+12323
+12324
+12325
+12326
+12327
+12328
+12329
+12330
+12331
+12332
+12333
+12334
+12335
+12336
+12337
+12338
+12339
+12340
+12341
+12342
+12343
+12344
+12345
+12346
+12347
+12348
+12349
+12350
+12351
+12352
+12353
+12354
+12355
+12356
+12357
+12358
+12359
+12360
+12361
+12362
+12363
+12364
+12365
+12366
+12367
+12368
+12369
+12370
+12371
+12372
+12373
+12374
+12375
+12376
+12377
+12378
+12379
+12380
+12381
+12382
+12383
+12384
+12385
+12386
+12387
+12388
+12389
+12390
+12391
+12392
+12393
+12394
+12395
+12396
+12397
+12398
+12399
+12400
+12401
+12402
+12403
+12404
+12405
+12406
+12407
+12408
+12409
+12410
+12411
+12412
+12413
+12414
+12415
+12416
+12417
+12418
+12419
+12420
+12421
+12422
+12423
+12424
+12425
+12426
+12427
+12428
+12429
+12430
+12431
+12432
+12433
+12434
+12435
+12436
+12437
+12438
+12439
+12440
+12441
+12442
+12443
+12444
+12445
+12446
+12447
+12448
+12449
+12450
+12451
+12452
+12453
+12454
+12455
+12456
+12457
+12458
+12459
+12460
+12461
+12462
+12463
+12464
+12465
+12466
+12467
+12468
+12469
+12470
+12471
+12472
+12473
+12474
+12475
+12476
+12477
+12478
+12479
+12480
+12481
+12482
+12483
+12484
+12485
+12486
+12487
+12488
+12489
+12490
+12491
+12492
+12493
+12494
+12495
+12496
+12497
+12498
+12499
+12500
+12501
+12502
+12503
+12504
+12505
+12506
+12507
+12508
+12509
+12510
+12511
+12512
+12513
+12514
+12515
+12516
+12517
+12518
+12519
+12520
+12521
+12522
+12523
+12524
+12525
+12526
+12527
+12528
+12529
+12530
+12531
+12532
+12533
+12534
+12535
+12536
+12537
+12538
+12539
+12540
+12541
+12542
+12543
+12544
+12545
+12546
+12547
+12548
+12549
+12550
+12551
+12552
+12553
+12554
+12555
+12556
+12557
+12558
+12559
+12560
+12561
+12562
+12563
+12564
+12565
+12566
+12567
+12568
+12569
+12570
+12571
+12572
+12573
+12574
+12575
+12576
+12577
+12578
+12579
+12580
+12581
+12582
+12583
+12584
+12585
+12586
+12587
+12588
+12589
+12590
+12591
+12592
+12593
+12594
+12595
+12596
+12597
+12598
+12599
+12600
+12601
+12602
+12603
+12604
+12605
+12606
+12607
+12608
+12609
+12610
+12611
+12612
+12613
+12614
+12615
+12616
+12617
+12618
+12619
+12620
+12621
+12622
+12623
+12624
+12625
+12626
+12627
+12628
+12629
+12630
+12631
+12632
+12633
+12634
+12635
+12636
+12637
+12638
+12639
+12640
+12641
+12642
+12643
+12644
+12645
+12646
+12647
+12648
+12649
+12650
+12651
+12652
+12653
+12654
+12655
+12656
+12657
+12658
+12659
+12660
+12661
+12662
+12663
+12664
+12665
+12666
+12667
+12668
+12669
+12670
+12671
+12672
+12673
+12674
+12675
+12676
+12677
+12678
+12679
+12680
+12681
+12682
+12683
+12684
+12685
+12686
+12687
+12688
+12689
+12690
+12691
+12692
+12693
+12694
+12695
+12696
+12697
+12698
+12699
+12700
+12701
+12702
+12703
+12704
+12705
+12706
+12707
+12708
+12709
+12710
+12711
+12712
+12713
+12714
+12715
+12716
+12717
+12718
+12719
+12720
+12721
+12722
+12723
+12724
+12725
+12726
+12727
+12728
+12729
+12730
+12731
+12732
+12733
+12734
+12735
+12736
+12737
+12738
+12739
+12740
+12741
+12742
+12743
+12744
+12745
+12746
+12747
+12748
+12749
+12750
+12751
+12752
+12753
+12754
+12755
+12756
+12757
+12758
+12759
+12760
+12761
+12762
+12763
+12764
+12765
+12766
+12767
+12768
+12769
+12770
+12771
+12772
+12773
+12774
+12775
+12776
+12777
+12778
+12779
+12780
+12781
+12782
+12783
+12784
+12785
+12786
+12787
+12788
+12789
+12790
+12791
+12792
+12793
+12794
+12795
+12796
+12797
+12798
+12799
+12800
+12801
+12802
+12803
+12804
+12805
+12806
+12807
+12808
+12809
+12810
+12811
+12812
+12813
+12814
+12815
+12816
+12817
+12818
+12819
+12820
+12821
+12822
+12823
+12824
+12825
+12826
+12827
+12828
+12829
+12830
+12831
+12832
+12833
+12834
+12835
+12836
+12837
+12838
+12839
+12840
+12841
+12842
+12843
+12844
+12845
+12846
+12847
+12848
+12849
+12850
+12851
+12852
+12853
+12854
+12855
+12856
+12857
+12858
+12859
+12860
+12861
+12862
+12863
+12864
+12865
+12866
+12867
+12868
+12869
+12870
+12871
+12872
+12873
+12874
+12875
+12876
+12877
+12878
+12879
+12880
+12881
+12882
+12883
+12884
+12885
+12886
+12887
+12888
+12889
+12890
+12891
+12892
+12893
+12894
+12895
+12896
+12897
+12898
+12899
+12900
+12901
+12902
+12903
+12904
+12905
+12906
+12907
+12908
+12909
+12910
+12911
+12912
+12913
+12914
+12915
+12916
+12917
+12918
+12919
+12920
+12921
+12922
+12923
+12924
+12925
+12926
+12927
+12928
+12929
+12930
+12931
+12932
+12933
+12934
+12935
+12936
+12937
+12938
+12939
+12940
+12941
+12942
+12943
+12944
+12945
+12946
+12947
+12948
+12949
+12950
+12951
+12952
+12953
+12954
+12955
+12956
+12957
+12958
+12959
+12960
+12961
+12962
+12963
+12964
+12965
+12966
+12967
+12968
+12969
+12970
+12971
+12972
+12973
+12974
+12975
+12976
+12977
+12978
+12979
+12980
+12981
+12982
+12983
+12984
+12985
+12986
+12987
+12988
+12989
+12990
+12991
+12992
+12993
+12994
+12995
+12996
+12997
+12998
+12999
+13000
+13001
+13002
+13003
+13004
+13005
+13006
+13007
+13008
+13009
+13010
+13011
+13012
+13013
+13014
+13015
+13016
+13017
+13018
+13019
+13020
+13021
+13022
+13023
+13024
+13025
+13026
+13027
+13028
+13029
+13030
+13031
+13032
+13033
+13034
+13035
+13036
+13037
+13038
+13039
+13040
+13041
+13042
+13043
+13044
+13045
+13046
+13047
+13048
+13049
+13050
+13051
+13052
+13053
+13054
+13055
+13056
+13057
+13058
+13059
+13060
+13061
+13062
+13063
+13064
+13065
+13066
+13067
+13068
+13069
+13070
+13071
+13072
+13073
+13074
+13075
+13076
+13077
+13078
+13079
+13080
+13081
+13082
+13083
+13084
+13085
+13086
+13087
+13088
+13089
+13090
+13091
+13092
+13093
+13094
+13095
+13096
+13097
+13098
+13099
+13100
+13101
+13102
+13103
+13104
+13105
+13106
+13107
+13108
+13109
+13110
+13111
+13112
+13113
+13114
+13115
+13116
+13117
+13118
+13119
+13120
+13121
+13122
+13123
+13124
+13125
+13126
+13127
+13128
+13129
+13130
+13131
+13132
+13133
+13134
+13135
+13136
+13137
+13138
+13139
+13140
+13141
+13142
+13143
+13144
+13145
+13146
+13147
+13148
+13149
+13150
+13151
+13152
+13153
+13154
+13155
+13156
+13157
+13158
+13159
+13160
+13161
+13162
+13163
+13164
+13165
+13166
+13167
+13168
+13169
+13170
+13171
+13172
+13173
+13174
+13175
+13176
+13177
+13178
+13179
+13180
+13181
+13182
+13183
+13184
+13185
+13186
+13187
+13188
+13189
+13190
+13191
+13192
+13193
+13194
+13195
+13196
+13197
+13198
+13199
+13200
+13201
+13202
+13203
+13204
+13205
+13206
+13207
+13208
+13209
+13210
+13211
+13212
+13213
+13214
+13215
+13216
+13217
+13218
+13219
+13220
+13221
+13222
+13223
+13224
+13225
+13226
+13227
+13228
+13229
+13230
+13231
+13232
+13233
+13234
+13235
+13236
+13237
+13238
+13239
+13240
+13241
+13242
+13243
+13244
+13245
+13246
+13247
+13248
+13249
+13250
+13251
+13252
+13253
+13254
+13255
+13256
+13257
+13258
+13259
+13260
+13261
+13262
+13263
+13264
+13265
+13266
+13267
+13268
+13269
+13270
+13271
+13272
+13273
+13274
+13275
+13276
+13277
+13278
+13279
+13280
+13281
+13282
+13283
+13284
+13285
+13286
+13287
+13288
+13289
+13290
+13291
+13292
+13293
+13294
+13295
+13296
+13297
+13298
+13299
+13300
+13301
+13302
+13303
+13304
+13305
+13306
+13307
+13308
+13309
+13310
+13311
+13312
+13313
+13314
+13315
+13316
+13317
+13318
+13319
+13320
+13321
+13322
+13323
+13324
+13325
+13326
+13327
+13328
+13329
+13330
+13331
+13332
+13333
+13334
+13335
+13336
+13337
+13338
+13339
+13340
+13341
+13342
+13343
+13344
+13345
+13346
+13347
+13348
+13349
+13350
+13351
+13352
+13353
+13354
+13355
+13356
+13357
+13358
+13359
+13360
+13361
+13362
+13363
+13364
+13365
+13366
+13367
+13368
+13369
+13370
+13371
+13372
+13373
+13374
+13375
+13376
+13377
+13378
+13379
+13380
+13381
+13382
+13383
+13384
+13385
+13386
+13387
+13388
+13389
+13390
+13391
+13392
+13393
+13394
+13395
+13396
+13397
+13398
+13399
+13400
+13401
+13402
+13403
+13404
+13405
+13406
+13407
+13408
+13409
+13410
+13411
+13412
+13413
+13414
+13415
+13416
+13417
+13418
+13419
+13420
+13421
+13422
+13423
+13424
+13425
+13426
+13427
+13428
+13429
+13430
+13431
+13432
+13433
+13434
+13435
+13436
+13437
+13438
+13439
+13440
+13441
+13442
+13443
+13444
+13445
+13446
+13447
+13448
+13449
+13450
+13451
+13452
+13453
+13454
+13455
+13456
+13457
+13458
+13459
+13460
+13461
+13462
+13463
+13464
+13465
+13466
+13467
+13468
+13469
+13470
+13471
+13472
+13473
+13474
+13475
+13476
+13477
+13478
+13479
+13480
+13481
+13482
+13483
+13484
+13485
+13486
+13487
+13488
+13489
+13490
+13491
+13492
+13493
+13494
+13495
+13496
+13497
+13498
+13499
+13500
+13501
+13502
+13503
+13504
+13505
+13506
+13507
+13508
+13509
+13510
+13511
+13512
+13513
+13514
+13515
+13516
+13517
+13518
+13519
+13520
+13521
+13522
+13523
+13524
+13525
+13526
+13527
+13528
+13529
+13530
+13531
+13532
+13533
+13534
+13535
+13536
+13537
+13538
+13539
+13540
+13541
+13542
+13543
+13544
+13545
+13546
+13547
+13548
+13549
+13550
+13551
+13552
+13553
+13554
+13555
+13556
+13557
+13558
+13559
+13560
+13561
+13562
+13563
+13564
+13565
+13566
+13567
+13568
+13569
+13570
+13571
+13572
+13573
+13574
+13575
+13576
+13577
+13578
+13579
+13580
+13581
+13582
+13583
+13584
+13585
+13586
+13587
+13588
+13589
+13590
+13591
+13592
+13593
+13594
+13595
+13596
+13597
+13598
+13599
+13600
+13601
+13602
+13603
+13604
+13605
+13606
+13607
+13608
+13609
+13610
+13611
+13612
+13613
+13614
+13615
+13616
+13617
+13618
+13619
+13620
+13621
+13622
+13623
+13624
+13625
+13626
+13627
+13628
+13629
+13630
+13631
+13632
+13633
+13634
+13635
+13636
+13637
+13638
+13639
+13640
+13641
+13642
+13643
+13644
+13645
+13646
+13647
+13648
+13649
+13650
+13651
+13652
+13653
+13654
+13655
+13656
+13657
+13658
+13659
+13660
+13661
+13662
+13663
+13664
+13665
+13666
+13667
+13668
+13669
+13670
+13671
+13672
+13673
+13674
+13675
+13676
+13677
+13678
+13679
+13680
+13681
+13682
+13683
+13684
+13685
+13686
+13687
+13688
+13689
+13690
+13691
+13692
+13693
+13694
+13695
+13696
+13697
+13698
+13699
+13700
+13701
+13702
+13703
+13704
+13705
+13706
+13707
+13708
+13709
+13710
+13711
+13712
+13713
+13714
+13715
+13716
+13717
+13718
+13719
+13720
+13721
+13722
+13723
+13724
+13725
+13726
+13727
+13728
+13729
+13730
+13731
+13732
+13733
+13734
+13735
+13736
+13737
+13738
+13739
+13740
+13741
+13742
+13743
+13744
+13745
+13746
+13747
+13748
+13749
+13750
+13751
+13752
+13753
+13754
+13755
+13756
+13757
+13758
+13759
+13760
+13761
+13762
+13763
+13764
+13765
+13766
+13767
+13768
+13769
+13770
+13771
+13772
+13773
+13774
+13775
+13776
+13777
+13778
+13779
+13780
+13781
+13782
+13783
+13784
+13785
+13786
+13787
+13788
+13789
+13790
+13791
+13792
+13793
+13794
+13795
+13796
+13797
+13798
+13799
+13800
+13801
+13802
+13803
+13804
+13805
+13806
+13807
+13808
+13809
+13810
+13811
+13812
+13813
+13814
+13815
+13816
+13817
+13818
+13819
+13820
+13821
+13822
+13823
+13824
+13825
+13826
+13827
+13828
+13829
+13830
+13831
+13832
+13833
+13834
+13835
+13836
+13837
+13838
+13839
+13840
+13841
+13842
+13843
+13844
+13845
+13846
+13847
+13848
+13849
+13850
+13851
+13852
+13853
+13854
+13855
+13856
+13857
+13858
+13859
+13860
+13861
+13862
+13863
+13864
+13865
+13866
+13867
+13868
+13869
+13870
+13871
+13872
+13873
+13874
+13875
+13876
+13877
+13878
+13879
+13880
+13881
+13882
+13883
+13884
+13885
+13886
+13887
+13888
+13889
+13890
+13891
+13892
+13893
+13894
+13895
+13896
+13897
+13898
+13899
+13900
+13901
+13902
+13903
+13904
+13905
+13906
+13907
+13908
+13909
+13910
+13911
+13912
+13913
+13914
+13915
+13916
+13917
+13918
+13919
+13920
+13921
+13922
+13923
+13924
+13925
+13926
+13927
+13928
+13929
+13930
+13931
+13932
+13933
+13934
+13935
+13936
+13937
+13938
+13939
+13940
+13941
+13942
+13943
+13944
+13945
+13946
+13947
+13948
+13949
+13950
+13951
+13952
+13953
+13954
+13955
+13956
+13957
+13958
+13959
+13960
+13961
+13962
+13963
+13964
+13965
+13966
+13967
+13968
+13969
+13970
+13971
+13972
+13973
+13974
+13975
+13976
+13977
+13978
+13979
+13980
+13981
+13982
+13983
+13984
+13985
+13986
+13987
+13988
+13989
+13990
+13991
+13992
+13993
+13994
+13995
+13996
+13997
+13998
+13999
+14000
+14001
+14002
+14003
+14004
+14005
+14006
+14007
+14008
+14009
+14010
+14011
+14012
+14013
+14014
+14015
+14016
+14017
+14018
+14019
+14020
+14021
+14022
+14023
+14024
+14025
+14026
+14027
+14028
+14029
+14030
+14031
+14032
+14033
+14034
+14035
+14036
+14037
+14038
+14039
+14040
+14041
+14042
+14043
+14044
+14045
+14046
+14047
+14048
+14049
+14050
+14051
+14052
+14053
+14054
+14055
+14056
+14057
+14058
+14059
+14060
+14061
+14062
+14063
+14064
+14065
+14066
+14067
+14068
+14069
+14070
+14071
+14072
+14073
+14074
+14075
+14076
+14077
+14078
+14079
+14080
+14081
+14082
+14083
+14084
+14085
+14086
+14087
+14088
+14089
+14090
+14091
+14092
+14093
+14094
+14095
+14096
+14097
+14098
+14099
+14100
+14101
+14102
+14103
+14104
+14105
+14106
+14107
+14108
+14109
+14110
+14111
+14112
+14113
+14114
+14115
+14116
+14117
+14118
+14119
+14120
+14121
+14122
+14123
+14124
+14125
+14126
+14127
+14128
+14129
+14130
+14131
+14132
+14133
+14134
+14135
+14136
+14137
+14138
+14139
+14140
+14141
+14142
+14143
+14144
+14145
+14146
+14147
+14148
+14149
+14150
+14151
+14152
+14153
+14154
+14155
+14156
+14157
+14158
+14159
+14160
+14161
+14162
+14163
+14164
+14165
+14166
+14167
+14168
+14169
+14170
+14171
+14172
+14173
+14174
+14175
+14176
+14177
+14178
+14179
+14180
+14181
+14182
+14183
+14184
+14185
+14186
+14187
+14188
+14189
+14190
+14191
+14192
+14193
+14194
+14195
+14196
+14197
+14198
+14199
+14200
+14201
+14202
+14203
+14204
+14205
+14206
+14207
+14208
+14209
+14210
+14211
+14212
+14213
+14214
+14215
+14216
+14217
+14218
+14219
+14220
+14221
+14222
+14223
+14224
+14225
+14226
+14227
+14228
+14229
+14230
+14231
+14232
+14233
+14234
+14235
+14236
+14237
+14238
+14239
+14240
+14241
+14242
+14243
+14244
+14245
+14246
+14247
+14248
+14249
+14250
+14251
+14252
+14253
+14254
+14255
+14256
+14257
+14258
+14259
+14260
+14261
+14262
+14263
+14264
+14265
+14266
+14267
+14268
+14269
+14270
+14271
+14272
+14273
+14274
+14275
+14276
+14277
+14278
+14279
+14280
+14281
+14282
+14283
+14284
+14285
+14286
+14287
+14288
+14289
+14290
+14291
+14292
+14293
+14294
+14295
+14296
+14297
+14298
+14299
+14300
+14301
+14302
+14303
+14304
+14305
+14306
+14307
+14308
+14309
+14310
+14311
+14312
+14313
+14314
+14315
+14316
+14317
+14318
+14319
+14320
+14321
+14322
+14323
+14324
+14325
+14326
+14327
+14328
+14329
+14330
+14331
+14332
+14333
+14334
+14335
+14336
+14337
+14338
+14339
+14340
+14341
+14342
+14343
+14344
+14345
+14346
+14347
+14348
+14349
+14350
+14351
+14352
+14353
+14354
+14355
+14356
+14357
+14358
+14359
+14360
+14361
+14362
+14363
+14364
+14365
+14366
+14367
+14368
+14369
+14370
+14371
+14372
+14373
+14374
+14375
+14376
+14377
+14378
+14379
+14380
+14381
+14382
+14383
+14384
+14385
+14386
+14387
+14388
+14389
+14390
+14391
+14392
+14393
+14394
+14395
+14396
+14397
+14398
+14399
+14400
+14401
+14402
+14403
+14404
+14405
+14406
+14407
+14408
+14409
+14410
+14411
+14412
+14413
+14414
+14415
+14416
+14417
+14418
+14419
+14420
+14421
+14422
+14423
+14424
+14425
+14426
+14427
+14428
+14429
+14430
+14431
+14432
+14433
+14434
+14435
+14436
+14437
+14438
+14439
+14440
+14441
+14442
+14443
+14444
+14445
+14446
+14447
+14448
+14449
+14450
+14451
+14452
+14453
+14454
+14455
+14456
+14457
+14458
+14459
+14460
+14461
+14462
+14463
+14464
+14465
+14466
+14467
+14468
+14469
+14470
+14471
+14472
+14473
+14474
+14475
+14476
+14477
+14478
+14479
+14480
+14481
+14482
+14483
+14484
+14485
+14486
+14487
+14488
+14489
+14490
+14491
+14492
+14493
+14494
+14495
+14496
+14497
+14498
+14499
+14500
+14501
+14502
+14503
+14504
+14505
+14506
+14507
+14508
+14509
+14510
+14511
+14512
+14513
+14514
+14515
+14516
+14517
+14518
+14519
+14520
+14521
+14522
+14523
+14524
+14525
+14526
+14527
+14528
+14529
+14530
+14531
+14532
+14533
+14534
+14535
+14536
+14537
+14538
+14539
+14540
+14541
+14542
+14543
+14544
+14545
+14546
+14547
+14548
+14549
+14550
+14551
+14552
+14553
+14554
+14555
+14556
+14557
+14558
+14559
+14560
+14561
+14562
+14563
+14564
+14565
+14566
+14567
+14568
+14569
+14570
+14571
+14572
+14573
+14574
+14575
+14576
+14577
+14578
+14579
+14580
+14581
+14582
+14583
+14584
+14585
+14586
+14587
+14588
+14589
+14590
+14591
+14592
+14593
+14594
+14595
+14596
+14597
+14598
+14599
+14600
+14601
+14602
+14603
+14604
+14605
+14606
+14607
+14608
+14609
+14610
+14611
+14612
+14613
+14614
+14615
+14616
+14617
+14618
+14619
+14620
+14621
+14622
+14623
+14624
+14625
+14626
+14627
+14628
+14629
+14630
+14631
+14632
+14633
+14634
+14635
+14636
+14637
+14638
+14639
+14640
+14641
+14642
+14643
+14644
+14645
+14646
+14647
+14648
+14649
+14650
+14651
+14652
+14653
+14654
+14655
+14656
+14657
+14658
+14659
+14660
+14661
+14662
+14663
+14664
+14665
+14666
+14667
+14668
+14669
+14670
+14671
+14672
+14673
+14674
+14675
+14676
+14677
+14678
+14679
+14680
+14681
+14682
+14683
+14684
+14685
+14686
+14687
+14688
+14689
+14690
+14691
+14692
+14693
+14694
+14695
+14696
+14697
+14698
+14699
+14700
+14701
+14702
+14703
+14704
+14705
+14706
+14707
+14708
+14709
+14710
+14711
+14712
+14713
+14714
+14715
+14716
+14717
+14718
+14719
+14720
+14721
+14722
+14723
+14724
+14725
+14726
+14727
+14728
+14729
+14730
+14731
+14732
+14733
+14734
+14735
+14736
+14737
+14738
+14739
+14740
+14741
+14742
+14743
+14744
+14745
+14746
+14747
+14748
+14749
+14750
+14751
+14752
+14753
+14754
+14755
+14756
+14757
+14758
+14759
+14760
+14761
+14762
+14763
+14764
+14765
+14766
+14767
+14768
+14769
+14770
+14771
+14772
+14773
+14774
+14775
+14776
+14777
+14778
+14779
+14780
+14781
+14782
+14783
+14784
+14785
+14786
+14787
+14788
+14789
+14790
+14791
+14792
+14793
+14794
+14795
+14796
+14797
+14798
+14799
+14800
+14801
+14802
+14803
+14804
+14805
+14806
+14807
+14808
+14809
+14810
+14811
+14812
+14813
+14814
+14815
+14816
+14817
+14818
+14819
+14820
+14821
+14822
+14823
+14824
+14825
+14826
+14827
+14828
+14829
+14830
+14831
+14832
+14833
+14834
+14835
+14836
+14837
+14838
+14839
+14840
+14841
+14842
+14843
+14844
+14845
+14846
+14847
+14848
+14849
+14850
+14851
+14852
+14853
+14854
+14855
+14856
+14857
+14858
+14859
+14860
+14861
+14862
+14863
+14864
+14865
+14866
+14867
+14868
+14869
+14870
+14871
+14872
+14873
+14874
+14875
+14876
+14877
+14878
+14879
+14880
+14881
+14882
+14883
+14884
+14885
+14886
+14887
+14888
+14889
+14890
+14891
+14892
+14893
+14894
+14895
+14896
+14897
+14898
+14899
+14900
+14901
+14902
+14903
+14904
+14905
+14906
+14907
+14908
+14909
+14910
+14911
+14912
+14913
+14914
+14915
+14916
+14917
+14918
+14919
+14920
+14921
+14922
+14923
+14924
+14925
+14926
+14927
+14928
+14929
+14930
+14931
+14932
+14933
+14934
+14935
+14936
+14937
+14938
+14939
+14940
+14941
+14942
+14943
+14944
+14945
+14946
+14947
+14948
+14949
+14950
+14951
+14952
+14953
+14954
+14955
+14956
+14957
+14958
+14959
+14960
+14961
+14962
+14963
+14964
+14965
+14966
+14967
+14968
+14969
+14970
+14971
+14972
+14973
+14974
+14975
+14976
+14977
+14978
+14979
+14980
+14981
+14982
+14983
+14984
+14985
+14986
+14987
+14988
+14989
+14990
+14991
+14992
+14993
+14994
+14995
+14996
+14997
+14998
+14999
+15000
+15001
+15002
+15003
+15004
+15005
+15006
+15007
+15008
+15009
+15010
+15011
+15012
+15013
+15014
+15015
+15016
+15017
+15018
+15019
+15020
+15021
+15022
+15023
+15024
+15025
+15026
+15027
+15028
+15029
+15030
+15031
+15032
+15033
+15034
+15035
+15036
+15037
+15038
+15039
+15040
+15041
+15042
+15043
+15044
+15045
+15046
+15047
+15048
+15049
+15050
+15051
+15052
+15053
+15054
+15055
+15056
+15057
+15058
+15059
+15060
+15061
+15062
+15063
+15064
+15065
+15066
+15067
+15068
+15069
+15070
+15071
+15072
+15073
+15074
+15075
+15076
+15077
+15078
+15079
+15080
+15081
+15082
+15083
+15084
+15085
+15086
+15087
+15088
+15089
+15090
+15091
+15092
+15093
+15094
+15095
+15096
+15097
+15098
+15099
+15100
+15101
+15102
+15103
+15104
+15105
+15106
+15107
+15108
+15109
+15110
+15111
+15112
+15113
+15114
+15115
+15116
+15117
+15118
+15119
+15120
+15121
+15122
+15123
+15124
+15125
+15126
+15127
+15128
+15129
+15130
+15131
+15132
+15133
+15134
+15135
+15136
+15137
+15138
+15139
+15140
+15141
+15142
+15143
+15144
+15145
+15146
+15147
+15148
+15149
+15150
+15151
+15152
+15153
+15154
+15155
+15156
+15157
+15158
+15159
+15160
+15161
+15162
+15163
+15164
+15165
+15166
+15167
+15168
+15169
+15170
+15171
+15172
+15173
+15174
+15175
+15176
+15177
+15178
+15179
+15180
+15181
+15182
+15183
+15184
+15185
+15186
+15187
+15188
+15189
+15190
+15191
+15192
+15193
+15194
+15195
+15196
+15197
+15198
+15199
+15200
+15201
+15202
+15203
+15204
+15205
+15206
+15207
+15208
+15209
+15210
+15211
+15212
+15213
+15214
+15215
+15216
+15217
+15218
+15219
+15220
+15221
+15222
+15223
+15224
+15225
+15226
+15227
+15228
+15229
+15230
+15231
+15232
+15233
+15234
+15235
+15236
+15237
+15238
+15239
+15240
+15241
+15242
+15243
+15244
+15245
+15246
+15247
+15248
+15249
+15250
+15251
+15252
+15253
+15254
+15255
+15256
+15257
+15258
+15259
+15260
+15261
+15262
+15263
+15264
+15265
+15266
+15267
+15268
+15269
+15270
+15271
+15272
+15273
+15274
+15275
+15276
+15277
+15278
+15279
+15280
+15281
+15282
+15283
+15284
+15285
+15286
+15287
+15288
+15289
+15290
+15291
+15292
+15293
+15294
+15295
+15296
+15297
+15298
+15299
+15300
+15301
+15302
+15303
+15304
+15305
+15306
+15307
+15308
+15309
+15310
+15311
+15312
+15313
+15314
+15315
+15316
+15317
+15318
+15319
+15320
+15321
+15322
+15323
+15324
+15325
+15326
+15327
+15328
+15329
+15330
+15331
+15332
+15333
+15334
+15335
+15336
+15337
+15338
+15339
+15340
+15341
+15342
+15343
+15344
+15345
+15346
+15347
+15348
+15349
+15350
+15351
+15352
+15353
+15354
+15355
+15356
+15357
+15358
+15359
+15360
+15361
+15362
+15363
+15364
+15365
+15366
+15367
+15368
+15369
+15370
+15371
+15372
+15373
+15374
+15375
+15376
+15377
+15378
+15379
+15380
+15381
+15382
+15383
+15384
+15385
+15386
+15387
+15388
+15389
+15390
+15391
+15392
+15393
+15394
+15395
+15396
+15397
+15398
+15399
+15400
+15401
+15402
+15403
+15404
+15405
+15406
+15407
+15408
+15409
+15410
+15411
+15412
+15413
+15414
+15415
+15416
+15417
+15418
+15419
+15420
+15421
+15422
+15423
+15424
+15425
+15426
+15427
+15428
+15429
+15430
+15431
+15432
+15433
+15434
+15435
+15436
+15437
+15438
+15439
+15440
+15441
+15442
+15443
+15444
+15445
+15446
+15447
+15448
+15449
+15450
+15451
+15452
+15453
+15454
+15455
+15456
+15457
+15458
+15459
+15460
+15461
+15462
+15463
+15464
+15465
+15466
+15467
+15468
+15469
+15470
+15471
+15472
+15473
+15474
+15475
+15476
+15477
+15478
+15479
+15480
+15481
+15482
+15483
+15484
+15485
+15486
+15487
+15488
+15489
+15490
+15491
+15492
+15493
+15494
+15495
+15496
+15497
+15498
+15499
+15500
+15501
+15502
+15503
+15504
+15505
+15506
+15507
+15508
+15509
+15510
+15511
+15512
+15513
+15514
+15515
+15516
+15517
+15518
+15519
+15520
+15521
+15522
+15523
+15524
+15525
+15526
+15527
+15528
+15529
+15530
+15531
+15532
+15533
+15534
+15535
+15536
+15537
+15538
+15539
+15540
+15541
+15542
+15543
+15544
+15545
+15546
+15547
+15548
+15549
+15550
+15551
+15552
+15553
+15554
+15555
+15556
+15557
+15558
+15559
+15560
+15561
+15562
+15563
+15564
+15565
+15566
+15567
+15568
+15569
+15570
+15571
+15572
+15573
+15574
+15575
+15576
+15577
+15578
+15579
+15580
+15581
+15582
+15583
+15584
+15585
+15586
+15587
+15588
+15589
+15590
+15591
+15592
+15593
+15594
+15595
+15596
+15597
+15598
+15599
+15600
+15601
+15602
+15603
+15604
+15605
+15606
+15607
+15608
+15609
+15610
+15611
+15612
+15613
+15614
+15615
+15616
+15617
+15618
+15619
+15620
+15621
+15622
+15623
+15624
+15625
+15626
+15627
+15628
+15629
+15630
+15631
+15632
+15633
+15634
+15635
+15636
+15637
+15638
+15639
+15640
+15641
+15642
+15643
+15644
+15645
+15646
+15647
+15648
+15649
+15650
+15651
+15652
+15653
+15654
+15655
+15656
+15657
+15658
+15659
+15660
+15661
+15662
+15663
+15664
+15665
+15666
+15667
+15668
+15669
+15670
+15671
+15672
+15673
+15674
+15675
+15676
+15677
+15678
+15679
+15680
+15681
+15682
+15683
+15684
+15685
+15686
+15687
+15688
+15689
+15690
+15691
+15692
+15693
+15694
+15695
+15696
+15697
+15698
+15699
+15700
+15701
+15702
+15703
+15704
+15705
+15706
+15707
+15708
+15709
+15710
+15711
+15712
+15713
+15714
+15715
+15716
+15717
+15718
+15719
+15720
+15721
+15722
+15723
+15724
+15725
+15726
+15727
+15728
+15729
+15730
+15731
+15732
+15733
+15734
+15735
+15736
+15737
+15738
+15739
+15740
+15741
+15742
+15743
+15744
+15745
+15746
+15747
+15748
+15749
+15750
+15751
+15752
+15753
+15754
+15755
+15756
+15757
+15758
+15759
+15760
+15761
+15762
+15763
+15764
+15765
+15766
+15767
+15768
+15769
+15770
+15771
+15772
+15773
+15774
+15775
+15776
+15777
+15778
+15779
+15780
+15781
+15782
+15783
+15784
+15785
+15786
+15787
+15788
+15789
+15790
+15791
+15792
+15793
+15794
+15795
+15796
+15797
+15798
+15799
+15800
+15801
+15802
+15803
+15804
+15805
+15806
+15807
+15808
+15809
+15810
+15811
+15812
+15813
+15814
+15815
+15816
+15817
+15818
+15819
+15820
+15821
+15822
+15823
+15824
+15825
+15826
+15827
+15828
+15829
+15830
+15831
+15832
+15833
+15834
+15835
+15836
+15837
+15838
+15839
+15840
+15841
+15842
+15843
+15844
+15845
+15846
+15847
+15848
+15849
+15850
+15851
+15852
+15853
+15854
+15855
+15856
+15857
+15858
+15859
+15860
+15861
+15862
+15863
+15864
+15865
+15866
+15867
+15868
+15869
+15870
+15871
+15872
+15873
+15874
+15875
+15876
+15877
+15878
+15879
+15880
+15881
+15882
+15883
+15884
+15885
+15886
+15887
+15888
+15889
+15890
+15891
+15892
+15893
+15894
+15895
+15896
+15897
+15898
+15899
+15900
+15901
+15902
+15903
+15904
+15905
+15906
+15907
+15908
+15909
+15910
+15911
+15912
+15913
+15914
+15915
+15916
+15917
+15918
+15919
+15920
+15921
+15922
+15923
+15924
+15925
+15926
+15927
+15928
+15929
+15930
+15931
+15932
+15933
+15934
+15935
+15936
+15937
+15938
+15939
+15940
+15941
+15942
+15943
+15944
+15945
+15946
+15947
+15948
+15949
+15950
+15951
+15952
+15953
+15954
+15955
+15956
+15957
+15958
+15959
+15960
+15961
+15962
+15963
+15964
+15965
+15966
+15967
+15968
+15969
+15970
+15971
+15972
+15973
+15974
+15975
+15976
+15977
+15978
+15979
+15980
+15981
+15982
+15983
+15984
+15985
+15986
+15987
+15988
+15989
+15990
+15991
+15992
+15993
+15994
+15995
+15996
+15997
+15998
+15999
+16000
+16001
+16002
+16003
+16004
+16005
+16006
+16007
+16008
+16009
+16010
+16011
+16012
+16013
+16014
+16015
+16016
+16017
+16018
+16019
+16020
+16021
+16022
+16023
+16024
+16025
+16026
+16027
+16028
+16029
+16030
+16031
+16032
+16033
+16034
+16035
+16036
+16037
+16038
+16039
+16040
+16041
+16042
+16043
+16044
+16045
+16046
+16047
+16048
+16049
+16050
+16051
+16052
+16053
+16054
+16055
+16056
+16057
+16058
+16059
+16060
+16061
+16062
+16063
+16064
+16065
+16066
+16067
+16068
+16069
+16070
+16071
+16072
+16073
+16074
+16075
+16076
+16077
+16078
+16079
+16080
+16081
+16082
+16083
+16084
+16085
+16086
+16087
+16088
+16089
+16090
+16091
+16092
+16093
+16094
+16095
+16096
+16097
+16098
+16099
+16100
+16101
+16102
+16103
+16104
+16105
+16106
+16107
+16108
+16109
+16110
+16111
+16112
+16113
+16114
+16115
+16116
+16117
+16118
+16119
+16120
+16121
+16122
+16123
+16124
+16125
+16126
+16127
+16128
+16129
+16130
+16131
+16132
+16133
+16134
+16135
+16136
+16137
+16138
+16139
+16140
+16141
+16142
+16143
+16144
+16145
+16146
+16147
+16148
+16149
+16150
+16151
+16152
+16153
+16154
+16155
+16156
+16157
+16158
+16159
+16160
+16161
+16162
+16163
+16164
+16165
+16166
+16167
+16168
+16169
+16170
+16171
+16172
+16173
+16174
+16175
+16176
+16177
+16178
+16179
+16180
+16181
+16182
+16183
+16184
+16185
+16186
+16187
+16188
+16189
+16190
+16191
+16192
+16193
+16194
+16195
+16196
+16197
+16198
+16199
+16200
+16201
+16202
+16203
+16204
+16205
+16206
+16207
+16208
+16209
+16210
+16211
+16212
+16213
+16214
+16215
+16216
+16217
+16218
+16219
+16220
+16221
+16222
+16223
+16224
+16225
+16226
+16227
+16228
+16229
+16230
+16231
+16232
+16233
+16234
+16235
+16236
+16237
+16238
+16239
+16240
+16241
+16242
+16243
+16244
+16245
+16246
+16247
+16248
+16249
+16250
+16251
+16252
+16253
+16254
+16255
+16256
+16257
+16258
+16259
+16260
+16261
+16262
+16263
+16264
+16265
+16266
+16267
+16268
+16269
+16270
+16271
+16272
+16273
+16274
+16275
+16276
+16277
+16278
+16279
+16280
+16281
+16282
+16283
+16284
+16285
+16286
+16287
+16288
+16289
+16290
+16291
+16292
+16293
+16294
+16295
+16296
+16297
+16298
+16299
+16300
+16301
+16302
+16303
+16304
+16305
+16306
+16307
+16308
+16309
+16310
+16311
+16312
+16313
+16314
+16315
+16316
+16317
+16318
+16319
+16320
+16321
+16322
+16323
+16324
+16325
+16326
+16327
+16328
+16329
+16330
+16331
+16332
+16333
+16334
+16335
+16336
+16337
+16338
+16339
+16340
+16341
+16342
+16343
+16344
+16345
+16346
+16347
+16348
+16349
+16350
+16351
+16352
+16353
+16354
+16355
+16356
+16357
+16358
+16359
+16360
+16361
+16362
+16363
+16364
+16365
+16366
+16367
+16368
+16369
+16370
+16371
+16372
+16373
+16374
+16375
+16376
+16377
+16378
+16379
+16380
+16381
+16382
+16383
+16384
+16385
+16386
+16387
+16388
+16389
+16390
+16391
+16392
+16393
+16394
+16395
+16396
+16397
+16398
+16399
+16400
+16401
+16402
+16403
+16404
+16405
+16406
+16407
+16408
+16409
+16410
+16411
+16412
+16413
+16414
+16415
+16416
+16417
+16418
+16419
+16420
+16421
+16422
+16423
+16424
+16425
+16426
+16427
+16428
+16429
+16430
+16431
+16432
+16433
+16434
+16435
+16436
+16437
+16438
+16439
+16440
+16441
+16442
+16443
+16444
+16445
+16446
+16447
+16448
+16449
+16450
+16451
+16452
+16453
+16454
+16455
+16456
+16457
+16458
+16459
+16460
+16461
+16462
+16463
+16464
+16465
+16466
+16467
+16468
+16469
+16470
+16471
+16472
+16473
+16474
+16475
+16476
+16477
+16478
+16479
+16480
+16481
+16482
+16483
+16484
+16485
+16486
+16487
+16488
+16489
+16490
+16491
+16492
+16493
+16494
+16495
+16496
+16497
+16498
+16499
+16500
+16501
+16502
+16503
+16504
+16505
+16506
+16507
+16508
+16509
+16510
+16511
+16512
+16513
+16514
+16515
+16516
+16517
+16518
+16519
+16520
+16521
+16522
+16523
+16524
+16525
+16526
+16527
+16528
+16529
+16530
+16531
+16532
+16533
+16534
+16535
+16536
+16537
+16538
+16539
+16540
+16541
+16542
+16543
+16544
+16545
+16546
+16547
+16548
+16549
+16550
+16551
+16552
+16553
+16554
+16555
+16556
+16557
+16558
+16559
+16560
+16561
+16562
+16563
+16564
+16565
+16566
+16567
+16568
+16569
+16570
+16571
+16572
+16573
+16574
+16575
+16576
+16577
+16578
+16579
+16580
+16581
+16582
+16583
+16584
+16585
+16586
+16587
+16588
+16589
+16590
+16591
+16592
+16593
+16594
+16595
+16596
+16597
+16598
+16599
+16600
+16601
+16602
+16603
+16604
+16605
+16606
+16607
+16608
+16609
+16610
+16611
+16612
+16613
+16614
+16615
+16616
+16617
+16618
+16619
+16620
+16621
+16622
+16623
+16624
+16625
+16626
+16627
+16628
+16629
+16630
+16631
+16632
+16633
+16634
+16635
+16636
+16637
+16638
+16639
+16640
+16641
+16642
+16643
+16644
+16645
+16646
+16647
+16648
+16649
+16650
+16651
+16652
+16653
+16654
+16655
+16656
+16657
+16658
+16659
+16660
+16661
+16662
+16663
+16664
+16665
+16666
+16667
+16668
+16669
+16670
+16671
+16672
+16673
+16674
+16675
+16676
+16677
+16678
+16679
+16680
+16681
+16682
+16683
+16684
+16685
+16686
+16687
+16688
+16689
+16690
+16691
+16692
+16693
+16694
+16695
+16696
+16697
+16698
+16699
+16700
+16701
+16702
+16703
+16704
+16705
+16706
+16707
+16708
+16709
+16710
+16711
+16712
+16713
+16714
+16715
+16716
+16717
+16718
+16719
+16720
+16721
+16722
+16723
+16724
+16725
+16726
+16727
+16728
+16729
+16730
+16731
+16732
+16733
+16734
+16735
+16736
+16737
+16738
+16739
+16740
+16741
+16742
+16743
+16744
+16745
+16746
+16747
+16748
+16749
+16750
+16751
+16752
+16753
+16754
+16755
+16756
+16757
+16758
+16759
+16760
+16761
+16762
+16763
+16764
+16765
+16766
+16767
+16768
+16769
+16770
+16771
+16772
+16773
+16774
+16775
+16776
+16777
+16778
+16779
+16780
+16781
+16782
+16783
+16784
+16785
+16786
+16787
+16788
+16789
+16790
+16791
+16792
+16793
+16794
+16795
+16796
+16797
+16798
+16799
+16800
+16801
+16802
+16803
+16804
+16805
+16806
+16807
+16808
+16809
+16810
+16811
+16812
+16813
+16814
+16815
+16816
+16817
+16818
+16819
+16820
+16821
+16822
+16823
+16824
+16825
+16826
+16827
+16828
+16829
+16830
+16831
+16832
+16833
+16834
+16835
+16836
+16837
+16838
+16839
+16840
+16841
+16842
+16843
+16844
+16845
+16846
+16847
+16848
+16849
+16850
+16851
+16852
+16853
+16854
+16855
+16856
+16857
+16858
+16859
+16860
+16861
+16862
+16863
+16864
+16865
+16866
+16867
+16868
+16869
+16870
+16871
+16872
+16873
+16874
+16875
+16876
+16877
+16878
+16879
+16880
+16881
+16882
+16883
+16884
+16885
+16886
+16887
+16888
+16889
+16890
+16891
+16892
+16893
+16894
+16895
+16896
+16897
+16898
+16899
+16900
+16901
+16902
+16903
+16904
+16905
+16906
+16907
+16908
+16909
+16910
+16911
+16912
+16913
+16914
+16915
+16916
+16917
+16918
+16919
+16920
+16921
+16922
+16923
+16924
+16925
+16926
+16927
+16928
+16929
+16930
+16931
+16932
+16933
+16934
+16935
+16936
+16937
+16938
+16939
+16940
+16941
+16942
+16943
+16944
+16945
+16946
+16947
+16948
+16949
+16950
+16951
+16952
+16953
+16954
+16955
+16956
+16957
+16958
+16959
+16960
+16961
+16962
+16963
+16964
+16965
+16966
+16967
+16968
+16969
+16970
+16971
+16972
+16973
+16974
+16975
+16976
+16977
+16978
+16979
+16980
+16981
+16982
+16983
+16984
+16985
+16986
+16987
+16988
+16989
+16990
+16991
+16992
+16993
+16994
+16995
+16996
+16997
+16998
+16999
+17000
+17001
+17002
+17003
+17004
+17005
+17006
+17007
+17008
+17009
+17010
+17011
+17012
+17013
+17014
+17015
+17016
+17017
+17018
+17019
+17020
+17021
+17022
+17023
+17024
+17025
+17026
+17027
+17028
+17029
+17030
+17031
+17032
+17033
+17034
+17035
+17036
+17037
+17038
+17039
+17040
+17041
+17042
+17043
+17044
+17045
+17046
+17047
+17048
+17049
+17050
+17051
+17052
+17053
+17054
+17055
+17056
+17057
+17058
+17059
+17060
+17061
+17062
+17063
+17064
+17065
+17066
+17067
+17068
+17069
+17070
+17071
+17072
+17073
+17074
+17075
+17076
+17077
+17078
+17079
+17080
+17081
+17082
+17083
+17084
+17085
+17086
+17087
+17088
+17089
+17090
+17091
+17092
+17093
+17094
+17095
+17096
+17097
+17098
+17099
+17100
+17101
+17102
+17103
+17104
+17105
+17106
+17107
+17108
+17109
+17110
+17111
+17112
+17113
+17114
+17115
+17116
+17117
+17118
+17119
+17120
+17121
+17122
+17123
+17124
+17125
+17126
+17127
+17128
+17129
+17130
+17131
+17132
+17133
+17134
+17135
+17136
+17137
+17138
+17139
+17140
+17141
+17142
+17143
+17144
+17145
+17146
+17147
+17148
+17149
+17150
+17151
+17152
+17153
+17154
+17155
+17156
+17157
+17158
+17159
+17160
+17161
+17162
+17163
+17164
+17165
+17166
+17167
+17168
+17169
+17170
+17171
+17172
+17173
+17174
+17175
+17176
+17177
+17178
+17179
+17180
+17181
+17182
+17183
+17184
+17185
+17186
+17187
+17188
+17189
+17190
+17191
+17192
+17193
+17194
+17195
+17196
+17197
+17198
+17199
+17200
+17201
+17202
+17203
+17204
+17205
+17206
+17207
+17208
+17209
+17210
+17211
+17212
+17213
+17214
+17215
+17216
+17217
+17218
+17219
+17220
+17221
+17222
+17223
+17224
+17225
+17226
+17227
+17228
+17229
+17230
+17231
+17232
+17233
+17234
+17235
+17236
+17237
+17238
+17239
+17240
+17241
+17242
+17243
+17244
+17245
+17246
+17247
+17248
+17249
+17250
+17251
+17252
+17253
+17254
+17255
+17256
+17257
+17258
+17259
+17260
+17261
+17262
+17263
+17264
+17265
+17266
+17267
+17268
+17269
+17270
+17271
+17272
+17273
+17274
+17275
+17276
+17277
+17278
+17279
+17280
+17281
+17282
+17283
+17284
+17285
+17286
+17287
+17288
+17289
+17290
+17291
+17292
+17293
+17294
+17295
+17296
+17297
+17298
+17299
+17300
+17301
+17302
+17303
+17304
+17305
+17306
+17307
+17308
+17309
+17310
+17311
+17312
+17313
+17314
+17315
+17316
+17317
+17318
+17319
+17320
+17321
+17322
+17323
+17324
+17325
+17326
+17327
+17328
+17329
+17330
+17331
+17332
+17333
+17334
+17335
+17336
+17337
+17338
+17339
+17340
+17341
+17342
+17343
+17344
+17345
+17346
+17347
+17348
+17349
+17350
+17351
+17352
+17353
+17354
+17355
+17356
+17357
+17358
+17359
+17360
+17361
+17362
+17363
+17364
+17365
+17366
+17367
+17368
+17369
+17370
+17371
+17372
+17373
+17374
+17375
+17376
+17377
+17378
+17379
+17380
+17381
+17382
+17383
+17384
+17385
+17386
+17387
+17388
+17389
+17390
+17391
+17392
+17393
+17394
+17395
+17396
+17397
+17398
+17399
+17400
+17401
+17402
+17403
+17404
+17405
+17406
+17407
+17408
+17409
+17410
+17411
+17412
+17413
+17414
+17415
+17416
+17417
+17418
+17419
+17420
+17421
+17422
+17423
+17424
+17425
+17426
+17427
+17428
+17429
+17430
+17431
+17432
+17433
+17434
+17435
+17436
+17437
+17438
+17439
+17440
+17441
+17442
+17443
+17444
+17445
+17446
+17447
+17448
+17449
+17450
+17451
+17452
+17453
+17454
+17455
+17456
+17457
+17458
+17459
+17460
+17461
+17462
+17463
+17464
+17465
+17466
+17467
+17468
+17469
+17470
+17471
+17472
+17473
+17474
+17475
+17476
+17477
+17478
+17479
+17480
+17481
+17482
+17483
+17484
+17485
+17486
+17487
+17488
+17489
+17490
+17491
+17492
+17493
+17494
+17495
+17496
+17497
+17498
+17499
+17500
+17501
+17502
+17503
+17504
+17505
+17506
+17507
+17508
+17509
+17510
+17511
+17512
+17513
+17514
+17515
+17516
+17517
+17518
+17519
+17520
+17521
+17522
+17523
+17524
+17525
+17526
+17527
+17528
+17529
+17530
+17531
+17532
+17533
+17534
+17535
+17536
+17537
+17538
+17539
+17540
+17541
+17542
+17543
+17544
+17545
+17546
+17547
+17548
+17549
+17550
+17551
+17552
+17553
+17554
+17555
+17556
+17557
+17558
+17559
+17560
+17561
+17562
+17563
+17564
+17565
+17566
+17567
+17568
+17569
+17570
+17571
+17572
+17573
+17574
+17575
+17576
+17577
+17578
+17579
+17580
+17581
+17582
+17583
+17584
+17585
+17586
+17587
+17588
+17589
+17590
+17591
+17592
+17593
+17594
+17595
+17596
+17597
+17598
+17599
+17600
+17601
+17602
+17603
+17604
+17605
+17606
+17607
+17608
+17609
+17610
+17611
+17612
+17613
+17614
+17615
+17616
+17617
+17618
+17619
+17620
+17621
+17622
+17623
+17624
+17625
+17626
+17627
+17628
+17629
+17630
+17631
+17632
+17633
+17634
+17635
+17636
+17637
+17638
+17639
+17640
+17641
+17642
+17643
+17644
+17645
+17646
+17647
+17648
+17649
+17650
+17651
+17652
+17653
+17654
+17655
+17656
+17657
+17658
+17659
+17660
+17661
+17662
+17663
+17664
+17665
+17666
+17667
+17668
+17669
+17670
+17671
+17672
+17673
+17674
+17675
+17676
+17677
+17678
+17679
+17680
+17681
+17682
+17683
+17684
+17685
+17686
+17687
+17688
+17689
+17690
+17691
+17692
+17693
+17694
+17695
+17696
+17697
+17698
+17699
+17700
+17701
+17702
+17703
+17704
+17705
+17706
+17707
+17708
+17709
+17710
+17711
+17712
+17713
+17714
+17715
+17716
+17717
+17718
+17719
+17720
+17721
+17722
+17723
+17724
+17725
+17726
+17727
+17728
+17729
+17730
+17731
+17732
+17733
+17734
+17735
+17736
+17737
+17738
+17739
+17740
+17741
+17742
+17743
+17744
+17745
+17746
+17747
+17748
+17749
+17750
+17751
+17752
+17753
+17754
+17755
+17756
+17757
+17758
+17759
+17760
+17761
+17762
+17763
+17764
+17765
+17766
+17767
+17768
+17769
+17770
+17771
+17772
+17773
+17774
+17775
+17776
+17777
+17778
+17779
+17780
+17781
+17782
+17783
+17784
+17785
+17786
+17787
+17788
+17789
+17790
+17791
+17792
+17793
+17794
+17795
+17796
+17797
+17798
+17799
+17800
+17801
+17802
+17803
+17804
+17805
+17806
+17807
+17808
+17809
+17810
+17811
+17812
+17813
+17814
+17815
+17816
+17817
+17818
+17819
+17820
+17821
+17822
+17823
+17824
+17825
+17826
+17827
+17828
+17829
+17830
+17831
+17832
+17833
+17834
+17835
+17836
+17837
+17838
+17839
+17840
+17841
+17842
+17843
+17844
+17845
+17846
+17847
+17848
+17849
+17850
+17851
+17852
+17853
+17854
+17855
+17856
+17857
+17858
+17859
+17860
+17861
+17862
+17863
+17864
+17865
+17866
+17867
+17868
+17869
+17870
+17871
+17872
+17873
+17874
+17875
+17876
+17877
+17878
+17879
+17880
+17881
+17882
+17883
+17884
+17885
+17886
+17887
+17888
+17889
+17890
+17891
+17892
+17893
+17894
+17895
+17896
+17897
+17898
+17899
+17900
+17901
+17902
+17903
+17904
+17905
+17906
+17907
+17908
+17909
+17910
+17911
+17912
+17913
+17914
+17915
+17916
+17917
+17918
+17919
+17920
+17921
+17922
+17923
+17924
+17925
+17926
+17927
+17928
+17929
+17930
+17931
+17932
+17933
+17934
+17935
+17936
+17937
+17938
+17939
+17940
+17941
+17942
+17943
+17944
+17945
+17946
+17947
+17948
+17949
+17950
+17951
+17952
+17953
+17954
+17955
+17956
+17957
+17958
+17959
+17960
+17961
+17962
+17963
+17964
+17965
+17966
+17967
+17968
+17969
+17970
+17971
+17972
+17973
+17974
+17975
+17976
+17977
+17978
+17979
+17980
+17981
+17982
+17983
+17984
+17985
+17986
+17987
+17988
+17989
+17990
+17991
+17992
+17993
+17994
+17995
+17996
+17997
+17998
+17999
+18000
+18001
+18002
+18003
+18004
+18005
+18006
+18007
+18008
+18009
+18010
+18011
+18012
+18013
+18014
+18015
+18016
+18017
+18018
+18019
+18020
+18021
+18022
+18023
+18024
+18025
+18026
+18027
+18028
+18029
+18030
+18031
+18032
+18033
+18034
+18035
+18036
+18037
+18038
+18039
+18040
+18041
+18042
+18043
+18044
+18045
+18046
+18047
+18048
+18049
+18050
+18051
+18052
+18053
+18054
+18055
+18056
+18057
+18058
+18059
+18060
+18061
+18062
+18063
+18064
+18065
+18066
+18067
+18068
+18069
+18070
+18071
+18072
+18073
+18074
+18075
+18076
+18077
+18078
+18079
+18080
+18081
+18082
+18083
+18084
+18085
+18086
+18087
+18088
+18089
+18090
+18091
+18092
+18093
+18094
+18095
+18096
+18097
+18098
+18099
+18100
+18101
+18102
+18103
+18104
+18105
+18106
+18107
+18108
+18109
+18110
+18111
+18112
+18113
+18114
+18115
+18116
+18117
+18118
+18119
+18120
+18121
+18122
+18123
+18124
+18125
+18126
+18127
+18128
+18129
+18130
+18131
+18132
+18133
+18134
+18135
+18136
+18137
+18138
+18139
+18140
+18141
+18142
+18143
+18144
+18145
+18146
+18147
+18148
+18149
+18150
+18151
+18152
+18153
+18154
+18155
+18156
+18157
+18158
+18159
+18160
+18161
+18162
+18163
+18164
+18165
+18166
+18167
+18168
+18169
+18170
+18171
+18172
+18173
+18174
+18175
+18176
+18177
+18178
+18179
+18180
+18181
+18182
+18183
+18184
+18185
+18186
+18187
+18188
+18189
+18190
+18191
+18192
+18193
+18194
+18195
+18196
+18197
+18198
+18199
+18200
+18201
+18202
+18203
+18204
+18205
+18206
+18207
+18208
+18209
+18210
+18211
+18212
+18213
+18214
+18215
+18216
+18217
+18218
+18219
+18220
+18221
+18222
+18223
+18224
+18225
+18226
+18227
+18228
+18229
+18230
+18231
+18232
+18233
+18234
+18235
+18236
+18237
+18238
+18239
+18240
+18241
+18242
+18243
+18244
+18245
+18246
+18247
+18248
+18249
+18250
+18251
+18252
+18253
+18254
+18255
+18256
+18257
+18258
+18259
+18260
+18261
+18262
+18263
+18264
+18265
+18266
+18267
+18268
+18269
+18270
+18271
+18272
+18273
+18274
+18275
+18276
+18277
+18278
+18279
+18280
+18281
+18282
+18283
+18284
+18285
+18286
+18287
+18288
+18289
+18290
+18291
+18292
+18293
+18294
+18295
+18296
+18297
+18298
+18299
+18300
+18301
+18302
+18303
+18304
+18305
+18306
+18307
+18308
+18309
+18310
+18311
+18312
+18313
+18314
+18315
+18316
+18317
+18318
+18319
+18320
+18321
+18322
+18323
+18324
+18325
+18326
+18327
+18328
+18329
+18330
+18331
+18332
+18333
+18334
+18335
+18336
+18337
+18338
+18339
+18340
+18341
+18342
+18343
+18344
+18345
+18346
+18347
+18348
+18349
+18350
+18351
+18352
+18353
+18354
+18355
+18356
+18357
+18358
+18359
+18360
+18361
+18362
+18363
+18364
+18365
+18366
+18367
+18368
+18369
+18370
+18371
+18372
+18373
+18374
+18375
+18376
+18377
+18378
+18379
+18380
+18381
+18382
+18383
+18384
+18385
+18386
+18387
+18388
+18389
+18390
+18391
+18392
+18393
+18394
+18395
+18396
+18397
+18398
+18399
+18400
+18401
+18402
+18403
+18404
+18405
+18406
+18407
+18408
+18409
+18410
+18411
+18412
+18413
+18414
+18415
+18416
+18417
+18418
+18419
+18420
+18421
+18422
+18423
+18424
+18425
+18426
+18427
+18428
+18429
+18430
+18431
+18432
+18433
+18434
+18435
+18436
+18437
+18438
+18439
+18440
+18441
+18442
+18443
+18444
+18445
+18446
+18447
+18448
+18449
+18450
+18451
+18452
+18453
+18454
+18455
+18456
+18457
+18458
+18459
+18460
+18461
+18462
+18463
+18464
+18465
+18466
+18467
+18468
+18469
+18470
+18471
+18472
+18473
+18474
+18475
+18476
+18477
+18478
+18479
+18480
+18481
+18482
+18483
+18484
+18485
+18486
+18487
+18488
+18489
+18490
+18491
+18492
+18493
+18494
+18495
+18496
+18497
+18498
+18499
+18500
+18501
+18502
+18503
+18504
+18505
+18506
+18507
+18508
+18509
+18510
+18511
+18512
+18513
+18514
+18515
+18516
+18517
+18518
+18519
+18520
+18521
+18522
+18523
+18524
+18525
+18526
+18527
+18528
+18529
+18530
+18531
+18532
+18533
+18534
+18535
+18536
+18537
+18538
+18539
+18540
+18541
+18542
+18543
+18544
+18545
+18546
+18547
+18548
+18549
+18550
+18551
+18552
+18553
+18554
+18555
+18556
+18557
+18558
+18559
+18560
+18561
+18562
+18563
+18564
+18565
+18566
+18567
+18568
+18569
+18570
+18571
+18572
+18573
+18574
+18575
+18576
+18577
+18578
+18579
+18580
+18581
+18582
+18583
+18584
+18585
+18586
+18587
+18588
+18589
+18590
+18591
+18592
+18593
+18594
+18595
+18596
+18597
+18598
+18599
+18600
+18601
+18602
+18603
+18604
+18605
+18606
+18607
+18608
+18609
+18610
+18611
+18612
+18613
+18614
+18615
+18616
+18617
+18618
+18619
+18620
+18621
+18622
+18623
+18624
+18625
+18626
+18627
+18628
+18629
+18630
+18631
+18632
+18633
+18634
+18635
+18636
+18637
+18638
+18639
+18640
+18641
+18642
+18643
+18644
+18645
+18646
+18647
+18648
+18649
+18650
+18651
+18652
+18653
+18654
+18655
+18656
+18657
+18658
+18659
+18660
+18661
+18662
+18663
+18664
+18665
+18666
+18667
+18668
+18669
+18670
+18671
+18672
+18673
+18674
+18675
+18676
+18677
+18678
+18679
+18680
+18681
+18682
+18683
+18684
+18685
+18686
+18687
+18688
+18689
+18690
+18691
+18692
+18693
+18694
+18695
+18696
+18697
+18698
+18699
+18700
+18701
+18702
+18703
+18704
+18705
+18706
+18707
+18708
+18709
+18710
+18711
+18712
+18713
+18714
+18715
+18716
+18717
+18718
+18719
+18720
+18721
+18722
+18723
+18724
+18725
+18726
+18727
+18728
+18729
+18730
+18731
+18732
+18733
+18734
+18735
+18736
+18737
+18738
+18739
+18740
+18741
+18742
+18743
+18744
+18745
+18746
+18747
+18748
+18749
+18750
+18751
+18752
+18753
+18754
+18755
+18756
+18757
+18758
+18759
+18760
+18761
+18762
+18763
+18764
+18765
+18766
+18767
+18768
+18769
+18770
+18771
+18772
+18773
+18774
+18775
+18776
+18777
+18778
+18779
+18780
+18781
+18782
+18783
+18784
+18785
+18786
+18787
+18788
+18789
+18790
+18791
+18792
+18793
+18794
+18795
+18796
+18797
+18798
+18799
+18800
+18801
+18802
+18803
+18804
+18805
+18806
+18807
+18808
+18809
+18810
+18811
+18812
+18813
+18814
+18815
+18816
+18817
+18818
+18819
+18820
+18821
+18822
+18823
+18824
+18825
+18826
+18827
+18828
+18829
+18830
+18831
+18832
+18833
+18834
+18835
+18836
+18837
+18838
+18839
+18840
+18841
+18842
+18843
+18844
+18845
+18846
+18847
+18848
+18849
+18850
+18851
+18852
+18853
+18854
+18855
+18856
+18857
+18858
+18859
+18860
+18861
+18862
+18863
+18864
+18865
+18866
+18867
+18868
+18869
+18870
+18871
+18872
+18873
+18874
+18875
+18876
+18877
+18878
+18879
+18880
+18881
+18882
+18883
+18884
+18885
+18886
+18887
+18888
+18889
+18890
+18891
+18892
+18893
+18894
+18895
+18896
+18897
+18898
+18899
+18900
+18901
+18902
+18903
+18904
+18905
+18906
+18907
+18908
+18909
+18910
+18911
+18912
+18913
+18914
+18915
+18916
+18917
+18918
+18919
+18920
+18921
+18922
+18923
+18924
+18925
+18926
+18927
+18928
+18929
+18930
+18931
+18932
+18933
+18934
+18935
+18936
+18937
+18938
+18939
+18940
+18941
+18942
+18943
+18944
+18945
+18946
+18947
+18948
+18949
+18950
+18951
+18952
+18953
+18954
+18955
+18956
+18957
+18958
+18959
+18960
+18961
+18962
+18963
+18964
+18965
+18966
+18967
+18968
+18969
+18970
+18971
+18972
+18973
+18974
+18975
+18976
+18977
+18978
+18979
+18980
+18981
+18982
+18983
+18984
+18985
+18986
+18987
+18988
+18989
+18990
+18991
+18992
+18993
+18994
+18995
+18996
+18997
+18998
+18999
+19000
+19001
+19002
+19003
+19004
+19005
+19006
+19007
+19008
+19009
+19010
+19011
+19012
+19013
+19014
+19015
+19016
+19017
+19018
+19019
+19020
+19021
+19022
+19023
+19024
+19025
+19026
+19027
+19028
+19029
+19030
+19031
+19032
+19033
+19034
+19035
+19036
+19037
+19038
+19039
+19040
+19041
+19042
+19043
+19044
+19045
+19046
+19047
+19048
+19049
+19050
+19051
+19052
+19053
+19054
+19055
+19056
+19057
+19058
+19059
+19060
+19061
+19062
+19063
+19064
+19065
+19066
+19067
+19068
+19069
+19070
+19071
+19072
+19073
+19074
+19075
+19076
+19077
+19078
+19079
+19080
+19081
+19082
+19083
+19084
+19085
+19086
+19087
+19088
+19089
+19090
+19091
+19092
+19093
+19094
+19095
+19096
+19097
+19098
+19099
+19100
+19101
+19102
+19103
+19104
+19105
+19106
+19107
+19108
+19109
+19110
+19111
+19112
+19113
+19114
+19115
+19116
+19117
+19118
+19119
+19120
+19121
+19122
+19123
+19124
+19125
+19126
+19127
+19128
+19129
+19130
+19131
+19132
+19133
+19134
+19135
+19136
+19137
+19138
+19139
+19140
+19141
+19142
+19143
+19144
+19145
+19146
+19147
+19148
+19149
+19150
+19151
+19152
+19153
+19154
+19155
+19156
+19157
+19158
+19159
+19160
+19161
+19162
+19163
+19164
+19165
+19166
+19167
+19168
+19169
+19170
+19171
+19172
+19173
+19174
+19175
+19176
+19177
+19178
+19179
+19180
+19181
+19182
+19183
+19184
+19185
+19186
+19187
+19188
+19189
+19190
+19191
+19192
+19193
+19194
+19195
+19196
+19197
+19198
+19199
+19200
+19201
+19202
+19203
+19204
+19205
+19206
+19207
+19208
+19209
+19210
+19211
+19212
+19213
+19214
+19215
+19216
+19217
+19218
+19219
+19220
+19221
+19222
+19223
+19224
+19225
+19226
+19227
+19228
+19229
+19230
+19231
+19232
+19233
+19234
+19235
+19236
+19237
+19238
+19239
+19240
+19241
+19242
+19243
+19244
+19245
+19246
+19247
+19248
+19249
+19250
+19251
+19252
+19253
+19254
+19255
+19256
+19257
+19258
+19259
+19260
+19261
+19262
+19263
+19264
+19265
+19266
+19267
+19268
+19269
+19270
+19271
+19272
+19273
+19274
+19275
+19276
+19277
+19278
+19279
+19280
+19281
+19282
+19283
+19284
+19285
+19286
+19287
+19288
+19289
+19290
+19291
+19292
+19293
+19294
+19295
+19296
+19297
+19298
+19299
+19300
+19301
+19302
+19303
+19304
+19305
+19306
+19307
+19308
+19309
+19310
+19311
+19312
+19313
+19314
+19315
+19316
+19317
+19318
+19319
+19320
+19321
+19322
+19323
+19324
+19325
+19326
+19327
+19328
+19329
+19330
+19331
+19332
+19333
+19334
+19335
+19336
+19337
+19338
+19339
+19340
+19341
+19342
+19343
+19344
+19345
+19346
+19347
+19348
+19349
+19350
+19351
+19352
+19353
+19354
+19355
+19356
+19357
+19358
+19359
+19360
+19361
+19362
+19363
+19364
+19365
+19366
+19367
+19368
+19369
+19370
+19371
+19372
+19373
+19374
+19375
+19376
+19377
+19378
+19379
+19380
+19381
+19382
+19383
+19384
+19385
+19386
+19387
+19388
+19389
+19390
+19391
+19392
+19393
+19394
+19395
+19396
+19397
+19398
+19399
+19400
+19401
+19402
+19403
+19404
+19405
+19406
+19407
+19408
+19409
+19410
+19411
+19412
+19413
+19414
+19415
+19416
+19417
+19418
+19419
+19420
+19421
+19422
+19423
+19424
+19425
+19426
+19427
+19428
+19429
+19430
+19431
+19432
+19433
+19434
+19435
+19436
+19437
+19438
+19439
+19440
+19441
+19442
+19443
+19444
+19445
+19446
+19447
+19448
+19449
+19450
+19451
+19452
+19453
+19454
+19455
+19456
+19457
+19458
+19459
+19460
+19461
+19462
+19463
+19464
+19465
+19466
+19467
+19468
+19469
+19470
+19471
+19472
+19473
+19474
+19475
+19476
+19477
+19478
+19479
+19480
+19481
+19482
+19483
+19484
+19485
+19486
+19487
+19488
+19489
+19490
+19491
+19492
+19493
+19494
+19495
+19496
+19497
+19498
+19499
+19500
+19501
+19502
+19503
+19504
+19505
+19506
+19507
+19508
+19509
+19510
+19511
+19512
+19513
+19514
+19515
+19516
+19517
+19518
+19519
+19520
+19521
+19522
+19523
+19524
+19525
+19526
+19527
+19528
+19529
+19530
+19531
+19532
+19533
+19534
+19535
+19536
+19537
+19538
+19539
+19540
+19541
+19542
+19543
+19544
+19545
+19546
+19547
+19548
+19549
+19550
+19551
+19552
+19553
+19554
+19555
+19556
+19557
+19558
+19559
+19560
+19561
+19562
+19563
+19564
+19565
+19566
+19567
+19568
+19569
+19570
+19571
+19572
+19573
+19574
+19575
+19576
+19577
+19578
+19579
+19580
+19581
+19582
+19583
+19584
+19585
+19586
+19587
+19588
+19589
+19590
+19591
+19592
+19593
+19594
+19595
+19596
+19597
+19598
+19599
+19600
+19601
+19602
+19603
+19604
+19605
+19606
+19607
+19608
+19609
+19610
+19611
+19612
+19613
+19614
+19615
+19616
+19617
+19618
+19619
+19620
+19621
+19622
+19623
+19624
+19625
+19626
+19627
+19628
+19629
+19630
+19631
+19632
+19633
+19634
+19635
+19636
+19637
+19638
+19639
+19640
+19641
+19642
+19643
+19644
+19645
+19646
+19647
+19648
+19649
+19650
+19651
+19652
+19653
+19654
+19655
+19656
+19657
+19658
+19659
+19660
+19661
+19662
+19663
+19664
+19665
+19666
+19667
+19668
+19669
+19670
+19671
+19672
+19673
+19674
+19675
+19676
+19677
+19678
+19679
+19680
+19681
+19682
+19683
+19684
+19685
+19686
+19687
+19688
+19689
+19690
+19691
+19692
+19693
+19694
+19695
+19696
+19697
+19698
+19699
+19700
+19701
+19702
+19703
+19704
+19705
+19706
+19707
+19708
+19709
+19710
+19711
+19712
+19713
+19714
+19715
+19716
+19717
+19718
+19719
+19720
+19721
+19722
+19723
+19724
+19725
+19726
+19727
+19728
+19729
+19730
+19731
+19732
+19733
+19734
+19735
+19736
+19737
+19738
+19739
+19740
+19741
+19742
+19743
+19744
+19745
+19746
+19747
+19748
+19749
+19750
+19751
+19752
+19753
+19754
+19755
+19756
+19757
+19758
+19759
+19760
+19761
+19762
+19763
+19764
+19765
+19766
+19767
+19768
+19769
+19770
+19771
+19772
+19773
+19774
+19775
+19776
+19777
+19778
+19779
+19780
+19781
+19782
+19783
+19784
+19785
+19786
+19787
+19788
+19789
+19790
+19791
+19792
+19793
+19794
+19795
+19796
+19797
+19798
+19799
+19800
+19801
+19802
+19803
+19804
+19805
+19806
+19807
+19808
+19809
+19810
+19811
+19812
+19813
+19814
+19815
+19816
+19817
+19818
+19819
+19820
+19821
+19822
+19823
+19824
+19825
+19826
+19827
+19828
+19829
+19830
+19831
+19832
+19833
+19834
+19835
+19836
+19837
+19838
+19839
+19840
+19841
+19842
+19843
+19844
+19845
+19846
+19847
+19848
+19849
+19850
+19851
+19852
+19853
+19854
+19855
+19856
+19857
+19858
+19859
+19860
+19861
+19862
+19863
+19864
+19865
+19866
+19867
+19868
+19869
+19870
+19871
+19872
+19873
+19874
+19875
+19876
+19877
+19878
+19879
+19880
+19881
+19882
+19883
+19884
+19885
+19886
+19887
+19888
+19889
+19890
+19891
+19892
+19893
+19894
+19895
+19896
+19897
+19898
+19899
+19900
+19901
+19902
+19903
+19904
+19905
+19906
+19907
+19908
+19909
+19910
+19911
+19912
+19913
+19914
+19915
+19916
+19917
+19918
+19919
+19920
+19921
+19922
+19923
+19924
+19925
+19926
+19927
+19928
+19929
+19930
+19931
+19932
+19933
+19934
+19935
+19936
+19937
+19938
+19939
+19940
+19941
+19942
+19943
+19944
+19945
+19946
+19947
+19948
+19949
+19950
+19951
+19952
+19953
+19954
+19955
+19956
+19957
+19958
+19959
+19960
+19961
+19962
+19963
+19964
+19965
+19966
+19967
+19968
+19969
+19970
+19971
+19972
+19973
+19974
+19975
+19976
+19977
+19978
+19979
+19980
+19981
+19982
+19983
+19984
+19985
+19986
+19987
+19988
+19989
+19990
+19991
+19992
+19993
+19994
+19995
+19996
+19997
+19998
+19999
+20000
+20001
+20002
+20003
+20004
+20005
+20006
+20007
+20008
+20009
+20010
+20011
+20012
+20013
+20014
+20015
+20016
+20017
+20018
+20019
+20020
+20021
+20022
+20023
+20024
+20025
+20026
+20027
+20028
+20029
+20030
+20031
+20032
+20033
+20034
+20035
+20036
+20037
+20038
+20039
+20040
+20041
+20042
+20043
+20044
+20045
+20046
+20047
+20048
+20049
+20050
+20051
+20052
+20053
+20054
+20055
+20056
+20057
+20058
+20059
+20060
+20061
+20062
+20063
+20064
+20065
+20066
+20067
+20068
+20069
+20070
+20071
+20072
+20073
+20074
+20075
+20076
+20077
+20078
+20079
+20080
+20081
+20082
+20083
+20084
+20085
+20086
+20087
+20088
+20089
+20090
+20091
+20092
+20093
+20094
+20095
+20096
+20097
+20098
+20099
+20100
+20101
+20102
+20103
+20104
+20105
+20106
+20107
+20108
+20109
+20110
+20111
+20112
+20113
+20114
+20115
+20116
+20117
+20118
+20119
+20120
+20121
+20122
+20123
+20124
+20125
+20126
+20127
+20128
+20129
+20130
+20131
+20132
+20133
+20134
+20135
+20136
+20137
+20138
+20139
+20140
+20141
+20142
+20143
+20144
+20145
+20146
+20147
+20148
+20149
+20150
+20151
+20152
+20153
+20154
+20155
+20156
+20157
+20158
+20159
+20160
+20161
+20162
+20163
+20164
+20165
+20166
+20167
+20168
+20169
+20170
+20171
+20172
+20173
+20174
+20175
+20176
+20177
+20178
+20179
+20180
+20181
+20182
+20183
+20184
+20185
+20186
+20187
+20188
+20189
+20190
+20191
+20192
+20193
+20194
+20195
+20196
+20197
+20198
+20199
+20200
+20201
+20202
+20203
+20204
+20205
+20206
+20207
+20208
+20209
+20210
+20211
+20212
+20213
+20214
+20215
+20216
+20217
+20218
+20219
+20220
+20221
+20222
+20223
+20224
+20225
+20226
+20227
+20228
+20229
+20230
+20231
+20232
+20233
+20234
+20235
+20236
+20237
+20238
+20239
+20240
+20241
+20242
+20243
+20244
+20245
+20246
+20247
+20248
+20249
+20250
+20251
+20252
+20253
+20254
+20255
+20256
+20257
+20258
+20259
+20260
+20261
+20262
+20263
+20264
+20265
+20266
+20267
+20268
+20269
+20270
+20271
+20272
+20273
+20274
+20275
+20276
+20277
+20278
+20279
+20280
+20281
+20282
+20283
+20284
+20285
+20286
+20287
+20288
+20289
+20290
+20291
+20292
+20293
+20294
+20295
+20296
+20297
+20298
+20299
+20300
+20301
+20302
+20303
+20304
+20305
+20306
+20307
+20308
+20309
+20310
+20311
+20312
+20313
+20314
+20315
+20316
+20317
+20318
+20319
+20320
+20321
+20322
+20323
+20324
+20325
+20326
+20327
+20328
+20329
+20330
+20331
+20332
+20333
+20334
+20335
+20336
+20337
+20338
+20339
+20340
+20341
+20342
+20343
+20344
+20345
+20346
+20347
+20348
+20349
+20350
+20351
+20352
+20353
+20354
+20355
+20356
+20357
+20358
+20359
+20360
+20361
+20362
+20363
+20364
+20365
+20366
+20367
+20368
+20369
+20370
+20371
+20372
+20373
+20374
+20375
+20376
+20377
+20378
+20379
+20380
+20381
+20382
+20383
+20384
+20385
+20386
+20387
+20388
+20389
+20390
+20391
+20392
+20393
+20394
+20395
+20396
+20397
+20398
+20399
+20400
+20401
+20402
+20403
+20404
+20405
+20406
+20407
+20408
+20409
+20410
+20411
+20412
+20413
+20414
+20415
+20416
+20417
+20418
+20419
+20420
+20421
+20422
+20423
+20424
+20425
+20426
+20427
+20428
+20429
+20430
+20431
+20432
+20433
+20434
+20435
+20436
+20437
+20438
+20439
+20440
+20441
+20442
+20443
+20444
+20445
+20446
+20447
+20448
+20449
+20450
+20451
+20452
+20453
+20454
+20455
+20456
+20457
+20458
+20459
+20460
+20461
+20462
+20463
+20464
+20465
+20466
+20467
+20468
+20469
+20470
+20471
+20472
+20473
+20474
+20475
+20476
+20477
+20478
+20479
+20480
+20481
+20482
+20483
+20484
+20485
+20486
+20487
+20488
+20489
+20490
+20491
+20492
+20493
+20494
+20495
+20496
+20497
+20498
+20499
+20500
+20501
+20502
+20503
+20504
+20505
+20506
+20507
+20508
+20509
+20510
+20511
+20512
+20513
+20514
+20515
+20516
+20517
+20518
+20519
+20520
+20521
+20522
+20523
+20524
+20525
+20526
+20527
+20528
+20529
+20530
+20531
+20532
+20533
+20534
+20535
+20536
+20537
+20538
+20539
+20540
+20541
+20542
+20543
+20544
+20545
+20546
+20547
+20548
+20549
+20550
+20551
+20552
+20553
+20554
+20555
+20556
+20557
+20558
+20559
+20560
+20561
+20562
+20563
+20564
+20565
+20566
+20567
+20568
+20569
+20570
+20571
+20572
+20573
+20574
+20575
+20576
+20577
+20578
+20579
+20580
+20581
+20582
+20583
+20584
+20585
+20586
+20587
+20588
+20589
+20590
+20591
+20592
+20593
+20594
+20595
+20596
+20597
+20598
+20599
+20600
+20601
+20602
+20603
+20604
+20605
+20606
+20607
+20608
+20609
+20610
+20611
+20612
+20613
+20614
+20615
+20616
+20617
+20618
+20619
+20620
+20621
+20622
+20623
+20624
+20625
+20626
+20627
+20628
+20629
+20630
+20631
+20632
+20633
+20634
+20635
+20636
+20637
+20638
+20639
+20640
+20641
+20642
+20643
+20644
+20645
+20646
+20647
+20648
+20649
+20650
+20651
+20652
+20653
+20654
+20655
+20656
+20657
+20658
+20659
+20660
+20661
+20662
+20663
+20664
+20665
+20666
+20667
+20668
+20669
+20670
+20671
+20672
+20673
+20674
+20675
+20676
+20677
+20678
+20679
+20680
+20681
+20682
+20683
+20684
+20685
+20686
+20687
+20688
+20689
+20690
+20691
+20692
+20693
+20694
+20695
+20696
+20697
+20698
+20699
+20700
+20701
+20702
+20703
+20704
+20705
+20706
+20707
+20708
+20709
+20710
+20711
+20712
+20713
+20714
+20715
+20716
+20717
+20718
+20719
+20720
+20721
+20722
+20723
+20724
+20725
+20726
+20727
+20728
+20729
+20730
+20731
+20732
+20733
+20734
+20735
+20736
+20737
+20738
+20739
+20740
+20741
+20742
+20743
+20744
+20745
+20746
+20747
+20748
+20749
+20750
+20751
+20752
+20753
+20754
+20755
+20756
+20757
+20758
+20759
+20760
+20761
+20762
+20763
+20764
+20765
+20766
+20767
+20768
+20769
+20770
+20771
+20772
+20773
+20774
+20775
+20776
+20777
+20778
+20779
+20780
+20781
+20782
+20783
+20784
+20785
+20786
+20787
+20788
+20789
+20790
+20791
+20792
+20793
+20794
+20795
+20796
+20797
+20798
+20799
+20800
+20801
+20802
+20803
+20804
+20805
+20806
+20807
+20808
+20809
+20810
+20811
+20812
+20813
+20814
+20815
+20816
+20817
+20818
+20819
+20820
+20821
+20822
+20823
+20824
+20825
+20826
+20827
+20828
+20829
+20830
+20831
+20832
+20833
+20834
+20835
+20836
+20837
+20838
+20839
+20840
+20841
+20842
+20843
+20844
+20845
+20846
+20847
+20848
+20849
+20850
+20851
+20852
+20853
+20854
+20855
+20856
+20857
+20858
+20859
+20860
+20861
+20862
+20863
+20864
+20865
+20866
+20867
+20868
+20869
+20870
+20871
+20872
+20873
+20874
+20875
+20876
+20877
+20878
+20879
+20880
+20881
+20882
+20883
+20884
+20885
+20886
+20887
+20888
+20889
+20890
+20891
+20892
+20893
+20894
+20895
+20896
+20897
+20898
+20899
+20900
+20901
+20902
+20903
+20904
+20905
+20906
+20907
+20908
+20909
+20910
+20911
+20912
+20913
+20914
+20915
+20916
+20917
+20918
+20919
+20920
+20921
+20922
+20923
+20924
+20925
+20926
+20927
+20928
+20929
+20930
+20931
+20932
+20933
+20934
+20935
+20936
+20937
+20938
+20939
+20940
+20941
+20942
+20943
+20944
+20945
+20946
+20947
+20948
+20949
+20950
+20951
+20952
+20953
+20954
+20955
+20956
+20957
+20958
+20959
+20960
+20961
+20962
+20963
+20964
+20965
+20966
+20967
+20968
+20969
+20970
+20971
+20972
+20973
+20974
+20975
+20976
+20977
+20978
+20979
+20980
+20981
+20982
+20983
+20984
+20985
+20986
+20987
+20988
+20989
+20990
+20991
+20992
+20993
+20994
+20995
+20996
+20997
+20998
+20999
+21000
+21001
+21002
+21003
+21004
+21005
+21006
+21007
+21008
+21009
+21010
+21011
+21012
+21013
+21014
+21015
+21016
+21017
+21018
+21019
+21020
+21021
+21022
+21023
+21024
+21025
+21026
+21027
+21028
+21029
+21030
+21031
+21032
+21033
+21034
+21035
+21036
+21037
+21038
+21039
+21040
+21041
+21042
+21043
+21044
+21045
+21046
+21047
+21048
+21049
+21050
+21051
+21052
+21053
+21054
+21055
+21056
+21057
+21058
+21059
+21060
+21061
+21062
+21063
+21064
+21065
+21066
+21067
+21068
+21069
+21070
+21071
+21072
+21073
+21074
+21075
+21076
+21077
+21078
+21079
+21080
+21081
+21082
+21083
+21084
+21085
+21086
+21087
+21088
+21089
+21090
+21091
+21092
+21093
+21094
+21095
+21096
+21097
+21098
+21099
+21100
+21101
+21102
+21103
+21104
+21105
+21106
+21107
+21108
+21109
+21110
+21111
+21112
+21113
+21114
+21115
+21116
+21117
+21118
+21119
+21120
+21121
+21122
+21123
+21124
+21125
+21126
+21127
+21128
+21129
+21130
+21131
+21132
+21133
+21134
+21135
+21136
+21137
+21138
+21139
+21140
+21141
+21142
+21143
+21144
+21145
+21146
+21147
+21148
+21149
+21150
+21151
+21152
+21153
+21154
+21155
+21156
+21157
+21158
+21159
+21160
+21161
+21162
+21163
+21164
+21165
+21166
+21167
+21168
+21169
+21170
+21171
+21172
+21173
+21174
+21175
+21176
+21177
+21178
+21179
+21180
+21181
+21182
+21183
+21184
+21185
+21186
+21187
+21188
+21189
+21190
+21191
+21192
+21193
+21194
+21195
+21196
+21197
+21198
+21199
+21200
+21201
+21202
+21203
+21204
+21205
+21206
+21207
+21208
+21209
+21210
+21211
+21212
+21213
+21214
+21215
+21216
+21217
+21218
+21219
+21220
+21221
+21222
+21223
+21224
+21225
+21226
+21227
+21228
+21229
+21230
+21231
+21232
+21233
+21234
+21235
+21236
+21237
+21238
+21239
+21240
+21241
+21242
+21243
+21244
+21245
+21246
+21247
+21248
+21249
+21250
+21251
+21252
+21253
+21254
+21255
+21256
+21257
+21258
+21259
+21260
+21261
+21262
+21263
+21264
+21265
+21266
+21267
+21268
+21269
+21270
+21271
+21272
+21273
+21274
+21275
+21276
+21277
+21278
+21279
+21280
+21281
+21282
+21283
+21284
+21285
+21286
+21287
+21288
+21289
+21290
+21291
+21292
+21293
+21294
+21295
+21296
+21297
+21298
+21299
+21300
+21301
+21302
+21303
+21304
+21305
+21306
+21307
+21308
+21309
+21310
+21311
+21312
+21313
+21314
+21315
+21316
+21317
+21318
+21319
+21320
+21321
+21322
+21323
+21324
+21325
+21326
+21327
+21328
+21329
+21330
+21331
+21332
+21333
+21334
+21335
+21336
+21337
+21338
+21339
+21340
+21341
+21342
+21343
+21344
+21345
+21346
+21347
+21348
+21349
+21350
+21351
+21352
+21353
+21354
+21355
+21356
+21357
+21358
+21359
+21360
+21361
+21362
+21363
+21364
+21365
+21366
+21367
+21368
+21369
+21370
+21371
+21372
+21373
+21374
+21375
+21376
+21377
+21378
+21379
+21380
+21381
+21382
+21383
+21384
+21385
+21386
+21387
+21388
+21389
+21390
+21391
+21392
+21393
+21394
+21395
+21396
+21397
+21398
+21399
+21400
+21401
+21402
+21403
+21404
+21405
+21406
+21407
+21408
+21409
+21410
+21411
+21412
+21413
+21414
+21415
+21416
+21417
+21418
+21419
+21420
+21421
+21422
+21423
+21424
+21425
+21426
+21427
+21428
+21429
+21430
+21431
+21432
+21433
+21434
+21435
+21436
+21437
+21438
+21439
+21440
+21441
+21442
+21443
+21444
+21445
+21446
+21447
+21448
+21449
+21450
+21451
+21452
+21453
+21454
+21455
+21456
+21457
+21458
+21459
+21460
+21461
+21462
+21463
+21464
+21465
+21466
+21467
+21468
+21469
+21470
+21471
+21472
+21473
+21474
+21475
+21476
+21477
+21478
+21479
+21480
+21481
+21482
+21483
+21484
+21485
+21486
+21487
+21488
+21489
+21490
+21491
+21492
+21493
+21494
+21495
+21496
+21497
+21498
+21499
+21500
+21501
+21502
+21503
+21504
+21505
+21506
+21507
+21508
+21509
+21510
+21511
+21512
+21513
+21514
+21515
+21516
+21517
+21518
+21519
+21520
+21521
+21522
+21523
+21524
+21525
+21526
+21527
+21528
+21529
+21530
+21531
+21532
+21533
+21534
+21535
+21536
+21537
+21538
+21539
+21540
+21541
+21542
+21543
+21544
+21545
+21546
+21547
+21548
+21549
+21550
+21551
+21552
+21553
+21554
+21555
+21556
+21557
+21558
+21559
+21560
+21561
+21562
+21563
+21564
+21565
+21566
+21567
+21568
+21569
+21570
+21571
+21572
+21573
+21574
+21575
+21576
+21577
+21578
+21579
+21580
+21581
+21582
+21583
+21584
+21585
+21586
+21587
+21588
+21589
+21590
+21591
+21592
+21593
+21594
+21595
+21596
+21597
+21598
+21599
+21600
+21601
+21602
+21603
+21604
+21605
+21606
+21607
+21608
+21609
+21610
+21611
+21612
+21613
+21614
+21615
+21616
+21617
+21618
+21619
+21620
+21621
+21622
+21623
+21624
+21625
+21626
+21627
+21628
+21629
+21630
+21631
+21632
+21633
+21634
+21635
+21636
+21637
+21638
+21639
+21640
+21641
+21642
+21643
+21644
+21645
+21646
+21647
+21648
+21649
+21650
+21651
+21652
+21653
+21654
+21655
+21656
+21657
+21658
+21659
+21660
+21661
+21662
+21663
+21664
+21665
+21666
+21667
+21668
+21669
+21670
+21671
+21672
+21673
+21674
+21675
+21676
+21677
+21678
+21679
+21680
+21681
+21682
+21683
+21684
+21685
+21686
+21687
+21688
+21689
+21690
+21691
+21692
+21693
+21694
+21695
+21696
+21697
+21698
+21699
+21700
+21701
+21702
+21703
+21704
+21705
+21706
+21707
+21708
+21709
+21710
+21711
+21712
+21713
+21714
+21715
+21716
+21717
+21718
+21719
+21720
+21721
+21722
+21723
+21724
+21725
+21726
+21727
+21728
+21729
+21730
+21731
+21732
+21733
+21734
+21735
+21736
+21737
+21738
+21739
+21740
+21741
+21742
+21743
+21744
+21745
+21746
+21747
+21748
+21749
+21750
+21751
+21752
+21753
+21754
+21755
+21756
+21757
+21758
+21759
+21760
+21761
+21762
+21763
+21764
+21765
+21766
+21767
+21768
+21769
+21770
+21771
+21772
+21773
+21774
+21775
+21776
+21777
+21778
+21779
+21780
+21781
+21782
+21783
+21784
+21785
+21786
+21787
+21788
+21789
+21790
+21791
+21792
+21793
+21794
+21795
+21796
+21797
+21798
+21799
+21800
+21801
+21802
+21803
+21804
+21805
+21806
+21807
+21808
+21809
+21810
+21811
+21812
+21813
+21814
+21815
+21816
+21817
+21818
+21819
+21820
+21821
+21822
+21823
+21824
+21825
+21826
+21827
+21828
+21829
+21830
+21831
+21832
+21833
+21834
+21835
+21836
+21837
+21838
+21839
+21840
+21841
+21842
+21843
+21844
+21845
+21846
+21847
+21848
+21849
+21850
+21851
+21852
+21853
+21854
+21855
+21856
+21857
+21858
+21859
+21860
+21861
+21862
+21863
+21864
+21865
+21866
+21867
+21868
+21869
+21870
+21871
+21872
+21873
+21874
+21875
+21876
+21877
+21878
+21879
+21880
+21881
+21882
+21883
+21884
+21885
+21886
+21887
+21888
+21889
+21890
+21891
+21892
+21893
+21894
+21895
+21896
+21897
+21898
+21899
+21900
+21901
+21902
+21903
+21904
+21905
+21906
+21907
+21908
+21909
+21910
+21911
+21912
+21913
+21914
+21915
+21916
+21917
+21918
+21919
+21920
+21921
+21922
+21923
+21924
+21925
+21926
+21927
+21928
+21929
+21930
+21931
+21932
+21933
+21934
+21935
+21936
+21937
+21938
+21939
+21940
+21941
+21942
+21943
+21944
+21945
+21946
+21947
+21948
+21949
+21950
+21951
+21952
+21953
+21954
+21955
+21956
+21957
+21958
+21959
+21960
+21961
+21962
+21963
+21964
+21965
+21966
+21967
+21968
+21969
+21970
+21971
+21972
+21973
+21974
+21975
+21976
+21977
+21978
+21979
+21980
+21981
+21982
+21983
+21984
+21985
+21986
+21987
+21988
+21989
+21990
+21991
+21992
+21993
+21994
+21995
+21996
+21997
+21998
+21999
+22000
+22001
+22002
+22003
+22004
+22005
+22006
+22007
+22008
+22009
+22010
+22011
+22012
+22013
+22014
+22015
+22016
+22017
+22018
+22019
+22020
+22021
+22022
+22023
+22024
+22025
+22026
+22027
+22028
+22029
+22030
+22031
+22032
+22033
+22034
+22035
+22036
+22037
+22038
+22039
+22040
+22041
+22042
+22043
+22044
+22045
+22046
+22047
+22048
+22049
+22050
+22051
+22052
+22053
+22054
+22055
+22056
+22057
+22058
+22059
+22060
+22061
+22062
+22063
+22064
+22065
+22066
+22067
+22068
+22069
+22070
+22071
+22072
+22073
+22074
+22075
+22076
+22077
+22078
+22079
+22080
+22081
+22082
+22083
+22084
+22085
+22086
+22087
+22088
+22089
+22090
+22091
+22092
+22093
+22094
+22095
+22096
+22097
+22098
+22099
+22100
+22101
+22102
+22103
+22104
+22105
+22106
+22107
+22108
+22109
+22110
+22111
+22112
+22113
+22114
+22115
+22116
+22117
+22118
+22119
+22120
+22121
+22122
+22123
+22124
+22125
+22126
+22127
+22128
+22129
+22130
+22131
+22132
+22133
+22134
+22135
+22136
+22137
+22138
+22139
+22140
+22141
+22142
+22143
+22144
+22145
+22146
+22147
+22148
+22149
+22150
+22151
+22152
+22153
+22154
+22155
+22156
+22157
+22158
+22159
+22160
+22161
+22162
+22163
+22164
+22165
+22166
+22167
+22168
+22169
+22170
+22171
+22172
+22173
+22174
+22175
+22176
+22177
+22178
+22179
+22180
+22181
+22182
+22183
+22184
+22185
+22186
+22187
+22188
+22189
+22190
+22191
+22192
+22193
+22194
+22195
+22196
+22197
+22198
+22199
+22200
+22201
+22202
+22203
+22204
+22205
+22206
+22207
+22208
+22209
+22210
+22211
+22212
+22213
+22214
+22215
+22216
+22217
+22218
+22219
+22220
+22221
+22222
+22223
+22224
+22225
+22226
+22227
+22228
+22229
+22230
+22231
+22232
+22233
+22234
+22235
+22236
+22237
+22238
+22239
+22240
+22241
+22242
+22243
+22244
+22245
+22246
+22247
+22248
+22249
+22250
+22251
+22252
+22253
+22254
+22255
+22256
+22257
+22258
+22259
+22260
+22261
+22262
+22263
+22264
+22265
+22266
+22267
+22268
+22269
+22270
+22271
+22272
+22273
+22274
+22275
+22276
+22277
+22278
+22279
+22280
+22281
+22282
+22283
+22284
+22285
+22286
+22287
+22288
+22289
+22290
+22291
+22292
+22293
+22294
+22295
+22296
+22297
+22298
+22299
+22300
+22301
+22302
+22303
+22304
+22305
+22306
+22307
+22308
+22309
+22310
+22311
+22312
+22313
+22314
+22315
+22316
+22317
+22318
+22319
+22320
+22321
+22322
+22323
+22324
+22325
+22326
+22327
+22328
+22329
+22330
+22331
+22332
+22333
+22334
+22335
+22336
+22337
+22338
+22339
+22340
+22341
+22342
+22343
+22344
+22345
+22346
+22347
+22348
+22349
+22350
+22351
+22352
+22353
+22354
+22355
+22356
+22357
+22358
+22359
+22360
+22361
+22362
+22363
+22364
+22365
+22366
+22367
+22368
+22369
+22370
+22371
+22372
+22373
+22374
+22375
+22376
+22377
+22378
+22379
+22380
+22381
+22382
+22383
+22384
+22385
+22386
+22387
+22388
+22389
+22390
+22391
+22392
+22393
+22394
+22395
+22396
+22397
+22398
+22399
+22400
+22401
+22402
+22403
+22404
+22405
+22406
+22407
+22408
+22409
+22410
+22411
+22412
+22413
+22414
+22415
+22416
+22417
+22418
+22419
+22420
+22421
+22422
+22423
+22424
+22425
+22426
+22427
+22428
+22429
+22430
+22431
+22432
+22433
+22434
+22435
+22436
+22437
+22438
+22439
+22440
+22441
+22442
+22443
+22444
+22445
+22446
+22447
+22448
+22449
+22450
+22451
+22452
+22453
+22454
+22455
+22456
+22457
+22458
+22459
+22460
+22461
+22462
+22463
+22464
+22465
+22466
+22467
+22468
+22469
+22470
+22471
+22472
+22473
+22474
+22475
+22476
+22477
+22478
+22479
+22480
+22481
+22482
+22483
+22484
+22485
+22486
+22487
+22488
+22489
+22490
+22491
+22492
+22493
+22494
+22495
+22496
+22497
+22498
+22499
+22500
+22501
+22502
+22503
+22504
+22505
+22506
+22507
+22508
+22509
+22510
+22511
+22512
+22513
+22514
+22515
+22516
+22517
+22518
+22519
+22520
+22521
+22522
+22523
+22524
+22525
+22526
+22527
+22528
+22529
+22530
+22531
+22532
+22533
+22534
+22535
+22536
+22537
+22538
+22539
+22540
+22541
+22542
+22543
+22544
+22545
+22546
+22547
+22548
+22549
+22550
+22551
+22552
+22553
+22554
+22555
+22556
+22557
+22558
+22559
+22560
+22561
+22562
+22563
+22564
+22565
+22566
+22567
+22568
+22569
+22570
+22571
+22572
+22573
+22574
+22575
+22576
+22577
+22578
+22579
+22580
+22581
+22582
+22583
+22584
+22585
+22586
+22587
+22588
+22589
+22590
+22591
+22592
+22593
+22594
+22595
+22596
+22597
+22598
+22599
+22600
+22601
+22602
+22603
+22604
+22605
+22606
+22607
+22608
+22609
+22610
+22611
+22612
+22613
+22614
+22615
+22616
+22617
+22618
+22619
+22620
+22621
+22622
+22623
+22624
+22625
+22626
+22627
+22628
+22629
+22630
+22631
+22632
+22633
+22634
+22635
+22636
+22637
+22638
+22639
+22640
+22641
+22642
+22643
+22644
+22645
+22646
+22647
+22648
+22649
+22650
+22651
+22652
+22653
+22654
+22655
+22656
+22657
+22658
+22659
+22660
+22661
+22662
+22663
+22664
+22665
+22666
+22667
+22668
+22669
+22670
+22671
+22672
+22673
+22674
+22675
+22676
+22677
+22678
+22679
+22680
+22681
+22682
+22683
+22684
+22685
+22686
+22687
+22688
+22689
+22690
+22691
+22692
+22693
+22694
+22695
+22696
+22697
+22698
+22699
+22700
+22701
+22702
+22703
+22704
+22705
+22706
+22707
+22708
+22709
+22710
+22711
+22712
+22713
+22714
+22715
+22716
+22717
+22718
+22719
+22720
+22721
+22722
+22723
+22724
+22725
+22726
+22727
+22728
+22729
+22730
+22731
+22732
+22733
+22734
+22735
+22736
+22737
+22738
+22739
+22740
+22741
+22742
+22743
+22744
+22745
+22746
+22747
+22748
+22749
+22750
+22751
+22752
+22753
+22754
+22755
+22756
+22757
+22758
+22759
+22760
+22761
+22762
+22763
+22764
+22765
+22766
+22767
+22768
+22769
+22770
+22771
+22772
+22773
+22774
+22775
+22776
+22777
+22778
+22779
+22780
+22781
+22782
+22783
+22784
+22785
+22786
+22787
+22788
+22789
+22790
+22791
+22792
+22793
+22794
+22795
+22796
+22797
+22798
+22799
+22800
+22801
+22802
+22803
+22804
+22805
+22806
+22807
+22808
+22809
+22810
+22811
+22812
+22813
+22814
+22815
+22816
+22817
+22818
+22819
+22820
+22821
+22822
+22823
+22824
+22825
+22826
+22827
+22828
+22829
+22830
+22831
+22832
+22833
+22834
+22835
+22836
+22837
+22838
+22839
+22840
+22841
+22842
+22843
+22844
+22845
+22846
+22847
+22848
+22849
+22850
+22851
+22852
+22853
+22854
+22855
+22856
+22857
+22858
+22859
+22860
+22861
+22862
+22863
+22864
+22865
+22866
+22867
+22868
+22869
+22870
+22871
+22872
+22873
+22874
+22875
+22876
+22877
+22878
+22879
+22880
+22881
+22882
+22883
+22884
+22885
+22886
+22887
+22888
+22889
+22890
+22891
+22892
+22893
+22894
+22895
+22896
+22897
+22898
+22899
+22900
+22901
+22902
+22903
+22904
+22905
+22906
+22907
+22908
+22909
+22910
+22911
+22912
+22913
+22914
+22915
+22916
+22917
+22918
+22919
+22920
+22921
+22922
+22923
+22924
+22925
+22926
+22927
+22928
+22929
+22930
+22931
+22932
+22933
+22934
+22935
+22936
+22937
+22938
+22939
+22940
+22941
+22942
+22943
+22944
+22945
+22946
+22947
+22948
+22949
+22950
+22951
+22952
+22953
+22954
+22955
+22956
+22957
+22958
+22959
+22960
+22961
+22962
+22963
+22964
+22965
+22966
+22967
+22968
+22969
+22970
+22971
+22972
+22973
+22974
+22975
+22976
+22977
+22978
+22979
+22980
+22981
+22982
+22983
+22984
+22985
+22986
+22987
+22988
+22989
+22990
+22991
+22992
+22993
+22994
+22995
+22996
+22997
+22998
+22999
+23000
+23001
+23002
+23003
+23004
+23005
+23006
+23007
+23008
+23009
+23010
+23011
+23012
+23013
+23014
+23015
+23016
+23017
+23018
+23019
+23020
+23021
+23022
+23023
+23024
+23025
+23026
+23027
+23028
+23029
+23030
+23031
+23032
+23033
+23034
+23035
+23036
+23037
+23038
+23039
+23040
+23041
+23042
+23043
+23044
+23045
+23046
+23047
+23048
+23049
+23050
+23051
+23052
+23053
+23054
+23055
+23056
+23057
+23058
+23059
+23060
+23061
+23062
+23063
+23064
+23065
+23066
+23067
+23068
+23069
+23070
+23071
+23072
+23073
+23074
+23075
+23076
+23077
+23078
+23079
+23080
+23081
+23082
+23083
+23084
+23085
+23086
+23087
+23088
+23089
+23090
+23091
+23092
+23093
+23094
+23095
+23096
+23097
+23098
+23099
+23100
+23101
+23102
+23103
+23104
+23105
+23106
+23107
+23108
+23109
+23110
+23111
+23112
+23113
+23114
+23115
+23116
+23117
+23118
+23119
+23120
+23121
+23122
+23123
+23124
+23125
+23126
+23127
+23128
+23129
+23130
+23131
+23132
+23133
+23134
+23135
+23136
+23137
+23138
+23139
+23140
+23141
+23142
+23143
+23144
+23145
+23146
+23147
+23148
+23149
+23150
+23151
+23152
+23153
+23154
+23155
+23156
+23157
+23158
+23159
+23160
+23161
+23162
+23163
+23164
+23165
+23166
+23167
+23168
+23169
+23170
+23171
+23172
+23173
+23174
+23175
+23176
+23177
+23178
+23179
+23180
+23181
+23182
+23183
+23184
+23185
+23186
+23187
+23188
+23189
+23190
+23191
+23192
+23193
+23194
+23195
+23196
+23197
+23198
+23199
+23200
+23201
+23202
+23203
+23204
+23205
+23206
+23207
+23208
+23209
+23210
+23211
+23212
+23213
+23214
+23215
+23216
+23217
+23218
+23219
+23220
+23221
+23222
+23223
+23224
+23225
+23226
+23227
+23228
+23229
+23230
+23231
+23232
+23233
+23234
+23235
+23236
+23237
+23238
+23239
+23240
+23241
+23242
+23243
+23244
+23245
+23246
+23247
+23248
+23249
+23250
+23251
+23252
+23253
+23254
+23255
+23256
+23257
+23258
+23259
+23260
+23261
+23262
+23263
+23264
+23265
+23266
+23267
+23268
+23269
+23270
+23271
+23272
+23273
+23274
+23275
+23276
+23277
+23278
+23279
+23280
+23281
+23282
+23283
+23284
+23285
+23286
+23287
+23288
+23289
+23290
+23291
+23292
+23293
+23294
+23295
+23296
+23297
+23298
+23299
+23300
+23301
+23302
+23303
+23304
+23305
+23306
+23307
+23308
+23309
+23310
+23311
+23312
+23313
+23314
+23315
+23316
+23317
+23318
+23319
+23320
+23321
+23322
+23323
+23324
+23325
+23326
+23327
+23328
+23329
+23330
+23331
+23332
+23333
+23334
+23335
+23336
+23337
+23338
+23339
+23340
+23341
+23342
+23343
+23344
+23345
+23346
+23347
+23348
+23349
+23350
+23351
+23352
+23353
+23354
+23355
+23356
+23357
+23358
+23359
+23360
+23361
+23362
+23363
+23364
+23365
+23366
+23367
+23368
+23369
+23370
+23371
+23372
+23373
+23374
+23375
+23376
+23377
+23378
+23379
+23380
+23381
+23382
+23383
+23384
+23385
+23386
+23387
+23388
+23389
+23390
+23391
+23392
+23393
+23394
+23395
+23396
+23397
+23398
+23399
+23400
+23401
+23402
+23403
+23404
+23405
+23406
+23407
+23408
+23409
+23410
+23411
+23412
+23413
+23414
+23415
+23416
+23417
+23418
+23419
+23420
+23421
+23422
+23423
+23424
+23425
+23426
+23427
+23428
+23429
+23430
+23431
+23432
+23433
+23434
+23435
+23436
+23437
+23438
+23439
+23440
+23441
+23442
+23443
+23444
+23445
+23446
+23447
+23448
+23449
+23450
+23451
+23452
+23453
+23454
+23455
+23456
+23457
+23458
+23459
+23460
+23461
+23462
+23463
+23464
+23465
+23466
+23467
+23468
+23469
+23470
+23471
+23472
+23473
+23474
+23475
+23476
+23477
+23478
+23479
+23480
+23481
+23482
+23483
+23484
+23485
+23486
+23487
+23488
+23489
+23490
+23491
+23492
+23493
+23494
+23495
+23496
+23497
+23498
+23499
+23500
+23501
+23502
+23503
+23504
+23505
+23506
+23507
+23508
+23509
+23510
+23511
+23512
+23513
+23514
+23515
+23516
+23517
+23518
+23519
+23520
+23521
+23522
+23523
+23524
+23525
+23526
+23527
+23528
+23529
+23530
+23531
+23532
+23533
+23534
+23535
+23536
+23537
+23538
+23539
+23540
+23541
+23542
+23543
+23544
+23545
+23546
+23547
+23548
+23549
+23550
+23551
+23552
+23553
+23554
+23555
+23556
+23557
+23558
+23559
+23560
+23561
+23562
+23563
+23564
+23565
+23566
+23567
+23568
+23569
+23570
+23571
+23572
+23573
+23574
+23575
+23576
+23577
+23578
+23579
+23580
+23581
+23582
+23583
+23584
+23585
+23586
+23587
+23588
+23589
+23590
+23591
+23592
+23593
+23594
+23595
+23596
+23597
+23598
+23599
+23600
+23601
+23602
+23603
+23604
+23605
+23606
+23607
+23608
+23609
+23610
+23611
+23612
+23613
+23614
+23615
+23616
+23617
+23618
+23619
+23620
+23621
+23622
+23623
+23624
+23625
+23626
+23627
+23628
+23629
+23630
+23631
+23632
+23633
+23634
+23635
+23636
+23637
+23638
+23639
+23640
+23641
+23642
+23643
+23644
+23645
+23646
+23647
+23648
+23649
+23650
+23651
+23652
+23653
+23654
+23655
+23656
+23657
+23658
+23659
+23660
+23661
+23662
+23663
+23664
+23665
+23666
+23667
+23668
+23669
+23670
+23671
+23672
+23673
+23674
+23675
+23676
+23677
+23678
+23679
+23680
+23681
+23682
+23683
+23684
+23685
+23686
+23687
+23688
+23689
+23690
+23691
+23692
+23693
+23694
+23695
+23696
+23697
+23698
+23699
+23700
+23701
+23702
+23703
+23704
+23705
+23706
+23707
+23708
+23709
+23710
+23711
+23712
+23713
+23714
+23715
+23716
+23717
+23718
+23719
+23720
+23721
+23722
+23723
+23724
+23725
+23726
+23727
+23728
+23729
+23730
+23731
+23732
+23733
+23734
+23735
+23736
+23737
+23738
+23739
+23740
+23741
+23742
+23743
+23744
+23745
+23746
+23747
+23748
+23749
+23750
+23751
+23752
+23753
+23754
+23755
+23756
+23757
+23758
+23759
+23760
+23761
+23762
+23763
+23764
+23765
+23766
+23767
+23768
+23769
+23770
+23771
+23772
+23773
+23774
+23775
+23776
+23777
+23778
+23779
+23780
+23781
+23782
+23783
+23784
+23785
+23786
+23787
+23788
+23789
+23790
+23791
+23792
+23793
+23794
+23795
+23796
+23797
+23798
+23799
+23800
+23801
+23802
+23803
+23804
+23805
+23806
+23807
+23808
+23809
+23810
+23811
+23812
+23813
+23814
+23815
+23816
+23817
+23818
+23819
+23820
+23821
+23822
+23823
+23824
+23825
+23826
+23827
+23828
+23829
+23830
+23831
+23832
+23833
+23834
+23835
+23836
+23837
+23838
+23839
+23840
+23841
+23842
+23843
+23844
+23845
+23846
+23847
+23848
+23849
+23850
+23851
+23852
+23853
+23854
+23855
+23856
+23857
+23858
+23859
+23860
+23861
+23862
+23863
+23864
+23865
+23866
+23867
+23868
+23869
+23870
+23871
+23872
+23873
+23874
+23875
+23876
+23877
+23878
+23879
+23880
+23881
+23882
+23883
+23884
+23885
+23886
+23887
+23888
+23889
+23890
+23891
+23892
+23893
+23894
+23895
+23896
+23897
+23898
+23899
+23900
+23901
+23902
+23903
+23904
+23905
+23906
+23907
+23908
+23909
+23910
+23911
+23912
+23913
+23914
+23915
+23916
+23917
+23918
+23919
+23920
+23921
+23922
+23923
+23924
+23925
+23926
+23927
+23928
+23929
+23930
+23931
+23932
+23933
+23934
+23935
+23936
+23937
+23938
+23939
+23940
+23941
+23942
+23943
+23944
+23945
+23946
+23947
+23948
+23949
+23950
+23951
+23952
+23953
+23954
+23955
+23956
+23957
+23958
+23959
+23960
+23961
+23962
+23963
+23964
+23965
+23966
+23967
+23968
+23969
+23970
+23971
+23972
+23973
+23974
+23975
+23976
+23977
+23978
+23979
+23980
+23981
+23982
+23983
+23984
+23985
+23986
+23987
+23988
+23989
+23990
+23991
+23992
+23993
+23994
+23995
+23996
+23997
+23998
+23999
+24000
+24001
+24002
+24003
+24004
+24005
+24006
+24007
+24008
+24009
+24010
+24011
+24012
+24013
+24014
+24015
+24016
+24017
+24018
+24019
+24020
+24021
+24022
+24023
+24024
+24025
+24026
+24027
+24028
+24029
+24030
+24031
+24032
+24033
+24034
+24035
+24036
+24037
+24038
+24039
+24040
+24041
+24042
+24043
+24044
+24045
+24046
+24047
+24048
+24049
+24050
+24051
+24052
+24053
+24054
+24055
+24056
+24057
+24058
+24059
+24060
+24061
+24062
+24063
+24064
+24065
+24066
+24067
+24068
+24069
+24070
+24071
+24072
+24073
+24074
+24075
+24076
+24077
+24078
+24079
+24080
+24081
+24082
+24083
+24084
+24085
+24086
+24087
+24088
+24089
+24090
+24091
+24092
+24093
+24094
+24095
+24096
+24097
+24098
+24099
+24100
+24101
+24102
+24103
+24104
+24105
+24106
+24107
+24108
+24109
+24110
+24111
+24112
+24113
+24114
+24115
+24116
+24117
+24118
+24119
+24120
+24121
+24122
+24123
+24124
+24125
+24126
+24127
+24128
+24129
+24130
+24131
+24132
+24133
+24134
+24135
+24136
+24137
+24138
+24139
+24140
+24141
+24142
+24143
+24144
+24145
+24146
+24147
+24148
+24149
+24150
+24151
+24152
+24153
+24154
+24155
+24156
+24157
+24158
+24159
+24160
+24161
+24162
+24163
+24164
+24165
+24166
+24167
+24168
+24169
+24170
+24171
+24172
+24173
+24174
+24175
+24176
+24177
+24178
+24179
+24180
+24181
+24182
+24183
+24184
+24185
+24186
+24187
+24188
+24189
+24190
+24191
+24192
+24193
+24194
+24195
+24196
+24197
+24198
+24199
+24200
+24201
+24202
+24203
+24204
+24205
+24206
+24207
+24208
+24209
+24210
+24211
+24212
+24213
+24214
+24215
+24216
+24217
+24218
+24219
+24220
+24221
+24222
+24223
+24224
+24225
+24226
+24227
+24228
+24229
+24230
+24231
+24232
+24233
+24234
+24235
+24236
+24237
+24238
+24239
+24240
+24241
+24242
+24243
+24244
+24245
+24246
+24247
+24248
+24249
+24250
+24251
+24252
+24253
+24254
+24255
+24256
+24257
+24258
+24259
+24260
+24261
+24262
+24263
+24264
+24265
+24266
+24267
+24268
+24269
+24270
+24271
+24272
+24273
+24274
+24275
+24276
+24277
+24278
+24279
+24280
+24281
+24282
+24283
+24284
+24285
+24286
+24287
+24288
+24289
+24290
+24291
+24292
+24293
+24294
+24295
+24296
+24297
+24298
+24299
+24300
+24301
+24302
+24303
+24304
+24305
+24306
+24307
+24308
+24309
+24310
+24311
+24312
+24313
+24314
+24315
+24316
+24317
+24318
+24319
+24320
+24321
+24322
+24323
+24324
+24325
+24326
+24327
+24328
+24329
+24330
+24331
+24332
+24333
+24334
+24335
+24336
+24337
+24338
+24339
+24340
+24341
+24342
+24343
+24344
+24345
+24346
+24347
+24348
+24349
+24350
+24351
+24352
+24353
+24354
+24355
+24356
+24357
+24358
+24359
+24360
+24361
+24362
+24363
+24364
+24365
+24366
+24367
+24368
+24369
+24370
+24371
+24372
+24373
+24374
+24375
+24376
+24377
+24378
+24379
+24380
+24381
+24382
+24383
+24384
+24385
+24386
+24387
+24388
+24389
+24390
+24391
+24392
+24393
+24394
+24395
+24396
+24397
+24398
+24399
+24400
+24401
+24402
+24403
+24404
+24405
+24406
+24407
+24408
+24409
+24410
+24411
+24412
+24413
+24414
+24415
+24416
+24417
+24418
+24419
+24420
+24421
+24422
+24423
+24424
+24425
+24426
+24427
+24428
+24429
+24430
+24431
+24432
+24433
+24434
+24435
+24436
+24437
+24438
+24439
+24440
+24441
+24442
+24443
+24444
+24445
+24446
+24447
+24448
+24449
+24450
+24451
+24452
+24453
+24454
+24455
+24456
+24457
+24458
+24459
+24460
+24461
+24462
+24463
+24464
+24465
+24466
+24467
+24468
+24469
+24470
+24471
+24472
+24473
+24474
+24475
+24476
+24477
+24478
+24479
+24480
+24481
+24482
+24483
+24484
+24485
+24486
+24487
+24488
+24489
+24490
+24491
+24492
+24493
+24494
+24495
+24496
+24497
+24498
+24499
+24500
+24501
+24502
+24503
+24504
+24505
+24506
+24507
+24508
+24509
+24510
+24511
+24512
+24513
+24514
+24515
+24516
+24517
+24518
+24519
+24520
+24521
+24522
+24523
+24524
+24525
+24526
+24527
+24528
+24529
+24530
+24531
+24532
+24533
+24534
+24535
+24536
+24537
+24538
+24539
+24540
+24541
+24542
+24543
+24544
+24545
+24546
+24547
+24548
+24549
+24550
+24551
+24552
+24553
+24554
+24555
+24556
+24557
+24558
+24559
+24560
+24561
+24562
+24563
+24564
+24565
+24566
+24567
+24568
+24569
+24570
+24571
+24572
+24573
+24574
+24575
+24576
+24577
+24578
+24579
+24580
+24581
+24582
+24583
+24584
+24585
+24586
+24587
+24588
+24589
+24590
+24591
+24592
+24593
+24594
+24595
+24596
+24597
+24598
+24599
+24600
+24601
+24602
+24603
+24604
+24605
+24606
+24607
+24608
+24609
+24610
+24611
+24612
+24613
+24614
+24615
+24616
+24617
+24618
+24619
+24620
+24621
+24622
+24623
+24624
+24625
+24626
+24627
+24628
+24629
+24630
+24631
+24632
+24633
+24634
+24635
+24636
+24637
+24638
+24639
+24640
+24641
+24642
+24643
+24644
+24645
+24646
+24647
+24648
+24649
+24650
+24651
+24652
+24653
+24654
+24655
+24656
+24657
+24658
+24659
+24660
+24661
+24662
+24663
+24664
+24665
+24666
+24667
+24668
+24669
+24670
+24671
+24672
+24673
+24674
+24675
+24676
+24677
+24678
+24679
+24680
+24681
+24682
+24683
+24684
+24685
+24686
+24687
+24688
+24689
+24690
+24691
+24692
+24693
+24694
+24695
+24696
+24697
+24698
+24699
+24700
+24701
+24702
+24703
+24704
+24705
+24706
+24707
+24708
+24709
+24710
+24711
+24712
+24713
+24714
+24715
+24716
+24717
+24718
+24719
+24720
+24721
+24722
+24723
+24724
+24725
+24726
+24727
+24728
+24729
+24730
+24731
+24732
+24733
+24734
+24735
+24736
+24737
+24738
+24739
+24740
+24741
+24742
+24743
+24744
+24745
+24746
+24747
+24748
+24749
+24750
+24751
+24752
+24753
+24754
+24755
+24756
+24757
+24758
+24759
+24760
+24761
+24762
+24763
+24764
+24765
+24766
+24767
+24768
+24769
+24770
+24771
+24772
+24773
+24774
+24775
+24776
+24777
+24778
+24779
+24780
+24781
+24782
+24783
+24784
+24785
+24786
+24787
+24788
+24789
+24790
+24791
+24792
+24793
+24794
+24795
+24796
+24797
+24798
+24799
+24800
+24801
+24802
+24803
+24804
+24805
+24806
+24807
+24808
+24809
+24810
+24811
+24812
+24813
+24814
+24815
+24816
+24817
+24818
+24819
+24820
+24821
+24822
+24823
+24824
+24825
+24826
+24827
+24828
+24829
+24830
+24831
+24832
+24833
+24834
+24835
+24836
+24837
+24838
+24839
+24840
+24841
+24842
+24843
+24844
+24845
+24846
+24847
+24848
+24849
+24850
+24851
+24852
+24853
+24854
+24855
+24856
+24857
+24858
+24859
+24860
+24861
+24862
+24863
+24864
+24865
+24866
+24867
+24868
+24869
+24870
+24871
+24872
+24873
+24874
+24875
+24876
+24877
+24878
+24879
+24880
+24881
+24882
+24883
+24884
+24885
+24886
+24887
+24888
+24889
+24890
+24891
+24892
+24893
+24894
+24895
+24896
+24897
+24898
+24899
+24900
+24901
+24902
+24903
+24904
+24905
+24906
+24907
+24908
+24909
+24910
+24911
+24912
+24913
+24914
+24915
+24916
+24917
+24918
+24919
+24920
+24921
+24922
+24923
+24924
+24925
+24926
+24927
+24928
+24929
+24930
+24931
+24932
+24933
+24934
+24935
+24936
+24937
+24938
+24939
+24940
+24941
+24942
+24943
+24944
+24945
+24946
+24947
+24948
+24949
+24950
+24951
+24952
+24953
+24954
+24955
+24956
+24957
+24958
+24959
+24960
+24961
+24962
+24963
+24964
+24965
+24966
+24967
+24968
+24969
+24970
+24971
+24972
+24973
+24974
+24975
+24976
+24977
+24978
+24979
+24980
+24981
+24982
+24983
+24984
+24985
+24986
+24987
+24988
+24989
+24990
+24991
+24992
+24993
+24994
+24995
+24996
+24997
+24998
+24999
+25000
+25001
+25002
+25003
+25004
+25005
+25006
+25007
+25008
+25009
+25010
+25011
+25012
+25013
+25014
+25015
+25016
+25017
+25018
+25019
+25020
+25021
+25022
+25023
+25024
+25025
+25026
+25027
+25028
+25029
+25030
+25031
+25032
+25033
+25034
+25035
+25036
+25037
+25038
+25039
+25040
+25041
+25042
+25043
+25044
+25045
+25046
+25047
+25048
+25049
+25050
+25051
+25052
+25053
+25054
+25055
+25056
+25057
+25058
+25059
+25060
+25061
+25062
+25063
+25064
+25065
+25066
+25067
+25068
+25069
+25070
+25071
+25072
+25073
+25074
+25075
+25076
+25077
+25078
+25079
+25080
+25081
+25082
+25083
+25084
+25085
+25086
+25087
+25088
+25089
+25090
+25091
+25092
+25093
+25094
+25095
+25096
+25097
+25098
+25099
+25100
+25101
+25102
+25103
+25104
+25105
+25106
+25107
+25108
+25109
+25110
+25111
+25112
+25113
+25114
+25115
+25116
+25117
+25118
+25119
+25120
+25121
+25122
+25123
+25124
+25125
+25126
+25127
+25128
+25129
+25130
+25131
+25132
+25133
+25134
+25135
+25136
+25137
+25138
+25139
+25140
+25141
+25142
+25143
+25144
+25145
+25146
+25147
+25148
+25149
+25150
+25151
+25152
+25153
+25154
+25155
+25156
+25157
+25158
+25159
+25160
+25161
+25162
+25163
+25164
+25165
+25166
+25167
+25168
+25169
+25170
+25171
+25172
+25173
+25174
+25175
+25176
+25177
+25178
+25179
+25180
+25181
+25182
+25183
+25184
+25185
+25186
+25187
+25188
+25189
+25190
+25191
+25192
+25193
+25194
+25195
+25196
+25197
+25198
+25199
+25200
+25201
+25202
+25203
+25204
+25205
+25206
+25207
+25208
+25209
+25210
+25211
+25212
+25213
+25214
+25215
+25216
+25217
+25218
+25219
+25220
+25221
+25222
+25223
+25224
+25225
+25226
+25227
+25228
+25229
+25230
+25231
+25232
+25233
+25234
+25235
+25236
+25237
+25238
+25239
+25240
+25241
+25242
+25243
+25244
+25245
+25246
+25247
+25248
+25249
+25250
+25251
+25252
+25253
+25254
+25255
+25256
+25257
+25258
+25259
+25260
+25261
+25262
+25263
+25264
+25265
+25266
+25267
+25268
+25269
+25270
+25271
+25272
+25273
+25274
+25275
+25276
+25277
+25278
+25279
+25280
+25281
+25282
+25283
+25284
+25285
+25286
+25287
+25288
+25289
+25290
+25291
+25292
+25293
+25294
+25295
+25296
+25297
+25298
+25299
+25300
+25301
+25302
+25303
+25304
+25305
+25306
+25307
+25308
+25309
+25310
+25311
+25312
+25313
+25314
+25315
+25316
+25317
+25318
+25319
+25320
+25321
+25322
+25323
+25324
+25325
+25326
+25327
+25328
+25329
+25330
+25331
+25332
+25333
+25334
+25335
+25336
+25337
+25338
+25339
+25340
+25341
+25342
+25343
+25344
+25345
+25346
+25347
+25348
+25349
+25350
+25351
+25352
+25353
+25354
+25355
+25356
+25357
+25358
+25359
+25360
+25361
+25362
+25363
+25364
+25365
+25366
+25367
+25368
+25369
+25370
+25371
+25372
+25373
+25374
+25375
+25376
+25377
+25378
+25379
+25380
+25381
+25382
+25383
+25384
+25385
+25386
+25387
+25388
+25389
+25390
+25391
+25392
+25393
+25394
+25395
+25396
+25397
+25398
+25399
+25400
+25401
+25402
+25403
+25404
+25405
+25406
+25407
+25408
+25409
+25410
+25411
+25412
+25413
+25414
+25415
+25416
+25417
+25418
+25419
+25420
+25421
+25422
+25423
+25424
+25425
+25426
+25427
+25428
+25429
+25430
+25431
+25432
+25433
+25434
+25435
+25436
+25437
+25438
+25439
+25440
+25441
+25442
+25443
+25444
+25445
+25446
+25447
+25448
+25449
+25450
+25451
+25452
+25453
+25454
+25455
+25456
+25457
+25458
+25459
+25460
+25461
+25462
+25463
+25464
+25465
+25466
+25467
+25468
+25469
+25470
+25471
+25472
+25473
+25474
+25475
+25476
+25477
+25478
+25479
+25480
+25481
+25482
+25483
+25484
+25485
+25486
+25487
+25488
+25489
+25490
+25491
+25492
+25493
+25494
+25495
+25496
+25497
+25498
+25499
+25500
+25501
+25502
+25503
+25504
+25505
+25506
+25507
+25508
+25509
+25510
+25511
+25512
+25513
+25514
+25515
+25516
+25517
+25518
+25519
+25520
+25521
+25522
+25523
+25524
+25525
+25526
+25527
+25528
+25529
+25530
+25531
+25532
+25533
+25534
+25535
+25536
+25537
+25538
+25539
+25540
+25541
+25542
+25543
+25544
+25545
+25546
+25547
+25548
+25549
+25550
+25551
+25552
+25553
+25554
+25555
+25556
+25557
+25558
+25559
+25560
+25561
+25562
+25563
+25564
+25565
+25566
+25567
+25568
+25569
+25570
+25571
+25572
+25573
+25574
+25575
+25576
+25577
+25578
+25579
+25580
+25581
+25582
+25583
+25584
+25585
+25586
+25587
+25588
+25589
+25590
+25591
+25592
+25593
+25594
+25595
+25596
+25597
+25598
+25599
+25600
+25601
+25602
+25603
+25604
+25605
+25606
+25607
+25608
+25609
+25610
+25611
+25612
+25613
+25614
+25615
+25616
+25617
+25618
+25619
+25620
+25621
+25622
+25623
+25624
+25625
+25626
+25627
+25628
+25629
+25630
+25631
+25632
+25633
+25634
+25635
+25636
+25637
+25638
+25639
+25640
+25641
+25642
+25643
+25644
+25645
+25646
+25647
+25648
+25649
+25650
+25651
+25652
+25653
+25654
+25655
+25656
+25657
+25658
+25659
+25660
+25661
+25662
+25663
+25664
+25665
+25666
+25667
+25668
+25669
+25670
+25671
+25672
+25673
+25674
+25675
+25676
+25677
+25678
+25679
+25680
+25681
+25682
+25683
+25684
+25685
+25686
+25687
+25688
+25689
+25690
+25691
+25692
+25693
+25694
+25695
+25696
+25697
+25698
+25699
+25700
+25701
+25702
+25703
+25704
+25705
+25706
+25707
+25708
+25709
+25710
+25711
+25712
+25713
+25714
+25715
+25716
+25717
+25718
+25719
+25720
+25721
+25722
+25723
+25724
+25725
+25726
+25727
+25728
+25729
+25730
+25731
+25732
+25733
+25734
+25735
+25736
+25737
+25738
+25739
+25740
+25741
+25742
+25743
+25744
+25745
+25746
+25747
+25748
+25749
+25750
+25751
+25752
+25753
+25754
+25755
+25756
+25757
+25758
+25759
+25760
+25761
+25762
+25763
+25764
+25765
+25766
+25767
+25768
+25769
+25770
+25771
+25772
+25773
+25774
+25775
+25776
+25777
+25778
+25779
+25780
+25781
+25782
+25783
+25784
+25785
+25786
+25787
+25788
+25789
+25790
+25791
+25792
+25793
+25794
+25795
+25796
+25797
+25798
+25799
+25800
+25801
+25802
+25803
+25804
+25805
+25806
+25807
+25808
+25809
+25810
+25811
+25812
+25813
+25814
+25815
+25816
+25817
+25818
+25819
+25820
+25821
+25822
+25823
+25824
+25825
+25826
+25827
+25828
+25829
+25830
+25831
+25832
+25833
+25834
+25835
+25836
+25837
+25838
+25839
+25840
+25841
+25842
+25843
+25844
+25845
+25846
+25847
+25848
+25849
+25850
+25851
+25852
+25853
+25854
+25855
+25856
+25857
+25858
+25859
+25860
+25861
+25862
+25863
+25864
+25865
+25866
+25867
+25868
+25869
+25870
+25871
+25872
+25873
+25874
+25875
+25876
+25877
+25878
+25879
+25880
+25881
+25882
+25883
+25884
+25885
+25886
+25887
+25888
+25889
+25890
+25891
+25892
+25893
+25894
+25895
+25896
+25897
+25898
+25899
+25900
+25901
+25902
+25903
+25904
+25905
+25906
+25907
+25908
+25909
+25910
+25911
+25912
+25913
+25914
+25915
+25916
+25917
+25918
+25919
+25920
+25921
+25922
+25923
+25924
+25925
+25926
+25927
+25928
+25929
+25930
+25931
+25932
+25933
+25934
+25935
+25936
+25937
+25938
+25939
+25940
+25941
+25942
+25943
+25944
+25945
+25946
+25947
+25948
+25949
+25950
+25951
+25952
+25953
+25954
+25955
+25956
+25957
+25958
+25959
+25960
+25961
+25962
+25963
+25964
+25965
+25966
+25967
+25968
+25969
+25970
+25971
+25972
+25973
+25974
+25975
+25976
+25977
+25978
+25979
+25980
+25981
+25982
+25983
+25984
+25985
+25986
+25987
+25988
+25989
+25990
+25991
+25992
+25993
+25994
+25995
+25996
+25997
+25998
+25999
+26000
+26001
+26002
+26003
+26004
+26005
+26006
+26007
+26008
+26009
+26010
+26011
+26012
+26013
+26014
+26015
+26016
+26017
+26018
+26019
+26020
+26021
+26022
+26023
+26024
+26025
+26026
+26027
+26028
+26029
+26030
+26031
+26032
+26033
+26034
+26035
+26036
+26037
+26038
+26039
+26040
+26041
+26042
+26043
+26044
+26045
+26046
+26047
+26048
+26049
+26050
+26051
+26052
+26053
+26054
+26055
+26056
+26057
+26058
+26059
+26060
+26061
+26062
+26063
+26064
+26065
+26066
+26067
+26068
+26069
+26070
+26071
+26072
+26073
+26074
+26075
+26076
+26077
+26078
+26079
+26080
+26081
+26082
+26083
+26084
+26085
+26086
+26087
+26088
+26089
+26090
+26091
+26092
+26093
+26094
+26095
+26096
+26097
+26098
+26099
+26100
+26101
+26102
+26103
+26104
+26105
+26106
+26107
+26108
+26109
+26110
+26111
+26112
+26113
+26114
+26115
+26116
+26117
+26118
+26119
+26120
+26121
+26122
+26123
+26124
+26125
+26126
+26127
+26128
+26129
+26130
+26131
+26132
+26133
+26134
+26135
+26136
+26137
+26138
+26139
+26140
+26141
+26142
+26143
+26144
+26145
+26146
+26147
+26148
+26149
+26150
+26151
+26152
+26153
+26154
+26155
+26156
+26157
+26158
+26159
+26160
+26161
+26162
+26163
+26164
+26165
+26166
+26167
+26168
+26169
+26170
+26171
+26172
+26173
+26174
+26175
+26176
+26177
+26178
+26179
+26180
+26181
+26182
+26183
+26184
+26185
+26186
+26187
+26188
+26189
+26190
+26191
+26192
+26193
+26194
+26195
+26196
+26197
+26198
+26199
+26200
+26201
+26202
+26203
+26204
+26205
+26206
+26207
+26208
+26209
+26210
+26211
+26212
+26213
+26214
+26215
+26216
+26217
+26218
+26219
+26220
+26221
+26222
+26223
+26224
+26225
+26226
+26227
+26228
+26229
+26230
+26231
+26232
+26233
+26234
+26235
+26236
+26237
+26238
+26239
+26240
+26241
+26242
+26243
+26244
+26245
+26246
+26247
+26248
+26249
+26250
+26251
+26252
+26253
+26254
+26255
+26256
+26257
+26258
+26259
+26260
+26261
+26262
+26263
+26264
+26265
+26266
+26267
+26268
+26269
+26270
+26271
+26272
+26273
+26274
+26275
+26276
+26277
+26278
+26279
+26280
+26281
+26282
+26283
+26284
+26285
+26286
+26287
+26288
+26289
+26290
+26291
+26292
+26293
+26294
+26295
+26296
+26297
+26298
+26299
+26300
+26301
+26302
+26303
+26304
+26305
+26306
+26307
+26308
+26309
+26310
+26311
+26312
+26313
+26314
+26315
+26316
+26317
+26318
+26319
+26320
+26321
+26322
+26323
+26324
+26325
+26326
+26327
+26328
+26329
+26330
+26331
+26332
+26333
+26334
+26335
+26336
+26337
+26338
+26339
+26340
+26341
+26342
+26343
+26344
+26345
+26346
+26347
+26348
+26349
+26350
+26351
+26352
+26353
+26354
+26355
+26356
+26357
+26358
+26359
+26360
+26361
+26362
+26363
+26364
+26365
+26366
+26367
+26368
+26369
+26370
+26371
+26372
+26373
+26374
+26375
+26376
+26377
+26378
+26379
+26380
+26381
+26382
+26383
+26384
+26385
+26386
+26387
+26388
+26389
+26390
+26391
+26392
+26393
+26394
+26395
+26396
+26397
+26398
+26399
+26400
+26401
+26402
+26403
+26404
+26405
+26406
+26407
+26408
+26409
+26410
+26411
+26412
+26413
+26414
+26415
+26416
+26417
+26418
+26419
+26420
+26421
+26422
+26423
+26424
+26425
+26426
+26427
+26428
+26429
+26430
+26431
+26432
+26433
+26434
+26435
+26436
+26437
+26438
+26439
+26440
+26441
+26442
+26443
+26444
+26445
+26446
+26447
+26448
+26449
+26450
+26451
+26452
+26453
+26454
+26455
+26456
+26457
+26458
+26459
+26460
+26461
+26462
+26463
+26464
+26465
+26466
+26467
+26468
+26469
+26470
+26471
+26472
+26473
+26474
+26475
+26476
+26477
+26478
+26479
+26480
+26481
+26482
+26483
+26484
+26485
+26486
+26487
+26488
+26489
+26490
+26491
+26492
+26493
+26494
+26495
+26496
+26497
+26498
+26499
+26500
+26501
+26502
+26503
+26504
+26505
+26506
+26507
+26508
+26509
+26510
+26511
+26512
+26513
+26514
+26515
+26516
+26517
+26518
+26519
+26520
+26521
+26522
+26523
+26524
+26525
+26526
+26527
+26528
+26529
+26530
+26531
+26532
+26533
+26534
+26535
+26536
+26537
+26538
+26539
+26540
+26541
+26542
+26543
+26544
+26545
+26546
+26547
+26548
+26549
+26550
+26551
+26552
+26553
+26554
+26555
+26556
+26557
+26558
+26559
+26560
+26561
+26562
+26563
+26564
+26565
+26566
+26567
+26568
+26569
+26570
+26571
+26572
+26573
+26574
+26575
+26576
+26577
+26578
+26579
+26580
+26581
+26582
+26583
+26584
+26585
+26586
+26587
+26588
+26589
+26590
+26591
+26592
+26593
+26594
+26595
+26596
+26597
+26598
+26599
+26600
+26601
+26602
+26603
+26604
+26605
+26606
+26607
+26608
+26609
+26610
+26611
+26612
+26613
+26614
+26615
+26616
+26617
+26618
+26619
+26620
+26621
+26622
+26623
+26624
+26625
+26626
+26627
+26628
+26629
+26630
+26631
+26632
+26633
+26634
+26635
+26636
+26637
+26638
+26639
+26640
+26641
+26642
+26643
+26644
+26645
+26646
+26647
+26648
+26649
+26650
+26651
+26652
+26653
+26654
+26655
+26656
+26657
+26658
+26659
+26660
+26661
+26662
+26663
+26664
+26665
+26666
+26667
+26668
+26669
+26670
+26671
+26672
+26673
+26674
+26675
+26676
+26677
+26678
+26679
+26680
+26681
+26682
+26683
+26684
+26685
+26686
+26687
+26688
+26689
+26690
+26691
+26692
+26693
+26694
+26695
+26696
+26697
+26698
+26699
+26700
+26701
+26702
+26703
+26704
+26705
+26706
+26707
+26708
+26709
+26710
+26711
+26712
+26713
+26714
+26715
+26716
+26717
+26718
+26719
+26720
+26721
+26722
+26723
+26724
+26725
+26726
+26727
+26728
+26729
+26730
+26731
+26732
+26733
+26734
+26735
+26736
+26737
+26738
+26739
+26740
+26741
+26742
+26743
+26744
+26745
+26746
+26747
+26748
+26749
+26750
+26751
+26752
+26753
+26754
+26755
+26756
+26757
+26758
+26759
+26760
+26761
+26762
+26763
+26764
+26765
+26766
+26767
+26768
+26769
+26770
+26771
+26772
+26773
+26774
+26775
+26776
+26777
+26778
+26779
+26780
+26781
+26782
+26783
+26784
+26785
+26786
+26787
+26788
+26789
+26790
+26791
+26792
+26793
+26794
+26795
+26796
+26797
+26798
+26799
+26800
+26801
+26802
+26803
+26804
+26805
+26806
+26807
+26808
+26809
+26810
+26811
+26812
+26813
+26814
+26815
+26816
+26817
+26818
+26819
+26820
+26821
+26822
+26823
+26824
+26825
+26826
+26827
+26828
+26829
+26830
+26831
+26832
+26833
+26834
+26835
+26836
+26837
+26838
+26839
+26840
+26841
+26842
+26843
+26844
+26845
+26846
+26847
+26848
+26849
+26850
+26851
+26852
+26853
+26854
+26855
+26856
+26857
+26858
+26859
+26860
+26861
+26862
+26863
+26864
+26865
+26866
+26867
+26868
+26869
+26870
+26871
+26872
+26873
+26874
+26875
+26876
+26877
+26878
+26879
+26880
+26881
+26882
+26883
+26884
+26885
+26886
+26887
+26888
+26889
+26890
+26891
+26892
+26893
+26894
+26895
+26896
+26897
+26898
+26899
+26900
+26901
+26902
+26903
+26904
+26905
+26906
+26907
+26908
+26909
+26910
+26911
+26912
+26913
+26914
+26915
+26916
+26917
+26918
+26919
+26920
+26921
+26922
+26923
+26924
+26925
+26926
+26927
+26928
+26929
+26930
+26931
+26932
+26933
+26934
+26935
+26936
+26937
+26938
+26939
+26940
+26941
+26942
+26943
+26944
+26945
+26946
+26947
+26948
+26949
+26950
+26951
+26952
+26953
+26954
+26955
+26956
+26957
+26958
+26959
+26960
+26961
+26962
+26963
+26964
+26965
+26966
+26967
+26968
+26969
+26970
+26971
+26972
+26973
+26974
+26975
+26976
+26977
+26978
+26979
+26980
+26981
+26982
+26983
+26984
+26985
+26986
+26987
+26988
+26989
+26990
+26991
+26992
+26993
+26994
+26995
+26996
+26997
+26998
+26999
+27000
+27001
+27002
+27003
+27004
+27005
+27006
+27007
+27008
+27009
+27010
+27011
+27012
+27013
+27014
+27015
+27016
+27017
+27018
+27019
+27020
+27021
+27022
+27023
+27024
+27025
+27026
+27027
+27028
+27029
+27030
+27031
+27032
+27033
+27034
+27035
+27036
+27037
+27038
+27039
+27040
+27041
+27042
+27043
+27044
+27045
+27046
+27047
+27048
+27049
+27050
+27051
+27052
+27053
+27054
+27055
+27056
+27057
+27058
+27059
+27060
+27061
+27062
+27063
+27064
+27065
+27066
+27067
+27068
+27069
+27070
+27071
+27072
+27073
+27074
+27075
+27076
+27077
+27078
+27079
+27080
+27081
+27082
+27083
+27084
+27085
+27086
+27087
+27088
+27089
+27090
+27091
+27092
+27093
+27094
+27095
+27096
+27097
+27098
+27099
+27100
+27101
+27102
+27103
+27104
+27105
+27106
+27107
+27108
+27109
+27110
+27111
+27112
+27113
+27114
+27115
+27116
+27117
+27118
+27119
+27120
+27121
+27122
+27123
+27124
+27125
+27126
+27127
+27128
+27129
+27130
+27131
+27132
+27133
+27134
+27135
+27136
+27137
+27138
+27139
+27140
+27141
+27142
+27143
+27144
+27145
+27146
+27147
+27148
+27149
+27150
+27151
+27152
+27153
+27154
+27155
+27156
+27157
+27158
+27159
+27160
+27161
+27162
+27163
+27164
+27165
+27166
+27167
+27168
+27169
+27170
+27171
+27172
+27173
+27174
+27175
+27176
+27177
+27178
+27179
+27180
+27181
+27182
+27183
+27184
+27185
+27186
+27187
+27188
+27189
+27190
+27191
+27192
+27193
+27194
+27195
+27196
+27197
+27198
+27199
+27200
+27201
+27202
+27203
+27204
+27205
+27206
+27207
+27208
+27209
+27210
+27211
+27212
+27213
+27214
+27215
+27216
+27217
+27218
+27219
+27220
+27221
+27222
+27223
+27224
+27225
+27226
+27227
+27228
+27229
+27230
+27231
+27232
+27233
+27234
+27235
+27236
+27237
+27238
+27239
+27240
+27241
+27242
+27243
+27244
+27245
+27246
+27247
+27248
+27249
+27250
+27251
+27252
+27253
+27254
+27255
+27256
+27257
+27258
+27259
+27260
+27261
+27262
+27263
+27264
+27265
+27266
+27267
+27268
+27269
+27270
+27271
+27272
+27273
+27274
+27275
+27276
+27277
+27278
+27279
+27280
+27281
+27282
+27283
+27284
+27285
+27286
+27287
+27288
+27289
+27290
+27291
+27292
+27293
+27294
+27295
+27296
+27297
+27298
+27299
+27300
+27301
+27302
+27303
+27304
+27305
+27306
+27307
+27308
+27309
+27310
+27311
+27312
+27313
+27314
+27315
+27316
+27317
+27318
+27319
+27320
+27321
+27322
+27323
+27324
+27325
+27326
+27327
+27328
+27329
+27330
+27331
+27332
+27333
+27334
+27335
+27336
+27337
+27338
+27339
+27340
+27341
+27342
+27343
+27344
+27345
+27346
+27347
+27348
+27349
+27350
+27351
+27352
+27353
+27354
+27355
+27356
+27357
+27358
+27359
+27360
+27361
+27362
+27363
+27364
+27365
+27366
+27367
+27368
+27369
+27370
+27371
+27372
+27373
+27374
+27375
+27376
+27377
+27378
+27379
+27380
+27381
+27382
+27383
+27384
+27385
+27386
+27387
+27388
+27389
+27390
+27391
+27392
+27393
+27394
+27395
+27396
+27397
+27398
+27399
+27400
+27401
+27402
+27403
+27404
+27405
+27406
+27407
+27408
+27409
+27410
+27411
+27412
+27413
+27414
+27415
+27416
+27417
+27418
+27419
+27420
+27421
+27422
+27423
+27424
+27425
+27426
+27427
+27428
+27429
+27430
+27431
+27432
+27433
+27434
+27435
+27436
+27437
+27438
+27439
+27440
+27441
+27442
+27443
+27444
+27445
+27446
+27447
+27448
+27449
+27450
+27451
+27452
+27453
+27454
+27455
+27456
+27457
+27458
+27459
+27460
+27461
+27462
+27463
+27464
+27465
+27466
+27467
+27468
+27469
+27470
+27471
+27472
+27473
+27474
+27475
+27476
+27477
+27478
+27479
+27480
+27481
+27482
+27483
+27484
+27485
+27486
+27487
+27488
+27489
+27490
+27491
+27492
+27493
+27494
+27495
+27496
+27497
+27498
+27499
+27500
+27501
+27502
+27503
+27504
+27505
+27506
+27507
+27508
+27509
+27510
+27511
+27512
+27513
+27514
+27515
+27516
+27517
+27518
+27519
+27520
+27521
+27522
+27523
+27524
+27525
+27526
+27527
+27528
+27529
+27530
+27531
+27532
+27533
+27534
+27535
+27536
+27537
+27538
+27539
+27540
+27541
+27542
+27543
+27544
+27545
+27546
+27547
+27548
+27549
+27550
+27551
+27552
+27553
+27554
+27555
+27556
+27557
+27558
+27559
+27560
+27561
+27562
+27563
+27564
+27565
+27566
+27567
+27568
+27569
+27570
+27571
+27572
+27573
+27574
+27575
+27576
+27577
+27578
+27579
+27580
+27581
+27582
+27583
+27584
+27585
+27586
+27587
+27588
+27589
+27590
+27591
+27592
+27593
+27594
+27595
+27596
+27597
+27598
+27599
+27600
+27601
+27602
+27603
+27604
+27605
+27606
+27607
+27608
+27609
+27610
+27611
+27612
+27613
+27614
+27615
+27616
+27617
+27618
+27619
+27620
+27621
+27622
+27623
+27624
+27625
+27626
+27627
+27628
+27629
+27630
+27631
+27632
+27633
+27634
+27635
+27636
+27637
+27638
+27639
+27640
+27641
+27642
+27643
+27644
+27645
+27646
+27647
+27648
+27649
+27650
+27651
+27652
+27653
+27654
+27655
+27656
+27657
+27658
+27659
+27660
+27661
+27662
+27663
+27664
+27665
+27666
+27667
+27668
+27669
+27670
+27671
+27672
+27673
+27674
+27675
+27676
+27677
+27678
+27679
+27680
+27681
+27682
+27683
+27684
+27685
+27686
+27687
+27688
+27689
+27690
+27691
+27692
+27693
+27694
+27695
+27696
+27697
+27698
+27699
+27700
+27701
+27702
+27703
+27704
+27705
+27706
+27707
+27708
+27709
+27710
+27711
+27712
+27713
+27714
+27715
+27716
+27717
+27718
+27719
+27720
+27721
+27722
+27723
+27724
+27725
+27726
+27727
+27728
+27729
+27730
+27731
+27732
+27733
+27734
+27735
+27736
+27737
+27738
+27739
+27740
+27741
+27742
+27743
+27744
+27745
+27746
+27747
+27748
+27749
+27750
+27751
+27752
+27753
+27754
+27755
+27756
+27757
+27758
+27759
+27760
+27761
+27762
+27763
+27764
+27765
+27766
+27767
+27768
+27769
+27770
+27771
+27772
+27773
+27774
+27775
+27776
+27777
+27778
+27779
+27780
+27781
+27782
+27783
+27784
+27785
+27786
+27787
+27788
+27789
+27790
+27791
+27792
+27793
+27794
+27795
+27796
+27797
+27798
+27799
+27800
+27801
+27802
+27803
+27804
+27805
+27806
+27807
+27808
+27809
+27810
+27811
+27812
+27813
+27814
+27815
+27816
+27817
+27818
+27819
+27820
+27821
+27822
+27823
+27824
+27825
+27826
+27827
+27828
+27829
+27830
+27831
+27832
+27833
+27834
+27835
+27836
+27837
+27838
+27839
+27840
+27841
+27842
+27843
+27844
+27845
+27846
+27847
+27848
+27849
+27850
+27851
+27852
+27853
+27854
+27855
+27856
+27857
+27858
+27859
+27860
+27861
+27862
+27863
+27864
+27865
+27866
+27867
+27868
+27869
+27870
+27871
+27872
+27873
+27874
+27875
+27876
+27877
+27878
+27879
+27880
+27881
+27882
+27883
+27884
+27885
+27886
+27887
+27888
+27889
+27890
+27891
+27892
+27893
+27894
+27895
+27896
+27897
+27898
+27899
+27900
+27901
+27902
+27903
+27904
+27905
+27906
+27907
+27908
+27909
+27910
+27911
+27912
+27913
+27914
+27915
+27916
+27917
+27918
+27919
+27920
+27921
+27922
+27923
+27924
+27925
+27926
+27927
+27928
+27929
+27930
+27931
+27932
+27933
+27934
+27935
+27936
+27937
+27938
+27939
+27940
+27941
+27942
+27943
+27944
+27945
+27946
+27947
+27948
+27949
+27950
+27951
+27952
+27953
+27954
+27955
+27956
+27957
+27958
+27959
+27960
+27961
+27962
+27963
+27964
+27965
+27966
+27967
+27968
+27969
+27970
+27971
+27972
+27973
+27974
+27975
+27976
+27977
+27978
+27979
+27980
+27981
+27982
+27983
+27984
+27985
+27986
+27987
+27988
+27989
+27990
+27991
+27992
+27993
+27994
+27995
+27996
+27997
+27998
+27999
+28000
+28001
+28002
+28003
+28004
+28005
+28006
+28007
+28008
+28009
+28010
+28011
+28012
+28013
+28014
+28015
+28016
+28017
+28018
+28019
+28020
+28021
+28022
+28023
+28024
+28025
+28026
+28027
+28028
+28029
+28030
+28031
+28032
+28033
+28034
+28035
+28036
+28037
+28038
+28039
+28040
+28041
+28042
+28043
+28044
+28045
+28046
+28047
+28048
+28049
+28050
+28051
+28052
+28053
+28054
+28055
+28056
+28057
+28058
+28059
+28060
+28061
+28062
+28063
+28064
+28065
+28066
+28067
+28068
+28069
+28070
+28071
+28072
+28073
+28074
+28075
+28076
+28077
+28078
+28079
+28080
+28081
+28082
+28083
+28084
+28085
+28086
+28087
+28088
+28089
+28090
+28091
+28092
+28093
+28094
+28095
+28096
+28097
+28098
+28099
+28100
+28101
+28102
+28103
+28104
+28105
+28106
+28107
+28108
+28109
+28110
+28111
+28112
+28113
+28114
+28115
+28116
+28117
+28118
+28119
+28120
+28121
+28122
+28123
+28124
+28125
+28126
+28127
+28128
+28129
+28130
+28131
+28132
+28133
+28134
+28135
+28136
+28137
+28138
+28139
+28140
+28141
+28142
+28143
+28144
+28145
+28146
+28147
+28148
+28149
+28150
+28151
+28152
+28153
+28154
+28155
+28156
+28157
+28158
+28159
+28160
+28161
+28162
+28163
+28164
+28165
+28166
+28167
+28168
+28169
+28170
+28171
+28172
+28173
+28174
+28175
+28176
+28177
+28178
+28179
+28180
+28181
+28182
+28183
+28184
+28185
+28186
+28187
+28188
+28189
+28190
+28191
+28192
+28193
+28194
+28195
+28196
+28197
+28198
+28199
+28200
+28201
+28202
+28203
+28204
+28205
+28206
+28207
+28208
+28209
+28210
+28211
+28212
+28213
+28214
+28215
+28216
+28217
+28218
+28219
+28220
+28221
+28222
+28223
+28224
+28225
+28226
+28227
+28228
+28229
+28230
+28231
+28232
+28233
+28234
+28235
+28236
+28237
+28238
+28239
+28240
+28241
+28242
+28243
+28244
+28245
+28246
+28247
+28248
+28249
+28250
+28251
+28252
+28253
+28254
+28255
+28256
+28257
+28258
+28259
+28260
+28261
+28262
+28263
+28264
+28265
+28266
+28267
+28268
+28269
+28270
+28271
+28272
+28273
+28274
+28275
+28276
+28277
+28278
+28279
+28280
+28281
+28282
+28283
+28284
+28285
+28286
+28287
+28288
+28289
+28290
+28291
+28292
+28293
+28294
+28295
+28296
+28297
+28298
+28299
+28300
+28301
+28302
+28303
+28304
+28305
+28306
+28307
+28308
+28309
+28310
+28311
+28312
+28313
+28314
+28315
+28316
+28317
+28318
+28319
+28320
+28321
+28322
+28323
+28324
+28325
+28326
+28327
+28328
+28329
+28330
+28331
+28332
+28333
+28334
+28335
+28336
+28337
+28338
+28339
+28340
+28341
+28342
+28343
+28344
+28345
+28346
+28347
+28348
+28349
+28350
+28351
+28352
+28353
+28354
+28355
+28356
+28357
+28358
+28359
+28360
+28361
+28362
+28363
+28364
+28365
+28366
+28367
+28368
+28369
+28370
+28371
+28372
+28373
+28374
+28375
+28376
+28377
+28378
+28379
+28380
+28381
+28382
+28383
+28384
+28385
+28386
+28387
+28388
+28389
+28390
+28391
+28392
+28393
+28394
+28395
+28396
+28397
+28398
+28399
+28400
+28401
+28402
+28403
+28404
+28405
+28406
+28407
+28408
+28409
+28410
+28411
+28412
+28413
+28414
+28415
+28416
+28417
+28418
+28419
+28420
+28421
+28422
+28423
+28424
+28425
+28426
+28427
+28428
+28429
+28430
+28431
+28432
+28433
+28434
+28435
+28436
+28437
+28438
+28439
+28440
+28441
+28442
+28443
+28444
+28445
+28446
+28447
+28448
+28449
+28450
+28451
+28452
+28453
+28454
+28455
+28456
+28457
+28458
+28459
+28460
+28461
+28462
+28463
+28464
+28465
+28466
+28467
+28468
+28469
+28470
+28471
+28472
+28473
+28474
+28475
+28476
+28477
+28478
+28479
+28480
+28481
+28482
+28483
+28484
+28485
+28486
+28487
+28488
+28489
+28490
+28491
+28492
+28493
+28494
+28495
+28496
+28497
+28498
+28499
+28500
+28501
+28502
+28503
+28504
+28505
+28506
+28507
+28508
+28509
+28510
+28511
+28512
+28513
+28514
+28515
+28516
+28517
+28518
+28519
+28520
+28521
+28522
+28523
+28524
+28525
+28526
+28527
+28528
+28529
+28530
+28531
+28532
+28533
+28534
+28535
+28536
+28537
+28538
+28539
+28540
+28541
+28542
+28543
+28544
+28545
+28546
+28547
+28548
+28549
+28550
+28551
+28552
+28553
+28554
+28555
+28556
+28557
+28558
+28559
+28560
+28561
+28562
+28563
+28564
+28565
+28566
+28567
+28568
+28569
+28570
+28571
+28572
+28573
+28574
+28575
+28576
+28577
+28578
+28579
+28580
+28581
+28582
+28583
+28584
+28585
+28586
+28587
+28588
+28589
+28590
+28591
+28592
+28593
+28594
+28595
+28596
+28597
+28598
+28599
+28600
+28601
+28602
+28603
+28604
+28605
+28606
+28607
+28608
+28609
+28610
+28611
+28612
+28613
+28614
+28615
+28616
+28617
+28618
+28619
+28620
+28621
+28622
+28623
+28624
+28625
+28626
+28627
+28628
+28629
+28630
+28631
+28632
+28633
+28634
+28635
+28636
+28637
+28638
+28639
+28640
+28641
+28642
+28643
+28644
+28645
+28646
+28647
+28648
+28649
+28650
+28651
+28652
+28653
+28654
+28655
+28656
+28657
+28658
+28659
+28660
+28661
+28662
+28663
+28664
+28665
+28666
+28667
+28668
+28669
+28670
+28671
+28672
+28673
+28674
+28675
+28676
+28677
+28678
+28679
+28680
+28681
+28682
+28683
+28684
+28685
+28686
+28687
+28688
+28689
+28690
+28691
+28692
+28693
+28694
+28695
+28696
+28697
+28698
+28699
+28700
+28701
+28702
+28703
+28704
+28705
+28706
+28707
+28708
+28709
+28710
+28711
+28712
+28713
+28714
+28715
+28716
+28717
+28718
+28719
+28720
+28721
+28722
+28723
+28724
+28725
+28726
+28727
+28728
+28729
+28730
+28731
+28732
+28733
+28734
+28735
+28736
+28737
+28738
+28739
+28740
+28741
+28742
+28743
+28744
+28745
+28746
+28747
+28748
+28749
+28750
+28751
+28752
+28753
+28754
+28755
+28756
+28757
+28758
+28759
+28760
+28761
+28762
+28763
+28764
+28765
+28766
+28767
+28768
+28769
+28770
+28771
+28772
+28773
+28774
+28775
+28776
+28777
+28778
+28779
+28780
+28781
+28782
+28783
+28784
+28785
+28786
+28787
+28788
+28789
+28790
+28791
+28792
+28793
+28794
+28795
+28796
+28797
+28798
+28799
+28800
+28801
+28802
+28803
+28804
+28805
+28806
+28807
+28808
+28809
+28810
+28811
+28812
+28813
+28814
+28815
+28816
+28817
+28818
+28819
+28820
+28821
+28822
+28823
+28824
+28825
+28826
+28827
+28828
+28829
+28830
+28831
+28832
+28833
+28834
+28835
+28836
+28837
+28838
+28839
+28840
+28841
+28842
+28843
+28844
+28845
+28846
+28847
+28848
+28849
+28850
+28851
+28852
+28853
+28854
+28855
+28856
+28857
+28858
+28859
+28860
+28861
+28862
+28863
+28864
+28865
+28866
+28867
+28868
+28869
+28870
+28871
+28872
+28873
+28874
+28875
+28876
+28877
+28878
+28879
+28880
+28881
+28882
+28883
+28884
+28885
+28886
+28887
+28888
+28889
+28890
+28891
+28892
+28893
+28894
+28895
+28896
+28897
+28898
+28899
+28900
+28901
+28902
+28903
+28904
+28905
+28906
+28907
+28908
+28909
+28910
+28911
+28912
+28913
+28914
+28915
+28916
+28917
+28918
+28919
+28920
+28921
+28922
+28923
+28924
+28925
+28926
+28927
+28928
+28929
+28930
+28931
+28932
+28933
+28934
+28935
+28936
+28937
+28938
+28939
+28940
+28941
+28942
+28943
+28944
+28945
+28946
+28947
+28948
+28949
+28950
+28951
+28952
+28953
+28954
+28955
+28956
+28957
+28958
+28959
+28960
+28961
+28962
+28963
+28964
+28965
+28966
+28967
+28968
+28969
+28970
+28971
+28972
+28973
+28974
+28975
+28976
+28977
+28978
+28979
+28980
+28981
+28982
+28983
+28984
+28985
+28986
+28987
+28988
+28989
+28990
+28991
+28992
+28993
+28994
+28995
+28996
+28997
+28998
+28999
+29000
+29001
+29002
+29003
+29004
+29005
+29006
+29007
+29008
+29009
+29010
+29011
+29012
+29013
+29014
+29015
+29016
+29017
+29018
+29019
+29020
+29021
+29022
+29023
+29024
+29025
+29026
+29027
+29028
+29029
+29030
+29031
+29032
+29033
+29034
+29035
+29036
+29037
+29038
+29039
+29040
+29041
+29042
+29043
+29044
+29045
+29046
+29047
+29048
+29049
+29050
+29051
+29052
+29053
+29054
+29055
+29056
+29057
+29058
+29059
+29060
+29061
+29062
+29063
+29064
+29065
+29066
+29067
+29068
+29069
+29070
+29071
+29072
+29073
+29074
+29075
+29076
+29077
+29078
+29079
+29080
+29081
+29082
+29083
+29084
+29085
+29086
+29087
+29088
+29089
+29090
+29091
+29092
+29093
+29094
+29095
+29096
+29097
+29098
+29099
+29100
+29101
+29102
+29103
+29104
+29105
+29106
+29107
+29108
+29109
+29110
+29111
+29112
+29113
+29114
+29115
+29116
+29117
+29118
+29119
+29120
+29121
+29122
+29123
+29124
+29125
+29126
+29127
+29128
+29129
+29130
+29131
+29132
+29133
+29134
+29135
+29136
+29137
+29138
+29139
+29140
+29141
+29142
+29143
+29144
+29145
+29146
+29147
+29148
+29149
+29150
+29151
+29152
+29153
+29154
+29155
+29156
+29157
+29158
+29159
+29160
+29161
+29162
+29163
+29164
+29165
+29166
+29167
+29168
+29169
+29170
+29171
+29172
+29173
+29174
+29175
+29176
+29177
+29178
+29179
+29180
+29181
+29182
+29183
+29184
+29185
+29186
+29187
+29188
+29189
+29190
+29191
+29192
+29193
+29194
+29195
+29196
+29197
+29198
+29199
+29200
+29201
+29202
+29203
+29204
+29205
+29206
+29207
+29208
+29209
+29210
+29211
+29212
+29213
+29214
+29215
+29216
+29217
+29218
+29219
+29220
+29221
+29222
+29223
+29224
+29225
+29226
+29227
+29228
+29229
+29230
+29231
+29232
+29233
+29234
+29235
+29236
+29237
+29238
+29239
+29240
+29241
+29242
+29243
+29244
+29245
+29246
+29247
+29248
+29249
+29250
+29251
+29252
+29253
+29254
+29255
+29256
+29257
+29258
+29259
+29260
+29261
+29262
+29263
+29264
+29265
+29266
+29267
+29268
+29269
+29270
+29271
+29272
+29273
+29274
+29275
+29276
+29277
+29278
+29279
+29280
+29281
+29282
+29283
+29284
+29285
+29286
+29287
+29288
+29289
+29290
+29291
+29292
+29293
+29294
+29295
+29296
+29297
+29298
+29299
+29300
+29301
+29302
+29303
+29304
+29305
+29306
+29307
+29308
+29309
+29310
+29311
+29312
+29313
+29314
+29315
+29316
+29317
+29318
+29319
+29320
+29321
+29322
+29323
+29324
+29325
+29326
+29327
+29328
+29329
+29330
+29331
+29332
+29333
+29334
+29335
+29336
+29337
+29338
+29339
+29340
+29341
+29342
+29343
+29344
+29345
+29346
+29347
+29348
+29349
+29350
+29351
+29352
+29353
+29354
+29355
+29356
+29357
+29358
+29359
+29360
+29361
+29362
+29363
+29364
+29365
+29366
+29367
+29368
+29369
+29370
+29371
+29372
+29373
+29374
+29375
+29376
+29377
+29378
+29379
+29380
+29381
+29382
+29383
+29384
+29385
+29386
+29387
+29388
+29389
+29390
+29391
+29392
+29393
+29394
+29395
+29396
+29397
+29398
+29399
+29400
+29401
+29402
+29403
+29404
+29405
+29406
+29407
+29408
+29409
+29410
+29411
+29412
+29413
+29414
+29415
+29416
+29417
+29418
+29419
+29420
+29421
+29422
+29423
+29424
+29425
+29426
+29427
+29428
+29429
+29430
+29431
+29432
+29433
+29434
+29435
+29436
+29437
+29438
+29439
+29440
+29441
+29442
+29443
+29444
+29445
+29446
+29447
+29448
+29449
+29450
+29451
+29452
+29453
+29454
+29455
+29456
+29457
+29458
+29459
+29460
+29461
+29462
+29463
+29464
+29465
+29466
+29467
+29468
+29469
+29470
+29471
+29472
+29473
+29474
+29475
+29476
+29477
+29478
+29479
+29480
+29481
+29482
+29483
+29484
+29485
+29486
+29487
+29488
+29489
+29490
+29491
+29492
+29493
+29494
+29495
+29496
+29497
+29498
+29499
+29500
+29501
+29502
+29503
+29504
+29505
+29506
+29507
+29508
+29509
+29510
+29511
+29512
+29513
+29514
+29515
+29516
+29517
+29518
+29519
+29520
+29521
+29522
+29523
+29524
+29525
+29526
+29527
+29528
+29529
+29530
+29531
+29532
+29533
+29534
+29535
+29536
+29537
+29538
+29539
+29540
+29541
+29542
+29543
+29544
+29545
+29546
+29547
+29548
+29549
+29550
+29551
+29552
+29553
+29554
+29555
+29556
+29557
+29558
+29559
+29560
+29561
+29562
+29563
+29564
+29565
+29566
+29567
+29568
+29569
+29570
+29571
+29572
+29573
+29574
+29575
+29576
+29577
+29578
+29579
+29580
+29581
+29582
+29583
+29584
+29585
+29586
+29587
+29588
+29589
+29590
+29591
+29592
+29593
+29594
+29595
+29596
+29597
+29598
+29599
+29600
+29601
+29602
+29603
+29604
+29605
+29606
+29607
+29608
+29609
+29610
+29611
+29612
+29613
+29614
+29615
+29616
+29617
+29618
+29619
+29620
+29621
+29622
+29623
+29624
+29625
+29626
+29627
+29628
+29629
+29630
+29631
+29632
+29633
+29634
+29635
+29636
+29637
+29638
+29639
+29640
+29641
+29642
+29643
+29644
+29645
+29646
+29647
+29648
+29649
+29650
+29651
+29652
+29653
+29654
+29655
+29656
+29657
+29658
+29659
+29660
+29661
+29662
+29663
+29664
+29665
+29666
+29667
+29668
+29669
+29670
+29671
+29672
+29673
+29674
+29675
+29676
+29677
+29678
+29679
+29680
+29681
+29682
+29683
+29684
+29685
+29686
+29687
+29688
+29689
+29690
+29691
+29692
+29693
+29694
+29695
+29696
+29697
+29698
+29699
+29700
+29701
+29702
+29703
+29704
+29705
+29706
+29707
+29708
+29709
+29710
+29711
+29712
+29713
+29714
+29715
+29716
+29717
+29718
+29719
+29720
+29721
+29722
+29723
+29724
+29725
+29726
+29727
+29728
+29729
+29730
+29731
+29732
+29733
+29734
+29735
+29736
+29737
+29738
+29739
+29740
+29741
+29742
+29743
+29744
+29745
+29746
+29747
+29748
+29749
+29750
+29751
+29752
+29753
+29754
+29755
+29756
+29757
+29758
+29759
+29760
+29761
+29762
+29763
+29764
+29765
+29766
+29767
+29768
+29769
+29770
+29771
+29772
+29773
+29774
+29775
+29776
+29777
+29778
+29779
+29780
+29781
+29782
+29783
+29784
+29785
+29786
+29787
+29788
+29789
+29790
+29791
+29792
+29793
+29794
+29795
+29796
+29797
+29798
+29799
+29800
+29801
+29802
+29803
+29804
+29805
+29806
+29807
+29808
+29809
+29810
+29811
+29812
+29813
+29814
+29815
+29816
+29817
+29818
+29819
+29820
+29821
+29822
+29823
+29824
+29825
+29826
+29827
+29828
+29829
+29830
+29831
+29832
+29833
+29834
+29835
+29836
+29837
+29838
+29839
+29840
+29841
+29842
+29843
+29844
+29845
+29846
+29847
+29848
+29849
+29850
+29851
+29852
+29853
+29854
+29855
+29856
+29857
+29858
+29859
+29860
+29861
+29862
+29863
+29864
+29865
+29866
+29867
+29868
+29869
+29870
+29871
+29872
+29873
+29874
+29875
+29876
+29877
+29878
+29879
+29880
+29881
+29882
+29883
+29884
+29885
+29886
+29887
+29888
+29889
+29890
+29891
+29892
+29893
+29894
+29895
+29896
+29897
+29898
+29899
+29900
+29901
+29902
+29903
+29904
+29905
+29906
+29907
+29908
+29909
+29910
+29911
+29912
+29913
+29914
+29915
+29916
+29917
+29918
+29919
+29920
+29921
+29922
+29923
+29924
+29925
+29926
+29927
+29928
+29929
+29930
+29931
+29932
+29933
+29934
+29935
+29936
+29937
+29938
+29939
+29940
+29941
+29942
+29943
+29944
+29945
+29946
+29947
+29948
+29949
+29950
+29951
+29952
+29953
+29954
+29955
+29956
+29957
+29958
+29959
+29960
+29961
+29962
+29963
+29964
+29965
+29966
+29967
+29968
+29969
+29970
+29971
+29972
+29973
+29974
+29975
+29976
+29977
+29978
+29979
+29980
+29981
+29982
+29983
+29984
+29985
+29986
+29987
+29988
+29989
+29990
+29991
+29992
+29993
+29994
+29995
+29996
+29997
+29998
+29999
+30000
+30001
+30002
+30003
+30004
+30005
+30006
+30007
+30008
+30009
+30010
+30011
+30012
+30013
+30014
+30015
+30016
+30017
+30018
+30019
+30020
+30021
+30022
+30023
+30024
+30025
+30026
+30027
+30028
+30029
+30030
+30031
+30032
+30033
+30034
+30035
+30036
+30037
+30038
+30039
+30040
+30041
+30042
+30043
+30044
+30045
+30046
+30047
+30048
+30049
+30050
+30051
+30052
+30053
+30054
+30055
+30056
+30057
+30058
+30059
+30060
+30061
+30062
+30063
+30064
+30065
+30066
+30067
+30068
+30069
+30070
+30071
+30072
+30073
+30074
+30075
+30076
+30077
+30078
+30079
+30080
+30081
+30082
+30083
+30084
+30085
+30086
+30087
+30088
+30089
+30090
+30091
+30092
+30093
+30094
+30095
+30096
+30097
+30098
+30099
+30100
+30101
+30102
+30103
+30104
+30105
+30106
+30107
+30108
+30109
+30110
+30111
+30112
+30113
+30114
+30115
+30116
+30117
+30118
+30119
+30120
+30121
+30122
+30123
+30124
+30125
+30126
+30127
+30128
+30129
+30130
+30131
+30132
+30133
+30134
+30135
+30136
+30137
+30138
+30139
+30140
+30141
+30142
+30143
+30144
+30145
+30146
+30147
+30148
+30149
+30150
+30151
+30152
+30153
+30154
+30155
+30156
+30157
+30158
+30159
+30160
+30161
+30162
+30163
+30164
+30165
+30166
+30167
+30168
+30169
+30170
+30171
+30172
+30173
+30174
+30175
+30176
+30177
+30178
+30179
+30180
+30181
+30182
+30183
+30184
+30185
+30186
+30187
+30188
+30189
+30190
+30191
+30192
+30193
+30194
+30195
+30196
+30197
+30198
+30199
+30200
+30201
+30202
+30203
+30204
+30205
+30206
+30207
+30208
+30209
+30210
+30211
+30212
+30213
+30214
+30215
+30216
+30217
+30218
+30219
+30220
+30221
+30222
+30223
+30224
+30225
+30226
+30227
+30228
+30229
+30230
+30231
+30232
+30233
+30234
+30235
+30236
+30237
+30238
+30239
+30240
+30241
+30242
+30243
+30244
+30245
+30246
+30247
+30248
+30249
+30250
+30251
+30252
+30253
+30254
+30255
+30256
+30257
+30258
+30259
+30260
+30261
+30262
+30263
+30264
+30265
+30266
+30267
+30268
+30269
+30270
+30271
+30272
+30273
+30274
+30275
+30276
+30277
+30278
+30279
+30280
+30281
+30282
+30283
+30284
+30285
+30286
+30287
+30288
+30289
+30290
+30291
+30292
+30293
+30294
+30295
+30296
+30297
+30298
+30299
+30300
+30301
+30302
+30303
+30304
+30305
+30306
+30307
+30308
+30309
+30310
+30311
+30312
+30313
+30314
+30315
+30316
+30317
+30318
+30319
+30320
+30321
+30322
+30323
+30324
+30325
+30326
+30327
+30328
+30329
+30330
+30331
+30332
+30333
+30334
+30335
+30336
+30337
+30338
+30339
+30340
+30341
+30342
+30343
+30344
+30345
+30346
+30347
+30348
+30349
+30350
+30351
+30352
+30353
+30354
+30355
+30356
+30357
+30358
+30359
+30360
+30361
+30362
+30363
+30364
+30365
+30366
+30367
+30368
+30369
+30370
+30371
+30372
+30373
+30374
+30375
+30376
+30377
+30378
+30379
+30380
+30381
+30382
+30383
+30384
+30385
+30386
+30387
+30388
+30389
+30390
+30391
+30392
+30393
+30394
+30395
+30396
+30397
+30398
+30399
+30400
+30401
+30402
+30403
+30404
+30405
+30406
+30407
+30408
+30409
+30410
+30411
+30412
+30413
+30414
+30415
+30416
+30417
+30418
+30419
+30420
+30421
+30422
+30423
+30424
+30425
+30426
+30427
+30428
+30429
+30430
+30431
+30432
+30433
+30434
+30435
+30436
+30437
+30438
+30439
+30440
+30441
+30442
+30443
+30444
+30445
+30446
+30447
+30448
+30449
+30450
+30451
+30452
+30453
+30454
+30455
+30456
+30457
+30458
+30459
+30460
+30461
+30462
+30463
+30464
+30465
+30466
+30467
+30468
+30469
+30470
+30471
+30472
+30473
+30474
+30475
+30476
+30477
+30478
+30479
+30480
+30481
+30482
+30483
+30484
+30485
+30486
+30487
+30488
+30489
+30490
+30491
+30492
+30493
+30494
+30495
+30496
+30497
+30498
+30499
+30500
+30501
+30502
+30503
+30504
+30505
+30506
+30507
+30508
+30509
+30510
+30511
+30512
+30513
+30514
+30515
+30516
+30517
+30518
+30519
+30520
+30521
+30522
+30523
+30524
+30525
+30526
+30527
+30528
+30529
+30530
+30531
+30532
+30533
+30534
+30535
+30536
+30537
+30538
+30539
+30540
+30541
+30542
+30543
+30544
+30545
+30546
+30547
+30548
+30549
+30550
+30551
+30552
+30553
+30554
+30555
+30556
+30557
+30558
+30559
+30560
+30561
+30562
+30563
+30564
+30565
+30566
+30567
+30568
+30569
+30570
+30571
+30572
+30573
+30574
+30575
+30576
+30577
+30578
+30579
+30580
+30581
+30582
+30583
+30584
+30585
+30586
+30587
+30588
+30589
+30590
+30591
+30592
+30593
+30594
+30595
+30596
+30597
+30598
+30599
+30600
+30601
+30602
+30603
+30604
+30605
+30606
+30607
+30608
+30609
+30610
+30611
+30612
+30613
+30614
+30615
+30616
+30617
+30618
+30619
+30620
+30621
+30622
+30623
+30624
+30625
+30626
+30627
+30628
+30629
+30630
+30631
+30632
+30633
+30634
+30635
+30636
+30637
+30638
+30639
+30640
+30641
+30642
+30643
+30644
+30645
+30646
+30647
+30648
+30649
+30650
+30651
+30652
+30653
+30654
+30655
+30656
+30657
+30658
+30659
+30660
+30661
+30662
+30663
+30664
+30665
+30666
+30667
+30668
+30669
+30670
+30671
+30672
+30673
+30674
+30675
+30676
+30677
+30678
+30679
+30680
+30681
+30682
+30683
+30684
+30685
+30686
+30687
+30688
+30689
+30690
+30691
+30692
+30693
+30694
+30695
+30696
+30697
+30698
+30699
+30700
+30701
+30702
+30703
+30704
+30705
+30706
+30707
+30708
+30709
+30710
+30711
+30712
+30713
+30714
+30715
+30716
+30717
+30718
+30719
+30720
+30721
+30722
+30723
+30724
+30725
+30726
+30727
+30728
+30729
+30730
+30731
+30732
+30733
+30734
+30735
+30736
+30737
+30738
+30739
+30740
+30741
+30742
+30743
+30744
+30745
+30746
+30747
+30748
+30749
+30750
+30751
+30752
+30753
+30754
+30755
+30756
+30757
+30758
+30759
+30760
+30761
+30762
+30763
+30764
+30765
+30766
+30767
+30768
+30769
+30770
+30771
+30772
+30773
+30774
+30775
+30776
+30777
+30778
+30779
+30780
+30781
+30782
+30783
+30784
+30785
+30786
+30787
+30788
+30789
+30790
+30791
+30792
+30793
+30794
+30795
+30796
+30797
+30798
+30799
+30800
+30801
+30802
+30803
+30804
+30805
+30806
+30807
+30808
+30809
+30810
+30811
+30812
+30813
+30814
+30815
+30816
+30817
+30818
+30819
+30820
+30821
+30822
+30823
+30824
+30825
+30826
+30827
+30828
+30829
+30830
+30831
+30832
+30833
+30834
+30835
+30836
+30837
+30838
+30839
+30840
+30841
+30842
+30843
+30844
+30845
+30846
+30847
+30848
+30849
+30850
+30851
+30852
+30853
+30854
+30855
+30856
+30857
+30858
+30859
+30860
+30861
+30862
+30863
+30864
+30865
+30866
+30867
+30868
+30869
+30870
+30871
+30872
+30873
+30874
+30875
+30876
+30877
+30878
+30879
+30880
+30881
+30882
+30883
+30884
+30885
+30886
+30887
+30888
+30889
+30890
+30891
+30892
+30893
+30894
+30895
+30896
+30897
+30898
+30899
+30900
+30901
+30902
+30903
+30904
+30905
+30906
+30907
+30908
+30909
+30910
+30911
+30912
+30913
+30914
+30915
+30916
+30917
+30918
+30919
+30920
+30921
+30922
+30923
+30924
+30925
+30926
+30927
+30928
+30929
+30930
+30931
+30932
+30933
+30934
+30935
+30936
+30937
+30938
+30939
+30940
+30941
+30942
+30943
+30944
+30945
+30946
+30947
+30948
+30949
+30950
+30951
+30952
+30953
+30954
+30955
+30956
+30957
+30958
+30959
+30960
+30961
+30962
+30963
+30964
+30965
+30966
+30967
+30968
+30969
+30970
+30971
+30972
+30973
+30974
+30975
+30976
+30977
+30978
+30979
+30980
+30981
+30982
+30983
+30984
+30985
+30986
+30987
+30988
+30989
+30990
+30991
+30992
+30993
+30994
+30995
+30996
+30997
+30998
+30999
+31000
+31001
+31002
+31003
+31004
+31005
+31006
+31007
+31008
+31009
+31010
+31011
+31012
+31013
+31014
+31015
+31016
+31017
+31018
+31019
+31020
+31021
+31022
+31023
+31024
+31025
+31026
+31027
+31028
+31029
+31030
+31031
+31032
+31033
+31034
+31035
+31036
+31037
+31038
+31039
+31040
+31041
+31042
+31043
+31044
+31045
+31046
+31047
+31048
+31049
+31050
+31051
+31052
+31053
+31054
+31055
+31056
+31057
+31058
+31059
+31060
+31061
+31062
+31063
+31064
+31065
+31066
+31067
+31068
+31069
+31070
+31071
+31072
+31073
+31074
+31075
+31076
+31077
+31078
+31079
+31080
+31081
+31082
+31083
+31084
+31085
+31086
+31087
+31088
+31089
+31090
+31091
+31092
+31093
+31094
+31095
+31096
+31097
+31098
+31099
+31100
+31101
+31102
+31103
+31104
+31105
+31106
+31107
+31108
+31109
+31110
+31111
+31112
+31113
+31114
+31115
+31116
+31117
+31118
+31119
+31120
+31121
+31122
+31123
+31124
+31125
+31126
+31127
+31128
+31129
+31130
+31131
+31132
+31133
+31134
+31135
+31136
+31137
+31138
+31139
+31140
+31141
+31142
+31143
+31144
+31145
+31146
+31147
+31148
+31149
+31150
+31151
+31152
+31153
+31154
+31155
+31156
+31157
+31158
+31159
+31160
+31161
+31162
+31163
+31164
+31165
+31166
+31167
+31168
+31169
+31170
+31171
+31172
+31173
+31174
+31175
+31176
+31177
+31178
+31179
+31180
+31181
+31182
+31183
+31184
+31185
+31186
+31187
+31188
+31189
+31190
+31191
+31192
+31193
+31194
+31195
+31196
+31197
+31198
+31199
+31200
+31201
+31202
+31203
+31204
+31205
+31206
+31207
+31208
+31209
+31210
+31211
+31212
+31213
+31214
+31215
+31216
+31217
+31218
+31219
+31220
+31221
+31222
+31223
+31224
+31225
+31226
+31227
+31228
+31229
+31230
+31231
+31232
+31233
+31234
+31235
+31236
+31237
+31238
+31239
+31240
+31241
+31242
+31243
+31244
+31245
+31246
+31247
+31248
+31249
+31250
+31251
+31252
+31253
+31254
+31255
+31256
+31257
+31258
+31259
+31260
+31261
+31262
+31263
+31264
+31265
+31266
+31267
+31268
+31269
+31270
+31271
+31272
+31273
+31274
+31275
+31276
+31277
+31278
+31279
+31280
+31281
+31282
+31283
+31284
+31285
+31286
+31287
+31288
+31289
+31290
+31291
+31292
+31293
+31294
+31295
+31296
+31297
+31298
+31299
+31300
+31301
+31302
+31303
+31304
+31305
+31306
+31307
+31308
+31309
+31310
+31311
+31312
+31313
+31314
+31315
+31316
+31317
+31318
+31319
+31320
+31321
+31322
+31323
+31324
+31325
+31326
+31327
+31328
+31329
+31330
+31331
+31332
+31333
+31334
+31335
+31336
+31337
+31338
+31339
+31340
+31341
+31342
+31343
+31344
+31345
+31346
+31347
+31348
+31349
+31350
+31351
+31352
+31353
+31354
+31355
+31356
+31357
+31358
+31359
+31360
+31361
+31362
+31363
+31364
+31365
+31366
+31367
+31368
+31369
+31370
+31371
+31372
+31373
+31374
+31375
+31376
+31377
+31378
+31379
+31380
+31381
+31382
+31383
+31384
+31385
+31386
+31387
+31388
+31389
+31390
+31391
+31392
+31393
+31394
+31395
+31396
+31397
+31398
+31399
+31400
+31401
+31402
+31403
+31404
+31405
+31406
+31407
+31408
+31409
+31410
+31411
+31412
+31413
+31414
+31415
+31416
+31417
+31418
+31419
+31420
+31421
+31422
+31423
+31424
+31425
+31426
+31427
+31428
+31429
+31430
+31431
+31432
+31433
+31434
+31435
+31436
+31437
+31438
+31439
+31440
+31441
+31442
+31443
+31444
+31445
+31446
+31447
+31448
+31449
+31450
+31451
+31452
+31453
+31454
+31455
+31456
+31457
+31458
+31459
+31460
+31461
+31462
+31463
+31464
+31465
+31466
+31467
+31468
+31469
+31470
+31471
+31472
+31473
+31474
+31475
+31476
+31477
+31478
+31479
+31480
+31481
+31482
+31483
+31484
+31485
+31486
+31487
+31488
+31489
+31490
+31491
+31492
+31493
+31494
+31495
+31496
+31497
+31498
+31499
+31500
+31501
+31502
+31503
+31504
+31505
+31506
+31507
+31508
+31509
+31510
+31511
+31512
+31513
+31514
+31515
+31516
+31517
+31518
+31519
+31520
+31521
+31522
+31523
+31524
+31525
+31526
+31527
+31528
+31529
+31530
+31531
+31532
+31533
+31534
+31535
+31536
+31537
+31538
+31539
+31540
+31541
+31542
+31543
+31544
+31545
+31546
+31547
+31548
+31549
+31550
+31551
+31552
+31553
+31554
+31555
+31556
+31557
+31558
+31559
+31560
+31561
+31562
+31563
+31564
+31565
+31566
+31567
+31568
+31569
+31570
+31571
+31572
+31573
+31574
+31575
+31576
+31577
+31578
+31579
+31580
+31581
+31582
+31583
+31584
+31585
+31586
+31587
+31588
+31589
+31590
+31591
+31592
+31593
+31594
+31595
+31596
+31597
+31598
+31599
+31600
+31601
+31602
+31603
+31604
+31605
+31606
+31607
+31608
+31609
+31610
+31611
+31612
+31613
+31614
+31615
+31616
+31617
+31618
+31619
+31620
+31621
+31622
+31623
+31624
+31625
+31626
+31627
+31628
+31629
+31630
+31631
+31632
+31633
+31634
+31635
+31636
+31637
+31638
+31639
+31640
+31641
+31642
+31643
+31644
+31645
+31646
+31647
+31648
+31649
+31650
+31651
+31652
+31653
+31654
+31655
+31656
+31657
+31658
+31659
+31660
+31661
+31662
+31663
+31664
+31665
+31666
+31667
+31668
+31669
+31670
+31671
+31672
+31673
+31674
+31675
+31676
+31677
+31678
+31679
+31680
+31681
+31682
+31683
+31684
+31685
+31686
+31687
+31688
+31689
+31690
+31691
+31692
+31693
+31694
+31695
+31696
+31697
+31698
+31699
+31700
+31701
+31702
+31703
+31704
+31705
+31706
+31707
+31708
+31709
+31710
+31711
+31712
+31713
+31714
+31715
+31716
+31717
+31718
+31719
+31720
+31721
+31722
+31723
+31724
+31725
+31726
+31727
+31728
+31729
+31730
+31731
+31732
+31733
+31734
+31735
+31736
+31737
+31738
+31739
+31740
+31741
+31742
+31743
+31744
+31745
+31746
+31747
+31748
+31749
+31750
+31751
+31752
+31753
+31754
+31755
+31756
+31757
+31758
+31759
+31760
+31761
+31762
+31763
+31764
+31765
+31766
+31767
+31768
+31769
+31770
+31771
+31772
+31773
+31774
+31775
+31776
+31777
+31778
+31779
+31780
+31781
+31782
+31783
+31784
+31785
+31786
+31787
+31788
+31789
+31790
+31791
+31792
+31793
+31794
+31795
+31796
+31797
+31798
+31799
+31800
+31801
+31802
+31803
+31804
+31805
+31806
+31807
+31808
+31809
+31810
+31811
+31812
+31813
+31814
+31815
+31816
+31817
+31818
+31819
+31820
+31821
+31822
+31823
+31824
+31825
+31826
+31827
+31828
+31829
+31830
+31831
+31832
+31833
+31834
+31835
+31836
+31837
+31838
+31839
+31840
+31841
+31842
+31843
+31844
+31845
+31846
+31847
+31848
+31849
+31850
+31851
+31852
+31853
+31854
+31855
+31856
+31857
+31858
+31859
+31860
+31861
+31862
+31863
+31864
+31865
+31866
+31867
+31868
+31869
+31870
+31871
+31872
+31873
+31874
+31875
+31876
+31877
+31878
+31879
+31880
+31881
+31882
+31883
+31884
+31885
+31886
+31887
+31888
+31889
+31890
+31891
+31892
+31893
+31894
+31895
+31896
+31897
+31898
+31899
+31900
+31901
+31902
+31903
+31904
+31905
+31906
+31907
+31908
+31909
+31910
+31911
+31912
+31913
+31914
+31915
+31916
+31917
+31918
+31919
+31920
+31921
+31922
+31923
+31924
+31925
+31926
+31927
+31928
+31929
+31930
+31931
+31932
+31933
+31934
+31935
+31936
+31937
+31938
+31939
+31940
+31941
+31942
+31943
+31944
+31945
+31946
+31947
+31948
+31949
+31950
+31951
+31952
+31953
+31954
+31955
+31956
+31957
+31958
+31959
+31960
+31961
+31962
+31963
+31964
+31965
+31966
+31967
+31968
+31969
+31970
+31971
+31972
+31973
+31974
+31975
+31976
+31977
+31978
+31979
+31980
+31981
+31982
+31983
+31984
+31985
+31986
+31987
+31988
+31989
+31990
+31991
+31992
+31993
+31994
+31995
+31996
+31997
+31998
+31999
+32000
+32001
+32002
+32003
+32004
+32005
+32006
+32007
+32008
+32009
+32010
+32011
+32012
+32013
+32014
+32015
+32016
+32017
+32018
+32019
+32020
+32021
+32022
+32023
+32024
+32025
+32026
+32027
+32028
+32029
+32030
+32031
+32032
+32033
+32034
+32035
+32036
+32037
+32038
+32039
+32040
+32041
+32042
+32043
+32044
+32045
+32046
+32047
+32048
+32049
+32050
+32051
+32052
+32053
+32054
+32055
+32056
+32057
+32058
+32059
+32060
+32061
+32062
+32063
+32064
+32065
+32066
+32067
+32068
+32069
+32070
+32071
+32072
+32073
+32074
+32075
+32076
+32077
+32078
+32079
+32080
+32081
+32082
+32083
+32084
+32085
+32086
+32087
+32088
+32089
+32090
+32091
+32092
+32093
+32094
+32095
+32096
+32097
+32098
+32099
+32100
+32101
+32102
+32103
+32104
+32105
+32106
+32107
+32108
+32109
+32110
+32111
+32112
+32113
+32114
+32115
+32116
+32117
+32118
+32119
+32120
+32121
+32122
+32123
+32124
+32125
+32126
+32127
+32128
+32129
+32130
+32131
+32132
+32133
+32134
+32135
+32136
+32137
+32138
+32139
+32140
+32141
+32142
+32143
+32144
+32145
+32146
+32147
+32148
+32149
+32150
+32151
+32152
+32153
+32154
+32155
+32156
+32157
+32158
+32159
+32160
+32161
+32162
+32163
+32164
+32165
+32166
+32167
+32168
+32169
+32170
+32171
+32172
+32173
+32174
+32175
+32176
+32177
+32178
+32179
+32180
+32181
+32182
+32183
+32184
+32185
+32186
+32187
+32188
+32189
+32190
+32191
+32192
+32193
+32194
+32195
+32196
+32197
+32198
+32199
+32200
+32201
+32202
+32203
+32204
+32205
+32206
+32207
+32208
+32209
+32210
+32211
+32212
+32213
+32214
+32215
+32216
+32217
+32218
+32219
+32220
+32221
+32222
+32223
+32224
+32225
+32226
+32227
+32228
+32229
+32230
+32231
+32232
+32233
+32234
+32235
+32236
+32237
+32238
+32239
+32240
+32241
+32242
+32243
+32244
+32245
+32246
+32247
+32248
+32249
+32250
+32251
+32252
+32253
+32254
+32255
+32256
+32257
+32258
+32259
+32260
+32261
+32262
+32263
+32264
+32265
+32266
+32267
+32268
+32269
+32270
+32271
+32272
+32273
+32274
+32275
+32276
+32277
+32278
+32279
+32280
+32281
+32282
+32283
+32284
+32285
+32286
+32287
+32288
+32289
+32290
+32291
+32292
+32293
+32294
+32295
+32296
+32297
+32298
+32299
+32300
+32301
+32302
+32303
+32304
+32305
+32306
+32307
+32308
+32309
+32310
+32311
+32312
+32313
+32314
+32315
+32316
+32317
+32318
+32319
+32320
+32321
+32322
+32323
+32324
+32325
+32326
+32327
+32328
+32329
+32330
+32331
+32332
+32333
+32334
+32335
+32336
+32337
+32338
+32339
+32340
+32341
+32342
+32343
+32344
+32345
+32346
+32347
+32348
+32349
+32350
+32351
+32352
+32353
+32354
+32355
+32356
+32357
+32358
+32359
+32360
+32361
+32362
+32363
+32364
+32365
+32366
+32367
+32368
+32369
+32370
+32371
+32372
+32373
+32374
+32375
+32376
+32377
+32378
+32379
+32380
+32381
+32382
+32383
+32384
+32385
+32386
+32387
+32388
+32389
+32390
+32391
+32392
+32393
+32394
+32395
+32396
+32397
+32398
+32399
+32400
+32401
+32402
+32403
+32404
+32405
+32406
+32407
+32408
+32409
+32410
+32411
+32412
+32413
+32414
+32415
+32416
+32417
+32418
+32419
+32420
+32421
+32422
+32423
+32424
+32425
+32426
+32427
+32428
+32429
+32430
+32431
+32432
+32433
+32434
+32435
+32436
+32437
+32438
+32439
+32440
+32441
+32442
+32443
+32444
+32445
+32446
+32447
+32448
+32449
+32450
+32451
+32452
+32453
+32454
+32455
+32456
+32457
+32458
+32459
+32460
+32461
+32462
+32463
+32464
+32465
+32466
+32467
+32468
+32469
+32470
+32471
+32472
+32473
+32474
+32475
+32476
+32477
+32478
+32479
+32480
+32481
+32482
+32483
+32484
+32485
+32486
+32487
+32488
+32489
+32490
+32491
+32492
+32493
+32494
+32495
+32496
+32497
+32498
+32499
+32500
+32501
+32502
+32503
+32504
+32505
+32506
+32507
+32508
+32509
+32510
+32511
+32512
+32513
+32514
+32515
+32516
+32517
+32518
+32519
+32520
+32521
+32522
+32523
+32524
+32525
+32526
+32527
+32528
+32529
+32530
+32531
+32532
+32533
+32534
+32535
+32536
+32537
+32538
+32539
+32540
+32541
+32542
+32543
+32544
+32545
+32546
+32547
+32548
+32549
+32550
+32551
+32552
+32553
+32554
+32555
+32556
+32557
+32558
+32559
+32560
+32561
+32562
+32563
+32564
+32565
+32566
+32567
+32568
+32569
+32570
+32571
+32572
+32573
+32574
+32575
+32576
+32577
+32578
+32579
+32580
+32581
+32582
+32583
+32584
+32585
+32586
+32587
+32588
+32589
+32590
+32591
+32592
+32593
+32594
+32595
+32596
+32597
+32598
+32599
+32600
+32601
+32602
+32603
+32604
+32605
+32606
+32607
+32608
+32609
+32610
+32611
+32612
+32613
+32614
+32615
+32616
+32617
+32618
+32619
+32620
+32621
+32622
+32623
+32624
+32625
+32626
+32627
+32628
+32629
+32630
+32631
+32632
+32633
+32634
+32635
+32636
+32637
+32638
+32639
+32640
+32641
+32642
+32643
+32644
+32645
+32646
+32647
+32648
+32649
+32650
+32651
+32652
+32653
+32654
+32655
+32656
+32657
+32658
+32659
+32660
+32661
+32662
+32663
+32664
+32665
+32666
+32667
+32668
+32669
+32670
+32671
+32672
+32673
+32674
+32675
+32676
+32677
+32678
+32679
+32680
+32681
+32682
+32683
+32684
+32685
+32686
+32687
+32688
+32689
+32690
+32691
+32692
+32693
+32694
+32695
+32696
+32697
+32698
+32699
+32700
+32701
+32702
+32703
+32704
+32705
+32706
+32707
+32708
+32709
+32710
+32711
+32712
+32713
+32714
+32715
+32716
+32717
+32718
+32719
+32720
+32721
+32722
+32723
+32724
+32725
+32726
+32727
+32728
+32729
+32730
+32731
+32732
+32733
+32734
+32735
+32736
+32737
+32738
+32739
+32740
+32741
+32742
+32743
+32744
+32745
+32746
+32747
+32748
+32749
+32750
+32751
+32752
+32753
+32754
+32755
+32756
+32757
+32758
+32759
+32760
+32761
+32762
+32763
+32764
+32765
+32766
+32767
+32768
+32769
+32770
+32771
+32772
+32773
+32774
+32775
+32776
+32777
+32778
+32779
+32780
+32781
+32782
+32783
+32784
+32785
+32786
+32787
+32788
+32789
+32790
+32791
+32792
+32793
+32794
+32795
+32796
+32797
+32798
+32799
+32800
+32801
+32802
+32803
+32804
+32805
+32806
+32807
+32808
+32809
+32810
+32811
+32812
+32813
+32814
+32815
+32816
+32817
+32818
+32819
+32820
+32821
+32822
+32823
+32824
+32825
+32826
+32827
+32828
+32829
+32830
+32831
+32832
+32833
+32834
+32835
+32836
+32837
+32838
+32839
+32840
+32841
+32842
+32843
+32844
+32845
+32846
+32847
+32848
+32849
+32850
+32851
+32852
+32853
+32854
+32855
+32856
+32857
+32858
+32859
+32860
+32861
+32862
+32863
+32864
+32865
+32866
+32867
+32868
+32869
+32870
+32871
+32872
+32873
+32874
+32875
+32876
+32877
+32878
+32879
+32880
+32881
+32882
+32883
+32884
+32885
+32886
+32887
+32888
+32889
+32890
+32891
+32892
+32893
+32894
+32895
+32896
+32897
+32898
+32899
+32900
+32901
+32902
+32903
+32904
+32905
+32906
+32907
+32908
+32909
+32910
+32911
+32912
+32913
+32914
+32915
+32916
+32917
+32918
+32919
+32920
+32921
+32922
+32923
+32924
+32925
+32926
+32927
+32928
+32929
+32930
+32931
+32932
+32933
+32934
+32935
+32936
+32937
+32938
+32939
+32940
+32941
+32942
+32943
+32944
+32945
+32946
+32947
+32948
+32949
+32950
+32951
+32952
+32953
+32954
+32955
+32956
+32957
+32958
+32959
+32960
+32961
+32962
+32963
+32964
+32965
+32966
+32967
+32968
+32969
+32970
+32971
+32972
+32973
+32974
+32975
+32976
+32977
+32978
+32979
+32980
+32981
+32982
+32983
+32984
+32985
+32986
+32987
+32988
+32989
+32990
+32991
+32992
+32993
+32994
+32995
+32996
+32997
+32998
+32999
+33000
+33001
+33002
+33003
+33004
+33005
+33006
+33007
+33008
+33009
+33010
+33011
+33012
+33013
+33014
+33015
+33016
+33017
+33018
+33019
+33020
+33021
+33022
+33023
+33024
+33025
+33026
+33027
+33028
+33029
+33030
+33031
+33032
+33033
+33034
+33035
+33036
+33037
+33038
+33039
+33040
+33041
+33042
+33043
+33044
+33045
+33046
+33047
+33048
+33049
+33050
+33051
+33052
+33053
+33054
+33055
+33056
+33057
+33058
+33059
+33060
+33061
+33062
+33063
+33064
+33065
+33066
+33067
+33068
+33069
+33070
+33071
+33072
+33073
+33074
+33075
+33076
+33077
+33078
+33079
+33080
+33081
+33082
+33083
+33084
+33085
+33086
+33087
+33088
+33089
+33090
+33091
+33092
+33093
+33094
+33095
+33096
+33097
+33098
+33099
+33100
+33101
+33102
+33103
+33104
+33105
+33106
+33107
+33108
+33109
+33110
+33111
+33112
+33113
+33114
+33115
+33116
+33117
+33118
+33119
+33120
+33121
+33122
+33123
+33124
+33125
+33126
+33127
+33128
+33129
+33130
+33131
+33132
+33133
+33134
+33135
+33136
+33137
+33138
+33139
+33140
+33141
+33142
+33143
+33144
+33145
+33146
+33147
+33148
+33149
+33150
+33151
+33152
+33153
+33154
+33155
+33156
+33157
+33158
+33159
+33160
+33161
+33162
+33163
+33164
+33165
+33166
+33167
+33168
+33169
+33170
+33171
+33172
+33173
+33174
+33175
+33176
+33177
+33178
+33179
+33180
+33181
+33182
+33183
+33184
+33185
+33186
+33187
+33188
+33189
+33190
+33191
+33192
+33193
+33194
+33195
+33196
+33197
+33198
+33199
+33200
+33201
+33202
+33203
+33204
+33205
+33206
+33207
+33208
+33209
+33210
+33211
+33212
+33213
+33214
+33215
+33216
+33217
+33218
+33219
+33220
+33221
+33222
+33223
+33224
+33225
+33226
+33227
+33228
+33229
+33230
+33231
+33232
+33233
+33234
+33235
+33236
+33237
+33238
+33239
+33240
+33241
+33242
+33243
+33244
+33245
+33246
+33247
+33248
+33249
+33250
+33251
+33252
+33253
+33254
+33255
+33256
+33257
+33258
+33259
+33260
+33261
+33262
+33263
+33264
+33265
+33266
+33267
+33268
+33269
+33270
+33271
+33272
+33273
+33274
+33275
+33276
+33277
+33278
+33279
+33280
+33281
+33282
+33283
+33284
+33285
+33286
+33287
+33288
+33289
+33290
+33291
+33292
+33293
+33294
+33295
+33296
+33297
+33298
+33299
+33300
+33301
+33302
+33303
+33304
+33305
+33306
+33307
+33308
+33309
+33310
+33311
+33312
+33313
+33314
+33315
+33316
+33317
+33318
+33319
+33320
+33321
+33322
+33323
+33324
+33325
+33326
+33327
+33328
+33329
+33330
+33331
+33332
+33333
+33334
+33335
+33336
+33337
+33338
+33339
+33340
+33341
+33342
+33343
+33344
+33345
+33346
+33347
+33348
+33349
+33350
+33351
+33352
+33353
+33354
+33355
+33356
+33357
+33358
+33359
+33360
+33361
+33362
+33363
+33364
+33365
+33366
+33367
+33368
+33369
+33370
+33371
+33372
+33373
+33374
+33375
+33376
+33377
+33378
+33379
+33380
+33381
+33382
+33383
+33384
+33385
+33386
+33387
+33388
+33389
+33390
+33391
+33392
+33393
+33394
+33395
+33396
+33397
+33398
+33399
+33400
+33401
+33402
+33403
+33404
+33405
+33406
+33407
+33408
+33409
+33410
+33411
+33412
+33413
+33414
+33415
+33416
+33417
+33418
+33419
+33420
+33421
+33422
+33423
+33424
+33425
+33426
+33427
+33428
+33429
+33430
+33431
+33432
+33433
+33434
+33435
+33436
+33437
+33438
+33439
+33440
+33441
+33442
+33443
+33444
+33445
+33446
+33447
+33448
+33449
+33450
+33451
+33452
+33453
+33454
+33455
+33456
+33457
+33458
+33459
+33460
+33461
+33462
+33463
+33464
+33465
+33466
+33467
+33468
+33469
+33470
+33471
+33472
+33473
+33474
+33475
+33476
+33477
+33478
+33479
+33480
+33481
+33482
+33483
+33484
+33485
+33486
+33487
+33488
+33489
+33490
+33491
+33492
+33493
+33494
+33495
+33496
+33497
+33498
+33499
+33500
+33501
+33502
+33503
+33504
+33505
+33506
+33507
+33508
+33509
+33510
+33511
+33512
+33513
+33514
+33515
+33516
+33517
+33518
+33519
+33520
+33521
+33522
+33523
+33524
+33525
+33526
+33527
+33528
+33529
+33530
+33531
+33532
+33533
+33534
+33535
+33536
+33537
+33538
+33539
+33540
+33541
+33542
+33543
+33544
+33545
+33546
+33547
+33548
+33549
+33550
+33551
+33552
+33553
+33554
+33555
+33556
+33557
+33558
+33559
+33560
+33561
+33562
+33563
+33564
+33565
+33566
+33567
+33568
+33569
+33570
+33571
+33572
+33573
+33574
+33575
+33576
+33577
+33578
+33579
+33580
+33581
+33582
+33583
+33584
+33585
+33586
+33587
+33588
+33589
+33590
+33591
+33592
+33593
+33594
+33595
+33596
+33597
+33598
+33599
+33600
+33601
+33602
+33603
+33604
+33605
+33606
+33607
+33608
+33609
+33610
+33611
+33612
+33613
+33614
+33615
+33616
+33617
+33618
+33619
+33620
+33621
+33622
+33623
+33624
+33625
+33626
+33627
+33628
+33629
+33630
+33631
+33632
+33633
+33634
+33635
+33636
+33637
+33638
+33639
+33640
+33641
+33642
+33643
+33644
+33645
+33646
+33647
+33648
+33649
+33650
+33651
+33652
+33653
+33654
+33655
+33656
+33657
+33658
+33659
+33660
+33661
+33662
+33663
+33664
+33665
+33666
+33667
+33668
+33669
+33670
+33671
+33672
+33673
+33674
+33675
+33676
+33677
+33678
+33679
+33680
+33681
+33682
+33683
+33684
+33685
+33686
+33687
+33688
+33689
+33690
+33691
+33692
+33693
+33694
+33695
+33696
+33697
+33698
+33699
+33700
+33701
+33702
+33703
+33704
+33705
+33706
+33707
+33708
+33709
+33710
+33711
+33712
+33713
+33714
+33715
+33716
+33717
+33718
+33719
+33720
+33721
+33722
+33723
+33724
+33725
+33726
+33727
+33728
+33729
+33730
+33731
+33732
+33733
+33734
+33735
+33736
+33737
+33738
+33739
+33740
+33741
+33742
+33743
+33744
+33745
+33746
+33747
+33748
+33749
+33750
+33751
+33752
+33753
+33754
+33755
+33756
+33757
+33758
+33759
+33760
+33761
+33762
+33763
+33764
+33765
+33766
+33767
+33768
+33769
+33770
+33771
+33772
+33773
+33774
+33775
+33776
+33777
+33778
+33779
+33780
+33781
+33782
+33783
+33784
+33785
+33786
+33787
+33788
+33789
+33790
+33791
+33792
+33793
+33794
+33795
+33796
+33797
+33798
+33799
+33800
+33801
+33802
+33803
+33804
+33805
+33806
+33807
+33808
+33809
+33810
+33811
+33812
+33813
+33814
+33815
+33816
+33817
+33818
+33819
+33820
+33821
+33822
+33823
+33824
+33825
+33826
+33827
+33828
+33829
+33830
+33831
+33832
+33833
+33834
+33835
+33836
+33837
+33838
+33839
+33840
+33841
+33842
+33843
+33844
+33845
+33846
+33847
+33848
+33849
+33850
+33851
+33852
+33853
+33854
+33855
+33856
+33857
+33858
+33859
+33860
+33861
+33862
+33863
+33864
+33865
+33866
+33867
+33868
+33869
+33870
+33871
+33872
+33873
+33874
+33875
+33876
+33877
+33878
+33879
+33880
+33881
+33882
+33883
+33884
+33885
+33886
+33887
+33888
+33889
+33890
+33891
+33892
+33893
+33894
+33895
+33896
+33897
+33898
+33899
+33900
+33901
+33902
+33903
+33904
+33905
+33906
+33907
+33908
+33909
+33910
+33911
+33912
+33913
+33914
+33915
+33916
+33917
+33918
+33919
+33920
+33921
+33922
+33923
+33924
+33925
+33926
+33927
+33928
+33929
+33930
+33931
+33932
+33933
+33934
+33935
+33936
+33937
+33938
+33939
+33940
+33941
+33942
+33943
+33944
+33945
+33946
+33947
+33948
+33949
+33950
+33951
+33952
+33953
+33954
+33955
+33956
+33957
+33958
+33959
+33960
+33961
+33962
+33963
+33964
+33965
+33966
+33967
+33968
+33969
+33970
+33971
+33972
+33973
+33974
+33975
+33976
+33977
+33978
+33979
+33980
+33981
+33982
+33983
+33984
+33985
+33986
+33987
+33988
+33989
+33990
+33991
+33992
+33993
+33994
+33995
+33996
+33997
+33998
+33999
+34000
+34001
+34002
+34003
+34004
+34005
+34006
+34007
+34008
+34009
+34010
+34011
+34012
+34013
+34014
+34015
+34016
+34017
+34018
+34019
+34020
+34021
+34022
+34023
+34024
+34025
+34026
+34027
+34028
+34029
+34030
+34031
+34032
+34033
+34034
+34035
+34036
+34037
+34038
+34039
+34040
+34041
+34042
+34043
+34044
+34045
+34046
+34047
+34048
+34049
+34050
+34051
+34052
+34053
+34054
+34055
+34056
+34057
+34058
+34059
+34060
+34061
+34062
+34063
+34064
+34065
+34066
+34067
+34068
+34069
+34070
+34071
+34072
+34073
+34074
+34075
+34076
+34077
+34078
+34079
+34080
+34081
+34082
+34083
+34084
+34085
+34086
+34087
+34088
+34089
+34090
+34091
+34092
+34093
+34094
+34095
+34096
+34097
+34098
+34099
+34100
+34101
+34102
+34103
+34104
+34105
+34106
+34107
+34108
+34109
+34110
+34111
+34112
+34113
+34114
+34115
+34116
+34117
+34118
+34119
+34120
+34121
+34122
+34123
+34124
+34125
+34126
+34127
+34128
+34129
+34130
+34131
+34132
+34133
+34134
+34135
+34136
+34137
+34138
+34139
+34140
+34141
+34142
+34143
+34144
+34145
+34146
+34147
+34148
+34149
+34150
+34151
+34152
+34153
+34154
+34155
+34156
+34157
+34158
+34159
+34160
+34161
+34162
+34163
+34164
+34165
+34166
+34167
+34168
+34169
+34170
+34171
+34172
+34173
+34174
+34175
+34176
+34177
+34178
+34179
+34180
+34181
+34182
+34183
+34184
+34185
+34186
+34187
+34188
+34189
+34190
+34191
+34192
+34193
+34194
+34195
+34196
+34197
+34198
+34199
+34200
+34201
+34202
+34203
+34204
+34205
+34206
+34207
+34208
+34209
+34210
+34211
+34212
+34213
+34214
+34215
+34216
+34217
+34218
+34219
+34220
+34221
+34222
+34223
+34224
+34225
+34226
+34227
+34228
+34229
+34230
+34231
+34232
+34233
+34234
+34235
+34236
+34237
+34238
+34239
+34240
+34241
+34242
+34243
+34244
+34245
+34246
+34247
+34248
+34249
+34250
+34251
+34252
+34253
+34254
+34255
+34256
+34257
+34258
+34259
+34260
+34261
+34262
+34263
+34264
+34265
+34266
+34267
+34268
+34269
+34270
+34271
+34272
+34273
+34274
+34275
+34276
+34277
+34278
+34279
+34280
+34281
+34282
+34283
+34284
+34285
+34286
+34287
+34288
+34289
+34290
+34291
+34292
+34293
+34294
+34295
+34296
+34297
+34298
+34299
+34300
+34301
+34302
+34303
+34304
+34305
+34306
+34307
+34308
+34309
+34310
+34311
+34312
+34313
+34314
+34315
+34316
+34317
+34318
+34319
+34320
+34321
+34322
+34323
+34324
+34325
+34326
+34327
+34328
+34329
+34330
+34331
+34332
+34333
+34334
+34335
+34336
+34337
+34338
+34339
+34340
+34341
+34342
+34343
+34344
+34345
+34346
+34347
+34348
+34349
+34350
+34351
+34352
+34353
+34354
+34355
+34356
+34357
+34358
+34359
+34360
+34361
+34362
+34363
+34364
+34365
+34366
+34367
+34368
+34369
+34370
+34371
+34372
+34373
+34374
+34375
+34376
+34377
+34378
+34379
+34380
+34381
+34382
+34383
+34384
+34385
+34386
+34387
+34388
+34389
+34390
+34391
+34392
+34393
+34394
+34395
+34396
+34397
+34398
+34399
+34400
+34401
+34402
+34403
+34404
+34405
+34406
+34407
+34408
+34409
+34410
+34411
+34412
+34413
+34414
+34415
+34416
+34417
+34418
+34419
+34420
+34421
+34422
+34423
+34424
+34425
+34426
+34427
+34428
+34429
+34430
+34431
+34432
+34433
+34434
+34435
+34436
+34437
+34438
+34439
+34440
+34441
+34442
+34443
+34444
+34445
+34446
+34447
+34448
+34449
+34450
+34451
+34452
+34453
+34454
+34455
+34456
+34457
+34458
+34459
+34460
+34461
+34462
+34463
+34464
+34465
+34466
+34467
+34468
+34469
+34470
+34471
+34472
+34473
+34474
+34475
+34476
+34477
+34478
+34479
+34480
+34481
+34482
+34483
+34484
+34485
+34486
+34487
+34488
+34489
+34490
+34491
+34492
+34493
+34494
+34495
+34496
+34497
+34498
+34499
+34500
+34501
+34502
+34503
+34504
+34505
+34506
+34507
+34508
+34509
+34510
+34511
+34512
+34513
+34514
+34515
+34516
+34517
+34518
+34519
+34520
+34521
+34522
+34523
+34524
+34525
+34526
+34527
+34528
+34529
+34530
+34531
+34532
+34533
+34534
+34535
+34536
+34537
+34538
+34539
+34540
+34541
+34542
+34543
+34544
+34545
+34546
+34547
+34548
+34549
+34550
+34551
+34552
+34553
+34554
+34555
+34556
+34557
+34558
+34559
+34560
+34561
+34562
+34563
+34564
+34565
+34566
+34567
+34568
+34569
+34570
+34571
+34572
+34573
+34574
+34575
+34576
+34577
+34578
+34579
+34580
+34581
+34582
+34583
+34584
+34585
+34586
+34587
+34588
+34589
+34590
+34591
+34592
+34593
+34594
+34595
+34596
+34597
+34598
+34599
+34600
+34601
+34602
+34603
+34604
+34605
+34606
+34607
+34608
+34609
+34610
+34611
+34612
+34613
+34614
+34615
+34616
+34617
+34618
+34619
+34620
+34621
+34622
+34623
+34624
+34625
+34626
+34627
+34628
+34629
+34630
+34631
+34632
+34633
+34634
+34635
+34636
+34637
+34638
+34639
+34640
+34641
+34642
+34643
+34644
+34645
+34646
+34647
+34648
+34649
+34650
+34651
+34652
+34653
+34654
+34655
+34656
+34657
+34658
+34659
+34660
+34661
+34662
+34663
+34664
+34665
+34666
+34667
+34668
+34669
+34670
+34671
+34672
+34673
+34674
+34675
+34676
+34677
+34678
+34679
+34680
+34681
+34682
+34683
+34684
+34685
+34686
+34687
+34688
+34689
+34690
+34691
+34692
+34693
+34694
+34695
+34696
+34697
+34698
+34699
+34700
+34701
+34702
+34703
+34704
+34705
+34706
+34707
+34708
+34709
+34710
+34711
+34712
+34713
+34714
+34715
+34716
+34717
+34718
+34719
+34720
+34721
+34722
+34723
+34724
+34725
+34726
+34727
+34728
+34729
+34730
+34731
+34732
+34733
+34734
+34735
+34736
+34737
+34738
+34739
+34740
+34741
+34742
+34743
+34744
+34745
+34746
+34747
+34748
+34749
+34750
+34751
+34752
+34753
+34754
+34755
+34756
+34757
+34758
+34759
+34760
+34761
+34762
+34763
+34764
+34765
+34766
+34767
+34768
+34769
+34770
+34771
+34772
+34773
+34774
+34775
+34776
+34777
+34778
+34779
+34780
+34781
+34782
+34783
+34784
+34785
+34786
+34787
+34788
+34789
+34790
+34791
+34792
+34793
+34794
+34795
+34796
+34797
+34798
+34799
+34800
+34801
+34802
+34803
+34804
+34805
+34806
+34807
+34808
+34809
+34810
+34811
+34812
+34813
+34814
+34815
+34816
+34817
+34818
+34819
+34820
+34821
+34822
+34823
+34824
+34825
+34826
+34827
+34828
+34829
+34830
+34831
+34832
+34833
+34834
+34835
+34836
+34837
+34838
+34839
+34840
+34841
+34842
+34843
+34844
+34845
+34846
+34847
+34848
+34849
+34850
+34851
+34852
+34853
+34854
+34855
+34856
+34857
+34858
+34859
+34860
+34861
+34862
+34863
+34864
+34865
+34866
+34867
+34868
+34869
+34870
+34871
+34872
+34873
+34874
+34875
+34876
+34877
+34878
+34879
+34880
+34881
+34882
+34883
+34884
+34885
+34886
+34887
+34888
+34889
+34890
+34891
+34892
+34893
+34894
+34895
+34896
+34897
+34898
+34899
+34900
+34901
+34902
+34903
+34904
+34905
+34906
+34907
+34908
+34909
+34910
+34911
+34912
+34913
+34914
+34915
+34916
+34917
+34918
+34919
+34920
+34921
+34922
+34923
+34924
+34925
+34926
+34927
+34928
+34929
+34930
+34931
+34932
+34933
+34934
+34935
+34936
+34937
+34938
+34939
+34940
+34941
+34942
+34943
+34944
+34945
+34946
+34947
+34948
+34949
+34950
+34951
+34952
+34953
+34954
+34955
+34956
+34957
+34958
+34959
+34960
+34961
+34962
+34963
+34964
+34965
+34966
+34967
+34968
+34969
+34970
+34971
+34972
+34973
+34974
+34975
+34976
+34977
+34978
+34979
+34980
+34981
+34982
+34983
+34984
+34985
+34986
+34987
+34988
+34989
+34990
+34991
+34992
+34993
+34994
+34995
+34996
+34997
+34998
+34999
+35000
+35001
+35002
+35003
+35004
+35005
+35006
+35007
+35008
+35009
+35010
+35011
+35012
+35013
+35014
+35015
+35016
+35017
+35018
+35019
+35020
+35021
+35022
+35023
+35024
+35025
+35026
+35027
+35028
+35029
+35030
+35031
+35032
+35033
+35034
+35035
+35036
+35037
+35038
+35039
+35040
+35041
+35042
+35043
+35044
+35045
+35046
+35047
+35048
+35049
+35050
+35051
+35052
+35053
+35054
+35055
+35056
+35057
+35058
+35059
+35060
+35061
+35062
+35063
+35064
+35065
+35066
+35067
+35068
+35069
+35070
+35071
+35072
+35073
+35074
+35075
+35076
+35077
+35078
+35079
+35080
+35081
+35082
+35083
+35084
+35085
+35086
+35087
+35088
+35089
+35090
+35091
+35092
+35093
+35094
+35095
+35096
+35097
+35098
+35099
+35100
+35101
+35102
+35103
+35104
+35105
+35106
+35107
+35108
+35109
+35110
+35111
+35112
+35113
+35114
+35115
+35116
+35117
+35118
+35119
+35120
+35121
+35122
+35123
+35124
+35125
+35126
+35127
+35128
+35129
+35130
+35131
+35132
+35133
+35134
+35135
+35136
+35137
+35138
+35139
+35140
+35141
+35142
+35143
+35144
+35145
+35146
+35147
+35148
+35149
+35150
+35151
+35152
+35153
+35154
+35155
+35156
+35157
+35158
+35159
+35160
+35161
+35162
+35163
+35164
+35165
+35166
+35167
+35168
+35169
+35170
+35171
+35172
+35173
+35174
+35175
+35176
+35177
+35178
+35179
+35180
+35181
+35182
+35183
+35184
+35185
+35186
+35187
+35188
+35189
+35190
+35191
+35192
+35193
+35194
+35195
+35196
+35197
+35198
+35199
+35200
+35201
+35202
+35203
+35204
+35205
+35206
+35207
+35208
+35209
+35210
+35211
+35212
+35213
+35214
+35215
+35216
+35217
+35218
+35219
+35220
+35221
+35222
+35223
+35224
+35225
+35226
+35227
+35228
+35229
+35230
+35231
+35232
+35233
+35234
+35235
+35236
+35237
+35238
+35239
+35240
+35241
+35242
+35243
+35244
+35245
+35246
+35247
+35248
+35249
+35250
+35251
+35252
+35253
+35254
+35255
+35256
+35257
+35258
+35259
+35260
+35261
+35262
+35263
+35264
+35265
+35266
+35267
+35268
+35269
+35270
+35271
+35272
+35273
+35274
+35275
+35276
+35277
+35278
+35279
+35280
+35281
+35282
+35283
+35284
+35285
+35286
+35287
+35288
+35289
+35290
+35291
+35292
+35293
+35294
+35295
+35296
+35297
+35298
+35299
+35300
+35301
+35302
+35303
+35304
+35305
+35306
+35307
+35308
+35309
+35310
+35311
+35312
+35313
+35314
+35315
+35316
+35317
+35318
+35319
+35320
+35321
+35322
+35323
+35324
+35325
+35326
+35327
+35328
+35329
+35330
+35331
+35332
+35333
+35334
+35335
+35336
+35337
+35338
+35339
+35340
+35341
+35342
+35343
+35344
+35345
+35346
+35347
+35348
+35349
+35350
+35351
+35352
+35353
+35354
+35355
+35356
+35357
+35358
+35359
+35360
+35361
+35362
+35363
+35364
+35365
+35366
+35367
+35368
+35369
+35370
+35371
+35372
+35373
+35374
+35375
+35376
+35377
+35378
+35379
+35380
+35381
+35382
+35383
+35384
+35385
+35386
+35387
+35388
+35389
+35390
+35391
+35392
+35393
+35394
+35395
+35396
+35397
+35398
+35399
+35400
+35401
+35402
+35403
+35404
+35405
+35406
+35407
+35408
+35409
+35410
+35411
+35412
+35413
+35414
+35415
+35416
+35417
+35418
+35419
+35420
+35421
+35422
+35423
+35424
+35425
+35426
+35427
+35428
+35429
+35430
+35431
+35432
+35433
+35434
+35435
+35436
+35437
+35438
+35439
+35440
+35441
+35442
+35443
+35444
+35445
+35446
+35447
+35448
+35449
+35450
+35451
+35452
+35453
+35454
+35455
+35456
+35457
+35458
+35459
+35460
+35461
+35462
+35463
+35464
+35465
+35466
+35467
+35468
+35469
+35470
+35471
+35472
+35473
+35474
+35475
+35476
+35477
+35478
+35479
+35480
+35481
+35482
+35483
+35484
+35485
+35486
+35487
+35488
+35489
+35490
+35491
+35492
+35493
+35494
+35495
+35496
+35497
+35498
+35499
+35500
+35501
+35502
+35503
+35504
+35505
+35506
+35507
+35508
+35509
+35510
+35511
+35512
+35513
+35514
+35515
+35516
+35517
+35518
+35519
+35520
+35521
+35522
+35523
+35524
+35525
+35526
+35527
+35528
+35529
+35530
+35531
+35532
+35533
+35534
+35535
+35536
+35537
+35538
+35539
+35540
+35541
+35542
+35543
+35544
+35545
+35546
+35547
+35548
+35549
+35550
+35551
+35552
+35553
+35554
+35555
+35556
+35557
+35558
+35559
+35560
+35561
+35562
+35563
+35564
+35565
+35566
+35567
+35568
+35569
+35570
+35571
+35572
+35573
+35574
+35575
+35576
+35577
+35578
+35579
+35580
+35581
+35582
+35583
+35584
+35585
+35586
+35587
+35588
+35589
+35590
+35591
+35592
+35593
+35594
+35595
+35596
+35597
+35598
+35599
+35600
+35601
+35602
+35603
+35604
+35605
+35606
+35607
+35608
+35609
+35610
+35611
+35612
+35613
+35614
+35615
+35616
+35617
+35618
+35619
+35620
+35621
+35622
+35623
+35624
+35625
+35626
+35627
+35628
+35629
+35630
+35631
+35632
+35633
+35634
+35635
+35636
+35637
+35638
+35639
+35640
+35641
+35642
+35643
+35644
+35645
+35646
+35647
+35648
+35649
+35650
+35651
+35652
+35653
+35654
+35655
+35656
+35657
+35658
+35659
+35660
+35661
+35662
+35663
+35664
+35665
+35666
+35667
+35668
+35669
+35670
+35671
+35672
+35673
+35674
+35675
+35676
+35677
+35678
+35679
+35680
+35681
+35682
+35683
+35684
+35685
+35686
+35687
+35688
+35689
+35690
+35691
+35692
+35693
+35694
+35695
+35696
+35697
+35698
+35699
+35700
+35701
+35702
+35703
+35704
+35705
+35706
+35707
+35708
+35709
+35710
+35711
+35712
+35713
+35714
+35715
+35716
+35717
+35718
+35719
+35720
+35721
+35722
+35723
+35724
+35725
+35726
+35727
+35728
+35729
+35730
+35731
+35732
+35733
+35734
+35735
+35736
+35737
+35738
+35739
+35740
+35741
+35742
+35743
+35744
+35745
+35746
+35747
+35748
+35749
+35750
+35751
+35752
+35753
+35754
+35755
+35756
+35757
+35758
+35759
+35760
+35761
+35762
+35763
+35764
+35765
+35766
+35767
+35768
+35769
+35770
+35771
+35772
+35773
+35774
+35775
+35776
+35777
+35778
+35779
+35780
+35781
+35782
+35783
+35784
+35785
+35786
+35787
+35788
+35789
+35790
+35791
+35792
+35793
+35794
+35795
+35796
+35797
+35798
+35799
+35800
+35801
+35802
+35803
+35804
+35805
+35806
+35807
+35808
+35809
+35810
+35811
+35812
+35813
+35814
+35815
+35816
+35817
+35818
+35819
+35820
+35821
+35822
+35823
+35824
+35825
+35826
+35827
+35828
+35829
+35830
+35831
+35832
+35833
+35834
+35835
+35836
+35837
+35838
+35839
+35840
+35841
+35842
+35843
+35844
+35845
+35846
+35847
+35848
+35849
+35850
+35851
+35852
+35853
+35854
+35855
+35856
+35857
+35858
+35859
+35860
+35861
+35862
+35863
+35864
+35865
+35866
+35867
+35868
+35869
+35870
+35871
+35872
+35873
+35874
+35875
+35876
+35877
+35878
+35879
+35880
+35881
+35882
+35883
+35884
+35885
+35886
+35887
+35888
+35889
+35890
+35891
+35892
+35893
+35894
+35895
+35896
+35897
+35898
+35899
+35900
+35901
+35902
+35903
+35904
+35905
+35906
+35907
+35908
+35909
+35910
+35911
+35912
+35913
+35914
+35915
+35916
+35917
+35918
+35919
+35920
+35921
+35922
+35923
+35924
+35925
+35926
+35927
+35928
+35929
+35930
+35931
+35932
+35933
+35934
+35935
+35936
+35937
+35938
+35939
+35940
+35941
+35942
+35943
+35944
+35945
+35946
+35947
+35948
+35949
+35950
+35951
+35952
+35953
+35954
+35955
+35956
+35957
+35958
+35959
+35960
+35961
+35962
+35963
+35964
+35965
+35966
+35967
+35968
+35969
+35970
+35971
+35972
+35973
+35974
+35975
+35976
+35977
+35978
+35979
+35980
+35981
+35982
+35983
+35984
+35985
+35986
+35987
+35988
+35989
+35990
+35991
+35992
+35993
+35994
+35995
+35996
+35997
+35998
+35999
+36000
+36001
+36002
+36003
+36004
+36005
+36006
+36007
+36008
+36009
+36010
+36011
+36012
+36013
+36014
+36015
+36016
+36017
+36018
+36019
+36020
+36021
+36022
+36023
+36024
+36025
+36026
+36027
+36028
+36029
+36030
+36031
+36032
+36033
+36034
+36035
+36036
+36037
+36038
+36039
+36040
+36041
+36042
+36043
+36044
+36045
+36046
+36047
+36048
+36049
+36050
+36051
+36052
+36053
+36054
+36055
+36056
+36057
+36058
+36059
+36060
+36061
+36062
+36063
+36064
+36065
+36066
+36067
+36068
+36069
+36070
+36071
+36072
+36073
+36074
+36075
+36076
+36077
+36078
+36079
+36080
+36081
+36082
+36083
+36084
+36085
+36086
+36087
+36088
+36089
+36090
+36091
+36092
+36093
+36094
+36095
+36096
+36097
+36098
+36099
+36100
+36101
+36102
+36103
+36104
+36105
+36106
+36107
+36108
+36109
+36110
+36111
+36112
+36113
+36114
+36115
+36116
+36117
+36118
+36119
+36120
+36121
+36122
+36123
+36124
+36125
+36126
+36127
+36128
+36129
+36130
+36131
+36132
+36133
+36134
+36135
+36136
+36137
+36138
+36139
+36140
+36141
+36142
+36143
+36144
+36145
+36146
+36147
+36148
+36149
+36150
+36151
+36152
+36153
+36154
+36155
+36156
+36157
+36158
+36159
+36160
+36161
+36162
+36163
+36164
+36165
+36166
+36167
+36168
+36169
+36170
+36171
+36172
+36173
+36174
+36175
+36176
+36177
+36178
+36179
+36180
+36181
+36182
+36183
+36184
+36185
+36186
+36187
+36188
+36189
+36190
+36191
+36192
+36193
+36194
+36195
+36196
+36197
+36198
+36199
+36200
+36201
+36202
+36203
+36204
+36205
+36206
+36207
+36208
+36209
+36210
+36211
+36212
+36213
+36214
+36215
+36216
+36217
+36218
+36219
+36220
+36221
+36222
+36223
+36224
+36225
+36226
+36227
+36228
+36229
+36230
+36231
+36232
+36233
+36234
+36235
+36236
+36237
+36238
+36239
+36240
+36241
+36242
+36243
+36244
+36245
+36246
+36247
+36248
+36249
+36250
+36251
+36252
+36253
+36254
+36255
+36256
+36257
+36258
+36259
+36260
+36261
+36262
+36263
+36264
+36265
+36266
+36267
+36268
+36269
+36270
+36271
+36272
+36273
+36274
+36275
+36276
+36277
+36278
+36279
+36280
+36281
+36282
+36283
+36284
+36285
+36286
+36287
+36288
+36289
+36290
+36291
+36292
+36293
+36294
+36295
+36296
+36297
+36298
+36299
+36300
+36301
+36302
+36303
+36304
+36305
+36306
+36307
+36308
+36309
+36310
+36311
+36312
+36313
+36314
+36315
+36316
+36317
+36318
+36319
+36320
+36321
+36322
+36323
+36324
+36325
+36326
+36327
+36328
+36329
+36330
+36331
+36332
+36333
+36334
+36335
+36336
+36337
+36338
+36339
+36340
+36341
+36342
+36343
+36344
+36345
+36346
+36347
+36348
+36349
+36350
+36351
+36352
+36353
+36354
+36355
+36356
+36357
+36358
+36359
+36360
+36361
+36362
+36363
+36364
+36365
+36366
+36367
+36368
+36369
+36370
+36371
+36372
+36373
+36374
+36375
+36376
+36377
+36378
+36379
+36380
+36381
+36382
+36383
+36384
+36385
+36386
+36387
+36388
+36389
+36390
+36391
+36392
+36393
+36394
+36395
+36396
+36397
+36398
+36399
+36400
+36401
+36402
+36403
+36404
+36405
+36406
+36407
+36408
+36409
+36410
+36411
+36412
+36413
+36414
+36415
+36416
+36417
+36418
+36419
+36420
+36421
+36422
+36423
+36424
+36425
+36426
+36427
+36428
+36429
+36430
+36431
+36432
+36433
+36434
+36435
+36436
+36437
+36438
+36439
+36440
+36441
+36442
+36443
+36444
+36445
+36446
+36447
+36448
+36449
+36450
+36451
+36452
+36453
+36454
+36455
+36456
+36457
+36458
+36459
+36460
+36461
+36462
+36463
+36464
+36465
+36466
+36467
+36468
+36469
+36470
+36471
+36472
+36473
+36474
+36475
+36476
+36477
+36478
+36479
+36480
+36481
+36482
+36483
+36484
+36485
+36486
+36487
+36488
+36489
+36490
+36491
+36492
+36493
+36494
+36495
+36496
+36497
+36498
+36499
+36500
+36501
+36502
+36503
+36504
+36505
+36506
+36507
+36508
+36509
+36510
+36511
+36512
+36513
+36514
+36515
+36516
+36517
+36518
+36519
+36520
+36521
+36522
+36523
+36524
+36525
+36526
+36527
+36528
+36529
+36530
+36531
+36532
+36533
+36534
+36535
+36536
+36537
+36538
+36539
+36540
+36541
+36542
+36543
+36544
+36545
+36546
+36547
+36548
+36549
+36550
+36551
+36552
+36553
+36554
+36555
+36556
+36557
+36558
+36559
+36560
+36561
+36562
+36563
+36564
+36565
+36566
+36567
+36568
+36569
+36570
+36571
+36572
+36573
+36574
+36575
+36576
+36577
+36578
+36579
+36580
+36581
+36582
+36583
+36584
+36585
+36586
+36587
+36588
+36589
+36590
+36591
+36592
+36593
+36594
+36595
+36596
+36597
+36598
+36599
+36600
+36601
+36602
+36603
+36604
+36605
+36606
+36607
+36608
+36609
+36610
+36611
+36612
+36613
+36614
+36615
+36616
+36617
+36618
+36619
+36620
+36621
+36622
+36623
+36624
+36625
+36626
+36627
+36628
+36629
+36630
+36631
+36632
+36633
+36634
+36635
+36636
+36637
+36638
+36639
+36640
+36641
+36642
+36643
+36644
+36645
+36646
+36647
+36648
+36649
+36650
+36651
+36652
+36653
+36654
+36655
+36656
+36657
+36658
+36659
+36660
+36661
+36662
+36663
+36664
+36665
+36666
+36667
+36668
+36669
+36670
+36671
+36672
+36673
+36674
+36675
+36676
+36677
+36678
+36679
+36680
+36681
+36682
+36683
+36684
+36685
+36686
+36687
+36688
+36689
+36690
+36691
+36692
+36693
+36694
+36695
+36696
+36697
+36698
+36699
+36700
+36701
+36702
+36703
+36704
+36705
+36706
+36707
+36708
+36709
+36710
+36711
+36712
+36713
+36714
+36715
+36716
+36717
+36718
+36719
+36720
+36721
+36722
+36723
+36724
+36725
+36726
+36727
+36728
+36729
+36730
+36731
+36732
+36733
+36734
+36735
+36736
+36737
+36738
+36739
+36740
+36741
+36742
+36743
+36744
+36745
+36746
+36747
+36748
+36749
+36750
+36751
+36752
+36753
+36754
+36755
+36756
+36757
+36758
+36759
+36760
+36761
+36762
+36763
+36764
+36765
+36766
+36767
+36768
+36769
+36770
+36771
+36772
+36773
+36774
+36775
+36776
+36777
+36778
+36779
+36780
+36781
+36782
+36783
+36784
+36785
+36786
+36787
+36788
+36789
+36790
+36791
+36792
+36793
+36794
+36795
+36796
+36797
+36798
+36799
+36800
+36801
+36802
+36803
+36804
+36805
+36806
+36807
+36808
+36809
+36810
+36811
+36812
+36813
+36814
+36815
+36816
+36817
+36818
+36819
+36820
+36821
+36822
+36823
+36824
+36825
+36826
+36827
+36828
+36829
+36830
+36831
+36832
+36833
+36834
+36835
+36836
+36837
+36838
+36839
+36840
+36841
+36842
+36843
+36844
+36845
+36846
+36847
+36848
+36849
+36850
+36851
+36852
+36853
+36854
+36855
+36856
+36857
+36858
+36859
+36860
+36861
+36862
+36863
+36864
+36865
+36866
+36867
+36868
+36869
+36870
+36871
+36872
+36873
+36874
+36875
+36876
+36877
+36878
+36879
+36880
+36881
+36882
+36883
+36884
+36885
+36886
+36887
+36888
+36889
+36890
+36891
+36892
+36893
+36894
+36895
+36896
+36897
+36898
+36899
+36900
+36901
+36902
+36903
+36904
+36905
+36906
+36907
+36908
+36909
+36910
+36911
+36912
+36913
+36914
+36915
+36916
+36917
+36918
+36919
+36920
+36921
+36922
+36923
+36924
+36925
+36926
+36927
+36928
+36929
+36930
+36931
+36932
+36933
+36934
+36935
+36936
+36937
+36938
+36939
+36940
+36941
+36942
+36943
+36944
+36945
+36946
+36947
+36948
+36949
+36950
+36951
+36952
+36953
+36954
+36955
+36956
+36957
+36958
+36959
+36960
+36961
+36962
+36963
+36964
+36965
+36966
+36967
+36968
+36969
+36970
+36971
+36972
+36973
+36974
+36975
+36976
+36977
+36978
+36979
+36980
+36981
+36982
+36983
+36984
+36985
+36986
+36987
+36988
+36989
+36990
+36991
+36992
+36993
+36994
+36995
+36996
+36997
+36998
+36999
+37000
+37001
+37002
+37003
+37004
+37005
+37006
+37007
+37008
+37009
+37010
+37011
+37012
+37013
+37014
+37015
+37016
+37017
+37018
+37019
+37020
+37021
+37022
+37023
+37024
+37025
+37026
+37027
+37028
+37029
+37030
+37031
+37032
+37033
+37034
+37035
+37036
+37037
+37038
+37039
+37040
+37041
+37042
+37043
+37044
+37045
+37046
+37047
+37048
+37049
+37050
+37051
+37052
+37053
+37054
+37055
+37056
+37057
+37058
+37059
+37060
+37061
+37062
+37063
+37064
+37065
+37066
+37067
+37068
+37069
+37070
+37071
+37072
+37073
+37074
+37075
+37076
+37077
+37078
+37079
+37080
+37081
+37082
+37083
+37084
+37085
+37086
+37087
+37088
+37089
+37090
+37091
+37092
+37093
+37094
+37095
+37096
+37097
+37098
+37099
+37100
+37101
+37102
+37103
+37104
+37105
+37106
+37107
+37108
+37109
+37110
+37111
+37112
+37113
+37114
+37115
+37116
+37117
+37118
+37119
+37120
+37121
+37122
+37123
+37124
+37125
+37126
+37127
+37128
+37129
+37130
+37131
+37132
+37133
+37134
+37135
+37136
+37137
+37138
+37139
+37140
+37141
+37142
+37143
+37144
+37145
+37146
+37147
+37148
+37149
+37150
+37151
+37152
+37153
+37154
+37155
+37156
+37157
+37158
+37159
+37160
+37161
+37162
+37163
+37164
+37165
+37166
+37167
+37168
+37169
+37170
+37171
+37172
+37173
+37174
+37175
+37176
+37177
+37178
+37179
+37180
+37181
+37182
+37183
+37184
+37185
+37186
+37187
+37188
+37189
+37190
+37191
+37192
+37193
+37194
+37195
+37196
+37197
+37198
+37199
+37200
+37201
+37202
+37203
+37204
+37205
+37206
+37207
+37208
+37209
+37210
+37211
+37212
+37213
+37214
+37215
+37216
+37217
+37218
+37219
+37220
+37221
+37222
+37223
+37224
+37225
+37226
+37227
+37228
+37229
+37230
+37231
+37232
+37233
+37234
+37235
+37236
+37237
+37238
+37239
+37240
+37241
+37242
+37243
+37244
+37245
+37246
+37247
+37248
+37249
+37250
+37251
+37252
+37253
+37254
+37255
+37256
+37257
+37258
+37259
+37260
+37261
+37262
+37263
+37264
+37265
+37266
+37267
+37268
+37269
+37270
+37271
+37272
+37273
+37274
+37275
+37276
+37277
+37278
+37279
+37280
+37281
+37282
+37283
+37284
+37285
+37286
+37287
+37288
+37289
+37290
+37291
+37292
+37293
+37294
+37295
+37296
+37297
+37298
+37299
+37300
+37301
+37302
+37303
+37304
+37305
+37306
+37307
+37308
+37309
+37310
+37311
+37312
+37313
+37314
+37315
+37316
+37317
+37318
+37319
+37320
+37321
+37322
+37323
+37324
+37325
+37326
+37327
+37328
+37329
+37330
+37331
+37332
+37333
+37334
+37335
+37336
+37337
+37338
+37339
+37340
+37341
+37342
+37343
+37344
+37345
+37346
+37347
+37348
+37349
+37350
+37351
+37352
+37353
+37354
+37355
+37356
+37357
+37358
+37359
+37360
+37361
+37362
+37363
+37364
+37365
+37366
+37367
+37368
+37369
+37370
+37371
+37372
+37373
+37374
+37375
+37376
+37377
+37378
+37379
+37380
+37381
+37382
+37383
+37384
+37385
+37386
+37387
+37388
+37389
+37390
+37391
+37392
+37393
+37394
+37395
+37396
+37397
+37398
+37399
+37400
+37401
+37402
+37403
+37404
+37405
+37406
+37407
+37408
+37409
+37410
+37411
+37412
+37413
+37414
+37415
+37416
+37417
+37418
+37419
+37420
+37421
+37422
+37423
+37424
+37425
+37426
+37427
+37428
+37429
+37430
+37431
+37432
+37433
+37434
+37435
+37436
+37437
+37438
+37439
+37440
+37441
+37442
+37443
+37444
+37445
+37446
+37447
+37448
+37449
+37450
+37451
+37452
+37453
+37454
+37455
+37456
+37457
+37458
+37459
+37460
+37461
+37462
+37463
+37464
+37465
+37466
+37467
+37468
+37469
+37470
+37471
+37472
+37473
+37474
+37475
+37476
+37477
+37478
+37479
+37480
+37481
+37482
+37483
+37484
+37485
+37486
+37487
+37488
+37489
+37490
+37491
+37492
+37493
+37494
+37495
+37496
+37497
+37498
+37499
+37500
+37501
+37502
+37503
+37504
+37505
+37506
+37507
+37508
+37509
+37510
+37511
+37512
+37513
+37514
+37515
+37516
+37517
+37518
+37519
+37520
+37521
+37522
+37523
+37524
+37525
+37526
+37527
+37528
+37529
+37530
+37531
+37532
+37533
+37534
+37535
+37536
+37537
+37538
+37539
+37540
+37541
+37542
+37543
+37544
+37545
+37546
+37547
+37548
+37549
+37550
+37551
+37552
+37553
+37554
+37555
+37556
+37557
+37558
+37559
+37560
+37561
+37562
+37563
+37564
+37565
+37566
+37567
+37568
+37569
+37570
+37571
+37572
+37573
+37574
+37575
+37576
+37577
+37578
+37579
+37580
+37581
+37582
+37583
+37584
+37585
+37586
+37587
+37588
+37589
+37590
+37591
+37592
+37593
+37594
+37595
+37596
+37597
+37598
+37599
+37600
+37601
+37602
+37603
+37604
+37605
+37606
+37607
+37608
+37609
+37610
+37611
+37612
+37613
+37614
+37615
+37616
+37617
+37618
+37619
+37620
+37621
+37622
+37623
+37624
+37625
+37626
+37627
+37628
+37629
+37630
+37631
+37632
+37633
+37634
+37635
+37636
+37637
+37638
+37639
+37640
+37641
+37642
+37643
+37644
+37645
+37646
+37647
+37648
+37649
+37650
+37651
+37652
+37653
+37654
+37655
+37656
+37657
+37658
+37659
+37660
+37661
+37662
+37663
+37664
+37665
+37666
+37667
+37668
+37669
+37670
+37671
+37672
+37673
+37674
+37675
+37676
+37677
+37678
+37679
+37680
+37681
+37682
+37683
+37684
+37685
+37686
+37687
+37688
+37689
+37690
+37691
+37692
+37693
+37694
+37695
+37696
+37697
+37698
+37699
+37700
+37701
+37702
+37703
+37704
+37705
+37706
+37707
+37708
+37709
+37710
+37711
+37712
+37713
+37714
+37715
+37716
+37717
+37718
+37719
+37720
+37721
+37722
+37723
+37724
+37725
+37726
+37727
+37728
+37729
+37730
+37731
+37732
+37733
+37734
+37735
+37736
+37737
+37738
+37739
+37740
+37741
+37742
+37743
+37744
+37745
+37746
+37747
+37748
+37749
+37750
+37751
+37752
+37753
+37754
+37755
+37756
+37757
+37758
+37759
+37760
+37761
+37762
+37763
+37764
+37765
+37766
+37767
+37768
+37769
+37770
+37771
+37772
+37773
+37774
+37775
+37776
+37777
+37778
+37779
+37780
+37781
+37782
+37783
+37784
+37785
+37786
+37787
+37788
+37789
+37790
+37791
+37792
+37793
+37794
+37795
+37796
+37797
+37798
+37799
+37800
+37801
+37802
+37803
+37804
+37805
+37806
+37807
+37808
+37809
+37810
+37811
+37812
+37813
+37814
+37815
+37816
+37817
+37818
+37819
+37820
+37821
+37822
+37823
+37824
+37825
+37826
+37827
+37828
+37829
+37830
+37831
+37832
+37833
+37834
+37835
+37836
+37837
+37838
+37839
+37840
+37841
+37842
+37843
+37844
+37845
+37846
+37847
+37848
+37849
+37850
+37851
+37852
+37853
+37854
+37855
+37856
+37857
+37858
+37859
+37860
+37861
+37862
+37863
+37864
+37865
+37866
+37867
+37868
+37869
+37870
+37871
+37872
+37873
+37874
+37875
+37876
+37877
+37878
+37879
+37880
+37881
+37882
+37883
+37884
+37885
+37886
+37887
+37888
+37889
+37890
+37891
+37892
+37893
+37894
+37895
+37896
+37897
+37898
+37899
+37900
+37901
+37902
+37903
+37904
+37905
+37906
+37907
+37908
+37909
+37910
+37911
+37912
+37913
+37914
+37915
+37916
+37917
+37918
+37919
+37920
+37921
+37922
+37923
+37924
+37925
+37926
+37927
+37928
+37929
+37930
+37931
+37932
+37933
+37934
+37935
+37936
+37937
+37938
+37939
+37940
+37941
+37942
+37943
+37944
+37945
+37946
+37947
+37948
+37949
+37950
+37951
+37952
+37953
+37954
+37955
+37956
+37957
+37958
+37959
+37960
+37961
+37962
+37963
+37964
+37965
+37966
+37967
+37968
+37969
+37970
+37971
+37972
+37973
+37974
+37975
+37976
+37977
+37978
+37979
+37980
+37981
+37982
+37983
+37984
+37985
+37986
+37987
+37988
+37989
+37990
+37991
+37992
+37993
+37994
+37995
+37996
+37997
+37998
+37999
+38000
+38001
+38002
+38003
+38004
+38005
+38006
+38007
+38008
+38009
+38010
+38011
+38012
+38013
+38014
+38015
+38016
+38017
+38018
+38019
+38020
+38021
+38022
+38023
+38024
+38025
+38026
+38027
+38028
+38029
+38030
+38031
+38032
+38033
+38034
+38035
+38036
+38037
+38038
+38039
+38040
+38041
+38042
+38043
+38044
+38045
+38046
+38047
+38048
+38049
+38050
+38051
+38052
+38053
+38054
+38055
+38056
+38057
+38058
+38059
+38060
+38061
+38062
+38063
+38064
+38065
+38066
+38067
+38068
+38069
+38070
+38071
+38072
+38073
+38074
+38075
+38076
+38077
+38078
+38079
+38080
+38081
+38082
+38083
+38084
+38085
+38086
+38087
+38088
+38089
+38090
+38091
+38092
+38093
+38094
+38095
+38096
+38097
+38098
+38099
+38100
+38101
+38102
+38103
+38104
+38105
+38106
+38107
+38108
+38109
+38110
+38111
+38112
+38113
+38114
+38115
+38116
+38117
+38118
+38119
+38120
+38121
+38122
+38123
+38124
+38125
+38126
+38127
+38128
+38129
+38130
+38131
+38132
+38133
+38134
+38135
+38136
+38137
+38138
+38139
+38140
+38141
+38142
+38143
+38144
+38145
+38146
+38147
+38148
+38149
+38150
+38151
+38152
+38153
+38154
+38155
+38156
+38157
+38158
+38159
+38160
+38161
+38162
+38163
+38164
+38165
+38166
+38167
+38168
+38169
+38170
+38171
+38172
+38173
+38174
+38175
+38176
+38177
+38178
+38179
+38180
+38181
+38182
+38183
+38184
+38185
+38186
+38187
+38188
+38189
+38190
+38191
+38192
+38193
+38194
+38195
+38196
+38197
+38198
+38199
+38200
+38201
+38202
+38203
+38204
+38205
+38206
+38207
+38208
+38209
+38210
+38211
+38212
+38213
+38214
+38215
+38216
+38217
+38218
+38219
+38220
+38221
+38222
+38223
+38224
+38225
+38226
+38227
+38228
+38229
+38230
+38231
+38232
+38233
+38234
+38235
+38236
+38237
+38238
+38239
+38240
+38241
+38242
+38243
+38244
+38245
+38246
+38247
+38248
+38249
+38250
+38251
+38252
+38253
+38254
+38255
+38256
+38257
+38258
+38259
+38260
+38261
+38262
+38263
+38264
+38265
+38266
+38267
+38268
+38269
+38270
+38271
+38272
+38273
+38274
+38275
+38276
+38277
+38278
+38279
+38280
+38281
+38282
+38283
+38284
+38285
+38286
+38287
+38288
+38289
+38290
+38291
+38292
+38293
+38294
+38295
+38296
+38297
+38298
+38299
+38300
+38301
+38302
+38303
+38304
+38305
+38306
+38307
+38308
+38309
+38310
+38311
+38312
+38313
+38314
+38315
+38316
+38317
+38318
+38319
+38320
+38321
+38322
+38323
+38324
+38325
+38326
+38327
+38328
+38329
+38330
+38331
+38332
+38333
+38334
+38335
+38336
+38337
+38338
+38339
+38340
+38341
+38342
+38343
+38344
+38345
+38346
+38347
+38348
+38349
+38350
+38351
+38352
+38353
+38354
+38355
+38356
+38357
+38358
+38359
+38360
+38361
+38362
+38363
+38364
+38365
+38366
+38367
+38368
+38369
+38370
+38371
+38372
+38373
+38374
+38375
+38376
+38377
+38378
+38379
+38380
+38381
+38382
+38383
+38384
+38385
+38386
+38387
+38388
+38389
+38390
+38391
+38392
+38393
+38394
+38395
+38396
+38397
+38398
+38399
+38400
+38401
+38402
+38403
+38404
+38405
+38406
+38407
+38408
+38409
+38410
+38411
+38412
+38413
+38414
+38415
+38416
+38417
+38418
+38419
+38420
+38421
+38422
+38423
+38424
+38425
+38426
+38427
+38428
+38429
+38430
+38431
+38432
+38433
+38434
+38435
+38436
+38437
+38438
+38439
+38440
+38441
+38442
+38443
+38444
+38445
+38446
+38447
+38448
+38449
+38450
+38451
+38452
+38453
+38454
+38455
+38456
+38457
+38458
+38459
+38460
+38461
+38462
+38463
+38464
+38465
+38466
+38467
+38468
+38469
+38470
+38471
+38472
+38473
+38474
+38475
+38476
+38477
+38478
+38479
+38480
+38481
+38482
+38483
+38484
+38485
+38486
+38487
+38488
+38489
+38490
+38491
+38492
+38493
+38494
+38495
+38496
+38497
+38498
+38499
+38500
+38501
+38502
+38503
+38504
+38505
+38506
+38507
+38508
+38509
+38510
+38511
+38512
+38513
+38514
+38515
+38516
+38517
+38518
+38519
+38520
+38521
+38522
+38523
+38524
+38525
+38526
+38527
+38528
+38529
+38530
+38531
+38532
+38533
+38534
+38535
+38536
+38537
+38538
+38539
+38540
+38541
+38542
+38543
+38544
+38545
+38546
+38547
+38548
+38549
+38550
+38551
+38552
+38553
+38554
+38555
+38556
+38557
+38558
+38559
+38560
+38561
+38562
+38563
+38564
+38565
+38566
+38567
+38568
+38569
+38570
+38571
+38572
+38573
+38574
+38575
+38576
+38577
+38578
+38579
+38580
+38581
+38582
+38583
+38584
+38585
+38586
+38587
+38588
+38589
+38590
+38591
+38592
+38593
+38594
+38595
+38596
+38597
+38598
+38599
+38600
+38601
+38602
+38603
+38604
+38605
+38606
+38607
+38608
+38609
+38610
+38611
+38612
+38613
+38614
+38615
+38616
+38617
+38618
+38619
+38620
+38621
+38622
+38623
+38624
+38625
+38626
+38627
+38628
+38629
+38630
+38631
+38632
+38633
+38634
+38635
+38636
+38637
+38638
+38639
+38640
+38641
+38642
+38643
+38644
+38645
+38646
+38647
+38648
+38649
+38650
+38651
+38652
+38653
+38654
+38655
+38656
+38657
+38658
+38659
+38660
+38661
+38662
+38663
+38664
+38665
+38666
+38667
+38668
+38669
+38670
+38671
+38672
+38673
+38674
+38675
+38676
+38677
+38678
+38679
+38680
+38681
+38682
+38683
+38684
+38685
+38686
+38687
+38688
+38689
+38690
+38691
+38692
+38693
+38694
+38695
+38696
+38697
+38698
+38699
+38700
+38701
+38702
+38703
+38704
+38705
+38706
+38707
+38708
+38709
+38710
+38711
+38712
+38713
+38714
+38715
+38716
+38717
+38718
+38719
+38720
+38721
+38722
+38723
+38724
+38725
+38726
+38727
+38728
+38729
+38730
+38731
+38732
+38733
+38734
+38735
+38736
+38737
+38738
+38739
+38740
+38741
+38742
+38743
+38744
+38745
+38746
+38747
+38748
+38749
+38750
+38751
+38752
+38753
+38754
+38755
+38756
+38757
+38758
+38759
+38760
+38761
+38762
+38763
+38764
+38765
+38766
+38767
+38768
+38769
+38770
+38771
+38772
+38773
+38774
+38775
+38776
+38777
+38778
+38779
+38780
+38781
+38782
+38783
+38784
+38785
+38786
+38787
+38788
+38789
+38790
+38791
+38792
+38793
+38794
+38795
+38796
+38797
+38798
+38799
+38800
+38801
+38802
+38803
+38804
+38805
+38806
+38807
+38808
+38809
+38810
+38811
+38812
+38813
+38814
+38815
+38816
+38817
+38818
+38819
+38820
+38821
+38822
+38823
+38824
+38825
+38826
+38827
+38828
+38829
+38830
+38831
+38832
+38833
+38834
+38835
+38836
+38837
+38838
+38839
+38840
+38841
+38842
+38843
+38844
+38845
+38846
+38847
+38848
+38849
+38850
+38851
+38852
+38853
+38854
+38855
+38856
+38857
+38858
+38859
+38860
+38861
+38862
+38863
+38864
+38865
+38866
+38867
+38868
+38869
+38870
+38871
+38872
+38873
+38874
+38875
+38876
+38877
+38878
+38879
+38880
+38881
+38882
+38883
+38884
+38885
+38886
+38887
+38888
+38889
+38890
+38891
+38892
+38893
+38894
+38895
+38896
+38897
+38898
+38899
+38900
+38901
+38902
+38903
+38904
+38905
+38906
+38907
+38908
+38909
+38910
+38911
+38912
+38913
+38914
+38915
+38916
+38917
+38918
+38919
+38920
+38921
+38922
+38923
+38924
+38925
+38926
+38927
+38928
+38929
+38930
+38931
+38932
+38933
+38934
+38935
+38936
+38937
+38938
+38939
+38940
+38941
+38942
+38943
+38944
+38945
+38946
+38947
+38948
+38949
+38950
+38951
+38952
+38953
+38954
+38955
+38956
+38957
+38958
+38959
+38960
+38961
+38962
+38963
+38964
+38965
+38966
+38967
+38968
+38969
+38970
+38971
+38972
+38973
+38974
+38975
+38976
+38977
+38978
+38979
+38980
+38981
+38982
+38983
+38984
+38985
+38986
+38987
+38988
+38989
+38990
+38991
+38992
+38993
+38994
+38995
+38996
+38997
+38998
+38999
+39000
+39001
+39002
+39003
+39004
+39005
+39006
+39007
+39008
+39009
+39010
+39011
+39012
+39013
+39014
+39015
+39016
+39017
+39018
+39019
+39020
+39021
+39022
+39023
+39024
+39025
+39026
+39027
+39028
+39029
+39030
+39031
+39032
+39033
+39034
+39035
+39036
+39037
+39038
+39039
+39040
+39041
+39042
+39043
+39044
+39045
+39046
+39047
+39048
+39049
+39050
+39051
+39052
+39053
+39054
+39055
+39056
+39057
+39058
+39059
+39060
+39061
+39062
+39063
+39064
+39065
+39066
+39067
+39068
+39069
+39070
+39071
+39072
+39073
+39074
+39075
+39076
+39077
+39078
+39079
+39080
+39081
+39082
+39083
+39084
+39085
+39086
+39087
+39088
+39089
+39090
+39091
+39092
+39093
+39094
+39095
+39096
+39097
+39098
+39099
+39100
+39101
+39102
+39103
+39104
+39105
+39106
+39107
+39108
+39109
+39110
+39111
+39112
+39113
+39114
+39115
+39116
+39117
+39118
+39119
+39120
+39121
+39122
+39123
+39124
+39125
+39126
+39127
+39128
+39129
+39130
+39131
+39132
+39133
+39134
+39135
+39136
+39137
+39138
+39139
+39140
+39141
+39142
+39143
+39144
+39145
+39146
+39147
+39148
+39149
+39150
+39151
+39152
+39153
+39154
+39155
+39156
+39157
+39158
+39159
+39160
+39161
+39162
+39163
+39164
+39165
+39166
+39167
+39168
+39169
+39170
+39171
+39172
+39173
+39174
+39175
+39176
+39177
+39178
+39179
+39180
+39181
+39182
+39183
+39184
+39185
+39186
+39187
+39188
+39189
+39190
+39191
+39192
+39193
+39194
+39195
+39196
+39197
+39198
+39199
+39200
+39201
+39202
+39203
+39204
+39205
+39206
+39207
+39208
+39209
+39210
+39211
+39212
+39213
+39214
+39215
+39216
+39217
+39218
+39219
+39220
+39221
+39222
+39223
+39224
+39225
+39226
+39227
+39228
+39229
+39230
+39231
+39232
+39233
+39234
+39235
+39236
+39237
+39238
+39239
+39240
+39241
+39242
+39243
+39244
+39245
+39246
+39247
+39248
+39249
+39250
+39251
+39252
+39253
+39254
+39255
+39256
+39257
+39258
+39259
+39260
+39261
+39262
+39263
+39264
+39265
+39266
+39267
+39268
+39269
+39270
+39271
+39272
+39273
+39274
+39275
+39276
+39277
+39278
+39279
+39280
+39281
+39282
+39283
+39284
+39285
+39286
+39287
+39288
+39289
+39290
+39291
+39292
+39293
+39294
+39295
+39296
+39297
+39298
+39299
+39300
+39301
+39302
+39303
+39304
+39305
+39306
+39307
+39308
+39309
+39310
+39311
+39312
+39313
+39314
+39315
+39316
+39317
+39318
+39319
+39320
+39321
+39322
+39323
+39324
+39325
+39326
+39327
+39328
+39329
+39330
+39331
+39332
+39333
+39334
+39335
+39336
+39337
+39338
+39339
+39340
+39341
+39342
+39343
+39344
+39345
+39346
+39347
+39348
+39349
+39350
+39351
+39352
+39353
+39354
+39355
+39356
+39357
+39358
+39359
+39360
+39361
+39362
+39363
+39364
+39365
+39366
+39367
+39368
+39369
+39370
+39371
+39372
+39373
+39374
+39375
+39376
+39377
+39378
+39379
+39380
+39381
+39382
+39383
+39384
+39385
+39386
+39387
+39388
+39389
+39390
+39391
+39392
+39393
+39394
+39395
+39396
+39397
+39398
+39399
+39400
+39401
+39402
+39403
+39404
+39405
+39406
+39407
+39408
+39409
+39410
+39411
+39412
+39413
+39414
+39415
+39416
+39417
+39418
+39419
+39420
+39421
+39422
+39423
+39424
+39425
+39426
+39427
+39428
+39429
+39430
+39431
+39432
+39433
+39434
+39435
+39436
+39437
+39438
+39439
+39440
+39441
+39442
+39443
+39444
+39445
+39446
+39447
+39448
+39449
+39450
+39451
+39452
+39453
+39454
+39455
+39456
+39457
+39458
+39459
+39460
+39461
+39462
+39463
+39464
+39465
+39466
+39467
+39468
+39469
+39470
+39471
+39472
+39473
+39474
+39475
+39476
+39477
+39478
+39479
+39480
+39481
+39482
+39483
+39484
+39485
+39486
+39487
+39488
+39489
+39490
+39491
+39492
+39493
+39494
+39495
+39496
+39497
+39498
+39499
+39500
+39501
+39502
+39503
+39504
+39505
+39506
+39507
+39508
+39509
+39510
+39511
+39512
+39513
+39514
+39515
+39516
+39517
+39518
+39519
+39520
+39521
+39522
+39523
+39524
+39525
+39526
+39527
+39528
+39529
+39530
+39531
+39532
+39533
+39534
+39535
+39536
+39537
+39538
+39539
+39540
+39541
+39542
+39543
+39544
+39545
+39546
+39547
+39548
+39549
+39550
+39551
+39552
+39553
+39554
+39555
+39556
+39557
+39558
+39559
+39560
+39561
+39562
+39563
+39564
+39565
+39566
+39567
+39568
+39569
+39570
+39571
+39572
+39573
+39574
+39575
+39576
+39577
+39578
+39579
+39580
+39581
+39582
+39583
+39584
+39585
+39586
+39587
+39588
+39589
+39590
+39591
+39592
+39593
+39594
+39595
+39596
+39597
+39598
+39599
+39600
+39601
+39602
+39603
+39604
+39605
+39606
+39607
+39608
+39609
+39610
+39611
+39612
+39613
+39614
+39615
+39616
+39617
+39618
+39619
+39620
+39621
+39622
+39623
+39624
+39625
+39626
+39627
+39628
+39629
+39630
+39631
+39632
+39633
+39634
+39635
+39636
+39637
+39638
+39639
+39640
+39641
+39642
+39643
+39644
+39645
+39646
+39647
+39648
+39649
+39650
+39651
+39652
+39653
+39654
+39655
+39656
+39657
+39658
+39659
+39660
+39661
+39662
+39663
+39664
+39665
+39666
+39667
+39668
+39669
+39670
+39671
+39672
+39673
+39674
+39675
+39676
+39677
+39678
+39679
+39680
+39681
+39682
+39683
+39684
+39685
+39686
+39687
+39688
+39689
+39690
+39691
+39692
+39693
+39694
+39695
+39696
+39697
+39698
+39699
+39700
+39701
+39702
+39703
+39704
+39705
+39706
+39707
+39708
+39709
+39710
+39711
+39712
+39713
+39714
+39715
+39716
+39717
+39718
+39719
+39720
+39721
+39722
+39723
+39724
+39725
+39726
+39727
+39728
+39729
+39730
+39731
+39732
+39733
+39734
+39735
+39736
+39737
+39738
+39739
+39740
+39741
+39742
+39743
+39744
+39745
+39746
+39747
+39748
+39749
+39750
+39751
+39752
+39753
+39754
+39755
+39756
+39757
+39758
+39759
+39760
+39761
+39762
+39763
+39764
+39765
+39766
+39767
+39768
+39769
+39770
+39771
+39772
+39773
+39774
+39775
+39776
+39777
+39778
+39779
+39780
+39781
+39782
+39783
+39784
+39785
+39786
+39787
+39788
+39789
+39790
+39791
+39792
+39793
+39794
+39795
+39796
+39797
+39798
+39799
+39800
+39801
+39802
+39803
+39804
+39805
+39806
+39807
+39808
+39809
+39810
+39811
+39812
+39813
+39814
+39815
+39816
+39817
+39818
+39819
+39820
+39821
+39822
+39823
+39824
+39825
+39826
+39827
+39828
+39829
+39830
+39831
+39832
+39833
+39834
+39835
+39836
+39837
+39838
+39839
+39840
+39841
+39842
+39843
+39844
+39845
+39846
+39847
+39848
+39849
+39850
+39851
+39852
+39853
+39854
+39855
+39856
+39857
+39858
+39859
+39860
+39861
+39862
+39863
+39864
+39865
+39866
+39867
+39868
+39869
+39870
+39871
+39872
+39873
+39874
+39875
+39876
+39877
+39878
+39879
+39880
+39881
+39882
+39883
+39884
+39885
+39886
+39887
+39888
+39889
+39890
+39891
+39892
+39893
+39894
+39895
+39896
+39897
+39898
+39899
+39900
+39901
+39902
+39903
+39904
+39905
+39906
+39907
+39908
+39909
+39910
+39911
+39912
+39913
+39914
+39915
+39916
+39917
+39918
+39919
+39920
+39921
+39922
+39923
+39924
+39925
+39926
+39927
+39928
+39929
+39930
+39931
+39932
+39933
+39934
+39935
+39936
+39937
+39938
+39939
+39940
+39941
+39942
+39943
+39944
+39945
+39946
+39947
+39948
+39949
+39950
+39951
+39952
+39953
+39954
+39955
+39956
+39957
+39958
+39959
+39960
+39961
+39962
+39963
+39964
+39965
+39966
+39967
+39968
+39969
+39970
+39971
+39972
+39973
+39974
+39975
+39976
+39977
+39978
+39979
+39980
+39981
+39982
+39983
+39984
+39985
+39986
+39987
+39988
+39989
+39990
+39991
+39992
+39993
+39994
+39995
+39996
+39997
+39998
+39999
+40000
+40001
+40002
+40003
+40004
+40005
+40006
+40007
+40008
+40009
+40010
+40011
+40012
+40013
+40014
+40015
+40016
+40017
+40018
+40019
+40020
+40021
+40022
+40023
+40024
+40025
+40026
+40027
+40028
+40029
+40030
+40031
+40032
+40033
+40034
+40035
+40036
+40037
+40038
+40039
+40040
+40041
+40042
+40043
+40044
+40045
+40046
+40047
+40048
+40049
+40050
+40051
+40052
+40053
+40054
+40055
+40056
+40057
+40058
+40059
+40060
+40061
+40062
+40063
+40064
+40065
+40066
+40067
+40068
+40069
+40070
+40071
+40072
+40073
+40074
+40075
+40076
+40077
+40078
+40079
+40080
+40081
+40082
+40083
+40084
+40085
+40086
+40087
+40088
+40089
+40090
+40091
+40092
+40093
+40094
+40095
+40096
+40097
+40098
+40099
+40100
+40101
+40102
+40103
+40104
+40105
+40106
+40107
+40108
+40109
+40110
+40111
+40112
+40113
+40114
+40115
+40116
+40117
+40118
+40119
+40120
+40121
+40122
+40123
+40124
+40125
+40126
+40127
+40128
+40129
+40130
+40131
+40132
+40133
+40134
+40135
+40136
+40137
+40138
+40139
+40140
+40141
+40142
+40143
+40144
+40145
+40146
+40147
+40148
+40149
+40150
+40151
+40152
+40153
+40154
+40155
+40156
+40157
+40158
+40159
+40160
+40161
+40162
+40163
+40164
+40165
+40166
+40167
+40168
+40169
+40170
+40171
+40172
+40173
+40174
+40175
+40176
+40177
+40178
+40179
+40180
+40181
+40182
+40183
+40184
+40185
+40186
+40187
+40188
+40189
+40190
+40191
+40192
+40193
+40194
+40195
+40196
+40197
+40198
+40199
+40200
+40201
+40202
+40203
+40204
+40205
+40206
+40207
+40208
+40209
+40210
+40211
+40212
+40213
+40214
+40215
+40216
+40217
+40218
+40219
+40220
+40221
+40222
+40223
+40224
+40225
+40226
+40227
+40228
+40229
+40230
+40231
+40232
+40233
+40234
+40235
+40236
+40237
+40238
+40239
+40240
+40241
+40242
+40243
+40244
+40245
+40246
+40247
+40248
+40249
+40250
+40251
+40252
+40253
+40254
+40255
+40256
+40257
+40258
+40259
+40260
+40261
+40262
+40263
+40264
+40265
+40266
+40267
+40268
+40269
+40270
+40271
+40272
+40273
+40274
+40275
+40276
+40277
+40278
+40279
+40280
+40281
+40282
+40283
+40284
+40285
+40286
+40287
+40288
+40289
+40290
+40291
+40292
+40293
+40294
+40295
+40296
+40297
+40298
+40299
+40300
+40301
+40302
+40303
+40304
+40305
+40306
+40307
+40308
+40309
+40310
+40311
+40312
+40313
+40314
+40315
+40316
+40317
+40318
+40319
+40320
+40321
+40322
+40323
+40324
+40325
+40326
+40327
+40328
+40329
+40330
+40331
+40332
+40333
+40334
+40335
+40336
+40337
+40338
+40339
+40340
+40341
+40342
+40343
+40344
+40345
+40346
+40347
+40348
+40349
+40350
+40351
+40352
+40353
+40354
+40355
+40356
+40357
+40358
+40359
+40360
+40361
+40362
+40363
+40364
+40365
+40366
+40367
+40368
+40369
+40370
+40371
+40372
+40373
+40374
+40375
+40376
+40377
+40378
+40379
+40380
+40381
+40382
+40383
+40384
+40385
+40386
+40387
+40388
+40389
+40390
+40391
+40392
+40393
+40394
+40395
+40396
+40397
+40398
+40399
+40400
+40401
+40402
+40403
+40404
+40405
+40406
+40407
+40408
+40409
+40410
+40411
+40412
+40413
+40414
+40415
+40416
+40417
+40418
+40419
+40420
+40421
+40422
+40423
+40424
+40425
+40426
+40427
+40428
+40429
+40430
+40431
+40432
+40433
+40434
+40435
+40436
+40437
+40438
+40439
+40440
+40441
+40442
+40443
+40444
+40445
+40446
+40447
+40448
+40449
+40450
+40451
+40452
+40453
+40454
+40455
+40456
+40457
+40458
+40459
+40460
+40461
+40462
+40463
+40464
+40465
+40466
+40467
+40468
+40469
+40470
+40471
+40472
+40473
+40474
+40475
+40476
+40477
+40478
+40479
+40480
+40481
+40482
+40483
+40484
+40485
+40486
+40487
+40488
+40489
+40490
+40491
+40492
+40493
+40494
+40495
+40496
+40497
+40498
+40499
+40500
+40501
+40502
+40503
+40504
+40505
+40506
+40507
+40508
+40509
+40510
+40511
+40512
+40513
+40514
+40515
+40516
+40517
+40518
+40519
+40520
+40521
+40522
+40523
+40524
+40525
+40526
+40527
+40528
+40529
+40530
+40531
+40532
+40533
+40534
+40535
+40536
+40537
+40538
+40539
+40540
+40541
+40542
+40543
+40544
+40545
+40546
+40547
+40548
+40549
+40550
+40551
+40552
+40553
+40554
+40555
+40556
+40557
+40558
+40559
+40560
+40561
+40562
+40563
+40564
+40565
+40566
+40567
+40568
+40569
+40570
+40571
+40572
+40573
+40574
+40575
+40576
+40577
+40578
+40579
+40580
+40581
+40582
+40583
+40584
+40585
+40586
+40587
+40588
+40589
+40590
+40591
+40592
+40593
+40594
+40595
+40596
+40597
+40598
+40599
+40600
+40601
+40602
+40603
+40604
+40605
+40606
+40607
+40608
+40609
+40610
+40611
+40612
+40613
+40614
+40615
+40616
+40617
+40618
+40619
+40620
+40621
+40622
+40623
+40624
+40625
+40626
+40627
+40628
+40629
+40630
+40631
+40632
+40633
+40634
+40635
+40636
+40637
+40638
+40639
+40640
+40641
+40642
+40643
+40644
+40645
+40646
+40647
+40648
+40649
+40650
+40651
+40652
+40653
+40654
+40655
+40656
+40657
+40658
+40659
+40660
+40661
+40662
+40663
+40664
+40665
+40666
+40667
+40668
+40669
+40670
+40671
+40672
+40673
+40674
+40675
+40676
+40677
+40678
+40679
+40680
+40681
+40682
+40683
+40684
+40685
+40686
+40687
+40688
+40689
+40690
+40691
+40692
+40693
+40694
+40695
+40696
+40697
+40698
+40699
+40700
+40701
+40702
+40703
+40704
+40705
+40706
+40707
+40708
+40709
+40710
+40711
+40712
+40713
+40714
+40715
+40716
+40717
+40718
+40719
+40720
+40721
+40722
+40723
+40724
+40725
+40726
+40727
+40728
+40729
+40730
+40731
+40732
+40733
+40734
+40735
+40736
+40737
+40738
+40739
+40740
+40741
+40742
+40743
+40744
+40745
+40746
+40747
+40748
+40749
+40750
+40751
+40752
+40753
+40754
+40755
+40756
+40757
+40758
+40759
+40760
+40761
+40762
+40763
+40764
+40765
+40766
+40767
+40768
+40769
+40770
+40771
+40772
+40773
+40774
+40775
+40776
+40777
+40778
+40779
+40780
+40781
+40782
+40783
+40784
+40785
+40786
+40787
+40788
+40789
+40790
+40791
+40792
+40793
+40794
+40795
+40796
+40797
+40798
+40799
+40800
+40801
+40802
+40803
+40804
+40805
+40806
+40807
+40808
+40809
+40810
+40811
+40812
+40813
+40814
+40815
+40816
+40817
+40818
+40819
+40820
+40821
+40822
+40823
+40824
+40825
+40826
+40827
+40828
+40829
+40830
+40831
+40832
+40833
+40834
+40835
+40836
+40837
+40838
+40839
+40840
+40841
+40842
+40843
+40844
+40845
+40846
+40847
+40848
+40849
+40850
+40851
+40852
+40853
+40854
+40855
+40856
+40857
+40858
+40859
+40860
+40861
+40862
+40863
+40864
+40865
+40866
+40867
+40868
+40869
+40870
+40871
+40872
+40873
+40874
+40875
+40876
+40877
+40878
+40879
+40880
+40881
+40882
+40883
+40884
+40885
+40886
+40887
+40888
+40889
+40890
+40891
+40892
+40893
+40894
+40895
+40896
+40897
+40898
+40899
+40900
+40901
+40902
+40903
+40904
+40905
+40906
+40907
+40908
+40909
+40910
+40911
+40912
+40913
+40914
+40915
+40916
+40917
+40918
+40919
+40920
+40921
+40922
+40923
+40924
+40925
+40926
+40927
+40928
+40929
+40930
+40931
+40932
+40933
+40934
+40935
+40936
+40937
+40938
+40939
+40940
+40941
+40942
+40943
+40944
+40945
+40946
+40947
+40948
+40949
+40950
+40951
+40952
+40953
+40954
+40955
+40956
+40957
+40958
+40959
+40960
+40961
+40962
+40963
+40964
+40965
+40966
+40967
+40968
+40969
+40970
+40971
+40972
+40973
+40974
+40975
+40976
+40977
+40978
+40979
+40980
+40981
+40982
+40983
+40984
+40985
+40986
+40987
+40988
+40989
+40990
+40991
+40992
+40993
+40994
+40995
+40996
+40997
+40998
+40999
+41000
+41001
+41002
+41003
+41004
+41005
+41006
+41007
+41008
+41009
+41010
+41011
+41012
+41013
+41014
+41015
+41016
+41017
+41018
+41019
+41020
+41021
+41022
+41023
+41024
+41025
+41026
+41027
+41028
+41029
+41030
+41031
+41032
+41033
+41034
+41035
+41036
+41037
+41038
+41039
+41040
+41041
+41042
+41043
+41044
+41045
+41046
+41047
+41048
+41049
+41050
+41051
+41052
+41053
+41054
+41055
+41056
+41057
+41058
+41059
+41060
+41061
+41062
+41063
+41064
+41065
+41066
+41067
+41068
+41069
+41070
+41071
+41072
+41073
+41074
+41075
+41076
+41077
+41078
+41079
+41080
+41081
+41082
+41083
+41084
+41085
+41086
+41087
+41088
+41089
+41090
+41091
+41092
+41093
+41094
+41095
+41096
+41097
+41098
+41099
+41100
+41101
+41102
+41103
+41104
+41105
+41106
+41107
+41108
+41109
+41110
+41111
+41112
+41113
+41114
+41115
+41116
+41117
+41118
+41119
+41120
+41121
+41122
+41123
+41124
+41125
+41126
+41127
+41128
+41129
+41130
+41131
+41132
+41133
+41134
+41135
+41136
+41137
+41138
+41139
+41140
+41141
+41142
+41143
+41144
+41145
+41146
+41147
+41148
+41149
+41150
+41151
+41152
+41153
+41154
+41155
+41156
+41157
+41158
+41159
+41160
+41161
+41162
+41163
+41164
+41165
+41166
+41167
+41168
+41169
+41170
+41171
+41172
+41173
+41174
+41175
+41176
+41177
+41178
+41179
+41180
+41181
+41182
+41183
+41184
+41185
+41186
+41187
+41188
+41189
+41190
+41191
+41192
+41193
+41194
+41195
+41196
+41197
+41198
+41199
+41200
+41201
+41202
+41203
+41204
+41205
+41206
+41207
+41208
+41209
+41210
+41211
+41212
+41213
+41214
+41215
+41216
+41217
+41218
+41219
+41220
+41221
+41222
+41223
+41224
+41225
+41226
+41227
+41228
+41229
+41230
+41231
+41232
+41233
+41234
+41235
+41236
+41237
+41238
+41239
+41240
+41241
+41242
+41243
+41244
+41245
+41246
+41247
+41248
+41249
+41250
+41251
+41252
+41253
+41254
+41255
+41256
+41257
+41258
+41259
+41260
+41261
+41262
+41263
+41264
+41265
+41266
+41267
+41268
+41269
+41270
+41271
+41272
+41273
+41274
+41275
+41276
+41277
+41278
+41279
+41280
+41281
+41282
+41283
+41284
+41285
+41286
+41287
+41288
+41289
+41290
+41291
+41292
+41293
+41294
+41295
+41296
+41297
+41298
+41299
+41300
+41301
+41302
+41303
+41304
+41305
+41306
+41307
+41308
+41309
+41310
+41311
+41312
+41313
+41314
+41315
+41316
+41317
+41318
+41319
+41320
+41321
+41322
+41323
+41324
+41325
+41326
+41327
+41328
+41329
+41330
+41331
+41332
+41333
+41334
+41335
+41336
+41337
+41338
+41339
+41340
+41341
+41342
+41343
+41344
+41345
+41346
+41347
+41348
+41349
+41350
+41351
+41352
+41353
+41354
+41355
+41356
+41357
+41358
+41359
+41360
+41361
+41362
+41363
+41364
+41365
+41366
+41367
+41368
+41369
+41370
+41371
+41372
+41373
+41374
+41375
+41376
+41377
+41378
+41379
+41380
+41381
+41382
+41383
+41384
+41385
+41386
+41387
+41388
+41389
+41390
+41391
+41392
+41393
+41394
+41395
+41396
+41397
+41398
+41399
+41400
+41401
+41402
+41403
+41404
+41405
+41406
+41407
+41408
+41409
+41410
+41411
+41412
+41413
+41414
+41415
+41416
+41417
+41418
+41419
+41420
+41421
+41422
+41423
+41424
+41425
+41426
+41427
+41428
+41429
+41430
+41431
+41432
+41433
+41434
+41435
+41436
+41437
+41438
+41439
+41440
+41441
+41442
+41443
+41444
+41445
+41446
+41447
+41448
+41449
+41450
+41451
+41452
+41453
+41454
+41455
+41456
+41457
+41458
+41459
+41460
+41461
+41462
+41463
+41464
+41465
+41466
+41467
+41468
+41469
+41470
+41471
+41472
+41473
+41474
+41475
+41476
+41477
+41478
+41479
+41480
+41481
+41482
+41483
+41484
+41485
+41486
+41487
+41488
+41489
+41490
+41491
+41492
+41493
+41494
+41495
+41496
+41497
+41498
+41499
+41500
+41501
+41502
+41503
+41504
+41505
+41506
+41507
+41508
+41509
+41510
+41511
+41512
+41513
+41514
+41515
+41516
+41517
+41518
+41519
+41520
+41521
+41522
+41523
+41524
+41525
+41526
+41527
+41528
+41529
+41530
+41531
+41532
+41533
+41534
+41535
+41536
+41537
+41538
+41539
+41540
+41541
+41542
+41543
+41544
+41545
+41546
+41547
+41548
+41549
+41550
+41551
+41552
+41553
+41554
+41555
+41556
+41557
+41558
+41559
+41560
+41561
+41562
+41563
+41564
+41565
+41566
+41567
+41568
+41569
+41570
+41571
+41572
+41573
+41574
+41575
+41576
+41577
+41578
+41579
+41580
+41581
+41582
+41583
+41584
+41585
+41586
+41587
+41588
+41589
+41590
+41591
+41592
+41593
+41594
+41595
+41596
+41597
+41598
+41599
+41600
+41601
+41602
+41603
+41604
+41605
+41606
+41607
+41608
+41609
+41610
+41611
+41612
+41613
+41614
+41615
+41616
+41617
+41618
+41619
+41620
+41621
+41622
+41623
+41624
+41625
+41626
+41627
+41628
+41629
+41630
+41631
+41632
+41633
+41634
+41635
+41636
+41637
+41638
+41639
+41640
+41641
+41642
+41643
+41644
+41645
+41646
+41647
+41648
+41649
+41650
+41651
+41652
+41653
+41654
+41655
+41656
+41657
+41658
+41659
+41660
+41661
+41662
+41663
+41664
+41665
+41666
+41667
+41668
+41669
+41670
+41671
+41672
+41673
+41674
+41675
+41676
+41677
+41678
+41679
+41680
+41681
+41682
+41683
+41684
+41685
+41686
+41687
+41688
+41689
+41690
+41691
+41692
+41693
+41694
+41695
+41696
+41697
+41698
+41699
+41700
+41701
+41702
+41703
+41704
+41705
+41706
+41707
+41708
+41709
+41710
+41711
+41712
+41713
+41714
+41715
+41716
+41717
+41718
+41719
+41720
+41721
+41722
+41723
+41724
+41725
+41726
+41727
+41728
+41729
+41730
+41731
+41732
+41733
+41734
+41735
+41736
+41737
+41738
+41739
+41740
+41741
+41742
+41743
+41744
+41745
+41746
+41747
+41748
+41749
+41750
+41751
+41752
+41753
+41754
+41755
+41756
+41757
+41758
+41759
+41760
+41761
+41762
+41763
+41764
+41765
+41766
+41767
+41768
+41769
+41770
+41771
+41772
+41773
+41774
+41775
+41776
+41777
+41778
+41779
+41780
+41781
+41782
+41783
+41784
+41785
+41786
+41787
+41788
+41789
+41790
+41791
+41792
+41793
+41794
+41795
+41796
+41797
+41798
+41799
+41800
+41801
+41802
+41803
+41804
+41805
+41806
+41807
+41808
+41809
+41810
+41811
+41812
+41813
+41814
+41815
+41816
+41817
+41818
+41819
+41820
+41821
+41822
+41823
+41824
+41825
+41826
+41827
+41828
+41829
+41830
+41831
+41832
+41833
+41834
+41835
+41836
+41837
+41838
+41839
+41840
+41841
+41842
+41843
+41844
+41845
+41846
+41847
+41848
+41849
+41850
+41851
+41852
+41853
+41854
+41855
+41856
+41857
+41858
+41859
+41860
+41861
+41862
+41863
+41864
+41865
+41866
+41867
+41868
+41869
+41870
+41871
+41872
+41873
+41874
+41875
+41876
+41877
+41878
+41879
+41880
+41881
+41882
+41883
+41884
+41885
+41886
+41887
+41888
+41889
+41890
+41891
+41892
+41893
+41894
+41895
+41896
+41897
+41898
+41899
+41900
+41901
+41902
+41903
+41904
+41905
+41906
+41907
+41908
+41909
+41910
+41911
+41912
+41913
+41914
+41915
+41916
+41917
+41918
+41919
+41920
+41921
+41922
+41923
+41924
+41925
+41926
+41927
+41928
+41929
+41930
+41931
+41932
+41933
+41934
+41935
+41936
+41937
+41938
+41939
+41940
+41941
+41942
+41943
+41944
+41945
+41946
+41947
+41948
+41949
+41950
+41951
+41952
+41953
+41954
+41955
+41956
+41957
+41958
+41959
+41960
+41961
+41962
+41963
+41964
+41965
+41966
+41967
+41968
+41969
+41970
+41971
+41972
+41973
+41974
+41975
+41976
+41977
+41978
+41979
+41980
+41981
+41982
+41983
+41984
+41985
+41986
+41987
+41988
+41989
+41990
+41991
+41992
+41993
+41994
+41995
+41996
+41997
+41998
+41999
+42000
+42001
+42002
+42003
+42004
+42005
+42006
+42007
+42008
+42009
+42010
+42011
+42012
+42013
+42014
+42015
+42016
+42017
+42018
+42019
+42020
+42021
+42022
+42023
+42024
+42025
+42026
+42027
+42028
+42029
+42030
+42031
+42032
+42033
+42034
+42035
+42036
+42037
+42038
+42039
+42040
+42041
+42042
+42043
+42044
+42045
+42046
+42047
+42048
+42049
+42050
+42051
+42052
+42053
+42054
+42055
+42056
+42057
+42058
+42059
+42060
+42061
+42062
+42063
+42064
+42065
+42066
+42067
+42068
+42069
+42070
+42071
+42072
+42073
+42074
+42075
+42076
+42077
+42078
+42079
+42080
+42081
+42082
+42083
+42084
+42085
+42086
+42087
+42088
+42089
+42090
+42091
+42092
+42093
+42094
+42095
+42096
+42097
+42098
+42099
+42100
+42101
+42102
+42103
+42104
+42105
+42106
+42107
+42108
+42109
+42110
+42111
+42112
+42113
+42114
+42115
+42116
+42117
+42118
+42119
+42120
+42121
+42122
+42123
+42124
+42125
+42126
+42127
+42128
+42129
+42130
+42131
+42132
+42133
+42134
+42135
+42136
+42137
+42138
+42139
+42140
+42141
+42142
+42143
+42144
+42145
+42146
+42147
+42148
+42149
+42150
+42151
+42152
+42153
+42154
+42155
+42156
+42157
+42158
+42159
+42160
+42161
+42162
+42163
+42164
+42165
+42166
+42167
+42168
+42169
+42170
+42171
+42172
+42173
+42174
+42175
+42176
+42177
+42178
+42179
+42180
+42181
+42182
+42183
+42184
+42185
+42186
+42187
+42188
+42189
+42190
+42191
+42192
+42193
+42194
+42195
+42196
+42197
+42198
+42199
+42200
+42201
+42202
+42203
+42204
+42205
+42206
+42207
+42208
+42209
+42210
+42211
+42212
+42213
+42214
+42215
+42216
+42217
+42218
+42219
+42220
+42221
+42222
+42223
+42224
+42225
+42226
+42227
+42228
+42229
+42230
+42231
+42232
+42233
+42234
+42235
+42236
+42237
+42238
+42239
+42240
+42241
+42242
+42243
+42244
+42245
+42246
+42247
+42248
+42249
+42250
+42251
+42252
+42253
+42254
+42255
+42256
+42257
+42258
+42259
+42260
+42261
+42262
+42263
+42264
+42265
+42266
+42267
+42268
+42269
+42270
+42271
+42272
+42273
+42274
+42275
+42276
+42277
+42278
+42279
+42280
+42281
+42282
+42283
+42284
+42285
+42286
+42287
+42288
+42289
+42290
+42291
+42292
+42293
+42294
+42295
+42296
+42297
+42298
+42299
+42300
+42301
+42302
+42303
+42304
+42305
+42306
+42307
+42308
+42309
+42310
+42311
+42312
+42313
+42314
+42315
+42316
+42317
+42318
+42319
+42320
+42321
+42322
+42323
+42324
+42325
+42326
+42327
+42328
+42329
+42330
+42331
+42332
+42333
+42334
+42335
+42336
+42337
+42338
+42339
+42340
+42341
+42342
+42343
+42344
+42345
+42346
+42347
+42348
+42349
+42350
+42351
+42352
+42353
+42354
+42355
+42356
+42357
+42358
+42359
+42360
+42361
+42362
+42363
+42364
+42365
+42366
+42367
+42368
+42369
+42370
+42371
+42372
+42373
+42374
+42375
+42376
+42377
+42378
+42379
+42380
+42381
+42382
+42383
+42384
+42385
+42386
+42387
+42388
+42389
+42390
+42391
+42392
+42393
+42394
+42395
+42396
+42397
+42398
+42399
+42400
+42401
+42402
+42403
+42404
+42405
+42406
+42407
+42408
+42409
+42410
+42411
+42412
+42413
+42414
+42415
+42416
+42417
+42418
+42419
+42420
+42421
+42422
+42423
+42424
+42425
+42426
+42427
+42428
+42429
+42430
+42431
+42432
+42433
+42434
+42435
+42436
+42437
+42438
+42439
+42440
+42441
+42442
+42443
+42444
+42445
+42446
+42447
+42448
+42449
+42450
+42451
+42452
+42453
+42454
+42455
+42456
+42457
+42458
+42459
+42460
+42461
+42462
+42463
+42464
+42465
+42466
+42467
+42468
+42469
+42470
+42471
+42472
+42473
+42474
+42475
+42476
+42477
+42478
+42479
+42480
+42481
+42482
+42483
+42484
+42485
+42486
+42487
+42488
+42489
+42490
+42491
+42492
+42493
+42494
+42495
+42496
+42497
+42498
+42499
+42500
+42501
+42502
+42503
+42504
+42505
+42506
+42507
+42508
+42509
+42510
+42511
+42512
+42513
+42514
+42515
+42516
+42517
+42518
+42519
+42520
+42521
+42522
+42523
+42524
+42525
+42526
+42527
+42528
+42529
+42530
+42531
+42532
+42533
+42534
+42535
+42536
+42537
+42538
+42539
+42540
+42541
+42542
+42543
+42544
+42545
+42546
+42547
+42548
+42549
+42550
+42551
+42552
+42553
+42554
+42555
+42556
+42557
+42558
+42559
+42560
+42561
+42562
+42563
+42564
+42565
+42566
+42567
+42568
+42569
+42570
+42571
+42572
+42573
+42574
+42575
+42576
+42577
+42578
+42579
+42580
+42581
+42582
+42583
+42584
+42585
+42586
+42587
+42588
+42589
+42590
+42591
+42592
+42593
+42594
+42595
+42596
+42597
+42598
+42599
+42600
+42601
+42602
+42603
+42604
+42605
+42606
+42607
+42608
+42609
+42610
+42611
+42612
+42613
+42614
+42615
+42616
+42617
+42618
+42619
+42620
+42621
+42622
+42623
+42624
+42625
+42626
+42627
+42628
+42629
+42630
+42631
+42632
+42633
+42634
+42635
+42636
+42637
+42638
+42639
+42640
+42641
+42642
+42643
+42644
+42645
+42646
+42647
+42648
+42649
+42650
+42651
+42652
+42653
+42654
+42655
+42656
+42657
+42658
+42659
+42660
+42661
+42662
+42663
+42664
+42665
+42666
+42667
+42668
+42669
+42670
+42671
+42672
+42673
+42674
+42675
+42676
+42677
+42678
+42679
+42680
+42681
+42682
+42683
+42684
+42685
+42686
+42687
+42688
+42689
+42690
+42691
+42692
+42693
+42694
+42695
+42696
+42697
+42698
+42699
+42700
+42701
+42702
+42703
+42704
+42705
+42706
+42707
+42708
+42709
+42710
+42711
+42712
+42713
+42714
+42715
+42716
+42717
+42718
+42719
+42720
+42721
+42722
+42723
+42724
+42725
+42726
+42727
+42728
+42729
+42730
+42731
+42732
+42733
+42734
+42735
+42736
+42737
+42738
+42739
+42740
+42741
+42742
+42743
+42744
+42745
+42746
+42747
+42748
+42749
+42750
+42751
+42752
+42753
+42754
+42755
+42756
+42757
+42758
+42759
+42760
+42761
+42762
+42763
+42764
+42765
+42766
+42767
+42768
+42769
+42770
+42771
+42772
+42773
+42774
+42775
+42776
+42777
+42778
+42779
+42780
+42781
+42782
+42783
+42784
+42785
+42786
+42787
+42788
+42789
+42790
+42791
+42792
+42793
+42794
+42795
+42796
+42797
+42798
+42799
+42800
+42801
+42802
+42803
+42804
+42805
+42806
+42807
+42808
+42809
+42810
+42811
+42812
+42813
+42814
+42815
+42816
+42817
+42818
+42819
+42820
+42821
+42822
+42823
+42824
+42825
+42826
+42827
+42828
+42829
+42830
+42831
+42832
+42833
+42834
+42835
+42836
+42837
+42838
+42839
+42840
+42841
+42842
+42843
+42844
+42845
+42846
+42847
+42848
+42849
+42850
+42851
+42852
+42853
+42854
+42855
+42856
+42857
+42858
+42859
+42860
+42861
+42862
+42863
+42864
+42865
+42866
+42867
+42868
+42869
+42870
+42871
+42872
+42873
+42874
+42875
+42876
+42877
+42878
+42879
+42880
+42881
+42882
+42883
+42884
+42885
+42886
+42887
+42888
+42889
+42890
+42891
+42892
+42893
+42894
+42895
+42896
+42897
+42898
+42899
+42900
+42901
+42902
+42903
+42904
+42905
+42906
+42907
+42908
+42909
+42910
+42911
+42912
+42913
+42914
+42915
+42916
+42917
+42918
+42919
+42920
+42921
+42922
+42923
+42924
+42925
+42926
+42927
+42928
+42929
+42930
+42931
+42932
+42933
+42934
+42935
+42936
+42937
+42938
+42939
+42940
+42941
+42942
+42943
+42944
+42945
+42946
+42947
+42948
+42949
+42950
+42951
+42952
+42953
+42954
+42955
+42956
+42957
+42958
+42959
+42960
+42961
+42962
+42963
+42964
+42965
+42966
+42967
+42968
+42969
+42970
+42971
+42972
+42973
+42974
+42975
+42976
+42977
+42978
+42979
+42980
+42981
+42982
+42983
+42984
+42985
+42986
+42987
+42988
+42989
+42990
+42991
+42992
+42993
+42994
+42995
+42996
+42997
+42998
+42999
+43000
+43001
+43002
+43003
+43004
+43005
+43006
+43007
+43008
+43009
+43010
+43011
+43012
+43013
+43014
+43015
+43016
+43017
+43018
+43019
+43020
+43021
+43022
+43023
+43024
+43025
+43026
+43027
+43028
+43029
+43030
+43031
+43032
+43033
+43034
+43035
+43036
+43037
+43038
+43039
+43040
+43041
+43042
+43043
+43044
+43045
+43046
+43047
+43048
+43049
+43050
+43051
+43052
+43053
+43054
+43055
+43056
+43057
+43058
+43059
+43060
+43061
+43062
+43063
+43064
+43065
+43066
+43067
+43068
+43069
+43070
+43071
+43072
+43073
+43074
+43075
+43076
+43077
+43078
+43079
+43080
+43081
+43082
+43083
+43084
+43085
+43086
+43087
+43088
+43089
+43090
+43091
+43092
+43093
+43094
+43095
+43096
+43097
+43098
+43099
+43100
+43101
+43102
+43103
+43104
+43105
+43106
+43107
+43108
+43109
+43110
+43111
+43112
+43113
+43114
+43115
+43116
+43117
+43118
+43119
+43120
+43121
+43122
+43123
+43124
+43125
+43126
+43127
+43128
+43129
+43130
+43131
+43132
+43133
+43134
+43135
+43136
+43137
+43138
+43139
+43140
+43141
+43142
+43143
+43144
+43145
+43146
+43147
+43148
+43149
+43150
+43151
+43152
+43153
+43154
+43155
+43156
+43157
+43158
+43159
+43160
+43161
+43162
+43163
+43164
+43165
+43166
+43167
+43168
+43169
+43170
+43171
+43172
+43173
+43174
+43175
+43176
+43177
+43178
+43179
+43180
+43181
+43182
+43183
+43184
+43185
+43186
+43187
+43188
+43189
+43190
+43191
+43192
+43193
+43194
+43195
+43196
+43197
+43198
+43199
+43200
+43201
+43202
+43203
+43204
+43205
+43206
+43207
+43208
+43209
+43210
+43211
+43212
+43213
+43214
+43215
+43216
+43217
+43218
+43219
+43220
+43221
+43222
+43223
+43224
+43225
+43226
+43227
+43228
+43229
+43230
+43231
+43232
+43233
+43234
+43235
+43236
+43237
+43238
+43239
+43240
+43241
+43242
+43243
+43244
+43245
+43246
+43247
+43248
+43249
+43250
+43251
+43252
+43253
+43254
+43255
+43256
+43257
+43258
+43259
+43260
+43261
+43262
+43263
+43264
+43265
+43266
+43267
+43268
+43269
+43270
+43271
+43272
+43273
+43274
+43275
+43276
+43277
+43278
+43279
+43280
+43281
+43282
+43283
+43284
+43285
+43286
+43287
+43288
+43289
+43290
+43291
+43292
+43293
+43294
+43295
+43296
+43297
+43298
+43299
+43300
+43301
+43302
+43303
+43304
+43305
+43306
+43307
+43308
+43309
+43310
+43311
+43312
+43313
+43314
+43315
+43316
+43317
+43318
+43319
+43320
+43321
+43322
+43323
+43324
+43325
+43326
+43327
+43328
+43329
+43330
+43331
+43332
+43333
+43334
+43335
+43336
+43337
+43338
+43339
+43340
+43341
+43342
+43343
+43344
+43345
+43346
+43347
+43348
+43349
+43350
+43351
+43352
+43353
+43354
+43355
+43356
+43357
+43358
+43359
+43360
+43361
+43362
+43363
+43364
+43365
+43366
+43367
+43368
+43369
+43370
+43371
+43372
+43373
+43374
+43375
+43376
+43377
+43378
+43379
+43380
+43381
+43382
+43383
+43384
+43385
+43386
+43387
+43388
+43389
+43390
+43391
+43392
+43393
+43394
+43395
+43396
+43397
+43398
+43399
+43400
+43401
+43402
+43403
+43404
+43405
+43406
+43407
+43408
+43409
+43410
+43411
+43412
+43413
+43414
+43415
+43416
+43417
+43418
+43419
+43420
+43421
+43422
+43423
+43424
+43425
+43426
+43427
+43428
+43429
+43430
+43431
+43432
+43433
+43434
+43435
+43436
+43437
+43438
+43439
+43440
+43441
+43442
+43443
+43444
+43445
+43446
+43447
+43448
+43449
+43450
+43451
+43452
+43453
+43454
+43455
+43456
+43457
+43458
+43459
+43460
+43461
+43462
+43463
+43464
+43465
+43466
+43467
+43468
+43469
+43470
+43471
+43472
+43473
+43474
+43475
+43476
+43477
+43478
+43479
+43480
+43481
+43482
+43483
+43484
+43485
+43486
+43487
+43488
+43489
+43490
+43491
+43492
+43493
+43494
+43495
+43496
+43497
+43498
+43499
+43500
+43501
+43502
+43503
+43504
+43505
+43506
+43507
+43508
+43509
+43510
+43511
+43512
+43513
+43514
+43515
+43516
+43517
+43518
+43519
+43520
+43521
+43522
+43523
+43524
+43525
+43526
+43527
+43528
+43529
+43530
+43531
+43532
+43533
+43534
+43535
+43536
+43537
+43538
+43539
+43540
+43541
+43542
+43543
+43544
+43545
+43546
+43547
+43548
+43549
+43550
+43551
+43552
+43553
+43554
+43555
+43556
+43557
+43558
+43559
+43560
+43561
+43562
+43563
+43564
+43565
+43566
+43567
+43568
+43569
+43570
+43571
+43572
+43573
+43574
+43575
+43576
+43577
+43578
+43579
+43580
+43581
+43582
+43583
+43584
+43585
+43586
+43587
+43588
+43589
+43590
+43591
+43592
+43593
+43594
+43595
+43596
+43597
+43598
+43599
+43600
+43601
+43602
+43603
+43604
+43605
+43606
+43607
+43608
+43609
+43610
+43611
+43612
+43613
+43614
+43615
+43616
+43617
+43618
+43619
+43620
+43621
+43622
+43623
+43624
+43625
+43626
+43627
+43628
+43629
+43630
+43631
+43632
+43633
+43634
+43635
+43636
+43637
+43638
+43639
+43640
+43641
+43642
+43643
+43644
+43645
+43646
+43647
+43648
+43649
+43650
+43651
+43652
+43653
+43654
+43655
+43656
+43657
+43658
+43659
+43660
+43661
+43662
+43663
+43664
+43665
+43666
+43667
+43668
+43669
+43670
+43671
+43672
+43673
+43674
+43675
+43676
+43677
+43678
+43679
+43680
+43681
+43682
+43683
+43684
+43685
+43686
+43687
+43688
+43689
+43690
+43691
+43692
+43693
+43694
+43695
+43696
+43697
+43698
+43699
+43700
+43701
+43702
+43703
+43704
+43705
+43706
+43707
+43708
+43709
+43710
+43711
+43712
+43713
+43714
+43715
+43716
+43717
+43718
+43719
+43720
+43721
+43722
+43723
+43724
+43725
+43726
+43727
+43728
+43729
+43730
+43731
+43732
+43733
+43734
+43735
+43736
+43737
+43738
+43739
+43740
+43741
+43742
+43743
+43744
+43745
+43746
+43747
+43748
+43749
+43750
+43751
+43752
+43753
+43754
+43755
+43756
+43757
+43758
+43759
+43760
+43761
+43762
+43763
+43764
+43765
+43766
+43767
+43768
+43769
+43770
+43771
+43772
+43773
+43774
+43775
+43776
+43777
+43778
+43779
+43780
+43781
+43782
+43783
+43784
+43785
+43786
+43787
+43788
+43789
+43790
+43791
+43792
+43793
+43794
+43795
+43796
+43797
+43798
+43799
+43800
+43801
+43802
+43803
+43804
+43805
+43806
+43807
+43808
+43809
+43810
+43811
+43812
+43813
+43814
+43815
+43816
+43817
+43818
+43819
+43820
+43821
+43822
+43823
+43824
+43825
+43826
+43827
+43828
+43829
+43830
+43831
+43832
+43833
+43834
+43835
+43836
+43837
+43838
+43839
+43840
+43841
+43842
+43843
+43844
+43845
+43846
+43847
+43848
+43849
+43850
+43851
+43852
+43853
+43854
+43855
+43856
+43857
+43858
+43859
+43860
+43861
+43862
+43863
+43864
+43865
+43866
+43867
+43868
+43869
+43870
+43871
+43872
+43873
+43874
+43875
+43876
+43877
+43878
+43879
+43880
+43881
+43882
+43883
+43884
+43885
+43886
+43887
+43888
+43889
+43890
+43891
+43892
+43893
+43894
+43895
+43896
+43897
+43898
+43899
+43900
+43901
+43902
+43903
+43904
+43905
+43906
+43907
+43908
+43909
+43910
+43911
+43912
+43913
+43914
+43915
+43916
+43917
+43918
+43919
+43920
+43921
+43922
+43923
+43924
+43925
+43926
+43927
+43928
+43929
+43930
+43931
+43932
+43933
+43934
+43935
+43936
+43937
+43938
+43939
+43940
+43941
+43942
+43943
+43944
+43945
+43946
+43947
+43948
+43949
+43950
+43951
+43952
+43953
+43954
+43955
+43956
+43957
+43958
+43959
+43960
+43961
+43962
+43963
+43964
+43965
+43966
+43967
+43968
+43969
+43970
+43971
+43972
+43973
+43974
+43975
+43976
+43977
+43978
+43979
+43980
+43981
+43982
+43983
+43984
+43985
+43986
+43987
+43988
+43989
+43990
+43991
+43992
+43993
+43994
+43995
+43996
+43997
+43998
+43999
+44000
+44001
+44002
+44003
+44004
+44005
+44006
+44007
+44008
+44009
+44010
+44011
+44012
+44013
+44014
+44015
+44016
+44017
+44018
+44019
+44020
+44021
+44022
+44023
+44024
+44025
+44026
+44027
+44028
+44029
+44030
+44031
+44032
+44033
+44034
+44035
+44036
+44037
+44038
+44039
+44040
+44041
+44042
+44043
+44044
+44045
+44046
+44047
+44048
+44049
+44050
+44051
+44052
+44053
+44054
+44055
+44056
+44057
+44058
+44059
+44060
+44061
+44062
+44063
+44064
+44065
+44066
+44067
+44068
+44069
+44070
+44071
+44072
+44073
+44074
+44075
+44076
+44077
+44078
+44079
+44080
+44081
+44082
+44083
+44084
+44085
+44086
+44087
+44088
+44089
+44090
+44091
+44092
+44093
+44094
+44095
+44096
+44097
+44098
+44099
+44100
+44101
+44102
+44103
+44104
+44105
+44106
+44107
+44108
+44109
+44110
+44111
+44112
+44113
+44114
+44115
+44116
+44117
+44118
+44119
+44120
+44121
+44122
+44123
+44124
+44125
+44126
+44127
+44128
+44129
+44130
+44131
+44132
+44133
+44134
+44135
+44136
+44137
+44138
+44139
+44140
+44141
+44142
+44143
+44144
+44145
+44146
+44147
+44148
+44149
+44150
+44151
+44152
+44153
+44154
+44155
+44156
+44157
+44158
+44159
+44160
+44161
+44162
+44163
+44164
+44165
+44166
+44167
+44168
+44169
+44170
+44171
+44172
+44173
+44174
+44175
+44176
+44177
+44178
+44179
+44180
+44181
+44182
+44183
+44184
+44185
+44186
+44187
+44188
+44189
+44190
+44191
+44192
+44193
+44194
+44195
+44196
+44197
+44198
+44199
+44200
+44201
+44202
+44203
+44204
+44205
+44206
+44207
+44208
+44209
+44210
+44211
+44212
+44213
+44214
+44215
+44216
+44217
+44218
+44219
+44220
+44221
+44222
+44223
+44224
+44225
+44226
+44227
+44228
+44229
+44230
+44231
+44232
+44233
+44234
+44235
+44236
+44237
+44238
+44239
+44240
+44241
+44242
+44243
+44244
+44245
+44246
+44247
+44248
+44249
+44250
+44251
+44252
+44253
+44254
+44255
+44256
+44257
+44258
+44259
+44260
+44261
+44262
+44263
+44264
+44265
+44266
+44267
+44268
+44269
+44270
+44271
+44272
+44273
+44274
+44275
+44276
+44277
+44278
+44279
+44280
+44281
+44282
+44283
+44284
+44285
+44286
+44287
+44288
+44289
+44290
+44291
+44292
+44293
+44294
+44295
+44296
+44297
+44298
+44299
+44300
+44301
+44302
+44303
+44304
+44305
+44306
+44307
+44308
+44309
+44310
+44311
+44312
+44313
+44314
+44315
+44316
+44317
+44318
+44319
+44320
+44321
+44322
+44323
+44324
+44325
+44326
+44327
+44328
+44329
+44330
+44331
+44332
+44333
+44334
+44335
+44336
+44337
+44338
+44339
+44340
+44341
+44342
+44343
+44344
+44345
+44346
+44347
+44348
+44349
+44350
+44351
+44352
+44353
+44354
+44355
+44356
+44357
+44358
+44359
+44360
+44361
+44362
+44363
+44364
+44365
+44366
+44367
+44368
+44369
+44370
+44371
+44372
+44373
+44374
+44375
+44376
+44377
+44378
+44379
+44380
+44381
+44382
+44383
+44384
+44385
+44386
+44387
+44388
+44389
+44390
+44391
+44392
+44393
+44394
+44395
+44396
+44397
+44398
+44399
+44400
+44401
+44402
+44403
+44404
+44405
+44406
+44407
+44408
+44409
+44410
+44411
+44412
+44413
+44414
+44415
+44416
+44417
+44418
+44419
+44420
+44421
+44422
+44423
+44424
+44425
+44426
+44427
+44428
+44429
+44430
+44431
+44432
+44433
+44434
+44435
+44436
+44437
+44438
+44439
+44440
+44441
+44442
+44443
+44444
+44445
+44446
+44447
+44448
+44449
+44450
+44451
+44452
+44453
+44454
+44455
+44456
+44457
+44458
+44459
+44460
+44461
+44462
+44463
+44464
+44465
+44466
+44467
+44468
+44469
+44470
+44471
+44472
+44473
+44474
+44475
+44476
+44477
+44478
+44479
+44480
+44481
+44482
+44483
+44484
+44485
+44486
+44487
+44488
+44489
+44490
+44491
+44492
+44493
+44494
+44495
+44496
+44497
+44498
+44499
+44500
+44501
+44502
+44503
+44504
+44505
+44506
+44507
+44508
+44509
+44510
+44511
+44512
+44513
+44514
+44515
+44516
+44517
+44518
+44519
+44520
+44521
+44522
+44523
+44524
+44525
+44526
+44527
+44528
+44529
+44530
+44531
+44532
+44533
+44534
+44535
+44536
+44537
+44538
+44539
+44540
+44541
+44542
+44543
+44544
+44545
+44546
+44547
+44548
+44549
+44550
+44551
+44552
+44553
+44554
+44555
+44556
+44557
+44558
+44559
+44560
+44561
+44562
+44563
+44564
+44565
+44566
+44567
+44568
+44569
+44570
+44571
+44572
+44573
+44574
+44575
+44576
+44577
+44578
+44579
+44580
+44581
+44582
+44583
+44584
+44585
+44586
+44587
+44588
+44589
+44590
+44591
+44592
+44593
+44594
+44595
+44596
+44597
+44598
+44599
+44600
+44601
+44602
+44603
+44604
+44605
+44606
+44607
+44608
+44609
+44610
+44611
+44612
+44613
+44614
+44615
+44616
+44617
+44618
+44619
+44620
+44621
+44622
+44623
+44624
+44625
+44626
+44627
+44628
+44629
+44630
+44631
+44632
+44633
+44634
+44635
+44636
+44637
+44638
+44639
+44640
+44641
+44642
+44643
+44644
+44645
+44646
+44647
+44648
+44649
+44650
+44651
+44652
+44653
+44654
+44655
+44656
+44657
+44658
+44659
+44660
+44661
+44662
+44663
+44664
+44665
+44666
+44667
+44668
+44669
+44670
+44671
+44672
+44673
+44674
+44675
+44676
+44677
+44678
+44679
+44680
+44681
+44682
+44683
+44684
+44685
+44686
+44687
+44688
+44689
+44690
+44691
+44692
+44693
+44694
+44695
+44696
+44697
+44698
+44699
+44700
+44701
+44702
+44703
+44704
+44705
+44706
+44707
+44708
+44709
+44710
+44711
+44712
+44713
+44714
+44715
+44716
+44717
+44718
+44719
+44720
+44721
+44722
+44723
+44724
+44725
+44726
+44727
+44728
+44729
+44730
+44731
+44732
+44733
+44734
+44735
+44736
+44737
+44738
+44739
+44740
+44741
+44742
+44743
+44744
+44745
+44746
+44747
+44748
+44749
+44750
+44751
+44752
+44753
+44754
+44755
+44756
+44757
+44758
+44759
+44760
+44761
+44762
+44763
+44764
+44765
+44766
+44767
+44768
+44769
+44770
+44771
+44772
+44773
+44774
+44775
+44776
+44777
+44778
+44779
+44780
+44781
+44782
+44783
+44784
+44785
+44786
+44787
+44788
+44789
+44790
+44791
+44792
+44793
+44794
+44795
+44796
+44797
+44798
+44799
+44800
+44801
+44802
+44803
+44804
+44805
+44806
+44807
+44808
+44809
+44810
+44811
+44812
+44813
+44814
+44815
+44816
+44817
+44818
+44819
+44820
+44821
+44822
+44823
+44824
+44825
+44826
+44827
+44828
+44829
+44830
+44831
+44832
+44833
+44834
+44835
+44836
+44837
+44838
+44839
+44840
+44841
+44842
+44843
+44844
+44845
+44846
+44847
+44848
+44849
+44850
+44851
+44852
+44853
+44854
+44855
+44856
+44857
+44858
+44859
+44860
+44861
+44862
+44863
+44864
+44865
+44866
+44867
+44868
+44869
+44870
+44871
+44872
+44873
+44874
+44875
+44876
+44877
+44878
+44879
+44880
+44881
+44882
+44883
+44884
+44885
+44886
+44887
+44888
+44889
+44890
+44891
+44892
+44893
+44894
+44895
+44896
+44897
+44898
+44899
+44900
+44901
+44902
+44903
+44904
+44905
+44906
+44907
+44908
+44909
+44910
+44911
+44912
+44913
+44914
+44915
+44916
+44917
+44918
+44919
+44920
+44921
+44922
+44923
+44924
+44925
+44926
+44927
+44928
+44929
+44930
+44931
+44932
+44933
+44934
+44935
+44936
+44937
+44938
+44939
+44940
+44941
+44942
+44943
+44944
+44945
+44946
+44947
+44948
+44949
+44950
+44951
+44952
+44953
+44954
+44955
+44956
+44957
+44958
+44959
+44960
+44961
+44962
+44963
+44964
+44965
+44966
+44967
+44968
+44969
+44970
+44971
+44972
+44973
+44974
+44975
+44976
+44977
+44978
+44979
+44980
+44981
+44982
+44983
+44984
+44985
+44986
+44987
+44988
+44989
+44990
+44991
+44992
+44993
+44994
+44995
+44996
+44997
+44998
+44999
+45000
+45001
+45002
+45003
+45004
+45005
+45006
+45007
+45008
+45009
+45010
+45011
+45012
+45013
+45014
+45015
+45016
+45017
+45018
+45019
+45020
+45021
+45022
+45023
+45024
+45025
+45026
+45027
+45028
+45029
+45030
+45031
+45032
+45033
+45034
+45035
+45036
+45037
+45038
+45039
+45040
+45041
+45042
+45043
+45044
+45045
+45046
+45047
+45048
+45049
+45050
+45051
+45052
+45053
+45054
+45055
+45056
+45057
+45058
+45059
+45060
+45061
+45062
+45063
+45064
+45065
+45066
+45067
+45068
+45069
+45070
+45071
+45072
+45073
+45074
+45075
+45076
+45077
+45078
+45079
+45080
+45081
+45082
+45083
+45084
+45085
+45086
+45087
+45088
+45089
+45090
+45091
+45092
+45093
+45094
+45095
+45096
+45097
+45098
+45099
+45100
+45101
+45102
+45103
+45104
+45105
+45106
+45107
+45108
+45109
+45110
+45111
+45112
+45113
+45114
+45115
+45116
+45117
+45118
+45119
+45120
+45121
+45122
+45123
+45124
+45125
+45126
+45127
+45128
+45129
+45130
+45131
+45132
+45133
+45134
+45135
+45136
+45137
+45138
+45139
+45140
+45141
+45142
+45143
+45144
+45145
+45146
+45147
+45148
+45149
+45150
+45151
+45152
+45153
+45154
+45155
+45156
+45157
+45158
+45159
+45160
+45161
+45162
+45163
+45164
+45165
+45166
+45167
+45168
+45169
+45170
+45171
+45172
+45173
+45174
+45175
+45176
+45177
+45178
+45179
+45180
+45181
+45182
+45183
+45184
+45185
+45186
+45187
+45188
+45189
+45190
+45191
+45192
+45193
+45194
+45195
+45196
+45197
+45198
+45199
+45200
+45201
+45202
+45203
+45204
+45205
+45206
+45207
+45208
+45209
+45210
+45211
+45212
+45213
+45214
+45215
+45216
+45217
+45218
+45219
+45220
+45221
+45222
+45223
+45224
+45225
+45226
+45227
+45228
+45229
+45230
+45231
+45232
+45233
+45234
+45235
+45236
+45237
+45238
+45239
+45240
+45241
+45242
+45243
+45244
+45245
+45246
+45247
+45248
+45249
+45250
+45251
+45252
+45253
+45254
+45255
+45256
+45257
+45258
+45259
+45260
+45261
+45262
+45263
+45264
+45265
+45266
+45267
+45268
+45269
+45270
+45271
+45272
+45273
+45274
+45275
+45276
+45277
+45278
+45279
+45280
+45281
+45282
+45283
+45284
+45285
+45286
+45287
+45288
+45289
+45290
+45291
+45292
+45293
+45294
+45295
+45296
+45297
+45298
+45299
+45300
+45301
+45302
+45303
+45304
+45305
+45306
+45307
+45308
+45309
+45310
+45311
+45312
+45313
+45314
+45315
+45316
+45317
+45318
+45319
+45320
+45321
+45322
+45323
+45324
+45325
+45326
+45327
+45328
+45329
+45330
+45331
+45332
+45333
+45334
+45335
+45336
+45337
+45338
+45339
+45340
+45341
+45342
+45343
+45344
+45345
+45346
+45347
+45348
+45349
+45350
+45351
+45352
+45353
+45354
+45355
+45356
+45357
+45358
+45359
+45360
+45361
+45362
+45363
+45364
+45365
+45366
+45367
+45368
+45369
+45370
+45371
+45372
+45373
+45374
+45375
+45376
+45377
+45378
+45379
+45380
+45381
+45382
+45383
+45384
+45385
+45386
+45387
+45388
+45389
+45390
+45391
+45392
+45393
+45394
+45395
+45396
+45397
+45398
+45399
+45400
+45401
+45402
+45403
+45404
+45405
+45406
+45407
+45408
+45409
+45410
+45411
+45412
+45413
+45414
+45415
+45416
+45417
+45418
+45419
+45420
+45421
+45422
+45423
+45424
+45425
+45426
+45427
+45428
+45429
+45430
+45431
+45432
+45433
+45434
+45435
+45436
+45437
+45438
+45439
+45440
+45441
+45442
+45443
+45444
+45445
+45446
+45447
+45448
+45449
+45450
+45451
+45452
+45453
+45454
+45455
+45456
+45457
+45458
+45459
+45460
+45461
+45462
+45463
+45464
+45465
+45466
+45467
+45468
+45469
+45470
+45471
+45472
+45473
+45474
+45475
+45476
+45477
+45478
+45479
+45480
+45481
+45482
+45483
+45484
+45485
+45486
+45487
+45488
+45489
+45490
+45491
+45492
+45493
+45494
+45495
+45496
+45497
+45498
+45499
+45500
+45501
+45502
+45503
+45504
+45505
+45506
+45507
+45508
+45509
+45510
+45511
+45512
+45513
+45514
+45515
+45516
+45517
+45518
+45519
+45520
+45521
+45522
+45523
+45524
+45525
+45526
+45527
+45528
+45529
+45530
+45531
+45532
+45533
+45534
+45535
+45536
+45537
+45538
+45539
+45540
+45541
+45542
+45543
+45544
+45545
+45546
+45547
+45548
+45549
+45550
+45551
+45552
+45553
+45554
+45555
+45556
+45557
+45558
+45559
+45560
+45561
+45562
+45563
+45564
+45565
+45566
+45567
+45568
+45569
+45570
+45571
+45572
+45573
+45574
+45575
+45576
+45577
+45578
+45579
+45580
+45581
+45582
+45583
+45584
+45585
+45586
+45587
+45588
+45589
+45590
+45591
+45592
+45593
+45594
+45595
+45596
+45597
+45598
+45599
+45600
+45601
+45602
+45603
+45604
+45605
+45606
+45607
+45608
+45609
+45610
+45611
+45612
+45613
+45614
+45615
+45616
+45617
+45618
+45619
+45620
+45621
+45622
+45623
+45624
+45625
+45626
+45627
+45628
+45629
+45630
+45631
+45632
+45633
+45634
+45635
+45636
+45637
+45638
+45639
+45640
+45641
+45642
+45643
+45644
+45645
+45646
+45647
+45648
+45649
+45650
+45651
+45652
+45653
+45654
+45655
+45656
+45657
+45658
+45659
+45660
+45661
+45662
+45663
+45664
+45665
+45666
+45667
+45668
+45669
+45670
+45671
+45672
+45673
+45674
+45675
+45676
+45677
+45678
+45679
+45680
+45681
+45682
+45683
+45684
+45685
+45686
+45687
+45688
+45689
+45690
+45691
+45692
+45693
+45694
+45695
+45696
+45697
+45698
+45699
+45700
+45701
+45702
+45703
+45704
+45705
+45706
+45707
+45708
+45709
+45710
+45711
+45712
+45713
+45714
+45715
+45716
+45717
+45718
+45719
+45720
+45721
+45722
+45723
+45724
+45725
+45726
+45727
+45728
+45729
+45730
+45731
+45732
+45733
+45734
+45735
+45736
+45737
+45738
+45739
+45740
+45741
+45742
+45743
+45744
+45745
+45746
+45747
+45748
+45749
+45750
+45751
+45752
+45753
+45754
+45755
+45756
+45757
+45758
+45759
+45760
+45761
+45762
+45763
+45764
+45765
+45766
+45767
+45768
+45769
+45770
+45771
+45772
+45773
+45774
+45775
+45776
+45777
+45778
+45779
+45780
+45781
+45782
+45783
+45784
+45785
+45786
+45787
+45788
+45789
+45790
+45791
+45792
+45793
+45794
+45795
+45796
+45797
+45798
+45799
+45800
+45801
+45802
+45803
+45804
+45805
+45806
+45807
+45808
+45809
+45810
+45811
+45812
+45813
+45814
+45815
+45816
+45817
+45818
+45819
+45820
+45821
+45822
+45823
+45824
+45825
+45826
+45827
+45828
+45829
+45830
+45831
+45832
+45833
+45834
+45835
+45836
+45837
+45838
+45839
+45840
+45841
+45842
+45843
+45844
+45845
+45846
+45847
+45848
+45849
+45850
+45851
+45852
+45853
+45854
+45855
+45856
+45857
+45858
+45859
+45860
+45861
+45862
+45863
+45864
+45865
+45866
+45867
+45868
+45869
+45870
+45871
+45872
+45873
+45874
+45875
+45876
+45877
+45878
+45879
+45880
+45881
+45882
+45883
+45884
+45885
+45886
+45887
+45888
+45889
+45890
+45891
+45892
+45893
+45894
+45895
+45896
+45897
+45898
+45899
+45900
+45901
+45902
+45903
+45904
+45905
+45906
+45907
+45908
+45909
+45910
+45911
+45912
+45913
+45914
+45915
+45916
+45917
+45918
+45919
+45920
+45921
+45922
+45923
+45924
+45925
+45926
+45927
+45928
+45929
+45930
+45931
+45932
+45933
+45934
+45935
+45936
+45937
+45938
+45939
+45940
+45941
+45942
+45943
+45944
+45945
+45946
+45947
+45948
+45949
+45950
+45951
+45952
+45953
+45954
+45955
+45956
+45957
+45958
+45959
+45960
+45961
+45962
+45963
+45964
+45965
+45966
+45967
+45968
+45969
+45970
+45971
+45972
+45973
+45974
+45975
+45976
+45977
+45978
+45979
+45980
+45981
+45982
+45983
+45984
+45985
+45986
+45987
+45988
+45989
+45990
+45991
+45992
+45993
+45994
+45995
+45996
+45997
+45998
+45999
+46000
+46001
+46002
+46003
+46004
+46005
+46006
+46007
+46008
+46009
+46010
+46011
+46012
+46013
+46014
+46015
+46016
+46017
+46018
+46019
+46020
+46021
+46022
+46023
+46024
+46025
+46026
+46027
+46028
+46029
+46030
+46031
+46032
+46033
+46034
+46035
+46036
+46037
+46038
+46039
+46040
+46041
+46042
+46043
+46044
+46045
+46046
+46047
+46048
+46049
+46050
+46051
+46052
+46053
+46054
+46055
+46056
+46057
+46058
+46059
+46060
+46061
+46062
+46063
+46064
+46065
+46066
+46067
+46068
+46069
+46070
+46071
+46072
+46073
+46074
+46075
+46076
+46077
+46078
+46079
+46080
+46081
+46082
+46083
+46084
+46085
+46086
+46087
+46088
+46089
+46090
+46091
+46092
+46093
+46094
+46095
+46096
+46097
+46098
+46099
+46100
+46101
+46102
+46103
+46104
+46105
+46106
+46107
+46108
+46109
+46110
+46111
+46112
+46113
+46114
+46115
+46116
+46117
+46118
+46119
+46120
+46121
+46122
+46123
+46124
+46125
+46126
+46127
+46128
+46129
+46130
+46131
+46132
+46133
+46134
+46135
+46136
+46137
+46138
+46139
+46140
+46141
+46142
+46143
+46144
+46145
+46146
+46147
+46148
+46149
+46150
+46151
+46152
+46153
+46154
+46155
+46156
+46157
+46158
+46159
+46160
+46161
+46162
+46163
+46164
+46165
+46166
+46167
+46168
+46169
+46170
+46171
+46172
+46173
+46174
+46175
+46176
+46177
+46178
+46179
+46180
+46181
+46182
+46183
+46184
+46185
+46186
+46187
+46188
+46189
+46190
+46191
+46192
+46193
+46194
+46195
+46196
+46197
+46198
+46199
+46200
+46201
+46202
+46203
+46204
+46205
+46206
+46207
+46208
+46209
+46210
+46211
+46212
+46213
+46214
+46215
+46216
+46217
+46218
+46219
+46220
+46221
+46222
+46223
+46224
+46225
+46226
+46227
+46228
+46229
+46230
+46231
+46232
+46233
+46234
+46235
+46236
+46237
+46238
+46239
+46240
+46241
+46242
+46243
+46244
+46245
+46246
+46247
+46248
+46249
+46250
+46251
+46252
+46253
+46254
+46255
+46256
+46257
+46258
+46259
+46260
+46261
+46262
+46263
+46264
+46265
+46266
+46267
+46268
+46269
+46270
+46271
+46272
+46273
+46274
+46275
+46276
+46277
+46278
+46279
+46280
+46281
+46282
+46283
+46284
+46285
+46286
+46287
+46288
+46289
+46290
+46291
+46292
+46293
+46294
+46295
+46296
+46297
+46298
+46299
+46300
+46301
+46302
+46303
+46304
+46305
+46306
+46307
+46308
+46309
+46310
+46311
+46312
+46313
+46314
+46315
+46316
+46317
+46318
+46319
+46320
+46321
+46322
+46323
+46324
+46325
+46326
+46327
+46328
+46329
+46330
+46331
+46332
+46333
+46334
+46335
+46336
+46337
+46338
+46339
+46340
+46341
+46342
+46343
+46344
+46345
+46346
+46347
+46348
+46349
+46350
+46351
+46352
+46353
+46354
+46355
+46356
+46357
+46358
+46359
+46360
+46361
+46362
+46363
+46364
+46365
+46366
+46367
+46368
+46369
+46370
+46371
+46372
+46373
+46374
+46375
+46376
+46377
+46378
+46379
+46380
+46381
+46382
+46383
+46384
+46385
+46386
+46387
+46388
+46389
+46390
+46391
+46392
+46393
+46394
+46395
+46396
+46397
+46398
+46399
+46400
+46401
+46402
+46403
+46404
+46405
+46406
+46407
+46408
+46409
+46410
+46411
+46412
+46413
+46414
+46415
+46416
+46417
+46418
+46419
+46420
+46421
+46422
+46423
+46424
+46425
+46426
+46427
+46428
+46429
+46430
+46431
+46432
+46433
+46434
+46435
+46436
+46437
+46438
+46439
+46440
+46441
+46442
+46443
+46444
+46445
+46446
+46447
+46448
+46449
+46450
+46451
+46452
+46453
+46454
+46455
+46456
+46457
+46458
+46459
+46460
+46461
+46462
+46463
+46464
+46465
+46466
+46467
+46468
+46469
+46470
+46471
+46472
+46473
+46474
+46475
+46476
+46477
+46478
+46479
+46480
+46481
+46482
+46483
+46484
+46485
+46486
+46487
+46488
+46489
+46490
+46491
+46492
+46493
+46494
+46495
+46496
+46497
+46498
+46499
+46500
+46501
+46502
+46503
+46504
+46505
+46506
+46507
+46508
+46509
+46510
+46511
+46512
+46513
+46514
+46515
+46516
+46517
+46518
+46519
+46520
+46521
+46522
+46523
+46524
+46525
+46526
+46527
+46528
+46529
+46530
+46531
+46532
+46533
+46534
+46535
+46536
+46537
+46538
+46539
+46540
+46541
+46542
+46543
+46544
+46545
+46546
+46547
+46548
+46549
+46550
+46551
+46552
+46553
+46554
+46555
+46556
+46557
+46558
+46559
+46560
+46561
+46562
+46563
+46564
+46565
+46566
+46567
+46568
+46569
+46570
+46571
+46572
+46573
+46574
+46575
+46576
+46577
+46578
+46579
+46580
+46581
+46582
+46583
+46584
+46585
+46586
+46587
+46588
+46589
+46590
+46591
+46592
+46593
+46594
+46595
+46596
+46597
+46598
+46599
+46600
+46601
+46602
+46603
+46604
+46605
+46606
+46607
+46608
+46609
+46610
+46611
+46612
+46613
+46614
+46615
+46616
+46617
+46618
+46619
+46620
+46621
+46622
+46623
+46624
+46625
+46626
+46627
+46628
+46629
+46630
+46631
+46632
+46633
+46634
+46635
+46636
+46637
+46638
+46639
+46640
+46641
+46642
+46643
+46644
+46645
+46646
+46647
+46648
+46649
+46650
+46651
+46652
+46653
+46654
+46655
+46656
+46657
+46658
+46659
+46660
+46661
+46662
+46663
+46664
+46665
+46666
+46667
+46668
+46669
+46670
+46671
+46672
+46673
+46674
+46675
+46676
+46677
+46678
+46679
+46680
+46681
+46682
+46683
+46684
+46685
+46686
+46687
+46688
+46689
+46690
+46691
+46692
+46693
+46694
+46695
+46696
+46697
+46698
+46699
+46700
+46701
+46702
+46703
+46704
+46705
+46706
+46707
+46708
+46709
+46710
+46711
+46712
+46713
+46714
+46715
+46716
+46717
+46718
+46719
+46720
+46721
+46722
+46723
+46724
+46725
+46726
+46727
+46728
+46729
+46730
+46731
+46732
+46733
+46734
+46735
+46736
+46737
+46738
+46739
+46740
+46741
+46742
+46743
+46744
+46745
+46746
+46747
+46748
+46749
+46750
+46751
+46752
+46753
+46754
+46755
+46756
+46757
+46758
+46759
+46760
+46761
+46762
+46763
+46764
+46765
+46766
+46767
+46768
+46769
+46770
+46771
+46772
+46773
+46774
+46775
+46776
+46777
+46778
+46779
+46780
+46781
+46782
+46783
+46784
+46785
+46786
+46787
+46788
+46789
+46790
+46791
+46792
+46793
+46794
+46795
+46796
+46797
+46798
+46799
+46800
+46801
+46802
+46803
+46804
+46805
+46806
+46807
+46808
+46809
+46810
+46811
+46812
+46813
+46814
+46815
+46816
+46817
+46818
+46819
+46820
+46821
+46822
+46823
+46824
+46825
+46826
+46827
+46828
+46829
+46830
+46831
+46832
+46833
+46834
+46835
+46836
+46837
+46838
+46839
+46840
+46841
+46842
+46843
+46844
+46845
+46846
+46847
+46848
+46849
+46850
+46851
+46852
+46853
+46854
+46855
+46856
+46857
+46858
+46859
+46860
+46861
+46862
+46863
+46864
+46865
+46866
+46867
+46868
+46869
+46870
+46871
+46872
+46873
+46874
+46875
+46876
+46877
+46878
+46879
+46880
+46881
+46882
+46883
+46884
+46885
+46886
+46887
+46888
+46889
+46890
+46891
+46892
+46893
+46894
+46895
+46896
+46897
+46898
+46899
+46900
+46901
+46902
+46903
+46904
+46905
+46906
+46907
+46908
+46909
+46910
+46911
+46912
+46913
+46914
+46915
+46916
+46917
+46918
+46919
+46920
+46921
+46922
+46923
+46924
+46925
+46926
+46927
+46928
+46929
+46930
+46931
+46932
+46933
+46934
+46935
+46936
+46937
+46938
+46939
+46940
+46941
+46942
+46943
+46944
+46945
+46946
+46947
+46948
+46949
+46950
+46951
+46952
+46953
+46954
+46955
+46956
+46957
+46958
+46959
+46960
+46961
+46962
+46963
+46964
+46965
+46966
+46967
+46968
+46969
+46970
+46971
+46972
+46973
+46974
+46975
+46976
+46977
+46978
+46979
+46980
+46981
+46982
+46983
+46984
+46985
+46986
+46987
+46988
+46989
+46990
+46991
+46992
+46993
+46994
+46995
+46996
+46997
+46998
+46999
+47000
+47001
+47002
+47003
+47004
+47005
+47006
+47007
+47008
+47009
+47010
+47011
+47012
+47013
+47014
+47015
+47016
+47017
+47018
+47019
+47020
+47021
+47022
+47023
+47024
+47025
+47026
+47027
+47028
+47029
+47030
+47031
+47032
+47033
+47034
+47035
+47036
+47037
+47038
+47039
+47040
+47041
+47042
+47043
+47044
+47045
+47046
+47047
+47048
+47049
+47050
+47051
+47052
+47053
+47054
+47055
+47056
+47057
+47058
+47059
+47060
+47061
+47062
+47063
+47064
+47065
+47066
+47067
+47068
+47069
+47070
+47071
+47072
+47073
+47074
+47075
+47076
+47077
+47078
+47079
+47080
+47081
+47082
+47083
+47084
+47085
+47086
+47087
+47088
+47089
+47090
+47091
+47092
+47093
+47094
+47095
+47096
+47097
+47098
+47099
+47100
+47101
+47102
+47103
+47104
+47105
+47106
+47107
+47108
+47109
+47110
+47111
+47112
+47113
+47114
+47115
+47116
+47117
+47118
+47119
+47120
+47121
+47122
+47123
+47124
+47125
+47126
+47127
+47128
+47129
+47130
+47131
+47132
+47133
+47134
+47135
+47136
+47137
+47138
+47139
+47140
+47141
+47142
+47143
+47144
+47145
+47146
+47147
+47148
+47149
+47150
+47151
+47152
+47153
+47154
+47155
+47156
+47157
+47158
+47159
+47160
+47161
+47162
+47163
+47164
+47165
+47166
+47167
+47168
+47169
+47170
+47171
+47172
+47173
+47174
+47175
+47176
+47177
+47178
+47179
+47180
+47181
+47182
+47183
+47184
+47185
+47186
+47187
+47188
+47189
+47190
+47191
+47192
+47193
+47194
+47195
+47196
+47197
+47198
+47199
+47200
+47201
+47202
+47203
+47204
+47205
+47206
+47207
+47208
+47209
+47210
+47211
+47212
+47213
+47214
+47215
+47216
+47217
+47218
+47219
+47220
+47221
+47222
+47223
+47224
+47225
+47226
+47227
+47228
+47229
+47230
+47231
+47232
+47233
+47234
+47235
+47236
+47237
+47238
+47239
+47240
+47241
+47242
+47243
+47244
+47245
+47246
+47247
+47248
+47249
+47250
+47251
+47252
+47253
+47254
+47255
+47256
+47257
+47258
+47259
+47260
+47261
+47262
+47263
+47264
+47265
+47266
+47267
+47268
+47269
+47270
+47271
+47272
+47273
+47274
+47275
+47276
+47277
+47278
+47279
+47280
+47281
+47282
+47283
+47284
+47285
+47286
+47287
+47288
+47289
+47290
+47291
+47292
+47293
+47294
+47295
+47296
+47297
+47298
+47299
+47300
+47301
+47302
+47303
+47304
+47305
+47306
+47307
+47308
+47309
+47310
+47311
+47312
+47313
+47314
+47315
+47316
+47317
+47318
+47319
+47320
+47321
+47322
+47323
+47324
+47325
+47326
+47327
+47328
+47329
+47330
+47331
+47332
+47333
+47334
+47335
+47336
+47337
+47338
+47339
+47340
+47341
+47342
+47343
+47344
+47345
+47346
+47347
+47348
+47349
+47350
+47351
+47352
+47353
+47354
+47355
+47356
+47357
+47358
+47359
+47360
+47361
+47362
+47363
+47364
+47365
+47366
+47367
+47368
+47369
+47370
+47371
+47372
+47373
+47374
+47375
+47376
+47377
+47378
+47379
+47380
+47381
+47382
+47383
+47384
+47385
+47386
+47387
+47388
+47389
+47390
+47391
+47392
+47393
+47394
+47395
+47396
+47397
+47398
+47399
+47400
+47401
+47402
+47403
+47404
+47405
+47406
+47407
+47408
+47409
+47410
+47411
+47412
+47413
+47414
+47415
+47416
+47417
+47418
+47419
+47420
+47421
+47422
+47423
+47424
+47425
+47426
+47427
+47428
+47429
+47430
+47431
+47432
+47433
+47434
+47435
+47436
+47437
+47438
+47439
+47440
+47441
+47442
+47443
+47444
+47445
+47446
+47447
+47448
+47449
+47450
+47451
+47452
+47453
+47454
+47455
+47456
+47457
+47458
+47459
+47460
+47461
+47462
+47463
+47464
+47465
+47466
+47467
+47468
+47469
+47470
+47471
+47472
+47473
+47474
+47475
+47476
+47477
+47478
+47479
+47480
+47481
+47482
+47483
+47484
+47485
+47486
+47487
+47488
+47489
+47490
+47491
+47492
+47493
+47494
+47495
+47496
+47497
+47498
+47499
+47500
+47501
+47502
+47503
+47504
+47505
+47506
+47507
+47508
+47509
+47510
+47511
+47512
+47513
+47514
+47515
+47516
+47517
+47518
+47519
+47520
+47521
+47522
+47523
+47524
+47525
+47526
+47527
+47528
+47529
+47530
+47531
+47532
+47533
+47534
+47535
+47536
+47537
+47538
+47539
+47540
+47541
+47542
+47543
+47544
+47545
+47546
+47547
+47548
+47549
+47550
+47551
+47552
+47553
+47554
+47555
+47556
+47557
+47558
+47559
+47560
+47561
+47562
+47563
+47564
+47565
+47566
+47567
+47568
+47569
+47570
+47571
+47572
+47573
+47574
+47575
+47576
+47577
+47578
+47579
+47580
+47581
+47582
+47583
+47584
+47585
+47586
+47587
+47588
+47589
+47590
+47591
+47592
+47593
+47594
+47595
+47596
+47597
+47598
+47599
+47600
+47601
+47602
+47603
+47604
+47605
+47606
+47607
+47608
+47609
+47610
+47611
+47612
+47613
+47614
+47615
+47616
+47617
+47618
+47619
+47620
+47621
+47622
+47623
+47624
+47625
+47626
+47627
+47628
+47629
+47630
+47631
+47632
+47633
+47634
+47635
+47636
+47637
+47638
+47639
+47640
+47641
+47642
+47643
+47644
+47645
+47646
+47647
+47648
+47649
+47650
+47651
+47652
+47653
+47654
+47655
+47656
+47657
+47658
+47659
+47660
+47661
+47662
+47663
+47664
+47665
+47666
+47667
+47668
+47669
+47670
+47671
+47672
+47673
+47674
+47675
+47676
+47677
+47678
+47679
+47680
+47681
+47682
+47683
+47684
+47685
+47686
+47687
+47688
+47689
+47690
+47691
+47692
+47693
+47694
+47695
+47696
+47697
+47698
+47699
+47700
+47701
+47702
+47703
+47704
+47705
+47706
+47707
+47708
+47709
+47710
+47711
+47712
+47713
+47714
+47715
+47716
+47717
+47718
+47719
+47720
+47721
+47722
+47723
+47724
+47725
+47726
+47727
+47728
+47729
+47730
+47731
+47732
+47733
+47734
+47735
+47736
+47737
+47738
+47739
+47740
+47741
+47742
+47743
+47744
+47745
+47746
+47747
+47748
+47749
+47750
+47751
+47752
+47753
+47754
+47755
+47756
+47757
+47758
+47759
+47760
+47761
+47762
+47763
+47764
+47765
+47766
+47767
+47768
+47769
+47770
+47771
+47772
+47773
+47774
+47775
+47776
+47777
+47778
+47779
+47780
+47781
+47782
+47783
+47784
+47785
+47786
+47787
+47788
+47789
+47790
+47791
+47792
+47793
+47794
+47795
+47796
+47797
+47798
+47799
+47800
+47801
+47802
+47803
+47804
+47805
+47806
+47807
+47808
+47809
+47810
+47811
+47812
+47813
+47814
+47815
+47816
+47817
+47818
+47819
+47820
+47821
+47822
+47823
+47824
+47825
+47826
+47827
+47828
+47829
+47830
+47831
+47832
+47833
+47834
+47835
+47836
+47837
+47838
+47839
+47840
+47841
+47842
+47843
+47844
+47845
+47846
+47847
+47848
+47849
+47850
+47851
+47852
+47853
+47854
+47855
+47856
+47857
+47858
+47859
+47860
+47861
+47862
+47863
+47864
+47865
+47866
+47867
+47868
+47869
+47870
+47871
+47872
+47873
+47874
+47875
+47876
+47877
+47878
+47879
+47880
+47881
+47882
+47883
+47884
+47885
+47886
+47887
+47888
+47889
+47890
+47891
+47892
+47893
+47894
+47895
+47896
+47897
+47898
+47899
+47900
+47901
+47902
+47903
+47904
+47905
+47906
+47907
+47908
+47909
+47910
+47911
+47912
+47913
+47914
+47915
+47916
+47917
+47918
+47919
+47920
+47921
+47922
+47923
+47924
+47925
+47926
+47927
+47928
+47929
+47930
+47931
+47932
+47933
+47934
+47935
+47936
+47937
+47938
+47939
+47940
+47941
+47942
+47943
+47944
+47945
+47946
+47947
+47948
+47949
+47950
+47951
+47952
+47953
+47954
+47955
+47956
+47957
+47958
+47959
+47960
+47961
+47962
+47963
+47964
+47965
+47966
+47967
+47968
+47969
+47970
+47971
+47972
+47973
+47974
+47975
+47976
+47977
+47978
+47979
+47980
+47981
+47982
+47983
+47984
+47985
+47986
+47987
+47988
+47989
+47990
+47991
+47992
+47993
+47994
+47995
+47996
+47997
+47998
+47999
+48000
+48001
+48002
+48003
+48004
+48005
+48006
+48007
+48008
+48009
+48010
+48011
+48012
+48013
+48014
+48015
+48016
+48017
+48018
+48019
+48020
+48021
+48022
+48023
+48024
+48025
+48026
+48027
+48028
+48029
+48030
+48031
+48032
+48033
+48034
+48035
+48036
+48037
+48038
+48039
+48040
+48041
+48042
+48043
+48044
+48045
+48046
+48047
+48048
+48049
+48050
+48051
+48052
+48053
+48054
+48055
+48056
+48057
+48058
+48059
+48060
+48061
+48062
+48063
+48064
+48065
+48066
+48067
+48068
+48069
+48070
+48071
+48072
+48073
+48074
+48075
+48076
+48077
+48078
+48079
+48080
+48081
+48082
+48083
+48084
+48085
+48086
+48087
+48088
+48089
+48090
+48091
+48092
+48093
+48094
+48095
+48096
+48097
+48098
+48099
+48100
+48101
+48102
+48103
+48104
+48105
+48106
+48107
+48108
+48109
+48110
+48111
+48112
+48113
+48114
+48115
+48116
+48117
+48118
+48119
+48120
+48121
+48122
+48123
+48124
+48125
+48126
+48127
+48128
+48129
+48130
+48131
+48132
+48133
+48134
+48135
+48136
+48137
+48138
+48139
+48140
+48141
+48142
+48143
+48144
+48145
+48146
+48147
+48148
+48149
+48150
+48151
+48152
+48153
+48154
+48155
+48156
+48157
+48158
+48159
+48160
+48161
+48162
+48163
+48164
+48165
+48166
+48167
+48168
+48169
+48170
+48171
+48172
+48173
+48174
+48175
+48176
+48177
+48178
+48179
+48180
+48181
+48182
+48183
+48184
+48185
+48186
+48187
+48188
+48189
+48190
+48191
+48192
+48193
+48194
+48195
+48196
+48197
+48198
+48199
+48200
+48201
+48202
+48203
+48204
+48205
+48206
+48207
+48208
+48209
+48210
+48211
+48212
+48213
+48214
+48215
+48216
+48217
+48218
+48219
+48220
+48221
+48222
+48223
+48224
+48225
+48226
+48227
+48228
+48229
+48230
+48231
+48232
+48233
+48234
+48235
+48236
+48237
+48238
+48239
+48240
+48241
+48242
+48243
+48244
+48245
+48246
+48247
+48248
+48249
+48250
+48251
+48252
+48253
+48254
+48255
+48256
+48257
+48258
+48259
+48260
+48261
+48262
+48263
+48264
+48265
+48266
+48267
+48268
+48269
+48270
+48271
+48272
+48273
+48274
+48275
+48276
+48277
+48278
+48279
+48280
+48281
+48282
+48283
+48284
+48285
+48286
+48287
+48288
+48289
+48290
+48291
+48292
+48293
+48294
+48295
+48296
+48297
+48298
+48299
+48300
+48301
+48302
+48303
+48304
+48305
+48306
+48307
+48308
+48309
+48310
+48311
+48312
+48313
+48314
+48315
+48316
+48317
+48318
+48319
+48320
+48321
+48322
+48323
+48324
+48325
+48326
+48327
+48328
+48329
+48330
+48331
+48332
+48333
+48334
+48335
+48336
+48337
+48338
+48339
+48340
+48341
+48342
+48343
+48344
+48345
+48346
+48347
+48348
+48349
+48350
+48351
+48352
+48353
+48354
+48355
+48356
+48357
+48358
+48359
+48360
+48361
+48362
+48363
+48364
+48365
+48366
+48367
+48368
+48369
+48370
+48371
+48372
+48373
+48374
+48375
+48376
+48377
+48378
+48379
+48380
+48381
+48382
+48383
+48384
+48385
+48386
+48387
+48388
+48389
+48390
+48391
+48392
+48393
+48394
+48395
+48396
+48397
+48398
+48399
+48400
+48401
+48402
+48403
+48404
+48405
+48406
+48407
+48408
+48409
+48410
+48411
+48412
+48413
+48414
+48415
+48416
+48417
+48418
+48419
+48420
+48421
+48422
+48423
+48424
+48425
+48426
+48427
+48428
+48429
+48430
+48431
+48432
+48433
+48434
+48435
+48436
+48437
+48438
+48439
+48440
+48441
+48442
+48443
+48444
+48445
+48446
+48447
+48448
+48449
+48450
+48451
+48452
+48453
+48454
+48455
+48456
+48457
+48458
+48459
+48460
+48461
+48462
+48463
+48464
+48465
+48466
+48467
+48468
+48469
+48470
+48471
+48472
+48473
+48474
+48475
+48476
+48477
+48478
+48479
+48480
+48481
+48482
+48483
+48484
+48485
+48486
+48487
+48488
+48489
+48490
+48491
+48492
+48493
+48494
+48495
+48496
+48497
+48498
+48499
+48500
+48501
+48502
+48503
+48504
+48505
+48506
+48507
+48508
+48509
+48510
+48511
+48512
+48513
+48514
+48515
+48516
+48517
+48518
+48519
+48520
+48521
+48522
+48523
+48524
+48525
+48526
+48527
+48528
+48529
+48530
+48531
+48532
+48533
+48534
+48535
+48536
+48537
+48538
+48539
+48540
+48541
+48542
+48543
+48544
+48545
+48546
+48547
+48548
+48549
+48550
+48551
+48552
+48553
+48554
+48555
+48556
+48557
+48558
+48559
+48560
+48561
+48562
+48563
+48564
+48565
+48566
+48567
+48568
+48569
+48570
+48571
+48572
+48573
+48574
+48575
+48576
+48577
+48578
+48579
+48580
+48581
+48582
+48583
+48584
+48585
+48586
+48587
+48588
+48589
+48590
+48591
+48592
+48593
+48594
+48595
+48596
+48597
+48598
+48599
+48600
+48601
+48602
+48603
+48604
+48605
+48606
+48607
+48608
+48609
+48610
+48611
+48612
+48613
+48614
+48615
+48616
+48617
+48618
+48619
+48620
+48621
+48622
+48623
+48624
+48625
+48626
+48627
+48628
+48629
+48630
+48631
+48632
+48633
+48634
+48635
+48636
+48637
+48638
+48639
+48640
+48641
+48642
+48643
+48644
+48645
+48646
+48647
+48648
+48649
+48650
+48651
+48652
+48653
+48654
+48655
+48656
+48657
+48658
+48659
+48660
+48661
+48662
+48663
+48664
+48665
+48666
+48667
+48668
+48669
+48670
+48671
+48672
+48673
+48674
+48675
+48676
+48677
+48678
+48679
+48680
+48681
+48682
+48683
+48684
+48685
+48686
+48687
+48688
+48689
+48690
+48691
+48692
+48693
+48694
+48695
+48696
+48697
+48698
+48699
+48700
+48701
+48702
+48703
+48704
+48705
+48706
+48707
+48708
+48709
+48710
+48711
+48712
+48713
+48714
+48715
+48716
+48717
+48718
+48719
+48720
+48721
+48722
+48723
+48724
+48725
+48726
+48727
+48728
+48729
+48730
+48731
+48732
+48733
+48734
+48735
+48736
+48737
+48738
+48739
+48740
+48741
+48742
+48743
+48744
+48745
+48746
+48747
+48748
+48749
+48750
+48751
+48752
+48753
+48754
+48755
+48756
+48757
+48758
+48759
+48760
+48761
+48762
+48763
+48764
+48765
+48766
+48767
+48768
+48769
+48770
+48771
+48772
+48773
+48774
+48775
+48776
+48777
+48778
+48779
+48780
+48781
+48782
+48783
+48784
+48785
+48786
+48787
+48788
+48789
+48790
+48791
+48792
+48793
+48794
+48795
+48796
+48797
+48798
+48799
+48800
+48801
+48802
+48803
+48804
+48805
+48806
+48807
+48808
+48809
+48810
+48811
+48812
+48813
+48814
+48815
+48816
+48817
+48818
+48819
+48820
+48821
+48822
+48823
+48824
+48825
+48826
+48827
+48828
+48829
+48830
+48831
+48832
+48833
+48834
+48835
+48836
+48837
+48838
+48839
+48840
+48841
+48842
+48843
+48844
+48845
+48846
+48847
+48848
+48849
+48850
+48851
+48852
+48853
+48854
+48855
+48856
+48857
+48858
+48859
+48860
+48861
+48862
+48863
+48864
+48865
+48866
+48867
+48868
+48869
+48870
+48871
+48872
+48873
+48874
+48875
+48876
+48877
+48878
+48879
+48880
+48881
+48882
+48883
+48884
+48885
+48886
+48887
+48888
+48889
+48890
+48891
+48892
+48893
+48894
+48895
+48896
+48897
+48898
+48899
+48900
+48901
+48902
+48903
+48904
+48905
+48906
+48907
+48908
+48909
+48910
+48911
+48912
+48913
+48914
+48915
+48916
+48917
+48918
+48919
+48920
+48921
+48922
+48923
+48924
+48925
+48926
+48927
+48928
+48929
+48930
+48931
+48932
+48933
+48934
+48935
+48936
+48937
+48938
+48939
+48940
+48941
+48942
+48943
+48944
+48945
+48946
+48947
+48948
+48949
+48950
+48951
+48952
+48953
+48954
+48955
+48956
+48957
+48958
+48959
+48960
+48961
+48962
+48963
+48964
+48965
+48966
+48967
+48968
+48969
+48970
+48971
+48972
+48973
+48974
+48975
+48976
+48977
+48978
+48979
+48980
+48981
+48982
+48983
+48984
+48985
+48986
+48987
+48988
+48989
+48990
+48991
+48992
+48993
+48994
+48995
+48996
+48997
+48998
+48999
+49000
+49001
+49002
+49003
+49004
+49005
+49006
+49007
+49008
+49009
+49010
+49011
+49012
+49013
+49014
+49015
+49016
+49017
+49018
+49019
+49020
+49021
+49022
+49023
+49024
+49025
+49026
+49027
+49028
+49029
+49030
+49031
+49032
+49033
+49034
+49035
+49036
+49037
+49038
+49039
+49040
+49041
+49042
+49043
+49044
+49045
+49046
+49047
+49048
+49049
+49050
+49051
+49052
+49053
+49054
+49055
+49056
+49057
+49058
+49059
+49060
+49061
+49062
+49063
+49064
+49065
+49066
+49067
+49068
+49069
+49070
+49071
+49072
+49073
+49074
+49075
+49076
+49077
+49078
+49079
+49080
+49081
+49082
+49083
+49084
+49085
+49086
+49087
+49088
+49089
+49090
+49091
+49092
+49093
+49094
+49095
+49096
+49097
+49098
+49099
+49100
+49101
+49102
+49103
+49104
+49105
+49106
+49107
+49108
+49109
+49110
+49111
+49112
+49113
+49114
+49115
+49116
+49117
+49118
+49119
+49120
+49121
+49122
+49123
+49124
+49125
+49126
+49127
+49128
+49129
+49130
+49131
+49132
+49133
+49134
+49135
+49136
+49137
+49138
+49139
+49140
+49141
+49142
+49143
+49144
+49145
+49146
+49147
+49148
+49149
+49150
+49151
+49152
+49153
+49154
+49155
+49156
+49157
+49158
+49159
+49160
+49161
+49162
+49163
+49164
+49165
+49166
+49167
+49168
+49169
+49170
+49171
+49172
+49173
+49174
+49175
+49176
+49177
+49178
+49179
+49180
+49181
+49182
+49183
+49184
+49185
+49186
+49187
+49188
+49189
+49190
+49191
+49192
+49193
+49194
+49195
+49196
+49197
+49198
+49199
+49200
+49201
+49202
+49203
+49204
+49205
+49206
+49207
+49208
+49209
+49210
+49211
+49212
+49213
+49214
+49215
+49216
+49217
+49218
+49219
+49220
+49221
+49222
+49223
+49224
+49225
+49226
+49227
+49228
+49229
+49230
+49231
+49232
+49233
+49234
+49235
+49236
+49237
+49238
+49239
+49240
+49241
+49242
+49243
+49244
+49245
+49246
+49247
+49248
+49249
+49250
+49251
+49252
+49253
+49254
+49255
+49256
+49257
+49258
+49259
+49260
+49261
+49262
+49263
+49264
+49265
+49266
+49267
+49268
+49269
+49270
+49271
+49272
+49273
+49274
+49275
+49276
+49277
+49278
+49279
+49280
+49281
+49282
+49283
+49284
+49285
+49286
+49287
+49288
+49289
+49290
+49291
+49292
+49293
+49294
+49295
+49296
+49297
+49298
+49299
+49300
+49301
+49302
+49303
+49304
+49305
+49306
+49307
+49308
+49309
+49310
+49311
+49312
+49313
+49314
+49315
+49316
+49317
+49318
+49319
+49320
+49321
+49322
+49323
+49324
+49325
+49326
+49327
+49328
+49329
+49330
+49331
+49332
+49333
+49334
+49335
+49336
+49337
+49338
+49339
+49340
+49341
+49342
+49343
+49344
+49345
+49346
+49347
+49348
+49349
+49350
+49351
+49352
+49353
+49354
+49355
+49356
+49357
+49358
+49359
+49360
+49361
+49362
+49363
+49364
+49365
+49366
+49367
+49368
+49369
+49370
+49371
+49372
+49373
+49374
+49375
+49376
+49377
+49378
+49379
+49380
+49381
+49382
+49383
+49384
+49385
+49386
+49387
+49388
+49389
+49390
+49391
+49392
+49393
+49394
+49395
+49396
+49397
+49398
+49399
+49400
+49401
+49402
+49403
+49404
+49405
+49406
+49407
+49408
+49409
+49410
+49411
+49412
+49413
+49414
+49415
+49416
+49417
+49418
+49419
+49420
+49421
+49422
+49423
+49424
+49425
+49426
+49427
+49428
+49429
+49430
+49431
+49432
+49433
+49434
+49435
+49436
+49437
+49438
+49439
+49440
+49441
+49442
+49443
+49444
+49445
+49446
+49447
+49448
+49449
+49450
+49451
+49452
+49453
+49454
+49455
+49456
+49457
+49458
+49459
+49460
+49461
+49462
+49463
+49464
+49465
+49466
+49467
+49468
+49469
+49470
+49471
+49472
+49473
+49474
+49475
+49476
+49477
+49478
+49479
+49480
+49481
+49482
+49483
+49484
+49485
+49486
+49487
+49488
+49489
+49490
+49491
+49492
+49493
+49494
+49495
+49496
+49497
+49498
+49499
+49500
+49501
+49502
+49503
+49504
+49505
+49506
+49507
+49508
+49509
+49510
+49511
+49512
+49513
+49514
+49515
+49516
+49517
+49518
+49519
+49520
+49521
+49522
+49523
+49524
+49525
+49526
+49527
+49528
+49529
+49530
+49531
+49532
+49533
+49534
+49535
+49536
+49537
+49538
+49539
+49540
+49541
+49542
+49543
+49544
+49545
+49546
+49547
+49548
+49549
+49550
+49551
+49552
+49553
+49554
+49555
+49556
+49557
+49558
+49559
+49560
+49561
+49562
+49563
+49564
+49565
+49566
+49567
+49568
+49569
+49570
+49571
+49572
+49573
+49574
+49575
+49576
+49577
+49578
+49579
+49580
+49581
+49582
+49583
+49584
+49585
+49586
+49587
+49588
+49589
+49590
+49591
+49592
+49593
+49594
+49595
+49596
+49597
+49598
+49599
+49600
+49601
+49602
+49603
+49604
+49605
+49606
+49607
+49608
+49609
+49610
+49611
+49612
+49613
+49614
+49615
+49616
+49617
+49618
+49619
+49620
+49621
+49622
+49623
+49624
+49625
+49626
+49627
+49628
+49629
+49630
+49631
+49632
+49633
+49634
+49635
+49636
+49637
+49638
+49639
+49640
+49641
+49642
+49643
+49644
+49645
+49646
+49647
+49648
+49649
+49650
+49651
+49652
+49653
+49654
+49655
+49656
+49657
+49658
+49659
+49660
+49661
+49662
+49663
+49664
+49665
+49666
+49667
+49668
+49669
+49670
+49671
+49672
+49673
+49674
+49675
+49676
+49677
+49678
+49679
+49680
+49681
+49682
+49683
+49684
+49685
+49686
+49687
+49688
+49689
+49690
+49691
+49692
+49693
+49694
+49695
+49696
+49697
+49698
+49699
+49700
+49701
+49702
+49703
+49704
+49705
+49706
+49707
+49708
+49709
+49710
+49711
+49712
+49713
+49714
+49715
+49716
+49717
+49718
+49719
+49720
+49721
+49722
+49723
+49724
+49725
+49726
+49727
+49728
+49729
+49730
+49731
+49732
+49733
+49734
+49735
+49736
+49737
+49738
+49739
+49740
+49741
+49742
+49743
+49744
+49745
+49746
+49747
+49748
+49749
+49750
+49751
+49752
+49753
+49754
+49755
+49756
+49757
+49758
+49759
+49760
+49761
+49762
+49763
+49764
+49765
+49766
+49767
+49768
+49769
+49770
+49771
+49772
+49773
+49774
+49775
+49776
+49777
+49778
+49779
+49780
+49781
+49782
+49783
+49784
+49785
+49786
+49787
+49788
+49789
+49790
+49791
+49792
+49793
+49794
+49795
+49796
+49797
+49798
+49799
+49800
+49801
+49802
+49803
+49804
+49805
+49806
+49807
+49808
+49809
+49810
+49811
+49812
+49813
+49814
+49815
+49816
+49817
+49818
+49819
+49820
+49821
+49822
+49823
+49824
+49825
+49826
+49827
+49828
+49829
+49830
+49831
+49832
+49833
+49834
+49835
+49836
+49837
+49838
+49839
+49840
+49841
+49842
+49843
+49844
+49845
+49846
+49847
+49848
+49849
+49850
+49851
+49852
+49853
+49854
+49855
+49856
+49857
+49858
+49859
+49860
+49861
+49862
+49863
+49864
+49865
+49866
+49867
+49868
+49869
+49870
+49871
+49872
+49873
+49874
+49875
+49876
+49877
+49878
+49879
+49880
+49881
+49882
+49883
+49884
+49885
+49886
+49887
+49888
+49889
+49890
+49891
+49892
+49893
+49894
+49895
+49896
+49897
+49898
+49899
+49900
+49901
+49902
+49903
+49904
+49905
+49906
+49907
+49908
+49909
+49910
+49911
+49912
+49913
+49914
+49915
+49916
+49917
+49918
+49919
+49920
+49921
+49922
+49923
+49924
+49925
+49926
+49927
+49928
+49929
+49930
+49931
+49932
+49933
+49934
+49935
+49936
+49937
+49938
+49939
+49940
+49941
+49942
+49943
+49944
+49945
+49946
+49947
+49948
+49949
+49950
+49951
+49952
+49953
+49954
+49955
+49956
+49957
+49958
+49959
+49960
+49961
+49962
+49963
+49964
+49965
+49966
+49967
+49968
+49969
+49970
+49971
+49972
+49973
+49974
+49975
+49976
+49977
+49978
+49979
+49980
+49981
+49982
+49983
+49984
+49985
+49986
+49987
+49988
+49989
+49990
+49991
+49992
+49993
+49994
+49995
+49996
+49997
+49998
+49999
+50000
+50001
+50002
+50003
+50004
+50005
+50006
+50007
+50008
+50009
+50010
+50011
+50012
+50013
+50014
+50015
+50016
+50017
+50018
+50019
+50020
+50021
+50022
+50023
+50024
+50025
+50026
+50027
+50028
+50029
+50030
+50031
+50032
+50033
+50034
+50035
+50036
+50037
+50038
+50039
+50040
+50041
+50042
+50043
+50044
+50045
+50046
+50047
+50048
+50049
+50050
+50051
+50052
+50053
+50054
+50055
+50056
+50057
+50058
+50059
+50060
+50061
+50062
+50063
+50064
+50065
+50066
+50067
+50068
+50069
+50070
+50071
+50072
+50073
+50074
+50075
+50076
+50077
+50078
+50079
+50080
+50081
+50082
+50083
+50084
+50085
+50086
+50087
+50088
+50089
+50090
+50091
+50092
+50093
+50094
+50095
+50096
+50097
+50098
+50099
+50100
+50101
+50102
+50103
+50104
+50105
+50106
+50107
+50108
+50109
+50110
+50111
+50112
+50113
+50114
+50115
+50116
+50117
+50118
+50119
+50120
+50121
+50122
+50123
+50124
+50125
+50126
+50127
+50128
+50129
+50130
+50131
+50132
+50133
+50134
+50135
+50136
+50137
+50138
+50139
+50140
+50141
+50142
+50143
+50144
+50145
+50146
+50147
+50148
+50149
+50150
+50151
+50152
+50153
+50154
+50155
+50156
+50157
+50158
+50159
+50160
+50161
+50162
+50163
+50164
+50165
+50166
+50167
+50168
+50169
+50170
+50171
+50172
+50173
+50174
+50175
+50176
+50177
+50178
+50179
+50180
+50181
+50182
+50183
+50184
+50185
+50186
+50187
+50188
+50189
+50190
+50191
+50192
+50193
+50194
+50195
+50196
+50197
+50198
+50199
+50200
+50201
+50202
+50203
+50204
+50205
+50206
+50207
+50208
+50209
+50210
+50211
+50212
+50213
+50214
+50215
+50216
+50217
+50218
+50219
+50220
+50221
+50222
+50223
+50224
+50225
+50226
+50227
+50228
+50229
+50230
+50231
+50232
+50233
+50234
+50235
+50236
+50237
+50238
+50239
+50240
+50241
+50242
+50243
+50244
+50245
+50246
+50247
+50248
+50249
+50250
+50251
+50252
+50253
+50254
+50255
+50256
+50257
+50258
+50259
+50260
+50261
+50262
+50263
+50264
+50265
+50266
+50267
+50268
+50269
+50270
+50271
+50272
+50273
+50274
+50275
+50276
+50277
+50278
+50279
+50280
+50281
+50282
+50283
+50284
+50285
+50286
+50287
+50288
+50289
+50290
+50291
+50292
+50293
+50294
+50295
+50296
+50297
+50298
+50299
+50300
+50301
+50302
+50303
+50304
+50305
+50306
+50307
+50308
+50309
+50310
+50311
+50312
+50313
+50314
+50315
+50316
+50317
+50318
+50319
+50320
+50321
+50322
+50323
+50324
+50325
+50326
+50327
+50328
+50329
+50330
+50331
+50332
+50333
+50334
+50335
+50336
+50337
+50338
+50339
+50340
+50341
+50342
+50343
+50344
+50345
+50346
+50347
+50348
+50349
+50350
+50351
+50352
+50353
+50354
+50355
+50356
+50357
+50358
+50359
+50360
+50361
+50362
+50363
+50364
+50365
+50366
+50367
+50368
+50369
+50370
+50371
+50372
+50373
+50374
+50375
+50376
+50377
+50378
+50379
+50380
+50381
+50382
+50383
+50384
+50385
+50386
+50387
+50388
+50389
+50390
+50391
+50392
+50393
+50394
+50395
+50396
+50397
+50398
+50399
+50400
+50401
+50402
+50403
+50404
+50405
+50406
+50407
+50408
+50409
+50410
+50411
+50412
+50413
+50414
+50415
+50416
+50417
+50418
+50419
+50420
+50421
+50422
+50423
+50424
+50425
+50426
+50427
+50428
+50429
+50430
+50431
+50432
+50433
+50434
+50435
+50436
+50437
+50438
+50439
+50440
+50441
+50442
+50443
+50444
+50445
+50446
+50447
+50448
+50449
+50450
+50451
+50452
+50453
+50454
+50455
+50456
+50457
+50458
+50459
+50460
+50461
+50462
+50463
+50464
+50465
+50466
+50467
+50468
+50469
+50470
+50471
+50472
+50473
+50474
+50475
+50476
+50477
+50478
+50479
+50480
+50481
+50482
+50483
+50484
+50485
+50486
+50487
+50488
+50489
+50490
+50491
+50492
+50493
+50494
+50495
+50496
+50497
+50498
+50499
+50500
+50501
+50502
+50503
+50504
+50505
+50506
+50507
+50508
+50509
+50510
+50511
+50512
+50513
+50514
+50515
+50516
+50517
+50518
+50519
+50520
+50521
+50522
+50523
+50524
+50525
+50526
+50527
+50528
+50529
+50530
+50531
+50532
+50533
+50534
+50535
+50536
+50537
+50538
+50539
+50540
+50541
+50542
+50543
+50544
+50545
+50546
+50547
+50548
+50549
+50550
+50551
+50552
+50553
+50554
+50555
+50556
+50557
+50558
+50559
+50560
+50561
+50562
+50563
+50564
+50565
+50566
+50567
+50568
+50569
+50570
+50571
+50572
+50573
+50574
+50575
+50576
+50577
+50578
+50579
+50580
+50581
+50582
+50583
+50584
+50585
+50586
+50587
+50588
+50589
+50590
+50591
+50592
+50593
+50594
+50595
+50596
+50597
+50598
+50599
+50600
+50601
+50602
+50603
+50604
+50605
+50606
+50607
+50608
+50609
+50610
+50611
+50612
+50613
+50614
+50615
+50616
+50617
+50618
+50619
+50620
+50621
+50622
+50623
+50624
+50625
+50626
+50627
+50628
+50629
+50630
+50631
+50632
+50633
+50634
+50635
+50636
+50637
+50638
+50639
+50640
+50641
+50642
+50643
+50644
+50645
+50646
+50647
+50648
+50649
+50650
+50651
+50652
+50653
+50654
+50655
+50656
+50657
+50658
+50659
+50660
+50661
+50662
+50663
+50664
+50665
+50666
+50667
+50668
+50669
+50670
+50671
+50672
+50673
+50674
+50675
+50676
+50677
+50678
+50679
+50680
+50681
+50682
+50683
+50684
+50685
+50686
+50687
+50688
+50689
+50690
+50691
+50692
+50693
+50694
+50695
+50696
+50697
+50698
+50699
+50700
+50701
+50702
+50703
+50704
+50705
+50706
+50707
+50708
+50709
+50710
+50711
+50712
+50713
+50714
+50715
+50716
+50717
+50718
+50719
+50720
+50721
+50722
+50723
+50724
+50725
+50726
+50727
+50728
+50729
+50730
+50731
+50732
+50733
+50734
+50735
+50736
+50737
+50738
+50739
+50740
+50741
+50742
+50743
+50744
+50745
+50746
+50747
+50748
+50749
+50750
+50751
+50752
+50753
+50754
+50755
+50756
+50757
+50758
+50759
+50760
+50761
+50762
+50763
+50764
+50765
+50766
+50767
+50768
+50769
+50770
+50771
+50772
+50773
+50774
+50775
+50776
+50777
+50778
+50779
+50780
+50781
+50782
+50783
+50784
+50785
+50786
+50787
+50788
+50789
+50790
+50791
+50792
+50793
+50794
+50795
+50796
+50797
+50798
+50799
+50800
+50801
+50802
+50803
+50804
+50805
+50806
+50807
+50808
+50809
+50810
+50811
+50812
+50813
+50814
+50815
+50816
+50817
+50818
+50819
+50820
+50821
+50822
+50823
+50824
+50825
+50826
+50827
+50828
+50829
+50830
+50831
+50832
+50833
+50834
+50835
+50836
+50837
+50838
+50839
+50840
+50841
+50842
+50843
+50844
+50845
+50846
+50847
+50848
+50849
+50850
+50851
+50852
+50853
+50854
+50855
+50856
+50857
+50858
+50859
+50860
+50861
+50862
+50863
+50864
+50865
+50866
+50867
+50868
+50869
+50870
+50871
+50872
+50873
+50874
+50875
+50876
+50877
+50878
+50879
+50880
+50881
+50882
+50883
+50884
+50885
+50886
+50887
+50888
+50889
+50890
+50891
+50892
+50893
+50894
+50895
+50896
+50897
+50898
+50899
+50900
+50901
+50902
+50903
+50904
+50905
+50906
+50907
+50908
+50909
+50910
+50911
+50912
+50913
+50914
+50915
+50916
+50917
+50918
+50919
+50920
+50921
+50922
+50923
+50924
+50925
+50926
+50927
+50928
+50929
+50930
+50931
+50932
+50933
+50934
+50935
+50936
+50937
+50938
+50939
+50940
+50941
+50942
+50943
+50944
+50945
+50946
+50947
+50948
+50949
+50950
+50951
+50952
+50953
+50954
+50955
+50956
+50957
+50958
+50959
+50960
+50961
+50962
+50963
+50964
+50965
+50966
+50967
+50968
+50969
+50970
+50971
+50972
+50973
+50974
+50975
+50976
+50977
+50978
+50979
+50980
+50981
+50982
+50983
+50984
+50985
+50986
+50987
+50988
+50989
+50990
+50991
+50992
+50993
+50994
+50995
+50996
+50997
+50998
+50999
+51000
+51001
+51002
+51003
+51004
+51005
+51006
+51007
+51008
+51009
+51010
+51011
+51012
+51013
+51014
+51015
+51016
+51017
+51018
+51019
+51020
+51021
+51022
+51023
+51024
+51025
+51026
+51027
+51028
+51029
+51030
+51031
+51032
+51033
+51034
+51035
+51036
+51037
+51038
+51039
+51040
+51041
+51042
+51043
+51044
+51045
+51046
+51047
+51048
+51049
+51050
+51051
+51052
+51053
+51054
+51055
+51056
+51057
+51058
+51059
+51060
+51061
+51062
+51063
+51064
+51065
+51066
+51067
+51068
+51069
+51070
+51071
+51072
+51073
+51074
+51075
+51076
+51077
+51078
+51079
+51080
+51081
+51082
+51083
+51084
+51085
+51086
+51087
+51088
+51089
+51090
+51091
+51092
+51093
+51094
+51095
+51096
+51097
+51098
+51099
+51100
+51101
+51102
+51103
+51104
+51105
+51106
+51107
+51108
+51109
+51110
+51111
+51112
+51113
+51114
+51115
+51116
+51117
+51118
+51119
+51120
+51121
+51122
+51123
+51124
+51125
+51126
+51127
+51128
+51129
+51130
+51131
+51132
+51133
+51134
+51135
+51136
+51137
+51138
+51139
+51140
+51141
+51142
+51143
+51144
+51145
+51146
+51147
+51148
+51149
+51150
+51151
+51152
+51153
+51154
+51155
+51156
+51157
+51158
+51159
+51160
+51161
+51162
+51163
+51164
+51165
+51166
+51167
+51168
+51169
+51170
+51171
+51172
+51173
+51174
+51175
+51176
+51177
+51178
+51179
+51180
+51181
+51182
+51183
+51184
+51185
+51186
+51187
+51188
+51189
+51190
+51191
+51192
+51193
+51194
+51195
+51196
+51197
+51198
+51199
+51200
+51201
+51202
+51203
+51204
+51205
+51206
+51207
+51208
+51209
+51210
+51211
+51212
+51213
+51214
+51215
+51216
+51217
+51218
+51219
+51220
+51221
+51222
+51223
+51224
+51225
+51226
+51227
+51228
+51229
+51230
+51231
+51232
+51233
+51234
+51235
+51236
+51237
+51238
+51239
+51240
+51241
+51242
+51243
+51244
+51245
+51246
+51247
+51248
+51249
+51250
+51251
+51252
+51253
+51254
+51255
+51256
+51257
+51258
+51259
+51260
+51261
+51262
+51263
+51264
+51265
+51266
+51267
+51268
+51269
+51270
+51271
+51272
+51273
+51274
+51275
+51276
+51277
+51278
+51279
+51280
+51281
+51282
+51283
+51284
+51285
+51286
+51287
+51288
+51289
+51290
+51291
+51292
+51293
+51294
+51295
+51296
+51297
+51298
+51299
+51300
+51301
+51302
+51303
+51304
+51305
+51306
+51307
+51308
+51309
+51310
+51311
+51312
+51313
+51314
+51315
+51316
+51317
+51318
+51319
+51320
+51321
+51322
+51323
+51324
+51325
+51326
+51327
+51328
+51329
+51330
+51331
+51332
+51333
+51334
+51335
+51336
+51337
+51338
+51339
+51340
+51341
+51342
+51343
+51344
+51345
+51346
+51347
+51348
+51349
+51350
+51351
+51352
+51353
+51354
+51355
+51356
+51357
+51358
+51359
+51360
+51361
+51362
+51363
+51364
+51365
+51366
+51367
+51368
+51369
+51370
+51371
+51372
+51373
+51374
+51375
+51376
+51377
+51378
+51379
+51380
+51381
+51382
+51383
+51384
+51385
+51386
+51387
+51388
+51389
+51390
+51391
+51392
+51393
+51394
+51395
+51396
+51397
+51398
+51399
+51400
+51401
+51402
+51403
+51404
+51405
+51406
+51407
+51408
+51409
+51410
+51411
+51412
+51413
+51414
+51415
+51416
+51417
+51418
+51419
+51420
+51421
+51422
+51423
+51424
+51425
+51426
+51427
+51428
+51429
+51430
+51431
+51432
+51433
+51434
+51435
+51436
+51437
+51438
+51439
+51440
+51441
+51442
+51443
+51444
+51445
+51446
+51447
+51448
+51449
+51450
+51451
+51452
+51453
+51454
+51455
+51456
+51457
+51458
+51459
+51460
+51461
+51462
+51463
+51464
+51465
+51466
+51467
+51468
+51469
+51470
+51471
+51472
+51473
+51474
+51475
+51476
+51477
+51478
+51479
+51480
+51481
+51482
+51483
+51484
+51485
+51486
+51487
+51488
+51489
+51490
+51491
+51492
+51493
+51494
+51495
+51496
+51497
+51498
+51499
+51500
+51501
+51502
+51503
+51504
+51505
+51506
+51507
+51508
+51509
+51510
+51511
+51512
+51513
+51514
+51515
+51516
+51517
+51518
+51519
+51520
+51521
+51522
+51523
+51524
+51525
+51526
+51527
+51528
+51529
+51530
+51531
+51532
+51533
+51534
+51535
+51536
+51537
+51538
+51539
+51540
+51541
+51542
+51543
+51544
+51545
+51546
+51547
+51548
+51549
+51550
+51551
+51552
+51553
+51554
+51555
+51556
+51557
+51558
+51559
+51560
+51561
+51562
+51563
+51564
+51565
+51566
+51567
+51568
+51569
+51570
+51571
+51572
+51573
+51574
+51575
+51576
+51577
+51578
+51579
+51580
+51581
+51582
+51583
+51584
+51585
+51586
+51587
+51588
+51589
+51590
+51591
+51592
+51593
+51594
+51595
+51596
+51597
+51598
+51599
+51600
+51601
+51602
+51603
+51604
+51605
+51606
+51607
+51608
+51609
+51610
+51611
+51612
+51613
+51614
+51615
+51616
+51617
+51618
+51619
+51620
+51621
+51622
+51623
+51624
+51625
+51626
+51627
+51628
+51629
+51630
+51631
+51632
+51633
+51634
+51635
+51636
+51637
+51638
+51639
+51640
+51641
+51642
+51643
+51644
+51645
+51646
+51647
+51648
+51649
+51650
+51651
+51652
+51653
+51654
+51655
+51656
+51657
+51658
+51659
+51660
+51661
+51662
+51663
+51664
+51665
+51666
+51667
+51668
+51669
+51670
+51671
+51672
+51673
+51674
+51675
+51676
+51677
+51678
+51679
+51680
+51681
+51682
+51683
+51684
+51685
+51686
+51687
+51688
+51689
+51690
+51691
+51692
+51693
+51694
+51695
+51696
+51697
+51698
+51699
+51700
+51701
+51702
+51703
+51704
+51705
+51706
+51707
+51708
+51709
+51710
+51711
+51712
+51713
+51714
+51715
+51716
+51717
+51718
+51719
+51720
+51721
+51722
+51723
+51724
+51725
+51726
+51727
+51728
+51729
+51730
+51731
+51732
+51733
+51734
+51735
+51736
+51737
+51738
+51739
+51740
+51741
+51742
+51743
+51744
+51745
+51746
+51747
+51748
+51749
+51750
+51751
+51752
+51753
+51754
+51755
+51756
+51757
+51758
+51759
+51760
+51761
+51762
+51763
+51764
+51765
+51766
+51767
+51768
+51769
+51770
+51771
+51772
+51773
+51774
+51775
+51776
+51777
+51778
+51779
+51780
+51781
+51782
+51783
+51784
+51785
+51786
+51787
+51788
+51789
+51790
+51791
+51792
+51793
+51794
+51795
+51796
+51797
+51798
+51799
+51800
+51801
+51802
+51803
+51804
+51805
+51806
+51807
+51808
+51809
+51810
+51811
+51812
+51813
+51814
+51815
+51816
+51817
+51818
+51819
+51820
+51821
+51822
+51823
+51824
+51825
+51826
+51827
+51828
+51829
+51830
+51831
+51832
+51833
+51834
+51835
+51836
+51837
+51838
+51839
+51840
+51841
+51842
+51843
+51844
+51845
+51846
+51847
+51848
+51849
+51850
+51851
+51852
+51853
+51854
+51855
+51856
+51857
+51858
+51859
+51860
+51861
+51862
+51863
+51864
+51865
+51866
+51867
+51868
+51869
+51870
+51871
+51872
+51873
+51874
+51875
+51876
+51877
+51878
+51879
+51880
+51881
+51882
+51883
+51884
+51885
+51886
+51887
+51888
+51889
+51890
+51891
+51892
+51893
+51894
+51895
+51896
+51897
+51898
+51899
+51900
+51901
+51902
+51903
+51904
+51905
+51906
+51907
+51908
+51909
+51910
+51911
+51912
+51913
+51914
+51915
+51916
+51917
+51918
+51919
+51920
+51921
+51922
+51923
+51924
+51925
+51926
+51927
+51928
+51929
+51930
+51931
+51932
+51933
+51934
+51935
+51936
+51937
+51938
+51939
+51940
+51941
+51942
+51943
+51944
+51945
+51946
+51947
+51948
+51949
+51950
+51951
+51952
+51953
+51954
+51955
+51956
+51957
+51958
+51959
+51960
+51961
+51962
+51963
+51964
+51965
+51966
+51967
+51968
+51969
+51970
+51971
+51972
+51973
+51974
+51975
+51976
+51977
+51978
+51979
+51980
+51981
+51982
+51983
+51984
+51985
+51986
+51987
+51988
+51989
+51990
+51991
+51992
+51993
+51994
+51995
+51996
+51997
+51998
+51999
+52000
+52001
+52002
+52003
+52004
+52005
+52006
+52007
+52008
+52009
+52010
+52011
+52012
+52013
+52014
+52015
+52016
+52017
+52018
+52019
+52020
+52021
+52022
+52023
+52024
+52025
+52026
+52027
+52028
+52029
+52030
+52031
+52032
+52033
+52034
+52035
+52036
+52037
+52038
+52039
+52040
+52041
+52042
+52043
+52044
+52045
+52046
+52047
+52048
+52049
+52050
+52051
+52052
+52053
+52054
+52055
+52056
+52057
+52058
+52059
+52060
+52061
+52062
+52063
+52064
+52065
+52066
+52067
+52068
+52069
+52070
+52071
+52072
+52073
+52074
+52075
+52076
+52077
+52078
+52079
+52080
+52081
+52082
+52083
+52084
+52085
+52086
+52087
+52088
+52089
+52090
+52091
+52092
+52093
+52094
+52095
+52096
+52097
+52098
+52099
+52100
+52101
+52102
+52103
+52104
+52105
+52106
+52107
+52108
+52109
+52110
+52111
+52112
+52113
+52114
+52115
+52116
+52117
+52118
+52119
+52120
+52121
+52122
+52123
+52124
+52125
+52126
+52127
+52128
+52129
+52130
+52131
+52132
+52133
+52134
+52135
+52136
+52137
+52138
+52139
+52140
+52141
+52142
+52143
+52144
+52145
+52146
+52147
+52148
+52149
+52150
+52151
+52152
+52153
+52154
+52155
+52156
+52157
+52158
+52159
+52160
+52161
+52162
+52163
+52164
+52165
+52166
+52167
+52168
+52169
+52170
+52171
+52172
+52173
+52174
+52175
+52176
+52177
+52178
+52179
+52180
+52181
+52182
+52183
+52184
+52185
+52186
+52187
+52188
+52189
+52190
+52191
+52192
+52193
+52194
+52195
+52196
+52197
+52198
+52199
+52200
+52201
+52202
+52203
+52204
+52205
+52206
+52207
+52208
+52209
+52210
+52211
+52212
+52213
+52214
+52215
+52216
+52217
+52218
+52219
+52220
+52221
+52222
+52223
+52224
+52225
+52226
+52227
+52228
+52229
+52230
+52231
+52232
+52233
+52234
+52235
+52236
+52237
+52238
+52239
+52240
+52241
+52242
+52243
+52244
+52245
+52246
+52247
+52248
+52249
+52250
+52251
+52252
+52253
+52254
+52255
+52256
+52257
+52258
+52259
+52260
+52261
+52262
+52263
+52264
+52265
+52266
+52267
+52268
+52269
+52270
+52271
+52272
+52273
+52274
+52275
+52276
+52277
+52278
+52279
+52280
+52281
+52282
+52283
+52284
+52285
+52286
+52287
+52288
+52289
+52290
+52291
+52292
+52293
+52294
+52295
+52296
+52297
+52298
+52299
+52300
+52301
+52302
+52303
+52304
+52305
+52306
+52307
+52308
+52309
+52310
+52311
+52312
+52313
+52314
+52315
+52316
+52317
+52318
+52319
+52320
+52321
+52322
+52323
+52324
+52325
+52326
+52327
+52328
+52329
+52330
+52331
+52332
+52333
+52334
+52335
+52336
+52337
+52338
+52339
+52340
+52341
+52342
+52343
+52344
+52345
+52346
+52347
+52348
+52349
+52350
+52351
+52352
+52353
+52354
+52355
+52356
+52357
+52358
+52359
+52360
+52361
+52362
+52363
+52364
+52365
+52366
+52367
+52368
+52369
+52370
+52371
+52372
+52373
+52374
+52375
+52376
+52377
+52378
+52379
+52380
+52381
+52382
+52383
+52384
+52385
+52386
+52387
+52388
+52389
+52390
+52391
+52392
+52393
+52394
+52395
+52396
+52397
+52398
+52399
+52400
+52401
+52402
+52403
+52404
+52405
+52406
+52407
+52408
+52409
+52410
+52411
+52412
+52413
+52414
+52415
+52416
+52417
+52418
+52419
+52420
+52421
+52422
+52423
+52424
+52425
+52426
+52427
+52428
+52429
+52430
+52431
+52432
+52433
+52434
+52435
+52436
+52437
+52438
+52439
+52440
+52441
+52442
+52443
+52444
+52445
+52446
+52447
+52448
+52449
+52450
+52451
+52452
+52453
+52454
+52455
+52456
+52457
+52458
+52459
+52460
+52461
+52462
+52463
+52464
+52465
+52466
+52467
+52468
+52469
+52470
+52471
+52472
+52473
+52474
+52475
+52476
+52477
+52478
+52479
+52480
+52481
+52482
+52483
+52484
+52485
+52486
+52487
+52488
+52489
+52490
+52491
+52492
+52493
+52494
+52495
+52496
+52497
+52498
+52499
+52500
+52501
+52502
+52503
+52504
+52505
+52506
+52507
+52508
+52509
+52510
+52511
+52512
+52513
+52514
+52515
+52516
+52517
+52518
+52519
+52520
+52521
+52522
+52523
+52524
+52525
+52526
+52527
+52528
+52529
+52530
+52531
+52532
+52533
+52534
+52535
+52536
+52537
+52538
+52539
+52540
+52541
+52542
+52543
+52544
+52545
+52546
+52547
+52548
+52549
+52550
+52551
+52552
+52553
+52554
+52555
+52556
+52557
+52558
+52559
+52560
+52561
+52562
+52563
+52564
+52565
+52566
+52567
+52568
+52569
+52570
+52571
+52572
+52573
+52574
+52575
+52576
+52577
+52578
+52579
+52580
+52581
+52582
+52583
+52584
+52585
+52586
+52587
+52588
+52589
+52590
+52591
+52592
+52593
+52594
+52595
+52596
+52597
+52598
+52599
+52600
+52601
+52602
+52603
+52604
+52605
+52606
+52607
+52608
+52609
+52610
+52611
+52612
+52613
+52614
+52615
+52616
+52617
+52618
+52619
+52620
+52621
+52622
+52623
+52624
+52625
+52626
+52627
+52628
+52629
+52630
+52631
+52632
+52633
+52634
+52635
+52636
+52637
+52638
+52639
+52640
+52641
+52642
+52643
+52644
+52645
+52646
+52647
+52648
+52649
+52650
+52651
+52652
+52653
+52654
+52655
+52656
+52657
+52658
+52659
+52660
+52661
+52662
+52663
+52664
+52665
+52666
+52667
+52668
+52669
+52670
+52671
+52672
+52673
+52674
+52675
+52676
+52677
+52678
+52679
+52680
+52681
+52682
+52683
+52684
+52685
+52686
+52687
+52688
+52689
+52690
+52691
+52692
+52693
+52694
+52695
+52696
+52697
+52698
+52699
+52700
+52701
+52702
+52703
+52704
+52705
+52706
+52707
+52708
+52709
+52710
+52711
+52712
+52713
+52714
+52715
+52716
+52717
+52718
+52719
+52720
+52721
+52722
+52723
+52724
+52725
+52726
+52727
+52728
+52729
+52730
+52731
+52732
+52733
+52734
+52735
+52736
+52737
+52738
+52739
+52740
+52741
+52742
+52743
+52744
+52745
+52746
+52747
+52748
+52749
+52750
+52751
+52752
+52753
+52754
+52755
+52756
+52757
+52758
+52759
+52760
+52761
+52762
+52763
+52764
+52765
+52766
+52767
+52768
+52769
+52770
+52771
+52772
+52773
+52774
+52775
+52776
+52777
+52778
+52779
+52780
+52781
+52782
+52783
+52784
+52785
+52786
+52787
+52788
+52789
+52790
+52791
+52792
+52793
+52794
+52795
+52796
+52797
+52798
+52799
+52800
+52801
+52802
+52803
+52804
+52805
+52806
+52807
+52808
+52809
+52810
+52811
+52812
+52813
+52814
+52815
+52816
+52817
+52818
+52819
+52820
+52821
+52822
+52823
+52824
+52825
+52826
+52827
+52828
+52829
+52830
+52831
+52832
+52833
+52834
+52835
+52836
+52837
+52838
+52839
+52840
+52841
+52842
+52843
+52844
+52845
+52846
+52847
+52848
+52849
+52850
+52851
+52852
+52853
+52854
+52855
+52856
+52857
+52858
+52859
+52860
+52861
+52862
+52863
+52864
+52865
+52866
+52867
+52868
+52869
+52870
+52871
+52872
+52873
+52874
+52875
+52876
+52877
+52878
+52879
+52880
+52881
+52882
+52883
+52884
+52885
+52886
+52887
+52888
+52889
+52890
+52891
+52892
+52893
+52894
+52895
+52896
+52897
+52898
+52899
+52900
+52901
+52902
+52903
+52904
+52905
+52906
+52907
+52908
+52909
+52910
+52911
+52912
+52913
+52914
+52915
+52916
+52917
+52918
+52919
+52920
+52921
+52922
+52923
+52924
+52925
+52926
+52927
+52928
+52929
+52930
+52931
+52932
+52933
+52934
+52935
+52936
+52937
+52938
+52939
+52940
+52941
+52942
+52943
+52944
+52945
+52946
+52947
+52948
+52949
+52950
+52951
+52952
+52953
+52954
+52955
+52956
+52957
+52958
+52959
+52960
+52961
+52962
+52963
+52964
+52965
+52966
+52967
+52968
+52969
+52970
+52971
+52972
+52973
+52974
+52975
+52976
+52977
+52978
+52979
+52980
+52981
+52982
+52983
+52984
+52985
+52986
+52987
+52988
+52989
+52990
+52991
+52992
+52993
+52994
+52995
+52996
+52997
+52998
+52999
+53000
+53001
+53002
+53003
+53004
+53005
+53006
+53007
+53008
+53009
+53010
+53011
+53012
+53013
+53014
+53015
+53016
+53017
+53018
+53019
+53020
+53021
+53022
+53023
+53024
+53025
+53026
+53027
+53028
+53029
+53030
+53031
+53032
+53033
+53034
+53035
+53036
+53037
+53038
+53039
+53040
+53041
+53042
+53043
+53044
+53045
+53046
+53047
+53048
+53049
+53050
+53051
+53052
+53053
+53054
+53055
+53056
+53057
+53058
+53059
+53060
+53061
+53062
+53063
+53064
+53065
+53066
+53067
+53068
+53069
+53070
+53071
+53072
+53073
+53074
+53075
+53076
+53077
+53078
+53079
+53080
+53081
+53082
+53083
+53084
+53085
+53086
+53087
+53088
+53089
+53090
+53091
+53092
+53093
+53094
+53095
+53096
+53097
+53098
+53099
+53100
+53101
+53102
+53103
+53104
+53105
+53106
+53107
+53108
+53109
+53110
+53111
+53112
+53113
+53114
+53115
+53116
+53117
+53118
+53119
+53120
+53121
+53122
+53123
+53124
+53125
+53126
+53127
+53128
+53129
+53130
+53131
+53132
+53133
+53134
+53135
+53136
+53137
+53138
+53139
+53140
+53141
+53142
+53143
+53144
+53145
+53146
+53147
+53148
+53149
+53150
+53151
+53152
+53153
+53154
+53155
+53156
+53157
+53158
+53159
+53160
+53161
+53162
+53163
+53164
+53165
+53166
+53167
+53168
+53169
+53170
+53171
+53172
+53173
+53174
+53175
+53176
+53177
+53178
+53179
+53180
+53181
+53182
+53183
+53184
+53185
+53186
+53187
+53188
+53189
+53190
+53191
+53192
+53193
+53194
+53195
+53196
+53197
+53198
+53199
+53200
+53201
+53202
+53203
+53204
+53205
+53206
+53207
+53208
+53209
+53210
+53211
+53212
+53213
+53214
+53215
+53216
+53217
+53218
+53219
+53220
+53221
+53222
+53223
+53224
+53225
+53226
+53227
+53228
+53229
+53230
+53231
+53232
+53233
+53234
+53235
+53236
+53237
+53238
+53239
+53240
+53241
+53242
+53243
+53244
+53245
+53246
+53247
+53248
+53249
+53250
+53251
+53252
+53253
+53254
+53255
+53256
+53257
+53258
+53259
+53260
+53261
+53262
+53263
+53264
+53265
+53266
+53267
+53268
+53269
+53270
+53271
+53272
+53273
+53274
+53275
+53276
+53277
+53278
+53279
+53280
+53281
+53282
+53283
+53284
+53285
+53286
+53287
+53288
+53289
+53290
+53291
+53292
+53293
+53294
+53295
+53296
+53297
+53298
+53299
+53300
+53301
+53302
+53303
+53304
+53305
+53306
+53307
+53308
+53309
+53310
+53311
+53312
+53313
+53314
+53315
+53316
+53317
+53318
+53319
+53320
+53321
+53322
+53323
+53324
+53325
+53326
+53327
+53328
+53329
+53330
+53331
+53332
+53333
+53334
+53335
+53336
+53337
+53338
+53339
+53340
+53341
+53342
+53343
+53344
+53345
+53346
+53347
+53348
+53349
+53350
+53351
+53352
+53353
+53354
+53355
+53356
+53357
+53358
+53359
+53360
+53361
+53362
+53363
+53364
+53365
+53366
+53367
+53368
+53369
+53370
+53371
+53372
+53373
+53374
+53375
+53376
+53377
+53378
+53379
+53380
+53381
+53382
+53383
+53384
+53385
+53386
+53387
+53388
+53389
+53390
+53391
+53392
+53393
+53394
+53395
+53396
+53397
+53398
+53399
+53400
+53401
+53402
+53403
+53404
+53405
+53406
+53407
+53408
+53409
+53410
+53411
+53412
+53413
+53414
+53415
+53416
+53417
+53418
+53419
+53420
+53421
+53422
+53423
+53424
+53425
+53426
+53427
+53428
+53429
+53430
+53431
+53432
+53433
+53434
+53435
+53436
+53437
+53438
+53439
+53440
+53441
+53442
+53443
+53444
+53445
+53446
+53447
+53448
+53449
+53450
+53451
+53452
+53453
+53454
+53455
+53456
+53457
+53458
+53459
+53460
+53461
+53462
+53463
+53464
+53465
+53466
+53467
+53468
+53469
+53470
+53471
+53472
+53473
+53474
+53475
+53476
+53477
+53478
+53479
+53480
+53481
+53482
+53483
+53484
+53485
+53486
+53487
+53488
+53489
+53490
+53491
+53492
+53493
+53494
+53495
+53496
+53497
+53498
+53499
+53500
+53501
+53502
+53503
+53504
+53505
+53506
+53507
+53508
+53509
+53510
+53511
+53512
+53513
+53514
+53515
+53516
+53517
+53518
+53519
+53520
+53521
+53522
+53523
+53524
+53525
+53526
+53527
+53528
+53529
+53530
+53531
+53532
+53533
+53534
+53535
+53536
+53537
+53538
+53539
+53540
+53541
+53542
+53543
+53544
+53545
+53546
+53547
+53548
+53549
+53550
+53551
+53552
+53553
+53554
+53555
+53556
+53557
+53558
+53559
+53560
+53561
+53562
+53563
+53564
+53565
+53566
+53567
+53568
+53569
+53570
+53571
+53572
+53573
+53574
+53575
+53576
+53577
+53578
+53579
+53580
+53581
+53582
+53583
+53584
+53585
+53586
+53587
+53588
+53589
+53590
+53591
+53592
+53593
+53594
+53595
+53596
+53597
+53598
+53599
+53600
+53601
+53602
+53603
+53604
+53605
+53606
+53607
+53608
+53609
+53610
+53611
+53612
+53613
+53614
+53615
+53616
+53617
+53618
+53619
+53620
+53621
+53622
+53623
+53624
+53625
+53626
+53627
+53628
+53629
+53630
+53631
+53632
+53633
+53634
+53635
+53636
+53637
+53638
+53639
+53640
+53641
+53642
+53643
+53644
+53645
+53646
+53647
+53648
+53649
+53650
+53651
+53652
+53653
+53654
+53655
+53656
+53657
+53658
+53659
+53660
+53661
+53662
+53663
+53664
+53665
+53666
+53667
+53668
+53669
+53670
+53671
+53672
+53673
+53674
+53675
+53676
+53677
+53678
+53679
+53680
+53681
+53682
+53683
+53684
+53685
+53686
+53687
+53688
+53689
+53690
+53691
+53692
+53693
+53694
+53695
+53696
+53697
+53698
+53699
+53700
+53701
+53702
+53703
+53704
+53705
+53706
+53707
+53708
+53709
+53710
+53711
+53712
+53713
+53714
+53715
+53716
+53717
+53718
+53719
+53720
+53721
+53722
+53723
+53724
+53725
+53726
+53727
+53728
+53729
+53730
+53731
+53732
+53733
+53734
+53735
+53736
+53737
+53738
+53739
+53740
+53741
+53742
+53743
+53744
+53745
+53746
+53747
+53748
+53749
+53750
+53751
+53752
+53753
+53754
+53755
+53756
+53757
+53758
+53759
+53760
+53761
+53762
+53763
+53764
+53765
+53766
+53767
+53768
+53769
+53770
+53771
+53772
+53773
+53774
+53775
+53776
+53777
+53778
+53779
+53780
+53781
+53782
+53783
+53784
+53785
+53786
+53787
+53788
+53789
+53790
+53791
+53792
+53793
+53794
+53795
+53796
+53797
+53798
+53799
+53800
+53801
+53802
+53803
+53804
+53805
+53806
+53807
+53808
+53809
+53810
+53811
+53812
+53813
+53814
+53815
+53816
+53817
+53818
+53819
+53820
+53821
+53822
+53823
+53824
+53825
+53826
+53827
+53828
+53829
+53830
+53831
+53832
+53833
+53834
+53835
+53836
+53837
+53838
+53839
+53840
+53841
+53842
+53843
+53844
+53845
+53846
+53847
+53848
+53849
+53850
+53851
+53852
+53853
+53854
+53855
+53856
+53857
+53858
+53859
+53860
+53861
+53862
+53863
+53864
+53865
+53866
+53867
+53868
+53869
+53870
+53871
+53872
+53873
+53874
+53875
+53876
+53877
+53878
+53879
+53880
+53881
+53882
+53883
+53884
+53885
+53886
+53887
+53888
+53889
+53890
+53891
+53892
+53893
+53894
+53895
+53896
+53897
+53898
+53899
+53900
+53901
+53902
+53903
+53904
+53905
+53906
+53907
+53908
+53909
+53910
+53911
+53912
+53913
+53914
+53915
+53916
+53917
+53918
+53919
+53920
+53921
+53922
+53923
+53924
+53925
+53926
+53927
+53928
+53929
+53930
+53931
+53932
+53933
+53934
+53935
+53936
+53937
+53938
+53939
+53940
+53941
+53942
+53943
+53944
+53945
+53946
+53947
+53948
+53949
+53950
+53951
+53952
+53953
+53954
+53955
+53956
+53957
+53958
+53959
+53960
+53961
+53962
+53963
+53964
+53965
+53966
+53967
+53968
+53969
+53970
+53971
+53972
+53973
+53974
+53975
+53976
+53977
+53978
+53979
+53980
+53981
+53982
+53983
+53984
+53985
+53986
+53987
+53988
+53989
+53990
+53991
+53992
+53993
+53994
+53995
+53996
+53997
+53998
+53999
+54000
+54001
+54002
+54003
+54004
+54005
+54006
+54007
+54008
+54009
+54010
+54011
+54012
+54013
+54014
+54015
+54016
+54017
+54018
+54019
+54020
+54021
+54022
+54023
+54024
+54025
+54026
+54027
+54028
+54029
+54030
+54031
+54032
+54033
+54034
+54035
+54036
+54037
+54038
+54039
+54040
+54041
+54042
+54043
+54044
+54045
+54046
+54047
+54048
+54049
+54050
+54051
+54052
+54053
+54054
+54055
+54056
+54057
+54058
+54059
+54060
+54061
+54062
+54063
+54064
+54065
+54066
+54067
+54068
+54069
+54070
+54071
+54072
+54073
+54074
+54075
+54076
+54077
+54078
+54079
+54080
+54081
+54082
+54083
+54084
+54085
+54086
+54087
+54088
+54089
+54090
+54091
+54092
+54093
+54094
+54095
+54096
+54097
+54098
+54099
+54100
+54101
+54102
+54103
+54104
+54105
+54106
+54107
+54108
+54109
+54110
+54111
+54112
+54113
+54114
+54115
+54116
+54117
+54118
+54119
+54120
+54121
+54122
+54123
+54124
+54125
+54126
+54127
+54128
+54129
+54130
+54131
+54132
+54133
+54134
+54135
+54136
+54137
+54138
+54139
+54140
+54141
+54142
+54143
+54144
+54145
+54146
+54147
+54148
+54149
+54150
+54151
+54152
+54153
+54154
+54155
+54156
+54157
+54158
+54159
+54160
+54161
+54162
+54163
+54164
+54165
+54166
+54167
+54168
+54169
+54170
+54171
+54172
+54173
+54174
+54175
+54176
+54177
+54178
+54179
+54180
+54181
+54182
+54183
+54184
+54185
+54186
+54187
+54188
+54189
+54190
+54191
+54192
+54193
+54194
+54195
+54196
+54197
+54198
+54199
+54200
+54201
+54202
+54203
+54204
+54205
+54206
+54207
+54208
+54209
+54210
+54211
+54212
+54213
+54214
+54215
+54216
+54217
+54218
+54219
+54220
+54221
+54222
+54223
+54224
+54225
+54226
+54227
+54228
+54229
+54230
+54231
+54232
+54233
+54234
+54235
+54236
+54237
+54238
+54239
+54240
+54241
+54242
+54243
+54244
+54245
+54246
+54247
+54248
+54249
+54250
+54251
+54252
+54253
+54254
+54255
+54256
+54257
+54258
+54259
+54260
+54261
+54262
+54263
+54264
+54265
+54266
+54267
+54268
+54269
+54270
+54271
+54272
+54273
+54274
+54275
+54276
+54277
+54278
+54279
+54280
+54281
+54282
+54283
+54284
+54285
+54286
+54287
+54288
+54289
+54290
+54291
+54292
+54293
+54294
+54295
+54296
+54297
+54298
+54299
+54300
+54301
+54302
+54303
+54304
+54305
+54306
+54307
+54308
+54309
+54310
+54311
+54312
+54313
+54314
+54315
+54316
+54317
+54318
+54319
+54320
+54321
+54322
+54323
+54324
+54325
+54326
+54327
+54328
+54329
+54330
+54331
+54332
+54333
+54334
+54335
+54336
+54337
+54338
+54339
+54340
+54341
+54342
+54343
+54344
+54345
+54346
+54347
+54348
+54349
+54350
+54351
+54352
+54353
+54354
+54355
+54356
+54357
+54358
+54359
+54360
+54361
+54362
+54363
+54364
+54365
+54366
+54367
+54368
+54369
+54370
+54371
+54372
+54373
+54374
+54375
+54376
+54377
+54378
+54379
+54380
+54381
+54382
+54383
+54384
+54385
+54386
+54387
+54388
+54389
+54390
+54391
+54392
+54393
+54394
+54395
+54396
+54397
+54398
+54399
+54400
+54401
+54402
+54403
+54404
+54405
+54406
+54407
+54408
+54409
+54410
+54411
+54412
+54413
+54414
+54415
+54416
+54417
+54418
+54419
+54420
+54421
+54422
+54423
+54424
+54425
+54426
+54427
+54428
+54429
+54430
+54431
+54432
+54433
+54434
+54435
+54436
+54437
+54438
+54439
+54440
+54441
+54442
+54443
+54444
+54445
+54446
+54447
+54448
+54449
+54450
+54451
+54452
+54453
+54454
+54455
+54456
+54457
+54458
+54459
+54460
+54461
+54462
+54463
+54464
+54465
+54466
+54467
+54468
+54469
+54470
+54471
+54472
+54473
+54474
+54475
+54476
+54477
+54478
+54479
+54480
+54481
+54482
+54483
+54484
+54485
+54486
+54487
+54488
+54489
+54490
+54491
+54492
+54493
+54494
+54495
+54496
+54497
+54498
+54499
+54500
+54501
+54502
+54503
+54504
+54505
+54506
+54507
+54508
+54509
+54510
+54511
+54512
+54513
+54514
+54515
+54516
+54517
+54518
+54519
+54520
+54521
+54522
+54523
+54524
+54525
+54526
+54527
+54528
+54529
+54530
+54531
+54532
+54533
+54534
+54535
+54536
+54537
+54538
+54539
+54540
+54541
+54542
+54543
+54544
+54545
+54546
+54547
+54548
+54549
+54550
+54551
+54552
+54553
+54554
+54555
+54556
+54557
+54558
+54559
+54560
+54561
+54562
+54563
+54564
+54565
+54566
+54567
+54568
+54569
+54570
+54571
+54572
+54573
+54574
+54575
+54576
+54577
+54578
+54579
+54580
+54581
+54582
+54583
+54584
+54585
+54586
+54587
+54588
+54589
+54590
+54591
+54592
+54593
+54594
+54595
+54596
+54597
+54598
+54599
+54600
+54601
+54602
+54603
+54604
+54605
+54606
+54607
+54608
+54609
+54610
+54611
+54612
+54613
+54614
+54615
+54616
+54617
+54618
+54619
+54620
+54621
+54622
+54623
+54624
+54625
+54626
+54627
+54628
+54629
+54630
+54631
+54632
+54633
+54634
+54635
+54636
+54637
+54638
+54639
+54640
+54641
+54642
+54643
+54644
+54645
+54646
+54647
+54648
+54649
+54650
+54651
+54652
+54653
+54654
+54655
+54656
+54657
+54658
+54659
+54660
+54661
+54662
+54663
+54664
+54665
+54666
+54667
+54668
+54669
+54670
+54671
+54672
+54673
+54674
+54675
+54676
+54677
+54678
+54679
+54680
+54681
+54682
+54683
+54684
+54685
+54686
+54687
+54688
+54689
+54690
+54691
+54692
+54693
+54694
+54695
+54696
+54697
+54698
+54699
+54700
+54701
+54702
+54703
+54704
+54705
+54706
+54707
+54708
+54709
+54710
+54711
+54712
+54713
+54714
+54715
+54716
+54717
+54718
+54719
+54720
+54721
+54722
+54723
+54724
+54725
+54726
+54727
+54728
+54729
+54730
+54731
+54732
+54733
+54734
+54735
+54736
+54737
+54738
+54739
+54740
+54741
+54742
+54743
+54744
+54745
+54746
+54747
+54748
+54749
+54750
+54751
+54752
+54753
+54754
+54755
+54756
+54757
+54758
+54759
+54760
+54761
+54762
+54763
+54764
+54765
+54766
+54767
+54768
+54769
+54770
+54771
+54772
+54773
+54774
+54775
+54776
+54777
+54778
+54779
+54780
+54781
+54782
+54783
+54784
+54785
+54786
+54787
+54788
+54789
+54790
+54791
+54792
+54793
+54794
+54795
+54796
+54797
+54798
+54799
+54800
+54801
+54802
+54803
+54804
+54805
+54806
+54807
+54808
+54809
+54810
+54811
+54812
+54813
+54814
+54815
+54816
+54817
+54818
+54819
+54820
+54821
+54822
+54823
+54824
+54825
+54826
+54827
+54828
+54829
+54830
+54831
+54832
+54833
+54834
+54835
+54836
+54837
+54838
+54839
+54840
+54841
+54842
+54843
+54844
+54845
+54846
+54847
+54848
+54849
+54850
+54851
+54852
+54853
+54854
+54855
+54856
+54857
+54858
+54859
+54860
+54861
+54862
+54863
+54864
+54865
+54866
+54867
+54868
+54869
+54870
+54871
+54872
+54873
+54874
+54875
+54876
+54877
+54878
+54879
+54880
+54881
+54882
+54883
+54884
+54885
+54886
+54887
+54888
+54889
+54890
+54891
+54892
+54893
+54894
+54895
+54896
+54897
+54898
+54899
+54900
+54901
+54902
+54903
+54904
+54905
+54906
+54907
+54908
+54909
+54910
+54911
+54912
+54913
+54914
+54915
+54916
+54917
+54918
+54919
+54920
+54921
+54922
+54923
+54924
+54925
+54926
+54927
+54928
+54929
+54930
+54931
+54932
+54933
+54934
+54935
+54936
+54937
+54938
+54939
+54940
+54941
+54942
+54943
+54944
+54945
+54946
+54947
+54948
+54949
+54950
+54951
+54952
+54953
+54954
+54955
+54956
+54957
+54958
+54959
+54960
+54961
+54962
+54963
+54964
+54965
+54966
+54967
+54968
+54969
+54970
+54971
+54972
+54973
+54974
+54975
+54976
+54977
+54978
+54979
+54980
+54981
+54982
+54983
+54984
+54985
+54986
+54987
+54988
+54989
+54990
+54991
+54992
+54993
+54994
+54995
+54996
+54997
+54998
+54999
+55000
+55001
+55002
+55003
+55004
+55005
+55006
+55007
+55008
+55009
+55010
+55011
+55012
+55013
+55014
+55015
+55016
+55017
+55018
+55019
+55020
+55021
+55022
+55023
+55024
+55025
+55026
+55027
+55028
+55029
+55030
+55031
+55032
+55033
+55034
+55035
+55036
+55037
+55038
+55039
+55040
+55041
+55042
+55043
+55044
+55045
+55046
+55047
+55048
+55049
+55050
+55051
+55052
+55053
+55054
+55055
+55056
+55057
+55058
+55059
+55060
+55061
+55062
+55063
+55064
+55065
+55066
+55067
+55068
+55069
+55070
+55071
+55072
+55073
+55074
+55075
+55076
+55077
+55078
+55079
+55080
+55081
+55082
+55083
+55084
+55085
+55086
+55087
+55088
+55089
+55090
+55091
+55092
+55093
+55094
+55095
+55096
+55097
+55098
+55099
+55100
+55101
+55102
+55103
+55104
+55105
+55106
+55107
+55108
+55109
+55110
+55111
+55112
+55113
+55114
+55115
+55116
+55117
+55118
+55119
+55120
+55121
+55122
+55123
+55124
+55125
+55126
+55127
+55128
+55129
+55130
+55131
+55132
+55133
+55134
+55135
+55136
+55137
+55138
+55139
+55140
+55141
+55142
+55143
+55144
+55145
+55146
+55147
+55148
+55149
+55150
+55151
+55152
+55153
+55154
+55155
+55156
+55157
+55158
+55159
+55160
+55161
+55162
+55163
+55164
+55165
+55166
+55167
+55168
+55169
+55170
+55171
+55172
+55173
+55174
+55175
+55176
+55177
+55178
+55179
+55180
+55181
+55182
+55183
+55184
+55185
+55186
+55187
+55188
+55189
+55190
+55191
+55192
+55193
+55194
+55195
+55196
+55197
+55198
+55199
+55200
+55201
+55202
+55203
+55204
+55205
+55206
+55207
+55208
+55209
+55210
+55211
+55212
+55213
+55214
+55215
+55216
+55217
+55218
+55219
+55220
+55221
+55222
+55223
+55224
+55225
+55226
+55227
+55228
+55229
+55230
+55231
+55232
+55233
+55234
+55235
+55236
+55237
+55238
+55239
+55240
+55241
+55242
+55243
+55244
+55245
+55246
+55247
+55248
+55249
+55250
+55251
+55252
+55253
+55254
+55255
+55256
+55257
+55258
+55259
+55260
+55261
+55262
+55263
+55264
+55265
+55266
+55267
+55268
+55269
+55270
+55271
+55272
+55273
+55274
+55275
+55276
+55277
+55278
+55279
+55280
+55281
+55282
+55283
+55284
+55285
+55286
+55287
+55288
+55289
+55290
+55291
+55292
+55293
+55294
+55295
+55296
+55297
+55298
+55299
+55300
+55301
+55302
+55303
+55304
+55305
+55306
+55307
+55308
+55309
+55310
+55311
+55312
+55313
+55314
+55315
+55316
+55317
+55318
+55319
+55320
+55321
+55322
+55323
+55324
+55325
+55326
+55327
+55328
+55329
+55330
+55331
+55332
+55333
+55334
+55335
+55336
+55337
+55338
+55339
+55340
+55341
+55342
+55343
+55344
+55345
+55346
+55347
+55348
+55349
+55350
+55351
+55352
+55353
+55354
+55355
+55356
+55357
+55358
+55359
+55360
+55361
+55362
+55363
+55364
+55365
+55366
+55367
+55368
+55369
+55370
+55371
+55372
+55373
+55374
+55375
+55376
+55377
+55378
+55379
+55380
+55381
+55382
+55383
+55384
+55385
+55386
+55387
+55388
+55389
+55390
+55391
+55392
+55393
+55394
+55395
+55396
+55397
+55398
+55399
+55400
+55401
+55402
+55403
+55404
+55405
+55406
+55407
+55408
+55409
+55410
+55411
+55412
+55413
+55414
+55415
+55416
+55417
+55418
+55419
+55420
+55421
+55422
+55423
+55424
+55425
+55426
+55427
+55428
+55429
+55430
+55431
+55432
+55433
+55434
+55435
+55436
+55437
+55438
+55439
+55440
+55441
+55442
+55443
+55444
+55445
+55446
+55447
+55448
+55449
+55450
+55451
+55452
+55453
+55454
+55455
+55456
+55457
+55458
+55459
+55460
+55461
+55462
+55463
+55464
+55465
+55466
+55467
+55468
+55469
+55470
+55471
+55472
+55473
+55474
+55475
+55476
+55477
+55478
+55479
+55480
+55481
+55482
+55483
+55484
+55485
+55486
+55487
+55488
+55489
+55490
+55491
+55492
+55493
+55494
+55495
+55496
+55497
+55498
+55499
+55500
+55501
+55502
+55503
+55504
+55505
+55506
+55507
+55508
+55509
+55510
+55511
+55512
+55513
+55514
+55515
+55516
+55517
+55518
+55519
+55520
+55521
+55522
+55523
+55524
+55525
+55526
+55527
+55528
+55529
+55530
+55531
+55532
+55533
+55534
+55535
+55536
+55537
+55538
+55539
+55540
+55541
+55542
+55543
+55544
+55545
+55546
+55547
+55548
+55549
+55550
+55551
+55552
+55553
+55554
+55555
+55556
+55557
+55558
+55559
+55560
+55561
+55562
+55563
+55564
+55565
+55566
+55567
+55568
+55569
+55570
+55571
+55572
+55573
+55574
+55575
+55576
+55577
+55578
+55579
+55580
+55581
+55582
+55583
+55584
+55585
+55586
+55587
+55588
+55589
+55590
+55591
+55592
+55593
+55594
+55595
+55596
+55597
+55598
+55599
+55600
+55601
+55602
+55603
+55604
+55605
+55606
+55607
+55608
+55609
+55610
+55611
+55612
+55613
+55614
+55615
+55616
+55617
+55618
+55619
+55620
+55621
+55622
+55623
+55624
+55625
+55626
+55627
+55628
+55629
+55630
+55631
+55632
+55633
+55634
+55635
+55636
+55637
+55638
+55639
+55640
+55641
+55642
+55643
+55644
+55645
+55646
+55647
+55648
+55649
+55650
+55651
+55652
+55653
+55654
+55655
+55656
+55657
+55658
+55659
+55660
+55661
+55662
+55663
+55664
+55665
+55666
+55667
+55668
+55669
+55670
+55671
+55672
+55673
+55674
+55675
+55676
+55677
+55678
+55679
+55680
+55681
+55682
+55683
+55684
+55685
+55686
+55687
+55688
+55689
+55690
+55691
+55692
+55693
+55694
+55695
+55696
+55697
+55698
+55699
+55700
+55701
+55702
+55703
+55704
+55705
+55706
+55707
+55708
+55709
+55710
+55711
+55712
+55713
+55714
+55715
+55716
+55717
+55718
+55719
+55720
+55721
+55722
+55723
+55724
+55725
+55726
+55727
+55728
+55729
+55730
+55731
+55732
+55733
+55734
+55735
+55736
+55737
+55738
+55739
+55740
+55741
+55742
+55743
+55744
+55745
+55746
+55747
+55748
+55749
+55750
+55751
+55752
+55753
+55754
+55755
+55756
+55757
+55758
+55759
+55760
+55761
+55762
+55763
+55764
+55765
+55766
+55767
+55768
+55769
+55770
+55771
+55772
+55773
+55774
+55775
+55776
+55777
+55778
+55779
+55780
+55781
+55782
+55783
+55784
+55785
+55786
+55787
+55788
+55789
+55790
+55791
+55792
+55793
+55794
+55795
+55796
+55797
+55798
+55799
+55800
+55801
+55802
+55803
+55804
+55805
+55806
+55807
+55808
+55809
+55810
+55811
+55812
+55813
+55814
+55815
+55816
+55817
+55818
+55819
+55820
+55821
+55822
+55823
+55824
+55825
+55826
+55827
+55828
+55829
+55830
+55831
+55832
+55833
+55834
+55835
+55836
+55837
+55838
+55839
+55840
+55841
+55842
+55843
+55844
+55845
+55846
+55847
+55848
+55849
+55850
+55851
+55852
+55853
+55854
+55855
+55856
+55857
+55858
+55859
+55860
+55861
+55862
+55863
+55864
+55865
+55866
+55867
+55868
+55869
+55870
+55871
+55872
+55873
+55874
+55875
+55876
+55877
+55878
+55879
+55880
+55881
+55882
+55883
+55884
+55885
+55886
+55887
+55888
+55889
+55890
+55891
+55892
+55893
+55894
+55895
+55896
+55897
+55898
+55899
+55900
+55901
+55902
+55903
+55904
+55905
+55906
+55907
+55908
+55909
+55910
+55911
+55912
+55913
+55914
+55915
+55916
+55917
+55918
+55919
+55920
+55921
+55922
+55923
+55924
+55925
+55926
+55927
+55928
+55929
+55930
+55931
+55932
+55933
+55934
+55935
+55936
+55937
+55938
+55939
+55940
+55941
+55942
+55943
+55944
+55945
+55946
+55947
+55948
+55949
+55950
+55951
+55952
+55953
+55954
+55955
+55956
+55957
+55958
+55959
+55960
+55961
+55962
+55963
+55964
+55965
+55966
+55967
+55968
+55969
+55970
+55971
+55972
+55973
+55974
+55975
+55976
+55977
+55978
+55979
+55980
+55981
+55982
+55983
+55984
+55985
+55986
+55987
+55988
+55989
+55990
+55991
+55992
+55993
+55994
+55995
+55996
+55997
+55998
+55999
+56000
+56001
+56002
+56003
+56004
+56005
+56006
+56007
+56008
+56009
+56010
+56011
+56012
+56013
+56014
+56015
+56016
+56017
+56018
+56019
+56020
+56021
+56022
+56023
+56024
+56025
+56026
+56027
+56028
+56029
+56030
+56031
+56032
+56033
+56034
+56035
+56036
+56037
+56038
+56039
+56040
+56041
+56042
+56043
+56044
+56045
+56046
+56047
+56048
+56049
+56050
+56051
+56052
+56053
+56054
+56055
+56056
+56057
+56058
+56059
+56060
+56061
+56062
+56063
+56064
+56065
+56066
+56067
+56068
+56069
+56070
+56071
+56072
+56073
+56074
+56075
+56076
+56077
+56078
+56079
+56080
+56081
+56082
+56083
+56084
+56085
+56086
+56087
+56088
+56089
+56090
+56091
+56092
+56093
+56094
+56095
+56096
+56097
+56098
+56099
+56100
+56101
+56102
+56103
+56104
+56105
+56106
+56107
+56108
+56109
+56110
+56111
+56112
+56113
+56114
+56115
+56116
+56117
+56118
+56119
+56120
+56121
+56122
+56123
+56124
+56125
+56126
+56127
+56128
+56129
+56130
+56131
+56132
+56133
+56134
+56135
+56136
+56137
+56138
+56139
+56140
+56141
+56142
+56143
+56144
+56145
+56146
+56147
+56148
+56149
+56150
+56151
+56152
+56153
+56154
+56155
+56156
+56157
+56158
+56159
+56160
+56161
+56162
+56163
+56164
+56165
+56166
+56167
+56168
+56169
+56170
+56171
+56172
+56173
+56174
+56175
+56176
+56177
+56178
+56179
+56180
+56181
+56182
+56183
+56184
+56185
+56186
+56187
+56188
+56189
+56190
+56191
+56192
+56193
+56194
+56195
+56196
+56197
+56198
+56199
+56200
+56201
+56202
+56203
+56204
+56205
+56206
+56207
+56208
+56209
+56210
+56211
+56212
+56213
+56214
+56215
+56216
+56217
+56218
+56219
+56220
+56221
+56222
+56223
+56224
+56225
+56226
+56227
+56228
+56229
+56230
+56231
+56232
+56233
+56234
+56235
+56236
+56237
+56238
+56239
+56240
+56241
+56242
+56243
+56244
+56245
+56246
+56247
+56248
+56249
+56250
+56251
+56252
+56253
+56254
+56255
+56256
+56257
+56258
+56259
+56260
+56261
+56262
+56263
+56264
+56265
+56266
+56267
+56268
+56269
+56270
+56271
+56272
+56273
+56274
+56275
+56276
+56277
+56278
+56279
+56280
+56281
+56282
+56283
+56284
+56285
+56286
+56287
+56288
+56289
+56290
+56291
+56292
+56293
+56294
+56295
+56296
+56297
+56298
+56299
+56300
+56301
+56302
+56303
+56304
+56305
+56306
+56307
+56308
+56309
+56310
+56311
+56312
+56313
+56314
+56315
+56316
+56317
+56318
+56319
+56320
+56321
+56322
+56323
+56324
+56325
+56326
+56327
+56328
+56329
+56330
+56331
+56332
+56333
+56334
+56335
+56336
+56337
+56338
+56339
+56340
+56341
+56342
+56343
+56344
+56345
+56346
+56347
+56348
+56349
+56350
+56351
+56352
+56353
+56354
+56355
+56356
+56357
+56358
+56359
+56360
+56361
+56362
+56363
+56364
+56365
+56366
+56367
+56368
+56369
+56370
+56371
+56372
+56373
+56374
+56375
+56376
+56377
+56378
+56379
+56380
+56381
+56382
+56383
+56384
+56385
+56386
+56387
+56388
+56389
+56390
+56391
+56392
+56393
+56394
+56395
+56396
+56397
+56398
+56399
+56400
+56401
+56402
+56403
+56404
+56405
+56406
+56407
+56408
+56409
+56410
+56411
+56412
+56413
+56414
+56415
+56416
+56417
+56418
+56419
+56420
+56421
+56422
+56423
+56424
+56425
+56426
+56427
+56428
+56429
+56430
+56431
+56432
+56433
+56434
+56435
+56436
+56437
+56438
+56439
+56440
+56441
+56442
+56443
+56444
+56445
+56446
+56447
+56448
+56449
+56450
+56451
+56452
+56453
+56454
+56455
+56456
+56457
+56458
+56459
+56460
+56461
+56462
+56463
+56464
+56465
+56466
+56467
+56468
+56469
+56470
+56471
+56472
+56473
+56474
+56475
+56476
+56477
+56478
+56479
+56480
+56481
+56482
+56483
+56484
+56485
+56486
+56487
+56488
+56489
+56490
+56491
+56492
+56493
+56494
+56495
+56496
+56497
+56498
+56499
+56500
+56501
+56502
+56503
+56504
+56505
+56506
+56507
+56508
+56509
+56510
+56511
+56512
+56513
+56514
+56515
+56516
+56517
+56518
+56519
+56520
+56521
+56522
+56523
+56524
+56525
+56526
+56527
+56528
+56529
+56530
+56531
+56532
+56533
+56534
+56535
+56536
+56537
+56538
+56539
+56540
+56541
+56542
+56543
+56544
+56545
+56546
+56547
+56548
+56549
+56550
+56551
+56552
+56553
+56554
+56555
+56556
+56557
+56558
+56559
+56560
+56561
+56562
+56563
+56564
+56565
+56566
+56567
+56568
+56569
+56570
+56571
+56572
+56573
+56574
+56575
+56576
+56577
+56578
+56579
+56580
+56581
+56582
+56583
+56584
+56585
+56586
+56587
+56588
+56589
+56590
+56591
+56592
+56593
+56594
+56595
+56596
+56597
+56598
+56599
+56600
+56601
+56602
+56603
+56604
+56605
+56606
+56607
+56608
+56609
+56610
+56611
+56612
+56613
+56614
+56615
+56616
+56617
+56618
+56619
+56620
+56621
+56622
+56623
+56624
+56625
+56626
+56627
+56628
+56629
+56630
+56631
+56632
+56633
+56634
+56635
+56636
+56637
+56638
+56639
+56640
+56641
+56642
+56643
+56644
+56645
+56646
+56647
+56648
+56649
+56650
+56651
+56652
+56653
+56654
+56655
+56656
+56657
+56658
+56659
+56660
+56661
+56662
+56663
+56664
+56665
+56666
+56667
+56668
+56669
+56670
+56671
+56672
+56673
+56674
+56675
+56676
+56677
+56678
+56679
+56680
+56681
+56682
+56683
+56684
+56685
+56686
+56687
+56688
+56689
+56690
+56691
+56692
+56693
+56694
+56695
+56696
+56697
+56698
+56699
+56700
+56701
+56702
+56703
+56704
+56705
+56706
+56707
+56708
+56709
+56710
+56711
+56712
+56713
+56714
+56715
+56716
+56717
+56718
+56719
+56720
+56721
+56722
+56723
+56724
+56725
+56726
+56727
+56728
+56729
+56730
+56731
+56732
+56733
+56734
+56735
+56736
+56737
+56738
+56739
+56740
+56741
+56742
+56743
+56744
+56745
+56746
+56747
+56748
+56749
+56750
+56751
+56752
+56753
+56754
+56755
+56756
+56757
+56758
+56759
+56760
+56761
+56762
+56763
+56764
+56765
+56766
+56767
+56768
+56769
+56770
+56771
+56772
+56773
+56774
+56775
+56776
+56777
+56778
+56779
+56780
+56781
+56782
+56783
+56784
+56785
+56786
+56787
+56788
+56789
+56790
+56791
+56792
+56793
+56794
+56795
+56796
+56797
+56798
+56799
+56800
+56801
+56802
+56803
+56804
+56805
+56806
+56807
+56808
+56809
+56810
+56811
+56812
+56813
+56814
+56815
+56816
+56817
+56818
+56819
+56820
+56821
+56822
+56823
+56824
+56825
+56826
+56827
+56828
+56829
+56830
+56831
+56832
+56833
+56834
+56835
+56836
+56837
+56838
+56839
+56840
+56841
+56842
+56843
+56844
+56845
+56846
+56847
+56848
+56849
+56850
+56851
+56852
+56853
+56854
+56855
+56856
+56857
+56858
+56859
+56860
+56861
+56862
+56863
+56864
+56865
+56866
+56867
+56868
+56869
+56870
+56871
+56872
+56873
+56874
+56875
+56876
+56877
+56878
+56879
+56880
+56881
+56882
+56883
+56884
+56885
+56886
+56887
+56888
+56889
+56890
+56891
+56892
+56893
+56894
+56895
+56896
+56897
+56898
+56899
+56900
+56901
+56902
+56903
+56904
+56905
+56906
+56907
+56908
+56909
+56910
+56911
+56912
+56913
+56914
+56915
+56916
+56917
+56918
+56919
+56920
+56921
+56922
+56923
+56924
+56925
+56926
+56927
+56928
+56929
+56930
+56931
+56932
+56933
+56934
+56935
+56936
+56937
+56938
+56939
+56940
+56941
+56942
+56943
+56944
+56945
+56946
+56947
+56948
+56949
+56950
+56951
+56952
+56953
+56954
+56955
+56956
+56957
+56958
+56959
+56960
+56961
+56962
+56963
+56964
+56965
+56966
+56967
+56968
+56969
+56970
+56971
+56972
+56973
+56974
+56975
+56976
+56977
+56978
+56979
+56980
+56981
+56982
+56983
+56984
+56985
+56986
+56987
+56988
+56989
+56990
+56991
+56992
+56993
+56994
+56995
+56996
+56997
+56998
+56999
+57000
+57001
+57002
+57003
+57004
+57005
+57006
+57007
+57008
+57009
+57010
+57011
+57012
+57013
+57014
+57015
+57016
+57017
+57018
+57019
+57020
+57021
+57022
+57023
+57024
+57025
+57026
+57027
+57028
+57029
+57030
+57031
+57032
+57033
+57034
+57035
+57036
+57037
+57038
+57039
+57040
+57041
+57042
+57043
+57044
+57045
+57046
+57047
+57048
+57049
+57050
+57051
+57052
+57053
+57054
+57055
+57056
+57057
+57058
+57059
+57060
+57061
+57062
+57063
+57064
+57065
+57066
+57067
+57068
+57069
+57070
+57071
+57072
+57073
+57074
+57075
+57076
+57077
+57078
+57079
+57080
+57081
+57082
+57083
+57084
+57085
+57086
+57087
+57088
+57089
+57090
+57091
+57092
+57093
+57094
+57095
+57096
+57097
+57098
+57099
+57100
+57101
+57102
+57103
+57104
+57105
+57106
+57107
+57108
+57109
+57110
+57111
+57112
+57113
+57114
+57115
+57116
+57117
+57118
+57119
+57120
+57121
+57122
+57123
+57124
+57125
+57126
+57127
+57128
+57129
+57130
+57131
+57132
+57133
+57134
+57135
+57136
+57137
+57138
+57139
+57140
+57141
+57142
+57143
+57144
+57145
+57146
+57147
+57148
+57149
+57150
+57151
+57152
+57153
+57154
+57155
+57156
+57157
+57158
+57159
+57160
+57161
+57162
+57163
+57164
+57165
+57166
+57167
+57168
+57169
+57170
+57171
+57172
+57173
+57174
+57175
+57176
+57177
+57178
+57179
+57180
+57181
+57182
+57183
+57184
+57185
+57186
+57187
+57188
+57189
+57190
+57191
+57192
+57193
+57194
+57195
+57196
+57197
+57198
+57199
+57200
+57201
+57202
+57203
+57204
+57205
+57206
+57207
+57208
+57209
+57210
+57211
+57212
+57213
+57214
+57215
+57216
+57217
+57218
+57219
+57220
+57221
+57222
+57223
+57224
+57225
+57226
+57227
+57228
+57229
+57230
+57231
+57232
+57233
+57234
+57235
+57236
+57237
+57238
+57239
+57240
+57241
+57242
+57243
+57244
+57245
+57246
+57247
+57248
+57249
+57250
+57251
+57252
+57253
+57254
+57255
+57256
+57257
+57258
+57259
+57260
+57261
+57262
+57263
+57264
+57265
+57266
+57267
+57268
+57269
+57270
+57271
+57272
+57273
+57274
+57275
+57276
+57277
+57278
+57279
+57280
+57281
+57282
+57283
+57284
+57285
+57286
+57287
+57288
+57289
+57290
+57291
+57292
+57293
+57294
+57295
+57296
+57297
+57298
+57299
+57300
+57301
+57302
+57303
+57304
+57305
+57306
+57307
+57308
+57309
+57310
+57311
+57312
+57313
+57314
+57315
+57316
+57317
+57318
+57319
+57320
+57321
+57322
+57323
+57324
+57325
+57326
+57327
+57328
+57329
+57330
+57331
+57332
+57333
+57334
+57335
+57336
+57337
+57338
+57339
+57340
+57341
+57342
+57343
+57344
+57345
+57346
+57347
+57348
+57349
+57350
+57351
+57352
+57353
+57354
+57355
+57356
+57357
+57358
+57359
+57360
+57361
+57362
+57363
+57364
+57365
+57366
+57367
+57368
+57369
+57370
+57371
+57372
+57373
+57374
+57375
+57376
+57377
+57378
+57379
+57380
+57381
+57382
+57383
+57384
+57385
+57386
+57387
+57388
+57389
+57390
+57391
+57392
+57393
+57394
+57395
+57396
+57397
+57398
+57399
+57400
+57401
+57402
+57403
+57404
+57405
+57406
+57407
+57408
+57409
+57410
+57411
+57412
+57413
+57414
+57415
+57416
+57417
+57418
+57419
+57420
+57421
+57422
+57423
+57424
+57425
+57426
+57427
+57428
+57429
+57430
+57431
+57432
+57433
+57434
+57435
+57436
+57437
+57438
+57439
+57440
+57441
+57442
+57443
+57444
+57445
+57446
+57447
+57448
+57449
+57450
+57451
+57452
+57453
+57454
+57455
+57456
+57457
+57458
+57459
+57460
+57461
+57462
+57463
+57464
+57465
+57466
+57467
+57468
+57469
+57470
+57471
+57472
+57473
+57474
+57475
+57476
+57477
+57478
+57479
+57480
+57481
+57482
+57483
+57484
+57485
+57486
+57487
+57488
+57489
+57490
+57491
+57492
+57493
+57494
+57495
+57496
+57497
+57498
+57499
+57500
+57501
+57502
+57503
+57504
+57505
+57506
+57507
+57508
+57509
+57510
+57511
+57512
+57513
+57514
+57515
+57516
+57517
+57518
+57519
+57520
+57521
+57522
+57523
+57524
+57525
+57526
+57527
+57528
+57529
+57530
+57531
+57532
+57533
+57534
+57535
+57536
+57537
+57538
+57539
+57540
+57541
+57542
+57543
+57544
+57545
+57546
+57547
+57548
+57549
+57550
+57551
+57552
+57553
+57554
+57555
+57556
+57557
+57558
+57559
+57560
+57561
+57562
+57563
+57564
+57565
+57566
+57567
+57568
+57569
+57570
+57571
+57572
+57573
+57574
+57575
+57576
+57577
+57578
+57579
+57580
+57581
+57582
+57583
+57584
+57585
+57586
+57587
+57588
+57589
+57590
+57591
+57592
+57593
+57594
+57595
+57596
+57597
+57598
+57599
+57600
+57601
+57602
+57603
+57604
+57605
+57606
+57607
+57608
+57609
+57610
+57611
+57612
+57613
+57614
+57615
+57616
+57617
+57618
+57619
+57620
+57621
+57622
+57623
+57624
+57625
+57626
+57627
+57628
+57629
+57630
+57631
+57632
+57633
+57634
+57635
+57636
+57637
+57638
+57639
+57640
+57641
+57642
+57643
+57644
+57645
+57646
+57647
+57648
+57649
+57650
+57651
+57652
+57653
+57654
+57655
+57656
+57657
+57658
+57659
+57660
+57661
+57662
+57663
+57664
+57665
+57666
+57667
+57668
+57669
+57670
+57671
+57672
+57673
+57674
+57675
+57676
+57677
+57678
+57679
+57680
+57681
+57682
+57683
+57684
+57685
+57686
+57687
+57688
+57689
+57690
+57691
+57692
+57693
+57694
+57695
+57696
+57697
+57698
+57699
+57700
+57701
+57702
+57703
+57704
+57705
+57706
+57707
+57708
+57709
+57710
+57711
+57712
+57713
+57714
+57715
+57716
+57717
+57718
+57719
+57720
+57721
+57722
+57723
+57724
+57725
+57726
+57727
+57728
+57729
+57730
+57731
+57732
+57733
+57734
+57735
+57736
+57737
+57738
+57739
+57740
+57741
+57742
+57743
+57744
+57745
+57746
+57747
+57748
+57749
+57750
+57751
+57752
+57753
+57754
+57755
+57756
+57757
+57758
+57759
+57760
+57761
+57762
+57763
+57764
+57765
+57766
+57767
+57768
+57769
+57770
+57771
+57772
+57773
+57774
+57775
+57776
+57777
+57778
+57779
+57780
+57781
+57782
+57783
+57784
+57785
+57786
+57787
+57788
+57789
+57790
+57791
+57792
+57793
+57794
+57795
+57796
+57797
+57798
+57799
+57800
+57801
+57802
+57803
+57804
+57805
+57806
+57807
+57808
+57809
+57810
+57811
+57812
+57813
+57814
+57815
+57816
+57817
+57818
+57819
+57820
+57821
+57822
+57823
+57824
+57825
+57826
+57827
+57828
+57829
+57830
+57831
+57832
+57833
+57834
+57835
+57836
+57837
+57838
+57839
+57840
+57841
+57842
+57843
+57844
+57845
+57846
+57847
+57848
+57849
+57850
+57851
+57852
+57853
+57854
+57855
+57856
+57857
+57858
+57859
+57860
+57861
+57862
+57863
+57864
+57865
+57866
+57867
+57868
+57869
+57870
+57871
+57872
+57873
+57874
+57875
+57876
+57877
+57878
+57879
+57880
+57881
+57882
+57883
+57884
+57885
+57886
+57887
+57888
+57889
+57890
+57891
+57892
+57893
+57894
+57895
+57896
+57897
+57898
+57899
+57900
+57901
+57902
+57903
+57904
+57905
+57906
+57907
+57908
+57909
+57910
+57911
+57912
+57913
+57914
+57915
+57916
+57917
+57918
+57919
+57920
+57921
+57922
+57923
+57924
+57925
+57926
+57927
+57928
+57929
+57930
+57931
+57932
+57933
+57934
+57935
+57936
+57937
+57938
+57939
+57940
+57941
+57942
+57943
+57944
+57945
+57946
+57947
+57948
+57949
+57950
+57951
+57952
+57953
+57954
+57955
+57956
+57957
+57958
+57959
+57960
+57961
+57962
+57963
+57964
+57965
+57966
+57967
+57968
+57969
+57970
+57971
+57972
+57973
+57974
+57975
+57976
+57977
+57978
+57979
+57980
+57981
+57982
+57983
+57984
+57985
+57986
+57987
+57988
+57989
+57990
+57991
+57992
+57993
+57994
+57995
+57996
+57997
+57998
+57999
+58000
+58001
+58002
+58003
+58004
+58005
+58006
+58007
+58008
+58009
+58010
+58011
+58012
+58013
+58014
+58015
+58016
+58017
+58018
+58019
+58020
+58021
+58022
+58023
+58024
+58025
+58026
+58027
+58028
+58029
+58030
+58031
+58032
+58033
+58034
+58035
+58036
+58037
+58038
+58039
+58040
+58041
+58042
+58043
+58044
+58045
+58046
+58047
+58048
+58049
+58050
+58051
+58052
+58053
+58054
+58055
+58056
+58057
+58058
+58059
+58060
+58061
+58062
+58063
+58064
+58065
+58066
+58067
+58068
+58069
+58070
+58071
+58072
+58073
+58074
+58075
+58076
+58077
+58078
+58079
+58080
+58081
+58082
+58083
+58084
+58085
+58086
+58087
+58088
+58089
+58090
+58091
+58092
+58093
+58094
+58095
+58096
+58097
+58098
+58099
+58100
+58101
+58102
+58103
+58104
+58105
+58106
+58107
+58108
+58109
+58110
+58111
+58112
+58113
+58114
+58115
+58116
+58117
+58118
+58119
+58120
+58121
+58122
+58123
+58124
+58125
+58126
+58127
+58128
+58129
+58130
+58131
+58132
+58133
+58134
+58135
+58136
+58137
+58138
+58139
+58140
+58141
+58142
+58143
+58144
+58145
+58146
+58147
+58148
+58149
+58150
+58151
+58152
+58153
+58154
+58155
+58156
+58157
+58158
+58159
+58160
+58161
+58162
+58163
+58164
+58165
+58166
+58167
+58168
+58169
+58170
+58171
+58172
+58173
+58174
+58175
+58176
+58177
+58178
+58179
+58180
+58181
+58182
+58183
+58184
+58185
+58186
+58187
+58188
+58189
+58190
+58191
+58192
+58193
+58194
+58195
+58196
+58197
+58198
+58199
+58200
+58201
+58202
+58203
+58204
+58205
+58206
+58207
+58208
+58209
+58210
+58211
+58212
+58213
+58214
+58215
+58216
+58217
+58218
+58219
+58220
+58221
+58222
+58223
+58224
+58225
+58226
+58227
+58228
+58229
+58230
+58231
+58232
+58233
+58234
+58235
+58236
+58237
+58238
+58239
+58240
+58241
+58242
+58243
+58244
+58245
+58246
+58247
+58248
+58249
+58250
+58251
+58252
+58253
+58254
+58255
+58256
+58257
+58258
+58259
+58260
+58261
+58262
+58263
+58264
+58265
+58266
+58267
+58268
+58269
+58270
+58271
+58272
+58273
+58274
+58275
+58276
+58277
+58278
+58279
+58280
+58281
+58282
+58283
+58284
+58285
+58286
+58287
+58288
+58289
+58290
+58291
+58292
+58293
+58294
+58295
+58296
+58297
+58298
+58299
+58300
+58301
+58302
+58303
+58304
+58305
+58306
+58307
+58308
+58309
+58310
+58311
+58312
+58313
+58314
+58315
+58316
+58317
+58318
+58319
+58320
+58321
+58322
+58323
+58324
+58325
+58326
+58327
+58328
+58329
+58330
+58331
+58332
+58333
+58334
+58335
+58336
+58337
+58338
+58339
+58340
+58341
+58342
+58343
+58344
+58345
+58346
+58347
+58348
+58349
+58350
+58351
+58352
+58353
+58354
+58355
+58356
+58357
+58358
+58359
+58360
+58361
+58362
+58363
+58364
+58365
+58366
+58367
+58368
+58369
+58370
+58371
+58372
+58373
+58374
+58375
+58376
+58377
+58378
+58379
+58380
+58381
+58382
+58383
+58384
+58385
+58386
+58387
+58388
+58389
+58390
+58391
+58392
+58393
+58394
+58395
+58396
+58397
+58398
+58399
+58400
+58401
+58402
+58403
+58404
+58405
+58406
+58407
+58408
+58409
+58410
+58411
+58412
+58413
+58414
+58415
+58416
+58417
+58418
+58419
+58420
+58421
+58422
+58423
+58424
+58425
+58426
+58427
+58428
+58429
+58430
+58431
+58432
+58433
+58434
+58435
+58436
+58437
+58438
+58439
+58440
+58441
+58442
+58443
+58444
+58445
+58446
+58447
+58448
+58449
+58450
+58451
+58452
+58453
+58454
+58455
+58456
+58457
+58458
+58459
+58460
+58461
+58462
+58463
+58464
+58465
+58466
+58467
+58468
+58469
+58470
+58471
+58472
+58473
+58474
+58475
+58476
+58477
+58478
+58479
+58480
+58481
+58482
+58483
+58484
+58485
+58486
+58487
+58488
+58489
+58490
+58491
+58492
+58493
+58494
+58495
+58496
+58497
+58498
+58499
+58500
+58501
+58502
+58503
+58504
+58505
+58506
+58507
+58508
+58509
+58510
+58511
+58512
+58513
+58514
+58515
+58516
+58517
+58518
+58519
+58520
+58521
+58522
+58523
+58524
+58525
+58526
+58527
+58528
+58529
+58530
+58531
+58532
+58533
+58534
+58535
+58536
+58537
+58538
+58539
+58540
+58541
+58542
+58543
+58544
+58545
+58546
+58547
+58548
+58549
+58550
+58551
+58552
+58553
+58554
+58555
+58556
+58557
+58558
+58559
+58560
+58561
+58562
+58563
+58564
+58565
+58566
+58567
+58568
+58569
+58570
+58571
+58572
+58573
+58574
+58575
+58576
+58577
+58578
+58579
+58580
+58581
+58582
+58583
+58584
+58585
+58586
+58587
+58588
+58589
+58590
+58591
+58592
+58593
+58594
+58595
+58596
+58597
+58598
+58599
+58600
+58601
+58602
+58603
+58604
+58605
+58606
+58607
+58608
+58609
+58610
+58611
+58612
+58613
+58614
+58615
+58616
+58617
+58618
+58619
+58620
+58621
+58622
+58623
+58624
+58625
+58626
+58627
+58628
+58629
+58630
+58631
+58632
+58633
+58634
+58635
+58636
+58637
+58638
+58639
+58640
+58641
+58642
+58643
+58644
+58645
+58646
+58647
+58648
+58649
+58650
+58651
+58652
+58653
+58654
+58655
+58656
+58657
+58658
+58659
+58660
+58661
+58662
+58663
+58664
+58665
+58666
+58667
+58668
+58669
+58670
+58671
+58672
+58673
+58674
+58675
+58676
+58677
+58678
+58679
+58680
+58681
+58682
+58683
+58684
+58685
+58686
+58687
+58688
+58689
+58690
+58691
+58692
+58693
+58694
+58695
+58696
+58697
+58698
+58699
+58700
+58701
+58702
+58703
+58704
+58705
+58706
+58707
+58708
+58709
+58710
+58711
+58712
+58713
+58714
+58715
+58716
+58717
+58718
+58719
+58720
+58721
+58722
+58723
+58724
+58725
+58726
+58727
+58728
+58729
+58730
+58731
+58732
+58733
+58734
+58735
+58736
+58737
+58738
+58739
+58740
+58741
+58742
+58743
+58744
+58745
+58746
+58747
+58748
+58749
+58750
+58751
+58752
+58753
+58754
+58755
+58756
+58757
+58758
+58759
+58760
+58761
+58762
+58763
+58764
+58765
+58766
+58767
+58768
+58769
+58770
+58771
+58772
+58773
+58774
+58775
+58776
+58777
+58778
+58779
+58780
+58781
+58782
+58783
+58784
+58785
+58786
+58787
+58788
+58789
+58790
+58791
+58792
+58793
+58794
+58795
+58796
+58797
+58798
+58799
+58800
+58801
+58802
+58803
+58804
+58805
+58806
+58807
+58808
+58809
+58810
+58811
+58812
+58813
+58814
+58815
+58816
+58817
+58818
+58819
+58820
+58821
+58822
+58823
+58824
+58825
+58826
+58827
+58828
+58829
+58830
+58831
+58832
+58833
+58834
+58835
+58836
+58837
+58838
+58839
+58840
+58841
+58842
+58843
+58844
+58845
+58846
+58847
+58848
+58849
+58850
+58851
+58852
+58853
+58854
+58855
+58856
+58857
+58858
+58859
+58860
+58861
+58862
+58863
+58864
+58865
+58866
+58867
+58868
+58869
+58870
+58871
+58872
+58873
+58874
+58875
+58876
+58877
+58878
+58879
+58880
+58881
+58882
+58883
+58884
+58885
+58886
+58887
+58888
+58889
+58890
+58891
+58892
+58893
+58894
+58895
+58896
+58897
+58898
+58899
+58900
+58901
+58902
+58903
+58904
+58905
+58906
+58907
+58908
+58909
+58910
+58911
+58912
+58913
+58914
+58915
+58916
+58917
+58918
+58919
+58920
+58921
+58922
+58923
+58924
+58925
+58926
+58927
+58928
+58929
+58930
+58931
+58932
+58933
+58934
+58935
+58936
+58937
+58938
+58939
+58940
+58941
+58942
+58943
+58944
+58945
+58946
+58947
+58948
+58949
+58950
+58951
+58952
+58953
+58954
+58955
+58956
+58957
+58958
+58959
+58960
+58961
+58962
+58963
+58964
+58965
+58966
+58967
+58968
+58969
+58970
+58971
+58972
+58973
+58974
+58975
+58976
+58977
+58978
+58979
+58980
+58981
+58982
+58983
+58984
+58985
+58986
+58987
+58988
+58989
+58990
+58991
+58992
+58993
+58994
+58995
+58996
+58997
+58998
+58999
+59000
+59001
+59002
+59003
+59004
+59005
+59006
+59007
+59008
+59009
+59010
+59011
+59012
+59013
+59014
+59015
+59016
+59017
+59018
+59019
+59020
+59021
+59022
+59023
+59024
+59025
+59026
+59027
+59028
+59029
+59030
+59031
+59032
+59033
+59034
+59035
+59036
+59037
+59038
+59039
+59040
+59041
+59042
+59043
+59044
+59045
+59046
+59047
+59048
+59049
+59050
+59051
+59052
+59053
+59054
+59055
+59056
+59057
+59058
+59059
+59060
+59061
+59062
+59063
+59064
+59065
+59066
+59067
+59068
+59069
+59070
+59071
+59072
+59073
+59074
+59075
+59076
+59077
+59078
+59079
+59080
+59081
+59082
+59083
+59084
+59085
+59086
+59087
+59088
+59089
+59090
+59091
+59092
+59093
+59094
+59095
+59096
+59097
+59098
+59099
+59100
+59101
+59102
+59103
+59104
+59105
+59106
+59107
+59108
+59109
+59110
+59111
+59112
+59113
+59114
+59115
+59116
+59117
+59118
+59119
+59120
+59121
+59122
+59123
+59124
+59125
+59126
+59127
+59128
+59129
+59130
+59131
+59132
+59133
+59134
+59135
+59136
+59137
+59138
+59139
+59140
+59141
+59142
+59143
+59144
+59145
+59146
+59147
+59148
+59149
+59150
+59151
+59152
+59153
+59154
+59155
+59156
+59157
+59158
+59159
+59160
+59161
+59162
+59163
+59164
+59165
+59166
+59167
+59168
+59169
+59170
+59171
+59172
+59173
+59174
+59175
+59176
+59177
+59178
+59179
+59180
+59181
+59182
+59183
+59184
+59185
+59186
+59187
+59188
+59189
+59190
+59191
+59192
+59193
+59194
+59195
+59196
+59197
+59198
+59199
+59200
+59201
+59202
+59203
+59204
+59205
+59206
+59207
+59208
+59209
+59210
+59211
+59212
+59213
+59214
+59215
+59216
+59217
+59218
+59219
+59220
+59221
+59222
+59223
+59224
+59225
+59226
+59227
+59228
+59229
+59230
+59231
+59232
+59233
+59234
+59235
+59236
+59237
+59238
+59239
+59240
+59241
+59242
+59243
+59244
+59245
+59246
+59247
+59248
+59249
+59250
+59251
+59252
+59253
+59254
+59255
+59256
+59257
+59258
+59259
+59260
+59261
+59262
+59263
+59264
+59265
+59266
+59267
+59268
+59269
+59270
+59271
+59272
+59273
+59274
+59275
+59276
+59277
+59278
+59279
+59280
+59281
+59282
+59283
+59284
+59285
+59286
+59287
+59288
+59289
+59290
+59291
+59292
+59293
+59294
+59295
+59296
+59297
+59298
+59299
+59300
+59301
+59302
+59303
+59304
+59305
+59306
+59307
+59308
+59309
+59310
+59311
+59312
+59313
+59314
+59315
+59316
+59317
+59318
+59319
+59320
+59321
+59322
+59323
+59324
+59325
+59326
+59327
+59328
+59329
+59330
+59331
+59332
+59333
+59334
+59335
+59336
+59337
+59338
+59339
+59340
+59341
+59342
+59343
+59344
+59345
+59346
+59347
+59348
+59349
+59350
+59351
+59352
+59353
+59354
+59355
+59356
+59357
+59358
+59359
+59360
+59361
+59362
+59363
+59364
+59365
+59366
+59367
+59368
+59369
+59370
+59371
+59372
+59373
+59374
+59375
+59376
+59377
+59378
+59379
+59380
+59381
+59382
+59383
+59384
+59385
+59386
+59387
+59388
+59389
+59390
+59391
+59392
+59393
+59394
+59395
+59396
+59397
+59398
+59399
+59400
+59401
+59402
+59403
+59404
+59405
+59406
+59407
+59408
+59409
+59410
+59411
+59412
+59413
+59414
+59415
+59416
+59417
+59418
+59419
+59420
+59421
+59422
+59423
+59424
+59425
+59426
+59427
+59428
+59429
+59430
+59431
+59432
+59433
+59434
+59435
+59436
+59437
+59438
+59439
+59440
+59441
+59442
+59443
+59444
+59445
+59446
+59447
+59448
+59449
+59450
+59451
+59452
+59453
+59454
+59455
+59456
+59457
+59458
+59459
+59460
+59461
+59462
+59463
+59464
+59465
+59466
+59467
+59468
+59469
+59470
+59471
+59472
+59473
+59474
+59475
+59476
+59477
+59478
+59479
+59480
+59481
+59482
+59483
+59484
+59485
+59486
+59487
+59488
+59489
+59490
+59491
+59492
+59493
+59494
+59495
+59496
+59497
+59498
+59499
+59500
+59501
+59502
+59503
+59504
+59505
+59506
+59507
+59508
+59509
+59510
+59511
+59512
+59513
+59514
+59515
+59516
+59517
+59518
+59519
+59520
+59521
+59522
+59523
+59524
+59525
+59526
+59527
+59528
+59529
+59530
+59531
+59532
+59533
+59534
+59535
+59536
+59537
+59538
+59539
+59540
+59541
+59542
+59543
+59544
+59545
+59546
+59547
+59548
+59549
+59550
+59551
+59552
+59553
+59554
+59555
+59556
+59557
+59558
+59559
+59560
+59561
+59562
+59563
+59564
+59565
+59566
+59567
+59568
+59569
+59570
+59571
+59572
+59573
+59574
+59575
+59576
+59577
+59578
+59579
+59580
+59581
+59582
+59583
+59584
+59585
+59586
+59587
+59588
+59589
+59590
+59591
+59592
+59593
+59594
+59595
+59596
+59597
+59598
+59599
+59600
+59601
+59602
+59603
+59604
+59605
+59606
+59607
+59608
+59609
+59610
+59611
+59612
+59613
+59614
+59615
+59616
+59617
+59618
+59619
+59620
+59621
+59622
+59623
+59624
+59625
+59626
+59627
+59628
+59629
+59630
+59631
+59632
+59633
+59634
+59635
+59636
+59637
+59638
+59639
+59640
+59641
+59642
+59643
+59644
+59645
+59646
+59647
+59648
+59649
+59650
+59651
+59652
+59653
+59654
+59655
+59656
+59657
+59658
+59659
+59660
+59661
+59662
+59663
+59664
+59665
+59666
+59667
+59668
+59669
+59670
+59671
+59672
+59673
+59674
+59675
+59676
+59677
+59678
+59679
+59680
+59681
+59682
+59683
+59684
+59685
+59686
+59687
+59688
+59689
+59690
+59691
+59692
+59693
+59694
+59695
+59696
+59697
+59698
+59699
+59700
+59701
+59702
+59703
+59704
+59705
+59706
+59707
+59708
+59709
+59710
+59711
+59712
+59713
+59714
+59715
+59716
+59717
+59718
+59719
+59720
+59721
+59722
+59723
+59724
+59725
+59726
+59727
+59728
+59729
+59730
+59731
+59732
+59733
+59734
+59735
+59736
+59737
+59738
+59739
+59740
+59741
+59742
+59743
+59744
+59745
+59746
+59747
+59748
+59749
+59750
+59751
+59752
+59753
+59754
+59755
+59756
+59757
+59758
+59759
+59760
+59761
+59762
+59763
+59764
+59765
+59766
+59767
+59768
+59769
+59770
+59771
+59772
+59773
+59774
+59775
+59776
+59777
+59778
+59779
+59780
+59781
+59782
+59783
+59784
+59785
+59786
+59787
+59788
+59789
+59790
+59791
+59792
+59793
+59794
+59795
+59796
+59797
+59798
+59799
+59800
+59801
+59802
+59803
+59804
+59805
+59806
+59807
+59808
+59809
+59810
+59811
+59812
+59813
+59814
+59815
+59816
+59817
+59818
+59819
+59820
+59821
+59822
+59823
+59824
+59825
+59826
+59827
+59828
+59829
+59830
+59831
+59832
+59833
+59834
+59835
+59836
+59837
+59838
+59839
+59840
+59841
+59842
+59843
+59844
+59845
+59846
+59847
+59848
+59849
+59850
+59851
+59852
+59853
+59854
+59855
+59856
+59857
+59858
+59859
+59860
+59861
+59862
+59863
+59864
+59865
+59866
+59867
+59868
+59869
+59870
+59871
+59872
+59873
+59874
+59875
+59876
+59877
+59878
+59879
+59880
+59881
+59882
+59883
+59884
+59885
+59886
+59887
+59888
+59889
+59890
+59891
+59892
+59893
+59894
+59895
+59896
+59897
+59898
+59899
+59900
+59901
+59902
+59903
+59904
+59905
+59906
+59907
+59908
+59909
+59910
+59911
+59912
+59913
+59914
+59915
+59916
+59917
+59918
+59919
+59920
+59921
+59922
+59923
+59924
+59925
+59926
+59927
+59928
+59929
+59930
+59931
+59932
+59933
+59934
+59935
+59936
+59937
+59938
+59939
+59940
+59941
+59942
+59943
+59944
+59945
+59946
+59947
+59948
+59949
+59950
+59951
+59952
+59953
+59954
+59955
+59956
+59957
+59958
+59959
+59960
+59961
+59962
+59963
+59964
+59965
+59966
+59967
+59968
+59969
+59970
+59971
+59972
+59973
+59974
+59975
+59976
+59977
+59978
+59979
+59980
+59981
+59982
+59983
+59984
+59985
+59986
+59987
+59988
+59989
+59990
+59991
+59992
+59993
+59994
+59995
+59996
+59997
+59998
+59999
+60000
+60001
+60002
+60003
+60004
+60005
+60006
+60007
+60008
+60009
+60010
+60011
+60012
+60013
+60014
+60015
+60016
+60017
+60018
+60019
+60020
+60021
+60022
+60023
+60024
+60025
+60026
+60027
+60028
+60029
+60030
+60031
+60032
+60033
+60034
+60035
+60036
+60037
+60038
+60039
+60040
+60041
+60042
+60043
+60044
+60045
+60046
+60047
+60048
+60049
+60050
+60051
+60052
+60053
+60054
+60055
+60056
+60057
+60058
+60059
+60060
+60061
+60062
+60063
+60064
+60065
+60066
+60067
+60068
+60069
+60070
+60071
+60072
+60073
+60074
+60075
+60076
+60077
+60078
+60079
+60080
+60081
+60082
+60083
+60084
+60085
+60086
+60087
+60088
+60089
+60090
+60091
+60092
+60093
+60094
+60095
+60096
+60097
+60098
+60099
+60100
+60101
+60102
+60103
+60104
+60105
+60106
+60107
+60108
+60109
+60110
+60111
+60112
+60113
+60114
+60115
+60116
+60117
+60118
+60119
+60120
+60121
+60122
+60123
+60124
+60125
+60126
+60127
+60128
+60129
+60130
+60131
+60132
+60133
+60134
+60135
+60136
+60137
+60138
+60139
+60140
+60141
+60142
+60143
+60144
+60145
+60146
+60147
+60148
+60149
+60150
+60151
+60152
+60153
+60154
+60155
+60156
+60157
+60158
+60159
+60160
+60161
+60162
+60163
+60164
+60165
+60166
+60167
+60168
+60169
+60170
+60171
+60172
+60173
+60174
+60175
+60176
+60177
+60178
+60179
+60180
+60181
+60182
+60183
+60184
+60185
+60186
+60187
+60188
+60189
+60190
+60191
+60192
+60193
+60194
+60195
+60196
+60197
+60198
+60199
+60200
+60201
+60202
+60203
+60204
+60205
+60206
+60207
+60208
+60209
+60210
+60211
+60212
+60213
+60214
+60215
+60216
+60217
+60218
+60219
+60220
+60221
+60222
+60223
+60224
+60225
+60226
+60227
+60228
+60229
+60230
+60231
+60232
+60233
+60234
+60235
+60236
+60237
+60238
+60239
+60240
+60241
+60242
+60243
+60244
+60245
+60246
+60247
+60248
+60249
+60250
+60251
+60252
+60253
+60254
+60255
+60256
+60257
+60258
+60259
+60260
+60261
+60262
+60263
+60264
+60265
+60266
+60267
+60268
+60269
+60270
+60271
+60272
+60273
+60274
+60275
+60276
+60277
+60278
+60279
+60280
+60281
+60282
+60283
+60284
+60285
+60286
+60287
+60288
+60289
+60290
+60291
+60292
+60293
+60294
+60295
+60296
+60297
+60298
+60299
+60300
+60301
+60302
+60303
+60304
+60305
+60306
+60307
+60308
+60309
+60310
+60311
+60312
+60313
+60314
+60315
+60316
+60317
+60318
+60319
+60320
+60321
+60322
+60323
+60324
+60325
+60326
+60327
+60328
+60329
+60330
+60331
+60332
+60333
+60334
+60335
+60336
+60337
+60338
+60339
+60340
+60341
+60342
+60343
+60344
+60345
+60346
+60347
+60348
+60349
+60350
+60351
+60352
+60353
+60354
+60355
+60356
+60357
+60358
+60359
+60360
+60361
+60362
+60363
+60364
+60365
+60366
+60367
+60368
+60369
+60370
+60371
+60372
+60373
+60374
+60375
+60376
+60377
+60378
+60379
+60380
+60381
+60382
+60383
+60384
+60385
+60386
+60387
+60388
+60389
+60390
+60391
+60392
+60393
+60394
+60395
+60396
+60397
+60398
+60399
+60400
+60401
+60402
+60403
+60404
+60405
+60406
+60407
+60408
+60409
+60410
+60411
+60412
+60413
+60414
+60415
+60416
+60417
+60418
+60419
+60420
+60421
+60422
+60423
+60424
+60425
+60426
+60427
+60428
+60429
+60430
+60431
+60432
+60433
+60434
+60435
+60436
+60437
+60438
+60439
+60440
+60441
+60442
+60443
+60444
+60445
+60446
+60447
+60448
+60449
+60450
+60451
+60452
+60453
+60454
+60455
+60456
+60457
+60458
+60459
+60460
+60461
+60462
+60463
+60464
+60465
+60466
+60467
+60468
+60469
+60470
+60471
+60472
+60473
+60474
+60475
+60476
+60477
+60478
+60479
+60480
+60481
+60482
+60483
+60484
+60485
+60486
+60487
+60488
+60489
+60490
+60491
+60492
+60493
+60494
+60495
+60496
+60497
+60498
+60499
+60500
+60501
+60502
+60503
+60504
+60505
+60506
+60507
+60508
+60509
+60510
+60511
+60512
+60513
+60514
+60515
+60516
+60517
+60518
+60519
+60520
+60521
+60522
+60523
+60524
+60525
+60526
+60527
+60528
+60529
+60530
+60531
+60532
+60533
+60534
+60535
+60536
+60537
+60538
+60539
+60540
+60541
+60542
+60543
+60544
+60545
+60546
+60547
+60548
+60549
+60550
+60551
+60552
+60553
+60554
+60555
+60556
+60557
+60558
+60559
+60560
+60561
+60562
+60563
+60564
+60565
+60566
+60567
+60568
+60569
+60570
+60571
+60572
+60573
+60574
+60575
+60576
+60577
+60578
+60579
+60580
+60581
+60582
+60583
+60584
+60585
+60586
+60587
+60588
+60589
+60590
+60591
+60592
+60593
+60594
+60595
+60596
+60597
+60598
+60599
+60600
+60601
+60602
+60603
+60604
+60605
+60606
+60607
+60608
+60609
+60610
+60611
+60612
+60613
+60614
+60615
+60616
+60617
+60618
+60619
+60620
+60621
+60622
+60623
+60624
+60625
+60626
+60627
+60628
+60629
+60630
+60631
+60632
+60633
+60634
+60635
+60636
+60637
+60638
+60639
+60640
+60641
+60642
+60643
+60644
+60645
+60646
+60647
+60648
+60649
+60650
+60651
+60652
+60653
+60654
+60655
+60656
+60657
+60658
+60659
+60660
+60661
+60662
+60663
+60664
+60665
+60666
+60667
+60668
+60669
+60670
+60671
+60672
+60673
+60674
+60675
+60676
+60677
+60678
+60679
+60680
+60681
+60682
+60683
+60684
+60685
+60686
+60687
+60688
+60689
+60690
+60691
+60692
+60693
+60694
+60695
+60696
+60697
+60698
+60699
+60700
+60701
+60702
+60703
+60704
+60705
+60706
+60707
+60708
+60709
+60710
+60711
+60712
+60713
+60714
+60715
+60716
+60717
+60718
+60719
+60720
+60721
+60722
+60723
+60724
+60725
+60726
+60727
+60728
+60729
+60730
+60731
+60732
+60733
+60734
+60735
+60736
+60737
+60738
+60739
+60740
+60741
+60742
+60743
+60744
+60745
+60746
+60747
+60748
+60749
+60750
+60751
+60752
+60753
+60754
+60755
+60756
+60757
+60758
+60759
+60760
+60761
+60762
+60763
+60764
+60765
+60766
+60767
+60768
+60769
+60770
+60771
+60772
+60773
+60774
+60775
+60776
+60777
+60778
+60779
+60780
+60781
+60782
+60783
+60784
+60785
+60786
+60787
+60788
+60789
+60790
+60791
+60792
+60793
+60794
+60795
+60796
+60797
+60798
+60799
+60800
+60801
+60802
+60803
+60804
+60805
+60806
+60807
+60808
+60809
+60810
+60811
+60812
+60813
+60814
+60815
+60816
+60817
+60818
+60819
+60820
+60821
+60822
+60823
+60824
+60825
+60826
+60827
+60828
+60829
+60830
+60831
+60832
+60833
+60834
+60835
+60836
+60837
+60838
+60839
+60840
+60841
+60842
+60843
+60844
+60845
+60846
+60847
+60848
+60849
+60850
+60851
+60852
+60853
+60854
+60855
+60856
+60857
+60858
+60859
+60860
+60861
+60862
+60863
+60864
+60865
+60866
+60867
+60868
+60869
+60870
+60871
+60872
+60873
+60874
+60875
+60876
+60877
+60878
+60879
+60880
+60881
+60882
+60883
+60884
+60885
+60886
+60887
+60888
+60889
+60890
+60891
+60892
+60893
+60894
+60895
+60896
+60897
+60898
+60899
+60900
+60901
+60902
+60903
+60904
+60905
+60906
+60907
+60908
+60909
+60910
+60911
+60912
+60913
+60914
+60915
+60916
+60917
+60918
+60919
+60920
+60921
+60922
+60923
+60924
+60925
+60926
+60927
+60928
+60929
+60930
+60931
+60932
+60933
+60934
+60935
+60936
+60937
+60938
+60939
+60940
+60941
+60942
+60943
+60944
+60945
+60946
+60947
+60948
+60949
+60950
+60951
+60952
+60953
+60954
+60955
+60956
+60957
+60958
+60959
+60960
+60961
+60962
+60963
+60964
+60965
+60966
+60967
+60968
+60969
+60970
+60971
+60972
+60973
+60974
+60975
+60976
+60977
+60978
+60979
+60980
+60981
+60982
+60983
+60984
+60985
+60986
+60987
+60988
+60989
+60990
+60991
+60992
+60993
+60994
+60995
+60996
+60997
+60998
+60999
+61000
+61001
+61002
+61003
+61004
+61005
+61006
+61007
+61008
+61009
+61010
+61011
+61012
+61013
+61014
+61015
+61016
+61017
+61018
+61019
+61020
+61021
+61022
+61023
+61024
+61025
+61026
+61027
+61028
+61029
+61030
+61031
+61032
+61033
+61034
+61035
+61036
+61037
+61038
+61039
+61040
+61041
+61042
+61043
+61044
+61045
+61046
+61047
+61048
+61049
+61050
+61051
+61052
+61053
+61054
+61055
+61056
+61057
+61058
+61059
+61060
+61061
+61062
+61063
+61064
+61065
+61066
+61067
+61068
+61069
+61070
+61071
+61072
+61073
+61074
+61075
+61076
+61077
+61078
+61079
+61080
+61081
+61082
+61083
+61084
+61085
+61086
+61087
+61088
+61089
+61090
+61091
+61092
+61093
+61094
+61095
+61096
+61097
+61098
+61099
+61100
+61101
+61102
+61103
+61104
+61105
+61106
+61107
+61108
+61109
+61110
+61111
+61112
+61113
+61114
+61115
+61116
+61117
+61118
+61119
+61120
+61121
+61122
+61123
+61124
+61125
+61126
+61127
+61128
+61129
+61130
+61131
+61132
+61133
+61134
+61135
+61136
+61137
+61138
+61139
+61140
+61141
+61142
+61143
+61144
+61145
+61146
+61147
+61148
+61149
+61150
+61151
+61152
+61153
+61154
+61155
+61156
+61157
+61158
+61159
+61160
+61161
+61162
+61163
+61164
+61165
+61166
+61167
+61168
+61169
+61170
+61171
+61172
+61173
+61174
+61175
+61176
+61177
+61178
+61179
+61180
+61181
+61182
+61183
+61184
+61185
+61186
+61187
+61188
+61189
+61190
+61191
+61192
+61193
+61194
+61195
+61196
+61197
+61198
+61199
+61200
+61201
+61202
+61203
+61204
+61205
+61206
+61207
+61208
+61209
+61210
+61211
+61212
+61213
+61214
+61215
+61216
+61217
+61218
+61219
+61220
+61221
+61222
+61223
+61224
+61225
+61226
+61227
+61228
+61229
+61230
+61231
+61232
+61233
+61234
+61235
+61236
+61237
+61238
+61239
+61240
+61241
+61242
+61243
+61244
+61245
+61246
+61247
+61248
+61249
+61250
+61251
+61252
+61253
+61254
+61255
+61256
+61257
+61258
+61259
+61260
+61261
+61262
+61263
+61264
+61265
+61266
+61267
+61268
+61269
+61270
+61271
+61272
+61273
+61274
+61275
+61276
+61277
+61278
+61279
+61280
+61281
+61282
+61283
+61284
+61285
+61286
+61287
+61288
+61289
+61290
+61291
+61292
+61293
+61294
+61295
+61296
+61297
+61298
+61299
+61300
+61301
+61302
+61303
+61304
+61305
+61306
+61307
+61308
+61309
+61310
+61311
+61312
+61313
+61314
+61315
+61316
+61317
+61318
+61319
+61320
+61321
+61322
+61323
+61324
+61325
+61326
+61327
+61328
+61329
+61330
+61331
+61332
+61333
+61334
+61335
+61336
+61337
+61338
+61339
+61340
+61341
+61342
+61343
+61344
+61345
+61346
+61347
+61348
+61349
+61350
+61351
+61352
+61353
+61354
+61355
+61356
+61357
+61358
+61359
+61360
+61361
+61362
+61363
+61364
+61365
+61366
+61367
+61368
+61369
+61370
+61371
+61372
+61373
+61374
+61375
+61376
+61377
+61378
+61379
+61380
+61381
+61382
+61383
+61384
+61385
+61386
+61387
+61388
+61389
+61390
+61391
+61392
+61393
+61394
+61395
+61396
+61397
+61398
+61399
+61400
+61401
+61402
+61403
+61404
+61405
+61406
+61407
+61408
+61409
+61410
+61411
+61412
+61413
+61414
+61415
+61416
+61417
+61418
+61419
+61420
+61421
+61422
+61423
+61424
+61425
+61426
+61427
+61428
+61429
+61430
+61431
+61432
+61433
+61434
+61435
+61436
+61437
+61438
+61439
+61440
+61441
+61442
+61443
+61444
+61445
+61446
+61447
+61448
+61449
+61450
+61451
+61452
+61453
+61454
+61455
+61456
+61457
+61458
+61459
+61460
+61461
+61462
+61463
+61464
+61465
+61466
+61467
+61468
+61469
+61470
+61471
+61472
+61473
+61474
+61475
+61476
+61477
+61478
+61479
+61480
+61481
+61482
+61483
+61484
+61485
+61486
+61487
+61488
+61489
+61490
+61491
+61492
+61493
+61494
+61495
+61496
+61497
+61498
+61499
+61500
+61501
+61502
+61503
+61504
+61505
+61506
+61507
+61508
+61509
+61510
+61511
+61512
+61513
+61514
+61515
+61516
+61517
+61518
+61519
+61520
+61521
+61522
+61523
+61524
+61525
+61526
+61527
+61528
+61529
+61530
+61531
+61532
+61533
+61534
+61535
+61536
+61537
+61538
+61539
+61540
+61541
+61542
+61543
+61544
+61545
+61546
+61547
+61548
+61549
+61550
+61551
+61552
+61553
+61554
+61555
+61556
+61557
+61558
+61559
+61560
+61561
+61562
+61563
+61564
+61565
+61566
+61567
+61568
+61569
+61570
+61571
+61572
+61573
+61574
+61575
+61576
+61577
+61578
+61579
+61580
+61581
+61582
+61583
+61584
+61585
+61586
+61587
+61588
+61589
+61590
+61591
+61592
+61593
+61594
+61595
+61596
+61597
+61598
+61599
+61600
+61601
+61602
+61603
+61604
+61605
+61606
+61607
+61608
+61609
+61610
+61611
+61612
+61613
+61614
+61615
+61616
+61617
+61618
+61619
+61620
+61621
+61622
+61623
+61624
+61625
+61626
+61627
+61628
+61629
+61630
+61631
+61632
+61633
+61634
+61635
+61636
+61637
+61638
+61639
+61640
+61641
+61642
+61643
+61644
+61645
+61646
+61647
+61648
+61649
+61650
+61651
+61652
+61653
+61654
+61655
+61656
+61657
+61658
+61659
+61660
+61661
+61662
+61663
+61664
+61665
+61666
+61667
+61668
+61669
+61670
+61671
+61672
+61673
+61674
+61675
+61676
+61677
+61678
+61679
+61680
+61681
+61682
+61683
+61684
+61685
+61686
+61687
+61688
+61689
+61690
+61691
+61692
+61693
+61694
+61695
+61696
+61697
+61698
+61699
+61700
+61701
+61702
+61703
+61704
+61705
+61706
+61707
+61708
+61709
+61710
+61711
+61712
+61713
+61714
+61715
+61716
+61717
+61718
+61719
+61720
+61721
+61722
+61723
+61724
+61725
+61726
+61727
+61728
+61729
+61730
+61731
+61732
+61733
+61734
+61735
+61736
+61737
+61738
+61739
+61740
+61741
+61742
+61743
+61744
+61745
+61746
+61747
+61748
+61749
+61750
+61751
+61752
+61753
+61754
+61755
+61756
+61757
+61758
+61759
+61760
+61761
+61762
+61763
+61764
+61765
+61766
+61767
+61768
+61769
+61770
+61771
+61772
+61773
+61774
+61775
+61776
+61777
+61778
+61779
+61780
+61781
+61782
+61783
+61784
+61785
+61786
+61787
+61788
+61789
+61790
+61791
+61792
+61793
+61794
+61795
+61796
+61797
+61798
+61799
+61800
+61801
+61802
+61803
+61804
+61805
+61806
+61807
+61808
+61809
+61810
+61811
+61812
+61813
+61814
+61815
+61816
+61817
+61818
+61819
+61820
+61821
+61822
+61823
+61824
+61825
+61826
+61827
+61828
+61829
+61830
+61831
+61832
+61833
+61834
+61835
+61836
+61837
+61838
+61839
+61840
+61841
+61842
+61843
+61844
+61845
+61846
+61847
+61848
+61849
+61850
+61851
+61852
+61853
+61854
+61855
+61856
+61857
+61858
+61859
+61860
+61861
+61862
+61863
+61864
+61865
+61866
+61867
+61868
+61869
+61870
+61871
+61872
+61873
+61874
+61875
+61876
+61877
+61878
+61879
+61880
+61881
+61882
+61883
+61884
+61885
+61886
+61887
+61888
+61889
+61890
+61891
+61892
+61893
+61894
+61895
+61896
+61897
+61898
+61899
+61900
+61901
+61902
+61903
+61904
+61905
+61906
+61907
+61908
+61909
+61910
+61911
+61912
+61913
+61914
+61915
+61916
+61917
+61918
+61919
+61920
+61921
+61922
+61923
+61924
+61925
+61926
+61927
+61928
+61929
+61930
+61931
+61932
+61933
+61934
+61935
+61936
+61937
+61938
+61939
+61940
+61941
+61942
+61943
+61944
+61945
+61946
+61947
+61948
+61949
+61950
+61951
+61952
+61953
+61954
+61955
+61956
+61957
+61958
+61959
+61960
+61961
+61962
+61963
+61964
+61965
+61966
+61967
+61968
+61969
+61970
+61971
+61972
+61973
+61974
+61975
+61976
+61977
+61978
+61979
+61980
+61981
+61982
+61983
+61984
+61985
+61986
+61987
+61988
+61989
+61990
+61991
+61992
+61993
+61994
+61995
+61996
+61997
+61998
+61999
+62000
+62001
+62002
+62003
+62004
+62005
+62006
+62007
+62008
+62009
+62010
+62011
+62012
+62013
+62014
+62015
+62016
+62017
+62018
+62019
+62020
+62021
+62022
+62023
+62024
+62025
+62026
+62027
+62028
+62029
+62030
+62031
+62032
+62033
+62034
+62035
+62036
+62037
+62038
+62039
+62040
+62041
+62042
+62043
+62044
+62045
+62046
+62047
+62048
+62049
+62050
+62051
+62052
+62053
+62054
+62055
+62056
+62057
+62058
+62059
+62060
+62061
+62062
+62063
+62064
+62065
+62066
+62067
+62068
+62069
+62070
+62071
+62072
+62073
+62074
+62075
+62076
+62077
+62078
+62079
+62080
+62081
+62082
+62083
+62084
+62085
+62086
+62087
+62088
+62089
+62090
+62091
+62092
+62093
+62094
+62095
+62096
+62097
+62098
+62099
+62100
+62101
+62102
+62103
+62104
+62105
+62106
+62107
+62108
+62109
+62110
+62111
+62112
+62113
+62114
+62115
+62116
+62117
+62118
+62119
+62120
+62121
+62122
+62123
+62124
+62125
+62126
+62127
+62128
+62129
+62130
+62131
+62132
+62133
+62134
+62135
+62136
+62137
+62138
+62139
+62140
+62141
+62142
+62143
+62144
+62145
+62146
+62147
+62148
+62149
+62150
+62151
+62152
+62153
+62154
+62155
+62156
+62157
+62158
+62159
+62160
+62161
+62162
+62163
+62164
+62165
+62166
+62167
+62168
+62169
+62170
+62171
+62172
+62173
+62174
+62175
+62176
+62177
+62178
+62179
+62180
+62181
+62182
+62183
+62184
+62185
+62186
+62187
+62188
+62189
+62190
+62191
+62192
+62193
+62194
+62195
+62196
+62197
+62198
+62199
+62200
+62201
+62202
+62203
+62204
+62205
+62206
+62207
+62208
+62209
+62210
+62211
+62212
+62213
+62214
+62215
+62216
+62217
+62218
+62219
+62220
+62221
+62222
+62223
+62224
+62225
+62226
+62227
+62228
+62229
+62230
+62231
+62232
+62233
+62234
+62235
+62236
+62237
+62238
+62239
+62240
+62241
+62242
+62243
+62244
+62245
+62246
+62247
+62248
+62249
+62250
+62251
+62252
+62253
+62254
+62255
+62256
+62257
+62258
+62259
+62260
+62261
+62262
+62263
+62264
+62265
+62266
+62267
+62268
+62269
+62270
+62271
+62272
+62273
+62274
+62275
+62276
+62277
+62278
+62279
+62280
+62281
+62282
+62283
+62284
+62285
+62286
+62287
+62288
+62289
+62290
+62291
+62292
+62293
+62294
+62295
+62296
+62297
+62298
+62299
+62300
+62301
+62302
+62303
+62304
+62305
+62306
+62307
+62308
+62309
+62310
+62311
+62312
+62313
+62314
+62315
+62316
+62317
+62318
+62319
+62320
+62321
+62322
+62323
+62324
+62325
+62326
+62327
+62328
+62329
+62330
+62331
+62332
+62333
+62334
+62335
+62336
+62337
+62338
+62339
+62340
+62341
+62342
+62343
+62344
+62345
+62346
+62347
+62348
+62349
+62350
+62351
+62352
+62353
+62354
+62355
+62356
+62357
+62358
+62359
+62360
+62361
+62362
+62363
+62364
+62365
+62366
+62367
+62368
+62369
+62370
+62371
+62372
+62373
+62374
+62375
+62376
+62377
+62378
+62379
+62380
+62381
+62382
+62383
+62384
+62385
+62386
+62387
+62388
+62389
+62390
+62391
+62392
+62393
+62394
+62395
+62396
+62397
+62398
+62399
+62400
+62401
+62402
+62403
+62404
+62405
+62406
+62407
+62408
+62409
+62410
+62411
+62412
+62413
+62414
+62415
+62416
+62417
+62418
+62419
+62420
+62421
+62422
+62423
+62424
+62425
+62426
+62427
+62428
+62429
+62430
+62431
+62432
+62433
+62434
+62435
+62436
+62437
+62438
+62439
+62440
+62441
+62442
+62443
+62444
+62445
+62446
+62447
+62448
+62449
+62450
+62451
+62452
+62453
+62454
+62455
+62456
+62457
+62458
+62459
+62460
+62461
+62462
+62463
+62464
+62465
+62466
+62467
+62468
+62469
+62470
+62471
+62472
+62473
+62474
+62475
+62476
+62477
+62478
+62479
+62480
+62481
+62482
+62483
+62484
+62485
+62486
+62487
+62488
+62489
+62490
+62491
+62492
+62493
+62494
+62495
+62496
+62497
+62498
+62499
+62500
+62501
+62502
+62503
+62504
+62505
+62506
+62507
+62508
+62509
+62510
+62511
+62512
+62513
+62514
+62515
+62516
+62517
+62518
+62519
+62520
+62521
+62522
+62523
+62524
+62525
+62526
+62527
+62528
+62529
+62530
+62531
+62532
+62533
+62534
+62535
+62536
+62537
+62538
+62539
+62540
+62541
+62542
+62543
+62544
+62545
+62546
+62547
+62548
+62549
+62550
+62551
+62552
+62553
+62554
+62555
+62556
+62557
+62558
+62559
+62560
+62561
+62562
+62563
+62564
+62565
+62566
+62567
+62568
+62569
+62570
+62571
+62572
+62573
+62574
+62575
+62576
+62577
+62578
+62579
+62580
+62581
+62582
+62583
+62584
+62585
+62586
+62587
+62588
+62589
+62590
+62591
+62592
+62593
+62594
+62595
+62596
+62597
+62598
+62599
+62600
+62601
+62602
+62603
+62604
+62605
+62606
+62607
+62608
+62609
+62610
+62611
+62612
+62613
+62614
+62615
+62616
+62617
+62618
+62619
+62620
+62621
+62622
+62623
+62624
+62625
+62626
+62627
+62628
+62629
+62630
+62631
+62632
+62633
+62634
+62635
+62636
+62637
+62638
+62639
+62640
+62641
+62642
+62643
+62644
+62645
+62646
+62647
+62648
+62649
+62650
+62651
+62652
+62653
+62654
+62655
+62656
+62657
+62658
+62659
+62660
+62661
+62662
+62663
+62664
+62665
+62666
+62667
+62668
+62669
+62670
+62671
+62672
+62673
+62674
+62675
+62676
+62677
+62678
+62679
+62680
+62681
+62682
+62683
+62684
+62685
+62686
+62687
+62688
+62689
+62690
+62691
+62692
+62693
+62694
+62695
+62696
+62697
+62698
+62699
+62700
+62701
+62702
+62703
+62704
+62705
+62706
+62707
+62708
+62709
+62710
+62711
+62712
+62713
+62714
+62715
+62716
+62717
+62718
+62719
+62720
+62721
+62722
+62723
+62724
+62725
+62726
+62727
+62728
+62729
+62730
+62731
+62732
+62733
+62734
+62735
+62736
+62737
+62738
+62739
+62740
+62741
+62742
+62743
+62744
+62745
+62746
+62747
+62748
+62749
+62750
+62751
+62752
+62753
+62754
+62755
+62756
+62757
+62758
+62759
+62760
+62761
+62762
+62763
+62764
+62765
+62766
+62767
+62768
+62769
+62770
+62771
+62772
+62773
+62774
+62775
+62776
+62777
+62778
+62779
+62780
+62781
+62782
+62783
+62784
+62785
+62786
+62787
+62788
+62789
+62790
+62791
+62792
+62793
+62794
+62795
+62796
+62797
+62798
+62799
+62800
+62801
+62802
+62803
+62804
+62805
+62806
+62807
+62808
+62809
+62810
+62811
+62812
+62813
+62814
+62815
+62816
+62817
+62818
+62819
+62820
+62821
+62822
+62823
+62824
+62825
+62826
+62827
+62828
+62829
+62830
+62831
+62832
+62833
+62834
+62835
+62836
+62837
+62838
+62839
+62840
+62841
+62842
+62843
+62844
+62845
+62846
+62847
+62848
+62849
+62850
+62851
+62852
+62853
+62854
+62855
+62856
+62857
+62858
+62859
+62860
+62861
+62862
+62863
+62864
+62865
+62866
+62867
+62868
+62869
+62870
+62871
+62872
+62873
+62874
+62875
+62876
+62877
+62878
+62879
+62880
+62881
+62882
+62883
+62884
+62885
+62886
+62887
+62888
+62889
+62890
+62891
+62892
+62893
+62894
+62895
+62896
+62897
+62898
+62899
+62900
+62901
+62902
+62903
+62904
+62905
+62906
+62907
+62908
+62909
+62910
+62911
+62912
+62913
+62914
+62915
+62916
+62917
+62918
+62919
+62920
+62921
+62922
+62923
+62924
+62925
+62926
+62927
+62928
+62929
+62930
+62931
+62932
+62933
+62934
+62935
+62936
+62937
+62938
+62939
+62940
+62941
+62942
+62943
+62944
+62945
+62946
+62947
+62948
+62949
+62950
+62951
+62952
+62953
+62954
+62955
+62956
+62957
+62958
+62959
+62960
+62961
+62962
+62963
+62964
+62965
+62966
+62967
+62968
+62969
+62970
+62971
+62972
+62973
+62974
+62975
+62976
+62977
+62978
+62979
+62980
+62981
+62982
+62983
+62984
+62985
+62986
+62987
+62988
+62989
+62990
+62991
+62992
+62993
+62994
+62995
+62996
+62997
+62998
+62999
+63000
+63001
+63002
+63003
+63004
+63005
+63006
+63007
+63008
+63009
+63010
+63011
+63012
+63013
+63014
+63015
+63016
+63017
+63018
+63019
+63020
+63021
+63022
+63023
+63024
+63025
+63026
+63027
+63028
+63029
+63030
+63031
+63032
+63033
+63034
+63035
+63036
+63037
+63038
+63039
+63040
+63041
+63042
+63043
+63044
+63045
+63046
+63047
+63048
+63049
+63050
+63051
+63052
+63053
+63054
+63055
+63056
+63057
+63058
+63059
+63060
+63061
+63062
+63063
+63064
+63065
+63066
+63067
+63068
+63069
+63070
+63071
+63072
+63073
+63074
+63075
+63076
+63077
+63078
+63079
+63080
+63081
+63082
+63083
+63084
+63085
+63086
+63087
+63088
+63089
+63090
+63091
+63092
+63093
+63094
+63095
+63096
+63097
+63098
+63099
+63100
+63101
+63102
+63103
+63104
+63105
+63106
+63107
+63108
+63109
+63110
+63111
+63112
+63113
+63114
+63115
+63116
+63117
+63118
+63119
+63120
+63121
+63122
+63123
+63124
+63125
+63126
+63127
+63128
+63129
+63130
+63131
+63132
+63133
+63134
+63135
+63136
+63137
+63138
+63139
+63140
+63141
+63142
+63143
+63144
+63145
+63146
+63147
+63148
+63149
+63150
+63151
+63152
+63153
+63154
+63155
+63156
+63157
+63158
+63159
+63160
+63161
+63162
+63163
+63164
+63165
+63166
+63167
+63168
+63169
+63170
+63171
+63172
+63173
+63174
+63175
+63176
+63177
+63178
+63179
+63180
+63181
+63182
+63183
+63184
+63185
+63186
+63187
+63188
+63189
+63190
+63191
+63192
+63193
+63194
+63195
+63196
+63197
+63198
+63199
+63200
+63201
+63202
+63203
+63204
+63205
+63206
+63207
+63208
+63209
+63210
+63211
+63212
+63213
+63214
+63215
+63216
+63217
+63218
+63219
+63220
+63221
+63222
+63223
+63224
+63225
+63226
+63227
+63228
+63229
+63230
+63231
+63232
+63233
+63234
+63235
+63236
+63237
+63238
+63239
+63240
+63241
+63242
+63243
+63244
+63245
+63246
+63247
+63248
+63249
+63250
+63251
+63252
+63253
+63254
+63255
+63256
+63257
+63258
+63259
+63260
+63261
+63262
+63263
+63264
+63265
+63266
+63267
+63268
+63269
+63270
+63271
+63272
+63273
+63274
+63275
+63276
+63277
+63278
+63279
+63280
+63281
+63282
+63283
+63284
+63285
+63286
+63287
+63288
+63289
+63290
+63291
+63292
+63293
+63294
+63295
+63296
+63297
+63298
+63299
+63300
+63301
+63302
+63303
+63304
+63305
+63306
+63307
+63308
+63309
+63310
+63311
+63312
+63313
+63314
+63315
+63316
+63317
+63318
+63319
+63320
+63321
+63322
+63323
+63324
+63325
+63326
+63327
+63328
+63329
+63330
+63331
+63332
+63333
+63334
+63335
+63336
+63337
+63338
+63339
+63340
+63341
+63342
+63343
+63344
+63345
+63346
+63347
+63348
+63349
+63350
+63351
+63352
+63353
+63354
+63355
+63356
+63357
+63358
+63359
+63360
+63361
+63362
+63363
+63364
+63365
+63366
+63367
+63368
+63369
+63370
+63371
+63372
+63373
+63374
+63375
+63376
+63377
+63378
+63379
+63380
+63381
+63382
+63383
+63384
+63385
+63386
+63387
+63388
+63389
+63390
+63391
+63392
+63393
+63394
+63395
+63396
+63397
+63398
+63399
+63400
+63401
+63402
+63403
+63404
+63405
+63406
+63407
+63408
+63409
+63410
+63411
+63412
+63413
+63414
+63415
+63416
+63417
+63418
+63419
+63420
+63421
+63422
+63423
+63424
+63425
+63426
+63427
+63428
+63429
+63430
+63431
+63432
+63433
+63434
+63435
+63436
+63437
+63438
+63439
+63440
+63441
+63442
+63443
+63444
+63445
+63446
+63447
+63448
+63449
+63450
+63451
+63452
+63453
+63454
+63455
+63456
+63457
+63458
+63459
+63460
+63461
+63462
+63463
+63464
+63465
+63466
+63467
+63468
+63469
+63470
+63471
+63472
+63473
+63474
+63475
+63476
+63477
+63478
+63479
+63480
+63481
+63482
+63483
+63484
+63485
+63486
+63487
+63488
+63489
+63490
+63491
+63492
+63493
+63494
+63495
+63496
+63497
+63498
+63499
+63500
+63501
+63502
+63503
+63504
+63505
+63506
+63507
+63508
+63509
+63510
+63511
+63512
+63513
+63514
+63515
+63516
+63517
+63518
+63519
+63520
+63521
+63522
+63523
+63524
+63525
+63526
+63527
+63528
+63529
+63530
+63531
+63532
+63533
+63534
+63535
+63536
+63537
+63538
+63539
+63540
+63541
+63542
+63543
+63544
+63545
+63546
+63547
+63548
+63549
+63550
+63551
+63552
+63553
+63554
+63555
+63556
+63557
+63558
+63559
+63560
+63561
+63562
+63563
+63564
+63565
+63566
+63567
+63568
+63569
+63570
+63571
+63572
+63573
+63574
+63575
+63576
+63577
+63578
+63579
+63580
+63581
+63582
+63583
+63584
+63585
+63586
+63587
+63588
+63589
+63590
+63591
+63592
+63593
+63594
+63595
+63596
+63597
+63598
+63599
+63600
+63601
+63602
+63603
+63604
+63605
+63606
+63607
+63608
+63609
+63610
+63611
+63612
+63613
+63614
+63615
+63616
+63617
+63618
+63619
+63620
+63621
+63622
+63623
+63624
+63625
+63626
+63627
+63628
+63629
+63630
+63631
+63632
+63633
+63634
+63635
+63636
+63637
+63638
+63639
+63640
+63641
+63642
+63643
+63644
+63645
+63646
+63647
+63648
+63649
+63650
+63651
+63652
+63653
+63654
+63655
+63656
+63657
+63658
+63659
+63660
+63661
+63662
+63663
+63664
+63665
+63666
+63667
+63668
+63669
+63670
+63671
+63672
+63673
+63674
+63675
+63676
+63677
+63678
+63679
+63680
+63681
+63682
+63683
+63684
+63685
+63686
+63687
+63688
+63689
+63690
+63691
+63692
+63693
+63694
+63695
+63696
+63697
+63698
+63699
+63700
+63701
+63702
+63703
+63704
+63705
+63706
+63707
+63708
+63709
+63710
+63711
+63712
+63713
+63714
+63715
+63716
+63717
+63718
+63719
+63720
+63721
+63722
+63723
+63724
+63725
+63726
+63727
+63728
+63729
+63730
+63731
+63732
+63733
+63734
+63735
+63736
+63737
+63738
+63739
+63740
+63741
+63742
+63743
+63744
+63745
+63746
+63747
+63748
+63749
+63750
+63751
+63752
+63753
+63754
+63755
+63756
+63757
+63758
+63759
+63760
+63761
+63762
+63763
+63764
+63765
+63766
+63767
+63768
+63769
+63770
+63771
+63772
+63773
+63774
+63775
+63776
+63777
+63778
+63779
+63780
+63781
+63782
+63783
+63784
+63785
+63786
+63787
+63788
+63789
+63790
+63791
+63792
+63793
+63794
+63795
+63796
+63797
+63798
+63799
+63800
+63801
+63802
+63803
+63804
+63805
+63806
+63807
+63808
+63809
+63810
+63811
+63812
+63813
+63814
+63815
+63816
+63817
+63818
+63819
+63820
+63821
+63822
+63823
+63824
+63825
+63826
+63827
+63828
+63829
+63830
+63831
+63832
+63833
+63834
+63835
+63836
+63837
+63838
+63839
+63840
+63841
+63842
+63843
+63844
+63845
+63846
+63847
+63848
+63849
+63850
+63851
+63852
+63853
+63854
+63855
+63856
+63857
+63858
+63859
+63860
+63861
+63862
+63863
+63864
+63865
+63866
+63867
+63868
+63869
+63870
+63871
+63872
+63873
+63874
+63875
+63876
+63877
+63878
+63879
+63880
+63881
+63882
+63883
+63884
+63885
+63886
+63887
+63888
+63889
+63890
+63891
+63892
+63893
+63894
+63895
+63896
+63897
+63898
+63899
+63900
+63901
+63902
+63903
+63904
+63905
+63906
+63907
+63908
+63909
+63910
+63911
+63912
+63913
+63914
+63915
+63916
+63917
+63918
+63919
+63920
+63921
+63922
+63923
+63924
+63925
+63926
+63927
+63928
+63929
+63930
+63931
+63932
+63933
+63934
+63935
+63936
+63937
+63938
+63939
+63940
+63941
+63942
+63943
+63944
+63945
+63946
+63947
+63948
+63949
+63950
+63951
+63952
+63953
+63954
+63955
+63956
+63957
+63958
+63959
+63960
+63961
+63962
+63963
+63964
+63965
+63966
+63967
+63968
+63969
+63970
+63971
+63972
+63973
+63974
+63975
+63976
+63977
+63978
+63979
+63980
+63981
+63982
+63983
+63984
+63985
+63986
+63987
+63988
+63989
+63990
+63991
+63992
+63993
+63994
+63995
+63996
+63997
+63998
+63999
+64000
+64001
+64002
+64003
+64004
+64005
+64006
+64007
+64008
+64009
+64010
+64011
+64012
+64013
+64014
+64015
+64016
+64017
+64018
+64019
+64020
+64021
+64022
+64023
+64024
+64025
+64026
+64027
+64028
+64029
+64030
+64031
+64032
+64033
+64034
+64035
+64036
+64037
+64038
+64039
+64040
+64041
+64042
+64043
+64044
+64045
+64046
+64047
+64048
+64049
+64050
+64051
+64052
+64053
+64054
+64055
+64056
+64057
+64058
+64059
+64060
+64061
+64062
+64063
+64064
+64065
+64066
+64067
+64068
+64069
+64070
+64071
+64072
+64073
+64074
+64075
+64076
+64077
+64078
+64079
+64080
+64081
+64082
+64083
+64084
+64085
+64086
+64087
+64088
+64089
+64090
+64091
+64092
+64093
+64094
+64095
+64096
+64097
+64098
+64099
+64100
+64101
+64102
+64103
+64104
+64105
+64106
+64107
+64108
+64109
+64110
+64111
+64112
+64113
+64114
+64115
+64116
+64117
+64118
+64119
+64120
+64121
+64122
+64123
+64124
+64125
+64126
+64127
+64128
+64129
+64130
+64131
+64132
+64133
+64134
+64135
+64136
+64137
+64138
+64139
+64140
+64141
+64142
+64143
+64144
+64145
+64146
+64147
+64148
+64149
+64150
+64151
+64152
+64153
+64154
+64155
+64156
+64157
+64158
+64159
+64160
+64161
+64162
+64163
+64164
+64165
+64166
+64167
+64168
+64169
+64170
+64171
+64172
+64173
+64174
+64175
+64176
+64177
+64178
+64179
+64180
+64181
+64182
+64183
+64184
+64185
+64186
+64187
+64188
+64189
+64190
+64191
+64192
+64193
+64194
+64195
+64196
+64197
+64198
+64199
+64200
+64201
+64202
+64203
+64204
+64205
+64206
+64207
+64208
+64209
+64210
+64211
+64212
+64213
+64214
+64215
+64216
+64217
+64218
+64219
+64220
+64221
+64222
+64223
+64224
+64225
+64226
+64227
+64228
+64229
+64230
+64231
+64232
+64233
+64234
+64235
+64236
+64237
+64238
+64239
+64240
+64241
+64242
+64243
+64244
+64245
+64246
+64247
+64248
+64249
+64250
+64251
+64252
+64253
+64254
+64255
+64256
+64257
+64258
+64259
+64260
+64261
+64262
+64263
+64264
+64265
+64266
+64267
+64268
+64269
+64270
+64271
+64272
+64273
+64274
+64275
+64276
+64277
+64278
+64279
+64280
+64281
+64282
+64283
+64284
+64285
+64286
+64287
+64288
+64289
+64290
+64291
+64292
+64293
+64294
+64295
+64296
+64297
+64298
+64299
+64300
+64301
+64302
+64303
+64304
+64305
+64306
+64307
+64308
+64309
+64310
+64311
+64312
+64313
+64314
+64315
+64316
+64317
+64318
+64319
+64320
+64321
+64322
+64323
+64324
+64325
+64326
+64327
+64328
+64329
+64330
+64331
+64332
+64333
+64334
+64335
+64336
+64337
+64338
+64339
+64340
+64341
+64342
+64343
+64344
+64345
+64346
+64347
+64348
+64349
+64350
+64351
+64352
+64353
+64354
+64355
+64356
+64357
+64358
+64359
+64360
+64361
+64362
+64363
+64364
+64365
+64366
+64367
+64368
+64369
+64370
+64371
+64372
+64373
+64374
+64375
+64376
+64377
+64378
+64379
+64380
+64381
+64382
+64383
+64384
+64385
+64386
+64387
+64388
+64389
+64390
+64391
+64392
+64393
+64394
+64395
+64396
+64397
+64398
+64399
+64400
+64401
+64402
+64403
+64404
+64405
+64406
+64407
+64408
+64409
+64410
+64411
+64412
+64413
+64414
+64415
+64416
+64417
+64418
+64419
+64420
+64421
+64422
+64423
+64424
+64425
+64426
+64427
+64428
+64429
+64430
+64431
+64432
+64433
+64434
+64435
+64436
+64437
+64438
+64439
+64440
+64441
+64442
+64443
+64444
+64445
+64446
+64447
+64448
+64449
+64450
+64451
+64452
+64453
+64454
+64455
+64456
+64457
+64458
+64459
+64460
+64461
+64462
+64463
+64464
+64465
+64466
+64467
+64468
+64469
+64470
+64471
+64472
+64473
+64474
+64475
+64476
+64477
+64478
+64479
+64480
+64481
+64482
+64483
+64484
+64485
+64486
+64487
+64488
+64489
+64490
+64491
+64492
+64493
+64494
+64495
+64496
+64497
+64498
+64499
+64500
+64501
+64502
+64503
+64504
+64505
+64506
+64507
+64508
+64509
+64510
+64511
+64512
+64513
+64514
+64515
+64516
+64517
+64518
+64519
+64520
+64521
+64522
+64523
+64524
+64525
+64526
+64527
+64528
+64529
+64530
+64531
+64532
+64533
+64534
+64535
+64536
+64537
+64538
+64539
+64540
+64541
+64542
+64543
+64544
+64545
+64546
+64547
+64548
+64549
+64550
+64551
+64552
+64553
+64554
+64555
+64556
+64557
+64558
+64559
+64560
+64561
+64562
+64563
+64564
+64565
+64566
+64567
+64568
+64569
+64570
+64571
+64572
+64573
+64574
+64575
+64576
+64577
+64578
+64579
+64580
+64581
+64582
+64583
+64584
+64585
+64586
+64587
+64588
+64589
+64590
+64591
+64592
+64593
+64594
+64595
+64596
+64597
+64598
+64599
+64600
+64601
+64602
+64603
+64604
+64605
+64606
+64607
+64608
+64609
+64610
+64611
+64612
+64613
+64614
+64615
+64616
+64617
+64618
+64619
+64620
+64621
+64622
+64623
+64624
+64625
+64626
+64627
+64628
+64629
+64630
+64631
+64632
+64633
+64634
+64635
+64636
+64637
+64638
+64639
+64640
+64641
+64642
+64643
+64644
+64645
+64646
+64647
+64648
+64649
+64650
+64651
+64652
+64653
+64654
+64655
+64656
+64657
+64658
+64659
+64660
+64661
+64662
+64663
+64664
+64665
+64666
+64667
+64668
+64669
+64670
+64671
+64672
+64673
+64674
+64675
+64676
+64677
+64678
+64679
+64680
+64681
+64682
+64683
+64684
+64685
+64686
+64687
+64688
+64689
+64690
+64691
+64692
+64693
+64694
+64695
+64696
+64697
+64698
+64699
+64700
+64701
+64702
+64703
+64704
+64705
+64706
+64707
+64708
+64709
+64710
+64711
+64712
+64713
+64714
+64715
+64716
+64717
+64718
+64719
+64720
+64721
+64722
+64723
+64724
+64725
+64726
+64727
+64728
+64729
+64730
+64731
+64732
+64733
+64734
+64735
+64736
+64737
+64738
+64739
+64740
+64741
+64742
+64743
+64744
+64745
+64746
+64747
+64748
+64749
+64750
+64751
+64752
+64753
+64754
+64755
+64756
+64757
+64758
+64759
+64760
+64761
+64762
+64763
+64764
+64765
+64766
+64767
+64768
+64769
+64770
+64771
+64772
+64773
+64774
+64775
+64776
+64777
+64778
+64779
+64780
+64781
+64782
+64783
+64784
+64785
+64786
+64787
+64788
+64789
+64790
+64791
+64792
+64793
+64794
+64795
+64796
+64797
+64798
+64799
+64800
+64801
+64802
+64803
+64804
+64805
+64806
+64807
+64808
+64809
+64810
+64811
+64812
+64813
+64814
+64815
+64816
+64817
+64818
+64819
+64820
+64821
+64822
+64823
+64824
+64825
+64826
+64827
+64828
+64829
+64830
+64831
+64832
+64833
+64834
+64835
+64836
+64837
+64838
+64839
+64840
+64841
+64842
+64843
+64844
+64845
+64846
+64847
+64848
+64849
+64850
+64851
+64852
+64853
+64854
+64855
+64856
+64857
+64858
+64859
+64860
+64861
+64862
+64863
+64864
+64865
+64866
+64867
+64868
+64869
+64870
+64871
+64872
+64873
+64874
+64875
+64876
+64877
+64878
+64879
+64880
+64881
+64882
+64883
+64884
+64885
+64886
+64887
+64888
+64889
+64890
+64891
+64892
+64893
+64894
+64895
+64896
+64897
+64898
+64899
+64900
+64901
+64902
+64903
+64904
+64905
+64906
+64907
+64908
+64909
+64910
+64911
+64912
+64913
+64914
+64915
+64916
+64917
+64918
+64919
+64920
+64921
+64922
+64923
+64924
+64925
+64926
+64927
+64928
+64929
+64930
+64931
+64932
+64933
+64934
+64935
+64936
+64937
+64938
+64939
+64940
+64941
+64942
+64943
+64944
+64945
+64946
+64947
+64948
+64949
+64950
+64951
+64952
+64953
+64954
+64955
+64956
+64957
+64958
+64959
+64960
+64961
+64962
+64963
+64964
+64965
+64966
+64967
+64968
+64969
+64970
+64971
+64972
+64973
+64974
+64975
+64976
+64977
+64978
+64979
+64980
+64981
+64982
+64983
+64984
+64985
+64986
+64987
+64988
+64989
+64990
+64991
+64992
+64993
+64994
+64995
+64996
+64997
+64998
+64999
+65000
+65001
+65002
+65003
+65004
+65005
+65006
+65007
+65008
+65009
+65010
+65011
+65012
+65013
+65014
+65015
+65016
+65017
+65018
+65019
+65020
+65021
+65022
+65023
+65024
+65025
+65026
+65027
+65028
+65029
+65030
+65031
+65032
+65033
+65034
+65035
+65036
+65037
+65038
+65039
+65040
+65041
+65042
+65043
+65044
+65045
+65046
+65047
+65048
+65049
+65050
+65051
+65052
+65053
+65054
+65055
+65056
+65057
+65058
+65059
+65060
+65061
+65062
+65063
+65064
+65065
+65066
+65067
+65068
+65069
+65070
+65071
+65072
+65073
+65074
+65075
+65076
+65077
+65078
+65079
+65080
+65081
+65082
+65083
+65084
+65085
+65086
+65087
+65088
+65089
+65090
+65091
+65092
+65093
+65094
+65095
+65096
+65097
+65098
+65099
+65100
+65101
+65102
+65103
+65104
+65105
+65106
+65107
+65108
+65109
+65110
+65111
+65112
+65113
+65114
+65115
+65116
+65117
+65118
+65119
+65120
+65121
+65122
+65123
+65124
+65125
+65126
+65127
+65128
+65129
+65130
+65131
+65132
+65133
+65134
+65135
+65136
+65137
+65138
+65139
+65140
+65141
+65142
+65143
+65144
+65145
+65146
+65147
+65148
+65149
+65150
+65151
+65152
+65153
+65154
+65155
+65156
+65157
+65158
+65159
+65160
+65161
+65162
+65163
+65164
+65165
+65166
+65167
+65168
+65169
+65170
+65171
+65172
+65173
+65174
+65175
+65176
+65177
+65178
+65179
+65180
+65181
+65182
+65183
+65184
+65185
+65186
+65187
+65188
+65189
+65190
+65191
+65192
+65193
+65194
+65195
+65196
+65197
+65198
+65199
+65200
+65201
+65202
+65203
+65204
+65205
+65206
+65207
+65208
+65209
+65210
+65211
+65212
+65213
+65214
+65215
+65216
+65217
+65218
+65219
+65220
+65221
+65222
+65223
+65224
+65225
+65226
+65227
+65228
+65229
+65230
+65231
+65232
+65233
+65234
+65235
+65236
+65237
+65238
+65239
+65240
+65241
+65242
+65243
+65244
+65245
+65246
+65247
+65248
+65249
+65250
+65251
+65252
+65253
+65254
+65255
+65256
+65257
+65258
+65259
+65260
+65261
+65262
+65263
+65264
+65265
+65266
+65267
+65268
+65269
+65270
+65271
+65272
+65273
+65274
+65275
+65276
+65277
+65278
+65279
+65280
+65281
+65282
+65283
+65284
+65285
+65286
+65287
+65288
+65289
+65290
+65291
+65292
+65293
+65294
+65295
+65296
+65297
+65298
+65299
+65300
+65301
+65302
+65303
+65304
+65305
+65306
+65307
+65308
+65309
+65310
+65311
+65312
+65313
+65314
+65315
+65316
+65317
+65318
+65319
+65320
+65321
+65322
+65323
+65324
+65325
+65326
+65327
+65328
+65329
+65330
+65331
+65332
+65333
+65334
+65335
+65336
+65337
+65338
+65339
+65340
+65341
+65342
+65343
+65344
+65345
+65346
+65347
+65348
+65349
+65350
+65351
+65352
+65353
+65354
+65355
+65356
+65357
+65358
+65359
+65360
+65361
+65362
+65363
+65364
+65365
+65366
+65367
+65368
+65369
+65370
+65371
+65372
+65373
+65374
+65375
+65376
+65377
+65378
+65379
+65380
+65381
+65382
+65383
+65384
+65385
+65386
+65387
+65388
+65389
+65390
+65391
+65392
+65393
+65394
+65395
+65396
+65397
+65398
+65399
+65400
+65401
+65402
+65403
+65404
+65405
+65406
+65407
+65408
+65409
+65410
+65411
+65412
+65413
+65414
+65415
+65416
+65417
+65418
+65419
+65420
+65421
+65422
+65423
+65424
+65425
+65426
+65427
+65428
+65429
+65430
+65431
+65432
+65433
+65434
+65435
+65436
+65437
+65438
+65439
+65440
+65441
+65442
+65443
+65444
+65445
+65446
+65447
+65448
+65449
+65450
+65451
+65452
+65453
+65454
+65455
+65456
+65457
+65458
+65459
+65460
+65461
+65462
+65463
+65464
+65465
+65466
+65467
+65468
+65469
+65470
+65471
+65472
+65473
+65474
+65475
+65476
+65477
+65478
+65479
+65480
+65481
+65482
+65483
+65484
+65485
+65486
+65487
+65488
+65489
+65490
+65491
+65492
+65493
+65494
+65495
+65496
+65497
+65498
+65499
+65500
+65501
+65502
+65503
+65504
+65505
+65506
+65507
+65508
+65509
+65510
+65511
+65512
+65513
+65514
+65515
+65516
+65517
+65518
+65519
+65520
+65521
+65522
+65523
+65524
+65525
+65526
+65527
+65528
+65529
+65530
+65531
+65532
+65533
+65534
+65535
+65536
+65537
+65538
+65539
+65540
+65541
+65542
+65543
+65544
+65545
+65546
+65547
+65548
+65549
+65550
+65551
+65552
+65553
+65554
+65555
+65556
+65557
+65558
+65559
+65560
+65561
+65562
+65563
+65564
+65565
+65566
+65567
+65568
+65569
+65570
+65571
+65572
+65573
+65574
+65575
+65576
+65577
+65578
+65579
+65580
+65581
+65582
+65583
+65584
+65585
+65586
+65587
+65588
+65589
+65590
+65591
+65592
+65593
+65594
+65595
+65596
+65597
+65598
+65599
+65600
+65601
+65602
+65603
+65604
+65605
+65606
+65607
+65608
+65609
+65610
+65611
+65612
+65613
+65614
+65615
+65616
+65617
+65618
+65619
+65620
+65621
+65622
+65623
+65624
+65625
+65626
+65627
+65628
+65629
+65630
+65631
+65632
+65633
+65634
+65635
+65636
+65637
+65638
+65639
+65640
+65641
+65642
+65643
+65644
+65645
+65646
+65647
+65648
+65649
+65650
+65651
+65652
+65653
+65654
+65655
+65656
+65657
+65658
+65659
+65660
+65661
+65662
+65663
+65664
+65665
+65666
+65667
+65668
+65669
+65670
+65671
+65672
+65673
+65674
+65675
+65676
+65677
+65678
+65679
+65680
+65681
+65682
+65683
+65684
+65685
+65686
+65687
+65688
+65689
+65690
+65691
+65692
+65693
+65694
+65695
+65696
+65697
+65698
+65699
+65700
+65701
+65702
+65703
+65704
+65705
+65706
+65707
+65708
+65709
+65710
+65711
+65712
+65713
+65714
+65715
+65716
+65717
+65718
+65719
+65720
+65721
+65722
+65723
+65724
+65725
+65726
+65727
+65728
+65729
+65730
+65731
+65732
+65733
+65734
+65735
+65736
+65737
+65738
+65739
+65740
+65741
+65742
+65743
+65744
+65745
+65746
+65747
+65748
+65749
+65750
+65751
+65752
+65753
+65754
+65755
+65756
+65757
+65758
+65759
+65760
+65761
+65762
+65763
+65764
+65765
+65766
+65767
+65768
+65769
+65770
+65771
+65772
+65773
+65774
+65775
+65776
+65777
+65778
+65779
+65780
+65781
+65782
+65783
+65784
+65785
+65786
+65787
+65788
+65789
+65790
+65791
+65792
+65793
+65794
+65795
+65796
+65797
+65798
+65799
+65800
+65801
+65802
+65803
+65804
+65805
+65806
+65807
+65808
+65809
+65810
+65811
+65812
+65813
+65814
+65815
+65816
+65817
+65818
+65819
+65820
+65821
+65822
+65823
+65824
+65825
+65826
+65827
+65828
+65829
+65830
+65831
+65832
+65833
+65834
+65835
+65836
+65837
+65838
+65839
+65840
+65841
+65842
+65843
+65844
+65845
+65846
+65847
+65848
+65849
+65850
+65851
+65852
+65853
+65854
+65855
+65856
+65857
+65858
+65859
+65860
+65861
+65862
+65863
+65864
+65865
+65866
+65867
+65868
+65869
+65870
+65871
+65872
+65873
+65874
+65875
+65876
+65877
+65878
+65879
+65880
+65881
+65882
+65883
+65884
+65885
+65886
+65887
+65888
+65889
+65890
+65891
+65892
+65893
+65894
+65895
+65896
+65897
+65898
+65899
+65900
+65901
+65902
+65903
+65904
+65905
+65906
+65907
+65908
+65909
+65910
+65911
+65912
+65913
+65914
+65915
+65916
+65917
+65918
+65919
+65920
+65921
+65922
+65923
+65924
+65925
+65926
+65927
+65928
+65929
+65930
+65931
+65932
+65933
+65934
+65935
+65936
+65937
+65938
+65939
+65940
+65941
+65942
+65943
+65944
+65945
+65946
+65947
+65948
+65949
+65950
+65951
+65952
+65953
+65954
+65955
+65956
+65957
+65958
+65959
+65960
+65961
+65962
+65963
+65964
+65965
+65966
+65967
+65968
+65969
+65970
+65971
+65972
+65973
+65974
+65975
+65976
+65977
+65978
+65979
+65980
+65981
+65982
+65983
+65984
+65985
+65986
+65987
+65988
+65989
+65990
+65991
+65992
+65993
+65994
+65995
+65996
+65997
+65998
+65999
+66000
+66001
+66002
+66003
+66004
+66005
+66006
+66007
+66008
+66009
+66010
+66011
+66012
+66013
+66014
+66015
+66016
+66017
+66018
+66019
+66020
+66021
+66022
+66023
+66024
+66025
+66026
+66027
+66028
+66029
+66030
+66031
+66032
+66033
+66034
+66035
+66036
+66037
+66038
+66039
+66040
+66041
+66042
+66043
+66044
+66045
+66046
+66047
+66048
+66049
+66050
+66051
+66052
+66053
+66054
+66055
+66056
+66057
+66058
+66059
+66060
+66061
+66062
+66063
+66064
+66065
+66066
+66067
+66068
+66069
+66070
+66071
+66072
+66073
+66074
+66075
+66076
+66077
+66078
+66079
+66080
+66081
+66082
+66083
+66084
+66085
+66086
+66087
+66088
+66089
+66090
+66091
+66092
+66093
+66094
+66095
+66096
+66097
+66098
+66099
+66100
+66101
+66102
+66103
+66104
+66105
+66106
+66107
+66108
+66109
+66110
+66111
+66112
+66113
+66114
+66115
+66116
+66117
+66118
+66119
+66120
+66121
+66122
+66123
+66124
+66125
+66126
+66127
+66128
+66129
+66130
+66131
+66132
+66133
+66134
+66135
+66136
+66137
+66138
+66139
+66140
+66141
+66142
+66143
+66144
+66145
+66146
+66147
+66148
+66149
+66150
+66151
+66152
+66153
+66154
+66155
+66156
+66157
+66158
+66159
+66160
+66161
+66162
+66163
+66164
+66165
+66166
+66167
+66168
+66169
+66170
+66171
+66172
+66173
+66174
+66175
+66176
+66177
+66178
+66179
+66180
+66181
+66182
+66183
+66184
+66185
+66186
+66187
+66188
+66189
+66190
+66191
+66192
+66193
+66194
+66195
+66196
+66197
+66198
+66199
+66200
+66201
+66202
+66203
+66204
+66205
+66206
+66207
+66208
+66209
+66210
+66211
+66212
+66213
+66214
+66215
+66216
+66217
+66218
+66219
+66220
+66221
+66222
+66223
+66224
+66225
+66226
+66227
+66228
+66229
+66230
+66231
+66232
+66233
+66234
+66235
+66236
+66237
+66238
+66239
+66240
+66241
+66242
+66243
+66244
+66245
+66246
+66247
+66248
+66249
+66250
+66251
+66252
+66253
+66254
+66255
+66256
+66257
+66258
+66259
+66260
+66261
+66262
+66263
+66264
+66265
+66266
+66267
+66268
+66269
+66270
+66271
+66272
+66273
+66274
+66275
+66276
+66277
+66278
+66279
+66280
+66281
+66282
+66283
+66284
+66285
+66286
+66287
+66288
+66289
+66290
+66291
+66292
+66293
+66294
+66295
+66296
+66297
+66298
+66299
+66300
+66301
+66302
+66303
+66304
+66305
+66306
+66307
+66308
+66309
+66310
+66311
+66312
+66313
+66314
+66315
+66316
+66317
+66318
+66319
+66320
+66321
+66322
+66323
+66324
+66325
+66326
+66327
+66328
+66329
+66330
+66331
+66332
+66333
+66334
+66335
+66336
+66337
+66338
+66339
+66340
+66341
+66342
+66343
+66344
+66345
+66346
+66347
+66348
+66349
+66350
+66351
+66352
+66353
+66354
+66355
+66356
+66357
+66358
+66359
+66360
+66361
+66362
+66363
+66364
+66365
+66366
+66367
+66368
+66369
+66370
+66371
+66372
+66373
+66374
+66375
+66376
+66377
+66378
+66379
+66380
+66381
+66382
+66383
+66384
+66385
+66386
+66387
+66388
+66389
+66390
+66391
+66392
+66393
+66394
+66395
+66396
+66397
+66398
+66399
+66400
+66401
+66402
+66403
+66404
+66405
+66406
+66407
+66408
+66409
+66410
+66411
+66412
+66413
+66414
+66415
+66416
+66417
+66418
+66419
+66420
+66421
+66422
+66423
+66424
+66425
+66426
+66427
+66428
+66429
+66430
+66431
+66432
+66433
+66434
+66435
+66436
+66437
+66438
+66439
+66440
+66441
+66442
+66443
+66444
+66445
+66446
+66447
+66448
+66449
+66450
+66451
+66452
+66453
+66454
+66455
+66456
+66457
+66458
+66459
+66460
+66461
+66462
+66463
+66464
+66465
+66466
+66467
+66468
+66469
+66470
+66471
+66472
+66473
+66474
+66475
+66476
+66477
+66478
+66479
+66480
+66481
+66482
+66483
+66484
+66485
+66486
+66487
+66488
+66489
+66490
+66491
+66492
+66493
+66494
+66495
+66496
+66497
+66498
+66499
+66500
+66501
+66502
+66503
+66504
+66505
+66506
+66507
+66508
+66509
+66510
+66511
+66512
+66513
+66514
+66515
+66516
+66517
+66518
+66519
+66520
+66521
+66522
+66523
+66524
+66525
+66526
+66527
+66528
+66529
+66530
+66531
+66532
+66533
+66534
+66535
+66536
+66537
+66538
+66539
+66540
+66541
+66542
+66543
+66544
+66545
+66546
+66547
+66548
+66549
+66550
+66551
+66552
+66553
+66554
+66555
+66556
+66557
+66558
+66559
+66560
+66561
+66562
+66563
+66564
+66565
+66566
+66567
+66568
+66569
+66570
+66571
+66572
+66573
+66574
+66575
+66576
+66577
+66578
+66579
+66580
+66581
+66582
+66583
+66584
+66585
+66586
+66587
+66588
+66589
+66590
+66591
+66592
+66593
+66594
+66595
+66596
+66597
+66598
+66599
+66600
+66601
+66602
+66603
+66604
+66605
+66606
+66607
+66608
+66609
+66610
+66611
+66612
+66613
+66614
+66615
+66616
+66617
+66618
+66619
+66620
+66621
+66622
+66623
+66624
+66625
+66626
+66627
+66628
+66629
+66630
+66631
+66632
+66633
+66634
+66635
+66636
+66637
+66638
+66639
+66640
+66641
+66642
+66643
+66644
+66645
+66646
+66647
+66648
+66649
+66650
+66651
+66652
+66653
+66654
+66655
+66656
+66657
+66658
+66659
+66660
+66661
+66662
+66663
+66664
+66665
+66666
+66667
+66668
+66669
+66670
+66671
+66672
+66673
+66674
+66675
+66676
+66677
+66678
+66679
+66680
+66681
+66682
+66683
+66684
+66685
+66686
+66687
+66688
+66689
+66690
+66691
+66692
+66693
+66694
+66695
+66696
+66697
+66698
+66699
+66700
+66701
+66702
+66703
+66704
+66705
+66706
+66707
+66708
+66709
+66710
+66711
+66712
+66713
+66714
+66715
+66716
+66717
+66718
+66719
+66720
+66721
+66722
+66723
+66724
+66725
+66726
+66727
+66728
+66729
+66730
+66731
+66732
+66733
+66734
+66735
+66736
+66737
+66738
+66739
+66740
+66741
+66742
+66743
+66744
+66745
+66746
+66747
+66748
+66749
+66750
+66751
+66752
+66753
+66754
+66755
+66756
+66757
+66758
+66759
+66760
+66761
+66762
+66763
+66764
+66765
+66766
+66767
+66768
+66769
+66770
+66771
+66772
+66773
+66774
+66775
+66776
+66777
+66778
+66779
+66780
+66781
+66782
+66783
+66784
+66785
+66786
+66787
+66788
+66789
+66790
+66791
+66792
+66793
+66794
+66795
+66796
+66797
+66798
+66799
+66800
+66801
+66802
+66803
+66804
+66805
+66806
+66807
+66808
+66809
+66810
+66811
+66812
+66813
+66814
+66815
+66816
+66817
+66818
+66819
+66820
+66821
+66822
+66823
+66824
+66825
+66826
+66827
+66828
+66829
+66830
+66831
+66832
+66833
+66834
+66835
+66836
+66837
+66838
+66839
+66840
+66841
+66842
+66843
+66844
+66845
+66846
+66847
+66848
+66849
+66850
+66851
+66852
+66853
+66854
+66855
+66856
+66857
+66858
+66859
+66860
+66861
+66862
+66863
+66864
+66865
+66866
+66867
+66868
+66869
+66870
+66871
+66872
+66873
+66874
+66875
+66876
+66877
+66878
+66879
+66880
+66881
+66882
+66883
+66884
+66885
+66886
+66887
+66888
+66889
+66890
+66891
+66892
+66893
+66894
+66895
+66896
+66897
+66898
+66899
+66900
+66901
+66902
+66903
+66904
+66905
+66906
+66907
+66908
+66909
+66910
+66911
+66912
+66913
+66914
+66915
+66916
+66917
+66918
+66919
+66920
+66921
+66922
+66923
+66924
+66925
+66926
+66927
+66928
+66929
+66930
+66931
+66932
+66933
+66934
+66935
+66936
+66937
+66938
+66939
+66940
+66941
+66942
+66943
+66944
+66945
+66946
+66947
+66948
+66949
+66950
+66951
+66952
+66953
+66954
+66955
+66956
+66957
+66958
+66959
+66960
+66961
+66962
+66963
+66964
+66965
+66966
+66967
+66968
+66969
+66970
+66971
+66972
+66973
+66974
+66975
+66976
+66977
+66978
+66979
+66980
+66981
+66982
+66983
+66984
+66985
+66986
+66987
+66988
+66989
+66990
+66991
+66992
+66993
+66994
+66995
+66996
+66997
+66998
+66999
+67000
+67001
+67002
+67003
+67004
+67005
+67006
+67007
+67008
+67009
+67010
+67011
+67012
+67013
+67014
+67015
+67016
+67017
+67018
+67019
+67020
+67021
+67022
+67023
+67024
+67025
+67026
+67027
+67028
+67029
+67030
+67031
+67032
+67033
+67034
+67035
+67036
+67037
+67038
+67039
+67040
+67041
+67042
+67043
+67044
+67045
+67046
+67047
+67048
+67049
+67050
+67051
+67052
+67053
+67054
+67055
+67056
+67057
+67058
+67059
+67060
+67061
+67062
+67063
+67064
+67065
+67066
+67067
+67068
+67069
+67070
+67071
+67072
+67073
+67074
+67075
+67076
+67077
+67078
+67079
+67080
+67081
+67082
+67083
+67084
+67085
+67086
+67087
+67088
+67089
+67090
+67091
+67092
+67093
+67094
+67095
+67096
+67097
+67098
+67099
+67100
+67101
+67102
+67103
+67104
+67105
+67106
+67107
+67108
+67109
+67110
+67111
+67112
+67113
+67114
+67115
+67116
+67117
+67118
+67119
+67120
+67121
+67122
+67123
+67124
+67125
+67126
+67127
+67128
+67129
+67130
+67131
+67132
+67133
+67134
+67135
+67136
+67137
+67138
+67139
+67140
+67141
+67142
+67143
+67144
+67145
+67146
+67147
+67148
+67149
+67150
+67151
+67152
+67153
+67154
+67155
+67156
+67157
+67158
+67159
+67160
+67161
+67162
+67163
+67164
+67165
+67166
+67167
+67168
+67169
+67170
+67171
+67172
+67173
+67174
+67175
+67176
+67177
+67178
+67179
+67180
+67181
+67182
+67183
+67184
+67185
+67186
+67187
+67188
+67189
+67190
+67191
+67192
+67193
+67194
+67195
+67196
+67197
+67198
+67199
+67200
+67201
+67202
+67203
+67204
+67205
+67206
+67207
+67208
+67209
+67210
+67211
+67212
+67213
+67214
+67215
+67216
+67217
+67218
+67219
+67220
+67221
+67222
+67223
+67224
+67225
+67226
+67227
+67228
+67229
+67230
+67231
+67232
+67233
+67234
+67235
+67236
+67237
+67238
+67239
+67240
+67241
+67242
+67243
+67244
+67245
+67246
+67247
+67248
+67249
+67250
+67251
+67252
+67253
+67254
+67255
+67256
+67257
+67258
+67259
+67260
+67261
+67262
+67263
+67264
+67265
+67266
+67267
+67268
+67269
+67270
+67271
+67272
+67273
+67274
+67275
+67276
+67277
+67278
+67279
+67280
+67281
+67282
+67283
+67284
+67285
+67286
+67287
+67288
+67289
+67290
+67291
+67292
+67293
+67294
+67295
+67296
+67297
+67298
+67299
+67300
+67301
+67302
+67303
+67304
+67305
+67306
+67307
+67308
+67309
+67310
+67311
+67312
+67313
+67314
+67315
+67316
+67317
+67318
+67319
+67320
+67321
+67322
+67323
+67324
+67325
+67326
+67327
+67328
+67329
+67330
+67331
+67332
+67333
+67334
+67335
+67336
+67337
+67338
+67339
+67340
+67341
+67342
+67343
+67344
+67345
+67346
+67347
+67348
+67349
+67350
+67351
+67352
+67353
+67354
+67355
+67356
+67357
+67358
+67359
+67360
+67361
+67362
+67363
+67364
+67365
+67366
+67367
+67368
+67369
+67370
+67371
+67372
+67373
+67374
+67375
+67376
+67377
+67378
+67379
+67380
+67381
+67382
+67383
+67384
+67385
+67386
+67387
+67388
+67389
+67390
+67391
+67392
+67393
+67394
+67395
+67396
+67397
+67398
+67399
+67400
+67401
+67402
+67403
+67404
+67405
+67406
+67407
+67408
+67409
+67410
+67411
+67412
+67413
+67414
+67415
+67416
+67417
+67418
+67419
+67420
+67421
+67422
+67423
+67424
+67425
+67426
+67427
+67428
+67429
+67430
+67431
+67432
+67433
+67434
+67435
+67436
+67437
+67438
+67439
+67440
+67441
+67442
+67443
+67444
+67445
+67446
+67447
+67448
+67449
+67450
+67451
+67452
+67453
+67454
+67455
+67456
+67457
+67458
+67459
+67460
+67461
+67462
+67463
+67464
+67465
+67466
+67467
+67468
+67469
+67470
+67471
+67472
+67473
+67474
+67475
+67476
+67477
+67478
+67479
+67480
+67481
+67482
+67483
+67484
+67485
+67486
+67487
+67488
+67489
+67490
+67491
+67492
+67493
+67494
+67495
+67496
+67497
+67498
+67499
+67500
+67501
+67502
+67503
+67504
+67505
+67506
+67507
+67508
+67509
+67510
+67511
+67512
+67513
+67514
+67515
+67516
+67517
+67518
+67519
+67520
+67521
+67522
+67523
+67524
+67525
+67526
+67527
+67528
+67529
+67530
+67531
+67532
+67533
+67534
+67535
+67536
+67537
+67538
+67539
+67540
+67541
+67542
+67543
+67544
+67545
+67546
+67547
+67548
+67549
+67550
+67551
+67552
+67553
+67554
+67555
+67556
+67557
+67558
+67559
+67560
+67561
+67562
+67563
+67564
+67565
+67566
+67567
+67568
+67569
+67570
+67571
+67572
+67573
+67574
+67575
+67576
+67577
+67578
+67579
+67580
+67581
+67582
+67583
+67584
+67585
+67586
+67587
+67588
+67589
+67590
+67591
+67592
+67593
+67594
+67595
+67596
+67597
+67598
+67599
+67600
+67601
+67602
+67603
+67604
+67605
+67606
+67607
+67608
+67609
+67610
+67611
+67612
+67613
+67614
+67615
+67616
+67617
+67618
+67619
+67620
+67621
+67622
+67623
+67624
+67625
+67626
+67627
+67628
+67629
+67630
+67631
+67632
+67633
+67634
+67635
+67636
+67637
+67638
+67639
+67640
+67641
+67642
+67643
+67644
+67645
+67646
+67647
+67648
+67649
+67650
+67651
+67652
+67653
+67654
+67655
+67656
+67657
+67658
+67659
+67660
+67661
+67662
+67663
+67664
+67665
+67666
+67667
+67668
+67669
+67670
+67671
+67672
+67673
+67674
+67675
+67676
+67677
+67678
+67679
+67680
+67681
+67682
+67683
+67684
+67685
+67686
+67687
+67688
+67689
+67690
+67691
+67692
+67693
+67694
+67695
+67696
+67697
+67698
+67699
+67700
+67701
+67702
+67703
+67704
+67705
+67706
+67707
+67708
+67709
+67710
+67711
+67712
+67713
+67714
+67715
+67716
+67717
+67718
+67719
+67720
+67721
+67722
+67723
+67724
+67725
+67726
+67727
+67728
+67729
+67730
+67731
+67732
+67733
+67734
+67735
+67736
+67737
+67738
+67739
+67740
+67741
+67742
+67743
+67744
+67745
+67746
+67747
+67748
+67749
+67750
+67751
+67752
+67753
+67754
+67755
+67756
+67757
+67758
+67759
+67760
+67761
+67762
+67763
+67764
+67765
+67766
+67767
+67768
+67769
+67770
+67771
+67772
+67773
+67774
+67775
+67776
+67777
+67778
+67779
+67780
+67781
+67782
+67783
+67784
+67785
+67786
+67787
+67788
+67789
+67790
+67791
+67792
+67793
+67794
+67795
+67796
+67797
+67798
+67799
+67800
+67801
+67802
+67803
+67804
+67805
+67806
+67807
+67808
+67809
+67810
+67811
+67812
+67813
+67814
+67815
+67816
+67817
+67818
+67819
+67820
+67821
+67822
+67823
+67824
+67825
+67826
+67827
+67828
+67829
+67830
+67831
+67832
+67833
+67834
+67835
+67836
+67837
+67838
+67839
+67840
+67841
+67842
+67843
+67844
+67845
+67846
+67847
+67848
+67849
+67850
+67851
+67852
+67853
+67854
+67855
+67856
+67857
+67858
+67859
+67860
+67861
+67862
+67863
+67864
+67865
+67866
+67867
+67868
+67869
+67870
+67871
+67872
+67873
+67874
+67875
+67876
+67877
+67878
+67879
+67880
+67881
+67882
+67883
+67884
+67885
+67886
+67887
+67888
+67889
+67890
+67891
+67892
+67893
+67894
+67895
+67896
+67897
+67898
+67899
+67900
+67901
+67902
+67903
+67904
+67905
+67906
+67907
+67908
+67909
+67910
+67911
+67912
+67913
+67914
+67915
+67916
+67917
+67918
+67919
+67920
+67921
+67922
+67923
+67924
+67925
+67926
+67927
+67928
+67929
+67930
+67931
+67932
+67933
+67934
+67935
+67936
+67937
+67938
+67939
+67940
+67941
+67942
+67943
+67944
+67945
+67946
+67947
+67948
+67949
+67950
+67951
+67952
+67953
+67954
+67955
+67956
+67957
+67958
+67959
+67960
+67961
+67962
+67963
+67964
+67965
+67966
+67967
+67968
+67969
+67970
+67971
+67972
+67973
+67974
+67975
+67976
+67977
+67978
+67979
+67980
+67981
+67982
+67983
+67984
+67985
+67986
+67987
+67988
+67989
+67990
+67991
+67992
+67993
+67994
+67995
+67996
+67997
+67998
+67999
+68000
+68001
+68002
+68003
+68004
+68005
+68006
+68007
+68008
+68009
+68010
+68011
+68012
+68013
+68014
+68015
+68016
+68017
+68018
+68019
+68020
+68021
+68022
+68023
+68024
+68025
+68026
+68027
+68028
+68029
+68030
+68031
+68032
+68033
+68034
+68035
+68036
+68037
+68038
+68039
+68040
+68041
+68042
+68043
+68044
+68045
+68046
+68047
+68048
+68049
+68050
+68051
+68052
+68053
+68054
+68055
+68056
+68057
+68058
+68059
+68060
+68061
+68062
+68063
+68064
+68065
+68066
+68067
+68068
+68069
+68070
+68071
+68072
+68073
+68074
+68075
+68076
+68077
+68078
+68079
+68080
+68081
+68082
+68083
+68084
+68085
+68086
+68087
+68088
+68089
+68090
+68091
+68092
+68093
+68094
+68095
+68096
+68097
+68098
+68099
+68100
+68101
+68102
+68103
+68104
+68105
+68106
+68107
+68108
+68109
+68110
+68111
+68112
+68113
+68114
+68115
+68116
+68117
+68118
+68119
+68120
+68121
+68122
+68123
+68124
+68125
+68126
+68127
+68128
+68129
+68130
+68131
+68132
+68133
+68134
+68135
+68136
+68137
+68138
+68139
+68140
+68141
+68142
+68143
+68144
+68145
+68146
+68147
+68148
+68149
+68150
+68151
+68152
+68153
+68154
+68155
+68156
+68157
+68158
+68159
+68160
+68161
+68162
+68163
+68164
+68165
+68166
+68167
+68168
+68169
+68170
+68171
+68172
+68173
+68174
+68175
+68176
+68177
+68178
+68179
+68180
+68181
+68182
+68183
+68184
+68185
+68186
+68187
+68188
+68189
+68190
+68191
+68192
+68193
+68194
+68195
+68196
+68197
+68198
+68199
+68200
+68201
+68202
+68203
+68204
+68205
+68206
+68207
+68208
+68209
+68210
+68211
+68212
+68213
+68214
+68215
+68216
+68217
+68218
+68219
+68220
+68221
+68222
+68223
+68224
+68225
+68226
+68227
+68228
+68229
+68230
+68231
+68232
+68233
+68234
+68235
+68236
+68237
+68238
+68239
+68240
+68241
+68242
+68243
+68244
+68245
+68246
+68247
+68248
+68249
+68250
+68251
+68252
+68253
+68254
+68255
+68256
+68257
+68258
+68259
+68260
+68261
+68262
+68263
+68264
+68265
+68266
+68267
+68268
+68269
+68270
+68271
+68272
+68273
+68274
+68275
+68276
+68277
+68278
+68279
+68280
+68281
+68282
+68283
+68284
+68285
+68286
+68287
+68288
+68289
+68290
+68291
+68292
+68293
+68294
+68295
+68296
+68297
+68298
+68299
+68300
+68301
+68302
+68303
+68304
+68305
+68306
+68307
+68308
+68309
+68310
+68311
+68312
+68313
+68314
+68315
+68316
+68317
+68318
+68319
+68320
+68321
+68322
+68323
+68324
+68325
+68326
+68327
+68328
+68329
+68330
+68331
+68332
+68333
+68334
+68335
+68336
+68337
+68338
+68339
+68340
+68341
+68342
+68343
+68344
+68345
+68346
+68347
+68348
+68349
+68350
+68351
+68352
+68353
+68354
+68355
+68356
+68357
+68358
+68359
+68360
+68361
+68362
+68363
+68364
+68365
+68366
+68367
+68368
+68369
+68370
+68371
+68372
+68373
+68374
+68375
+68376
+68377
+68378
+68379
+68380
+68381
+68382
+68383
+68384
+68385
+68386
+68387
+68388
+68389
+68390
+68391
+68392
+68393
+68394
+68395
+68396
+68397
+68398
+68399
+68400
+68401
+68402
+68403
+68404
+68405
+68406
+68407
+68408
+68409
+68410
+68411
+68412
+68413
+68414
+68415
+68416
+68417
+68418
+68419
+68420
+68421
+68422
+68423
+68424
+68425
+68426
+68427
+68428
+68429
+68430
+68431
+68432
+68433
+68434
+68435
+68436
+68437
+68438
+68439
+68440
+68441
+68442
+68443
+68444
+68445
+68446
+68447
+68448
+68449
+68450
+68451
+68452
+68453
+68454
+68455
+68456
+68457
+68458
+68459
+68460
+68461
+68462
+68463
+68464
+68465
+68466
+68467
+68468
+68469
+68470
+68471
+68472
+68473
+68474
+68475
+68476
+68477
+68478
+68479
+68480
+68481
+68482
+68483
+68484
+68485
+68486
+68487
+68488
+68489
+68490
+68491
+68492
+68493
+68494
+68495
+68496
+68497
+68498
+68499
+68500
+68501
+68502
+68503
+68504
+68505
+68506
+68507
+68508
+68509
+68510
+68511
+68512
+68513
+68514
+68515
+68516
+68517
+68518
+68519
+68520
+68521
+68522
+68523
+68524
+68525
+68526
+68527
+68528
+68529
+68530
+68531
+68532
+68533
+68534
+68535
+68536
+68537
+68538
+68539
+68540
+68541
+68542
+68543
+68544
+68545
+68546
+68547
+68548
+68549
+68550
+68551
+68552
+68553
+68554
+68555
+68556
+68557
+68558
+68559
+68560
+68561
+68562
+68563
+68564
+68565
+68566
+68567
+68568
+68569
+68570
+68571
+68572
+68573
+68574
+68575
+68576
+68577
+68578
+68579
+68580
+68581
+68582
+68583
+68584
+68585
+68586
+68587
+68588
+68589
+68590
+68591
+68592
+68593
+68594
+68595
+68596
+68597
+68598
+68599
+68600
+68601
+68602
+68603
+68604
+68605
+68606
+68607
+68608
+68609
+68610
+68611
+68612
+68613
+68614
+68615
+68616
+68617
+68618
+68619
+68620
+68621
+68622
+68623
+68624
+68625
+68626
+68627
+68628
+68629
+68630
+68631
+68632
+68633
+68634
+68635
+68636
+68637
+68638
+68639
+68640
+68641
+68642
+68643
+68644
+68645
+68646
+68647
+68648
+68649
+68650
+68651
+68652
+68653
+68654
+68655
+68656
+68657
+68658
+68659
+68660
+68661
+68662
+68663
+68664
+68665
+68666
+68667
+68668
+68669
+68670
+68671
+68672
+68673
+68674
+68675
+68676
+68677
+68678
+68679
+68680
+68681
+68682
+68683
+68684
+68685
+68686
+68687
+68688
+68689
+68690
+68691
+68692
+68693
+68694
+68695
+68696
+68697
+68698
+68699
+68700
+68701
+68702
+68703
+68704
+68705
+68706
+68707
+68708
+68709
+68710
+68711
+68712
+68713
+68714
+68715
+68716
+68717
+68718
+68719
+68720
+68721
+68722
+68723
+68724
+68725
+68726
+68727
+68728
+68729
+68730
+68731
+68732
+68733
+68734
+68735
+68736
+68737
+68738
+68739
+68740
+68741
+68742
+68743
+68744
+68745
+68746
+68747
+68748
+68749
+68750
+68751
+68752
+68753
+68754
+68755
+68756
+68757
+68758
+68759
+68760
+68761
+68762
+68763
+68764
+68765
+68766
+68767
+68768
+68769
+68770
+68771
+68772
+68773
+68774
+68775
+68776
+68777
+68778
+68779
+68780
+68781
+68782
+68783
+68784
+68785
+68786
+68787
+68788
+68789
+68790
+68791
+68792
+68793
+68794
+68795
+68796
+68797
+68798
+68799
+68800
+68801
+68802
+68803
+68804
+68805
+68806
+68807
+68808
+68809
+68810
+68811
+68812
+68813
+68814
+68815
+68816
+68817
+68818
+68819
+68820
+68821
+68822
+68823
+68824
+68825
+68826
+68827
+68828
+68829
+68830
+68831
+68832
+68833
+68834
+68835
+68836
+68837
+68838
+68839
+68840
+68841
+68842
+68843
+68844
+68845
+68846
+68847
+68848
+68849
+68850
+68851
+68852
+68853
+68854
+68855
+68856
+68857
+68858
+68859
+68860
+68861
+68862
+68863
+68864
+68865
+68866
+68867
+68868
+68869
+68870
+68871
+68872
+68873
+68874
+68875
+68876
+68877
+68878
+68879
+68880
+68881
+68882
+68883
+68884
+68885
+68886
+68887
+68888
+68889
+68890
+68891
+68892
+68893
+68894
+68895
+68896
+68897
+68898
+68899
+68900
+68901
+68902
+68903
+68904
+68905
+68906
+68907
+68908
+68909
+68910
+68911
+68912
+68913
+68914
+68915
+68916
+68917
+68918
+68919
+68920
+68921
+68922
+68923
+68924
+68925
+68926
+68927
+68928
+68929
+68930
+68931
+68932
+68933
+68934
+68935
+68936
+68937
+68938
+68939
+68940
+68941
+68942
+68943
+68944
+68945
+68946
+68947
+68948
+68949
+68950
+68951
+68952
+68953
+68954
+68955
+68956
+68957
+68958
+68959
+68960
+68961
+68962
+68963
+68964
+68965
+68966
+68967
+68968
+68969
+68970
+68971
+68972
+68973
+68974
+68975
+68976
+68977
+68978
+68979
+68980
+68981
+68982
+68983
+68984
+68985
+68986
+68987
+68988
+68989
+68990
+68991
+68992
+68993
+68994
+68995
+68996
+68997
+68998
+68999
+69000
+69001
+69002
+69003
+69004
+69005
+69006
+69007
+69008
+69009
+69010
+69011
+69012
+69013
+69014
+69015
+69016
+69017
+69018
+69019
+69020
+69021
+69022
+69023
+69024
+69025
+69026
+69027
+69028
+69029
+69030
+69031
+69032
+69033
+69034
+69035
+69036
+69037
+69038
+69039
+69040
+69041
+69042
+69043
+69044
+69045
+69046
+69047
+69048
+69049
+69050
+69051
+69052
+69053
+69054
+69055
+69056
+69057
+69058
+69059
+69060
+69061
+69062
+69063
+69064
+69065
+69066
+69067
+69068
+69069
+69070
+69071
+69072
+69073
+69074
+69075
+69076
+69077
+69078
+69079
+69080
+69081
+69082
+69083
+69084
+69085
+69086
+69087
+69088
+69089
+69090
+69091
+69092
+69093
+69094
+69095
+69096
+69097
+69098
+69099
+69100
+69101
+69102
+69103
+69104
+69105
+69106
+69107
+69108
+69109
+69110
+69111
+69112
+69113
+69114
+69115
+69116
+69117
+69118
+69119
+69120
+69121
+69122
+69123
+69124
+69125
+69126
+69127
+69128
+69129
+69130
+69131
+69132
+69133
+69134
+69135
+69136
+69137
+69138
+69139
+69140
+69141
+69142
+69143
+69144
+69145
+69146
+69147
+69148
+69149
+69150
+69151
+69152
+69153
+69154
+69155
+69156
+69157
+69158
+69159
+69160
+69161
+69162
+69163
+69164
+69165
+69166
+69167
+69168
+69169
+69170
+69171
+69172
+69173
+69174
+69175
+69176
+69177
+69178
+69179
+69180
+69181
+69182
+69183
+69184
+69185
+69186
+69187
+69188
+69189
+69190
+69191
+69192
+69193
+69194
+69195
+69196
+69197
+69198
+69199
+69200
+69201
+69202
+69203
+69204
+69205
+69206
+69207
+69208
+69209
+69210
+69211
+69212
+69213
+69214
+69215
+69216
+69217
+69218
+69219
+69220
+69221
+69222
+69223
+69224
+69225
+69226
+69227
+69228
+69229
+69230
+69231
+69232
+69233
+69234
+69235
+69236
+69237
+69238
+69239
+69240
+69241
+69242
+69243
+69244
+69245
+69246
+69247
+69248
+69249
+69250
+69251
+69252
+69253
+69254
+69255
+69256
+69257
+69258
+69259
+69260
+69261
+69262
+69263
+69264
+69265
+69266
+69267
+69268
+69269
+69270
+69271
+69272
+69273
+69274
+69275
+69276
+69277
+69278
+69279
+69280
+69281
+69282
+69283
+69284
+69285
+69286
+69287
+69288
+69289
+69290
+69291
+69292
+69293
+69294
+69295
+69296
+69297
+69298
+69299
+69300
+69301
+69302
+69303
+69304
+69305
+69306
+69307
+69308
+69309
+69310
+69311
+69312
+69313
+69314
+69315
+69316
+69317
+69318
+69319
+69320
+69321
+69322
+69323
+69324
+69325
+69326
+69327
+69328
+69329
+69330
+69331
+69332
+69333
+69334
+69335
+69336
+69337
+69338
+69339
+69340
+69341
+69342
+69343
+69344
+69345
+69346
+69347
+69348
+69349
+69350
+69351
+69352
+69353
+69354
+69355
+69356
+69357
+69358
+69359
+69360
+69361
+69362
+69363
+69364
+69365
+69366
+69367
+69368
+69369
+69370
+69371
+69372
+69373
+69374
+69375
+69376
+69377
+69378
+69379
+69380
+69381
+69382
+69383
+69384
+69385
+69386
+69387
+69388
+69389
+69390
+69391
+69392
+69393
+69394
+69395
+69396
+69397
+69398
+69399
+69400
+69401
+69402
+69403
+69404
+69405
+69406
+69407
+69408
+69409
+69410
+69411
+69412
+69413
+69414
+69415
+69416
+69417
+69418
+69419
+69420
+69421
+69422
+69423
+69424
+69425
+69426
+69427
+69428
+69429
+69430
+69431
+69432
+69433
+69434
+69435
+69436
+69437
+69438
+69439
+69440
+69441
+69442
+69443
+69444
+69445
+69446
+69447
+69448
+69449
+69450
+69451
+69452
+69453
+69454
+69455
+69456
+69457
+69458
+69459
+69460
+69461
+69462
+69463
+69464
+69465
+69466
+69467
+69468
+69469
+69470
+69471
+69472
+69473
+69474
+69475
+69476
+69477
+69478
+69479
+69480
+69481
+69482
+69483
+69484
+69485
+69486
+69487
+69488
+69489
+69490
+69491
+69492
+69493
+69494
+69495
+69496
+69497
+69498
+69499
+69500
+69501
+69502
+69503
+69504
+69505
+69506
+69507
+69508
+69509
+69510
+69511
+69512
+69513
+69514
+69515
+69516
+69517
+69518
+69519
+69520
+69521
+69522
+69523
+69524
+69525
+69526
+69527
+69528
+69529
+69530
+69531
+69532
+69533
+69534
+69535
+69536
+69537
+69538
+69539
+69540
+69541
+69542
+69543
+69544
+69545
+69546
+69547
+69548
+69549
+69550
+69551
+69552
+69553
+69554
+69555
+69556
+69557
+69558
+69559
+69560
+69561
+69562
+69563
+69564
+69565
+69566
+69567
+69568
+69569
+69570
+69571
+69572
+69573
+69574
+69575
+69576
+69577
+69578
+69579
+69580
+69581
+69582
+69583
+69584
+69585
+69586
+69587
+69588
+69589
+69590
+69591
+69592
+69593
+69594
+69595
+69596
+69597
+69598
+69599
+69600
+69601
+69602
+69603
+69604
+69605
+69606
+69607
+69608
+69609
+69610
+69611
+69612
+69613
+69614
+69615
+69616
+69617
+69618
+69619
+69620
+69621
+69622
+69623
+69624
+69625
+69626
+69627
+69628
+69629
+69630
+69631
+69632
+69633
+69634
+69635
+69636
+69637
+69638
+69639
+69640
+69641
+69642
+69643
+69644
+69645
+69646
+69647
+69648
+69649
+69650
+69651
+69652
+69653
+69654
+69655
+69656
+69657
+69658
+69659
+69660
+69661
+69662
+69663
+69664
+69665
+69666
+69667
+69668
+69669
+69670
+69671
+69672
+69673
+69674
+69675
+69676
+69677
+69678
+69679
+69680
+69681
+69682
+69683
+69684
+69685
+69686
+69687
+69688
+69689
+69690
+69691
+69692
+69693
+69694
+69695
+69696
+69697
+69698
+69699
+69700
+69701
+69702
+69703
+69704
+69705
+69706
+69707
+69708
+69709
+69710
+69711
+69712
+69713
+69714
+69715
+69716
+69717
+69718
+69719
+69720
+69721
+69722
+69723
+69724
+69725
+69726
+69727
+69728
+69729
+69730
+69731
+69732
+69733
+69734
+69735
+69736
+69737
+69738
+69739
+69740
+69741
+69742
+69743
+69744
+69745
+69746
+69747
+69748
+69749
+69750
+69751
+69752
+69753
+69754
+69755
+69756
+69757
+69758
+69759
+69760
+69761
+69762
+69763
+69764
+69765
+69766
+69767
+69768
+69769
+69770
+69771
+69772
+69773
+69774
+69775
+69776
+69777
+69778
+69779
+69780
+69781
+69782
+69783
+69784
+69785
+69786
+69787
+69788
+69789
+69790
+69791
+69792
+69793
+69794
+69795
+69796
+69797
+69798
+69799
+69800
+69801
+69802
+69803
+69804
+69805
+69806
+69807
+69808
+69809
+69810
+69811
+69812
+69813
+69814
+69815
+69816
+69817
+69818
+69819
+69820
+69821
+69822
+69823
+69824
+69825
+69826
+69827
+69828
+69829
+69830
+69831
+69832
+69833
+69834
+69835
+69836
+69837
+69838
+69839
+69840
+69841
+69842
+69843
+69844
+69845
+69846
+69847
+69848
+69849
+69850
+69851
+69852
+69853
+69854
+69855
+69856
+69857
+69858
+69859
+69860
+69861
+69862
+69863
+69864
+69865
+69866
+69867
+69868
+69869
+69870
+69871
+69872
+69873
+69874
+69875
+69876
+69877
+69878
+69879
+69880
+69881
+69882
+69883
+69884
+69885
+69886
+69887
+69888
+69889
+69890
+69891
+69892
+69893
+69894
+69895
+69896
+69897
+69898
+69899
+69900
+69901
+69902
+69903
+69904
+69905
+69906
+69907
+69908
+69909
+69910
+69911
+69912
+69913
+69914
+69915
+69916
+69917
+69918
+69919
+69920
+69921
+69922
+69923
+69924
+69925
+69926
+69927
+69928
+69929
+69930
+69931
+69932
+69933
+69934
+69935
+69936
+69937
+69938
+69939
+69940
+69941
+69942
+69943
+69944
+69945
+69946
+69947
+69948
+69949
+69950
+69951
+69952
+69953
+69954
+69955
+69956
+69957
+69958
+69959
+69960
+69961
+69962
+69963
+69964
+69965
+69966
+69967
+69968
+69969
+69970
+69971
+69972
+69973
+69974
+69975
+69976
+69977
+69978
+69979
+69980
+69981
+69982
+69983
+69984
+69985
+69986
+69987
+69988
+69989
+69990
+69991
+69992
+69993
+69994
+69995
+69996
+69997
+69998
+69999
+70000
+70001
+70002
+70003
+70004
+70005
+70006
+70007
+70008
+70009
+70010
+70011
+70012
+70013
+70014
+70015
+70016
+70017
+70018
+70019
+70020
+70021
+70022
+70023
+70024
+70025
+70026
+70027
+70028
+70029
+70030
+70031
+70032
+70033
+70034
+70035
+70036
+70037
+70038
+70039
+70040
+70041
+70042
+70043
+70044
+70045
+70046
+70047
+70048
+70049
+70050
+70051
+70052
+70053
+70054
+70055
+70056
+70057
+70058
+70059
+70060
+70061
+70062
+70063
+70064
+70065
+70066
+70067
+70068
+70069
+70070
+70071
+70072
+70073
+70074
+70075
+70076
+70077
+70078
+70079
+70080
+70081
+70082
+70083
+70084
+70085
+70086
+70087
+70088
+70089
+70090
+70091
+70092
+70093
+70094
+70095
+70096
+70097
+70098
+70099
+70100
+70101
+70102
+70103
+70104
+70105
+70106
+70107
+70108
+70109
+70110
+70111
+70112
+70113
+70114
+70115
+70116
+70117
+70118
+70119
+70120
+70121
+70122
+70123
+70124
+70125
+70126
+70127
+70128
+70129
+70130
+70131
+70132
+70133
+70134
+70135
+70136
+70137
+70138
+70139
+70140
+70141
+70142
+70143
+70144
+70145
+70146
+70147
+70148
+70149
+70150
+70151
+70152
+70153
+70154
+70155
+70156
+70157
+70158
+70159
+70160
+70161
+70162
+70163
+70164
+70165
+70166
+70167
+70168
+70169
+70170
+70171
+70172
+70173
+70174
+70175
+70176
+70177
+70178
+70179
+70180
+70181
+70182
+70183
+70184
+70185
+70186
+70187
+70188
+70189
+70190
+70191
+70192
+70193
+70194
+70195
+70196
+70197
+70198
+70199
+70200
+70201
+70202
+70203
+70204
+70205
+70206
+70207
+70208
+70209
+70210
+70211
+70212
+70213
+70214
+70215
+70216
+70217
+70218
+70219
+70220
+70221
+70222
+70223
+70224
+70225
+70226
+70227
+70228
+70229
+70230
+70231
+70232
+70233
+70234
+70235
+70236
+70237
+70238
+70239
+70240
+70241
+70242
+70243
+70244
+70245
+70246
+70247
+70248
+70249
+70250
+70251
+70252
+70253
+70254
+70255
+70256
+70257
+70258
+70259
+70260
+70261
+70262
+70263
+70264
+70265
+70266
+70267
+70268
+70269
+70270
+70271
+70272
+70273
+70274
+70275
+70276
+70277
+70278
+70279
+70280
+70281
+70282
+70283
+70284
+70285
+70286
+70287
+70288
+70289
+70290
+70291
+70292
+70293
+70294
+70295
+70296
+70297
+70298
+70299
+70300
+70301
+70302
+70303
+70304
+70305
+70306
+70307
+70308
+70309
+70310
+70311
+70312
+70313
+70314
+70315
+70316
+70317
+70318
+70319
+70320
+70321
+70322
+70323
+70324
+70325
+70326
+70327
+70328
+70329
+70330
+70331
+70332
+70333
+70334
+70335
+70336
+70337
+70338
+70339
+70340
+70341
+70342
+70343
+70344
+70345
+70346
+70347
+70348
+70349
+70350
+70351
+70352
+70353
+70354
+70355
+70356
+70357
+70358
+70359
+70360
+70361
+70362
+70363
+70364
+70365
+70366
+70367
+70368
+70369
+70370
+70371
+70372
+70373
+70374
+70375
+70376
+70377
+70378
+70379
+70380
+70381
+70382
+70383
+70384
+70385
+70386
+70387
+70388
+70389
+70390
+70391
+70392
+70393
+70394
+70395
+70396
+70397
+70398
+70399
+70400
+70401
+70402
+70403
+70404
+70405
+70406
+70407
+70408
+70409
+70410
+70411
+70412
+70413
+70414
+70415
+70416
+70417
+70418
+70419
+70420
+70421
+70422
+70423
+70424
+70425
+70426
+70427
+70428
+70429
+70430
+70431
+70432
+70433
+70434
+70435
+70436
+70437
+70438
+70439
+70440
+70441
+70442
+70443
+70444
+70445
+70446
+70447
+70448
+70449
+70450
+70451
+70452
+70453
+70454
+70455
+70456
+70457
+70458
+70459
+70460
+70461
+70462
+70463
+70464
+70465
+70466
+70467
+70468
+70469
+70470
+70471
+70472
+70473
+70474
+70475
+70476
+70477
+70478
+70479
+70480
+70481
+70482
+70483
+70484
+70485
+70486
+70487
+70488
+70489
+70490
+70491
+70492
+70493
+70494
+70495
+70496
+70497
+70498
+70499
+70500
+70501
+70502
+70503
+70504
+70505
+70506
+70507
+70508
+70509
+70510
+70511
+70512
+70513
+70514
+70515
+70516
+70517
+70518
+70519
+70520
+70521
+70522
+70523
+70524
+70525
+70526
+70527
+70528
+70529
+70530
+70531
+70532
+70533
+70534
+70535
+70536
+70537
+70538
+70539
+70540
+70541
+70542
+70543
+70544
+70545
+70546
+70547
+70548
+70549
+70550
+70551
+70552
+70553
+70554
+70555
+70556
+70557
+70558
+70559
+70560
+70561
+70562
+70563
+70564
+70565
+70566
+70567
+70568
+70569
+70570
+70571
+70572
+70573
+70574
+70575
+70576
+70577
+70578
+70579
+70580
+70581
+70582
+70583
+70584
+70585
+70586
+70587
+70588
+70589
+70590
+70591
+70592
+70593
+70594
+70595
+70596
+70597
+70598
+70599
+70600
+70601
+70602
+70603
+70604
+70605
+70606
+70607
+70608
+70609
+70610
+70611
+70612
+70613
+70614
+70615
+70616
+70617
+70618
+70619
+70620
+70621
+70622
+70623
+70624
+70625
+70626
+70627
+70628
+70629
+70630
+70631
+70632
+70633
+70634
+70635
+70636
+70637
+70638
+70639
+70640
+70641
+70642
+70643
+70644
+70645
+70646
+70647
+70648
+70649
+70650
+70651
+70652
+70653
+70654
+70655
+70656
+70657
+70658
+70659
+70660
+70661
+70662
+70663
+70664
+70665
+70666
+70667
+70668
+70669
+70670
+70671
+70672
+70673
+70674
+70675
+70676
+70677
+70678
+70679
+70680
+70681
+70682
+70683
+70684
+70685
+70686
+70687
+70688
+70689
+70690
+70691
+70692
+70693
+70694
+70695
+70696
+70697
+70698
+70699
+70700
+70701
+70702
+70703
+70704
+70705
+70706
+70707
+70708
+70709
+70710
+70711
+70712
+70713
+70714
+70715
+70716
+70717
+70718
+70719
+70720
+70721
+70722
+70723
+70724
+70725
+70726
+70727
+70728
+70729
+70730
+70731
+70732
+70733
+70734
+70735
+70736
+70737
+70738
+70739
+70740
+70741
+70742
+70743
+70744
+70745
+70746
+70747
+70748
+70749
+70750
+70751
+70752
+70753
+70754
+70755
+70756
+70757
+70758
+70759
+70760
+70761
+70762
+70763
+70764
+70765
+70766
+70767
+70768
+70769
+70770
+70771
+70772
+70773
+70774
+70775
+70776
+70777
+70778
+70779
+70780
+70781
+70782
+70783
+70784
+70785
+70786
+70787
+70788
+70789
+70790
+70791
+70792
+70793
+70794
+70795
+70796
+70797
+70798
+70799
+70800
+70801
+70802
+70803
+70804
+70805
+70806
+70807
+70808
+70809
+70810
+70811
+70812
+70813
+70814
+70815
+70816
+70817
+70818
+70819
+70820
+70821
+70822
+70823
+70824
+70825
+70826
+70827
+70828
+70829
+70830
+70831
+70832
+70833
+70834
+70835
+70836
+70837
+70838
+70839
+70840
+70841
+70842
+70843
+70844
+70845
+70846
+70847
+70848
+70849
+70850
+70851
+70852
+70853
+70854
+70855
+70856
+70857
+70858
+70859
+70860
+70861
+70862
+70863
+70864
+70865
+70866
+70867
+70868
+70869
+70870
+70871
+70872
+70873
+70874
+70875
+70876
+70877
+70878
+70879
+70880
+70881
+70882
+70883
+70884
+70885
+70886
+70887
+70888
+70889
+70890
+70891
+70892
+70893
+70894
+70895
+70896
+70897
+70898
+70899
+70900
+70901
+70902
+70903
+70904
+70905
+70906
+70907
+70908
+70909
+70910
+70911
+70912
+70913
+70914
+70915
+70916
+70917
+70918
+70919
+70920
+70921
+70922
+70923
+70924
+70925
+70926
+70927
+70928
+70929
+70930
+70931
+70932
+70933
+70934
+70935
+70936
+70937
+70938
+70939
+70940
+70941
+70942
+70943
+70944
+70945
+70946
+70947
+70948
+70949
+70950
+70951
+70952
+70953
+70954
+70955
+70956
+70957
+70958
+70959
+70960
+70961
+70962
+70963
+70964
+70965
+70966
+70967
+70968
+70969
+70970
+70971
+70972
+70973
+70974
+70975
+70976
+70977
+70978
+70979
+70980
+70981
+70982
+70983
+70984
+70985
+70986
+70987
+70988
+70989
+70990
+70991
+70992
+70993
+70994
+70995
+70996
+70997
+70998
+70999
+71000
+71001
+71002
+71003
+71004
+71005
+71006
+71007
+71008
+71009
+71010
+71011
+71012
+71013
+71014
+71015
+71016
+71017
+71018
+71019
+71020
+71021
+71022
+71023
+71024
+71025
+71026
+71027
+71028
+71029
+71030
+71031
+71032
+71033
+71034
+71035
+71036
+71037
+71038
+71039
+71040
+71041
+71042
+71043
+71044
+71045
+71046
+71047
+71048
+71049
+71050
+71051
+71052
+71053
+71054
+71055
+71056
+71057
+71058
+71059
+71060
+71061
+71062
+71063
+71064
+71065
+71066
+71067
+71068
+71069
+71070
+71071
+71072
+71073
+71074
+71075
+71076
+71077
+71078
+71079
+71080
+71081
+71082
+71083
+71084
+71085
+71086
+71087
+71088
+71089
+71090
+71091
+71092
+71093
+71094
+71095
+71096
+71097
+71098
+71099
+71100
+71101
+71102
+71103
+71104
+71105
+71106
+71107
+71108
+71109
+71110
+71111
+71112
+71113
+71114
+71115
+71116
+71117
+71118
+71119
+71120
+71121
+71122
+71123
+71124
+71125
+71126
+71127
+71128
+71129
+71130
+71131
+71132
+71133
+71134
+71135
+71136
+71137
+71138
+71139
+71140
+71141
+71142
+71143
+71144
+71145
+71146
+71147
+71148
+71149
+71150
+71151
+71152
+71153
+71154
+71155
+71156
+71157
+71158
+71159
+71160
+71161
+71162
+71163
+71164
+71165
+71166
+71167
+71168
+71169
+71170
+71171
+71172
+71173
+71174
+71175
+71176
+71177
+71178
+71179
+71180
+71181
+71182
+71183
+71184
+71185
+71186
+71187
+71188
+71189
+71190
+71191
+71192
+71193
+71194
+71195
+71196
+71197
+71198
+71199
+71200
+71201
+71202
+71203
+71204
+71205
+71206
+71207
+71208
+71209
+71210
+71211
+71212
+71213
+71214
+71215
+71216
+71217
+71218
+71219
+71220
+71221
+71222
+71223
+71224
+71225
+71226
+71227
+71228
+71229
+71230
+71231
+71232
+71233
+71234
+71235
+71236
+71237
+71238
+71239
+71240
+71241
+71242
+71243
+71244
+71245
+71246
+71247
+71248
+71249
+71250
+71251
+71252
+71253
+71254
+71255
+71256
+71257
+71258
+71259
+71260
+71261
+71262
+71263
+71264
+71265
+71266
+71267
+71268
+71269
+71270
+71271
+71272
+71273
+71274
+71275
+71276
+71277
+71278
+71279
+71280
+71281
+71282
+71283
+71284
+71285
+71286
+71287
+71288
+71289
+71290
+71291
+71292
+71293
+71294
+71295
+71296
+71297
+71298
+71299
+71300
+71301
+71302
+71303
+71304
+71305
+71306
+71307
+71308
+71309
+71310
+71311
+71312
+71313
+71314
+71315
+71316
+71317
+71318
+71319
+71320
+71321
+71322
+71323
+71324
+71325
+71326
+71327
+71328
+71329
+71330
+71331
+71332
+71333
+71334
+71335
+71336
+71337
+71338
+71339
+71340
+71341
+71342
+71343
+71344
+71345
+71346
+71347
+71348
+71349
+71350
+71351
+71352
+71353
+71354
+71355
+71356
+71357
+71358
+71359
+71360
+71361
+71362
+71363
+71364
+71365
+71366
+71367
+71368
+71369
+71370
+71371
+71372
+71373
+71374
+71375
+71376
+71377
+71378
+71379
+71380
+71381
+71382
+71383
+71384
+71385
+71386
+71387
+71388
+71389
+71390
+71391
+71392
+71393
+71394
+71395
+71396
+71397
+71398
+71399
+71400
+71401
+71402
+71403
+71404
+71405
+71406
+71407
+71408
+71409
+71410
+71411
+71412
+71413
+71414
+71415
+71416
+71417
+71418
+71419
+71420
+71421
+71422
+71423
+71424
+71425
+71426
+71427
+71428
+71429
+71430
+71431
+71432
+71433
+71434
+71435
+71436
+71437
+71438
+71439
+71440
+71441
+71442
+71443
+71444
+71445
+71446
+71447
+71448
+71449
+71450
+71451
+71452
+71453
+71454
+71455
+71456
+71457
+71458
+71459
+71460
+71461
+71462
+71463
+71464
+71465
+71466
+71467
+71468
+71469
+71470
+71471
+71472
+71473
+71474
+71475
+71476
+71477
+71478
+71479
+71480
+71481
+71482
+71483
+71484
+71485
+71486
+71487
+71488
+71489
+71490
+71491
+71492
+71493
+71494
+71495
+71496
+71497
+71498
+71499
+71500
+71501
+71502
+71503
+71504
+71505
+71506
+71507
+71508
+71509
+71510
+71511
+71512
+71513
+71514
+71515
+71516
+71517
+71518
+71519
+71520
+71521
+71522
+71523
+71524
+71525
+71526
+71527
+71528
+71529
+71530
+71531
+71532
+71533
+71534
+71535
+71536
+71537
+71538
+71539
+71540
+71541
+71542
+71543
+71544
+71545
+71546
+71547
+71548
+71549
+71550
+71551
+71552
+71553
+71554
+71555
+71556
+71557
+71558
+71559
+71560
+71561
+71562
+71563
+71564
+71565
+71566
+71567
+71568
+71569
+71570
+71571
+71572
+71573
+71574
+71575
+71576
+71577
+71578
+71579
+71580
+71581
+71582
+71583
+71584
+71585
+71586
+71587
+71588
+71589
+71590
+71591
+71592
+71593
+71594
+71595
+71596
+71597
+71598
+71599
+71600
+71601
+71602
+71603
+71604
+71605
+71606
+71607
+71608
+71609
+71610
+71611
+71612
+71613
+71614
+71615
+71616
+71617
+71618
+71619
+71620
+71621
+71622
+71623
+71624
+71625
+71626
+71627
+71628
+71629
+71630
+71631
+71632
+71633
+71634
+71635
+71636
+71637
+71638
+71639
+71640
+71641
+71642
+71643
+71644
+71645
+71646
+71647
+71648
+71649
+71650
+71651
+71652
+71653
+71654
+71655
+71656
+71657
+71658
+71659
+71660
+71661
+71662
+71663
+71664
+71665
+71666
+71667
+71668
+71669
+71670
+71671
+71672
+71673
+71674
+71675
+71676
+71677
+71678
+71679
+71680
+71681
+71682
+71683
+71684
+71685
+71686
+71687
+71688
+71689
+71690
+71691
+71692
+71693
+71694
+71695
+71696
+71697
+71698
+71699
+71700
+71701
+71702
+71703
+71704
+71705
+71706
+71707
+71708
+71709
+71710
+71711
+71712
+71713
+71714
+71715
+71716
+71717
+71718
+71719
+71720
+71721
+71722
+71723
+71724
+71725
+71726
+71727
+71728
+71729
+71730
+71731
+71732
+71733
+71734
+71735
+71736
+71737
+71738
+71739
+71740
+71741
+71742
+71743
+71744
+71745
+71746
+71747
+71748
+71749
+71750
+71751
+71752
+71753
+71754
+71755
+71756
+71757
+71758
+71759
+71760
+71761
+71762
+71763
+71764
+71765
+71766
+71767
+71768
+71769
+71770
+71771
+71772
+71773
+71774
+71775
+71776
+71777
+71778
+71779
+71780
+71781
+71782
+71783
+71784
+71785
+71786
+71787
+71788
+71789
+71790
+71791
+71792
+71793
+71794
+71795
+71796
+71797
+71798
+71799
+71800
+71801
+71802
+71803
+71804
+71805
+71806
+71807
+71808
+71809
+71810
+71811
+71812
+71813
+71814
+71815
+71816
+71817
+71818
+71819
+71820
+71821
+71822
+71823
+71824
+71825
+71826
+71827
+71828
+71829
+71830
+71831
+71832
+71833
+71834
+71835
+71836
+71837
+71838
+71839
+71840
+71841
+71842
+71843
+71844
+71845
+71846
+71847
+71848
+71849
+71850
+71851
+71852
+71853
+71854
+71855
+71856
+71857
+71858
+71859
+71860
+71861
+71862
+71863
+71864
+71865
+71866
+71867
+71868
+71869
+71870
+71871
+71872
+71873
+71874
+71875
+71876
+71877
+71878
+71879
+71880
+71881
+71882
+71883
+71884
+71885
+71886
+71887
+71888
+71889
+71890
+71891
+71892
+71893
+71894
+71895
+71896
+71897
+71898
+71899
+71900
+71901
+71902
+71903
+71904
+71905
+71906
+71907
+71908
+71909
+71910
+71911
+71912
+71913
+71914
+71915
+71916
+71917
+71918
+71919
+71920
+71921
+71922
+71923
+71924
+71925
+71926
+71927
+71928
+71929
+71930
+71931
+71932
+71933
+71934
+71935
+71936
+71937
+71938
+71939
+71940
+71941
+71942
+71943
+71944
+71945
+71946
+71947
+71948
+71949
+71950
+71951
+71952
+71953
+71954
+71955
+71956
+71957
+71958
+71959
+71960
+71961
+71962
+71963
+71964
+71965
+71966
+71967
+71968
+71969
+71970
+71971
+71972
+71973
+71974
+71975
+71976
+71977
+71978
+71979
+71980
+71981
+71982
+71983
+71984
+71985
+71986
+71987
+71988
+71989
+71990
+71991
+71992
+71993
+71994
+71995
+71996
+71997
+71998
+71999
+72000
+72001
+72002
+72003
+72004
+72005
+72006
+72007
+72008
+72009
+72010
+72011
+72012
+72013
+72014
+72015
+72016
+72017
+72018
+72019
+72020
+72021
+72022
+72023
+72024
+72025
+72026
+72027
+72028
+72029
+72030
+72031
+72032
+72033
+72034
+72035
+72036
+72037
+72038
+72039
+72040
+72041
+72042
+72043
+72044
+72045
+72046
+72047
+72048
+72049
+72050
+72051
+72052
+72053
+72054
+72055
+72056
+72057
+72058
+72059
+72060
+72061
+72062
+72063
+72064
+72065
+72066
+72067
+72068
+72069
+72070
+72071
+72072
+72073
+72074
+72075
+72076
+72077
+72078
+72079
+72080
+72081
+72082
+72083
+72084
+72085
+72086
+72087
+72088
+72089
+72090
+72091
+72092
+72093
+72094
+72095
+72096
+72097
+72098
+72099
+72100
+72101
+72102
+72103
+72104
+72105
+72106
+72107
+72108
+72109
+72110
+72111
+72112
+72113
+72114
+72115
+72116
+72117
+72118
+72119
+72120
+72121
+72122
+72123
+72124
+72125
+72126
+72127
+72128
+72129
+72130
+72131
+72132
+72133
+72134
+72135
+72136
+72137
+72138
+72139
+72140
+72141
+72142
+72143
+72144
+72145
+72146
+72147
+72148
+72149
+72150
+72151
+72152
+72153
+72154
+72155
+72156
+72157
+72158
+72159
+72160
+72161
+72162
+72163
+72164
+72165
+72166
+72167
+72168
+72169
+72170
+72171
+72172
+72173
+72174
+72175
+72176
+72177
+72178
+72179
+72180
+72181
+72182
+72183
+72184
+72185
+72186
+72187
+72188
+72189
+72190
+72191
+72192
+72193
+72194
+72195
+72196
+72197
+72198
+72199
+72200
+72201
+72202
+72203
+72204
+72205
+72206
+72207
+72208
+72209
+72210
+72211
+72212
+72213
+72214
+72215
+72216
+72217
+72218
+72219
+72220
+72221
+72222
+72223
+72224
+72225
+72226
+72227
+72228
+72229
+72230
+72231
+72232
+72233
+72234
+72235
+72236
+72237
+72238
+72239
+72240
+72241
+72242
+72243
+72244
+72245
+72246
+72247
+72248
+72249
+72250
+72251
+72252
+72253
+72254
+72255
+72256
+72257
+72258
+72259
+72260
+72261
+72262
+72263
+72264
+72265
+72266
+72267
+72268
+72269
+72270
+72271
+72272
+72273
+72274
+72275
+72276
+72277
+72278
+72279
+72280
+72281
+72282
+72283
+72284
+72285
+72286
+72287
+72288
+72289
+72290
+72291
+72292
+72293
+72294
+72295
+72296
+72297
+72298
+72299
+72300
+72301
+72302
+72303
+72304
+72305
+72306
+72307
+72308
+72309
+72310
+72311
+72312
+72313
+72314
+72315
+72316
+72317
+72318
+72319
+72320
+72321
+72322
+72323
+72324
+72325
+72326
+72327
+72328
+72329
+72330
+72331
+72332
+72333
+72334
+72335
+72336
+72337
+72338
+72339
+72340
+72341
+72342
+72343
+72344
+72345
+72346
+72347
+72348
+72349
+72350
+72351
+72352
+72353
+72354
+72355
+72356
+72357
+72358
+72359
+72360
+72361
+72362
+72363
+72364
+72365
+72366
+72367
+72368
+72369
+72370
+72371
+72372
+72373
+72374
+72375
+72376
+72377
+72378
+72379
+72380
+72381
+72382
+72383
+72384
+72385
+72386
+72387
+72388
+72389
+72390
+72391
+72392
+72393
+72394
+72395
+72396
+72397
+72398
+72399
+72400
+72401
+72402
+72403
+72404
+72405
+72406
+72407
+72408
+72409
+72410
+72411
+72412
+72413
+72414
+72415
+72416
+72417
+72418
+72419
+72420
+72421
+72422
+72423
+72424
+72425
+72426
+72427
+72428
+72429
+72430
+72431
+72432
+72433
+72434
+72435
+72436
+72437
+72438
+72439
+72440
+72441
+72442
+72443
+72444
+72445
+72446
+72447
+72448
+72449
+72450
+72451
+72452
+72453
+72454
+72455
+72456
+72457
+72458
+72459
+72460
+72461
+72462
+72463
+72464
+72465
+72466
+72467
+72468
+72469
+72470
+72471
+72472
+72473
+72474
+72475
+72476
+72477
+72478
+72479
+72480
+72481
+72482
+72483
+72484
+72485
+72486
+72487
+72488
+72489
+72490
+72491
+72492
+72493
+72494
+72495
+72496
+72497
+72498
+72499
+72500
+72501
+72502
+72503
+72504
+72505
+72506
+72507
+72508
+72509
+72510
+72511
+72512
+72513
+72514
+72515
+72516
+72517
+72518
+72519
+72520
+72521
+72522
+72523
+72524
+72525
+72526
+72527
+72528
+72529
+72530
+72531
+72532
+72533
+72534
+72535
+72536
+72537
+72538
+72539
+72540
+72541
+72542
+72543
+72544
+72545
+72546
+72547
+72548
+72549
+72550
+72551
+72552
+72553
+72554
+72555
+72556
+72557
+72558
+72559
+72560
+72561
+72562
+72563
+72564
+72565
+72566
+72567
+72568
+72569
+72570
+72571
+72572
+72573
+72574
+72575
+72576
+72577
+72578
+72579
+72580
+72581
+72582
+72583
+72584
+72585
+72586
+72587
+72588
+72589
+72590
+72591
+72592
+72593
+72594
+72595
+72596
+72597
+72598
+72599
+72600
+72601
+72602
+72603
+72604
+72605
+72606
+72607
+72608
+72609
+72610
+72611
+72612
+72613
+72614
+72615
+72616
+72617
+72618
+72619
+72620
+72621
+72622
+72623
+72624
+72625
+72626
+72627
+72628
+72629
+72630
+72631
+72632
+72633
+72634
+72635
+72636
+72637
+72638
+72639
+72640
+72641
+72642
+72643
+72644
+72645
+72646
+72647
+72648
+72649
+72650
+72651
+72652
+72653
+72654
+72655
+72656
+72657
+72658
+72659
+72660
+72661
+72662
+72663
+72664
+72665
+72666
+72667
+72668
+72669
+72670
+72671
+72672
+72673
+72674
+72675
+72676
+72677
+72678
+72679
+72680
+72681
+72682
+72683
+72684
+72685
+72686
+72687
+72688
+72689
+72690
+72691
+72692
+72693
+72694
+72695
+72696
+72697
+72698
+72699
+72700
+72701
+72702
+72703
+72704
+72705
+72706
+72707
+72708
+72709
+72710
+72711
+72712
+72713
+72714
+72715
+72716
+72717
+72718
+72719
+72720
+72721
+72722
+72723
+72724
+72725
+72726
+72727
+72728
+72729
+72730
+72731
+72732
+72733
+72734
+72735
+72736
+72737
+72738
+72739
+72740
+72741
+72742
+72743
+72744
+72745
+72746
+72747
+72748
+72749
+72750
+72751
+72752
+72753
+72754
+72755
+72756
+72757
+72758
+72759
+72760
+72761
+72762
+72763
+72764
+72765
+72766
+72767
+72768
+72769
+72770
+72771
+72772
+72773
+72774
+72775
+72776
+72777
+72778
+72779
+72780
+72781
+72782
+72783
+72784
+72785
+72786
+72787
+72788
+72789
+72790
+72791
+72792
+72793
+72794
+72795
+72796
+72797
+72798
+72799
+72800
+72801
+72802
+72803
+72804
+72805
+72806
+72807
+72808
+72809
+72810
+72811
+72812
+72813
+72814
+72815
+72816
+72817
+72818
+72819
+72820
+72821
+72822
+72823
+72824
+72825
+72826
+72827
+72828
+72829
+72830
+72831
+72832
+72833
+72834
+72835
+72836
+72837
+72838
+72839
+72840
+72841
+72842
+72843
+72844
+72845
+72846
+72847
+72848
+72849
+72850
+72851
+72852
+72853
+72854
+72855
+72856
+72857
+72858
+72859
+72860
+72861
+72862
+72863
+72864
+72865
+72866
+72867
+72868
+72869
+72870
+72871
+72872
+72873
+72874
+72875
+72876
+72877
+72878
+72879
+72880
+72881
+72882
+72883
+72884
+72885
+72886
+72887
+72888
+72889
+72890
+72891
+72892
+72893
+72894
+72895
+72896
+72897
+72898
+72899
+72900
+72901
+72902
+72903
+72904
+72905
+72906
+72907
+72908
+72909
+72910
+72911
+72912
+72913
+72914
+72915
+72916
+72917
+72918
+72919
+72920
+72921
+72922
+72923
+72924
+72925
+72926
+72927
+72928
+72929
+72930
+72931
+72932
+72933
+72934
+72935
+72936
+72937
+72938
+72939
+72940
+72941
+72942
+72943
+72944
+72945
+72946
+72947
+72948
+72949
+72950
+72951
+72952
+72953
+72954
+72955
+72956
+72957
+72958
+72959
+72960
+72961
+72962
+72963
+72964
+72965
+72966
+72967
+72968
+72969
+72970
+72971
+72972
+72973
+72974
+72975
+72976
+72977
+72978
+72979
+72980
+72981
+72982
+72983
+72984
+72985
+72986
+72987
+72988
+72989
+72990
+72991
+72992
+72993
+72994
+72995
+72996
+72997
+72998
+72999
+73000
+73001
+73002
+73003
+73004
+73005
+73006
+73007
+73008
+73009
+73010
+73011
+73012
+73013
+73014
+73015
+73016
+73017
+73018
+73019
+73020
+73021
+73022
+73023
+73024
+73025
+73026
+73027
+73028
+73029
+73030
+73031
+73032
+73033
+73034
+73035
+73036
+73037
+73038
+73039
+73040
+73041
+73042
+73043
+73044
+73045
+73046
+73047
+73048
+73049
+73050
+73051
+73052
+73053
+73054
+73055
+73056
+73057
+73058
+73059
+73060
+73061
+73062
+73063
+73064
+73065
+73066
+73067
+73068
+73069
+73070
+73071
+73072
+73073
+73074
+73075
+73076
+73077
+73078
+73079
+73080
+73081
+73082
+73083
+73084
+73085
+73086
+73087
+73088
+73089
+73090
+73091
+73092
+73093
+73094
+73095
+73096
+73097
+73098
+73099
+73100
+73101
+73102
+73103
+73104
+73105
+73106
+73107
+73108
+73109
+73110
+73111
+73112
+73113
+73114
+73115
+73116
+73117
+73118
+73119
+73120
+73121
+73122
+73123
+73124
+73125
+73126
+73127
+73128
+73129
+73130
+73131
+73132
+73133
+73134
+73135
+73136
+73137
+73138
+73139
+73140
+73141
+73142
+73143
+73144
+73145
+73146
+73147
+73148
+73149
+73150
+73151
+73152
+73153
+73154
+73155
+73156
+73157
+73158
+73159
+73160
+73161
+73162
+73163
+73164
+73165
+73166
+73167
+73168
+73169
+73170
+73171
+73172
+73173
+73174
+73175
+73176
+73177
+73178
+73179
+73180
+73181
+73182
+73183
+73184
+73185
+73186
+73187
+73188
+73189
+73190
+73191
+73192
+73193
+73194
+73195
+73196
+73197
+73198
+73199
+73200
+73201
+73202
+73203
+73204
+73205
+73206
+73207
+73208
+73209
+73210
+73211
+73212
+73213
+73214
+73215
+73216
+73217
+73218
+73219
+73220
+73221
+73222
+73223
+73224
+73225
+73226
+73227
+73228
+73229
+73230
+73231
+73232
+73233
+73234
+73235
+73236
+73237
+73238
+73239
+73240
+73241
+73242
+73243
+73244
+73245
+73246
+73247
+73248
+73249
+73250
+73251
+73252
+73253
+73254
+73255
+73256
+73257
+73258
+73259
+73260
+73261
+73262
+73263
+73264
+73265
+73266
+73267
+73268
+73269
+73270
+73271
+73272
+73273
+73274
+73275
+73276
+73277
+73278
+73279
+73280
+73281
+73282
+73283
+73284
+73285
+73286
+73287
+73288
+73289
+73290
+73291
+73292
+73293
+73294
+73295
+73296
+73297
+73298
+73299
+73300
+73301
+73302
+73303
+73304
+73305
+73306
+73307
+73308
+73309
+73310
+73311
+73312
+73313
+73314
+73315
+73316
+73317
+73318
+73319
+73320
+73321
+73322
+73323
+73324
+73325
+73326
+73327
+73328
+73329
+73330
+73331
+73332
+73333
+73334
+73335
+73336
+73337
+73338
+73339
+73340
+73341
+73342
+73343
+73344
+73345
+73346
+73347
+73348
+73349
+73350
+73351
+73352
+73353
+73354
+73355
+73356
+73357
+73358
+73359
+73360
+73361
+73362
+73363
+73364
+73365
+73366
+73367
+73368
+73369
+73370
+73371
+73372
+73373
+73374
+73375
+73376
+73377
+73378
+73379
+73380
+73381
+73382
+73383
+73384
+73385
+73386
+73387
+73388
+73389
+73390
+73391
+73392
+73393
+73394
+73395
+73396
+73397
+73398
+73399
+73400
+73401
+73402
+73403
+73404
+73405
+73406
+73407
+73408
+73409
+73410
+73411
+73412
+73413
+73414
+73415
+73416
+73417
+73418
+73419
+73420
+73421
+73422
+73423
+73424
+73425
+73426
+73427
+73428
+73429
+73430
+73431
+73432
+73433
+73434
+73435
+73436
+73437
+73438
+73439
+73440
+73441
+73442
+73443
+73444
+73445
+73446
+73447
+73448
+73449
+73450
+73451
+73452
+73453
+73454
+73455
+73456
+73457
+73458
+73459
+73460
+73461
+73462
+73463
+73464
+73465
+73466
+73467
+73468
+73469
+73470
+73471
+73472
+73473
+73474
+73475
+73476
+73477
+73478
+73479
+73480
+73481
+73482
+73483
+73484
+73485
+73486
+73487
+73488
+73489
+73490
+73491
+73492
+73493
+73494
+73495
+73496
+73497
+73498
+73499
+73500
+73501
+73502
+73503
+73504
+73505
+73506
+73507
+73508
+73509
+73510
+73511
+73512
+73513
+73514
+73515
+73516
+73517
+73518
+73519
+73520
+73521
+73522
+73523
+73524
+73525
+73526
+73527
+73528
+73529
+73530
+73531
+73532
+73533
+73534
+73535
+73536
+73537
+73538
+73539
+73540
+73541
+73542
+73543
+73544
+73545
+73546
+73547
+73548
+73549
+73550
+73551
+73552
+73553
+73554
+73555
+73556
+73557
+73558
+73559
+73560
+73561
+73562
+73563
+73564
+73565
+73566
+73567
+73568
+73569
+73570
+73571
+73572
+73573
+73574
+73575
+73576
+73577
+73578
+73579
+73580
+73581
+73582
+73583
+73584
+73585
+73586
+73587
+73588
+73589
+73590
+73591
+73592
+73593
+73594
+73595
+73596
+73597
+73598
+73599
+73600
+73601
+73602
+73603
+73604
+73605
+73606
+73607
+73608
+73609
+73610
+73611
+73612
+73613
+73614
+73615
+73616
+73617
+73618
+73619
+73620
+73621
+73622
+73623
+73624
+73625
+73626
+73627
+73628
+73629
+73630
+73631
+73632
+73633
+73634
+73635
+73636
+73637
+73638
+73639
+73640
+73641
+73642
+73643
+73644
+73645
+73646
+73647
+73648
+73649
+73650
+73651
+73652
+73653
+73654
+73655
+73656
+73657
+73658
+73659
+73660
+73661
+73662
+73663
+73664
+73665
+73666
+73667
+73668
+73669
+73670
+73671
+73672
+73673
+73674
+73675
+73676
+73677
+73678
+73679
+73680
+73681
+73682
+73683
+73684
+73685
+73686
+73687
+73688
+73689
+73690
+73691
+73692
+73693
+73694
+73695
+73696
+73697
+73698
+73699
+73700
+73701
+73702
+73703
+73704
+73705
+73706
+73707
+73708
+73709
+73710
+73711
+73712
+73713
+73714
+73715
+73716
+73717
+73718
+73719
+73720
+73721
+73722
+73723
+73724
+73725
+73726
+73727
+73728
+73729
+73730
+73731
+73732
+73733
+73734
+73735
+73736
+73737
+73738
+73739
+73740
+73741
+73742
+73743
+73744
+73745
+73746
+73747
+73748
+73749
+73750
+73751
+73752
+73753
+73754
+73755
+73756
+73757
+73758
+73759
+73760
+73761
+73762
+73763
+73764
+73765
+73766
+73767
+73768
+73769
+73770
+73771
+73772
+73773
+73774
+73775
+73776
+73777
+73778
+73779
+73780
+73781
+73782
+73783
+73784
+73785
+73786
+73787
+73788
+73789
+73790
+73791
+73792
+73793
+73794
+73795
+73796
+73797
+73798
+73799
+73800
+73801
+73802
+73803
+73804
+73805
+73806
+73807
+73808
+73809
+73810
+73811
+73812
+73813
+73814
+73815
+73816
+73817
+73818
+73819
+73820
+73821
+73822
+73823
+73824
+73825
+73826
+73827
+73828
+73829
+73830
+73831
+73832
+73833
+73834
+73835
+73836
+73837
+73838
+73839
+73840
+73841
+73842
+73843
+73844
+73845
+73846
+73847
+73848
+73849
+73850
+73851
+73852
+73853
+73854
+73855
+73856
+73857
+73858
+73859
+73860
+73861
+73862
+73863
+73864
+73865
+73866
+73867
+73868
+73869
+73870
+73871
+73872
+73873
+73874
+73875
+73876
+73877
+73878
+73879
+73880
+73881
+73882
+73883
+73884
+73885
+73886
+73887
+73888
+73889
+73890
+73891
+73892
+73893
+73894
+73895
+73896
+73897
+73898
+73899
+73900
+73901
+73902
+73903
+73904
+73905
+73906
+73907
+73908
+73909
+73910
+73911
+73912
+73913
+73914
+73915
+73916
+73917
+73918
+73919
+73920
+73921
+73922
+73923
+73924
+73925
+73926
+73927
+73928
+73929
+73930
+73931
+73932
+73933
+73934
+73935
+73936
+73937
+73938
+73939
+73940
+73941
+73942
+73943
+73944
+73945
+73946
+73947
+73948
+73949
+73950
+73951
+73952
+73953
+73954
+73955
+73956
+73957
+73958
+73959
+73960
+73961
+73962
+73963
+73964
+73965
+73966
+73967
+73968
+73969
+73970
+73971
+73972
+73973
+73974
+73975
+73976
+73977
+73978
+73979
+73980
+73981
+73982
+73983
+73984
+73985
+73986
+73987
+73988
+73989
+73990
+73991
+73992
+73993
+73994
+73995
+73996
+73997
+73998
+73999
+74000
+74001
+74002
+74003
+74004
+74005
+74006
+74007
+74008
+74009
+74010
+74011
+74012
+74013
+74014
+74015
+74016
+74017
+74018
+74019
+74020
+74021
+74022
+74023
+74024
+74025
+74026
+74027
+74028
+74029
+74030
+74031
+74032
+74033
+74034
+74035
+74036
+74037
+74038
+74039
+74040
+74041
+74042
+74043
+74044
+74045
+74046
+74047
+74048
+74049
+74050
+74051
+74052
+74053
+74054
+74055
+74056
+74057
+74058
+74059
+74060
+74061
+74062
+74063
+74064
+74065
+74066
+74067
+74068
+74069
+74070
+74071
+74072
+74073
+74074
+74075
+74076
+74077
+74078
+74079
+74080
+74081
+74082
+74083
+74084
+74085
+74086
+74087
+74088
+74089
+74090
+74091
+74092
+74093
+74094
+74095
+74096
+74097
+74098
+74099
+74100
+74101
+74102
+74103
+74104
+74105
+74106
+74107
+74108
+74109
+74110
+74111
+74112
+74113
+74114
+74115
+74116
+74117
+74118
+74119
+74120
+74121
+74122
+74123
+74124
+74125
+74126
+74127
+74128
+74129
+74130
+74131
+74132
+74133
+74134
+74135
+74136
+74137
+74138
+74139
+74140
+74141
+74142
+74143
+74144
+74145
+74146
+74147
+74148
+74149
+74150
+74151
+74152
+74153
+74154
+74155
+74156
+74157
+74158
+74159
+74160
+74161
+74162
+74163
+74164
+74165
+74166
+74167
+74168
+74169
+74170
+74171
+74172
+74173
+74174
+74175
+74176
+74177
+74178
+74179
+74180
+74181
+74182
+74183
+74184
+74185
+74186
+74187
+74188
+74189
+74190
+74191
+74192
+74193
+74194
+74195
+74196
+74197
+74198
+74199
+74200
+74201
+74202
+74203
+74204
+74205
+74206
+74207
+74208
+74209
+74210
+74211
+74212
+74213
+74214
+74215
+74216
+74217
+74218
+74219
+74220
+74221
+74222
+74223
+74224
+74225
+74226
+74227
+74228
+74229
+74230
+74231
+74232
+74233
+74234
+74235
+74236
+74237
+74238
+74239
+74240
+74241
+74242
+74243
+74244
+74245
+74246
+74247
+74248
+74249
+74250
+74251
+74252
+74253
+74254
+74255
+74256
+74257
+74258
+74259
+74260
+74261
+74262
+74263
+74264
+74265
+74266
+74267
+74268
+74269
+74270
+74271
+74272
+74273
+74274
+74275
+74276
+74277
+74278
+74279
+74280
+74281
+74282
+74283
+74284
+74285
+74286
+74287
+74288
+74289
+74290
+74291
+74292
+74293
+74294
+74295
+74296
+74297
+74298
+74299
+74300
+74301
+74302
+74303
+74304
+74305
+74306
+74307
+74308
+74309
+74310
+74311
+74312
+74313
+74314
+74315
+74316
+74317
+74318
+74319
+74320
+74321
+74322
+74323
+74324
+74325
+74326
+74327
+74328
+74329
+74330
+74331
+74332
+74333
+74334
+74335
+74336
+74337
+74338
+74339
+74340
+74341
+74342
+74343
+74344
+74345
+74346
+74347
+74348
+74349
+74350
+74351
+74352
+74353
+74354
+74355
+74356
+74357
+74358
+74359
+74360
+74361
+74362
+74363
+74364
+74365
+74366
+74367
+74368
+74369
+74370
+74371
+74372
+74373
+74374
+74375
+74376
+74377
+74378
+74379
+74380
+74381
+74382
+74383
+74384
+74385
+74386
+74387
+74388
+74389
+74390
+74391
+74392
+74393
+74394
+74395
+74396
+74397
+74398
+74399
+74400
+74401
+74402
+74403
+74404
+74405
+74406
+74407
+74408
+74409
+74410
+74411
+74412
+74413
+74414
+74415
+74416
+74417
+74418
+74419
+74420
+74421
+74422
+74423
+74424
+74425
+74426
+74427
+74428
+74429
+74430
+74431
+74432
+74433
+74434
+74435
+74436
+74437
+74438
+74439
+74440
+74441
+74442
+74443
+74444
+74445
+74446
+74447
+74448
+74449
+74450
+74451
+74452
+74453
+74454
+74455
+74456
+74457
+74458
+74459
+74460
+74461
+74462
+74463
+74464
+74465
+74466
+74467
+74468
+74469
+74470
+74471
+74472
+74473
+74474
+74475
+74476
+74477
+74478
+74479
+74480
+74481
+74482
+74483
+74484
+74485
+74486
+74487
+74488
+74489
+74490
+74491
+74492
+74493
+74494
+74495
+74496
+74497
+74498
+74499
+74500
+74501
+74502
+74503
+74504
+74505
+74506
+74507
+74508
+74509
+74510
+74511
+74512
+74513
+74514
+74515
+74516
+74517
+74518
+74519
+74520
+74521
+74522
+74523
+74524
+74525
+74526
+74527
+74528
+74529
+74530
+74531
+74532
+74533
+74534
+74535
+74536
+74537
+74538
+74539
+74540
+74541
+74542
+74543
+74544
+74545
+74546
+74547
+74548
+74549
+74550
+74551
+74552
+74553
+74554
+74555
+74556
+74557
+74558
+74559
+74560
+74561
+74562
+74563
+74564
+74565
+74566
+74567
+74568
+74569
+74570
+74571
+74572
+74573
+74574
+74575
+74576
+74577
+74578
+74579
+74580
+74581
+74582
+74583
+74584
+74585
+74586
+74587
+74588
+74589
+74590
+74591
+74592
+74593
+74594
+74595
+74596
+74597
+74598
+74599
+74600
+74601
+74602
+74603
+74604
+74605
+74606
+74607
+74608
+74609
+74610
+74611
+74612
+74613
+74614
+74615
+74616
+74617
+74618
+74619
+74620
+74621
+74622
+74623
+74624
+74625
+74626
+74627
+74628
+74629
+74630
+74631
+74632
+74633
+74634
+74635
+74636
+74637
+74638
+74639
+74640
+74641
+74642
+74643
+74644
+74645
+74646
+74647
+74648
+74649
+74650
+74651
+74652
+74653
+74654
+74655
+74656
+74657
+74658
+74659
+74660
+74661
+74662
+74663
+74664
+74665
+74666
+74667
+74668
+74669
+74670
+74671
+74672
+74673
+74674
+74675
+74676
+74677
+74678
+74679
+74680
+74681
+74682
+74683
+74684
+74685
+74686
+74687
+74688
+74689
+74690
+74691
+74692
+74693
+74694
+74695
+74696
+74697
+74698
+74699
+74700
+74701
+74702
+74703
+74704
+74705
+74706
+74707
+74708
+74709
+74710
+74711
+74712
+74713
+74714
+74715
+74716
+74717
+74718
+74719
+74720
+74721
+74722
+74723
+74724
+74725
+74726
+74727
+74728
+74729
+74730
+74731
+74732
+74733
+74734
+74735
+74736
+74737
+74738
+74739
+74740
+74741
+74742
+74743
+74744
+74745
+74746
+74747
+74748
+74749
+74750
+74751
+74752
+74753
+74754
+74755
+74756
+74757
+74758
+74759
+74760
+74761
+74762
+74763
+74764
+74765
+74766
+74767
+74768
+74769
+74770
+74771
+74772
+74773
+74774
+74775
+74776
+74777
+74778
+74779
+74780
+74781
+74782
+74783
+74784
+74785
+74786
+74787
+74788
+74789
+74790
+74791
+74792
+74793
+74794
+74795
+74796
+74797
+74798
+74799
+74800
+74801
+74802
+74803
+74804
+74805
+74806
+74807
+74808
+74809
+74810
+74811
+74812
+74813
+74814
+74815
+74816
+74817
+74818
+74819
+74820
+74821
+74822
+74823
+74824
+74825
+74826
+74827
+74828
+74829
+74830
+74831
+74832
+74833
+74834
+74835
+74836
+74837
+74838
+74839
+74840
+74841
+74842
+74843
+74844
+74845
+74846
+74847
+74848
+74849
+74850
+74851
+74852
+74853
+74854
+74855
+74856
+74857
+74858
+74859
+74860
+74861
+74862
+74863
+74864
+74865
+74866
+74867
+74868
+74869
+74870
+74871
+74872
+74873
+74874
+74875
+74876
+74877
+74878
+74879
+74880
+74881
+74882
+74883
+74884
+74885
+74886
+74887
+74888
+74889
+74890
+74891
+74892
+74893
+74894
+74895
+74896
+74897
+74898
+74899
+74900
+74901
+74902
+74903
+74904
+74905
+74906
+74907
+74908
+74909
+74910
+74911
+74912
+74913
+74914
+74915
+74916
+74917
+74918
+74919
+74920
+74921
+74922
+74923
+74924
+74925
+74926
+74927
+74928
+74929
+74930
+74931
+74932
+74933
+74934
+74935
+74936
+74937
+74938
+74939
+74940
+74941
+74942
+74943
+74944
+74945
+74946
+74947
+74948
+74949
+74950
+74951
+74952
+74953
+74954
+74955
+74956
+74957
+74958
+74959
+74960
+74961
+74962
+74963
+74964
+74965
+74966
+74967
+74968
+74969
+74970
+74971
+74972
+74973
+74974
+74975
+74976
+74977
+74978
+74979
+74980
+74981
+74982
+74983
+74984
+74985
+74986
+74987
+74988
+74989
+74990
+74991
+74992
+74993
+74994
+74995
+74996
+74997
+74998
+74999
+75000
+75001
+75002
+75003
+75004
+75005
+75006
+75007
+75008
+75009
+75010
+75011
+75012
+75013
+75014
+75015
+75016
+75017
+75018
+75019
+75020
+75021
+75022
+75023
+75024
+75025
+75026
+75027
+75028
+75029
+75030
+75031
+75032
+75033
+75034
+75035
+75036
+75037
+75038
+75039
+75040
+75041
+75042
+75043
+75044
+75045
+75046
+75047
+75048
+75049
+75050
+75051
+75052
+75053
+75054
+75055
+75056
+75057
+75058
+75059
+75060
+75061
+75062
+75063
+75064
+75065
+75066
+75067
+75068
+75069
+75070
+75071
+75072
+75073
+75074
+75075
+75076
+75077
+75078
+75079
+75080
+75081
+75082
+75083
+75084
+75085
+75086
+75087
+75088
+75089
+75090
+75091
+75092
+75093
+75094
+75095
+75096
+75097
+75098
+75099
+75100
+75101
+75102
+75103
+75104
+75105
+75106
+75107
+75108
+75109
+75110
+75111
+75112
+75113
+75114
+75115
+75116
+75117
+75118
+75119
+75120
+75121
+75122
+75123
+75124
+75125
+75126
+75127
+75128
+75129
+75130
+75131
+75132
+75133
+75134
+75135
+75136
+75137
+75138
+75139
+75140
+75141
+75142
+75143
+75144
+75145
+75146
+75147
+75148
+75149
+75150
+75151
+75152
+75153
+75154
+75155
+75156
+75157
+75158
+75159
+75160
+75161
+75162
+75163
+75164
+75165
+75166
+75167
+75168
+75169
+75170
+75171
+75172
+75173
+75174
+75175
+75176
+75177
+75178
+75179
+75180
+75181
+75182
+75183
+75184
+75185
+75186
+75187
+75188
+75189
+75190
+75191
+75192
+75193
+75194
+75195
+75196
+75197
+75198
+75199
+75200
+75201
+75202
+75203
+75204
+75205
+75206
+75207
+75208
+75209
+75210
+75211
+75212
+75213
+75214
+75215
+75216
+75217
+75218
+75219
+75220
+75221
+75222
+75223
+75224
+75225
+75226
+75227
+75228
+75229
+75230
+75231
+75232
+75233
+75234
+75235
+75236
+75237
+75238
+75239
+75240
+75241
+75242
+75243
+75244
+75245
+75246
+75247
+75248
+75249
+75250
+75251
+75252
+75253
+75254
+75255
+75256
+75257
+75258
+75259
+75260
+75261
+75262
+75263
+75264
+75265
+75266
+75267
+75268
+75269
+75270
+75271
+75272
+75273
+75274
+75275
+75276
+75277
+75278
+75279
+75280
+75281
+75282
+75283
+75284
+75285
+75286
+75287
+75288
+75289
+75290
+75291
+75292
+75293
+75294
+75295
+75296
+75297
+75298
+75299
+75300
+75301
+75302
+75303
+75304
+75305
+75306
+75307
+75308
+75309
+75310
+75311
+75312
+75313
+75314
+75315
+75316
+75317
+75318
+75319
+75320
+75321
+75322
+75323
+75324
+75325
+75326
+75327
+75328
+75329
+75330
+75331
+75332
+75333
+75334
+75335
+75336
+75337
+75338
+75339
+75340
+75341
+75342
+75343
+75344
+75345
+75346
+75347
+75348
+75349
+75350
+75351
+75352
+75353
+75354
+75355
+75356
+75357
+75358
+75359
+75360
+75361
+75362
+75363
+75364
+75365
+75366
+75367
+75368
+75369
+75370
+75371
+75372
+75373
+75374
+75375
+75376
+75377
+75378
+75379
+75380
+75381
+75382
+75383
+75384
+75385
+75386
+75387
+75388
+75389
+75390
+75391
+75392
+75393
+75394
+75395
+75396
+75397
+75398
+75399
+75400
+75401
+75402
+75403
+75404
+75405
+75406
+75407
+75408
+75409
+75410
+75411
+75412
+75413
+75414
+75415
+75416
+75417
+75418
+75419
+75420
+75421
+75422
+75423
+75424
+75425
+75426
+75427
+75428
+75429
+75430
+75431
+75432
+75433
+75434
+75435
+75436
+75437
+75438
+75439
+75440
+75441
+75442
+75443
+75444
+75445
+75446
+75447
+75448
+75449
+75450
+75451
+75452
+75453
+75454
+75455
+75456
+75457
+75458
+75459
+75460
+75461
+75462
+75463
+75464
+75465
+75466
+75467
+75468
+75469
+75470
+75471
+75472
+75473
+75474
+75475
+75476
+75477
+75478
+75479
+75480
+75481
+75482
+75483
+75484
+75485
+75486
+75487
+75488
+75489
+75490
+75491
+75492
+75493
+75494
+75495
+75496
+75497
+75498
+75499
+75500
+75501
+75502
+75503
+75504
+75505
+75506
+75507
+75508
+75509
+75510
+75511
+75512
+75513
+75514
+75515
+75516
+75517
+75518
+75519
+75520
+75521
+75522
+75523
+75524
+75525
+75526
+75527
+75528
+75529
+75530
+75531
+75532
+75533
+75534
+75535
+75536
+75537
+75538
+75539
+75540
+75541
+75542
+75543
+75544
+75545
+75546
+75547
+75548
+75549
+75550
+75551
+75552
+75553
+75554
+75555
+75556
+75557
+75558
+75559
+75560
+75561
+75562
+75563
+75564
+75565
+75566
+75567
+75568
+75569
+75570
+75571
+75572
+75573
+75574
+75575
+75576
+75577
+75578
+75579
+75580
+75581
+75582
+75583
+75584
+75585
+75586
+75587
+75588
+75589
+75590
+75591
+75592
+75593
+75594
+75595
+75596
+75597
+75598
+75599
+75600
+75601
+75602
+75603
+75604
+75605
+75606
+75607
+75608
+75609
+75610
+75611
+75612
+75613
+75614
+75615
+75616
+75617
+75618
+75619
+75620
+75621
+75622
+75623
+75624
+75625
+75626
+75627
+75628
+75629
+75630
+75631
+75632
+75633
+75634
+75635
+75636
+75637
+75638
+75639
+75640
+75641
+75642
+75643
+75644
+75645
+75646
+75647
+75648
+75649
+75650
+75651
+75652
+75653
+75654
+75655
+75656
+75657
+75658
+75659
+75660
+75661
+75662
+75663
+75664
+75665
+75666
+75667
+75668
+75669
+75670
+75671
+75672
+75673
+75674
+75675
+75676
+75677
+75678
+75679
+75680
+75681
+75682
+75683
+75684
+75685
+75686
+75687
+75688
+75689
+75690
+75691
+75692
+75693
+75694
+75695
+75696
+75697
+75698
+75699
+75700
+75701
+75702
+75703
+75704
+75705
+75706
+75707
+75708
+75709
+75710
+75711
+75712
+75713
+75714
+75715
+75716
+75717
+75718
+75719
+75720
+75721
+75722
+75723
+75724
+75725
+75726
+75727
+75728
+75729
+75730
+75731
+75732
+75733
+75734
+75735
+75736
+75737
+75738
+75739
+75740
+75741
+75742
+75743
+75744
+75745
+75746
+75747
+75748
+75749
+75750
+75751
+75752
+75753
+75754
+75755
+75756
+75757
+75758
+75759
+75760
+75761
+75762
+75763
+75764
+75765
+75766
+75767
+75768
+75769
+75770
+75771
+75772
+75773
+75774
+75775
+75776
+75777
+75778
+75779
+75780
+75781
+75782
+75783
+75784
+75785
+75786
+75787
+75788
+75789
+75790
+75791
+75792
+75793
+75794
+75795
+75796
+75797
+75798
+75799
+75800
+75801
+75802
+75803
+75804
+75805
+75806
+75807
+75808
+75809
+75810
+75811
+75812
+75813
+75814
+75815
+75816
+75817
+75818
+75819
+75820
+75821
+75822
+75823
+75824
+75825
+75826
+75827
+75828
+75829
+75830
+75831
+75832
+75833
+75834
+75835
+75836
+75837
+75838
+75839
+75840
+75841
+75842
+75843
+75844
+75845
+75846
+75847
+75848
+75849
+75850
+75851
+75852
+75853
+75854
+75855
+75856
+75857
+75858
+75859
+75860
+75861
+75862
+75863
+75864
+75865
+75866
+75867
+75868
+75869
+75870
+75871
+75872
+75873
+75874
+75875
+75876
+75877
+75878
+75879
+75880
+75881
+75882
+75883
+75884
+75885
+75886
+75887
+75888
+75889
+75890
+75891
+75892
+75893
+75894
+75895
+75896
+75897
+75898
+75899
+75900
+75901
+75902
+75903
+75904
+75905
+75906
+75907
+75908
+75909
+75910
+75911
+75912
+75913
+75914
+75915
+75916
+75917
+75918
+75919
+75920
+75921
+75922
+75923
+75924
+75925
+75926
+75927
+75928
+75929
+75930
+75931
+75932
+75933
+75934
+75935
+75936
+75937
+75938
+75939
+75940
+75941
+75942
+75943
+75944
+75945
+75946
+75947
+75948
+75949
+75950
+75951
+75952
+75953
+75954
+75955
+75956
+75957
+75958
+75959
+75960
+75961
+75962
+75963
+75964
+75965
+75966
+75967
+75968
+75969
+75970
+75971
+75972
+75973
+75974
+75975
+75976
+75977
+75978
+75979
+75980
+75981
+75982
+75983
+75984
+75985
+75986
+75987
+75988
+75989
+75990
+75991
+75992
+75993
+75994
+75995
+75996
+75997
+75998
+75999
+76000
+76001
+76002
+76003
+76004
+76005
+76006
+76007
+76008
+76009
+76010
+76011
+76012
+76013
+76014
+76015
+76016
+76017
+76018
+76019
+76020
+76021
+76022
+76023
+76024
+76025
+76026
+76027
+76028
+76029
+76030
+76031
+76032
+76033
+76034
+76035
+76036
+76037
+76038
+76039
+76040
+76041
+76042
+76043
+76044
+76045
+76046
+76047
+76048
+76049
+76050
+76051
+76052
+76053
+76054
+76055
+76056
+76057
+76058
+76059
+76060
+76061
+76062
+76063
+76064
+76065
+76066
+76067
+76068
+76069
+76070
+76071
+76072
+76073
+76074
+76075
+76076
+76077
+76078
+76079
+76080
+76081
+76082
+76083
+76084
+76085
+76086
+76087
+76088
+76089
+76090
+76091
+76092
+76093
+76094
+76095
+76096
+76097
+76098
+76099
+76100
+76101
+76102
+76103
+76104
+76105
+76106
+76107
+76108
+76109
+76110
+76111
+76112
+76113
+76114
+76115
+76116
+76117
+76118
+76119
+76120
+76121
+76122
+76123
+76124
+76125
+76126
+76127
+76128
+76129
+76130
+76131
+76132
+76133
+76134
+76135
+76136
+76137
+76138
+76139
+76140
+76141
+76142
+76143
+76144
+76145
+76146
+76147
+76148
+76149
+76150
+76151
+76152
+76153
+76154
+76155
+76156
+76157
+76158
+76159
+76160
+76161
+76162
+76163
+76164
+76165
+76166
+76167
+76168
+76169
+76170
+76171
+76172
+76173
+76174
+76175
+76176
+76177
+76178
+76179
+76180
+76181
+76182
+76183
+76184
+76185
+76186
+76187
+76188
+76189
+76190
+76191
+76192
+76193
+76194
+76195
+76196
+76197
+76198
+76199
+76200
+76201
+76202
+76203
+76204
+76205
+76206
+76207
+76208
+76209
+76210
+76211
+76212
+76213
+76214
+76215
+76216
+76217
+76218
+76219
+76220
+76221
+76222
+76223
+76224
+76225
+76226
+76227
+76228
+76229
+76230
+76231
+76232
+76233
+76234
+76235
+76236
+76237
+76238
+76239
+76240
+76241
+76242
+76243
+76244
+76245
+76246
+76247
+76248
+76249
+76250
+76251
+76252
+76253
+76254
+76255
+76256
+76257
+76258
+76259
+76260
+76261
+76262
+76263
+76264
+76265
+76266
+76267
+76268
+76269
+76270
+76271
+76272
+76273
+76274
+76275
+76276
+76277
+76278
+76279
+76280
+76281
+76282
+76283
+76284
+76285
+76286
+76287
+76288
+76289
+76290
+76291
+76292
+76293
+76294
+76295
+76296
+76297
+76298
+76299
+76300
+76301
+76302
+76303
+76304
+76305
+76306
+76307
+76308
+76309
+76310
+76311
+76312
+76313
+76314
+76315
+76316
+76317
+76318
+76319
+76320
+76321
+76322
+76323
+76324
+76325
+76326
+76327
+76328
+76329
+76330
+76331
+76332
+76333
+76334
+76335
+76336
+76337
+76338
+76339
+76340
+76341
+76342
+76343
+76344
+76345
+76346
+76347
+76348
+76349
+76350
+76351
+76352
+76353
+76354
+76355
+76356
+76357
+76358
+76359
+76360
+76361
+76362
+76363
+76364
+76365
+76366
+76367
+76368
+76369
+76370
+76371
+76372
+76373
+76374
+76375
+76376
+76377
+76378
+76379
+76380
+76381
+76382
+76383
+76384
+76385
+76386
+76387
+76388
+76389
+76390
+76391
+76392
+76393
+76394
+76395
+76396
+76397
+76398
+76399
+76400
+76401
+76402
+76403
+76404
+76405
+76406
+76407
+76408
+76409
+76410
+76411
+76412
+76413
+76414
+76415
+76416
+76417
+76418
+76419
+76420
+76421
+76422
+76423
+76424
+76425
+76426
+76427
+76428
+76429
+76430
+76431
+76432
+76433
+76434
+76435
+76436
+76437
+76438
+76439
+76440
+76441
+76442
+76443
+76444
+76445
+76446
+76447
+76448
+76449
+76450
+76451
+76452
+76453
+76454
+76455
+76456
+76457
+76458
+76459
+76460
+76461
+76462
+76463
+76464
+76465
+76466
+76467
+76468
+76469
+76470
+76471
+76472
+76473
+76474
+76475
+76476
+76477
+76478
+76479
+76480
+76481
+76482
+76483
+76484
+76485
+76486
+76487
+76488
+76489
+76490
+76491
+76492
+76493
+76494
+76495
+76496
+76497
+76498
+76499
+76500
+76501
+76502
+76503
+76504
+76505
+76506
+76507
+76508
+76509
+76510
+76511
+76512
+76513
+76514
+76515
+76516
+76517
+76518
+76519
+76520
+76521
+76522
+76523
+76524
+76525
+76526
+76527
+76528
+76529
+76530
+76531
+76532
+76533
+76534
+76535
+76536
+76537
+76538
+76539
+76540
+76541
+76542
+76543
+76544
+76545
+76546
+76547
+76548
+76549
+76550
+76551
+76552
+76553
+76554
+76555
+76556
+76557
+76558
+76559
+76560
+76561
+76562
+76563
+76564
+76565
+76566
+76567
+76568
+76569
+76570
+76571
+76572
+76573
+76574
+76575
+76576
+76577
+76578
+76579
+76580
+76581
+76582
+76583
+76584
+76585
+76586
+76587
+76588
+76589
+76590
+76591
+76592
+76593
+76594
+76595
+76596
+76597
+76598
+76599
+76600
+76601
+76602
+76603
+76604
+76605
+76606
+76607
+76608
+76609
+76610
+76611
+76612
+76613
+76614
+76615
+76616
+76617
+76618
+76619
+76620
+76621
+76622
+76623
+76624
+76625
+76626
+76627
+76628
+76629
+76630
+76631
+76632
+76633
+76634
+76635
+76636
+76637
+76638
+76639
+76640
+76641
+76642
+76643
+76644
+76645
+76646
+76647
+76648
+76649
+76650
+76651
+76652
+76653
+76654
+76655
+76656
+76657
+76658
+76659
+76660
+76661
+76662
+76663
+76664
+76665
+76666
+76667
+76668
+76669
+76670
+76671
+76672
+76673
+76674
+76675
+76676
+76677
+76678
+76679
+76680
+76681
+76682
+76683
+76684
+76685
+76686
+76687
+76688
+76689
+76690
+76691
+76692
+76693
+76694
+76695
+76696
+76697
+76698
+76699
+76700
+76701
+76702
+76703
+76704
+76705
+76706
+76707
+76708
+76709
+76710
+76711
+76712
+76713
+76714
+76715
+76716
+76717
+76718
+76719
+76720
+76721
+76722
+76723
+76724
+76725
+76726
+76727
+76728
+76729
+76730
+76731
+76732
+76733
+76734
+76735
+76736
+76737
+76738
+76739
+76740
+76741
+76742
+76743
+76744
+76745
+76746
+76747
+76748
+76749
+76750
+76751
+76752
+76753
+76754
+76755
+76756
+76757
+76758
+76759
+76760
+76761
+76762
+76763
+76764
+76765
+76766
+76767
+76768
+76769
+76770
+76771
+76772
+76773
+76774
+76775
+76776
+76777
+76778
+76779
+76780
+76781
+76782
+76783
+76784
+76785
+76786
+76787
+76788
+76789
+76790
+76791
+76792
+76793
+76794
+76795
+76796
+76797
+76798
+76799
+76800
+76801
+76802
+76803
+76804
+76805
+76806
+76807
+76808
+76809
+76810
+76811
+76812
+76813
+76814
+76815
+76816
+76817
+76818
+76819
+76820
+76821
+76822
+76823
+76824
+76825
+76826
+76827
+76828
+76829
+76830
+76831
+76832
+76833
+76834
+76835
+76836
+76837
+76838
+76839
+76840
+76841
+76842
+76843
+76844
+76845
+76846
+76847
+76848
+76849
+76850
+76851
+76852
+76853
+76854
+76855
+76856
+76857
+76858
+76859
+76860
+76861
+76862
+76863
+76864
+76865
+76866
+76867
+76868
+76869
+76870
+76871
+76872
+76873
+76874
+76875
+76876
+76877
+76878
+76879
+76880
+76881
+76882
+76883
+76884
+76885
+76886
+76887
+76888
+76889
+76890
+76891
+76892
+76893
+76894
+76895
+76896
+76897
+76898
+76899
+76900
+76901
+76902
+76903
+76904
+76905
+76906
+76907
+76908
+76909
+76910
+76911
+76912
+76913
+76914
+76915
+76916
+76917
+76918
+76919
+76920
+76921
+76922
+76923
+76924
+76925
+76926
+76927
+76928
+76929
+76930
+76931
+76932
+76933
+76934
+76935
+76936
+76937
+76938
+76939
+76940
+76941
+76942
+76943
+76944
+76945
+76946
+76947
+76948
+76949
+76950
+76951
+76952
+76953
+76954
+76955
+76956
+76957
+76958
+76959
+76960
+76961
+76962
+76963
+76964
+76965
+76966
+76967
+76968
+76969
+76970
+76971
+76972
+76973
+76974
+76975
+76976
+76977
+76978
+76979
+76980
+76981
+76982
+76983
+76984
+76985
+76986
+76987
+76988
+76989
+76990
+76991
+76992
+76993
+76994
+76995
+76996
+76997
+76998
+76999
+77000
+77001
+77002
+77003
+77004
+77005
+77006
+77007
+77008
+77009
+77010
+77011
+77012
+77013
+77014
+77015
+77016
+77017
+77018
+77019
+77020
+77021
+77022
+77023
+77024
+77025
+77026
+77027
+77028
+77029
+77030
+77031
+77032
+77033
+77034
+77035
+77036
+77037
+77038
+77039
+77040
+77041
+77042
+77043
+77044
+77045
+77046
+77047
+77048
+77049
+77050
+77051
+77052
+77053
+77054
+77055
+77056
+77057
+77058
+77059
+77060
+77061
+77062
+77063
+77064
+77065
+77066
+77067
+77068
+77069
+77070
+77071
+77072
+77073
+77074
+77075
+77076
+77077
+77078
+77079
+77080
+77081
+77082
+77083
+77084
+77085
+77086
+77087
+77088
+77089
+77090
+77091
+77092
+77093
+77094
+77095
+77096
+77097
+77098
+77099
+77100
+77101
+77102
+77103
+77104
+77105
+77106
+77107
+77108
+77109
+77110
+77111
+77112
+77113
+77114
+77115
+77116
+77117
+77118
+77119
+77120
+77121
+77122
+77123
+77124
+77125
+77126
+77127
+77128
+77129
+77130
+77131
+77132
+77133
+77134
+77135
+77136
+77137
+77138
+77139
+77140
+77141
+77142
+77143
+77144
+77145
+77146
+77147
+77148
+77149
+77150
+77151
+77152
+77153
+77154
+77155
+77156
+77157
+77158
+77159
+77160
+77161
+77162
+77163
+77164
+77165
+77166
+77167
+77168
+77169
+77170
+77171
+77172
+77173
+77174
+77175
+77176
+77177
+77178
+77179
+77180
+77181
+77182
+77183
+77184
+77185
+77186
+77187
+77188
+77189
+77190
+77191
+77192
+77193
+77194
+77195
+77196
+77197
+77198
+77199
+77200
+77201
+77202
+77203
+77204
+77205
+77206
+77207
+77208
+77209
+77210
+77211
+77212
+77213
+77214
+77215
+77216
+77217
+77218
+77219
+77220
+77221
+77222
+77223
+77224
+77225
+77226
+77227
+77228
+77229
+77230
+77231
+77232
+77233
+77234
+77235
+77236
+77237
+77238
+77239
+77240
+77241
+77242
+77243
+77244
+77245
+77246
+77247
+77248
+77249
+77250
+77251
+77252
+77253
+77254
+77255
+77256
+77257
+77258
+77259
+77260
+77261
+77262
+77263
+77264
+77265
+77266
+77267
+77268
+77269
+77270
+77271
+77272
+77273
+77274
+77275
+77276
+77277
+77278
+77279
+77280
+77281
+77282
+77283
+77284
+77285
+77286
+77287
+77288
+77289
+77290
+77291
+77292
+77293
+77294
+77295
+77296
+77297
+77298
+77299
+77300
+77301
+77302
+77303
+77304
+77305
+77306
+77307
+77308
+77309
+77310
+77311
+77312
+77313
+77314
+77315
+77316
+77317
+77318
+77319
+77320
+77321
+77322
+77323
+77324
+77325
+77326
+77327
+77328
+77329
+77330
+77331
+77332
+77333
+77334
+77335
+77336
+77337
+77338
+77339
+77340
+77341
+77342
+77343
+77344
+77345
+77346
+77347
+77348
+77349
+77350
+77351
+77352
+77353
+77354
+77355
+77356
+77357
+77358
+77359
+77360
+77361
+77362
+77363
+77364
+77365
+77366
+77367
+77368
+77369
+77370
+77371
+77372
+77373
+77374
+77375
+77376
+77377
+77378
+77379
+77380
+77381
+77382
+77383
+77384
+77385
+77386
+77387
+77388
+77389
+77390
+77391
+77392
+77393
+77394
+77395
+77396
+77397
+77398
+77399
+77400
+77401
+77402
+77403
+77404
+77405
+77406
+77407
+77408
+77409
+77410
+77411
+77412
+77413
+77414
+77415
+77416
+77417
+77418
+77419
+77420
+77421
+77422
+77423
+77424
+77425
+77426
+77427
+77428
+77429
+77430
+77431
+77432
+77433
+77434
+77435
+77436
+77437
+77438
+77439
+77440
+77441
+77442
+77443
+77444
+77445
+77446
+77447
+77448
+77449
+77450
+77451
+77452
+77453
+77454
+77455
+77456
+77457
+77458
+77459
+77460
+77461
+77462
+77463
+77464
+77465
+77466
+77467
+77468
+77469
+77470
+77471
+77472
+77473
+77474
+77475
+77476
+77477
+77478
+77479
+77480
+77481
+77482
+77483
+77484
+77485
+77486
+77487
+77488
+77489
+77490
+77491
+77492
+77493
+77494
+77495
+77496
+77497
+77498
+77499
+77500
+77501
+77502
+77503
+77504
+77505
+77506
+77507
+77508
+77509
+77510
+77511
+77512
+77513
+77514
+77515
+77516
+77517
+77518
+77519
+77520
+77521
+77522
+77523
+77524
+77525
+77526
+77527
+77528
+77529
+77530
+77531
+77532
+77533
+77534
+77535
+77536
+77537
+77538
+77539
+77540
+77541
+77542
+77543
+77544
+77545
+77546
+77547
+77548
+77549
+77550
+77551
+77552
+77553
+77554
+77555
+77556
+77557
+77558
+77559
+77560
+77561
+77562
+77563
+77564
+77565
+77566
+77567
+77568
+77569
+77570
+77571
+77572
+77573
+77574
+77575
+77576
+77577
+77578
+77579
+77580
+77581
+77582
+77583
+77584
+77585
+77586
+77587
+77588
+77589
+77590
+77591
+77592
+77593
+77594
+77595
+77596
+77597
+77598
+77599
+77600
+77601
+77602
+77603
+77604
+77605
+77606
+77607
+77608
+77609
+77610
+77611
+77612
+77613
+77614
+77615
+77616
+77617
+77618
+77619
+77620
+77621
+77622
+77623
+77624
+77625
+77626
+77627
+77628
+77629
+77630
+77631
+77632
+77633
+77634
+77635
+77636
+77637
+77638
+77639
+77640
+77641
+77642
+77643
+77644
+77645
+77646
+77647
+77648
+77649
+77650
+77651
+77652
+77653
+77654
+77655
+77656
+77657
+77658
+77659
+77660
+77661
+77662
+77663
+77664
+77665
+77666
+77667
+77668
+77669
+77670
+77671
+77672
+77673
+77674
+77675
+77676
+77677
+77678
+77679
+77680
+77681
+77682
+77683
+77684
+77685
+77686
+77687
+77688
+77689
+77690
+77691
+77692
+77693
+77694
+77695
+77696
+77697
+77698
+77699
+77700
+77701
+77702
+77703
+77704
+77705
+77706
+77707
+77708
+77709
+77710
+77711
+77712
+77713
+77714
+77715
+77716
+77717
+77718
+77719
+77720
+77721
+77722
+77723
+77724
+77725
+77726
+77727
+77728
+77729
+77730
+77731
+77732
+77733
+77734
+77735
+77736
+77737
+77738
+77739
+77740
+77741
+77742
+77743
+77744
+77745
+77746
+77747
+77748
+77749
+77750
+77751
+77752
+77753
+77754
+77755
+77756
+77757
+77758
+77759
+77760
+77761
+77762
+77763
+77764
+77765
+77766
+77767
+77768
+77769
+77770
+77771
+77772
+77773
+77774
+77775
+77776
+77777
+77778
+77779
+77780
+77781
+77782
+77783
+77784
+77785
+77786
+77787
+77788
+77789
+77790
+77791
+77792
+77793
+77794
+77795
+77796
+77797
+77798
+77799
+77800
+77801
+77802
+77803
+77804
+77805
+77806
+77807
+77808
+77809
+77810
+77811
+77812
+77813
+77814
+77815
+77816
+77817
+77818
+77819
+77820
+77821
+77822
+77823
+77824
+77825
+77826
+77827
+77828
+77829
+77830
+77831
+77832
+77833
+77834
+77835
+77836
+77837
+77838
+77839
+77840
+77841
+77842
+77843
+77844
+77845
+77846
+77847
+77848
+77849
+77850
+77851
+77852
+77853
+77854
+77855
+77856
+77857
+77858
+77859
+77860
+77861
+77862
+77863
+77864
+77865
+77866
+77867
+77868
+77869
+77870
+77871
+77872
+77873
+77874
+77875
+77876
+77877
+77878
+77879
+77880
+77881
+77882
+77883
+77884
+77885
+77886
+77887
+77888
+77889
+77890
+77891
+77892
+77893
+77894
+77895
+77896
+77897
+77898
+77899
+77900
+77901
+77902
+77903
+77904
+77905
+77906
+77907
+77908
+77909
+77910
+77911
+77912
+77913
+77914
+77915
+77916
+77917
+77918
+77919
+77920
+77921
+77922
+77923
+77924
+77925
+77926
+77927
+77928
+77929
+77930
+77931
+77932
+77933
+77934
+77935
+77936
+77937
+77938
+77939
+77940
+77941
+77942
+77943
+77944
+77945
+77946
+77947
+77948
+77949
+77950
+77951
+77952
+77953
+77954
+77955
+77956
+77957
+77958
+77959
+77960
+77961
+77962
+77963
+77964
+77965
+77966
+77967
+77968
+77969
+77970
+77971
+77972
+77973
+77974
+77975
+77976
+77977
+77978
+77979
+77980
+77981
+77982
+77983
+77984
+77985
+77986
+77987
+77988
+77989
+77990
+77991
+77992
+77993
+77994
+77995
+77996
+77997
+77998
+77999
+78000
+78001
+78002
+78003
+78004
+78005
+78006
+78007
+78008
+78009
+78010
+78011
+78012
+78013
+78014
+78015
+78016
+78017
+78018
+78019
+78020
+78021
+78022
+78023
+78024
+78025
+78026
+78027
+78028
+78029
+78030
+78031
+78032
+78033
+78034
+78035
+78036
+78037
+78038
+78039
+78040
+78041
+78042
+78043
+78044
+78045
+78046
+78047
+78048
+78049
+78050
+78051
+78052
+78053
+78054
+78055
+78056
+78057
+78058
+78059
+78060
+78061
+78062
+78063
+78064
+78065
+78066
+78067
+78068
+78069
+78070
+78071
+78072
+78073
+78074
+78075
+78076
+78077
+78078
+78079
+78080
+78081
+78082
+78083
+78084
+78085
+78086
+78087
+78088
+78089
+78090
+78091
+78092
+78093
+78094
+78095
+78096
+78097
+78098
+78099
+78100
+78101
+78102
+78103
+78104
+78105
+78106
+78107
+78108
+78109
+78110
+78111
+78112
+78113
+78114
+78115
+78116
+78117
+78118
+78119
+78120
+78121
+78122
+78123
+78124
+78125
+78126
+78127
+78128
+78129
+78130
+78131
+78132
+78133
+78134
+78135
+78136
+78137
+78138
+78139
+78140
+78141
+78142
+78143
+78144
+78145
+78146
+78147
+78148
+78149
+78150
+78151
+78152
+78153
+78154
+78155
+78156
+78157
+78158
+78159
+78160
+78161
+78162
+78163
+78164
+78165
+78166
+78167
+78168
+78169
+78170
+78171
+78172
+78173
+78174
+78175
+78176
+78177
+78178
+78179
+78180
+78181
+78182
+78183
+78184
+78185
+78186
+78187
+78188
+78189
+78190
+78191
+78192
+78193
+78194
+78195
+78196
+78197
+78198
+78199
+78200
+78201
+78202
+78203
+78204
+78205
+78206
+78207
+78208
+78209
+78210
+78211
+78212
+78213
+78214
+78215
+78216
+78217
+78218
+78219
+78220
+78221
+78222
+78223
+78224
+78225
+78226
+78227
+78228
+78229
+78230
+78231
+78232
+78233
+78234
+78235
+78236
+78237
+78238
+78239
+78240
+78241
+78242
+78243
+78244
+78245
+78246
+78247
+78248
+78249
+78250
+78251
+78252
+78253
+78254
+78255
+78256
+78257
+78258
+78259
+78260
+78261
+78262
+78263
+78264
+78265
+78266
+78267
+78268
+78269
+78270
+78271
+78272
+78273
+78274
+78275
+78276
+78277
+78278
+78279
+78280
+78281
+78282
+78283
+78284
+78285
+78286
+78287
+78288
+78289
+78290
+78291
+78292
+78293
+78294
+78295
+78296
+78297
+78298
+78299
+78300
+78301
+78302
+78303
+78304
+78305
+78306
+78307
+78308
+78309
+78310
+78311
+78312
+78313
+78314
+78315
+78316
+78317
+78318
+78319
+78320
+78321
+78322
+78323
+78324
+78325
+78326
+78327
+78328
+78329
+78330
+78331
+78332
+78333
+78334
+78335
+78336
+78337
+78338
+78339
+78340
+78341
+78342
+78343
+78344
+78345
+78346
+78347
+78348
+78349
+78350
+78351
+78352
+78353
+78354
+78355
+78356
+78357
+78358
+78359
+78360
+78361
+78362
+78363
+78364
+78365
+78366
+78367
+78368
+78369
+78370
+78371
+78372
+78373
+78374
+78375
+78376
+78377
+78378
+78379
+78380
+78381
+78382
+78383
+78384
+78385
+78386
+78387
+78388
+78389
+78390
+78391
+78392
+78393
+78394
+78395
+78396
+78397
+78398
+78399
+78400
+78401
+78402
+78403
+78404
+78405
+78406
+78407
+78408
+78409
+78410
+78411
+78412
+78413
+78414
+78415
+78416
+78417
+78418
+78419
+78420
+78421
+78422
+78423
+78424
+78425
+78426
+78427
+78428
+78429
+78430
+78431
+78432
+78433
+78434
+78435
+78436
+78437
+78438
+78439
+78440
+78441
+78442
+78443
+78444
+78445
+78446
+78447
+78448
+78449
+78450
+78451
+78452
+78453
+78454
+78455
+78456
+78457
+78458
+78459
+78460
+78461
+78462
+78463
+78464
+78465
+78466
+78467
+78468
+78469
+78470
+78471
+78472
+78473
+78474
+78475
+78476
+78477
+78478
+78479
+78480
+78481
+78482
+78483
+78484
+78485
+78486
+78487
+78488
+78489
+78490
+78491
+78492
+78493
+78494
+78495
+78496
+78497
+78498
+78499
+78500
+78501
+78502
+78503
+78504
+78505
+78506
+78507
+78508
+78509
+78510
+78511
+78512
+78513
+78514
+78515
+78516
+78517
+78518
+78519
+78520
+78521
+78522
+78523
+78524
+78525
+78526
+78527
+78528
+78529
+78530
+78531
+78532
+78533
+78534
+78535
+78536
+78537
+78538
+78539
+78540
+78541
+78542
+78543
+78544
+78545
+78546
+78547
+78548
+78549
+78550
+78551
+78552
+78553
+78554
+78555
+78556
+78557
+78558
+78559
+78560
+78561
+78562
+78563
+78564
+78565
+78566
+78567
+78568
+78569
+78570
+78571
+78572
+78573
+78574
+78575
+78576
+78577
+78578
+78579
+78580
+78581
+78582
+78583
+78584
+78585
+78586
+78587
+78588
+78589
+78590
+78591
+78592
+78593
+78594
+78595
+78596
+78597
+78598
+78599
+78600
+78601
+78602
+78603
+78604
+78605
+78606
+78607
+78608
+78609
+78610
+78611
+78612
+78613
+78614
+78615
+78616
+78617
+78618
+78619
+78620
+78621
+78622
+78623
+78624
+78625
+78626
+78627
+78628
+78629
+78630
+78631
+78632
+78633
+78634
+78635
+78636
+78637
+78638
+78639
+78640
+78641
+78642
+78643
+78644
+78645
+78646
+78647
+78648
+78649
+78650
+78651
+78652
+78653
+78654
+78655
+78656
+78657
+78658
+78659
+78660
+78661
+78662
+78663
+78664
+78665
+78666
+78667
+78668
+78669
+78670
+78671
+78672
+78673
+78674
+78675
+78676
+78677
+78678
+78679
+78680
+78681
+78682
+78683
+78684
+78685
+78686
+78687
+78688
+78689
+78690
+78691
+78692
+78693
+78694
+78695
+78696
+78697
+78698
+78699
+78700
+78701
+78702
+78703
+78704
+78705
+78706
+78707
+78708
+78709
+78710
+78711
+78712
+78713
+78714
+78715
+78716
+78717
+78718
+78719
+78720
+78721
+78722
+78723
+78724
+78725
+78726
+78727
+78728
+78729
+78730
+78731
+78732
+78733
+78734
+78735
+78736
+78737
+78738
+78739
+78740
+78741
+78742
+78743
+78744
+78745
+78746
+78747
+78748
+78749
+78750
+78751
+78752
+78753
+78754
+78755
+78756
+78757
+78758
+78759
+78760
+78761
+78762
+78763
+78764
+78765
+78766
+78767
+78768
+78769
+78770
+78771
+78772
+78773
+78774
+78775
+78776
+78777
+78778
+78779
+78780
+78781
+78782
+78783
+78784
+78785
+78786
+78787
+78788
+78789
+78790
+78791
+78792
+78793
+78794
+78795
+78796
+78797
+78798
+78799
+78800
+78801
+78802
+78803
+78804
+78805
+78806
+78807
+78808
+78809
+78810
+78811
+78812
+78813
+78814
+78815
+78816
+78817
+78818
+78819
+78820
+78821
+78822
+78823
+78824
+78825
+78826
+78827
+78828
+78829
+78830
+78831
+78832
+78833
+78834
+78835
+78836
+78837
+78838
+78839
+78840
+78841
+78842
+78843
+78844
+78845
+78846
+78847
+78848
+78849
+78850
+78851
+78852
+78853
+78854
+78855
+78856
+78857
+78858
+78859
+78860
+78861
+78862
+78863
+78864
+78865
+78866
+78867
+78868
+78869
+78870
+78871
+78872
+78873
+78874
+78875
+78876
+78877
+78878
+78879
+78880
+78881
+78882
+78883
+78884
+78885
+78886
+78887
+78888
+78889
+78890
+78891
+78892
+78893
+78894
+78895
+78896
+78897
+78898
+78899
+78900
+78901
+78902
+78903
+78904
+78905
+78906
+78907
+78908
+78909
+78910
+78911
+78912
+78913
+78914
+78915
+78916
+78917
+78918
+78919
+78920
+78921
+78922
+78923
+78924
+78925
+78926
+78927
+78928
+78929
+78930
+78931
+78932
+78933
+78934
+78935
+78936
+78937
+78938
+78939
+78940
+78941
+78942
+78943
+78944
+78945
+78946
+78947
+78948
+78949
+78950
+78951
+78952
+78953
+78954
+78955
+78956
+78957
+78958
+78959
+78960
+78961
+78962
+78963
+78964
+78965
+78966
+78967
+78968
+78969
+78970
+78971
+78972
+78973
+78974
+78975
+78976
+78977
+78978
+78979
+78980
+78981
+78982
+78983
+78984
+78985
+78986
+78987
+78988
+78989
+78990
+78991
+78992
+78993
+78994
+78995
+78996
+78997
+78998
+78999
+79000
+79001
+79002
+79003
+79004
+79005
+79006
+79007
+79008
+79009
+79010
+79011
+79012
+79013
+79014
+79015
+79016
+79017
+79018
+79019
+79020
+79021
+79022
+79023
+79024
+79025
+79026
+79027
+79028
+79029
+79030
+79031
+79032
+79033
+79034
+79035
+79036
+79037
+79038
+79039
+79040
+79041
+79042
+79043
+79044
+79045
+79046
+79047
+79048
+79049
+79050
+79051
+79052
+79053
+79054
+79055
+79056
+79057
+79058
+79059
+79060
+79061
+79062
+79063
+79064
+79065
+79066
+79067
+79068
+79069
+79070
+79071
+79072
+79073
+79074
+79075
+79076
+79077
+79078
+79079
+79080
+79081
+79082
+79083
+79084
+79085
+79086
+79087
+79088
+79089
+79090
+79091
+79092
+79093
+79094
+79095
+79096
+79097
+79098
+79099
+79100
+79101
+79102
+79103
+79104
+79105
+79106
+79107
+79108
+79109
+79110
+79111
+79112
+79113
+79114
+79115
+79116
+79117
+79118
+79119
+79120
+79121
+79122
+79123
+79124
+79125
+79126
+79127
+79128
+79129
+79130
+79131
+79132
+79133
+79134
+79135
+79136
+79137
+79138
+79139
+79140
+79141
+79142
+79143
+79144
+79145
+79146
+79147
+79148
+79149
+79150
+79151
+79152
+79153
+79154
+79155
+79156
+79157
+79158
+79159
+79160
+79161
+79162
+79163
+79164
+79165
+79166
+79167
+79168
+79169
+79170
+79171
+79172
+79173
+79174
+79175
+79176
+79177
+79178
+79179
+79180
+79181
+79182
+79183
+79184
+79185
+79186
+79187
+79188
+79189
+79190
+79191
+79192
+79193
+79194
+79195
+79196
+79197
+79198
+79199
+79200
+79201
+79202
+79203
+79204
+79205
+79206
+79207
+79208
+79209
+79210
+79211
+79212
+79213
+79214
+79215
+79216
+79217
+79218
+79219
+79220
+79221
+79222
+79223
+79224
+79225
+79226
+79227
+79228
+79229
+79230
+79231
+79232
+79233
+79234
+79235
+79236
+79237
+79238
+79239
+79240
+79241
+79242
+79243
+79244
+79245
+79246
+79247
+79248
+79249
+79250
+79251
+79252
+79253
+79254
+79255
+79256
+79257
+79258
+79259
+79260
+79261
+79262
+79263
+79264
+79265
+79266
+79267
+79268
+79269
+79270
+79271
+79272
+79273
+79274
+79275
+79276
+79277
+79278
+79279
+79280
+79281
+79282
+79283
+79284
+79285
+79286
+79287
+79288
+79289
+79290
+79291
+79292
+79293
+79294
+79295
+79296
+79297
+79298
+79299
+79300
+79301
+79302
+79303
+79304
+79305
+79306
+79307
+79308
+79309
+79310
+79311
+79312
+79313
+79314
+79315
+79316
+79317
+79318
+79319
+79320
+79321
+79322
+79323
+79324
+79325
+79326
+79327
+79328
+79329
+79330
+79331
+79332
+79333
+79334
+79335
+79336
+79337
+79338
+79339
+79340
+79341
+79342
+79343
+79344
+79345
+79346
+79347
+79348
+79349
+79350
+79351
+79352
+79353
+79354
+79355
+79356
+79357
+79358
+79359
+79360
+79361
+79362
+79363
+79364
+79365
+79366
+79367
+79368
+79369
+79370
+79371
+79372
+79373
+79374
+79375
+79376
+79377
+79378
+79379
+79380
+79381
+79382
+79383
+79384
+79385
+79386
+79387
+79388
+79389
+79390
+79391
+79392
+79393
+79394
+79395
+79396
+79397
+79398
+79399
+79400
+79401
+79402
+79403
+79404
+79405
+79406
+79407
+79408
+79409
+79410
+79411
+79412
+79413
+79414
+79415
+79416
+79417
+79418
+79419
+79420
+79421
+79422
+79423
+79424
+79425
+79426
+79427
+79428
+79429
+79430
+79431
+79432
+79433
+79434
+79435
+79436
+79437
+79438
+79439
+79440
+79441
+79442
+79443
+79444
+79445
+79446
+79447
+79448
+79449
+79450
+79451
+79452
+79453
+79454
+79455
+79456
+79457
+79458
+79459
+79460
+79461
+79462
+79463
+79464
+79465
+79466
+79467
+79468
+79469
+79470
+79471
+79472
+79473
+79474
+79475
+79476
+79477
+79478
+79479
+79480
+79481
+79482
+79483
+79484
+79485
+79486
+79487
+79488
+79489
+79490
+79491
+79492
+79493
+79494
+79495
+79496
+79497
+79498
+79499
+79500
+79501
+79502
+79503
+79504
+79505
+79506
+79507
+79508
+79509
+79510
+79511
+79512
+79513
+79514
+79515
+79516
+79517
+79518
+79519
+79520
+79521
+79522
+79523
+79524
+79525
+79526
+79527
+79528
+79529
+79530
+79531
+79532
+79533
+79534
+79535
+79536
+79537
+79538
+79539
+79540
+79541
+79542
+79543
+79544
+79545
+79546
+79547
+79548
+79549
+79550
+79551
+79552
+79553
+79554
+79555
+79556
+79557
+79558
+79559
+79560
+79561
+79562
+79563
+79564
+79565
+79566
+79567
+79568
+79569
+79570
+79571
+79572
+79573
+79574
+79575
+79576
+79577
+79578
+79579
+79580
+79581
+79582
+79583
+79584
+79585
+79586
+79587
+79588
+79589
+79590
+79591
+79592
+79593
+79594
+79595
+79596
+79597
+79598
+79599
+79600
+79601
+79602
+79603
+79604
+79605
+79606
+79607
+79608
+79609
+79610
+79611
+79612
+79613
+79614
+79615
+79616
+79617
+79618
+79619
+79620
+79621
+79622
+79623
+79624
+79625
+79626
+79627
+79628
+79629
+79630
+79631
+79632
+79633
+79634
+79635
+79636
+79637
+79638
+79639
+79640
+79641
+79642
+79643
+79644
+79645
+79646
+79647
+79648
+79649
+79650
+79651
+79652
+79653
+79654
+79655
+79656
+79657
+79658
+79659
+79660
+79661
+79662
+79663
+79664
+79665
+79666
+79667
+79668
+79669
+79670
+79671
+79672
+79673
+79674
+79675
+79676
+79677
+79678
+79679
+79680
+79681
+79682
+79683
+79684
+79685
+79686
+79687
+79688
+79689
+79690
+79691
+79692
+79693
+79694
+79695
+79696
+79697
+79698
+79699
+79700
+79701
+79702
+79703
+79704
+79705
+79706
+79707
+79708
+79709
+79710
+79711
+79712
+79713
+79714
+79715
+79716
+79717
+79718
+79719
+79720
+79721
+79722
+79723
+79724
+79725
+79726
+79727
+79728
+79729
+79730
+79731
+79732
+79733
+79734
+79735
+79736
+79737
+79738
+79739
+79740
+79741
+79742
+79743
+79744
+79745
+79746
+79747
+79748
+79749
+79750
+79751
+79752
+79753
+79754
+79755
+79756
+79757
+79758
+79759
+79760
+79761
+79762
+79763
+79764
+79765
+79766
+79767
+79768
+79769
+79770
+79771
+79772
+79773
+79774
+79775
+79776
+79777
+79778
+79779
+79780
+79781
+79782
+79783
+79784
+79785
+79786
+79787
+79788
+79789
+79790
+79791
+79792
+79793
+79794
+79795
+79796
+79797
+79798
+79799
+79800
+79801
+79802
+79803
+79804
+79805
+79806
+79807
+79808
+79809
+79810
+79811
+79812
+79813
+79814
+79815
+79816
+79817
+79818
+79819
+79820
+79821
+79822
+79823
+79824
+79825
+79826
+79827
+79828
+79829
+79830
+79831
+79832
+79833
+79834
+79835
+79836
+79837
+79838
+79839
+79840
+79841
+79842
+79843
+79844
+79845
+79846
+79847
+79848
+79849
+79850
+79851
+79852
+79853
+79854
+79855
+79856
+79857
+79858
+79859
+79860
+79861
+79862
+79863
+79864
+79865
+79866
+79867
+79868
+79869
+79870
+79871
+79872
+79873
+79874
+79875
+79876
+79877
+79878
+79879
+79880
+79881
+79882
+79883
+79884
+79885
+79886
+79887
+79888
+79889
+79890
+79891
+79892
+79893
+79894
+79895
+79896
+79897
+79898
+79899
+79900
+79901
+79902
+79903
+79904
+79905
+79906
+79907
+79908
+79909
+79910
+79911
+79912
+79913
+79914
+79915
+79916
+79917
+79918
+79919
+79920
+79921
+79922
+79923
+79924
+79925
+79926
+79927
+79928
+79929
+79930
+79931
+79932
+79933
+79934
+79935
+79936
+79937
+79938
+79939
+79940
+79941
+79942
+79943
+79944
+79945
+79946
+79947
+79948
+79949
+79950
+79951
+79952
+79953
+79954
+79955
+79956
+79957
+79958
+79959
+79960
+79961
+79962
+79963
+79964
+79965
+79966
+79967
+79968
+79969
+79970
+79971
+79972
+79973
+79974
+79975
+79976
+79977
+79978
+79979
+79980
+79981
+79982
+79983
+79984
+79985
+79986
+79987
+79988
+79989
+79990
+79991
+79992
+79993
+79994
+79995
+79996
+79997
+79998
+79999
+80000
+80001
+80002
+80003
+80004
+80005
+80006
+80007
+80008
+80009
+80010
+80011
+80012
+80013
+80014
+80015
+80016
+80017
+80018
+80019
+80020
+80021
+80022
+80023
+80024
+80025
+80026
+80027
+80028
+80029
+80030
+80031
+80032
+80033
+80034
+80035
+80036
+80037
+80038
+80039
+80040
+80041
+80042
+80043
+80044
+80045
+80046
+80047
+80048
+80049
+80050
+80051
+80052
+80053
+80054
+80055
+80056
+80057
+80058
+80059
+80060
+80061
+80062
+80063
+80064
+80065
+80066
+80067
+80068
+80069
+80070
+80071
+80072
+80073
+80074
+80075
+80076
+80077
+80078
+80079
+80080
+80081
+80082
+80083
+80084
+80085
+80086
+80087
+80088
+80089
+80090
+80091
+80092
+80093
+80094
+80095
+80096
+80097
+80098
+80099
+80100
+80101
+80102
+80103
+80104
+80105
+80106
+80107
+80108
+80109
+80110
+80111
+80112
+80113
+80114
+80115
+80116
+80117
+80118
+80119
+80120
+80121
+80122
+80123
+80124
+80125
+80126
+80127
+80128
+80129
+80130
+80131
+80132
+80133
+80134
+80135
+80136
+80137
+80138
+80139
+80140
+80141
+80142
+80143
+80144
+80145
+80146
+80147
+80148
+80149
+80150
+80151
+80152
+80153
+80154
+80155
+80156
+80157
+80158
+80159
+80160
+80161
+80162
+80163
+80164
+80165
+80166
+80167
+80168
+80169
+80170
+80171
+80172
+80173
+80174
+80175
+80176
+80177
+80178
+80179
+80180
+80181
+80182
+80183
+80184
+80185
+80186
+80187
+80188
+80189
+80190
+80191
+80192
+80193
+80194
+80195
+80196
+80197
+80198
+80199
+80200
+80201
+80202
+80203
+80204
+80205
+80206
+80207
+80208
+80209
+80210
+80211
+80212
+80213
+80214
+80215
+80216
+80217
+80218
+80219
+80220
+80221
+80222
+80223
+80224
+80225
+80226
+80227
+80228
+80229
+80230
+80231
+80232
+80233
+80234
+80235
+80236
+80237
+80238
+80239
+80240
+80241
+80242
+80243
+80244
+80245
+80246
+80247
+80248
+80249
+80250
+80251
+80252
+80253
+80254
+80255
+80256
+80257
+80258
+80259
+80260
+80261
+80262
+80263
+80264
+80265
+80266
+80267
+80268
+80269
+80270
+80271
+80272
+80273
+80274
+80275
+80276
+80277
+80278
+80279
+80280
+80281
+80282
+80283
+80284
+80285
+80286
+80287
+80288
+80289
+80290
+80291
+80292
+80293
+80294
+80295
+80296
+80297
+80298
+80299
+80300
+80301
+80302
+80303
+80304
+80305
+80306
+80307
+80308
+80309
+80310
+80311
+80312
+80313
+80314
+80315
+80316
+80317
+80318
+80319
+80320
+80321
+80322
+80323
+80324
+80325
+80326
+80327
+80328
+80329
+80330
+80331
+80332
+80333
+80334
+80335
+80336
+80337
+80338
+80339
+80340
+80341
+80342
+80343
+80344
+80345
+80346
+80347
+80348
+80349
+80350
+80351
+80352
+80353
+80354
+80355
+80356
+80357
+80358
+80359
+80360
+80361
+80362
+80363
+80364
+80365
+80366
+80367
+80368
+80369
+80370
+80371
+80372
+80373
+80374
+80375
+80376
+80377
+80378
+80379
+80380
+80381
+80382
+80383
+80384
+80385
+80386
+80387
+80388
+80389
+80390
+80391
+80392
+80393
+80394
+80395
+80396
+80397
+80398
+80399
+80400
+80401
+80402
+80403
+80404
+80405
+80406
+80407
+80408
+80409
+80410
+80411
+80412
+80413
+80414
+80415
+80416
+80417
+80418
+80419
+80420
+80421
+80422
+80423
+80424
+80425
+80426
+80427
+80428
+80429
+80430
+80431
+80432
+80433
+80434
+80435
+80436
+80437
+80438
+80439
+80440
+80441
+80442
+80443
+80444
+80445
+80446
+80447
+80448
+80449
+80450
+80451
+80452
+80453
+80454
+80455
+80456
+80457
+80458
+80459
+80460
+80461
+80462
+80463
+80464
+80465
+80466
+80467
+80468
+80469
+80470
+80471
+80472
+80473
+80474
+80475
+80476
+80477
+80478
+80479
+80480
+80481
+80482
+80483
+80484
+80485
+80486
+80487
+80488
+80489
+80490
+80491
+80492
+80493
+80494
+80495
+80496
+80497
+80498
+80499
+80500
+80501
+80502
+80503
+80504
+80505
+80506
+80507
+80508
+80509
+80510
+80511
+80512
+80513
+80514
+80515
+80516
+80517
+80518
+80519
+80520
+80521
+80522
+80523
+80524
+80525
+80526
+80527
+80528
+80529
+80530
+80531
+80532
+80533
+80534
+80535
+80536
+80537
+80538
+80539
+80540
+80541
+80542
+80543
+80544
+80545
+80546
+80547
+80548
+80549
+80550
+80551
+80552
+80553
+80554
+80555
+80556
+80557
+80558
+80559
+80560
+80561
+80562
+80563
+80564
+80565
+80566
+80567
+80568
+80569
+80570
+80571
+80572
+80573
+80574
+80575
+80576
+80577
+80578
+80579
+80580
+80581
+80582
+80583
+80584
+80585
+80586
+80587
+80588
+80589
+80590
+80591
+80592
+80593
+80594
+80595
+80596
+80597
+80598
+80599
+80600
+80601
+80602
+80603
+80604
+80605
+80606
+80607
+80608
+80609
+80610
+80611
+80612
+80613
+80614
+80615
+80616
+80617
+80618
+80619
+80620
+80621
+80622
+80623
+80624
+80625
+80626
+80627
+80628
+80629
+80630
+80631
+80632
+80633
+80634
+80635
+80636
+80637
+80638
+80639
+80640
+80641
+80642
+80643
+80644
+80645
+80646
+80647
+80648
+80649
+80650
+80651
+80652
+80653
+80654
+80655
+80656
+80657
+80658
+80659
+80660
+80661
+80662
+80663
+80664
+80665
+80666
+80667
+80668
+80669
+80670
+80671
+80672
+80673
+80674
+80675
+80676
+80677
+80678
+80679
+80680
+80681
+80682
+80683
+80684
+80685
+80686
+80687
+80688
+80689
+80690
+80691
+80692
+80693
+80694
+80695
+80696
+80697
+80698
+80699
+80700
+80701
+80702
+80703
+80704
+80705
+80706
+80707
+80708
+80709
+80710
+80711
+80712
+80713
+80714
+80715
+80716
+80717
+80718
+80719
+80720
+80721
+80722
+80723
+80724
+80725
+80726
+80727
+80728
+80729
+80730
+80731
+80732
+80733
+80734
+80735
+80736
+80737
+80738
+80739
+80740
+80741
+80742
+80743
+80744
+80745
+80746
+80747
+80748
+80749
+80750
+80751
+80752
+80753
+80754
+80755
+80756
+80757
+80758
+80759
+80760
+80761
+80762
+80763
+80764
+80765
+80766
+80767
+80768
+80769
+80770
+80771
+80772
+80773
+80774
+80775
+80776
+80777
+80778
+80779
+80780
+80781
+80782
+80783
+80784
+80785
+80786
+80787
+80788
+80789
+80790
+80791
+80792
+80793
+80794
+80795
+80796
+80797
+80798
+80799
+80800
+80801
+80802
+80803
+80804
+80805
+80806
+80807
+80808
+80809
+80810
+80811
+80812
+80813
+80814
+80815
+80816
+80817
+80818
+80819
+80820
+80821
+80822
+80823
+80824
+80825
+80826
+80827
+80828
+80829
+80830
+80831
+80832
+80833
+80834
+80835
+80836
+80837
+80838
+80839
+80840
+80841
+80842
+80843
+80844
+80845
+80846
+80847
+80848
+80849
+80850
+80851
+80852
+80853
+80854
+80855
+80856
+80857
+80858
+80859
+80860
+80861
+80862
+80863
+80864
+80865
+80866
+80867
+80868
+80869
+80870
+80871
+80872
+80873
+80874
+80875
+80876
+80877
+80878
+80879
+80880
+80881
+80882
+80883
+80884
+80885
+80886
+80887
+80888
+80889
+80890
+80891
+80892
+80893
+80894
+80895
+80896
+80897
+80898
+80899
+80900
+80901
+80902
+80903
+80904
+80905
+80906
+80907
+80908
+80909
+80910
+80911
+80912
+80913
+80914
+80915
+80916
+80917
+80918
+80919
+80920
+80921
+80922
+80923
+80924
+80925
+80926
+80927
+80928
+80929
+80930
+80931
+80932
+80933
+80934
+80935
+80936
+80937
+80938
+80939
+80940
+80941
+80942
+80943
+80944
+80945
+80946
+80947
+80948
+80949
+80950
+80951
+80952
+80953
+80954
+80955
+80956
+80957
+80958
+80959
+80960
+80961
+80962
+80963
+80964
+80965
+80966
+80967
+80968
+80969
+80970
+80971
+80972
+80973
+80974
+80975
+80976
+80977
+80978
+80979
+80980
+80981
+80982
+80983
+80984
+80985
+80986
+80987
+80988
+80989
+80990
+80991
+80992
+80993
+80994
+80995
+80996
+80997
+80998
+80999
+81000
+81001
+81002
+81003
+81004
+81005
+81006
+81007
+81008
+81009
+81010
+81011
+81012
+81013
+81014
+81015
+81016
+81017
+81018
+81019
+81020
+81021
+81022
+81023
+81024
+81025
+81026
+81027
+81028
+81029
+81030
+81031
+81032
+81033
+81034
+81035
+81036
+81037
+81038
+81039
+81040
+81041
+81042
+81043
+81044
+81045
+81046
+81047
+81048
+81049
+81050
+81051
+81052
+81053
+81054
+81055
+81056
+81057
+81058
+81059
+81060
+81061
+81062
+81063
+81064
+81065
+81066
+81067
+81068
+81069
+81070
+81071
+81072
+81073
+81074
+81075
+81076
+81077
+81078
+81079
+81080
+81081
+81082
+81083
+81084
+81085
+81086
+81087
+81088
+81089
+81090
+81091
+81092
+81093
+81094
+81095
+81096
+81097
+81098
+81099
+81100
+81101
+81102
+81103
+81104
+81105
+81106
+81107
+81108
+81109
+81110
+81111
+81112
+81113
+81114
+81115
+81116
+81117
+81118
+81119
+81120
+81121
+81122
+81123
+81124
+81125
+81126
+81127
+81128
+81129
+81130
+81131
+81132
+81133
+81134
+81135
+81136
+81137
+81138
+81139
+81140
+81141
+81142
+81143
+81144
+81145
+81146
+81147
+81148
+81149
+81150
+81151
+81152
+81153
+81154
+81155
+81156
+81157
+81158
+81159
+81160
+81161
+81162
+81163
+81164
+81165
+81166
+81167
+81168
+81169
+81170
+81171
+81172
+81173
+81174
+81175
+81176
+81177
+81178
+81179
+81180
+81181
+81182
+81183
+81184
+81185
+81186
+81187
+81188
+81189
+81190
+81191
+81192
+81193
+81194
+81195
+81196
+81197
+81198
+81199
+81200
+81201
+81202
+81203
+81204
+81205
+81206
+81207
+81208
+81209
+81210
+81211
+81212
+81213
+81214
+81215
+81216
+81217
+81218
+81219
+81220
+81221
+81222
+81223
+81224
+81225
+81226
+81227
+81228
+81229
+81230
+81231
+81232
+81233
+81234
+81235
+81236
+81237
+81238
+81239
+81240
+81241
+81242
+81243
+81244
+81245
+81246
+81247
+81248
+81249
+81250
+81251
+81252
+81253
+81254
+81255
+81256
+81257
+81258
+81259
+81260
+81261
+81262
+81263
+81264
+81265
+81266
+81267
+81268
+81269
+81270
+81271
+81272
+81273
+81274
+81275
+81276
+81277
+81278
+81279
+81280
+81281
+81282
+81283
+81284
+81285
+81286
+81287
+81288
+81289
+81290
+81291
+81292
+81293
+81294
+81295
+81296
+81297
+81298
+81299
+81300
+81301
+81302
+81303
+81304
+81305
+81306
+81307
+81308
+81309
+81310
+81311
+81312
+81313
+81314
+81315
+81316
+81317
+81318
+81319
+81320
+81321
+81322
+81323
+81324
+81325
+81326
+81327
+81328
+81329
+81330
+81331
+81332
+81333
+81334
+81335
+81336
+81337
+81338
+81339
+81340
+81341
+81342
+81343
+81344
+81345
+81346
+81347
+81348
+81349
+81350
+81351
+81352
+81353
+81354
+81355
+81356
+81357
+81358
+81359
+81360
+81361
+81362
+81363
+81364
+81365
+81366
+81367
+81368
+81369
+81370
+81371
+81372
+81373
+81374
+81375
+81376
+81377
+81378
+81379
+81380
+81381
+81382
+81383
+81384
+81385
+81386
+81387
+81388
+81389
+81390
+81391
+81392
+81393
+81394
+81395
+81396
+81397
+81398
+81399
+81400
+81401
+81402
+81403
+81404
+81405
+81406
+81407
+81408
+81409
+81410
+81411
+81412
+81413
+81414
+81415
+81416
+81417
+81418
+81419
+81420
+81421
+81422
+81423
+81424
+81425
+81426
+81427
+81428
+81429
+81430
+81431
+81432
+81433
+81434
+81435
+81436
+81437
+81438
+81439
+81440
+81441
+81442
+81443
+81444
+81445
+81446
+81447
+81448
+81449
+81450
+81451
+81452
+81453
+81454
+81455
+81456
+81457
+81458
+81459
+81460
+81461
+81462
+81463
+81464
+81465
+81466
+81467
+81468
+81469
+81470
+81471
+81472
+81473
+81474
+81475
+81476
+81477
+81478
+81479
+81480
+81481
+81482
+81483
+81484
+81485
+81486
+81487
+81488
+81489
+81490
+81491
+81492
+81493
+81494
+81495
+81496
+81497
+81498
+81499
+81500
+81501
+81502
+81503
+81504
+81505
+81506
+81507
+81508
+81509
+81510
+81511
+81512
+81513
+81514
+81515
+81516
+81517
+81518
+81519
+81520
+81521
+81522
+81523
+81524
+81525
+81526
+81527
+81528
+81529
+81530
+81531
+81532
+81533
+81534
+81535
+81536
+81537
+81538
+81539
+81540
+81541
+81542
+81543
+81544
+81545
+81546
+81547
+81548
+81549
+81550
+81551
+81552
+81553
+81554
+81555
+81556
+81557
+81558
+81559
+81560
+81561
+81562
+81563
+81564
+81565
+81566
+81567
+81568
+81569
+81570
+81571
+81572
+81573
+81574
+81575
+81576
+81577
+81578
+81579
+81580
+81581
+81582
+81583
+81584
+81585
+81586
+81587
+81588
+81589
+81590
+81591
+81592
+81593
+81594
+81595
+81596
+81597
+81598
+81599
+81600
+81601
+81602
+81603
+81604
+81605
+81606
+81607
+81608
+81609
+81610
+81611
+81612
+81613
+81614
+81615
+81616
+81617
+81618
+81619
+81620
+81621
+81622
+81623
+81624
+81625
+81626
+81627
+81628
+81629
+81630
+81631
+81632
+81633
+81634
+81635
+81636
+81637
+81638
+81639
+81640
+81641
+81642
+81643
+81644
+81645
+81646
+81647
+81648
+81649
+81650
+81651
+81652
+81653
+81654
+81655
+81656
+81657
+81658
+81659
+81660
+81661
+81662
+81663
+81664
+81665
+81666
+81667
+81668
+81669
+81670
+81671
+81672
+81673
+81674
+81675
+81676
+81677
+81678
+81679
+81680
+81681
+81682
+81683
+81684
+81685
+81686
+81687
+81688
+81689
+81690
+81691
+81692
+81693
+81694
+81695
+81696
+81697
+81698
+81699
+81700
+81701
+81702
+81703
+81704
+81705
+81706
+81707
+81708
+81709
+81710
+81711
+81712
+81713
+81714
+81715
+81716
+81717
+81718
+81719
+81720
+81721
+81722
+81723
+81724
+81725
+81726
+81727
+81728
+81729
+81730
+81731
+81732
+81733
+81734
+81735
+81736
+81737
+81738
+81739
+81740
+81741
+81742
+81743
+81744
+81745
+81746
+81747
+81748
+81749
+81750
+81751
+81752
+81753
+81754
+81755
+81756
+81757
+81758
+81759
+81760
+81761
+81762
+81763
+81764
+81765
+81766
+81767
+81768
+81769
+81770
+81771
+81772
+81773
+81774
+81775
+81776
+81777
+81778
+81779
+81780
+81781
+81782
+81783
+81784
+81785
+81786
+81787
+81788
+81789
+81790
+81791
+81792
+81793
+81794
+81795
+81796
+81797
+81798
+81799
+81800
+81801
+81802
+81803
+81804
+81805
+81806
+81807
+81808
+81809
+81810
+81811
+81812
+81813
+81814
+81815
+81816
+81817
+81818
+81819
+81820
+81821
+81822
+81823
+81824
+81825
+81826
+81827
+81828
+81829
+81830
+81831
+81832
+81833
+81834
+81835
+81836
+81837
+81838
+81839
+81840
+81841
+81842
+81843
+81844
+81845
+81846
+81847
+81848
+81849
+81850
+81851
+81852
+81853
+81854
+81855
+81856
+81857
+81858
+81859
+81860
+81861
+81862
+81863
+81864
+81865
+81866
+81867
+81868
+81869
+81870
+81871
+81872
+81873
+81874
+81875
+81876
+81877
+81878
+81879
+81880
+81881
+81882
+81883
+81884
+81885
+81886
+81887
+81888
+81889
+81890
+81891
+81892
+81893
+81894
+81895
+81896
+81897
+81898
+81899
+81900
+81901
+81902
+81903
+81904
+81905
+81906
+81907
+81908
+81909
+81910
+81911
+81912
+81913
+81914
+81915
+81916
+81917
+81918
+81919
+81920
+81921
+81922
+81923
+81924
+81925
+81926
+81927
+81928
+81929
+81930
+81931
+81932
+81933
+81934
+81935
+81936
+81937
+81938
+81939
+81940
+81941
+81942
+81943
+81944
+81945
+81946
+81947
+81948
+81949
+81950
+81951
+81952
+81953
+81954
+81955
+81956
+81957
+81958
+81959
+81960
+81961
+81962
+81963
+81964
+81965
+81966
+81967
+81968
+81969
+81970
+81971
+81972
+81973
+81974
+81975
+81976
+81977
+81978
+81979
+81980
+81981
+81982
+81983
+81984
+81985
+81986
+81987
+81988
+81989
+81990
+81991
+81992
+81993
+81994
+81995
+81996
+81997
+81998
+81999
+82000
+82001
+82002
+82003
+82004
+82005
+82006
+82007
+82008
+82009
+82010
+82011
+82012
+82013
+82014
+82015
+82016
+82017
+82018
+82019
+82020
+82021
+82022
+82023
+82024
+82025
+82026
+82027
+82028
+82029
+82030
+82031
+82032
+82033
+82034
+82035
+82036
+82037
+82038
+82039
+82040
+82041
+82042
+82043
+82044
+82045
+82046
+82047
+82048
+82049
+82050
+82051
+82052
+82053
+82054
+82055
+82056
+82057
+82058
+82059
+82060
+82061
+82062
+82063
+82064
+82065
+82066
+82067
+82068
+82069
+82070
+82071
+82072
+82073
+82074
+82075
+82076
+82077
+82078
+82079
+82080
+82081
+82082
+82083
+82084
+82085
+82086
+82087
+82088
+82089
+82090
+82091
+82092
+82093
+82094
+82095
+82096
+82097
+82098
+82099
+82100
+82101
+82102
+82103
+82104
+82105
+82106
+82107
+82108
+82109
+82110
+82111
+82112
+82113
+82114
+82115
+82116
+82117
+82118
+82119
+82120
+82121
+82122
+82123
+82124
+82125
+82126
+82127
+82128
+82129
+82130
+82131
+82132
+82133
+82134
+82135
+82136
+82137
+82138
+82139
+82140
+82141
+82142
+82143
+82144
+82145
+82146
+82147
+82148
+82149
+82150
+82151
+82152
+82153
+82154
+82155
+82156
+82157
+82158
+82159
+82160
+82161
+82162
+82163
+82164
+82165
+82166
+82167
+82168
+82169
+82170
+82171
+82172
+82173
+82174
+82175
+82176
+82177
+82178
+82179
+82180
+82181
+82182
+82183
+82184
+82185
+82186
+82187
+82188
+82189
+82190
+82191
+82192
+82193
+82194
+82195
+82196
+82197
+82198
+82199
+82200
+82201
+82202
+82203
+82204
+82205
+82206
+82207
+82208
+82209
+82210
+82211
+82212
+82213
+82214
+82215
+82216
+82217
+82218
+82219
+82220
+82221
+82222
+82223
+82224
+82225
+82226
+82227
+82228
+82229
+82230
+82231
+82232
+82233
+82234
+82235
+82236
+82237
+82238
+82239
+82240
+82241
+82242
+82243
+82244
+82245
+82246
+82247
+82248
+82249
+82250
+82251
+82252
+82253
+82254
+82255
+82256
+82257
+82258
+82259
+82260
+82261
+82262
+82263
+82264
+82265
+82266
+82267
+82268
+82269
+82270
+82271
+82272
+82273
+82274
+82275
+82276
+82277
+82278
+82279
+82280
+82281
+82282
+82283
+82284
+82285
+82286
+82287
+82288
+82289
+82290
+82291
+82292
+82293
+82294
+82295
+82296
+82297
+82298
+82299
+82300
+82301
+82302
+82303
+82304
+82305
+82306
+82307
+82308
+82309
+82310
+82311
+82312
+82313
+82314
+82315
+82316
+82317
+82318
+82319
+82320
+82321
+82322
+82323
+82324
+82325
+82326
+82327
+82328
+82329
+82330
+82331
+82332
+82333
+82334
+82335
+82336
+82337
+82338
+82339
+82340
+82341
+82342
+82343
+82344
+82345
+82346
+82347
+82348
+82349
+82350
+82351
+82352
+82353
+82354
+82355
+82356
+82357
+82358
+82359
+82360
+82361
+82362
+82363
+82364
+82365
+82366
+82367
+82368
+82369
+82370
+82371
+82372
+82373
+82374
+82375
+82376
+82377
+82378
+82379
+82380
+82381
+82382
+82383
+82384
+82385
+82386
+82387
+82388
+82389
+82390
+82391
+82392
+82393
+82394
+82395
+82396
+82397
+82398
+82399
+82400
+82401
+82402
+82403
+82404
+82405
+82406
+82407
+82408
+82409
+82410
+82411
+82412
+82413
+82414
+82415
+82416
+82417
+82418
+82419
+82420
+82421
+82422
+82423
+82424
+82425
+82426
+82427
+82428
+82429
+82430
+82431
+82432
+82433
+82434
+82435
+82436
+82437
+82438
+82439
+82440
+82441
+82442
+82443
+82444
+82445
+82446
+82447
+82448
+82449
+82450
+82451
+82452
+82453
+82454
+82455
+82456
+82457
+82458
+82459
+82460
+82461
+82462
+82463
+82464
+82465
+82466
+82467
+82468
+82469
+82470
+82471
+82472
+82473
+82474
+82475
+82476
+82477
+82478
+82479
+82480
+82481
+82482
+82483
+82484
+82485
+82486
+82487
+82488
+82489
+82490
+82491
+82492
+82493
+82494
+82495
+82496
+82497
+82498
+82499
+82500
+82501
+82502
+82503
+82504
+82505
+82506
+82507
+82508
+82509
+82510
+82511
+82512
+82513
+82514
+82515
+82516
+82517
+82518
+82519
+82520
+82521
+82522
+82523
+82524
+82525
+82526
+82527
+82528
+82529
+82530
+82531
+82532
+82533
+82534
+82535
+82536
+82537
+82538
+82539
+82540
+82541
+82542
+82543
+82544
+82545
+82546
+82547
+82548
+82549
+82550
+82551
+82552
+82553
+82554
+82555
+82556
+82557
+82558
+82559
+82560
+82561
+82562
+82563
+82564
+82565
+82566
+82567
+82568
+82569
+82570
+82571
+82572
+82573
+82574
+82575
+82576
+82577
+82578
+82579
+82580
+82581
+82582
+82583
+82584
+82585
+82586
+82587
+82588
+82589
+82590
+82591
+82592
+82593
+82594
+82595
+82596
+82597
+82598
+82599
+82600
+82601
+82602
+82603
+82604
+82605
+82606
+82607
+82608
+82609
+82610
+82611
+82612
+82613
+82614
+82615
+82616
+82617
+82618
+82619
+82620
+82621
+82622
+82623
+82624
+82625
+82626
+82627
+82628
+82629
+82630
+82631
+82632
+82633
+82634
+82635
+82636
+82637
+82638
+82639
+82640
+82641
+82642
+82643
+82644
+82645
+82646
+82647
+82648
+82649
+82650
+82651
+82652
+82653
+82654
+82655
+82656
+82657
+82658
+82659
+82660
+82661
+82662
+82663
+82664
+82665
+82666
+82667
+82668
+82669
+82670
+82671
+82672
+82673
+82674
+82675
+82676
+82677
+82678
+82679
+82680
+82681
+82682
+82683
+82684
+82685
+82686
+82687
+82688
+82689
+82690
+82691
+82692
+82693
+82694
+82695
+82696
+82697
+82698
+82699
+82700
+82701
+82702
+82703
+82704
+82705
+82706
+82707
+82708
+82709
+82710
+82711
+82712
+82713
+82714
+82715
+82716
+82717
+82718
+82719
+82720
+82721
+82722
+82723
+82724
+82725
+82726
+82727
+82728
+82729
+82730
+82731
+82732
+82733
+82734
+82735
+82736
+82737
+82738
+82739
+82740
+82741
+82742
+82743
+82744
+82745
+82746
+82747
+82748
+82749
+82750
+82751
+82752
+82753
+82754
+82755
+82756
+82757
+82758
+82759
+82760
+82761
+82762
+82763
+82764
+82765
+82766
+82767
+82768
+82769
+82770
+82771
+82772
+82773
+82774
+82775
+82776
+82777
+82778
+82779
+82780
+82781
+82782
+82783
+82784
+82785
+82786
+82787
+82788
+82789
+82790
+82791
+82792
+82793
+82794
+82795
+82796
+82797
+82798
+82799
+82800
+82801
+82802
+82803
+82804
+82805
+82806
+82807
+82808
+82809
+82810
+82811
+82812
+82813
+82814
+82815
+82816
+82817
+82818
+82819
+82820
+82821
+82822
+82823
+82824
+82825
+82826
+82827
+82828
+82829
+82830
+82831
+82832
+82833
+82834
+82835
+82836
+82837
+82838
+82839
+82840
+82841
+82842
+82843
+82844
+82845
+82846
+82847
+82848
+82849
+82850
+82851
+82852
+82853
+82854
+82855
+82856
+82857
+82858
+82859
+82860
+82861
+82862
+82863
+82864
+82865
+82866
+82867
+82868
+82869
+82870
+82871
+82872
+82873
+82874
+82875
+82876
+82877
+82878
+82879
+82880
+82881
+82882
+82883
+82884
+82885
+82886
+82887
+82888
+82889
+82890
+82891
+82892
+82893
+82894
+82895
+82896
+82897
+82898
+82899
+82900
+82901
+82902
+82903
+82904
+82905
+82906
+82907
+82908
+82909
+82910
+82911
+82912
+82913
+82914
+82915
+82916
+82917
+82918
+82919
+82920
+82921
+82922
+82923
+82924
+82925
+82926
+82927
+82928
+82929
+82930
+82931
+82932
+82933
+82934
+82935
+82936
+82937
+82938
+82939
+82940
+82941
+82942
+82943
+82944
+82945
+82946
+82947
+82948
+82949
+82950
+82951
+82952
+82953
+82954
+82955
+82956
+82957
+82958
+82959
+82960
+82961
+82962
+82963
+82964
+82965
+82966
+82967
+82968
+82969
+82970
+82971
+82972
+82973
+82974
+82975
+82976
+82977
+82978
+82979
+82980
+82981
+82982
+82983
+82984
+82985
+82986
+82987
+82988
+82989
+82990
+82991
+82992
+82993
+82994
+82995
+82996
+82997
+82998
+82999
+83000
+83001
+83002
+83003
+83004
+83005
+83006
+83007
+83008
+83009
+83010
+83011
+83012
+83013
+83014
+83015
+83016
+83017
+83018
+83019
+83020
+83021
+83022
+83023
+83024
+83025
+83026
+83027
+83028
+83029
+83030
+83031
+83032
+83033
+83034
+83035
+83036
+83037
+83038
+83039
+83040
+83041
+83042
+83043
+83044
+83045
+83046
+83047
+83048
+83049
+83050
+83051
+83052
+83053
+83054
+83055
+83056
+83057
+83058
+83059
+83060
+83061
+83062
+83063
+83064
+83065
+83066
+83067
+83068
+83069
+83070
+83071
+83072
+83073
+83074
+83075
+83076
+83077
+83078
+83079
+83080
+83081
+83082
+83083
+83084
+83085
+83086
+83087
+83088
+83089
+83090
+83091
+83092
+83093
+83094
+83095
+83096
+83097
+83098
+83099
+83100
+83101
+83102
+83103
+83104
+83105
+83106
+83107
+83108
+83109
+83110
+83111
+83112
+83113
+83114
+83115
+83116
+83117
+83118
+83119
+83120
+83121
+83122
+83123
+83124
+83125
+83126
+83127
+83128
+83129
+83130
+83131
+83132
+83133
+83134
+83135
+83136
+83137
+83138
+83139
+83140
+83141
+83142
+83143
+83144
+83145
+83146
+83147
+83148
+83149
+83150
+83151
+83152
+83153
+83154
+83155
+83156
+83157
+83158
+83159
+83160
+83161
+83162
+83163
+83164
+83165
+83166
+83167
+83168
+83169
+83170
+83171
+83172
+83173
+83174
+83175
+83176
+83177
+83178
+83179
+83180
+83181
+83182
+83183
+83184
+83185
+83186
+83187
+83188
+83189
+83190
+83191
+83192
+83193
+83194
+83195
+83196
+83197
+83198
+83199
+83200
+83201
+83202
+83203
+83204
+83205
+83206
+83207
+83208
+83209
+83210
+83211
+83212
+83213
+83214
+83215
+83216
+83217
+83218
+83219
+83220
+83221
+83222
+83223
+83224
+83225
+83226
+83227
+83228
+83229
+83230
+83231
+83232
+83233
+83234
+83235
+83236
+83237
+83238
+83239
+83240
+83241
+83242
+83243
+83244
+83245
+83246
+83247
+83248
+83249
+83250
+83251
+83252
+83253
+83254
+83255
+83256
+83257
+83258
+83259
+83260
+83261
+83262
+83263
+83264
+83265
+83266
+83267
+83268
+83269
+83270
+83271
+83272
+83273
+83274
+83275
+83276
+83277
+83278
+83279
+83280
+83281
+83282
+83283
+83284
+83285
+83286
+83287
+83288
+83289
+83290
+83291
+83292
+83293
+83294
+83295
+83296
+83297
+83298
+83299
+83300
+83301
+83302
+83303
+83304
+83305
+83306
+83307
+83308
+83309
+83310
+83311
+83312
+83313
+83314
+83315
+83316
+83317
+83318
+83319
+83320
+83321
+83322
+83323
+83324
+83325
+83326
+83327
+83328
+83329
+83330
+83331
+83332
+83333
+83334
+83335
+83336
+83337
+83338
+83339
+83340
+83341
+83342
+83343
+83344
+83345
+83346
+83347
+83348
+83349
+83350
+83351
+83352
+83353
+83354
+83355
+83356
+83357
+83358
+83359
+83360
+83361
+83362
+83363
+83364
+83365
+83366
+83367
+83368
+83369
+83370
+83371
+83372
+83373
+83374
+83375
+83376
+83377
+83378
+83379
+83380
+83381
+83382
+83383
+83384
+83385
+83386
+83387
+83388
+83389
+83390
+83391
+83392
+83393
+83394
+83395
+83396
+83397
+83398
+83399
+83400
+83401
+83402
+83403
+83404
+83405
+83406
+83407
+83408
+83409
+83410
+83411
+83412
+83413
+83414
+83415
+83416
+83417
+83418
+83419
+83420
+83421
+83422
+83423
+83424
+83425
+83426
+83427
+83428
+83429
+83430
+83431
+83432
+83433
+83434
+83435
+83436
+83437
+83438
+83439
+83440
+83441
+83442
+83443
+83444
+83445
+83446
+83447
+83448
+83449
+83450
+83451
+83452
+83453
+83454
+83455
+83456
+83457
+83458
+83459
+83460
+83461
+83462
+83463
+83464
+83465
+83466
+83467
+83468
+83469
+83470
+83471
+83472
+83473
+83474
+83475
+83476
+83477
+83478
+83479
+83480
+83481
+83482
+83483
+83484
+83485
+83486
+83487
+83488
+83489
+83490
+83491
+83492
+83493
+83494
+83495
+83496
+83497
+83498
+83499
+83500
+83501
+83502
+83503
+83504
+83505
+83506
+83507
+83508
+83509
+83510
+83511
+83512
+83513
+83514
+83515
+83516
+83517
+83518
+83519
+83520
+83521
+83522
+83523
+83524
+83525
+83526
+83527
+83528
+83529
+83530
+83531
+83532
+83533
+83534
+83535
+83536
+83537
+83538
+83539
+83540
+83541
+83542
+83543
+83544
+83545
+83546
+83547
+83548
+83549
+83550
+83551
+83552
+83553
+83554
+83555
+83556
+83557
+83558
+83559
+83560
+83561
+83562
+83563
+83564
+83565
+83566
+83567
+83568
+83569
+83570
+83571
+83572
+83573
+83574
+83575
+83576
+83577
+83578
+83579
+83580
+83581
+83582
+83583
+83584
+83585
+83586
+83587
+83588
+83589
+83590
+83591
+83592
+83593
+83594
+83595
+83596
+83597
+83598
+83599
+83600
+83601
+83602
+83603
+83604
+83605
+83606
+83607
+83608
+83609
+83610
+83611
+83612
+83613
+83614
+83615
+83616
+83617
+83618
+83619
+83620
+83621
+83622
+83623
+83624
+83625
+83626
+83627
+83628
+83629
+83630
+83631
+83632
+83633
+83634
+83635
+83636
+83637
+83638
+83639
+83640
+83641
+83642
+83643
+83644
+83645
+83646
+83647
+83648
+83649
+83650
+83651
+83652
+83653
+83654
+83655
+83656
+83657
+83658
+83659
+83660
+83661
+83662
+83663
+83664
+83665
+83666
+83667
+83668
+83669
+83670
+83671
+83672
+83673
+83674
+83675
+83676
+83677
+83678
+83679
+83680
+83681
+83682
+83683
+83684
+83685
+83686
+83687
+83688
+83689
+83690
+83691
+83692
+83693
+83694
+83695
+83696
+83697
+83698
+83699
+83700
+83701
+83702
+83703
+83704
+83705
+83706
+83707
+83708
+83709
+83710
+83711
+83712
+83713
+83714
+83715
+83716
+83717
+83718
+83719
+83720
+83721
+83722
+83723
+83724
+83725
+83726
+83727
+83728
+83729
+83730
+83731
+83732
+83733
+83734
+83735
+83736
+83737
+83738
+83739
+83740
+83741
+83742
+83743
+83744
+83745
+83746
+83747
+83748
+83749
+83750
+83751
+83752
+83753
+83754
+83755
+83756
+83757
+83758
+83759
+83760
+83761
+83762
+83763
+83764
+83765
+83766
+83767
+83768
+83769
+83770
+83771
+83772
+83773
+83774
+83775
+83776
+83777
+83778
+83779
+83780
+83781
+83782
+83783
+83784
+83785
+83786
+83787
+83788
+83789
+83790
+83791
+83792
+83793
+83794
+83795
+83796
+83797
+83798
+83799
+83800
+83801
+83802
+83803
+83804
+83805
+83806
+83807
+83808
+83809
+83810
+83811
+83812
+83813
+83814
+83815
+83816
+83817
+83818
+83819
+83820
+83821
+83822
+83823
+83824
+83825
+83826
+83827
+83828
+83829
+83830
+83831
+83832
+83833
+83834
+83835
+83836
+83837
+83838
+83839
+83840
+83841
+83842
+83843
+83844
+83845
+83846
+83847
+83848
+83849
+83850
+83851
+83852
+83853
+83854
+83855
+83856
+83857
+83858
+83859
+83860
+83861
+83862
+83863
+83864
+83865
+83866
+83867
+83868
+83869
+83870
+83871
+83872
+83873
+83874
+83875
+83876
+83877
+83878
+83879
+83880
+83881
+83882
+83883
+83884
+83885
+83886
+83887
+83888
+83889
+83890
+83891
+83892
+83893
+83894
+83895
+83896
+83897
+83898
+83899
+83900
+83901
+83902
+83903
+83904
+83905
+83906
+83907
+83908
+83909
+83910
+83911
+83912
+83913
+83914
+83915
+83916
+83917
+83918
+83919
+83920
+83921
+83922
+83923
+83924
+83925
+83926
+83927
+83928
+83929
+83930
+83931
+83932
+83933
+83934
+83935
+83936
+83937
+83938
+83939
+83940
+83941
+83942
+83943
+83944
+83945
+83946
+83947
+83948
+83949
+83950
+83951
+83952
+83953
+83954
+83955
+83956
+83957
+83958
+83959
+83960
+83961
+83962
+83963
+83964
+83965
+83966
+83967
+83968
+83969
+83970
+83971
+83972
+83973
+83974
+83975
+83976
+83977
+83978
+83979
+83980
+83981
+83982
+83983
+83984
+83985
+83986
+83987
+83988
+83989
+83990
+83991
+83992
+83993
+83994
+83995
+83996
+83997
+83998
+83999
+84000
+84001
+84002
+84003
+84004
+84005
+84006
+84007
+84008
+84009
+84010
+84011
+84012
+84013
+84014
+84015
+84016
+84017
+84018
+84019
+84020
+84021
+84022
+84023
+84024
+84025
+84026
+84027
+84028
+84029
+84030
+84031
+84032
+84033
+84034
+84035
+84036
+84037
+84038
+84039
+84040
+84041
+84042
+84043
+84044
+84045
+84046
+84047
+84048
+84049
+84050
+84051
+84052
+84053
+84054
+84055
+84056
+84057
+84058
+84059
+84060
+84061
+84062
+84063
+84064
+84065
+84066
+84067
+84068
+84069
+84070
+84071
+84072
+84073
+84074
+84075
+84076
+84077
+84078
+84079
+84080
+84081
+84082
+84083
+84084
+84085
+84086
+84087
+84088
+84089
+84090
+84091
+84092
+84093
+84094
+84095
+84096
+84097
+84098
+84099
+84100
+84101
+84102
+84103
+84104
+84105
+84106
+84107
+84108
+84109
+84110
+84111
+84112
+84113
+84114
+84115
+84116
+84117
+84118
+84119
+84120
+84121
+84122
+84123
+84124
+84125
+84126
+84127
+84128
+84129
+84130
+84131
+84132
+84133
+84134
+84135
+84136
+84137
+84138
+84139
+84140
+84141
+84142
+84143
+84144
+84145
+84146
+84147
+84148
+84149
+84150
+84151
+84152
+84153
+84154
+84155
+84156
+84157
+84158
+84159
+84160
+84161
+84162
+84163
+84164
+84165
+84166
+84167
+84168
+84169
+84170
+84171
+84172
+84173
+84174
+84175
+84176
+84177
+84178
+84179
+84180
+84181
+84182
+84183
+84184
+84185
+84186
+84187
+84188
+84189
+84190
+84191
+84192
+84193
+84194
+84195
+84196
+84197
+84198
+84199
+84200
+84201
+84202
+84203
+84204
+84205
+84206
+84207
+84208
+84209
+84210
+84211
+84212
+84213
+84214
+84215
+84216
+84217
+84218
+84219
+84220
+84221
+84222
+84223
+84224
+84225
+84226
+84227
+84228
+84229
+84230
+84231
+84232
+84233
+84234
+84235
+84236
+84237
+84238
+84239
+84240
+84241
+84242
+84243
+84244
+84245
+84246
+84247
+84248
+84249
+84250
+84251
+84252
+84253
+84254
+84255
+84256
+84257
+84258
+84259
+84260
+84261
+84262
+84263
+84264
+84265
+84266
+84267
+84268
+84269
+84270
+84271
+84272
+84273
+84274
+84275
+84276
+84277
+84278
+84279
+84280
+84281
+84282
+84283
+84284
+84285
+84286
+84287
+84288
+84289
+84290
+84291
+84292
+84293
+84294
+84295
+84296
+84297
+84298
+84299
+84300
+84301
+84302
+84303
+84304
+84305
+84306
+84307
+84308
+84309
+84310
+84311
+84312
+84313
+84314
+84315
+84316
+84317
+84318
+84319
+84320
+84321
+84322
+84323
+84324
+84325
+84326
+84327
+84328
+84329
+84330
+84331
+84332
+84333
+84334
+84335
+84336
+84337
+84338
+84339
+84340
+84341
+84342
+84343
+84344
+84345
+84346
+84347
+84348
+84349
+84350
+84351
+84352
+84353
+84354
+84355
+84356
+84357
+84358
+84359
+84360
+84361
+84362
+84363
+84364
+84365
+84366
+84367
+84368
+84369
+84370
+84371
+84372
+84373
+84374
+84375
+84376
+84377
+84378
+84379
+84380
+84381
+84382
+84383
+84384
+84385
+84386
+84387
+84388
+84389
+84390
+84391
+84392
+84393
+84394
+84395
+84396
+84397
+84398
+84399
+84400
+84401
+84402
+84403
+84404
+84405
+84406
+84407
+84408
+84409
+84410
+84411
+84412
+84413
+84414
+84415
+84416
+84417
+84418
+84419
+84420
+84421
+84422
+84423
+84424
+84425
+84426
+84427
+84428
+84429
+84430
+84431
+84432
+84433
+84434
+84435
+84436
+84437
+84438
+84439
+84440
+84441
+84442
+84443
+84444
+84445
+84446
+84447
+84448
+84449
+84450
+84451
+84452
+84453
+84454
+84455
+84456
+84457
+84458
+84459
+84460
+84461
+84462
+84463
+84464
+84465
+84466
+84467
+84468
+84469
+84470
+84471
+84472
+84473
+84474
+84475
+84476
+84477
+84478
+84479
+84480
+84481
+84482
+84483
+84484
+84485
+84486
+84487
+84488
+84489
+84490
+84491
+84492
+84493
+84494
+84495
+84496
+84497
+84498
+84499
+84500
+84501
+84502
+84503
+84504
+84505
+84506
+84507
+84508
+84509
+84510
+84511
+84512
+84513
+84514
+84515
+84516
+84517
+84518
+84519
+84520
+84521
+84522
+84523
+84524
+84525
+84526
+84527
+84528
+84529
+84530
+84531
+84532
+84533
+84534
+84535
+84536
+84537
+84538
+84539
+84540
+84541
+84542
+84543
+84544
+84545
+84546
+84547
+84548
+84549
+84550
+84551
+84552
+84553
+84554
+84555
+84556
+84557
+84558
+84559
+84560
+84561
+84562
+84563
+84564
+84565
+84566
+84567
+84568
+84569
+84570
+84571
+84572
+84573
+84574
+84575
+84576
+84577
+84578
+84579
+84580
+84581
+84582
+84583
+84584
+84585
+84586
+84587
+84588
+84589
+84590
+84591
+84592
+84593
+84594
+84595
+84596
+84597
+84598
+84599
+84600
+84601
+84602
+84603
+84604
+84605
+84606
+84607
+84608
+84609
+84610
+84611
+84612
+84613
+84614
+84615
+84616
+84617
+84618
+84619
+84620
+84621
+84622
+84623
+84624
+84625
+84626
+84627
+84628
+84629
+84630
+84631
+84632
+84633
+84634
+84635
+84636
+84637
+84638
+84639
+84640
+84641
+84642
+84643
+84644
+84645
+84646
+84647
+84648
+84649
+84650
+84651
+84652
+84653
+84654
+84655
+84656
+84657
+84658
+84659
+84660
+84661
+84662
+84663
+84664
+84665
+84666
+84667
+84668
+84669
+84670
+84671
+84672
+84673
+84674
+84675
+84676
+84677
+84678
+84679
+84680
+84681
+84682
+84683
+84684
+84685
+84686
+84687
+84688
+84689
+84690
+84691
+84692
+84693
+84694
+84695
+84696
+84697
+84698
+84699
+84700
+84701
+84702
+84703
+84704
+84705
+84706
+84707
+84708
+84709
+84710
+84711
+84712
+84713
+84714
+84715
+84716
+84717
+84718
+84719
+84720
+84721
+84722
+84723
+84724
+84725
+84726
+84727
+84728
+84729
+84730
+84731
+84732
+84733
+84734
+84735
+84736
+84737
+84738
+84739
+84740
+84741
+84742
+84743
+84744
+84745
+84746
+84747
+84748
+84749
+84750
+84751
+84752
+84753
+84754
+84755
+84756
+84757
+84758
+84759
+84760
+84761
+84762
+84763
+84764
+84765
+84766
+84767
+84768
+84769
+84770
+84771
+84772
+84773
+84774
+84775
+84776
+84777
+84778
+84779
+84780
+84781
+84782
+84783
+84784
+84785
+84786
+84787
+84788
+84789
+84790
+84791
+84792
+84793
+84794
+84795
+84796
+84797
+84798
+84799
+84800
+84801
+84802
+84803
+84804
+84805
+84806
+84807
+84808
+84809
+84810
+84811
+84812
+84813
+84814
+84815
+84816
+84817
+84818
+84819
+84820
+84821
+84822
+84823
+84824
+84825
+84826
+84827
+84828
+84829
+84830
+84831
+84832
+84833
+84834
+84835
+84836
+84837
+84838
+84839
+84840
+84841
+84842
+84843
+84844
+84845
+84846
+84847
+84848
+84849
+84850
+84851
+84852
+84853
+84854
+84855
+84856
+84857
+84858
+84859
+84860
+84861
+84862
+84863
+84864
+84865
+84866
+84867
+84868
+84869
+84870
+84871
+84872
+84873
+84874
+84875
+84876
+84877
+84878
+84879
+84880
+84881
+84882
+84883
+84884
+84885
+84886
+84887
+84888
+84889
+84890
+84891
+84892
+84893
+84894
+84895
+84896
+84897
+84898
+84899
+84900
+84901
+84902
+84903
+84904
+84905
+84906
+84907
+84908
+84909
+84910
+84911
+84912
+84913
+84914
+84915
+84916
+84917
+84918
+84919
+84920
+84921
+84922
+84923
+84924
+84925
+84926
+84927
+84928
+84929
+84930
+84931
+84932
+84933
+84934
+84935
+84936
+84937
+84938
+84939
+84940
+84941
+84942
+84943
+84944
+84945
+84946
+84947
+84948
+84949
+84950
+84951
+84952
+84953
+84954
+84955
+84956
+84957
+84958
+84959
+84960
+84961
+84962
+84963
+84964
+84965
+84966
+84967
+84968
+84969
+84970
+84971
+84972
+84973
+84974
+84975
+84976
+84977
+84978
+84979
+84980
+84981
+84982
+84983
+84984
+84985
+84986
+84987
+84988
+84989
+84990
+84991
+84992
+84993
+84994
+84995
+84996
+84997
+84998
+84999
+85000
+85001
+85002
+85003
+85004
+85005
+85006
+85007
+85008
+85009
+85010
+85011
+85012
+85013
+85014
+85015
+85016
+85017
+85018
+85019
+85020
+85021
+85022
+85023
+85024
+85025
+85026
+85027
+85028
+85029
+85030
+85031
+85032
+85033
+85034
+85035
+85036
+85037
+85038
+85039
+85040
+85041
+85042
+85043
+85044
+85045
+85046
+85047
+85048
+85049
+85050
+85051
+85052
+85053
+85054
+85055
+85056
+85057
+85058
+85059
+85060
+85061
+85062
+85063
+85064
+85065
+85066
+85067
+85068
+85069
+85070
+85071
+85072
+85073
+85074
+85075
+85076
+85077
+85078
+85079
+85080
+85081
+85082
+85083
+85084
+85085
+85086
+85087
+85088
+85089
+85090
+85091
+85092
+85093
+85094
+85095
+85096
+85097
+85098
+85099
+85100
+85101
+85102
+85103
+85104
+85105
+85106
+85107
+85108
+85109
+85110
+85111
+85112
+85113
+85114
+85115
+85116
+85117
+85118
+85119
+85120
+85121
+85122
+85123
+85124
+85125
+85126
+85127
+85128
+85129
+85130
+85131
+85132
+85133
+85134
+85135
+85136
+85137
+85138
+85139
+85140
+85141
+85142
+85143
+85144
+85145
+85146
+85147
+85148
+85149
+85150
+85151
+85152
+85153
+85154
+85155
+85156
+85157
+85158
+85159
+85160
+85161
+85162
+85163
+85164
+85165
+85166
+85167
+85168
+85169
+85170
+85171
+85172
+85173
+85174
+85175
+85176
+85177
+85178
+85179
+85180
+85181
+85182
+85183
+85184
+85185
+85186
+85187
+85188
+85189
+85190
+85191
+85192
+85193
+85194
+85195
+85196
+85197
+85198
+85199
+85200
+85201
+85202
+85203
+85204
+85205
+85206
+85207
+85208
+85209
+85210
+85211
+85212
+85213
+85214
+85215
+85216
+85217
+85218
+85219
+85220
+85221
+85222
+85223
+85224
+85225
+85226
+85227
+85228
+85229
+85230
+85231
+85232
+85233
+85234
+85235
+85236
+85237
+85238
+85239
+85240
+85241
+85242
+85243
+85244
+85245
+85246
+85247
+85248
+85249
+85250
+85251
+85252
+85253
+85254
+85255
+85256
+85257
+85258
+85259
+85260
+85261
+85262
+85263
+85264
+85265
+85266
+85267
+85268
+85269
+85270
+85271
+85272
+85273
+85274
+85275
+85276
+85277
+85278
+85279
+85280
+85281
+85282
+85283
+85284
+85285
+85286
+85287
+85288
+85289
+85290
+85291
+85292
+85293
+85294
+85295
+85296
+85297
+85298
+85299
+85300
+85301
+85302
+85303
+85304
+85305
+85306
+85307
+85308
+85309
+85310
+85311
+85312
+85313
+85314
+85315
+85316
+85317
+85318
+85319
+85320
+85321
+85322
+85323
+85324
+85325
+85326
+85327
+85328
+85329
+85330
+85331
+85332
+85333
+85334
+85335
+85336
+85337
+85338
+85339
+85340
+85341
+85342
+85343
+85344
+85345
+85346
+85347
+85348
+85349
+85350
+85351
+85352
+85353
+85354
+85355
+85356
+85357
+85358
+85359
+85360
+85361
+85362
+85363
+85364
+85365
+85366
+85367
+85368
+85369
+85370
+85371
+85372
+85373
+85374
+85375
+85376
+85377
+85378
+85379
+85380
+85381
+85382
+85383
+85384
+85385
+85386
+85387
+85388
+85389
+85390
+85391
+85392
+85393
+85394
+85395
+85396
+85397
+85398
+85399
+85400
+85401
+85402
+85403
+85404
+85405
+85406
+85407
+85408
+85409
+85410
+85411
+85412
+85413
+85414
+85415
+85416
+85417
+85418
+85419
+85420
+85421
+85422
+85423
+85424
+85425
+85426
+85427
+85428
+85429
+85430
+85431
+85432
+85433
+85434
+85435
+85436
+85437
+85438
+85439
+85440
+85441
+85442
+85443
+85444
+85445
+85446
+85447
+85448
+85449
+85450
+85451
+85452
+85453
+85454
+85455
+85456
+85457
+85458
+85459
+85460
+85461
+85462
+85463
+85464
+85465
+85466
+85467
+85468
+85469
+85470
+85471
+85472
+85473
+85474
+85475
+85476
+85477
+85478
+85479
+85480
+85481
+85482
+85483
+85484
+85485
+85486
+85487
+85488
+85489
+85490
+85491
+85492
+85493
+85494
+85495
+85496
+85497
+85498
+85499
+85500
+85501
+85502
+85503
+85504
+85505
+85506
+85507
+85508
+85509
+85510
+85511
+85512
+85513
+85514
+85515
+85516
+85517
+85518
+85519
+85520
+85521
+85522
+85523
+85524
+85525
+85526
+85527
+85528
+85529
+85530
+85531
+85532
+85533
+85534
+85535
+85536
+85537
+85538
+85539
+85540
+85541
+85542
+85543
+85544
+85545
+85546
+85547
+85548
+85549
+85550
+85551
+85552
+85553
+85554
+85555
+85556
+85557
+85558
+85559
+85560
+85561
+85562
+85563
+85564
+85565
+85566
+85567
+85568
+85569
+85570
+85571
+85572
+85573
+85574
+85575
+85576
+85577
+85578
+85579
+85580
+85581
+85582
+85583
+85584
+85585
+85586
+85587
+85588
+85589
+85590
+85591
+85592
+85593
+85594
+85595
+85596
+85597
+85598
+85599
+85600
+85601
+85602
+85603
+85604
+85605
+85606
+85607
+85608
+85609
+85610
+85611
+85612
+85613
+85614
+85615
+85616
+85617
+85618
+85619
+85620
+85621
+85622
+85623
+85624
+85625
+85626
+85627
+85628
+85629
+85630
+85631
+85632
+85633
+85634
+85635
+85636
+85637
+85638
+85639
+85640
+85641
+85642
+85643
+85644
+85645
+85646
+85647
+85648
+85649
+85650
+85651
+85652
+85653
+85654
+85655
+85656
+85657
+85658
+85659
+85660
+85661
+85662
+85663
+85664
+85665
+85666
+85667
+85668
+85669
+85670
+85671
+85672
+85673
+85674
+85675
+85676
+85677
+85678
+85679
+85680
+85681
+85682
+85683
+85684
+85685
+85686
+85687
+85688
+85689
+85690
+85691
+85692
+85693
+85694
+85695
+85696
+85697
+85698
+85699
+85700
+85701
+85702
+85703
+85704
+85705
+85706
+85707
+85708
+85709
+85710
+85711
+85712
+85713
+85714
+85715
+85716
+85717
+85718
+85719
+85720
+85721
+85722
+85723
+85724
+85725
+85726
+85727
+85728
+85729
+85730
+85731
+85732
+85733
+85734
+85735
+85736
+85737
+85738
+85739
+85740
+85741
+85742
+85743
+85744
+85745
+85746
+85747
+85748
+85749
+85750
+85751
+85752
+85753
+85754
+85755
+85756
+85757
+85758
+85759
+85760
+85761
+85762
+85763
+85764
+85765
+85766
+85767
+85768
+85769
+85770
+85771
+85772
+85773
+85774
+85775
+85776
+85777
+85778
+85779
+85780
+85781
+85782
+85783
+85784
+85785
+85786
+85787
+85788
+85789
+85790
+85791
+85792
+85793
+85794
+85795
+85796
+85797
+85798
+85799
+85800
+85801
+85802
+85803
+85804
+85805
+85806
+85807
+85808
+85809
+85810
+85811
+85812
+85813
+85814
+85815
+85816
+85817
+85818
+85819
+85820
+85821
+85822
+85823
+85824
+85825
+85826
+85827
+85828
+85829
+85830
+85831
+85832
+85833
+85834
+85835
+85836
+85837
+85838
+85839
+85840
+85841
+85842
+85843
+85844
+85845
+85846
+85847
+85848
+85849
+85850
+85851
+85852
+85853
+85854
+85855
+85856
+85857
+85858
+85859
+85860
+85861
+85862
+85863
+85864
+85865
+85866
+85867
+85868
+85869
+85870
+85871
+85872
+85873
+85874
+85875
+85876
+85877
+85878
+85879
+85880
+85881
+85882
+85883
+85884
+85885
+85886
+85887
+85888
+85889
+85890
+85891
+85892
+85893
+85894
+85895
+85896
+85897
+85898
+85899
+85900
+85901
+85902
+85903
+85904
+85905
+85906
+85907
+85908
+85909
+85910
+85911
+85912
+85913
+85914
+85915
+85916
+85917
+85918
+85919
+85920
+85921
+85922
+85923
+85924
+85925
+85926
+85927
+85928
+85929
+85930
+85931
+85932
+85933
+85934
+85935
+85936
+85937
+85938
+85939
+85940
+85941
+85942
+85943
+85944
+85945
+85946
+85947
+85948
+85949
+85950
+85951
+85952
+85953
+85954
+85955
+85956
+85957
+85958
+85959
+85960
+85961
+85962
+85963
+85964
+85965
+85966
+85967
+85968
+85969
+85970
+85971
+85972
+85973
+85974
+85975
+85976
+85977
+85978
+85979
+85980
+85981
+85982
+85983
+85984
+85985
+85986
+85987
+85988
+85989
+85990
+85991
+85992
+85993
+85994
+85995
+85996
+85997
+85998
+85999
+86000
+86001
+86002
+86003
+86004
+86005
+86006
+86007
+86008
+86009
+86010
+86011
+86012
+86013
+86014
+86015
+86016
+86017
+86018
+86019
+86020
+86021
+86022
+86023
+86024
+86025
+86026
+86027
+86028
+86029
+86030
+86031
+86032
+86033
+86034
+86035
+86036
+86037
+86038
+86039
+86040
+86041
+86042
+86043
+86044
+86045
+86046
+86047
+86048
+86049
+86050
+86051
+86052
+86053
+86054
+86055
+86056
+86057
+86058
+86059
+86060
+86061
+86062
+86063
+86064
+86065
+86066
+86067
+86068
+86069
+86070
+86071
+86072
+86073
+86074
+86075
+86076
+86077
+86078
+86079
+86080
+86081
+86082
+86083
+86084
+86085
+86086
+86087
+86088
+86089
+86090
+86091
+86092
+86093
+86094
+86095
+86096
+86097
+86098
+86099
+86100
+86101
+86102
+86103
+86104
+86105
+86106
+86107
+86108
+86109
+86110
+86111
+86112
+86113
+86114
+86115
+86116
+86117
+86118
+86119
+86120
+86121
+86122
+86123
+86124
+86125
+86126
+86127
+86128
+86129
+86130
+86131
+86132
+86133
+86134
+86135
+86136
+86137
+86138
+86139
+86140
+86141
+86142
+86143
+86144
+86145
+86146
+86147
+86148
+86149
+86150
+86151
+86152
+86153
+86154
+86155
+86156
+86157
+86158
+86159
+86160
+86161
+86162
+86163
+86164
+86165
+86166
+86167
+86168
+86169
+86170
+86171
+86172
+86173
+86174
+86175
+86176
+86177
+86178
+86179
+86180
+86181
+86182
+86183
+86184
+86185
+86186
+86187
+86188
+86189
+86190
+86191
+86192
+86193
+86194
+86195
+86196
+86197
+86198
+86199
+86200
+86201
+86202
+86203
+86204
+86205
+86206
+86207
+86208
+86209
+86210
+86211
+86212
+86213
+86214
+86215
+86216
+86217
+86218
+86219
+86220
+86221
+86222
+86223
+86224
+86225
+86226
+86227
+86228
+86229
+86230
+86231
+86232
+86233
+86234
+86235
+86236
+86237
+86238
+86239
+86240
+86241
+86242
+86243
+86244
+86245
+86246
+86247
+86248
+86249
+86250
+86251
+86252
+86253
+86254
+86255
+86256
+86257
+86258
+86259
+86260
+86261
+86262
+86263
+86264
+86265
+86266
+86267
+86268
+86269
+86270
+86271
+86272
+86273
+86274
+86275
+86276
+86277
+86278
+86279
+86280
+86281
+86282
+86283
+86284
+86285
+86286
+86287
+86288
+86289
+86290
+86291
+86292
+86293
+86294
+86295
+86296
+86297
+86298
+86299
+86300
+86301
+86302
+86303
+86304
+86305
+86306
+86307
+86308
+86309
+86310
+86311
+86312
+86313
+86314
+86315
+86316
+86317
+86318
+86319
+86320
+86321
+86322
+86323
+86324
+86325
+86326
+86327
+86328
+86329
+86330
+86331
+86332
+86333
+86334
+86335
+86336
+86337
+86338
+86339
+86340
+86341
+86342
+86343
+86344
+86345
+86346
+86347
+86348
+86349
+86350
+86351
+86352
+86353
+86354
+86355
+86356
+86357
+86358
+86359
+86360
+86361
+86362
+86363
+86364
+86365
+86366
+86367
+86368
+86369
+86370
+86371
+86372
+86373
+86374
+86375
+86376
+86377
+86378
+86379
+86380
+86381
+86382
+86383
+86384
+86385
+86386
+86387
+86388
+86389
+86390
+86391
+86392
+86393
+86394
+86395
+86396
+86397
+86398
+86399
+86400
+86401
+86402
+86403
+86404
+86405
+86406
+86407
+86408
+86409
+86410
+86411
+86412
+86413
+86414
+86415
+86416
+86417
+86418
+86419
+86420
+86421
+86422
+86423
+86424
+86425
+86426
+86427
+86428
+86429
+86430
+86431
+86432
+86433
+86434
+86435
+86436
+86437
+86438
+86439
+86440
+86441
+86442
+86443
+86444
+86445
+86446
+86447
+86448
+86449
+86450
+86451
+86452
+86453
+86454
+86455
+86456
+86457
+86458
+86459
+86460
+86461
+86462
+86463
+86464
+86465
+86466
+86467
+86468
+86469
+86470
+86471
+86472
+86473
+86474
+86475
+86476
+86477
+86478
+86479
+86480
+86481
+86482
+86483
+86484
+86485
+86486
+86487
+86488
+86489
+86490
+86491
+86492
+86493
+86494
+86495
+86496
+86497
+86498
+86499
+86500
+86501
+86502
+86503
+86504
+86505
+86506
+86507
+86508
+86509
+86510
+86511
+86512
+86513
+86514
+86515
+86516
+86517
+86518
+86519
+86520
+86521
+86522
+86523
+86524
+86525
+86526
+86527
+86528
+86529
+86530
+86531
+86532
+86533
+86534
+86535
+86536
+86537
+86538
+86539
+86540
+86541
+86542
+86543
+86544
+86545
+86546
+86547
+86548
+86549
+86550
+86551
+86552
+86553
+86554
+86555
+86556
+86557
+86558
+86559
+86560
+86561
+86562
+86563
+86564
+86565
+86566
+86567
+86568
+86569
+86570
+86571
+86572
+86573
+86574
+86575
+86576
+86577
+86578
+86579
+86580
+86581
+86582
+86583
+86584
+86585
+86586
+86587
+86588
+86589
+86590
+86591
+86592
+86593
+86594
+86595
+86596
+86597
+86598
+86599
+86600
+86601
+86602
+86603
+86604
+86605
+86606
+86607
+86608
+86609
+86610
+86611
+86612
+86613
+86614
+86615
+86616
+86617
+86618
+86619
+86620
+86621
+86622
+86623
+86624
+86625
+86626
+86627
+86628
+86629
+86630
+86631
+86632
+86633
+86634
+86635
+86636
+86637
+86638
+86639
+86640
+86641
+86642
+86643
+86644
+86645
+86646
+86647
+86648
+86649
+86650
+86651
+86652
+86653
+86654
+86655
+86656
+86657
+86658
+86659
+86660
+86661
+86662
+86663
+86664
+86665
+86666
+86667
+86668
+86669
+86670
+86671
+86672
+86673
+86674
+86675
+86676
+86677
+86678
+86679
+86680
+86681
+86682
+86683
+86684
+86685
+86686
+86687
+86688
+86689
+86690
+86691
+86692
+86693
+86694
+86695
+86696
+86697
+86698
+86699
+86700
+86701
+86702
+86703
+86704
+86705
+86706
+86707
+86708
+86709
+86710
+86711
+86712
+86713
+86714
+86715
+86716
+86717
+86718
+86719
+86720
+86721
+86722
+86723
+86724
+86725
+86726
+86727
+86728
+86729
+86730
+86731
+86732
+86733
+86734
+86735
+86736
+86737
+86738
+86739
+86740
+86741
+86742
+86743
+86744
+86745
+86746
+86747
+86748
+86749
+86750
+86751
+86752
+86753
+86754
+86755
+86756
+86757
+86758
+86759
+86760
+86761
+86762
+86763
+86764
+86765
+86766
+86767
+86768
+86769
+86770
+86771
+86772
+86773
+86774
+86775
+86776
+86777
+86778
+86779
+86780
+86781
+86782
+86783
+86784
+86785
+86786
+86787
+86788
+86789
+86790
+86791
+86792
+86793
+86794
+86795
+86796
+86797
+86798
+86799
+86800
+86801
+86802
+86803
+86804
+86805
+86806
+86807
+86808
+86809
+86810
+86811
+86812
+86813
+86814
+86815
+86816
+86817
+86818
+86819
+86820
+86821
+86822
+86823
+86824
+86825
+86826
+86827
+86828
+86829
+86830
+86831
+86832
+86833
+86834
+86835
+86836
+86837
+86838
+86839
+86840
+86841
+86842
+86843
+86844
+86845
+86846
+86847
+86848
+86849
+86850
+86851
+86852
+86853
+86854
+86855
+86856
+86857
+86858
+86859
+86860
+86861
+86862
+86863
+86864
+86865
+86866
+86867
+86868
+86869
+86870
+86871
+86872
+86873
+86874
+86875
+86876
+86877
+86878
+86879
+86880
+86881
+86882
+86883
+86884
+86885
+86886
+86887
+86888
+86889
+86890
+86891
+86892
+86893
+86894
+86895
+86896
+86897
+86898
+86899
+86900
+86901
+86902
+86903
+86904
+86905
+86906
+86907
+86908
+86909
+86910
+86911
+86912
+86913
+86914
+86915
+86916
+86917
+86918
+86919
+86920
+86921
+86922
+86923
+86924
+86925
+86926
+86927
+86928
+86929
+86930
+86931
+86932
+86933
+86934
+86935
+86936
+86937
+86938
+86939
+86940
+86941
+86942
+86943
+86944
+86945
+86946
+86947
+86948
+86949
+86950
+86951
+86952
+86953
+86954
+86955
+86956
+86957
+86958
+86959
+86960
+86961
+86962
+86963
+86964
+86965
+86966
+86967
+86968
+86969
+86970
+86971
+86972
+86973
+86974
+86975
+86976
+86977
+86978
+86979
+86980
+86981
+86982
+86983
+86984
+86985
+86986
+86987
+86988
+86989
+86990
+86991
+86992
+86993
+86994
+86995
+86996
+86997
+86998
+86999
+87000
+87001
+87002
+87003
+87004
+87005
+87006
+87007
+87008
+87009
+87010
+87011
+87012
+87013
+87014
+87015
+87016
+87017
+87018
+87019
+87020
+87021
+87022
+87023
+87024
+87025
+87026
+87027
+87028
+87029
+87030
+87031
+87032
+87033
+87034
+87035
+87036
+87037
+87038
+87039
+87040
+87041
+87042
+87043
+87044
+87045
+87046
+87047
+87048
+87049
+87050
+87051
+87052
+87053
+87054
+87055
+87056
+87057
+87058
+87059
+87060
+87061
+87062
+87063
+87064
+87065
+87066
+87067
+87068
+87069
+87070
+87071
+87072
+87073
+87074
+87075
+87076
+87077
+87078
+87079
+87080
+87081
+87082
+87083
+87084
+87085
+87086
+87087
+87088
+87089
+87090
+87091
+87092
+87093
+87094
+87095
+87096
+87097
+87098
+87099
+87100
+87101
+87102
+87103
+87104
+87105
+87106
+87107
+87108
+87109
+87110
+87111
+87112
+87113
+87114
+87115
+87116
+87117
+87118
+87119
+87120
+87121
+87122
+87123
+87124
+87125
+87126
+87127
+87128
+87129
+87130
+87131
+87132
+87133
+87134
+87135
+87136
+87137
+87138
+87139
+87140
+87141
+87142
+87143
+87144
+87145
+87146
+87147
+87148
+87149
+87150
+87151
+87152
+87153
+87154
+87155
+87156
+87157
+87158
+87159
+87160
+87161
+87162
+87163
+87164
+87165
+87166
+87167
+87168
+87169
+87170
+87171
+87172
+87173
+87174
+87175
+87176
+87177
+87178
+87179
+87180
+87181
+87182
+87183
+87184
+87185
+87186
+87187
+87188
+87189
+87190
+87191
+87192
+87193
+87194
+87195
+87196
+87197
+87198
+87199
+87200
+87201
+87202
+87203
+87204
+87205
+87206
+87207
+87208
+87209
+87210
+87211
+87212
+87213
+87214
+87215
+87216
+87217
+87218
+87219
+87220
+87221
+87222
+87223
+87224
+87225
+87226
+87227
+87228
+87229
+87230
+87231
+87232
+87233
+87234
+87235
+87236
+87237
+87238
+87239
+87240
+87241
+87242
+87243
+87244
+87245
+87246
+87247
+87248
+87249
+87250
+87251
+87252
+87253
+87254
+87255
+87256
+87257
+87258
+87259
+87260
+87261
+87262
+87263
+87264
+87265
+87266
+87267
+87268
+87269
+87270
+87271
+87272
+87273
+87274
+87275
+87276
+87277
+87278
+87279
+87280
+87281
+87282
+87283
+87284
+87285
+87286
+87287
+87288
+87289
+87290
+87291
+87292
+87293
+87294
+87295
+87296
+87297
+87298
+87299
+87300
+87301
+87302
+87303
+87304
+87305
+87306
+87307
+87308
+87309
+87310
+87311
+87312
+87313
+87314
+87315
+87316
+87317
+87318
+87319
+87320
+87321
+87322
+87323
+87324
+87325
+87326
+87327
+87328
+87329
+87330
+87331
+87332
+87333
+87334
+87335
+87336
+87337
+87338
+87339
+87340
+87341
+87342
+87343
+87344
+87345
+87346
+87347
+87348
+87349
+87350
+87351
+87352
+87353
+87354
+87355
+87356
+87357
+87358
+87359
+87360
+87361
+87362
+87363
+87364
+87365
+87366
+87367
+87368
+87369
+87370
+87371
+87372
+87373
+87374
+87375
+87376
+87377
+87378
+87379
+87380
+87381
+87382
+87383
+87384
+87385
+87386
+87387
+87388
+87389
+87390
+87391
+87392
+87393
+87394
+87395
+87396
+87397
+87398
+87399
+87400
+87401
+87402
+87403
+87404
+87405
+87406
+87407
+87408
+87409
+87410
+87411
+87412
+87413
+87414
+87415
+87416
+87417
+87418
+87419
+87420
+87421
+87422
+87423
+87424
+87425
+87426
+87427
+87428
+87429
+87430
+87431
+87432
+87433
+87434
+87435
+87436
+87437
+87438
+87439
+87440
+87441
+87442
+87443
+87444
+87445
+87446
+87447
+87448
+87449
+87450
+87451
+87452
+87453
+87454
+87455
+87456
+87457
+87458
+87459
+87460
+87461
+87462
+87463
+87464
+87465
+87466
+87467
+87468
+87469
+87470
+87471
+87472
+87473
+87474
+87475
+87476
+87477
+87478
+87479
+87480
+87481
+87482
+87483
+87484
+87485
+87486
+87487
+87488
+87489
+87490
+87491
+87492
+87493
+87494
+87495
+87496
+87497
+87498
+87499
+87500
+87501
+87502
+87503
+87504
+87505
+87506
+87507
+87508
+87509
+87510
+87511
+87512
+87513
+87514
+87515
+87516
+87517
+87518
+87519
+87520
+87521
+87522
+87523
+87524
+87525
+87526
+87527
+87528
+87529
+87530
+87531
+87532
+87533
+87534
+87535
+87536
+87537
+87538
+87539
+87540
+87541
+87542
+87543
+87544
+87545
+87546
+87547
+87548
+87549
+87550
+87551
+87552
+87553
+87554
+87555
+87556
+87557
+87558
+87559
+87560
+87561
+87562
+87563
+87564
+87565
+87566
+87567
+87568
+87569
+87570
+87571
+87572
+87573
+87574
+87575
+87576
+87577
+87578
+87579
+87580
+87581
+87582
+87583
+87584
+87585
+87586
+87587
+87588
+87589
+87590
+87591
+87592
+87593
+87594
+87595
+87596
+87597
+87598
+87599
+87600
+87601
+87602
+87603
+87604
+87605
+87606
+87607
+87608
+87609
+87610
+87611
+87612
+87613
+87614
+87615
+87616
+87617
+87618
+87619
+87620
+87621
+87622
+87623
+87624
+87625
+87626
+87627
+87628
+87629
+87630
+87631
+87632
+87633
+87634
+87635
+87636
+87637
+87638
+87639
+87640
+87641
+87642
+87643
+87644
+87645
+87646
+87647
+87648
+87649
+87650
+87651
+87652
+87653
+87654
+87655
+87656
+87657
+87658
+87659
+87660
+87661
+87662
+87663
+87664
+87665
+87666
+87667
+87668
+87669
+87670
+87671
+87672
+87673
+87674
+87675
+87676
+87677
+87678
+87679
+87680
+87681
+87682
+87683
+87684
+87685
+87686
+87687
+87688
+87689
+87690
+87691
+87692
+87693
+87694
+87695
+87696
+87697
+87698
+87699
+87700
+87701
+87702
+87703
+87704
+87705
+87706
+87707
+87708
+87709
+87710
+87711
+87712
+87713
+87714
+87715
+87716
+87717
+87718
+87719
+87720
+87721
+87722
+87723
+87724
+87725
+87726
+87727
+87728
+87729
+87730
+87731
+87732
+87733
+87734
+87735
+87736
+87737
+87738
+87739
+87740
+87741
+87742
+87743
+87744
+87745
+87746
+87747
+87748
+87749
+87750
+87751
+87752
+87753
+87754
+87755
+87756
+87757
+87758
+87759
+87760
+87761
+87762
+87763
+87764
+87765
+87766
+87767
+87768
+87769
+87770
+87771
+87772
+87773
+87774
+87775
+87776
+87777
+87778
+87779
+87780
+87781
+87782
+87783
+87784
+87785
+87786
+87787
+87788
+87789
+87790
+87791
+87792
+87793
+87794
+87795
+87796
+87797
+87798
+87799
+87800
+87801
+87802
+87803
+87804
+87805
+87806
+87807
+87808
+87809
+87810
+87811
+87812
+87813
+87814
+87815
+87816
+87817
+87818
+87819
+87820
+87821
+87822
+87823
+87824
+87825
+87826
+87827
+87828
+87829
+87830
+87831
+87832
+87833
+87834
+87835
+87836
+87837
+87838
+87839
+87840
+87841
+87842
+87843
+87844
+87845
+87846
+87847
+87848
+87849
+87850
+87851
+87852
+87853
+87854
+87855
+87856
+87857
+87858
+87859
+87860
+87861
+87862
+87863
+87864
+87865
+87866
+87867
+87868
+87869
+87870
+87871
+87872
+87873
+87874
+87875
+87876
+87877
+87878
+87879
+87880
+87881
+87882
+87883
+87884
+87885
+87886
+87887
+87888
+87889
+87890
+87891
+87892
+87893
+87894
+87895
+87896
+87897
+87898
+87899
+87900
+87901
+87902
+87903
+87904
+87905
+87906
+87907
+87908
+87909
+87910
+87911
+87912
+87913
+87914
+87915
+87916
+87917
+87918
+87919
+87920
+87921
+87922
+87923
+87924
+87925
+87926
+87927
+87928
+87929
+87930
+87931
+87932
+87933
+87934
+87935
+87936
+87937
+87938
+87939
+87940
+87941
+87942
+87943
+87944
+87945
+87946
+87947
+87948
+87949
+87950
+87951
+87952
+87953
+87954
+87955
+87956
+87957
+87958
+87959
+87960
+87961
+87962
+87963
+87964
+87965
+87966
+87967
+87968
+87969
+87970
+87971
+87972
+87973
+87974
+87975
+87976
+87977
+87978
+87979
+87980
+87981
+87982
+87983
+87984
+87985
+87986
+87987
+87988
+87989
+87990
+87991
+87992
+87993
+87994
+87995
+87996
+87997
+87998
+87999
+88000
+88001
+88002
+88003
+88004
+88005
+88006
+88007
+88008
+88009
+88010
+88011
+88012
+88013
+88014
+88015
+88016
+88017
+88018
+88019
+88020
+88021
+88022
+88023
+88024
+88025
+88026
+88027
+88028
+88029
+88030
+88031
+88032
+88033
+88034
+88035
+88036
+88037
+88038
+88039
+88040
+88041
+88042
+88043
+88044
+88045
+88046
+88047
+88048
+88049
+88050
+88051
+88052
+88053
+88054
+88055
+88056
+88057
+88058
+88059
+88060
+88061
+88062
+88063
+88064
+88065
+88066
+88067
+88068
+88069
+88070
+88071
+88072
+88073
+88074
+88075
+88076
+88077
+88078
+88079
+88080
+88081
+88082
+88083
+88084
+88085
+88086
+88087
+88088
+88089
+88090
+88091
+88092
+88093
+88094
+88095
+88096
+88097
+88098
+88099
+88100
+88101
+88102
+88103
+88104
+88105
+88106
+88107
+88108
+88109
+88110
+88111
+88112
+88113
+88114
+88115
+88116
+88117
+88118
+88119
+88120
+88121
+88122
+88123
+88124
+88125
+88126
+88127
+88128
+88129
+88130
+88131
+88132
+88133
+88134
+88135
+88136
+88137
+88138
+88139
+88140
+88141
+88142
+88143
+88144
+88145
+88146
+88147
+88148
+88149
+88150
+88151
+88152
+88153
+88154
+88155
+88156
+88157
+88158
+88159
+88160
+88161
+88162
+88163
+88164
+88165
+88166
+88167
+88168
+88169
+88170
+88171
+88172
+88173
+88174
+88175
+88176
+88177
+88178
+88179
+88180
+88181
+88182
+88183
+88184
+88185
+88186
+88187
+88188
+88189
+88190
+88191
+88192
+88193
+88194
+88195
+88196
+88197
+88198
+88199
+88200
+88201
+88202
+88203
+88204
+88205
+88206
+88207
+88208
+88209
+88210
+88211
+88212
+88213
+88214
+88215
+88216
+88217
+88218
+88219
+88220
+88221
+88222
+88223
+88224
+88225
+88226
+88227
+88228
+88229
+88230
+88231
+88232
+88233
+88234
+88235
+88236
+88237
+88238
+88239
+88240
+88241
+88242
+88243
+88244
+88245
+88246
+88247
+88248
+88249
+88250
+88251
+88252
+88253
+88254
+88255
+88256
+88257
+88258
+88259
+88260
+88261
+88262
+88263
+88264
+88265
+88266
+88267
+88268
+88269
+88270
+88271
+88272
+88273
+88274
+88275
+88276
+88277
+88278
+88279
+88280
+88281
+88282
+88283
+88284
+88285
+88286
+88287
+88288
+88289
+88290
+88291
+88292
+88293
+88294
+88295
+88296
+88297
+88298
+88299
+88300
+88301
+88302
+88303
+88304
+88305
+88306
+88307
+88308
+88309
+88310
+88311
+88312
+88313
+88314
+88315
+88316
+88317
+88318
+88319
+88320
+88321
+88322
+88323
+88324
+88325
+88326
+88327
+88328
+88329
+88330
+88331
+88332
+88333
+88334
+88335
+88336
+88337
+88338
+88339
+88340
+88341
+88342
+88343
+88344
+88345
+88346
+88347
+88348
+88349
+88350
+88351
+88352
+88353
+88354
+88355
+88356
+88357
+88358
+88359
+88360
+88361
+88362
+88363
+88364
+88365
+88366
+88367
+88368
+88369
+88370
+88371
+88372
+88373
+88374
+88375
+88376
+88377
+88378
+88379
+88380
+88381
+88382
+88383
+88384
+88385
+88386
+88387
+88388
+88389
+88390
+88391
+88392
+88393
+88394
+88395
+88396
+88397
+88398
+88399
+88400
+88401
+88402
+88403
+88404
+88405
+88406
+88407
+88408
+88409
+88410
+88411
+88412
+88413
+88414
+88415
+88416
+88417
+88418
+88419
+88420
+88421
+88422
+88423
+88424
+88425
+88426
+88427
+88428
+88429
+88430
+88431
+88432
+88433
+88434
+88435
+88436
+88437
+88438
+88439
+88440
+88441
+88442
+88443
+88444
+88445
+88446
+88447
+88448
+88449
+88450
+88451
+88452
+88453
+88454
+88455
+88456
+88457
+88458
+88459
+88460
+88461
+88462
+88463
+88464
+88465
+88466
+88467
+88468
+88469
+88470
+88471
+88472
+88473
+88474
+88475
+88476
+88477
+88478
+88479
+88480
+88481
+88482
+88483
+88484
+88485
+88486
+88487
+88488
+88489
+88490
+88491
+88492
+88493
+88494
+88495
+88496
+88497
+88498
+88499
+88500
+88501
+88502
+88503
+88504
+88505
+88506
+88507
+88508
+88509
+88510
+88511
+88512
+88513
+88514
+88515
+88516
+88517
+88518
+88519
+88520
+88521
+88522
+88523
+88524
+88525
+88526
+88527
+88528
+88529
+88530
+88531
+88532
+88533
+88534
+88535
+88536
+88537
+88538
+88539
+88540
+88541
+88542
+88543
+88544
+88545
+88546
+88547
+88548
+88549
+88550
+88551
+88552
+88553
+88554
+88555
+88556
+88557
+88558
+88559
+88560
+88561
+88562
+88563
+88564
+88565
+88566
+88567
+88568
+88569
+88570
+88571
+88572
+88573
+88574
+88575
+88576
+88577
+88578
+88579
+88580
+88581
+88582
+88583
+88584
+88585
+88586
+88587
+88588
+88589
+88590
+88591
+88592
+88593
+88594
+88595
+88596
+88597
+88598
+88599
+88600
+88601
+88602
+88603
+88604
+88605
+88606
+88607
+88608
+88609
+88610
+88611
+88612
+88613
+88614
+88615
+88616
+88617
+88618
+88619
+88620
+88621
+88622
+88623
+88624
+88625
+88626
+88627
+88628
+88629
+88630
+88631
+88632
+88633
+88634
+88635
+88636
+88637
+88638
+88639
+88640
+88641
+88642
+88643
+88644
+88645
+88646
+88647
+88648
+88649
+88650
+88651
+88652
+88653
+88654
+88655
+88656
+88657
+88658
+88659
+88660
+88661
+88662
+88663
+88664
+88665
+88666
+88667
+88668
+88669
+88670
+88671
+88672
+88673
+88674
+88675
+88676
+88677
+88678
+88679
+88680
+88681
+88682
+88683
+88684
+88685
+88686
+88687
+88688
+88689
+88690
+88691
+88692
+88693
+88694
+88695
+88696
+88697
+88698
+88699
+88700
+88701
+88702
+88703
+88704
+88705
+88706
+88707
+88708
+88709
+88710
+88711
+88712
+88713
+88714
+88715
+88716
+88717
+88718
+88719
+88720
+88721
+88722
+88723
+88724
+88725
+88726
+88727
+88728
+88729
+88730
+88731
+88732
+88733
+88734
+88735
+88736
+88737
+88738
+88739
+88740
+88741
+88742
+88743
+88744
+88745
+88746
+88747
+88748
+88749
+88750
+88751
+88752
+88753
+88754
+88755
+88756
+88757
+88758
+88759
+88760
+88761
+88762
+88763
+88764
+88765
+88766
+88767
+88768
+88769
+88770
+88771
+88772
+88773
+88774
+88775
+88776
+88777
+88778
+88779
+88780
+88781
+88782
+88783
+88784
+88785
+88786
+88787
+88788
+88789
+88790
+88791
+88792
+88793
+88794
+88795
+88796
+88797
+88798
+88799
+88800
+88801
+88802
+88803
+88804
+88805
+88806
+88807
+88808
+88809
+88810
+88811
+88812
+88813
+88814
+88815
+88816
+88817
+88818
+88819
+88820
+88821
+88822
+88823
+88824
+88825
+88826
+88827
+88828
+88829
+88830
+88831
+88832
+88833
+88834
+88835
+88836
+88837
+88838
+88839
+88840
+88841
+88842
+88843
+88844
+88845
+88846
+88847
+88848
+88849
+88850
+88851
+88852
+88853
+88854
+88855
+88856
+88857
+88858
+88859
+88860
+88861
+88862
+88863
+88864
+88865
+88866
+88867
+88868
+88869
+88870
+88871
+88872
+88873
+88874
+88875
+88876
+88877
+88878
+88879
+88880
+88881
+88882
+88883
+88884
+88885
+88886
+88887
+88888
+88889
+88890
+88891
+88892
+88893
+88894
+88895
+88896
+88897
+88898
+88899
+88900
+88901
+88902
+88903
+88904
+88905
+88906
+88907
+88908
+88909
+88910
+88911
+88912
+88913
+88914
+88915
+88916
+88917
+88918
+88919
+88920
+88921
+88922
+88923
+88924
+88925
+88926
+88927
+88928
+88929
+88930
+88931
+88932
+88933
+88934
+88935
+88936
+88937
+88938
+88939
+88940
+88941
+88942
+88943
+88944
+88945
+88946
+88947
+88948
+88949
+88950
+88951
+88952
+88953
+88954
+88955
+88956
+88957
+88958
+88959
+88960
+88961
+88962
+88963
+88964
+88965
+88966
+88967
+88968
+88969
+88970
+88971
+88972
+88973
+88974
+88975
+88976
+88977
+88978
+88979
+88980
+88981
+88982
+88983
+88984
+88985
+88986
+88987
+88988
+88989
+88990
+88991
+88992
+88993
+88994
+88995
+88996
+88997
+88998
+88999
+89000
+89001
+89002
+89003
+89004
+89005
+89006
+89007
+89008
+89009
+89010
+89011
+89012
+89013
+89014
+89015
+89016
+89017
+89018
+89019
+89020
+89021
+89022
+89023
+89024
+89025
+89026
+89027
+89028
+89029
+89030
+89031
+89032
+89033
+89034
+89035
+89036
+89037
+89038
+89039
+89040
+89041
+89042
+89043
+89044
+89045
+89046
+89047
+89048
+89049
+89050
+89051
+89052
+89053
+89054
+89055
+89056
+89057
+89058
+89059
+89060
+89061
+89062
+89063
+89064
+89065
+89066
+89067
+89068
+89069
+89070
+89071
+89072
+89073
+89074
+89075
+89076
+89077
+89078
+89079
+89080
+89081
+89082
+89083
+89084
+89085
+89086
+89087
+89088
+89089
+89090
+89091
+89092
+89093
+89094
+89095
+89096
+89097
+89098
+89099
+89100
+89101
+89102
+89103
+89104
+89105
+89106
+89107
+89108
+89109
+89110
+89111
+89112
+89113
+89114
+89115
+89116
+89117
+89118
+89119
+89120
+89121
+89122
+89123
+89124
+89125
+89126
+89127
+89128
+89129
+89130
+89131
+89132
+89133
+89134
+89135
+89136
+89137
+89138
+89139
+89140
+89141
+89142
+89143
+89144
+89145
+89146
+89147
+89148
+89149
+89150
+89151
+89152
+89153
+89154
+89155
+89156
+89157
+89158
+89159
+89160
+89161
+89162
+89163
+89164
+89165
+89166
+89167
+89168
+89169
+89170
+89171
+89172
+89173
+89174
+89175
+89176
+89177
+89178
+89179
+89180
+89181
+89182
+89183
+89184
+89185
+89186
+89187
+89188
+89189
+89190
+89191
+89192
+89193
+89194
+89195
+89196
+89197
+89198
+89199
+89200
+89201
+89202
+89203
+89204
+89205
+89206
+89207
+89208
+89209
+89210
+89211
+89212
+89213
+89214
+89215
+89216
+89217
+89218
+89219
+89220
+89221
+89222
+89223
+89224
+89225
+89226
+89227
+89228
+89229
+89230
+89231
+89232
+89233
+89234
+89235
+89236
+89237
+89238
+89239
+89240
+89241
+89242
+89243
+89244
+89245
+89246
+89247
+89248
+89249
+89250
+89251
+89252
+89253
+89254
+89255
+89256
+89257
+89258
+89259
+89260
+89261
+89262
+89263
+89264
+89265
+89266
+89267
+89268
+89269
+89270
+89271
+89272
+89273
+89274
+89275
+89276
+89277
+89278
+89279
+89280
+89281
+89282
+89283
+89284
+89285
+89286
+89287
+89288
+89289
+89290
+89291
+89292
+89293
+89294
+89295
+89296
+89297
+89298
+89299
+89300
+89301
+89302
+89303
+89304
+89305
+89306
+89307
+89308
+89309
+89310
+89311
+89312
+89313
+89314
+89315
+89316
+89317
+89318
+89319
+89320
+89321
+89322
+89323
+89324
+89325
+89326
+89327
+89328
+89329
+89330
+89331
+89332
+89333
+89334
+89335
+89336
+89337
+89338
+89339
+89340
+89341
+89342
+89343
+89344
+89345
+89346
+89347
+89348
+89349
+89350
+89351
+89352
+89353
+89354
+89355
+89356
+89357
+89358
+89359
+89360
+89361
+89362
+89363
+89364
+89365
+89366
+89367
+89368
+89369
+89370
+89371
+89372
+89373
+89374
+89375
+89376
+89377
+89378
+89379
+89380
+89381
+89382
+89383
+89384
+89385
+89386
+89387
+89388
+89389
+89390
+89391
+89392
+89393
+89394
+89395
+89396
+89397
+89398
+89399
+89400
+89401
+89402
+89403
+89404
+89405
+89406
+89407
+89408
+89409
+89410
+89411
+89412
+89413
+89414
+89415
+89416
+89417
+89418
+89419
+89420
+89421
+89422
+89423
+89424
+89425
+89426
+89427
+89428
+89429
+89430
+89431
+89432
+89433
+89434
+89435
+89436
+89437
+89438
+89439
+89440
+89441
+89442
+89443
+89444
+89445
+89446
+89447
+89448
+89449
+89450
+89451
+89452
+89453
+89454
+89455
+89456
+89457
+89458
+89459
+89460
+89461
+89462
+89463
+89464
+89465
+89466
+89467
+89468
+89469
+89470
+89471
+89472
+89473
+89474
+89475
+89476
+89477
+89478
+89479
+89480
+89481
+89482
+89483
+89484
+89485
+89486
+89487
+89488
+89489
+89490
+89491
+89492
+89493
+89494
+89495
+89496
+89497
+89498
+89499
+89500
+89501
+89502
+89503
+89504
+89505
+89506
+89507
+89508
+89509
+89510
+89511
+89512
+89513
+89514
+89515
+89516
+89517
+89518
+89519
+89520
+89521
+89522
+89523
+89524
+89525
+89526
+89527
+89528
+89529
+89530
+89531
+89532
+89533
+89534
+89535
+89536
+89537
+89538
+89539
+89540
+89541
+89542
+89543
+89544
+89545
+89546
+89547
+89548
+89549
+89550
+89551
+89552
+89553
+89554
+89555
+89556
+89557
+89558
+89559
+89560
+89561
+89562
+89563
+89564
+89565
+89566
+89567
+89568
+89569
+89570
+89571
+89572
+89573
+89574
+89575
+89576
+89577
+89578
+89579
+89580
+89581
+89582
+89583
+89584
+89585
+89586
+89587
+89588
+89589
+89590
+89591
+89592
+89593
+89594
+89595
+89596
+89597
+89598
+89599
+89600
+89601
+89602
+89603
+89604
+89605
+89606
+89607
+89608
+89609
+89610
+89611
+89612
+89613
+89614
+89615
+89616
+89617
+89618
+89619
+89620
+89621
+89622
+89623
+89624
+89625
+89626
+89627
+89628
+89629
+89630
+89631
+89632
+89633
+89634
+89635
+89636
+89637
+89638
+89639
+89640
+89641
+89642
+89643
+89644
+89645
+89646
+89647
+89648
+89649
+89650
+89651
+89652
+89653
+89654
+89655
+89656
+89657
+89658
+89659
+89660
+89661
+89662
+89663
+89664
+89665
+89666
+89667
+89668
+89669
+89670
+89671
+89672
+89673
+89674
+89675
+89676
+89677
+89678
+89679
+89680
+89681
+89682
+89683
+89684
+89685
+89686
+89687
+89688
+89689
+89690
+89691
+89692
+89693
+89694
+89695
+89696
+89697
+89698
+89699
+89700
+89701
+89702
+89703
+89704
+89705
+89706
+89707
+89708
+89709
+89710
+89711
+89712
+89713
+89714
+89715
+89716
+89717
+89718
+89719
+89720
+89721
+89722
+89723
+89724
+89725
+89726
+89727
+89728
+89729
+89730
+89731
+89732
+89733
+89734
+89735
+89736
+89737
+89738
+89739
+89740
+89741
+89742
+89743
+89744
+89745
+89746
+89747
+89748
+89749
+89750
+89751
+89752
+89753
+89754
+89755
+89756
+89757
+89758
+89759
+89760
+89761
+89762
+89763
+89764
+89765
+89766
+89767
+89768
+89769
+89770
+89771
+89772
+89773
+89774
+89775
+89776
+89777
+89778
+89779
+89780
+89781
+89782
+89783
+89784
+89785
+89786
+89787
+89788
+89789
+89790
+89791
+89792
+89793
+89794
+89795
+89796
+89797
+89798
+89799
+89800
+89801
+89802
+89803
+89804
+89805
+89806
+89807
+89808
+89809
+89810
+89811
+89812
+89813
+89814
+89815
+89816
+89817
+89818
+89819
+89820
+89821
+89822
+89823
+89824
+89825
+89826
+89827
+89828
+89829
+89830
+89831
+89832
+89833
+89834
+89835
+89836
+89837
+89838
+89839
+89840
+89841
+89842
+89843
+89844
+89845
+89846
+89847
+89848
+89849
+89850
+89851
+89852
+89853
+89854
+89855
+89856
+89857
+89858
+89859
+89860
+89861
+89862
+89863
+89864
+89865
+89866
+89867
+89868
+89869
+89870
+89871
+89872
+89873
+89874
+89875
+89876
+89877
+89878
+89879
+89880
+89881
+89882
+89883
+89884
+89885
+89886
+89887
+89888
+89889
+89890
+89891
+89892
+89893
+89894
+89895
+89896
+89897
+89898
+89899
+89900
+89901
+89902
+89903
+89904
+89905
+89906
+89907
+89908
+89909
+89910
+89911
+89912
+89913
+89914
+89915
+89916
+89917
+89918
+89919
+89920
+89921
+89922
+89923
+89924
+89925
+89926
+89927
+89928
+89929
+89930
+89931
+89932
+89933
+89934
+89935
+89936
+89937
+89938
+89939
+89940
+89941
+89942
+89943
+89944
+89945
+89946
+89947
+89948
+89949
+89950
+89951
+89952
+89953
+89954
+89955
+89956
+89957
+89958
+89959
+89960
+89961
+89962
+89963
+89964
+89965
+89966
+89967
+89968
+89969
+89970
+89971
+89972
+89973
+89974
+89975
+89976
+89977
+89978
+89979
+89980
+89981
+89982
+89983
+89984
+89985
+89986
+89987
+89988
+89989
+89990
+89991
+89992
+89993
+89994
+89995
+89996
+89997
+89998
+89999
+90000
+90001
+90002
+90003
+90004
+90005
+90006
+90007
+90008
+90009
+90010
+90011
+90012
+90013
+90014
+90015
+90016
+90017
+90018
+90019
+90020
+90021
+90022
+90023
+90024
+90025
+90026
+90027
+90028
+90029
+90030
+90031
+90032
+90033
+90034
+90035
+90036
+90037
+90038
+90039
+90040
+90041
+90042
+90043
+90044
+90045
+90046
+90047
+90048
+90049
+90050
+90051
+90052
+90053
+90054
+90055
+90056
+90057
+90058
+90059
+90060
+90061
+90062
+90063
+90064
+90065
+90066
+90067
+90068
+90069
+90070
+90071
+90072
+90073
+90074
+90075
+90076
+90077
+90078
+90079
+90080
+90081
+90082
+90083
+90084
+90085
+90086
+90087
+90088
+90089
+90090
+90091
+90092
+90093
+90094
+90095
+90096
+90097
+90098
+90099
+90100
+90101
+90102
+90103
+90104
+90105
+90106
+90107
+90108
+90109
+90110
+90111
+90112
+90113
+90114
+90115
+90116
+90117
+90118
+90119
+90120
+90121
+90122
+90123
+90124
+90125
+90126
+90127
+90128
+90129
+90130
+90131
+90132
+90133
+90134
+90135
+90136
+90137
+90138
+90139
+90140
+90141
+90142
+90143
+90144
+90145
+90146
+90147
+90148
+90149
+90150
+90151
+90152
+90153
+90154
+90155
+90156
+90157
+90158
+90159
+90160
+90161
+90162
+90163
+90164
+90165
+90166
+90167
+90168
+90169
+90170
+90171
+90172
+90173
+90174
+90175
+90176
+90177
+90178
+90179
+90180
+90181
+90182
+90183
+90184
+90185
+90186
+90187
+90188
+90189
+90190
+90191
+90192
+90193
+90194
+90195
+90196
+90197
+90198
+90199
+90200
+90201
+90202
+90203
+90204
+90205
+90206
+90207
+90208
+90209
+90210
+90211
+90212
+90213
+90214
+90215
+90216
+90217
+90218
+90219
+90220
+90221
+90222
+90223
+90224
+90225
+90226
+90227
+90228
+90229
+90230
+90231
+90232
+90233
+90234
+90235
+90236
+90237
+90238
+90239
+90240
+90241
+90242
+90243
+90244
+90245
+90246
+90247
+90248
+90249
+90250
+90251
+90252
+90253
+90254
+90255
+90256
+90257
+90258
+90259
+90260
+90261
+90262
+90263
+90264
+90265
+90266
+90267
+90268
+90269
+90270
+90271
+90272
+90273
+90274
+90275
+90276
+90277
+90278
+90279
+90280
+90281
+90282
+90283
+90284
+90285
+90286
+90287
+90288
+90289
+90290
+90291
+90292
+90293
+90294
+90295
+90296
+90297
+90298
+90299
+90300
+90301
+90302
+90303
+90304
+90305
+90306
+90307
+90308
+90309
+90310
+90311
+90312
+90313
+90314
+90315
+90316
+90317
+90318
+90319
+90320
+90321
+90322
+90323
+90324
+90325
+90326
+90327
+90328
+90329
+90330
+90331
+90332
+90333
+90334
+90335
+90336
+90337
+90338
+90339
+90340
+90341
+90342
+90343
+90344
+90345
+90346
+90347
+90348
+90349
+90350
+90351
+90352
+90353
+90354
+90355
+90356
+90357
+90358
+90359
+90360
+90361
+90362
+90363
+90364
+90365
+90366
+90367
+90368
+90369
+90370
+90371
+90372
+90373
+90374
+90375
+90376
+90377
+90378
+90379
+90380
+90381
+90382
+90383
+90384
+90385
+90386
+90387
+90388
+90389
+90390
+90391
+90392
+90393
+90394
+90395
+90396
+90397
+90398
+90399
+90400
+90401
+90402
+90403
+90404
+90405
+90406
+90407
+90408
+90409
+90410
+90411
+90412
+90413
+90414
+90415
+90416
+90417
+90418
+90419
+90420
+90421
+90422
+90423
+90424
+90425
+90426
+90427
+90428
+90429
+90430
+90431
+90432
+90433
+90434
+90435
+90436
+90437
+90438
+90439
+90440
+90441
+90442
+90443
+90444
+90445
+90446
+90447
+90448
+90449
+90450
+90451
+90452
+90453
+90454
+90455
+90456
+90457
+90458
+90459
+90460
+90461
+90462
+90463
+90464
+90465
+90466
+90467
+90468
+90469
+90470
+90471
+90472
+90473
+90474
+90475
+90476
+90477
+90478
+90479
+90480
+90481
+90482
+90483
+90484
+90485
+90486
+90487
+90488
+90489
+90490
+90491
+90492
+90493
+90494
+90495
+90496
+90497
+90498
+90499
+90500
+90501
+90502
+90503
+90504
+90505
+90506
+90507
+90508
+90509
+90510
+90511
+90512
+90513
+90514
+90515
+90516
+90517
+90518
+90519
+90520
+90521
+90522
+90523
+90524
+90525
+90526
+90527
+90528
+90529
+90530
+90531
+90532
+90533
+90534
+90535
+90536
+90537
+90538
+90539
+90540
+90541
+90542
+90543
+90544
+90545
+90546
+90547
+90548
+90549
+90550
+90551
+90552
+90553
+90554
+90555
+90556
+90557
+90558
+90559
+90560
+90561
+90562
+90563
+90564
+90565
+90566
+90567
+90568
+90569
+90570
+90571
+90572
+90573
+90574
+90575
+90576
+90577
+90578
+90579
+90580
+90581
+90582
+90583
+90584
+90585
+90586
+90587
+90588
+90589
+90590
+90591
+90592
+90593
+90594
+90595
+90596
+90597
+90598
+90599
+90600
+90601
+90602
+90603
+90604
+90605
+90606
+90607
+90608
+90609
+90610
+90611
+90612
+90613
+90614
+90615
+90616
+90617
+90618
+90619
+90620
+90621
+90622
+90623
+90624
+90625
+90626
+90627
+90628
+90629
+90630
+90631
+90632
+90633
+90634
+90635
+90636
+90637
+90638
+90639
+90640
+90641
+90642
+90643
+90644
+90645
+90646
+90647
+90648
+90649
+90650
+90651
+90652
+90653
+90654
+90655
+90656
+90657
+90658
+90659
+90660
+90661
+90662
+90663
+90664
+90665
+90666
+90667
+90668
+90669
+90670
+90671
+90672
+90673
+90674
+90675
+90676
+90677
+90678
+90679
+90680
+90681
+90682
+90683
+90684
+90685
+90686
+90687
+90688
+90689
+90690
+90691
+90692
+90693
+90694
+90695
+90696
+90697
+90698
+90699
+90700
+90701
+90702
+90703
+90704
+90705
+90706
+90707
+90708
+90709
+90710
+90711
+90712
+90713
+90714
+90715
+90716
+90717
+90718
+90719
+90720
+90721
+90722
+90723
+90724
+90725
+90726
+90727
+90728
+90729
+90730
+90731
+90732
+90733
+90734
+90735
+90736
+90737
+90738
+90739
+90740
+90741
+90742
+90743
+90744
+90745
+90746
+90747
+90748
+90749
+90750
+90751
+90752
+90753
+90754
+90755
+90756
+90757
+90758
+90759
+90760
+90761
+90762
+90763
+90764
+90765
+90766
+90767
+90768
+90769
+90770
+90771
+90772
+90773
+90774
+90775
+90776
+90777
+90778
+90779
+90780
+90781
+90782
+90783
+90784
+90785
+90786
+90787
+90788
+90789
+90790
+90791
+90792
+90793
+90794
+90795
+90796
+90797
+90798
+90799
+90800
+90801
+90802
+90803
+90804
+90805
+90806
+90807
+90808
+90809
+90810
+90811
+90812
+90813
+90814
+90815
+90816
+90817
+90818
+90819
+90820
+90821
+90822
+90823
+90824
+90825
+90826
+90827
+90828
+90829
+90830
+90831
+90832
+90833
+90834
+90835
+90836
+90837
+90838
+90839
+90840
+90841
+90842
+90843
+90844
+90845
+90846
+90847
+90848
+90849
+90850
+90851
+90852
+90853
+90854
+90855
+90856
+90857
+90858
+90859
+90860
+90861
+90862
+90863
+90864
+90865
+90866
+90867
+90868
+90869
+90870
+90871
+90872
+90873
+90874
+90875
+90876
+90877
+90878
+90879
+90880
+90881
+90882
+90883
+90884
+90885
+90886
+90887
+90888
+90889
+90890
+90891
+90892
+90893
+90894
+90895
+90896
+90897
+90898
+90899
+90900
+90901
+90902
+90903
+90904
+90905
+90906
+90907
+90908
+90909
+90910
+90911
+90912
+90913
+90914
+90915
+90916
+90917
+90918
+90919
+90920
+90921
+90922
+90923
+90924
+90925
+90926
+90927
+90928
+90929
+90930
+90931
+90932
+90933
+90934
+90935
+90936
+90937
+90938
+90939
+90940
+90941
+90942
+90943
+90944
+90945
+90946
+90947
+90948
+90949
+90950
+90951
+90952
+90953
+90954
+90955
+90956
+90957
+90958
+90959
+90960
+90961
+90962
+90963
+90964
+90965
+90966
+90967
+90968
+90969
+90970
+90971
+90972
+90973
+90974
+90975
+90976
+90977
+90978
+90979
+90980
+90981
+90982
+90983
+90984
+90985
+90986
+90987
+90988
+90989
+90990
+90991
+90992
+90993
+90994
+90995
+90996
+90997
+90998
+90999
+91000
+91001
+91002
+91003
+91004
+91005
+91006
+91007
+91008
+91009
+91010
+91011
+91012
+91013
+91014
+91015
+91016
+91017
+91018
+91019
+91020
+91021
+91022
+91023
+91024
+91025
+91026
+91027
+91028
+91029
+91030
+91031
+91032
+91033
+91034
+91035
+91036
+91037
+91038
+91039
+91040
+91041
+91042
+91043
+91044
+91045
+91046
+91047
+91048
+91049
+91050
+91051
+91052
+91053
+91054
+91055
+91056
+91057
+91058
+91059
+91060
+91061
+91062
+91063
+91064
+91065
+91066
+91067
+91068
+91069
+91070
+91071
+91072
+91073
+91074
+91075
+91076
+91077
+91078
+91079
+91080
+91081
+91082
+91083
+91084
+91085
+91086
+91087
+91088
+91089
+91090
+91091
+91092
+91093
+91094
+91095
+91096
+91097
+91098
+91099
+91100
+91101
+91102
+91103
+91104
+91105
+91106
+91107
+91108
+91109
+91110
+91111
+91112
+91113
+91114
+91115
+91116
+91117
+91118
+91119
+91120
+91121
+91122
+91123
+91124
+91125
+91126
+91127
+91128
+91129
+91130
+91131
+91132
+91133
+91134
+91135
+91136
+91137
+91138
+91139
+91140
+91141
+91142
+91143
+91144
+91145
+91146
+91147
+91148
+91149
+91150
+91151
+91152
+91153
+91154
+91155
+91156
+91157
+91158
+91159
+91160
+91161
+91162
+91163
+91164
+91165
+91166
+91167
+91168
+91169
+91170
+91171
+91172
+91173
+91174
+91175
+91176
+91177
+91178
+91179
+91180
+91181
+91182
+91183
+91184
+91185
+91186
+91187
+91188
+91189
+91190
+91191
+91192
+91193
+91194
+91195
+91196
+91197
+91198
+91199
+91200
+91201
+91202
+91203
+91204
+91205
+91206
+91207
+91208
+91209
+91210
+91211
+91212
+91213
+91214
+91215
+91216
+91217
+91218
+91219
+91220
+91221
+91222
+91223
+91224
+91225
+91226
+91227
+91228
+91229
+91230
+91231
+91232
+91233
+91234
+91235
+91236
+91237
+91238
+91239
+91240
+91241
+91242
+91243
+91244
+91245
+91246
+91247
+91248
+91249
+91250
+91251
+91252
+91253
+91254
+91255
+91256
+91257
+91258
+91259
+91260
+91261
+91262
+91263
+91264
+91265
+91266
+91267
+91268
+91269
+91270
+91271
+91272
+91273
+91274
+91275
+91276
+91277
+91278
+91279
+91280
+91281
+91282
+91283
+91284
+91285
+91286
+91287
+91288
+91289
+91290
+91291
+91292
+91293
+91294
+91295
+91296
+91297
+91298
+91299
+91300
+91301
+91302
+91303
+91304
+91305
+91306
+91307
+91308
+91309
+91310
+91311
+91312
+91313
+91314
+91315
+91316
+91317
+91318
+91319
+91320
+91321
+91322
+91323
+91324
+91325
+91326
+91327
+91328
+91329
+91330
+91331
+91332
+91333
+91334
+91335
+91336
+91337
+91338
+91339
+91340
+91341
+91342
+91343
+91344
+91345
+91346
+91347
+91348
+91349
+91350
+91351
+91352
+91353
+91354
+91355
+91356
+91357
+91358
+91359
+91360
+91361
+91362
+91363
+91364
+91365
+91366
+91367
+91368
+91369
+91370
+91371
+91372
+91373
+91374
+91375
+91376
+91377
+91378
+91379
+91380
+91381
+91382
+91383
+91384
+91385
+91386
+91387
+91388
+91389
+91390
+91391
+91392
+91393
+91394
+91395
+91396
+91397
+91398
+91399
+91400
+91401
+91402
+91403
+91404
+91405
+91406
+91407
+91408
+91409
+91410
+91411
+91412
+91413
+91414
+91415
+91416
+91417
+91418
+91419
+91420
+91421
+91422
+91423
+91424
+91425
+91426
+91427
+91428
+91429
+91430
+91431
+91432
+91433
+91434
+91435
+91436
+91437
+91438
+91439
+91440
+91441
+91442
+91443
+91444
+91445
+91446
+91447
+91448
+91449
+91450
+91451
+91452
+91453
+91454
+91455
+91456
+91457
+91458
+91459
+91460
+91461
+91462
+91463
+91464
+91465
+91466
+91467
+91468
+91469
+91470
+91471
+91472
+91473
+91474
+91475
+91476
+91477
+91478
+91479
+91480
+91481
+91482
+91483
+91484
+91485
+91486
+91487
+91488
+91489
+91490
+91491
+91492
+91493
+91494
+91495
+91496
+91497
+91498
+91499
+91500
+91501
+91502
+91503
+91504
+91505
+91506
+91507
+91508
+91509
+91510
+91511
+91512
+91513
+91514
+91515
+91516
+91517
+91518
+91519
+91520
+91521
+91522
+91523
+91524
+91525
+91526
+91527
+91528
+91529
+91530
+91531
+91532
+91533
+91534
+91535
+91536
+91537
+91538
+91539
+91540
+91541
+91542
+91543
+91544
+91545
+91546
+91547
+91548
+91549
+91550
+91551
+91552
+91553
+91554
+91555
+91556
+91557
+91558
+91559
+91560
+91561
+91562
+91563
+91564
+91565
+91566
+91567
+91568
+91569
+91570
+91571
+91572
+91573
+91574
+91575
+91576
+91577
+91578
+91579
+91580
+91581
+91582
+91583
+91584
+91585
+91586
+91587
+91588
+91589
+91590
+91591
+91592
+91593
+91594
+91595
+91596
+91597
+91598
+91599
+91600
+91601
+91602
+91603
+91604
+91605
+91606
+91607
+91608
+91609
+91610
+91611
+91612
+91613
+91614
+91615
+91616
+91617
+91618
+91619
+91620
+91621
+91622
+91623
+91624
+91625
+91626
+91627
+91628
+91629
+91630
+91631
+91632
+91633
+91634
+91635
+91636
+91637
+91638
+91639
+91640
+91641
+91642
+91643
+91644
+91645
+91646
+91647
+91648
+91649
+91650
+91651
+91652
+91653
+91654
+91655
+91656
+91657
+91658
+91659
+91660
+91661
+91662
+91663
+91664
+91665
+91666
+91667
+91668
+91669
+91670
+91671
+91672
+91673
+91674
+91675
+91676
+91677
+91678
+91679
+91680
+91681
+91682
+91683
+91684
+91685
+91686
+91687
+91688
+91689
+91690
+91691
+91692
+91693
+91694
+91695
+91696
+91697
+91698
+91699
+91700
+91701
+91702
+91703
+91704
+91705
+91706
+91707
+91708
+91709
+91710
+91711
+91712
+91713
+91714
+91715
+91716
+91717
+91718
+91719
+91720
+91721
+91722
+91723
+91724
+91725
+91726
+91727
+91728
+91729
+91730
+91731
+91732
+91733
+91734
+91735
+91736
+91737
+91738
+91739
+91740
+91741
+91742
+91743
+91744
+91745
+91746
+91747
+91748
+91749
+91750
+91751
+91752
+91753
+91754
+91755
+91756
+91757
+91758
+91759
+91760
+91761
+91762
+91763
+91764
+91765
+91766
+91767
+91768
+91769
+91770
+91771
+91772
+91773
+91774
+91775
+91776
+91777
+91778
+91779
+91780
+91781
+91782
+91783
+91784
+91785
+91786
+91787
+91788
+91789
+91790
+91791
+91792
+91793
+91794
+91795
+91796
+91797
+91798
+91799
+91800
+91801
+91802
+91803
+91804
+91805
+91806
+91807
+91808
+91809
+91810
+91811
+91812
+91813
+91814
+91815
+91816
+91817
+91818
+91819
+91820
+91821
+91822
+91823
+91824
+91825
+91826
+91827
+91828
+91829
+91830
+91831
+91832
+91833
+91834
+91835
+91836
+91837
+91838
+91839
+91840
+91841
+91842
+91843
+91844
+91845
+91846
+91847
+91848
+91849
+91850
+91851
+91852
+91853
+91854
+91855
+91856
+91857
+91858
+91859
+91860
+91861
+91862
+91863
+91864
+91865
+91866
+91867
+91868
+91869
+91870
+91871
+91872
+91873
+91874
+91875
+91876
+91877
+91878
+91879
+91880
+91881
+91882
+91883
+91884
+91885
+91886
+91887
+91888
+91889
+91890
+91891
+91892
+91893
+91894
+91895
+91896
+91897
+91898
+91899
+91900
+91901
+91902
+91903
+91904
+91905
+91906
+91907
+91908
+91909
+91910
+91911
+91912
+91913
+91914
+91915
+91916
+91917
+91918
+91919
+91920
+91921
+91922
+91923
+91924
+91925
+91926
+91927
+91928
+91929
+91930
+91931
+91932
+91933
+91934
+91935
+91936
+91937
+91938
+91939
+91940
+91941
+91942
+91943
+91944
+91945
+91946
+91947
+91948
+91949
+91950
+91951
+91952
+91953
+91954
+91955
+91956
+91957
+91958
+91959
+91960
+91961
+91962
+91963
+91964
+91965
+91966
+91967
+91968
+91969
+91970
+91971
+91972
+91973
+91974
+91975
+91976
+91977
+91978
+91979
+91980
+91981
+91982
+91983
+91984
+91985
+91986
+91987
+91988
+91989
+91990
+91991
+91992
+91993
+91994
+91995
+91996
+91997
+91998
+91999
+92000
+92001
+92002
+92003
+92004
+92005
+92006
+92007
+92008
+92009
+92010
+92011
+92012
+92013
+92014
+92015
+92016
+92017
+92018
+92019
+92020
+92021
+92022
+92023
+92024
+92025
+92026
+92027
+92028
+92029
+92030
+92031
+92032
+92033
+92034
+92035
+92036
+92037
+92038
+92039
+92040
+92041
+92042
+92043
+92044
+92045
+92046
+92047
+92048
+92049
+92050
+92051
+92052
+92053
+92054
+92055
+92056
+92057
+92058
+92059
+92060
+92061
+92062
+92063
+92064
+92065
+92066
+92067
+92068
+92069
+92070
+92071
+92072
+92073
+92074
+92075
+92076
+92077
+92078
+92079
+92080
+92081
+92082
+92083
+92084
+92085
+92086
+92087
+92088
+92089
+92090
+92091
+92092
+92093
+92094
+92095
+92096
+92097
+92098
+92099
+92100
+92101
+92102
+92103
+92104
+92105
+92106
+92107
+92108
+92109
+92110
+92111
+92112
+92113
+92114
+92115
+92116
+92117
+92118
+92119
+92120
+92121
+92122
+92123
+92124
+92125
+92126
+92127
+92128
+92129
+92130
+92131
+92132
+92133
+92134
+92135
+92136
+92137
+92138
+92139
+92140
+92141
+92142
+92143
+92144
+92145
+92146
+92147
+92148
+92149
+92150
+92151
+92152
+92153
+92154
+92155
+92156
+92157
+92158
+92159
+92160
+92161
+92162
+92163
+92164
+92165
+92166
+92167
+92168
+92169
+92170
+92171
+92172
+92173
+92174
+92175
+92176
+92177
+92178
+92179
+92180
+92181
+92182
+92183
+92184
+92185
+92186
+92187
+92188
+92189
+92190
+92191
+92192
+92193
+92194
+92195
+92196
+92197
+92198
+92199
+92200
+92201
+92202
+92203
+92204
+92205
+92206
+92207
+92208
+92209
+92210
+92211
+92212
+92213
+92214
+92215
+92216
+92217
+92218
+92219
+92220
+92221
+92222
+92223
+92224
+92225
+92226
+92227
+92228
+92229
+92230
+92231
+92232
+92233
+92234
+92235
+92236
+92237
+92238
+92239
+92240
+92241
+92242
+92243
+92244
+92245
+92246
+92247
+92248
+92249
+92250
+92251
+92252
+92253
+92254
+92255
+92256
+92257
+92258
+92259
+92260
+92261
+92262
+92263
+92264
+92265
+92266
+92267
+92268
+92269
+92270
+92271
+92272
+92273
+92274
+92275
+92276
+92277
+92278
+92279
+92280
+92281
+92282
+92283
+92284
+92285
+92286
+92287
+92288
+92289
+92290
+92291
+92292
+92293
+92294
+92295
+92296
+92297
+92298
+92299
+92300
+92301
+92302
+92303
+92304
+92305
+92306
+92307
+92308
+92309
+92310
+92311
+92312
+92313
+92314
+92315
+92316
+92317
+92318
+92319
+92320
+92321
+92322
+92323
+92324
+92325
+92326
+92327
+92328
+92329
+92330
+92331
+92332
+92333
+92334
+92335
+92336
+92337
+92338
+92339
+92340
+92341
+92342
+92343
+92344
+92345
+92346
+92347
+92348
+92349
+92350
+92351
+92352
+92353
+92354
+92355
+92356
+92357
+92358
+92359
+92360
+92361
+92362
+92363
+92364
+92365
+92366
+92367
+92368
+92369
+92370
+92371
+92372
+92373
+92374
+92375
+92376
+92377
+92378
+92379
+92380
+92381
+92382
+92383
+92384
+92385
+92386
+92387
+92388
+92389
+92390
+92391
+92392
+92393
+92394
+92395
+92396
+92397
+92398
+92399
+92400
+92401
+92402
+92403
+92404
+92405
+92406
+92407
+92408
+92409
+92410
+92411
+92412
+92413
+92414
+92415
+92416
+92417
+92418
+92419
+92420
+92421
+92422
+92423
+92424
+92425
+92426
+92427
+92428
+92429
+92430
+92431
+92432
+92433
+92434
+92435
+92436
+92437
+92438
+92439
+92440
+92441
+92442
+92443
+92444
+92445
+92446
+92447
+92448
+92449
+92450
+92451
+92452
+92453
+92454
+92455
+92456
+92457
+92458
+92459
+92460
+92461
+92462
+92463
+92464
+92465
+92466
+92467
+92468
+92469
+92470
+92471
+92472
+92473
+92474
+92475
+92476
+92477
+92478
+92479
+92480
+92481
+92482
+92483
+92484
+92485
+92486
+92487
+92488
+92489
+92490
+92491
+92492
+92493
+92494
+92495
+92496
+92497
+92498
+92499
+92500
+92501
+92502
+92503
+92504
+92505
+92506
+92507
+92508
+92509
+92510
+92511
+92512
+92513
+92514
+92515
+92516
+92517
+92518
+92519
+92520
+92521
+92522
+92523
+92524
+92525
+92526
+92527
+92528
+92529
+92530
+92531
+92532
+92533
+92534
+92535
+92536
+92537
+92538
+92539
+92540
+92541
+92542
+92543
+92544
+92545
+92546
+92547
+92548
+92549
+92550
+92551
+92552
+92553
+92554
+92555
+92556
+92557
+92558
+92559
+92560
+92561
+92562
+92563
+92564
+92565
+92566
+92567
+92568
+92569
+92570
+92571
+92572
+92573
+92574
+92575
+92576
+92577
+92578
+92579
+92580
+92581
+92582
+92583
+92584
+92585
+92586
+92587
+92588
+92589
+92590
+92591
+92592
+92593
+92594
+92595
+92596
+92597
+92598
+92599
+92600
+92601
+92602
+92603
+92604
+92605
+92606
+92607
+92608
+92609
+92610
+92611
+92612
+92613
+92614
+92615
+92616
+92617
+92618
+92619
+92620
+92621
+92622
+92623
+92624
+92625
+92626
+92627
+92628
+92629
+92630
+92631
+92632
+92633
+92634
+92635
+92636
+92637
+92638
+92639
+92640
+92641
+92642
+92643
+92644
+92645
+92646
+92647
+92648
+92649
+92650
+92651
+92652
+92653
+92654
+92655
+92656
+92657
+92658
+92659
+92660
+92661
+92662
+92663
+92664
+92665
+92666
+92667
+92668
+92669
+92670
+92671
+92672
+92673
+92674
+92675
+92676
+92677
+92678
+92679
+92680
+92681
+92682
+92683
+92684
+92685
+92686
+92687
+92688
+92689
+92690
+92691
+92692
+92693
+92694
+92695
+92696
+92697
+92698
+92699
+92700
+92701
+92702
+92703
+92704
+92705
+92706
+92707
+92708
+92709
+92710
+92711
+92712
+92713
+92714
+92715
+92716
+92717
+92718
+92719
+92720
+92721
+92722
+92723
+92724
+92725
+92726
+92727
+92728
+92729
+92730
+92731
+92732
+92733
+92734
+92735
+92736
+92737
+92738
+92739
+92740
+92741
+92742
+92743
+92744
+92745
+92746
+92747
+92748
+92749
+92750
+92751
+92752
+92753
+92754
+92755
+92756
+92757
+92758
+92759
+92760
+92761
+92762
+92763
+92764
+92765
+92766
+92767
+92768
+92769
+92770
+92771
+92772
+92773
+92774
+92775
+92776
+92777
+92778
+92779
+92780
+92781
+92782
+92783
+92784
+92785
+92786
+92787
+92788
+92789
+92790
+92791
+92792
+92793
+92794
+92795
+92796
+92797
+92798
+92799
+92800
+92801
+92802
+92803
+92804
+92805
+92806
+92807
+92808
+92809
+92810
+92811
+92812
+92813
+92814
+92815
+92816
+92817
+92818
+92819
+92820
+92821
+92822
+92823
+92824
+92825
+92826
+92827
+92828
+92829
+92830
+92831
+92832
+92833
+92834
+92835
+92836
+92837
+92838
+92839
+92840
+92841
+92842
+92843
+92844
+92845
+92846
+92847
+92848
+92849
+92850
+92851
+92852
+92853
+92854
+92855
+92856
+92857
+92858
+92859
+92860
+92861
+92862
+92863
+92864
+92865
+92866
+92867
+92868
+92869
+92870
+92871
+92872
+92873
+92874
+92875
+92876
+92877
+92878
+92879
+92880
+92881
+92882
+92883
+92884
+92885
+92886
+92887
+92888
+92889
+92890
+92891
+92892
+92893
+92894
+92895
+92896
+92897
+92898
+92899
+92900
+92901
+92902
+92903
+92904
+92905
+92906
+92907
+92908
+92909
+92910
+92911
+92912
+92913
+92914
+92915
+92916
+92917
+92918
+92919
+92920
+92921
+92922
+92923
+92924
+92925
+92926
+92927
+92928
+92929
+92930
+92931
+92932
+92933
+92934
+92935
+92936
+92937
+92938
+92939
+92940
+92941
+92942
+92943
+92944
+92945
+92946
+92947
+92948
+92949
+92950
+92951
+92952
+92953
+92954
+92955
+92956
+92957
+92958
+92959
+92960
+92961
+92962
+92963
+92964
+92965
+92966
+92967
+92968
+92969
+92970
+92971
+92972
+92973
+92974
+92975
+92976
+92977
+92978
+92979
+92980
+92981
+92982
+92983
+92984
+92985
+92986
+92987
+92988
+92989
+92990
+92991
+92992
+92993
+92994
+92995
+92996
+92997
+92998
+92999
+93000
+93001
+93002
+93003
+93004
+93005
+93006
+93007
+93008
+93009
+93010
+93011
+93012
+93013
+93014
+93015
+93016
+93017
+93018
+93019
+93020
+93021
+93022
+93023
+93024
+93025
+93026
+93027
+93028
+93029
+93030
+93031
+93032
+93033
+93034
+93035
+93036
+93037
+93038
+93039
+93040
+93041
+93042
+93043
+93044
+93045
+93046
+93047
+93048
+93049
+93050
+93051
+93052
+93053
+93054
+93055
+93056
+93057
+93058
+93059
+93060
+93061
+93062
+93063
+93064
+93065
+93066
+93067
+93068
+93069
+93070
+93071
+93072
+93073
+93074
+93075
+93076
+93077
+93078
+93079
+93080
+93081
+93082
+93083
+93084
+93085
+93086
+93087
+93088
+93089
+93090
+93091
+93092
+93093
+93094
+93095
+93096
+93097
+93098
+93099
+93100
+93101
+93102
+93103
+93104
+93105
+93106
+93107
+93108
+93109
+93110
+93111
+93112
+93113
+93114
+93115
+93116
+93117
+93118
+93119
+93120
+93121
+93122
+93123
+93124
+93125
+93126
+93127
+93128
+93129
+93130
+93131
+93132
+93133
+93134
+93135
+93136
+93137
+93138
+93139
+93140
+93141
+93142
+93143
+93144
+93145
+93146
+93147
+93148
+93149
+93150
+93151
+93152
+93153
+93154
+93155
+93156
+93157
+93158
+93159
+93160
+93161
+93162
+93163
+93164
+93165
+93166
+93167
+93168
+93169
+93170
+93171
+93172
+93173
+93174
+93175
+93176
+93177
+93178
+93179
+93180
+93181
+93182
+93183
+93184
+93185
+93186
+93187
+93188
+93189
+93190
+93191
+93192
+93193
+93194
+93195
+93196
+93197
+93198
+93199
+93200
+93201
+93202
+93203
+93204
+93205
+93206
+93207
+93208
+93209
+93210
+93211
+93212
+93213
+93214
+93215
+93216
+93217
+93218
+93219
+93220
+93221
+93222
+93223
+93224
+93225
+93226
+93227
+93228
+93229
+93230
+93231
+93232
+93233
+93234
+93235
+93236
+93237
+93238
+93239
+93240
+93241
+93242
+93243
+93244
+93245
+93246
+93247
+93248
+93249
+93250
+93251
+93252
+93253
+93254
+93255
+93256
+93257
+93258
+93259
+93260
+93261
+93262
+93263
+93264
+93265
+93266
+93267
+93268
+93269
+93270
+93271
+93272
+93273
+93274
+93275
+93276
+93277
+93278
+93279
+93280
+93281
+93282
+93283
+93284
+93285
+93286
+93287
+93288
+93289
+93290
+93291
+93292
+93293
+93294
+93295
+93296
+93297
+93298
+93299
+93300
+93301
+93302
+93303
+93304
+93305
+93306
+93307
+93308
+93309
+93310
+93311
+93312
+93313
+93314
+93315
+93316
+93317
+93318
+93319
+93320
+93321
+93322
+93323
+93324
+93325
+93326
+93327
+93328
+93329
+93330
+93331
+93332
+93333
+93334
+93335
+93336
+93337
+93338
+93339
+93340
+93341
+93342
+93343
+93344
+93345
+93346
+93347
+93348
+93349
+93350
+93351
+93352
+93353
+93354
+93355
+93356
+93357
+93358
+93359
+93360
+93361
+93362
+93363
+93364
+93365
+93366
+93367
+93368
+93369
+93370
+93371
+93372
+93373
+93374
+93375
+93376
+93377
+93378
+93379
+93380
+93381
+93382
+93383
+93384
+93385
+93386
+93387
+93388
+93389
+93390
+93391
+93392
+93393
+93394
+93395
+93396
+93397
+93398
+93399
+93400
+93401
+93402
+93403
+93404
+93405
+93406
+93407
+93408
+93409
+93410
+93411
+93412
+93413
+93414
+93415
+93416
+93417
+93418
+93419
+93420
+93421
+93422
+93423
+93424
+93425
+93426
+93427
+93428
+93429
+93430
+93431
+93432
+93433
+93434
+93435
+93436
+93437
+93438
+93439
+93440
+93441
+93442
+93443
+93444
+93445
+93446
+93447
+93448
+93449
+93450
+93451
+93452
+93453
+93454
+93455
+93456
+93457
+93458
+93459
+93460
+93461
+93462
+93463
+93464
+93465
+93466
+93467
+93468
+93469
+93470
+93471
+93472
+93473
+93474
+93475
+93476
+93477
+93478
+93479
+93480
+93481
+93482
+93483
+93484
+93485
+93486
+93487
+93488
+93489
+93490
+93491
+93492
+93493
+93494
+93495
+93496
+93497
+93498
+93499
+93500
+93501
+93502
+93503
+93504
+93505
+93506
+93507
+93508
+93509
+93510
+93511
+93512
+93513
+93514
+93515
+93516
+93517
+93518
+93519
+93520
+93521
+93522
+93523
+93524
+93525
+93526
+93527
+93528
+93529
+93530
+93531
+93532
+93533
+93534
+93535
+93536
+93537
+93538
+93539
+93540
+93541
+93542
+93543
+93544
+93545
+93546
+93547
+93548
+93549
+93550
+93551
+93552
+93553
+93554
+93555
+93556
+93557
+93558
+93559
+93560
+93561
+93562
+93563
+93564
+93565
+93566
+93567
+93568
+93569
+93570
+93571
+93572
+93573
+93574
+93575
+93576
+93577
+93578
+93579
+93580
+93581
+93582
+93583
+93584
+93585
+93586
+93587
+93588
+93589
+93590
+93591
+93592
+93593
+93594
+93595
+93596
+93597
+93598
+93599
+93600
+93601
+93602
+93603
+93604
+93605
+93606
+93607
+93608
+93609
+93610
+93611
+93612
+93613
+93614
+93615
+93616
+93617
+93618
+93619
+93620
+93621
+93622
+93623
+93624
+93625
+93626
+93627
+93628
+93629
+93630
+93631
+93632
+93633
+93634
+93635
+93636
+93637
+93638
+93639
+93640
+93641
+93642
+93643
+93644
+93645
+93646
+93647
+93648
+93649
+93650
+93651
+93652
+93653
+93654
+93655
+93656
+93657
+93658
+93659
+93660
+93661
+93662
+93663
+93664
+93665
+93666
+93667
+93668
+93669
+93670
+93671
+93672
+93673
+93674
+93675
+93676
+93677
+93678
+93679
+93680
+93681
+93682
+93683
+93684
+93685
+93686
+93687
+93688
+93689
+93690
+93691
+93692
+93693
+93694
+93695
+93696
+93697
+93698
+93699
+93700
+93701
+93702
+93703
+93704
+93705
+93706
+93707
+93708
+93709
+93710
+93711
+93712
+93713
+93714
+93715
+93716
+93717
+93718
+93719
+93720
+93721
+93722
+93723
+93724
+93725
+93726
+93727
+93728
+93729
+93730
+93731
+93732
+93733
+93734
+93735
+93736
+93737
+93738
+93739
+93740
+93741
+93742
+93743
+93744
+93745
+93746
+93747
+93748
+93749
+93750
+93751
+93752
+93753
+93754
+93755
+93756
+93757
+93758
+93759
+93760
+93761
+93762
+93763
+93764
+93765
+93766
+93767
+93768
+93769
+93770
+93771
+93772
+93773
+93774
+93775
+93776
+93777
+93778
+93779
+93780
+93781
+93782
+93783
+93784
+93785
+93786
+93787
+93788
+93789
+93790
+93791
+93792
+93793
+93794
+93795
+93796
+93797
+93798
+93799
+93800
+93801
+93802
+93803
+93804
+93805
+93806
+93807
+93808
+93809
+93810
+93811
+93812
+93813
+93814
+93815
+93816
+93817
+93818
+93819
+93820
+93821
+93822
+93823
+93824
+93825
+93826
+93827
+93828
+93829
+93830
+93831
+93832
+93833
+93834
+93835
+93836
+93837
+93838
+93839
+93840
+93841
+93842
+93843
+93844
+93845
+93846
+93847
+93848
+93849
+93850
+93851
+93852
+93853
+93854
+93855
+93856
+93857
+93858
+93859
+93860
+93861
+93862
+93863
+93864
+93865
+93866
+93867
+93868
+93869
+93870
+93871
+93872
+93873
+93874
+93875
+93876
+93877
+93878
+93879
+93880
+93881
+93882
+93883
+93884
+93885
+93886
+93887
+93888
+93889
+93890
+93891
+93892
+93893
+93894
+93895
+93896
+93897
+93898
+93899
+93900
+93901
+93902
+93903
+93904
+93905
+93906
+93907
+93908
+93909
+93910
+93911
+93912
+93913
+93914
+93915
+93916
+93917
+93918
+93919
+93920
+93921
+93922
+93923
+93924
+93925
+93926
+93927
+93928
+93929
+93930
+93931
+93932
+93933
+93934
+93935
+93936
+93937
+93938
+93939
+93940
+93941
+93942
+93943
+93944
+93945
+93946
+93947
+93948
+93949
+93950
+93951
+93952
+93953
+93954
+93955
+93956
+93957
+93958
+93959
+93960
+93961
+93962
+93963
+93964
+93965
+93966
+93967
+93968
+93969
+93970
+93971
+93972
+93973
+93974
+93975
+93976
+93977
+93978
+93979
+93980
+93981
+93982
+93983
+93984
+93985
+93986
+93987
+93988
+93989
+93990
+93991
+93992
+93993
+93994
+93995
+93996
+93997
+93998
+93999
+94000
+94001
+94002
+94003
+94004
+94005
+94006
+94007
+94008
+94009
+94010
+94011
+94012
+94013
+94014
+94015
+94016
+94017
+94018
+94019
+94020
+94021
+94022
+94023
+94024
+94025
+94026
+94027
+94028
+94029
+94030
+94031
+94032
+94033
+94034
+94035
+94036
+94037
+94038
+94039
+94040
+94041
+94042
+94043
+94044
+94045
+94046
+94047
+94048
+94049
+94050
+94051
+94052
+94053
+94054
+94055
+94056
+94057
+94058
+94059
+94060
+94061
+94062
+94063
+94064
+94065
+94066
+94067
+94068
+94069
+94070
+94071
+94072
+94073
+94074
+94075
+94076
+94077
+94078
+94079
+94080
+94081
+94082
+94083
+94084
+94085
+94086
+94087
+94088
+94089
+94090
+94091
+94092
+94093
+94094
+94095
+94096
+94097
+94098
+94099
+94100
+94101
+94102
+94103
+94104
+94105
+94106
+94107
+94108
+94109
+94110
+94111
+94112
+94113
+94114
+94115
+94116
+94117
+94118
+94119
+94120
+94121
+94122
+94123
+94124
+94125
+94126
+94127
+94128
+94129
+94130
+94131
+94132
+94133
+94134
+94135
+94136
+94137
+94138
+94139
+94140
+94141
+94142
+94143
+94144
+94145
+94146
+94147
+94148
+94149
+94150
+94151
+94152
+94153
+94154
+94155
+94156
+94157
+94158
+94159
+94160
+94161
+94162
+94163
+94164
+94165
+94166
+94167
+94168
+94169
+94170
+94171
+94172
+94173
+94174
+94175
+94176
+94177
+94178
+94179
+94180
+94181
+94182
+94183
+94184
+94185
+94186
+94187
+94188
+94189
+94190
+94191
+94192
+94193
+94194
+94195
+94196
+94197
+94198
+94199
+94200
+94201
+94202
+94203
+94204
+94205
+94206
+94207
+94208
+94209
+94210
+94211
+94212
+94213
+94214
+94215
+94216
+94217
+94218
+94219
+94220
+94221
+94222
+94223
+94224
+94225
+94226
+94227
+94228
+94229
+94230
+94231
+94232
+94233
+94234
+94235
+94236
+94237
+94238
+94239
+94240
+94241
+94242
+94243
+94244
+94245
+94246
+94247
+94248
+94249
+94250
+94251
+94252
+94253
+94254
+94255
+94256
+94257
+94258
+94259
+94260
+94261
+94262
+94263
+94264
+94265
+94266
+94267
+94268
+94269
+94270
+94271
+94272
+94273
+94274
+94275
+94276
+94277
+94278
+94279
+94280
+94281
+94282
+94283
+94284
+94285
+94286
+94287
+94288
+94289
+94290
+94291
+94292
+94293
+94294
+94295
+94296
+94297
+94298
+94299
+94300
+94301
+94302
+94303
+94304
+94305
+94306
+94307
+94308
+94309
+94310
+94311
+94312
+94313
+94314
+94315
+94316
+94317
+94318
+94319
+94320
+94321
+94322
+94323
+94324
+94325
+94326
+94327
+94328
+94329
+94330
+94331
+94332
+94333
+94334
+94335
+94336
+94337
+94338
+94339
+94340
+94341
+94342
+94343
+94344
+94345
+94346
+94347
+94348
+94349
+94350
+94351
+94352
+94353
+94354
+94355
+94356
+94357
+94358
+94359
+94360
+94361
+94362
+94363
+94364
+94365
+94366
+94367
+94368
+94369
+94370
+94371
+94372
+94373
+94374
+94375
+94376
+94377
+94378
+94379
+94380
+94381
+94382
+94383
+94384
+94385
+94386
+94387
+94388
+94389
+94390
+94391
+94392
+94393
+94394
+94395
+94396
+94397
+94398
+94399
+94400
+94401
+94402
+94403
+94404
+94405
+94406
+94407
+94408
+94409
+94410
+94411
+94412
+94413
+94414
+94415
+94416
+94417
+94418
+94419
+94420
+94421
+94422
+94423
+94424
+94425
+94426
+94427
+94428
+94429
+94430
+94431
+94432
+94433
+94434
+94435
+94436
+94437
+94438
+94439
+94440
+94441
+94442
+94443
+94444
+94445
+94446
+94447
+94448
+94449
+94450
+94451
+94452
+94453
+94454
+94455
+94456
+94457
+94458
+94459
+94460
+94461
+94462
+94463
+94464
+94465
+94466
+94467
+94468
+94469
+94470
+94471
+94472
+94473
+94474
+94475
+94476
+94477
+94478
+94479
+94480
+94481
+94482
+94483
+94484
+94485
+94486
+94487
+94488
+94489
+94490
+94491
+94492
+94493
+94494
+94495
+94496
+94497
+94498
+94499
+94500
+94501
+94502
+94503
+94504
+94505
+94506
+94507
+94508
+94509
+94510
+94511
+94512
+94513
+94514
+94515
+94516
+94517
+94518
+94519
+94520
+94521
+94522
+94523
+94524
+94525
+94526
+94527
+94528
+94529
+94530
+94531
+94532
+94533
+94534
+94535
+94536
+94537
+94538
+94539
+94540
+94541
+94542
+94543
+94544
+94545
+94546
+94547
+94548
+94549
+94550
+94551
+94552
+94553
+94554
+94555
+94556
+94557
+94558
+94559
+94560
+94561
+94562
+94563
+94564
+94565
+94566
+94567
+94568
+94569
+94570
+94571
+94572
+94573
+94574
+94575
+94576
+94577
+94578
+94579
+94580
+94581
+94582
+94583
+94584
+94585
+94586
+94587
+94588
+94589
+94590
+94591
+94592
+94593
+94594
+94595
+94596
+94597
+94598
+94599
+94600
+94601
+94602
+94603
+94604
+94605
+94606
+94607
+94608
+94609
+94610
+94611
+94612
+94613
+94614
+94615
+94616
+94617
+94618
+94619
+94620
+94621
+94622
+94623
+94624
+94625
+94626
+94627
+94628
+94629
+94630
+94631
+94632
+94633
+94634
+94635
+94636
+94637
+94638
+94639
+94640
+94641
+94642
+94643
+94644
+94645
+94646
+94647
+94648
+94649
+94650
+94651
+94652
+94653
+94654
+94655
+94656
+94657
+94658
+94659
+94660
+94661
+94662
+94663
+94664
+94665
+94666
+94667
+94668
+94669
+94670
+94671
+94672
+94673
+94674
+94675
+94676
+94677
+94678
+94679
+94680
+94681
+94682
+94683
+94684
+94685
+94686
+94687
+94688
+94689
+94690
+94691
+94692
+94693
+94694
+94695
+94696
+94697
+94698
+94699
+94700
+94701
+94702
+94703
+94704
+94705
+94706
+94707
+94708
+94709
+94710
+94711
+94712
+94713
+94714
+94715
+94716
+94717
+94718
+94719
+94720
+94721
+94722
+94723
+94724
+94725
+94726
+94727
+94728
+94729
+94730
+94731
+94732
+94733
+94734
+94735
+94736
+94737
+94738
+94739
+94740
+94741
+94742
+94743
+94744
+94745
+94746
+94747
+94748
+94749
+94750
+94751
+94752
+94753
+94754
+94755
+94756
+94757
+94758
+94759
+94760
+94761
+94762
+94763
+94764
+94765
+94766
+94767
+94768
+94769
+94770
+94771
+94772
+94773
+94774
+94775
+94776
+94777
+94778
+94779
+94780
+94781
+94782
+94783
+94784
+94785
+94786
+94787
+94788
+94789
+94790
+94791
+94792
+94793
+94794
+94795
+94796
+94797
+94798
+94799
+94800
+94801
+94802
+94803
+94804
+94805
+94806
+94807
+94808
+94809
+94810
+94811
+94812
+94813
+94814
+94815
+94816
+94817
+94818
+94819
+94820
+94821
+94822
+94823
+94824
+94825
+94826
+94827
+94828
+94829
+94830
+94831
+94832
+94833
+94834
+94835
+94836
+94837
+94838
+94839
+94840
+94841
+94842
+94843
+94844
+94845
+94846
+94847
+94848
+94849
+94850
+94851
+94852
+94853
+94854
+94855
+94856
+94857
+94858
+94859
+94860
+94861
+94862
+94863
+94864
+94865
+94866
+94867
+94868
+94869
+94870
+94871
+94872
+94873
+94874
+94875
+94876
+94877
+94878
+94879
+94880
+94881
+94882
+94883
+94884
+94885
+94886
+94887
+94888
+94889
+94890
+94891
+94892
+94893
+94894
+94895
+94896
+94897
+94898
+94899
+94900
+94901
+94902
+94903
+94904
+94905
+94906
+94907
+94908
+94909
+94910
+94911
+94912
+94913
+94914
+94915
+94916
+94917
+94918
+94919
+94920
+94921
+94922
+94923
+94924
+94925
+94926
+94927
+94928
+94929
+94930
+94931
+94932
+94933
+94934
+94935
+94936
+94937
+94938
+94939
+94940
+94941
+94942
+94943
+94944
+94945
+94946
+94947
+94948
+94949
+94950
+94951
+94952
+94953
+94954
+94955
+94956
+94957
+94958
+94959
+94960
+94961
+94962
+94963
+94964
+94965
+94966
+94967
+94968
+94969
+94970
+94971
+94972
+94973
+94974
+94975
+94976
+94977
+94978
+94979
+94980
+94981
+94982
+94983
+94984
+94985
+94986
+94987
+94988
+94989
+94990
+94991
+94992
+94993
+94994
+94995
+94996
+94997
+94998
+94999
+95000
+95001
+95002
+95003
+95004
+95005
+95006
+95007
+95008
+95009
+95010
+95011
+95012
+95013
+95014
+95015
+95016
+95017
+95018
+95019
+95020
+95021
+95022
+95023
+95024
+95025
+95026
+95027
+95028
+95029
+95030
+95031
+95032
+95033
+95034
+95035
+95036
+95037
+95038
+95039
+95040
+95041
+95042
+95043
+95044
+95045
+95046
+95047
+95048
+95049
+95050
+95051
+95052
+95053
+95054
+95055
+95056
+95057
+95058
+95059
+95060
+95061
+95062
+95063
+95064
+95065
+95066
+95067
+95068
+95069
+95070
+95071
+95072
+95073
+95074
+95075
+95076
+95077
+95078
+95079
+95080
+95081
+95082
+95083
+95084
+95085
+95086
+95087
+95088
+95089
+95090
+95091
+95092
+95093
+95094
+95095
+95096
+95097
+95098
+95099
+95100
+95101
+95102
+95103
+95104
+95105
+95106
+95107
+95108
+95109
+95110
+95111
+95112
+95113
+95114
+95115
+95116
+95117
+95118
+95119
+95120
+95121
+95122
+95123
+95124
+95125
+95126
+95127
+95128
+95129
+95130
+95131
+95132
+95133
+95134
+95135
+95136
+95137
+95138
+95139
+95140
+95141
+95142
+95143
+95144
+95145
+95146
+95147
+95148
+95149
+95150
+95151
+95152
+95153
+95154
+95155
+95156
+95157
+95158
+95159
+95160
+95161
+95162
+95163
+95164
+95165
+95166
+95167
+95168
+95169
+95170
+95171
+95172
+95173
+95174
+95175
+95176
+95177
+95178
+95179
+95180
+95181
+95182
+95183
+95184
+95185
+95186
+95187
+95188
+95189
+95190
+95191
+95192
+95193
+95194
+95195
+95196
+95197
+95198
+95199
+95200
+95201
+95202
+95203
+95204
+95205
+95206
+95207
+95208
+95209
+95210
+95211
+95212
+95213
+95214
+95215
+95216
+95217
+95218
+95219
+95220
+95221
+95222
+95223
+95224
+95225
+95226
+95227
+95228
+95229
+95230
+95231
+95232
+95233
+95234
+95235
+95236
+95237
+95238
+95239
+95240
+95241
+95242
+95243
+95244
+95245
+95246
+95247
+95248
+95249
+95250
+95251
+95252
+95253
+95254
+95255
+95256
+95257
+95258
+95259
+95260
+95261
+95262
+95263
+95264
+95265
+95266
+95267
+95268
+95269
+95270
+95271
+95272
+95273
+95274
+95275
+95276
+95277
+95278
+95279
+95280
+95281
+95282
+95283
+95284
+95285
+95286
+95287
+95288
+95289
+95290
+95291
+95292
+95293
+95294
+95295
+95296
+95297
+95298
+95299
+95300
+95301
+95302
+95303
+95304
+95305
+95306
+95307
+95308
+95309
+95310
+95311
+95312
+95313
+95314
+95315
+95316
+95317
+95318
+95319
+95320
+95321
+95322
+95323
+95324
+95325
+95326
+95327
+95328
+95329
+95330
+95331
+95332
+95333
+95334
+95335
+95336
+95337
+95338
+95339
+95340
+95341
+95342
+95343
+95344
+95345
+95346
+95347
+95348
+95349
+95350
+95351
+95352
+95353
+95354
+95355
+95356
+95357
+95358
+95359
+95360
+95361
+95362
+95363
+95364
+95365
+95366
+95367
+95368
+95369
+95370
+95371
+95372
+95373
+95374
+95375
+95376
+95377
+95378
+95379
+95380
+95381
+95382
+95383
+95384
+95385
+95386
+95387
+95388
+95389
+95390
+95391
+95392
+95393
+95394
+95395
+95396
+95397
+95398
+95399
+95400
+95401
+95402
+95403
+95404
+95405
+95406
+95407
+95408
+95409
+95410
+95411
+95412
+95413
+95414
+95415
+95416
+95417
+95418
+95419
+95420
+95421
+95422
+95423
+95424
+95425
+95426
+95427
+95428
+95429
+95430
+95431
+95432
+95433
+95434
+95435
+95436
+95437
+95438
+95439
+95440
+95441
+95442
+95443
+95444
+95445
+95446
+95447
+95448
+95449
+95450
+95451
+95452
+95453
+95454
+95455
+95456
+95457
+95458
+95459
+95460
+95461
+95462
+95463
+95464
+95465
+95466
+95467
+95468
+95469
+95470
+95471
+95472
+95473
+95474
+95475
+95476
+95477
+95478
+95479
+95480
+95481
+95482
+95483
+95484
+95485
+95486
+95487
+95488
+95489
+95490
+95491
+95492
+95493
+95494
+95495
+95496
+95497
+95498
+95499
+95500
+95501
+95502
+95503
+95504
+95505
+95506
+95507
+95508
+95509
+95510
+95511
+95512
+95513
+95514
+95515
+95516
+95517
+95518
+95519
+95520
+95521
+95522
+95523
+95524
+95525
+95526
+95527
+95528
+95529
+95530
+95531
+95532
+95533
+95534
+95535
+95536
+95537
+95538
+95539
+95540
+95541
+95542
+95543
+95544
+95545
+95546
+95547
+95548
+95549
+95550
+95551
+95552
+95553
+95554
+95555
+95556
+95557
+95558
+95559
+95560
+95561
+95562
+95563
+95564
+95565
+95566
+95567
+95568
+95569
+95570
+95571
+95572
+95573
+95574
+95575
+95576
+95577
+95578
+95579
+95580
+95581
+95582
+95583
+95584
+95585
+95586
+95587
+95588
+95589
+95590
+95591
+95592
+95593
+95594
+95595
+95596
+95597
+95598
+95599
+95600
+95601
+95602
+95603
+95604
+95605
+95606
+95607
+95608
+95609
+95610
+95611
+95612
+95613
+95614
+95615
+95616
+95617
+95618
+95619
+95620
+95621
+95622
+95623
+95624
+95625
+95626
+95627
+95628
+95629
+95630
+95631
+95632
+95633
+95634
+95635
+95636
+95637
+95638
+95639
+95640
+95641
+95642
+95643
+95644
+95645
+95646
+95647
+95648
+95649
+95650
+95651
+95652
+95653
+95654
+95655
+95656
+95657
+95658
+95659
+95660
+95661
+95662
+95663
+95664
+95665
+95666
+95667
+95668
+95669
+95670
+95671
+95672
+95673
+95674
+95675
+95676
+95677
+95678
+95679
+95680
+95681
+95682
+95683
+95684
+95685
+95686
+95687
+95688
+95689
+95690
+95691
+95692
+95693
+95694
+95695
+95696
+95697
+95698
+95699
+95700
+95701
+95702
+95703
+95704
+95705
+95706
+95707
+95708
+95709
+95710
+95711
+95712
+95713
+95714
+95715
+95716
+95717
+95718
+95719
+95720
+95721
+95722
+95723
+95724
+95725
+95726
+95727
+95728
+95729
+95730
+95731
+95732
+95733
+95734
+95735
+95736
+95737
+95738
+95739
+95740
+95741
+95742
+95743
+95744
+95745
+95746
+95747
+95748
+95749
+95750
+95751
+95752
+95753
+95754
+95755
+95756
+95757
+95758
+95759
+95760
+95761
+95762
+95763
+95764
+95765
+95766
+95767
+95768
+95769
+95770
+95771
+95772
+95773
+95774
+95775
+95776
+95777
+95778
+95779
+95780
+95781
+95782
+95783
+95784
+95785
+95786
+95787
+95788
+95789
+95790
+95791
+95792
+95793
+95794
+95795
+95796
+95797
+95798
+95799
+95800
+95801
+95802
+95803
+95804
+95805
+95806
+95807
+95808
+95809
+95810
+95811
+95812
+95813
+95814
+95815
+95816
+95817
+95818
+95819
+95820
+95821
+95822
+95823
+95824
+95825
+95826
+95827
+95828
+95829
+95830
+95831
+95832
+95833
+95834
+95835
+95836
+95837
+95838
+95839
+95840
+95841
+95842
+95843
+95844
+95845
+95846
+95847
+95848
+95849
+95850
+95851
+95852
+95853
+95854
+95855
+95856
+95857
+95858
+95859
+95860
+95861
+95862
+95863
+95864
+95865
+95866
+95867
+95868
+95869
+95870
+95871
+95872
+95873
+95874
+95875
+95876
+95877
+95878
+95879
+95880
+95881
+95882
+95883
+95884
+95885
+95886
+95887
+95888
+95889
+95890
+95891
+95892
+95893
+95894
+95895
+95896
+95897
+95898
+95899
+95900
+95901
+95902
+95903
+95904
+95905
+95906
+95907
+95908
+95909
+95910
+95911
+95912
+95913
+95914
+95915
+95916
+95917
+95918
+95919
+95920
+95921
+95922
+95923
+95924
+95925
+95926
+95927
+95928
+95929
+95930
+95931
+95932
+95933
+95934
+95935
+95936
+95937
+95938
+95939
+95940
+95941
+95942
+95943
+95944
+95945
+95946
+95947
+95948
+95949
+95950
+95951
+95952
+95953
+95954
+95955
+95956
+95957
+95958
+95959
+95960
+95961
+95962
+95963
+95964
+95965
+95966
+95967
+95968
+95969
+95970
+95971
+95972
+95973
+95974
+95975
+95976
+95977
+95978
+95979
+95980
+95981
+95982
+95983
+95984
+95985
+95986
+95987
+95988
+95989
+95990
+95991
+95992
+95993
+95994
+95995
+95996
+95997
+95998
+95999
+96000
+96001
+96002
+96003
+96004
+96005
+96006
+96007
+96008
+96009
+96010
+96011
+96012
+96013
+96014
+96015
+96016
+96017
+96018
+96019
+96020
+96021
+96022
+96023
+96024
+96025
+96026
+96027
+96028
+96029
+96030
+96031
+96032
+96033
+96034
+96035
+96036
+96037
+96038
+96039
+96040
+96041
+96042
+96043
+96044
+96045
+96046
+96047
+96048
+96049
+96050
+96051
+96052
+96053
+96054
+96055
+96056
+96057
+96058
+96059
+96060
+96061
+96062
+96063
+96064
+96065
+96066
+96067
+96068
+96069
+96070
+96071
+96072
+96073
+96074
+96075
+96076
+96077
+96078
+96079
+96080
+96081
+96082
+96083
+96084
+96085
+96086
+96087
+96088
+96089
+96090
+96091
+96092
+96093
+96094
+96095
+96096
+96097
+96098
+96099
+96100
+96101
+96102
+96103
+96104
+96105
+96106
+96107
+96108
+96109
+96110
+96111
+96112
+96113
+96114
+96115
+96116
+96117
+96118
+96119
+96120
+96121
+96122
+96123
+96124
+96125
+96126
+96127
+96128
+96129
+96130
+96131
+96132
+96133
+96134
+96135
+96136
+96137
+96138
+96139
+96140
+96141
+96142
+96143
+96144
+96145
+96146
+96147
+96148
+96149
+96150
+96151
+96152
+96153
+96154
+96155
+96156
+96157
+96158
+96159
+96160
+96161
+96162
+96163
+96164
+96165
+96166
+96167
+96168
+96169
+96170
+96171
+96172
+96173
+96174
+96175
+96176
+96177
+96178
+96179
+96180
+96181
+96182
+96183
+96184
+96185
+96186
+96187
+96188
+96189
+96190
+96191
+96192
+96193
+96194
+96195
+96196
+96197
+96198
+96199
+96200
+96201
+96202
+96203
+96204
+96205
+96206
+96207
+96208
+96209
+96210
+96211
+96212
+96213
+96214
+96215
+96216
+96217
+96218
+96219
+96220
+96221
+96222
+96223
+96224
+96225
+96226
+96227
+96228
+96229
+96230
+96231
+96232
+96233
+96234
+96235
+96236
+96237
+96238
+96239
+96240
+96241
+96242
+96243
+96244
+96245
+96246
+96247
+96248
+96249
+96250
+96251
+96252
+96253
+96254
+96255
+96256
+96257
+96258
+96259
+96260
+96261
+96262
+96263
+96264
+96265
+96266
+96267
+96268
+96269
+96270
+96271
+96272
+96273
+96274
+96275
+96276
+96277
+96278
+96279
+96280
+96281
+96282
+96283
+96284
+96285
+96286
+96287
+96288
+96289
+96290
+96291
+96292
+96293
+96294
+96295
+96296
+96297
+96298
+96299
+96300
+96301
+96302
+96303
+96304
+96305
+96306
+96307
+96308
+96309
+96310
+96311
+96312
+96313
+96314
+96315
+96316
+96317
+96318
+96319
+96320
+96321
+96322
+96323
+96324
+96325
+96326
+96327
+96328
+96329
+96330
+96331
+96332
+96333
+96334
+96335
+96336
+96337
+96338
+96339
+96340
+96341
+96342
+96343
+96344
+96345
+96346
+96347
+96348
+96349
+96350
+96351
+96352
+96353
+96354
+96355
+96356
+96357
+96358
+96359
+96360
+96361
+96362
+96363
+96364
+96365
+96366
+96367
+96368
+96369
+96370
+96371
+96372
+96373
+96374
+96375
+96376
+96377
+96378
+96379
+96380
+96381
+96382
+96383
+96384
+96385
+96386
+96387
+96388
+96389
+96390
+96391
+96392
+96393
+96394
+96395
+96396
+96397
+96398
+96399
+96400
+96401
+96402
+96403
+96404
+96405
+96406
+96407
+96408
+96409
+96410
+96411
+96412
+96413
+96414
+96415
+96416
+96417
+96418
+96419
+96420
+96421
+96422
+96423
+96424
+96425
+96426
+96427
+96428
+96429
+96430
+96431
+96432
+96433
+96434
+96435
+96436
+96437
+96438
+96439
+96440
+96441
+96442
+96443
+96444
+96445
+96446
+96447
+96448
+96449
+96450
+96451
+96452
+96453
+96454
+96455
+96456
+96457
+96458
+96459
+96460
+96461
+96462
+96463
+96464
+96465
+96466
+96467
+96468
+96469
+96470
+96471
+96472
+96473
+96474
+96475
+96476
+96477
+96478
+96479
+96480
+96481
+96482
+96483
+96484
+96485
+96486
+96487
+96488
+96489
+96490
+96491
+96492
+96493
+96494
+96495
+96496
+96497
+96498
+96499
+96500
+96501
+96502
+96503
+96504
+96505
+96506
+96507
+96508
+96509
+96510
+96511
+96512
+96513
+96514
+96515
+96516
+96517
+96518
+96519
+96520
+96521
+96522
+96523
+96524
+96525
+96526
+96527
+96528
+96529
+96530
+96531
+96532
+96533
+96534
+96535
+96536
+96537
+96538
+96539
+96540
+96541
+96542
+96543
+96544
+96545
+96546
+96547
+96548
+96549
+96550
+96551
+96552
+96553
+96554
+96555
+96556
+96557
+96558
+96559
+96560
+96561
+96562
+96563
+96564
+96565
+96566
+96567
+96568
+96569
+96570
+96571
+96572
+96573
+96574
+96575
+96576
+96577
+96578
+96579
+96580
+96581
+96582
+96583
+96584
+96585
+96586
+96587
+96588
+96589
+96590
+96591
+96592
+96593
+96594
+96595
+96596
+96597
+96598
+96599
+96600
+96601
+96602
+96603
+96604
+96605
+96606
+96607
+96608
+96609
+96610
+96611
+96612
+96613
+96614
+96615
+96616
+96617
+96618
+96619
+96620
+96621
+96622
+96623
+96624
+96625
+96626
+96627
+96628
+96629
+96630
+96631
+96632
+96633
+96634
+96635
+96636
+96637
+96638
+96639
+96640
+96641
+96642
+96643
+96644
+96645
+96646
+96647
+96648
+96649
+96650
+96651
+96652
+96653
+96654
+96655
+96656
+96657
+96658
+96659
+96660
+96661
+96662
+96663
+96664
+96665
+96666
+96667
+96668
+96669
+96670
+96671
+96672
+96673
+96674
+96675
+96676
+96677
+96678
+96679
+96680
+96681
+96682
+96683
+96684
+96685
+96686
+96687
+96688
+96689
+96690
+96691
+96692
+96693
+96694
+96695
+96696
+96697
+96698
+96699
+96700
+96701
+96702
+96703
+96704
+96705
+96706
+96707
+96708
+96709
+96710
+96711
+96712
+96713
+96714
+96715
+96716
+96717
+96718
+96719
+96720
+96721
+96722
+96723
+96724
+96725
+96726
+96727
+96728
+96729
+96730
+96731
+96732
+96733
+96734
+96735
+96736
+96737
+96738
+96739
+96740
+96741
+96742
+96743
+96744
+96745
+96746
+96747
+96748
+96749
+96750
+96751
+96752
+96753
+96754
+96755
+96756
+96757
+96758
+96759
+96760
+96761
+96762
+96763
+96764
+96765
+96766
+96767
+96768
+96769
+96770
+96771
+96772
+96773
+96774
+96775
+96776
+96777
+96778
+96779
+96780
+96781
+96782
+96783
+96784
+96785
+96786
+96787
+96788
+96789
+96790
+96791
+96792
+96793
+96794
+96795
+96796
+96797
+96798
+96799
+96800
+96801
+96802
+96803
+96804
+96805
+96806
+96807
+96808
+96809
+96810
+96811
+96812
+96813
+96814
+96815
+96816
+96817
+96818
+96819
+96820
+96821
+96822
+96823
+96824
+96825
+96826
+96827
+96828
+96829
+96830
+96831
+96832
+96833
+96834
+96835
+96836
+96837
+96838
+96839
+96840
+96841
+96842
+96843
+96844
+96845
+96846
+96847
+96848
+96849
+96850
+96851
+96852
+96853
+96854
+96855
+96856
+96857
+96858
+96859
+96860
+96861
+96862
+96863
+96864
+96865
+96866
+96867
+96868
+96869
+96870
+96871
+96872
+96873
+96874
+96875
+96876
+96877
+96878
+96879
+96880
+96881
+96882
+96883
+96884
+96885
+96886
+96887
+96888
+96889
+96890
+96891
+96892
+96893
+96894
+96895
+96896
+96897
+96898
+96899
+96900
+96901
+96902
+96903
+96904
+96905
+96906
+96907
+96908
+96909
+96910
+96911
+96912
+96913
+96914
+96915
+96916
+96917
+96918
+96919
+96920
+96921
+96922
+96923
+96924
+96925
+96926
+96927
+96928
+96929
+96930
+96931
+96932
+96933
+96934
+96935
+96936
+96937
+96938
+96939
+96940
+96941
+96942
+96943
+96944
+96945
+96946
+96947
+96948
+96949
+96950
+96951
+96952
+96953
+96954
+96955
+96956
+96957
+96958
+96959
+96960
+96961
+96962
+96963
+96964
+96965
+96966
+96967
+96968
+96969
+96970
+96971
+96972
+96973
+96974
+96975
+96976
+96977
+96978
+96979
+96980
+96981
+96982
+96983
+96984
+96985
+96986
+96987
+96988
+96989
+96990
+96991
+96992
+96993
+96994
+96995
+96996
+96997
+96998
+96999
+97000
+97001
+97002
+97003
+97004
+97005
+97006
+97007
+97008
+97009
+97010
+97011
+97012
+97013
+97014
+97015
+97016
+97017
+97018
+97019
+97020
+97021
+97022
+97023
+97024
+97025
+97026
+97027
+97028
+97029
+97030
+97031
+97032
+97033
+97034
+97035
+97036
+97037
+97038
+97039
+97040
+97041
+97042
+97043
+97044
+97045
+97046
+97047
+97048
+97049
+97050
+97051
+97052
+97053
+97054
+97055
+97056
+97057
+97058
+97059
+97060
+97061
+97062
+97063
+97064
+97065
+97066
+97067
+97068
+97069
+97070
+97071
+97072
+97073
+97074
+97075
+97076
+97077
+97078
+97079
+97080
+97081
+97082
+97083
+97084
+97085
+97086
+97087
+97088
+97089
+97090
+97091
+97092
+97093
+97094
+97095
+97096
+97097
+97098
+97099
+97100
+97101
+97102
+97103
+97104
+97105
+97106
+97107
+97108
+97109
+97110
+97111
+97112
+97113
+97114
+97115
+97116
+97117
+97118
+97119
+97120
+97121
+97122
+97123
+97124
+97125
+97126
+97127
+97128
+97129
+97130
+97131
+97132
+97133
+97134
+97135
+97136
+97137
+97138
+97139
+97140
+97141
+97142
+97143
+97144
+97145
+97146
+97147
+97148
+97149
+97150
+97151
+97152
+97153
+97154
+97155
+97156
+97157
+97158
+97159
+97160
+97161
+97162
+97163
+97164
+97165
+97166
+97167
+97168
+97169
+97170
+97171
+97172
+97173
+97174
+97175
+97176
+97177
+97178
+97179
+97180
+97181
+97182
+97183
+97184
+97185
+97186
+97187
+97188
+97189
+97190
+97191
+97192
+97193
+97194
+97195
+97196
+97197
+97198
+97199
+97200
+97201
+97202
+97203
+97204
+97205
+97206
+97207
+97208
+97209
+97210
+97211
+97212
+97213
+97214
+97215
+97216
+97217
+97218
+97219
+97220
+97221
+97222
+97223
+97224
+97225
+97226
+97227
+97228
+97229
+97230
+97231
+97232
+97233
+97234
+97235
+97236
+97237
+97238
+97239
+97240
+97241
+97242
+97243
+97244
+97245
+97246
+97247
+97248
+97249
+97250
+97251
+97252
+97253
+97254
+97255
+97256
+97257
+97258
+97259
+97260
+97261
+97262
+97263
+97264
+97265
+97266
+97267
+97268
+97269
+97270
+97271
+97272
+97273
+97274
+97275
+97276
+97277
+97278
+97279
+97280
+97281
+97282
+97283
+97284
+97285
+97286
+97287
+97288
+97289
+97290
+97291
+97292
+97293
+97294
+97295
+97296
+97297
+97298
+97299
+97300
+97301
+97302
+97303
+97304
+97305
+97306
+97307
+97308
+97309
+97310
+97311
+97312
+97313
+97314
+97315
+97316
+97317
+97318
+97319
+97320
+97321
+97322
+97323
+97324
+97325
+97326
+97327
+97328
+97329
+97330
+97331
+97332
+97333
+97334
+97335
+97336
+97337
+97338
+97339
+97340
+97341
+97342
+97343
+97344
+97345
+97346
+97347
+97348
+97349
+97350
+97351
+97352
+97353
+97354
+97355
+97356
+97357
+97358
+97359
+97360
+97361
+97362
+97363
+97364
+97365
+97366
+97367
+97368
+97369
+97370
+97371
+97372
+97373
+97374
+97375
+97376
+97377
+97378
+97379
+97380
+97381
+97382
+97383
+97384
+97385
+97386
+97387
+97388
+97389
+97390
+97391
+97392
+97393
+97394
+97395
+97396
+97397
+97398
+97399
+97400
+97401
+97402
+97403
+97404
+97405
+97406
+97407
+97408
+97409
+97410
+97411
+97412
+97413
+97414
+97415
+97416
+97417
+97418
+97419
+97420
+97421
+97422
+97423
+97424
+97425
+97426
+97427
+97428
+97429
+97430
+97431
+97432
+97433
+97434
+97435
+97436
+97437
+97438
+97439
+97440
+97441
+97442
+97443
+97444
+97445
+97446
+97447
+97448
+97449
+97450
+97451
+97452
+97453
+97454
+97455
+97456
+97457
+97458
+97459
+97460
+97461
+97462
+97463
+97464
+97465
+97466
+97467
+97468
+97469
+97470
+97471
+97472
+97473
+97474
+97475
+97476
+97477
+97478
+97479
+97480
+97481
+97482
+97483
+97484
+97485
+97486
+97487
+97488
+97489
+97490
+97491
+97492
+97493
+97494
+97495
+97496
+97497
+97498
+97499
+97500
+97501
+97502
+97503
+97504
+97505
+97506
+97507
+97508
+97509
+97510
+97511
+97512
+97513
+97514
+97515
+97516
+97517
+97518
+97519
+97520
+97521
+97522
+97523
+97524
+97525
+97526
+97527
+97528
+97529
+97530
+97531
+97532
+97533
+97534
+97535
+97536
+97537
+97538
+97539
+97540
+97541
+97542
+97543
+97544
+97545
+97546
+97547
+97548
+97549
+97550
+97551
+97552
+97553
+97554
+97555
+97556
+97557
+97558
+97559
+97560
+97561
+97562
+97563
+97564
+97565
+97566
+97567
+97568
+97569
+97570
+97571
+97572
+97573
+97574
+97575
+97576
+97577
+97578
+97579
+97580
+97581
+97582
+97583
+97584
+97585
+97586
+97587
+97588
+97589
+97590
+97591
+97592
+97593
+97594
+97595
+97596
+97597
+97598
+97599
+97600
+97601
+97602
+97603
+97604
+97605
+97606
+97607
+97608
+97609
+97610
+97611
+97612
+97613
+97614
+97615
+97616
+97617
+97618
+97619
+97620
+97621
+97622
+97623
+97624
+97625
+97626
+97627
+97628
+97629
+97630
+97631
+97632
+97633
+97634
+97635
+97636
+97637
+97638
+97639
+97640
+97641
+97642
+97643
+97644
+97645
+97646
+97647
+97648
+97649
+97650
+97651
+97652
+97653
+97654
+97655
+97656
+97657
+97658
+97659
+97660
+97661
+97662
+97663
+97664
+97665
+97666
+97667
+97668
+97669
+97670
+97671
+97672
+97673
+97674
+97675
+97676
+97677
+97678
+97679
+97680
+97681
+97682
+97683
+97684
+97685
+97686
+97687
+97688
+97689
+97690
+97691
+97692
+97693
+97694
+97695
+97696
+97697
+97698
+97699
+97700
+97701
+97702
+97703
+97704
+97705
+97706
+97707
+97708
+97709
+97710
+97711
+97712
+97713
+97714
+97715
+97716
+97717
+97718
+97719
+97720
+97721
+97722
+97723
+97724
+97725
+97726
+97727
+97728
+97729
+97730
+97731
+97732
+97733
+97734
+97735
+97736
+97737
+97738
+97739
+97740
+97741
+97742
+97743
+97744
+97745
+97746
+97747
+97748
+97749
+97750
+97751
+97752
+97753
+97754
+97755
+97756
+97757
+97758
+97759
+97760
+97761
+97762
+97763
+97764
+97765
+97766
+97767
+97768
+97769
+97770
+97771
+97772
+97773
+97774
+97775
+97776
+97777
+97778
+97779
+97780
+97781
+97782
+97783
+97784
+97785
+97786
+97787
+97788
+97789
+97790
+97791
+97792
+97793
+97794
+97795
+97796
+97797
+97798
+97799
+97800
+97801
+97802
+97803
+97804
+97805
+97806
+97807
+97808
+97809
+97810
+97811
+97812
+97813
+97814
+97815
+97816
+97817
+97818
+97819
+97820
+97821
+97822
+97823
+97824
+97825
+97826
+97827
+97828
+97829
+97830
+97831
+97832
+97833
+97834
+97835
+97836
+97837
+97838
+97839
+97840
+97841
+97842
+97843
+97844
+97845
+97846
+97847
+97848
+97849
+97850
+97851
+97852
+97853
+97854
+97855
+97856
+97857
+97858
+97859
+97860
+97861
+97862
+97863
+97864
+97865
+97866
+97867
+97868
+97869
+97870
+97871
+97872
+97873
+97874
+97875
+97876
+97877
+97878
+97879
+97880
+97881
+97882
+97883
+97884
+97885
+97886
+97887
+97888
+97889
+97890
+97891
+97892
+97893
+97894
+97895
+97896
+97897
+97898
+97899
+97900
+97901
+97902
+97903
+97904
+97905
+97906
+97907
+97908
+97909
+97910
+97911
+97912
+97913
+97914
+97915
+97916
+97917
+97918
+97919
+97920
+97921
+97922
+97923
+97924
+97925
+97926
+97927
+97928
+97929
+97930
+97931
+97932
+97933
+97934
+97935
+97936
+97937
+97938
+97939
+97940
+97941
+97942
+97943
+97944
+97945
+97946
+97947
+97948
+97949
+97950
+97951
+97952
+97953
+97954
+97955
+97956
+97957
+97958
+97959
+97960
+97961
+97962
+97963
+97964
+97965
+97966
+97967
+97968
+97969
+97970
+97971
+97972
+97973
+97974
+97975
+97976
+97977
+97978
+97979
+97980
+97981
+97982
+97983
+97984
+97985
+97986
+97987
+97988
+97989
+97990
+97991
+97992
+97993
+97994
+97995
+97996
+97997
+97998
+97999
+98000
+98001
+98002
+98003
+98004
+98005
+98006
+98007
+98008
+98009
+98010
+98011
+98012
+98013
+98014
+98015
+98016
+98017
+98018
+98019
+98020
+98021
+98022
+98023
+98024
+98025
+98026
+98027
+98028
+98029
+98030
+98031
+98032
+98033
+98034
+98035
+98036
+98037
+98038
+98039
+98040
+98041
+98042
+98043
+98044
+98045
+98046
+98047
+98048
+98049
+98050
+98051
+98052
+98053
+98054
+98055
+98056
+98057
+98058
+98059
+98060
+98061
+98062
+98063
+98064
+98065
+98066
+98067
+98068
+98069
+98070
+98071
+98072
+98073
+98074
+98075
+98076
+98077
+98078
+98079
+98080
+98081
+98082
+98083
+98084
+98085
+98086
+98087
+98088
+98089
+98090
+98091
+98092
+98093
+98094
+98095
+98096
+98097
+98098
+98099
+98100
+98101
+98102
+98103
+98104
+98105
+98106
+98107
+98108
+98109
+98110
+98111
+98112
+98113
+98114
+98115
+98116
+98117
+98118
+98119
+98120
+98121
+98122
+98123
+98124
+98125
+98126
+98127
+98128
+98129
+98130
+98131
+98132
+98133
+98134
+98135
+98136
+98137
+98138
+98139
+98140
+98141
+98142
+98143
+98144
+98145
+98146
+98147
+98148
+98149
+98150
+98151
+98152
+98153
+98154
+98155
+98156
+98157
+98158
+98159
+98160
+98161
+98162
+98163
+98164
+98165
+98166
+98167
+98168
+98169
+98170
+98171
+98172
+98173
+98174
+98175
+98176
+98177
+98178
+98179
+98180
+98181
+98182
+98183
+98184
+98185
+98186
+98187
+98188
+98189
+98190
+98191
+98192
+98193
+98194
+98195
+98196
+98197
+98198
+98199
+98200
+98201
+98202
+98203
+98204
+98205
+98206
+98207
+98208
+98209
+98210
+98211
+98212
+98213
+98214
+98215
+98216
+98217
+98218
+98219
+98220
+98221
+98222
+98223
+98224
+98225
+98226
+98227
+98228
+98229
+98230
+98231
+98232
+98233
+98234
+98235
+98236
+98237
+98238
+98239
+98240
+98241
+98242
+98243
+98244
+98245
+98246
+98247
+98248
+98249
+98250
+98251
+98252
+98253
+98254
+98255
+98256
+98257
+98258
+98259
+98260
+98261
+98262
+98263
+98264
+98265
+98266
+98267
+98268
+98269
+98270
+98271
+98272
+98273
+98274
+98275
+98276
+98277
+98278
+98279
+98280
+98281
+98282
+98283
+98284
+98285
+98286
+98287
+98288
+98289
+98290
+98291
+98292
+98293
+98294
+98295
+98296
+98297
+98298
+98299
+98300
+98301
+98302
+98303
+98304
+98305
+98306
+98307
+98308
+98309
+98310
+98311
+98312
+98313
+98314
+98315
+98316
+98317
+98318
+98319
+98320
+98321
+98322
+98323
+98324
+98325
+98326
+98327
+98328
+98329
+98330
+98331
+98332
+98333
+98334
+98335
+98336
+98337
+98338
+98339
+98340
+98341
+98342
+98343
+98344
+98345
+98346
+98347
+98348
+98349
+98350
+98351
+98352
+98353
+98354
+98355
+98356
+98357
+98358
+98359
+98360
+98361
+98362
+98363
+98364
+98365
+98366
+98367
+98368
+98369
+98370
+98371
+98372
+98373
+98374
+98375
+98376
+98377
+98378
+98379
+98380
+98381
+98382
+98383
+98384
+98385
+98386
+98387
+98388
+98389
+98390
+98391
+98392
+98393
+98394
+98395
+98396
+98397
+98398
+98399
+98400
+98401
+98402
+98403
+98404
+98405
+98406
+98407
+98408
+98409
+98410
+98411
+98412
+98413
+98414
+98415
+98416
+98417
+98418
+98419
+98420
+98421
+98422
+98423
+98424
+98425
+98426
+98427
+98428
+98429
+98430
+98431
+98432
+98433
+98434
+98435
+98436
+98437
+98438
+98439
+98440
+98441
+98442
+98443
+98444
+98445
+98446
+98447
+98448
+98449
+98450
+98451
+98452
+98453
+98454
+98455
+98456
+98457
+98458
+98459
+98460
+98461
+98462
+98463
+98464
+98465
+98466
+98467
+98468
+98469
+98470
+98471
+98472
+98473
+98474
+98475
+98476
+98477
+98478
+98479
+98480
+98481
+98482
+98483
+98484
+98485
+98486
+98487
+98488
+98489
+98490
+98491
+98492
+98493
+98494
+98495
+98496
+98497
+98498
+98499
+98500
+98501
+98502
+98503
+98504
+98505
+98506
+98507
+98508
+98509
+98510
+98511
+98512
+98513
+98514
+98515
+98516
+98517
+98518
+98519
+98520
+98521
+98522
+98523
+98524
+98525
+98526
+98527
+98528
+98529
+98530
+98531
+98532
+98533
+98534
+98535
+98536
+98537
+98538
+98539
+98540
+98541
+98542
+98543
+98544
+98545
+98546
+98547
+98548
+98549
+98550
+98551
+98552
+98553
+98554
+98555
+98556
+98557
+98558
+98559
+98560
+98561
+98562
+98563
+98564
+98565
+98566
+98567
+98568
+98569
+98570
+98571
+98572
+98573
+98574
+98575
+98576
+98577
+98578
+98579
+98580
+98581
+98582
+98583
+98584
+98585
+98586
+98587
+98588
+98589
+98590
+98591
+98592
+98593
+98594
+98595
+98596
+98597
+98598
+98599
+98600
+98601
+98602
+98603
+98604
+98605
+98606
+98607
+98608
+98609
+98610
+98611
+98612
+98613
+98614
+98615
+98616
+98617
+98618
+98619
+98620
+98621
+98622
+98623
+98624
+98625
+98626
+98627
+98628
+98629
+98630
+98631
+98632
+98633
+98634
+98635
+98636
+98637
+98638
+98639
+98640
+98641
+98642
+98643
+98644
+98645
+98646
+98647
+98648
+98649
+98650
+98651
+98652
+98653
+98654
+98655
+98656
+98657
+98658
+98659
+98660
+98661
+98662
+98663
+98664
+98665
+98666
+98667
+98668
+98669
+98670
+98671
+98672
+98673
+98674
+98675
+98676
+98677
+98678
+98679
+98680
+98681
+98682
+98683
+98684
+98685
+98686
+98687
+98688
+98689
+98690
+98691
+98692
+98693
+98694
+98695
+98696
+98697
+98698
+98699
+98700
+98701
+98702
+98703
+98704
+98705
+98706
+98707
+98708
+98709
+98710
+98711
+98712
+98713
+98714
+98715
+98716
+98717
+98718
+98719
+98720
+98721
+98722
+98723
+98724
+98725
+98726
+98727
+98728
+98729
+98730
+98731
+98732
+98733
+98734
+98735
+98736
+98737
+98738
+98739
+98740
+98741
+98742
+98743
+98744
+98745
+98746
+98747
+98748
+98749
+98750
+98751
+98752
+98753
+98754
+98755
+98756
+98757
+98758
+98759
+98760
+98761
+98762
+98763
+98764
+98765
+98766
+98767
+98768
+98769
+98770
+98771
+98772
+98773
+98774
+98775
+98776
+98777
+98778
+98779
+98780
+98781
+98782
+98783
+98784
+98785
+98786
+98787
+98788
+98789
+98790
+98791
+98792
+98793
+98794
+98795
+98796
+98797
+98798
+98799
+98800
+98801
+98802
+98803
+98804
+98805
+98806
+98807
+98808
+98809
+98810
+98811
+98812
+98813
+98814
+98815
+98816
+98817
+98818
+98819
+98820
+98821
+98822
+98823
+98824
+98825
+98826
+98827
+98828
+98829
+98830
+98831
+98832
+98833
+98834
+98835
+98836
+98837
+98838
+98839
+98840
+98841
+98842
+98843
+98844
+98845
+98846
+98847
+98848
+98849
+98850
+98851
+98852
+98853
+98854
+98855
+98856
+98857
+98858
+98859
+98860
+98861
+98862
+98863
+98864
+98865
+98866
+98867
+98868
+98869
+98870
+98871
+98872
+98873
+98874
+98875
+98876
+98877
+98878
+98879
+98880
+98881
+98882
+98883
+98884
+98885
+98886
+98887
+98888
+98889
+98890
+98891
+98892
+98893
+98894
+98895
+98896
+98897
+98898
+98899
+98900
+98901
+98902
+98903
+98904
+98905
+98906
+98907
+98908
+98909
+98910
+98911
+98912
+98913
+98914
+98915
+98916
+98917
+98918
+98919
+98920
+98921
+98922
+98923
+98924
+98925
+98926
+98927
+98928
+98929
+98930
+98931
+98932
+98933
+98934
+98935
+98936
+98937
+98938
+98939
+98940
+98941
+98942
+98943
+98944
+98945
+98946
+98947
+98948
+98949
+98950
+98951
+98952
+98953
+98954
+98955
+98956
+98957
+98958
+98959
+98960
+98961
+98962
+98963
+98964
+98965
+98966
+98967
+98968
+98969
+98970
+98971
+98972
+98973
+98974
+98975
+98976
+98977
+98978
+98979
+98980
+98981
+98982
+98983
+98984
+98985
+98986
+98987
+98988
+98989
+98990
+98991
+98992
+98993
+98994
+98995
+98996
+98997
+98998
+98999
+99000
+99001
+99002
+99003
+99004
+99005
+99006
+99007
+99008
+99009
+99010
+99011
+99012
+99013
+99014
+99015
+99016
+99017
+99018
+99019
+99020
+99021
+99022
+99023
+99024
+99025
+99026
+99027
+99028
+99029
+99030
+99031
+99032
+99033
+99034
+99035
+99036
+99037
+99038
+99039
+99040
+99041
+99042
+99043
+99044
+99045
+99046
+99047
+99048
+99049
+99050
+99051
+99052
+99053
+99054
+99055
+99056
+99057
+99058
+99059
+99060
+99061
+99062
+99063
+99064
+99065
+99066
+99067
+99068
+99069
+99070
+99071
+99072
+99073
+99074
+99075
+99076
+99077
+99078
+99079
+99080
+99081
+99082
+99083
+99084
+99085
+99086
+99087
+99088
+99089
+99090
+99091
+99092
+99093
+99094
+99095
+99096
+99097
+99098
+99099
+99100
+99101
+99102
+99103
+99104
+99105
+99106
+99107
+99108
+99109
+99110
+99111
+99112
+99113
+99114
+99115
+99116
+99117
+99118
+99119
+99120
+99121
+99122
+99123
+99124
+99125
+99126
+99127
+99128
+99129
+99130
+99131
+99132
+99133
+99134
+99135
+99136
+99137
+99138
+99139
+99140
+99141
+99142
+99143
+99144
+99145
+99146
+99147
+99148
+99149
+99150
+99151
+99152
+99153
+99154
+99155
+99156
+99157
+99158
+99159
+99160
+99161
+99162
+99163
+99164
+99165
+99166
+99167
+99168
+99169
+99170
+99171
+99172
+99173
+99174
+99175
+99176
+99177
+99178
+99179
+99180
+99181
+99182
+99183
+99184
+99185
+99186
+99187
+99188
+99189
+99190
+99191
+99192
+99193
+99194
+99195
+99196
+99197
+99198
+99199
+99200
+99201
+99202
+99203
+99204
+99205
+99206
+99207
+99208
+99209
+99210
+99211
+99212
+99213
+99214
+99215
+99216
+99217
+99218
+99219
+99220
+99221
+99222
+99223
+99224
+99225
+99226
+99227
+99228
+99229
+99230
+99231
+99232
+99233
+99234
+99235
+99236
+99237
+99238
+99239
+99240
+99241
+99242
+99243
+99244
+99245
+99246
+99247
+99248
+99249
+99250
+99251
+99252
+99253
+99254
+99255
+99256
+99257
+99258
+99259
+99260
+99261
+99262
+99263
+99264
+99265
+99266
+99267
+99268
+99269
+99270
+99271
+99272
+99273
+99274
+99275
+99276
+99277
+99278
+99279
+99280
+99281
+99282
+99283
+99284
+99285
+99286
+99287
+99288
+99289
+99290
+99291
+99292
+99293
+99294
+99295
+99296
+99297
+99298
+99299
+99300
+99301
+99302
+99303
+99304
+99305
+99306
+99307
+99308
+99309
+99310
+99311
+99312
+99313
+99314
+99315
+99316
+99317
+99318
+99319
+99320
+99321
+99322
+99323
+99324
+99325
+99326
+99327
+99328
+99329
+99330
+99331
+99332
+99333
+99334
+99335
+99336
+99337
+99338
+99339
+99340
+99341
+99342
+99343
+99344
+99345
+99346
+99347
+99348
+99349
+99350
+99351
+99352
+99353
+99354
+99355
+99356
+99357
+99358
+99359
+99360
+99361
+99362
+99363
+99364
+99365
+99366
+99367
+99368
+99369
+99370
+99371
+99372
+99373
+99374
+99375
+99376
+99377
+99378
+99379
+99380
+99381
+99382
+99383
+99384
+99385
+99386
+99387
+99388
+99389
+99390
+99391
+99392
+99393
+99394
+99395
+99396
+99397
+99398
+99399
+99400
+99401
+99402
+99403
+99404
+99405
+99406
+99407
+99408
+99409
+99410
+99411
+99412
+99413
+99414
+99415
+99416
+99417
+99418
+99419
+99420
+99421
+99422
+99423
+99424
+99425
+99426
+99427
+99428
+99429
+99430
+99431
+99432
+99433
+99434
+99435
+99436
+99437
+99438
+99439
+99440
+99441
+99442
+99443
+99444
+99445
+99446
+99447
+99448
+99449
+99450
+99451
+99452
+99453
+99454
+99455
+99456
+99457
+99458
+99459
+99460
+99461
+99462
+99463
+99464
+99465
+99466
+99467
+99468
+99469
+99470
+99471
+99472
+99473
+99474
+99475
+99476
+99477
+99478
+99479
+99480
+99481
+99482
+99483
+99484
+99485
+99486
+99487
+99488
+99489
+99490
+99491
+99492
+99493
+99494
+99495
+99496
+99497
+99498
+99499
+99500
+99501
+99502
+99503
+99504
+99505
+99506
+99507
+99508
+99509
+99510
+99511
+99512
+99513
+99514
+99515
+99516
+99517
+99518
+99519
+99520
+99521
+99522
+99523
+99524
+99525
+99526
+99527
+99528
+99529
+99530
+99531
+99532
+99533
+99534
+99535
+99536
+99537
+99538
+99539
+99540
+99541
+99542
+99543
+99544
+99545
+99546
+99547
+99548
+99549
+99550
+99551
+99552
+99553
+99554
+99555
+99556
+99557
+99558
+99559
+99560
+99561
+99562
+99563
+99564
+99565
+99566
+99567
+99568
+99569
+99570
+99571
+99572
+99573
+99574
+99575
+99576
+99577
+99578
+99579
+99580
+99581
+99582
+99583
+99584
+99585
+99586
+99587
+99588
+99589
+99590
+99591
+99592
+99593
+99594
+99595
+99596
+99597
+99598
+99599
+99600
+99601
+99602
+99603
+99604
+99605
+99606
+99607
+99608
+99609
+99610
+99611
+99612
+99613
+99614
+99615
+99616
+99617
+99618
+99619
+99620
+99621
+99622
+99623
+99624
+99625
+99626
+99627
+99628
+99629
+99630
+99631
+99632
+99633
+99634
+99635
+99636
+99637
+99638
+99639
+99640
+99641
+99642
+99643
+99644
+99645
+99646
+99647
+99648
+99649
+99650
+99651
+99652
+99653
+99654
+99655
+99656
+99657
+99658
+99659
+99660
+99661
+99662
+99663
+99664
+99665
+99666
+99667
+99668
+99669
+99670
+99671
+99672
+99673
+99674
+99675
+99676
+99677
+99678
+99679
+99680
+99681
+99682
+99683
+99684
+99685
+99686
+99687
+99688
+99689
+99690
+99691
+99692
+99693
+99694
+99695
+99696
+99697
+99698
+99699
+99700
+99701
+99702
+99703
+99704
+99705
+99706
+99707
+99708
+99709
+99710
+99711
+99712
+99713
+99714
+99715
+99716
+99717
+99718
+99719
+99720
+99721
+99722
+99723
+99724
+99725
+99726
+99727
+99728
+99729
+99730
+99731
+99732
+99733
+99734
+99735
+99736
+99737
+99738
+99739
+99740
+99741
+99742
+99743
+99744
+99745
+99746
+99747
+99748
+99749
+99750
+99751
+99752
+99753
+99754
+99755
+99756
+99757
+99758
+99759
+99760
+99761
+99762
+99763
+99764
+99765
+99766
+99767
+99768
+99769
+99770
+99771
+99772
+99773
+99774
+99775
+99776
+99777
+99778
+99779
+99780
+99781
+99782
+99783
+99784
+99785
+99786
+99787
+99788
+99789
+99790
+99791
+99792
+99793
+99794
+99795
+99796
+99797
+99798
+99799
+99800
+99801
+99802
+99803
+99804
+99805
+99806
+99807
+99808
+99809
+99810
+99811
+99812
+99813
+99814
+99815
+99816
+99817
+99818
+99819
+99820
+99821
+99822
+99823
+99824
+99825
+99826
+99827
+99828
+99829
+99830
+99831
+99832
+99833
+99834
+99835
+99836
+99837
+99838
+99839
+99840
+99841
+99842
+99843
+99844
+99845
+99846
+99847
+99848
+99849
+99850
+99851
+99852
+99853
+99854
+99855
+99856
+99857
+99858
+99859
+99860
+99861
+99862
+99863
+99864
+99865
+99866
+99867
+99868
+99869
+99870
+99871
+99872
+99873
+99874
+99875
+99876
+99877
+99878
+99879
+99880
+99881
+99882
+99883
+99884
+99885
+99886
+99887
+99888
+99889
+99890
+99891
+99892
+99893
+99894
+99895
+99896
+99897
+99898
+99899
+99900
+99901
+99902
+99903
+99904
+99905
+99906
+99907
+99908
+99909
+99910
+99911
+99912
+99913
+99914
+99915
+99916
+99917
+99918
+99919
+99920
+99921
+99922
+99923
+99924
+99925
+99926
+99927
+99928
+99929
+99930
+99931
+99932
+99933
+99934
+99935
+99936
+99937
+99938
+99939
+99940
+99941
+99942
+99943
+99944
+99945
+99946
+99947
+99948
+99949
+99950
+99951
+99952
+99953
+99954
+99955
+99956
+99957
+99958
+99959
+99960
+99961
+99962
+99963
+99964
+99965
+99966
+99967
+99968
+99969
+99970
+99971
+99972
+99973
+99974
+99975
+99976
+99977
+99978
+99979
+99980
+99981
+99982
+99983
+99984
+99985
+99986
+99987
+99988
+99989
+99990
+99991
+99992
+99993
+99994
+99995
+99996
+99997
+99998
+99999
+100000
diff --git a/mysql-test/suite/archive/archive.result b/mysql-test/suite/archive/archive.result
index d294d3dfe58..656038f42b4 100644
--- a/mysql-test/suite/archive/archive.result
+++ b/mysql-test/suite/archive/archive.result
@@ -1,7 +1,7 @@
CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
call mtr.add_suppression("Table 't1' is marked as crashed and should be repaired");
DROP TABLE if exists t1,t2,t3,t4,t5,t6;
-SET storage_engine=ARCHIVE;
+SET default_storage_engine=ARCHIVE;
CREATE TABLE t1 (
Period smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL,
Varor_period smallint(4) unsigned DEFAULT '0' NOT NULL
diff --git a/mysql-test/suite/archive/archive.test b/mysql-test/suite/archive/archive.test
index 30f2766507e..2d184110a2d 100644
--- a/mysql-test/suite/archive/archive.test
+++ b/mysql-test/suite/archive/archive.test
@@ -11,7 +11,7 @@ call mtr.add_suppression("Table 't1' is marked as crashed and should be repaired
DROP TABLE if exists t1,t2,t3,t4,t5,t6;
--enable_warnings
-SET storage_engine=ARCHIVE;
+SET default_storage_engine=ARCHIVE;
let $MYSQLD_DATADIR= `SELECT @@datadir`;
CREATE TABLE t1 (
diff --git a/mysql-test/suite/archive/archive_gis.result b/mysql-test/suite/archive/archive_gis.result
index 6e7a5a2c1ea..e24cad80702 100644
--- a/mysql-test/suite/archive/archive_gis.result
+++ b/mysql-test/suite/archive/archive_gis.result
@@ -1,4 +1,4 @@
-SET storage_engine=archive;
+SET default_storage_engine=archive;
DROP TABLE IF EXISTS t1, gis_point, gis_line, gis_polygon, gis_multi_point, gis_multi_line, gis_multi_polygon, gis_geometrycollection, gis_geometry;
CREATE TABLE gis_point (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g POINT);
CREATE TABLE gis_line (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g LINESTRING);
diff --git a/mysql-test/suite/archive/archive_gis.test b/mysql-test/suite/archive/archive_gis.test
index ffbad923173..9ee27ba9fbf 100644
--- a/mysql-test/suite/archive/archive_gis.test
+++ b/mysql-test/suite/archive/archive_gis.test
@@ -1,3 +1,3 @@
--source include/have_archive.inc
-SET storage_engine=archive;
+SET default_storage_engine=archive;
--source include/gis_generic.inc
diff --git a/mysql-test/suite/binlog/include/binlog.test b/mysql-test/suite/binlog/include/binlog.test
index 948f226b3f5..9f3288b52f0 100644
--- a/mysql-test/suite/binlog/include/binlog.test
+++ b/mysql-test/suite/binlog/include/binlog.test
@@ -391,7 +391,7 @@ SHOW SESSION VARIABLES LIKE "unique_checks";
--echo # INSERT INTO t1 VALUES(2)
--echo # foreign_key_checks=1 and unique_checks=1
--echo # It should not change current session's variables, even error happens
-call mtr.add_suppression("Slave SQL.*Could not execute Write_rows_v1 event on table test.t1; Duplicate entry .2. for key .PRIMARY., Error_code: 1062");
+call mtr.add_suppression("BINLOG_BASE64_EVENT.*Could not execute Write_rows_v1 event on table test.t1; Duplicate entry .2. for key .PRIMARY., Error_code: 1062");
--error 1062
BINLOG '
dfLtTBMBAAAAKQAAAKsBAAAAABcAAAAAAAEABHRlc3QAAnQxAAEDAAE=
diff --git a/mysql-test/suite/binlog/include/binlog_xa_prepare_connection.inc b/mysql-test/suite/binlog/include/binlog_xa_prepare_connection.inc
new file mode 100644
index 00000000000..c0041af1e7f
--- /dev/null
+++ b/mysql-test/suite/binlog/include/binlog_xa_prepare_connection.inc
@@ -0,0 +1,31 @@
+#
+# This file initiate connections to run XA transactions up to
+# their prepare.
+# Connection name, transaction name and its content depends on
+# supplied parameters.
+#
+# param $type type of transaction
+# param $index index identifies the connection with those of type $type
+# param $sql_init1 a query to execute once connection is established
+# param $sql_init2 a query to execute once connection is established
+# param $sql_doit a query to execute inside transaction
+# Note, the query may depend on tables created by caller
+#
+
+--connect (conn$index$type, 127.0.0.1,root,,test,$MASTER_MYPORT,)
+if ($sql_init1)
+{
+ --eval $sql_init1
+}
+if ($sql_init2)
+{
+ --eval $sql_init2
+}
+
+--eval XA START 'trx$index$type'
+if ($sql_doit)
+{
+ --eval $sql_doit
+}
+--eval XA END 'trx$index$type'
+--eval XA PREPARE 'trx$index$type'
diff --git a/mysql-test/suite/binlog/include/binlog_xa_prepare_disconnect.inc b/mysql-test/suite/binlog/include/binlog_xa_prepare_disconnect.inc
new file mode 100644
index 00000000000..4a83aa5c282
--- /dev/null
+++ b/mysql-test/suite/binlog/include/binlog_xa_prepare_disconnect.inc
@@ -0,0 +1,37 @@
+#
+# This file disconnects two connections. One actively and one through
+# kill. It is included by binlog_xa_prepared_do_and_restart.
+#
+# param $type type of transaction
+# param $terminate_with how to conclude actively disconnecte:
+# XA COMMIT or XA ROLLBACK
+# param $conn3_id connection id of the being killed.
+# param $num_trx_prepared number of transactions prepared so far
+#
+--connection default
+
+--echo *** $num_trx_prepared prepared transactions must be in the list ***
+--replace_column 2 LEN1 3 LEN2 4 TRX_N
+XA RECOVER;
+
+--connection conn1$type
+--let $conn1_id=`SELECT connection_id()`
+--disconnect conn1$type
+
+--connection default
+--let $wait_condition= SELECT count(*) = 0 FROM v_processlist WHERE PROCESSLIST_ID = $conn1_id
+--source include/wait_condition.inc
+
+# It will conclude now
+--error 0,1402
+--eval $terminate_with 'trx1$type'
+
+--replace_result $conn3_id CONN_ID
+--eval KILL connection $conn3_id
+
+--let $wait_condition= SELECT count(*) = 0 FROM v_processlist WHERE PROCESSLIST_ID = $conn3_id
+--source include/wait_condition.inc
+
+# It will conclude now
+--error 0,1402
+--eval $terminate_with 'trx3$type'
diff --git a/mysql-test/suite/binlog/include/binlog_xa_prepared_do_and_restart.inc b/mysql-test/suite/binlog/include/binlog_xa_prepared_do_and_restart.inc
new file mode 100644
index 00000000000..cbd740fdae4
--- /dev/null
+++ b/mysql-test/suite/binlog/include/binlog_xa_prepared_do_and_restart.inc
@@ -0,0 +1,323 @@
+#
+# This file creates various kinds of prepared XA transactions,
+# manipulates their connection state and examines how their prepared
+# status behave while the transaction is disconnected, killed or
+# the server kisses it shutdown.
+# The file can be sourced multiple times
+# param $restart_number (as the number of inclusion) adjusts
+# verification logics.
+#
+# param [in] $conn_number Total number of connection each performing
+# one insert into table.
+# param [in] $commit_number Number of commits from either.
+# side of the server restart.
+# param [in] $rollback_number The same as the above just for rollback.
+# param [in] $term_number Number of transaction that are terminated
+# before server restarts
+# param [in] $killed_number Instead of disconnect make some
+# connections killed when their
+# transactions got prepared.
+# param [in] $server_disconn_number Make some connections disconnected
+# by shutdown rather than actively
+# param [in] $post_restart_conn_number Number a "warmup" connection
+# after server restart, they all commit
+# param [out] restart_number Counter to be incremented at the end of the test
+#
+
+# The test consists of three sections:
+# I. Corner cases check
+# II. Regular case check
+# III. Post server-restart verification
+
+
+#
+# I. Corner cases of
+#
+# A. XA with an update to a temp table
+# B. XA with SELECT
+# C. XA empty
+# Demonstrate their XA status upon prepare and how they react on disconnect and
+# shutdown.
+# In each of A,B,C three prepared transactions are set up.
+# trx1 is for disconnection, trx2 for shutdown, trx3 for being killed.
+# The A case additionally contains some XA prohibited state transaction check.
+#
+# D. Prove that not prepared XA remains to be cleared out by disconnection.
+#
+
+#
+# A. The temp table only prepared XA recovers only formally to
+# let post recovery XA COMMIT or XA ROLLBACK with no effect.
+
+--let $type = tmp
+--let $index = 1
+--let $sql_init1 = SET @@sql_log_bin = OFF
+--let $sql_init2 = CREATE TEMPORARY TABLE tmp$index (a int) ENGINE=innodb
+--let $sql_doit = INSERT INTO tmp$index SET a=$index
+--source suite/binlog/include/binlog_xa_prepare_connection.inc
+
+--let $index = 2
+--source suite/binlog/include/binlog_xa_prepare_connection.inc
+
+--let $index = 3
+--source suite/binlog/include/binlog_xa_prepare_connection.inc
+--let $conn3_id=`SELECT connection_id()`
+
+#
+# Various prohibited XA state changes to test here:
+#
+
+--connection default
+# Stealing is not allowed
+--error ER_XAER_NOTA
+--eval XA COMMIT 'trx1$type'
+--error ER_XAER_NOTA
+--eval XA ROLLBACK 'trx1$type'
+
+# Before disconnect: creating a duplicate is not allowed
+--error ER_XAER_DUPID
+--eval XA START 'trx1$type'
+
+# Manipulate now the prepared transactions.
+# Two to terminate, one to leave out.
+--let $terminate_with = XA COMMIT
+--let $num_trx_prepared = $index
+--source suite/binlog/include/binlog_xa_prepare_disconnect.inc
+
+#
+# B. "Read-only" (select) prepared XA recovers only formally to
+# let post recovery XA COMMIT or XA ROLLBACK with no effect.
+#
+--let $type=ro
+--let $index = 1
+--let $sql_init1 =
+--let $sql_init2 =
+--let $sql_doit = SELECT * from t ORDER BY a
+--source suite/binlog/include/binlog_xa_prepare_connection.inc
+
+--let $index = 2
+--source suite/binlog/include/binlog_xa_prepare_connection.inc
+
+--let $index = 3
+--source suite/binlog/include/binlog_xa_prepare_connection.inc
+--let $conn3_id=`SELECT connection_id()`
+
+--let $terminate_with = XA ROLLBACK
+# two three above section prepared transaction were terminated.
+--inc $num_trx_prepared
+--source suite/binlog/include/binlog_xa_prepare_disconnect.inc
+
+#
+# C. Empty prepared XA recovers only formally to
+# let post recovery XA COMMIT or XA ROLLBACK with no effect.
+#
+--let $type=empty
+--let $index = 1
+--let $sql_init1 =
+--let $sql_init2 =
+--let $sql_doit =
+--source suite/binlog/include/binlog_xa_prepare_connection.inc
+
+--let $index = 2
+--source suite/binlog/include/binlog_xa_prepare_connection.inc
+
+--let $index = 3
+--source suite/binlog/include/binlog_xa_prepare_connection.inc
+--let $conn3_id=`SELECT connection_id()`
+
+--let $terminate_with = XA COMMIT
+--inc $num_trx_prepared
+--source suite/binlog/include/binlog_xa_prepare_disconnect.inc
+
+#
+# D. Not prepared XA disconnects to be cleared out,
+# no effect on data left as well.
+# Few more prohibited XA state transactions is checked out.
+#
+--let $type=unprepared
+--let $prev_count=`SELECT count(*) from t`
+
+--connect(conn1$type, 127.0.0.1,root,,test,$MASTER_MYPORT,)
+--eval XA START 'trx1$type'
+INSERT INTO t set a=0;
+--eval XA END 'trx1$type'
+
+--error ER_XAER_RMFAIL
+INSERT INTO t set a=0;
+--error ER_XAER_RMFAIL
+--eval XA START 'trx1$type'
+--error ER_XAER_RMFAIL
+--eval XA START 'trx1$type'
+
+--disconnect conn1$type
+
+--connection default
+# No such transactions
+--error ER_XAER_NOTA
+--eval XA COMMIT 'trx1$type'
+if (`SELECT count(*) > $prev_count from t`)
+{
+ --echo *** Unexpected commit to the table. ***
+ --die
+}
+
+#
+# II. Regular case.
+#
+# Prepared transactions get disconnected in three ways:
+# actively, being killed and by the server shutdown.
+#
+--let $i=0
+while ($i < $conn_number)
+{
+ --connect (conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,)
+ --let $conn_id=`SELECT connection_id()`
+ --disable_reconnect
+ SET @@binlog_format = STATEMENT;
+ if (`SELECT $i % 2`)
+ {
+ SET @@binlog_format = ROW;
+ }
+ --eval XA START 'trx_$i'
+ --eval INSERT INTO t SET a=$i
+ --eval XA END 'trx_$i'
+ --eval XA PREPARE 'trx_$i'
+
+ --let $disc_via_kill=`SELECT $conn_number - $i <= $killed_number`
+ if (!$disc_via_kill)
+ {
+ --let $disc_via_shutdown=`SELECT $conn_number - $i <= $killed_number + $server_disconn_number`
+ if (!$disc_via_shutdown)
+ {
+ --disconnect conn$i
+ }
+ }
+ if ($disc_via_kill)
+ {
+ --connection default
+ --replace_result $conn_id CONN_ID
+ --eval KILL CONNECTION $conn_id
+ }
+
+ if (!$disc_via_shutdown)
+ {
+ --connection default
+ --let $wait_condition= SELECT count(*) = 0 FROM v_processlist WHERE PROCESSLIST_ID = $conn_id
+ --source include/wait_condition.inc
+ }
+ --inc $i
+}
+
+# [0, $rollback_number - 1] are rolled back now
+--connection default
+
+--let $i=0
+while ($i < $rollback_number)
+{
+ --eval XA ROLLBACK 'trx_$i'
+
+ --inc $i
+}
+
+# [$rollback_number, $rollback_number + $commit_number - 1] get committed
+while ($i < $term_number)
+{
+ --eval XA COMMIT 'trx_$i'
+
+ --inc $i
+}
+
+--source include/$how_to_restart
+
+#
+# III. Post server-restart verification.
+# It concludes survived XA:s with a number of commits and rollbacks
+# as configured in the 1st part to check expected results in the end.
+# Cleanup section consists of explicit disconnect (for killed, or
+# not disconnected before shutdown).
+#
+
+# New XA can be prepared and committed
+--let $k = 0
+while ($k < $post_restart_conn_number)
+{
+ --connect (conn_restart_$k, 127.0.0.1,root,,test,$MASTER_MYPORT,)
+ --let $conn_id=`SELECT connection_id()`
+ --eval XA START 'new_trx_$k'
+ --eval INSERT INTO t SET a=$k
+ --eval XA END 'new_trx_$k'
+ --eval XA PREPARE 'new_trx_$k'
+
+ --disconnect conn_restart_$k
+
+ --connection default
+ --let $wait_condition= SELECT count(*) = 0 FROM v_processlist WHERE PROCESSLIST_ID = $conn_id
+ --source include/wait_condition.inc
+
+ --inc $k
+}
+
+--connection default
+--let $k = 0
+while ($k < $post_restart_conn_number)
+{
+ --eval XA COMMIT 'new_trx_$k'
+ --inc $k
+}
+
+#
+# Symmetrically to the pre-restart, the resurrected trx:s are committed
+# [$term_number, $term_number + $commit_number - 1]
+# and the rest is rolled back.
+#
+--let $i = $term_number
+
+while ($i < `SELECT $term_number + $commit_number`)
+{
+ # Expected to fail
+ --error ER_XAER_DUPID
+ --eval XA START 'trx_$i'
+ --eval XA COMMIT 'trx_$i'
+ --inc $i
+}
+
+while ($i < $conn_number)
+{
+ # Expected to fail
+ --error ER_XAER_DUPID
+ --eval XA START 'trx_$i'
+ --eval XA ROLLBACK 'trx_$i'
+ --inc $i
+}
+
+#
+# Verification of correct results of recovered XA transaction handling:
+#
+SELECT * FROM t;
+
+--let $type=tmp
+--disconnect conn2$type
+--disconnect conn3$type
+--let $type=ro
+--disconnect conn2$type
+--disconnect conn3$type
+--let $type=empty
+--disconnect conn2$type
+--disconnect conn3$type
+
+--let $i= $conn_number
+--let $k= 0
+--let $expl_disconn_number = `SELECT $killed_number + $server_disconn_number`
+while ($k < $expl_disconn_number)
+{
+ --connection default
+ --error ER_XAER_NOTA
+ --eval XA ROLLBACK 'trx_$i'
+
+ --dec $i
+ --disconnect conn$i
+
+ --inc $k
+}
+
+--inc $restart_number
diff --git a/mysql-test/suite/binlog/include/print_optional_metadata.inc b/mysql-test/suite/binlog/include/print_optional_metadata.inc
new file mode 100644
index 00000000000..739903ab190
--- /dev/null
+++ b/mysql-test/suite/binlog/include/print_optional_metadata.inc
@@ -0,0 +1,34 @@
+# Auxaliary file for printing optional metadata in table_map_log_event
+# Usage :
+# --let $binlog_file=
+# [--let $stop_position]
+# [--let $print_primary_key]
+# --source extra/binlog_tests/print_optional_metadata.inc
+
+--let $output_file= $MYSQLTEST_VARDIR/tmp/mysqlbinlog.output
+
+--let $_stop_position_opt=
+if ($stop_position)
+{
+ --let $_stop_position_opt=--stop-position=$stop_position
+}
+
+--exec $MYSQL_BINLOG -F --print-table-metadata $_stop_position_opt $binlog_file > $output_file
+
+
+--let SEARCH_PATTERN= # (?:Columns\(| {8}).*
+--let SEARCH_FILE= $output_file
+--let SEARCH_OUTPUT=matches
+--let SEARCH_TYPE="_gm_"
+--source include/search_pattern_in_file.inc
+
+if ($print_primary_key)
+{
+ --let SEARCH_PATTERN= # Primary Key
+ --source include/search_pattern_in_file.inc
+}
+--remove_file $output_file
+--let $stop_position=
+--let $_stop_position_opt=
+
+
diff --git a/mysql-test/suite/binlog/r/binlog_base64_flag.result b/mysql-test/suite/binlog/r/binlog_base64_flag.result
index 114272329de..a75164992d5 100644
--- a/mysql-test/suite/binlog/r/binlog_base64_flag.result
+++ b/mysql-test/suite/binlog/r/binlog_base64_flag.result
@@ -1,3 +1,5 @@
+call mtr.add_suppression("BINLOG_BASE64_EVENT: According to the master's version");
+call mtr.add_suppression("BINLOG_BASE64_EVENT: Column 1 of table 'test.char128_utf8' cannot be converted");
DROP TABLE IF EXISTS t1;
==== Test BUG#32407 ====
select * from t1;
@@ -57,7 +59,7 @@ ROLLBACK/*!*/;
<#>
use `test`/*!*/;
SET TIMESTAMP=1196959712/*!*/;
-<#>SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+<#>SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
diff --git a/mysql-test/suite/binlog/r/binlog_bug23533.result b/mysql-test/suite/binlog/r/binlog_bug23533.result
index cc9799506c3..aa37427929b 100644
--- a/mysql-test/suite/binlog/r/binlog_bug23533.result
+++ b/mysql-test/suite/binlog/r/binlog_bug23533.result
@@ -9,7 +9,7 @@ disconnect default;
connect default,localhost,root,,test;
START TRANSACTION;
CREATE TABLE t2 SELECT * FROM t1;
-ERROR HY000: Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage; increase this mysqld variable and try again
+ERROR HY000: Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage
COMMIT;
SHOW TABLES LIKE 't%';
Tables_in_test (t%)
diff --git a/mysql-test/suite/binlog/r/binlog_drop_if_exists.result b/mysql-test/suite/binlog/r/binlog_drop_if_exists.result
index 937662a7a49..c918de9a907 100644
--- a/mysql-test/suite/binlog/r/binlog_drop_if_exists.result
+++ b/mysql-test/suite/binlog/r/binlog_drop_if_exists.result
@@ -164,3 +164,47 @@ master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test`; CREATE TABLE t1(id int)
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS /* */ `t1` /* generated by server */
+#
+# MDEV-22820 Bogus "Unknown table" warnings produced upon attempt to
+# drop parent table referenced by FK
+#
+create table t1 (a int, key(a)) engine=InnoDB;
+create table t2 (b int, foreign key(b) references t1(a)) engine=InnoDB;
+drop table if exists t1;
+ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails
+drop table if exists t1,t0;
+ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails
+show warnings;
+Level Code Message
+Error 1451 Cannot delete or update a parent row: a foreign key constraint fails
+Note 1051 Unknown table 'test.t0'
+drop table t2,t1;
+create table t3 (a int) engine=aria;
+drop table t10,t20;
+ERROR 42S02: Unknown table 'test.t10,test.t20'
+drop table t10,t20,t3;
+ERROR 42S02: Unknown table 'test.t10,test.t20'
+drop table if exists t10,t20;
+Warnings:
+Note 1051 Unknown table 'test.t10,test.t20'
+drop table if exists t10,t20,t3;
+Warnings:
+Note 1051 Unknown table 'test.t10,test.t20,test.t3'
+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`; create table t1 (a int, key(a)) engine=InnoDB
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # use `test`; create table t2 (b int, foreign key(b) references t1(a)) engine=InnoDB
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `t0` /* generated by server */
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # use `test`; DROP TABLE `t2`,`t1` /* generated by server */
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # use `test`; create table t3 (a int) engine=aria
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # use `test`; DROP TABLE `t10`,`t20`,`t3` /* generated by server */
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `t10`,`t20` /* generated by server */
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `t10`,`t20`,`t3` /* generated by server */
diff --git a/mysql-test/suite/binlog/r/binlog_empty_xa_prepared.result b/mysql-test/suite/binlog/r/binlog_empty_xa_prepared.result
new file mode 100644
index 00000000000..9f998e049c0
--- /dev/null
+++ b/mysql-test/suite/binlog/r/binlog_empty_xa_prepared.result
@@ -0,0 +1,110 @@
+CREATE TEMPORARY SEQUENCE seq_1;
+XA START '3';
+CREATE TEMPORARY TABLE tmp_1(c INT);
+XA END '3';
+XA PREPARE '3';
+DROP TEMPORARY TABLE tmp_1;
+ERROR XAE07: XAER_RMFAIL: The command cannot be executed when global transaction is in the PREPARED state
+ALTER TABLE tmp_1 DROP COLUMN c;
+ERROR XAE07: XAER_RMFAIL: The command cannot be executed when global transaction is in the PREPARED state
+DROP TEMPORARY SEQUENCE seq_1;
+ERROR XAE07: XAER_RMFAIL: The command cannot be executed when global transaction is in the PREPARED state
+ALTER SEQUENCE seq_1 INCREMENT BY 1;
+ERROR XAE07: XAER_RMFAIL: The command cannot be executed when global transaction is in the PREPARED state
+CREATE TEMPORARY TABLE tmp_2(c INT);
+ERROR XAE07: XAER_RMFAIL: The command cannot be executed when global transaction is in the PREPARED state
+CREATE TEMPORARY SEQUENCE seq_2;
+ERROR XAE07: XAER_RMFAIL: The command cannot be executed when global transaction is in the PREPARED state
+XA ROLLBACK '3';
+# Proof of correct logging incl empty XA-PREPARE
+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`; CREATE TEMPORARY SEQUENCE seq_1
+master-bin.000001 # Gtid # # BEGIN GTID #-#-#
+master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tmp_1(c INT)
+master-bin.000001 # Query # # COMMIT
+master-bin.000001 # Gtid # # XA START X'33',X'',1 GTID #-#-#
+master-bin.000001 # Query # # XA END X'33',X'',1
+master-bin.000001 # XA_prepare # # XA PREPARE X'33',X'',1
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # XA ROLLBACK X'33',X'',1
+RESET MASTER;
+CREATE TABLE t1 (a INT) ENGINE=MyISAM;
+CREATE TABLE t2 (id INT PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1),(2);
+INSERT INTO t2 VALUES (1),(2);
+XA START '1';
+REPLACE INTO t1 SELECT * FROM t1;
+REPLACE INTO t2 SELECT * FROM t2;
+XA END '1';
+XA PREPARE '1';
+XA ROLLBACK '1';
+Warnings:
+Warning 1196 Some non-transactional changed tables couldn't be rolled back
+DROP TABLE t1, t2;
+# Proof of correct logging incl empty XA-PREPARE
+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`; CREATE TABLE t1 (a INT) ENGINE=MyISAM
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # use `test`; CREATE TABLE t2 (id INT PRIMARY KEY) ENGINE=InnoDB
+master-bin.000001 # Gtid # # BEGIN GTID #-#-#
+master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1),(2)
+master-bin.000001 # Query # # COMMIT
+master-bin.000001 # Gtid # # BEGIN GTID #-#-#
+master-bin.000001 # Query # # use `test`; INSERT INTO t2 VALUES (1),(2)
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Gtid # # BEGIN GTID #-#-#
+master-bin.000001 # Annotate_rows # # REPLACE INTO t1 SELECT * FROM t1
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
+master-bin.000001 # Query # # COMMIT
+master-bin.000001 # Gtid # # XA START X'31',X'',1 GTID #-#-#
+master-bin.000001 # Query # # XA END X'31',X'',1
+master-bin.000001 # XA_prepare # # XA PREPARE X'31',X'',1
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # XA ROLLBACK X'31',X'',1
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # use `test`; DROP TABLE `t1`,`t2` /* generated by server */
+RESET MASTER;
+CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+CREATE SEQUENCE s ENGINE=InnoDB;
+XA START '2';
+SELECT NEXT VALUE FOR s;
+NEXT VALUE FOR s
+1
+REPLACE INTO t1 SELECT * FROM t1;
+XA END '2';
+XA PREPARE '2';
+XA ROLLBACK '2';
+DROP SEQUENCE s;
+DROP TABLE t1;
+# Proof of correct logging incl empty XA-PREPARE
+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`; CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB
+master-bin.000001 # Gtid # # BEGIN GTID #-#-#
+master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (1)
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # use `test`; CREATE SEQUENCE s ENGINE=InnoDB
+master-bin.000001 # Gtid # # BEGIN GTID #-#-#
+master-bin.000001 # Annotate_rows # # SELECT NEXT VALUE FOR s
+master-bin.000001 # Table_map # # table_id: # (test.s)
+master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
+master-bin.000001 # Query # # COMMIT
+master-bin.000001 # Gtid # # XA START X'32',X'',1 GTID #-#-#
+master-bin.000001 # Query # # XA END X'32',X'',1
+master-bin.000001 # XA_prepare # # XA PREPARE X'32',X'',1
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # XA ROLLBACK X'32',X'',1
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # use `test`; DROP SEQUENCE `s` /* generated by server */
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */
diff --git a/mysql-test/suite/binlog/r/binlog_grant.result b/mysql-test/suite/binlog/r/binlog_grant.result
index e077182fe8b..af4c02411d5 100644
--- a/mysql-test/suite/binlog/r/binlog_grant.result
+++ b/mysql-test/suite/binlog/r/binlog_grant.result
@@ -14,7 +14,7 @@ set session sql_log_bin = 1;
connection plain;
[plain]
set session sql_log_bin = 1;
-ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
+ERROR 42000: Access denied; you need (at least one of) the SUPER, BINLOG ADMIN privilege(s) for this operation
**** Variable BINLOG_FORMAT ****
connection root;
[root]
@@ -23,9 +23,9 @@ set session binlog_format = row;
connection plain;
[plain]
set global binlog_format = row;
-ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
+ERROR 42000: Access denied; you need (at least one of) the SUPER, BINLOG ADMIN privilege(s) for this operation
set session binlog_format = row;
-ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
+ERROR 42000: Access denied; you need (at least one of) the SUPER, BINLOG ADMIN privilege(s) for this operation
**** Clean up ****
disconnect plain;
disconnect root;
@@ -38,6 +38,115 @@ connect rpl,localhost,mysqltest_1,,;
connection rpl;
SHOW MASTER LOGS;
SHOW BINARY LOGS;
+SHOW BINLOG STATUS;
disconnect rpl;
connection default;
DROP USER 'mysqltest_1'@'localhost';
+#
+# Start of 10.5 test
+#
+#
+# MDEV-21743 Split up SUPER privilege to smaller privileges
+#
+# Test that REPLICATION CLIENT is an alias for BINLOG MONITOR
+CREATE USER user1@localhost;
+GRANT REPLICATION CLIENT ON *.* TO user1@localhost;
+SHOW GRANTS FOR user1@localhost;
+Grants for user1@localhost
+GRANT BINLOG MONITOR ON *.* TO `user1`@`localhost`
+REVOKE REPLICATION CLIENT ON *.* FROM user1@localhost;
+SHOW GRANTS FOR user1@localhost;
+Grants for user1@localhost
+GRANT USAGE ON *.* TO `user1`@`localhost`
+DROP USER user1@localhost;
+# Test if SHOW BINARY LOGS and SHOW BINGLOG STATUS are not allowed without REPLICATION CLIENT or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE REPLICATION CLIENT, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SHOW MASTER LOGS;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, BINLOG MONITOR privilege(s) for this operation
+SHOW BINARY LOGS;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, BINLOG MONITOR privilege(s) for this operation
+SHOW BINLOG STATUS;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, BINLOG MONITOR privilege(s) for this operation
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test if PURGE BINARY LOGS is not allowed without BINLOG ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE BINLOG ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+PURGE BINARY LOGS BEFORE '2001-01-01 00:00:00';
+ERROR 42000: Access denied; you need (at least one of) the SUPER, BINLOG ADMIN privilege(s) for this operation
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test if PURGE BINLOG is allowed with BINLOG ADMIN
+CREATE USER user1@localhost;
+GRANT BINLOG ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+PURGE BINARY LOGS BEFORE '2001-01-01 00:00:00';
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test if PURGE BINLOG is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+PURGE BINARY LOGS BEFORE '2001-01-01 00:00:00';
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test if SHOW BINLOG EVENTS is not allowed without BINLOG MONITOR
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE BINLOG MONITOR ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SHOW BINLOG EVENTS;
+ERROR 42000: Access denied; you need (at least one of) the BINLOG MONITOR privilege(s) for this operation
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test if SHOW BINLOG EVENTS is allowed with BINLOG MONITOR
+CREATE USER user1@localhost;
+GRANT BINLOG MONITOR ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SHOW BINLOG EVENTS;
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+#
+# MDEV-21975 Add BINLOG REPLAY privilege and bind new privileges to
+# gtid_seq_no, preudo_thread_id, server_id, gtid_domain_id
+#
+# Test combinations of BINLOG REPLAY guarded features which typically
+# arise in mysqlbinlog output replay on server.
+#
+CREATE USER user1@localhost;
+GRANT BINLOG REPLAY ON *.* TO user1@localhost;
+RESET MASTER;
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1),(2),(3);
+connect user1,localhost,user1,,;
+RENAME TABLE t1 to t2;
+connection default;
+REVOKE BINLOG REPLAY ON *.* FROM user1@localhost;
+call mtr.add_suppression("Access denied; you need (at least one of) the SUPER, BINLOG REPLAY privilege(s) for this operation");
+# Privilege errors are expected now:
+connection user1;
+connection default;
+include/diff_tables.inc [t1,t2]
+# Test cleanup
+DROP TABLE t2,t1;
+DROP USER user1@localhost;
+#
+# End of 10.5 test
+#
diff --git a/mysql-test/suite/binlog/r/binlog_mixed.result b/mysql-test/suite/binlog/r/binlog_mixed.result
new file mode 100644
index 00000000000..1f30f21a9b4
--- /dev/null
+++ b/mysql-test/suite/binlog/r/binlog_mixed.result
@@ -0,0 +1,11 @@
+CREATE TABLE t1 (a INT) ENGINE=InnoDB;
+INSERT INTO t1 (a) VALUES (1),(2);
+CREATE TABLE t2 (b INT) ENGINE=InnoDB;
+CREATE TRIGGER tr1 BEFORE UPDATE ON t1 FOR EACH ROW SET @a = 0;
+CREATE TRIGGER tr2 BEFORE INSERT ON t2 FOR EACH ROW DELETE FROM t1 LIMIT 1;
+SET AUTOCOMMIT= OFF;
+LOCK TABLES t2 WRITE;
+DELETE FROM t1 LIMIT 1;
+SAVEPOINT A;
+UNLOCK TABLES;
+DROP TABLE t1, t2;
diff --git a/mysql-test/suite/binlog/r/binlog_mysqlbinlog2.result b/mysql-test/suite/binlog/r/binlog_mysqlbinlog2.result
index 2a0e1d3c810..1d6e94249dc 100644
--- a/mysql-test/suite/binlog/r/binlog_mysqlbinlog2.result
+++ b/mysql-test/suite/binlog/r/binlog_mysqlbinlog2.result
@@ -25,7 +25,7 @@ ROLLBACK/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1773142/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -97,7 +97,7 @@ SET INSERT_ID=1/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1773142/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -163,7 +163,7 @@ SET INSERT_ID=3/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1773144/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -208,7 +208,7 @@ ROLLBACK/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1773142/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -253,7 +253,7 @@ SET INSERT_ID=3/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1773144/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -280,7 +280,7 @@ SET INSERT_ID=3/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1773144/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -325,7 +325,7 @@ ROLLBACK/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1773142/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -368,7 +368,7 @@ ROLLBACK/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1773142/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -430,7 +430,7 @@ SET INSERT_ID=6/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1773143/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -460,7 +460,7 @@ SET INSERT_ID=1/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1773142/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -516,7 +516,7 @@ SET INSERT_ID=6/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1773143/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -546,7 +546,7 @@ SET INSERT_ID=3/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1773144/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -584,7 +584,7 @@ SET INSERT_ID=6/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1773143/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -611,7 +611,7 @@ ROLLBACK/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1773142/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -687,7 +687,7 @@ SET INSERT_ID=3/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1773144/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -725,7 +725,7 @@ SET INSERT_ID=6/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1773143/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -752,7 +752,7 @@ ROLLBACK/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1773142/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -794,7 +794,7 @@ ROLLBACK/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1773142/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -866,7 +866,7 @@ SET INSERT_ID=1/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1773142/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -931,7 +931,7 @@ SET INSERT_ID=3/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1773144/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -976,7 +976,7 @@ ROLLBACK/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1773142/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -1020,7 +1020,7 @@ SET INSERT_ID=3/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1773144/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -1047,7 +1047,7 @@ SET INSERT_ID=3/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1773144/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -1092,7 +1092,7 @@ ROLLBACK/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1773142/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -1134,7 +1134,7 @@ ROLLBACK/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1773142/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -1196,7 +1196,7 @@ SET INSERT_ID=6/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1773143/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -1226,7 +1226,7 @@ SET INSERT_ID=1/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1773142/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -1282,7 +1282,7 @@ SET INSERT_ID=6/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1773143/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -1311,7 +1311,7 @@ SET INSERT_ID=3/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1773144/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -1349,7 +1349,7 @@ SET INSERT_ID=6/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1773143/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -1376,7 +1376,7 @@ ROLLBACK/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1773142/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -1450,7 +1450,7 @@ SET INSERT_ID=3/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1773144/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -1488,7 +1488,7 @@ SET INSERT_ID=6/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1773143/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -1515,7 +1515,7 @@ ROLLBACK/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1773142/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -1557,7 +1557,7 @@ ROLLBACK/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1773142/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
diff --git a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row.result b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row.result
index 3e01ba7e5cb..1cfb6bce801 100644
--- a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row.result
+++ b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row.result
@@ -376,7 +376,7 @@ ROLLBACK/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=#/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=1411383296/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -5386,7 +5386,7 @@ DELIMITER /*!*/;
use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=#/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=1411383296/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
diff --git a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_innodb.result b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_innodb.result
index d8a5864ba3d..5fce079ef24 100644
--- a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_innodb.result
+++ b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_innodb.result
@@ -2268,7 +2268,7 @@ ROLLBACK/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=#/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C utf8 *//*!*/;
@@ -5277,7 +5277,7 @@ ROLLBACK/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=#/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C utf8 *//*!*/;
@@ -5677,7 +5677,7 @@ ROLLBACK/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=#/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C utf8 *//*!*/;
@@ -6315,7 +6315,7 @@ ROLLBACK/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=#/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C utf8 *//*!*/;
diff --git a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_myisam.result b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_myisam.result
index a75593055d7..47b366fc61b 100644
--- a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_myisam.result
+++ b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_myisam.result
@@ -2268,7 +2268,7 @@ ROLLBACK/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=#/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C utf8 *//*!*/;
@@ -5300,7 +5300,7 @@ ROLLBACK/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=#/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C utf8 *//*!*/;
@@ -5706,7 +5706,7 @@ ROLLBACK/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=#/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C utf8 *//*!*/;
@@ -6354,7 +6354,7 @@ ROLLBACK/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=#/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C utf8 *//*!*/;
diff --git a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_trans.result b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_trans.result
index 545cb8f7857..349dc8b7610 100644
--- a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_trans.result
+++ b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_trans.result
@@ -146,7 +146,7 @@ ROLLBACK/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=#/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=1411383296/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
diff --git a/mysql-test/suite/binlog/r/binlog_row_annotate.result b/mysql-test/suite/binlog/r/binlog_row_annotate.result
index 04a007ffa41..e41258ccafd 100644
--- a/mysql-test/suite/binlog/r/binlog_row_annotate.result
+++ b/mysql-test/suite/binlog/r/binlog_row_annotate.result
@@ -116,7 +116,7 @@ ROLLBACK/*!*/;
#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=#/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -354,7 +354,7 @@ ROLLBACK/*!*/;
#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=#/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -513,7 +513,7 @@ ROLLBACK/*!*/;
#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=#/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -739,7 +739,7 @@ ROLLBACK/*!*/;
#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=#/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -977,7 +977,7 @@ ROLLBACK/*!*/;
#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=#/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -1136,7 +1136,7 @@ ROLLBACK/*!*/;
#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=#/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
diff --git a/mysql-test/suite/binlog/r/binlog_row_binlog.result b/mysql-test/suite/binlog/r/binlog_row_binlog.result
index f15e2f9a0f1..a1622c138ee 100644
--- a/mysql-test/suite/binlog/r/binlog_row_binlog.result
+++ b/mysql-test/suite/binlog/r/binlog_row_binlog.result
@@ -1054,7 +1054,7 @@ unique_checks OFF
# INSERT INTO t1 VALUES(2)
# foreign_key_checks=1 and unique_checks=1
# It should not change current session's variables, even error happens
-call mtr.add_suppression("Slave SQL.*Could not execute Write_rows_v1 event on table test.t1; Duplicate entry .2. for key .PRIMARY., Error_code: 1062");
+call mtr.add_suppression("BINLOG_BASE64_EVENT.*Could not execute Write_rows_v1 event on table test.t1; Duplicate entry .2. for key .PRIMARY., Error_code: 1062");
BINLOG '
dfLtTBMBAAAAKQAAAKsBAAAAABcAAAAAAAEABHRlc3QAAnQxAAEDAAE=
dfLtTBcBAAAAIgAAAM0BAAAAABcAAAAAAAEAAf/+AgAAAA==
diff --git a/mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result b/mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result
index 0fe726766d2..fc07aed7123 100644
--- a/mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result
+++ b/mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result
@@ -22,7 +22,7 @@ START TRANSACTION
#Q> insert into t2 values (@v)
SET TIMESTAMP=10000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=1411383296/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -92,7 +92,7 @@ DELIMITER /*!*/;
use `test`/*!*/;
SET TIMESTAMP=XXX/*!*/;
SET @@session.pseudo_thread_id=#/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=1411383296/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C utf8 *//*!*/;
diff --git a/mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_options.result b/mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_options.result
index 0232443573a..8fc90fd968c 100644
--- a/mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_options.result
+++ b/mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_options.result
@@ -50,7 +50,7 @@ use `new_test1`/*!*/;
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=#/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=1411383296/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -291,7 +291,7 @@ use `new_test1`/*!*/;
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=#/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=1411383296/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
diff --git a/mysql-test/suite/binlog/r/binlog_stm_binlog.result b/mysql-test/suite/binlog/r/binlog_stm_binlog.result
index 7ef943625de..7071cb3ba43 100644
--- a/mysql-test/suite/binlog/r/binlog_stm_binlog.result
+++ b/mysql-test/suite/binlog/r/binlog_stm_binlog.result
@@ -650,7 +650,7 @@ unique_checks OFF
# INSERT INTO t1 VALUES(2)
# foreign_key_checks=1 and unique_checks=1
# It should not change current session's variables, even error happens
-call mtr.add_suppression("Slave SQL.*Could not execute Write_rows_v1 event on table test.t1; Duplicate entry .2. for key .PRIMARY., Error_code: 1062");
+call mtr.add_suppression("BINLOG_BASE64_EVENT.*Could not execute Write_rows_v1 event on table test.t1; Duplicate entry .2. for key .PRIMARY., Error_code: 1062");
BINLOG '
dfLtTBMBAAAAKQAAAKsBAAAAABcAAAAAAAEABHRlc3QAAnQxAAEDAAE=
dfLtTBcBAAAAIgAAAM0BAAAAABcAAAAAAAEAAf/+AgAAAA==
diff --git a/mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result b/mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result
index 05b1520724a..f7bc552c4e5 100644
--- a/mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result
+++ b/mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result
@@ -21,7 +21,7 @@ SET @`v`:=_ucs2 X'006100620063' COLLATE `ucs2_general_ci`/*!*/;
use `test`/*!*/;
SET TIMESTAMP=10000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=1411383296/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -94,7 +94,7 @@ DELIMITER /*!*/;
use `test`/*!*/;
SET TIMESTAMP=XXX/*!*/;
SET @@session.pseudo_thread_id=#/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=1411383296/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C utf8 *//*!*/;
diff --git a/mysql-test/suite/binlog/r/binlog_table_map_optional_metadata.result b/mysql-test/suite/binlog/r/binlog_table_map_optional_metadata.result
new file mode 100644
index 00000000000..cb34f48fb69
--- /dev/null
+++ b/mysql-test/suite/binlog/r/binlog_table_map_optional_metadata.result
@@ -0,0 +1,312 @@
+RESET MASTER;
+SET GLOBAL binlog_row_metadata = MINIMAL;
+#
+# Temporal types can be printed correctly
+#
+CREATE TABLE t1(c_year YEAR, c_date DATE, c_time TIME, c_time_f TIME(3),
+c_datetime DATETIME, c_datetime_f DATETIME(3),
+c_timestamp TIMESTAMP, c_timestamp_f TIMESTAMP(3) DEFAULT "2017-1-1 10:10:10");
+INSERT INTO t1(c_year) VALUES(2017);
+# Columns(YEAR,
+# DATE,
+# TIME,
+# TIME(3),
+# DATETIME,
+# DATETIME(3),
+# TIMESTAMP NOT NULL,
+# TIMESTAMP(3) NOT NULL)
+DROP TABLE t1;
+RESET MASTER;
+#
+# Geometry types can be printed correctly
+#
+CREATE TABLE t1 (c_geo GEOMETRY, c_point POINT, c_linestring LINESTRING,
+c_polygon POLYGON, c_multi_point MULTIPOINT,
+c_multi_linestring MULTILINESTRING, c_multi_polygon MULTIPOLYGON,
+c_geometrycollection GEOMETRYCOLLECTION, c_char CHAR(100));
+INSERT INTO t1(c_point) VALUES(ST_PointFromText('POINT(10 10)'));
+# Columns(GEOMETRY,
+# POINT,
+# LINESTRING,
+# POLYGON,
+# MULTIPOINT,
+# MULTILINESTRING,
+# MULTIPOLYGON,
+# GEOMETRYCOLLECTION,
+# CHAR(100) CHARSET latin1 COLLATE latin1_swedish_ci)
+RESET MASTER;
+SET GLOBAL binlog_row_metadata = FULL;
+INSERT INTO t1(c_point) VALUES(ST_PointFromText('POINT(10 10)'));
+# Columns(`c_geo` GEOMETRY,
+# `c_point` POINT,
+# `c_linestring` LINESTRING,
+# `c_polygon` POLYGON,
+# `c_multi_point` MULTIPOINT,
+# `c_multi_linestring` MULTILINESTRING,
+# `c_multi_polygon` MULTIPOLYGON,
+# `c_geometrycollection` GEOMETRYCOLLECTION,
+# `c_char` CHAR(100) CHARSET latin1 COLLATE latin1_swedish_ci)
+DROP TABLE t1;
+RESET MASTER;
+#
+# Numeric types can be printed correctly
+#
+CREATE TABLE t1(c_bit BIT(10), c_bool BOOL, c_smallint SMALLINT,
+c_mediumint MEDIUMINT, c_int INT UNSIGNED, c_bigint BIGINT,
+c_float FLOAT UNSIGNED, c_double DOUBLE, c_decimal DECIMAL(10, 2));
+SET GLOBAL binlog_row_metadata = MINIMAL;
+INSERT INTO t1(c_bool) VALUES(1);
+# UNSIGNED flag should be printed
+# Columns(BIT(10),
+# TINYINT,
+# SMALLINT,
+# MEDIUMINT,
+# INT UNSIGNED,
+# BIGINT,
+# FLOAT UNSIGNED,
+# DOUBLE,
+# DECIMAL(10,2))
+RESET MASTER;
+SET GLOBAL binlog_row_metadata = FULL;
+INSERT INTO t1(c_bool) VALUES(1);
+# Columns(`c_bit` BIT(10),
+# `c_bool` TINYINT,
+# `c_smallint` SMALLINT,
+# `c_mediumint` MEDIUMINT,
+# `c_int` INT UNSIGNED,
+# `c_bigint` BIGINT,
+# `c_float` FLOAT UNSIGNED,
+# `c_double` DOUBLE,
+# `c_decimal` DECIMAL(10,2))
+DROP TABLE t1;
+RESET MASTER;
+#
+# Character types can be printed correctly
+#
+CREATE TABLE t1(c_char CHAR(10), c_varchar VARCHAR(500),
+c_tinytext TINYTEXT, c_text TEXT,
+c_mediumtext MEDIUMTEXT, c_longtext LONGTEXT CHARSET utf8);
+SET GLOBAL binlog_row_metadata = MINIMAL;
+INSERT INTO t1(c_char) VALUES("1");
+# Columns(CHAR(10) CHARSET latin1 COLLATE latin1_swedish_ci,
+# VARCHAR(500) CHARSET latin1 COLLATE latin1_swedish_ci,
+# TINYTEXT CHARSET latin1 COLLATE latin1_swedish_ci,
+# TEXT CHARSET latin1 COLLATE latin1_swedish_ci,
+# MEDIUMTEXT CHARSET latin1 COLLATE latin1_swedish_ci,
+# LONGTEXT CHARSET utf8 COLLATE utf8_general_ci)
+RESET MASTER;
+SET GLOBAL binlog_row_metadata = FULL;
+INSERT INTO t1(c_char) VALUES("1");
+# Columns(`c_char` CHAR(10) CHARSET latin1 COLLATE latin1_swedish_ci,
+# `c_varchar` VARCHAR(500) CHARSET latin1 COLLATE latin1_swedish_ci,
+# `c_tinytext` TINYTEXT CHARSET latin1 COLLATE latin1_swedish_ci,
+# `c_text` TEXT CHARSET latin1 COLLATE latin1_swedish_ci,
+# `c_mediumtext` MEDIUMTEXT CHARSET latin1 COLLATE latin1_swedish_ci,
+# `c_longtext` LONGTEXT CHARSET utf8 COLLATE utf8_general_ci)
+DROP TABLE t1;
+RESET MASTER;
+#
+# Column names with non-ascii characters and escape characters can be printed correctly
+#
+set names utf8;
+CREATE TABLE t1(`åäö表\a'``"` INT);
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `åäö表\a'``"` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+INSERT INTO t1 VALUES(1);
+# Columns(`åäö表\\a\'`"` INT)
+DROP TABLE t1;
+RESET MASTER;
+#
+# Charsets can be printed correctly
+#
+CREATE TABLE t1(c_char_utf8 CHAR(10) CHARSET utf8,
+c_varchar_utf8 VARCHAR(10) CHARSET utf8,
+c_text_utf8 TEXT CHARSET utf8);
+INSERT INTO t1 VALUES("1", "2", "3");
+# Columns(`c_char_utf8` CHAR(10) CHARSET utf8 COLLATE utf8_general_ci,
+# `c_varchar_utf8` VARCHAR(10) CHARSET utf8 COLLATE utf8_general_ci,
+# `c_text_utf8` TEXT CHARSET utf8 COLLATE utf8_general_ci)
+DROP TABLE t1;
+RESET MASTER;
+CREATE TABLE t1(c_utf8mb4_520 CHAR(10) CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci,
+c_utf8mb4_0900 VARCHAR(10) CHARSET utf8mb4 COLLATE utf8mb4_polish_ci,
+c_utf8mb4_def TEXT CHARSET utf8mb4);
+INSERT INTO t1 VALUES("1", "2", "3");
+# Columns(`c_utf8mb4_520` CHAR(10) CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci,
+# `c_utf8mb4_0900` VARCHAR(10) CHARSET utf8mb4 COLLATE utf8mb4_polish_ci,
+# `c_utf8mb4_def` TEXT CHARSET utf8mb4 COLLATE utf8mb4_general_ci)
+DROP TABLE t1;
+RESET MASTER;
+#
+# Blob and binary columns can be printed correctly
+#
+CREATE TABLE t1(c_binary BINARY(10), c_varbinary VARBINARY(10),
+c_tinyblob TINYBLOB, c_blob BLOB,
+c_mediumblob MEDIUMBLOB, c_longblob LONGBLOB);
+INSERT INTO t1 VALUES("1", "2", "3", "4", "5", "6");
+# Columns(`c_binary` BINARY(10),
+# `c_varbinary` VARBINARY(10),
+# `c_tinyblob` TINYBLOB,
+# `c_blob` BLOB,
+# `c_mediumblob` MEDIUMBLOB,
+# `c_longblob` LONGBLOB)
+DROP TABLE t1;
+RESET MASTER;
+#
+# Verify that SET string values and character sets can be printed correctly
+#
+set names utf8;
+CREATE TABLE t1(
+c_set_1 SET("set1_v1_å", "set1_v2_ä", "set1_v3_ö"),
+c_set_2 SET("set2_v1_å", "set2_v2_ä", "set2_v3_ö") CHARACTER SET latin1,
+c_set_4 SET("set3_v1_å", "set3_v2_ä", "set3_v3_ö") CHARACTER SET swe7 COLLATE swe7_bin);
+SET GLOBAL binlog_row_metadata = MINIMAL;
+INSERT INTO t1 VALUES("set1_v1_å", "set2_v3_ö", "set3_v1_å");
+# Columns(SET,
+# SET,
+# SET)
+RESET MASTER;
+SET GLOBAL binlog_row_metadata = FULL;
+INSERT INTO t1 VALUES("set1_v1_å", "set2_v3_ö", "set3_v1_å");
+# Columns(`c_set_1` SET('set1_v1_å','set1_v2_ä','set1_v3_ö') CHARSET latin1 COLLATE latin1_swedish_ci,
+# `c_set_2` SET('set2_v1_å','set2_v2_ä','set2_v3_ö') CHARSET latin1 COLLATE latin1_swedish_ci,
+# `c_set_4` SET('set3_v1_}','set3_v2_{','set3_v3_|') CHARSET swe7 COLLATE swe7_bin)
+DROP TABLE t1;
+RESET MASTER;
+#
+# Verify that ENUM string values and character sets can be printed correctly
+#
+CREATE TABLE t1(
+c_enum_1 ENUM("enum1_v1_å", "enum1_v2_ä", "enum1_v3_ö"),
+c_enum_3 ENUM("enum2_v1_å", "enum2_v2_ä", "enum2_v3_ö") CHARACTER SET latin1,
+c_enum_4 ENUM("enum3_v1_å", "enum3_v2_ä", "enum3_v3_ö") CHARACTER SET swe7 COLLATE swe7_bin);
+SET GLOBAL binlog_row_metadata = MINIMAL;
+INSERT INTO t1 VALUES("enum1_v1_å", "enum2_v3_ö", "enum3_v1_å");
+# Columns(ENUM,
+# ENUM,
+# ENUM)
+RESET MASTER;
+SET GLOBAL binlog_row_metadata = FULL;
+INSERT INTO t1 VALUES("enum1_v1_å", "enum2_v3_ö", "enum3_v1_å");
+# Columns(`c_enum_1` ENUM('enum1_v1_å','enum1_v2_ä','enum1_v3_ö') CHARSET latin1 COLLATE latin1_swedish_ci,
+# `c_enum_3` ENUM('enum2_v1_å','enum2_v2_ä','enum2_v3_ö') CHARSET latin1 COLLATE latin1_swedish_ci,
+# `c_enum_4` ENUM('enum3_v1_}','enum3_v2_{','enum3_v3_|') CHARSET swe7 COLLATE swe7_bin)
+DROP TABLE t1;
+RESET MASTER;
+#
+# Verify that explicit NOT NULL can be printed correctly
+#
+CREATE TABLE t1(c_not_null1 INT NOT NULL, c_null1 INT, c_not_null2 INT NOT NULL,
+c_null2 INT);
+INSERT INTO t1 VALUES(1, 2, 3, 4);
+# Columns(`c_not_null1` INT NOT NULL,
+# `c_null1` INT,
+# `c_not_null2` INT NOT NULL,
+# `c_null2` INT)
+DROP TABLE t1;
+RESET MASTER;
+#
+# Verify that primary key can be printed correctly
+#
+CREATE TABLE t1(c_key1 INT, c_key3 INT, c_not_key INT, c_key2 INT,
+PRIMARY KEY(c_key1, c_key2, c_key3));
+INSERT INTO t1 VALUES(1, 2, 3, 4);
+# Columns(`c_key1` INT NOT NULL,
+# `c_key3` INT NOT NULL,
+# `c_not_key` INT,
+# `c_key2` INT NOT NULL)
+# Primary Key
+DROP TABLE t1;
+RESET MASTER;
+CREATE TABLE t1(c_key1 CHAR(100), c_key3 CHAR(100), c_not_key INT, c_key2 CHAR(10),
+PRIMARY KEY(c_key1(5), c_key2, c_key3(10)));
+INSERT INTO t1 VALUES("1", "2", 3, "4");
+# Columns(`c_key1` CHAR(100) NOT NULL CHARSET latin1 COLLATE latin1_swedish_ci,
+# `c_key3` CHAR(100) NOT NULL CHARSET latin1 COLLATE latin1_swedish_ci,
+# `c_not_key` INT,
+# `c_key2` CHAR(10) NOT NULL CHARSET latin1 COLLATE latin1_swedish_ci)
+# Primary Key
+RESET MASTER;
+SET GLOBAL binlog_row_metadata = MINIMAL;
+INSERT INTO t1 VALUES("2", "2", 3, "4");
+# Columns(CHAR(100) NOT NULL CHARSET latin1 COLLATE latin1_swedish_ci,
+# CHAR(100) NOT NULL CHARSET latin1 COLLATE latin1_swedish_ci,
+# INT,
+# CHAR(10) NOT NULL CHARSET latin1 COLLATE latin1_swedish_ci)
+RESET MASTER;
+#
+# Coverage test: Print column index instead of column name if column name
+# is not binlogged.
+#
+SET GLOBAL binlog_row_metadata = FULL;
+SET SESSION debug_dbug = 'd, dont_log_column_name';
+INSERT INTO t1 VALUES("3", "2", 3, "4");
+# Columns(`c_key1` CHAR(100) NOT NULL CHARSET latin1 COLLATE latin1_swedish_ci,
+# `c_key3` CHAR(100) NOT NULL CHARSET latin1 COLLATE latin1_swedish_ci,
+# `c_not_key` INT,
+# `c_key2` CHAR(10) NOT NULL CHARSET latin1 COLLATE latin1_swedish_ci)
+# Primary Key
+DROP TABLE t1;
+RESET MASTER;
+#
+# Coverage test: Inject an invalid column type
+#
+CREATE TABLE t1(c1 int, c2 BLOB);
+SET SESSION debug_dbug = 'd,inject_invalid_column_type';
+INSERT INTO t1 VALUES(1, "a");
+# Columns(`c1` INT,
+# `c2` INVALID_TYPE(230))
+RESET MASTER;
+#
+# Coverage test: Inject an invalid BLOB metadata
+#
+SET SESSION debug_dbug = 'd,inject_invalid_blob_size';
+INSERT INTO t1 VALUES(2, "b");
+# Columns(`c1` INT,
+# `c2` INVALID_BLOB(5))
+#
+# Coverage test: Inject an invalid Geometry type
+#
+DROP TABLE t1;
+CREATE TABLE t1(c_geometry GEOMETRY, c_point POINT, c_multilinestring MULTILINESTRING);
+RESET MASTER;
+SET SESSION debug_dbug = 'd,inject_invalid_geometry_type';
+INSERT INTO t1(c_point) VALUES(ST_PointFromText('POINT(10 10)'));
+# Columns(`c_geometry` INVALID_GEOMETRY_TYPE(100),
+# `c_point` INVALID_GEOMETRY_TYPE(100),
+# `c_multilinestring` INVALID_GEOMETRY_TYPE(100))
+DROP TABLE t1;
+RESET MASTER;
+#
+# Comptibility Test: Verify mysqlbinlog can print OLD table_map_log_event
+# without any optional metadata
+#
+CREATE TABLE t1(c_int INT, c_tiny_int_unsigned TINYINT UNSIGNED,
+c_binary BINARY(10), c_text TEXT, c_point POINT);
+SET session debug_dbug='d,simulate_no_optional_metadata';
+INSERT INTO t1(c_int) VALUES(1);
+# Columns(INT,
+# TINYINT,
+# BINARY(10),
+# BLOB,
+# GEOMETRY)
+DROP TABLE t1;
+RESET MASTER;
+#
+# Simulate error on initializing charset and primary key metadata
+#
+CREATE TABLE t1(c1 char(10) PRIMARY KEY);
+SET session debug_dbug='d,simulate_init_charset_field_error';
+INSERT INTO t1 VALUES("a");
+SET GLOBAL binlog_row_metadata = FULL;
+SET session debug_dbug='d,simulate_init_primary_key_field_error';
+INSERT INTO t1 VALUES("b");
+# Columns(BINARY(10) NOT NULL)
+# Columns(BINARY(10) NOT NULL)
+SET SESSION debug_dbug = '';
+SET GLOBAL binlog_row_metadata = NO_LOG;
+DROP TABLE t1;
+RESET MASTER;
diff --git a/mysql-test/suite/binlog/r/binlog_table_map_optional_metadata_binary.result b/mysql-test/suite/binlog/r/binlog_table_map_optional_metadata_binary.result
new file mode 100644
index 00000000000..789bc6cd178
--- /dev/null
+++ b/mysql-test/suite/binlog/r/binlog_table_map_optional_metadata_binary.result
@@ -0,0 +1,64 @@
+#
+# Verify that SET string values and character sets can be printed correctly
+#
+SET NAMES utf8;
+CREATE TABLE t1(
+c_set_1 SET("set1_v1_å", "set1_v2_ä", "set1_v3_ö"),
+c_set_2 SET("set2_v1_å", "set2_v2_ä", "set2_v3_ö") CHARACTER SET binary);
+SET GLOBAL binlog_row_metadata = MINIMAL;
+INSERT INTO t1 VALUES("set1_v1_å", "set2_v2_ä");
+# Columns(SET,
+# SET)
+RESET MASTER;
+SET GLOBAL binlog_row_metadata = FULL;
+INSERT INTO t1 VALUES("set1_v1_å", "set2_v2_ä");
+# Columns(`c_set_1` SET('set1_v1_å','set1_v2_ä','set1_v3_ö') CHARSET latin1 COLLATE latin1_swedish_ci,
+# `c_set_2` SET('set2_v1_å','set2_v2_ä','set2_v3_ö') CHARSET binary COLLATE binary)
+INSERT INTO t1 VALUES("set1_v3_ö", "set2_v3_ö");
+INSERT INTO t1 VALUES("set1_v1_Ã¥", "set2_v1_Ã¥");
+SELECT c_set_1, HEX(c_set_1) FROM t1;
+c_set_1 HEX(c_set_1)
+set1_v1_Ã¥ 736574315F76315FE5
+set1_v1_Ã¥ 736574315F76315FE5
+set1_v3_ö 736574315F76335FF6
+set1_v1_Ã¥ 736574315F76315FE5
+SELECT c_set_2, HEX(c_set_2) FROM t1;
+c_set_2 HEX(c_set_2)
+set2_v2_ä 736574325F76325FC3A4
+set2_v2_ä 736574325F76325FC3A4
+set2_v3_ö 736574325F76335FC3B6
+set2_v1_Ã¥ 736574325F76315FC3A5
+DROP TABLE t1;
+RESET MASTER;
+#
+# Verify that ENUM string values and character sets can be printed correctly
+#
+CREATE TABLE t1(
+c_enum_1 ENUM("enum1_v1_å", "enum1_v2_ä", "enum1_v3_ö"),
+c_enum_2 ENUM("enum2_v1_å", "enum2_v2_ä", "enum2_v3_ö") CHARACTER SET binary);
+SET GLOBAL binlog_row_metadata = MINIMAL;
+INSERT INTO t1 VALUES("enum1_v1_å", "enum2_v2_ä");
+# Columns(ENUM,
+# ENUM)
+RESET MASTER;
+SET GLOBAL binlog_row_metadata = FULL;
+INSERT INTO t1 VALUES("enum1_v1_å", "enum2_v2_ä");
+# Columns(`c_enum_1` ENUM('enum1_v1_å','enum1_v2_ä','enum1_v3_ö') CHARSET latin1 COLLATE latin1_swedish_ci,
+# `c_enum_2` ENUM('enum2_v1_å','enum2_v2_ä','enum2_v3_ö') CHARSET binary COLLATE binary)
+INSERT INTO t1 VALUES("enum1_v3_ö", "enum2_v3_ö");
+INSERT INTO t1 VALUES("enum1_v1_Ã¥", "enum2_v1_Ã¥");
+SELECT c_enum_1, HEX(c_enum_1) FROM t1;
+c_enum_1 HEX(c_enum_1)
+enum1_v1_Ã¥ 656E756D315F76315FE5
+enum1_v1_Ã¥ 656E756D315F76315FE5
+enum1_v3_ö 656E756D315F76335FF6
+enum1_v1_Ã¥ 656E756D315F76315FE5
+SELECT c_enum_2, HEX(c_enum_2) FROM t1;
+c_enum_2 HEX(c_enum_2)
+enum2_v2_ä 656E756D325F76325FC3A4
+enum2_v2_ä 656E756D325F76325FC3A4
+enum2_v3_ö 656E756D325F76335FC3B6
+enum2_v1_Ã¥ 656E756D325F76315FC3A5
+DROP TABLE t1;
+RESET MASTER;
+SET GLOBAL binlog_row_metadata = NO_LOG;
diff --git a/mysql-test/suite/binlog/r/binlog_table_map_optional_metadata_ucs2.result b/mysql-test/suite/binlog/r/binlog_table_map_optional_metadata_ucs2.result
new file mode 100644
index 00000000000..1b1d2a79725
--- /dev/null
+++ b/mysql-test/suite/binlog/r/binlog_table_map_optional_metadata_ucs2.result
@@ -0,0 +1,64 @@
+#
+# Verify that SET string values and character sets can be printed correctly
+#
+SET NAMES utf8;
+CREATE TABLE t1(
+c_set_1 SET("set1_v1_å", "set1_v2_ä", "set1_v3_ö"),
+c_set_2 SET("set2_v1_å", "set2_v2_ä", "set2_v3_ö") CHARACTER SET ucs2);
+SET GLOBAL binlog_row_metadata = MINIMAL;
+INSERT INTO t1 VALUES("set1_v1_å", "set2_v2_ä");
+# Columns(SET,
+# SET)
+RESET MASTER;
+SET GLOBAL binlog_row_metadata = FULL;
+INSERT INTO t1 VALUES("set1_v1_å", "set2_v2_ä");
+# Columns(`c_set_1` SET('set1_v1_å','set1_v2_ä','set1_v3_ö') CHARSET latin1 COLLATE latin1_swedish_ci,
+# `c_set_2` SET('\0s\0e\0t\02\0_\0v\01\0_\0å','\0s\0e\0t\02\0_\0v\02\0_\0ä','\0s\0e\0t\02\0_\0v\03\0_\0ö') CHARSET ucs2 COLLATE ucs2_general_ci)
+INSERT INTO t1 VALUES("set1_v3_ö", "set2_v3_ö");
+INSERT INTO t1 VALUES("set1_v1_Ã¥", "set2_v1_Ã¥");
+SELECT c_set_1, HEX(c_set_1) FROM t1;
+c_set_1 HEX(c_set_1)
+set1_v1_Ã¥ 736574315F76315FE5
+set1_v1_Ã¥ 736574315F76315FE5
+set1_v3_ö 736574315F76335FF6
+set1_v1_Ã¥ 736574315F76315FE5
+SELECT c_set_2, HEX(c_set_2) FROM t1;
+c_set_2 HEX(c_set_2)
+set2_v2_ä 0073006500740032005F00760032005F00E4
+set2_v2_ä 0073006500740032005F00760032005F00E4
+set2_v3_ö 0073006500740032005F00760033005F00F6
+set2_v1_Ã¥ 0073006500740032005F00760031005F00E5
+DROP TABLE t1;
+RESET MASTER;
+#
+# Verify that ENUM string values and character sets can be printed correctly
+#
+CREATE TABLE t1(
+c_enum_1 ENUM("enum1_v1_å", "enum1_v2_ä", "enum1_v3_ö"),
+c_enum_2 ENUM("enum2_v1_å", "enum2_v2_ä", "enum2_v3_ö") CHARACTER SET ucs2);
+SET GLOBAL binlog_row_metadata = MINIMAL;
+INSERT INTO t1 VALUES("enum1_v1_å", "enum2_v2_ä");
+# Columns(ENUM,
+# ENUM)
+RESET MASTER;
+SET GLOBAL binlog_row_metadata = FULL;
+INSERT INTO t1 VALUES("enum1_v1_å", "enum2_v2_ä");
+# Columns(`c_enum_1` ENUM('enum1_v1_å','enum1_v2_ä','enum1_v3_ö') CHARSET latin1 COLLATE latin1_swedish_ci,
+# `c_enum_2` ENUM('\0e\0n\0u\0m\02\0_\0v\01\0_\0å','\0e\0n\0u\0m\02\0_\0v\02\0_\0ä','\0e\0n\0u\0m\02\0_\0v\03\0_\0ö') CHARSET ucs2 COLLATE ucs2_general_ci)
+INSERT INTO t1 VALUES("enum1_v3_ö", "enum2_v3_ö");
+INSERT INTO t1 VALUES("enum1_v1_Ã¥", "enum2_v1_Ã¥");
+SELECT c_enum_1, HEX(c_enum_1) FROM t1;
+c_enum_1 HEX(c_enum_1)
+enum1_v1_Ã¥ 656E756D315F76315FE5
+enum1_v1_Ã¥ 656E756D315F76315FE5
+enum1_v3_ö 656E756D315F76335FF6
+enum1_v1_Ã¥ 656E756D315F76315FE5
+SELECT c_enum_2, HEX(c_enum_2) FROM t1;
+c_enum_2 HEX(c_enum_2)
+enum2_v2_ä 0065006E0075006D0032005F00760032005F00E4
+enum2_v2_ä 0065006E0075006D0032005F00760032005F00E4
+enum2_v3_ö 0065006E0075006D0032005F00760033005F00F6
+enum2_v1_Ã¥ 0065006E0075006D0032005F00760031005F00E5
+DROP TABLE t1;
+RESET MASTER;
+SET GLOBAL binlog_row_metadata = NO_LOG;
diff --git a/mysql-test/suite/binlog/r/binlog_table_map_optional_metadata_utf32.result b/mysql-test/suite/binlog/r/binlog_table_map_optional_metadata_utf32.result
new file mode 100644
index 00000000000..6fdda842bac
--- /dev/null
+++ b/mysql-test/suite/binlog/r/binlog_table_map_optional_metadata_utf32.result
@@ -0,0 +1,64 @@
+#
+# Verify that SET string values and character sets can be printed correctly
+#
+SET NAMES utf8;
+CREATE TABLE t1(
+c_set_1 SET("set1_v1_å", "set1_v2_ä", "set1_v3_ö"),
+c_set_2 SET("set2_v1_å", "set2_v2_ä", "set2_v3_ö") CHARACTER SET utf32);
+SET GLOBAL binlog_row_metadata = MINIMAL;
+INSERT INTO t1 VALUES("set1_v1_å", "set2_v2_ä");
+# Columns(SET,
+# SET)
+RESET MASTER;
+SET GLOBAL binlog_row_metadata = FULL;
+INSERT INTO t1 VALUES("set1_v1_å", "set2_v2_ä");
+# Columns(`c_set_1` SET('set1_v1_å','set1_v2_ä','set1_v3_ö') CHARSET latin1 COLLATE latin1_swedish_ci,
+# `c_set_2` SET('\0\0\0s\0\0\0e\0\0\0t\0\0\02\0\0\0_\0\0\0v\0\0\01\0\0\0_\0\0\0å','\0\0\0s\0\0\0e\0\0\0t\0\0\02\0\0\0_\0\0\0v\0\0\02\0\0\0_\0\0\0ä','\0\0\0s\0\0\0e\0\0\0t\0\0\02\0\0\0_\0\0\0v\0\0\03\0\0\0_\0\0\0ö') CHARSET utf32 COLLATE utf32_general_ci)
+INSERT INTO t1 VALUES("set1_v3_ö", "set2_v3_ö");
+INSERT INTO t1 VALUES("set1_v1_Ã¥", "set2_v1_Ã¥");
+SELECT c_set_1, HEX(c_set_1) FROM t1;
+c_set_1 HEX(c_set_1)
+set1_v1_Ã¥ 736574315F76315FE5
+set1_v1_Ã¥ 736574315F76315FE5
+set1_v3_ö 736574315F76335FF6
+set1_v1_Ã¥ 736574315F76315FE5
+SELECT c_set_2, HEX(c_set_2) FROM t1;
+c_set_2 HEX(c_set_2)
+set2_v2_ä 000000730000006500000074000000320000005F00000076000000320000005F000000E4
+set2_v2_ä 000000730000006500000074000000320000005F00000076000000320000005F000000E4
+set2_v3_ö 000000730000006500000074000000320000005F00000076000000330000005F000000F6
+set2_v1_Ã¥ 000000730000006500000074000000320000005F00000076000000310000005F000000E5
+DROP TABLE t1;
+RESET MASTER;
+#
+# Verify that ENUM string values and character sets can be printed correctly
+#
+CREATE TABLE t1(
+c_enum_1 ENUM("enum1_v1_å", "enum1_v2_ä", "enum1_v3_ö"),
+c_enum_2 ENUM("enum2_v1_å", "enum2_v2_ä", "enum2_v3_ö") CHARACTER SET utf32);
+SET GLOBAL binlog_row_metadata = MINIMAL;
+INSERT INTO t1 VALUES("enum1_v1_å", "enum2_v2_ä");
+# Columns(ENUM,
+# ENUM)
+RESET MASTER;
+SET GLOBAL binlog_row_metadata = FULL;
+INSERT INTO t1 VALUES("enum1_v1_å", "enum2_v2_ä");
+# Columns(`c_enum_1` ENUM('enum1_v1_å','enum1_v2_ä','enum1_v3_ö') CHARSET latin1 COLLATE latin1_swedish_ci,
+# `c_enum_2` ENUM('\0\0\0e\0\0\0n\0\0\0u\0\0\0m\0\0\02\0\0\0_\0\0\0v\0\0\01\0\0\0_\0\0\0å','\0\0\0e\0\0\0n\0\0\0u\0\0\0m\0\0\02\0\0\0_\0\0\0v\0\0\02\0\0\0_\0\0\0ä','\0\0\0e\0\0\0n\0\0\0u\0\0\0m\0\0\02\0\0\0_\0\0\0v\0\0\03\0\0\0_\0\0\0ö') CHARSET utf32 COLLATE utf32_general_ci)
+INSERT INTO t1 VALUES("enum1_v3_ö", "enum2_v3_ö");
+INSERT INTO t1 VALUES("enum1_v1_Ã¥", "enum2_v1_Ã¥");
+SELECT c_enum_1, HEX(c_enum_1) FROM t1;
+c_enum_1 HEX(c_enum_1)
+enum1_v1_Ã¥ 656E756D315F76315FE5
+enum1_v1_Ã¥ 656E756D315F76315FE5
+enum1_v3_ö 656E756D315F76335FF6
+enum1_v1_Ã¥ 656E756D315F76315FE5
+SELECT c_enum_2, HEX(c_enum_2) FROM t1;
+c_enum_2 HEX(c_enum_2)
+enum2_v2_ä 000000650000006E000000750000006D000000320000005F00000076000000320000005F000000E4
+enum2_v2_ä 000000650000006E000000750000006D000000320000005F00000076000000320000005F000000E4
+enum2_v3_ö 000000650000006E000000750000006D000000320000005F00000076000000330000005F000000F6
+enum2_v1_Ã¥ 000000650000006E000000750000006D000000320000005F00000076000000310000005F000000E5
+DROP TABLE t1;
+RESET MASTER;
+SET GLOBAL binlog_row_metadata = NO_LOG;
diff --git a/mysql-test/suite/binlog/r/binlog_xa_checkpoint.result b/mysql-test/suite/binlog/r/binlog_xa_checkpoint.result
new file mode 100644
index 00000000000..d8a5818674f
--- /dev/null
+++ b/mysql-test/suite/binlog/r/binlog_xa_checkpoint.result
@@ -0,0 +1,33 @@
+RESET MASTER;
+CREATE TABLE t1 (a INT PRIMARY KEY, b MEDIUMTEXT) ENGINE=Innodb;
+connect con1,localhost,root,,;
+SET DEBUG_SYNC= "at_unlog_xa_prepare SIGNAL con1_ready WAIT_FOR con1_go";
+XA START '1';
+INSERT INTO t1 SET a=1;
+XA END '1';
+XA PREPARE '1';;
+connection default;
+SET DEBUG_SYNC= "now WAIT_FOR con1_ready";
+FLUSH LOGS;
+FLUSH LOGS;
+FLUSH LOGS;
+show binary logs;
+Log_name File_size
+master-bin.000001 #
+master-bin.000002 #
+master-bin.000003 #
+master-bin.000004 #
+include/show_binlog_events.inc
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000004 # Format_desc # # SERVER_VERSION, BINLOG_VERSION
+master-bin.000004 # Gtid_list # # [#-#-#]
+master-bin.000004 # Binlog_checkpoint # # master-bin.000001
+SET DEBUG_SYNC= "now SIGNAL con1_go";
+connection con1;
+*** master-bin.000004 checkpoint must show up now ***
+connection con1;
+XA ROLLBACK '1';
+SET debug_sync = 'reset';
+connection default;
+DROP TABLE t1;
+SET debug_sync = 'reset';
diff --git a/mysql-test/suite/binlog/r/binlog_xa_prepared.result b/mysql-test/suite/binlog/r/binlog_xa_prepared.result
new file mode 100644
index 00000000000..9fda8ab3143
--- /dev/null
+++ b/mysql-test/suite/binlog/r/binlog_xa_prepared.result
@@ -0,0 +1,1176 @@
+connection default;
+RESET MASTER;
+CREATE VIEW v_processlist as SELECT * FROM performance_schema.threads where type = 'FOREGROUND';
+call mtr.add_suppression("Found 10 prepared XA transactions");
+CREATE TABLE t (a INT) ENGINE=innodb;
+connect conn$index$type, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@sql_log_bin = OFF;
+CREATE TEMPORARY TABLE tmp1 (a int) ENGINE=innodb;
+XA START 'trx1tmp';
+INSERT INTO tmp1 SET a=1;
+XA END 'trx1tmp';
+XA PREPARE 'trx1tmp';
+connect conn$index$type, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@sql_log_bin = OFF;
+CREATE TEMPORARY TABLE tmp1 (a int) ENGINE=innodb;
+XA START 'trx2tmp';
+INSERT INTO tmp1 SET a=1;
+XA END 'trx2tmp';
+XA PREPARE 'trx2tmp';
+connect conn$index$type, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@sql_log_bin = OFF;
+CREATE TEMPORARY TABLE tmp1 (a int) ENGINE=innodb;
+XA START 'trx3tmp';
+INSERT INTO tmp1 SET a=1;
+XA END 'trx3tmp';
+XA PREPARE 'trx3tmp';
+connection default;
+XA COMMIT 'trx1tmp';
+ERROR XAE04: XAER_NOTA: Unknown XID
+XA ROLLBACK 'trx1tmp';
+ERROR XAE04: XAER_NOTA: Unknown XID
+XA START 'trx1tmp';
+ERROR XAE08: XAER_DUPID: The XID already exists
+connection default;
+*** 3 prepared transactions must be in the list ***
+XA RECOVER;
+formatID gtrid_length bqual_length data
+1 LEN1 LEN2 TRX_N
+1 LEN1 LEN2 TRX_N
+1 LEN1 LEN2 TRX_N
+connection conn1tmp;
+disconnect conn1tmp;
+connection default;
+XA COMMIT 'trx1tmp';
+KILL connection CONN_ID;
+XA COMMIT 'trx3tmp';
+connect conn$index$type, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'trx1ro';
+SELECT * from t ORDER BY a;
+a
+XA END 'trx1ro';
+XA PREPARE 'trx1ro';
+connect conn$index$type, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'trx2ro';
+SELECT * from t ORDER BY a;
+a
+XA END 'trx2ro';
+XA PREPARE 'trx2ro';
+connect conn$index$type, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'trx3ro';
+SELECT * from t ORDER BY a;
+a
+XA END 'trx3ro';
+XA PREPARE 'trx3ro';
+connection default;
+*** 4 prepared transactions must be in the list ***
+XA RECOVER;
+formatID gtrid_length bqual_length data
+1 LEN1 LEN2 TRX_N
+1 LEN1 LEN2 TRX_N
+1 LEN1 LEN2 TRX_N
+1 LEN1 LEN2 TRX_N
+connection conn1ro;
+disconnect conn1ro;
+connection default;
+XA ROLLBACK 'trx1ro';
+KILL connection CONN_ID;
+XA ROLLBACK 'trx3ro';
+connect conn$index$type, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'trx1empty';
+XA END 'trx1empty';
+XA PREPARE 'trx1empty';
+connect conn$index$type, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'trx2empty';
+XA END 'trx2empty';
+XA PREPARE 'trx2empty';
+connect conn$index$type, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'trx3empty';
+XA END 'trx3empty';
+XA PREPARE 'trx3empty';
+connection default;
+*** 5 prepared transactions must be in the list ***
+XA RECOVER;
+formatID gtrid_length bqual_length data
+1 LEN1 LEN2 TRX_N
+1 LEN1 LEN2 TRX_N
+1 LEN1 LEN2 TRX_N
+1 LEN1 LEN2 TRX_N
+1 LEN1 LEN2 TRX_N
+connection conn1empty;
+disconnect conn1empty;
+connection default;
+XA COMMIT 'trx1empty';
+KILL connection CONN_ID;
+XA COMMIT 'trx3empty';
+connect conn1$type, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'trx1unprepared';
+INSERT INTO t set a=0;
+XA END 'trx1unprepared';
+INSERT INTO t set a=0;
+ERROR XAE07: XAER_RMFAIL: The command cannot be executed when global transaction is in the IDLE state
+XA START 'trx1unprepared';
+ERROR XAE07: XAER_RMFAIL: The command cannot be executed when global transaction is in the IDLE state
+XA START 'trx1unprepared';
+ERROR XAE07: XAER_RMFAIL: The command cannot be executed when global transaction is in the IDLE state
+disconnect conn1unprepared;
+connection default;
+XA COMMIT 'trx1unprepared';
+ERROR XAE04: XAER_NOTA: Unknown XID
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+XA START 'trx_0';
+INSERT INTO t SET a=0;
+XA END 'trx_0';
+XA PREPARE 'trx_0';
+disconnect conn0;
+connection default;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+SET @@binlog_format = ROW;
+XA START 'trx_1';
+INSERT INTO t SET a=1;
+XA END 'trx_1';
+XA PREPARE 'trx_1';
+disconnect conn1;
+connection default;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+XA START 'trx_2';
+INSERT INTO t SET a=2;
+XA END 'trx_2';
+XA PREPARE 'trx_2';
+disconnect conn2;
+connection default;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+SET @@binlog_format = ROW;
+XA START 'trx_3';
+INSERT INTO t SET a=3;
+XA END 'trx_3';
+XA PREPARE 'trx_3';
+disconnect conn3;
+connection default;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+XA START 'trx_4';
+INSERT INTO t SET a=4;
+XA END 'trx_4';
+XA PREPARE 'trx_4';
+disconnect conn4;
+connection default;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+SET @@binlog_format = ROW;
+XA START 'trx_5';
+INSERT INTO t SET a=5;
+XA END 'trx_5';
+XA PREPARE 'trx_5';
+disconnect conn5;
+connection default;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+XA START 'trx_6';
+INSERT INTO t SET a=6;
+XA END 'trx_6';
+XA PREPARE 'trx_6';
+disconnect conn6;
+connection default;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+SET @@binlog_format = ROW;
+XA START 'trx_7';
+INSERT INTO t SET a=7;
+XA END 'trx_7';
+XA PREPARE 'trx_7';
+disconnect conn7;
+connection default;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+XA START 'trx_8';
+INSERT INTO t SET a=8;
+XA END 'trx_8';
+XA PREPARE 'trx_8';
+disconnect conn8;
+connection default;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+SET @@binlog_format = ROW;
+XA START 'trx_9';
+INSERT INTO t SET a=9;
+XA END 'trx_9';
+XA PREPARE 'trx_9';
+disconnect conn9;
+connection default;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+XA START 'trx_10';
+INSERT INTO t SET a=10;
+XA END 'trx_10';
+XA PREPARE 'trx_10';
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+SET @@binlog_format = ROW;
+XA START 'trx_11';
+INSERT INTO t SET a=11;
+XA END 'trx_11';
+XA PREPARE 'trx_11';
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+XA START 'trx_12';
+INSERT INTO t SET a=12;
+XA END 'trx_12';
+XA PREPARE 'trx_12';
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+SET @@binlog_format = ROW;
+XA START 'trx_13';
+INSERT INTO t SET a=13;
+XA END 'trx_13';
+XA PREPARE 'trx_13';
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+XA START 'trx_14';
+INSERT INTO t SET a=14;
+XA END 'trx_14';
+XA PREPARE 'trx_14';
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+SET @@binlog_format = ROW;
+XA START 'trx_15';
+INSERT INTO t SET a=15;
+XA END 'trx_15';
+XA PREPARE 'trx_15';
+connection default;
+KILL CONNECTION CONN_ID;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+XA START 'trx_16';
+INSERT INTO t SET a=16;
+XA END 'trx_16';
+XA PREPARE 'trx_16';
+connection default;
+KILL CONNECTION CONN_ID;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+SET @@binlog_format = ROW;
+XA START 'trx_17';
+INSERT INTO t SET a=17;
+XA END 'trx_17';
+XA PREPARE 'trx_17';
+connection default;
+KILL CONNECTION CONN_ID;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+XA START 'trx_18';
+INSERT INTO t SET a=18;
+XA END 'trx_18';
+XA PREPARE 'trx_18';
+connection default;
+KILL CONNECTION CONN_ID;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+SET @@binlog_format = ROW;
+XA START 'trx_19';
+INSERT INTO t SET a=19;
+XA END 'trx_19';
+XA PREPARE 'trx_19';
+connection default;
+KILL CONNECTION CONN_ID;
+connection default;
+XA ROLLBACK 'trx_0';
+XA ROLLBACK 'trx_1';
+XA ROLLBACK 'trx_2';
+XA ROLLBACK 'trx_3';
+XA ROLLBACK 'trx_4';
+XA COMMIT 'trx_5';
+XA COMMIT 'trx_6';
+XA COMMIT 'trx_7';
+XA COMMIT 'trx_8';
+XA COMMIT 'trx_9';
+# restart
+connect conn_restart_$k, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'new_trx_0';
+INSERT INTO t SET a=0;
+XA END 'new_trx_0';
+XA PREPARE 'new_trx_0';
+disconnect conn_restart_0;
+connection default;
+connect conn_restart_$k, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'new_trx_1';
+INSERT INTO t SET a=1;
+XA END 'new_trx_1';
+XA PREPARE 'new_trx_1';
+disconnect conn_restart_1;
+connection default;
+connect conn_restart_$k, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'new_trx_2';
+INSERT INTO t SET a=2;
+XA END 'new_trx_2';
+XA PREPARE 'new_trx_2';
+disconnect conn_restart_2;
+connection default;
+connect conn_restart_$k, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'new_trx_3';
+INSERT INTO t SET a=3;
+XA END 'new_trx_3';
+XA PREPARE 'new_trx_3';
+disconnect conn_restart_3;
+connection default;
+connect conn_restart_$k, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'new_trx_4';
+INSERT INTO t SET a=4;
+XA END 'new_trx_4';
+XA PREPARE 'new_trx_4';
+disconnect conn_restart_4;
+connection default;
+connect conn_restart_$k, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'new_trx_5';
+INSERT INTO t SET a=5;
+XA END 'new_trx_5';
+XA PREPARE 'new_trx_5';
+disconnect conn_restart_5;
+connection default;
+connect conn_restart_$k, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'new_trx_6';
+INSERT INTO t SET a=6;
+XA END 'new_trx_6';
+XA PREPARE 'new_trx_6';
+disconnect conn_restart_6;
+connection default;
+connect conn_restart_$k, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'new_trx_7';
+INSERT INTO t SET a=7;
+XA END 'new_trx_7';
+XA PREPARE 'new_trx_7';
+disconnect conn_restart_7;
+connection default;
+connect conn_restart_$k, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'new_trx_8';
+INSERT INTO t SET a=8;
+XA END 'new_trx_8';
+XA PREPARE 'new_trx_8';
+disconnect conn_restart_8;
+connection default;
+connect conn_restart_$k, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'new_trx_9';
+INSERT INTO t SET a=9;
+XA END 'new_trx_9';
+XA PREPARE 'new_trx_9';
+disconnect conn_restart_9;
+connection default;
+connection default;
+XA COMMIT 'new_trx_0';
+XA COMMIT 'new_trx_1';
+XA COMMIT 'new_trx_2';
+XA COMMIT 'new_trx_3';
+XA COMMIT 'new_trx_4';
+XA COMMIT 'new_trx_5';
+XA COMMIT 'new_trx_6';
+XA COMMIT 'new_trx_7';
+XA COMMIT 'new_trx_8';
+XA COMMIT 'new_trx_9';
+XA START 'trx_10';
+ERROR XAE08: XAER_DUPID: The XID already exists
+XA COMMIT 'trx_10';
+XA START 'trx_11';
+ERROR XAE08: XAER_DUPID: The XID already exists
+XA COMMIT 'trx_11';
+XA START 'trx_12';
+ERROR XAE08: XAER_DUPID: The XID already exists
+XA COMMIT 'trx_12';
+XA START 'trx_13';
+ERROR XAE08: XAER_DUPID: The XID already exists
+XA COMMIT 'trx_13';
+XA START 'trx_14';
+ERROR XAE08: XAER_DUPID: The XID already exists
+XA COMMIT 'trx_14';
+XA START 'trx_15';
+ERROR XAE08: XAER_DUPID: The XID already exists
+XA ROLLBACK 'trx_15';
+XA START 'trx_16';
+ERROR XAE08: XAER_DUPID: The XID already exists
+XA ROLLBACK 'trx_16';
+XA START 'trx_17';
+ERROR XAE08: XAER_DUPID: The XID already exists
+XA ROLLBACK 'trx_17';
+XA START 'trx_18';
+ERROR XAE08: XAER_DUPID: The XID already exists
+XA ROLLBACK 'trx_18';
+XA START 'trx_19';
+ERROR XAE08: XAER_DUPID: The XID already exists
+XA ROLLBACK 'trx_19';
+SELECT * FROM t;
+a
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+0
+1
+2
+3
+4
+5
+6
+7
+8
+9
+disconnect conn2tmp;
+disconnect conn3tmp;
+disconnect conn2ro;
+disconnect conn3ro;
+disconnect conn2empty;
+disconnect conn3empty;
+connection default;
+XA ROLLBACK 'trx_20';
+ERROR XAE04: XAER_NOTA: Unknown XID
+disconnect conn19;
+connection default;
+XA ROLLBACK 'trx_19';
+ERROR XAE04: XAER_NOTA: Unknown XID
+disconnect conn18;
+connection default;
+XA ROLLBACK 'trx_18';
+ERROR XAE04: XAER_NOTA: Unknown XID
+disconnect conn17;
+connection default;
+XA ROLLBACK 'trx_17';
+ERROR XAE04: XAER_NOTA: Unknown XID
+disconnect conn16;
+connection default;
+XA ROLLBACK 'trx_16';
+ERROR XAE04: XAER_NOTA: Unknown XID
+disconnect conn15;
+connection default;
+XA ROLLBACK 'trx_15';
+ERROR XAE04: XAER_NOTA: Unknown XID
+disconnect conn14;
+connection default;
+XA ROLLBACK 'trx_14';
+ERROR XAE04: XAER_NOTA: Unknown XID
+disconnect conn13;
+connection default;
+XA ROLLBACK 'trx_13';
+ERROR XAE04: XAER_NOTA: Unknown XID
+disconnect conn12;
+connection default;
+XA ROLLBACK 'trx_12';
+ERROR XAE04: XAER_NOTA: Unknown XID
+disconnect conn11;
+connection default;
+XA ROLLBACK 'trx_11';
+ERROR XAE04: XAER_NOTA: Unknown XID
+disconnect conn10;
+connect conn$index$type, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@sql_log_bin = OFF;
+CREATE TEMPORARY TABLE tmp1 (a int) ENGINE=innodb;
+XA START 'trx1tmp';
+INSERT INTO tmp1 SET a=1;
+XA END 'trx1tmp';
+XA PREPARE 'trx1tmp';
+connect conn$index$type, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@sql_log_bin = OFF;
+CREATE TEMPORARY TABLE tmp1 (a int) ENGINE=innodb;
+XA START 'trx2tmp';
+INSERT INTO tmp1 SET a=1;
+XA END 'trx2tmp';
+XA PREPARE 'trx2tmp';
+connect conn$index$type, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@sql_log_bin = OFF;
+CREATE TEMPORARY TABLE tmp1 (a int) ENGINE=innodb;
+XA START 'trx3tmp';
+INSERT INTO tmp1 SET a=1;
+XA END 'trx3tmp';
+XA PREPARE 'trx3tmp';
+connection default;
+XA COMMIT 'trx1tmp';
+ERROR XAE04: XAER_NOTA: Unknown XID
+XA ROLLBACK 'trx1tmp';
+ERROR XAE04: XAER_NOTA: Unknown XID
+XA START 'trx1tmp';
+ERROR XAE08: XAER_DUPID: The XID already exists
+connection default;
+*** 3 prepared transactions must be in the list ***
+XA RECOVER;
+formatID gtrid_length bqual_length data
+1 LEN1 LEN2 TRX_N
+1 LEN1 LEN2 TRX_N
+1 LEN1 LEN2 TRX_N
+connection conn1tmp;
+disconnect conn1tmp;
+connection default;
+XA COMMIT 'trx1tmp';
+KILL connection CONN_ID;
+XA COMMIT 'trx3tmp';
+connect conn$index$type, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'trx1ro';
+SELECT * from t ORDER BY a;
+a
+0
+1
+2
+3
+4
+5
+5
+6
+6
+7
+7
+8
+8
+9
+9
+10
+11
+12
+13
+14
+XA END 'trx1ro';
+XA PREPARE 'trx1ro';
+connect conn$index$type, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'trx2ro';
+SELECT * from t ORDER BY a;
+a
+0
+1
+2
+3
+4
+5
+5
+6
+6
+7
+7
+8
+8
+9
+9
+10
+11
+12
+13
+14
+XA END 'trx2ro';
+XA PREPARE 'trx2ro';
+connect conn$index$type, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'trx3ro';
+SELECT * from t ORDER BY a;
+a
+0
+1
+2
+3
+4
+5
+5
+6
+6
+7
+7
+8
+8
+9
+9
+10
+11
+12
+13
+14
+XA END 'trx3ro';
+XA PREPARE 'trx3ro';
+connection default;
+*** 4 prepared transactions must be in the list ***
+XA RECOVER;
+formatID gtrid_length bqual_length data
+1 LEN1 LEN2 TRX_N
+1 LEN1 LEN2 TRX_N
+1 LEN1 LEN2 TRX_N
+1 LEN1 LEN2 TRX_N
+connection conn1ro;
+disconnect conn1ro;
+connection default;
+XA ROLLBACK 'trx1ro';
+KILL connection CONN_ID;
+XA ROLLBACK 'trx3ro';
+connect conn$index$type, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'trx1empty';
+XA END 'trx1empty';
+XA PREPARE 'trx1empty';
+connect conn$index$type, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'trx2empty';
+XA END 'trx2empty';
+XA PREPARE 'trx2empty';
+connect conn$index$type, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'trx3empty';
+XA END 'trx3empty';
+XA PREPARE 'trx3empty';
+connection default;
+*** 5 prepared transactions must be in the list ***
+XA RECOVER;
+formatID gtrid_length bqual_length data
+1 LEN1 LEN2 TRX_N
+1 LEN1 LEN2 TRX_N
+1 LEN1 LEN2 TRX_N
+1 LEN1 LEN2 TRX_N
+1 LEN1 LEN2 TRX_N
+connection conn1empty;
+disconnect conn1empty;
+connection default;
+XA COMMIT 'trx1empty';
+KILL connection CONN_ID;
+XA COMMIT 'trx3empty';
+connect conn1$type, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'trx1unprepared';
+INSERT INTO t set a=0;
+XA END 'trx1unprepared';
+INSERT INTO t set a=0;
+ERROR XAE07: XAER_RMFAIL: The command cannot be executed when global transaction is in the IDLE state
+XA START 'trx1unprepared';
+ERROR XAE07: XAER_RMFAIL: The command cannot be executed when global transaction is in the IDLE state
+XA START 'trx1unprepared';
+ERROR XAE07: XAER_RMFAIL: The command cannot be executed when global transaction is in the IDLE state
+disconnect conn1unprepared;
+connection default;
+XA COMMIT 'trx1unprepared';
+ERROR XAE04: XAER_NOTA: Unknown XID
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+XA START 'trx_0';
+INSERT INTO t SET a=0;
+XA END 'trx_0';
+XA PREPARE 'trx_0';
+disconnect conn0;
+connection default;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+SET @@binlog_format = ROW;
+XA START 'trx_1';
+INSERT INTO t SET a=1;
+XA END 'trx_1';
+XA PREPARE 'trx_1';
+disconnect conn1;
+connection default;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+XA START 'trx_2';
+INSERT INTO t SET a=2;
+XA END 'trx_2';
+XA PREPARE 'trx_2';
+disconnect conn2;
+connection default;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+SET @@binlog_format = ROW;
+XA START 'trx_3';
+INSERT INTO t SET a=3;
+XA END 'trx_3';
+XA PREPARE 'trx_3';
+disconnect conn3;
+connection default;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+XA START 'trx_4';
+INSERT INTO t SET a=4;
+XA END 'trx_4';
+XA PREPARE 'trx_4';
+disconnect conn4;
+connection default;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+SET @@binlog_format = ROW;
+XA START 'trx_5';
+INSERT INTO t SET a=5;
+XA END 'trx_5';
+XA PREPARE 'trx_5';
+disconnect conn5;
+connection default;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+XA START 'trx_6';
+INSERT INTO t SET a=6;
+XA END 'trx_6';
+XA PREPARE 'trx_6';
+disconnect conn6;
+connection default;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+SET @@binlog_format = ROW;
+XA START 'trx_7';
+INSERT INTO t SET a=7;
+XA END 'trx_7';
+XA PREPARE 'trx_7';
+disconnect conn7;
+connection default;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+XA START 'trx_8';
+INSERT INTO t SET a=8;
+XA END 'trx_8';
+XA PREPARE 'trx_8';
+disconnect conn8;
+connection default;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+SET @@binlog_format = ROW;
+XA START 'trx_9';
+INSERT INTO t SET a=9;
+XA END 'trx_9';
+XA PREPARE 'trx_9';
+disconnect conn9;
+connection default;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+XA START 'trx_10';
+INSERT INTO t SET a=10;
+XA END 'trx_10';
+XA PREPARE 'trx_10';
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+SET @@binlog_format = ROW;
+XA START 'trx_11';
+INSERT INTO t SET a=11;
+XA END 'trx_11';
+XA PREPARE 'trx_11';
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+XA START 'trx_12';
+INSERT INTO t SET a=12;
+XA END 'trx_12';
+XA PREPARE 'trx_12';
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+SET @@binlog_format = ROW;
+XA START 'trx_13';
+INSERT INTO t SET a=13;
+XA END 'trx_13';
+XA PREPARE 'trx_13';
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+XA START 'trx_14';
+INSERT INTO t SET a=14;
+XA END 'trx_14';
+XA PREPARE 'trx_14';
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+SET @@binlog_format = ROW;
+XA START 'trx_15';
+INSERT INTO t SET a=15;
+XA END 'trx_15';
+XA PREPARE 'trx_15';
+connection default;
+KILL CONNECTION CONN_ID;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+XA START 'trx_16';
+INSERT INTO t SET a=16;
+XA END 'trx_16';
+XA PREPARE 'trx_16';
+connection default;
+KILL CONNECTION CONN_ID;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+SET @@binlog_format = ROW;
+XA START 'trx_17';
+INSERT INTO t SET a=17;
+XA END 'trx_17';
+XA PREPARE 'trx_17';
+connection default;
+KILL CONNECTION CONN_ID;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+XA START 'trx_18';
+INSERT INTO t SET a=18;
+XA END 'trx_18';
+XA PREPARE 'trx_18';
+connection default;
+KILL CONNECTION CONN_ID;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+SET @@binlog_format = ROW;
+XA START 'trx_19';
+INSERT INTO t SET a=19;
+XA END 'trx_19';
+XA PREPARE 'trx_19';
+connection default;
+KILL CONNECTION CONN_ID;
+connection default;
+XA ROLLBACK 'trx_0';
+XA ROLLBACK 'trx_1';
+XA ROLLBACK 'trx_2';
+XA ROLLBACK 'trx_3';
+XA ROLLBACK 'trx_4';
+XA COMMIT 'trx_5';
+XA COMMIT 'trx_6';
+XA COMMIT 'trx_7';
+XA COMMIT 'trx_8';
+XA COMMIT 'trx_9';
+# Kill and restart
+connect conn_restart_$k, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'new_trx_0';
+INSERT INTO t SET a=0;
+XA END 'new_trx_0';
+XA PREPARE 'new_trx_0';
+disconnect conn_restart_0;
+connection default;
+connect conn_restart_$k, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'new_trx_1';
+INSERT INTO t SET a=1;
+XA END 'new_trx_1';
+XA PREPARE 'new_trx_1';
+disconnect conn_restart_1;
+connection default;
+connect conn_restart_$k, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'new_trx_2';
+INSERT INTO t SET a=2;
+XA END 'new_trx_2';
+XA PREPARE 'new_trx_2';
+disconnect conn_restart_2;
+connection default;
+connect conn_restart_$k, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'new_trx_3';
+INSERT INTO t SET a=3;
+XA END 'new_trx_3';
+XA PREPARE 'new_trx_3';
+disconnect conn_restart_3;
+connection default;
+connect conn_restart_$k, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'new_trx_4';
+INSERT INTO t SET a=4;
+XA END 'new_trx_4';
+XA PREPARE 'new_trx_4';
+disconnect conn_restart_4;
+connection default;
+connect conn_restart_$k, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'new_trx_5';
+INSERT INTO t SET a=5;
+XA END 'new_trx_5';
+XA PREPARE 'new_trx_5';
+disconnect conn_restart_5;
+connection default;
+connect conn_restart_$k, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'new_trx_6';
+INSERT INTO t SET a=6;
+XA END 'new_trx_6';
+XA PREPARE 'new_trx_6';
+disconnect conn_restart_6;
+connection default;
+connect conn_restart_$k, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'new_trx_7';
+INSERT INTO t SET a=7;
+XA END 'new_trx_7';
+XA PREPARE 'new_trx_7';
+disconnect conn_restart_7;
+connection default;
+connect conn_restart_$k, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'new_trx_8';
+INSERT INTO t SET a=8;
+XA END 'new_trx_8';
+XA PREPARE 'new_trx_8';
+disconnect conn_restart_8;
+connection default;
+connect conn_restart_$k, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'new_trx_9';
+INSERT INTO t SET a=9;
+XA END 'new_trx_9';
+XA PREPARE 'new_trx_9';
+disconnect conn_restart_9;
+connection default;
+connection default;
+XA COMMIT 'new_trx_0';
+XA COMMIT 'new_trx_1';
+XA COMMIT 'new_trx_2';
+XA COMMIT 'new_trx_3';
+XA COMMIT 'new_trx_4';
+XA COMMIT 'new_trx_5';
+XA COMMIT 'new_trx_6';
+XA COMMIT 'new_trx_7';
+XA COMMIT 'new_trx_8';
+XA COMMIT 'new_trx_9';
+XA START 'trx_10';
+ERROR XAE08: XAER_DUPID: The XID already exists
+XA COMMIT 'trx_10';
+XA START 'trx_11';
+ERROR XAE08: XAER_DUPID: The XID already exists
+XA COMMIT 'trx_11';
+XA START 'trx_12';
+ERROR XAE08: XAER_DUPID: The XID already exists
+XA COMMIT 'trx_12';
+XA START 'trx_13';
+ERROR XAE08: XAER_DUPID: The XID already exists
+XA COMMIT 'trx_13';
+XA START 'trx_14';
+ERROR XAE08: XAER_DUPID: The XID already exists
+XA COMMIT 'trx_14';
+XA START 'trx_15';
+ERROR XAE08: XAER_DUPID: The XID already exists
+XA ROLLBACK 'trx_15';
+XA START 'trx_16';
+ERROR XAE08: XAER_DUPID: The XID already exists
+XA ROLLBACK 'trx_16';
+XA START 'trx_17';
+ERROR XAE08: XAER_DUPID: The XID already exists
+XA ROLLBACK 'trx_17';
+XA START 'trx_18';
+ERROR XAE08: XAER_DUPID: The XID already exists
+XA ROLLBACK 'trx_18';
+XA START 'trx_19';
+ERROR XAE08: XAER_DUPID: The XID already exists
+XA ROLLBACK 'trx_19';
+SELECT * FROM t;
+a
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+0
+1
+2
+3
+4
+5
+6
+7
+8
+9
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+0
+1
+2
+3
+4
+5
+6
+7
+8
+9
+disconnect conn2tmp;
+disconnect conn3tmp;
+disconnect conn2ro;
+disconnect conn3ro;
+disconnect conn2empty;
+disconnect conn3empty;
+connection default;
+XA ROLLBACK 'trx_20';
+ERROR XAE04: XAER_NOTA: Unknown XID
+disconnect conn19;
+connection default;
+XA ROLLBACK 'trx_19';
+ERROR XAE04: XAER_NOTA: Unknown XID
+disconnect conn18;
+connection default;
+XA ROLLBACK 'trx_18';
+ERROR XAE04: XAER_NOTA: Unknown XID
+disconnect conn17;
+connection default;
+XA ROLLBACK 'trx_17';
+ERROR XAE04: XAER_NOTA: Unknown XID
+disconnect conn16;
+connection default;
+XA ROLLBACK 'trx_16';
+ERROR XAE04: XAER_NOTA: Unknown XID
+disconnect conn15;
+connection default;
+XA ROLLBACK 'trx_15';
+ERROR XAE04: XAER_NOTA: Unknown XID
+disconnect conn14;
+connection default;
+XA ROLLBACK 'trx_14';
+ERROR XAE04: XAER_NOTA: Unknown XID
+disconnect conn13;
+connection default;
+XA ROLLBACK 'trx_13';
+ERROR XAE04: XAER_NOTA: Unknown XID
+disconnect conn12;
+connection default;
+XA ROLLBACK 'trx_12';
+ERROR XAE04: XAER_NOTA: Unknown XID
+disconnect conn11;
+connection default;
+XA ROLLBACK 'trx_11';
+ERROR XAE04: XAER_NOTA: Unknown XID
+disconnect conn10;
+connection default;
+XA START 'one_phase_trx_0';
+INSERT INTO t SET a=0;
+XA END 'one_phase_trx_0';
+XA COMMIT 'one_phase_trx_0' ONE PHASE;
+XA START 'one_phase_trx_1';
+INSERT INTO t SET a=1;
+XA END 'one_phase_trx_1';
+XA COMMIT 'one_phase_trx_1' ONE PHASE;
+XA START 'one_phase_trx_2';
+INSERT INTO t SET a=2;
+XA END 'one_phase_trx_2';
+XA COMMIT 'one_phase_trx_2' ONE PHASE;
+XA START 'one_phase_trx_3';
+INSERT INTO t SET a=3;
+XA END 'one_phase_trx_3';
+XA COMMIT 'one_phase_trx_3' ONE PHASE;
+XA START 'one_phase_trx_4';
+INSERT INTO t SET a=4;
+XA END 'one_phase_trx_4';
+XA COMMIT 'one_phase_trx_4' ONE PHASE;
+SELECT SUM(a) FROM t;
+SUM(a)
+290
+DROP TABLE t;
+DROP VIEW v_processlist;
+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`; CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v_processlist` AS SELECT * FROM performance_schema.threads where type = 'FOREGROUND'
+master-bin.000001 # Gtid # # BEGIN GTID #-#-#
+master-bin.000001 # Query # # use `mtr`; INSERT INTO test_suppressions (pattern) VALUES ( NAME_CONST('pattern',_latin1'Found 10 prepared XA transactions' COLLATE 'latin1_swedish_ci'))
+master-bin.000001 # Query # # COMMIT
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # use `test`; CREATE TABLE t (a INT) ENGINE=innodb
+master-bin.000001 # Gtid # # XA START X'7472785f30',X'',1 GTID #-#-#
+master-bin.000001 # Query # # use `test`; INSERT INTO t SET a=0
+master-bin.000001 # Query # # XA END X'7472785f30',X'',1
+master-bin.000001 # XA_prepare # # XA PREPARE X'7472785f30',X'',1
+master-bin.000001 # Gtid # # XA START X'7472785f31',X'',1 GTID #-#-#
+master-bin.000001 # Annotate_rows # # INSERT INTO t SET a=1
+master-bin.000001 # Table_map # # table_id: # (test.t)
+master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
+master-bin.000001 # Query # # XA END X'7472785f31',X'',1
+master-bin.000001 # XA_prepare # # XA PREPARE X'7472785f31',X'',1
+master-bin.000001 # Gtid # # XA START X'7472785f32',X'',1 GTID #-#-#
+master-bin.000001 # Query # # use `test`; INSERT INTO t SET a=2
+master-bin.000001 # Query # # XA END X'7472785f32',X'',1
+master-bin.000001 # XA_prepare # # XA PREPARE X'7472785f32',X'',1
+master-bin.000001 # Gtid # # XA START X'7472785f33',X'',1 GTID #-#-#
+master-bin.000001 # Annotate_rows # # INSERT INTO t SET a=3
+master-bin.000001 # Table_map # # table_id: # (test.t)
+master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
+master-bin.000001 # Query # # XA END X'7472785f33',X'',1
+master-bin.000001 # XA_prepare # # XA PREPARE X'7472785f33',X'',1
+master-bin.000001 # Gtid # # XA START X'7472785f34',X'',1 GTID #-#-#
+master-bin.000001 # Query # # use `test`; INSERT INTO t SET a=4
+master-bin.000001 # Query # # XA END X'7472785f34',X'',1
+master-bin.000001 # XA_prepare # # XA PREPARE X'7472785f34',X'',1
+master-bin.000001 # Gtid # # XA START X'7472785f35',X'',1 GTID #-#-#
+master-bin.000001 # Annotate_rows # # INSERT INTO t SET a=5
+master-bin.000001 # Table_map # # table_id: # (test.t)
+master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
+master-bin.000001 # Query # # XA END X'7472785f35',X'',1
+master-bin.000001 # XA_prepare # # XA PREPARE X'7472785f35',X'',1
+master-bin.000001 # Gtid # # XA START X'7472785f36',X'',1 GTID #-#-#
+master-bin.000001 # Query # # use `test`; INSERT INTO t SET a=6
+master-bin.000001 # Query # # XA END X'7472785f36',X'',1
+master-bin.000001 # XA_prepare # # XA PREPARE X'7472785f36',X'',1
+master-bin.000001 # Gtid # # XA START X'7472785f37',X'',1 GTID #-#-#
+master-bin.000001 # Annotate_rows # # INSERT INTO t SET a=7
+master-bin.000001 # Table_map # # table_id: # (test.t)
+master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
+master-bin.000001 # Query # # XA END X'7472785f37',X'',1
+master-bin.000001 # XA_prepare # # XA PREPARE X'7472785f37',X'',1
+master-bin.000001 # Gtid # # XA START X'7472785f38',X'',1 GTID #-#-#
+master-bin.000001 # Query # # use `test`; INSERT INTO t SET a=8
+master-bin.000001 # Query # # XA END X'7472785f38',X'',1
+master-bin.000001 # XA_prepare # # XA PREPARE X'7472785f38',X'',1
+master-bin.000001 # Gtid # # XA START X'7472785f39',X'',1 GTID #-#-#
+master-bin.000001 # Annotate_rows # # INSERT INTO t SET a=9
+master-bin.000001 # Table_map # # table_id: # (test.t)
+master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
+master-bin.000001 # Query # # XA END X'7472785f39',X'',1
+master-bin.000001 # XA_prepare # # XA PREPARE X'7472785f39',X'',1
+master-bin.000001 # Gtid # # XA START X'7472785f3130',X'',1 GTID #-#-#
+master-bin.000001 # Query # # use `test`; INSERT INTO t SET a=10
+master-bin.000001 # Query # # XA END X'7472785f3130',X'',1
+master-bin.000001 # XA_prepare # # XA PREPARE X'7472785f3130',X'',1
+master-bin.000001 # Gtid # # XA START X'7472785f3131',X'',1 GTID #-#-#
+master-bin.000001 # Annotate_rows # # INSERT INTO t SET a=11
+master-bin.000001 # Table_map # # table_id: # (test.t)
+master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
+master-bin.000001 # Query # # XA END X'7472785f3131',X'',1
+master-bin.000001 # XA_prepare # # XA PREPARE X'7472785f3131',X'',1
+master-bin.000001 # Gtid # # XA START X'7472785f3132',X'',1 GTID #-#-#
+master-bin.000001 # Query # # use `test`; INSERT INTO t SET a=12
+master-bin.000001 # Query # # XA END X'7472785f3132',X'',1
+master-bin.000001 # XA_prepare # # XA PREPARE X'7472785f3132',X'',1
+master-bin.000001 # Gtid # # XA START X'7472785f3133',X'',1 GTID #-#-#
+master-bin.000001 # Annotate_rows # # INSERT INTO t SET a=13
+master-bin.000001 # Table_map # # table_id: # (test.t)
+master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
+master-bin.000001 # Query # # XA END X'7472785f3133',X'',1
+master-bin.000001 # XA_prepare # # XA PREPARE X'7472785f3133',X'',1
+master-bin.000001 # Gtid # # XA START X'7472785f3134',X'',1 GTID #-#-#
+master-bin.000001 # Query # # use `test`; INSERT INTO t SET a=14
+master-bin.000001 # Query # # XA END X'7472785f3134',X'',1
+master-bin.000001 # XA_prepare # # XA PREPARE X'7472785f3134',X'',1
+master-bin.000001 # Gtid # # XA START X'7472785f3135',X'',1 GTID #-#-#
+master-bin.000001 # Annotate_rows # # INSERT INTO t SET a=15
+master-bin.000001 # Table_map # # table_id: # (test.t)
+master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
+master-bin.000001 # Query # # XA END X'7472785f3135',X'',1
+master-bin.000001 # XA_prepare # # XA PREPARE X'7472785f3135',X'',1
+master-bin.000001 # Gtid # # XA START X'7472785f3136',X'',1 GTID #-#-#
+master-bin.000001 # Query # # use `test`; INSERT INTO t SET a=16
+master-bin.000001 # Query # # XA END X'7472785f3136',X'',1
+master-bin.000001 # XA_prepare # # XA PREPARE X'7472785f3136',X'',1
+master-bin.000001 # Gtid # # XA START X'7472785f3137',X'',1 GTID #-#-#
+master-bin.000001 # Annotate_rows # # INSERT INTO t SET a=17
+master-bin.000001 # Table_map # # table_id: # (test.t)
+master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
+master-bin.000001 # Query # # XA END X'7472785f3137',X'',1
+master-bin.000001 # XA_prepare # # XA PREPARE X'7472785f3137',X'',1
+master-bin.000001 # Gtid # # XA START X'7472785f3138',X'',1 GTID #-#-#
+master-bin.000001 # Query # # use `test`; INSERT INTO t SET a=18
+master-bin.000001 # Query # # XA END X'7472785f3138',X'',1
+master-bin.000001 # XA_prepare # # XA PREPARE X'7472785f3138',X'',1
+master-bin.000001 # Gtid # # XA START X'7472785f3139',X'',1 GTID #-#-#
+master-bin.000001 # Annotate_rows # # INSERT INTO t SET a=19
+master-bin.000001 # Table_map # # table_id: # (test.t)
+master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
+master-bin.000001 # Query # # XA END X'7472785f3139',X'',1
+master-bin.000001 # XA_prepare # # XA PREPARE X'7472785f3139',X'',1
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # XA ROLLBACK X'7472785f30',X'',1
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # XA ROLLBACK X'7472785f31',X'',1
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # XA ROLLBACK X'7472785f32',X'',1
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # XA ROLLBACK X'7472785f33',X'',1
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # XA ROLLBACK X'7472785f34',X'',1
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # XA COMMIT X'7472785f35',X'',1
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # XA COMMIT X'7472785f36',X'',1
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # XA COMMIT X'7472785f37',X'',1
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # XA COMMIT X'7472785f38',X'',1
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # XA COMMIT X'7472785f39',X'',1
+master-bin.000001 # Stop # #
+All transactions must be completed, to empty-list the following:
+XA RECOVER;
+formatID gtrid_length bqual_length data
+XA RECOVER;
+formatID gtrid_length bqual_length data
diff --git a/mysql-test/suite/binlog/r/binlog_xa_prepared_disconnect.result b/mysql-test/suite/binlog/r/binlog_xa_prepared_disconnect.result
new file mode 100644
index 00000000000..9fda8ab3143
--- /dev/null
+++ b/mysql-test/suite/binlog/r/binlog_xa_prepared_disconnect.result
@@ -0,0 +1,1176 @@
+connection default;
+RESET MASTER;
+CREATE VIEW v_processlist as SELECT * FROM performance_schema.threads where type = 'FOREGROUND';
+call mtr.add_suppression("Found 10 prepared XA transactions");
+CREATE TABLE t (a INT) ENGINE=innodb;
+connect conn$index$type, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@sql_log_bin = OFF;
+CREATE TEMPORARY TABLE tmp1 (a int) ENGINE=innodb;
+XA START 'trx1tmp';
+INSERT INTO tmp1 SET a=1;
+XA END 'trx1tmp';
+XA PREPARE 'trx1tmp';
+connect conn$index$type, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@sql_log_bin = OFF;
+CREATE TEMPORARY TABLE tmp1 (a int) ENGINE=innodb;
+XA START 'trx2tmp';
+INSERT INTO tmp1 SET a=1;
+XA END 'trx2tmp';
+XA PREPARE 'trx2tmp';
+connect conn$index$type, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@sql_log_bin = OFF;
+CREATE TEMPORARY TABLE tmp1 (a int) ENGINE=innodb;
+XA START 'trx3tmp';
+INSERT INTO tmp1 SET a=1;
+XA END 'trx3tmp';
+XA PREPARE 'trx3tmp';
+connection default;
+XA COMMIT 'trx1tmp';
+ERROR XAE04: XAER_NOTA: Unknown XID
+XA ROLLBACK 'trx1tmp';
+ERROR XAE04: XAER_NOTA: Unknown XID
+XA START 'trx1tmp';
+ERROR XAE08: XAER_DUPID: The XID already exists
+connection default;
+*** 3 prepared transactions must be in the list ***
+XA RECOVER;
+formatID gtrid_length bqual_length data
+1 LEN1 LEN2 TRX_N
+1 LEN1 LEN2 TRX_N
+1 LEN1 LEN2 TRX_N
+connection conn1tmp;
+disconnect conn1tmp;
+connection default;
+XA COMMIT 'trx1tmp';
+KILL connection CONN_ID;
+XA COMMIT 'trx3tmp';
+connect conn$index$type, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'trx1ro';
+SELECT * from t ORDER BY a;
+a
+XA END 'trx1ro';
+XA PREPARE 'trx1ro';
+connect conn$index$type, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'trx2ro';
+SELECT * from t ORDER BY a;
+a
+XA END 'trx2ro';
+XA PREPARE 'trx2ro';
+connect conn$index$type, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'trx3ro';
+SELECT * from t ORDER BY a;
+a
+XA END 'trx3ro';
+XA PREPARE 'trx3ro';
+connection default;
+*** 4 prepared transactions must be in the list ***
+XA RECOVER;
+formatID gtrid_length bqual_length data
+1 LEN1 LEN2 TRX_N
+1 LEN1 LEN2 TRX_N
+1 LEN1 LEN2 TRX_N
+1 LEN1 LEN2 TRX_N
+connection conn1ro;
+disconnect conn1ro;
+connection default;
+XA ROLLBACK 'trx1ro';
+KILL connection CONN_ID;
+XA ROLLBACK 'trx3ro';
+connect conn$index$type, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'trx1empty';
+XA END 'trx1empty';
+XA PREPARE 'trx1empty';
+connect conn$index$type, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'trx2empty';
+XA END 'trx2empty';
+XA PREPARE 'trx2empty';
+connect conn$index$type, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'trx3empty';
+XA END 'trx3empty';
+XA PREPARE 'trx3empty';
+connection default;
+*** 5 prepared transactions must be in the list ***
+XA RECOVER;
+formatID gtrid_length bqual_length data
+1 LEN1 LEN2 TRX_N
+1 LEN1 LEN2 TRX_N
+1 LEN1 LEN2 TRX_N
+1 LEN1 LEN2 TRX_N
+1 LEN1 LEN2 TRX_N
+connection conn1empty;
+disconnect conn1empty;
+connection default;
+XA COMMIT 'trx1empty';
+KILL connection CONN_ID;
+XA COMMIT 'trx3empty';
+connect conn1$type, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'trx1unprepared';
+INSERT INTO t set a=0;
+XA END 'trx1unprepared';
+INSERT INTO t set a=0;
+ERROR XAE07: XAER_RMFAIL: The command cannot be executed when global transaction is in the IDLE state
+XA START 'trx1unprepared';
+ERROR XAE07: XAER_RMFAIL: The command cannot be executed when global transaction is in the IDLE state
+XA START 'trx1unprepared';
+ERROR XAE07: XAER_RMFAIL: The command cannot be executed when global transaction is in the IDLE state
+disconnect conn1unprepared;
+connection default;
+XA COMMIT 'trx1unprepared';
+ERROR XAE04: XAER_NOTA: Unknown XID
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+XA START 'trx_0';
+INSERT INTO t SET a=0;
+XA END 'trx_0';
+XA PREPARE 'trx_0';
+disconnect conn0;
+connection default;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+SET @@binlog_format = ROW;
+XA START 'trx_1';
+INSERT INTO t SET a=1;
+XA END 'trx_1';
+XA PREPARE 'trx_1';
+disconnect conn1;
+connection default;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+XA START 'trx_2';
+INSERT INTO t SET a=2;
+XA END 'trx_2';
+XA PREPARE 'trx_2';
+disconnect conn2;
+connection default;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+SET @@binlog_format = ROW;
+XA START 'trx_3';
+INSERT INTO t SET a=3;
+XA END 'trx_3';
+XA PREPARE 'trx_3';
+disconnect conn3;
+connection default;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+XA START 'trx_4';
+INSERT INTO t SET a=4;
+XA END 'trx_4';
+XA PREPARE 'trx_4';
+disconnect conn4;
+connection default;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+SET @@binlog_format = ROW;
+XA START 'trx_5';
+INSERT INTO t SET a=5;
+XA END 'trx_5';
+XA PREPARE 'trx_5';
+disconnect conn5;
+connection default;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+XA START 'trx_6';
+INSERT INTO t SET a=6;
+XA END 'trx_6';
+XA PREPARE 'trx_6';
+disconnect conn6;
+connection default;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+SET @@binlog_format = ROW;
+XA START 'trx_7';
+INSERT INTO t SET a=7;
+XA END 'trx_7';
+XA PREPARE 'trx_7';
+disconnect conn7;
+connection default;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+XA START 'trx_8';
+INSERT INTO t SET a=8;
+XA END 'trx_8';
+XA PREPARE 'trx_8';
+disconnect conn8;
+connection default;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+SET @@binlog_format = ROW;
+XA START 'trx_9';
+INSERT INTO t SET a=9;
+XA END 'trx_9';
+XA PREPARE 'trx_9';
+disconnect conn9;
+connection default;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+XA START 'trx_10';
+INSERT INTO t SET a=10;
+XA END 'trx_10';
+XA PREPARE 'trx_10';
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+SET @@binlog_format = ROW;
+XA START 'trx_11';
+INSERT INTO t SET a=11;
+XA END 'trx_11';
+XA PREPARE 'trx_11';
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+XA START 'trx_12';
+INSERT INTO t SET a=12;
+XA END 'trx_12';
+XA PREPARE 'trx_12';
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+SET @@binlog_format = ROW;
+XA START 'trx_13';
+INSERT INTO t SET a=13;
+XA END 'trx_13';
+XA PREPARE 'trx_13';
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+XA START 'trx_14';
+INSERT INTO t SET a=14;
+XA END 'trx_14';
+XA PREPARE 'trx_14';
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+SET @@binlog_format = ROW;
+XA START 'trx_15';
+INSERT INTO t SET a=15;
+XA END 'trx_15';
+XA PREPARE 'trx_15';
+connection default;
+KILL CONNECTION CONN_ID;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+XA START 'trx_16';
+INSERT INTO t SET a=16;
+XA END 'trx_16';
+XA PREPARE 'trx_16';
+connection default;
+KILL CONNECTION CONN_ID;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+SET @@binlog_format = ROW;
+XA START 'trx_17';
+INSERT INTO t SET a=17;
+XA END 'trx_17';
+XA PREPARE 'trx_17';
+connection default;
+KILL CONNECTION CONN_ID;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+XA START 'trx_18';
+INSERT INTO t SET a=18;
+XA END 'trx_18';
+XA PREPARE 'trx_18';
+connection default;
+KILL CONNECTION CONN_ID;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+SET @@binlog_format = ROW;
+XA START 'trx_19';
+INSERT INTO t SET a=19;
+XA END 'trx_19';
+XA PREPARE 'trx_19';
+connection default;
+KILL CONNECTION CONN_ID;
+connection default;
+XA ROLLBACK 'trx_0';
+XA ROLLBACK 'trx_1';
+XA ROLLBACK 'trx_2';
+XA ROLLBACK 'trx_3';
+XA ROLLBACK 'trx_4';
+XA COMMIT 'trx_5';
+XA COMMIT 'trx_6';
+XA COMMIT 'trx_7';
+XA COMMIT 'trx_8';
+XA COMMIT 'trx_9';
+# restart
+connect conn_restart_$k, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'new_trx_0';
+INSERT INTO t SET a=0;
+XA END 'new_trx_0';
+XA PREPARE 'new_trx_0';
+disconnect conn_restart_0;
+connection default;
+connect conn_restart_$k, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'new_trx_1';
+INSERT INTO t SET a=1;
+XA END 'new_trx_1';
+XA PREPARE 'new_trx_1';
+disconnect conn_restart_1;
+connection default;
+connect conn_restart_$k, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'new_trx_2';
+INSERT INTO t SET a=2;
+XA END 'new_trx_2';
+XA PREPARE 'new_trx_2';
+disconnect conn_restart_2;
+connection default;
+connect conn_restart_$k, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'new_trx_3';
+INSERT INTO t SET a=3;
+XA END 'new_trx_3';
+XA PREPARE 'new_trx_3';
+disconnect conn_restart_3;
+connection default;
+connect conn_restart_$k, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'new_trx_4';
+INSERT INTO t SET a=4;
+XA END 'new_trx_4';
+XA PREPARE 'new_trx_4';
+disconnect conn_restart_4;
+connection default;
+connect conn_restart_$k, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'new_trx_5';
+INSERT INTO t SET a=5;
+XA END 'new_trx_5';
+XA PREPARE 'new_trx_5';
+disconnect conn_restart_5;
+connection default;
+connect conn_restart_$k, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'new_trx_6';
+INSERT INTO t SET a=6;
+XA END 'new_trx_6';
+XA PREPARE 'new_trx_6';
+disconnect conn_restart_6;
+connection default;
+connect conn_restart_$k, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'new_trx_7';
+INSERT INTO t SET a=7;
+XA END 'new_trx_7';
+XA PREPARE 'new_trx_7';
+disconnect conn_restart_7;
+connection default;
+connect conn_restart_$k, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'new_trx_8';
+INSERT INTO t SET a=8;
+XA END 'new_trx_8';
+XA PREPARE 'new_trx_8';
+disconnect conn_restart_8;
+connection default;
+connect conn_restart_$k, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'new_trx_9';
+INSERT INTO t SET a=9;
+XA END 'new_trx_9';
+XA PREPARE 'new_trx_9';
+disconnect conn_restart_9;
+connection default;
+connection default;
+XA COMMIT 'new_trx_0';
+XA COMMIT 'new_trx_1';
+XA COMMIT 'new_trx_2';
+XA COMMIT 'new_trx_3';
+XA COMMIT 'new_trx_4';
+XA COMMIT 'new_trx_5';
+XA COMMIT 'new_trx_6';
+XA COMMIT 'new_trx_7';
+XA COMMIT 'new_trx_8';
+XA COMMIT 'new_trx_9';
+XA START 'trx_10';
+ERROR XAE08: XAER_DUPID: The XID already exists
+XA COMMIT 'trx_10';
+XA START 'trx_11';
+ERROR XAE08: XAER_DUPID: The XID already exists
+XA COMMIT 'trx_11';
+XA START 'trx_12';
+ERROR XAE08: XAER_DUPID: The XID already exists
+XA COMMIT 'trx_12';
+XA START 'trx_13';
+ERROR XAE08: XAER_DUPID: The XID already exists
+XA COMMIT 'trx_13';
+XA START 'trx_14';
+ERROR XAE08: XAER_DUPID: The XID already exists
+XA COMMIT 'trx_14';
+XA START 'trx_15';
+ERROR XAE08: XAER_DUPID: The XID already exists
+XA ROLLBACK 'trx_15';
+XA START 'trx_16';
+ERROR XAE08: XAER_DUPID: The XID already exists
+XA ROLLBACK 'trx_16';
+XA START 'trx_17';
+ERROR XAE08: XAER_DUPID: The XID already exists
+XA ROLLBACK 'trx_17';
+XA START 'trx_18';
+ERROR XAE08: XAER_DUPID: The XID already exists
+XA ROLLBACK 'trx_18';
+XA START 'trx_19';
+ERROR XAE08: XAER_DUPID: The XID already exists
+XA ROLLBACK 'trx_19';
+SELECT * FROM t;
+a
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+0
+1
+2
+3
+4
+5
+6
+7
+8
+9
+disconnect conn2tmp;
+disconnect conn3tmp;
+disconnect conn2ro;
+disconnect conn3ro;
+disconnect conn2empty;
+disconnect conn3empty;
+connection default;
+XA ROLLBACK 'trx_20';
+ERROR XAE04: XAER_NOTA: Unknown XID
+disconnect conn19;
+connection default;
+XA ROLLBACK 'trx_19';
+ERROR XAE04: XAER_NOTA: Unknown XID
+disconnect conn18;
+connection default;
+XA ROLLBACK 'trx_18';
+ERROR XAE04: XAER_NOTA: Unknown XID
+disconnect conn17;
+connection default;
+XA ROLLBACK 'trx_17';
+ERROR XAE04: XAER_NOTA: Unknown XID
+disconnect conn16;
+connection default;
+XA ROLLBACK 'trx_16';
+ERROR XAE04: XAER_NOTA: Unknown XID
+disconnect conn15;
+connection default;
+XA ROLLBACK 'trx_15';
+ERROR XAE04: XAER_NOTA: Unknown XID
+disconnect conn14;
+connection default;
+XA ROLLBACK 'trx_14';
+ERROR XAE04: XAER_NOTA: Unknown XID
+disconnect conn13;
+connection default;
+XA ROLLBACK 'trx_13';
+ERROR XAE04: XAER_NOTA: Unknown XID
+disconnect conn12;
+connection default;
+XA ROLLBACK 'trx_12';
+ERROR XAE04: XAER_NOTA: Unknown XID
+disconnect conn11;
+connection default;
+XA ROLLBACK 'trx_11';
+ERROR XAE04: XAER_NOTA: Unknown XID
+disconnect conn10;
+connect conn$index$type, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@sql_log_bin = OFF;
+CREATE TEMPORARY TABLE tmp1 (a int) ENGINE=innodb;
+XA START 'trx1tmp';
+INSERT INTO tmp1 SET a=1;
+XA END 'trx1tmp';
+XA PREPARE 'trx1tmp';
+connect conn$index$type, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@sql_log_bin = OFF;
+CREATE TEMPORARY TABLE tmp1 (a int) ENGINE=innodb;
+XA START 'trx2tmp';
+INSERT INTO tmp1 SET a=1;
+XA END 'trx2tmp';
+XA PREPARE 'trx2tmp';
+connect conn$index$type, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@sql_log_bin = OFF;
+CREATE TEMPORARY TABLE tmp1 (a int) ENGINE=innodb;
+XA START 'trx3tmp';
+INSERT INTO tmp1 SET a=1;
+XA END 'trx3tmp';
+XA PREPARE 'trx3tmp';
+connection default;
+XA COMMIT 'trx1tmp';
+ERROR XAE04: XAER_NOTA: Unknown XID
+XA ROLLBACK 'trx1tmp';
+ERROR XAE04: XAER_NOTA: Unknown XID
+XA START 'trx1tmp';
+ERROR XAE08: XAER_DUPID: The XID already exists
+connection default;
+*** 3 prepared transactions must be in the list ***
+XA RECOVER;
+formatID gtrid_length bqual_length data
+1 LEN1 LEN2 TRX_N
+1 LEN1 LEN2 TRX_N
+1 LEN1 LEN2 TRX_N
+connection conn1tmp;
+disconnect conn1tmp;
+connection default;
+XA COMMIT 'trx1tmp';
+KILL connection CONN_ID;
+XA COMMIT 'trx3tmp';
+connect conn$index$type, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'trx1ro';
+SELECT * from t ORDER BY a;
+a
+0
+1
+2
+3
+4
+5
+5
+6
+6
+7
+7
+8
+8
+9
+9
+10
+11
+12
+13
+14
+XA END 'trx1ro';
+XA PREPARE 'trx1ro';
+connect conn$index$type, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'trx2ro';
+SELECT * from t ORDER BY a;
+a
+0
+1
+2
+3
+4
+5
+5
+6
+6
+7
+7
+8
+8
+9
+9
+10
+11
+12
+13
+14
+XA END 'trx2ro';
+XA PREPARE 'trx2ro';
+connect conn$index$type, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'trx3ro';
+SELECT * from t ORDER BY a;
+a
+0
+1
+2
+3
+4
+5
+5
+6
+6
+7
+7
+8
+8
+9
+9
+10
+11
+12
+13
+14
+XA END 'trx3ro';
+XA PREPARE 'trx3ro';
+connection default;
+*** 4 prepared transactions must be in the list ***
+XA RECOVER;
+formatID gtrid_length bqual_length data
+1 LEN1 LEN2 TRX_N
+1 LEN1 LEN2 TRX_N
+1 LEN1 LEN2 TRX_N
+1 LEN1 LEN2 TRX_N
+connection conn1ro;
+disconnect conn1ro;
+connection default;
+XA ROLLBACK 'trx1ro';
+KILL connection CONN_ID;
+XA ROLLBACK 'trx3ro';
+connect conn$index$type, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'trx1empty';
+XA END 'trx1empty';
+XA PREPARE 'trx1empty';
+connect conn$index$type, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'trx2empty';
+XA END 'trx2empty';
+XA PREPARE 'trx2empty';
+connect conn$index$type, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'trx3empty';
+XA END 'trx3empty';
+XA PREPARE 'trx3empty';
+connection default;
+*** 5 prepared transactions must be in the list ***
+XA RECOVER;
+formatID gtrid_length bqual_length data
+1 LEN1 LEN2 TRX_N
+1 LEN1 LEN2 TRX_N
+1 LEN1 LEN2 TRX_N
+1 LEN1 LEN2 TRX_N
+1 LEN1 LEN2 TRX_N
+connection conn1empty;
+disconnect conn1empty;
+connection default;
+XA COMMIT 'trx1empty';
+KILL connection CONN_ID;
+XA COMMIT 'trx3empty';
+connect conn1$type, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'trx1unprepared';
+INSERT INTO t set a=0;
+XA END 'trx1unprepared';
+INSERT INTO t set a=0;
+ERROR XAE07: XAER_RMFAIL: The command cannot be executed when global transaction is in the IDLE state
+XA START 'trx1unprepared';
+ERROR XAE07: XAER_RMFAIL: The command cannot be executed when global transaction is in the IDLE state
+XA START 'trx1unprepared';
+ERROR XAE07: XAER_RMFAIL: The command cannot be executed when global transaction is in the IDLE state
+disconnect conn1unprepared;
+connection default;
+XA COMMIT 'trx1unprepared';
+ERROR XAE04: XAER_NOTA: Unknown XID
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+XA START 'trx_0';
+INSERT INTO t SET a=0;
+XA END 'trx_0';
+XA PREPARE 'trx_0';
+disconnect conn0;
+connection default;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+SET @@binlog_format = ROW;
+XA START 'trx_1';
+INSERT INTO t SET a=1;
+XA END 'trx_1';
+XA PREPARE 'trx_1';
+disconnect conn1;
+connection default;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+XA START 'trx_2';
+INSERT INTO t SET a=2;
+XA END 'trx_2';
+XA PREPARE 'trx_2';
+disconnect conn2;
+connection default;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+SET @@binlog_format = ROW;
+XA START 'trx_3';
+INSERT INTO t SET a=3;
+XA END 'trx_3';
+XA PREPARE 'trx_3';
+disconnect conn3;
+connection default;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+XA START 'trx_4';
+INSERT INTO t SET a=4;
+XA END 'trx_4';
+XA PREPARE 'trx_4';
+disconnect conn4;
+connection default;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+SET @@binlog_format = ROW;
+XA START 'trx_5';
+INSERT INTO t SET a=5;
+XA END 'trx_5';
+XA PREPARE 'trx_5';
+disconnect conn5;
+connection default;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+XA START 'trx_6';
+INSERT INTO t SET a=6;
+XA END 'trx_6';
+XA PREPARE 'trx_6';
+disconnect conn6;
+connection default;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+SET @@binlog_format = ROW;
+XA START 'trx_7';
+INSERT INTO t SET a=7;
+XA END 'trx_7';
+XA PREPARE 'trx_7';
+disconnect conn7;
+connection default;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+XA START 'trx_8';
+INSERT INTO t SET a=8;
+XA END 'trx_8';
+XA PREPARE 'trx_8';
+disconnect conn8;
+connection default;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+SET @@binlog_format = ROW;
+XA START 'trx_9';
+INSERT INTO t SET a=9;
+XA END 'trx_9';
+XA PREPARE 'trx_9';
+disconnect conn9;
+connection default;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+XA START 'trx_10';
+INSERT INTO t SET a=10;
+XA END 'trx_10';
+XA PREPARE 'trx_10';
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+SET @@binlog_format = ROW;
+XA START 'trx_11';
+INSERT INTO t SET a=11;
+XA END 'trx_11';
+XA PREPARE 'trx_11';
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+XA START 'trx_12';
+INSERT INTO t SET a=12;
+XA END 'trx_12';
+XA PREPARE 'trx_12';
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+SET @@binlog_format = ROW;
+XA START 'trx_13';
+INSERT INTO t SET a=13;
+XA END 'trx_13';
+XA PREPARE 'trx_13';
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+XA START 'trx_14';
+INSERT INTO t SET a=14;
+XA END 'trx_14';
+XA PREPARE 'trx_14';
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+SET @@binlog_format = ROW;
+XA START 'trx_15';
+INSERT INTO t SET a=15;
+XA END 'trx_15';
+XA PREPARE 'trx_15';
+connection default;
+KILL CONNECTION CONN_ID;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+XA START 'trx_16';
+INSERT INTO t SET a=16;
+XA END 'trx_16';
+XA PREPARE 'trx_16';
+connection default;
+KILL CONNECTION CONN_ID;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+SET @@binlog_format = ROW;
+XA START 'trx_17';
+INSERT INTO t SET a=17;
+XA END 'trx_17';
+XA PREPARE 'trx_17';
+connection default;
+KILL CONNECTION CONN_ID;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+XA START 'trx_18';
+INSERT INTO t SET a=18;
+XA END 'trx_18';
+XA PREPARE 'trx_18';
+connection default;
+KILL CONNECTION CONN_ID;
+connect conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@binlog_format = STATEMENT;
+SET @@binlog_format = ROW;
+XA START 'trx_19';
+INSERT INTO t SET a=19;
+XA END 'trx_19';
+XA PREPARE 'trx_19';
+connection default;
+KILL CONNECTION CONN_ID;
+connection default;
+XA ROLLBACK 'trx_0';
+XA ROLLBACK 'trx_1';
+XA ROLLBACK 'trx_2';
+XA ROLLBACK 'trx_3';
+XA ROLLBACK 'trx_4';
+XA COMMIT 'trx_5';
+XA COMMIT 'trx_6';
+XA COMMIT 'trx_7';
+XA COMMIT 'trx_8';
+XA COMMIT 'trx_9';
+# Kill and restart
+connect conn_restart_$k, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'new_trx_0';
+INSERT INTO t SET a=0;
+XA END 'new_trx_0';
+XA PREPARE 'new_trx_0';
+disconnect conn_restart_0;
+connection default;
+connect conn_restart_$k, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'new_trx_1';
+INSERT INTO t SET a=1;
+XA END 'new_trx_1';
+XA PREPARE 'new_trx_1';
+disconnect conn_restart_1;
+connection default;
+connect conn_restart_$k, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'new_trx_2';
+INSERT INTO t SET a=2;
+XA END 'new_trx_2';
+XA PREPARE 'new_trx_2';
+disconnect conn_restart_2;
+connection default;
+connect conn_restart_$k, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'new_trx_3';
+INSERT INTO t SET a=3;
+XA END 'new_trx_3';
+XA PREPARE 'new_trx_3';
+disconnect conn_restart_3;
+connection default;
+connect conn_restart_$k, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'new_trx_4';
+INSERT INTO t SET a=4;
+XA END 'new_trx_4';
+XA PREPARE 'new_trx_4';
+disconnect conn_restart_4;
+connection default;
+connect conn_restart_$k, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'new_trx_5';
+INSERT INTO t SET a=5;
+XA END 'new_trx_5';
+XA PREPARE 'new_trx_5';
+disconnect conn_restart_5;
+connection default;
+connect conn_restart_$k, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'new_trx_6';
+INSERT INTO t SET a=6;
+XA END 'new_trx_6';
+XA PREPARE 'new_trx_6';
+disconnect conn_restart_6;
+connection default;
+connect conn_restart_$k, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'new_trx_7';
+INSERT INTO t SET a=7;
+XA END 'new_trx_7';
+XA PREPARE 'new_trx_7';
+disconnect conn_restart_7;
+connection default;
+connect conn_restart_$k, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'new_trx_8';
+INSERT INTO t SET a=8;
+XA END 'new_trx_8';
+XA PREPARE 'new_trx_8';
+disconnect conn_restart_8;
+connection default;
+connect conn_restart_$k, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'new_trx_9';
+INSERT INTO t SET a=9;
+XA END 'new_trx_9';
+XA PREPARE 'new_trx_9';
+disconnect conn_restart_9;
+connection default;
+connection default;
+XA COMMIT 'new_trx_0';
+XA COMMIT 'new_trx_1';
+XA COMMIT 'new_trx_2';
+XA COMMIT 'new_trx_3';
+XA COMMIT 'new_trx_4';
+XA COMMIT 'new_trx_5';
+XA COMMIT 'new_trx_6';
+XA COMMIT 'new_trx_7';
+XA COMMIT 'new_trx_8';
+XA COMMIT 'new_trx_9';
+XA START 'trx_10';
+ERROR XAE08: XAER_DUPID: The XID already exists
+XA COMMIT 'trx_10';
+XA START 'trx_11';
+ERROR XAE08: XAER_DUPID: The XID already exists
+XA COMMIT 'trx_11';
+XA START 'trx_12';
+ERROR XAE08: XAER_DUPID: The XID already exists
+XA COMMIT 'trx_12';
+XA START 'trx_13';
+ERROR XAE08: XAER_DUPID: The XID already exists
+XA COMMIT 'trx_13';
+XA START 'trx_14';
+ERROR XAE08: XAER_DUPID: The XID already exists
+XA COMMIT 'trx_14';
+XA START 'trx_15';
+ERROR XAE08: XAER_DUPID: The XID already exists
+XA ROLLBACK 'trx_15';
+XA START 'trx_16';
+ERROR XAE08: XAER_DUPID: The XID already exists
+XA ROLLBACK 'trx_16';
+XA START 'trx_17';
+ERROR XAE08: XAER_DUPID: The XID already exists
+XA ROLLBACK 'trx_17';
+XA START 'trx_18';
+ERROR XAE08: XAER_DUPID: The XID already exists
+XA ROLLBACK 'trx_18';
+XA START 'trx_19';
+ERROR XAE08: XAER_DUPID: The XID already exists
+XA ROLLBACK 'trx_19';
+SELECT * FROM t;
+a
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+0
+1
+2
+3
+4
+5
+6
+7
+8
+9
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+0
+1
+2
+3
+4
+5
+6
+7
+8
+9
+disconnect conn2tmp;
+disconnect conn3tmp;
+disconnect conn2ro;
+disconnect conn3ro;
+disconnect conn2empty;
+disconnect conn3empty;
+connection default;
+XA ROLLBACK 'trx_20';
+ERROR XAE04: XAER_NOTA: Unknown XID
+disconnect conn19;
+connection default;
+XA ROLLBACK 'trx_19';
+ERROR XAE04: XAER_NOTA: Unknown XID
+disconnect conn18;
+connection default;
+XA ROLLBACK 'trx_18';
+ERROR XAE04: XAER_NOTA: Unknown XID
+disconnect conn17;
+connection default;
+XA ROLLBACK 'trx_17';
+ERROR XAE04: XAER_NOTA: Unknown XID
+disconnect conn16;
+connection default;
+XA ROLLBACK 'trx_16';
+ERROR XAE04: XAER_NOTA: Unknown XID
+disconnect conn15;
+connection default;
+XA ROLLBACK 'trx_15';
+ERROR XAE04: XAER_NOTA: Unknown XID
+disconnect conn14;
+connection default;
+XA ROLLBACK 'trx_14';
+ERROR XAE04: XAER_NOTA: Unknown XID
+disconnect conn13;
+connection default;
+XA ROLLBACK 'trx_13';
+ERROR XAE04: XAER_NOTA: Unknown XID
+disconnect conn12;
+connection default;
+XA ROLLBACK 'trx_12';
+ERROR XAE04: XAER_NOTA: Unknown XID
+disconnect conn11;
+connection default;
+XA ROLLBACK 'trx_11';
+ERROR XAE04: XAER_NOTA: Unknown XID
+disconnect conn10;
+connection default;
+XA START 'one_phase_trx_0';
+INSERT INTO t SET a=0;
+XA END 'one_phase_trx_0';
+XA COMMIT 'one_phase_trx_0' ONE PHASE;
+XA START 'one_phase_trx_1';
+INSERT INTO t SET a=1;
+XA END 'one_phase_trx_1';
+XA COMMIT 'one_phase_trx_1' ONE PHASE;
+XA START 'one_phase_trx_2';
+INSERT INTO t SET a=2;
+XA END 'one_phase_trx_2';
+XA COMMIT 'one_phase_trx_2' ONE PHASE;
+XA START 'one_phase_trx_3';
+INSERT INTO t SET a=3;
+XA END 'one_phase_trx_3';
+XA COMMIT 'one_phase_trx_3' ONE PHASE;
+XA START 'one_phase_trx_4';
+INSERT INTO t SET a=4;
+XA END 'one_phase_trx_4';
+XA COMMIT 'one_phase_trx_4' ONE PHASE;
+SELECT SUM(a) FROM t;
+SUM(a)
+290
+DROP TABLE t;
+DROP VIEW v_processlist;
+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`; CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v_processlist` AS SELECT * FROM performance_schema.threads where type = 'FOREGROUND'
+master-bin.000001 # Gtid # # BEGIN GTID #-#-#
+master-bin.000001 # Query # # use `mtr`; INSERT INTO test_suppressions (pattern) VALUES ( NAME_CONST('pattern',_latin1'Found 10 prepared XA transactions' COLLATE 'latin1_swedish_ci'))
+master-bin.000001 # Query # # COMMIT
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # use `test`; CREATE TABLE t (a INT) ENGINE=innodb
+master-bin.000001 # Gtid # # XA START X'7472785f30',X'',1 GTID #-#-#
+master-bin.000001 # Query # # use `test`; INSERT INTO t SET a=0
+master-bin.000001 # Query # # XA END X'7472785f30',X'',1
+master-bin.000001 # XA_prepare # # XA PREPARE X'7472785f30',X'',1
+master-bin.000001 # Gtid # # XA START X'7472785f31',X'',1 GTID #-#-#
+master-bin.000001 # Annotate_rows # # INSERT INTO t SET a=1
+master-bin.000001 # Table_map # # table_id: # (test.t)
+master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
+master-bin.000001 # Query # # XA END X'7472785f31',X'',1
+master-bin.000001 # XA_prepare # # XA PREPARE X'7472785f31',X'',1
+master-bin.000001 # Gtid # # XA START X'7472785f32',X'',1 GTID #-#-#
+master-bin.000001 # Query # # use `test`; INSERT INTO t SET a=2
+master-bin.000001 # Query # # XA END X'7472785f32',X'',1
+master-bin.000001 # XA_prepare # # XA PREPARE X'7472785f32',X'',1
+master-bin.000001 # Gtid # # XA START X'7472785f33',X'',1 GTID #-#-#
+master-bin.000001 # Annotate_rows # # INSERT INTO t SET a=3
+master-bin.000001 # Table_map # # table_id: # (test.t)
+master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
+master-bin.000001 # Query # # XA END X'7472785f33',X'',1
+master-bin.000001 # XA_prepare # # XA PREPARE X'7472785f33',X'',1
+master-bin.000001 # Gtid # # XA START X'7472785f34',X'',1 GTID #-#-#
+master-bin.000001 # Query # # use `test`; INSERT INTO t SET a=4
+master-bin.000001 # Query # # XA END X'7472785f34',X'',1
+master-bin.000001 # XA_prepare # # XA PREPARE X'7472785f34',X'',1
+master-bin.000001 # Gtid # # XA START X'7472785f35',X'',1 GTID #-#-#
+master-bin.000001 # Annotate_rows # # INSERT INTO t SET a=5
+master-bin.000001 # Table_map # # table_id: # (test.t)
+master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
+master-bin.000001 # Query # # XA END X'7472785f35',X'',1
+master-bin.000001 # XA_prepare # # XA PREPARE X'7472785f35',X'',1
+master-bin.000001 # Gtid # # XA START X'7472785f36',X'',1 GTID #-#-#
+master-bin.000001 # Query # # use `test`; INSERT INTO t SET a=6
+master-bin.000001 # Query # # XA END X'7472785f36',X'',1
+master-bin.000001 # XA_prepare # # XA PREPARE X'7472785f36',X'',1
+master-bin.000001 # Gtid # # XA START X'7472785f37',X'',1 GTID #-#-#
+master-bin.000001 # Annotate_rows # # INSERT INTO t SET a=7
+master-bin.000001 # Table_map # # table_id: # (test.t)
+master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
+master-bin.000001 # Query # # XA END X'7472785f37',X'',1
+master-bin.000001 # XA_prepare # # XA PREPARE X'7472785f37',X'',1
+master-bin.000001 # Gtid # # XA START X'7472785f38',X'',1 GTID #-#-#
+master-bin.000001 # Query # # use `test`; INSERT INTO t SET a=8
+master-bin.000001 # Query # # XA END X'7472785f38',X'',1
+master-bin.000001 # XA_prepare # # XA PREPARE X'7472785f38',X'',1
+master-bin.000001 # Gtid # # XA START X'7472785f39',X'',1 GTID #-#-#
+master-bin.000001 # Annotate_rows # # INSERT INTO t SET a=9
+master-bin.000001 # Table_map # # table_id: # (test.t)
+master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
+master-bin.000001 # Query # # XA END X'7472785f39',X'',1
+master-bin.000001 # XA_prepare # # XA PREPARE X'7472785f39',X'',1
+master-bin.000001 # Gtid # # XA START X'7472785f3130',X'',1 GTID #-#-#
+master-bin.000001 # Query # # use `test`; INSERT INTO t SET a=10
+master-bin.000001 # Query # # XA END X'7472785f3130',X'',1
+master-bin.000001 # XA_prepare # # XA PREPARE X'7472785f3130',X'',1
+master-bin.000001 # Gtid # # XA START X'7472785f3131',X'',1 GTID #-#-#
+master-bin.000001 # Annotate_rows # # INSERT INTO t SET a=11
+master-bin.000001 # Table_map # # table_id: # (test.t)
+master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
+master-bin.000001 # Query # # XA END X'7472785f3131',X'',1
+master-bin.000001 # XA_prepare # # XA PREPARE X'7472785f3131',X'',1
+master-bin.000001 # Gtid # # XA START X'7472785f3132',X'',1 GTID #-#-#
+master-bin.000001 # Query # # use `test`; INSERT INTO t SET a=12
+master-bin.000001 # Query # # XA END X'7472785f3132',X'',1
+master-bin.000001 # XA_prepare # # XA PREPARE X'7472785f3132',X'',1
+master-bin.000001 # Gtid # # XA START X'7472785f3133',X'',1 GTID #-#-#
+master-bin.000001 # Annotate_rows # # INSERT INTO t SET a=13
+master-bin.000001 # Table_map # # table_id: # (test.t)
+master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
+master-bin.000001 # Query # # XA END X'7472785f3133',X'',1
+master-bin.000001 # XA_prepare # # XA PREPARE X'7472785f3133',X'',1
+master-bin.000001 # Gtid # # XA START X'7472785f3134',X'',1 GTID #-#-#
+master-bin.000001 # Query # # use `test`; INSERT INTO t SET a=14
+master-bin.000001 # Query # # XA END X'7472785f3134',X'',1
+master-bin.000001 # XA_prepare # # XA PREPARE X'7472785f3134',X'',1
+master-bin.000001 # Gtid # # XA START X'7472785f3135',X'',1 GTID #-#-#
+master-bin.000001 # Annotate_rows # # INSERT INTO t SET a=15
+master-bin.000001 # Table_map # # table_id: # (test.t)
+master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
+master-bin.000001 # Query # # XA END X'7472785f3135',X'',1
+master-bin.000001 # XA_prepare # # XA PREPARE X'7472785f3135',X'',1
+master-bin.000001 # Gtid # # XA START X'7472785f3136',X'',1 GTID #-#-#
+master-bin.000001 # Query # # use `test`; INSERT INTO t SET a=16
+master-bin.000001 # Query # # XA END X'7472785f3136',X'',1
+master-bin.000001 # XA_prepare # # XA PREPARE X'7472785f3136',X'',1
+master-bin.000001 # Gtid # # XA START X'7472785f3137',X'',1 GTID #-#-#
+master-bin.000001 # Annotate_rows # # INSERT INTO t SET a=17
+master-bin.000001 # Table_map # # table_id: # (test.t)
+master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
+master-bin.000001 # Query # # XA END X'7472785f3137',X'',1
+master-bin.000001 # XA_prepare # # XA PREPARE X'7472785f3137',X'',1
+master-bin.000001 # Gtid # # XA START X'7472785f3138',X'',1 GTID #-#-#
+master-bin.000001 # Query # # use `test`; INSERT INTO t SET a=18
+master-bin.000001 # Query # # XA END X'7472785f3138',X'',1
+master-bin.000001 # XA_prepare # # XA PREPARE X'7472785f3138',X'',1
+master-bin.000001 # Gtid # # XA START X'7472785f3139',X'',1 GTID #-#-#
+master-bin.000001 # Annotate_rows # # INSERT INTO t SET a=19
+master-bin.000001 # Table_map # # table_id: # (test.t)
+master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
+master-bin.000001 # Query # # XA END X'7472785f3139',X'',1
+master-bin.000001 # XA_prepare # # XA PREPARE X'7472785f3139',X'',1
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # XA ROLLBACK X'7472785f30',X'',1
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # XA ROLLBACK X'7472785f31',X'',1
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # XA ROLLBACK X'7472785f32',X'',1
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # XA ROLLBACK X'7472785f33',X'',1
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # XA ROLLBACK X'7472785f34',X'',1
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # XA COMMIT X'7472785f35',X'',1
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # XA COMMIT X'7472785f36',X'',1
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # XA COMMIT X'7472785f37',X'',1
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # XA COMMIT X'7472785f38',X'',1
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # XA COMMIT X'7472785f39',X'',1
+master-bin.000001 # Stop # #
+All transactions must be completed, to empty-list the following:
+XA RECOVER;
+formatID gtrid_length bqual_length data
+XA RECOVER;
+formatID gtrid_length bqual_length data
diff --git a/mysql-test/suite/binlog/r/flashback.result b/mysql-test/suite/binlog/r/flashback.result
index eaced02b7a9..da1ef1f40dd 100644
--- a/mysql-test/suite/binlog/r/flashback.result
+++ b/mysql-test/suite/binlog/r/flashback.result
@@ -60,7 +60,7 @@ ROLLBACK/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=#/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=1411383296/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -422,7 +422,7 @@ COMMIT
use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=#/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=1411383296/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
diff --git a/mysql-test/suite/binlog/r/foreign_key.result b/mysql-test/suite/binlog/r/foreign_key.result
new file mode 100644
index 00000000000..171018f22be
--- /dev/null
+++ b/mysql-test/suite/binlog/r/foreign_key.result
@@ -0,0 +1,34 @@
+reset master;
+CREATE TABLE t1 (
+id INT,
+k INT,
+c CHAR(8),
+KEY (k),
+PRIMARY KEY (id),
+FOREIGN KEY (id) REFERENCES t1 (k)
+) ENGINE=InnoDB;
+LOCK TABLES t1 WRITE;
+SET SESSION FOREIGN_KEY_CHECKS= OFF;
+SET AUTOCOMMIT=OFF;
+INSERT INTO t1 VALUES (1,1,'foo');
+DROP TABLE t1;
+SET SESSION FOREIGN_KEY_CHECKS= ON;
+SET AUTOCOMMIT=ON;
+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`; CREATE TABLE t1 (
+id INT,
+k INT,
+c CHAR(8),
+KEY (k),
+PRIMARY KEY (id),
+FOREIGN KEY (id) REFERENCES t1 (k)
+) ENGINE=InnoDB
+master-bin.000001 # Gtid # # BEGIN GTID #-#-#
+master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (1,1,'foo')
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # use `test`; set foreign_key_checks=1; DROP TABLE `t1` /* generated by server */
diff --git a/mysql-test/suite/binlog/t/binlog_base64_flag.test b/mysql-test/suite/binlog/t/binlog_base64_flag.test
index e1187cd895c..5311da54f5f 100644
--- a/mysql-test/suite/binlog/t/binlog_base64_flag.test
+++ b/mysql-test/suite/binlog/t/binlog_base64_flag.test
@@ -9,10 +9,12 @@
# BINLOG statement does not work in embedded mode.
source include/not_embedded.inc;
+call mtr.add_suppression("BINLOG_BASE64_EVENT: According to the master's version");
+call mtr.add_suppression("BINLOG_BASE64_EVENT: Column 1 of table 'test.char128_utf8' cannot be converted");
+
disable_warnings;
DROP TABLE IF EXISTS t1;
enable_warnings;
-
# Test to show BUG#32407. This reads a binlog created with the
# mysql-5.1-telco-6.1 tree, specifically at the tag
# mysql-5.1.15-ndb-6.1.23, and applies it to the database. The test
diff --git a/mysql-test/suite/binlog/t/binlog_drop_if_exists.test b/mysql-test/suite/binlog/t/binlog_drop_if_exists.test
index 26910432428..b565104ce3a 100644
--- a/mysql-test/suite/binlog/t/binlog_drop_if_exists.test
+++ b/mysql-test/suite/binlog/t/binlog_drop_if_exists.test
@@ -1,3 +1,5 @@
+--source include/have_innodb.inc
+
# BUG#13684:
# SP: DROP PROCEDURE|FUNCTION IF EXISTS not binlogged if routine
# does not exist
@@ -128,3 +130,33 @@ DROP TABLE IF EXISTS /* */ t1;
--source include/show_binlog_events.inc
+--echo #
+--echo # MDEV-22820 Bogus "Unknown table" warnings produced upon attempt to
+--echo # drop parent table referenced by FK
+--echo #
+
+let $binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);
+
+create table t1 (a int, key(a)) engine=InnoDB;
+create table t2 (b int, foreign key(b) references t1(a)) engine=InnoDB;
+--error ER_ROW_IS_REFERENCED_2
+drop table if exists t1;
+--error ER_ROW_IS_REFERENCED_2
+drop table if exists t1,t0;
+show warnings;
+drop table t2,t1;
+
+create table t3 (a int) engine=aria;
+
+# This is not logged
+--error ER_BAD_TABLE_ERROR
+drop table t10,t20;
+# This is logged
+--error ER_BAD_TABLE_ERROR
+drop table t10,t20,t3;
+
+# These are both logged
+drop table if exists t10,t20;
+drop table if exists t10,t20,t3;
+
+--source include/show_binlog_events.inc
diff --git a/mysql-test/suite/binlog/t/binlog_empty_xa_prepared.test b/mysql-test/suite/binlog/t/binlog_empty_xa_prepared.test
new file mode 100644
index 00000000000..443feb60627
--- /dev/null
+++ b/mysql-test/suite/binlog/t/binlog_empty_xa_prepared.test
@@ -0,0 +1,82 @@
+# The test verifies execution and binary logging of user XA that produce empty
+# XA-PREPARE group of events.
+
+--source include/have_binlog_format_mixed.inc
+--source include/have_innodb.inc
+
+
+# MDEV-22420 DDL on temporary object is prohibited when XA is in prepare state
+
+# Temporary sequnce may not be created within a transaction
+CREATE TEMPORARY SEQUENCE seq_1;
+
+XA START '3';
+CREATE TEMPORARY TABLE tmp_1(c INT);
+XA END '3';
+XA PREPARE '3';
+--error ER_XAER_RMFAIL
+DROP TEMPORARY TABLE tmp_1;
+--error ER_XAER_RMFAIL
+ALTER TABLE tmp_1 DROP COLUMN c;
+--error ER_XAER_RMFAIL
+DROP TEMPORARY SEQUENCE seq_1;
+--error ER_XAER_RMFAIL
+ALTER SEQUENCE seq_1 INCREMENT BY 1;
+
+--error ER_XAER_RMFAIL
+CREATE TEMPORARY TABLE tmp_2(c INT);
+--error ER_XAER_RMFAIL
+CREATE TEMPORARY SEQUENCE seq_2;
+
+# Cleanup
+XA ROLLBACK '3';
+
+--echo # Proof of correct logging incl empty XA-PREPARE
+--source include/show_binlog_events.inc
+
+# The test verifies execution and binary logging of user XA that produce empty
+# XA-PREPARE group of events.
+#
+# MDEV-22757 Assertion `!binlog || exist_hton_without_prepare'
+# in MYSQL_BIN_LOG::unlog_xa_prepare
+
+RESET MASTER;
+CREATE TABLE t1 (a INT) ENGINE=MyISAM;
+CREATE TABLE t2 (id INT PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1),(2);
+INSERT INTO t2 VALUES (1),(2);
+
+XA START '1';
+REPLACE INTO t1 SELECT * FROM t1;
+REPLACE INTO t2 SELECT * FROM t2;
+XA END '1';
+XA PREPARE '1';
+
+# Cleanup
+XA ROLLBACK '1';
+DROP TABLE t1, t2;
+
+--echo # Proof of correct logging incl empty XA-PREPARE
+--source include/show_binlog_events.inc
+
+
+# MDEV-22430 Assertion ... in MYSQL_BIN_LOG::unlog_xa_prepare
+
+RESET MASTER;
+CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+CREATE SEQUENCE s ENGINE=InnoDB;
+
+XA START '2';
+SELECT NEXT VALUE FOR s;
+REPLACE INTO t1 SELECT * FROM t1;
+XA END '2';
+XA PREPARE '2';
+
+# Cleanup
+XA ROLLBACK '2';
+DROP SEQUENCE s;
+DROP TABLE t1;
+
+--echo # Proof of correct logging incl empty XA-PREPARE
+--source include/show_binlog_events.inc
diff --git a/mysql-test/suite/binlog/t/binlog_grant.test b/mysql-test/suite/binlog/t/binlog_grant.test
index 8a76b11e707..ec8d2aeccd2 100644
--- a/mysql-test/suite/binlog/t/binlog_grant.test
+++ b/mysql-test/suite/binlog/t/binlog_grant.test
@@ -68,9 +68,147 @@ GRANT REPLICATION CLIENT ON *.* TO 'mysqltest_1'@'localhost';
--disable_result_log
SHOW MASTER LOGS;
SHOW BINARY LOGS;
---enable_result_log
+SHOW BINLOG STATUS;
+--enable_result_log
# clean up
--disconnect rpl
connection default;
DROP USER 'mysqltest_1'@'localhost';
+
+
+--echo #
+--echo # Start of 10.5 test
+--echo #
+
+--echo #
+--echo # MDEV-21743 Split up SUPER privilege to smaller privileges
+--echo #
+
+--echo # Test that REPLICATION CLIENT is an alias for BINLOG MONITOR
+
+CREATE USER user1@localhost;
+GRANT REPLICATION CLIENT ON *.* TO user1@localhost;
+SHOW GRANTS FOR user1@localhost;
+REVOKE REPLICATION CLIENT ON *.* FROM user1@localhost;
+SHOW GRANTS FOR user1@localhost;
+DROP USER user1@localhost;
+
+
+--echo # Test if SHOW BINARY LOGS and SHOW BINGLOG STATUS are not allowed without REPLICATION CLIENT or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE REPLICATION CLIENT, SUPER ON *.* FROM user1@localhost;
+--connect(user1,localhost,user1,,)
+--connection user1
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+SHOW MASTER LOGS;
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+SHOW BINARY LOGS;
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+SHOW BINLOG STATUS;
+--disconnect user1
+--connection default
+DROP USER user1@localhost;
+
+
+--echo # Test if PURGE BINARY LOGS is not allowed without BINLOG ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE BINLOG ADMIN, SUPER ON *.* FROM user1@localhost;
+--connect(user1,localhost,user1,,)
+--connection user1
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+PURGE BINARY LOGS BEFORE '2001-01-01 00:00:00';
+--disconnect user1
+--connection default
+DROP USER user1@localhost;
+
+
+--echo # Test if PURGE BINLOG is allowed with BINLOG ADMIN
+CREATE USER user1@localhost;
+GRANT BINLOG ADMIN ON *.* TO user1@localhost;
+--connect(user1,localhost,user1,,)
+--connection user1
+PURGE BINARY LOGS BEFORE '2001-01-01 00:00:00';
+--disconnect user1
+connection default;
+DROP USER user1@localhost;
+
+
+--echo # Test if PURGE BINLOG is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+--connect(user1,localhost,user1,,)
+--connection user1
+PURGE BINARY LOGS BEFORE '2001-01-01 00:00:00';
+--disconnect user1
+connection default;
+DROP USER user1@localhost;
+
+
+--echo # Test if SHOW BINLOG EVENTS is not allowed without BINLOG MONITOR
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE BINLOG MONITOR ON *.* FROM user1@localhost;
+--connect(user1,localhost,user1,,)
+--connection user1
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+SHOW BINLOG EVENTS;
+--disconnect user1
+--connection default
+DROP USER user1@localhost;
+
+
+--echo # Test if SHOW BINLOG EVENTS is allowed with BINLOG MONITOR
+CREATE USER user1@localhost;
+GRANT BINLOG MONITOR ON *.* TO user1@localhost;
+--connect(user1,localhost,user1,,)
+--connection user1
+--disable_result_log
+SHOW BINLOG EVENTS;
+--enable_result_log
+--disconnect user1
+connection default;
+DROP USER user1@localhost;
+
+--echo #
+--echo # MDEV-21975 Add BINLOG REPLAY privilege and bind new privileges to
+--echo # gtid_seq_no, preudo_thread_id, server_id, gtid_domain_id
+--echo #
+--echo # Test combinations of BINLOG REPLAY guarded features which typically
+--echo # arise in mysqlbinlog output replay on server.
+--echo #
+
+CREATE USER user1@localhost;
+GRANT BINLOG REPLAY ON *.* TO user1@localhost;
+RESET MASTER;
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1),(2),(3);
+--connect(user1,localhost,user1,,)
+# Genuine mysqlbinlog output
+--exec $MYSQL_BINLOG --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mysqlbinlog.sql
+RENAME TABLE t1 to t2;
+
+--exec $MYSQL --user=user1 test < $MYSQLTEST_VARDIR/tmp/mysqlbinlog.sql
+
+--connection default
+REVOKE BINLOG REPLAY ON *.* FROM user1@localhost;
+call mtr.add_suppression("Access denied; you need (at least one of) the SUPER, BINLOG REPLAY privilege(s) for this operation");
+--echo # Privilege errors are expected now:
+--connection user1
+--error 1
+--exec $MYSQL --user=user1 test < $MYSQLTEST_VARDIR/tmp/mysqlbinlog.sql
+
+--connection default
+--let $diff_tables=t1,t2
+--source include/diff_tables.inc
+
+--echo # Test cleanup
+--remove_file $MYSQLTEST_VARDIR/tmp/mysqlbinlog.sql
+DROP TABLE t2,t1;
+DROP USER user1@localhost;
+
+--echo #
+--echo # End of 10.5 test
+--echo #
diff --git a/mysql-test/suite/binlog/t/binlog_index-master.opt b/mysql-test/suite/binlog/t/binlog_index-master.opt
index a1ad7417ad3..c3754b4d8d0 100644
--- a/mysql-test/suite/binlog/t/binlog_index-master.opt
+++ b/mysql-test/suite/binlog/t/binlog_index-master.opt
@@ -1 +1 @@
---skip-stack-trace --log-warnings=0 --log-bin=master-bin --log-bin-index=master-bin
+--loose-skip-stack-trace --log-warnings=0 --log-bin=master-bin --log-bin-index=master-bin
diff --git a/mysql-test/suite/binlog/t/binlog_mdev342-master.opt b/mysql-test/suite/binlog/t/binlog_mdev342-master.opt
index 425fda95086..590d44a6d12 100644
--- a/mysql-test/suite/binlog/t/binlog_mdev342-master.opt
+++ b/mysql-test/suite/binlog/t/binlog_mdev342-master.opt
@@ -1 +1 @@
---skip-stack-trace --skip-core-file
+--loose-skip-stack-trace --skip-core-file
diff --git a/mysql-test/suite/binlog/t/binlog_mixed.test b/mysql-test/suite/binlog/t/binlog_mixed.test
new file mode 100644
index 00000000000..fa1b2ca3a85
--- /dev/null
+++ b/mysql-test/suite/binlog/t/binlog_mixed.test
@@ -0,0 +1,23 @@
+--source include/have_innodb.inc
+--source include/have_binlog_format_mixed_or_row.inc
+
+#
+# MDEV-22048 Assertion `binlog_table_maps == 0 ||
+# locked_tables_mode == LTM_LOCK_TABLES' failed in
+# THD::reset_for_next_command
+#
+
+CREATE TABLE t1 (a INT) ENGINE=InnoDB;
+INSERT INTO t1 (a) VALUES (1),(2);
+
+CREATE TABLE t2 (b INT) ENGINE=InnoDB;
+
+CREATE TRIGGER tr1 BEFORE UPDATE ON t1 FOR EACH ROW SET @a = 0;
+CREATE TRIGGER tr2 BEFORE INSERT ON t2 FOR EACH ROW DELETE FROM t1 LIMIT 1;
+
+SET AUTOCOMMIT= OFF;
+LOCK TABLES t2 WRITE;
+DELETE FROM t1 LIMIT 1;
+SAVEPOINT A;
+UNLOCK TABLES;
+DROP TABLE t1, t2;
diff --git a/mysql-test/suite/binlog/t/binlog_table_map_optional_metadata.test b/mysql-test/suite/binlog/t/binlog_table_map_optional_metadata.test
new file mode 100644
index 00000000000..9fd201e0cb9
--- /dev/null
+++ b/mysql-test/suite/binlog/t/binlog_table_map_optional_metadata.test
@@ -0,0 +1,333 @@
+################################################################################
+# WL#4618 RBR: extended table metadata in the binary log
+#
+# Below metadata is logged into Table_map_log_event
+# - signedness of numeric columns
+# - charsets of character columns
+# - column names
+# - set/enum character sets and string values
+# - primary key
+#
+# The first two are always logged. The others are controlled by system
+# variable --binlog-row-metadata
+#
+# The test will verify if the metadata can be logged and printed by mysqlbinlog
+# correctly.
+# mysqlbinlog --print-table-metadata will print the extra metadata
+################################################################################
+--source include/have_debug.inc
+--source include/have_binlog_format_row.inc
+
+RESET MASTER;
+SET GLOBAL binlog_row_metadata = MINIMAL;
+
+--let $MYSQLD_DATADIR= `select @@datadir`
+--let $binlog_file= $MYSQLD_DATADIR/master-bin.000001
+
+--echo #
+--echo # Temporal types can be printed correctly
+--echo #
+CREATE TABLE t1(c_year YEAR, c_date DATE, c_time TIME, c_time_f TIME(3),
+ c_datetime DATETIME, c_datetime_f DATETIME(3),
+ c_timestamp TIMESTAMP, c_timestamp_f TIMESTAMP(3) DEFAULT "2017-1-1 10:10:10");
+
+INSERT INTO t1(c_year) VALUES(2017);
+--source include/print_optional_metadata.inc
+
+DROP TABLE t1;
+RESET MASTER;
+
+--echo #
+--echo # Geometry types can be printed correctly
+--echo #
+CREATE TABLE t1 (c_geo GEOMETRY, c_point POINT, c_linestring LINESTRING,
+ c_polygon POLYGON, c_multi_point MULTIPOINT,
+ c_multi_linestring MULTILINESTRING, c_multi_polygon MULTIPOLYGON,
+ c_geometrycollection GEOMETRYCOLLECTION, c_char CHAR(100));
+
+INSERT INTO t1(c_point) VALUES(ST_PointFromText('POINT(10 10)'));
+--source include/print_optional_metadata.inc
+
+RESET MASTER;
+SET GLOBAL binlog_row_metadata = FULL;
+
+# geometry type is binlogged, the real geometry types are printed
+INSERT INTO t1(c_point) VALUES(ST_PointFromText('POINT(10 10)'));
+--source include/print_optional_metadata.inc
+
+DROP TABLE t1;
+RESET MASTER;
+
+--echo #
+--echo # Numeric types can be printed correctly
+--echo #
+CREATE TABLE t1(c_bit BIT(10), c_bool BOOL, c_smallint SMALLINT,
+ c_mediumint MEDIUMINT, c_int INT UNSIGNED, c_bigint BIGINT,
+ c_float FLOAT UNSIGNED, c_double DOUBLE, c_decimal DECIMAL(10, 2));
+
+SET GLOBAL binlog_row_metadata = MINIMAL;
+INSERT INTO t1(c_bool) VALUES(1);
+
+--echo # UNSIGNED flag should be printed
+--source include/print_optional_metadata.inc
+
+RESET MASTER;
+SET GLOBAL binlog_row_metadata = FULL;
+INSERT INTO t1(c_bool) VALUES(1);
+
+--source include/print_optional_metadata.inc
+
+DROP TABLE t1;
+RESET MASTER;
+
+--echo #
+--echo # Character types can be printed correctly
+--echo #
+CREATE TABLE t1(c_char CHAR(10), c_varchar VARCHAR(500),
+ c_tinytext TINYTEXT, c_text TEXT,
+ c_mediumtext MEDIUMTEXT, c_longtext LONGTEXT CHARSET utf8);
+
+SET GLOBAL binlog_row_metadata = MINIMAL;
+INSERT INTO t1(c_char) VALUES("1");
+
+# Charset set is printed with default charset
+--source include/print_optional_metadata.inc
+
+RESET MASTER;
+SET GLOBAL binlog_row_metadata = FULL;
+INSERT INTO t1(c_char) VALUES("1");
+
+--source include/print_optional_metadata.inc
+
+DROP TABLE t1;
+RESET MASTER;
+
+--echo #
+--echo # Column names with non-ascii characters and escape characters can be printed correctly
+--echo #
+set names utf8;
+CREATE TABLE t1(`åäö表\a'``"` INT);
+
+SHOW CREATE TABLE t1;
+
+INSERT INTO t1 VALUES(1);
+--source include/print_optional_metadata.inc
+DROP TABLE t1;
+RESET MASTER;
+--echo #
+--echo # Charsets can be printed correctly
+--echo #
+CREATE TABLE t1(c_char_utf8 CHAR(10) CHARSET utf8,
+ c_varchar_utf8 VARCHAR(10) CHARSET utf8,
+ c_text_utf8 TEXT CHARSET utf8);
+
+INSERT INTO t1 VALUES("1", "2", "3");
+
+# Charset set is printed with Default charset
+--source include/print_optional_metadata.inc
+
+DROP TABLE t1;
+RESET MASTER;
+
+# Test collation number less than 250 and collation number greater than 250
+CREATE TABLE t1(c_utf8mb4_520 CHAR(10) CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci,
+ c_utf8mb4_0900 VARCHAR(10) CHARSET utf8mb4 COLLATE utf8mb4_polish_ci,
+ c_utf8mb4_def TEXT CHARSET utf8mb4);
+
+INSERT INTO t1 VALUES("1", "2", "3");
+
+# Charset set is printed without default charset
+--source include/print_optional_metadata.inc
+
+DROP TABLE t1;
+RESET MASTER;
+
+--echo #
+--echo # Blob and binary columns can be printed correctly
+--echo #
+CREATE TABLE t1(c_binary BINARY(10), c_varbinary VARBINARY(10),
+ c_tinyblob TINYBLOB, c_blob BLOB,
+ c_mediumblob MEDIUMBLOB, c_longblob LONGBLOB);
+
+INSERT INTO t1 VALUES("1", "2", "3", "4", "5", "6");
+--source include/print_optional_metadata.inc
+
+DROP TABLE t1;
+RESET MASTER;
+
+--echo #
+--echo # Verify that SET string values and character sets can be printed correctly
+--echo #
+
+set names utf8;
+CREATE TABLE t1(
+ c_set_1 SET("set1_v1_å", "set1_v2_ä", "set1_v3_ö"),
+ c_set_2 SET("set2_v1_å", "set2_v2_ä", "set2_v3_ö") CHARACTER SET latin1,
+ c_set_4 SET("set3_v1_å", "set3_v2_ä", "set3_v3_ö") CHARACTER SET swe7 COLLATE swe7_bin);
+
+SET GLOBAL binlog_row_metadata = MINIMAL;
+INSERT INTO t1 VALUES("set1_v1_å", "set2_v3_ö", "set3_v1_å");
+--source include/print_optional_metadata.inc
+
+RESET MASTER;
+SET GLOBAL binlog_row_metadata = FULL;
+INSERT INTO t1 VALUES("set1_v1_å", "set2_v3_ö", "set3_v1_å");
+--source include/print_optional_metadata.inc
+
+DROP TABLE t1;
+RESET MASTER;
+
+--echo #
+--echo # Verify that ENUM string values and character sets can be printed correctly
+--echo #
+
+CREATE TABLE t1(
+ c_enum_1 ENUM("enum1_v1_å", "enum1_v2_ä", "enum1_v3_ö"),
+ c_enum_3 ENUM("enum2_v1_å", "enum2_v2_ä", "enum2_v3_ö") CHARACTER SET latin1,
+ c_enum_4 ENUM("enum3_v1_å", "enum3_v2_ä", "enum3_v3_ö") CHARACTER SET swe7 COLLATE swe7_bin);
+
+SET GLOBAL binlog_row_metadata = MINIMAL;
+INSERT INTO t1 VALUES("enum1_v1_å", "enum2_v3_ö", "enum3_v1_å");
+--source include/print_optional_metadata.inc
+
+RESET MASTER;
+SET GLOBAL binlog_row_metadata = FULL;
+INSERT INTO t1 VALUES("enum1_v1_å", "enum2_v3_ö", "enum3_v1_å");
+--source include/print_optional_metadata.inc
+
+DROP TABLE t1;
+RESET MASTER;
+
+--echo #
+--echo # Verify that explicit NOT NULL can be printed correctly
+--echo #
+CREATE TABLE t1(c_not_null1 INT NOT NULL, c_null1 INT, c_not_null2 INT NOT NULL,
+ c_null2 INT);
+
+INSERT INTO t1 VALUES(1, 2, 3, 4);
+--source include/print_optional_metadata.inc
+
+DROP TABLE t1;
+RESET MASTER;
+
+--echo #
+--echo # Verify that primary key can be printed correctly
+--echo #
+CREATE TABLE t1(c_key1 INT, c_key3 INT, c_not_key INT, c_key2 INT,
+PRIMARY KEY(c_key1, c_key2, c_key3));
+
+INSERT INTO t1 VALUES(1, 2, 3, 4);
+--let $print_primary_key= 1
+--source include/print_optional_metadata.inc
+
+DROP TABLE t1;
+RESET MASTER;
+
+# Key has prefix
+CREATE TABLE t1(c_key1 CHAR(100), c_key3 CHAR(100), c_not_key INT, c_key2 CHAR(10),
+PRIMARY KEY(c_key1(5), c_key2, c_key3(10)));
+
+INSERT INTO t1 VALUES("1", "2", 3, "4");
+--source include/print_optional_metadata.inc
+
+RESET MASTER;
+# Primary key should not be printed
+SET GLOBAL binlog_row_metadata = MINIMAL;
+
+INSERT INTO t1 VALUES("2", "2", 3, "4");
+--source include/print_optional_metadata.inc
+
+RESET MASTER;
+--echo #
+--echo # Coverage test: Print column index instead of column name if column name
+--echo # is not binlogged.
+--echo #
+SET GLOBAL binlog_row_metadata = FULL;
+
+SET SESSION debug_dbug = 'd, dont_log_column_name';
+INSERT INTO t1 VALUES("3", "2", 3, "4");
+--source include/print_optional_metadata.inc
+
+--let $print_primary_key=
+DROP TABLE t1;
+RESET MASTER;
+
+--echo #
+--echo # Coverage test: Inject an invalid column type
+--echo #
+CREATE TABLE t1(c1 int, c2 BLOB);
+
+SET SESSION debug_dbug = 'd,inject_invalid_column_type';
+INSERT INTO t1 VALUES(1, "a");
+# It prints an error
+--source include/print_optional_metadata.inc
+
+RESET MASTER;
+
+--echo #
+--echo # Coverage test: Inject an invalid BLOB metadata
+--echo #
+--let $start_pos= query_get_value(SHOW MASTER STATUS, Position, 1)
+
+SET SESSION debug_dbug = 'd,inject_invalid_blob_size';
+INSERT INTO t1 VALUES(2, "b");
+
+# The invalid metadata will case assertion failure on Write_rows_log_event
+# So we need to stop mysqlbinlog before reading Write_rows_log_event.
+--let $stop_position= query_get_value(SHOW BINLOG EVENTS FROM $start_pos LIMIT 3, End_log_pos, 3)
+--source include/print_optional_metadata.inc
+
+--echo #
+--echo # Coverage test: Inject an invalid Geometry type
+--echo #
+DROP TABLE t1;
+CREATE TABLE t1(c_geometry GEOMETRY, c_point POINT, c_multilinestring MULTILINESTRING);
+RESET MASTER;
+--let $start_pos= query_get_value(SHOW MASTER STATUS, Position, 1)
+
+SET SESSION debug_dbug = 'd,inject_invalid_geometry_type';
+INSERT INTO t1(c_point) VALUES(ST_PointFromText('POINT(10 10)'));
+
+# The invalid metadata will case assertion failure on Write_rows_log_event
+# So we need to stop mysqlbinlog before reading Write_rows_log_event.
+--let $stop_position= query_get_value(SHOW BINLOG EVENTS FROM $start_pos LIMIT 3, End_log_pos, 3)
+--source include/print_optional_metadata.inc
+
+DROP TABLE t1;
+RESET MASTER;
+--echo #
+--echo # Comptibility Test: Verify mysqlbinlog can print OLD table_map_log_event
+--echo # without any optional metadata
+--echo #
+CREATE TABLE t1(c_int INT, c_tiny_int_unsigned TINYINT UNSIGNED,
+ c_binary BINARY(10), c_text TEXT, c_point POINT);
+
+SET session debug_dbug='d,simulate_no_optional_metadata';
+INSERT INTO t1(c_int) VALUES(1);
+# TINYINT will be printed without UNSIGNED flag,
+# CHAR will be printed as BINARY(10)
+# POINT will be printed as GEOMETRY
+--let $stop_position=
+--source include/print_optional_metadata.inc
+
+DROP TABLE t1;
+RESET MASTER;
+--echo #
+--echo # Simulate error on initializing charset and primary key metadata
+--echo #
+CREATE TABLE t1(c1 char(10) PRIMARY KEY);
+
+SET session debug_dbug='d,simulate_init_charset_field_error';
+INSERT INTO t1 VALUES("a");
+
+SET GLOBAL binlog_row_metadata = FULL;
+SET session debug_dbug='d,simulate_init_primary_key_field_error';
+INSERT INTO t1 VALUES("b");
+
+--let $print_primary_key= 1
+--source include/print_optional_metadata.inc
+
+SET SESSION debug_dbug = '';
+SET GLOBAL binlog_row_metadata = NO_LOG;
+DROP TABLE t1;
+RESET MASTER;
diff --git a/mysql-test/suite/binlog/t/binlog_table_map_optional_metadata_binary.test b/mysql-test/suite/binlog/t/binlog_table_map_optional_metadata_binary.test
new file mode 100644
index 00000000000..5997cfd5d27
--- /dev/null
+++ b/mysql-test/suite/binlog/t/binlog_table_map_optional_metadata_binary.test
@@ -0,0 +1,73 @@
+################################################################################
+# WL#4618 RBR: extended table metadata in the binary log
+#
+# Below metadata is logged into Table_map_log_event
+# - signedness of numeric columns
+# - charsets of character columns
+# - column names
+# - set/enum character sets and string values
+# - primary key
+#
+# The first two are always logged. The others are controlled by system
+# variable --binlog-row-metadata
+#
+# The test will verify if the metadata can be logged and printed by mysqlbinlog
+# correctly.
+# mysqlbinlog --print-table-metadata will print the extra metadata
+################################################################################
+--source include/have_debug.inc
+--source include/have_binlog_format_row.inc
+--let $MYSQLD_DATADIR= `select @@datadir`
+--let $binlog_file= $MYSQLD_DATADIR/master-bin.000001
+
+--echo #
+--echo # Verify that SET string values and character sets can be printed correctly
+--echo #
+
+SET NAMES utf8;
+CREATE TABLE t1(
+ c_set_1 SET("set1_v1_å", "set1_v2_ä", "set1_v3_ö"),
+ c_set_2 SET("set2_v1_å", "set2_v2_ä", "set2_v3_ö") CHARACTER SET binary);
+
+SET GLOBAL binlog_row_metadata = MINIMAL;
+INSERT INTO t1 VALUES("set1_v1_å", "set2_v2_ä");
+--source include/print_optional_metadata.inc
+
+RESET MASTER;
+SET GLOBAL binlog_row_metadata = FULL;
+INSERT INTO t1 VALUES("set1_v1_å", "set2_v2_ä");
+--source include/print_optional_metadata.inc
+INSERT INTO t1 VALUES("set1_v3_ö", "set2_v3_ö");
+INSERT INTO t1 VALUES("set1_v1_Ã¥", "set2_v1_Ã¥");
+SELECT c_set_1, HEX(c_set_1) FROM t1;
+SELECT c_set_2, HEX(c_set_2) FROM t1;
+
+DROP TABLE t1;
+RESET MASTER;
+
+--echo #
+--echo # Verify that ENUM string values and character sets can be printed correctly
+--echo #
+
+CREATE TABLE t1(
+ c_enum_1 ENUM("enum1_v1_å", "enum1_v2_ä", "enum1_v3_ö"),
+ c_enum_2 ENUM("enum2_v1_å", "enum2_v2_ä", "enum2_v3_ö") CHARACTER SET binary);
+
+SET GLOBAL binlog_row_metadata = MINIMAL;
+INSERT INTO t1 VALUES("enum1_v1_å", "enum2_v2_ä");
+--source include/print_optional_metadata.inc
+
+
+RESET MASTER;
+SET GLOBAL binlog_row_metadata = FULL;
+INSERT INTO t1 VALUES("enum1_v1_å", "enum2_v2_ä");
+--source include/print_optional_metadata.inc
+INSERT INTO t1 VALUES("enum1_v3_ö", "enum2_v3_ö");
+INSERT INTO t1 VALUES("enum1_v1_Ã¥", "enum2_v1_Ã¥");
+SELECT c_enum_1, HEX(c_enum_1) FROM t1;
+SELECT c_enum_2, HEX(c_enum_2) FROM t1;
+
+DROP TABLE t1;
+RESET MASTER;
+
+SET GLOBAL binlog_row_metadata = NO_LOG;
diff --git a/mysql-test/suite/binlog/t/binlog_table_map_optional_metadata_ucs2.test b/mysql-test/suite/binlog/t/binlog_table_map_optional_metadata_ucs2.test
new file mode 100644
index 00000000000..1e218acdfea
--- /dev/null
+++ b/mysql-test/suite/binlog/t/binlog_table_map_optional_metadata_ucs2.test
@@ -0,0 +1,74 @@
+################################################################################
+# WL#4618 RBR: extended table metadata in the binary log
+#
+# Below metadata is logged into Table_map_log_event
+# - signedness of numeric columns
+# - charsets of character columns
+# - column names
+# - set/enum character sets and string values
+# - primary key
+#
+# The first two are always logged. The others are controlled by system
+# variable --binlog-row-metadata
+#
+# The test will verify if the metadata can be logged and printed by mysqlbinlog
+# correctly.
+# mysqlbinlog --print-table-metadata will print the extra metadata
+################################################################################
+--source include/have_debug.inc
+--source include/have_binlog_format_row.inc
+--source include/have_ucs2.inc
+--let $MYSQLD_DATADIR= `select @@datadir`
+--let $binlog_file= $MYSQLD_DATADIR/master-bin.000001
+
+--echo #
+--echo # Verify that SET string values and character sets can be printed correctly
+--echo #
+
+SET NAMES utf8;
+CREATE TABLE t1(
+ c_set_1 SET("set1_v1_å", "set1_v2_ä", "set1_v3_ö"),
+ c_set_2 SET("set2_v1_å", "set2_v2_ä", "set2_v3_ö") CHARACTER SET ucs2);
+
+SET GLOBAL binlog_row_metadata = MINIMAL;
+INSERT INTO t1 VALUES("set1_v1_å", "set2_v2_ä");
+--source include/print_optional_metadata.inc
+
+RESET MASTER;
+SET GLOBAL binlog_row_metadata = FULL;
+INSERT INTO t1 VALUES("set1_v1_å", "set2_v2_ä");
+--source include/print_optional_metadata.inc
+INSERT INTO t1 VALUES("set1_v3_ö", "set2_v3_ö");
+INSERT INTO t1 VALUES("set1_v1_Ã¥", "set2_v1_Ã¥");
+SELECT c_set_1, HEX(c_set_1) FROM t1;
+SELECT c_set_2, HEX(c_set_2) FROM t1;
+
+DROP TABLE t1;
+RESET MASTER;
+
+--echo #
+--echo # Verify that ENUM string values and character sets can be printed correctly
+--echo #
+
+CREATE TABLE t1(
+ c_enum_1 ENUM("enum1_v1_å", "enum1_v2_ä", "enum1_v3_ö"),
+ c_enum_2 ENUM("enum2_v1_å", "enum2_v2_ä", "enum2_v3_ö") CHARACTER SET ucs2);
+
+SET GLOBAL binlog_row_metadata = MINIMAL;
+INSERT INTO t1 VALUES("enum1_v1_å", "enum2_v2_ä");
+--source include/print_optional_metadata.inc
+
+
+RESET MASTER;
+SET GLOBAL binlog_row_metadata = FULL;
+INSERT INTO t1 VALUES("enum1_v1_å", "enum2_v2_ä");
+--source include/print_optional_metadata.inc
+INSERT INTO t1 VALUES("enum1_v3_ö", "enum2_v3_ö");
+INSERT INTO t1 VALUES("enum1_v1_Ã¥", "enum2_v1_Ã¥");
+SELECT c_enum_1, HEX(c_enum_1) FROM t1;
+SELECT c_enum_2, HEX(c_enum_2) FROM t1;
+
+DROP TABLE t1;
+RESET MASTER;
+
+SET GLOBAL binlog_row_metadata = NO_LOG;
diff --git a/mysql-test/suite/binlog/t/binlog_table_map_optional_metadata_utf32.test b/mysql-test/suite/binlog/t/binlog_table_map_optional_metadata_utf32.test
new file mode 100644
index 00000000000..c1d449abf2f
--- /dev/null
+++ b/mysql-test/suite/binlog/t/binlog_table_map_optional_metadata_utf32.test
@@ -0,0 +1,74 @@
+################################################################################
+# WL#4618 RBR: extended table metadata in the binary log
+#
+# Below metadata is logged into Table_map_log_event
+# - signedness of numeric columns
+# - charsets of character columns
+# - column names
+# - set/enum character sets and string values
+# - primary key
+#
+# The first two are always logged. The others are controlled by system
+# variable --binlog-row-metadata
+#
+# The test will verify if the metadata can be logged and printed by mysqlbinlog
+# correctly.
+# mysqlbinlog --print-table-metadata will print the extra metadata
+################################################################################
+--source include/have_debug.inc
+--source include/have_binlog_format_row.inc
+--source include/have_utf32.inc
+--let $MYSQLD_DATADIR= `select @@datadir`
+--let $binlog_file= $MYSQLD_DATADIR/master-bin.000001
+
+--echo #
+--echo # Verify that SET string values and character sets can be printed correctly
+--echo #
+
+SET NAMES utf8;
+CREATE TABLE t1(
+ c_set_1 SET("set1_v1_å", "set1_v2_ä", "set1_v3_ö"),
+ c_set_2 SET("set2_v1_å", "set2_v2_ä", "set2_v3_ö") CHARACTER SET utf32);
+
+SET GLOBAL binlog_row_metadata = MINIMAL;
+INSERT INTO t1 VALUES("set1_v1_å", "set2_v2_ä");
+--source include/print_optional_metadata.inc
+
+RESET MASTER;
+SET GLOBAL binlog_row_metadata = FULL;
+INSERT INTO t1 VALUES("set1_v1_å", "set2_v2_ä");
+--source include/print_optional_metadata.inc
+INSERT INTO t1 VALUES("set1_v3_ö", "set2_v3_ö");
+INSERT INTO t1 VALUES("set1_v1_Ã¥", "set2_v1_Ã¥");
+SELECT c_set_1, HEX(c_set_1) FROM t1;
+SELECT c_set_2, HEX(c_set_2) FROM t1;
+
+DROP TABLE t1;
+RESET MASTER;
+
+--echo #
+--echo # Verify that ENUM string values and character sets can be printed correctly
+--echo #
+
+CREATE TABLE t1(
+ c_enum_1 ENUM("enum1_v1_å", "enum1_v2_ä", "enum1_v3_ö"),
+ c_enum_2 ENUM("enum2_v1_å", "enum2_v2_ä", "enum2_v3_ö") CHARACTER SET utf32);
+
+SET GLOBAL binlog_row_metadata = MINIMAL;
+INSERT INTO t1 VALUES("enum1_v1_å", "enum2_v2_ä");
+--source include/print_optional_metadata.inc
+
+
+RESET MASTER;
+SET GLOBAL binlog_row_metadata = FULL;
+INSERT INTO t1 VALUES("enum1_v1_å", "enum2_v2_ä");
+--source include/print_optional_metadata.inc
+INSERT INTO t1 VALUES("enum1_v3_ö", "enum2_v3_ö");
+INSERT INTO t1 VALUES("enum1_v1_Ã¥", "enum2_v1_Ã¥");
+SELECT c_enum_1, HEX(c_enum_1) FROM t1;
+SELECT c_enum_2, HEX(c_enum_2) FROM t1;
+
+DROP TABLE t1;
+RESET MASTER;
+
+SET GLOBAL binlog_row_metadata = NO_LOG;
diff --git a/mysql-test/suite/binlog/t/binlog_xa_checkpoint.test b/mysql-test/suite/binlog/t/binlog_xa_checkpoint.test
new file mode 100644
index 00000000000..b208d02cf2a
--- /dev/null
+++ b/mysql-test/suite/binlog/t/binlog_xa_checkpoint.test
@@ -0,0 +1,57 @@
+--source include/have_innodb.inc
+--source include/have_debug.inc
+--source include/have_debug_sync.inc
+--source include/have_binlog_format_row.inc
+
+RESET MASTER;
+
+CREATE TABLE t1 (a INT PRIMARY KEY, b MEDIUMTEXT) ENGINE=Innodb;
+
+# Test that
+# 1. XA PREPARE is binlogged before the XA has been prepared in Engine
+# 2. While XA PREPARE already binlogged in an old binlog file which has been rotated,
+# Binlog checkpoint is not generated for the latest log until
+# XA PREPARE returns, e.g OK to the client.
+
+
+# con1 will hang before doing commit checkpoint, blocking RESET MASTER.
+connect(con1,localhost,root,,);
+SET DEBUG_SYNC= "at_unlog_xa_prepare SIGNAL con1_ready WAIT_FOR con1_go";
+XA START '1';
+INSERT INTO t1 SET a=1;
+XA END '1';
+--send XA PREPARE '1';
+
+
+connection default;
+SET DEBUG_SYNC= "now WAIT_FOR con1_ready";
+FLUSH LOGS;
+FLUSH LOGS;
+FLUSH LOGS;
+
+--source include/show_binary_logs.inc
+--let $binlog_file= master-bin.000004
+--let $binlog_start= 4
+--source include/show_binlog_events.inc
+
+SET DEBUG_SYNC= "now SIGNAL con1_go";
+
+connection con1;
+reap;
+--echo *** master-bin.000004 checkpoint must show up now ***
+--source include/wait_for_binlog_checkpoint.inc
+
+# Todo: think about the error code returned, move to an appropriate test, or remove
+# connection default;
+#--error 1399
+# DROP TABLE t1;
+
+connection con1;
+XA ROLLBACK '1';
+SET debug_sync = 'reset';
+
+# Clean up.
+connection default;
+
+DROP TABLE t1;
+SET debug_sync = 'reset';
diff --git a/mysql-test/suite/binlog/t/binlog_xa_prepared.inc b/mysql-test/suite/binlog/t/binlog_xa_prepared.inc
new file mode 100644
index 00000000000..b6306791cf4
--- /dev/null
+++ b/mysql-test/suite/binlog/t/binlog_xa_prepared.inc
@@ -0,0 +1,102 @@
+--source include/have_innodb.inc
+--source include/have_perfschema.inc
+#
+# The test verifies binlogging of XA transaction and state of prepared XA
+# as far as binlog is concerned.
+#
+# The prepared XA transactions can be disconnected from the client,
+# discovered from another connection and commited or rolled back
+# later. They also survive the server restart. The test runs two
+# loops each consisting of prepared XA:s generation, their
+# manipulation and a server restart followed with survived XA:s
+# completion.
+#
+# Prepared XA can't get available to an external connection
+# until connection that either leaves actively or is killed
+# has completed a necessary part of its cleanup.
+# Selecting from P_S.threads provides a method to learn that.
+#
+# Total number of connection each performing one insert into table
+--let $conn_number=20
+# Number of rollbacks and commits from either side of the server restart
+--let $rollback_number=5
+--let $commit_number=5
+# Number of transactions that are terminated before server restarts
+--let $term_number=`SELECT $rollback_number + $commit_number`
+# Instead of disconnect make some connections killed when their
+# transactions got prepared.
+--let $killed_number=5
+# make some connections disconnected by shutdown rather than actively
+--let $server_disconn_number=5
+--let $prepared_at_server_restart = `SELECT $conn_number - $term_number`
+# number a "warmup" connection after server restart, they all commit
+--let $post_restart_conn_number=10
+
+# Counter to be used in GTID consistency check.
+# It's incremented per each non-XA transaction commit.
+# Local to this file variable to control one-phase commit loop
+--let $one_phase_number = 5
+
+--connection default
+
+# Remove possibly preceeding binlogs and clear initialization time
+# GTID executed info. In the following all transactions are counted
+# to conduct verification at the end of the test.
+if (`SELECT @@global.log_bin`)
+{
+ RESET MASTER;
+}
+
+# Disconected and follower threads need synchronization
+CREATE VIEW v_processlist as SELECT * FROM performance_schema.threads where type = 'FOREGROUND';
+
+--eval call mtr.add_suppression("Found $prepared_at_server_restart prepared XA transactions")
+
+CREATE TABLE t (a INT) ENGINE=innodb;
+
+# Counter is incremented at the end of post restart to
+# reflect number of loops done in correctness computation.
+--let $restart_number = 0
+--let $how_to_restart=restart_mysqld.inc
+--source suite/binlog/include/binlog_xa_prepared_do_and_restart.inc
+
+--let $how_to_restart=kill_and_restart_mysqld.inc
+--source suite/binlog/include/binlog_xa_prepared_do_and_restart.inc
+
+--connection default
+
+# Few xs that commit in one phase, not subject to the server restart
+# nor reconnect.
+# This piece of test is related to mysqlbinlog recovery examine below.
+--let $k = 0
+while ($k < $one_phase_number)
+{
+ --eval XA START 'one_phase_trx_$k'
+ --eval INSERT INTO t SET a=$k
+ --eval XA END 'one_phase_trx_$k'
+ --eval XA COMMIT 'one_phase_trx_$k' ONE PHASE
+
+ --inc $k
+}
+
+SELECT SUM(a) FROM t;
+DROP TABLE t;
+DROP VIEW v_processlist;
+
+let $outfile= $MYSQLTEST_VARDIR/tmp/mysqlbinlog.sql;
+if (`SELECT @@global.log_bin`)
+{
+ # Recording proper samples of binlogged prepared XA:s
+ --source include/show_binlog_events.inc
+ --exec $MYSQL_BINLOG -R --to-last-log master-bin.000001 > $outfile
+}
+
+--echo All transactions must be completed, to empty-list the following:
+XA RECOVER;
+
+if (`SELECT @@global.log_bin`)
+{
+ --exec $MYSQL test < $outfile
+ --remove_file $outfile
+ XA RECOVER;
+}
diff --git a/mysql-test/suite/binlog/t/binlog_xa_prepared_disconnect.test b/mysql-test/suite/binlog/t/binlog_xa_prepared_disconnect.test
new file mode 100644
index 00000000000..2a3184030cf
--- /dev/null
+++ b/mysql-test/suite/binlog/t/binlog_xa_prepared_disconnect.test
@@ -0,0 +1,11 @@
+###############################################################################
+# Bug#12161 Xa recovery and client disconnection
+# Testing new server options and binary logging prepared XA transaction.
+###############################################################################
+
+#
+# MIXED mode is chosen because formats are varied inside the sourced tests.
+#
+--source include/have_binlog_format_mixed.inc
+
+--source suite/binlog/t/binlog_xa_prepared.inc
diff --git a/mysql-test/suite/binlog/t/binlog_xa_recover.opt b/mysql-test/suite/binlog/t/binlog_xa_recover.opt
index 3c44f9fad10..f645a058a7b 100644
--- a/mysql-test/suite/binlog/t/binlog_xa_recover.opt
+++ b/mysql-test/suite/binlog/t/binlog_xa_recover.opt
@@ -1 +1 @@
---skip-stack-trace --skip-core-file --loose-debug-dbug=+d,xa_recover_expect_master_bin_000004
+--loose-skip-stack-trace --skip-core-file --loose-debug-dbug=+d,xa_recover_expect_master_bin_000004
diff --git a/mysql-test/suite/binlog/t/foreign_key.test b/mysql-test/suite/binlog/t/foreign_key.test
new file mode 100644
index 00000000000..87c719e4b6f
--- /dev/null
+++ b/mysql-test/suite/binlog/t/foreign_key.test
@@ -0,0 +1,22 @@
+--source include/have_innodb.inc
+--source include/have_binlog_format_row.inc
+
+reset master;
+
+CREATE TABLE t1 (
+ id INT,
+ k INT,
+ c CHAR(8),
+ KEY (k),
+ PRIMARY KEY (id),
+ FOREIGN KEY (id) REFERENCES t1 (k)
+) ENGINE=InnoDB;
+LOCK TABLES t1 WRITE;
+SET SESSION FOREIGN_KEY_CHECKS= OFF;
+SET AUTOCOMMIT=OFF;
+INSERT INTO t1 VALUES (1,1,'foo');
+DROP TABLE t1;
+SET SESSION FOREIGN_KEY_CHECKS= ON;
+SET AUTOCOMMIT=ON;
+
+source include/show_binlog_events.inc;
diff --git a/mysql-test/suite/binlog_encryption/binlog_row_annotate.result b/mysql-test/suite/binlog_encryption/binlog_row_annotate.result
index 3940717bf0b..142714f2377 100644
--- a/mysql-test/suite/binlog_encryption/binlog_row_annotate.result
+++ b/mysql-test/suite/binlog_encryption/binlog_row_annotate.result
@@ -120,7 +120,7 @@ ROLLBACK/*!*/;
#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=#/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -361,7 +361,7 @@ ROLLBACK/*!*/;
#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=#/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -523,7 +523,7 @@ ROLLBACK/*!*/;
#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=#/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
diff --git a/mysql-test/suite/binlog_encryption/rpl_parallel.result b/mysql-test/suite/binlog_encryption/rpl_parallel.result
deleted file mode 100644
index 4e1740f1dc6..00000000000
--- a/mysql-test/suite/binlog_encryption/rpl_parallel.result
+++ /dev/null
@@ -1,1691 +0,0 @@
-include/master-slave.inc
-[connection master]
-connection server_2;
-SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
-SET GLOBAL slave_parallel_threads=10;
-ERROR HY000: This operation cannot be performed as you have a running slave ''; run STOP SLAVE '' first
-include/stop_slave.inc
-SET GLOBAL slave_parallel_threads=10;
-SELECT IF(COUNT(*) < 10, "OK", CONCAT("Found too many system user processes: ", COUNT(*))) FROM information_schema.processlist WHERE user = "system user";
-IF(COUNT(*) < 10, "OK", CONCAT("Found too many system user processes: ", COUNT(*)))
-OK
-CHANGE MASTER TO master_use_gtid=slave_pos;
-include/start_slave.inc
-SELECT IF(COUNT(*) >= 10, "OK", CONCAT("Found too few system user processes: ", COUNT(*))) FROM information_schema.processlist WHERE user = "system user";
-IF(COUNT(*) >= 10, "OK", CONCAT("Found too few system user processes: ", COUNT(*)))
-OK
-include/stop_slave.inc
-SELECT IF(COUNT(*) < 10, "OK", CONCAT("Found too many system user processes: ", COUNT(*))) FROM information_schema.processlist WHERE user = "system user";
-IF(COUNT(*) < 10, "OK", CONCAT("Found too many system user processes: ", COUNT(*)))
-OK
-include/start_slave.inc
-SELECT IF(COUNT(*) >= 10, "OK", CONCAT("Found too few system user processes: ", COUNT(*))) FROM information_schema.processlist WHERE user = "system user";
-IF(COUNT(*) >= 10, "OK", CONCAT("Found too few system user processes: ", COUNT(*)))
-OK
-*** Test long-running query in domain 1 can run in parallel with short queries in domain 0 ***
-connection server_1;
-ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
-CREATE TABLE t1 (a int PRIMARY KEY) ENGINE=MyISAM;
-CREATE TABLE t2 (a int PRIMARY KEY) ENGINE=InnoDB;
-INSERT INTO t1 VALUES (1);
-INSERT INTO t2 VALUES (1);
-connection server_2;
-connect con_temp1,127.0.0.1,root,,test,$SERVER_MYPORT_2,;
-LOCK TABLE t1 WRITE;
-connection server_1;
-SET gtid_domain_id=1;
-INSERT INTO t1 VALUES (2);
-SET gtid_domain_id=0;
-INSERT INTO t2 VALUES (2);
-INSERT INTO t2 VALUES (3);
-BEGIN;
-INSERT INTO t2 VALUES (4);
-INSERT INTO t2 VALUES (5);
-COMMIT;
-INSERT INTO t2 VALUES (6);
-connection server_2;
-SELECT * FROM t2 ORDER by a;
-a
-1
-2
-3
-4
-5
-6
-connection con_temp1;
-SELECT * FROM t1;
-a
-1
-UNLOCK TABLES;
-connection server_2;
-SELECT * FROM t1 ORDER BY a;
-a
-1
-2
-*** Test two transactions in different domains committed in opposite order on slave but in a single group commit. ***
-connection server_2;
-include/stop_slave.inc
-connection server_1;
-SET sql_log_bin=0;
-CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
-RETURNS INT DETERMINISTIC
-BEGIN
-RETURN x;
-END
-||
-SET sql_log_bin=1;
-SET @old_format= @@SESSION.binlog_format;
-SET binlog_format='statement';
-SET gtid_domain_id=1;
-INSERT INTO t2 VALUES (foo(10,
-'commit_before_enqueue SIGNAL ready1 WAIT_FOR cont1',
-'commit_after_release_LOCK_prepare_ordered SIGNAL ready2'));
-connection server_2;
-FLUSH LOGS;
-SET sql_log_bin=0;
-CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
-RETURNS INT DETERMINISTIC
-BEGIN
-IF d1 != '' THEN
-SET debug_sync = d1;
-END IF;
-IF d2 != '' THEN
-SET debug_sync = d2;
-END IF;
-RETURN x;
-END
-||
-SET sql_log_bin=1;
-SET @old_format=@@GLOBAL.binlog_format;
-SET GLOBAL binlog_format=statement;
-SET GLOBAL slave_parallel_threads=0;
-SET GLOBAL slave_parallel_threads=10;
-include/start_slave.inc
-SET debug_sync='now WAIT_FOR ready1';
-connection server_1;
-SET gtid_domain_id=2;
-INSERT INTO t2 VALUES (foo(11,
-'commit_before_enqueue SIGNAL ready3 WAIT_FOR cont3',
-'commit_after_release_LOCK_prepare_ordered SIGNAL ready4 WAIT_FOR cont4'));
-SET gtid_domain_id=0;
-SELECT * FROM t2 WHERE a >= 10 ORDER BY a;
-a
-10
-11
-connection server_2;
-SET debug_sync='now WAIT_FOR ready3';
-SET debug_sync='now SIGNAL cont3';
-SET debug_sync='now WAIT_FOR ready4';
-SET debug_sync='now SIGNAL cont1';
-SET debug_sync='now WAIT_FOR ready2';
-SET debug_sync='now SIGNAL cont4';
-SELECT * FROM t2 WHERE a >= 10 ORDER BY a;
-a
-10
-11
-include/show_binlog_events.inc
-Log_name Pos Event_type Server_id End_log_pos Info
-slave-bin.000002 # Binlog_checkpoint # # slave-bin.000002
-slave-bin.000002 # Gtid # # BEGIN GTID #-#-# cid=#
-slave-bin.000002 # Query # # use `test`; INSERT INTO t2 VALUES (foo(11,
-'commit_before_enqueue SIGNAL ready3 WAIT_FOR cont3',
-'commit_after_release_LOCK_prepare_ordered SIGNAL ready4 WAIT_FOR cont4'))
-slave-bin.000002 # Xid # # COMMIT /* XID */
-slave-bin.000002 # Gtid # # BEGIN GTID #-#-# cid=#
-slave-bin.000002 # Query # # use `test`; INSERT INTO t2 VALUES (foo(10,
-'commit_before_enqueue SIGNAL ready1 WAIT_FOR cont1',
-'commit_after_release_LOCK_prepare_ordered SIGNAL ready2'))
-slave-bin.000002 # Xid # # COMMIT /* XID */
-FLUSH LOGS;
-connection server_2;
-include/stop_slave.inc
-SET GLOBAL slave_parallel_threads=0;
-SET GLOBAL slave_parallel_threads=10;
-SET debug_sync='RESET';
-include/start_slave.inc
-*** Test that group-committed transactions on the master can replicate in parallel on the slave. ***
-connection server_1;
-SET debug_sync='RESET';
-FLUSH LOGS;
-CREATE TABLE t3 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB;
-INSERT INTO t3 VALUES (1,1), (3,3), (5,5), (7,7);
-connection server_2;
-connection con_temp1;
-BEGIN;
-INSERT INTO t3 VALUES (2,102);
-connect con_temp2,127.0.0.1,root,,test,$SERVER_MYPORT_2,;
-BEGIN;
-INSERT INTO t3 VALUES (4,104);
-connect con_temp3,127.0.0.1,root,,test,$SERVER_MYPORT_1,;
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1';
-SET binlog_format=statement;
-INSERT INTO t3 VALUES (2, foo(12,
-'commit_after_release_LOCK_prepare_ordered SIGNAL slave_queued1 WAIT_FOR slave_cont1',
-''));
-connection server_1;
-SET debug_sync='now WAIT_FOR master_queued1';
-connect con_temp4,127.0.0.1,root,,test,$SERVER_MYPORT_1,;
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2';
-SET binlog_format=statement;
-INSERT INTO t3 VALUES (4, foo(14,
-'commit_after_release_LOCK_prepare_ordered SIGNAL slave_queued2',
-''));
-connection server_1;
-SET debug_sync='now WAIT_FOR master_queued2';
-connect con_temp5,127.0.0.1,root,,test,$SERVER_MYPORT_1,;
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued3';
-SET binlog_format=statement;
-INSERT INTO t3 VALUES (6, foo(16,
-'group_commit_waiting_for_prior SIGNAL slave_queued3',
-''));
-connection server_1;
-SET debug_sync='now WAIT_FOR master_queued3';
-SET debug_sync='now SIGNAL master_cont1';
-connection con_temp3;
-connection con_temp4;
-connection con_temp5;
-SET debug_sync='RESET';
-connection server_1;
-SELECT * FROM t3 ORDER BY a;
-a b
-1 1
-2 12
-3 3
-4 14
-5 5
-6 16
-7 7
-include/show_binlog_events.inc
-Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000002 # Binlog_checkpoint # # master-bin.000001
-master-bin.000002 # Binlog_checkpoint # # master-bin.000002
-master-bin.000002 # Gtid # # GTID #-#-#
-master-bin.000002 # Query # # use `test`; CREATE TABLE t3 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB
-master-bin.000002 # Gtid # # BEGIN GTID #-#-#
-master-bin.000002 # Query # # use `test`; INSERT INTO t3 VALUES (1,1), (3,3), (5,5), (7,7)
-master-bin.000002 # Xid # # COMMIT /* XID */
-master-bin.000002 # Gtid # # BEGIN GTID #-#-# cid=#
-master-bin.000002 # Query # # use `test`; INSERT INTO t3 VALUES (2, foo(12,
-'commit_after_release_LOCK_prepare_ordered SIGNAL slave_queued1 WAIT_FOR slave_cont1',
-''))
-master-bin.000002 # Xid # # COMMIT /* XID */
-master-bin.000002 # Gtid # # BEGIN GTID #-#-# cid=#
-master-bin.000002 # Query # # use `test`; INSERT INTO t3 VALUES (4, foo(14,
-'commit_after_release_LOCK_prepare_ordered SIGNAL slave_queued2',
-''))
-master-bin.000002 # Xid # # COMMIT /* XID */
-master-bin.000002 # Gtid # # BEGIN GTID #-#-# cid=#
-master-bin.000002 # Query # # use `test`; INSERT INTO t3 VALUES (6, foo(16,
-'group_commit_waiting_for_prior SIGNAL slave_queued3',
-''))
-master-bin.000002 # Xid # # COMMIT /* XID */
-connection server_2;
-SET debug_sync='now WAIT_FOR slave_queued3';
-connection con_temp1;
-ROLLBACK;
-connection server_2;
-SET debug_sync='now WAIT_FOR slave_queued1';
-connection con_temp2;
-ROLLBACK;
-connection server_2;
-SET debug_sync='now WAIT_FOR slave_queued2';
-SET debug_sync='now SIGNAL slave_cont1';
-SELECT * FROM t3 ORDER BY a;
-a b
-1 1
-2 12
-3 3
-4 14
-5 5
-6 16
-7 7
-include/show_binlog_events.inc
-Log_name Pos Event_type Server_id End_log_pos Info
-slave-bin.000003 # Binlog_checkpoint # # slave-bin.000003
-slave-bin.000003 # Gtid # # GTID #-#-#
-slave-bin.000003 # Query # # use `test`; CREATE TABLE t3 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB
-slave-bin.000003 # Gtid # # BEGIN GTID #-#-#
-slave-bin.000003 # Query # # use `test`; INSERT INTO t3 VALUES (1,1), (3,3), (5,5), (7,7)
-slave-bin.000003 # Xid # # COMMIT /* XID */
-slave-bin.000003 # Gtid # # BEGIN GTID #-#-# cid=#
-slave-bin.000003 # Query # # use `test`; INSERT INTO t3 VALUES (2, foo(12,
-'commit_after_release_LOCK_prepare_ordered SIGNAL slave_queued1 WAIT_FOR slave_cont1',
-''))
-slave-bin.000003 # Xid # # COMMIT /* XID */
-slave-bin.000003 # Gtid # # BEGIN GTID #-#-# cid=#
-slave-bin.000003 # Query # # use `test`; INSERT INTO t3 VALUES (4, foo(14,
-'commit_after_release_LOCK_prepare_ordered SIGNAL slave_queued2',
-''))
-slave-bin.000003 # Xid # # COMMIT /* XID */
-slave-bin.000003 # Gtid # # BEGIN GTID #-#-# cid=#
-slave-bin.000003 # Query # # use `test`; INSERT INTO t3 VALUES (6, foo(16,
-'group_commit_waiting_for_prior SIGNAL slave_queued3',
-''))
-slave-bin.000003 # Xid # # COMMIT /* XID */
-*** Test STOP SLAVE in parallel mode ***
-connection server_2;
-include/stop_slave.inc
-SET debug_sync='RESET';
-SET GLOBAL slave_parallel_threads=0;
-SET GLOBAL slave_parallel_threads=10;
-connection server_1;
-SET binlog_direct_non_transactional_updates=0;
-SET sql_log_bin=0;
-CALL mtr.add_suppression("Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction");
-SET sql_log_bin=1;
-BEGIN;
-INSERT INTO t2 VALUES (20);
-INSERT INTO t1 VALUES (20);
-INSERT INTO t2 VALUES (21);
-INSERT INTO t3 VALUES (20, 20);
-COMMIT;
-INSERT INTO t3 VALUES(21, 21);
-INSERT INTO t3 VALUES(22, 22);
-SET binlog_format=@old_format;
-connection con_temp1;
-BEGIN;
-INSERT INTO t2 VALUES (21);
-connection server_2;
-START SLAVE;
-connection con_temp2;
-SET @old_dbug= @@GLOBAL.debug_dbug;
-SET GLOBAL debug_dbug="+d,rpl_parallel_wait_for_done_trigger";
-STOP SLAVE;
-connection con_temp1;
-SET debug_sync='now WAIT_FOR wait_for_done_waiting';
-ROLLBACK;
-connection con_temp2;
-SET GLOBAL debug_dbug=@old_dbug;
-SET debug_sync='RESET';
-connection server_2;
-include/wait_for_slave_to_stop.inc
-SELECT * FROM t1 WHERE a >= 20 ORDER BY a;
-a
-20
-SELECT * FROM t2 WHERE a >= 20 ORDER BY a;
-a
-20
-21
-SELECT * FROM t3 WHERE a >= 20 ORDER BY a;
-a b
-20 20
-include/start_slave.inc
-SELECT * FROM t1 WHERE a >= 20 ORDER BY a;
-a
-20
-SELECT * FROM t2 WHERE a >= 20 ORDER BY a;
-a
-20
-21
-SELECT * FROM t3 WHERE a >= 20 ORDER BY a;
-a b
-20 20
-21 21
-22 22
-connection server_2;
-include/stop_slave.inc
-SET GLOBAL binlog_format=@old_format;
-SET GLOBAL slave_parallel_threads=0;
-SET GLOBAL slave_parallel_threads=10;
-include/start_slave.inc
-*** Test killing slave threads at various wait points ***
-*** 1. Test killing transaction waiting in commit for previous transaction to commit ***
-connection con_temp3;
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1';
-SET binlog_format=statement;
-INSERT INTO t3 VALUES (31, foo(31,
-'commit_before_prepare_ordered WAIT_FOR t2_waiting',
-'commit_after_prepare_ordered SIGNAL t1_ready WAIT_FOR t1_cont'));
-connection server_1;
-SET debug_sync='now WAIT_FOR master_queued1';
-connection con_temp4;
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2';
-SET binlog_format=statement;
-BEGIN;
-INSERT INTO t3 VALUES (32, foo(32,
-'ha_write_row_end SIGNAL t2_query WAIT_FOR t2_cont',
-''));
-INSERT INTO t3 VALUES (33, foo(33,
-'group_commit_waiting_for_prior SIGNAL t2_waiting',
-'group_commit_waiting_for_prior_killed SIGNAL t2_killed'));
-COMMIT;
-connection server_1;
-SET debug_sync='now WAIT_FOR master_queued2';
-connection con_temp5;
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued3';
-SET binlog_format=statement;
-INSERT INTO t3 VALUES (34, foo(34,
-'',
-''));
-connection server_1;
-SET debug_sync='now WAIT_FOR master_queued3';
-SET debug_sync='now SIGNAL master_cont1';
-connection con_temp3;
-connection con_temp4;
-connection con_temp5;
-connection server_1;
-SELECT * FROM t3 WHERE a >= 30 ORDER BY a;
-a b
-31 31
-32 32
-33 33
-34 34
-SET debug_sync='RESET';
-connection server_2;
-SET sql_log_bin=0;
-CALL mtr.add_suppression("Query execution was interrupted");
-CALL mtr.add_suppression("Commit failed due to failure of an earlier commit on which this one depends");
-CALL mtr.add_suppression("Slave: Connection was killed");
-SET sql_log_bin=1;
-SET debug_sync='now WAIT_FOR t2_query';
-SET debug_sync='now SIGNAL t2_cont';
-SET debug_sync='now WAIT_FOR t1_ready';
-KILL THD_ID;
-SET debug_sync='now WAIT_FOR t2_killed';
-SET debug_sync='now SIGNAL t1_cont';
-include/wait_for_slave_sql_error.inc [errno=1317,1927,1964]
-STOP SLAVE IO_THREAD;
-SELECT * FROM t3 WHERE a >= 30 ORDER BY a;
-a b
-31 31
-SET debug_sync='RESET';
-SET GLOBAL slave_parallel_threads=0;
-SET GLOBAL slave_parallel_threads=10;
-SET sql_log_bin=0;
-DROP FUNCTION foo;
-CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
-RETURNS INT DETERMINISTIC
-BEGIN
-RETURN x;
-END
-||
-SET sql_log_bin=1;
-connection server_1;
-INSERT INTO t3 VALUES (39,0);
-connection server_2;
-include/start_slave.inc
-SELECT * FROM t3 WHERE a >= 30 ORDER BY a;
-a b
-31 31
-32 32
-33 33
-34 34
-39 0
-SET sql_log_bin=0;
-DROP FUNCTION foo;
-CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
-RETURNS INT DETERMINISTIC
-BEGIN
-IF d1 != '' THEN
-SET debug_sync = d1;
-END IF;
-IF d2 != '' THEN
-SET debug_sync = d2;
-END IF;
-RETURN x;
-END
-||
-SET sql_log_bin=1;
-connection server_2;
-include/stop_slave.inc
-SET GLOBAL binlog_format=@old_format;
-SET GLOBAL slave_parallel_threads=0;
-SET GLOBAL slave_parallel_threads=10;
-include/start_slave.inc
-*** 2. Same as (1), but without restarting IO thread after kill of SQL threads ***
-connection con_temp3;
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1';
-SET binlog_format=statement;
-INSERT INTO t3 VALUES (41, foo(41,
-'commit_before_prepare_ordered WAIT_FOR t2_waiting',
-'commit_after_prepare_ordered SIGNAL t1_ready WAIT_FOR t1_cont'));
-connection server_1;
-SET debug_sync='now WAIT_FOR master_queued1';
-connection con_temp4;
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2';
-SET binlog_format=statement;
-BEGIN;
-INSERT INTO t3 VALUES (42, foo(42,
-'ha_write_row_end SIGNAL t2_query WAIT_FOR t2_cont',
-''));
-INSERT INTO t3 VALUES (43, foo(43,
-'group_commit_waiting_for_prior SIGNAL t2_waiting',
-'group_commit_waiting_for_prior_killed SIGNAL t2_killed'));
-COMMIT;
-connection server_1;
-SET debug_sync='now WAIT_FOR master_queued2';
-connection con_temp5;
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued3';
-SET binlog_format=statement;
-INSERT INTO t3 VALUES (44, foo(44,
-'',
-''));
-connection server_1;
-SET debug_sync='now WAIT_FOR master_queued3';
-SET debug_sync='now SIGNAL master_cont1';
-connection con_temp3;
-connection con_temp4;
-connection con_temp5;
-connection server_1;
-SELECT * FROM t3 WHERE a >= 40 ORDER BY a;
-a b
-41 41
-42 42
-43 43
-44 44
-SET debug_sync='RESET';
-connection server_2;
-SET debug_sync='now WAIT_FOR t2_query';
-SET debug_sync='now SIGNAL t2_cont';
-SET debug_sync='now WAIT_FOR t1_ready';
-KILL THD_ID;
-SET debug_sync='now WAIT_FOR t2_killed';
-SET debug_sync='now SIGNAL t1_cont';
-include/wait_for_slave_sql_error.inc [errno=1317,1927,1964]
-SET debug_sync='RESET';
-SET GLOBAL slave_parallel_threads=0;
-SET GLOBAL slave_parallel_threads=10;
-SET sql_log_bin=0;
-DROP FUNCTION foo;
-CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
-RETURNS INT DETERMINISTIC
-BEGIN
-RETURN x;
-END
-||
-SET sql_log_bin=1;
-connection server_1;
-INSERT INTO t3 VALUES (49,0);
-connection server_2;
-START SLAVE SQL_THREAD;
-SELECT * FROM t3 WHERE a >= 40 ORDER BY a;
-a b
-41 41
-42 42
-43 43
-44 44
-49 0
-SET sql_log_bin=0;
-DROP FUNCTION foo;
-CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
-RETURNS INT DETERMINISTIC
-BEGIN
-IF d1 != '' THEN
-SET debug_sync = d1;
-END IF;
-IF d2 != '' THEN
-SET debug_sync = d2;
-END IF;
-RETURN x;
-END
-||
-SET sql_log_bin=1;
-connection server_2;
-include/stop_slave.inc
-SET GLOBAL binlog_format=@old_format;
-SET GLOBAL slave_parallel_threads=0;
-SET GLOBAL slave_parallel_threads=10;
-include/start_slave.inc
-*** 3. Same as (2), but not using gtid mode ***
-connection server_2;
-include/stop_slave.inc
-CHANGE MASTER TO master_use_gtid=no;
-include/start_slave.inc
-connection server_1;
-connection con_temp3;
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1';
-SET binlog_format=statement;
-INSERT INTO t3 VALUES (51, foo(51,
-'commit_before_prepare_ordered WAIT_FOR t2_waiting',
-'commit_after_prepare_ordered SIGNAL t1_ready WAIT_FOR t1_cont'));
-connection server_1;
-SET debug_sync='now WAIT_FOR master_queued1';
-connection con_temp4;
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2';
-SET binlog_format=statement;
-BEGIN;
-INSERT INTO t3 VALUES (52, foo(52,
-'ha_write_row_end SIGNAL t2_query WAIT_FOR t2_cont',
-''));
-INSERT INTO t3 VALUES (53, foo(53,
-'group_commit_waiting_for_prior SIGNAL t2_waiting',
-'group_commit_waiting_for_prior_killed SIGNAL t2_killed'));
-COMMIT;
-connection server_1;
-SET debug_sync='now WAIT_FOR master_queued2';
-connection con_temp5;
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued3';
-SET binlog_format=statement;
-INSERT INTO t3 VALUES (54, foo(54,
-'',
-''));
-connection server_1;
-SET debug_sync='now WAIT_FOR master_queued3';
-SET debug_sync='now SIGNAL master_cont1';
-connection con_temp3;
-connection con_temp4;
-connection con_temp5;
-connection server_1;
-SELECT * FROM t3 WHERE a >= 50 ORDER BY a;
-a b
-51 51
-52 52
-53 53
-54 54
-SET debug_sync='RESET';
-connection server_2;
-SET debug_sync='now WAIT_FOR t2_query';
-SET debug_sync='now SIGNAL t2_cont';
-SET debug_sync='now WAIT_FOR t1_ready';
-KILL THD_ID;
-SET debug_sync='now WAIT_FOR t2_killed';
-SET debug_sync='now SIGNAL t1_cont';
-include/wait_for_slave_sql_error.inc [errno=1317,1927,1964]
-SELECT * FROM t3 WHERE a >= 50 ORDER BY a;
-a b
-51 51
-SET debug_sync='RESET';
-SET GLOBAL slave_parallel_threads=0;
-SET GLOBAL slave_parallel_threads=10;
-SET sql_log_bin=0;
-DROP FUNCTION foo;
-CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
-RETURNS INT DETERMINISTIC
-BEGIN
-RETURN x;
-END
-||
-SET sql_log_bin=1;
-connection server_1;
-INSERT INTO t3 VALUES (59,0);
-connection server_2;
-START SLAVE SQL_THREAD;
-SELECT * FROM t3 WHERE a >= 50 ORDER BY a;
-a b
-51 51
-52 52
-53 53
-54 54
-59 0
-SET sql_log_bin=0;
-DROP FUNCTION foo;
-CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
-RETURNS INT DETERMINISTIC
-BEGIN
-IF d1 != '' THEN
-SET debug_sync = d1;
-END IF;
-IF d2 != '' THEN
-SET debug_sync = d2;
-END IF;
-RETURN x;
-END
-||
-SET sql_log_bin=1;
-include/stop_slave.inc
-CHANGE MASTER TO master_use_gtid=slave_pos;
-include/start_slave.inc
-connection server_2;
-include/stop_slave.inc
-SET GLOBAL binlog_format=@old_format;
-SET GLOBAL slave_parallel_threads=0;
-SET GLOBAL slave_parallel_threads=4;
-include/start_slave.inc
-*** 4. Test killing thread that is waiting to start transaction until previous transaction commits ***
-connection server_1;
-SET binlog_format=statement;
-SET gtid_domain_id=2;
-BEGIN;
-INSERT INTO t3 VALUES (70, foo(70,
-'rpl_parallel_start_waiting_for_prior SIGNAL t4_waiting', ''));
-INSERT INTO t3 VALUES (60, foo(60,
-'ha_write_row_end SIGNAL d2_query WAIT_FOR d2_cont2',
-'rpl_parallel_end_of_group SIGNAL d2_done WAIT_FOR d2_cont'));
-COMMIT;
-SET gtid_domain_id=0;
-connection server_2;
-SET debug_sync='now WAIT_FOR d2_query';
-connection server_1;
-SET gtid_domain_id=1;
-BEGIN;
-INSERT INTO t3 VALUES (61, foo(61,
-'rpl_parallel_start_waiting_for_prior SIGNAL t3_waiting',
-'rpl_parallel_start_waiting_for_prior_killed SIGNAL t3_killed'));
-INSERT INTO t3 VALUES (62, foo(62,
-'ha_write_row_end SIGNAL d1_query WAIT_FOR d1_cont2',
-'rpl_parallel_end_of_group SIGNAL d1_done WAIT_FOR d1_cont'));
-COMMIT;
-SET gtid_domain_id=0;
-connection server_2;
-SET debug_sync='now WAIT_FOR d1_query';
-connection server_1;
-SET gtid_domain_id=0;
-INSERT INTO t3 VALUES (63, foo(63,
-'ha_write_row_end SIGNAL d0_query WAIT_FOR d0_cont2',
-'rpl_parallel_end_of_group SIGNAL d0_done WAIT_FOR d0_cont'));
-connection server_2;
-SET debug_sync='now WAIT_FOR d0_query';
-connection server_1;
-SET gtid_domain_id=3;
-BEGIN;
-INSERT INTO t3 VALUES (68, foo(68,
-'rpl_parallel_start_waiting_for_prior SIGNAL t2_waiting', ''));
-INSERT INTO t3 VALUES (69, foo(69,
-'ha_write_row_end SIGNAL d3_query WAIT_FOR d3_cont2',
-'rpl_parallel_end_of_group SIGNAL d3_done WAIT_FOR d3_cont'));
-COMMIT;
-SET gtid_domain_id=0;
-connection server_2;
-SET debug_sync='now WAIT_FOR d3_query';
-SET debug_sync='now SIGNAL d2_cont2';
-SET debug_sync='now WAIT_FOR d2_done';
-SET debug_sync='now SIGNAL d1_cont2';
-SET debug_sync='now WAIT_FOR d1_done';
-SET debug_sync='now SIGNAL d0_cont2';
-SET debug_sync='now WAIT_FOR d0_done';
-SET debug_sync='now SIGNAL d3_cont2';
-SET debug_sync='now WAIT_FOR d3_done';
-connection con_temp3;
-SET binlog_format=statement;
-INSERT INTO t3 VALUES (64, foo(64,
-'rpl_parallel_before_mark_start_commit SIGNAL t1_waiting WAIT_FOR t1_cont', ''));
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2 WAIT_FOR master_cont2';
-INSERT INTO t3 VALUES (65, foo(65, '', ''));
-connection server_1;
-SET debug_sync='now WAIT_FOR master_queued2';
-connection con_temp4;
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued3';
-INSERT INTO t3 VALUES (66, foo(66, '', ''));
-connection server_1;
-SET debug_sync='now WAIT_FOR master_queued3';
-connection con_temp5;
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued4';
-INSERT INTO t3 VALUES (67, foo(67, '', ''));
-connection server_1;
-SET debug_sync='now WAIT_FOR master_queued4';
-SET debug_sync='now SIGNAL master_cont2';
-connection con_temp3;
-connection con_temp4;
-connection con_temp5;
-connection server_1;
-SELECT * FROM t3 WHERE a >= 60 ORDER BY a;
-a b
-60 60
-61 61
-62 62
-63 63
-64 64
-65 65
-66 66
-67 67
-68 68
-69 69
-70 70
-SET debug_sync='RESET';
-connection server_2;
-SET debug_sync='now SIGNAL d0_cont';
-SET debug_sync='now WAIT_FOR t1_waiting';
-SET debug_sync='now SIGNAL d3_cont';
-SET debug_sync='now WAIT_FOR t2_waiting';
-SET debug_sync='now SIGNAL d1_cont';
-SET debug_sync='now WAIT_FOR t3_waiting';
-SET debug_sync='now SIGNAL d2_cont';
-SET debug_sync='now WAIT_FOR t4_waiting';
-KILL THD_ID;
-SET debug_sync='now WAIT_FOR t3_killed';
-SET debug_sync='now SIGNAL t1_cont';
-include/wait_for_slave_sql_error.inc [errno=1317,1927,1964]
-STOP SLAVE IO_THREAD;
-SELECT * FROM t3 WHERE a >= 60 AND a != 65 ORDER BY a;
-a b
-60 60
-61 61
-62 62
-63 63
-64 64
-68 68
-69 69
-70 70
-SET debug_sync='RESET';
-SET GLOBAL slave_parallel_threads=0;
-SET GLOBAL slave_parallel_threads=10;
-SET sql_log_bin=0;
-DROP FUNCTION foo;
-CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
-RETURNS INT DETERMINISTIC
-BEGIN
-RETURN x;
-END
-||
-SET sql_log_bin=1;
-connection server_1;
-UPDATE t3 SET b=b+1 WHERE a=60;
-connection server_2;
-include/start_slave.inc
-SELECT * FROM t3 WHERE a >= 60 ORDER BY a;
-a b
-60 61
-61 61
-62 62
-63 63
-64 64
-65 65
-66 66
-67 67
-68 68
-69 69
-70 70
-SET sql_log_bin=0;
-DROP FUNCTION foo;
-CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
-RETURNS INT DETERMINISTIC
-BEGIN
-IF d1 != '' THEN
-SET debug_sync = d1;
-END IF;
-IF d2 != '' THEN
-SET debug_sync = d2;
-END IF;
-RETURN x;
-END
-||
-SET sql_log_bin=1;
-connection server_2;
-include/stop_slave.inc
-SET GLOBAL binlog_format=@old_format;
-SET GLOBAL slave_parallel_threads=0;
-SET GLOBAL slave_parallel_threads=10;
-include/start_slave.inc
-*** 5. Test killing thread that is waiting for queue of max length to shorten ***
-SET @old_max_queued= @@GLOBAL.slave_parallel_max_queued;
-SET GLOBAL slave_parallel_max_queued=9000;
-connection server_1;
-SET binlog_format=statement;
-INSERT INTO t3 VALUES (80, foo(0,
-'ha_write_row_end SIGNAL query_waiting WAIT_FOR query_cont', ''));
-connection server_2;
-SET debug_sync='now WAIT_FOR query_waiting';
-SET @old_dbug= @@GLOBAL.debug_dbug;
-SET GLOBAL debug_dbug="+d,rpl_parallel_wait_queue_max";
-connection server_1;
-SELECT * FROM t3 WHERE a >= 80 ORDER BY a;
-a b
-80 0
-81 10000
-connection server_2;
-SET debug_sync='now WAIT_FOR wait_queue_ready';
-KILL THD_ID;
-SET debug_sync='now WAIT_FOR wait_queue_killed';
-SET debug_sync='now SIGNAL query_cont';
-include/wait_for_slave_sql_error.inc [errno=1317,1927,1964]
-STOP SLAVE IO_THREAD;
-SET GLOBAL debug_dbug=@old_dbug;
-SET GLOBAL slave_parallel_max_queued= @old_max_queued;
-connection server_1;
-INSERT INTO t3 VALUES (82,0);
-SET binlog_format=@old_format;
-connection server_2;
-SET debug_sync='RESET';
-include/start_slave.inc
-SELECT * FROM t3 WHERE a >= 80 ORDER BY a;
-a b
-80 0
-81 10000
-82 0
-connection server_2;
-include/stop_slave.inc
-SET GLOBAL binlog_format=@old_format;
-SET GLOBAL slave_parallel_threads=0;
-SET GLOBAL slave_parallel_threads=10;
-include/start_slave.inc
-*** MDEV-5788 Incorrect free of rgi->deferred_events in parallel replication ***
-connection server_2;
-include/stop_slave.inc
-SET GLOBAL replicate_ignore_table="test.t3";
-SET GLOBAL slave_parallel_threads=2;
-include/start_slave.inc
-connection server_1;
-INSERT INTO t3 VALUES (100, rand());
-INSERT INTO t3 VALUES (101, rand());
-connection server_2;
-connection server_1;
-INSERT INTO t3 VALUES (102, rand());
-INSERT INTO t3 VALUES (103, rand());
-INSERT INTO t3 VALUES (104, rand());
-INSERT INTO t3 VALUES (105, rand());
-connection server_2;
-include/stop_slave.inc
-SET GLOBAL replicate_ignore_table="";
-include/start_slave.inc
-connection server_1;
-INSERT INTO t3 VALUES (106, rand());
-INSERT INTO t3 VALUES (107, rand());
-connection server_2;
-SELECT * FROM t3 WHERE a >= 100 ORDER BY a;
-a b
-106 #
-107 #
-*** MDEV-5921: In parallel replication, an error is not correctly signalled to the next transaction ***
-connection server_2;
-include/stop_slave.inc
-SET GLOBAL slave_parallel_threads=10;
-include/start_slave.inc
-connection server_1;
-INSERT INTO t3 VALUES (110, 1);
-connection server_2;
-SELECT * FROM t3 WHERE a >= 110 ORDER BY a;
-a b
-110 1
-SET sql_log_bin=0;
-INSERT INTO t3 VALUES (111, 666);
-SET sql_log_bin=1;
-connection server_1;
-connect con1,127.0.0.1,root,,test,$SERVER_MYPORT_1,;
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1';
-INSERT INTO t3 VALUES (111, 2);
-connection server_1;
-SET debug_sync='now WAIT_FOR master_queued1';
-connect con2,127.0.0.1,root,,test,$SERVER_MYPORT_1,;
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2';
-INSERT INTO t3 VALUES (112, 3);
-connection server_1;
-SET debug_sync='now WAIT_FOR master_queued2';
-SET debug_sync='now SIGNAL master_cont1';
-connection con1;
-connection con2;
-SET debug_sync='RESET';
-connection server_2;
-include/wait_for_slave_sql_error.inc [errno=1062]
-include/wait_for_slave_sql_to_stop.inc
-SELECT * FROM t3 WHERE a >= 110 ORDER BY a;
-a b
-110 1
-111 666
-SET sql_log_bin=0;
-DELETE FROM t3 WHERE a=111 AND b=666;
-SET sql_log_bin=1;
-START SLAVE SQL_THREAD;
-SELECT * FROM t3 WHERE a >= 110 ORDER BY a;
-a b
-110 1
-111 2
-112 3
-***MDEV-5914: Parallel replication deadlock due to InnoDB lock conflicts ***
-connection server_2;
-include/stop_slave.inc
-connection server_1;
-CREATE TABLE t4 (a INT PRIMARY KEY, b INT, KEY b_idx(b)) ENGINE=InnoDB;
-INSERT INTO t4 VALUES (1,NULL), (2,2), (3,NULL), (4,4), (5, NULL), (6, 6);
-connection con1;
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1';
-UPDATE t4 SET b=NULL WHERE a=6;
-connection server_1;
-SET debug_sync='now WAIT_FOR master_queued1';
-connection con2;
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2';
-DELETE FROM t4 WHERE b <= 3;
-connection server_1;
-SET debug_sync='now WAIT_FOR master_queued2';
-SET debug_sync='now SIGNAL master_cont1';
-connection con1;
-connection con2;
-SET debug_sync='RESET';
-connection server_2;
-include/start_slave.inc
-include/stop_slave.inc
-SELECT * FROM t4 ORDER BY a;
-a b
-1 NULL
-3 NULL
-4 4
-5 NULL
-6 NULL
-connection server_1;
-DELETE FROM t4;
-INSERT INTO t4 VALUES (1,NULL), (2,2), (3,NULL), (4,4), (5, NULL), (6, 6);
-connection con1;
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1';
-INSERT INTO t4 VALUES (7, NULL);
-connection server_1;
-SET debug_sync='now WAIT_FOR master_queued1';
-connection con2;
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2';
-DELETE FROM t4 WHERE b <= 3;
-connection server_1;
-SET debug_sync='now WAIT_FOR master_queued2';
-SET debug_sync='now SIGNAL master_cont1';
-connection con1;
-connection con2;
-SET debug_sync='RESET';
-connection server_2;
-include/start_slave.inc
-include/stop_slave.inc
-SELECT * FROM t4 ORDER BY a;
-a b
-1 NULL
-3 NULL
-4 4
-5 NULL
-6 6
-7 NULL
-connection server_1;
-DELETE FROM t4;
-INSERT INTO t4 VALUES (1,NULL), (2,2), (3,NULL), (4,4), (5, NULL), (6, 6);
-connection con1;
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1';
-UPDATE t4 SET b=NULL WHERE a=6;
-connection server_1;
-SET debug_sync='now WAIT_FOR master_queued1';
-connection con2;
-SET @old_format= @@SESSION.binlog_format;
-SET binlog_format='statement';
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2';
-DELETE FROM t4 WHERE b <= 1;
-connection server_1;
-SET debug_sync='now WAIT_FOR master_queued2';
-SET debug_sync='now SIGNAL master_cont1';
-connection con1;
-connection con2;
-SET @old_format=@@GLOBAL.binlog_format;
-SET debug_sync='RESET';
-connection server_2;
-SET @old_dbug= @@GLOBAL.debug_dbug;
-SET GLOBAL debug_dbug="+d,disable_thd_need_ordering_with";
-include/start_slave.inc
-SET GLOBAL debug_dbug=@old_dbug;
-SELECT * FROM t4 ORDER BY a;
-a b
-1 NULL
-2 2
-3 NULL
-4 4
-5 NULL
-6 NULL
-SET @last_gtid= 'GTID';
-SELECT IF(@@gtid_slave_pos LIKE CONCAT('%',@last_gtid,'%'), "GTID found ok",
-CONCAT("GTID ", @last_gtid, " not found in gtid_slave_pos=", @@gtid_slave_pos))
-AS result;
-result
-GTID found ok
-SELECT "ROW FOUND" AS `Is the row found?`
- FROM mysql.gtid_slave_pos
-WHERE CONCAT(domain_id, "-", server_id, "-", seq_no) = @last_gtid;
-Is the row found?
-ROW FOUND
-*** MDEV-5938: Exec_master_log_pos not updated at log rotate in parallel replication ***
-connection server_2;
-include/stop_slave.inc
-SET GLOBAL slave_parallel_threads=1;
-SET DEBUG_SYNC= 'RESET';
-include/start_slave.inc
-connection server_1;
-CREATE TABLE t5 (a INT PRIMARY KEY, b INT);
-INSERT INTO t5 VALUES (1,1);
-INSERT INTO t5 VALUES (2,2), (3,8);
-INSERT INTO t5 VALUES (4,16);
-connection server_2;
-test_check
-OK
-test_check
-OK
-connection server_1;
-FLUSH LOGS;
-connection server_2;
-test_check
-OK
-test_check
-OK
-*** MDEV_6435: Incorrect error handling when query binlogged partially on master with "killed" error ***
-connection server_1;
-CREATE TABLE t6 (a INT) ENGINE=MyISAM;
-CREATE TRIGGER tr AFTER INSERT ON t6 FOR EACH ROW SET @a = 1;
-connection con1;
-SET @old_format= @@binlog_format;
-SET binlog_format= statement;
-SET debug_sync='sp_head_execute_before_loop SIGNAL ready WAIT_FOR cont';
-INSERT INTO t6 VALUES (1), (2), (3);
-connection server_1;
-SET debug_sync='now WAIT_FOR ready';
-KILL QUERY CONID;
-SET debug_sync='now SIGNAL cont';
-connection con1;
-ERROR 70100: Query execution was interrupted
-SET binlog_format= @old_format;
-SET debug_sync='RESET';
-connection server_1;
-SET debug_sync='RESET';
-connection server_2;
-include/wait_for_slave_sql_error.inc [errno=1317]
-STOP SLAVE IO_THREAD;
-SET GLOBAL gtid_slave_pos= 'AFTER_ERROR_GTID_POS';
-include/start_slave.inc
-connection server_1;
-INSERT INTO t6 VALUES (4);
-SELECT * FROM t6 ORDER BY a;
-a
-1
-4
-connection server_2;
-SELECT * FROM t6 ORDER BY a;
-a
-4
-*** MDEV-6551: Some replication errors are ignored if slave_parallel_threads > 0 ***
-connection server_1;
-INSERT INTO t2 VALUES (31);
-include/save_master_gtid.inc
-connection server_2;
-include/sync_with_master_gtid.inc
-include/stop_slave.inc
-SET GLOBAL slave_parallel_threads= 0;
-include/start_slave.inc
-SET sql_log_bin= 0;
-INSERT INTO t2 VALUES (32);
-SET sql_log_bin= 1;
-connection server_1;
-INSERT INTO t2 VALUES (32);
-FLUSH LOGS;
-INSERT INTO t2 VALUES (33);
-INSERT INTO t2 VALUES (34);
-SELECT * FROM t2 WHERE a >= 30 ORDER BY a;
-a
-31
-32
-33
-34
-include/save_master_gtid.inc
-connection server_2;
-include/wait_for_slave_sql_error.inc [errno=1062]
-connection server_2;
-include/stop_slave_io.inc
-SET GLOBAL slave_parallel_threads=10;
-START SLAVE;
-include/wait_for_slave_sql_error.inc [errno=1062]
-START SLAVE SQL_THREAD;
-include/wait_for_slave_sql_error.inc [errno=1062]
-SELECT * FROM t2 WHERE a >= 30 ORDER BY a;
-a
-31
-32
-SET sql_slave_skip_counter= 1;
-ERROR HY000: When using parallel replication and GTID with multiple replication domains, @@sql_slave_skip_counter can not be used. Instead, setting @@gtid_slave_pos explicitly can be used to skip to after a given GTID position
-include/stop_slave_io.inc
-include/start_slave.inc
-include/sync_with_master_gtid.inc
-SELECT * FROM t2 WHERE a >= 30 ORDER BY a;
-a
-31
-32
-33
-34
-*** MDEV-6775: Wrong binlog order in parallel replication ***
-connection server_1;
-DELETE FROM t4;
-INSERT INTO t4 VALUES (1,NULL), (3,NULL), (4,4), (5, NULL), (6, 6);
-include/save_master_gtid.inc
-connection server_2;
-include/sync_with_master_gtid.inc
-include/stop_slave.inc
-SET @old_dbug= @@GLOBAL.debug_dbug;
-SET GLOBAL debug_dbug="+d,inject_binlog_commit_before_get_LOCK_log";
-SET @old_format=@@GLOBAL.binlog_format;
-SET GLOBAL binlog_format=ROW;
-SET GLOBAL slave_parallel_threads=0;
-SET GLOBAL slave_parallel_threads=10;
-connection con1;
-SET @old_format= @@binlog_format;
-SET binlog_format= statement;
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1';
-UPDATE t4 SET b=NULL WHERE a=6;
-connection server_1;
-SET debug_sync='now WAIT_FOR master_queued1';
-connection con2;
-SET @old_format= @@binlog_format;
-SET binlog_format= statement;
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2';
-DELETE FROM t4 WHERE b <= 3;
-connection server_1;
-SET debug_sync='now WAIT_FOR master_queued2';
-SET debug_sync='now SIGNAL master_cont1';
-connection con1;
-SET binlog_format= @old_format;
-connection con2;
-SET binlog_format= @old_format;
-SET debug_sync='RESET';
-SELECT * FROM t4 ORDER BY a;
-a b
-1 NULL
-3 NULL
-4 4
-5 NULL
-6 NULL
-connection server_2;
-include/start_slave.inc
-SET debug_sync= 'now WAIT_FOR waiting';
-SELECT * FROM t4 ORDER BY a;
-a b
-1 NULL
-3 NULL
-4 4
-5 NULL
-6 NULL
-SET debug_sync= 'now SIGNAL cont';
-include/stop_slave.inc
-SET GLOBAL debug_dbug=@old_dbug;
-SET GLOBAL binlog_format= @old_format;
-SET GLOBAL slave_parallel_threads=0;
-SET GLOBAL slave_parallel_threads=10;
-include/start_slave.inc
-*** MDEV-7237: Parallel replication: incorrect relaylog position after stop/start the slave ***
-connection server_1;
-INSERT INTO t2 VALUES (40);
-connection server_2;
-include/stop_slave.inc
-CHANGE MASTER TO master_use_gtid=no;
-SET @old_dbug= @@GLOBAL.debug_dbug;
-SET GLOBAL debug_dbug="+d,rpl_parallel_scheduled_gtid_0_x_100";
-SET GLOBAL debug_dbug="+d,rpl_parallel_wait_for_done_trigger";
-SET GLOBAL slave_parallel_threads=0;
-SET GLOBAL slave_parallel_threads=10;
-connection server_1;
-INSERT INTO t2 VALUES (41);
-INSERT INTO t2 VALUES (42);
-SET @old_format= @@binlog_format;
-SET binlog_format= statement;
-DELETE FROM t2 WHERE a=40;
-SET binlog_format= @old_format;
-INSERT INTO t2 VALUES (43);
-INSERT INTO t2 VALUES (44);
-FLUSH LOGS;
-INSERT INTO t2 VALUES (45);
-SET gtid_seq_no=100;
-INSERT INTO t2 VALUES (46);
-connection con_temp2;
-BEGIN;
-SELECT * FROM t2 WHERE a=40 FOR UPDATE;
-a
-40
-connection server_2;
-include/start_slave.inc
-SET debug_sync= 'now WAIT_FOR scheduled_gtid_0_x_100';
-STOP SLAVE;
-connection con_temp2;
-SET debug_sync= 'now WAIT_FOR wait_for_done_waiting';
-ROLLBACK;
-connection server_2;
-include/wait_for_slave_sql_to_stop.inc
-SELECT * FROM t2 WHERE a >= 40 ORDER BY a;
-a
-41
-42
-include/start_slave.inc
-SELECT * FROM t2 WHERE a >= 40 ORDER BY a;
-a
-41
-42
-43
-44
-45
-46
-include/stop_slave.inc
-SET GLOBAL debug_dbug=@old_dbug;
-SET DEBUG_SYNC= 'RESET';
-SET GLOBAL slave_parallel_threads=0;
-SET GLOBAL slave_parallel_threads=10;
-CHANGE MASTER TO master_use_gtid=slave_pos;
-include/start_slave.inc
-*** MDEV-7326 Server deadlock in connection with parallel replication ***
-connection server_2;
-include/stop_slave.inc
-SET GLOBAL slave_parallel_threads=0;
-SET GLOBAL slave_parallel_threads=3;
-SET GLOBAL debug_dbug="+d,rpl_parallel_simulate_temp_err_xid";
-include/start_slave.inc
-connection server_1;
-SET @old_format= @@SESSION.binlog_format;
-SET binlog_format= STATEMENT;
-INSERT INTO t1 VALUES (foo(50,
-"rpl_parallel_start_waiting_for_prior SIGNAL t3_ready",
-"rpl_parallel_end_of_group SIGNAL prep_ready WAIT_FOR prep_cont"));
-connection server_2;
-SET DEBUG_SYNC= "now WAIT_FOR prep_ready";
-connection server_1;
-INSERT INTO t2 VALUES (foo(50,
-"rpl_parallel_simulate_temp_err_xid SIGNAL t1_ready1 WAIT_FOR t1_cont1",
-"rpl_parallel_retry_after_unmark SIGNAL t1_ready2 WAIT_FOR t1_cont2"));
-connection server_2;
-SET DEBUG_SYNC= "now WAIT_FOR t1_ready1";
-connection server_1;
-INSERT INTO t1 VALUES (foo(51,
-"rpl_parallel_before_mark_start_commit SIGNAL t2_ready1 WAIT_FOR t2_cont1",
-"rpl_parallel_after_mark_start_commit SIGNAL t2_ready2"));
-connection server_2;
-SET DEBUG_SYNC= "now WAIT_FOR t2_ready1";
-SET DEBUG_SYNC= "now SIGNAL t1_cont1";
-SET DEBUG_SYNC= "now WAIT_FOR t1_ready2";
-connection server_1;
-INSERT INTO t1 VALUES (52);
-SET BINLOG_FORMAT= @old_format;
-SELECT * FROM t2 WHERE a>=50 ORDER BY a;
-a
-50
-SELECT * FROM t1 WHERE a>=50 ORDER BY a;
-a
-50
-51
-52
-connection server_2;
-SET DEBUG_SYNC= "now SIGNAL prep_cont";
-SET DEBUG_SYNC= "now WAIT_FOR t3_ready";
-SET DEBUG_SYNC= "now SIGNAL t2_cont1";
-SET DEBUG_SYNC= "now WAIT_FOR t2_ready2";
-SET DEBUG_SYNC= "now SIGNAL t1_cont2";
-connection server_1;
-connection server_2;
-SELECT * FROM t2 WHERE a>=50 ORDER BY a;
-a
-50
-SELECT * FROM t1 WHERE a>=50 ORDER BY a;
-a
-50
-51
-52
-SET DEBUG_SYNC="reset";
-include/stop_slave.inc
-SET GLOBAL debug_dbug=@old_dbug;
-SET GLOBAL slave_parallel_threads=0;
-SET GLOBAL slave_parallel_threads=10;
-include/start_slave.inc
-*** MDEV-7326 Server deadlock in connection with parallel replication ***
-connection server_2;
-include/stop_slave.inc
-SET GLOBAL slave_parallel_threads=0;
-SET GLOBAL slave_parallel_threads=3;
-SET GLOBAL debug_dbug="+d,rpl_parallel_simulate_temp_err_xid";
-include/start_slave.inc
-connection server_1;
-SET @old_format= @@SESSION.binlog_format;
-SET binlog_format= STATEMENT;
-INSERT INTO t1 VALUES (foo(60,
-"rpl_parallel_start_waiting_for_prior SIGNAL t3_ready",
-"rpl_parallel_end_of_group SIGNAL prep_ready WAIT_FOR prep_cont"));
-connection server_2;
-SET DEBUG_SYNC= "now WAIT_FOR prep_ready";
-connection server_1;
-INSERT INTO t2 VALUES (foo(60,
-"rpl_parallel_simulate_temp_err_xid SIGNAL t1_ready1 WAIT_FOR t1_cont1",
-"rpl_parallel_retry_after_unmark SIGNAL t1_ready2 WAIT_FOR t1_cont2"));
-connection server_2;
-SET DEBUG_SYNC= "now WAIT_FOR t1_ready1";
-connection con_temp3;
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1';
-SET binlog_format=statement;
-INSERT INTO t1 VALUES (foo(61,
-"rpl_parallel_before_mark_start_commit SIGNAL t2_ready1 WAIT_FOR t2_cont1",
-"rpl_parallel_after_mark_start_commit SIGNAL t2_ready2"));
-connection server_1;
-SET debug_sync='now WAIT_FOR master_queued1';
-connection con_temp4;
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2';
-INSERT INTO t6 VALUES (62);
-connection server_1;
-SET debug_sync='now WAIT_FOR master_queued2';
-SET debug_sync='now SIGNAL master_cont1';
-connection con_temp3;
-connection con_temp4;
-connection server_1;
-SET debug_sync='RESET';
-SET BINLOG_FORMAT= @old_format;
-SELECT * FROM t2 WHERE a>=60 ORDER BY a;
-a
-60
-SELECT * FROM t1 WHERE a>=60 ORDER BY a;
-a
-60
-61
-SELECT * FROM t6 WHERE a>=60 ORDER BY a;
-a
-62
-connection server_2;
-SET DEBUG_SYNC= "now WAIT_FOR t2_ready1";
-SET DEBUG_SYNC= "now SIGNAL t1_cont1";
-SET DEBUG_SYNC= "now WAIT_FOR t1_ready2";
-connection server_2;
-SET DEBUG_SYNC= "now SIGNAL prep_cont";
-SET DEBUG_SYNC= "now WAIT_FOR t3_ready";
-SET DEBUG_SYNC= "now SIGNAL t2_cont1";
-SET DEBUG_SYNC= "now WAIT_FOR t2_ready2";
-SET DEBUG_SYNC= "now SIGNAL t1_cont2";
-connection server_1;
-connection server_2;
-SELECT * FROM t2 WHERE a>=60 ORDER BY a;
-a
-60
-SELECT * FROM t1 WHERE a>=60 ORDER BY a;
-a
-60
-61
-SELECT * FROM t6 WHERE a>=60 ORDER BY a;
-a
-62
-SET DEBUG_SYNC="reset";
-include/stop_slave.inc
-SET GLOBAL debug_dbug=@old_dbug;
-SET GLOBAL slave_parallel_threads=0;
-SET GLOBAL slave_parallel_threads=10;
-include/start_slave.inc
-*** MDEV-7335: Potential parallel slave deadlock with specific binlog corruption ***
-connection server_2;
-include/stop_slave.inc
-SET GLOBAL slave_parallel_threads=1;
-SET @old_dbug= @@GLOBAL.debug_dbug;
-SET GLOBAL debug_dbug="+d,slave_discard_xid_for_gtid_0_x_1000";
-connection server_1;
-INSERT INTO t2 VALUES (101);
-INSERT INTO t2 VALUES (102);
-INSERT INTO t2 VALUES (103);
-INSERT INTO t2 VALUES (104);
-INSERT INTO t2 VALUES (105);
-SET gtid_seq_no=1000;
-INSERT INTO t2 VALUES (106);
-INSERT INTO t2 VALUES (107);
-INSERT INTO t2 VALUES (108);
-INSERT INTO t2 VALUES (109);
-INSERT INTO t2 VALUES (110);
-INSERT INTO t2 VALUES (111);
-INSERT INTO t2 VALUES (112);
-INSERT INTO t2 VALUES (113);
-INSERT INTO t2 VALUES (114);
-INSERT INTO t2 VALUES (115);
-INSERT INTO t2 VALUES (116);
-INSERT INTO t2 VALUES (117);
-INSERT INTO t2 VALUES (118);
-INSERT INTO t2 VALUES (119);
-INSERT INTO t2 VALUES (120);
-INSERT INTO t2 VALUES (121);
-INSERT INTO t2 VALUES (122);
-INSERT INTO t2 VALUES (123);
-INSERT INTO t2 VALUES (124);
-INSERT INTO t2 VALUES (125);
-INSERT INTO t2 VALUES (126);
-INSERT INTO t2 VALUES (127);
-INSERT INTO t2 VALUES (128);
-INSERT INTO t2 VALUES (129);
-INSERT INTO t2 VALUES (130);
-include/save_master_gtid.inc
-connection server_2;
-include/start_slave.inc
-include/sync_with_master_gtid.inc
-SELECT * FROM t2 WHERE a >= 100 ORDER BY a;
-a
-101
-102
-103
-104
-105
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-include/stop_slave.inc
-SET GLOBAL debug_dbug=@old_dbug;
-SET GLOBAL slave_parallel_threads=10;
-include/start_slave.inc
-*** MDEV-6676 - test syntax of @@slave_parallel_mode ***
-connection server_2;
-Parallel_Mode = 'conservative'
-include/stop_slave.inc
-SET GLOBAL slave_parallel_mode='aggressive';
-Parallel_Mode = 'aggressive'
-SET GLOBAL slave_parallel_mode='conservative';
-Parallel_Mode = 'conservative'
-*** MDEV-6676 - test that empty parallel_mode does not replicate in parallel ***
-connection server_1;
-INSERT INTO t2 VALUES (1040);
-include/save_master_gtid.inc
-connection server_2;
-SET GLOBAL slave_parallel_mode='none';
-SET @old_dbug= @@GLOBAL.debug_dbug;
-SET GLOBAL debug_dbug="+d,slave_crash_if_parallel_apply";
-include/start_slave.inc
-include/sync_with_master_gtid.inc
-SELECT * FROM t2 WHERE a >= 1040 ORDER BY a;
-a
-1040
-include/stop_slave.inc
-SET GLOBAL debug_dbug=@old_dbug;
-*** MDEV-6676 - test disabling domain-based parallel replication ***
-connection server_1;
-SET gtid_domain_id = 1;
-INSERT INTO t2 VALUES (1041);
-INSERT INTO t2 VALUES (1042);
-INSERT INTO t2 VALUES (1043);
-INSERT INTO t2 VALUES (1044);
-INSERT INTO t2 VALUES (1045);
-INSERT INTO t2 VALUES (1046);
-DELETE FROM t2 WHERE a >= 1041;
-SET gtid_domain_id = 2;
-INSERT INTO t2 VALUES (1041);
-INSERT INTO t2 VALUES (1042);
-INSERT INTO t2 VALUES (1043);
-INSERT INTO t2 VALUES (1044);
-INSERT INTO t2 VALUES (1045);
-INSERT INTO t2 VALUES (1046);
-SET gtid_domain_id = 0;
-include/save_master_gtid.inc
-connection server_2;
-SET GLOBAL slave_parallel_mode=minimal;
-include/start_slave.inc
-include/sync_with_master_gtid.inc
-SELECT * FROM t2 WHERE a >= 1040 ORDER BY a;
-a
-1040
-1041
-1042
-1043
-1044
-1045
-1046
-*** MDEV-7888: ANALYZE TABLE does wakeup_subsequent_commits(), causing wrong binlog order and parallel replication hang ***
-connection server_2;
-include/stop_slave.inc
-SET GLOBAL slave_parallel_mode='conservative';
-SET GLOBAL slave_parallel_threads=10;
-SET @old_dbug= @@GLOBAL.debug_dbug;
-SET GLOBAL debug_dbug= '+d,inject_analyze_table_sleep';
-connection server_1;
-SET @old_dbug_slave= @@SESSION.debug_dbug;
-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;
-INSERT INTO t3 VALUES (121, 0);
-SET SESSION debug_dbug=@old_dbug_slave;
-SELECT * FROM t3 WHERE a >= 120 ORDER BY a;
-a b
-120 0
-121 0
-include/save_master_gtid.inc
-connection server_2;
-include/start_slave.inc
-include/sync_with_master_gtid.inc
-SELECT * FROM t3 WHERE a >= 120 ORDER BY a;
-a b
-120 0
-121 0
-include/stop_slave.inc
-SET GLOBAL debug_dbug= @old_dbug;
-include/start_slave.inc
-*** MDEV-7929: record_gtid() for non-transactional event group calls wakeup_subsequent_commits() too early, causing slave hang. ***
-connection server_2;
-include/stop_slave.inc
-SET @old_dbug= @@GLOBAL.debug_dbug;
-SET GLOBAL debug_dbug= '+d,inject_record_gtid_serverid_100_sleep';
-connection server_1;
-SET @old_dbug_slave= @@SESSION.debug_dbug;
-SET SESSION debug_dbug="+d,binlog_force_commit_id";
-SET @old_server_id= @@SESSION.server_id;
-SET SESSION server_id= 100;
-SET @commit_id= 10010;
-ALTER TABLE t1 COMMENT "Hulubulu!";
-SET SESSION server_id= @old_server_id;
-INSERT INTO t3 VALUES (130, 0);
-SET @commit_id= 10011;
-INSERT INTO t3 VALUES (131, 0);
-SET SESSION debug_dbug=@old_dbug_slave;
-SELECT * FROM t3 WHERE a >= 130 ORDER BY a;
-a b
-130 0
-131 0
-include/save_master_gtid.inc
-connection server_2;
-include/start_slave.inc
-include/sync_with_master_gtid.inc
-SELECT * FROM t3 WHERE a >= 130 ORDER BY a;
-a b
-130 0
-131 0
-include/stop_slave.inc
-SET GLOBAL debug_dbug= @old_dbug;
-include/start_slave.inc
-*** MDEV-8031: Parallel replication stops on "connection killed" error (probably incorrectly handled deadlock kill) ***
-connection server_1;
-INSERT INTO t3 VALUES (201,0), (202,0);
-include/save_master_gtid.inc
-connection server_2;
-include/sync_with_master_gtid.inc
-include/stop_slave.inc
-SET @old_dbug= @@GLOBAL.debug_dbug;
-SET GLOBAL debug_dbug= '+d,inject_mdev8031';
-connection server_1;
-SET @old_dbug_slave= @@SESSION.debug_dbug;
-SET SESSION debug_dbug="+d,binlog_force_commit_id";
-SET @commit_id= 10200;
-INSERT INTO t3 VALUES (203, 1);
-INSERT INTO t3 VALUES (204, 1);
-INSERT INTO t3 VALUES (205, 1);
-UPDATE t3 SET b=b+1 WHERE a=201;
-UPDATE t3 SET b=b+1 WHERE a=201;
-UPDATE t3 SET b=b+1 WHERE a=201;
-UPDATE t3 SET b=b+1 WHERE a=202;
-UPDATE t3 SET b=b+1 WHERE a=202;
-UPDATE t3 SET b=b+1 WHERE a=202;
-UPDATE t3 SET b=b+1 WHERE a=202;
-UPDATE t3 SET b=b+1 WHERE a=203;
-UPDATE t3 SET b=b+1 WHERE a=203;
-UPDATE t3 SET b=b+1 WHERE a=204;
-UPDATE t3 SET b=b+1 WHERE a=204;
-UPDATE t3 SET b=b+1 WHERE a=204;
-UPDATE t3 SET b=b+1 WHERE a=203;
-UPDATE t3 SET b=b+1 WHERE a=205;
-UPDATE t3 SET b=b+1 WHERE a=205;
-SET SESSION debug_dbug=@old_dbug_slave;
-SELECT * FROM t3 WHERE a>=200 ORDER BY a;
-a b
-201 3
-202 4
-203 4
-204 4
-205 3
-include/save_master_gtid.inc
-connection server_2;
-include/start_slave.inc
-include/sync_with_master_gtid.inc
-SELECT * FROM t3 WHERE a>=200 ORDER BY a;
-a b
-201 3
-202 4
-203 4
-204 4
-205 3
-include/stop_slave.inc
-SET GLOBAL debug_dbug= @old_dbug;
-include/start_slave.inc
-*** Check getting deadlock killed inside open_binlog() during retry. ***
-connection server_2;
-include/stop_slave.inc
-SET @old_dbug= @@GLOBAL.debug_dbug;
-SET GLOBAL debug_dbug= '+d,inject_retry_event_group_open_binlog_kill';
-SET @old_max= @@GLOBAL.max_relay_log_size;
-SET GLOBAL max_relay_log_size= 4096;
-connection server_1;
-SET @old_dbug_slave= @@SESSION.debug_dbug;
-SET SESSION debug_dbug="+d,binlog_force_commit_id";
-SET @commit_id= 10210;
-Omit long queries that cause relaylog rotations and transaction retries...
-SET SESSION debug_dbug=@old_dbug_slave;
-SELECT * FROM t3 WHERE a>=200 ORDER BY a;
-a b
-201 6
-202 8
-203 7
-204 7
-205 5
-include/save_master_gtid.inc
-connection server_2;
-include/start_slave.inc
-include/sync_with_master_gtid.inc
-SELECT * FROM t3 WHERE a>=200 ORDER BY a;
-a b
-201 6
-202 8
-203 7
-204 7
-205 5
-include/stop_slave.inc
-SET GLOBAL debug_dbug= @old_dbug;
-SET GLOBAL max_relay_log_size= @old_max;
-include/start_slave.inc
-*** MDEV-8725: Assertion on ROLLBACK statement in the binary log ***
-connection server_1;
-BEGIN;
-INSERT INTO t2 VALUES (2000);
-INSERT INTO t1 VALUES (2000);
-INSERT INTO t2 VALUES (2001);
-ROLLBACK;
-SELECT * FROM t1 WHERE a>=2000 ORDER BY a;
-a
-2000
-SELECT * FROM t2 WHERE a>=2000 ORDER BY a;
-a
-include/save_master_gtid.inc
-connection server_2;
-include/sync_with_master_gtid.inc
-SELECT * FROM t1 WHERE a>=2000 ORDER BY a;
-a
-2000
-SELECT * FROM t2 WHERE a>=2000 ORDER BY a;
-a
-connection server_2;
-include/stop_slave.inc
-SET GLOBAL slave_parallel_threads=@old_parallel_threads;
-include/start_slave.inc
-SET DEBUG_SYNC= 'RESET';
-connection server_1;
-DROP function foo;
-DROP TABLE t1,t2,t3,t4,t5,t6;
-SET DEBUG_SYNC= 'RESET';
-include/rpl_end.inc
diff --git a/mysql-test/suite/binlog_encryption/rpl_parallel.test b/mysql-test/suite/binlog_encryption/rpl_parallel.test
deleted file mode 100644
index dba54e4fd7a..00000000000
--- a/mysql-test/suite/binlog_encryption/rpl_parallel.test
+++ /dev/null
@@ -1 +0,0 @@
---source suite/rpl/include/rpl_parallel.inc
diff --git a/mysql-test/suite/binlog_encryption/rpl_parallel_analyze_table_hang.result b/mysql-test/suite/binlog_encryption/rpl_parallel_analyze_table_hang.result
new file mode 100644
index 00000000000..3c3cd2601e8
--- /dev/null
+++ b/mysql-test/suite/binlog_encryption/rpl_parallel_analyze_table_hang.result
@@ -0,0 +1,51 @@
+*** MDEV-7888: ANALYZE TABLE does wakeup_subsequent_commits(), causing wrong binlog order and parallel replication hang ***
+include/master-slave.inc
+[connection master]
+connection server_2;
+SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
+SET @old_parallel_mode=@@GLOBAL.slave_parallel_mode;
+include/stop_slave.inc
+SET GLOBAL slave_parallel_mode='conservative';
+SET GLOBAL slave_parallel_threads=10;
+CHANGE MASTER TO master_use_gtid=slave_pos;
+include/start_slave.inc
+connection server_1;
+ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+CREATE TABLE t2 (a int PRIMARY KEY) ENGINE=InnoDB;
+CREATE TABLE t3 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB;
+connection server_2;
+include/stop_slave.inc
+SET @old_dbug= @@GLOBAL.debug_dbug;
+SET GLOBAL debug_dbug= '+d,inject_analyze_table_sleep';
+connection server_1;
+SET @old_dbug= @@SESSION.debug_dbug;
+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;
+INSERT INTO t3 VALUES (121, 0);
+SET SESSION debug_dbug=@old_dbug;
+SELECT * FROM t3 WHERE a >= 120 ORDER BY a;
+a b
+120 0
+121 0
+include/save_master_gtid.inc
+connection server_2;
+include/start_slave.inc
+include/sync_with_master_gtid.inc
+SELECT * FROM t3 WHERE a >= 120 ORDER BY a;
+a b
+120 0
+121 0
+include/stop_slave.inc
+SET GLOBAL debug_dbug= @old_dbug;
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+SET GLOBAL slave_parallel_mode=@old_parallel_mode;
+include/start_slave.inc
+connection server_1;
+DROP TABLE t2,t3;
+include/rpl_end.inc
diff --git a/mysql-test/suite/binlog_encryption/rpl_parallel_analyze_table_hang.test b/mysql-test/suite/binlog_encryption/rpl_parallel_analyze_table_hang.test
new file mode 100644
index 00000000000..69e76692ce1
--- /dev/null
+++ b/mysql-test/suite/binlog_encryption/rpl_parallel_analyze_table_hang.test
@@ -0,0 +1 @@
+--source suite/rpl/include/rpl_parallel_analyze_table_hang.inc
diff --git a/mysql-test/suite/binlog_encryption/rpl_parallel_deadlock_corrupt_binlog.result b/mysql-test/suite/binlog_encryption/rpl_parallel_deadlock_corrupt_binlog.result
new file mode 100644
index 00000000000..74d1d53b67c
--- /dev/null
+++ b/mysql-test/suite/binlog_encryption/rpl_parallel_deadlock_corrupt_binlog.result
@@ -0,0 +1,93 @@
+*** MDEV-7335: Potential parallel slave deadlock with specific binlog corruption ***
+include/master-slave.inc
+[connection master]
+connection server_2;
+include/stop_slave.inc
+SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
+SET GLOBAL slave_parallel_threads=10;
+CHANGE MASTER TO master_use_gtid=slave_pos;
+include/start_slave.inc
+connection server_1;
+ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+CREATE TABLE t2 (a int PRIMARY KEY) ENGINE=InnoDB;
+connection server_2;
+include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=1;
+SET @old_dbug= @@GLOBAL.debug_dbug;
+SET GLOBAL debug_dbug="+d,slave_discard_xid_for_gtid_0_x_1000";
+connection server_1;
+INSERT INTO t2 VALUES (101);
+INSERT INTO t2 VALUES (102);
+INSERT INTO t2 VALUES (103);
+INSERT INTO t2 VALUES (104);
+INSERT INTO t2 VALUES (105);
+SET gtid_seq_no=1000;
+INSERT INTO t2 VALUES (106);
+INSERT INTO t2 VALUES (107);
+INSERT INTO t2 VALUES (108);
+INSERT INTO t2 VALUES (109);
+INSERT INTO t2 VALUES (110);
+INSERT INTO t2 VALUES (111);
+INSERT INTO t2 VALUES (112);
+INSERT INTO t2 VALUES (113);
+INSERT INTO t2 VALUES (114);
+INSERT INTO t2 VALUES (115);
+INSERT INTO t2 VALUES (116);
+INSERT INTO t2 VALUES (117);
+INSERT INTO t2 VALUES (118);
+INSERT INTO t2 VALUES (119);
+INSERT INTO t2 VALUES (120);
+INSERT INTO t2 VALUES (121);
+INSERT INTO t2 VALUES (122);
+INSERT INTO t2 VALUES (123);
+INSERT INTO t2 VALUES (124);
+INSERT INTO t2 VALUES (125);
+INSERT INTO t2 VALUES (126);
+INSERT INTO t2 VALUES (127);
+INSERT INTO t2 VALUES (128);
+INSERT INTO t2 VALUES (129);
+INSERT INTO t2 VALUES (130);
+include/save_master_gtid.inc
+connection server_2;
+include/start_slave.inc
+include/sync_with_master_gtid.inc
+SELECT * FROM t2 WHERE a >= 100 ORDER BY a;
+a
+101
+102
+103
+104
+105
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+include/stop_slave.inc
+SET GLOBAL debug_dbug=@old_dbug;
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+include/start_slave.inc
+SET DEBUG_SYNC= 'RESET';
+connection server_1;
+DROP TABLE t2;
+SET DEBUG_SYNC= 'RESET';
+include/rpl_end.inc
diff --git a/mysql-test/suite/binlog_encryption/rpl_parallel_deadlock_corrupt_binlog.test b/mysql-test/suite/binlog_encryption/rpl_parallel_deadlock_corrupt_binlog.test
new file mode 100644
index 00000000000..71c589dcd88
--- /dev/null
+++ b/mysql-test/suite/binlog_encryption/rpl_parallel_deadlock_corrupt_binlog.test
@@ -0,0 +1 @@
+--source suite/rpl/include/rpl_parallel_deadlock_corrupt_binlog.inc
diff --git a/mysql-test/suite/binlog_encryption/rpl_parallel_domain.result b/mysql-test/suite/binlog_encryption/rpl_parallel_domain.result
new file mode 100644
index 00000000000..69b9678d149
--- /dev/null
+++ b/mysql-test/suite/binlog_encryption/rpl_parallel_domain.result
@@ -0,0 +1,71 @@
+include/master-slave.inc
+[connection master]
+connection server_2;
+SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
+SET GLOBAL slave_parallel_threads=10;
+ERROR HY000: This operation cannot be performed as you have a running slave ''; run STOP SLAVE '' first
+include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=10;
+SELECT IF(COUNT(*) < 10, "OK", CONCAT("Found too many system user processes: ", COUNT(*))) FROM information_schema.processlist WHERE user = "system user";
+IF(COUNT(*) < 10, "OK", CONCAT("Found too many system user processes: ", COUNT(*)))
+OK
+CHANGE MASTER TO master_use_gtid=slave_pos;
+include/start_slave.inc
+SELECT IF(COUNT(*) >= 10, "OK", CONCAT("Found too few system user processes: ", COUNT(*))) FROM information_schema.processlist WHERE user = "system user";
+IF(COUNT(*) >= 10, "OK", CONCAT("Found too few system user processes: ", COUNT(*)))
+OK
+include/stop_slave.inc
+SELECT IF(COUNT(*) < 10, "OK", CONCAT("Found too many system user processes: ", COUNT(*))) FROM information_schema.processlist WHERE user = "system user";
+IF(COUNT(*) < 10, "OK", CONCAT("Found too many system user processes: ", COUNT(*)))
+OK
+include/start_slave.inc
+SELECT IF(COUNT(*) >= 10, "OK", CONCAT("Found too few system user processes: ", COUNT(*))) FROM information_schema.processlist WHERE user = "system user";
+IF(COUNT(*) >= 10, "OK", CONCAT("Found too few system user processes: ", COUNT(*)))
+OK
+*** Test long-running query in domain 1 can run in parallel with short queries in domain 0 ***
+connection server_1;
+ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+CREATE TABLE t1 (a int PRIMARY KEY) ENGINE=MyISAM;
+CREATE TABLE t2 (a int PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t2 VALUES (1);
+connection server_2;
+connect con_temp1,127.0.0.1,root,,test,$SERVER_MYPORT_2,;
+LOCK TABLE t1 WRITE;
+connection server_1;
+SET gtid_domain_id=1;
+INSERT INTO t1 VALUES (2);
+SET gtid_domain_id=0;
+INSERT INTO t2 VALUES (2);
+INSERT INTO t2 VALUES (3);
+BEGIN;
+INSERT INTO t2 VALUES (4);
+INSERT INTO t2 VALUES (5);
+COMMIT;
+INSERT INTO t2 VALUES (6);
+connection server_2;
+SELECT * FROM t2 ORDER by a;
+a
+1
+2
+3
+4
+5
+6
+connection con_temp1;
+SELECT * FROM t1;
+a
+1
+UNLOCK TABLES;
+connection server_2;
+SELECT * FROM t1 ORDER BY a;
+a
+1
+2
+connection server_2;
+include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+include/start_slave.inc
+connection server_1;
+DROP TABLE t1,t2;
+include/rpl_end.inc
diff --git a/mysql-test/suite/binlog_encryption/rpl_parallel_domain.test b/mysql-test/suite/binlog_encryption/rpl_parallel_domain.test
new file mode 100644
index 00000000000..b498b8616c8
--- /dev/null
+++ b/mysql-test/suite/binlog_encryption/rpl_parallel_domain.test
@@ -0,0 +1 @@
+--source suite/rpl/include/rpl_parallel_domain.inc
diff --git a/mysql-test/suite/binlog_encryption/rpl_parallel_domain_slave_single_grp.result b/mysql-test/suite/binlog_encryption/rpl_parallel_domain_slave_single_grp.result
new file mode 100644
index 00000000000..613aac64487
--- /dev/null
+++ b/mysql-test/suite/binlog_encryption/rpl_parallel_domain_slave_single_grp.result
@@ -0,0 +1,101 @@
+*** Test two transactions in different domains committed in opposite order on slave but in a single group commit. ***
+include/master-slave.inc
+[connection master]
+connection server_2;
+SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
+include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=10;
+CHANGE MASTER TO master_use_gtid=slave_pos;
+include/start_slave.inc
+connection server_1;
+ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+CREATE TABLE t1 (a int PRIMARY KEY) ENGINE=MyISAM;
+CREATE TABLE t2 (a int PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t2 VALUES (1);
+connection server_2;
+include/stop_slave.inc
+connection server_1;
+SET sql_log_bin=0;
+CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
+RETURNS INT DETERMINISTIC
+BEGIN
+RETURN x;
+END
+||
+SET sql_log_bin=1;
+SET @old_format= @@SESSION.binlog_format;
+SET binlog_format='statement';
+SET gtid_domain_id=1;
+INSERT INTO t2 VALUES (foo(10,
+'commit_before_enqueue SIGNAL ready1 WAIT_FOR cont1',
+'commit_after_release_LOCK_prepare_ordered SIGNAL ready2'));
+connection server_2;
+FLUSH LOGS;
+SET sql_log_bin=0;
+CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
+RETURNS INT DETERMINISTIC
+BEGIN
+IF d1 != '' THEN
+SET debug_sync = d1;
+END IF;
+IF d2 != '' THEN
+SET debug_sync = d2;
+END IF;
+RETURN x;
+END
+||
+SET sql_log_bin=1;
+SET @old_format=@@GLOBAL.binlog_format;
+SET GLOBAL binlog_format=statement;
+SET GLOBAL slave_parallel_threads=0;
+SET GLOBAL slave_parallel_threads=10;
+include/start_slave.inc
+SET debug_sync='now WAIT_FOR ready1';
+connection server_1;
+SET gtid_domain_id=2;
+INSERT INTO t2 VALUES (foo(11,
+'commit_before_enqueue SIGNAL ready3 WAIT_FOR cont3',
+'commit_after_release_LOCK_prepare_ordered SIGNAL ready4 WAIT_FOR cont4'));
+SET gtid_domain_id=0;
+SELECT * FROM t2 WHERE a >= 10 ORDER BY a;
+a
+10
+11
+connection server_2;
+SET debug_sync='now WAIT_FOR ready3';
+SET debug_sync='now SIGNAL cont3';
+SET debug_sync='now WAIT_FOR ready4';
+SET debug_sync='now SIGNAL cont1';
+SET debug_sync='now WAIT_FOR ready2';
+SET debug_sync='now SIGNAL cont4';
+SELECT * FROM t2 WHERE a >= 10 ORDER BY a;
+a
+10
+11
+include/show_binlog_events.inc
+Log_name Pos Event_type Server_id End_log_pos Info
+slave-bin.000002 # Binlog_checkpoint # # slave-bin.000002
+slave-bin.000002 # Gtid # # BEGIN GTID #-#-# cid=#
+slave-bin.000002 # Query # # use `test`; INSERT INTO t2 VALUES (foo(11,
+'commit_before_enqueue SIGNAL ready3 WAIT_FOR cont3',
+'commit_after_release_LOCK_prepare_ordered SIGNAL ready4 WAIT_FOR cont4'))
+slave-bin.000002 # Xid # # COMMIT /* XID */
+slave-bin.000002 # Gtid # # BEGIN GTID #-#-# cid=#
+slave-bin.000002 # Query # # use `test`; INSERT INTO t2 VALUES (foo(10,
+'commit_before_enqueue SIGNAL ready1 WAIT_FOR cont1',
+'commit_after_release_LOCK_prepare_ordered SIGNAL ready2'))
+slave-bin.000002 # Xid # # COMMIT /* XID */
+FLUSH LOGS;
+connection server_2;
+include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+include/start_slave.inc
+SET DEBUG_SYNC= 'RESET';
+SET GLOBAL binlog_format=@old_format;
+connection server_1;
+DROP function foo;
+DROP TABLE t1,t2;
+SET DEBUG_SYNC= 'RESET';
+SET GLOBAL binlog_format=@old_format;
+include/rpl_end.inc
diff --git a/mysql-test/suite/binlog_encryption/rpl_parallel_domain_slave_single_grp.test b/mysql-test/suite/binlog_encryption/rpl_parallel_domain_slave_single_grp.test
new file mode 100644
index 00000000000..ce9239f189e
--- /dev/null
+++ b/mysql-test/suite/binlog_encryption/rpl_parallel_domain_slave_single_grp.test
@@ -0,0 +1 @@
+--source suite/rpl/include/rpl_parallel_domain_slave_single_grp.inc
diff --git a/mysql-test/suite/binlog_encryption/rpl_parallel_free_deferred_event.result b/mysql-test/suite/binlog_encryption/rpl_parallel_free_deferred_event.result
new file mode 100644
index 00000000000..6718561a321
--- /dev/null
+++ b/mysql-test/suite/binlog_encryption/rpl_parallel_free_deferred_event.result
@@ -0,0 +1,44 @@
+*** MDEV-5788 Incorrect free of rgi->deferred_events in parallel replication ***
+include/master-slave.inc
+[connection master]
+connection server_2;
+include/stop_slave.inc
+CHANGE MASTER TO master_use_gtid=slave_pos;
+include/start_slave.inc
+connection server_1;
+ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+CREATE TABLE t3 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB;
+connection server_2;
+SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
+include/stop_slave.inc
+SET GLOBAL replicate_ignore_table="test.t3";
+SET GLOBAL slave_parallel_threads=2;
+include/start_slave.inc
+connection server_1;
+INSERT INTO t3 VALUES (100, rand());
+INSERT INTO t3 VALUES (101, rand());
+connection server_2;
+connection server_1;
+INSERT INTO t3 VALUES (102, rand());
+INSERT INTO t3 VALUES (103, rand());
+INSERT INTO t3 VALUES (104, rand());
+INSERT INTO t3 VALUES (105, rand());
+connection server_2;
+include/stop_slave.inc
+SET GLOBAL replicate_ignore_table="";
+include/start_slave.inc
+connection server_1;
+INSERT INTO t3 VALUES (106, rand());
+INSERT INTO t3 VALUES (107, rand());
+connection server_2;
+SELECT * FROM t3 WHERE a >= 100 ORDER BY a;
+a b
+106 #
+107 #
+connection server_2;
+include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+include/start_slave.inc
+connection server_1;
+DROP TABLE t3;
+include/rpl_end.inc
diff --git a/mysql-test/suite/binlog_encryption/rpl_parallel_free_deferred_event.test b/mysql-test/suite/binlog_encryption/rpl_parallel_free_deferred_event.test
new file mode 100644
index 00000000000..d0b6c970210
--- /dev/null
+++ b/mysql-test/suite/binlog_encryption/rpl_parallel_free_deferred_event.test
@@ -0,0 +1 @@
+--source suite/rpl/include/rpl_parallel_free_deferred_event.inc
diff --git a/mysql-test/suite/binlog_encryption/rpl_parallel_gco_wait_kill.result b/mysql-test/suite/binlog_encryption/rpl_parallel_gco_wait_kill.result
new file mode 100644
index 00000000000..4472550c4f2
--- /dev/null
+++ b/mysql-test/suite/binlog_encryption/rpl_parallel_gco_wait_kill.result
@@ -0,0 +1,257 @@
+*** Test killing thread that is waiting to start transaction until previous transaction commits ***
+include/master-slave.inc
+[connection master]
+connection server_2;
+SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
+SET @old_parallel_mode= @@GLOBAL.slave_parallel_mode;
+include/stop_slave.inc
+SET sql_log_bin=0;
+CALL mtr.add_suppression("Query execution was interrupted");
+CALL mtr.add_suppression("Slave: Connection was killed");
+CALL mtr.add_suppression("Commit failed due to failure of an earlier commit on which this one depends");
+SET sql_log_bin=1;
+SET GLOBAL slave_parallel_threads=10;
+SET GLOBAL slave_parallel_mode= 'conservative';
+CHANGE MASTER TO master_use_gtid=slave_pos;
+include/start_slave.inc
+connection server_1;
+connect con_temp3,127.0.0.1,root,,test,$SERVER_MYPORT_1,;
+connect con_temp4,127.0.0.1,root,,test,$SERVER_MYPORT_1,;
+connect con_temp5,127.0.0.1,root,,test,$SERVER_MYPORT_1,;
+ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+CREATE TABLE t3 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB;
+connection server_2;
+connection server_1;
+SET sql_log_bin=0;
+CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
+RETURNS INT DETERMINISTIC
+BEGIN
+RETURN x;
+END
+||
+SET sql_log_bin=1;
+connection server_2;
+SET sql_log_bin=0;
+CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
+RETURNS INT DETERMINISTIC
+BEGIN
+IF d1 != '' THEN
+SET debug_sync = d1;
+END IF;
+IF d2 != '' THEN
+SET debug_sync = d2;
+END IF;
+RETURN x;
+END
+||
+SET sql_log_bin=1;
+include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=0;
+SET GLOBAL slave_parallel_threads=4;
+include/start_slave.inc
+connection server_1;
+SET gtid_domain_id=2;
+BEGIN;
+INSERT INTO t3 VALUES (70, foo(70,
+'rpl_parallel_start_waiting_for_prior SIGNAL t4_waiting', ''));
+INSERT INTO t3 VALUES (60, foo(60,
+'ha_write_row_end SIGNAL d2_query WAIT_FOR d2_cont2',
+'rpl_parallel_end_of_group SIGNAL d2_done WAIT_FOR d2_cont'));
+COMMIT;
+SET gtid_domain_id=0;
+connection server_2;
+SET debug_sync='now WAIT_FOR d2_query';
+connection server_1;
+SET gtid_domain_id=1;
+BEGIN;
+INSERT INTO t3 VALUES (61, foo(61,
+'rpl_parallel_start_waiting_for_prior SIGNAL t3_waiting',
+'rpl_parallel_start_waiting_for_prior_killed SIGNAL t3_killed'));
+INSERT INTO t3 VALUES (62, foo(62,
+'ha_write_row_end SIGNAL d1_query WAIT_FOR d1_cont2',
+'rpl_parallel_end_of_group SIGNAL d1_done WAIT_FOR d1_cont'));
+COMMIT;
+SET gtid_domain_id=0;
+connection server_2;
+SET debug_sync='now WAIT_FOR d1_query';
+connection server_1;
+SET gtid_domain_id=0;
+INSERT INTO t3 VALUES (63, foo(63,
+'ha_write_row_end SIGNAL d0_query WAIT_FOR d0_cont2',
+'rpl_parallel_end_of_group SIGNAL d0_done WAIT_FOR d0_cont'));
+connection server_2;
+SET debug_sync='now WAIT_FOR d0_query';
+connection server_1;
+SET gtid_domain_id=3;
+BEGIN;
+INSERT INTO t3 VALUES (68, foo(68,
+'rpl_parallel_start_waiting_for_prior SIGNAL t2_waiting', ''));
+INSERT INTO t3 VALUES (69, foo(69,
+'ha_write_row_end SIGNAL d3_query WAIT_FOR d3_cont2',
+'rpl_parallel_end_of_group SIGNAL d3_done WAIT_FOR d3_cont'));
+COMMIT;
+SET gtid_domain_id=0;
+connection server_2;
+SET debug_sync='now WAIT_FOR d3_query';
+SET debug_sync='now SIGNAL d2_cont2';
+SET debug_sync='now WAIT_FOR d2_done';
+SET debug_sync='now SIGNAL d1_cont2';
+SET debug_sync='now WAIT_FOR d1_done';
+SET debug_sync='now SIGNAL d0_cont2';
+SET debug_sync='now WAIT_FOR d0_done';
+SET debug_sync='now SIGNAL d3_cont2';
+SET debug_sync='now WAIT_FOR d3_done';
+connection con_temp3;
+INSERT INTO t3 VALUES (64, foo(64,
+'rpl_parallel_before_mark_start_commit SIGNAL t1_waiting WAIT_FOR t1_cont', ''));
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2 WAIT_FOR master_cont2';
+INSERT INTO t3 VALUES (65, foo(65, '', ''));
+connection server_1;
+SET debug_sync='now WAIT_FOR master_queued2';
+connection con_temp4;
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued3';
+INSERT INTO t3 VALUES (66, foo(66, '', ''));
+connection server_1;
+SET debug_sync='now WAIT_FOR master_queued3';
+connection con_temp5;
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued4';
+INSERT INTO t3 VALUES (67, foo(67, '', ''));
+connection server_1;
+SET debug_sync='now WAIT_FOR master_queued4';
+SET debug_sync='now SIGNAL master_cont2';
+connection con_temp3;
+connection con_temp4;
+connection con_temp5;
+connection server_1;
+SELECT * FROM t3 WHERE a >= 60 ORDER BY a;
+a b
+60 60
+61 61
+62 62
+63 63
+64 64
+65 65
+66 66
+67 67
+68 68
+69 69
+70 70
+SET debug_sync='RESET';
+connection server_2;
+SET debug_sync='now SIGNAL d0_cont';
+SET debug_sync='now WAIT_FOR t1_waiting';
+SET debug_sync='now SIGNAL d3_cont';
+SET debug_sync='now WAIT_FOR t2_waiting';
+SET debug_sync='now SIGNAL d1_cont';
+SET debug_sync='now WAIT_FOR t3_waiting';
+SET debug_sync='now SIGNAL d2_cont';
+SET debug_sync='now WAIT_FOR t4_waiting';
+KILL THD_ID;
+SET debug_sync='now WAIT_FOR t3_killed';
+SET debug_sync='now SIGNAL t1_cont';
+include/wait_for_slave_sql_error.inc [errno=1317,1927,1964]
+STOP SLAVE IO_THREAD;
+SELECT * FROM t3 WHERE a >= 60 AND a != 65 ORDER BY a;
+a b
+60 60
+61 61
+62 62
+63 63
+64 64
+68 68
+69 69
+70 70
+SET debug_sync='RESET';
+SET GLOBAL slave_parallel_threads=0;
+SET GLOBAL slave_parallel_threads=10;
+SET sql_log_bin=0;
+DROP FUNCTION foo;
+CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
+RETURNS INT DETERMINISTIC
+BEGIN
+RETURN x;
+END
+||
+SET sql_log_bin=1;
+connection server_1;
+UPDATE t3 SET b=b+1 WHERE a=60;
+connection server_2;
+include/start_slave.inc
+SELECT * FROM t3 WHERE a >= 60 ORDER BY a;
+a b
+60 61
+61 61
+62 62
+63 63
+64 64
+65 65
+66 66
+67 67
+68 68
+69 69
+70 70
+SET sql_log_bin=0;
+DROP FUNCTION foo;
+CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
+RETURNS INT DETERMINISTIC
+BEGIN
+IF d1 != '' THEN
+SET debug_sync = d1;
+END IF;
+IF d2 != '' THEN
+SET debug_sync = d2;
+END IF;
+RETURN x;
+END
+||
+SET sql_log_bin=1;
+connection server_2;
+include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=0;
+SET GLOBAL slave_parallel_threads=10;
+include/start_slave.inc
+*** 5. Test killing thread that is waiting for queue of max length to shorten ***
+SET @old_max_queued= @@GLOBAL.slave_parallel_max_queued;
+SET GLOBAL slave_parallel_max_queued=9000;
+connection server_1;
+INSERT INTO t3 VALUES (80, foo(0,
+'ha_write_row_end SIGNAL query_waiting WAIT_FOR query_cont', ''));
+connection server_2;
+SET debug_sync='now WAIT_FOR query_waiting';
+SET @old_dbug= @@GLOBAL.debug_dbug;
+SET GLOBAL debug_dbug="+d,rpl_parallel_wait_queue_max";
+connection server_1;
+SELECT * FROM t3 WHERE a >= 80 ORDER BY a;
+a b
+80 0
+81 10000
+connection server_2;
+SET debug_sync='now WAIT_FOR wait_queue_ready';
+KILL THD_ID;
+SET debug_sync='now WAIT_FOR wait_queue_killed';
+SET debug_sync='now SIGNAL query_cont';
+include/wait_for_slave_sql_error.inc [errno=1317,1927,1964]
+STOP SLAVE IO_THREAD;
+SET GLOBAL debug_dbug=@old_dbug;
+SET GLOBAL slave_parallel_max_queued= @old_max_queued;
+connection server_1;
+INSERT INTO t3 VALUES (82,0);
+connection server_2;
+SET debug_sync='RESET';
+include/start_slave.inc
+SELECT * FROM t3 WHERE a >= 80 ORDER BY a;
+a b
+80 0
+81 10000
+82 0
+connection server_2;
+include/stop_slave.inc
+SET GLOBAL slave_parallel_mode=@old_parallel_mode;
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+include/start_slave.inc
+SET DEBUG_SYNC= 'RESET';
+connection server_1;
+DROP function foo;
+DROP TABLE t3;
+SET DEBUG_SYNC= 'RESET';
+include/rpl_end.inc
diff --git a/mysql-test/suite/binlog_encryption/rpl_parallel_gco_wait_kill.test b/mysql-test/suite/binlog_encryption/rpl_parallel_gco_wait_kill.test
new file mode 100644
index 00000000000..853465f1760
--- /dev/null
+++ b/mysql-test/suite/binlog_encryption/rpl_parallel_gco_wait_kill.test
@@ -0,0 +1 @@
+--source suite/rpl/include/rpl_parallel_gco_wait_kill.inc
diff --git a/mysql-test/suite/binlog_encryption/rpl_parallel_gtid_slave_pos_update_fail.result b/mysql-test/suite/binlog_encryption/rpl_parallel_gtid_slave_pos_update_fail.result
new file mode 100644
index 00000000000..2e7e7f547af
--- /dev/null
+++ b/mysql-test/suite/binlog_encryption/rpl_parallel_gtid_slave_pos_update_fail.result
@@ -0,0 +1,65 @@
+include/master-slave.inc
+[connection master]
+connection server_2;
+SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
+include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=10;
+CHANGE MASTER TO master_use_gtid=slave_pos;
+include/start_slave.inc
+connection server_1;
+ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+CREATE TABLE t4 (a INT PRIMARY KEY, b INT, KEY b_idx(b)) ENGINE=InnoDB;
+INSERT INTO t4 VALUES (1,NULL), (2,2), (3,NULL), (4,4), (5, NULL), (6, 6);
+connect con1,127.0.0.1,root,,test,$SERVER_MYPORT_1,;
+connect con2,127.0.0.1,root,,test,$SERVER_MYPORT_1,;
+connection server_2;
+include/stop_slave.inc
+connection con1;
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1';
+UPDATE t4 SET b=NULL WHERE a=6;
+connection server_1;
+SET debug_sync='now WAIT_FOR master_queued1';
+connection con2;
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2';
+DELETE FROM t4 WHERE b <= 1;
+connection server_1;
+SET debug_sync='now WAIT_FOR master_queued2';
+SET debug_sync='now SIGNAL master_cont1';
+connection con1;
+connection con2;
+SET debug_sync='RESET';
+connection server_2;
+SET @old_dbug= @@GLOBAL.debug_dbug;
+SET GLOBAL debug_dbug="+d,disable_thd_need_ordering_with";
+include/start_slave.inc
+SET GLOBAL debug_dbug=@old_dbug;
+SELECT * FROM t4 ORDER BY a;
+a b
+1 NULL
+2 2
+3 NULL
+4 4
+5 NULL
+6 NULL
+SET @last_gtid= 'GTID';
+SELECT IF(@@gtid_slave_pos LIKE CONCAT('%',@last_gtid,'%'), "GTID found ok",
+CONCAT("GTID ", @last_gtid, " not found in gtid_slave_pos=", @@gtid_slave_pos))
+AS result;
+result
+GTID found ok
+SELECT "ROW FOUND" AS `Is the row found?`
+ FROM mysql.gtid_slave_pos
+WHERE CONCAT(domain_id, "-", server_id, "-", seq_no) = @last_gtid;
+Is the row found?
+ROW FOUND
+connection server_2;
+include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+include/start_slave.inc
+SET DEBUG_SYNC= 'RESET';
+connection server_1;
+DROP TABLE t4;
+SET DEBUG_SYNC= 'RESET';
+disconnect con1;
+disconnect con2;
+include/rpl_end.inc
diff --git a/mysql-test/suite/binlog_encryption/rpl_parallel_gtid_slave_pos_update_fail.test b/mysql-test/suite/binlog_encryption/rpl_parallel_gtid_slave_pos_update_fail.test
new file mode 100644
index 00000000000..67105ccafee
--- /dev/null
+++ b/mysql-test/suite/binlog_encryption/rpl_parallel_gtid_slave_pos_update_fail.test
@@ -0,0 +1 @@
+--source suite/rpl/include/rpl_parallel_gtid_slave_pos_update_fail.inc
diff --git a/mysql-test/suite/binlog_encryption/rpl_parallel_ignore_error_on_rotate.result b/mysql-test/suite/binlog_encryption/rpl_parallel_ignore_error_on_rotate.result
new file mode 100644
index 00000000000..d00740dba3d
--- /dev/null
+++ b/mysql-test/suite/binlog_encryption/rpl_parallel_ignore_error_on_rotate.result
@@ -0,0 +1,74 @@
+*** MDEV-6551: Some replication errors are ignored if slave_parallel_threads > 0 ***
+include/master-slave.inc
+[connection master]
+connection server_2;
+include/stop_slave.inc
+SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
+SET @old_parallel_mode=@@GLOBAL.slave_parallel_mode;
+SET GLOBAL slave_parallel_threads=1;
+CHANGE MASTER TO master_use_gtid=slave_pos;
+CALL mtr.add_suppression("Commit failed due to failure of an earlier commit on which this one depends");
+include/start_slave.inc
+connection server_1;
+ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+CREATE TABLE t2 (a int PRIMARY KEY) ENGINE=InnoDB;
+SET gtid_domain_id=1;
+INSERT INTO t2 VALUES (1);
+SET gtid_domain_id=0;
+SET gtid_domain_id=2;
+INSERT INTO t2 VALUES (2);
+SET gtid_domain_id=0;
+INSERT INTO t2 VALUES (31);
+include/save_master_gtid.inc
+connection server_2;
+include/sync_with_master_gtid.inc
+include/stop_slave.inc
+SET GLOBAL slave_parallel_threads= 0;
+include/start_slave.inc
+SET sql_log_bin= 0;
+INSERT INTO t2 VALUES (32);
+SET sql_log_bin= 1;
+connection server_1;
+INSERT INTO t2 VALUES (32);
+FLUSH LOGS;
+INSERT INTO t2 VALUES (33);
+INSERT INTO t2 VALUES (34);
+SELECT * FROM t2 WHERE a >= 30 ORDER BY a;
+a
+31
+32
+33
+34
+include/save_master_gtid.inc
+connection server_2;
+include/wait_for_slave_sql_error.inc [errno=1062]
+connection server_2;
+include/stop_slave_io.inc
+SET GLOBAL slave_parallel_threads=10;
+START SLAVE;
+include/wait_for_slave_sql_error.inc [errno=1062]
+START SLAVE SQL_THREAD;
+include/wait_for_slave_sql_error.inc [errno=1062]
+SELECT * FROM t2 WHERE a >= 30 ORDER BY a;
+a
+31
+32
+SET sql_slave_skip_counter= 1;
+ERROR HY000: When using parallel replication and GTID with multiple replication domains, @@sql_slave_skip_counter can not be used. Instead, setting @@gtid_slave_pos explicitly can be used to skip to after a given GTID position
+include/stop_slave_io.inc
+include/start_slave.inc
+include/sync_with_master_gtid.inc
+SELECT * FROM t2 WHERE a >= 30 ORDER BY a;
+a
+31
+32
+33
+34
+connection server_2;
+include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+SET GLOBAL slave_parallel_mode=@old_parallel_mode;
+include/start_slave.inc
+connection server_1;
+DROP TABLE t2;
+include/rpl_end.inc
diff --git a/mysql-test/suite/binlog_encryption/rpl_parallel_ignore_error_on_rotate.test b/mysql-test/suite/binlog_encryption/rpl_parallel_ignore_error_on_rotate.test
new file mode 100644
index 00000000000..ce57184d812
--- /dev/null
+++ b/mysql-test/suite/binlog_encryption/rpl_parallel_ignore_error_on_rotate.test
@@ -0,0 +1 @@
+--source suite/rpl/include/rpl_parallel_ignore_error_on_rotate.inc
diff --git a/mysql-test/suite/binlog_encryption/rpl_parallel_incorrect_relay_pos.result b/mysql-test/suite/binlog_encryption/rpl_parallel_incorrect_relay_pos.result
new file mode 100644
index 00000000000..6ca7f2b68e8
--- /dev/null
+++ b/mysql-test/suite/binlog_encryption/rpl_parallel_incorrect_relay_pos.result
@@ -0,0 +1,75 @@
+*** MDEV-7237: Parallel replication: incorrect relaylog position after stop/start the slave ***
+include/master-slave.inc
+[connection master]
+connection server_2;
+include/stop_slave.inc
+CALL mtr.add_suppression("Commit failed due to failure of an earlier commit on which this one depends");
+SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
+SET @old_parallel_mode=@@GLOBAL.slave_parallel_mode;
+SET GLOBAL slave_parallel_threads=10;
+SET GLOBAL slave_parallel_mode='conservative';
+CHANGE MASTER TO master_use_gtid=slave_pos;
+include/start_slave.inc
+connection server_1;
+ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+CREATE TABLE t2 (a int PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t2 VALUES (40);
+connection server_2;
+connect con_temp2,127.0.0.1,root,,test,$SERVER_MYPORT_2,;
+include/stop_slave.inc
+CHANGE MASTER TO master_use_gtid=no;
+SET @old_dbug= @@GLOBAL.debug_dbug;
+SET GLOBAL debug_dbug="+d,rpl_parallel_scheduled_gtid_0_x_100";
+SET GLOBAL debug_dbug="+d,rpl_parallel_wait_for_done_trigger";
+SET GLOBAL slave_parallel_threads=0;
+SET GLOBAL slave_parallel_threads=10;
+connection server_1;
+INSERT INTO t2 VALUES (41);
+INSERT INTO t2 VALUES (42);
+SET @old_format= @@binlog_format;
+SET binlog_format= statement;
+DELETE FROM t2 WHERE a=40;
+SET binlog_format= @old_format;
+INSERT INTO t2 VALUES (43);
+INSERT INTO t2 VALUES (44);
+FLUSH LOGS;
+INSERT INTO t2 VALUES (45);
+SET gtid_seq_no=100;
+INSERT INTO t2 VALUES (46);
+connection con_temp2;
+BEGIN;
+SELECT * FROM t2 WHERE a=40 FOR UPDATE;
+a
+40
+connection server_2;
+include/start_slave.inc
+SET debug_sync= 'now WAIT_FOR scheduled_gtid_0_x_100';
+STOP SLAVE;
+connection con_temp2;
+SET debug_sync= 'now WAIT_FOR wait_for_done_waiting';
+ROLLBACK;
+connection server_2;
+include/wait_for_slave_sql_to_stop.inc
+SELECT * FROM t2 WHERE a >= 40 ORDER BY a;
+a
+41
+42
+include/start_slave.inc
+SELECT * FROM t2 WHERE a >= 40 ORDER BY a;
+a
+41
+42
+43
+44
+45
+46
+include/stop_slave.inc
+SET GLOBAL debug_dbug=@old_dbug;
+SET DEBUG_SYNC= 'RESET';
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+SET GLOBAL slave_parallel_mode=@old_parallel_mode;
+CHANGE MASTER TO master_use_gtid=slave_pos;
+include/start_slave.inc
+connection server_1;
+DROP TABLE t2;
+include/rpl_end.inc
diff --git a/mysql-test/suite/binlog_encryption/rpl_parallel_incorrect_relay_pos.test b/mysql-test/suite/binlog_encryption/rpl_parallel_incorrect_relay_pos.test
new file mode 100644
index 00000000000..ddec96e8792
--- /dev/null
+++ b/mysql-test/suite/binlog_encryption/rpl_parallel_incorrect_relay_pos.test
@@ -0,0 +1 @@
+--source suite/rpl/include/rpl_parallel_incorrect_relay_pos.inc
diff --git a/mysql-test/suite/binlog_encryption/rpl_parallel_innodb_lock_conflict.result b/mysql-test/suite/binlog_encryption/rpl_parallel_innodb_lock_conflict.result
new file mode 100644
index 00000000000..1411db16af6
--- /dev/null
+++ b/mysql-test/suite/binlog_encryption/rpl_parallel_innodb_lock_conflict.result
@@ -0,0 +1,79 @@
+***MDEV-5914: Parallel replication deadlock due to InnoDB lock conflicts ***
+include/master-slave.inc
+[connection master]
+connection server_2;
+SET sql_log_bin=0;
+CALL mtr.add_suppression("Commit failed due to failure of an earlier commit on which this one depends");
+SET sql_log_bin=1;
+SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
+include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=10;
+CHANGE MASTER TO master_use_gtid=slave_pos;
+connection server_1;
+ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+CREATE TABLE t4 (a INT PRIMARY KEY, b INT, KEY b_idx(b)) ENGINE=InnoDB;
+INSERT INTO t4 VALUES (1,NULL), (2,2), (3,NULL), (4,4), (5, NULL), (6, 6);
+connect con1,127.0.0.1,root,,test,$SERVER_MYPORT_1,;
+connect con2,127.0.0.1,root,,test,$SERVER_MYPORT_1,;
+connection con1;
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1';
+UPDATE t4 SET b=NULL WHERE a=6;
+connection server_1;
+SET debug_sync='now WAIT_FOR master_queued1';
+connection con2;
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2';
+DELETE FROM t4 WHERE b <= 3;
+connection server_1;
+SET debug_sync='now WAIT_FOR master_queued2';
+SET debug_sync='now SIGNAL master_cont1';
+connection con1;
+connection con2;
+SET debug_sync='RESET';
+connection server_2;
+include/start_slave.inc
+include/stop_slave.inc
+SELECT * FROM t4 ORDER BY a;
+a b
+1 NULL
+3 NULL
+4 4
+5 NULL
+6 NULL
+connection server_1;
+DELETE FROM t4;
+INSERT INTO t4 VALUES (1,NULL), (2,2), (3,NULL), (4,4), (5, NULL), (6, 6);
+connection con1;
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1';
+INSERT INTO t4 VALUES (7, NULL);
+connection server_1;
+SET debug_sync='now WAIT_FOR master_queued1';
+connection con2;
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2';
+DELETE FROM t4 WHERE b <= 3;
+connection server_1;
+SET debug_sync='now WAIT_FOR master_queued2';
+SET debug_sync='now SIGNAL master_cont1';
+connection con1;
+connection con2;
+SET debug_sync='RESET';
+connection server_2;
+include/start_slave.inc
+include/stop_slave.inc
+SELECT * FROM t4 ORDER BY a;
+a b
+1 NULL
+3 NULL
+4 4
+5 NULL
+6 6
+7 NULL
+connection server_2;
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+include/start_slave.inc
+SET DEBUG_SYNC= 'RESET';
+connection server_1;
+disconnect con1;
+disconnect con2;
+DROP TABLE t4;
+SET DEBUG_SYNC= 'RESET';
+include/rpl_end.inc
diff --git a/mysql-test/suite/binlog_encryption/rpl_parallel_innodb_lock_conflict.test b/mysql-test/suite/binlog_encryption/rpl_parallel_innodb_lock_conflict.test
new file mode 100644
index 00000000000..624667d5408
--- /dev/null
+++ b/mysql-test/suite/binlog_encryption/rpl_parallel_innodb_lock_conflict.test
@@ -0,0 +1 @@
+--source suite/rpl/include/rpl_parallel_innodb_lock_conflict.inc
diff --git a/mysql-test/suite/binlog_encryption/rpl_parallel_missed_error_handling.result b/mysql-test/suite/binlog_encryption/rpl_parallel_missed_error_handling.result
new file mode 100644
index 00000000000..e9d04c02d7a
--- /dev/null
+++ b/mysql-test/suite/binlog_encryption/rpl_parallel_missed_error_handling.result
@@ -0,0 +1,65 @@
+*** MDEV-5921: In parallel replication, an error is not correctly signalled to the next transaction ***
+include/master-slave.inc
+[connection master]
+connection server_2;
+include/stop_slave.inc
+SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
+SET GLOBAL slave_parallel_threads=10;
+CHANGE MASTER TO master_use_gtid=slave_pos;
+CALL mtr.add_suppression("Commit failed due to failure of an earlier commit on which this one depends");
+include/start_slave.inc
+connection server_1;
+ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+CREATE TABLE t3 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB;
+connection server_2;
+connection server_1;
+INSERT INTO t3 VALUES (110, 1);
+connection server_2;
+SELECT * FROM t3 WHERE a >= 110 ORDER BY a;
+a b
+110 1
+SET sql_log_bin=0;
+INSERT INTO t3 VALUES (111, 666);
+SET sql_log_bin=1;
+connection server_1;
+connect con1,127.0.0.1,root,,test,$SERVER_MYPORT_1,;
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1';
+INSERT INTO t3 VALUES (111, 2);
+connection server_1;
+SET debug_sync='now WAIT_FOR master_queued1';
+connect con2,127.0.0.1,root,,test,$SERVER_MYPORT_1,;
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2';
+INSERT INTO t3 VALUES (112, 3);
+connection server_1;
+SET debug_sync='now WAIT_FOR master_queued2';
+SET debug_sync='now SIGNAL master_cont1';
+connection con1;
+connection con2;
+SET debug_sync='RESET';
+connection server_2;
+include/wait_for_slave_sql_error.inc [errno=1062]
+include/wait_for_slave_sql_to_stop.inc
+SELECT * FROM t3 WHERE a >= 110 ORDER BY a;
+a b
+110 1
+111 666
+SET sql_log_bin=0;
+DELETE FROM t3 WHERE a=111 AND b=666;
+SET sql_log_bin=1;
+START SLAVE SQL_THREAD;
+SELECT * FROM t3 WHERE a >= 110 ORDER BY a;
+a b
+110 1
+111 2
+112 3
+connection server_2;
+include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+include/start_slave.inc
+SET DEBUG_SYNC= 'RESET';
+connection server_1;
+disconnect con1;
+disconnect con2;
+DROP TABLE t3;
+SET DEBUG_SYNC= 'RESET';
+include/rpl_end.inc
diff --git a/mysql-test/suite/binlog_encryption/rpl_parallel_missed_error_handling.test b/mysql-test/suite/binlog_encryption/rpl_parallel_missed_error_handling.test
new file mode 100644
index 00000000000..c6d09f2196b
--- /dev/null
+++ b/mysql-test/suite/binlog_encryption/rpl_parallel_missed_error_handling.test
@@ -0,0 +1 @@
+--source suite/rpl/include/rpl_parallel_missed_error_handling.inc
diff --git a/mysql-test/suite/binlog_encryption/rpl_parallel_mode.result b/mysql-test/suite/binlog_encryption/rpl_parallel_mode.result
new file mode 100644
index 00000000000..313290b1fd2
--- /dev/null
+++ b/mysql-test/suite/binlog_encryption/rpl_parallel_mode.result
@@ -0,0 +1,75 @@
+*** MDEV-6676 - test syntax of @@slave_parallel_mode ***
+include/master-slave.inc
+[connection master]
+connection server_2;
+include/stop_slave.inc
+SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
+SET @old_parallel_mode=@@GLOBAL.slave_parallel_mode;
+SET GLOBAL slave_parallel_threads=10;
+CHANGE MASTER TO master_use_gtid=slave_pos;
+include/start_slave.inc
+connection server_1;
+ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+CREATE TABLE t2 (a int PRIMARY KEY) ENGINE=InnoDB;
+connection server_2;
+Parallel_Mode = 'optimistic'
+include/stop_slave.inc
+SET GLOBAL slave_parallel_mode='aggressive';
+Parallel_Mode = 'aggressive'
+SET GLOBAL slave_parallel_mode='conservative';
+Parallel_Mode = 'conservative'
+*** MDEV-6676 - test that empty parallel_mode does not replicate in parallel ***
+connection server_1;
+INSERT INTO t2 VALUES (1040);
+include/save_master_gtid.inc
+connection server_2;
+SET GLOBAL slave_parallel_mode='none';
+SET @old_dbug= @@GLOBAL.debug_dbug;
+SET GLOBAL debug_dbug="+d,slave_crash_if_parallel_apply";
+include/start_slave.inc
+include/sync_with_master_gtid.inc
+SELECT * FROM t2 WHERE a >= 1040 ORDER BY a;
+a
+1040
+include/stop_slave.inc
+SET GLOBAL debug_dbug=@old_dbug;
+*** MDEV-6676 - test disabling domain-based parallel replication ***
+connection server_1;
+SET gtid_domain_id = 1;
+INSERT INTO t2 VALUES (1041);
+INSERT INTO t2 VALUES (1042);
+INSERT INTO t2 VALUES (1043);
+INSERT INTO t2 VALUES (1044);
+INSERT INTO t2 VALUES (1045);
+INSERT INTO t2 VALUES (1046);
+DELETE FROM t2 WHERE a >= 1041;
+SET gtid_domain_id = 2;
+INSERT INTO t2 VALUES (1041);
+INSERT INTO t2 VALUES (1042);
+INSERT INTO t2 VALUES (1043);
+INSERT INTO t2 VALUES (1044);
+INSERT INTO t2 VALUES (1045);
+INSERT INTO t2 VALUES (1046);
+SET gtid_domain_id = 0;
+include/save_master_gtid.inc
+connection server_2;
+SET GLOBAL slave_parallel_mode=minimal;
+include/start_slave.inc
+include/sync_with_master_gtid.inc
+SELECT * FROM t2 WHERE a >= 1040 ORDER BY a;
+a
+1040
+1041
+1042
+1043
+1044
+1045
+1046
+include/stop_slave.inc
+SET GLOBAL debug_dbug=@old_dbug;
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+SET GLOBAL slave_parallel_mode=@old_parallel_mode;
+include/start_slave.inc
+connection server_1;
+DROP TABLE t2;
+include/rpl_end.inc
diff --git a/mysql-test/suite/binlog_encryption/rpl_parallel_mode.test b/mysql-test/suite/binlog_encryption/rpl_parallel_mode.test
new file mode 100644
index 00000000000..93170f61c95
--- /dev/null
+++ b/mysql-test/suite/binlog_encryption/rpl_parallel_mode.test
@@ -0,0 +1 @@
+--source suite/rpl/include/rpl_parallel_mode.inc
diff --git a/mysql-test/suite/binlog_encryption/rpl_parallel_partial_binlog_trans.result b/mysql-test/suite/binlog_encryption/rpl_parallel_partial_binlog_trans.result
new file mode 100644
index 00000000000..ab1cac692a0
--- /dev/null
+++ b/mysql-test/suite/binlog_encryption/rpl_parallel_partial_binlog_trans.result
@@ -0,0 +1,51 @@
+*** MDEV_6435: Incorrect error handling when query binlogged partially on master with "killed" error ***
+include/master-slave.inc
+[connection master]
+connection server_2;
+include/stop_slave.inc
+SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
+SET GLOBAL slave_parallel_threads=1;
+CHANGE MASTER TO master_use_gtid=slave_pos;
+include/start_slave.inc
+connection server_1;
+ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+CREATE TABLE t6 (a INT) ENGINE=MyISAM;
+CREATE TRIGGER tr AFTER INSERT ON t6 FOR EACH ROW SET @a = 1;
+connect con1,127.0.0.1,root,,test,$SERVER_MYPORT_1,;
+connection con1;
+SET debug_sync='sp_head_execute_before_loop SIGNAL ready WAIT_FOR cont';
+INSERT INTO t6 VALUES (1), (2), (3);
+connection server_1;
+SET debug_sync='now WAIT_FOR ready';
+KILL QUERY CONID;
+SET debug_sync='now SIGNAL cont';
+connection con1;
+ERROR 70100: Query execution was interrupted
+SET debug_sync='RESET';
+connection server_1;
+SET debug_sync='RESET';
+connection server_2;
+include/wait_for_slave_sql_error.inc [errno=1317]
+STOP SLAVE IO_THREAD;
+SET GLOBAL gtid_slave_pos= 'AFTER_ERROR_GTID_POS';
+include/start_slave.inc
+connection server_1;
+INSERT INTO t6 VALUES (4);
+SELECT * FROM t6 ORDER BY a;
+a
+1
+4
+connection server_2;
+SELECT * FROM t6 ORDER BY a;
+a
+4
+connection server_2;
+include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+include/start_slave.inc
+SET DEBUG_SYNC= 'RESET';
+connection server_1;
+DROP TABLE t6;
+SET DEBUG_SYNC= 'RESET';
+disconnect con1;
+include/rpl_end.inc
diff --git a/mysql-test/suite/binlog_encryption/rpl_parallel_partial_binlog_trans.test b/mysql-test/suite/binlog_encryption/rpl_parallel_partial_binlog_trans.test
new file mode 100644
index 00000000000..4f90cf4808e
--- /dev/null
+++ b/mysql-test/suite/binlog_encryption/rpl_parallel_partial_binlog_trans.test
@@ -0,0 +1 @@
+--source suite/rpl/include/rpl_parallel_partial_binlog_trans.inc
diff --git a/mysql-test/suite/binlog_encryption/rpl_parallel_record_gtid_wakeup.result b/mysql-test/suite/binlog_encryption/rpl_parallel_record_gtid_wakeup.result
new file mode 100644
index 00000000000..cbe53e4f623
--- /dev/null
+++ b/mysql-test/suite/binlog_encryption/rpl_parallel_record_gtid_wakeup.result
@@ -0,0 +1,48 @@
+*** MDEV-7929: record_gtid() for non-transactional event group calls wakeup_subsequent_commits() too early, causing slave hang. ***
+include/master-slave.inc
+[connection master]
+connection server_2;
+SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
+include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=10;
+CHANGE MASTER TO master_use_gtid=slave_pos;
+include/start_slave.inc
+connection server_1;
+ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+CREATE TABLE t1 (a int PRIMARY KEY) ENGINE=MyISAM;
+CREATE TABLE t3 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB;
+connection server_2;
+include/stop_slave.inc
+SET @old_dbug= @@GLOBAL.debug_dbug;
+SET GLOBAL debug_dbug= '+d,inject_record_gtid_serverid_100_sleep';
+connection server_1;
+SET @old_dbug= @@SESSION.debug_dbug;
+SET SESSION debug_dbug="+d,binlog_force_commit_id";
+SET @old_server_id= @@SESSION.server_id;
+SET SESSION server_id= 100;
+SET @commit_id= 10010;
+ALTER TABLE t1 COMMENT "Hulubulu!";
+SET SESSION server_id= @old_server_id;
+INSERT INTO t3 VALUES (130, 0);
+SET @commit_id= 10011;
+INSERT INTO t3 VALUES (131, 0);
+SET SESSION debug_dbug=@old_dbug;
+SELECT * FROM t3 WHERE a >= 130 ORDER BY a;
+a b
+130 0
+131 0
+include/save_master_gtid.inc
+connection server_2;
+include/start_slave.inc
+include/sync_with_master_gtid.inc
+SELECT * FROM t3 WHERE a >= 130 ORDER BY a;
+a b
+130 0
+131 0
+include/stop_slave.inc
+SET GLOBAL debug_dbug= @old_dbug;
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+include/start_slave.inc
+connection server_1;
+DROP TABLE t1,t3;
+include/rpl_end.inc
diff --git a/mysql-test/suite/binlog_encryption/rpl_parallel_record_gtid_wakeup.test b/mysql-test/suite/binlog_encryption/rpl_parallel_record_gtid_wakeup.test
new file mode 100644
index 00000000000..cb3b0dfa119
--- /dev/null
+++ b/mysql-test/suite/binlog_encryption/rpl_parallel_record_gtid_wakeup.test
@@ -0,0 +1 @@
+--source suite/rpl/include/rpl_parallel_record_gtid_wakeup.inc
diff --git a/mysql-test/suite/binlog_encryption/rpl_parallel_retry_deadlock.result b/mysql-test/suite/binlog_encryption/rpl_parallel_retry_deadlock.result
new file mode 100644
index 00000000000..1f5a23db848
--- /dev/null
+++ b/mysql-test/suite/binlog_encryption/rpl_parallel_retry_deadlock.result
@@ -0,0 +1,192 @@
+*** MDEV-7326 Server deadlock in connection with parallel replication ***
+include/master-slave.inc
+[connection master]
+connection server_2;
+SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
+SET @old_parallel_mode=@@GLOBAL.slave_parallel_mode;
+include/stop_slave.inc
+SET GLOBAL slave_parallel_mode='conservative';
+SET GLOBAL slave_parallel_threads=10;
+CHANGE MASTER TO master_use_gtid=slave_pos;
+include/start_slave.inc
+connection server_1;
+ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+CREATE TABLE t1 (a int PRIMARY KEY) ENGINE=MyISAM;
+CREATE TABLE t2 (a int PRIMARY KEY) ENGINE=InnoDB;
+CREATE TABLE t6 (a INT) ENGINE=MyISAM;
+connection server_2;
+connection server_1;
+SET sql_log_bin=0;
+CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
+RETURNS INT DETERMINISTIC
+BEGIN
+RETURN x;
+END
+||
+SET sql_log_bin=1;
+connection server_2;
+SET sql_log_bin=0;
+CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
+RETURNS INT DETERMINISTIC
+BEGIN
+IF d1 != '' THEN
+SET debug_sync = d1;
+END IF;
+IF d2 != '' THEN
+SET debug_sync = d2;
+END IF;
+RETURN x;
+END
+||
+SET sql_log_bin=1;
+connection server_2;
+include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=0;
+SET GLOBAL slave_parallel_threads=3;
+SET GLOBAL debug_dbug="+d,rpl_parallel_simulate_temp_err_xid";
+include/start_slave.inc
+connection server_1;
+SET @old_format= @@SESSION.binlog_format;
+SET binlog_format= STATEMENT;
+INSERT INTO t1 VALUES (foo(50,
+"rpl_parallel_start_waiting_for_prior SIGNAL t3_ready",
+"rpl_parallel_end_of_group SIGNAL prep_ready WAIT_FOR prep_cont"));
+connection server_2;
+SET DEBUG_SYNC= "now WAIT_FOR prep_ready";
+connection server_1;
+INSERT INTO t2 VALUES (foo(50,
+"rpl_parallel_simulate_temp_err_xid SIGNAL t1_ready1 WAIT_FOR t1_cont1",
+"rpl_parallel_retry_after_unmark SIGNAL t1_ready2 WAIT_FOR t1_cont2"));
+connection server_2;
+SET DEBUG_SYNC= "now WAIT_FOR t1_ready1";
+connection server_1;
+INSERT INTO t1 VALUES (foo(51,
+"rpl_parallel_before_mark_start_commit SIGNAL t2_ready1 WAIT_FOR t2_cont1",
+"rpl_parallel_after_mark_start_commit SIGNAL t2_ready2"));
+connection server_2;
+SET DEBUG_SYNC= "now WAIT_FOR t2_ready1";
+SET DEBUG_SYNC= "now SIGNAL t1_cont1";
+SET DEBUG_SYNC= "now WAIT_FOR t1_ready2";
+connection server_1;
+INSERT INTO t1 VALUES (52);
+SET BINLOG_FORMAT= @old_format;
+SELECT * FROM t2 WHERE a>=50 ORDER BY a;
+a
+50
+SELECT * FROM t1 WHERE a>=50 ORDER BY a;
+a
+50
+51
+52
+connection server_2;
+SET DEBUG_SYNC= "now SIGNAL prep_cont";
+SET DEBUG_SYNC= "now WAIT_FOR t3_ready";
+SET DEBUG_SYNC= "now SIGNAL t2_cont1";
+SET DEBUG_SYNC= "now WAIT_FOR t2_ready2";
+SET DEBUG_SYNC= "now SIGNAL t1_cont2";
+connection server_1;
+connection server_2;
+SELECT * FROM t2 WHERE a>=50 ORDER BY a;
+a
+50
+SELECT * FROM t1 WHERE a>=50 ORDER BY a;
+a
+50
+51
+52
+SET DEBUG_SYNC="reset";
+include/stop_slave.inc
+SET GLOBAL debug_dbug=@old_dbug;
+SET GLOBAL slave_parallel_mode=@old_parallel_mode;
+SET GLOBAL slave_parallel_threads=0;
+SET GLOBAL slave_parallel_threads=10;
+include/start_slave.inc
+*** MDEV-7326 Server deadlock in connection with parallel replication ***
+connect con_temp3,127.0.0.1,root,,test,$SERVER_MYPORT_1,;
+connect con_temp4,127.0.0.1,root,,test,$SERVER_MYPORT_1,;
+connection server_2;
+include/stop_slave.inc
+SET @old_parallel_mode= @@GLOBAL.slave_parallel_mode;
+SET GLOBAL slave_parallel_mode='conservative';
+SET GLOBAL slave_parallel_threads=0;
+SET GLOBAL slave_parallel_threads=3;
+SET GLOBAL debug_dbug="+d,rpl_parallel_simulate_temp_err_xid";
+include/start_slave.inc
+connection server_1;
+SET @old_format= @@SESSION.binlog_format;
+SET binlog_format= STATEMENT;
+INSERT INTO t1 VALUES (foo(60,
+"rpl_parallel_start_waiting_for_prior SIGNAL t3_ready",
+"rpl_parallel_end_of_group SIGNAL prep_ready WAIT_FOR prep_cont"));
+connection server_2;
+SET DEBUG_SYNC= "now WAIT_FOR prep_ready";
+connection server_1;
+INSERT INTO t2 VALUES (foo(60,
+"rpl_parallel_simulate_temp_err_xid SIGNAL t1_ready1 WAIT_FOR t1_cont1",
+"rpl_parallel_retry_after_unmark SIGNAL t1_ready2 WAIT_FOR t1_cont2"));
+connection server_2;
+SET DEBUG_SYNC= "now WAIT_FOR t1_ready1";
+connection con_temp3;
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1';
+SET binlog_format=statement;
+INSERT INTO t1 VALUES (foo(61,
+"rpl_parallel_before_mark_start_commit SIGNAL t2_ready1 WAIT_FOR t2_cont1",
+"rpl_parallel_after_mark_start_commit SIGNAL t2_ready2"));
+connection server_1;
+SET debug_sync='now WAIT_FOR master_queued1';
+connection con_temp4;
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2';
+INSERT INTO t6 VALUES (62);
+connection server_1;
+SET debug_sync='now WAIT_FOR master_queued2';
+SET debug_sync='now SIGNAL master_cont1';
+connection con_temp3;
+connection con_temp4;
+connection server_1;
+SET debug_sync='RESET';
+SET BINLOG_FORMAT= @old_format;
+SELECT * FROM t2 WHERE a>=60 ORDER BY a;
+a
+60
+SELECT * FROM t1 WHERE a>=60 ORDER BY a;
+a
+60
+61
+SELECT * FROM t6 WHERE a>=60 ORDER BY a;
+a
+62
+connection server_2;
+SET DEBUG_SYNC= "now WAIT_FOR t2_ready1";
+SET DEBUG_SYNC= "now SIGNAL t1_cont1";
+SET DEBUG_SYNC= "now WAIT_FOR t1_ready2";
+connection server_2;
+SET DEBUG_SYNC= "now SIGNAL prep_cont";
+SET DEBUG_SYNC= "now WAIT_FOR t3_ready";
+SET DEBUG_SYNC= "now SIGNAL t2_cont1";
+SET DEBUG_SYNC= "now WAIT_FOR t2_ready2";
+SET DEBUG_SYNC= "now SIGNAL t1_cont2";
+connection server_1;
+connection server_2;
+SELECT * FROM t2 WHERE a>=60 ORDER BY a;
+a
+60
+SELECT * FROM t1 WHERE a>=60 ORDER BY a;
+a
+60
+61
+SELECT * FROM t6 WHERE a>=60 ORDER BY a;
+a
+62
+SET DEBUG_SYNC="reset";
+include/stop_slave.inc
+SET GLOBAL debug_dbug=@old_dbug;
+SET GLOBAL slave_parallel_mode=@old_parallel_mode;
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+include/start_slave.inc
+connection server_1;
+DROP function foo;
+DROP TABLE t1,t2,t6;
+disconnect con_temp3;
+disconnect con_temp4;
+SET DEBUG_SYNC= 'RESET';
+include/rpl_end.inc
diff --git a/mysql-test/suite/binlog_encryption/rpl_parallel_retry_deadlock.test b/mysql-test/suite/binlog_encryption/rpl_parallel_retry_deadlock.test
new file mode 100644
index 00000000000..61c2cb22a75
--- /dev/null
+++ b/mysql-test/suite/binlog_encryption/rpl_parallel_retry_deadlock.test
@@ -0,0 +1 @@
+--source suite/rpl/include/rpl_parallel_retry_deadlock.inc
diff --git a/mysql-test/suite/binlog_encryption/rpl_parallel_rollback_assert.result b/mysql-test/suite/binlog_encryption/rpl_parallel_rollback_assert.result
new file mode 100644
index 00000000000..af9c5f14687
--- /dev/null
+++ b/mysql-test/suite/binlog_encryption/rpl_parallel_rollback_assert.result
@@ -0,0 +1,45 @@
+*** MDEV-8725: Assertion on ROLLBACK statement in the binary log ***
+include/master-slave.inc
+[connection master]
+connection server_2;
+SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
+include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=10;
+CHANGE MASTER TO master_use_gtid=slave_pos;
+include/start_slave.inc
+connection server_1;
+ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+CREATE TABLE t1 (a int PRIMARY KEY) ENGINE=MyISAM;
+CREATE TABLE t2 (a int PRIMARY KEY) ENGINE=InnoDB;
+connection server_2;
+connection server_1;
+BEGIN;
+INSERT INTO t2 VALUES (2000);
+INSERT INTO t1 VALUES (2000);
+INSERT INTO t2 VALUES (2001);
+ROLLBACK;
+SELECT * FROM t1 WHERE a>=2000 ORDER BY a;
+a
+2000
+SELECT * FROM t2 WHERE a>=2000 ORDER BY a;
+a
+include/save_master_gtid.inc
+connection server_2;
+include/sync_with_master_gtid.inc
+connection server_1;
+INSERT INTO t2 VALUES (2020);
+include/save_master_gtid.inc
+connection server_2;
+include/sync_with_master_gtid.inc
+SELECT * FROM t2 WHERE a>=2000 ORDER BY a;
+a
+2020
+SELECT * FROM t1 WHERE a>=2000 ORDER BY a;
+a
+2000
+include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+include/start_slave.inc
+connection server_1;
+DROP TABLE t1,t2;
+include/rpl_end.inc
diff --git a/mysql-test/suite/binlog_encryption/rpl_parallel_rollback_assert.test b/mysql-test/suite/binlog_encryption/rpl_parallel_rollback_assert.test
new file mode 100644
index 00000000000..181305219be
--- /dev/null
+++ b/mysql-test/suite/binlog_encryption/rpl_parallel_rollback_assert.test
@@ -0,0 +1 @@
+--source suite/rpl/include/rpl_parallel_rollback_assert.inc
diff --git a/mysql-test/suite/binlog_encryption/rpl_parallel_single_grpcmt.result b/mysql-test/suite/binlog_encryption/rpl_parallel_single_grpcmt.result
new file mode 100644
index 00000000000..25fc9a189ac
--- /dev/null
+++ b/mysql-test/suite/binlog_encryption/rpl_parallel_single_grpcmt.result
@@ -0,0 +1,161 @@
+*** Test that group-committed transactions on the master can replicate in parallel on the slave. ***
+include/master-slave.inc
+[connection master]
+connection server_1;
+SET sql_log_bin=0;
+CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
+RETURNS INT DETERMINISTIC
+BEGIN
+RETURN x;
+END
+||
+SET sql_log_bin=1;
+connection server_2;
+include/stop_slave.inc
+SET sql_log_bin=0;
+CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
+RETURNS INT DETERMINISTIC
+BEGIN
+IF d1 != '' THEN
+SET debug_sync = d1;
+END IF;
+IF d2 != '' THEN
+SET debug_sync = d2;
+END IF;
+RETURN x;
+END
+||
+SET sql_log_bin=1;
+SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
+SET GLOBAL slave_parallel_threads=10;
+CHANGE MASTER TO master_use_gtid=slave_pos;
+include/start_slave.inc
+connection server_1;
+ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+CREATE TABLE t3 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB;
+INSERT INTO t3 VALUES (1,1), (3,3), (5,5), (7,7);
+connection server_2;
+connect con_temp1,127.0.0.1,root,,test,$SERVER_MYPORT_2,;
+BEGIN;
+INSERT INTO t3 VALUES (2,102);
+connect con_temp2,127.0.0.1,root,,test,$SERVER_MYPORT_2,;
+BEGIN;
+INSERT INTO t3 VALUES (4,104);
+connect con_temp3,127.0.0.1,root,,test,$SERVER_MYPORT_1,;
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1';
+SET binlog_format=statement;
+INSERT INTO t3 VALUES (2, foo(12,
+'commit_after_release_LOCK_prepare_ordered SIGNAL slave_queued1 WAIT_FOR slave_cont1',
+''));
+connection server_1;
+SET debug_sync='now WAIT_FOR master_queued1';
+connect con_temp4,127.0.0.1,root,,test,$SERVER_MYPORT_1,;
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2';
+SET binlog_format=statement;
+INSERT INTO t3 VALUES (4, foo(14,
+'commit_after_release_LOCK_prepare_ordered SIGNAL slave_queued2',
+''));
+connection server_1;
+SET debug_sync='now WAIT_FOR master_queued2';
+connect con_temp5,127.0.0.1,root,,test,$SERVER_MYPORT_1,;
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued3';
+SET binlog_format=statement;
+INSERT INTO t3 VALUES (6, foo(16,
+'group_commit_waiting_for_prior SIGNAL slave_queued3',
+''));
+connection server_1;
+SET debug_sync='now WAIT_FOR master_queued3';
+SET debug_sync='now SIGNAL master_cont1';
+connection con_temp3;
+connection con_temp4;
+connection con_temp5;
+SET debug_sync='RESET';
+connection server_1;
+SELECT * FROM t3 ORDER BY a;
+a b
+1 1
+2 12
+3 3
+4 14
+5 5
+6 16
+7 7
+include/show_binlog_events.inc
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Binlog_checkpoint # # master-bin.000001
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # use `test`; ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # use `test`; CREATE TABLE t3 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB
+master-bin.000001 # Gtid # # BEGIN GTID #-#-#
+master-bin.000001 # Query # # use `test`; INSERT INTO t3 VALUES (1,1), (3,3), (5,5), (7,7)
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Gtid # # BEGIN GTID #-#-# cid=#
+master-bin.000001 # Query # # use `test`; INSERT INTO t3 VALUES (2, foo(12,
+'commit_after_release_LOCK_prepare_ordered SIGNAL slave_queued1 WAIT_FOR slave_cont1',
+''))
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Gtid # # BEGIN GTID #-#-# cid=#
+master-bin.000001 # Query # # use `test`; INSERT INTO t3 VALUES (4, foo(14,
+'commit_after_release_LOCK_prepare_ordered SIGNAL slave_queued2',
+''))
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Gtid # # BEGIN GTID #-#-# cid=#
+master-bin.000001 # Query # # use `test`; INSERT INTO t3 VALUES (6, foo(16,
+'group_commit_waiting_for_prior SIGNAL slave_queued3',
+''))
+master-bin.000001 # Xid # # COMMIT /* XID */
+connection server_2;
+SET debug_sync='now WAIT_FOR slave_queued3';
+connection con_temp1;
+ROLLBACK;
+connection server_2;
+SET debug_sync='now WAIT_FOR slave_queued1';
+connection con_temp2;
+ROLLBACK;
+connection server_2;
+SET debug_sync='now WAIT_FOR slave_queued2';
+SET debug_sync='now SIGNAL slave_cont1';
+SELECT * FROM t3 ORDER BY a;
+a b
+1 1
+2 12
+3 3
+4 14
+5 5
+6 16
+7 7
+include/show_binlog_events.inc
+Log_name Pos Event_type Server_id End_log_pos Info
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `test`; ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `test`; CREATE TABLE t3 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB
+slave-bin.000001 # Gtid # # BEGIN GTID #-#-#
+slave-bin.000001 # Query # # use `test`; INSERT INTO t3 VALUES (1,1), (3,3), (5,5), (7,7)
+slave-bin.000001 # Xid # # COMMIT /* XID */
+slave-bin.000001 # Gtid # # BEGIN GTID #-#-# cid=#
+slave-bin.000001 # Query # # use `test`; INSERT INTO t3 VALUES (2, foo(12,
+'commit_after_release_LOCK_prepare_ordered SIGNAL slave_queued1 WAIT_FOR slave_cont1',
+''))
+slave-bin.000001 # Xid # # COMMIT /* XID */
+slave-bin.000001 # Gtid # # BEGIN GTID #-#-# cid=#
+slave-bin.000001 # Query # # use `test`; INSERT INTO t3 VALUES (4, foo(14,
+'commit_after_release_LOCK_prepare_ordered SIGNAL slave_queued2',
+''))
+slave-bin.000001 # Xid # # COMMIT /* XID */
+slave-bin.000001 # Gtid # # BEGIN GTID #-#-# cid=#
+slave-bin.000001 # Query # # use `test`; INSERT INTO t3 VALUES (6, foo(16,
+'group_commit_waiting_for_prior SIGNAL slave_queued3',
+''))
+slave-bin.000001 # Xid # # COMMIT /* XID */
+connection server_2;
+include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+include/start_slave.inc
+SET DEBUG_SYNC= 'RESET';
+connection server_1;
+DROP function foo;
+DROP TABLE t3;
+SET DEBUG_SYNC= 'RESET';
+include/rpl_end.inc
diff --git a/mysql-test/suite/binlog_encryption/rpl_parallel_single_grpcmt.test b/mysql-test/suite/binlog_encryption/rpl_parallel_single_grpcmt.test
new file mode 100644
index 00000000000..6a13735c29c
--- /dev/null
+++ b/mysql-test/suite/binlog_encryption/rpl_parallel_single_grpcmt.test
@@ -0,0 +1 @@
+--source suite/rpl/include/rpl_parallel_single_grpcmt.inc
diff --git a/mysql-test/suite/binlog_encryption/rpl_parallel_slave_bgc_kill.result b/mysql-test/suite/binlog_encryption/rpl_parallel_slave_bgc_kill.result
new file mode 100644
index 00000000000..320bf0e49f8
--- /dev/null
+++ b/mysql-test/suite/binlog_encryption/rpl_parallel_slave_bgc_kill.result
@@ -0,0 +1,323 @@
+*** Test killing slave threads at various wait points ***
+include/master-slave.inc
+[connection master]
+connection server_2;
+SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
+SET @old_parallel_mode=@@GLOBAL.slave_parallel_mode;
+include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=10;
+SET GLOBAL slave_parallel_mode='conservative';
+CHANGE MASTER TO master_use_gtid=slave_pos;
+include/start_slave.inc
+connection server_1;
+connect con_temp3,127.0.0.1,root,,test,$SERVER_MYPORT_1,;
+connect con_temp4,127.0.0.1,root,,test,$SERVER_MYPORT_1,;
+connect con_temp5,127.0.0.1,root,,test,$SERVER_MYPORT_1,;
+ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+CREATE TABLE t1 (a int PRIMARY KEY) ENGINE=MyISAM;
+CREATE TABLE t2 (a int PRIMARY KEY) ENGINE=InnoDB;
+CREATE TABLE t3 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB;
+connection server_2;
+connection server_1;
+SET sql_log_bin=0;
+CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
+RETURNS INT DETERMINISTIC
+BEGIN
+RETURN x;
+END
+||
+SET sql_log_bin=1;
+connection server_2;
+SET sql_log_bin=0;
+CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
+RETURNS INT DETERMINISTIC
+BEGIN
+IF d1 != '' THEN
+SET debug_sync = d1;
+END IF;
+IF d2 != '' THEN
+SET debug_sync = d2;
+END IF;
+RETURN x;
+END
+||
+SET sql_log_bin=1;
+*** 1. Test killing transaction waiting in commit for previous transaction to commit ***
+connection con_temp3;
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1';
+INSERT INTO t3 VALUES (31, foo(31,
+'commit_before_prepare_ordered WAIT_FOR t2_waiting',
+'commit_after_prepare_ordered SIGNAL t1_ready WAIT_FOR t1_cont'));
+connection server_1;
+SET debug_sync='now WAIT_FOR master_queued1';
+connection con_temp4;
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2';
+BEGIN;
+INSERT INTO t3 VALUES (32, foo(32,
+'ha_write_row_end SIGNAL t2_query WAIT_FOR t2_cont',
+''));
+INSERT INTO t3 VALUES (33, foo(33,
+'group_commit_waiting_for_prior SIGNAL t2_waiting',
+'group_commit_waiting_for_prior_killed SIGNAL t2_killed'));
+COMMIT;
+connection server_1;
+SET debug_sync='now WAIT_FOR master_queued2';
+connection con_temp5;
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued3';
+INSERT INTO t3 VALUES (34, foo(34,
+'',
+''));
+connection server_1;
+SET debug_sync='now WAIT_FOR master_queued3';
+SET debug_sync='now SIGNAL master_cont1';
+connection con_temp3;
+connection con_temp4;
+connection con_temp5;
+connection server_1;
+SELECT * FROM t3 WHERE a >= 30 ORDER BY a;
+a b
+31 31
+32 32
+33 33
+34 34
+SET debug_sync='RESET';
+connection server_2;
+SET sql_log_bin=0;
+CALL mtr.add_suppression("Query execution was interrupted");
+CALL mtr.add_suppression("Commit failed due to failure of an earlier commit on which this one depends");
+CALL mtr.add_suppression("Slave: Connection was killed");
+SET sql_log_bin=1;
+SET debug_sync='now WAIT_FOR t2_query';
+SET debug_sync='now SIGNAL t2_cont';
+SET debug_sync='now WAIT_FOR t1_ready';
+KILL THD_ID;
+SET debug_sync='now WAIT_FOR t2_killed';
+SET debug_sync='now SIGNAL t1_cont';
+include/wait_for_slave_sql_error.inc [errno=1317,1927,1964]
+STOP SLAVE IO_THREAD;
+SELECT * FROM t3 WHERE a >= 30 ORDER BY a;
+a b
+31 31
+SET debug_sync='RESET';
+SET GLOBAL slave_parallel_threads=0;
+SET GLOBAL slave_parallel_threads=10;
+SET sql_log_bin=0;
+DROP FUNCTION foo;
+CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
+RETURNS INT DETERMINISTIC
+BEGIN
+RETURN x;
+END
+||
+SET sql_log_bin=1;
+connection server_1;
+INSERT INTO t3 VALUES (39,0);
+connection server_2;
+include/start_slave.inc
+SELECT * FROM t3 WHERE a >= 30 ORDER BY a;
+a b
+31 31
+32 32
+33 33
+34 34
+39 0
+SET sql_log_bin=0;
+DROP FUNCTION foo;
+CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
+RETURNS INT DETERMINISTIC
+BEGIN
+IF d1 != '' THEN
+SET debug_sync = d1;
+END IF;
+IF d2 != '' THEN
+SET debug_sync = d2;
+END IF;
+RETURN x;
+END
+||
+SET sql_log_bin=1;
+connection server_2;
+include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=0;
+SET GLOBAL slave_parallel_threads=10;
+include/start_slave.inc
+*** 2. Same as (1), but without restarting IO thread after kill of SQL threads ***
+connection con_temp3;
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1';
+INSERT INTO t3 VALUES (41, foo(41,
+'commit_before_prepare_ordered WAIT_FOR t2_waiting',
+'commit_after_prepare_ordered SIGNAL t1_ready WAIT_FOR t1_cont'));
+connection server_1;
+SET debug_sync='now WAIT_FOR master_queued1';
+connection con_temp4;
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2';
+BEGIN;
+INSERT INTO t3 VALUES (42, foo(42,
+'ha_write_row_end SIGNAL t2_query WAIT_FOR t2_cont',
+''));
+INSERT INTO t3 VALUES (43, foo(43,
+'group_commit_waiting_for_prior SIGNAL t2_waiting',
+'group_commit_waiting_for_prior_killed SIGNAL t2_killed'));
+COMMIT;
+connection server_1;
+SET debug_sync='now WAIT_FOR master_queued2';
+connection con_temp5;
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued3';
+INSERT INTO t3 VALUES (44, foo(44,
+'',
+''));
+connection server_1;
+SET debug_sync='now WAIT_FOR master_queued3';
+SET debug_sync='now SIGNAL master_cont1';
+connection con_temp3;
+connection con_temp4;
+connection con_temp5;
+connection server_1;
+SELECT * FROM t3 WHERE a >= 40 ORDER BY a;
+a b
+41 41
+42 42
+43 43
+44 44
+SET debug_sync='RESET';
+connection server_2;
+SET debug_sync='now WAIT_FOR t2_query';
+SET debug_sync='now SIGNAL t2_cont';
+SET debug_sync='now WAIT_FOR t1_ready';
+KILL THD_ID;
+SET debug_sync='now WAIT_FOR t2_killed';
+SET debug_sync='now SIGNAL t1_cont';
+include/wait_for_slave_sql_error.inc [errno=1317,1927,1964]
+SET debug_sync='RESET';
+SET GLOBAL slave_parallel_threads=0;
+SET GLOBAL slave_parallel_threads=10;
+SET sql_log_bin=0;
+DROP FUNCTION foo;
+CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
+RETURNS INT DETERMINISTIC
+BEGIN
+RETURN x;
+END
+||
+SET sql_log_bin=1;
+connection server_1;
+INSERT INTO t3 VALUES (49,0);
+connection server_2;
+START SLAVE SQL_THREAD;
+SELECT * FROM t3 WHERE a >= 40 ORDER BY a;
+a b
+41 41
+42 42
+43 43
+44 44
+49 0
+SET sql_log_bin=0;
+DROP FUNCTION foo;
+CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
+RETURNS INT DETERMINISTIC
+BEGIN
+IF d1 != '' THEN
+SET debug_sync = d1;
+END IF;
+IF d2 != '' THEN
+SET debug_sync = d2;
+END IF;
+RETURN x;
+END
+||
+SET sql_log_bin=1;
+connection server_2;
+include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=0;
+SET GLOBAL slave_parallel_threads=10;
+include/start_slave.inc
+*** 3. Same as (2), but not using gtid mode ***
+connection server_2;
+include/stop_slave.inc
+CHANGE MASTER TO master_use_gtid=no;
+include/start_slave.inc
+connection server_1;
+connection con_temp3;
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1';
+INSERT INTO t3 VALUES (51, foo(51,
+'commit_before_prepare_ordered WAIT_FOR t2_waiting',
+'commit_after_prepare_ordered SIGNAL t1_ready WAIT_FOR t1_cont'));
+connection server_1;
+SET debug_sync='now WAIT_FOR master_queued1';
+connection con_temp4;
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2';
+BEGIN;
+INSERT INTO t3 VALUES (52, foo(52,
+'ha_write_row_end SIGNAL t2_query WAIT_FOR t2_cont',
+''));
+INSERT INTO t3 VALUES (53, foo(53,
+'group_commit_waiting_for_prior SIGNAL t2_waiting',
+'group_commit_waiting_for_prior_killed SIGNAL t2_killed'));
+COMMIT;
+connection server_1;
+SET debug_sync='now WAIT_FOR master_queued2';
+connection con_temp5;
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued3';
+INSERT INTO t3 VALUES (54, foo(54,
+'',
+''));
+connection server_1;
+SET debug_sync='now WAIT_FOR master_queued3';
+SET debug_sync='now SIGNAL master_cont1';
+connection con_temp3;
+connection con_temp4;
+connection con_temp5;
+connection server_1;
+SELECT * FROM t3 WHERE a >= 50 ORDER BY a;
+a b
+51 51
+52 52
+53 53
+54 54
+SET debug_sync='RESET';
+connection server_2;
+SET debug_sync='now WAIT_FOR t2_query';
+SET debug_sync='now SIGNAL t2_cont';
+SET debug_sync='now WAIT_FOR t1_ready';
+KILL THD_ID;
+SET debug_sync='now WAIT_FOR t2_killed';
+SET debug_sync='now SIGNAL t1_cont';
+include/wait_for_slave_sql_error.inc [errno=1317,1927,1964]
+SELECT * FROM t3 WHERE a >= 50 ORDER BY a;
+a b
+51 51
+SET debug_sync='RESET';
+SET GLOBAL slave_parallel_threads=0;
+SET GLOBAL slave_parallel_threads=10;
+SET sql_log_bin=0;
+DROP FUNCTION foo;
+CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
+RETURNS INT DETERMINISTIC
+BEGIN
+RETURN x;
+END
+||
+SET sql_log_bin=1;
+connection server_1;
+INSERT INTO t3 VALUES (59,0);
+connection server_2;
+START SLAVE SQL_THREAD;
+SELECT * FROM t3 WHERE a >= 50 ORDER BY a;
+a b
+51 51
+52 52
+53 53
+54 54
+59 0
+connection server_2;
+include/stop_slave.inc
+CHANGE MASTER TO master_use_gtid=slave_pos;
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+SET GLOBAL slave_parallel_mode=@old_parallel_mode;
+include/start_slave.inc
+SET DEBUG_SYNC= 'RESET';
+connection server_1;
+DROP function foo;
+DROP TABLE t1,t2,t3;
+SET DEBUG_SYNC= 'RESET';
+include/rpl_end.inc
diff --git a/mysql-test/suite/binlog_encryption/rpl_parallel_slave_bgc_kill.test b/mysql-test/suite/binlog_encryption/rpl_parallel_slave_bgc_kill.test
new file mode 100644
index 00000000000..72597f32685
--- /dev/null
+++ b/mysql-test/suite/binlog_encryption/rpl_parallel_slave_bgc_kill.test
@@ -0,0 +1 @@
+--source suite/rpl/include/rpl_parallel_slave_bgc_kill.inc
diff --git a/mysql-test/suite/binlog_encryption/rpl_parallel_stop_on_con_kill.result b/mysql-test/suite/binlog_encryption/rpl_parallel_stop_on_con_kill.result
new file mode 100644
index 00000000000..bf0ed9e4374
--- /dev/null
+++ b/mysql-test/suite/binlog_encryption/rpl_parallel_stop_on_con_kill.result
@@ -0,0 +1,102 @@
+*** MDEV-8031: Parallel replication stops on "connection killed" error (probably incorrectly handled deadlock kill) ***
+include/master-slave.inc
+[connection master]
+connection server_2;
+SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
+include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=10;
+CHANGE MASTER TO master_use_gtid=slave_pos;
+include/start_slave.inc
+connection server_1;
+ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+CREATE TABLE t3 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB;
+INSERT INTO t3 VALUES (201,0), (202,0);
+include/save_master_gtid.inc
+connection server_2;
+include/sync_with_master_gtid.inc
+include/stop_slave.inc
+SET @old_dbug= @@GLOBAL.debug_dbug;
+SET GLOBAL debug_dbug= '+d,inject_mdev8031';
+connection server_1;
+SET @old_dbug= @@SESSION.debug_dbug;
+SET SESSION debug_dbug="+d,binlog_force_commit_id";
+SET @commit_id= 10200;
+INSERT INTO t3 VALUES (203, 1);
+INSERT INTO t3 VALUES (204, 1);
+INSERT INTO t3 VALUES (205, 1);
+UPDATE t3 SET b=b+1 WHERE a=201;
+UPDATE t3 SET b=b+1 WHERE a=201;
+UPDATE t3 SET b=b+1 WHERE a=201;
+UPDATE t3 SET b=b+1 WHERE a=202;
+UPDATE t3 SET b=b+1 WHERE a=202;
+UPDATE t3 SET b=b+1 WHERE a=202;
+UPDATE t3 SET b=b+1 WHERE a=202;
+UPDATE t3 SET b=b+1 WHERE a=203;
+UPDATE t3 SET b=b+1 WHERE a=203;
+UPDATE t3 SET b=b+1 WHERE a=204;
+UPDATE t3 SET b=b+1 WHERE a=204;
+UPDATE t3 SET b=b+1 WHERE a=204;
+UPDATE t3 SET b=b+1 WHERE a=203;
+UPDATE t3 SET b=b+1 WHERE a=205;
+UPDATE t3 SET b=b+1 WHERE a=205;
+SET SESSION debug_dbug=@old_dbug;
+SELECT * FROM t3 WHERE a>=200 ORDER BY a;
+a b
+201 3
+202 4
+203 4
+204 4
+205 3
+include/save_master_gtid.inc
+connection server_2;
+include/start_slave.inc
+include/sync_with_master_gtid.inc
+SELECT * FROM t3 WHERE a>=200 ORDER BY a;
+a b
+201 3
+202 4
+203 4
+204 4
+205 3
+include/stop_slave.inc
+SET GLOBAL debug_dbug= @old_dbug;
+include/start_slave.inc
+*** Check getting deadlock killed inside open_binlog() during retry. ***
+connection server_2;
+include/stop_slave.inc
+SET @old_dbug= @@GLOBAL.debug_dbug;
+SET GLOBAL debug_dbug= '+d,inject_retry_event_group_open_binlog_kill';
+SET @old_max= @@GLOBAL.max_relay_log_size;
+SET GLOBAL max_relay_log_size= 4096;
+connection server_1;
+SET @old_dbug= @@SESSION.debug_dbug;
+SET SESSION debug_dbug="+d,binlog_force_commit_id";
+SET @commit_id= 10210;
+Omit long queries that cause relaylog rotations and transaction retries...
+SET SESSION debug_dbug=@old_dbug;
+SELECT * FROM t3 WHERE a>=200 ORDER BY a;
+a b
+201 6
+202 8
+203 7
+204 7
+205 5
+include/save_master_gtid.inc
+connection server_2;
+include/start_slave.inc
+include/sync_with_master_gtid.inc
+SELECT * FROM t3 WHERE a>=200 ORDER BY a;
+a b
+201 6
+202 8
+203 7
+204 7
+205 5
+include/stop_slave.inc
+SET GLOBAL debug_dbug= @old_debg;
+SET GLOBAL max_relay_log_size= @old_max;
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+include/start_slave.inc
+connection server_1;
+DROP TABLE t3;
+include/rpl_end.inc
diff --git a/mysql-test/suite/binlog_encryption/rpl_parallel_stop_on_con_kill.test b/mysql-test/suite/binlog_encryption/rpl_parallel_stop_on_con_kill.test
new file mode 100644
index 00000000000..adec2dc631c
--- /dev/null
+++ b/mysql-test/suite/binlog_encryption/rpl_parallel_stop_on_con_kill.test
@@ -0,0 +1 @@
+--source suite/rpl/include/rpl_parallel_stop_on_con_kill.inc
diff --git a/mysql-test/suite/binlog_encryption/rpl_parallel_stop_slave.result b/mysql-test/suite/binlog_encryption/rpl_parallel_stop_slave.result
new file mode 100644
index 00000000000..6c9fd168e73
--- /dev/null
+++ b/mysql-test/suite/binlog_encryption/rpl_parallel_stop_slave.result
@@ -0,0 +1,85 @@
+*** Test STOP SLAVE in parallel mode ***
+include/master-slave.inc
+[connection master]
+connection server_2;
+SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
+SET @old_parallel_mode=@@GLOBAL.slave_parallel_mode;
+include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=10;
+SET GLOBAL slave_parallel_mode='conservative';
+CHANGE MASTER TO master_use_gtid=slave_pos;
+include/start_slave.inc
+connect con_temp1,127.0.0.1,root,,test,$SERVER_MYPORT_2,;
+connect con_temp2,127.0.0.1,root,,test,$SERVER_MYPORT_2,;
+connection server_1;
+ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+CREATE TABLE t1 (a int PRIMARY KEY) ENGINE=MyISAM;
+CREATE TABLE t2 (a int PRIMARY KEY) ENGINE=InnoDB;
+CREATE TABLE t3 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB;
+connection server_2;
+include/stop_slave.inc
+connection server_1;
+SET binlog_direct_non_transactional_updates=0;
+SET sql_log_bin=0;
+CALL mtr.add_suppression("Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction");
+SET sql_log_bin=1;
+BEGIN;
+INSERT INTO t2 VALUES (20);
+INSERT INTO t1 VALUES (20);
+INSERT INTO t2 VALUES (21);
+INSERT INTO t3 VALUES (20, 20);
+COMMIT;
+INSERT INTO t3 VALUES(21, 21);
+INSERT INTO t3 VALUES(22, 22);
+connection con_temp1;
+BEGIN;
+INSERT INTO t2 VALUES (21);
+connection server_2;
+START SLAVE;
+connection con_temp2;
+SET @old_dbug= @@GLOBAL.debug_dbug;
+SET GLOBAL debug_dbug="+d,rpl_parallel_wait_for_done_trigger";
+STOP SLAVE;
+connection con_temp1;
+SET debug_sync='now WAIT_FOR wait_for_done_waiting';
+ROLLBACK;
+connection con_temp2;
+SET GLOBAL debug_dbug=@old_dbug;
+SET debug_sync='RESET';
+connection server_2;
+include/wait_for_slave_to_stop.inc
+SELECT * FROM t1 WHERE a >= 20 ORDER BY a;
+a
+20
+SELECT * FROM t2 WHERE a >= 20 ORDER BY a;
+a
+20
+21
+SELECT * FROM t3 WHERE a >= 20 ORDER BY a;
+a b
+20 20
+include/start_slave.inc
+SELECT * FROM t1 WHERE a >= 20 ORDER BY a;
+a
+20
+SELECT * FROM t2 WHERE a >= 20 ORDER BY a;
+a
+20
+21
+SELECT * FROM t3 WHERE a >= 20 ORDER BY a;
+a b
+20 20
+21 21
+22 22
+connection server_2;
+include/stop_slave.inc
+SET GLOBAL slave_parallel_mode=@old_parallel_mode;
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+include/start_slave.inc
+SET DEBUG_SYNC= 'RESET';
+disconnect con_temp1;
+disconnect con_temp2;
+connection server_1;
+DROP TABLE t1,t2,t3;
+SET DEBUG_SYNC= 'RESET';
+include/rpl_end.inc
diff --git a/mysql-test/suite/binlog_encryption/rpl_parallel_stop_slave.test b/mysql-test/suite/binlog_encryption/rpl_parallel_stop_slave.test
new file mode 100644
index 00000000000..c59b2805569
--- /dev/null
+++ b/mysql-test/suite/binlog_encryption/rpl_parallel_stop_slave.test
@@ -0,0 +1 @@
+--source suite/rpl/include/rpl_parallel_stop_slave.inc
diff --git a/mysql-test/suite/binlog_encryption/rpl_parallel_wrong_binlog_order.result b/mysql-test/suite/binlog_encryption/rpl_parallel_wrong_binlog_order.result
new file mode 100644
index 00000000000..f6781f64d30
--- /dev/null
+++ b/mysql-test/suite/binlog_encryption/rpl_parallel_wrong_binlog_order.result
@@ -0,0 +1,75 @@
+*** MDEV-6775: Wrong binlog order in parallel replication ***
+include/master-slave.inc
+[connection master]
+connection server_2;
+SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
+include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=10;
+CHANGE MASTER TO master_use_gtid=slave_pos;
+include/start_slave.inc
+connection server_1;
+ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+CREATE TABLE t4 (a INT PRIMARY KEY, b INT, KEY b_idx(b)) ENGINE=InnoDB;
+INSERT INTO t4 VALUES (1,NULL), (3,NULL), (4,4), (5, NULL), (6, 6);
+connect con1,127.0.0.1,root,,test,$SERVER_MYPORT_1,;
+connect con2,127.0.0.1,root,,test,$SERVER_MYPORT_1,;
+include/save_master_gtid.inc
+connection server_2;
+include/sync_with_master_gtid.inc
+include/stop_slave.inc
+SET @old_dbug= @@GLOBAL.debug_dbug;
+SET GLOBAL debug_dbug="+d,inject_binlog_commit_before_get_LOCK_log";
+SET @old_format=@@GLOBAL.binlog_format;
+SET GLOBAL binlog_format=ROW;
+SET GLOBAL slave_parallel_threads=0;
+SET GLOBAL slave_parallel_threads=10;
+connection con1;
+SET @old_format= @@binlog_format;
+SET binlog_format= statement;
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1';
+UPDATE t4 SET b=NULL WHERE a=6;
+connection server_1;
+SET debug_sync='now WAIT_FOR master_queued1';
+connection con2;
+SET @old_format= @@binlog_format;
+SET binlog_format= statement;
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2';
+DELETE FROM t4 WHERE b <= 3;
+connection server_1;
+SET debug_sync='now WAIT_FOR master_queued2';
+SET debug_sync='now SIGNAL master_cont1';
+connection con1;
+SET binlog_format= @old_format;
+connection con2;
+SET binlog_format= @old_format;
+SET debug_sync='RESET';
+SELECT * FROM t4 ORDER BY a;
+a b
+1 NULL
+3 NULL
+4 4
+5 NULL
+6 NULL
+connection server_2;
+include/start_slave.inc
+SET debug_sync= 'now WAIT_FOR waiting';
+SELECT * FROM t4 ORDER BY a;
+a b
+1 NULL
+3 NULL
+4 4
+5 NULL
+6 NULL
+SET debug_sync= 'now SIGNAL cont';
+include/stop_slave.inc
+SET GLOBAL debug_dbug=@old_dbug;
+SET GLOBAL binlog_format= @old_format;
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+include/start_slave.inc
+SET DEBUG_SYNC= 'RESET';
+connection server_1;
+DROP TABLE t4;
+SET DEBUG_SYNC= 'RESET';
+disconnect con1;
+disconnect con2;
+include/rpl_end.inc
diff --git a/mysql-test/suite/binlog_encryption/rpl_parallel_wrong_binlog_order.test b/mysql-test/suite/binlog_encryption/rpl_parallel_wrong_binlog_order.test
new file mode 100644
index 00000000000..4141dfce6d6
--- /dev/null
+++ b/mysql-test/suite/binlog_encryption/rpl_parallel_wrong_binlog_order.test
@@ -0,0 +1 @@
+--source suite/rpl/include/rpl_parallel_wrong_binlog_order.inc
diff --git a/mysql-test/suite/binlog_encryption/rpl_parallel_wrong_exec_master_pos.result b/mysql-test/suite/binlog_encryption/rpl_parallel_wrong_exec_master_pos.result
new file mode 100644
index 00000000000..47cfa5e08e2
--- /dev/null
+++ b/mysql-test/suite/binlog_encryption/rpl_parallel_wrong_exec_master_pos.result
@@ -0,0 +1,34 @@
+*** MDEV-5938: Exec_master_log_pos not updated at log rotate in parallel replication ***
+include/master-slave.inc
+[connection master]
+connection server_2;
+include/stop_slave.inc
+SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
+SET GLOBAL slave_parallel_threads=1;
+CHANGE MASTER TO master_use_gtid=slave_pos;
+include/start_slave.inc
+connection server_1;
+ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+CREATE TABLE t5 (a INT PRIMARY KEY, b INT);
+INSERT INTO t5 VALUES (1,1);
+INSERT INTO t5 VALUES (2,2), (3,8);
+INSERT INTO t5 VALUES (4,16);
+connection server_2;
+test_check
+OK
+test_check
+OK
+connection server_1;
+FLUSH LOGS;
+connection server_2;
+test_check
+OK
+test_check
+OK
+connection server_2;
+include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+include/start_slave.inc
+connection server_1;
+DROP TABLE t5;
+include/rpl_end.inc
diff --git a/mysql-test/suite/binlog_encryption/rpl_parallel_wrong_exec_master_pos.test b/mysql-test/suite/binlog_encryption/rpl_parallel_wrong_exec_master_pos.test
new file mode 100644
index 00000000000..34268eb6622
--- /dev/null
+++ b/mysql-test/suite/binlog_encryption/rpl_parallel_wrong_exec_master_pos.test
@@ -0,0 +1 @@
+--source suite/rpl/include/rpl_parallel_wrong_exec_master_pos.inc
diff --git a/mysql-test/suite/binlog_encryption/rpl_skip_replication.result b/mysql-test/suite/binlog_encryption/rpl_skip_replication.result
index ded85f3edd5..59d5b50e5cc 100644
--- a/mysql-test/suite/binlog_encryption/rpl_skip_replication.result
+++ b/mysql-test/suite/binlog_encryption/rpl_skip_replication.result
@@ -7,7 +7,7 @@ SELECT,UPDATE ON *.* TO 'nonsuperuser'@'127.0.0.1';
connect nonpriv, 127.0.0.1, nonsuperuser,, test, $SLAVE_MYPORT,;
connection nonpriv;
SET GLOBAL replicate_events_marked_for_skip=FILTER_ON_MASTER;
-ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
+ERROR 42000: Access denied; you need (at least one of) the SUPER, REPLICATION SLAVE ADMIN privilege(s) for this operation
disconnect nonpriv;
connection slave;
DROP USER'nonsuperuser'@'127.0.0.1';
diff --git a/mysql-test/suite/client/mariadb-conv-cp932.result b/mysql-test/suite/client/mariadb-conv-cp932.result
new file mode 100644
index 00000000000..efa428b9dde
--- /dev/null
+++ b/mysql-test/suite/client/mariadb-conv-cp932.result
@@ -0,0 +1,49 @@
+#
+# MDEV-17088 Provide tools to encode/decode mysql-encoded file system names
+#
+SET NAMES cp932;
+@6e2c@8a66@8cc7@6599
+‘ªŽŽŽ‘—¿ŒÉ
+@6e2c@8a66@8cc7@6599
+‘ªŽŽŽ‘—¿
+‘ªŽŽŽ‘—¿ŒÉ
+@6e2c@8a66@8cc7@6599@5eab
+# bulk convert with pipe
+CREATE TABLE t1 (id SERIAL, a VARCHAR(64) CHARACTER SET cp932);
+INSERT INTO t1 (a) VALUES ('‘ªŽŽŽ‘—¿'), ('‘ªŽŽŽ‘—¿2');
+a
+@6e2c@8a66@8cc7@6599
+@6e2c@8a66@8cc7@65992
+BINARY CONVERT(a USING filename)
+@6e2c@8a66@8cc7@6599
+@6e2c@8a66@8cc7@65992
+‘ªŽŽŽ‘—¿
+‘ªŽŽŽ‘—¿2
+test/‘ªŽŽŽ‘—¿.frm
+test/‘ªŽŽŽ‘—¿2.frm
+test/‘ªŽŽŽ‘—¿.frm
+test/‘ªŽŽŽ‘—¿2.frm
+DROP TABLE t1;
+# bulk convert with file
+# --- Start of mariadb-conv for mysql-conv-test-cp932.txt ---
+
+@6e2c@8a66@8cc7@6599
+
+@6e2c@8a66@8cc7@65992
+@6e2c@8a66@8cc7@65993
+
+# --- End of mariadb-conv for mysql-conv-test-cp932.txt ---
+# --- Start of mariadb-conv for mysql-conv-test-cp932.txt and mysql-conv-test-cp932-2.txt ---
+
+@6e2c@8a66@8cc7@6599
+
+@6e2c@8a66@8cc7@65992
+@6e2c@8a66@8cc7@65993
+
+
+@6e2c@8a66@8cc7@6599
+
+@6e2c@8a66@8cc7@65992
+@6e2c@8a66@8cc7@65993
+
+# --- Start of mariadb-conv for mysql-conv-test-cp932.txt and mysql-conv-test-cp932-2.txt ---
diff --git a/mysql-test/suite/client/mariadb-conv-cp932.test b/mysql-test/suite/client/mariadb-conv-cp932.test
new file mode 100644
index 00000000000..1a9263b3f90
--- /dev/null
+++ b/mysql-test/suite/client/mariadb-conv-cp932.test
@@ -0,0 +1,57 @@
+-- source include/not_embedded.inc
+
+--echo #
+--echo # MDEV-17088 Provide tools to encode/decode mysql-encoded file system names
+--echo #
+
+--character_set cp932
+SET NAMES cp932;
+
+--let $MYSQLD_DATADIR= `select @@datadir`
+
+# simple I/O
+--exec echo "‘ªŽŽŽ‘—¿" | $MARIADB_CONV -f cp932 -t filename --delimiter="\r\n"
+--exec echo "@6e2c@8a66@8cc7@6599@5eab" | $MARIADB_CONV -f filename -t cp932 --delimiter="\r\n"
+
+# undo query result
+--let $query_result=`SELECT CONVERT(CONVERT('‘ªŽŽŽ‘—¿' USING filename) USING binary);`
+--echo $query_result
+--exec echo $query_result | $MARIADB_CONV -f filename -t cp932 --delimiter="\r\n"
+
+--let $reverse_query_result=`SELECT CONVERT(_filename '@6e2c@8a66@8cc7@6599@5eab' USING cp932);`
+--echo $reverse_query_result
+--exec echo $reverse_query_result | $MARIADB_CONV -f cp932 -t filename --delimiter="\r\n"
+
+--echo # bulk convert with pipe
+
+CREATE TABLE t1 (id SERIAL, a VARCHAR(64) CHARACTER SET cp932);
+INSERT INTO t1 (a) VALUES ('‘ªŽŽŽ‘—¿'), ('‘ªŽŽŽ‘—¿2');
+--exec $MYSQL -Dtest --default-character-set=cp932 -e "SELECT a FROM t1 ORDER BY id" | $MARIADB_CONV -f cp932 -t filename --delimiter="\r\n"
+--exec $MYSQL -Dtest --default-character-set=cp932 -e "SELECT BINARY CONVERT(a USING filename) FROM t1 ORDER BY id"
+--exec $MYSQL -Dtest --default-character-set=cp932 --column-names=0 -e "SELECT BINARY CONVERT(a USING filename) FROM t1 ORDER BY id" | $MARIADB_CONV -f filename -t cp932 --delimiter="\r\n"
+--exec $MYSQL -Dtest --default-character-set=cp932 --column-names=0 -e "SELECT CONCAT('test/', BINARY CONVERT(a USING filename),'.frm') FROM t1 ORDER BY id" | $REPLACE "/" "@002f" "." "@002e"| $MARIADB_CONV -f filename -t cp932 --delimiter="\r\n"
+--exec $MYSQL -Dtest --default-character-set=cp932 --column-names=0 -e "SELECT CONCAT('test/', BINARY CONVERT(a USING filename),'.frm') FROM t1 ORDER BY id" | $MARIADB_CONV -f filename -t cp932 --delimiter="/.\r\n"
+DROP TABLE t1;
+
+
+--echo # bulk convert with file
+--write_file $MYSQL_TMP_DIR/mysql-conv-test-cp932.txt
+
+‘ªŽŽŽ‘—¿
+
+‘ªŽŽŽ‘—¿2
+‘ªŽŽŽ‘—¿3
+
+EOF
+
+--echo # --- Start of mariadb-conv for mysql-conv-test-cp932.txt ---
+--exec $MARIADB_CONV -f cp932 -t filename --delimiter="\r\n" $MYSQL_TMP_DIR/mysql-conv-test-cp932.txt
+--echo # --- End of mariadb-conv for mysql-conv-test-cp932.txt ---
+
+--copy_file $MYSQL_TMP_DIR/mysql-conv-test-cp932.txt $MYSQL_TMP_DIR/mysql-conv-test-cp932-2.txt
+--echo # --- Start of mariadb-conv for mysql-conv-test-cp932.txt and mysql-conv-test-cp932-2.txt ---
+--exec $MARIADB_CONV -f cp932 -t filename --delimiter="\r\n" $MYSQL_TMP_DIR/mysql-conv-test-cp932.txt $MYSQL_TMP_DIR/mysql-conv-test-cp932-2.txt
+--echo # --- Start of mariadb-conv for mysql-conv-test-cp932.txt and mysql-conv-test-cp932-2.txt ---
+
+--remove_file $MYSQL_TMP_DIR/mysql-conv-test-cp932.txt
+--remove_file $MYSQL_TMP_DIR/mysql-conv-test-cp932-2.txt
diff --git a/mysql-test/suite/client/mariadb-conv-utf16.result b/mysql-test/suite/client/mariadb-conv-utf16.result
new file mode 100644
index 00000000000..76b98ef81ce
--- /dev/null
+++ b/mysql-test/suite/client/mariadb-conv-utf16.result
@@ -0,0 +1,13 @@
+#
+# MDEV-17088 Provide tools to encode/decode mysql-encoded file system names
+#
+SET NAMES utf8;
+# Bad delimiter
+--delimiter cannot be used with utf16 to utf8 conversion
+# Bad delimiter
+--delimiter cannot be used with utf8 to utf16 conversion
+# Start of file01.utf16.txt
+aaa
+xxxÑÑÑxxx
+bbb
+# End of file01.utf16.txt
diff --git a/mysql-test/suite/client/mariadb-conv-utf16.test b/mysql-test/suite/client/mariadb-conv-utf16.test
new file mode 100644
index 00000000000..98f9e8d28f1
--- /dev/null
+++ b/mysql-test/suite/client/mariadb-conv-utf16.test
@@ -0,0 +1,21 @@
+-- source include/have_utf16.inc
+-- source include/not_embedded.inc
+
+--echo #
+--echo # MDEV-17088 Provide tools to encode/decode mysql-encoded file system names
+--echo #
+
+--character_set utf8
+SET NAMES utf8;
+
+--echo # Bad delimiter
+--error 1
+--exec $MARIADB_CONV -f utf16 -t utf8 --delimiter="\r\n" $MYSQL_TEST_DIR/std_data/mariadb-conv/file01.utf16.txt 2>&1
+
+--echo # Bad delimiter
+--error 1
+--exec $MARIADB_CONV -f utf8 -t utf16 --delimiter="\r\n" $MYSQL_TEST_DIR/std_data/mariadb-conv/file01.utf8.txt 2>&1
+
+--echo # Start of file01.utf16.txt
+--exec $MARIADB_CONV -f utf16 -t utf8 $MYSQL_TEST_DIR/std_data/mariadb-conv/file01.utf16.txt 2>&1
+--echo # End of file01.utf16.txt
diff --git a/mysql-test/suite/client/mariadb-conv-utf8.result b/mysql-test/suite/client/mariadb-conv-utf8.result
new file mode 100644
index 00000000000..cae8268d523
--- /dev/null
+++ b/mysql-test/suite/client/mariadb-conv-utf8.result
@@ -0,0 +1,49 @@
+#
+# MDEV-17088 Provide tools to encode/decode mysql-encoded file system names
+#
+SET NAMES utf8;
+@6e2c@8a66@8cc7@6599
+測試資料庫
+@6e2c@8a66@8cc7@6599
+測試資料
+測試資料庫
+@6e2c@8a66@8cc7@6599@5eab
+# bulk convert with pipe
+CREATE TABLE t1 (id SERIAL, a VARCHAR(64) CHARACTER SET utf8);
+INSERT INTO t1 (a) VALUES ('測試資料'), ('測試資料2');
+a
+@6e2c@8a66@8cc7@6599
+@6e2c@8a66@8cc7@65992
+BINARY CONVERT(a USING filename)
+@6e2c@8a66@8cc7@6599
+@6e2c@8a66@8cc7@65992
+測試資料
+測試資料2
+test/測試資料.frm
+test/測試資料2.frm
+test/測試資料.frm
+test/測試資料2.frm
+DROP TABLE t1;
+# bulk convert with file
+# --- Start of mariadb-conv for mysql-conv-test-utf8.txt ---
+
+@6e2c@8a66@8cc7@6599
+
+@6e2c@8a66@8cc7@65992
+@6e2c@8a66@8cc7@65993
+
+# --- End of mariadb-conv for mysql-conv-test-utf8.txt ---
+# --- Start of mariadb-conv for mysql-conv-test-utf8.txt and mysql-conv-test-utf8-2.txt ---
+
+@6e2c@8a66@8cc7@6599
+
+@6e2c@8a66@8cc7@65992
+@6e2c@8a66@8cc7@65993
+
+
+@6e2c@8a66@8cc7@6599
+
+@6e2c@8a66@8cc7@65992
+@6e2c@8a66@8cc7@65993
+
+# --- Start of mariadb-conv for mysql-conv-test-utf8.txt and mysql-conv-test-utf8-2.txt ---
diff --git a/mysql-test/suite/client/mariadb-conv-utf8.test b/mysql-test/suite/client/mariadb-conv-utf8.test
new file mode 100644
index 00000000000..5002aadd6e9
--- /dev/null
+++ b/mysql-test/suite/client/mariadb-conv-utf8.test
@@ -0,0 +1,57 @@
+-- source include/not_embedded.inc
+
+--echo #
+--echo # MDEV-17088 Provide tools to encode/decode mysql-encoded file system names
+--echo #
+
+--character_set utf8
+SET NAMES utf8;
+
+--let $MYSQLD_DATADIR= `select @@datadir`
+
+# simple I/O
+--exec echo "測試資料" | $MARIADB_CONV -f utf8 -t filename --delimiter="\r\n"
+--exec echo "@6e2c@8a66@8cc7@6599@5eab" | $MARIADB_CONV -f filename -t utf8 --delimiter="\r\n"
+
+# undo query result
+--let $query_result=`SELECT CONVERT(CONVERT('測試資料' USING filename) USING binary);`
+--echo $query_result
+--exec echo $query_result | $MARIADB_CONV -f filename -t utf8 --delimiter="\r\n"
+
+--let $reverse_query_result=`SELECT CONVERT(_filename '@6e2c@8a66@8cc7@6599@5eab' USING utf8);`
+--echo $reverse_query_result
+--exec echo $reverse_query_result | $MARIADB_CONV -f utf8 -t filename --delimiter="\r\n"
+
+--echo # bulk convert with pipe
+
+CREATE TABLE t1 (id SERIAL, a VARCHAR(64) CHARACTER SET utf8);
+INSERT INTO t1 (a) VALUES ('測試資料'), ('測試資料2');
+--exec $MYSQL -Dtest --default-character-set=utf8 -e "SELECT a FROM t1 ORDER BY id" | $MARIADB_CONV -f utf8 -t filename --delimiter="\r\n"
+--exec $MYSQL -Dtest --default-character-set=utf8 -e "SELECT BINARY CONVERT(a USING filename) FROM t1 ORDER BY id"
+--exec $MYSQL -Dtest --default-character-set=utf8 --column-names=0 -e "SELECT BINARY CONVERT(a USING filename) FROM t1 ORDER BY id" | $MARIADB_CONV -f filename -t utf8 --delimiter="\r\n"
+--exec $MYSQL -Dtest --default-character-set=utf8 --column-names=0 -e "SELECT CONCAT('test/', BINARY CONVERT(a USING filename),'.frm') FROM t1 ORDER BY id" | $REPLACE "/" "@002f" "." "@002e"| $MARIADB_CONV -f filename -t utf8 --delimiter="\r\n"
+--exec $MYSQL -Dtest --default-character-set=utf8 --column-names=0 -e "SELECT CONCAT('test/', BINARY CONVERT(a USING filename),'.frm') FROM t1 ORDER BY id" | $MARIADB_CONV -f filename -t utf8 --delimiter="/.\r\n"
+DROP TABLE t1;
+
+
+--echo # bulk convert with file
+--write_file $MYSQL_TMP_DIR/mysql-conv-test-utf8.txt
+
+測試資料
+
+測試資料2
+測試資料3
+
+EOF
+
+--echo # --- Start of mariadb-conv for mysql-conv-test-utf8.txt ---
+--exec $MARIADB_CONV -f utf8 -t filename --delimiter="\r\n" $MYSQL_TMP_DIR/mysql-conv-test-utf8.txt
+--echo # --- End of mariadb-conv for mysql-conv-test-utf8.txt ---
+
+--copy_file $MYSQL_TMP_DIR/mysql-conv-test-utf8.txt $MYSQL_TMP_DIR/mysql-conv-test-utf8-2.txt
+--echo # --- Start of mariadb-conv for mysql-conv-test-utf8.txt and mysql-conv-test-utf8-2.txt ---
+--exec $MARIADB_CONV -f utf8 -t filename --delimiter="\r\n" $MYSQL_TMP_DIR/mysql-conv-test-utf8.txt $MYSQL_TMP_DIR/mysql-conv-test-utf8-2.txt
+--echo # --- Start of mariadb-conv for mysql-conv-test-utf8.txt and mysql-conv-test-utf8-2.txt ---
+
+--remove_file $MYSQL_TMP_DIR/mysql-conv-test-utf8.txt
+--remove_file $MYSQL_TMP_DIR/mysql-conv-test-utf8-2.txt
diff --git a/mysql-test/suite/client/mariadb-conv.result b/mysql-test/suite/client/mariadb-conv.result
new file mode 100644
index 00000000000..432be04daae
--- /dev/null
+++ b/mysql-test/suite/client/mariadb-conv.result
@@ -0,0 +1,25 @@
+#
+# MDEV-17088 Provide tools to encode/decode mysql-encoded file system names
+#
+# default encoding
+t1
+t1
+t1
+# invalid option
+mariadb-conv: unknown option '-r'
+# unknown "to" character set
+Character set unknown-cs is not supported
+# unknown "from" character set
+Character set unknown-cs is not supported
+# Bad delimiter
+Bad --delimiter value
+# Conversion error
+Conversion from utf8 to latin1 failed at position 7
+aaa
+xxx???xxx
+bbb
+# Bad input character
+Illegal utf8 byte sequence at position 7
+aaa
+xxx???xxx
+bbb
diff --git a/mysql-test/suite/client/mariadb-conv.test b/mysql-test/suite/client/mariadb-conv.test
new file mode 100644
index 00000000000..2be758b6fcf
--- /dev/null
+++ b/mysql-test/suite/client/mariadb-conv.test
@@ -0,0 +1,39 @@
+--echo #
+--echo # MDEV-17088 Provide tools to encode/decode mysql-encoded file system names
+--echo #
+
+--character_set latin1
+
+--echo # default encoding
+--exec echo "t1" | $MARIADB_CONV
+--exec echo "t1" | $MARIADB_CONV -f filename --delimiter="\r\n"
+--exec echo "t1" | $MARIADB_CONV -t filename --delimiter="\r\n"
+
+--echo # invalid option
+--replace_regex /.*mariadb-conv.*: unknown/mariadb-conv: unknown/
+--error 1
+--exec echo "t1" | $MARIADB_CONV -f filename -r latin1 2>&1 > /dev/null
+
+--echo # unknown "to" character set
+--replace_regex /.*mariadb-conv.*: unknown/mariadb-conv: unknown/
+--error 1
+--exec echo "t1" | $MARIADB_CONV -f filename -t unknown-cs 2>&1 > /dev/null
+
+--echo # unknown "from" character set
+--replace_regex /.*mariadb-conv.*: unknown/mariadb-conv: unknown/
+--error 1
+--exec echo "t1" | $MARIADB_CONV -f unknown-cs -t latin1 2>&1 > /dev/null
+
+--echo # Bad delimiter
+--error 1
+--exec echo "t1" | $MARIADB_CONV --delimiter="\x" 2>&1 > /dev/null
+
+--echo # Conversion error
+--error 1
+--exec $MARIADB_CONV -f utf8 -t latin1 < $MYSQL_TEST_DIR/std_data/mariadb-conv/file01.utf8.txt 2>&1
+--exec $MARIADB_CONV -f utf8 -t latin1 -c < $MYSQL_TEST_DIR/std_data/mariadb-conv/file01.utf8.txt 2>&1
+
+--echo # Bad input character
+--error 1
+--exec $MARIADB_CONV -f utf8 -t latin1 < $MYSQL_TEST_DIR/std_data/mariadb-conv/file02.latin1.txt 2>&1
+--exec $MARIADB_CONV -f utf8 -t latin1 -c < $MYSQL_TEST_DIR/std_data/mariadb-conv/file02.latin1.txt 2>&1
diff --git a/mysql-test/suite/compat/oracle/r/gis-debug.result b/mysql-test/suite/compat/oracle/r/gis-debug.result
new file mode 100644
index 00000000000..9ab74e6e579
--- /dev/null
+++ b/mysql-test/suite/compat/oracle/r/gis-debug.result
@@ -0,0 +1,24 @@
+SET sql_mode=ORACLE;
+#
+# Start of 10.5 tests
+#
+#
+# MDEV-19994 Add class Function_collection
+#
+SET SESSION debug_dbug="+d,make_item_func_call_native_simulate_not_found";
+SELECT CONTAINS(POINT(1,1),POINT(1,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 '(POINT(1,1),POINT(1,1))' at line 1
+SELECT WITHIN(POINT(1,1),POINT(1,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 '(POINT(1,1),POINT(1,1))' at line 1
+SET SESSION debug_dbug="-d,make_item_func_call_native_simulate_not_found";
+#
+# MDEV-20009 Add CAST(expr AS pluggable_type)
+#
+SET SESSION debug_dbug="+d,emulate_geometry_create_typecast_item";
+SELECT AsText(CAST('POINT(0 0)' AS GEOMETRY));
+AsText(CAST('POINT(0 0)' AS GEOMETRY))
+POINT(0 0)
+SET SESSION debug_dbug="-d,emulate_geometry_create_typecast_item";
+#
+# End of 10.5 tests
+#
diff --git a/mysql-test/suite/compat/oracle/r/gis.result b/mysql-test/suite/compat/oracle/r/gis.result
index ebd56a089ad..113cb0ea402 100644
--- a/mysql-test/suite/compat/oracle/r/gis.result
+++ b/mysql-test/suite/compat/oracle/r/gis.result
@@ -1,6 +1,69 @@
+SET sql_mode=ORACLE;
+SELECT CONTAINS(POINT(1,1), POINT(1,1));
+CONTAINS(POINT(1,1), POINT(1,1))
+1
+SELECT CONTAINS(POINT(1,1), POINT(0,0));
+CONTAINS(POINT(1,1), POINT(0,0))
+0
SELECT WITHIN(POINT(1,1), POINT(1,1));
WITHIN(POINT(1,1), POINT(1,1))
1
SELECT WITHIN(POINT(1,1), POINT(0,0));
WITHIN(POINT(1,1), POINT(0,0))
0
+#
+# Start of 10.5 tests
+#
+#
+# MDEV-19994 Add class Function_collection
+#
+SELECT CONTAINS();
+ERROR 42000: Incorrect parameter count in the call to native function 'CONTAINS()'
+SELECT CONTAINS(POINT(1,1));
+ERROR 42000: Incorrect parameter count in the call to native function 'CONTAINS(POINT(1,1))'
+SELECT CONTAINS(POINT(1,1), POINT(1,1), POINT(1,1));
+ERROR 42000: Incorrect parameter count in the call to native function 'CONTAINS(POINT(1,1), POINT(1,1), POINT(1,1))'
+SELECT WITHIN();
+ERROR 42000: Incorrect parameter count in the call to native function 'WITHIN()'
+SELECT WITHIN(POINT(1,1));
+ERROR 42000: Incorrect parameter count in the call to native function 'WITHIN(POINT(1,1))'
+SELECT WITHIN(POINT(1,1), POINT(1,1), POINT(1,1));
+ERROR 42000: Incorrect parameter count in the call to native function 'WITHIN(POINT(1,1), POINT(1,1), POINT(1,1))'
+#
+# MDEV-20009 Add CAST(expr AS pluggable_type)
+#
+SELECT CAST(1 AS GEOMETRY);
+ERROR HY000: Operator does not exists: 'CAST(expr AS geometry)'
+SELECT CAST(1 AS GEOMETRYCOLLECTION);
+ERROR HY000: Operator does not exists: 'CAST(expr AS geometrycollection)'
+SELECT CAST(1 AS POINT);
+ERROR HY000: Operator does not exists: 'CAST(expr AS point)'
+SELECT CAST(1 AS LINESTRING);
+ERROR HY000: Operator does not exists: 'CAST(expr AS linestring)'
+SELECT CAST(1 AS POLYGON);
+ERROR HY000: Operator does not exists: 'CAST(expr AS polygon)'
+SELECT CAST(1 AS MULTIPOINT);
+ERROR HY000: Operator does not exists: 'CAST(expr AS multipoint)'
+SELECT CAST(1 AS MULTILINESTRING);
+ERROR HY000: Operator does not exists: 'CAST(expr AS multilinestring)'
+SELECT CAST(1 AS MULTIPOLYGON);
+ERROR HY000: Operator does not exists: 'CAST(expr AS multipolygon)'
+SELECT CONVERT(1, GEOMETRY);
+ERROR HY000: Operator does not exists: 'CAST(expr AS geometry)'
+SELECT CONVERT(1, GEOMETRYCOLLECTION);
+ERROR HY000: Operator does not exists: 'CAST(expr AS geometrycollection)'
+SELECT CONVERT(1, POINT);
+ERROR HY000: Operator does not exists: 'CAST(expr AS point)'
+SELECT CONVERT(1, LINESTRING);
+ERROR HY000: Operator does not exists: 'CAST(expr AS linestring)'
+SELECT CONVERT(1, POLYGON);
+ERROR HY000: Operator does not exists: 'CAST(expr AS polygon)'
+SELECT CONVERT(1, MULTIPOINT);
+ERROR HY000: Operator does not exists: 'CAST(expr AS multipoint)'
+SELECT CONVERT(1, MULTILINESTRING);
+ERROR HY000: Operator does not exists: 'CAST(expr AS multilinestring)'
+SELECT CONVERT(1, MULTIPOLYGON);
+ERROR HY000: Operator does not exists: 'CAST(expr AS multipolygon)'
+#
+# End of 10.5 tests
+#
diff --git a/mysql-test/suite/compat/oracle/r/parser.result b/mysql-test/suite/compat/oracle/r/parser.result
index 2d9416d59c1..3f02382b6e4 100644
--- a/mysql-test/suite/compat/oracle/r/parser.result
+++ b/mysql-test/suite/compat/oracle/r/parser.result
@@ -758,3 +758,51 @@ call p1(1,2);
drop procedure p1;
drop table t1,t2;
# End of 10.4 tests
+#
+# Start of 10.5 tests
+#
+#
+# MDEV-20734 Allow reserved keywords as user defined type names
+#
+CREATE TABLE t1 (a DUAL);
+ERROR HY000: Unknown data type: 'DUAL'
+SELECT CAST(1 AS DUAL);
+ERROR HY000: Unknown data type: 'DUAL'
+#
+# MDEV-20735 Allow non-reserved keywords as user defined type names
+#
+CREATE TABLE t1 (a ASCII);
+ERROR HY000: Unknown data type: 'ASCII'
+SELECT CAST(1 AS ASCII);
+ERROR HY000: Unknown data type: 'ASCII'
+CREATE TABLE t1 (a LANGUAGE);
+ERROR HY000: Unknown data type: 'LANGUAGE'
+SELECT CAST(1 AS LANGUAGE);
+ERROR HY000: Unknown data type: 'LANGUAGE'
+CREATE TABLE t1 (a CLOSE);
+ERROR HY000: Unknown data type: 'CLOSE'
+SELECT CAST(1 AS CLOSE);
+ERROR HY000: Unknown data type: 'CLOSE'
+CREATE TABLE t1 (a NAMES);
+ERROR HY000: Unknown data type: 'NAMES'
+SELECT CAST(1 AS NAMES);
+ERROR HY000: Unknown data type: 'NAMES'
+CREATE TABLE t1 (a END);
+ERROR HY000: Unknown data type: 'END'
+SELECT CAST(1 AS END);
+ERROR HY000: Unknown data type: 'END'
+CREATE TABLE t1 (a GLOBAL);
+ERROR HY000: Unknown data type: 'GLOBAL'
+SELECT CAST(1 AS GLOBAL);
+ERROR HY000: Unknown data type: 'GLOBAL'
+CREATE TABLE t1 (a ACTION);
+ERROR HY000: Unknown data type: 'ACTION'
+SELECT CAST(1 AS ACTION);
+ERROR HY000: Unknown data type: 'ACTION'
+CREATE TABLE t1 (a BEGIN);
+ERROR HY000: Unknown data type: 'BEGIN'
+SELECT CAST(1 AS BEGIN);
+ERROR HY000: Unknown data type: 'BEGIN'
+#
+# End of 10.5 tests
+#
diff --git a/mysql-test/suite/compat/oracle/r/sp-code.result b/mysql-test/suite/compat/oracle/r/sp-code.result
index 1c6aacc8743..0fc980a3b84 100644
--- a/mysql-test/suite/compat/oracle/r/sp-code.result
+++ b/mysql-test/suite/compat/oracle/r/sp-code.result
@@ -1487,3 +1487,30 @@ CALL p1();
x0 x1.a x1.b
100 101 102
DROP PROCEDURE p1;
+#
+# MDEV-19640 Wrong SHOW PROCEDURE output for SET GLOBAL sysvar1=expr, sysvar2=expr
+#
+CREATE OR REPLACE PROCEDURE p1() AS
+BEGIN
+SET GLOBAL max_allowed_packet=16000000, max_error_count=60;
+SELECT @@GLOBAL.max_allowed_packet, @@GLOBAL.max_error_count;
+END;
+$$
+SHOW PROCEDURE CODE p1;
+Pos Instruction
+0 stmt 31 "SET GLOBAL max_allowed_packet=16000000"
+1 stmt 31 "SET GLOBAL max_error_count=60"
+2 stmt 0 "SELECT @@GLOBAL.max_allowed_packet, @..."
+DROP PROCEDURE p1;
+#
+# MDEV-19639 sql_mode=ORACLE: Wrong SHOW PROCEDURE output for sysvar:=expr
+#
+CREATE OR REPLACE PROCEDURE p1() AS
+BEGIN
+max_error_count:=10;
+END;
+$$
+SHOW PROCEDURE CODE p1;
+Pos Instruction
+0 stmt 31 "max_error_count:=10"
+DROP PROCEDURE p1;
diff --git a/mysql-test/suite/compat/oracle/r/sp-row.result b/mysql-test/suite/compat/oracle/r/sp-row.result
index 218fb5d463a..323b0c684f3 100644
--- a/mysql-test/suite/compat/oracle/r/sp-row.result
+++ b/mysql-test/suite/compat/oracle/r/sp-row.result
@@ -209,7 +209,7 @@ SELECT a+1;
END;
$$
CALL p1();
-ERROR 21000: Operand should contain 1 column(s)
+ERROR HY000: Illegal parameter data types row and int for operation '+'
DROP PROCEDURE p1;
CREATE PROCEDURE p1()
AS
@@ -219,7 +219,7 @@ SELECT a+1;
END;
$$
CALL p1();
-ERROR 21000: Operand should contain 1 column(s)
+ERROR HY000: Illegal parameter data types row and int for operation '+'
DROP PROCEDURE p1;
#
# Comparing the entire ROW to a scalar value
diff --git a/mysql-test/suite/compat/oracle/r/sp.result b/mysql-test/suite/compat/oracle/r/sp.result
index 4b360241c01..5e2ea82fbc3 100644
--- a/mysql-test/suite/compat/oracle/r/sp.result
+++ b/mysql-test/suite/compat/oracle/r/sp.result
@@ -2148,11 +2148,7 @@ BEGIN
RETURN 0;
END;
$$
-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 't1.a%TYPE
-AS
-BEGIN
-RETURN 0;
-END' at line 1
+ERROR HY000: Unknown data type: 't1'
#
# End of MDEV-10577 sql_mode=ORACLE: %TYPE in variable declarations
#
diff --git a/mysql-test/suite/compat/oracle/r/table_value_constr.result b/mysql-test/suite/compat/oracle/r/table_value_constr.result
index cb198764538..108163ed782 100644
--- a/mysql-test/suite/compat/oracle/r/table_value_constr.result
+++ b/mysql-test/suite/compat/oracle/r/table_value_constr.result
@@ -2060,9 +2060,9 @@ values (1,2),(3,4,5);
ERROR HY000: The used table value constructor has a different number of values
# illegal parameter data types in TVC
values (1,point(1,1)),(1,1);
-ERROR HY000: Illegal parameter data types geometry and int for operation 'TABLE VALUE CONSTRUCTOR'
+ERROR HY000: Illegal parameter data types point and int for operation 'TABLE VALUE CONSTRUCTOR'
values (1,point(1,1)+1);
-ERROR HY000: Illegal parameter data types geometry and int for operation '+'
+ERROR HY000: Illegal parameter data types point and int for operation '+'
# field reference in TVC
select * from (values (1), (b), (2)) as new_tvc;
ERROR HY000: Field reference 'b' can't be used in table value constructor
diff --git a/mysql-test/suite/compat/oracle/r/type_date.result b/mysql-test/suite/compat/oracle/r/type_date.result
index 40d2a834056..ea37375c364 100644
--- a/mysql-test/suite/compat/oracle/r/type_date.result
+++ b/mysql-test/suite/compat/oracle/r/type_date.result
@@ -133,10 +133,7 @@ BEGIN
RETURN CURRENT_DATE;
END;
$$
-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 'mariadb_schema.DATE AS
-BEGIN
-RETURN CURRENT_DATE;
-END' at line 1
+ERROR HY000: Unknown data type: 'mariadb_schema'
CREATE PROCEDURE p1(a mariadb_schema.DATE) AS
BEGIN
NULL;
diff --git a/mysql-test/suite/compat/oracle/t/gis-debug.test b/mysql-test/suite/compat/oracle/t/gis-debug.test
new file mode 100644
index 00000000000..6053e546211
--- /dev/null
+++ b/mysql-test/suite/compat/oracle/t/gis-debug.test
@@ -0,0 +1,31 @@
+--source include/have_geometry.inc
+--source include/have_debug.inc
+
+SET sql_mode=ORACLE;
+
+--echo #
+--echo # Start of 10.5 tests
+--echo #
+
+--echo #
+--echo # MDEV-19994 Add class Function_collection
+--echo #
+
+SET SESSION debug_dbug="+d,make_item_func_call_native_simulate_not_found";
+--error ER_PARSE_ERROR
+SELECT CONTAINS(POINT(1,1),POINT(1,1));
+--error ER_PARSE_ERROR
+SELECT WITHIN(POINT(1,1),POINT(1,1));
+SET SESSION debug_dbug="-d,make_item_func_call_native_simulate_not_found";
+
+--echo #
+--echo # MDEV-20009 Add CAST(expr AS pluggable_type)
+--echo #
+
+SET SESSION debug_dbug="+d,emulate_geometry_create_typecast_item";
+SELECT AsText(CAST('POINT(0 0)' AS GEOMETRY));
+SET SESSION debug_dbug="-d,emulate_geometry_create_typecast_item";
+
+--echo #
+--echo # End of 10.5 tests
+--echo #
diff --git a/mysql-test/suite/compat/oracle/t/gis.test b/mysql-test/suite/compat/oracle/t/gis.test
index a684563390b..cb1b869035a 100644
--- a/mysql-test/suite/compat/oracle/t/gis.test
+++ b/mysql-test/suite/compat/oracle/t/gis.test
@@ -1,4 +1,76 @@
-- source include/have_geometry.inc
+SET sql_mode=ORACLE;
+
+
+SELECT CONTAINS(POINT(1,1), POINT(1,1));
+SELECT CONTAINS(POINT(1,1), POINT(0,0));
+
SELECT WITHIN(POINT(1,1), POINT(1,1));
SELECT WITHIN(POINT(1,1), POINT(0,0));
+
+--echo #
+--echo # Start of 10.5 tests
+--echo #
+
+--echo #
+--echo # MDEV-19994 Add class Function_collection
+--echo #
+
+--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+SELECT CONTAINS();
+--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+SELECT CONTAINS(POINT(1,1));
+--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+SELECT CONTAINS(POINT(1,1), POINT(1,1), POINT(1,1));
+
+--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+SELECT WITHIN();
+--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+SELECT WITHIN(POINT(1,1));
+--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+SELECT WITHIN(POINT(1,1), POINT(1,1), POINT(1,1));
+
+--echo #
+--echo # MDEV-20009 Add CAST(expr AS pluggable_type)
+--echo #
+
+--error ER_UNKNOWN_OPERATOR
+SELECT CAST(1 AS GEOMETRY);
+--error ER_UNKNOWN_OPERATOR
+SELECT CAST(1 AS GEOMETRYCOLLECTION);
+--error ER_UNKNOWN_OPERATOR
+SELECT CAST(1 AS POINT);
+--error ER_UNKNOWN_OPERATOR
+SELECT CAST(1 AS LINESTRING);
+--error ER_UNKNOWN_OPERATOR
+SELECT CAST(1 AS POLYGON);
+--error ER_UNKNOWN_OPERATOR
+SELECT CAST(1 AS MULTIPOINT);
+--error ER_UNKNOWN_OPERATOR
+SELECT CAST(1 AS MULTILINESTRING);
+--error ER_UNKNOWN_OPERATOR
+SELECT CAST(1 AS MULTIPOLYGON);
+
+
+--error ER_UNKNOWN_OPERATOR
+SELECT CONVERT(1, GEOMETRY);
+--error ER_UNKNOWN_OPERATOR
+SELECT CONVERT(1, GEOMETRYCOLLECTION);
+--error ER_UNKNOWN_OPERATOR
+SELECT CONVERT(1, POINT);
+--error ER_UNKNOWN_OPERATOR
+SELECT CONVERT(1, LINESTRING);
+--error ER_UNKNOWN_OPERATOR
+SELECT CONVERT(1, POLYGON);
+--error ER_UNKNOWN_OPERATOR
+SELECT CONVERT(1, MULTIPOINT);
+--error ER_UNKNOWN_OPERATOR
+SELECT CONVERT(1, MULTILINESTRING);
+--error ER_UNKNOWN_OPERATOR
+SELECT CONVERT(1, MULTIPOLYGON);
+
+
+--echo #
+--echo # End of 10.5 tests
+--echo #
diff --git a/mysql-test/suite/compat/oracle/t/parser.test b/mysql-test/suite/compat/oracle/t/parser.test
index 8dabdc1b3bd..d5d3b39f0b9 100644
--- a/mysql-test/suite/compat/oracle/t/parser.test
+++ b/mysql-test/suite/compat/oracle/t/parser.test
@@ -591,3 +591,65 @@ drop procedure p1;
drop table t1,t2;
--echo # End of 10.4 tests
+
+--echo #
+--echo # Start of 10.5 tests
+--echo #
+
+--echo #
+--echo # MDEV-20734 Allow reserved keywords as user defined type names
+--echo #
+
+--error ER_UNKNOWN_DATA_TYPE
+CREATE TABLE t1 (a DUAL);
+--error ER_UNKNOWN_DATA_TYPE
+SELECT CAST(1 AS DUAL);
+
+
+--echo #
+--echo # MDEV-20735 Allow non-reserved keywords as user defined type names
+--echo #
+
+--error ER_UNKNOWN_DATA_TYPE
+CREATE TABLE t1 (a ASCII);
+--error ER_UNKNOWN_DATA_TYPE
+SELECT CAST(1 AS ASCII);
+
+--error ER_UNKNOWN_DATA_TYPE
+CREATE TABLE t1 (a LANGUAGE);
+--error ER_UNKNOWN_DATA_TYPE
+SELECT CAST(1 AS LANGUAGE);
+
+--error ER_UNKNOWN_DATA_TYPE
+CREATE TABLE t1 (a CLOSE);
+--error ER_UNKNOWN_DATA_TYPE
+SELECT CAST(1 AS CLOSE);
+
+--error ER_UNKNOWN_DATA_TYPE
+CREATE TABLE t1 (a NAMES);
+--error ER_UNKNOWN_DATA_TYPE
+SELECT CAST(1 AS NAMES);
+
+--error ER_UNKNOWN_DATA_TYPE
+CREATE TABLE t1 (a END);
+--error ER_UNKNOWN_DATA_TYPE
+SELECT CAST(1 AS END);
+
+--error ER_UNKNOWN_DATA_TYPE
+CREATE TABLE t1 (a GLOBAL);
+--error ER_UNKNOWN_DATA_TYPE
+SELECT CAST(1 AS GLOBAL);
+
+--error ER_UNKNOWN_DATA_TYPE
+CREATE TABLE t1 (a ACTION);
+--error ER_UNKNOWN_DATA_TYPE
+SELECT CAST(1 AS ACTION);
+
+--error ER_UNKNOWN_DATA_TYPE
+CREATE TABLE t1 (a BEGIN);
+--error ER_UNKNOWN_DATA_TYPE
+SELECT CAST(1 AS BEGIN);
+
+--echo #
+--echo # End of 10.5 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 ea66ed80d2a..1ffd3b948e6 100644
--- a/mysql-test/suite/compat/oracle/t/sp-code.test
+++ b/mysql-test/suite/compat/oracle/t/sp-code.test
@@ -1055,3 +1055,34 @@ DELIMITER ;$$
SHOW PROCEDURE CODE p1;
CALL p1();
DROP PROCEDURE p1;
+
+--echo #
+--echo # MDEV-19640 Wrong SHOW PROCEDURE output for SET GLOBAL sysvar1=expr, sysvar2=expr
+--echo #
+
+DELIMITER $$;
+CREATE OR REPLACE PROCEDURE p1() AS
+BEGIN
+ SET GLOBAL max_allowed_packet=16000000, max_error_count=60;
+ SELECT @@GLOBAL.max_allowed_packet, @@GLOBAL.max_error_count;
+END;
+$$
+DELIMITER ;$$
+SHOW PROCEDURE CODE p1;
+DROP PROCEDURE p1;
+
+--echo #
+--echo # MDEV-19639 sql_mode=ORACLE: Wrong SHOW PROCEDURE output for sysvar:=expr
+--echo #
+
+DELIMITER $$;
+CREATE OR REPLACE PROCEDURE p1() AS
+BEGIN
+ max_error_count:=10;
+END;
+$$
+DELIMITER ;$$
+SHOW PROCEDURE CODE p1;
+DROP PROCEDURE p1;
+
+
diff --git a/mysql-test/suite/compat/oracle/t/sp-row.test b/mysql-test/suite/compat/oracle/t/sp-row.test
index 469494ad228..8abf317708a 100644
--- a/mysql-test/suite/compat/oracle/t/sp-row.test
+++ b/mysql-test/suite/compat/oracle/t/sp-row.test
@@ -263,7 +263,7 @@ BEGIN
END;
$$
DELIMITER ;$$
---error ER_OPERAND_COLUMNS
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
CALL p1();
DROP PROCEDURE p1;
@@ -277,7 +277,7 @@ BEGIN
END;
$$
DELIMITER ;$$
---error ER_OPERAND_COLUMNS
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
CALL p1();
DROP PROCEDURE p1;
diff --git a/mysql-test/suite/compat/oracle/t/sp.test b/mysql-test/suite/compat/oracle/t/sp.test
index 04b9f1be1e2..99bdc7166e0 100644
--- a/mysql-test/suite/compat/oracle/t/sp.test
+++ b/mysql-test/suite/compat/oracle/t/sp.test
@@ -1963,7 +1963,7 @@ DROP TABLE t1;
--echo # %TYPE in function RETURN clause is not supported yet
--echo #
DELIMITER $$;
---error ER_PARSE_ERROR
+--error ER_UNKNOWN_DATA_TYPE
CREATE FUNCTION f1 RETURN t1.a%TYPE
AS
BEGIN
diff --git a/mysql-test/suite/compat/oracle/t/type_date.test b/mysql-test/suite/compat/oracle/t/type_date.test
index 36a5e99795f..f6886d15090 100644
--- a/mysql-test/suite/compat/oracle/t/type_date.test
+++ b/mysql-test/suite/compat/oracle/t/type_date.test
@@ -9,7 +9,7 @@ DROP TABLE t1;
--echo #
SET sql_mode=DEFAULT;
---error ER_UNKNOWN_ERROR
+--error ER_UNKNOWN_DATA_TYPE
CREATE TABLE t1 (a unknown.DATE);
@@ -79,9 +79,7 @@ DROP TABLE t1;
SET sql_mode=ORACLE;
DELIMITER $$;
-# Change to this when merging to 10.5:
-#--error ER_UNKNOWN_DATA_TYPE
---error ER_PARSE_ERROR
+--error ER_UNKNOWN_DATA_TYPE
CREATE FUNCTION f1() RETURN mariadb_schema.DATE AS
BEGIN
RETURN CURRENT_DATE;
diff --git a/mysql-test/suite/csv/csv.result b/mysql-test/suite/csv/csv.result
index 220b84b222e..de5025be0ea 100644
--- a/mysql-test/suite/csv/csv.result
+++ b/mysql-test/suite/csv/csv.result
@@ -4928,9 +4928,7 @@ period
9410
drop table if exists t1,t2,t3,t4;
Warnings:
-Note 1051 Unknown table 'test.t2'
-Note 1051 Unknown table 'test.t3'
-Note 1051 Unknown table 'test.t4'
+Note 1051 Unknown table 'test.t2,test.t3,test.t4'
DROP TABLE IF EXISTS bug13894;
CREATE TABLE bug13894 ( val integer not null ) ENGINE = CSV;
INSERT INTO bug13894 VALUES (5);
diff --git a/mysql-test/suite/encryption/disabled.def b/mysql-test/suite/encryption/disabled.def
deleted file mode 100644
index d92d3495cb8..00000000000
--- a/mysql-test/suite/encryption/disabled.def
+++ /dev/null
@@ -1,14 +0,0 @@
-##############################################################################
-#
-# 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.
-#
-##############################################################################
-
-innodb_scrub : MDEV-8139 scrubbing does not work reliably
-innodb_scrub_background : MDEV-8139 scrubbing does not work reliably
diff --git a/mysql-test/suite/encryption/r/aria_tiny.result b/mysql-test/suite/encryption/r/aria_tiny.result
index b0f8bac7c32..28f762255c4 100644
--- a/mysql-test/suite/encryption/r/aria_tiny.result
+++ b/mysql-test/suite/encryption/r/aria_tiny.result
@@ -1,5 +1,27 @@
-set global aria_encrypt_tables = 1;
+SET @aria_encrypt= @@aria_encrypt_tables;
+SET global aria_encrypt_tables=1;
create table t1 (i int, key(i)) engine=aria;
insert into t1 values (1);
drop table t1;
-set global aria_encrypt_tables = 0;
+create table t1 (a int primary key, b int, c int, key(b),key(c)) engine=aria;
+alter table t1 disable keys;
+insert into t1 select seq,seq,seq from seq_1_to_100;
+alter table t1 enable keys;
+check table t1;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+drop table t1;
+#
+# MDEV CHECK on encrypted Aria table complains about "Wrong LSN"
+#
+CREATE TABLE t1 (f DATE PRIMARY KEY) ENGINE=Aria;
+INSERT INTO t1 (f) VALUES ('1995-01-01'),('2000-01-01');
+DELETE FROM t1 WHERE f = '2000-01-01';
+OPTIMIZE TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 optimize status OK
+CHECK TABLE t1 EXTENDED;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+DROP TABLE t1;
+set global aria_encrypt_tables=@aria_encrypt;
diff --git a/mysql-test/suite/encryption/r/corrupted_during_recovery.result b/mysql-test/suite/encryption/r/corrupted_during_recovery.result
index 356dce64f8d..ea2f1ff3328 100644
--- a/mysql-test/suite/encryption/r/corrupted_during_recovery.result
+++ b/mysql-test/suite/encryption/r/corrupted_during_recovery.result
@@ -1,3 +1,5 @@
+# Work around MDEV-19541
+SET GLOBAL innodb_checksum_algorithm=crc32;
CREATE TABLE t1(a BIGINT PRIMARY KEY) ENGINE=InnoDB, ENCRYPTED=YES;
INSERT INTO t1 VALUES(1);
CREATE TABLE t2(a BIGINT PRIMARY KEY) ENGINE=InnoDB, ENCRYPTED=YES;
diff --git a/mysql-test/suite/encryption/r/innodb-force-corrupt.result b/mysql-test/suite/encryption/r/innodb-force-corrupt.result
index 012901010b4..ad75df952b3 100644
--- a/mysql-test/suite/encryption/r/innodb-force-corrupt.result
+++ b/mysql-test/suite/encryption/r/innodb-force-corrupt.result
@@ -1,7 +1,7 @@
call mtr.add_suppression("InnoDB: Table `test`\\.`t[13]` (has an unreadable root page|is corrupted)");
call mtr.add_suppression("InnoDB: Encrypted page \\[page id: space=\\d+, page number=[36]\\] in file .*test.t[123]\\.ibd looks corrupted; key_version=");
call mtr.add_suppression("\\[ERROR\\] InnoDB: We detected index corruption in an InnoDB type table");
-call mtr.add_suppression("\\[ERROR\\] mysqld.*: Index for table 't2' is corrupt; try to repair it");
+call mtr.add_suppression("\\[ERROR\\] (mysqld|mariadbd).*: Index for table 't2' is corrupt; try to repair it");
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-redo-badkey.result b/mysql-test/suite/encryption/r/innodb-redo-badkey.result
index f90e7aeb780..87377a01479 100644
--- a/mysql-test/suite/encryption/r/innodb-redo-badkey.result
+++ b/mysql-test/suite/encryption/r/innodb-redo-badkey.result
@@ -1,10 +1,10 @@
call mtr.add_suppression("Plugin 'file_key_management'");
call mtr.add_suppression("Plugin 'InnoDB' init function returned error.");
-call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[0-9]+\\] in file '.*test/t[1-4]\\.ibd' cannot be decrypted");
+call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[1-4]\\.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: Unable to decompress .*.test.t[12]\\.ibd\\[page id: space=[1-9][0-9]*, page number=[0-9]+\\]");
-call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed file read of tablespace test/t[12] page \\[page id: space=[1-9][0-9]*, page number=[0-9]*\\]");
-call mtr.add_suppression("InnoDB: Failed to read file '.*' at offset .*");
+call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed read of file '.*test.t[12]\\.ibd'");
+call mtr.add_suppression("InnoDB: Failed to read page .* from file '.*'");
call mtr.add_suppression("InnoDB: Plugin initialization aborted");
call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed");
call mtr.add_suppression("\\[ERROR\\] InnoDB: Cannot decrypt \\[page id: space=");
diff --git a/mysql-test/suite/encryption/r/innodb-redo-nokeys.result b/mysql-test/suite/encryption/r/innodb-redo-nokeys.result
index 0a6beb8da38..fe5324d7012 100644
--- a/mysql-test/suite/encryption/r/innodb-redo-nokeys.result
+++ b/mysql-test/suite/encryption/r/innodb-redo-nokeys.result
@@ -1,4 +1,4 @@
-call mtr.add_suppression("mysqld: File .*");
+call mtr.add_suppression("(mysqld|mariadbd).*: File .*");
call mtr.add_suppression("Plugin 'file_key_management' .*");
call mtr.add_suppression("InnoDB: cannot enable encryption, encryption plugin is not available");
call mtr.add_suppression("Plugin 'InnoDB' init function returned error\\.");
diff --git a/mysql-test/suite/encryption/r/innodb-remove-encryption.result b/mysql-test/suite/encryption/r/innodb-remove-encryption.result
index 9bce59dbbea..e241d213c8e 100644
--- a/mysql-test/suite/encryption/r/innodb-remove-encryption.result
+++ b/mysql-test/suite/encryption/r/innodb-remove-encryption.result
@@ -1,5 +1,5 @@
set global innodb_file_per_table=OFF;
-call mtr.add_suppression("mysqld: file-key-management-filename is not set");
+call mtr.add_suppression("(mysqld|mariadbd).*: file-key-management-filename is not set");
call mtr.add_suppression("Plugin 'file_key_management' init function returned error.");
call mtr.add_suppression("Plugin 'file_key_management' registration as a ENCRYPTION failed.");
flush tables;
diff --git a/mysql-test/suite/encryption/r/innodb-scrub-log.result b/mysql-test/suite/encryption/r/innodb-scrub-log.result
deleted file mode 100644
index 8ea75000368..00000000000
--- a/mysql-test/suite/encryption/r/innodb-scrub-log.result
+++ /dev/null
@@ -1,3 +0,0 @@
-create table t1(a int not null primary key auto_increment,
-b varchar(200), c char(100), d varchar(150)) engine=innodb;
-DROP TABLE t1;
diff --git a/mysql-test/suite/encryption/r/innodb_encrypt_freed.result b/mysql-test/suite/encryption/r/innodb_encrypt_freed.result
index c0d8b770403..cdcdd17720e 100644
--- a/mysql-test/suite/encryption/r/innodb_encrypt_freed.result
+++ b/mysql-test/suite/encryption/r/innodb_encrypt_freed.result
@@ -20,7 +20,6 @@ mysql/transaction_registry
test/t1
CREATE TABLE t2 (f1 int not null)engine=innodb;
# restart: --debug=d,ib_log_checkpoint_avoid
-SET GLOBAL innodb_log_checkpoint_now=TRUE;
connect con1,localhost,root,,,;
begin;
insert into t2 values(1);
@@ -48,7 +47,6 @@ test/t1
test/t2
disconnect con1;
# restart: --debug=d,ib_log_checkpoint_avoid
-SET GLOBAL innodb_log_checkpoint_now=TRUE;
drop table t1, t2;
CREATE TABLE t1(f1 BIGINT PRIMARY KEY, f2 int not null,
f3 int not null, index(f1), index idx_1(f2),
@@ -63,7 +61,6 @@ mysql/transaction_registry
test/t1
CREATE TABLE t2 (f1 int not null)engine=innodb;
# restart: --debug=d,ib_log_checkpoint_avoid
-SET GLOBAL innodb_log_checkpoint_now=TRUE;
connect con1,localhost,root,,,;
begin;
insert into t2 values(1);
@@ -81,7 +78,6 @@ test/t2
alter table t1 drop index idx_1;
disconnect con1;
# restart: --debug=d,ib_log_checkpoint_avoid
-SET GLOBAL innodb_log_checkpoint_now=TRUE;
connect con1,localhost,root,,,;
begin;
insert into t2 values(1);
diff --git a/mysql-test/suite/encryption/r/innodb_encrypt_log.result b/mysql-test/suite/encryption/r/innodb_encrypt_log.result
index e2b456aa2ed..1a7a9267b60 100644
--- a/mysql-test/suite/encryption/r/innodb_encrypt_log.result
+++ b/mysql-test/suite/encryption/r/innodb_encrypt_log.result
@@ -7,7 +7,7 @@
#
SET GLOBAL innodb_log_checksums=0;
Warnings:
-Warning 138 innodb_log_checksums is deprecated and has no effect outside recovery
+Warning 138 The parameter innodb_log_checksums is deprecated and has no effect.
SELECT @@global.innodb_log_checksums;
@@global.innodb_log_checksums
1
@@ -40,7 +40,7 @@ NOT FOUND /private|secret|sacr(ed|ament)|success|story|secur(e|ity)/ in t0.ibd
# ib_logfile0 expecting NOT FOUND
NOT FOUND /private|secret|sacr(ed|ament)|success|story|secur(e|ity)/ in ib_logfile0
# Restart without redo log encryption
-# restart: --skip-innodb-encrypt-log --innodb-log-files-in-group=1
+# restart: --skip-innodb-encrypt-log
SELECT COUNT(*) FROM t0;
COUNT(*)
1024
diff --git a/mysql-test/suite/encryption/r/innodb_encrypt_log_corruption.result b/mysql-test/suite/encryption/r/innodb_encrypt_log_corruption.result
index c64a11dcdd9..8d1eb447b03 100644
--- a/mysql-test/suite/encryption/r/innodb_encrypt_log_corruption.result
+++ b/mysql-test/suite/encryption/r/innodb_encrypt_log_corruption.result
@@ -21,13 +21,54 @@ AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
FOUND 1 /InnoDB: Upgrade after a crash is not supported. This redo log was created before MariaDB 10\.2\.2, and it appears corrupted/ in mysqld.1.err
# empty redo log from before MariaDB 10.2.2
-# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=5 --innodb-log-file-size=1m
+# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=5 --innodb-log-file-size=2m
SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
COUNT(*)
1
FOUND 1 /InnoDB: Upgrading redo log:/ in mysqld.1.err
+# Corrupted multi-file redo log from before MariaDB 10.2.2
+# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=5 --innodb-log-file-size=2m
+SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES
+WHERE engine = 'innodb'
+AND support IN ('YES', 'DEFAULT', 'ENABLED');
+COUNT(*)
+0
+FOUND 2 /InnoDB: Upgrade after a crash is not supported. This redo log was created before MariaDB 10\.2\.2, and it appears corrupted/ in mysqld.1.err
+# Empty multi-file redo log from before MariaDB 10.2.2
+# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=5 --innodb-log-file-size=2m
+SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES
+WHERE engine = 'innodb'
+AND support IN ('YES', 'DEFAULT', 'ENABLED');
+COUNT(*)
+1
+FOUND 2 /InnoDB: Upgrading redo log:/ in mysqld.1.err
+# Multi-file redo log with size mismatch from after MariaDB 10.2.2
+# Corrupted multi-file redo log from after MariaDB 10.2.2
+# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=5 --innodb-log-file-size=2m
+SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES
+WHERE engine = 'innodb'
+AND support IN ('YES', 'DEFAULT', 'ENABLED');
+COUNT(*)
+0
+FOUND 1 /InnoDB: Log file .*ib_logfile1 is of different size 1048576 bytes than other log files 2097152 bytes!/ in mysqld.1.err
+FOUND 1 /InnoDB: Upgrade after a crash is not supported\. The redo log was created with BogoDB 1\.2\.3\.4, and it appears corrupted\./ in mysqld.1.err
+# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=5 --innodb-log-file-size=2m
+SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES
+WHERE engine = 'innodb'
+AND support IN ('YES', 'DEFAULT', 'ENABLED');
+COUNT(*)
+0
+FOUND 2 /InnoDB: Upgrade after a crash is not supported\. The redo log was created with BogoDB 1\.2\.3\.4, and it appears corrupted\./ in mysqld.1.err
+# Empty multi-file redo log from after MariaDB 10.2.2
+# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=5 --innodb-log-file-size=2m
+SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES
+WHERE engine = 'innodb'
+AND support IN ('YES', 'DEFAULT', 'ENABLED');
+COUNT(*)
+1
+FOUND 3 /InnoDB: Upgrading redo log:/ in mysqld.1.err
# redo log from "after" MariaDB 10.2.2, but with invalid header checksum
# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption
SELECT * FROM INFORMATION_SCHEMA.ENGINES
@@ -56,7 +97,7 @@ WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
FOUND 1 /InnoDB: Invalid log block checksum. block: 2372 checkpoint no: 1 expected: 3362026715 found: 144444122/ in mysqld.1.err
-FOUND 1 /InnoDB: Missing MLOG_CHECKPOINT between the checkpoint 1213964 and the end 1213952\./ in mysqld.1.err
+FOUND 1 /InnoDB: Upgrade after a crash is not supported\. The redo log was created with malicious intentions, or perhaps, and it appears corrupted\./ in mysqld.1.err
# same, but with current-version header
# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=5
SELECT * FROM INFORMATION_SCHEMA.ENGINES
@@ -64,7 +105,6 @@ WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
FOUND 2 /InnoDB: Invalid log block checksum. block: 2372 checkpoint no: 1 expected: 3362026715 found: 144444122/ in mysqld.1.err
-FOUND 2 /InnoDB: Missing MLOG_CHECKPOINT between the checkpoint 1213964 and the end 1213952\./ in mysqld.1.err
# --innodb-force-recovery=6 (skip the entire redo log)
# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=6
SELECT * FROM INFORMATION_SCHEMA.ENGINES
@@ -93,12 +133,7 @@ SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
-FOUND 1 /InnoDB: Starting crash recovery from checkpoint LSN=1213964/ in mysqld.1.err
-FOUND 1 /InnoDB: MLOG_FILE_NAME incorrect:bogus/ in mysqld.1.err
-FOUND 1 /InnoDB: ############### CORRUPT LOG RECORD FOUND ##################/ in mysqld.1.err
-FOUND 1 /InnoDB: Log record type 55, page 151:488\. Log parsing proceeded successfully up to 1213973\. Previous log record type 56, is multi 0 Recv offset 9, prev 0/ in mysqld.1.err
-FOUND 1 /len 22. hex 38000000000012860cb7809781e80006626f67757300. asc 8 bogus / in mysqld.1.err
-FOUND 1 /InnoDB: Set innodb_force_recovery to ignore this error/ in mysqld.1.err
+FOUND 1 /\[ERROR\] InnoDB: Upgrade after a crash is not supported\. The redo log was created with MariaDB 10\.3\.1\./ in mysqld.1.err
# Test a corrupted MLOG_FILE_NAME record.
# valid header, invalid checkpoint 1, valid checkpoint 2, invalid block
# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption
@@ -107,53 +142,52 @@ WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
FOUND 1 /InnoDB: Invalid log block checksum. block: 2372 checkpoint no: 1 expected: 2454333373 found: 150151/ in mysqld.1.err
+FOUND 3 /\[ERROR\] InnoDB: Upgrade after a crash is not supported\. The redo log was created with MariaDB 10\.3\.1, and it appears corrupted\./ in mysqld.1.err
# valid header, invalid checkpoint 1, valid checkpoint 2, invalid log record
# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
-FOUND 1 /InnoDB: MLOG_FILE_NAME incorrect:bigot/ in mysqld.1.err
-FOUND 1 /len 22; hex 38000000000012860cb7809781e800066269676f7400; asc 8 bigot ;/ in mysqld.1.err
+FOUND 2 /\[ERROR\] InnoDB: Upgrade after a crash is not supported\. The redo log was created with MariaDB 10\.3\.1\./ in mysqld.1.err
# 10.2 missing MLOG_FILE_NAME or MLOG_FILE_DELETE before MLOG_CHECKPOINT
# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
-FOUND 1 /InnoDB: Missing MLOG_FILE_NAME or MLOG_FILE_DELETE before MLOG_CHECKPOINT for tablespace 42/ in mysqld.1.err
+FOUND 1 /\[ERROR\] InnoDB: Upgrade after a crash is not supported\. The redo log was created with ibbackup was here!!!1!\./ in mysqld.1.err
# 10.3 missing MLOG_FILE_NAME or MLOG_FILE_DELETE before MLOG_CHECKPOINT
# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
-FOUND 2 /InnoDB: Missing MLOG_FILE_NAME or MLOG_FILE_DELETE before MLOG_CHECKPOINT for tablespace 42/ in mysqld.1.err
+FOUND 3 /\[ERROR\] InnoDB: Upgrade after a crash is not supported\. The redo log was created with MariaDB 10\.3\.1\./ in mysqld.1.err
# Empty 10.3 redo log
-# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=5 --innodb-log-file-size=1m
+# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=5 --innodb-log-file-size=2m
SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
COUNT(*)
1
-FOUND 1 /InnoDB: .* started; log sequence number 121397[09]/ in mysqld.1.err
+FOUND 1 /InnoDB: .* started; log sequence number 1213964; transaction id 0/ in mysqld.1.err
# Empty 10.2 redo log
-# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=5 --innodb-log-file-size=1m
+# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=5 --innodb-log-file-size=2m
SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
COUNT(*)
1
-FOUND 3 /InnoDB: Upgrading redo log:/ in mysqld.1.err
+FOUND 5 /InnoDB: Upgrading redo log:/ in mysqld.1.err
# Minimal MariaDB 10.1.21 encrypted redo log
# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=5
SELECT COUNT(*) `1` FROM INFORMATION_SCHEMA.ENGINES WHERE engine='innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
1
1
-FOUND 1 /InnoDB: Encrypting redo log/ in mysqld.1.err
+NOT FOUND /InnoDB: Encrypting redo log/ in mysqld.1.err
# restart
ib_buffer_pool
ib_logfile0
-ib_logfile1
ibdata1
diff --git a/mysql-test/suite/encryption/r/innodb_import.result b/mysql-test/suite/encryption/r/innodb_import.result
index 54b95ab26d4..169af37f404 100644
--- a/mysql-test/suite/encryption/r/innodb_import.result
+++ b/mysql-test/suite/encryption/r/innodb_import.result
@@ -11,10 +11,9 @@ UNLOCK TABLES;
ALTER TABLE t2 IMPORT TABLESPACE;
ERROR HY000: Internal error: Drop all secondary indexes before importing table test/t2 when .cfg file is missing.
ALTER TABLE t2 DROP KEY idx;
-Warnings:
-Warning 1814 Tablespace has been discarded for table `t2`
ALTER TABLE t2 IMPORT TABLESPACE;
Warnings:
+Warning 1814 Tablespace has been discarded for table `t2`
Warning 1810 IO Read error: (2, No such file or directory) Error opening './test/t2.cfg', will attempt to import without schema verification
SELECT * FROM t2;
f1 f2
diff --git a/mysql-test/suite/encryption/r/innodb_scrub.result b/mysql-test/suite/encryption/r/innodb_scrub.result
deleted file mode 100644
index 6e8febc762d..00000000000
--- a/mysql-test/suite/encryption/r/innodb_scrub.result
+++ /dev/null
@@ -1,138 +0,0 @@
-create table snapshot_status engine = myisam
-select * from information_schema.global_status
-where variable_name like 'innodb_scrub%';
-# MDEV-8139 Fix scrubbing tests
-# FIXME: Add index(b) to each table; ensure that undo logs are scrubbed.
-create table delete_3 (
-a int auto_increment primary key,
-b varchar(256),
-c text) engine = innodb row_format=compressed;
-delete from delete_3;
-create table delete_rollback_delete_3 (
-a int auto_increment primary key,
-b varchar(256),
-c text) engine = innodb row_format=compressed;
-begin;
-delete from delete_rollback_delete_3;
-rollback;
-delete from delete_rollback_delete_3;
-create table insert_rollback_3 (
-a int auto_increment primary key,
-b varchar(256),
-c text) engine = innodb row_format=compressed;
-begin;
-rollback;
-create table delete_2 (
-a int auto_increment primary key,
-b varchar(256),
-c text) engine = innodb row_format=compact;
-delete from delete_2;
-create table delete_rollback_delete_2 (
-a int auto_increment primary key,
-b varchar(256),
-c text) engine = innodb row_format=compact;
-begin;
-delete from delete_rollback_delete_2;
-rollback;
-delete from delete_rollback_delete_2;
-create table insert_rollback_2 (
-a int auto_increment primary key,
-b varchar(256),
-c text) engine = innodb row_format=compact;
-begin;
-rollback;
-create table delete_1 (
-a int auto_increment primary key,
-b varchar(256),
-c text) engine = innodb row_format=redundant;
-delete from delete_1;
-create table delete_rollback_delete_1 (
-a int auto_increment primary key,
-b varchar(256),
-c text) engine = innodb row_format=redundant;
-begin;
-delete from delete_rollback_delete_1;
-rollback;
-delete from delete_rollback_delete_1;
-create table insert_rollback_1 (
-a int auto_increment primary key,
-b varchar(256),
-c text) engine = innodb row_format=redundant;
-begin;
-rollback;
-create table delete_0 (
-a int auto_increment primary key,
-b varchar(256),
-c text) engine = innodb row_format=dynamic;
-delete from delete_0;
-create table delete_rollback_delete_0 (
-a int auto_increment primary key,
-b varchar(256),
-c text) engine = innodb row_format=dynamic;
-begin;
-delete from delete_rollback_delete_0;
-rollback;
-delete from delete_rollback_delete_0;
-create table insert_rollback_0 (
-a int auto_increment primary key,
-b varchar(256),
-c text) engine = innodb row_format=dynamic;
-begin;
-rollback;
-SET GLOBAL innodb_fast_shutdown=0;
-# delete_3.ibd
-# delete_rollback_delete_3.ibd
-# insert_rollback_3.ibd
-# delete_2.ibd
-# delete_rollback_delete_2.ibd
-# insert_rollback_2.ibd
-# delete_1.ibd
-# delete_rollback_delete_1.ibd
-# insert_rollback_1.ibd
-# delete_0.ibd
-# delete_rollback_delete_0.ibd
-# insert_rollback_0.ibd
-check table delete_3, delete_rollback_delete_3, insert_rollback_3;
-Table Op Msg_type Msg_text
-test.delete_3 check status OK
-test.delete_rollback_delete_3 check status OK
-test.insert_rollback_3 check status OK
-drop table delete_3, delete_rollback_delete_3, insert_rollback_3;
-check table delete_2, delete_rollback_delete_2, insert_rollback_2;
-Table Op Msg_type Msg_text
-test.delete_2 check status OK
-test.delete_rollback_delete_2 check status OK
-test.insert_rollback_2 check status OK
-drop table delete_2, delete_rollback_delete_2, insert_rollback_2;
-check table delete_1, delete_rollback_delete_1, insert_rollback_1;
-Table Op Msg_type Msg_text
-test.delete_1 check status OK
-test.delete_rollback_delete_1 check status OK
-test.insert_rollback_1 check status OK
-drop table delete_1, delete_rollback_delete_1, insert_rollback_1;
-check table delete_0, delete_rollback_delete_0, insert_rollback_0;
-Table Op Msg_type Msg_text
-test.delete_0 check status OK
-test.delete_rollback_delete_0 check status OK
-test.insert_rollback_0 check status OK
-drop table delete_0, delete_rollback_delete_0, insert_rollback_0;
-show variables like 'innodb_%scrub_data%';
-Variable_name Value
-innodb_background_scrub_data_check_interval 3600
-innodb_background_scrub_data_compressed OFF
-innodb_background_scrub_data_interval 604800
-innodb_background_scrub_data_uncompressed OFF
-innodb_immediate_scrub_data_uncompressed ON
-# verify that this test have not caused any background scrubbing
-select ss.variable_name, gs.variable_value - ss.variable_value as variable_value
-from snapshot_status ss,
-information_schema.global_status gs
-where ss.variable_name = gs.variable_name;
-variable_name variable_value
-INNODB_SCRUB_BACKGROUND_PAGE_REORGANIZATIONS 0
-INNODB_SCRUB_BACKGROUND_PAGE_SPLITS 0
-INNODB_SCRUB_BACKGROUND_PAGE_SPLIT_FAILURES_MISSING_INDEX 0
-INNODB_SCRUB_BACKGROUND_PAGE_SPLIT_FAILURES_OUT_OF_FILESPACE 0
-INNODB_SCRUB_BACKGROUND_PAGE_SPLIT_FAILURES_UNDERFLOW 0
-INNODB_SCRUB_BACKGROUND_PAGE_SPLIT_FAILURES_UNKNOWN 0
-drop table snapshot_status;
diff --git a/mysql-test/suite/encryption/r/innodb_scrub_background.result b/mysql-test/suite/encryption/r/innodb_scrub_background.result
deleted file mode 100644
index 6a2f263d0a1..00000000000
--- a/mysql-test/suite/encryption/r/innodb_scrub_background.result
+++ /dev/null
@@ -1,160 +0,0 @@
-#
-# immediate scrubbing is off
-# background scrubbing is on
-#
-show variables like 'innodb_%scrub_data%';
-Variable_name Value
-innodb_background_scrub_data_check_interval 3600
-innodb_background_scrub_data_compressed ON
-innodb_background_scrub_data_interval 604800
-innodb_background_scrub_data_uncompressed ON
-innodb_immediate_scrub_data_uncompressed OFF
-# make sure spaces are checked quickly
-SET GLOBAL innodb_background_scrub_data_check_interval=1;
-create table delete_3 (
-a int auto_increment primary key,
-b varchar(256),
-c text,
-index(b)) engine = innodb row_format=compressed;
-# Populate table with rows
-delete from delete_3;
-create table delete_rollback_delete_3 (
-a int auto_increment primary key,
-b varchar(256),
-c text,
-index(b)) engine = innodb row_format=compressed;
-# Populate table with rows
-begin;
-delete from delete_rollback_delete_3;
-rollback;
-delete from delete_rollback_delete_3;
-create table insert_rollback_3 (
-a int auto_increment primary key,
-b varchar(256),
-c text,
-index(b)) engine = innodb row_format=compressed;
-# Populate table with rows
-begin;
-rollback;
-create table delete_2 (
-a int auto_increment primary key,
-b varchar(256),
-c text,
-index(b)) engine = innodb row_format=compact;
-# Populate table with rows
-delete from delete_2;
-create table delete_rollback_delete_2 (
-a int auto_increment primary key,
-b varchar(256),
-c text,
-index(b)) engine = innodb row_format=compact;
-# Populate table with rows
-begin;
-delete from delete_rollback_delete_2;
-rollback;
-delete from delete_rollback_delete_2;
-create table insert_rollback_2 (
-a int auto_increment primary key,
-b varchar(256),
-c text,
-index(b)) engine = innodb row_format=compact;
-# Populate table with rows
-begin;
-rollback;
-create table delete_1 (
-a int auto_increment primary key,
-b varchar(256),
-c text,
-index(b)) engine = innodb row_format=redundant;
-# Populate table with rows
-delete from delete_1;
-create table delete_rollback_delete_1 (
-a int auto_increment primary key,
-b varchar(256),
-c text,
-index(b)) engine = innodb row_format=redundant;
-# Populate table with rows
-begin;
-delete from delete_rollback_delete_1;
-rollback;
-delete from delete_rollback_delete_1;
-create table insert_rollback_1 (
-a int auto_increment primary key,
-b varchar(256),
-c text,
-index(b)) engine = innodb row_format=redundant;
-# Populate table with rows
-begin;
-rollback;
-create table delete_0 (
-a int auto_increment primary key,
-b varchar(256),
-c text,
-index(b)) engine = innodb row_format=dynamic;
-# Populate table with rows
-delete from delete_0;
-create table delete_rollback_delete_0 (
-a int auto_increment primary key,
-b varchar(256),
-c text,
-index(b)) engine = innodb row_format=dynamic;
-# Populate table with rows
-begin;
-delete from delete_rollback_delete_0;
-rollback;
-delete from delete_rollback_delete_0;
-create table insert_rollback_0 (
-a int auto_increment primary key,
-b varchar(256),
-c text,
-index(b)) engine = innodb row_format=dynamic;
-# Populate table with rows
-begin;
-rollback;
-# start scrubbing threads
-SET GLOBAL innodb_encryption_threads=5;
-# Wait max 10 min for scrubbing
-SET GLOBAL innodb_fast_shutdown=0;
-# delete_3.ibd
-# delete_rollback_delete_3.ibd
-# insert_rollback_3.ibd
-# delete_2.ibd
-# delete_rollback_delete_2.ibd
-# insert_rollback_2.ibd
-# delete_1.ibd
-# delete_rollback_delete_1.ibd
-# insert_rollback_1.ibd
-# delete_0.ibd
-# delete_rollback_delete_0.ibd
-# insert_rollback_0.ibd
-check table delete_3, delete_rollback_delete_3, insert_rollback_3;
-Table Op Msg_type Msg_text
-test.delete_3 check status OK
-test.delete_rollback_delete_3 check status OK
-test.insert_rollback_3 check status OK
-drop table delete_3, delete_rollback_delete_3, insert_rollback_3;
-check table delete_2, delete_rollback_delete_2, insert_rollback_2;
-Table Op Msg_type Msg_text
-test.delete_2 check status OK
-test.delete_rollback_delete_2 check status OK
-test.insert_rollback_2 check status OK
-drop table delete_2, delete_rollback_delete_2, insert_rollback_2;
-check table delete_1, delete_rollback_delete_1, insert_rollback_1;
-Table Op Msg_type Msg_text
-test.delete_1 check status OK
-test.delete_rollback_delete_1 check status OK
-test.insert_rollback_1 check status OK
-drop table delete_1, delete_rollback_delete_1, insert_rollback_1;
-check table delete_0, delete_rollback_delete_0, insert_rollback_0;
-Table Op Msg_type Msg_text
-test.delete_0 check status OK
-test.delete_rollback_delete_0 check status OK
-test.insert_rollback_0 check status OK
-drop table delete_0, delete_rollback_delete_0, insert_rollback_0;
-show variables like 'innodb_%scrub_data%';
-Variable_name Value
-innodb_background_scrub_data_check_interval 3600
-innodb_background_scrub_data_compressed ON
-innodb_background_scrub_data_interval 604800
-innodb_background_scrub_data_uncompressed ON
-innodb_immediate_scrub_data_uncompressed OFF
diff --git a/mysql-test/suite/encryption/r/tempfiles_encrypted.result b/mysql-test/suite/encryption/r/tempfiles_encrypted.result
index dea3e4f0968..4cf31200ee2 100644
--- a/mysql-test/suite/encryption/r/tempfiles_encrypted.result
+++ b/mysql-test/suite/encryption/r/tempfiles_encrypted.result
@@ -1748,8 +1748,7 @@ drop table t1;
#
create table t1(a int);
insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
-set @tmp=@@big_tables;
-set big_tables=1;
+set tmp_memory_table_size=0;
select rank() over (order by a) from t1;
rank() over (order by a)
1
@@ -1762,7 +1761,7 @@ rank() over (order by a)
8
9
10
-set big_tables=@tmp;
+set tmp_memory_table_size=default;
drop table t1;
#
# Check if "ORDER BY window_func" works
@@ -3769,7 +3768,8 @@ ANALYZE
"r_total_time_ms": "REPLACED",
"r_used_priority_queue": false,
"r_output_rows": 3,
- "r_buffer_size": "REPLACED"
+ "r_buffer_size": "REPLACED",
+ "r_sort_mode": "sort_key,rowid"
}
},
"temporary_table": {
@@ -3779,7 +3779,8 @@ ANALYZE
"r_loops": 1,
"rows": 3,
"r_rows": 3,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100
}
diff --git a/mysql-test/suite/encryption/t/aria_tiny.test b/mysql-test/suite/encryption/t/aria_tiny.test
index cad63ed16f1..337720eec52 100644
--- a/mysql-test/suite/encryption/t/aria_tiny.test
+++ b/mysql-test/suite/encryption/t/aria_tiny.test
@@ -1,12 +1,43 @@
+--source include/have_file_key_management_plugin.inc
+--source include/have_sequence.inc
+
+SET @aria_encrypt= @@aria_encrypt_tables;
+SET global aria_encrypt_tables=1;
#
# MDEV-8022 Assertion `rc == 0' failed in ma_encrypt on dropping an encrypted Aria table
#
---source include/have_file_key_management_plugin.inc
-
-set global aria_encrypt_tables = 1;
create table t1 (i int, key(i)) engine=aria;
insert into t1 values (1);
drop table t1;
-set global aria_encrypt_tables = 0;
+#
+# MDEV-17913 Encrypted transactional Aria tables remain corrupt after crash
+# recovery, automatic repair does not work
+#
+# We are using a simplifed version of the test here. This works thanks to
+# the extended check table code that also checks if LSN's are reasonable.
+#
+
+create table t1 (a int primary key, b int, c int, key(b),key(c)) engine=aria;
+alter table t1 disable keys;
+insert into t1 select seq,seq,seq from seq_1_to_100;
+alter table t1 enable keys;
+check table t1;
+drop table t1;
+
+--echo #
+--echo # MDEV CHECK on encrypted Aria table complains about "Wrong LSN"
+--echo #
+
+CREATE TABLE t1 (f DATE PRIMARY KEY) ENGINE=Aria;
+INSERT INTO t1 (f) VALUES ('1995-01-01'),('2000-01-01');
+DELETE FROM t1 WHERE f = '2000-01-01';
+OPTIMIZE TABLE t1;
+CHECK TABLE t1 EXTENDED;
+DROP TABLE t1;
+
+#
+# Cleanup
+#
+set global aria_encrypt_tables=@aria_encrypt;
diff --git a/mysql-test/suite/encryption/t/corrupted_during_recovery.test b/mysql-test/suite/encryption/t/corrupted_during_recovery.test
index 42cdd13d206..48445ccb08b 100644
--- a/mysql-test/suite/encryption/t/corrupted_during_recovery.test
+++ b/mysql-test/suite/encryption/t/corrupted_during_recovery.test
@@ -5,14 +5,16 @@
call mtr.add_suppression("InnoDB: Plugin initialization aborted");
call mtr.add_suppression("Plugin 'InnoDB' init function returned error");
call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed");
-call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed file read of tablespace test/t1 page");
-call mtr.add_suppression("InnoDB: Failed to read file '.*test.t1\\.ibd' at offset 3: Table is encrypted but decrypt failed");
+call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed read of file '.*test.t1\\.ibd' page");
+call mtr.add_suppression("InnoDB: Failed to read page [123] from file '.*test.t1\\.ibd': Table is encrypted but decrypt failed");
call mtr.add_suppression("InnoDB: The page \\[page id: space=\\d+, page number=3\\] in file '.*test.t1\\.ibd' cannot be decrypted");
call mtr.add_suppression("InnoDB: Table in tablespace \\d+ encrypted. However key management plugin or used key_version \\d+ is not found or used encryption algorithm or method does not match. Can't continue opening the table.");
--enable_query_log
let INNODB_CHECKSUM_ALGORITHM = `SELECT @@innodb_checksum_algorithm`;
let INNODB_PAGE_SIZE=`select @@innodb_page_size`;
+--echo # Work around MDEV-19541
+SET GLOBAL innodb_checksum_algorithm=crc32;
CREATE TABLE t1(a BIGINT PRIMARY KEY) ENGINE=InnoDB, ENCRYPTED=YES;
INSERT INTO t1 VALUES(1);
# Force a redo log checkpoint.
diff --git a/mysql-test/suite/encryption/t/innodb-force-corrupt.test b/mysql-test/suite/encryption/t/innodb-force-corrupt.test
index 8144f4597e2..51771f1e14b 100644
--- a/mysql-test/suite/encryption/t/innodb-force-corrupt.test
+++ b/mysql-test/suite/encryption/t/innodb-force-corrupt.test
@@ -10,7 +10,7 @@
call mtr.add_suppression("InnoDB: Table `test`\\.`t[13]` (has an unreadable root page|is corrupted)");
call mtr.add_suppression("InnoDB: Encrypted page \\[page id: space=\\d+, page number=[36]\\] in file .*test.t[123]\\.ibd looks corrupted; key_version=");
call mtr.add_suppression("\\[ERROR\\] InnoDB: We detected index corruption in an InnoDB type table");
-call mtr.add_suppression("\\[ERROR\\] mysqld.*: Index for table 't2' is corrupt; try to repair it");
+call mtr.add_suppression("\\[ERROR\\] (mysqld|mariadbd).*: Index for table 't2' is corrupt; try to repair it");
SET GLOBAL innodb_file_per_table = ON;
set global innodb_compression_algorithm = 1;
diff --git a/mysql-test/suite/encryption/t/innodb-redo-badkey.test b/mysql-test/suite/encryption/t/innodb-redo-badkey.test
index 50f81deb462..09ad7a7d5a3 100644
--- a/mysql-test/suite/encryption/t/innodb-redo-badkey.test
+++ b/mysql-test/suite/encryption/t/innodb-redo-badkey.test
@@ -9,11 +9,11 @@
call mtr.add_suppression("Plugin 'file_key_management'");
call mtr.add_suppression("Plugin 'InnoDB' init function returned error.");
-call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[0-9]+\\] in file '.*test/t[1-4]\\.ibd' cannot be decrypted");
+call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[1-4]\\.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: Unable to decompress .*.test.t[12]\\.ibd\\[page id: space=[1-9][0-9]*, page number=[0-9]+\\]");
-call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed file read of tablespace test/t[12] page \\[page id: space=[1-9][0-9]*, page number=[0-9]*\\]");
-call mtr.add_suppression("InnoDB: Failed to read file '.*' at offset .*");
+call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed read of file '.*test.t[12]\\.ibd'");
+call mtr.add_suppression("InnoDB: Failed to read page .* from file '.*'");
call mtr.add_suppression("InnoDB: Plugin initialization aborted");
call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed");
# for innodb_checksum_algorithm=full_crc32 only
diff --git a/mysql-test/suite/encryption/t/innodb-redo-nokeys.test b/mysql-test/suite/encryption/t/innodb-redo-nokeys.test
index 6fa28cd8ca8..3cd331a1019 100644
--- a/mysql-test/suite/encryption/t/innodb-redo-nokeys.test
+++ b/mysql-test/suite/encryption/t/innodb-redo-nokeys.test
@@ -3,7 +3,7 @@
# embedded does not support restart
-- source include/not_embedded.inc
-call mtr.add_suppression("mysqld: File .*");
+call mtr.add_suppression("(mysqld|mariadbd).*: File .*");
call mtr.add_suppression("Plugin 'file_key_management' .*");
call mtr.add_suppression("InnoDB: cannot enable encryption, encryption plugin is not available");
call mtr.add_suppression("Plugin 'InnoDB' init function returned error\\.");
diff --git a/mysql-test/suite/encryption/t/innodb-remove-encryption.test b/mysql-test/suite/encryption/t/innodb-remove-encryption.test
index 3d719dbef74..1982616aec2 100644
--- a/mysql-test/suite/encryption/t/innodb-remove-encryption.test
+++ b/mysql-test/suite/encryption/t/innodb-remove-encryption.test
@@ -9,7 +9,7 @@
set global innodb_file_per_table=OFF;
-call mtr.add_suppression("mysqld: file-key-management-filename is not set");
+call mtr.add_suppression("(mysqld|mariadbd).*: file-key-management-filename is not set");
call mtr.add_suppression("Plugin 'file_key_management' init function returned error.");
call mtr.add_suppression("Plugin 'file_key_management' registration as a ENCRYPTION failed.");
flush tables;
@@ -29,6 +29,7 @@ create table t1(a int not null primary key, b char(200)) engine=innodb;
--source include/wait_condition.inc
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0;
+--sorted_result
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0;
--echo # Success!
@@ -41,6 +42,7 @@ SET GLOBAL innodb_encrypt_tables = off;
--let $wait_condition=SELECT COUNT(*) = $tables_count FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0 AND ROTATING_OR_FLUSHING = 0;
--source include/wait_condition.inc
+--sorted_result
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0;
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0;
@@ -51,6 +53,7 @@ SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_
--let $restart_parameters=--skip-file-key-management --innodb-encrypt-tables=OFF --innodb-encryption-threads=0 --innodb-tablespaces-encryption
-- source include/restart_mysqld.inc
+--sorted_result
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0;
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0;
diff --git a/mysql-test/suite/encryption/t/innodb-scrub-log.opt b/mysql-test/suite/encryption/t/innodb-scrub-log.opt
deleted file mode 100644
index 0078065bbf7..00000000000
--- a/mysql-test/suite/encryption/t/innodb-scrub-log.opt
+++ /dev/null
@@ -1 +0,0 @@
---loose-innodb-scrub-log=on
diff --git a/mysql-test/suite/encryption/t/innodb-scrub-log.test b/mysql-test/suite/encryption/t/innodb-scrub-log.test
deleted file mode 100644
index e8149b6b3ff..00000000000
--- a/mysql-test/suite/encryption/t/innodb-scrub-log.test
+++ /dev/null
@@ -1,13 +0,0 @@
---source include/have_innodb.inc
-
-#
-# MDEV-11705: InnoDB: Failing assertion: (&log_sys.mutex)->is_owned() if server started with innodb-scrub-log
-#
-
-create table t1(a int not null primary key auto_increment,
-b varchar(200), c char(100), d varchar(150)) engine=innodb;
-
-let $wait_condition= SELECT variable_value FROM information_schema.global_status WHERE variable_name = 'innodb_scrub_log';
---source include/wait_condition.inc
-
-DROP TABLE t1;
diff --git a/mysql-test/suite/encryption/t/innodb_encrypt_freed.opt b/mysql-test/suite/encryption/t/innodb_encrypt_freed.opt
index f6f932c680d..221e38367f5 100644
--- a/mysql-test/suite/encryption/t/innodb_encrypt_freed.opt
+++ b/mysql-test/suite/encryption/t/innodb_encrypt_freed.opt
@@ -2,4 +2,3 @@
--innodb-encrypt-log
--innodb-encryption-threads=1
--innodb-tablespaces-encryption
---innodb-log-optimize-ddl=OFF
diff --git a/mysql-test/suite/encryption/t/innodb_encrypt_freed.test b/mysql-test/suite/encryption/t/innodb_encrypt_freed.test
index 951fc93eef5..785b4e9e498 100644
--- a/mysql-test/suite/encryption/t/innodb_encrypt_freed.test
+++ b/mysql-test/suite/encryption/t/innodb_encrypt_freed.test
@@ -22,7 +22,6 @@ SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_
CREATE TABLE t2 (f1 int not null)engine=innodb;
let $restart_parameters="--debug=d,ib_log_checkpoint_avoid";
--source include/restart_mysqld.inc
-SET GLOBAL innodb_log_checkpoint_now=TRUE;
# Stop the purge
connect(con1,localhost,root,,,);
@@ -56,7 +55,6 @@ SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_
disconnect con1;
let $shutdown_timeout=0;
--source include/restart_mysqld.inc
-SET GLOBAL innodb_log_checkpoint_now=TRUE;
drop table t1, t2;
@@ -76,7 +74,6 @@ SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_
CREATE TABLE t2 (f1 int not null)engine=innodb;
--source include/restart_mysqld.inc
-SET GLOBAL innodb_log_checkpoint_now=TRUE;
# Stop the purge
connect(con1,localhost,root,,,);
@@ -100,7 +97,6 @@ alter table t1 drop index idx_1;
disconnect con1;
--source include/restart_mysqld.inc
-SET GLOBAL innodb_log_checkpoint_now=TRUE;
# Stop the purge
connect(con1,localhost,root,,,);
diff --git a/mysql-test/suite/encryption/t/innodb_encrypt_key_rotation_age.test b/mysql-test/suite/encryption/t/innodb_encrypt_key_rotation_age.test
index bc4c43e1ce8..ef38560c469 100644
--- a/mysql-test/suite/encryption/t/innodb_encrypt_key_rotation_age.test
+++ b/mysql-test/suite/encryption/t/innodb_encrypt_key_rotation_age.test
@@ -26,6 +26,7 @@ let $restart_parameters= --innodb_encryption_threads=5 --innodb_encryption_rotat
--source include/wait_condition.inc
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0;
+--sorted_result
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0;
--echo # Restart the server with innodb_encryption_rotate_key_age= 0
@@ -45,6 +46,7 @@ create table t4 (f1 int not null)engine=innodb encrypted=NO;
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0;
+--sorted_result
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0;
--echo # Disable encryption when innodb_encryption_rotate_key_age is 0
@@ -57,6 +59,7 @@ set global innodb_encrypt_tables = OFF;
--let $wait_condition=SELECT COUNT(*) >= $tables_count FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0 AND ROTATING_OR_FLUSHING = 0;
--source include/wait_condition.inc
+--sorted_result
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0;
--echo # Display only encrypted create tables (t3)
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0;
@@ -73,11 +76,13 @@ set global innodb_encrypt_tables = ON;
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0;
--echo # Display only unencrypted create tables (t4)
+--sorted_result
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0;
--let $restart_parameters=
-- source include/restart_mysqld.inc
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0;
+--sorted_result
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0;
DROP TABLE t4, t3, t2, t1;
diff --git a/mysql-test/suite/encryption/t/innodb_encrypt_log.opt b/mysql-test/suite/encryption/t/innodb_encrypt_log.opt
index 34dc9a80f87..24046fe779a 100644
--- a/mysql-test/suite/encryption/t/innodb_encrypt_log.opt
+++ b/mysql-test/suite/encryption/t/innodb_encrypt_log.opt
@@ -3,5 +3,4 @@
--plugin-load-add=$FILE_KEY_MANAGEMENT_SO
--loose-file-key-management
--loose-file-key-management-filename=$MYSQL_TEST_DIR/std_data/logkey.txt
---innodb-log-files-in-group=1
--file-key-management-encryption-algorithm=aes_cbc
diff --git a/mysql-test/suite/encryption/t/innodb_encrypt_log.test b/mysql-test/suite/encryption/t/innodb_encrypt_log.test
index 4b3d92e876c..ead00ba54b8 100644
--- a/mysql-test/suite/encryption/t/innodb_encrypt_log.test
+++ b/mysql-test/suite/encryption/t/innodb_encrypt_log.test
@@ -59,7 +59,7 @@ INSERT INTO t0
-- source include/search_pattern_in_file.inc
--echo # Restart without redo log encryption
--- let $restart_parameters=--skip-innodb-encrypt-log --innodb-log-files-in-group=1
+-- let $restart_parameters=--skip-innodb-encrypt-log
-- source include/start_mysqld.inc
SELECT COUNT(*) FROM t0;
diff --git a/mysql-test/suite/encryption/t/innodb_encryption-page-compression.test b/mysql-test/suite/encryption/t/innodb_encryption-page-compression.test
index ad1a9ea8671..57c8721282f 100644
--- a/mysql-test/suite/encryption/t/innodb_encryption-page-compression.test
+++ b/mysql-test/suite/encryption/t/innodb_encryption-page-compression.test
@@ -1,6 +1,8 @@
-- source include/have_innodb.inc
-- source include/have_example_key_management_plugin.inc
-- source include/not_embedded.inc
+# This test is too slow for valgrind and causes innnodb semaphores to time out
+-- source include/not_valgrind.inc
let $innodb_encrypt_tables_orig = `SELECT @@innodb_encrypt_tables`;
let $innodb_encryption_threads_orig = `SELECT @@innodb_encryption_threads`;
diff --git a/mysql-test/suite/encryption/t/innodb_encryption_discard_import.opt b/mysql-test/suite/encryption/t/innodb_encryption_discard_import.opt
index bcff011eb82..9fe990f7260 100644
--- a/mysql-test/suite/encryption/t/innodb_encryption_discard_import.opt
+++ b/mysql-test/suite/encryption/t/innodb_encryption_discard_import.opt
@@ -3,6 +3,5 @@
--innodb-encryption-rotate-key-age=15
--innodb-encryption-threads=4
--innodb-tablespaces-encryption
+--innodb-max-dirty-pages-pct_lwm=0
--innodb-max-dirty-pages-pct=0.001
-
-
diff --git a/mysql-test/suite/encryption/t/innodb_first_page.test b/mysql-test/suite/encryption/t/innodb_first_page.test
index 58095e5e110..7f2f915d010 100644
--- a/mysql-test/suite/encryption/t/innodb_first_page.test
+++ b/mysql-test/suite/encryption/t/innodb_first_page.test
@@ -9,7 +9,6 @@ let $datadir=`select @@datadir`;
--source include/shutdown_mysqld.inc
--remove_file $datadir/ib_logfile0
---remove_file $datadir/ib_logfile1
--remove_file $datadir/ibdata1
--source include/start_mysqld.inc
diff --git a/mysql-test/suite/encryption/t/innodb_import.opt b/mysql-test/suite/encryption/t/innodb_import.opt
new file mode 100644
index 00000000000..c44c611ed60
--- /dev/null
+++ b/mysql-test/suite/encryption/t/innodb_import.opt
@@ -0,0 +1 @@
+--innodb-checksum-algorithm=crc32
diff --git a/mysql-test/suite/encryption/t/innodb_scrub.opt b/mysql-test/suite/encryption/t/innodb_scrub.opt
deleted file mode 100644
index ef43b2a20a8..00000000000
--- a/mysql-test/suite/encryption/t/innodb_scrub.opt
+++ /dev/null
@@ -1,7 +0,0 @@
---innodb-background-scrub-data-compressed=OFF
---innodb-background-scrub-data-uncompressed=OFF
---innodb-encrypt-tables=OFF
---innodb-encryption-threads=0
---innodb-immediate-scrub-data-uncompressed=ON
---loose-innodb-debug-force-scrubbing=ON
---innodb-tablespaces-scrubbing
diff --git a/mysql-test/suite/encryption/t/innodb_scrub.test b/mysql-test/suite/encryption/t/innodb_scrub.test
deleted file mode 100644
index 3288ae9ce1c..00000000000
--- a/mysql-test/suite/encryption/t/innodb_scrub.test
+++ /dev/null
@@ -1,147 +0,0 @@
--- source include/have_innodb.inc
--- source include/not_embedded.inc
--- source include/have_example_key_management_plugin.inc
-
-let $MYSQLD_DATADIR=`select @@datadir`;
-let INNODB_PAGE_SIZE= `select @@innodb_page_size`;
-
-create table snapshot_status engine = myisam
-select * from information_schema.global_status
-where variable_name like 'innodb_scrub_background%';
-
-let $rowcount=500;
-let $maxformatno= 4;
-let $formatno= $maxformatno;
-
---echo # MDEV-8139 Fix scrubbing tests
---echo # FIXME: Add index(b) to each table; ensure that undo logs are scrubbed.
-let $tableformat= (
- a int auto_increment primary key,
- b varchar(256),
- c text) engine = innodb row_format;
-
-while ($formatno)
-{
-dec $formatno;
-let $format = `select case $formatno
- when 0 then 'dynamic'
- when 1 then 'redundant'
- when 2 then 'compact'
- when 3 then 'compressed'
- end`;
-
-let $t= delete_$formatno;
-eval create table $t $tableformat=$format;
-
-let $numinserts = $rowcount;
---disable_query_log
-begin;
-while ($numinserts)
-{
- dec $numinserts;
- eval insert into $t(b,c) values ('repairman', repeat('unicycle', 1000));
-}
-commit;
---enable_query_log
-
-eval delete from $t;
-
-let $t= delete_rollback_delete_$formatno;
-eval create table $t $tableformat=$format;
-
-let $numinserts = $rowcount;
---disable_query_log
-begin;
-while ($numinserts)
-{
- dec $numinserts;
- eval insert into $t(b,c) values ('breakhuman', repeat('bicycle', 1000));
-}
-commit;
---enable_query_log
-
-begin;
-eval delete from $t;
-rollback;
-eval delete from $t;
-
-let $t= insert_rollback_$formatno;
-
-eval create table $t $tableformat=$format;
-
-let $numinserts = $rowcount;
-begin;
---disable_query_log
-while ($numinserts)
-{
- dec $numinserts;
- eval insert into $t(b,c) values ('wonderwoman', repeat('tricycle', 1000));
-}
---enable_query_log
-
-rollback;
-}
-
-SET GLOBAL innodb_fast_shutdown=0;
--- source include/shutdown_mysqld.inc
-
-let SEARCH_ABORT= FOUND;
-let SEARCH_PATTERN= (un|b|tr)icycle|(repair|breakhu|wonderwo)man;
-let SEARCH_RANGE= 12582912;
-let SEARCH_FILE= $MYSQLD_DATADIR/ibdata1;
-
-# We may randomly find copies of unscrubbed pages in the doublewrite buffer.
-# Let us scrub the doublewrite buffer ourselves.
-perl;
-use Fcntl 'SEEK_SET';
-my $page_size = $ENV{INNODB_PAGE_SIZE};
-open(FILE, "+<", "$ENV{SEARCH_FILE}") or die "cannot open: $!\n";
-seek(FILE, $page_size * 64, SEEK_SET) or die "cannot seek: $!\n";
-print(FILE chr(0) x ($page_size * 128)) or die "cannot write: $!\n";
-close FILE or die "cannot close: $!\n";;
-EOF
-
--- source include/search_pattern_in_file.inc
-
-let $formatno= $maxformatno;
-while ($formatno)
-{
-dec $formatno;
-
-let $t= delete_$formatno.ibd;
-let SEARCH_FILE= $MYSQLD_DATADIR/test/$t;
--- echo # $t
--- source include/search_pattern_in_file.inc
-let $t= delete_rollback_delete_$formatno.ibd;
-let SEARCH_FILE= $MYSQLD_DATADIR/test/$t;
--- echo # $t
--- source include/search_pattern_in_file.inc
-let $t= insert_rollback_$formatno.ibd;
-let SEARCH_FILE= $MYSQLD_DATADIR/test/$t;
--- echo # $t
--- source include/search_pattern_in_file.inc
-}
-
--- source include/start_mysqld.inc
-
-let $formatno= $maxformatno;
-while ($formatno)
-{
-dec $formatno;
-
-let $t= delete_$formatno, delete_rollback_delete_$formatno, insert_rollback_$formatno;
-
-eval check table $t;
-eval drop table $t;
-}
-
-show variables like 'innodb_%scrub_data%';
-
---echo # verify that this test have not caused any background scrubbing
---sorted_result
-select ss.variable_name, gs.variable_value - ss.variable_value as variable_value
-from snapshot_status ss,
- information_schema.global_status gs
-where ss.variable_name = gs.variable_name;
-
-drop table snapshot_status;
diff --git a/mysql-test/suite/encryption/t/innodb_scrub_background.opt b/mysql-test/suite/encryption/t/innodb_scrub_background.opt
deleted file mode 100644
index 04987f4a3ad..00000000000
--- a/mysql-test/suite/encryption/t/innodb_scrub_background.opt
+++ /dev/null
@@ -1,7 +0,0 @@
---innodb-immediate-scrub-data-uncompressed=OFF
---innodb-background-scrub-data-uncompressed=ON
---innodb-background-scrub-data-compressed=ON
---loose-innodb-debug-force-scrubbing=ON
---innodb-encryption-threads=0
---innodb-encrypt-tables=OFF
---innodb-tablespaces-scrubbing
diff --git a/mysql-test/suite/encryption/t/innodb_scrub_background.test b/mysql-test/suite/encryption/t/innodb_scrub_background.test
deleted file mode 100644
index 3843e9d16eb..00000000000
--- a/mysql-test/suite/encryption/t/innodb_scrub_background.test
+++ /dev/null
@@ -1,170 +0,0 @@
--- source include/have_innodb.inc
--- source include/not_embedded.inc
--- source include/have_example_key_management_plugin.inc
-
-let $MYSQLD_DATADIR=`select @@datadir`;
-let INNODB_PAGE_SIZE= `select @@innodb_page_size`;
-
---echo #
---echo # immediate scrubbing is off
---echo # background scrubbing is on
---echo #
-show variables like 'innodb_%scrub_data%';
-
--- echo # make sure spaces are checked quickly
-SET GLOBAL innodb_background_scrub_data_check_interval=1;
-
-let $rowcount=500;
-let $maxformatno= 4;
-let $formatno= $maxformatno;
-
-let $tableformat= (
- a int auto_increment primary key,
- b varchar(256),
- c text,
- index(b)) engine = innodb row_format;
-
-while ($formatno)
-{
-dec $formatno;
-let $format = `select case $formatno
- when 0 then 'dynamic'
- when 1 then 'redundant'
- when 2 then 'compact'
- when 3 then 'compressed'
- end`;
-
-let $t= delete_$formatno;
-eval create table $t $tableformat=$format;
-
-let $numinserts = $rowcount;
--- echo # Populate table with rows
---disable_query_log
-begin;
-while ($numinserts)
-{
- dec $numinserts;
- eval insert into $t(b,c) values ('unicycle', repeat('wonderwoman', 1000));
-}
-commit;
---enable_query_log
-
-eval delete from $t;
-
-let $t= delete_rollback_delete_$formatno;
-
-eval create table $t $tableformat=$format;
-
-let $numinserts = $rowcount;
--- echo # Populate table with rows
---disable_query_log
-begin;
-while ($numinserts)
-{
- dec $numinserts;
- eval insert into $t(b,c) values ('bicycle', repeat('repairman', 1000));
-}
-commit;
---enable_query_log
-
-begin;
-eval delete from $t;
-rollback;
-eval delete from $t;
-
-let $t= insert_rollback_$formatno;
-
-eval create table $t $tableformat=$format;
-
-let $numinserts = $rowcount;
--- echo # Populate table with rows
-begin;
---disable_query_log
-while ($numinserts)
-{
- dec $numinserts;
- eval insert into $t(b,c) values ('tricycle', repeat('superhuman', 1000));
-}
---enable_query_log
-
-rollback;
-}
-
--- echo # start scrubbing threads
-SET GLOBAL innodb_encryption_threads=5;
--- echo # Wait max 10 min for scrubbing
-let $cnt=600;
-while ($cnt)
-{
- let $success=`SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_SCRUBBING WHERE LAST_SCRUB_COMPLETED IS NULL AND (NAME LIKE 'test/%' OR SPACE = 0)`;
- if ($success)
- {
- let $cnt=0;
- }
- if (!$success)
- {
- real_sleep 1;
- dec $cnt;
- }
-}
-if (!$success)
-{
- SELECT * FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_SCRUBBING;
- SHOW STATUS LIKE 'innodb_%scrub%';
- -- die Timeout waiting for background threads
-}
-
-SET GLOBAL innodb_fast_shutdown=0;
--- source include/shutdown_mysqld.inc
-
-let SEARCH_ABORT= FOUND;
-let SEARCH_PATTERN= (un|b|tr)icycle|(repair|breakhu|wonderwo)man;
-let SEARCH_RANGE= 12582912;
-let SEARCH_FILE= $MYSQLD_DATADIR/ibdata1;
-
-# We may randomly find copies of unscrubbed pages in the doublewrite buffer.
-# Let us scrub the doublewrite buffer ourselves.
-perl;
-use Fcntl 'SEEK_SET';
-my $page_size = $ENV{INNODB_PAGE_SIZE};
-open(FILE, "+<", "$ENV{SEARCH_FILE}") or die "cannot open: $!\n";
-seek(FILE, $page_size * 64, SEEK_SET) or die "cannot seek: $!\n";
-print(FILE chr(0) x ($page_size * 128)) or die "cannot write: $!\n";
-close FILE or die "cannot close: $!\n";;
-EOF
-
--- source include/search_pattern_in_file.inc
-
-let $formatno= $maxformatno;
-while ($formatno)
-{
-dec $formatno;
-
-let $t= delete_$formatno.ibd;
-let SEARCH_FILE= $MYSQLD_DATADIR/test/$t;
--- echo # $t
--- source include/search_pattern_in_file.inc
-let $t= delete_rollback_delete_$formatno.ibd;
-let SEARCH_FILE= $MYSQLD_DATADIR/test/$t;
--- echo # $t
--- source include/search_pattern_in_file.inc
-let $t= insert_rollback_$formatno.ibd;
-let SEARCH_FILE= $MYSQLD_DATADIR/test/$t;
--- echo # $t
--- source include/search_pattern_in_file.inc
-}
-
--- source include/start_mysqld.inc
-
-let $formatno= $maxformatno;
-while ($formatno)
-{
-dec $formatno;
-
-let $t= delete_$formatno, delete_rollback_delete_$formatno, insert_rollback_$formatno;
-
-eval check table $t;
-eval drop table $t;
-}
-
-show variables like 'innodb_%scrub_data%';
diff --git a/mysql-test/suite/engines/funcs/r/db_alter_character_set.result b/mysql-test/suite/engines/funcs/r/db_alter_character_set.result
index 48351449a72..ad0cf41bdf1 100644
--- a/mysql-test/suite/engines/funcs/r/db_alter_character_set.result
+++ b/mysql-test/suite/engines/funcs/r/db_alter_character_set.result
@@ -43,381 +43,381 @@ cp932 SJIS for Windows Japanese cp932_japanese_ci 2
eucjpms UJIS for Windows Japanese eucjpms_japanese_ci 3
CREATE DATABASE d8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d8 latin1 latin1_swedish_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d8 latin1 latin1_swedish_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER DATABASE d8 CHARACTER SET ascii;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d8 ascii ascii_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d8 ascii ascii_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d8;
CREATE DATABASE d8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d8 latin1 latin1_swedish_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d8 latin1 latin1_swedish_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER DATABASE d8 CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d8 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d8 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d8;
CREATE DATABASE d8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d8 latin1 latin1_swedish_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d8 latin1 latin1_swedish_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER DATABASE d8 CHARACTER SET binary;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d8 binary binary NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d8 binary binary NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d8;
CREATE DATABASE d8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d8 latin1 latin1_swedish_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d8 latin1 latin1_swedish_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER DATABASE d8 CHARACTER SET swe7;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d8 swe7 swe7_swedish_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d8 swe7 swe7_swedish_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d8;
CREATE DATABASE d8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d8 latin1 latin1_swedish_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d8 latin1 latin1_swedish_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER DATABASE d8 CHARACTER SET cp1251;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d8 cp1251 cp1251_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d8 cp1251 cp1251_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d8;
CREATE DATABASE d8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d8 latin1 latin1_swedish_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d8 latin1 latin1_swedish_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER DATABASE d8 DEFAULT CHARACTER SET ascii;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d8 ascii ascii_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d8 ascii ascii_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d8;
CREATE DATABASE d8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d8 latin1 latin1_swedish_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d8 latin1 latin1_swedish_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER DATABASE d8 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d8 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d8 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d8;
CREATE DATABASE d8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d8 latin1 latin1_swedish_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d8 latin1 latin1_swedish_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER DATABASE d8 DEFAULT CHARACTER SET binary;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d8 binary binary NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d8 binary binary NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d8;
CREATE DATABASE d8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d8 latin1 latin1_swedish_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d8 latin1 latin1_swedish_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER DATABASE d8 DEFAULT CHARACTER SET swe7;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d8 swe7 swe7_swedish_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d8 swe7 swe7_swedish_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d8;
CREATE DATABASE d8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d8 latin1 latin1_swedish_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d8 latin1 latin1_swedish_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER DATABASE d8 DEFAULT CHARACTER SET cp1251;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d8 cp1251 cp1251_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d8 cp1251 cp1251_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d8;
CREATE DATABASE d8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d8 latin1 latin1_swedish_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d8 latin1 latin1_swedish_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER SCHEMA d8 CHARACTER SET ascii;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d8 ascii ascii_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d8 ascii ascii_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d8;
CREATE DATABASE d8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d8 latin1 latin1_swedish_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d8 latin1 latin1_swedish_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER SCHEMA d8 CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d8 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d8 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d8;
CREATE DATABASE d8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d8 latin1 latin1_swedish_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d8 latin1 latin1_swedish_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER SCHEMA d8 CHARACTER SET binary;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d8 binary binary NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d8 binary binary NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d8;
CREATE DATABASE d8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d8 latin1 latin1_swedish_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d8 latin1 latin1_swedish_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER SCHEMA d8 CHARACTER SET swe7;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d8 swe7 swe7_swedish_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d8 swe7 swe7_swedish_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d8;
CREATE DATABASE d8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d8 latin1 latin1_swedish_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d8 latin1 latin1_swedish_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER SCHEMA d8 CHARACTER SET cp1251;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d8 cp1251 cp1251_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d8 cp1251 cp1251_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d8;
CREATE DATABASE d8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d8 latin1 latin1_swedish_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d8 latin1 latin1_swedish_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER SCHEMA d8 DEFAULT CHARACTER SET ascii;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d8 ascii ascii_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d8 ascii ascii_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d8;
CREATE DATABASE d8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d8 latin1 latin1_swedish_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d8 latin1 latin1_swedish_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER SCHEMA d8 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d8 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d8 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d8;
CREATE DATABASE d8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d8 latin1 latin1_swedish_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d8 latin1 latin1_swedish_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER SCHEMA d8 DEFAULT CHARACTER SET binary;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d8 binary binary NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d8 binary binary NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d8;
CREATE DATABASE d8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d8 latin1 latin1_swedish_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d8 latin1 latin1_swedish_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER SCHEMA d8 DEFAULT CHARACTER SET swe7;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d8 swe7 swe7_swedish_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d8 swe7 swe7_swedish_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d8;
CREATE DATABASE d8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d8 latin1 latin1_swedish_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d8 latin1 latin1_swedish_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER SCHEMA d8 DEFAULT CHARACTER SET cp1251;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d8 cp1251 cp1251_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d8 cp1251 cp1251_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d8;
diff --git a/mysql-test/suite/engines/funcs/r/db_alter_character_set_collate.result b/mysql-test/suite/engines/funcs/r/db_alter_character_set_collate.result
index b16ddd6e50f..d01b85d9039 100644
--- a/mysql-test/suite/engines/funcs/r/db_alter_character_set_collate.result
+++ b/mysql-test/suite/engines/funcs/r/db_alter_character_set_collate.result
@@ -1,115 +1,115 @@
DROP DATABASE IF EXISTS d11;
CREATE DATABASE d11 DEFAULT CHARACTER SET ascii DEFAULT COLLATE ascii_bin;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d11 ascii ascii_bin NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d11 ascii ascii_bin NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER DATABASE d11 CHARACTER SET utf8 COLLATE utf8_general_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d11 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d11 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d11;
CREATE DATABASE d11 DEFAULT CHARACTER SET ascii DEFAULT COLLATE ascii_bin;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d11 ascii ascii_bin NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d11 ascii ascii_bin NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER DATABASE d11 CHARACTER SET latin2 COLLATE latin2_general_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d11 latin2 latin2_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d11 latin2 latin2_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d11;
CREATE DATABASE d11 DEFAULT CHARACTER SET ascii DEFAULT COLLATE ascii_bin;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d11 ascii ascii_bin NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d11 ascii ascii_bin NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER DATABASE d11 CHARACTER SET cp1250 COLLATE cp1250_croatian_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d11 cp1250 cp1250_croatian_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d11 cp1250 cp1250_croatian_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d11;
CREATE DATABASE d11 DEFAULT CHARACTER SET ascii DEFAULT COLLATE ascii_bin;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d11 ascii ascii_bin NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d11 ascii ascii_bin NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER SCHEMA d11 CHARACTER SET utf8 COLLATE utf8_general_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d11 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d11 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d11;
CREATE DATABASE d11 DEFAULT CHARACTER SET ascii DEFAULT COLLATE ascii_bin;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d11 ascii ascii_bin NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d11 ascii ascii_bin NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER SCHEMA d11 CHARACTER SET latin2 COLLATE latin2_general_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d11 latin2 latin2_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d11 latin2 latin2_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d11;
CREATE DATABASE d11 DEFAULT CHARACTER SET ascii DEFAULT COLLATE ascii_bin;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d11 ascii ascii_bin NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d11 ascii ascii_bin NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER SCHEMA d11 CHARACTER SET cp1250 COLLATE cp1250_croatian_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d11 cp1250 cp1250_croatian_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d11 cp1250 cp1250_croatian_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d11;
diff --git a/mysql-test/suite/engines/funcs/r/db_alter_collate_ascii.result b/mysql-test/suite/engines/funcs/r/db_alter_collate_ascii.result
index a7217ba424e..0b06979ee1d 100644
--- a/mysql-test/suite/engines/funcs/r/db_alter_collate_ascii.result
+++ b/mysql-test/suite/engines/funcs/r/db_alter_collate_ascii.result
@@ -325,153 +325,153 @@ eucjpms_japanese_nopad_ci eucjpms 1121 # #
eucjpms_nopad_bin eucjpms 1122 # #
CREATE DATABASE d9 DEFAULT CHARACTER SET ascii;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d9 ascii ascii_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d9 ascii ascii_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER DATABASE d9 COLLATE ascii_bin;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d9 ascii ascii_bin NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d9 ascii ascii_bin NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d9;
CREATE DATABASE d9 DEFAULT CHARACTER SET ascii;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d9 ascii ascii_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d9 ascii ascii_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER DATABASE d9 DEFAULT COLLATE ascii_bin;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d9 ascii ascii_bin NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d9 ascii ascii_bin NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d9;
CREATE DATABASE d9 DEFAULT CHARACTER SET ascii;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d9 ascii ascii_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d9 ascii ascii_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER DATABASE d9 COLLATE ascii_general_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d9 ascii ascii_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d9 ascii ascii_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d9;
CREATE DATABASE d9 DEFAULT CHARACTER SET ascii;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d9 ascii ascii_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d9 ascii ascii_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER DATABASE d9 DEFAULT COLLATE ascii_general_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d9 ascii ascii_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d9 ascii ascii_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d9;
CREATE DATABASE d9 DEFAULT CHARACTER SET ascii;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d9 ascii ascii_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d9 ascii ascii_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER SCHEMA d9 COLLATE ascii_bin;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d9 ascii ascii_bin NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d9 ascii ascii_bin NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d9;
CREATE DATABASE d9 DEFAULT CHARACTER SET ascii;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d9 ascii ascii_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d9 ascii ascii_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER SCHEMA d9 DEFAULT COLLATE ascii_bin;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d9 ascii ascii_bin NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d9 ascii ascii_bin NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d9;
CREATE DATABASE d9 DEFAULT CHARACTER SET ascii;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d9 ascii ascii_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d9 ascii ascii_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER SCHEMA d9 COLLATE ascii_general_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d9 ascii ascii_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d9 ascii ascii_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d9;
CREATE DATABASE d9 DEFAULT CHARACTER SET ascii;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d9 ascii ascii_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d9 ascii ascii_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER SCHEMA d9 DEFAULT COLLATE ascii_general_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d9 ascii ascii_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d9 ascii ascii_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d9;
diff --git a/mysql-test/suite/engines/funcs/r/db_alter_collate_utf8.result b/mysql-test/suite/engines/funcs/r/db_alter_collate_utf8.result
index 8304b3a0f96..1b875962417 100644
--- a/mysql-test/suite/engines/funcs/r/db_alter_collate_utf8.result
+++ b/mysql-test/suite/engines/funcs/r/db_alter_collate_utf8.result
@@ -325,1597 +325,1597 @@ eucjpms_japanese_nopad_ci eucjpms 1121 # #
eucjpms_nopad_bin eucjpms 1122 # #
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER DATABASE d10 COLLATE utf8_general_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER DATABASE d10 DEFAULT COLLATE utf8_general_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER DATABASE d10 COLLATE utf8_bin;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_bin NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_bin NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER DATABASE d10 DEFAULT COLLATE utf8_bin;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_bin NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_bin NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER DATABASE d10 COLLATE utf8_unicode_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_unicode_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_unicode_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER DATABASE d10 DEFAULT COLLATE utf8_unicode_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_unicode_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_unicode_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER DATABASE d10 COLLATE utf8_icelandic_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_icelandic_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_icelandic_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER DATABASE d10 DEFAULT COLLATE utf8_icelandic_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_icelandic_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_icelandic_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER DATABASE d10 COLLATE utf8_latvian_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_latvian_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_latvian_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER DATABASE d10 DEFAULT COLLATE utf8_latvian_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_latvian_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_latvian_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER DATABASE d10 COLLATE utf8_romanian_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_romanian_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_romanian_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER DATABASE d10 DEFAULT COLLATE utf8_romanian_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_romanian_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_romanian_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER DATABASE d10 COLLATE utf8_slovenian_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_slovenian_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_slovenian_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER DATABASE d10 DEFAULT COLLATE utf8_slovenian_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_slovenian_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_slovenian_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER DATABASE d10 COLLATE utf8_polish_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_polish_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_polish_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER DATABASE d10 DEFAULT COLLATE utf8_polish_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_polish_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_polish_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER DATABASE d10 COLLATE utf8_estonian_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_estonian_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_estonian_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER DATABASE d10 DEFAULT COLLATE utf8_estonian_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_estonian_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_estonian_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER DATABASE d10 COLLATE utf8_spanish_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_spanish_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_spanish_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER DATABASE d10 DEFAULT COLLATE utf8_spanish_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_spanish_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_spanish_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER DATABASE d10 COLLATE utf8_swedish_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_swedish_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_swedish_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER DATABASE d10 DEFAULT COLLATE utf8_swedish_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_swedish_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_swedish_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER DATABASE d10 COLLATE utf8_turkish_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_turkish_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_turkish_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER DATABASE d10 DEFAULT COLLATE utf8_turkish_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_turkish_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_turkish_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER DATABASE d10 COLLATE utf8_czech_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_czech_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_czech_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER DATABASE d10 DEFAULT COLLATE utf8_czech_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_czech_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_czech_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER DATABASE d10 COLLATE utf8_danish_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_danish_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_danish_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER DATABASE d10 DEFAULT COLLATE utf8_danish_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_danish_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_danish_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER DATABASE d10 COLLATE utf8_lithuanian_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_lithuanian_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_lithuanian_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER DATABASE d10 DEFAULT COLLATE utf8_lithuanian_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_lithuanian_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_lithuanian_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER DATABASE d10 COLLATE utf8_slovak_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_slovak_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_slovak_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER DATABASE d10 DEFAULT COLLATE utf8_slovak_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_slovak_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_slovak_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER DATABASE d10 COLLATE utf8_spanish2_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_spanish2_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_spanish2_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER DATABASE d10 DEFAULT COLLATE utf8_spanish2_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_spanish2_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_spanish2_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER DATABASE d10 COLLATE utf8_roman_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_roman_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_roman_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER DATABASE d10 DEFAULT COLLATE utf8_roman_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_roman_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_roman_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER DATABASE d10 COLLATE utf8_persian_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_persian_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_persian_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER DATABASE d10 DEFAULT COLLATE utf8_persian_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_persian_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_persian_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER DATABASE d10 COLLATE utf8_esperanto_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_esperanto_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_esperanto_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER DATABASE d10 DEFAULT COLLATE utf8_esperanto_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_esperanto_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_esperanto_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER DATABASE d10 COLLATE utf8_hungarian_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_hungarian_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_hungarian_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER DATABASE d10 DEFAULT COLLATE utf8_hungarian_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_hungarian_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_hungarian_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER SCHEMA d10 COLLATE utf8_general_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER SCHEMA d10 DEFAULT COLLATE utf8_general_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER SCHEMA d10 COLLATE utf8_bin;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_bin NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_bin NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER SCHEMA d10 DEFAULT COLLATE utf8_bin;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_bin NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_bin NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER SCHEMA d10 COLLATE utf8_unicode_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_unicode_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_unicode_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER SCHEMA d10 DEFAULT COLLATE utf8_unicode_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_unicode_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_unicode_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER SCHEMA d10 COLLATE utf8_icelandic_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_icelandic_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_icelandic_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER SCHEMA d10 DEFAULT COLLATE utf8_icelandic_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_icelandic_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_icelandic_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER SCHEMA d10 COLLATE utf8_latvian_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_latvian_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_latvian_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER SCHEMA d10 DEFAULT COLLATE utf8_latvian_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_latvian_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_latvian_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER SCHEMA d10 COLLATE utf8_romanian_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_romanian_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_romanian_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER SCHEMA d10 DEFAULT COLLATE utf8_romanian_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_romanian_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_romanian_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER SCHEMA d10 COLLATE utf8_slovenian_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_slovenian_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_slovenian_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER SCHEMA d10 DEFAULT COLLATE utf8_slovenian_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_slovenian_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_slovenian_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER SCHEMA d10 COLLATE utf8_polish_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_polish_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_polish_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER SCHEMA d10 DEFAULT COLLATE utf8_polish_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_polish_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_polish_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER SCHEMA d10 COLLATE utf8_estonian_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_estonian_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_estonian_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER SCHEMA d10 DEFAULT COLLATE utf8_estonian_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_estonian_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_estonian_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER SCHEMA d10 COLLATE utf8_spanish_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_spanish_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_spanish_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER SCHEMA d10 DEFAULT COLLATE utf8_spanish_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_spanish_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_spanish_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER SCHEMA d10 COLLATE utf8_swedish_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_swedish_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_swedish_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER SCHEMA d10 DEFAULT COLLATE utf8_swedish_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_swedish_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_swedish_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER SCHEMA d10 COLLATE utf8_turkish_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_turkish_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_turkish_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER SCHEMA d10 DEFAULT COLLATE utf8_turkish_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_turkish_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_turkish_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER SCHEMA d10 COLLATE utf8_czech_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_czech_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_czech_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER SCHEMA d10 DEFAULT COLLATE utf8_czech_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_czech_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_czech_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER SCHEMA d10 COLLATE utf8_danish_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_danish_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_danish_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER SCHEMA d10 DEFAULT COLLATE utf8_danish_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_danish_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_danish_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER SCHEMA d10 COLLATE utf8_lithuanian_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_lithuanian_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_lithuanian_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER SCHEMA d10 DEFAULT COLLATE utf8_lithuanian_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_lithuanian_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_lithuanian_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER SCHEMA d10 COLLATE utf8_slovak_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_slovak_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_slovak_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER SCHEMA d10 DEFAULT COLLATE utf8_slovak_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_slovak_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_slovak_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER SCHEMA d10 COLLATE utf8_spanish2_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_spanish2_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_spanish2_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER SCHEMA d10 DEFAULT COLLATE utf8_spanish2_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_spanish2_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_spanish2_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER SCHEMA d10 COLLATE utf8_roman_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_roman_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_roman_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER SCHEMA d10 DEFAULT COLLATE utf8_roman_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_roman_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_roman_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER SCHEMA d10 COLLATE utf8_persian_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_persian_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_persian_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER SCHEMA d10 DEFAULT COLLATE utf8_persian_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_persian_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_persian_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER SCHEMA d10 COLLATE utf8_esperanto_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_esperanto_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_esperanto_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER SCHEMA d10 DEFAULT COLLATE utf8_esperanto_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_esperanto_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_esperanto_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER SCHEMA d10 COLLATE utf8_hungarian_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_hungarian_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_hungarian_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
ALTER SCHEMA d10 DEFAULT COLLATE utf8_hungarian_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d10 utf8 utf8_hungarian_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d10 utf8 utf8_hungarian_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d10;
diff --git a/mysql-test/suite/engines/funcs/r/db_create_character_set.result b/mysql-test/suite/engines/funcs/r/db_create_character_set.result
index 466eabce744..3c3d99bfba2 100644
--- a/mysql-test/suite/engines/funcs/r/db_create_character_set.result
+++ b/mysql-test/suite/engines/funcs/r/db_create_character_set.result
@@ -1,101 +1,101 @@
DROP DATABASE IF EXISTS d12;
CREATE DATABASE d12 CHARACTER SET ascii;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d12 ascii ascii_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d12 ascii ascii_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d12;
CREATE DATABASE d12 CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d12 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d12 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d12;
CREATE DATABASE d12 CHARACTER SET binary;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d12 binary binary NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d12 binary binary NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d12;
CREATE DATABASE d12 CHARACTER SET swe7;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d12 swe7 swe7_swedish_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d12 swe7 swe7_swedish_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d12;
CREATE DATABASE d12 CHARACTER SET cp1251;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d12 cp1251 cp1251_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d12 cp1251 cp1251_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d12;
CREATE SCHEMA d12 CHARACTER SET ascii;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d12 ascii ascii_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d12 ascii ascii_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP SCHEMA d12;
CREATE SCHEMA d12 CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d12 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d12 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP SCHEMA d12;
CREATE SCHEMA d12 CHARACTER SET binary;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d12 binary binary NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d12 binary binary NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP SCHEMA d12;
CREATE SCHEMA d12 CHARACTER SET swe7;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d12 swe7 swe7_swedish_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d12 swe7 swe7_swedish_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP SCHEMA d12;
CREATE SCHEMA d12 CHARACTER SET cp1251;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d12 cp1251 cp1251_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d12 cp1251 cp1251_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP SCHEMA d12;
diff --git a/mysql-test/suite/engines/funcs/r/db_create_character_set_collate.result b/mysql-test/suite/engines/funcs/r/db_create_character_set_collate.result
index 4263454f229..236973a34fd 100644
--- a/mysql-test/suite/engines/funcs/r/db_create_character_set_collate.result
+++ b/mysql-test/suite/engines/funcs/r/db_create_character_set_collate.result
@@ -1,61 +1,61 @@
DROP DATABASE IF EXISTS d13;
CREATE DATABASE d13 CHARACTER SET utf8 COLLATE utf8_general_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d13 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d13 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d13;
CREATE DATABASE d13 CHARACTER SET latin2 COLLATE latin2_general_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d13 latin2 latin2_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d13 latin2 latin2_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d13;
CREATE DATABASE d13 CHARACTER SET cp1250 COLLATE cp1250_croatian_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d13 cp1250 cp1250_croatian_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d13 cp1250 cp1250_croatian_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP DATABASE d13;
CREATE SCHEMA d13 CHARACTER SET utf8 COLLATE utf8_general_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d13 utf8 utf8_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d13 utf8 utf8_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP SCHEMA d13;
CREATE SCHEMA d13 CHARACTER SET latin2 COLLATE latin2_general_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d13 latin2 latin2_general_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d13 latin2 latin2_general_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP SCHEMA d13;
CREATE SCHEMA d13 CHARACTER SET cp1250 COLLATE cp1250_croatian_ci;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def d13 cp1250 cp1250_croatian_ci NULL
-def information_schema utf8 utf8_general_ci NULL
-def mtr latin1 latin1_swedish_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def performance_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def d13 cp1250 cp1250_croatian_ci NULL
+def information_schema utf8 utf8_general_ci NULL
+def mtr latin1 latin1_swedish_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def performance_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
DROP SCHEMA d13;
diff --git a/mysql-test/suite/engines/funcs/r/rpl_sp.result b/mysql-test/suite/engines/funcs/r/rpl_sp.result
index 0e5929bcbd7..004608691ce 100644
--- a/mysql-test/suite/engines/funcs/r/rpl_sp.result
+++ b/mysql-test/suite/engines/funcs/r/rpl_sp.result
@@ -771,7 +771,7 @@ DELIMITER /*!*/;
ROLLBACK/*!*/;
SET TIMESTAMP=t/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
diff --git a/mysql-test/suite/engines/funcs/r/rpl_temporary.result b/mysql-test/suite/engines/funcs/r/rpl_temporary.result
index e2999cdd225..650fe1db9e0 100644
--- a/mysql-test/suite/engines/funcs/r/rpl_temporary.result
+++ b/mysql-test/suite/engines/funcs/r/rpl_temporary.result
@@ -40,12 +40,12 @@ connect con3,localhost,zedjzlcsjhd,,;
connection con3;
SET @save_select_limit=@@session.sql_select_limit;
SET @@session.sql_select_limit=10, @@session.pseudo_thread_id=100;
-ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
+ERROR 42000: Access denied; you need (at least one of) the SUPER, BINLOG REPLAY privilege(s) for this operation
SELECT @@session.sql_select_limit = @save_select_limit;
@@session.sql_select_limit = @save_select_limit
1
SET @@session.sql_select_limit=10, @@session.sql_log_bin=0;
-ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
+ERROR 42000: Access denied; you need (at least one of) the SUPER, BINLOG ADMIN privilege(s) for this operation
SELECT @@session.sql_select_limit = @save_select_limit;
@@session.sql_select_limit = @save_select_limit
1
diff --git a/mysql-test/suite/engines/funcs/r/tc_rename_error.result b/mysql-test/suite/engines/funcs/r/tc_rename_error.result
index cd5108107fb..3cd5c3f2843 100644
--- a/mysql-test/suite/engines/funcs/r/tc_rename_error.result
+++ b/mysql-test/suite/engines/funcs/r/tc_rename_error.result
@@ -13,7 +13,7 @@ t1 CREATE TABLE `t1` (
RENAME TABLE t2 TO t1;
ERROR 42S01: Table 't1' already exists
RENAME TABLE t3 TO t1;
-ERROR 42S01: Table 't1' already exists
+ERROR 42S02: Table 'test.t3' doesn't exist
RENAME TABLE t3 TO doesnotexist.t1;
ERROR 42S02: Table 'test.t3' doesn't exist
SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/tc_rename_error.test b/mysql-test/suite/engines/funcs/t/tc_rename_error.test
index 6b56b1e6ca4..c119b3bf43a 100644
--- a/mysql-test/suite/engines/funcs/t/tc_rename_error.test
+++ b/mysql-test/suite/engines/funcs/t/tc_rename_error.test
@@ -7,9 +7,9 @@ SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
---error 1050
+--error ER_TABLE_EXISTS_ERROR
RENAME TABLE t2 TO t1;
---error 1050
+--error ER_NO_SUCH_TABLE
RENAME TABLE t3 TO t1;
--error 1146
RENAME TABLE t3 TO doesnotexist.t1;
diff --git a/mysql-test/suite/engines/iuds/r/strings_charsets_update_delete.result b/mysql-test/suite/engines/iuds/r/strings_charsets_update_delete.result
index fdd1a4be290..4b1ffc9045b 100644
--- a/mysql-test/suite/engines/iuds/r/strings_charsets_update_delete.result
+++ b/mysql-test/suite/engines/iuds/r/strings_charsets_update_delete.result
Binary files differ
diff --git a/mysql-test/suite/engines/iuds/r/strings_update_delete.result b/mysql-test/suite/engines/iuds/r/strings_update_delete.result
index 56dd0cf4d12..708d2811bf8 100644
--- a/mysql-test/suite/engines/iuds/r/strings_update_delete.result
+++ b/mysql-test/suite/engines/iuds/r/strings_update_delete.result
@@ -70472,17 +70472,4 @@ SIZE
DROP TABLE t17,t18;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18;
Warnings:
-Note 1051 Unknown table 'test.t3'
-Note 1051 Unknown table 'test.t4'
-Note 1051 Unknown table 'test.t5'
-Note 1051 Unknown table 'test.t6'
-Note 1051 Unknown table 'test.t7'
-Note 1051 Unknown table 'test.t8'
-Note 1051 Unknown table 'test.t9'
-Note 1051 Unknown table 'test.t10'
-Note 1051 Unknown table 'test.t11'
-Note 1051 Unknown table 'test.t13'
-Note 1051 Unknown table 'test.t14'
-Note 1051 Unknown table 'test.t15'
-Note 1051 Unknown table 'test.t17'
-Note 1051 Unknown table 'test.t18'
+Note 1051 Unknown table 'test.t3,test.t4,test.t5,test.t6,test.t7,test.t8,test.t9,test.t10,test.t11,test.t13,test.t14,test....'
diff --git a/mysql-test/suite/engines/iuds/r/type_bit_iuds.result b/mysql-test/suite/engines/iuds/r/type_bit_iuds.result
index 2c84abfd49d..93ed7a9f162 100644
--- a/mysql-test/suite/engines/iuds/r/type_bit_iuds.result
+++ b/mysql-test/suite/engines/iuds/r/type_bit_iuds.result
@@ -56209,9 +56209,9 @@ SELECT 0 + b'101010101010101010101010101010';
715827882
SELECT 0 + (101010101010101010101010101010<<0);
0 + (101010101010101010101010101010<<0)
-9223372036854775807
+18446744073709551615
Warnings:
-Warning 1916 Got overflow when converting '101010101010101010101010101010' to INT. Value truncated
+Warning 1916 Got overflow when converting '101010101010101010101010101010' to UNSIGNED INT. Value truncated
CREATE TABLE t1(c1 BIT(0));
CREATE TABLE t2(c1 BIT(0), c2 BIT(0), c3 BIT(0));
INSERT IGNORE INTO t1 VALUES (b'101010101010101010101010101010');
@@ -57001,7 +57001,7 @@ SELECT 0 + (101010101010101010101010101010<<1);
0 + (101010101010101010101010101010<<1)
18446744073709551614
Warnings:
-Warning 1916 Got overflow when converting '101010101010101010101010101010' to INT. Value truncated
+Warning 1916 Got overflow when converting '101010101010101010101010101010' to UNSIGNED INT. Value truncated
CREATE TABLE t1(c1 BIT(1));
CREATE TABLE t2(c1 BIT(1), c2 BIT(1), c3 BIT(1));
set @v1=1;
@@ -57840,7 +57840,7 @@ SELECT 0 + (101010101010101010101010101010<<2);
0 + (101010101010101010101010101010<<2)
18446744073709551612
Warnings:
-Warning 1916 Got overflow when converting '101010101010101010101010101010' to INT. Value truncated
+Warning 1916 Got overflow when converting '101010101010101010101010101010' to UNSIGNED INT. Value truncated
CREATE TABLE t1(c1 BIT(2));
CREATE TABLE t2(c1 BIT(2), c2 BIT(2), c3 BIT(2));
set @v1=2;
@@ -58698,7 +58698,7 @@ SELECT 0 + (101010101010101010101010101010<<4);
0 + (101010101010101010101010101010<<4)
18446744073709551600
Warnings:
-Warning 1916 Got overflow when converting '101010101010101010101010101010' to INT. Value truncated
+Warning 1916 Got overflow when converting '101010101010101010101010101010' to UNSIGNED INT. Value truncated
CREATE TABLE t1(c1 BIT(4));
CREATE TABLE t2(c1 BIT(4), c2 BIT(4), c3 BIT(4));
set @v1=4;
@@ -59620,7 +59620,7 @@ SELECT 0 + (101010101010101010101010101010<<8);
0 + (101010101010101010101010101010<<8)
18446744073709551360
Warnings:
-Warning 1916 Got overflow when converting '101010101010101010101010101010' to INT. Value truncated
+Warning 1916 Got overflow when converting '101010101010101010101010101010' to UNSIGNED INT. Value truncated
CREATE TABLE t1(c1 BIT(8));
CREATE TABLE t2(c1 BIT(8), c2 BIT(8), c3 BIT(8));
set @v1=8;
@@ -60827,7 +60827,7 @@ SELECT 0 + (101010101010101010101010101010<<16);
0 + (101010101010101010101010101010<<16)
18446744073709486080
Warnings:
-Warning 1916 Got overflow when converting '101010101010101010101010101010' to INT. Value truncated
+Warning 1916 Got overflow when converting '101010101010101010101010101010' to UNSIGNED INT. Value truncated
CREATE TABLE t1(c1 BIT(16));
CREATE TABLE t2(c1 BIT(16), c2 BIT(16), c3 BIT(16));
set @v1=16;
@@ -62239,7 +62239,7 @@ SELECT 0 + (101010101010101010101010101010<<32);
0 + (101010101010101010101010101010<<32)
18446744069414584320
Warnings:
-Warning 1916 Got overflow when converting '101010101010101010101010101010' to INT. Value truncated
+Warning 1916 Got overflow when converting '101010101010101010101010101010' to UNSIGNED INT. Value truncated
CREATE TABLE t1(c1 BIT(32));
CREATE TABLE t2(c1 BIT(32), c2 BIT(32), c3 BIT(32));
set @v1=32;
@@ -64312,7 +64312,7 @@ SELECT 0 + (101010101010101010101010101010<<64);
0 + (101010101010101010101010101010<<64)
0
Warnings:
-Warning 1916 Got overflow when converting '101010101010101010101010101010' to INT. Value truncated
+Warning 1916 Got overflow when converting '101010101010101010101010101010' to UNSIGNED INT. Value truncated
CREATE TABLE t1(c1 BIT(64));
CREATE TABLE t2(c1 BIT(64), c2 BIT(64), c3 BIT(64));
set @v1=64;
@@ -67487,9 +67487,9 @@ Warnings:
Note 1051 Unknown table 'test.t3'
SELECT 0 + (1010101010101010101010101010101010101010101010101010101010101010<<0);
0 + (1010101010101010101010101010101010101010101010101010101010101010<<0)
-9223372036854775807
+18446744073709551615
Warnings:
-Warning 1916 Got overflow when converting '1010101010101010101010101010101010101010101010101010101010101010' to INT. Value truncated
+Warning 1916 Got overflow when converting '1010101010101010101010101010101010101010101010101010101010101010' to UNSIGNED INT. Value truncated
CREATE TABLE t1(c1 BIT(0));
CREATE TABLE t2(c1 BIT(0), c2 BIT(0), c3 BIT(0));
INSERT IGNORE INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101010101010');
@@ -68276,7 +68276,7 @@ SELECT 0 + (1010101010101010101010101010101010101010101010101010101010101010<<1)
0 + (1010101010101010101010101010101010101010101010101010101010101010<<1)
18446744073709551614
Warnings:
-Warning 1916 Got overflow when converting '1010101010101010101010101010101010101010101010101010101010101010' to INT. Value truncated
+Warning 1916 Got overflow when converting '1010101010101010101010101010101010101010101010101010101010101010' to UNSIGNED INT. Value truncated
CREATE TABLE t1(c1 BIT(1));
CREATE TABLE t2(c1 BIT(1), c2 BIT(1), c3 BIT(1));
set @v1=1;
@@ -69112,7 +69112,7 @@ SELECT 0 + (1010101010101010101010101010101010101010101010101010101010101010<<2)
0 + (1010101010101010101010101010101010101010101010101010101010101010<<2)
18446744073709551612
Warnings:
-Warning 1916 Got overflow when converting '1010101010101010101010101010101010101010101010101010101010101010' to INT. Value truncated
+Warning 1916 Got overflow when converting '1010101010101010101010101010101010101010101010101010101010101010' to UNSIGNED INT. Value truncated
CREATE TABLE t1(c1 BIT(2));
CREATE TABLE t2(c1 BIT(2), c2 BIT(2), c3 BIT(2));
set @v1=2;
@@ -69967,7 +69967,7 @@ SELECT 0 + (1010101010101010101010101010101010101010101010101010101010101010<<4)
0 + (1010101010101010101010101010101010101010101010101010101010101010<<4)
18446744073709551600
Warnings:
-Warning 1916 Got overflow when converting '1010101010101010101010101010101010101010101010101010101010101010' to INT. Value truncated
+Warning 1916 Got overflow when converting '1010101010101010101010101010101010101010101010101010101010101010' to UNSIGNED INT. Value truncated
CREATE TABLE t1(c1 BIT(4));
CREATE TABLE t2(c1 BIT(4), c2 BIT(4), c3 BIT(4));
set @v1=4;
@@ -70886,7 +70886,7 @@ SELECT 0 + (1010101010101010101010101010101010101010101010101010101010101010<<8)
0 + (1010101010101010101010101010101010101010101010101010101010101010<<8)
18446744073709551360
Warnings:
-Warning 1916 Got overflow when converting '1010101010101010101010101010101010101010101010101010101010101010' to INT. Value truncated
+Warning 1916 Got overflow when converting '1010101010101010101010101010101010101010101010101010101010101010' to UNSIGNED INT. Value truncated
CREATE TABLE t1(c1 BIT(8));
CREATE TABLE t2(c1 BIT(8), c2 BIT(8), c3 BIT(8));
set @v1=8;
@@ -72090,7 +72090,7 @@ SELECT 0 + (1010101010101010101010101010101010101010101010101010101010101010<<16
0 + (1010101010101010101010101010101010101010101010101010101010101010<<16)
18446744073709486080
Warnings:
-Warning 1916 Got overflow when converting '1010101010101010101010101010101010101010101010101010101010101010' to INT. Value truncated
+Warning 1916 Got overflow when converting '1010101010101010101010101010101010101010101010101010101010101010' to UNSIGNED INT. Value truncated
CREATE TABLE t1(c1 BIT(16));
CREATE TABLE t2(c1 BIT(16), c2 BIT(16), c3 BIT(16));
set @v1=16;
@@ -73499,7 +73499,7 @@ SELECT 0 + (1010101010101010101010101010101010101010101010101010101010101010<<32
0 + (1010101010101010101010101010101010101010101010101010101010101010<<32)
18446744069414584320
Warnings:
-Warning 1916 Got overflow when converting '1010101010101010101010101010101010101010101010101010101010101010' to INT. Value truncated
+Warning 1916 Got overflow when converting '1010101010101010101010101010101010101010101010101010101010101010' to UNSIGNED INT. Value truncated
CREATE TABLE t1(c1 BIT(32));
CREATE TABLE t2(c1 BIT(32), c2 BIT(32), c3 BIT(32));
set @v1=32;
@@ -75575,7 +75575,7 @@ SELECT 0 + (1010101010101010101010101010101010101010101010101010101010101010<<64
0 + (1010101010101010101010101010101010101010101010101010101010101010<<64)
0
Warnings:
-Warning 1916 Got overflow when converting '1010101010101010101010101010101010101010101010101010101010101010' to INT. Value truncated
+Warning 1916 Got overflow when converting '1010101010101010101010101010101010101010101010101010101010101010' to UNSIGNED INT. Value truncated
CREATE TABLE t1(c1 BIT(64));
CREATE TABLE t2(c1 BIT(64), c2 BIT(64), c3 BIT(64));
set @v1=64;
@@ -78750,9 +78750,9 @@ Warnings:
Note 1051 Unknown table 'test.t3'
SELECT 0 + (10101010101010101010101010101010101010101010101010101010101010101<<0);
0 + (10101010101010101010101010101010101010101010101010101010101010101<<0)
-9223372036854775807
+18446744073709551615
Warnings:
-Warning 1916 Got overflow when converting '10101010101010101010101010101010101010101010101010101010101010101' to INT. Value truncated
+Warning 1916 Got overflow when converting '10101010101010101010101010101010101010101010101010101010101010101' to UNSIGNED INT. Value truncated
CREATE TABLE t1(c1 BIT(0));
CREATE TABLE t2(c1 BIT(0), c2 BIT(0), c3 BIT(0));
INSERT IGNORE INTO t1 VALUES (b'10101010101010101010101010101010101010101010101010101010101010101');
@@ -79539,7 +79539,7 @@ SELECT 0 + (10101010101010101010101010101010101010101010101010101010101010101<<1
0 + (10101010101010101010101010101010101010101010101010101010101010101<<1)
18446744073709551614
Warnings:
-Warning 1916 Got overflow when converting '10101010101010101010101010101010101010101010101010101010101010101' to INT. Value truncated
+Warning 1916 Got overflow when converting '10101010101010101010101010101010101010101010101010101010101010101' to UNSIGNED INT. Value truncated
CREATE TABLE t1(c1 BIT(1));
CREATE TABLE t2(c1 BIT(1), c2 BIT(1), c3 BIT(1));
set @v1=1;
@@ -80375,7 +80375,7 @@ SELECT 0 + (10101010101010101010101010101010101010101010101010101010101010101<<2
0 + (10101010101010101010101010101010101010101010101010101010101010101<<2)
18446744073709551612
Warnings:
-Warning 1916 Got overflow when converting '10101010101010101010101010101010101010101010101010101010101010101' to INT. Value truncated
+Warning 1916 Got overflow when converting '10101010101010101010101010101010101010101010101010101010101010101' to UNSIGNED INT. Value truncated
CREATE TABLE t1(c1 BIT(2));
CREATE TABLE t2(c1 BIT(2), c2 BIT(2), c3 BIT(2));
set @v1=2;
@@ -81230,7 +81230,7 @@ SELECT 0 + (10101010101010101010101010101010101010101010101010101010101010101<<4
0 + (10101010101010101010101010101010101010101010101010101010101010101<<4)
18446744073709551600
Warnings:
-Warning 1916 Got overflow when converting '10101010101010101010101010101010101010101010101010101010101010101' to INT. Value truncated
+Warning 1916 Got overflow when converting '10101010101010101010101010101010101010101010101010101010101010101' to UNSIGNED INT. Value truncated
CREATE TABLE t1(c1 BIT(4));
CREATE TABLE t2(c1 BIT(4), c2 BIT(4), c3 BIT(4));
set @v1=4;
@@ -82149,7 +82149,7 @@ SELECT 0 + (10101010101010101010101010101010101010101010101010101010101010101<<8
0 + (10101010101010101010101010101010101010101010101010101010101010101<<8)
18446744073709551360
Warnings:
-Warning 1916 Got overflow when converting '10101010101010101010101010101010101010101010101010101010101010101' to INT. Value truncated
+Warning 1916 Got overflow when converting '10101010101010101010101010101010101010101010101010101010101010101' to UNSIGNED INT. Value truncated
CREATE TABLE t1(c1 BIT(8));
CREATE TABLE t2(c1 BIT(8), c2 BIT(8), c3 BIT(8));
set @v1=8;
@@ -83353,7 +83353,7 @@ SELECT 0 + (10101010101010101010101010101010101010101010101010101010101010101<<1
0 + (10101010101010101010101010101010101010101010101010101010101010101<<16)
18446744073709486080
Warnings:
-Warning 1916 Got overflow when converting '10101010101010101010101010101010101010101010101010101010101010101' to INT. Value truncated
+Warning 1916 Got overflow when converting '10101010101010101010101010101010101010101010101010101010101010101' to UNSIGNED INT. Value truncated
CREATE TABLE t1(c1 BIT(16));
CREATE TABLE t2(c1 BIT(16), c2 BIT(16), c3 BIT(16));
set @v1=16;
@@ -84762,7 +84762,7 @@ SELECT 0 + (10101010101010101010101010101010101010101010101010101010101010101<<3
0 + (10101010101010101010101010101010101010101010101010101010101010101<<32)
18446744069414584320
Warnings:
-Warning 1916 Got overflow when converting '10101010101010101010101010101010101010101010101010101010101010101' to INT. Value truncated
+Warning 1916 Got overflow when converting '10101010101010101010101010101010101010101010101010101010101010101' to UNSIGNED INT. Value truncated
CREATE TABLE t1(c1 BIT(32));
CREATE TABLE t2(c1 BIT(32), c2 BIT(32), c3 BIT(32));
set @v1=32;
@@ -86838,7 +86838,7 @@ SELECT 0 + (10101010101010101010101010101010101010101010101010101010101010101<<6
0 + (10101010101010101010101010101010101010101010101010101010101010101<<64)
0
Warnings:
-Warning 1916 Got overflow when converting '10101010101010101010101010101010101010101010101010101010101010101' to INT. Value truncated
+Warning 1916 Got overflow when converting '10101010101010101010101010101010101010101010101010101010101010101' to UNSIGNED INT. Value truncated
CREATE TABLE t1(c1 BIT(64));
CREATE TABLE t2(c1 BIT(64), c2 BIT(64), c3 BIT(64));
set @v1=64;
diff --git a/mysql-test/suite/engines/rr_trx/include/rr_init.test b/mysql-test/suite/engines/rr_trx/include/rr_init.test
index 05769bf70eb..7d08c4565e2 100644
--- a/mysql-test/suite/engines/rr_trx/include/rr_init.test
+++ b/mysql-test/suite/engines/rr_trx/include/rr_init.test
@@ -1,8 +1,8 @@
#
# Specify storage engine to use. Variable $engine is set in wrapper test.
#
-eval SET @@storage_engine = $engine;
-if (`SELECT @@storage_engine LIKE 'InnoDB' AND @@version LIKE '%6.%'`)
+eval SET @@default_storage_engine = $engine;
+if (`SELECT @@default_storage_engine LIKE 'InnoDB' AND @@version LIKE '%6.%'`)
{
# Need this due to Bug#43447 - Crash when executing SELECT ... LIMIT n FOR UPDATE query
# Hopefully temporary...
@@ -14,7 +14,7 @@ if (`SELECT @@storage_engine LIKE 'InnoDB' AND @@version LIKE '%6.%'`)
}
# Verify default storage engine.
-SHOW VARIABLES LIKE 'storage_engine';
+SHOW VARIABLES LIKE 'default_storage_engine';
# Verify default isolation level
SHOW VARIABLES LIKE 'tx_isolation';
diff --git a/mysql-test/suite/engines/rr_trx/r/init_innodb.result b/mysql-test/suite/engines/rr_trx/r/init_innodb.result
index 6522adfd52b..292575a6610 100644
--- a/mysql-test/suite/engines/rr_trx/r/init_innodb.result
+++ b/mysql-test/suite/engines/rr_trx/r/init_innodb.result
@@ -1,5 +1,5 @@
-SET @@storage_engine = 'InnoDB';
-SHOW VARIABLES LIKE 'storage_engine';
+SET @@default_storage_engine = 'InnoDB';
+SHOW VARIABLES LIKE 'default_storage_engine';
Variable_name Value
storage_engine InnoDB
SHOW VARIABLES LIKE 'tx_isolation';
diff --git a/mysql-test/suite/federated/federated_server.result b/mysql-test/suite/federated/federated_server.result
index 45616839b89..d25676e7ad5 100644
--- a/mysql-test/suite/federated/federated_server.result
+++ b/mysql-test/suite/federated/federated_server.result
@@ -212,7 +212,7 @@ connect conn_usage,127.0.0.1,guest_usage,,,$MASTER_MYPORT;
connect conn_super,127.0.0.1,guest_super,,,$MASTER_MYPORT;
connection conn_select;
alter server s1 options (database 'db_bogus');
-ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
+ERROR 42000: Access denied; you need (at least one of) the SUPER, FEDERATED ADMIN privilege(s) for this operation
connection master;
flush tables;
select * from federated.t1;
@@ -220,7 +220,7 @@ id name
1 this is legitimate
connection conn_usage;
alter server s1 options (database 'db_bogus');
-ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
+ERROR 42000: Access denied; you need (at least one of) the SUPER, FEDERATED ADMIN privilege(s) for this operation
connection master;
flush tables;
select * from federated.t1;
@@ -234,7 +234,7 @@ select * from federated.t1;
Got one of the listed errors
connection conn_select;
drop server if exists 's1';
-ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
+ERROR 42000: Access denied; you need (at least one of) the SUPER, FEDERATED ADMIN privilege(s) for this operation
create server 's1' foreign data wrapper 'mysql' options
(HOST '127.0.0.1',
DATABASE 'db_legitimate',
@@ -243,7 +243,7 @@ PASSWORD 'foo',
PORT SLAVE_PORT,
SOCKET '',
OWNER 'root');
-ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
+ERROR 42000: Access denied; you need (at least one of) the SUPER, FEDERATED ADMIN privilege(s) for this operation
connection conn_super;
drop server 's1';
create server 's1' foreign data wrapper 'mysql' options
diff --git a/mysql-test/suite/federated/federated_type_inet6.result b/mysql-test/suite/federated/federated_type_inet6.result
new file mode 100644
index 00000000000..625a7f3353f
--- /dev/null
+++ b/mysql-test/suite/federated/federated_type_inet6.result
@@ -0,0 +1,24 @@
+connect master,127.0.0.1,root,,test,$MASTER_MYPORT,;
+connect slave,127.0.0.1,root,,test,$SLAVE_MYPORT,;
+connection master;
+CREATE DATABASE federated;
+connection slave;
+CREATE DATABASE federated;
+#
+# MDEV-20806 Federated does not work with INET6, returns NULL with warning ER_TRUNCATED_WRONG_VALUE
+#
+connection master;
+CREATE TABLE t1 (a INET6);
+INSERT INTO t1 VALUES ('::'),('f::f');
+CREATE TABLE t2 (a INET6) ENGINE=Federated CONNECTION='mysql://root@127.0.0.1:MASTER_PORT/test/t1';
+SELECT * FROM t2;
+a
+::
+f::f
+DROP TABLE t1, t2;
+connection master;
+DROP TABLE IF EXISTS federated.t1;
+DROP DATABASE IF EXISTS federated;
+connection slave;
+DROP TABLE IF EXISTS federated.t1;
+DROP DATABASE IF EXISTS federated;
diff --git a/mysql-test/suite/federated/federated_type_inet6.test b/mysql-test/suite/federated/federated_type_inet6.test
new file mode 100644
index 00000000000..857f0726689
--- /dev/null
+++ b/mysql-test/suite/federated/federated_type_inet6.test
@@ -0,0 +1,17 @@
+source include/federated.inc;
+
+--echo #
+--echo # MDEV-20806 Federated does not work with INET6, returns NULL with warning ER_TRUNCATED_WRONG_VALUE
+--echo #
+
+connection master;
+
+CREATE TABLE t1 (a INET6);
+INSERT INTO t1 VALUES ('::'),('f::f');
+
+--replace_result $MASTER_MYPORT MASTER_PORT
+eval CREATE TABLE t2 (a INET6) ENGINE=Federated CONNECTION='mysql://root@127.0.0.1:$MASTER_MYPORT/test/t1';
+SELECT * FROM t2;
+DROP TABLE t1, t2;
+
+source include/federated_cleanup.inc;
diff --git a/mysql-test/suite/federated/federatedx_create_handlers.result b/mysql-test/suite/federated/federatedx_create_handlers.result
index b115cc73b87..28736515327 100644
--- a/mysql-test/suite/federated/federatedx_create_handlers.result
+++ b/mysql-test/suite/federated/federatedx_create_handlers.result
@@ -227,7 +227,8 @@ ANALYZE
"r_loops": 1,
"rows": 7,
"r_rows": 7,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100
},
@@ -242,7 +243,8 @@ ANALYZE
"r_loops": 7,
"rows": 2,
"r_rows": 0,
- "r_total_time_ms": "REPLACED",
+ "r_table_time_ms": "REPLACED",
+ "r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100,
"materialized": {
diff --git a/mysql-test/suite/funcs_1/r/innodb_trig_03.result b/mysql-test/suite/funcs_1/r/innodb_trig_03.result
index 9f9bf1ca4de..31fc4407dce 100644
--- a/mysql-test/suite/funcs_1/r/innodb_trig_03.result
+++ b/mysql-test/suite/funcs_1/r/innodb_trig_03.result
@@ -78,7 +78,7 @@ grant ALL on *.* to test_noprivs@localhost;
revoke TRIGGER on *.* from test_noprivs@localhost;
show grants for test_noprivs@localhost;
Grants for test_noprivs@localhost
-GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, CREATE TABLESPACE, DELETE HISTORY ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, BINLOG MONITOR, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, CREATE TABLESPACE, DELETE HISTORY, SET USER, FEDERATED ADMIN, CONNECTION ADMIN, READ_ONLY ADMIN, REPLICATION SLAVE ADMIN, REPLICATION MASTER ADMIN, BINLOG ADMIN, BINLOG REPLAY, SLAVE MONITOR ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
grant TRIGGER on *.* to test_yesprivs@localhost;
grant SELECT on priv_db.t1 to test_yesprivs@localhost;
@@ -168,7 +168,7 @@ grant ALL on *.* to test_noprivs@localhost;
revoke UPDATE on *.* from test_noprivs@localhost;
show grants for test_noprivs@localhost;
Grants for test_noprivs@localhost
-GRANT SELECT, INSERT, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, INSERT, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, BINLOG MONITOR, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY, SET USER, FEDERATED ADMIN, CONNECTION ADMIN, READ_ONLY ADMIN, REPLICATION SLAVE ADMIN, REPLICATION MASTER ADMIN, BINLOG ADMIN, BINLOG REPLAY, SLAVE MONITOR ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
grant TRIGGER, UPDATE on *.* to test_yesprivs@localhost;
show grants for test_yesprivs@localhost;
@@ -183,7 +183,7 @@ test_noprivs@localhost
use priv_db;
show grants;
Grants for test_noprivs@localhost
-GRANT SELECT, INSERT, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, INSERT, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, BINLOG MONITOR, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY, SET USER, FEDERATED ADMIN, CONNECTION ADMIN, READ_ONLY ADMIN, REPLICATION SLAVE ADMIN, REPLICATION MASTER ADMIN, BINLOG ADMIN, BINLOG REPLAY, SLAVE MONITOR ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
select f1 from t1 order by f1;
f1
insert 3.5.3.2-no
@@ -441,7 +441,7 @@ grant ALL on *.* to test_noprivs@localhost;
revoke SELECT on *.* from test_noprivs@localhost;
show grants for test_noprivs@localhost;
Grants for test_noprivs@localhost
-GRANT INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, BINLOG MONITOR, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY, SET USER, FEDERATED ADMIN, CONNECTION ADMIN, READ_ONLY ADMIN, REPLICATION SLAVE ADMIN, REPLICATION MASTER ADMIN, BINLOG ADMIN, BINLOG REPLAY, SLAVE MONITOR ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
grant TRIGGER, SELECT on *.* to test_yesprivs@localhost;
show grants for test_yesprivs@localhost;
@@ -457,7 +457,7 @@ test_noprivs@localhost
use priv_db;
show grants;
Grants for test_noprivs@localhost
-GRANT INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, BINLOG MONITOR, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY, SET USER, FEDERATED ADMIN, CONNECTION ADMIN, READ_ONLY ADMIN, REPLICATION SLAVE ADMIN, REPLICATION MASTER ADMIN, BINLOG ADMIN, BINLOG REPLAY, SLAVE MONITOR ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
create trigger trg5a_1 before INSERT on t1 for each row
set @test_var = new.f1;
connection default;
diff --git a/mysql-test/suite/funcs_1/r/innodb_trig_03e.result b/mysql-test/suite/funcs_1/r/innodb_trig_03e.result
index c869b5cc5bc..875aa18e81f 100644
--- a/mysql-test/suite/funcs_1/r/innodb_trig_03e.result
+++ b/mysql-test/suite/funcs_1/r/innodb_trig_03e.result
@@ -603,7 +603,7 @@ trig 1_1-yes
revoke TRIGGER on *.* from test_yesprivs@localhost;
show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost
-GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, CREATE TABLESPACE, DELETE HISTORY ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, BINLOG MONITOR, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, CREATE TABLESPACE, DELETE HISTORY, SET USER, FEDERATED ADMIN, CONNECTION ADMIN, READ_ONLY ADMIN, REPLICATION SLAVE ADMIN, REPLICATION MASTER ADMIN, BINLOG ADMIN, BINLOG REPLAY, SLAVE MONITOR ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
disconnect yes_privs;
connect yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
select current_user;
@@ -656,7 +656,7 @@ root@localhost
grant TRIGGER on priv_db.* to test_yesprivs@localhost;
show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost
-GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, CREATE TABLESPACE, DELETE HISTORY ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, BINLOG MONITOR, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, CREATE TABLESPACE, DELETE HISTORY, SET USER, FEDERATED ADMIN, CONNECTION ADMIN, READ_ONLY ADMIN, REPLICATION SLAVE ADMIN, REPLICATION MASTER ADMIN, BINLOG ADMIN, BINLOG REPLAY, SLAVE MONITOR ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT TRIGGER ON `priv_db`.* TO `test_yesprivs`@`localhost`
trigger privilege on db level for create:
@@ -1350,7 +1350,7 @@ drop trigger trg1_0;
create definer=not_ex_user@localhost trigger trg1_0
before INSERT on t1 for each row
set new.f1 = 'trig 1_0-yes';
-ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
+ERROR 42000: Access denied; you need (at least one of) the SUPER, SET USER privilege(s) for this operation
create definer=current_user trigger trg1_1
before INSERT on t1 for each row
set new.f1 = 'trig 1_1-yes';
@@ -1385,7 +1385,7 @@ GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`loca
create definer=not_ex_user@localhost trigger trg1_3
after UPDATE on t1 for each row
set @var1 = 'trig 1_3-yes';
-ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
+ERROR 42000: Access denied; you need (at least one of) the SUPER, SET USER privilege(s) for this operation
connection default;
select current_user;
current_user
diff --git a/mysql-test/suite/funcs_1/r/is_check_constraints.result b/mysql-test/suite/funcs_1/r/is_check_constraints.result
index 2436be8142f..578717ee307 100644
--- a/mysql-test/suite/funcs_1/r/is_check_constraints.result
+++ b/mysql-test/suite/funcs_1/r/is_check_constraints.result
@@ -16,25 +16,25 @@ CREATE TABLE t0
t int, check (t>32) # table constraint
) ENGINE=myisam;
SELECT * from information_schema.check_constraints;
-CONSTRAINT_CATALOG CONSTRAINT_SCHEMA TABLE_NAME CONSTRAINT_NAME CHECK_CLAUSE
-def foo t0 CONSTRAINT_1 `t` > 32
+CONSTRAINT_CATALOG CONSTRAINT_SCHEMA TABLE_NAME CONSTRAINT_NAME LEVEL CHECK_CLAUSE
+def foo t0 CONSTRAINT_1 Table `t` > 32
ALTER TABLE t0
ADD CONSTRAINT CHK_t0_t CHECK(t<100);
SELECT * from information_schema.check_constraints;
-CONSTRAINT_CATALOG CONSTRAINT_SCHEMA TABLE_NAME CONSTRAINT_NAME CHECK_CLAUSE
-def foo t0 CHK_t0_t `t` < 100
-def foo t0 CONSTRAINT_1 `t` > 32
+CONSTRAINT_CATALOG CONSTRAINT_SCHEMA TABLE_NAME CONSTRAINT_NAME LEVEL CHECK_CLAUSE
+def foo t0 CHK_t0_t Table `t` < 100
+def foo t0 CONSTRAINT_1 Table `t` > 32
ALTER TABLE t0
DROP CONSTRAINT CHK_t0_t;
SELECT * from information_schema.check_constraints;
-CONSTRAINT_CATALOG CONSTRAINT_SCHEMA TABLE_NAME CONSTRAINT_NAME CHECK_CLAUSE
-def foo t0 CONSTRAINT_1 `t` > 32
+CONSTRAINT_CATALOG CONSTRAINT_SCHEMA TABLE_NAME CONSTRAINT_NAME LEVEL CHECK_CLAUSE
+def foo t0 CONSTRAINT_1 Table `t` > 32
ALTER TABLE t0
ADD CONSTRAINT CHECK(t<50);
SELECT * from information_schema.check_constraints;
-CONSTRAINT_CATALOG CONSTRAINT_SCHEMA TABLE_NAME CONSTRAINT_NAME CHECK_CLAUSE
-def foo t0 CONSTRAINT_1 `t` > 32
-def foo t0 CONSTRAINT_2 `t` < 50
+CONSTRAINT_CATALOG CONSTRAINT_SCHEMA TABLE_NAME CONSTRAINT_NAME LEVEL CHECK_CLAUSE
+def foo t0 CONSTRAINT_1 Table `t` > 32
+def foo t0 CONSTRAINT_2 Table `t` < 50
CREATE TABLE t1
( t int CHECK(t>2), # field constraint
tt int,
@@ -42,22 +42,22 @@ CONSTRAINT CHECK (tt > 32), CONSTRAINT CHECK (tt <50),# autogenerated names tabl
CONSTRAINT CHK_tt CHECK(tt<100) # named table constraint
) ENGINE=InnoDB;
SELECT * from information_schema.check_constraints;
-CONSTRAINT_CATALOG CONSTRAINT_SCHEMA TABLE_NAME CONSTRAINT_NAME CHECK_CLAUSE
-def foo t0 CONSTRAINT_1 `t` > 32
-def foo t0 CONSTRAINT_2 `t` < 50
-def foo t1 CHK_tt `tt` < 100
-def foo t1 CONSTRAINT_1 `tt` > 32
-def foo t1 CONSTRAINT_2 `tt` < 50
-def foo t1 t `t` > 2
+CONSTRAINT_CATALOG CONSTRAINT_SCHEMA TABLE_NAME CONSTRAINT_NAME LEVEL CHECK_CLAUSE
+def foo t0 CONSTRAINT_1 Table `t` > 32
+def foo t0 CONSTRAINT_2 Table `t` < 50
+def foo t1 CHK_tt Table `tt` < 100
+def foo t1 CONSTRAINT_1 Table `tt` > 32
+def foo t1 CONSTRAINT_2 Table `tt` < 50
+def foo t1 t Column `t` > 2
ALTER TABLE t1
DROP CONSTRAINT CHK_tt;
SELECT * from information_schema.check_constraints;
-CONSTRAINT_CATALOG CONSTRAINT_SCHEMA TABLE_NAME CONSTRAINT_NAME CHECK_CLAUSE
-def foo t0 CONSTRAINT_1 `t` > 32
-def foo t0 CONSTRAINT_2 `t` < 50
-def foo t1 CONSTRAINT_1 `tt` > 32
-def foo t1 CONSTRAINT_2 `tt` < 50
-def foo t1 t `t` > 2
+CONSTRAINT_CATALOG CONSTRAINT_SCHEMA TABLE_NAME CONSTRAINT_NAME LEVEL CHECK_CLAUSE
+def foo t0 CONSTRAINT_1 Table `t` > 32
+def foo t0 CONSTRAINT_2 Table `t` < 50
+def foo t1 CONSTRAINT_1 Table `tt` > 32
+def foo t1 CONSTRAINT_2 Table `tt` < 50
+def foo t1 t Column `t` > 2
CREATE TABLE t2
(
name VARCHAR(30) CHECK(CHAR_LENGTH(name)>2), #field constraint
@@ -66,26 +66,26 @@ 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 TABLE_NAME CONSTRAINT_NAME CHECK_CLAUSE
-def foo t0 CONSTRAINT_1 `t` > 32
-def foo t0 CONSTRAINT_2 `t` < 50
-def foo t1 CONSTRAINT_1 `tt` > 32
-def foo t1 CONSTRAINT_2 `tt` < 50
-def foo t1 t `t` > 2
-def foo t2 CHK_dates `start_date` is null
-def foo t2 name char_length(`name`) > 2
+CONSTRAINT_CATALOG CONSTRAINT_SCHEMA TABLE_NAME CONSTRAINT_NAME LEVEL CHECK_CLAUSE
+def foo t0 CONSTRAINT_1 Table `t` > 32
+def foo t0 CONSTRAINT_2 Table `t` < 50
+def foo t1 CONSTRAINT_1 Table `tt` > 32
+def foo t1 CONSTRAINT_2 Table `tt` < 50
+def foo t1 t Column `t` > 2
+def foo t2 CHK_dates Table `start_date` is null
+def foo t2 name Column char_length(`name`) > 2
ALTER TABLE t1
ADD CONSTRAINT CHK_new_ CHECK(t>tt);
SELECT * from information_schema.check_constraints;
-CONSTRAINT_CATALOG CONSTRAINT_SCHEMA TABLE_NAME CONSTRAINT_NAME CHECK_CLAUSE
-def foo t0 CONSTRAINT_1 `t` > 32
-def foo t0 CONSTRAINT_2 `t` < 50
-def foo t1 CHK_new_ `t` > `tt`
-def foo t1 CONSTRAINT_1 `tt` > 32
-def foo t1 CONSTRAINT_2 `tt` < 50
-def foo t1 t `t` > 2
-def foo t2 CHK_dates `start_date` is null
-def foo t2 name char_length(`name`) > 2
+CONSTRAINT_CATALOG CONSTRAINT_SCHEMA TABLE_NAME CONSTRAINT_NAME LEVEL CHECK_CLAUSE
+def foo t0 CONSTRAINT_1 Table `t` > 32
+def foo t0 CONSTRAINT_2 Table `t` < 50
+def foo t1 CHK_new_ Table `t` > `tt`
+def foo t1 CONSTRAINT_1 Table `tt` > 32
+def foo t1 CONSTRAINT_2 Table `tt` < 50
+def foo t1 t Column `t` > 2
+def foo t2 CHK_dates Table `start_date` is null
+def foo t2 name Column char_length(`name`) > 2
CREATE TABLE t3
(
a int,
@@ -95,22 +95,22 @@ CONSTRAINT b check (b>10), # table constraint
CONSTRAINT b1 check (b<123456789012345678901234567890123456789012345678901234567890123456789)
) ENGINE=InnoDB;
SELECT * from information_schema.check_constraints;
-CONSTRAINT_CATALOG CONSTRAINT_SCHEMA TABLE_NAME CONSTRAINT_NAME CHECK_CLAUSE
-def foo t0 CONSTRAINT_1 `t` > 32
-def foo t0 CONSTRAINT_2 `t` < 50
-def foo t1 CHK_new_ `t` > `tt`
-def foo t1 CONSTRAINT_1 `tt` > 32
-def foo t1 CONSTRAINT_2 `tt` < 50
-def foo t1 t `t` > 2
-def foo t2 CHK_dates `start_date` is null
-def foo t2 name char_length(`name`) > 2
-def foo t3 b `b` > 0
-def foo t3 b `b` > 10
-def foo t3 b1 `b` < 123456789012345678901234567890123456789012345678901234567890123456789
+CONSTRAINT_CATALOG CONSTRAINT_SCHEMA TABLE_NAME CONSTRAINT_NAME LEVEL CHECK_CLAUSE
+def foo t0 CONSTRAINT_1 Table `t` > 32
+def foo t0 CONSTRAINT_2 Table `t` < 50
+def foo t1 CHK_new_ Table `t` > `tt`
+def foo t1 CONSTRAINT_1 Table `tt` > 32
+def foo t1 CONSTRAINT_2 Table `tt` < 50
+def foo t1 t Column `t` > 2
+def foo t2 CHK_dates Table `start_date` is null
+def foo t2 name Column char_length(`name`) > 2
+def foo t3 b Column `b` > 0
+def foo t3 b Table `b` > 10
+def foo t3 b1 Table `b` < 123456789012345678901234567890123456789012345678901234567890123456789
disconnect con1;
CONNECT con2, localhost, boo2,, test;
SELECT * from information_schema.check_constraints;
-CONSTRAINT_CATALOG CONSTRAINT_SCHEMA TABLE_NAME CONSTRAINT_NAME CHECK_CLAUSE
+CONSTRAINT_CATALOG CONSTRAINT_SCHEMA TABLE_NAME CONSTRAINT_NAME LEVEL CHECK_CLAUSE
disconnect con2;
CONNECT con1, localhost, boo1,,foo;
DROP TABLE t0;
@@ -136,16 +136,54 @@ Grants for foo@%
GRANT USAGE ON *.* TO `foo`@`%`
GRANT SELECT (a) ON `db`.`t1` TO `foo`@`%`
SELECT * FROM information_schema.check_constraints;
-CONSTRAINT_CATALOG CONSTRAINT_SCHEMA TABLE_NAME CONSTRAINT_NAME CHECK_CLAUSE
-def db t1 CONSTRAINT_1 `b` > 0
-def mysql global_priv Priv json_valid(`Priv`)
+CONSTRAINT_CATALOG CONSTRAINT_SCHEMA TABLE_NAME CONSTRAINT_NAME LEVEL CHECK_CLAUSE
+def db t1 CONSTRAINT_1 Table `b` > 0
+def mysql global_priv Priv Column json_valid(`Priv`)
CONNECT con1,localhost, foo,, db;
SELECT a FROM t1;
a
1
2
SELECT * FROM information_schema.check_constraints;
-CONSTRAINT_CATALOG CONSTRAINT_SCHEMA TABLE_NAME CONSTRAINT_NAME CHECK_CLAUSE
+CONSTRAINT_CATALOG CONSTRAINT_SCHEMA TABLE_NAME CONSTRAINT_NAME LEVEL CHECK_CLAUSE
connection default;
DROP USER foo;
DROP DATABASE db;
+#
+# MDEV-24601: INFORMATION_SCHEMA doesn't differentiate between
+# column and table-level CHECK constraints
+#
+use test;
+create table t(check (t0>0),
+t0 int,
+t1 int check (t1<0),
+t2 int check (t2<-1),
+CONSTRAINT tc_1 check(t1 > 1),
+CONSTRAINT t2 check(t2 > 1));
+show create table t;
+Table Create Table
+t CREATE TABLE `t` (
+ `t0` int(11) DEFAULT NULL,
+ `t1` int(11) DEFAULT NULL CHECK (`t1` < 0),
+ `t2` int(11) DEFAULT NULL CHECK (`t2` < -1),
+ CONSTRAINT `CONSTRAINT_1` CHECK (`t0` > 0),
+ CONSTRAINT `tc_1` CHECK (`t1` > 1),
+ CONSTRAINT `t2` CHECK (`t2` > 1)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+select * from information_schema.table_constraints where CONSTRAINT_TYPE='CHECK';
+CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_SCHEMA TABLE_NAME CONSTRAINT_TYPE
+def mysql Priv mysql global_priv CHECK
+def test CONSTRAINT_1 test t CHECK
+def test t1 test t CHECK
+def test t2 test t CHECK
+def test t2 test t CHECK
+def test tc_1 test t CHECK
+select * from information_schema.check_constraints;
+CONSTRAINT_CATALOG CONSTRAINT_SCHEMA TABLE_NAME CONSTRAINT_NAME LEVEL CHECK_CLAUSE
+def mysql global_priv Priv Column json_valid(`Priv`)
+def test t CONSTRAINT_1 Table `t0` > 0
+def test t t1 Column `t1` < 0
+def test t t2 Column `t2` < -1
+def test t t2 Table `t2` > 1
+def test t tc_1 Table `t1` > 1
+drop table t;
diff --git a/mysql-test/suite/funcs_1/r/is_columns_is.result b/mysql-test/suite/funcs_1/r/is_columns_is.result
index 2088b6224a5..d7185636ed8 100644
--- a/mysql-test/suite/funcs_1/r/is_columns_is.result
+++ b/mysql-test/suite/funcs_1/r/is_columns_is.result
@@ -24,10 +24,11 @@ def information_schema CHARACTER_SETS CHARACTER_SET_NAME 1 '' NO varchar 32 96 N
def information_schema CHARACTER_SETS DEFAULT_COLLATE_NAME 2 '' NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select NEVER NULL
def information_schema CHARACTER_SETS DESCRIPTION 3 '' NO varchar 60 180 NULL NULL NULL utf8 utf8_general_ci varchar(60) select NEVER NULL
def information_schema CHARACTER_SETS MAXLEN 4 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(3) select NEVER NULL
-def information_schema CHECK_CONSTRAINTS CHECK_CLAUSE 5 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext select NEVER NULL
+def information_schema CHECK_CONSTRAINTS CHECK_CLAUSE 6 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext select NEVER NULL
def information_schema CHECK_CONSTRAINTS CONSTRAINT_CATALOG 1 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select NEVER NULL
def information_schema CHECK_CONSTRAINTS CONSTRAINT_NAME 4 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL
def information_schema CHECK_CONSTRAINTS CONSTRAINT_SCHEMA 2 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL
+def information_schema CHECK_CONSTRAINTS LEVEL 5 '' NO varchar 6 18 NULL NULL NULL utf8 utf8_general_ci varchar(6) select NEVER NULL
def information_schema CHECK_CONSTRAINTS TABLE_NAME 3 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL
def information_schema CLIENT_STATISTICS ACCESS_DENIED 22 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL
def information_schema CLIENT_STATISTICS BINLOG_BYTES_WRITTEN 9 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL
@@ -327,6 +328,7 @@ def information_schema ROUTINES SQL_PATH 22 NULL YES varchar 64 192 NULL NULL NU
def information_schema SCHEMATA CATALOG_NAME 1 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select NEVER NULL
def information_schema SCHEMATA DEFAULT_CHARACTER_SET_NAME 3 '' NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select NEVER NULL
def information_schema SCHEMATA DEFAULT_COLLATION_NAME 4 '' NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select NEVER NULL
+def information_schema SCHEMATA SCHEMA_COMMENT 6 '' NO varchar 1024 3072 NULL NULL NULL utf8 utf8_general_ci varchar(1024) select NEVER NULL
def information_schema SCHEMATA SCHEMA_NAME 2 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL
def information_schema SCHEMATA SQL_PATH 5 NULL YES varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select NEVER NULL
def information_schema SCHEMA_PRIVILEGES GRANTEE 1 '' NO varchar 190 570 NULL NULL NULL utf8 utf8_general_ci varchar(190) select NEVER NULL
@@ -364,6 +366,7 @@ def information_schema SYSTEM_VARIABLES DEFAULT_VALUE 5 NULL YES varchar 2048 61
def information_schema SYSTEM_VARIABLES ENUM_VALUE_LIST 12 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext select NEVER NULL
def information_schema SYSTEM_VARIABLES GLOBAL_VALUE 3 NULL YES varchar 2048 6144 NULL NULL NULL utf8 utf8_general_ci varchar(2048) select NEVER NULL
def information_schema SYSTEM_VARIABLES GLOBAL_VALUE_ORIGIN 4 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL
+def information_schema SYSTEM_VARIABLES GLOBAL_VALUE_PATH 15 NULL YES varchar 2048 6144 NULL NULL NULL utf8 utf8_general_ci varchar(2048) select NEVER NULL
def information_schema SYSTEM_VARIABLES NUMERIC_BLOCK_SIZE 11 NULL YES varchar 21 63 NULL NULL NULL utf8 utf8_general_ci varchar(21) select NEVER NULL
def information_schema SYSTEM_VARIABLES NUMERIC_MAX_VALUE 10 NULL YES varchar 21 63 NULL NULL NULL utf8 utf8_general_ci varchar(21) select NEVER NULL
def information_schema SYSTEM_VARIABLES NUMERIC_MIN_VALUE 9 NULL YES varchar 21 63 NULL NULL NULL utf8 utf8_general_ci varchar(21) select NEVER NULL
@@ -572,6 +575,7 @@ NULL information_schema CHARACTER_SETS MAXLEN bigint NULL NULL NULL NULL bigint(
3.0000 information_schema CHECK_CONSTRAINTS CONSTRAINT_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema CHECK_CONSTRAINTS TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema CHECK_CONSTRAINTS CONSTRAINT_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
+3.0000 information_schema CHECK_CONSTRAINTS LEVEL varchar 6 18 utf8 utf8_general_ci varchar(6)
1.0000 information_schema CHECK_CONSTRAINTS CHECK_CLAUSE longtext 4294967295 4294967295 utf8 utf8_general_ci longtext
3.0000 information_schema CLIENT_STATISTICS CLIENT varchar 64 192 utf8 utf8_general_ci varchar(64)
NULL information_schema CLIENT_STATISTICS TOTAL_CONNECTIONS bigint NULL NULL NULL NULL bigint(21)
@@ -873,6 +877,7 @@ NULL information_schema ROUTINES LAST_ALTERED datetime NULL NULL NULL NULL datet
3.0000 information_schema SCHEMATA DEFAULT_CHARACTER_SET_NAME varchar 32 96 utf8 utf8_general_ci varchar(32)
3.0000 information_schema SCHEMATA DEFAULT_COLLATION_NAME varchar 32 96 utf8 utf8_general_ci varchar(32)
3.0000 information_schema SCHEMATA SQL_PATH varchar 512 1536 utf8 utf8_general_ci varchar(512)
+3.0000 information_schema SCHEMATA SCHEMA_COMMENT varchar 1024 3072 utf8 utf8_general_ci varchar(1024)
3.0000 information_schema SCHEMA_PRIVILEGES GRANTEE varchar 190 570 utf8 utf8_general_ci varchar(190)
3.0000 information_schema SCHEMA_PRIVILEGES TABLE_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512)
3.0000 information_schema SCHEMA_PRIVILEGES TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64)
@@ -917,6 +922,7 @@ NULL information_schema STATISTICS SUB_PART bigint NULL NULL NULL NULL bigint(3)
1.0000 information_schema SYSTEM_VARIABLES ENUM_VALUE_LIST longtext 4294967295 4294967295 utf8 utf8_general_ci longtext
3.0000 information_schema SYSTEM_VARIABLES READ_ONLY varchar 3 9 utf8 utf8_general_ci varchar(3)
3.0000 information_schema SYSTEM_VARIABLES COMMAND_LINE_ARGUMENT varchar 64 192 utf8 utf8_general_ci varchar(64)
+3.0000 information_schema SYSTEM_VARIABLES GLOBAL_VALUE_PATH varchar 2048 6144 utf8 utf8_general_ci varchar(2048)
3.0000 information_schema TABLES TABLE_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512)
3.0000 information_schema TABLES TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema TABLES TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
diff --git a/mysql-test/suite/funcs_1/r/is_columns_is_embedded.result b/mysql-test/suite/funcs_1/r/is_columns_is_embedded.result
index 0105b6f891c..4be2b17393e 100644
--- a/mysql-test/suite/funcs_1/r/is_columns_is_embedded.result
+++ b/mysql-test/suite/funcs_1/r/is_columns_is_embedded.result
@@ -24,10 +24,11 @@ def information_schema CHARACTER_SETS CHARACTER_SET_NAME 1 '' NO varchar 32 96 N
def information_schema CHARACTER_SETS DEFAULT_COLLATE_NAME 2 '' NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) NEVER NULL
def information_schema CHARACTER_SETS DESCRIPTION 3 '' NO varchar 60 180 NULL NULL NULL utf8 utf8_general_ci varchar(60) NEVER NULL
def information_schema CHARACTER_SETS MAXLEN 4 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(3) NEVER NULL
-def information_schema CHECK_CONSTRAINTS CHECK_CLAUSE 5 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext NEVER NULL
+def information_schema CHECK_CONSTRAINTS CHECK_CLAUSE 6 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext NEVER NULL
def information_schema CHECK_CONSTRAINTS CONSTRAINT_CATALOG 1 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) NEVER NULL
def information_schema CHECK_CONSTRAINTS CONSTRAINT_NAME 4 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL
def information_schema CHECK_CONSTRAINTS CONSTRAINT_SCHEMA 2 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL
+def information_schema CHECK_CONSTRAINTS LEVEL 5 '' NO varchar 6 18 NULL NULL NULL utf8 utf8_general_ci varchar(6) NEVER NULL
def information_schema CHECK_CONSTRAINTS TABLE_NAME 3 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL
def information_schema CLIENT_STATISTICS ACCESS_DENIED 22 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL
def information_schema CLIENT_STATISTICS BINLOG_BYTES_WRITTEN 9 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL
@@ -327,6 +328,7 @@ def information_schema ROUTINES SQL_PATH 22 NULL YES varchar 64 192 NULL NULL NU
def information_schema SCHEMATA CATALOG_NAME 1 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) NEVER NULL
def information_schema SCHEMATA DEFAULT_CHARACTER_SET_NAME 3 '' NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) NEVER NULL
def information_schema SCHEMATA DEFAULT_COLLATION_NAME 4 '' NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) NEVER NULL
+def information_schema SCHEMATA SCHEMA_COMMENT 6 '' NO varchar 1024 3072 NULL NULL NULL utf8 utf8_general_ci varchar(1024) NEVER NULL
def information_schema SCHEMATA SCHEMA_NAME 2 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL
def information_schema SCHEMATA SQL_PATH 5 NULL YES varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) NEVER NULL
def information_schema SCHEMA_PRIVILEGES GRANTEE 1 '' NO varchar 190 570 NULL NULL NULL utf8 utf8_general_ci varchar(190) NEVER NULL
@@ -364,6 +366,7 @@ def information_schema SYSTEM_VARIABLES DEFAULT_VALUE 5 NULL YES varchar 2048 61
def information_schema SYSTEM_VARIABLES ENUM_VALUE_LIST 12 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext NEVER NULL
def information_schema SYSTEM_VARIABLES GLOBAL_VALUE 3 NULL YES varchar 2048 6144 NULL NULL NULL utf8 utf8_general_ci varchar(2048) NEVER NULL
def information_schema SYSTEM_VARIABLES GLOBAL_VALUE_ORIGIN 4 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL
+def information_schema SYSTEM_VARIABLES GLOBAL_VALUE_PATH 15 NULL YES varchar 2048 6144 NULL NULL NULL utf8 utf8_general_ci varchar(2048) NEVER NULL
def information_schema SYSTEM_VARIABLES NUMERIC_BLOCK_SIZE 11 NULL YES varchar 21 63 NULL NULL NULL utf8 utf8_general_ci varchar(21) NEVER NULL
def information_schema SYSTEM_VARIABLES NUMERIC_MAX_VALUE 10 NULL YES varchar 21 63 NULL NULL NULL utf8 utf8_general_ci varchar(21) NEVER NULL
def information_schema SYSTEM_VARIABLES NUMERIC_MIN_VALUE 9 NULL YES varchar 21 63 NULL NULL NULL utf8 utf8_general_ci varchar(21) NEVER NULL
@@ -572,6 +575,7 @@ NULL information_schema CHARACTER_SETS MAXLEN bigint NULL NULL NULL NULL bigint(
3.0000 information_schema CHECK_CONSTRAINTS CONSTRAINT_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema CHECK_CONSTRAINTS TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema CHECK_CONSTRAINTS CONSTRAINT_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
+3.0000 information_schema CHECK_CONSTRAINTS LEVEL varchar 6 18 utf8 utf8_general_ci varchar(6)
1.0000 information_schema CHECK_CONSTRAINTS CHECK_CLAUSE longtext 4294967295 4294967295 utf8 utf8_general_ci longtext
3.0000 information_schema CLIENT_STATISTICS CLIENT varchar 64 192 utf8 utf8_general_ci varchar(64)
NULL information_schema CLIENT_STATISTICS TOTAL_CONNECTIONS bigint NULL NULL NULL NULL bigint(21)
@@ -873,6 +877,7 @@ NULL information_schema ROUTINES LAST_ALTERED datetime NULL NULL NULL NULL datet
3.0000 information_schema SCHEMATA DEFAULT_CHARACTER_SET_NAME varchar 32 96 utf8 utf8_general_ci varchar(32)
3.0000 information_schema SCHEMATA DEFAULT_COLLATION_NAME varchar 32 96 utf8 utf8_general_ci varchar(32)
3.0000 information_schema SCHEMATA SQL_PATH varchar 512 1536 utf8 utf8_general_ci varchar(512)
+3.0000 information_schema SCHEMATA SCHEMA_COMMENT varchar 1024 3072 utf8 utf8_general_ci varchar(1024)
3.0000 information_schema SCHEMA_PRIVILEGES GRANTEE varchar 190 570 utf8 utf8_general_ci varchar(190)
3.0000 information_schema SCHEMA_PRIVILEGES TABLE_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512)
3.0000 information_schema SCHEMA_PRIVILEGES TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64)
@@ -917,6 +922,7 @@ NULL information_schema STATISTICS SUB_PART bigint NULL NULL NULL NULL bigint(3)
1.0000 information_schema SYSTEM_VARIABLES ENUM_VALUE_LIST longtext 4294967295 4294967295 utf8 utf8_general_ci longtext
3.0000 information_schema SYSTEM_VARIABLES READ_ONLY varchar 3 9 utf8 utf8_general_ci varchar(3)
3.0000 information_schema SYSTEM_VARIABLES COMMAND_LINE_ARGUMENT varchar 64 192 utf8 utf8_general_ci varchar(64)
+3.0000 information_schema SYSTEM_VARIABLES GLOBAL_VALUE_PATH varchar 2048 6144 utf8 utf8_general_ci varchar(2048)
3.0000 information_schema TABLES TABLE_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512)
3.0000 information_schema TABLES TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema TABLES TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
diff --git a/mysql-test/suite/funcs_1/r/is_engines_federated.result b/mysql-test/suite/funcs_1/r/is_engines_federated.result
index 20926458ed0..d9da64c7f7d 100644
--- a/mysql-test/suite/funcs_1/r/is_engines_federated.result
+++ b/mysql-test/suite/funcs_1/r/is_engines_federated.result
@@ -2,7 +2,7 @@ SELECT * FROM information_schema.engines
WHERE ENGINE = 'FEDERATED';
ENGINE FEDERATED
SUPPORT YES
-COMMENT Allows to access tables on other MariaDB servers, supports transactions and more
+COMMENT Allows one to access tables on other MariaDB servers, supports transactions and more
TRANSACTIONS YES
XA NO
SAVEPOINTS YES
diff --git a/mysql-test/suite/funcs_1/r/is_schemata.result b/mysql-test/suite/funcs_1/r/is_schemata.result
index 6db6ac8f150..18ee8d01147 100644
--- a/mysql-test/suite/funcs_1/r/is_schemata.result
+++ b/mysql-test/suite/funcs_1/r/is_schemata.result
@@ -33,6 +33,7 @@ SCHEMA_NAME varchar(64) NO
DEFAULT_CHARACTER_SET_NAME varchar(32) NO
DEFAULT_COLLATION_NAME varchar(32) NO
SQL_PATH varchar(512) YES NULL
+SCHEMA_COMMENT varchar(1024) NO
SHOW CREATE TABLE information_schema.SCHEMATA;
Table Create Table
SCHEMATA CREATE TEMPORARY TABLE `SCHEMATA` (
@@ -40,7 +41,8 @@ SCHEMATA CREATE TEMPORARY TABLE `SCHEMATA` (
`SCHEMA_NAME` varchar(64) NOT NULL DEFAULT '',
`DEFAULT_CHARACTER_SET_NAME` varchar(32) NOT NULL DEFAULT '',
`DEFAULT_COLLATION_NAME` varchar(32) NOT NULL DEFAULT '',
- `SQL_PATH` varchar(512) DEFAULT NULL
+ `SQL_PATH` varchar(512) DEFAULT NULL,
+ `SCHEMA_COMMENT` varchar(1024) NOT NULL DEFAULT ''
) ENGINE=MEMORY DEFAULT CHARSET=utf8
SHOW COLUMNS FROM information_schema.SCHEMATA;
Field Type Null Key Default Extra
@@ -49,6 +51,7 @@ SCHEMA_NAME varchar(64) NO
DEFAULT_CHARACTER_SET_NAME varchar(32) NO
DEFAULT_COLLATION_NAME varchar(32) NO
SQL_PATH varchar(512) YES NULL
+SCHEMA_COMMENT varchar(1024) NO
SELECT catalog_name, schema_name, sql_path
FROM information_schema.schemata
WHERE catalog_name IS NOT NULL or sql_path IS NOT NULL
@@ -77,9 +80,9 @@ GRANT SELECT ON db_datadict_1.* to 'testuser2'@'localhost';
GRANT SELECT ON db_datadict_2.* to 'testuser2'@'localhost';
SELECT * FROM information_schema.schemata
WHERE schema_name LIKE 'db_datadict_%' ORDER BY schema_name;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def db_datadict_1 latin1 latin1_swedish_ci NULL
-def db_datadict_2 latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def db_datadict_1 latin1 latin1_swedish_ci NULL
+def db_datadict_2 latin1 latin1_swedish_ci NULL
SHOW DATABASES LIKE 'db_datadict_%';
Database (db_datadict_%)
db_datadict_1
@@ -87,17 +90,17 @@ db_datadict_2
connect testuser1, localhost, testuser1, , db_datadict_1;
SELECT * FROM information_schema.schemata
WHERE schema_name LIKE 'db_datadict_%' ORDER BY schema_name;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def db_datadict_1 latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def db_datadict_1 latin1 latin1_swedish_ci NULL
SHOW DATABASES LIKE 'db_datadict_%';
Database (db_datadict_%)
db_datadict_1
connect testuser2, localhost, testuser2, , db_datadict_2;
SELECT * FROM information_schema.schemata
WHERE schema_name LIKE 'db_datadict_%' ORDER BY schema_name;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def db_datadict_1 latin1 latin1_swedish_ci NULL
-def db_datadict_2 latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def db_datadict_1 latin1 latin1_swedish_ci NULL
+def db_datadict_2 latin1 latin1_swedish_ci NULL
SHOW DATABASES LIKE 'db_datadict_%';
Database (db_datadict_%)
db_datadict_1
@@ -105,7 +108,7 @@ db_datadict_2
connect testuser3, localhost, testuser3, , test;
SELECT * FROM information_schema.schemata
WHERE schema_name LIKE 'db_datadict_%' ORDER BY schema_name;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
SHOW DATABASES LIKE 'db_datadict_%';
Database (db_datadict_%)
connection default;
@@ -122,11 +125,11 @@ DROP DATABASE db_datadict_2;
#################################################################################
DROP DATABASE IF EXISTS db_datadict;
SELECT * FROM information_schema.schemata WHERE schema_name = 'db_datadict';
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
CREATE DATABASE db_datadict CHARACTER SET 'latin1' COLLATE 'latin1_swedish_ci';
SELECT * FROM information_schema.schemata WHERE schema_name = 'db_datadict';
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def db_datadict latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def db_datadict latin1 latin1_swedish_ci NULL
SELECT schema_name, default_character_set_name
FROM information_schema.schemata WHERE schema_name = 'db_datadict';
schema_name default_character_set_name
diff --git a/mysql-test/suite/funcs_1/r/is_schemata_embedded.result b/mysql-test/suite/funcs_1/r/is_schemata_embedded.result
index bc993e8dc9f..6cd93190efd 100644
--- a/mysql-test/suite/funcs_1/r/is_schemata_embedded.result
+++ b/mysql-test/suite/funcs_1/r/is_schemata_embedded.result
@@ -33,6 +33,7 @@ SCHEMA_NAME varchar(64) NO
DEFAULT_CHARACTER_SET_NAME varchar(32) NO
DEFAULT_COLLATION_NAME varchar(32) NO
SQL_PATH varchar(512) YES NULL
+SCHEMA_COMMENT varchar(1024) NO
SHOW CREATE TABLE information_schema.SCHEMATA;
Table Create Table
SCHEMATA CREATE TEMPORARY TABLE `SCHEMATA` (
@@ -40,7 +41,8 @@ SCHEMATA CREATE TEMPORARY TABLE `SCHEMATA` (
`SCHEMA_NAME` varchar(64) NOT NULL DEFAULT '',
`DEFAULT_CHARACTER_SET_NAME` varchar(32) NOT NULL DEFAULT '',
`DEFAULT_COLLATION_NAME` varchar(32) NOT NULL DEFAULT '',
- `SQL_PATH` varchar(512) DEFAULT NULL
+ `SQL_PATH` varchar(512) DEFAULT NULL,
+ `SCHEMA_COMMENT` varchar(1024) NOT NULL DEFAULT ''
) ENGINE=MEMORY DEFAULT CHARSET=utf8
SHOW COLUMNS FROM information_schema.SCHEMATA;
Field Type Null Key Default Extra
@@ -49,6 +51,7 @@ SCHEMA_NAME varchar(64) NO
DEFAULT_CHARACTER_SET_NAME varchar(32) NO
DEFAULT_COLLATION_NAME varchar(32) NO
SQL_PATH varchar(512) YES NULL
+SCHEMA_COMMENT varchar(1024) NO
SELECT catalog_name, schema_name, sql_path
FROM information_schema.schemata
WHERE catalog_name IS NOT NULL or sql_path IS NOT NULL
@@ -77,9 +80,9 @@ GRANT SELECT ON db_datadict_1.* to 'testuser2'@'localhost';
GRANT SELECT ON db_datadict_2.* to 'testuser2'@'localhost';
SELECT * FROM information_schema.schemata
WHERE schema_name LIKE 'db_datadict_%' ORDER BY schema_name;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def db_datadict_1 latin1 latin1_swedish_ci NULL
-def db_datadict_2 latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def db_datadict_1 latin1 latin1_swedish_ci NULL
+def db_datadict_2 latin1 latin1_swedish_ci NULL
SHOW DATABASES LIKE 'db_datadict_%';
Database (db_datadict_%)
db_datadict_1
@@ -87,9 +90,9 @@ db_datadict_2
connect testuser1, localhost, testuser1, , db_datadict_1;
SELECT * FROM information_schema.schemata
WHERE schema_name LIKE 'db_datadict_%' ORDER BY schema_name;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def db_datadict_1 latin1 latin1_swedish_ci NULL
-def db_datadict_2 latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def db_datadict_1 latin1 latin1_swedish_ci NULL
+def db_datadict_2 latin1 latin1_swedish_ci NULL
SHOW DATABASES LIKE 'db_datadict_%';
Database (db_datadict_%)
db_datadict_1
@@ -97,9 +100,9 @@ db_datadict_2
connect testuser2, localhost, testuser2, , db_datadict_2;
SELECT * FROM information_schema.schemata
WHERE schema_name LIKE 'db_datadict_%' ORDER BY schema_name;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def db_datadict_1 latin1 latin1_swedish_ci NULL
-def db_datadict_2 latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def db_datadict_1 latin1 latin1_swedish_ci NULL
+def db_datadict_2 latin1 latin1_swedish_ci NULL
SHOW DATABASES LIKE 'db_datadict_%';
Database (db_datadict_%)
db_datadict_1
@@ -107,9 +110,9 @@ db_datadict_2
connect testuser3, localhost, testuser3, , test;
SELECT * FROM information_schema.schemata
WHERE schema_name LIKE 'db_datadict_%' ORDER BY schema_name;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def db_datadict_1 latin1 latin1_swedish_ci NULL
-def db_datadict_2 latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def db_datadict_1 latin1 latin1_swedish_ci NULL
+def db_datadict_2 latin1 latin1_swedish_ci NULL
SHOW DATABASES LIKE 'db_datadict_%';
Database (db_datadict_%)
db_datadict_1
@@ -128,11 +131,11 @@ DROP DATABASE db_datadict_2;
#################################################################################
DROP DATABASE IF EXISTS db_datadict;
SELECT * FROM information_schema.schemata WHERE schema_name = 'db_datadict';
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
CREATE DATABASE db_datadict CHARACTER SET 'latin1' COLLATE 'latin1_swedish_ci';
SELECT * FROM information_schema.schemata WHERE schema_name = 'db_datadict';
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def db_datadict latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def db_datadict latin1 latin1_swedish_ci NULL
SELECT schema_name, default_character_set_name
FROM information_schema.schemata WHERE schema_name = 'db_datadict';
schema_name default_character_set_name
diff --git a/mysql-test/suite/funcs_1/r/is_schemata_is_mysql_test.result b/mysql-test/suite/funcs_1/r/is_schemata_is_mysql_test.result
index 0679142bd82..ccf0e513d88 100644
--- a/mysql-test/suite/funcs_1/r/is_schemata_is_mysql_test.result
+++ b/mysql-test/suite/funcs_1/r/is_schemata_is_mysql_test.result
@@ -9,10 +9,10 @@ GRANT SELECT ON db_datadict.* TO 'testuser1'@'localhost';
SELECT * FROM information_schema.schemata
WHERE schema_name IN ('information_schema','mysql','test')
ORDER BY schema_name;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def information_schema utf8 utf8_general_ci NULL
-def mysql latin1 latin1_swedish_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def information_schema utf8 utf8_general_ci NULL
+def mysql latin1 latin1_swedish_ci NULL
+def test latin1 latin1_swedish_ci NULL
SHOW DATABASES LIKE 'information_schema';
Database (information_schema)
information_schema
@@ -26,9 +26,9 @@ connect testuser1, localhost, testuser1, , db_datadict;
SELECT * FROM information_schema.schemata
WHERE schema_name IN ('information_schema','mysql','test')
ORDER BY schema_name;
-CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
-def information_schema utf8 utf8_general_ci NULL
-def test latin1 latin1_swedish_ci NULL
+CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH SCHEMA_COMMENT
+def information_schema utf8 utf8_general_ci NULL
+def test latin1 latin1_swedish_ci NULL
SHOW DATABASES LIKE 'information_schema';
Database (information_schema)
information_schema
diff --git a/mysql-test/suite/funcs_1/r/is_statistics.result b/mysql-test/suite/funcs_1/r/is_statistics.result
index ad9af516fde..858e1b0399e 100644
--- a/mysql-test/suite/funcs_1/r/is_statistics.result
+++ b/mysql-test/suite/funcs_1/r/is_statistics.result
@@ -109,6 +109,7 @@ def mysql help_category mysql name
def mysql help_category mysql PRIMARY
def mysql help_keyword mysql name
def mysql help_keyword mysql PRIMARY
+def mysql help_relation mysql help_topic_id
def mysql help_relation mysql PRIMARY
def mysql help_relation mysql PRIMARY
def mysql help_topic mysql name
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 c01c456edf8..40d5e125c0d 100644
--- a/mysql-test/suite/funcs_1/r/is_statistics_mysql.result
+++ b/mysql-test/suite/funcs_1/r/is_statistics_mysql.result
@@ -30,6 +30,7 @@ def mysql help_category 0 mysql name 1 name A #CARD# NULL NULL BTREE
def mysql help_category 0 mysql PRIMARY 1 help_category_id A #CARD# NULL NULL BTREE
def mysql help_keyword 0 mysql name 1 name A #CARD# NULL NULL BTREE
def mysql help_keyword 0 mysql PRIMARY 1 help_keyword_id A #CARD# NULL NULL BTREE
+def mysql help_relation 1 mysql help_topic_id 1 help_topic_id A #CARD# NULL NULL BTREE
def mysql help_relation 0 mysql PRIMARY 1 help_keyword_id A #CARD# NULL NULL BTREE
def mysql help_relation 0 mysql PRIMARY 2 help_topic_id A #CARD# NULL NULL BTREE
def mysql help_topic 0 mysql name 1 name A #CARD# NULL NULL BTREE
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 b7bd3ec2e23..01a98e413da 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
@@ -30,6 +30,7 @@ def mysql help_category 0 mysql name 1 name A #CARD# NULL NULL BTREE
def mysql help_category 0 mysql PRIMARY 1 help_category_id A #CARD# NULL NULL BTREE
def mysql help_keyword 0 mysql name 1 name A #CARD# NULL NULL BTREE
def mysql help_keyword 0 mysql PRIMARY 1 help_keyword_id A #CARD# NULL NULL BTREE
+def mysql help_relation 1 mysql help_topic_id 1 help_topic_id A #CARD# NULL NULL BTREE
def mysql help_relation 0 mysql PRIMARY 1 help_keyword_id A #CARD# NULL NULL BTREE
def mysql help_relation 0 mysql PRIMARY 2 help_topic_id A #CARD# NULL NULL BTREE
def mysql help_topic 0 mysql name 1 name A #CARD# NULL NULL BTREE
@@ -110,6 +111,7 @@ def mysql help_category 0 mysql name 1 name A #CARD# NULL NULL BTREE
def mysql help_category 0 mysql PRIMARY 1 help_category_id A #CARD# NULL NULL BTREE
def mysql help_keyword 0 mysql name 1 name A #CARD# NULL NULL BTREE
def mysql help_keyword 0 mysql PRIMARY 1 help_keyword_id A #CARD# NULL NULL BTREE
+def mysql help_relation 1 mysql help_topic_id 1 help_topic_id A #CARD# NULL NULL BTREE
def mysql help_relation 0 mysql PRIMARY 1 help_keyword_id A #CARD# NULL NULL BTREE
def mysql help_relation 0 mysql PRIMARY 2 help_topic_id A #CARD# NULL NULL BTREE
def mysql help_topic 0 mysql name 1 name A #CARD# NULL NULL BTREE
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 f7a83dd3ddb..27bb2b3de83 100644
--- a/mysql-test/suite/funcs_1/r/is_user_privileges.result
+++ b/mysql-test/suite/funcs_1/r/is_user_privileges.result
@@ -90,6 +90,7 @@ host localhost
user testuser1
json_detailed(priv) {
"access": 0,
+ "version_id": VERSION_ID,
"plugin": "mysql_native_password",
"authentication_string": "",
"password_last_changed": #
@@ -98,6 +99,7 @@ host localhost
user testuser2
json_detailed(priv) {
"access": 6,
+ "version_id": VERSION_ID,
"plugin": "mysql_native_password",
"authentication_string": "",
"password_last_changed": #
@@ -106,6 +108,7 @@ host localhost
user testuser3
json_detailed(priv) {
"access": 0,
+ "version_id": VERSION_ID,
"plugin": "mysql_native_password",
"authentication_string": "",
"password_last_changed": #
@@ -138,6 +141,7 @@ host localhost
user testuser1
json_detailed(priv) {
"access": 0,
+ "version_id": VERSION_ID,
"plugin": "mysql_native_password",
"authentication_string": "",
"password_last_changed": #
@@ -146,6 +150,7 @@ host localhost
user testuser2
json_detailed(priv) {
"access": 6,
+ "version_id": VERSION_ID,
"plugin": "mysql_native_password",
"authentication_string": "",
"password_last_changed": #
@@ -154,6 +159,7 @@ host localhost
user testuser3
json_detailed(priv) {
"access": 0,
+ "version_id": VERSION_ID,
"plugin": "mysql_native_password",
"authentication_string": "",
"password_last_changed": #
@@ -172,6 +178,7 @@ host localhost
user testuser1
json_detailed(priv) {
"access": 0,
+ "version_id": VERSION_ID,
"plugin": "mysql_native_password",
"authentication_string": "",
"password_last_changed": #
@@ -180,6 +187,7 @@ host localhost
user testuser2
json_detailed(priv) {
"access": 6,
+ "version_id": VERSION_ID,
"plugin": "mysql_native_password",
"authentication_string": "",
"password_last_changed": #
@@ -188,6 +196,7 @@ host localhost
user testuser3
json_detailed(priv) {
"access": 0,
+ "version_id": VERSION_ID,
"plugin": "mysql_native_password",
"authentication_string": "",
"password_last_changed": #
@@ -228,6 +237,7 @@ host localhost
user testuser1
json_detailed(priv) {
"access": 1,
+ "version_id": VERSION_ID,
"plugin": "mysql_native_password",
"authentication_string": "",
"password_last_changed": #
@@ -236,6 +246,7 @@ host localhost
user testuser2
json_detailed(priv) {
"access": 6,
+ "version_id": VERSION_ID,
"plugin": "mysql_native_password",
"authentication_string": "",
"password_last_changed": #
@@ -244,6 +255,7 @@ host localhost
user testuser3
json_detailed(priv) {
"access": 0,
+ "version_id": VERSION_ID,
"plugin": "mysql_native_password",
"authentication_string": "",
"password_last_changed": #
@@ -276,6 +288,7 @@ host localhost
user testuser1
json_detailed(priv) {
"access": 1025,
+ "version_id": VERSION_ID,
"plugin": "mysql_native_password",
"authentication_string": "",
"password_last_changed": #
@@ -284,6 +297,7 @@ host localhost
user testuser2
json_detailed(priv) {
"access": 6,
+ "version_id": VERSION_ID,
"plugin": "mysql_native_password",
"authentication_string": "",
"password_last_changed": #
@@ -292,6 +306,7 @@ host localhost
user testuser3
json_detailed(priv) {
"access": 0,
+ "version_id": VERSION_ID,
"plugin": "mysql_native_password",
"authentication_string": "",
"password_last_changed": #
@@ -310,6 +325,7 @@ host localhost
user testuser1
json_detailed(priv) {
"access": 1025,
+ "version_id": VERSION_ID,
"plugin": "mysql_native_password",
"authentication_string": "",
"password_last_changed": #
@@ -318,6 +334,7 @@ host localhost
user testuser2
json_detailed(priv) {
"access": 6,
+ "version_id": VERSION_ID,
"plugin": "mysql_native_password",
"authentication_string": "",
"password_last_changed": #
@@ -326,6 +343,7 @@ host localhost
user testuser3
json_detailed(priv) {
"access": 0,
+ "version_id": VERSION_ID,
"plugin": "mysql_native_password",
"authentication_string": "",
"password_last_changed": #
@@ -396,6 +414,7 @@ host localhost
user testuser1
json_detailed(priv) {
"access": 0,
+ "version_id": VERSION_ID,
"plugin": "mysql_native_password",
"authentication_string": "",
"password_last_changed": #
@@ -404,6 +423,7 @@ host localhost
user testuser2
json_detailed(priv) {
"access": 6,
+ "version_id": VERSION_ID,
"plugin": "mysql_native_password",
"authentication_string": "",
"password_last_changed": #
@@ -412,6 +432,7 @@ host localhost
user testuser3
json_detailed(priv) {
"access": 0,
+ "version_id": VERSION_ID,
"plugin": "mysql_native_password",
"authentication_string": "",
"password_last_changed": #
@@ -477,6 +498,7 @@ host localhost
user testuser1
json_detailed(priv) {
"access": 0,
+ "version_id": VERSION_ID,
"plugin": "mysql_native_password",
"authentication_string": "",
"password_last_changed": #
@@ -485,6 +507,7 @@ host localhost
user testuser2
json_detailed(priv) {
"access": 6,
+ "version_id": VERSION_ID,
"plugin": "mysql_native_password",
"authentication_string": "",
"password_last_changed": #
@@ -493,6 +516,7 @@ host localhost
user testuser3
json_detailed(priv) {
"access": 0,
+ "version_id": VERSION_ID,
"plugin": "mysql_native_password",
"authentication_string": "",
"password_last_changed": #
@@ -511,6 +535,7 @@ host localhost
user testuser1
json_detailed(priv) {
"access": 0,
+ "version_id": VERSION_ID,
"plugin": "mysql_native_password",
"authentication_string": "",
"password_last_changed": #
@@ -519,6 +544,7 @@ host localhost
user testuser2
json_detailed(priv) {
"access": 6,
+ "version_id": VERSION_ID,
"plugin": "mysql_native_password",
"authentication_string": "",
"password_last_changed": #
@@ -527,6 +553,7 @@ host localhost
user testuser3
json_detailed(priv) {
"access": 0,
+ "version_id": VERSION_ID,
"plugin": "mysql_native_password",
"authentication_string": "",
"password_last_changed": #
@@ -552,6 +579,7 @@ host localhost
user testuser1
json_detailed(priv) {
"access": 0,
+ "version_id": VERSION_ID,
"plugin": "mysql_native_password",
"authentication_string": "",
"password_last_changed": #
@@ -560,6 +588,7 @@ host localhost
user testuser2
json_detailed(priv) {
"access": 6,
+ "version_id": VERSION_ID,
"plugin": "mysql_native_password",
"authentication_string": "",
"password_last_changed": #
@@ -568,6 +597,7 @@ host localhost
user testuser3
json_detailed(priv) {
"access": 0,
+ "version_id": VERSION_ID,
"plugin": "mysql_native_password",
"authentication_string": "",
"password_last_changed": #
@@ -608,6 +638,7 @@ host localhost
user testuser1
json_detailed(priv) {
"access": 0,
+ "version_id": VERSION_ID,
"plugin": "mysql_native_password",
"authentication_string": "",
"password_last_changed": #
@@ -616,6 +647,7 @@ host localhost
user testuser2
json_detailed(priv) {
"access": 6,
+ "version_id": VERSION_ID,
"plugin": "mysql_native_password",
"authentication_string": "",
"password_last_changed": #
@@ -624,6 +656,7 @@ host localhost
user testuser3
json_detailed(priv) {
"access": 0,
+ "version_id": VERSION_ID,
"plugin": "mysql_native_password",
"authentication_string": "",
"password_last_changed": #
diff --git a/mysql-test/suite/funcs_1/r/memory_trig_03.result b/mysql-test/suite/funcs_1/r/memory_trig_03.result
index 75286115d86..87f26acff46 100644
--- a/mysql-test/suite/funcs_1/r/memory_trig_03.result
+++ b/mysql-test/suite/funcs_1/r/memory_trig_03.result
@@ -78,7 +78,7 @@ grant ALL on *.* to test_noprivs@localhost;
revoke TRIGGER on *.* from test_noprivs@localhost;
show grants for test_noprivs@localhost;
Grants for test_noprivs@localhost
-GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, CREATE TABLESPACE, DELETE HISTORY ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, BINLOG MONITOR, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, CREATE TABLESPACE, DELETE HISTORY, SET USER, FEDERATED ADMIN, CONNECTION ADMIN, READ_ONLY ADMIN, REPLICATION SLAVE ADMIN, REPLICATION MASTER ADMIN, BINLOG ADMIN, BINLOG REPLAY, SLAVE MONITOR ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
grant TRIGGER on *.* to test_yesprivs@localhost;
grant SELECT on priv_db.t1 to test_yesprivs@localhost;
@@ -168,7 +168,7 @@ grant ALL on *.* to test_noprivs@localhost;
revoke UPDATE on *.* from test_noprivs@localhost;
show grants for test_noprivs@localhost;
Grants for test_noprivs@localhost
-GRANT SELECT, INSERT, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, INSERT, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, BINLOG MONITOR, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY, SET USER, FEDERATED ADMIN, CONNECTION ADMIN, READ_ONLY ADMIN, REPLICATION SLAVE ADMIN, REPLICATION MASTER ADMIN, BINLOG ADMIN, BINLOG REPLAY, SLAVE MONITOR ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
grant TRIGGER, UPDATE on *.* to test_yesprivs@localhost;
show grants for test_yesprivs@localhost;
@@ -183,7 +183,7 @@ test_noprivs@localhost
use priv_db;
show grants;
Grants for test_noprivs@localhost
-GRANT SELECT, INSERT, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, INSERT, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, BINLOG MONITOR, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY, SET USER, FEDERATED ADMIN, CONNECTION ADMIN, READ_ONLY ADMIN, REPLICATION SLAVE ADMIN, REPLICATION MASTER ADMIN, BINLOG ADMIN, BINLOG REPLAY, SLAVE MONITOR ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
select f1 from t1 order by f1;
f1
insert 3.5.3.2-no
@@ -441,7 +441,7 @@ grant ALL on *.* to test_noprivs@localhost;
revoke SELECT on *.* from test_noprivs@localhost;
show grants for test_noprivs@localhost;
Grants for test_noprivs@localhost
-GRANT INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, BINLOG MONITOR, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY, SET USER, FEDERATED ADMIN, CONNECTION ADMIN, READ_ONLY ADMIN, REPLICATION SLAVE ADMIN, REPLICATION MASTER ADMIN, BINLOG ADMIN, BINLOG REPLAY, SLAVE MONITOR ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
grant TRIGGER, SELECT on *.* to test_yesprivs@localhost;
show grants for test_yesprivs@localhost;
@@ -457,7 +457,7 @@ test_noprivs@localhost
use priv_db;
show grants;
Grants for test_noprivs@localhost
-GRANT INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, BINLOG MONITOR, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY, SET USER, FEDERATED ADMIN, CONNECTION ADMIN, READ_ONLY ADMIN, REPLICATION SLAVE ADMIN, REPLICATION MASTER ADMIN, BINLOG ADMIN, BINLOG REPLAY, SLAVE MONITOR ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
create trigger trg5a_1 before INSERT on t1 for each row
set @test_var = new.f1;
connection default;
diff --git a/mysql-test/suite/funcs_1/r/memory_trig_03e.result b/mysql-test/suite/funcs_1/r/memory_trig_03e.result
index 72c269cb89a..d100bdfc824 100644
--- a/mysql-test/suite/funcs_1/r/memory_trig_03e.result
+++ b/mysql-test/suite/funcs_1/r/memory_trig_03e.result
@@ -604,7 +604,7 @@ trig 1_1-yes
revoke TRIGGER on *.* from test_yesprivs@localhost;
show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost
-GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, CREATE TABLESPACE, DELETE HISTORY ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, BINLOG MONITOR, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, CREATE TABLESPACE, DELETE HISTORY, SET USER, FEDERATED ADMIN, CONNECTION ADMIN, READ_ONLY ADMIN, REPLICATION SLAVE ADMIN, REPLICATION MASTER ADMIN, BINLOG ADMIN, BINLOG REPLAY, SLAVE MONITOR ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
disconnect yes_privs;
connect yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
select current_user;
@@ -657,7 +657,7 @@ root@localhost
grant TRIGGER on priv_db.* to test_yesprivs@localhost;
show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost
-GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, CREATE TABLESPACE, DELETE HISTORY ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, BINLOG MONITOR, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, CREATE TABLESPACE, DELETE HISTORY, SET USER, FEDERATED ADMIN, CONNECTION ADMIN, READ_ONLY ADMIN, REPLICATION SLAVE ADMIN, REPLICATION MASTER ADMIN, BINLOG ADMIN, BINLOG REPLAY, SLAVE MONITOR ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT TRIGGER ON `priv_db`.* TO `test_yesprivs`@`localhost`
trigger privilege on db level for create:
@@ -1351,7 +1351,7 @@ drop trigger trg1_0;
create definer=not_ex_user@localhost trigger trg1_0
before INSERT on t1 for each row
set new.f1 = 'trig 1_0-yes';
-ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
+ERROR 42000: Access denied; you need (at least one of) the SUPER, SET USER privilege(s) for this operation
create definer=current_user trigger trg1_1
before INSERT on t1 for each row
set new.f1 = 'trig 1_1-yes';
@@ -1386,7 +1386,7 @@ GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`loca
create definer=not_ex_user@localhost trigger trg1_3
after UPDATE on t1 for each row
set @var1 = 'trig 1_3-yes';
-ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
+ERROR 42000: Access denied; you need (at least one of) the SUPER, SET USER privilege(s) for this operation
connection default;
select current_user;
current_user
diff --git a/mysql-test/suite/funcs_1/r/myisam_trig_03.result b/mysql-test/suite/funcs_1/r/myisam_trig_03.result
index 75286115d86..87f26acff46 100644
--- a/mysql-test/suite/funcs_1/r/myisam_trig_03.result
+++ b/mysql-test/suite/funcs_1/r/myisam_trig_03.result
@@ -78,7 +78,7 @@ grant ALL on *.* to test_noprivs@localhost;
revoke TRIGGER on *.* from test_noprivs@localhost;
show grants for test_noprivs@localhost;
Grants for test_noprivs@localhost
-GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, CREATE TABLESPACE, DELETE HISTORY ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, BINLOG MONITOR, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, CREATE TABLESPACE, DELETE HISTORY, SET USER, FEDERATED ADMIN, CONNECTION ADMIN, READ_ONLY ADMIN, REPLICATION SLAVE ADMIN, REPLICATION MASTER ADMIN, BINLOG ADMIN, BINLOG REPLAY, SLAVE MONITOR ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
grant TRIGGER on *.* to test_yesprivs@localhost;
grant SELECT on priv_db.t1 to test_yesprivs@localhost;
@@ -168,7 +168,7 @@ grant ALL on *.* to test_noprivs@localhost;
revoke UPDATE on *.* from test_noprivs@localhost;
show grants for test_noprivs@localhost;
Grants for test_noprivs@localhost
-GRANT SELECT, INSERT, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, INSERT, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, BINLOG MONITOR, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY, SET USER, FEDERATED ADMIN, CONNECTION ADMIN, READ_ONLY ADMIN, REPLICATION SLAVE ADMIN, REPLICATION MASTER ADMIN, BINLOG ADMIN, BINLOG REPLAY, SLAVE MONITOR ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
grant TRIGGER, UPDATE on *.* to test_yesprivs@localhost;
show grants for test_yesprivs@localhost;
@@ -183,7 +183,7 @@ test_noprivs@localhost
use priv_db;
show grants;
Grants for test_noprivs@localhost
-GRANT SELECT, INSERT, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, INSERT, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, BINLOG MONITOR, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY, SET USER, FEDERATED ADMIN, CONNECTION ADMIN, READ_ONLY ADMIN, REPLICATION SLAVE ADMIN, REPLICATION MASTER ADMIN, BINLOG ADMIN, BINLOG REPLAY, SLAVE MONITOR ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
select f1 from t1 order by f1;
f1
insert 3.5.3.2-no
@@ -441,7 +441,7 @@ grant ALL on *.* to test_noprivs@localhost;
revoke SELECT on *.* from test_noprivs@localhost;
show grants for test_noprivs@localhost;
Grants for test_noprivs@localhost
-GRANT INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, BINLOG MONITOR, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY, SET USER, FEDERATED ADMIN, CONNECTION ADMIN, READ_ONLY ADMIN, REPLICATION SLAVE ADMIN, REPLICATION MASTER ADMIN, BINLOG ADMIN, BINLOG REPLAY, SLAVE MONITOR ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
grant TRIGGER, SELECT on *.* to test_yesprivs@localhost;
show grants for test_yesprivs@localhost;
@@ -457,7 +457,7 @@ test_noprivs@localhost
use priv_db;
show grants;
Grants for test_noprivs@localhost
-GRANT INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, BINLOG MONITOR, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY, SET USER, FEDERATED ADMIN, CONNECTION ADMIN, READ_ONLY ADMIN, REPLICATION SLAVE ADMIN, REPLICATION MASTER ADMIN, BINLOG ADMIN, BINLOG REPLAY, SLAVE MONITOR ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
create trigger trg5a_1 before INSERT on t1 for each row
set @test_var = new.f1;
connection default;
diff --git a/mysql-test/suite/funcs_1/r/myisam_trig_03e.result b/mysql-test/suite/funcs_1/r/myisam_trig_03e.result
index 8b8df4bd694..22db7ad337e 100644
--- a/mysql-test/suite/funcs_1/r/myisam_trig_03e.result
+++ b/mysql-test/suite/funcs_1/r/myisam_trig_03e.result
@@ -604,7 +604,7 @@ trig 1_1-yes
revoke TRIGGER on *.* from test_yesprivs@localhost;
show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost
-GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, CREATE TABLESPACE, DELETE HISTORY ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, BINLOG MONITOR, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, CREATE TABLESPACE, DELETE HISTORY, SET USER, FEDERATED ADMIN, CONNECTION ADMIN, READ_ONLY ADMIN, REPLICATION SLAVE ADMIN, REPLICATION MASTER ADMIN, BINLOG ADMIN, BINLOG REPLAY, SLAVE MONITOR ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
disconnect yes_privs;
connect yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
select current_user;
@@ -657,7 +657,7 @@ root@localhost
grant TRIGGER on priv_db.* to test_yesprivs@localhost;
show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost
-GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, CREATE TABLESPACE, DELETE HISTORY ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
+GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, BINLOG MONITOR, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, CREATE TABLESPACE, DELETE HISTORY, SET USER, FEDERATED ADMIN, CONNECTION ADMIN, READ_ONLY ADMIN, REPLICATION SLAVE ADMIN, REPLICATION MASTER ADMIN, BINLOG ADMIN, BINLOG REPLAY, SLAVE MONITOR ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT TRIGGER ON `priv_db`.* TO `test_yesprivs`@`localhost`
trigger privilege on db level for create:
@@ -1351,7 +1351,7 @@ drop trigger trg1_0;
create definer=not_ex_user@localhost trigger trg1_0
before INSERT on t1 for each row
set new.f1 = 'trig 1_0-yes';
-ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
+ERROR 42000: Access denied; you need (at least one of) the SUPER, SET USER privilege(s) for this operation
create definer=current_user trigger trg1_1
before INSERT on t1 for each row
set new.f1 = 'trig 1_1-yes';
@@ -1386,7 +1386,7 @@ GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`loca
create definer=not_ex_user@localhost trigger trg1_3
after UPDATE on t1 for each row
set @var1 = 'trig 1_3-yes';
-ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
+ERROR 42000: Access denied; you need (at least one of) the SUPER, SET USER privilege(s) for this operation
connection default;
select current_user;
current_user
diff --git a/mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result b/mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result
index f3f561fd479..c3fbc3a9137 100644
--- a/mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result
+++ b/mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result
@@ -45,7 +45,7 @@ PROCESSLIST CREATE TEMPORARY TABLE `PROCESSLIST` (
) DEFAULT CHARSET=utf8
SHOW processlist;
Id User Host db Command Time State Info Progress
-ID root HOST_NAME information_schema Query TIME Init SHOW processlist TIME_MS
+ID root HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
SELECT * FROM processlist ORDER BY id;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
@@ -125,7 +125,7 @@ PROCESSLIST CREATE TEMPORARY TABLE `PROCESSLIST` (
) DEFAULT CHARSET=utf8
SHOW processlist;
Id User Host db Command Time State Info Progress
-ID ddicttestuser1 HOST_NAME information_schema Query TIME Init SHOW processlist TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS
SELECT * FROM processlist ORDER BY id;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
ID ddicttestuser1 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM processlist ORDER BY id TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM processlist ORDER BY id TID
@@ -190,7 +190,7 @@ Grants for ddicttestuser1@localhost
GRANT PROCESS ON *.* TO `ddicttestuser1`@`localhost` IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1'
SHOW processlist;
Id User Host db Command Time State Info Progress
-ID ddicttestuser1 HOST_NAME information_schema Query TIME Init SHOW processlist TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
ID ddicttestuser1 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
@@ -206,7 +206,7 @@ SHOW processlist;
Id User Host db Command Time State Info Progress
ID root HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
-ID ddicttestuser1 HOST_NAME information_schema Query TIME Init SHOW processlist TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
ID ddicttestuser1 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
@@ -233,7 +233,7 @@ Id User Host db Command Time State Info Progress
ID root HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
-ID HOST_NAME information_schema Query TIME Init SHOW processlist TIME_MS
+ID HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
ID HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
@@ -259,7 +259,7 @@ SHOW processlist;
Id User Host db Command Time State Info Progress
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
-ID ddicttestuser1 HOST_NAME information_schema Query TIME Init SHOW processlist TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
ID ddicttestuser1 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
@@ -303,7 +303,7 @@ Id User Host db Command Time State Info Progress
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
-ID ddicttestuser1 HOST_NAME information_schema Query TIME Init SHOW processlist TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
ID ddicttestuser1 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
@@ -331,7 +331,7 @@ ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
-ID ddicttestuser1 HOST_NAME information_schema Query TIME Init SHOW processlist TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
ID ddicttestuser1 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
@@ -390,7 +390,7 @@ ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
-ID ddicttestuser2 HOST_NAME information_schema Query TIME Init SHOW processlist TIME_MS
+ID ddicttestuser2 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
ID ddicttestuser2 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
@@ -421,7 +421,7 @@ GRANT USAGE ON *.* TO `ddicttestuser2`@`localhost` IDENTIFIED BY PASSWORD '*22DA
SHOW processlist;
Id User Host db Command Time State Info Progress
ID ddicttestuser2 HOST_NAME information_schema Sleep TIME NULL TIME_MS
-ID ddicttestuser2 HOST_NAME information_schema Query TIME Init SHOW processlist TIME_MS
+ID ddicttestuser2 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
ID ddicttestuser2 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
@@ -452,7 +452,7 @@ ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
-ID ddicttestuser1 HOST_NAME information_schema Query TIME Init SHOW processlist TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
ID ddicttestuser1 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
@@ -490,7 +490,7 @@ ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
-ID ddicttestuser1 HOST_NAME information_schema Query TIME Init SHOW processlist TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
ID ddicttestuser1 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
diff --git a/mysql-test/suite/funcs_1/r/processlist_priv_ps.result b/mysql-test/suite/funcs_1/r/processlist_priv_ps.result
index a68e62e4642..c23665cb2de 100644
--- a/mysql-test/suite/funcs_1/r/processlist_priv_ps.result
+++ b/mysql-test/suite/funcs_1/r/processlist_priv_ps.result
@@ -45,7 +45,7 @@ PROCESSLIST CREATE TEMPORARY TABLE `PROCESSLIST` (
) DEFAULT CHARSET=utf8
SHOW processlist;
Id User Host db Command Time State Info Progress
-ID root HOST_NAME information_schema Query TIME Init SHOW processlist TIME_MS
+ID root HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
SELECT * FROM processlist ORDER BY id;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
@@ -125,7 +125,7 @@ PROCESSLIST CREATE TEMPORARY TABLE `PROCESSLIST` (
) DEFAULT CHARSET=utf8
SHOW processlist;
Id User Host db Command Time State Info Progress
-ID ddicttestuser1 HOST_NAME information_schema Query TIME Init SHOW processlist TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS
SELECT * FROM processlist ORDER BY id;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
ID ddicttestuser1 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM processlist ORDER BY id TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM processlist ORDER BY id TID
@@ -190,7 +190,7 @@ Grants for ddicttestuser1@localhost
GRANT PROCESS ON *.* TO `ddicttestuser1`@`localhost` IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1'
SHOW processlist;
Id User Host db Command Time State Info Progress
-ID ddicttestuser1 HOST_NAME information_schema Query TIME Init SHOW processlist TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
ID ddicttestuser1 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
@@ -206,7 +206,7 @@ SHOW processlist;
Id User Host db Command Time State Info Progress
ID root HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
-ID ddicttestuser1 HOST_NAME information_schema Query TIME Init SHOW processlist TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
ID ddicttestuser1 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
@@ -233,7 +233,7 @@ Id User Host db Command Time State Info Progress
ID root HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
-ID HOST_NAME information_schema Query TIME Init SHOW processlist TIME_MS
+ID HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
ID HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
@@ -259,7 +259,7 @@ SHOW processlist;
Id User Host db Command Time State Info Progress
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
-ID ddicttestuser1 HOST_NAME information_schema Query TIME Init SHOW processlist TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
ID ddicttestuser1 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
@@ -303,7 +303,7 @@ Id User Host db Command Time State Info Progress
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
-ID ddicttestuser1 HOST_NAME information_schema Query TIME Init SHOW processlist TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
ID ddicttestuser1 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
@@ -331,7 +331,7 @@ ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
-ID ddicttestuser1 HOST_NAME information_schema Query TIME Init SHOW processlist TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
ID ddicttestuser1 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
@@ -390,7 +390,7 @@ ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
-ID ddicttestuser2 HOST_NAME information_schema Query TIME Init SHOW processlist TIME_MS
+ID ddicttestuser2 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
ID ddicttestuser2 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
@@ -421,7 +421,7 @@ GRANT USAGE ON *.* TO `ddicttestuser2`@`localhost` IDENTIFIED BY PASSWORD '*22DA
SHOW processlist;
Id User Host db Command Time State Info Progress
ID ddicttestuser2 HOST_NAME information_schema Sleep TIME NULL TIME_MS
-ID ddicttestuser2 HOST_NAME information_schema Query TIME Init SHOW processlist TIME_MS
+ID ddicttestuser2 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
ID ddicttestuser2 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
@@ -452,7 +452,7 @@ ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
-ID ddicttestuser1 HOST_NAME information_schema Query TIME Init SHOW processlist TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
ID ddicttestuser1 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
@@ -490,7 +490,7 @@ ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
-ID ddicttestuser1 HOST_NAME information_schema Query TIME Init SHOW processlist TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
ID ddicttestuser1 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
diff --git a/mysql-test/suite/funcs_1/r/processlist_val_no_prot.result b/mysql-test/suite/funcs_1/r/processlist_val_no_prot.result
index ad109501f98..f99edef092f 100644
--- a/mysql-test/suite/funcs_1/r/processlist_val_no_prot.result
+++ b/mysql-test/suite/funcs_1/r/processlist_val_no_prot.result
@@ -39,7 +39,7 @@ ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_
<ID> root <HOST_NAME> test Query <TIME> Filling schema table SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST <TIME_MS> 0 0 0.000 <MEMORY> <MAX_MEMORY> <ROWS> <QUERY_ID> SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST <TID>
SHOW FULL PROCESSLIST;
Id User Host db Command Time State Info Progress
-<ID> root <HOST_NAME> test Query <TIME> Init SHOW FULL PROCESSLIST <TIME_MS>
+<ID> root <HOST_NAME> test Query <TIME> starting SHOW FULL PROCESSLIST <TIME_MS>
SET @default_id = CONNECTION_ID();
SELECT COUNT(*) = 1 AS "Expect exact one connection with this id"
FROM INFORMATION_SCHEMA.PROCESSLIST WHERE ID = @default_id;
@@ -85,7 +85,7 @@ ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_
<ID> root <HOST_NAME> information_schema Query <TIME> <STATE> SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST <TIME_MS> 0 0 0.000 <MEMORY> <MAX_MEMORY> <ROWS> <QUERY_ID> SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST <TID>
SHOW FULL PROCESSLIST;
Id User Host db Command Time State Info Progress
-<ID> root <HOST_NAME> information_schema Query <TIME> Init SHOW FULL PROCESSLIST 0.000
+<ID> root <HOST_NAME> information_schema Query <TIME> starting SHOW FULL PROCESSLIST 0.000
<ID> test_user <HOST_NAME> information_schema Sleep <TIME> NULL 0.000
SELECT ID,TIME INTO @test_user_con1_id,@time FROM INFORMATION_SCHEMA.PROCESSLIST
WHERE COMMAND = 'Sleep' AND USER = 'test_user';
@@ -117,7 +117,7 @@ ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_
<ID> test_user <HOST_NAME> information_schema Query <TIME> Filling schema table SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST <TIME_MS> 0 0 0.000 <MEMORY> <MAX_MEMORY> <ROWS> <QUERY_ID> SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST <TID>
SHOW FULL PROCESSLIST;
Id User Host db Command Time State Info Progress
-<ID> test_user <HOST_NAME> information_schema Query <TIME> Init SHOW FULL PROCESSLIST 0.000
+<ID> test_user <HOST_NAME> information_schema Query <TIME> starting SHOW FULL PROCESSLIST 0.000
# Ensure that the user test_user sees all connections with his username.
#----------------------------------------------------------------------------
@@ -133,7 +133,7 @@ ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_
SHOW FULL PROCESSLIST;
Id User Host db Command Time State Info Progress
<ID> test_user <HOST_NAME> information_schema Sleep <TIME> NULL 0.000
-<ID> test_user <HOST_NAME> information_schema Query <TIME> Init SHOW FULL PROCESSLIST 0.000
+<ID> test_user <HOST_NAME> information_schema Query <TIME> starting SHOW FULL PROCESSLIST 0.000
connection default;
SELECT ID INTO @test_user_con2_id FROM INFORMATION_SCHEMA.PROCESSLIST
WHERE ID <> @test_user_con1_id
@@ -156,7 +156,7 @@ ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_
<ID> root <HOST_NAME> information_schema Query <TIME> Filling schema table SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST <TIME_MS> 0 0 0.000 <MEMORY> <MAX_MEMORY> <ROWS> <QUERY_ID> SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST <TID>
SHOW FULL PROCESSLIST;
Id User Host db Command Time State Info Progress
-<ID> root <HOST_NAME> information_schema Query <TIME> Init SHOW FULL PROCESSLIST 0.000
+<ID> root <HOST_NAME> information_schema Query <TIME> starting SHOW FULL PROCESSLIST 0.000
<ID> test_user <HOST_NAME> information_schema Sleep <TIME> NULL 0.000
<ID> test_user <HOST_NAME> information_schema Query <TIME> User sleep SELECT sleep(10), 17 0.000
SELECT STATE, TIME, INFO INTO @state, @time, @info
diff --git a/mysql-test/suite/funcs_1/r/processlist_val_ps.result b/mysql-test/suite/funcs_1/r/processlist_val_ps.result
index 169053cb6be..bae43a37be5 100644
--- a/mysql-test/suite/funcs_1/r/processlist_val_ps.result
+++ b/mysql-test/suite/funcs_1/r/processlist_val_ps.result
@@ -39,7 +39,7 @@ ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_
<ID> root <HOST_NAME> test Execute <TIME> Filling schema table SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST <TIME_MS> 0 0 0.000 <MEMORY> <MAX_MEMORY> <ROWS> <QUERY_ID> SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST <TID>
SHOW FULL PROCESSLIST;
Id User Host db Command Time State Info Progress
-<ID> root <HOST_NAME> test Query <TIME> Init SHOW FULL PROCESSLIST <TIME_MS>
+<ID> root <HOST_NAME> test Query <TIME> starting SHOW FULL PROCESSLIST <TIME_MS>
SET @default_id = CONNECTION_ID();
SELECT COUNT(*) = 1 AS "Expect exact one connection with this id"
FROM INFORMATION_SCHEMA.PROCESSLIST WHERE ID = @default_id;
@@ -85,7 +85,7 @@ ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_
<ID> root <HOST_NAME> information_schema Execute <TIME> <STATE> SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST <TIME_MS> 0 0 0.000 <MEMORY> <MAX_MEMORY> <ROWS> <QUERY_ID> SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST <TID>
SHOW FULL PROCESSLIST;
Id User Host db Command Time State Info Progress
-<ID> root <HOST_NAME> information_schema Query <TIME> Init SHOW FULL PROCESSLIST 0.000
+<ID> root <HOST_NAME> information_schema Query <TIME> starting SHOW FULL PROCESSLIST 0.000
<ID> test_user <HOST_NAME> information_schema Sleep <TIME> NULL 0.000
SELECT ID,TIME INTO @test_user_con1_id,@time FROM INFORMATION_SCHEMA.PROCESSLIST
WHERE COMMAND = 'Sleep' AND USER = 'test_user';
@@ -117,7 +117,7 @@ ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_
<ID> test_user <HOST_NAME> information_schema Execute <TIME> Filling schema table SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST <TIME_MS> 0 0 0.000 <MEMORY> <MAX_MEMORY> <ROWS> <QUERY_ID> SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST <TID>
SHOW FULL PROCESSLIST;
Id User Host db Command Time State Info Progress
-<ID> test_user <HOST_NAME> information_schema Query <TIME> Init SHOW FULL PROCESSLIST 0.000
+<ID> test_user <HOST_NAME> information_schema Query <TIME> starting SHOW FULL PROCESSLIST 0.000
# Ensure that the user test_user sees all connections with his username.
#----------------------------------------------------------------------------
@@ -133,7 +133,7 @@ ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_
SHOW FULL PROCESSLIST;
Id User Host db Command Time State Info Progress
<ID> test_user <HOST_NAME> information_schema Sleep <TIME> NULL 0.000
-<ID> test_user <HOST_NAME> information_schema Query <TIME> Init SHOW FULL PROCESSLIST 0.000
+<ID> test_user <HOST_NAME> information_schema Query <TIME> starting SHOW FULL PROCESSLIST 0.000
connection default;
SELECT ID INTO @test_user_con2_id FROM INFORMATION_SCHEMA.PROCESSLIST
WHERE ID <> @test_user_con1_id
@@ -156,7 +156,7 @@ ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_
<ID> root <HOST_NAME> information_schema Execute <TIME> Filling schema table SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST <TIME_MS> 0 0 0.000 <MEMORY> <MAX_MEMORY> <ROWS> <QUERY_ID> SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST <TID>
SHOW FULL PROCESSLIST;
Id User Host db Command Time State Info Progress
-<ID> root <HOST_NAME> information_schema Query <TIME> Init SHOW FULL PROCESSLIST 0.000
+<ID> root <HOST_NAME> information_schema Query <TIME> starting SHOW FULL PROCESSLIST 0.000
<ID> test_user <HOST_NAME> information_schema Sleep <TIME> NULL 0.000
<ID> test_user <HOST_NAME> information_schema Query <TIME> User sleep SELECT sleep(10), 17 0.000
SELECT STATE, TIME, INFO INTO @state, @time, @info
diff --git a/mysql-test/suite/funcs_1/r/storedproc.result b/mysql-test/suite/funcs_1/r/storedproc.result
index c68e2221801..30cbdb2c32a 100644
--- a/mysql-test/suite/funcs_1/r/storedproc.result
+++ b/mysql-test/suite/funcs_1/r/storedproc.result
@@ -5862,9 +5862,7 @@ BEGIN
declare x default '0' char;
SELECT x;
END//
-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 'default '0' char;
-SELECT x;
-END' at line 3
+ERROR HY000: Unknown data type: 'default'
DROP PROCEDURE IF EXISTS sp6;
CREATE PROCEDURE sp6( )
BEGIN
@@ -5909,8 +5907,7 @@ CREATE PROCEDURE sp6( )
BEGIN
declare x default 'a' char;
END//
-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 'default 'a' char;
-END' at line 3
+ERROR HY000: Unknown data type: 'default'
DROP PROCEDURE IF EXISTS sp6;
CREATE PROCEDURE sp6( )
BEGIN
@@ -5965,8 +5962,7 @@ CREATE PROCEDURE sp6( )
BEGIN
declare handler continue for sqlstate '02000' set @x2 = 1;
END//
-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 'continue for sqlstate '02000' set @x2 = 1;
-END' at line 3
+ERROR HY000: Unknown data type: 'continue'
DROP PROCEDURE IF EXISTS sp6;
CREATE PROCEDURE sp6( )
BEGIN
@@ -5979,8 +5975,7 @@ CREATE PROCEDURE sp6( )
BEGIN
declare handler undo for sqlstate '02000' set @x2 = 1;
END//
-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 'undo for sqlstate '02000' set @x2 = 1;
-END' at line 3
+ERROR HY000: Unknown data type: 'undo'
DROP PROCEDURE IF EXISTS sp1;
CREATE PROCEDURE sp1( )
BEGIN
@@ -6873,45 +6868,35 @@ BEGIN
declare date not null x;
SELECT f101 into x from tb2 limit 9998, 1;
END//
-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 'not null x;
-SELECT f101 into x from tb2 limit 9998, 1;
-END' at line 3
+ERROR HY000: Unknown data type: 'not'
DROP PROCEDURE IF EXISTS sp1;
CREATE PROCEDURE sp1( )
BEGIN
declare time not null x;
SELECT f102 into x from tb2 limit 9998, 1;
END//
-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 'not null x;
-SELECT f102 into x from tb2 limit 9998, 1;
-END' at line 3
+ERROR HY000: Unknown data type: 'not'
DROP PROCEDURE IF EXISTS sp1;
CREATE PROCEDURE sp1( )
BEGIN
declare datetime not null x;
SELECT f103 into x from tb2 limit 9998, 1;
END//
-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 'not null x;
-SELECT f103 into x from tb2 limit 9998, 1;
-END' at line 3
+ERROR HY000: Unknown data type: 'not'
DROP PROCEDURE IF EXISTS sp1;
CREATE PROCEDURE sp1( )
BEGIN
declare timestamp not null x;
SELECT f104 into x from tb2 limit 9998, 1;
END//
-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 'not null x;
-SELECT f104 into x from tb2 limit 9998, 1;
-END' at line 3
+ERROR HY000: Unknown data type: 'not'
DROP PROCEDURE IF EXISTS sp1;
CREATE PROCEDURE sp1( )
BEGIN
declare year not null x;
SELECT f105 into x from tb2 limit 9998, 1;
END//
-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 'not null x;
-SELECT f105 into x from tb2 limit 9998, 1;
-END' at line 3
+ERROR HY000: Unknown data type: 'not'
DROP PROCEDURE IF EXISTS sp1;
CREATE PROCEDURE sp1( )
BEGIN
@@ -9344,8 +9329,7 @@ CREATE PROCEDURE sp1( )
BEGIN
declare x char1;
END//
-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 'char1;
-END' at line 3
+ERROR HY000: Unknown data type: 'char1'
DROP PROCEDURE IF EXISTS sp1;
Warnings:
Note 1305 PROCEDURE db_storedproc.sp1 does not exist
@@ -11636,9 +11620,7 @@ set @x = 2;
insert into t values (1);
set @x = 3;
END//
-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 'handler for sqlstate '2300' set @x2 = 1;
-set @x = 1;
-insert into t values (1)...' at line 3
+ERROR HY000: Unknown data type: 'handler'
DROP PROCEDURE IF EXISTS handler1;
Warnings:
Note 1305 PROCEDURE db_storedproc.handler1 does not exist
@@ -11651,9 +11633,7 @@ set @x = 2;
insert into t values (1);
set @x = 3;
END//
-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 'handler for sqlstate '2300' set @x2 = 1;
-set @x = 1;
-insert into t values (1)...' at line 3
+ERROR HY000: Unknown data type: 'handler'
DROP PROCEDURE IF EXISTS handler1;
Warnings:
Note 1305 PROCEDURE db_storedproc.handler1 does not exist
@@ -11666,9 +11646,7 @@ set @x = 2;
insert into t values (1);
set @x = 3;
END//
-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 'handler for sqlstate '2300' set @x2 = 1;
-set @x = 1;
-insert into t values (1)...' at line 3
+ERROR HY000: Unknown data type: 'handler'
DROP PROCEDURE IF EXISTS sp1;
Warnings:
Note 1305 PROCEDURE db_storedproc.sp1 does not exist
@@ -12919,8 +12897,7 @@ CREATE PROCEDURE sp1( )
BEGIN
declare option handler for sqlstate '02000' set @var2 = 1;
END//
-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 'handler for sqlstate '02000' set @var2 = 1;
-END' at line 3
+ERROR HY000: Unknown data type: 'handler'
DROP PROCEDURE IF EXISTS sp1;
Warnings:
Note 1305 PROCEDURE db_storedproc.sp1 does not exist
@@ -13000,8 +12977,7 @@ CREATE PROCEDURE sp1( )
BEGIN
declare privileges handler for sqlstate '02000' set @var2 = 1;
END//
-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 'handler for sqlstate '02000' set @var2 = 1;
-END' at line 3
+ERROR HY000: Unknown data type: 'handler'
DROP PROCEDURE IF EXISTS sp1;
Warnings:
Note 1305 PROCEDURE db_storedproc.sp1 does not exist
@@ -13054,8 +13030,7 @@ CREATE PROCEDURE sp1( )
BEGIN
declare read_only handler for sqlstate '02000' set @var2 = 1;
END//
-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 'handler for sqlstate '02000' set @var2 = 1;
-END' at line 3
+ERROR HY000: Unknown data type: 'handler'
DROP PROCEDURE IF EXISTS sp1;
Warnings:
Note 1305 PROCEDURE db_storedproc.sp1 does not exist
diff --git a/mysql-test/suite/funcs_1/t/is_check_constraints.test b/mysql-test/suite/funcs_1/t/is_check_constraints.test
index dbd286e6239..0881b4bdf77 100644
--- a/mysql-test/suite/funcs_1/t/is_check_constraints.test
+++ b/mysql-test/suite/funcs_1/t/is_check_constraints.test
@@ -118,3 +118,24 @@ SELECT * FROM information_schema.check_constraints;
DROP USER foo;
DROP DATABASE db;
+
+--echo #
+--echo # MDEV-24601: INFORMATION_SCHEMA doesn't differentiate between
+--echo # column and table-level CHECK constraints
+--echo #
+
+# Mix of table (>0) and field (<0) constraints
+# Note that there are 2 constraints `t2` - this is not allowed MDEV-24601
+use test;
+create table t(check (t0>0),
+ t0 int,
+ t1 int check (t1<0),
+ t2 int check (t2<-1),
+ CONSTRAINT tc_1 check(t1 > 1),
+ CONSTRAINT t2 check(t2 > 1));
+show create table t;
+--sorted_result
+select * from information_schema.table_constraints where CONSTRAINT_TYPE='CHECK';
+--sorted_result
+select * from information_schema.check_constraints;
+drop table t;
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 4293c4e16fb..3af56ad2533 100644
--- a/mysql-test/suite/funcs_1/t/is_user_privileges.test
+++ b/mysql-test/suite/funcs_1/t/is_user_privileges.test
@@ -25,6 +25,10 @@ let $other_engine_type = MyISAM;
let $is_table = USER_PRIVILEGES;
+let $REGEX_VERSION_ID=/$mysql_get_server_version/VERSION_ID/;
+let $REGEX_PASSWORD_LAST_CHANGED=/password_last_changed": [0-9]*/password_last_changed": #/;
+let $REGEX_GLOBAL_PRIV=$REGEX_PASSWORD_LAST_CHANGED $REGEX_VERSION_ID;
+
# The table INFORMATION_SCHEMA.USER_PRIVILEGES must exist
eval SHOW TABLES FROM information_schema LIKE '$is_table';
@@ -103,7 +107,7 @@ WHERE user LIKE 'testuser%' ORDER BY host, user;
let $my_show= SHOW GRANTS;
--vertical_results
eval $my_select1;
---replace_regex /password_last_changed": [0-9]*/password_last_changed": #/
+--replace_regex $REGEX_GLOBAL_PRIV
eval $my_select2;
--horizontal_results
@@ -112,7 +116,7 @@ eval $my_select2;
GRANT UPDATE ON db_datadict.* TO 'testuser1'@'localhost' WITH GRANT OPTION;
--vertical_results
eval $my_select1;
---replace_regex /password_last_changed": [0-9]*/password_last_changed": #/
+--replace_regex $REGEX_GLOBAL_PRIV
eval $my_select2;
--horizontal_results
@@ -120,7 +124,7 @@ eval $my_select2;
connect (testuser1, localhost, testuser1, , db_datadict);
--vertical_results
eval $my_select1;
---replace_regex /password_last_changed": [0-9]*/password_last_changed": #/
+--replace_regex $REGEX_GLOBAL_PRIV
eval $my_select2;
--horizontal_results
eval $my_show;
@@ -134,7 +138,7 @@ GRANT SELECT ON *.* TO 'testuser1'@'localhost';
--echo # Here <SELECT NO> is shown correctly for testuser1;
--vertical_results
eval $my_select1;
---replace_regex /password_last_changed": [0-9]*/password_last_changed": #/
+--replace_regex $REGEX_GLOBAL_PRIV
eval $my_select2;
--horizontal_results
@@ -143,7 +147,7 @@ GRANT SELECT ON *.* TO 'testuser1'@'localhost' WITH GRANT OPTION;
--echo # Here <SELECT YES> is shown correctly for testuser1;
--vertical_results
eval $my_select1;
---replace_regex /password_last_changed": [0-9]*/password_last_changed": #/
+--replace_regex $REGEX_GLOBAL_PRIV
eval $my_select2;
--horizontal_results
@@ -151,7 +155,7 @@ eval $my_select2;
connection testuser1;
--vertical_results
eval $my_select1;
---replace_regex /password_last_changed": [0-9]*/password_last_changed": #/
+--replace_regex $REGEX_GLOBAL_PRIV
eval $my_select2;
--horizontal_results
eval $my_show;
@@ -180,7 +184,7 @@ connection default;
REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'testuser1'@'localhost';
--vertical_results
eval $my_select1;
---replace_regex /password_last_changed": [0-9]*/password_last_changed": #/
+--replace_regex $REGEX_GLOBAL_PRIV
eval $my_select2;
--horizontal_results
@@ -213,14 +217,14 @@ GRANT ALL ON db_datadict.* TO 'testuser1'@'localhost' WITH GRANT OPTION;
GRANT SELECT ON mysql.global_priv TO 'testuser1'@'localhost';
--vertical_results
eval $my_select1;
---replace_regex /password_last_changed": [0-9]*/password_last_changed": #/
+--replace_regex $REGEX_GLOBAL_PRIV
eval $my_select2;
--horizontal_results
connection testuser1;
--vertical_results
eval $my_select1;
---replace_regex /password_last_changed": [0-9]*/password_last_changed": #/
+--replace_regex $REGEX_GLOBAL_PRIV
eval $my_select2;
--horizontal_results
eval $my_show;
@@ -233,7 +237,7 @@ CREATE TABLE db_datadict.tb_56 ( c1 TEXT );
USE db_datadict;
--vertical_results
eval $my_select1;
---replace_regex /password_last_changed": [0-9]*/password_last_changed": #/
+--replace_regex $REGEX_GLOBAL_PRIV
eval $my_select2;
--horizontal_results
eval $my_show;
@@ -248,7 +252,7 @@ connection default;
REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'testuser1'@'localhost';
--vertical_results
eval $my_select1;
---replace_regex /password_last_changed": [0-9]*/password_last_changed": #/
+--replace_regex $REGEX_GLOBAL_PRIV
eval $my_select2;
--horizontal_results
diff --git a/mysql-test/suite/funcs_1/t/storedproc.test b/mysql-test/suite/funcs_1/t/storedproc.test
index 7ca9ba6f3d1..dde624bd0b9 100644
--- a/mysql-test/suite/funcs_1/t/storedproc.test
+++ b/mysql-test/suite/funcs_1/t/storedproc.test
@@ -5954,7 +5954,7 @@ DROP PROCEDURE IF EXISTS sp6;
--enable_warnings
delimiter //;
---error ER_PARSE_ERROR
+--error ER_UNKNOWN_DATA_TYPE
CREATE PROCEDURE sp6( )
BEGIN
declare x default '0' char;
@@ -6021,7 +6021,7 @@ DROP PROCEDURE IF EXISTS sp6;
--enable_warnings
delimiter //;
---error ER_PARSE_ERROR
+--error ER_UNKNOWN_DATA_TYPE
CREATE PROCEDURE sp6( )
BEGIN
declare x default 'a' char;
@@ -6117,7 +6117,7 @@ DROP PROCEDURE IF EXISTS sp6;
--enable_warnings
delimiter //;
---error ER_PARSE_ERROR
+--error ER_UNKNOWN_DATA_TYPE
CREATE PROCEDURE sp6( )
BEGIN
declare handler continue for sqlstate '02000' set @x2 = 1;
@@ -6141,7 +6141,7 @@ DROP PROCEDURE IF EXISTS sp6;
--enable_warnings
delimiter //;
---error ER_PARSE_ERROR
+--error ER_UNKNOWN_DATA_TYPE
CREATE PROCEDURE sp6( )
BEGIN
declare handler undo for sqlstate '02000' set @x2 = 1;
@@ -7455,7 +7455,7 @@ DROP PROCEDURE IF EXISTS sp1;
--enable_warnings
delimiter //;
---error ER_PARSE_ERROR
+--error ER_UNKNOWN_DATA_TYPE
CREATE PROCEDURE sp1( )
BEGIN
declare date not null x;
@@ -7468,7 +7468,7 @@ DROP PROCEDURE IF EXISTS sp1;
--enable_warnings
delimiter //;
---error ER_PARSE_ERROR
+--error ER_UNKNOWN_DATA_TYPE
CREATE PROCEDURE sp1( )
BEGIN
declare time not null x;
@@ -7481,7 +7481,7 @@ DROP PROCEDURE IF EXISTS sp1;
--enable_warnings
delimiter //;
---error ER_PARSE_ERROR
+--error ER_UNKNOWN_DATA_TYPE
CREATE PROCEDURE sp1( )
BEGIN
declare datetime not null x;
@@ -7494,7 +7494,7 @@ DROP PROCEDURE IF EXISTS sp1;
--enable_warnings
delimiter //;
---error ER_PARSE_ERROR
+--error ER_UNKNOWN_DATA_TYPE
CREATE PROCEDURE sp1( )
BEGIN
declare timestamp not null x;
@@ -7507,7 +7507,7 @@ DROP PROCEDURE IF EXISTS sp1;
--enable_warnings
delimiter //;
---error ER_PARSE_ERROR
+--error ER_UNKNOWN_DATA_TYPE
CREATE PROCEDURE sp1( )
BEGIN
declare year not null x;
@@ -11210,7 +11210,7 @@ delimiter ;//
DROP PROCEDURE IF EXISTS sp1;
delimiter //;
---error ER_PARSE_ERROR
+--error ER_UNKNOWN_DATA_TYPE
CREATE PROCEDURE sp1( )
BEGIN
declare x char1;
@@ -13752,7 +13752,7 @@ delimiter ;//
DROP PROCEDURE IF EXISTS handler1;
delimiter //;
---error ER_PARSE_ERROR
+--error ER_UNKNOWN_DATA_TYPE
CREATE PROCEDURE handler1()
BEGIN
declare continueinv handler for sqlstate '2300' set @x2 = 1;
@@ -13776,7 +13776,7 @@ delimiter ;//
DROP PROCEDURE IF EXISTS handler1;
delimiter //;
---error ER_PARSE_ERROR
+--error ER_UNKNOWN_DATA_TYPE
CREATE PROCEDURE handler1()
BEGIN
declare undoinv handler for sqlstate '2300' set @x2 = 1;
@@ -13800,7 +13800,7 @@ delimiter ;//
DROP PROCEDURE IF EXISTS handler1;
delimiter //;
---error ER_PARSE_ERROR
+--error ER_UNKNOWN_DATA_TYPE
CREATE PROCEDURE handler1 ()
BEGIN
declare exitinv handler for sqlstate '2300' set @x2 = 1;
@@ -15210,7 +15210,7 @@ delimiter ;//
DROP PROCEDURE IF EXISTS sp1;
delimiter //;
---error ER_PARSE_ERROR
+--error ER_UNKNOWN_DATA_TYPE
CREATE PROCEDURE sp1( )
BEGIN
declare option handler for sqlstate '02000' set @var2 = 1;
@@ -15300,7 +15300,7 @@ delimiter ;//
DROP PROCEDURE IF EXISTS sp1;
delimiter //;
---error ER_PARSE_ERROR
+--error ER_UNKNOWN_DATA_TYPE
CREATE PROCEDURE sp1( )
BEGIN
declare privileges handler for sqlstate '02000' set @var2 = 1;
@@ -15360,7 +15360,7 @@ delimiter ;//
DROP PROCEDURE IF EXISTS sp1;
delimiter //;
---error ER_PARSE_ERROR
+--error ER_UNKNOWN_DATA_TYPE
CREATE PROCEDURE sp1( )
BEGIN
declare read_only handler for sqlstate '02000' set @var2 = 1;
diff --git a/mysql-test/suite/galera/disabled.def b/mysql-test/suite/galera/disabled.def
index 590a8623223..ec35dacb03e 100644
--- a/mysql-test/suite/galera/disabled.def
+++ b/mysql-test/suite/galera/disabled.def
@@ -20,6 +20,7 @@ galera_FK_duplicate_client_insert : MDEV-24473: galera.galera_FK_duplicate_clien
galera_as_slave_replication_bundle : MDEV-15785 OPTION_GTID_BEGIN is set in Gtid_log_event::do_apply_event()
galera_bf_abort_at_after_statement : MDEV-21557: galera_bf_abort_at_after_statement MTR failed: query 'reap' succeeded - should have failed with errno 1213
galera_bf_abort_group_commit : MDEV-18282 Galera test failure on galera.galera_bf_abort_group_commit
+galera_bf_kill_debug : MDEV-24485 wsrep::client_state::do_acquire_ownership(): Assertion `state_ == s_idle || mode_ != m_local' failed
galera_bf_lock_wait : MDEV-21597 wsrep::transaction::start_transaction(): Assertion `active() == false' failed
galera_encrypt_tmp_files : Get error failed to enable encryption of temporary files
galera_ftwrl : MDEV-21525 galera.galera_ftwrl
@@ -34,6 +35,7 @@ galera_shutdown_nonprim : MDEV-21493 galera.galera_shutdown_nonprim
galera_ssl_upgrade : MDEV-19950 Galera test failure on galera_ssl_upgrade
galera_toi_ddl_nonconflicting : MDEV-21518 galera.galera_toi_ddl_nonconflicting
galera_toi_truncate : MDEV-22996 Hang on galera_toi_truncate test case
+galera_trigger : MDEV-24048 galera.galera_trigger MTR fails: Result content mismatch
galera_var_ignore_apply_errors : MDEV-20451: Lock wait timeout exceeded in galera_var_ignore_apply_errors
galera_var_node_address : MDEV-20485 Galera test failure
galera_var_notify_cmd : MDEV-21905 Galera test galera_var_notify_cmd causes hang
@@ -46,3 +48,4 @@ query_cache: MDEV-15805 Test failure on galera.query_cache
versioning_trx_id: MDEV-18590: galera.versioning_trx_id: Test failure: mysqltest: Result content mismatch
galera_wsrep_provider_unset_set: wsrep_provider is read-only for security reasons
pxc-421: wsrep_provider is read-only for security reasons
+
diff --git a/mysql-test/suite/galera/include/kill_galera.inc b/mysql-test/suite/galera/include/kill_galera.inc
index d7f665df6c7..98ebf4ff35d 100644
--- a/mysql-test/suite/galera/include/kill_galera.inc
+++ b/mysql-test/suite/galera/include/kill_galera.inc
@@ -1,5 +1,10 @@
--echo Killing server ...
+if (!$kill_signal)
+{
+--let $kill_signal = 9
+}
+
# 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
@@ -7,13 +12,15 @@
# Kill the connected server
--disable_reconnect
+--let KILL_SIGNAL_VALUE = $kill_signal
--let KILL_NODE_PIDFILE = `SELECT @@pid_file`
--perl
+ my $kill_sig = $ENV{'KILL_SIGNAL_VALUE'};
my $pid_filename = $ENV{'KILL_NODE_PIDFILE'};
my $mysqld_pid = `cat $pid_filename`;
chomp($mysqld_pid);
- system("kill -9 $mysqld_pid");
+ system("kill -s $kill_sig $mysqld_pid");
exit(0);
EOF
diff --git a/mysql-test/suite/galera/r/GCF-360.result b/mysql-test/suite/galera/r/GCF-360.result
new file mode 100644
index 00000000000..8c1ba193c1f
--- /dev/null
+++ b/mysql-test/suite/galera/r/GCF-360.result
@@ -0,0 +1,24 @@
+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;
+SELECT VARIABLE_VALUE AS expect_4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+expect_4
+4
+CALL mtr.add_suppression("Slave SQL: Error 'Unknown table");
+connection node_2;
+SELECT VARIABLE_VALUE AS expect_4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+expect_4
+4
+CALL mtr.add_suppression("Slave SQL: Error 'Unknown table");
+connection node_3;
+SELECT VARIABLE_VALUE AS expect_4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+expect_4
+4
+CALL mtr.add_suppression("Slave SQL: Error 'Unknown table");
+connection node_4;
+SELECT VARIABLE_VALUE AS expect_4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+expect_4
+4
+CALL mtr.add_suppression("Slave SQL: Error 'Unknown table");
diff --git a/mysql-test/suite/galera/r/MDEV-10715.result b/mysql-test/suite/galera/r/MDEV-10715.result
new file mode 100644
index 00000000000..5ab60f08097
--- /dev/null
+++ b/mysql-test/suite/galera/r/MDEV-10715.result
@@ -0,0 +1,28 @@
+connection node_2;
+connection node_1;
+connection node_1;
+create table t1(a int);
+set @@wsrep_gtid_seq_no=22;
+insert into t1 values(1);
+insert into t1 values(2);
+select @@gtid_binlog_state;
+@@gtid_binlog_state
+1-1-23
+select wsrep_last_seen_gtid();
+wsrep_last_seen_gtid()
+1-1-23
+select wsrep_last_written_gtid();
+wsrep_last_written_gtid()
+1-1-23
+connection node_2;
+select @@gtid_binlog_state;
+@@gtid_binlog_state
+1-1-23
+select wsrep_last_seen_gtid();
+wsrep_last_seen_gtid()
+1-1-23
+select wsrep_last_written_gtid();
+wsrep_last_written_gtid()
+1-1-0
+connection node_1;
+drop table t1;
diff --git a/mysql-test/suite/galera/r/galera-features#117.result b/mysql-test/suite/galera/r/galera-features#117.result
new file mode 100644
index 00000000000..583f3c74a8b
--- /dev/null
+++ b/mysql-test/suite/galera/r/galera-features#117.result
@@ -0,0 +1,37 @@
+connection node_2;
+connection node_1;
+connection node_2;
+SET SESSION wsrep_on=OFF;
+CREATE TABLE test.t1 (f2 INTEGER);
+SET SESSION wsrep_on=ON;
+CREATE TABLE test.t1 (f1 INTEGER);
+ERROR 42S01: Table 't1' already exists
+connection node_1;
+SHOW CREATE TABLE test.t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `f1` int(11) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SHOW STATUS LIKE 'wsrep_cluster_status';
+Variable_name Value
+wsrep_cluster_status Primary
+DROP TABLE test.t1;
+connection node_2;
+SET SESSION wsrep_sync_wait=0;
+SHOW CREATE TABLE test.t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `f2` int(11) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SHOW STATUS LIKE 'wsrep_cluster_status';
+Variable_name Value
+wsrep_cluster_status Disconnected
+CREATE TABLE test.t2 (f1 INTEGER);
+ERROR 08S01: WSREP has not yet prepared node for application use
+SHOW TABLES IN test;
+Tables_in_test
+t1
+Killing server ...
+CALL mtr.add_suppression("Inconsistent by consensus.");
+CALL mtr.add_suppression("WSREP: Failed to execute TOI action");
+CALL mtr.add_suppression("WSREP: TO isolation end failed");
diff --git a/mysql-test/suite/galera/r/galera_binlog_cache_size.result b/mysql-test/suite/galera/r/galera_binlog_cache_size.result
index c5a09074537..eafb68710ee 100644
--- a/mysql-test/suite/galera/r/galera_binlog_cache_size.result
+++ b/mysql-test/suite/galera/r/galera_binlog_cache_size.result
@@ -10,6 +10,6 @@ SET AUTOCOMMIT=ON;
START TRANSACTION;
INSERT INTO t1 SELECT REPEAT('a', 767) FROM ten;
INSERT INTO t1 SELECT REPEAT('a', 767) FROM ten;
-ERROR HY000: Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage; increase this mysqld variable and try again
+ERROR HY000: Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage
DROP TABLE t1;
DROP TABLE ten;
diff --git a/mysql-test/suite/galera/r/galera_can_run_toi.result b/mysql-test/suite/galera/r/galera_can_run_toi.result
new file mode 100644
index 00000000000..f0d1912870c
--- /dev/null
+++ b/mysql-test/suite/galera/r/galera_can_run_toi.result
@@ -0,0 +1,38 @@
+connection node_2;
+connection node_1;
+SET sql_mode='';
+CREATE TABLE t3 (c1 VARCHAR(10));
+ALTER TABLE t3 ENGINE=NonExistentEngine;
+Warnings:
+Warning 1286 Unknown storage engine 'NonExistentEngine'
+SHOW CREATE TABLE t3;
+Table Create Table
+t3 CREATE TABLE `t3` (
+ `c1` varchar(10) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+INSERT INTO t3 values (1);
+SET sql_mode=default;
+ALTER TABLE t3 engine=innodbCLUSTER;
+ERROR 42000: Unknown storage engine 'innodbCLUSTER'
+SHOW CREATE TABLE t3;
+Table Create Table
+t3 CREATE TABLE `t3` (
+ `c1` varchar(10) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+DROP TABLE t3;
+SET sql_mode='';
+SET SESSION default_storage_engine=MyISAM;
+SELECT @@default_storage_engine;
+@@default_storage_engine
+MyISAM
+SET GLOBAL wsrep_replicate_myisam=OFF;
+SET GLOBAL wsrep_strict_ddl=ON;
+CREATE TABLE t3 (c1 VARCHAR(10)) ENGINE=InnoDB;
+ALTER TABLE t3 ENGINE=NonExistentEngine;
+ERROR HY000: DDL-statement is forbidden as table storage engine does not support Galera replication
+SHOW CREATE TABLE t3;
+Table Create Table
+t3 CREATE TABLE `t3` (
+ `c1` varchar(10) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+DROP TABLE t3;
diff --git a/mysql-test/suite/galera/r/galera_create_view.result b/mysql-test/suite/galera/r/galera_create_view.result
new file mode 100644
index 00000000000..19cc1abda3f
--- /dev/null
+++ b/mysql-test/suite/galera/r/galera_create_view.result
@@ -0,0 +1,4 @@
+connection node_2;
+connection node_1;
+CREATE OR REPLACE VIEW v AS WITH cte AS ( SELECT 1 ) SELECT * FROM cte;
+DROP VIEW v;
diff --git a/mysql-test/suite/galera/r/galera_defaults.result b/mysql-test/suite/galera/r/galera_defaults.result
index 9a5c1e54b06..e474c885473 100644
--- a/mysql-test/suite/galera/r/galera_defaults.result
+++ b/mysql-test/suite/galera/r/galera_defaults.result
@@ -3,7 +3,7 @@ connection node_1;
# Correct Galera library found
SELECT COUNT(*) `expect 49` FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME LIKE 'wsrep_%';
expect 49
-49
+50
SELECT VARIABLE_NAME, VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME LIKE 'wsrep_%'
@@ -57,6 +57,7 @@ WSREP_SST_AUTH
WSREP_SST_DONOR
WSREP_SST_DONOR_REJECTS_QUERIES OFF
WSREP_SST_METHOD rsync
+WSREP_STRICT_DDL OFF
WSREP_SYNC_WAIT 15
WSREP_TRX_FRAGMENT_SIZE 0
WSREP_TRX_FRAGMENT_UNIT bytes
diff --git a/mysql-test/suite/galera/r/galera_gra_log.result b/mysql-test/suite/galera/r/galera_gra_log.result
index 33853188965..a6c6b1afa0a 100644
--- a/mysql-test/suite/galera/r/galera_gra_log.result
+++ b/mysql-test/suite/galera/r/galera_gra_log.result
@@ -1,15 +1,14 @@
connection node_2;
connection node_1;
+connection node_1;
+connection node_2;
connection node_2;
+SET GLOBAL wsrep_ignore_apply_errors=0;
SET SESSION wsrep_on=OFF;
CREATE TABLE t1 (f1 INTEGER);
connection node_1;
CREATE TABLE t1 (f1 INTEGER);
connection node_2;
-SET SESSION wsrep_on=ON;
-SELECT COUNT(*) = 0 FROM t1;
-COUNT(*) = 0
-1
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/;
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
@@ -19,7 +18,7 @@ ROLLBACK/*!*/;
use `test`/*!*/;
SET TIMESTAMP=<TIMESTAMP>/*!*/;
SET @@session.pseudo_thread_id=<PSEUDO_THREAD_ID>/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=1411383296/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -33,5 +32,7 @@ DELIMITER ;
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/;
-CALL mtr.add_suppression("Slave SQL: Error 'Table 't1' already exists' on query");
+Killing server ...
+SET GLOBAL wsrep_ignore_apply_errors = 7;
DROP TABLE t1;
+CALL mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on");
diff --git a/mysql-test/suite/galera/r/galera_gtid_slave.result b/mysql-test/suite/galera/r/galera_gtid_slave.result
index 7a3048231af..1ff062064e7 100644
--- a/mysql-test/suite/galera/r/galera_gtid_slave.result
+++ b/mysql-test/suite/galera/r/galera_gtid_slave.result
@@ -19,12 +19,12 @@ INSERT INTO t1 VALUES(2);
INSERT INTO t1 VALUES(3);
SELECT @@global.gtid_binlog_state;
@@global.gtid_binlog_state
-0-2-2,2-3-4
+1-1-2,2-3-4
connection node_1;
INSERT INTO t1 VALUES(4);
SELECT @@global.gtid_binlog_state;
@@global.gtid_binlog_state
-1-1-1,2-3-4,2-2-6
+1-1-3,2-3-4
connection node_3;
DROP TABLE t1,t2;
connection node_2;
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 7c5519af495..992f6c3455b 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
@@ -25,14 +25,14 @@ INSERT INTO t2 VALUES(5,55);
INSERT INTO t2 VALUES(6,66);
SELECT @@global.gtid_binlog_state;
@@global.gtid_binlog_state
-0-2-3,2-3-4
+1-1-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-2,2-3-4,2-2-7
+1-1-5,2-3-4
#Connection 3
connection node_3;
CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
@@ -100,12 +100,12 @@ node2_committed_before
connection node_1;
SELECT @@global.gtid_binlog_state;
@@global.gtid_binlog_state
-1-1-3,2-3-6,2-2-9
+1-1-8,2-3-6
#Connection 2
connection node_2;
SELECT @@global.gtid_binlog_state;
@@global.gtid_binlog_state
-0-1-7,0-2-8,2-3-6
+1-1-8,2-3-6
#Connection 3
connection node_3;
SET AUTOCOMMIT=ON;
@@ -134,7 +134,7 @@ count(*)
12
SELECT @@global.gtid_binlog_state;
@@global.gtid_binlog_state
-0-1-7,0-2-11,2-3-7
+1-1-11,2-3-7
#Connection 1
connection node_1;
SELECT count(*) from t1;
@@ -142,7 +142,7 @@ count(*)
12
SELECT @@global.gtid_binlog_state;
@@global.gtid_binlog_state
-1-1-3,2-3-7,2-2-12
+1-1-11,2-3-7
#Connection 3
connection node_3;
DROP TABLE t2,t1;
diff --git a/mysql-test/suite/galera/r/galera_gtid_trx_conflict.result b/mysql-test/suite/galera/r/galera_gtid_trx_conflict.result
new file mode 100644
index 00000000000..dcabff40841
--- /dev/null
+++ b/mysql-test/suite/galera/r/galera_gtid_trx_conflict.result
@@ -0,0 +1,44 @@
+connection node_2;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+connection node_1;
+SET AUTOCOMMIT = OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES(1);
+connection node_2;
+SET AUTOCOMMIT = OFF;
+SET @@wsrep_gtid_seq_no = 100;
+START TRANSACTION;
+INSERT INTO t1 VALUES(1);
+connection node_1;
+COMMIT;
+connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
+connection node_2a;
+connection node_2;
+COMMIT;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+# Expected GTID value 1-1-2 on both nodes
+SELECT @@gtid_binlog_state;
+@@gtid_binlog_state
+1-1-2
+SET AUTOCOMMIT = ON;
+INSERT INTO t1 VALUES(2);
+# Expected GTID value 1-1-100 on both nodes, seqno is set with wsrep_gtid_seq_no
+SELECT @@gtid_binlog_state;
+@@gtid_binlog_state
+1-1-100
+connection node_1;
+SELECT @@gtid_binlog_state;
+@@gtid_binlog_state
+1-1-100
+SET AUTOCOMMIT = ON;
+INSERT INTO t1 VALUES(3);
+# Expected GTID value 1-1-101 on both nodes
+SELECT @@gtid_binlog_state;
+@@gtid_binlog_state
+1-1-101
+connection node_2;
+SELECT @@gtid_binlog_state;
+@@gtid_binlog_state
+1-1-101
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/galera_last_committed_id.result b/mysql-test/suite/galera/r/galera_last_committed_id.result
index fabc5337576..eadf49d7ce0 100644
--- a/mysql-test/suite/galera/r/galera_last_committed_id.result
+++ b/mysql-test/suite/galera/r/galera_last_committed_id.result
@@ -1,38 +1,35 @@
connection node_2;
connection node_1;
-SELECT WSREP_LAST_WRITTEN_GTID() = '00000000-0000-0000-0000-000000000000:-1';
-WSREP_LAST_WRITTEN_GTID() = '00000000-0000-0000-0000-000000000000:-1'
-1
-wsrep_last_committed_id_match
-1
-connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
-connection node_1a;
+SELECT WSREP_LAST_WRITTEN_GTID();
+WSREP_LAST_WRITTEN_GTID()
+100-1-0
+connection node_1;
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
-connection node_1;
-SELECT WSREP_LAST_WRITTEN_GTID() = '00000000-0000-0000-0000-000000000000:-1';
-WSREP_LAST_WRITTEN_GTID() = '00000000-0000-0000-0000-000000000000:-1'
-1
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;;
connection node_1a;
-INSERT INTO t1 VALUES (1);
+SELECT WSREP_LAST_WRITTEN_GTID() != '100-1-2' AS wsrep_written_does_not_match_different_conn;
+wsrep_written_does_not_match_different_conn
+1
+connection node_2;
+SELECT WSREP_LAST_WRITTEN_GTID() != '100-1-2' AS wsrep_written_does_not_match_different_nodes;
+wsrep_written_does_not_match_different_nodes
+1
connection node_1;
-wsrep_last_committed_id_match
+INSERT INTO t1 VALUES (1);
+connection node_2;
+wsrep_last_written_seen_id_match
1
+connection node_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-SELECT WSREP_LAST_WRITTEN_GTID() = '00000000-0000-0000-0000-000000000000:-1';
-WSREP_LAST_WRITTEN_GTID() = '00000000-0000-0000-0000-000000000000:-1'
-1
INSERT INTO t1 VALUES (1);
-SELECT WSREP_LAST_WRITTEN_GTID() = '00000000-0000-0000-0000-000000000000:-1';
-WSREP_LAST_WRITTEN_GTID() = '00000000-0000-0000-0000-000000000000:-1'
+WSREP_LAST_SEEN_GTID() = '100-1-3'
1
-wsrep_last_committed_id_match
+wsrep_last_written_id_match
1
COMMIT;
-wsrep_last_committed_id_advanced
-1
-wsrep_last_committed_id_advanced
+wsrep_last_written_id_advanced
1
SET AUTOCOMMIT=ON;
DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/galera_performance_schema.result b/mysql-test/suite/galera/r/galera_performance_schema.result
index b40dcb0de60..8c99669c6aa 100644
--- a/mysql-test/suite/galera/r/galera_performance_schema.result
+++ b/mysql-test/suite/galera/r/galera_performance_schema.result
@@ -17,6 +17,7 @@ name wait/synch/mutex/sql/LOCK_wsrep_config_state
name wait/synch/mutex/sql/LOCK_wsrep_desync
name wait/synch/mutex/sql/LOCK_wsrep_donor_monitor
name wait/synch/mutex/sql/LOCK_wsrep_group_commit
+name wait/synch/mutex/sql/LOCK_wsrep_gtid_wait_upto
name wait/synch/mutex/sql/LOCK_wsrep_joiner_monitor
name wait/synch/mutex/sql/LOCK_wsrep_ready
name wait/synch/mutex/sql/LOCK_wsrep_replaying
diff --git a/mysql-test/suite/galera/r/galera_sync_wait_upto.result b/mysql-test/suite/galera/r/galera_sync_wait_upto.result
index 7d691e105da..e18cd3b5432 100644
--- a/mysql-test/suite/galera/r/galera_sync_wait_upto.result
+++ b/mysql-test/suite/galera/r/galera_sync_wait_upto.result
@@ -5,39 +5,21 @@ INSERT INTO t1 VALUES (1);
SELECT WSREP_SYNC_WAIT_UPTO_GTID(NULL);
ERROR HY000: Incorrect arguments to wsrep_sync_wait_upto_gtid
SELECT WSREP_SYNC_WAIT_UPTO_GTID('a');
-ERROR HY000: Incorrect arguments to wsrep_sync_wait_upto_gtid
+ERROR HY000: Could not parse GTID list
SELECT WSREP_SYNC_WAIT_UPTO_GTID(2);
+ERROR HY000: Could not parse GTID list
+SELECT WSREP_SYNC_WAIT_UPTO_GTID('1-1-1,1-1-2');
ERROR HY000: Incorrect arguments to wsrep_sync_wait_upto_gtid
WSREP_SYNC_WAIT_UPTO
1
WSREP_SYNC_WAIT_UPTO
1
-WSREP_SYNC_WAIT_UPTO
-1
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
connection node_2;
-SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_apply_cb";
connection node_1;
INSERT INTO t1 VALUES (2);
-INSERT INTO t1 VALUES (3);
-connection node_2;
-SET SESSION wsrep_sync_wait = 0;
-ERROR HY000: Lock wait timeout exceeded; try restarting transaction
-connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
-connection node_2a;
-SET SESSION wsrep_sync_wait = 0;
-SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
connection node_2;
WSREP_SYNC_WAIT_UPTO
1
-gtid_current = gtid_first
-1
-SET GLOBAL DEBUG_DBUG = "";
-SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
-WSREP_SYNC_WAIT_UPTO
-1
-seqno_current = seqno_second
-1
-SET DEBUG_SYNC = "RESET";
connection node_1;
DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/galera_view.result b/mysql-test/suite/galera/r/galera_view.result
new file mode 100644
index 00000000000..c9a827c6390
--- /dev/null
+++ b/mysql-test/suite/galera/r/galera_view.result
@@ -0,0 +1,5 @@
+connection node_2;
+connection node_1;
+CREATE VIEW v AS SELECT 1;
+RENAME TABLE v TO v2;
+DROP VIEW v2;
diff --git a/mysql-test/suite/galera/r/galera_vote_rejoin_ddl.result b/mysql-test/suite/galera/r/galera_vote_rejoin_ddl.result
new file mode 100644
index 00000000000..6ad7ac75314
--- /dev/null
+++ b/mysql-test/suite/galera/r/galera_vote_rejoin_ddl.result
@@ -0,0 +1,62 @@
+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;
+SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 1';
+connection node_1;
+connect node_4, 127.0.0.1, root, , test, $NODE_MYPORT_4;
+connection node_4;
+SET SESSION wsrep_on=OFF;
+CREATE TABLE t1 (f1 INTEGER);
+SET SESSION wsrep_on=ON;
+DROP TABLE t1;
+connection node_1;
+CREATE TABLE t2 (f1 INTEGER);
+connection node_3;
+SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 0';
+connection node_1;
+connection node_3;
+SELECT COUNT(*) AS expect_0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
+expect_0
+0
+SELECT COUNT(*) AS expect_1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't2';
+expect_1
+1
+connection node_4;
+SET SESSION wsrep_on=OFF;
+Killing server ...
+Starting mysqld
+connection node_1;
+SELECT COUNT(*) AS expect_0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
+expect_0
+0
+SELECT COUNT(*) AS expect_1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't2';
+expect_1
+1
+CALL mtr.add_suppression("Slave SQL: Error 'Unknown table");
+connection node_2;
+SELECT COUNT(*) AS expect_0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
+expect_0
+0
+SELECT COUNT(*) AS expect_1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't2';
+expect_1
+1
+CALL mtr.add_suppression("Slave SQL: Error 'Unknown table");
+connection node_3;
+SELECT COUNT(*) AS expect_0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
+expect_0
+0
+SELECT COUNT(*) AS expect_1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't2';
+expect_1
+1
+connection node_4;
+SELECT COUNT(*) AS expect_0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
+expect_0
+0
+SELECT COUNT(*) AS expect_1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't2';
+expect_1
+1
+CALL mtr.add_suppression("WSREP: Vote 0 \\(success\\) on .* is inconsistent with group. Leaving cluster.");
+DROP TABLE t2;
diff --git a/mysql-test/suite/galera/r/galera_vote_rejoin_dml.result b/mysql-test/suite/galera/r/galera_vote_rejoin_dml.result
new file mode 100644
index 00000000000..bf73fe73f59
--- /dev/null
+++ b/mysql-test/suite/galera/r/galera_vote_rejoin_dml.result
@@ -0,0 +1,73 @@
+connection node_4;
+connection node_3;
+connection node_2;
+connection node_1;
+connection node_1;
+connection node_2;
+connection node_3;
+connection node_4;
+connection node_3;
+SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 1';
+connection node_1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(10)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1, 'A');
+connection node_4;
+SET SESSION wsrep_on=OFF;
+INSERT INTO t1 VALUES (2, 'B');
+SET SESSION wsrep_on=ON;
+DELETE FROM t1 WHERE f1 = 2;
+connection node_1;
+connection node_3;
+SET SESSION wsrep_on = ON;
+SET SESSION wsrep_sync_wait = 15;
+SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 0';
+connection node_1;
+connection node_3;
+SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'A';
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 0 FROM t1 WHERE f2 = 'B';
+COUNT(*) = 0
+1
+connection node_4;
+SET SESSION wsrep_on=OFF;
+Killing server ...
+Starting mysqld
+connection node_1;
+connection node_1;
+SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'A';
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 0 FROM t1 WHERE f2 = 'B';
+COUNT(*) = 0
+1
+CALL mtr.add_suppression("mariadbd: Can't find record in 't1'");
+CALL mtr.add_suppression("Slave SQL: Could not execute Delete_rows");
+CALL mtr.add_suppression("WSREP: Event 3 Delete_rows_v1 apply failed: 120, seqno [0-9]*");
+connection node_2;
+SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'A';
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 0 FROM t1 WHERE f2 = 'B';
+COUNT(*) = 0
+1
+CALL mtr.add_suppression("mariadbd: Can't find record in 't1'");
+CALL mtr.add_suppression("Slave SQL: Could not execute Delete_rows");
+CALL mtr.add_suppression("WSREP: Event 3 Delete_rows_v1 apply failed: 120, seqno [0-9]*");
+connection node_3;
+SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'A';
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 0 FROM t1 WHERE f2 = 'B';
+COUNT(*) = 0
+1
+connection node_4;
+SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'A';
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 0 FROM t1 WHERE f2 = 'B';
+COUNT(*) = 0
+1
+CALL mtr.add_suppression("inconsistent with group");
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/wsrep_strict_ddl.result b/mysql-test/suite/galera/r/wsrep_strict_ddl.result
new file mode 100644
index 00000000000..6d25ec35549
--- /dev/null
+++ b/mysql-test/suite/galera/r/wsrep_strict_ddl.result
@@ -0,0 +1,194 @@
+connection node_2;
+connection node_1;
+call mtr.add_suppression("WSREP: ALTER TABLE isolation failure");
+connection node_1;
+SET GLOBAL binlog_format='ROW';
+create table before_t1(a int, count int, b int, key(b)) engine=Aria;
+INSERT INTO before_t1 values (1,1,1);
+set @@global.wsrep_strict_ddl=ON;
+select @@global.wsrep_strict_ddl;
+@@global.wsrep_strict_ddl
+1
+connection node_2;
+set @@global.wsrep_strict_ddl=ON;
+select @@global.wsrep_strict_ddl;
+@@global.wsrep_strict_ddl
+1
+connection node_1;
+CREATE TABLE t1(a int) engine=Aria;
+ERROR HY000: DDL-statement is forbidden as table storage engine does not support Galera replication
+SHOW WARNINGS;
+Level Code Message
+Error 4165 DDL-statement is forbidden as table storage engine does not support Galera replication
+Warning 1031 WSREP: wsrep_strict_ddl=true and storage engine does not support Galera replication.
+connection node_2;
+SHOW CREATE TABLE t1;
+ERROR 42S02: Table 'test.t1' doesn't exist
+connection node_1;
+CREATE TABLE t2(a int not null primary key) engine=InnoDB;
+ALTER TABLE t2 engine=MyISAM;
+ERROR HY000: DDL-statement is forbidden as table storage engine does not support Galera replication
+SHOW WARNINGS;
+Level Code Message
+Error 4165 DDL-statement is forbidden as table storage engine does not support Galera replication
+Warning 1031 WSREP: wsrep_strict_ddl=true and storage engine does not support Galera replication.
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` int(11) NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+connection node_2;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` int(11) NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+connection node_1;
+TRUNCATE TABLE before_t1;
+ERROR HY000: DDL-statement is forbidden as table storage engine does not support Galera replication
+SELECT * FROM before_t1;
+a count b
+1 1 1
+connection node_2;
+SET SESSION wsrep_sync_wait=15;
+SELECT @@wsrep_sync_wait;
+@@wsrep_sync_wait
+15
+SELECT * FROM before_t1;
+a count b
+connection node_1;
+CREATE VIEW x1 AS SELECT * FROM before_t1;
+ERROR HY000: DDL-statement is forbidden as table storage engine does not support Galera replication
+SHOW CREATE VIEW x1;
+ERROR 42S02: Table 'test.x1' doesn't exist
+connection node_2;
+SHOW CREATE VIEW x1;
+ERROR 42S02: Table 'test.x1' doesn't exist
+connection node_1;
+CREATE DEFINER=`root`@`localhost` TRIGGER increment_before_t1
+AFTER INSERT ON before_t1 FOR EACH ROW
+UPDATE before_t1 SET before_t1.count = before_t1.count+1;
+ERROR HY000: DDL-statement is forbidden as table storage engine does not support Galera replication
+SHOW CREATE TRIGGER increment_before_t1;
+ERROR HY000: Trigger does not exist
+connection node_2;
+SHOW CREATE TRIGGER increment_before_t1;
+ERROR HY000: Trigger does not exist
+connection node_1;
+CREATE INDEX xx2 ON before_t1(a);
+ERROR HY000: DDL-statement is forbidden as table storage engine does not support Galera replication
+SHOW CREATE TABLE before_t1;
+Table Create Table
+before_t1 CREATE TABLE `before_t1` (
+ `a` int(11) DEFAULT NULL,
+ `count` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL,
+ KEY `b` (`b`)
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+connection node_2;
+SHOW CREATE TABLE before_t1;
+Table Create Table
+before_t1 CREATE TABLE `before_t1` (
+ `a` int(11) DEFAULT NULL,
+ `count` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL,
+ KEY `b` (`b`)
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+connection node_1;
+DROP INDEX b ON before_t1;
+ERROR HY000: DDL-statement is forbidden as table storage engine does not support Galera replication
+SHOW CREATE TABLE before_t1;
+Table Create Table
+before_t1 CREATE TABLE `before_t1` (
+ `a` int(11) DEFAULT NULL,
+ `count` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL,
+ KEY `b` (`b`)
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+connection node_2;
+SHOW CREATE TABLE before_t1;
+Table Create Table
+before_t1 CREATE TABLE `before_t1` (
+ `a` int(11) DEFAULT NULL,
+ `count` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL,
+ KEY `b` (`b`)
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+connection node_1;
+ALTER TABLE before_t1 ADD COLUMN f int;
+ERROR HY000: DDL-statement is forbidden as table storage engine does not support Galera replication
+SHOW CREATE TABLE before_t1;
+Table Create Table
+before_t1 CREATE TABLE `before_t1` (
+ `a` int(11) DEFAULT NULL,
+ `count` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL,
+ KEY `b` (`b`)
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+connection node_2;
+SHOW CREATE TABLE before_t1;
+Table Create Table
+before_t1 CREATE TABLE `before_t1` (
+ `a` int(11) DEFAULT NULL,
+ `count` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL,
+ KEY `b` (`b`)
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+connection node_1;
+RENAME TABLE before_t1 to after_t1;
+ERROR HY000: DDL-statement is forbidden as table storage engine does not support Galera replication
+SHOW CREATE TABLE before_t1;
+Table Create Table
+before_t1 CREATE TABLE `before_t1` (
+ `a` int(11) DEFAULT NULL,
+ `count` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL,
+ KEY `b` (`b`)
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+SHOW CREATE TABLE after_t1;
+ERROR 42S02: Table 'test.after_t1' doesn't exist
+connection node_2;
+SHOW CREATE TABLE before_t1;
+Table Create Table
+before_t1 CREATE TABLE `before_t1` (
+ `a` int(11) DEFAULT NULL,
+ `count` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL,
+ KEY `b` (`b`)
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+SHOW CREATE TABLE after_t1;
+ERROR 42S02: Table 'test.after_t1' doesn't exist
+connection node_1;
+DROP TABLE before_t1;
+ERROR HY000: DDL-statement is forbidden as table storage engine does not support Galera replication
+SHOW CREATE TABLE before_t1;
+Table Create Table
+before_t1 CREATE TABLE `before_t1` (
+ `a` int(11) DEFAULT NULL,
+ `count` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL,
+ KEY `b` (`b`)
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+connection node_2;
+SHOW CREATE TABLE before_t1;
+Table Create Table
+before_t1 CREATE TABLE `before_t1` (
+ `a` int(11) DEFAULT NULL,
+ `count` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL,
+ KEY `b` (`b`)
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+connection node_1;
+set @@global.wsrep_strict_ddl=OFF;
+select @@global.wsrep_strict_ddl;
+@@global.wsrep_strict_ddl
+0
+connection node_2;
+set @@global.wsrep_strict_ddl=OFF;
+select @@global.wsrep_strict_ddl;
+@@global.wsrep_strict_ddl
+0
+DROP TABLE t2;
+DROP TABLE before_t1;
diff --git a/mysql-test/suite/galera/suite.pm b/mysql-test/suite/galera/suite.pm
index 027100fdb30..2ef45b247b2 100644
--- a/mysql-test/suite/galera/suite.pm
+++ b/mysql-test/suite/galera/suite.pm
@@ -65,6 +65,7 @@ push @::global_suppressions,
qr|WSREP: Sending JOIN failed: -107 \(Transport endpoint is not connected\). Will retry in new primary component.|,
qr|WSREP: Trying to continue unpaused monitor|,
qr|WSREP: Wait for gtid returned error 3 while waiting for prior transactions to commit before setting position|,
+ qr|WSREP: Failed to report last committed|,
);
sub which($) { return `sh -c "command -v $_[0]"` }
diff --git a/mysql-test/suite/galera/t/GCF-360.cnf b/mysql-test/suite/galera/t/GCF-360.cnf
new file mode 100644
index 00000000000..28e51f87e8e
--- /dev/null
+++ b/mysql-test/suite/galera/t/GCF-360.cnf
@@ -0,0 +1,17 @@
+!include ../galera_4nodes.cnf
+
+[mysqld.1]
+wsrep_provider_options='base_port=@mysqld.1.#galera_port'
+wsrep_ignore_apply_errors=0
+
+[mysqld.2]
+wsrep_provider_options='base_port=@mysqld.2.#galera_port'
+wsrep_ignore_apply_errors=0
+
+[mysqld.3]
+wsrep_provider_options='base_port=@mysqld.3.#galera_port'
+wsrep_ignore_apply_errors=0
+
+[mysqld.4]
+wsrep_provider_options='base_port=@mysqld.4.#galera_port'
+wsrep_ignore_apply_errors=0
diff --git a/mysql-test/suite/galera/t/GCF-360.test b/mysql-test/suite/galera/t/GCF-360.test
new file mode 100644
index 00000000000..f1a511177f6
--- /dev/null
+++ b/mysql-test/suite/galera/t/GCF-360.test
@@ -0,0 +1,65 @@
+#
+# GCF-360 Inconsistency voting: node goes non-prim on DDL that fails everywhere
+#
+# We issue 400 DDLs in total to make this test more stressful#
+#
+
+--source include/galera_cluster.inc
+
+--let $count = 100
+
+--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
+--connect node_4, 127.0.0.1, root, , test, $NODE_MYPORT_4
+
+--disable_query_log
+--disable_result_log
+while ($count)
+{
+ --connection node_1
+ --send DROP TABLE nonexisting_table;
+
+ --connection node_2
+ --send DROP TABLE nonexisting_table;
+
+ --connection node_3
+ --send DROP TABLE nonexisting_table;
+
+ --connection node_4
+ --send DROP TABLE nonexisting_table;
+
+ --connection node_1
+ --error ER_BAD_TABLE_ERROR
+ --reap
+
+ --connection node_2
+ --error ER_BAD_TABLE_ERROR
+ --reap
+
+ --connection node_3
+ --error ER_BAD_TABLE_ERROR
+ --reap
+
+ --connection node_4
+ --error ER_BAD_TABLE_ERROR
+ --reap
+
+ --dec $count
+}
+--enable_result_log
+--enable_query_log
+
+--connection node_1
+SELECT VARIABLE_VALUE AS expect_4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+CALL mtr.add_suppression("Slave SQL: Error 'Unknown table");
+
+--connection node_2
+SELECT VARIABLE_VALUE AS expect_4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+CALL mtr.add_suppression("Slave SQL: Error 'Unknown table");
+
+--connection node_3
+SELECT VARIABLE_VALUE AS expect_4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+CALL mtr.add_suppression("Slave SQL: Error 'Unknown table");
+
+--connection node_4
+SELECT VARIABLE_VALUE AS expect_4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+CALL mtr.add_suppression("Slave SQL: Error 'Unknown table");
diff --git a/mysql-test/suite/galera/t/MDEV-10715.cnf b/mysql-test/suite/galera/t/MDEV-10715.cnf
new file mode 100644
index 00000000000..589514466ed
--- /dev/null
+++ b/mysql-test/suite/galera/t/MDEV-10715.cnf
@@ -0,0 +1,14 @@
+!include ../galera_2nodes.cnf
+
+[mysqld]
+log-bin=mysqld-bin
+log-slave-updates
+binlog-format=ROW
+[mysqld.1]
+gtid-domain-id=1
+wsrep_gtid_mode=1
+wsrep_gtid_domain_id=1
+[mysqld.2]
+gtid-domain-id=1
+wsrep_gtid_mode=1
+wsrep_gtid_domain_id=1 \ No newline at end of file
diff --git a/mysql-test/suite/galera/t/MDEV-10715.test b/mysql-test/suite/galera/t/MDEV-10715.test
new file mode 100644
index 00000000000..186320589c3
--- /dev/null
+++ b/mysql-test/suite/galera/t/MDEV-10715.test
@@ -0,0 +1,19 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+--connection node_1
+create table t1(a int);
+set @@wsrep_gtid_seq_no=22;
+insert into t1 values(1);
+insert into t1 values(2);
+select @@gtid_binlog_state;
+select wsrep_last_seen_gtid();
+select wsrep_last_written_gtid();
+
+--connection node_2
+select @@gtid_binlog_state;
+select wsrep_last_seen_gtid();
+select wsrep_last_written_gtid();
+
+--connection node_1
+drop table t1;
diff --git a/mysql-test/suite/galera/t/MDEV-16509.test b/mysql-test/suite/galera/t/MDEV-16509.test
index ea4430d5e3f..078f1e95a99 100644
--- a/mysql-test/suite/galera/t/MDEV-16509.test
+++ b/mysql-test/suite/galera/t/MDEV-16509.test
@@ -16,14 +16,13 @@ CREATE TABLE t1 (f1 INT PRIMARY KEY) ENGINE=InnoDB;
# Scenario 1: Block INSERT after commit order release after queued for
# group commit. Verify that
#
-# - WSREP_LAST_SEEN_GTID is not advanced before commit finishes
+# - wsrep_last_committed is not advanced before commit finishes
# - The INSERT does not become visible before commit finishes
-# Turn off sync wait to avoid blocking and use WSREP_LAST_SEEN_GTID()
+# Turn off sync wait to avoid blocking and use wsrep_last_committed
# to observe gtid position.
SET SESSION wsrep_sync_wait = 0;
---let $last_seen_gtid_prev = `SELECT WSREP_LAST_SEEN_GTID()`
-
+--let $last_seen_gtid_prev = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
--connection node_1
SET SESSION wsrep_sync_wait = 0;
# Set up sync points
@@ -38,7 +37,7 @@ SET DEBUG_SYNC = "after_group_after_commit SIGNAL after_group_reached WAIT_FOR a
# committed in memory.
SET DEBUG_SYNC = "now WAIT_FOR bcol_reached";
--disable_query_log
---eval SELECT WSREP_LAST_SEEN_GTID() = '$last_seen_gtid_prev' AS wsrep_last_seen_gtid_match
+--eval SELECT VARIABLE_VALUE = '$last_seen_gtid_prev' AS wsrep_last_seen_gtid_match FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'
--enable_query_log
SELECT * FROM t1;
SET DEBUG_SYNC = "now SIGNAL bcol_continue";
@@ -46,14 +45,14 @@ SET DEBUG_SYNC = "now SIGNAL bcol_continue";
# SE commit finished but wsrep_after_commit() has not called yet.
SET DEBUG_SYNC = "now WAIT_FOR acol_reached";
--disable_query_log
---eval SELECT WSREP_LAST_SEEN_GTID() = '$last_seen_gtid_prev' AS wsrep_last_seen_gtid_match
+--eval SELECT VARIABLE_VALUE = '$last_seen_gtid_prev' AS wsrep_last_seen_gtid_match FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'
--enable_query_log
SELECT * FROM t1;
SET DEBUG_SYNC = "now SIGNAL acol_continue";
SET DEBUG_SYNC = "now WAIT_FOR after_group_reached";
--disable_query_log
---eval SELECT WSREP_LAST_SEEN_GTID() != '$last_seen_gtid_prev' AS wsrep_last_seen_gtid_do_not_match
+--eval SELECT VARIABLE_VALUE != '$last_seen_gtid_prev' AS wsrep_last_seen_gtid_do_not_match FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'
--enable_query_log
SET DEBUG_SYNC = "now SIGNAL after_group_continue";
@@ -70,7 +69,7 @@ SET DEBUG_SYNC = "now SIGNAL after_group_continue";
SET SESSION wsrep_sync_wait = 0;
--connection ctrl
---let $last_seen_gtid_prev = `SELECT WSREP_LAST_SEEN_GTID()`
+--let $last_seen_gtid_prev = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
--connection node_1
SET DEBUG_SYNC = "wsrep_before_commit_order_leave SIGNAL bcol_reached_1 WAIT_FOR bcol_continue_1";
@@ -81,7 +80,7 @@ SET DEBUG_SYNC = "after_group_after_commit SIGNAL agac_reached_1 WAIT_FOR agac_c
SET DEBUG_SYNC = "now WAIT_FOR bcol_reached_1";
--disable_query_log
---eval SELECT WSREP_LAST_SEEN_GTID() = '$last_seen_gtid_prev' AS wsrep_last_seen_gtid_match
+--eval SELECT VARIABLE_VALUE = '$last_seen_gtid_prev' AS wsrep_last_seen_gtid_match FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'
--enable_query_log
--connection node_1a
@@ -98,14 +97,14 @@ SET DEBUG_SYNC = "now WAIT_FOR acol_reached_1";
SET DEBUG_SYNC = "now WAIT_FOR bcol_reached_2";
--disable_query_log
---eval SELECT WSREP_LAST_SEEN_GTID() = '$last_seen_gtid_prev' AS wsrep_last_seen_gtid_match
+--eval SELECT VARIABLE_VALUE = '$last_seen_gtid_prev' AS wsrep_last_seen_gtid_match FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'
--enable_query_log
SET DEBUG_SYNC = "now SIGNAL bcol_continue_2";
SET DEBUG_SYNC = "now WAIT_FOR acol_reached_2";
--disable_query_log
---eval SELECT WSREP_LAST_SEEN_GTID() = '$last_seen_gtid_prev' AS wsrep_last_seen_gtid_match
+--eval SELECT VARIABLE_VALUE = '$last_seen_gtid_prev' AS wsrep_last_seen_gtid_match FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'
--enable_query_log
# Last seen GTIDs are incremented one by one once after_group_after_commit
@@ -114,14 +113,14 @@ SET DEBUG_SYNC = "now SIGNAL acol_continue_1";
SET DEBUG_SYNC = "now WAIT_FOR agac_reached_1";
--disable_query_log
---eval SELECT WSREP_LAST_SEEN_GTID() != '$last_seen_gtid_prev' AS wsrep_last_seen_gtid_no_match
+--eval SELECT VARIABLE_VALUE != '$last_seen_gtid_prev' AS wsrep_last_seen_gtid_no_match FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'
--enable_query_log
---let $last_seen_gtid_prev = `SELECT WSREP_LAST_SEEN_GTID()`
+--let $last_seen_gtid_prev = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
SET DEBUG_SYNC = "now SIGNAL acol_continue_2";
SET DEBUG_SYNC = "now WAIT_FOR agac_reached_2";
--disable_query_log
---eval SELECT WSREP_LAST_SEEN_GTID() != '$last_seen_gtid_prev' AS wsrep_last_seen_gtid_no_match
+--eval SELECT VARIABLE_VALUE != '$last_seen_gtid_prev' AS wsrep_last_seen_gtid_no_match FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'
--enable_query_log
SET DEBUG_SYNC = "now SIGNAL agac_continue_1";
diff --git a/mysql-test/suite/galera/t/galera-features#117.cnf b/mysql-test/suite/galera/t/galera-features#117.cnf
new file mode 100644
index 00000000000..8eaed546ad8
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera-features#117.cnf
@@ -0,0 +1,5 @@
+!include ../galera_2nodes.cnf
+
+[mysqld]
+wsrep-ignore-apply-errors=0
+wsrep-sync-wait=0
diff --git a/mysql-test/suite/galera/t/galera-features#117.test b/mysql-test/suite/galera/t/galera-features#117.test
new file mode 100644
index 00000000000..0436b201a09
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera-features#117.test
@@ -0,0 +1,38 @@
+#
+# This test tests voting for DDLs (TOI events)
+#
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+--connection node_2
+SET SESSION wsrep_on=OFF;
+CREATE TABLE test.t1 (f2 INTEGER);
+SET SESSION wsrep_on=ON;
+
+--error ER_TABLE_EXISTS_ERROR
+CREATE TABLE test.t1 (f1 INTEGER);
+
+--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
+SHOW CREATE TABLE test.t1;
+SHOW STATUS LIKE 'wsrep_cluster_status';
+DROP TABLE test.t1;
+
+--connection node_2
+SET SESSION wsrep_sync_wait=0;
+--let $wait_condition = SELECT VARIABLE_VALUE = 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+--source include/wait_condition.inc
+SHOW CREATE TABLE test.t1;
+SHOW STATUS LIKE 'wsrep_cluster_status';
+--error ER_UNKNOWN_COM_ERROR
+CREATE TABLE test.t2 (f1 INTEGER);
+SHOW TABLES IN test;
+
+--source include/kill_galera.inc
+--source include/wait_until_disconnected.inc
+--source include/start_mysqld.inc
+
+CALL mtr.add_suppression("Inconsistent by consensus.");
+CALL mtr.add_suppression("WSREP: Failed to execute TOI action");
+CALL mtr.add_suppression("WSREP: TO isolation end failed");
diff --git a/mysql-test/suite/galera/t/galera_as_slave_gtid_replicate_do_db_cc.cnf b/mysql-test/suite/galera/t/galera_as_slave_gtid_replicate_do_db_cc.cnf
new file mode 100644
index 00000000000..edd063b6554
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_as_slave_gtid_replicate_do_db_cc.cnf
@@ -0,0 +1,14 @@
+!include ../galera_2nodes_as_slave.cnf
+
+[mysqld]
+log-bin=mysqld-bin
+log-slave-updates
+binlog-format=ROW
+
+[mysqld.1]
+replicate-do-db=test1
+replicate-wild-do-table=test1.%
+
+[mysqld.2]
+replicate-do-db=test1
+replicate-wild-do-table=test1.%
diff --git a/mysql-test/suite/galera/t/galera_can_run_toi.test b/mysql-test/suite/galera/t/galera_can_run_toi.test
new file mode 100644
index 00000000000..a0087be4304
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_can_run_toi.test
@@ -0,0 +1,34 @@
+--source include/galera_cluster.inc
+#
+# MDEV-24833 : Signal 11 on wsrep_can_run_in_toi at wsrep_mysqld.cc:1994
+#
+SET sql_mode='';
+CREATE TABLE t3 (c1 VARCHAR(10));
+ALTER TABLE t3 ENGINE=NonExistentEngine;
+SHOW CREATE TABLE t3;
+INSERT INTO t3 values (1);
+SET sql_mode=default;
+--error ER_UNKNOWN_STORAGE_ENGINE
+ALTER TABLE t3 engine=innodbCLUSTER;
+SHOW CREATE TABLE t3;
+DROP TABLE t3;
+#
+# Test default_storage_engine to engine that is not supported by Galera
+#
+SET sql_mode='';
+SET SESSION default_storage_engine=MyISAM;
+SELECT @@default_storage_engine;
+SET GLOBAL wsrep_replicate_myisam=OFF;
+SET GLOBAL wsrep_strict_ddl=ON;
+CREATE TABLE t3 (c1 VARCHAR(10)) ENGINE=InnoDB;
+--error ER_GALERA_REPLICATION_NOT_SUPPORTED
+ALTER TABLE t3 ENGINE=NonExistentEngine;
+SHOW CREATE TABLE t3;
+DROP TABLE t3;
+
+--disable_query_log
+SET GLOBAL sql_mode=default;
+SET GLOBAL default_storage_engine=default;
+SET GLOBAL wsrep_replicate_myisam=default;
+SET GLOBAL wsrep_strict_ddl=default;
+--enable_query_log
diff --git a/mysql-test/suite/galera/t/galera_create_view.test b/mysql-test/suite/galera/t/galera_create_view.test
new file mode 100644
index 00000000000..69b96a9536c
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_create_view.test
@@ -0,0 +1,6 @@
+--source include/galera_cluster.inc
+
+CREATE OR REPLACE VIEW v AS WITH cte AS ( SELECT 1 ) SELECT * FROM cte;
+
+# Cleanup
+DROP VIEW v;
diff --git a/mysql-test/suite/galera/t/galera_ftwrl_drain.test b/mysql-test/suite/galera/t/galera_ftwrl_drain.test
index ee64e147f65..c8cdda5d624 100644
--- a/mysql-test/suite/galera/t/galera_ftwrl_drain.test
+++ b/mysql-test/suite/galera/t/galera_ftwrl_drain.test
@@ -39,7 +39,7 @@ SELECT COUNT(*) = 0 FROM t1;
--connection node_2
--sleep 1
---let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE = 'Init' AND INFO = 'FLUSH TABLES WITH READ LOCK'
+--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE (STATE = 'Init' OR STATE = 'starting') AND INFO = 'FLUSH TABLES WITH READ LOCK'
--source include/wait_condition.inc
--source include/galera_clear_sync_point.inc
diff --git a/mysql-test/suite/galera/t/galera_gcache_recover_full_gcache.cnf b/mysql-test/suite/galera/t/galera_gcache_recover_full_gcache.cnf
index da74ea9fc5d..0157d2f08b1 100644
--- a/mysql-test/suite/galera/t/galera_gcache_recover_full_gcache.cnf
+++ b/mysql-test/suite/galera/t/galera_gcache_recover_full_gcache.cnf
@@ -2,7 +2,7 @@
[mysqld.1]
max_allowed_packet=10M
-innodb_log_file_size=110M
+innodb_log_file_size=220M
wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.recover=yes;pc.ignore_sb=true;gcache.size=10M'
[mysqld.2]
diff --git a/mysql-test/suite/galera/t/galera_gcache_recover_manytrx.cnf b/mysql-test/suite/galera/t/galera_gcache_recover_manytrx.cnf
index c08551eae84..c6432f3607e 100644
--- a/mysql-test/suite/galera/t/galera_gcache_recover_manytrx.cnf
+++ b/mysql-test/suite/galera/t/galera_gcache_recover_manytrx.cnf
@@ -1,9 +1,9 @@
!include ../galera_2nodes.cnf
[mysqld.1]
-innodb_log_file_size=110M
+innodb_log_file_size=220M
wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.recover=yes;pc.ignore_sb=true;'
[mysqld.2]
-innodb_log_file_size=110M
+innodb_log_file_size=220M
wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.recover=yes;pc.ignore_sb=true;'
diff --git a/mysql-test/suite/galera/t/galera_gra_log.test b/mysql-test/suite/galera/t/galera_gra_log.test
index 8b5aaaae5bd..23561d9a2b1 100644
--- a/mysql-test/suite/galera/t/galera_gra_log.test
+++ b/mysql-test/suite/galera/t/galera_gra_log.test
@@ -5,26 +5,45 @@
--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_2
--exec rm -rf $MYSQLTEST_VARDIR/mysqld.2/data/GRA_*.log
+let $restore_wsrep_ignore_apply_errors = `SELECT @@GLOBAL.wsrep_ignore_apply_errors`;
+SET GLOBAL wsrep_ignore_apply_errors=0;
# Create applier failure
-
SET SESSION wsrep_on=OFF;
CREATE TABLE t1 (f1 INTEGER);
--connection node_1
CREATE TABLE t1 (f1 INTEGER);
+# node 2 should detect an error and leave the cluster
+--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
-SET SESSION wsrep_on=ON;
-SELECT COUNT(*) = 0 FROM t1;
+--let $wait_condition = SELECT VARIABLE_VALUE = 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+--source include/wait_condition.inc
# Make sure the GRA file produced is readable and contains the failure
--replace_regex /SET TIMESTAMP=[0-9]+/SET TIMESTAMP=<TIMESTAMP>/ /pseudo_thread_id=[0-9]+/pseudo_thread_id=<PSEUDO_THREAD_ID>/
--exec $MYSQL_BINLOG --short-form $MYSQLTEST_VARDIR/mysqld.2/data/GRA_*.log
-CALL mtr.add_suppression("Slave SQL: Error 'Table 't1' already exists' on query");
+# restart and reconnect node_2
+--source include/kill_galera.inc
+--source include/wait_until_disconnected.inc
+--source include/start_mysqld.inc
+--eval SET GLOBAL wsrep_ignore_apply_errors = $restore_wsrep_ignore_apply_errors
DROP TABLE t1;
+
+CALL mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on");
+
+# Restore original auto_increment_offset values.
+--source include/auto_increment_offset_restore.inc
diff --git a/mysql-test/suite/galera/t/galera_gtid_slave.cnf b/mysql-test/suite/galera/t/galera_gtid_slave.cnf
index 409d0d1609a..112c487851f 100644
--- a/mysql-test/suite/galera/t/galera_gtid_slave.cnf
+++ b/mysql-test/suite/galera/t/galera_gtid_slave.cnf
@@ -4,15 +4,13 @@
log-bin=mysqld-bin
log-slave-updates
binlog-format=ROW
-
[mysqld.1]
gtid-domain-id=1
+wsrep_gtid_mode=1
+wsrep_gtid_domain_id=1
[mysqld.2]
-gtid-domain-id=2
+gtid-domain-id=1
wsrep_gtid_mode=1
-wsrep_gtid_domain_id=2
+wsrep_gtid_domain_id=1
[mysqld.3]
gtid-domain-id=2
-wsrep_gtid_mode=1
-wsrep_gtid_domain_id=2
-
diff --git a/mysql-test/suite/galera/t/galera_gtid_slave_sst_rsync.cnf b/mysql-test/suite/galera/t/galera_gtid_slave_sst_rsync.cnf
index bb9c8e84f1b..efeb536de96 100644
--- a/mysql-test/suite/galera/t/galera_gtid_slave_sst_rsync.cnf
+++ b/mysql-test/suite/galera/t/galera_gtid_slave_sst_rsync.cnf
@@ -7,12 +7,12 @@ binlog-format=ROW
wsrep_sst_method=rsync
[mysqld.1]
gtid-domain-id=1
+wsrep_gtid_mode=1
+wsrep_gtid_domain_id=1
[mysqld.2]
-gtid-domain-id=2
+gtid-domain-id=1
wsrep_gtid_mode=1
-wsrep_gtid_domain_id=2
+wsrep_gtid_domain_id=1
[mysqld.3]
gtid-domain-id=2
-wsrep_gtid_mode=1
-wsrep_gtid_domain_id=2
diff --git a/mysql-test/suite/galera/t/galera_gtid_trx_conflict.cnf b/mysql-test/suite/galera/t/galera_gtid_trx_conflict.cnf
new file mode 100644
index 00000000000..5f129e7c168
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_gtid_trx_conflict.cnf
@@ -0,0 +1,14 @@
+!include ../galera_2nodes.cnf
+
+[mysqld]
+log-bin=mysqld-bin
+log-slave-updates
+binlog-format=ROW
+[mysqld.1]
+gtid-domain-id=1
+wsrep_gtid_mode=1
+wsrep_gtid_domain_id=1
+[mysqld.2]
+gtid-domain-id=1
+wsrep_gtid_mode=1
+wsrep_gtid_domain_id=1
diff --git a/mysql-test/suite/galera/t/galera_gtid_trx_conflict.test b/mysql-test/suite/galera/t/galera_gtid_trx_conflict.test
new file mode 100644
index 00000000000..27539b2ab52
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_gtid_trx_conflict.test
@@ -0,0 +1,56 @@
+#
+# Test galera GTID with conflicting trx and @@wsrep_gtid_seq_no set on one node.
+#
+
+--source include/galera_cluster.inc
+--source include/have_log_bin.inc
+--source include/have_innodb.inc
+
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+
+--connection node_1
+SET AUTOCOMMIT = OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES(1);
+
+--connection node_2
+SET AUTOCOMMIT = OFF;
+SET @@wsrep_gtid_seq_no = 100;
+START TRANSACTION;
+INSERT INTO t1 VALUES(1);
+
+--connection node_1
+COMMIT;
+
+--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
+--connection node_2a
+--let $wait_condition = SELECT COUNT(*) = 1 FROM t1;
+--source include/wait_condition.inc
+
+--connection node_2
+--error ER_LOCK_DEADLOCK
+COMMIT;
+
+--echo # Expected GTID value 1-1-2 on both nodes
+SELECT @@gtid_binlog_state;
+
+SET AUTOCOMMIT = ON;
+INSERT INTO t1 VALUES(2);
+
+--echo # Expected GTID value 1-1-100 on both nodes, seqno is set with wsrep_gtid_seq_no
+SELECT @@gtid_binlog_state;
+
+--connection node_1
+SELECT @@gtid_binlog_state;
+
+SET AUTOCOMMIT = ON;
+INSERT INTO t1 VALUES(3);
+
+--echo # Expected GTID value 1-1-101 on both nodes
+SELECT @@gtid_binlog_state;
+
+--connection node_2
+SELECT @@gtid_binlog_state;
+
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera/t/galera_last_committed_id.cnf b/mysql-test/suite/galera/t/galera_last_committed_id.cnf
new file mode 100644
index 00000000000..375d2480f23
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_last_committed_id.cnf
@@ -0,0 +1,9 @@
+!include ../galera_2nodes.cnf
+
+[mysqld.1]
+wsrep_gtid_mode=1
+wsrep_gtid_domain_id=100
+
+[mysqld.2]
+wsrep_gtid_mode=1
+wsrep_gtid_domain_id=100
diff --git a/mysql-test/suite/galera/t/galera_last_committed_id.combinations b/mysql-test/suite/galera/t/galera_last_committed_id.combinations
new file mode 100644
index 00000000000..dd92b9fa81f
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_last_committed_id.combinations
@@ -0,0 +1,6 @@
+[binlogoff]
+
+[binlogon]
+--log-bin=master-bin
+--log-bin-index=master-bin
+--log-slave-updates
diff --git a/mysql-test/suite/galera/t/galera_last_committed_id.test b/mysql-test/suite/galera/t/galera_last_committed_id.test
index 550838cdcd9..b6e3e1f7e7a 100644
--- a/mysql-test/suite/galera/t/galera_last_committed_id.test
+++ b/mysql-test/suite/galera/t/galera_last_committed_id.test
@@ -4,64 +4,62 @@
--source include/galera_cluster.inc
-# Returns -1 if no transactions have been run
+# Returns domain-server-0 if no transactions have been run
-SELECT WSREP_LAST_WRITTEN_GTID() = '00000000-0000-0000-0000-000000000000:-1';
+SELECT WSREP_LAST_WRITTEN_GTID();
+
+# WSREP_LAST_WRITTEN_GTID() should not be influenced by transactions written
+# on other nodes or connections
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
--disable_query_log
---let $seqno = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
---let $state = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_uuid'`
---eval SELECT WSREP_LAST_SEEN_GTID() = '$state:$seqno' AS wsrep_last_committed_id_match;
+--let $wsrep_last_written_id_conn_1 = `SELECT WSREP_LAST_WRITTEN_GTID()`
--enable_query_log
-# WSREP_LAST_WRITTEN_GTID() should not be influenced by transactions committed
-# on other connections
-
---connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
--connection node_1a
-CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
-INSERT INTO t1 VALUES (1);
+--eval SELECT WSREP_LAST_WRITTEN_GTID() != '$wsrep_last_written_id_conn_1' AS wsrep_written_does_not_match_different_conn
---connection node_1
-SELECT WSREP_LAST_WRITTEN_GTID() = '00000000-0000-0000-0000-000000000000:-1';
+--connection node_2
+--eval SELECT WSREP_LAST_WRITTEN_GTID() != '$wsrep_last_written_id_conn_1' AS wsrep_written_does_not_match_different_nodes
-# WSREP_LAST_SEEN_GTID() should be influenced by transactions committed
+# WSREP_LAST_SEEN_GTID() should be influenced by transactions written
# on other connections
---connection node_1a
+--connection node_1
INSERT INTO t1 VALUES (1);
--disable_query_log
---let $wsrep_last_committed_id_conn_1a = `SELECT WSREP_LAST_SEEN_GTID()`
+--let $wsrep_last_written_id_conn_1 = `SELECT WSREP_LAST_WRITTEN_GTID()`
--enable_query_log
---connection node_1
+--connection node_2
--disable_query_log
---eval SELECT WSREP_LAST_SEEN_GTID() = '$wsrep_last_committed_id_conn_1a' AS wsrep_last_committed_id_match;
+--eval SELECT WSREP_LAST_SEEN_GTID() = '$wsrep_last_written_id_conn_1' AS wsrep_last_written_seen_id_match
--enable_query_log
# Should not advance while a transaction is in progress
+--connection node_1
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-SELECT WSREP_LAST_WRITTEN_GTID() = '00000000-0000-0000-0000-000000000000:-1';
--disable_query_log
---let $wsrep_last_committed_id_before = `SELECT WSREP_LAST_SEEN_GTID()`
+--let $wsrep_last_written_id_before = `SELECT WSREP_LAST_WRITTEN_GTID()`
--enable_query_log
INSERT INTO t1 VALUES (1);
-SELECT WSREP_LAST_WRITTEN_GTID() = '00000000-0000-0000-0000-000000000000:-1';
--disable_query_log
---eval SELECT WSREP_LAST_SEEN_GTID() = '$wsrep_last_committed_id_before' AS wsrep_last_committed_id_match;
+--eval SELECT WSREP_LAST_SEEN_GTID() = '$wsrep_last_written_id_before'
+--eval SELECT WSREP_LAST_WRITTEN_GTID() = '$wsrep_last_written_id_before' AS wsrep_last_written_id_match
--enable_query_log
-# Should only advance after the transaction has been committed
+# Should only advance after the transaction has been commited
COMMIT;
--disable_query_log
---let $seqno = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
---let $state = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_uuid'`
---eval SELECT WSREP_LAST_WRITTEN_GTID() = '$state:$seqno' AS wsrep_last_committed_id_advanced;
---eval SELECT WSREP_LAST_SEEN_GTID() = '$state:$seqno' AS wsrep_last_committed_id_advanced;
+--eval SELECT WSREP_LAST_WRITTEN_GTID() != 'wsrep_last_written_id_before' AS wsrep_last_written_id_advanced
--enable_query_log
SET AUTOCOMMIT=ON;
diff --git a/mysql-test/suite/galera/t/galera_load_data.cnf b/mysql-test/suite/galera/t/galera_load_data.cnf
index 14d894fc7d0..7d152b212ce 100644
--- a/mysql-test/suite/galera/t/galera_load_data.cnf
+++ b/mysql-test/suite/galera/t/galera_load_data.cnf
@@ -2,18 +2,16 @@
[mysqld.1]
secure-file-priv = ""
-innodb_file_format ='Barracuda'
innodb_file_per_table = ON
innodb_stats_persistent=ON
innodb_stats_auto_recalc=ON
innodb_stats_persistent_sample_pages=20
-innodb_stats_sample_pages=8
+innodb_stats_transient_sample_pages=8
[mysqld.2]
secure-file-priv = ""
-innodb_file_format ='Barracuda'
innodb_file_per_table = ON
innodb_stats_persistent=ON
innodb_stats_auto_recalc=ON
innodb_stats_persistent_sample_pages=20
-innodb_stats_sample_pages=8
+innodb_stats_transient_sample_pages=8
diff --git a/mysql-test/suite/galera/t/galera_sync_wait_upto.cnf b/mysql-test/suite/galera/t/galera_sync_wait_upto.cnf
new file mode 100644
index 00000000000..375d2480f23
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_sync_wait_upto.cnf
@@ -0,0 +1,9 @@
+!include ../galera_2nodes.cnf
+
+[mysqld.1]
+wsrep_gtid_mode=1
+wsrep_gtid_domain_id=100
+
+[mysqld.2]
+wsrep_gtid_mode=1
+wsrep_gtid_domain_id=100
diff --git a/mysql-test/suite/galera/t/galera_sync_wait_upto.combinations b/mysql-test/suite/galera/t/galera_sync_wait_upto.combinations
new file mode 100644
index 00000000000..dd92b9fa81f
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_sync_wait_upto.combinations
@@ -0,0 +1,6 @@
+[binlogoff]
+
+[binlogon]
+--log-bin=master-bin
+--log-bin-index=master-bin
+--log-slave-updates
diff --git a/mysql-test/suite/galera/t/galera_sync_wait_upto.test b/mysql-test/suite/galera/t/galera_sync_wait_upto.test
index 32c6b590c84..05353ac7a3a 100644
--- a/mysql-test/suite/galera/t/galera_sync_wait_upto.test
+++ b/mysql-test/suite/galera/t/galera_sync_wait_upto.test
@@ -8,108 +8,65 @@
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
-
# Test with invalid values
--error ER_WRONG_ARGUMENTS
SELECT WSREP_SYNC_WAIT_UPTO_GTID(NULL);
---error ER_WRONG_ARGUMENTS
+--error ER_INCORRECT_GTID_STATE
SELECT WSREP_SYNC_WAIT_UPTO_GTID('a');
---error ER_WRONG_ARGUMENTS
+--error ER_INCORRECT_GTID_STATE
SELECT WSREP_SYNC_WAIT_UPTO_GTID(2);
+--error ER_WRONG_ARGUMENTS
+SELECT WSREP_SYNC_WAIT_UPTO_GTID('1-1-1,1-1-2');
-# If set to low value, expect no waiting
+# Expected starting seqno
---disable_query_log
---let $seqno = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
---let $state = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_uuid'`
---enable_query_log
+--let $last_seen_gtid = `SELECT WSREP_LAST_SEEN_GTID()`
+--let $s1 = `SELECT SUBSTR('$last_seen_gtid', LOCATE('-', '$last_seen_gtid') + LENGTH('-'))`
+--let $start_seqno = `SELECT SUBSTR('$s1', LOCATE('-', '$s1') + LENGTH('-'))`
---disable_query_log
---eval SELECT WSREP_SYNC_WAIT_UPTO_GTID('00000000-0000-0000-0000-000000000000:-1') AS WSREP_SYNC_WAIT_UPTO;
---enable_query_log
+# If set to low value, expect no waiting
--disable_query_log
---eval SELECT WSREP_SYNC_WAIT_UPTO_GTID('$state:0') AS WSREP_SYNC_WAIT_UPTO;
+--let $lower_seqno = $start_seqno
+--dec $lower_seqno
+--eval SELECT WSREP_SYNC_WAIT_UPTO_GTID('100-1-$lower_seqno') AS WSREP_SYNC_WAIT_UPTO;
--enable_query_log
-
-# If set to current last_committed value
+# If set to current last_committed value no waiting
--disable_query_log
---eval SELECT WSREP_SYNC_WAIT_UPTO_GTID('$state:$seqno') AS WSREP_SYNC_WAIT_UPTO;
+--let $wsrep_last_committed_gtid = `SELECT WSREP_LAST_SEEN_GTID()`
+--eval SELECT WSREP_SYNC_WAIT_UPTO_GTID('$wsrep_last_committed_gtid') AS WSREP_SYNC_WAIT_UPTO;
--enable_query_log
-# If set to very high value, will wait
+# Timeout if GTID is not received on time
--disable_query_log
+--let $high_seqno = $start_seqno
+--inc $high_seqno
--error ER_LOCK_WAIT_TIMEOUT
---eval SELECT WSREP_SYNC_WAIT_UPTO_GTID('$state:9223372036854775807', 1) AS WSREP_SYNC_WAIT_UPTO;
+--eval SELECT WSREP_SYNC_WAIT_UPTO_GTID('100-1-$high_seqno', 1) AS WSREP_SYNC_WAIT_UPTO;
--enable_query_log
-
-# If applier is blocked, will wait
-
---connection node_2
-SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_apply_cb";
-
-
---connection node_1
-# Perform two inserts and record the IDs of each
-INSERT INTO t1 VALUES (2);
---let $gtid_first = `SELECT WSREP_LAST_WRITTEN_GTID()`
-
-INSERT INTO t1 VALUES (3);
---let $gtid_second = `SELECT WSREP_LAST_WRITTEN_GTID()`
+# Wait for GTID value
--connection node_2
-SET SESSION wsrep_sync_wait = 0;
-
---disable_query_log
---error ER_LOCK_WAIT_TIMEOUT
---eval SELECT WSREP_SYNC_WAIT_UPTO_GTID('$gtid_first', 1) AS WSREP_SYNC_WAIT_UPTO;
---enable_query_log
-
--disable_query_log
---send_eval SELECT WSREP_SYNC_WAIT_UPTO_GTID('$gtid_first') AS WSREP_SYNC_WAIT_UPTO;
+--let $wait_seqno = $start_seqno
+--inc $wait_seqno
+--send_eval SELECT WSREP_SYNC_WAIT_UPTO_GTID('100-1-$wait_seqno') AS WSREP_SYNC_WAIT_UPTO
--enable_query_log
-# Unblock applier
---connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
---connection node_2a
-SET SESSION wsrep_sync_wait = 0;
---let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE INFO LIKE 'SELECT WSREP_SYNC_WAIT%';
---source include/wait_condition.inc
-SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
+--connection node_1
+INSERT INTO t1 VALUES (2);
--connection node_2
--reap
-# Confirm that we were allowed to proceed when the applier reached $seqno_first
---let $gtid_current = `SELECT WSREP_LAST_SEEN_GTID()`
---disable_query_log
---eval SELECT '$gtid_current' = '$gtid_first' AS `gtid_current = gtid_first`
---enable_query_log
-
-SET GLOBAL DEBUG_DBUG = "";
-SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
-
-# Move forward some more, to $seqno_second;
-
---disable_query_log
---eval SELECT WSREP_SYNC_WAIT_UPTO_GTID('$gtid_second') AS WSREP_SYNC_WAIT_UPTO;
---enable_query_log
-
---let $gtid_current = `SELECT WSREP_LAST_SEEN_GTID()`
---disable_query_log
---eval SELECT '$gtid_current' = '$gtid_second' AS `seqno_current = seqno_second`
---enable_query_log
-
-SET DEBUG_SYNC = "RESET";
-
--connection node_1
DROP TABLE t1;
diff --git a/mysql-test/suite/galera/t/galera_view.test b/mysql-test/suite/galera/t/galera_view.test
new file mode 100644
index 00000000000..2bfeb3027a7
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_view.test
@@ -0,0 +1,7 @@
+--source include/galera_cluster.inc
+
+CREATE VIEW v AS SELECT 1;
+RENAME TABLE v TO v2;
+
+# Cleanup
+DROP VIEW v2;
diff --git a/mysql-test/suite/galera/t/galera_vote_rejoin_ddl.cnf b/mysql-test/suite/galera/t/galera_vote_rejoin_ddl.cnf
new file mode 100644
index 00000000000..022cfcdc0b0
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_vote_rejoin_ddl.cnf
@@ -0,0 +1,10 @@
+!include ../galera_4nodes.cnf
+
+[mysqld]
+wsrep-ignore-apply-errors=0
+
+[mysqld.3]
+auto_increment_offset=3
+
+[mysqld.4]
+auto_increment_offset=4
diff --git a/mysql-test/suite/galera/t/galera_vote_rejoin_ddl.test b/mysql-test/suite/galera/t/galera_vote_rejoin_ddl.test
new file mode 100644
index 00000000000..ca75d33b7d7
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_vote_rejoin_ddl.test
@@ -0,0 +1,96 @@
+#
+# Test the case where a node that dropped prior to an inconsistency vote is
+# able to rejoin via IST after the vote is complete
+#
+
+--source include/galera_cluster.inc
+--source include/big_test.inc
+
+# Save original auto_increment_offset values.
+--let $node_1=node_1
+--let $node_2=node_2
+--source include/auto_increment_offset_save.inc
+# The following has to be set hard as these connection doesn't yet exists and
+# the auto_increment_offset value changes during the lifetime of the servers.
+--let $node_3=node_3
+--let $auto_increment_offset_node_3 = 3;
+--let $node_4=node_4
+--let $auto_increment_offset_node_4 = 4;
+
+# Isolate node #3
+--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
+--connection node_3
+SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 1';
+
+# Wait for node #3 to leave cluster
+--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
+
+# Introduce inconsistency on node #4
+--connect node_4, 127.0.0.1, root, , test, $NODE_MYPORT_4
+--connection node_4
+SET SESSION wsrep_on=OFF;
+CREATE TABLE t1 (f1 INTEGER);
+SET SESSION wsrep_on=ON;
+DROP TABLE t1;
+
+# Wait for node #4 to be voted out
+--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
+# Do some more stuff on the cluster to add to the IST stream
+CREATE TABLE t2 (f1 INTEGER);
+
+# Rejoin node #3
+--connection node_3
+SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 0';
+--source include/galera_wait_ready.inc
+
+--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
+--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+--source include/wait_condition.inc
+
+# Confirm that all is good
+--connection node_3
+SELECT COUNT(*) AS expect_0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
+SELECT COUNT(*) AS expect_1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't2';
+
+# Rejoin node #4
+--connection node_4
+SET SESSION wsrep_on=OFF;
+--source include/kill_galera.inc
+--sleep 1
+--echo Starting mysqld
+--source include/start_mysqld.inc
+
+--connection node_1
+# Confirm node #4 has rejoined
+--let $wait_condition = SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+--source include/wait_condition.inc
+
+# Confirm that all is good and all nodes have identical data
+SELECT COUNT(*) AS expect_0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
+SELECT COUNT(*) AS expect_1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't2';
+CALL mtr.add_suppression("Slave SQL: Error 'Unknown table");
+
+--connection node_2
+SELECT COUNT(*) AS expect_0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
+SELECT COUNT(*) AS expect_1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't2';
+CALL mtr.add_suppression("Slave SQL: Error 'Unknown table");
+
+--connection node_3
+SELECT COUNT(*) AS expect_0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
+SELECT COUNT(*) AS expect_1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't2';
+
+--connection node_4
+SELECT COUNT(*) AS expect_0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
+SELECT COUNT(*) AS expect_1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't2';
+CALL mtr.add_suppression("WSREP: Vote 0 \\(success\\) on .* is inconsistent with group. Leaving cluster.");
+
+DROP TABLE t2;
+
+--source include/auto_increment_offset_restore.inc
diff --git a/mysql-test/suite/galera/t/galera_vote_rejoin_dml.cnf b/mysql-test/suite/galera/t/galera_vote_rejoin_dml.cnf
new file mode 100644
index 00000000000..af445b25372
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_vote_rejoin_dml.cnf
@@ -0,0 +1,7 @@
+!include ../galera_4nodes.cnf
+
+[mysqld]
+wsrep-ignore-apply-errors=0
+
+[ENV]
+galera_cluster_size=4
diff --git a/mysql-test/suite/galera/t/galera_vote_rejoin_dml.test b/mysql-test/suite/galera/t/galera_vote_rejoin_dml.test
new file mode 100644
index 00000000000..c170bec1a37
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_vote_rejoin_dml.test
@@ -0,0 +1,99 @@
+#
+# Test the case where a node that dropped prior to an inconsistency vote is
+# able to rejoin via IST after the vote is complete
+#
+
+--source include/galera_cluster.inc
+--source include/big_test.inc
+
+--let $node_1=node_1
+--let $node_2=node_2
+--let $node_3=node_3
+--let $node_4=node_4
+--source include/auto_increment_offset_save.inc
+
+# Isolate node #3
+--connection node_3
+SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 1';
+
+# Wait for node #3 to leave cluster
+--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
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(10)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1, 'A');
+
+# Introduce inconsistency on node #4
+--connection node_4
+SET SESSION wsrep_on=OFF;
+INSERT INTO t1 VALUES (2, 'B');
+SET SESSION wsrep_on=ON;
+DELETE FROM t1 WHERE f1 = 2;
+
+# Wait for node #4 to be voted out
+--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
+
+# Rejoin node #3
+--connection node_3
+--source include/wsrep_wait_disconnect.inc
+SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 0';
+--source include/galera_wait_ready.inc
+
+--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
+--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+--source include/wait_condition.inc
+
+# Confirm that all is good
+--connection node_3
+SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'A';
+SELECT COUNT(*) = 0 FROM t1 WHERE f2 = 'B';
+
+# Rejoin node #4
+--connection node_4
+SET SESSION wsrep_on=OFF;
+--source include/kill_galera.inc
+--sleep 1
+--echo Starting mysqld
+--source include/start_mysqld.inc
+
+# Confirm node #4 has rejoined
+--connection node_1
+--let $wait_condition = SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+--source include/wait_condition.inc
+
+# Confirm that all is good and all nodes have identical data
+
+--connection node_1
+SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'A';
+SELECT COUNT(*) = 0 FROM t1 WHERE f2 = 'B';
+CALL mtr.add_suppression("mariadbd: Can't find record in 't1'");
+CALL mtr.add_suppression("Slave SQL: Could not execute Delete_rows");
+CALL mtr.add_suppression("WSREP: Event 3 Delete_rows_v1 apply failed: 120, seqno [0-9]*");
+
+--connection node_2
+SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'A';
+SELECT COUNT(*) = 0 FROM t1 WHERE f2 = 'B';
+CALL mtr.add_suppression("mariadbd: Can't find record in 't1'");
+CALL mtr.add_suppression("Slave SQL: Could not execute Delete_rows");
+CALL mtr.add_suppression("WSREP: Event 3 Delete_rows_v1 apply failed: 120, seqno [0-9]*");
+
+--connection node_3
+SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'A';
+SELECT COUNT(*) = 0 FROM t1 WHERE f2 = 'B';
+
+--connection node_4
+--source include/galera_wait_ready.inc
+SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'A';
+SELECT COUNT(*) = 0 FROM t1 WHERE f2 = 'B';
+CALL mtr.add_suppression("inconsistent with group");
+
+DROP TABLE t1;
+
+--source include/auto_increment_offset_restore.inc
diff --git a/mysql-test/suite/galera/t/wsrep_strict_ddl.test b/mysql-test/suite/galera/t/wsrep_strict_ddl.test
new file mode 100644
index 00000000000..c0a0cd756ba
--- /dev/null
+++ b/mysql-test/suite/galera/t/wsrep_strict_ddl.test
@@ -0,0 +1,133 @@
+--source include/galera_cluster.inc
+
+call mtr.add_suppression("WSREP: ALTER TABLE isolation failure");
+
+--connection node_1
+SET GLOBAL binlog_format='ROW';
+create table before_t1(a int, count int, b int, key(b)) engine=Aria;
+INSERT INTO before_t1 values (1,1,1);
+
+set @@global.wsrep_strict_ddl=ON;
+select @@global.wsrep_strict_ddl;
+
+--connection node_2
+set @@global.wsrep_strict_ddl=ON;
+select @@global.wsrep_strict_ddl;
+
+--connection node_1
+--error ER_GALERA_REPLICATION_NOT_SUPPORTED
+CREATE TABLE t1(a int) engine=Aria;
+SHOW WARNINGS;
+
+--connection node_2
+--error ER_NO_SUCH_TABLE
+SHOW CREATE TABLE t1;
+
+--connection node_1
+CREATE TABLE t2(a int not null primary key) engine=InnoDB;
+
+--error ER_GALERA_REPLICATION_NOT_SUPPORTED
+ALTER TABLE t2 engine=MyISAM;
+SHOW WARNINGS;
+SHOW CREATE TABLE t2;
+
+--connection node_2
+SHOW CREATE TABLE t2;
+
+--connection node_1
+--error ER_GALERA_REPLICATION_NOT_SUPPORTED
+TRUNCATE TABLE before_t1;
+SELECT * FROM before_t1;
+
+--connection node_2
+SET SESSION wsrep_sync_wait=15;
+SELECT @@wsrep_sync_wait;
+SELECT * FROM before_t1;
+
+--connection node_1
+--error ER_GALERA_REPLICATION_NOT_SUPPORTED
+CREATE VIEW x1 AS SELECT * FROM before_t1;
+--error ER_NO_SUCH_TABLE
+SHOW CREATE VIEW x1;
+
+--connection node_2
+--error ER_NO_SUCH_TABLE
+SHOW CREATE VIEW x1;
+
+--connection node_1
+--error ER_GALERA_REPLICATION_NOT_SUPPORTED
+CREATE DEFINER=`root`@`localhost` TRIGGER increment_before_t1
+ AFTER INSERT ON before_t1 FOR EACH ROW
+ UPDATE before_t1 SET before_t1.count = before_t1.count+1;
+
+--error ER_TRG_DOES_NOT_EXIST
+SHOW CREATE TRIGGER increment_before_t1;
+
+--connection node_2
+
+--error ER_TRG_DOES_NOT_EXIST
+SHOW CREATE TRIGGER increment_before_t1;
+
+--connection node_1
+--error ER_GALERA_REPLICATION_NOT_SUPPORTED
+CREATE INDEX xx2 ON before_t1(a);
+SHOW CREATE TABLE before_t1;
+
+--connection node_2
+SHOW CREATE TABLE before_t1;
+
+--connection node_1
+--error ER_GALERA_REPLICATION_NOT_SUPPORTED
+DROP INDEX b ON before_t1;
+SHOW CREATE TABLE before_t1;
+
+--connection node_2
+SHOW CREATE TABLE before_t1;
+
+--connection node_1
+--error ER_GALERA_REPLICATION_NOT_SUPPORTED
+ALTER TABLE before_t1 ADD COLUMN f int;
+SHOW CREATE TABLE before_t1;
+
+--connection node_2
+SHOW CREATE TABLE before_t1;
+
+--connection node_1
+--error ER_GALERA_REPLICATION_NOT_SUPPORTED
+RENAME TABLE before_t1 to after_t1;
+SHOW CREATE TABLE before_t1;
+--error ER_NO_SUCH_TABLE
+SHOW CREATE TABLE after_t1;
+
+--connection node_2
+SHOW CREATE TABLE before_t1;
+--error ER_NO_SUCH_TABLE
+SHOW CREATE TABLE after_t1;
+
+--connection node_1
+--error ER_GALERA_REPLICATION_NOT_SUPPORTED
+DROP TABLE before_t1;
+
+SHOW CREATE TABLE before_t1;
+
+--connection node_2
+SHOW CREATE TABLE before_t1;
+
+#
+# PROCEDURE, EVENT, FUNCTION
+# Unfortunately accessed tables are opened only
+# in SP execution so no hope at CREATE
+
+#
+# USER, ROLE, SERVER, DATABASE not really storage engine objects
+#
+
+--connection node_1
+set @@global.wsrep_strict_ddl=OFF;
+select @@global.wsrep_strict_ddl;
+
+--connectIon node_2
+set @@global.wsrep_strict_ddl=OFF;
+select @@global.wsrep_strict_ddl;
+DROP TABLE t2;
+DROP TABLE before_t1;
diff --git a/mysql-test/suite/galera_3nodes/disabled.def b/mysql-test/suite/galera_3nodes/disabled.def
index 9100db4d441..b58ae8332d6 100644
--- a/mysql-test/suite/galera_3nodes/disabled.def
+++ b/mysql-test/suite/galera_3nodes/disabled.def
@@ -18,3 +18,4 @@ galera_load_data_ist : MDEV-24639 galera_3nodes.galera_load_data_ist MTR failed
galera_safe_to_bootstrap : MDEV-24097 galera_3nodes.galera_safe_to_bootstrap MTR sporadaically fails: Failed to start mysqld or mysql_shutdown failed
galera_slave_options_do : MDEV-8798
galera_slave_options_ignore : MDEV-8798
+galera_vote_rejoin_mysqldump : MDEV-24481: galera_3nodes.galera_vote_rejoin_mysqldump MTR failed: mysql_shutdown failed
diff --git a/mysql-test/suite/galera_3nodes/r/GCF-354.result b/mysql-test/suite/galera_3nodes/r/GCF-354.result
new file mode 100644
index 00000000000..958c1d06538
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes/r/GCF-354.result
@@ -0,0 +1,57 @@
+connection node_2;
+connection node_1;
+connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
+connection node_3;
+connection node_1;
+connection node_2;
+connection node_3;
+connection node_2;
+SET SESSION wsrep_on=OFF;
+DROP SCHEMA test;
+connection node_3;
+SET SESSION wsrep_on=OFF;
+CREATE TABLE test.t1 (f1 INTEGER NOT NULL PRIMARY KEY) engine=innodb;
+connection node_1;
+CREATE TABLE test.t1 (f1 INTEGER NOT NULL PRIMARY KEY) engine=innodb;
+INSERT INTO test.t1 values (1);
+SHOW STATUS LIKE 'wsrep_cluster_status';
+Variable_name Value
+wsrep_cluster_status Primary
+DROP TABLE test.t1;
+connection node_2;
+SET SESSION wsrep_sync_wait=0;
+SHOW STATUS LIKE 'wsrep_cluster_status';
+Variable_name Value
+wsrep_cluster_status Disconnected
+disconnect node_2;
+connect node_2, 127.0.0.1, root, , mysql, $NODE_MYPORT_2;
+Killing server ...
+connection node_2;
+Starting node_2
+# restart
+connection node_3;
+SET SESSION wsrep_sync_wait=0;
+SHOW STATUS LIKE 'wsrep_cluster_status';
+Variable_name Value
+wsrep_cluster_status Disconnected
+disconnect node_3;
+connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
+Killing server ...
+connection node_3;
+Starting node_3
+# restart
+connection node_1;
+Nodes 2 and 3 started
+connection node_2;
+USE test;
+Node 2 synced
+CALL mtr.add_suppression("Slave SQL: Error 'Unknown database 'test'' on query. Default database: 'test'. Query: 'CREATE TABLE test.t1 \\\(f1 INTEGER\\\)', Error_code: 1049");
+CALL mtr.add_suppression("Query apply failed");
+CALL mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on .*");
+CALL mtr.add_suppression("Plugin 'InnoDB' will be forced to shutdown");
+connection node_3;
+Node 3 synced
+CALL mtr.add_suppression("Slave SQL: Error 'Table 't1' already exists' on query. Default database: 'test'. Query: 'CREATE TABLE test.t1 \\\(f1 INTEGER\\\)', Error_code: 1050");
+CALL mtr.add_suppression("Query apply failed");
+CALL mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on .*");
+CALL mtr.add_suppression("Plugin 'InnoDB' will be forced to shutdown");
diff --git a/mysql-test/suite/galera_3nodes/r/GCF-363.result b/mysql-test/suite/galera_3nodes/r/GCF-363.result
new file mode 100644
index 00000000000..afab5012ee5
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes/r/GCF-363.result
@@ -0,0 +1,46 @@
+connection node_2;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1)) ENGINE=InnoDB;
+connection node_1;
+SET GLOBAL wsrep_on=OFF;
+INSERT INTO t1 VALUES (1, 'a');
+SET GLOBAL wsrep_on=ON;
+connection node_2;
+SET GLOBAL wsrep_on=OFF;
+INSERT INTO t1 VALUES (1, 'a');
+SET GLOBAL wsrep_on=ON;
+connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
+connection node_3;
+INSERT INTO t1 VALUES (1, 'b');
+SET SESSION wsrep_sync_wait = 0;
+SHOW STATUS LIKE 'wsrep_cluster_status';
+Variable_name Value
+wsrep_cluster_status Disconnected
+connection node_1;
+connection node_3;
+SET SESSION wsrep_on=OFF;
+# restart
+SET SESSION wsrep_on=ON;
+connection node_1;
+SELECT * FROM t1;
+f1 f2
+1 a
+connection node_2;
+SELECT * FROM t1;
+f1 f2
+1 a
+connection node_3;
+SELECT * FROM t1;
+f1 f2
+1 a
+DROP TABLE t1;
+connection node_1;
+CALL mtr.add_suppression("Slave SQL: Could not execute Write_rows event on table test.t1; Duplicate entry '1' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log FIRST, end_log_pos 155, Error_code: 1062");
+CALL mtr.add_suppression("WSREP: Event 3 Write_rows_v1 apply failed: 121, seqno ");
+connection node_2;
+CALL mtr.add_suppression("Slave SQL: Could not execute Write_rows event on table test.t1; Duplicate entry '1' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log FIRST, end_log_pos 155, Error_code: 1062");
+CALL mtr.add_suppression("WSREP: Event 3 Write_rows_v1 apply failed: 121, seqno ");
+connection node_3;
+CALL mtr.add_suppression("WSREP: Vote 0 \\\(success\\\) on (.*) is inconsistent with group. Leaving cluster.");
+CALL mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on ");
+CALL mtr.add_suppression("Plugin 'InnoDB' will be forced to shutdown");
diff --git a/mysql-test/suite/galera_3nodes/r/GCF-376.result b/mysql-test/suite/galera_3nodes/r/GCF-376.result
new file mode 100644
index 00000000000..71705d2c35e
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes/r/GCF-376.result
@@ -0,0 +1,72 @@
+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 test.t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1)) ENGINE=InnoDB;
+connection node_2;
+SET GLOBAL wsrep_on=OFF;
+INSERT INTO t1 VALUES (1, 'a');
+SET GLOBAL wsrep_on=ON;
+LOCK TABLE t1 WRITE;
+connection node_1;
+INSERT INTO t1 VALUES (1, 'b');
+SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1';
+SET SESSION wsrep_sync_wait=0;
+connection node_3;
+connection node_2;
+UNLOCK TABLES;
+SET SESSION wsrep_on = ON;
+SET SESSION wsrep_sync_wait = 15;
+connection node_1;
+SHOW STATUS LIKE 'wsrep_cluster_status';
+Variable_name Value
+wsrep_cluster_status non-Primary
+connection node_2;
+SET SESSION wsrep_sync_wait=0;
+SHOW STATUS LIKE 'wsrep_cluster_status';
+Variable_name Value
+wsrep_cluster_status Disconnected
+SHOW STATUS LIKE 'wsrep_cluster_size';
+Variable_name Value
+wsrep_cluster_size 0
+SET GLOBAL wsrep_on=OFF;
+SELECT * FROM t1;
+f1 f2
+1 a
+connection node_3;
+SET SESSION wsrep_sync_wait=0;
+SHOW STATUS LIKE 'wsrep_cluster_status';
+Variable_name Value
+wsrep_cluster_status Primary
+SHOW STATUS LIKE 'wsrep_cluster_size';
+Variable_name Value
+wsrep_cluster_size 1
+SELECT * FROM t1;
+f1 f2
+1 b
+connection node_1;
+SET GLOBAL wsrep_provider_options = 'gmcast.isolate=0';
+connection node_2;
+# restart
+connection node_1;
+SELECT * FROM t1;
+f1 f2
+1 b
+connection node_2;
+SELECT * FROM t1;
+f1 f2
+1 b
+connection node_3;
+SELECT * FROM t1;
+f1 f2
+1 b
+DROP TABLE t1;
+connection node_2;
+CALL mtr.add_suppression("Slave SQL: Could not execute Write_rows event on table test.t1; Duplicate entry '1' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log FIRST, end_log_pos (.*), Error_code: 1062");
+CALL mtr.add_suppression("WSREP: Event (.*) Write_rows_v1 apply failed: 121, seqno ");
+CALL mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on (.*)");
+CALL mtr.add_suppression("Plugin 'InnoDB' will be forced to shutdown");
+CALL mtr.add_suppression("WSREP: Failed to apply write set: ");
diff --git a/mysql-test/suite/galera_3nodes/r/galera-features#119.result b/mysql-test/suite/galera_3nodes/r/galera-features#119.result
new file mode 100644
index 00000000000..aa49e4e5284
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes/r/galera-features#119.result
@@ -0,0 +1,32 @@
+connection node_2;
+connection node_1;
+connection node_1;
+connection node_2;
+connection node_3;
+CREATE TABLE test.t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+connection node_2;
+SET wsrep_on=OFF;
+INSERT INTO t1 VALUES (1);
+LOCK TABLE t1 WRITE;
+SET GLOBAL wsrep_sync_wait=0;
+connection node_1;
+INSERT INTO t1 VALUES (1);
+SET GLOBAL wsrep_sync_wait=0;
+SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1';
+connection node_3;
+connection node_2;
+UNLOCK TABLES;
+connection node_3;
+connection node_1;
+SET GLOBAL wsrep_provider_options = 'gmcast.isolate=0';
+SET GLOBAL wsrep_sync_wait=15;
+DROP TABLE test.t1;
+connection node_2;
+Killing server ...
+# restart
+connection node_2;
+CALL mtr.add_suppression("Inconsistent by consensus.");
+CALL mtr.add_suppression("Slave SQL: Could not execute Write_rows event on table test.t1; Duplicate entry '1' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log FIRST");
+CALL mtr.add_suppression("WSREP: Event 3 Write_rows_v1 apply failed: 121, seqno");
+CALL mtr.add_suppression("WSREP: Node consistency compromized, leaving cluster...");
+CALL mtr.add_suppression("WSREP: Failed to apply write set: ");
diff --git a/mysql-test/suite/galera_3nodes/r/galera_evs_suspect_timeout.result b/mysql-test/suite/galera_3nodes/r/galera_evs_suspect_timeout.result
index b1332a5f87c..1910106c646 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
@@ -8,6 +8,7 @@ SET GLOBAL wsrep_provider_options = 'evs.inactive_timeout=PT100M; evs.suspect_ti
connection node_2;
SET GLOBAL wsrep_provider_options = 'evs.inactive_timeout=PT100M; evs.suspect_timeout=PT1S';
connection node_3;
+connection node_3;
Suspending node ...
connection node_1;
SET SESSION wsrep_sync_wait=0;
diff --git a/mysql-test/suite/galera_3nodes/r/galera_gtid_2_cluster.result b/mysql-test/suite/galera_3nodes/r/galera_gtid_2_cluster.result
index afb94d493c4..7d4751e79af 100644
--- a/mysql-test/suite/galera_3nodes/r/galera_gtid_2_cluster.result
+++ b/mysql-test/suite/galera_3nodes/r/galera_gtid_2_cluster.result
@@ -92,7 +92,7 @@ select @@gtid_binlog_state;
insert into t1 values (1, 12, 3);
select @@gtid_binlog_state;
@@gtid_binlog_state
-1-11-2,1-12-3,2-21-1
+1-11-3,2-21-1
#wait for sync cluster 1 and 2
connection node_1;
include/save_master_gtid.inc
@@ -102,11 +102,11 @@ cluster 1 node 3
connection node_3;
select @@gtid_binlog_state;
@@gtid_binlog_state
-1-11-2,1-12-3,2-21-1
+1-11-3,2-21-1
insert into t1 values (1, 13, 4);
select @@gtid_binlog_state;
@@gtid_binlog_state
-1-12-3,1-11-2,1-13-4,2-21-1
+1-11-4,2-21-1
#wait for sync cluster 1 and 2
connection node_1;
include/save_master_gtid.inc
@@ -116,11 +116,11 @@ cluster 2 node 2
connection node_5;
select @@gtid_binlog_state;
@@gtid_binlog_state
-1-12-3,1-11-2,1-13-4,2-21-1
+1-11-4,2-21-1
insert into t1 values (2, 22, 2);
select @@gtid_binlog_state;
@@gtid_binlog_state
-1-12-3,1-11-2,1-13-4,2-21-1,2-22-2
+1-11-4,2-21-2
#wait for sync cluster 2 and 1
connection node_4;
include/save_master_gtid.inc
@@ -130,11 +130,11 @@ cluster 2 node 3
connection node_6;
select @@gtid_binlog_state;
@@gtid_binlog_state
-1-12-3,1-11-2,1-13-4,2-21-1,2-22-2
+1-11-4,2-21-2
insert into t1 values (2, 23, 3);
select @@gtid_binlog_state;
@@gtid_binlog_state
-1-12-3,1-11-2,1-13-4,2-21-1,2-22-2,2-23-3
+1-11-4,2-21-3
#wait for sync cluster 2 and 1
connection node_4;
include/save_master_gtid.inc
@@ -144,7 +144,7 @@ cluster 1 node 1
connection node_1;
select @@gtid_binlog_state;
@@gtid_binlog_state
-1-12-3,1-11-2,1-13-4,2-21-1,2-22-2,2-23-3
+1-11-4,2-21-3
drop table t1;
stop slave;
reset slave;
@@ -208,7 +208,7 @@ create table t1 (cluster_domain_id int ,node_server_id int, seq_no int);
insert into t1 values (1, 11, 2);
select @@gtid_binlog_state;
@@gtid_binlog_state
-1-11-2
+1-11-7
#wait for sync cluster 1 and 2
connection node_1;
include/save_master_gtid.inc
@@ -219,7 +219,7 @@ connection node_4;
insert into t1 values (2, 21, 1);
select @@gtid_binlog_state;
@@gtid_binlog_state
-1-11-2,2-21-1
+1-11-7,2-21-4
select * from t1;
cluster_domain_id node_server_id seq_no
1 11 2
@@ -233,11 +233,11 @@ cluster 1 node 2
connection node_2;
select @@gtid_binlog_state;
@@gtid_binlog_state
-1-11-2,2-21-1
+1-11-7,2-21-4
insert into t1 values (1, 12, 3);
select @@gtid_binlog_state;
@@gtid_binlog_state
-1-11-2,1-12-3,2-21-1
+1-11-8,2-21-4
#wait for sync cluster 1 and 2
connection node_1;
include/save_master_gtid.inc
@@ -247,11 +247,11 @@ cluster 1 node 3
connection node_3;
select @@gtid_binlog_state;
@@gtid_binlog_state
-1-11-2,1-12-3,2-21-1
+1-11-8,2-21-4
insert into t1 values (1, 13, 4);
select @@gtid_binlog_state;
@@gtid_binlog_state
-1-12-3,1-11-2,1-13-4,2-21-1
+1-11-9,2-21-4
#wait for sync cluster 1 and 2
connection node_1;
include/save_master_gtid.inc
@@ -261,11 +261,11 @@ cluster 2 node 2
connection node_5;
select @@gtid_binlog_state;
@@gtid_binlog_state
-1-12-3,1-11-2,1-13-4,2-21-1
+1-11-9,2-21-4
insert into t1 values (2, 22, 2);
select @@gtid_binlog_state;
@@gtid_binlog_state
-1-12-3,1-11-2,1-13-4,2-21-1,2-22-2
+1-11-9,2-21-5
#wait for sync cluster 2 and 1
connection node_4;
include/save_master_gtid.inc
@@ -275,11 +275,11 @@ cluster 2 node 3
connection node_6;
select @@gtid_binlog_state;
@@gtid_binlog_state
-1-12-3,1-11-2,1-13-4,2-21-1,2-22-2
+1-11-9,2-21-5
insert into t1 values (2, 23, 3);
select @@gtid_binlog_state;
@@gtid_binlog_state
-1-12-3,1-11-2,1-13-4,2-21-1,2-22-2,2-23-3
+1-11-9,2-21-6
#wait for sync cluster 2 and 1
connection node_4;
include/save_master_gtid.inc
@@ -289,7 +289,7 @@ cluster 1 node 1
connection node_1;
select @@gtid_binlog_state;
@@gtid_binlog_state
-1-12-3,1-11-2,1-13-4,2-21-1,2-22-2,2-23-3
+1-11-9,2-21-6
drop table t1;
stop slave;
change master to master_use_gtid=no, ignore_server_ids=();
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 94ead54dfe0..6d8c7a51b1f 100644
--- a/mysql-test/suite/galera_3nodes/r/galera_pc_weight.result
+++ b/mysql-test/suite/galera_3nodes/r/galera_pc_weight.result
@@ -5,9 +5,9 @@ SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_N
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
+SELECT VARIABLE_VALUE AS expect_5 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight';
+expect_5
+5
SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1';
connection node_2;
SET SESSION wsrep_sync_wait=0;
@@ -60,108 +60,106 @@ 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
-SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_connected';
-VARIABLE_VALUE = 'ON'
-1
-SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready';
-VARIABLE_VALUE = 'ON'
-1
-SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state';
-VARIABLE_VALUE = 4
-1
-SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
-VARIABLE_VALUE = 'Synced'
-1
+SELECT VARIABLE_VALUE AS expect_3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight';
+expect_3
+3
+SELECT VARIABLE_VALUE AS expect_Primary FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
+expect_Primary
+Primary
+SELECT VARIABLE_VALUE AS expect_ON FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_connected';
+expect_ON
+ON
+SELECT VARIABLE_VALUE AS expect_ON FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready';
+expect_ON
+ON
+SELECT VARIABLE_VALUE AS expect_4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state';
+expect_4
+4
+SELECT VARIABLE_VALUE AS expect_Synced FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
+expect_Synced
+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
+SELECT VARIABLE_VALUE AS expect_1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight';
+expect_1
1
connection node_1;
SET GLOBAL wsrep_provider_options = 'gmcast.isolate=0';
connection node_2;
connection node_3;
-connection node_1;
connection node_2;
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
-SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_connected';
-VARIABLE_VALUE = 'ON'
-1
-SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready';
-VARIABLE_VALUE = 'ON'
-1
-SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state';
-VARIABLE_VALUE = 4
-1
-SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
-VARIABLE_VALUE = 'Synced'
-1
+SELECT VARIABLE_VALUE AS expect_3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+expect_3
+3
+SELECT VARIABLE_VALUE AS expect_3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight';
+expect_3
+3
+SELECT VARIABLE_VALUE AS expect_Primary FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
+expect_Primary
+Primary
+SELECT VARIABLE_VALUE AS expect_ON FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_connected';
+expect_ON
+ON
+SELECT VARIABLE_VALUE AS expect_ON FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready';
+expect_ON
+ON
+SELECT VARIABLE_VALUE AS expect_4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state';
+expect_4
+4
+SELECT VARIABLE_VALUE AS expect_Synced FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
+expect_Synced
+Synced
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
-SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_connected';
-VARIABLE_VALUE = 'ON'
-1
-SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready';
-VARIABLE_VALUE = 'ON'
-1
-SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state';
-VARIABLE_VALUE = 4
-1
-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
-SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_connected';
-VARIABLE_VALUE = 'ON'
-1
-SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready';
-VARIABLE_VALUE = 'ON'
-1
-SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state';
-VARIABLE_VALUE = 4
-1
-SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
-VARIABLE_VALUE = 'Synced'
-1
+SELECT VARIABLE_VALUE AS expect_3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+expect_3
+3
+SELECT VARIABLE_VALUE AS expect_3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight';
+expect_3
+3
+SELECT VARIABLE_VALUE AS expect_Primary FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
+expect_Primary
+Primary
+SELECT VARIABLE_VALUE AS expect_ON FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_connected';
+expect_ON
+ON
+SELECT VARIABLE_VALUE AS expect_ON FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready';
+expect_ON
+ON
+SELECT VARIABLE_VALUE AS expect_4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state';
+expect_4
+4
+SELECT VARIABLE_VALUE AS expect_Synced FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
+expect_Synced
+Synced
connection node_1;
+SELECT VARIABLE_VALUE AS expect_3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+expect_3
+3
+SELECT VARIABLE_VALUE AS expect_3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight';
+expect_3
+3
+SELECT VARIABLE_VALUE AS expect_Primary FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
+expect_Primary
+Primary
+SELECT VARIABLE_VALUE AS expect_ON FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_connected';
+expect_ON
+ON
+SELECT VARIABLE_VALUE AS expect_ON FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready';
+expect_ON
+ON
+SELECT VARIABLE_VALUE AS expect_4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state';
+expect_4
+4
+SELECT VARIABLE_VALUE AS expect_Synced FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
+expect_Synced
+Synced
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)');
+CALL mtr.add_suppression('overriding reported weight for');
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)');
diff --git a/mysql-test/suite/galera_3nodes/r/galera_toi_vote.result b/mysql-test/suite/galera_3nodes/r/galera_toi_vote.result
new file mode 100644
index 00000000000..13caead79d3
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes/r/galera_toi_vote.result
@@ -0,0 +1,22 @@
+connection node_2;
+connection node_1;
+connection node_1;
+connection node_2;
+connection node_3;
+connection node_3;
+SET SESSION wsrep_on=OFF;
+DROP SCHEMA test;
+connection node_1;
+CREATE SCHEMA test;
+ERROR HY000: Can't create database 'test'; database exists
+connection node_1;
+SET SESSION wsrep_sync_wait=0;
+connection node_2;
+SET SESSION wsrep_sync_wait=0;
+connection node_3;
+SET SESSION wsrep_sync_wait=0;
+disconnect node_3;
+connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
+Killing server ...
+# restart
+CALL mtr.add_suppression("WSREP: Vote 0 \\\(success\\\) on (.*) is inconsistent with group. Leaving cluster.");
diff --git a/mysql-test/suite/galera_3nodes/r/galera_vote_rejoin_mysqldump.result b/mysql-test/suite/galera_3nodes/r/galera_vote_rejoin_mysqldump.result
new file mode 100644
index 00000000000..d43f31d4c87
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes/r/galera_vote_rejoin_mysqldump.result
@@ -0,0 +1,83 @@
+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';
+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;
+connection node_2;
+SET SESSION wsrep_on=OFF;
+ALTER TABLE t1 ADD PRIMARY KEY (f1);
+SET SESSION wsrep_on=ON;
+connection node_1;
+ALTER TABLE t1 LOCK=SHARED, DROP PRIMARY KEY;
+ERROR 42000: Can't DROP INDEX `PRIMARY`; check that it exists
+connection node_1;
+SELECT VARIABLE_VALUE AS expect_Primary FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
+expect_Primary
+Primary
+connection node_3;
+SELECT VARIABLE_VALUE AS expect_2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+expect_2
+2
+SELECT VARIABLE_VALUE AS expect_Primary FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
+expect_Primary
+Primary
+connection node_2;
+SET SESSION wsrep_on=OFF;
+SELECT VARIABLE_VALUE AS expect_Disconnected FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
+expect_Disconnected
+Disconnected
+SET SESSION wsrep_on=ON;
+SELECT VARIABLE_VALUE AS expect_Primary FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
+expect_Primary
+Primary
+connection node_1;
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `f1` int(11) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+connection node_2;
+SET SESSION wsrep_on=OFF;
+SET SESSION wsrep_on=ON;
+# restart
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `f1` int(11) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SELECT COUNT(*) AS expect_0 FROM t1;
+expect_0
+0
+CALL mtr.add_suppression("is inconsistent with group");
+connection node_3;
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `f1` int(11) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+DROP TABLE t1;
+CALL mtr.add_suppression("Slave SQL: Error 'Can't DROP 'PRIMARY'; check that column/key exists'");
+connection node_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("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_3nodes/r/inconsistency_shutdown.result b/mysql-test/suite/galera_3nodes/r/inconsistency_shutdown.result
new file mode 100644
index 00000000000..83c5b015a50
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes/r/inconsistency_shutdown.result
@@ -0,0 +1,142 @@
+connection node_3;
+connection node_2;
+connection node_1;
+connection node_1;
+connection node_2;
+connection node_3;
+connection node_2;
+SELECT @@wsrep_slave_threads = 8;
+@@wsrep_slave_threads = 8
+1
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 INT);
+INSERT INTO t1 VALUES (1, 0),(2, 0),(3, 0),(4, 0),(5, 0),(6, 0),(7, 0),(8, 0);
+connection node_2;
+SET GLOBAL wsrep_provider_options='gcs.fc_limit=1K';
+SET wsrep_on=OFF;
+DELETE FROM t1 WHERE f1 = 2;
+DELETE FROM t1 WHERE f1 = 4;
+SET wsrep_on=ON;
+LOCK TABLES t1 WRITE;
+connection node_1;
+UPDATE t1 SET f2 = 1 WHERE f1 = 1;
+UPDATE t1 SET f2 = 1 WHERE f1 = 2;
+UPDATE t1 SET f2 = 1 WHERE f1 = 3;
+UPDATE t1 SET f2 = 1 WHERE f1 = 4;
+UPDATE t1 SET f2 = 2 WHERE f1 = 4;
+/* dependent applier */
+UPDATE t1 SET f2 = 3 WHERE f1 = 4;
+/* dependent applier */
+UPDATE t1 SET f2 = 1 WHERE f1 = 5;
+UPDATE t1 SET f2 = 1 WHERE f1 = 6;
+UPDATE t1 SET f2 = 1 WHERE f1 = 7;
+UPDATE t1 SET f2 = 1 WHERE f1 = 8;
+connection node_2;
+SET wsrep_on=OFF;
+SET wsrep_on=ON;
+UNLOCK TABLES;
+SET SESSION wsrep_on = ON;
+SET SESSION wsrep_sync_wait = 15;
+SET SESSION wsrep_on = ON;
+SET SESSION wsrep_sync_wait = 15;
+connection node_1;
+SET SESSION wsrep_on = ON;
+SET SESSION wsrep_sync_wait = 15;
+SHOW STATUS LIKE 'wsrep_cluster_size';
+Variable_name Value
+wsrep_cluster_size 2
+SELECT * FROM t1;
+f1 f2
+1 1
+2 1
+3 1
+4 3
+5 1
+6 1
+7 1
+8 1
+connection node_2;
+SET GLOBAL wsrep_on=OFF;
+# restart
+DROP TABLE t1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 INT);
+START TRANSACTION;
+INSERT INTO t1 VALUES (1, 0);
+INSERT INTO t1 VALUES (2, 0);
+INSERT INTO t1 VALUES (3, 0);
+INSERT INTO t1 VALUES (4, 0);
+INSERT INTO t1 VALUES (5, 0);
+INSERT INTO t1 VALUES (6, 0);
+INSERT INTO t1 VALUES (7, 0);
+INSERT INTO t1 VALUES (8, 0);
+COMMIT;
+CREATE TABLE t2 (f1 INTEGER PRIMARY KEY, f2 INT);
+connection node_2;
+SET GLOBAL wsrep_provider_options='gcs.fc_limit=1K';
+SET wsrep_on=OFF;
+DROP TABLE t2;
+SET wsrep_on=ON;
+SET GLOBAL wsrep_provider_options = 'dbug=d,after_replicate_sync';
+LOCK TABLES t1 READ;
+connection node_1;
+UPDATE t1 SET f2 = 1 WHERE f1 = 1;
+UPDATE t1 SET f2 = 1 WHERE f1 = 2;
+UPDATE t1 SET f2 = 1 WHERE f1 = 3;
+UPDATE t1 SET f2 = 1 WHERE f1 = 4;
+UPDATE t1 SET f2 = 2 WHERE f1 = 4;
+/* dependent applier */;
+connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
+connection node_2a;
+DROP TABLE t2;;
+connection node_2;
+SET wsrep_on=OFF;
+"Wait for DROP TABLE to replicate"
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 0;
+SET GLOBAL wsrep_provider_options = 'signal=after_replicate_sync';
+SET GLOBAL wsrep_provider_options = 'dbug=';
+"DROP TABLE replicated"
+SET wsrep_on=ON;
+connection node_1;
+UPDATE t1 SET f2 = 3 WHERE f1 = 4;
+/* dependent applier */
+UPDATE t1 SET f2 = 1 WHERE f1 = 5;
+UPDATE t1 SET f2 = 1 WHERE f1 = 6;
+UPDATE t1 SET f2 = 1 WHERE f1 = 7;
+UPDATE t1 SET f2 = 1 WHERE f1 = 8;
+connection node_2;
+SET wsrep_on=OFF;
+SET wsrep_on=ON;
+UNLOCK TABLES;
+connection node_2a;
+ERROR 42S02: Unknown table 'test.t2'
+connection node_1;
+SET SESSION wsrep_on = ON;
+SET SESSION wsrep_sync_wait = 15;
+SHOW STATUS LIKE 'wsrep_cluster_size';
+Variable_name Value
+wsrep_cluster_size 2
+SELECT * FROM t1;
+f1 f2
+1 1
+2 1
+3 1
+4 3
+5 1
+6 1
+7 1
+8 1
+connection node_2;
+SET SESSION wsrep_on = ON;
+SET SESSION wsrep_sync_wait = 15;
+SET SESSION wsrep_on = ON;
+SET SESSION wsrep_sync_wait = 15;
+SET GLOBAL wsrep_on=OFF;
+# restart
+DROP TABLE t1;
+CALL mtr.add_suppression('Can\'t find record in \'t1\'');
+CALL mtr.add_suppression('Update_rows_v1 apply failed');
+CALL mtr.add_suppression('Inconsistency detected: Inconsistent by consensus on');
+CALL mtr.add_suppression('last left .* greater than drain seqno');
+CALL mtr.add_suppression('WSREP: Failed to apply write set:');
diff --git a/mysql-test/suite/galera_3nodes/t/GCF-354.cnf b/mysql-test/suite/galera_3nodes/t/GCF-354.cnf
new file mode 100644
index 00000000000..252b4b613c7
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes/t/GCF-354.cnf
@@ -0,0 +1,5 @@
+!include ../galera_3nodes.cnf
+
+[mysqld]
+wsrep-ignore-apply-errors=0
+wsrep_sync_wait=0 \ No newline at end of file
diff --git a/mysql-test/suite/galera_3nodes/t/GCF-354.test b/mysql-test/suite/galera_3nodes/t/GCF-354.test
new file mode 100644
index 00000000000..ce0fd445f23
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes/t/GCF-354.test
@@ -0,0 +1,104 @@
+--source include/galera_cluster.inc
+--source include/force_restart.inc
+
+--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
+--connection node_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
+
+#
+# 1. Create different inconsistencies on nodes 2 and 3
+#
+--connection node_2
+SET SESSION wsrep_on=OFF;
+DROP SCHEMA test;
+
+--connection node_3
+SET SESSION wsrep_on=OFF;
+CREATE TABLE test.t1 (f1 INTEGER NOT NULL PRIMARY KEY) engine=innodb;
+#
+# 2. The following should generate different errors on nodes 2 and 3 and
+# trigger voting with 3 different votes. node_1 should remain alone
+# in the cluster.
+#
+--connection node_1
+CREATE TABLE test.t1 (f1 INTEGER NOT NULL PRIMARY KEY) engine=innodb;
+INSERT INTO test.t1 values (1);
+
+--let $wait_condition = SELECT VARIABLE_VALUE = 1 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
+SHOW STATUS LIKE 'wsrep_cluster_status';
+
+# Test cleanup
+DROP TABLE test.t1;
+#
+# 3. Wait for nodes 2 and 3 to drop out of the cluster and restart them to
+# recover the initial configuration.
+#
+--connection node_2
+SET SESSION wsrep_sync_wait=0;
+--let $wait_condition = SELECT VARIABLE_VALUE = 'OFF' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready'
+--source include/wait_condition.inc
+SHOW STATUS LIKE 'wsrep_cluster_status';
+
+# need to reinitialize connection due to a "Bad handshake" bug
+--disconnect node_2
+--connect node_2, 127.0.0.1, root, , mysql, $NODE_MYPORT_2
+
+--source include/kill_galera.inc
+
+--connection node_2
+--source include/wait_until_disconnected.inc
+--echo Starting node_2
+--source include/start_mysqld.inc
+
+--connection node_3
+SET SESSION wsrep_sync_wait=0;
+--let $wait_condition = SELECT VARIABLE_VALUE = 'OFF' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready'
+--source include/wait_condition.inc
+SHOW STATUS LIKE 'wsrep_cluster_status';
+
+# need to reinitialize connection due to a "Bad handshake" bug
+--disconnect node_3
+--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
+
+--source include/kill_galera.inc
+
+--connection node_3
+--source include/wait_until_disconnected.inc
+--echo Starting node_3
+--source include/start_mysqld.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
+--echo Nodes 2 and 3 started
+
+--connection node_2
+# fix the default schema
+USE test;
+--let $wait_condition = SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready'
+--source include/wait_condition.inc
+--echo Node 2 synced
+CALL mtr.add_suppression("Slave SQL: Error 'Unknown database 'test'' on query. Default database: 'test'. Query: 'CREATE TABLE test.t1 \\\(f1 INTEGER\\\)', Error_code: 1049");
+CALL mtr.add_suppression("Query apply failed");
+CALL mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on .*");
+CALL mtr.add_suppression("Plugin 'InnoDB' will be forced to shutdown");
+
+--connection node_3
+--let $wait_condition = SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready'
+--source include/wait_condition.inc
+--echo Node 3 synced
+CALL mtr.add_suppression("Slave SQL: Error 'Table 't1' already exists' on query. Default database: 'test'. Query: 'CREATE TABLE test.t1 \\\(f1 INTEGER\\\)', Error_code: 1050");
+CALL mtr.add_suppression("Query apply failed");
+CALL mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on .*");
+CALL mtr.add_suppression("Plugin 'InnoDB' will be forced to shutdown");
+
+--source ../galera/include/auto_increment_offset_restore.inc
+
diff --git a/mysql-test/suite/galera_3nodes/t/GCF-363.cnf b/mysql-test/suite/galera_3nodes/t/GCF-363.cnf
new file mode 100644
index 00000000000..7b7770e3ad1
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes/t/GCF-363.cnf
@@ -0,0 +1,8 @@
+!include ../galera_3nodes.cnf
+
+[mysqld]
+wsrep-ignore-apply-errors=0
+
+# [mysqld.3]
+# wsrep-sst-method=mysqldump
+# wsrep_sst_receive_address=127.0.0.2:@mysqld.3.port
diff --git a/mysql-test/suite/galera_3nodes/t/GCF-363.test b/mysql-test/suite/galera_3nodes/t/GCF-363.test
new file mode 100644
index 00000000000..a65c42bcc5a
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes/t/GCF-363.test
@@ -0,0 +1,66 @@
+#
+# GCF-363 Inconsistency voting: If in a 3-node cluster the nodes with applier
+# error survive, the other node can not join properly
+#
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1)) ENGINE=InnoDB;
+
+--connection node_1
+SET GLOBAL wsrep_on=OFF;
+INSERT INTO t1 VALUES (1, 'a');
+SET GLOBAL wsrep_on=ON;
+
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE NAME LIKE 'test/t1';
+--source include/wait_condition.inc
+
+SET GLOBAL wsrep_on=OFF;
+INSERT INTO t1 VALUES (1, 'a');
+SET GLOBAL wsrep_on=ON;
+
+--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
+--connection node_3
+INSERT INTO t1 VALUES (1, 'b');
+SET SESSION wsrep_sync_wait = 0;
+--let $wait_condition = SELECT VARIABLE_VALUE = 'OFF' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready'
+--source include/wait_condition.inc
+SHOW STATUS LIKE 'wsrep_cluster_status';
+
+--connection node_1
+# Wait until node #3 leaves the cluster
+--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_3
+SET SESSION wsrep_on=OFF;
+--source include/restart_mysqld.inc
+--source include/wait_until_connected_again.inc
+SET SESSION wsrep_on=ON;
+
+--connection node_1
+SELECT * FROM t1;
+
+--connection node_2
+SELECT * FROM t1;
+
+--connection node_3
+SELECT * FROM t1;
+
+DROP TABLE t1;
+
+--connection node_1
+CALL mtr.add_suppression("Slave SQL: Could not execute Write_rows event on table test.t1; Duplicate entry '1' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log FIRST, end_log_pos 155, Error_code: 1062");
+CALL mtr.add_suppression("WSREP: Event 3 Write_rows_v1 apply failed: 121, seqno ");
+
+--connection node_2
+CALL mtr.add_suppression("Slave SQL: Could not execute Write_rows event on table test.t1; Duplicate entry '1' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log FIRST, end_log_pos 155, Error_code: 1062");
+CALL mtr.add_suppression("WSREP: Event 3 Write_rows_v1 apply failed: 121, seqno ");
+
+--connection node_3
+CALL mtr.add_suppression("WSREP: Vote 0 \\\(success\\\) on (.*) is inconsistent with group. Leaving cluster.");
+CALL mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on ");
+CALL mtr.add_suppression("Plugin 'InnoDB' will be forced to shutdown");
+
+
diff --git a/mysql-test/suite/galera_3nodes/t/GCF-376.cnf b/mysql-test/suite/galera_3nodes/t/GCF-376.cnf
new file mode 100644
index 00000000000..e255e1d527e
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes/t/GCF-376.cnf
@@ -0,0 +1,4 @@
+!include ../galera_3nodes.cnf
+
+[mysqld]
+wsrep-ignore-apply-errors=0
diff --git a/mysql-test/suite/galera_3nodes/t/GCF-376.test b/mysql-test/suite/galera_3nodes/t/GCF-376.test
new file mode 100644
index 00000000000..ff5bfbfb209
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes/t/GCF-376.test
@@ -0,0 +1,98 @@
+#
+# GCF-376: slaves become inconsistent if master goes non-prim during
+# inconsistency voting
+#
+--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 test.t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1)) ENGINE=InnoDB;
+
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
+--source include/wait_condition.inc
+
+SET GLOBAL wsrep_on=OFF;
+INSERT INTO t1 VALUES (1, 'a');
+SET GLOBAL wsrep_on=ON;
+
+LOCK TABLE t1 WRITE;
+
+--connection node_1
+INSERT INTO t1 VALUES (1, 'b');
+
+SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1';
+SET SESSION wsrep_sync_wait=0;
+
+# Wait until node #1 leaves the cluster
+--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
+
+--connection node_2
+UNLOCK TABLES;
+
+# Wait until node #2 leaves the cluster
+--source include/wsrep_wait_disconnect.inc
+
+--connection node_1
+SHOW STATUS LIKE 'wsrep_cluster_status';
+
+--connection node_2
+SET SESSION wsrep_sync_wait=0;
+SHOW STATUS LIKE 'wsrep_cluster_status';
+SHOW STATUS LIKE 'wsrep_cluster_size';
+SET GLOBAL wsrep_on=OFF;
+SELECT * FROM t1;
+
+--connection node_3
+SET SESSION wsrep_sync_wait=0;
+--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
+--source include/wait_condition.inc
+SHOW STATUS LIKE 'wsrep_cluster_status';
+SHOW STATUS LIKE 'wsrep_cluster_size';
+SELECT * FROM t1;
+
+# reconnect node #1
+--connection node_1
+SET GLOBAL wsrep_provider_options = 'gmcast.isolate=0';
+
+# reconnect node #2
+--connection node_2
+--source include/restart_mysqld.inc
+--source include/wait_until_connected_again.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
+SELECT * FROM t1;
+
+--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
+SELECT * FROM t1;
+
+--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
+SELECT * FROM t1;
+
+DROP TABLE t1;
+
+# Restore original auto_increment_offset values.
+--source ../galera/include/auto_increment_offset_restore.inc
+
+--connection node_2
+CALL mtr.add_suppression("Slave SQL: Could not execute Write_rows event on table test.t1; Duplicate entry '1' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log FIRST, end_log_pos (.*), Error_code: 1062");
+CALL mtr.add_suppression("WSREP: Event (.*) Write_rows_v1 apply failed: 121, seqno ");
+CALL mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on (.*)");
+CALL mtr.add_suppression("Plugin 'InnoDB' will be forced to shutdown");
+CALL mtr.add_suppression("WSREP: Failed to apply write set: "); \ No newline at end of file
diff --git a/mysql-test/suite/galera_3nodes/t/galera-features#119.test b/mysql-test/suite/galera_3nodes/t/galera-features#119.test
new file mode 100644
index 00000000000..d1dd435c5e4
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes/t/galera-features#119.test
@@ -0,0 +1,72 @@
+#
+# This test tests voting (successful slave wins) in the absence of the master
+# for trasaction.
+#
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+--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
+
+CREATE TABLE test.t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+
+--connection node_2
+--let $wsrep_provider_orig = `SELECT @@wsrep_provider`
+--let $wsrep_cluster_address_orig = `SELECT @@wsrep_cluster_address`
+SET wsrep_on=OFF;
+INSERT INTO t1 VALUES (1);
+LOCK TABLE t1 WRITE;
+SET GLOBAL wsrep_sync_wait=0;
+
+--connection node_1
+INSERT INTO t1 VALUES (1);
+SET GLOBAL wsrep_sync_wait=0;
+SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1';
+
+--connection node_3
+# wait for node_1 to disappear
+--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
+UNLOCK TABLES;
+# wait to go non-Primary due to inconsistency voting
+#--let $wait_condition = SELECT VARIABLE_VALUE = 'non-Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
+#--source include/wait_condition.inc
+# Somehow the above times out so we use connectin to node 3
+
+--connection node_3
+# wait for node_1 to disappear
+--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_1
+SET GLOBAL wsrep_provider_options = 'gmcast.isolate=0';
+--source include/galera_wait_ready.inc
+SET GLOBAL wsrep_sync_wait=15;
+DROP TABLE test.t1;
+
+# reconnect node 2, since it is now inconsistent
+--connection node_2
+--source include/kill_galera.inc
+--source include/wait_until_disconnected.inc
+--source include/start_mysqld.inc
+
+--connection node_2
+CALL mtr.add_suppression("Inconsistent by consensus.");
+CALL mtr.add_suppression("Slave SQL: Could not execute Write_rows event on table test.t1; Duplicate entry '1' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log FIRST");
+CALL mtr.add_suppression("WSREP: Event 3 Write_rows_v1 apply failed: 121, seqno");
+CALL mtr.add_suppression("WSREP: Node consistency compromized, leaving cluster...");
+CALL mtr.add_suppression("WSREP: Failed to apply write set: ");
+
+
+# Restore original auto_increment_offset values.
+--source ../galera/include/auto_increment_offset_restore.inc
+
diff --git a/mysql-test/suite/galera_3nodes/t/galera_evs_suspect_timeout.test b/mysql-test/suite/galera_3nodes/t/galera_evs_suspect_timeout.test
index 3f1140b175d..ee75aa085e6 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
@@ -26,8 +26,11 @@ SET GLOBAL wsrep_provider_options = 'evs.inactive_timeout=PT100M; evs.suspect_ti
--let $wsrep_provider_options_node2 = `SELECT @@wsrep_provider_options`
SET GLOBAL wsrep_provider_options = 'evs.inactive_timeout=PT100M; evs.suspect_timeout=PT1S';
-# Suspend node #3
+--connection node_3
+--source include/wait_until_connected_again.inc
+--let $wsrep_cluster_address_node3 = `SELECT @@wsrep_cluster_address`
+# Suspend node #3
--connection node_3
--source include/galera_suspend.inc
--sleep 5
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 0e407e49aba..8a1c93a769f 100644
--- a/mysql-test/suite/galera_3nodes/t/galera_pc_weight.test
+++ b/mysql-test/suite/galera_3nodes/t/galera_pc_weight.test
@@ -10,7 +10,7 @@
--connection node_1
SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight';
SET GLOBAL wsrep_provider_options = 'pc.weight=3';
-SELECT VARIABLE_VALUE = 5 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight';
+SELECT VARIABLE_VALUE AS expect_5 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight';
# Isolate node_1 from the cluster.
SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1';
@@ -62,15 +62,15 @@ SHOW STATUS LIKE 'wsrep_local_state_comment';
--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
--source include/wait_condition.inc
-SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight';
-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';
-SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready';
-SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state';
-SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
+SELECT VARIABLE_VALUE AS expect_3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight';
+SELECT VARIABLE_VALUE AS expect_Primary FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
+SELECT VARIABLE_VALUE AS expect_ON FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_connected';
+SELECT VARIABLE_VALUE AS expect_ON FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready';
+SELECT VARIABLE_VALUE AS expect_4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state';
+SELECT VARIABLE_VALUE AS expect_Synced FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
SET GLOBAL wsrep_provider_options = 'pc.weight=1';
-SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight';
+SELECT VARIABLE_VALUE AS expect_1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight';
# Resume cluster connectivity on node_1
--connection node_1
@@ -78,15 +78,15 @@ 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
+--source include/galera_wait_ready.inc
--connection node_2
--source include/wait_condition.inc
+--source include/galera_wait_ready.inc
--connection node_3
--source include/wait_condition.inc
-
---connection node_1
---source include/wait_condition.inc
+--source include/galera_wait_ready.inc
# wait until nodes 2 and 3 have declared ready state (can happen after cluster_size raaise)
--connection node_2
@@ -98,33 +98,31 @@ SET GLOBAL wsrep_provider_options = 'gmcast.isolate=0';
# On all nodes, we now expect a Primary component of size 3, weight 3, Synced and ready
-SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
-SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight';
-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';
-SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready';
-SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state';
-SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
+SELECT VARIABLE_VALUE AS expect_3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+SELECT VARIABLE_VALUE AS expect_3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight';
+SELECT VARIABLE_VALUE AS expect_Primary FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
+SELECT VARIABLE_VALUE AS expect_ON FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_connected';
+SELECT VARIABLE_VALUE AS expect_ON FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready';
+SELECT VARIABLE_VALUE AS expect_4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state';
+SELECT VARIABLE_VALUE AS expect_Synced FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
--connection node_2
-SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
-SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight';
-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';
-SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready';
-SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state';
-SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
-
---connection node_3
-SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
-SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight';
-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';
-SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready';
-SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state';
-SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
+SELECT VARIABLE_VALUE AS expect_3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+SELECT VARIABLE_VALUE AS expect_3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight';
+SELECT VARIABLE_VALUE AS expect_Primary FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
+SELECT VARIABLE_VALUE AS expect_ON FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_connected';
+SELECT VARIABLE_VALUE AS expect_ON FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready';
+SELECT VARIABLE_VALUE AS expect_4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state';
+SELECT VARIABLE_VALUE AS expect_Synced FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
--connection node_1
+SELECT VARIABLE_VALUE AS expect_3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+SELECT VARIABLE_VALUE AS expect_3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight';
+SELECT VARIABLE_VALUE AS expect_Primary FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
+SELECT VARIABLE_VALUE AS expect_ON FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_connected';
+SELECT VARIABLE_VALUE AS expect_ON FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready';
+SELECT VARIABLE_VALUE AS expect_4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state';
+SELECT VARIABLE_VALUE AS expect_Synced FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
SET GLOBAL wsrep_provider_options = 'pc.weight=1';
--let $wait_condition = SELECT @@wsrep_provider_options LIKE '%pc.weight = 1%'
@@ -133,10 +131,10 @@ 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)');
+CALL mtr.add_suppression('overriding reported weight for');
--connection node_3
CALL mtr.add_suppression('WSREP: user message in state LEAVING');
diff --git a/mysql-test/suite/galera_3nodes/t/galera_toi_vote.cnf b/mysql-test/suite/galera_3nodes/t/galera_toi_vote.cnf
new file mode 100644
index 00000000000..4c5e4854606
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes/t/galera_toi_vote.cnf
@@ -0,0 +1,5 @@
+!include ../galera_3nodes.cnf
+
+[mysqld]
+wsrep-ignore-apply-errors=0
+wsrep_sync_wait=0
diff --git a/mysql-test/suite/galera_3nodes/t/galera_toi_vote.test b/mysql-test/suite/galera_3nodes/t/galera_toi_vote.test
new file mode 100644
index 00000000000..7b5682ed030
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes/t/galera_toi_vote.test
@@ -0,0 +1,67 @@
+#
+# This test tests that TOI failure on 2 nodes (master and slave) for the
+# same reason, wins over success on a third slave.
+# In particular this tests that master and slave TOI cast the same vote for
+# the same error
+#
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+--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
+
+# create inconsistency on node 3
+--connection node_3
+SET SESSION wsrep_on=OFF;
+DROP SCHEMA test;
+
+# This should fail on nodes 1 and 2 and succeed on node 3
+--connection node_1
+--error ER_DB_CREATE_EXISTS
+CREATE SCHEMA test;
+
+--connection node_1
+SET SESSION wsrep_sync_wait=0;
+# wait for node 3 to drop from the cluster
+--let $wait_condition = SELECT VARIABLE_VALUE = 2 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
+
+--connection node_2
+SET SESSION wsrep_sync_wait=0;
+# wait for node 3 to drop from the cluster
+--let $wait_condition = SELECT VARIABLE_VALUE = 2 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
+
+--connection node_3
+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
+
+# need to reinitialize connection due to a "Bad handshake" bug
+--disconnect node_3
+--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
+
+# reconnect node 3, since it failed
+--source include/kill_galera.inc
+--source include/wait_until_disconnected.inc
+--source include/start_mysqld.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
+
+CALL mtr.add_suppression("WSREP: Vote 0 \\\(success\\\) on (.*) is inconsistent with group. Leaving cluster.");
+
+# Restore original auto_increment_offset values.
+--source ../galera/include/auto_increment_offset_restore.inc
diff --git a/mysql-test/suite/galera_3nodes/t/galera_vote_rejoin_mysqldump.cnf b/mysql-test/suite/galera_3nodes/t/galera_vote_rejoin_mysqldump.cnf
new file mode 100644
index 00000000000..e255e1d527e
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes/t/galera_vote_rejoin_mysqldump.cnf
@@ -0,0 +1,4 @@
+!include ../galera_3nodes.cnf
+
+[mysqld]
+wsrep-ignore-apply-errors=0
diff --git a/mysql-test/suite/galera_3nodes/t/galera_vote_rejoin_mysqldump.test b/mysql-test/suite/galera_3nodes/t/galera_vote_rejoin_mysqldump.test
new file mode 100644
index 00000000000..70d58cb25f4
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes/t/galera_vote_rejoin_mysqldump.test
@@ -0,0 +1,93 @@
+#
+# Test that mysqldump SST is possible after a vote without a cluster restart
+#
+
+--source include/galera_cluster.inc
+--source suite/galera/include/galera_sst_set_mysqldump.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;
+
+# Introduce inconsistency on node #2
+
+--connection node_2
+--let $wsrep_cluster_address_node2 = `SELECT @@wsrep_cluster_address`
+SET SESSION wsrep_on=OFF;
+ALTER TABLE t1 ADD PRIMARY KEY (f1);
+SET SESSION wsrep_on=ON;
+
+# Run DDL that will fail on nodes #1 and #3 but succeed on node #2
+
+--connection node_1
+--error ER_CANT_DROP_FIELD_OR_KEY
+ALTER TABLE t1 LOCK=SHARED, DROP PRIMARY KEY;
+
+# Nodes #1 and #3 remain in the cluster
+
+--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
+
+SELECT VARIABLE_VALUE AS expect_Primary FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
+
+--connection node_3
+SELECT VARIABLE_VALUE AS expect_2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+SELECT VARIABLE_VALUE AS expect_Primary FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
+
+# Node #2 is kicked out
+
+--connection node_2
+SET SESSION wsrep_on=OFF;
+SELECT VARIABLE_VALUE AS expect_Disconnected FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
+SET SESSION wsrep_on=ON;
+
+# Restore cluster
+
+--disable_query_log
+--eval SET GLOBAL wsrep_cluster_address = '$wsrep_cluster_address_node2'
+--enable_query_log
+--enable_reconnect
+
+--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+--source include/wait_condition.inc
+
+SELECT VARIABLE_VALUE AS expect_Primary FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
+
+# Confirm that the table is now identical throughout
+
+--connection node_1
+SHOW CREATE TABLE t1;
+
+--connection node_2
+SET SESSION wsrep_on=OFF;
+--let $wait_condition = SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
+--source include/wait_condition.inc
+--source include/galera_wait_ready.inc
+SET SESSION wsrep_on=ON;
+
+# 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
+
+SHOW CREATE TABLE t1;
+SELECT COUNT(*) AS expect_0 FROM t1;
+CALL mtr.add_suppression("is inconsistent with group");
+
+--connection node_3
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+CALL mtr.add_suppression("Slave SQL: Error 'Can't DROP 'PRIMARY'; check that column/key exists'");
+
+--connection node_1
+--source suite/galera/include/galera_sst_restore.inc
+
+# Restore original auto_increment_offset values.
+--source ../galera/include/auto_increment_offset_restore.inc
diff --git a/mysql-test/suite/galera_3nodes/t/inconsistency_shutdown.cnf b/mysql-test/suite/galera_3nodes/t/inconsistency_shutdown.cnf
new file mode 100644
index 00000000000..ae2cf8068f5
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes/t/inconsistency_shutdown.cnf
@@ -0,0 +1,9 @@
+!include ../galera_3nodes.cnf
+
+[mysqld]
+wsrep-slave-threads=8
+wsrep-ignore-apply-errors=0
+
+[ENV]
+galera_cluster_size = 3
+
diff --git a/mysql-test/suite/galera_3nodes/t/inconsistency_shutdown.test b/mysql-test/suite/galera_3nodes/t/inconsistency_shutdown.test
new file mode 100644
index 00000000000..6ad19e01849
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes/t/inconsistency_shutdown.test
@@ -0,0 +1,183 @@
+#
+# Check that the node can cleanly shutdown in case of inconsistency
+# (no locked up threads)
+#
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+--source include/have_debug.inc
+--source include/have_debug_sync.inc
+--source include/galera_have_debug_sync.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_2
+SELECT @@wsrep_slave_threads = 8;
+
+#
+# 1. Inconsistency on slave
+#
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 INT);
+INSERT INTO t1 VALUES (1, 0),(2, 0),(3, 0),(4, 0),(5, 0),(6, 0),(7, 0),(8, 0);
+
+--connection node_2
+# Allow 1K slave queue woithout flow control
+SET GLOBAL wsrep_provider_options='gcs.fc_limit=1K';
+# Introduce 2 inconsistencies
+SET wsrep_on=OFF;
+DELETE FROM t1 WHERE f1 = 2;
+DELETE FROM t1 WHERE f1 = 4;
+SET wsrep_on=ON;
+
+# Build up slave queue:
+# - first 8 events will be picked by slave threads
+# - one moreevent will be waiting in slave queue
+LOCK TABLES t1 WRITE;
+--connection node_1
+UPDATE t1 SET f2 = 1 WHERE f1 = 1;
+UPDATE t1 SET f2 = 1 WHERE f1 = 2;
+UPDATE t1 SET f2 = 1 WHERE f1 = 3;
+UPDATE t1 SET f2 = 1 WHERE f1 = 4;
+UPDATE t1 SET f2 = 2 WHERE f1 = 4; /* dependent applier */
+UPDATE t1 SET f2 = 3 WHERE f1 = 4; /* dependent applier */
+UPDATE t1 SET f2 = 1 WHERE f1 = 5;
+UPDATE t1 SET f2 = 1 WHERE f1 = 6;
+UPDATE t1 SET f2 = 1 WHERE f1 = 7;
+UPDATE t1 SET f2 = 1 WHERE f1 = 8;
+
+--connection node_2
+# make sure all events landed to slave queue
+SET wsrep_on=OFF;
+--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_recv_queue';
+--source include/wait_condition.inc
+SET wsrep_on=ON;
+UNLOCK TABLES;
+--source include/wsrep_wait_disconnect.inc
+# Wait for the node to shutdown replication
+--let $members=0
+--source include/wsrep_wait_membership.inc
+
+--connection node_1
+--let $members=2
+--source include/wsrep_wait_membership.inc
+--source include/wait_until_ready.inc
+SHOW STATUS LIKE 'wsrep_cluster_size';
+SELECT * FROM t1;
+
+--connection node_2
+#Gracefully restart the node
+SET GLOBAL wsrep_on=OFF;
+--source include/shutdown_mysqld.inc
+--source include/start_mysqld.inc
+--source include/galera_wait_ready.inc
+
+DROP TABLE t1;
+
+#
+# 2. Inconsistency on master
+#
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 INT);
+START TRANSACTION;
+INSERT INTO t1 VALUES (1, 0);
+INSERT INTO t1 VALUES (2, 0);
+INSERT INTO t1 VALUES (3, 0);
+INSERT INTO t1 VALUES (4, 0);
+INSERT INTO t1 VALUES (5, 0);
+INSERT INTO t1 VALUES (6, 0);
+INSERT INTO t1 VALUES (7, 0);
+INSERT INTO t1 VALUES (8, 0);
+COMMIT;
+CREATE TABLE t2 (f1 INTEGER PRIMARY KEY, f2 INT);
+
+--connection node_2
+# Allow 1K slave queue without flow control
+SET GLOBAL wsrep_provider_options='gcs.fc_limit=1K';
+# Introduce inconsistency
+SET wsrep_on=OFF;
+DROP TABLE t2;
+SET wsrep_on=ON;
+
+# set up sync point to ensure DROP TABLE replication order below
+--let galera_sync_point = after_replicate_sync
+--source include/galera_set_sync_point.inc
+
+# Build up slave queue:
+# - first 8 events will be picked by slave threads
+# - one more event will be waiting in slave queue
+LOCK TABLES t1 READ;
+
+--connection node_1
+UPDATE t1 SET f2 = 1 WHERE f1 = 1;
+UPDATE t1 SET f2 = 1 WHERE f1 = 2;
+UPDATE t1 SET f2 = 1 WHERE f1 = 3;
+UPDATE t1 SET f2 = 1 WHERE f1 = 4;
+UPDATE t1 SET f2 = 2 WHERE f1 = 4; /* dependent applier */;
+
+# interleave a failing statement
+--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
+--connection node_2a
+--send DROP TABLE t2;
+
+# make sure DROP TABLE from above has replicated
+--connection node_2
+SET wsrep_on=OFF;
+--echo "Wait for DROP TABLE to replicate"
+--source include/galera_wait_sync_point.inc
+--source include/galera_signal_sync_point.inc
+--source include/galera_clear_sync_point.inc
+--echo "DROP TABLE replicated"
+SET wsrep_on=ON;
+
+--connection node_1
+UPDATE t1 SET f2 = 3 WHERE f1 = 4; /* dependent applier */
+UPDATE t1 SET f2 = 1 WHERE f1 = 5;
+UPDATE t1 SET f2 = 1 WHERE f1 = 6;
+UPDATE t1 SET f2 = 1 WHERE f1 = 7;
+UPDATE t1 SET f2 = 1 WHERE f1 = 8;
+
+--connection node_2
+# make sure all events landed to slave queue
+SET wsrep_on=OFF;
+--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_recv_queue';
+--source include/wait_condition.inc
+SET wsrep_on=ON;
+UNLOCK TABLES;
+
+--connection node_2a
+--error ER_BAD_TABLE_ERROR
+--reap
+
+--connection node_1
+--let $members=2
+--source include/wsrep_wait_membership.inc
+--source include/wait_until_ready.inc
+SHOW STATUS LIKE 'wsrep_cluster_size';
+SELECT * FROM t1;
+
+--connection node_2
+--source include/wsrep_wait_disconnect.inc
+# Wait for the node to shutdown replication
+--let $members=0
+--source include/wsrep_wait_membership.inc
+# Gracefully restart the node
+SET GLOBAL wsrep_on=OFF;
+--source include/shutdown_mysqld.inc
+--source include/start_mysqld.inc
+--source include/galera_wait_ready.inc
+
+DROP TABLE t1;
+
+CALL mtr.add_suppression('Can\'t find record in \'t1\'');
+CALL mtr.add_suppression('Update_rows_v1 apply failed');
+CALL mtr.add_suppression('Inconsistency detected: Inconsistent by consensus on');
+CALL mtr.add_suppression('last left .* greater than drain seqno');
+CALL mtr.add_suppression('WSREP: Failed to apply write set:');
+
+# Restore original auto_increment_offset values.
+--source ../galera/include/auto_increment_offset_restore.inc
diff --git a/mysql-test/suite/galera_3nodes_sr/r/galera_vote_sr.result b/mysql-test/suite/galera_3nodes_sr/r/galera_vote_sr.result
new file mode 100644
index 00000000000..678cfe4c3a7
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/r/galera_vote_sr.result
@@ -0,0 +1,197 @@
+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;
+Inconsistency on the first fragment
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 BLOB) ENGINE=InnoDB;
+connection node_2;
+SET SESSION wsrep_on=OFF;
+INSERT INTO t1 VALUES (1, 'X');
+SET SESSION wsrep_on=ON;
+DELETE FROM t1 WHERE f1 = 2;
+connection node_1;
+SET AUTOCOMMIT=OFF;
+SET SESSION wsrep_trx_fragment_size = 16384;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1, REPEAT('A', 16384));
+INSERT INTO t1 VALUES (2, REPEAT('A', 16384));
+INSERT INTO t1 VALUES (3, REPEAT('A', 16384));
+INSERT INTO t1 VALUES (4, REPEAT('A', 16384));
+INSERT INTO t1 VALUES (5, REPEAT('A', 16384));
+COMMIT;
+SELECT COUNT(*) AS expect_0 FROM mysql.wsrep_streaming_log;
+expect_0
+0
+START TRANSACTION;
+INSERT INTO t1 VALUES (11, REPEAT('A', 16384));
+INSERT INTO t1 VALUES (12, REPEAT('A', 16384));
+INSERT INTO t1 VALUES (13, REPEAT('A', 16384));
+INSERT INTO t1 VALUES (14, REPEAT('A', 16384));
+INSERT INTO t1 VALUES (15, REPEAT('A', 16384));
+connection node_2;
+SET SESSION wsrep_on=OFF;
+Starting mysqld
+# restart
+connection node_1;
+connection node_2;
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) > 0
+1
+connection node_1;
+COMMIT;
+connection node_1;
+SELECT COUNT(*) AS expect_0 FROM mysql.wsrep_streaming_log;
+expect_0
+0
+SELECT COUNT(*) AS expect_10 FROM t1;
+expect_10
+10
+connection node_2;
+SELECT COUNT(*) AS expect_0 FROM mysql.wsrep_streaming_log;
+expect_0
+0
+SELECT COUNT(*) AS expect_10 FROM t1;
+expect_10
+10
+connection node_3;
+SELECT COUNT(*) AS expect_0 FROM mysql.wsrep_streaming_log;
+expect_0
+0
+SELECT COUNT(*) AS expect_10 FROM t1;
+expect_10
+10
+connection node_1;
+DROP TABLE t1;
+Inconsistency on a middle fragment
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 BLOB) ENGINE=InnoDB;
+connection node_2;
+SET SESSION wsrep_on=OFF;
+INSERT INTO t1 VALUES (3, 'X');
+SET SESSION wsrep_on=ON;
+DELETE FROM t1 WHERE f1 = 2;
+connection node_1;
+SET AUTOCOMMIT=OFF;
+SET SESSION wsrep_trx_fragment_size = 16384;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1, REPEAT('A', 16384));
+INSERT INTO t1 VALUES (2, REPEAT('A', 16384));
+INSERT INTO t1 VALUES (3, REPEAT('A', 16384));
+INSERT INTO t1 VALUES (4, REPEAT('A', 16384));
+INSERT INTO t1 VALUES (5, REPEAT('A', 16384));
+COMMIT;
+SELECT COUNT(*) AS expect_0 FROM mysql.wsrep_streaming_log;
+expect_0
+0
+START TRANSACTION;
+INSERT INTO t1 VALUES (11, REPEAT('A', 16384));
+INSERT INTO t1 VALUES (12, REPEAT('A', 16384));
+INSERT INTO t1 VALUES (13, REPEAT('A', 16384));
+INSERT INTO t1 VALUES (14, REPEAT('A', 16384));
+INSERT INTO t1 VALUES (15, REPEAT('A', 16384));
+connection node_2;
+SET SESSION wsrep_on=OFF;
+Starting mysqld
+# restart
+connection node_1;
+connection node_2;
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) > 0
+1
+connection node_1;
+COMMIT;
+connection node_1;
+SELECT COUNT(*) AS expect_0 FROM mysql.wsrep_streaming_log;
+expect_0
+0
+SELECT COUNT(*) AS expect_10 FROM t1;
+expect_10
+10
+connection node_2;
+SELECT COUNT(*) AS expect_0 FROM mysql.wsrep_streaming_log;
+expect_0
+0
+SELECT COUNT(*) AS expect_10 FROM t1;
+expect_10
+10
+connection node_3;
+SELECT COUNT(*) AS expect_0 FROM mysql.wsrep_streaming_log;
+expect_0
+0
+SELECT COUNT(*) AS expect_10 FROM t1;
+expect_10
+10
+connection node_1;
+DROP TABLE t1;
+Inconsistency on the commit fragment
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 BLOB) ENGINE=InnoDB;
+connection node_2;
+SET SESSION wsrep_on=OFF;
+INSERT INTO t1 VALUES (5, 'X');
+SET SESSION wsrep_on=ON;
+DELETE FROM t1 WHERE f1 = 2;
+connection node_1;
+SET AUTOCOMMIT=OFF;
+SET SESSION wsrep_trx_fragment_size = 16384;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1, REPEAT('A', 16384));
+INSERT INTO t1 VALUES (2, REPEAT('A', 16384));
+INSERT INTO t1 VALUES (3, REPEAT('A', 16384));
+INSERT INTO t1 VALUES (4, REPEAT('A', 16384));
+INSERT INTO t1 VALUES (5, REPEAT('A', 16384));
+COMMIT;
+SELECT COUNT(*) AS expect_0 FROM mysql.wsrep_streaming_log;
+expect_0
+0
+START TRANSACTION;
+INSERT INTO t1 VALUES (11, REPEAT('A', 16384));
+INSERT INTO t1 VALUES (12, REPEAT('A', 16384));
+INSERT INTO t1 VALUES (13, REPEAT('A', 16384));
+INSERT INTO t1 VALUES (14, REPEAT('A', 16384));
+INSERT INTO t1 VALUES (15, REPEAT('A', 16384));
+connection node_2;
+SET SESSION wsrep_on=OFF;
+Starting mysqld
+# restart
+connection node_1;
+connection node_2;
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) > 0
+1
+connection node_1;
+COMMIT;
+connection node_1;
+SELECT COUNT(*) AS expect_0 FROM mysql.wsrep_streaming_log;
+expect_0
+0
+SELECT COUNT(*) AS expect_10 FROM t1;
+expect_10
+10
+connection node_2;
+SELECT COUNT(*) AS expect_0 FROM mysql.wsrep_streaming_log;
+expect_0
+0
+SELECT COUNT(*) AS expect_10 FROM t1;
+expect_10
+10
+connection node_3;
+SELECT COUNT(*) AS expect_0 FROM mysql.wsrep_streaming_log;
+expect_0
+0
+SELECT COUNT(*) AS expect_10 FROM t1;
+expect_10
+10
+connection node_1;
+DROP TABLE t1;
+connection node_2;
+CALL mtr.add_suppression("Slave SQL: Could not execute Write_rows event on table test.t1; Duplicate entry '1' for key 'PRIMARY'");
+CALL mtr.add_suppression("Slave SQL: Could not execute Write_rows event on table test.t1; Duplicate entry '3' for key 'PRIMARY'");
+CALL mtr.add_suppression("Slave SQL: Could not execute Write_rows event on table test.t1; Duplicate entry '5' for key 'PRIMARY'");
+CALL mtr.add_suppression("Write_rows_v1 apply failed");
+CALL mtr.add_suppression("Inconsistent by consensus");
+CALL mtr.add_suppression("WSREP: Failed to apply write set: ");
+CALL mtr.add_suppression("WSREP: Failed to report last committed");
diff --git a/mysql-test/suite/galera_3nodes_sr/t/galera_vote_sr-master.opt b/mysql-test/suite/galera_3nodes_sr/t/galera_vote_sr-master.opt
new file mode 100644
index 00000000000..196498bb9fa
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/t/galera_vote_sr-master.opt
@@ -0,0 +1,2 @@
+--wsrep-ignore-apply-errors=0
+
diff --git a/mysql-test/suite/galera_3nodes_sr/t/galera_vote_sr.inc b/mysql-test/suite/galera_3nodes_sr/t/galera_vote_sr.inc
new file mode 100644
index 00000000000..776291cc9c0
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/t/galera_vote_sr.inc
@@ -0,0 +1,80 @@
+#
+# set $inconsistent_fragment to determine at which fragment inconsistency
+# happens
+#
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 BLOB) ENGINE=InnoDB;
+
+# Introduce inconsistency
+--connection node_2
+SET SESSION wsrep_on=OFF;
+--eval INSERT INTO t1 VALUES ($inconsistent_fragment, 'X')
+SET SESSION wsrep_on=ON;
+DELETE FROM t1 WHERE f1 = 2;
+
+# Perform an SR transaction that will hit the inconsistency
+--connection node_1
+--let $fragment_size = 16384
+SET AUTOCOMMIT=OFF;
+--eval SET SESSION wsrep_trx_fragment_size = $fragment_size
+START TRANSACTION;
+--eval INSERT INTO t1 VALUES (1, REPEAT('A', $fragment_size))
+--eval INSERT INTO t1 VALUES (2, REPEAT('A', $fragment_size))
+--eval INSERT INTO t1 VALUES (3, REPEAT('A', $fragment_size))
+--eval INSERT INTO t1 VALUES (4, REPEAT('A', $fragment_size))
+--eval INSERT INTO t1 VALUES (5, REPEAT('A', $fragment_size))
+COMMIT;
+SELECT COUNT(*) AS expect_0 FROM mysql.wsrep_streaming_log;
+
+# Perform another SR transaction in order to have stuff in the
+# wsrep_streaming_log table
+START TRANSACTION;
+--eval INSERT INTO t1 VALUES (11, REPEAT('A', $fragment_size))
+--eval INSERT INTO t1 VALUES (12, REPEAT('A', $fragment_size))
+--eval INSERT INTO t1 VALUES (13, REPEAT('A', $fragment_size))
+--eval INSERT INTO t1 VALUES (14, REPEAT('A', $fragment_size))
+--eval INSERT INTO t1 VALUES (15, REPEAT('A', $fragment_size))
+
+# Node #2 has dropped from the cluster due to voting
+--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+--source include/wait_condition.inc
+
+# Bring node #2 back via SST
+--connection node_2
+SET SESSION wsrep_on=OFF;
+--source include/shutdown_mysqld.inc
+--source include/wait_until_disconnected.inc
+--echo Starting mysqld
+--source include/start_mysqld.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_2
+--let $wait_condition = SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready';
+--source include/wait_condition.inc
+
+# Node #2 should have some entries in its SR table post-restart
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+
+# Commit second SR transaction
+--connection node_1
+COMMIT;
+
+# Confirm that all nodes are identical
+--connection node_1
+SELECT COUNT(*) AS expect_0 FROM mysql.wsrep_streaming_log;
+SELECT COUNT(*) AS expect_10 FROM t1;
+
+--connection node_2
+SELECT COUNT(*) AS expect_0 FROM mysql.wsrep_streaming_log;
+SELECT COUNT(*) AS expect_10 FROM t1;
+
+--connection node_3
+SELECT COUNT(*) AS expect_0 FROM mysql.wsrep_streaming_log;
+SELECT COUNT(*) AS expect_10 FROM t1;
+
+--connection node_1
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_3nodes_sr/t/galera_vote_sr.test b/mysql-test/suite/galera_3nodes_sr/t/galera_vote_sr.test
new file mode 100644
index 00000000000..bae7d851a71
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/t/galera_vote_sr.test
@@ -0,0 +1,39 @@
+#
+# Test voting while an SR transaction is in progress
+#
+
+--source include/galera_cluster.inc
+--source include/big_test.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
+
+--echo Inconsistency on the first fragment
+--let $inconsistent_fragment=1
+--source galera_vote_sr.inc
+
+--echo Inconsistency on a middle fragment
+--let $inconsistent_fragment=3
+--source galera_vote_sr.inc
+
+--echo Inconsistency on the commit fragment
+--let $inconsistent_fragment=5
+--source galera_vote_sr.inc
+
+--connection node_2
+CALL mtr.add_suppression("Slave SQL: Could not execute Write_rows event on table test.t1; Duplicate entry '1' for key 'PRIMARY'");
+CALL mtr.add_suppression("Slave SQL: Could not execute Write_rows event on table test.t1; Duplicate entry '3' for key 'PRIMARY'");
+CALL mtr.add_suppression("Slave SQL: Could not execute Write_rows event on table test.t1; Duplicate entry '5' for key 'PRIMARY'");
+CALL mtr.add_suppression("Write_rows_v1 apply failed");
+CALL mtr.add_suppression("Inconsistent by consensus");
+CALL mtr.add_suppression("WSREP: Failed to apply write set: ");
+#CALL mtr.add_suppression("no THD for trx");
+CALL mtr.add_suppression("WSREP: Failed to report last committed");
+
+# Restore original auto_increment_offset values.
+--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
index d52ee32f610..9f6ae2a51ef 100644
--- a/mysql-test/suite/galera_sr/disabled.def
+++ b/mysql-test/suite/galera_sr/disabled.def
@@ -10,5 +10,8 @@
#
##############################################################################
+GCF-1018B : MDEV-18534 wsrep::transaction::adopt(): Assertion `transaction.is_streaming()' failed
GCF-1060 : MDEV-20848 galera_sr.GCF_1060
+GCF-585 : MDEV-24698 galera_sr.GCF-585 MTR failed with SIGABRT: no such a transition REPLICATING -> APPLYING
galera-features#56 : MDEV-24896
+galera_sr_shutdown_master : MDEV-23612: galera_sr.galera_sr_shutdown_master MTR failed: WSREP_SST: [ERROR] Possible timeout in receving first data from donor in gtid stage
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
index 132c6aed246..e1e4341c484 100644
--- 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
@@ -1 +1 @@
---innodb_log_file_size=1G --binlog-row-event-max-size=100M
+--innodb_log_file_size=2G --binlog-row-event-max-size=100M
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
index e660895cde6..50378b2a9bd 100644
--- a/mysql-test/suite/galera_sr/t/galera_sr_mysqldump_sst.test
+++ b/mysql-test/suite/galera_sr/t/galera_sr_mysqldump_sst.test
@@ -10,7 +10,7 @@
# Save original auto_increment_offset values.
--let $node_1=node_1
--let $node_2=node_2
---source suite/galera/include/auto_increment_offset_save.inc
+--source ../../galera/include/auto_increment_offset_save.inc
--connection node_1
CREATE TABLE ten (f1 INTEGER);
@@ -84,4 +84,5 @@ SET SESSION wsrep_trx_fragment_size=0;
--source suite/galera/include/galera_sst_restore.inc
# Restore original auto_increment_offset values.
---source suite/galera/include/auto_increment_offset_restore.inc
+--source ../galera/include/auto_increment_offset_restore.inc
+
diff --git a/mysql-test/suite/gcol/inc/gcol_column_def_options.inc b/mysql-test/suite/gcol/inc/gcol_column_def_options.inc
index f4350d25ae9..6b4d60e15b0 100644
--- a/mysql-test/suite/gcol/inc/gcol_column_def_options.inc
+++ b/mysql-test/suite/gcol/inc/gcol_column_def_options.inc
@@ -134,12 +134,16 @@ drop table t1;
create table t2 (a int);
+--error ER_PARSE_ERROR
create table t1 (a int, b int generated always as (a % 2) stored references t2(a));
+create table t1 (a int, b int generated always as (a % 2) stored);
show create table t1;
drop table t1;
create table t1 (a int, b int generated always as (a % 2) virtual);
---error 1064
+--error ER_PARSE_ERROR
alter table t1 modify b int generated always as (a % 2) stored references t2(a);
+--error ER_UNSUPPORTED_ACTION_ON_GENERATED_COLUMN
+alter table t1 modify b int generated always as (a % 2) stored;
show create table t1;
drop table t1;
drop table t2;
diff --git a/mysql-test/suite/gcol/inc/gcol_ins_upd.inc b/mysql-test/suite/gcol/inc/gcol_ins_upd.inc
index e745708c22a..68c0a0e30c9 100644
--- a/mysql-test/suite/gcol/inc/gcol_ins_upd.inc
+++ b/mysql-test/suite/gcol/inc/gcol_ins_upd.inc
@@ -487,12 +487,18 @@ DROP TABLE t;
--echo # Bug#21807818: Generated columns not updated with empty insert list
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
CREATE TABLE t (
a BLOB GENERATED ALWAYS AS ('') VIRTUAL,
b TIMESTAMP(4) GENERATED ALWAYS AS ('') VIRTUAL,
KEY (a(183),b)
);
+CREATE TABLE t (
+a BLOB GENERATED ALWAYS AS ('') VIRTUAL,
+b TIMESTAMP(4) GENERATED ALWAYS AS ('') VIRTUAL
+);
+
INSERT IGNORE INTO t VALUES(), (), ();
DELETE IGNORE FROM t;
diff --git a/mysql-test/suite/gcol/r/gcol_bugfixes.result b/mysql-test/suite/gcol/r/gcol_bugfixes.result
index f2d72d1e363..6d93c63fc2f 100644
--- a/mysql-test/suite/gcol/r/gcol_bugfixes.result
+++ b/mysql-test/suite/gcol/r/gcol_bugfixes.result
@@ -241,7 +241,7 @@ pk >= 8
HAVING x > '2000-02-06'
ORDER BY col_time_nokey, pk;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE c ALL PRIMARY,col_varchar_key,col_varchar_key_2 NULL NULL NULL 6 Using where
+1 SIMPLE c index_merge PRIMARY,col_varchar_key,col_varchar_key_2 col_varchar_key,PRIMARY 5,4 NULL 2 Using union(col_varchar_key,PRIMARY); Using where
SELECT COUNT(DISTINCT col_varchar_key) AS x
FROM c
WHERE col_varchar_key IN ('rr', 'rr') OR
@@ -535,7 +535,6 @@ CREATE TABLE t (a INTEGER) engine=innodb;
ALTER TABLE t ADD b INTEGER AS (SUBSTR('','a',1));
Warnings:
Warning 1292 Truncated incorrect INTEGER value: 'a'
-Warning 1292 Truncated incorrect INTEGER value: 'a'
DROP TABLE t;
set sql_mode= @save_old_sql_mode;
# Bug#21875520 Problems with virtual column indexes
diff --git a/mysql-test/suite/gcol/r/gcol_column_def_options_innodb.result b/mysql-test/suite/gcol/r/gcol_column_def_options_innodb.result
index 6da3f3c14d3..8d12db6246b 100644
--- a/mysql-test/suite/gcol/r/gcol_column_def_options_innodb.result
+++ b/mysql-test/suite/gcol/r/gcol_column_def_options_innodb.result
@@ -154,6 +154,8 @@ a b
drop table t1;
create table t2 (a int);
create table t1 (a int, b int generated always as (a % 2) stored references t2(a));
+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
+create table t1 (a int, b int generated always as (a % 2) stored);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -164,6 +166,8 @@ drop table t1;
create table t1 (a int, b int generated always as (a % 2) virtual);
alter table t1 modify b int generated always as (a % 2) stored references t2(a);
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 'references t2(a)' at line 1
+alter table t1 modify b int generated always as (a % 2) stored;
+ERROR HY000: This is not yet supported for generated columns
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
diff --git a/mysql-test/suite/gcol/r/gcol_column_def_options_myisam.result b/mysql-test/suite/gcol/r/gcol_column_def_options_myisam.result
index 0d7aaeab1fa..45bac8dce97 100644
--- a/mysql-test/suite/gcol/r/gcol_column_def_options_myisam.result
+++ b/mysql-test/suite/gcol/r/gcol_column_def_options_myisam.result
@@ -154,6 +154,8 @@ a b
drop table t1;
create table t2 (a int);
create table t1 (a int, b int generated always as (a % 2) stored references t2(a));
+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
+create table t1 (a int, b int generated always as (a % 2) stored);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -164,6 +166,8 @@ drop table t1;
create table t1 (a int, b int generated always as (a % 2) virtual);
alter table t1 modify b int generated always as (a % 2) stored references t2(a);
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 'references t2(a)' at line 1
+alter table t1 modify b int generated always as (a % 2) stored;
+ERROR HY000: This is not yet supported for generated columns
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
diff --git a/mysql-test/suite/gcol/r/gcol_csv.result b/mysql-test/suite/gcol/r/gcol_csv.result
index 20708586d51..e07b72ba589 100644
--- a/mysql-test/suite/gcol/r/gcol_csv.result
+++ b/mysql-test/suite/gcol/r/gcol_csv.result
@@ -1,4 +1,4 @@
-SET @@session.storage_engine = 'CSV';
+SET @@session.default_storage_engine = 'CSV';
create table t1 (a int, b virtual int as (a+1));
ERROR HY000: 'Specified storage engine' is not yet supported for generated columns.
create table t1 (a int not null);
diff --git a/mysql-test/suite/gcol/r/gcol_falcon.result b/mysql-test/suite/gcol/r/gcol_falcon.result
index 2eb558e6b69..8948539a245 100644
--- a/mysql-test/suite/gcol/r/gcol_falcon.result
+++ b/mysql-test/suite/gcol/r/gcol_falcon.result
@@ -1,4 +1,4 @@
-SET @@session.storage_engine = 'falcon';
+SET @@session.default_storage_engine = 'falcon';
create table t1 (a int, b virtual int as (a+1));
ERROR HY000: 'Specified storage engine' is not yet supported for generated columns.
create table t1 (a int);
diff --git a/mysql-test/suite/gcol/r/gcol_ins_upd_innodb.result b/mysql-test/suite/gcol/r/gcol_ins_upd_innodb.result
index ec5e8c0d70d..193ef064da8 100644
--- a/mysql-test/suite/gcol/r/gcol_ins_upd_innodb.result
+++ b/mysql-test/suite/gcol/r/gcol_ins_upd_innodb.result
@@ -627,16 +627,12 @@ a BLOB GENERATED ALWAYS AS ('') VIRTUAL,
b TIMESTAMP(4) GENERATED ALWAYS AS ('') VIRTUAL,
KEY (a(183),b)
);
-Warnings:
-Warning 1901 Function or expression '''' cannot be used in the GENERATED ALWAYS AS clause of `b`
-Warning 1105 Expression depends on the @@sql_mode value TIME_ROUND_FRACTIONAL
+ERROR HY000: Function or expression '''' cannot be used in the GENERATED ALWAYS AS clause of `b`
+CREATE TABLE t (
+a BLOB GENERATED ALWAYS AS ('') VIRTUAL,
+b TIMESTAMP(4) GENERATED ALWAYS AS ('') VIRTUAL
+);
INSERT IGNORE INTO t VALUES(), (), ();
-Warnings:
-Warning 1901 Function or expression '''' cannot be used in the GENERATED ALWAYS AS clause of `b`
-Warning 1105 Expression depends on the @@sql_mode value TIME_ROUND_FRACTIONAL
-Warning 1265 Data truncated for column 'b' at row 1
-Warning 1265 Data truncated for column 'b' at row 2
-Warning 1265 Data truncated for column 'b' at row 3
DELETE IGNORE FROM t;
DROP TABLE t;
#
diff --git a/mysql-test/suite/gcol/r/gcol_ins_upd_myisam.result b/mysql-test/suite/gcol/r/gcol_ins_upd_myisam.result
index a2ade8c324f..98db88abf4b 100644
--- a/mysql-test/suite/gcol/r/gcol_ins_upd_myisam.result
+++ b/mysql-test/suite/gcol/r/gcol_ins_upd_myisam.result
@@ -549,16 +549,12 @@ a BLOB GENERATED ALWAYS AS ('') VIRTUAL,
b TIMESTAMP(4) GENERATED ALWAYS AS ('') VIRTUAL,
KEY (a(183),b)
);
-Warnings:
-Warning 1901 Function or expression '''' cannot be used in the GENERATED ALWAYS AS clause of `b`
-Warning 1105 Expression depends on the @@sql_mode value TIME_ROUND_FRACTIONAL
+ERROR HY000: Function or expression '''' cannot be used in the GENERATED ALWAYS AS clause of `b`
+CREATE TABLE t (
+a BLOB GENERATED ALWAYS AS ('') VIRTUAL,
+b TIMESTAMP(4) GENERATED ALWAYS AS ('') VIRTUAL
+);
INSERT IGNORE INTO t VALUES(), (), ();
-Warnings:
-Warning 1901 Function or expression '''' cannot be used in the GENERATED ALWAYS AS clause of `b`
-Warning 1105 Expression depends on the @@sql_mode value TIME_ROUND_FRACTIONAL
-Warning 1265 Data truncated for column 'b' at row 1
-Warning 1265 Data truncated for column 'b' at row 2
-Warning 1265 Data truncated for column 'b' at row 3
DELETE IGNORE FROM t;
DROP TABLE t;
#
diff --git a/mysql-test/suite/gcol/r/gcol_keys_innodb.result b/mysql-test/suite/gcol/r/gcol_keys_innodb.result
index 121ec59678b..196ceb5459e 100644
--- a/mysql-test/suite/gcol/r/gcol_keys_innodb.result
+++ b/mysql-test/suite/gcol/r/gcol_keys_innodb.result
@@ -205,7 +205,7 @@ outr.col_varchar_nokey in ('c', 'x', 'i')
AND (outr.col_time_key IS NULL OR
outr.col_datetime_key = '2009-09-27');
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE outr ALL col_time_key,col_datetime_key NULL NULL NULL 4 x
+1 SIMPLE outr index_merge col_time_key,col_datetime_key col_time_key,col_datetime_key 4,6 NULL 2 x
SELECT
outr.col_time_key AS x
FROM c AS outr
diff --git a/mysql-test/suite/gcol/r/gcol_purge.result b/mysql-test/suite/gcol/r/gcol_purge.result
new file mode 100644
index 00000000000..ea8369ad8e5
--- /dev/null
+++ b/mysql-test/suite/gcol/r/gcol_purge.result
@@ -0,0 +1,22 @@
+CREATE TABLE t1(f1 INT NOT NULL, f2 int not null,
+f3 int generated always as (f2 * 2) VIRTUAL,
+primary key(f1), INDEX (f3))ENGINE=InnoDB;
+connect con1,localhost,root,,,;
+START TRANSACTION WITH CONSISTENT SNAPSHOT;
+connection default;
+INSERT INTO t1(f1, f2) VALUES(1,2);
+DELETE from t1 where f1 = 1;
+connect con2,localhost,root,,,;
+begin;
+INSERT INTO t1 (f1, f2) VALUES(1,2);
+set global debug_dbug="+d,ib_purge_virtual_index_callback";
+connection con1;
+COMMIT;
+InnoDB 0 transactions not purged
+connection con2;
+commit;
+disconnect con1;
+disconnect con2;
+connection default;
+set global debug_dbug=default;
+DROP TABLE t1;
diff --git a/mysql-test/suite/gcol/r/gcol_select_innodb.result b/mysql-test/suite/gcol/r/gcol_select_innodb.result
index 4e308bc8fc5..17acbcf2bb2 100644
--- a/mysql-test/suite/gcol/r/gcol_select_innodb.result
+++ b/mysql-test/suite/gcol/r/gcol_select_innodb.result
@@ -89,8 +89,8 @@ a b c
2 -2 -2
explain select * from t1 where c in (select c from t3 where c between -2 and -1);
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t3 index c c 5 NULL 6 Using where; Using index
-1 PRIMARY t1 ALL c NULL NULL NULL 5 Using where; Using join buffer (flat, BNL join)
+1 PRIMARY t3 range c c 5 NULL 2 Using where; Using index
+1 PRIMARY t1 ref c c 5 test.t3.c 1
# select_type=UNION, type=system
# select_type=UNION RESULT, type=<union1,2>
select * from t1 union select * from t2;
@@ -146,7 +146,7 @@ count(distinct c)
3
explain select count(distinct c) from t1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL c 5 NULL 6 Using index for group-by (scanning)
+1 SIMPLE t1 range NULL c 5 NULL 6 Using index for group-by
###
### filesort & range-based utils
###
diff --git a/mysql-test/suite/gcol/r/gcol_select_myisam.result b/mysql-test/suite/gcol/r/gcol_select_myisam.result
index 81632c8b3cf..77ab0cdb926 100644
--- a/mysql-test/suite/gcol/r/gcol_select_myisam.result
+++ b/mysql-test/suite/gcol/r/gcol_select_myisam.result
@@ -89,7 +89,7 @@ a b c
2 -2 -2
explain select * from t1 where c in (select c from t3 where c between -2 and -1);
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t3 index c c 5 NULL 6 Using where; Using index
+1 PRIMARY t3 range c c 5 NULL 2 Using where; Using index
1 PRIMARY t1 ref c c 5 test.t3.c 1
# select_type=UNION, type=system
# select_type=UNION RESULT, type=<union1,2>
@@ -146,7 +146,7 @@ count(distinct c)
3
explain select count(distinct c) from t1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL c 5 NULL 6 Using index for group-by (scanning)
+1 SIMPLE t1 range NULL c 5 NULL 6 Using index for group-by
###
### filesort & range-based utils
###
@@ -1121,7 +1121,7 @@ id select_type table type possible_keys key key_len ref rows Extra
EXPLAIN SELECT * FROM t2 AS t1 WHERE b NOT IN (SELECT b FROM t1 FORCE INDEX(b));
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 system NULL NULL NULL NULL 1
-2 SUBQUERY t1 index_subquery b b 5 func 2 Using index; Full scan on NULL key
+2 SUBQUERY t1 index_subquery b b 5 func 3 Using index; Full scan on NULL key
DROP TABLE t1;
DROP TABLE t2, t3;
#
diff --git a/mysql-test/suite/gcol/r/innodb_virtual_debug_purge.result b/mysql-test/suite/gcol/r/innodb_virtual_debug_purge.result
index 2ed1f917ca6..3658e38125f 100644
--- a/mysql-test/suite/gcol/r/innodb_virtual_debug_purge.result
+++ b/mysql-test/suite/gcol/r/innodb_virtual_debug_purge.result
@@ -204,77 +204,5 @@ connection truncate;
disconnect truncate;
connection default;
DROP TABLE t1, t2;
-#
-# MDEV-16222 Assertion `0' failed in row_purge_remove_sec_if_poss_leaf
-# on table with virtual columns and indexes
-#
-InnoDB 0 transactions not purged
-SET @saved_dbug= @@GLOBAL.debug_dbug;
-set global debug_dbug= "d,ib_purge_virtual_mdev_16222_1,ib_purge_virtual_mdev_16222_2";
-create table t1 (
-pk serial, vb tinyblob as (b) virtual, b tinyblob,
-primary key(pk), index (vb(64)))
-engine innodb;
-insert ignore into t1 (b) values ('foo');
-select * into outfile 'load.data' from t1;
-load data infile 'load.data' replace into table t1;
-set debug_sync= "now WAIT_FOR latch_released";
-set global debug_dbug= @saved_dbug;
-drop table t1;
-set debug_sync= "now SIGNAL drop_started WAIT_FOR got_no_such_table";
-create table t1 (
-pk serial, vb tinyblob as (b) virtual, b tinyblob,
-primary key(pk), index (vb(64)))
-engine innodb;
-insert ignore into t1 (b) values ('foo');
-select * into outfile 'load.data' from t1;
-load data infile 'load.data' replace into table t1;
-set debug_sync= "now WAIT_FOR got_no_such_table";
-set global debug_dbug= @saved_dbug;
-drop table t1;
set debug_sync=reset;
-#
-# MDEV-18546 ASAN heap-use-after-free
-# in innobase_get_computed_value / row_purge
-#
-CREATE TABLE t1 (
-pk INT AUTO_INCREMENT,
-b BIT(15),
-v BIT(15) AS (b) VIRTUAL,
-PRIMARY KEY(pk),
-UNIQUE(v)
-) ENGINE=InnoDB;
-INSERT IGNORE INTO t1 (b) VALUES
-(NULL),(b'011'),(b'000110100'),
-(b'01101101010'),(b'01111001001011'),(NULL);
-SET GLOBAL innodb_debug_sync = "ib_clust_v_col_before_row_allocated "
- "SIGNAL before_row_allocated "
- "WAIT_FOR flush_unlock";
-SET GLOBAL innodb_debug_sync = "ib_open_after_dict_open "
- "SIGNAL purge_open "
- "WAIT_FOR select_open";
-set global debug_dbug= "d,ib_purge_virtual_index_callback";
-connect purge_waiter,localhost,root;
-SET debug_sync= "now WAIT_FOR before_row_allocated";
-connection default;
-REPLACE INTO t1 (pk, b) SELECT pk, b FROM t1;
-connection purge_waiter;
-connection default;
-disconnect purge_waiter;
-FLUSH TABLES;
-SET GLOBAL innodb_debug_sync = reset;
-SET debug_sync= "now SIGNAL flush_unlock WAIT_FOR purge_open";
-SET GLOBAL innodb_debug_sync = reset;
-SET debug_sync= "ib_open_after_dict_open SIGNAL select_open";
-SELECT * FROM t1;
-pk b v
-1 NULL NULL
-2
-3
-4 j j
-5 K K
-6 NULL NULL
-DROP TABLE t1;
-SET debug_sync= reset;
-set global debug_dbug= @old_dbug;
SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency;
diff --git a/mysql-test/suite/gcol/r/innodb_virtual_stats.result b/mysql-test/suite/gcol/r/innodb_virtual_stats.result
index 4ef499f932f..c0f595263df 100644
--- a/mysql-test/suite/gcol/r/innodb_virtual_stats.result
+++ b/mysql-test/suite/gcol/r/innodb_virtual_stats.result
@@ -24,6 +24,9 @@ vidxcd n_diff_pfx03 c,d,DB_ROW_ID
vidxcd n_leaf_pages Number of leaf pages in the index
vidxcd size Number of pages in the index
ALTER TABLE t ADD COLUMN e INT GENERATED ALWAYS AS(a+a+b), ADD INDEX idxb (b), ALGORITHM=INPLACE;
+select count(*) from t;
+count(*)
+1
SELECT index_name, stat_name, stat_description
FROM mysql.innodb_index_stats
WHERE database_name = 'test' AND table_name = 't';
@@ -45,6 +48,9 @@ vidxcd n_diff_pfx03 c,d,DB_ROW_ID
vidxcd n_leaf_pages Number of leaf pages in the index
vidxcd size Number of pages in the index
ALTER TABLE t DROP COLUMN c, DROP INDEX idxa, ALGORITHM=INPLACE;
+select count(*) from t;
+count(*)
+1
SELECT index_name, stat_name, stat_description
FROM mysql.innodb_index_stats
WHERE database_name = 'test' AND table_name = 't';
@@ -61,6 +67,9 @@ vidxcd n_diff_pfx02 d,DB_ROW_ID
vidxcd n_leaf_pages Number of leaf pages in the index
vidxcd size Number of pages in the index
ALTER TABLE t ADD INDEX vidxe (e), ALGORITHM=INPLACE;
+select count(*) from t;
+count(*)
+1
SELECT index_name, stat_name, stat_description
FROM mysql.innodb_index_stats
WHERE database_name = 'test' AND table_name = 't';
@@ -81,6 +90,9 @@ vidxe n_diff_pfx02 e,DB_ROW_ID
vidxe n_leaf_pages Number of leaf pages in the index
vidxe size Number of pages in the index
ALTER TABLE t ADD COLUMN f INT GENERATED ALWAYS AS(a + a), ADD INDEX vidxf (f), ALGORITHM=INPLACE;
+select count(*) from t;
+count(*)
+1
SELECT index_name, stat_name, stat_description
FROM mysql.innodb_index_stats
WHERE database_name = 'test' AND table_name = 't';
diff --git a/mysql-test/suite/gcol/r/main_alter_table.result b/mysql-test/suite/gcol/r/main_alter_table.result
index 864169ee16c..77c0a382922 100644
--- a/mysql-test/suite/gcol/r/main_alter_table.result
+++ b/mysql-test/suite/gcol/r/main_alter_table.result
@@ -38,7 +38,7 @@ INFORMATION_SCHEMA.INNODB_SYS_TABLES AS T JOIN
INFORMATION_SCHEMA.INNODB_SYS_INDEXES AS I JOIN
INFORMATION_SCHEMA.INNODB_SYS_FIELDS AS F
ON I.INDEX_ID = F.INDEX_ID AND I.TABLE_ID = T.TABLE_ID
-WHERE T.NAME LIKE 'test/%';
+WHERE T.NAME LIKE 'test/t%';
TABLE_NAME INDEX_NAME IS_PRIMARY_KEY FIELD_NAME FIELD_POS
test/t0 a yes a 0
test/t1 a no a 0
diff --git a/mysql-test/suite/gcol/t/gcol_purge.test b/mysql-test/suite/gcol/t/gcol_purge.test
new file mode 100644
index 00000000000..3696b41b3d8
--- /dev/null
+++ b/mysql-test/suite/gcol/t/gcol_purge.test
@@ -0,0 +1,30 @@
+--source include/have_innodb.inc
+--source include/have_debug.inc
+CREATE TABLE t1(f1 INT NOT NULL, f2 int not null,
+ f3 int generated always as (f2 * 2) VIRTUAL,
+ primary key(f1), INDEX (f3))ENGINE=InnoDB;
+connect(con1,localhost,root,,,);
+START TRANSACTION WITH CONSISTENT SNAPSHOT;
+
+connection default;
+INSERT INTO t1(f1, f2) VALUES(1,2);
+DELETE from t1 where f1 = 1;
+
+connect(con2,localhost,root,,,);
+begin;
+INSERT INTO t1 (f1, f2) VALUES(1,2);
+
+set global debug_dbug="+d,ib_purge_virtual_index_callback";
+connection con1;
+COMMIT;
+
+--source ../innodb/include/wait_all_purged.inc
+
+connection con2;
+commit;
+
+disconnect con1;
+disconnect con2;
+connection default;
+set global debug_dbug=default;
+DROP TABLE t1;
diff --git a/mysql-test/suite/gcol/t/innodb_virtual_debug_purge.test b/mysql-test/suite/gcol/t/innodb_virtual_debug_purge.test
index 9549c2f0f10..cdec8107095 100644
--- a/mysql-test/suite/gcol/t/innodb_virtual_debug_purge.test
+++ b/mysql-test/suite/gcol/t/innodb_virtual_debug_purge.test
@@ -259,119 +259,7 @@ disconnect truncate;
connection default;
DROP TABLE t1, t2;
---echo #
---echo # MDEV-16222 Assertion `0' failed in row_purge_remove_sec_if_poss_leaf
---echo # on table with virtual columns and indexes
---echo #
-
---source suite/innodb/include/wait_all_purged.inc
---let $datadir= `select @@datadir`
-SET @saved_dbug= @@GLOBAL.debug_dbug;
-set global debug_dbug= "d,ib_purge_virtual_mdev_16222_1,ib_purge_virtual_mdev_16222_2";
-
-create table t1 (
- pk serial, vb tinyblob as (b) virtual, b tinyblob,
- primary key(pk), index (vb(64)))
-engine innodb;
-
-insert ignore into t1 (b) values ('foo');
-
-select * into outfile 'load.data' from t1;
-load data infile 'load.data' replace into table t1;
-
-set debug_sync= "now WAIT_FOR latch_released";
-set global debug_dbug= @saved_dbug;
-drop table t1;
---remove_file $datadir/test/load.data
-
-set debug_sync= "now SIGNAL drop_started WAIT_FOR got_no_such_table";
-
-create table t1 (
- pk serial, vb tinyblob as (b) virtual, b tinyblob,
- primary key(pk), index (vb(64)))
-engine innodb;
-
-insert ignore into t1 (b) values ('foo');
-
-select * into outfile 'load.data' from t1;
-load data infile 'load.data' replace into table t1;
-
-set debug_sync= "now WAIT_FOR got_no_such_table";
-
-# FIXME: Race condition here:
-# 1. purge thread goes into sending got_no_such_table
-# 2. test thread finishes debug_sync= "RESET" below
-# 3. purge thread sends got_no_such_table
-set global debug_dbug= @saved_dbug;
-
-# cleanup
-drop table t1;
---remove_file $datadir/test/load.data
-
--source include/wait_until_count_sessions.inc
set debug_sync=reset;
---echo #
---echo # MDEV-18546 ASAN heap-use-after-free
---echo # in innobase_get_computed_value / row_purge
---echo #
-
-CREATE TABLE t1 (
- pk INT AUTO_INCREMENT,
- b BIT(15),
- v BIT(15) AS (b) VIRTUAL,
- PRIMARY KEY(pk),
- UNIQUE(v)
-) ENGINE=InnoDB;
-INSERT IGNORE INTO t1 (b) VALUES
- (NULL),(b'011'),(b'000110100'),
- (b'01101101010'),(b'01111001001011'),(NULL);
-
-SET GLOBAL innodb_debug_sync = "ib_clust_v_col_before_row_allocated "
- "SIGNAL before_row_allocated "
- "WAIT_FOR flush_unlock";
-SET GLOBAL innodb_debug_sync = "ib_open_after_dict_open "
- "SIGNAL purge_open "
- "WAIT_FOR select_open";
-
-# In 10.2 trx_undo_roll_ptr_is_insert(t_roll_ptr) condition never pass in purge,
-# so this condition is forced to pass in row_vers_old_has_index_entry
-set global debug_dbug= "d,ib_purge_virtual_index_callback";
-
-# The purge starts from REPLACE command. To avoid possible race, separate
-# connection is used.
---connect(purge_waiter,localhost,root)
---send
-SET debug_sync= "now WAIT_FOR before_row_allocated";
-
---connection default
-REPLACE INTO t1 (pk, b) SELECT pk, b FROM t1;
-
---connection purge_waiter
-# Now we will definitely catch ib_clust_v_col_before_row_allocated
---reap
---connection default
---disconnect purge_waiter
-
-# purge hangs on the sync point. table is purged, ref_count is set to 0
-FLUSH TABLES;
-
-# Avoid hang on repeating purge.
-# Reset Will be applied after first record is purged
-SET GLOBAL innodb_debug_sync = reset;
-
-SET debug_sync= "now SIGNAL flush_unlock WAIT_FOR purge_open";
-
-# Avoid hang on repeating purge
-SET GLOBAL innodb_debug_sync = reset;
-
-# select unblocks purge thread
-SET debug_sync= "ib_open_after_dict_open SIGNAL select_open";
-SELECT * FROM t1;
-
-# Cleanup
-DROP TABLE t1;
-SET debug_sync= reset;
-set global debug_dbug= @old_dbug;
-
SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency;
diff --git a/mysql-test/suite/gcol/t/innodb_virtual_stats.test b/mysql-test/suite/gcol/t/innodb_virtual_stats.test
index 7e3c8f4e00e..69c67af8ed1 100644
--- a/mysql-test/suite/gcol/t/innodb_virtual_stats.test
+++ b/mysql-test/suite/gcol/t/innodb_virtual_stats.test
@@ -20,24 +20,28 @@ FROM mysql.innodb_index_stats
WHERE database_name = 'test' AND table_name = 't';
ALTER TABLE t ADD COLUMN e INT GENERATED ALWAYS AS(a+a+b), ADD INDEX idxb (b), ALGORITHM=INPLACE;
+select count(*) from t;
SELECT index_name, stat_name, stat_description
FROM mysql.innodb_index_stats
WHERE database_name = 'test' AND table_name = 't';
ALTER TABLE t DROP COLUMN c, DROP INDEX idxa, ALGORITHM=INPLACE;
+select count(*) from t;
SELECT index_name, stat_name, stat_description
FROM mysql.innodb_index_stats
WHERE database_name = 'test' AND table_name = 't';
ALTER TABLE t ADD INDEX vidxe (e), ALGORITHM=INPLACE;
+select count(*) from t;
SELECT index_name, stat_name, stat_description
FROM mysql.innodb_index_stats
WHERE database_name = 'test' AND table_name = 't';
ALTER TABLE t ADD COLUMN f INT GENERATED ALWAYS AS(a + a), ADD INDEX vidxf (f), ALGORITHM=INPLACE;
+select count(*) from t;
SELECT index_name, stat_name, stat_description
FROM mysql.innodb_index_stats
diff --git a/mysql-test/suite/gcol/t/main_alter_table.test b/mysql-test/suite/gcol/t/main_alter_table.test
index bbd87350cb1..2ce768a9f4c 100644
--- a/mysql-test/suite/gcol/t/main_alter_table.test
+++ b/mysql-test/suite/gcol/t/main_alter_table.test
@@ -41,7 +41,7 @@ SELECT T.NAME AS TABLE_NAME, I.NAME AS INDEX_NAME,
INFORMATION_SCHEMA.INNODB_SYS_INDEXES AS I JOIN
INFORMATION_SCHEMA.INNODB_SYS_FIELDS AS F
ON I.INDEX_ID = F.INDEX_ID AND I.TABLE_ID = T.TABLE_ID
- WHERE T.NAME LIKE 'test/%';
+ WHERE T.NAME LIKE 'test/t%';
DROP TABLE t0;
DROP TABLE t1;
diff --git a/mysql-test/suite/handler/aria.result b/mysql-test/suite/handler/aria.result
index 1896e30f7d5..e34164957a3 100644
--- a/mysql-test/suite/handler/aria.result
+++ b/mysql-test/suite/handler/aria.result
@@ -1,4 +1,4 @@
-SET SESSION STORAGE_ENGINE = Aria;
+SET SESSION DEFAULT_STORAGE_ENGINE = Aria;
drop table if exists t1,t3,t4,t5;
create table t1 (a int, b char(10), key a using btree (a), key b using btree (a,b));
insert into t1 values
@@ -1132,166 +1132,7 @@ connection default;
# Reaping 'select * from t2'
ERROR 42S02: Table 'test.t2' doesn't exist
handler t1 close;
-#
-# ROLLBACK TO SAVEPOINT releases transactional locks,
-# but has no effect on open HANDLERs
-#
-create table t2 like t1;
-create table t3 like t1;
-begin;
-# Have something before the savepoint
-select * from t3;
-a
-savepoint sv;
-handler t1 open;
-handler t1 read a first;
-a
-1
-handler t1 read a next;
-a
-2
-select * from t2;
-a
-connection con1;
-# Sending:
drop table t1;
-connection con2;
-# Sending:
-drop table t2;
-connection default;
-# Let DROP TABLE statements sync in. We must use
-# a separate connection for that, because otherwise SELECT
-# will auto-close the HANDLERs, becaues there are pending
-# exclusive locks against them.
-connection con3;
-# Waiting for 'drop table t1' to get blocked...
-# Waiting for 'drop table t2' to get blocked...
-# Demonstrate that t2 lock was released and t2 was dropped
-# after ROLLBACK TO SAVEPOINT
-connection default;
-rollback to savepoint sv;
-connection con2;
-# Reaping 'drop table t2'...
-# Demonstrate that ROLLBACK TO SAVEPOINT didn't release the handler
-# lock.
-connection default;
-handler t1 read a next;
-a
-3
-handler t1 read a next;
-a
-4
-# Demonstrate that the drop will go through as soon as we close the
-# HANDLER
-handler t1 close;
-connection con1;
-# Reaping 'drop table t1'...
-connection default;
-commit;
-drop table t3;
-#
-# A few special cases when using SAVEPOINT/ROLLBACK TO
-# SAVEPOINT and HANDLER.
-#
-# Show that rollback to the savepoint taken in the beginning
-# of the transaction doesn't release mdl lock on
-# the HANDLER that was opened later.
-#
-create table t1 (a int, key using btree (a));
-insert into t1 (a) values (1), (2), (3), (4), (5);
-create table t2 like t1;
-begin;
-savepoint sv;
-handler t1 open;
-handler t1 read a first;
-a
-1
-handler t1 read a next;
-a
-2
-select * from t2;
-a
-connection con1;
-# Sending:
-drop table t1;
-connection con2;
-# Sending:
-drop table t2;
-connection default;
-# Let DROP TABLE statements sync in. We must use
-# a separate connection for that, because otherwise SELECT
-# will auto-close the HANDLERs, becaues there are pending
-# exclusive locks against them.
-connection con3;
-# Waiting for 'drop table t1' to get blocked...
-# Waiting for 'drop table t2' to get blocked...
-# Demonstrate that t2 lock was released and t2 was dropped
-# after ROLLBACK TO SAVEPOINT
-connection default;
-rollback to savepoint sv;
-connection con2;
-# Reaping 'drop table t2'...
-# Demonstrate that ROLLBACK TO SAVEPOINT didn't release the handler
-# lock.
-connection default;
-handler t1 read a next;
-a
-3
-handler t1 read a next;
-a
-4
-# Demonstrate that the drop will go through as soon as we close the
-# HANDLER
-handler t1 close;
-connection con1;
-# Reaping 'drop table t1'...
-connection default;
-commit;
-#
-# Show that rollback to the savepoint taken in the beginning
-# of the transaction works properly (no valgrind warnins, etc),
-# even though it's done after the HANDLER mdl lock that was there
-# at the beginning is released and added again.
-#
-create table t1 (a int, key using btree (a));
-insert into t1 (a) values (1), (2), (3), (4), (5);
-create table t2 like t1;
-create table t3 like t1;
-insert into t3 (a) select a from t1;
-begin;
-handler t1 open;
-savepoint sv;
-handler t1 read a first;
-a
-1
-select * from t2;
-a
-handler t1 close;
-handler t3 open;
-handler t3 read a first;
-a
-1
-rollback to savepoint sv;
-connection con1;
-drop table t1, t2;
-# Sending:
-drop table t3;
-# Let DROP TABLE statement sync in.
-connection con2;
-# Waiting for 'drop table t3' to get blocked...
-# Demonstrate that ROLLBACK TO SAVEPOINT didn't release the handler
-# lock.
-connection default;
-handler t3 read a next;
-a
-2
-# Demonstrate that the drop will go through as soon as we close the
-# HANDLER
-handler t3 close;
-connection con1;
-# Reaping 'drop table t3'...
-connection default;
-commit;
#
# If we have to wait on an exclusive locks while having
# an open HANDLER, ER_LOCK_DEADLOCK is reported.
diff --git a/mysql-test/suite/handler/handler.inc b/mysql-test/suite/handler/handler.inc
index c29ee0c693d..f4c677adc90 100644
--- a/mysql-test/suite/handler/handler.inc
+++ b/mysql-test/suite/handler/handler.inc
@@ -890,166 +890,7 @@ connection default;
--error ER_NO_SUCH_TABLE
reap;
handler t1 close;
-
---echo #
---echo # ROLLBACK TO SAVEPOINT releases transactional locks,
---echo # but has no effect on open HANDLERs
---echo #
-create table t2 like t1;
-create table t3 like t1;
-begin;
---echo # Have something before the savepoint
-select * from t3;
-savepoint sv;
-handler t1 open;
-handler t1 read a first;
-handler t1 read a next;
-select * from t2;
-connection con1;
---echo # Sending:
---send drop table t1
-connection con2;
---echo # Sending:
---send drop table t2
-connection default;
---echo # Let DROP TABLE statements sync in. We must use
---echo # a separate connection for that, because otherwise SELECT
---echo # will auto-close the HANDLERs, becaues there are pending
---echo # exclusive locks against them.
-connection con3;
---echo # Waiting for 'drop table t1' to get blocked...
-let $wait_condition=select count(*)=1 from information_schema.processlist
- where state='Waiting for table metadata lock' and
- info='drop table t1';
---source include/wait_condition.inc
---echo # Waiting for 'drop table t2' to get blocked...
-let $wait_condition=select count(*)=1 from information_schema.processlist
- where state='Waiting for table metadata lock' and
- info='drop table t2';
---source include/wait_condition.inc
---echo # Demonstrate that t2 lock was released and t2 was dropped
---echo # after ROLLBACK TO SAVEPOINT
-connection default;
-rollback to savepoint sv;
-connection con2;
---echo # Reaping 'drop table t2'...
---reap
---echo # Demonstrate that ROLLBACK TO SAVEPOINT didn't release the handler
---echo # lock.
-connection default;
-handler t1 read a next;
-handler t1 read a next;
---echo # Demonstrate that the drop will go through as soon as we close the
---echo # HANDLER
-handler t1 close;
-connection con1;
---echo # Reaping 'drop table t1'...
---reap
-connection default;
-commit;
-drop table t3;
---echo #
---echo # A few special cases when using SAVEPOINT/ROLLBACK TO
---echo # SAVEPOINT and HANDLER.
---echo #
---echo # Show that rollback to the savepoint taken in the beginning
---echo # of the transaction doesn't release mdl lock on
---echo # the HANDLER that was opened later.
---echo #
-create table t1 (a int, key using btree (a));
-insert into t1 (a) values (1), (2), (3), (4), (5);
-create table t2 like t1;
-begin;
-savepoint sv;
-handler t1 open;
-handler t1 read a first;
-handler t1 read a next;
-select * from t2;
-connection con1;
---echo # Sending:
---send drop table t1
-connection con2;
---echo # Sending:
---send drop table t2
-connection default;
---echo # Let DROP TABLE statements sync in. We must use
---echo # a separate connection for that, because otherwise SELECT
---echo # will auto-close the HANDLERs, becaues there are pending
---echo # exclusive locks against them.
-connection con3;
---echo # Waiting for 'drop table t1' to get blocked...
-let $wait_condition=select count(*)=1 from information_schema.processlist
- where state='Waiting for table metadata lock' and
- info='drop table t1';
---source include/wait_condition.inc
---echo # Waiting for 'drop table t2' to get blocked...
-let $wait_condition=select count(*)=1 from information_schema.processlist
- where state='Waiting for table metadata lock' and
- info='drop table t2';
---source include/wait_condition.inc
---echo # Demonstrate that t2 lock was released and t2 was dropped
---echo # after ROLLBACK TO SAVEPOINT
-connection default;
-rollback to savepoint sv;
-connection con2;
---echo # Reaping 'drop table t2'...
---reap
---echo # Demonstrate that ROLLBACK TO SAVEPOINT didn't release the handler
---echo # lock.
-connection default;
-handler t1 read a next;
-handler t1 read a next;
---echo # Demonstrate that the drop will go through as soon as we close the
---echo # HANDLER
-handler t1 close;
-connection con1;
---echo # Reaping 'drop table t1'...
---reap
-connection default;
-commit;
---echo #
---echo # Show that rollback to the savepoint taken in the beginning
---echo # of the transaction works properly (no valgrind warnins, etc),
---echo # even though it's done after the HANDLER mdl lock that was there
---echo # at the beginning is released and added again.
---echo #
-create table t1 (a int, key using btree (a));
-insert into t1 (a) values (1), (2), (3), (4), (5);
-create table t2 like t1;
-create table t3 like t1;
-insert into t3 (a) select a from t1;
-begin;
-handler t1 open;
-savepoint sv;
-handler t1 read a first;
-select * from t2;
-handler t1 close;
-handler t3 open;
-handler t3 read a first;
-rollback to savepoint sv;
-connection con1;
-drop table t1, t2;
---echo # Sending:
---send drop table t3
---echo # Let DROP TABLE statement sync in.
-connection con2;
---echo # Waiting for 'drop table t3' to get blocked...
-let $wait_condition=select count(*)=1 from information_schema.processlist
- where state='Waiting for table metadata lock' and
- info='drop table t3';
---source include/wait_condition.inc
---echo # Demonstrate that ROLLBACK TO SAVEPOINT didn't release the handler
---echo # lock.
-connection default;
-handler t3 read a next;
---echo # Demonstrate that the drop will go through as soon as we close the
---echo # HANDLER
-handler t3 close;
-connection con1;
---echo # Reaping 'drop table t3'...
---reap
-connection default;
-commit;
+drop table t1;
--echo #
--echo # If we have to wait on an exclusive locks while having
diff --git a/mysql-test/suite/handler/heap.result b/mysql-test/suite/handler/heap.result
index 32d06b79604..e66bccb1341 100644
--- a/mysql-test/suite/handler/heap.result
+++ b/mysql-test/suite/handler/heap.result
@@ -1,4 +1,4 @@
-SET SESSION STORAGE_ENGINE = MEMORY;
+SET SESSION DEFAULT_STORAGE_ENGINE = MEMORY;
drop table if exists t1,t3,t4,t5;
create table t1 (a int, b char(10), key a using btree (a), key b using btree (a,b));
insert into t1 values
@@ -1131,166 +1131,7 @@ connection default;
# Reaping 'select * from t2'
ERROR 42S02: Table 'test.t2' doesn't exist
handler t1 close;
-#
-# ROLLBACK TO SAVEPOINT releases transactional locks,
-# but has no effect on open HANDLERs
-#
-create table t2 like t1;
-create table t3 like t1;
-begin;
-# Have something before the savepoint
-select * from t3;
-a
-savepoint sv;
-handler t1 open;
-handler t1 read a first;
-a
-1
-handler t1 read a next;
-a
-2
-select * from t2;
-a
-connection con1;
-# Sending:
drop table t1;
-connection con2;
-# Sending:
-drop table t2;
-connection default;
-# Let DROP TABLE statements sync in. We must use
-# a separate connection for that, because otherwise SELECT
-# will auto-close the HANDLERs, becaues there are pending
-# exclusive locks against them.
-connection con3;
-# Waiting for 'drop table t1' to get blocked...
-# Waiting for 'drop table t2' to get blocked...
-# Demonstrate that t2 lock was released and t2 was dropped
-# after ROLLBACK TO SAVEPOINT
-connection default;
-rollback to savepoint sv;
-connection con2;
-# Reaping 'drop table t2'...
-# Demonstrate that ROLLBACK TO SAVEPOINT didn't release the handler
-# lock.
-connection default;
-handler t1 read a next;
-a
-3
-handler t1 read a next;
-a
-4
-# Demonstrate that the drop will go through as soon as we close the
-# HANDLER
-handler t1 close;
-connection con1;
-# Reaping 'drop table t1'...
-connection default;
-commit;
-drop table t3;
-#
-# A few special cases when using SAVEPOINT/ROLLBACK TO
-# SAVEPOINT and HANDLER.
-#
-# Show that rollback to the savepoint taken in the beginning
-# of the transaction doesn't release mdl lock on
-# the HANDLER that was opened later.
-#
-create table t1 (a int, key using btree (a));
-insert into t1 (a) values (1), (2), (3), (4), (5);
-create table t2 like t1;
-begin;
-savepoint sv;
-handler t1 open;
-handler t1 read a first;
-a
-1
-handler t1 read a next;
-a
-2
-select * from t2;
-a
-connection con1;
-# Sending:
-drop table t1;
-connection con2;
-# Sending:
-drop table t2;
-connection default;
-# Let DROP TABLE statements sync in. We must use
-# a separate connection for that, because otherwise SELECT
-# will auto-close the HANDLERs, becaues there are pending
-# exclusive locks against them.
-connection con3;
-# Waiting for 'drop table t1' to get blocked...
-# Waiting for 'drop table t2' to get blocked...
-# Demonstrate that t2 lock was released and t2 was dropped
-# after ROLLBACK TO SAVEPOINT
-connection default;
-rollback to savepoint sv;
-connection con2;
-# Reaping 'drop table t2'...
-# Demonstrate that ROLLBACK TO SAVEPOINT didn't release the handler
-# lock.
-connection default;
-handler t1 read a next;
-a
-3
-handler t1 read a next;
-a
-4
-# Demonstrate that the drop will go through as soon as we close the
-# HANDLER
-handler t1 close;
-connection con1;
-# Reaping 'drop table t1'...
-connection default;
-commit;
-#
-# Show that rollback to the savepoint taken in the beginning
-# of the transaction works properly (no valgrind warnins, etc),
-# even though it's done after the HANDLER mdl lock that was there
-# at the beginning is released and added again.
-#
-create table t1 (a int, key using btree (a));
-insert into t1 (a) values (1), (2), (3), (4), (5);
-create table t2 like t1;
-create table t3 like t1;
-insert into t3 (a) select a from t1;
-begin;
-handler t1 open;
-savepoint sv;
-handler t1 read a first;
-a
-1
-select * from t2;
-a
-handler t1 close;
-handler t3 open;
-handler t3 read a first;
-a
-1
-rollback to savepoint sv;
-connection con1;
-drop table t1, t2;
-# Sending:
-drop table t3;
-# Let DROP TABLE statement sync in.
-connection con2;
-# Waiting for 'drop table t3' to get blocked...
-# Demonstrate that ROLLBACK TO SAVEPOINT didn't release the handler
-# lock.
-connection default;
-handler t3 read a next;
-a
-2
-# Demonstrate that the drop will go through as soon as we close the
-# HANDLER
-handler t3 close;
-connection con1;
-# Reaping 'drop table t3'...
-connection default;
-commit;
#
# If we have to wait on an exclusive locks while having
# an open HANDLER, ER_LOCK_DEADLOCK is reported.
diff --git a/mysql-test/suite/handler/init.inc b/mysql-test/suite/handler/init.inc
index ff5b2218ed1..7418bbb116d 100644
--- a/mysql-test/suite/handler/init.inc
+++ b/mysql-test/suite/handler/init.inc
@@ -15,7 +15,7 @@
#
-- source include/not_embedded.inc
-eval SET SESSION STORAGE_ENGINE = $engine_type;
+eval SET SESSION DEFAULT_STORAGE_ENGINE = $engine_type;
let $other_handler_engine_type= MyISAM;
--disable_warnings
diff --git a/mysql-test/suite/handler/innodb.result b/mysql-test/suite/handler/innodb.result
index a1b2b318911..dac6b2e997b 100644
--- a/mysql-test/suite/handler/innodb.result
+++ b/mysql-test/suite/handler/innodb.result
@@ -1,4 +1,4 @@
-SET SESSION STORAGE_ENGINE = InnoDB;
+SET SESSION DEFAULT_STORAGE_ENGINE = InnoDB;
drop table if exists t1,t3,t4,t5;
create table t1 (a int, b char(10), key a using btree (a), key b using btree (a,b));
insert into t1 values
@@ -1136,166 +1136,7 @@ connection default;
# Reaping 'select * from t2'
ERROR 42S02: Table 'test.t2' doesn't exist
handler t1 close;
-#
-# ROLLBACK TO SAVEPOINT releases transactional locks,
-# but has no effect on open HANDLERs
-#
-create table t2 like t1;
-create table t3 like t1;
-begin;
-# Have something before the savepoint
-select * from t3;
-a
-savepoint sv;
-handler t1 open;
-handler t1 read a first;
-a
-1
-handler t1 read a next;
-a
-2
-select * from t2;
-a
-connection con1;
-# Sending:
-drop table t1;
-connection con2;
-# Sending:
-drop table t2;
-connection default;
-# Let DROP TABLE statements sync in. We must use
-# a separate connection for that, because otherwise SELECT
-# will auto-close the HANDLERs, becaues there are pending
-# exclusive locks against them.
-connection con3;
-# Waiting for 'drop table t1' to get blocked...
-# Waiting for 'drop table t2' to get blocked...
-# Demonstrate that t2 lock was released and t2 was dropped
-# after ROLLBACK TO SAVEPOINT
-connection default;
-rollback to savepoint sv;
-connection con2;
-# Reaping 'drop table t2'...
-# Demonstrate that ROLLBACK TO SAVEPOINT didn't release the handler
-# lock.
-connection default;
-handler t1 read a next;
-a
-3
-handler t1 read a next;
-a
-4
-# Demonstrate that the drop will go through as soon as we close the
-# HANDLER
-handler t1 close;
-connection con1;
-# Reaping 'drop table t1'...
-connection default;
-commit;
-drop table t3;
-#
-# A few special cases when using SAVEPOINT/ROLLBACK TO
-# SAVEPOINT and HANDLER.
-#
-# Show that rollback to the savepoint taken in the beginning
-# of the transaction doesn't release mdl lock on
-# the HANDLER that was opened later.
-#
-create table t1 (a int, key using btree (a));
-insert into t1 (a) values (1), (2), (3), (4), (5);
-create table t2 like t1;
-begin;
-savepoint sv;
-handler t1 open;
-handler t1 read a first;
-a
-1
-handler t1 read a next;
-a
-2
-select * from t2;
-a
-connection con1;
-# Sending:
drop table t1;
-connection con2;
-# Sending:
-drop table t2;
-connection default;
-# Let DROP TABLE statements sync in. We must use
-# a separate connection for that, because otherwise SELECT
-# will auto-close the HANDLERs, becaues there are pending
-# exclusive locks against them.
-connection con3;
-# Waiting for 'drop table t1' to get blocked...
-# Waiting for 'drop table t2' to get blocked...
-# Demonstrate that t2 lock was released and t2 was dropped
-# after ROLLBACK TO SAVEPOINT
-connection default;
-rollback to savepoint sv;
-connection con2;
-# Reaping 'drop table t2'...
-# Demonstrate that ROLLBACK TO SAVEPOINT didn't release the handler
-# lock.
-connection default;
-handler t1 read a next;
-a
-3
-handler t1 read a next;
-a
-4
-# Demonstrate that the drop will go through as soon as we close the
-# HANDLER
-handler t1 close;
-connection con1;
-# Reaping 'drop table t1'...
-connection default;
-commit;
-#
-# Show that rollback to the savepoint taken in the beginning
-# of the transaction works properly (no valgrind warnins, etc),
-# even though it's done after the HANDLER mdl lock that was there
-# at the beginning is released and added again.
-#
-create table t1 (a int, key using btree (a));
-insert into t1 (a) values (1), (2), (3), (4), (5);
-create table t2 like t1;
-create table t3 like t1;
-insert into t3 (a) select a from t1;
-begin;
-handler t1 open;
-savepoint sv;
-handler t1 read a first;
-a
-1
-select * from t2;
-a
-handler t1 close;
-handler t3 open;
-handler t3 read a first;
-a
-1
-rollback to savepoint sv;
-connection con1;
-drop table t1, t2;
-# Sending:
-drop table t3;
-# Let DROP TABLE statement sync in.
-connection con2;
-# Waiting for 'drop table t3' to get blocked...
-# Demonstrate that ROLLBACK TO SAVEPOINT didn't release the handler
-# lock.
-connection default;
-handler t3 read a next;
-a
-2
-# Demonstrate that the drop will go through as soon as we close the
-# HANDLER
-handler t3 close;
-connection con1;
-# Reaping 'drop table t3'...
-connection default;
-commit;
#
# If we have to wait on an exclusive locks while having
# an open HANDLER, ER_LOCK_DEADLOCK is reported.
@@ -1742,6 +1583,185 @@ HANDLER t1 READ a NEXT;
a
HANDLER t1 CLOSE;
DROP TABLE t1;
+#
+# Testing savepoints with handlers that supports it
+#
+connect con1, localhost, root,,;
+connect con2, localhost, root,,;
+connect con3, localhost, root,,;
+connection default;
+#
+# ROLLBACK TO SAVEPOINT releases transactional locks,
+# but has no effect on open HANDLERs
+#
+create table t1 (a int, key a (a));
+insert into t1 (a) values (1), (2), (3), (4), (5);
+create table t2 like t1;
+create table t3 like t1;
+begin;
+# Have something before the savepoint
+select * from t3;
+a
+savepoint sv;
+handler t1 open;
+handler t1 read a first;
+a
+1
+handler t1 read a next;
+a
+2
+select * from t2;
+a
+connection con1;
+# Sending:
+drop table t1;
+connection con2;
+# Sending:
+drop table t2;
+connection default;
+# Let DROP TABLE statements sync in. We must use
+# a separate connection for that, because otherwise SELECT
+# will auto-close the HANDLERs, becaues there are pending
+# exclusive locks against them.
+connection con3;
+# Waiting for 'drop table t1' to get blocked...
+# Waiting for 'drop table t2' to get blocked...
+# Demonstrate that t2 lock was released and t2 was dropped
+# after ROLLBACK TO SAVEPOINT
+connection default;
+rollback to savepoint sv;
+connection con2;
+# Reaping 'drop table t2'...
+# Demonstrate that ROLLBACK TO SAVEPOINT didn't release the handler
+# lock.
+connection default;
+handler t1 read a next;
+a
+3
+handler t1 read a next;
+a
+4
+# Demonstrate that the drop will go through as soon as we close the
+# HANDLER
+handler t1 close;
+connection con1;
+# Reaping 'drop table t1'...
+connection default;
+commit;
+drop table t3;
+#
+# A few special cases when using SAVEPOINT/ROLLBACK TO
+# SAVEPOINT and HANDLER.
+#
+# Show that rollback to the savepoint taken in the beginning
+# of the transaction doesn't release mdl lock on
+# the HANDLER that was opened later.
+#
+create table t1 (a int, key using btree (a));
+insert into t1 (a) values (1), (2), (3), (4), (5);
+create table t2 like t1;
+begin;
+savepoint sv;
+handler t1 open;
+handler t1 read a first;
+a
+1
+handler t1 read a next;
+a
+2
+select * from t2;
+a
+connection con1;
+# Sending:
+drop table t1;
+connection con2;
+# Sending:
+drop table t2;
+connection default;
+# Let DROP TABLE statements sync in. We must use
+# a separate connection for that, because otherwise SELECT
+# will auto-close the HANDLERs, becaues there are pending
+# exclusive locks against them.
+connection con3;
+# Waiting for 'drop table t1' to get blocked...
+# Waiting for 'drop table t2' to get blocked...
+# Demonstrate that t2 lock was released and t2 was dropped
+# after ROLLBACK TO SAVEPOINT
+connection default;
+rollback to savepoint sv;
+connection con2;
+# Reaping 'drop table t2'...
+# Demonstrate that ROLLBACK TO SAVEPOINT didn't release the handler
+# lock.
+connection default;
+handler t1 read a next;
+a
+3
+handler t1 read a next;
+a
+4
+# Demonstrate that the drop will go through as soon as we close the
+# HANDLER
+handler t1 close;
+connection con1;
+# Reaping 'drop table t1'...
+connection default;
+commit;
+#
+# Show that rollback to the savepoint taken in the beginning
+# of the transaction works properly (no valgrind warnins, etc),
+# even though it's done after the HANDLER mdl lock that was there
+# at the beginning is released and added again.
+#
+create table t1 (a int, key using btree (a));
+insert into t1 (a) values (1), (2), (3), (4), (5);
+create table t2 like t1;
+create table t3 like t1;
+insert into t3 (a) select a from t1;
+begin;
+handler t1 open;
+savepoint sv;
+handler t1 read a first;
+a
+1
+select * from t2;
+a
+handler t1 close;
+handler t3 open;
+handler t3 read a first;
+a
+1
+rollback to savepoint sv;
+connection con1;
+drop table t1, t2;
+# Sending:
+drop table t3;
+# Let DROP TABLE statement sync in.
+connection con2;
+# Waiting for 'drop table t3' to get blocked...
+# Demonstrate that ROLLBACK TO SAVEPOINT didn't release the handler
+# lock.
+connection default;
+handler t3 read a next;
+a
+2
+# Demonstrate that the drop will go through as soon as we close the
+# HANDLER
+handler t3 close;
+connection con1;
+# Reaping 'drop table t3'...
+connection default;
+commit;
+#
+# Cleanup for savepoint.inc
+#
+connection con1;
+disconnect con1;
+connection con2;
+disconnect con2;
+connection con3;
+disconnect con3;
+connection default;
CREATE TABLE t1 (f1 integer, f2 integer, primary key (f1), key (f2)) engine=innodb;
INSERT INTO t1 VALUES (1,1),(2,2),(3,3);
HANDLER t1 OPEN;
diff --git a/mysql-test/suite/handler/innodb.test b/mysql-test/suite/handler/innodb.test
index 6527c4bb8bb..5c2dae8a146 100644
--- a/mysql-test/suite/handler/innodb.test
+++ b/mysql-test/suite/handler/innodb.test
@@ -15,6 +15,7 @@ let $engine_type= InnoDB;
--source init.inc
--source handler.inc
+--source savepoint.inc
#
# LP#697610 ha_index_prev(uchar*): Assertion `inited==INDEX'
diff --git a/mysql-test/suite/handler/interface.result b/mysql-test/suite/handler/interface.result
index 8c39b15b6c9..5dcb80d2b2f 100644
--- a/mysql-test/suite/handler/interface.result
+++ b/mysql-test/suite/handler/interface.result
@@ -1,6 +1,6 @@
drop table if exists t1,t3,t4,t5;
drop database if exists test_test;
-SET SESSION STORAGE_ENGINE = MyISAM;
+SET SESSION DEFAULT_STORAGE_ENGINE = MyISAM;
drop table if exists t1,t3,t4,t5;
create table t1 (a int, b char(10), key a using btree (a), key b using btree (a,b));
insert into t1 values
diff --git a/mysql-test/suite/handler/myisam.result b/mysql-test/suite/handler/myisam.result
index 2c5f8c3bfde..896908e1602 100644
--- a/mysql-test/suite/handler/myisam.result
+++ b/mysql-test/suite/handler/myisam.result
@@ -1,4 +1,4 @@
-SET SESSION STORAGE_ENGINE = MyISAM;
+SET SESSION DEFAULT_STORAGE_ENGINE = MyISAM;
drop table if exists t1,t3,t4,t5;
create table t1 (a int, b char(10), key a using btree (a), key b using btree (a,b));
insert into t1 values
@@ -1132,166 +1132,7 @@ connection default;
# Reaping 'select * from t2'
ERROR 42S02: Table 'test.t2' doesn't exist
handler t1 close;
-#
-# ROLLBACK TO SAVEPOINT releases transactional locks,
-# but has no effect on open HANDLERs
-#
-create table t2 like t1;
-create table t3 like t1;
-begin;
-# Have something before the savepoint
-select * from t3;
-a
-savepoint sv;
-handler t1 open;
-handler t1 read a first;
-a
-1
-handler t1 read a next;
-a
-2
-select * from t2;
-a
-connection con1;
-# Sending:
drop table t1;
-connection con2;
-# Sending:
-drop table t2;
-connection default;
-# Let DROP TABLE statements sync in. We must use
-# a separate connection for that, because otherwise SELECT
-# will auto-close the HANDLERs, becaues there are pending
-# exclusive locks against them.
-connection con3;
-# Waiting for 'drop table t1' to get blocked...
-# Waiting for 'drop table t2' to get blocked...
-# Demonstrate that t2 lock was released and t2 was dropped
-# after ROLLBACK TO SAVEPOINT
-connection default;
-rollback to savepoint sv;
-connection con2;
-# Reaping 'drop table t2'...
-# Demonstrate that ROLLBACK TO SAVEPOINT didn't release the handler
-# lock.
-connection default;
-handler t1 read a next;
-a
-3
-handler t1 read a next;
-a
-4
-# Demonstrate that the drop will go through as soon as we close the
-# HANDLER
-handler t1 close;
-connection con1;
-# Reaping 'drop table t1'...
-connection default;
-commit;
-drop table t3;
-#
-# A few special cases when using SAVEPOINT/ROLLBACK TO
-# SAVEPOINT and HANDLER.
-#
-# Show that rollback to the savepoint taken in the beginning
-# of the transaction doesn't release mdl lock on
-# the HANDLER that was opened later.
-#
-create table t1 (a int, key using btree (a));
-insert into t1 (a) values (1), (2), (3), (4), (5);
-create table t2 like t1;
-begin;
-savepoint sv;
-handler t1 open;
-handler t1 read a first;
-a
-1
-handler t1 read a next;
-a
-2
-select * from t2;
-a
-connection con1;
-# Sending:
-drop table t1;
-connection con2;
-# Sending:
-drop table t2;
-connection default;
-# Let DROP TABLE statements sync in. We must use
-# a separate connection for that, because otherwise SELECT
-# will auto-close the HANDLERs, becaues there are pending
-# exclusive locks against them.
-connection con3;
-# Waiting for 'drop table t1' to get blocked...
-# Waiting for 'drop table t2' to get blocked...
-# Demonstrate that t2 lock was released and t2 was dropped
-# after ROLLBACK TO SAVEPOINT
-connection default;
-rollback to savepoint sv;
-connection con2;
-# Reaping 'drop table t2'...
-# Demonstrate that ROLLBACK TO SAVEPOINT didn't release the handler
-# lock.
-connection default;
-handler t1 read a next;
-a
-3
-handler t1 read a next;
-a
-4
-# Demonstrate that the drop will go through as soon as we close the
-# HANDLER
-handler t1 close;
-connection con1;
-# Reaping 'drop table t1'...
-connection default;
-commit;
-#
-# Show that rollback to the savepoint taken in the beginning
-# of the transaction works properly (no valgrind warnins, etc),
-# even though it's done after the HANDLER mdl lock that was there
-# at the beginning is released and added again.
-#
-create table t1 (a int, key using btree (a));
-insert into t1 (a) values (1), (2), (3), (4), (5);
-create table t2 like t1;
-create table t3 like t1;
-insert into t3 (a) select a from t1;
-begin;
-handler t1 open;
-savepoint sv;
-handler t1 read a first;
-a
-1
-select * from t2;
-a
-handler t1 close;
-handler t3 open;
-handler t3 read a first;
-a
-1
-rollback to savepoint sv;
-connection con1;
-drop table t1, t2;
-# Sending:
-drop table t3;
-# Let DROP TABLE statement sync in.
-connection con2;
-# Waiting for 'drop table t3' to get blocked...
-# Demonstrate that ROLLBACK TO SAVEPOINT didn't release the handler
-# lock.
-connection default;
-handler t3 read a next;
-a
-2
-# Demonstrate that the drop will go through as soon as we close the
-# HANDLER
-handler t3 close;
-connection con1;
-# Reaping 'drop table t3'...
-connection default;
-commit;
#
# If we have to wait on an exclusive locks while having
# an open HANDLER, ER_LOCK_DEADLOCK is reported.
diff --git a/mysql-test/suite/handler/savepoint.inc b/mysql-test/suite/handler/savepoint.inc
new file mode 100644
index 00000000000..a237183ef11
--- /dev/null
+++ b/mysql-test/suite/handler/savepoint.inc
@@ -0,0 +1,182 @@
+--echo #
+--echo # Testing savepoints with handlers that supports it
+--echo #
+connect(con1, localhost, root,,);
+connect(con2, localhost, root,,);
+connect(con3, localhost, root,,);
+connection default;
+--echo #
+--echo # ROLLBACK TO SAVEPOINT releases transactional locks,
+--echo # but has no effect on open HANDLERs
+--echo #
+create table t1 (a int, key a (a));
+insert into t1 (a) values (1), (2), (3), (4), (5);
+create table t2 like t1;
+create table t3 like t1;
+begin;
+--echo # Have something before the savepoint
+select * from t3;
+savepoint sv;
+handler t1 open;
+handler t1 read a first;
+handler t1 read a next;
+select * from t2;
+connection con1;
+--echo # Sending:
+--send drop table t1
+connection con2;
+--echo # Sending:
+--send drop table t2
+connection default;
+--echo # Let DROP TABLE statements sync in. We must use
+--echo # a separate connection for that, because otherwise SELECT
+--echo # will auto-close the HANDLERs, becaues there are pending
+--echo # exclusive locks against them.
+connection con3;
+--echo # Waiting for 'drop table t1' to get blocked...
+let $wait_condition=select count(*)=1 from information_schema.processlist
+ where state='Waiting for table metadata lock' and
+ info='drop table t1';
+--source include/wait_condition.inc
+--echo # Waiting for 'drop table t2' to get blocked...
+let $wait_condition=select count(*)=1 from information_schema.processlist
+ where state='Waiting for table metadata lock' and
+ info='drop table t2';
+--source include/wait_condition.inc
+--echo # Demonstrate that t2 lock was released and t2 was dropped
+--echo # after ROLLBACK TO SAVEPOINT
+connection default;
+rollback to savepoint sv;
+connection con2;
+--echo # Reaping 'drop table t2'...
+--reap
+--echo # Demonstrate that ROLLBACK TO SAVEPOINT didn't release the handler
+--echo # lock.
+connection default;
+handler t1 read a next;
+handler t1 read a next;
+--echo # Demonstrate that the drop will go through as soon as we close the
+--echo # HANDLER
+handler t1 close;
+connection con1;
+--echo # Reaping 'drop table t1'...
+--reap
+connection default;
+commit;
+drop table t3;
+--echo #
+--echo # A few special cases when using SAVEPOINT/ROLLBACK TO
+--echo # SAVEPOINT and HANDLER.
+--echo #
+--echo # Show that rollback to the savepoint taken in the beginning
+--echo # of the transaction doesn't release mdl lock on
+--echo # the HANDLER that was opened later.
+--echo #
+create table t1 (a int, key using btree (a));
+insert into t1 (a) values (1), (2), (3), (4), (5);
+create table t2 like t1;
+begin;
+savepoint sv;
+handler t1 open;
+handler t1 read a first;
+handler t1 read a next;
+select * from t2;
+connection con1;
+--echo # Sending:
+--send drop table t1
+connection con2;
+--echo # Sending:
+--send drop table t2
+connection default;
+--echo # Let DROP TABLE statements sync in. We must use
+--echo # a separate connection for that, because otherwise SELECT
+--echo # will auto-close the HANDLERs, becaues there are pending
+--echo # exclusive locks against them.
+connection con3;
+--echo # Waiting for 'drop table t1' to get blocked...
+let $wait_condition=select count(*)=1 from information_schema.processlist
+ where state='Waiting for table metadata lock' and
+ info='drop table t1';
+--source include/wait_condition.inc
+--echo # Waiting for 'drop table t2' to get blocked...
+let $wait_condition=select count(*)=1 from information_schema.processlist
+ where state='Waiting for table metadata lock' and
+ info='drop table t2';
+--source include/wait_condition.inc
+--echo # Demonstrate that t2 lock was released and t2 was dropped
+--echo # after ROLLBACK TO SAVEPOINT
+connection default;
+rollback to savepoint sv;
+connection con2;
+--echo # Reaping 'drop table t2'...
+--reap
+--echo # Demonstrate that ROLLBACK TO SAVEPOINT didn't release the handler
+--echo # lock.
+connection default;
+handler t1 read a next;
+handler t1 read a next;
+--echo # Demonstrate that the drop will go through as soon as we close the
+--echo # HANDLER
+handler t1 close;
+connection con1;
+--echo # Reaping 'drop table t1'...
+--reap
+connection default;
+commit;
+--echo #
+--echo # Show that rollback to the savepoint taken in the beginning
+--echo # of the transaction works properly (no valgrind warnins, etc),
+--echo # even though it's done after the HANDLER mdl lock that was there
+--echo # at the beginning is released and added again.
+--echo #
+create table t1 (a int, key using btree (a));
+insert into t1 (a) values (1), (2), (3), (4), (5);
+create table t2 like t1;
+create table t3 like t1;
+insert into t3 (a) select a from t1;
+begin;
+handler t1 open;
+savepoint sv;
+handler t1 read a first;
+select * from t2;
+handler t1 close;
+handler t3 open;
+handler t3 read a first;
+rollback to savepoint sv;
+connection con1;
+drop table t1, t2;
+--echo # Sending:
+--send drop table t3
+--echo # Let DROP TABLE statement sync in.
+connection con2;
+--echo # Waiting for 'drop table t3' to get blocked...
+let $wait_condition=select count(*)=1 from information_schema.processlist
+ where state='Waiting for table metadata lock' and
+ info='drop table t3';
+--source include/wait_condition.inc
+--echo # Demonstrate that ROLLBACK TO SAVEPOINT didn't release the handler
+--echo # lock.
+connection default;
+handler t3 read a next;
+--echo # Demonstrate that the drop will go through as soon as we close the
+--echo # HANDLER
+handler t3 close;
+connection con1;
+--echo # Reaping 'drop table t3'...
+--reap
+connection default;
+commit;
+
+--echo #
+--echo # Cleanup for savepoint.inc
+--echo #
+connection con1;
+disconnect con1;
+--source include/wait_until_disconnected.inc
+connection con2;
+disconnect con2;
+--source include/wait_until_disconnected.inc
+connection con3;
+disconnect con3;
+--source include/wait_until_disconnected.inc
+connection default;
diff --git a/mysql-test/suite/heap/drop.result b/mysql-test/suite/heap/drop.result
new file mode 100644
index 00000000000..cbc784fd59b
--- /dev/null
+++ b/mysql-test/suite/heap/drop.result
@@ -0,0 +1,3 @@
+create table t1 (a int) engine=memory;
+drop table t1;
+drop table t2;
diff --git a/mysql-test/suite/heap/drop.test b/mysql-test/suite/heap/drop.test
new file mode 100644
index 00000000000..ef61d4400f1
--- /dev/null
+++ b/mysql-test/suite/heap/drop.test
@@ -0,0 +1,11 @@
+create table t1 (a int) engine=memory;
+let $DATADIR= `select @@datadir`;
+copy_file $DATADIR/test/t1.frm $DATADIR/test/t2.frm;
+#
+# drop a newly created MEMORY table
+#
+drop table t1;
+#
+# drop a MEMORY table after a server restart (frm only, nothing in memory)
+#
+drop table t2;
diff --git a/mysql-test/suite/heap/heap.result b/mysql-test/suite/heap/heap.result
index 6bd0582a384..0ef38360caf 100644
--- a/mysql-test/suite/heap/heap.result
+++ b/mysql-test/suite/heap/heap.result
@@ -66,7 +66,7 @@ a
alter table t1 engine=myisam;
explain select * from t1 where a in (869751,736494,226312,802616);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index uniq_id uniq_id 4 NULL 5 Using where; Using index
+1 SIMPLE t1 range uniq_id uniq_id 4 NULL 4 Using where; Using index
drop table t1;
create table t1 (x int not null, y int not null, key x (x), unique y (y))
engine=heap;
@@ -249,7 +249,7 @@ a
3
2
drop table t1;
-set storage_engine=HEAP;
+set default_storage_engine=HEAP;
create table t1 (v varchar(10), c char(10), t varchar(50));
insert into t1 values('+ ', '+ ', '+ ');
set @a=repeat(' ',20);
@@ -662,7 +662,7 @@ select length(v) from t1 where v=repeat('a',65530);
length(v)
65530
drop table t1;
-set storage_engine=MyISAM;
+set default_storage_engine=MyISAM;
create table t1 (a bigint unsigned auto_increment primary key, b int,
key (b, a)) engine=heap;
insert t1 (b) values (1),(1),(1),(1),(1),(1),(1),(1);
diff --git a/mysql-test/suite/heap/heap.test b/mysql-test/suite/heap/heap.test
index 237685a6423..ef950da5484 100644
--- a/mysql-test/suite/heap/heap.test
+++ b/mysql-test/suite/heap/heap.test
@@ -201,8 +201,8 @@ drop table t1;
# We can't use varchar.inc becasue heap doesn't support blob's
#
-let $default=`select @@storage_engine`;
-set storage_engine=HEAP;
+let $default=`select @@default_storage_engine`;
+set default_storage_engine=HEAP;
#
# Simple basic test that endspace is saved
@@ -412,7 +412,7 @@ drop table t1;
#
# Reset varchar test
#
-eval set storage_engine=$default;
+eval set default_storage_engine=$default;
#
# Bug #8489: Strange auto_increment behaviour
diff --git a/mysql-test/suite/heap/heap_btree.result b/mysql-test/suite/heap/heap_btree.result
index 8c1c8217b6a..5778ff0dd55 100644
--- a/mysql-test/suite/heap/heap_btree.result
+++ b/mysql-test/suite/heap/heap_btree.result
@@ -63,10 +63,13 @@ a
736494
802616
869751
+explain select * from t1 where a in (869751,736494,226312,802616);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range uniq_id uniq_id 4 NULL 4 Using where
alter table t1 engine=myisam;
explain select * from t1 where a in (869751,736494,226312,802616);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index uniq_id uniq_id 4 NULL 5 Using where; Using index
+1 SIMPLE t1 range uniq_id uniq_id 4 NULL 4 Using where; Using index
drop table t1;
create table t1 (x int not null, y int not null, key x using BTREE (x,y), unique y using BTREE (y))
engine=heap;
@@ -172,7 +175,7 @@ f1 f2
12 ted
drop table t1;
create table t1 (btn char(10) not null, key using BTREE (btn)) engine=heap;
-insert into t1 values ("hello"),("hello"),("hello"),("hello"),("hello"),("a"),("b"),("c"),("d"),("e"),("f"),("g"),("h"),("i");
+insert into t1 values ("hello"),("hello"),("hello"),("hello"),("hello"),("hello"),("hello"), ("a"),("b"),("c"),("d"),("e"),("f"),("g"),("h"),("i");
explain select * from t1 where btn like "i%";
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range btn btn 10 NULL 1 Using where
@@ -368,6 +371,7 @@ select 0+a from t1 where a=869751 or a=736494;
explain select 0+a from t1 where a=869751 or a=736494;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range uniq_id uniq_id 8 NULL 2 Using where
+insert into t1 (a) select * from seq_1_to_100;
select 0+a from t1 where a in (869751,736494,226312,802616);
0+a
226312
diff --git a/mysql-test/suite/heap/heap_btree.test b/mysql-test/suite/heap/heap_btree.test
index 6e087c7ef24..d3fbe4cc0d2 100644
--- a/mysql-test/suite/heap/heap_btree.test
+++ b/mysql-test/suite/heap/heap_btree.test
@@ -1,3 +1,5 @@
+--source include/have_sequence.inc
+
#
# Test of heap tables.
#
@@ -41,7 +43,9 @@ alter table t1 add unique uniq_id using BTREE (a);
select * from t1 where a > 736494;
select * from t1 where a = 736494;
select * from t1 where a=869751 or a=736494;
+--sorted_result
select * from t1 where a in (869751,736494,226312,802616);
+explain select * from t1 where a in (869751,736494,226312,802616);
alter table t1 engine=myisam;
explain select * from t1 where a in (869751,736494,226312,802616);
drop table t1;
@@ -110,7 +114,7 @@ drop table t1;
#
create table t1 (btn char(10) not null, key using BTREE (btn)) engine=heap;
-insert into t1 values ("hello"),("hello"),("hello"),("hello"),("hello"),("a"),("b"),("c"),("d"),("e"),("f"),("g"),("h"),("i");
+insert into t1 values ("hello"),("hello"),("hello"),("hello"),("hello"),("hello"),("hello"), ("a"),("b"),("c"),("d"),("e"),("f"),("g"),("h"),("i");
explain select * from t1 where btn like "i%";
--replace_column 9 #
explain select * from t1 where btn like "h%";
@@ -269,12 +273,14 @@ DROP TABLE t1;
create table t1 (a bit(63) not null) engine=heap;
insert into t1 values (869751),(736494),(226312),(802616),(728912);
alter table t1 add unique uniq_id using BTREE (a);
+--sorted_result
select 0+a from t1 where a > 736494;
explain select 0+a from t1 where a > 736494;
select 0+a from t1 where a = 736494;
explain select 0+a from t1 where a = 736494;
select 0+a from t1 where a=869751 or a=736494;
explain select 0+a from t1 where a=869751 or a=736494;
+insert into t1 (a) select * from seq_1_to_100;
select 0+a from t1 where a in (869751,736494,226312,802616);
explain select 0+a from t1 where a in (869751,736494,226312,802616);
drop table t1;
diff --git a/mysql-test/suite/innodb/include/log_file_cleanup.inc b/mysql-test/suite/innodb/include/log_file_cleanup.inc
index ef57d58b788..80ce1df0c97 100644
--- a/mysql-test/suite/innodb/include/log_file_cleanup.inc
+++ b/mysql-test/suite/innodb/include/log_file_cleanup.inc
@@ -9,8 +9,6 @@
--copy_file $bugdir/bak_ibdata1 $bugdir/ibdata1
--copy_file $bugdir/bak_ibdata2 $bugdir/ibdata2
--copy_file $bugdir/bak_ib_logfile0 $bugdir/ib_logfile0
---copy_file $bugdir/bak_ib_logfile1 $bugdir/ib_logfile1
---copy_file $bugdir/bak_ib_logfile2 $bugdir/ib_logfile2
--copy_file $bugdir/bak_undo001 $bugdir/undo001
--copy_file $bugdir/bak_undo002 $bugdir/undo002
--copy_file $bugdir/bak_undo003 $bugdir/undo003
diff --git a/mysql-test/suite/innodb/include/show_i_s_tables.inc b/mysql-test/suite/innodb/include/show_i_s_tables.inc
index cb4dffdd4c4..8e4a362de95 100644
--- a/mysql-test/suite/innodb/include/show_i_s_tables.inc
+++ b/mysql-test/suite/innodb/include/show_i_s_tables.inc
@@ -8,13 +8,13 @@ SELECT t.name 'Table Name',
t.flag 'Table Flags',
t.n_cols 'Columns',
t.row_format 'Row Format',
- t.zip_page_size 'Zip Size',
- t.space_type 'Space Type'
+ t.zip_page_size 'Zip Size'
FROM information_schema.innodb_sys_tables t LEFT JOIN
information_schema.innodb_sys_tablespaces s
ON t.space = s.space
WHERE t.name not like 'SYS_%'
AND t.name NOT LIKE 'mysql/%'
AND t.name NOT LIKE 'sys/%'
+ AND t.name NOT LIKE '%/#sql-ib%'
ORDER BY t.name;
--enable_query_log
diff --git a/mysql-test/suite/innodb/include/show_i_s_tablespaces.inc b/mysql-test/suite/innodb/include/show_i_s_tablespaces.inc
index 50267852fb0..6d0c5c63712 100644
--- a/mysql-test/suite/innodb/include/show_i_s_tablespaces.inc
+++ b/mysql-test/suite/innodb/include/show_i_s_tablespaces.inc
@@ -6,7 +6,6 @@
--replace_regex /#P#/#p#/ /#SP#/#sp#/
--replace_result ./ MYSQLD_DATADIR/ $MYSQLD_DATADIR/ MYSQLD_DATADIR/ $MYSQLD_DATADIR MYSQLD_DATADIR/ $MYSQL_TMP_DIR MYSQL_TMP_DIR $INNODB_PAGE_SIZE DEFAULT
SELECT s.name 'Space_Name',
- s.space_type 'Space_Type',
s.page_size 'Page_Size',
s.zip_page_size 'Zip_Size',
d.path 'Path'
@@ -14,5 +13,6 @@ SELECT s.name 'Space_Name',
information_schema.innodb_sys_datafiles d
WHERE s.space = d.space
AND s.name NOT LIKE 'mysql/%'
+ AND s.name NOT LIKE '%/#sql-ib%'
ORDER BY s.space;
--enable_query_log
diff --git a/mysql-test/suite/innodb/r/alter_copy.result b/mysql-test/suite/innodb/r/alter_copy.result
index 4aece16f0b0..9b8f04eacca 100644
--- a/mysql-test/suite/innodb/r/alter_copy.result
+++ b/mysql-test/suite/innodb/r/alter_copy.result
@@ -53,8 +53,8 @@ connection default;
SET DEBUG_SYNC='now WAIT_FOR hung';
# restart: --innodb-force-recovery=3
disconnect hang;
-#sql-temporary.frm
-#sql-temporary.ibd
+#sql-alter.frm
+#sql-alter.ibd
FTS_INDEX_1.ibd
FTS_INDEX_2.ibd
FTS_INDEX_3.ibd
@@ -122,8 +122,8 @@ CHECK TABLE t1;
Table Op Msg_type Msg_text
test.t1 check status OK
# restart: --innodb-read-only
-#sql-temporary.frm
-#sql-temporary.ibd
+#sql-alter.frm
+#sql-alter.ibd
FTS_INDEX_1.ibd
FTS_INDEX_2.ibd
FTS_INDEX_3.ibd
@@ -191,7 +191,7 @@ CHECK TABLE t1;
Table Op Msg_type Msg_text
test.t1 check status OK
# restart
-#sql-temporary.frm
+#sql-alter.frm
FTS_INDEX_1.ibd
FTS_INDEX_2.ibd
FTS_INDEX_3.ibd
diff --git a/mysql-test/suite/innodb/r/alter_inplace_perfschema.result b/mysql-test/suite/innodb/r/alter_inplace_perfschema.result
index 440a1d0d6b3..4b5a2176b87 100644
--- a/mysql-test/suite/innodb/r/alter_inplace_perfschema.result
+++ b/mysql-test/suite/innodb/r/alter_inplace_perfschema.result
@@ -12,7 +12,7 @@ SET DEBUG_SYNC = 'now WAIT_FOR go';
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
+10
SET DEBUG_SYNC = 'now SIGNAL gone';
connection ddl;
disconnect ddl;
diff --git a/mysql-test/suite/innodb/r/alter_partitioned.result b/mysql-test/suite/innodb/r/alter_partitioned.result
index 145465c6cba..6c32142db9a 100644
--- a/mysql-test/suite/innodb/r/alter_partitioned.result
+++ b/mysql-test/suite/innodb/r/alter_partitioned.result
@@ -37,6 +37,15 @@ CREATE TABLE t2(a INT, FOREIGN KEY(a) REFERENCES t1(a))ENGINE=INNODB
PARTITION BY RANGE(a)
(PARTITION pa VALUES LESS THAN (2),
PARTITION pb VALUES LESS THAN (4));
-ERROR HY000: Foreign key clause is not yet supported in conjunction with partitioning
+ERROR HY000: Partitioned tables do not support FOREIGN KEY
DROP TABLE t1;
# End of 10.3 tests
+#
+# MDEV-24754 Server crash in
+# ha_partition_inplace_ctx::~ha_partition_inplace_ctx
+#
+CREATE TABLE t1 (id INT PRIMARY KEY, a INT, va INT AS (a) VIRTUAL)
+ENGINE=InnoDB PARTITION BY HASH(id) PARTITIONS 2;
+ALTER TABLE t1 ADD b INT, ALGORITHM=INSTANT;
+DROP TABLE t1;
+# End of 10.5 tests
diff --git a/mysql-test/suite/innodb/r/alter_rename_existing.result b/mysql-test/suite/innodb/r/alter_rename_existing.result
index 8fc54adbd10..aff8a3a09a1 100644
--- a/mysql-test/suite/innodb/r/alter_rename_existing.result
+++ b/mysql-test/suite/innodb/r/alter_rename_existing.result
@@ -59,7 +59,7 @@ ALTER TABLE t1 ADD COLUMN d INT, ALGORITHM=COPY;
#
SET GLOBAL innodb_file_per_table=ON;
ALTER TABLE t1 FORCE, ALGORITHM=INPLACE;
-ERROR HY000: Tablespace for table 'test/t1' exists. Please DISCARD the tablespace before IMPORT
+ERROR HY000: Tablespace for table 'test/#sql-ib' exists. Please DISCARD the tablespace before IMPORT
ALTER TABLE t1 FORCE, ALGORITHM=COPY;
ERROR HY000: Error on rename of 'OLD_FILE_NAME' to 'NEW_FILE_NAME' (errno: 184 "Tablespace already exists")
#
diff --git a/mysql-test/suite/innodb/r/alter_rename_files.result b/mysql-test/suite/innodb/r/alter_rename_files.result
deleted file mode 100644
index 490f6773765..00000000000
--- a/mysql-test/suite/innodb/r/alter_rename_files.result
+++ /dev/null
@@ -1,19 +0,0 @@
-CREATE TABLE t1 (x INT NOT NULL UNIQUE KEY) ENGINE=InnoDB;
-INSERT INTO t1 VALUES(5);
-SET GLOBAL innodb_log_checkpoint_now=TRUE;
-SET DEBUG_SYNC='commit_cache_rebuild SIGNAL ready WAIT_FOR finish';
-ALTER TABLE t1 FORCE;;
-connect con1,localhost,root,,;
-SET DEBUG_SYNC='now WAIT_FOR ready';
-SET GLOBAL innodb_log_checkpoint_now=TRUE;
-SET DEBUG_SYNC='now SIGNAL finish';
-disconnect con1;
-connection default;
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `x` int(11) NOT NULL,
- UNIQUE KEY `x` (`x`)
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
-DROP TABLE t1;
-SET DEBUG_SYNC='RESET';
diff --git a/mysql-test/suite/innodb/r/alter_table.result b/mysql-test/suite/innodb/r/alter_table.result
index 7c64511c866..3b0d3b0659d 100644
--- a/mysql-test/suite/innodb/r/alter_table.result
+++ b/mysql-test/suite/innodb/r/alter_table.result
@@ -119,3 +119,20 @@ ERROR 42000: Incorrect column specifier for column 'c'
#
# End of 10.4 tests
#
+#
+# MDEV-21748 ASAN use-after-poison in PageBulk::insertPage()
+#
+CREATE TABLE t1 (pk TIMESTAMP PRIMARY KEY, a TIMESTAMP NULL UNIQUE)
+ENGINE=InnoDB;
+INSERT INTO t1 VALUES
+('2020-03-10 10:21:00', NULL),
+('0000-00-00 00:00:00', '0000-00-00 00:00:00');
+ALTER TABLE t1 FORCE, ALGORITHM=INPLACE;
+DROP TABLE t1;
+#
+# MDEV-21850 ASAN use-after-poison in page_cur_insert_rec_low()
+#
+CREATE TABLE t1 (id INT PRIMARY KEY, a YEAR, INDEX(id,a)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1,NULL),(2,NULL);
+UPDATE t1 SET a=0;
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/r/autoinc_debug.result b/mysql-test/suite/innodb/r/autoinc_debug.result
index 5856c75f784..0048a623f9a 100644
--- a/mysql-test/suite/innodb/r/autoinc_debug.result
+++ b/mysql-test/suite/innodb/r/autoinc_debug.result
@@ -1,6 +1,12 @@
CREATE TABLE t1 (id INT AUTO_INCREMENT PRIMARY KEY)ENGINE=INNODB;
# SETTING auto_increment_increment IN CONNECTION DEFAULT
SET AUTO_INCREMENT_INCREMENT = 1;
+# MDEV-24348 InnoDB shutdown hang with innodb_flush_sync=0
+SET GLOBAL innodb_flush_sync=OFF;
+# For the server to hang, we must have pages for temporary tables
+# (and the bug depended on MDEV-12227 not being fixed).
+CREATE TEMPORARY TABLE t (id SERIAL) ENGINE=InnoDB;
+SET debug_dbug= '+d,ib_log_flush_ahead';
INSERT INTO t1 VALUES(NULL);
SELECT * FROM t1;
id
diff --git a/mysql-test/suite/innodb/r/buf_pool_resize_oom.result b/mysql-test/suite/innodb/r/buf_pool_resize_oom.result
index b5ebbd5cc62..d8f6872ad6f 100644
--- a/mysql-test/suite/innodb/r/buf_pool_resize_oom.result
+++ b/mysql-test/suite/innodb/r/buf_pool_resize_oom.result
@@ -2,7 +2,7 @@
# Bug #21348684 SIGABRT DURING RESIZING THE INNODB BUFFER POOL
# ONLINE WITH MEMORY FULL CONDITION
#
-call mtr.add_suppression("InnoDB: .* failed to allocate the chunk array");
+call mtr.add_suppression("InnoDB: failed to allocate the chunk array");
SET GLOBAL innodb_disable_resize_buffer_pool_debug=OFF;
SET GLOBAL debug_dbug='+d,buf_pool_resize_chunk_null';
SET GLOBAL innodb_buffer_pool_size=@@innodb_buffer_pool_size + 1048576;
diff --git a/mysql-test/suite/innodb/r/doublewrite.result b/mysql-test/suite/innodb/r/doublewrite.result
index 5adae545a71..1f26f7d1f5f 100644
--- a/mysql-test/suite/innodb/r/doublewrite.result
+++ b/mysql-test/suite/innodb/r/doublewrite.result
@@ -14,6 +14,9 @@ innodb_fil_make_page_dirty_debug 0
show variables like 'innodb_saved_page_number_debug';
Variable_name Value
innodb_saved_page_number_debug 0
+connect stop_purge,localhost,root,,;
+START TRANSACTION WITH CONSISTENT SNAPSHOT;
+connection default;
create table t1 (f1 int primary key, f2 blob) engine=innodb;
start transaction;
insert into t1 values(1, repeat('#',12));
@@ -29,17 +32,17 @@ select space from information_schema.innodb_sys_tables
where name = 'test/t1' into @space_id;
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
-# Ensure that dirty pages of table t1 is flushed.
-flush tables t1 for export;
-unlock tables;
begin;
insert into t1 values (6, repeat('%', 12));
+# Ensure that dirty pages of table t1 are flushed.
+set global innodb_buf_flush_list_now = 1;
# Make the first page dirty for table t1
set global innodb_saved_page_number_debug = 0;
set global innodb_fil_make_page_dirty_debug = @space_id;
# Ensure that dirty pages of table t1 are flushed.
set global innodb_buf_flush_list_now = 1;
# Kill the server
+disconnect stop_purge;
# Make the first page (page_no=0) of the user tablespace
# full of zeroes.
#
diff --git a/mysql-test/suite/innodb/r/encryption_threads_shutdown.result b/mysql-test/suite/innodb/r/encryption_threads_shutdown.result
new file mode 100644
index 00000000000..3f0dcd90426
--- /dev/null
+++ b/mysql-test/suite/innodb/r/encryption_threads_shutdown.result
@@ -0,0 +1,12 @@
+call mtr.add_suppression("Creating system tablespace with existing redo log file is not recommended.");
+call mtr.add_suppression("InnoDB: Database creation was aborted");
+call mtr.add_suppression("Plugin 'InnoDB' init function returned error.");
+call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed.");
+CREATE TABLE t(a INT) ENGINE=InnoDB;
+# Kill the server
+# restart
+SELECT * FROM t;
+ERROR 42000: Unknown storage engine 'InnoDB'
+# Kill the server
+# restart
+DROP TABLE t;
diff --git a/mysql-test/suite/innodb/r/flush.result b/mysql-test/suite/innodb/r/flush.result
new file mode 100644
index 00000000000..cd6bec48d4e
--- /dev/null
+++ b/mysql-test/suite/innodb/r/flush.result
@@ -0,0 +1,16 @@
+SELECT @@GLOBAL.innodb_open_files;
+@@GLOBAL.innodb_open_files
+10
+CREATE TABLE t0 (a INT) ENGINE=InnoDB;
+FLUSH TABLE t0 WITH READ LOCK;
+UNLOCK TABLES;
+CREATE TABLE t1 (a INT) ENGINE=InnoDB;
+CREATE TABLE t2 (a INT) ENGINE=InnoDB;
+CREATE TABLE t3 (a INT) ENGINE=InnoDB;
+CREATE TABLE t4 (a INT) ENGINE=InnoDB;
+CREATE TABLE t5 (a INT) ENGINE=InnoDB;
+CREATE TABLE t6 (a INT) ENGINE=InnoDB;
+CREATE TABLE t7 (a INT) ENGINE=InnoDB;
+FLUSH TABLE t0 WITH READ LOCK;
+UNLOCK TABLES;
+DROP TABLE t0, t1, t2, t3, t4, t5, t6, t7;
diff --git a/mysql-test/suite/innodb/r/foreign_key.result b/mysql-test/suite/innodb/r/foreign_key.result
index c7332f3dfc6..ff0e025246e 100644
--- a/mysql-test/suite/innodb/r/foreign_key.result
+++ b/mysql-test/suite/innodb/r/foreign_key.result
@@ -237,11 +237,7 @@ SET SESSION FOREIGN_KEY_CHECKS = OFF;
ALTER TABLE t1 ADD FOREIGN KEY (f) REFERENCES non_existing_table (x);
SET SESSION FOREIGN_KEY_CHECKS = ON;
ALTER TABLE t1 ADD FULLTEXT INDEX ft1 (f);
-Warnings:
-Warning 1088 failed to load FOREIGN KEY constraints
ALTER TABLE t1 ADD FULLTEXT INDEX ft2 (f);
-Warnings:
-Warning 1088 failed to load FOREIGN KEY constraints
DROP TABLE t1;
CREATE TABLE t1 (f VARCHAR(256), FTS_DOC_ID BIGINT UNSIGNED PRIMARY KEY)
ENGINE=InnoDB;
@@ -262,7 +258,7 @@ ALTER IGNORE TABLE t1 ADD FOREIGN KEY (a) REFERENCES t2 (b);
ERROR HY000: Can't create table `test`.`t1` (errno: 150 "Foreign key constraint is incorrectly formed")
SHOW WARNINGS;
Level Code Message
-Warning 150 Alter table `test`.`t1` with foreign key constraint failed. Referenced table `test`.`t2` not found in the data dictionary near 'FOREIGN KEY (a) REFERENCES t2 (b)'.
+Warning 150 Alter table `test`.`t1` with foreign key (a) constraint failed. Referenced table `test`.`t2` not found in the data dictionary.
Error 1005 Can't create table `test`.`t1` (errno: 150 "Foreign key constraint is incorrectly formed")
Warning 1215 Cannot add foreign key constraint for `t1`
DROP TABLE t1;
@@ -830,3 +826,74 @@ INSERT INTO t1 VALUES (2,11,11);
DROP TABLE t1;
SET FOREIGN_KEY_CHECKS=DEFAULT;
# End of 10.4 tests
+#
+# MDEV-20729 Fix REFERENCES constraint in column definition
+#
+set default_storage_engine= innodb;
+create table t1 (x int primary key, y int unique);
+create table t2 (x int references t1(x), y int constraint fk references t1(y));
+show create table t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `x` int(11) DEFAULT NULL,
+ `y` int(11) DEFAULT NULL,
+ KEY `x` (`x`),
+ KEY `fk` (`y`),
+ CONSTRAINT `fk` FOREIGN KEY (`y`) REFERENCES `t1` (`y`),
+ CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`x`) REFERENCES `t1` (`x`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+create table t3 (z int);
+alter table t3 add x int references t1(x), add y int constraint fk2 references t1(y);
+show create table t3;
+Table Create Table
+t3 CREATE TABLE `t3` (
+ `z` int(11) DEFAULT NULL,
+ `x` int(11) DEFAULT NULL,
+ `y` int(11) DEFAULT NULL,
+ KEY `x` (`x`),
+ KEY `fk2` (`y`),
+ CONSTRAINT `fk2` FOREIGN KEY (`y`) REFERENCES `t1` (`y`),
+ CONSTRAINT `t3_ibfk_1` FOREIGN KEY (`x`) REFERENCES `t1` (`x`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+drop tables t3, t2, t1;
+create table t1 (id int primary key);
+create table t2 (id2 int references t1);
+ERROR HY000: Can't create table `test`.`t2` (errno: 150 "Foreign key constraint is incorrectly formed")
+create table t2 (id int references t1);
+show create table t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `id` int(11) DEFAULT NULL,
+ KEY `id` (`id`),
+ CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`id`) REFERENCES `t1` (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+drop tables t2, t1;
+set default_storage_engine= default;
+#
+# MDEV-21690 LeakSanitizer: detected memory leaks in mem_heap_create_block_func
+#
+SET FOREIGN_KEY_CHECKS=1;
+CREATE TABLE t1 (a TEXT, b TEXT) ENGINE=InnoDB;
+ALTER TABLE t1 ADD FOREIGN KEY (a) REFERENCES t1 (b);
+ERROR HY000: Can't create table `test`.`t1` (errno: 150 "Foreign key constraint is incorrectly formed")
+SET FOREIGN_KEY_CHECKS=DEFAULT;
+DROP TABLE t1;
+#
+# MDEV-22602 Disable UPDATE CASCADE for SQL constraints
+#
+# TODO: enable them after MDEV-16417 is finished
+create or replace table t1 (a int primary key) engine=innodb;
+create or replace table t2 (a int, check(a > 0), foreign key(a) references t1(a) on update cascade) engine=innodb;
+ERROR HY000: Function or expression 'a' cannot be used in the CHECK clause of `CONSTRAINT_1`
+create or replace table t1 (f1 int, f2 date, f3 date, key(f1,f3,f2)) engine=innodb;
+create or replace table t2 (
+a int, s date, e date,
+period for p (s, e),
+primary key (a, p without overlaps),
+foreign key (a, e, s) references t1 (f1, f3, f2) on delete cascade on update cascade) engine=innodb;
+ERROR HY000: Key `PRIMARY` cannot have WITHOUT OVERLAPS
+create or replace table t1 (a varchar(4096) unique) engine=innodb;
+create or replace table t2 (pk int primary key, a varchar(4096) unique, foreign key(a) references t1(a) on update cascade) engine=innodb;
+ERROR HY000: Can't create table `test`.`t2` (errno: 150 "Foreign key constraint is incorrectly formed")
+drop table t1;
+# End of 10.5 tests
diff --git a/mysql-test/suite/innodb/r/full_crc32_import.result b/mysql-test/suite/innodb/r/full_crc32_import.result
index b7f6f1ab09a..6fec6107f2c 100644
--- a/mysql-test/suite/innodb/r/full_crc32_import.result
+++ b/mysql-test/suite/innodb/r/full_crc32_import.result
@@ -5,6 +5,7 @@ CREATE TABLE t1
b blob,
c blob,
KEY (b(200))) ENGINE=InnoDB ROW_FORMAT=COMPACT;
+BEGIN;
INSERT INTO t1 (b, c) values (repeat("ab", 200), repeat("bc", 200));
INSERT INTO t1 (b, c) values (repeat("bc", 200), repeat("cd", 200));
INSERT INTO t1 (b, c) values (repeat("cd", 200), repeat("ef", 200));
@@ -17,6 +18,7 @@ INSERT INTO t1 (b, c) values (repeat("ij", 200), repeat("kl", 200));
INSERT INTO t1 (b, c) values (repeat("jk", 200), repeat("lm", 200));
INSERT INTO t1 (b, c) SELECT b,c FROM t1 ORDER BY a;
INSERT INTO t1 (b, c) SELECT b,c FROM t1 ORDER BY a;
+COMMIT;
SELECT COUNT(*) FROM t1;
COUNT(*)
40
@@ -36,8 +38,6 @@ restore: t1 .ibd and .cfg files
ALTER TABLE t1 IMPORT TABLESPACE;
ERROR HY000: Internal error: Drop all secondary indexes before importing table test/t1 when .cfg file is missing.
ALTER TABLE t1 DROP INDEX b;
-Warnings:
-Warning 1814 Tablespace has been discarded for table `t1`
ALTER TABLE t1 IMPORT TABLESPACE;
SHOW CREATE TABLE t1;
Table Create Table
@@ -89,6 +89,7 @@ ST_GeomFromText('LINESTRING(15 15,24 10,31 20)'));
INSERT INTO t1(c2,c3) VALUES(
ST_GeomFromText('POINT(60 50)'),
ST_GeomFromText('LINESTRING(10 15,20 44,35 32)'));
+BEGIN;
INSERT INTO t1(c2, c3) SELECT c2, c3 FROM t1;
INSERT INTO t1(c2, c3) SELECT c2, c3 FROM t1;
INSERT INTO t1(c2, c3) SELECT c2, c3 FROM t1;
@@ -100,6 +101,7 @@ INSERT INTO t1(c2, c3) SELECT c2, c3 FROM t1;
INSERT INTO t1(c2, c3) SELECT c2, c3 FROM t1;
INSERT INTO t1(c2, c3) SELECT c2, c3 FROM t1;
INSERT INTO t1(c2, c3) SELECT c2, c3 FROM t1;
+COMMIT;
FLUSH TABLE t1 FOR EXPORT;
# List before copying files
db.opt
@@ -114,10 +116,9 @@ restore: t1 .ibd and .cfg files
ALTER TABLE t1 IMPORT TABLESPACE;
ERROR HY000: Internal error: Drop all secondary indexes before importing table test/t1 when .cfg file is missing.
ALTER TABLE t1 DROP INDEX idx1;
-Warnings:
-Warning 1814 Tablespace has been discarded for table `t1`
ALTER TABLE t1 IMPORT TABLESPACE;
Warnings:
+Warning 1814 Tablespace has been discarded for table `t1`
Warning 1810 IO Read error: (2, No such file or directory) Error opening './test/t1.cfg', will attempt to import without schema verification
SHOW CREATE TABLE t1;
Table Create Table
diff --git a/mysql-test/suite/innodb/r/gap_locks.result b/mysql-test/suite/innodb/r/gap_locks.result
new file mode 100644
index 00000000000..cd60b1fab22
--- /dev/null
+++ b/mysql-test/suite/innodb/r/gap_locks.result
@@ -0,0 +1,35 @@
+CREATE TABLE t1(a INT PRIMARY KEY, b VARCHAR(40), c INT, INDEX(b,c))
+ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1,'1',1),(2,'2',1);
+SET @save_locks= @@GLOBAL.innodb_status_output_locks;
+SET GLOBAL INNODB_STATUS_OUTPUT_LOCKS = 'ON';
+SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
+BEGIN;
+DELETE FROM t1 WHERE b='2' AND c=2;
+SHOW ENGINE INNODB STATUS;
+Type Name Status
+InnoDB 2 lock struct(s), 1 row lock(s)
+ROLLBACK;
+SET TRANSACTION ISOLATION LEVEL REPEATABLE READ;
+BEGIN;
+DELETE FROM t1 WHERE b='2' AND c=2;
+SHOW ENGINE INNODB STATUS;
+Type Name Status
+InnoDB 2 lock struct(s), 1 row lock(s)
+ROLLBACK;
+SET TRANSACTION ISOLATION LEVEL READ COMMITTED;
+BEGIN;
+DELETE FROM t1 WHERE b='2' AND c=2;
+SHOW ENGINE INNODB STATUS;
+Type Name Status
+InnoDB 1 lock struct(s), 0 row lock(s)
+ROLLBACK;
+SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+BEGIN;
+DELETE FROM t1 WHERE b='2' AND c=2;
+SHOW ENGINE INNODB STATUS;
+Type Name Status
+InnoDB 1 lock struct(s), 0 row lock(s)
+ROLLBACK;
+SET GLOBAL INNODB_STATUS_OUTPUT_LOCKS = @save_locks;
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/r/group_commit_force_recovery.result b/mysql-test/suite/innodb/r/group_commit_force_recovery.result
new file mode 100644
index 00000000000..f177d96c744
--- /dev/null
+++ b/mysql-test/suite/innodb/r/group_commit_force_recovery.result
@@ -0,0 +1,5 @@
+CREATE TABLE t1(a int) ENGINE=InnoDB;
+INSERT INTO t1 SET a=1;
+RESET MASTER;
+DROP TABLE t1;
+End of the tests.
diff --git a/mysql-test/suite/innodb/r/ibuf_not_empty.result b/mysql-test/suite/innodb/r/ibuf_not_empty.result
index 3382c74174e..d1b8203b063 100644
--- a/mysql-test/suite/innodb/r/ibuf_not_empty.result
+++ b/mysql-test/suite/innodb/r/ibuf_not_empty.result
@@ -1,4 +1,3 @@
-SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
CREATE TABLE t1(
a INT AUTO_INCREMENT PRIMARY KEY,
b CHAR(1),
@@ -6,26 +5,11 @@ c INT,
INDEX(b))
ENGINE=InnoDB STATS_PERSISTENT=0;
SET GLOBAL innodb_change_buffering_debug = 1;
-BEGIN;
-INSERT INTO t1 VALUES(0,'x',1);
-INSERT INTO t1 SELECT 0,b,c FROM t1;
-INSERT INTO t1 SELECT 0,b,c FROM t1;
-INSERT INTO t1 SELECT 0,b,c FROM t1;
-INSERT INTO t1 SELECT 0,b,c FROM t1;
-INSERT INTO t1 SELECT 0,b,c FROM t1;
-INSERT INTO t1 SELECT 0,b,c FROM t1;
-INSERT INTO t1 SELECT 0,b,c FROM t1;
-INSERT INTO t1 SELECT 0,b,c FROM t1;
-INSERT INTO t1 SELECT 0,b,c FROM t1;
-INSERT INTO t1 SELECT 0,b,c FROM t1;
-INSERT INTO t1 SELECT 0,b,c FROM t1;
-INSERT INTO t1 SELECT 0,b,c FROM t1;
-COMMIT;
-InnoDB 0 transactions not purged
+INSERT INTO t1 SELECT 0,'x',1 FROM seq_1_to_1024;
# restart: --innodb-force-recovery=6 --innodb-change-buffer-dump
check table t1;
Table Op Msg_type Msg_text
-test.t1 check Warning InnoDB: Index 'b' contains #### entries, should be 4096.
+test.t1 check Warning InnoDB: Index 'b' contains 990 entries, should be 1024.
test.t1 check error Corrupt
# restart
SET GLOBAL innodb_fast_shutdown=0;
diff --git a/mysql-test/suite/innodb/r/import_corrupted.result b/mysql-test/suite/innodb/r/import_corrupted.result
index c0474ebbb1d..149a48dccfe 100644
--- a/mysql-test/suite/innodb/r/import_corrupted.result
+++ b/mysql-test/suite/innodb/r/import_corrupted.result
@@ -1,6 +1,6 @@
call mtr.add_suppression("Table `test`.`t2` should have 2 indexes but the tablespace has 1 indexes");
call mtr.add_suppression("Index for table 't2' is corrupt; try to repair it");
-call mtr.add_suppression("Trying to read page number 23 in space .*, space name test/t2, which is outside the tablespace bounds. Byte offset 0, len 16384");
+call mtr.add_suppression("Trying to read .* bytes at .* outside the bounds of the file: \\..test.t2\\.ibd");
CREATE TABLE t1 (
id INT AUTO_INCREMENT PRIMARY KEY,
not_id INT,
diff --git a/mysql-test/suite/innodb/r/index_vcol_purge_startup.result b/mysql-test/suite/innodb/r/index_vcol_purge_startup.result
new file mode 100644
index 00000000000..5603c14acf3
--- /dev/null
+++ b/mysql-test/suite/innodb/r/index_vcol_purge_startup.result
@@ -0,0 +1,24 @@
+call mtr.add_suppression('SQL_ERROR_LOG');
+call mtr.add_suppression('Failed to initialize plugins');
+call mtr.add_suppression('Aborting');
+create table t1(a int primary key, b int as (100-a*a), index(b)) engine=innodb;
+insert t1 (a) values(1),(2),(3);
+start transaction;
+select * from t1 order by a;
+a b
+1 99
+2 96
+3 91
+connect con1, localhost, root;
+delete from t1 where a=2;
+flush tables;
+connection default;
+# Kill the server
+# Failed restart
+# Start the server
+# restart
+select * from t1 order by a;
+a b
+1 99
+3 91
+drop table t1;
diff --git a/mysql-test/suite/innodb/r/information_schema_grants.result b/mysql-test/suite/innodb/r/information_schema_grants.result
index 04550bfa114..622faa2920a 100644
--- a/mysql-test/suite/innodb/r/information_schema_grants.result
+++ b/mysql-test/suite/innodb/r/information_schema_grants.result
@@ -66,8 +66,6 @@ create sql security invoker view i_sys_virtual as select * from information_sche
create sql security definer view d_sys_virtual as select * from information_schema.innodb_sys_virtual;
create sql security invoker view i_tablespaces_encryption as select * from information_schema.innodb_tablespaces_encryption;
create sql security definer view d_tablespaces_encryption as select * from information_schema.innodb_tablespaces_encryption;
-create sql security invoker view i_tablespaces_scrubbing as select * from information_schema.innodb_tablespaces_scrubbing;
-create sql security definer view d_tablespaces_scrubbing as select * from information_schema.innodb_tablespaces_scrubbing;
create sql security invoker view i_trx as select * from information_schema.innodb_trx;
create sql security definer view d_trx as select * from information_schema.innodb_trx;
connection select_only;
@@ -284,13 +282,6 @@ ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s)
select count(*) > -1 from d_tablespaces_encryption;
count(*) > -1
1
-select count(*) > -1 from information_schema.innodb_tablespaces_scrubbing;
-ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
-select count(*) > -1 from i_tablespaces_scrubbing;
-ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
-select count(*) > -1 from d_tablespaces_scrubbing;
-count(*) > -1
-1
select count(*) > -1 from information_schema.innodb_trx;
ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation
select count(*) > -1 from i_trx;
diff --git a/mysql-test/suite/innodb/r/innodb-alter-debug.result b/mysql-test/suite/innodb/r/innodb-alter-debug.result
index 51ba58aa1ef..4644c124a45 100644
--- a/mysql-test/suite/innodb/r/innodb-alter-debug.result
+++ b/mysql-test/suite/innodb/r/innodb-alter-debug.result
@@ -98,3 +98,12 @@ disconnect con1;
connection default;
UNLOCK TABLES;
DROP TABLE t1;
+#
+# MDEV-7318 RENAME INDEX
+#
+CREATE TABLE t (c1 INT, c2 INT, KEY i2 (c2)) ENGINE=INNODB;
+SET DEBUG_DBUG= '+d,ib_rename_index_fail1';
+ALTER TABLE t RENAME INDEX i2 to x, ALGORITHM=INPLACE;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+SET DEBUG_DBUG = @saved_debug_dbug;
+DROP TABLE t;
diff --git a/mysql-test/suite/innodb/r/innodb-alter-timestamp.result b/mysql-test/suite/innodb/r/innodb-alter-timestamp.result
index 280ab3ebee4..5e95429c7bf 100644
--- a/mysql-test/suite/innodb/r/innodb-alter-timestamp.result
+++ b/mysql-test/suite/innodb/r/innodb-alter-timestamp.result
@@ -146,8 +146,6 @@ CREATE TABLE t(a INT PRIMARY KEY) ENGINE=InnoDB;
ALTER TABLE t DISCARD TABLESPACE;
SET sql_mode='NO_ZERO_DATE';
ALTER TABLE t ADD c DATE NOT NULL;
-Warnings:
-Warning 1814 Tablespace has been discarded for table `t`
SET sql_mode=DEFAULT;
DROP TABLE t;
# End of 10.3 tests
diff --git a/mysql-test/suite/innodb/r/innodb-alter.result b/mysql-test/suite/innodb/r/innodb-alter.result
index da076b270e5..5eee3ce50ce 100644
--- a/mysql-test/suite/innodb/r/innodb-alter.result
+++ b/mysql-test/suite/innodb/r/innodb-alter.result
@@ -738,7 +738,7 @@ Table Create Table
t2 CREATE TABLE `t2` (
`C2` int(11) DEFAULT NULL,
KEY `c2` (`C2`),
- CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`c2`) REFERENCES `t1` (`c1`)
+ CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`C2`) REFERENCES `t1` (`C1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
ALTER TABLE t1 CHANGE COLUMN C1 c5 INT;
ALTER TABLE t2 CHANGE COLUMN C2 c6 INT;
@@ -785,7 +785,7 @@ SELECT C.NAME FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS C INNER JOIN
INFORMATION_SCHEMA.INNODB_SYS_TABLES T ON C.TABLE_ID=T.TABLE_ID
WHERE T.NAME='test/t1';
NAME
-a
+A
b
DROP TABLE t1;
# different FOREIGN KEY cases
@@ -842,27 +842,27 @@ t2 CREATE TABLE `t2` (
KEY `bb` (`BB`),
KEY `CC` (`CC`),
KEY `DD` (`DD`),
- CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`aa`) REFERENCES `t1` (`a`),
- CONSTRAINT `t2_ibfk_2` FOREIGN KEY (`bb`) REFERENCES `t1` (`b`),
- CONSTRAINT `t2_ibfk_3` FOREIGN KEY (`cc`) REFERENCES `t1` (`c`),
- CONSTRAINT `t2_ibfk_4` FOREIGN KEY (`dd`) REFERENCES `t1` (`d`)
+ CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`AA`) REFERENCES `t1` (`A`),
+ CONSTRAINT `t2_ibfk_2` FOREIGN KEY (`BB`) REFERENCES `t1` (`B`),
+ CONSTRAINT `t2_ibfk_3` FOREIGN KEY (`CC`) REFERENCES `t1` (`C`),
+ CONSTRAINT `t2_ibfk_4` FOREIGN KEY (`DD`) REFERENCES `t1` (`D`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
DELETE FROM t1 WHERE a=1;
-ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`aa`) REFERENCES `t1` (`a`))
+ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`AA`) REFERENCES `t1` (`A`))
DELETE FROM t1 WHERE A=1;
-ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`aa`) REFERENCES `t1` (`a`))
+ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`AA`) REFERENCES `t1` (`A`))
DELETE FROM t1 WHERE b=1;
-ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`aa`) REFERENCES `t1` (`a`))
+ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`AA`) REFERENCES `t1` (`A`))
DELETE FROM t1 WHERE B=1;
-ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`aa`) REFERENCES `t1` (`a`))
+ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`AA`) REFERENCES `t1` (`A`))
DELETE FROM t1 WHERE c=1;
-ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`aa`) REFERENCES `t1` (`a`))
+ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`AA`) REFERENCES `t1` (`A`))
DELETE FROM t1 WHERE C=1;
-ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`aa`) REFERENCES `t1` (`a`))
+ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`AA`) REFERENCES `t1` (`A`))
DELETE FROM t1 WHERE d=1;
-ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`aa`) REFERENCES `t1` (`a`))
+ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`AA`) REFERENCES `t1` (`A`))
DELETE FROM t1 WHERE D=1;
-ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`aa`) REFERENCES `t1` (`a`))
+ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`AA`) REFERENCES `t1` (`A`))
DROP TABLE t2, t1;
# virtual columns case too
CREATE TABLE t1 (a INT, b INT GENERATED ALWAYS AS (a) VIRTUAL) ENGINE = InnoDB;
@@ -877,7 +877,7 @@ SELECT C.NAME FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS C INNER JOIN
INFORMATION_SCHEMA.INNODB_SYS_TABLES T ON C.TABLE_ID=T.TABLE_ID
WHERE T.NAME='test/t1';
NAME
-a
+A
b
DROP TABLE t1;
# and an MDEV-18041 regression related to indexes prefixes
diff --git a/mysql-test/suite/innodb/r/innodb-analyze.result b/mysql-test/suite/innodb/r/innodb-analyze.result
index 2aee004a2d6..f3285a817e0 100644
--- a/mysql-test/suite/innodb/r/innodb-analyze.result
+++ b/mysql-test/suite/innodb/r/innodb-analyze.result
@@ -1,2 +1,4 @@
+Warnings:
+Warning 1292 Truncated incorrect innodb_stats_transient_sample... value: '0'
Variable_name Value
-innodb_stats_sample_pages 1
+innodb_stats_transient_sample_pages 1
diff --git a/mysql-test/suite/innodb/r/innodb-change-buffer-recovery.result b/mysql-test/suite/innodb/r/innodb-change-buffer-recovery.result
index d795b516d5e..678c8c67be5 100644
--- a/mysql-test/suite/innodb/r/innodb-change-buffer-recovery.result
+++ b/mysql-test/suite/innodb/r/innodb-change-buffer-recovery.result
@@ -50,5 +50,5 @@ Table Op Msg_type Msg_text
test.t1 check status OK
SHOW ENGINE INNODB STATUS;
Type Name Status
-InnoDB insert 79, delete mark 1
+InnoDB
DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/r/innodb-fk-warnings.result b/mysql-test/suite/innodb/r/innodb-fk-warnings.result
index 21e7c23d249..c85dcf22c06 100644
--- a/mysql-test/suite/innodb/r/innodb-fk-warnings.result
+++ b/mysql-test/suite/innodb/r/innodb-fk-warnings.result
@@ -25,7 +25,16 @@ create table t2(a int, constraint a foreign key a (a) references t1(a)) engine=i
ERROR HY000: Can't create table `test`.`t2` (errno: 150 "Foreign key constraint is incorrectly formed")
show warnings;
Level Code Message
-Warning 150 Create table `test`.`t2` with foreign key constraint failed. There is no index in the referenced table where the referenced columns appear as the first columns near ' foreign key a (a) references t1(a)) engine=innodb'.
+Warning 150 Create table `test`.`t2` with foreign key `a` constraint failed. There is no index in the referenced table where the referenced columns appear as the first columns.
+Error 1005 Can't create table `test`.`t2` (errno: 150 "Foreign key constraint is incorrectly formed")
+Warning 1215 Cannot add foreign key constraint for `t2`
+drop table t1;
+create table t1(a int unique, b int) engine=innodb;
+create table t2(a int, b int, foreign key (a) references t1(a), foreign key (b) references t1(b)) engine=innodb;
+ERROR HY000: Can't create table `test`.`t2` (errno: 150 "Foreign key constraint is incorrectly formed")
+show warnings;
+Level Code Message
+Warning 150 Create table `test`.`t2` with foreign key (b) constraint failed. There is no index in the referenced table where the referenced columns appear as the first columns.
Error 1005 Can't create table `test`.`t2` (errno: 150 "Foreign key constraint is incorrectly formed")
Warning 1215 Cannot add foreign key constraint for `t2`
drop table t1;
@@ -42,7 +51,7 @@ alter table t2 add constraint b foreign key (b) references t2(b);
ERROR HY000: Can't create table `test`.`t2` (errno: 150 "Foreign key constraint is incorrectly formed")
show warnings;
Level Code Message
-Warning 150 Alter table `test`.`t2` with foreign key constraint failed. There is no index in the referenced table where the referenced columns appear as the first columns near ' foreign key (b) references t2(b)'.
+Warning 150 Alter table `test`.`t2` with foreign key `b` constraint failed. There is no index in the referenced table where the referenced columns appear as the first columns.
Error 1005 Can't create table `test`.`t2` (errno: 150 "Foreign key constraint is incorrectly formed")
Warning 1215 Cannot add foreign key constraint for `t2`
drop table t2, t1;
@@ -51,7 +60,7 @@ alter table t1 add constraint c1 foreign key (f1) references t11(f1);
ERROR HY000: Can't create table `test`.`t1` (errno: 150 "Foreign key constraint is incorrectly formed")
show warnings;
Level Code Message
-Warning 150 Alter table `test`.`t1` with foreign key constraint failed. Referenced table `test`.`t11` not found in the data dictionary near ' foreign key (f1) references t11(f1)'.
+Warning 150 Alter table `test`.`t1` with foreign key `c1` constraint failed. Referenced table `test`.`t11` not found in the data dictionary.
Error 1005 Can't create table `test`.`t1` (errno: 150 "Foreign key constraint is incorrectly formed")
Warning 1215 Cannot add foreign key constraint for `t1`
drop table t1;
@@ -74,14 +83,14 @@ create temporary table t2(a int, foreign key(a) references t1(a)) engine=innodb;
ERROR HY000: Can't create table `test`.`t2` (errno: 150 "Foreign key constraint is incorrectly formed")
show warnings;
Level Code Message
-Warning 150 Create table `mysqld.1`.`t2` with foreign key constraint failed. Referenced table `mysqld.1`.`t1` not found in the data dictionary near 'foreign key(a) references t1(a)) engine=innodb'.
+Warning 150 Create table `test`.`t2` with foreign key constraint failed. Temporary tables can't have foreign key constraints.
Error 1005 Can't create table `test`.`t2` (errno: 150 "Foreign key constraint is incorrectly formed")
Warning 1215 Cannot add foreign key constraint for `t2`
alter table t1 add foreign key(b) references t1(a);
ERROR HY000: Can't create table `test`.`t1` (errno: 150 "Foreign key constraint is incorrectly formed")
show warnings;
Level Code Message
-Warning 150 Alter table `mysqld.1`.`t1` with foreign key constraint failed. Referenced table `mysqld.1`.`t1` not found in the data dictionary near 'foreign key(b) references t1(a)'.
+Warning 150 Alter table `test`.`t1` with foreign key constraint failed. Temporary tables can't have foreign key constraints.
Error 1005 Can't create table `test`.`t1` (errno: 150 "Foreign key constraint is incorrectly formed")
Warning 1215 Cannot add foreign key constraint for `t1`
drop table t1;
@@ -104,14 +113,14 @@ alter table t1 add constraint c1 foreign key (f1) references t1(f1) on update se
ERROR HY000: Can't create table `test`.`t1` (errno: 150 "Foreign key constraint is incorrectly formed")
show warnings;
Level Code Message
-Warning 150 Alter table `test`.`t1` with foreign key constraint failed. You have defined a SET NULL condition but column 'f1' is defined as NOT NULL in ' foreign key (f1) references t1(f1) on update set null' near ' on update set null'.
+Warning 150 Alter table `test`.`t1` with foreign key `c1` constraint failed. You have defined a SET NULL condition but column 'f1' is defined as NOT NULL.
Error 1005 Can't create table `test`.`t1` (errno: 150 "Foreign key constraint is incorrectly formed")
Warning 1215 Cannot add foreign key constraint for `t1`
create table t2(a int not null, foreign key(a) references t1(f1) on delete set null) engine=innodb;
ERROR HY000: Can't create table `test`.`t2` (errno: 150 "Foreign key constraint is incorrectly formed")
show warnings;
Level Code Message
-Warning 150 Create table `test`.`t2` with foreign key constraint failed. You have defined a SET NULL condition but column 'a' is defined as NOT NULL in 'foreign key(a) references t1(f1) on delete set null) engine=innodb' near ' on delete set null) engine=innodb'.
+Warning 150 Create table `test`.`t2` with foreign key (a) constraint failed. You have defined a SET NULL condition but column 'a' is defined as NOT NULL.
Error 1005 Can't create table `test`.`t2` (errno: 150 "Foreign key constraint is incorrectly formed")
Warning 1215 Cannot add foreign key constraint for `t2`
drop table t1;
@@ -120,7 +129,7 @@ create table t2(a char(20), key(a), foreign key(a) references t1(f1)) engine=inn
ERROR HY000: Can't create table `test`.`t2` (errno: 150 "Foreign key constraint is incorrectly formed")
show warnings;
Level Code Message
-Warning 150 Create table `test`.`t2` with foreign key constraint failed. Field type or character set for column 'a' does not mach referenced column 'f1' near 'foreign key(a) references t1(f1)) engine=innodb'.
+Warning 150 Create table `test`.`t2` with foreign key (a) constraint failed. Field type or character set for column 'a' does not match referenced column 'f1'.
Error 1005 Can't create table `test`.`t2` (errno: 150 "Foreign key constraint is incorrectly formed")
Warning 1215 Cannot add foreign key constraint for `t2`
drop table t1;
diff --git a/mysql-test/suite/innodb/r/innodb-fk.result b/mysql-test/suite/innodb/r/innodb-fk.result
index a7b667b3839..ce873be93da 100644
--- a/mysql-test/suite/innodb/r/innodb-fk.result
+++ b/mysql-test/suite/innodb/r/innodb-fk.result
@@ -52,8 +52,7 @@ CONSTRAINT fk3 FOREIGN KEY (f3) REFERENCES t3 (id) ON DELETE CASCADE
ERROR HY000: Can't create table `test`.`t2` (errno: 150 "Foreign key constraint is incorrectly formed")
show warnings;
Level Code Message
-Warning 150 Create table `test`.`t2` with foreign key constraint failed. Referenced table `test`.`t3` not found in the data dictionary near ' FOREIGN KEY (f3) REFERENCES t3 (id) ON DELETE CASCADE
-) ENGINE=InnoDB'.
+Warning 150 Create table `test`.`t2` with foreign key `fk3` constraint failed. Referenced table `test`.`t3` not found in the data dictionary.
Error 1005 Can't create table `test`.`t2` (errno: 150 "Foreign key constraint is incorrectly formed")
Warning 1215 Cannot add foreign key constraint for `t2`
CREATE TABLE t2 (
@@ -67,7 +66,7 @@ ALTER TABLE t2 ADD CONSTRAINT fk3 FOREIGN KEY (f3) REFERENCES t3 (id) ON DELETE
ERROR HY000: Can't create table `test`.`t2` (errno: 150 "Foreign key constraint is incorrectly formed")
show warnings;
Level Code Message
-Warning 150 Alter table `test`.`t2` with foreign key constraint failed. Referenced table `test`.`t3` not found in the data dictionary near ' FOREIGN KEY (f3) REFERENCES t3 (id) ON DELETE CASCADE'.
+Warning 150 Alter table `test`.`t2` with foreign key `fk3` constraint failed. Referenced table `test`.`t3` not found in the data dictionary.
Error 1005 Can't create table `test`.`t2` (errno: 150 "Foreign key constraint is incorrectly formed")
Warning 1215 Cannot add foreign key constraint for `t2`
drop table t2;
@@ -191,3 +190,34 @@ bor#oda CREATE TABLE `bor#oda` (
CONSTRAINT `bor#oda_ibfk_2` FOREIGN KEY (`b`) REFERENCES `bor#oda` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8
DROP TABLE `bor#oda`;
+#
+# MDEV-21127 Assertion `(size_t)(ptr - buf) < MAX_TEXT - 4' failed in key_text::key_text
+#
+CREATE TABLE t1 (
+a012345678901234567890123456789012345678901 char(255),
+b char(255),
+FOREIGN KEY ( a012345678901234567890123456789012345678901, b ) REFERENCES tx (ax, bx)
+) ENGINE=InnoDB;
+ERROR HY000: Can't create table `test`.`t1` (errno: 150 "Foreign key constraint is incorrectly formed")
+CREATE TABLE t1 (
+a012345678901234567 int,
+b int,
+c0123456789012345678 int,
+FOREIGN KEY (a012345678901234567,c0123456789012345678,b) REFERENCES tx (x1,x2,x3)
+) ENGINE=InnoDB;
+ERROR HY000: Can't create table `test`.`t1` (errno: 150 "Foreign key constraint is incorrectly formed")
+#
+# MDEV-25642 InnoDB rename table copy DDL fails
+# while dropping the table
+#
+call mtr.add_suppression("InnoDB: In ALTER TABLE `test`.`t1` has or is referenced in foreign key constraints which are not compatible with the new table definition.");
+CREATE TABLE t1 (a VARCHAR(10) NOT NULL PRIMARY KEY) ENGINE=InnoDB;
+CREATE TABLE t1_fk (a VARCHAR(40), KEY a (a), FULLTEXT KEY(a), CONSTRAINT fk FOREIGN KEY(a) REFERENCES t1 (a) ON UPDATE CASCADE) ENGINE=InnoDB;
+ALTER TABLE t1 RENAME TO tm1, ALGORITHM=COPY;
+SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN;
+ID FOR_NAME REF_NAME N_COLS TYPE
+test/fk test/t1_fk test/t1 1 4
+SET FOREIGN_KEY_CHECKS=0;
+CREATE TABLE t1 (c1 BIGINT NOT NULL, c2 BIGINT NOT NULL, PRIMARY KEY(c1), UNIQUE KEY(c2)) ENGINE=MEMORY;
+ALTER TABLE t1 ENGINE=InnoDB, ALGORITHM=COPY;
+DROP TABLE t1, tm1, t1_fk;
diff --git a/mysql-test/suite/innodb/r/innodb-isolation.result b/mysql-test/suite/innodb/r/innodb-isolation.result
index a308f10a8a9..ce9c530ff44 100644
--- a/mysql-test/suite/innodb/r/innodb-isolation.result
+++ b/mysql-test/suite/innodb/r/innodb-isolation.result
@@ -963,15 +963,15 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 12 #
EXPLAIN SELECT c1, c2 FROM t1 WHERE c1 > ((SELECT COUNT(*) FROM t1) / 2);
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t1 index PRIMARY k2 5 NULL 12 #
+1 PRIMARY t1 range PRIMARY PRIMARY 4 NULL 8 #
2 SUBQUERY t1 index NULL k2 5 NULL 12 #
EXPLAIN SELECT COUNT(c2) FROM t1 WHERE c1 > ((SELECT COUNT(*) FROM t1) / 2);
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t1 index PRIMARY k2 5 NULL 12 #
+1 PRIMARY t1 range PRIMARY PRIMARY 4 NULL 8 #
2 SUBQUERY t1 index NULL k2 5 NULL 12 #
EXPLAIN SELECT COUNT(*) FROM t1 WHERE c1 > (SELECT AVG(c1) FROM t1);
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t1 index PRIMARY k2 5 NULL 12 #
+1 PRIMARY t1 range PRIMARY PRIMARY 4 NULL 7 #
2 SUBQUERY t1 index NULL k2 5 NULL 12 #
#
# Make all indexes in t2 obsolete to the active repeatable read transaction
diff --git a/mysql-test/suite/innodb/r/innodb-page-cleaners.result b/mysql-test/suite/innodb/r/innodb-page-cleaners.result
deleted file mode 100644
index 0954e42cf9f..00000000000
--- a/mysql-test/suite/innodb/r/innodb-page-cleaners.result
+++ /dev/null
@@ -1,45 +0,0 @@
-SET @saved_page_cleaners = @@GLOBAL.innodb_page_cleaners;
-create table t1 (a int not null primary key auto_increment,
-b bigint,
-c varchar(200),
-d int,
-key b (b),
-key d (d)) engine=INNODB;
-set GLOBAL innodb_page_cleaners = 4;
-connect con1,localhost,root,,;
-connection con1;
-update t1 set b = b + 5, d = d + 1 where a between 1 and 2000;
-connect con2,localhost,root,,;
-connection con2;
-update t1 set b = b + 5, d = d + 1 where a between 3000 and 5000;
-connect con3,localhost,root,,;
-connection con3;
-update t1 set b = b + 5, d = d + 1 where a between 8000 and 12000;
-connection default;
-set GLOBAL innodb_page_cleaners = 2;
-set GLOBAL innodb_page_cleaners = 4;
-set GLOBAL innodb_page_cleaners = 6;
-connection con1;
-connection con2;
-connection con3;
-connection default;
-set GLOBAL innodb_page_cleaners = 4;
-connection con1;
-update t1 set b = b + 5, d = d + 1 where a between 1 and 2000;
-connection con2;
-update t1 set b = b + 5, d = d + 1 where a between 3000 and 5000;
-connection con3;
-update t1 set b = b + 5, d = d + 1 where a between 8000 and 12000;
-connection default;
-set GLOBAL innodb_page_cleaners = 3;
-set GLOBAL innodb_page_cleaners = 2;
-set GLOBAL innodb_page_cleaners = 1;
-connection con1;
-connection con2;
-connection con3;
-connection default;
-disconnect con1;
-disconnect con2;
-disconnect con3;
-DROP TABLE t1;
-SET GLOBAL innodb_page_cleaners=@saved_page_cleaners;
diff --git a/mysql-test/suite/innodb/r/innodb-page_compression_tables.result b/mysql-test/suite/innodb/r/innodb-page_compression_tables.result
index 2aee063c1ac..693db6eb7ec 100644
--- a/mysql-test/suite/innodb/r/innodb-page_compression_tables.result
+++ b/mysql-test/suite/innodb/r/innodb-page_compression_tables.result
@@ -55,6 +55,14 @@ innodb_redundant CREATE TABLE `innodb_redundant` (
`b` char(200) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT `page_compressed`=1
drop table innodb_redundant;
+#
+# MDEV-24455 Assertion `!m_freed_space' failed in mtr_t::start
+#
+CREATE TABLE t1 (a TEXT, b TEXT) ENGINE=InnoDB PAGE_COMPRESSED='ON';
+BEGIN;
+INSERT INTO t1 VALUES(REPEAT('x',81),REPEAT('x',8034));
+ROLLBACK;
+DROP TABLE t1;
create procedure innodb_insert_proc (repeat_count int)
begin
declare current_num int;
diff --git a/mysql-test/suite/innodb/r/innodb-stats-modified-counter.result b/mysql-test/suite/innodb/r/innodb-stats-modified-counter.result
index db56c6ba81a..fe47912edf4 100644
--- a/mysql-test/suite/innodb/r/innodb-stats-modified-counter.result
+++ b/mysql-test/suite/innodb/r/innodb-stats-modified-counter.result
@@ -2,19 +2,19 @@ set global innodb_stats_auto_recalc=off;
CREATE TABLE t1 (i int) ENGINE=InnoDB;
SELECT NAME, STATS_INITIALIZED, NUM_ROWS, MODIFIED_COUNTER FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1';
NAME STATS_INITIALIZED NUM_ROWS MODIFIED_COUNTER
-test/t1 Initialized 0 0
+test/t1 1 0 0
INSERT INTO t1 VALUES (1);
INSERT INTO t1 VALUES (2);
SELECT NAME, STATS_INITIALIZED, NUM_ROWS, MODIFIED_COUNTER FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1';
NAME STATS_INITIALIZED NUM_ROWS MODIFIED_COUNTER
-test/t1 Initialized 2 2
+test/t1 1 2 2
DELETE FROM t1 WHERE i = 1;
SELECT NAME, STATS_INITIALIZED, NUM_ROWS, MODIFIED_COUNTER FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1';
NAME STATS_INITIALIZED NUM_ROWS MODIFIED_COUNTER
-test/t1 Initialized 1 3
+test/t1 1 1 3
UPDATE t1 SET i = 4 WHERE i = 2;
SELECT NAME, STATS_INITIALIZED, NUM_ROWS, MODIFIED_COUNTER FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1';
NAME STATS_INITIALIZED NUM_ROWS MODIFIED_COUNTER
-test/t1 Initialized 1 4
+test/t1 1 1 4
DROP TABLE t1;
set global innodb_stats_auto_recalc=default;
diff --git a/mysql-test/suite/innodb/r/innodb-stats-sample.result b/mysql-test/suite/innodb/r/innodb-stats-sample.result
index a049a1d82c1..0670903ca28 100644
--- a/mysql-test/suite/innodb/r/innodb-stats-sample.result
+++ b/mysql-test/suite/innodb/r/innodb-stats-sample.result
@@ -1,4 +1,6 @@
+Warnings:
+Warning 1292 Truncated incorrect innodb_stats_transient_sample... value: '0'
Variable_name Value
-innodb_stats_sample_pages 1
+innodb_stats_transient_sample_pages 1
Variable_name Value
innodb_stats_traditional OFF
diff --git a/mysql-test/suite/innodb/r/innodb-system-table-view.result b/mysql-test/suite/innodb/r/innodb-system-table-view.result
index 65dc0a8e274..11fc1ae8cf9 100644
--- a/mysql-test/suite/innodb/r/innodb-system-table-view.result
+++ b/mysql-test/suite/innodb/r/innodb-system-table-view.result
@@ -81,17 +81,17 @@ CREATE TABLE t_compact (a INT KEY, b TEXT) ROW_FORMAT=COMPACT ENGINE=innodb;
CREATE TABLE t_compressed (a INT KEY, b TEXT) ROW_FORMAT=COMPRESSED ENGINE=innodb KEY_BLOCK_SIZE=2;
CREATE TABLE t_dynamic (a INT KEY, b TEXT) ROW_FORMAT=DYNAMIC ENGINE=innodb;
=== information_schema.innodb_sys_tables and innodb_sys_tablespaces ===
-Table Name Tablespace Table Flags Columns Row Format Zip Size Space Type
-test/t_compact test/t_compact 1 5 Compact 0 Single
-test/t_compressed test/t_compressed 37 5 Compressed 2048 Single
-test/t_dynamic test/t_dynamic 33 5 Dynamic 0 Single
-test/t_redundant test/t_redundant 0 5 Redundant 0 Single
+Table Name Tablespace Table Flags Columns Row Format Zip Size
+test/t_compact test/t_compact 1 5 Compact 0
+test/t_compressed test/t_compressed 37 5 Compressed 2048
+test/t_dynamic test/t_dynamic 33 5 Dynamic 0
+test/t_redundant test/t_redundant 0 5 Redundant 0
=== information_schema.innodb_sys_tablespaces and innodb_sys_datafiles ===
-Space_Name Space_Type Page_Size Zip_Size Path
-test/t_redundant Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t_redundant.ibd
-test/t_compact Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t_compact.ibd
-test/t_compressed Single DEFAULT 2048 MYSQLD_DATADIR/test/t_compressed.ibd
-test/t_dynamic Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t_dynamic.ibd
+Space_Name Page_Size Zip_Size Path
+test/t_redundant DEFAULT DEFAULT MYSQLD_DATADIR/test/t_redundant.ibd
+test/t_compact DEFAULT DEFAULT MYSQLD_DATADIR/test/t_compact.ibd
+test/t_compressed DEFAULT 2048 MYSQLD_DATADIR/test/t_compressed.ibd
+test/t_dynamic DEFAULT DEFAULT MYSQLD_DATADIR/test/t_dynamic.ibd
DROP TABLE t_redundant, t_compact, t_compressed, t_dynamic;
SELECT count(*) FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS;
count(*)
diff --git a/mysql-test/suite/innodb/r/innodb-wl5522-debug.result b/mysql-test/suite/innodb/r/innodb-wl5522-debug.result
index 2a08054712c..1030fbd0502 100644
--- a/mysql-test/suite/innodb/r/innodb-wl5522-debug.result
+++ b/mysql-test/suite/innodb/r/innodb-wl5522-debug.result
@@ -8,6 +8,7 @@ call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .*");
call mtr.add_suppression("InnoDB: Page 0 at offset 0 looks corrupted in file");
call mtr.add_suppression("InnoDB: Page for tablespace ");
call mtr.add_suppression("InnoDB: Invalid FSP_SPACE_FLAGS=");
+call mtr.add_suppression("InnoDB: Unknown index id .* on page");
FLUSH TABLES;
SET GLOBAL innodb_file_per_table = 1;
CREATE TABLE t1 (c1 INT) ENGINE = InnoDB;
@@ -488,9 +489,6 @@ INDEX idx3(c4(512))) Engine=InnoDB;
connect purge_control,localhost,root;
START TRANSACTION WITH CONSISTENT SNAPSHOT;
connection default;
-SET GLOBAL innodb_disable_background_merge=ON;
-SET GLOBAL innodb_monitor_reset = ibuf_merges;
-SET GLOBAL innodb_monitor_reset = ibuf_merges_insert;
INSERT INTO t1
SELECT 1 + seq, 1 + (seq MOD 4),
REPEAT(SUBSTR('abcd', 1 + (seq MOD 4), 1), 2048),
@@ -661,23 +659,9 @@ COUNT(*)
SELECT SUM(c2) FROM t1;
SUM(c2)
124160
-SELECT name
-FROM information_schema.innodb_metrics
-WHERE name = 'ibuf_merges_insert' AND count = 0;
-name
FLUSH TABLES t1 FOR EXPORT;
backup: t1
UNLOCK TABLES;
-SELECT name
-FROM information_schema.innodb_metrics
-WHERE name = 'ibuf_merges' AND count > 0;
-name
-ibuf_merges
-SELECT name
-FROM information_schema.innodb_metrics
-WHERE name = 'ibuf_merges_inserts' AND count > 0;
-name
-SET GLOBAL innodb_disable_background_merge=OFF;
connection purge_control;
COMMIT;
disconnect purge_control;
@@ -909,14 +893,14 @@ DROP TABLE t1;
unlink: t1.ibd
unlink: t1.cfg
CREATE TABLE t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb;
+SET SESSION debug_dbug="+d,ib_import_create_index_failure_1";
+ALTER TABLE t1 ADD INDEX idx(c1);
+ERROR HY000: The table 't1' is full
+SET SESSION debug_dbug=@saved_debug_dbug;
ALTER TABLE t1 DISCARD TABLESPACE;
SELECT COUNT(*) FROM t1;
ERROR HY000: Tablespace has been discarded for table `t1`
-SET SESSION debug_dbug="+d,ib_import_create_index_failure_1";
ALTER TABLE t1 ADD INDEX idx(c1);
-Warnings:
-Warning 1814 Tablespace has been discarded for table `t1`
-SET SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE t1;
unlink: t1.ibd
unlink: t1.cfg
@@ -956,10 +940,4 @@ SET SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE t1;
unlink: t1.ibd
unlink: t1.cfg
-set global innodb_monitor_disable = all;
-set global innodb_monitor_reset_all = all;
-set global innodb_monitor_enable = default;
-set global innodb_monitor_disable = default;
-set global innodb_monitor_reset = default;
-set global innodb_monitor_reset_all = default;
SET GLOBAL INNODB_FILE_PER_TABLE=@file_per_table;
diff --git a/mysql-test/suite/innodb/r/innodb-wl5522.result b/mysql-test/suite/innodb/r/innodb-wl5522.result
index 27856fa136b..16cbc113267 100644
--- a/mysql-test/suite/innodb/r/innodb-wl5522.result
+++ b/mysql-test/suite/innodb/r/innodb-wl5522.result
@@ -248,14 +248,16 @@ ERROR HY000: Tablespace has been discarded for table `t1`
restore: t1 .ibd and .cfg files
ALTER TABLE t1 IMPORT TABLESPACE;
ERROR HY000: Schema mismatch (Index x not found in tablespace meta-data file.)
+select count(*) from t1;
+ERROR HY000: Tablespace has been discarded for table `t1`
ALTER TABLE t1 DROP INDEX x;
-Warnings:
-Warning 1814 Tablespace has been discarded for table `t1`
+ALTER TABLE t1 DROP INDEX x, ALGORITHM=copy;
+ERROR 42000: Can't DROP INDEX `x`; check that it exists
ALTER TABLE t1 ADD INDEX idx(c2);
-Warnings:
-Warning 1814 Tablespace has been discarded for table `t1`
restore: t1 .ibd and .cfg files
ALTER TABLE t1 IMPORT TABLESPACE;
+Warnings:
+Warning 1814 Tablespace has been discarded for table `t1`
CHECK TABLE t1;
Table Op Msg_type Msg_text
test.t1 check status OK
diff --git a/mysql-test/suite/innodb/r/innodb-wl5980-alter.result b/mysql-test/suite/innodb/r/innodb-wl5980-alter.result
index 6af968313e5..08ee9688603 100644
--- a/mysql-test/suite/innodb/r/innodb-wl5980-alter.result
+++ b/mysql-test/suite/innodb/r/innodb-wl5980-alter.result
@@ -2,6 +2,7 @@
# This is a copy of innodb-alter.test except using remote tablespaces
# and showing those files.
#
+SET @innodb_file_per_table_orig=@@GLOBAL.innodb_file_per_table;
SET default_storage_engine=InnoDB;
SET GLOBAL innodb_file_per_table=ON;
SET NAMES utf8mb4;
@@ -1588,3 +1589,4 @@ DROP TABLE tt, t1o, sys_tables, sys_indexes, sys_foreign;
### files in MYSQL_DATA_DIR/test
db.opt
### files in MYSQL_TMP_DIR/alt_dir/test
+SET GLOBAL innodb_file_per_table = @innodb_file_per_table_orig;
diff --git a/mysql-test/suite/innodb/r/innodb.result b/mysql-test/suite/innodb/r/innodb.result
index bcdd799f9ff..5dbe8156c1a 100644
--- a/mysql-test/suite/innodb/r/innodb.result
+++ b/mysql-test/suite/innodb/r/innodb.result
@@ -1718,7 +1718,7 @@ variable_value - @innodb_row_lock_time_max_orig
SELECT variable_value - @innodb_row_lock_time_avg_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_time_avg';
variable_value - @innodb_row_lock_time_avg_orig
0
-set storage_engine=INNODB;
+set default_storage_engine=INNODB;
drop table if exists t1,t2,t3;
--- Testing varchar ---
--- Testing varchar ---
@@ -3130,8 +3130,7 @@ SET TX_ISOLATION='read-committed';
SET AUTOCOMMIT=0;
DROP TABLE IF EXISTS t1, t2;
Warnings:
-Note 1051 Unknown table 'test.t1'
-Note 1051 Unknown table 'test.t2'
+Note 1051 Unknown table 'test.t1,test.t2'
CREATE TABLE t1 ( a int ) ENGINE=InnoDB;
CREATE TABLE t2 LIKE t1;
SELECT * FROM t2;
diff --git a/mysql-test/suite/innodb/r/innodb_buffer_pool_resize_debug.result b/mysql-test/suite/innodb/r/innodb_buffer_pool_resize_debug.result
index 152e7ade73d..0dea25f6bf1 100644
--- a/mysql-test/suite/innodb/r/innodb_buffer_pool_resize_debug.result
+++ b/mysql-test/suite/innodb/r/innodb_buffer_pool_resize_debug.result
@@ -1,5 +1,4 @@
set global innodb_file_per_table=ON;
-set global innodb_thread_concurrency=20;
connect con1,localhost,root,,;
connect con2,localhost,root,,;
connect con3,localhost,root,,;
@@ -97,8 +96,6 @@ drop table t6;
#
# BUG#23590280 NO WARNING WHEN REDUCING INNODB_BUFFER_POOL_SIZE INSIZE THE FIRST CHUNK
#
-SET @save_disable = @@GLOBAL.innodb_disable_background_merge;
-SET GLOBAL innodb_disable_background_merge = ON;
set @old_innodb_disable_resize = @@innodb_disable_resize_buffer_pool_debug;
set global innodb_disable_resize_buffer_pool_debug = OFF;
set @before_innodb_buffer_pool_size = @@innodb_buffer_pool_size;
@@ -107,4 +104,3 @@ set global innodb_buffer_pool_size=@before_innodb_buffer_pool_size * 2;
set global innodb_buffer_pool_size=@before_innodb_buffer_pool_size;
set global innodb_buffer_pool_size=@before_innodb_buffer_pool_size;
SET GLOBAL innodb_disable_resize_buffer_pool_debug = @old_innodb_disable_resize;
-SET GLOBAL innodb_disable_background_merge = @save_disable;
diff --git a/mysql-test/suite/innodb/r/innodb_buffer_pool_resize_temporary.result b/mysql-test/suite/innodb/r/innodb_buffer_pool_resize_temporary.result
new file mode 100644
index 00000000000..43c2e27a8fb
--- /dev/null
+++ b/mysql-test/suite/innodb/r/innodb_buffer_pool_resize_temporary.result
@@ -0,0 +1,16 @@
+SET @save_limit=@@GLOBAL.innodb_limit_optimistic_insert_debug;
+SET @save_disable=@@GLOBAL.innodb_disable_resize_buffer_pool_debug;
+SET @save_size=@@GLOBAL.innodb_buffer_pool_size;
+SET GLOBAL innodb_limit_optimistic_insert_debug=2;
+SET GLOBAL innodb_disable_resize_buffer_pool_debug=OFF;
+SET GLOBAL innodb_buffer_pool_size=16777216;
+CREATE TEMPORARY TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t1 SELECT seq FROM seq_1_to_200;
+SET GLOBAL innodb_buffer_pool_size=8388608;
+SELECT COUNT(*),MIN(a),MAX(a) FROM t1;
+COUNT(*) MIN(a) MAX(a)
+200 1 200
+DROP TEMPORARY TABLE t1;
+SET GLOBAL innodb_limit_optimistic_insert_debug=@save_limit;
+SET GLOBAL innodb_buffer_pool_size=@save_size;
+SET GLOBAL innodb_disable_resize_buffer_pool_debug=@save_disable;
diff --git a/mysql-test/suite/innodb/r/innodb_bug12400341.result b/mysql-test/suite/innodb/r/innodb_bug12400341.result
index b402af84231..7b7f1c1a981 100644
--- a/mysql-test/suite/innodb/r/innodb_bug12400341.result
+++ b/mysql-test/suite/innodb/r/innodb_bug12400341.result
@@ -1,7 +1,5 @@
call mtr.add_suppression("InnoDB: Warning: cannot find a free slot for an undo log. Do you have too*");
call mtr.add_suppression("\\[Warning\\] InnoDB: Cannot find a free slot for an undo log. Do you have too");
-set @old_innodb_undo_logs = @@innodb_undo_logs;
-set global innodb_undo_logs=1;
show variables like "max_connections";
Variable_name Value
max_connections 64
@@ -28,4 +26,3 @@ select count(*) from information_schema.processlist where command != 'Daemon';
count(*)
33
drop database mysqltest;
-set global innodb_undo_logs = @old_innodb_undo_logs;
diff --git a/mysql-test/suite/innodb/r/innodb_bug12902967.result b/mysql-test/suite/innodb/r/innodb_bug12902967.result
index 6478cdb6c1f..ddb2e12f26a 100644
--- a/mysql-test/suite/innodb/r/innodb_bug12902967.result
+++ b/mysql-test/suite/innodb/r/innodb_bug12902967.result
@@ -2,5 +2,5 @@ call mtr.add_suppression("In ALTER TABLE .* has or is referenced in foreign key
# restart
create table t1 (f1 integer primary key) engine innodb;
alter table t1 add constraint c1 foreign key (f1) references t1(f1);
-ERROR HY000: Error on rename of '#sql-temporary' to './test/t1' (errno: 150 "Foreign key constraint is incorrectly formed")
+ERROR HY000: Error on rename of '#sql-alter' to './test/t1' (errno: 150 "Foreign key constraint is incorrectly formed")
drop table t1;
diff --git a/mysql-test/suite/innodb/r/innodb_bug34300.result b/mysql-test/suite/innodb/r/innodb_bug34300.result
index b168c7782bb..96dd8d0ea85 100644
--- a/mysql-test/suite/innodb/r/innodb_bug34300.result
+++ b/mysql-test/suite/innodb/r/innodb_bug34300.result
@@ -1,5 +1,5 @@
#
-# Bug#34300 Tinyblob & tinytext fields currupted after export/import and alter in 5.1
+# Bug#34300 Tinyblob & tinytext fields corrupted after export/import and alter in 5.1
#
SET @@global.max_allowed_packet=16777216;
connect newconn, localhost, root,,;
diff --git a/mysql-test/suite/innodb/r/innodb_bug35220.result b/mysql-test/suite/innodb/r/innodb_bug35220.result
index 195775f74c8..23c5b0cc2f7 100644
--- a/mysql-test/suite/innodb/r/innodb_bug35220.result
+++ b/mysql-test/suite/innodb/r/innodb_bug35220.result
@@ -1 +1 @@
-SET storage_engine=InnoDB;
+SET default_storage_engine=InnoDB;
diff --git a/mysql-test/suite/innodb/r/innodb_bug38231.result b/mysql-test/suite/innodb/r/innodb_bug38231.result
index 0ecdc13b048..3108e32d1a6 100644
--- a/mysql-test/suite/innodb/r/innodb_bug38231.result
+++ b/mysql-test/suite/innodb/r/innodb_bug38231.result
@@ -1,2 +1,2 @@
-SET storage_engine=InnoDB;
+SET default_storage_engine=InnoDB;
connection default;
diff --git a/mysql-test/suite/innodb/r/innodb_bug39438.result b/mysql-test/suite/innodb/r/innodb_bug39438.result
index 195775f74c8..23c5b0cc2f7 100644
--- a/mysql-test/suite/innodb/r/innodb_bug39438.result
+++ b/mysql-test/suite/innodb/r/innodb_bug39438.result
@@ -1 +1 @@
-SET storage_engine=InnoDB;
+SET default_storage_engine=InnoDB;
diff --git a/mysql-test/suite/innodb/r/innodb_bug42101-nonzero.result b/mysql-test/suite/innodb/r/innodb_bug42101-nonzero.result
deleted file mode 100644
index f43cb9da239..00000000000
--- a/mysql-test/suite/innodb/r/innodb_bug42101-nonzero.result
+++ /dev/null
@@ -1,26 +0,0 @@
-set global innodb_commit_concurrency=0;
-ERROR 42000: Variable 'innodb_commit_concurrency' can't be set to the value of '0'
-select @@innodb_commit_concurrency;
-@@innodb_commit_concurrency
-1
-set global innodb_commit_concurrency=1;
-select @@innodb_commit_concurrency;
-@@innodb_commit_concurrency
-1
-set global innodb_commit_concurrency=42;
-select @@innodb_commit_concurrency;
-@@innodb_commit_concurrency
-42
-set global innodb_commit_concurrency=DEFAULT;
-select @@innodb_commit_concurrency;
-@@innodb_commit_concurrency
-1
-set global innodb_commit_concurrency=0;
-ERROR 42000: Variable 'innodb_commit_concurrency' can't be set to the value of '0'
-select @@innodb_commit_concurrency;
-@@innodb_commit_concurrency
-1
-set global innodb_commit_concurrency=1;
-select @@innodb_commit_concurrency;
-@@innodb_commit_concurrency
-1
diff --git a/mysql-test/suite/innodb/r/innodb_bug42101.result b/mysql-test/suite/innodb/r/innodb_bug42101.result
deleted file mode 100644
index 4e3367d5a54..00000000000
--- a/mysql-test/suite/innodb/r/innodb_bug42101.result
+++ /dev/null
@@ -1,22 +0,0 @@
-set global innodb_commit_concurrency=0;
-select @@innodb_commit_concurrency;
-@@innodb_commit_concurrency
-0
-set global innodb_commit_concurrency=1;
-ERROR 42000: Variable 'innodb_commit_concurrency' can't be set to the value of '1'
-select @@innodb_commit_concurrency;
-@@innodb_commit_concurrency
-0
-set global innodb_commit_concurrency=42;
-ERROR 42000: Variable 'innodb_commit_concurrency' can't be set to the value of '42'
-select @@innodb_commit_concurrency;
-@@innodb_commit_concurrency
-0
-set global innodb_commit_concurrency=0;
-select @@innodb_commit_concurrency;
-@@innodb_commit_concurrency
-0
-set global innodb_commit_concurrency=DEFAULT;
-select @@innodb_commit_concurrency;
-@@innodb_commit_concurrency
-0
diff --git a/mysql-test/suite/innodb/r/innodb_bug53592.result b/mysql-test/suite/innodb/r/innodb_bug53592.result
index 8befcbd48cd..9fea3deadd8 100644
--- a/mysql-test/suite/innodb/r/innodb_bug53592.result
+++ b/mysql-test/suite/innodb/r/innodb_bug53592.result
@@ -1,4 +1,6 @@
set old_alter_table=0;
+Warnings:
+Warning 1287 '@@old_alter_table' is deprecated and will be removed in a future release. Please use '@@alter_algorithm' instead
create table bug53592(a int) engine=innodb row_format=compact;
alter table bug53592 add column b text charset utf8;
alter table bug53592 add column c blob not null;
@@ -13,6 +15,8 @@ Table Op Msg_type Msg_text
test.bug53592 check status OK
drop table bug53592;
set old_alter_table=1;
+Warnings:
+Warning 1287 '@@old_alter_table' is deprecated and will be removed in a future release. Please use '@@alter_algorithm' instead
create table bug53592(a int) engine=innodb row_format=compact;
alter table bug53592 add column b text charset utf8;
alter table bug53592 add column c blob not null;
diff --git a/mysql-test/suite/innodb/r/innodb_bulk_create_index_flush.result b/mysql-test/suite/innodb/r/innodb_bulk_create_index_flush.result
deleted file mode 100644
index d2b812642f6..00000000000
--- a/mysql-test/suite/innodb/r/innodb_bulk_create_index_flush.result
+++ /dev/null
@@ -1,54 +0,0 @@
-CREATE PROCEDURE populate_t1()
-BEGIN
-DECLARE i int DEFAULT 1;
-START TRANSACTION;
-WHILE (i <= 10000) DO
-INSERT INTO t1 VALUES (i, i, CONCAT('a', i));
-SET i = i + 1;
-END WHILE;
-COMMIT;
-END|
-CREATE TABLE t1(
-class INT,
-id INT,
-title VARCHAR(100)
-) ENGINE=InnoDB;
-SELECT COUNT(*) FROM t1;
-COUNT(*)
-10000
-SET @saved_dbug= @@SESSION.debug_dbug;
-SET debug_dbug='+d,ib_index_build_fail_before_flush';
-CREATE INDEX idx_id ON t1(id);
-ERROR 70100: Query execution was interrupted
-CHECK TABLE t1;
-Table Op Msg_type Msg_text
-test.t1 check status OK
-CREATE INDEX idx_title ON t1(title);
-ERROR 70100: Query execution was interrupted
-CHECK TABLE t1;
-Table Op Msg_type Msg_text
-test.t1 check status OK
-CREATE FULLTEXT INDEX fidx_title ON t1(title);
-ERROR 70100: Query execution was interrupted
-CHECK TABLE t1;
-Table Op Msg_type Msg_text
-test.t1 check status OK
-ALTER TABLE t1 ADD COLUMN content TEXT, FORCE;
-ERROR 70100: Query execution was interrupted
-CHECK TABLE t1;
-Table Op Msg_type Msg_text
-test.t1 check status OK
-SET debug_dbug= @saved_dbug;
-INSERT INTO t1 VALUES(10001, 10001, 'a10000');
-ALTER TABLE t1 ADD UNIQUE INDEX idx_title(title);
-ERROR 23000: Duplicate entry 'a10000' for key 'idx_title'
-CHECK TABLE t1;
-Table Op Msg_type Msg_text
-test.t1 check status OK
-ALTER TABLE t1 ADD UNIQUE INDEX idx_id(id), ADD UNIQUE INDEX idx_title(title);
-ERROR 23000: Duplicate entry 'a10000' for key 'idx_title'
-CHECK TABLE t1;
-Table Op Msg_type Msg_text
-test.t1 check status OK
-DROP TABLE t1;
-DROP PROCEDURE populate_t1;
diff --git a/mysql-test/suite/innodb/r/innodb_ctype_big5.result b/mysql-test/suite/innodb/r/innodb_ctype_big5.result
index 3ff2eed2b25..e417b07a21a 100644
--- a/mysql-test/suite/innodb/r/innodb_ctype_big5.result
+++ b/mysql-test/suite/innodb/r/innodb_ctype_big5.result
@@ -1,4 +1,4 @@
-SET STORAGE_ENGINE=InnoDB;
+SET DEFAULT_STORAGE_ENGINE=InnoDB;
#
# Start of 10.2 tests
#
diff --git a/mysql-test/suite/innodb/r/innodb_ctype_latin1.result b/mysql-test/suite/innodb/r/innodb_ctype_latin1.result
index 5818964328f..b605b65dbfb 100644
--- a/mysql-test/suite/innodb/r/innodb_ctype_latin1.result
+++ b/mysql-test/suite/innodb/r/innodb_ctype_latin1.result
@@ -1,4 +1,4 @@
-SET STORAGE_ENGINE=InnoDB;
+SET DEFAULT_STORAGE_ENGINE=InnoDB;
#
# Start of 10.2 tests
#
diff --git a/mysql-test/suite/innodb/r/innodb_ctype_ldml.result b/mysql-test/suite/innodb/r/innodb_ctype_ldml.result
index 1f3b271941d..502f57156c3 100644
--- a/mysql-test/suite/innodb/r/innodb_ctype_ldml.result
+++ b/mysql-test/suite/innodb/r/innodb_ctype_ldml.result
@@ -383,7 +383,7 @@ Bug#46448 trailing spaces are not ignored when user collation maps space != 0x20
set names latin1;
show collation like 'latin1_test';
Collation Charset Id Default Compiled Sortlen
-latin1_test latin1 99 Yes 1
+latin1_test latin1 331 1
select "foo" = "foo " collate latin1_test;
"foo" = "foo " collate latin1_test
1
@@ -402,6 +402,7 @@ utf8mb4_test_ci utf8mb4 326 8
utf16_test_ci utf16 327 8
utf8mb4_test_400_ci utf8mb4 328 8
utf8mb4_test_520_nopad_ci utf8mb4 329 8
+latin1_test latin1 331 1
latin1_test2 latin1 332 1
latin1_test2_cs latin1 333 1
latin1_swedish_nopad2_ci latin1 334 1
@@ -426,7 +427,7 @@ utf32_test_ci utf32 391 8
utf8_maxuserid_ci utf8 2047 8
show collation like '%test%';
Collation Charset Id Default Compiled Sortlen
-latin1_test latin1 99 Yes 1
+latin1_test latin1 331 1
latin1_test2 latin1 332 1
latin1_test2_cs latin1 333 1
utf8_test_ci utf8 353 8
diff --git a/mysql-test/suite/innodb/r/innodb_ctype_utf8.result b/mysql-test/suite/innodb/r/innodb_ctype_utf8.result
index 360a4192ee7..08f02aa01d4 100644
--- a/mysql-test/suite/innodb/r/innodb_ctype_utf8.result
+++ b/mysql-test/suite/innodb/r/innodb_ctype_utf8.result
@@ -1,4 +1,4 @@
-SET STORAGE_ENGINE=InnoDB;
+SET DEFAULT_STORAGE_ENGINE=InnoDB;
#
# Start of 10.2 tests
#
diff --git a/mysql-test/suite/innodb/r/innodb_force_recovery.result b/mysql-test/suite/innodb/r/innodb_force_recovery.result
index 838de9844e1..029a6f71fa3 100644
--- a/mysql-test/suite/innodb/r/innodb_force_recovery.result
+++ b/mysql-test/suite/innodb/r/innodb_force_recovery.result
@@ -3,38 +3,26 @@ create table t2(f1 int primary key, f2 int, index idx(f2))engine=innodb;
insert into t1 values(1, 2);
insert into t2 values(1, 2);
SET GLOBAL innodb_fast_shutdown = 0;
-# Restart the server with innodb_force_recovery as 4.
# restart: --innodb-force-recovery=4
select * from t1;
f1 f2
1 2
+begin;
insert into t1 values(2, 3);
-ERROR HY000: Running in read-only mode
+rollback;
alter table t1 add f3 int not null, algorithm=copy;
-ERROR HY000: Can't create table `test`.`t1` (errno: 165 "Table is read only")
-alter table t1 add f3 int not null, algorithm=inplace;
-ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: Running in read-only mode. Try ALGORITHM=COPY
+alter table t1 add f4 int not null, algorithm=inplace;
drop index idx on t1;
-ERROR HY000: Can't create table `test`.`t1` (errno: 165 "Table is read only")
-alter table t1 drop index idx, algorithm=inplace;
-ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: Running in read-only mode. Try ALGORITHM=COPY
update t1 set f1=3 where f2=2;
-ERROR HY000: Running in read-only mode
create table t3(f1 int not null)engine=innodb;
-ERROR HY000: Can't create table `test`.`t3` (errno: 165 "Table is read only")
drop table t3;
-ERROR 42S02: Unknown table 'test.t3'
rename table t1 to t3;
-ERROR HY000: Error on rename of './test/t1' to './test/t3' (errno: 165 "Table is read only")
+rename table t3 to t1;
truncate table t1;
-ERROR HY000: Table 't1' is read only
-drop table t1;
-ERROR HY000: Table 't1' is read only
show tables;
Tables_in_test
t1
t2
-# Restart the server with innodb_force_recovery as 5.
# restart: --innodb-force-recovery=5
select * from t2;
f1 f2
@@ -52,7 +40,7 @@ ERROR HY000: Running in read-only mode
create table t3(f1 int not null)engine=innodb;
ERROR HY000: Can't create table `test`.`t3` (errno: 165 "Table is read only")
drop table t3;
-ERROR 42S02: Unknown table 'test.t3'
+ERROR HY000: Table 't3' is read only
rename table t2 to t3;
ERROR HY000: Error on rename of './test/t2' to './test/t3' (errno: 165 "Table is read only")
truncate table t2;
@@ -65,7 +53,6 @@ show tables;
Tables_in_test
t1
t2
-# Restart the server with innodb_force_recovery as 6.
# restart: --innodb-force-recovery=6
select * from t2;
f1 f2
@@ -94,7 +81,6 @@ show tables;
Tables_in_test
t1
t2
-# Restart the server with innodb_force_recovery=2
# restart: --innodb-force-recovery=2
select * from t2;
f1 f2
@@ -108,7 +94,6 @@ drop table t1;
disconnect con1;
connection default;
# Kill the server
-# Restart the server with innodb_force_recovery=3
# restart: --innodb-force-recovery=3
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
select * from t2;
diff --git a/mysql-test/suite/innodb/r/innodb_gis.result b/mysql-test/suite/innodb/r/innodb_gis.result
index 162219cc6ac..90fc5be1e73 100644
--- a/mysql-test/suite/innodb/r/innodb_gis.result
+++ b/mysql-test/suite/innodb/r/innodb_gis.result
@@ -1,4 +1,4 @@
-SET storage_engine=innodb;
+SET default_storage_engine=innodb;
DROP TABLE IF EXISTS t1, gis_point, gis_line, gis_polygon, gis_multi_point, gis_multi_line, gis_multi_polygon, gis_geometrycollection, gis_geometry;
CREATE TABLE gis_point (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g POINT);
CREATE TABLE gis_line (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g LINESTRING);
diff --git a/mysql-test/suite/innodb/r/innodb_information_schema.result b/mysql-test/suite/innodb/r/innodb_information_schema.result
index f8b53f1b2c8..6325917c236 100644
--- a/mysql-test/suite/innodb/r/innodb_information_schema.result
+++ b/mysql-test/suite/innodb/r/innodb_information_schema.result
@@ -22,7 +22,7 @@ lock_table COUNT(*)
"test"."t_min" 2
"test"."`t'\""_str" 10
Field Type Null Key Default Extra
-trx_id varchar(18) NO
+trx_id bigint(21) unsigned NO 0
trx_state varchar(13) NO
trx_started datetime NO 0000-00-00 00:00:00
trx_requested_lock_id varchar(81) YES NULL
@@ -38,7 +38,7 @@ trx_lock_memory_bytes bigint(21) unsigned NO 0
trx_rows_locked bigint(21) unsigned NO 0
trx_rows_modified bigint(21) unsigned NO 0
trx_concurrency_tickets bigint(21) unsigned NO 0
-trx_isolation_level varchar(16) NO
+trx_isolation_level enum('READ UNCOMMITTED','READ COMMITTED','REPEATABLE READ','SERIALIZABLE') NO NULL
trx_unique_checks int(1) NO 0
trx_foreign_key_checks int(1) NO 0
trx_last_foreign_key_error varchar(256) YES NULL
diff --git a/mysql-test/suite/innodb/r/innodb_information_schema_buffer.result b/mysql-test/suite/innodb/r/innodb_information_schema_buffer.result
index 6328458d46e..46372cd85f2 100644
--- a/mysql-test/suite/innodb/r/innodb_information_schema_buffer.result
+++ b/mysql-test/suite/innodb/r/innodb_information_schema_buffer.result
@@ -1,35 +1,24 @@
SELECT * FROM INFORMATION_SCHEMA.INNODB_BUFFER_POOL_STATS;
-SELECT count(*) FROM INFORMATION_SCHEMA.INNODB_BUFFER_POOL_STATS;
-SELECT * FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE;
-SELECT COUNT(*) FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE;
+POOL_ID POOL_SIZE FREE_BUFFERS DATABASE_PAGES OLD_DATABASE_PAGES MODIFIED_DATABASE_PAGES PENDING_DECOMPRESS PENDING_READS PENDING_FLUSH_LRU PENDING_FLUSH_LIST PAGES_MADE_YOUNG PAGES_NOT_MADE_YOUNG PAGES_MADE_YOUNG_RATE PAGES_MADE_NOT_YOUNG_RATE NUMBER_PAGES_READ NUMBER_PAGES_CREATED NUMBER_PAGES_WRITTEN PAGES_READ_RATE PAGES_CREATE_RATE PAGES_WRITTEN_RATE NUMBER_PAGES_GET HIT_RATE YOUNG_MAKE_PER_THOUSAND_GETS NOT_YOUNG_MAKE_PER_THOUSAND_GETS NUMBER_PAGES_READ_AHEAD NUMBER_READ_AHEAD_EVICTED READ_AHEAD_RATE READ_AHEAD_EVICTED_RATE LRU_IO_TOTAL LRU_IO_CURRENT UNCOMPRESS_TOTAL UNCOMPRESS_CURRENT
+# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
CREATE TABLE infoschema_buffer_test (col1 INT) ENGINE = INNODB;
INSERT INTO infoschema_buffer_test VALUES(9);
-SELECT TABLE_NAME, INDEX_NAME, NUMBER_RECORDS, DATA_SIZE, PAGE_STATE, PAGE_TYPE
-FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE
-WHERE TABLE_NAME like "%infoschema_buffer_test%"
- and PAGE_STATE="file_page" and PAGE_TYPE="index";
-TABLE_NAME INDEX_NAME NUMBER_RECORDS DATA_SIZE PAGE_STATE PAGE_TYPE
-`test`.`infoschema_buffer_test` GEN_CLUST_INDEX 1 29 FILE_PAGE INDEX
+SELECT * FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE
+WHERE TABLE_NAME LIKE '%infoschema_buffer_test%' AND PAGE_TYPE='index';
+POOL_ID BLOCK_ID SPACE PAGE_NUMBER PAGE_TYPE FLUSH_TYPE FIX_COUNT IS_HASHED NEWEST_MODIFICATION OLDEST_MODIFICATION ACCESS_TIME TABLE_NAME INDEX_NAME NUMBER_RECORDS DATA_SIZE COMPRESSED_SIZE PAGE_STATE IO_FIX IS_OLD FREE_PAGE_CLOCK
+0 # # 3 INDEX 0 FIX AHI LSN LSN TIME `test`.`infoschema_buffer_test` GEN_CLUST_INDEX 1 29 0 FILE_PAGE IO_FIX OLD #
INSERT INTO infoschema_buffer_test VALUES(19);
-SELECT TABLE_NAME, INDEX_NAME, NUMBER_RECORDS, DATA_SIZE, PAGE_STATE, PAGE_TYPE
-FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE
-WHERE TABLE_NAME like "%infoschema_buffer_test%"
-and PAGE_STATE="file_page" and PAGE_TYPE="index";
-TABLE_NAME INDEX_NAME NUMBER_RECORDS DATA_SIZE PAGE_STATE PAGE_TYPE
-`test`.`infoschema_buffer_test` GEN_CLUST_INDEX 2 58 FILE_PAGE INDEX
CREATE INDEX idx ON infoschema_buffer_test(col1);
-SELECT TABLE_NAME, INDEX_NAME, NUMBER_RECORDS, DATA_SIZE, PAGE_STATE, PAGE_TYPE
-FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE
-WHERE TABLE_NAME like "%infoschema_buffer_test%"
-and PAGE_STATE="file_page" and INDEX_NAME = "idx" and PAGE_TYPE="index";
-TABLE_NAME INDEX_NAME NUMBER_RECORDS DATA_SIZE PAGE_STATE PAGE_TYPE
-`test`.`infoschema_buffer_test` idx 2 32 FILE_PAGE INDEX
-`test`.`infoschema_buffer_test` idx 2 32 FILE_PAGE INDEX
+SELECT * FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE
+WHERE TABLE_NAME LIKE '%infoschema_buffer_test%' AND PAGE_TYPE='index';
+POOL_ID BLOCK_ID SPACE PAGE_NUMBER PAGE_TYPE FLUSH_TYPE FIX_COUNT IS_HASHED NEWEST_MODIFICATION OLDEST_MODIFICATION ACCESS_TIME TABLE_NAME INDEX_NAME NUMBER_RECORDS DATA_SIZE COMPRESSED_SIZE PAGE_STATE IO_FIX IS_OLD FREE_PAGE_CLOCK
+0 # # 3 INDEX 0 FIX AHI LSN LSN TIME `test`.`infoschema_buffer_test` GEN_CLUST_INDEX 2 58 0 FILE_PAGE IO_FIX OLD #
+0 # # 4 INDEX 0 FIX AHI LSN LSN TIME `test`.`infoschema_buffer_test` idx 2 32 0 FILE_PAGE IO_FIX OLD #
+0 # # 5 INDEX 0 FIX AHI LSN LSN TIME `test`.`infoschema_buffer_test` idx 2 32 0 FILE_PAGE IO_FIX OLD #
DROP TABLE infoschema_buffer_test;
-SELECT TABLE_NAME, INDEX_NAME, NUMBER_RECORDS, DATA_SIZE, PAGE_STATE, PAGE_TYPE
-FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE
-WHERE TABLE_NAME like "%infoschema_buffer_test%";
-TABLE_NAME INDEX_NAME NUMBER_RECORDS DATA_SIZE PAGE_STATE PAGE_TYPE
+SELECT * FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE
+WHERE TABLE_NAME LIKE '%infoschema_buffer_test%';
+POOL_ID BLOCK_ID SPACE PAGE_NUMBER PAGE_TYPE FLUSH_TYPE FIX_COUNT IS_HASHED NEWEST_MODIFICATION OLDEST_MODIFICATION ACCESS_TIME TABLE_NAME INDEX_NAME NUMBER_RECORDS DATA_SIZE COMPRESSED_SIZE PAGE_STATE IO_FIX IS_OLD FREE_PAGE_CLOCK
CREATE TABLE infoschema_parent (id INT NOT NULL, PRIMARY KEY (id))
ENGINE=INNODB;
CREATE TABLE infoschema_child (id INT, parent_id INT, INDEX par_ind (parent_id),
@@ -37,11 +26,10 @@ FOREIGN KEY (parent_id)
REFERENCES infoschema_parent(id)
ON DELETE CASCADE)
ENGINE=INNODB;
-SELECT count(*)
-FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE
-WHERE TABLE_NAME like "%infoschema_child%" and PAGE_STATE="file_page"
-and PAGE_TYPE="index";
-count(*)
-2
+SELECT * FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE
+WHERE TABLE_NAME LIKE '%infoschema_child%';
+POOL_ID BLOCK_ID SPACE PAGE_NUMBER PAGE_TYPE FLUSH_TYPE FIX_COUNT IS_HASHED NEWEST_MODIFICATION OLDEST_MODIFICATION ACCESS_TIME TABLE_NAME INDEX_NAME NUMBER_RECORDS DATA_SIZE COMPRESSED_SIZE PAGE_STATE IO_FIX IS_OLD FREE_PAGE_CLOCK
+0 # # 3 INDEX 0 FIX AHI LSN LSN TIME `test`.`infoschema_child` GEN_CLUST_INDEX 0 0 0 FILE_PAGE IO_FIX OLD #
+0 # # 4 INDEX 0 FIX AHI LSN LSN TIME `test`.`infoschema_child` par_ind 0 0 0 FILE_PAGE IO_FIX OLD #
DROP TABLE infoschema_child;
DROP TABLE infoschema_parent;
diff --git a/mysql-test/suite/innodb/r/innodb_lock_wait_timeout_1.result b/mysql-test/suite/innodb/r/innodb_lock_wait_timeout_1.result
index d43da0cb7b7..797c30d700f 100644
--- a/mysql-test/suite/innodb/r/innodb_lock_wait_timeout_1.result
+++ b/mysql-test/suite/innodb/r/innodb_lock_wait_timeout_1.result
@@ -35,7 +35,6 @@ DROP TABLE t2, t1;
# Bug#46539 Various crashes on INSERT IGNORE SELECT + SELECT
# FOR UPDATE
#
-drop table if exists t1;
create table t1 (a int primary key auto_increment,
b int, index(b)) engine=innodb;
insert into t1 (b) values (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
@@ -84,19 +83,12 @@ drop table t1, t2;
#
# Bug#41756 Strange error messages about locks from InnoDB
#
-drop table if exists t1;
-# In the default transaction isolation mode, and/or with
-# innodb_locks_unsafe_for_binlog=OFF, handler::unlock_row()
-# in InnoDB does nothing.
+# In the default transaction isolation mode,
+# handler::unlock_row() in InnoDB does nothing.
# Thus in order to reproduce the condition that led to the
# warning, one needs to relax isolation by either
# setting a weaker tx_isolation value, or by turning on
# the unsafe replication switch.
-# For testing purposes, choose to tweak the isolation level,
-# since it's settable at runtime, unlike
-# innodb_locks_unsafe_for_binlog, which is
-# only a command-line switch.
-#
set @@session.tx_isolation="read-committed";
# Prepare data. We need a table with a unique index,
# for join_read_key to be used. The other column
diff --git a/mysql-test/suite/innodb/r/innodb_mysql.result b/mysql-test/suite/innodb/r/innodb_mysql.result
index acd66549d42..595a56a8bef 100644
--- a/mysql-test/suite/innodb/r/innodb_mysql.result
+++ b/mysql-test/suite/innodb/r/innodb_mysql.result
@@ -361,13 +361,13 @@ EXPLAIN
SELECT COUNT(*) FROM t2 LEFT JOIN t1 ON t2.fkey = t1.id
WHERE t1.name LIKE 'A%';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index PRIMARY,name name 23 NULL 3 Using where; Using index
+1 SIMPLE t1 range PRIMARY,name name 23 NULL 2 Using where; Using index
1 SIMPLE t2 ref fkey fkey 5 test.t1.id 1 Using index
EXPLAIN
SELECT COUNT(*) FROM t2 LEFT JOIN t1 ON t2.fkey = t1.id
WHERE t1.name LIKE 'A%' OR FALSE;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index PRIMARY,name name 23 NULL 3 Using where; Using index
+1 SIMPLE t1 range PRIMARY,name name 23 NULL 2 Using where; Using index
1 SIMPLE t2 ref fkey fkey 5 test.t1.id 1 Using index
DROP TABLE t1,t2;
CREATE TABLE t1 (
@@ -405,7 +405,7 @@ DELETE FROM t1;
# Masking (#) number in "rows" column of the following EXPLAIN output, as it may vary (bug#47746).
EXPLAIN SELECT DISTINCT t1.name, t1.dept FROM t1 WHERE t1.name='rs5';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range name name 44 NULL # Using where; Using index for group-by
+1 SIMPLE t1 ref name name 22 const # Using where; Using index
SELECT DISTINCT t1.name, t1.dept FROM t1 WHERE t1.name='rs5';
name dept
DROP TABLE t1;
@@ -1312,13 +1312,13 @@ EXPLAIN SELECT * FROM t1 WHERE b BETWEEN 1 AND 2 ORDER BY a;
id 1
select_type SIMPLE
table t1
-type index
+type range
possible_keys bkey
-key PRIMARY
-key_len 4
+key bkey
+key_len 5
ref NULL
rows 32
-Extra Using where
+Extra Using where; Using index; Using filesort
SELECT * FROM t1 WHERE b BETWEEN 1 AND 2 ORDER BY a;
a b
1 2
@@ -1797,9 +1797,6 @@ DROP TABLE t1;
set @my_innodb_autoextend_increment=@@global.innodb_autoextend_increment;
set global innodb_autoextend_increment=8;
set global innodb_autoextend_increment=@my_innodb_autoextend_increment;
-set @my_innodb_commit_concurrency=@@global.innodb_commit_concurrency;
-set global innodb_commit_concurrency=0;
-set global innodb_commit_concurrency=@my_innodb_commit_concurrency;
CREATE TABLE t1 (a int, b int, c int, PRIMARY KEY (a), KEY t1_b (b))
ENGINE=InnoDB;
INSERT INTO t1 (a,b,c) VALUES (1,1,1), (2,1,1), (3,1,1), (4,1,1);
@@ -2367,12 +2364,12 @@ EXPLAIN SELECT c FROM foo2 WHERE b>2;;
id 1
select_type SIMPLE
table foo2
-type index
+type range
possible_keys b
key b
key_len 5
ref NULL
-rows 6
+rows 5
Extra Using where; Using index
EXPLAIN SELECT c FROM bar WHERE c>2;;
id 1
@@ -3067,7 +3064,7 @@ f1 f2 f3 f4
EXPLAIN SELECT * FROM t1 WHERE f2 = 1 AND f4 = TRUE
ORDER BY f1 DESC LIMIT 5;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index f2,f4 PRIMARY 4 NULL 5 Using where
+1 SIMPLE t1 range f2,f4 f4 1 NULL 22 Using where
DROP TABLE t1;
#
# Bug#54117 crash in thr_multi_unlock, temporary table
diff --git a/mysql-test/suite/innodb/r/innodb_rename_index.result b/mysql-test/suite/innodb/r/innodb_rename_index.result
new file mode 100644
index 00000000000..482070c4ffc
--- /dev/null
+++ b/mysql-test/suite/innodb/r/innodb_rename_index.result
@@ -0,0 +1,989 @@
+CREATE TABLE t (
+a INT,
+b INT,
+c INT,
+d INT,
+e INT,
+f INT,
+PRIMARY KEY (a),
+INDEX i1 (b),
+INDEX i2 (c),
+INDEX i3 (d),
+INDEX i4 (e)
+) ENGINE=INNODB;
+INSERT INTO t SET a = 1;
+ALTER TABLE t RENAME INDEX i1 TO GEN_CLUST_INDEX;
+ERROR 42000: Incorrect index name 'GEN_CLUST_INDEX'
+ALTER TABLE t RENAME INDEX i1 TO i1;
+ALTER TABLE t RENAME INDEX aa TO aa;
+ERROR 42000: Key 'aa' doesn't exist in table 't'
+# combination: aaaa
+ALTER TABLE t ADD INDEX i4(f), DROP INDEX i4, RENAME INDEX i4 TO i4;
+ERROR 42000: Key 'i4' doesn't exist in table 't'
+# combination: aabb
+ALTER TABLE t ADD INDEX aa(f), DROP INDEX aa, RENAME INDEX i2 TO i2;
+ERROR 42000: Can't DROP INDEX `aa`; check that it exists
+ALTER TABLE t ADD INDEX aa(f), DROP INDEX aa, RENAME INDEX bb TO bb;
+ERROR 42000: Can't DROP INDEX `aa`; check that it exists
+ALTER TABLE t ADD INDEX i1(f), DROP INDEX i1, RENAME INDEX bb TO bb;
+ERROR 42000: Key 'bb' doesn't exist in table 't'
+ALTER TABLE t ADD INDEX i1(f), DROP INDEX i1, RENAME INDEX i2 TO i2;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+SHOW CREATE TABLE t;
+Table Create Table
+t CREATE TABLE `t` (
+ `a` int(11) NOT NULL,
+ `b` int(11) DEFAULT NULL,
+ `c` int(11) DEFAULT NULL,
+ `d` int(11) DEFAULT NULL,
+ `e` int(11) DEFAULT NULL,
+ `f` int(11) DEFAULT NULL,
+ PRIMARY KEY (`a`),
+ KEY `i2` (`c`),
+ KEY `i3` (`d`),
+ KEY `i4` (`e`),
+ KEY `i1` (`f`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SELECT
+t.name AS table_name,
+i.name AS index_name,
+f.name AS column_name
+FROM
+information_schema.innodb_sys_tables t,
+information_schema.innodb_sys_indexes i,
+information_schema.innodb_sys_fields f
+WHERE
+t.name LIKE '%/t' AND
+t.table_id = i.table_id AND
+i.index_id = f.index_id
+ORDER BY 1, 2, 3;
+table_name index_name column_name
+test/t i1 f
+test/t i2 c
+test/t i3 d
+test/t i4 e
+test/t PRIMARY a
+DROP TABLE t;
+CREATE TABLE t (
+a INT,
+b INT,
+c INT,
+d INT,
+e INT,
+f INT,
+PRIMARY KEY (a),
+INDEX i1 (b),
+INDEX i2 (c),
+INDEX i3 (d),
+INDEX i4 (e)
+) ENGINE=INNODB;
+INSERT INTO t SET a = 1;
+# combination: abcc
+ALTER TABLE t ADD INDEX aa(f), DROP INDEX bb, RENAME INDEX cc TO cc;
+ERROR 42000: Can't DROP INDEX `bb`; check that it exists
+ALTER TABLE t ADD INDEX aa(f), DROP INDEX bb, RENAME INDEX i3 TO i3;
+ERROR 42000: Can't DROP INDEX `bb`; check that it exists
+ALTER TABLE t ADD INDEX aa(f), DROP INDEX i2, RENAME INDEX cc TO cc;
+ERROR 42000: Key 'cc' doesn't exist in table 't'
+ALTER TABLE t ADD INDEX aa(f), DROP INDEX i2, RENAME INDEX i3 TO i3;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+SHOW CREATE TABLE t;
+Table Create Table
+t CREATE TABLE `t` (
+ `a` int(11) NOT NULL,
+ `b` int(11) DEFAULT NULL,
+ `c` int(11) DEFAULT NULL,
+ `d` int(11) DEFAULT NULL,
+ `e` int(11) DEFAULT NULL,
+ `f` int(11) DEFAULT NULL,
+ PRIMARY KEY (`a`),
+ KEY `i1` (`b`),
+ KEY `i3` (`d`),
+ KEY `i4` (`e`),
+ KEY `aa` (`f`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SELECT
+t.name AS table_name,
+i.name AS index_name,
+f.name AS column_name
+FROM
+information_schema.innodb_sys_tables t,
+information_schema.innodb_sys_indexes i,
+information_schema.innodb_sys_fields f
+WHERE
+t.name LIKE '%/t' AND
+t.table_id = i.table_id AND
+i.index_id = f.index_id
+ORDER BY 1, 2, 3;
+table_name index_name column_name
+test/t aa f
+test/t i1 b
+test/t i3 d
+test/t i4 e
+test/t PRIMARY a
+DROP TABLE t;
+CREATE TABLE t (
+a INT,
+b INT,
+c INT,
+d INT,
+e INT,
+f INT,
+PRIMARY KEY (a),
+INDEX i1 (b),
+INDEX i2 (c),
+INDEX i3 (d),
+INDEX i4 (e)
+) ENGINE=INNODB;
+INSERT INTO t SET a = 1;
+# combination: abaa
+ALTER TABLE t ADD INDEX aa(f), DROP INDEX i1, RENAME INDEX aa TO aa;
+ERROR 42000: Key 'aa' doesn't exist in table 't'
+ALTER TABLE t ADD INDEX i1(f), DROP INDEX i2, RENAME INDEX i1 TO i1;
+ERROR 42000: Duplicate key name 'i1'
+ALTER TABLE t ADD INDEX i1(f), DROP INDEX bb, RENAME INDEX i1 TO i1;
+ERROR 42000: Can't DROP INDEX `bb`; check that it exists
+ALTER TABLE t ADD INDEX aa(f), DROP INDEX bb, RENAME INDEX aa TO aa;
+ERROR 42000: Can't DROP INDEX `bb`; check that it exists
+# combination: baaa
+ALTER TABLE t ADD INDEX i2(f), DROP INDEX i1, RENAME INDEX i1 TO i1;
+ERROR 42000: Key 'i1' doesn't exist in table 't'
+ALTER TABLE t ADD INDEX bb(f), DROP INDEX i1, RENAME INDEX i1 TO i1;
+ERROR 42000: Key 'i1' doesn't exist in table 't'
+ALTER TABLE t ADD INDEX i2(f), DROP INDEX aa, RENAME INDEX aa TO aa;
+ERROR 42000: Can't DROP INDEX `aa`; check that it exists
+ALTER TABLE t ADD INDEX bb(f), DROP INDEX aa, RENAME INDEX aa TO aa;
+ERROR 42000: Can't DROP INDEX `aa`; check that it exists
+ALTER TABLE t ADD INDEX aa(f), RENAME INDEX aa TO bb;
+ERROR 42000: Key 'aa' doesn't exist in table 't'
+ALTER TABLE t ADD INDEX aa(f), RENAME INDEX bb TO aa;
+ERROR 42000: Key 'bb' doesn't exist in table 't'
+ALTER TABLE t ADD INDEX aa(f), RENAME INDEX i2 TO aa;
+ERROR 42000: Duplicate key name 'aa'
+ALTER TABLE t ADD INDEX i1(f), RENAME INDEX i1 TO bb;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+SHOW CREATE TABLE t;
+Table Create Table
+t CREATE TABLE `t` (
+ `a` int(11) NOT NULL,
+ `b` int(11) DEFAULT NULL,
+ `c` int(11) DEFAULT NULL,
+ `d` int(11) DEFAULT NULL,
+ `e` int(11) DEFAULT NULL,
+ `f` int(11) DEFAULT NULL,
+ PRIMARY KEY (`a`),
+ KEY `bb` (`b`),
+ KEY `i2` (`c`),
+ KEY `i3` (`d`),
+ KEY `i4` (`e`),
+ KEY `i1` (`f`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SELECT
+t.name AS table_name,
+i.name AS index_name,
+f.name AS column_name
+FROM
+information_schema.innodb_sys_tables t,
+information_schema.innodb_sys_indexes i,
+information_schema.innodb_sys_fields f
+WHERE
+t.name LIKE '%/t' AND
+t.table_id = i.table_id AND
+i.index_id = f.index_id
+ORDER BY 1, 2, 3;
+table_name index_name column_name
+test/t bb b
+test/t i1 f
+test/t i2 c
+test/t i3 d
+test/t i4 e
+test/t PRIMARY a
+DROP TABLE t;
+CREATE TABLE t (
+a INT,
+b INT,
+c INT,
+d INT,
+e INT,
+f INT,
+PRIMARY KEY (a),
+INDEX i1 (b),
+INDEX i2 (c),
+INDEX i3 (d),
+INDEX i4 (e)
+) ENGINE=INNODB;
+INSERT INTO t SET a = 1;
+# combination: abba
+ALTER TABLE t ADD INDEX i1(f), DROP INDEX i2, RENAME INDEX i2 TO i1;
+ERROR 42000: Key 'i2' doesn't exist in table 't'
+ALTER TABLE t ADD INDEX aa(f), DROP INDEX i2, RENAME INDEX i2 TO aa;
+ERROR 42000: Key 'i2' doesn't exist in table 't'
+ALTER TABLE t ADD INDEX i1(f), DROP INDEX bb, RENAME INDEX bb TO i1;
+ERROR 42000: Can't DROP INDEX `bb`; check that it exists
+ALTER TABLE t ADD INDEX aa(f), DROP INDEX bb, RENAME INDEX bb TO aa;
+ERROR 42000: Can't DROP INDEX `bb`; check that it exists
+# combination: cabc
+ALTER TABLE t ADD INDEX i3(f), DROP INDEX i1, RENAME INDEX i2 TO i3;
+ERROR 42000: Duplicate key name 'i3'
+ALTER TABLE t ADD INDEX i3(f), DROP INDEX aa, RENAME INDEX i2 TO i3;
+ERROR 42000: Can't DROP INDEX `aa`; check that it exists
+ALTER TABLE t ADD INDEX i3(f), DROP INDEX i1, RENAME INDEX bb TO i3;
+ERROR 42000: Key 'bb' doesn't exist in table 't'
+ALTER TABLE t ADD INDEX i3(f), DROP INDEX aa, RENAME INDEX bb TO i3;
+ERROR 42000: Can't DROP INDEX `aa`; check that it exists
+ALTER TABLE t ADD INDEX cc(f), DROP INDEX i1, RENAME INDEX i2 TO cc;
+ERROR 42000: Duplicate key name 'cc'
+ALTER TABLE t ADD INDEX cc(f), DROP INDEX aa, RENAME INDEX i2 TO cc;
+ERROR 42000: Can't DROP INDEX `aa`; check that it exists
+ALTER TABLE t ADD INDEX cc(f), DROP INDEX i1, RENAME INDEX bb TO cc;
+ERROR 42000: Key 'bb' doesn't exist in table 't'
+ALTER TABLE t ADD INDEX cc(f), DROP INDEX aa, RENAME INDEX bb TO cc;
+ERROR 42000: Can't DROP INDEX `aa`; check that it exists
+ALTER TABLE t DROP INDEX i1, RENAME INDEX i1 TO bb;
+ERROR 42000: Key 'i1' doesn't exist in table 't'
+ALTER TABLE t DROP INDEX aa, RENAME INDEX i2 TO aa;
+ERROR 42000: Can't DROP INDEX `aa`; check that it exists
+ALTER TABLE t DROP INDEX aa, RENAME INDEX aa TO i2;
+ERROR 42000: Can't DROP INDEX `aa`; check that it exists
+ALTER TABLE t DROP INDEX i1, RENAME INDEX i4 TO i1;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+SHOW CREATE TABLE t;
+Table Create Table
+t CREATE TABLE `t` (
+ `a` int(11) NOT NULL,
+ `b` int(11) DEFAULT NULL,
+ `c` int(11) DEFAULT NULL,
+ `d` int(11) DEFAULT NULL,
+ `e` int(11) DEFAULT NULL,
+ `f` int(11) DEFAULT NULL,
+ PRIMARY KEY (`a`),
+ KEY `i2` (`c`),
+ KEY `i3` (`d`),
+ KEY `i1` (`e`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SELECT
+t.name AS table_name,
+i.name AS index_name,
+f.name AS column_name
+FROM
+information_schema.innodb_sys_tables t,
+information_schema.innodb_sys_indexes i,
+information_schema.innodb_sys_fields f
+WHERE
+t.name LIKE '%/t' AND
+t.table_id = i.table_id AND
+i.index_id = f.index_id
+ORDER BY 1, 2, 3;
+table_name index_name column_name
+test/t i1 e
+test/t i2 c
+test/t i3 d
+test/t PRIMARY a
+DROP TABLE t;
+CREATE TABLE t (
+a INT,
+b INT,
+c INT,
+d INT,
+e INT,
+f INT,
+PRIMARY KEY (a),
+INDEX i1 (b),
+INDEX i2 (c),
+INDEX i3 (d),
+INDEX i4 (e)
+) ENGINE=INNODB;
+INSERT INTO t SET a = 1;
+# combination: accb
+ALTER TABLE t ADD INDEX i1(f), DROP INDEX i3, RENAME INDEX i3 TO i2;
+ERROR 42000: Key 'i3' doesn't exist in table 't'
+ALTER TABLE t ADD INDEX i1(f), DROP INDEX i3, RENAME INDEX i3 TO bb;
+ERROR 42000: Key 'i3' doesn't exist in table 't'
+ALTER TABLE t ADD INDEX i1(f), DROP INDEX cc, RENAME INDEX cc TO i2;
+ERROR 42000: Can't DROP INDEX `cc`; check that it exists
+ALTER TABLE t ADD INDEX i1(f), DROP INDEX cc, RENAME INDEX cc TO bb;
+ERROR 42000: Can't DROP INDEX `cc`; check that it exists
+ALTER TABLE t ADD INDEX aa(f), DROP INDEX cc, RENAME INDEX cc TO i2;
+ERROR 42000: Can't DROP INDEX `cc`; check that it exists
+ALTER TABLE t ADD INDEX aa(f), DROP INDEX cc, RENAME INDEX cc TO bb;
+ERROR 42000: Can't DROP INDEX `cc`; check that it exists
+# combination: aaab
+ALTER TABLE t ADD INDEX i1(f), DROP INDEX i1, RENAME INDEX i1 TO i2;
+ERROR 42000: Key 'i1' doesn't exist in table 't'
+ALTER TABLE t ADD INDEX i1(f), DROP INDEX i1, RENAME INDEX i1 TO bb;
+ERROR 42000: Key 'i1' doesn't exist in table 't'
+ALTER TABLE t ADD INDEX i1(f), DROP INDEX i1, RENAME INDEX i1 TO i2;
+ERROR 42000: Key 'i1' doesn't exist in table 't'
+ALTER TABLE t ADD INDEX aa(f), DROP INDEX aa, RENAME INDEX aa TO bb;
+ERROR 42000: Can't DROP INDEX `aa`; check that it exists
+# combination: abcd
+ALTER TABLE t ADD INDEX i1(f), DROP INDEX i2, RENAME INDEX cc TO i4;
+ERROR 42000: Key 'cc' doesn't exist in table 't'
+ALTER TABLE t ADD INDEX i1(f), DROP INDEX i2, RENAME INDEX cc TO dd;
+ERROR 42000: Key 'cc' doesn't exist in table 't'
+ALTER TABLE t ADD INDEX aa(f), DROP INDEX i2, RENAME INDEX cc TO i4;
+ERROR 42000: Key 'cc' doesn't exist in table 't'
+ALTER TABLE t ADD INDEX aa(f), DROP INDEX i2, RENAME INDEX cc TO dd;
+ERROR 42000: Key 'cc' doesn't exist in table 't'
+ALTER TABLE t ADD INDEX i1(f), DROP INDEX i2, RENAME INDEX i3 TO i4;
+ERROR 42000: Duplicate key name 'i4'
+ALTER TABLE t ADD INDEX i1(f), DROP INDEX i2, RENAME INDEX i3 TO dd;
+ERROR 42000: Duplicate key name 'i1'
+ALTER TABLE t ADD INDEX aa(f), DROP INDEX i2, RENAME INDEX i3 TO i4;
+ERROR 42000: Duplicate key name 'i4'
+ALTER TABLE t ADD INDEX aa(f), DROP INDEX i2, RENAME INDEX i3 TO dd;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+SHOW CREATE TABLE t;
+Table Create Table
+t CREATE TABLE `t` (
+ `a` int(11) NOT NULL,
+ `b` int(11) DEFAULT NULL,
+ `c` int(11) DEFAULT NULL,
+ `d` int(11) DEFAULT NULL,
+ `e` int(11) DEFAULT NULL,
+ `f` int(11) DEFAULT NULL,
+ PRIMARY KEY (`a`),
+ KEY `i1` (`b`),
+ KEY `dd` (`d`),
+ KEY `i4` (`e`),
+ KEY `aa` (`f`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SELECT
+t.name AS table_name,
+i.name AS index_name,
+f.name AS column_name
+FROM
+information_schema.innodb_sys_tables t,
+information_schema.innodb_sys_indexes i,
+information_schema.innodb_sys_fields f
+WHERE
+t.name LIKE '%/t' AND
+t.table_id = i.table_id AND
+i.index_id = f.index_id
+ORDER BY 1, 2, 3;
+table_name index_name column_name
+test/t aa f
+test/t dd d
+test/t i1 b
+test/t i4 e
+test/t PRIMARY a
+DROP TABLE t;
+CREATE TABLE t (
+a INT,
+b INT,
+c INT,
+d INT,
+e INT,
+f INT,
+PRIMARY KEY (a),
+INDEX i1 (b),
+INDEX i2 (c),
+INDEX i3 (d),
+INDEX i4 (e)
+) ENGINE=INNODB;
+INSERT INTO t SET a = 1;
+# combination: abab
+ALTER TABLE t ADD INDEX i1(f), DROP INDEX i2, RENAME INDEX i1 TO i2;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+SHOW CREATE TABLE t;
+Table Create Table
+t CREATE TABLE `t` (
+ `a` int(11) NOT NULL,
+ `b` int(11) DEFAULT NULL,
+ `c` int(11) DEFAULT NULL,
+ `d` int(11) DEFAULT NULL,
+ `e` int(11) DEFAULT NULL,
+ `f` int(11) DEFAULT NULL,
+ PRIMARY KEY (`a`),
+ KEY `i2` (`b`),
+ KEY `i3` (`d`),
+ KEY `i4` (`e`),
+ KEY `i1` (`f`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SELECT
+t.name AS table_name,
+i.name AS index_name,
+f.name AS column_name
+FROM
+information_schema.innodb_sys_tables t,
+information_schema.innodb_sys_indexes i,
+information_schema.innodb_sys_fields f
+WHERE
+t.name LIKE '%/t' AND
+t.table_id = i.table_id AND
+i.index_id = f.index_id
+ORDER BY 1, 2, 3;
+table_name index_name column_name
+test/t i1 f
+test/t i2 b
+test/t i3 d
+test/t i4 e
+test/t PRIMARY a
+DROP TABLE t;
+CREATE TABLE t (
+a INT,
+b INT,
+c INT,
+d INT,
+e INT,
+f INT,
+PRIMARY KEY (a),
+INDEX i1 (b),
+INDEX i2 (c),
+INDEX i3 (d),
+INDEX i4 (e)
+) ENGINE=INNODB;
+INSERT INTO t SET a = 1;
+ALTER TABLE t ADD INDEX i1(f), DROP INDEX bb, RENAME INDEX i1 TO bb;
+ERROR 42000: Can't DROP INDEX `bb`; check that it exists
+ALTER TABLE t ADD INDEX aa(f), DROP INDEX i2, RENAME INDEX aa TO i2;
+ERROR 42000: Key 'aa' doesn't exist in table 't'
+ALTER TABLE t ADD INDEX aa(f), DROP INDEX bb, RENAME INDEX aa TO bb;
+ERROR 42000: Can't DROP INDEX `bb`; check that it exists
+# combination: acbc
+ALTER TABLE t ADD INDEX i1(f), DROP INDEX cc, RENAME INDEX i2 TO cc;
+ERROR 42000: Can't DROP INDEX `cc`; check that it exists
+ALTER TABLE t ADD INDEX aa(f), DROP INDEX cc, RENAME INDEX i2 TO cc;
+ERROR 42000: Can't DROP INDEX `cc`; check that it exists
+ALTER TABLE t ADD INDEX i1(f), DROP INDEX cc, RENAME INDEX bb TO cc;
+ERROR 42000: Can't DROP INDEX `cc`; check that it exists
+ALTER TABLE t ADD INDEX aa(f), DROP INDEX cc, RENAME INDEX bb TO cc;
+ERROR 42000: Can't DROP INDEX `cc`; check that it exists
+ALTER TABLE t ADD INDEX i1(f), DROP INDEX i3, RENAME INDEX bb TO i3;
+ERROR 42000: Key 'bb' doesn't exist in table 't'
+ALTER TABLE t ADD INDEX aa(f), DROP INDEX i3, RENAME INDEX bb TO i3;
+ERROR 42000: Key 'bb' doesn't exist in table 't'
+ALTER TABLE t ADD INDEX i1(f), DROP INDEX i3, RENAME INDEX i2 TO i3;
+ERROR 42000: Duplicate key name 'i1'
+ALTER TABLE t ADD INDEX aa(f), DROP INDEX i3, RENAME INDEX i2 TO i3;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+SHOW CREATE TABLE t;
+Table Create Table
+t CREATE TABLE `t` (
+ `a` int(11) NOT NULL,
+ `b` int(11) DEFAULT NULL,
+ `c` int(11) DEFAULT NULL,
+ `d` int(11) DEFAULT NULL,
+ `e` int(11) DEFAULT NULL,
+ `f` int(11) DEFAULT NULL,
+ PRIMARY KEY (`a`),
+ KEY `i1` (`b`),
+ KEY `i3` (`c`),
+ KEY `i4` (`e`),
+ KEY `aa` (`f`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SELECT
+t.name AS table_name,
+i.name AS index_name,
+f.name AS column_name
+FROM
+information_schema.innodb_sys_tables t,
+information_schema.innodb_sys_indexes i,
+information_schema.innodb_sys_fields f
+WHERE
+t.name LIKE '%/t' AND
+t.table_id = i.table_id AND
+i.index_id = f.index_id
+ORDER BY 1, 2, 3;
+table_name index_name column_name
+test/t aa f
+test/t i1 b
+test/t i3 c
+test/t i4 e
+test/t PRIMARY a
+DROP TABLE t;
+CREATE TABLE t (
+a INT,
+b INT,
+c INT,
+d INT,
+e INT,
+f INT,
+PRIMARY KEY (a),
+INDEX i1 (b),
+INDEX i2 (c),
+INDEX i3 (d),
+INDEX i4 (e)
+) ENGINE=INNODB;
+INSERT INTO t SET a = 1;
+# combination: cacb
+ALTER TABLE t ADD INDEX cc(f), DROP INDEX i1, RENAME INDEX cc TO i2;
+ERROR 42000: Key 'cc' doesn't exist in table 't'
+ALTER TABLE t ADD INDEX cc(f), DROP INDEX aa, RENAME INDEX cc TO i2;
+ERROR 42000: Can't DROP INDEX `aa`; check that it exists
+ALTER TABLE t ADD INDEX cc(f), DROP INDEX aa, RENAME INDEX cc TO bb;
+ERROR 42000: Can't DROP INDEX `aa`; check that it exists
+ALTER TABLE t ADD INDEX cc(f), DROP INDEX i1, RENAME INDEX cc TO bb;
+ERROR 42000: Key 'cc' doesn't exist in table 't'
+ALTER TABLE t ADD INDEX i3(f), DROP INDEX i1, RENAME INDEX i3 TO i2;
+ERROR 42000: Duplicate key name 'i2'
+ALTER TABLE t ADD INDEX i3(f), DROP INDEX aa, RENAME INDEX i3 TO i2;
+ERROR 42000: Can't DROP INDEX `aa`; check that it exists
+ALTER TABLE t ADD INDEX i3(f), DROP INDEX aa, RENAME INDEX i3 TO bb;
+ERROR 42000: Can't DROP INDEX `aa`; check that it exists
+ALTER TABLE t ADD INDEX i3(f), DROP INDEX i1, RENAME INDEX i3 TO bb;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+SHOW CREATE TABLE t;
+Table Create Table
+t CREATE TABLE `t` (
+ `a` int(11) NOT NULL,
+ `b` int(11) DEFAULT NULL,
+ `c` int(11) DEFAULT NULL,
+ `d` int(11) DEFAULT NULL,
+ `e` int(11) DEFAULT NULL,
+ `f` int(11) DEFAULT NULL,
+ PRIMARY KEY (`a`),
+ KEY `i2` (`c`),
+ KEY `bb` (`d`),
+ KEY `i4` (`e`),
+ KEY `i3` (`f`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SELECT
+t.name AS table_name,
+i.name AS index_name,
+f.name AS column_name
+FROM
+information_schema.innodb_sys_tables t,
+information_schema.innodb_sys_indexes i,
+information_schema.innodb_sys_fields f
+WHERE
+t.name LIKE '%/t' AND
+t.table_id = i.table_id AND
+i.index_id = f.index_id
+ORDER BY 1, 2, 3;
+table_name index_name column_name
+test/t bb d
+test/t i2 c
+test/t i3 f
+test/t i4 e
+test/t PRIMARY a
+DROP TABLE t;
+CREATE TABLE t (
+a INT,
+b INT,
+c INT,
+d INT,
+e INT,
+f INT,
+PRIMARY KEY (a),
+INDEX i1 (b),
+INDEX i2 (c),
+INDEX i3 (d),
+INDEX i4 (e)
+) ENGINE=INNODB;
+INSERT INTO t SET a = 1;
+# combination: ccab
+ALTER TABLE t ADD INDEX cc(f), DROP INDEX cc, RENAME INDEX i1 TO i2;
+ERROR 42000: Can't DROP INDEX `cc`; check that it exists
+ALTER TABLE t ADD INDEX cc(f), DROP INDEX cc, RENAME INDEX i1 TO bb;
+ERROR 42000: Can't DROP INDEX `cc`; check that it exists
+ALTER TABLE t ADD INDEX cc(f), DROP INDEX cc, RENAME INDEX aa TO i2;
+ERROR 42000: Can't DROP INDEX `cc`; check that it exists
+ALTER TABLE t ADD INDEX cc(f), DROP INDEX cc, RENAME INDEX aa TO bb;
+ERROR 42000: Can't DROP INDEX `cc`; check that it exists
+ALTER TABLE t ADD INDEX i3(f), DROP INDEX cc, RENAME INDEX aa TO i2;
+ERROR 42000: Can't DROP INDEX `cc`; check that it exists
+ALTER TABLE t ADD INDEX i3(f), DROP INDEX cc, RENAME INDEX aa TO bb;
+ERROR 42000: Can't DROP INDEX `cc`; check that it exists
+ALTER TABLE t ADD INDEX i3(f), DROP INDEX i3, RENAME INDEX i1 TO i2;
+ERROR 42000: Duplicate key name 'i2'
+ALTER TABLE t ADD INDEX i3(f), DROP INDEX i3, RENAME INDEX i1 TO bb;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+SHOW CREATE TABLE t;
+Table Create Table
+t CREATE TABLE `t` (
+ `a` int(11) NOT NULL,
+ `b` int(11) DEFAULT NULL,
+ `c` int(11) DEFAULT NULL,
+ `d` int(11) DEFAULT NULL,
+ `e` int(11) DEFAULT NULL,
+ `f` int(11) DEFAULT NULL,
+ PRIMARY KEY (`a`),
+ KEY `bb` (`b`),
+ KEY `i2` (`c`),
+ KEY `i4` (`e`),
+ KEY `i3` (`f`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SELECT
+t.name AS table_name,
+i.name AS index_name,
+f.name AS column_name
+FROM
+information_schema.innodb_sys_tables t,
+information_schema.innodb_sys_indexes i,
+information_schema.innodb_sys_fields f
+WHERE
+t.name LIKE '%/t' AND
+t.table_id = i.table_id AND
+i.index_id = f.index_id
+ORDER BY 1, 2, 3;
+table_name index_name column_name
+test/t bb b
+test/t i2 c
+test/t i3 f
+test/t i4 e
+test/t PRIMARY a
+DROP TABLE t;
+CREATE TABLE t (
+a INT,
+b INT,
+c INT,
+d INT,
+e INT,
+f INT,
+PRIMARY KEY (a),
+INDEX i1 (b),
+INDEX i2 (c),
+INDEX i3 (d),
+INDEX i4 (e)
+) ENGINE=INNODB;
+INSERT INTO t SET a = 1;
+ALTER TABLE t RENAME INDEX i1 TO x;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+SHOW CREATE TABLE t;
+Table Create Table
+t CREATE TABLE `t` (
+ `a` int(11) NOT NULL,
+ `b` int(11) DEFAULT NULL,
+ `c` int(11) DEFAULT NULL,
+ `d` int(11) DEFAULT NULL,
+ `e` int(11) DEFAULT NULL,
+ `f` int(11) DEFAULT NULL,
+ PRIMARY KEY (`a`),
+ KEY `x` (`b`),
+ KEY `i2` (`c`),
+ KEY `i3` (`d`),
+ KEY `i4` (`e`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SELECT
+t.name AS table_name,
+i.name AS index_name,
+f.name AS column_name
+FROM
+information_schema.innodb_sys_tables t,
+information_schema.innodb_sys_indexes i,
+information_schema.innodb_sys_fields f
+WHERE
+t.name LIKE '%/t' AND
+t.table_id = i.table_id AND
+i.index_id = f.index_id
+ORDER BY 1, 2, 3;
+table_name index_name column_name
+test/t i2 c
+test/t i3 d
+test/t i4 e
+test/t PRIMARY a
+test/t x b
+DROP TABLE t;
+CREATE TABLE t (
+a INT,
+b INT,
+c INT,
+d INT,
+e INT,
+f INT,
+PRIMARY KEY (a),
+INDEX i1 (b),
+INDEX i2 (c),
+INDEX i3 (d),
+INDEX i4 (e)
+) ENGINE=INNODB;
+INSERT INTO t SET a = 1;
+ALTER TABLE t RENAME INDEX i1 TO i2;
+ERROR 42000: Duplicate key name 'i2'
+ALTER TABLE t RENAME INDEX foo TO i1;
+ERROR 42000: Key 'foo' doesn't exist in table 't'
+ALTER TABLE t ADD INDEX i9 (f), RENAME INDEX i1 TO i8;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+SHOW CREATE TABLE t;
+Table Create Table
+t CREATE TABLE `t` (
+ `a` int(11) NOT NULL,
+ `b` int(11) DEFAULT NULL,
+ `c` int(11) DEFAULT NULL,
+ `d` int(11) DEFAULT NULL,
+ `e` int(11) DEFAULT NULL,
+ `f` int(11) DEFAULT NULL,
+ PRIMARY KEY (`a`),
+ KEY `i8` (`b`),
+ KEY `i2` (`c`),
+ KEY `i3` (`d`),
+ KEY `i4` (`e`),
+ KEY `i9` (`f`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SELECT
+t.name AS table_name,
+i.name AS index_name,
+f.name AS column_name
+FROM
+information_schema.innodb_sys_tables t,
+information_schema.innodb_sys_indexes i,
+information_schema.innodb_sys_fields f
+WHERE
+t.name LIKE '%/t' AND
+t.table_id = i.table_id AND
+i.index_id = f.index_id
+ORDER BY 1, 2, 3;
+table_name index_name column_name
+test/t i2 c
+test/t i3 d
+test/t i4 e
+test/t i8 b
+test/t i9 f
+test/t PRIMARY a
+DROP TABLE t;
+CREATE TABLE t (
+a INT,
+b INT,
+c INT,
+d INT,
+e INT,
+f INT,
+PRIMARY KEY (a),
+INDEX i1 (b),
+INDEX i2 (c),
+INDEX i3 (d),
+INDEX i4 (e)
+) ENGINE=INNODB;
+INSERT INTO t SET a = 1;
+ALTER TABLE t ADD INDEX i1 (f), RENAME INDEX i1 TO i9;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+SHOW CREATE TABLE t;
+Table Create Table
+t CREATE TABLE `t` (
+ `a` int(11) NOT NULL,
+ `b` int(11) DEFAULT NULL,
+ `c` int(11) DEFAULT NULL,
+ `d` int(11) DEFAULT NULL,
+ `e` int(11) DEFAULT NULL,
+ `f` int(11) DEFAULT NULL,
+ PRIMARY KEY (`a`),
+ KEY `i9` (`b`),
+ KEY `i2` (`c`),
+ KEY `i3` (`d`),
+ KEY `i4` (`e`),
+ KEY `i1` (`f`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SELECT
+t.name AS table_name,
+i.name AS index_name,
+f.name AS column_name
+FROM
+information_schema.innodb_sys_tables t,
+information_schema.innodb_sys_indexes i,
+information_schema.innodb_sys_fields f
+WHERE
+t.name LIKE '%/t' AND
+t.table_id = i.table_id AND
+i.index_id = f.index_id
+ORDER BY 1, 2, 3;
+table_name index_name column_name
+test/t i1 f
+test/t i2 c
+test/t i3 d
+test/t i4 e
+test/t i9 b
+test/t PRIMARY a
+DROP TABLE t;
+CREATE TABLE t (
+a INT,
+b INT,
+c INT,
+d INT,
+e INT,
+f INT,
+PRIMARY KEY (a),
+INDEX i1 (b),
+INDEX i2 (c),
+INDEX i3 (d),
+INDEX i4 (e)
+) ENGINE=INNODB;
+INSERT INTO t SET a = 1;
+ALTER TABLE t ADD INDEX foo (f), RENAME INDEX i1 TO foo;
+ERROR 42000: Duplicate key name 'foo'
+ALTER TABLE t ADD INDEX i1 (f), RENAME INDEX i1 TO foo, DROP INDEX i1;
+ERROR 42000: Key 'i1' doesn't exist in table 't'
+ALTER TABLE t ADD INDEX i1 (f), RENAME INDEX i1 TO foo, DROP INDEX foo;
+ERROR 42000: Can't DROP INDEX `foo`; check that it exists
+ALTER TABLE t ADD INDEX foo (f), RENAME INDEX foo TO bar, DROP INDEX foo;
+ERROR 42000: Can't DROP INDEX `foo`; check that it exists
+ALTER TABLE t RENAME INDEX i1 TO x, RENAME INDEX i2 TO x;
+ERROR 42000: Duplicate key name 'x'
+ALTER TABLE t RENAME INDEX i1 TO x, RENAME INDEX i1 TO y;
+ERROR 42000: Key 'i1' doesn't exist in table 't'
+ALTER TABLE t RENAME INDEX i1 TO x, RENAME INDEX i1 TO x;
+ERROR 42000: Key 'i1' doesn't exist in table 't'
+SHOW CREATE TABLE t;
+Table Create Table
+t CREATE TABLE `t` (
+ `a` int(11) NOT NULL,
+ `b` int(11) DEFAULT NULL,
+ `c` int(11) DEFAULT NULL,
+ `d` int(11) DEFAULT NULL,
+ `e` int(11) DEFAULT NULL,
+ `f` int(11) DEFAULT NULL,
+ PRIMARY KEY (`a`),
+ KEY `i1` (`b`),
+ KEY `i2` (`c`),
+ KEY `i3` (`d`),
+ KEY `i4` (`e`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SELECT
+t.name AS table_name,
+i.name AS index_name,
+f.name AS column_name
+FROM
+information_schema.innodb_sys_tables t,
+information_schema.innodb_sys_indexes i,
+information_schema.innodb_sys_fields f
+WHERE
+t.name LIKE '%/t' AND
+t.table_id = i.table_id AND
+i.index_id = f.index_id
+ORDER BY 1, 2, 3;
+table_name index_name column_name
+test/t i1 b
+test/t i2 c
+test/t i3 d
+test/t i4 e
+test/t PRIMARY a
+DROP TABLE t;
+CREATE TABLE t (
+c1 INT NOT NULL,
+c2 INT NOT NULL,
+c3 INT,
+c4 INT,
+PRIMARY KEY (c1),
+INDEX i1 (c3),
+INDEX i2 (c4)
+) ENGINE=INNODB;
+INSERT INTO t SET c1=1, c2=2;
+ALTER TABLE t DROP PRIMARY KEY, ADD PRIMARY KEY (c2), RENAME INDEX i1 TO x;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+SHOW CREATE TABLE t;
+Table Create Table
+t CREATE TABLE `t` (
+ `c1` int(11) NOT NULL,
+ `c2` int(11) NOT NULL,
+ `c3` int(11) DEFAULT NULL,
+ `c4` int(11) DEFAULT NULL,
+ PRIMARY KEY (`c2`),
+ KEY `x` (`c3`),
+ KEY `i2` (`c4`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SELECT
+t.name AS table_name,
+i.name AS index_name,
+f.name AS column_name
+FROM
+information_schema.innodb_sys_tables t,
+information_schema.innodb_sys_indexes i,
+information_schema.innodb_sys_fields f
+WHERE
+t.name LIKE '%/t' AND
+t.table_id = i.table_id AND
+i.index_id = f.index_id
+ORDER BY 1, 2, 3;
+table_name index_name column_name
+test/t i2 c4
+test/t PRIMARY c2
+test/t x c3
+ALTER TABLE t RENAME INDEX i2 TO y, ROW_FORMAT=REDUNDANT;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+SHOW CREATE TABLE t;
+Table Create Table
+t CREATE TABLE `t` (
+ `c1` int(11) NOT NULL,
+ `c2` int(11) NOT NULL,
+ `c3` int(11) DEFAULT NULL,
+ `c4` int(11) DEFAULT NULL,
+ PRIMARY KEY (`c2`),
+ KEY `x` (`c3`),
+ KEY `y` (`c4`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT
+SELECT
+t.name AS table_name,
+i.name AS index_name,
+f.name AS column_name
+FROM
+information_schema.innodb_sys_tables t,
+information_schema.innodb_sys_indexes i,
+information_schema.innodb_sys_fields f
+WHERE
+t.name LIKE '%/t' AND
+t.table_id = i.table_id AND
+i.index_id = f.index_id
+ORDER BY 1, 2, 3;
+table_name index_name column_name
+test/t PRIMARY c2
+test/t x c3
+test/t y c4
+DROP TABLE t;
+CREATE TABLE t (
+c1 INT NOT NULL,
+c2 INT,
+c3 INT,
+INDEX i1 (c2),
+INDEX i2 (c3)
+) ENGINE=INNODB;
+INSERT INTO t SET c1=1;
+ALTER TABLE t ADD PRIMARY KEY (c1), RENAME INDEX i1 TO x;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+SHOW CREATE TABLE t;
+Table Create Table
+t CREATE TABLE `t` (
+ `c1` int(11) NOT NULL,
+ `c2` int(11) DEFAULT NULL,
+ `c3` int(11) DEFAULT NULL,
+ PRIMARY KEY (`c1`),
+ KEY `x` (`c2`),
+ KEY `i2` (`c3`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SELECT
+t.name AS table_name,
+i.name AS index_name,
+f.name AS column_name
+FROM
+information_schema.innodb_sys_tables t,
+information_schema.innodb_sys_indexes i,
+information_schema.innodb_sys_fields f
+WHERE
+t.name LIKE '%/t' AND
+t.table_id = i.table_id AND
+i.index_id = f.index_id
+ORDER BY 1, 2, 3;
+table_name index_name column_name
+test/t i2 c3
+test/t PRIMARY c1
+test/t x c2
+DROP TABLE t;
+CREATE TABLE t (a INT, INDEX iiiii (a)) ENGINE=INNODB;
+INSERT INTO t SET a=NULL;
+ALTER TABLE t RENAME INDEX iiiii TO i;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+ALTER TABLE t RENAME INDEX i TO iiiii;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+ALTER TABLE t RENAME INDEX iiiii TO i;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+ALTER TABLE t RENAME INDEX i TO iiiii;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+DROP TABLE t;
diff --git a/mysql-test/suite/innodb/r/innodb_scrub.result b/mysql-test/suite/innodb/r/innodb_scrub.result
new file mode 100644
index 00000000000..1a4db0b541e
--- /dev/null
+++ b/mysql-test/suite/innodb/r/innodb_scrub.result
@@ -0,0 +1,12 @@
+CREATE TABLE t1(f1 int auto_increment primary key,
+f2 varchar(256),
+f3 text) engine = innodb;
+FLUSH TABLE t1 FOR EXPORT;
+UNLOCK TABLES;
+FOUND 500500 /unicycle|repairman/ in t1.ibd
+DELETE FROM t1;
+InnoDB 0 transactions not purged
+FLUSH TABLE t1 FOR EXPORT;
+UNLOCK TABLES;
+NOT FOUND /unicycle|repairman/ in t1.ibd
+DROP TABLE t1;
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 4737467aeca..775bbc017a1 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
@@ -35,257 +35,241 @@ page_size buffer_pool_instance pages_used pages_free relocation_ops relocation_t
Warnings:
Warning 1012 InnoDB: SELECTing from INFORMATION_SCHEMA.innodb_cmpmem_reset but the InnoDB storage engine is not installed
select * from information_schema.innodb_metrics;
-NAME SUBSYSTEM COUNT MAX_COUNT MIN_COUNT AVG_COUNT COUNT_RESET MAX_COUNT_RESET MIN_COUNT_RESET AVG_COUNT_RESET TIME_ENABLED TIME_DISABLED TIME_ELAPSED TIME_RESET STATUS TYPE COMMENT
-metadata_table_handles_opened metadata 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of table handles opened
-metadata_table_handles_closed metadata 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of table handles closed
-metadata_table_reference_count metadata 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Table reference counter
-lock_deadlocks lock 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of deadlocks
-lock_timeouts lock 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of lock timeouts
-lock_rec_lock_waits lock 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of times enqueued into record lock wait queue
-lock_table_lock_waits lock 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of times enqueued into table lock wait queue
-lock_rec_lock_requests lock 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of record locks requested
-lock_rec_lock_created lock 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of record locks created
-lock_rec_lock_removed lock 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of record locks removed from the lock queue
-lock_rec_locks lock 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Current number of record locks on tables
-lock_table_lock_created lock 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of table locks created
-lock_table_lock_removed lock 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of table locks removed from the lock queue
-lock_table_locks lock 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Current number of table locks on tables
-lock_row_lock_current_waits lock 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of row locks currently being waited for (innodb_row_lock_current_waits)
-lock_row_lock_time lock 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Time spent in acquiring row locks, in milliseconds (innodb_row_lock_time)
-lock_row_lock_time_max lock 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled value The maximum time to acquire a row lock, in milliseconds (innodb_row_lock_time_max)
-lock_row_lock_waits lock 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of times a row lock had to be waited for (innodb_row_lock_waits)
-lock_row_lock_time_avg lock 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled value The average time to acquire a row lock, in milliseconds (innodb_row_lock_time_avg)
-buffer_pool_size server 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled value Server buffer pool size (all buffer pools) in bytes
-buffer_pool_reads buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of reads directly from disk (innodb_buffer_pool_reads)
-buffer_pool_read_requests buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of logical read requests (innodb_buffer_pool_read_requests)
-buffer_pool_write_requests buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of write requests (innodb_buffer_pool_write_requests)
-buffer_pool_wait_free buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of times waited for free buffer (innodb_buffer_pool_wait_free)
-buffer_pool_read_ahead buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of pages read as read ahead (innodb_buffer_pool_read_ahead)
-buffer_pool_read_ahead_evicted buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Read-ahead pages evicted without being accessed (innodb_buffer_pool_read_ahead_evicted)
-buffer_pool_pages_total buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled value Total buffer pool size in pages (innodb_buffer_pool_pages_total)
-buffer_pool_pages_misc buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled value Buffer pages for misc use such as row locks or the adaptive hash index (innodb_buffer_pool_pages_misc)
-buffer_pool_pages_data buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled value Buffer pages containing data (innodb_buffer_pool_pages_data)
-buffer_pool_bytes_data buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled value Buffer bytes containing data (innodb_buffer_pool_bytes_data)
-buffer_pool_pages_dirty buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled value Buffer pages currently dirty (innodb_buffer_pool_pages_dirty)
-buffer_pool_bytes_dirty buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled value Buffer bytes currently dirty (innodb_buffer_pool_bytes_dirty)
-buffer_pool_pages_free buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled value Buffer pages currently free (innodb_buffer_pool_pages_free)
-buffer_pages_created buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of pages created (innodb_pages_created)
-buffer_pages_written buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of pages written (innodb_pages_written)
-buffer_index_pages_written buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of index pages written (innodb_index_pages_written)
-buffer_non_index_pages_written buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of non index pages written (innodb_non_index_pages_written)
-buffer_pages_read buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of pages read (innodb_pages_read)
-buffer_index_sec_rec_cluster_reads buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of secondary record reads triggered cluster read
-buffer_index_sec_rec_cluster_reads_avoided buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of secondary record reads avoided triggering cluster read
-buffer_data_reads buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Amount of data read in bytes (innodb_data_reads)
-buffer_data_written buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Amount of data written in bytes (innodb_data_written)
-buffer_flush_batch_scanned buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled set_owner Total pages scanned as part of flush batch
-buffer_flush_batch_num_scan buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled set_member Number of times buffer flush list flush is called
-buffer_flush_batch_scanned_per_call buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled set_member Pages scanned per flush batch scan
-buffer_flush_batch_total_pages buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled set_owner Total pages flushed as part of flush batch
-buffer_flush_batches buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled set_member Number of flush batches
-buffer_flush_batch_pages buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled set_member Pages queued as a flush batch
-buffer_flush_neighbor_total_pages buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled set_owner Total neighbors flushed as part of neighbor flush
-buffer_flush_neighbor buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled set_member Number of times neighbors flushing is invoked
-buffer_flush_neighbor_pages buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled set_member Pages queued as a neighbor batch
-buffer_flush_n_to_flush_requested buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of pages requested for flushing.
-buffer_flush_n_to_flush_by_age buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of pages target by LSN Age for flushing.
-buffer_flush_adaptive_avg_time_slot buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Avg time (ms) spent for adaptive flushing recently per slot.
-buffer_LRU_batch_flush_avg_time_slot buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Avg time (ms) spent for LRU batch flushing recently per slot.
-buffer_flush_adaptive_avg_time_thread buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Avg time (ms) spent for adaptive flushing recently per thread.
-buffer_LRU_batch_flush_avg_time_thread buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Avg time (ms) spent for LRU batch flushing recently per thread.
-buffer_flush_adaptive_avg_time_est buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Estimated time (ms) spent for adaptive flushing recently.
-buffer_LRU_batch_flush_avg_time_est buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Estimated time (ms) spent for LRU batch flushing recently.
-buffer_flush_avg_time buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Avg time (ms) spent for flushing recently.
-buffer_flush_adaptive_avg_pass buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of adaptive flushes passed during the recent Avg period.
-buffer_LRU_batch_flush_avg_pass buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of LRU batch flushes passed during the recent Avg period.
-buffer_flush_avg_pass buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of flushes passed during the recent Avg period.
-buffer_LRU_get_free_loops buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Total loops in LRU get free.
-buffer_LRU_get_free_waits buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Total sleep waits in LRU get free.
-buffer_flush_avg_page_rate buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Average number of pages at which flushing is happening
-buffer_flush_lsn_avg_rate buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Average redo generation rate
-buffer_flush_pct_for_dirty buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Percent of IO capacity used to avoid max dirty page limit
-buffer_flush_pct_for_lsn buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Percent of IO capacity used to avoid reusable redo space limit
-buffer_flush_sync_waits buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of times a wait happens due to sync flushing
-buffer_flush_adaptive_total_pages buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled set_owner Total pages flushed as part of adaptive flushing
-buffer_flush_adaptive buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled set_member Number of adaptive batches
-buffer_flush_adaptive_pages buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled set_member Pages queued as an adaptive batch
-buffer_flush_sync_total_pages buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled set_owner Total pages flushed as part of sync batches
-buffer_flush_sync buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled set_member Number of sync batches
-buffer_flush_sync_pages buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled set_member Pages queued as a sync batch
-buffer_flush_background_total_pages buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled set_owner Total pages flushed as part of background batches
-buffer_flush_background buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled set_member Number of background batches
-buffer_flush_background_pages buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled set_member Pages queued as a background batch
-buffer_LRU_batch_scanned buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled set_owner Total pages scanned as part of LRU batch
-buffer_LRU_batch_num_scan buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled set_member Number of times LRU batch is called
-buffer_LRU_batch_scanned_per_call buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled set_member Pages scanned per LRU batch call
-buffer_LRU_batch_flush_total_pages buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled set_owner Total pages flushed as part of LRU batches
-buffer_LRU_batches_flush buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled set_member Number of LRU batches
-buffer_LRU_batch_flush_pages buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled set_member Pages queued as an LRU batch
-buffer_LRU_batch_evict_total_pages buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled set_owner Total pages evicted as part of LRU batches
-buffer_LRU_batches_evict buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled set_member Number of LRU batches
-buffer_LRU_batch_evict_pages buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled set_member Pages queued as an LRU batch
-buffer_LRU_single_flush_scanned buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled set_owner Total pages scanned as part of single page LRU flush
-buffer_LRU_single_flush_num_scan buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled set_member Number of times single page LRU flush is called
-buffer_LRU_single_flush_scanned_per_call buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled set_member Page scanned per single LRU flush
-buffer_LRU_single_flush_failure_count Buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of times attempt to flush a single page from LRU failed
-buffer_LRU_get_free_search Buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of searches performed for a clean page
-buffer_LRU_search_scanned buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled set_owner Total pages scanned as part of LRU search
-buffer_LRU_search_num_scan buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled set_member Number of times LRU search is performed
-buffer_LRU_search_scanned_per_call buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled set_member Page scanned per single LRU search
-buffer_LRU_unzip_search_scanned buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled set_owner Total pages scanned as part of LRU unzip search
-buffer_LRU_unzip_search_num_scan buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled set_member Number of times LRU unzip search is performed
-buffer_LRU_unzip_search_scanned_per_call buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled set_member Page scanned per single LRU unzip search
-buffer_page_read_index_leaf buffer_page_io 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of Index Leaf Pages read
-buffer_page_read_index_non_leaf buffer_page_io 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of Index Non-leaf Pages read
-buffer_page_read_index_ibuf_leaf buffer_page_io 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of Insert Buffer Index Leaf Pages read
-buffer_page_read_index_ibuf_non_leaf buffer_page_io 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of Insert Buffer Index Non-Leaf Pages read
-buffer_page_read_undo_log buffer_page_io 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of Undo Log Pages read
-buffer_page_read_index_inode buffer_page_io 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of Index Inode Pages read
-buffer_page_read_ibuf_free_list buffer_page_io 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of Insert Buffer Free List Pages read
-buffer_page_read_ibuf_bitmap buffer_page_io 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of Insert Buffer Bitmap Pages read
-buffer_page_read_system_page buffer_page_io 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of System Pages read
-buffer_page_read_trx_system buffer_page_io 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of Transaction System Pages read
-buffer_page_read_fsp_hdr buffer_page_io 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of File Space Header Pages read
-buffer_page_read_xdes buffer_page_io 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of Extent Descriptor Pages read
-buffer_page_read_blob buffer_page_io 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of Uncompressed BLOB Pages read
-buffer_page_read_zblob buffer_page_io 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of First Compressed BLOB Pages read
-buffer_page_read_zblob2 buffer_page_io 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of Subsequent Compressed BLOB Pages read
-buffer_page_read_other buffer_page_io 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of other/unknown (old version of InnoDB) Pages read
-buffer_page_written_index_leaf buffer_page_io 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of Index Leaf Pages written
-buffer_page_written_index_non_leaf buffer_page_io 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of Index Non-leaf Pages written
-buffer_page_written_index_ibuf_leaf buffer_page_io 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of Insert Buffer Index Leaf Pages written
-buffer_page_written_index_ibuf_non_leaf buffer_page_io 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of Insert Buffer Index Non-Leaf Pages written
-buffer_page_written_undo_log buffer_page_io 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of Undo Log Pages written
-buffer_page_written_index_inode buffer_page_io 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of Index Inode Pages written
-buffer_page_written_ibuf_free_list buffer_page_io 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of Insert Buffer Free List Pages written
-buffer_page_written_ibuf_bitmap buffer_page_io 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of Insert Buffer Bitmap Pages written
-buffer_page_written_system_page buffer_page_io 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of System Pages written
-buffer_page_written_trx_system buffer_page_io 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of Transaction System Pages written
-buffer_page_written_fsp_hdr buffer_page_io 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of File Space Header Pages written
-buffer_page_written_xdes buffer_page_io 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of Extent Descriptor Pages written
-buffer_page_written_blob buffer_page_io 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of Uncompressed BLOB Pages written
-buffer_page_written_zblob buffer_page_io 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of First Compressed BLOB Pages written
-buffer_page_written_zblob2 buffer_page_io 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of Subsequent Compressed BLOB Pages written
-buffer_page_written_other buffer_page_io 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of other/unknown (old version InnoDB) Pages written
-os_data_reads os 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of reads initiated (innodb_data_reads)
-os_data_writes os 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of writes initiated (innodb_data_writes)
-os_data_fsyncs os 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of fsync() calls (innodb_data_fsyncs)
-os_pending_reads os 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of reads pending
-os_pending_writes os 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of writes pending
-os_log_bytes_written os 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Bytes of log written (innodb_os_log_written)
-os_log_fsyncs os 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of fsync log writes (innodb_os_log_fsyncs)
-os_log_pending_fsyncs os 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of pending fsync write (innodb_os_log_pending_fsyncs)
-os_log_pending_writes os 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of pending log file writes (innodb_os_log_pending_writes)
-trx_rw_commits transaction 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of read-write transactions committed
-trx_ro_commits transaction 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of read-only transactions committed
-trx_nl_ro_commits transaction 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of non-locking auto-commit read-only transactions committed
-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_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
-trx_undo_slots_cached transaction 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of undo slots cached
-trx_rseg_current_size transaction 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled value Current rollback segment size in pages
-purge_del_mark_records purge 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of delete-marked rows purged
-purge_upd_exist_or_extern_records purge 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of purges on updates of existing records and updates on delete marked record with externally stored field
-purge_invoked purge 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of times purge was invoked
-purge_undo_log_pages purge 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of undo log pages handled by the purge
-purge_dml_delay_usec purge 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled value Microseconds DML to be delayed due to purge lagging
-purge_stop_count purge 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled value Number of times purge was stopped
-purge_resume_count purge 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled value Number of times purge was resumed
-log_checkpoints recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of checkpoints
-log_lsn_last_flush recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled value LSN of Last flush
-log_lsn_last_checkpoint recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled value LSN at last checkpoint
-log_lsn_current recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled value Current LSN value
-log_lsn_checkpoint_age recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Current LSN value minus LSN at last checkpoint
-log_lsn_buf_pool_oldest recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled value The oldest modified block LSN in the buffer pool
-log_max_modified_age_async recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled value Maximum LSN difference; when exceeded, start asynchronous preflush
-log_max_modified_age_sync recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled value Maximum LSN difference; when exceeded, start synchronous preflush
-log_pending_log_flushes recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled value Pending log flushes
-log_pending_checkpoint_writes recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled value Pending checkpoints
-log_num_log_io recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled value Number of log I/Os
-log_waits recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of log waits due to small log buffer (innodb_log_waits)
-log_write_requests recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of log write requests (innodb_log_write_requests)
-log_writes recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of log writes (innodb_log_writes)
-log_padded recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Bytes of log padded for log write ahead
-compress_pages_compressed compression 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of pages compressed
-compress_pages_decompressed compression 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of pages decompressed
-compression_pad_increments compression 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of times padding is incremented to avoid compression failures
-compression_pad_decrements compression 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of times padding is decremented due to good compressibility
-compress_saved compression 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of bytes saved by page compression
-compress_pages_page_compressed compression 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of pages compressed by page compression
-compress_page_compressed_trim_op compression 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of TRIM operation performed by page compression
-compress_pages_page_decompressed compression 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of pages decompressed by page compression
-compress_pages_page_compression_error compression 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of page compression errors
-compress_pages_encrypted compression 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of pages encrypted
-compress_pages_decrypted compression 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of pages decrypted
-index_page_splits index 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of index page splits
-index_page_merge_attempts index 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of index page merge attempts
-index_page_merge_successful index 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of successful index page merges
-index_page_reorg_attempts index 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of index page reorganization attempts
-index_page_reorg_successful index 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of successful index page reorganizations
-index_page_discards index 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of index pages discarded
-adaptive_hash_searches adaptive_hash_index 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of successful searches using Adaptive Hash Index
-adaptive_hash_searches_btree adaptive_hash_index 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of searches using B-tree on an index search
-adaptive_hash_pages_added adaptive_hash_index 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of index pages on which the Adaptive Hash Index is built
-adaptive_hash_pages_removed adaptive_hash_index 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of index pages whose corresponding Adaptive Hash Index entries were removed
-adaptive_hash_rows_added adaptive_hash_index 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of Adaptive Hash Index rows added
-adaptive_hash_rows_removed adaptive_hash_index 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of Adaptive Hash Index rows removed
-adaptive_hash_rows_deleted_no_hash_entry adaptive_hash_index 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of rows deleted that did not have corresponding Adaptive Hash Index entries
-adaptive_hash_rows_updated adaptive_hash_index 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of Adaptive Hash Index rows updated
-file_num_open_files file_system 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled value Number of files currently open (innodb_num_open_files)
-ibuf_merges_insert change_buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of inserted records merged by change buffering
-ibuf_merges_delete_mark change_buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of deleted records merged by change buffering
-ibuf_merges_delete change_buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of purge records merged by change buffering
-ibuf_merges_discard_insert change_buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of insert merged operations discarded
-ibuf_merges_discard_delete_mark change_buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of deleted merged operations discarded
-ibuf_merges_discard_delete change_buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of purge merged operations discarded
-ibuf_merges change_buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of change buffer merges
-ibuf_size change_buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Change buffer size in pages
-innodb_master_thread_sleeps server 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of times (seconds) master thread sleeps
-innodb_activity_count server 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Current server activity count
-innodb_master_active_loops server 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of times master thread performs its tasks when server is active
-innodb_master_idle_loops server 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of times master thread performs its tasks when server is idle
-innodb_background_drop_table_usec server 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Time (in microseconds) spent to process drop table list
-innodb_ibuf_merge_usec server 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Time (in microseconds) spent to process change buffer merge
-innodb_log_flush_usec server 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Time (in microseconds) spent to flush log records
-innodb_mem_validate_usec server 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Time (in microseconds) spent to do memory validation
-innodb_master_purge_usec server 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Time (in microseconds) spent by master thread to purge records
-innodb_dict_lru_usec server 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Time (in microseconds) spent to process DICT LRU list
-innodb_dict_lru_count_active server 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of tables evicted from DICT LRU list in the active loop
-innodb_dict_lru_count_idle server 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of tables evicted from DICT LRU list in the idle loop
-innodb_checkpoint_usec server 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Time (in microseconds) spent by master thread to do checkpoint
-innodb_dblwr_writes server 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of doublewrite operations that have been performed (innodb_dblwr_writes)
-innodb_dblwr_pages_written server 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of pages that have been written for doublewrite operations (innodb_dblwr_pages_written)
-innodb_page_size server 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled value InnoDB page size in bytes (innodb_page_size)
-innodb_rwlock_s_spin_waits server 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of rwlock spin waits due to shared latch request
-innodb_rwlock_x_spin_waits server 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of rwlock spin waits due to exclusive latch request
-innodb_rwlock_sx_spin_waits server 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of rwlock spin waits due to sx latch request
-innodb_rwlock_s_spin_rounds server 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of rwlock spin loop rounds due to shared latch request
-innodb_rwlock_x_spin_rounds server 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of rwlock spin loop rounds due to exclusive latch request
-innodb_rwlock_sx_spin_rounds server 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of rwlock spin loop rounds due to sx latch request
-innodb_rwlock_s_os_waits server 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of OS waits due to shared latch request
-innodb_rwlock_x_os_waits server 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of OS waits due to exclusive latch request
-innodb_rwlock_sx_os_waits server 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of OS waits due to sx latch request
-dml_reads dml 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of rows read
-dml_inserts dml 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of rows inserted
-dml_deletes dml 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of rows deleted
-dml_updates dml 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of rows updated
-dml_system_reads dml 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of system rows read
-dml_system_inserts dml 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of system rows inserted
-dml_system_deletes dml 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of system rows deleted
-dml_system_updates dml 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of system rows updated
-ddl_background_drop_indexes ddl 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of indexes waiting to be dropped after failed index creation
-ddl_background_drop_tables ddl 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of tables in background drop table list
-ddl_online_create_index ddl 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of indexes being created online
-ddl_pending_alter_table ddl 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of ALTER TABLE, CREATE INDEX, DROP INDEX in progress
-ddl_sort_file_alter_table ddl 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of sort files created during alter table
-ddl_log_file_alter_table ddl 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of log files created during alter table
-icp_attempts icp 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of attempts for index push-down condition checks
-icp_no_match icp 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Index push-down condition does not match
-icp_out_of_range icp 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Index push-down condition out of range
-icp_match icp 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Index push-down condition matches
+NAME SUBSYSTEM COUNT MAX_COUNT MIN_COUNT AVG_COUNT COUNT_RESET MAX_COUNT_RESET MIN_COUNT_RESET AVG_COUNT_RESET TIME_ENABLED TIME_DISABLED TIME_ELAPSED TIME_RESET ENABLED TYPE COMMENT
+metadata_table_handles_opened metadata 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of table handles opened
+metadata_table_handles_closed metadata 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of table handles closed
+metadata_table_reference_count metadata 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Table reference counter
+lock_deadlocks lock 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of deadlocks
+lock_timeouts lock 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of lock timeouts
+lock_rec_lock_waits lock 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of times enqueued into record lock wait queue
+lock_table_lock_waits lock 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of times enqueued into table lock wait queue
+lock_rec_lock_requests lock 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of record locks requested
+lock_rec_lock_created lock 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of record locks created
+lock_rec_lock_removed lock 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of record locks removed from the lock queue
+lock_rec_locks lock 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Current number of record locks on tables
+lock_table_lock_created lock 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of table locks created
+lock_table_lock_removed lock 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of table locks removed from the lock queue
+lock_table_locks lock 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Current number of table locks on tables
+lock_row_lock_current_waits lock 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of row locks currently being waited for (innodb_row_lock_current_waits)
+lock_row_lock_time lock 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Time spent in acquiring row locks, in milliseconds (innodb_row_lock_time)
+lock_row_lock_time_max lock 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 value The maximum time to acquire a row lock, in milliseconds (innodb_row_lock_time_max)
+lock_row_lock_waits lock 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of times a row lock had to be waited for (innodb_row_lock_waits)
+lock_row_lock_time_avg lock 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 value The average time to acquire a row lock, in milliseconds (innodb_row_lock_time_avg)
+buffer_pool_size server 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 value Server buffer pool size (all buffer pools) in bytes
+buffer_pool_reads buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of reads directly from disk (innodb_buffer_pool_reads)
+buffer_pool_read_requests buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of logical read requests (innodb_buffer_pool_read_requests)
+buffer_pool_write_requests buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of write requests (innodb_buffer_pool_write_requests)
+buffer_pool_wait_free buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of times waited for free buffer (innodb_buffer_pool_wait_free)
+buffer_pool_read_ahead buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of pages read as read ahead (innodb_buffer_pool_read_ahead)
+buffer_pool_read_ahead_evicted buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Read-ahead pages evicted without being accessed (innodb_buffer_pool_read_ahead_evicted)
+buffer_pool_pages_total buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 value Total buffer pool size in pages (innodb_buffer_pool_pages_total)
+buffer_pool_pages_misc buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 value Buffer pages for misc use such as row locks or the adaptive hash index (innodb_buffer_pool_pages_misc)
+buffer_pool_pages_data buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 value Buffer pages containing data (innodb_buffer_pool_pages_data)
+buffer_pool_bytes_data buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 value Buffer bytes containing data (innodb_buffer_pool_bytes_data)
+buffer_pool_pages_dirty buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 value Buffer pages currently dirty (innodb_buffer_pool_pages_dirty)
+buffer_pool_bytes_dirty buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 value Buffer bytes currently dirty (innodb_buffer_pool_bytes_dirty)
+buffer_pool_pages_free buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 value Buffer pages currently free (innodb_buffer_pool_pages_free)
+buffer_pages_created buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of pages created (innodb_pages_created)
+buffer_pages_written buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of pages written (innodb_pages_written)
+buffer_index_pages_written buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of index pages written (innodb_index_pages_written)
+buffer_non_index_pages_written buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of non index pages written (innodb_non_index_pages_written)
+buffer_pages_read buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of pages read (innodb_pages_read)
+buffer_index_sec_rec_cluster_reads buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of secondary record reads triggered cluster read
+buffer_index_sec_rec_cluster_reads_avoided buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of secondary record reads avoided triggering cluster read
+buffer_data_reads buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Amount of data read in bytes (innodb_data_reads)
+buffer_data_written buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Amount of data written in bytes (innodb_data_written)
+buffer_flush_batch_scanned buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 set_owner Total pages scanned as part of flush batch
+buffer_flush_batch_num_scan buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 set_member Number of times buffer flush list flush is called
+buffer_flush_batch_scanned_per_call buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 set_member Pages scanned per flush batch scan
+buffer_flush_batch_total_pages buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 set_owner Total pages flushed as part of flush batch
+buffer_flush_batches buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 set_member Number of flush batches
+buffer_flush_batch_pages buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 set_member Pages queued as a flush batch
+buffer_flush_neighbor_total_pages buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 set_owner Total neighbors flushed as part of neighbor flush
+buffer_flush_neighbor buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 set_member Number of times neighbors flushing is invoked
+buffer_flush_neighbor_pages buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 set_member Pages queued as a neighbor batch
+buffer_flush_n_to_flush_requested buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of pages requested for flushing.
+buffer_flush_n_to_flush_by_age buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of pages target by LSN Age for flushing.
+buffer_flush_adaptive_avg_time buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Avg time (ms) spent for adaptive flushing recently.
+buffer_flush_adaptive_avg_pass buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of adaptive flushes passed during the recent Avg period.
+buffer_LRU_get_free_loops buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Total loops in LRU get free.
+buffer_LRU_get_free_waits buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Total sleep waits in LRU get free.
+buffer_flush_avg_page_rate buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Average number of pages at which flushing is happening
+buffer_flush_lsn_avg_rate buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Average redo generation rate
+buffer_flush_pct_for_dirty buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Percent of IO capacity used to avoid max dirty page limit
+buffer_flush_pct_for_lsn buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Percent of IO capacity used to avoid reusable redo space limit
+buffer_flush_sync_waits buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of times a wait happens due to sync flushing
+buffer_flush_adaptive_total_pages buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 set_owner Total pages flushed as part of adaptive flushing
+buffer_flush_adaptive buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 set_member Number of adaptive batches
+buffer_flush_adaptive_pages buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 set_member Pages queued as an adaptive batch
+buffer_flush_sync_total_pages buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 set_owner Total pages flushed as part of sync batches
+buffer_flush_sync buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 set_member Number of sync batches
+buffer_flush_sync_pages buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 set_member Pages queued as a sync batch
+buffer_flush_background_total_pages buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 set_owner Total pages flushed as part of background batches
+buffer_flush_background buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 set_member Number of background batches
+buffer_flush_background_pages buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 set_member Pages queued as a background batch
+buffer_LRU_batch_scanned buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 set_owner Total pages scanned as part of LRU batch
+buffer_LRU_batch_num_scan buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 set_member Number of times LRU batch is called
+buffer_LRU_batch_scanned_per_call buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 set_member Pages scanned per LRU batch call
+buffer_LRU_batch_flush_total_pages buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 set_owner Total pages flushed as part of LRU batches
+buffer_LRU_batches_flush buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 set_member Number of LRU batches
+buffer_LRU_batch_flush_pages buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 set_member Pages queued as an LRU batch
+buffer_LRU_batch_evict_total_pages buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 set_owner Total pages evicted as part of LRU batches
+buffer_LRU_batches_evict buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 set_member Number of LRU batches
+buffer_LRU_batch_evict_pages buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 set_member Pages queued as an LRU batch
+buffer_LRU_single_flush_failure_count Buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of times attempt to flush a single page from LRU failed
+buffer_LRU_get_free_search Buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of searches performed for a clean page
+buffer_LRU_search_scanned buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 set_owner Total pages scanned as part of LRU search
+buffer_LRU_search_num_scan buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 set_member Number of times LRU search is performed
+buffer_LRU_search_scanned_per_call buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 set_member Page scanned per single LRU search
+buffer_LRU_unzip_search_scanned buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 set_owner Total pages scanned as part of LRU unzip search
+buffer_LRU_unzip_search_num_scan buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 set_member Number of times LRU unzip search is performed
+buffer_LRU_unzip_search_scanned_per_call buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 set_member Page scanned per single LRU unzip search
+buffer_page_read_index_leaf buffer_page_io 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of Index Leaf Pages read
+buffer_page_read_index_non_leaf buffer_page_io 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of Index Non-leaf Pages read
+buffer_page_read_index_ibuf_leaf buffer_page_io 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of Insert Buffer Index Leaf Pages read
+buffer_page_read_index_ibuf_non_leaf buffer_page_io 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of Insert Buffer Index Non-Leaf Pages read
+buffer_page_read_undo_log buffer_page_io 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of Undo Log Pages read
+buffer_page_read_index_inode buffer_page_io 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of Index Inode Pages read
+buffer_page_read_ibuf_free_list buffer_page_io 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of Insert Buffer Free List Pages read
+buffer_page_read_ibuf_bitmap buffer_page_io 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of Insert Buffer Bitmap Pages read
+buffer_page_read_system_page buffer_page_io 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of System Pages read
+buffer_page_read_trx_system buffer_page_io 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of Transaction System Pages read
+buffer_page_read_fsp_hdr buffer_page_io 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of File Space Header Pages read
+buffer_page_read_xdes buffer_page_io 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of Extent Descriptor Pages read
+buffer_page_read_blob buffer_page_io 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of Uncompressed BLOB Pages read
+buffer_page_read_zblob buffer_page_io 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of First Compressed BLOB Pages read
+buffer_page_read_zblob2 buffer_page_io 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of Subsequent Compressed BLOB Pages read
+buffer_page_read_other buffer_page_io 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of other/unknown (old version of InnoDB) Pages read
+buffer_page_written_index_leaf buffer_page_io 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of Index Leaf Pages written
+buffer_page_written_index_non_leaf buffer_page_io 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of Index Non-leaf Pages written
+buffer_page_written_index_ibuf_leaf buffer_page_io 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of Insert Buffer Index Leaf Pages written
+buffer_page_written_index_ibuf_non_leaf buffer_page_io 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of Insert Buffer Index Non-Leaf Pages written
+buffer_page_written_undo_log buffer_page_io 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of Undo Log Pages written
+buffer_page_written_index_inode buffer_page_io 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of Index Inode Pages written
+buffer_page_written_ibuf_free_list buffer_page_io 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of Insert Buffer Free List Pages written
+buffer_page_written_ibuf_bitmap buffer_page_io 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of Insert Buffer Bitmap Pages written
+buffer_page_written_system_page buffer_page_io 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of System Pages written
+buffer_page_written_trx_system buffer_page_io 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of Transaction System Pages written
+buffer_page_written_fsp_hdr buffer_page_io 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of File Space Header Pages written
+buffer_page_written_xdes buffer_page_io 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of Extent Descriptor Pages written
+buffer_page_written_blob buffer_page_io 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of Uncompressed BLOB Pages written
+buffer_page_written_zblob buffer_page_io 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of First Compressed BLOB Pages written
+buffer_page_written_zblob2 buffer_page_io 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of Subsequent Compressed BLOB Pages written
+buffer_page_written_other buffer_page_io 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of other/unknown (old version InnoDB) Pages written
+os_data_reads os 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of reads initiated (innodb_data_reads)
+os_data_writes os 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of writes initiated (innodb_data_writes)
+os_data_fsyncs os 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of fsync() calls (innodb_data_fsyncs)
+os_pending_reads os 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of reads pending
+os_pending_writes os 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of writes pending
+os_log_bytes_written os 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Bytes of log written (innodb_os_log_written)
+os_log_fsyncs os 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of fsync log writes (innodb_os_log_fsyncs)
+os_log_pending_fsyncs os 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of pending fsync write (innodb_os_log_pending_fsyncs)
+os_log_pending_writes os 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of pending log file writes (innodb_os_log_pending_writes)
+trx_rw_commits transaction 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of read-write transactions committed
+trx_ro_commits transaction 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of read-only transactions committed
+trx_nl_ro_commits transaction 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of non-locking auto-commit read-only transactions committed
+trx_commits_insert_update transaction 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of transactions committed with inserts and updates
+trx_rollbacks transaction 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of transactions rolled back
+trx_rollbacks_savepoint transaction 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of transactions rolled back to savepoint
+trx_active_transactions transaction 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of active transactions
+trx_rseg_history_len transaction 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 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 0 counter Number of undo slots used
+trx_undo_slots_cached transaction 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of undo slots cached
+trx_rseg_current_size transaction 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 value Current rollback segment size in pages
+purge_del_mark_records purge 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of delete-marked rows purged
+purge_upd_exist_or_extern_records purge 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of purges on updates of existing records and updates on delete marked record with externally stored field
+purge_invoked purge 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of times purge was invoked
+purge_undo_log_pages purge 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of undo log pages handled by the purge
+purge_dml_delay_usec purge 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 value Microseconds DML to be delayed due to purge lagging
+purge_stop_count purge 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 value Number of times purge was stopped
+purge_resume_count purge 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 value Number of times purge was resumed
+log_checkpoints recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of checkpoints
+log_lsn_last_flush recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 value LSN of Last flush
+log_lsn_last_checkpoint recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 value LSN at last checkpoint
+log_lsn_current recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 value Current LSN value
+log_lsn_checkpoint_age recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 value Current LSN value minus LSN at last checkpoint
+log_lsn_buf_pool_oldest recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 value The oldest modified block LSN in the buffer pool
+log_max_modified_age_async recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 value Maximum LSN difference; when exceeded, start asynchronous preflush
+log_pending_log_flushes recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 value Pending log flushes
+log_pending_checkpoint_writes recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 value Pending checkpoints
+log_num_log_io recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 value Number of log I/Os
+log_waits recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of log waits due to small log buffer (innodb_log_waits)
+log_write_requests recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of log write requests (innodb_log_write_requests)
+log_writes recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of log writes (innodb_log_writes)
+log_padded recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Bytes of log padded for log write ahead
+compress_pages_compressed compression 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of pages compressed
+compress_pages_decompressed compression 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of pages decompressed
+compression_pad_increments compression 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of times padding is incremented to avoid compression failures
+compression_pad_decrements compression 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of times padding is decremented due to good compressibility
+compress_saved compression 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of bytes saved by page compression
+compress_pages_page_compressed compression 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of pages compressed by page compression
+compress_page_compressed_trim_op compression 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of TRIM operation performed by page compression
+compress_pages_page_decompressed compression 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of pages decompressed by page compression
+compress_pages_page_compression_error compression 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of page compression errors
+compress_pages_encrypted compression 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of pages encrypted
+compress_pages_decrypted compression 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of pages decrypted
+index_page_splits index 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of index page splits
+index_page_merge_attempts index 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of index page merge attempts
+index_page_merge_successful index 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of successful index page merges
+index_page_reorg_attempts index 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of index page reorganization attempts
+index_page_reorg_successful index 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of successful index page reorganizations
+index_page_discards index 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of index pages discarded
+adaptive_hash_searches adaptive_hash_index 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of successful searches using Adaptive Hash Index
+adaptive_hash_searches_btree adaptive_hash_index 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of searches using B-tree on an index search
+adaptive_hash_pages_added adaptive_hash_index 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of index pages on which the Adaptive Hash Index is built
+adaptive_hash_pages_removed adaptive_hash_index 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of index pages whose corresponding Adaptive Hash Index entries were removed
+adaptive_hash_rows_added adaptive_hash_index 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of Adaptive Hash Index rows added
+adaptive_hash_rows_removed adaptive_hash_index 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of Adaptive Hash Index rows removed
+adaptive_hash_rows_deleted_no_hash_entry adaptive_hash_index 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of rows deleted that did not have corresponding Adaptive Hash Index entries
+adaptive_hash_rows_updated adaptive_hash_index 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of Adaptive Hash Index rows updated
+file_num_open_files file_system 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 value Number of files currently open (innodb_num_open_files)
+ibuf_merges_insert change_buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of inserted records merged by change buffering
+ibuf_merges_delete_mark change_buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of deleted records merged by change buffering
+ibuf_merges_delete change_buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of purge records merged by change buffering
+ibuf_merges_discard_insert change_buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of insert merged operations discarded
+ibuf_merges_discard_delete_mark change_buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of deleted merged operations discarded
+ibuf_merges_discard_delete change_buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of purge merged operations discarded
+ibuf_merges change_buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of change buffer merges
+ibuf_size change_buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Change buffer size in pages
+innodb_master_thread_sleeps server 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of times (seconds) master thread sleeps
+innodb_activity_count server 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Current server activity count
+innodb_master_active_loops server 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of times master thread performs its tasks when server is active
+innodb_master_idle_loops server 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of times master thread performs its tasks when server is idle
+innodb_background_drop_table_usec server 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Time (in microseconds) spent to process drop table list
+innodb_log_flush_usec server 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Time (in microseconds) spent to flush log records
+innodb_dict_lru_usec server 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Time (in microseconds) spent to process DICT LRU list
+innodb_dict_lru_count_active server 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of tables evicted from DICT LRU list in the active loop
+innodb_dict_lru_count_idle server 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of tables evicted from DICT LRU list in the idle loop
+innodb_dblwr_writes server 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of doublewrite operations that have been performed (innodb_dblwr_writes)
+innodb_dblwr_pages_written server 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of pages that have been written for doublewrite operations (innodb_dblwr_pages_written)
+innodb_page_size server 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 value InnoDB page size in bytes (innodb_page_size)
+innodb_rwlock_s_spin_waits server 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of rwlock spin waits due to shared latch request
+innodb_rwlock_x_spin_waits server 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of rwlock spin waits due to exclusive latch request
+innodb_rwlock_sx_spin_waits server 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of rwlock spin waits due to sx latch request
+innodb_rwlock_s_spin_rounds server 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of rwlock spin loop rounds due to shared latch request
+innodb_rwlock_x_spin_rounds server 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of rwlock spin loop rounds due to exclusive latch request
+innodb_rwlock_sx_spin_rounds server 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of rwlock spin loop rounds due to sx latch request
+innodb_rwlock_s_os_waits server 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of OS waits due to shared latch request
+innodb_rwlock_x_os_waits server 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of OS waits due to exclusive latch request
+innodb_rwlock_sx_os_waits server 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of OS waits due to sx latch request
+dml_reads dml 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of rows read
+dml_inserts dml 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of rows inserted
+dml_deletes dml 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of rows deleted
+dml_updates dml 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of rows updated
+dml_system_reads dml 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of system rows read
+dml_system_inserts dml 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of system rows inserted
+dml_system_deletes dml 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of system rows deleted
+dml_system_updates dml 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of system rows updated
+ddl_background_drop_indexes ddl 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of indexes waiting to be dropped after failed index creation
+ddl_background_drop_tables ddl 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of tables in background drop table list
+ddl_online_create_index ddl 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of indexes being created online
+ddl_pending_alter_table ddl 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of ALTER TABLE, CREATE INDEX, DROP INDEX in progress
+ddl_sort_file_alter_table ddl 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of sort files created during alter table
+ddl_log_file_alter_table ddl 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of log files created during alter table
+icp_attempts icp 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of attempts for index push-down condition checks
+icp_no_match icp 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Index push-down condition does not match
+icp_out_of_range icp 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Index push-down condition out of range
+icp_match icp 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Index push-down condition matches
select * from information_schema.innodb_ft_default_stopword;
value
a
@@ -382,7 +366,7 @@ ID FOR_COL_NAME REF_COL_NAME POS
Warnings:
Warning 1012 InnoDB: SELECTing from INFORMATION_SCHEMA.innodb_sys_foreign_cols but the InnoDB storage engine is not installed
select * from information_schema.innodb_sys_tablespaces;
-SPACE NAME FLAG ROW_FORMAT PAGE_SIZE ZIP_PAGE_SIZE SPACE_TYPE FS_BLOCK_SIZE FILE_SIZE ALLOCATED_SIZE
+SPACE NAME FLAG ROW_FORMAT PAGE_SIZE ZIP_PAGE_SIZE FS_BLOCK_SIZE FILE_SIZE ALLOCATED_SIZE
Warnings:
Warning 1012 InnoDB: SELECTing from INFORMATION_SCHEMA.innodb_sys_tablespaces but the InnoDB storage engine is not installed
select * from information_schema.innodb_sys_datafiles;
@@ -394,10 +378,6 @@ select * from information_schema.innodb_tablespaces_encryption;
SPACE NAME ENCRYPTION_SCHEME KEYSERVER_REQUESTS MIN_KEY_VERSION CURRENT_KEY_VERSION KEY_ROTATION_PAGE_NUMBER KEY_ROTATION_MAX_PAGE_NUMBER CURRENT_KEY_ID ROTATING_OR_FLUSHING
Warnings:
Warning 1012 InnoDB: SELECTing from INFORMATION_SCHEMA.innodb_tablespaces_encryption but the InnoDB storage engine is not installed
-select * from information_schema.innodb_tablespaces_scrubbing;
-SPACE NAME COMPRESSED LAST_SCRUB_COMPLETED CURRENT_SCRUB_STARTED CURRENT_SCRUB_ACTIVE_THREADS CURRENT_SCRUB_PAGE_NUMBER CURRENT_SCRUB_MAX_PAGE_NUMBER ON_SSD
-Warnings:
-Warning 1012 InnoDB: SELECTing from INFORMATION_SCHEMA.innodb_tablespaces_scrubbing but the InnoDB storage engine is not installed
select * from information_schema.innodb_mutexes;
NAME CREATE_FILE CREATE_LINE OS_WAITS
Warnings:
diff --git a/mysql-test/suite/innodb/r/innodb_status_variables.result b/mysql-test/suite/innodb/r/innodb_status_variables.result
new file mode 100644
index 00000000000..0eda793621c
--- /dev/null
+++ b/mysql-test/suite/innodb/r/innodb_status_variables.result
@@ -0,0 +1,127 @@
+SELECT variable_name FROM information_schema.global_status
+WHERE variable_name LIKE 'INNODB_%'
+AND variable_name NOT IN
+('INNODB_ADAPTIVE_HASH_HASH_SEARCHES','INNODB_ADAPTIVE_HASH_NON_HASH_SEARCHES',
+'INNODB_MEM_ADAPTIVE_HASH',
+'INNODB_BUFFERED_AIO_SUBMITTED','INNODB_BUFFER_POOL_PAGES_LATCHED');
+variable_name
+INNODB_BACKGROUND_LOG_SYNC
+INNODB_BUFFER_POOL_DUMP_STATUS
+INNODB_BUFFER_POOL_LOAD_STATUS
+INNODB_BUFFER_POOL_RESIZE_STATUS
+INNODB_BUFFER_POOL_LOAD_INCOMPLETE
+INNODB_BUFFER_POOL_PAGES_DATA
+INNODB_BUFFER_POOL_BYTES_DATA
+INNODB_BUFFER_POOL_PAGES_DIRTY
+INNODB_BUFFER_POOL_BYTES_DIRTY
+INNODB_BUFFER_POOL_PAGES_FLUSHED
+INNODB_BUFFER_POOL_PAGES_FREE
+INNODB_BUFFER_POOL_PAGES_MADE_NOT_YOUNG
+INNODB_BUFFER_POOL_PAGES_MADE_YOUNG
+INNODB_BUFFER_POOL_PAGES_MISC
+INNODB_BUFFER_POOL_PAGES_OLD
+INNODB_BUFFER_POOL_PAGES_TOTAL
+INNODB_BUFFER_POOL_PAGES_LRU_FLUSHED
+INNODB_BUFFER_POOL_READ_AHEAD_RND
+INNODB_BUFFER_POOL_READ_AHEAD
+INNODB_BUFFER_POOL_READ_AHEAD_EVICTED
+INNODB_BUFFER_POOL_READ_REQUESTS
+INNODB_BUFFER_POOL_READS
+INNODB_BUFFER_POOL_WAIT_FREE
+INNODB_BUFFER_POOL_WRITE_REQUESTS
+INNODB_CHECKPOINT_AGE
+INNODB_CHECKPOINT_MAX_AGE
+INNODB_DATA_FSYNCS
+INNODB_DATA_PENDING_FSYNCS
+INNODB_DATA_PENDING_READS
+INNODB_DATA_PENDING_WRITES
+INNODB_DATA_READ
+INNODB_DATA_READS
+INNODB_DATA_WRITES
+INNODB_DATA_WRITTEN
+INNODB_DBLWR_PAGES_WRITTEN
+INNODB_DBLWR_WRITES
+INNODB_DEADLOCKS
+INNODB_HISTORY_LIST_LENGTH
+INNODB_IBUF_DISCARDED_DELETE_MARKS
+INNODB_IBUF_DISCARDED_DELETES
+INNODB_IBUF_DISCARDED_INSERTS
+INNODB_IBUF_FREE_LIST
+INNODB_IBUF_MERGED_DELETE_MARKS
+INNODB_IBUF_MERGED_DELETES
+INNODB_IBUF_MERGED_INSERTS
+INNODB_IBUF_MERGES
+INNODB_IBUF_SEGMENT_SIZE
+INNODB_IBUF_SIZE
+INNODB_LOG_WAITS
+INNODB_LOG_WRITE_REQUESTS
+INNODB_LOG_WRITES
+INNODB_LSN_CURRENT
+INNODB_LSN_FLUSHED
+INNODB_LSN_LAST_CHECKPOINT
+INNODB_MASTER_THREAD_ACTIVE_LOOPS
+INNODB_MASTER_THREAD_IDLE_LOOPS
+INNODB_MAX_TRX_ID
+INNODB_MEM_DICTIONARY
+INNODB_OS_LOG_FSYNCS
+INNODB_OS_LOG_PENDING_FSYNCS
+INNODB_OS_LOG_PENDING_WRITES
+INNODB_OS_LOG_WRITTEN
+INNODB_PAGE_SIZE
+INNODB_PAGES_CREATED
+INNODB_PAGES_READ
+INNODB_PAGES_WRITTEN
+INNODB_ROW_LOCK_CURRENT_WAITS
+INNODB_ROW_LOCK_TIME
+INNODB_ROW_LOCK_TIME_AVG
+INNODB_ROW_LOCK_TIME_MAX
+INNODB_ROW_LOCK_WAITS
+INNODB_ROWS_DELETED
+INNODB_ROWS_INSERTED
+INNODB_ROWS_READ
+INNODB_ROWS_UPDATED
+INNODB_SYSTEM_ROWS_DELETED
+INNODB_SYSTEM_ROWS_INSERTED
+INNODB_SYSTEM_ROWS_READ
+INNODB_SYSTEM_ROWS_UPDATED
+INNODB_NUM_OPEN_FILES
+INNODB_TRUNCATED_STATUS_WRITES
+INNODB_AVAILABLE_UNDO_LOGS
+INNODB_UNDO_TRUNCATIONS
+INNODB_PAGE_COMPRESSION_SAVED
+INNODB_NUM_INDEX_PAGES_WRITTEN
+INNODB_NUM_NON_INDEX_PAGES_WRITTEN
+INNODB_NUM_PAGES_PAGE_COMPRESSED
+INNODB_NUM_PAGE_COMPRESSED_TRIM_OP
+INNODB_NUM_PAGES_PAGE_DECOMPRESSED
+INNODB_NUM_PAGES_PAGE_COMPRESSION_ERROR
+INNODB_NUM_PAGES_ENCRYPTED
+INNODB_NUM_PAGES_DECRYPTED
+INNODB_HAVE_LZ4
+INNODB_HAVE_LZO
+INNODB_HAVE_LZMA
+INNODB_HAVE_BZIP2
+INNODB_HAVE_SNAPPY
+INNODB_HAVE_PUNCH_HOLE
+INNODB_DEFRAGMENT_COMPRESSION_FAILURES
+INNODB_DEFRAGMENT_FAILURES
+INNODB_DEFRAGMENT_COUNT
+INNODB_INSTANT_ALTER_COLUMN
+INNODB_ONLINEDDL_ROWLOG_ROWS
+INNODB_ONLINEDDL_ROWLOG_PCT_USED
+INNODB_ONLINEDDL_PCT_PROGRESS
+INNODB_SECONDARY_INDEX_TRIGGERED_CLUSTER_READS
+INNODB_SECONDARY_INDEX_TRIGGERED_CLUSTER_READS_AVOIDED
+INNODB_ENCRYPTION_ROTATION_PAGES_READ_FROM_CACHE
+INNODB_ENCRYPTION_ROTATION_PAGES_READ_FROM_DISK
+INNODB_ENCRYPTION_ROTATION_PAGES_MODIFIED
+INNODB_ENCRYPTION_ROTATION_PAGES_FLUSHED
+INNODB_ENCRYPTION_ROTATION_ESTIMATED_IOPS
+INNODB_ENCRYPTION_KEY_ROTATION_LIST_LENGTH
+INNODB_ENCRYPTION_N_MERGE_BLOCKS_ENCRYPTED
+INNODB_ENCRYPTION_N_MERGE_BLOCKS_DECRYPTED
+INNODB_ENCRYPTION_N_ROWLOG_BLOCKS_ENCRYPTED
+INNODB_ENCRYPTION_N_ROWLOG_BLOCKS_DECRYPTED
+INNODB_ENCRYPTION_N_TEMP_BLOCKS_ENCRYPTED
+INNODB_ENCRYPTION_N_TEMP_BLOCKS_DECRYPTED
+INNODB_ENCRYPTION_NUM_KEY_REQUESTS
diff --git a/mysql-test/suite/innodb/r/innodb_trx_weight.result b/mysql-test/suite/innodb/r/innodb_trx_weight.result
index 195775f74c8..23c5b0cc2f7 100644
--- a/mysql-test/suite/innodb/r/innodb_trx_weight.result
+++ b/mysql-test/suite/innodb/r/innodb_trx_weight.result
@@ -1 +1 @@
-SET storage_engine=InnoDB;
+SET default_storage_engine=InnoDB;
diff --git a/mysql-test/suite/innodb/r/innodb_wl6326.result b/mysql-test/suite/innodb/r/innodb_wl6326.result
index 85908ca1773..fcd58aedafe 100644
--- a/mysql-test/suite/innodb/r/innodb_wl6326.result
+++ b/mysql-test/suite/innodb/r/innodb_wl6326.result
@@ -30,6 +30,7 @@ SELECT CLUST_INDEX_SIZE FROM information_schema.INNODB_SYS_TABLESTATS WHERE NAME
CLUST_INDEX_SIZE
1
SET GLOBAL innodb_limit_optimistic_insert_debug = 7;
+BEGIN;
INSERT INTO t1 (a00) VALUES ('aa');
INSERT INTO t1 (a00) VALUES ('ab');
INSERT INTO t1 (a00) VALUES ('ac');
@@ -38,6 +39,7 @@ INSERT INTO t1 (a00) VALUES ('ae');
INSERT INTO t1 (a00) VALUES ('af');
INSERT INTO t1 (a00) VALUES ('ag');
INSERT INTO t1 (a00) VALUES ('ah');
+COMMIT;
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
@@ -45,9 +47,11 @@ test.t1 analyze status OK
SELECT CLUST_INDEX_SIZE FROM information_schema.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1';
CLUST_INDEX_SIZE
3
+BEGIN;
INSERT INTO t1 (a00) VALUES ('ai');
INSERT INTO t1 (a00) VALUES ('aj');
INSERT INTO t1 (a00) VALUES ('ak');
+COMMIT;
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
@@ -55,6 +59,7 @@ test.t1 analyze status OK
SELECT CLUST_INDEX_SIZE FROM information_schema.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1';
CLUST_INDEX_SIZE
4
+BEGIN;
INSERT INTO t1 (a00) VALUES ('al');
INSERT INTO t1 (a00) VALUES ('am');
INSERT INTO t1 (a00) VALUES ('an');
@@ -62,6 +67,7 @@ INSERT INTO t1 (a00) VALUES ('ao');
INSERT INTO t1 (a00) VALUES ('ap');
INSERT INTO t1 (a00) VALUES ('aq');
INSERT INTO t1 (a00) VALUES ('ar');
+COMMIT;
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
@@ -69,6 +75,7 @@ test.t1 analyze status OK
SELECT CLUST_INDEX_SIZE FROM information_schema.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1';
CLUST_INDEX_SIZE
5
+BEGIN;
INSERT INTO t1 (a00) VALUES ('as');
INSERT INTO t1 (a00) VALUES ('at');
INSERT INTO t1 (a00) VALUES ('au');
@@ -76,6 +83,7 @@ INSERT INTO t1 (a00) VALUES ('av');
INSERT INTO t1 (a00) VALUES ('aw');
INSERT INTO t1 (a00) VALUES ('ax');
INSERT INTO t1 (a00) VALUES ('ay');
+COMMIT;
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
@@ -83,6 +91,7 @@ test.t1 analyze status OK
SELECT CLUST_INDEX_SIZE FROM information_schema.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1';
CLUST_INDEX_SIZE
6
+BEGIN;
INSERT INTO t1 (a00) VALUES ('az');
INSERT INTO t1 (a00) VALUES ('ba');
INSERT INTO t1 (a00) VALUES ('bb');
@@ -90,6 +99,7 @@ INSERT INTO t1 (a00) VALUES ('bc');
INSERT INTO t1 (a00) VALUES ('bd');
INSERT INTO t1 (a00) VALUES ('be');
INSERT INTO t1 (a00) VALUES ('bf');
+COMMIT;
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
@@ -97,6 +107,7 @@ test.t1 analyze status OK
SELECT CLUST_INDEX_SIZE FROM information_schema.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1';
CLUST_INDEX_SIZE
7
+BEGIN;
INSERT INTO t1 (a00) VALUES ('bg');
INSERT INTO t1 (a00) VALUES ('bh');
INSERT INTO t1 (a00) VALUES ('bi');
@@ -104,6 +115,7 @@ INSERT INTO t1 (a00) VALUES ('bj');
INSERT INTO t1 (a00) VALUES ('bk');
INSERT INTO t1 (a00) VALUES ('bl');
INSERT INTO t1 (a00) VALUES ('bm');
+COMMIT;
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
@@ -111,6 +123,7 @@ test.t1 analyze status OK
SELECT CLUST_INDEX_SIZE FROM information_schema.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1';
CLUST_INDEX_SIZE
8
+BEGIN;
INSERT INTO t1 (a00) VALUES ('bn');
INSERT INTO t1 (a00) VALUES ('bo');
INSERT INTO t1 (a00) VALUES ('bp');
@@ -118,6 +131,7 @@ INSERT INTO t1 (a00) VALUES ('bq');
INSERT INTO t1 (a00) VALUES ('br');
INSERT INTO t1 (a00) VALUES ('bs');
INSERT INTO t1 (a00) VALUES ('bt');
+COMMIT;
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
@@ -125,6 +139,7 @@ test.t1 analyze status OK
SELECT CLUST_INDEX_SIZE FROM information_schema.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1';
CLUST_INDEX_SIZE
11
+BEGIN;
INSERT INTO t1 (a00) VALUES ('bu');
INSERT INTO t1 (a00) VALUES ('bv');
INSERT INTO t1 (a00) VALUES ('bw');
@@ -146,6 +161,7 @@ INSERT INTO t1 (a00) VALUES ('cl');
INSERT INTO t1 (a00) VALUES ('cm');
INSERT INTO t1 (a00) VALUES ('cn');
INSERT INTO t1 (a00) VALUES ('co');
+COMMIT;
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
@@ -153,6 +169,7 @@ test.t1 analyze status OK
SELECT CLUST_INDEX_SIZE FROM information_schema.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1';
CLUST_INDEX_SIZE
15
+BEGIN;
INSERT INTO t1 (a00) VALUES ('cp');
INSERT INTO t1 (a00) VALUES ('cq');
INSERT INTO t1 (a00) VALUES ('cr');
@@ -202,6 +219,7 @@ INSERT INTO t1 (a00) VALUES ('ei');
INSERT INTO t1 (a00) VALUES ('ej');
INSERT INTO t1 (a00) VALUES ('ek');
INSERT INTO t1 (a00) VALUES ('el');
+COMMIT;
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
@@ -209,6 +227,7 @@ test.t1 analyze status OK
SELECT CLUST_INDEX_SIZE FROM information_schema.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1';
CLUST_INDEX_SIZE
23
+BEGIN;
INSERT INTO t1 (a00) VALUES ('em');
INSERT INTO t1 (a00) VALUES ('en');
INSERT INTO t1 (a00) VALUES ('eo');
@@ -257,6 +276,7 @@ INSERT INTO t1 (a00) VALUES ('ge');
INSERT INTO t1 (a00) VALUES ('gf');
INSERT INTO t1 (a00) VALUES ('gg');
INSERT INTO t1 (a00) VALUES ('gh');
+COMMIT;
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
diff --git a/mysql-test/suite/innodb/r/innodb_wl6326_big.result b/mysql-test/suite/innodb/r/innodb_wl6326_big.result
deleted file mode 100644
index 3ff6d0d0b5c..00000000000
--- a/mysql-test/suite/innodb/r/innodb_wl6326_big.result
+++ /dev/null
@@ -1,449 +0,0 @@
-CREATE SCHEMA my_schema;
-USE my_schema;
-CREATE FUNCTION f_thread_id (i INT) RETURNS CHAR(4) DETERMINISTIC
-RETURN CONCAT(LPAD(CAST(i AS CHAR),3,'_'),'_') ;
-SELECT CONCAT('->', f_thread_id( 1), '<-');
-CONCAT('->', f_thread_id( 1), '<-')
-->__1_<-
-SELECT CONCAT('->', f_thread_id(12), '<-');
-CONCAT('->', f_thread_id(12), '<-')
-->_12_<-
-SET @extra_int = 1;
-SET @extra_string = f_thread_id(@extra_int);
-SELECT @extra_int , @extra_string;
-@extra_int @extra_string
-1 __1_
-CREATE FUNCTION f_col_int1 (i INT) RETURNS INT(20) DETERMINISTIC
-RETURN i * 1000 + @extra_int ;
-SELECT f_col_int1(my_col) AS my_result
-FROM (SELECT 1 AS my_col UNION SELECT 12 UNION SELECT 123
-UNION SELECT 1234 UNION SELECT 12345) AS tx;
-my_result
-1001
-12001
-123001
-1234001
-12345001
-CREATE FUNCTION f_col_int2 (i INT) RETURNS INT(20) DETERMINISTIC
-RETURN @extra_int * 10000000 + i ;
-SELECT f_col_int2(my_col) AS my_result
-FROM (SELECT 1 AS my_col UNION SELECT 12 UNION SELECT 123
-UNION SELECT 1234 UNION SELECT 12345) AS tx;
-my_result
-10000001
-10000012
-10000123
-10001234
-10012345
-CREATE FUNCTION f_col_int3 (i INT) RETURNS INT(20) DETERMINISTIC
-RETURN @extra_int ;
-SELECT f_col_int3(my_col) AS my_result
-FROM (SELECT 1 AS my_col UNION SELECT 12 UNION SELECT 123
-UNION SELECT 1234 UNION SELECT 12345) AS tx;
-my_result
-1
-1
-1
-1
-1
-CREATE FUNCTION f_col_blob (i INT) RETURNS BLOB DETERMINISTIC
-RETURN RPAD(@extra_string,(@@innodb_page_size / 2 ) + 1,'a');
-SELECT CONCAT('->', SUBSTR(f_col_blob(my_col) FROM 1 FOR 10),
-'<-.....->', SUBSTR(f_col_blob(my_col) FROM -10 FOR 10), '<-') AS my_result
-FROM (SELECT 1 AS my_col UNION SELECT 12 UNION SELECT 123
-UNION SELECT 1234 UNION SELECT 12345) AS tx;
-my_result
-->__1_aaaaaa<-.....->aaaaaaaaaa<-
-->__1_aaaaaa<-.....->aaaaaaaaaa<-
-->__1_aaaaaa<-.....->aaaaaaaaaa<-
-->__1_aaaaaa<-.....->aaaaaaaaaa<-
-->__1_aaaaaa<-.....->aaaaaaaaaa<-
-CREATE FUNCTION f_col_char0 (i INT) RETURNS CHAR(255) DETERMINISTIC
-RETURN LPAD(CAST(i AS CHAR),255,' ');
-SELECT CONCAT('->', f_col_char0(my_col), '<-') AS my_result
-FROM (SELECT 1 AS my_col UNION SELECT 12 UNION SELECT 123
-UNION SELECT 1234 UNION SELECT 12345) AS tx;
-my_result
--> 1<-
--> 12<-
--> 123<-
--> 1234<-
--> 12345<-
-CREATE FUNCTION f_col_char1 (i INT) RETURNS CHAR(26) DETERMINISTIC
-RETURN
-CONCAT('B',
-LPAD(SUBSTR(CAST(i AS CHAR),1,(LENGTH(CAST(i AS CHAR)) DIV 2)),10,' '),
-@extra_string,
-RPAD(SUBSTR(CAST(i AS CHAR), -((LENGTH(CAST(i AS CHAR)) + 1) DIV 2)),10,' '),
-'E') ;
-SELECT CONCAT('->', f_col_char1(my_col), '<-') AS my_result
-FROM (SELECT 1 AS my_col UNION SELECT 12 UNION SELECT 123
-UNION SELECT 1234 UNION SELECT 12345) AS tx;
-my_result
-->B __1_1 E<-
-->B 1__1_2 E<-
-->B 1__1_23 E<-
-->B 12__1_34 E<-
-->B 12__1_345 E<-
-CREATE FUNCTION f_col_char2 (i INT) RETURNS CHAR(26) DETERMINISTIC
-RETURN
-CONCAT('B',
-RPAD(SUBSTR(CAST(i AS CHAR),1,(LENGTH(CAST(i AS CHAR)) DIV 2)),10,' '),
-@extra_string,
-LPAD(SUBSTR(CAST(i AS CHAR), -((LENGTH(CAST(i AS CHAR)) + 1) DIV 2)),10,' '),
-'E');
-SELECT CONCAT('->', f_col_char2(my_col), '<-') AS my_result
-FROM (SELECT 1 AS my_col UNION SELECT 12 UNION SELECT 123
-UNION SELECT 1234 UNION SELECT 12345) AS tx;
-my_result
-->B __1_ 1E<-
-->B1 __1_ 2E<-
-->B1 __1_ 23E<-
-->B12 __1_ 34E<-
-->B12 __1_ 345E<-
-CREATE FUNCTION f_col_char3 (i INT) RETURNS CHAR(26) DETERMINISTIC
-RETURN
-CONCAT('B',@extra_string,LPAD(CAST(i AS CHAR),20,' '),'E');
-SELECT CONCAT('->', f_col_char3(my_col), '<-') AS my_result
-FROM (SELECT 1 AS my_col UNION SELECT 12 UNION SELECT 123
-UNION SELECT 1234 UNION SELECT 12345) AS tx;
-my_result
-->B__1_ 1E<-
-->B__1_ 12E<-
-->B__1_ 123E<-
-->B__1_ 1234E<-
-->B__1_ 12345E<-
-CREATE FUNCTION f_col_char4 (i INT) RETURNS CHAR(26) DETERMINISTIC
-RETURN
-CONCAT('B',RPAD(CAST(i AS CHAR),20,' '),@extra_string,'E');
-SELECT CONCAT('->', f_col_char4(my_col), '<-') AS my_result
-FROM (SELECT 1 AS my_col UNION SELECT 12 UNION SELECT 123
-UNION SELECT 1234 UNION SELECT 12345) AS tx;
-my_result
-->B1 __1_E<-
-->B12 __1_E<-
-->B123 __1_E<-
-->B1234 __1_E<-
-->B12345 __1_E<-
-CREATE TABLE my_metrics LIKE information_schema.innodb_metrics;
-ALTER TABLE my_metrics ADD COLUMN phase ENUM('after', 'before'),
-DROP COLUMN SUBSYSTEM, DROP COLUMN TYPE, DROP COLUMN COMMENT,
-ADD PRIMARY KEY (NAME,phase);
-CREATE TABLE t1 (
-col_int0 BIGINT,
-col_int1 BIGINT,
-col_int2 BIGINT,
-col_int3 BIGINT,
-col_blob BLOB,
-col_char0 VARCHAR(255),
-col_char1 VARCHAR(30),
-col_char2 VARCHAR(30),
-col_char3 VARCHAR(30),
-col_char4 VARCHAR(30)
-) ENGINE = InnoDB;
-ALTER TABLE t1 ADD UNIQUE KEY uidx_col_int0 (col_int0),
-ADD UNIQUE KEY uidx1 (col_int1, col_char0),
-ADD UNIQUE KEY uidx2 (col_int2, col_char0, col_int1),
-ADD UNIQUE KEY uidx3 (col_int3, col_int2, col_char0),
-ADD UNIQUE KEY uidx4 (col_char1, col_char0),
-ADD UNIQUE KEY uidx5 (col_char2, col_char0, col_char1),
-ADD UNIQUE KEY uidx6 (col_char3, col_char2, col_char0),
-ADD UNIQUE KEY uidx7 (col_int1, col_int2, col_int3, col_char4,
-col_char1, col_char2, col_char3, col_char0),
-ADD KEY idx8 (col_blob(10), col_char4);
-CREATE PROCEDURE proc_fill_t1 (max_row_count INT, load_unit INT)
-BEGIN
-DECLARE my_count INTEGER DEFAULT 0;
-DECLARE max_load_count INTEGER DEFAULT 0;
-DROP TABLE IF EXISTS t0;
-CREATE TEMPORARY TABLE t0 (col_int0 BIGINT, PRIMARY KEY(col_int0));
-WHILE (my_count < load_unit ) DO
-SET my_count = my_count + 1;
-INSERT INTO t0 SET col_int0 = my_count;
-END WHILE;
-SET max_load_count = (SELECT (max_row_count DIV load_unit) + 1 );
-SELECT COUNT(col_int0) INTO @val FROM t1;
-SET my_count = 0;
-REPEAT
-INSERT INTO t1 (col_int0, col_int1, col_int2, col_int3, col_blob,
-col_char0, col_char1, col_char2,col_char3,col_char4)
-SELECT col_int0 + @val,
-f_col_int1(col_int0 + @val),
-f_col_int2(col_int0 + @val),
-f_col_int3(col_int0 + @val),
-f_col_blob(col_int0 + @val),
-f_col_char0(col_int0 + @val),
-f_col_char1(col_int0 + @val),
-f_col_char2(col_int0 + @val),
-f_col_char3(col_int0 + @val),
-f_col_char4(col_int0 + @val)
-FROM t0;
-COMMIT;
-SELECT MAX(col_int0) INTO @val FROM t1;
-SET my_count = my_count + 1;
-UNTIL( my_count > max_load_count OR @val >= max_row_count )
-END REPEAT;
-DROP TEMPORARY TABLE t0;
-END|
-CREATE PROCEDURE proc_dml (max_duration INT, t1_stripe_half INT)
-BEGIN
-DECLARE aux INTEGER DEFAULT 0;
-DECLARE start_time INT;
-DECLARE CONTINUE HANDLER FOR SQLEXCEPTION, SQLWARNING, NOT FOUND BEGIN END;
-SET @extra_int = CONNECTION_ID();
-SET @extra_string = f_thread_id(@extra_int);
-SELECT ROUND(MAX(col_int0) / 2 ) INTO @t1_half FROM t1;
-# The user lock 'Blocker' should be already set by some other session S1.
-# S1 starts the race by releasing that lock.
-# Wait till the lock is released and the lock can be obtained.
-# In order to prevent endless waiting in case of non foreseen problems
-# limit the timespan to 30 seconds.
-SELECT GET_LOCK('Blocker', 30) INTO @aux;
-# Release the lock immediate so that the other "runner" sessions start too.
-SELECT RELEASE_LOCK('Blocker') INTO @aux;
-SET start_time = UNIX_TIMESTAMP();
-WHILE (UNIX_TIMESTAMP() - start_time < max_duration) DO
-SET @aux = @t1_half - t1_stripe_half + ROUND(RAND() * t1_stripe_half * 2);
-UPDATE t1 SET
-col_int1 = f_col_int1(col_int0),
-col_int2 = f_col_int2(col_int0),
-col_int3 = f_col_int3(col_int0),
-col_blob = f_col_blob(col_int0),
-col_char0 = f_col_char0(col_int0),
-col_char1 = f_col_char1(col_int0),
-col_char2 = f_col_char2(col_int0),
-col_char3 = f_col_char3(col_int0),
-col_char4 = f_col_char4(col_int0)
-WHERE col_int0 = @aux;
-COMMIT;
-END WHILE;
-END|
-SET GLOBAL innodb_monitor_disable = "innodb_rwlock_sx_%";
-SET @pre_reset_ts = NOW();
-SET GLOBAL innodb_monitor_reset = "innodb_rwlock_sx_%";
-SET @pre_enable_ts = NOW();
-SET GLOBAL innodb_monitor_enable = "innodb_rwlock_sx_%";
-SET @pre_collect_ts = NOW();
-DELETE FROM my_metrics;
-INSERT INTO my_metrics
-SELECT NAME, COUNT, MAX_COUNT, MIN_COUNT, AVG_COUNT,
-COUNT_RESET, MAX_COUNT_RESET, MIN_COUNT_RESET, AVG_COUNT_RESET,
-TIME_ENABLED, TIME_DISABLED, TIME_ELAPSED, TIME_RESET,
-STATUS, 'before'
-FROM information_schema.innodb_metrics
-WHERE NAME LIKE 'innodb_rwlock_sx_%';
-# TC-01 There are exact three entries "innodb_rwlock_sx_%" with the
-# with the name which follow in innodb_metrics.
-# pass
-SELECT COUNT(*) INTO @sx_count FROM my_metrics;
-# TC-02 Counting is now enabled. ALL = @sx_count entries show that.
-# pass
-# TC-03 @pre_reset_ts < TIME_RESET. ALL = @sx_count entries show that.
-# pass
-# TC-04 @pre_enable_ts < TIME_ENABLED. ALL = @sx_count entries show that.
-# pass
-# TC-05 TIME_RESET < TIME_ENABLED AND TIME_ENABLED < @pre_collect_ts
-# AND TIME_ELAPSED > 0. ALL = @sx_count entries show that.
-# pass
-# TC-06 COUNT_RESET = MAX_COUNT_RESET. ALL = @sx_count entries show that.
-# pass
-SET GLOBAL innodb_monitor_reset = "innodb_rwlock_sx_%";
-SHOW ENGINE INNODB STATUS;
-DELETE FROM my_metrics;
-INSERT INTO my_metrics
-SELECT NAME, COUNT, MAX_COUNT, MIN_COUNT, AVG_COUNT,
-COUNT_RESET, MAX_COUNT_RESET, MIN_COUNT_RESET, AVG_COUNT_RESET,
-TIME_ENABLED, TIME_DISABLED, TIME_ELAPSED, TIME_RESET,
-STATUS, 'before'
-FROM information_schema.innodb_metrics
-WHERE NAME LIKE 'innodb_rwlock_sx_%';
-SET @extra_string = '__0_';
-SET @extra_int = 0;
-# TC-07 One session inserts some significant amount of rows into t1.
-# The system MUST survive that.
-SET @max_row_count = <max_row_count>;
-SET @load_unit = <load_unit>;
-SET @start_time = UNIX_TIMESTAMP();
-SET AUTOCOMMIT = OFF;
-CALL proc_fill_t1 (@max_row_count, @load_unit);
-# pass
-SET AUTOCOMMIT = ON;
-SELECT col_int0 INTO @t1_half FROM t1
-WHERE col_int0 >= (@val DIV 2) ORDER BY col_int0 LIMIT 1;
-SHOW ENGINE INNODB STATUS;
-SELECT col_int0, col_int1, col_int2, col_int3,
-CONCAT('->', SUBSTR(col_blob FROM 1 FOR 10),
-'<-.....->', SUBSTR(col_blob FROM -10 FOR 10), '<-') AS col_blobx,
-CONCAT('->',col_char0,'<-') AS col_char0x,
-CONCAT('->',col_char1,'<-') AS col_char1x,
-CONCAT('->',col_char2,'<-') AS col_char2x,
-CONCAT('->',col_char3,'<-') AS col_char3x,
-CONCAT('->',col_char4,'<-') AS col_char4x
-FROM t1 WHERE col_int0 between 98 AND 102;
-col_int0 98
-col_int1 98000
-col_int2 98
-col_int3 0
-col_blobx ->__0_aaaaaa<-.....->aaaaaaaaaa<-
-col_char0x -> 98<-
-col_char1x ->B 9__0_8 E<-
-col_char2x ->B9 __0_ 8E<-
-col_char3x ->B__0_ 98E<-
-col_char4x ->B98 __0_E<-
-col_int0 99
-col_int1 99000
-col_int2 99
-col_int3 0
-col_blobx ->__0_aaaaaa<-.....->aaaaaaaaaa<-
-col_char0x -> 99<-
-col_char1x ->B 9__0_9 E<-
-col_char2x ->B9 __0_ 9E<-
-col_char3x ->B__0_ 99E<-
-col_char4x ->B99 __0_E<-
-col_int0 100
-col_int1 100000
-col_int2 100
-col_int3 0
-col_blobx ->__0_aaaaaa<-.....->aaaaaaaaaa<-
-col_char0x -> 100<-
-col_char1x ->B 1__0_00 E<-
-col_char2x ->B1 __0_ 00E<-
-col_char3x ->B__0_ 100E<-
-col_char4x ->B100 __0_E<-
-col_int0 101
-col_int1 101000
-col_int2 101
-col_int3 0
-col_blobx ->__0_aaaaaa<-.....->aaaaaaaaaa<-
-col_char0x -> 101<-
-col_char1x ->B 1__0_01 E<-
-col_char2x ->B1 __0_ 01E<-
-col_char3x ->B__0_ 101E<-
-col_char4x ->B101 __0_E<-
-col_int0 102
-col_int1 102000
-col_int2 102
-col_int3 0
-col_blobx ->__0_aaaaaa<-.....->aaaaaaaaaa<-
-col_char0x -> 102<-
-col_char1x ->B 1__0_02 E<-
-col_char2x ->B1 __0_ 02E<-
-col_char3x ->B__0_ 102E<-
-col_char4x ->B102 __0_E<-
-# TC-11 Several concurrent sessions perform updates in t1 like mad.
-# The system MUST survive this.
-# Printing of statements is partially suppressed.
-SET @start_time = UNIX_TIMESTAMP();
-SELECT 1 FROM t1 WHERE col_int0 = @t1_half FOR UPDATE;
-1
-1
-SELECT GET_LOCK('Blocker', 1000) ;
-GET_LOCK('Blocker', 1000)
-1
-RELEASE_LOCK('Blocker')
-1
-# pass
-SHOW ENGINE INNODB STATUS;
-# TC-13 One session performs ALTER TABLE t1 ADD KEY ... on the fat table t1.
-# The system MUST survive this.
-SET @start_time = UNIX_TIMESTAMP();
-ALTER TABLE t1 ADD KEY idx_col_char4_col_char0 (col_char4,col_char0);
-SHOW ENGINE INNODB STATUS;
-# pass
-# TC-15 One session performs a fat update on the fat table t1.
-# The system MUST survive this.
-SET @start_time = UNIX_TIMESTAMP();
-SET @extra_int = 13;
-SET @extra_string = f_thread_id(@extra_int);
-UPDATE t1 SET
-col_int1 = f_col_int1(col_int0), col_int2 = f_col_int2(col_int0),
-col_int3 = f_col_int3(col_int0), col_blob = f_col_blob(col_int0),
-col_char0 = f_col_char0(col_int0), col_char1 = f_col_char1(col_int0),
-col_char2 = f_col_char2(col_int0), col_char3 = f_col_char3(col_int0),
-col_char4 = f_col_char4(col_int0)
-WHERE col_int0 BETWEEN @t1_half - 2500 AND @t1_half + 2500;
-COMMIT;
-SHOW ENGINE INNODB STATUS;
-# pass
-INSERT INTO my_metrics
-SELECT NAME, COUNT, MAX_COUNT, MIN_COUNT, AVG_COUNT,
-COUNT_RESET, MAX_COUNT_RESET, MIN_COUNT_RESET, AVG_COUNT_RESET,
-TIME_ENABLED, TIME_DISABLED, TIME_ELAPSED, TIME_RESET,
-STATUS, 'after'
-FROM information_schema.innodb_metrics
-WHERE NAME LIKE 'innodb_rwlock_sx_%';
-# TC-16 The following activities happend after reset in innodb_metrics
-# - Insert some significant amount of rows into t1.
-# - Several concurrent users perform excessive updates in t1.
-# - ALTER TABLE ... ADD KEY <sufficient big enough structure>
-# - One UPDATE statement modifying a huge slice of t1.
-# Any of them causes heavy use of SX lock and therefore COUNT_RESET
-# must have grown for ALL = @sx_count entries.
-# pass
-# TC-09 Heavy activity after reset.
-# COUNT_RESET = MAX_COUNT_RESET for ALL = @sx_count entries
-# needs to stay valid though he counters will have grown.
-# pass
-DELETE FROM my_metrics;
-INSERT INTO my_metrics
-SELECT NAME, COUNT, MAX_COUNT, MIN_COUNT, AVG_COUNT,
-COUNT_RESET, MAX_COUNT_RESET, MIN_COUNT_RESET, AVG_COUNT_RESET,
-TIME_ENABLED, TIME_DISABLED, TIME_ELAPSED, TIME_RESET,
-STATUS, 'before'
-FROM information_schema.innodb_metrics
-WHERE NAME LIKE 'innodb_rwlock_sx_%';
-SET GLOBAL innodb_monitor_reset = "innodb_rwlock_sx_%";
-INSERT INTO my_metrics
-SELECT NAME, COUNT, MAX_COUNT, MIN_COUNT, AVG_COUNT,
-COUNT_RESET, MAX_COUNT_RESET, MIN_COUNT_RESET, AVG_COUNT_RESET,
-TIME_ENABLED, TIME_DISABLED, TIME_ELAPSED, TIME_RESET,
-STATUS, 'after'
-FROM information_schema.innodb_metrics
-WHERE NAME LIKE 'innodb_rwlock_sx_%';
-# TC-08 There was a reset. COUNT_RESET = MAX_COUNT_RESET for ALL
-# = @sx_count entries.
-# pass
-# TC-17 We had heavy activity causing big counters and after that a reset.
-# Reset causes COUNT > COUNT_RESET AND MAX_COUNT > MAX_COUNT_RESET
-# for ALL @sx_count entries.
-# pass
-# TC-18 We had some reset but this must not decrease COUNT or MAX_COUNT
-# after.COUNT >= before.COUNT AND
-# after.MAX_COUNT >= before.MAX_COUNT for ALL @sx_count entries.
-# pass
-# TC-19 We had some reset after heavy activity and this must cause
-# after.COUNT_RESET < before.COUNT_RESET
-# AND after.MAX_COUNT_RESET < before.MAX_COUNT_RESET AND
-# for ALL @sx_count entries.
-# pass
-connection con10;
-disconnect con10;
-connection con9;
-disconnect con9;
-connection con8;
-disconnect con8;
-connection con7;
-disconnect con7;
-connection con6;
-disconnect con6;
-connection con5;
-disconnect con5;
-connection con4;
-disconnect con4;
-connection con3;
-disconnect con3;
-connection con2;
-disconnect con2;
-connection con1;
-disconnect con1;
-connection default;
-USE test;
-DROP SCHEMA my_schema;
-SET GLOBAL innodb_monitor_disable = all;
-SET GLOBAL innodb_monitor_reset_all = all;
-SET GLOBAL innodb_monitor_enable = default;
-SET GLOBAL innodb_monitor_disable = default;
-SET GLOBAL innodb_monitor_reset = default;
-SET GLOBAL innodb_monitor_reset_all = default;
-SET GLOBAL innodb_monitor_disable = "innodb_rwlock_sx_%";
-SET GLOBAL innodb_monitor_reset = "innodb_rwlock_sx_%";
diff --git a/mysql-test/suite/innodb/r/instant_alter,4k.rdiff b/mysql-test/suite/innodb/r/instant_alter,4k.rdiff
index 83420bf4593..14ef4971267 100644
--- a/mysql-test/suite/innodb/r/instant_alter,4k.rdiff
+++ b/mysql-test/suite/innodb/r/instant_alter,4k.rdiff
@@ -318,8 +318,8 @@
FROM information_schema.global_status
WHERE variable_name = 'innodb_instant_alter_column';
instants
--206
-+208
+-209
++211
SET GLOBAL innodb_purge_rseg_truncate_frequency= @saved_frequency;
SET GLOBAL innodb_instant_alter_column_allowed = @saved_allowance;
#
diff --git a/mysql-test/suite/innodb/r/instant_alter.result b/mysql-test/suite/innodb/r/instant_alter.result
index 25665435ad8..df3be4b18be 100644
--- a/mysql-test/suite/innodb/r/instant_alter.result
+++ b/mysql-test/suite/innodb/r/instant_alter.result
@@ -979,6 +979,18 @@ DROP TABLE t1;
CREATE TABLE t1 (a INT, b INT, PRIMARY KEY(a,b)) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
ALTER TABLE t1 MODIFY b INT FIRST;
DROP TABLE t1;
+CREATE TABLE t1 (pk INT PRIMARY KEY) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
+INSERT INTO t1 SET pk=1;
+ALTER TABLE t1 ADD COLUMN b INT;
+BEGIN;
+UPDATE t1 SET pk=2;
+UPDATE t1 SET pk=1;
+connection analyze;
+SELECT * FROM t1;
+pk b
+1 NULL
+connection default;
+DROP TABLE t1;
CREATE TABLE t1
(id INT PRIMARY KEY, c2 INT UNIQUE,
c3 POINT NOT NULL DEFAULT ST_GeomFromText('POINT(3 4)'),
@@ -1901,6 +1913,18 @@ DROP TABLE t1;
CREATE TABLE t1 (a INT, b INT, PRIMARY KEY(a,b)) ENGINE=InnoDB ROW_FORMAT=COMPACT;
ALTER TABLE t1 MODIFY b INT FIRST;
DROP TABLE t1;
+CREATE TABLE t1 (pk INT PRIMARY KEY) ENGINE=InnoDB ROW_FORMAT=COMPACT;
+INSERT INTO t1 SET pk=1;
+ALTER TABLE t1 ADD COLUMN b INT;
+BEGIN;
+UPDATE t1 SET pk=2;
+UPDATE t1 SET pk=1;
+connection analyze;
+SELECT * FROM t1;
+pk b
+1 NULL
+connection default;
+DROP TABLE t1;
CREATE TABLE t1
(id INT PRIMARY KEY, c2 INT UNIQUE,
c3 POINT NOT NULL DEFAULT ST_GeomFromText('POINT(3 4)'),
@@ -2823,6 +2847,18 @@ DROP TABLE t1;
CREATE TABLE t1 (a INT, b INT, PRIMARY KEY(a,b)) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
ALTER TABLE t1 MODIFY b INT FIRST;
DROP TABLE t1;
+CREATE TABLE t1 (pk INT PRIMARY KEY) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+INSERT INTO t1 SET pk=1;
+ALTER TABLE t1 ADD COLUMN b INT;
+BEGIN;
+UPDATE t1 SET pk=2;
+UPDATE t1 SET pk=1;
+connection analyze;
+SELECT * FROM t1;
+pk b
+1 NULL
+connection default;
+DROP TABLE t1;
disconnect analyze;
#
# MDEV-22465: DROP COLUMN is wrongly claimed to be ALGORITHM=INSTANT
@@ -2836,7 +2872,7 @@ SELECT variable_value-@old_instant instants
FROM information_schema.global_status
WHERE variable_name = 'innodb_instant_alter_column';
instants
-206
+209
SET GLOBAL innodb_purge_rseg_truncate_frequency= @saved_frequency;
SET GLOBAL innodb_instant_alter_column_allowed = @saved_allowance;
#
diff --git a/mysql-test/suite/innodb/r/instant_alter_bugs.result b/mysql-test/suite/innodb/r/instant_alter_bugs.result
index e0457155d6a..79f1b0eb068 100644
--- a/mysql-test/suite/innodb/r/instant_alter_bugs.result
+++ b/mysql-test/suite/innodb/r/instant_alter_bugs.result
@@ -184,6 +184,7 @@ UNLOCK TABLES;
DROP TABLE t1;
CREATE TABLE t1(c1 INT NOT NULL)Engine=InnoDB;
ALTER TABLE t1 DISCARD TABLESPACE;
+FLUSH TABLES;
ALTER TABLE t1 ADD COLUMN c2 INT NOT NULL;
Warnings:
Warning 1814 Tablespace has been discarded for table `t1`
@@ -192,6 +193,8 @@ Warnings:
Warning 1814 Tablespace has been discarded for table `t1`
restore: t1 .ibd and .cfg files
ALTER TABLE t1 IMPORT TABLESPACE;
+Warnings:
+Warning 1814 Tablespace has been discarded for table `t1`
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
diff --git a/mysql-test/suite/innodb/r/instant_alter_charset.result b/mysql-test/suite/innodb/r/instant_alter_charset.result
index 43b4b2453e8..6d29cffa5c9 100644
--- a/mysql-test/suite/innodb/r/instant_alter_charset.result
+++ b/mysql-test/suite/innodb/r/instant_alter_charset.result
@@ -1847,7 +1847,7 @@ HEX(a)
0061
DROP TABLE t1;
#
-# MDEV-19285 INSTANT ALTER from ascii_general_ci to latin1_general_ci produces currupt data
+# MDEV-19285 INSTANT ALTER from ascii_general_ci to latin1_general_ci produces corrupt data
#
CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET ascii COLLATE ascii_general_ci, PRIMARY KEY(a)) ENGINE=InnoDB;
INSERT INTO t1 VALUES ('a'),(0xC0),('b');
diff --git a/mysql-test/suite/innodb/r/instant_alter_debug,redundant.rdiff b/mysql-test/suite/innodb/r/instant_alter_debug,redundant.rdiff
new file mode 100644
index 00000000000..eafa8e5725d
--- /dev/null
+++ b/mysql-test/suite/innodb/r/instant_alter_debug,redundant.rdiff
@@ -0,0 +1,6 @@
+@@ -509,4 +509,4 @@
+ FROM information_schema.global_status
+ WHERE variable_name = 'innodb_instant_alter_column';
+ instants
+-35
++36
diff --git a/mysql-test/suite/innodb/r/instant_alter_debug.result b/mysql-test/suite/innodb/r/instant_alter_debug.result
index 359eb1fc384..fa7ebabd0af 100644
--- a/mysql-test/suite/innodb/r/instant_alter_debug.result
+++ b/mysql-test/suite/innodb/r/instant_alter_debug.result
@@ -465,9 +465,48 @@ a b c d e f g h i
DROP TABLE t1;
SET DEBUG_SYNC=RESET;
# End of 10.4 tests
+#
+# MDEV-22867 Assertion instant.n_core_fields == n_core_fields
+# in dict_index_t::instant_add_field
+#
+CREATE TABLE t1 (a INT PRIMARY KEY, b INT UNIQUE) ENGINE=InnoDB;
+INSERT INTO t1 SET a=1;
+connect prevent_purge,localhost,root,,;
+START TRANSACTION WITH CONSISTENT SNAPSHOT;
+connection default;
+ALTER TABLE t1 ADD COLUMN c INT;
+DELETE FROM t1;
+connect con2,localhost,root,,test;
+ALTER TABLE t1 DROP b, ADD INDEX(c), ALGORITHM=NOCOPY;
+ERROR 0A000: ALGORITHM=NOCOPY is not supported for this operation. Try ALGORITHM=INPLACE
+SET DEBUG_SYNC='innodb_inplace_alter_table_enter SIGNAL ddl WAIT_FOR emptied';
+ALTER TABLE t1 DROP b;
+connection default;
+SET DEBUG_SYNC='now WAIT_FOR ddl';
+BEGIN;
+INSERT INTO t1 SET a=1;
+connection prevent_purge;
+COMMIT;
+disconnect prevent_purge;
+connection default;
+ROLLBACK;
+SELECT * FROM t1;
+a b c
+SET DEBUG_SYNC='now SIGNAL emptied';
+connection con2;
+disconnect con2;
+connection default;
+ALTER TABLE t1 DROP c;
+INSERT INTO t1 VALUES (2),(3),(4);
+CHECK TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+DROP TABLE t1;
+SET DEBUG_SYNC=RESET;
+# End of 10.5 tests
SET GLOBAL innodb_purge_rseg_truncate_frequency = @save_frequency;
SELECT variable_value-@old_instant instants
FROM information_schema.global_status
WHERE variable_name = 'innodb_instant_alter_column';
instants
-33
+35
diff --git a/mysql-test/suite/innodb/r/instant_alter_purge.result b/mysql-test/suite/innodb/r/instant_alter_purge.result
index 8adae3d645f..1179ff62ecc 100644
--- a/mysql-test/suite/innodb/r/instant_alter_purge.result
+++ b/mysql-test/suite/innodb/r/instant_alter_purge.result
@@ -21,27 +21,4 @@ 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;
-SET GLOBAL innodb_max_purge_lag_wait= 0;
-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/log_alter_table.result b/mysql-test/suite/innodb/r/log_alter_table.result
deleted file mode 100644
index 9de89bebaa6..00000000000
--- a/mysql-test/suite/innodb/r/log_alter_table.result
+++ /dev/null
@@ -1,21 +0,0 @@
-# restart
-#
-# Bug#21801423 INNODB REDO LOG DOES NOT INDICATE WHEN
-# FILES ARE CREATED
-#
-# Bug#21796691 INNODB REDO LOG DOES NOT INDICATE WHEN
-# REDO LOGGING IS SKIPPED
-#
-CREATE TABLE t1 (a INT NOT NULL, b INT UNIQUE) ENGINE=InnoDB;
-INSERT INTO t1 VALUES (1,2);
-ALTER TABLE t1 ADD PRIMARY KEY(a), LOCK=SHARED, ALGORITHM=INPLACE;
-ALTER TABLE t1 DROP INDEX b, ADD INDEX (b), LOCK=SHARED;
-# Kill the server
-# restart: --debug=d,ib_log
-FOUND 2 /scan \d+: multi-log rec MLOG_FILE_CREATE2 len \d+ page \d+:0/ in mysqld.1.err
-FOUND 3 /scan \d+: log rec MLOG_INDEX_LOAD/ in mysqld.1.err
-CHECK TABLE t1;
-Table Op Msg_type Msg_text
-test.t1 check status OK
-# restart
-DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/r/log_corruption.result b/mysql-test/suite/innodb/r/log_corruption.result
index 4ec34908035..bf92f77d30c 100644
--- a/mysql-test/suite/innodb/r/log_corruption.result
+++ b/mysql-test/suite/innodb/r/log_corruption.result
@@ -21,13 +21,54 @@ AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
FOUND 1 /InnoDB: Upgrade after a crash is not supported. This redo log was created before MariaDB 10\.2\.2, and it appears corrupted/ in mysqld.1.err
# empty redo log from before MariaDB 10.2.2
-# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=5 --innodb-log-file-size=1m
+# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=5 --innodb-log-file-size=2m
SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
COUNT(*)
1
FOUND 1 /InnoDB: Upgrading redo log:/ in mysqld.1.err
+# Corrupted multi-file redo log from before MariaDB 10.2.2
+# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=5 --innodb-log-file-size=2m
+SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES
+WHERE engine = 'innodb'
+AND support IN ('YES', 'DEFAULT', 'ENABLED');
+COUNT(*)
+0
+FOUND 2 /InnoDB: Upgrade after a crash is not supported. This redo log was created before MariaDB 10\.2\.2, and it appears corrupted/ in mysqld.1.err
+# Empty multi-file redo log from before MariaDB 10.2.2
+# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=5 --innodb-log-file-size=2m
+SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES
+WHERE engine = 'innodb'
+AND support IN ('YES', 'DEFAULT', 'ENABLED');
+COUNT(*)
+1
+FOUND 2 /InnoDB: Upgrading redo log:/ in mysqld.1.err
+# Multi-file redo log with size mismatch from after MariaDB 10.2.2
+# Corrupted multi-file redo log from after MariaDB 10.2.2
+# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=5 --innodb-log-file-size=2m
+SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES
+WHERE engine = 'innodb'
+AND support IN ('YES', 'DEFAULT', 'ENABLED');
+COUNT(*)
+0
+FOUND 1 /InnoDB: Log file .*ib_logfile1 is of different size 1048576 bytes than other log files 2097152 bytes!/ in mysqld.1.err
+FOUND 1 /InnoDB: Upgrade after a crash is not supported\. The redo log was created with BogoDB 1\.2\.3\.4, and it appears corrupted\./ in mysqld.1.err
+# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=5 --innodb-log-file-size=2m
+SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES
+WHERE engine = 'innodb'
+AND support IN ('YES', 'DEFAULT', 'ENABLED');
+COUNT(*)
+0
+FOUND 2 /InnoDB: Upgrade after a crash is not supported\. The redo log was created with BogoDB 1\.2\.3\.4, and it appears corrupted\./ in mysqld.1.err
+# Empty multi-file redo log from after MariaDB 10.2.2
+# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=5 --innodb-log-file-size=2m
+SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES
+WHERE engine = 'innodb'
+AND support IN ('YES', 'DEFAULT', 'ENABLED');
+COUNT(*)
+1
+FOUND 3 /InnoDB: Upgrading redo log:/ in mysqld.1.err
# redo log from "after" MariaDB 10.2.2, but with invalid header checksum
# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption
SELECT * FROM INFORMATION_SCHEMA.ENGINES
@@ -56,7 +97,7 @@ WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
FOUND 1 /InnoDB: Invalid log block checksum. block: 2372 checkpoint no: 1 expected: 3362026715 found: 144444122/ in mysqld.1.err
-FOUND 1 /InnoDB: Missing MLOG_CHECKPOINT between the checkpoint 1213964 and the end 1213952\./ in mysqld.1.err
+FOUND 1 /InnoDB: Upgrade after a crash is not supported\. The redo log was created with malicious intentions, or perhaps, and it appears corrupted\./ in mysqld.1.err
# same, but with current-version header
# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=5
SELECT * FROM INFORMATION_SCHEMA.ENGINES
@@ -64,7 +105,6 @@ WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
FOUND 2 /InnoDB: Invalid log block checksum. block: 2372 checkpoint no: 1 expected: 3362026715 found: 144444122/ in mysqld.1.err
-FOUND 2 /InnoDB: Missing MLOG_CHECKPOINT between the checkpoint 1213964 and the end 1213952\./ in mysqld.1.err
# --innodb-force-recovery=6 (skip the entire redo log)
# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=6
SELECT * FROM INFORMATION_SCHEMA.ENGINES
@@ -93,12 +133,7 @@ SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
-FOUND 1 /InnoDB: Starting crash recovery from checkpoint LSN=1213964/ in mysqld.1.err
-FOUND 1 /InnoDB: MLOG_FILE_NAME incorrect:bogus/ in mysqld.1.err
-FOUND 1 /InnoDB: ############### CORRUPT LOG RECORD FOUND ##################/ in mysqld.1.err
-FOUND 1 /InnoDB: Log record type 55, page 151:488\. Log parsing proceeded successfully up to 1213973\. Previous log record type 56, is multi 0 Recv offset 9, prev 0/ in mysqld.1.err
-FOUND 1 /len 22. hex 38000000000012860cb7809781e80006626f67757300. asc 8 bogus / in mysqld.1.err
-FOUND 1 /InnoDB: Set innodb_force_recovery to ignore this error/ in mysqld.1.err
+FOUND 1 /\[ERROR\] InnoDB: Upgrade after a crash is not supported\. The redo log was created with MariaDB 10\.3\.1\./ in mysqld.1.err
# Test a corrupted MLOG_FILE_NAME record.
# valid header, invalid checkpoint 1, valid checkpoint 2, invalid block
# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption
@@ -107,44 +142,44 @@ WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
FOUND 1 /InnoDB: Invalid log block checksum. block: 2372 checkpoint no: 1 expected: 2454333373 found: 150151/ in mysqld.1.err
+FOUND 3 /\[ERROR\] InnoDB: Upgrade after a crash is not supported\. The redo log was created with MariaDB 10\.3\.1, and it appears corrupted\./ in mysqld.1.err
# valid header, invalid checkpoint 1, valid checkpoint 2, invalid log record
# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
-FOUND 1 /InnoDB: MLOG_FILE_NAME incorrect:bigot/ in mysqld.1.err
-FOUND 1 /len 22; hex 38000000000012860cb7809781e800066269676f7400; asc 8 bigot ;/ in mysqld.1.err
+FOUND 2 /\[ERROR\] InnoDB: Upgrade after a crash is not supported\. The redo log was created with MariaDB 10\.3\.1\./ in mysqld.1.err
# 10.2 missing MLOG_FILE_NAME or MLOG_FILE_DELETE before MLOG_CHECKPOINT
# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
-FOUND 1 /InnoDB: Missing MLOG_FILE_NAME or MLOG_FILE_DELETE before MLOG_CHECKPOINT for tablespace 42/ in mysqld.1.err
+FOUND 1 /\[ERROR\] InnoDB: Upgrade after a crash is not supported\. The redo log was created with ibbackup was here!!!1!\./ in mysqld.1.err
# 10.3 missing MLOG_FILE_NAME or MLOG_FILE_DELETE before MLOG_CHECKPOINT
# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
-FOUND 2 /InnoDB: Missing MLOG_FILE_NAME or MLOG_FILE_DELETE before MLOG_CHECKPOINT for tablespace 42/ in mysqld.1.err
+FOUND 3 /\[ERROR\] InnoDB: Upgrade after a crash is not supported\. The redo log was created with MariaDB 10\.3\.1\./ in mysqld.1.err
# Empty 10.3 redo log
-# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=5 --innodb-log-file-size=1m
+# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=5 --innodb-log-file-size=2m
SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
COUNT(*)
1
-FOUND 1 /InnoDB: .* started; log sequence number 121397[09]/ in mysqld.1.err
+FOUND 1 /InnoDB: .* started; log sequence number 1213964; transaction id 0/ in mysqld.1.err
# Empty 10.2 redo log
-# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=5 --innodb-log-file-size=1m
+# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=5 --innodb-log-file-size=2m
SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
COUNT(*)
1
-FOUND 3 /InnoDB: Upgrading redo log:/ in mysqld.1.err
+FOUND 5 /InnoDB: Upgrading redo log:/ in mysqld.1.err
# Minimal MariaDB 10.1.21 encrypted redo log
# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=5
SELECT * FROM INFORMATION_SCHEMA.ENGINES
@@ -155,6 +190,5 @@ FOUND 1 /InnoDB: Obtaining redo log encryption key version 1 failed/ in mysqld.1
FOUND 1 /InnoDB: Decrypting checkpoint failed/ in mysqld.1.err
ib_buffer_pool
ib_logfile0
-ib_logfile1
ibdata1
# restart
diff --git a/mysql-test/suite/innodb/r/log_file.result b/mysql-test/suite/innodb/r/log_file.result
index a4599ef303f..83ca8f07b63 100644
--- a/mysql-test/suite/innodb/r/log_file.result
+++ b/mysql-test/suite/innodb/r/log_file.result
@@ -2,15 +2,15 @@
# Bug#16691130 - ASSERT WHEN INNODB_LOG_GROUP_HOME_DIR DOES NOT EXIST
# Bug#16418661 - CHANGING NAME IN FOR INNODB_DATA_FILE_PATH SHOULD NOT SUCCEED WITH LOG FILES
# Start mysqld without the possibility to create innodb_undo_tablespaces
-# restart: --innodb-log-files-in-group=3 --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-directory=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-logs=20 --innodb-undo-tablespaces=3 --innodb-data-file-path=ibdata1:16M;ibdata2:10M:autoextend
+# restart: --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-directory=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-logs=20 --innodb-undo-tablespaces=3 --innodb-data-file-path=ibdata1:16M;ibdata2:10M:autoextend
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
FOUND 1 /\[ERROR\] InnoDB: Could not create undo tablespace '.*undo002'/ in mysqld.1.err
-# Remove undo001,undo002,ibdata1,ibdata2,ib_logfile1,ib_logfile2,ib_logfile101
+# Remove undo001,undo002,ibdata1,ibdata2,ib_logfile101
# Start mysqld with non existent innodb_log_group_home_dir
-# restart: --innodb-log-files-in-group=3 --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-directory=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-logs=20 --innodb-undo-tablespaces=3 --innodb-data-file-path=ibdata1:16M;ibdata2:10M:autoextend --innodb_log_group_home_dir=/path/to/non-existent/
+# restart: --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-directory=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-logs=20 --innodb-undo-tablespaces=3 --innodb-data-file-path=ibdata1:16M;ibdata2:10M:autoextend --innodb_log_group_home_dir=/path/to/non-existent/
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
@@ -18,7 +18,7 @@ ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
FOUND 1 /File .path.to.non-existent.*ib_logfile101: 'create' returned OS error \d+/ in mysqld.1.err
# Remove ibdata1 & ibdata2
# Successfully let InnoDB create tablespaces
-# restart: --innodb-log-files-in-group=3 --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-directory=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-logs=20 --innodb-undo-tablespaces=3 --innodb-data-file-path=ibdata1:16M;ibdata2:10M:autoextend
+# restart: --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-directory=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-logs=20 --innodb-undo-tablespaces=3 --innodb-data-file-path=ibdata1:16M;ibdata2:10M:autoextend
SELECT COUNT(*) `1` FROM INFORMATION_SCHEMA.ENGINES
WHERE engine='innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
@@ -26,15 +26,13 @@ AND support IN ('YES', 'DEFAULT', 'ENABLED');
1
# Backup tmp/logfile/*
# 1. With ibdata2, Without ibdata1
-# restart: --innodb-log-files-in-group=3 --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-directory=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-logs=20 --innodb-undo-tablespaces=3 --innodb-data-file-path=ibdata1:16M;ibdata2:10M:autoextend
+# restart: --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-directory=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-logs=20 --innodb-undo-tablespaces=3 --innodb-data-file-path=ibdata1:16M;ibdata2:10M:autoextend
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
FOUND 1 /The innodb_system data file 'ibdata1' was not found but one of the other data files 'ibdata2' exists/ in mysqld.1.err
bak_ib_logfile0
-bak_ib_logfile1
-bak_ib_logfile2
bak_ibdata1
bak_ibdata2
bak_undo001
@@ -42,14 +40,12 @@ bak_undo002
bak_undo003
ib_buffer_pool
ib_logfile0
-ib_logfile1
-ib_logfile2
ibdata2
undo001
undo002
undo003
# 2. With ibdata1, without ibdata2
-# restart: --innodb-log-files-in-group=3 --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-directory=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-logs=20 --innodb-undo-tablespaces=3 --innodb-data-file-path=ibdata1:16M;ibdata2:10M:autoextend
+# restart: --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-directory=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-logs=20 --innodb-undo-tablespaces=3 --innodb-data-file-path=ibdata1:16M;ibdata2:10M:autoextend
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
@@ -57,8 +53,6 @@ ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
FOUND 1 /InnoDB: Tablespace size stored in header is \d+ pages, but the sum of data file sizes is \d+ pages/ in mysqld.1.err
FOUND 1 /InnoDB: Cannot start InnoDB. The tail of the system tablespace is missing/ in mysqld.1.err
bak_ib_logfile0
-bak_ib_logfile1
-bak_ib_logfile2
bak_ibdata1
bak_ibdata2
bak_undo001
@@ -66,8 +60,6 @@ bak_undo002
bak_undo003
ib_buffer_pool
ib_logfile0
-ib_logfile1
-ib_logfile2
ibdata1
ibdata2
undo001
@@ -75,8 +67,6 @@ undo002
undo003
# 3. Without ibdata1 & ibdata2
bak_ib_logfile0
-bak_ib_logfile1
-bak_ib_logfile2
bak_ibdata1
bak_ibdata2
bak_undo001
@@ -84,20 +74,16 @@ bak_undo002
bak_undo003
ib_buffer_pool
ib_logfile0
-ib_logfile1
-ib_logfile2
undo001
undo002
undo003
-# restart: --innodb-log-files-in-group=3 --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-directory=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-logs=20 --innodb-undo-tablespaces=3 --innodb-data-file-path=ibdata1:16M;ibdata2:10M:autoextend
+# restart: --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-directory=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-logs=20 --innodb-undo-tablespaces=3 --innodb-data-file-path=ibdata1:16M;ibdata2:10M:autoextend
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
FOUND 1 /InnoDB: undo tablespace .*undo001.* exists\. Creating system tablespace with existing undo tablespaces is not supported\. Please delete all undo tablespaces before creating new system tablespace\./ in mysqld.1.err
bak_ib_logfile0
-bak_ib_logfile1
-bak_ib_logfile2
bak_ibdata1
bak_ibdata2
bak_undo001
@@ -105,15 +91,11 @@ bak_undo002
bak_undo003
ib_buffer_pool
ib_logfile0
-ib_logfile1
-ib_logfile2
undo001
undo002
undo003
# 4. Without ibdata*, ib_logfile* and with undo00*
bak_ib_logfile0
-bak_ib_logfile1
-bak_ib_logfile2
bak_ibdata1
bak_ibdata2
bak_undo001
@@ -123,14 +105,12 @@ ib_buffer_pool
undo001
undo002
undo003
-# restart: --innodb-log-files-in-group=3 --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-directory=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-logs=20 --innodb-undo-tablespaces=3 --innodb-data-file-path=ibdata1:16M;ibdata2:10M:autoextend
+# restart: --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-directory=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-logs=20 --innodb-undo-tablespaces=3 --innodb-data-file-path=ibdata1:16M;ibdata2:10M:autoextend
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
bak_ib_logfile0
-bak_ib_logfile1
-bak_ib_logfile2
bak_ibdata1
bak_ibdata2
bak_undo001
@@ -142,8 +122,6 @@ undo002
undo003
# 5. Without ibdata*,ib_logfile* files & Without undo002
bak_ib_logfile0
-bak_ib_logfile1
-bak_ib_logfile2
bak_ibdata1
bak_ibdata2
bak_undo001
@@ -152,14 +130,12 @@ bak_undo003
ib_buffer_pool
undo001
undo003
-# restart: --innodb-log-files-in-group=3 --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-directory=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-logs=20 --innodb-undo-tablespaces=3 --innodb-data-file-path=ibdata1:16M;ibdata2:10M:autoextend
+# restart: --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-directory=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-logs=20 --innodb-undo-tablespaces=3 --innodb-data-file-path=ibdata1:16M;ibdata2:10M:autoextend
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
bak_ib_logfile0
-bak_ib_logfile1
-bak_ib_logfile2
bak_ibdata1
bak_ibdata2
bak_undo001
@@ -170,8 +146,6 @@ undo001
undo003
# 6. Without ibdata*,ib_logfile* files & Without undo001, undo002
bak_ib_logfile0
-bak_ib_logfile1
-bak_ib_logfile2
bak_ibdata1
bak_ibdata2
bak_undo001
@@ -179,15 +153,13 @@ bak_undo002
bak_undo003
ib_buffer_pool
undo003
-# restart: --innodb-log-files-in-group=3 --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-directory=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-logs=20 --innodb-undo-tablespaces=3 --innodb-data-file-path=ibdata1:16M;ibdata2:10M:autoextend
+# restart: --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-directory=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-logs=20 --innodb-undo-tablespaces=3 --innodb-data-file-path=ibdata1:16M;ibdata2:10M:autoextend
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
FOUND 1 /undo tablespace .*undo003.* exists\. Creating system tablespace with existing undo tablespaces is not supported\. Please delete all undo tablespaces before creating new system tablespace\./ in mysqld.1.err
bak_ib_logfile0
-bak_ib_logfile1
-bak_ib_logfile2
bak_ibdata1
bak_ibdata2
bak_undo001
@@ -197,8 +169,6 @@ ib_buffer_pool
undo003
# 7. With ibdata files & Without undo002
bak_ib_logfile0
-bak_ib_logfile1
-bak_ib_logfile2
bak_ibdata1
bak_ibdata2
bak_undo001
@@ -206,21 +176,17 @@ bak_undo002
bak_undo003
ib_buffer_pool
ib_logfile0
-ib_logfile1
-ib_logfile2
ibdata1
ibdata2
undo001
undo003
-# restart: --innodb-log-files-in-group=3 --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-directory=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-logs=20 --innodb-undo-tablespaces=3 --innodb-data-file-path=ibdata1:16M;ibdata2:10M:autoextend
+# restart: --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-directory=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-logs=20 --innodb-undo-tablespaces=3 --innodb-data-file-path=ibdata1:16M;ibdata2:10M:autoextend
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
-FOUND 1 /InnoDB: Unable to open undo tablespace.*undo002/ in mysqld.1.err
+FOUND 1 /InnoDB: Expected to open innodb_undo_tablespaces=3 but was able to find only 1/ in mysqld.1.err
bak_ib_logfile0
-bak_ib_logfile1
-bak_ib_logfile2
bak_ibdata1
bak_ibdata2
bak_undo001
@@ -228,16 +194,12 @@ bak_undo002
bak_undo003
ib_buffer_pool
ib_logfile0
-ib_logfile1
-ib_logfile2
ibdata1
ibdata2
undo001
undo003
# 8. With ibdata files & Without undo001, undo002
bak_ib_logfile0
-bak_ib_logfile1
-bak_ib_logfile2
bak_ibdata1
bak_ibdata2
bak_undo001
@@ -245,20 +207,16 @@ bak_undo002
bak_undo003
ib_buffer_pool
ib_logfile0
-ib_logfile1
-ib_logfile2
ibdata1
ibdata2
undo003
-# restart: --innodb-log-files-in-group=3 --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-directory=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-logs=20 --innodb-undo-tablespaces=3 --innodb-data-file-path=ibdata1:16M;ibdata2:10M:autoextend
+# restart: --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-directory=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-logs=20 --innodb-undo-tablespaces=3 --innodb-data-file-path=ibdata1:16M;ibdata2:10M:autoextend
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
-FOUND 1 /InnoDB: Unable to open undo tablespace.*undo001/ in mysqld.1.err
+FOUND 1 /InnoDB: Expected to open innodb_undo_tablespaces=3 but was able to find only 0/ in mysqld.1.err
bak_ib_logfile0
-bak_ib_logfile1
-bak_ib_logfile2
bak_ibdata1
bak_ibdata2
bak_undo001
@@ -266,15 +224,11 @@ bak_undo002
bak_undo003
ib_buffer_pool
ib_logfile0
-ib_logfile1
-ib_logfile2
ibdata1
ibdata2
undo003
-# 9. Without ibdata*, without undo*, Without ib_logfile1 and with ib_logfile2
+# 9. Without ibdata*, without undo*
bak_ib_logfile0
-bak_ib_logfile1
-bak_ib_logfile2
bak_ibdata1
bak_ibdata2
bak_undo001
@@ -282,17 +236,13 @@ bak_undo002
bak_undo003
ib_buffer_pool
ib_logfile0
-ib_logfile2
-# restart: --innodb-log-files-in-group=3 --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-directory=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-logs=20 --innodb-undo-tablespaces=3 --innodb-data-file-path=ibdata1:16M;ibdata2:10M:autoextend
+# restart: --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-directory=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-logs=20 --innodb-undo-tablespaces=3 --innodb-data-file-path=ibdata1:16M;ibdata2:10M:autoextend
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
-InnoDB YES Supports transactions, row-level locking, foreign keys and encryption for tables YES YES YES
-NOT FOUND /redo log file .*ib_logfile0.* exists\. Creating system tablespace with existing redo log files is not recommended\. Please delete all redo log files before creating new system tablespace\./ in mysqld.1.err
+FOUND 1 /redo log file .*ib_logfile0.* exists\. Creating system tablespace with existing redo log file is not recommended\. Please delete redo log file before creating new system tablespace\./ in mysqld.1.err
bak_ib_logfile0
-bak_ib_logfile1
-bak_ib_logfile2
bak_ibdata1
bak_ibdata2
bak_undo001
@@ -300,23 +250,14 @@ bak_undo002
bak_undo003
ib_buffer_pool
ib_logfile0
-ib_logfile1
-ib_logfile2
-ibdata1
-ibdata2
-undo001
-undo002
-undo003
# 10. With ibdata*, without ib_logfile0
-# restart: --innodb-log-files-in-group=3 --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-directory=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-logs=20 --innodb-undo-tablespaces=3 --innodb-data-file-path=ibdata1:16M;ibdata2:10M:autoextend
+# restart: --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-directory=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-logs=20 --innodb-undo-tablespaces=3 --innodb-data-file-path=ibdata1:16M;ibdata2:10M:autoextend
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
InnoDB YES Supports transactions, row-level locking, foreign keys and encryption for tables YES YES YES
bak_ib_logfile0
-bak_ib_logfile1
-bak_ib_logfile2
bak_ibdata1
bak_ibdata2
bak_undo001
@@ -324,17 +265,13 @@ bak_undo002
bak_undo003
ib_buffer_pool
ib_logfile0
-ib_logfile1
-ib_logfile2
ibdata1
ibdata2
undo001
undo002
undo003
-# 11. With ibdata*, without ib_logfile1
+# 11. With ibdata*
bak_ib_logfile0
-bak_ib_logfile1
-bak_ib_logfile2
bak_ibdata1
bak_ibdata2
bak_undo001
@@ -342,24 +279,21 @@ bak_undo002
bak_undo003
ib_buffer_pool
ib_logfile0
-ib_logfile2
ibdata1
ibdata2
undo001
undo002
undo003
-# restart: --innodb-log-files-in-group=3 --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-directory=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-logs=20 --innodb-undo-tablespaces=3 --innodb-data-file-path=ibdata1:16M;ibdata2:10M:autoextend
+# restart: --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-directory=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-logs=20 --innodb-undo-tablespaces=3 --innodb-data-file-path=ibdata1:16M;ibdata2:10M:autoextend
SELECT COUNT(*) `1` FROM INFORMATION_SCHEMA.ENGINES
WHERE engine='innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
1
1
-FOUND 1 /Resizing redo log from 1\*\d+ to 3\*\d+ bytes; LSN=\d+/ in mysqld.1.err
+NOT FOUND /Resizing redo log from 1\*\d+ to 3\*\d+ bytes; LSN=\d+/ in mysqld.1.err
# restart
# Cleanup
bak_ib_logfile0
-bak_ib_logfile1
-bak_ib_logfile2
bak_ibdata1
bak_ibdata2
bak_undo001
@@ -367,8 +301,6 @@ bak_undo002
bak_undo003
ib_buffer_pool
ib_logfile0
-ib_logfile1
-ib_logfile2
ibdata1
ibdata2
undo001
diff --git a/mysql-test/suite/innodb/r/log_file_name.result b/mysql-test/suite/innodb/r/log_file_name.result
index cb51653f6f6..42b988ed3ca 100644
--- a/mysql-test/suite/innodb/r/log_file_name.result
+++ b/mysql-test/suite/innodb/r/log_file_name.result
@@ -100,7 +100,7 @@ AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
FOUND 1 /\[Note\] InnoDB: Header page consists of zero bytes in datafile: .*u1.ibd/ in mysqld.1.err
FOUND 1 /InnoDB: At LSN: \d+: unable to open file .*u[1-5].ibd for tablespace/ in mysqld.1.err
-FOUND 1 /\[ERROR\] InnoDB: Cannot rename '.*u5.ibd' to '.*u6.ibd' because the target file exists/ in mysqld.1.err
+FOUND 1 /\[ERROR\] InnoDB: Cannot replay rename of tablespace \d+ from '.*u4.ibd' to '.*u6.ibd' because the target file exists/ in mysqld.1.err
# restart: --innodb-force-recovery=1
FOUND 1 /\[Note\] InnoDB: Header page consists of zero bytes in datafile: .*u1.ibd/ in mysqld.1.err
FOUND 1 /InnoDB: At LSN: \d+: unable to open file .*u[1-5].ibd for tablespace/ in mysqld.1.err
diff --git a/mysql-test/suite/innodb/r/log_file_name_debug.result b/mysql-test/suite/innodb/r/log_file_name_debug.result
index 2b81caa26b7..cb2ee68fc98 100644
--- a/mysql-test/suite/innodb/r/log_file_name_debug.result
+++ b/mysql-test/suite/innodb/r/log_file_name_debug.result
@@ -5,14 +5,14 @@
SET GLOBAL DEBUG_DBUG='+d,fil_names_write_bogus';
CREATE TABLE t1(a INT PRIMARY KEY) ENGINE=InnoDB;
# Kill the server
-# restart: --debug=d,innodb_log_abort_1 --innodb-log-files-in-group=1 --innodb-log-file-size=4M
+# restart: --debug=d,innodb_log_abort_1 --innodb-log-file-size=4194304
SELECT * FROM t1;
ERROR 42000: Unknown storage engine 'InnoDB'
FOUND 1 /InnoDB: Tablespace 4294967280 was not found at .*, but there were no modifications either/ in mysqld.1.err
-# restart: --debug=d,innodb_log_abort_3,ib_log --innodb-log-files-in-group=1 --innodb-log-file-size=4M
+# restart: --debug=d,innodb_log_abort_3,ib_log --innodb-log-file-size=4194304
SELECT * FROM t1;
ERROR 42000: Unknown storage engine 'InnoDB'
-FOUND 1 /ib_log: MLOG_CHECKPOINT.* written/ in mysqld.1.err
+FOUND 1 /ib_log: FILE_CHECKPOINT.* written/ in mysqld.1.err
# restart
# restart
DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/r/log_file_size.result b/mysql-test/suite/innodb/r/log_file_size.result
index f3e8e9bc30a..3929747525e 100644
--- a/mysql-test/suite/innodb/r/log_file_size.result
+++ b/mysql-test/suite/innodb/r/log_file_size.result
@@ -1,24 +1,18 @@
CREATE TABLE t1(a INT PRIMARY KEY) ENGINE=InnoDB;
-# restart: --innodb-thread-concurrency=1 --innodb-log-file-size=1m --innodb-log-files-in-group=2
-SELECT * FROM INFORMATION_SCHEMA.ENGINES
-WHERE engine = 'innodb'
-AND support IN ('YES', 'DEFAULT', 'ENABLED');
-ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
-FOUND 1 /InnoDB: Log file .*ib_logfile1 is of different size .* bytes than other log files 0 bytes!/ in mysqld.1.err
-# restart: --innodb-thread-concurrency=1 --innodb-log-file-size=1m --innodb-log-files-in-group=2
+# restart: --innodb-thread-concurrency=1 --innodb-log-file-size=2m
CHECK TABLE t1;
Table Op Msg_type Msg_text
test.t1 check status OK
-# restart: --innodb-thread-concurrency=100 --innodb-log-file-size=10M --innodb-log-files-in-group=2
+# restart: --innodb-thread-concurrency=100 --innodb-log-file-size=20M
BEGIN;
INSERT INTO t1 VALUES (42);
-# restart: --innodb-log-file-size=6M
+# restart: --innodb-log-file-size=12M
SELECT * FROM t1;
a
INSERT INTO t1 VALUES (42);
BEGIN;
DELETE FROM t1;
-# restart: --innodb-log-files-in-group=3 --innodb-log-file-size=5M
+# restart: --innodb-log-file-size=5M
SELECT * FROM t1;
a
42
@@ -51,11 +45,11 @@ FOUND 1 /InnoDB: innodb_read_only prevents crash recovery/ in mysqld.1.err
# restart: --debug=d,innodb_log_abort_4
SELECT * FROM t1;
ERROR 42000: Unknown storage engine 'InnoDB'
-FOUND 2 /redo log from 3\*[0-9]+ to 2\*[0-9]+ bytes/ in mysqld.1.err
+FOUND 5 /redo log from [0-9]+ to [0-9]+ bytes/ in mysqld.1.err
# restart: --debug=d,innodb_log_abort_5
SELECT * FROM t1;
ERROR 42000: Unknown storage engine 'InnoDB'
-FOUND 3 /redo log from 3\*[0-9]+ to 2\*[0-9]+ bytes/ in mysqld.1.err
+FOUND 6 /redo log from [0-9]+ to [0-9]+ bytes/ in mysqld.1.err
# restart: --innodb-read-only
SELECT * FROM t1;
ERROR 42000: Unknown storage engine 'InnoDB'
@@ -63,14 +57,14 @@ FOUND 2 /InnoDB: innodb_read_only prevents crash recovery/ in mysqld.1.err
# restart: --debug=d,innodb_log_abort_6
SELECT * FROM t1;
ERROR 42000: Unknown storage engine 'InnoDB'
-FOUND 4 /redo log from 3\*[0-9]+ to 2\*[0-9]+ bytes/ in mysqld.1.err
+FOUND 7 /redo log from [0-9]+ to [0-9]+ bytes/ in mysqld.1.err
# restart: --debug=d,innodb_log_abort_7
SELECT * FROM t1;
ERROR 42000: Unknown storage engine 'InnoDB'
# restart: --innodb-read-only
SELECT * FROM t1;
ERROR 42000: Unknown storage engine 'InnoDB'
-FOUND 1 /InnoDB: Cannot create log files in read-only mode/ in mysqld.1.err
+FOUND 1 /InnoDB: Cannot create log file in read-only mode/ in mysqld.1.err
# restart: --debug=d,innodb_log_abort_8
SELECT * FROM t1;
ERROR 42000: Unknown storage engine 'InnoDB'
@@ -85,8 +79,9 @@ ERROR 42000: Unknown storage engine 'InnoDB'
FOUND 1 /InnoDB: Log file .*ib_logfile0 size 7 is not a multiple of 512 bytes/ in mysqld.1.err
# restart: --debug=d,innodb_log_abort_9
SELECT * FROM t1;
-ERROR 42000: Unknown storage engine 'InnoDB'
-FOUND 1 /InnoDB: Log file .*ib_logfile1 is of different size 1048576 bytes than other log files/ in mysqld.1.err
+a
+42
+123
# restart: --debug=d,innodb_log_abort_10
SELECT * FROM t1;
ERROR 42000: Unknown storage engine 'InnoDB'
diff --git a/mysql-test/suite/innodb/r/monitor.result b/mysql-test/suite/innodb/r/monitor.result
index 4aea9fb5b0b..7bdcf7acb45 100644
--- a/mysql-test/suite/innodb/r/monitor.result
+++ b/mysql-test/suite/innodb/r/monitor.result
@@ -1,5 +1,6 @@
set global innodb_monitor_disable = All;
-select name, status from information_schema.innodb_metrics;
+select name, if(enabled,'enabled','disabled') status
+from information_schema.innodb_metrics;
name status
metadata_table_handles_opened disabled
metadata_table_handles_closed disabled
@@ -54,16 +55,8 @@ buffer_flush_neighbor disabled
buffer_flush_neighbor_pages disabled
buffer_flush_n_to_flush_requested disabled
buffer_flush_n_to_flush_by_age disabled
-buffer_flush_adaptive_avg_time_slot disabled
-buffer_LRU_batch_flush_avg_time_slot disabled
-buffer_flush_adaptive_avg_time_thread disabled
-buffer_LRU_batch_flush_avg_time_thread disabled
-buffer_flush_adaptive_avg_time_est disabled
-buffer_LRU_batch_flush_avg_time_est disabled
-buffer_flush_avg_time disabled
+buffer_flush_adaptive_avg_time disabled
buffer_flush_adaptive_avg_pass disabled
-buffer_LRU_batch_flush_avg_pass disabled
-buffer_flush_avg_pass disabled
buffer_LRU_get_free_loops disabled
buffer_LRU_get_free_waits disabled
buffer_flush_avg_page_rate disabled
@@ -89,9 +82,6 @@ buffer_LRU_batch_flush_pages disabled
buffer_LRU_batch_evict_total_pages disabled
buffer_LRU_batches_evict disabled
buffer_LRU_batch_evict_pages disabled
-buffer_LRU_single_flush_scanned disabled
-buffer_LRU_single_flush_num_scan disabled
-buffer_LRU_single_flush_scanned_per_call disabled
buffer_LRU_single_flush_failure_count disabled
buffer_LRU_get_free_search disabled
buffer_LRU_search_scanned disabled
@@ -166,7 +156,6 @@ log_lsn_current disabled
log_lsn_checkpoint_age disabled
log_lsn_buf_pool_oldest disabled
log_max_modified_age_async disabled
-log_max_modified_age_sync disabled
log_pending_log_flushes disabled
log_pending_checkpoint_writes disabled
log_num_log_io disabled
@@ -213,14 +202,10 @@ innodb_activity_count disabled
innodb_master_active_loops disabled
innodb_master_idle_loops disabled
innodb_background_drop_table_usec disabled
-innodb_ibuf_merge_usec disabled
innodb_log_flush_usec disabled
-innodb_mem_validate_usec disabled
-innodb_master_purge_usec disabled
innodb_dict_lru_usec disabled
innodb_dict_lru_count_active disabled
innodb_dict_lru_count_idle disabled
-innodb_checkpoint_usec disabled
innodb_dblwr_writes disabled
innodb_dblwr_pages_written disabled
innodb_page_size disabled
@@ -252,22 +237,23 @@ icp_no_match disabled
icp_out_of_range disabled
icp_match disabled
set global innodb_monitor_enable = all;
-select name from information_schema.innodb_metrics where status!='enabled';
+select name from information_schema.innodb_metrics where not enabled;
name
set global innodb_monitor_enable = aaa;
ERROR 42000: Variable 'innodb_monitor_enable' can't be set to the value of 'aaa'
set global innodb_monitor_disable = All;
-select name from information_schema.innodb_metrics where status!='disabled';
+select name from information_schema.innodb_metrics where enabled;
name
set global innodb_monitor_reset_all = all;
select name from information_schema.innodb_metrics where count!=0;
name
set global innodb_monitor_enable = "%lock%";
select name from information_schema.innodb_metrics
-where status != IF(name like "%lock%", 'enabled', 'disabled');
+where enabled != (name like "%lock%");
name
set global innodb_monitor_disable = "%lock%";
-select name, status from information_schema.innodb_metrics
+select name, if(enabled,'enabled','disabled') status
+from information_schema.innodb_metrics
where name like "%lock%";
name status
lock_deadlocks disabled
@@ -298,24 +284,25 @@ innodb_rwlock_sx_os_waits disabled
set global innodb_monitor_enable = "%lock*";
ERROR 42000: Variable 'innodb_monitor_enable' can't be set to the value of '%lock*'
set global innodb_monitor_enable="%%%%%%%%%%%%%%%%%%%%%%%%%%%";
-select name from information_schema.innodb_metrics where status!='enabled';
+select name from information_schema.innodb_metrics where not enabled;
name
set global innodb_monitor_disable="%%%%%";
-select name from information_schema.innodb_metrics where status!='disabled';
+select name from information_schema.innodb_metrics where enabled;
name
set global innodb_monitor_enable="%";
-select name from information_schema.innodb_metrics where status!='enabled';
+select name from information_schema.innodb_metrics where not enabled;
name
set global innodb_monitor_disable="%_%";
-select name from information_schema.innodb_metrics where status!='disabled';
+select name from information_schema.innodb_metrics where enabled;
name
set global innodb_monitor_enable="log%%%%";
select name from information_schema.innodb_metrics
-where status != IF(name like "log%", 'enabled', 'disabled');
+where enabled != (name like "log%");
name
set global innodb_monitor_enable="os_%a_fs_ncs";
set global innodb_monitor_enable="os%pending%";
-select name, status from information_schema.innodb_metrics
+select name, if(enabled,'enabled','disabled') status
+from information_schema.innodb_metrics
where name like "os%";
name status
os_data_reads disabled
@@ -338,14 +325,16 @@ create table monitor_test(col int) engine = innodb;
select * from monitor_test;
col
select name, max_count, min_count, count,
-max_count_reset, min_count_reset, count_reset, status
+max_count_reset, min_count_reset, count_reset,
+if(enabled,'enabled','disabled') status
from information_schema.innodb_metrics
where name = "metadata_table_handles_opened";
name max_count min_count count max_count_reset min_count_reset count_reset status
metadata_table_handles_opened 1 NULL 1 1 NULL 1 enabled
set global innodb_monitor_reset = metadata_table_handles_opened;
select name, max_count, min_count, count,
-max_count_reset, min_count_reset, count_reset, status
+max_count_reset, min_count_reset, count_reset,
+if(enabled,'enabled','disabled') status
from information_schema.innodb_metrics
where name = "metadata_table_handles_opened";
name max_count min_count count max_count_reset min_count_reset count_reset status
@@ -355,14 +344,16 @@ create table monitor_test(col int) engine = innodb;
select * from monitor_test;
col
select name, max_count, min_count, count,
-max_count_reset, min_count_reset, count_reset, status
+max_count_reset, min_count_reset, count_reset,
+if(enabled,'enabled','disabled') status
from information_schema.innodb_metrics
where name = "metadata_table_handles_opened";
name max_count min_count count max_count_reset min_count_reset count_reset status
metadata_table_handles_opened 2 NULL 2 1 NULL 1 enabled
set global innodb_monitor_reset_all = metadata_table_handles_opened;
select name, max_count, min_count, count,
-max_count_reset, min_count_reset, count_reset, status
+max_count_reset, min_count_reset, count_reset,
+if(enabled,'enabled','disabled') status
from information_schema.innodb_metrics
where name = "metadata_table_handles_opened";
name max_count min_count count max_count_reset min_count_reset count_reset status
@@ -370,7 +361,8 @@ metadata_table_handles_opened 2 NULL 2 1 NULL 1 enabled
set global innodb_monitor_disable = metadata_table_handles_opened;
set global innodb_monitor_reset = metadata_table_handles_opened;
select name, max_count, min_count, count,
-max_count_reset, min_count_reset, count_reset, status
+max_count_reset, min_count_reset, count_reset,
+if(enabled,'enabled','disabled') status
from information_schema.innodb_metrics
where name = "metadata_table_handles_opened";
name max_count min_count count max_count_reset min_count_reset count_reset status
@@ -380,14 +372,16 @@ create table monitor_test(col int) engine = innodb;
select * from monitor_test;
col
select name, max_count, min_count, count,
-max_count_reset, min_count_reset, count_reset, status
+max_count_reset, min_count_reset, count_reset,
+if(enabled,'enabled','disabled') status
from information_schema.innodb_metrics
where name = "metadata_table_handles_opened";
name max_count min_count count max_count_reset min_count_reset count_reset status
metadata_table_handles_opened 2 NULL 2 NULL NULL 0 disabled
set global innodb_monitor_reset_all = metadata_table_handles_opened;
select name, max_count, min_count, count,
-max_count_reset, min_count_reset, count_reset, status
+max_count_reset, min_count_reset, count_reset,
+if(enabled,'enabled','disabled') status
from information_schema.innodb_metrics
where name = "metadata_table_handles_opened";
name max_count min_count count max_count_reset min_count_reset count_reset status
@@ -398,7 +392,8 @@ create table monitor_test(col int) engine = innodb stats_persistent=0;
select * from monitor_test;
col
select name, max_count, min_count, count,
-max_count_reset, min_count_reset, count_reset, status
+max_count_reset, min_count_reset, count_reset,
+if(enabled,'enabled','disabled') status
from information_schema.innodb_metrics
where name = "metadata_table_handles_opened";
name max_count min_count count max_count_reset min_count_reset count_reset status
@@ -406,32 +401,36 @@ metadata_table_handles_opened 1 NULL 1 1 NULL 1 enabled
set global innodb_monitor_enable = metadata_table_handles_closed;
create index idx on monitor_test(col);
select name, max_count, min_count, count,
-max_count_reset, min_count_reset, count_reset, status
+max_count_reset, min_count_reset, count_reset,
+if(enabled,'enabled','disabled') status
from information_schema.innodb_metrics
where name = "metadata_table_handles_closed";
name max_count min_count count max_count_reset min_count_reset count_reset status
metadata_table_handles_closed 1 NULL 1 1 NULL 1 enabled
select name, max_count, min_count, count,
-max_count_reset, min_count_reset, count_reset, status
+max_count_reset, min_count_reset, count_reset,
+if(enabled,'enabled','disabled') status
from information_schema.innodb_metrics
where name like "metadata%";
name max_count min_count count max_count_reset min_count_reset count_reset status
-metadata_table_handles_opened 2 NULL 2 2 NULL 2 enabled
+metadata_table_handles_opened 1 NULL 1 1 NULL 1 enabled
metadata_table_handles_closed 1 NULL 1 1 NULL 1 enabled
metadata_table_reference_count NULL NULL 0 NULL NULL 0 disabled
set global innodb_monitor_disable = module_metadata;
set global innodb_monitor_reset = module_metadata;
select name, max_count, min_count, count,
-max_count_reset, min_count_reset, count_reset, status
+max_count_reset, min_count_reset, count_reset,
+if(enabled,'enabled','disabled') status
from information_schema.innodb_metrics
where name like "metadata%";
name max_count min_count count max_count_reset min_count_reset count_reset status
-metadata_table_handles_opened 2 NULL 2 NULL NULL 0 disabled
+metadata_table_handles_opened 1 NULL 1 NULL NULL 0 disabled
metadata_table_handles_closed 1 NULL 1 NULL NULL 0 disabled
metadata_table_reference_count NULL NULL 0 NULL NULL 0 disabled
set global innodb_monitor_reset_all = module_metadata;
select name, max_count, min_count, count,
-max_count_reset, min_count_reset, count_reset, status
+max_count_reset, min_count_reset, count_reset,
+if(enabled,'enabled','disabled') status
from information_schema.innodb_metrics
where name like "metadata%";
name max_count min_count count max_count_reset min_count_reset count_reset status
@@ -446,7 +445,8 @@ begin;
insert into monitor_test values(9);
rollback;
select name, max_count, min_count, count,
-max_count_reset, min_count_reset, count_reset, status
+max_count_reset, min_count_reset, count_reset,
+if(enabled,'enabled','disabled') status
from information_schema.innodb_metrics
where name like "trx_rollbacks" or name like "trx_active_transactions";
name max_count min_count count max_count_reset min_count_reset count_reset status
@@ -457,11 +457,12 @@ set global innodb_monitor_enable = module_dml;
insert into monitor_test values(9);
update monitor_test set col = 10 where col = 9;
select name, max_count, min_count, count,
-max_count_reset, min_count_reset, count_reset, status
+max_count_reset, min_count_reset, count_reset,
+if(enabled,'enabled','disabled') status
from information_schema.innodb_metrics
where name like "dml%";
name max_count min_count count max_count_reset min_count_reset count_reset status
-dml_reads 2 NULL 2 2 NULL 2 enabled
+dml_reads 4 NULL 4 4 NULL 4 enabled
dml_inserts 1 NULL 1 1 NULL 1 enabled
dml_deletes 0 NULL 0 0 NULL 0 enabled
dml_updates 2 NULL 2 2 NULL 2 enabled
@@ -471,11 +472,12 @@ dml_system_deletes 0 NULL 0 0 NULL 0 enabled
dml_system_updates 0 NULL 0 0 NULL 0 enabled
delete from monitor_test;
select name, max_count, min_count, count,
-max_count_reset, min_count_reset, count_reset, status
+max_count_reset, min_count_reset, count_reset,
+if(enabled,'enabled','disabled') status
from information_schema.innodb_metrics
where name like "dml%";
name max_count min_count count max_count_reset min_count_reset count_reset status
-dml_reads 4 NULL 4 4 NULL 4 enabled
+dml_reads 6 NULL 6 6 NULL 6 enabled
dml_inserts 1 NULL 1 1 NULL 1 enabled
dml_deletes 2 NULL 2 2 NULL 2 enabled
dml_updates 2 NULL 2 2 NULL 2 enabled
@@ -485,11 +487,12 @@ dml_system_deletes 0 NULL 0 0 NULL 0 enabled
dml_system_updates 0 NULL 0 0 NULL 0 enabled
set global innodb_monitor_reset = module_dml;
select name, max_count, min_count, count,
-max_count_reset, min_count_reset, count_reset, status
+max_count_reset, min_count_reset, count_reset,
+if(enabled,'enabled','disabled') status
from information_schema.innodb_metrics
where name like "dml%";
name max_count min_count count max_count_reset min_count_reset count_reset status
-dml_reads 4 NULL 4 0 NULL 0 enabled
+dml_reads 6 NULL 6 0 NULL 0 enabled
dml_inserts 1 NULL 1 0 NULL 0 enabled
dml_deletes 2 NULL 2 0 NULL 0 enabled
dml_updates 2 NULL 2 0 NULL 0 enabled
@@ -501,11 +504,12 @@ insert into monitor_test values(9);
insert into monitor_test values(1);
delete from monitor_test;
select name, max_count, min_count, count,
-max_count_reset, min_count_reset, count_reset, status
+max_count_reset, min_count_reset, count_reset,
+if(enabled,'enabled','disabled') status
from information_schema.innodb_metrics
where name like "dml%";
name max_count min_count count max_count_reset min_count_reset count_reset status
-dml_reads 6 NULL 6 2 NULL 2 enabled
+dml_reads 8 NULL 8 2 NULL 2 enabled
dml_inserts 3 NULL 3 2 NULL 2 enabled
dml_deletes 4 NULL 4 2 NULL 2 enabled
dml_updates 2 NULL 2 0 NULL 0 enabled
@@ -515,11 +519,12 @@ dml_system_deletes 0 NULL 0 0 NULL 0 enabled
dml_system_updates 0 NULL 0 0 NULL 0 enabled
set global innodb_monitor_reset_all = module_dml;
select name, max_count, min_count, count,
-max_count_reset, min_count_reset, count_reset, status
+max_count_reset, min_count_reset, count_reset,
+if(enabled,'enabled','disabled') status
from information_schema.innodb_metrics
where name like "dml%";
name max_count min_count count max_count_reset min_count_reset count_reset status
-dml_reads 6 NULL 6 2 NULL 2 enabled
+dml_reads 8 NULL 8 2 NULL 2 enabled
dml_inserts 3 NULL 3 2 NULL 2 enabled
dml_deletes 4 NULL 4 2 NULL 2 enabled
dml_updates 2 NULL 2 0 NULL 0 enabled
@@ -529,11 +534,12 @@ dml_system_deletes 0 NULL 0 0 NULL 0 enabled
dml_system_updates 0 NULL 0 0 NULL 0 enabled
set global innodb_monitor_disable = module_dml;
select name, max_count, min_count, count,
-max_count_reset, min_count_reset, count_reset, status
+max_count_reset, min_count_reset, count_reset,
+if(enabled,'enabled','disabled') status
from information_schema.innodb_metrics
where name like "dml%";
name max_count min_count count max_count_reset min_count_reset count_reset status
-dml_reads 6 NULL 6 2 NULL 2 disabled
+dml_reads 8 NULL 8 2 NULL 2 disabled
dml_inserts 3 NULL 3 2 NULL 2 disabled
dml_deletes 4 NULL 4 2 NULL 2 disabled
dml_updates 2 NULL 2 0 NULL 0 disabled
@@ -543,7 +549,8 @@ dml_system_deletes 0 NULL 0 0 NULL 0 disabled
dml_system_updates 0 NULL 0 0 NULL 0 disabled
set global innodb_monitor_reset_all = module_dml;
select name, max_count, min_count, count,
-max_count_reset, min_count_reset, count_reset, status
+max_count_reset, min_count_reset, count_reset,
+if(enabled,'enabled','disabled') status
from information_schema.innodb_metrics
where name like "dml%";
name max_count min_count count max_count_reset min_count_reset count_reset status
@@ -560,7 +567,8 @@ insert into monitor_test values(9);
insert into monitor_test values(1);
delete from monitor_test;
select name, max_count, min_count, count,
-max_count_reset, min_count_reset, count_reset, status
+max_count_reset, min_count_reset, count_reset,
+if(enabled,'enabled','disabled') status
from information_schema.innodb_metrics
where name like "dml%";
name max_count min_count count max_count_reset min_count_reset count_reset status
@@ -576,7 +584,8 @@ set global innodb_monitor_disable = module_dml;
drop table monitor_test;
set global innodb_monitor_enable = file_num_open_files;
select name, max_count, min_count, count,
-max_count_reset, min_count_reset, count_reset, status
+max_count_reset, min_count_reset, count_reset,
+if(enabled,'enabled','disabled') status
from information_schema.innodb_metrics
where name like "file_num_open_files";
name max_count min_count count max_count_reset min_count_reset count_reset status
@@ -661,6 +670,28 @@ LIKE 'buffer_page_written_index_leaf';
NAME COUNT > 0
buffer_page_written_index_leaf 1
DROP TABLE t1;
+CREATE TABLE fl0 (
+id INT NOT NULL PRIMARY KEY
+) ENGINE = InnoDB;
+CREATE TABLE fl1 (
+id INT NOT NULL PRIMARY KEY,
+fl0_id INT,
+CONSTRAINT `fkl0`
+ FOREIGN KEY (fl0_id) REFERENCES fl0 (id)
+ON DELETE CASCADE
+ON UPDATE RESTRICT
+) ENGINE = InnoDB;
+CREATE TABLE fl2 (
+id INT NOT NULL PRIMARY KEY,
+fl1_id INT,
+CONSTRAINT `fkl1`
+ FOREIGN KEY (fl1_id) REFERENCES fl1 (id)
+ON DELETE CASCADE
+ON UPDATE SET NULL
+) ENGINE = InnoDB;
+INSERT INTO fl0 VALUES (1000);
+INSERT INTO fl1 VALUES (500, 1000), (1500, 1000);
+INSERT INTO fl2 VALUES (200, 500), (800, 500), (1200, 1500), (1800, 1500);
CREATE TABLE t1(id INT PRIMARY KEY, a INT, b CHAR(1), UNIQUE KEY u(a,b))
ENGINE=InnoDB;
SET @start = (SELECT COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
@@ -674,7 +705,96 @@ SET @end = (SELECT COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
SELECT @end - @start;
@end - @start
0
+# Records must not be S/X-locked if a table is X-locked.
+SET @start = @end;
+SET autocommit = 0;
+BEGIN;
+LOCK TABLE t1 WRITE;
+SELECT * FROM t1;
+id a b
+1 1 a
+4 4 d
+3 10000 c
+SELECT * FROM t1 WHERE a>=10000;
+id a b
+3 10000 c
+SELECT * FROM t1 FOR UPDATE;
+id a b
+1 1 a
+4 4 d
+3 10000 c
+SELECT * FROM t1 WHERE a>=10000 FOR UPDATE;
+id a b
+3 10000 c
+UPDATE t1 SET b = 'b' WHERE id = 4;
+UPDATE t1 SET b = 'b' WHERE a = 10000;
+REPLACE INTO t1 VALUES (4,3,'a');
+INSERT INTO t1 VALUES (3,1,'e') ON DUPLICATE KEY UPDATE b = 'b';
+INSERT INTO t1 VALUES (5,5,'e');
+DELETE FROM t1 WHERE a = 1 AND b='a';
+DELETE FROM t1;
+COMMIT;
+UNLOCK TABLES;
+SET @end = (SELECT COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME = 'lock_rec_lock_created');
+SELECT @end - @start;
+@end - @start
+0
+# Records must not be S-locked if a table is S-locked.
+SET @start = @end;
+BEGIN;
+LOCK TABLE t1 WRITE;
+INSERT INTO t1 VALUES(1,1,'a'),(2,9999,'b'),(3,10000,'c'),(4,4,'d');
+DELETE FROM t1 WHERE a = 9999 AND b='b';
+COMMIT;
+UNLOCK TABLES;
+BEGIN;
+LOCK TABLE t1 READ;
+SELECT * FROM t1 LOCK IN SHARE MODE;
+id a b
+1 1 a
+4 4 d
+3 10000 c
+SELECT * FROM t1 WHERE a>=10000 LOCK IN SHARE MODE;
+id a b
+3 10000 c
+COMMIT;
+UNLOCK TABLES;
+SET @end = (SELECT COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME = 'lock_rec_lock_created');
+SELECT @end - @start;
+@end - @start
+0
+# Records must not be S-locked for foreign keys enforcement
+SET @start = @end;
+BEGIN;
+LOCK TABLE fl0 READ, fl1 READ, fl2 WRITE;
+INSERT INTO fl2 VALUES (300, 500), (700, 500), (1300, 1500), (1700, 1500);
+SELECT * FROM fl1 LOCK IN SHARE MODE;
+id fl0_id
+500 1000
+1500 1000
+COMMIT;
+UNLOCK TABLES;
+SET @end = (SELECT COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME = 'lock_rec_lock_created');
+SELECT @end - @start;
+@end - @start
+0
+# Records must not be X-locked for foreign keys cascade
+SET @start = @end;
+BEGIN;
+LOCK TABLE fl0 READ, fl1 WRITE, fl2 WRITE;
+DELETE FROM fl1 WHERE id = 1500;
+UPDATE fl1 SET id = 2500 WHERE id = 500;
+COMMIT;
+UNLOCK TABLES;
+SET @end = (SELECT COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME = 'lock_rec_lock_created');
+SELECT @end - @start;
+@end - @start
+0
+SET autocommit = default;
DROP TABLE t1;
+DROP TABLE fl2;
+DROP TABLE fl1;
+DROP TABLE fl0;
SET GLOBAL innodb_monitor_enable=default;
SET GLOBAL innodb_monitor_disable=default;
SET GLOBAL innodb_monitor_reset_all=default;
diff --git a/mysql-test/suite/innodb/r/page_cleaner.result b/mysql-test/suite/innodb/r/page_cleaner.result
new file mode 100644
index 00000000000..97dd012054b
--- /dev/null
+++ b/mysql-test/suite/innodb/r/page_cleaner.result
@@ -0,0 +1,14 @@
+SET @save_pct= @@GLOBAL.innodb_max_dirty_pages_pct;
+SET @save_pct_lwm= @@GLOBAL.innodb_max_dirty_pages_pct_lwm;
+SET GLOBAL innodb_max_dirty_pages_pct_lwm=0.0;
+SET GLOBAL innodb_max_dirty_pages_pct=0.0;
+SET GLOBAL innodb_max_dirty_pages_pct=90.0;
+CREATE TABLE t ENGINE=InnoDB SELECT * FROM seq_1_to_10000;
+SELECT variable_value>0 FROM information_schema.global_status
+WHERE variable_name = 'INNODB_BUFFER_POOL_PAGES_DIRTY';
+variable_value>0
+1
+SET GLOBAL innodb_max_dirty_pages_pct=0.0;
+DROP TABLE t;
+SET GLOBAL innodb_max_dirty_pages_pct = @save_pct;
+SET GLOBAL innodb_max_dirty_pages_pct_lwm = @save_pct_lwm;
diff --git a/mysql-test/suite/innodb/r/purge_secondary.result b/mysql-test/suite/innodb/r/purge_secondary.result
index 1b5f2896887..a583e46418d 100644
--- a/mysql-test/suite/innodb/r/purge_secondary.result
+++ b/mysql-test/suite/innodb/r/purge_secondary.result
@@ -141,26 +141,13 @@ WHERE NAME='test/t1';
OTHER_INDEX_SIZE
1
ALTER TABLE t1 DROP INDEX `sidx`;
-INSERT INTO t1 () VALUES (),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),();
-INSERT INTO t1 (a) SELECT NULL FROM t1;
-INSERT INTO t1 (a) SELECT NULL FROM t1;
-INSERT INTO t1 (a) SELECT NULL FROM t1;
-INSERT INTO t1 (a) SELECT NULL FROM t1;
-INSERT INTO t1 (a) SELECT NULL FROM t1;
+INSERT INTO t1 (a) SELECT * FROM seq_1_to_544;
ALTER TABLE t1 FORCE, ALGORITHM=INPLACE;
ALTER TABLE t1 FORCE, ALGORITHM=INPLACE;
-SELECT NAME, SUBSYSTEM FROM INFORMATION_SCHEMA.INNODB_METRICS
-WHERE NAME="buffer_LRU_batch_flush_total_pages" AND COUNT > 0;
-NAME SUBSYSTEM
-buffer_LRU_batch_flush_total_pages buffer
SELECT (variable_value > 0) FROM information_schema.global_status
WHERE LOWER(variable_name) LIKE 'INNODB_BUFFER_POOL_PAGES_FLUSHED';
(variable_value > 0)
1
-SELECT NAME, SUBSYSTEM FROM INFORMATION_SCHEMA.INNODB_METRICS
-WHERE NAME="buffer_LRU_batch_evict_total_pages" AND COUNT > 0;
-NAME SUBSYSTEM
-buffer_LRU_batch_evict_total_pages buffer
# Note: The OTHER_INDEX_SIZE does not cover any SPATIAL INDEX.
# To test that all indexes were emptied, replace DROP TABLE
# with the following, and examine the root pages in t1.ibd:
diff --git a/mysql-test/suite/innodb/r/purge_thread_shutdown.result b/mysql-test/suite/innodb/r/purge_thread_shutdown.result
index a87cba89917..85ac77e6d49 100644
--- a/mysql-test/suite/innodb/r/purge_thread_shutdown.result
+++ b/mysql-test/suite/innodb/r/purge_thread_shutdown.result
@@ -6,11 +6,6 @@ select user,state from information_schema.processlist order by 2;
user state
root
root Filling schema table
-system user InnoDB purge coordinator
-system user InnoDB purge worker
-system user InnoDB purge worker
-system user InnoDB purge worker
-system user InnoDB shutdown handler
set global debug_dbug='+d,only_kill_system_threads';
set global innodb_fast_shutdown=0;
shutdown;
@@ -19,11 +14,6 @@ disconnect con1;
select user,state from information_schema.processlist order by 2;
user state
root Filling schema table
-system user InnoDB purge coordinator
-system user InnoDB purge worker
-system user InnoDB purge worker
-system user InnoDB purge worker
-system user InnoDB slow shutdown wait
set global innodb_fast_shutdown=1;
select user,state from information_schema.processlist order by 2;
user state
diff --git a/mysql-test/suite/innodb/r/redo_log_during_checkpoint.result b/mysql-test/suite/innodb/r/redo_log_during_checkpoint.result
index 3915b07f12e..c7b4bb4403b 100644
--- a/mysql-test/suite/innodb/r/redo_log_during_checkpoint.result
+++ b/mysql-test/suite/innodb/r/redo_log_during_checkpoint.result
@@ -10,6 +10,7 @@ set global innodb_log_checkpoint_now = 1;
ERROR HY000: Lost connection to MySQL server during query
# Skip MLOG_FILE_NAME redo records during recovery
DROP DATABASE very_long_database_name;
+SET GLOBAL innodb_flush_sync=OFF;
SET GLOBAL innodb_page_cleaner_disabled_debug = 1;
SET GLOBAL innodb_dict_stats_disabled_debug = 1;
SET GLOBAL innodb_master_thread_disabled_debug = 1;
diff --git a/mysql-test/suite/innodb/r/row_format_redundant.result b/mysql-test/suite/innodb/r/row_format_redundant.result
index 73f20653604..0eede61b175 100644
--- a/mysql-test/suite/innodb/r/row_format_redundant.result
+++ b/mysql-test/suite/innodb/r/row_format_redundant.result
@@ -75,10 +75,9 @@ DROP TABLE t1;
Warnings:
Warning 1932 Table 'test.t1' doesn't exist in engine
DROP TABLE t2,t3;
-FOUND 6 /\[ERROR\] InnoDB: Table `test`\.`t1` in InnoDB data dictionary contains invalid flags\. SYS_TABLES\.TYPE=1 SYS_TABLES\.MIX_LEN=511\b/ in mysqld.1.err
+FOUND 5 /\[ERROR\] InnoDB: Table `test`\.`t1` in InnoDB data dictionary contains invalid flags\. SYS_TABLES\.TYPE=1 SYS_TABLES\.MIX_LEN=511\b/ in mysqld.1.err
# restart
ib_buffer_pool
ib_logfile0
-ib_logfile1
ibdata1
db.opt
diff --git a/mysql-test/suite/innodb/r/table_definition_cache_debug.result b/mysql-test/suite/innodb/r/table_definition_cache_debug.result
index 2c2c6de44ae..df171c89cd4 100644
--- a/mysql-test/suite/innodb/r/table_definition_cache_debug.result
+++ b/mysql-test/suite/innodb/r/table_definition_cache_debug.result
@@ -1,4 +1,4 @@
-call mtr.add_suppression("InnoDB: innodb_open_files=13 is exceeded");
+call mtr.add_suppression("InnoDB: innodb_open_files=.* is exceeded");
SET @save_tdc= @@GLOBAL.table_definition_cache;
SET @save_toc= @@GLOBAL.table_open_cache;
SET GLOBAL table_definition_cache= 400;
diff --git a/mysql-test/suite/innodb/r/table_flags.result b/mysql-test/suite/innodb/r/table_flags.result
index 9ef07c6954d..347ba5ef52c 100644
--- a/mysql-test/suite/innodb/r/table_flags.result
+++ b/mysql-test/suite/innodb/r/table_flags.result
@@ -193,7 +193,6 @@ a
DROP TABLE tr,tc,td,tz,tp;
# restart
ib_logfile0
-ib_logfile1
ibdata1
sys_tables.bin
call mtr.add_suppression("ERROR HY000: Can't create table `test`.`t1`");
diff --git a/mysql-test/suite/innodb/r/temp_table_savepoint.result b/mysql-test/suite/innodb/r/temp_table_savepoint.result
index c2bf70ca9ee..44c8db04c43 100644
--- a/mysql-test/suite/innodb/r/temp_table_savepoint.result
+++ b/mysql-test/suite/innodb/r/temp_table_savepoint.result
@@ -2,45 +2,6 @@ create procedure populate_tables()
begin
declare n int default 20;
declare inner_loop int default 100;
-create temporary table t1(c1 int not null,
-c2 int not null,
-c3 char(255) not null,
-c4 text(6000) not null,
-c5 blob(6000) not null,
-c6 varchar(2000) not null,
-c7 varchar(2000) not null,
-c8 datetime,
-c9 decimal(6,3),
-primary key (c1),
-index (c3,c4(50),c5(50)),
-index (c2))
-engine=innodb row_format=redundant;
-create temporary table t2(c1 int not null,
-c2 int not null,
-c3 char(255) not null,
-c4 text(6000) not null,
-c5 blob(6000) not null,
-c6 varchar(2000) not null,
-c7 varchar(2000) not null,
-c8 datetime,
-c9 decimal(6,3),
-primary key (c1),
-index (c3,c4(50),c5(50)),
-index (c2))
-engine=innodb row_format=compact;
-create temporary table t4(c1 int not null,
-c2 int not null,
-c3 char(255) not null,
-c4 text(6000) not null,
-c5 blob(6000) not null,
-c6 varchar(2000) not null,
-c7 varchar(2000) not null,
-c8 datetime,
-c9 decimal(6,3),
-primary key (c1),
-index (c3,c4(50),c5(50)),
-index (c2))
-engine=innodb row_format=dynamic;
create temporary table t5(c1 int not null,
c2 int not null,
c3 char(255) not null,
@@ -58,18 +19,6 @@ create temporary table t6 ( a int ) engine = innodb;
insert into t6 values (50),(100),(150),(190);
while (n > 0) do
start transaction;
-insert into t1 values(n,n,repeat(concat(' tc3_',n),30),
-repeat(concat(' tc4_',n),8),repeat(concat(' tc_',n),8),
-repeat(concat(' tc6_',n),8),repeat(concat(' tc7_',n),8),
-now(),(100.55+n));
-insert into t2 values(n,n,repeat(concat(' tc3_',n),30),
-repeat(concat(' tc4_',n),8),repeat(concat(' tc_',n),8),
-repeat(concat(' tc6_',n),8),repeat(concat(' tc7_',n),8),
-now(),(100.55+n));
-insert ignore into t4 values(n,n,repeat(concat(' tc3_',n),30),
-repeat(concat(' tc4_',n),800),repeat(concat(' tc_',n),800),
-repeat(concat(' tc6_',n),800),repeat(concat(' tc7_',n),800),
-now(),(100.55+n));
insert ignore into t5 values(n,n,repeat(concat(' tc3_',n),30),
repeat(concat(' tc4_',n),800),repeat(concat(' tc_',n),800),
repeat(concat(' tc6_',n),800),repeat(concat(' tc7_',n),800),
@@ -77,73 +26,25 @@ now(),(100.55+n));
if (n > 10) then
commit;
else
-delete from t1 where c1 > 10 ;
-delete from t2 where c1 > 10 ;
-delete from t4 where c1 > 10 ;
delete from t5 where c1 > 10 ;
rollback;
start transaction;
-update t1 set c1 = c1 + 1000 where c1 > 10;
-update t2 set c1 = c1 + 1000 where c1 > 10;
-update t4 set c1 = c1 + 1000 where c1 > 10;
update t5 set c1 = c1 + 1000 where c1 > 10;
rollback;
end if;
start transaction;
-insert into t1 values(n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
-repeat(concat(' tc4_',n+inner_loop),8),repeat(concat(' tc_',n+inner_loop),8),
-repeat(concat(' tc6_',n+inner_loop),2),repeat(concat(' tc7_',n+inner_loop),2),
-now(),(100.55+n+inner_loop));
-insert into t2 values(n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
-repeat(concat(' tc4_',n+inner_loop),8),repeat(concat(' tc_',n+inner_loop),8),
-repeat(concat(' tc6_',n+inner_loop),2),repeat(concat(' tc7_',n+inner_loop),2),
-now(),(100.55+n+inner_loop));
-insert ignore into t4 values(n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
-repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
-repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245),
-now(),(100.55+n+inner_loop));
insert ignore into t5 values(n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245),
now(),(100.55+n+inner_loop));
-delete from t1 where c1 between 100 and 110;
-delete from t2 where c1 between 100 and 110;
-delete from t4 where c1 between 100 and 110;
delete from t5 where c1 between 100 and 110;
-update t1 set c1 = c1+1 where c1>110;
-update t2 set c1 = c1+1 where c1>110;
-update t4 set c1 = c1+1 where c1>110;
update t5 set c1 = c1+1 where c1>110;
savepoint a;
-insert into t1 values(300+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
-repeat(concat(' tc4_',n+inner_loop),8),repeat(concat(' tc_',n+inner_loop),8),
-repeat(concat(' tc6_',n+inner_loop),2),repeat(concat(' tc7_',n+inner_loop),2),
-now(),(100.55+n+inner_loop));
-insert into t2 values(300+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
-repeat(concat(' tc4_',n+inner_loop),8),repeat(concat(' tc_',n+inner_loop),8),
-repeat(concat(' tc6_',n+inner_loop),2),repeat(concat(' tc7_',n+inner_loop),2),
-now(),(100.55+n+inner_loop));
-insert ignore into t4 values(300+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
-repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
-repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245),
-now(),(100.55+n+inner_loop));
insert ignore into t5 values(300+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245),
now(),(100.55+n+inner_loop));
savepoint b;
-insert into t1 values(400+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
-repeat(concat(' tc4_',n+inner_loop),8),repeat(concat(' tc_',n+inner_loop),8),
-repeat(concat(' tc6_',n+inner_loop),2),repeat(concat(' tc7_',n+inner_loop),2),
-now(),(100.55+n+inner_loop));
-insert into t2 values(400+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
-repeat(concat(' tc4_',n+inner_loop),8),repeat(concat(' tc_',n+inner_loop),8),
-repeat(concat(' tc6_',n+inner_loop),2),repeat(concat(' tc7_',n+inner_loop),2),
-now(),(100.55+n+inner_loop));
-insert into t4 values(400+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
-repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
-repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245),
-now(),(100.55+n+inner_loop));
insert into t5 values(400+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245),
@@ -162,84 +63,6 @@ call populate_tables();;
connect con2,localhost,root,,;
call populate_tables();;
connection con1;
-select count(*) from t1;
-count(*)
-20
-select count(*) from t2;
-count(*)
-20
-select count(*) from t4;
-count(*)
-20
-select count(*) from t5;
-count(*)
-20
-select c1 from t1;
-c1
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-122
-124
-126
-128
-130
-132
-134
-136
-138
-140
-select c1 from t2;
-c1
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-122
-124
-126
-128
-130
-132
-134
-136
-138
-140
-select c1 from t4;
-c1
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-122
-124
-126
-128
-130
-132
-134
-136
-138
-140
select c1 from t5;
c1
11
@@ -263,84 +86,6 @@ c1
138
140
connection con2;
-select count(*) from t1;
-count(*)
-20
-select count(*) from t2;
-count(*)
-20
-select count(*) from t4;
-count(*)
-20
-select count(*) from t5;
-count(*)
-20
-select c1 from t1;
-c1
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-122
-124
-126
-128
-130
-132
-134
-136
-138
-140
-select c1 from t2;
-c1
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-122
-124
-126
-128
-130
-132
-134
-136
-138
-140
-select c1 from t4;
-c1
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-122
-124
-126
-128
-130
-132
-134
-136
-138
-140
select c1 from t5;
c1
11
@@ -365,89 +110,32 @@ c1
140
connection con1;
set autocommit = 0;
-insert into t1 values (20,1,'a','a','a','a','a',now(),100.55);
-ERROR 23000: Duplicate entry '20' for key 'PRIMARY'
-insert ignore into t1 values (20,1,'a','a','a','a','a',now(),100.55);
-Warnings:
-Warning 1062 Duplicate entry '20' for key 'PRIMARY'
-insert into t2 values (20,1,'a','a','a','a','a',now(),100.55);
-ERROR 23000: Duplicate entry '20' for key 'PRIMARY'
-insert ignore into t2 values (20,1,'a','a','a','a','a',now(),100.55);
-Warnings:
-Warning 1062 Duplicate entry '20' for key 'PRIMARY'
-insert into t4 values (20,1,'a','a','a','a','a',now(),100.55);
-ERROR 23000: Duplicate entry '20' for key 'PRIMARY'
-insert ignore into t4 values (20,1,'a','a','a','a','a',now(),100.55);
-Warnings:
-Warning 1062 Duplicate entry '20' for key 'PRIMARY'
insert into t5 values (20,1,'a','a','a','a','a',now(),100.55);
ERROR 23000: Duplicate entry '20' for key 'PRIMARY'
insert ignore into t5 values (20,1,'a','a','a','a','a',now(),100.55);
Warnings:
Warning 1062 Duplicate entry '20' for key 'PRIMARY'
-insert into t1 values (1,1,'a','a','a','a','a',now(),100.55),
-(20,1,'a','a','a','a','a',now(),100.55);
-ERROR 23000: Duplicate entry '20' for key 'PRIMARY'
-insert into t2 values (1,1,'a','a','a','a','a',now(),100.55),
-(20,1,'a','a','a','a','a',now(),100.55);
-ERROR 23000: Duplicate entry '20' for key 'PRIMARY'
-insert into t4 values (1,1,'a','a','a','a','a',now(),100.55),
-(20,1,'a','a','a','a','a',now(),100.55);
-ERROR 23000: Duplicate entry '20' for key 'PRIMARY'
insert into t5 values (1,1,'a','a','a','a','a',now(),100.55),
(20,1,'a','a','a','a','a',now(),100.55);
ERROR 23000: Duplicate entry '20' for key 'PRIMARY'
set autocommit = 1;
-select c1,c2 from t1 where c1 in (20,1);
-c1 c2
-20 20
-select c1,c2 from t2 where c1 in (20,1);
-c1 c2
-20 20
-select c1,c2 from t4 where c1 in (20,1);
-c1 c2
-20 20
select c1,c2 from t5 where c1 in (20,1);
c1 c2
20 20
-replace into t1 values (20,1,'a','a','a','a','a',now(),100.55);
-replace into t2 values (20,1,'a','a','a','a','a',now(),100.55);
-replace into t4 values (20,1,'a','a','a','a','a',now(),100.55);
replace into t5 values (20,1,'a','a','a','a','a',now(),100.55);
-select c1,c2,c3,c4,c5,c6,c7,c9 from t1 where c1 = 20;
-c1 c2 c3 c4 c5 c6 c7 c9
-20 1 a a a a a 100.550
-select c1,c2,c3,c4,c5,c6,c7,c9 from t2 where c1 = 20;
-c1 c2 c3 c4 c5 c6 c7 c9
-20 1 a a a a a 100.550
-select c1,c2,c3,c4,c5,c6,c7,c9 from t4 where c1 = 20;
-c1 c2 c3 c4 c5 c6 c7 c9
-20 1 a a a a a 100.550
select c1,c2,c3,c4,c5,c6,c7,c9 from t5 where c1 = 20;
c1 c2 c3 c4 c5 c6 c7 c9
20 1 a a a a a 100.550
-update ignore t1 set c1 = 20 where c1 = 140 ;
-update ignore t2 set c1 = 20 where c1 = 140 ;
-update ignore t4 set c1 = 20 where c1 = 140 ;
update ignore t5 set c1 = 20 where c1 = 140 ;
-select count(*) from t1 where c1 = 140;
-count(*)
-1
-select count(*) from t2 where c1 = 140;
-count(*)
-1
-select count(*) from t4 where c1 = 140;
-count(*)
-1
select count(*) from t5 where c1 = 140;
count(*)
1
-select * into outfile "VARDIR/tmp/t1.outfile" from t1;
-create temporary table temp_1 engine = innodb as select * from t1 where 1=2;
+select * into outfile "VARDIR/tmp/t5.outfile" from t5;
+create temporary table temp_1 engine = innodb as select * from t5 where 1=2;
select count(*) from temp_1;
count(*)
0
-load data infile 'VARDIR/tmp/t1.outfile' into table temp_1;
+load data infile 'VARDIR/tmp/t5.outfile' into table temp_1;
select count(*) from temp_1;
count(*)
20
diff --git a/mysql-test/suite/innodb/r/temporary_table.result b/mysql-test/suite/innodb/r/temporary_table.result
index 0df99aecc46..79b5a3de064 100644
--- a/mysql-test/suite/innodb/r/temporary_table.result
+++ b/mysql-test/suite/innodb/r/temporary_table.result
@@ -28,7 +28,7 @@ id select_type table type possible_keys key key_len ref rows Extra
alter table t1 add index sec_index(f);
explain select * from t1 where f > 1.29999;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL sec_index NULL NULL NULL 5 Using where
+1 SIMPLE t1 range sec_index sec_index 5 NULL 3 Using index condition
select * from t1 where f > 1.29999;
i f c
98 1.3 jaipur
diff --git a/mysql-test/suite/innodb/r/temporary_table_optimization.result b/mysql-test/suite/innodb/r/temporary_table_optimization.result
index c3325d86386..3459dbb7837 100644
--- a/mysql-test/suite/innodb/r/temporary_table_optimization.result
+++ b/mysql-test/suite/innodb/r/temporary_table_optimization.result
@@ -128,7 +128,7 @@ ERROR 23000: Duplicate entry '2.5' for key 'sec_index'
alter table t1 add index sec_index(t1_f);
explain select * from t1 where t1_f >= 2.5;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL sec_index NULL NULL NULL 4 Using where
+1 SIMPLE t1 range sec_index sec_index 5 NULL 3 Using index condition
select * from t1 where t1_f >= 2.5;
t1_i t1_f
2 2.5
diff --git a/mysql-test/suite/innodb/r/undo_truncate.result b/mysql-test/suite/innodb/r/undo_truncate.result
index dce91a7461e..ad236bdecd4 100644
--- a/mysql-test/suite/innodb/r/undo_truncate.result
+++ b/mysql-test/suite/innodb/r/undo_truncate.result
@@ -1,8 +1,6 @@
-SET @save_undo_logs = @@GLOBAL.innodb_undo_logs;
SET @save_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET @save_truncate = @@GLOBAL.innodb_undo_log_truncate;
SET GLOBAL innodb_undo_log_truncate = 0;
-SET GLOBAL innodb_undo_logs = 4;
SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;
SET @trunc_start=
(SELECT variable_value FROM information_schema.global_status
@@ -55,6 +53,5 @@ drop table t1, t2;
drop PROCEDURE populate_t1;
drop PROCEDURE populate_t2;
InnoDB 0 transactions not purged
-SET GLOBAL innodb_undo_logs = @save_undo_logs;
SET GLOBAL innodb_purge_rseg_truncate_frequency = @save_frequency;
SET GLOBAL innodb_undo_log_truncate = @save_truncate;
diff --git a/mysql-test/suite/innodb/r/undo_truncate_recover.result b/mysql-test/suite/innodb/r/undo_truncate_recover.result
index 428a2dec0bb..909771e6a17 100644
--- a/mysql-test/suite/innodb/r/undo_truncate_recover.result
+++ b/mysql-test/suite/innodb/r/undo_truncate_recover.result
@@ -1,4 +1,3 @@
-SET GLOBAL innodb_undo_logs = 4;
SET GLOBAL innodb_undo_log_truncate = 1;
SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;
create table t1(keyc int primary key, c char(100)) engine = innodb;
diff --git a/mysql-test/suite/innodb/t/alter_copy.test b/mysql-test/suite/innodb/t/alter_copy.test
index b7ab05a061a..de2f99b68d4 100644
--- a/mysql-test/suite/innodb/t/alter_copy.test
+++ b/mysql-test/suite/innodb/t/alter_copy.test
@@ -2,6 +2,8 @@
--source include/have_debug.inc
--source include/have_debug_sync.inc
--source include/not_embedded.inc
+# Valgrind gives leaks from the first shutdown which confuses mtr
+#--source include/not_valgrind.inc
--echo #
--echo # MDEV-11415 AVOID INTERMEDIATE COMMIT WHILE DOING
@@ -61,7 +63,7 @@ let $shutdown_timeout=0;
disconnect hang;
let $shutdown_timeout=;
let $datadir=`select @@datadir`;
---replace_regex /#sql-[0-9a-f_]*/#sql-temporary/ /FTS_[0-9a-f]*_[0-9a-f]*/FTS/
+--replace_regex /#sql-alter-[0-9a-f_\-]*/#sql-alter/ /FTS_[0-9a-f]*_[0-9a-f]*/FTS/
--list_files $datadir/test
SHOW CREATE TABLE t;
SELECT COUNT(*) FROM t;
@@ -74,7 +76,7 @@ CHECK TABLE t1;
--let $restart_parameters= --innodb-read-only
--source include/restart_mysqld.inc
---replace_regex /#sql-[0-9a-f_]*/#sql-temporary/ /FTS_[0-9a-f]*_[0-9a-f]*/FTS/
+--replace_regex /#sql-alter-[0-9a-f_\-]*/#sql-alter/ /FTS_[0-9a-f]*_[0-9a-f]*/FTS/
--list_files $datadir/test
SHOW CREATE TABLE t;
@@ -88,7 +90,7 @@ CHECK TABLE t1;
--let $restart_parameters=
--source include/restart_mysqld.inc
---replace_regex /#sql-[0-9a-f_]*/#sql-temporary/ /FTS_[0-9a-f]*_[0-9a-f]*/FTS/
+--replace_regex /#sql-alter-[0-9a-f_\-]*/#sql-alter/ /FTS_[0-9a-f]*_[0-9a-f]*/FTS/
--list_files $datadir/test
DROP TABLE t1,t;
diff --git a/mysql-test/suite/innodb/t/alter_large_dml.test b/mysql-test/suite/innodb/t/alter_large_dml.test
index 54f5f171f05..d8b288e5a9f 100644
--- a/mysql-test/suite/innodb/t/alter_large_dml.test
+++ b/mysql-test/suite/innodb/t/alter_large_dml.test
@@ -1,4 +1,6 @@
--source include/big_test.inc
+# debug sync points times out when using valgrind
+--source include/not_valgrind.inc
--source include/have_innodb.inc
--source include/have_debug.inc
--source include/have_debug_sync.inc
diff --git a/mysql-test/suite/innodb/t/alter_partitioned.test b/mysql-test/suite/innodb/t/alter_partitioned.test
index f9cff1bd12f..4990c265b5e 100644
--- a/mysql-test/suite/innodb/t/alter_partitioned.test
+++ b/mysql-test/suite/innodb/t/alter_partitioned.test
@@ -40,7 +40,7 @@ PARTITION BY RANGE(a)
(PARTITION pa VALUES LESS THAN (3),
PARTITION pb VALUES LESS THAN (5));
---error ER_FOREIGN_KEY_ON_PARTITIONED
+--error ER_FEATURE_NOT_SUPPORTED_WITH_PARTITIONING
CREATE TABLE t2(a INT, FOREIGN KEY(a) REFERENCES t1(a))ENGINE=INNODB
PARTITION BY RANGE(a)
(PARTITION pa VALUES LESS THAN (2),
@@ -49,3 +49,14 @@ PARTITION pb VALUES LESS THAN (4));
DROP TABLE t1;
--echo # End of 10.3 tests
+
+--echo #
+--echo # MDEV-24754 Server crash in
+--echo # ha_partition_inplace_ctx::~ha_partition_inplace_ctx
+--echo #
+CREATE TABLE t1 (id INT PRIMARY KEY, a INT, va INT AS (a) VIRTUAL)
+ENGINE=InnoDB PARTITION BY HASH(id) PARTITIONS 2;
+ALTER TABLE t1 ADD b INT, ALGORITHM=INSTANT;
+DROP TABLE t1;
+
+--echo # End of 10.5 tests
diff --git a/mysql-test/suite/innodb/t/alter_rename_existing.test b/mysql-test/suite/innodb/t/alter_rename_existing.test
index 0202f2b6ad3..06602ae8e74 100644
--- a/mysql-test/suite/innodb/t/alter_rename_existing.test
+++ b/mysql-test/suite/innodb/t/alter_rename_existing.test
@@ -59,7 +59,7 @@ ALTER TABLE t1 ADD COLUMN d INT, ALGORITHM=COPY;
--echo # while a blocking t1.ibd file exists.
--echo #
SET GLOBAL innodb_file_per_table=ON;
---replace_regex /$MYSQLD_DATADIR/MYSQLD_DATADIR/
+--replace_regex /#sql-ib[1-9][0-9]*/#sql-ib/
--error ER_TABLESPACE_EXISTS
ALTER TABLE t1 FORCE, ALGORITHM=INPLACE;
--replace_regex /Error on rename of '.*' to '.*'/Error on rename of 'OLD_FILE_NAME' to 'NEW_FILE_NAME'/
diff --git a/mysql-test/suite/innodb/t/alter_rename_files.test b/mysql-test/suite/innodb/t/alter_rename_files.test
deleted file mode 100644
index 27408320f7d..00000000000
--- a/mysql-test/suite/innodb/t/alter_rename_files.test
+++ /dev/null
@@ -1,31 +0,0 @@
---source include/have_debug.inc
---source include/have_debug_sync.inc
---source include/have_innodb.inc
---source include/count_sessions.inc
-
-CREATE TABLE t1 (x INT NOT NULL UNIQUE KEY) ENGINE=InnoDB;
-INSERT INTO t1 VALUES(5);
-
-SET GLOBAL innodb_log_checkpoint_now=TRUE;
-
-# Start an ALTER TABLE and stop it before renaming the files
-SET DEBUG_SYNC='commit_cache_rebuild SIGNAL ready WAIT_FOR finish';
-
---send ALTER TABLE t1 FORCE;
-
-connect (con1,localhost,root,,);
-
-SET DEBUG_SYNC='now WAIT_FOR ready';
-
-SET GLOBAL innodb_log_checkpoint_now=TRUE;
-
-SET DEBUG_SYNC='now SIGNAL finish';
-
-disconnect con1;
-connection default;
-reap;
-SHOW CREATE TABLE t1;
-DROP TABLE t1;
-SET DEBUG_SYNC='RESET';
-
---source include/wait_until_count_sessions.inc
diff --git a/mysql-test/suite/innodb/t/alter_table.test b/mysql-test/suite/innodb/t/alter_table.test
index ae247e7cada..67ada081d46 100644
--- a/mysql-test/suite/innodb/t/alter_table.test
+++ b/mysql-test/suite/innodb/t/alter_table.test
@@ -124,3 +124,20 @@ CREATE TABLE t1 (c DATETIME AUTO_INCREMENT UNIQUE) ENGINE=InnoDB;
--echo # End of 10.4 tests
--echo #
+--echo #
+--echo # MDEV-21748 ASAN use-after-poison in PageBulk::insertPage()
+--echo #
+CREATE TABLE t1 (pk TIMESTAMP PRIMARY KEY, a TIMESTAMP NULL UNIQUE)
+ENGINE=InnoDB;
+INSERT INTO t1 VALUES
+ ('2020-03-10 10:21:00', NULL),
+ ('0000-00-00 00:00:00', '0000-00-00 00:00:00');
+ALTER TABLE t1 FORCE, ALGORITHM=INPLACE;
+DROP TABLE t1;
+--echo #
+--echo # MDEV-21850 ASAN use-after-poison in page_cur_insert_rec_low()
+--echo #
+CREATE TABLE t1 (id INT PRIMARY KEY, a YEAR, INDEX(id,a)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1,NULL),(2,NULL);
+UPDATE t1 SET a=0;
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/t/autoinc_debug.test b/mysql-test/suite/innodb/t/autoinc_debug.test
index 2e662565490..485439f9250 100644
--- a/mysql-test/suite/innodb/t/autoinc_debug.test
+++ b/mysql-test/suite/innodb/t/autoinc_debug.test
@@ -8,6 +8,14 @@ CREATE TABLE t1 (id INT AUTO_INCREMENT PRIMARY KEY)ENGINE=INNODB;
--echo # SETTING auto_increment_increment IN CONNECTION DEFAULT
SET AUTO_INCREMENT_INCREMENT = 1;
+
+--echo # MDEV-24348 InnoDB shutdown hang with innodb_flush_sync=0
+SET GLOBAL innodb_flush_sync=OFF;
+--echo # For the server to hang, we must have pages for temporary tables
+--echo # (and the bug depended on MDEV-12227 not being fixed).
+CREATE TEMPORARY TABLE t (id SERIAL) ENGINE=InnoDB;
+SET debug_dbug= '+d,ib_log_flush_ahead';
+
INSERT INTO t1 VALUES(NULL);
SELECT * FROM t1;
SHOW CREATE TABLE t1;
diff --git a/mysql-test/suite/innodb/t/buf_pool_resize_oom.test b/mysql-test/suite/innodb/t/buf_pool_resize_oom.test
index b0aa20b566f..c5af10ef3d3 100644
--- a/mysql-test/suite/innodb/t/buf_pool_resize_oom.test
+++ b/mysql-test/suite/innodb/t/buf_pool_resize_oom.test
@@ -7,7 +7,7 @@
--echo # ONLINE WITH MEMORY FULL CONDITION
--echo #
-call mtr.add_suppression("InnoDB: .* failed to allocate the chunk array");
+call mtr.add_suppression("InnoDB: failed to allocate the chunk array");
SET GLOBAL innodb_disable_resize_buffer_pool_debug=OFF;
SET GLOBAL debug_dbug='+d,buf_pool_resize_chunk_null';
diff --git a/mysql-test/suite/innodb/t/corrupted_during_recovery.test b/mysql-test/suite/innodb/t/corrupted_during_recovery.test
index 5f1de1bedf9..31fd1f18b8a 100644
--- a/mysql-test/suite/innodb/t/corrupted_during_recovery.test
+++ b/mysql-test/suite/innodb/t/corrupted_during_recovery.test
@@ -4,8 +4,8 @@
call mtr.add_suppression("InnoDB: Plugin initialization aborted");
call mtr.add_suppression("Plugin 'InnoDB' init function returned error");
call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed");
-call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed file read of tablespace test/t1 page");
-call mtr.add_suppression("InnoDB: Failed to read file '.*test.t1\\.ibd' at offset 3: Page read from tablespace is corrupted.");
+call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed read of file '.*test.t1\\.ibd' page");
+call mtr.add_suppression("InnoDB: Failed to read page 3 from file '.*test.t1\\.ibd': Page read from tablespace is corrupted.");
call mtr.add_suppression("InnoDB: Background Page read failed to read or decrypt \\[page id: space=\\d+, page number=3\\]");
call mtr.add_suppression("InnoDB: Table `test`.`t1` is corrupted. Please drop the table and recreate.");
--enable_query_log
diff --git a/mysql-test/suite/innodb/t/doublewrite.test b/mysql-test/suite/innodb/t/doublewrite.test
index 62e8549f21b..bd4f5fadcc3 100644
--- a/mysql-test/suite/innodb/t/doublewrite.test
+++ b/mysql-test/suite/innodb/t/doublewrite.test
@@ -19,8 +19,9 @@ call mtr.add_suppression("InnoDB: New log files created");
call mtr.add_suppression("InnoDB: Cannot create doublewrite buffer: the first file in innodb_data_file_path must be at least (3|6|12)M\\.");
call mtr.add_suppression("InnoDB: Database creation was aborted");
call mtr.add_suppression("Plugin 'InnoDB' (init function returned error|registration as a STORAGE ENGINE failed)");
-call mtr.add_suppression("InnoDB: A bad Space ID was found in datafile.*");
-call mtr.add_suppression("InnoDB: Checksum mismatch in datafile: .*");
+call mtr.add_suppression("InnoDB: A bad Space ID was found in datafile");
+call mtr.add_suppression("InnoDB: Checksum mismatch in datafile: ");
+call mtr.add_suppression("InnoDB: Inconsistent tablespace ID in .*t1\\.ibd");
--enable_query_log
--source include/restart_mysqld.inc
@@ -33,6 +34,10 @@ show variables like 'innodb_doublewrite';
show variables like 'innodb_fil_make_page_dirty_debug';
show variables like 'innodb_saved_page_number_debug';
+connect (stop_purge,localhost,root,,);
+START TRANSACTION WITH CONSISTENT SNAPSHOT;
+connection default;
+
create table t1 (f1 int primary key, f2 blob) engine=innodb;
start transaction;
@@ -50,12 +55,10 @@ commit work;
select space from information_schema.innodb_sys_tables
where name = 'test/t1' into @space_id;
---echo # Ensure that dirty pages of table t1 is flushed.
-flush tables t1 for export;
-unlock tables;
-
begin;
insert into t1 values (6, repeat('%', 12));
+--echo # Ensure that dirty pages of table t1 are flushed.
+set global innodb_buf_flush_list_now = 1;
--source ../include/no_checkpoint_start.inc
@@ -68,6 +71,7 @@ set global innodb_buf_flush_list_now = 1;
--let CLEANUP_IF_CHECKPOINT=drop table t1;
--source ../include/no_checkpoint_end.inc
+disconnect stop_purge;
--echo # Make the first page (page_no=0) of the user tablespace
--echo # full of zeroes.
@@ -444,7 +448,7 @@ WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
--let $ibp=--innodb-log-group-home-dir=$bugdir --innodb-data-home-dir=$bugdir
---let $ibd=$ibp --innodb-undo-tablespaces=0 --innodb-log-files-in-group=2
+--let $ibd=$ibp --innodb-undo-tablespaces=0
--let $ibp=$ibp --innodb-data-file-path=ibdata1:1M;ibdata2:1M:autoextend
--let $restart_parameters= $ibp
@@ -458,5 +462,4 @@ eval $check_no_innodb;
--remove_file $bugdir/ibdata1
--remove_file $bugdir/ibdata2
--remove_file $bugdir/ib_logfile0
---remove_file $bugdir/ib_logfile1
--rmdir $bugdir
diff --git a/mysql-test/suite/innodb/t/encryption_threads_shutdown.opt b/mysql-test/suite/innodb/t/encryption_threads_shutdown.opt
new file mode 100644
index 00000000000..e5a02a1a1c9
--- /dev/null
+++ b/mysql-test/suite/innodb/t/encryption_threads_shutdown.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/innodb/t/encryption_threads_shutdown.test b/mysql-test/suite/innodb/t/encryption_threads_shutdown.test
new file mode 100644
index 00000000000..5a63df5db86
--- /dev/null
+++ b/mysql-test/suite/innodb/t/encryption_threads_shutdown.test
@@ -0,0 +1,32 @@
+# This test is for MDEV-24612 fix
+--source include/have_innodb.inc
+--source include/not_embedded.inc
+
+call mtr.add_suppression("Creating system tablespace with existing redo log file is not recommended.");
+call mtr.add_suppression("InnoDB: Database creation was aborted");
+call mtr.add_suppression("Plugin 'InnoDB' init function returned error.");
+call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed.");
+
+--let $MYSQLD_DATADIR=`SELECT @@datadir`
+--let $DATA= $MYSQLD_DATADIR/ibdata1
+--let $DATACOPY=$MYSQLTEST_VARDIR/tmp/ibdata1
+CREATE TABLE t(a INT) ENGINE=InnoDB;
+--source include/kill_mysqld.inc
+# Move the file to cause srv_init_abort_low() call from srv_start()
+--move_file $DATA $DATACOPY
+
+# If the bug is not fixed, the server will hang here. Note that the test is
+# unstable because the condition
+# "srv_n_fil_crypt_threads_started != srv_n_fil_crypt_threads" can be true
+# in fil_crypt_set_thread_cnt() functions if encryption threads have not yet
+# been finished. To make the test stable we need to add debug code which would
+# check that all encryption threads were finished before the "while" loop
+# with the above condition. And in this test we can't detect if the debug code
+# itself caused the hang or the code we are testing did it.
+--source include/start_mysqld.inc
+--error ER_UNKNOWN_STORAGE_ENGINE
+SELECT * FROM t;
+--source include/kill_mysqld.inc
+--move_file $DATACOPY $DATA
+--source include/start_mysqld.inc
+DROP TABLE t;
diff --git a/mysql-test/suite/innodb/t/flush.opt b/mysql-test/suite/innodb/t/flush.opt
new file mode 100644
index 00000000000..99dbd8f47c3
--- /dev/null
+++ b/mysql-test/suite/innodb/t/flush.opt
@@ -0,0 +1 @@
+--innodb-open-files=10
diff --git a/mysql-test/suite/innodb/t/flush.test b/mysql-test/suite/innodb/t/flush.test
new file mode 100644
index 00000000000..e03728825cf
--- /dev/null
+++ b/mysql-test/suite/innodb/t/flush.test
@@ -0,0 +1,19 @@
+--source include/have_innodb.inc
+
+SELECT @@GLOBAL.innodb_open_files;
+
+CREATE TABLE t0 (a INT) ENGINE=InnoDB;
+# Ensure that the created table t0 is clean.
+FLUSH TABLE t0 WITH READ LOCK;
+UNLOCK TABLES;
+CREATE TABLE t1 (a INT) ENGINE=InnoDB;
+CREATE TABLE t2 (a INT) ENGINE=InnoDB;
+CREATE TABLE t3 (a INT) ENGINE=InnoDB;
+CREATE TABLE t4 (a INT) ENGINE=InnoDB;
+CREATE TABLE t5 (a INT) ENGINE=InnoDB;
+CREATE TABLE t6 (a INT) ENGINE=InnoDB;
+CREATE TABLE t7 (a INT) ENGINE=InnoDB;
+# Now, the data file for t0 should not be open anymore.
+FLUSH TABLE t0 WITH READ LOCK;
+UNLOCK TABLES;
+DROP TABLE t0, t1, t2, t3, t4, t5, t6, t7;
diff --git a/mysql-test/suite/innodb/t/foreign_key.combinations b/mysql-test/suite/innodb/t/foreign_key.combinations
new file mode 100644
index 00000000000..53d4cff5ca7
--- /dev/null
+++ b/mysql-test/suite/innodb/t/foreign_key.combinations
@@ -0,0 +1,5 @@
+[read-ahead]
+--innodb-random-read-ahead=ON
+
+[normal]
+--innodb-random-read-ahead=OFF
diff --git a/mysql-test/suite/innodb/t/foreign_key.test b/mysql-test/suite/innodb/t/foreign_key.test
index a413ea43646..be248a5bed4 100644
--- a/mysql-test/suite/innodb/t/foreign_key.test
+++ b/mysql-test/suite/innodb/t/foreign_key.test
@@ -846,4 +846,62 @@ SET FOREIGN_KEY_CHECKS=DEFAULT;
-- echo # End of 10.4 tests
+--echo #
+--echo # MDEV-20729 Fix REFERENCES constraint in column definition
+--echo #
+set default_storage_engine= innodb;
+create table t1 (x int primary key, y int unique);
+create table t2 (x int references t1(x), y int constraint fk references t1(y));
+show create table t2;
+create table t3 (z int);
+alter table t3 add x int references t1(x), add y int constraint fk2 references t1(y);
+show create table t3;
+drop tables t3, t2, t1;
+
+create table t1 (id int primary key);
+--error ER_CANT_CREATE_TABLE
+create table t2 (id2 int references t1);
+create table t2 (id int references t1);
+show create table t2;
+drop tables t2, t1;
+
+set default_storage_engine= default;
+
+--echo #
+--echo # MDEV-21690 LeakSanitizer: detected memory leaks in mem_heap_create_block_func
+--echo #
+SET FOREIGN_KEY_CHECKS=1;
+CREATE TABLE t1 (a TEXT, b TEXT) ENGINE=InnoDB;
+--error ER_CANT_CREATE_TABLE
+ALTER TABLE t1 ADD FOREIGN KEY (a) REFERENCES t1 (b);
+SET FOREIGN_KEY_CHECKS=DEFAULT;
+
+# Cleanup
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-22602 Disable UPDATE CASCADE for SQL constraints
+--echo #
+--echo # TODO: enable them after MDEV-16417 is finished
+create or replace table t1 (a int primary key) engine=innodb;
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+create or replace table t2 (a int, check(a > 0), foreign key(a) references t1(a) on update cascade) engine=innodb;
+
+create or replace table t1 (f1 int, f2 date, f3 date, key(f1,f3,f2)) engine=innodb;
+--error ER_KEY_CANT_HAVE_WITHOUT_OVERLAPS
+create or replace table t2 (
+ a int, s date, e date,
+ period for p (s, e),
+ primary key (a, p without overlaps),
+ foreign key (a, e, s) references t1 (f1, f3, f2) on delete cascade on update cascade) engine=innodb;
+
+# FK on long unique is already disabled
+create or replace table t1 (a varchar(4096) unique) engine=innodb;
+--error ER_CANT_CREATE_TABLE
+create or replace table t2 (pk int primary key, a varchar(4096) unique, foreign key(a) references t1(a) on update cascade) engine=innodb;
+
+drop table t1;
+
+--echo # End of 10.5 tests
+
--source include/wait_until_count_sessions.inc
diff --git a/mysql-test/suite/innodb/t/full_crc32_import.opt b/mysql-test/suite/innodb/t/full_crc32_import.opt
deleted file mode 100644
index ac859973988..00000000000
--- a/mysql-test/suite/innodb/t/full_crc32_import.opt
+++ /dev/null
@@ -1 +0,0 @@
---innodb_checksum_algorithm=full_crc32
diff --git a/mysql-test/suite/innodb/t/full_crc32_import.test b/mysql-test/suite/innodb/t/full_crc32_import.test
index c9195111c05..c50e3899fc8 100644
--- a/mysql-test/suite/innodb/t/full_crc32_import.test
+++ b/mysql-test/suite/innodb/t/full_crc32_import.test
@@ -15,6 +15,7 @@ CREATE TABLE t1
c blob,
KEY (b(200))) ENGINE=InnoDB ROW_FORMAT=COMPACT;
+BEGIN;
INSERT INTO t1 (b, c) values (repeat("ab", 200), repeat("bc", 200));
INSERT INTO t1 (b, c) values (repeat("bc", 200), repeat("cd", 200));
INSERT INTO t1 (b, c) values (repeat("cd", 200), repeat("ef", 200));
@@ -27,6 +28,7 @@ INSERT INTO t1 (b, c) values (repeat("ij", 200), repeat("kl", 200));
INSERT INTO t1 (b, c) values (repeat("jk", 200), repeat("lm", 200));
INSERT INTO t1 (b, c) SELECT b,c FROM t1 ORDER BY a;
INSERT INTO t1 (b, c) SELECT b,c FROM t1 ORDER BY a;
+COMMIT;
SELECT COUNT(*) FROM t1;
FLUSH TABLE t1 FOR EXPORT;
@@ -98,6 +100,7 @@ INSERT INTO t1(c2,c3) VALUES(
ST_GeomFromText('POINT(60 50)'),
ST_GeomFromText('LINESTRING(10 15,20 44,35 32)'));
+BEGIN;
INSERT INTO t1(c2, c3) SELECT c2, c3 FROM t1;
INSERT INTO t1(c2, c3) SELECT c2, c3 FROM t1;
INSERT INTO t1(c2, c3) SELECT c2, c3 FROM t1;
@@ -109,6 +112,7 @@ INSERT INTO t1(c2, c3) SELECT c2, c3 FROM t1;
INSERT INTO t1(c2, c3) SELECT c2, c3 FROM t1;
INSERT INTO t1(c2, c3) SELECT c2, c3 FROM t1;
INSERT INTO t1(c2, c3) SELECT c2, c3 FROM t1;
+COMMIT;
FLUSH TABLE t1 FOR EXPORT;
--echo # List before copying files
diff --git a/mysql-test/suite/innodb/t/gap_locks.test b/mysql-test/suite/innodb/t/gap_locks.test
new file mode 100644
index 00000000000..77ce2c842b1
--- /dev/null
+++ b/mysql-test/suite/innodb/t/gap_locks.test
@@ -0,0 +1,29 @@
+--source include/have_innodb.inc
+
+CREATE TABLE t1(a INT PRIMARY KEY, b VARCHAR(40), c INT, INDEX(b,c))
+ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1,'1',1),(2,'2',1);
+
+SET @save_locks= @@GLOBAL.innodb_status_output_locks;
+SET GLOBAL INNODB_STATUS_OUTPUT_LOCKS = 'ON';
+
+let $isolation= 4;
+while ($isolation) {
+let $tx_isolation= `SELECT CASE $isolation
+WHEN 1 THEN 'READ UNCOMMITTED'
+WHEN 2 THEN 'READ COMMITTED'
+WHEN 3 THEN 'REPEATABLE READ'
+ELSE 'SERIALIZABLE' END`;
+
+eval SET TRANSACTION ISOLATION LEVEL $tx_isolation;
+BEGIN;
+DELETE FROM t1 WHERE b='2' AND c=2;
+--replace_regex /.*(\d+ lock struct...), heap size \d+(, \d+ row lock...).*/\1\2/
+SHOW ENGINE INNODB STATUS;
+ROLLBACK;
+
+dec $isolation;
+}
+
+SET GLOBAL INNODB_STATUS_OUTPUT_LOCKS = @save_locks;
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/t/group_commit_binlog_pos-master.opt b/mysql-test/suite/innodb/t/group_commit_binlog_pos-master.opt
index 425fda95086..590d44a6d12 100644
--- a/mysql-test/suite/innodb/t/group_commit_binlog_pos-master.opt
+++ b/mysql-test/suite/innodb/t/group_commit_binlog_pos-master.opt
@@ -1 +1 @@
---skip-stack-trace --skip-core-file
+--loose-skip-stack-trace --skip-core-file
diff --git a/mysql-test/suite/innodb/t/group_commit_binlog_pos_no_optimize_thread-master.opt b/mysql-test/suite/innodb/t/group_commit_binlog_pos_no_optimize_thread-master.opt
index 18d43988ffd..b8c4666a730 100644
--- a/mysql-test/suite/innodb/t/group_commit_binlog_pos_no_optimize_thread-master.opt
+++ b/mysql-test/suite/innodb/t/group_commit_binlog_pos_no_optimize_thread-master.opt
@@ -1 +1 @@
---binlog-optimize-thread-scheduling=0 --skip-stack-trace --skip-core-file
+--binlog-optimize-thread-scheduling=0 --loose-skip-stack-trace --skip-core-file
diff --git a/mysql-test/suite/innodb/t/group_commit_crash-master.opt b/mysql-test/suite/innodb/t/group_commit_crash-master.opt
index 425fda95086..590d44a6d12 100644
--- a/mysql-test/suite/innodb/t/group_commit_crash-master.opt
+++ b/mysql-test/suite/innodb/t/group_commit_crash-master.opt
@@ -1 +1 @@
---skip-stack-trace --skip-core-file
+--loose-skip-stack-trace --skip-core-file
diff --git a/mysql-test/suite/innodb/t/group_commit_crash_no_optimize_thread-master.opt b/mysql-test/suite/innodb/t/group_commit_crash_no_optimize_thread-master.opt
index 18d43988ffd..b8c4666a730 100644
--- a/mysql-test/suite/innodb/t/group_commit_crash_no_optimize_thread-master.opt
+++ b/mysql-test/suite/innodb/t/group_commit_crash_no_optimize_thread-master.opt
@@ -1 +1 @@
---binlog-optimize-thread-scheduling=0 --skip-stack-trace --skip-core-file
+--binlog-optimize-thread-scheduling=0 --loose-skip-stack-trace --skip-core-file
diff --git a/mysql-test/suite/innodb/t/group_commit_force_recovery-master.opt b/mysql-test/suite/innodb/t/group_commit_force_recovery-master.opt
new file mode 100644
index 00000000000..65470e63e44
--- /dev/null
+++ b/mysql-test/suite/innodb/t/group_commit_force_recovery-master.opt
@@ -0,0 +1 @@
+--innodb-force-recovery=2
diff --git a/mysql-test/suite/innodb/t/group_commit_force_recovery.test b/mysql-test/suite/innodb/t/group_commit_force_recovery.test
new file mode 100644
index 00000000000..0e4767476ef
--- /dev/null
+++ b/mysql-test/suite/innodb/t/group_commit_force_recovery.test
@@ -0,0 +1,21 @@
+# MDEV-24302 RESET MASTER hangs as Innodb does not report on binlog checkpoint
+# Testing binlog checkpoint notification works under stringent condition
+# set by innodb_force_recovery = 2.
+
+--source include/have_innodb.inc
+--source include/have_binlog_format_mixed.inc
+
+# Binlog checkpoint notification consumers such as RESET MASTER
+# receive one when lsn_0 at the time of the request is finally gets flushed
+# flush_lsn >= lsn_0
+# The bug situation was that when lsn_0 reflects a write of an internal innodb trx
+# and RESET MASTER was not followed by any more user transaction
+# it would hang.
+
+CREATE TABLE t1(a int) ENGINE=InnoDB;
+INSERT INTO t1 SET a=1;
+RESET MASTER;
+
+# final cleanup
+DROP TABLE t1;
+--echo End of the tests.
diff --git a/mysql-test/suite/innodb/t/ibuf_not_empty.combinations b/mysql-test/suite/innodb/t/ibuf_not_empty.combinations
index 729380593f3..c4b45dcca32 100644
--- a/mysql-test/suite/innodb/t/ibuf_not_empty.combinations
+++ b/mysql-test/suite/innodb/t/ibuf_not_empty.combinations
@@ -1,5 +1,9 @@
[strict_crc32]
--innodb-checksum-algorithm=strict_crc32
+--innodb-page-size=4k
+--innodb-force-recovery=2
[strict_full_crc32]
--innodb-checksum-algorithm=strict_full_crc32
+--innodb-page-size=4k
+--innodb-force-recovery=2
diff --git a/mysql-test/suite/innodb/t/ibuf_not_empty.test b/mysql-test/suite/innodb/t/ibuf_not_empty.test
index a3f4ad9ac5c..545a78c887e 100644
--- a/mysql-test/suite/innodb/t/ibuf_not_empty.test
+++ b/mysql-test/suite/innodb/t/ibuf_not_empty.test
@@ -3,10 +3,8 @@
--source include/have_debug.inc
# Embedded server tests do not support restarting
--source include/not_embedded.inc
-# The test is not big enough to use change buffering with larger page size.
---source include/have_innodb_max_16k.inc
+--source include/have_sequence.inc
-SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
--disable_query_log
call mtr.add_suppression("InnoDB: Failed to find tablespace for table `test`\\.`t1` in the cache\\. Attempting to load the tablespace with space id");
call mtr.add_suppression("InnoDB: Allocated tablespace ID \\d+ for test.t1, old maximum was");
@@ -30,27 +28,10 @@ SET GLOBAL innodb_change_buffering_debug = 1;
# Create enough rows for the table, so that the change buffer will be
# used for modifying the secondary index page. There must be multiple
# index pages, because changes to the root page are never buffered.
-BEGIN;
-INSERT INTO t1 VALUES(0,'x',1);
-INSERT INTO t1 SELECT 0,b,c FROM t1;
-INSERT INTO t1 SELECT 0,b,c FROM t1;
-INSERT INTO t1 SELECT 0,b,c FROM t1;
-INSERT INTO t1 SELECT 0,b,c FROM t1;
-INSERT INTO t1 SELECT 0,b,c FROM t1;
-INSERT INTO t1 SELECT 0,b,c FROM t1;
-INSERT INTO t1 SELECT 0,b,c FROM t1;
-INSERT INTO t1 SELECT 0,b,c FROM t1;
-INSERT INTO t1 SELECT 0,b,c FROM t1;
-INSERT INTO t1 SELECT 0,b,c FROM t1;
-INSERT INTO t1 SELECT 0,b,c FROM t1;
-INSERT INTO t1 SELECT 0,b,c FROM t1;
-COMMIT;
+INSERT INTO t1 SELECT 0,'x',1 FROM seq_1_to_1024;
let MYSQLD_DATADIR=`select @@datadir`;
let PAGE_SIZE=`select @@innodb_page_size`;
-# Ensure that purge will not access the truncated .ibd file
---source include/wait_all_purged.inc
-
--source include/shutdown_mysqld.inc
# Corrupt the change buffer bitmap, to claim that pages are clean
@@ -87,7 +68,7 @@ EOF
--let $restart_parameters= --innodb-force-recovery=6 --innodb-change-buffer-dump
--source include/start_mysqld.inc
---replace_regex /contains \d+ entries/contains #### entries/
+--replace_regex /contains \d+ entries/contains 990 entries/
check table t1;
--source include/shutdown_mysqld.inc
diff --git a/mysql-test/suite/innodb/t/import_corrupted.test b/mysql-test/suite/innodb/t/import_corrupted.test
index 22b4bbbdc8b..976cbe03dbb 100644
--- a/mysql-test/suite/innodb/t/import_corrupted.test
+++ b/mysql-test/suite/innodb/t/import_corrupted.test
@@ -2,7 +2,7 @@
call mtr.add_suppression("Table `test`.`t2` should have 2 indexes but the tablespace has 1 indexes");
call mtr.add_suppression("Index for table 't2' is corrupt; try to repair it");
-call mtr.add_suppression("Trying to read page number 23 in space .*, space name test/t2, which is outside the tablespace bounds. Byte offset 0, len 16384");
+call mtr.add_suppression("Trying to read .* bytes at .* outside the bounds of the file: \\..test.t2\\.ibd");
let MYSQLD_DATADIR = `SELECT @@datadir`;
diff --git a/mysql-test/suite/innodb/t/index_vcol_purge_startup.test b/mysql-test/suite/innodb/t/index_vcol_purge_startup.test
new file mode 100644
index 00000000000..ccc07fe7314
--- /dev/null
+++ b/mysql-test/suite/innodb/t/index_vcol_purge_startup.test
@@ -0,0 +1,28 @@
+source include/have_innodb.inc;
+# need to restart server
+source include/not_embedded.inc;
+
+call mtr.add_suppression('SQL_ERROR_LOG');
+call mtr.add_suppression('Failed to initialize plugins');
+call mtr.add_suppression('Aborting');
+
+if (!$SQL_ERRLOG_SO) {
+ skip No SQL_ERROR_LOG plugin;
+}
+
+create table t1(a int primary key, b int as (100-a*a), index(b)) engine=innodb;
+insert t1 (a) values(1),(2),(3);
+start transaction;
+select * from t1 order by a;
+connect(con1, localhost, root);
+delete from t1 where a=2;
+flush tables;
+connection default;
+source include/kill_mysqld.inc;
+echo # Failed restart;
+error 1;
+exec $MYSQLD_LAST_CMD --plugin-load-add=$SQL_ERRLOG_SO --sql-error-log=FORCE --sql-error-log-filename=$MYSQLTEST_VARDIR/nonexistent/nonexistent;
+echo # Start the server;
+source include/start_mysqld.inc;
+select * from t1 order by a;
+drop table t1;
diff --git a/mysql-test/suite/innodb/t/information_schema_grants.opt b/mysql-test/suite/innodb/t/information_schema_grants.opt
index ce08c46f047..38c5e3cf1cd 100644
--- a/mysql-test/suite/innodb/t/information_schema_grants.opt
+++ b/mysql-test/suite/innodb/t/information_schema_grants.opt
@@ -30,4 +30,3 @@
--enable-plugin-innodb-mutexes
--enable-plugin-innodb-sys-semaphore-waits
--enable-plugin-innodb-tablespaces-encryption
---enable-plugin-innodb-tablespaces-scrubbing
diff --git a/mysql-test/suite/innodb/t/information_schema_grants.test b/mysql-test/suite/innodb/t/information_schema_grants.test
index 34565f76352..72982b3ec1c 100644
--- a/mysql-test/suite/innodb/t/information_schema_grants.test
+++ b/mysql-test/suite/innodb/t/information_schema_grants.test
@@ -103,9 +103,6 @@ create sql security definer view d_sys_virtual as select * from information_sche
create sql security invoker view i_tablespaces_encryption as select * from information_schema.innodb_tablespaces_encryption;
create sql security definer view d_tablespaces_encryption as select * from information_schema.innodb_tablespaces_encryption;
-create sql security invoker view i_tablespaces_scrubbing as select * from information_schema.innodb_tablespaces_scrubbing;
-create sql security definer view d_tablespaces_scrubbing as select * from information_schema.innodb_tablespaces_scrubbing;
-
create sql security invoker view i_trx as select * from information_schema.innodb_trx;
create sql security definer view d_trx as select * from information_schema.innodb_trx;
@@ -294,12 +291,6 @@ select count(*) > -1 from i_tablespaces_encryption;
select count(*) > -1 from d_tablespaces_encryption;
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
-select count(*) > -1 from information_schema.innodb_tablespaces_scrubbing;
---error ER_SPECIFIC_ACCESS_DENIED_ERROR
-select count(*) > -1 from i_tablespaces_scrubbing;
-select count(*) > -1 from d_tablespaces_scrubbing;
-
---error ER_SPECIFIC_ACCESS_DENIED_ERROR
select count(*) > -1 from information_schema.innodb_trx;
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
select count(*) > -1 from i_trx;
diff --git a/mysql-test/suite/innodb/t/innodb-alter-debug.test b/mysql-test/suite/innodb/t/innodb-alter-debug.test
index 00300bfdccc..7fbbb3159ee 100644
--- a/mysql-test/suite/innodb/t/innodb-alter-debug.test
+++ b/mysql-test/suite/innodb/t/innodb-alter-debug.test
@@ -130,5 +130,17 @@ reap;
UNLOCK TABLES;
DROP TABLE t1;
+--echo #
+--echo # MDEV-7318 RENAME INDEX
+--echo #
+CREATE TABLE t (c1 INT, c2 INT, KEY i2 (c2)) ENGINE=INNODB;
+
+SET DEBUG_DBUG= '+d,ib_rename_index_fail1';
+-- error ER_LOCK_DEADLOCK
+ALTER TABLE t RENAME INDEX i2 to x, ALGORITHM=INPLACE;
+SET DEBUG_DBUG = @saved_debug_dbug;
+
+DROP TABLE t;
+
# 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 0bedbdc7bbb..c8d2500076f 100644
--- a/mysql-test/suite/innodb/t/innodb-alter.test
+++ b/mysql-test/suite/innodb/t/innodb-alter.test
@@ -583,10 +583,14 @@ DROP TABLE t1, parent;
--echo #BUG#21514135 SCHEMA MISMATCH ERROR WHEN IMPORTING TABLESPACE AFTER
--echo #DROPPING AN INDEX
--echo #
+
+--disable_query_log
+call mtr.add_suppression("\\[Warning\\] InnoDB: Unknown index id .* on page");
+--enable_query_log
+
let $source_db = source_db;
let $dest_db = dest_db;
---source include/default_charset.inc
SET NAMES utf8mb4;
eval CREATE DATABASE $source_db;
diff --git a/mysql-test/suite/innodb/t/innodb-analyze.test b/mysql-test/suite/innodb/t/innodb-analyze.test
index 0fec9968c1f..db699ad41a0 100644
--- a/mysql-test/suite/innodb/t/innodb-analyze.test
+++ b/mysql-test/suite/innodb/t/innodb-analyze.test
@@ -1,21 +1,17 @@
--source include/have_innodb.inc
#
# Test that mysqld does not crash when running ANALYZE TABLE with
-# different values of the parameter innodb_stats_sample_pages.
+# different values of the parameter innodb_stats_transient_sample_pages.
#
# we care only that the following SQL commands do not produce errors
# and do not crash the server
-- disable_query_log
--- disable_result_log
-- enable_warnings
-let $sample_pages=`select @@innodb_stats_sample_pages`;
-SET GLOBAL innodb_stats_sample_pages=0;
-
-# check that the value has been adjusted to 1
--- enable_result_log
-SHOW VARIABLES LIKE 'innodb_stats_sample_pages';
+SET @save_sample_pages = @@GLOBAL.innodb_stats_transient_sample_pages;
+SET GLOBAL innodb_stats_transient_sample_pages=0;
+SHOW VARIABLES LIKE 'innodb_stats_transient_sample_pages';
-- disable_result_log
CREATE TABLE innodb_analyze (
@@ -29,36 +25,36 @@ CREATE TABLE innodb_analyze (
ANALYZE TABLE innodb_analyze;
-SET GLOBAL innodb_stats_sample_pages=2;
+SET GLOBAL innodb_stats_transient_sample_pages=2;
ANALYZE TABLE innodb_analyze;
-SET GLOBAL innodb_stats_sample_pages=4;
+SET GLOBAL innodb_stats_transient_sample_pages=4;
ANALYZE TABLE innodb_analyze;
-SET GLOBAL innodb_stats_sample_pages=8;
+SET GLOBAL innodb_stats_transient_sample_pages=8;
ANALYZE TABLE innodb_analyze;
-SET GLOBAL innodb_stats_sample_pages=16;
+SET GLOBAL innodb_stats_transient_sample_pages=16;
ANALYZE TABLE innodb_analyze;
INSERT INTO innodb_analyze VALUES
(1,1), (1,1), (1,2), (1,3), (1,4), (1,5),
(8,1), (8,8), (8,2), (7,1), (1,4), (3,5);
-SET GLOBAL innodb_stats_sample_pages=1;
+SET GLOBAL innodb_stats_transient_sample_pages=1;
ANALYZE TABLE innodb_analyze;
-SET GLOBAL innodb_stats_sample_pages=2;
+SET GLOBAL innodb_stats_transient_sample_pages=2;
ANALYZE TABLE innodb_analyze;
-SET GLOBAL innodb_stats_sample_pages=4;
+SET GLOBAL innodb_stats_transient_sample_pages=4;
ANALYZE TABLE innodb_analyze;
-SET GLOBAL innodb_stats_sample_pages=8;
+SET GLOBAL innodb_stats_transient_sample_pages=8;
ANALYZE TABLE innodb_analyze;
-SET GLOBAL innodb_stats_sample_pages=16;
+SET GLOBAL innodb_stats_transient_sample_pages=16;
ANALYZE TABLE innodb_analyze;
DROP TABLE innodb_analyze;
-EVAL SET GLOBAL innodb_stats_sample_pages=$sample_pages;
+SET GLOBAL innodb_stats_transient_sample_pages = @save_sample_pages;
diff --git a/mysql-test/suite/innodb/t/innodb-change-buffer-recovery.test b/mysql-test/suite/innodb/t/innodb-change-buffer-recovery.test
index 79d9cc814a0..a12ca43cec1 100644
--- a/mysql-test/suite/innodb/t/innodb-change-buffer-recovery.test
+++ b/mysql-test/suite/innodb/t/innodb-change-buffer-recovery.test
@@ -76,6 +76,6 @@ SET GLOBAL innodb_fast_shutdown=0;
--let $restart_parameters=
--source include/restart_mysqld.inc
CHECK TABLE t1;
-replace_regex /.*operations:.* (insert.*), delete \d.*discarded .*/\1/;
+replace_regex /.*operations:.* insert [1-9][0-9]*, delete mark [1-9][0-9]*, delete \d.*discarded .*//;
SHOW ENGINE INNODB STATUS;
DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/t/innodb-fk-warnings.test b/mysql-test/suite/innodb/t/innodb-fk-warnings.test
index 55284179692..8a0ed5815b8 100644
--- a/mysql-test/suite/innodb/t/innodb-fk-warnings.test
+++ b/mysql-test/suite/innodb/t/innodb-fk-warnings.test
@@ -15,7 +15,7 @@ CREATE TABLE t1 (
# Below create table fails because constraint name test
# is reserved for above table.
#
---error 1005
+--error ER_CANT_CREATE_TABLE
CREATE TABLE t2 (
id int(11) NOT NULL PRIMARY KEY,
a int(11) NOT NULL,
@@ -37,18 +37,24 @@ drop table t1;
# No index for referenced columns
#
create table t1(a int) engine=innodb;
---error 1005
+--error ER_CANT_CREATE_TABLE
create table t2(a int, constraint a foreign key a (a) references t1(a)) engine=innodb;
show warnings;
drop table t1;
+create table t1(a int unique, b int) engine=innodb;
+--error ER_CANT_CREATE_TABLE
+create table t2(a int, b int, foreign key (a) references t1(a), foreign key (b) references t1(b)) engine=innodb;
+show warnings;
+drop table t1;
+
create table t1(a int not null primary key, b int) engine=innodb;
---error 1005
+--error ER_CANT_CREATE_TABLE
create table t2(a int, b int, constraint a foreign key a (a) references t1(a),
constraint a foreign key a (a) references t1(b)) engine=innodb;
show warnings;
create table t2(a int, b int, constraint a foreign key a (a) references t1(a)) engine=innodb;
---error 1005
+--error ER_CANT_CREATE_TABLE
alter table t2 add constraint b foreign key (b) references t2(b);
show warnings;
drop table t2, t1;
@@ -58,7 +64,7 @@ drop table t2, t1;
#
create table t1 (f1 integer primary key) engine=innodb;
---error 1005
+--error ER_CANT_CREATE_TABLE
alter table t1 add constraint c1 foreign key (f1) references t11(f1);
show warnings;
drop table t1;
@@ -83,10 +89,10 @@ create temporary table t1(a int not null primary key, b int, key(b)) engine=inno
--echo Warning 150 Alter table `mysqld.1`.`t1` with foreign key constraint failed. Referenced table `mysqld.1`.`t1` not found in the data dictionary close to foreign key(b) references t1(a).
--echo Error 1005 Can't create table `test`.`#sql-temporary` (errno: 150 "Foreign key constraint is incorrectly formed")
--echo Warning 1215 Cannot add foreign key constraint
---error 1005
+--error ER_CANT_CREATE_TABLE
create temporary table t2(a int, foreign key(a) references t1(a)) engine=innodb;
show warnings;
---error 1005
+--error ER_CANT_CREATE_TABLE
alter table t1 add foreign key(b) references t1(a);
show warnings;
drop table t1;
@@ -109,10 +115,10 @@ drop table t1;
# ON UPDATE/DELETE SET NULL on NOT NULL column
#
create table t1 (f1 integer not null primary key) engine=innodb;
---error 1005
+--error ER_CANT_CREATE_TABLE
alter table t1 add constraint c1 foreign key (f1) references t1(f1) on update set null;
show warnings;
---error 1005
+--error ER_CANT_CREATE_TABLE
create table t2(a int not null, foreign key(a) references t1(f1) on delete set null) engine=innodb;
show warnings;
drop table t1;
@@ -121,7 +127,7 @@ drop table t1;
# Incorrect types
#
create table t1 (id int not null primary key, f1 int, f2 int, key(f1)) engine=innodb;
---error 1005
+--error ER_CANT_CREATE_TABLE
create table t2(a char(20), key(a), foreign key(a) references t1(f1)) engine=innodb;
show warnings;
drop table t1;
diff --git a/mysql-test/suite/innodb/t/innodb-fk.test b/mysql-test/suite/innodb/t/innodb-fk.test
index 8809dc55966..6d5307a1f84 100644
--- a/mysql-test/suite/innodb/t/innodb-fk.test
+++ b/mysql-test/suite/innodb/t/innodb-fk.test
@@ -226,3 +226,37 @@ ADD FOREIGN KEY (`b`) REFERENCES `bor#oda`(`id`);
SHOW CREATE TABLE `bor#oda`;
DROP TABLE `bor#oda`;
+
+--echo #
+--echo # MDEV-21127 Assertion `(size_t)(ptr - buf) < MAX_TEXT - 4' failed in key_text::key_text
+--echo #
+--error ER_CANT_CREATE_TABLE
+CREATE TABLE t1 (
+ a012345678901234567890123456789012345678901 char(255),
+ b char(255),
+ FOREIGN KEY ( a012345678901234567890123456789012345678901, b ) REFERENCES tx (ax, bx)
+) ENGINE=InnoDB;
+
+--error ER_CANT_CREATE_TABLE
+CREATE TABLE t1 (
+ a012345678901234567 int,
+ b int,
+ c0123456789012345678 int,
+ FOREIGN KEY (a012345678901234567,c0123456789012345678,b) REFERENCES tx (x1,x2,x3)
+) ENGINE=InnoDB;
+
+--echo #
+--echo # MDEV-25642 InnoDB rename table copy DDL fails
+--echo # while dropping the table
+--echo #
+call mtr.add_suppression("InnoDB: In ALTER TABLE `test`.`t1` has or is referenced in foreign key constraints which are not compatible with the new table definition.");
+
+CREATE TABLE t1 (a VARCHAR(10) NOT NULL PRIMARY KEY) ENGINE=InnoDB;
+CREATE TABLE t1_fk (a VARCHAR(40), KEY a (a), FULLTEXT KEY(a), CONSTRAINT fk FOREIGN KEY(a) REFERENCES t1 (a) ON UPDATE CASCADE) ENGINE=InnoDB;
+ALTER TABLE t1 RENAME TO tm1, ALGORITHM=COPY;
+SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN;
+# Enable SET FOREIGN_KEY_CHECKS after fixing MDEV-25885
+SET FOREIGN_KEY_CHECKS=0;
+CREATE TABLE t1 (c1 BIGINT NOT NULL, c2 BIGINT NOT NULL, PRIMARY KEY(c1), UNIQUE KEY(c2)) ENGINE=MEMORY;
+ALTER TABLE t1 ENGINE=InnoDB, ALGORITHM=COPY;
+DROP TABLE t1, tm1, t1_fk;
diff --git a/mysql-test/suite/innodb/t/innodb-mdev7046.test b/mysql-test/suite/innodb/t/innodb-mdev7046.test
index 27c140689c1..a8c8b7da2db 100644
--- a/mysql-test/suite/innodb/t/innodb-mdev7046.test
+++ b/mysql-test/suite/innodb/t/innodb-mdev7046.test
@@ -35,7 +35,7 @@ drop database test;
create database test;
use test;
-SET @@session.storage_engine=MYISAM;
+SET @@session.default_storage_engine=MYISAM;
--error 0,1,1103
CREATE TABLE t1(id INT,purchased DATE)PARTITION BY RANGE(YEAR(purchased)) SUBPARTITION BY HASH(TO_DAYS(purchased)) SUBPARTITIONS 2 (PARTITION p0 VALUES LESS THAN MAXVALUE (SUBPARTITION sp0 DATA DIRECTORY='/tmp/not-existing' INDEX DIRECTORY='/tmp/not-existing',SUBPARTITION sp1));
drop table if exists t1;
diff --git a/mysql-test/suite/innodb/t/innodb-page-cleaners.test b/mysql-test/suite/innodb/t/innodb-page-cleaners.test
deleted file mode 100644
index 6f8accec30f..00000000000
--- a/mysql-test/suite/innodb/t/innodb-page-cleaners.test
+++ /dev/null
@@ -1,100 +0,0 @@
---source include/have_innodb.inc
-# This test is slow on buildbot.
---source include/big_test.inc
-
-SET @saved_page_cleaners = @@GLOBAL.innodb_page_cleaners;
-
-create table t1 (a int not null primary key auto_increment,
-b bigint,
-c varchar(200),
-d int,
-key b (b),
-key d (d)) engine=INNODB;
-
-let $rows = 15000;
---disable_query_log
-begin;
-while ($rows)
-{
- eval insert into t1 values(NULL, $rows, 'testing...', $rows+1000);
- dec $rows;
-}
-commit;
---enable_query_log
-
-#
-# We want 4 connections: (1) - (3) to create dirty pages
-# and default to modify the number of page cleaner threads
-#
-
-set GLOBAL innodb_page_cleaners = 4;
-
-connect (con1,localhost,root,,);
-connection con1;
-send update t1 set b = b + 5, d = d + 1 where a between 1 and 2000;
-
-connect (con2,localhost,root,,);
-connection con2;
-send update t1 set b = b + 5, d = d + 1 where a between 3000 and 5000;
-
-
-connect (con3,localhost,root,,);
-connection con3;
-send update t1 set b = b + 5, d = d + 1 where a between 8000 and 12000;
-
-#
-# Page cleaners are increased
-#
-
-connection default;
-set GLOBAL innodb_page_cleaners = 2;
-set GLOBAL innodb_page_cleaners = 4;
-set GLOBAL innodb_page_cleaners = 6;
-
-connection con1;
-reap;
-
-connection con2;
-reap;
-
-connection con3;
-reap;
-
-connection default;
-set GLOBAL innodb_page_cleaners = 4;
-
-#
-# Page cleaners are decreased
-#
-
-connection con1;
-send update t1 set b = b + 5, d = d + 1 where a between 1 and 2000;
-
-connection con2;
-send update t1 set b = b + 5, d = d + 1 where a between 3000 and 5000;
-
-connection con3;
-send update t1 set b = b + 5, d = d + 1 where a between 8000 and 12000;
-
-connection default;
-set GLOBAL innodb_page_cleaners = 3;
-set GLOBAL innodb_page_cleaners = 2;
-set GLOBAL innodb_page_cleaners = 1;
-
-connection con1;
-reap;
-
-connection con2;
-reap;
-
-connection con3;
-reap;
-
-connection default;
-disconnect con1;
-disconnect con2;
-disconnect con3;
-
-DROP TABLE t1;
-
-SET GLOBAL innodb_page_cleaners=@saved_page_cleaners;
diff --git a/mysql-test/suite/innodb/t/innodb-page_compression_tables.test b/mysql-test/suite/innodb/t/innodb-page_compression_tables.test
index 75504a53c55..312aa22edba 100644
--- a/mysql-test/suite/innodb/t/innodb-page_compression_tables.test
+++ b/mysql-test/suite/innodb/t/innodb-page_compression_tables.test
@@ -30,6 +30,13 @@ alter table innodb_redundant row_format=compact page_compressed=1;
show create table innodb_redundant;
drop table innodb_redundant;
+--echo #
+--echo # MDEV-24455 Assertion `!m_freed_space' failed in mtr_t::start
+--echo #
+CREATE TABLE t1 (a TEXT, b TEXT) ENGINE=InnoDB PAGE_COMPRESSED='ON';
+BEGIN; INSERT INTO t1 VALUES(REPEAT('x',81),REPEAT('x',8034)); ROLLBACK;
+DROP TABLE t1;
+
delimiter //;
create procedure innodb_insert_proc (repeat_count int)
begin
diff --git a/mysql-test/suite/innodb/t/innodb-stats-sample.test b/mysql-test/suite/innodb/t/innodb-stats-sample.test
index 35d35bfa382..600688ab98d 100644
--- a/mysql-test/suite/innodb/t/innodb-stats-sample.test
+++ b/mysql-test/suite/innodb/t/innodb-stats-sample.test
@@ -1,24 +1,20 @@
--source include/have_innodb.inc
#
# Test that mysqld does not crash when running ANALYZE TABLE with
-# different values of the parameter innodb_stats_sample_pages.
+# different values of the parameter innodb_stats_transient_sample_pages.
#
# we care only that the following SQL commands do not produce errors
# and do not crash the server
-- disable_query_log
--- disable_result_log
-- enable_warnings
-let $sample_pages=`select @@innodb_stats_sample_pages`;
-let $traditional=`select @@innodb_stats_traditional`;
-SET GLOBAL innodb_stats_sample_pages=0;
+SET @save_sample_pages = @@GLOBAL.innodb_stats_transient_sample_pages;
+SET @save_traditional = @@GLOBAL.innodb_stats_traditional;
+SET GLOBAL innodb_stats_transient_sample_pages=0;
#use new method to calculate statistics
SET GLOBAL innodb_stats_traditional=0;
-
-# check that the value has been adjusted to 1
--- enable_result_log
-SHOW VARIABLES LIKE 'innodb_stats_sample_pages';
+SHOW VARIABLES LIKE 'innodb_stats_transient_sample_pages';
SHOW VARIABLES LIKE 'innodb_stats_traditional';
-- disable_result_log
@@ -33,13 +29,13 @@ CREATE TABLE innodb_analyze (
# test with empty table
ANALYZE TABLE innodb_analyze;
-SET GLOBAL innodb_stats_sample_pages=2;
+SET GLOBAL innodb_stats_transient_sample_pages=2;
ANALYZE TABLE innodb_analyze;
-SET GLOBAL innodb_stats_sample_pages=1;
+SET GLOBAL innodb_stats_transient_sample_pages=1;
ANALYZE TABLE innodb_analyze;
-SET GLOBAL innodb_stats_sample_pages=8000;
+SET GLOBAL innodb_stats_transient_sample_pages=8000;
ANALYZE TABLE innodb_analyze;
delimiter //;
@@ -60,19 +56,19 @@ call innodb_insert_proc(7000);
commit;
set autocommit=1;
-SET GLOBAL innodb_stats_sample_pages=1;
+SET GLOBAL innodb_stats_transient_sample_pages=1;
ANALYZE TABLE innodb_analyze;
-SET GLOBAL innodb_stats_sample_pages=8;
+SET GLOBAL innodb_stats_transient_sample_pages=8;
ANALYZE TABLE innodb_analyze;
-SET GLOBAL innodb_stats_sample_pages=16;
+SET GLOBAL innodb_stats_transient_sample_pages=16;
ANALYZE TABLE innodb_analyze;
-SET GLOBAL innodb_stats_sample_pages=8000;
+SET GLOBAL innodb_stats_transient_sample_pages=8000;
ANALYZE TABLE innodb_analyze;
DROP PROCEDURE innodb_insert_proc;
DROP TABLE innodb_analyze;
-EVAL SET GLOBAL innodb_stats_sample_pages=$sample_pages;
-EVAL SET GLOBAL innodb_stats_traditional=$traditional; \ No newline at end of file
+SET GLOBAL innodb_stats_transient_sample_pages = @save_sample_pages;
+SET GLOBAL innodb_stats_traditional = @save_traditional;
diff --git a/mysql-test/suite/innodb/t/innodb-trim.test b/mysql-test/suite/innodb/t/innodb-trim.test
index 0f38ea5ba84..3f8eb5f2c71 100644
--- a/mysql-test/suite/innodb/t/innodb-trim.test
+++ b/mysql-test/suite/innodb/t/innodb-trim.test
@@ -32,18 +32,6 @@ commit;
set autocommit=1;
-let $success= `SELECT variable_value FROM information_schema.global_status WHERE variable_name = 'innodb_num_page_compressed_trim_op'`;
-
-if (!$success) {
---disable_query_log
---disable_result_log
- DROP PROCEDURE innodb_insert_proc;
- DROP TABLE innodb_page_compressed;
---enable_query_log
---enable_result_log
- --skip "Test requires TRIM";
-}
-
DROP PROCEDURE innodb_insert_proc;
DROP TABLE innodb_page_compressed;
diff --git a/mysql-test/suite/innodb/t/innodb-wl5522-debug.test b/mysql-test/suite/innodb/t/innodb-wl5522-debug.test
index 7159b164065..a22afc041b0 100644
--- a/mysql-test/suite/innodb/t/innodb-wl5522-debug.test
+++ b/mysql-test/suite/innodb/t/innodb-wl5522-debug.test
@@ -28,6 +28,7 @@ call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .*");
call mtr.add_suppression("InnoDB: Page 0 at offset 0 looks corrupted in file");
call mtr.add_suppression("InnoDB: Page for tablespace ");
call mtr.add_suppression("InnoDB: Invalid FSP_SPACE_FLAGS=");
+call mtr.add_suppression("InnoDB: Unknown index id .* on page");
FLUSH TABLES;
let MYSQLD_DATADIR =`SELECT @@datadir`;
@@ -1016,14 +1017,6 @@ EOF
DROP TABLE t1;
---disable_query_log
-# Enable metrics for the counters we are going to use
-set global innodb_monitor_enable = purge_stop_count;
-set global innodb_monitor_enable = purge_resume_count;
-set global innodb_monitor_enable = ibuf_merges;
-set global innodb_monitor_enable = ibuf_merges_insert;
---enable_query_log
-
#
# Create a large table with delete marked records, disable purge during
# the update so that we can test the IMPORT purge code.
@@ -1042,12 +1035,6 @@ connect (purge_control,localhost,root);
START TRANSACTION WITH CONSISTENT SNAPSHOT;
connection default;
-# Disable change buffer merge from the master thread, additionally
-# enable aggressive flushing so that more changes are buffered.
-SET GLOBAL innodb_disable_background_merge=ON;
-SET GLOBAL innodb_monitor_reset = ibuf_merges;
-SET GLOBAL innodb_monitor_reset = ibuf_merges_insert;
-
INSERT INTO t1
SELECT 1 + seq, 1 + (seq MOD 4),
REPEAT(SUBSTR('abcd', 1 + (seq MOD 4), 1), 2048),
@@ -1078,10 +1065,6 @@ SELECT c1, c2 FROM t1;
SELECT COUNT(*) FROM t1;
SELECT SUM(c2) FROM t1;
-SELECT name
- FROM information_schema.innodb_metrics
- WHERE name = 'ibuf_merges_insert' AND count = 0;
-
FLUSH TABLES t1 FOR EXPORT;
perl;
@@ -1091,16 +1074,6 @@ EOF
UNLOCK TABLES;
-SELECT name
- FROM information_schema.innodb_metrics
- WHERE name = 'ibuf_merges' AND count > 0;
-
-SELECT name
- FROM information_schema.innodb_metrics
- WHERE name = 'ibuf_merges_inserts' AND count > 0;
-
-SET GLOBAL innodb_disable_background_merge=OFF;
-
# Enable normal operation
connection purge_control;
COMMIT;
@@ -1278,17 +1251,20 @@ EOF
CREATE TABLE t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb;
+SET SESSION debug_dbug="+d,ib_import_create_index_failure_1";
+
+--error ER_RECORD_FILE_FULL
+ALTER TABLE t1 ADD INDEX idx(c1);
+
+SET SESSION debug_dbug=@saved_debug_dbug;
+
ALTER TABLE t1 DISCARD TABLESPACE;
--error ER_TABLESPACE_DISCARDED
SELECT COUNT(*) FROM t1;
-SET SESSION debug_dbug="+d,ib_import_create_index_failure_1";
-
ALTER TABLE t1 ADD INDEX idx(c1);
-SET SESSION debug_dbug=@saved_debug_dbug;
-
DROP TABLE t1;
perl;
@@ -1387,21 +1363,9 @@ do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl";
ib_unlink_tablespace("test", "t1");
EOF
-set global innodb_monitor_disable = all;
-set global innodb_monitor_reset_all = all;
-
--- disable_warnings
-set global innodb_monitor_enable = default;
-set global innodb_monitor_disable = default;
-set global innodb_monitor_reset = default;
-set global innodb_monitor_reset_all = default;
--- enable_warnings
-
--disable_query_log
call mtr.add_suppression("InnoDB: The log sequence numbers [0-9]+ and [0-9]+ in ibdata files do not match the log sequence number [0-9]+ in the ib_logfiles!");
call mtr.add_suppression("'Resource temporarily unavailable'");
-call mtr.add_suppression("Monitor ibuf_merges is already enabled");
-call mtr.add_suppression("Monitor ibuf_merges_insert is already enabled");
call mtr.add_suppression("Got error -1 when reading table '.*'");
call mtr.add_suppression("InnoDB: Table '.*' tablespace is set as discarded.");
call mtr.add_suppression("InnoDB: Tablespace '.*' exists in the cache.*");
diff --git a/mysql-test/suite/innodb/t/innodb-wl5522.test b/mysql-test/suite/innodb/t/innodb-wl5522.test
index 0b1c7d216b2..204c71ef3f1 100644
--- a/mysql-test/suite/innodb/t/innodb-wl5522.test
+++ b/mysql-test/suite/innodb/t/innodb-wl5522.test
@@ -281,8 +281,11 @@ EOF
# This is really a name mismatch error, need better error codes.
-- error ER_TABLE_SCHEMA_MISMATCH
ALTER TABLE t1 IMPORT TABLESPACE;
-
+--error ER_TABLESPACE_DISCARDED
+select count(*) from t1;
ALTER TABLE t1 DROP INDEX x;
+--error ER_CANT_DROP_FIELD_OR_KEY
+ALTER TABLE t1 DROP INDEX x, ALGORITHM=copy;
ALTER TABLE t1 ADD INDEX idx(c2);
perl;
diff --git a/mysql-test/suite/innodb/t/innodb-wl5980-alter.test b/mysql-test/suite/innodb/t/innodb-wl5980-alter.test
index a0d80ea8374..1a32b94c140 100644
--- a/mysql-test/suite/innodb/t/innodb-wl5980-alter.test
+++ b/mysql-test/suite/innodb/t/innodb-wl5980-alter.test
@@ -5,15 +5,12 @@
--source include/have_innodb.inc
---disable_query_log
-# These values can change during the test
-LET $innodb_file_per_table_orig=`select @@innodb_file_per_table`;
-LET $regexp=/FTS_[0-9a-f_]+([A-Z0-9_]+)\.([islbd]{3})/FTS_AUX_\1.\2/;
+SET @innodb_file_per_table_orig=@@GLOBAL.innodb_file_per_table;
+LET $regexp=/FTS_[0-9a-f_]+([A-Z0-9_]+)\.([islbd]{3})/FTS_AUX_\1.\2/ /#sql-ib[1-9][0-9]*\.ibd\n//;
# Set up some variables
LET $MYSQL_DATA_DIR = `select @@datadir`;
LET $data_directory_clause = DATA DIRECTORY='$MYSQL_TMP_DIR/alt_dir';
---enable_query_log
SET default_storage_engine=InnoDB;
SET GLOBAL innodb_file_per_table=ON;
@@ -57,11 +54,15 @@ ALTER TABLE t1 ALTER c2 DROP DEFAULT;
SHOW CREATE TABLE t1;
--echo ### files in MYSQL_DATA_DIR/test
+--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_DATA_DIR/test
--replace_regex $regexp
---list_files $MYSQL_DATA_DIR/test
+--cat_file $MYSQL_DATA_DIR.files.txt
+--remove_file $MYSQL_DATA_DIR.files.txt
--echo ### files in MYSQL_TMP_DIR/alt_dir/test
+--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_TMP_DIR/alt_dir/test
--replace_regex $regexp
---list_files $MYSQL_TMP_DIR/alt_dir/test
+--cat_file $MYSQL_DATA_DIR.files.txt
+--remove_file $MYSQL_DATA_DIR.files.txt
-- source suite/innodb/include/innodb_dict.inc
@@ -70,44 +71,60 @@ ALTER TABLE t1 CHANGE c2 c2 INT AFTER c1;
ALTER TABLE t1 CHANGE c1 c1 INT FIRST;
--echo ### files in MYSQL_DATA_DIR/test
+--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_DATA_DIR/test
--replace_regex $regexp
---list_files $MYSQL_DATA_DIR/test
+--cat_file $MYSQL_DATA_DIR.files.txt
+--remove_file $MYSQL_DATA_DIR.files.txt
--echo ### files in MYSQL_TMP_DIR/alt_dir/test
+--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_TMP_DIR/alt_dir/test
--replace_regex $regexp
---list_files $MYSQL_TMP_DIR/alt_dir/test
+--cat_file $MYSQL_DATA_DIR.files.txt
+--remove_file $MYSQL_DATA_DIR.files.txt
-- source suite/innodb/include/innodb_dict.inc
ALTER TABLE t1 CHANGE C2 c3 INT;
--echo ### files in MYSQL_DATA_DIR/test
+--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_DATA_DIR/test
--replace_regex $regexp
---list_files $MYSQL_DATA_DIR/test
+--cat_file $MYSQL_DATA_DIR.files.txt
+--remove_file $MYSQL_DATA_DIR.files.txt
--echo ### files in MYSQL_TMP_DIR/alt_dir/test
+--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_TMP_DIR/alt_dir/test
--replace_regex $regexp
---list_files $MYSQL_TMP_DIR/alt_dir/test
+--cat_file $MYSQL_DATA_DIR.files.txt
+--remove_file $MYSQL_DATA_DIR.files.txt
-- source suite/innodb/include/innodb_dict.inc
ALTER TABLE t1 CHANGE c3 C INT;
--echo ### files in MYSQL_DATA_DIR/test
+--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_DATA_DIR/test
--replace_regex $regexp
---list_files $MYSQL_DATA_DIR/test
+--cat_file $MYSQL_DATA_DIR.files.txt
+--remove_file $MYSQL_DATA_DIR.files.txt
--echo ### files in MYSQL_TMP_DIR/alt_dir/test
+--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_TMP_DIR/alt_dir/test
--replace_regex $regexp
---list_files $MYSQL_TMP_DIR/alt_dir/test
+--cat_file $MYSQL_DATA_DIR.files.txt
+--remove_file $MYSQL_DATA_DIR.files.txt
-- source suite/innodb/include/innodb_dict.inc
ALTER TABLE t1 CHANGE C Cöŀumň_TWO INT;
--echo ### files in MYSQL_DATA_DIR/test
+--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_DATA_DIR/test
--replace_regex $regexp
---list_files $MYSQL_DATA_DIR/test
+--cat_file $MYSQL_DATA_DIR.files.txt
+--remove_file $MYSQL_DATA_DIR.files.txt
--echo ### files in MYSQL_TMP_DIR/alt_dir/test
+--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_TMP_DIR/alt_dir/test
--replace_regex $regexp
---list_files $MYSQL_TMP_DIR/alt_dir/test
+--cat_file $MYSQL_DATA_DIR.files.txt
+--remove_file $MYSQL_DATA_DIR.files.txt
SELECT i.* FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN_COLS i
INNER JOIN sys_foreign sf ON i.ID = sf.ID;
@@ -120,11 +137,15 @@ ALTER TABLE t1 CHANGE cöĿǖmň_two c3 INT;
ALTER TABLE t1 CHANGE cÖĿUMŇ_two c3 INT, RENAME TO t3;
--echo ### files in MYSQL_DATA_DIR/test
+--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_DATA_DIR/test
--replace_regex $regexp
---list_files $MYSQL_DATA_DIR/test
+--cat_file $MYSQL_DATA_DIR.files.txt
+--remove_file $MYSQL_DATA_DIR.files.txt
--echo ### files in MYSQL_TMP_DIR/alt_dir/test
+--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_TMP_DIR/alt_dir/test
--replace_regex $regexp
---list_files $MYSQL_TMP_DIR/alt_dir/test
+--cat_file $MYSQL_DATA_DIR.files.txt
+--remove_file $MYSQL_DATA_DIR.files.txt
SELECT st.NAME, i.NAME
FROM sys_tables st INNER JOIN INFORMATION_SCHEMA.INNODB_SYS_TABLES i
@@ -143,11 +164,15 @@ ALTER TABLE t3 CHANGE c3
`1234567890123456789012345678901234567890123456789012345678901234` INT;
--echo ### files in MYSQL_DATA_DIR/test
+--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_DATA_DIR/test
--replace_regex $regexp
---list_files $MYSQL_DATA_DIR/test
+--cat_file $MYSQL_DATA_DIR.files.txt
+--remove_file $MYSQL_DATA_DIR.files.txt
--echo ### files in MYSQL_TMP_DIR/alt_dir/test
+--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_TMP_DIR/alt_dir/test
--replace_regex $regexp
---list_files $MYSQL_TMP_DIR/alt_dir/test
+--cat_file $MYSQL_DATA_DIR.files.txt
+--remove_file $MYSQL_DATA_DIR.files.txt
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
SHOW CREATE TABLE t3;
@@ -168,11 +193,15 @@ ALTER TABLE t3 CHANGE
`倀å€å€‚倃倄倅倆倇倈倉倊個倌å€å€Žå€å€å€‘倒倓倔倕倖倗倘候倚倛倜å€å€žå€Ÿå€ å€¡å€¢å€£å€¤å€¥å€¦å€§å€¨å€©å€ªå€«å€¬å€­å€®å€¯å€°å€±å€²å€³å€´å€µå€¶å€·å€¸å€¹å€ºå€»å€¼å€½å€¾Ã¤` INT;
--echo ### files in MYSQL_DATA_DIR/test
+--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_DATA_DIR/test
--replace_regex $regexp
---list_files $MYSQL_DATA_DIR/test
+--cat_file $MYSQL_DATA_DIR.files.txt
+--remove_file $MYSQL_DATA_DIR.files.txt
--echo ### files in MYSQL_TMP_DIR/alt_dir/test
+--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_TMP_DIR/alt_dir/test
--replace_regex $regexp
---list_files $MYSQL_TMP_DIR/alt_dir/test
+--cat_file $MYSQL_DATA_DIR.files.txt
+--remove_file $MYSQL_DATA_DIR.files.txt
# check that the rename is case-insensitive (note the upper-case ä at end)
ALTER TABLE t3 CHANGE
@@ -180,11 +209,15 @@ ALTER TABLE t3 CHANGE
c3 INT;
--echo ### files in MYSQL_DATA_DIR/test
+--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_DATA_DIR/test
--replace_regex $regexp
---list_files $MYSQL_DATA_DIR/test
+--cat_file $MYSQL_DATA_DIR.files.txt
+--remove_file $MYSQL_DATA_DIR.files.txt
--echo ### files in MYSQL_TMP_DIR/alt_dir/test
+--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_TMP_DIR/alt_dir/test
--replace_regex $regexp
---list_files $MYSQL_TMP_DIR/alt_dir/test
+--cat_file $MYSQL_DATA_DIR.files.txt
+--remove_file $MYSQL_DATA_DIR.files.txt
# test with 4-byte UTF-8 (should be disallowed)
--error ER_INVALID_CHARACTER_STRING
@@ -196,11 +229,15 @@ ALTER TABLE t3 CHANGE c3 😲 INT;
ALTER TABLE t3 RENAME TO t2;
--echo ### files in MYSQL_DATA_DIR/test
+--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_DATA_DIR/test
--replace_regex $regexp
---list_files $MYSQL_DATA_DIR/test
+--cat_file $MYSQL_DATA_DIR.files.txt
+--remove_file $MYSQL_DATA_DIR.files.txt
--echo ### files in MYSQL_TMP_DIR/alt_dir/test
+--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_TMP_DIR/alt_dir/test
--replace_regex $regexp
---list_files $MYSQL_TMP_DIR/alt_dir/test
+--cat_file $MYSQL_DATA_DIR.files.txt
+--remove_file $MYSQL_DATA_DIR.files.txt
SELECT st.NAME, i.NAME
FROM sys_tables st INNER JOIN INFORMATION_SCHEMA.INNODB_SYS_TABLES i
@@ -216,11 +253,15 @@ FROM sys_tables st INNER JOIN INFORMATION_SCHEMA.INNODB_SYS_TABLES i
ON i.TABLE_ID=st.TABLE_ID;
--echo ### files in MYSQL_DATA_DIR/test
+--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_DATA_DIR/test
--replace_regex $regexp
---list_files $MYSQL_DATA_DIR/test
+--cat_file $MYSQL_DATA_DIR.files.txt
+--remove_file $MYSQL_DATA_DIR.files.txt
--echo ### files in MYSQL_TMP_DIR/alt_dir/test
+--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_TMP_DIR/alt_dir/test
--replace_regex $regexp
---list_files $MYSQL_TMP_DIR/alt_dir/test
+--cat_file $MYSQL_DATA_DIR.files.txt
+--remove_file $MYSQL_DATA_DIR.files.txt
-- source suite/innodb/include/innodb_dict.inc
@@ -256,11 +297,15 @@ SET foreign_key_checks=1;
SHOW CREATE TABLE t1c;
--echo ### files in MYSQL_DATA_DIR/test
+--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_DATA_DIR/test
--replace_regex $regexp
---list_files $MYSQL_DATA_DIR/test
+--cat_file $MYSQL_DATA_DIR.files.txt
+--remove_file $MYSQL_DATA_DIR.files.txt
--echo ### files in MYSQL_TMP_DIR/alt_dir/test
+--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_TMP_DIR/alt_dir/test
--replace_regex $regexp
---list_files $MYSQL_TMP_DIR/alt_dir/test
+--cat_file $MYSQL_DATA_DIR.files.txt
+--remove_file $MYSQL_DATA_DIR.files.txt
-- source suite/innodb/include/innodb_dict.inc
@@ -277,11 +322,15 @@ SET foreign_key_checks=0;
ALTER TABLE t1c DROP INDEX C3;
--echo ### files in MYSQL_DATA_DIR/test
+--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_DATA_DIR/test
--replace_regex $regexp
---list_files $MYSQL_DATA_DIR/test
+--cat_file $MYSQL_DATA_DIR.files.txt
+--remove_file $MYSQL_DATA_DIR.files.txt
--echo ### files in MYSQL_TMP_DIR/alt_dir/test
+--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_TMP_DIR/alt_dir/test
--replace_regex $regexp
---list_files $MYSQL_TMP_DIR/alt_dir/test
+--cat_file $MYSQL_DATA_DIR.files.txt
+--remove_file $MYSQL_DATA_DIR.files.txt
SET foreign_key_checks=1;
@@ -293,11 +342,15 @@ SHOW CREATE TABLE t1c;
ALTER TABLE t1c DROP FOREIGN KEY t1C3;
--echo ### files in MYSQL_DATA_DIR/test
---list_files $MYSQL_DATA_DIR/test
+--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_DATA_DIR/test
--replace_regex $regexp
+--cat_file $MYSQL_DATA_DIR.files.txt
+--remove_file $MYSQL_DATA_DIR.files.txt
--echo ### files in MYSQL_TMP_DIR/alt_dir/test
+--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_TMP_DIR/alt_dir/test
--replace_regex $regexp
---list_files $MYSQL_TMP_DIR/alt_dir/test
+--cat_file $MYSQL_DATA_DIR.files.txt
+--remove_file $MYSQL_DATA_DIR.files.txt
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
SHOW CREATE TABLE t1c;
@@ -306,11 +359,15 @@ SHOW CREATE TABLE t1c;
ALTER TABLE t1c DROP INDEX c2, DROP FOREIGN KEY t1C2;
--echo ### files in MYSQL_DATA_DIR/test
+--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_DATA_DIR/test
--replace_regex $regexp
---list_files $MYSQL_DATA_DIR/test
+--cat_file $MYSQL_DATA_DIR.files.txt
+--remove_file $MYSQL_DATA_DIR.files.txt
--echo ### files in MYSQL_TMP_DIR/alt_dir/test
+--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_TMP_DIR/alt_dir/test
--replace_regex $regexp
---list_files $MYSQL_TMP_DIR/alt_dir/test
+--cat_file $MYSQL_DATA_DIR.files.txt
+--remove_file $MYSQL_DATA_DIR.files.txt
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
SHOW CREATE TABLE t1c;
@@ -320,11 +377,15 @@ SHOW CREATE TABLE t1c;
ALTER TABLE t1 DROP INDEX c2, CHANGE c3 c2 INT;
--echo ### files in MYSQL_DATA_DIR/test
+--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_DATA_DIR/test
--replace_regex $regexp
---list_files $MYSQL_DATA_DIR/test
+--cat_file $MYSQL_DATA_DIR.files.txt
+--remove_file $MYSQL_DATA_DIR.files.txt
--echo ### files in MYSQL_TMP_DIR/alt_dir/test
+--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_TMP_DIR/alt_dir/test
--replace_regex $regexp
---list_files $MYSQL_TMP_DIR/alt_dir/test
+--cat_file $MYSQL_DATA_DIR.files.txt
+--remove_file $MYSQL_DATA_DIR.files.txt
-- source suite/innodb/include/innodb_dict.inc
@@ -343,11 +404,15 @@ CHANGE c1 pk INT, ALTER c2 SET DEFAULT 42, RENAME TO tt,
ALGORITHM=INPLACE, LOCK=SHARED;
--echo ### files in MYSQL_DATA_DIR/test
+--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_DATA_DIR/test
--replace_regex $regexp
---list_files $MYSQL_DATA_DIR/test
+--cat_file $MYSQL_DATA_DIR.files.txt
+--remove_file $MYSQL_DATA_DIR.files.txt
--echo ### files in MYSQL_TMP_DIR/alt_dir/test
+--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_TMP_DIR/alt_dir/test
--replace_regex $regexp
---list_files $MYSQL_TMP_DIR/alt_dir/test
+--cat_file $MYSQL_DATA_DIR.files.txt
+--remove_file $MYSQL_DATA_DIR.files.txt
# The output should be empty, because index->id was reassigned.
-- source suite/innodb/include/innodb_dict.inc
@@ -387,11 +452,15 @@ CREATE TABLE t1n LIKE t1o;
ALTER TABLE t1n ADD FULLTEXT INDEX(ct);
--echo ### files in MYSQL_DATA_DIR/test
+--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_DATA_DIR/test
--replace_regex $regexp
---list_files $MYSQL_DATA_DIR/test
+--cat_file $MYSQL_DATA_DIR.files.txt
+--remove_file $MYSQL_DATA_DIR.files.txt
--echo ### files in MYSQL_TMP_DIR/alt_dir/test
+--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_TMP_DIR/alt_dir/test
--replace_regex $regexp
---list_files $MYSQL_TMP_DIR/alt_dir/test
+--cat_file $MYSQL_DATA_DIR.files.txt
+--remove_file $MYSQL_DATA_DIR.files.txt
--error ER_WRONG_COLUMN_NAME
ALTER TABLE t1n CHANGE c1 Fts_DOC_ID INT, ALGORITHM=INPLACE;
@@ -402,30 +471,42 @@ ALTER TABLE t1n CHANGE FTS_DOC_ID c11 INT, ALGORITHM=INPLACE;
ALTER TABLE t1n CHANGE c1 FTS_DOC_ïD INT, ALGORITHM=INPLACE;
--echo ### files in MYSQL_DATA_DIR/test
+--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_DATA_DIR/test
--replace_regex $regexp
---list_files $MYSQL_DATA_DIR/test
+--cat_file $MYSQL_DATA_DIR.files.txt
+--remove_file $MYSQL_DATA_DIR.files.txt
--echo ### files in MYSQL_TMP_DIR/alt_dir/test
+--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_TMP_DIR/alt_dir/test
--replace_regex $regexp
---list_files $MYSQL_TMP_DIR/alt_dir/test
+--cat_file $MYSQL_DATA_DIR.files.txt
+--remove_file $MYSQL_DATA_DIR.files.txt
ALTER TABLE t1n CHANGE FTS_DOC_ÃD c1 INT, ALGORITHM=INPLACE;
--echo ### files in MYSQL_DATA_DIR/test
+--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_DATA_DIR/test
--replace_regex $regexp
---list_files $MYSQL_DATA_DIR/test
+--cat_file $MYSQL_DATA_DIR.files.txt
+--remove_file $MYSQL_DATA_DIR.files.txt
--echo ### files in MYSQL_TMP_DIR/alt_dir/test
+--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_TMP_DIR/alt_dir/test
--replace_regex $regexp
---list_files $MYSQL_TMP_DIR/alt_dir/test
+--cat_file $MYSQL_DATA_DIR.files.txt
+--remove_file $MYSQL_DATA_DIR.files.txt
ALTER TABLE t1n CHANGE c1 c2 INT, CHANGE c2 ct INT, CHANGE ct c1 TEXT,
ALGORITHM=INPLACE;
--echo ### files in MYSQL_DATA_DIR/test
+--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_DATA_DIR/test
--replace_regex $regexp
---list_files $MYSQL_DATA_DIR/test
+--cat_file $MYSQL_DATA_DIR.files.txt
+--remove_file $MYSQL_DATA_DIR.files.txt
--echo ### files in MYSQL_TMP_DIR/alt_dir/test
+--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_TMP_DIR/alt_dir/test
--replace_regex $regexp
---list_files $MYSQL_TMP_DIR/alt_dir/test
+--cat_file $MYSQL_DATA_DIR.files.txt
+--remove_file $MYSQL_DATA_DIR.files.txt
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
SHOW CREATE TABLE t1n;
@@ -433,11 +514,15 @@ ALTER TABLE t1n CHANGE c2 c1 INT, CHANGE ct c2 INT, CHANGE c1 ct TEXT,
ALGORITHM=COPY;
--echo ### files in MYSQL_DATA_DIR/test
+--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_DATA_DIR/test
--replace_regex $regexp
---list_files $MYSQL_DATA_DIR/test
+--cat_file $MYSQL_DATA_DIR.files.txt
+--remove_file $MYSQL_DATA_DIR.files.txt
--echo ### files in MYSQL_TMP_DIR/alt_dir/test
+--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_TMP_DIR/alt_dir/test
--replace_regex $regexp
---list_files $MYSQL_TMP_DIR/alt_dir/test
+--cat_file $MYSQL_DATA_DIR.files.txt
+--remove_file $MYSQL_DATA_DIR.files.txt
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
SHOW CREATE TABLE t1n;
@@ -450,33 +535,45 @@ ALTER TABLE t1n ADD INDEX(c2), CHANGE c2 c4 INT, ALGORITHM=COPY;
ALTER TABLE t1n ADD INDEX(c4), CHANGE c2 c4 INT, ALGORITHM=INPLACE;
--echo ### files in MYSQL_DATA_DIR/test
+--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_DATA_DIR/test
--replace_regex $regexp
---list_files $MYSQL_DATA_DIR/test
+--cat_file $MYSQL_DATA_DIR.files.txt
+--remove_file $MYSQL_DATA_DIR.files.txt
--echo ### files in MYSQL_TMP_DIR/alt_dir/test
+--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_TMP_DIR/alt_dir/test
--replace_regex $regexp
---list_files $MYSQL_TMP_DIR/alt_dir/test
+--cat_file $MYSQL_DATA_DIR.files.txt
+--remove_file $MYSQL_DATA_DIR.files.txt
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
SHOW CREATE TABLE t1n;
ALTER TABLE t1n DROP INDEX c4;
--echo ### files in MYSQL_DATA_DIR/test
+--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_DATA_DIR/test
--replace_regex $regexp
---list_files $MYSQL_DATA_DIR/test
+--cat_file $MYSQL_DATA_DIR.files.txt
+--remove_file $MYSQL_DATA_DIR.files.txt
--echo ### files in MYSQL_TMP_DIR/alt_dir/test
+--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_TMP_DIR/alt_dir/test
--replace_regex $regexp
---list_files $MYSQL_TMP_DIR/alt_dir/test
+--cat_file $MYSQL_DATA_DIR.files.txt
+--remove_file $MYSQL_DATA_DIR.files.txt
--error ER_DUP_FIELDNAME
ALTER TABLE t1n CHANGE c4 c1 INT, ADD INDEX(c1), ALGORITHM=INPLACE;
ALTER TABLE t1n CHANGE c4 c11 INT, ADD INDEX(c11), ALGORITHM=INPLACE;
--echo ### files in MYSQL_DATA_DIR/test
+--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_DATA_DIR/test
--replace_regex $regexp
---list_files $MYSQL_DATA_DIR/test
+--cat_file $MYSQL_DATA_DIR.files.txt
+--remove_file $MYSQL_DATA_DIR.files.txt
--echo ### files in MYSQL_TMP_DIR/alt_dir/test
+--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_TMP_DIR/alt_dir/test
--replace_regex $regexp
---list_files $MYSQL_TMP_DIR/alt_dir/test
+--cat_file $MYSQL_DATA_DIR.files.txt
+--remove_file $MYSQL_DATA_DIR.files.txt
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
SHOW CREATE TABLE t1n;
@@ -485,22 +582,30 @@ DROP TABLE t1n;
ALTER TABLE t1o MODIFY c1 BIGINT UNSIGNED NOT NULL;
--echo ### files in MYSQL_DATA_DIR/test
+--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_DATA_DIR/test
--replace_regex $regexp
---list_files $MYSQL_DATA_DIR/test
+--cat_file $MYSQL_DATA_DIR.files.txt
+--remove_file $MYSQL_DATA_DIR.files.txt
--echo ### files in MYSQL_TMP_DIR/alt_dir/test
+--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_TMP_DIR/alt_dir/test
--replace_regex $regexp
---list_files $MYSQL_TMP_DIR/alt_dir/test
+--cat_file $MYSQL_DATA_DIR.files.txt
+--remove_file $MYSQL_DATA_DIR.files.txt
ALTER TABLE t1o ADD FULLTEXT INDEX(ct),
CHANGE c1 FTS_DOC_ID BIGINT UNSIGNED NOT NULL,
ALGORITHM=INPLACE;
--echo ### files in MYSQL_DATA_DIR/test
+--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_DATA_DIR/test
--replace_regex $regexp
---list_files $MYSQL_DATA_DIR/test
+--cat_file $MYSQL_DATA_DIR.files.txt
+--remove_file $MYSQL_DATA_DIR.files.txt
--echo ### files in MYSQL_TMP_DIR/alt_dir/test
+--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_TMP_DIR/alt_dir/test
--replace_regex $regexp
---list_files $MYSQL_TMP_DIR/alt_dir/test
+--cat_file $MYSQL_DATA_DIR.files.txt
+--remove_file $MYSQL_DATA_DIR.files.txt
# This would create a hidden FTS_DOC_ID column, which cannot be done online.
--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
@@ -520,11 +625,15 @@ ALTER TABLE t1o CHANGE FTS_DOC_ID foo_id BIGINT UNSIGNED NOT NULL,
DROP INDEX ct, LOCK=NONE;
--echo ### files in MYSQL_DATA_DIR/test
+--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_DATA_DIR/test
--replace_regex $regexp
---list_files $MYSQL_DATA_DIR/test
+--cat_file $MYSQL_DATA_DIR.files.txt
+--remove_file $MYSQL_DATA_DIR.files.txt
--echo ### files in MYSQL_TMP_DIR/alt_dir/test
+--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_TMP_DIR/alt_dir/test
--replace_regex $regexp
---list_files $MYSQL_TMP_DIR/alt_dir/test
+--cat_file $MYSQL_DATA_DIR.files.txt
+--remove_file $MYSQL_DATA_DIR.files.txt
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
SHOW CREATE TABLE t1o;
@@ -547,21 +656,29 @@ FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN i WHERE FOR_NAME='test/t1o';
ALTER TABLE t1o ADD UNIQUE INDEX FTS_DOC_ID_INDEX(foo_id);
--echo ### files in MYSQL_DATA_DIR/test
+--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_DATA_DIR/test
--replace_regex $regexp
---list_files $MYSQL_DATA_DIR/test
+--cat_file $MYSQL_DATA_DIR.files.txt
+--remove_file $MYSQL_DATA_DIR.files.txt
--echo ### files in MYSQL_TMP_DIR/alt_dir/test
+--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_TMP_DIR/alt_dir/test
--replace_regex $regexp
---list_files $MYSQL_TMP_DIR/alt_dir/test
+--cat_file $MYSQL_DATA_DIR.files.txt
+--remove_file $MYSQL_DATA_DIR.files.txt
ALTER TABLE t1o CHANGE foo_id FTS_DOC_ID BIGINT UNSIGNED NOT NULL,
ADD FULLTEXT INDEX(ct);
--echo ### files in MYSQL_DATA_DIR/test
+--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_DATA_DIR/test
--replace_regex $regexp
---list_files $MYSQL_DATA_DIR/test
+--cat_file $MYSQL_DATA_DIR.files.txt
+--remove_file $MYSQL_DATA_DIR.files.txt
--echo ### files in MYSQL_TMP_DIR/alt_dir/test
+--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_TMP_DIR/alt_dir/test
--replace_regex $regexp
---list_files $MYSQL_TMP_DIR/alt_dir/test
+--cat_file $MYSQL_DATA_DIR.files.txt
+--remove_file $MYSQL_DATA_DIR.files.txt
--error ER_INNODB_FT_WRONG_DOCID_INDEX
ALTER TABLE t1o CHANGE FTS_DOC_ID foo_id BIGINT UNSIGNED NOT NULL;
@@ -579,15 +696,14 @@ INNER JOIN sys_tables st ON i.TABLE_ID=st.TABLE_ID;
DROP TABLE tt, t1o, sys_tables, sys_indexes, sys_foreign;
--echo ### files in MYSQL_DATA_DIR/test
+--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_DATA_DIR/test
--replace_regex $regexp
---list_files $MYSQL_DATA_DIR/test
+--cat_file $MYSQL_DATA_DIR.files.txt
+--remove_file $MYSQL_DATA_DIR.files.txt
--echo ### files in MYSQL_TMP_DIR/alt_dir/test
--replace_regex $regexp
--list_files $MYSQL_TMP_DIR/alt_dir/test
--rmdir $MYSQL_TMP_DIR/alt_dir/test
--rmdir $MYSQL_TMP_DIR/alt_dir
--- disable_query_log
-eval set global innodb_file_per_table=$innodb_file_per_table_orig;
-call mtr.add_suppression("deleting orphaned .ibd file");
--- enable_query_log
+SET GLOBAL innodb_file_per_table = @innodb_file_per_table_orig;
diff --git a/mysql-test/suite/innodb/t/innodb.test b/mysql-test/suite/innodb/t/innodb.test
index ba5126e4757..090c9b2b034 100644
--- a/mysql-test/suite/innodb/t/innodb.test
+++ b/mysql-test/suite/innodb/t/innodb.test
@@ -24,10 +24,6 @@ call mtr.add_suppression("Cannot add field .* in table .* because after adding i
call mtr.add_suppression("\\[ERROR\\] InnoDB: in ALTER TABLE `test`.`t1`");
call mtr.add_suppression("\\[ERROR\\] InnoDB: in RENAME TABLE table `test`.`t1`");
-SET @innodb_thread_sleep_delay_orig = @@innodb_thread_sleep_delay;
-
-SET @innodb_thread_concurrency_orig = @@innodb_thread_concurrency;
-
--disable_warnings
SET @innodb_rows_deleted_orig = (SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_deleted');
SET @innodb_rows_inserted_orig = (SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_inserted');
@@ -1339,8 +1335,8 @@ SELECT variable_value - @innodb_row_lock_time_avg_orig FROM information_schema.g
# Test varchar
#
-let $default=`select @@storage_engine`;
-set storage_engine=INNODB;
+let $default=`select @@default_storage_engine`;
+set default_storage_engine=INNODB;
source include/varchar.inc;
#
@@ -2503,9 +2499,6 @@ DROP TABLE bug35537;
DISCONNECT c1;
CONNECTION default;
-SET GLOBAL innodb_thread_sleep_delay = @innodb_thread_sleep_delay_orig;
-SET GLOBAL innodb_thread_concurrency = @innodb_thread_concurrency_orig;
-
-- enable_query_log
# Clean up after the Bug#55284/Bug#58912 test case.
diff --git a/mysql-test/suite/innodb/t/innodb_buffer_pool_resize_debug.test b/mysql-test/suite/innodb/t/innodb_buffer_pool_resize_debug.test
index d770e719601..ddac64c17c9 100644
--- a/mysql-test/suite/innodb/t/innodb_buffer_pool_resize_debug.test
+++ b/mysql-test/suite/innodb/t/innodb_buffer_pool_resize_debug.test
@@ -9,10 +9,9 @@
--disable_query_log
set @old_innodb_buffer_pool_size = @@innodb_buffer_pool_size;
set @old_innodb_file_per_table = @@innodb_file_per_table;
-set @old_innodb_thread_concurrency = @@innodb_thread_concurrency;
-set @old_innodb_thread_sleep_delay = @@innodb_thread_sleep_delay;
set @old_innodb_disable_resize = @@innodb_disable_resize_buffer_pool_debug;
set global innodb_disable_resize_buffer_pool_debug = OFF;
+call mtr.add_suppression("\\[ERROR\\] InnoDB: failed to allocate memory for buffer pool chunk");
--enable_query_log
# Save the initial number of concurrent sessions
@@ -21,7 +20,6 @@ set global innodb_disable_resize_buffer_pool_debug = OFF;
let $wait_timeout = 180;
set global innodb_file_per_table=ON;
-set global innodb_thread_concurrency=20;
connect (con1,localhost,root,,);
connect (con2,localhost,root,,);
@@ -177,8 +175,6 @@ drop table t6;
--disable_query_log
set global innodb_buffer_pool_size = @old_innodb_buffer_pool_size;
set global innodb_file_per_table = @old_innodb_file_per_table;
-set global innodb_thread_concurrency = @old_innodb_thread_concurrency;
-set global innodb_thread_sleep_delay = @old_innodb_thread_sleep_delay;
set global innodb_disable_resize_buffer_pool_debug = @old_innodb_disable_resize;
--enable_query_log
@@ -195,9 +191,6 @@ let $wait_condition =
--echo # BUG#23590280 NO WARNING WHEN REDUCING INNODB_BUFFER_POOL_SIZE INSIZE THE FIRST CHUNK
--echo #
-SET @save_disable = @@GLOBAL.innodb_disable_background_merge;
-SET GLOBAL innodb_disable_background_merge = ON;
-
set @old_innodb_disable_resize = @@innodb_disable_resize_buffer_pool_debug;
set global innodb_disable_resize_buffer_pool_debug = OFF;
set @before_innodb_buffer_pool_size = @@innodb_buffer_pool_size;
@@ -239,4 +232,3 @@ let $wait_condition =
--source include/wait_condition.inc
SET GLOBAL innodb_disable_resize_buffer_pool_debug = @old_innodb_disable_resize;
-SET GLOBAL innodb_disable_background_merge = @save_disable;
diff --git a/mysql-test/suite/innodb/t/innodb_buffer_pool_resize_temporary.test b/mysql-test/suite/innodb/t/innodb_buffer_pool_resize_temporary.test
new file mode 100644
index 00000000000..1390da2745e
--- /dev/null
+++ b/mysql-test/suite/innodb/t/innodb_buffer_pool_resize_temporary.test
@@ -0,0 +1,30 @@
+--source include/have_innodb.inc
+--source include/have_sequence.inc
+--source include/have_debug.inc
+
+SET @save_limit=@@GLOBAL.innodb_limit_optimistic_insert_debug;
+SET @save_disable=@@GLOBAL.innodb_disable_resize_buffer_pool_debug;
+SET @save_size=@@GLOBAL.innodb_buffer_pool_size;
+SET GLOBAL innodb_limit_optimistic_insert_debug=2;
+SET GLOBAL innodb_disable_resize_buffer_pool_debug=OFF;
+
+SET GLOBAL innodb_buffer_pool_size=16777216;
+
+CREATE TEMPORARY TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t1 SELECT seq FROM seq_1_to_200;
+
+SET GLOBAL innodb_buffer_pool_size=8388608;
+
+let $wait_timeout = 60;
+let $wait_condition =
+ SELECT SUBSTR(variable_value, 1, 34) = 'Completed resizing buffer pool at '
+ FROM information_schema.global_status
+ WHERE variable_name = 'INNODB_BUFFER_POOL_RESIZE_STATUS';
+--source include/wait_condition.inc
+
+SELECT COUNT(*),MIN(a),MAX(a) FROM t1;
+DROP TEMPORARY TABLE t1;
+
+SET GLOBAL innodb_limit_optimistic_insert_debug=@save_limit;
+SET GLOBAL innodb_buffer_pool_size=@save_size;
+SET GLOBAL innodb_disable_resize_buffer_pool_debug=@save_disable;
diff --git a/mysql-test/suite/innodb/t/innodb_bug12400341-master.opt b/mysql-test/suite/innodb/t/innodb_bug12400341-master.opt
index 13f480704f5..9f65e8b12e4 100644
--- a/mysql-test/suite/innodb/t/innodb_bug12400341-master.opt
+++ b/mysql-test/suite/innodb/t/innodb_bug12400341-master.opt
@@ -1 +1 @@
---max_connections=64 --innodb_thread_concurrency=0 --innodb_file_per_table --innodb_rollback_segments=2
+--max_connections=64 --innodb_thread_concurrency=0
diff --git a/mysql-test/suite/innodb/t/innodb_bug12400341.test b/mysql-test/suite/innodb/t/innodb_bug12400341.test
index 5fb0d63ebe7..3b5fd18a456 100644
--- a/mysql-test/suite/innodb/t/innodb_bug12400341.test
+++ b/mysql-test/suite/innodb/t/innodb_bug12400341.test
@@ -18,9 +18,6 @@ set @old_innodb_trx_rseg_n_slots_debug = @@innodb_trx_rseg_n_slots_debug;
set global innodb_trx_rseg_n_slots_debug = 32;
--enable_query_log
-set @old_innodb_undo_logs = @@innodb_undo_logs;
-set global innodb_undo_logs=1;
-
show variables like "max_connections";
show variables like "innodb_thread_concurrency";
show variables like "innodb_file_per_table";
@@ -105,8 +102,6 @@ while ($c)
#
drop database mysqltest;
-set global innodb_undo_logs = @old_innodb_undo_logs;
-
--disable_query_log
set global innodb_trx_rseg_n_slots_debug = @old_innodb_trx_rseg_n_slots_debug;
--enable_query_log
diff --git a/mysql-test/suite/innodb/t/innodb_bug12902967.test b/mysql-test/suite/innodb/t/innodb_bug12902967.test
index 1b5df7fa165..5bd32cdf627 100644
--- a/mysql-test/suite/innodb/t/innodb_bug12902967.test
+++ b/mysql-test/suite/innodb/t/innodb_bug12902967.test
@@ -19,7 +19,7 @@ create table t1 (f1 integer primary key) engine innodb;
# The below statement should produce error message in error log.
# This error message should mention problem with foreign keys
# rather than with data dictionary.
---replace_regex /'\.\/test\/#sql-[0-9a-f_]*'/'#sql-temporary'/
+--replace_regex /'\.\/test\/#sql-alter-[0-9a-f_\-]*'/'#sql-alter'/
--error ER_ERROR_ON_RENAME
alter table t1 add constraint c1 foreign key (f1) references t1(f1);
drop table t1;
diff --git a/mysql-test/suite/innodb/t/innodb_bug14147491-master.opt b/mysql-test/suite/innodb/t/innodb_bug14147491-master.opt
index 410738202bd..614dd9356f1 100644
--- a/mysql-test/suite/innodb/t/innodb_bug14147491-master.opt
+++ b/mysql-test/suite/innodb/t/innodb_bug14147491-master.opt
@@ -1,4 +1,4 @@
--innodb_file_per_table=1
---skip-stack-trace
+--loose-skip-stack-trace
--skip-core-file
--loose-innodb_buffer_pool_load_at_startup=OFF
diff --git a/mysql-test/suite/innodb/t/innodb_bug14147491.test b/mysql-test/suite/innodb/t/innodb_bug14147491.test
index 44b9d16ca78..c6e4f01a642 100644
--- a/mysql-test/suite/innodb/t/innodb_bug14147491.test
+++ b/mysql-test/suite/innodb/t/innodb_bug14147491.test
@@ -9,7 +9,7 @@
--disable_query_log
call mtr.add_suppression("InnoDB: Table `test`\\.`t1` is corrupted\\. Please drop the table and recreate\\.");
-call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed file read of tablespace test/t1 page");
+call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed read of file '.*test.t1\\.ibd' page");
call mtr.add_suppression("InnoDB: We detected index corruption in an InnoDB type table");
call mtr.add_suppression("Index for table 't1' is corrupt; try to repair it");
--enable_query_log
diff --git a/mysql-test/suite/innodb/t/innodb_bug30113362.test b/mysql-test/suite/innodb/t/innodb_bug30113362.test
index de5d07ffb29..789f1a493cb 100644
--- a/mysql-test/suite/innodb/t/innodb_bug30113362.test
+++ b/mysql-test/suite/innodb/t/innodb_bug30113362.test
@@ -6,6 +6,8 @@
--source include/have_debug.inc
--source include/have_debug_sync.inc
--source include/have_innodb_16k.inc
+# debug sync points times out when using valgrind
+--source include/not_valgrind.inc
--disable_query_log
SET @old_innodb_limit_optimistic_insert_debug = @@innodb_limit_optimistic_insert_debug;
diff --git a/mysql-test/suite/innodb/t/innodb_bug34300.test b/mysql-test/suite/innodb/t/innodb_bug34300.test
index 8c73af13bc1..3ca03164b5b 100644
--- a/mysql-test/suite/innodb/t/innodb_bug34300.test
+++ b/mysql-test/suite/innodb/t/innodb_bug34300.test
@@ -1,5 +1,5 @@
--echo #
---echo # Bug#34300 Tinyblob & tinytext fields currupted after export/import and alter in 5.1
+--echo # Bug#34300 Tinyblob & tinytext fields corrupted after export/import and alter in 5.1
--echo #
-- source include/have_innodb.inc
diff --git a/mysql-test/suite/innodb/t/innodb_bug35220.test b/mysql-test/suite/innodb/t/innodb_bug35220.test
index 29c432fe987..8ad6b3070c3 100644
--- a/mysql-test/suite/innodb/t/innodb_bug35220.test
+++ b/mysql-test/suite/innodb/t/innodb_bug35220.test
@@ -4,7 +4,7 @@
# http://bugs.mysql.com/35220
#
-SET storage_engine=InnoDB;
+SET default_storage_engine=InnoDB;
# we care only that the following SQL commands do not produce errors
-- disable_query_log
diff --git a/mysql-test/suite/innodb/t/innodb_bug38231.test b/mysql-test/suite/innodb/t/innodb_bug38231.test
index ba4e1c62e06..0c139c338c4 100644
--- a/mysql-test/suite/innodb/t/innodb_bug38231.test
+++ b/mysql-test/suite/innodb/t/innodb_bug38231.test
@@ -9,7 +9,7 @@
# preceded by --send
-- source include/not_embedded.inc
-SET storage_engine=InnoDB;
+SET default_storage_engine=InnoDB;
# we care only that the following SQL commands do not crash the server
-- disable_query_log
diff --git a/mysql-test/suite/innodb/t/innodb_bug39438.test b/mysql-test/suite/innodb/t/innodb_bug39438.test
index 3a838da8419..635d65f045b 100644
--- a/mysql-test/suite/innodb/t/innodb_bug39438.test
+++ b/mysql-test/suite/innodb/t/innodb_bug39438.test
@@ -8,7 +8,7 @@
# works with innodb_file_per_table.
#
-SET storage_engine=InnoDB;
+SET default_storage_engine=InnoDB;
# we care only that the following SQL commands do not crash the server
-- disable_query_log
diff --git a/mysql-test/suite/innodb/t/innodb_bug42101-nonzero-master.opt b/mysql-test/suite/innodb/t/innodb_bug42101-nonzero-master.opt
deleted file mode 100644
index e82f614c897..00000000000
--- a/mysql-test/suite/innodb/t/innodb_bug42101-nonzero-master.opt
+++ /dev/null
@@ -1 +0,0 @@
---loose-innodb-commit-concurrency=1
diff --git a/mysql-test/suite/innodb/t/innodb_bug42101-nonzero.test b/mysql-test/suite/innodb/t/innodb_bug42101-nonzero.test
deleted file mode 100644
index 3ee3f1e6a8b..00000000000
--- a/mysql-test/suite/innodb/t/innodb_bug42101-nonzero.test
+++ /dev/null
@@ -1,20 +0,0 @@
---source include/have_innodb.inc
-#
-# Bug#42101 Race condition in innodb_commit_concurrency
-# http://bugs.mysql.com/42101
-#
-
---error ER_WRONG_VALUE_FOR_VAR
-set global innodb_commit_concurrency=0;
-select @@innodb_commit_concurrency;
-set global innodb_commit_concurrency=1;
-select @@innodb_commit_concurrency;
-set global innodb_commit_concurrency=42;
-select @@innodb_commit_concurrency;
-set global innodb_commit_concurrency=DEFAULT;
-select @@innodb_commit_concurrency;
---error ER_WRONG_VALUE_FOR_VAR
-set global innodb_commit_concurrency=0;
-select @@innodb_commit_concurrency;
-set global innodb_commit_concurrency=1;
-select @@innodb_commit_concurrency;
diff --git a/mysql-test/suite/innodb/t/innodb_bug42101.test b/mysql-test/suite/innodb/t/innodb_bug42101.test
deleted file mode 100644
index 374d3e6b5f5..00000000000
--- a/mysql-test/suite/innodb/t/innodb_bug42101.test
+++ /dev/null
@@ -1,18 +0,0 @@
---source include/have_innodb.inc
-#
-# Bug#42101 Race condition in innodb_commit_concurrency
-# http://bugs.mysql.com/42101
-#
-
-set global innodb_commit_concurrency=0;
-select @@innodb_commit_concurrency;
---error ER_WRONG_VALUE_FOR_VAR
-set global innodb_commit_concurrency=1;
-select @@innodb_commit_concurrency;
---error ER_WRONG_VALUE_FOR_VAR
-set global innodb_commit_concurrency=42;
-select @@innodb_commit_concurrency;
-set global innodb_commit_concurrency=0;
-select @@innodb_commit_concurrency;
-set global innodb_commit_concurrency=DEFAULT;
-select @@innodb_commit_concurrency;
diff --git a/mysql-test/suite/innodb/t/innodb_bug53674-master.opt b/mysql-test/suite/innodb/t/innodb_bug53674-master.opt
index 1fe48c3a33a..01cf3e0520f 100644
--- a/mysql-test/suite/innodb/t/innodb_bug53674-master.opt
+++ b/mysql-test/suite/innodb/t/innodb_bug53674-master.opt
@@ -1 +1 @@
---loose-innodb-locks-unsafe-for-binlog --binlog-format=mixed
+--binlog-format=mixed
diff --git a/mysql-test/suite/innodb/t/innodb_bug53756-master.opt b/mysql-test/suite/innodb/t/innodb_bug53756-master.opt
index 425fda95086..590d44a6d12 100644
--- a/mysql-test/suite/innodb/t/innodb_bug53756-master.opt
+++ b/mysql-test/suite/innodb/t/innodb_bug53756-master.opt
@@ -1 +1 @@
---skip-stack-trace --skip-core-file
+--loose-skip-stack-trace --skip-core-file
diff --git a/mysql-test/suite/innodb/t/innodb_bulk_create_index_flush.test b/mysql-test/suite/innodb/t/innodb_bulk_create_index_flush.test
deleted file mode 100644
index cffca0cc773..00000000000
--- a/mysql-test/suite/innodb/t/innodb_bulk_create_index_flush.test
+++ /dev/null
@@ -1,75 +0,0 @@
-#
-# Test flush on error in bulk load to make sure we do a proper cleanup.
-# Note: We flush all dirty pages before applying any online log in bulk load.
-#
-
--- source include/have_innodb.inc
--- source include/have_debug.inc
-
-# Create Insert Procedure
-DELIMITER |;
-CREATE PROCEDURE populate_t1()
-BEGIN
- DECLARE i int DEFAULT 1;
-
- START TRANSACTION;
- WHILE (i <= 10000) DO
- INSERT INTO t1 VALUES (i, i, CONCAT('a', i));
- SET i = i + 1;
- END WHILE;
- COMMIT;
-END|
-DELIMITER ;|
-
-CREATE TABLE t1(
- class INT,
- id INT,
- title VARCHAR(100)
-) ENGINE=InnoDB;
-
--- disable_query_log
-CALL populate_t1();
--- enable_query_log
-
-SELECT COUNT(*) FROM t1;
-
-SET @saved_dbug= @@SESSION.debug_dbug;
-SET debug_dbug='+d,ib_index_build_fail_before_flush';
-
--- error ER_QUERY_INTERRUPTED
-CREATE INDEX idx_id ON t1(id);
-
-CHECK TABLE t1;
-
--- error ER_QUERY_INTERRUPTED
-CREATE INDEX idx_title ON t1(title);
-
-CHECK TABLE t1;
-
--- error ER_QUERY_INTERRUPTED
-CREATE FULLTEXT INDEX fidx_title ON t1(title);
-
-CHECK TABLE t1;
-
--- error ER_QUERY_INTERRUPTED
-ALTER TABLE t1 ADD COLUMN content TEXT, FORCE;
-
-CHECK TABLE t1;
-
-SET debug_dbug= @saved_dbug;
-
-INSERT INTO t1 VALUES(10001, 10001, 'a10000');
-
--- error ER_DUP_ENTRY
-ALTER TABLE t1 ADD UNIQUE INDEX idx_title(title);
-
-CHECK TABLE t1;
-
--- error ER_DUP_ENTRY
-ALTER TABLE t1 ADD UNIQUE INDEX idx_id(id), ADD UNIQUE INDEX idx_title(title);
-
-CHECK TABLE t1;
-
-DROP TABLE t1;
-
-DROP PROCEDURE populate_t1;
diff --git a/mysql-test/suite/innodb/t/innodb_ctype_big5.test b/mysql-test/suite/innodb/t/innodb_ctype_big5.test
index 684a97983e5..551d6add54b 100644
--- a/mysql-test/suite/innodb/t/innodb_ctype_big5.test
+++ b/mysql-test/suite/innodb/t/innodb_ctype_big5.test
@@ -1,7 +1,7 @@
--source include/have_innodb.inc
--source include/have_big5.inc
-SET STORAGE_ENGINE=InnoDB;
+SET DEFAULT_STORAGE_ENGINE=InnoDB;
--echo #
--echo # Start of 10.2 tests
diff --git a/mysql-test/suite/innodb/t/innodb_ctype_latin1.test b/mysql-test/suite/innodb/t/innodb_ctype_latin1.test
index 0f88ae3212d..1eb9864f3b9 100644
--- a/mysql-test/suite/innodb/t/innodb_ctype_latin1.test
+++ b/mysql-test/suite/innodb/t/innodb_ctype_latin1.test
@@ -1,6 +1,6 @@
--source include/have_innodb.inc
-SET STORAGE_ENGINE=InnoDB;
+SET DEFAULT_STORAGE_ENGINE=InnoDB;
--echo #
--echo # Start of 10.2 tests
diff --git a/mysql-test/suite/innodb/t/innodb_ctype_ldml.test b/mysql-test/suite/innodb/t/innodb_ctype_ldml.test
index 26af717b15a..f065c51505b 100644
--- a/mysql-test/suite/innodb/t/innodb_ctype_ldml.test
+++ b/mysql-test/suite/innodb/t/innodb_ctype_ldml.test
@@ -13,6 +13,7 @@ drop table if exists t1;
--disable_query_log
call mtr.add_suppression("Syntax error at '\\[strength tertiary\\]'");
call mtr.add_suppression("Can't reset before a primary ignorable character U\\+A48C");
+call mtr.add_suppression("Charset id.*trying to replace");
--enable_query_log
--echo In the following tests we change the order of letter "b"
diff --git a/mysql-test/suite/innodb/t/innodb_ctype_utf8.test b/mysql-test/suite/innodb/t/innodb_ctype_utf8.test
index 105f771d8b3..c3abaa99731 100644
--- a/mysql-test/suite/innodb/t/innodb_ctype_utf8.test
+++ b/mysql-test/suite/innodb/t/innodb_ctype_utf8.test
@@ -1,6 +1,6 @@
--source include/have_innodb.inc
-SET STORAGE_ENGINE=InnoDB;
+SET DEFAULT_STORAGE_ENGINE=InnoDB;
--echo #
--echo # Start of 10.2 tests
diff --git a/mysql-test/suite/innodb/t/innodb_defrag_concurrent.opt b/mysql-test/suite/innodb/t/innodb_defrag_concurrent.opt
index 6426bac41a0..3242c6cf2ab 100644
--- a/mysql-test/suite/innodb/t/innodb_defrag_concurrent.opt
+++ b/mysql-test/suite/innodb/t/innodb_defrag_concurrent.opt
@@ -1,4 +1,5 @@
--loose-innodb-buffer-pool-stats
--loose-innodb-buffer-page
--loose-innodb-buffer-page-lru
+--innodb-log-buffer-size=3m
--innodb-defragment=1 \ No newline at end of file
diff --git a/mysql-test/suite/innodb/t/innodb_force_recovery.test b/mysql-test/suite/innodb/t/innodb_force_recovery.test
index fe070100c08..76baf55af83 100644
--- a/mysql-test/suite/innodb/t/innodb_force_recovery.test
+++ b/mysql-test/suite/innodb/t/innodb_force_recovery.test
@@ -17,47 +17,33 @@ insert into t2 values(1, 2);
SET GLOBAL innodb_fast_shutdown = 0;
---echo # Restart the server with innodb_force_recovery as 4.
--let $restart_parameters= --innodb-force-recovery=4
--source include/restart_mysqld.inc
let $status=`SHOW ENGINE INNODB STATUS`;
select * from t1;
---error ER_READ_ONLY_MODE
+begin;
insert into t1 values(2, 3);
+rollback;
---error ER_CANT_CREATE_TABLE
alter table t1 add f3 int not null, algorithm=copy;
---error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
-alter table t1 add f3 int not null, algorithm=inplace;
+alter table t1 add f4 int not null, algorithm=inplace;
---error ER_CANT_CREATE_TABLE
drop index idx on t1;
---error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
-alter table t1 drop index idx, algorithm=inplace;
---error ER_READ_ONLY_MODE
update t1 set f1=3 where f2=2;
---error ER_CANT_CREATE_TABLE
create table t3(f1 int not null)engine=innodb;
-
---error ER_BAD_TABLE_ERROR
drop table t3;
---error ER_ERROR_ON_RENAME
rename table t1 to t3;
-
---error ER_OPEN_AS_READONLY
+rename table t3 to t1;
truncate table t1;
---error ER_OPEN_AS_READONLY
-drop table t1;
show tables;
---echo # Restart the server with innodb_force_recovery as 5.
--let $restart_parameters= --innodb-force-recovery=5
--source include/restart_mysqld.inc
let $status=`SHOW ENGINE INNODB STATUS`;
@@ -82,7 +68,7 @@ update t2 set f1=3 where f2=2;
--error ER_CANT_CREATE_TABLE
create table t3(f1 int not null)engine=innodb;
---error ER_BAD_TABLE_ERROR
+--error ER_OPEN_AS_READONLY
drop table t3;
--error ER_ERROR_ON_RENAME
@@ -98,7 +84,6 @@ create schema db;
drop schema db;
show tables;
---echo # Restart the server with innodb_force_recovery as 6.
--let $restart_parameters= --innodb-force-recovery=6
--source include/restart_mysqld.inc
let $status=`SHOW ENGINE INNODB STATUS`;
@@ -136,7 +121,6 @@ truncate table t2;
drop table t2;
show tables;
---echo # Restart the server with innodb_force_recovery=2
--let $restart_parameters= --innodb-force-recovery=2
--source include/restart_mysqld.inc
let $status=`SHOW ENGINE INNODB STATUS`;
@@ -154,7 +138,6 @@ disconnect con1;
connection default;
--source include/kill_mysqld.inc
---echo # Restart the server with innodb_force_recovery=3
--let $restart_parameters= --innodb-force-recovery=3
--source include/start_mysqld.inc
let $status=`SHOW ENGINE INNODB STATUS`;
diff --git a/mysql-test/suite/innodb/t/innodb_gis.test b/mysql-test/suite/innodb/t/innodb_gis.test
index cb04c15f0b6..c895d0a2af2 100644
--- a/mysql-test/suite/innodb/t/innodb_gis.test
+++ b/mysql-test/suite/innodb/t/innodb_gis.test
@@ -1,5 +1,5 @@
--source include/have_innodb.inc
-SET storage_engine=innodb;
+SET default_storage_engine=innodb;
--source include/gis_generic.inc
--source include/gis_keys.inc
diff --git a/mysql-test/suite/innodb/t/innodb_information_schema.test b/mysql-test/suite/innodb/t/innodb_information_schema.test
index da7ee016f29..395fa779773 100644
--- a/mysql-test/suite/innodb/t/innodb_information_schema.test
+++ b/mysql-test/suite/innodb/t/innodb_information_schema.test
@@ -15,7 +15,7 @@
-- disable_query_log
-- disable_result_log
-SET storage_engine=InnoDB;
+SET default_storage_engine=InnoDB;
-- disable_warnings
DROP TABLE IF EXISTS t_min, t_max;
diff --git a/mysql-test/suite/innodb/t/innodb_information_schema_buffer.test b/mysql-test/suite/innodb/t/innodb_information_schema_buffer.test
index 5bfac22ec39..7f0d4f0a737 100644
--- a/mysql-test/suite/innodb/t/innodb_information_schema_buffer.test
+++ b/mysql-test/suite/innodb/t/innodb_information_schema_buffer.test
@@ -8,19 +8,9 @@
-- source include/have_innodb.inc
--- disable_result_log
+--replace_regex /([0-9]*\.)?[0-9]+/#/
SELECT * FROM INFORMATION_SCHEMA.INNODB_BUFFER_POOL_STATS;
-# How many buffer pools we have
-SELECT count(*) FROM INFORMATION_SCHEMA.INNODB_BUFFER_POOL_STATS;
-
-SELECT * FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE;
-
-# This gives the over all buffer pool size
-SELECT COUNT(*) FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE;
-
--- enable_result_log
-
# Create a table and check its page info behave correctly in the pool
CREATE TABLE infoschema_buffer_test (col1 INT) ENGINE = INNODB;
@@ -28,36 +18,27 @@ INSERT INTO infoschema_buffer_test VALUES(9);
# We should be able to see this table in the buffer pool if we check
# right away
-SELECT TABLE_NAME, INDEX_NAME, NUMBER_RECORDS, DATA_SIZE, PAGE_STATE, PAGE_TYPE
-FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE
-WHERE TABLE_NAME like "%infoschema_buffer_test%"
- and PAGE_STATE="file_page" and PAGE_TYPE="index";
+--sorted_result
+--replace_column 2 # 3 # 7 FIX 8 AHI 9 LSN 10 LSN 11 TIME 18 IO_FIX 19 OLD 20 #
+SELECT * FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE
+WHERE TABLE_NAME LIKE '%infoschema_buffer_test%' AND PAGE_TYPE='index';
# The NUMBER_RECORDS and DATA_SIZE should check with each insertion
INSERT INTO infoschema_buffer_test VALUES(19);
-SELECT TABLE_NAME, INDEX_NAME, NUMBER_RECORDS, DATA_SIZE, PAGE_STATE, PAGE_TYPE
-FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE
-WHERE TABLE_NAME like "%infoschema_buffer_test%"
-and PAGE_STATE="file_page" and PAGE_TYPE="index";
-
CREATE INDEX idx ON infoschema_buffer_test(col1);
-SELECT TABLE_NAME, INDEX_NAME, NUMBER_RECORDS, DATA_SIZE, PAGE_STATE, PAGE_TYPE
-FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE
-WHERE TABLE_NAME like "%infoschema_buffer_test%"
-and PAGE_STATE="file_page" and INDEX_NAME = "idx" and PAGE_TYPE="index";
-
+--sorted_result
+--replace_column 2 # 3 # 7 FIX 8 AHI 9 LSN 10 LSN 11 TIME 18 IO_FIX 19 OLD 20 #
+SELECT * FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE
+WHERE TABLE_NAME LIKE '%infoschema_buffer_test%' AND PAGE_TYPE='index';
# Check the buffer after dropping the table
DROP TABLE infoschema_buffer_test;
-SELECT TABLE_NAME, INDEX_NAME, NUMBER_RECORDS, DATA_SIZE, PAGE_STATE, PAGE_TYPE
-FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE
-WHERE TABLE_NAME like "%infoschema_buffer_test%";
+SELECT * FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE
+WHERE TABLE_NAME LIKE '%infoschema_buffer_test%';
-# Do one more test
-#--replace_regex /'*[0-9]*'/'NUM'/
CREATE TABLE infoschema_parent (id INT NOT NULL, PRIMARY KEY (id))
ENGINE=INNODB;
@@ -67,11 +48,10 @@ CREATE TABLE infoschema_child (id INT, parent_id INT, INDEX par_ind (parent_id),
ON DELETE CASCADE)
ENGINE=INNODB;
-SELECT count(*)
-FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE
-WHERE TABLE_NAME like "%infoschema_child%" and PAGE_STATE="file_page"
-and PAGE_TYPE="index";
+--sorted_result
+--replace_column 2 # 3 # 7 FIX 8 AHI 9 LSN 10 LSN 11 TIME 18 IO_FIX 19 OLD 20 #
+SELECT * FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE
+WHERE TABLE_NAME LIKE '%infoschema_child%';
DROP TABLE infoschema_child;
DROP TABLE infoschema_parent;
-
diff --git a/mysql-test/suite/innodb/t/innodb_lock_wait_timeout_1.test b/mysql-test/suite/innodb/t/innodb_lock_wait_timeout_1.test
index 23e8b40b010..ea31d4a14c5 100644
--- a/mysql-test/suite/innodb/t/innodb_lock_wait_timeout_1.test
+++ b/mysql-test/suite/innodb/t/innodb_lock_wait_timeout_1.test
@@ -49,9 +49,6 @@ DROP TABLE t2, t1;
--echo # Bug#46539 Various crashes on INSERT IGNORE SELECT + SELECT
--echo # FOR UPDATE
--echo #
---disable_warnings
-drop table if exists t1;
---enable_warnings
create table t1 (a int primary key auto_increment,
b int, index(b)) engine=innodb;
insert into t1 (b) values (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
@@ -107,21 +104,12 @@ drop table t1, t2;
--echo #
--echo # Bug#41756 Strange error messages about locks from InnoDB
--echo #
---disable_warnings
-drop table if exists t1;
---enable_warnings
---echo # In the default transaction isolation mode, and/or with
---echo # innodb_locks_unsafe_for_binlog=OFF, handler::unlock_row()
---echo # in InnoDB does nothing.
+--echo # In the default transaction isolation mode,
+--echo # handler::unlock_row() in InnoDB does nothing.
--echo # Thus in order to reproduce the condition that led to the
--echo # warning, one needs to relax isolation by either
--echo # setting a weaker tx_isolation value, or by turning on
--echo # the unsafe replication switch.
---echo # For testing purposes, choose to tweak the isolation level,
---echo # since it's settable at runtime, unlike
---echo # innodb_locks_unsafe_for_binlog, which is
---echo # only a command-line switch.
---echo #
set @@session.tx_isolation="read-committed";
--echo # Prepare data. We need a table with a unique index,
diff --git a/mysql-test/suite/innodb/t/innodb_rename_index.test b/mysql-test/suite/innodb/t/innodb_rename_index.test
new file mode 100644
index 00000000000..5ae09fb18f1
--- /dev/null
+++ b/mysql-test/suite/innodb/t/innodb_rename_index.test
@@ -0,0 +1,538 @@
+--source include/have_innodb.inc
+
+#
+# Test "ALTER TABLE ... RENAME INDEX" in InnoDB
+#
+
+let create =
+CREATE TABLE t (
+ a INT,
+ b INT,
+ c INT,
+ d INT,
+ e INT,
+ f INT,
+ PRIMARY KEY (a),
+ INDEX i1 (b),
+ INDEX i2 (c),
+ INDEX i3 (d),
+ INDEX i4 (e)
+) ENGINE=INNODB;
+
+let insert = INSERT INTO t SET a = 1;
+
+let show_table =
+SHOW CREATE TABLE t;
+
+let show_sys =
+SELECT
+t.name AS table_name,
+i.name AS index_name,
+f.name AS column_name
+FROM
+information_schema.innodb_sys_tables t,
+information_schema.innodb_sys_indexes i,
+information_schema.innodb_sys_fields f
+WHERE
+t.name LIKE '%/t' AND
+t.table_id = i.table_id AND
+i.index_id = f.index_id
+ORDER BY 1, 2, 3;
+
+-- eval $create
+
+# Add a row, so that affected rows would be nonzero for ALGORITHM=COPY.
+# ALGORITHM=INPLACE will report 0 affected row in the result file.
+# We will have enable_info/disable_info around every successful ALTER
+# to enable the affected rows: output in the result file.
+-- eval $insert
+
+-- error ER_WRONG_NAME_FOR_INDEX
+ALTER TABLE t RENAME INDEX i1 TO GEN_CLUST_INDEX;
+
+# Test all combinations of ADD w, DROP x, RENAME y TO z.
+#
+# Use the following names for wxyz (with 1 to 4 of wxyz being the same):
+# aaaa abcd aabb abab abba abcc acbc accb cacb cabc ccab aaab aaba abaa baaa
+#
+# Some cases should trivially succeed or fail. Test them in isolation:
+# no-op: y=z (RENAME y TO y)
+# rules out the combinations ..\(.\)\1
+# a.k.a. aaaa aabb abcc abaa baaa
+
+# We use the index names i1 to i4 for existing indexes abcd.
+# Non-existing index names will be aa,bb,cc,dd.
+# Index creation on non-existing columns will not be tested.
+
+ALTER TABLE t RENAME INDEX i1 TO i1;
+-- error ER_KEY_DOES_NOT_EXISTS
+ALTER TABLE t RENAME INDEX aa TO aa;
+
+-- echo # combination: aaaa
+# drop/add existing, null rename and drop the same
+-- error ER_KEY_DOES_NOT_EXISTS
+ALTER TABLE t ADD INDEX i4(f), DROP INDEX i4, RENAME INDEX i4 TO i4;
+
+-- echo # combination: aabb
+-- error ER_CANT_DROP_FIELD_OR_KEY
+ALTER TABLE t ADD INDEX aa(f), DROP INDEX aa, RENAME INDEX i2 TO i2;
+-- error ER_CANT_DROP_FIELD_OR_KEY
+ALTER TABLE t ADD INDEX aa(f), DROP INDEX aa, RENAME INDEX bb TO bb;
+-- error ER_KEY_DOES_NOT_EXISTS
+ALTER TABLE t ADD INDEX i1(f), DROP INDEX i1, RENAME INDEX bb TO bb;
+
+-- enable_info
+ALTER TABLE t ADD INDEX i1(f), DROP INDEX i1, RENAME INDEX i2 TO i2;
+-- disable_info
+-- eval $show_table
+-- eval $show_sys
+DROP TABLE t;
+-- eval $create
+-- eval $insert
+
+-- echo # combination: abcc
+
+-- error ER_CANT_DROP_FIELD_OR_KEY
+ALTER TABLE t ADD INDEX aa(f), DROP INDEX bb, RENAME INDEX cc TO cc;
+-- error ER_CANT_DROP_FIELD_OR_KEY
+ALTER TABLE t ADD INDEX aa(f), DROP INDEX bb, RENAME INDEX i3 TO i3;
+-- error ER_KEY_DOES_NOT_EXISTS
+ALTER TABLE t ADD INDEX aa(f), DROP INDEX i2, RENAME INDEX cc TO cc;
+
+# rename existing (succeeds)
+-- enable_info
+ALTER TABLE t ADD INDEX aa(f), DROP INDEX i2, RENAME INDEX i3 TO i3;
+-- disable_info
+-- eval $show_table
+-- eval $show_sys
+DROP TABLE t;
+-- eval $create
+-- eval $insert
+
+-- echo # combination: abaa
+
+-- error ER_KEY_DOES_NOT_EXISTS
+ALTER TABLE t ADD INDEX aa(f), DROP INDEX i1, RENAME INDEX aa TO aa;
+-- error ER_DUP_KEYNAME
+ALTER TABLE t ADD INDEX i1(f), DROP INDEX i2, RENAME INDEX i1 TO i1;
+-- error ER_CANT_DROP_FIELD_OR_KEY
+ALTER TABLE t ADD INDEX i1(f), DROP INDEX bb, RENAME INDEX i1 TO i1;
+-- error ER_CANT_DROP_FIELD_OR_KEY
+ALTER TABLE t ADD INDEX aa(f), DROP INDEX bb, RENAME INDEX aa TO aa;
+
+-- echo # combination: baaa
+
+-- error ER_KEY_DOES_NOT_EXISTS
+ALTER TABLE t ADD INDEX i2(f), DROP INDEX i1, RENAME INDEX i1 TO i1;
+-- error ER_KEY_DOES_NOT_EXISTS
+ALTER TABLE t ADD INDEX bb(f), DROP INDEX i1, RENAME INDEX i1 TO i1;
+-- error ER_CANT_DROP_FIELD_OR_KEY
+ALTER TABLE t ADD INDEX i2(f), DROP INDEX aa, RENAME INDEX aa TO aa;
+-- error ER_CANT_DROP_FIELD_OR_KEY
+ALTER TABLE t ADD INDEX bb(f), DROP INDEX aa, RENAME INDEX aa TO aa;
+
+# refuse: w=z (ADD w, RENAME y TO w)
+# rules out the combinations \(.\)..\1
+# a.k.a. aaaa abba cabc aaba abaa
+# the case w=y (ADD w, RENAME w to z) may succeed, as seen below
+
+-- error ER_KEY_DOES_NOT_EXISTS
+ALTER TABLE t ADD INDEX aa(f), RENAME INDEX aa TO bb;
+-- error ER_KEY_DOES_NOT_EXISTS
+ALTER TABLE t ADD INDEX aa(f), RENAME INDEX bb TO aa;
+-- error ER_DUP_KEYNAME
+ALTER TABLE t ADD INDEX aa(f), RENAME INDEX i2 TO aa;
+
+# rename existing, add one with the same name
+-- enable_info
+ALTER TABLE t ADD INDEX i1(f), RENAME INDEX i1 TO bb;
+-- disable_info
+-- eval $show_table
+-- eval $show_sys
+DROP TABLE t;
+-- eval $create
+-- eval $insert
+
+-- echo # combination: abba
+
+-- error ER_KEY_DOES_NOT_EXISTS
+ALTER TABLE t ADD INDEX i1(f), DROP INDEX i2, RENAME INDEX i2 TO i1;
+-- error ER_KEY_DOES_NOT_EXISTS
+ALTER TABLE t ADD INDEX aa(f), DROP INDEX i2, RENAME INDEX i2 TO aa;
+-- error ER_CANT_DROP_FIELD_OR_KEY
+ALTER TABLE t ADD INDEX i1(f), DROP INDEX bb, RENAME INDEX bb TO i1;
+-- error ER_CANT_DROP_FIELD_OR_KEY
+ALTER TABLE t ADD INDEX aa(f), DROP INDEX bb, RENAME INDEX bb TO aa;
+
+-- echo # combination: cabc
+
+-- error ER_DUP_KEYNAME
+ALTER TABLE t ADD INDEX i3(f), DROP INDEX i1, RENAME INDEX i2 TO i3;
+-- error ER_CANT_DROP_FIELD_OR_KEY
+ALTER TABLE t ADD INDEX i3(f), DROP INDEX aa, RENAME INDEX i2 TO i3;
+-- error ER_KEY_DOES_NOT_EXISTS
+ALTER TABLE t ADD INDEX i3(f), DROP INDEX i1, RENAME INDEX bb TO i3;
+-- error ER_CANT_DROP_FIELD_OR_KEY
+ALTER TABLE t ADD INDEX i3(f), DROP INDEX aa, RENAME INDEX bb TO i3;
+
+-- error ER_DUP_KEYNAME
+ALTER TABLE t ADD INDEX cc(f), DROP INDEX i1, RENAME INDEX i2 TO cc;
+-- error ER_CANT_DROP_FIELD_OR_KEY
+ALTER TABLE t ADD INDEX cc(f), DROP INDEX aa, RENAME INDEX i2 TO cc;
+-- error ER_KEY_DOES_NOT_EXISTS
+ALTER TABLE t ADD INDEX cc(f), DROP INDEX i1, RENAME INDEX bb TO cc;
+-- error ER_CANT_DROP_FIELD_OR_KEY
+ALTER TABLE t ADD INDEX cc(f), DROP INDEX aa, RENAME INDEX bb TO cc;
+
+# refuse: x=y (DROP x, RENAME x TO z)
+# rules out the combinations .\(.\)\1.
+# a.k.a. aaaa abba accb aaab baaa
+
+# rename and drop the same
+-- error ER_KEY_DOES_NOT_EXISTS
+ALTER TABLE t DROP INDEX i1, RENAME INDEX i1 TO bb;
+# drop non-existing
+-- error ER_CANT_DROP_FIELD_OR_KEY
+ALTER TABLE t DROP INDEX aa, RENAME INDEX i2 TO aa;
+-- error ER_CANT_DROP_FIELD_OR_KEY
+ALTER TABLE t DROP INDEX aa, RENAME INDEX aa TO i2;
+
+# this one will succeed (drop, replace with an existing one)
+-- enable_info
+ALTER TABLE t DROP INDEX i1, RENAME INDEX i4 TO i1;
+-- disable_info
+-- eval $show_table
+-- eval $show_sys
+DROP TABLE t;
+-- eval $create
+-- eval $insert
+
+-- echo # combination: accb
+
+-- error ER_KEY_DOES_NOT_EXISTS
+ALTER TABLE t ADD INDEX i1(f), DROP INDEX i3, RENAME INDEX i3 TO i2;
+-- error ER_KEY_DOES_NOT_EXISTS
+ALTER TABLE t ADD INDEX i1(f), DROP INDEX i3, RENAME INDEX i3 TO bb;
+-- error ER_CANT_DROP_FIELD_OR_KEY
+ALTER TABLE t ADD INDEX i1(f), DROP INDEX cc, RENAME INDEX cc TO i2;
+-- error ER_CANT_DROP_FIELD_OR_KEY
+ALTER TABLE t ADD INDEX i1(f), DROP INDEX cc, RENAME INDEX cc TO bb;
+-- error ER_CANT_DROP_FIELD_OR_KEY
+ALTER TABLE t ADD INDEX aa(f), DROP INDEX cc, RENAME INDEX cc TO i2;
+-- error ER_CANT_DROP_FIELD_OR_KEY
+ALTER TABLE t ADD INDEX aa(f), DROP INDEX cc, RENAME INDEX cc TO bb;
+
+-- echo # combination: aaab
+
+-- error ER_KEY_DOES_NOT_EXISTS
+ALTER TABLE t ADD INDEX i1(f), DROP INDEX i1, RENAME INDEX i1 TO i2;
+-- error ER_KEY_DOES_NOT_EXISTS
+ALTER TABLE t ADD INDEX i1(f), DROP INDEX i1, RENAME INDEX i1 TO bb;
+-- error ER_KEY_DOES_NOT_EXISTS
+ALTER TABLE t ADD INDEX i1(f), DROP INDEX i1, RENAME INDEX i1 TO i2;
+-- error ER_CANT_DROP_FIELD_OR_KEY
+ALTER TABLE t ADD INDEX aa(f), DROP INDEX aa, RENAME INDEX aa TO bb;
+
+# Remaining combinations: abcd abab acbc cacb ccab
+
+-- echo # combination: abcd
+
+-- error ER_KEY_DOES_NOT_EXISTS
+ALTER TABLE t ADD INDEX i1(f), DROP INDEX i2, RENAME INDEX cc TO i4;
+-- error ER_KEY_DOES_NOT_EXISTS
+ALTER TABLE t ADD INDEX i1(f), DROP INDEX i2, RENAME INDEX cc TO dd;
+-- error ER_KEY_DOES_NOT_EXISTS
+ALTER TABLE t ADD INDEX aa(f), DROP INDEX i2, RENAME INDEX cc TO i4;
+-- error ER_KEY_DOES_NOT_EXISTS
+ALTER TABLE t ADD INDEX aa(f), DROP INDEX i2, RENAME INDEX cc TO dd;
+
+# add existing, rename to existing
+-- error ER_DUP_KEYNAME
+ALTER TABLE t ADD INDEX i1(f), DROP INDEX i2, RENAME INDEX i3 TO i4;
+# add existing
+-- error ER_DUP_KEYNAME
+ALTER TABLE t ADD INDEX i1(f), DROP INDEX i2, RENAME INDEX i3 TO dd;
+# rename to existing
+-- error ER_DUP_KEYNAME
+ALTER TABLE t ADD INDEX aa(f), DROP INDEX i2, RENAME INDEX i3 TO i4;
+
+-- enable_info
+ALTER TABLE t ADD INDEX aa(f), DROP INDEX i2, RENAME INDEX i3 TO dd;
+-- disable_info
+-- eval $show_table
+-- eval $show_sys
+DROP TABLE t;
+-- eval $create
+-- eval $insert
+
+-- echo # combination: abab
+
+-- enable_info
+ALTER TABLE t ADD INDEX i1(f), DROP INDEX i2, RENAME INDEX i1 TO i2;
+-- disable_info
+-- eval $show_table
+-- eval $show_sys
+DROP TABLE t;
+-- eval $create
+-- eval $insert
+
+-- error ER_CANT_DROP_FIELD_OR_KEY
+ALTER TABLE t ADD INDEX i1(f), DROP INDEX bb, RENAME INDEX i1 TO bb;
+-- error ER_KEY_DOES_NOT_EXISTS
+ALTER TABLE t ADD INDEX aa(f), DROP INDEX i2, RENAME INDEX aa TO i2;
+-- error ER_CANT_DROP_FIELD_OR_KEY
+ALTER TABLE t ADD INDEX aa(f), DROP INDEX bb, RENAME INDEX aa TO bb;
+
+-- echo # combination: acbc
+
+-- error ER_CANT_DROP_FIELD_OR_KEY
+ALTER TABLE t ADD INDEX i1(f), DROP INDEX cc, RENAME INDEX i2 TO cc;
+-- error ER_CANT_DROP_FIELD_OR_KEY
+ALTER TABLE t ADD INDEX aa(f), DROP INDEX cc, RENAME INDEX i2 TO cc;
+-- error ER_CANT_DROP_FIELD_OR_KEY
+ALTER TABLE t ADD INDEX i1(f), DROP INDEX cc, RENAME INDEX bb TO cc;
+-- error ER_CANT_DROP_FIELD_OR_KEY
+ALTER TABLE t ADD INDEX aa(f), DROP INDEX cc, RENAME INDEX bb TO cc;
+-- error ER_KEY_DOES_NOT_EXISTS
+ALTER TABLE t ADD INDEX i1(f), DROP INDEX i3, RENAME INDEX bb TO i3;
+-- error ER_KEY_DOES_NOT_EXISTS
+ALTER TABLE t ADD INDEX aa(f), DROP INDEX i3, RENAME INDEX bb TO i3;
+
+# add existing
+-- error ER_DUP_KEYNAME
+ALTER TABLE t ADD INDEX i1(f), DROP INDEX i3, RENAME INDEX i2 TO i3;
+
+-- enable_info
+ALTER TABLE t ADD INDEX aa(f), DROP INDEX i3, RENAME INDEX i2 TO i3;
+-- disable_info
+-- eval $show_table
+-- eval $show_sys
+DROP TABLE t;
+-- eval $create
+-- eval $insert
+
+-- echo # combination: cacb
+
+-- error ER_KEY_DOES_NOT_EXISTS
+ALTER TABLE t ADD INDEX cc(f), DROP INDEX i1, RENAME INDEX cc TO i2;
+-- error ER_CANT_DROP_FIELD_OR_KEY
+ALTER TABLE t ADD INDEX cc(f), DROP INDEX aa, RENAME INDEX cc TO i2;
+-- error ER_CANT_DROP_FIELD_OR_KEY
+ALTER TABLE t ADD INDEX cc(f), DROP INDEX aa, RENAME INDEX cc TO bb;
+-- error ER_KEY_DOES_NOT_EXISTS
+ALTER TABLE t ADD INDEX cc(f), DROP INDEX i1, RENAME INDEX cc TO bb;
+
+-- error ER_DUP_KEYNAME
+ALTER TABLE t ADD INDEX i3(f), DROP INDEX i1, RENAME INDEX i3 TO i2;
+-- error ER_CANT_DROP_FIELD_OR_KEY
+ALTER TABLE t ADD INDEX i3(f), DROP INDEX aa, RENAME INDEX i3 TO i2;
+-- error ER_CANT_DROP_FIELD_OR_KEY
+ALTER TABLE t ADD INDEX i3(f), DROP INDEX aa, RENAME INDEX i3 TO bb;
+
+-- enable_info
+ALTER TABLE t ADD INDEX i3(f), DROP INDEX i1, RENAME INDEX i3 TO bb;
+-- disable_info
+-- eval $show_table
+-- eval $show_sys
+DROP TABLE t;
+-- eval $create
+-- eval $insert
+
+-- echo # combination: ccab
+
+-- error ER_CANT_DROP_FIELD_OR_KEY
+ALTER TABLE t ADD INDEX cc(f), DROP INDEX cc, RENAME INDEX i1 TO i2;
+-- error ER_CANT_DROP_FIELD_OR_KEY
+ALTER TABLE t ADD INDEX cc(f), DROP INDEX cc, RENAME INDEX i1 TO bb;
+-- error ER_CANT_DROP_FIELD_OR_KEY
+ALTER TABLE t ADD INDEX cc(f), DROP INDEX cc, RENAME INDEX aa TO i2;
+-- error ER_CANT_DROP_FIELD_OR_KEY
+ALTER TABLE t ADD INDEX cc(f), DROP INDEX cc, RENAME INDEX aa TO bb;
+-- error ER_CANT_DROP_FIELD_OR_KEY
+ALTER TABLE t ADD INDEX i3(f), DROP INDEX cc, RENAME INDEX aa TO i2;
+-- error ER_CANT_DROP_FIELD_OR_KEY
+ALTER TABLE t ADD INDEX i3(f), DROP INDEX cc, RENAME INDEX aa TO bb;
+
+-- error ER_DUP_KEYNAME
+ALTER TABLE t ADD INDEX i3(f), DROP INDEX i3, RENAME INDEX i1 TO i2;
+
+-- enable_info
+ALTER TABLE t ADD INDEX i3(f), DROP INDEX i3, RENAME INDEX i1 TO bb;
+-- disable_info
+-- eval $show_table
+-- eval $show_sys
+DROP TABLE t;
+-- eval $create
+-- eval $insert
+
+# A simple successful ALTER
+-- enable_info
+ALTER TABLE t RENAME INDEX i1 TO x;
+-- disable_info
+-- eval $show_table
+-- eval $show_sys
+DROP TABLE t;
+-- eval $create
+-- eval $insert
+
+-- error ER_DUP_KEYNAME
+ALTER TABLE t RENAME INDEX i1 TO i2;
+
+-- error ER_KEY_DOES_NOT_EXISTS
+ALTER TABLE t RENAME INDEX foo TO i1;
+
+# Test ADD INDEX, RENAME INDEX
+
+-- enable_info
+ALTER TABLE t ADD INDEX i9 (f), RENAME INDEX i1 TO i8;
+-- disable_info
+-- eval $show_table
+-- eval $show_sys
+DROP TABLE t;
+-- eval $create
+-- eval $insert
+
+-- enable_info
+ALTER TABLE t ADD INDEX i1 (f), RENAME INDEX i1 TO i9;
+-- disable_info
+-- eval $show_table
+-- eval $show_sys
+DROP TABLE t;
+-- eval $create
+-- eval $insert
+
+-- error ER_DUP_KEYNAME
+ALTER TABLE t ADD INDEX foo (f), RENAME INDEX i1 TO foo;
+
+# Test ADD INDEX, RENAME INDEX, DROP INDEX
+
+-- error ER_KEY_DOES_NOT_EXISTS
+ALTER TABLE t ADD INDEX i1 (f), RENAME INDEX i1 TO foo, DROP INDEX i1;
+
+-- error ER_CANT_DROP_FIELD_OR_KEY
+ALTER TABLE t ADD INDEX i1 (f), RENAME INDEX i1 TO foo, DROP INDEX foo;
+
+-- error ER_CANT_DROP_FIELD_OR_KEY
+# "ALTER TABLE t ADD INDEX foo (d), DROP INDEX foo;" alone fails with the
+# same error code, but we have that test here anyway
+ALTER TABLE t ADD INDEX foo (f), RENAME INDEX foo TO bar, DROP INDEX foo;
+
+# Test RENAME INDEX, RENAME INDEX
+
+-- error ER_DUP_KEYNAME
+ALTER TABLE t RENAME INDEX i1 TO x, RENAME INDEX i2 TO x;
+
+-- error ER_KEY_DOES_NOT_EXISTS
+ALTER TABLE t RENAME INDEX i1 TO x, RENAME INDEX i1 TO y;
+
+-- error ER_KEY_DOES_NOT_EXISTS
+ALTER TABLE t RENAME INDEX i1 TO x, RENAME INDEX i1 TO x;
+
+# show that the table did not change after all the erroneous ALTERs
+-- eval $show_table
+-- eval $show_sys
+
+DROP TABLE t;
+
+# now test the rebuild case (new clustered index)
+
+CREATE TABLE t (
+ c1 INT NOT NULL,
+ c2 INT NOT NULL,
+ c3 INT,
+ c4 INT,
+ PRIMARY KEY (c1),
+ INDEX i1 (c3),
+ INDEX i2 (c4)
+) ENGINE=INNODB;
+
+INSERT INTO t SET c1=1, c2=2;
+
+-- enable_info
+ALTER TABLE t DROP PRIMARY KEY, ADD PRIMARY KEY (c2), RENAME INDEX i1 TO x;
+-- disable_info
+
+-- eval $show_table
+-- eval $show_sys
+
+-- enable_info
+ALTER TABLE t RENAME INDEX i2 TO y, ROW_FORMAT=REDUNDANT;
+-- disable_info
+
+-- eval $show_table
+-- eval $show_sys
+
+DROP TABLE t;
+
+# a case where the PK does not exist prior to the ALTER TABLE command
+
+CREATE TABLE t (
+ c1 INT NOT NULL,
+ c2 INT,
+ c3 INT,
+ INDEX i1 (c2),
+ INDEX i2 (c3)
+) ENGINE=INNODB;
+
+INSERT INTO t SET c1=1;
+
+-- enable_info
+ALTER TABLE t ADD PRIMARY KEY (c1), RENAME INDEX i1 TO x;
+-- disable_info
+-- eval $show_table
+-- eval $show_sys
+
+DROP TABLE t;
+
+# Test repeated RENAMEs with alternating names
+
+CREATE TABLE t (a INT, INDEX iiiii (a)) ENGINE=INNODB;
+INSERT INTO t SET a=NULL;
+-- enable_info
+ALTER TABLE t RENAME INDEX iiiii TO i;
+ALTER TABLE t RENAME INDEX i TO iiiii;
+ALTER TABLE t RENAME INDEX iiiii TO i;
+ALTER TABLE t RENAME INDEX i TO iiiii;
+-- disable_info
+DROP TABLE t;
+
+# Below is a shell script to generate the full set of ALTER TABLE
+# DROP/ADD/RENAME combinations. The generated .sql file is 3.3MB and
+# executes in about 7 minutes.
+#
+##!/bin/sh
+#
+#create="
+#CREATE TABLE t (
+# a INT,
+# b INT,
+# c INT,
+# d INT,
+# PRIMARY KEY (a),
+# INDEX i1 (b),
+# INDEX i2 (c)
+#) ENGINE=INNODB;
+#"
+#
+#echo "DROP TABLE IF EXISTS t;"
+#for r in "" ", DROP PRIMARY KEY, ADD PRIMARY KEY (a)" ", ROW_FORMAT=REDUNDANT" ; do
+# for i1 in i1 i1noexist; do
+# for i2 in i2 i2noexist; do
+# for i3 in i3 i3noexist; do
+# for i4 in i4 i4noexist; do
+# for a in $i1 $i2 $i3 $i4; do
+# for b in $i1 $i2 $i3 $i4; do
+# for c in $i1 $i2 $i3 $i4; do
+# for d in $i1 $i2 $i3 $i4; do
+# echo "$create"
+# echo "ALTER TABLE t ADD INDEX $a (d), RENAME INDEX $b TO $c, DROP INDEX $d $r;"
+# echo "DROP TABLE t;"
+# done
+# done
+# done
+# done
+# done
+# done
+# done
+# done
+#done
diff --git a/mysql-test/suite/innodb/t/innodb_scrub.opt b/mysql-test/suite/innodb/t/innodb_scrub.opt
new file mode 100644
index 00000000000..f9984508bde
--- /dev/null
+++ b/mysql-test/suite/innodb/t/innodb_scrub.opt
@@ -0,0 +1 @@
+--innodb-immediate-scrub-data-uncompressed=ON
diff --git a/mysql-test/suite/innodb/t/innodb_scrub.test b/mysql-test/suite/innodb/t/innodb_scrub.test
new file mode 100644
index 00000000000..88b4e9cfd76
--- /dev/null
+++ b/mysql-test/suite/innodb/t/innodb_scrub.test
@@ -0,0 +1,28 @@
+-- source include/have_innodb.inc
+
+let $MYSQLD_DATADIR=`select @@datadir`;
+CREATE TABLE t1(f1 int auto_increment primary key,
+ f2 varchar(256),
+ f3 text) engine = innodb;
+let $numinserts = 500;
+--disable_query_log
+begin;
+while ($numinserts)
+{
+ dec $numinserts;
+ eval INSERT INTO t1(f2,f3) VALUES ('repairman', repeat('unicycle', 1000));
+}
+commit;
+--enable_query_log
+FLUSH TABLE t1 FOR EXPORT;
+UNLOCK TABLES;
+
+let SEARCH_PATTERN= unicycle|repairman;
+let SEARCH_FILE= $MYSQLD_DATADIR/test/t1.ibd;
+-- source include/search_pattern_in_file.inc
+DELETE FROM t1;
+-- source include/wait_all_purged.inc
+FLUSH TABLE t1 FOR EXPORT;
+UNLOCK TABLES;
+-- source include/search_pattern_in_file.inc
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/t/innodb_skip_innodb_is_tables.opt b/mysql-test/suite/innodb/t/innodb_skip_innodb_is_tables.opt
index c8a96d2fe93..513791a0a88 100644
--- a/mysql-test/suite/innodb/t/innodb_skip_innodb_is_tables.opt
+++ b/mysql-test/suite/innodb/t/innodb_skip_innodb_is_tables.opt
@@ -59,9 +59,7 @@
--loose-innodb_sys_datafiles
--loose-innodb_changed_pages
--loose-innodb_tablespaces_encryption
---loose-innodb_tablespaces_scrubbing
--loose-innodb_mutexes
--loose-innodb_sys_semaphore_waits
---loose-innodb_tablespaces_scrubbing
--loose-innodb_mutexes
--loose-innodb_sys_semaphore_waits
diff --git a/mysql-test/suite/innodb/t/innodb_skip_innodb_is_tables.test b/mysql-test/suite/innodb/t/innodb_skip_innodb_is_tables.test
index 01ced047302..a5d5d3fe34e 100644
--- a/mysql-test/suite/innodb/t/innodb_skip_innodb_is_tables.test
+++ b/mysql-test/suite/innodb/t/innodb_skip_innodb_is_tables.test
@@ -32,6 +32,5 @@ select * from information_schema.innodb_sys_datafiles;
--error 0,1109
select * from information_schema.innodb_changed_pages;
select * from information_schema.innodb_tablespaces_encryption;
-select * from information_schema.innodb_tablespaces_scrubbing;
select * from information_schema.innodb_mutexes;
select * from information_schema.innodb_sys_semaphore_waits;
diff --git a/mysql-test/suite/innodb/t/innodb_status_variables.test b/mysql-test/suite/innodb/t/innodb_status_variables.test
new file mode 100644
index 00000000000..6746a94530f
--- /dev/null
+++ b/mysql-test/suite/innodb/t/innodb_status_variables.test
@@ -0,0 +1,7 @@
+--source include/have_innodb.inc
+SELECT variable_name FROM information_schema.global_status
+WHERE variable_name LIKE 'INNODB_%'
+AND variable_name NOT IN
+('INNODB_ADAPTIVE_HASH_HASH_SEARCHES','INNODB_ADAPTIVE_HASH_NON_HASH_SEARCHES',
+ 'INNODB_MEM_ADAPTIVE_HASH',
+ 'INNODB_BUFFERED_AIO_SUBMITTED','INNODB_BUFFER_POOL_PAGES_LATCHED');
diff --git a/mysql-test/suite/innodb/t/innodb_trx_weight.test b/mysql-test/suite/innodb/t/innodb_trx_weight.test
index 8af311a532e..8dc23e99585 100644
--- a/mysql-test/suite/innodb/t/innodb_trx_weight.test
+++ b/mysql-test/suite/innodb/t/innodb_trx_weight.test
@@ -8,7 +8,7 @@
-- source include/have_innodb.inc
-SET storage_engine=InnoDB;
+SET default_storage_engine=InnoDB;
# we do not really care about what gets printed, we are only
# interested in getting the deadlock resolved according to our
diff --git a/mysql-test/suite/innodb/t/innodb_wl6326.test b/mysql-test/suite/innodb/t/innodb_wl6326.test
index 71eba94be04..1cf98cd1c7b 100644
--- a/mysql-test/suite/innodb/t/innodb_wl6326.test
+++ b/mysql-test/suite/innodb/t/innodb_wl6326.test
@@ -59,6 +59,7 @@ SELECT CLUST_INDEX_SIZE FROM information_schema.INNODB_SYS_TABLESTATS WHERE NAME
# (above t1 definition is already adjusted)
SET GLOBAL innodb_limit_optimistic_insert_debug = 7;
+BEGIN;
INSERT INTO t1 (a00) VALUES ('aa');
INSERT INTO t1 (a00) VALUES ('ab');
INSERT INTO t1 (a00) VALUES ('ac');
@@ -67,21 +68,25 @@ INSERT INTO t1 (a00) VALUES ('ae');
INSERT INTO t1 (a00) VALUES ('af');
INSERT INTO t1 (a00) VALUES ('ag');
INSERT INTO t1 (a00) VALUES ('ah');
+COMMIT;
# Raise root (1-2)
# (aa,ad)
# (aa,ab,ac)(ad,ae,af,ag,ah)
ANALYZE TABLE t1;
SELECT CLUST_INDEX_SIZE FROM information_schema.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1';
+BEGIN;
INSERT INTO t1 (a00) VALUES ('ai');
INSERT INTO t1 (a00) VALUES ('aj');
INSERT INTO t1 (a00) VALUES ('ak');
+COMMIT;
# Split leaf (1-3)
# (aa,ad,ak)
# (aa,ab,ac)(ad,ae,af,ag,ah,ai,aj)(ak)
ANALYZE TABLE t1;
SELECT CLUST_INDEX_SIZE FROM information_schema.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1';
+BEGIN;
INSERT INTO t1 (a00) VALUES ('al');
INSERT INTO t1 (a00) VALUES ('am');
INSERT INTO t1 (a00) VALUES ('an');
@@ -89,12 +94,14 @@ INSERT INTO t1 (a00) VALUES ('ao');
INSERT INTO t1 (a00) VALUES ('ap');
INSERT INTO t1 (a00) VALUES ('aq');
INSERT INTO t1 (a00) VALUES ('ar');
+COMMIT;
# Split leaf (1-4)
# (aa,ad,ak,ar)
# (aa,ab,ac)(ad,ae,af,ag,ah,ai,aj)(ak,al,am,an,ao,ap,aq)(ar)
ANALYZE TABLE t1;
SELECT CLUST_INDEX_SIZE FROM information_schema.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1';
+BEGIN;
INSERT INTO t1 (a00) VALUES ('as');
INSERT INTO t1 (a00) VALUES ('at');
INSERT INTO t1 (a00) VALUES ('au');
@@ -102,12 +109,14 @@ INSERT INTO t1 (a00) VALUES ('av');
INSERT INTO t1 (a00) VALUES ('aw');
INSERT INTO t1 (a00) VALUES ('ax');
INSERT INTO t1 (a00) VALUES ('ay');
+COMMIT;
# Split leaf (1-5)
# (aa,ad,ak,ar,ay)
# (aa,ab,ac)(ad,ae,af,ag,ah,ai,aj)(ak,al,am,an,ao,ap,aq)(ar,as,at,au,av,aw,ax)(ay)
ANALYZE TABLE t1;
SELECT CLUST_INDEX_SIZE FROM information_schema.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1';
+BEGIN;
INSERT INTO t1 (a00) VALUES ('az');
INSERT INTO t1 (a00) VALUES ('ba');
INSERT INTO t1 (a00) VALUES ('bb');
@@ -115,13 +124,14 @@ INSERT INTO t1 (a00) VALUES ('bc');
INSERT INTO t1 (a00) VALUES ('bd');
INSERT INTO t1 (a00) VALUES ('be');
INSERT INTO t1 (a00) VALUES ('bf');
+COMMIT;
# Split leaf (1-6)
# (aa,ad,ak,ar,ay,bf)
# (aa,ab,ac)(ad..)(ak..)(ar,as,at,au,av,aw,ax)(ay,az,ba,bb,bc,bd,be)(bf)
ANALYZE TABLE t1;
SELECT CLUST_INDEX_SIZE FROM information_schema.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1';
-
+BEGIN;
INSERT INTO t1 (a00) VALUES ('bg');
INSERT INTO t1 (a00) VALUES ('bh');
INSERT INTO t1 (a00) VALUES ('bi');
@@ -129,12 +139,14 @@ INSERT INTO t1 (a00) VALUES ('bj');
INSERT INTO t1 (a00) VALUES ('bk');
INSERT INTO t1 (a00) VALUES ('bl');
INSERT INTO t1 (a00) VALUES ('bm');
+COMMIT;
# Split leaf (1-7)
# (aa,ad,ak,ar,ay,bf,bm)
# (aa,ab,ac)(ad..)(ak..)(ar..)(ay,az,ba,bb,bc,bd,be)(bf,bg,bh,bi,bj,bk,bl)(bm)
ANALYZE TABLE t1;
SELECT CLUST_INDEX_SIZE FROM information_schema.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1';
+BEGIN;
INSERT INTO t1 (a00) VALUES ('bn');
INSERT INTO t1 (a00) VALUES ('bo');
INSERT INTO t1 (a00) VALUES ('bp');
@@ -142,6 +154,7 @@ INSERT INTO t1 (a00) VALUES ('bq');
INSERT INTO t1 (a00) VALUES ('br');
INSERT INTO t1 (a00) VALUES ('bs');
INSERT INTO t1 (a00) VALUES ('bt');
+COMMIT;
# Raise root (1-2-8)
# (aa,ar)
# (aa,ad,ak) (ar,ay,bf,bm,bt)
@@ -149,7 +162,7 @@ INSERT INTO t1 (a00) VALUES ('bt');
ANALYZE TABLE t1;
SELECT CLUST_INDEX_SIZE FROM information_schema.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1';
-
+BEGIN;
INSERT INTO t1 (a00) VALUES ('bu');
INSERT INTO t1 (a00) VALUES ('bv');
INSERT INTO t1 (a00) VALUES ('bw');
@@ -173,6 +186,7 @@ INSERT INTO t1 (a00) VALUES ('cl');
INSERT INTO t1 (a00) VALUES ('cm');
INSERT INTO t1 (a00) VALUES ('cn');
INSERT INTO t1 (a00) VALUES ('co');
+COMMIT;
# Split also at level 1 (1-3-11)
# (aa,ar,co)
# (aa,ad,ak) (ar,ay,bf,bm,bt,ca,ch) (co)
@@ -180,7 +194,7 @@ INSERT INTO t1 (a00) VALUES ('co');
ANALYZE TABLE t1;
SELECT CLUST_INDEX_SIZE FROM information_schema.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1';
-
+BEGIN;
INSERT INTO t1 (a00) VALUES ('cp');
INSERT INTO t1 (a00) VALUES ('cq');
INSERT INTO t1 (a00) VALUES ('cr');
@@ -236,6 +250,7 @@ INSERT INTO t1 (a00) VALUES ('ei');
INSERT INTO t1 (a00) VALUES ('ej');
INSERT INTO t1 (a00) VALUES ('ek');
INSERT INTO t1 (a00) VALUES ('el');
+COMMIT;
# Split also at level 1 (1-4-18)
# (aa,ar,co,el)
# (aa,ad,ak) (ar,ay,bf,bm,bt,ca,ch) (co,cv,dc,dj,dq,dx,ee) (el)
@@ -243,6 +258,7 @@ INSERT INTO t1 (a00) VALUES ('el');
ANALYZE TABLE t1;
SELECT CLUST_INDEX_SIZE FROM information_schema.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1';
+BEGIN;
INSERT INTO t1 (a00) VALUES ('em');
INSERT INTO t1 (a00) VALUES ('en');
INSERT INTO t1 (a00) VALUES ('eo');
@@ -297,7 +313,7 @@ INSERT INTO t1 (a00) VALUES ('ge');
INSERT INTO t1 (a00) VALUES ('gf');
INSERT INTO t1 (a00) VALUES ('gg');
INSERT INTO t1 (a00) VALUES ('gh');
-
+COMMIT;
# Current tree form (1-4-24)
# (aa,ar,co,el)
@@ -306,12 +322,9 @@ INSERT INTO t1 (a00) VALUES ('gh');
ANALYZE TABLE t1;
SELECT CLUST_INDEX_SIZE FROM information_schema.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1';
-
-
# Insert the rest of records normally
SET GLOBAL innodb_limit_optimistic_insert_debug = 0;
-
--echo # Test start
# (1) Insert records to leaf page (bf..) and cause modify_page.
diff --git a/mysql-test/suite/innodb/t/innodb_wl6326_big.test b/mysql-test/suite/innodb/t/innodb_wl6326_big.test
deleted file mode 100644
index 6d4b07e7cb6..00000000000
--- a/mysql-test/suite/innodb/t/innodb_wl6326_big.test
+++ /dev/null
@@ -1,716 +0,0 @@
-# This is a script for MTR with hybrid use.
-# a) As regression test
-# Mostly some brute force attempt to stress the internal sx locks of
-# InnoDB which were introduced by WL#6326+WL#6363.
-# The file with expected results fits to this variant.
-# The impact on code coverage is quite good.
-# b) As testbed for attempts to extend or improve the RQG test wl6326_sql.yy.
-# The MTR based test uses
-# - a table t1 with the same layout
-# - the same stored functions
-# - the same stored procedure proc_fill_t1 for inserting a configurable
-# amount of records into t1
-# like the RQG test wl6326_sql.yy.
-# Feel free to modify parameters like $max_row_count, $max_con,
-# $high_load_duration or switch debugging on (let $test_debug= 1).
-# But please be aware that MTR will most probably report that the test
-# failed because it got a difference to expected results.
-# Reasons:
-# - In general: The file with expected results fits to a) only.
-# - The actual results might dependend on $max_row_count.
-# - Additional result sets might be printed.
-#
-
-# WL#6326 is about the sx locks (InnoDB feature only).
---source include/have_innodb.inc
-# Runtime properties:
-# Notebook i5 dual core with HT, MySQL binaries compiled with debug,
-# max_row_count=10000 rows
-# vardir on tmpfs : ~ 375
-# vardir on disk : ~ 546
---source include/big_test.inc
-# We go with "--send" and "--reap" and that fails with the embedded server.
---source include/not_embedded.inc
-# Its intentional to not take the risk that a run with valgrind times out.
---source include/not_valgrind.inc
-
-# FIXME:
-# Increase the code coverage provided by the current test by
-# trying "InnoDB Tablespace Monitor" as soon as some bug is fixed
-# or wait till the deprecated "InnoDB Tablespace Monitor" is
-# removed.
-
-# Setup of some parameters
-# ------------------------
-# Number of records within every chunk to be added to t1.
-let $load_unit= 10000;
-#
-# Rough number of records in t1 to achieve.
-# We add chunks of $load_unit rows till the actual number
-# of rows in the table t1 exceeds $max_row_count.
-# let $max_row_count= 1000000;
-# let $max_row_count= 300000;
-# let $max_row_count= 100000;
-# let $max_row_count= 30000;
- let $max_row_count= 10000; # ~ 322s on tmpfs (NB)
-#
-# Determine which variant to run.
-let $test_debug= 0;
-#
-# Number of concurrent sessions to be used in the high load test.
-let $max_con= 10;
-# Duration of the high load test in seconds.
-let $high_load_duration= 60;
-
-# Putting all objects into the SCHEMA my_schema makes the final cleanup easier.
-# We simply run than DROP SCHEMA my_schema.
-CREATE SCHEMA my_schema;
-USE my_schema;
-CREATE FUNCTION f_thread_id (i INT) RETURNS CHAR(4) DETERMINISTIC
-RETURN CONCAT(LPAD(CAST(i AS CHAR),3,'_'),'_') ;
-SELECT CONCAT('->', f_thread_id( 1), '<-');
-SELECT CONCAT('->', f_thread_id(12), '<-');
-
-# Definition of parameters used in functions.
-# We use here a "1" in order to make the impact on the results of the functions
-# good visible.
-SET @extra_int = 1;
-SET @extra_string = f_thread_id(@extra_int);
-SELECT @extra_int , @extra_string;
-
-# The different functions are used later when filling t1 and also during
-# RQG testing. They serve to generate the difference between column values
-# in different rows in different areas of the column.
-# Fictional example:
-# row 1 col_int0=1 colx='1abcdefgh' coly='abcd1efgh' colz='abcdefgh1'
-# row 2 col_int0=2 colx='2abcdefgh' coly='abcd2efgh' colz='abcdefgh2'
-# The function f_<pattern> is for the column with the name <pattern>.
-# There is a function
-# - for every column except col_int0
-# - even if the SQL for generating the value is simple.
-# The reason for this is the architecture of the RQG test.
-
-let $part= AS my_result
-FROM (SELECT 1 AS my_col UNION SELECT 12 UNION SELECT 123
-UNION SELECT 1234 UNION SELECT 12345) AS tx;
-
-let $function_name= f_col_int1;
-eval CREATE FUNCTION $function_name (i INT) RETURNS INT(20) DETERMINISTIC
-RETURN i * 1000 + @extra_int ;
-eval SELECT $function_name(my_col) $part;
-
-let $function_name= f_col_int2;
-eval CREATE FUNCTION $function_name (i INT) RETURNS INT(20) DETERMINISTIC
-RETURN @extra_int * 10000000 + i ;
-eval SELECT $function_name(my_col) $part;
-
-let $function_name= f_col_int3;
-eval CREATE FUNCTION $function_name (i INT) RETURNS INT(20) DETERMINISTIC
-RETURN @extra_int ;
-eval SELECT $function_name(my_col) $part;
-
-let $function_name= f_col_blob;
-eval CREATE FUNCTION $function_name (i INT) RETURNS BLOB DETERMINISTIC
-RETURN RPAD(@extra_string,(@@innodb_page_size / 2 ) + 1,'a');
-eval SELECT CONCAT('->', SUBSTR($function_name(my_col) FROM 1 FOR 10),
- '<-.....->', SUBSTR($function_name(my_col) FROM -10 FOR 10), '<-') $part;
-
-let $function_name= f_col_char0;
-eval CREATE FUNCTION $function_name (i INT) RETURNS CHAR(255) DETERMINISTIC
-RETURN LPAD(CAST(i AS CHAR),255,' ');
-eval SELECT CONCAT('->', $function_name(my_col), '<-') $part;
-
-let $function_name= f_col_char1;
-eval CREATE FUNCTION $function_name (i INT) RETURNS CHAR(26) DETERMINISTIC
-RETURN
-CONCAT('B',
- LPAD(SUBSTR(CAST(i AS CHAR),1,(LENGTH(CAST(i AS CHAR)) DIV 2)),10,' '),
- @extra_string,
- RPAD(SUBSTR(CAST(i AS CHAR), -((LENGTH(CAST(i AS CHAR)) + 1) DIV 2)),10,' '),
- 'E') ;
-eval SELECT CONCAT('->', $function_name(my_col), '<-') $part;
-
-let $function_name= f_col_char2;
-eval CREATE FUNCTION $function_name (i INT) RETURNS CHAR(26) DETERMINISTIC
-RETURN
-CONCAT('B',
- RPAD(SUBSTR(CAST(i AS CHAR),1,(LENGTH(CAST(i AS CHAR)) DIV 2)),10,' '),
- @extra_string,
- LPAD(SUBSTR(CAST(i AS CHAR), -((LENGTH(CAST(i AS CHAR)) + 1) DIV 2)),10,' '),
- 'E');
-eval SELECT CONCAT('->', $function_name(my_col), '<-') $part;
-
-let $function_name= f_col_char3;
-eval CREATE FUNCTION $function_name (i INT) RETURNS CHAR(26) DETERMINISTIC
-RETURN
-CONCAT('B',@extra_string,LPAD(CAST(i AS CHAR),20,' '),'E');
-eval SELECT CONCAT('->', $function_name(my_col), '<-') $part;
-
-let $function_name= f_col_char4;
-eval CREATE FUNCTION $function_name (i INT) RETURNS CHAR(26) DETERMINISTIC
-RETURN
-CONCAT('B',RPAD(CAST(i AS CHAR),20,' '),@extra_string,'E');
-eval SELECT CONCAT('->', $function_name(my_col), '<-') $part;
-
-# Auxiliary table for figuring out the impact of scenarios on
-# information_schema.innodb_metrics content.
-CREATE TABLE my_metrics LIKE information_schema.innodb_metrics;
-ALTER TABLE my_metrics ADD COLUMN phase ENUM('after', 'before'),
-DROP COLUMN SUBSYSTEM, DROP COLUMN TYPE, DROP COLUMN COMMENT,
-ADD PRIMARY KEY (NAME,phase);
-let $empty_my_metrics= DELETE FROM my_metrics;
-let $before_my_metrics= INSERT INTO my_metrics
-SELECT NAME, COUNT, MAX_COUNT, MIN_COUNT, AVG_COUNT,
-COUNT_RESET, MAX_COUNT_RESET, MIN_COUNT_RESET, AVG_COUNT_RESET,
-TIME_ENABLED, TIME_DISABLED, TIME_ELAPSED, TIME_RESET,
-STATUS, 'before'
-FROM information_schema.innodb_metrics
-WHERE NAME LIKE 'innodb_rwlock_sx_%';
-let $after_my_metrics= INSERT INTO my_metrics
-SELECT NAME, COUNT, MAX_COUNT, MIN_COUNT, AVG_COUNT,
-COUNT_RESET, MAX_COUNT_RESET, MIN_COUNT_RESET, AVG_COUNT_RESET,
-TIME_ENABLED, TIME_DISABLED, TIME_ELAPSED, TIME_RESET,
-STATUS, 'after'
-FROM information_schema.innodb_metrics
-WHERE NAME LIKE 'innodb_rwlock_sx_%';
-let $print_metrics= SELECT NAME, COUNT, MAX_COUNT, MIN_COUNT, AVG_COUNT,
-COUNT_RESET, MAX_COUNT_RESET, MIN_COUNT_RESET, AVG_COUNT_RESET,
-TIME_ENABLED, TIME_DISABLED, TIME_ELAPSED, TIME_RESET, STATUS
-FROM information_schema.innodb_metrics
-WHERE NAME LIKE 'innodb_rwlock_sx_%'
-ORDER BY NAME;
-
-# The main table for testing.
-CREATE TABLE t1 (
- col_int0 BIGINT,
- col_int1 BIGINT,
- col_int2 BIGINT,
- col_int3 BIGINT,
- col_blob BLOB,
- col_char0 VARCHAR(255),
- col_char1 VARCHAR(30),
- col_char2 VARCHAR(30),
- col_char3 VARCHAR(30),
- col_char4 VARCHAR(30)
-) ENGINE = InnoDB;
-
-# Use many indexes with mostly significant size in order to cause
-# some heavy use of sx locks during data generation.
-ALTER TABLE t1 ADD UNIQUE KEY uidx_col_int0 (col_int0),
-ADD UNIQUE KEY uidx1 (col_int1, col_char0),
-ADD UNIQUE KEY uidx2 (col_int2, col_char0, col_int1),
-ADD UNIQUE KEY uidx3 (col_int3, col_int2, col_char0),
-ADD UNIQUE KEY uidx4 (col_char1, col_char0),
-ADD UNIQUE KEY uidx5 (col_char2, col_char0, col_char1),
-ADD UNIQUE KEY uidx6 (col_char3, col_char2, col_char0),
-ADD UNIQUE KEY uidx7 (col_int1, col_int2, col_int3, col_char4,
- col_char1, col_char2, col_char3, col_char0),
-ADD KEY idx8 (col_blob(10), col_char4);
-
-delimiter |;
-CREATE PROCEDURE proc_fill_t1 (max_row_count INT, load_unit INT)
-BEGIN
- DECLARE my_count INTEGER DEFAULT 0;
- DECLARE max_load_count INTEGER DEFAULT 0;
- DROP TABLE IF EXISTS t0;
- CREATE TEMPORARY TABLE t0 (col_int0 BIGINT, PRIMARY KEY(col_int0));
- WHILE (my_count < load_unit ) DO
- SET my_count = my_count + 1;
- INSERT INTO t0 SET col_int0 = my_count;
- END WHILE;
- SET max_load_count = (SELECT (max_row_count DIV load_unit) + 1 );
- SELECT COUNT(col_int0) INTO @val FROM t1;
- SET my_count = 0;
- REPEAT
- INSERT INTO t1 (col_int0, col_int1, col_int2, col_int3, col_blob,
- col_char0, col_char1, col_char2,col_char3,col_char4)
- SELECT col_int0 + @val,
- f_col_int1(col_int0 + @val),
- f_col_int2(col_int0 + @val),
- f_col_int3(col_int0 + @val),
- f_col_blob(col_int0 + @val),
- f_col_char0(col_int0 + @val),
- f_col_char1(col_int0 + @val),
- f_col_char2(col_int0 + @val),
- f_col_char3(col_int0 + @val),
- f_col_char4(col_int0 + @val)
- FROM t0;
- COMMIT;
- SELECT MAX(col_int0) INTO @val FROM t1;
- SET my_count = my_count + 1;
- UNTIL( my_count > max_load_count OR @val >= max_row_count )
- END REPEAT;
- DROP TEMPORARY TABLE t0;
-END|
-delimiter ;|
-
-delimiter |;
-CREATE PROCEDURE proc_dml (max_duration INT, t1_stripe_half INT)
-BEGIN
- DECLARE aux INTEGER DEFAULT 0;
- DECLARE start_time INT;
- DECLARE CONTINUE HANDLER FOR SQLEXCEPTION, SQLWARNING, NOT FOUND BEGIN END;
-
- SET @extra_int = CONNECTION_ID();
- SET @extra_string = f_thread_id(@extra_int);
- SELECT ROUND(MAX(col_int0) / 2 ) INTO @t1_half FROM t1;
- # The user lock 'Blocker' should be already set by some other session S1.
- # S1 starts the race by releasing that lock.
- # Wait till the lock is released and the lock can be obtained.
- # In order to prevent endless waiting in case of non foreseen problems
- # limit the timespan to 30 seconds.
- SELECT GET_LOCK('Blocker', 30) INTO @aux;
- # Release the lock immediate so that the other "runner" sessions start too.
- SELECT RELEASE_LOCK('Blocker') INTO @aux;
- SET start_time = UNIX_TIMESTAMP();
-
- WHILE (UNIX_TIMESTAMP() - start_time < max_duration) DO
- SET @aux = @t1_half - t1_stripe_half + ROUND(RAND() * t1_stripe_half * 2);
- UPDATE t1 SET
- col_int1 = f_col_int1(col_int0),
- col_int2 = f_col_int2(col_int0),
- col_int3 = f_col_int3(col_int0),
- col_blob = f_col_blob(col_int0),
- col_char0 = f_col_char0(col_int0),
- col_char1 = f_col_char1(col_int0),
- col_char2 = f_col_char2(col_int0),
- col_char3 = f_col_char3(col_int0),
- col_char4 = f_col_char4(col_int0)
- WHERE col_int0 = @aux;
- COMMIT;
- END WHILE;
-END|
-delimiter ;|
-
-SET GLOBAL innodb_monitor_disable = "innodb_rwlock_sx_%";
-SET @pre_reset_ts = NOW();
---sleep 1.1
-SET GLOBAL innodb_monitor_reset = "innodb_rwlock_sx_%";
-SET @pre_enable_ts = NOW();
---sleep 1.1
-SET GLOBAL innodb_monitor_enable = "innodb_rwlock_sx_%";
---sleep 1.1
-SET @pre_collect_ts = NOW();
-eval $empty_my_metrics;
-eval $before_my_metrics;
---echo # TC-01 There are exact three entries "innodb_rwlock_sx_%" with the
---echo # with the name which follow in innodb_metrics.
-let $check_statement=
-SELECT COUNT(*) <> 3 FROM my_metrics
-WHERE NAME IN ('innodb_rwlock_sx_spin_waits',
- 'innodb_rwlock_sx_spin_rounds',
- 'innodb_rwlock_sx_os_waits');
-if(`$check_statement`)
-{
- --echo # fail
- eval $check_statement;
- SELECT NAME FROM my_metrics
- ORDER BY NAME;
- exit;
-}
---echo # pass
-
-SELECT COUNT(*) INTO @sx_count FROM my_metrics;
-
---echo # TC-02 Counting is now enabled. ALL = @sx_count entries show that.
-let $check_statement=
-SELECT COUNT(*) <> @sx_count FROM my_metrics
-WHERE STATUS = 'enabled';
-if(`$check_statement`)
-{
- --echo # fail
- eval $check_statement;
- SELECT NAME, STATUS FROM my_metrics
- ORDER BY NAME;
- exit;
-}
---echo # pass
-
---echo # TC-03 @pre_reset_ts < TIME_RESET. ALL = @sx_count entries show that.
-let $check_statement=
-SELECT COUNT(*) <> @sx_count FROM my_metrics
-WHERE @pre_reset_ts < TIME_RESET;
-if(`$check_statement`)
-{
- --echo # fail
- eval $check_statement;
- SELECT NAME, @pre_reset_ts, TIME_RESET FROM my_metrics
- ORDER BY NAME;
- exit;
-}
---echo # pass
-
---echo # TC-04 @pre_enable_ts < TIME_ENABLED. ALL = @sx_count entries show that.
-let $check_statement=
-SELECT COUNT(*) <> @sx_count FROM my_metrics
-WHERE @pre_enable_ts < TIME_ENABLED;
-if(`$check_statement`)
-{
- --echo # fail
- eval $check_statement;
- SELECT NAME, @pre_enable_ts, TIME_ENABLED FROM my_metrics
- ORDER BY NAME;
- exit;
-}
---echo # pass
-
---echo # TC-05 TIME_RESET < TIME_ENABLED AND TIME_ENABLED < @pre_collect_ts
---echo # AND TIME_ELAPSED > 0. ALL = @sx_count entries show that.
-let $check_statement=
-SELECT COUNT(*) <> @sx_count FROM my_metrics
-WHERE TIME_RESET < TIME_ENABLED AND TIME_ENABLED < @pre_collect_ts
- AND TIME_ELAPSED > 0;
-if(`$check_statement`)
-{
- --echo # fail
- eval $check_statement;
- SELECT NAME, @pre_collect_ts, TIME_RESET, TIME_ENABLED, TIME_ELAPSED
- FROM my_metrics
- ORDER BY NAME;
- exit;
-}
---echo # pass
-
---echo # TC-06 COUNT_RESET = MAX_COUNT_RESET. ALL = @sx_count entries show that.
-let $check_statement=
-SELECT COUNT(*) <> @sx_count FROM my_metrics
-WHERE COUNT_RESET = MAX_COUNT_RESET;
-if(`$check_statement`)
-{
- --echo # fail
- eval $check_statement;
- SELECT NAME, COUNT_RESET, MAX_COUNT_RESET FROM my_metrics
- ORDER BY NAME;
- exit;
-}
---echo # pass
-
-SET GLOBAL innodb_monitor_reset = "innodb_rwlock_sx_%";
---disable_result_log
-if($test_debug)
-{
- --enable_result_log
- eval $print_metrics;
-}
-SHOW ENGINE INNODB STATUS;
---enable_result_log
-
-eval $empty_my_metrics;
-eval $before_my_metrics;
-# These values (the "0") help to identify later if some record is in its
-# initial state or already modified.
-SET @extra_string = '__0_';
-SET @extra_int = 0;
-
---echo # TC-07 One session inserts some significant amount of rows into t1.
---echo # The system MUST survive that.
---replace_result $max_row_count <max_row_count>
-eval SET @max_row_count = $max_row_count;
---replace_result $load_unit <load_unit>
-eval SET @load_unit = $load_unit;
-SET @start_time = UNIX_TIMESTAMP();
-SET AUTOCOMMIT = OFF;
-CALL proc_fill_t1 (@max_row_count, @load_unit);
---echo # pass
-SET AUTOCOMMIT = ON;
-SELECT col_int0 INTO @t1_half FROM t1
-WHERE col_int0 >= (@val DIV 2) ORDER BY col_int0 LIMIT 1;
-
---disable_result_log
-if($test_debug)
-{
- --enable_result_log
- SELECT COUNT(*) AS table_row_count,
- UNIX_TIMESTAMP() - @start_time AS fill_run_time
- FROM t1;
- eval $print_metrics;
-}
-SHOW ENGINE INNODB STATUS;
---enable_result_log
-
-# Show that the value distribution is according to the plan.
---vertical_results
-SELECT col_int0, col_int1, col_int2, col_int3,
- CONCAT('->', SUBSTR(col_blob FROM 1 FOR 10),
- '<-.....->', SUBSTR(col_blob FROM -10 FOR 10), '<-') AS col_blobx,
- CONCAT('->',col_char0,'<-') AS col_char0x,
- CONCAT('->',col_char1,'<-') AS col_char1x,
- CONCAT('->',col_char2,'<-') AS col_char2x,
- CONCAT('->',col_char3,'<-') AS col_char3x,
- CONCAT('->',col_char4,'<-') AS col_char4x
-FROM t1 WHERE col_int0 between 98 AND 102;
---horizontal_results
-
-# For experiments/interest only. Please do not remove that.
-if (0)
-{
- ANALYZE TABLE t1;
- SELECT n_rows, clustered_index_size, sum_of_other_index_sizes
- FROM mysql.innodb_table_stats;
-
- # SELECT * FROM mysql.innodb_index_stats;
- # idx_col_int3_int0 n_diff_pfx01 1 col_int3
- # idx_col_int3_int0 n_diff_pfx02 10000 col_int3,col_int0
- # idx_col_int3_int0 n_diff_pfx03 10000 col_int3,col_int0,DB_ROW_ID
- # idx_col_int3_int0 n_leaf_pages 19 Number of leaf pages in the index
- # idx_col_int3_int0 size 20 Number of pages in the index
-
- --vertical_results
- SELECT t1.index_name, t1.stat_value AS idx_pages, t2.stat_value AS idx_leaf_pages,
- (t1.stat_value - t2.stat_value - 1) / t1.stat_value AS sx_page_ratio
- FROM mysql.innodb_index_stats t1, mysql.innodb_index_stats t2
- WHERE t1.index_name = t2.index_name
- AND t1.stat_name = 'size' AND t2.stat_name = 'n_leaf_pages'
- ORDER BY t1.index_name;
- --horizontal_results
-}
-
---echo # TC-11 Several concurrent sessions perform updates in t1 like mad.
---echo # The system MUST survive this.
---echo # Printing of statements is partially suppressed.
-SET @start_time = UNIX_TIMESTAMP();
-SELECT 1 FROM t1 WHERE col_int0 = @t1_half FOR UPDATE;
-SELECT GET_LOCK('Blocker', 1000) ;
---disable_query_log
-let $num= $max_con;
-while ($num)
-{
- --connect (con$num,localhost,root,,)
- USE my_schema;
- # The second parameter of the procedure is size of the affected stripe / 2.
- # A smaller stripe causes some smaller counter growth but most probably
- # also more stress around locking in general.
- # Example # (nnnn) = half stripe size
- # NAME | COUNT_RESET (5000) | COUNT_RESET (100)
- # -----------------------------+--------------------+----------------
- # innodb_rwlock_sx_os_waits | 1412 | 486
- # innodb_rwlock_sx_spin_rounds | 44061 | 17031
- # innodb_rwlock_sx_spin_waits | 996 | 515
- --send
- eval CALL proc_dml($high_load_duration,@t1_half);
- dec $num;
-}
---connection default
-SELECT RELEASE_LOCK('Blocker') ;
---sleep 3
-COMMIT;
-let $num= $max_con;
-while ($num)
-{
- --connection con$num
- --reap
- dec $num;
-}
---echo # pass
---connection default
---enable_query_log
-
-# let $wait_timeout= 181;
-# --source include/wait_condition.inc
-# eval $after_my_metrics;
---disable_result_log
-if($test_debug)
-{
- --enable_result_log
- SELECT UNIX_TIMESTAMP() - @start_time AS update_battle_run_time;
- eval $print_metrics;
-}
-SHOW ENGINE INNODB STATUS;
---enable_result_log
-
---echo # TC-13 One session performs ALTER TABLE t1 ADD KEY ... on the fat table t1.
---echo # The system MUST survive this.
-SET @start_time = UNIX_TIMESTAMP();
-ALTER TABLE t1 ADD KEY idx_col_char4_col_char0 (col_char4,col_char0);
---disable_result_log
-if($test_debug)
-{
- --enable_result_log
- SELECT UNIX_TIMESTAMP() - @start_time AS add_key_run_time;
- eval $print_metrics;
-}
-SHOW ENGINE INNODB STATUS;
---enable_result_log
---echo # pass
-
---echo # TC-15 One session performs a fat update on the fat table t1.
---echo # The system MUST survive this.
-SET @start_time = UNIX_TIMESTAMP();
-SET @extra_int = 13;
-SET @extra_string = f_thread_id(@extra_int);
-eval UPDATE t1 SET
- col_int1 = f_col_int1(col_int0), col_int2 = f_col_int2(col_int0),
- col_int3 = f_col_int3(col_int0), col_blob = f_col_blob(col_int0),
- col_char0 = f_col_char0(col_int0), col_char1 = f_col_char1(col_int0),
- col_char2 = f_col_char2(col_int0), col_char3 = f_col_char3(col_int0),
- col_char4 = f_col_char4(col_int0)
-WHERE col_int0 BETWEEN @t1_half - 2500 AND @t1_half + 2500;
-COMMIT;
---disable_result_log
-if($test_debug)
-{
- --enable_result_log
- SELECT UNIX_TIMESTAMP() - @start_time AS total_update_run_time;
- eval $print_metrics;
-}
-SHOW ENGINE INNODB STATUS;
---enable_result_log
---echo # pass
-
-# Basically every of the big activities causes some counter growth.
-# But caused by
-# - the architecture of InnoDB (certain things happen asynchronous)
-# - the actual test configuration (server/InnoDB options)
-# - conditions like parallel (./mtr --parallel=auto?) load on the testing box
-# this might be not fulfilled per single big activity every time except
-# we go with huge waits or similar.
-# Observation:
-# - non debug binaries: expectation frequent not fulfilled
-# - debug binaries: expectation rare not fulfilled
-#
-let $wait_timeout= 121;
-let $wait_condition=
-SELECT COUNT(*) = @sx_count
-FROM information_schema.innodb_metrics t_after
-JOIN my_metrics t_before
-ON t_after.COUNT_RESET > t_before.COUNT_RESET AND t_after.NAME = t_before.NAME;
---source include/wait_condition.inc
-eval $after_my_metrics;
-
---echo # TC-16 The following activities happend after reset in innodb_metrics
---echo # - Insert some significant amount of rows into t1.
---echo # - Several concurrent users perform excessive updates in t1.
---echo # - ALTER TABLE ... ADD KEY <sufficient big enough structure>
---echo # - One UPDATE statement modifying a huge slice of t1.
---echo # Any of them causes heavy use of SX lock and therefore COUNT_RESET
---echo # must have grown for ALL = @sx_count entries.
-# The former testcases TC-10 and TC12 had to be made a part of this testcase
-# because their results were unstable.
-let $check_statement=
-SELECT COUNT(*) <> @sx_count FROM my_metrics t_after JOIN my_metrics t_before
-ON t_after.COUNT_RESET > t_before.COUNT_RESET AND t_after.NAME = t_before.NAME
-WHERE t_after.phase = 'after' AND t_before.phase = 'before';
-if(`$check_statement`)
-{
- --echo # fail
- eval $check_statement;
- SELECT * FROM my_metrics
- ORDER BY NAME, phase;
- exit;
-}
---echo # pass
-
---echo # TC-09 Heavy activity after reset.
---echo # COUNT_RESET = MAX_COUNT_RESET for ALL = @sx_count entries
---echo # needs to stay valid though he counters will have grown.
-let $check_statement=
-SELECT COUNT(*) <> @sx_count FROM my_metrics
-WHERE phase = 'after' AND COUNT_RESET = MAX_COUNT_RESET;
-if(`$check_statement`)
-{
- --echo # fail
- eval $check_statement;
- SELECT * FROM my_metrics
- ORDER BY NAME, phase;
- exit;
-}
---echo # pass
-
-eval $empty_my_metrics;
-eval $before_my_metrics;
-SET GLOBAL innodb_monitor_reset = "innodb_rwlock_sx_%";
-eval $after_my_metrics;
---echo # TC-08 There was a reset. COUNT_RESET = MAX_COUNT_RESET for ALL
---echo # = @sx_count entries.
-let $check_statement=
-SELECT COUNT(*) <> @sx_count FROM my_metrics
-WHERE phase = 'before' AND COUNT_RESET = MAX_COUNT_RESET;
-if(`$check_statement`)
-{
- --echo # fail
- eval $check_statement;
- SELECT * FROM my_metrics
- ORDER BY NAME, phase;
- exit;
-}
---echo # pass
-
---echo # TC-17 We had heavy activity causing big counters and after that a reset.
---echo # Reset causes COUNT > COUNT_RESET AND MAX_COUNT > MAX_COUNT_RESET
---echo # for ALL @sx_count entries.
-let $check_statement=
-SELECT COUNT(*) <> @sx_count FROM my_metrics
-WHERE phase = 'after'
- AND COUNT > COUNT_RESET
- AND MAX_COUNT > MAX_COUNT_RESET;
-if(`$check_statement`)
-{
- --echo # fail
- eval $check_statement;
- SELECT * FROM my_metrics
- ORDER BY NAME, phase;
- exit;
-}
---echo # pass
-
---echo # TC-18 We had some reset but this must not decrease COUNT or MAX_COUNT
---echo # after.COUNT >= before.COUNT AND
---echo # after.MAX_COUNT >= before.MAX_COUNT for ALL @sx_count entries.
-let $check_statement=
-SELECT COUNT(*) <> @sx_count FROM my_metrics t_after JOIN my_metrics t_before
-ON t_after.COUNT >= t_before.COUNT AND t_after.MAX_COUNT >= t_before.MAX_COUNT
- AND t_after.NAME = t_before.NAME
-WHERE t_after.phase = 'after' AND t_before.phase = 'before';
-if(`$check_statement`)
-{
- --echo # fail
- eval $check_statement;
- SELECT * FROM my_metrics
- ORDER BY NAME, phase;
- exit;
-}
---echo # pass
-
---echo # TC-19 We had some reset after heavy activity and this must cause
---echo # after.COUNT_RESET < before.COUNT_RESET
---echo # AND after.MAX_COUNT_RESET < before.MAX_COUNT_RESET AND
---echo # for ALL @sx_count entries.
-let $check_statement=
-SELECT COUNT(*) <> @sx_count FROM my_metrics t_after JOIN my_metrics t_before
-ON t_after.COUNT_RESET < t_before.COUNT_RESET
- AND t_after.MAX_COUNT_RESET < t_before.MAX_COUNT_RESET
- AND t_after.NAME = t_before.NAME
-WHERE t_after.phase = 'after' AND t_before.phase = 'before';
-if(`$check_statement`)
-{
- --echo # fail
- eval $check_statement;
- SELECT * FROM my_metrics
- ORDER BY NAME, phase;
- exit;
-}
---echo # pass
-
-# Cleanup
-let $num= $max_con;
-while ($num)
-{
- --connection con$num
- --disconnect con$num
- --source include/wait_until_disconnected.inc
- dec $num;
-}
---connection default
-USE test;
-DROP SCHEMA my_schema;
-SET GLOBAL innodb_monitor_disable = all;
-SET GLOBAL innodb_monitor_reset_all = all;
---disable_warnings
-SET GLOBAL innodb_monitor_enable = default;
-SET GLOBAL innodb_monitor_disable = default;
-SET GLOBAL innodb_monitor_reset = default;
-SET GLOBAL innodb_monitor_reset_all = default;
---enable_warnings
-SET GLOBAL innodb_monitor_disable = "innodb_rwlock_sx_%";
-SET GLOBAL innodb_monitor_reset = "innodb_rwlock_sx_%";
-
diff --git a/mysql-test/suite/innodb/t/instant_alter.test b/mysql-test/suite/innodb/t/instant_alter.test
index 3872f080d6b..22815798f69 100644
--- a/mysql-test/suite/innodb/t/instant_alter.test
+++ b/mysql-test/suite/innodb/t/instant_alter.test
@@ -874,6 +874,18 @@ eval CREATE TABLE t1 (a INT, b INT, PRIMARY KEY(a,b)) $engine;
ALTER TABLE t1 MODIFY b INT FIRST;
DROP TABLE t1;
+# MDEV-21744 Assertion `!rec_offs_nth_sql_null(offsets, n)' failed
+eval CREATE TABLE t1 (pk INT PRIMARY KEY) $engine;
+INSERT INTO t1 SET pk=1;
+ALTER TABLE t1 ADD COLUMN b INT;
+BEGIN;
+UPDATE t1 SET pk=2;
+UPDATE t1 SET pk=1;
+connection analyze;
+SELECT * FROM t1;
+connection default;
+DROP TABLE t1;
+
dec $format;
let $redundant_4k= 0;
}
diff --git a/mysql-test/suite/innodb/t/instant_alter_bugs.test b/mysql-test/suite/innodb/t/instant_alter_bugs.test
index 1ba6442c860..ec9f609138c 100644
--- a/mysql-test/suite/innodb/t/instant_alter_bugs.test
+++ b/mysql-test/suite/innodb/t/instant_alter_bugs.test
@@ -196,6 +196,7 @@ DROP TABLE t1;
# Restore of instant table
CREATE TABLE t1(c1 INT NOT NULL)Engine=InnoDB;
ALTER TABLE t1 DISCARD TABLESPACE;
+FLUSH TABLES;
ALTER TABLE t1 ADD COLUMN c2 INT NOT NULL;
ALTER TABLE t1 ADD COLUMN c3 INT DEFAULT 10;
# Restore files
diff --git a/mysql-test/suite/innodb/t/instant_alter_charset.test b/mysql-test/suite/innodb/t/instant_alter_charset.test
index d64e30402ed..5be4f7a5b83 100644
--- a/mysql-test/suite/innodb/t/instant_alter_charset.test
+++ b/mysql-test/suite/innodb/t/instant_alter_charset.test
@@ -640,7 +640,7 @@ SELECT HEX(a) FROM t1;
DROP TABLE t1;
--echo #
---echo # MDEV-19285 INSTANT ALTER from ascii_general_ci to latin1_general_ci produces currupt data
+--echo # MDEV-19285 INSTANT ALTER from ascii_general_ci to latin1_general_ci produces corrupt data
--echo #
CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET ascii COLLATE ascii_general_ci, PRIMARY KEY(a)) ENGINE=InnoDB;
diff --git a/mysql-test/suite/innodb/t/instant_alter_debug.test b/mysql-test/suite/innodb/t/instant_alter_debug.test
index 10f7546cc36..b553dc3ad74 100644
--- a/mysql-test/suite/innodb/t/instant_alter_debug.test
+++ b/mysql-test/suite/innodb/t/instant_alter_debug.test
@@ -540,6 +540,54 @@ SET DEBUG_SYNC=RESET;
--echo # End of 10.4 tests
+--echo #
+--echo # MDEV-22867 Assertion instant.n_core_fields == n_core_fields
+--echo # in dict_index_t::instant_add_field
+--echo #
+
+CREATE TABLE t1 (a INT PRIMARY KEY, b INT UNIQUE) ENGINE=InnoDB;
+INSERT INTO t1 SET a=1;
+
+connect (prevent_purge,localhost,root,,);
+START TRANSACTION WITH CONSISTENT SNAPSHOT;
+connection default;
+ALTER TABLE t1 ADD COLUMN c INT;
+DELETE FROM t1;
+
+connect (con2,localhost,root,,test);
+# FIXME: If this is implemented then also i->online_log must be checked in
+# dict_index_t::must_avoid_clear_instant_add(). See the comment there.
+--error ER_ALTER_OPERATION_NOT_SUPPORTED
+ALTER TABLE t1 DROP b, ADD INDEX(c), ALGORITHM=NOCOPY;
+SET DEBUG_SYNC='innodb_inplace_alter_table_enter SIGNAL ddl WAIT_FOR emptied';
+send ALTER TABLE t1 DROP b;
+
+connection default;
+SET DEBUG_SYNC='now WAIT_FOR ddl';
+BEGIN;
+INSERT INTO t1 SET a=1;
+
+connection prevent_purge;
+COMMIT;
+disconnect prevent_purge;
+
+connection default;
+ROLLBACK;
+SELECT * FROM t1;
+SET DEBUG_SYNC='now SIGNAL emptied';
+
+connection con2;
+reap;
+disconnect con2;
+connection default;
+ALTER TABLE t1 DROP c;
+INSERT INTO t1 VALUES (2),(3),(4);
+CHECK TABLE t1;
+DROP TABLE t1;
+SET DEBUG_SYNC=RESET;
+
+--echo # End of 10.5 tests
+
SET GLOBAL innodb_purge_rseg_truncate_frequency = @save_frequency;
SELECT variable_value-@old_instant instants
diff --git a/mysql-test/suite/innodb/t/instant_alter_purge.test b/mysql-test/suite/innodb/t/instant_alter_purge.test
index 5ccce2ad1d6..9ccf3347d7b 100644
--- a/mysql-test/suite/innodb/t/instant_alter_purge.test
+++ b/mysql-test/suite/innodb/t/instant_alter_purge.test
@@ -34,43 +34,4 @@ 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;
-SET GLOBAL innodb_max_purge_lag_wait= 0;
-if ($have_debug) {
---source include/wait_all_purged.inc
-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/leaf_page_corrupted_during_recovery.test b/mysql-test/suite/innodb/t/leaf_page_corrupted_during_recovery.test
index 8943ee2352f..b7fff30dca2 100644
--- a/mysql-test/suite/innodb/t/leaf_page_corrupted_during_recovery.test
+++ b/mysql-test/suite/innodb/t/leaf_page_corrupted_during_recovery.test
@@ -2,13 +2,13 @@
--source include/have_debug.inc
--disable_query_log
-call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed file read of tablespace test/t1 page ");
+call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed read of file '.*test.t1\\.ibd' page");
call mtr.add_suppression("InnoDB: Background Page read failed to read or decrypt \\[page id: space=\\d+, page number=19\\]");
-call mtr.add_suppression("\\[ERROR\\] InnoDB: Failed to read file '.*test.t1\\.ibd' at offset 19: Page read from tablespace is corrupted\\.");
+call mtr.add_suppression("\\[ERROR\\] InnoDB: Failed to read page 19 from file '.*test.t1\\.ibd': Page read from tablespace is corrupted\\.");
call mtr.add_suppression("\\[ERROR\\] InnoDB: Plugin initialization aborted at srv0start\\.cc.* with error Data structure corruption");
call mtr.add_suppression("\\[ERROR\\] Plugin 'InnoDB' (init function|registration)");
call mtr.add_suppression("\\[ERROR\\] InnoDB: We detected index corruption");
-call mtr.add_suppression("\\[ERROR\\] mysqld.*: Index for table 't1' is corrupt; try to repair it");
+call mtr.add_suppression("\\[ERROR\\] (mysqld|mariadbd).*: Index for table 't1' is corrupt; try to repair it");
call mtr.add_suppression("InnoDB: btr_pcur_open_low level: 0 called from file: ");
--enable_query_log
CREATE TABLE t1 (pk INT PRIMARY KEY, c CHAR(255))ENGINE=InnoDB STATS_PERSISTENT=0;
diff --git a/mysql-test/suite/innodb/t/log_alter_table.opt b/mysql-test/suite/innodb/t/log_alter_table.opt
deleted file mode 100644
index ef236fcec40..00000000000
--- a/mysql-test/suite/innodb/t/log_alter_table.opt
+++ /dev/null
@@ -1 +0,0 @@
---innodb-log-optimize-ddl
diff --git a/mysql-test/suite/innodb/t/log_alter_table.test b/mysql-test/suite/innodb/t/log_alter_table.test
deleted file mode 100644
index c92953f16a1..00000000000
--- a/mysql-test/suite/innodb/t/log_alter_table.test
+++ /dev/null
@@ -1,47 +0,0 @@
---source include/have_innodb.inc
---source include/have_debug.inc
-
-# Embedded server does not support crashing
---source include/not_embedded.inc
-
-# start afresh
---source include/restart_mysqld.inc
-
---echo #
---echo # Bug#21801423 INNODB REDO LOG DOES NOT INDICATE WHEN
---echo # FILES ARE CREATED
---echo #
---echo # Bug#21796691 INNODB REDO LOG DOES NOT INDICATE WHEN
---echo # REDO LOGGING IS SKIPPED
---echo #
---source include/no_checkpoint_start.inc
-CREATE TABLE t1 (a INT NOT NULL, b INT UNIQUE) ENGINE=InnoDB;
-# MLOG_INDEX_LOAD will not be emitted for empty tables. Insert a row.
-INSERT INTO t1 VALUES (1,2);
-# We should get two MLOG_INDEX_LOAD for this.
-ALTER TABLE t1 ADD PRIMARY KEY(a), LOCK=SHARED, ALGORITHM=INPLACE;
-# And one MLOG_INDEX_LOAD for this.
-ALTER TABLE t1 DROP INDEX b, ADD INDEX (b), LOCK=SHARED;
-
---let CLEANUP_IF_CHECKPOINT=DROP TABLE t1;
---source include/no_checkpoint_end.inc
-
---let $restart_parameters= --debug=d,ib_log
---source include/start_mysqld.inc
-
-let SEARCH_FILE = $MYSQLTEST_VARDIR/log/mysqld.1.err;
-let SEARCH_ABORT=NOT FOUND;
-# ensure that we have exactly 2 records there.
-let SEARCH_PATTERN=scan \d+: multi-log rec MLOG_FILE_CREATE2 len \d+ page \d+:0;
---source include/search_pattern_in_file.inc
-# ensure that we have exactly 3 records there.
-let SEARCH_PATTERN=scan \d+: log rec MLOG_INDEX_LOAD;
---source include/search_pattern_in_file.inc
-
-CHECK TABLE t1;
-
-# Remove the --debug=d,ib_log setting.
---let $restart_parameters=
---source include/restart_mysqld.inc
-
-DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/t/log_corruption.test b/mysql-test/suite/innodb/t/log_corruption.test
index 3d68724f7a9..01b3da3f7ac 100644
--- a/mysql-test/suite/innodb/t/log_corruption.test
+++ b/mysql-test/suite/innodb/t/log_corruption.test
@@ -16,7 +16,8 @@ call mtr.add_suppression("InnoDB: Log scan aborted at LSN");
call mtr.add_suppression("InnoDB: Missing MLOG_FILE_NAME or MLOG_FILE_DELETE before MLOG_CHECKPOINT for tablespace 42\\r?$");
call mtr.add_suppression("InnoDB: Obtaining redo log encryption key version 1 failed");
call mtr.add_suppression("InnoDB: Decrypting checkpoint failed");
-call mtr.add_suppression("InnoDB: Are you sure you are using the right ib_logfiles to start up the database\\? Log sequence number in the ib_logfiles is 1213964,");
+call mtr.add_suppression("InnoDB: Are you sure you are using the right ib_logfile0 to start up the database\\? Log sequence number in the ib_logfile0 is 1213964,");
+call mtr.add_suppression("InnoDB: Log file .*ib_logfile1 is of different size 1048576 bytes than other log files 2097152 bytes!");
--enable_query_log
let bugdir= $MYSQLTEST_VARDIR/tmp/log_corruption;
@@ -90,12 +91,6 @@ print OUT pack("N",$ck).$head.pack("x[12]").$body.pack("Nx[4]",$ck);
print OUT chr(0) x (759 * 16384);
close OUT or die;
-# Create a dummy second redo log file
-die unless open OUT, ">", "$ENV{bugdir}/ib_logfile1";
-binmode OUT;
-print OUT chr(0) x 1048576;
-close OUT or die;
-
# Create a redo log from before MariaDB 10.2.2/MySQL 5.7.9
die unless open OUT, ">", "$ENV{bugdir}/ib_logfile0";
binmode OUT;
@@ -104,7 +99,7 @@ print OUT pack("x[13]nCNnxxNNx[256]", 0x1286, 12, 0x80c, 0xf0, ~0, ~0);
print OUT pack("H*x[1240]", "590DBAACFE922582");
print OUT pack("H*x[5]", "800009440022000c0000000138");
print OUT pack("H*x[475]H*", "12860cb7809781e80006626f677573", "089C0ADA");
-print OUT chr(0) x 1046016;
+print OUT chr(0) x 2094592;
close OUT or die;
EOF
@@ -119,7 +114,13 @@ let SEARCH_PATTERN=InnoDB: Upgrade after a crash is not supported. This redo log
--echo # redo log from before MariaDB 10.2.2, with corrupted log checkpoint
--move_file $bugdir/ib_logfile0 $bugdir/ib_logfile
---copy_file $bugdir/ib_logfile1 $bugdir/ib_logfile0
+perl;
+# Create a dummy second redo log file
+die unless open OUT, ">", "$ENV{bugdir}/ib_logfile0";
+binmode OUT;
+print OUT chr(0) x 1048576;
+close OUT or die;
+EOF
--source include/start_mysqld.inc
eval $check_no_innodb;
--source include/shutdown_mysqld.inc
@@ -132,6 +133,9 @@ let SEARCH_PATTERN=Plugin 'InnoDB' registration as a STORAGE ENGINE failed;
--echo # redo log from before MariaDB 10.2.2, with corrupted log block
--remove_file $bugdir/ib_logfile0
--move_file $bugdir/ib_logfile $bugdir/ib_logfile0
+# Create a dummy second redo log file that does not contain payload.
+--copy_file $bugdir/ib_logfile0 $bugdir/ib_logfile1
+
perl;
die unless open OUT, "+<", "$ENV{bugdir}/ib_logfile0";
binmode OUT;
@@ -154,7 +158,7 @@ die unless seek(OUT, 0x800, 0);
print OUT pack("NnnNx[496]N", 0x80000944, 12, 12, 0, 0xb2a);
close OUT or die;
EOF
---let $restart_parameters= $dirs --innodb-force-recovery=5 --innodb-log-file-size=1m
+--let $restart_parameters= $dirs --innodb-force-recovery=5 --innodb-log-file-size=2m
--source include/start_mysqld.inc
SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
@@ -164,6 +168,130 @@ AND support IN ('YES', 'DEFAULT', 'ENABLED');
--source include/search_pattern_in_file.inc
--let $restart_parameters= $dirs
+--echo # Corrupted multi-file redo log from before MariaDB 10.2.2
+--move_file $bugdir/ib_logfile0 $bugdir/ib_logfile
+perl;
+die unless open OUT, ">", "$ENV{bugdir}/ib_logfile0";
+binmode OUT;
+print OUT pack("x[9]nx[5]", 0x1286), " ", chr(0) x 492;
+print OUT pack("x[13]nCNnxxNNx[256]", 0x1286, 12, 0x20000c, 0xf0, ~0, ~0);
+print OUT pack("H*x[1240]", "B41DCAC4525D1217");
+print OUT pack("H*x[5]", "800009440022000c0000000138");
+print OUT pack("H*x[475]H*", "12860cb7809781e80006626f677573", "089C0ADA");
+print OUT chr(0) x 1046016;
+close OUT or die;
+
+die unless open OUT, ">", "$ENV{bugdir}/ib_logfile1";
+binmode OUT;
+die unless seek(OUT, 0xFF800, 0);
+print OUT chr(0) x 2048;
+close OUT or die;
+EOF
+
+--let $restart_parameters= $dirs --innodb-force-recovery=5 --innodb-log-file-size=2m
+--source include/start_mysqld.inc
+SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES
+WHERE engine = 'innodb'
+AND support IN ('YES', 'DEFAULT', 'ENABLED');
+--source include/shutdown_mysqld.inc
+let SEARCH_PATTERN=InnoDB: Upgrade after a crash is not supported. This redo log was created before MariaDB 10\\.2\\.2, and it appears corrupted;
+--source include/search_pattern_in_file.inc
+
+--echo # Empty multi-file redo log from before MariaDB 10.2.2
+perl;
+die unless open OUT, "+<", "$ENV{bugdir}/ib_logfile1";
+binmode OUT;
+die unless seek(OUT, 0xFF800, 0);
+print OUT pack("NnnNx[496]N", 0x80000944, 12, 12, 0, 0xb2a);
+print OUT chr(0) x 1536;
+close OUT or die;
+EOF
+
+--let $restart_parameters= $dirs --innodb-force-recovery=5 --innodb-log-file-size=2m
+--source include/start_mysqld.inc
+SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES
+WHERE engine = 'innodb'
+AND support IN ('YES', 'DEFAULT', 'ENABLED');
+--source include/shutdown_mysqld.inc
+--let SEARCH_PATTERN= InnoDB: Upgrading redo log:
+--source include/search_pattern_in_file.inc
+
+--echo # Multi-file redo log with size mismatch from after MariaDB 10.2.2
+perl;
+do "$ENV{MTR_SUITE_DIR}/../innodb/include/crc32.pl";
+my $polynomial = 0x82f63b78; # CRC-32C
+
+die unless open OUT, "+<", "$ENV{bugdir}/ib_logfile0";
+binmode OUT;
+$_= pack("Nx[5]nx[5]", 1, 0x1286) . "BogoDB 1.2.3.4" . chr(0) x 478;
+print OUT $_, pack("N", mycrc32($_, 0, $polynomial));
+# checkpoint page 1 and all-zero checkpoint 2
+$_= pack("x[13]nCNNx[484]", 0x1286, 12, 0, 0x20080c);
+print OUT $_, pack("N", mycrc32($_, 0, $polynomial));
+print OUT chr(0) x 1024;
+close OUT or die;
+die unless open OUT, ">", "$ENV{bugdir}/ib_logfile1";
+binmode OUT;
+die unless seek(OUT, 0xFF800, 0);
+print OUT chr(0) x 2048;
+close OUT or die;
+EOF
+
+--echo # Corrupted multi-file redo log from after MariaDB 10.2.2
+--let $restart_parameters= $dirs --innodb-force-recovery=5 --innodb-log-file-size=2m
+--source include/start_mysqld.inc
+SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES
+WHERE engine = 'innodb'
+AND support IN ('YES', 'DEFAULT', 'ENABLED');
+--source include/shutdown_mysqld.inc
+--let SEARCH_PATTERN=InnoDB: Log file .*ib_logfile1 is of different size 1048576 bytes than other log files 2097152 bytes!
+--source include/search_pattern_in_file.inc
+--let SEARCH_PATTERN=InnoDB: Upgrade after a crash is not supported\\. The redo log was created with BogoDB 1\\.2\\.3\\.4, and it appears corrupted\\.
+--source include/search_pattern_in_file.inc
+
+perl;
+die unless open OUT, ">", "$ENV{bugdir}/ib_logfile1";
+binmode OUT;
+die unless seek(OUT, 0x1FFFFF, 0);
+print OUT chr(0);
+close OUT or die;
+EOF
+
+--let $restart_parameters= $dirs --innodb-force-recovery=5 --innodb-log-file-size=2m
+--source include/start_mysqld.inc
+SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES
+WHERE engine = 'innodb'
+AND support IN ('YES', 'DEFAULT', 'ENABLED');
+--source include/shutdown_mysqld.inc
+--let SEARCH_PATTERN=InnoDB: Upgrade after a crash is not supported\\. The redo log was created with BogoDB 1\\.2\\.3\\.4, and it appears corrupted\\.
+--source include/search_pattern_in_file.inc
+
+--echo # Empty multi-file redo log from after MariaDB 10.2.2
+perl;
+do "$ENV{MTR_SUITE_DIR}/../innodb/include/crc32.pl";
+my $polynomial = 0x82f63b78; # CRC-32C
+
+die unless open OUT, "+<", "$ENV{bugdir}/ib_logfile1";
+binmode OUT;
+die unless seek(OUT, 0x800, 0); # the first 2048 bytes are unused!
+$_= pack("Nnnx[500]", 0x80000944, 12, 12);
+print OUT $_, pack("N", mycrc32($_, 0, $polynomial));
+close OUT or die;
+EOF
+
+--let $restart_parameters= $dirs --innodb-force-recovery=5 --innodb-log-file-size=2m
+--source include/start_mysqld.inc
+SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES
+WHERE engine = 'innodb'
+AND support IN ('YES', 'DEFAULT', 'ENABLED');
+--source include/shutdown_mysqld.inc
+--let SEARCH_PATTERN= InnoDB: Upgrading redo log:
+--source include/search_pattern_in_file.inc
+--let $restart_parameters= $dirs
+
+--remove_file $bugdir/ib_logfile0
+--move_file $bugdir/ib_logfile $bugdir/ib_logfile0
+
--echo # redo log from "after" MariaDB 10.2.2, but with invalid header checksum
perl;
die unless open OUT, "+<", "$ENV{bugdir}/ib_logfile0";
@@ -230,7 +358,7 @@ eval $check_no_innodb;
--source include/shutdown_mysqld.inc
let SEARCH_PATTERN=InnoDB: Invalid log block checksum. block: 2372 checkpoint no: 1 expected: 3362026715 found: 144444122;
--source include/search_pattern_in_file.inc
-let SEARCH_PATTERN=InnoDB: Missing MLOG_CHECKPOINT between the checkpoint 1213964 and the end 1213952\.;
+let SEARCH_PATTERN=InnoDB: Upgrade after a crash is not supported\. The redo log was created with malicious intentions, or perhaps, and it appears corrupted\.;
--source include/search_pattern_in_file.inc
--echo # same, but with current-version header
@@ -247,8 +375,6 @@ eval $check_no_innodb;
let SEARCH_PATTERN=InnoDB: Invalid log block checksum. block: 2372 checkpoint no: 1 expected: 3362026715 found: 144444122;
--source include/search_pattern_in_file.inc
-let SEARCH_PATTERN=InnoDB: Missing MLOG_CHECKPOINT between the checkpoint 1213964 and the end 1213952\.;
---source include/search_pattern_in_file.inc
--echo # --innodb-force-recovery=6 (skip the entire redo log)
--let $restart_parameters= $dirs --innodb-force-recovery=6
--source include/start_mysqld.inc
@@ -302,17 +428,7 @@ EOF
--source include/start_mysqld.inc
eval $check_no_innodb;
--source include/shutdown_mysqld.inc
-let SEARCH_PATTERN=InnoDB: Starting crash recovery from checkpoint LSN=1213964;
---source include/search_pattern_in_file.inc
-let SEARCH_PATTERN=InnoDB: MLOG_FILE_NAME incorrect:bogus;
---source include/search_pattern_in_file.inc
-let SEARCH_PATTERN=InnoDB: ############### CORRUPT LOG RECORD FOUND ##################;
---source include/search_pattern_in_file.inc
-let SEARCH_PATTERN=InnoDB: Log record type 55, page 151:488\. Log parsing proceeded successfully up to 1213973\. Previous log record type 56, is multi 0 Recv offset 9, prev 0;
---source include/search_pattern_in_file.inc
-let SEARCH_PATTERN= len 22. hex 38000000000012860cb7809781e80006626f67757300. asc 8 bogus ;
---source include/search_pattern_in_file.inc
-let SEARCH_PATTERN=InnoDB: Set innodb_force_recovery to ignore this error;
+let SEARCH_PATTERN=\\[ERROR\\] InnoDB: Upgrade after a crash is not supported\. The redo log was created with MariaDB 10\.3\.1\.;
--source include/search_pattern_in_file.inc
--echo # Test a corrupted MLOG_FILE_NAME record.
@@ -343,6 +459,8 @@ eval $check_no_innodb;
--source include/shutdown_mysqld.inc
let SEARCH_PATTERN=InnoDB: Invalid log block checksum. block: 2372 checkpoint no: 1 expected: 2454333373 found: 150151;
--source include/search_pattern_in_file.inc
+let SEARCH_PATTERN=\\[ERROR\\] InnoDB: Upgrade after a crash is not supported\. The redo log was created with MariaDB 10\.3\.1, and it appears corrupted\.;
+--source include/search_pattern_in_file.inc
--echo # valid header, invalid checkpoint 1, valid checkpoint 2, invalid log record
perl;
die unless open OUT, "+<", "$ENV{bugdir}/ib_logfile0";
@@ -355,9 +473,7 @@ EOF
--source include/start_mysqld.inc
eval $check_no_innodb;
--source include/shutdown_mysqld.inc
-let SEARCH_PATTERN=InnoDB: MLOG_FILE_NAME incorrect:bigot;
---source include/search_pattern_in_file.inc
---let SEARCH_PATTERN= len 22; hex 38000000000012860cb7809781e800066269676f7400; asc 8 bigot ;
+let SEARCH_PATTERN=\\[ERROR\\] InnoDB: Upgrade after a crash is not supported\. The redo log was created with MariaDB 10\.3\.1\.;
--source include/search_pattern_in_file.inc
--echo # 10.2 missing MLOG_FILE_NAME or MLOG_FILE_DELETE before MLOG_CHECKPOINT
@@ -388,7 +504,7 @@ EOF
--source include/start_mysqld.inc
eval $check_no_innodb;
--source include/shutdown_mysqld.inc
---let SEARCH_PATTERN= InnoDB: Missing MLOG_FILE_NAME or MLOG_FILE_DELETE before MLOG_CHECKPOINT for tablespace 42
+let SEARCH_PATTERN=\\[ERROR\\] InnoDB: Upgrade after a crash is not supported\. The redo log was created with ibbackup was here!!!1!\.;
--source include/search_pattern_in_file.inc
--echo # 10.3 missing MLOG_FILE_NAME or MLOG_FILE_DELETE before MLOG_CHECKPOINT
@@ -403,7 +519,7 @@ EOF
--source include/start_mysqld.inc
eval $check_no_innodb;
--source include/shutdown_mysqld.inc
---let SEARCH_PATTERN= InnoDB: Missing MLOG_FILE_NAME or MLOG_FILE_DELETE before MLOG_CHECKPOINT for tablespace 42
+let SEARCH_PATTERN=\\[ERROR\\] InnoDB: Upgrade after a crash is not supported\. The redo log was created with MariaDB 10\.3\.1\.;
--source include/search_pattern_in_file.inc
--echo # Empty 10.3 redo log
@@ -415,17 +531,13 @@ print OUT pack("NnnNx[496]N", 0x80000944, 12, 12, 1, 0x46c8a2a2);
close OUT or die;
EOF
---let $restart_parameters= $dirs --innodb-force-recovery=5 --innodb-log-file-size=1m
+--let $restart_parameters= $dirs --innodb-force-recovery=5 --innodb-log-file-size=2m
--source include/start_mysqld.inc
SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
--source include/shutdown_mysqld.inc
-# In encryption.innodb_encrypt_log_corruption, we would convert the
-# log to encrypted format. Writing an extra log checkpoint before the
-# redo log conversion would advance the LSN by the size of a
-# MLOG_CHECKPOINT record (9 bytes).
---let SEARCH_PATTERN= InnoDB: .* started; log sequence number 121397[09]
+--let SEARCH_PATTERN= InnoDB: .* started; log sequence number 1213964; transaction id 0
--source include/search_pattern_in_file.inc
--echo # Empty 10.2 redo log
diff --git a/mysql-test/suite/innodb/t/log_file.test b/mysql-test/suite/innodb/t/log_file.test
index 8a82ab7f29f..76fb013fb8b 100644
--- a/mysql-test/suite/innodb/t/log_file.test
+++ b/mysql-test/suite/innodb/t/log_file.test
@@ -34,7 +34,7 @@ let $check_yes_innodb=SELECT COUNT(*) `1` FROM INFORMATION_SCHEMA.ENGINES
WHERE engine='innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
---let $ibp=--innodb-log-files-in-group=3 --innodb-log-group-home-dir=$bugdir
+--let $ibp=--innodb-log-group-home-dir=$bugdir
--let $ibp=$ibp --innodb-data-home-dir=$bugdir --innodb-undo-directory=$bugdir
--let $ibp=$ibp --innodb-undo-logs=20 --innodb-undo-tablespaces=3
--let $ibp=$ibp --innodb-data-file-path=ibdata1:16M;ibdata2:10M:autoextend
@@ -49,13 +49,11 @@ eval $check_no_innodb;
let SEARCH_PATTERN=\[ERROR\] InnoDB: Could not create undo tablespace '.*undo002';
--source include/search_pattern_in_file.inc
---echo # Remove undo001,undo002,ibdata1,ibdata2,ib_logfile1,ib_logfile2,ib_logfile101
+--echo # Remove undo001,undo002,ibdata1,ibdata2,ib_logfile101
--remove_file $bugdir/undo001
--rmdir $bugdir/undo002
--remove_file $bugdir/ibdata1
--remove_file $bugdir/ibdata2
---remove_file $bugdir/ib_logfile1
---remove_file $bugdir/ib_logfile2
--remove_file $bugdir/ib_logfile101
--list_files $bugdir
@@ -82,8 +80,6 @@ eval $check_yes_innodb;
--copy_file $bugdir/ibdata1 $bugdir/bak_ibdata1
--copy_file $bugdir/ibdata2 $bugdir/bak_ibdata2
--copy_file $bugdir/ib_logfile0 $bugdir/bak_ib_logfile0
---copy_file $bugdir/ib_logfile1 $bugdir/bak_ib_logfile1
---copy_file $bugdir/ib_logfile2 $bugdir/bak_ib_logfile2
--copy_file $bugdir/undo001 $bugdir/bak_undo001
--copy_file $bugdir/undo002 $bugdir/bak_undo002
--copy_file $bugdir/undo003 $bugdir/bak_undo003
@@ -171,7 +167,7 @@ let SEARCH_PATTERN=undo tablespace .*undo003.* exists\. Creating system tablespa
--source include/start_mysqld.inc
eval $check_no_innodb;
--source include/shutdown_mysqld.inc
-let SEARCH_PATTERN=InnoDB: Unable to open undo tablespace.*undo002;
+let SEARCH_PATTERN=InnoDB: Expected to open innodb_undo_tablespaces=3 but was able to find only 1;
--source include/search_pattern_in_file.inc
# clean up & Restore
--source ../include/log_file_cleanup.inc
@@ -183,21 +179,20 @@ let SEARCH_PATTERN=InnoDB: Unable to open undo tablespace.*undo002;
--source include/start_mysqld.inc
eval $check_no_innodb;
--source include/shutdown_mysqld.inc
-let SEARCH_PATTERN=InnoDB: Unable to open undo tablespace.*undo001;
+let SEARCH_PATTERN=InnoDB: Expected to open innodb_undo_tablespaces=3 but was able to find only 0;
--source include/search_pattern_in_file.inc
# clean up & Restore
--source ../include/log_file_cleanup.inc
---echo # 9. Without ibdata*, without undo*, Without ib_logfile1 and with ib_logfile2
+--echo # 9. Without ibdata*, without undo*
--remove_files_wildcard $bugdir ibdata*
--remove_files_wildcard $bugdir undo00*
---remove_file $bugdir/ib_logfile1
--list_files $bugdir
--source include/start_mysqld.inc
eval $check_no_innodb;
--source include/shutdown_mysqld.inc
-let SEARCH_PATTERN=redo log file .*ib_logfile0.* exists\. Creating system tablespace with existing redo log files is not recommended\. Please delete all redo log files before creating new system tablespace\.;
+let SEARCH_PATTERN=redo log file .*ib_logfile0.* exists\. Creating system tablespace with existing redo log file is not recommended\. Please delete redo log file before creating new system tablespace\.;
--source include/search_pattern_in_file.inc
# clean up & Restore
@@ -212,8 +207,7 @@ eval $check_no_innodb;
--source ../include/log_file_cleanup.inc
---echo # 11. With ibdata*, without ib_logfile1
---remove_file $bugdir/ib_logfile1
+--echo # 11. With ibdata*
--list_files $bugdir
--source include/start_mysqld.inc
eval $check_yes_innodb;
diff --git a/mysql-test/suite/innodb/t/log_file_name.test b/mysql-test/suite/innodb/t/log_file_name.test
index 80b4e3d3921..3abd2d65a96 100644
--- a/mysql-test/suite/innodb/t/log_file_name.test
+++ b/mysql-test/suite/innodb/t/log_file_name.test
@@ -2,6 +2,7 @@
# Test the detection of duplicate tablespaces.
--source include/have_innodb.inc
+--source include/not_valgrind.inc
# Embedded server does not support crashing
--source include/not_embedded.inc
@@ -168,6 +169,7 @@ call mtr.add_suppression("InnoDB: Failed to find tablespace for table .* in the
call mtr.add_suppression("InnoDB: Plugin initialization aborted");
call mtr.add_suppression("Plugin 'InnoDB' \(init function returned error\|registration as a STORAGE ENGINE failed\)");
call mtr.add_suppression("InnoDB: Table test/u[123] in the InnoDB data dictionary has tablespace id [1-9][0-9]*, but tablespace with that id or name does not exist\\. Have you deleted or moved \\.ibd files\\?");
+call mtr.add_suppression("InnoDB: Cannot replay rename of tablespace.*");
FLUSH TABLES;
--enable_query_log
@@ -242,7 +244,7 @@ let SEARCH_PATTERN= \[Note\] InnoDB: Header page consists of zero bytes in dataf
let SEARCH_PATTERN= InnoDB: At LSN: \d+: unable to open file .*u[1-5].ibd for tablespace;
--source include/search_pattern_in_file.inc
-let SEARCH_PATTERN= \[ERROR\] InnoDB: Cannot rename '.*u5.ibd' to '.*u6.ibd' because the target file exists;
+let SEARCH_PATTERN= \[ERROR\] InnoDB: Cannot replay rename of tablespace \d+ from '.*u4.ibd' to '.*u6.ibd' because the target file exists;
--source include/search_pattern_in_file.inc
--remove_file $MYSQLD_DATADIR/test/u6.ibd
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 584d3dc1d5d..d90be6d8916 100644
--- a/mysql-test/suite/innodb/t/log_file_name_debug.test
+++ b/mysql-test/suite/innodb/t/log_file_name_debug.test
@@ -16,8 +16,8 @@ call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE faile
FLUSH TABLES;
--enable_query_log
---let $n_logs=`SELECT if(@@innodb_log_files_in_group = 1, 2, 1)`
---let $resize= --innodb-log-files-in-group=$n_logs --innodb-log-file-size=4M
+--let $change=`SELECT if(@@innodb_log_file_size = 4194304, 8388608, 4194304)`
+--let $resize= --innodb-log-file-size=$change
--source include/no_checkpoint_start.inc
@@ -39,7 +39,7 @@ SELECT * FROM t1;
--source include/restart_mysqld.inc
--error ER_UNKNOWN_STORAGE_ENGINE
SELECT * FROM t1;
---let SEARCH_PATTERN= ib_log: MLOG_CHECKPOINT.* written
+--let SEARCH_PATTERN= ib_log: FILE_CHECKPOINT.* written
--source include/search_pattern_in_file.inc
--let $restart_parameters=
diff --git a/mysql-test/suite/innodb/t/log_file_size.test b/mysql-test/suite/innodb/t/log_file_size.test
index 6f15b830e8d..4c0d377a826 100644
--- a/mysql-test/suite/innodb/t/log_file_size.test
+++ b/mysql-test/suite/innodb/t/log_file_size.test
@@ -12,17 +12,16 @@ if (`SELECT @@innodb_log_file_size = 1048576`) {
}
--disable_query_log
-call mtr.add_suppression("InnoDB: The log sequence numbers [0-9]+ and [0-9]+ in ibdata files do not match the log sequence number [0-9]+ in the ib_logfiles");
+call mtr.add_suppression("InnoDB: The log sequence numbers [0-9]+ and [0-9]+ in ibdata file do not match the log sequence number [0-9]+ in the ib_logfile");
call mtr.add_suppression("syntax error in innodb_log_group_home_dir");
call mtr.add_suppression("Plugin 'InnoDB' init function returned error");
call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed");
call mtr.add_suppression("InnoDB: Plugin initialization aborted");
call mtr.add_suppression("InnoDB: innodb_read_only prevents crash recovery");
-call mtr.add_suppression("InnoDB: Are you sure you are using the right ib_logfiles");
-call mtr.add_suppression("InnoDB: Cannot (create|resize) log files in read-only mode");
+call mtr.add_suppression("InnoDB: Are you sure you are using the right ib_logfile");
+call mtr.add_suppression("InnoDB: Cannot (create|resize) log file in read-only mode");
call mtr.add_suppression("InnoDB: Can't initiate database recovery, running in read-only-mode");
-call mtr.add_suppression("InnoDB: Only one log file found");
-call mtr.add_suppression("InnoDB: Log file .*ib_logfile[01].* size");
+call mtr.add_suppression("InnoDB: Log file .*ib_logfile0.* size");
call mtr.add_suppression("InnoDB: Unable to open .*ib_logfile0. to check native AIO read support");
FLUSH TABLES;
--enable_query_log
@@ -37,26 +36,19 @@ let $check_no_innodb=SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
---let $restart_parameters= --innodb-thread-concurrency=1 --innodb-log-file-size=1m --innodb-log-files-in-group=2
+--let $restart_parameters= --innodb-thread-concurrency=1 --innodb-log-file-size=2m
--source include/start_mysqld.inc
-eval $check_no_innodb;
---remove_file $MYSQLD_DATADIR/ib_logfile0
---move_file $MYSQLD_DATADIR/ib_logfile.old $MYSQLD_DATADIR/ib_logfile.0
---source include/shutdown_mysqld.inc
let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err;
-let SEARCH_PATTERN= InnoDB: Log file .*ib_logfile1 is of different size .* bytes than other log files 0 bytes!;
---source include/search_pattern_in_file.inc
---source include/start_mysqld.inc
CHECK TABLE t1;
---let $restart_parameters= --innodb-thread-concurrency=100 --innodb-log-file-size=10M --innodb-log-files-in-group=2
+--let $restart_parameters= --innodb-thread-concurrency=100 --innodb-log-file-size=20M
--source include/restart_mysqld.inc
BEGIN;
INSERT INTO t1 VALUES (42);
-let $restart_parameters = --innodb-log-file-size=6M;
+let $restart_parameters = --innodb-log-file-size=12M;
let $shutdown_timeout=0;
--source include/restart_mysqld.inc
@@ -66,7 +58,7 @@ INSERT INTO t1 VALUES (42);
BEGIN;
DELETE FROM t1;
-let $restart_parameters = --innodb-log-files-in-group=3 --innodb-log-file-size=5M;
+let $restart_parameters = --innodb-log-file-size=5M;
--source include/restart_mysqld.inc
let $shutdown_timeout=;
@@ -120,14 +112,14 @@ let SEARCH_PATTERN= InnoDB: innodb_read_only prevents crash recovery;
--source include/restart_mysqld.inc
--error ER_UNKNOWN_STORAGE_ENGINE
SELECT * FROM t1;
-let SEARCH_PATTERN= redo log from 3\*[0-9]+ to 2\*[0-9]+ bytes;
+let SEARCH_PATTERN= redo log from [0-9]+ to [0-9]+ bytes;
--source include/search_pattern_in_file.inc
--let $restart_parameters= --debug=d,innodb_log_abort_5
--source include/restart_mysqld.inc
--error ER_UNKNOWN_STORAGE_ENGINE
SELECT * FROM t1;
-let SEARCH_PATTERN= redo log from 3\*[0-9]+ to 2\*[0-9]+ bytes;
+let SEARCH_PATTERN= redo log from [0-9]+ to [0-9]+ bytes;
--source include/search_pattern_in_file.inc
--let $restart_parameters= --innodb-read-only
@@ -142,7 +134,7 @@ let SEARCH_PATTERN= InnoDB: innodb_read_only prevents crash recovery;
--error ER_UNKNOWN_STORAGE_ENGINE
SELECT * FROM t1;
-let SEARCH_PATTERN= redo log from 3\*[0-9]+ to 2\*[0-9]+ bytes;
+let SEARCH_PATTERN= redo log from [0-9]+ to [0-9]+ bytes;
--source include/search_pattern_in_file.inc
--let $restart_parameters= --debug=d,innodb_log_abort_7
@@ -157,7 +149,7 @@ SELECT * FROM t1;
--error ER_UNKNOWN_STORAGE_ENGINE
SELECT * FROM t1;
-let SEARCH_PATTERN= InnoDB: Cannot create log files in read-only mode;
+let SEARCH_PATTERN= InnoDB: Cannot create log file in read-only mode;
--source include/search_pattern_in_file.inc
--let $restart_parameters= --debug=d,innodb_log_abort_8
@@ -178,8 +170,7 @@ let SEARCH_PATTERN= InnoDB: Setting log file .*ib_logfile[0-9]+ size to;
--source include/shutdown_mysqld.inc
# We should have perfectly synced files here.
-# Rename the log files, and trigger an error in recovery.
---move_file $MYSQLD_DATADIR/ib_logfile1 $MYSQLD_DATADIR/ib_logfile1_hidden
+# Trigger an error in recovery.
perl;
die unless open(FILE, ">$ENV{MYSQLD_DATADIR}/ib_logfile0");
@@ -202,14 +193,10 @@ close(FILE);
EOF
--source include/restart_mysqld.inc
---error ER_UNKNOWN_STORAGE_ENGINE
SELECT * FROM t1;
-let SEARCH_PATTERN= InnoDB: Log file .*ib_logfile1 is of different size 1048576 bytes than other log files;
---source include/search_pattern_in_file.inc
--remove_file $MYSQLD_DATADIR/ib_logfile1
--move_file $MYSQLD_DATADIR/ib_logfile0 $MYSQLD_DATADIR/ib_logfile101
---move_file $MYSQLD_DATADIR/ib_logfile1_hidden $MYSQLD_DATADIR/ib_logfile1
--let $restart_parameters= --debug=d,innodb_log_abort_10
--source include/restart_mysqld.inc
diff --git a/mysql-test/suite/innodb/t/mdev-117.test b/mysql-test/suite/innodb/t/mdev-117.test
index 991221b6f6f..b29b2cd5bd5 100644
--- a/mysql-test/suite/innodb/t/mdev-117.test
+++ b/mysql-test/suite/innodb/t/mdev-117.test
@@ -22,8 +22,10 @@ SELECT col_int_key FROM t1;
DELETE FROM t1 WHERE col_int_key IN (1, 40000000);
--connection default
+--disable_warnings
--error 0,ER_LOCK_DEADLOCK,ER_LOCK_WAIT_TIMEOUT
--reap
+--enable_warnings
--disconnect con1
drop table t1;
diff --git a/mysql-test/suite/innodb/t/monitor.test b/mysql-test/suite/innodb/t/monitor.test
index 3535c9c85ad..7fa0c64f81b 100644
--- a/mysql-test/suite/innodb/t/monitor.test
+++ b/mysql-test/suite/innodb/t/monitor.test
@@ -8,13 +8,14 @@
set global innodb_monitor_disable = All;
# Test turn on/off the monitor counter with "all" option
# By default, they will be off.
-select name, status from information_schema.innodb_metrics;
+select name, if(enabled,'enabled','disabled') status
+from information_schema.innodb_metrics;
# Turn on all monitor counters
set global innodb_monitor_enable = all;
# status should all change to "enabled"
-select name from information_schema.innodb_metrics where status!='enabled';
+select name from information_schema.innodb_metrics where not enabled;
# Test wrong argument to the global configure option
--error ER_WRONG_VALUE_FOR_VAR
@@ -32,7 +33,7 @@ set global innodb_monitor_enable = aaa;
set global innodb_monitor_disable = All;
# status should all change to "disabled"
-select name from information_schema.innodb_metrics where status!='disabled';
+select name from information_schema.innodb_metrics where enabled;
# Reset all counter values
set global innodb_monitor_reset_all = all;
@@ -45,13 +46,14 @@ set global innodb_monitor_enable = "%lock%";
# All lock related counter should be enabled
select name from information_schema.innodb_metrics
-where status != IF(name like "%lock%", 'enabled', 'disabled');
+where enabled != (name like "%lock%");
# Disable them
set global innodb_monitor_disable = "%lock%";
# All lock related counter should be disabled
-select name, status from information_schema.innodb_metrics
+select name, if(enabled,'enabled','disabled') status
+from information_schema.innodb_metrics
where name like "%lock%";
# No match for "%lock*"
@@ -61,29 +63,29 @@ set global innodb_monitor_enable = "%lock*";
# All counters will be turned on with wildcard match string with all "%"
set global innodb_monitor_enable="%%%%%%%%%%%%%%%%%%%%%%%%%%%";
-select name from information_schema.innodb_metrics where status!='enabled';
+select name from information_schema.innodb_metrics where not enabled;
# Turn off all counters
set global innodb_monitor_disable="%%%%%";
-select name from information_schema.innodb_metrics where status!='disabled';
+select name from information_schema.innodb_metrics where enabled;
# One more round testing. All counters will be turned on with
# single wildcard character "%"
set global innodb_monitor_enable="%";
-select name from information_schema.innodb_metrics where status!='enabled';
+select name from information_schema.innodb_metrics where not enabled;
# Turn off all the counters with "%_%"
set global innodb_monitor_disable="%_%";
-select name from information_schema.innodb_metrics where status!='disabled';
+select name from information_schema.innodb_metrics where enabled;
# Turn on all counters start with "log"
set global innodb_monitor_enable="log%%%%";
select name from information_schema.innodb_metrics
-where status != IF(name like "log%", 'enabled', 'disabled');
+where enabled != (name like "log%");
# Turn on counters "os_data_fsync" with wildcard match "os_%a_fs_ncs", "_"
# is single character wildcard match word
@@ -93,7 +95,8 @@ set global innodb_monitor_enable="os_%a_fs_ncs";
# wildcard match "os%pending%"
set global innodb_monitor_enable="os%pending%";
-select name, status from information_schema.innodb_metrics
+select name, if(enabled,'enabled','disabled') status
+from information_schema.innodb_metrics
where name like "os%";
# Empty string is an invalid option
@@ -117,7 +120,8 @@ select * from monitor_test;
# "metadata_table_handles_opened" should increment by 1
select name, max_count, min_count, count,
- max_count_reset, min_count_reset, count_reset, status
+ max_count_reset, min_count_reset, count_reset,
+ if(enabled,'enabled','disabled') status
from information_schema.innodb_metrics
where name = "metadata_table_handles_opened";
@@ -127,7 +131,8 @@ where name = "metadata_table_handles_opened";
set global innodb_monitor_reset = metadata_table_handles_opened;
select name, max_count, min_count, count,
- max_count_reset, min_count_reset, count_reset, status
+ max_count_reset, min_count_reset, count_reset,
+ if(enabled,'enabled','disabled') status
from information_schema.innodb_metrics
where name = "metadata_table_handles_opened";
@@ -141,7 +146,8 @@ select * from monitor_test;
# "metadata_table_handles_opened" should increment
select name, max_count, min_count, count,
- max_count_reset, min_count_reset, count_reset, status
+ max_count_reset, min_count_reset, count_reset,
+ if(enabled,'enabled','disabled') status
from information_schema.innodb_metrics
where name = "metadata_table_handles_opened";
@@ -149,7 +155,8 @@ where name = "metadata_table_handles_opened";
set global innodb_monitor_reset_all = metadata_table_handles_opened;
select name, max_count, min_count, count,
- max_count_reset, min_count_reset, count_reset, status
+ max_count_reset, min_count_reset, count_reset,
+ if(enabled,'enabled','disabled') status
from information_schema.innodb_metrics
where name = "metadata_table_handles_opened";
@@ -160,7 +167,8 @@ set global innodb_monitor_disable = metadata_table_handles_opened;
set global innodb_monitor_reset = metadata_table_handles_opened;
select name, max_count, min_count, count,
- max_count_reset, min_count_reset, count_reset, status
+ max_count_reset, min_count_reset, count_reset,
+ if(enabled,'enabled','disabled') status
from information_schema.innodb_metrics
where name = "metadata_table_handles_opened";
@@ -175,7 +183,8 @@ create table monitor_test(col int) engine = innodb;
select * from monitor_test;
select name, max_count, min_count, count,
- max_count_reset, min_count_reset, count_reset, status
+ max_count_reset, min_count_reset, count_reset,
+ if(enabled,'enabled','disabled') status
from information_schema.innodb_metrics
where name = "metadata_table_handles_opened";
@@ -183,7 +192,8 @@ where name = "metadata_table_handles_opened";
set global innodb_monitor_reset_all = metadata_table_handles_opened;
select name, max_count, min_count, count,
- max_count_reset, min_count_reset, count_reset, status
+ max_count_reset, min_count_reset, count_reset,
+ if(enabled,'enabled','disabled') status
from information_schema.innodb_metrics
where name = "metadata_table_handles_opened";
@@ -201,7 +211,8 @@ select * from monitor_test;
# "metadata_table_handles_opened" should increment
select name, max_count, min_count, count,
- max_count_reset, min_count_reset, count_reset, status
+ max_count_reset, min_count_reset, count_reset,
+ if(enabled,'enabled','disabled') status
from information_schema.innodb_metrics
where name = "metadata_table_handles_opened";
@@ -212,12 +223,14 @@ set global innodb_monitor_enable = metadata_table_handles_closed;
create index idx on monitor_test(col);
select name, max_count, min_count, count,
- max_count_reset, min_count_reset, count_reset, status
+ max_count_reset, min_count_reset, count_reset,
+ if(enabled,'enabled','disabled') status
from information_schema.innodb_metrics
where name = "metadata_table_handles_closed";
select name, max_count, min_count, count,
- max_count_reset, min_count_reset, count_reset, status
+ max_count_reset, min_count_reset, count_reset,
+ if(enabled,'enabled','disabled') status
from information_schema.innodb_metrics
where name like "metadata%";
@@ -227,14 +240,16 @@ set global innodb_monitor_disable = module_metadata;
set global innodb_monitor_reset = module_metadata;
select name, max_count, min_count, count,
- max_count_reset, min_count_reset, count_reset, status
+ max_count_reset, min_count_reset, count_reset,
+ if(enabled,'enabled','disabled') status
from information_schema.innodb_metrics
where name like "metadata%";
set global innodb_monitor_reset_all = module_metadata;
select name, max_count, min_count, count,
- max_count_reset, min_count_reset, count_reset, status
+ max_count_reset, min_count_reset, count_reset,
+ if(enabled,'enabled','disabled') status
from information_schema.innodb_metrics
where name like "metadata%";
@@ -250,7 +265,8 @@ insert into monitor_test values(9);
rollback;
select name, max_count, min_count, count,
- max_count_reset, min_count_reset, count_reset, status
+ max_count_reset, min_count_reset, count_reset,
+ if(enabled,'enabled','disabled') status
from information_schema.innodb_metrics
where name like "trx_rollbacks" or name like "trx_active_transactions";
@@ -264,14 +280,16 @@ insert into monitor_test values(9);
update monitor_test set col = 10 where col = 9;
select name, max_count, min_count, count,
- max_count_reset, min_count_reset, count_reset, status
+ max_count_reset, min_count_reset, count_reset,
+ if(enabled,'enabled','disabled') status
from information_schema.innodb_metrics
where name like "dml%";
delete from monitor_test;
select name, max_count, min_count, count,
- max_count_reset, min_count_reset, count_reset, status
+ max_count_reset, min_count_reset, count_reset,
+ if(enabled,'enabled','disabled') status
from information_schema.innodb_metrics
where name like "dml%";
@@ -279,7 +297,8 @@ select name, max_count, min_count, count,
set global innodb_monitor_reset = module_dml;
select name, max_count, min_count, count,
- max_count_reset, min_count_reset, count_reset, status
+ max_count_reset, min_count_reset, count_reset,
+ if(enabled,'enabled','disabled') status
from information_schema.innodb_metrics
where name like "dml%";
@@ -290,7 +309,8 @@ insert into monitor_test values(1);
delete from monitor_test;
select name, max_count, min_count, count,
- max_count_reset, min_count_reset, count_reset, status
+ max_count_reset, min_count_reset, count_reset,
+ if(enabled,'enabled','disabled') status
from information_schema.innodb_metrics
where name like "dml%";
@@ -299,7 +319,8 @@ where name like "dml%";
set global innodb_monitor_reset_all = module_dml;
select name, max_count, min_count, count,
- max_count_reset, min_count_reset, count_reset, status
+ max_count_reset, min_count_reset, count_reset,
+ if(enabled,'enabled','disabled') status
from information_schema.innodb_metrics
where name like "dml%";
@@ -307,7 +328,8 @@ where name like "dml%";
set global innodb_monitor_disable = module_dml;
select name, max_count, min_count, count,
- max_count_reset, min_count_reset, count_reset, status
+ max_count_reset, min_count_reset, count_reset,
+ if(enabled,'enabled','disabled') status
from information_schema.innodb_metrics
where name like "dml%";
@@ -315,7 +337,8 @@ where name like "dml%";
set global innodb_monitor_reset_all = module_dml;
select name, max_count, min_count, count,
- max_count_reset, min_count_reset, count_reset, status
+ max_count_reset, min_count_reset, count_reset,
+ if(enabled,'enabled','disabled') status
from information_schema.innodb_metrics
where name like "dml%";
@@ -329,7 +352,8 @@ delete from monitor_test;
# Only counter "dml_inserts" should be updated
select name, max_count, min_count, count,
- max_count_reset, min_count_reset, count_reset, status
+ max_count_reset, min_count_reset, count_reset,
+ if(enabled,'enabled','disabled') status
from information_schema.innodb_metrics
where name like "dml%";
@@ -342,7 +366,8 @@ set global innodb_monitor_enable = file_num_open_files;
# Counters are unpredictable when innodb-file-per-table is on
--replace_column 2 # 3 # 4 # 5 # 6 # 7 #
select name, max_count, min_count, count,
- max_count_reset, min_count_reset, count_reset, status
+ max_count_reset, min_count_reset, count_reset,
+ if(enabled,'enabled','disabled') status
from information_schema.innodb_metrics
where name like "file_num_open_files";
@@ -424,6 +449,32 @@ LIKE 'buffer_page_written_index_leaf';
DROP TABLE t1;
+CREATE TABLE fl0 (
+ id INT NOT NULL PRIMARY KEY
+) ENGINE = InnoDB;
+
+CREATE TABLE fl1 (
+ id INT NOT NULL PRIMARY KEY,
+ fl0_id INT,
+ CONSTRAINT `fkl0`
+ FOREIGN KEY (fl0_id) REFERENCES fl0 (id)
+ ON DELETE CASCADE
+ ON UPDATE RESTRICT
+) ENGINE = InnoDB;
+
+CREATE TABLE fl2 (
+ id INT NOT NULL PRIMARY KEY,
+ fl1_id INT,
+ CONSTRAINT `fkl1`
+ FOREIGN KEY (fl1_id) REFERENCES fl1 (id)
+ ON DELETE CASCADE
+ ON UPDATE SET NULL
+) ENGINE = InnoDB;
+
+INSERT INTO fl0 VALUES (1000);
+INSERT INTO fl1 VALUES (500, 1000), (1500, 1000);
+INSERT INTO fl2 VALUES (200, 500), (800, 500), (1200, 1500), (1800, 1500);
+
CREATE TABLE t1(id INT PRIMARY KEY, a INT, b CHAR(1), UNIQUE KEY u(a,b))
ENGINE=InnoDB;
@@ -439,7 +490,73 @@ SET @end = (SELECT COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
= 'lock_rec_lock_created');
SELECT @end - @start;
+--echo # Records must not be S/X-locked if a table is X-locked.
+SET @start = @end;
+# Tables will not be locked if autocommit is not 0.
+# See OPTION_NOT_AUTOCOMMIT in ha_innobase::external_lock().
+SET autocommit = 0;
+BEGIN;
+LOCK TABLE t1 WRITE;
+SELECT * FROM t1;
+SELECT * FROM t1 WHERE a>=10000;
+SELECT * FROM t1 FOR UPDATE;
+SELECT * FROM t1 WHERE a>=10000 FOR UPDATE;
+UPDATE t1 SET b = 'b' WHERE id = 4;
+UPDATE t1 SET b = 'b' WHERE a = 10000;
+REPLACE INTO t1 VALUES (4,3,'a');
+INSERT INTO t1 VALUES (3,1,'e') ON DUPLICATE KEY UPDATE b = 'b';
+INSERT INTO t1 VALUES (5,5,'e');
+DELETE FROM t1 WHERE a = 1 AND b='a';
+DELETE FROM t1;
+COMMIT;
+UNLOCK TABLES;
+SET @end = (SELECT COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME = 'lock_rec_lock_created');
+SELECT @end - @start;
+
+--echo # Records must not be S-locked if a table is S-locked.
+SET @start = @end;
+BEGIN;
+LOCK TABLE t1 WRITE;
+INSERT INTO t1 VALUES(1,1,'a'),(2,9999,'b'),(3,10000,'c'),(4,4,'d');
+DELETE FROM t1 WHERE a = 9999 AND b='b';
+COMMIT;
+UNLOCK TABLES;
+BEGIN;
+LOCK TABLE t1 READ;
+SELECT * FROM t1 LOCK IN SHARE MODE;
+SELECT * FROM t1 WHERE a>=10000 LOCK IN SHARE MODE;
+COMMIT;
+UNLOCK TABLES;
+SET @end = (SELECT COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME = 'lock_rec_lock_created');
+SELECT @end - @start;
+
+--echo # Records must not be S-locked for foreign keys enforcement
+SET @start = @end;
+BEGIN;
+LOCK TABLE fl0 READ, fl1 READ, fl2 WRITE;
+INSERT INTO fl2 VALUES (300, 500), (700, 500), (1300, 1500), (1700, 1500);
+SELECT * FROM fl1 LOCK IN SHARE MODE;
+COMMIT;
+UNLOCK TABLES;
+SET @end = (SELECT COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME = 'lock_rec_lock_created');
+SELECT @end - @start;
+
+--echo # Records must not be X-locked for foreign keys cascade
+SET @start = @end;
+BEGIN;
+LOCK TABLE fl0 READ, fl1 WRITE, fl2 WRITE;
+DELETE FROM fl1 WHERE id = 1500;
+UPDATE fl1 SET id = 2500 WHERE id = 500;
+COMMIT;
+UNLOCK TABLES;
+SET @end = (SELECT COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME = 'lock_rec_lock_created');
+SELECT @end - @start;
+
+SET autocommit = default;
DROP TABLE t1;
+DROP TABLE fl2;
+DROP TABLE fl1;
+DROP TABLE fl0;
--disable_warnings
SET GLOBAL innodb_monitor_enable=default;
diff --git a/mysql-test/suite/innodb/t/page_cleaner.test b/mysql-test/suite/innodb/t/page_cleaner.test
new file mode 100644
index 00000000000..f597619aa08
--- /dev/null
+++ b/mysql-test/suite/innodb/t/page_cleaner.test
@@ -0,0 +1,30 @@
+--source include/have_innodb.inc
+--source include/have_sequence.inc
+
+SET @save_pct= @@GLOBAL.innodb_max_dirty_pages_pct;
+SET @save_pct_lwm= @@GLOBAL.innodb_max_dirty_pages_pct_lwm;
+
+SET GLOBAL innodb_max_dirty_pages_pct_lwm=0.0;
+SET GLOBAL innodb_max_dirty_pages_pct=0.0;
+
+let $wait_condition =
+SELECT variable_value = 0
+FROM information_schema.global_status
+WHERE variable_name = 'INNODB_BUFFER_POOL_PAGES_DIRTY';
+--source include/wait_condition.inc
+
+SET GLOBAL innodb_max_dirty_pages_pct=90.0;
+
+CREATE TABLE t ENGINE=InnoDB SELECT * FROM seq_1_to_10000;
+
+SELECT variable_value>0 FROM information_schema.global_status
+WHERE variable_name = 'INNODB_BUFFER_POOL_PAGES_DIRTY';
+
+SET GLOBAL innodb_max_dirty_pages_pct=0.0;
+
+# Without the MDEV-24917 fix, we would time out here.
+--source include/wait_condition.inc
+DROP TABLE t;
+
+SET GLOBAL innodb_max_dirty_pages_pct = @save_pct;
+SET GLOBAL innodb_max_dirty_pages_pct_lwm = @save_pct_lwm;
diff --git a/mysql-test/suite/innodb/t/purge_secondary.test b/mysql-test/suite/innodb/t/purge_secondary.test
index bf702b6b737..f2c85ce10e7 100644
--- a/mysql-test/suite/innodb/t/purge_secondary.test
+++ b/mysql-test/suite/innodb/t/purge_secondary.test
@@ -1,4 +1,5 @@
--source include/have_innodb.inc
+--source include/have_sequence.inc
# Ensure that the history list length will actually be decremented by purge.
SET @saved_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency;
@@ -123,24 +124,13 @@ WHERE NAME='test/t1';
# Work around MDEV-13942, Dropping the spatial index to avoid the possible hang
ALTER TABLE t1 DROP INDEX `sidx`;
-INSERT INTO t1 () VALUES (),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),();
-INSERT INTO t1 (a) SELECT NULL FROM t1;
-INSERT INTO t1 (a) SELECT NULL FROM t1;
-INSERT INTO t1 (a) SELECT NULL FROM t1;
-INSERT INTO t1 (a) SELECT NULL FROM t1;
-INSERT INTO t1 (a) SELECT NULL FROM t1;
+INSERT INTO t1 (a) SELECT * FROM seq_1_to_544;
ALTER TABLE t1 FORCE, ALGORITHM=INPLACE;
ALTER TABLE t1 FORCE, ALGORITHM=INPLACE;
-SELECT NAME, SUBSYSTEM FROM INFORMATION_SCHEMA.INNODB_METRICS
-WHERE NAME="buffer_LRU_batch_flush_total_pages" AND COUNT > 0;
-
SELECT (variable_value > 0) FROM information_schema.global_status
WHERE LOWER(variable_name) LIKE 'INNODB_BUFFER_POOL_PAGES_FLUSHED';
-SELECT NAME, SUBSYSTEM FROM INFORMATION_SCHEMA.INNODB_METRICS
-WHERE NAME="buffer_LRU_batch_evict_total_pages" AND COUNT > 0;
-
--echo # Note: The OTHER_INDEX_SIZE does not cover any SPATIAL INDEX.
--echo # To test that all indexes were emptied, replace DROP TABLE
--echo # with the following, and examine the root pages in t1.ibd:
diff --git a/mysql-test/suite/innodb/t/recovery_shutdown.test b/mysql-test/suite/innodb/t/recovery_shutdown.test
index d72e785f21d..d9079f2e42c 100644
--- a/mysql-test/suite/innodb/t/recovery_shutdown.test
+++ b/mysql-test/suite/innodb/t/recovery_shutdown.test
@@ -1,5 +1,8 @@
--source include/have_innodb.inc
--source include/not_embedded.inc
+# Valgrind has to be disabled as killing the server hard gives a lot of
+# leak warnings
+--source include/not_valgrind.inc
# Flush any open myisam tables from previous tests
FLUSH TABLES;
diff --git a/mysql-test/suite/innodb/t/redo_log_during_checkpoint.test b/mysql-test/suite/innodb/t/redo_log_during_checkpoint.test
index 645ae8c7855..85beb3ee1d2 100644
--- a/mysql-test/suite/innodb/t/redo_log_during_checkpoint.test
+++ b/mysql-test/suite/innodb/t/redo_log_during_checkpoint.test
@@ -44,6 +44,7 @@ set global innodb_log_checkpoint_now = 1;
DROP DATABASE very_long_database_name;
+SET GLOBAL innodb_flush_sync=OFF;
SET GLOBAL innodb_page_cleaner_disabled_debug = 1;
SET GLOBAL innodb_dict_stats_disabled_debug = 1;
SET GLOBAL innodb_master_thread_disabled_debug = 1;
diff --git a/mysql-test/suite/innodb/t/table_definition_cache_debug.test b/mysql-test/suite/innodb/t/table_definition_cache_debug.test
index 70467b53435..6a466af4cc5 100644
--- a/mysql-test/suite/innodb/t/table_definition_cache_debug.test
+++ b/mysql-test/suite/innodb/t/table_definition_cache_debug.test
@@ -4,7 +4,7 @@
# This test is slow on buildbot.
--source include/big_test.inc
-call mtr.add_suppression("InnoDB: innodb_open_files=13 is exceeded");
+call mtr.add_suppression("InnoDB: innodb_open_files=.* is exceeded");
SET @save_tdc= @@GLOBAL.table_definition_cache;
SET @save_toc= @@GLOBAL.table_open_cache;
diff --git a/mysql-test/suite/innodb/t/temp_table_savepoint.test b/mysql-test/suite/innodb/t/temp_table_savepoint.test
index c8a4bc870a7..ffac771ded9 100644
--- a/mysql-test/suite/innodb/t/temp_table_savepoint.test
+++ b/mysql-test/suite/innodb/t/temp_table_savepoint.test
@@ -1,5 +1,5 @@
--source include/have_innodb.inc
---source include/no_valgrind_without_big.inc
+--source include/innodb_row_format.inc
####################################################################
# TC to test temp-table DML optimization changes for correctness #
@@ -28,48 +28,6 @@ create procedure populate_tables()
declare n int default 20;
declare inner_loop int default 100;
- create temporary table t1(c1 int not null,
- c2 int not null,
- c3 char(255) not null,
- c4 text(6000) not null,
- c5 blob(6000) not null,
- c6 varchar(2000) not null,
- c7 varchar(2000) not null,
- c8 datetime,
- c9 decimal(6,3),
- primary key (c1),
- index (c3,c4(50),c5(50)),
- index (c2))
- engine=innodb row_format=redundant;
-
- create temporary table t2(c1 int not null,
- c2 int not null,
- c3 char(255) not null,
- c4 text(6000) not null,
- c5 blob(6000) not null,
- c6 varchar(2000) not null,
- c7 varchar(2000) not null,
- c8 datetime,
- c9 decimal(6,3),
- primary key (c1),
- index (c3,c4(50),c5(50)),
- index (c2))
- engine=innodb row_format=compact;
-
- create temporary table t4(c1 int not null,
- c2 int not null,
- c3 char(255) not null,
- c4 text(6000) not null,
- c5 blob(6000) not null,
- c6 varchar(2000) not null,
- c7 varchar(2000) not null,
- c8 datetime,
- c9 decimal(6,3),
- primary key (c1),
- index (c3,c4(50),c5(50)),
- index (c2))
- engine=innodb row_format=dynamic;
-
create temporary table t5(c1 int not null,
c2 int not null,
c3 char(255) not null,
@@ -89,18 +47,6 @@ create procedure populate_tables()
while (n > 0) do
start transaction;
- insert into t1 values(n,n,repeat(concat(' tc3_',n),30),
- repeat(concat(' tc4_',n),8),repeat(concat(' tc_',n),8),
- repeat(concat(' tc6_',n),8),repeat(concat(' tc7_',n),8),
- now(),(100.55+n));
- insert into t2 values(n,n,repeat(concat(' tc3_',n),30),
- repeat(concat(' tc4_',n),8),repeat(concat(' tc_',n),8),
- repeat(concat(' tc6_',n),8),repeat(concat(' tc7_',n),8),
- now(),(100.55+n));
- insert ignore into t4 values(n,n,repeat(concat(' tc3_',n),30),
- repeat(concat(' tc4_',n),800),repeat(concat(' tc_',n),800),
- repeat(concat(' tc6_',n),800),repeat(concat(' tc7_',n),800),
- now(),(100.55+n));
insert ignore into t5 values(n,n,repeat(concat(' tc3_',n),30),
repeat(concat(' tc4_',n),800),repeat(concat(' tc_',n),800),
repeat(concat(' tc6_',n),800),repeat(concat(' tc7_',n),800),
@@ -109,80 +55,32 @@ create procedure populate_tables()
if (n > 10) then
commit;
else
- delete from t1 where c1 > 10 ;
- delete from t2 where c1 > 10 ;
- delete from t4 where c1 > 10 ;
delete from t5 where c1 > 10 ;
rollback;
start transaction;
- update t1 set c1 = c1 + 1000 where c1 > 10;
- update t2 set c1 = c1 + 1000 where c1 > 10;
- update t4 set c1 = c1 + 1000 where c1 > 10;
update t5 set c1 = c1 + 1000 where c1 > 10;
rollback;
end if;
start transaction;
- insert into t1 values(n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
- repeat(concat(' tc4_',n+inner_loop),8),repeat(concat(' tc_',n+inner_loop),8),
- repeat(concat(' tc6_',n+inner_loop),2),repeat(concat(' tc7_',n+inner_loop),2),
- now(),(100.55+n+inner_loop));
- insert into t2 values(n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
- repeat(concat(' tc4_',n+inner_loop),8),repeat(concat(' tc_',n+inner_loop),8),
- repeat(concat(' tc6_',n+inner_loop),2),repeat(concat(' tc7_',n+inner_loop),2),
- now(),(100.55+n+inner_loop));
- insert ignore into t4 values(n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
- repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
- repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245),
- now(),(100.55+n+inner_loop));
insert ignore into t5 values(n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245),
now(),(100.55+n+inner_loop));
- delete from t1 where c1 between 100 and 110;
- delete from t2 where c1 between 100 and 110;
- delete from t4 where c1 between 100 and 110;
delete from t5 where c1 between 100 and 110;
- update t1 set c1 = c1+1 where c1>110;
- update t2 set c1 = c1+1 where c1>110;
- update t4 set c1 = c1+1 where c1>110;
update t5 set c1 = c1+1 where c1>110;
savepoint a;
- insert into t1 values(300+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
- repeat(concat(' tc4_',n+inner_loop),8),repeat(concat(' tc_',n+inner_loop),8),
- repeat(concat(' tc6_',n+inner_loop),2),repeat(concat(' tc7_',n+inner_loop),2),
- now(),(100.55+n+inner_loop));
- insert into t2 values(300+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
- repeat(concat(' tc4_',n+inner_loop),8),repeat(concat(' tc_',n+inner_loop),8),
- repeat(concat(' tc6_',n+inner_loop),2),repeat(concat(' tc7_',n+inner_loop),2),
- now(),(100.55+n+inner_loop));
- insert ignore into t4 values(300+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
- repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
- repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245),
- now(),(100.55+n+inner_loop));
insert ignore into t5 values(300+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245),
now(),(100.55+n+inner_loop));
savepoint b;
- insert into t1 values(400+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
- repeat(concat(' tc4_',n+inner_loop),8),repeat(concat(' tc_',n+inner_loop),8),
- repeat(concat(' tc6_',n+inner_loop),2),repeat(concat(' tc7_',n+inner_loop),2),
- now(),(100.55+n+inner_loop));
- insert into t2 values(400+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
- repeat(concat(' tc4_',n+inner_loop),8),repeat(concat(' tc_',n+inner_loop),8),
- repeat(concat(' tc6_',n+inner_loop),2),repeat(concat(' tc7_',n+inner_loop),2),
- now(),(100.55+n+inner_loop));
- insert into t4 values(400+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
- repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
- repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245),
- now(),(100.55+n+inner_loop));
insert into t5 values(400+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245),
@@ -208,25 +106,11 @@ connect (con2,localhost,root,,);
connection con1;
--reap
# 20 rows expected
-select count(*) from t1;
-select count(*) from t2;
-select count(*) from t4;
-select count(*) from t5;
-select c1 from t1;
-select c1 from t2;
-select c1 from t4;
select c1 from t5;
connection con2;
--reap
# 20 rows expected
-select count(*) from t1;
-select count(*) from t2;
-select count(*) from t4;
-select count(*) from t5;
-select c1 from t1;
-select c1 from t2;
-select c1 from t4;
select c1 from t5;
connection con1;
@@ -234,71 +118,38 @@ connection con1;
set autocommit = 0;
# Check duplicate key constraint + insert ignore
--error ER_DUP_ENTRY
-insert into t1 values (20,1,'a','a','a','a','a',now(),100.55);
-insert ignore into t1 values (20,1,'a','a','a','a','a',now(),100.55);
---error ER_DUP_ENTRY
-insert into t2 values (20,1,'a','a','a','a','a',now(),100.55);
-insert ignore into t2 values (20,1,'a','a','a','a','a',now(),100.55);
---error ER_DUP_ENTRY
-insert into t4 values (20,1,'a','a','a','a','a',now(),100.55);
-insert ignore into t4 values (20,1,'a','a','a','a','a',now(),100.55);
---error ER_DUP_ENTRY
insert into t5 values (20,1,'a','a','a','a','a',now(),100.55);
insert ignore into t5 values (20,1,'a','a','a','a','a',now(),100.55);
# check rollback due to duplicate value in second record of insert
--error ER_DUP_ENTRY
-insert into t1 values (1,1,'a','a','a','a','a',now(),100.55),
-(20,1,'a','a','a','a','a',now(),100.55);
---error ER_DUP_ENTRY
-insert into t2 values (1,1,'a','a','a','a','a',now(),100.55),
-(20,1,'a','a','a','a','a',now(),100.55);
---error ER_DUP_ENTRY
-insert into t4 values (1,1,'a','a','a','a','a',now(),100.55),
-(20,1,'a','a','a','a','a',now(),100.55);
---error ER_DUP_ENTRY
insert into t5 values (1,1,'a','a','a','a','a',now(),100.55),
(20,1,'a','a','a','a','a',now(),100.55);
set autocommit = 1;
-select c1,c2 from t1 where c1 in (20,1);
-select c1,c2 from t2 where c1 in (20,1);
-select c1,c2 from t4 where c1 in (20,1);
select c1,c2 from t5 where c1 in (20,1);
#replace statement
-replace into t1 values (20,1,'a','a','a','a','a',now(),100.55);
-replace into t2 values (20,1,'a','a','a','a','a',now(),100.55);
-replace into t4 values (20,1,'a','a','a','a','a',now(),100.55);
replace into t5 values (20,1,'a','a','a','a','a',now(),100.55);
# verify row is replaced from (20,20) to (20,1)
-select c1,c2,c3,c4,c5,c6,c7,c9 from t1 where c1 = 20;
-select c1,c2,c3,c4,c5,c6,c7,c9 from t2 where c1 = 20;
-select c1,c2,c3,c4,c5,c6,c7,c9 from t4 where c1 = 20;
select c1,c2,c3,c4,c5,c6,c7,c9 from t5 where c1 = 20;
# Update ignore. statement is ignored as 20 value exists
-update ignore t1 set c1 = 20 where c1 = 140 ;
-update ignore t2 set c1 = 20 where c1 = 140 ;
-update ignore t4 set c1 = 20 where c1 = 140 ;
update ignore t5 set c1 = 20 where c1 = 140 ;
# see record 140 is present as last update ignored
-select count(*) from t1 where c1 = 140;
-select count(*) from t2 where c1 = 140;
-select count(*) from t4 where c1 = 140;
select count(*) from t5 where c1 = 140;
--replace_result $MYSQLTEST_VARDIR VARDIR
-eval select * into outfile "$MYSQLTEST_VARDIR/tmp/t1.outfile" from t1;
+eval select * into outfile "$MYSQLTEST_VARDIR/tmp/t5.outfile" from t5;
-create temporary table temp_1 engine = innodb as select * from t1 where 1=2;
+create temporary table temp_1 engine = innodb as select * from t5 where 1=2;
select count(*) from temp_1;
--replace_result $MYSQLTEST_VARDIR VARDIR
-eval load data infile '$MYSQLTEST_VARDIR/tmp/t1.outfile' into table temp_1;
+eval load data infile '$MYSQLTEST_VARDIR/tmp/t5.outfile' into table temp_1;
select count(*) from temp_1;
---remove_file $MYSQLTEST_VARDIR/tmp/t1.outfile
+--remove_file $MYSQLTEST_VARDIR/tmp/t5.outfile
# Alter table to add column and primary key
alter table temp_1 add column c10 int default 99 ,
diff --git a/mysql-test/suite/innodb/t/temporary_table.test b/mysql-test/suite/innodb/t/temporary_table.test
index 13c203b587b..9ad43188da2 100644
--- a/mysql-test/suite/innodb/t/temporary_table.test
+++ b/mysql-test/suite/innodb/t/temporary_table.test
@@ -11,6 +11,7 @@
--disable_query_log
call mtr.add_suppression("Can't create/write to file '/dev/null/nonexistent/ib");
+call mtr.add_suppression("Can't create/write to file '' \\\(Errcode: 20 \"Not a directory\"\\\)");
call mtr.add_suppression("InnoDB: Unable to create temporary file");
call mtr.add_suppression("last file in setting innodb_temp_data_file_path");
call mtr.add_suppression("The table 't1' is full");
@@ -131,7 +132,7 @@ AND support IN ('YES', 'DEFAULT', 'ENABLED');
# We cannot use include/restart_mysqld.inc in this particular test,
# because SHOW STATUS would fail due to unwritable (nonexistent) tmpdir.
--source include/shutdown_mysqld.inc
---exec echo "restart: --tmpdir=/dev/null/nonexistent" > $_expect_file_name
+--exec echo "restart: --tmpdir=/dev/null/nonexistent --skip-innodb-fast-shutdown" > $_expect_file_name
--enable_reconnect
--disable_result_log
--disable_query_log
diff --git a/mysql-test/suite/innodb/t/undo_truncate.test b/mysql-test/suite/innodb/t/undo_truncate.test
index af6ed2b4372..d2a4e287305 100644
--- a/mysql-test/suite/innodb/t/undo_truncate.test
+++ b/mysql-test/suite/innodb/t/undo_truncate.test
@@ -2,11 +2,9 @@
--source include/innodb_page_size.inc
--source include/have_undo_tablespaces.inc
-SET @save_undo_logs = @@GLOBAL.innodb_undo_logs;
SET @save_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET @save_truncate = @@GLOBAL.innodb_undo_log_truncate;
SET GLOBAL innodb_undo_log_truncate = 0;
-SET GLOBAL innodb_undo_logs = 4;
SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;
SET @trunc_start=
@@ -86,7 +84,8 @@ drop PROCEDURE populate_t2;
# Truncation will normally not occur with innodb_page_size=64k,
# and occasionally not with innodb_page_size=32k,
# because the undo log will not grow enough.
-if (`select @@innodb_page_size IN (4096,8192,16384)`)
+# TODO: For some reason this does not occur on 4k either!
+if (`select @@innodb_page_size IN (8192,16384)`)
{
let $wait_condition = (SELECT variable_value!=@trunc_start
FROM information_schema.global_status
@@ -111,12 +110,11 @@ EOF
if ($size1 == $size2)
{
# This fails for innodb_page_size=64k, occasionally also for 32k.
- if (`select @@innodb_page_size IN (4096,8192,16384)`)
+ if (`select @@innodb_page_size IN (8192,16384)`)
{
echo Truncation did not happen: $size1;
}
}
-SET GLOBAL innodb_undo_logs = @save_undo_logs;
SET GLOBAL innodb_purge_rseg_truncate_frequency = @save_frequency;
SET GLOBAL innodb_undo_log_truncate = @save_truncate;
diff --git a/mysql-test/suite/innodb/t/undo_truncate_recover.test b/mysql-test/suite/innodb/t/undo_truncate_recover.test
index 64b1f6f23a1..e499ff3dfbe 100644
--- a/mysql-test/suite/innodb/t/undo_truncate_recover.test
+++ b/mysql-test/suite/innodb/t/undo_truncate_recover.test
@@ -3,6 +3,7 @@
#
--source include/big_test.inc
+--source include/not_valgrind.inc
# With larger innodb_page_size, the undo log tablespaces do not grow enough.
--source include/innodb_page_size_small.inc
--source include/have_innodb.inc
@@ -11,7 +12,6 @@
# Tests with embedded server do not support restarting
--source include/not_embedded.inc
-SET GLOBAL innodb_undo_logs = 4;
SET GLOBAL innodb_undo_log_truncate = 1;
SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;
diff --git a/mysql-test/suite/innodb_fts/r/fulltext.result b/mysql-test/suite/innodb_fts/r/fulltext.result
index abcdebca01d..b2ac4957e38 100644
--- a/mysql-test/suite/innodb_fts/r/fulltext.result
+++ b/mysql-test/suite/innodb_fts/r/fulltext.result
@@ -708,8 +708,6 @@ SET sql_mode = DEFAULT;
CREATE TABLE t1 (a CHAR, FULLTEXT KEY(a)) ENGINE=InnoDB;
ALTER TABLE t1 DISCARD TABLESPACE;
ALTER TABLE t1 ADD FULLTEXT INDEX (a);
-Warnings:
-Warning 1814 Tablespace has been discarded for table `t1`
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
diff --git a/mysql-test/suite/innodb_fts/r/sync.result b/mysql-test/suite/innodb_fts/r/sync.result
index 5b8e4810028..861408cbe2d 100644
--- a/mysql-test/suite/innodb_fts/r/sync.result
+++ b/mysql-test/suite/innodb_fts/r/sync.result
@@ -145,3 +145,13 @@ id title
2 database
3 good
DROP TABLE t1;
+#
+# MDEV-26273 InnoDB fts DDL fails when
+# innodb_force_recovery is set to 2
+#
+# restart: --innodb_force_recovery=2
+CREATE TABLE t1 (FTS_DOC_ID BIGINT UNSIGNED KEY,
+f1 CHAR(200)) ENGINE=InnoDB;
+ALTER TABLE t1 ADD FULLTEXT INDEX(f1);
+DROP TABLE t1;
+# restart
diff --git a/mysql-test/suite/innodb_fts/t/fulltext.test b/mysql-test/suite/innodb_fts/t/fulltext.test
index f3bcaaec5cc..18baf56281f 100644
--- a/mysql-test/suite/innodb_fts/t/fulltext.test
+++ b/mysql-test/suite/innodb_fts/t/fulltext.test
@@ -736,9 +736,11 @@ SET sql_mode = DEFAULT;
--echo # MDEV-25070 SIGSEGV in fts_create_in_mem_aux_table
--echo #
CREATE TABLE t1 (a CHAR, FULLTEXT KEY(a)) ENGINE=InnoDB;
+--disable_warnings
ALTER TABLE t1 DISCARD TABLESPACE;
ALTER TABLE t1 ADD FULLTEXT INDEX (a);
SHOW CREATE TABLE t1;
DROP TABLE t1;
+--enable_warnings
--echo # End of 10.3 tests
diff --git a/mysql-test/suite/innodb_fts/t/sync.test b/mysql-test/suite/innodb_fts/t/sync.test
index 6929dce31b8..f16953ba09f 100644
--- a/mysql-test/suite/innodb_fts/t/sync.test
+++ b/mysql-test/suite/innodb_fts/t/sync.test
@@ -170,3 +170,17 @@ SET GLOBAL innodb_ft_aux_table=default;
SELECT * FROM t1 WHERE MATCH(title) AGAINST ('mysql database good');
DROP TABLE t1;
+
+--echo #
+--echo # MDEV-26273 InnoDB fts DDL fails when
+--echo # innodb_force_recovery is set to 2
+--echo #
+
+let $restart_parameters=--innodb_force_recovery=2;
+--source include/restart_mysqld.inc
+CREATE TABLE t1 (FTS_DOC_ID BIGINT UNSIGNED KEY,
+ f1 CHAR(200)) ENGINE=InnoDB;
+ALTER TABLE t1 ADD FULLTEXT INDEX(f1);
+DROP TABLE t1;
+let $restart_parameters=;
+--source include/restart_mysqld.inc
diff --git a/mysql-test/suite/innodb_gis/r/1.result b/mysql-test/suite/innodb_gis/r/1.result
index 75ee1c6666c..26fdf39baf3 100644
--- a/mysql-test/suite/innodb_gis/r/1.result
+++ b/mysql-test/suite/innodb_gis/r/1.result
@@ -458,7 +458,7 @@ explain extended select ST_issimple(MultiPoint(Point(3, 6), Point(4, 10))), ST_i
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
Warnings:
-Note 1003 select st_issimple(geometrycollection(point(3,6),point(4,10))) AS `ST_issimple(MultiPoint(Point(3, 6), Point(4, 10)))`,st_issimple(point(3,6)) AS `ST_issimple(Point(3, 6))`
+Note 1003 select st_issimple(multipoint(point(3,6),point(4,10))) AS `ST_issimple(MultiPoint(Point(3, 6), Point(4, 10)))`,st_issimple(point(3,6)) AS `ST_issimple(Point(3, 6))`
create table t1 (a geometry not null);
insert into t1 values (ST_GeomFromText('Point(1 2)'));
insert into t1 values ('Garbage');
@@ -1028,7 +1028,7 @@ f5 datetime YES NULL
drop view v1;
drop table t1;
SELECT MultiPoint(12345,'');
-ERROR HY000: Illegal parameter data type int for operation 'geometrycollection'
+ERROR HY000: Illegal parameter data type int for operation 'multipoint'
SELECT 1 FROM (SELECT GREATEST(1,GEOMETRYCOLLECTION('00000','00000')) b FROM DUAL) AS d WHERE (LINESTRING(d.b));
ERROR HY000: Illegal parameter data type varchar for operation 'geometrycollection'
#
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 ae7f8c08d45..caacde7fecb 100644
--- a/mysql-test/suite/innodb_gis/r/alter_spatial_index.result
+++ b/mysql-test/suite/innodb_gis/r/alter_spatial_index.result
@@ -294,7 +294,7 @@ affected rows: 1
info: Records: 1 Duplicates: 0 Warnings: 0
SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR
CREATE TEMPORARY TABLE temp_tab AS SELECT * FROM tab where c1 = c2;
-ERROR HY000: Illegal parameter data types int and geometry for operation '='
+ERROR HY000: Illegal parameter data types int and point for operation '='
SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR
CREATE TEMPORARY TABLE temp_tab AS SELECT * FROM tab;
INSERT INTO temp_tab SELECT * FROM tab;
@@ -773,13 +773,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(POINT(0 0),POINT(1 1))' for column `test`.`t1`.`p` at row 1
+ERROR 22007: Incorrect POINT value: 'LINESTRING(0 0,1 1)' 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(POINT(0 0),POINT(1 1))' for column `test`.`t1`.`p` at row 1
+ERROR 22007: Incorrect POINT value: 'LINESTRING(0 0,1 1)' for column `test`.`t1`.`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 c69d67c411f..78f2a6ad04d 100644
--- a/mysql-test/suite/innodb_gis/r/create_spatial_index.result
+++ b/mysql-test/suite/innodb_gis/r/create_spatial_index.result
@@ -1244,7 +1244,7 @@ Table Op Msg_type Msg_text
test.tab check status OK
DROP TABLE tab;
CREATE TABLE tab(c1 POINT NOT NULL,CONSTRAINT tab_const check(c1 > 0) ) ENGINE=InnoDB;
-ERROR HY000: Illegal parameter data types geometry and int for operation '>'
+ERROR HY000: Illegal parameter data types point and int for operation '>'
CREATE TABLE tab(c1 POINT NOT NULL,CONSTRAINT tab_const check(CAST(c1 AS BINARY) > 0) ) ENGINE=InnoDB;
CREATE SPATIAL INDEX idx1 ON tab(c1) ;
SHOW CREATE TABLE tab;
diff --git a/mysql-test/suite/innodb_gis/r/gis.result b/mysql-test/suite/innodb_gis/r/gis.result
index acc65e86a59..97a2a740bb9 100644
--- a/mysql-test/suite/innodb_gis/r/gis.result
+++ b/mysql-test/suite/innodb_gis/r/gis.result
@@ -458,7 +458,7 @@ explain extended select ST_issimple(MultiPoint(Point(3, 6), Point(4, 10))), ST_i
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
Warnings:
-Note 1003 select st_issimple(geometrycollection(point(3,6),point(4,10))) AS `ST_issimple(MultiPoint(Point(3, 6), Point(4, 10)))`,st_issimple(point(3,6)) AS `ST_issimple(Point(3, 6))`
+Note 1003 select st_issimple(multipoint(point(3,6),point(4,10))) AS `ST_issimple(MultiPoint(Point(3, 6), Point(4, 10)))`,st_issimple(point(3,6)) AS `ST_issimple(Point(3, 6))`
create table t1 (a geometry not null);
insert into t1 values (ST_GeomFromText('Point(1 2)'));
insert into t1 values ('Garbage');
@@ -1024,7 +1024,7 @@ f5 datetime YES NULL
drop view v1;
drop table t1;
SELECT MultiPoint(12345,'');
-ERROR HY000: Illegal parameter data type int for operation 'geometrycollection'
+ERROR HY000: Illegal parameter data type int for operation 'multipoint'
SELECT 1 FROM (SELECT GREATEST(1,GEOMETRYCOLLECTION('00000','00000')) b FROM DUAL) AS d WHERE (LINESTRING(d.b));
ERROR HY000: Illegal parameter data type varchar for operation 'geometrycollection'
#
diff --git a/mysql-test/suite/innodb_gis/r/point_basic.result b/mysql-test/suite/innodb_gis/r/point_basic.result
index 8322539475a..4842c72d99c 100644
--- a/mysql-test/suite/innodb_gis/r/point_basic.result
+++ b/mysql-test/suite/innodb_gis/r/point_basic.result
@@ -61,12 +61,20 @@ POINT(0 1) POINT(10 11)
POINT(1 1) POINT(10 12)
POINT(1 0) POINT(10 13)
POINT(0 0) POINT(10 14)
-SELECT name, mtype, prtype, len FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS WHERE name = 'p' OR name = 'g';
+SELECT c.name, c.mtype, c.prtype, c.len
+FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS c
+JOIN INFORMATION_SCHEMA.INNODB_SYS_TABLES t
+ON c.table_id = t.table_id
+WHERE t.name='test/t1' AND c.name IN ('p','g');
name mtype prtype len
p 14 1535 12
g 14 1535 12
ALTER TABLE t1 ADD COLUMN p1 POINT, ADD COLUMN p2 POINT, ADD KEY(p);
-SELECT name, mtype, prtype, len FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS WHERE name = 'p' OR name = 'g' OR name = 'p1' OR name = 'p2';
+SELECT c.name, c.mtype, c.prtype, c.len
+FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS c
+JOIN INFORMATION_SCHEMA.INNODB_SYS_TABLES t
+ON c.table_id = t.table_id
+WHERE t.name='test/t1' AND c.name IN ('p','g','p1','p2');
name mtype prtype len
p 14 1535 12
g 14 1535 12
@@ -86,7 +94,11 @@ ST_AsText(p) ST_AsText(p1)
ALTER TABLE t1 DROP COLUMN p2;
# NULLABLE POINT will use NULL
ALTER TABLE t1 ADD COLUMN p2 POINT, ADD KEY(p2);
-SELECT name, mtype, prtype, len FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS WHERE name = 'p' OR name = 'g' OR name = 'p1' OR name = 'p2';
+SELECT c.name, c.mtype, c.prtype, c.len
+FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS c
+JOIN INFORMATION_SCHEMA.INNODB_SYS_TABLES t
+ON c.table_id = t.table_id
+WHERE t.name='test/t1' AND c.name IN ('p','g','p1','p2');
name mtype prtype len
p 14 1535 12
g 14 1535 12
@@ -98,7 +110,11 @@ Expect 4
UPDATE t1 SET p2 = ST_PointFromText('POINT(10 20)');
UPDATE t1 SET p1 = ST_PointFromText('POINT(10 20)');
ALTER TABLE t1 DROP COLUMN p2;
-SELECT name, mtype, prtype, len FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS WHERE name = 'p' OR name = 'g' OR name = 'p1';
+SELECT c.name, c.mtype, c.prtype, c.len
+FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS c
+JOIN INFORMATION_SCHEMA.INNODB_SYS_TABLES t
+ON c.table_id = t.table_id
+WHERE t.name='test/t1' AND c.name IN ('p','g','p1','p2');
name mtype prtype len
p 14 1535 12
g 14 1535 12
@@ -123,7 +139,11 @@ POINT(10 20)
# Add spatial keys on the table
ALTER TABLE t1 ADD SPATIAL(p), ADD SPATIAL(p1);
ERROR 42000: All parts of a SPATIAL index must be NOT NULL
-SELECT name, mtype, prtype, len FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS WHERE name = 'p' OR name = 'g' OR name = 'p1';
+SELECT c.name, c.mtype, c.prtype, c.len
+FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS c
+JOIN INFORMATION_SCHEMA.INNODB_SYS_TABLES t
+ON c.table_id = t.table_id
+WHERE t.name='test/t1' AND c.name IN ('p','g','p1');
name mtype prtype len
p 14 1535 12
g 14 1535 12
@@ -148,7 +168,11 @@ POINT(0 0) POINT(10 20)
# Drop spatial keys on the table
ALTER TABLE t1 DROP KEY p, DROP KEY p1;
ERROR 42000: Can't DROP INDEX `p1`; check that it exists
-SELECT name, mtype, prtype, len FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS WHERE name = 'p' OR name = 'g' OR name = 'p1';
+SELECT c.name, c.mtype, c.prtype, c.len
+FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS c
+JOIN INFORMATION_SCHEMA.INNODB_SYS_TABLES t
+ON c.table_id = t.table_id
+WHERE t.name='test/t1' AND c.name IN ('p','g','p1');
name mtype prtype len
p 14 1535 12
g 14 1535 12
@@ -172,11 +196,19 @@ ST_AsText(p) ST_AsText(p1)
POINT(0 0) POINT(10 20)
TRUNCATE t1;
ALTER TABLE t1 DROP COLUMN p, DROP COLUMN p1;
-SELECT name, mtype, prtype, len FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS WHERE name = 'p' OR name = 'g' OR name = 'p1';
+SELECT c.name, c.mtype, c.prtype, c.len
+FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS c
+JOIN INFORMATION_SCHEMA.INNODB_SYS_TABLES t
+ON c.table_id = t.table_id
+WHERE t.name='test/t1' AND c.name IN ('p','g','p1');
name mtype prtype len
g 14 1535 12
ALTER TABLE t1 ADD COLUMN p POINT, ADD COLUMN p1 POINT;
-SELECT name, mtype, prtype, len FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS WHERE name = 'p' OR name = 'g' OR name = 'p1';
+SELECT c.name, c.mtype, c.prtype, c.len
+FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS c
+JOIN INFORMATION_SCHEMA.INNODB_SYS_TABLES t
+ON c.table_id = t.table_id
+WHERE t.name='test/t1' AND c.name IN ('p','g','p1');
name mtype prtype len
g 14 1535 12
p 14 1279 12
@@ -205,7 +237,11 @@ SELECT ST_AsText(p), ST_AsText(p1) FROM t1 WHERE MBRWithin(p, ST_GeomFromText('P
ST_AsText(p) ST_AsText(p1)
POINT(0 0) POINT(10 22)
ALTER TABLE t1 DROP COLUMN p1, ADD COLUMN p1 POINT, CHANGE COLUMN p pp POINT AFTER p1;
-SELECT name, mtype, prtype, len FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS WHERE name = 'pp' OR name = 'g' OR name = 'p1';
+SELECT c.name, c.mtype, c.prtype, c.len
+FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS c
+JOIN INFORMATION_SCHEMA.INNODB_SYS_TABLES t
+ON c.table_id = t.table_id
+WHERE t.name='test/t1' AND c.name IN ('pp','g','p1');
name mtype prtype len
g 14 1535 12
p1 14 1279 12
@@ -219,7 +255,11 @@ POINT(1 0) POINT(5 5)
POINT(0 0) POINT(5 5)
ALTER TABLE t1 ADD SPATIAL(p1), ADD SPATIAL(pp), ALGORITHM = COPY;
ERROR 42000: All parts of a SPATIAL index must be NOT NULL
-SELECT name, mtype, prtype, len FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS WHERE name = 'pp' OR name = 'g' OR name = 'p1';
+SELECT c.name, c.mtype, c.prtype, c.len
+FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS c
+JOIN INFORMATION_SCHEMA.INNODB_SYS_TABLES t
+ON c.table_id = t.table_id
+WHERE t.name='test/t1' AND c.name IN ('pp','g','p1');
name mtype prtype len
g 14 1535 12
p1 14 1279 12
@@ -323,7 +363,11 @@ SELECT table_name, column_name, data_type, column_type FROM INFORMATION_SCHEMA.C
table_name column_name data_type column_type
gis_point p point point
gis_point g point point
-SELECT name, mtype, prtype, len FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS WHERE name = 'p' OR name = 'g';
+SELECT c.name, c.mtype, c.prtype, c.len
+FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS c
+JOIN INFORMATION_SCHEMA.INNODB_SYS_TABLES t
+ON c.table_id = t.table_id
+WHERE t.name LIKE 'test/g%' AND c.name IN ('p','g');
name mtype prtype len
p 14 1279 12
g 14 1279 12
@@ -372,7 +416,11 @@ POINT(200 200)
CHECK TABLE gis_point;
Table Op Msg_type Msg_text
test.gis_point check status OK
-SELECT name, mtype, prtype, len FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS WHERE name = 'p' OR name = 'g';
+SELECT c.name, c.mtype, c.prtype, c.len
+FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS c
+JOIN INFORMATION_SCHEMA.INNODB_SYS_TABLES t
+ON c.table_id = t.table_id
+WHERE t.name='test/gis_point' AND c.name IN ('p','g');
name mtype prtype len
p 14 1279 12
g 14 1279 12
@@ -389,7 +437,11 @@ ml MULTILINESTRING NOT NULL,
mpoly MULTIPOLYGON NOT NULL,
gc GEOMETRYCOLLECTION NOT NULL
) ENGINE=InnoDB;
-SELECT name, mtype, prtype, len FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS WHERE name = 'p' OR name = 'g' OR name = 'geom' OR name = 'l' OR name = 'poly' OR name = 'mp' OR name = 'ml' OR name = 'mpoly' OR name = 'gc';
+SELECT c.name, c.mtype, c.prtype, c.len
+FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS c
+JOIN INFORMATION_SCHEMA.INNODB_SYS_TABLES t
+ON c.table_id = t.table_id
+WHERE t.name='test/g';
name mtype prtype len
geom 14 1535 12
l 14 1535 12
@@ -407,14 +459,18 @@ p POINT NOT NULL,
g GEOMETRY NOT NULL
) ENGINE=InnoDB;
INSERT INTO t1 VALUES(ST_PointFromText('POINT(10 10)'),ST_GeomFromText('POLYGON((30 30,40 40,50 50,30 50,30 40,30 30))'));
-SELECT name, mtype, prtype, len FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS WHERE name = 'p' OR name = 'g' AND name='t1';
-name mtype prtype len
-p 14 1535 12
-CREATE TABLE t2 AS SELECT * FROM t1;
-DROP TABLE t1;
-SELECT name, mtype, prtype, len FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS WHERE name = 'p' OR name = 'g' AND name='t2';
-name mtype prtype len
-DROP table t2;
+CREATE TABLE t2 ENGINE=InnoDB AS SELECT * FROM t1;
+SELECT t.name, c.name, c.mtype, c.prtype, c.len
+FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS c
+JOIN INFORMATION_SCHEMA.INNODB_SYS_TABLES t
+ON c.table_id = t.table_id
+WHERE t.name LIKE 'test/t%' AND c.name IN ('p','g');
+name name mtype prtype len
+test/t1 p 14 1535 12
+test/t1 g 14 1535 12
+test/t2 p 14 1535 12
+test/t2 g 14 1535 12
+DROP TABLE t1,t2;
#
# Test when POINT is used in spatial index
#
@@ -444,7 +500,11 @@ INSERT INTO gis_point VALUES
(ST_PointFromText('POINT(26.25 57)'), ST_PointFromText('POINT(1 2)')),
(ST_PointFromText('POINT(32.1234 64.2468)'), ST_PointFromText('POINT(-1 -1)'));
CREATE TABLE gis_point1 SELECT * FROM gis_point;
-SELECT name, mtype, prtype, len FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS WHERE name = 'p1' OR name = 'p2';
+SELECT c.name, c.mtype, c.prtype, c.len
+FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS c
+JOIN INFORMATION_SCHEMA.INNODB_SYS_TABLES t
+ON c.table_id = t.table_id
+WHERE t.name='test/gis_point' AND c.name IN ('p1','p2');
name mtype prtype len
p1 14 1535 12
p2 14 1535 12
@@ -1326,12 +1386,13 @@ INSERT INTO gis_point VALUES(0, ST_PointFromText('POINT(1 1)'));
INSERT INTO gis_point VALUES(1, ST_PointFromText('POINT(2 2)'));
INSERT INTO gis_point VALUES(2, NULL);
ALTER TABLE gis_point ADD COLUMN j INT, ALGORITHM = COPY;
-SELECT name, mtype, prtype, len FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS WHERE name = 'p';
-name mtype prtype len
-p 14 1279 12
-SELECT name, mtype, prtype, len FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS WHERE name = 'p';
-name mtype prtype len
-p 14 1279 12
+SELECT t.name, c.name, c.mtype, c.prtype, c.len
+FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS c
+JOIN INFORMATION_SCHEMA.INNODB_SYS_TABLES t
+ON c.table_id = t.table_id
+WHERE t.name='test/gis_point' AND c.name='p';
+name name mtype prtype len
+test/gis_point p 14 1279 12
SELECT i, ST_AsText(p) FROM gis_point;
i ST_AsText(p)
0 POINT(1 1)
@@ -1501,7 +1562,7 @@ ALTER TABLE child ADD FOREIGN KEY(p) REFERENCES parent(p);
ERROR HY000: Can't create table `test`.`child` (errno: 150 "Foreign key constraint is incorrectly formed")
show warnings;
Level Code Message
-Warning 150 Alter table `test`.`child` with foreign key constraint failed. There is no index in the referenced table where the referenced columns appear as the first columns near 'FOREIGN KEY(p) REFERENCES parent(p)'.
+Warning 150 Alter table `test`.`child` with foreign key (p) constraint failed. There is no index in the referenced table where the referenced columns appear as the first columns.
Error 1005 Can't create table `test`.`child` (errno: 150 "Foreign key constraint is incorrectly formed")
Warning 1215 Cannot add foreign key constraint for `child`
ALTER TABLE parent DROP INDEX idx1;
@@ -1509,7 +1570,7 @@ ALTER TABLE child ADD FOREIGN KEY(p) REFERENCES parent(p);
Got one of the listed errors
show warnings;
Level Code Message
-Warning 150 Alter table `test`.`child` with foreign key constraint failed. There is no index in the referenced table where the referenced columns appear as the first columns near 'FOREIGN KEY(p) REFERENCES parent(p)'.
+Warning 150 Alter table `test`.`child` with foreign key (p) constraint failed. There is no index in the referenced table where the referenced columns appear as the first columns.
Error 1005 Can't create table `test`.`child` (errno: 150 "Foreign key constraint is incorrectly formed")
Warning 1215 Cannot add foreign key constraint for `child`
ALTER TABLE child DROP INDEX idx2;
@@ -1517,7 +1578,7 @@ ALTER TABLE child ADD FOREIGN KEY(p) REFERENCES parent(p);
Got one of the listed errors
show warnings;
Level Code Message
-Warning 150 Alter table `test`.`child` with foreign key constraint failed. There is only prefix index in the referenced table where the referenced columns appear as the first columns near 'FOREIGN KEY(p) REFERENCES parent(p)'.
+Warning 150 Alter table `test`.`child` with foreign key (p) constraint failed. There is only prefix index in the referenced table where the referenced columns appear as the first columns.
Error 1005 Can't create table `test`.`child` (errno: 150 "Foreign key constraint is incorrectly formed")
Warning 1215 Cannot add foreign key constraint for `child`
DROP TABLE child, parent;
diff --git a/mysql-test/suite/innodb_gis/r/rtree_estimate.result b/mysql-test/suite/innodb_gis/r/rtree_estimate.result
index edb37778f54..dafcc40aba8 100644
--- a/mysql-test/suite/innodb_gis/r/rtree_estimate.result
+++ b/mysql-test/suite/innodb_gis/r/rtree_estimate.result
@@ -30,7 +30,7 @@ ST_AsText(g)
POINT(10 10)
EXPLAIN SELECT ST_AsText(g) FROM t1 WHERE MBRDisjoint(g, @g1);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL g NULL NULL NULL 3 Using where
+1 SIMPLE t1 range g g 34 NULL 2 Using where
SELECT ST_AsText(g) FROM t1 WHERE MBRWithin(g, @g1);
ST_AsText(g)
POINT(10 10)
@@ -75,14 +75,14 @@ POINT(10 10)
POLYGON((5 5,20 5,20 21,5 21,5 5))
EXPLAIN SELECT ST_AsText(g) FROM t1 WHERE MBRIntersects(g, @g2);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL g NULL NULL NULL 3 Using where
+1 SIMPLE t1 range g g 34 NULL 2 Using where
SELECT ST_AsText(g) FROM t1 WHERE MBRWithin(g, @g2);
ST_AsText(g)
POINT(10 10)
POLYGON((5 5,20 5,20 21,5 21,5 5))
EXPLAIN SELECT ST_AsText(g) FROM t1 WHERE MBRWithin(g, @g2);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL g NULL NULL NULL 3 Using where
+1 SIMPLE t1 range g g 34 NULL 2 Using where
SELECT ST_AsText(g) FROM t1 WHERE MBRWithin(g, @g2);
ST_AsText(g)
POINT(10 10)
diff --git a/mysql-test/suite/innodb_gis/t/point_basic.test b/mysql-test/suite/innodb_gis/t/point_basic.test
index 4ac90b93d4c..3ab1ab5c902 100644
--- a/mysql-test/suite/innodb_gis/t/point_basic.test
+++ b/mysql-test/suite/innodb_gis/t/point_basic.test
@@ -58,10 +58,18 @@ INSERT INTO t1 VALUES(ST_PointFromText('POINT(0 0)'), ST_PointFromText('POINT(10
SELECT ST_AsText(p), ST_AsText(g) FROM t1;
-SELECT name, mtype, prtype, len FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS WHERE name = 'p' OR name = 'g';
+SELECT c.name, c.mtype, c.prtype, c.len
+FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS c
+JOIN INFORMATION_SCHEMA.INNODB_SYS_TABLES t
+ON c.table_id = t.table_id
+WHERE t.name='test/t1' AND c.name IN ('p','g');
ALTER TABLE t1 ADD COLUMN p1 POINT, ADD COLUMN p2 POINT, ADD KEY(p);
-SELECT name, mtype, prtype, len FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS WHERE name = 'p' OR name = 'g' OR name = 'p1' OR name = 'p2';
+SELECT c.name, c.mtype, c.prtype, c.len
+FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS c
+JOIN INFORMATION_SCHEMA.INNODB_SYS_TABLES t
+ON c.table_id = t.table_id
+WHERE t.name='test/t1' AND c.name IN ('p','g','p1','p2');
--echo # NOT NULL POINT will use ''
SELECT count(*) AS `Expect 4` FROM t1 WHERE p1 = '';
@@ -74,14 +82,22 @@ ALTER TABLE t1 DROP COLUMN p2;
--echo # NULLABLE POINT will use NULL
ALTER TABLE t1 ADD COLUMN p2 POINT, ADD KEY(p2);
-SELECT name, mtype, prtype, len FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS WHERE name = 'p' OR name = 'g' OR name = 'p1' OR name = 'p2';
+SELECT c.name, c.mtype, c.prtype, c.len
+FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS c
+JOIN INFORMATION_SCHEMA.INNODB_SYS_TABLES t
+ON c.table_id = t.table_id
+WHERE t.name='test/t1' AND c.name IN ('p','g','p1','p2');
SELECT count(*) AS `Expect 4` FROM t1 WHERE p2 IS NULL;
UPDATE t1 SET p2 = ST_PointFromText('POINT(10 20)');
UPDATE t1 SET p1 = ST_PointFromText('POINT(10 20)');
ALTER TABLE t1 DROP COLUMN p2;
-SELECT name, mtype, prtype, len FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS WHERE name = 'p' OR name = 'g' OR name = 'p1';
+SELECT c.name, c.mtype, c.prtype, c.len
+FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS c
+JOIN INFORMATION_SCHEMA.INNODB_SYS_TABLES t
+ON c.table_id = t.table_id
+WHERE t.name='test/t1' AND c.name IN ('p','g','p1','p2');
SELECT ST_AsText(p), ST_AsText(p1) FROM t1 WHERE p = p1;
@@ -93,7 +109,11 @@ SELECT ST_AsText(p1) FROM t1;
--echo # Add spatial keys on the table
--error ER_SPATIAL_CANT_HAVE_NULL
ALTER TABLE t1 ADD SPATIAL(p), ADD SPATIAL(p1);
-SELECT name, mtype, prtype, len FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS WHERE name = 'p' OR name = 'g' OR name = 'p1';
+SELECT c.name, c.mtype, c.prtype, c.len
+FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS c
+JOIN INFORMATION_SCHEMA.INNODB_SYS_TABLES t
+ON c.table_id = t.table_id
+WHERE t.name='test/t1' AND c.name IN ('p','g','p1');
SELECT ST_AsText(p), ST_AsText(p1) FROM t1 WHERE p1 = ST_PointFromText('POINT(10 30)');
SELECT ST_AsText(p), ST_AsText(p1) FROM t1 WHERE p1 = ST_PointFromText('POINT(10 20)');
@@ -104,7 +124,11 @@ SELECT ST_AsText(p), ST_AsText(p1) FROM t1 WHERE MBRWithin(p, ST_GeomFromText('P
--echo # Drop spatial keys on the table
--error ER_CANT_DROP_FIELD_OR_KEY
ALTER TABLE t1 DROP KEY p, DROP KEY p1;
-SELECT name, mtype, prtype, len FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS WHERE name = 'p' OR name = 'g' OR name = 'p1';
+SELECT c.name, c.mtype, c.prtype, c.len
+FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS c
+JOIN INFORMATION_SCHEMA.INNODB_SYS_TABLES t
+ON c.table_id = t.table_id
+WHERE t.name='test/t1' AND c.name IN ('p','g','p1');
SELECT ST_AsText(p), ST_AsText(p1) FROM t1 WHERE p1 = ST_PointFromText('POINT(10 30)');
SELECT ST_AsText(p), ST_AsText(p1) FROM t1 WHERE p1 = ST_PointFromText('POINT(10 20)');
@@ -115,10 +139,18 @@ SELECT ST_AsText(p), ST_AsText(p1) FROM t1 WHERE MBRWithin(p, ST_GeomFromText('P
TRUNCATE t1;
ALTER TABLE t1 DROP COLUMN p, DROP COLUMN p1;
-SELECT name, mtype, prtype, len FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS WHERE name = 'p' OR name = 'g' OR name = 'p1';
+SELECT c.name, c.mtype, c.prtype, c.len
+FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS c
+JOIN INFORMATION_SCHEMA.INNODB_SYS_TABLES t
+ON c.table_id = t.table_id
+WHERE t.name='test/t1' AND c.name IN ('p','g','p1');
ALTER TABLE t1 ADD COLUMN p POINT, ADD COLUMN p1 POINT;
-SELECT name, mtype, prtype, len FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS WHERE name = 'p' OR name = 'g' OR name = 'p1';
+SELECT c.name, c.mtype, c.prtype, c.len
+FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS c
+JOIN INFORMATION_SCHEMA.INNODB_SYS_TABLES t
+ON c.table_id = t.table_id
+WHERE t.name='test/t1' AND c.name IN ('p','g','p1');
SHOW CREATE TABLE t1;
@@ -134,7 +166,11 @@ SELECT ST_AsText(p), ST_AsText(p1) FROM t1 WHERE MBRWithin(p1, ST_GeomFromText('
SELECT ST_AsText(p), ST_AsText(p1) FROM t1 WHERE MBRWithin(p, ST_GeomFromText('POLYGON((-1 0.5, -1 -0.5, 1 -0.5, 1 0.5, -1 0.5))'));
ALTER TABLE t1 DROP COLUMN p1, ADD COLUMN p1 POINT, CHANGE COLUMN p pp POINT AFTER p1;
-SELECT name, mtype, prtype, len FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS WHERE name = 'pp' OR name = 'g' OR name = 'p1';
+SELECT c.name, c.mtype, c.prtype, c.len
+FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS c
+JOIN INFORMATION_SCHEMA.INNODB_SYS_TABLES t
+ON c.table_id = t.table_id
+WHERE t.name='test/t1' AND c.name IN ('pp','g','p1');
UPDATE t1 SET p1 = ST_PointFromText('POINT(5 5)');
@@ -142,7 +178,11 @@ SELECT ST_AsText(pp), ST_AsText(p1) FROM t1;
--error ER_SPATIAL_CANT_HAVE_NULL
ALTER TABLE t1 ADD SPATIAL(p1), ADD SPATIAL(pp), ALGORITHM = COPY;
-SELECT name, mtype, prtype, len FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS WHERE name = 'pp' OR name = 'g' OR name = 'p1';
+SELECT c.name, c.mtype, c.prtype, c.len
+FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS c
+JOIN INFORMATION_SCHEMA.INNODB_SYS_TABLES t
+ON c.table_id = t.table_id
+WHERE t.name='test/t1' AND c.name IN ('pp','g','p1');
SELECT ST_AsText(pp), ST_AsText(p1) FROM t1 WHERE p1 = ST_PointFromText('POINT(10 30)');
SELECT ST_AsText(pp), ST_AsText(p1) FROM t1 WHERE p1 = ST_PointFromText('POINT(10 20)');
@@ -206,7 +246,11 @@ SELECT ST_AsText(g) FROM gis_point WHERE g IS NULL OR g = ST_PointFromText('POIN
--echo # Check the information schema tables
SELECT table_name, column_name, data_type, column_type FROM INFORMATION_SCHEMA.COLUMNS WHERE table_name='gis_point' AND (column_name = 'p' OR column_name = 'g');
-SELECT name, mtype, prtype, len FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS WHERE name = 'p' OR name = 'g';
+SELECT c.name, c.mtype, c.prtype, c.len
+FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS c
+JOIN INFORMATION_SCHEMA.INNODB_SYS_TABLES t
+ON c.table_id = t.table_id
+WHERE t.name LIKE 'test/g%' AND c.name IN ('p','g');
SELECT length(p) FROM gis_point;
@@ -235,11 +279,14 @@ SELECT ST_AsText(g) FROM gis_point WHERE g IS NULL OR g = ST_PointFromText('POIN
CHECK TABLE gis_point;
-SELECT name, mtype, prtype, len FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS WHERE name = 'p' OR name = 'g';
+SELECT c.name, c.mtype, c.prtype, c.len
+FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS c
+JOIN INFORMATION_SCHEMA.INNODB_SYS_TABLES t
+ON c.table_id = t.table_id
+WHERE t.name='test/gis_point' AND c.name IN ('p','g');
DROP TABLE gis_point;
-
--echo #
--echo # Check the mtype of other geometry data types should be 15
--echo #
@@ -252,7 +299,11 @@ CREATE TABLE g (
mpoly MULTIPOLYGON NOT NULL,
gc GEOMETRYCOLLECTION NOT NULL
) ENGINE=InnoDB;
-SELECT name, mtype, prtype, len FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS WHERE name = 'p' OR name = 'g' OR name = 'geom' OR name = 'l' OR name = 'poly' OR name = 'mp' OR name = 'ml' OR name = 'mpoly' OR name = 'gc';
+SELECT c.name, c.mtype, c.prtype, c.len
+FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS c
+JOIN INFORMATION_SCHEMA.INNODB_SYS_TABLES t
+ON c.table_id = t.table_id
+WHERE t.name='test/g';
DROP TABLE g;
@@ -268,20 +319,17 @@ CREATE TABLE t1 (
INSERT INTO t1 VALUES(ST_PointFromText('POINT(10 10)'),ST_GeomFromText('POLYGON((30 30,40 40,50 50,30 50,30 40,30 30))'));
-# Check the mtype and len of the table
-SELECT name, mtype, prtype, len FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS WHERE name = 'p' OR name = 'g' AND name='t1';
-
-CREATE TABLE t2 AS SELECT * FROM t1;
-
-# Cleanup
-DROP TABLE t1;
+CREATE TABLE t2 ENGINE=InnoDB AS SELECT * FROM t1;
-# Check the mtype and len of the table, should be 14,25
-SELECT name, mtype, prtype, len FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS WHERE name = 'p' OR name = 'g' AND name='t2';
+# Check the mtype and len of the table
+SELECT t.name, c.name, c.mtype, c.prtype, c.len
+FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS c
+JOIN INFORMATION_SCHEMA.INNODB_SYS_TABLES t
+ON c.table_id = t.table_id
+WHERE t.name LIKE 'test/t%' AND c.name IN ('p','g');
# Cleanup
-DROP table t2;
-
+DROP TABLE t1,t2;
--echo #
--echo # Test when POINT is used in spatial index
@@ -316,7 +364,12 @@ INSERT INTO gis_point VALUES
CREATE TABLE gis_point1 SELECT * FROM gis_point;
-SELECT name, mtype, prtype, len FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS WHERE name = 'p1' OR name = 'p2';
+# Check the mtype and len of the table, should be 14,25
+SELECT c.name, c.mtype, c.prtype, c.len
+FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS c
+JOIN INFORMATION_SCHEMA.INNODB_SYS_TABLES t
+ON c.table_id = t.table_id
+WHERE t.name='test/gis_point' AND c.name IN ('p1','p2');
SELECT ST_AsText(p1), ST_AsText(p2) FROM gis_point1;
SELECT ST_AsText(p1) FROM gis_point1 WHERE ST_Intersection(@ls1, @ls2) = p1;
@@ -640,9 +693,11 @@ INSERT INTO gis_point VALUES(2, NULL);
ALTER TABLE gis_point ADD COLUMN j INT, ALGORITHM = COPY;
-SELECT name, mtype, prtype, len FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS WHERE name = 'p';
-
-SELECT name, mtype, prtype, len FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS WHERE name = 'p';
+SELECT t.name, c.name, c.mtype, c.prtype, c.len
+FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS c
+JOIN INFORMATION_SCHEMA.INNODB_SYS_TABLES t
+ON c.table_id = t.table_id
+WHERE t.name='test/gis_point' AND c.name='p';
SELECT i, ST_AsText(p) FROM gis_point;
diff --git a/mysql-test/suite/innodb_i_s/innodb_buffer_page.result b/mysql-test/suite/innodb_i_s/innodb_buffer_page.result
new file mode 100644
index 00000000000..9d4c43b1a8f
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_buffer_page.result
@@ -0,0 +1,28 @@
+SHOW CREATE TABLE INFORMATION_SCHEMA.INNODB_BUFFER_PAGE;
+Table Create Table
+INNODB_BUFFER_PAGE CREATE TEMPORARY TABLE `INNODB_BUFFER_PAGE` (
+ `POOL_ID` int(11) unsigned NOT NULL DEFAULT 0,
+ `BLOCK_ID` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `SPACE` int(11) unsigned NOT NULL DEFAULT 0,
+ `PAGE_NUMBER` int(11) unsigned NOT NULL DEFAULT 0,
+ `PAGE_TYPE` varchar(64) DEFAULT NULL,
+ `FLUSH_TYPE` int(11) unsigned NOT NULL DEFAULT 0,
+ `FIX_COUNT` int(11) unsigned NOT NULL DEFAULT 0,
+ `IS_HASHED` int(1) NOT NULL DEFAULT 0,
+ `NEWEST_MODIFICATION` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `OLDEST_MODIFICATION` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `ACCESS_TIME` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `TABLE_NAME` varchar(1024) DEFAULT NULL,
+ `INDEX_NAME` varchar(64) DEFAULT NULL,
+ `NUMBER_RECORDS` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `DATA_SIZE` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `COMPRESSED_SIZE` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `PAGE_STATE` enum('NOT_USED','MEMORY','REMOVE_HASH','FILE_PAGE') NOT NULL,
+ `IO_FIX` enum('IO_NONE','IO_READ','IO_WRITE','IO_PIN') NOT NULL,
+ `IS_OLD` int(1) NOT NULL DEFAULT 0,
+ `FREE_PAGE_CLOCK` bigint(21) unsigned NOT NULL DEFAULT 0
+) ENGINE=MEMORY DEFAULT CHARSET=utf8
+CREATE TEMPORARY TABLE t1 LIKE INFORMATION_SCHEMA.INNODB_BUFFER_PAGE;
+DROP TEMPORARY TABLE t1;
+CREATE TEMPORARY TABLE t1 AS SELECT * FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE LIMIT 0;
+DROP TEMPORARY TABLE t1;
diff --git a/mysql-test/suite/innodb_i_s/innodb_buffer_page.test b/mysql-test/suite/innodb_i_s/innodb_buffer_page.test
new file mode 100644
index 00000000000..089cead2c4e
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_buffer_page.test
@@ -0,0 +1,9 @@
+--source include/have_innodb.inc
+
+SHOW CREATE TABLE INFORMATION_SCHEMA.INNODB_BUFFER_PAGE;
+
+CREATE TEMPORARY TABLE t1 LIKE INFORMATION_SCHEMA.INNODB_BUFFER_PAGE;
+DROP TEMPORARY TABLE t1;
+
+CREATE TEMPORARY TABLE t1 AS SELECT * FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE LIMIT 0;
+DROP TEMPORARY TABLE t1;
diff --git a/mysql-test/suite/innodb_i_s/innodb_buffer_page_lru.result b/mysql-test/suite/innodb_i_s/innodb_buffer_page_lru.result
new file mode 100644
index 00000000000..42d33fdbeac
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_buffer_page_lru.result
@@ -0,0 +1,28 @@
+SHOW CREATE TABLE INFORMATION_SCHEMA.INNODB_BUFFER_PAGE_LRU;
+Table Create Table
+INNODB_BUFFER_PAGE_LRU CREATE TEMPORARY TABLE `INNODB_BUFFER_PAGE_LRU` (
+ `POOL_ID` int(11) unsigned NOT NULL DEFAULT 0,
+ `LRU_POSITION` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `SPACE` int(11) unsigned NOT NULL DEFAULT 0,
+ `PAGE_NUMBER` int(11) unsigned NOT NULL DEFAULT 0,
+ `PAGE_TYPE` varchar(64) DEFAULT NULL,
+ `FLUSH_TYPE` int(11) unsigned NOT NULL DEFAULT 0,
+ `FIX_COUNT` int(11) unsigned NOT NULL DEFAULT 0,
+ `IS_HASHED` int(1) NOT NULL DEFAULT 0,
+ `NEWEST_MODIFICATION` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `OLDEST_MODIFICATION` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `ACCESS_TIME` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `TABLE_NAME` varchar(1024) DEFAULT NULL,
+ `INDEX_NAME` varchar(64) DEFAULT NULL,
+ `NUMBER_RECORDS` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `DATA_SIZE` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `COMPRESSED_SIZE` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `COMPRESSED` int(1) NOT NULL DEFAULT 0,
+ `IO_FIX` enum('IO_NONE','IO_READ','IO_WRITE','IO_PIN') NOT NULL,
+ `IS_OLD` int(1) DEFAULT NULL,
+ `FREE_PAGE_CLOCK` bigint(21) unsigned NOT NULL DEFAULT 0
+) ENGINE=MEMORY DEFAULT CHARSET=utf8
+CREATE TEMPORARY TABLE t1 LIKE INFORMATION_SCHEMA.INNODB_BUFFER_PAGE_LRU;
+DROP TEMPORARY TABLE t1;
+CREATE TEMPORARY TABLE t1 AS SELECT * FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE_LRU LIMIT 0;
+DROP TEMPORARY TABLE t1;
diff --git a/mysql-test/suite/innodb_i_s/innodb_buffer_page_lru.test b/mysql-test/suite/innodb_i_s/innodb_buffer_page_lru.test
new file mode 100644
index 00000000000..b969745f144
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_buffer_page_lru.test
@@ -0,0 +1,9 @@
+--source include/have_innodb.inc
+
+SHOW CREATE TABLE INFORMATION_SCHEMA.INNODB_BUFFER_PAGE_LRU;
+
+CREATE TEMPORARY TABLE t1 LIKE INFORMATION_SCHEMA.INNODB_BUFFER_PAGE_LRU;
+DROP TEMPORARY TABLE t1;
+
+CREATE TEMPORARY TABLE t1 AS SELECT * FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE_LRU LIMIT 0;
+DROP TEMPORARY TABLE t1;
diff --git a/mysql-test/suite/innodb_i_s/innodb_buffer_pool_stats.result b/mysql-test/suite/innodb_i_s/innodb_buffer_pool_stats.result
new file mode 100644
index 00000000000..be5c31a6b57
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_buffer_pool_stats.result
@@ -0,0 +1,36 @@
+SHOW CREATE TABLE INFORMATION_SCHEMA.INNODB_BUFFER_POOL_STATS;
+Table Create Table
+INNODB_BUFFER_POOL_STATS CREATE TEMPORARY TABLE `INNODB_BUFFER_POOL_STATS` (
+ `POOL_ID` int(11) unsigned NOT NULL DEFAULT 0,
+ `POOL_SIZE` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `FREE_BUFFERS` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `DATABASE_PAGES` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `OLD_DATABASE_PAGES` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `MODIFIED_DATABASE_PAGES` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `PENDING_DECOMPRESS` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `PENDING_READS` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `PENDING_FLUSH_LRU` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `PENDING_FLUSH_LIST` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `PAGES_MADE_YOUNG` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `PAGES_NOT_MADE_YOUNG` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `PAGES_MADE_YOUNG_RATE` float NOT NULL DEFAULT 0,
+ `PAGES_MADE_NOT_YOUNG_RATE` float NOT NULL DEFAULT 0,
+ `NUMBER_PAGES_READ` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `NUMBER_PAGES_CREATED` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `NUMBER_PAGES_WRITTEN` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `PAGES_READ_RATE` float NOT NULL DEFAULT 0,
+ `PAGES_CREATE_RATE` float NOT NULL DEFAULT 0,
+ `PAGES_WRITTEN_RATE` float NOT NULL DEFAULT 0,
+ `NUMBER_PAGES_GET` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `HIT_RATE` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `YOUNG_MAKE_PER_THOUSAND_GETS` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `NOT_YOUNG_MAKE_PER_THOUSAND_GETS` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `NUMBER_PAGES_READ_AHEAD` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `NUMBER_READ_AHEAD_EVICTED` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `READ_AHEAD_RATE` float NOT NULL DEFAULT 0,
+ `READ_AHEAD_EVICTED_RATE` float NOT NULL DEFAULT 0,
+ `LRU_IO_TOTAL` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `LRU_IO_CURRENT` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `UNCOMPRESS_TOTAL` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `UNCOMPRESS_CURRENT` bigint(21) unsigned NOT NULL DEFAULT 0
+) ENGINE=MEMORY DEFAULT CHARSET=utf8
diff --git a/mysql-test/suite/innodb_i_s/innodb_buffer_pool_stats.test b/mysql-test/suite/innodb_i_s/innodb_buffer_pool_stats.test
new file mode 100644
index 00000000000..4dd396ef9fc
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_buffer_pool_stats.test
@@ -0,0 +1,3 @@
+--source include/have_innodb.inc
+
+SHOW CREATE TABLE INFORMATION_SCHEMA.INNODB_BUFFER_POOL_STATS;
diff --git a/mysql-test/suite/innodb_i_s/innodb_cmp.opt b/mysql-test/suite/innodb_i_s/innodb_cmp.opt
new file mode 100644
index 00000000000..4f9fa4186cc
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_cmp.opt
@@ -0,0 +1 @@
+--innodb_cmp
diff --git a/mysql-test/suite/innodb_i_s/innodb_cmp.result b/mysql-test/suite/innodb_i_s/innodb_cmp.result
new file mode 100644
index 00000000000..47a92e42e59
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_cmp.result
@@ -0,0 +1,10 @@
+SHOW CREATE TABLE INFORMATION_SCHEMA.INNODB_CMP;
+Table Create Table
+INNODB_CMP CREATE TEMPORARY TABLE `INNODB_CMP` (
+ `page_size` int(5) NOT NULL DEFAULT 0,
+ `compress_ops` int(11) NOT NULL DEFAULT 0,
+ `compress_ops_ok` int(11) NOT NULL DEFAULT 0,
+ `compress_time` int(11) NOT NULL DEFAULT 0,
+ `uncompress_ops` int(11) NOT NULL DEFAULT 0,
+ `uncompress_time` int(11) NOT NULL DEFAULT 0
+) ENGINE=MEMORY DEFAULT CHARSET=utf8
diff --git a/mysql-test/suite/innodb_i_s/innodb_cmp.test b/mysql-test/suite/innodb_i_s/innodb_cmp.test
new file mode 100644
index 00000000000..a7ddff3ee85
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_cmp.test
@@ -0,0 +1,3 @@
+--source include/have_innodb.inc
+
+SHOW CREATE TABLE INFORMATION_SCHEMA.INNODB_CMP;
diff --git a/mysql-test/suite/innodb_i_s/innodb_cmp_per_index.result b/mysql-test/suite/innodb_i_s/innodb_cmp_per_index.result
new file mode 100644
index 00000000000..bcde9a2e9dd
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_cmp_per_index.result
@@ -0,0 +1,12 @@
+SHOW CREATE TABLE INFORMATION_SCHEMA.INNODB_CMP_PER_INDEX;
+Table Create Table
+INNODB_CMP_PER_INDEX CREATE TEMPORARY TABLE `INNODB_CMP_PER_INDEX` (
+ `database_name` varchar(64) NOT NULL DEFAULT '',
+ `table_name` varchar(64) NOT NULL DEFAULT '',
+ `index_name` varchar(64) NOT NULL DEFAULT '',
+ `compress_ops` int(11) NOT NULL DEFAULT 0,
+ `compress_ops_ok` int(11) NOT NULL DEFAULT 0,
+ `compress_time` int(11) NOT NULL DEFAULT 0,
+ `uncompress_ops` int(11) NOT NULL DEFAULT 0,
+ `uncompress_time` int(11) NOT NULL DEFAULT 0
+) ENGINE=MEMORY DEFAULT CHARSET=utf8
diff --git a/mysql-test/suite/innodb_i_s/innodb_cmp_per_index.test b/mysql-test/suite/innodb_i_s/innodb_cmp_per_index.test
new file mode 100644
index 00000000000..9e91e8dd934
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_cmp_per_index.test
@@ -0,0 +1,3 @@
+--source include/have_innodb.inc
+
+SHOW CREATE TABLE INFORMATION_SCHEMA.INNODB_CMP_PER_INDEX;
diff --git a/mysql-test/suite/innodb_i_s/innodb_cmp_per_index_reset.opt b/mysql-test/suite/innodb_i_s/innodb_cmp_per_index_reset.opt
new file mode 100644
index 00000000000..37aab727b87
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_cmp_per_index_reset.opt
@@ -0,0 +1 @@
+--innodb_cmp_per_index_reset
diff --git a/mysql-test/suite/innodb_i_s/innodb_cmp_per_index_reset.result b/mysql-test/suite/innodb_i_s/innodb_cmp_per_index_reset.result
new file mode 100644
index 00000000000..97ba44ec641
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_cmp_per_index_reset.result
@@ -0,0 +1,12 @@
+SHOW CREATE TABLE INFORMATION_SCHEMA.INNODB_CMP_PER_INDEX_RESET;
+Table Create Table
+INNODB_CMP_PER_INDEX_RESET CREATE TEMPORARY TABLE `INNODB_CMP_PER_INDEX_RESET` (
+ `database_name` varchar(64) NOT NULL DEFAULT '',
+ `table_name` varchar(64) NOT NULL DEFAULT '',
+ `index_name` varchar(64) NOT NULL DEFAULT '',
+ `compress_ops` int(11) NOT NULL DEFAULT 0,
+ `compress_ops_ok` int(11) NOT NULL DEFAULT 0,
+ `compress_time` int(11) NOT NULL DEFAULT 0,
+ `uncompress_ops` int(11) NOT NULL DEFAULT 0,
+ `uncompress_time` int(11) NOT NULL DEFAULT 0
+) ENGINE=MEMORY DEFAULT CHARSET=utf8
diff --git a/mysql-test/suite/innodb_i_s/innodb_cmp_per_index_reset.test b/mysql-test/suite/innodb_i_s/innodb_cmp_per_index_reset.test
new file mode 100644
index 00000000000..05220afe596
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_cmp_per_index_reset.test
@@ -0,0 +1,3 @@
+--source include/have_innodb.inc
+
+SHOW CREATE TABLE INFORMATION_SCHEMA.INNODB_CMP_PER_INDEX_RESET;
diff --git a/mysql-test/suite/innodb_i_s/innodb_cmp_reset.opt b/mysql-test/suite/innodb_i_s/innodb_cmp_reset.opt
new file mode 100644
index 00000000000..01508468386
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_cmp_reset.opt
@@ -0,0 +1 @@
+--innodb_cmp_reset
diff --git a/mysql-test/suite/innodb_i_s/innodb_cmp_reset.result b/mysql-test/suite/innodb_i_s/innodb_cmp_reset.result
new file mode 100644
index 00000000000..3d247f2cbc1
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_cmp_reset.result
@@ -0,0 +1,10 @@
+SHOW CREATE TABLE INFORMATION_SCHEMA.INNODB_CMP_RESET;
+Table Create Table
+INNODB_CMP_RESET CREATE TEMPORARY TABLE `INNODB_CMP_RESET` (
+ `page_size` int(5) NOT NULL DEFAULT 0,
+ `compress_ops` int(11) NOT NULL DEFAULT 0,
+ `compress_ops_ok` int(11) NOT NULL DEFAULT 0,
+ `compress_time` int(11) NOT NULL DEFAULT 0,
+ `uncompress_ops` int(11) NOT NULL DEFAULT 0,
+ `uncompress_time` int(11) NOT NULL DEFAULT 0
+) ENGINE=MEMORY DEFAULT CHARSET=utf8
diff --git a/mysql-test/suite/innodb_i_s/innodb_cmp_reset.test b/mysql-test/suite/innodb_i_s/innodb_cmp_reset.test
new file mode 100644
index 00000000000..fe0d7196617
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_cmp_reset.test
@@ -0,0 +1,3 @@
+--source include/have_innodb.inc
+
+SHOW CREATE TABLE INFORMATION_SCHEMA.INNODB_CMP_RESET;
diff --git a/mysql-test/suite/innodb_i_s/innodb_cmpmem.result b/mysql-test/suite/innodb_i_s/innodb_cmpmem.result
new file mode 100644
index 00000000000..e1dd5d0a314
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_cmpmem.result
@@ -0,0 +1,10 @@
+SHOW CREATE TABLE INFORMATION_SCHEMA.INNODB_CMPMEM;
+Table Create Table
+INNODB_CMPMEM CREATE TEMPORARY TABLE `INNODB_CMPMEM` (
+ `page_size` int(5) NOT NULL DEFAULT 0,
+ `buffer_pool_instance` int(11) NOT NULL DEFAULT 0,
+ `pages_used` int(11) NOT NULL DEFAULT 0,
+ `pages_free` int(11) NOT NULL DEFAULT 0,
+ `relocation_ops` bigint(21) NOT NULL DEFAULT 0,
+ `relocation_time` int(11) NOT NULL DEFAULT 0
+) ENGINE=MEMORY DEFAULT CHARSET=utf8
diff --git a/mysql-test/suite/innodb_i_s/innodb_cmpmem.test b/mysql-test/suite/innodb_i_s/innodb_cmpmem.test
new file mode 100644
index 00000000000..6b5ddf9b93a
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_cmpmem.test
@@ -0,0 +1,3 @@
+--source include/have_innodb.inc
+
+SHOW CREATE TABLE INFORMATION_SCHEMA.INNODB_CMPMEM;
diff --git a/mysql-test/suite/innodb_i_s/innodb_cmpmem_reset.opt b/mysql-test/suite/innodb_i_s/innodb_cmpmem_reset.opt
new file mode 100644
index 00000000000..de3b60d9218
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_cmpmem_reset.opt
@@ -0,0 +1 @@
+--innodb_cmpmem_reset
diff --git a/mysql-test/suite/innodb_i_s/innodb_cmpmem_reset.result b/mysql-test/suite/innodb_i_s/innodb_cmpmem_reset.result
new file mode 100644
index 00000000000..178cd244f9a
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_cmpmem_reset.result
@@ -0,0 +1,10 @@
+SHOW CREATE TABLE INFORMATION_SCHEMA.INNODB_CMPMEM_RESET;
+Table Create Table
+INNODB_CMPMEM_RESET CREATE TEMPORARY TABLE `INNODB_CMPMEM_RESET` (
+ `page_size` int(5) NOT NULL DEFAULT 0,
+ `buffer_pool_instance` int(11) NOT NULL DEFAULT 0,
+ `pages_used` int(11) NOT NULL DEFAULT 0,
+ `pages_free` int(11) NOT NULL DEFAULT 0,
+ `relocation_ops` bigint(21) NOT NULL DEFAULT 0,
+ `relocation_time` int(11) NOT NULL DEFAULT 0
+) ENGINE=MEMORY DEFAULT CHARSET=utf8
diff --git a/mysql-test/suite/innodb_i_s/innodb_cmpmem_reset.test b/mysql-test/suite/innodb_i_s/innodb_cmpmem_reset.test
new file mode 100644
index 00000000000..9ea5bdf51fa
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_cmpmem_reset.test
@@ -0,0 +1,3 @@
+--source include/have_innodb.inc
+
+SHOW CREATE TABLE INFORMATION_SCHEMA.INNODB_CMPMEM_RESET;
diff --git a/mysql-test/suite/innodb_i_s/innodb_ft_being_deleted.opt b/mysql-test/suite/innodb_i_s/innodb_ft_being_deleted.opt
new file mode 100644
index 00000000000..9665b7c5772
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_ft_being_deleted.opt
@@ -0,0 +1 @@
+--innodb_ft_being_deleted
diff --git a/mysql-test/suite/innodb_i_s/innodb_ft_being_deleted.result b/mysql-test/suite/innodb_i_s/innodb_ft_being_deleted.result
new file mode 100644
index 00000000000..920ec782ac5
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_ft_being_deleted.result
@@ -0,0 +1,5 @@
+SHOW CREATE TABLE INFORMATION_SCHEMA.INNODB_FT_BEING_DELETED;
+Table Create Table
+INNODB_FT_BEING_DELETED CREATE TEMPORARY TABLE `INNODB_FT_BEING_DELETED` (
+ `DOC_ID` bigint(21) unsigned NOT NULL DEFAULT 0
+) ENGINE=MEMORY DEFAULT CHARSET=utf8
diff --git a/mysql-test/suite/innodb_i_s/innodb_ft_being_deleted.test b/mysql-test/suite/innodb_i_s/innodb_ft_being_deleted.test
new file mode 100644
index 00000000000..cfe2836f224
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_ft_being_deleted.test
@@ -0,0 +1,3 @@
+--source include/have_innodb.inc
+
+SHOW CREATE TABLE INFORMATION_SCHEMA.INNODB_FT_BEING_DELETED;
diff --git a/mysql-test/suite/innodb_i_s/innodb_ft_config.opt b/mysql-test/suite/innodb_i_s/innodb_ft_config.opt
new file mode 100644
index 00000000000..9e0e66f6620
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_ft_config.opt
@@ -0,0 +1 @@
+--innodb_ft_config
diff --git a/mysql-test/suite/innodb_i_s/innodb_ft_config.result b/mysql-test/suite/innodb_i_s/innodb_ft_config.result
new file mode 100644
index 00000000000..dcb11b1805c
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_ft_config.result
@@ -0,0 +1,6 @@
+SHOW CREATE TABLE INFORMATION_SCHEMA.INNODB_FT_CONFIG;
+Table Create Table
+INNODB_FT_CONFIG CREATE TEMPORARY TABLE `INNODB_FT_CONFIG` (
+ `KEY` varchar(193) NOT NULL DEFAULT '',
+ `VALUE` varchar(193) NOT NULL DEFAULT ''
+) ENGINE=MEMORY DEFAULT CHARSET=utf8
diff --git a/mysql-test/suite/innodb_i_s/innodb_ft_config.test b/mysql-test/suite/innodb_i_s/innodb_ft_config.test
new file mode 100644
index 00000000000..9d844250764
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_ft_config.test
@@ -0,0 +1,3 @@
+--source include/have_innodb.inc
+
+SHOW CREATE TABLE INFORMATION_SCHEMA.INNODB_FT_CONFIG;
diff --git a/mysql-test/suite/innodb_i_s/innodb_ft_default_stopword.opt b/mysql-test/suite/innodb_i_s/innodb_ft_default_stopword.opt
new file mode 100644
index 00000000000..2732f3a46a5
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_ft_default_stopword.opt
@@ -0,0 +1 @@
+--innodb_ft_default_stopword
diff --git a/mysql-test/suite/innodb_i_s/innodb_ft_default_stopword.result b/mysql-test/suite/innodb_i_s/innodb_ft_default_stopword.result
new file mode 100644
index 00000000000..c680665a256
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_ft_default_stopword.result
@@ -0,0 +1,5 @@
+SHOW CREATE TABLE INFORMATION_SCHEMA.INNODB_FT_DEFAULT_STOPWORD;
+Table Create Table
+INNODB_FT_DEFAULT_STOPWORD CREATE TEMPORARY TABLE `INNODB_FT_DEFAULT_STOPWORD` (
+ `value` varchar(18) NOT NULL DEFAULT ''
+) ENGINE=MEMORY DEFAULT CHARSET=utf8
diff --git a/mysql-test/suite/innodb_i_s/innodb_ft_default_stopword.test b/mysql-test/suite/innodb_i_s/innodb_ft_default_stopword.test
new file mode 100644
index 00000000000..b997c3891b0
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_ft_default_stopword.test
@@ -0,0 +1,3 @@
+--source include/have_innodb.inc
+
+SHOW CREATE TABLE INFORMATION_SCHEMA.INNODB_FT_DEFAULT_STOPWORD;
diff --git a/mysql-test/suite/innodb_i_s/innodb_ft_deleted.opt b/mysql-test/suite/innodb_i_s/innodb_ft_deleted.opt
new file mode 100644
index 00000000000..011d5a78f69
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_ft_deleted.opt
@@ -0,0 +1 @@
+--innodb_ft_deleted
diff --git a/mysql-test/suite/innodb_i_s/innodb_ft_deleted.result b/mysql-test/suite/innodb_i_s/innodb_ft_deleted.result
new file mode 100644
index 00000000000..ab1a816eee8
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_ft_deleted.result
@@ -0,0 +1,5 @@
+SHOW CREATE TABLE INFORMATION_SCHEMA.INNODB_FT_DELETED;
+Table Create Table
+INNODB_FT_DELETED CREATE TEMPORARY TABLE `INNODB_FT_DELETED` (
+ `DOC_ID` bigint(21) unsigned NOT NULL DEFAULT 0
+) ENGINE=MEMORY DEFAULT CHARSET=utf8
diff --git a/mysql-test/suite/innodb_i_s/innodb_ft_deleted.test b/mysql-test/suite/innodb_i_s/innodb_ft_deleted.test
new file mode 100644
index 00000000000..63b2eede818
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_ft_deleted.test
@@ -0,0 +1,3 @@
+--source include/have_innodb.inc
+
+SHOW CREATE TABLE INFORMATION_SCHEMA.INNODB_FT_DELETED;
diff --git a/mysql-test/suite/innodb_i_s/innodb_ft_index_cache.opt b/mysql-test/suite/innodb_i_s/innodb_ft_index_cache.opt
new file mode 100644
index 00000000000..a076db4e5b8
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_ft_index_cache.opt
@@ -0,0 +1 @@
+--innodb_ft_index_cache
diff --git a/mysql-test/suite/innodb_i_s/innodb_ft_index_cache.result b/mysql-test/suite/innodb_i_s/innodb_ft_index_cache.result
new file mode 100644
index 00000000000..b95cb1ddf28
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_ft_index_cache.result
@@ -0,0 +1,10 @@
+SHOW CREATE TABLE INFORMATION_SCHEMA.INNODB_FT_INDEX_CACHE;
+Table Create Table
+INNODB_FT_INDEX_CACHE CREATE TEMPORARY TABLE `INNODB_FT_INDEX_CACHE` (
+ `WORD` varchar(337) NOT NULL DEFAULT '',
+ `FIRST_DOC_ID` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `LAST_DOC_ID` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `DOC_COUNT` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `DOC_ID` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `POSITION` bigint(21) unsigned NOT NULL DEFAULT 0
+) ENGINE=MEMORY DEFAULT CHARSET=utf8
diff --git a/mysql-test/suite/innodb_i_s/innodb_ft_index_cache.test b/mysql-test/suite/innodb_i_s/innodb_ft_index_cache.test
new file mode 100644
index 00000000000..5e95dd05e98
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_ft_index_cache.test
@@ -0,0 +1,3 @@
+--source include/have_innodb.inc
+
+SHOW CREATE TABLE INFORMATION_SCHEMA.INNODB_FT_INDEX_CACHE;
diff --git a/mysql-test/suite/innodb_i_s/innodb_ft_index_table.opt b/mysql-test/suite/innodb_i_s/innodb_ft_index_table.opt
new file mode 100644
index 00000000000..ab47d299659
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_ft_index_table.opt
@@ -0,0 +1 @@
+--innodb_ft_index_table
diff --git a/mysql-test/suite/innodb_i_s/innodb_ft_index_table.result b/mysql-test/suite/innodb_i_s/innodb_ft_index_table.result
new file mode 100644
index 00000000000..0003e7d6741
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_ft_index_table.result
@@ -0,0 +1,10 @@
+SHOW CREATE TABLE INFORMATION_SCHEMA.INNODB_FT_INDEX_TABLE;
+Table Create Table
+INNODB_FT_INDEX_TABLE CREATE TEMPORARY TABLE `INNODB_FT_INDEX_TABLE` (
+ `WORD` varchar(337) NOT NULL DEFAULT '',
+ `FIRST_DOC_ID` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `LAST_DOC_ID` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `DOC_COUNT` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `DOC_ID` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `POSITION` bigint(21) unsigned NOT NULL DEFAULT 0
+) ENGINE=MEMORY DEFAULT CHARSET=utf8
diff --git a/mysql-test/suite/innodb_i_s/innodb_ft_index_table.test b/mysql-test/suite/innodb_i_s/innodb_ft_index_table.test
new file mode 100644
index 00000000000..984665f2fd6
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_ft_index_table.test
@@ -0,0 +1,3 @@
+--source include/have_innodb.inc
+
+SHOW CREATE TABLE INFORMATION_SCHEMA.INNODB_FT_INDEX_TABLE;
diff --git a/mysql-test/suite/innodb_i_s/innodb_lock_waits.result b/mysql-test/suite/innodb_i_s/innodb_lock_waits.result
new file mode 100644
index 00000000000..4142f142d3b
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_lock_waits.result
@@ -0,0 +1,8 @@
+SHOW CREATE TABLE INFORMATION_SCHEMA.INNODB_LOCK_WAITS;
+Table Create Table
+INNODB_LOCK_WAITS CREATE TEMPORARY TABLE `INNODB_LOCK_WAITS` (
+ `requesting_trx_id` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `requested_lock_id` varchar(81) NOT NULL DEFAULT '',
+ `blocking_trx_id` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `blocking_lock_id` varchar(81) NOT NULL DEFAULT ''
+) ENGINE=MEMORY DEFAULT CHARSET=utf8
diff --git a/mysql-test/suite/innodb_i_s/innodb_lock_waits.test b/mysql-test/suite/innodb_i_s/innodb_lock_waits.test
new file mode 100644
index 00000000000..704537f83ae
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_lock_waits.test
@@ -0,0 +1,3 @@
+--source include/have_innodb.inc
+
+SHOW CREATE TABLE INFORMATION_SCHEMA.INNODB_LOCK_WAITS;
diff --git a/mysql-test/suite/innodb_i_s/innodb_locks.result b/mysql-test/suite/innodb_i_s/innodb_locks.result
new file mode 100644
index 00000000000..6811a968869
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_locks.result
@@ -0,0 +1,18 @@
+SHOW CREATE TABLE INFORMATION_SCHEMA.INNODB_LOCKS;
+Table Create Table
+INNODB_LOCKS CREATE TEMPORARY TABLE `INNODB_LOCKS` (
+ `lock_id` varchar(81) NOT NULL DEFAULT '',
+ `lock_trx_id` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `lock_mode` enum('S','S,GAP','X','X,GAP','IS','IS,GAP','IX','IX,GAP','AUTO_INC') NOT NULL,
+ `lock_type` enum('RECORD','TABLE') NOT NULL,
+ `lock_table` varchar(1024) NOT NULL DEFAULT '',
+ `lock_index` varchar(1024) DEFAULT NULL,
+ `lock_space` int(11) unsigned DEFAULT NULL,
+ `lock_page` int(11) unsigned DEFAULT NULL,
+ `lock_rec` int(11) unsigned DEFAULT NULL,
+ `lock_data` varchar(8192) DEFAULT NULL
+) ENGINE=MEMORY DEFAULT CHARSET=utf8
+CREATE TEMPORARY TABLE t1 LIKE INFORMATION_SCHEMA.INNODB_LOCKS;
+DROP TEMPORARY TABLE t1;
+CREATE TEMPORARY TABLE t1 AS SELECT * FROM INFORMATION_SCHEMA.INNODB_LOCKS LIMIT 0;
+DROP TEMPORARY TABLE t1;
diff --git a/mysql-test/suite/innodb_i_s/innodb_locks.test b/mysql-test/suite/innodb_i_s/innodb_locks.test
new file mode 100644
index 00000000000..8327ae1f912
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_locks.test
@@ -0,0 +1,9 @@
+--source include/have_innodb.inc
+
+SHOW CREATE TABLE INFORMATION_SCHEMA.INNODB_LOCKS;
+
+CREATE TEMPORARY TABLE t1 LIKE INFORMATION_SCHEMA.INNODB_LOCKS;
+DROP TEMPORARY TABLE t1;
+
+CREATE TEMPORARY TABLE t1 AS SELECT * FROM INFORMATION_SCHEMA.INNODB_LOCKS LIMIT 0;
+DROP TEMPORARY TABLE t1;
diff --git a/mysql-test/suite/innodb_i_s/innodb_metrics.result b/mysql-test/suite/innodb_i_s/innodb_metrics.result
new file mode 100644
index 00000000000..c6e0c7ac1d1
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_metrics.result
@@ -0,0 +1,25 @@
+SHOW CREATE TABLE INFORMATION_SCHEMA.INNODB_METRICS;
+Table Create Table
+INNODB_METRICS CREATE TEMPORARY TABLE `INNODB_METRICS` (
+ `NAME` varchar(193) NOT NULL DEFAULT '',
+ `SUBSYSTEM` varchar(193) NOT NULL DEFAULT '',
+ `COUNT` bigint(21) NOT NULL DEFAULT 0,
+ `MAX_COUNT` bigint(21) DEFAULT NULL,
+ `MIN_COUNT` bigint(21) DEFAULT NULL,
+ `AVG_COUNT` float DEFAULT NULL,
+ `COUNT_RESET` bigint(21) NOT NULL DEFAULT 0,
+ `MAX_COUNT_RESET` bigint(21) DEFAULT NULL,
+ `MIN_COUNT_RESET` bigint(21) DEFAULT NULL,
+ `AVG_COUNT_RESET` float DEFAULT NULL,
+ `TIME_ENABLED` datetime DEFAULT NULL,
+ `TIME_DISABLED` datetime DEFAULT NULL,
+ `TIME_ELAPSED` bigint(21) DEFAULT NULL,
+ `TIME_RESET` datetime DEFAULT NULL,
+ `ENABLED` int(1) NOT NULL DEFAULT 0,
+ `TYPE` enum('value','status_counter','set_owner','set_member','counter') NOT NULL,
+ `COMMENT` varchar(193) NOT NULL DEFAULT ''
+) ENGINE=MEMORY DEFAULT CHARSET=utf8
+CREATE TEMPORARY TABLE t1 LIKE INFORMATION_SCHEMA.INNODB_METRICS;
+DROP TEMPORARY TABLE t1;
+CREATE TEMPORARY TABLE t1 AS SELECT * FROM INFORMATION_SCHEMA.INNODB_METRICS LIMIT 0;
+DROP TEMPORARY TABLE t1;
diff --git a/mysql-test/suite/innodb_i_s/innodb_metrics.test b/mysql-test/suite/innodb_i_s/innodb_metrics.test
new file mode 100644
index 00000000000..446bfffbda3
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_metrics.test
@@ -0,0 +1,9 @@
+--source include/have_innodb.inc
+
+SHOW CREATE TABLE INFORMATION_SCHEMA.INNODB_METRICS;
+
+CREATE TEMPORARY TABLE t1 LIKE INFORMATION_SCHEMA.INNODB_METRICS;
+DROP TEMPORARY TABLE t1;
+
+CREATE TEMPORARY TABLE t1 AS SELECT * FROM INFORMATION_SCHEMA.INNODB_METRICS LIMIT 0;
+DROP TEMPORARY TABLE t1;
diff --git a/mysql-test/suite/innodb_i_s/innodb_mutexes.opt b/mysql-test/suite/innodb_i_s/innodb_mutexes.opt
new file mode 100644
index 00000000000..d658e54eff5
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_mutexes.opt
@@ -0,0 +1 @@
+--innodb_mutexes
diff --git a/mysql-test/suite/innodb_i_s/innodb_mutexes.result b/mysql-test/suite/innodb_i_s/innodb_mutexes.result
new file mode 100644
index 00000000000..e00b68d39fc
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_mutexes.result
@@ -0,0 +1,8 @@
+SHOW CREATE TABLE INFORMATION_SCHEMA.INNODB_MUTEXES;
+Table Create Table
+INNODB_MUTEXES CREATE TEMPORARY TABLE `INNODB_MUTEXES` (
+ `NAME` varchar(4000) NOT NULL DEFAULT '',
+ `CREATE_FILE` varchar(4000) NOT NULL DEFAULT '',
+ `CREATE_LINE` int(11) unsigned NOT NULL DEFAULT 0,
+ `OS_WAITS` bigint(21) unsigned NOT NULL DEFAULT 0
+) ENGINE=MEMORY DEFAULT CHARSET=utf8
diff --git a/mysql-test/suite/innodb_i_s/innodb_mutexes.test b/mysql-test/suite/innodb_i_s/innodb_mutexes.test
new file mode 100644
index 00000000000..d4c8d49bab4
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_mutexes.test
@@ -0,0 +1,3 @@
+--source include/have_innodb.inc
+
+SHOW CREATE TABLE INFORMATION_SCHEMA.INNODB_MUTEXES;
diff --git a/mysql-test/suite/innodb_i_s/innodb_sys_columns.result b/mysql-test/suite/innodb_i_s/innodb_sys_columns.result
new file mode 100644
index 00000000000..fbce9faac99
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_sys_columns.result
@@ -0,0 +1,10 @@
+SHOW CREATE TABLE INFORMATION_SCHEMA.INNODB_SYS_COLUMNS;
+Table Create Table
+INNODB_SYS_COLUMNS CREATE TEMPORARY TABLE `INNODB_SYS_COLUMNS` (
+ `TABLE_ID` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `NAME` varchar(64) NOT NULL DEFAULT '',
+ `POS` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `MTYPE` int(11) NOT NULL DEFAULT 0,
+ `PRTYPE` int(11) NOT NULL DEFAULT 0,
+ `LEN` int(11) NOT NULL DEFAULT 0
+) ENGINE=MEMORY DEFAULT CHARSET=utf8
diff --git a/mysql-test/suite/innodb_i_s/innodb_sys_columns.test b/mysql-test/suite/innodb_i_s/innodb_sys_columns.test
new file mode 100644
index 00000000000..73332697d7b
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_sys_columns.test
@@ -0,0 +1,3 @@
+--source include/have_innodb.inc
+
+SHOW CREATE TABLE INFORMATION_SCHEMA.INNODB_SYS_COLUMNS;
diff --git a/mysql-test/suite/innodb_i_s/innodb_sys_datafiles.opt b/mysql-test/suite/innodb_i_s/innodb_sys_datafiles.opt
new file mode 100644
index 00000000000..d6803d5ecdf
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_sys_datafiles.opt
@@ -0,0 +1 @@
+--innodb_sys_datafiles
diff --git a/mysql-test/suite/innodb_i_s/innodb_sys_datafiles.result b/mysql-test/suite/innodb_i_s/innodb_sys_datafiles.result
new file mode 100644
index 00000000000..eb2dd8b71ad
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_sys_datafiles.result
@@ -0,0 +1,6 @@
+SHOW CREATE TABLE INFORMATION_SCHEMA.INNODB_SYS_DATAFILES;
+Table Create Table
+INNODB_SYS_DATAFILES CREATE TEMPORARY TABLE `INNODB_SYS_DATAFILES` (
+ `SPACE` int(11) unsigned NOT NULL DEFAULT 0,
+ `PATH` varchar(4000) NOT NULL DEFAULT ''
+) ENGINE=MEMORY DEFAULT CHARSET=utf8
diff --git a/mysql-test/suite/innodb_i_s/innodb_sys_datafiles.test b/mysql-test/suite/innodb_i_s/innodb_sys_datafiles.test
new file mode 100644
index 00000000000..dd843fec761
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_sys_datafiles.test
@@ -0,0 +1,3 @@
+--source include/have_innodb.inc
+
+SHOW CREATE TABLE INFORMATION_SCHEMA.INNODB_SYS_DATAFILES;
diff --git a/mysql-test/suite/innodb_i_s/innodb_sys_fields.result b/mysql-test/suite/innodb_i_s/innodb_sys_fields.result
new file mode 100644
index 00000000000..9c5437ff64e
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_sys_fields.result
@@ -0,0 +1,7 @@
+SHOW CREATE TABLE INFORMATION_SCHEMA.INNODB_SYS_FIELDS;
+Table Create Table
+INNODB_SYS_FIELDS CREATE TEMPORARY TABLE `INNODB_SYS_FIELDS` (
+ `INDEX_ID` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `NAME` varchar(64) NOT NULL DEFAULT '',
+ `POS` int(11) unsigned NOT NULL DEFAULT 0
+) ENGINE=MEMORY DEFAULT CHARSET=utf8
diff --git a/mysql-test/suite/innodb_i_s/innodb_sys_fields.test b/mysql-test/suite/innodb_i_s/innodb_sys_fields.test
new file mode 100644
index 00000000000..1559eb39576
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_sys_fields.test
@@ -0,0 +1,3 @@
+--source include/have_innodb.inc
+
+SHOW CREATE TABLE INFORMATION_SCHEMA.INNODB_SYS_FIELDS;
diff --git a/mysql-test/suite/innodb_i_s/innodb_sys_foreign.result b/mysql-test/suite/innodb_i_s/innodb_sys_foreign.result
new file mode 100644
index 00000000000..8dc7cbb2c53
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_sys_foreign.result
@@ -0,0 +1,9 @@
+SHOW CREATE TABLE INFORMATION_SCHEMA.INNODB_SYS_FOREIGN;
+Table Create Table
+INNODB_SYS_FOREIGN CREATE TEMPORARY TABLE `INNODB_SYS_FOREIGN` (
+ `ID` varchar(193) NOT NULL DEFAULT '',
+ `FOR_NAME` varchar(193) NOT NULL DEFAULT '',
+ `REF_NAME` varchar(193) NOT NULL DEFAULT '',
+ `N_COLS` int(11) unsigned NOT NULL DEFAULT 0,
+ `TYPE` int(11) unsigned NOT NULL DEFAULT 0
+) ENGINE=MEMORY DEFAULT CHARSET=utf8
diff --git a/mysql-test/suite/innodb_i_s/innodb_sys_foreign.test b/mysql-test/suite/innodb_i_s/innodb_sys_foreign.test
new file mode 100644
index 00000000000..694a773392e
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_sys_foreign.test
@@ -0,0 +1,3 @@
+--source include/have_innodb.inc
+
+SHOW CREATE TABLE INFORMATION_SCHEMA.INNODB_SYS_FOREIGN;
diff --git a/mysql-test/suite/innodb_i_s/innodb_sys_foreign_cols.result b/mysql-test/suite/innodb_i_s/innodb_sys_foreign_cols.result
new file mode 100644
index 00000000000..8f1134fb36d
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_sys_foreign_cols.result
@@ -0,0 +1,8 @@
+SHOW CREATE TABLE INFORMATION_SCHEMA.INNODB_SYS_FOREIGN_COLS;
+Table Create Table
+INNODB_SYS_FOREIGN_COLS CREATE TEMPORARY TABLE `INNODB_SYS_FOREIGN_COLS` (
+ `ID` varchar(193) NOT NULL DEFAULT '',
+ `FOR_COL_NAME` varchar(64) NOT NULL DEFAULT '',
+ `REF_COL_NAME` varchar(64) NOT NULL DEFAULT '',
+ `POS` int(11) unsigned NOT NULL DEFAULT 0
+) ENGINE=MEMORY DEFAULT CHARSET=utf8
diff --git a/mysql-test/suite/innodb_i_s/innodb_sys_foreign_cols.test b/mysql-test/suite/innodb_i_s/innodb_sys_foreign_cols.test
new file mode 100644
index 00000000000..6afccfc212f
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_sys_foreign_cols.test
@@ -0,0 +1,3 @@
+--source include/have_innodb.inc
+
+SHOW CREATE TABLE INFORMATION_SCHEMA.INNODB_SYS_FOREIGN_COLS;
diff --git a/mysql-test/suite/innodb_i_s/innodb_sys_indexes.result b/mysql-test/suite/innodb_i_s/innodb_sys_indexes.result
new file mode 100644
index 00000000000..6e76ea887cc
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_sys_indexes.result
@@ -0,0 +1,12 @@
+SHOW CREATE TABLE INFORMATION_SCHEMA.INNODB_SYS_INDEXES;
+Table Create Table
+INNODB_SYS_INDEXES CREATE TEMPORARY TABLE `INNODB_SYS_INDEXES` (
+ `INDEX_ID` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `NAME` varchar(64) NOT NULL DEFAULT '',
+ `TABLE_ID` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `TYPE` int(11) NOT NULL DEFAULT 0,
+ `N_FIELDS` int(11) NOT NULL DEFAULT 0,
+ `PAGE_NO` int(11) NOT NULL DEFAULT 0,
+ `SPACE` int(11) NOT NULL DEFAULT 0,
+ `MERGE_THRESHOLD` int(11) NOT NULL DEFAULT 0
+) ENGINE=MEMORY DEFAULT CHARSET=utf8
diff --git a/mysql-test/suite/innodb_i_s/innodb_sys_indexes.test b/mysql-test/suite/innodb_i_s/innodb_sys_indexes.test
new file mode 100644
index 00000000000..b8ad25ea6e3
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_sys_indexes.test
@@ -0,0 +1,3 @@
+--source include/have_innodb.inc
+
+SHOW CREATE TABLE INFORMATION_SCHEMA.INNODB_SYS_INDEXES;
diff --git a/mysql-test/suite/innodb_i_s/innodb_sys_semaphore_waits.opt b/mysql-test/suite/innodb_i_s/innodb_sys_semaphore_waits.opt
new file mode 100644
index 00000000000..2b4bd0c33da
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_sys_semaphore_waits.opt
@@ -0,0 +1 @@
+--innodb_sys_semaphore_waits
diff --git a/mysql-test/suite/innodb_i_s/innodb_sys_semaphore_waits.result b/mysql-test/suite/innodb_i_s/innodb_sys_semaphore_waits.result
new file mode 100644
index 00000000000..ee1e3fade1e
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_sys_semaphore_waits.result
@@ -0,0 +1,24 @@
+SHOW CREATE TABLE INFORMATION_SCHEMA.INNODB_SYS_SEMAPHORE_WAITS;
+Table Create Table
+INNODB_SYS_SEMAPHORE_WAITS CREATE TEMPORARY TABLE `INNODB_SYS_SEMAPHORE_WAITS` (
+ `THREAD_ID` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `OBJECT_NAME` varchar(4000) DEFAULT NULL,
+ `FILE` varchar(4000) DEFAULT NULL,
+ `LINE` int(11) unsigned NOT NULL DEFAULT 0,
+ `WAIT_TIME` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `WAIT_OBJECT` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `WAIT_TYPE` varchar(16) DEFAULT NULL,
+ `HOLDER_THREAD_ID` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `HOLDER_FILE` varchar(4000) DEFAULT NULL,
+ `HOLDER_LINE` int(11) unsigned NOT NULL DEFAULT 0,
+ `CREATED_FILE` varchar(4000) DEFAULT NULL,
+ `CREATED_LINE` int(11) unsigned NOT NULL DEFAULT 0,
+ `WRITER_THREAD` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `RESERVATION_MODE` varchar(16) DEFAULT NULL,
+ `READERS` int(11) unsigned NOT NULL DEFAULT 0,
+ `WAITERS_FLAG` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `LOCK_WORD` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `LAST_WRITER_FILE` varchar(4000) DEFAULT NULL,
+ `LAST_WRITER_LINE` int(11) unsigned NOT NULL DEFAULT 0,
+ `OS_WAIT_COUNT` int(11) unsigned NOT NULL DEFAULT 0
+) ENGINE=MEMORY DEFAULT CHARSET=utf8
diff --git a/mysql-test/suite/innodb_i_s/innodb_sys_semaphore_waits.test b/mysql-test/suite/innodb_i_s/innodb_sys_semaphore_waits.test
new file mode 100644
index 00000000000..a8ea1c59bb8
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_sys_semaphore_waits.test
@@ -0,0 +1,3 @@
+--source include/have_innodb.inc
+
+SHOW CREATE TABLE INFORMATION_SCHEMA.INNODB_SYS_SEMAPHORE_WAITS;
diff --git a/mysql-test/suite/innodb_i_s/innodb_sys_tables.result b/mysql-test/suite/innodb_i_s/innodb_sys_tables.result
new file mode 100644
index 00000000000..82c6c480587
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_sys_tables.result
@@ -0,0 +1,12 @@
+SHOW CREATE TABLE INFORMATION_SCHEMA.INNODB_SYS_TABLES;
+Table Create Table
+INNODB_SYS_TABLES CREATE TEMPORARY TABLE `INNODB_SYS_TABLES` (
+ `TABLE_ID` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `NAME` varchar(655) NOT NULL DEFAULT '',
+ `FLAG` int(11) NOT NULL DEFAULT 0,
+ `N_COLS` int(11) unsigned NOT NULL DEFAULT 0,
+ `SPACE` int(11) unsigned NOT NULL DEFAULT 0,
+ `ROW_FORMAT` enum('Redundant','Compact','Compressed','Dynamic') DEFAULT NULL,
+ `ZIP_PAGE_SIZE` int(11) unsigned NOT NULL DEFAULT 0,
+ `SPACE_TYPE` enum('Single','System') DEFAULT NULL
+) ENGINE=MEMORY DEFAULT CHARSET=utf8
diff --git a/mysql-test/suite/innodb_i_s/innodb_sys_tables.test b/mysql-test/suite/innodb_i_s/innodb_sys_tables.test
new file mode 100644
index 00000000000..b868678f7f1
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_sys_tables.test
@@ -0,0 +1,3 @@
+--source include/have_innodb.inc
+
+SHOW CREATE TABLE INFORMATION_SCHEMA.INNODB_SYS_TABLES;
diff --git a/mysql-test/suite/innodb_i_s/innodb_sys_tablespaces.opt b/mysql-test/suite/innodb_i_s/innodb_sys_tablespaces.opt
new file mode 100644
index 00000000000..497233a1520
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_sys_tablespaces.opt
@@ -0,0 +1 @@
+--innodb_sys_tablespaces
diff --git a/mysql-test/suite/innodb_i_s/innodb_sys_tablespaces.result b/mysql-test/suite/innodb_i_s/innodb_sys_tablespaces.result
new file mode 100644
index 00000000000..40e337f49f3
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_sys_tablespaces.result
@@ -0,0 +1,13 @@
+SHOW CREATE TABLE INFORMATION_SCHEMA.INNODB_SYS_TABLESPACES;
+Table Create Table
+INNODB_SYS_TABLESPACES CREATE TEMPORARY TABLE `INNODB_SYS_TABLESPACES` (
+ `SPACE` int(11) unsigned NOT NULL DEFAULT 0,
+ `NAME` varchar(655) NOT NULL DEFAULT '',
+ `FLAG` int(11) unsigned NOT NULL DEFAULT 0,
+ `ROW_FORMAT` varchar(22) DEFAULT NULL,
+ `PAGE_SIZE` int(11) unsigned NOT NULL DEFAULT 0,
+ `ZIP_PAGE_SIZE` int(11) unsigned NOT NULL DEFAULT 0,
+ `FS_BLOCK_SIZE` int(11) unsigned NOT NULL DEFAULT 0,
+ `FILE_SIZE` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `ALLOCATED_SIZE` bigint(21) unsigned NOT NULL DEFAULT 0
+) ENGINE=MEMORY DEFAULT CHARSET=utf8
diff --git a/mysql-test/suite/innodb_i_s/innodb_sys_tablespaces.test b/mysql-test/suite/innodb_i_s/innodb_sys_tablespaces.test
new file mode 100644
index 00000000000..e5132dc1ac0
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_sys_tablespaces.test
@@ -0,0 +1,3 @@
+--source include/have_innodb.inc
+
+SHOW CREATE TABLE INFORMATION_SCHEMA.INNODB_SYS_TABLESPACES;
diff --git a/mysql-test/suite/innodb_i_s/innodb_sys_tablestats.opt b/mysql-test/suite/innodb_i_s/innodb_sys_tablestats.opt
new file mode 100644
index 00000000000..370dbcef0a2
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_sys_tablestats.opt
@@ -0,0 +1 @@
+--innodb_sys_tablestats
diff --git a/mysql-test/suite/innodb_i_s/innodb_sys_tablestats.result b/mysql-test/suite/innodb_i_s/innodb_sys_tablestats.result
new file mode 100644
index 00000000000..ccc8a034e00
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_sys_tablestats.result
@@ -0,0 +1,13 @@
+SHOW CREATE TABLE INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS;
+Table Create Table
+INNODB_SYS_TABLESTATS CREATE TEMPORARY TABLE `INNODB_SYS_TABLESTATS` (
+ `TABLE_ID` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `NAME` varchar(64) NOT NULL DEFAULT '',
+ `STATS_INITIALIZED` int(1) NOT NULL DEFAULT 0,
+ `NUM_ROWS` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `CLUST_INDEX_SIZE` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `OTHER_INDEX_SIZE` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `MODIFIED_COUNTER` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `AUTOINC` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `REF_COUNT` int(11) NOT NULL DEFAULT 0
+) ENGINE=MEMORY DEFAULT CHARSET=utf8
diff --git a/mysql-test/suite/innodb_i_s/innodb_sys_tablestats.test b/mysql-test/suite/innodb_i_s/innodb_sys_tablestats.test
new file mode 100644
index 00000000000..45d7e31a4a9
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_sys_tablestats.test
@@ -0,0 +1,3 @@
+--source include/have_innodb.inc
+
+SHOW CREATE TABLE INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS;
diff --git a/mysql-test/suite/innodb_i_s/innodb_sys_virtual.result b/mysql-test/suite/innodb_i_s/innodb_sys_virtual.result
new file mode 100644
index 00000000000..0d324a13bc6
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_sys_virtual.result
@@ -0,0 +1,7 @@
+SHOW CREATE TABLE INFORMATION_SCHEMA.INNODB_SYS_VIRTUAL;
+Table Create Table
+INNODB_SYS_VIRTUAL CREATE TEMPORARY TABLE `INNODB_SYS_VIRTUAL` (
+ `TABLE_ID` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `POS` int(11) unsigned NOT NULL DEFAULT 0,
+ `BASE_POS` int(11) unsigned NOT NULL DEFAULT 0
+) ENGINE=MEMORY DEFAULT CHARSET=utf8
diff --git a/mysql-test/suite/innodb_i_s/innodb_sys_virtual.test b/mysql-test/suite/innodb_i_s/innodb_sys_virtual.test
new file mode 100644
index 00000000000..58577f7df87
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_sys_virtual.test
@@ -0,0 +1,3 @@
+--source include/have_innodb.inc
+
+SHOW CREATE TABLE INFORMATION_SCHEMA.INNODB_SYS_VIRTUAL;
diff --git a/mysql-test/suite/innodb_i_s/innodb_tablespaces_encryption.opt b/mysql-test/suite/innodb_i_s/innodb_tablespaces_encryption.opt
new file mode 100644
index 00000000000..557daf9b0b9
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_tablespaces_encryption.opt
@@ -0,0 +1 @@
+--innodb_tablespaces_encryption
diff --git a/mysql-test/suite/innodb_i_s/innodb_tablespaces_encryption.result b/mysql-test/suite/innodb_i_s/innodb_tablespaces_encryption.result
new file mode 100644
index 00000000000..e824366632a
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_tablespaces_encryption.result
@@ -0,0 +1,14 @@
+SHOW CREATE TABLE INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION;
+Table Create Table
+INNODB_TABLESPACES_ENCRYPTION CREATE TEMPORARY TABLE `INNODB_TABLESPACES_ENCRYPTION` (
+ `SPACE` int(11) unsigned NOT NULL DEFAULT 0,
+ `NAME` varchar(655) DEFAULT NULL,
+ `ENCRYPTION_SCHEME` int(11) unsigned NOT NULL DEFAULT 0,
+ `KEYSERVER_REQUESTS` int(11) unsigned NOT NULL DEFAULT 0,
+ `MIN_KEY_VERSION` int(11) unsigned NOT NULL DEFAULT 0,
+ `CURRENT_KEY_VERSION` int(11) unsigned NOT NULL DEFAULT 0,
+ `KEY_ROTATION_PAGE_NUMBER` bigint(21) unsigned DEFAULT NULL,
+ `KEY_ROTATION_MAX_PAGE_NUMBER` bigint(21) unsigned DEFAULT NULL,
+ `CURRENT_KEY_ID` int(11) unsigned NOT NULL DEFAULT 0,
+ `ROTATING_OR_FLUSHING` int(1) NOT NULL DEFAULT 0
+) ENGINE=MEMORY DEFAULT CHARSET=utf8
diff --git a/mysql-test/suite/innodb_i_s/innodb_tablespaces_encryption.test b/mysql-test/suite/innodb_i_s/innodb_tablespaces_encryption.test
new file mode 100644
index 00000000000..da361a3b71d
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_tablespaces_encryption.test
@@ -0,0 +1,3 @@
+--source include/have_innodb.inc
+
+SHOW CREATE TABLE INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION;
diff --git a/mysql-test/suite/innodb_i_s/innodb_trx.result b/mysql-test/suite/innodb_i_s/innodb_trx.result
new file mode 100644
index 00000000000..297899650c2
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_trx.result
@@ -0,0 +1,30 @@
+SHOW CREATE TABLE INFORMATION_SCHEMA.INNODB_TRX;
+Table Create Table
+INNODB_TRX CREATE TEMPORARY TABLE `INNODB_TRX` (
+ `trx_id` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `trx_state` varchar(13) NOT NULL DEFAULT '',
+ `trx_started` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `trx_requested_lock_id` varchar(81) DEFAULT NULL,
+ `trx_wait_started` datetime DEFAULT NULL,
+ `trx_weight` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `trx_mysql_thread_id` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `trx_query` varchar(1024) DEFAULT NULL,
+ `trx_operation_state` varchar(64) DEFAULT NULL,
+ `trx_tables_in_use` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `trx_tables_locked` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `trx_lock_structs` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `trx_lock_memory_bytes` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `trx_rows_locked` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `trx_rows_modified` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `trx_concurrency_tickets` bigint(21) unsigned NOT NULL DEFAULT 0,
+ `trx_isolation_level` enum('READ UNCOMMITTED','READ COMMITTED','REPEATABLE READ','SERIALIZABLE') NOT NULL,
+ `trx_unique_checks` int(1) NOT NULL DEFAULT 0,
+ `trx_foreign_key_checks` int(1) NOT NULL DEFAULT 0,
+ `trx_last_foreign_key_error` varchar(256) DEFAULT NULL,
+ `trx_is_read_only` int(1) NOT NULL DEFAULT 0,
+ `trx_autocommit_non_locking` int(1) NOT NULL DEFAULT 0
+) ENGINE=MEMORY DEFAULT CHARSET=utf8
+CREATE TEMPORARY TABLE t1 LIKE INFORMATION_SCHEMA.INNODB_TRX;
+DROP TEMPORARY TABLE t1;
+CREATE TEMPORARY TABLE t1 AS SELECT * FROM INFORMATION_SCHEMA.INNODB_TRX LIMIT 0;
+DROP TEMPORARY TABLE t1;
diff --git a/mysql-test/suite/innodb_i_s/innodb_trx.test b/mysql-test/suite/innodb_i_s/innodb_trx.test
new file mode 100644
index 00000000000..90fa3467b50
--- /dev/null
+++ b/mysql-test/suite/innodb_i_s/innodb_trx.test
@@ -0,0 +1,9 @@
+--source include/have_innodb.inc
+
+SHOW CREATE TABLE INFORMATION_SCHEMA.INNODB_TRX;
+
+CREATE TEMPORARY TABLE t1 LIKE INFORMATION_SCHEMA.INNODB_TRX;
+DROP TEMPORARY TABLE t1;
+
+CREATE TEMPORARY TABLE t1 AS SELECT * FROM INFORMATION_SCHEMA.INNODB_TRX LIMIT 0;
+DROP TEMPORARY TABLE t1;
diff --git a/mysql-test/suite/innodb_zip/r/16k,full_crc32.rdiff b/mysql-test/suite/innodb_zip/r/16k,full_crc32.rdiff
index 97daeacd1e8..5bb15da9264 100644
--- a/mysql-test/suite/innodb_zip/r/16k,full_crc32.rdiff
+++ b/mysql-test/suite/innodb_zip/r/16k,full_crc32.rdiff
@@ -3,14 +3,14 @@
@@ -41,10 +41,10 @@
test/t4 5 33 PRIMARY 3 3 1 50
=== information_schema.innodb_sys_tablespaces and innodb_sys_datafiles ===
- Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path
--test/t1 Single DEFAULT DEFAULT Compact or Redundant MYSQLD_DATADIR/test/t1.ibd
--test/t2 Single DEFAULT DEFAULT Compact or Redundant MYSQLD_DATADIR/test/t2.ibd
-+test/t1 Single DEFAULT DEFAULT NULL MYSQLD_DATADIR/test/t1.ibd
-+test/t2 Single DEFAULT DEFAULT NULL MYSQLD_DATADIR/test/t2.ibd
- test/t3 Single DEFAULT 8192 Compressed MYSQLD_DATADIR/test/t3.ibd
--test/t4 Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t4.ibd
-+test/t4 Single DEFAULT DEFAULT NULL MYSQLD_DATADIR/test/t4.ibd
+ Space_Name Page_Size Zip_Size Formats_Permitted Path
+-test/t1 DEFAULT DEFAULT Compact or Redundant MYSQLD_DATADIR/test/t1.ibd
+-test/t2 DEFAULT DEFAULT Compact or Redundant MYSQLD_DATADIR/test/t2.ibd
++test/t1 DEFAULT DEFAULT NULL MYSQLD_DATADIR/test/t1.ibd
++test/t2 DEFAULT DEFAULT NULL MYSQLD_DATADIR/test/t2.ibd
+ test/t3 DEFAULT 8192 Compressed MYSQLD_DATADIR/test/t3.ibd
+-test/t4 DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t4.ibd
++test/t4 DEFAULT DEFAULT NULL MYSQLD_DATADIR/test/t4.ibd
DROP TABLE t1, t2, t3, t4;
# Test 4) The maximum row size is dependent upon the page size.
# Redundant: 8123, Compact: 8126.
diff --git a/mysql-test/suite/innodb_zip/r/16k,strict_full_crc32.rdiff b/mysql-test/suite/innodb_zip/r/16k,strict_full_crc32.rdiff
index 97daeacd1e8..5bb15da9264 100644
--- a/mysql-test/suite/innodb_zip/r/16k,strict_full_crc32.rdiff
+++ b/mysql-test/suite/innodb_zip/r/16k,strict_full_crc32.rdiff
@@ -3,14 +3,14 @@
@@ -41,10 +41,10 @@
test/t4 5 33 PRIMARY 3 3 1 50
=== information_schema.innodb_sys_tablespaces and innodb_sys_datafiles ===
- Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path
--test/t1 Single DEFAULT DEFAULT Compact or Redundant MYSQLD_DATADIR/test/t1.ibd
--test/t2 Single DEFAULT DEFAULT Compact or Redundant MYSQLD_DATADIR/test/t2.ibd
-+test/t1 Single DEFAULT DEFAULT NULL MYSQLD_DATADIR/test/t1.ibd
-+test/t2 Single DEFAULT DEFAULT NULL MYSQLD_DATADIR/test/t2.ibd
- test/t3 Single DEFAULT 8192 Compressed MYSQLD_DATADIR/test/t3.ibd
--test/t4 Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t4.ibd
-+test/t4 Single DEFAULT DEFAULT NULL MYSQLD_DATADIR/test/t4.ibd
+ Space_Name Page_Size Zip_Size Formats_Permitted Path
+-test/t1 DEFAULT DEFAULT Compact or Redundant MYSQLD_DATADIR/test/t1.ibd
+-test/t2 DEFAULT DEFAULT Compact or Redundant MYSQLD_DATADIR/test/t2.ibd
++test/t1 DEFAULT DEFAULT NULL MYSQLD_DATADIR/test/t1.ibd
++test/t2 DEFAULT DEFAULT NULL MYSQLD_DATADIR/test/t2.ibd
+ test/t3 DEFAULT 8192 Compressed MYSQLD_DATADIR/test/t3.ibd
+-test/t4 DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t4.ibd
++test/t4 DEFAULT DEFAULT NULL MYSQLD_DATADIR/test/t4.ibd
DROP TABLE t1, t2, t3, t4;
# Test 4) The maximum row size is dependent upon the page size.
# Redundant: 8123, Compact: 8126.
diff --git a/mysql-test/suite/innodb_zip/r/blob.result b/mysql-test/suite/innodb_zip/r/blob.result
new file mode 100644
index 00000000000..bfe96b8a869
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/r/blob.result
@@ -0,0 +1,21 @@
+#
+# MDEV-21259 Assertion 'w != NORMAL || mach_read_from_4(ptr) != val'
+# failed in mtr_t::write(), btr_free_externally_stored_field()
+#
+SET @saved_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency;
+SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;
+CREATE TABLE t1 (c TEXT, f2 INT PRIMARY KEY, f3 INT UNIQUE)
+ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
+SET @level= @@GLOBAL.innodb_compression_level;
+SET GLOBAL innodb_compression_level=0;
+connect prevent_purge,localhost,root;
+START TRANSACTION WITH CONSISTENT SNAPSHOT;
+connection default;
+INSERT INTO t1 VALUES('a',1,0);
+UPDATE t1 SET c= REPEAT('a b ',4096);
+REPLACE INTO t1 SELECT * FROM t1;
+disconnect prevent_purge;
+InnoDB 0 transactions not purged
+DROP TABLE t1;
+SET GLOBAL innodb_compression_level = @level;
+SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency;
diff --git a/mysql-test/suite/innodb_zip/r/bug53591.result b/mysql-test/suite/innodb_zip/r/bug53591.result
index 0e0a5a05e4b..779064d054f 100644
--- a/mysql-test/suite/innodb_zip/r/bug53591.result
+++ b/mysql-test/suite/innodb_zip/r/bug53591.result
@@ -2,6 +2,8 @@ call mtr.add_suppression('InnoDB: Cannot add field.*because after adding it, the
SET GLOBAL innodb_file_per_table=on;
SET GLOBAL innodb_strict_mode=on;
set old_alter_table=0;
+Warnings:
+Warning 1287 '@@old_alter_table' is deprecated and will be removed in a future release. Please use '@@alter_algorithm' instead
CREATE TABLE bug53591(a text charset utf8 not null)
ENGINE=InnoDB KEY_BLOCK_SIZE=1;
ALTER TABLE bug53591 ADD PRIMARY KEY(a(220));
diff --git a/mysql-test/suite/innodb_zip/r/cmp_per_index.result b/mysql-test/suite/innodb_zip/r/cmp_per_index.result
index b4e34040630..f26cc952ca9 100644
--- a/mysql-test/suite/innodb_zip/r/cmp_per_index.result
+++ b/mysql-test/suite/innodb_zip/r/cmp_per_index.result
@@ -52,24 +52,22 @@ SELECT
database_name,
table_name,
index_name,
-CASE WHEN compress_ops=47 and @@innodb_compression_level IN (4,8,9) THEN 65
-ELSE compress_ops END as compress_ops,
-CASE WHEN compress_ops_ok=47 and @@innodb_compression_level IN (4,8,9) THEN 65
-ELSE compress_ops_ok END as compress_ops_ok,
+compress_ops,
+compress_ops_ok,
uncompress_ops
FROM information_schema.innodb_cmp_per_index
ORDER BY 1, 2, 3;
database_name test
table_name t
index_name b
-compress_ops 43
-compress_ops_ok 43
+compress_ops 52
+compress_ops_ok 52
uncompress_ops 0
database_name test
table_name t
index_name PRIMARY
-compress_ops 65
-compress_ops_ok 65
+compress_ops 64
+compress_ops_ok 64
uncompress_ops 0
DROP TABLE t;
SET GLOBAL innodb_cmp_per_index_enabled=@save_enabled;
diff --git a/mysql-test/suite/innodb_zip/r/innochecksum_3.result b/mysql-test/suite/innodb_zip/r/innochecksum_3.result
index 7de90721d64..3ec8c93f208 100644
--- a/mysql-test/suite/innodb_zip/r/innochecksum_3.result
+++ b/mysql-test/suite/innodb_zip/r/innochecksum_3.result
@@ -172,7 +172,7 @@ Filename::tab#.ibd
#::# | 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 | -
#::# | Freshly allocated page | -
# Variables used by page type dump for ibdata1
@@ -207,7 +207,7 @@ Filename::tab#.ibd
#::# | 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 | -
#::# | Freshly allocated page | -
[6]: check the valid lower bound values for option
# allow-mismatches,page,start-page,end-page
diff --git a/mysql-test/suite/innodb_zip/r/page_size,4k.rdiff b/mysql-test/suite/innodb_zip/r/page_size,4k.rdiff
index 0423520455c..2ee4852ce2a 100644
--- a/mysql-test/suite/innodb_zip/r/page_size,4k.rdiff
+++ b/mysql-test/suite/innodb_zip/r/page_size,4k.rdiff
@@ -17,12 +17,12 @@
+test/t3 5 37 PRIMARY 3 3 1 50
test/t4 5 33 PRIMARY 3 3 1 50
=== information_schema.innodb_sys_tablespaces and innodb_sys_datafiles ===
- Space_Name Space_Type Page_Size Zip_Size Path
- test/t1 Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t1.ibd
- test/t2 Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t2.ibd
--test/t3 Single DEFAULT 8192 MYSQLD_DATADIR/test/t3.ibd
-+test/t3 Single DEFAULT 2048 MYSQLD_DATADIR/test/t3.ibd
- test/t4 Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t4.ibd
+ Space_Name Page_Size Zip_Size Path
+ test/t1 DEFAULT DEFAULT MYSQLD_DATADIR/test/t1.ibd
+ test/t2 DEFAULT DEFAULT MYSQLD_DATADIR/test/t2.ibd
+-test/t3 DEFAULT 8192 MYSQLD_DATADIR/test/t3.ibd
++test/t3 DEFAULT 2048 MYSQLD_DATADIR/test/t3.ibd
+ test/t4 DEFAULT DEFAULT MYSQLD_DATADIR/test/t4.ibd
DROP TABLE t1, t2, t3, t4;
# Test 4) The maximum row size is dependent upon the page size.
@@ -51,141 +51,90 @@
diff --git a/mysql-test/suite/innodb_zip/r/page_size,8k.rdiff b/mysql-test/suite/innodb_zip/r/page_size,8k.rdiff
index 173b20a3fcf..e74b82e3215 100644
--- a/mysql-test/suite/innodb_zip/r/page_size,8k.rdiff
+++ b/mysql-test/suite/innodb_zip/r/page_size,8k.rdiff
@@ -17,12 +17,12 @@
+test/t3 5 39 PRIMARY 3 3 1 50
test/t4 5 33 PRIMARY 3 3 1 50
=== information_schema.innodb_sys_tablespaces and innodb_sys_datafiles ===
- Space_Name Space_Type Page_Size Zip_Size Path
- test/t1 Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t1.ibd
- test/t2 Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t2.ibd
--test/t3 Single DEFAULT 8192 MYSQLD_DATADIR/test/t3.ibd
-+test/t3 Single DEFAULT 4096 MYSQLD_DATADIR/test/t3.ibd
- test/t4 Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t4.ibd
+ Space_Name Page_Size Zip_Size Path
+ test/t1 DEFAULT DEFAULT MYSQLD_DATADIR/test/t1.ibd
+ test/t2 DEFAULT DEFAULT MYSQLD_DATADIR/test/t2.ibd
+-test/t3 DEFAULT 8192 MYSQLD_DATADIR/test/t3.ibd
++test/t3 DEFAULT 4096 MYSQLD_DATADIR/test/t3.ibd
+ test/t4 DEFAULT DEFAULT MYSQLD_DATADIR/test/t4.ibd
DROP TABLE t1, t2, t3, t4;
# Test 4) The maximum row size is dependent upon the page size.
@@ -53,133 +53,97 @@
diff --git a/mysql-test/suite/innodb_zip/r/page_size.result b/mysql-test/suite/innodb_zip/r/page_size.result
index 90018e2c8c2..e65a57326ec 100644
--- a/mysql-test/suite/innodb_zip/r/page_size.result
+++ b/mysql-test/suite/innodb_zip/r/page_size.result
@@ -39,11 +39,11 @@ test/t2 5 1 PRIMARY 3 3 1 50
test/t3 5 41 PRIMARY 3 3 1 50
test/t4 5 33 PRIMARY 3 3 1 50
=== information_schema.innodb_sys_tablespaces and innodb_sys_datafiles ===
-Space_Name Space_Type Page_Size Zip_Size Path
-test/t1 Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t1.ibd
-test/t2 Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t2.ibd
-test/t3 Single DEFAULT 8192 MYSQLD_DATADIR/test/t3.ibd
-test/t4 Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t4.ibd
+Space_Name Page_Size Zip_Size Path
+test/t1 DEFAULT DEFAULT MYSQLD_DATADIR/test/t1.ibd
+test/t2 DEFAULT DEFAULT MYSQLD_DATADIR/test/t2.ibd
+test/t3 DEFAULT 8192 MYSQLD_DATADIR/test/t3.ibd
+test/t4 DEFAULT DEFAULT MYSQLD_DATADIR/test/t4.ibd
DROP TABLE t1, t2, t3, t4;
# Test 4) The maximum row size is dependent upon the page size.
# Each row format has its own amount of overhead that
diff --git a/mysql-test/suite/innodb_zip/r/recover.result b/mysql-test/suite/innodb_zip/r/recover.result
index b7452655268..fddb070538d 100644
--- a/mysql-test/suite/innodb_zip/r/recover.result
+++ b/mysql-test/suite/innodb_zip/r/recover.result
@@ -1,3 +1,14 @@
+FLUSH TABLES;
+#
+# MDEV-21892 Assertion 'index != clust_index || row_get_rec_trx_id()'
+#
+connect con1,localhost,root;
+CREATE TABLE t1 (pk INT PRIMARY KEY) ENGINE=InnoDB ROW_FORMAT=COMPRESSED;
+INSERT INTO t1 VALUES (1),(2);
+BEGIN;
+UPDATE t1 SET pk=1;
+ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
+connection default;
#
# MDEV-12720 recovery fails with "Generic error"
# for ROW_FORMAT=compressed
@@ -12,6 +23,12 @@ insert into a select null, uuid() from a a, a b, a c;
SET GLOBAL innodb_flush_log_at_trx_commit=1;
COMMIT;
# restart
+disconnect con1;
+SELECT * FROM t1;
+pk
+1
+2
+DROP TABLE t1;
SELECT COUNT(*) from a;
COUNT(*)
1010
diff --git a/mysql-test/suite/innodb_zip/r/restart.result b/mysql-test/suite/innodb_zip/r/restart.result
index 5b488c277aa..59d739db5b5 100644
--- a/mysql-test/suite/innodb_zip/r/restart.result
+++ b/mysql-test/suite/innodb_zip/r/restart.result
@@ -196,33 +196,33 @@ count(*)
# Show these tables in information_schema.
#
=== information_schema.innodb_sys_tables and innodb_sys_tablespaces ===
-Table Name Tablespace Table Flags Columns Row Format Zip Size Space Type
-test/t1_restart test/t1_restart 0 8 Redundant 0 Single
-test/t2_restart test/t2_restart 1 8 Compact 0 Single
-test/t3_restart test/t3_restart 37 8 Compressed 2048 Single
-test/t4_restart test/t4_restart 33 8 Dynamic 0 Single
-test/t5_restart test/t5_restart 97 8 Dynamic 0 Single
-test/t6_restart#p#p0 test/t6_restart#p#p0 101 8 Compressed 2048 Single
-test/t6_restart#p#p1 test/t6_restart#p#p1 101 8 Compressed 2048 Single
-test/t6_restart#p#p2 test/t6_restart#p#p2 101 8 Compressed 2048 Single
-test/t7_restart#p#p0#sp#s0 test/t7_restart#p#p0#sp#s0 97 8 Dynamic 0 Single
-test/t7_restart#p#p0#sp#s1 test/t7_restart#p#p0#sp#s1 97 8 Dynamic 0 Single
-test/t7_restart#p#p1#sp#s2 test/t7_restart#p#p1#sp#s2 97 8 Dynamic 0 Single
-test/t7_restart#p#p1#sp#s3 test/t7_restart#p#p1#sp#s3 97 8 Dynamic 0 Single
+Table Name Tablespace Table Flags Columns Row Format Zip Size
+test/t1_restart test/t1_restart 0 8 Redundant 0
+test/t2_restart test/t2_restart 1 8 Compact 0
+test/t3_restart test/t3_restart 37 8 Compressed 2048
+test/t4_restart test/t4_restart 33 8 Dynamic 0
+test/t5_restart test/t5_restart 97 8 Dynamic 0
+test/t6_restart#p#p0 test/t6_restart#p#p0 101 8 Compressed 2048
+test/t6_restart#p#p1 test/t6_restart#p#p1 101 8 Compressed 2048
+test/t6_restart#p#p2 test/t6_restart#p#p2 101 8 Compressed 2048
+test/t7_restart#p#p0#sp#s0 test/t7_restart#p#p0#sp#s0 97 8 Dynamic 0
+test/t7_restart#p#p0#sp#s1 test/t7_restart#p#p0#sp#s1 97 8 Dynamic 0
+test/t7_restart#p#p1#sp#s2 test/t7_restart#p#p1#sp#s2 97 8 Dynamic 0
+test/t7_restart#p#p1#sp#s3 test/t7_restart#p#p1#sp#s3 97 8 Dynamic 0
=== information_schema.innodb_sys_tablespaces and innodb_sys_datafiles ===
-Space_Name Space_Type Page_Size Zip_Size Path
-test/t1_restart Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t1_restart.ibd
-test/t2_restart Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t2_restart.ibd
-test/t3_restart Single DEFAULT 2048 MYSQLD_DATADIR/test/t3_restart.ibd
-test/t4_restart Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t4_restart.ibd
-test/t5_restart Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t5_restart.ibd
-test/t6_restart#p#p0 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p0.ibd
-test/t6_restart#p#p1 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p1.ibd
-test/t6_restart#p#p2 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p2.ibd
-test/t7_restart#p#p0#sp#s0 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s0.ibd
-test/t7_restart#p#p0#sp#s1 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s1.ibd
-test/t7_restart#p#p1#sp#s2 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s2.ibd
-test/t7_restart#p#p1#sp#s3 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s3.ibd
+Space_Name Page_Size Zip_Size Path
+test/t1_restart DEFAULT DEFAULT MYSQLD_DATADIR/test/t1_restart.ibd
+test/t2_restart DEFAULT DEFAULT MYSQLD_DATADIR/test/t2_restart.ibd
+test/t3_restart DEFAULT 2048 MYSQLD_DATADIR/test/t3_restart.ibd
+test/t4_restart DEFAULT DEFAULT MYSQLD_DATADIR/test/t4_restart.ibd
+test/t5_restart DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t5_restart.ibd
+test/t6_restart#p#p0 DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p0.ibd
+test/t6_restart#p#p1 DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p1.ibd
+test/t6_restart#p#p2 DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p2.ibd
+test/t7_restart#p#p0#sp#s0 DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s0.ibd
+test/t7_restart#p#p0#sp#s1 DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s1.ibd
+test/t7_restart#p#p1#sp#s2 DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s2.ibd
+test/t7_restart#p#p1#sp#s3 DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s3.ibd
#
# Shutdown the server and list the tablespace OS files
#
@@ -381,33 +381,33 @@ count(*)
# Show these tables in information_schema.
#
=== information_schema.innodb_sys_tables and innodb_sys_tablespaces ===
-Table Name Tablespace Table Flags Columns Row Format Zip Size Space Type
-test/t1_restart test/t1_restart 0 8 Redundant 0 Single
-test/t2_restart test/t2_restart 1 8 Compact 0 Single
-test/t3_restart test/t3_restart 37 8 Compressed 2048 Single
-test/t4_restart test/t4_restart 33 8 Dynamic 0 Single
-test/t5_restart test/t5_restart 97 8 Dynamic 0 Single
-test/t6_restart#p#p0 test/t6_restart#p#p0 101 8 Compressed 2048 Single
-test/t6_restart#p#p1 test/t6_restart#p#p1 101 8 Compressed 2048 Single
-test/t6_restart#p#p2 test/t6_restart#p#p2 101 8 Compressed 2048 Single
-test/t7_restart#p#p0#sp#s0 test/t7_restart#p#p0#sp#s0 97 8 Dynamic 0 Single
-test/t7_restart#p#p0#sp#s1 test/t7_restart#p#p0#sp#s1 97 8 Dynamic 0 Single
-test/t7_restart#p#p1#sp#s2 test/t7_restart#p#p1#sp#s2 97 8 Dynamic 0 Single
-test/t7_restart#p#p1#sp#s3 test/t7_restart#p#p1#sp#s3 97 8 Dynamic 0 Single
+Table Name Tablespace Table Flags Columns Row Format Zip Size
+test/t1_restart test/t1_restart 0 8 Redundant 0
+test/t2_restart test/t2_restart 1 8 Compact 0
+test/t3_restart test/t3_restart 37 8 Compressed 2048
+test/t4_restart test/t4_restart 33 8 Dynamic 0
+test/t5_restart test/t5_restart 97 8 Dynamic 0
+test/t6_restart#p#p0 test/t6_restart#p#p0 101 8 Compressed 2048
+test/t6_restart#p#p1 test/t6_restart#p#p1 101 8 Compressed 2048
+test/t6_restart#p#p2 test/t6_restart#p#p2 101 8 Compressed 2048
+test/t7_restart#p#p0#sp#s0 test/t7_restart#p#p0#sp#s0 97 8 Dynamic 0
+test/t7_restart#p#p0#sp#s1 test/t7_restart#p#p0#sp#s1 97 8 Dynamic 0
+test/t7_restart#p#p1#sp#s2 test/t7_restart#p#p1#sp#s2 97 8 Dynamic 0
+test/t7_restart#p#p1#sp#s3 test/t7_restart#p#p1#sp#s3 97 8 Dynamic 0
=== information_schema.innodb_sys_tablespaces and innodb_sys_datafiles ===
-Space_Name Space_Type Page_Size Zip_Size Path
-test/t1_restart Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t1_restart.ibd
-test/t2_restart Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t2_restart.ibd
-test/t3_restart Single DEFAULT 2048 MYSQLD_DATADIR/test/t3_restart.ibd
-test/t4_restart Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t4_restart.ibd
-test/t5_restart Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t5_restart.ibd
-test/t6_restart#p#p0 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p0.ibd
-test/t6_restart#p#p1 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p1.ibd
-test/t6_restart#p#p2 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p2.ibd
-test/t7_restart#p#p0#sp#s0 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s0.ibd
-test/t7_restart#p#p0#sp#s1 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s1.ibd
-test/t7_restart#p#p1#sp#s2 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s2.ibd
-test/t7_restart#p#p1#sp#s3 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s3.ibd
+Space_Name Page_Size Zip_Size Path
+test/t1_restart DEFAULT DEFAULT MYSQLD_DATADIR/test/t1_restart.ibd
+test/t2_restart DEFAULT DEFAULT MYSQLD_DATADIR/test/t2_restart.ibd
+test/t3_restart DEFAULT 2048 MYSQLD_DATADIR/test/t3_restart.ibd
+test/t4_restart DEFAULT DEFAULT MYSQLD_DATADIR/test/t4_restart.ibd
+test/t5_restart DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t5_restart.ibd
+test/t6_restart#p#p0 DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p0.ibd
+test/t6_restart#p#p1 DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p1.ibd
+test/t6_restart#p#p2 DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p2.ibd
+test/t7_restart#p#p0#sp#s0 DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s0.ibd
+test/t7_restart#p#p0#sp#s1 DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s1.ibd
+test/t7_restart#p#p1#sp#s2 DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s2.ibd
+test/t7_restart#p#p1#sp#s3 DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s3.ibd
DROP TABLE t1_restart;
DROP TABLE t2_restart;
DROP TABLE t3_restart;
@@ -418,16 +418,16 @@ TRUNCATE TABLE t5_restart;
ALTER TABLE t6_restart TRUNCATE PARTITION p2;
ALTER TABLE t7_restart TRUNCATE PARTITION p1;
=== information_schema.innodb_sys_tablespaces and innodb_sys_datafiles ===
-Space_Name Space_Type Page_Size Zip_Size Path
-test/t4_restart Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t4_restart.ibd
-test/t6_restart#p#p0 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p0.ibd
-test/t6_restart#p#p1 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p1.ibd
-test/t7_restart#p#p0#sp#s0 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s0.ibd
-test/t7_restart#p#p0#sp#s1 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s1.ibd
-test/t5_restart Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t5_restart.ibd
-test/t6_restart#p#p2 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p2.ibd
-test/t7_restart#p#p1#sp#s2 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s2.ibd
-test/t7_restart#p#p1#sp#s3 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s3.ibd
+Space_Name Page_Size Zip_Size Path
+test/t4_restart DEFAULT DEFAULT MYSQLD_DATADIR/test/t4_restart.ibd
+test/t6_restart#p#p0 DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p0.ibd
+test/t6_restart#p#p1 DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p1.ibd
+test/t7_restart#p#p0#sp#s0 DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s0.ibd
+test/t7_restart#p#p0#sp#s1 DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s1.ibd
+test/t5_restart DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t5_restart.ibd
+test/t6_restart#p#p2 DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p2.ibd
+test/t7_restart#p#p1#sp#s2 DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s2.ibd
+test/t7_restart#p#p1#sp#s3 DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s3.ibd
INSERT INTO t5_restart VALUES (1000000000, 'MySQL', 'InnoDB', '2011-11-11', 'Read this after reboot');
INSERT INTO t5_restart (SELECT 0, c2, c3, c4, c5 FROM t5_restart);
INSERT INTO t5_restart (SELECT 0, c2, c3, c4, c5 FROM t5_restart);
@@ -523,16 +523,16 @@ SHOW VARIABLES LIKE 'innodb_file_per_table';
Variable_name Value
innodb_file_per_table ON
=== information_schema.innodb_sys_tablespaces and innodb_sys_datafiles ===
-Space_Name Space_Type Page_Size Zip_Size Path
-test/t4_restart Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t4_restart.ibd
-test/t6_restart#p#p0 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p0.ibd
-test/t6_restart#p#p1 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p1.ibd
-test/t7_restart#p#p0#sp#s0 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s0.ibd
-test/t7_restart#p#p0#sp#s1 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s1.ibd
-test/t5_restart Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t5_restart.ibd
-test/t6_restart#p#p2 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p2.ibd
-test/t7_restart#p#p1#sp#s2 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s2.ibd
-test/t7_restart#p#p1#sp#s3 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s3.ibd
+Space_Name Page_Size Zip_Size Path
+test/t4_restart DEFAULT DEFAULT MYSQLD_DATADIR/test/t4_restart.ibd
+test/t6_restart#p#p0 DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p0.ibd
+test/t6_restart#p#p1 DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p1.ibd
+test/t7_restart#p#p0#sp#s0 DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s0.ibd
+test/t7_restart#p#p0#sp#s1 DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s1.ibd
+test/t5_restart DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t5_restart.ibd
+test/t6_restart#p#p2 DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p2.ibd
+test/t7_restart#p#p1#sp#s2 DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s2.ibd
+test/t7_restart#p#p1#sp#s3 DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s3.ibd
SELECT count(*) FROM t5_restart;
count(*)
8
@@ -624,16 +624,16 @@ RENAME TABLE t5_restart TO t55_restart;
RENAME TABLE t6_restart TO t66_restart;
RENAME TABLE t7_restart TO t77_restart;
=== information_schema.innodb_sys_tablespaces and innodb_sys_datafiles ===
-Space_Name Space_Type Page_Size Zip_Size Path
-test/t4_restart Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t4_restart.ibd
-test/t66_restart#p#p0 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p0.ibd
-test/t66_restart#p#p1 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p1.ibd
-test/t77_restart#p#p0#sp#s0 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p0#sp#s0.ibd
-test/t77_restart#p#p0#sp#s1 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p0#sp#s1.ibd
-test/t55_restart Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t55_restart.ibd
-test/t66_restart#p#p2 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p2.ibd
-test/t77_restart#p#p1#sp#s2 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p1#sp#s2.ibd
-test/t77_restart#p#p1#sp#s3 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p1#sp#s3.ibd
+Space_Name Page_Size Zip_Size Path
+test/t4_restart DEFAULT DEFAULT MYSQLD_DATADIR/test/t4_restart.ibd
+test/t66_restart#p#p0 DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p0.ibd
+test/t66_restart#p#p1 DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p1.ibd
+test/t77_restart#p#p0#sp#s0 DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p0#sp#s0.ibd
+test/t77_restart#p#p0#sp#s1 DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p0#sp#s1.ibd
+test/t55_restart DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t55_restart.ibd
+test/t66_restart#p#p2 DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p2.ibd
+test/t77_restart#p#p1#sp#s2 DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p1#sp#s2.ibd
+test/t77_restart#p#p1#sp#s3 DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p1#sp#s3.ibd
INSERT INTO t55_restart (SELECT 0, c2, c3, c4, c5 FROM t55_restart);
SELECT count(*) FROM t55_restart;
count(*)
@@ -722,16 +722,16 @@ SHOW VARIABLES LIKE 'innodb_file_per_table';
Variable_name Value
innodb_file_per_table ON
=== information_schema.innodb_sys_tablespaces and innodb_sys_datafiles ===
-Space_Name Space_Type Page_Size Zip_Size Path
-test/t4_restart Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t4_restart.ibd
-test/t66_restart#p#p0 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p0.ibd
-test/t66_restart#p#p1 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p1.ibd
-test/t77_restart#p#p0#sp#s0 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p0#sp#s0.ibd
-test/t77_restart#p#p0#sp#s1 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p0#sp#s1.ibd
-test/t55_restart Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t55_restart.ibd
-test/t66_restart#p#p2 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p2.ibd
-test/t77_restart#p#p1#sp#s2 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p1#sp#s2.ibd
-test/t77_restart#p#p1#sp#s3 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p1#sp#s3.ibd
+Space_Name Page_Size Zip_Size Path
+test/t4_restart DEFAULT DEFAULT MYSQLD_DATADIR/test/t4_restart.ibd
+test/t66_restart#p#p0 DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p0.ibd
+test/t66_restart#p#p1 DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p1.ibd
+test/t77_restart#p#p0#sp#s0 DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p0#sp#s0.ibd
+test/t77_restart#p#p0#sp#s1 DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p0#sp#s1.ibd
+test/t55_restart DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t55_restart.ibd
+test/t66_restart#p#p2 DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p2.ibd
+test/t77_restart#p#p1#sp#s2 DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p1#sp#s2.ibd
+test/t77_restart#p#p1#sp#s3 DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p1#sp#s3.ibd
INSERT INTO t55_restart (SELECT 0, c2, c3, c4, c5 FROM t55_restart);
SELECT count(*) FROM t55_restart;
count(*)
@@ -856,16 +856,16 @@ t77_restart#p#p1#sp#s3.ibd
#
# restart
=== information_schema.innodb_sys_tablespaces and innodb_sys_datafiles ===
-Space_Name Space_Type Page_Size Zip_Size Path
-test/t4_restart Single DEFAULT DEFAULT MYSQL_TMP_DIR/new_dir/test/t4_restart.ibd
-test/t66_restart#p#p0 Single DEFAULT DEFAULT MYSQL_TMP_DIR/new_dir/test/t66_restart#p#p0.ibd
-test/t66_restart#p#p1 Single DEFAULT DEFAULT MYSQL_TMP_DIR/new_dir/test/t66_restart#p#p1.ibd
-test/t77_restart#p#p0#sp#s0 Single DEFAULT DEFAULT MYSQL_TMP_DIR/new_dir/test/t77_restart#p#p0#sp#s0.ibd
-test/t77_restart#p#p0#sp#s1 Single DEFAULT DEFAULT MYSQL_TMP_DIR/new_dir/test/t77_restart#p#p0#sp#s1.ibd
-test/t55_restart Single DEFAULT DEFAULT MYSQL_TMP_DIR/new_dir/test/t55_restart.ibd
-test/t66_restart#p#p2 Single DEFAULT DEFAULT MYSQL_TMP_DIR/new_dir/test/t66_restart#p#p2.ibd
-test/t77_restart#p#p1#sp#s2 Single DEFAULT DEFAULT MYSQL_TMP_DIR/new_dir/test/t77_restart#p#p1#sp#s2.ibd
-test/t77_restart#p#p1#sp#s3 Single DEFAULT DEFAULT MYSQL_TMP_DIR/new_dir/test/t77_restart#p#p1#sp#s3.ibd
+Space_Name Page_Size Zip_Size Path
+test/t4_restart DEFAULT DEFAULT MYSQL_TMP_DIR/new_dir/test/t4_restart.ibd
+test/t66_restart#p#p0 DEFAULT DEFAULT MYSQL_TMP_DIR/new_dir/test/t66_restart#p#p0.ibd
+test/t66_restart#p#p1 DEFAULT DEFAULT MYSQL_TMP_DIR/new_dir/test/t66_restart#p#p1.ibd
+test/t77_restart#p#p0#sp#s0 DEFAULT DEFAULT MYSQL_TMP_DIR/new_dir/test/t77_restart#p#p0#sp#s0.ibd
+test/t77_restart#p#p0#sp#s1 DEFAULT DEFAULT MYSQL_TMP_DIR/new_dir/test/t77_restart#p#p0#sp#s1.ibd
+test/t55_restart DEFAULT DEFAULT MYSQL_TMP_DIR/new_dir/test/t55_restart.ibd
+test/t66_restart#p#p2 DEFAULT DEFAULT MYSQL_TMP_DIR/new_dir/test/t66_restart#p#p2.ibd
+test/t77_restart#p#p1#sp#s2 DEFAULT DEFAULT MYSQL_TMP_DIR/new_dir/test/t77_restart#p#p1#sp#s2.ibd
+test/t77_restart#p#p1#sp#s3 DEFAULT DEFAULT MYSQL_TMP_DIR/new_dir/test/t77_restart#p#p1#sp#s3.ibd
INSERT INTO t4_restart (SELECT 0, c2, c3, c4, c5 FROM t4_restart);
SELECT count(*) FROM t4_restart;
count(*)
@@ -994,16 +994,16 @@ t77_restart.par
#
# restart
=== information_schema.innodb_sys_tablespaces and innodb_sys_datafiles ===
-Space_Name Space_Type Page_Size Zip_Size Path
-test/t4_restart Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t4_restart.ibd
-test/t66_restart#p#p0 Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t66_restart#p#p0.ibd
-test/t66_restart#p#p1 Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t66_restart#p#p1.ibd
-test/t77_restart#p#p0#sp#s0 Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t77_restart#p#p0#sp#s0.ibd
-test/t77_restart#p#p0#sp#s1 Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t77_restart#p#p0#sp#s1.ibd
-test/t55_restart Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t55_restart.ibd
-test/t66_restart#p#p2 Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t66_restart#p#p2.ibd
-test/t77_restart#p#p1#sp#s2 Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t77_restart#p#p1#sp#s2.ibd
-test/t77_restart#p#p1#sp#s3 Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t77_restart#p#p1#sp#s3.ibd
+Space_Name Page_Size Zip_Size Path
+test/t4_restart DEFAULT DEFAULT MYSQLD_DATADIR/test/t4_restart.ibd
+test/t66_restart#p#p0 DEFAULT DEFAULT MYSQLD_DATADIR/test/t66_restart#p#p0.ibd
+test/t66_restart#p#p1 DEFAULT DEFAULT MYSQLD_DATADIR/test/t66_restart#p#p1.ibd
+test/t77_restart#p#p0#sp#s0 DEFAULT DEFAULT MYSQLD_DATADIR/test/t77_restart#p#p0#sp#s0.ibd
+test/t77_restart#p#p0#sp#s1 DEFAULT DEFAULT MYSQLD_DATADIR/test/t77_restart#p#p0#sp#s1.ibd
+test/t55_restart DEFAULT DEFAULT MYSQLD_DATADIR/test/t55_restart.ibd
+test/t66_restart#p#p2 DEFAULT DEFAULT MYSQLD_DATADIR/test/t66_restart#p#p2.ibd
+test/t77_restart#p#p1#sp#s2 DEFAULT DEFAULT MYSQLD_DATADIR/test/t77_restart#p#p1#sp#s2.ibd
+test/t77_restart#p#p1#sp#s3 DEFAULT DEFAULT MYSQLD_DATADIR/test/t77_restart#p#p1#sp#s3.ibd
INSERT INTO t4_restart (SELECT 0, c2, c3, c4, c5 FROM t4_restart);
SELECT count(*) FROM t4_restart;
count(*)
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 02593bcd7d3..fccee685caf 100644
--- a/mysql-test/suite/innodb_zip/r/wl5522_debug_zip.result
+++ b/mysql-test/suite/innodb_zip/r/wl5522_debug_zip.result
@@ -3,6 +3,12 @@ call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .* becau
call mtr.add_suppression("InnoDB: Page 0 at offset 0 looks corrupted in file");
call mtr.add_suppression("InnoDB: Page for tablespace ");
call mtr.add_suppression("InnoDB: Invalid FSP_SPACE_FLAGS=0x");
+call mtr.add_suppression("InnoDB: Unknown index id .* on page");
+call mtr.add_suppression("InnoDB: Operating system error number");
+call mtr.add_suppression("InnoDB: The error means");
+call mtr.add_suppression("InnoDB: If you are installing InnoDB");
+call mtr.add_suppression("InnoDB: Cannot open datafile .*t1\\.ibd");
+call mtr.add_suppression("InnoDB: Ignoring tablespace for `test`\\.`t1`");
FLUSH TABLES;
SET SESSION innodb_strict_mode=1;
CREATE TABLE t1 (c1 INT) ENGINE = Innodb
@@ -119,9 +125,6 @@ ROW_FORMAT=COMPRESSED;
connect purge_control,localhost,root;
START TRANSACTION WITH CONSISTENT SNAPSHOT;
connection default;
-SET GLOBAL innodb_disable_background_merge=ON;
-SET GLOBAL innodb_monitor_reset = ibuf_merges;
-SET GLOBAL innodb_monitor_reset = ibuf_merges_insert;
INSERT INTO t1
SELECT 1 + seq, 1 + (seq MOD 4),
REPEAT(SUBSTR('abcd', 1 + (seq MOD 4), 1), 2048),
@@ -160,12 +163,6 @@ t1 CREATE TABLE `t1` (
FLUSH TABLES t1 FOR EXPORT;
backup: t1
UNLOCK TABLES;
-SELECT name FROM information_schema.innodb_metrics
-WHERE name IN ('ibuf_merges','ibuf_merges_insert') AND count>0 ORDER BY name;
-name
-ibuf_merges
-ibuf_merges_insert
-SET GLOBAL innodb_disable_background_merge=OFF;
connection purge_control;
COMMIT;
disconnect purge_control;
@@ -367,8 +364,6 @@ SELECT COUNT(*) FROM t1;
ERROR HY000: Tablespace has been discarded for table `t1`
SET SESSION debug_dbug="+d,ib_import_create_index_failure_1";
ALTER TABLE t1 ADD INDEX idx(c1);
-Warnings:
-Warning 1814 Tablespace has been discarded for table `t1`
SET SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE t1;
unlink: t1.ibd
@@ -412,9 +407,3 @@ SET SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE t1;
unlink: t1.ibd
unlink: t1.cfg
-set global innodb_monitor_disable = all;
-set global innodb_monitor_reset_all = all;
-set global innodb_monitor_enable = default;
-set global innodb_monitor_disable = default;
-set global innodb_monitor_reset = default;
-set global innodb_monitor_reset_all = default;
diff --git a/mysql-test/suite/innodb_zip/r/wl5522_zip.result b/mysql-test/suite/innodb_zip/r/wl5522_zip.result
index 49121b906ce..c0fddf7e8ed 100644
--- a/mysql-test/suite/innodb_zip/r/wl5522_zip.result
+++ b/mysql-test/suite/innodb_zip/r/wl5522_zip.result
@@ -231,13 +231,13 @@ restore: t1 .ibd and .cfg files
ALTER TABLE t1 IMPORT TABLESPACE;
ERROR HY000: Schema mismatch (Index x not found in tablespace meta-data file.)
ALTER TABLE t1 DROP INDEX x;
-Warnings:
-Warning 1814 Tablespace has been discarded for table `t1`
ALTER TABLE t1 ADD INDEX idx(c2);
Warnings:
Warning 1814 Tablespace has been discarded for table `t1`
restore: t1 .ibd and .cfg files
ALTER TABLE t1 IMPORT TABLESPACE;
+Warnings:
+Warning 1814 Tablespace has been discarded for table `t1`
CHECK TABLE t1;
Table Op Msg_type Msg_text
test.t1 check status OK
diff --git a/mysql-test/suite/innodb_zip/t/blob.test b/mysql-test/suite/innodb_zip/t/blob.test
new file mode 100644
index 00000000000..b85cf7313d0
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/t/blob.test
@@ -0,0 +1,29 @@
+--source include/innodb_page_size_small.inc
+
+--echo #
+--echo # MDEV-21259 Assertion 'w != NORMAL || mach_read_from_4(ptr) != val'
+--echo # failed in mtr_t::write(), btr_free_externally_stored_field()
+--echo #
+
+SET @saved_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency;
+SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;
+
+CREATE TABLE t1 (c TEXT, f2 INT PRIMARY KEY, f3 INT UNIQUE)
+ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
+
+SET @level= @@GLOBAL.innodb_compression_level;
+SET GLOBAL innodb_compression_level=0;
+--connect (prevent_purge,localhost,root)
+START TRANSACTION WITH CONSISTENT SNAPSHOT;
+
+--connection default
+INSERT INTO t1 VALUES('a',1,0);
+UPDATE t1 SET c= REPEAT('a b ',4096);
+REPLACE INTO t1 SELECT * FROM t1;
+
+--disconnect prevent_purge
+--source ../../innodb/include/wait_all_purged.inc
+
+DROP TABLE t1;
+SET GLOBAL innodb_compression_level = @level;
+SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency;
diff --git a/mysql-test/suite/innodb_zip/t/cmp_per_index.opt b/mysql-test/suite/innodb_zip/t/cmp_per_index.opt
index a031a64fc6c..37aab727b87 100644
--- a/mysql-test/suite/innodb_zip/t/cmp_per_index.opt
+++ b/mysql-test/suite/innodb_zip/t/cmp_per_index.opt
@@ -1,2 +1 @@
---innodb_log_compressed_pages=on
--innodb_cmp_per_index_reset
diff --git a/mysql-test/suite/innodb_zip/t/cmp_per_index.test b/mysql-test/suite/innodb_zip/t/cmp_per_index.test
index 74ed17b1213..02c07305b88 100644
--- a/mysql-test/suite/innodb_zip/t/cmp_per_index.test
+++ b/mysql-test/suite/innodb_zip/t/cmp_per_index.test
@@ -4,16 +4,6 @@
-- source include/have_innodb.inc
-# Using innodb_log_compressed=0 leads to a larger number of page
-# compressions, because page_cur_insert_rec_zip() will reorganize the
-# page before attempting an insert followed by page compression and
-# page_zip_compress_write_log_no_data().
-
-if (`SELECT @@innodb_log_compressed_pages = 0`)
-{
- --skip Needs innodb_log_compressed_pages
-}
-
# numbers read in this test depend on the page size
-- source include/have_innodb_16k.inc
# include/restart_mysqld.inc does not work in embedded mode
@@ -86,10 +76,8 @@ SELECT
database_name,
table_name,
index_name,
-CASE WHEN compress_ops=47 and @@innodb_compression_level IN (4,8,9) THEN 65
-ELSE compress_ops END as compress_ops,
-CASE WHEN compress_ops_ok=47 and @@innodb_compression_level IN (4,8,9) THEN 65
-ELSE compress_ops_ok END as compress_ops_ok,
+compress_ops,
+compress_ops_ok,
uncompress_ops
FROM information_schema.innodb_cmp_per_index
ORDER BY 1, 2, 3;
diff --git a/mysql-test/suite/innodb_zip/t/large_blob-master.opt b/mysql-test/suite/innodb_zip/t/large_blob-master.opt
index 90a3f0db9d4..7142e676f01 100644
--- a/mysql-test/suite/innodb_zip/t/large_blob-master.opt
+++ b/mysql-test/suite/innodb_zip/t/large_blob-master.opt
@@ -1,3 +1 @@
--max_allowed_packet=200M
---innodb_buffer_pool_size=10M
---innodb_log_buffer_size=10M
diff --git a/mysql-test/suite/innodb_zip/t/recover.test b/mysql-test/suite/innodb_zip/t/recover.test
index f32ff3d3783..194ef10a8ef 100644
--- a/mysql-test/suite/innodb_zip/t/recover.test
+++ b/mysql-test/suite/innodb_zip/t/recover.test
@@ -1,12 +1,21 @@
--source include/innodb_page_size_small.inc
--source include/not_embedded.inc
---disable_query_log
# This test kills the server, which could corrupt some mysql.* tables
# that are not created with ENGINE=InnoDB.
# Flush any non-InnoDB tables to prevent that from happening.
FLUSH TABLES;
---enable_query_log
+
+--echo #
+--echo # MDEV-21892 Assertion 'index != clust_index || row_get_rec_trx_id()'
+--echo #
+connect (con1,localhost,root);
+CREATE TABLE t1 (pk INT PRIMARY KEY) ENGINE=InnoDB ROW_FORMAT=COMPRESSED;
+INSERT INTO t1 VALUES (1),(2);
+BEGIN;
+--error ER_DUP_ENTRY
+UPDATE t1 SET pk=1;
+connection default;
--echo #
--echo # MDEV-12720 recovery fails with "Generic error"
@@ -25,6 +34,9 @@ COMMIT;
--let $shutdown_timeout=0
--source include/restart_mysqld.inc
+disconnect con1;
+SELECT * FROM t1;
+DROP TABLE t1;
SELECT COUNT(*) from a;
DROP TABLE a;
diff --git a/mysql-test/suite/innodb_zip/t/restart.test b/mysql-test/suite/innodb_zip/t/restart.test
index e0e42a682ab..6a0e60f3ce6 100644
--- a/mysql-test/suite/innodb_zip/t/restart.test
+++ b/mysql-test/suite/innodb_zip/t/restart.test
@@ -163,14 +163,22 @@ SELECT count(*) FROM t7_restart;
--echo #
--source include/shutdown_mysqld.inc
+--let $regexp=/#sql-ib[0-9a-f]+\.ibd\n//
+
--echo ---- MYSQL_DATA_DIR/test
+--list_files_write_file $MYSQLD_DATADIR.files.txt $MYSQL_DATA_DIR/test
+--replace_regex $regexp
--replace_result #P# #p# #SP# #sp#
---list_files $MYSQL_DATA_DIR/test
+--cat_file $MYSQLD_DATADIR.files.txt
+--remove_file $MYSQLD_DATADIR.files.txt
--echo ---- MYSQL_TMP_DIR/alt_dir
--list_files $MYSQL_TMP_DIR/alt_dir
--echo ---- MYSQL_TMP_DIR/alt_dir/test
+--list_files_write_file $MYSQLD_DATADIR.files.txt $MYSQL_TMP_DIR/alt_dir/test
+--replace_regex $regexp
--replace_result #P# #p# #SP# #sp#
---list_files $MYSQL_TMP_DIR/alt_dir/test
+--cat_file $MYSQLD_DATADIR.files.txt
+--remove_file $MYSQLD_DATADIR.files.txt
--echo #
--echo # Start the server and show that tables are still visible and accessible.
@@ -255,11 +263,17 @@ SHOW CREATE TABLE t7_restart;
--copy_file $MYSQL_DATA_DIR/test/t5_restart.frm $MYSQL_DATA_DIR/test/t5_restart.frm.bak
--echo ---- MYSQL_DATA_DIR/test
+--list_files_write_file $MYSQLD_DATADIR.files.txt $MYSQL_DATA_DIR/test
+--replace_regex $regexp
--replace_result #P# #p# #SP# #sp#
---list_files $MYSQL_DATA_DIR/test
+--cat_file $MYSQLD_DATADIR.files.txt
+--remove_file $MYSQLD_DATADIR.files.txt
--echo ---- MYSQL_TMP_DIR/alt_dir/test
+--list_files_write_file $MYSQLD_DATADIR.files.txt $MYSQL_TMP_DIR/alt_dir/test
+--replace_regex $regexp
--replace_result #P# #p# #SP# #sp#
---list_files $MYSQL_TMP_DIR/alt_dir/test
+--cat_file $MYSQLD_DATADIR.files.txt
+--remove_file $MYSQLD_DATADIR.files.txt
--echo #
--echo # Start the server and show the tablespaces.
@@ -306,11 +320,17 @@ RENAME TABLE t5_restart TO t55_restart;
--remove_file $MYSQL_TMP_DIR/alt_dir/test/t5_restart.ibd.bak
--echo ---- MYSQL_DATA_DIR/test
+--list_files_write_file $MYSQLD_DATADIR.files.txt $MYSQL_DATA_DIR/test
+--replace_regex $regexp
--replace_result #P# #p# #SP# #sp#
---list_files $MYSQL_DATA_DIR/test
+--cat_file $MYSQLD_DATADIR.files.txt
+--remove_file $MYSQLD_DATADIR.files.txt
--echo ---- MYSQL_TMP_DIR/alt_dir/test
+--list_files_write_file $MYSQLD_DATADIR.files.txt $MYSQL_TMP_DIR/alt_dir/test
+--replace_regex $regexp
--replace_result #P# #p# #SP# #sp#
---list_files $MYSQL_TMP_DIR/alt_dir/test
+--cat_file $MYSQLD_DATADIR.files.txt
+--remove_file $MYSQLD_DATADIR.files.txt
--echo #
--echo # Rename file table and tablespace
@@ -338,11 +358,17 @@ SELECT count(*) FROM t77_restart;
SHOW CREATE TABLE t77_restart;
--echo ---- MYSQL_DATA_DIR/test
+--list_files_write_file $MYSQLD_DATADIR.files.txt $MYSQL_DATA_DIR/test
+--replace_regex $regexp
--replace_result #P# #p# #SP# #sp#
---list_files $MYSQL_DATA_DIR/test
+--cat_file $MYSQLD_DATADIR.files.txt
+--remove_file $MYSQLD_DATADIR.files.txt
--echo ---- MYSQL_TMP_DIR/alt_dir/test
+--list_files_write_file $MYSQLD_DATADIR.files.txt $MYSQL_TMP_DIR/alt_dir/test
+--replace_regex $regexp
--replace_result #P# #p# #SP# #sp#
---list_files $MYSQL_TMP_DIR/alt_dir/test
+--cat_file $MYSQLD_DATADIR.files.txt
+--remove_file $MYSQLD_DATADIR.files.txt
--echo #
--echo # Restart the server
@@ -378,14 +404,23 @@ SHOW CREATE TABLE t77_restart;
--mkdir $MYSQL_TMP_DIR/new_dir
--mkdir $MYSQL_TMP_DIR/new_dir/test
--echo ---- MYSQL_DATA_DIR/test
+--list_files_write_file $MYSQLD_DATADIR.files.txt $MYSQL_DATA_DIR/test
+--replace_regex $regexp
--replace_result #P# #p# #SP# #sp#
---list_files $MYSQL_DATA_DIR/test
+--cat_file $MYSQLD_DATADIR.files.txt
+--remove_file $MYSQLD_DATADIR.files.txt
--echo ---- MYSQL_TMP_DIR/alt_dir/test
+--list_files_write_file $MYSQLD_DATADIR.files.txt $MYSQL_TMP_DIR/alt_dir/test
+--replace_regex $regexp
--replace_result #P# #p# #SP# #sp#
---list_files $MYSQL_TMP_DIR/alt_dir/test
+--cat_file $MYSQLD_DATADIR.files.txt
+--remove_file $MYSQLD_DATADIR.files.txt
--echo ---- MYSQL_TMP_DIR/new_dir/test
+--list_files_write_file $MYSQLD_DATADIR.files.txt $MYSQL_TMP_DIR/new_dir/test
+--replace_regex $regexp
--replace_result #P# #p# #SP# #sp#
---list_files $MYSQL_TMP_DIR/new_dir/test
+--cat_file $MYSQLD_DATADIR.files.txt
+--remove_file $MYSQLD_DATADIR.files.txt
--echo # Moving tablespace 't4_restart' from MYSQL_DATA_DIR to MYSQL_TMP_DIR/new_dir
--copy_file $MYSQL_DATA_DIR/test/t4_restart.ibd $MYSQL_TMP_DIR/new_dir/test/t4_restart.ibd
@@ -431,14 +466,23 @@ SHOW CREATE TABLE t77_restart;
--exec echo $MYSQL_TMP_DIR/new_dir/test/t77_restart#P#p1#SP#s3.ibd > $MYSQL_DATA_DIR/test/t77_restart#P#p1#SP#s3.isl
--echo ---- MYSQL_DATA_DIR/test
+--list_files_write_file $MYSQLD_DATADIR.files.txt $MYSQL_DATA_DIR/test
+--replace_regex $regexp
--replace_result #P# #p# #SP# #sp#
---list_files $MYSQL_DATA_DIR/test
+--cat_file $MYSQLD_DATADIR.files.txt
+--remove_file $MYSQLD_DATADIR.files.txt
--echo ---- MYSQL_TMP_DIR/alt_dir/test
+--list_files_write_file $MYSQLD_DATADIR.files.txt $MYSQL_TMP_DIR/alt_dir/test
+--replace_regex $regexp
--replace_result #P# #p# #SP# #sp#
---list_files $MYSQL_TMP_DIR/alt_dir/test
+--cat_file $MYSQLD_DATADIR.files.txt
+--remove_file $MYSQLD_DATADIR.files.txt
--echo ---- MYSQL_TMP_DIR/new_dir/test
+--list_files_write_file $MYSQLD_DATADIR.files.txt $MYSQL_TMP_DIR/new_dir/test
+--replace_regex $regexp
--replace_result #P# #p# #SP# #sp#
---list_files $MYSQL_TMP_DIR/new_dir/test
+--cat_file $MYSQLD_DATADIR.files.txt
+--remove_file $MYSQLD_DATADIR.files.txt
--echo #
--echo # Start the server and check tablespaces.
@@ -478,11 +522,17 @@ SHOW CREATE TABLE t77_restart;
--echo #
--echo ---- MYSQL_DATA_DIR/test
+--list_files_write_file $MYSQLD_DATADIR.files.txt $MYSQL_DATA_DIR/test
+--replace_regex $regexp
--replace_result #P# #p# #SP# #sp#
---list_files $MYSQL_DATA_DIR/test
+--cat_file $MYSQLD_DATADIR.files.txt
+--remove_file $MYSQLD_DATADIR.files.txt
--echo ---- MYSQL_TMP_DIR/new_dir/test
+--list_files_write_file $MYSQLD_DATADIR.files.txt $MYSQL_TMP_DIR/new_dir/test
+--replace_regex $regexp
--replace_result #P# #p# #SP# #sp#
---list_files $MYSQL_TMP_DIR/new_dir/test
+--cat_file $MYSQLD_DATADIR.files.txt
+--remove_file $MYSQLD_DATADIR.files.txt
--echo # Moving 't4_restart' from MYSQL_TMP_DIR/new_dir to MYSQL_DATA_DIR
--copy_file $MYSQL_TMP_DIR/new_dir/test/t4_restart.ibd $MYSQL_DATA_DIR/test/t4_restart.ibd
@@ -520,11 +570,17 @@ SHOW CREATE TABLE t77_restart;
--remove_file $MYSQL_DATA_DIR/test/t77_restart#P#p1#SP#s3.isl
--echo ---- MYSQL_DATA_DIR/test
+--list_files_write_file $MYSQLD_DATADIR.files.txt $MYSQL_DATA_DIR/test
+--replace_regex $regexp
--replace_result #P# #p# #SP# #sp#
---list_files $MYSQL_DATA_DIR/test
+--cat_file $MYSQLD_DATADIR.files.txt
+--remove_file $MYSQLD_DATADIR.files.txt
--echo ---- MYSQL_TMP_DIR/new_dir/test
+--list_files_write_file $MYSQLD_DATADIR.files.txt $MYSQL_TMP_DIR/new_dir/test
+--replace_regex $regexp
--replace_result #P# #p# #SP# #sp#
---list_files $MYSQL_TMP_DIR/new_dir/test
+--cat_file $MYSQLD_DATADIR.files.txt
+--remove_file $MYSQLD_DATADIR.files.txt
--echo #
--echo # Start the server and check tablespaces.
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 a060acc19a9..282469f0a0c 100644
--- a/mysql-test/suite/innodb_zip/t/wl5522_debug_zip.test
+++ b/mysql-test/suite/innodb_zip/t/wl5522_debug_zip.test
@@ -19,6 +19,12 @@ call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .* becau
call mtr.add_suppression("InnoDB: Page 0 at offset 0 looks corrupted in file");
call mtr.add_suppression("InnoDB: Page for tablespace ");
call mtr.add_suppression("InnoDB: Invalid FSP_SPACE_FLAGS=0x");
+call mtr.add_suppression("InnoDB: Unknown index id .* on page");
+call mtr.add_suppression("InnoDB: Operating system error number");
+call mtr.add_suppression("InnoDB: The error means");
+call mtr.add_suppression("InnoDB: If you are installing InnoDB");
+call mtr.add_suppression("InnoDB: Cannot open datafile .*t1\\.ibd");
+call mtr.add_suppression("InnoDB: Ignoring tablespace for `test`\\.`t1`");
FLUSH TABLES;
let MYSQLD_DATADIR =`SELECT @@datadir`;
@@ -277,14 +283,6 @@ EOF
DROP TABLE t1;
---disable_query_log
-# Enable metrics for the counters we are going to use
-set global innodb_monitor_enable = purge_stop_count;
-set global innodb_monitor_enable = purge_resume_count;
-set global innodb_monitor_enable = ibuf_merges;
-set global innodb_monitor_enable = ibuf_merges_insert;
---enable_query_log
-
#
# Create a large table with delete marked records, disable purge during
# the update so that we can test the IMPORT purge code.
@@ -304,12 +302,6 @@ connect (purge_control,localhost,root);
START TRANSACTION WITH CONSISTENT SNAPSHOT;
connection default;
-# Disable change buffer merge from the master thread, additionally
-# enable aggressive flushing so that more changes are buffered.
-SET GLOBAL innodb_disable_background_merge=ON;
-SET GLOBAL innodb_monitor_reset = ibuf_merges;
-SET GLOBAL innodb_monitor_reset = ibuf_merges_insert;
-
INSERT INTO t1
SELECT 1 + seq, 1 + (seq MOD 4),
REPEAT(SUBSTR('abcd', 1 + (seq MOD 4), 1), 2048),
@@ -347,11 +339,6 @@ EOF
UNLOCK TABLES;
-SELECT name FROM information_schema.innodb_metrics
-WHERE name IN ('ibuf_merges','ibuf_merges_insert') AND count>0 ORDER BY name;
-
-SET GLOBAL innodb_disable_background_merge=OFF;
-
# Enable normal operation
connection purge_control;
COMMIT;
@@ -636,20 +623,8 @@ do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl";
ib_unlink_tablespace("test", "t1");
EOF
-set global innodb_monitor_disable = all;
-set global innodb_monitor_reset_all = all;
-
--- disable_warnings
-set global innodb_monitor_enable = default;
-set global innodb_monitor_disable = default;
-set global innodb_monitor_reset = default;
-set global innodb_monitor_reset_all = default;
--- enable_warnings
-
--disable_query_log
call mtr.add_suppression("'Resource temporarily unavailable'");
-call mtr.add_suppression("Monitor ibuf_merges is already enabled");
-call mtr.add_suppression("Monitor ibuf_merges_insert is already enabled");
call mtr.add_suppression("Got error -1 when reading table '.*'");
call mtr.add_suppression("InnoDB: Table '.*' tablespace is set as discarded.");
call mtr.add_suppression("InnoDB: Tablespace '.*' exists in the cache");
diff --git a/mysql-test/suite/maria/aria_sort_buffer.result b/mysql-test/suite/maria/aria_sort_buffer.result
new file mode 100644
index 00000000000..5db9b9d7d44
--- /dev/null
+++ b/mysql-test/suite/maria/aria_sort_buffer.result
@@ -0,0 +1,11 @@
+SET SESSION aria_repair_threads=128;
+SET SESSION aria_sort_buffer_size=CAST(-1 AS UNSIGNED INT);
+Warnings:
+Note 1105 Cast to unsigned converted negative integer to it's positive complement
+Note 1105 Cast to unsigned converted negative integer to it's positive complement
+Warning 1292 Truncated incorrect aria_sort_buffer_size value: '18446744073709551615'
+SET SESSION tmp_table_size=65535;
+CREATE TABLE t1 (a VARCHAR(255));
+insert into t1 (a) select seq from seq_1_to_1000;
+UPDATE t1 SET a=( (SELECT MAX(a) FROM t1));
+DROP TABLE t1;
diff --git a/mysql-test/suite/maria/aria_sort_buffer.test b/mysql-test/suite/maria/aria_sort_buffer.test
new file mode 100644
index 00000000000..190daa0fa10
--- /dev/null
+++ b/mysql-test/suite/maria/aria_sort_buffer.test
@@ -0,0 +1,15 @@
+--source include/have_sequence.inc
+
+#
+#
+# MDEV-24750 Various corruptions caused by Aria subsystem asking system call
+# to overwrite memory that it does not own (InnoDB stacks)
+
+SET SESSION aria_repair_threads=128;
+SET SESSION aria_sort_buffer_size=CAST(-1 AS UNSIGNED INT);
+
+SET SESSION tmp_table_size=65535;
+CREATE TABLE t1 (a VARCHAR(255));
+insert into t1 (a) select seq from seq_1_to_1000;
+UPDATE t1 SET a=( (SELECT MAX(a) FROM t1));
+DROP TABLE t1;
diff --git a/mysql-test/suite/maria/bulk_insert_crash.opt b/mysql-test/suite/maria/bulk_insert_crash.opt
index f85a8d9c973..ecc7a8e8d92 100644
--- a/mysql-test/suite/maria/bulk_insert_crash.opt
+++ b/mysql-test/suite/maria/bulk_insert_crash.opt
@@ -1,2 +1,2 @@
---skip-stack-trace --skip-core-file
+--loose-skip-stack-trace --skip-core-file
--default-storage-engine=Aria
diff --git a/mysql-test/suite/maria/create.result b/mysql-test/suite/maria/create.result
index f1da0d7105b..801812b647f 100644
--- a/mysql-test/suite/maria/create.result
+++ b/mysql-test/suite/maria/create.result
@@ -75,3 +75,32 @@ DROP TABLE t1;
#
# End of 10.3 tests
#
+CREATE TABLE t1 (a INT) ENGINE=Aria;
+INSERT INTO t1 VALUES (1);
+CREATE TABLE t2 (b INT);
+CREATE OR REPLACE TABLE t2 AS SELECT * FROM t1;
+SELECT * from t1;
+a
+1
+SELECT * from t2;
+a
+1
+BEGIN;
+CREATE OR REPLACE TABLE t2 AS SELECT * FROM t1;
+SELECT * from t2;
+a
+1
+COMMIT;
+LOCK TABLES t1 read, t2 write;
+CREATE OR REPLACE TABLE t2 AS SELECT * FROM t1;
+SELECT * from t2;
+a
+1
+UNLOCK TABLES;
+CREATE TABLE t3 (a INT) engine=Aria;
+INSERT INTO t3 values(2);
+CREATE OR REPLACE TABLE t2 AS SELECT t1.a,t3.a as b FROM t1,t3;
+SELECT * from t2;
+a b
+1 2
+DROP TABLE t1, t2, t3;
diff --git a/mysql-test/suite/maria/create.test b/mysql-test/suite/maria/create.test
index cac1f8bd7e1..3937d800fed 100644
--- a/mysql-test/suite/maria/create.test
+++ b/mysql-test/suite/maria/create.test
@@ -86,12 +86,42 @@ flush tables;
--error 1,ER_TABLE_EXISTS_ERROR
--eval CREATE TABLE MDEV_23222 (i INT) DATA DIRECTORY = '$MYSQL_TMP_DIR', ENGINE=Aria TRANSACTIONAL=1;
DROP TABLE t1;
---disable_warnings
---remove_file $mysqld_datadir/test/MDEV_23222.MAD
---replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
---remove_file $MYSQL_TMP_DIR/MDEV_23222.MAD
---enable_warnings
--echo #
--echo # End of 10.3 tests
--echo #
+
+#
+# MDEV-22686 # Assertion `trn' failed in ha_maria::start_stmt
+# ASAN heap-after-free in maria_status
+#
+
+CREATE TABLE t1 (a INT) ENGINE=Aria;
+INSERT INTO t1 VALUES (1);
+CREATE TABLE t2 (b INT);
+CREATE OR REPLACE TABLE t2 AS SELECT * FROM t1;
+SELECT * from t1;
+SELECT * from t2;
+
+# Check also BEGIN/COMMIT
+
+BEGIN;
+CREATE OR REPLACE TABLE t2 AS SELECT * FROM t1;
+SELECT * from t2;
+COMMIT;
+
+# Check also LOCK TABLES
+
+LOCK TABLES t1 read, t2 write;
+CREATE OR REPLACE TABLE t2 AS SELECT * FROM t1;
+SELECT * from t2;
+UNLOCK TABLES;
+
+# Check with 3 tables
+CREATE TABLE t3 (a INT) engine=Aria;
+INSERT INTO t3 values(2);
+
+CREATE OR REPLACE TABLE t2 AS SELECT t1.a,t3.a as b FROM t1,t3;
+SELECT * from t2;
+
+DROP TABLE t1, t2, t3;
diff --git a/mysql-test/suite/maria/icp.result b/mysql-test/suite/maria/icp.result
index 975c280d467..43ec6439144 100644
--- a/mysql-test/suite/maria/icp.result
+++ b/mysql-test/suite/maria/icp.result
@@ -1,5 +1,5 @@
-set @save_storage_engine= @@storage_engine;
-set storage_engine=Maria;
+set @save_storage_engine= @@default_storage_engine;
+set default_storage_engine=Maria;
set @maria_icp_tmp=@@optimizer_switch;
set optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
#
@@ -409,7 +409,7 @@ WHERE (pk BETWEEN 4 AND 5 OR pk < 2) AND c1 < 240
ORDER BY c1
LIMIT 1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range PRIMARY,k1 k1 5 NULL 4 Using where
+1 SIMPLE t1 range PRIMARY,k1 PRIMARY 4 NULL 3 Using index condition; Using where; Rowid-ordered scan; Using filesort
DROP TABLE t1;
#
#
@@ -430,9 +430,9 @@ EXPLAIN
SELECT * FROM t1
WHERE pk IN (SELECT it.pk FROM t2 JOIN t2 AS it ON it.i=it.i WHERE it.pk-t1.i<10);
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t1 ALL NULL NULL NULL NULL 3 Using where
-2 DEPENDENT SUBQUERY it eq_ref PRIMARY PRIMARY 4 func 1 Using index condition
-2 DEPENDENT SUBQUERY t2 index NULL PRIMARY 4 NULL 3 Using index; Using join buffer (flat, BNL join)
+1 PRIMARY t1 ALL NULL NULL NULL NULL # Using where
+2 DEPENDENT SUBQUERY it eq_ref PRIMARY PRIMARY 4 func # Using index condition
+2 DEPENDENT SUBQUERY t2 index NULL PRIMARY 4 NULL # Using index; Using join buffer (flat, BNL join)
SELECT * FROM t1
WHERE pk IN (SELECT it.pk FROM t2 JOIN t2 AS it ON it.i=it.i WHERE it.pk-t1.i<10);
pk i
@@ -677,16 +677,18 @@ DROP TABLE t1;
#
CREATE TABLE t1 (b int NOT NULL, c int, a varchar(1024), PRIMARY KEY (b));
INSERT INTO t1 VALUES (1,4,'Ill');
+insert into t1 select seq+100,5,seq from seq_1_to_100;
CREATE TABLE t2 (a varchar(1024), KEY (a(512)));
INSERT INTO t2 VALUES
('Ill'), ('eckqzsflbzaffti'), ('w'), ('she'), ('gxbwypqtjzwywwer'), ('w');
+insert into t2 select seq from seq_1_to_100;
SET SESSION optimizer_switch='index_condition_pushdown=off';
EXPLAIN
SELECT t1.b, t1.c FROM t1, t2 WHERE t1.a = t2.a AND (t1.b<0 OR t1.b>0)
HAVING t1.c != 5 ORDER BY t1.c;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 system PRIMARY NULL NULL NULL 1
-1 SIMPLE t2 ref a a 515 const 1 Using where
+1 SIMPLE t1 ALL PRIMARY NULL NULL NULL # Using where; Using filesort
+1 SIMPLE t2 ref a a 515 test.t1.a # Using where
SELECT t1.b, t1.c FROM t1, t2 WHERE t1.a = t2.a AND (t1.b<0 OR t1.b>0)
HAVING t1.c != 5 ORDER BY t1.c;
b c
@@ -696,8 +698,8 @@ EXPLAIN
SELECT t1.b, t1.c FROM t1, t2 WHERE t1.a = t2.a AND (t1.b<0 OR t1.b>0)
HAVING t1.c != 5 ORDER BY t1.c;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 system PRIMARY NULL NULL NULL 1
-1 SIMPLE t2 ref a a 515 const 1 Using where
+1 SIMPLE t1 ALL PRIMARY NULL NULL NULL # Using where; Using filesort
+1 SIMPLE t2 ref a a 515 test.t1.a # Using where
SELECT t1.b, t1.c FROM t1, t2 WHERE t1.a = t2.a AND (t1.b<0 OR t1.b>0)
HAVING t1.c != 5 ORDER BY t1.c;
b c
@@ -903,5 +905,5 @@ c1 c2
aa x
a y
DROP TABLE t1;
-set storage_engine= @save_storage_engine;
+set default_storage_engine= @save_storage_engine;
set optimizer_switch=@maria_icp_tmp;
diff --git a/mysql-test/suite/maria/icp.test b/mysql-test/suite/maria/icp.test
index 83d770dd8fd..0bcb3bccfe2 100644
--- a/mysql-test/suite/maria/icp.test
+++ b/mysql-test/suite/maria/icp.test
@@ -5,14 +5,14 @@
--source include/have_maria.inc
--source include/default_optimizer_switch.inc
-set @save_storage_engine= @@storage_engine;
-set storage_engine=Maria;
+set @save_storage_engine= @@default_storage_engine;
+set default_storage_engine=Maria;
set @maria_icp_tmp=@@optimizer_switch;
set optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
--source include/icp_tests.inc
-set storage_engine= @save_storage_engine;
+set default_storage_engine= @save_storage_engine;
set optimizer_switch=@maria_icp_tmp;
diff --git a/mysql-test/suite/maria/lock.result b/mysql-test/suite/maria/lock.result
index de24b987524..0891e8ad249 100644
--- a/mysql-test/suite/maria/lock.result
+++ b/mysql-test/suite/maria/lock.result
@@ -1,7 +1,6 @@
drop table if exists t1,t2;
Warnings:
-Note 1051 Unknown table 'test.t1'
-Note 1051 Unknown table 'test.t2'
+Note 1051 Unknown table 'test.t1,test.t2'
CREATE TABLE t1 (i INT) ENGINE=Aria;
CREATE TABLE t2 (i INT) ENGINE=Aria;
LOCK TABLE t1 WRITE, t2 WRITE;
@@ -167,3 +166,14 @@ test.t1 optimize status Table is already up to date
disconnect con1;
connection default;
DROP TABLE t1, t2;
+#
+# MDEV-22829 SIGSEGV in _ma_reset_history on LOCK
+#
+CREATE TABLE t1 (f1 INT) ENGINE=Aria;
+CREATE TABLE t2 (f2 INT) ENGINE=Aria;
+LOCK TABLES t2 WRITE, t1 WRITE;
+INSERT INTO t1 VALUES (1);
+CREATE TRIGGER ai AFTER INSERT ON t1 FOR EACH ROW UPDATE t1 SET v=1 WHERE b=new.a;
+ERROR 42S22: Unknown column 'a' in 'NEW'
+UNLOCK TABLES;
+DROP TABLE t1, t2;
diff --git a/mysql-test/suite/maria/lock.test b/mysql-test/suite/maria/lock.test
index bb709f8a69c..017bd025ac1 100644
--- a/mysql-test/suite/maria/lock.test
+++ b/mysql-test/suite/maria/lock.test
@@ -185,3 +185,16 @@ OPTIMIZE TABLE t1;
--disconnect con1
--connection default
DROP TABLE t1, t2;
+
+--echo #
+--echo # MDEV-22829 SIGSEGV in _ma_reset_history on LOCK
+--echo #
+
+CREATE TABLE t1 (f1 INT) ENGINE=Aria;
+CREATE TABLE t2 (f2 INT) ENGINE=Aria;
+LOCK TABLES t2 WRITE, t1 WRITE;
+INSERT INTO t1 VALUES (1);
+--error ER_BAD_FIELD_ERROR
+CREATE TRIGGER ai AFTER INSERT ON t1 FOR EACH ROW UPDATE t1 SET v=1 WHERE b=new.a;
+UNLOCK TABLES;
+DROP TABLE t1, t2;
diff --git a/mysql-test/suite/maria/maria-autozerofill.result b/mysql-test/suite/maria/maria-autozerofill.result
index 064ac9e6496..e135d3d7d58 100644
--- a/mysql-test/suite/maria/maria-autozerofill.result
+++ b/mysql-test/suite/maria/maria-autozerofill.result
@@ -38,14 +38,15 @@ create_rename_lsn has non-magic value
#
check table t2;
Table Op Msg_type Msg_text
-mysqltest.t2 check error Table is from another system and must be zerofilled or repaired to be usable on this system
+mysqltest.t2 check error Table is probably from another system and must be zerofilled or repaired ('REPAIR TABLE table_name') to be usable on this system
mysqltest.t2 check error Corrupt
check table t2;
Table Op Msg_type Msg_text
-mysqltest.t2 check error Table is from another system and must be zerofilled or repaired to be usable on this system
+mysqltest.t2 check error Table is probably from another system and must be zerofilled or repaired ('REPAIR TABLE table_name') to be usable on this system
mysqltest.t2 check error Corrupt
repair table t2;
Table Op Msg_type Msg_text
+mysqltest.t2 repair info Running zerofill on moved table
mysqltest.t2 repair status OK
check table t2;
Table Op Msg_type Msg_text
@@ -61,6 +62,7 @@ mysqltest.t4 analyze Note Zerofilling moved table ./mysqltest/t4
mysqltest.t4 analyze status OK
repair table t5;
Table Op Msg_type Msg_text
+mysqltest.t5 repair info Running zerofill on moved table
mysqltest.t5 repair status OK
check table t5;
Table Op Msg_type Msg_text
diff --git a/mysql-test/suite/maria/maria-autozerofill.test b/mysql-test/suite/maria/maria-autozerofill.test
index 4baa118302c..8459e27a8a8 100644
--- a/mysql-test/suite/maria/maria-autozerofill.test
+++ b/mysql-test/suite/maria/maria-autozerofill.test
@@ -71,7 +71,7 @@ perl;
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/autozerofill.txt";
open(FILE, "<", $fname) or die;
my @content= <FILE>;
- print grep(/Status:.*zerofilled/, @content);
+ print grep(/Status:.*/, @content);
print "create_rename_lsn has magic value\n" if grep(/create_rename \(0,0x2\)/, @content);
close FILE;
EOF
@@ -115,7 +115,14 @@ check table t5;
# Check that if we zerofill with aria_chk, we should not get any warnings when
# accessing the table
+--error 0,1,11,139
--exec $MARIA_CHK --ignore-control-file --zerofill $MYSQLD_DATADIR/mysqltest/t6 >$MYSQLTEST_VARDIR/tmp/autozerofill.txt 2>&1
+if ($sys_errno != 0)
+{
+--cat_file $MYSQLTEST_VARDIR/tmp/autozerofill.txt
+--die
+}
+
select * from t6;
check table t6;
diff --git a/mysql-test/suite/maria/maria-big.result b/mysql-test/suite/maria/maria-big.result
index f7f7d3d7525..f4fd4b65dc8 100644
--- a/mysql-test/suite/maria/maria-big.result
+++ b/mysql-test/suite/maria/maria-big.result
@@ -1,7 +1,7 @@
set global max_allowed_packet=400000000;
connect root,localhost,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK;
connection root;
-set storage_engine=aria;
+set default_storage_engine=aria;
affected rows: 0
drop table if exists t1, t2;
affected rows: 0
diff --git a/mysql-test/suite/maria/maria-big.test b/mysql-test/suite/maria/maria-big.test
index 6dc56756cf7..33a211b53bf 100644
--- a/mysql-test/suite/maria/maria-big.test
+++ b/mysql-test/suite/maria/maria-big.test
@@ -9,7 +9,7 @@ connect (root,localhost,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK);
connection root;
enable_info;
-set storage_engine=aria;
+set default_storage_engine=aria;
disable_warnings;
drop table if exists t1, t2;
enable_warnings;
diff --git a/mysql-test/suite/maria/maria-connect.result b/mysql-test/suite/maria/maria-connect.result
index b731bb4e1d0..84195780cf8 100644
--- a/mysql-test/suite/maria/maria-connect.result
+++ b/mysql-test/suite/maria/maria-connect.result
@@ -1,5 +1,5 @@
-set global storage_engine=aria;
-set session storage_engine=aria;
+set global default_storage_engine=aria;
+set session default_storage_engine=aria;
drop table if exists t1;
SET SQL_WARNINGS=1;
RESET MASTER;
@@ -8,6 +8,11 @@ CREATE TABLE t1 (a int primary key);
insert t1 values (1),(2),(3);
insert t1 values (4),(2),(5);
ERROR 23000: Duplicate entry '2' for key 'PRIMARY'
+show warnings;
+Level Code Message
+Error 1062 Duplicate entry '2' for key 'PRIMARY'
+Note 4173 Engine Aria does not support rollback. Changes were committed during rollback call
+Warning 1196 Some non-transactional changed tables couldn't be rolled back
select * from t1;
a
1
diff --git a/mysql-test/suite/maria/maria-connect.test b/mysql-test/suite/maria/maria-connect.test
index a1e9bbce4f2..ac7e9589285 100644
--- a/mysql-test/suite/maria/maria-connect.test
+++ b/mysql-test/suite/maria/maria-connect.test
@@ -8,9 +8,9 @@
let $start_pos= `select @binlog_start_pos`;
-let $default=`select @@global.storage_engine`;
-set global storage_engine=aria;
-set session storage_engine=aria;
+let $default=`select @@global.default_storage_engine`;
+set global default_storage_engine=aria;
+set session default_storage_engine=aria;
# Initialise
--disable_warnings
@@ -29,6 +29,7 @@ CREATE TABLE t1 (a int primary key);
insert t1 values (1),(2),(3);
--error ER_DUP_ENTRY
insert t1 values (4),(2),(5);
+show warnings;
select * from t1;
--replace_result $start_pos <start_pos>
--replace_column 2 # 5 #
@@ -40,7 +41,7 @@ set binlog_format=default;
--disable_result_log
--disable_query_log
-eval set global storage_engine=$default;
+eval set global default_storage_engine=$default;
set global aria_log_file_size=default;
--enable_result_log
--enable_query_log
diff --git a/mysql-test/suite/maria/maria-gis-recovery.opt b/mysql-test/suite/maria/maria-gis-recovery.opt
index 58d0d012c54..839411b10b8 100644
--- a/mysql-test/suite/maria/maria-gis-recovery.opt
+++ b/mysql-test/suite/maria/maria-gis-recovery.opt
@@ -1 +1 @@
---skip-stack-trace --skip-core-file --loose-aria-log-dir-path=$MYSQLTEST_VARDIR/tmp
+--loose-skip-stack-trace --skip-core-file --loose-aria-log-dir-path=$MYSQLTEST_VARDIR/tmp
diff --git a/mysql-test/suite/maria/maria-gis-rtree-dynamic.result b/mysql-test/suite/maria/maria-gis-rtree-dynamic.result
index 2f8c1b9408c..dad74e3767f 100644
--- a/mysql-test/suite/maria/maria-gis-rtree-dynamic.result
+++ b/mysql-test/suite/maria/maria-gis-rtree-dynamic.result
@@ -1,4 +1,4 @@
-set storage_engine=aria;
+set default_storage_engine=aria;
DROP TABLE IF EXISTS t1, t2;
CREATE TABLE t1 (
fid INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
diff --git a/mysql-test/suite/maria/maria-gis-rtree-dynamic.test b/mysql-test/suite/maria/maria-gis-rtree-dynamic.test
index 473f787db53..8dd1d04d539 100644
--- a/mysql-test/suite/maria/maria-gis-rtree-dynamic.test
+++ b/mysql-test/suite/maria/maria-gis-rtree-dynamic.test
@@ -1,7 +1,7 @@
-- source include/have_maria.inc
-- source include/have_geometry.inc
-set storage_engine=aria;
+set default_storage_engine=aria;
#
# test of rtree (using with spatial data)
diff --git a/mysql-test/suite/maria/maria-gis-rtree-trans.result b/mysql-test/suite/maria/maria-gis-rtree-trans.result
index 1c0d9e756a4..e118db697b2 100644
--- a/mysql-test/suite/maria/maria-gis-rtree-trans.result
+++ b/mysql-test/suite/maria/maria-gis-rtree-trans.result
@@ -1,4 +1,4 @@
-set storage_engine=aria;
+set default_storage_engine=aria;
DROP TABLE IF EXISTS t1, t2;
CREATE TABLE t1 (
fid INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
diff --git a/mysql-test/suite/maria/maria-gis-rtree-trans.test b/mysql-test/suite/maria/maria-gis-rtree-trans.test
index 84678b68693..ab0203dfc6f 100644
--- a/mysql-test/suite/maria/maria-gis-rtree-trans.test
+++ b/mysql-test/suite/maria/maria-gis-rtree-trans.test
@@ -4,7 +4,7 @@
-- source include/have_maria.inc
-- source include/have_geometry.inc
-set storage_engine=aria;
+set default_storage_engine=aria;
#
# test of rtree (using with spatial data)
diff --git a/mysql-test/suite/maria/maria-gis-rtree.result b/mysql-test/suite/maria/maria-gis-rtree.result
index e39430a2efb..9267556bc4b 100644
--- a/mysql-test/suite/maria/maria-gis-rtree.result
+++ b/mysql-test/suite/maria/maria-gis-rtree.result
@@ -1,4 +1,4 @@
-set storage_engine=aria;
+set default_storage_engine=aria;
DROP TABLE IF EXISTS t1, t2;
CREATE TABLE t1 (
fid INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
diff --git a/mysql-test/suite/maria/maria-gis-rtree.test b/mysql-test/suite/maria/maria-gis-rtree.test
index 5c68e570fca..6c82108ecb0 100644
--- a/mysql-test/suite/maria/maria-gis-rtree.test
+++ b/mysql-test/suite/maria/maria-gis-rtree.test
@@ -1,7 +1,7 @@
-- source include/have_maria.inc
-- source include/have_geometry.inc
-set storage_engine=aria;
+set default_storage_engine=aria;
#
# test of rtree (using with spatial data)
diff --git a/mysql-test/suite/maria/maria-partitioning.result b/mysql-test/suite/maria/maria-partitioning.result
index ad5de7952c7..35b7da489fa 100644
--- a/mysql-test/suite/maria/maria-partitioning.result
+++ b/mysql-test/suite/maria/maria-partitioning.result
@@ -1,9 +1,8 @@
-set global storage_engine=aria;
-set session storage_engine=aria;
+set global default_storage_engine=aria;
+set session default_storage_engine=aria;
DROP TABLE if exists t1,t2;
Warnings:
-Note 1051 Unknown table 'test.t1'
-Note 1051 Unknown table 'test.t2'
+Note 1051 Unknown table 'test.t1,test.t2'
create table t2(a blob) engine=aria;
create table t1(a int primary key) engine=aria;
insert into t2 values ('foo'),('bar');
diff --git a/mysql-test/suite/maria/maria-partitioning.test b/mysql-test/suite/maria/maria-partitioning.test
index 446cfed770b..6856d5a7157 100644
--- a/mysql-test/suite/maria/maria-partitioning.test
+++ b/mysql-test/suite/maria/maria-partitioning.test
@@ -5,10 +5,10 @@
--source include/have_maria.inc
--source include/have_partition.inc
-let $default_engine=`select @@global.storage_engine`;
+let $default_engine=`select @@global.default_storage_engine`;
let $default_checksum=`select @@global.aria_page_checksum`;
-set global storage_engine=aria;
-set session storage_engine=aria;
+set global default_storage_engine=aria;
+set session default_storage_engine=aria;
#
# Test outer join const propagation
@@ -46,6 +46,6 @@ drop table t1;
# Set defaults back
--disable_result_log
--disable_query_log
-eval set global storage_engine=$default_engine;
+eval set global default_storage_engine=$default_engine;
--enable_result_log
--enable_query_log
diff --git a/mysql-test/suite/maria/maria-purge.result b/mysql-test/suite/maria/maria-purge.result
index 53208aee990..71070cba7ff 100644
--- a/mysql-test/suite/maria/maria-purge.result
+++ b/mysql-test/suite/maria/maria-purge.result
@@ -4,8 +4,8 @@ connection default;
connection admin;
* shut down mysqld, removed logs, restarted it
connection default;
-set global storage_engine=aria;
-set session storage_engine=aria;
+set global default_storage_engine=aria;
+set session default_storage_engine=aria;
set global aria_log_file_size=4294959104;
drop table if exists t1,t2;
SET SQL_WARNINGS=1;
diff --git a/mysql-test/suite/maria/maria-purge.test b/mysql-test/suite/maria/maria-purge.test
index ad41fa0f5d0..7d799d9e2a9 100644
--- a/mysql-test/suite/maria/maria-purge.test
+++ b/mysql-test/suite/maria/maria-purge.test
@@ -15,9 +15,9 @@ connection default;
# practice)
-- source include/maria_empty_logs.inc
-let $default=`select @@global.storage_engine`;
-set global storage_engine=aria;
-set session storage_engine=aria;
+let $default=`select @@global.default_storage_engine`;
+set global default_storage_engine=aria;
+set session default_storage_engine=aria;
let $def_logsize=`select @@global.aria_log_file_size`;
let $def_checkinterval=`select @@global.aria_checkpoint_interval`;
@@ -111,7 +111,7 @@ drop table t1, t2;
--disable_result_log
--disable_query_log
set global aria_log_purge_type=immediate;
-eval set global storage_engine=$default;
+eval set global default_storage_engine=$default;
eval set global aria_log_file_size=$def_logsize;
eval set global aria_checkpoint_interval=$def_checkinterval;
--enable_result_log
diff --git a/mysql-test/suite/maria/maria-recovery-big-master.opt b/mysql-test/suite/maria/maria-recovery-big-master.opt
index d24a11c924f..f5119bbce3f 100644
--- a/mysql-test/suite/maria/maria-recovery-big-master.opt
+++ b/mysql-test/suite/maria/maria-recovery-big-master.opt
@@ -1 +1 @@
---skip-stack-trace --skip-core-file --max_allowed_packet=32000000
+--loose-skip-stack-trace --skip-core-file --max_allowed_packet=32000000
diff --git a/mysql-test/suite/maria/maria-recovery-bitmap-master.opt b/mysql-test/suite/maria/maria-recovery-bitmap-master.opt
index 425fda95086..590d44a6d12 100644
--- a/mysql-test/suite/maria/maria-recovery-bitmap-master.opt
+++ b/mysql-test/suite/maria/maria-recovery-bitmap-master.opt
@@ -1 +1 @@
---skip-stack-trace --skip-core-file
+--loose-skip-stack-trace --skip-core-file
diff --git a/mysql-test/suite/maria/maria-recovery-master.opt b/mysql-test/suite/maria/maria-recovery-master.opt
index 58d0d012c54..839411b10b8 100644
--- a/mysql-test/suite/maria/maria-recovery-master.opt
+++ b/mysql-test/suite/maria/maria-recovery-master.opt
@@ -1 +1 @@
---skip-stack-trace --skip-core-file --loose-aria-log-dir-path=$MYSQLTEST_VARDIR/tmp
+--loose-skip-stack-trace --skip-core-file --loose-aria-log-dir-path=$MYSQLTEST_VARDIR/tmp
diff --git a/mysql-test/suite/maria/maria-recovery-rtree-ft-master.opt b/mysql-test/suite/maria/maria-recovery-rtree-ft-master.opt
index 425fda95086..590d44a6d12 100644
--- a/mysql-test/suite/maria/maria-recovery-rtree-ft-master.opt
+++ b/mysql-test/suite/maria/maria-recovery-rtree-ft-master.opt
@@ -1 +1 @@
---skip-stack-trace --skip-core-file
+--loose-skip-stack-trace --skip-core-file
diff --git a/mysql-test/suite/maria/maria-recovery2-master.opt b/mysql-test/suite/maria/maria-recovery2-master.opt
index ca9560676a5..eeb6de091fd 100644
--- a/mysql-test/suite/maria/maria-recovery2-master.opt
+++ b/mysql-test/suite/maria/maria-recovery2-master.opt
@@ -1 +1 @@
---skip-stack-trace --skip-core-file --loose-aria-log-dir-path=$MYSQLTEST_VARDIR/tmp --myisam-recover-options=
+--loose-skip-stack-trace --skip-core-file --loose-aria-log-dir-path=$MYSQLTEST_VARDIR/tmp --myisam-recover-options=
diff --git a/mysql-test/suite/maria/maria-recovery3-master.opt b/mysql-test/suite/maria/maria-recovery3-master.opt
index 58d0d012c54..839411b10b8 100644
--- a/mysql-test/suite/maria/maria-recovery3-master.opt
+++ b/mysql-test/suite/maria/maria-recovery3-master.opt
@@ -1 +1 @@
---skip-stack-trace --skip-core-file --loose-aria-log-dir-path=$MYSQLTEST_VARDIR/tmp
+--loose-skip-stack-trace --skip-core-file --loose-aria-log-dir-path=$MYSQLTEST_VARDIR/tmp
diff --git a/mysql-test/suite/maria/maria-ucs2.result b/mysql-test/suite/maria/maria-ucs2.result
index 321a374f4c2..7f3b691b139 100644
--- a/mysql-test/suite/maria/maria-ucs2.result
+++ b/mysql-test/suite/maria/maria-ucs2.result
@@ -1,8 +1,8 @@
select * from INFORMATION_SCHEMA.ENGINES where ENGINE="ARIA";
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
Aria YES Crash-safe tables with MyISAM heritage. Used for internal temporary tables and privilege tables NO NO NO
-set global storage_engine=aria;
-set session storage_engine=aria;
+set global default_storage_engine=aria;
+set session default_storage_engine=aria;
drop table if exists t1;
SET SQL_WARNINGS=1;
CREATE TABLE t1 ( a VARCHAR(800),KEY(a) )
@@ -16,8 +16,6 @@ Table Op Msg_type Msg_text
test.t1 check status OK
SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR
ALTER TABLE t1 MODIFY a VARCHAR(800) CHARSET `ucs2`;
-Warnings:
-Note 1071 Specified key was too long; max key length is 1000 bytes
CHECK TABLE t1;
Table Op Msg_type Msg_text
test.t1 check status OK
@@ -25,12 +23,12 @@ SHOW CREATE table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(800) CHARACTER SET ucs2 DEFAULT NULL,
- KEY `a` (`a`(500))
+ KEY `a` (`a`)
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
DROP TABLE t1;
-CREATE TABLE t1 (a VARCHAR(800),KEY(a)) ENGINE=Aria CHARACTER SET ucs2;
+CREATE TABLE t1 (a VARCHAR(1200),KEY(a)) ENGINE=Aria CHARACTER SET ucs2;
Warnings:
-Note 1071 Specified key was too long; max key length is 1000 bytes
+Note 1071 Specified key was too long; max key length is 2000 bytes
INSERT INTO t1 VALUES (REPEAT('abc ',200));
CHECK TABLE t1;
Table Op Msg_type Msg_text
diff --git a/mysql-test/suite/maria/maria-ucs2.test b/mysql-test/suite/maria/maria-ucs2.test
index e4f8bc8dd27..742de596e92 100644
--- a/mysql-test/suite/maria/maria-ucs2.test
+++ b/mysql-test/suite/maria/maria-ucs2.test
@@ -3,9 +3,9 @@
select * from INFORMATION_SCHEMA.ENGINES where ENGINE="ARIA";
-let $default_engine=`select @@global.storage_engine`;
-set global storage_engine=aria;
-set session storage_engine=aria;
+let $default_engine=`select @@global.default_storage_engine`;
+set global default_storage_engine=aria;
+set session default_storage_engine=aria;
# Initialise
--disable_warnings
@@ -37,7 +37,7 @@ DROP TABLE t1;
# Issue was too long key
#
-CREATE TABLE t1 (a VARCHAR(800),KEY(a)) ENGINE=Aria CHARACTER SET ucs2;
+CREATE TABLE t1 (a VARCHAR(1200),KEY(a)) ENGINE=Aria CHARACTER SET ucs2;
INSERT INTO t1 VALUES (REPEAT('abc ',200));
CHECK TABLE t1;
DROP TABLE t1;
@@ -47,6 +47,6 @@ DROP TABLE t1;
--disable_result_log
--disable_query_log
-eval set global storage_engine=$default_engine;
+eval set global default_storage_engine=$default_engine;
--enable_result_log
--enable_query_log
diff --git a/mysql-test/suite/maria/maria.result b/mysql-test/suite/maria/maria.result
index 03d37270eed..ac28953dff8 100644
--- a/mysql-test/suite/maria/maria.result
+++ b/mysql-test/suite/maria/maria.result
@@ -2,8 +2,8 @@ call mtr.add_suppression("Can't find record in '.*'");
select * from INFORMATION_SCHEMA.ENGINES where ENGINE="ARIA";
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
Aria YES Crash-safe tables with MyISAM heritage. Used for internal temporary tables and privilege tables NO NO NO
-set global storage_engine=aria;
-set session storage_engine=aria;
+set global default_storage_engine=aria;
+set session default_storage_engine=aria;
set global aria_page_checksum=0;
set global aria_log_file_size=4294959104;
drop table if exists t1,t2;
@@ -351,13 +351,13 @@ CHECK TABLE t1;
Table Op Msg_type Msg_text
test.t1 check status OK
drop table t1;
-CREATE TABLE t1 (a varchar(255), b varchar(255), c varchar(255), d varchar(255), e varchar(255), KEY t1 (a, b, c, d, e));
-ERROR 42000: Specified key was too long; max key length is 1000 bytes
+CREATE TABLE t1 (a varchar(255), b varchar(255), c varchar(255), d varchar(255), e varchar(255), f varchar(255), g varchar(255), h varchar(255), i varchar(255), KEY t1 (a, b, c, d, e, f, g, h, i));
+ERROR 42000: Specified key was too long; max key length is 2000 bytes
CREATE TABLE t1 (a varchar(1), b varchar(1), key (a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b));
ERROR 42000: Too many key parts specified; max 32 parts allowed
-CREATE TABLE t1 (a varchar(255), b varchar(255), c varchar(255), d varchar(255), e varchar(255));
-ALTER TABLE t1 ADD INDEX t1 (a, b, c, d, e);
-ERROR 42000: Specified key was too long; max key length is 1000 bytes
+CREATE TABLE t1 (a varchar(255), b varchar(255), c varchar(255), d varchar(255), e varchar(255), f varchar(255), g varchar(255), h varchar(255), i varchar(255));
+ALTER TABLE t1 ADD INDEX t1 (a, b, c, d, e, f, g, h, i);
+ERROR 42000: Specified key was too long; max key length is 2000 bytes
DROP TABLE t1;
CREATE TABLE t1 (a int not null, b int, c int, key(b), key(c), key(a,b), key(c,a));
INSERT into t1 values (0,null,0), (0,null,1), (0,null,2), (0,null,3), (1,1,4);
@@ -400,7 +400,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref a a 4 test.t2.a 1
explain select * from t1 where a=0 or a=2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL a NULL NULL NULL 10 Using where
+1 SIMPLE t1 range a a 4 NULL 5 Using index condition
explain select * from t1 force index (a) where a=0 or a=2;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range a a 4 NULL 5 Using index condition
@@ -935,7 +935,7 @@ _id
DELETE FROM t1 WHERE _id < 8;
SELECT table_name, engine, version, row_format, Table_rows, Data_free, create_options, table_comment FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'test' and TABLE_NAME='t1';
table_name engine version row_format Table_rows Data_free create_options table_comment
-t1 Aria 10 Dynamic 2 140 row_format=DYNAMIC
+t1 Aria 10 Dynamic 2 140 row_format=DYNAMIC transactional=0
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
test.t1 check status OK
@@ -947,7 +947,7 @@ Table Op Msg_type Msg_text
test.t1 check status OK
SELECT table_name, engine, version, row_format, Table_rows, Data_free, create_options, table_comment FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'test' and TABLE_NAME='t1';
table_name engine version row_format Table_rows Data_free create_options table_comment
-t1 Aria 10 Dynamic 2 0 row_format=DYNAMIC
+t1 Aria 10 Dynamic 2 0 row_format=DYNAMIC transactional=0
SELECT _id FROM t1;
_id
8
@@ -994,7 +994,7 @@ _id
DELETE FROM t1 WHERE _id < 8;
SELECT table_name, engine, version, row_format, Table_rows, Data_free, create_options, table_comment FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'test' and TABLE_NAME='t1';
table_name engine version row_format Table_rows Data_free create_options table_comment
-t1 Aria 10 Dynamic 2 140 row_format=DYNAMIC
+t1 Aria 10 Dynamic 2 140 row_format=DYNAMIC transactional=0
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
test.t1 check status OK
@@ -1006,7 +1006,7 @@ Table Op Msg_type Msg_text
test.t1 check status OK
SELECT table_name, engine, version, row_format, Table_rows, Data_free, create_options, table_comment FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'test' and TABLE_NAME='t1';
table_name engine version row_format Table_rows Data_free create_options table_comment
-t1 Aria 10 Dynamic 2 140 row_format=DYNAMIC
+t1 Aria 10 Dynamic 2 140 row_format=DYNAMIC transactional=0
SELECT _id FROM t1;
_id
8
@@ -1156,7 +1156,7 @@ alter table t1 add unique(v);
ERROR 23000: Duplicate entry '{ ' for key 'v_2'
show warnings;
Level Code Message
-Error 1062 Duplicate entry 'a' for key 'v_2'
+Error 1062 Duplicate entry 'a\0001' for key 'v_2'
alter table t1 add key(v);
Warnings:
Note 1831 Duplicate index `v_2`. This is deprecated and will be disallowed in a future release
@@ -1594,7 +1594,7 @@ a b
drop table t1;
create table t1 (v varchar(65530), key(v));
Warnings:
-Note 1071 Specified key was too long; max key length is 1000 bytes
+Note 1071 Specified key was too long; max key length is 2000 bytes
drop table if exists t1;
set statement sql_mode = 'NO_ENGINE_SUBSTITUTION' for
create table t1 (v varchar(65536));
@@ -1773,27 +1773,27 @@ DROP TABLE t1;
CREATE TABLE t1 (c1 INT, c2 INT, UNIQUE INDEX (c1), INDEX (c2));
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 Aria 10 Page 0 # # # 8192 # # # # # # # # N
+t1 Aria 10 Page 0 # # # 8192 # # # # # # # transactional=1 # N
INSERT INTO t1 VALUES (1,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 Aria 10 Page 1 # # # 24576 # # # # # # # # N
+t1 Aria 10 Page 1 # # # 24576 # # # # # # # transactional=1 # N
ALTER TABLE t1 DISABLE KEYS;
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 Aria 10 Page 1 # # # 24576 # # # # # # # # N
+t1 Aria 10 Page 1 # # # 24576 # # # # # # # transactional=1 # N
ALTER TABLE t1 ENABLE KEYS;
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 Aria 10 Page 1 # # # 24576 # # # # # # # # N
+t1 Aria 10 Page 1 # # # 24576 # # # # # # # transactional=1 # N
ALTER TABLE t1 DISABLE KEYS;
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 Aria 10 Page 1 # # # 24576 # # # # # # # # N
+t1 Aria 10 Page 1 # # # 24576 # # # # # # # transactional=1 # N
ALTER TABLE t1 ENABLE KEYS;
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 Aria 10 Page 1 # # # 24576 # # # # # # # # N
+t1 Aria 10 Page 1 # # # 24576 # # # # # # # transactional=1 # N
# Enable keys with parallel repair
SET @@aria_repair_threads=2;
ALTER TABLE t1 DISABLE KEYS;
@@ -1866,34 +1866,34 @@ t1 CREATE TABLE `t1` (
drop table t1;
create table t1 (a varchar(2048), key `a` (a));
Warnings:
-Note 1071 Specified key was too long; max key length is 1000 bytes
+Note 1071 Specified key was too long; max key length is 2000 bytes
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(2048) DEFAULT NULL,
- KEY `a` (`a`(1000))
+ KEY `a` (`a`(2000))
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
drop table t1;
create table t1 (a varchar(2048), key `a` (a) key_block_size=1024);
Warnings:
-Note 1071 Specified key was too long; max key length is 1000 bytes
+Note 1071 Specified key was too long; max key length is 2000 bytes
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(2048) DEFAULT NULL,
- KEY `a` (`a`(1000)) KEY_BLOCK_SIZE=8192
+ KEY `a` (`a`(2000)) KEY_BLOCK_SIZE=8192
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
drop table t1;
create table t1 (a int not null, b varchar(2048), key (a), key(b)) key_block_size=1024;
Warnings:
-Note 1071 Specified key was too long; max key length is 1000 bytes
+Note 1071 Specified key was too long; max key length is 2000 bytes
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL,
`b` varchar(2048) DEFAULT NULL,
KEY `a` (`a`) KEY_BLOCK_SIZE=8192,
- KEY `b` (`b`(1000)) KEY_BLOCK_SIZE=8192
+ KEY `b` (`b`(2000)) KEY_BLOCK_SIZE=8192
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 KEY_BLOCK_SIZE=1024
alter table t1 key_block_size=2048;
show create table t1;
@@ -1902,7 +1902,7 @@ t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL,
`b` varchar(2048) DEFAULT NULL,
KEY `a` (`a`) KEY_BLOCK_SIZE=8192,
- KEY `b` (`b`(1000)) KEY_BLOCK_SIZE=8192
+ KEY `b` (`b`(2000)) KEY_BLOCK_SIZE=8192
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 KEY_BLOCK_SIZE=2048
alter table t1 add c int, add key (c);
show create table t1;
@@ -1912,7 +1912,7 @@ t1 CREATE TABLE `t1` (
`b` varchar(2048) DEFAULT NULL,
`c` int(11) DEFAULT NULL,
KEY `a` (`a`) KEY_BLOCK_SIZE=8192,
- KEY `b` (`b`(1000)) KEY_BLOCK_SIZE=8192,
+ KEY `b` (`b`(2000)) KEY_BLOCK_SIZE=8192,
KEY `c` (`c`) KEY_BLOCK_SIZE=8192
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 KEY_BLOCK_SIZE=2048
alter table t1 key_block_size=4096;
@@ -1923,7 +1923,7 @@ t1 CREATE TABLE `t1` (
`b` varchar(2048) DEFAULT NULL,
`c` int(11) DEFAULT NULL,
KEY `a` (`a`) KEY_BLOCK_SIZE=8192,
- KEY `b` (`b`(1000)) KEY_BLOCK_SIZE=8192,
+ KEY `b` (`b`(2000)) KEY_BLOCK_SIZE=8192,
KEY `c` (`c`) KEY_BLOCK_SIZE=8192
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 KEY_BLOCK_SIZE=4096
alter table t1 key_block_size=0;
@@ -1934,7 +1934,7 @@ t1 CREATE TABLE `t1` (
`b` varchar(2048) DEFAULT NULL,
`c` int(11) DEFAULT NULL,
KEY `a` (`a`) KEY_BLOCK_SIZE=8192,
- KEY `b` (`b`(1000)) KEY_BLOCK_SIZE=8192,
+ KEY `b` (`b`(2000)) KEY_BLOCK_SIZE=8192,
KEY `c` (`c`) KEY_BLOCK_SIZE=8192
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
alter table t1 add d int, add key (d);
@@ -1946,33 +1946,33 @@ t1 CREATE TABLE `t1` (
`c` int(11) DEFAULT NULL,
`d` int(11) DEFAULT NULL,
KEY `a` (`a`) KEY_BLOCK_SIZE=8192,
- KEY `b` (`b`(1000)) KEY_BLOCK_SIZE=8192,
+ KEY `b` (`b`(2000)) KEY_BLOCK_SIZE=8192,
KEY `c` (`c`) KEY_BLOCK_SIZE=8192,
KEY `d` (`d`)
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
drop table t1;
create table t1 (a int not null, b varchar(2048), key (a), key(b)) key_block_size=8192;
Warnings:
-Note 1071 Specified key was too long; max key length is 1000 bytes
+Note 1071 Specified key was too long; max key length is 2000 bytes
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL,
`b` varchar(2048) DEFAULT NULL,
KEY `a` (`a`),
- KEY `b` (`b`(1000))
+ KEY `b` (`b`(2000))
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 KEY_BLOCK_SIZE=8192
drop table t1;
create table t1 (a int not null, b varchar(2048), key (a) key_block_size=1024, key(b)) key_block_size=8192;
Warnings:
-Note 1071 Specified key was too long; max key length is 1000 bytes
+Note 1071 Specified key was too long; max key length is 2000 bytes
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL,
`b` varchar(2048) DEFAULT NULL,
KEY `a` (`a`),
- KEY `b` (`b`(1000))
+ KEY `b` (`b`(2000))
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 KEY_BLOCK_SIZE=8192
drop table t1;
create table t1 (a int not null, b int, key (a) key_block_size=1024, key(b) key_block_size=8192) key_block_size=16384;
@@ -1995,12 +1995,12 @@ t1 CREATE TABLE `t1` (
drop table t1;
create table t1 (a varchar(2048), key `a` (a) key_block_size=1000000000000000000);
Warnings:
-Note 1071 Specified key was too long; max key length is 1000 bytes
+Note 1071 Specified key was too long; max key length is 2000 bytes
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(2048) DEFAULT NULL,
- KEY `a` (`a`(1000)) KEY_BLOCK_SIZE=8192
+ KEY `a` (`a`(2000)) KEY_BLOCK_SIZE=8192
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
drop table t1;
create table t1 (a int not null, key `a` (a) key_block_size=1025);
diff --git a/mysql-test/suite/maria/maria.test b/mysql-test/suite/maria/maria.test
index d5b9d839699..c940fc66bd4 100644
--- a/mysql-test/suite/maria/maria.test
+++ b/mysql-test/suite/maria/maria.test
@@ -10,10 +10,10 @@ call mtr.add_suppression("Can't find record in '.*'");
select * from INFORMATION_SCHEMA.ENGINES where ENGINE="ARIA";
-let $default_engine=`select @@global.storage_engine`;
+let $default_engine=`select @@global.default_storage_engine`;
let $default_checksum=`select @@global.aria_page_checksum`;
-set global storage_engine=aria;
-set session storage_engine=aria;
+set global default_storage_engine=aria;
+set session default_storage_engine=aria;
set global aria_page_checksum=0;
let $default_log_file_size=`select @@global.aria_log_file_size`;
set global aria_log_file_size=4294959104;
@@ -373,12 +373,12 @@ drop table t1;
#
--error 1071
-CREATE TABLE t1 (a varchar(255), b varchar(255), c varchar(255), d varchar(255), e varchar(255), KEY t1 (a, b, c, d, e));
+CREATE TABLE t1 (a varchar(255), b varchar(255), c varchar(255), d varchar(255), e varchar(255), f varchar(255), g varchar(255), h varchar(255), i varchar(255), KEY t1 (a, b, c, d, e, f, g, h, i));
--error 1070
CREATE TABLE t1 (a varchar(1), b varchar(1), key (a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b));
-CREATE TABLE t1 (a varchar(255), b varchar(255), c varchar(255), d varchar(255), e varchar(255));
+CREATE TABLE t1 (a varchar(255), b varchar(255), c varchar(255), d varchar(255), e varchar(255), f varchar(255), g varchar(255), h varchar(255), i varchar(255));
--error 1071
-ALTER TABLE t1 ADD INDEX t1 (a, b, c, d, e);
+ALTER TABLE t1 ADD INDEX t1 (a, b, c, d, e, f, g, h, i);
DROP TABLE t1;
#
@@ -2094,7 +2094,7 @@ drop table t1;
# Set defaults back
--disable_result_log
--disable_query_log
-eval set global storage_engine=$default_engine,
+eval set global default_storage_engine=$default_engine,
aria_page_checksum=$default_checksum,
aria_log_file_size=$default_log_file_size;
--enable_result_log
diff --git a/mysql-test/suite/maria/maria3.result b/mysql-test/suite/maria/maria3.result
index 09fc696c272..871748b399a 100644
--- a/mysql-test/suite/maria/maria3.result
+++ b/mysql-test/suite/maria/maria3.result
@@ -1,8 +1,8 @@
select * from INFORMATION_SCHEMA.ENGINES where ENGINE="ARIA";
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
Aria YES Crash-safe tables with MyISAM heritage. Used for internal temporary tables and privilege tables NO NO NO
-set global storage_engine=aria;
-set session storage_engine=aria;
+set global default_storage_engine=aria;
+set session default_storage_engine=aria;
set global aria_page_checksum=0;
set global aria_log_file_size=4294959104;
drop table if exists t1,t2;
@@ -17,12 +17,12 @@ t1 CREATE TABLE `t1` (
drop table t1;
create table t1 (a varchar(2048), key `a` (a) key_block_size=1000000000000000000);
Warnings:
-Note 1071 Specified key was too long; max key length is 1000 bytes
+Note 1071 Specified key was too long; max key length is 2000 bytes
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(2048) DEFAULT NULL,
- KEY `a` (`a`(1000)) KEY_BLOCK_SIZE=8192
+ KEY `a` (`a`(2000)) KEY_BLOCK_SIZE=8192
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
drop table t1;
create table t1 (a int not null, key `a` (a) key_block_size=1025);
diff --git a/mysql-test/suite/maria/maria3.test b/mysql-test/suite/maria/maria3.test
index fd0d5c67a57..bf533228300 100644
--- a/mysql-test/suite/maria/maria3.test
+++ b/mysql-test/suite/maria/maria3.test
@@ -2,10 +2,10 @@
select * from INFORMATION_SCHEMA.ENGINES where ENGINE="ARIA";
-let $default_engine=`select @@global.storage_engine`;
+let $default_engine=`select @@global.default_storage_engine`;
let $default_checksum=`select @@global.aria_page_checksum`;
-set global storage_engine=aria;
-set session storage_engine=aria;
+set global default_storage_engine=aria;
+set session default_storage_engine=aria;
set global aria_page_checksum=0;
let $default_log_file_size=`select @@global.aria_log_file_size`;
set global aria_log_file_size=4294959104;
@@ -561,7 +561,7 @@ drop table t1;
--disable_result_log
--disable_query_log
-eval set global storage_engine=$default_engine,
+eval set global default_storage_engine=$default_engine,
aria_page_checksum=$default_checksum,
aria_log_file_size=$default_log_file_size;
--enable_result_log
diff --git a/mysql-test/suite/maria/maria_notembedded.result b/mysql-test/suite/maria/maria_notembedded.result
index a717782830d..0e90ebced66 100644
--- a/mysql-test/suite/maria/maria_notembedded.result
+++ b/mysql-test/suite/maria/maria_notembedded.result
@@ -1,5 +1,5 @@
call mtr.add_suppression("Deadlock found when trying to get lock; try restarting transaction");
-set session storage_engine=aria;
+set session default_storage_engine=aria;
create table t1 (a int) row_format=page;
insert delayed into t1 values(1);
ERROR HY000: DELAYED option not supported for table 't1'
diff --git a/mysql-test/suite/maria/maria_notembedded.test b/mysql-test/suite/maria/maria_notembedded.test
index 29f15e81013..70c04073416 100644
--- a/mysql-test/suite/maria/maria_notembedded.test
+++ b/mysql-test/suite/maria/maria_notembedded.test
@@ -5,8 +5,8 @@
call mtr.add_suppression("Deadlock found when trying to get lock; try restarting transaction");
-let $default_engine=`select @@session.storage_engine`;
-set session storage_engine=aria;
+let $default_engine=`select @@session.default_storage_engine`;
+set session default_storage_engine=aria;
# Verify that INSERT DELAYED is disabled only for transactional tables
# ("embedded" server translates them to plain INSERT)
@@ -96,6 +96,6 @@ drop table t1;
--disable_result_log
--disable_query_log
-eval set session storage_engine=$default_engine;
+eval set session default_storage_engine=$default_engine;
--enable_result_log
--enable_query_log
diff --git a/mysql-test/suite/maria/maria_partition.result b/mysql-test/suite/maria/maria_partition.result
index 1c4f0fbaf05..f544ddd4927 100644
--- a/mysql-test/suite/maria/maria_partition.result
+++ b/mysql-test/suite/maria/maria_partition.result
@@ -1,5 +1,5 @@
-set global storage_engine=aria;
-set session storage_engine=aria;
+set global default_storage_engine=aria;
+set session default_storage_engine=aria;
set global aria_page_checksum=0;
drop table if exists t1,t2;
drop view if exists v1;
diff --git a/mysql-test/suite/maria/maria_partition.test b/mysql-test/suite/maria/maria_partition.test
index ca2651bcdc3..c515b6e717a 100644
--- a/mysql-test/suite/maria/maria_partition.test
+++ b/mysql-test/suite/maria/maria_partition.test
@@ -3,10 +3,10 @@
--source include/have_partition.inc
-- source include/have_maria.inc
-let $default_engine=`select @@global.storage_engine`;
+let $default_engine=`select @@global.default_storage_engine`;
let $default_checksum=`select @@global.aria_page_checksum`;
-set global storage_engine=aria;
-set session storage_engine=aria;
+set global default_storage_engine=aria;
+set session default_storage_engine=aria;
set global aria_page_checksum=0;
# Initialise
@@ -74,7 +74,7 @@ drop view v1;
# Set defaults back
--disable_result_log
--disable_query_log
-eval set global storage_engine=$default_engine, aria_page_checksum=$default_checksum;
+eval set global default_storage_engine=$default_engine, aria_page_checksum=$default_checksum;
set global aria_log_file_size=default;
--enable_result_log
--enable_query_log
diff --git a/mysql-test/suite/maria/max_length.result b/mysql-test/suite/maria/max_length.result
index 93478e033f4..4403ce5d0d2 100644
--- a/mysql-test/suite/maria/max_length.result
+++ b/mysql-test/suite/maria/max_length.result
@@ -1,14 +1,30 @@
drop table if exists t1,t2;
Warnings:
-Note 1051 Unknown table 'test.t1'
-Note 1051 Unknown table 'test.t2'
-create table t1 (id int(10) unsigned not null auto_increment primary key, v varchar(1000), b blob) row_format=page max_rows=2 engine=aria;
-create table t2 (id int(10) unsigned not null auto_increment primary key, v varchar(1000), b blob) row_format=page max_rows=20000000 engine=aria;
+Note 1051 Unknown table 'test.t1,test.t2'
+create table t1 (id int(10) unsigned not null auto_increment primary key, v varchar(2000), b blob) row_format=page max_rows=2 engine=aria;
+create table t2 (id int(10) unsigned not null auto_increment primary key, v varchar(2000), b blob, key(v)) row_format=page max_rows=20000000 engine=aria;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `v` varchar(2000) DEFAULT NULL,
+ `b` blob DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=Aria DEFAULT CHARSET=latin1 MAX_ROWS=2 PAGE_CHECKSUM=1 ROW_FORMAT=PAGE
+show create table t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `v` varchar(2000) DEFAULT NULL,
+ `b` blob DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ KEY `v` (`v`)
+) ENGINE=Aria DEFAULT CHARSET=latin1 MAX_ROWS=20000000 PAGE_CHECKSUM=1 ROW_FORMAT=PAGE
lock tables t1 write,t2 write;
show table status like "t_";
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 Aria 10 Page 0 0 8192 268320768 8192 0 1 # # # latin1_swedish_ci NULL max_rows=2 row_format=PAGE 536862720 N
-t2 Aria 10 Page 0 0 8192 17592186011648 8192 0 1 # # # latin1_swedish_ci NULL max_rows=20000000 row_format=PAGE 536862720 N
+t1 Aria 10 Page 0 0 8192 268320768 8192 0 1 # # # latin1_swedish_ci NULL max_rows=2 row_format=PAGE transactional=1 536862720 N
+t2 Aria 10 Page 0 0 8192 17592186011648 8192 0 1 # # # latin1_swedish_ci NULL max_rows=20000000 row_format=PAGE transactional=1 137438945280 N
insert into t1 values(null, repeat("ab",100),repeat("def",1000));
insert into t1 values(null, repeat("de",200),repeat("ghi",2000));
insert into t1 values(null, repeat("fe",300),repeat("ghi",3000));
@@ -160,9 +176,9 @@ test.t1 check warning Datafile is almost full, 268320768 of 268320768 used
test.t1 check status OK
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 Aria 10 Page 6189940 43 268320768 268320768 8192 0 NULL # # # latin1_swedish_ci NULL max_rows=10 row_format=PAGE 137438945280 N
+t1 Aria 10 Page 6189940 43 268320768 268320768 8192 0 NULL # # # latin1_swedish_ci NULL max_rows=10 row_format=PAGE transactional=1 137438945280 N
create index seq on t1(c1);
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 Aria 10 Page 6189940 43 268320768 268320768 49750016 0 NULL # # # latin1_swedish_ci NULL max_rows=10 page_checksum=1 row_format=PAGE 536862720 N
+t1 Aria 10 Page 6189940 43 268320768 268320768 49750016 0 NULL # # # latin1_swedish_ci NULL max_rows=10 page_checksum=1 row_format=PAGE transactional=1 536862720 N
drop table t1;
diff --git a/mysql-test/suite/maria/max_length.test b/mysql-test/suite/maria/max_length.test
index fdfe2aae4ac..a5bfb0b8fd6 100644
--- a/mysql-test/suite/maria/max_length.test
+++ b/mysql-test/suite/maria/max_length.test
@@ -4,11 +4,15 @@
--source include/have_maria.inc
--source include/have_sequence.inc
--source include/big_test.inc
+# This test is too slow for valgrind
+--source include/not_valgrind.inc
drop table if exists t1,t2;
-create table t1 (id int(10) unsigned not null auto_increment primary key, v varchar(1000), b blob) row_format=page max_rows=2 engine=aria;
-create table t2 (id int(10) unsigned not null auto_increment primary key, v varchar(1000), b blob) row_format=page max_rows=20000000 engine=aria;
+create table t1 (id int(10) unsigned not null auto_increment primary key, v varchar(2000), b blob) row_format=page max_rows=2 engine=aria;
+create table t2 (id int(10) unsigned not null auto_increment primary key, v varchar(2000), b blob, key(v)) row_format=page max_rows=20000000 engine=aria;
+show create table t1;
+show create table t2;
lock tables t1 write,t2 write;
--replace_column 12 # 13 # 14 #
show table status like "t_";
diff --git a/mysql-test/suite/maria/mrr.result b/mysql-test/suite/maria/mrr.result
index 17b7b751dfb..df915e4a15d 100644
--- a/mysql-test/suite/maria/mrr.result
+++ b/mysql-test/suite/maria/mrr.result
@@ -2,8 +2,8 @@ drop table if exists t1,t2,t3,t4;
set @maria_mrr_tmp=@@optimizer_switch;
set optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
set @mrr_buffer_size_save= @@mrr_buffer_size;
-set @save_storage_engine= @@storage_engine;
-set storage_engine=aria;
+set @save_storage_engine= @@default_storage_engine;
+set default_storage_engine=aria;
create table t1(a int);
show create table t1;
Table Create Table
@@ -297,7 +297,7 @@ NULL 7 0
NULL 9 0
NULL 9 0
drop table t1, t2;
-set storage_engine= @save_storage_engine;
+set default_storage_engine= @save_storage_engine;
set @@mrr_buffer_size= @mrr_buffer_size_save;
#
# Crash in quick_range_seq_next() in maria-5.3-dsmrr-cpk with join_cache_level = {8,1}
@@ -392,8 +392,6 @@ col_varchar_1024_latin1_key varchar(1024) DEFAULT NULL,
PRIMARY KEY (pk),
KEY col_varchar_1024_latin1_key (col_varchar_1024_latin1_key)
) ENGINE=Aria;
-Warnings:
-Note 1071 Specified key was too long; max key length is 1000 bytes
INSERT INTO t1 VALUES
(1,'z'), (2,'abcdefjhjkl'), (3,'in'), (4,'abcdefjhjkl'), (6,'abcdefjhjkl'),
(11,'zx'), (12,'abcdefjhjm'), (13,'jn'), (14,'abcdefjhjp'), (16,'abcdefjhjr');
@@ -407,7 +405,7 @@ WHERE
table1.col_varchar_1024_latin1_key = table2.col_varchar_10_latin1 AND table1.pk<>0 ;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE table2 ALL NULL NULL NULL NULL 2 Using where
-1 SIMPLE table1 ref PRIMARY,col_varchar_1024_latin1_key col_varchar_1024_latin1_key 1003 test.table2.col_varchar_10_latin1 2 Using where
+1 SIMPLE table1 ref PRIMARY,col_varchar_1024_latin1_key col_varchar_1024_latin1_key 1027 test.table2.col_varchar_10_latin1 2 Using index condition(BKA); Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
SELECT count(*)
FROM t1 AS table1, t2 AS table2
WHERE
@@ -425,12 +423,12 @@ set join_buffer_size=10240;
CREATE TABLE t1 (
f2 varchar(32) COLLATE latin1_swedish_ci,
f3 int(11),
-f4 varchar(1024) COLLATE utf8_bin,
-f5 varchar(1024) COLLATE latin1_bin,
+f4 varchar(2048) COLLATE utf8_bin,
+f5 varchar(2048) COLLATE latin1_bin,
KEY (f5)
) ENGINE=Aria TRANSACTIONAL=0 ;
Warnings:
-Note 1071 Specified key was too long; max key length is 1000 bytes
+Note 1071 Specified key was too long; max key length is 2000 bytes
# Fill the table with some data
SELECT alias2.* , alias1.f2
FROM
diff --git a/mysql-test/suite/maria/mrr.test b/mysql-test/suite/maria/mrr.test
index 6c6a8c4e7b6..45d75a9d795 100644
--- a/mysql-test/suite/maria/mrr.test
+++ b/mysql-test/suite/maria/mrr.test
@@ -12,11 +12,11 @@ set optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
set @mrr_buffer_size_save= @@mrr_buffer_size;
-set @save_storage_engine= @@storage_engine;
-set storage_engine=aria;
+set @save_storage_engine= @@default_storage_engine;
+set default_storage_engine=aria;
--source include/mrr_tests.inc
-set storage_engine= @save_storage_engine;
+set default_storage_engine= @save_storage_engine;
set @@mrr_buffer_size= @mrr_buffer_size_save;
@@ -144,8 +144,8 @@ set join_buffer_size=10240;
CREATE TABLE t1 (
f2 varchar(32) COLLATE latin1_swedish_ci,
f3 int(11),
- f4 varchar(1024) COLLATE utf8_bin,
- f5 varchar(1024) COLLATE latin1_bin,
+ f4 varchar(2048) COLLATE utf8_bin,
+ f5 varchar(2048) COLLATE latin1_bin,
KEY (f5)
) ENGINE=Aria TRANSACTIONAL=0 ;
diff --git a/mysql-test/suite/maria/rollback.result b/mysql-test/suite/maria/rollback.result
new file mode 100644
index 00000000000..fd2e012805a
--- /dev/null
+++ b/mysql-test/suite/maria/rollback.result
@@ -0,0 +1,186 @@
+call mtr.add_suppression("Table '.*' is marked as crashed and should be repaired");
+call mtr.add_suppression("Checking table: .*");
+create table t1 (a int primary key auto_increment, b int) engine=aria transactional= 1;
+create table t2 (a int primary key auto_increment, b int) engine=aria transactional= 0;
+create sequence s1 cache=2 engine=aria;
+insert into t1 (b) values (1),(2),(3),(4);
+insert into t2 (b) values (1),(2),(3),(4);
+select NEXT VALUE for s1,seq from seq_1_to_4;
+NEXT VALUE for s1 seq
+1 1
+2 2
+3 3
+4 4
+begin;
+insert into t1 (b) values (5),(6);
+insert into t1 (b) values (7),(8);
+insert into t2 (b) values (5),(6);
+insert into t2 (b) values (7),(8);
+commit;
+begin;
+insert into t1 (b) values (10),(11),(12);
+update t1 set b=100 where a=2;
+delete from t1 where a between 3 and 4;
+insert into t2 (b) values (10),(11),(12);
+update t2 set b=100 where a=2;
+delete from t2 where a between 3 and 4;
+select NEXT VALUE for s1,seq from seq_1_to_4;
+NEXT VALUE for s1 seq
+5 1
+6 2
+7 3
+8 4
+# Kill and restart
+select * from t1 order by a;
+a b
+1 1
+2 100
+5 5
+6 6
+7 7
+8 8
+9 10
+10 11
+11 12
+select * from t2 order by a;
+a b
+1 1
+2 100
+5 5
+6 6
+7 7
+8 8
+9 10
+10 11
+11 12
+Warnings:
+Error 145 Table './test/t2' is marked as crashed and should be repaired
+Warning 1034 1 client is using or hasn't closed the table properly
+Note 1034 Table is fixed
+insert into t1 (b) values (100),(200);
+insert into t2 (b) values (100),(200);
+select * from t1 order by a;
+a b
+1 1
+2 100
+5 5
+6 6
+7 7
+8 8
+9 10
+10 11
+11 12
+12 100
+13 200
+select * from t2 order by a;
+a b
+1 1
+2 100
+5 5
+6 6
+7 7
+8 8
+9 10
+10 11
+11 12
+12 100
+13 200
+select NEXT VALUE for s1,seq from seq_1_to_4;
+NEXT VALUE for s1 seq
+9 1
+10 2
+11 3
+12 4
+Warnings:
+Error 145 Table './test/s1' is marked as crashed and should be repaired
+Warning 1034 1 client is using or hasn't closed the table properly
+Note 1034 Table is fixed
+drop table t1,t2;
+drop sequence s1;
+include/show_binlog_events.inc
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Gtid # # BEGIN GTID #-#-#
+master-bin.000001 # Query # # use `mtr`; INSERT INTO test_suppressions (pattern) VALUES ( NAME_CONST('pattern',_latin1'Table \'.*\' is marked as crashed and should be repaired' COLLATE 'latin1_swedish_ci'))
+master-bin.000001 # Query # # COMMIT
+master-bin.000001 # Gtid # # BEGIN GTID #-#-#
+master-bin.000001 # Query # # use `mtr`; INSERT INTO test_suppressions (pattern) VALUES ( NAME_CONST('pattern',_latin1'Checking table: .*' COLLATE 'latin1_swedish_ci'))
+master-bin.000001 # Query # # COMMIT
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # use `test`; create table t1 (a int primary key auto_increment, b int) engine=aria transactional= 1
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # use `test`; create table t2 (a int primary key auto_increment, b int) engine=aria transactional= 0
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # use `test`; create sequence s1 cache=2 engine=aria
+master-bin.000001 # Gtid # # BEGIN GTID #-#-#
+master-bin.000001 # Intvar # # INSERT_ID=1
+master-bin.000001 # Query # # use `test`; insert into t1 (b) values (1),(2),(3),(4)
+master-bin.000001 # Query # # COMMIT
+master-bin.000001 # Gtid # # BEGIN GTID #-#-#
+master-bin.000001 # Intvar # # INSERT_ID=1
+master-bin.000001 # Query # # use `test`; insert into t2 (b) values (1),(2),(3),(4)
+master-bin.000001 # Query # # COMMIT
+master-bin.000001 # Gtid # # BEGIN GTID #-#-#
+master-bin.000001 # Annotate_rows # # select NEXT VALUE for s1,seq from seq_1_to_4
+master-bin.000001 # Table_map # # table_id: # (test.s1)
+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 # Intvar # # INSERT_ID=5
+master-bin.000001 # Query # # use `test`; insert into t1 (b) values (5),(6)
+master-bin.000001 # Query # # COMMIT
+master-bin.000001 # Gtid # # BEGIN GTID #-#-#
+master-bin.000001 # Intvar # # INSERT_ID=7
+master-bin.000001 # Query # # use `test`; insert into t1 (b) values (7),(8)
+master-bin.000001 # Query # # COMMIT
+master-bin.000001 # Gtid # # BEGIN GTID #-#-#
+master-bin.000001 # Intvar # # INSERT_ID=5
+master-bin.000001 # Query # # use `test`; insert into t2 (b) values (5),(6)
+master-bin.000001 # Query # # COMMIT
+master-bin.000001 # Gtid # # BEGIN GTID #-#-#
+master-bin.000001 # Intvar # # INSERT_ID=7
+master-bin.000001 # Query # # use `test`; insert into t2 (b) values (7),(8)
+master-bin.000001 # Query # # COMMIT
+master-bin.000001 # Gtid # # BEGIN GTID #-#-#
+master-bin.000001 # Intvar # # INSERT_ID=9
+master-bin.000001 # Query # # use `test`; insert into t1 (b) values (10),(11),(12)
+master-bin.000001 # Query # # COMMIT
+master-bin.000001 # Gtid # # BEGIN GTID #-#-#
+master-bin.000001 # Query # # use `test`; update t1 set b=100 where a=2
+master-bin.000001 # Query # # COMMIT
+master-bin.000001 # Gtid # # BEGIN GTID #-#-#
+master-bin.000001 # Query # # use `test`; delete from t1 where a between 3 and 4
+master-bin.000001 # Query # # COMMIT
+master-bin.000001 # Gtid # # BEGIN GTID #-#-#
+master-bin.000001 # Intvar # # INSERT_ID=9
+master-bin.000001 # Query # # use `test`; insert into t2 (b) values (10),(11),(12)
+master-bin.000001 # Query # # COMMIT
+master-bin.000001 # Gtid # # BEGIN GTID #-#-#
+master-bin.000001 # Query # # use `test`; update t2 set b=100 where a=2
+master-bin.000001 # Query # # COMMIT
+master-bin.000001 # Gtid # # BEGIN GTID #-#-#
+master-bin.000001 # Query # # use `test`; delete from t2 where a between 3 and 4
+master-bin.000001 # Query # # COMMIT
+master-bin.000001 # Gtid # # BEGIN GTID #-#-#
+master-bin.000001 # Annotate_rows # # select NEXT VALUE for s1,seq from seq_1_to_4
+master-bin.000001 # Table_map # # table_id: # (test.s1)
+master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
+master-bin.000001 # Query # # COMMIT
+include/show_binlog_events.inc
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000002 # Gtid # # BEGIN GTID #-#-#
+master-bin.000002 # Intvar # # INSERT_ID=12
+master-bin.000002 # Query # # use `test`; insert into t1 (b) values (100),(200)
+master-bin.000002 # Query # # COMMIT
+master-bin.000002 # Gtid # # BEGIN GTID #-#-#
+master-bin.000002 # Intvar # # INSERT_ID=12
+master-bin.000002 # Query # # use `test`; insert into t2 (b) values (100),(200)
+master-bin.000002 # Query # # COMMIT
+master-bin.000002 # Gtid # # BEGIN GTID #-#-#
+master-bin.000002 # Annotate_rows # # select NEXT VALUE for s1,seq from seq_1_to_4
+master-bin.000002 # Table_map # # table_id: # (test.s1)
+master-bin.000002 # Write_rows_v1 # # table_id: # flags: STMT_END_F
+master-bin.000002 # Query # # COMMIT
+master-bin.000002 # Gtid # # GTID #-#-#
+master-bin.000002 # Query # # use `test`; DROP TABLE `t1`,`t2` /* generated by server */
+master-bin.000002 # Gtid # # GTID #-#-#
+master-bin.000002 # Query # # use `test`; DROP SEQUENCE `s1` /* generated by server */
diff --git a/mysql-test/suite/maria/rollback.test b/mysql-test/suite/maria/rollback.test
new file mode 100644
index 00000000000..40a96b9b05b
--- /dev/null
+++ b/mysql-test/suite/maria/rollback.test
@@ -0,0 +1,51 @@
+--source include/have_binlog_format_mixed_or_statement.inc
+--source include/have_sequence.inc
+# no-protocol doesn't print warnings about repaired tables
+--source include/no_protocol.inc
+
+call mtr.add_suppression("Table '.*' is marked as crashed and should be repaired");
+call mtr.add_suppression("Checking table: .*");
+
+#
+# Testing rollback after crash
+#
+
+create table t1 (a int primary key auto_increment, b int) engine=aria transactional= 1;
+create table t2 (a int primary key auto_increment, b int) engine=aria transactional= 0;
+create sequence s1 cache=2 engine=aria;
+
+insert into t1 (b) values (1),(2),(3),(4);
+insert into t2 (b) values (1),(2),(3),(4);
+select NEXT VALUE for s1,seq from seq_1_to_4;
+
+begin;
+insert into t1 (b) values (5),(6);
+insert into t1 (b) values (7),(8);
+insert into t2 (b) values (5),(6);
+insert into t2 (b) values (7),(8);
+commit;
+begin;
+insert into t1 (b) values (10),(11),(12);
+update t1 set b=100 where a=2;
+delete from t1 where a between 3 and 4;
+
+insert into t2 (b) values (10),(11),(12);
+update t2 set b=100 where a=2;
+delete from t2 where a between 3 and 4;
+select NEXT VALUE for s1,seq from seq_1_to_4;
+
+--source include/kill_and_restart_mysqld.inc
+
+select * from t1 order by a;
+select * from t2 order by a;
+insert into t1 (b) values (100),(200);
+insert into t2 (b) values (100),(200);
+select * from t1 order by a;
+select * from t2 order by a;
+select NEXT VALUE for s1,seq from seq_1_to_4;
+drop table t1,t2;
+drop sequence s1;
+
+source include/show_binlog_events.inc;
+--let $binlog_file=master-bin.000002
+source include/show_binlog_events.inc;
diff --git a/mysql-test/suite/maria/transaction.result b/mysql-test/suite/maria/transaction.result
new file mode 100644
index 00000000000..369d3728839
--- /dev/null
+++ b/mysql-test/suite/maria/transaction.result
@@ -0,0 +1,19 @@
+connect con1, localhost, root,,;
+connection default;
+CREATE TABLE t1 (c1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY (c1))
+ENGINE = aria;
+START TRANSACTION;
+INSERT INTO t1 (c1) VALUES (2);
+INSERT INTO t1 (c1) VALUES (4);
+connection con1;
+START TRANSACTION;
+select * from t1;
+c1
+2
+4
+select * from t1 where c1=2;
+c1
+2
+disconnect con1;
+connection default;
+drop table t1;
diff --git a/mysql-test/suite/maria/transaction.test b/mysql-test/suite/maria/transaction.test
new file mode 100644
index 00000000000..6cf4590cdbd
--- /dev/null
+++ b/mysql-test/suite/maria/transaction.test
@@ -0,0 +1,26 @@
+#
+# Test that checks transactions and MVCC
+#
+
+#
+# This is a taken from parts.partition_auto_increment_maria. It originally
+# crashde because con1 could read the first record from t1, which confused
+# the optimizer.
+#
+
+connect(con1, localhost, root,,);
+connection default;
+CREATE TABLE t1 (c1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY (c1))
+ ENGINE = aria;
+START TRANSACTION;
+INSERT INTO t1 (c1) VALUES (2);
+INSERT INTO t1 (c1) VALUES (4);
+connection con1;
+START TRANSACTION;
+# When Aria proparly supports MVCC, the following two queries will not see
+# any rows
+select * from t1;
+select * from t1 where c1=2;
+disconnect con1;
+connection default;
+drop table t1;
diff --git a/mysql-test/suite/mariabackup/absolute_ibdata_paths.opt b/mysql-test/suite/mariabackup/absolute_ibdata_paths.opt
index 6c6a45cb572..49297a84918 100644
--- a/mysql-test/suite/mariabackup/absolute_ibdata_paths.opt
+++ b/mysql-test/suite/mariabackup/absolute_ibdata_paths.opt
@@ -1,2 +1,3 @@
--innodb --innodb-data-home-dir= --innodb-data-file-path=$MYSQLTEST_VARDIR/tmp/absolute_path_ibdata1:6M;ibdata_second:1M:autoextend
--innodb-undo-tablespaces=2
+--innodb-checksum-algorithm=crc32
diff --git a/mysql-test/suite/mariabackup/ddl_incremental_encrypted.result b/mysql-test/suite/mariabackup/ddl_incremental_encrypted.result
deleted file mode 100644
index f42b6469db6..00000000000
--- a/mysql-test/suite/mariabackup/ddl_incremental_encrypted.result
+++ /dev/null
@@ -1,26 +0,0 @@
-SET @old_innodb_log_optimize_ddl=@@global.innodb_log_optimize_ddl;
-SET GLOBAL innodb_log_optimize_ddl=ON;
-SET @old_debug_dbug=@@global.debug_dbug;
-SET GLOBAL debug_dbug="+d,ib_log_checkpoint_avoid";
-SET @old_innodb_page_cleaner_disabled_debug=@@global.innodb_page_cleaner_disabled_debug;
-SET GLOBAL innodb_page_cleaner_disabled_debug=ON;
-CREATE TABLE t1 (c INT) ENGINE=InnoDB;
-INSERT INTO t1 VALUES (1);
-# backup
-SET GLOBAL debug_dbug="+d,ib_do_not_log_crypt_data";
-INSERT INTO t1 VALUES (2);
-# incremental backup
-# prepare
-# incremental prepare
-SET GLOBAL innodb_log_optimize_ddl=@old_innodb_log_optimize_ddl;
-SET GLOBAL innodb_page_cleaner_disabled_debug=@old_innodb_page_cleaner_disabled_debug;
-SET GLOBAL debug_dbug=@old_debug_dbug;
-# Restore and check results
-# shutdown server
-# remove datadir
-# xtrabackup move back
-# restart
-SELECT count(*) FROM t1;
-count(*)
-2
-DROP TABLE t1;
diff --git a/mysql-test/suite/mariabackup/ddl_incremental_encrypted.test b/mysql-test/suite/mariabackup/ddl_incremental_encrypted.test
deleted file mode 100644
index 196201f61c7..00000000000
--- a/mysql-test/suite/mariabackup/ddl_incremental_encrypted.test
+++ /dev/null
@@ -1,66 +0,0 @@
-#
-# If MDEV-20755 bug is no fixed, incremental prepare will fail.
-#
---source include/have_debug.inc
---source include/have_file_key_management.inc
-
---let $base_dir=$MYSQLTEST_VARDIR/tmp/backup
---let $inc_dir=$MYSQLTEST_VARDIR/tmp/backup_inc
-
-SET @old_innodb_log_optimize_ddl=@@global.innodb_log_optimize_ddl;
-SET GLOBAL innodb_log_optimize_ddl=ON;
-
-# Disable pages flushing to allow redo log records to be executed on --prepare.
-SET @old_debug_dbug=@@global.debug_dbug;
-SET GLOBAL debug_dbug="+d,ib_log_checkpoint_avoid";
-SET @old_innodb_page_cleaner_disabled_debug=@@global.innodb_page_cleaner_disabled_debug;
-SET GLOBAL innodb_page_cleaner_disabled_debug=ON;
-
-CREATE TABLE t1 (c INT) ENGINE=InnoDB;
-INSERT INTO t1 VALUES (1);
-
---echo # backup
---disable_result_log
---exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$base_dir
---enable_result_log
-
-# Do not log crypt data to avoid it's execution on --prepare.
-SET GLOBAL debug_dbug="+d,ib_do_not_log_crypt_data";
-INSERT INTO t1 VALUES (2);
-
---disable_result_log
-
-# Execute OPTIMIZE TABLE after the table is copied to execute optimized ddl
-# callback during backup, which, in turns, will create t1.new file in backup
-# directory.
---let after_copy_test_t1=OPTIMIZE TABLE test.t1;
-
---echo # incremental backup
---exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$inc_dir --incremental-basedir=$base_dir --dbug=+d,mariabackup_events
-
---echo # prepare
---exec $XTRABACKUP --prepare --target-dir=$base_dir
-
-# If the tablespace is created during delta tablespace open procedure, then
-# crypt data will be not written, and page corruption test will not pass
-# when some redo log event is executed, and --prepare will fail.
---echo # incremental prepare
---exec $XTRABACKUP --prepare --target-dir=$base_dir --incremental-dir=$inc_dir
-
---enable_result_log
-
-SET GLOBAL innodb_log_optimize_ddl=@old_innodb_log_optimize_ddl;
-SET GLOBAL innodb_page_cleaner_disabled_debug=@old_innodb_page_cleaner_disabled_debug;
-SET GLOBAL debug_dbug=@old_debug_dbug;
-
---echo # Restore and check results
---let $targetdir=$base_dir
---source include/restart_and_restore.inc
---enable_result_log
-
-SELECT count(*) FROM t1;
-
-# Cleanup
-DROP TABLE t1;
---rmdir $base_dir
---rmdir $inc_dir
diff --git a/mysql-test/suite/mariabackup/huge_lsn.result b/mysql-test/suite/mariabackup/huge_lsn.result
index 1af19ef3cf8..b24c1af964c 100644
--- a/mysql-test/suite/mariabackup/huge_lsn.result
+++ b/mysql-test/suite/mariabackup/huge_lsn.result
@@ -2,7 +2,7 @@
# MDEV-13416 mariabackup fails with EFAULT "Bad Address"
#
# restart
-FOUND 1 /InnoDB: New log files created, LSN=175964\d{8}/ in mysqld.1.err
+FOUND 1 /InnoDB: New log file created, LSN=175964\d{8}/ in mysqld.1.err
CREATE TABLE t(i INT) ENGINE INNODB;
INSERT INTO t VALUES(1);
# xtrabackup backup
diff --git a/mysql-test/suite/mariabackup/huge_lsn.test b/mysql-test/suite/mariabackup/huge_lsn.test
index 055c92f9a55..0af66b761ec 100644
--- a/mysql-test/suite/mariabackup/huge_lsn.test
+++ b/mysql-test/suite/mariabackup/huge_lsn.test
@@ -39,7 +39,7 @@ EOF
--source include/start_mysqld.inc
let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err;
---let SEARCH_PATTERN= InnoDB: New log files created, LSN=175964\d{8}
+--let SEARCH_PATTERN= InnoDB: New log file created, LSN=175964\d{8}
--source include/search_pattern_in_file.inc
CREATE TABLE t(i INT) ENGINE INNODB;
diff --git a/mysql-test/suite/mariabackup/innodb_log_optimize_ddl.result b/mysql-test/suite/mariabackup/innodb_log_optimize_ddl.result
deleted file mode 100644
index f27f9d0d303..00000000000
--- a/mysql-test/suite/mariabackup/innodb_log_optimize_ddl.result
+++ /dev/null
@@ -1,37 +0,0 @@
-SET GLOBAL innodb_log_optimize_ddl=OFF;
-CREATE TABLE tz(id BIGINT PRIMARY KEY, i INT)
-ENGINE=InnoDB ROW_FORMAT=COMPRESSED;
-INSERT INTO tz(id) select * from seq_1_to_10000;
-CREATE TABLE tr(id BIGINT PRIMARY KEY, i INT)
-ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
-INSERT INTO tr(id) select * from seq_1_to_10000;
-CREATE TABLE td(id BIGINT PRIMARY KEY, i INT)
-ENGINE=InnoDB;
-INSERT INTO td(id) select * from seq_1_to_10000;
-CREATE PROCEDURE a()
-BEGIN
-ALTER TABLE tz ADD INDEX(i);
-ALTER TABLE tr ADD INDEX(i);
-ALTER TABLE td ADD INDEX(i);
-END //
-call a();
-# shutdown server
-# remove datadir
-# xtrabackup move back
-# restart
-DROP PROCEDURE a;
-CHECK TABLE tz,tr,td;
-Table Op Msg_type Msg_text
-test.tz check status OK
-test.tr check status OK
-test.td check status OK
-SELECT COUNT(*) FROM tz;
-COUNT(*)
-10000
-SELECT COUNT(*) FROM tr;
-COUNT(*)
-10000
-SELECT COUNT(*) FROM td;
-COUNT(*)
-10000
-DROP TABLE tz,tr,td;
diff --git a/mysql-test/suite/mariabackup/innodb_log_optimize_ddl.test b/mysql-test/suite/mariabackup/innodb_log_optimize_ddl.test
deleted file mode 100644
index d6680bec077..00000000000
--- a/mysql-test/suite/mariabackup/innodb_log_optimize_ddl.test
+++ /dev/null
@@ -1,47 +0,0 @@
-# see unsupported_redo.test for the opposite (default) case
---source include/have_innodb.inc
---source include/have_sequence.inc
-
-SET GLOBAL innodb_log_optimize_ddl=OFF;
-
-CREATE TABLE tz(id BIGINT PRIMARY KEY, i INT)
-ENGINE=InnoDB ROW_FORMAT=COMPRESSED;
-INSERT INTO tz(id) select * from seq_1_to_10000;
-CREATE TABLE tr(id BIGINT PRIMARY KEY, i INT)
-ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
-INSERT INTO tr(id) select * from seq_1_to_10000;
-CREATE TABLE td(id BIGINT PRIMARY KEY, i INT)
-ENGINE=InnoDB;
-INSERT INTO td(id) select * from seq_1_to_10000;
-
-DELIMITER //;
-CREATE PROCEDURE a()
-BEGIN
- ALTER TABLE tz ADD INDEX(i);
- ALTER TABLE tr ADD INDEX(i);
- ALTER TABLE td ADD INDEX(i);
-END //
-DELIMITER ;//
-
-let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
-
-send call a();
-
---disable_result_log
-exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir;
---enable_result_log
-exec $XTRABACKUP --prepare --target-dir=$targetdir;
-
-reap;
-
--- source include/restart_and_restore.inc
---rmdir $targetdir
-
-DROP PROCEDURE a;
-
-CHECK TABLE tz,tr,td;
-SELECT COUNT(*) FROM tz;
-SELECT COUNT(*) FROM tr;
-SELECT COUNT(*) FROM td;
-
-DROP TABLE tz,tr,td;
diff --git a/mysql-test/suite/mariabackup/innodb_redo_log_overwrite.opt b/mysql-test/suite/mariabackup/innodb_redo_log_overwrite.opt
index 7111d384b40..95b88d038ee 100644
--- a/mysql-test/suite/mariabackup/innodb_redo_log_overwrite.opt
+++ b/mysql-test/suite/mariabackup/innodb_redo_log_overwrite.opt
@@ -1 +1 @@
---loose-innodb-log-file-size=1048576 --loose-innodb-log-files-in-group=2
+--loose-innodb-log-file-size=2097152
diff --git a/mysql-test/suite/mariabackup/innodb_redo_overwrite.opt b/mysql-test/suite/mariabackup/innodb_redo_overwrite.opt
index 7111d384b40..19c08c8c945 100644
--- a/mysql-test/suite/mariabackup/innodb_redo_overwrite.opt
+++ b/mysql-test/suite/mariabackup/innodb_redo_overwrite.opt
@@ -1 +1 @@
---loose-innodb-log-file-size=1048576 --loose-innodb-log-files-in-group=2
+--loose-innodb-log-file-size=2m
diff --git a/mysql-test/suite/mariabackup/innodb_redo_overwrite.result b/mysql-test/suite/mariabackup/innodb_redo_overwrite.result
index 571bfd35c70..9076dbaa57a 100644
--- a/mysql-test/suite/mariabackup/innodb_redo_overwrite.result
+++ b/mysql-test/suite/mariabackup/innodb_redo_overwrite.result
@@ -24,5 +24,4 @@ INSERT INTO t SELECT * FROM t;
# xtrabackup backup
FOUND 1 /failed: redo log block is overwritten/ in backup.log
FOUND 1 /failed: redo log block checksum does not match/ in backup.log
-FOUND 1 /failed: unknown reason/ in backup.log
DROP TABLE t;
diff --git a/mysql-test/suite/mariabackup/innodb_redo_overwrite.test b/mysql-test/suite/mariabackup/innodb_redo_overwrite.test
index 55e754f18d7..e27229c5f33 100644
--- a/mysql-test/suite/mariabackup/innodb_redo_overwrite.test
+++ b/mysql-test/suite/mariabackup/innodb_redo_overwrite.test
@@ -52,19 +52,6 @@ INSERT INTO t SELECT * FROM t;
--remove_file $backuplog
--rmdir $targetdir
---let before_innodb_log_copy_thread_started=INSERT INTO test.t SELECT * FROM test.t LIMIT 50000
-
---disable_result_log
---error 1
---exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir --innodb-log-checksums=0 --dbug=+d,mariabackup_events > $backuplog
---enable_result_log
-
---let SEARCH_PATTERN=failed: unknown reason
---let SEARCH_FILE=$backuplog
---source include/search_pattern_in_file.inc
---remove_file $backuplog
---rmdir $targetdir
-
--let before_innodb_log_copy_thread_started=
DROP TABLE t;
diff --git a/mysql-test/suite/mariabackup/innodb_xa_rollback.result b/mysql-test/suite/mariabackup/innodb_xa_rollback.result
deleted file mode 100644
index 1bf6a9a23d3..00000000000
--- a/mysql-test/suite/mariabackup/innodb_xa_rollback.result
+++ /dev/null
@@ -1,45 +0,0 @@
-CALL mtr.add_suppression("Found 1 prepared XA transactions");
-RESET MASTER;
-CREATE TABLE t1 (a INT) ENGINE=INNODB;
-XA START 'test1';
-INSERT t1 VALUES (10);
-XA END 'test1';
-XA PREPARE 'test1';
-XA RECOVER;
-formatID gtrid_length bqual_length data
-1 5 0 test1
-# xtrabackup backup
-XA ROLLBACK 'test1';
-# xtrabackup prepare and rollback prepared XA
-# shutdown server
-# remove datadir
-# xtrabackup move back
-# restart
-XA RECOVER;
-formatID gtrid_length bqual_length data
-# xtrabackup prepare and DO NOT rollback prepared XA
-# shutdown server
-# remove datadir
-# xtrabackup move back
-# restart
-XA RECOVER;
-formatID gtrid_length bqual_length data
-1 5 0 test1
-XA ROLLBACK 'test1';
-# xtrabackup prepare for export and rollback prepared XA
-# shutdown server
-# remove datadir
-# xtrabackup move back
-# restart
-XA RECOVER;
-formatID gtrid_length bqual_length data
-# xtrabackup prepare for export and DO NOT rollback prepared XA
-# shutdown server
-# remove datadir
-# xtrabackup move back
-# restart
-XA RECOVER;
-formatID gtrid_length bqual_length data
-1 5 0 test1
-XA ROLLBACK 'test1';
-DROP TABLE t1;
diff --git a/mysql-test/suite/mariabackup/innodb_xa_rollback.test b/mysql-test/suite/mariabackup/innodb_xa_rollback.test
deleted file mode 100644
index f8ba5ea8cfa..00000000000
--- a/mysql-test/suite/mariabackup/innodb_xa_rollback.test
+++ /dev/null
@@ -1,77 +0,0 @@
-#
-# Optionally rollback prepared XA when backup is prepared
-#
---source include/have_innodb.inc
---source include/have_binlog_format_mixed.inc
-
-CALL mtr.add_suppression("Found 1 prepared XA transactions");
-
-RESET MASTER;
-
-let targetdir1=$MYSQLTEST_VARDIR/tmp/backup1;
-let targetdir2=$MYSQLTEST_VARDIR/tmp/backup2;
-let targetdir3=$MYSQLTEST_VARDIR/tmp/backup3;
-let targetdir4=$MYSQLTEST_VARDIR/tmp/backup4;
-
-CREATE TABLE t1 (a INT) ENGINE=INNODB;
-XA START 'test1';
-INSERT t1 VALUES (10);
-XA END 'test1';
-XA PREPARE 'test1';
-XA RECOVER;
-
---echo # xtrabackup backup
---disable_result_log
-exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir1;
---enable_result_log
-
-perl;
-use lib "lib";
-use My::Handles { suppress_init_messages => 1 };
-use My::File::Path;
-copytree($ENV{'targetdir1'}, $ENV{'targetdir2'});
-copytree($ENV{'targetdir1'}, $ENV{'targetdir3'});
-copytree($ENV{'targetdir1'}, $ENV{'targetdir4'});
-EOF
-
-XA ROLLBACK 'test1';
-
---echo # xtrabackup prepare and rollback prepared XA
---disable_result_log
-exec $XTRABACKUP --prepare --rollback_xa --target-dir=$targetdir1;
---let $targetdir = $targetdir1
---source include/restart_and_restore.inc
---enable_result_log
-XA RECOVER;
-
---echo # xtrabackup prepare and DO NOT rollback prepared XA
---disable_result_log
-exec $XTRABACKUP --prepare --target-dir=$targetdir2;
---let $targetdir = $targetdir2
---source include/restart_and_restore.inc
---enable_result_log
-XA RECOVER;
-XA ROLLBACK 'test1';
-
---echo # xtrabackup prepare for export and rollback prepared XA
---disable_result_log
-exec $XTRABACKUP --prepare --rollback_xa --export --target-dir=$targetdir3;
---let $targetdir = $targetdir3
---source include/restart_and_restore.inc
---enable_result_log
-XA RECOVER;
-
---echo # xtrabackup prepare for export and DO NOT rollback prepared XA
---disable_result_log
-exec $XTRABACKUP --prepare --export --target-dir=$targetdir4;
---let $targetdir = $targetdir4
---source include/restart_and_restore.inc
---enable_result_log
-XA RECOVER;
-XA ROLLBACK 'test1';
-
-DROP TABLE t1;
-rmdir $targetdir1;
-rmdir $targetdir2;
-rmdir $targetdir3;
-rmdir $targetdir4;
diff --git a/mysql-test/suite/mariabackup/mlog_index_load.result b/mysql-test/suite/mariabackup/mlog_index_load.result
deleted file mode 100644
index b2367d52dce..00000000000
--- a/mysql-test/suite/mariabackup/mlog_index_load.result
+++ /dev/null
@@ -1,16 +0,0 @@
-CREATE TABLE t1(i INT PRIMARY KEY auto_increment, a int) ENGINE INNODB;
-INSERT INTO t1(a) SELECT * from seq_1_to_10000;
-SET GLOBAL innodb_log_optimize_ddl=ON;
-# xtrabackup backup
-t1.frm
-t1.ibd
-t1.new
-# xtrabackup prepare
-# shutdown server
-# remove datadir
-# xtrabackup move back
-# restart
-SELECT COUNT(*) from t1;
-COUNT(*)
-10000
-DROP TABLE t1;
diff --git a/mysql-test/suite/mariabackup/mlog_index_load.test b/mysql-test/suite/mariabackup/mlog_index_load.test
deleted file mode 100644
index b9fd6f8ca32..00000000000
--- a/mysql-test/suite/mariabackup/mlog_index_load.test
+++ /dev/null
@@ -1,28 +0,0 @@
---source include/have_debug.inc
-
-CREATE TABLE t1(i INT PRIMARY KEY auto_increment, a int) ENGINE INNODB;
-INSERT INTO t1(a) SELECT * from seq_1_to_10000;
-SET GLOBAL innodb_log_optimize_ddl=ON;
-
-let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
-
-let after_copy_test_t1=CREATE INDEX a_ind ON test.t1(a) ALGORITHM=INPLACE;
-echo # xtrabackup backup;
---disable_result_log
-exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir --dbug=+d,mariabackup_events;
---enable_result_log
-
---list_files $targetdir/test t1*
---let before_copy_test_t1=
-
-echo # xtrabackup prepare;
---disable_result_log
-exec $XTRABACKUP --prepare --target-dir=$targetdir;
--- source include/restart_and_restore.inc
---enable_result_log
-
-# Check that new table is there after restore.
-SELECT COUNT(*) from t1;
-DROP TABLE t1;
-rmdir $targetdir;
-
diff --git a/mysql-test/suite/mariabackup/row_format_redundant.result b/mysql-test/suite/mariabackup/row_format_redundant.result
new file mode 100644
index 00000000000..7ff5e8654c6
--- /dev/null
+++ b/mysql-test/suite/mariabackup/row_format_redundant.result
@@ -0,0 +1,14 @@
+CREATE TABLE t1 (pk INT PRIMARY KEY, a YEAR UNSIGNED) ENGINE=InnoDB
+ROW_FORMAT=REDUNDANT;
+INSERT INTO t1 VALUES (1,2021),(2,21),(3,0);
+UPDATE t1 SET a = NULL;
+# shutdown server
+# remove datadir
+# xtrabackup move back
+# restart
+SELECT * FROM t1;
+pk a
+1 NULL
+2 NULL
+3 NULL
+DROP TABLE t1;
diff --git a/mysql-test/suite/mariabackup/row_format_redundant.test b/mysql-test/suite/mariabackup/row_format_redundant.test
new file mode 100644
index 00000000000..5bae9218d84
--- /dev/null
+++ b/mysql-test/suite/mariabackup/row_format_redundant.test
@@ -0,0 +1,17 @@
+--source include/have_innodb.inc
+
+--let $targetdir=$MYSQLTEST_VARDIR/tmp/backup
+
+CREATE TABLE t1 (pk INT PRIMARY KEY, a YEAR UNSIGNED) ENGINE=InnoDB
+ROW_FORMAT=REDUNDANT;
+INSERT INTO t1 VALUES (1,2021),(2,21),(3,0);
+UPDATE t1 SET a = NULL;
+
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir;
+exec $XTRABACKUP --prepare --verbose --target-dir=$targetdir;
+--source include/restart_and_restore.inc
+
+rmdir $targetdir;
+
+SELECT * FROM t1;
+DROP TABLE t1;
diff --git a/mysql-test/suite/mariabackup/undo_space_id.result b/mysql-test/suite/mariabackup/undo_space_id.result
index 96d3e2a58f4..b03b9705569 100644
--- a/mysql-test/suite/mariabackup/undo_space_id.result
+++ b/mysql-test/suite/mariabackup/undo_space_id.result
@@ -1,13 +1,13 @@
-# Create 2 UNDO TABLESPACE(UNDO003, UNDO004)
+# Create 2 UNDO TABLESPACE(UNDO001(space_id =3), UNDO002(space_id =4))
CREATE TABLE t1(a varchar(60)) ENGINE INNODB;
start transaction;
INSERT INTO t1 VALUES(1);
# xtrabackup backup
# Display undo log files from target directory
-undo003
-undo004
+undo001
+undo002
# xtrabackup prepare
# Display undo log files from targer directory
-undo003
-undo004
+undo001
+undo002
DROP TABLE t1;
diff --git a/mysql-test/suite/mariabackup/undo_space_id.test b/mysql-test/suite/mariabackup/undo_space_id.test
index e903a0ad4c5..2c56492fd8e 100644
--- a/mysql-test/suite/mariabackup/undo_space_id.test
+++ b/mysql-test/suite/mariabackup/undo_space_id.test
@@ -1,7 +1,7 @@
--source include/have_innodb.inc
--source include/have_debug.inc
---echo # Create 2 UNDO TABLESPACE(UNDO003, UNDO004)
+--echo # Create 2 UNDO TABLESPACE(UNDO001(space_id =3), UNDO002(space_id =4))
let $basedir=$MYSQLTEST_VARDIR/tmp/backup;
diff --git a/mysql-test/suite/mariabackup/xb_compressed_encrypted.opt b/mysql-test/suite/mariabackup/xb_compressed_encrypted.opt
index 8baef973470..4105fecfe58 100644
--- a/mysql-test/suite/mariabackup/xb_compressed_encrypted.opt
+++ b/mysql-test/suite/mariabackup/xb_compressed_encrypted.opt
@@ -1,4 +1,4 @@
---innodb-encryption-rotate-key-age=2
+--innodb-encryption-rotate-key-age=0
--innodb-encryption-threads=4
--innodb-tablespaces-encryption
--plugin-load-add=$FILE_KEY_MANAGEMENT_SO
diff --git a/mysql-test/suite/mariabackup/xbstream.test b/mysql-test/suite/mariabackup/xbstream.test
index 9161d227b20..212ac598064 100644
--- a/mysql-test/suite/mariabackup/xbstream.test
+++ b/mysql-test/suite/mariabackup/xbstream.test
@@ -8,7 +8,7 @@ mkdir $targetdir;
let $streamfile=$MYSQLTEST_VARDIR/tmp/backup.xb;
echo # xtrabackup backup to stream;
-exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --stream=xbstream > $streamfile 2>$targetdir/backup_stream.log;
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --databases-exclude=foobar --stream=xbstream > $streamfile 2>$targetdir/backup_stream.log;
echo # xbstream extract;
--disable_result_log
exec $XBSTREAM -x -C $targetdir < $streamfile;
diff --git a/mysql-test/suite/multi_source/info_logs.result b/mysql-test/suite/multi_source/info_logs.result
index 531a6178cdb..b0a112aaf3b 100644
--- a/mysql-test/suite/multi_source/info_logs.result
+++ b/mysql-test/suite/multi_source/info_logs.result
@@ -90,16 +90,16 @@ MASTER 2.2
#
show all slaves status;
Connection_name Slave_SQL_State Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id Master_SSL_Crl Master_SSL_Crlpath Using_Gtid Gtid_IO_Pos Replicate_Do_Domain_Ids Replicate_Ignore_Domain_Ids Parallel_Mode SQL_Delay SQL_Remaining_Delay Slave_SQL_Running_State Slave_DDL_Groups Slave_Non_Transactional_Groups Slave_Transactional_Groups Retried_transactions Max_relay_log_size Executed_log_entries Slave_received_heartbeats Slave_heartbeat_period Gtid_Slave_Pos
- Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_1 60 master-bin.000001 <read_master_log_pos> relay.000002 <relay_log_pos> master-bin.000001 Yes Yes 0 0 <read_master_log_pos> <relay_log_space1> None 0 No 0 No 0 0 1 No conservative 0 NULL Slave has read all relay log; waiting for the slave I/O thread to update it 0 0 0 0 1073741824 7 0 60.000
-MASTER 2.2 Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_2 60 master-bin.000001 <read_master_log_pos> relay-master@00202@002e2.000002 <relay_log_pos> master-bin.000001 Yes Yes 0 0 <read_master_log_pos> <relay_log_space2> None 0 No 0 No 0 0 2 No conservative 0 NULL Slave has read all relay log; waiting for the slave I/O thread to update it 0 0 0 0 1073741824 7 0 60.000
+ Slave has read all relay log; waiting for more updates Waiting for master to send event 127.0.0.1 root MYPORT_1 60 master-bin.000001 <read_master_log_pos> relay.000002 <relay_log_pos> master-bin.000001 Yes Yes 0 0 <read_master_log_pos> <relay_log_space1> None 0 No 0 No 0 0 1 No optimistic 0 NULL Slave has read all relay log; waiting for more updates 0 0 0 0 1073741824 7 0 60.000
+MASTER 2.2 Slave has read all relay log; waiting for more updates Waiting for master to send event 127.0.0.1 root MYPORT_2 60 master-bin.000001 <read_master_log_pos> relay-master@00202@002e2.000002 <relay_log_pos> master-bin.000001 Yes Yes 0 0 <read_master_log_pos> <relay_log_space2> None 0 No 0 No 0 0 2 No optimistic 0 NULL Slave has read all relay log; waiting for more updates 0 0 0 0 1073741824 7 0 60.000
include/wait_for_slave_to_start.inc
set default_master_connection = 'MASTER 2.2';
include/wait_for_slave_to_start.inc
set default_master_connection = '';
show all slaves status;
Connection_name Slave_SQL_State Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id Master_SSL_Crl Master_SSL_Crlpath Using_Gtid Gtid_IO_Pos Replicate_Do_Domain_Ids Replicate_Ignore_Domain_Ids Parallel_Mode SQL_Delay SQL_Remaining_Delay Slave_SQL_Running_State Slave_DDL_Groups Slave_Non_Transactional_Groups Slave_Transactional_Groups Retried_transactions Max_relay_log_size Executed_log_entries Slave_received_heartbeats Slave_heartbeat_period Gtid_Slave_Pos
- Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_1 60 master-bin.000001 <read_master_log_pos> relay.000004 <relay_log_pos> master-bin.000001 Yes Yes 0 0 <read_master_log_pos> <relay_log_space1> None 0 No 0 No 0 0 1 No conservative 0 NULL Slave has read all relay log; waiting for the slave I/O thread to update it 0 0 0 0 1073741824 6 0 60.000
-MASTER 2.2 Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_2 60 master-bin.000001 <read_master_log_pos> relay-master@00202@002e2.000004 <relay_log_pos> master-bin.000001 Yes Yes 0 0 <read_master_log_pos> <relay_log_space2> None 0 No 0 No 0 0 2 No conservative 0 NULL Slave has read all relay log; waiting for the slave I/O thread to update it 0 0 0 0 1073741824 6 0 60.000
+ Slave has read all relay log; waiting for more updates Waiting for master to send event 127.0.0.1 root MYPORT_1 60 master-bin.000001 <read_master_log_pos> relay.000004 <relay_log_pos> master-bin.000001 Yes Yes 0 0 <read_master_log_pos> <relay_log_space1> None 0 No 0 No 0 0 1 No optimistic 0 NULL Slave has read all relay log; waiting for more updates 0 0 0 0 1073741824 6 0 60.000
+MASTER 2.2 Slave has read all relay log; waiting for more updates Waiting for master to send event 127.0.0.1 root MYPORT_2 60 master-bin.000001 <read_master_log_pos> relay-master@00202@002e2.000004 <relay_log_pos> master-bin.000001 Yes Yes 0 0 <read_master_log_pos> <relay_log_space2> None 0 No 0 No 0 0 2 No optimistic 0 NULL Slave has read all relay log; waiting for more updates 0 0 0 0 1073741824 6 0 60.000
#
# List of files matching '*info*' pattern
# after slave server restart
diff --git a/mysql-test/suite/multi_source/multi_source_slave_alias_replica.result b/mysql-test/suite/multi_source/multi_source_slave_alias_replica.result
new file mode 100644
index 00000000000..b1aa31d059a
--- /dev/null
+++ b/mysql-test/suite/multi_source/multi_source_slave_alias_replica.result
@@ -0,0 +1,157 @@
+connect slave,127.0.0.1,root,,,$SERVER_MYPORT_3;
+connect master1,127.0.0.1,root,,,$SERVER_MYPORT_1;
+connect master2,127.0.0.1,root,,,$SERVER_MYPORT_2;
+connection slave;
+CHANGE MASTER 'slave1' TO MASTER_PORT=MYPORT_1, MASTER_HOST='127.0.0.1', MASTER_USER='root';
+CHANGE MASTER 'slave2' TO MASTER_PORT=MYPORT_2, MASTER_HOST='127.0.0.1', MASTER_USER='root';
+START REPLICA 'slave1';
+SET default_master_connection = 'slave1';
+include/wait_for_slave_to_start.inc
+SET default_master_connection = 'slave2';
+"Command: START ALL SLAVES --> START ALL REPLICAS"
+START ALL REPLICAS;
+Warnings:
+Note 1937 SLAVE 'slave2' started
+include/wait_for_slave_to_start.inc
+SET default_master_connection = '';
+connection master1;
+connection slave;
+connection master2;
+connection slave;
+"Command: SHOW ALL STAVES STATUS --> SHOW ALL REPLICAS STATUS"
+SHOW ALL REPLICAS STATUS;
+Connection_name slave1
+Slave_SQL_State Slave has read all relay log; waiting for more updates
+Slave_IO_State Waiting for master to send event
+Master_Host 127.0.0.1
+Master_User root
+Master_Port MYPORT_1
+Connect_Retry 60
+Master_Log_File master-bin.000001
+Read_Master_Log_Pos <read_master_log_pos>
+Relay_Log_File mysqld-relay-bin-slave1.000002
+Relay_Log_Pos <relay_log_pos>
+Relay_Master_Log_File master-bin.000001
+Slave_IO_Running Yes
+Slave_SQL_Running Yes
+Replicate_Do_DB
+Replicate_Ignore_DB
+Replicate_Do_Table
+Replicate_Ignore_Table
+Replicate_Wild_Do_Table
+Replicate_Wild_Ignore_Table
+Last_Errno 0
+Last_Error
+Skip_Counter 0
+Exec_Master_Log_Pos <read_master_log_pos>
+Relay_Log_Space <relay_log_space1>
+Until_Condition None
+Until_Log_File
+Until_Log_Pos 0
+Master_SSL_Allowed No
+Master_SSL_CA_File
+Master_SSL_CA_Path
+Master_SSL_Cert
+Master_SSL_Cipher
+Master_SSL_Key
+Seconds_Behind_Master 0
+Master_SSL_Verify_Server_Cert No
+Last_IO_Errno 0
+Last_IO_Error
+Last_SQL_Errno 0
+Last_SQL_Error
+Replicate_Ignore_Server_Ids
+Master_Server_Id 1
+Master_SSL_Crl
+Master_SSL_Crlpath
+Using_Gtid No
+Gtid_IO_Pos
+Replicate_Do_Domain_Ids
+Replicate_Ignore_Domain_Ids
+Parallel_Mode optimistic
+SQL_Delay 0
+SQL_Remaining_Delay NULL
+Slave_SQL_Running_State Slave has read all relay log; waiting for more updates
+Slave_DDL_Groups 0
+Slave_Non_Transactional_Groups 0
+Slave_Transactional_Groups 0
+Retried_transactions 0
+Max_relay_log_size 1073741824
+Executed_log_entries 7
+Slave_received_heartbeats 0
+Slave_heartbeat_period 60.000
+Gtid_Slave_Pos
+Connection_name slave2
+Slave_SQL_State Slave has read all relay log; waiting for more updates
+Slave_IO_State Waiting for master to send event
+Master_Host 127.0.0.1
+Master_User root
+Master_Port MYPORT_2
+Connect_Retry 60
+Master_Log_File master-bin.000001
+Read_Master_Log_Pos <read_master_log_pos>
+Relay_Log_File mysqld-relay-bin-slave2.000002
+Relay_Log_Pos <relay_log_pos>
+Relay_Master_Log_File master-bin.000001
+Slave_IO_Running Yes
+Slave_SQL_Running Yes
+Replicate_Do_DB
+Replicate_Ignore_DB
+Replicate_Do_Table
+Replicate_Ignore_Table
+Replicate_Wild_Do_Table
+Replicate_Wild_Ignore_Table
+Last_Errno 0
+Last_Error
+Skip_Counter 0
+Exec_Master_Log_Pos <read_master_log_pos>
+Relay_Log_Space <relay_log_space1>
+Until_Condition None
+Until_Log_File
+Until_Log_Pos 0
+Master_SSL_Allowed No
+Master_SSL_CA_File
+Master_SSL_CA_Path
+Master_SSL_Cert
+Master_SSL_Cipher
+Master_SSL_Key
+Seconds_Behind_Master 0
+Master_SSL_Verify_Server_Cert No
+Last_IO_Errno 0
+Last_IO_Error
+Last_SQL_Errno 0
+Last_SQL_Error
+Replicate_Ignore_Server_Ids
+Master_Server_Id 2
+Master_SSL_Crl
+Master_SSL_Crlpath
+Using_Gtid No
+Gtid_IO_Pos
+Replicate_Do_Domain_Ids
+Replicate_Ignore_Domain_Ids
+Parallel_Mode optimistic
+SQL_Delay 0
+SQL_Remaining_Delay NULL
+Slave_SQL_Running_State Slave has read all relay log; waiting for more updates
+Slave_DDL_Groups 0
+Slave_Non_Transactional_Groups 0
+Slave_Transactional_Groups 0
+Retried_transactions 0
+Max_relay_log_size 1073741824
+Executed_log_entries 7
+Slave_received_heartbeats 0
+Slave_heartbeat_period 60.000
+Gtid_Slave_Pos
+"Command: STOP ALL SLAVES --> STOP ALL REPLICAS"
+STOP ALL REPLICAS;
+Warnings:
+Note 1938 SLAVE 'slave2' stopped
+Note 1938 SLAVE 'slave1' stopped
+include/reset_master_slave.inc
+disconnect slave;
+connection master1;
+include/reset_master_slave.inc
+disconnect master1;
+connection master2;
+include/reset_master_slave.inc
+disconnect master2;
diff --git a/mysql-test/suite/multi_source/multi_source_slave_alias_replica.test b/mysql-test/suite/multi_source/multi_source_slave_alias_replica.test
new file mode 100644
index 00000000000..409718dd4e7
--- /dev/null
+++ b/mysql-test/suite/multi_source/multi_source_slave_alias_replica.test
@@ -0,0 +1,80 @@
+# ==== Purpose ====
+#
+# Test verifies that SQL statements which use keyword 'REPLICA' a synonym for
+# 'SLAVE' work as expected.
+#
+# ==== Implementation ====
+#
+# List of commands being verified are
+#
+# START ALL REPLICAS
+# STOP ALL REPLICAS
+# SHOW ALL REPLICAS STATUS
+#
+# ==== References ====
+#
+# MDEV-20601: Make REPLICA a synonym for SLAVE in SQL statements
+#
+
+--source include/not_embedded.inc
+--source include/binlog_start_pos.inc
+--let $rpl_server_count= 0
+
+--connect (slave,127.0.0.1,root,,,$SERVER_MYPORT_3)
+--connect (master1,127.0.0.1,root,,,$SERVER_MYPORT_1)
+--connect (master2,127.0.0.1,root,,,$SERVER_MYPORT_2)
+
+--connection slave
+--replace_result $SERVER_MYPORT_1 MYPORT_1
+eval CHANGE MASTER 'slave1' TO MASTER_PORT=$SERVER_MYPORT_1, MASTER_HOST='127.0.0.1', MASTER_USER='root';
+--replace_result $SERVER_MYPORT_2 MYPORT_2
+eval CHANGE MASTER 'slave2' TO MASTER_PORT=$SERVER_MYPORT_2, MASTER_HOST='127.0.0.1', MASTER_USER='root';
+START REPLICA 'slave1';
+SET default_master_connection = 'slave1';
+--source include/wait_for_slave_to_start.inc
+SET default_master_connection = 'slave2';
+--echo "Command: START ALL SLAVES --> START ALL REPLICAS"
+START ALL REPLICAS;
+
+--source include/wait_for_slave_to_start.inc
+SET default_master_connection = '';
+
+# Ensure that all data is in the relay log
+--connection master1
+--save_master_pos
+--connection slave
+--sync_with_master 0,'slave1'
+--connection master2
+--save_master_pos
+--connection slave
+--sync_with_master 0,'slave2'
+
+--echo "Command: SHOW ALL STAVES STATUS --> SHOW ALL REPLICAS STATUS"
+let $show_statement = SHOW ALL REPLICAS STATUS;
+let $field = Executed_log_entries;
+let $condition = = 7;
+let $wait_for_all = 1;
+--source include/wait_show_condition.inc
+
+let read_master_log_pos=`select $binlog_start_pos + 73`;
+let relay_log_pos=`select 2*$binlog_start_pos + 117`;
+let relay_log_space1=`select 3*$binlog_start_pos + 178`;
+let relay_log_space2=`select 3*$binlog_start_pos + 178`;
+--replace_result $SERVER_MYPORT_1 MYPORT_1 $SERVER_MYPORT_2 MYPORT_2 $read_master_log_pos <read_master_log_pos> $relay_log_pos <relay_log_pos> $relay_log_space1 <relay_log_space1> $relay_log_space2 <relay_log_space2>
+--query_vertical SHOW ALL REPLICAS STATUS
+
+--echo "Command: STOP ALL SLAVES --> STOP ALL REPLICAS"
+STOP ALL REPLICAS;
+
+#
+# clean up
+#
+
+--source include/reset_master_slave.inc
+--disconnect slave
+--connection master1
+--source include/reset_master_slave.inc
+--disconnect master1
+--connection master2
+--source include/reset_master_slave.inc
+--disconnect master2
diff --git a/mysql-test/suite/multi_source/reset_slave.result b/mysql-test/suite/multi_source/reset_slave.result
index c1d74ab9f3f..c048784e28d 100644
--- a/mysql-test/suite/multi_source/reset_slave.result
+++ b/mysql-test/suite/multi_source/reset_slave.result
@@ -14,14 +14,14 @@ connection slave;
stop slave 'master1';
show slave 'master1' status;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id Master_SSL_Crl Master_SSL_Crlpath Using_Gtid Gtid_IO_Pos Replicate_Do_Domain_Ids Replicate_Ignore_Domain_Ids Parallel_Mode SQL_Delay SQL_Remaining_Delay Slave_SQL_Running_State Slave_DDL_Groups Slave_Non_Transactional_Groups Slave_Transactional_Groups
- 127.0.0.1 root MYPORT_1 60 master-bin.000001 <read_master_log_pos> mysqld-relay-bin-master1.000002 <relay_log_pos> master-bin.000001 No No 0 0 <read_master_log_pos> <relay_log_space> None 0 No NULL No 0 0 1 No conservative 0 NULL 2 1 0
+ 127.0.0.1 root MYPORT_1 60 master-bin.000001 <read_master_log_pos> mysqld-relay-bin-master1.000002 <relay_log_pos> master-bin.000001 No No 0 0 <read_master_log_pos> <relay_log_space> None 0 No NULL No 0 0 1 No optimistic 0 NULL 2 1 0
mysqld-relay-bin-master1.000001
mysqld-relay-bin-master1.000002
mysqld-relay-bin-master1.index
reset slave 'master1';
show slave 'master1' status;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id Master_SSL_Crl Master_SSL_Crlpath Using_Gtid Gtid_IO_Pos Replicate_Do_Domain_Ids Replicate_Ignore_Domain_Ids Parallel_Mode SQL_Delay SQL_Remaining_Delay Slave_SQL_Running_State Slave_DDL_Groups Slave_Non_Transactional_Groups Slave_Transactional_Groups
- 127.0.0.1 root MYPORT_1 60 4 <relay_log_pos> No No 0 0 0 <relay_log_space> None 0 No NULL No 0 0 1 No conservative 0 NULL 2 1 0
+ 127.0.0.1 root MYPORT_1 60 4 <relay_log_pos> No No 0 0 0 <relay_log_space> None 0 No NULL No 0 0 1 No optimistic 0 NULL 2 1 0
reset slave 'master1' all;
show slave 'master1' status;
ERROR HY000: There is no master connection 'master1'
diff --git a/mysql-test/suite/multi_source/simple.result b/mysql-test/suite/multi_source/simple.result
index 93ea1c023bc..a66d49e88cb 100644
--- a/mysql-test/suite/multi_source/simple.result
+++ b/mysql-test/suite/multi_source/simple.result
@@ -19,8 +19,8 @@ connection master2;
connection slave;
show all slaves status;
Connection_name Slave_SQL_State Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id Master_SSL_Crl Master_SSL_Crlpath Using_Gtid Gtid_IO_Pos Replicate_Do_Domain_Ids Replicate_Ignore_Domain_Ids Parallel_Mode SQL_Delay SQL_Remaining_Delay Slave_SQL_Running_State Slave_DDL_Groups Slave_Non_Transactional_Groups Slave_Transactional_Groups Retried_transactions Max_relay_log_size Executed_log_entries Slave_received_heartbeats Slave_heartbeat_period Gtid_Slave_Pos
-slave1 Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_1 60 master-bin.000001 <read_master_log_pos> mysqld-relay-bin-slave1.000002 <relay_log_pos> master-bin.000001 Yes Yes 0 0 <read_master_log_pos> <relay_log_space1> None 0 No 0 No 0 0 1 No conservative 0 NULL Slave has read all relay log; waiting for the slave I/O thread to update it 0 0 0 0 1073741824 7 0 60.000
-slave2 Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_2 60 master-bin.000001 <read_master_log_pos> mysqld-relay-bin-slave2.000002 <relay_log_pos> master-bin.000001 Yes Yes 0 0 <read_master_log_pos> <relay_log_space1> None 0 No 0 No 0 0 2 No conservative 0 NULL Slave has read all relay log; waiting for the slave I/O thread to update it 0 0 0 0 1073741824 7 0 60.000
+slave1 Slave has read all relay log; waiting for more updates Waiting for master to send event 127.0.0.1 root MYPORT_1 60 master-bin.000001 <read_master_log_pos> mysqld-relay-bin-slave1.000002 <relay_log_pos> master-bin.000001 Yes Yes 0 0 <read_master_log_pos> <relay_log_space1> None 0 No 0 No 0 0 1 No optimistic 0 NULL Slave has read all relay log; waiting for more updates 0 0 0 0 1073741824 7 0 60.000
+slave2 Slave has read all relay log; waiting for more updates Waiting for master to send event 127.0.0.1 root MYPORT_2 60 master-bin.000001 <read_master_log_pos> mysqld-relay-bin-slave2.000002 <relay_log_pos> master-bin.000001 Yes Yes 0 0 <read_master_log_pos> <relay_log_space1> None 0 No 0 No 0 0 2 No optimistic 0 NULL Slave has read all relay log; waiting for more updates 0 0 0 0 1073741824 7 0 60.000
start all slaves;
stop slave 'slave1';
show slave 'slave1' status;
@@ -70,7 +70,7 @@ Using_Gtid No
Gtid_IO_Pos
Replicate_Do_Domain_Ids
Replicate_Ignore_Domain_Ids
-Parallel_Mode conservative
+Parallel_Mode optimistic
SQL_Delay 0
SQL_Remaining_Delay NULL
Slave_SQL_Running_State
@@ -80,18 +80,18 @@ Slave_Transactional_Groups 0
reset slave 'slave1';
show all slaves status;
Connection_name Slave_SQL_State Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id Master_SSL_Crl Master_SSL_Crlpath Using_Gtid Gtid_IO_Pos Replicate_Do_Domain_Ids Replicate_Ignore_Domain_Ids Parallel_Mode SQL_Delay SQL_Remaining_Delay Slave_SQL_Running_State Slave_DDL_Groups Slave_Non_Transactional_Groups Slave_Transactional_Groups Retried_transactions Max_relay_log_size Executed_log_entries Slave_received_heartbeats Slave_heartbeat_period Gtid_Slave_Pos
-slave1 127.0.0.1 root MYPORT_1 60 4 <relay_log_pos> No No 0 0 0 <relay_log_space1> None 0 No NULL No 0 0 1 No conservative 0 NULL 0 0 0 0 1073741824 7 0 60.000
-slave2 Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_2 60 master-bin.000001 <read_master_log_pos> mysqld-relay-bin-slave2.000002 <relay_log_pos> master-bin.000001 Yes Yes 0 0 <read_master_log_pos> <relay_log_space1> None 0 No 0 No 0 0 2 No conservative 0 NULL Slave has read all relay log; waiting for the slave I/O thread to update it 0 0 0 0 1073741824 7 0 60.000
+slave1 127.0.0.1 root MYPORT_1 60 4 <relay_log_pos> No No 0 0 0 <relay_log_space1> None 0 No NULL No 0 0 1 No optimistic 0 NULL 0 0 0 0 1073741824 7 0 60.000
+slave2 Slave has read all relay log; waiting for more updates Waiting for master to send event 127.0.0.1 root MYPORT_2 60 master-bin.000001 <read_master_log_pos> mysqld-relay-bin-slave2.000002 <relay_log_pos> master-bin.000001 Yes Yes 0 0 <read_master_log_pos> <relay_log_space1> None 0 No 0 No 0 0 2 No optimistic 0 NULL Slave has read all relay log; waiting for more updates 0 0 0 0 1073741824 7 0 60.000
reset slave 'slave1' all;
show all slaves status;
Connection_name Slave_SQL_State Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id Master_SSL_Crl Master_SSL_Crlpath Using_Gtid Gtid_IO_Pos Replicate_Do_Domain_Ids Replicate_Ignore_Domain_Ids Parallel_Mode SQL_Delay SQL_Remaining_Delay Slave_SQL_Running_State Slave_DDL_Groups Slave_Non_Transactional_Groups Slave_Transactional_Groups Retried_transactions Max_relay_log_size Executed_log_entries Slave_received_heartbeats Slave_heartbeat_period Gtid_Slave_Pos
-slave2 Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_2 60 master-bin.000001 <read_master_log_pos> mysqld-relay-bin-slave2.000002 <relay_log_pos> master-bin.000001 Yes Yes 0 0 <read_master_log_pos> <relay_log_space1> None 0 No 0 No 0 0 2 No conservative 0 NULL Slave has read all relay log; waiting for the slave I/O thread to update it 0 0 0 0 1073741824 7 0 60.000
+slave2 Slave has read all relay log; waiting for more updates Waiting for master to send event 127.0.0.1 root MYPORT_2 60 master-bin.000001 <read_master_log_pos> mysqld-relay-bin-slave2.000002 <relay_log_pos> master-bin.000001 Yes Yes 0 0 <read_master_log_pos> <relay_log_space1> None 0 No 0 No 0 0 2 No optimistic 0 NULL Slave has read all relay log; waiting for more updates 0 0 0 0 1073741824 7 0 60.000
stop all slaves;
Warnings:
Note 1938 SLAVE 'slave2' stopped
show all slaves status;
Connection_name Slave_SQL_State Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id Master_SSL_Crl Master_SSL_Crlpath Using_Gtid Gtid_IO_Pos Replicate_Do_Domain_Ids Replicate_Ignore_Domain_Ids Parallel_Mode SQL_Delay SQL_Remaining_Delay Slave_SQL_Running_State Slave_DDL_Groups Slave_Non_Transactional_Groups Slave_Transactional_Groups Retried_transactions Max_relay_log_size Executed_log_entries Slave_received_heartbeats Slave_heartbeat_period Gtid_Slave_Pos
-slave2 127.0.0.1 root MYPORT_2 60 master-bin.000001 <read_master_log_pos> mysqld-relay-bin-slave2.000002 <relay_log_pos> master-bin.000001 No No 0 0 <read_master_log_pos> <relay_log_space1> None 0 No NULL No 0 0 2 No conservative 0 NULL 0 0 0 0 1073741824 7 0 60.000
+slave2 127.0.0.1 root MYPORT_2 60 master-bin.000001 <read_master_log_pos> mysqld-relay-bin-slave2.000002 <relay_log_pos> master-bin.000001 No No 0 0 <read_master_log_pos> <relay_log_space1> None 0 No NULL No 0 0 2 No optimistic 0 NULL 0 0 0 0 1073741824 7 0 60.000
stop all slaves;
include/reset_master_slave.inc
disconnect slave;
diff --git a/mysql-test/suite/optimizer_unfixed_bugs/r/bug43617.result b/mysql-test/suite/optimizer_unfixed_bugs/r/bug43617.result
index 11f915aaf8e..b92b42acf4a 100644
--- a/mysql-test/suite/optimizer_unfixed_bugs/r/bug43617.result
+++ b/mysql-test/suite/optimizer_unfixed_bugs/r/bug43617.result
@@ -1,4 +1,4 @@
-set storage_engine=innodb;
+set default_storage_engine=innodb;
set @save_time_zone= @@time_zone;
set time_zone='+03:00';
SET @saved_dbug = @@SESSION.debug_dbug;
diff --git a/mysql-test/suite/optimizer_unfixed_bugs/t/bug43617.test b/mysql-test/suite/optimizer_unfixed_bugs/t/bug43617.test
index 02d0ab6d566..f0ce06da315 100644
--- a/mysql-test/suite/optimizer_unfixed_bugs/t/bug43617.test
+++ b/mysql-test/suite/optimizer_unfixed_bugs/t/bug43617.test
@@ -3,7 +3,7 @@
--source include/have_debug.inc
--source include/have_innodb.inc
-set storage_engine=innodb;
+set default_storage_engine=innodb;
set @save_time_zone= @@time_zone;
set time_zone='+03:00';
SET @saved_dbug = @@SESSION.debug_dbug;
diff --git a/mysql-test/suite/parts/inc/partition.pre b/mysql-test/suite/parts/inc/partition.pre
index 0fae04dddd4..fba909687a0 100644
--- a/mysql-test/suite/parts/inc/partition.pre
+++ b/mysql-test/suite/parts/inc/partition.pre
@@ -179,7 +179,7 @@ if (0)
# That means statements which
# - are most time of low interest and do auxiliary stuff
# like generating the next SQL statement to be executed
-# - additional statements giving informations about table
+# - additional statements giving information about table
# contents or the value of some variables
# You will get huge differences, because the file with the
# expected results was created with $debug = 0 .
@@ -221,7 +221,7 @@ if (0)
# $ls= 1 (default)
# --> Display the table related directory content via
# "ls $MYSQLTEST_VARDIR/mysqld.1/data/test/t1*"
-# if these informations were collected.
+# if these information were collected.
# This is probably not portable to some OS.
# $ls= 0
# --> Omit displaying the directory
diff --git a/mysql-test/suite/parts/inc/partition_crash.inc b/mysql-test/suite/parts/inc/partition_crash.inc
index b8a7c61792b..32bf5c10423 100644
--- a/mysql-test/suite/parts/inc/partition_crash.inc
+++ b/mysql-test/suite/parts/inc/partition_crash.inc
@@ -3,8 +3,12 @@
--eval $create_statement
--eval $insert_statement
--echo # State before crash
+
+--list_files_write_file $DATADIR.files.txt $DATADIR/test
--replace_result #p# #P# #sp# #SP#
---list_files $DATADIR/test
+--replace_regex /#sql-ib[1-9][0-9]*\.ibd\n//
+--cat_file $DATADIR.files.txt
+--remove_file $DATADIR.files.txt
SHOW CREATE TABLE t1;
--sorted_result
SELECT * FROM t1;
@@ -14,14 +18,20 @@ SELECT * FROM t1;
--error 2013
--eval $crash_statement
--echo # State after crash (before recovery)
---replace_regex /sqlx.*\./sqlx-nnnn_nnnn./ /#p#/#P#/ /#sp#/#SP#/ /#tmp#/#TMP#/
---list_files $DATADIR/test
+--list_files_write_file $DATADIR.files.txt $DATADIR/test
+--replace_result #p# #P# #sp# #SP# #tmp# #TMP#
+--replace_regex /sql-exchange.*\./sql-exchange./ /sql-shadow-[0-9a-f]*-/sql-shadow-/ /#sql-ib[1-9][0-9]*\.ibd\n//
+--cat_file $DATADIR.files.txt
+--remove_file $DATADIR.files.txt
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--enable_reconnect
--source include/wait_until_connected_again.inc
--echo # State after crash recovery
+--list_files_write_file $DATADIR.files.txt $DATADIR/test
--replace_result #p# #P# #sp# #SP#
---list_files $DATADIR/test
+--replace_regex /#sql-ib[1-9][0-9]*\.ibd\n//
+--cat_file $DATADIR.files.txt
+--remove_file $DATADIR.files.txt
SHOW CREATE TABLE t1;
--sorted_result
SELECT * FROM t1;
diff --git a/mysql-test/suite/parts/inc/partition_engine.inc b/mysql-test/suite/parts/inc/partition_engine.inc
index b2fab2ff27e..c964557e69f 100644
--- a/mysql-test/suite/parts/inc/partition_engine.inc
+++ b/mysql-test/suite/parts/inc/partition_engine.inc
@@ -7,7 +7,7 @@
# This routine is only useful for the partition_<feature>_<engine> tests. #
# #
# Note: There were some problems in history. #
-# It looks like a table holds informations about the storage engine #
+# It looks like a table holds information about the storage engine #
# for #
# "the whole table" -> in statement after column list before partitioning #
# a partition -> in statement after definition of partition #
@@ -262,7 +262,7 @@ DROP TABLE t1;
--echo #------------------------------------------------------------------------
--echo # 6 Session default engine differs from engine used within create table
--echo #------------------------------------------------------------------------
-eval SET SESSION storage_engine=$engine_other;
+eval SET SESSION default_storage_engine=$engine_other;
# Bug#16775 Partitions: strange effects on subpartitioned tables, mixed storage engines
# Bug#15966 Partitions: crash if session default engine <> engine used in create table
eval CREATE TABLE t1 (
@@ -286,4 +286,4 @@ 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;
--source suite/parts/inc/partition_check.inc
DROP TABLE t1;
-eval SET SESSION storage_engine=$engine;
+eval SET SESSION default_storage_engine=$engine;
diff --git a/mysql-test/suite/parts/inc/partition_fail_t2.inc b/mysql-test/suite/parts/inc/partition_fail_t2.inc
index 12cac51db4d..492e6d5a71b 100644
--- a/mysql-test/suite/parts/inc/partition_fail_t2.inc
+++ b/mysql-test/suite/parts/inc/partition_fail_t2.inc
@@ -15,7 +15,7 @@ SHOW CREATE TABLE t1;
SELECT * FROM t1;
# accept all errors
--disable_abort_on_error
---replace_regex /#sqlx-[0-9a-f_]*/#sqlx-nnnn_nnnn/i
+--replace_regex /#sql-exchange-[0-9a-f_\-]*/#sql-exchange/i
--eval $fail_statement
--enable_abort_on_error
--echo # State after failure
diff --git a/mysql-test/suite/parts/inc/partition_layout.inc b/mysql-test/suite/parts/inc/partition_layout.inc
index 12fbfb9a46a..c1ab14f974d 100644
--- a/mysql-test/suite/parts/inc/partition_layout.inc
+++ b/mysql-test/suite/parts/inc/partition_layout.inc
@@ -1,6 +1,6 @@
# inc/partition_layout.inc
#
-# Print partitioning related informations about the table t1
+# Print partitioning related information about the table t1
#
eval SHOW CREATE TABLE t1;
diff --git a/mysql-test/suite/parts/inc/partition_mgm_crash.inc b/mysql-test/suite/parts/inc/partition_mgm_crash.inc
index af5ca1688cf..6607d5cd611 100644
--- a/mysql-test/suite/parts/inc/partition_mgm_crash.inc
+++ b/mysql-test/suite/parts/inc/partition_mgm_crash.inc
@@ -19,16 +19,34 @@ let $insert_statement= INSERT INTO t1 VALUES (1, "Original from partition p0"),
let $crash_statement= ALTER TABLE t1 ADD PARTITION
(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+if ($do_crash)
+{
--source suite/parts/inc/partition_crash_add.inc
+}
let $fail_statement= $crash_statement;
+if ($do_fail)
+{
--source suite/parts/inc/partition_fail_add.inc
+}
let $crash_statement= ALTER TABLE t1 DROP PARTITION p10;
+if ($do_crash)
+{
--source suite/parts/inc/partition_crash_drop.inc
+}
let $fail_statement= $crash_statement;
+if ($do_fail)
+{
--source suite/parts/inc/partition_fail_drop.inc
+}
let $crash_statement= ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+if ($do_crash)
+{
--source suite/parts/inc/partition_crash_change.inc
+}
let $fail_statement= $crash_statement;
+if ($do_fail)
+{
--source suite/parts/inc/partition_fail_change.inc
+} \ No newline at end of file
diff --git a/mysql-test/suite/parts/r/alter_table.result b/mysql-test/suite/parts/r/alter_table.result
new file mode 100644
index 00000000000..94100b83118
--- /dev/null
+++ b/mysql-test/suite/parts/r/alter_table.result
@@ -0,0 +1,30 @@
+set @save_alter_algorithm= @@session.alter_algorithm;
+SET SESSION alter_algorithm=4;
+CREATE TABLE t1(a INT) engine=myisam PARTITION BY RANGE(a) SUBPARTITION BY KEY(a) (PARTITION p0 VALUES LESS THAN (10) (SUBPARTITION s0,SUBPARTITION s1), PARTITION p1 VALUES LESS THAN (20) (SUBPARTITION s2,SUBPARTITION s3));
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY RANGE (`a`)
+SUBPARTITION BY KEY (`a`)
+(PARTITION `p0` VALUES LESS THAN (10)
+ (SUBPARTITION `s0` ENGINE = MyISAM,
+ SUBPARTITION `s1` ENGINE = MyISAM),
+ PARTITION `p1` VALUES LESS THAN (20)
+ (SUBPARTITION `s2` ENGINE = MyISAM,
+ SUBPARTITION `s3` ENGINE = MyISAM))
+ALTER TABLE t1 ADD COLUMN c INT;
+ERROR 0A000: ALGORITHM=INSTANT is not supported for this operation. Try ALGORITHM=COPY
+DROP table if exists t1;
+set @@session.alter_algorithm= @save_alter_algorithm;
+CREATE TABLE t1 (a INT) PARTITION BY RANGE(a) SUBPARTITION BY HASH(a) (PARTITION p VALUES LESS THAN (5) (SUBPARTITION sp, SUBPARTITION sp1), PARTITION p1 VALUES LESS THAN MAXVALUE (SUBPARTITION sp2, SUBPARTITION sp3));
+ALTER TABLE t1 DROP PARTITION p;
+DROP TABLE if exists t1;
+CREATE TABLE t1 (i INT);
+CREATE VIEW v1 as SELECT * FROM t1;
+CREATE TABLE t2 (i INT);
+ALTER TABLE v1 EXCHANGE PARTITION p2 WITH TABLE t2 ;
+ERROR 42000: Can't open table
+DROP VIEW v1;
+DROP TABLE t1, t2;
diff --git a/mysql-test/suite/parts/r/partition_debug_myisam.result b/mysql-test/suite/parts/r/debug_fail_myisam.result
index 0b1004d121d..ffbc4ff6694 100644
--- a/mysql-test/suite/parts/r/partition_debug_myisam.result
+++ b/mysql-test/suite/parts/r/debug_fail_myisam.result
@@ -121,8 +121,8 @@ ALTER TABLE t1 ADD PARTITION
(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Lost connection to MySQL server during query
# State after crash (before recovery)
-#sql-t1.frm
-#sql-t1.par
+#sql-shadow-t1.frm
+#sql-shadow-t1.par
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -197,8 +197,8 @@ ALTER TABLE t1 ADD PARTITION
(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Lost connection to MySQL server during query
# State after crash (before recovery)
-#sql-t1.frm
-#sql-t1.par
+#sql-shadow-t1.frm
+#sql-shadow-t1.par
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -273,8 +273,8 @@ ALTER TABLE t1 ADD PARTITION
(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Lost connection to MySQL server during query
# State after crash (before recovery)
-#sql-t1.frm
-#sql-t1.par
+#sql-shadow-t1.frm
+#sql-shadow-t1.par
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -349,8 +349,8 @@ ALTER TABLE t1 ADD PARTITION
(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Lost connection to MySQL server during query
# State after crash (before recovery)
-#sql-t1.frm
-#sql-t1.par
+#sql-shadow-t1.frm
+#sql-shadow-t1.par
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -427,8 +427,8 @@ ALTER TABLE t1 ADD PARTITION
(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Lost connection to MySQL server during query
# State after crash (before recovery)
-#sql-t1.frm
-#sql-t1.par
+#sql-shadow-t1.frm
+#sql-shadow-t1.par
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -505,8 +505,8 @@ ALTER TABLE t1 ADD PARTITION
(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Lost connection to MySQL server during query
# State after crash (before recovery)
-#sql-t1.frm
-#sql-t1.par
+#sql-shadow-t1.frm
+#sql-shadow-t1.par
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -583,8 +583,8 @@ ALTER TABLE t1 ADD PARTITION
(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Lost connection to MySQL server during query
# State after crash (before recovery)
-#sql-t1.frm
-#sql-t1.par
+#sql-shadow-t1.frm
+#sql-shadow-t1.par
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -2246,8 +2246,8 @@ a b
ALTER TABLE t1 DROP PARTITION p10;
ERROR HY000: Lost connection to MySQL server during query
# State after crash (before recovery)
-#sql-t1.frm
-#sql-t1.par
+#sql-shadow-t1.frm
+#sql-shadow-t1.par
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -2321,8 +2321,8 @@ a b
ALTER TABLE t1 DROP PARTITION p10;
ERROR HY000: Lost connection to MySQL server during query
# State after crash (before recovery)
-#sql-t1.frm
-#sql-t1.par
+#sql-shadow-t1.frm
+#sql-shadow-t1.par
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -2396,8 +2396,8 @@ a b
ALTER TABLE t1 DROP PARTITION p10;
ERROR HY000: Lost connection to MySQL server during query
# State after crash (before recovery)
-#sql-t1.frm
-#sql-t1.par
+#sql-shadow-t1.frm
+#sql-shadow-t1.par
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -2464,8 +2464,8 @@ a b
ALTER TABLE t1 DROP PARTITION p10;
ERROR HY000: Lost connection to MySQL server during query
# State after crash (before recovery)
-#sql-t1.frm
-#sql-t1.par
+#sql-shadow-t1.frm
+#sql-shadow-t1.par
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -2532,8 +2532,8 @@ a b
ALTER TABLE t1 DROP PARTITION p10;
ERROR HY000: Lost connection to MySQL server during query
# State after crash (before recovery)
-#sql-t1.frm
-#sql-t1.par
+#sql-shadow-t1.frm
+#sql-shadow-t1.par
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -3971,8 +3971,8 @@ ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Lost connection to MySQL server during query
# State after crash (before recovery)
-#sql-t1.frm
-#sql-t1.par
+#sql-shadow-t1.frm
+#sql-shadow-t1.par
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -4048,8 +4048,8 @@ ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Lost connection to MySQL server during query
# State after crash (before recovery)
-#sql-t1.frm
-#sql-t1.par
+#sql-shadow-t1.frm
+#sql-shadow-t1.par
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -4125,8 +4125,8 @@ ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Lost connection to MySQL server during query
# State after crash (before recovery)
-#sql-t1.frm
-#sql-t1.par
+#sql-shadow-t1.frm
+#sql-shadow-t1.par
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -4206,8 +4206,8 @@ ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Lost connection to MySQL server during query
# State after crash (before recovery)
-#sql-t1.frm
-#sql-t1.par
+#sql-shadow-t1.frm
+#sql-shadow-t1.par
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -4287,8 +4287,8 @@ ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Lost connection to MySQL server during query
# State after crash (before recovery)
-#sql-t1.frm
-#sql-t1.par
+#sql-shadow-t1.frm
+#sql-shadow-t1.par
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -4368,8 +4368,8 @@ ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Lost connection to MySQL server during query
# State after crash (before recovery)
-#sql-t1.frm
-#sql-t1.par
+#sql-shadow-t1.frm
+#sql-shadow-t1.par
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -4452,8 +4452,8 @@ ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Lost connection to MySQL server during query
# State after crash (before recovery)
-#sql-t1.frm
-#sql-t1.par
+#sql-shadow-t1.frm
+#sql-shadow-t1.par
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
diff --git a/mysql-test/suite/parts/r/debug_innodb_crash.result b/mysql-test/suite/parts/r/debug_innodb_crash.result
new file mode 100644
index 00000000000..68195967b5b
--- /dev/null
+++ b/mysql-test/suite/parts/r/debug_innodb_crash.result
@@ -0,0 +1,2170 @@
+call mtr.add_suppression("InnoDB: Warning: allocated tablespace .*, old maximum was");
+call mtr.add_suppression("table .* does not exist in the InnoDB internal");
+call mtr.add_suppression("InnoDB: Warning: MySQL is trying to drop table ");
+# Test crash recovery in fast_alter_partition_table.
+#
+# Bug#53676: Unexpected errors and possible table corruption on
+# ADD PARTITION and LOCK TABLE
+# Bug#53770: Server crash at handler.cc:2076 on LOAD DATA
+# after timed out COALESCE PARTITION
+# Extended crash recovery testing of fast_alter_partition_table.
+call mtr.add_suppression("Attempting backtrace. You can use the following information to find out");
+flush tables;
+# Crash testing ADD PARTITION
+SET @save_dbug=@@debug_dbug;
+SET SESSION debug_dbug="+d,crash_add_partition_1";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before crash
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Lost connection to MySQL server during query
+# State after crash (before recovery)
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+# State after crash recovery
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,crash_add_partition_2";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before crash
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Lost connection to MySQL server during query
+# State after crash (before recovery)
+#sql-shadow-t1.frm
+#sql-shadow-t1.par
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+# State after crash recovery
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,crash_add_partition_3";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before crash
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Lost connection to MySQL server during query
+# State after crash (before recovery)
+#sql-shadow-t1.frm
+#sql-shadow-t1.par
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+# State after crash recovery
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,crash_add_partition_4";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before crash
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Lost connection to MySQL server during query
+# State after crash (before recovery)
+#sql-shadow-t1.frm
+#sql-shadow-t1.par
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+# State after crash recovery
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,crash_add_partition_5";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before crash
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Lost connection to MySQL server during query
+# State after crash (before recovery)
+#sql-shadow-t1.frm
+#sql-shadow-t1.par
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1#P#p20.ibd
+t1.frm
+t1.par
+# State after crash recovery
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,crash_add_partition_6";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before crash
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Lost connection to MySQL server during query
+# State after crash (before recovery)
+#sql-shadow-t1.frm
+#sql-shadow-t1.par
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1#P#p20.ibd
+t1.frm
+t1.par
+# State after crash recovery
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,crash_add_partition_7";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before crash
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Lost connection to MySQL server during query
+# State after crash (before recovery)
+#sql-shadow-t1.frm
+#sql-shadow-t1.par
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1#P#p20.ibd
+t1.frm
+t1.par
+# State after crash recovery
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,crash_add_partition_8";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before crash
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Lost connection to MySQL server during query
+# State after crash (before recovery)
+#sql-shadow-t1.frm
+#sql-shadow-t1.par
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1#P#p20.ibd
+t1.frm
+t1.par
+# State after crash recovery
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1#P#p20.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB,
+ PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,crash_add_partition_9";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before crash
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Lost connection to MySQL server during query
+# State after crash (before recovery)
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1#P#p20.ibd
+t1.frm
+t1.par
+# State after crash recovery
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1#P#p20.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB,
+ PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,crash_add_partition_10";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before crash
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Lost connection to MySQL server during query
+# State after crash (before recovery)
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1#P#p20.ibd
+t1.frm
+t1.par
+# State after crash recovery
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1#P#p20.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB,
+ PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+# Test DROP PARTITION
+SET @save_dbug=@@debug_dbug;
+SET SESSION debug_dbug="+d,crash_drop_partition_1";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before crash
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 DROP PARTITION p10;
+ERROR HY000: Lost connection to MySQL server during query
+# State after crash (before recovery)
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+# State after crash recovery
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,crash_drop_partition_2";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before crash
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 DROP PARTITION p10;
+ERROR HY000: Lost connection to MySQL server during query
+# State after crash (before recovery)
+#sql-shadow-t1.frm
+#sql-shadow-t1.par
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+# State after crash recovery
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,crash_drop_partition_3";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before crash
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 DROP PARTITION p10;
+ERROR HY000: Lost connection to MySQL server during query
+# State after crash (before recovery)
+#sql-shadow-t1.frm
+#sql-shadow-t1.par
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+# State after crash recovery
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,crash_drop_partition_4";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before crash
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 DROP PARTITION p10;
+ERROR HY000: Lost connection to MySQL server during query
+# State after crash (before recovery)
+#sql-shadow-t1.frm
+#sql-shadow-t1.par
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+# State after crash recovery
+db.opt
+t1#P#p0.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,crash_drop_partition_5";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before crash
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 DROP PARTITION p10;
+ERROR HY000: Lost connection to MySQL server during query
+# State after crash (before recovery)
+#sql-shadow-t1.frm
+#sql-shadow-t1.par
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+# State after crash recovery
+db.opt
+t1#P#p0.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,crash_drop_partition_6";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before crash
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 DROP PARTITION p10;
+ERROR HY000: Lost connection to MySQL server during query
+# State after crash (before recovery)
+#sql-shadow-t1.frm
+#sql-shadow-t1.par
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+# State after crash recovery
+db.opt
+t1#P#p0.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,crash_drop_partition_7";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before crash
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 DROP PARTITION p10;
+ERROR HY000: Lost connection to MySQL server during query
+# State after crash (before recovery)
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+# State after crash recovery
+db.opt
+t1#P#p0.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,crash_drop_partition_8";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before crash
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 DROP PARTITION p10;
+ERROR HY000: Lost connection to MySQL server during query
+# State after crash (before recovery)
+db.opt
+t1#P#p0.ibd
+t1.frm
+t1.par
+# State after crash recovery
+db.opt
+t1#P#p0.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,crash_drop_partition_9";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before crash
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 DROP PARTITION p10;
+ERROR HY000: Lost connection to MySQL server during query
+# State after crash (before recovery)
+db.opt
+t1#P#p0.ibd
+t1.frm
+t1.par
+# State after crash recovery
+db.opt
+t1#P#p0.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+# Test change partition (REORGANIZE/REBUILD/COALESCE
+# or ADD HASH PARTITION).
+SET @save_dbug=@@debug_dbug;
+SET SESSION debug_dbug="+d,crash_change_partition_1";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before crash
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
+(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
+PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Lost connection to MySQL server during query
+# State after crash (before recovery)
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+# State after crash recovery
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,crash_change_partition_2";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before crash
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
+(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
+PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Lost connection to MySQL server during query
+# State after crash (before recovery)
+#sql-shadow-t1.frm
+#sql-shadow-t1.par
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+# State after crash recovery
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,crash_change_partition_3";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before crash
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
+(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
+PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Lost connection to MySQL server during query
+# State after crash (before recovery)
+#sql-shadow-t1.frm
+#sql-shadow-t1.par
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+# State after crash recovery
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,crash_change_partition_4";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before crash
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
+(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
+PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Lost connection to MySQL server during query
+# State after crash (before recovery)
+#sql-shadow-t1.frm
+#sql-shadow-t1.par
+db.opt
+t1#P#p0.ibd
+t1#P#p10#TMP#.ibd
+t1#P#p10.ibd
+t1#P#p20#TMP#.ibd
+t1.frm
+t1.par
+# State after crash recovery
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,crash_change_partition_5";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before crash
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
+(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
+PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Lost connection to MySQL server during query
+# State after crash (before recovery)
+#sql-shadow-t1.frm
+#sql-shadow-t1.par
+db.opt
+t1#P#p0.ibd
+t1#P#p10#TMP#.ibd
+t1#P#p10.ibd
+t1#P#p20#TMP#.ibd
+t1.frm
+t1.par
+# State after crash recovery
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,crash_change_partition_6";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before crash
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
+(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
+PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Lost connection to MySQL server during query
+# State after crash (before recovery)
+#sql-shadow-t1.frm
+#sql-shadow-t1.par
+db.opt
+t1#P#p0.ibd
+t1#P#p10#TMP#.ibd
+t1#P#p10.ibd
+t1#P#p20#TMP#.ibd
+t1.frm
+t1.par
+# State after crash recovery
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,crash_change_partition_7";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before crash
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
+(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
+PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Lost connection to MySQL server during query
+# State after crash (before recovery)
+#sql-shadow-t1.frm
+#sql-shadow-t1.par
+db.opt
+t1#P#p0.ibd
+t1#P#p10#TMP#.ibd
+t1#P#p10.ibd
+t1#P#p20#TMP#.ibd
+t1.frm
+t1.par
+# State after crash recovery
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1#P#p20.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = InnoDB,
+ PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,crash_change_partition_8";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before crash
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
+(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
+PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Lost connection to MySQL server during query
+# State after crash (before recovery)
+#sql-shadow-t1.frm
+#sql-shadow-t1.par
+db.opt
+t1#P#p0.ibd
+t1#P#p10#TMP#.ibd
+t1#P#p10.ibd
+t1#P#p20#TMP#.ibd
+t1.frm
+t1.par
+# State after crash recovery
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1#P#p20.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = InnoDB,
+ PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,crash_change_partition_9";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before crash
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
+(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
+PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Lost connection to MySQL server during query
+# State after crash (before recovery)
+db.opt
+t1#P#p0.ibd
+t1#P#p10#TMP#.ibd
+t1#P#p10.ibd
+t1#P#p20#TMP#.ibd
+t1.frm
+t1.par
+# State after crash recovery
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1#P#p20.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = InnoDB,
+ PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,crash_change_partition_10";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before crash
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
+(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
+PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Lost connection to MySQL server during query
+# State after crash (before recovery)
+db.opt
+t1#P#p0.ibd
+t1#P#p10#TMP#.ibd
+t1#P#p10.ibd
+t1#P#p20#TMP#.ibd
+t1.frm
+t1.par
+# State after crash recovery
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1#P#p20.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = InnoDB,
+ PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,crash_change_partition_11";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before crash
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
+(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
+PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Lost connection to MySQL server during query
+# State after crash (before recovery)
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1#P#p20.ibd
+t1.frm
+t1.par
+# State after crash recovery
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1#P#p20.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = InnoDB,
+ PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,crash_change_partition_12";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before crash
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
+(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
+PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Lost connection to MySQL server during query
+# State after crash (before recovery)
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1#P#p20.ibd
+t1.frm
+t1.par
+# State after crash recovery
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1#P#p20.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = InnoDB,
+ PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
diff --git a/mysql-test/suite/parts/r/debug_innodb_fail.result b/mysql-test/suite/parts/r/debug_innodb_fail.result
new file mode 100644
index 00000000000..810d2aa9260
--- /dev/null
+++ b/mysql-test/suite/parts/r/debug_innodb_fail.result
@@ -0,0 +1,3864 @@
+call mtr.add_suppression("InnoDB: Warning: allocated tablespace .*, old maximum was");
+call mtr.add_suppression("table .* does not exist in the InnoDB internal");
+call mtr.add_suppression("InnoDB: Warning: MySQL is trying to drop table ");
+# Test failure recovery in fast_alter_partition_table.
+#
+# Bug#53676: Unexpected errors and possible table corruption on
+# ADD PARTITION and LOCK TABLE
+# Bug#53770: Server crash at handler.cc:2076 on LOAD DATA
+# after timed out COALESCE PARTITION
+# Extended crash recovery testing of fast_alter_partition_table.
+call mtr.add_suppression("Attempting backtrace. You can use the following information to find out");
+flush tables;
+# Error recovery testing ADD PARTITION
+SET @save_dbug=@@debug_dbug;
+SET SESSION debug_dbug="+d,fail_add_partition_1";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+# Same test under LOCK TABLE
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+LOCK TABLE t1 WRITE;
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+UNLOCK TABLES;
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,fail_add_partition_2";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+# Same test under LOCK TABLE
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+LOCK TABLE t1 WRITE;
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+UNLOCK TABLES;
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,fail_add_partition_3";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+# Same test under LOCK TABLE
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+LOCK TABLE t1 WRITE;
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+UNLOCK TABLES;
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,fail_add_partition_4";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+# Same test under LOCK TABLE
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+LOCK TABLE t1 WRITE;
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+UNLOCK TABLES;
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,fail_add_partition_5";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+# Same test under LOCK TABLE
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+LOCK TABLE t1 WRITE;
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+UNLOCK TABLES;
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,fail_add_partition_6";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+# Same test under LOCK TABLE
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+LOCK TABLE t1 WRITE;
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+UNLOCK TABLES;
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,fail_add_partition_7";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+# Same test under LOCK TABLE
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+LOCK TABLE t1 WRITE;
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+UNLOCK TABLES;
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,fail_add_partition_8";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1#P#p20.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB,
+ PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+# Same test under LOCK TABLE
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+LOCK TABLE t1 WRITE;
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1#P#p20.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB,
+ PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+UNLOCK TABLES;
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,fail_add_partition_9";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1#P#p20.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB,
+ PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+# Same test under LOCK TABLE
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+LOCK TABLE t1 WRITE;
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1#P#p20.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB,
+ PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+UNLOCK TABLES;
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,fail_add_partition_10";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1#P#p20.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB,
+ PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+# Same test under LOCK TABLE
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+LOCK TABLE t1 WRITE;
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1#P#p20.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB,
+ PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+UNLOCK TABLES;
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+# Error recovery DROP PARTITION
+SET @save_dbug=@@debug_dbug;
+SET SESSION debug_dbug="+d,fail_drop_partition_1";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 DROP PARTITION p10;
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+# Same test under LOCK TABLE
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+LOCK TABLE t1 WRITE;
+ALTER TABLE t1 DROP PARTITION p10;
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+UNLOCK TABLES;
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,fail_drop_partition_2";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 DROP PARTITION p10;
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+# Same test under LOCK TABLE
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+LOCK TABLE t1 WRITE;
+ALTER TABLE t1 DROP PARTITION p10;
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+UNLOCK TABLES;
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,fail_drop_partition_3";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 DROP PARTITION p10;
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+# Same test under LOCK TABLE
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+LOCK TABLE t1 WRITE;
+ALTER TABLE t1 DROP PARTITION p10;
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+UNLOCK TABLES;
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,fail_drop_partition_4";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 DROP PARTITION p10;
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+# Same test under LOCK TABLE
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+LOCK TABLE t1 WRITE;
+ALTER TABLE t1 DROP PARTITION p10;
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+UNLOCK TABLES;
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,fail_drop_partition_5";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 DROP PARTITION p10;
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+# Same test under LOCK TABLE
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+LOCK TABLE t1 WRITE;
+ALTER TABLE t1 DROP PARTITION p10;
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+UNLOCK TABLES;
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,fail_drop_partition_6";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 DROP PARTITION p10;
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+# Same test under LOCK TABLE
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+LOCK TABLE t1 WRITE;
+ALTER TABLE t1 DROP PARTITION p10;
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+UNLOCK TABLES;
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,fail_drop_partition_7";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 DROP PARTITION p10;
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+# Same test under LOCK TABLE
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+LOCK TABLE t1 WRITE;
+ALTER TABLE t1 DROP PARTITION p10;
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+UNLOCK TABLES;
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,fail_drop_partition_8";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 DROP PARTITION p10;
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+# Same test under LOCK TABLE
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+LOCK TABLE t1 WRITE;
+ALTER TABLE t1 DROP PARTITION p10;
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+UNLOCK TABLES;
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,fail_drop_partition_9";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 DROP PARTITION p10;
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+# Same test under LOCK TABLE
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+LOCK TABLE t1 WRITE;
+ALTER TABLE t1 DROP PARTITION p10;
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+UNLOCK TABLES;
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+# Error recovery change partition (REORGANIZE/REBUILD/COALESCE
+# or ADD HASH PARTITION).
+SET @save_dbug=@@debug_dbug;
+SET SESSION debug_dbug="+d,fail_change_partition_1";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
+(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
+PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+# Same test under LOCK TABLE
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+LOCK TABLE t1 WRITE;
+ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
+(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
+PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+UNLOCK TABLES;
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,fail_change_partition_2";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
+(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
+PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+# Same test under LOCK TABLE
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+LOCK TABLE t1 WRITE;
+ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
+(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
+PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+UNLOCK TABLES;
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,fail_change_partition_3";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
+(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
+PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+# Same test under LOCK TABLE
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+LOCK TABLE t1 WRITE;
+ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
+(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
+PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+UNLOCK TABLES;
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,fail_change_partition_4";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
+(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
+PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+# Same test under LOCK TABLE
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+LOCK TABLE t1 WRITE;
+ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
+(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
+PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+UNLOCK TABLES;
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,fail_change_partition_5";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
+(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
+PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+# Same test under LOCK TABLE
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+LOCK TABLE t1 WRITE;
+ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
+(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
+PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+UNLOCK TABLES;
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,fail_change_partition_6";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
+(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
+PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+# Same test under LOCK TABLE
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+LOCK TABLE t1 WRITE;
+ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
+(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
+PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+UNLOCK TABLES;
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,fail_change_partition_7";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
+(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
+PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1#P#p20.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = InnoDB,
+ PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+# Same test under LOCK TABLE
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+LOCK TABLE t1 WRITE;
+ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
+(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
+PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1#P#p20.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = InnoDB,
+ PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+UNLOCK TABLES;
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,fail_change_partition_8";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
+(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
+PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1#P#p20.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = InnoDB,
+ PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+# Same test under LOCK TABLE
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+LOCK TABLE t1 WRITE;
+ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
+(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
+PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1#P#p20.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = InnoDB,
+ PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+UNLOCK TABLES;
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,fail_change_partition_9";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
+(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
+PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1#P#p20.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = InnoDB,
+ PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+# Same test under LOCK TABLE
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+LOCK TABLE t1 WRITE;
+ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
+(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
+PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1#P#p20.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = InnoDB,
+ PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+UNLOCK TABLES;
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,fail_change_partition_10";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
+(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
+PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1#P#p20.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = InnoDB,
+ PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+# Same test under LOCK TABLE
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+LOCK TABLE t1 WRITE;
+ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
+(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
+PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1#P#p20.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = InnoDB,
+ PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+UNLOCK TABLES;
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,fail_change_partition_11";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
+(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
+PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1#P#p20.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = InnoDB,
+ PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+# Same test under LOCK TABLE
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+LOCK TABLE t1 WRITE;
+ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
+(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
+PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1#P#p20.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = InnoDB,
+ PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+UNLOCK TABLES;
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,fail_change_partition_12";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
+(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
+PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1#P#p20.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = InnoDB,
+ PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+# Same test under LOCK TABLE
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'InnoDB'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+LOCK TABLE t1 WRITE;
+ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
+(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
+PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1#P#p20.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
+ PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = InnoDB,
+ PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = InnoDB)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+UNLOCK TABLES;
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
diff --git a/mysql-test/suite/parts/r/debug_myisam_crash.result b/mysql-test/suite/parts/r/debug_myisam_crash.result
new file mode 100644
index 00000000000..5252af12db1
--- /dev/null
+++ b/mysql-test/suite/parts/r/debug_myisam_crash.result
@@ -0,0 +1,2376 @@
+# Test crash in fast_alter_partition_table.
+#
+# Bug#53676: Unexpected errors and possible table corruption on
+# ADD PARTITION and LOCK TABLE
+# Bug#53770: Server crash at handler.cc:2076 on LOAD DATA
+# after timed out COALESCE PARTITION
+# Extended crash recovery testing of fast_alter_partition_table.
+call mtr.add_suppression("Attempting backtrace. You can use the following information to find out");
+flush tables;
+# Crash testing ADD PARTITION
+SET @save_dbug=@@debug_dbug;
+SET SESSION debug_dbug="+d,crash_add_partition_1";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before crash
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Lost connection to MySQL server during query
+# State after crash (before recovery)
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+# State after crash recovery
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,crash_add_partition_2";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before crash
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Lost connection to MySQL server during query
+# State after crash (before recovery)
+#sql-shadow-t1.frm
+#sql-shadow-t1.par
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+# State after crash recovery
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,crash_add_partition_3";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before crash
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Lost connection to MySQL server during query
+# State after crash (before recovery)
+#sql-shadow-t1.frm
+#sql-shadow-t1.par
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+# State after crash recovery
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,crash_add_partition_4";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before crash
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Lost connection to MySQL server during query
+# State after crash (before recovery)
+#sql-shadow-t1.frm
+#sql-shadow-t1.par
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+# State after crash recovery
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,crash_add_partition_5";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before crash
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Lost connection to MySQL server during query
+# State after crash (before recovery)
+#sql-shadow-t1.frm
+#sql-shadow-t1.par
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1#P#p20.MYD
+t1#P#p20.MYI
+t1.frm
+t1.par
+# State after crash recovery
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,crash_add_partition_6";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before crash
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Lost connection to MySQL server during query
+# State after crash (before recovery)
+#sql-shadow-t1.frm
+#sql-shadow-t1.par
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1#P#p20.MYD
+t1#P#p20.MYI
+t1.frm
+t1.par
+# State after crash recovery
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,crash_add_partition_7";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before crash
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Lost connection to MySQL server during query
+# State after crash (before recovery)
+#sql-shadow-t1.frm
+#sql-shadow-t1.par
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1#P#p20.MYD
+t1#P#p20.MYI
+t1.frm
+t1.par
+# State after crash recovery
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,crash_add_partition_8";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before crash
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Lost connection to MySQL server during query
+# State after crash (before recovery)
+#sql-shadow-t1.frm
+#sql-shadow-t1.par
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1#P#p20.MYD
+t1#P#p20.MYI
+t1.frm
+t1.par
+# State after crash recovery
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1#P#p20.MYD
+t1#P#p20.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM,
+ PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,crash_add_partition_9";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before crash
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Lost connection to MySQL server during query
+# State after crash (before recovery)
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1#P#p20.MYD
+t1#P#p20.MYI
+t1.frm
+t1.par
+# State after crash recovery
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1#P#p20.MYD
+t1#P#p20.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM,
+ PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,crash_add_partition_10";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before crash
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Lost connection to MySQL server during query
+# State after crash (before recovery)
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1#P#p20.MYD
+t1#P#p20.MYI
+t1.frm
+t1.par
+# State after crash recovery
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1#P#p20.MYD
+t1#P#p20.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM,
+ PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+# Test DROP PARTITION
+SET @save_dbug=@@debug_dbug;
+SET SESSION debug_dbug="+d,crash_drop_partition_1";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before crash
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 DROP PARTITION p10;
+ERROR HY000: Lost connection to MySQL server during query
+# State after crash (before recovery)
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+# State after crash recovery
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,crash_drop_partition_2";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before crash
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 DROP PARTITION p10;
+ERROR HY000: Lost connection to MySQL server during query
+# State after crash (before recovery)
+#sql-shadow-t1.frm
+#sql-shadow-t1.par
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+# State after crash recovery
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,crash_drop_partition_3";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before crash
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 DROP PARTITION p10;
+ERROR HY000: Lost connection to MySQL server during query
+# State after crash (before recovery)
+#sql-shadow-t1.frm
+#sql-shadow-t1.par
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+# State after crash recovery
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,crash_drop_partition_4";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before crash
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 DROP PARTITION p10;
+ERROR HY000: Lost connection to MySQL server during query
+# State after crash (before recovery)
+#sql-shadow-t1.frm
+#sql-shadow-t1.par
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+# State after crash recovery
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,crash_drop_partition_5";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before crash
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 DROP PARTITION p10;
+ERROR HY000: Lost connection to MySQL server during query
+# State after crash (before recovery)
+#sql-shadow-t1.frm
+#sql-shadow-t1.par
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+# State after crash recovery
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,crash_drop_partition_6";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before crash
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 DROP PARTITION p10;
+ERROR HY000: Lost connection to MySQL server during query
+# State after crash (before recovery)
+#sql-shadow-t1.frm
+#sql-shadow-t1.par
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+# State after crash recovery
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,crash_drop_partition_7";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before crash
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 DROP PARTITION p10;
+ERROR HY000: Lost connection to MySQL server during query
+# State after crash (before recovery)
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+# State after crash recovery
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,crash_drop_partition_8";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before crash
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 DROP PARTITION p10;
+ERROR HY000: Lost connection to MySQL server during query
+# State after crash (before recovery)
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1.frm
+t1.par
+# State after crash recovery
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,crash_drop_partition_9";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before crash
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 DROP PARTITION p10;
+ERROR HY000: Lost connection to MySQL server during query
+# State after crash (before recovery)
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1.frm
+t1.par
+# State after crash recovery
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+# Test change partition (REORGANIZE/REBUILD/COALESCE
+# or ADD HASH PARTITION).
+SET @save_dbug=@@debug_dbug;
+SET SESSION debug_dbug="+d,crash_change_partition_1";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before crash
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
+(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
+PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Lost connection to MySQL server during query
+# State after crash (before recovery)
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+# State after crash recovery
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,crash_change_partition_2";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before crash
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
+(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
+PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Lost connection to MySQL server during query
+# State after crash (before recovery)
+#sql-shadow-t1.frm
+#sql-shadow-t1.par
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+# State after crash recovery
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,crash_change_partition_3";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before crash
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
+(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
+PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Lost connection to MySQL server during query
+# State after crash (before recovery)
+#sql-shadow-t1.frm
+#sql-shadow-t1.par
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+# State after crash recovery
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,crash_change_partition_4";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before crash
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
+(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
+PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Lost connection to MySQL server during query
+# State after crash (before recovery)
+#sql-shadow-t1.frm
+#sql-shadow-t1.par
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10#TMP#.MYD
+t1#P#p10#TMP#.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1#P#p20#TMP#.MYD
+t1#P#p20#TMP#.MYI
+t1.frm
+t1.par
+# State after crash recovery
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,crash_change_partition_5";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before crash
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
+(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
+PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Lost connection to MySQL server during query
+# State after crash (before recovery)
+#sql-shadow-t1.frm
+#sql-shadow-t1.par
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10#TMP#.MYD
+t1#P#p10#TMP#.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1#P#p20#TMP#.MYD
+t1#P#p20#TMP#.MYI
+t1.frm
+t1.par
+# State after crash recovery
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,crash_change_partition_6";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before crash
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
+(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
+PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Lost connection to MySQL server during query
+# State after crash (before recovery)
+#sql-shadow-t1.frm
+#sql-shadow-t1.par
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10#TMP#.MYD
+t1#P#p10#TMP#.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1#P#p20#TMP#.MYD
+t1#P#p20#TMP#.MYI
+t1.frm
+t1.par
+# State after crash recovery
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,crash_change_partition_7";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before crash
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
+(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
+PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Lost connection to MySQL server during query
+# State after crash (before recovery)
+#sql-shadow-t1.frm
+#sql-shadow-t1.par
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10#TMP#.MYD
+t1#P#p10#TMP#.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1#P#p20#TMP#.MYD
+t1#P#p20#TMP#.MYI
+t1.frm
+t1.par
+# State after crash recovery
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1#P#p20.MYD
+t1#P#p20.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = MyISAM,
+ PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,crash_change_partition_8";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before crash
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
+(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
+PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Lost connection to MySQL server during query
+# State after crash (before recovery)
+#sql-shadow-t1.frm
+#sql-shadow-t1.par
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10#TMP#.MYD
+t1#P#p10#TMP#.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1#P#p20#TMP#.MYD
+t1#P#p20#TMP#.MYI
+t1.frm
+t1.par
+# State after crash recovery
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1#P#p20.MYD
+t1#P#p20.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = MyISAM,
+ PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,crash_change_partition_9";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before crash
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
+(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
+PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Lost connection to MySQL server during query
+# State after crash (before recovery)
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10#TMP#.MYD
+t1#P#p10#TMP#.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1#P#p20#TMP#.MYD
+t1#P#p20#TMP#.MYI
+t1.frm
+t1.par
+# State after crash recovery
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1#P#p20.MYD
+t1#P#p20.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = MyISAM,
+ PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,crash_change_partition_10";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before crash
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
+(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
+PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Lost connection to MySQL server during query
+# State after crash (before recovery)
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10#TMP#.MYD
+t1#P#p10#TMP#.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1#P#p20#TMP#.MYD
+t1#P#p20#TMP#.MYI
+t1.frm
+t1.par
+# State after crash recovery
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1#P#p20.MYD
+t1#P#p20.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = MyISAM,
+ PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,crash_change_partition_11";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before crash
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
+(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
+PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Lost connection to MySQL server during query
+# State after crash (before recovery)
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1#P#p20.MYD
+t1#P#p20.MYI
+t1.frm
+t1.par
+# State after crash recovery
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1#P#p20.MYD
+t1#P#p20.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = MyISAM,
+ PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,crash_change_partition_12";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before crash
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
+(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
+PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Lost connection to MySQL server during query
+# State after crash (before recovery)
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1#P#p20.MYD
+t1#P#p20.MYI
+t1.frm
+t1.par
+# State after crash recovery
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1#P#p20.MYD
+t1#P#p20.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = MyISAM,
+ PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
diff --git a/mysql-test/suite/parts/r/debug_myisam_fail.result b/mysql-test/suite/parts/r/debug_myisam_fail.result
new file mode 100644
index 00000000000..304d49daf06
--- /dev/null
+++ b/mysql-test/suite/parts/r/debug_myisam_fail.result
@@ -0,0 +1,4115 @@
+# Test failures in fast_alter_partition_table.
+#
+# Bug#53676: Unexpected errors and possible table corruption on
+# ADD PARTITION and LOCK TABLE
+# Bug#53770: Server crash at handler.cc:2076 on LOAD DATA
+# after timed out COALESCE PARTITION
+# Extended crash recovery testing of fast_alter_partition_table.
+call mtr.add_suppression("Attempting backtrace. You can use the following information to find out");
+flush tables;
+# Error recovery testing ADD PARTITION
+SET @save_dbug=@@debug_dbug;
+SET SESSION debug_dbug="+d,fail_add_partition_1";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+# Same test under LOCK TABLE
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+LOCK TABLE t1 WRITE;
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+UNLOCK TABLES;
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,fail_add_partition_2";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+# Same test under LOCK TABLE
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+LOCK TABLE t1 WRITE;
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+UNLOCK TABLES;
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,fail_add_partition_3";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+# Same test under LOCK TABLE
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+LOCK TABLE t1 WRITE;
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+UNLOCK TABLES;
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,fail_add_partition_4";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+# Same test under LOCK TABLE
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+LOCK TABLE t1 WRITE;
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+UNLOCK TABLES;
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,fail_add_partition_5";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+# Same test under LOCK TABLE
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+LOCK TABLE t1 WRITE;
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+UNLOCK TABLES;
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,fail_add_partition_6";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+# Same test under LOCK TABLE
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+LOCK TABLE t1 WRITE;
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+UNLOCK TABLES;
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,fail_add_partition_7";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+# Same test under LOCK TABLE
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+LOCK TABLE t1 WRITE;
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+UNLOCK TABLES;
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,fail_add_partition_8";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1#P#p20.MYD
+t1#P#p20.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM,
+ PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+# Same test under LOCK TABLE
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+LOCK TABLE t1 WRITE;
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1#P#p20.MYD
+t1#P#p20.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM,
+ PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+UNLOCK TABLES;
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,fail_add_partition_9";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1#P#p20.MYD
+t1#P#p20.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM,
+ PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+# Same test under LOCK TABLE
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+LOCK TABLE t1 WRITE;
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1#P#p20.MYD
+t1#P#p20.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM,
+ PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+UNLOCK TABLES;
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,fail_add_partition_10";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1#P#p20.MYD
+t1#P#p20.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM,
+ PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+# Same test under LOCK TABLE
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+LOCK TABLE t1 WRITE;
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1#P#p20.MYD
+t1#P#p20.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM,
+ PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+UNLOCK TABLES;
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+# Error recovery DROP PARTITION
+SET @save_dbug=@@debug_dbug;
+SET SESSION debug_dbug="+d,fail_drop_partition_1";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 DROP PARTITION p10;
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+# Same test under LOCK TABLE
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+LOCK TABLE t1 WRITE;
+ALTER TABLE t1 DROP PARTITION p10;
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+UNLOCK TABLES;
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,fail_drop_partition_2";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 DROP PARTITION p10;
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+# Same test under LOCK TABLE
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+LOCK TABLE t1 WRITE;
+ALTER TABLE t1 DROP PARTITION p10;
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+UNLOCK TABLES;
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,fail_drop_partition_3";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 DROP PARTITION p10;
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+# Same test under LOCK TABLE
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+LOCK TABLE t1 WRITE;
+ALTER TABLE t1 DROP PARTITION p10;
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+UNLOCK TABLES;
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,fail_drop_partition_4";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 DROP PARTITION p10;
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+# Same test under LOCK TABLE
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+LOCK TABLE t1 WRITE;
+ALTER TABLE t1 DROP PARTITION p10;
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+UNLOCK TABLES;
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,fail_drop_partition_5";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 DROP PARTITION p10;
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+# Same test under LOCK TABLE
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+LOCK TABLE t1 WRITE;
+ALTER TABLE t1 DROP PARTITION p10;
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+UNLOCK TABLES;
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,fail_drop_partition_6";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 DROP PARTITION p10;
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+# Same test under LOCK TABLE
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+LOCK TABLE t1 WRITE;
+ALTER TABLE t1 DROP PARTITION p10;
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+UNLOCK TABLES;
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,fail_drop_partition_7";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 DROP PARTITION p10;
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+# Same test under LOCK TABLE
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+LOCK TABLE t1 WRITE;
+ALTER TABLE t1 DROP PARTITION p10;
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+UNLOCK TABLES;
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,fail_drop_partition_8";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 DROP PARTITION p10;
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+# Same test under LOCK TABLE
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+LOCK TABLE t1 WRITE;
+ALTER TABLE t1 DROP PARTITION p10;
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+UNLOCK TABLES;
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,fail_drop_partition_9";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 DROP PARTITION p10;
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+# Same test under LOCK TABLE
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+LOCK TABLE t1 WRITE;
+ALTER TABLE t1 DROP PARTITION p10;
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+UNLOCK TABLES;
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+# Error recovery change partition (REORGANIZE/REBUILD/COALESCE
+# or ADD HASH PARTITION).
+SET @save_dbug=@@debug_dbug;
+SET SESSION debug_dbug="+d,fail_change_partition_1";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
+(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
+PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+# Same test under LOCK TABLE
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+LOCK TABLE t1 WRITE;
+ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
+(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
+PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+UNLOCK TABLES;
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,fail_change_partition_2";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
+(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
+PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+# Same test under LOCK TABLE
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+LOCK TABLE t1 WRITE;
+ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
+(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
+PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+UNLOCK TABLES;
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,fail_change_partition_3";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
+(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
+PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+# Same test under LOCK TABLE
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+LOCK TABLE t1 WRITE;
+ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
+(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
+PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+UNLOCK TABLES;
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,fail_change_partition_4";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
+(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
+PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+# Same test under LOCK TABLE
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+LOCK TABLE t1 WRITE;
+ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
+(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
+PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+UNLOCK TABLES;
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,fail_change_partition_5";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
+(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
+PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+# Same test under LOCK TABLE
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+LOCK TABLE t1 WRITE;
+ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
+(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
+PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+UNLOCK TABLES;
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,fail_change_partition_6";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
+(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
+PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+# Same test under LOCK TABLE
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+LOCK TABLE t1 WRITE;
+ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
+(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
+PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+UNLOCK TABLES;
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,fail_change_partition_7";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
+(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
+PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1#P#p20.MYD
+t1#P#p20.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = MyISAM,
+ PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+# Same test under LOCK TABLE
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+LOCK TABLE t1 WRITE;
+ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
+(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
+PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1#P#p20.MYD
+t1#P#p20.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = MyISAM,
+ PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+UNLOCK TABLES;
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,fail_change_partition_8";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
+(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
+PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1#P#p20.MYD
+t1#P#p20.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = MyISAM,
+ PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+# Same test under LOCK TABLE
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+LOCK TABLE t1 WRITE;
+ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
+(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
+PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1#P#p20.MYD
+t1#P#p20.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = MyISAM,
+ PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+UNLOCK TABLES;
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,fail_change_partition_9";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
+(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
+PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1#P#p20.MYD
+t1#P#p20.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = MyISAM,
+ PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+# Same test under LOCK TABLE
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+LOCK TABLE t1 WRITE;
+ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
+(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
+PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1#P#p20.MYD
+t1#P#p20.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = MyISAM,
+ PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+UNLOCK TABLES;
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,fail_change_partition_10";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
+(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
+PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1#P#p20.MYD
+t1#P#p20.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = MyISAM,
+ PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+# Same test under LOCK TABLE
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+LOCK TABLE t1 WRITE;
+ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
+(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
+PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1#P#p20.MYD
+t1#P#p20.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = MyISAM,
+ PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+UNLOCK TABLES;
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,fail_change_partition_11";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
+(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
+PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1#P#p20.MYD
+t1#P#p20.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = MyISAM,
+ PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+# Same test under LOCK TABLE
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+LOCK TABLE t1 WRITE;
+ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
+(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
+PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1#P#p20.MYD
+t1#P#p20.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = MyISAM,
+ PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+UNLOCK TABLES;
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
+SET SESSION debug_dbug="+d,fail_change_partition_12";
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
+(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
+PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1#P#p20.MYD
+t1#P#p20.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = MyISAM,
+ PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+# Same test under LOCK TABLE
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = 'MyISAM'
+PARTITION BY LIST (a)
+(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
+PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
+# State before failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+LOCK TABLE t1 WRITE;
+ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
+(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
+PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
+ERROR HY000: Unknown error
+# State after failure
+db.opt
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p10.MYD
+t1#P#p10.MYI
+t1#P#p20.MYD
+t1#P#p20.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY LIST (`a`)
+(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
+ PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = MyISAM,
+ PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = MyISAM)
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+UNLOCK TABLES;
+DROP TABLE t1;
+SET SESSION debug_dbug=@save_dbug;
diff --git a/mysql-test/suite/parts/r/longname.result b/mysql-test/suite/parts/r/longname.result
index 2ca0871bc8d..1b8f823c98f 100644
--- a/mysql-test/suite/parts/r/longname.result
+++ b/mysql-test/suite/parts/r/longname.result
@@ -50,6 +50,13 @@ SUBPARTITION BY HASH (`a`)
INSERT INTO mysqltest1.t1 VALUES(1);
DROP TABLE mysqltest1.`#mysql50#t1#P#@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024#SP#0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef`;
ERROR 42000: Incorrect table name '#mysql50#t1#P#@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@'
+ALTER TABLE mysqltest1.t1 ADD FOREIGN KEY (a) REFERENCES
+mysqltest1.test_jfg_table_name_with_64_chars_123456789012345678901234567890;
+ERROR HY000: Partitioned tables do not support FOREIGN KEY
+ALTER TABLE
+mysqltest1.test_jfg_table_name_with_64_chars_123456789012345678901234567890
+ADD FOREIGN KEY (a) REFERENCES mysqltest1.t1;
+ERROR HY000: Partitioned tables do not support FOREIGN KEY
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES
WHERE NAME LIKE 'mysqltest1%';
NAME
diff --git a/mysql-test/suite/parts/r/partition_basic_symlink_innodb.result b/mysql-test/suite/parts/r/partition_basic_symlink_innodb.result
index 65a5edba254..33dcad91ff6 100644
--- a/mysql-test/suite/parts/r/partition_basic_symlink_innodb.result
+++ b/mysql-test/suite/parts/r/partition_basic_symlink_innodb.result
@@ -1,7 +1,8 @@
#
# Verify that the DATA/INDEX DIR is stored and used if ALTER to MyISAM.
#
-DROP TABLE IF EXISTS t1;
+SET @file_per_table= @@GLOBAL.innodb_file_per_table;
+SET @strict_mode= @@SESSION.innodb_strict_mode;
SET SESSION innodb_strict_mode = ON;
#
# InnoDB only supports DATA DIRECTORY with innodb_file_per_table=ON
@@ -88,7 +89,6 @@ t1 CREATE TABLE `t1` (
(PARTITION `p0` DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' ENGINE = MyISAM,
PARTITION `p1` DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' ENGINE = MyISAM)
# Verifying .frm, .par and MyISAM files (.MYD, MYI)
----- MYSQLD_DATADIR/test
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -325,3 +325,5 @@ DROP TABLE t1, t2;
#
# Cleanup
#
+SET GLOBAL innodb_file_per_table=@file_per_table;
+SET SESSION innodb_strict_mode=@strict_mode;
diff --git a/mysql-test/suite/parts/r/partition_debug.result b/mysql-test/suite/parts/r/partition_debug.result
index 96ed9b010b7..7c083d826cf 100644
--- a/mysql-test/suite/parts/r/partition_debug.result
+++ b/mysql-test/suite/parts/r/partition_debug.result
@@ -423,16 +423,7 @@ a b
ALTER TABLE t1 EXCHANGE PARTITION p0 WITH TABLE t2;
ERROR HY000: Lost connection to MySQL server during query
# State after crash (before recovery)
-#sqlx-nnnn_nnnn.MYD
-#sqlx-nnnn_nnnn.MYI
-db.opt
-t1#P#p0.MYD
-t1#P#p0.MYI
-t1#P#p1.MYD
-t1#P#p1.MYI
-t1.frm
-t1.par
-t2.frm
+#sql-exchange.frm
# State after crash recovery
db.opt
t1#P#p0.MYD
@@ -538,16 +529,7 @@ a b
ALTER TABLE t1 EXCHANGE PARTITION p0 WITH TABLE t2;
ERROR HY000: Lost connection to MySQL server during query
# State after crash (before recovery)
-#sqlx-nnnn_nnnn.MYD
-#sqlx-nnnn_nnnn.MYI
-db.opt
-t1#P#p0.MYD
-t1#P#p0.MYI
-t1#P#p1.MYD
-t1#P#p1.MYI
-t1.frm
-t1.par
-t2.frm
+#sql-exchange.frm
# State after crash recovery
db.opt
t1#P#p0.MYD
@@ -653,16 +635,7 @@ a b
ALTER TABLE t1 EXCHANGE PARTITION p0 WITH TABLE t2;
ERROR HY000: Lost connection to MySQL server during query
# State after crash (before recovery)
-#sqlx-nnnn_nnnn.MYD
-#sqlx-nnnn_nnnn.MYI
-db.opt
-t1#P#p1.MYD
-t1#P#p1.MYI
-t1.frm
-t1.par
-t2.MYD
-t2.MYI
-t2.frm
+#sql-exchange.frm
# State after crash recovery
db.opt
t1#P#p0.MYD
@@ -768,16 +741,7 @@ a b
ALTER TABLE t1 EXCHANGE PARTITION p0 WITH TABLE t2;
ERROR HY000: Lost connection to MySQL server during query
# State after crash (before recovery)
-#sqlx-nnnn_nnnn.MYD
-#sqlx-nnnn_nnnn.MYI
-db.opt
-t1#P#p1.MYD
-t1#P#p1.MYI
-t1.frm
-t1.par
-t2.MYD
-t2.MYI
-t2.frm
+#sql-exchange.frm
# State after crash recovery
db.opt
t1#P#p0.MYD
@@ -1320,7 +1284,7 @@ a b
3 Original from partition p0
4 Original from partition p0
ALTER TABLE t1 EXCHANGE PARTITION p0 WITH TABLE t2;
-ERROR HY000: Error on rename of './test/t2' to './test/#sqlx-nnnn_nnnn' (errno: 0 "Internal error/check (Not system error)")
+ERROR HY000: Error on rename of './test/t2' to './test/#sql-exchange' (errno: 0 "Internal error/check (Not system error)")
# State after failure
db.opt
t1#P#p0.MYD
@@ -1736,7 +1700,7 @@ a b
3 Original from partition p0
4 Original from partition p0
ALTER TABLE t1 EXCHANGE PARTITION p0 WITH TABLE t2;
-ERROR HY000: Error on rename of './test/#sqlx-nnnn_nnnn' to './test/t1#P#p0' (errno: 0 "Internal error/check (Not system error)")
+ERROR HY000: Error on rename of './test/#sql-exchange' to './test/t1#P#p0' (errno: 0 "Internal error/check (Not system error)")
# State after failure
db.opt
t1#P#p0.MYD
diff --git a/mysql-test/suite/parts/r/partition_debug_innodb.result b/mysql-test/suite/parts/r/partition_debug_innodb.result
index 8bae87ee877..e2631d0d708 100644
--- a/mysql-test/suite/parts/r/partition_debug_innodb.result
+++ b/mysql-test/suite/parts/r/partition_debug_innodb.result
@@ -1,6025 +1,7 @@
call mtr.add_suppression("InnoDB: Warning: allocated tablespace .*, old maximum was");
call mtr.add_suppression("InnoDB: Error: table .* does not exist in the InnoDB internal");
call mtr.add_suppression("InnoDB: Warning: MySQL is trying to drop table ");
-# Test crash and failure recovery in fast_alter_partition_table.
-#
-# Bug#53676: Unexpected errors and possible table corruption on
-# ADD PARTITION and LOCK TABLE
-# Bug#53770: Server crash at handler.cc:2076 on LOAD DATA
-# after timed out COALESCE PARTITION
-# Extended crash recovery testing of fast_alter_partition_table.
-call mtr.add_suppression("Attempting backtrace. You can use the following information to find out");
-flush tables;
-# Crash testing ADD PARTITION
-SET @save_dbug=@@debug_dbug;
-SET SESSION debug_dbug="+d,crash_add_partition_1";
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before crash
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-ALTER TABLE t1 ADD PARTITION
-(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
-ERROR HY000: Lost connection to MySQL server during query
-# State after crash (before recovery)
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-# State after crash recovery
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-DROP TABLE t1;
-SET SESSION debug_dbug=@save_dbug;
-SET SESSION debug_dbug="+d,crash_add_partition_2";
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before crash
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-ALTER TABLE t1 ADD PARTITION
-(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
-ERROR HY000: Lost connection to MySQL server during query
-# State after crash (before recovery)
-#sql-t1.frm
-#sql-t1.par
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-# State after crash recovery
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-DROP TABLE t1;
-SET SESSION debug_dbug=@save_dbug;
-SET SESSION debug_dbug="+d,crash_add_partition_3";
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before crash
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-ALTER TABLE t1 ADD PARTITION
-(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
-ERROR HY000: Lost connection to MySQL server during query
-# State after crash (before recovery)
-#sql-t1.frm
-#sql-t1.par
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-# State after crash recovery
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-DROP TABLE t1;
-SET SESSION debug_dbug=@save_dbug;
-SET SESSION debug_dbug="+d,crash_add_partition_4";
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before crash
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-ALTER TABLE t1 ADD PARTITION
-(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
-ERROR HY000: Lost connection to MySQL server during query
-# State after crash (before recovery)
-#sql-t1.frm
-#sql-t1.par
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-# State after crash recovery
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-DROP TABLE t1;
-SET SESSION debug_dbug=@save_dbug;
-SET SESSION debug_dbug="+d,crash_add_partition_5";
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before crash
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-ALTER TABLE t1 ADD PARTITION
-(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
-ERROR HY000: Lost connection to MySQL server during query
-# State after crash (before recovery)
-#sql-t1.frm
-#sql-t1.par
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1#P#p20.ibd
-t1.frm
-t1.par
-# State after crash recovery
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-DROP TABLE t1;
-SET SESSION debug_dbug=@save_dbug;
-SET SESSION debug_dbug="+d,crash_add_partition_6";
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before crash
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-ALTER TABLE t1 ADD PARTITION
-(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
-ERROR HY000: Lost connection to MySQL server during query
-# State after crash (before recovery)
-#sql-t1.frm
-#sql-t1.par
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1#P#p20.ibd
-t1.frm
-t1.par
-# State after crash recovery
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-DROP TABLE t1;
-SET SESSION debug_dbug=@save_dbug;
-SET SESSION debug_dbug="+d,crash_add_partition_7";
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before crash
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-ALTER TABLE t1 ADD PARTITION
-(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
-ERROR HY000: Lost connection to MySQL server during query
-# State after crash (before recovery)
-#sql-t1.frm
-#sql-t1.par
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1#P#p20.ibd
-t1.frm
-t1.par
-# State after crash recovery
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-DROP TABLE t1;
-SET SESSION debug_dbug=@save_dbug;
-SET SESSION debug_dbug="+d,crash_add_partition_8";
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before crash
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-ALTER TABLE t1 ADD PARTITION
-(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
-ERROR HY000: Lost connection to MySQL server during query
-# State after crash (before recovery)
-#sql-t1.frm
-#sql-t1.par
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1#P#p20.ibd
-t1.frm
-t1.par
-# State after crash recovery
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1#P#p20.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB,
- PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-DROP TABLE t1;
-SET SESSION debug_dbug=@save_dbug;
-SET SESSION debug_dbug="+d,crash_add_partition_9";
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before crash
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-ALTER TABLE t1 ADD PARTITION
-(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
-ERROR HY000: Lost connection to MySQL server during query
-# State after crash (before recovery)
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1#P#p20.ibd
-t1.frm
-t1.par
-# State after crash recovery
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1#P#p20.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB,
- PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-DROP TABLE t1;
-SET SESSION debug_dbug=@save_dbug;
-SET SESSION debug_dbug="+d,crash_add_partition_10";
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before crash
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-ALTER TABLE t1 ADD PARTITION
-(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
-ERROR HY000: Lost connection to MySQL server during query
-# State after crash (before recovery)
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1#P#p20.ibd
-t1.frm
-t1.par
-# State after crash recovery
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1#P#p20.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB,
- PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-DROP TABLE t1;
-SET SESSION debug_dbug=@save_dbug;
-# Error recovery testing ADD PARTITION
-SET @save_dbug=@@debug_dbug;
-SET SESSION debug_dbug="+d,fail_add_partition_1";
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-ALTER TABLE t1 ADD PARTITION
-(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
-ERROR HY000: Unknown error
-# State after failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-DROP TABLE t1;
-# Same test under LOCK TABLE
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-LOCK TABLE t1 WRITE;
-ALTER TABLE t1 ADD PARTITION
-(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
-ERROR HY000: Unknown error
-# State after failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-UNLOCK TABLES;
-DROP TABLE t1;
-SET SESSION debug_dbug=@save_dbug;
-SET SESSION debug_dbug="+d,fail_add_partition_2";
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-ALTER TABLE t1 ADD PARTITION
-(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
-ERROR HY000: Unknown error
-# State after failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-DROP TABLE t1;
-# Same test under LOCK TABLE
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-LOCK TABLE t1 WRITE;
-ALTER TABLE t1 ADD PARTITION
-(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
-ERROR HY000: Unknown error
-# State after failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-UNLOCK TABLES;
-DROP TABLE t1;
-SET SESSION debug_dbug=@save_dbug;
-SET SESSION debug_dbug="+d,fail_add_partition_3";
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-ALTER TABLE t1 ADD PARTITION
-(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
-ERROR HY000: Unknown error
-# State after failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-DROP TABLE t1;
-# Same test under LOCK TABLE
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-LOCK TABLE t1 WRITE;
-ALTER TABLE t1 ADD PARTITION
-(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
-ERROR HY000: Unknown error
-# State after failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-UNLOCK TABLES;
-DROP TABLE t1;
-SET SESSION debug_dbug=@save_dbug;
-SET SESSION debug_dbug="+d,fail_add_partition_4";
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-ALTER TABLE t1 ADD PARTITION
-(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
-ERROR HY000: Unknown error
-# State after failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-DROP TABLE t1;
-# Same test under LOCK TABLE
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-LOCK TABLE t1 WRITE;
-ALTER TABLE t1 ADD PARTITION
-(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
-ERROR HY000: Unknown error
-# State after failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-UNLOCK TABLES;
-DROP TABLE t1;
-SET SESSION debug_dbug=@save_dbug;
-SET SESSION debug_dbug="+d,fail_add_partition_5";
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-ALTER TABLE t1 ADD PARTITION
-(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
-ERROR HY000: Unknown error
-# State after failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-DROP TABLE t1;
-# Same test under LOCK TABLE
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-LOCK TABLE t1 WRITE;
-ALTER TABLE t1 ADD PARTITION
-(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
-ERROR HY000: Unknown error
-# State after failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-UNLOCK TABLES;
-DROP TABLE t1;
-SET SESSION debug_dbug=@save_dbug;
-SET SESSION debug_dbug="+d,fail_add_partition_6";
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-ALTER TABLE t1 ADD PARTITION
-(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
-ERROR HY000: Unknown error
-# State after failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-DROP TABLE t1;
-# Same test under LOCK TABLE
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-LOCK TABLE t1 WRITE;
-ALTER TABLE t1 ADD PARTITION
-(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
-ERROR HY000: Unknown error
-# State after failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-UNLOCK TABLES;
-DROP TABLE t1;
-SET SESSION debug_dbug=@save_dbug;
-SET SESSION debug_dbug="+d,fail_add_partition_7";
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-ALTER TABLE t1 ADD PARTITION
-(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
-ERROR HY000: Unknown error
-# State after failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-DROP TABLE t1;
-# Same test under LOCK TABLE
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-LOCK TABLE t1 WRITE;
-ALTER TABLE t1 ADD PARTITION
-(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
-ERROR HY000: Unknown error
-# State after failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-UNLOCK TABLES;
-DROP TABLE t1;
-SET SESSION debug_dbug=@save_dbug;
-SET SESSION debug_dbug="+d,fail_add_partition_8";
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-ALTER TABLE t1 ADD PARTITION
-(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
-ERROR HY000: Unknown error
-# State after failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1#P#p20.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB,
- PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-DROP TABLE t1;
-# Same test under LOCK TABLE
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-LOCK TABLE t1 WRITE;
-ALTER TABLE t1 ADD PARTITION
-(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
-ERROR HY000: Unknown error
-# State after failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1#P#p20.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB,
- PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-UNLOCK TABLES;
-DROP TABLE t1;
-SET SESSION debug_dbug=@save_dbug;
-SET SESSION debug_dbug="+d,fail_add_partition_9";
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-ALTER TABLE t1 ADD PARTITION
-(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
-ERROR HY000: Unknown error
-# State after failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1#P#p20.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB,
- PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-DROP TABLE t1;
-# Same test under LOCK TABLE
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-LOCK TABLE t1 WRITE;
-ALTER TABLE t1 ADD PARTITION
-(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
-ERROR HY000: Unknown error
-# State after failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1#P#p20.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB,
- PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-UNLOCK TABLES;
-DROP TABLE t1;
-SET SESSION debug_dbug=@save_dbug;
-SET SESSION debug_dbug="+d,fail_add_partition_10";
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-ALTER TABLE t1 ADD PARTITION
-(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
-ERROR HY000: Unknown error
-# State after failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1#P#p20.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB,
- PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-DROP TABLE t1;
-# Same test under LOCK TABLE
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-LOCK TABLE t1 WRITE;
-ALTER TABLE t1 ADD PARTITION
-(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
-ERROR HY000: Unknown error
-# State after failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1#P#p20.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB,
- PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-UNLOCK TABLES;
-DROP TABLE t1;
-SET SESSION debug_dbug=@save_dbug;
-# Test DROP PARTITION
-SET @save_dbug=@@debug_dbug;
-SET SESSION debug_dbug="+d,crash_drop_partition_1";
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before crash
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-ALTER TABLE t1 DROP PARTITION p10;
-ERROR HY000: Lost connection to MySQL server during query
-# State after crash (before recovery)
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-# State after crash recovery
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-DROP TABLE t1;
-SET SESSION debug_dbug=@save_dbug;
-SET SESSION debug_dbug="+d,crash_drop_partition_2";
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before crash
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-ALTER TABLE t1 DROP PARTITION p10;
-ERROR HY000: Lost connection to MySQL server during query
-# State after crash (before recovery)
-#sql-t1.frm
-#sql-t1.par
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-# State after crash recovery
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-DROP TABLE t1;
-SET SESSION debug_dbug=@save_dbug;
-SET SESSION debug_dbug="+d,crash_drop_partition_3";
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before crash
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-ALTER TABLE t1 DROP PARTITION p10;
-ERROR HY000: Lost connection to MySQL server during query
-# State after crash (before recovery)
-#sql-t1.frm
-#sql-t1.par
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-# State after crash recovery
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-DROP TABLE t1;
-SET SESSION debug_dbug=@save_dbug;
-SET SESSION debug_dbug="+d,crash_drop_partition_4";
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before crash
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-ALTER TABLE t1 DROP PARTITION p10;
-ERROR HY000: Lost connection to MySQL server during query
-# State after crash (before recovery)
-#sql-t1.frm
-#sql-t1.par
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-# State after crash recovery
-db.opt
-t1#P#p0.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-DROP TABLE t1;
-SET SESSION debug_dbug=@save_dbug;
-SET SESSION debug_dbug="+d,crash_drop_partition_5";
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before crash
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-ALTER TABLE t1 DROP PARTITION p10;
-ERROR HY000: Lost connection to MySQL server during query
-# State after crash (before recovery)
-#sql-t1.frm
-#sql-t1.par
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-# State after crash recovery
-db.opt
-t1#P#p0.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-DROP TABLE t1;
-SET SESSION debug_dbug=@save_dbug;
-SET SESSION debug_dbug="+d,crash_drop_partition_6";
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before crash
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-ALTER TABLE t1 DROP PARTITION p10;
-ERROR HY000: Lost connection to MySQL server during query
-# State after crash (before recovery)
-#sql-t1.frm
-#sql-t1.par
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-# State after crash recovery
-db.opt
-t1#P#p0.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-DROP TABLE t1;
-SET SESSION debug_dbug=@save_dbug;
-SET SESSION debug_dbug="+d,crash_drop_partition_7";
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before crash
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-ALTER TABLE t1 DROP PARTITION p10;
-ERROR HY000: Lost connection to MySQL server during query
-# State after crash (before recovery)
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-# State after crash recovery
-db.opt
-t1#P#p0.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-DROP TABLE t1;
-SET SESSION debug_dbug=@save_dbug;
-SET SESSION debug_dbug="+d,crash_drop_partition_8";
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before crash
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-ALTER TABLE t1 DROP PARTITION p10;
-ERROR HY000: Lost connection to MySQL server during query
-# State after crash (before recovery)
-db.opt
-t1#P#p0.ibd
-t1.frm
-t1.par
-# State after crash recovery
-db.opt
-t1#P#p0.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-DROP TABLE t1;
-SET SESSION debug_dbug=@save_dbug;
-SET SESSION debug_dbug="+d,crash_drop_partition_9";
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before crash
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-ALTER TABLE t1 DROP PARTITION p10;
-ERROR HY000: Lost connection to MySQL server during query
-# State after crash (before recovery)
-db.opt
-t1#P#p0.ibd
-t1.frm
-t1.par
-# State after crash recovery
-db.opt
-t1#P#p0.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-DROP TABLE t1;
-SET SESSION debug_dbug=@save_dbug;
-# Error recovery DROP PARTITION
-SET @save_dbug=@@debug_dbug;
-SET SESSION debug_dbug="+d,fail_drop_partition_1";
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-ALTER TABLE t1 DROP PARTITION p10;
-ERROR HY000: Unknown error
-# State after failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-DROP TABLE t1;
-# Same test under LOCK TABLE
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-LOCK TABLE t1 WRITE;
-ALTER TABLE t1 DROP PARTITION p10;
-ERROR HY000: Unknown error
-# State after failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-UNLOCK TABLES;
-DROP TABLE t1;
-SET SESSION debug_dbug=@save_dbug;
-SET SESSION debug_dbug="+d,fail_drop_partition_2";
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-ALTER TABLE t1 DROP PARTITION p10;
-ERROR HY000: Unknown error
-# State after failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-DROP TABLE t1;
-# Same test under LOCK TABLE
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-LOCK TABLE t1 WRITE;
-ALTER TABLE t1 DROP PARTITION p10;
-ERROR HY000: Unknown error
-# State after failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-UNLOCK TABLES;
-DROP TABLE t1;
-SET SESSION debug_dbug=@save_dbug;
-SET SESSION debug_dbug="+d,fail_drop_partition_3";
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-ALTER TABLE t1 DROP PARTITION p10;
-ERROR HY000: Unknown error
-# State after failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-DROP TABLE t1;
-# Same test under LOCK TABLE
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-LOCK TABLE t1 WRITE;
-ALTER TABLE t1 DROP PARTITION p10;
-ERROR HY000: Unknown error
-# State after failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-UNLOCK TABLES;
-DROP TABLE t1;
-SET SESSION debug_dbug=@save_dbug;
-SET SESSION debug_dbug="+d,fail_drop_partition_4";
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-ALTER TABLE t1 DROP PARTITION p10;
-ERROR HY000: Unknown error
-# State after failure
-db.opt
-t1#P#p0.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-DROP TABLE t1;
-# Same test under LOCK TABLE
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-LOCK TABLE t1 WRITE;
-ALTER TABLE t1 DROP PARTITION p10;
-ERROR HY000: Unknown error
-# State after failure
-db.opt
-t1#P#p0.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-UNLOCK TABLES;
-DROP TABLE t1;
-SET SESSION debug_dbug=@save_dbug;
-SET SESSION debug_dbug="+d,fail_drop_partition_5";
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-ALTER TABLE t1 DROP PARTITION p10;
-ERROR HY000: Unknown error
-# State after failure
-db.opt
-t1#P#p0.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-DROP TABLE t1;
-# Same test under LOCK TABLE
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-LOCK TABLE t1 WRITE;
-ALTER TABLE t1 DROP PARTITION p10;
-ERROR HY000: Unknown error
-# State after failure
-db.opt
-t1#P#p0.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-UNLOCK TABLES;
-DROP TABLE t1;
-SET SESSION debug_dbug=@save_dbug;
-SET SESSION debug_dbug="+d,fail_drop_partition_6";
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-ALTER TABLE t1 DROP PARTITION p10;
-ERROR HY000: Unknown error
-# State after failure
-db.opt
-t1#P#p0.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-DROP TABLE t1;
-# Same test under LOCK TABLE
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-LOCK TABLE t1 WRITE;
-ALTER TABLE t1 DROP PARTITION p10;
-ERROR HY000: Unknown error
-# State after failure
-db.opt
-t1#P#p0.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-UNLOCK TABLES;
-DROP TABLE t1;
-SET SESSION debug_dbug=@save_dbug;
-SET SESSION debug_dbug="+d,fail_drop_partition_7";
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-ALTER TABLE t1 DROP PARTITION p10;
-ERROR HY000: Unknown error
-# State after failure
-db.opt
-t1#P#p0.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-DROP TABLE t1;
-# Same test under LOCK TABLE
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-LOCK TABLE t1 WRITE;
-ALTER TABLE t1 DROP PARTITION p10;
-ERROR HY000: Unknown error
-# State after failure
-db.opt
-t1#P#p0.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-UNLOCK TABLES;
-DROP TABLE t1;
-SET SESSION debug_dbug=@save_dbug;
-SET SESSION debug_dbug="+d,fail_drop_partition_8";
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-ALTER TABLE t1 DROP PARTITION p10;
-ERROR HY000: Unknown error
-# State after failure
-db.opt
-t1#P#p0.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-DROP TABLE t1;
-# Same test under LOCK TABLE
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-LOCK TABLE t1 WRITE;
-ALTER TABLE t1 DROP PARTITION p10;
-ERROR HY000: Unknown error
-# State after failure
-db.opt
-t1#P#p0.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-UNLOCK TABLES;
-DROP TABLE t1;
-SET SESSION debug_dbug=@save_dbug;
-SET SESSION debug_dbug="+d,fail_drop_partition_9";
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-ALTER TABLE t1 DROP PARTITION p10;
-ERROR HY000: Unknown error
-# State after failure
-db.opt
-t1#P#p0.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-DROP TABLE t1;
-# Same test under LOCK TABLE
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-LOCK TABLE t1 WRITE;
-ALTER TABLE t1 DROP PARTITION p10;
-ERROR HY000: Unknown error
-# State after failure
-db.opt
-t1#P#p0.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-UNLOCK TABLES;
-DROP TABLE t1;
-SET SESSION debug_dbug=@save_dbug;
-# Test change partition (REORGANIZE/REBUILD/COALESCE
-# or ADD HASH PARTITION).
-SET @save_dbug=@@debug_dbug;
-SET SESSION debug_dbug="+d,crash_change_partition_1";
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before crash
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
-(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
-PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
-ERROR HY000: Lost connection to MySQL server during query
-# State after crash (before recovery)
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-# State after crash recovery
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-DROP TABLE t1;
-SET SESSION debug_dbug=@save_dbug;
-SET SESSION debug_dbug="+d,crash_change_partition_2";
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before crash
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
-(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
-PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
-ERROR HY000: Lost connection to MySQL server during query
-# State after crash (before recovery)
-#sql-t1.frm
-#sql-t1.par
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-# State after crash recovery
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-DROP TABLE t1;
-SET SESSION debug_dbug=@save_dbug;
-SET SESSION debug_dbug="+d,crash_change_partition_3";
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before crash
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
-(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
-PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
-ERROR HY000: Lost connection to MySQL server during query
-# State after crash (before recovery)
-#sql-t1.frm
-#sql-t1.par
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-# State after crash recovery
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-DROP TABLE t1;
-SET SESSION debug_dbug=@save_dbug;
-SET SESSION debug_dbug="+d,crash_change_partition_4";
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before crash
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
-(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
-PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
-ERROR HY000: Lost connection to MySQL server during query
-# State after crash (before recovery)
-#sql-t1.frm
-#sql-t1.par
-db.opt
-t1#P#p0.ibd
-t1#P#p10#TMP#.ibd
-t1#P#p10.ibd
-t1#P#p20#TMP#.ibd
-t1.frm
-t1.par
-# State after crash recovery
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-DROP TABLE t1;
-SET SESSION debug_dbug=@save_dbug;
-SET SESSION debug_dbug="+d,crash_change_partition_5";
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before crash
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
-(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
-PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
-ERROR HY000: Lost connection to MySQL server during query
-# State after crash (before recovery)
-#sql-t1.frm
-#sql-t1.par
-db.opt
-t1#P#p0.ibd
-t1#P#p10#TMP#.ibd
-t1#P#p10.ibd
-t1#P#p20#TMP#.ibd
-t1.frm
-t1.par
-# State after crash recovery
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-DROP TABLE t1;
-SET SESSION debug_dbug=@save_dbug;
-SET SESSION debug_dbug="+d,crash_change_partition_6";
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before crash
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
-(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
-PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
-ERROR HY000: Lost connection to MySQL server during query
-# State after crash (before recovery)
-#sql-t1.frm
-#sql-t1.par
-db.opt
-t1#P#p0.ibd
-t1#P#p10#TMP#.ibd
-t1#P#p10.ibd
-t1#P#p20#TMP#.ibd
-t1.frm
-t1.par
-# State after crash recovery
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-DROP TABLE t1;
-SET SESSION debug_dbug=@save_dbug;
-SET SESSION debug_dbug="+d,crash_change_partition_7";
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before crash
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
-(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
-PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
-ERROR HY000: Lost connection to MySQL server during query
-# State after crash (before recovery)
-#sql-t1.frm
-#sql-t1.par
-db.opt
-t1#P#p0.ibd
-t1#P#p10#TMP#.ibd
-t1#P#p10.ibd
-t1#P#p20#TMP#.ibd
-t1.frm
-t1.par
-# State after crash recovery
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1#P#p20.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = InnoDB,
- PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-DROP TABLE t1;
-SET SESSION debug_dbug=@save_dbug;
-SET SESSION debug_dbug="+d,crash_change_partition_8";
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before crash
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
-(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
-PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
-ERROR HY000: Lost connection to MySQL server during query
-# State after crash (before recovery)
-#sql-t1.frm
-#sql-t1.par
-db.opt
-t1#P#p0.ibd
-t1#P#p10#TMP#.ibd
-t1#P#p10.ibd
-t1#P#p20#TMP#.ibd
-t1.frm
-t1.par
-# State after crash recovery
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1#P#p20.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = InnoDB,
- PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-DROP TABLE t1;
-SET SESSION debug_dbug=@save_dbug;
-SET SESSION debug_dbug="+d,crash_change_partition_9";
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before crash
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
-(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
-PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
-ERROR HY000: Lost connection to MySQL server during query
-# State after crash (before recovery)
-db.opt
-t1#P#p0.ibd
-t1#P#p10#TMP#.ibd
-t1#P#p10.ibd
-t1#P#p20#TMP#.ibd
-t1.frm
-t1.par
-# State after crash recovery
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1#P#p20.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = InnoDB,
- PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-DROP TABLE t1;
-SET SESSION debug_dbug=@save_dbug;
-SET SESSION debug_dbug="+d,crash_change_partition_10";
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before crash
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
-(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
-PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
-ERROR HY000: Lost connection to MySQL server during query
-# State after crash (before recovery)
-db.opt
-t1#P#p0.ibd
-t1#P#p10#TMP#.ibd
-t1#P#p10.ibd
-t1#P#p20#TMP#.ibd
-t1.frm
-t1.par
-# State after crash recovery
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1#P#p20.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = InnoDB,
- PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-DROP TABLE t1;
-SET SESSION debug_dbug=@save_dbug;
-SET SESSION debug_dbug="+d,crash_change_partition_11";
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before crash
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
-(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
-PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
-ERROR HY000: Lost connection to MySQL server during query
-# State after crash (before recovery)
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1#P#p20.ibd
-t1.frm
-t1.par
-# State after crash recovery
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1#P#p20.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = InnoDB,
- PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-DROP TABLE t1;
-SET SESSION debug_dbug=@save_dbug;
-SET SESSION debug_dbug="+d,crash_change_partition_12";
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before crash
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
-(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
-PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
-ERROR HY000: Lost connection to MySQL server during query
-# State after crash (before recovery)
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1#P#p20.ibd
-t1.frm
-t1.par
-# State after crash recovery
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1#P#p20.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = InnoDB,
- PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-DROP TABLE t1;
-SET SESSION debug_dbug=@save_dbug;
-# Error recovery change partition (REORGANIZE/REBUILD/COALESCE
-# or ADD HASH PARTITION).
-SET @save_dbug=@@debug_dbug;
-SET SESSION debug_dbug="+d,fail_change_partition_1";
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
-(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
-PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
-ERROR HY000: Unknown error
-# State after failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-DROP TABLE t1;
-# Same test under LOCK TABLE
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-LOCK TABLE t1 WRITE;
-ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
-(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
-PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
-ERROR HY000: Unknown error
-# State after failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-UNLOCK TABLES;
-DROP TABLE t1;
-SET SESSION debug_dbug=@save_dbug;
-SET SESSION debug_dbug="+d,fail_change_partition_2";
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
-(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
-PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
-ERROR HY000: Unknown error
-# State after failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-DROP TABLE t1;
-# Same test under LOCK TABLE
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-LOCK TABLE t1 WRITE;
-ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
-(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
-PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
-ERROR HY000: Unknown error
-# State after failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-UNLOCK TABLES;
-DROP TABLE t1;
-SET SESSION debug_dbug=@save_dbug;
-SET SESSION debug_dbug="+d,fail_change_partition_3";
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
-(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
-PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
-ERROR HY000: Unknown error
-# State after failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-DROP TABLE t1;
-# Same test under LOCK TABLE
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-LOCK TABLE t1 WRITE;
-ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
-(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
-PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
-ERROR HY000: Unknown error
-# State after failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-UNLOCK TABLES;
-DROP TABLE t1;
-SET SESSION debug_dbug=@save_dbug;
-SET SESSION debug_dbug="+d,fail_change_partition_4";
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
-(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
-PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
-ERROR HY000: Unknown error
-# State after failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-DROP TABLE t1;
-# Same test under LOCK TABLE
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-LOCK TABLE t1 WRITE;
-ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
-(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
-PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
-ERROR HY000: Unknown error
-# State after failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-UNLOCK TABLES;
-DROP TABLE t1;
-SET SESSION debug_dbug=@save_dbug;
-SET SESSION debug_dbug="+d,fail_change_partition_5";
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
-(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
-PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
-ERROR HY000: Unknown error
-# State after failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-DROP TABLE t1;
-# Same test under LOCK TABLE
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-LOCK TABLE t1 WRITE;
-ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
-(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
-PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
-ERROR HY000: Unknown error
-# State after failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-UNLOCK TABLES;
-DROP TABLE t1;
-SET SESSION debug_dbug=@save_dbug;
-SET SESSION debug_dbug="+d,fail_change_partition_6";
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
-(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
-PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
-ERROR HY000: Unknown error
-# State after failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-DROP TABLE t1;
-# Same test under LOCK TABLE
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-LOCK TABLE t1 WRITE;
-ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
-(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
-PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
-ERROR HY000: Unknown error
-# State after failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-UNLOCK TABLES;
-DROP TABLE t1;
-SET SESSION debug_dbug=@save_dbug;
-SET SESSION debug_dbug="+d,fail_change_partition_7";
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
-(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
-PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
-ERROR HY000: Unknown error
-# State after failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1#P#p20.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = InnoDB,
- PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-DROP TABLE t1;
-# Same test under LOCK TABLE
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-LOCK TABLE t1 WRITE;
-ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
-(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
-PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
-ERROR HY000: Unknown error
-# State after failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1#P#p20.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = InnoDB,
- PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-UNLOCK TABLES;
-DROP TABLE t1;
-SET SESSION debug_dbug=@save_dbug;
-SET SESSION debug_dbug="+d,fail_change_partition_8";
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
-(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
-PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
-ERROR HY000: Unknown error
-# State after failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1#P#p20.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = InnoDB,
- PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-DROP TABLE t1;
-# Same test under LOCK TABLE
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-LOCK TABLE t1 WRITE;
-ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
-(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
-PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
-ERROR HY000: Unknown error
-# State after failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1#P#p20.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = InnoDB,
- PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-UNLOCK TABLES;
-DROP TABLE t1;
-SET SESSION debug_dbug=@save_dbug;
-SET SESSION debug_dbug="+d,fail_change_partition_9";
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
-(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
-PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
-ERROR HY000: Unknown error
-# State after failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1#P#p20.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = InnoDB,
- PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-DROP TABLE t1;
-# Same test under LOCK TABLE
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-LOCK TABLE t1 WRITE;
-ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
-(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
-PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
-ERROR HY000: Unknown error
-# State after failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1#P#p20.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = InnoDB,
- PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-UNLOCK TABLES;
-DROP TABLE t1;
-SET SESSION debug_dbug=@save_dbug;
-SET SESSION debug_dbug="+d,fail_change_partition_10";
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
-(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
-PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
-ERROR HY000: Unknown error
-# State after failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1#P#p20.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = InnoDB,
- PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-DROP TABLE t1;
-# Same test under LOCK TABLE
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-LOCK TABLE t1 WRITE;
-ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
-(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
-PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
-ERROR HY000: Unknown error
-# State after failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1#P#p20.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = InnoDB,
- PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-UNLOCK TABLES;
-DROP TABLE t1;
-SET SESSION debug_dbug=@save_dbug;
-SET SESSION debug_dbug="+d,fail_change_partition_11";
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
-(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
-PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
-ERROR HY000: Unknown error
-# State after failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1#P#p20.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = InnoDB,
- PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-DROP TABLE t1;
-# Same test under LOCK TABLE
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-LOCK TABLE t1 WRITE;
-ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
-(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
-PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
-ERROR HY000: Unknown error
-# State after failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1#P#p20.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = InnoDB,
- PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-UNLOCK TABLES;
-DROP TABLE t1;
-SET SESSION debug_dbug=@save_dbug;
-SET SESSION debug_dbug="+d,fail_change_partition_12";
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
-(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
-PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
-ERROR HY000: Unknown error
-# State after failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1#P#p20.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = InnoDB,
- PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-DROP TABLE t1;
-# Same test under LOCK TABLE
-CREATE TABLE t1 (a INT, b VARCHAR(64))
-ENGINE = 'InnoDB'
-PARTITION BY LIST (a)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
-PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
-INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-LOCK TABLE t1 WRITE;
-ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
-(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
-PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
-ERROR HY000: Unknown error
-# State after failure
-db.opt
-t1#P#p0.ibd
-t1#P#p10.ibd
-t1#P#p20.ibd
-t1.frm
-t1.par
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`a`)
-(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = InnoDB,
- PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = InnoDB,
- PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = InnoDB)
-SELECT * FROM t1;
-a b
-1 Original from partition p0
-11 Original from partition p1
-12 Original from partition p1
-13 Original from partition p1
-14 Original from partition p1
-2 Original from partition p0
-3 Original from partition p0
-4 Original from partition p0
-UNLOCK TABLES;
-DROP TABLE t1;
-SET SESSION debug_dbug=@save_dbug;
+call mtr.add_suppression("table .* does not exist in the InnoDB internal");
#
# WL#4445: EXCHANGE PARTITION WITH TABLE
# Verify ddl_log and InnoDB in case of crashing.
@@ -6406,13 +388,7 @@ a b
ALTER TABLE t1 EXCHANGE PARTITION p0 WITH TABLE t2;
ERROR HY000: Lost connection to MySQL server during query
# State after crash (before recovery)
-#sqlx-nnnn_nnnn.ibd
-db.opt
-t1#P#p0.ibd
-t1#P#p1.ibd
-t1.frm
-t1.par
-t2.frm
+#sql-exchange.frm
# State after crash recovery
db.opt
t1#P#p0.ibd
@@ -6514,13 +490,7 @@ a b
ALTER TABLE t1 EXCHANGE PARTITION p0 WITH TABLE t2;
ERROR HY000: Lost connection to MySQL server during query
# State after crash (before recovery)
-#sqlx-nnnn_nnnn.ibd
-db.opt
-t1#P#p0.ibd
-t1#P#p1.ibd
-t1.frm
-t1.par
-t2.frm
+#sql-exchange.frm
# State after crash recovery
db.opt
t1#P#p0.ibd
@@ -6622,13 +592,7 @@ a b
ALTER TABLE t1 EXCHANGE PARTITION p0 WITH TABLE t2;
ERROR HY000: Lost connection to MySQL server during query
# State after crash (before recovery)
-#sqlx-nnnn_nnnn.ibd
-db.opt
-t1#P#p1.ibd
-t1.frm
-t1.par
-t2.frm
-t2.ibd
+#sql-exchange.ibd
# State after crash recovery
db.opt
t1#P#p0.ibd
@@ -6730,13 +694,7 @@ a b
ALTER TABLE t1 EXCHANGE PARTITION p0 WITH TABLE t2;
ERROR HY000: Lost connection to MySQL server during query
# State after crash (before recovery)
-#sqlx-nnnn_nnnn.ibd
-db.opt
-t1#P#p1.ibd
-t1.frm
-t1.par
-t2.frm
-t2.ibd
+#sql-exchange.ibd
# State after crash recovery
db.opt
t1#P#p0.ibd
@@ -7253,7 +1211,7 @@ a b
3 Original from partition p0
4 Original from partition p0
ALTER TABLE t1 EXCHANGE PARTITION p0 WITH TABLE t2;
-ERROR HY000: Error on rename of './test/t2' to './test/#sqlx-nnnn_nnnn' (errno: 0 "Internal error/check (Not system error)")
+ERROR HY000: Error on rename of './test/t2' to './test/#sql-exchange' (errno: 0 "Internal error/check (Not system error)")
# State after failure
db.opt
t1#P#p0.ibd
@@ -7653,7 +1611,7 @@ a b
3 Original from partition p0
4 Original from partition p0
ALTER TABLE t1 EXCHANGE PARTITION p0 WITH TABLE t2;
-ERROR HY000: Error on rename of './test/#sqlx-nnnn_nnnn' to './test/t1#P#p0' (errno: 0 "Internal error/check (Not system error)")
+ERROR HY000: Error on rename of './test/#sql-exchange' to './test/t1#P#p0' (errno: 0 "Internal error/check (Not system error)")
# State after failure
db.opt
t1#P#p0.ibd
diff --git a/mysql-test/suite/parts/r/partition_engine_innodb.result b/mysql-test/suite/parts/r/partition_engine_innodb.result
index 38221951ae8..0c10490f263 100644
--- a/mysql-test/suite/parts/r/partition_engine_innodb.result
+++ b/mysql-test/suite/parts/r/partition_engine_innodb.result
@@ -4303,7 +4303,7 @@ DROP TABLE t1;
#------------------------------------------------------------------------
# 6 Session default engine differs from engine used within create table
#------------------------------------------------------------------------
-SET SESSION storage_engine='MEMORY';
+SET SESSION default_storage_engine='MEMORY';
CREATE TABLE t1 (
f_int1 INTEGER DEFAULT 0,
f_int2 INTEGER DEFAULT 0,
@@ -5211,7 +5211,7 @@ TRUNCATE t1;
# check layout success: 1
# End usability test (inc/partition_check.inc)
DROP TABLE t1;
-SET SESSION storage_engine='InnoDB';
+SET SESSION default_storage_engine='InnoDB';
DROP VIEW IF EXISTS v1;
DROP TABLE IF EXISTS t1;
DROP TABLE IF EXISTS t0_aux;
diff --git a/mysql-test/suite/parts/r/partition_engine_myisam.result b/mysql-test/suite/parts/r/partition_engine_myisam.result
index 683729fa2f3..4fb756b7dce 100644
--- a/mysql-test/suite/parts/r/partition_engine_myisam.result
+++ b/mysql-test/suite/parts/r/partition_engine_myisam.result
@@ -4408,7 +4408,7 @@ DROP TABLE t1;
#------------------------------------------------------------------------
# 6 Session default engine differs from engine used within create table
#------------------------------------------------------------------------
-SET SESSION storage_engine='MEMORY';
+SET SESSION default_storage_engine='MEMORY';
CREATE TABLE t1 (
f_int1 INTEGER DEFAULT 0,
f_int2 INTEGER DEFAULT 0,
@@ -5332,7 +5332,7 @@ TRUNCATE t1;
# check layout success: 1
# End usability test (inc/partition_check.inc)
DROP TABLE t1;
-SET SESSION storage_engine='MyISAM';
+SET SESSION default_storage_engine='MyISAM';
DROP VIEW IF EXISTS v1;
DROP TABLE IF EXISTS t1;
DROP TABLE IF EXISTS t0_aux;
diff --git a/mysql-test/suite/parts/r/partition_open.result b/mysql-test/suite/parts/r/partition_open.result
index 98600d98ce3..a8ffac1109e 100644
--- a/mysql-test/suite/parts/r/partition_open.result
+++ b/mysql-test/suite/parts/r/partition_open.result
@@ -5,4 +5,4 @@ select * from t1 partition (p0);
ERROR HY000: Can't find file: './test/t1.MYI' (errno: 2 "No such file or directory")
drop table t1;
Warnings:
-Warning 1017 Can't find file: './test/t1.MYI' (errno: 2 "No such file or directory")
+Warning 1017 Can't find file: './test/t1.par' (errno: 2 "No such file or directory")
diff --git a/mysql-test/suite/parts/r/partition_special_innodb.result b/mysql-test/suite/parts/r/partition_special_innodb.result
index 01c6e1f9e64..37191eae502 100644
--- a/mysql-test/suite/parts/r/partition_special_innodb.result
+++ b/mysql-test/suite/parts/r/partition_special_innodb.result
@@ -236,6 +236,7 @@ DROP TABLE t1;
connect con1,localhost,root,,;
CREATE TABLE t1 ( i INT NOT NULL AUTO_INCREMENT PRIMARY KEY, f INT )
ENGINE = InnoDB PARTITION BY HASH(i) PARTITIONS 2;
+INSERT INTO t1 VALUES (2, 2), (3, 3), (4, 4), (5, 5);
connect con2,localhost,root,,;
SET lock_wait_timeout = 2;
connection con1;
@@ -249,6 +250,19 @@ ERROR HY000: Lock wait timeout exceeded; try restarting transaction
# Second attempt: says that partition already exists
ALTER TABLE t1 ADD PARTITION PARTITIONS 2;
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+# Check that we only can select, not insert/update/delete.
+INSERT INTO t1 VALUES (NULL, 6), (NULL, 7), (10, 10), (11, 11);
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+UPDATE t1 SET i = 5 WHERE f = 2;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+DELETE FROM t1 WHERE i = 10;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+SELECT * FROM t1;
+i f
+2 2
+3 3
+4 4
+5 5
connection con1;
# Connection 1 unlocks the table and locks it again:
UNLOCK TABLES;
@@ -335,3 +349,30 @@ PARTITION BY RANGE(f1) (PARTITION p1 VALUES LESS THAN(10),
PARTITION p2 VALUES LESS THAN (100));
ALTER TABLE t1 convert to charset ascii collate ascii_bin, ALGORITHM=INSTANT;
DROP TABLE t1;
+# Test WRITE LOCK.
+connect con1,localhost,root,,;
+CREATE TABLE t1 ( i INT NOT NULL AUTO_INCREMENT PRIMARY KEY, f INT )
+ENGINE = InnoDB PARTITION BY HASH(i) PARTITIONS 2;
+INSERT INTO t1 VALUES (3, 3), (4, 4);
+connect con2,localhost,root,,;
+SET lock_wait_timeout = 2;
+connection con1;
+#Connection 1 locks the table
+LOCK TABLE t1 WRITE;
+connection con2;
+# Check that we still can SELECT, but not insert/update/delete.
+# Check that we only can select, not insert/update/delete.
+INSERT INTO t1 VALUES (NULL, 1), (NULL, 2), (10, 10), (11, 11);
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+UPDATE t1 SET i = 5 WHERE f = 2;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+DELETE FROM t1 WHERE i = 10;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+SELECT * FROM t1;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+connection con1;
+UNLOCK TABLES;
+connection con2;
+DROP TABLE t1;
+disconnect con1;
+connection default;
diff --git a/mysql-test/suite/parts/r/partition_value_innodb.result b/mysql-test/suite/parts/r/partition_value_innodb.result
index 74843ba7e11..fa8ff21208b 100644
--- a/mysql-test/suite/parts/r/partition_value_innodb.result
+++ b/mysql-test/suite/parts/r/partition_value_innodb.result
@@ -1,5 +1,5 @@
SET @max_row = 20;
-SET @@session.storage_engine = 'InnoDB';
+SET @@session.default_storage_engine = 'InnoDB';
#------------------------------------------------------------------------
# There are several testcases disabled because of the open bugs
diff --git a/mysql-test/suite/parts/r/partition_value_myisam.result b/mysql-test/suite/parts/r/partition_value_myisam.result
index 0678b78819d..5005a93eeb3 100644
--- a/mysql-test/suite/parts/r/partition_value_myisam.result
+++ b/mysql-test/suite/parts/r/partition_value_myisam.result
@@ -1,5 +1,5 @@
SET @max_row = 20;
-SET @@session.storage_engine = 'MyISAM';
+SET @@session.default_storage_engine = 'MyISAM';
#------------------------------------------------------------------------
# There are several testcases disabled because of the open bugs
diff --git a/mysql-test/suite/parts/r/percona_nonflushing_analyze_debug.result b/mysql-test/suite/parts/r/percona_nonflushing_analyze_debug.result
new file mode 100644
index 00000000000..070d5e8d79f
--- /dev/null
+++ b/mysql-test/suite/parts/r/percona_nonflushing_analyze_debug.result
@@ -0,0 +1,68 @@
+CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB
+PARTITION BY RANGE (a) (
+PARTITION p0 VALUES LESS THAN (3),
+PARTITION p1 VALUES LESS THAN (10));
+INSERT INTO t1 VALUES (1), (2), (3), (4);
+connect con1,localhost,root;
+SET DEBUG_SYNC="handler_ha_index_next_end SIGNAL idx_scan_in_progress WAIT_FOR finish_scan";
+SELECT * FROM t1;
+connection default;
+SET DEBUG_SYNC="now WAIT_FOR idx_scan_in_progress";
+set @tmp=@@use_stat_tables;
+set use_stat_tables='preferably_for_queries';
+ANALYZE TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status OK
+set use_stat_tables=@tmp;
+SELECT * FROM t1;
+a
+1
+2
+3
+4
+SET DEBUG_SYNC="now SIGNAL finish_scan";
+connection con1;
+a
+1
+2
+3
+4
+disconnect con1;
+connection default;
+SET DEBUG_SYNC='reset';
+DROP TABLE t1;
+CREATE TABLE t2 (a INT PRIMARY KEY) ENGINE=InnoDB
+PARTITION BY RANGE (a)
+SUBPARTITION BY HASH (A)
+SUBPARTITIONS 2 (
+PARTITION p0 VALUES LESS THAN (3),
+PARTITION p1 VALUES LESS THAN (10));
+INSERT INTO t2 VALUES (1), (2), (3), (4);
+connect con1,localhost,root;
+SET DEBUG_SYNC="handler_ha_index_next_end SIGNAL idx_scan_in_progress WAIT_FOR finish_scan";
+SELECT * FROM t2;
+connection default;
+SET DEBUG_SYNC="now WAIT_FOR idx_scan_in_progress";
+set @tmp=@@use_stat_tables;
+set use_stat_tables='preferably_for_queries';
+ANALYZE TABLE t2;
+Table Op Msg_type Msg_text
+test.t2 analyze status OK
+set use_stat_tables=@tmp;
+SELECT * FROM t2;
+a
+1
+2
+3
+4
+SET DEBUG_SYNC="now SIGNAL finish_scan";
+connection con1;
+a
+1
+2
+3
+4
+disconnect con1;
+connection default;
+SET DEBUG_SYNC='reset';
+DROP TABLE t2;
diff --git a/mysql-test/suite/parts/t/alter_table.test b/mysql-test/suite/parts/t/alter_table.test
new file mode 100644
index 00000000000..53b61806acb
--- /dev/null
+++ b/mysql-test/suite/parts/t/alter_table.test
@@ -0,0 +1,40 @@
+#
+# General errors with ALTER TABLE and partitions that doesn't have to be run
+# on all engines
+#
+
+--source include/have_partition.inc
+
+#
+# MDEV-22649 SIGSEGV in ha_partition::create_partitioning_metadata on ALTER
+#
+
+set @save_alter_algorithm= @@session.alter_algorithm;
+SET SESSION alter_algorithm=4;
+CREATE TABLE t1(a INT) engine=myisam PARTITION BY RANGE(a) SUBPARTITION BY KEY(a) (PARTITION p0 VALUES LESS THAN (10) (SUBPARTITION s0,SUBPARTITION s1), PARTITION p1 VALUES LESS THAN (20) (SUBPARTITION s2,SUBPARTITION s3));
+show create table t1;
+--error ER_ALTER_OPERATION_NOT_SUPPORTED
+ALTER TABLE t1 ADD COLUMN c INT;
+DROP table if exists t1;
+set @@session.alter_algorithm= @save_alter_algorithm;
+
+
+#
+# MDEV-22804 SIGSEGV in ha_partition::create_partitioning_metadata |
+# ERROR 1507 (HY000): Error in list of partitions to DROP
+#
+
+CREATE TABLE t1 (a INT) PARTITION BY RANGE(a) SUBPARTITION BY HASH(a) (PARTITION p VALUES LESS THAN (5) (SUBPARTITION sp, SUBPARTITION sp1), PARTITION p1 VALUES LESS THAN MAXVALUE (SUBPARTITION sp2, SUBPARTITION sp3));
+ALTER TABLE t1 DROP PARTITION p;
+DROP TABLE if exists t1;
+
+#
+# MDEV-23357 Server crashes in Sql_cmd_alter_table_exchange_partition::exchange_partition
+#
+CREATE TABLE t1 (i INT);
+CREATE VIEW v1 as SELECT * FROM t1;
+CREATE TABLE t2 (i INT);
+--error ER_CHECK_NO_SUCH_TABLE
+ALTER TABLE v1 EXCHANGE PARTITION p2 WITH TABLE t2 ;
+DROP VIEW v1;
+DROP TABLE t1, t2;
diff --git a/mysql-test/suite/parts/t/debug_innodb_crash-master.opt b/mysql-test/suite/parts/t/debug_innodb_crash-master.opt
new file mode 100644
index 00000000000..b7f94e14e12
--- /dev/null
+++ b/mysql-test/suite/parts/t/debug_innodb_crash-master.opt
@@ -0,0 +1 @@
+--loose-innodb-file-per-table=1 --loose-skip-stack-trace --skip-core-file --loose-innodb-buffer-pool-size=32M
diff --git a/mysql-test/suite/parts/t/debug_innodb_crash.test b/mysql-test/suite/parts/t/debug_innodb_crash.test
new file mode 100644
index 00000000000..e06b3c3b254
--- /dev/null
+++ b/mysql-test/suite/parts/t/debug_innodb_crash.test
@@ -0,0 +1,22 @@
+# Partitioning test that require debug features and InnoDB
+
+--source include/have_debug.inc
+--source include/have_innodb.inc
+--source include/have_partition.inc
+--source include/not_valgrind.inc
+--source include/not_embedded.inc
+
+# Checking with #innodb what this is...
+call mtr.add_suppression("InnoDB: Warning: allocated tablespace .*, old maximum was");
+# If there is a crash or failure between the ddl_log is written and the
+# operation is completed, mysql will try to drop a not yet created partition
+call mtr.add_suppression("table .* does not exist in the InnoDB internal");
+call mtr.add_suppression("InnoDB: Warning: MySQL is trying to drop table ");
+
+--let $DATADIR= `SELECT @@datadir;`
+
+let $engine= 'InnoDB';
+
+--echo # Test crash recovery in fast_alter_partition_table.
+let $do_crash=1;
+--source suite/parts/inc/partition_mgm_crash.inc
diff --git a/mysql-test/suite/parts/t/debug_innodb_fail-master.opt b/mysql-test/suite/parts/t/debug_innodb_fail-master.opt
new file mode 100644
index 00000000000..8f8c9e5f588
--- /dev/null
+++ b/mysql-test/suite/parts/t/debug_innodb_fail-master.opt
@@ -0,0 +1 @@
+--loose-innodb-file-per-table=1 --loose-innodb-buffer-pool-size=32M
diff --git a/mysql-test/suite/parts/t/debug_innodb_fail.test b/mysql-test/suite/parts/t/debug_innodb_fail.test
new file mode 100644
index 00000000000..d0e827a3fc6
--- /dev/null
+++ b/mysql-test/suite/parts/t/debug_innodb_fail.test
@@ -0,0 +1,22 @@
+# Partitioning test that require debug features and InnoDB
+
+--source include/have_debug.inc
+--source include/have_innodb.inc
+--source include/have_partition.inc
+--source include/not_embedded.inc
+
+# Checking with #innodb what this is...
+call mtr.add_suppression("InnoDB: Warning: allocated tablespace .*, old maximum was");
+# If there is a crash or failure between the ddl_log is written and the
+# operation is completed, mysql will try to drop a not yet created partition
+call mtr.add_suppression("table .* does not exist in the InnoDB internal");
+call mtr.add_suppression("InnoDB: Warning: MySQL is trying to drop table ");
+
+
+--let $DATADIR= `SELECT @@datadir;`
+
+let $engine= 'InnoDB';
+
+--echo # Test failure recovery in fast_alter_partition_table.
+let $do_fail=1;
+--source suite/parts/inc/partition_mgm_crash.inc
diff --git a/mysql-test/suite/parts/t/debug_myisam_crash-master.opt b/mysql-test/suite/parts/t/debug_myisam_crash-master.opt
new file mode 100644
index 00000000000..826d7c97aae
--- /dev/null
+++ b/mysql-test/suite/parts/t/debug_myisam_crash-master.opt
@@ -0,0 +1 @@
+--loose-skip-stack-trace --skip-core-file --myisam-recover-options=off
diff --git a/mysql-test/suite/parts/t/partition_debug_myisam.test b/mysql-test/suite/parts/t/debug_myisam_crash.test
index 7626be602db..0b0748007e9 100644
--- a/mysql-test/suite/parts/t/partition_debug_myisam.test
+++ b/mysql-test/suite/parts/t/debug_myisam_crash.test
@@ -10,5 +10,6 @@
let $engine= 'MyISAM';
---echo # Test crash and failure recovery in fast_alter_partition_table.
+--echo # Test crash in fast_alter_partition_table.
+let $do_crash=1;
--source suite/parts/inc/partition_mgm_crash.inc
diff --git a/mysql-test/suite/parts/t/debug_myisam_fail-master.opt b/mysql-test/suite/parts/t/debug_myisam_fail-master.opt
new file mode 100644
index 00000000000..c5f16ccfd5b
--- /dev/null
+++ b/mysql-test/suite/parts/t/debug_myisam_fail-master.opt
@@ -0,0 +1 @@
+--myisam-recover-options=off
diff --git a/mysql-test/suite/parts/t/debug_myisam_fail.test b/mysql-test/suite/parts/t/debug_myisam_fail.test
new file mode 100644
index 00000000000..d4b9a5871d9
--- /dev/null
+++ b/mysql-test/suite/parts/t/debug_myisam_fail.test
@@ -0,0 +1,14 @@
+# Partitioning test that require debug features
+# including crashing tests.
+
+--source include/have_debug.inc
+--source include/have_partition.inc
+--source include/not_embedded.inc
+
+--let $DATADIR= `SELECT @@datadir;`
+
+let $engine= 'MyISAM';
+
+--echo # Test failures in fast_alter_partition_table.
+let $do_fail=1;
+--source suite/parts/inc/partition_mgm_crash.inc
diff --git a/mysql-test/suite/parts/t/longname.test b/mysql-test/suite/parts/t/longname.test
index 0fe45d0d5ff..ab6137d56dd 100644
--- a/mysql-test/suite/parts/t/longname.test
+++ b/mysql-test/suite/parts/t/longname.test
@@ -52,6 +52,14 @@ INSERT INTO mysqltest1.t1 VALUES(1);
--error ER_WRONG_TABLE_NAME
DROP TABLE mysqltest1.`#mysql50#t1#P#@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024#SP#0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef`;
+--error ER_FEATURE_NOT_SUPPORTED_WITH_PARTITIONING
+ALTER TABLE mysqltest1.t1 ADD FOREIGN KEY (a) REFERENCES
+mysqltest1.test_jfg_table_name_with_64_chars_123456789012345678901234567890;
+--error ER_FEATURE_NOT_SUPPORTED_WITH_PARTITIONING
+ALTER TABLE
+mysqltest1.test_jfg_table_name_with_64_chars_123456789012345678901234567890
+ADD FOREIGN KEY (a) REFERENCES mysqltest1.t1;
+
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES
WHERE NAME LIKE 'mysqltest1%';
diff --git a/mysql-test/suite/parts/t/partition_basic_symlink_innodb.test b/mysql-test/suite/parts/t/partition_basic_symlink_innodb.test
index 31448c7a9fe..e6b2f4300cc 100644
--- a/mysql-test/suite/parts/t/partition_basic_symlink_innodb.test
+++ b/mysql-test/suite/parts/t/partition_basic_symlink_innodb.test
@@ -39,17 +39,11 @@
# Does not work with --embedded
--source include/not_embedded.inc
---disable_query_log
let $MYSQLD_DATADIR= `select @@datadir`;
# These values can change during the test
-LET $innodb_file_per_table_orig=`select @@innodb_file_per_table`;
-LET $innodb_strict_mode_orig=`select @@session.innodb_strict_mode`;
---enable_query_log
-
---disable_warnings
-DROP TABLE IF EXISTS t1;
---enable_warnings
+SET @file_per_table= @@GLOBAL.innodb_file_per_table;
+SET @strict_mode= @@SESSION.innodb_strict_mode;
--mkdir $MYSQLTEST_VARDIR/mysql-test-data-dir
--mkdir $MYSQLTEST_VARDIR/mysql-test-idx-dir
@@ -99,9 +93,17 @@ SHOW WARNINGS;
--echo # Verifying .frm, .par, .isl & .ibd files
--echo ---- MYSQLD_DATADIR/test
---list_files $MYSQLD_DATADIR/test
+--let $regexp=/#sql-ib[0-9a-f]+\.ibd\n//
+--list_files_write_file $MYSQLD_DATADIR.files.txt $MYSQLD_DATADIR/test
+--replace_regex $regexp
+--cat_file $MYSQLD_DATADIR.files.txt
+--remove_file $MYSQLD_DATADIR.files.txt
--echo ---- MYSQLTEST_VARDIR/mysql-test-data-dir/test
---list_files $MYSQLTEST_VARDIR/mysql-test-data-dir/test
+--let $regexp=/#sql-ib[0-9a-f]+\.ibd\n//
+--list_files_write_file $MYSQLTEST_VARDIR/files.txt $MYSQLTEST_VARDIR/mysql-test-data-dir/test
+--replace_regex $regexp
+--cat_file $MYSQLTEST_VARDIR/files.txt
+--remove_file $MYSQLTEST_VARDIR/files.txt
--echo # The ibd tablespaces should not be directly under the DATA DIRECTORY
--echo ---- MYSQLTEST_VARDIR/mysql-test-data-dir
--list_files $MYSQLTEST_VARDIR/mysql-test-data-dir
@@ -120,8 +122,11 @@ ALTER TABLE t1 engine=MyISAM;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
SHOW CREATE TABLE t1;
--echo # Verifying .frm, .par and MyISAM files (.MYD, MYI)
---echo ---- MYSQLD_DATADIR/test
---list_files $MYSQLD_DATADIR/test
+--let $regexp=/#sql-ib[0-9a-f]+\.ibd\n//
+--list_files_write_file $MYSQLD_DATADIR.files.txt $MYSQLD_DATADIR/test
+--replace_regex $regexp
+--cat_file $MYSQLD_DATADIR.files.txt
+--remove_file $MYSQLD_DATADIR.files.txt
--echo ---- MYSQLTEST_VARDIR/mysql-test-data-dir
--list_files $MYSQLTEST_VARDIR/mysql-test-data-dir
--echo ---- MYSQLTEST_VARDIR/mysql-test-idx-dir
@@ -137,13 +142,21 @@ ALTER TABLE t1 engine=InnoDB;
SHOW CREATE TABLE t1;
--echo # Verifying .frm, .par, .isl and InnoDB .ibd files
--echo ---- MYSQLD_DATADIR/test
---list_files $MYSQLD_DATADIR/test
+--let $regexp=/#sql-ib[0-9a-f]+\.ibd\n//
+--list_files_write_file $MYSQLD_DATADIR.files.txt $MYSQLD_DATADIR/test
+--replace_regex $regexp
+--cat_file $MYSQLD_DATADIR.files.txt
+--remove_file $MYSQLD_DATADIR.files.txt
--echo ---- MYSQLTEST_VARDIR/mysql-test-data-dir
--list_files $MYSQLTEST_VARDIR/mysql-test-data-dir
--echo ---- MYSQLTEST_VARDIR/mysql-test-idx-dir
--list_files $MYSQLTEST_VARDIR/mysql-test-idx-dir
--echo ---- MYSQLTEST_VARDIR/mysql-test-data-dir/test
---list_files $MYSQLTEST_VARDIR/mysql-test-data-dir/test
+--let $regexp=/#sql-ib[0-9a-f]+\.ibd\n//
+--list_files_write_file $MYSQLTEST_VARDIR/files.txt $MYSQLTEST_VARDIR/mysql-test-data-dir/test
+--replace_regex $regexp
+--cat_file $MYSQLTEST_VARDIR/files.txt
+--remove_file $MYSQLTEST_VARDIR/files.txt
DROP TABLE t1;
@@ -175,7 +188,7 @@ eval CREATE TABLE t2
myval VARCHAR(10),
PRIMARY KEY (myid)
) ENGINE=INNODB DATA DIRECTORY = '$data_dir_path';
-
+
ALTER TABLE t1 EXCHANGE PARTITION p0001 WITH TABLE t2;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
@@ -205,7 +218,7 @@ eval CREATE TABLE t2
insert into t1 values (1, 'one');
insert into t2 values (2, 'two'), (3, 'threee'), (4, 'four');
-
+
select * from t1;
ALTER TABLE t1 EXCHANGE PARTITION p0001 WITH TABLE t2;
@@ -241,7 +254,7 @@ eval CREATE TABLE t2
insert into t1 values (1, 'one');
insert into t2 values (2, 'two'), (3, 'threee'), (4, 'four');
-
+
select * from t1;
ALTER TABLE t1 EXCHANGE PARTITION p0001 WITH TABLE t2;
@@ -277,7 +290,7 @@ eval CREATE TABLE t2
insert into t1 values (1, 'one');
insert into t2 values (2, 'two'), (3, 'threee'), (4, 'four');
-
+
select * from t1;
ALTER TABLE t1 EXCHANGE PARTITION p0001 WITH TABLE t2;
@@ -296,8 +309,5 @@ DROP TABLE t1, t2;
--rmdir $MYSQLTEST_VARDIR/mysql-test-data-dir
--rmdir $MYSQLTEST_VARDIR/mysql-test-idx-dir
---disable_query_log
-EVAL SET GLOBAL innodb_file_per_table=$innodb_file_per_table_orig;
-EVAL SET SESSION innodb_strict_mode=$innodb_strict_mode_orig;
---enable_query_log
-
+SET GLOBAL innodb_file_per_table=@file_per_table;
+SET SESSION innodb_strict_mode=@strict_mode;
diff --git a/mysql-test/suite/parts/t/partition_debug_innodb-master.opt b/mysql-test/suite/parts/t/partition_debug_innodb-master.opt
index 4fa3cb12e29..b7f94e14e12 100644
--- a/mysql-test/suite/parts/t/partition_debug_innodb-master.opt
+++ b/mysql-test/suite/parts/t/partition_debug_innodb-master.opt
@@ -1 +1 @@
---loose-innodb-file-per-table=1 --skip-stack-trace --skip-core-file --loose-innodb-buffer-pool-size=32M
+--loose-innodb-file-per-table=1 --loose-skip-stack-trace --skip-core-file --loose-innodb-buffer-pool-size=32M
diff --git a/mysql-test/suite/parts/t/partition_debug_innodb.test b/mysql-test/suite/parts/t/partition_debug_innodb.test
index 0d065d0e3f2..d34a426a269 100644
--- a/mysql-test/suite/parts/t/partition_debug_innodb.test
+++ b/mysql-test/suite/parts/t/partition_debug_innodb.test
@@ -4,7 +4,8 @@
--source include/have_debug.inc
--source include/have_innodb.inc
--source include/have_partition.inc
-# Don't test this under valgrind, memory leaks will occur
+# Don't test this under valgrind, memory leaks will occur. Also SIGKILL may
+# not get trough and the test will hang.
--source include/not_valgrind.inc
# Crash tests don't work with embedded
--source include/not_embedded.inc
@@ -57,13 +58,11 @@ call mtr.add_suppression("InnoDB: Warning: allocated tablespace .*, old maximum
# operation is completed, mysql will try to drop a not yet created partition
call mtr.add_suppression("InnoDB: Error: table .* does not exist in the InnoDB internal");
call mtr.add_suppression("InnoDB: Warning: MySQL is trying to drop table ");
+call mtr.add_suppression("table .* does not exist in the InnoDB internal");
let $engine= 'InnoDB';
---echo # Test crash and failure recovery in fast_alter_partition_table.
---source suite/parts/inc/partition_mgm_crash.inc
-
--echo #
--echo # WL#4445: EXCHANGE PARTITION WITH TABLE
--echo # Verify ddl_log and InnoDB in case of crashing.
diff --git a/mysql-test/suite/parts/t/partition_debug_myisam-master.opt b/mysql-test/suite/parts/t/partition_debug_myisam-master.opt
deleted file mode 100644
index eadc9396657..00000000000
--- a/mysql-test/suite/parts/t/partition_debug_myisam-master.opt
+++ /dev/null
@@ -1 +0,0 @@
---skip-stack-trace --skip-core-file --myisam-recover-options=off
diff --git a/mysql-test/suite/parts/t/partition_debug_sync_innodb.test b/mysql-test/suite/parts/t/partition_debug_sync_innodb.test
index d73333c3b8d..61eb48faa11 100644
--- a/mysql-test/suite/parts/t/partition_debug_sync_innodb.test
+++ b/mysql-test/suite/parts/t/partition_debug_sync_innodb.test
@@ -52,7 +52,11 @@ insert into t1 values (1), (11), (21), (33);
SELECT * FROM t1;
SHOW CREATE TABLE t1;
--replace_result #p# #P# #sp# #SP#
---list_files $MYSQLD_DATADIR/test
+--let $regexp=/#sql-ib[0-9a-f]+\.ibd\n//
+--list_files_write_file $MYSQLD_DATADIR.files.txt $MYSQLD_DATADIR/test
+--replace_regex $regexp
+--cat_file $MYSQLD_DATADIR.files.txt
+--remove_file $MYSQLD_DATADIR.files.txt
SET DEBUG_SYNC='before_open_in_get_all_tables SIGNAL parked WAIT_FOR open';
SET DEBUG_SYNC='partition_open_error SIGNAL alter WAIT_FOR finish';
diff --git a/mysql-test/suite/parts/t/partition_special_innodb.test b/mysql-test/suite/parts/t/partition_special_innodb.test
index ef7cf4bd4cf..a25feed08ef 100644
--- a/mysql-test/suite/parts/t/partition_special_innodb.test
+++ b/mysql-test/suite/parts/t/partition_special_innodb.test
@@ -83,6 +83,7 @@ DROP TABLE t1;
--connect (con1,localhost,root,,)
CREATE TABLE t1 ( i INT NOT NULL AUTO_INCREMENT PRIMARY KEY, f INT )
ENGINE = InnoDB PARTITION BY HASH(i) PARTITIONS 2;
+INSERT INTO t1 VALUES (2, 2), (3, 3), (4, 4), (5, 5);
--connect (con2,localhost,root,,)
SET lock_wait_timeout = 2;
@@ -99,6 +100,15 @@ ALTER TABLE t1 ADD PARTITION PARTITIONS 2;
--echo # Second attempt: says that partition already exists
--error ER_LOCK_WAIT_TIMEOUT
ALTER TABLE t1 ADD PARTITION PARTITIONS 2;
+--echo # Check that we only can select, not insert/update/delete.
+--error ER_LOCK_WAIT_TIMEOUT
+INSERT INTO t1 VALUES (NULL, 6), (NULL, 7), (10, 10), (11, 11);
+--error ER_LOCK_WAIT_TIMEOUT
+UPDATE t1 SET i = 5 WHERE f = 2;
+--error ER_LOCK_WAIT_TIMEOUT
+DELETE FROM t1 WHERE i = 10;
+--sorted_result
+SELECT * FROM t1;
--connection con1
--echo # Connection 1 unlocks the table and locks it again:
@@ -215,3 +225,37 @@ CREATE TABLE t1(
PARTITION p2 VALUES LESS THAN (100));
ALTER TABLE t1 convert to charset ascii collate ascii_bin, ALGORITHM=INSTANT;
DROP TABLE t1;
+
+--echo # Test WRITE LOCK.
+--connect (con1,localhost,root,,)
+CREATE TABLE t1 ( i INT NOT NULL AUTO_INCREMENT PRIMARY KEY, f INT )
+ ENGINE = InnoDB PARTITION BY HASH(i) PARTITIONS 2;
+INSERT INTO t1 VALUES (3, 3), (4, 4);
+
+--connect (con2,localhost,root,,)
+SET lock_wait_timeout = 2;
+
+--connection con1
+--echo #Connection 1 locks the table
+LOCK TABLE t1 WRITE;
+
+--connection con2
+--echo # Check that we still can SELECT, but not insert/update/delete.
+--echo # Check that we only can select, not insert/update/delete.
+--error ER_LOCK_WAIT_TIMEOUT
+INSERT INTO t1 VALUES (NULL, 1), (NULL, 2), (10, 10), (11, 11);
+--error ER_LOCK_WAIT_TIMEOUT
+UPDATE t1 SET i = 5 WHERE f = 2;
+--error ER_LOCK_WAIT_TIMEOUT
+DELETE FROM t1 WHERE i = 10;
+--error ER_LOCK_WAIT_TIMEOUT
+SELECT * FROM t1;
+
+--connection con1
+UNLOCK TABLES;
+
+--connection con2
+DROP TABLE t1;
+
+--disconnect con1
+--connection default
diff --git a/mysql-test/suite/parts/t/percona_nonflushing_analyze_debug.test b/mysql-test/suite/parts/t/percona_nonflushing_analyze_debug.test
new file mode 100644
index 00000000000..61c0a278ebb
--- /dev/null
+++ b/mysql-test/suite/parts/t/percona_nonflushing_analyze_debug.test
@@ -0,0 +1,29 @@
+--source include/have_debug_sync.inc
+--source include/have_innodb.inc
+--source include/have_partition.inc
+
+CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB
+ PARTITION BY RANGE (a) (
+ PARTITION p0 VALUES LESS THAN (3),
+ PARTITION p1 VALUES LESS THAN (10));
+
+INSERT INTO t1 VALUES (1), (2), (3), (4);
+
+--let $percona_nonflushing_analyze_table= t1
+--source include/percona_nonflushing_analyze_debug.inc
+
+DROP TABLE t1;
+
+CREATE TABLE t2 (a INT PRIMARY KEY) ENGINE=InnoDB
+ PARTITION BY RANGE (a)
+ SUBPARTITION BY HASH (A)
+ SUBPARTITIONS 2 (
+ PARTITION p0 VALUES LESS THAN (3),
+ PARTITION p1 VALUES LESS THAN (10));
+
+INSERT INTO t2 VALUES (1), (2), (3), (4);
+
+--let $percona_nonflushing_analyze_table= t2
+--source include/percona_nonflushing_analyze_debug.inc
+
+DROP TABLE t2;
diff --git a/mysql-test/suite/perfschema/disabled.def b/mysql-test/suite/perfschema/disabled.def
index 321cd7dcd16..9c36708729a 100644
--- a/mysql-test/suite/perfschema/disabled.def
+++ b/mysql-test/suite/perfschema/disabled.def
@@ -24,3 +24,34 @@ binlog_ok_row: needs slave_relay_log_info
binlog_ok_stmt: needs slave_relay_log_info
server_init : Nirbhay TODO: Fix the test
+show_sanity:
+threads_mysql_freebsd:
+
+transaction_gtid: needs to be updated for MariaDB gtids
+
+ddl_replication_applier_status_by_worker: todo
+ddl_replication_connection_status: todo
+dml_replication_applier_status_by_worker: todo
+dml_replication_connection_status: todo
+
+dml_replication_group_member_stats: todo?
+ddl_replication_group_member_stats: todo?
+ddl_replication_group_members: todo?
+dml_replication_group_members: todo?
+replication_group_members: todo?
+replication_group_member_stats: todo?
+rpl_group_member_stats: todo?
+rpl_group_members: todo?
+
+ddl_session_variables: todo
+ddl_global_variables: todo
+ddl_variables_by_thread: todo
+dml_global_variables: todo
+dml_session_variables: todo
+dml_variables_by_thread: todo
+variables_by_thread: todo
+show_coverage: todo
+show_misc: todo
+show_plugin: todo
+
+status_reprepare:why P_S filters out Com_* variables?
diff --git a/mysql-test/suite/perfschema/include/binlog_edge_common.inc b/mysql-test/suite/perfschema/include/binlog_edge_common.inc
index 8092c9a5427..6ecd50afe08 100644
--- a/mysql-test/suite/perfschema/include/binlog_edge_common.inc
+++ b/mysql-test/suite/perfschema/include/binlog_edge_common.inc
@@ -148,7 +148,7 @@ drop table if exists marker_multi_delete;
use my_replicated_db;
insert into performance_schema.setup_actors
- values ('FOO', 'FOO', 'FOO');
+ values ('FOO', 'FOO', 'FOO', 'YES', 'YES');
--error 0, ER_BINLOG_STMT_MODE_AND_NO_REPL_TABLES
delete my_tx_table.*, performance_schema.setup_actors.*
@@ -157,7 +157,7 @@ delete my_tx_table.*, performance_schema.setup_actors.*
or performance_schema.setup_actors.role='FOO';
insert into performance_schema.setup_actors
- values ('BAR', 'BAR', 'BAR');
+ values ('BAR', 'BAR', 'BAR', 'YES', 'YES');
--error 0, ER_BINLOG_STMT_MODE_AND_NO_REPL_TABLES
delete my_non_tx_table.*, performance_schema.setup_actors.*
@@ -166,7 +166,7 @@ delete my_non_tx_table.*, performance_schema.setup_actors.*
or performance_schema.setup_actors.role='BAR';
insert into performance_schema.setup_actors
- values ('BAZ', 'BAZ', 'BAZ');
+ values ('BAZ', 'BAZ', 'BAZ', 'YES', 'YES');
--error 0, ER_BINLOG_STMT_MODE_AND_NO_REPL_TABLES
delete my_bh_table.*, performance_schema.setup_actors.*
@@ -184,5 +184,5 @@ drop database my_replicated_db;
# Restore performance_schema.setup_actors, damaged by this script
truncate table performance_schema.setup_actors;
-insert into performance_schema.setup_actors values ('%', '%', '%');
+insert into performance_schema.setup_actors values ('%', '%', '%', 'YES', 'YES');
diff --git a/mysql-test/suite/perfschema/include/event_aggregate_cleanup.inc b/mysql-test/suite/perfschema/include/event_aggregate_cleanup.inc
index c50394f748b..2cb8a69e4d6 100644
--- a/mysql-test/suite/perfschema/include/event_aggregate_cleanup.inc
+++ b/mysql-test/suite/perfschema/include/event_aggregate_cleanup.inc
@@ -36,6 +36,12 @@ drop prepare dump_statements_host;
drop prepare dump_statements_history;
drop prepare dump_statements_global;
+drop prepare dump_transactions_account;
+drop prepare dump_transactions_user;
+drop prepare dump_transactions_host;
+drop prepare dump_transactions_history;
+drop prepare dump_transactions_global;
+
drop prepare dump_users;
drop prepare dump_hosts;
drop prepare dump_accounts;
@@ -49,6 +55,7 @@ insert into performance_schema.setup_actors
select * from test.setup_actors;
drop table test.setup_actors;
drop table test.t1;
+drop function test.f;
update performance_schema.threads set instrumented='YES';
update performance_schema.setup_instruments set enabled='YES', timed='YES';
diff --git a/mysql-test/suite/perfschema/include/event_aggregate_load.inc b/mysql-test/suite/perfschema/include/event_aggregate_load.inc
index 68dbde276df..b27a3113318 100644
--- a/mysql-test/suite/perfschema/include/event_aggregate_load.inc
+++ b/mysql-test/suite/perfschema/include/event_aggregate_load.inc
@@ -21,19 +21,21 @@ execute dump_statements_user;
execute dump_statements_host;
execute dump_statements_global;
execute dump_statements_history;
+execute dump_transactions_account;
+execute dump_transactions_user;
+execute dump_transactions_host;
+execute dump_transactions_global;
+execute dump_transactions_history;
execute dump_accounts;
execute dump_users;
execute dump_hosts;
# Notes about this test
#
-# Each connect causes 2 wait/synch/mutex/sql/LOCK_connection_count events:
-# - 1 in mysqld.cc, create_new_thread(), for the main thread
-# - 1 in sql_connect.cc, check_user(), for the connected thread
# The main thread does not count for BY_ACCOUNT / BY_HOST.
# The user thread does count for BY_ACCOUNT, BY_HOST
#
-# Each get_lock() causes 1 wait/synch/mutex/sql/LOCK_user_locks
+# Each uuid_short() causes 1 wait/synch/mutex/sql/LOCK_uuid_generator
#
# To avoid noise from main, the background threads are disabled.
@@ -64,15 +66,23 @@ execute dump_statements_user;
execute dump_statements_host;
execute dump_statements_global;
execute dump_statements_history;
+execute dump_transactions_account;
+execute dump_transactions_user;
+execute dump_transactions_host;
+execute dump_transactions_global;
+execute dump_transactions_history;
execute dump_accounts;
execute dump_users;
execute dump_hosts;
--connection con1
-select get_lock("marker", 10);
-select release_lock("marker");
+select uuid_short() <> 1;
+select uuid_short() <> 1;
+start transaction;
insert into test.t1 values ("marker");
+commit;
+select test.f(10,20);
--connection default
@@ -99,6 +109,11 @@ execute dump_statements_user;
execute dump_statements_host;
execute dump_statements_global;
execute dump_statements_history;
+execute dump_transactions_account;
+execute dump_transactions_user;
+execute dump_transactions_host;
+execute dump_transactions_global;
+execute dump_transactions_history;
execute dump_accounts;
execute dump_users;
execute dump_hosts;
@@ -134,15 +149,23 @@ execute dump_statements_user;
execute dump_statements_host;
execute dump_statements_global;
execute dump_statements_history;
+execute dump_transactions_account;
+execute dump_transactions_user;
+execute dump_transactions_host;
+execute dump_transactions_global;
+execute dump_transactions_history;
execute dump_accounts;
execute dump_users;
execute dump_hosts;
--connection con2
-select get_lock("marker", 10);
-select release_lock("marker");
+select uuid_short() <> 1;
+select uuid_short() <> 1;
+start transaction;
insert into test.t1 values ("marker");
+commit;
+select test.f(10,20);
--connection default
@@ -169,6 +192,11 @@ execute dump_statements_user;
execute dump_statements_host;
execute dump_statements_global;
execute dump_statements_history;
+execute dump_transactions_account;
+execute dump_transactions_user;
+execute dump_transactions_host;
+execute dump_transactions_global;
+execute dump_transactions_history;
execute dump_accounts;
execute dump_users;
execute dump_hosts;
@@ -200,15 +228,23 @@ execute dump_statements_user;
execute dump_statements_host;
execute dump_statements_global;
execute dump_statements_history;
+execute dump_transactions_account;
+execute dump_transactions_user;
+execute dump_transactions_host;
+execute dump_transactions_global;
+execute dump_transactions_history;
execute dump_accounts;
execute dump_users;
execute dump_hosts;
--connection con3
-select get_lock("marker", 10);
-select release_lock("marker");
+select uuid_short() <> 1;
+select uuid_short() <> 1;
+start transaction;
insert into test.t1 values ("marker");
+commit;
+select test.f(10,20);
--connection default
@@ -235,6 +271,11 @@ execute dump_statements_user;
execute dump_statements_host;
execute dump_statements_global;
execute dump_statements_history;
+execute dump_transactions_account;
+execute dump_transactions_user;
+execute dump_transactions_host;
+execute dump_transactions_global;
+execute dump_transactions_history;
execute dump_accounts;
execute dump_users;
execute dump_hosts;
@@ -266,15 +307,23 @@ execute dump_statements_user;
execute dump_statements_host;
execute dump_statements_global;
execute dump_statements_history;
+execute dump_transactions_account;
+execute dump_transactions_user;
+execute dump_transactions_host;
+execute dump_transactions_global;
+execute dump_transactions_history;
execute dump_accounts;
execute dump_users;
execute dump_hosts;
--connection con4
-select get_lock("marker", 10);
-select release_lock("marker");
+select uuid_short() <> 1;
+select uuid_short() <> 1;
+start transaction;
insert into test.t1 values ("marker");
+commit;
+select test.f(10,20);
--connection default
@@ -301,6 +350,11 @@ execute dump_statements_user;
execute dump_statements_host;
execute dump_statements_global;
execute dump_statements_history;
+execute dump_transactions_account;
+execute dump_transactions_user;
+execute dump_transactions_host;
+execute dump_transactions_global;
+execute dump_transactions_history;
execute dump_accounts;
execute dump_users;
execute dump_hosts;
@@ -332,6 +386,11 @@ execute dump_statements_user;
execute dump_statements_host;
execute dump_statements_global;
execute dump_statements_history;
+execute dump_transactions_account;
+execute dump_transactions_user;
+execute dump_transactions_host;
+execute dump_transactions_global;
+execute dump_transactions_history;
execute dump_accounts;
execute dump_users;
execute dump_hosts;
@@ -363,6 +422,11 @@ execute dump_statements_user;
execute dump_statements_host;
execute dump_statements_global;
execute dump_statements_history;
+execute dump_transactions_account;
+execute dump_transactions_user;
+execute dump_transactions_host;
+execute dump_transactions_global;
+execute dump_transactions_history;
execute dump_accounts;
execute dump_users;
execute dump_hosts;
@@ -394,6 +458,11 @@ execute dump_statements_user;
execute dump_statements_host;
execute dump_statements_global;
execute dump_statements_history;
+execute dump_transactions_account;
+execute dump_transactions_user;
+execute dump_transactions_host;
+execute dump_transactions_global;
+execute dump_transactions_history;
execute dump_accounts;
execute dump_users;
execute dump_hosts;
@@ -425,6 +494,11 @@ execute dump_statements_user;
execute dump_statements_host;
execute dump_statements_global;
execute dump_statements_history;
+execute dump_transactions_account;
+execute dump_transactions_user;
+execute dump_transactions_host;
+execute dump_transactions_global;
+execute dump_transactions_history;
execute dump_accounts;
execute dump_users;
execute dump_hosts;
@@ -452,6 +526,11 @@ execute dump_statements_user;
execute dump_statements_host;
execute dump_statements_global;
execute dump_statements_history;
+execute dump_transactions_account;
+execute dump_transactions_user;
+execute dump_transactions_host;
+execute dump_transactions_global;
+execute dump_transactions_history;
execute dump_accounts;
execute dump_users;
execute dump_hosts;
@@ -477,6 +556,11 @@ execute dump_statements_user;
execute dump_statements_host;
execute dump_statements_global;
execute dump_statements_history;
+execute dump_transactions_account;
+execute dump_transactions_user;
+execute dump_transactions_host;
+execute dump_transactions_global;
+execute dump_transactions_history;
execute dump_accounts;
execute dump_users;
execute dump_hosts;
@@ -502,6 +586,11 @@ execute dump_statements_user;
execute dump_statements_host;
execute dump_statements_global;
execute dump_statements_history;
+execute dump_transactions_account;
+execute dump_transactions_user;
+execute dump_transactions_host;
+execute dump_transactions_global;
+execute dump_transactions_history;
execute dump_accounts;
execute dump_users;
execute dump_hosts;
@@ -527,6 +616,11 @@ execute dump_statements_user;
execute dump_statements_host;
execute dump_statements_global;
execute dump_statements_history;
+execute dump_transactions_account;
+execute dump_transactions_user;
+execute dump_transactions_host;
+execute dump_transactions_global;
+execute dump_transactions_history;
execute dump_accounts;
execute dump_users;
execute dump_hosts;
@@ -552,6 +646,11 @@ execute dump_statements_user;
execute dump_statements_host;
execute dump_statements_global;
execute dump_statements_history;
+execute dump_transactions_account;
+execute dump_transactions_user;
+execute dump_transactions_host;
+execute dump_transactions_global;
+execute dump_transactions_history;
execute dump_accounts;
execute dump_users;
execute dump_hosts;
@@ -577,6 +676,11 @@ execute dump_statements_user;
execute dump_statements_host;
execute dump_statements_global;
execute dump_statements_history;
+execute dump_transactions_account;
+execute dump_transactions_user;
+execute dump_transactions_host;
+execute dump_transactions_global;
+execute dump_transactions_history;
execute dump_accounts;
execute dump_users;
execute dump_hosts;
@@ -602,6 +706,11 @@ execute dump_statements_user;
execute dump_statements_host;
execute dump_statements_global;
execute dump_statements_history;
+execute dump_transactions_account;
+execute dump_transactions_user;
+execute dump_transactions_host;
+execute dump_transactions_global;
+execute dump_transactions_history;
execute dump_accounts;
execute dump_users;
execute dump_hosts;
@@ -627,6 +736,11 @@ execute dump_statements_user;
execute dump_statements_host;
execute dump_statements_global;
execute dump_statements_history;
+execute dump_transactions_account;
+execute dump_transactions_user;
+execute dump_transactions_host;
+execute dump_transactions_global;
+execute dump_transactions_history;
execute dump_accounts;
execute dump_users;
execute dump_hosts;
@@ -652,6 +766,11 @@ execute dump_statements_user;
execute dump_statements_host;
execute dump_statements_global;
execute dump_statements_history;
+execute dump_transactions_account;
+execute dump_transactions_user;
+execute dump_transactions_host;
+execute dump_transactions_global;
+execute dump_transactions_history;
execute dump_accounts;
execute dump_users;
execute dump_hosts;
@@ -677,6 +796,11 @@ execute dump_statements_user;
execute dump_statements_host;
execute dump_statements_global;
execute dump_statements_history;
+execute dump_transactions_account;
+execute dump_transactions_user;
+execute dump_transactions_host;
+execute dump_transactions_global;
+execute dump_transactions_history;
execute dump_accounts;
execute dump_users;
execute dump_hosts;
@@ -702,6 +826,11 @@ execute dump_statements_user;
execute dump_statements_host;
execute dump_statements_global;
execute dump_statements_history;
+execute dump_transactions_account;
+execute dump_transactions_user;
+execute dump_transactions_host;
+execute dump_transactions_global;
+execute dump_transactions_history;
execute dump_accounts;
execute dump_users;
execute dump_hosts;
@@ -727,6 +856,11 @@ execute dump_statements_user;
execute dump_statements_host;
execute dump_statements_global;
execute dump_statements_history;
+execute dump_transactions_account;
+execute dump_transactions_user;
+execute dump_transactions_host;
+execute dump_transactions_global;
+execute dump_transactions_history;
execute dump_accounts;
execute dump_users;
execute dump_hosts;
@@ -752,6 +886,11 @@ execute dump_statements_user;
execute dump_statements_host;
execute dump_statements_global;
execute dump_statements_history;
+execute dump_transactions_account;
+execute dump_transactions_user;
+execute dump_transactions_host;
+execute dump_transactions_global;
+execute dump_transactions_history;
execute dump_accounts;
execute dump_users;
execute dump_hosts;
@@ -777,6 +916,11 @@ execute dump_statements_user;
execute dump_statements_host;
execute dump_statements_global;
execute dump_statements_history;
+execute dump_transactions_account;
+execute dump_transactions_user;
+execute dump_transactions_host;
+execute dump_transactions_global;
+execute dump_transactions_history;
execute dump_accounts;
execute dump_users;
execute dump_hosts;
@@ -802,6 +946,161 @@ execute dump_statements_user;
execute dump_statements_host;
execute dump_statements_global;
execute dump_statements_history;
+execute dump_transactions_account;
+execute dump_transactions_user;
+execute dump_transactions_host;
+execute dump_transactions_global;
+execute dump_transactions_history;
+execute dump_accounts;
+execute dump_users;
+execute dump_hosts;
+
+truncate performance_schema.events_transactions_summary_by_thread_by_event_name;
+
+echo "================== TRANSACTIONS_BY_THREAD truncated ==================";
+
+echo "================== Step 29 ==================";
+call dump_thread();
+execute dump_waits_account;
+execute dump_waits_user;
+execute dump_waits_host;
+execute dump_waits_global;
+execute dump_waits_history;
+execute dump_stages_account;
+execute dump_stages_user;
+execute dump_stages_host;
+execute dump_stages_global;
+execute dump_stages_history;
+execute dump_statements_account;
+execute dump_statements_user;
+execute dump_statements_host;
+execute dump_statements_global;
+execute dump_statements_history;
+execute dump_transactions_account;
+execute dump_transactions_user;
+execute dump_transactions_host;
+execute dump_transactions_global;
+execute dump_transactions_history;
+execute dump_accounts;
+execute dump_users;
+execute dump_hosts;
+
+truncate performance_schema.events_transactions_summary_by_account_by_event_name;
+
+echo "================== TRANSACTIONS_BY_ACCOUNT truncated ==================";
+
+echo "================== Step 30 ==================";
+call dump_thread();
+execute dump_waits_account;
+execute dump_waits_user;
+execute dump_waits_host;
+execute dump_waits_global;
+execute dump_waits_history;
+execute dump_stages_account;
+execute dump_stages_user;
+execute dump_stages_host;
+execute dump_stages_global;
+execute dump_stages_history;
+execute dump_statements_account;
+execute dump_statements_user;
+execute dump_statements_host;
+execute dump_statements_global;
+execute dump_statements_history;
+execute dump_transactions_account;
+execute dump_transactions_user;
+execute dump_transactions_host;
+execute dump_transactions_global;
+execute dump_transactions_history;
+execute dump_accounts;
+execute dump_users;
+execute dump_hosts;
+
+truncate performance_schema.events_transactions_summary_by_user_by_event_name;
+
+echo "================== TRANSACTIONS_BY_USER truncated ==================";
+
+echo "================== Step 31 ==================";
+call dump_thread();
+execute dump_waits_account;
+execute dump_waits_user;
+execute dump_waits_host;
+execute dump_waits_global;
+execute dump_waits_history;
+execute dump_stages_account;
+execute dump_stages_user;
+execute dump_stages_host;
+execute dump_stages_global;
+execute dump_stages_history;
+execute dump_statements_account;
+execute dump_statements_user;
+execute dump_statements_host;
+execute dump_statements_global;
+execute dump_statements_history;
+execute dump_transactions_account;
+execute dump_transactions_user;
+execute dump_transactions_host;
+execute dump_transactions_global;
+execute dump_transactions_history;
+execute dump_accounts;
+execute dump_users;
+execute dump_hosts;
+
+truncate performance_schema.events_transactions_summary_by_host_by_event_name;
+
+echo "================== TRANSACTIONS_BY_HOST truncated ==================";
+
+echo "================== Step 32 ==================";
+call dump_thread();
+execute dump_waits_account;
+execute dump_waits_user;
+execute dump_waits_host;
+execute dump_waits_global;
+execute dump_waits_history;
+execute dump_stages_account;
+execute dump_stages_user;
+execute dump_stages_host;
+execute dump_stages_global;
+execute dump_stages_history;
+execute dump_statements_account;
+execute dump_statements_user;
+execute dump_statements_host;
+execute dump_statements_global;
+execute dump_statements_history;
+execute dump_transactions_account;
+execute dump_transactions_user;
+execute dump_transactions_host;
+execute dump_transactions_global;
+execute dump_transactions_history;
+execute dump_accounts;
+execute dump_users;
+execute dump_hosts;
+
+truncate performance_schema.events_transactions_summary_global_by_event_name;
+
+echo "================== TRANSACTIONS_GLOBAL truncated ==================";
+
+echo "================== Step 33 ==================";
+call dump_thread();
+execute dump_waits_account;
+execute dump_waits_user;
+execute dump_waits_host;
+execute dump_waits_global;
+execute dump_waits_history;
+execute dump_stages_account;
+execute dump_stages_user;
+execute dump_stages_host;
+execute dump_stages_global;
+execute dump_stages_history;
+execute dump_statements_account;
+execute dump_statements_user;
+execute dump_statements_host;
+execute dump_statements_global;
+execute dump_statements_history;
+execute dump_transactions_account;
+execute dump_transactions_user;
+execute dump_transactions_host;
+execute dump_transactions_global;
+execute dump_transactions_history;
execute dump_accounts;
execute dump_users;
execute dump_hosts;
@@ -810,7 +1109,7 @@ truncate performance_schema.accounts;
echo "================== ACCOUNTS truncated ==================";
-echo "================== Step 29 ==================";
+echo "================== Step 34 ==================";
call dump_thread();
execute dump_waits_account;
execute dump_waits_user;
@@ -827,6 +1126,11 @@ execute dump_statements_user;
execute dump_statements_host;
execute dump_statements_global;
execute dump_statements_history;
+execute dump_transactions_account;
+execute dump_transactions_user;
+execute dump_transactions_host;
+execute dump_transactions_global;
+execute dump_transactions_history;
execute dump_accounts;
execute dump_users;
execute dump_hosts;
@@ -835,7 +1139,7 @@ truncate performance_schema.users;
echo "================== USERS truncated ==================";
-echo "================== Step 30 ==================";
+echo "================== Step 35 ==================";
call dump_thread();
execute dump_waits_account;
execute dump_waits_user;
@@ -852,6 +1156,11 @@ execute dump_statements_user;
execute dump_statements_host;
execute dump_statements_global;
execute dump_statements_history;
+execute dump_transactions_account;
+execute dump_transactions_user;
+execute dump_transactions_host;
+execute dump_transactions_global;
+execute dump_transactions_history;
execute dump_accounts;
execute dump_users;
execute dump_hosts;
@@ -860,7 +1169,7 @@ truncate performance_schema.hosts;
echo "================== HOSTS truncated ==================";
-echo "================== Step 31 ==================";
+echo "================== Step 36 ==================";
call dump_thread();
execute dump_waits_account;
execute dump_waits_user;
@@ -877,6 +1186,11 @@ execute dump_statements_user;
execute dump_statements_host;
execute dump_statements_global;
execute dump_statements_history;
+execute dump_transactions_account;
+execute dump_transactions_user;
+execute dump_transactions_host;
+execute dump_transactions_global;
+execute dump_transactions_history;
execute dump_accounts;
execute dump_users;
execute dump_hosts;
diff --git a/mysql-test/suite/perfschema/include/event_aggregate_setup.inc b/mysql-test/suite/perfschema/include/event_aggregate_setup.inc
index f116b09ff04..03f88e97eef 100644
--- a/mysql-test/suite/perfschema/include/event_aggregate_setup.inc
+++ b/mysql-test/suite/perfschema/include/event_aggregate_setup.inc
@@ -19,11 +19,16 @@
# - events_statements_summary_by_account_by_event_name
# - events_statements_summary_by_user_by_event_name
# - events_statements_summary_by_host_by_event_name
+# - events_transactions_summary_by_thread_by_event_name
+# - events_transactions_summary_by_account_by_event_name
+# - events_transactions_summary_by_user_by_event_name
+# - events_transactions_summary_by_host_by_event_name
#
# Globally:
# - events_waits_summary_global_by_event_name
# - events_stages_summary_global_by_event_name
# - events_statements_summary_global_by_event_name
+# - events_transactions_summary_global_by_event_name
#
# The tests are written with the following helpers:
# - include/event_aggregate_setup.inc
@@ -90,6 +95,8 @@ drop table if exists test.t1;
--enable_warnings
create table test.t1(a varchar(64));
+create function test.f(a int, b int) returns int
+return a+b;
create table test.setup_actors as
select * from performance_schema.setup_actors;
@@ -112,14 +119,15 @@ update performance_schema.setup_instruments set enabled='NO', timed='NO';
update performance_schema.setup_instruments set enabled='YES', timed='YES'
where name in ('wait/synch/mutex/sql/LOCK_connection_count',
- 'wait/synch/mutex/sql/LOCK_user_locks',
+ 'wait/synch/mutex/sql/LOCK_uuid_generator',
'wait/synch/rwlock/sql/LOCK_grant',
'wait/io/file/sql/query_log',
'idle');
update performance_schema.setup_instruments set enabled='YES', timed='YES'
- where name in ('stage/sql/Init', 'stage/sql/Init for update',
- 'stage/sql/Checking permissions',
+ where name in ('stage/sql/starting',
+ 'stage/sql/init',
+ 'stage/sql/checking permissions',
'stage/sql/Opening tables',
'stage/sql/Closing tables');
@@ -129,7 +137,11 @@ update performance_schema.setup_instruments set enabled='YES', timed='YES'
'statement/abstract/new_packet',
'statement/abstract/Query',
'statement/com/Quit',
- 'statement/com/error');
+ 'statement/com/error',
+ 'statement/sp/freturn');
+
+update performance_schema.setup_instruments set enabled='YES', timed='YES'
+ where name in ('transaction');
# Start from a known clean state, to avoid noise from previous tests
flush tables;
@@ -155,6 +167,13 @@ truncate performance_schema.events_statements_summary_by_host_by_event_name;
truncate performance_schema.events_statements_summary_global_by_event_name;
truncate performance_schema.events_statements_history_long;
+truncate performance_schema.events_transactions_summary_by_thread_by_event_name;
+truncate performance_schema.events_transactions_summary_by_account_by_event_name;
+truncate performance_schema.events_transactions_summary_by_user_by_event_name;
+truncate performance_schema.events_transactions_summary_by_host_by_event_name;
+truncate performance_schema.events_transactions_summary_global_by_event_name;
+truncate performance_schema.events_transactions_history_long;
+
--disable_warnings
drop procedure if exists dump_thread;
drop procedure if exists dump_one_thread;
@@ -182,7 +201,7 @@ begin
select username, event_name, count_star
from performance_schema.events_waits_summary_by_thread_by_event_name
where event_name in ('wait/synch/mutex/sql/LOCK_connection_count',
- 'wait/synch/mutex/sql/LOCK_user_locks',
+ 'wait/synch/mutex/sql/LOCK_uuid_generator',
'wait/synch/rwlock/sql/LOCK_grant',
'wait/io/file/sql/query_log')
and thread_id = my_thread_id
@@ -200,7 +219,7 @@ prepare dump_waits_account from
from performance_schema.events_waits_summary_by_account_by_event_name
where user like \'user%\'
and event_name in ('wait/synch/mutex/sql/LOCK_connection_count',
- 'wait/synch/mutex/sql/LOCK_user_locks',
+ 'wait/synch/mutex/sql/LOCK_uuid_generator',
'wait/synch/rwlock/sql/LOCK_grant',
'wait/io/file/sql/query_log')
order by user, host, event_name;";
@@ -210,7 +229,7 @@ prepare dump_waits_user from
from performance_schema.events_waits_summary_by_user_by_event_name
where user like \'user%\'
and event_name in ('wait/synch/mutex/sql/LOCK_connection_count',
- 'wait/synch/mutex/sql/LOCK_user_locks',
+ 'wait/synch/mutex/sql/LOCK_uuid_generator',
'wait/synch/rwlock/sql/LOCK_grant',
'wait/io/file/sql/query_log')
order by user, event_name;";
@@ -220,7 +239,7 @@ prepare dump_waits_host from
from performance_schema.events_waits_summary_by_host_by_event_name
where host=\'localhost\'
and event_name in ('wait/synch/mutex/sql/LOCK_connection_count',
- 'wait/synch/mutex/sql/LOCK_user_locks',
+ 'wait/synch/mutex/sql/LOCK_uuid_generator',
'wait/synch/rwlock/sql/LOCK_grant',
'wait/io/file/sql/query_log')
order by host, event_name;";
@@ -229,7 +248,7 @@ prepare dump_waits_global from
"select event_name, count_star
from performance_schema.events_waits_summary_global_by_event_name
where event_name in ('wait/synch/mutex/sql/LOCK_connection_count',
- 'wait/synch/mutex/sql/LOCK_user_locks',
+ 'wait/synch/mutex/sql/LOCK_uuid_generator',
'wait/synch/rwlock/sql/LOCK_grant',
'wait/io/file/sql/query_log')
order by event_name;";
@@ -238,7 +257,7 @@ prepare dump_waits_history from
"select event_name, count(event_name)
from performance_schema.events_waits_history_long
where event_name in ('wait/synch/mutex/sql/LOCK_connection_count',
- 'wait/synch/mutex/sql/LOCK_user_locks',
+ 'wait/synch/mutex/sql/LOCK_uuid_generator',
'wait/synch/rwlock/sql/LOCK_grant',
'wait/io/file/sql/query_log')
group by event_name order by event_name;";
@@ -247,7 +266,8 @@ prepare dump_stages_account from
"select user, host, event_name, count_star
from performance_schema.events_stages_summary_by_account_by_event_name
where user like \'user%\'
- and event_name in ('stage/sql/init', 'stage/sql/Init for update',
+ and event_name in ('stage/sql/starting',
+ 'stage/sql/init',
'stage/sql/checking permissions',
'stage/sql/Opening tables',
'stage/sql/closing tables')
@@ -257,7 +277,8 @@ prepare dump_stages_user from
"select user, event_name, count_star
from performance_schema.events_stages_summary_by_user_by_event_name
where user like \'user%\'
- and event_name in ('stage/sql/init', 'stage/sql/Init for update',
+ and event_name in ('stage/sql/starting',
+ 'stage/sql/init',
'stage/sql/checking permissions',
'stage/sql/Opening tables',
'stage/sql/closing tables')
@@ -267,7 +288,8 @@ prepare dump_stages_host from
"select host, event_name, count_star
from performance_schema.events_stages_summary_by_host_by_event_name
where host=\'localhost\'
- and event_name in ('stage/sql/init', 'stage/sql/Init for update',
+ and event_name in ('stage/sql/starting',
+ 'stage/sql/init',
'stage/sql/checking permissions',
'stage/sql/Opening tables',
'stage/sql/closing tables')
@@ -276,7 +298,8 @@ prepare dump_stages_host from
prepare dump_stages_global from
"select event_name, count_star
from performance_schema.events_stages_summary_global_by_event_name
- where event_name in ('stage/sql/init', 'stage/sql/Init for update',
+ where event_name in ('stage/sql/starting',
+ 'stage/sql/init',
'stage/sql/checking permissions',
'stage/sql/Opening tables',
'stage/sql/closing tables')
@@ -285,7 +308,8 @@ prepare dump_stages_global from
prepare dump_stages_history from
"select event_name, count(event_name)
from performance_schema.events_stages_history_long
- where event_name in ('stage/sql/init', 'stage/sql/Init for update',
+ where event_name in ('stage/sql/starting',
+ 'stage/sql/init',
'stage/sql/checking permissions',
'stage/sql/Opening tables',
'stage/sql/closing tables')
@@ -298,7 +322,8 @@ prepare dump_statements_account from
and event_name in ('statement/sql/select',
'statement/sql/insert',
'statement/com/Quit',
- 'statement/com/error')
+ 'statement/com/error',
+ 'statement/sp/freturn')
order by user, host, event_name;";
prepare dump_statements_user from
@@ -308,7 +333,8 @@ prepare dump_statements_user from
and event_name in ('statement/sql/select',
'statement/sql/insert',
'statement/com/Quit',
- 'statement/com/error')
+ 'statement/com/error',
+ 'statement/sp/freturn')
order by user, event_name;";
prepare dump_statements_host from
@@ -318,7 +344,8 @@ prepare dump_statements_host from
and event_name in ('statement/sql/select',
'statement/sql/insert',
'statement/com/Quit',
- 'statement/com/error')
+ 'statement/com/error',
+ 'statement/sp/freturn')
order by host, event_name;";
prepare dump_statements_global from
@@ -327,7 +354,8 @@ prepare dump_statements_global from
where event_name in ('statement/sql/select',
'statement/sql/insert',
'statement/com/Quit',
- 'statement/com/error')
+ 'statement/com/error',
+ 'statement/sp/freturn')
order by event_name;";
prepare dump_statements_history from
@@ -336,7 +364,41 @@ prepare dump_statements_history from
where event_name in ('statement/sql/select',
'statement/sql/insert',
'statement/com/Quit',
- 'statement/com/error')
+ 'statement/com/error',
+ 'statement/sp/freturn')
+ group by event_name order by event_name;";
+
+prepare dump_transactions_account from
+ "select user, host, event_name, count_star
+ from performance_schema.events_transactions_summary_by_account_by_event_name
+ where user like \'user%\'
+ and event_name in ('transaction')
+ order by user, host, event_name;";
+
+prepare dump_transactions_user from
+ "select user, event_name, count_star
+ from performance_schema.events_transactions_summary_by_user_by_event_name
+ where user like \'user%\'
+ and event_name in ('transaction')
+ order by user, event_name;";
+
+prepare dump_transactions_host from
+ "select host, event_name, count_star
+ from performance_schema.events_transactions_summary_by_host_by_event_name
+ where host=\'localhost\'
+ and event_name in ('transaction')
+ order by host, event_name;";
+
+prepare dump_transactions_global from
+ "select event_name, count_star
+ from performance_schema.events_transactions_summary_global_by_event_name
+ where event_name in ('transaction')
+ order by event_name;";
+
+prepare dump_transactions_history from
+ "select event_name, count(event_name)
+ from performance_schema.events_transactions_history_long
+ where event_name in ('transaction')
group by event_name order by event_name;";
prepare dump_users from
diff --git a/mysql-test/suite/perfschema/include/hostcache_dump.inc b/mysql-test/suite/perfschema/include/hostcache_dump.inc
index 7f456a0c499..1d595ba24c0 100644
--- a/mysql-test/suite/perfschema/include/hostcache_dump.inc
+++ b/mysql-test/suite/perfschema/include/hostcache_dump.inc
@@ -1,6 +1,6 @@
# Helper for hostcache_*.test
---echo "Dumping performance_schema.host_cache"
+--echo # Dumping performance_schema.host_cache
--disable_query_log
--vertical_results
diff --git a/mysql-test/suite/perfschema/include/memory_aggregate_cleanup.inc b/mysql-test/suite/perfschema/include/memory_aggregate_cleanup.inc
new file mode 100644
index 00000000000..1e2cfa99e5c
--- /dev/null
+++ b/mysql-test/suite/perfschema/include/memory_aggregate_cleanup.inc
@@ -0,0 +1,45 @@
+# Tests for the performance schema
+
+# ===========================================
+# HELPER include/memory_aggregate_cleanup.inc
+# ===========================================
+
+--disable_query_log
+revoke all privileges, grant option from user1@localhost;
+revoke all privileges, grant option from user2@localhost;
+revoke all privileges, grant option from user3@localhost;
+revoke all privileges, grant option from user4@localhost;
+drop user user1@localhost;
+drop user user2@localhost;
+drop user user3@localhost;
+drop user user4@localhost;
+flush privileges;
+
+drop procedure dump_thread;
+drop procedure dump_one_thread;
+
+drop prepare dump_memory_account;
+drop prepare dump_memory_user;
+drop prepare dump_memory_host;
+drop prepare dump_memory_global;
+
+drop prepare dump_users;
+drop prepare dump_hosts;
+drop prepare dump_accounts;
+
+truncate table performance_schema.accounts;
+truncate table performance_schema.users;
+truncate table performance_schema.hosts;
+
+truncate table performance_schema.setup_actors;
+insert into performance_schema.setup_actors
+ select * from test.setup_actors;
+drop table test.setup_actors;
+
+set global query_cache_size=0;
+
+update performance_schema.threads set instrumented='YES';
+update performance_schema.setup_instruments set enabled='YES', timed='YES';
+
+--enable_query_log
+
diff --git a/mysql-test/suite/perfschema/include/memory_aggregate_load.inc b/mysql-test/suite/perfschema/include/memory_aggregate_load.inc
new file mode 100644
index 00000000000..7a54d25216e
--- /dev/null
+++ b/mysql-test/suite/perfschema/include/memory_aggregate_load.inc
@@ -0,0 +1,506 @@
+# Tests for the performance schema
+
+# ========================================
+# HELPER include/memory_aggregate_load.inc
+# ========================================
+
+echo "================== Step 1 ==================";
+--vertical_results
+call dump_thread();
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+execute dump_memory_global;
+--horizontal_results
+execute dump_accounts;
+execute dump_users;
+execute dump_hosts;
+
+# Notes about this test
+#
+# get_lock("marker") causes the following memory allocation:
+# memory/sql/User_level_lock, 1 malloc, size 16 (size 8 for 32-bit systems).
+# release_lock("marker") causes the following memory free:
+# memory/sql/User_level_lock, 1 free, size 16 (size 8 for 32-bit systems).
+#
+# To avoid noise from main, the background threads are disabled.
+
+connect (con1, localhost, user1, , );
+
+echo "================== con1 connected ==================";
+
+--connection default
+
+# Wait for the connect to complete
+let $wait_condition=
+ select count(*) = 1 from performance_schema.threads
+ where `TYPE`='FOREGROUND' and PROCESSLIST_USER= 'user1';
+--source include/wait_condition.inc
+
+echo "================== Step 2 ==================";
+--vertical_results
+call dump_thread();
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+execute dump_memory_global;
+--horizontal_results
+execute dump_accounts;
+execute dump_users;
+execute dump_hosts;
+
+--connection con1
+
+set GLOBAL query_cache_size=1000*1024;
+select get_lock("marker_1", 10);
+select release_lock("marker_1");
+set @v1 = repeat("a", 1000);
+set @v2 = repeat("b", 2000);
+set @v3 = repeat("c", 4000);
+
+echo "================== con1 marker ==================";
+
+--connection default
+
+# Wait for the payload to complete
+let $wait_condition=
+ select count(*) = 1 from performance_schema.events_waits_current
+ where EVENT_NAME= 'idle';
+--source include/wait_condition.inc
+
+echo "================== Step 3 ==================";
+--vertical_results
+call dump_thread();
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+execute dump_memory_global;
+--horizontal_results
+execute dump_accounts;
+execute dump_users;
+execute dump_hosts;
+
+# Debugging helpers
+# select * from performance_schema.events_waits_history_long;
+# select PROCESSLIST_USER, PROCESSLIST_HOST, INSTRUMENTED from performance_schema.threads;
+
+connect (con2, localhost, user2, , );
+
+echo "================== con2 connected ==================";
+
+--connection default
+
+# Wait for the connect to complete
+let $wait_condition=
+ select count(*) = 1 from performance_schema.threads
+ where `TYPE`='FOREGROUND' and PROCESSLIST_USER= 'user2';
+--source include/wait_condition.inc
+
+echo "================== Step 4 ==================";
+--vertical_results
+call dump_thread();
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+execute dump_memory_global;
+--horizontal_results
+execute dump_accounts;
+execute dump_users;
+execute dump_hosts;
+
+--connection con2
+
+set GLOBAL query_cache_size=2000*1024;
+select get_lock("marker_2", 10);
+select release_lock("marker_2");
+set @v1 = repeat("a", 1000);
+set @v2 = repeat("b", 2000);
+set @v3 = repeat("c", 4000);
+
+echo "================== con2 marker ==================";
+
+--connection default
+
+# Wait for the payload to complete
+let $wait_condition=
+ select count(*) = 2 from performance_schema.events_waits_current
+ where EVENT_NAME= 'idle';
+--source include/wait_condition.inc
+
+echo "================== Step 5 ==================";
+--vertical_results
+call dump_thread();
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+execute dump_memory_global;
+--horizontal_results
+execute dump_accounts;
+execute dump_users;
+execute dump_hosts;
+
+truncate table performance_schema.memory_summary_by_thread_by_event_name;
+
+echo "================== MEMORY_BY_THREAD truncated ==================";
+
+echo "================== Step 5b ==================";
+--vertical_results
+call dump_thread();
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+execute dump_memory_global;
+--horizontal_results
+execute dump_accounts;
+execute dump_users;
+execute dump_hosts;
+
+connect (con3, localhost, user3, , );
+
+echo "================== con3 connected ==================";
+
+--connection default
+
+# Wait for the connect to complete
+let $wait_condition=
+ select count(*) = 1 from performance_schema.threads
+ where `TYPE`='FOREGROUND' and PROCESSLIST_USER= 'user3';
+--source include/wait_condition.inc
+
+echo "================== Step 6 ==================";
+--vertical_results
+call dump_thread();
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+execute dump_memory_global;
+--horizontal_results
+execute dump_accounts;
+execute dump_users;
+execute dump_hosts;
+
+--connection con3
+
+set GLOBAL query_cache_size=500*1024;
+select get_lock("marker_3", 10);
+select release_lock("marker_3");
+set @v1 = repeat("a", 1000);
+set @v2 = repeat("b", 2000);
+set @v3 = repeat("c", 4000);
+
+echo "================== con3 marker ==================";
+
+--connection default
+
+# Wait for the payload to complete
+let $wait_condition=
+ select count(*) = 3 from performance_schema.events_waits_current
+ where EVENT_NAME= 'idle';
+--source include/wait_condition.inc
+
+echo "================== Step 7 ==================";
+--vertical_results
+call dump_thread();
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+execute dump_memory_global;
+--horizontal_results
+execute dump_accounts;
+execute dump_users;
+execute dump_hosts;
+
+connect (con4, localhost, user4, , );
+connect (con5, localhost, user4, , );
+
+echo "================== con4/con5 (both user4) connected ==================";
+
+--connection default
+
+# Wait for the connects to complete
+let $wait_condition=
+ select count(*) = 2 from performance_schema.threads
+ where `TYPE`='FOREGROUND' and PROCESSLIST_USER= 'user4';
+--source include/wait_condition.inc
+
+echo "================== Step 8 ==================";
+--vertical_results
+call dump_thread();
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+execute dump_memory_global;
+--horizontal_results
+execute dump_accounts;
+execute dump_users;
+execute dump_hosts;
+
+--connection con4
+
+set GLOBAL query_cache_size=4000*1024;
+select get_lock("marker_4", 10);
+select release_lock("marker_4");
+set @v1 = repeat("a", 1000);
+set @v2 = repeat("b", 2000);
+set @v3 = repeat("c", 4000);
+
+--connection con5
+select get_lock("marker_5", 10);
+select release_lock("marker_5");
+set @v1 = repeat("a", 1000);
+set @v2 = repeat("b", 2000);
+set @v3 = repeat("c", 4000);
+
+echo "================== con4/con5 marker ==================";
+
+--connection default
+
+# Wait for the payload to complete
+let $wait_condition=
+ select count(*) = 5 from performance_schema.events_waits_current
+ where EVENT_NAME= 'idle';
+--source include/wait_condition.inc
+
+echo "================== Step 9 ==================";
+--vertical_results
+call dump_thread();
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+execute dump_memory_global;
+--horizontal_results
+execute dump_accounts;
+execute dump_users;
+execute dump_hosts;
+
+--disconnect con1
+--disconnect con5
+
+--connection default
+
+# Wait for the disconnects to complete
+let $wait_condition=
+ select count(*) = 0 from performance_schema.threads
+ where `TYPE`='FOREGROUND' and PROCESSLIST_USER= 'user1';
+--source include/wait_condition.inc
+let $wait_condition=
+ select count(*) = 1 from performance_schema.threads
+ where `TYPE`='FOREGROUND' and PROCESSLIST_USER= 'user4';
+--source include/wait_condition.inc
+
+echo "================== con1/con5 disconnected ==================";
+
+echo "================== Step 10 ==================";
+--vertical_results
+call dump_thread();
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+execute dump_memory_global;
+--horizontal_results
+execute dump_accounts;
+execute dump_users;
+execute dump_hosts;
+
+--disconnect con2
+
+--connection default
+
+# Wait for the disconnect to complete
+let $wait_condition=
+ select count(*) = 0 from performance_schema.threads
+ where `TYPE`='FOREGROUND' and PROCESSLIST_USER= 'user2';
+--source include/wait_condition.inc
+
+echo "================== con2 disconnected ==================";
+
+echo "================== Step 11 ==================";
+--vertical_results
+call dump_thread();
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+execute dump_memory_global;
+--horizontal_results
+execute dump_accounts;
+execute dump_users;
+execute dump_hosts;
+
+--disconnect con3
+
+--connection default
+
+# Wait for the disconnect to complete
+let $wait_condition=
+ select count(*) = 0 from performance_schema.threads
+ where `TYPE`='FOREGROUND' and PROCESSLIST_USER= 'user3';
+--source include/wait_condition.inc
+
+echo "================== con3 disconnected ==================";
+
+echo "================== Step 12 ==================";
+--vertical_results
+call dump_thread();
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+execute dump_memory_global;
+--horizontal_results
+execute dump_accounts;
+execute dump_users;
+execute dump_hosts;
+
+--disconnect con4
+
+--connection default
+
+# Wait for the disconnect to complete
+let $wait_condition=
+ select count(*) = 0 from performance_schema.threads
+ where `TYPE`='FOREGROUND' and PROCESSLIST_USER= 'user4';
+--source include/wait_condition.inc
+
+echo "================== con4 disconnected ==================";
+
+echo "================== Step 13 ==================";
+--vertical_results
+call dump_thread();
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+execute dump_memory_global;
+--horizontal_results
+execute dump_accounts;
+execute dump_users;
+execute dump_hosts;
+
+--connection default
+
+truncate performance_schema.memory_summary_by_thread_by_event_name;
+
+echo "================== MEMORY_BY_THREAD truncated ==================";
+
+echo "================== Step 14 ==================";
+--vertical_results
+call dump_thread();
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+execute dump_memory_global;
+--horizontal_results
+execute dump_accounts;
+execute dump_users;
+execute dump_hosts;
+
+truncate performance_schema.memory_summary_by_account_by_event_name;
+
+echo "================== MEMORY_BY_ACCOUNT truncated ==================";
+
+echo "================== Step 15 ==================";
+--vertical_results
+call dump_thread();
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+execute dump_memory_global;
+--horizontal_results
+execute dump_accounts;
+execute dump_users;
+execute dump_hosts;
+
+truncate performance_schema.memory_summary_by_user_by_event_name;
+
+echo "================== MEMORY_BY_USER truncated ==================";
+
+echo "================== Step 16 ==================";
+--vertical_results
+call dump_thread();
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+execute dump_memory_global;
+--horizontal_results
+execute dump_accounts;
+execute dump_users;
+execute dump_hosts;
+
+truncate performance_schema.memory_summary_by_host_by_event_name;
+
+echo "================== MEMORY_BY_HOST truncated ==================";
+
+echo "================== Step 17 ==================";
+--vertical_results
+call dump_thread();
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+execute dump_memory_global;
+--horizontal_results
+execute dump_accounts;
+execute dump_users;
+execute dump_hosts;
+
+truncate performance_schema.memory_summary_global_by_event_name;
+
+echo "================== MEMORY_GLOBAL truncated ==================";
+
+echo "================== Step 18 ==================";
+--vertical_results
+call dump_thread();
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+execute dump_memory_global;
+--horizontal_results
+execute dump_accounts;
+execute dump_users;
+execute dump_hosts;
+
+truncate performance_schema.accounts;
+
+echo "================== ACCOUNTS truncated ==================";
+
+echo "================== Step 19 ==================";
+--vertical_results
+call dump_thread();
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+execute dump_memory_global;
+--horizontal_results
+execute dump_accounts;
+execute dump_users;
+execute dump_hosts;
+
+truncate performance_schema.users;
+
+echo "================== USERS truncated ==================";
+
+echo "================== Step 20 ==================";
+--vertical_results
+call dump_thread();
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+execute dump_memory_global;
+--horizontal_results
+execute dump_accounts;
+execute dump_users;
+execute dump_hosts;
+
+truncate performance_schema.hosts;
+
+echo "================== HOSTS truncated ==================";
+
+echo "================== Step 21 ==================";
+--vertical_results
+call dump_thread();
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+execute dump_memory_global;
+--horizontal_results
+execute dump_accounts;
+execute dump_users;
+execute dump_hosts;
+
diff --git a/mysql-test/suite/perfschema/include/memory_aggregate_setup.inc b/mysql-test/suite/perfschema/include/memory_aggregate_setup.inc
new file mode 100644
index 00000000000..1272c0921e7
--- /dev/null
+++ b/mysql-test/suite/perfschema/include/memory_aggregate_setup.inc
@@ -0,0 +1,208 @@
+# Tests for the performance schema
+
+# =============
+# DOCUMENTATION
+# =============
+
+# Verify how memory stats are aggregated into various tables
+#
+# In the thread dimension:
+# - memory_summary_by_thread_by_event_name
+# - memory_summary_by_account_by_event_name
+# - memory_summary_by_user_by_event_name
+# - memory_summary_by_host_by_event_name
+#
+# Globally:
+# - memory_summary_global_by_event_name
+#
+# The tests are written with the following helpers:
+# - include/memory_aggregate_setup.inc
+# - include/memory_aggregate_load.inc
+# - include/memory_aggregate_cleanup.inc
+#
+# Helpers are intended to be used as follows.
+#
+# A Typical test t/memory_aggregate_xxx.test will consist of:
+# --source ../include/memory_aggregate_setup.inc
+# --source ../include/memory_aggregate_load.inc
+# --source ../include/memory_aggregate_cleanup.inc
+# and a t/memory_aggregate_xxx-master.opt file
+#
+# Naming conventions for t/memory_aggregate_xxx.test are as follows:
+# t/memory_aggregate_<account><user><host>
+#
+# <account> corresponds to different sizing settings for
+# the variable performance-schema-accounts-size
+# - (blank): accounts-size sufficient to represent all records
+# - no_a: accounts-size set to 0
+#
+# <user> corresponds to different sizing settings for
+# the variable performance-schema-users-size
+# - (blank): users-size sufficient to represent all records
+# - no_u: users-size set to 0
+#
+# <host> corresponds to different sizing settings for
+# the variable performance-schema-hosts-size
+# - (blank): hosts-size sufficient to represent all records
+# - no_h: hosts-size set to 0
+
+# =========================================
+# HELPER include/memory_aggregate_setup.inc
+# =========================================
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+--source include/no_protocol.inc
+--source ../include/wait_for_pfs_thread_count.inc
+--source include/not_windows.inc
+
+--disable_query_log
+
+set @orig_sql_mode= @@sql_mode;
+set sql_mode= (select replace(@@sql_mode,'NO_AUTO_CREATE_USER',''));
+grant ALL on *.* to user1@localhost;
+grant ALL on *.* to user2@localhost;
+grant ALL on *.* to user3@localhost;
+grant ALL on *.* to user4@localhost;
+set sql_mode= @orig_sql_mode;
+
+flush privileges;
+
+# Purge old users, hosts, user/host from previous tests
+truncate table performance_schema.accounts;
+truncate table performance_schema.users;
+truncate table performance_schema.hosts;
+
+# Save the setup
+
+--disable_warnings
+drop table if exists test.setup_actors;
+--enable_warnings
+
+create table test.setup_actors as
+ select * from performance_schema.setup_actors;
+
+# Only instrument the user connections
+truncate table performance_schema.setup_actors;
+insert into performance_schema.setup_actors
+ set host= 'localhost', user= 'user1', role= '%';
+insert into performance_schema.setup_actors
+ set host= 'localhost', user= 'user2', role= '%';
+insert into performance_schema.setup_actors
+ set host= 'localhost', user= 'user3', role= '%';
+insert into performance_schema.setup_actors
+ set host= 'localhost', user= 'user4', role= '%';
+
+update performance_schema.threads set instrumented='NO';
+
+# Only instrument a few events of each kind
+update performance_schema.setup_instruments set enabled='NO', timed='NO';
+
+update performance_schema.setup_instruments set enabled='YES', timed='YES'
+ where name in ('memory/sql/user_var_entry::value',
+ 'memory/sql/User_level_lock',
+ 'memory/sql/Query_cache',
+ 'idle');
+
+# Start from a known clean state, to avoid noise from previous tests
+flush tables;
+flush status;
+truncate performance_schema.memory_summary_by_thread_by_event_name;
+truncate performance_schema.memory_summary_by_account_by_event_name;
+truncate performance_schema.memory_summary_by_user_by_event_name;
+truncate performance_schema.memory_summary_by_host_by_event_name;
+truncate performance_schema.memory_summary_global_by_event_name;
+
+--disable_warnings
+drop procedure if exists dump_thread;
+drop procedure if exists dump_one_thread;
+--enable_warnings
+
+delimiter $$;
+
+create procedure dump_thread()
+begin
+ call dump_one_thread('user1');
+ call dump_one_thread('user2');
+ call dump_one_thread('user3');
+ call dump_one_thread('user4');
+end
+$$
+
+create procedure dump_one_thread(in username varchar(64))
+begin
+ declare my_thread_id int;
+
+ set my_thread_id = (select thread_id from performance_schema.threads
+ where processlist_user=username LIMIT 1);
+
+ if (my_thread_id is not null) then
+ select username,
+ EVENT_NAME, COUNT_ALLOC, COUNT_FREE,
+ SUM_NUMBER_OF_BYTES_ALLOC, SUM_NUMBER_OF_BYTES_FREE,
+ LOW_COUNT_USED, CURRENT_COUNT_USED, HIGH_COUNT_USED,
+ LOW_NUMBER_OF_BYTES_USED, CURRENT_NUMBER_OF_BYTES_USED, HIGH_NUMBER_OF_BYTES_USED
+ from performance_schema.memory_summary_by_thread_by_event_name
+ where event_name in ('memory/sql/user_var_entry::value',
+ 'memory/sql/User_level_lock',
+ 'memory/sql/Query_cache')
+ and thread_id = my_thread_id
+ order by event_name;
+ else
+ select username, "not found" as status;
+ end if;
+end
+$$
+
+delimiter ;$$
+
+prepare dump_memory_account from
+ "select *
+ from performance_schema.memory_summary_by_account_by_event_name
+ where user like \'user%\'
+ and event_name in ('memory/sql/user_var_entry::value',
+ 'memory/sql/User_level_lock',
+ 'memory/sql/Query_cache')
+ order by user, host, event_name;";
+
+prepare dump_memory_user from
+ "select *
+ from performance_schema.memory_summary_by_user_by_event_name
+ where user like \'user%\'
+ and event_name in ('memory/sql/user_var_entry::value',
+ 'memory/sql/User_level_lock',
+ 'memory/sql/Query_cache')
+ order by user, event_name;";
+
+prepare dump_memory_host from
+ "select *
+ from performance_schema.memory_summary_by_host_by_event_name
+ where host=\'localhost\'
+ and event_name in ('memory/sql/user_var_entry::value',
+ 'memory/sql/User_level_lock',
+ 'memory/sql/Query_cache')
+ order by host, event_name;";
+
+prepare dump_memory_global from
+ "select *
+ from performance_schema.memory_summary_global_by_event_name
+ where event_name in ('memory/sql/user_var_entry::value',
+ 'memory/sql/User_level_lock',
+ 'memory/sql/Query_cache')
+ order by event_name;";
+
+prepare dump_users from
+ "select * from performance_schema.users where user is not null order by user;";
+
+prepare dump_hosts from
+ "select * from performance_schema.hosts where host is not null order by host;";
+
+prepare dump_accounts from
+ "select * from performance_schema.accounts where (user is not null) and (host is not null) order by user, host;";
+
+--enable_query_log
+
+# Make sure all the instrumentation is present
+show global status like "performance_schema_memory_classes_lost";
+
+
diff --git a/mysql-test/suite/perfschema/include/pfs_upgrade.inc b/mysql-test/suite/perfschema/include/pfs_upgrade.inc
index 0d4a864940c..8d9dca0a500 100644
--- a/mysql-test/suite/perfschema/include/pfs_upgrade.inc
+++ b/mysql-test/suite/perfschema/include/pfs_upgrade.inc
@@ -20,7 +20,7 @@ drop event if exists test.user_event;
--enable_warnings
---echo "Testing mysql_upgrade with TABLE performance_schema.user_table"
+--echo # Testing mysql_upgrade with TABLE performance_schema.user_table
create table test.user_table(a int);
@@ -43,7 +43,7 @@ use test;
drop table test.user_table;
---echo "Testing mysql_upgrade with VIEW performance_schema.user_view"
+--echo # Testing mysql_upgrade with VIEW performance_schema.user_view
create view test.user_view as select "Not supposed to be here";
@@ -66,7 +66,7 @@ use test;
drop view test.user_view;
---echo "Testing mysql_upgrade with PROCEDURE performance_schema.user_proc"
+--echo # Testing mysql_upgrade with PROCEDURE performance_schema.user_proc
create procedure test.user_proc()
select "Not supposed to be here";
@@ -81,7 +81,7 @@ update mysql.proc set db='test' where name='user_proc';
drop procedure test.user_proc;
---echo "Testing mysql_upgrade with FUNCTION performance_schema.user_func"
+--echo # Testing mysql_upgrade with FUNCTION performance_schema.user_func
create function test.user_func() returns integer
return 0;
@@ -96,7 +96,7 @@ update mysql.proc set db='test' where name='user_func';
drop function test.user_func;
---echo "Testing mysql_upgrade with EVENT performance_schema.user_event"
+--echo # Testing mysql_upgrade with EVENT performance_schema.user_event
create event test.user_event on schedule every 1 day do
select "not supposed to be here";
diff --git a/mysql-test/suite/perfschema/include/prepared_stmts_deallocation.inc b/mysql-test/suite/perfschema/include/prepared_stmts_deallocation.inc
new file mode 100644
index 00000000000..1601c027984
--- /dev/null
+++ b/mysql-test/suite/perfschema/include/prepared_stmts_deallocation.inc
@@ -0,0 +1,11 @@
+#
+# Deallocates all the prepared statements
+# created in prepares_stmts_setup.inc
+#
+
+DEALLOCATE PREPARE st1;
+DEALLOCATE PREPARE st2;
+DEALLOCATE PREPARE st3;
+DEALLOCATE PREPARE st4;
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/perfschema/include/prepared_stmts_execution.inc b/mysql-test/suite/perfschema/include/prepared_stmts_execution.inc
new file mode 100644
index 00000000000..dbb0696f67c
--- /dev/null
+++ b/mysql-test/suite/perfschema/include/prepared_stmts_execution.inc
@@ -0,0 +1,18 @@
+#
+# Execution of all the prepared statements created in
+# prepared_statements_setup.inc.
+#
+
+SET @a = 3;
+SET @b = 4;
+EXECUTE st1 USING @a, @b;
+
+#SET @table = 't1';
+EXECUTE st2;
+
+SET @c=3;
+EXECUTE st3 using @c;
+
+EXECUTE st4;
+
+
diff --git a/mysql-test/suite/perfschema/include/prepared_stmts_setup.inc b/mysql-test/suite/perfschema/include/prepared_stmts_setup.inc
new file mode 100644
index 00000000000..0fb14a36698
--- /dev/null
+++ b/mysql-test/suite/perfschema/include/prepared_stmts_setup.inc
@@ -0,0 +1,20 @@
+#
+# Creating various prepared statements.
+# HELPER include/prepared_stmts_setup.inc
+#
+
+CREATE TABLE t1 (a INT NOT NULL);
+INSERT INTO t1 VALUES (4), (8), (11), (32), (80);
+
+# Prepared statments
+
+PREPARE st1 FROM 'SELECT SQRT(POW(?,2) + POW(?,2)) AS hypotenuse';
+
+SET @table = 't1';
+SET @s = CONCAT('SELECT * FROM ', @table);
+PREPARE st2 FROM @s;
+
+PREPARE st3 FROM 'INSERT INTO t1 SELECT * FROM t1 WHERE a<=?';
+
+PREPARE st4 FROM
+ '(SELECT a FROM t1) UNION (SELECT a+10 FROM t1) ORDER BY RAND()*0+a';
diff --git a/mysql-test/suite/perfschema/include/program_cleanup.inc b/mysql-test/suite/perfschema/include/program_cleanup.inc
new file mode 100644
index 00000000000..ffcedccd937
--- /dev/null
+++ b/mysql-test/suite/perfschema/include/program_cleanup.inc
@@ -0,0 +1,31 @@
+#
+# clean up of set-up created in
+# suite/perfschema/include/program_setup.inc
+#
+
+--disable_warnings
+DROP PROCEDURE SampleProc1;
+DROP PROCEDURE SampleProc2;
+DROP PROCEDURE SampleProc3;
+DROP PROCEDURE SampleProc4;
+
+DROP FUNCTION wt_avg;
+DROP FUNCTION fac;
+DROP FUNCTION append;
+
+DROP TRIGGER trg1;
+DROP TRIGGER trg2;
+DROP TRIGGER trg3;
+DROP TRIGGER trg4;
+DROP TRIGGER trg5;
+
+DROP EVENT IF EXISTS e1;
+
+DROP TABLE t1;
+DROP TABLE t2;
+DROP TABLE t3;
+DROP TABLE t4;
+DROP TABLE table_t;
+
+DROP DATABASE stored_programs;
+--enable_warnings
diff --git a/mysql-test/suite/perfschema/include/program_execution.inc b/mysql-test/suite/perfschema/include/program_execution.inc
new file mode 100644
index 00000000000..8c0bc691898
--- /dev/null
+++ b/mysql-test/suite/perfschema/include/program_execution.inc
@@ -0,0 +1,54 @@
+#
+# Execute the stored programs created in
+# suite/perfschema/include/program_setup.inc
+#
+
+--echo #####################
+--echo # Executing queries #
+--echo #####################
+INSERT INTO t1 VALUES (10,20);
+CALL SampleProc1(30,40,50);
+SET @a=1;
+SELECT @a;
+CALL SampleProc2("Jwalamukhi",34);
+SELECT @a;
+CALL SampleProc3();
+CALL SampleProc4();
+SET @change=1;
+SELECT @change;
+UPDATE t2 SET id=22 WHERE name="Jwalamukhi";
+SELECT @change;
+SET @del=1;
+SELECT @del;
+DELETE FROM t1 WHERE i=76;
+SELECT @del;
+SELECT wt_avg(1, 12, 1990, 1121990);
+SELECT fac(5);
+SELECT append("Bolly", "wood");
+
+--echo # Event
+
+SET GLOBAL event_scheduler=ON;
+
+CREATE TABLE table_t(a INT);
+DELIMITER |;
+CREATE EVENT e1 ON SCHEDULE EVERY 2 SECOND DO
+BEGIN
+ INSERT INTO table_t VALUES(1);
+END|
+DELIMITER ;|
+
+# Let e1 insert 1 record into the table table_t
+
+--let $wait_condition= select count(*) = 1 from table_t
+--source include/wait_condition.inc
+SELECT * FROM table_t;
+
+# Wait till the above one execution of event is instrumented.
+
+--let $wait_condition= select count(*) = 1 from performance_schema.events_statements_history_long where object_type='EVENT'
+--source include/wait_condition.inc
+
+SET GLOBAL event_scheduler=OFF;
+--source include/no_running_event_scheduler.inc
+
diff --git a/mysql-test/suite/perfschema/include/program_nested_cleanup.inc b/mysql-test/suite/perfschema/include/program_nested_cleanup.inc
new file mode 100644
index 00000000000..0f5b26f3d1b
--- /dev/null
+++ b/mysql-test/suite/perfschema/include/program_nested_cleanup.inc
@@ -0,0 +1,21 @@
+#
+# clean up if set-up created in
+# suite/perfschema/include/program_nested_setup.inc
+#
+
+DROP PROCEDURE c4;
+DROP PROCEDURE c3;
+DROP PROCEDURE c2;
+DROP PROCEDURE c1;
+DROP PROCEDURE inc;
+DROP PROCEDURE inc2;
+DROP PROCEDURE iotest;
+DROP FUNCTION mul;
+DROP FUNCTION inc;
+DROP FUNCTION fac;
+DROP FUNCTION fun;
+DROP PROCEDURE ifac;
+DROP TRIGGER trg;
+DROP TABLE t1,t2;
+
+DROP DATABASE nested_sp;
diff --git a/mysql-test/suite/perfschema/include/program_nested_execution.inc b/mysql-test/suite/perfschema/include/program_nested_execution.inc
new file mode 100644
index 00000000000..dbf0eafe123
--- /dev/null
+++ b/mysql-test/suite/perfschema/include/program_nested_execution.inc
@@ -0,0 +1,22 @@
+#
+# Execute the nested stored programs created in
+# suite/include/perfschema/program_nested_setup.inc
+#
+
+--echo #####################
+--echo # Executing queries #
+--echo #####################
+
+CALL c1(42);
+SELECT * FROM t1;
+DELETE FROM t1;
+
+CALL iotest("io1", "io2", 1);
+SELECT * FROM t1 ORDER BY data DESC;
+DELETE FROM t1;
+
+SELECT fun(6,10);
+
+INSERT INTO t1 VALUES (20,13);
+
+SELECT * FROM t2;
diff --git a/mysql-test/suite/perfschema/include/program_nested_setup.inc b/mysql-test/suite/perfschema/include/program_nested_setup.inc
new file mode 100644
index 00000000000..1f96fa28f93
--- /dev/null
+++ b/mysql-test/suite/perfschema/include/program_nested_setup.inc
@@ -0,0 +1,88 @@
+#
+# SET-UP - Creation of various nested stored programs
+#
+
+--source include/no_protocol.inc
+--source include/have_innodb.inc
+
+--echo # SET-UP
+CREATE DATABASE nested_sp;
+USE nested_sp;
+
+CREATE TABLE t1(
+ id CHAR(16) NOT NULL DEFAULT '',
+ data INT NOT NULL
+);
+
+CREATE TABLE t2(
+ n INT UNSIGNED NOT NULL,
+ f BIGINT UNSIGNED
+) engine=innodb;
+
+--echo ############################
+--echo # Creating Stored Programs #
+--echo ############################
+DELIMITER |;
+
+# Nested Stored Procedure - 1
+CREATE PROCEDURE c1(x INT)
+ CALL c2("c", x)|
+CREATE PROCEDURE c2(s CHAR(16), x INT)
+ CALL c3(x, s)|
+CREATE PROCEDURE c3(x INT, s CHAR(16))
+ CALL c4("level", x, s)|
+CREATE PROCEDURE c4(l CHAR(8), x INT, s CHAR(16))
+ INSERT INTO t1 VALUES (concat(l,s), x)|
+
+# Nested Stored Procedure - 2
+CREATE PROCEDURE iotest(x1 CHAR(16), x2 CHAR(16), y INT)
+BEGIN
+ CALL inc2(x2, y);
+ INSERT INTO t1 VALUES (x1, y);
+END|
+CREATE PROCEDURE inc2(x CHAR(16), y INT)
+BEGIN
+ CALL inc(y);
+ INSERT INTO t1 VALUES (x, y);
+END|
+CREATE PROCEDURE inc(inout io INT)
+ SET io = io + 1|
+
+# Nested Stored Function
+CREATE FUNCTION mul(x INT, y INT) RETURNS INT
+ RETURN x*y|
+CREATE FUNCTION inc(i INT) RETURNS INT
+ RETURN i+1|
+CREATE FUNCTION fac(n INT UNSIGNED) RETURNS BIGINT UNSIGNED
+BEGIN
+ DECLARE f BIGINT UNSIGNED DEFAULT 1;
+ WHILE n > 1 DO
+ SET f = f * n;
+ SET n = n - 1;
+ END WHILE;
+ RETURN f;
+END|
+CREATE FUNCTION fun(i INT, u INT UNSIGNED) RETURNS DOUBLE
+ RETURN mul(inc(i), fac(u))|
+#
+# A nested stored program
+#
+CREATE PROCEDURE ifac(n INT UNSIGNED)
+BEGIN
+ DECLARE i BIGINT UNSIGNED DEFAULT 1;
+
+ IF n > 20 THEN
+ SET n = 20; # bigint overflow otherwise
+ END IF;
+ WHILE i <= n DO
+ BEGIN
+ INSERT INTO t2 VALUES (i, fac(i));
+ SET i = i + 1;
+ END;
+ END WHILE;
+END|
+CREATE TRIGGER trg AFTER INSERT ON t1 FOR EACH ROW
+ CALL ifac(10)|
+
+DELIMITER ;|
+
diff --git a/mysql-test/suite/perfschema/include/program_setup.inc b/mysql-test/suite/perfschema/include/program_setup.inc
new file mode 100644
index 00000000000..a4e7f2451b6
--- /dev/null
+++ b/mysql-test/suite/perfschema/include/program_setup.inc
@@ -0,0 +1,136 @@
+#
+# SET-UP - Creation of various non-nested stored programs
+#
+
+--source include/no_protocol.inc
+--source include/have_innodb.inc
+
+--echo # SET-UP
+
+CREATE DATABASE stored_programs;
+USE stored_programs;
+
+CREATE TABLE t1(
+ i INT NOT NULL,
+ j INT
+) engine=innodb;
+
+CREATE TABLE t2(
+ name CHAR(16) NOT NULL DEFAULT '',
+ id INT NOT NULL
+) engine=innodb;
+
+CREATE TABLE t3(
+ d DATE,
+ n INT,
+ f DOUBLE,
+ s VARCHAR(32)
+);
+
+CREATE TABLE t4(
+ `k` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `word` varchar(100) NOT NULL,
+ `mean` varchar(300) NOT NULL,
+ PRIMARY KEY (`k`)
+);
+
+
+--echo ############################
+--echo # Creating Stored Programs #
+--echo ############################
+
+--echo # Stored Routine ( Procedure & Function )
+
+DELIMITER |;
+CREATE PROCEDURE SampleProc1(x1 INT, x2 INT, y INT)
+BEGIN
+ INSERT INTO t1 VALUES (x1, y);
+ INSERT INTO t1 VALUES (x2, y);
+END|
+
+CREATE PROCEDURE SampleProc2(x CHAR(16), y INT)
+BEGIN
+ DECLARE z1, z2 INT;
+ SET z1 = y;
+ SET z2 = z1+2;
+ INSERT INTO t2 VALUES (x, z2);
+END|
+
+CREATE PROCEDURE SampleProc3()
+BEGIN
+ DECLARE ld DATE;
+ DECLARE li INT;
+ DECLARE lf DOUBLE;
+ DECLARE ls VARCHAR(32);
+
+ SET ld = NULL, li = NULL, lf = NULL, ls = NULL;
+ INSERT INTO t3 VALUES (ld, li, lf, ls);
+
+ INSERT INTO t3 (n, f, s) VALUES ((ld IS NULL), 1, "ld is null"),
+ ((li IS NULL), 1, "li is null"),
+ ((li = 0), NULL, "li = 0"),
+ ((lf IS NULL), 1, "lf is null"),
+ ((lf = 0), NULL, "lf = 0"),
+ ((ls IS NULL), 1, "ls is null");
+END|
+
+
+CREATE PROCEDURE SampleProc4()
+BEGIN
+ DECLARE x INT;
+ SET x = 1;
+ WHILE x <= 2 DO
+ INSERT INTO t4(word, mean) VALUES('a','a mean');
+ SET x = x + 1;
+ END WHILE;
+END|
+
+CREATE FUNCTION append(s1 CHAR(8), s2 CHAR(8)) RETURNS CHAR(16)
+ RETURN concat(s1, s2)|
+
+CREATE FUNCTION wt_avg(n1 INT, n2 INT, n3 INT, n4 INT)
+ RETURNS INT
+ DETERMINISTIC
+ BEGIN
+ DECLARE avg INT;
+ SET avg = (n1+n2+n3*2+n4*4)/8;
+ RETURN avg;
+ END|
+
+CREATE FUNCTION fac(n INT UNSIGNED) RETURNS BIGINT UNSIGNED
+BEGIN
+ DECLARE f BIGINT UNSIGNED DEFAULT 1;
+ WHILE n > 1 DO
+ SET f = f * n;
+ SET n = n - 1;
+ END WHILE;
+ RETURN f;
+END|
+
+--echo # Triggers
+
+# INSERT triggers
+CREATE TRIGGER trg1 BEFORE INSERT ON t1 FOR EACH ROW
+BEGIN
+ if isnull(new.j) then
+ SET new.j:= new.i * 10;
+ END if;
+END|
+
+CREATE TRIGGER trg2 AFTER INSERT ON t2 FOR EACH ROW
+BEGIN
+ UPDATE t1 SET i=new.id+i ;
+END|
+
+# UPDATE trigger
+CREATE TRIGGER trg3 AFTER UPDATE ON t2 FOR EACH ROW
+ SET @change:= @change + new.id - old.id|
+
+# DELETE triggers
+CREATE TRIGGER trg4 BEFORE DELETE ON t1 FOR EACH ROW
+ SET @del:= @del + 1|
+
+CREATE TRIGGER trg5 AFTER DELETE ON t1 FOR EACH ROW
+ SET @del:= @del + 8 + old.j|
+
+DELIMITER ;|
diff --git a/mysql-test/suite/perfschema/include/reset_transaction_gtid.inc b/mysql-test/suite/perfschema/include/reset_transaction_gtid.inc
new file mode 100644
index 00000000000..c8eaf53afe9
--- /dev/null
+++ b/mysql-test/suite/perfschema/include/reset_transaction_gtid.inc
@@ -0,0 +1,20 @@
+# ==== Purpose ====
+#
+# Auxiliary file used by transaction_gtid.test
+#
+# Invoked between transactions in order to reset the state:
+# - set GTID_NEXT to AUTOMATIC since this is required after
+# any transaction that has GTID_NEXT=UUID:NUMBER
+# - RESET MASTER in order to clear @@global.gtid_executed, so
+# that the same GTID can be executed again.
+# - truncate the performance_schema.events_transaction_* tables
+#
+# All this is done on the connection 'server_1'.
+
+--disable_query_log
+--connection server_1
+RESET MASTER;
+TRUNCATE TABLE performance_schema.events_transactions_history;
+TRUNCATE TABLE performance_schema.events_transactions_current;
+--enable_query_log
+--connection default
diff --git a/mysql-test/suite/perfschema/include/schema.inc b/mysql-test/suite/perfschema/include/schema.inc
index f5f23893d37..8a8be180e47 100644
--- a/mysql-test/suite/perfschema/include/schema.inc
+++ b/mysql-test/suite/perfschema/include/schema.inc
@@ -27,6 +27,14 @@ show create table events_statements_summary_by_thread_by_event_name;
show create table events_statements_summary_by_user_by_event_name;
show create table events_statements_summary_by_account_by_event_name;
show create table events_statements_summary_global_by_event_name;
+show create table events_transactions_current;
+show create table events_transactions_history;
+show create table events_transactions_history_long;
+show create table events_transactions_summary_by_host_by_event_name;
+show create table events_transactions_summary_by_thread_by_event_name;
+show create table events_transactions_summary_by_user_by_event_name;
+show create table events_transactions_summary_by_account_by_event_name;
+show create table events_transactions_summary_global_by_event_name;
show create table events_waits_current;
show create table events_waits_history;
show create table events_waits_history_long;
@@ -36,6 +44,12 @@ show create table events_waits_summary_by_thread_by_event_name;
show create table events_waits_summary_by_user_by_event_name;
show create table events_waits_summary_by_account_by_event_name;
show create table events_waits_summary_global_by_event_name;
+show create table memory_summary_by_host_by_event_name;
+show create table memory_summary_by_thread_by_event_name;
+show create table memory_summary_by_user_by_event_name;
+show create table memory_summary_by_account_by_event_name;
+show create table memory_summary_global_by_event_name;
+show create table metadata_locks;
show create table file_instances;
show create table file_summary_by_event_name;
show create table file_summary_by_instance;
@@ -53,6 +67,7 @@ show create table setup_timers;
show create table socket_instances;
show create table socket_summary_by_instance;
show create table socket_summary_by_event_name;
+show create table table_handles;
show create table table_io_waits_summary_by_index_usage;
show create table table_io_waits_summary_by_table;
show create table table_lock_waits_summary_by_table;
diff --git a/mysql-test/suite/perfschema/include/show_aggregate.inc b/mysql-test/suite/perfschema/include/show_aggregate.inc
new file mode 100644
index 00000000000..4489cf7a37b
--- /dev/null
+++ b/mysql-test/suite/perfschema/include/show_aggregate.inc
@@ -0,0 +1,125 @@
+############### suite/perfschema/include/show_aggregate.inc ####################
+# #
+# Gather status by thread, by user, by host, by account and global. #
+# #
+################################################################################
+
+--echo #=================
+--echo # Global results
+--echo #=================
+USE test;
+UPDATE test.status_results sr, performance_schema.global_status sg
+ SET sr.stop = sg.variable_value
+ WHERE sr.variable_name = sg.variable_name
+ AND sg.variable_name IN ('handler_delete', 'handler_rollback');
+--echo #
+--echo # Global deltas: END - START.
+UPDATE test.status_results sr
+ SET sr.delta = sr.stop - sr.start;
+
+#--echo DEBUG
+#SELECT * FROM test.status_results;
+#SELECT * from performance_schema.global_status where variable_name in ('handler_delete', 'handler_rollback');
+
+--echo #=================
+--echo # Status by thread
+--echo #=================
+--echo # Thread results from CON1.
+UPDATE test.status_results sr, performance_schema.status_by_thread sbt
+ SET sr.t1 = sbt.variable_value
+ WHERE sr.variable_name = sbt.variable_name
+ AND sbt.variable_name IN ('handler_delete', 'handler_rollback')
+ AND sbt.thread_id = @con1_id;
+--echo #
+--echo # Thread results from CON2.
+UPDATE test.status_results sr, performance_schema.status_by_thread sbt
+ SET sr.t2 = sbt.variable_value
+ WHERE sr.variable_name = sbt.variable_name
+ AND sbt.variable_name IN ('handler_delete', 'handler_rollback')
+ AND sbt.thread_id = @con2_id;
+--echo #
+--echo # Thread results from CON3.
+UPDATE test.status_results sr, performance_schema.status_by_thread sbt
+ SET sr.t3 = sbt.variable_value
+ WHERE sr.variable_name = sbt.variable_name
+ AND sbt.variable_name IN ('handler_delete', 'handler_rollback')
+ AND sbt.thread_id = @con3_id;
+--echo #
+--echo # Thread totals for 3 connections.
+UPDATE test.status_results sr
+ SET sr.thread = sr.t1 + sr.t2 + sr.t3;
+
+--echo #=================
+--echo # Status by user
+--echo #=================
+--echo # User1
+UPDATE test.status_results sr, performance_schema.status_by_user sbu
+ SET sr.u1 = sbu.variable_value
+ WHERE sr.variable_name = sbu.variable_name
+ AND sbu.variable_name IN ('handler_delete', 'handler_rollback')
+ AND sbu.user IN ('user1');
+--echo #
+--echo # User2
+UPDATE test.status_results sr, performance_schema.status_by_user sbu
+ SET sr.u2 = sbu.variable_value
+ WHERE sr.variable_name = sbu.variable_name
+ AND sbu.variable_name IN ('handler_delete', 'handler_rollback')
+ AND sbu.user IN ('user2');
+--echo #
+--echo # User3
+UPDATE test.status_results sr, performance_schema.status_by_user sbu
+ SET sr.u3 = sbu.variable_value
+ WHERE sr.variable_name = sbu.variable_name
+ AND sbu.variable_name IN ('handler_delete', 'handler_rollback')
+ AND sbu.user IN ('user3');
+--echo #
+--echo # Status totals for 3 users.
+UPDATE test.status_results sr
+ SET sr.user = sr.u1 + sr.u2 + sr.u3;
+
+--echo #===========================
+--echo # Status by host (localhost)
+--echo #===========================
+--echo #
+--echo # host1 = localhost
+UPDATE test.status_results sr, performance_schema.status_by_host sbh
+ SET sr.h1 = sbh.variable_value
+ WHERE sr.variable_name = sbh.variable_name
+ AND sbh.variable_name IN ('handler_delete', 'handler_rollback')
+ AND sbh.host IN ('localhost');
+--echo #
+--echo # Status totals for 'localhost' only.
+UPDATE test.status_results sr
+ SET sr.host = sr.h1 + sr.h2 + sr.h3;
+
+--echo #==================
+--echo # Status by account
+--echo #==================
+--echo # User1@localhost
+UPDATE test.status_results sr, performance_schema.status_by_account sba
+ SET sr.a1 = sba.variable_value
+ WHERE sr.variable_name = sba.variable_name
+ AND sba.variable_name IN ('handler_delete', 'handler_rollback')
+ AND sba.user IN ('user1');
+--echo #
+--echo # User2@localhost
+UPDATE test.status_results sr, performance_schema.status_by_account sba
+ SET sr.a2 = sba.variable_value
+ WHERE sr.variable_name = sba.variable_name
+ AND sba.variable_name IN ('handler_delete', 'handler_rollback')
+ AND sba.user IN ('user2');
+--echo #
+--echo # User3@localhost
+UPDATE test.status_results sr, performance_schema.status_by_account sba
+ SET sr.a3 = sba.variable_value
+ WHERE sr.variable_name = sba.variable_name
+ AND sba.variable_name IN ('handler_delete', 'handler_rollback')
+ AND sba.user IN ('user3');
+--echo #
+--echo #
+--echo # Status totals for 3 accounts.
+UPDATE test.status_results sr
+ SET sr.acct = sr.a1 + sr.a2 + sr.a3;
+
+#--echo DEBUG
+#SELECT * FROM test.status_results;
diff --git a/mysql-test/suite/perfschema/include/show_plugin_verifier.inc b/mysql-test/suite/perfschema/include/show_plugin_verifier.inc
new file mode 100644
index 00000000000..873205ad16e
--- /dev/null
+++ b/mysql-test/suite/perfschema/include/show_plugin_verifier.inc
@@ -0,0 +1,29 @@
+--disable_warnings
+
+--echo #
+SHOW GLOBAL STATUS LIKE "example_%";
+--echo #
+SHOW SESSION STATUS LIKE "example_%";
+--echo #
+SHOW GLOBAL VARIABLES LIKE "example_%";
+--echo #
+SHOW SESSION VARIABLES LIKE "example_%";
+--echo #
+SELECT variable_name, variable_value FROM performance_schema.global_status WHERE variable_name LIKE "example_%";
+--echo #
+SELECT variable_name, variable_value FROM performance_schema.session_status WHERE variable_name LIKE "example_%";
+--echo #
+SELECT variable_name, variable_value FROM performance_schema.global_variables WHERE variable_name LIKE "example_%";
+--echo #
+SELECT variable_name, variable_value FROM performance_schema.session_variables WHERE variable_name LIKE "example_%";
+
+#
+# Force sync of local and global system variables.
+#
+--disable_result_log
+--disable_query_log
+SELECT variable_name, variable_value FROM performance_schema.variables_by_thread WHERE variable_name LIKE "example_%";
+--enable_query_log
+--enable_result_log
+
+--enable_warnings
diff --git a/mysql-test/suite/perfschema/include/show_transaction_gtid.inc b/mysql-test/suite/perfschema/include/show_transaction_gtid.inc
new file mode 100644
index 00000000000..3ad4564dc0d
--- /dev/null
+++ b/mysql-test/suite/perfschema/include/show_transaction_gtid.inc
@@ -0,0 +1,29 @@
+# ==== Purpose ====
+#
+# Auxiliary file used by transaction_gtid.test
+#
+# Invoked to check the contents of the
+# performance_schema.events_transaction_[current|history] tables and
+# write the result to the result log. This is executed on the
+# 'server_1' connection and shows only status of transactions on the
+# 'default' connection.
+
+--connection server_1
+
+--replace_result $server_uuid SERVER_UUID aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa A
+--let $history_result= `SELECT GTID FROM performance_schema.events_transactions_history WHERE THREAD_ID = $thread_id`
+if ($history_result == '')
+{
+ --let $history_result= none
+}
+
+--replace_result $server_uuid SERVER_UUID aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa A
+--let $current_result= `SELECT GTID FROM performance_schema.events_transactions_current WHERE THREAD_ID = $thread_id`
+if ($current_result == '')
+{
+ --let $current_result= none
+}
+
+--echo # - history=$history_result current=$current_result
+
+--connection default
diff --git a/mysql-test/suite/perfschema/include/sizing_auto.inc b/mysql-test/suite/perfschema/include/sizing_auto.inc
deleted file mode 100644
index 6cb077e3cf7..00000000000
--- a/mysql-test/suite/perfschema/include/sizing_auto.inc
+++ /dev/null
@@ -1,24 +0,0 @@
-
-show variables like "table_definition_cache";
-show variables like "table_open_cache";
-show variables like "max_connections";
-# open_files_limit depends on OS configuration (ulimit -n)
-show variables like "open_files_limit";
-show variables where
- `Variable_name` != "performance_schema_max_statement_classes" and
- `Variable_name` like "performance_schema%";
-show status like "%performance_schema%";
-
-# Each test script should provide a different test.cnf file,
-# with different settings.
-# This output will show the sizes computed automatically.
-# Note that this output is very dependent on the platform.
-# The output of SHOW ENGINE PERFORMANCE_SCHEMA STATUS
-# is very dependent on the platform,
-# so it is not printed here to ensure stability of the .results files.
-# To troubleshoot the performance schema memory consumption at different
-# configuration settings, uncomment the following line.
-# Debug only:
-
-# show engine performance_schema status;
-
diff --git a/mysql-test/suite/perfschema/include/socket_check1.inc b/mysql-test/suite/perfschema/include/socket_check1.inc
index 29b00fc6abb..4f65e7d00bd 100644
--- a/mysql-test/suite/perfschema/include/socket_check1.inc
+++ b/mysql-test/suite/perfschema/include/socket_check1.inc
@@ -63,7 +63,7 @@
--echo # $title_prefix.$check_num Compare impact of statements
--echo # $stmt2
--echo # $stmt1
---echo $msg
+--echo # $msg
# Enable this when extending the checks for SQL statements.
if(0)
diff --git a/mysql-test/suite/perfschema/include/start_server_common.inc b/mysql-test/suite/perfschema/include/start_server_common.inc
index 8cbd40c2bc1..1297bcdff82 100644
--- a/mysql-test/suite/perfschema/include/start_server_common.inc
+++ b/mysql-test/suite/perfschema/include/start_server_common.inc
@@ -7,13 +7,13 @@ select count(*) from performance_schema.setup_consumers;
# wait/io/table/sql/handler is a native instrument
# wait/lock/table/sql/handler is a native instrument
# idle/io/socket is a native instrument
-select count(*) > 3 from performance_schema.setup_instruments;
+# wait/lock/metadata is a native instrument
+select count(*) > 4 from performance_schema.setup_instruments;
select count(*) from performance_schema.setup_timers;
# Make sure we don't crash, no matter what the starting parameters are
--disable_result_log
---disable_query_log
select * from performance_schema.accounts;
select * from performance_schema.cond_instances;
select * from performance_schema.events_stages_current;
@@ -33,6 +33,14 @@ select * from performance_schema.events_statements_summary_by_host_by_event_name
select * from performance_schema.events_statements_summary_by_thread_by_event_name;
select * from performance_schema.events_statements_summary_by_user_by_event_name;
select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_transactions_current;
+select * from performance_schema.events_transactions_history;
+select * from performance_schema.events_transactions_history_long;
+select * from performance_schema.events_transactions_summary_by_account_by_event_name;
+select * from performance_schema.events_transactions_summary_by_host_by_event_name;
+select * from performance_schema.events_transactions_summary_by_thread_by_event_name;
+select * from performance_schema.events_transactions_summary_by_user_by_event_name;
+select * from performance_schema.events_transactions_summary_global_by_event_name;
select * from performance_schema.events_waits_current;
select * from performance_schema.events_waits_history;
select * from performance_schema.events_waits_history_long;
@@ -42,11 +50,22 @@ select * from performance_schema.events_waits_summary_by_instance;
select * from performance_schema.events_waits_summary_by_thread_by_event_name;
select * from performance_schema.events_waits_summary_by_user_by_event_name;
select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
select * from performance_schema.file_instances;
select * from performance_schema.file_summary_by_event_name;
select * from performance_schema.file_summary_by_instance;
select * from performance_schema.host_cache;
select * from performance_schema.hosts;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.metadata_locks;
select * from performance_schema.mutex_instances;
select * from performance_schema.objects_summary_global_by_type;
select * from performance_schema.performance_timers;
@@ -61,13 +80,31 @@ select * from performance_schema.setup_timers;
select * from performance_schema.socket_instances;
select * from performance_schema.socket_summary_by_instance;
select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.table_handles;
select * from performance_schema.table_io_waits_summary_by_index_usage;
select * from performance_schema.table_io_waits_summary_by_table;
select * from performance_schema.table_lock_waits_summary_by_table;
select * from performance_schema.threads;
select * from performance_schema.users;
+select * from performance_schema.replication_connection_configuration;
+#select * from performance_schema.replication_connection_status;
+select * from performance_schema.replication_applier_configuration;
+select * from performance_schema.replication_applier_status;
+select * from performance_schema.replication_applier_status_by_coordinator;
+#select * from performance_schema.replication_applier_status_by_worker;
+select * from performance_schema.global_status;
+select * from performance_schema.status_by_thread;
+select * from performance_schema.status_by_user;
+select * from performance_schema.status_by_host;
+select * from performance_schema.status_by_account;
+select * from performance_schema.session_status;
+#select * from performance_schema.global_variables;
+#select * from performance_schema.variables_by_thread;
+#select * from performance_schema.session_variables;
--enable_result_log
---enable_query_log
+
+# This has a stable output, printing the result:
+show global variables like "performance_schema%";
# This has an unrepeatable output, it does depends too much on
# - the platform hardware (sizeof structures, padding)
@@ -78,6 +115,6 @@ select * from performance_schema.users;
--disable_result_log
show engine PERFORMANCE_SCHEMA status;
-show status like "performance_schema%";
+show global status like "performance_schema%";
--enable_result_log
diff --git a/mysql-test/suite/perfschema/include/table_aggregate_load.inc b/mysql-test/suite/perfschema/include/table_aggregate_load.inc
index 80c622d77be..9d757617cad 100644
--- a/mysql-test/suite/perfschema/include/table_aggregate_load.inc
+++ b/mysql-test/suite/perfschema/include/table_aggregate_load.inc
@@ -2,6 +2,19 @@
#
# See comments in include/table_aggregate_setup.inc
+#
+# Notes about the optimizer and query plans:
+# The following statement
+# SELECT * from t1 where b=5;
+# can be executed either:
+# - by using the index "index_b" on column b
+# - by using a full table scan and the where clause.
+# Which plan is used can be unpredictable.
+# To ensure that the index is really used,
+# so that table io against the index is measured,
+# the payload in this test uses:
+# SELECT * from t1 force index(index_b) where b=5;
+#
# Display the current setup used
@@ -88,13 +101,34 @@ update test.t1 set d=d+1 where a=101;
update test.t2 set d=d+1 where a=101;
update test.t3 set d=d+1 where a=101;
# select with index
-select * from test.t1 where b=5;
-select * from test.t2 where b=5;
-select * from test.t3 where b=5;
+select * from test.t1 force index(index_b) where b=5;
+select * from test.t2 force index(index_b) where b=5;
+select * from test.t3 force index(index_b) where b=5;
+
+--connection default
+
+echo "================== Step 3-A ==================";
+call dump_thread();
+execute dump_waits_account;
+execute dump_waits_user;
+execute dump_waits_host;
+execute dump_waits_global;
+execute dump_waits_history;
+execute dump_waits_index_io;
+execute dump_waits_table_io;
+execute dump_waits_table_lock;
+execute dump_objects_summary;
+
+--connection con1
+
+# This cause aggregation, so that index names are finally recorded
+flush tables;
+
+echo "================== con1 FLUSH ==================";
--connection default
-echo "================== Step 3 ==================";
+echo "================== Step 3-B ==================";
call dump_thread();
execute dump_waits_account;
execute dump_waits_user;
@@ -147,9 +181,9 @@ update test.t1 set d=d+1 where a=201;
update test.t2 set d=d+1 where a=201;
update test.t3 set d=d+1 where a=201;
# select with index
-select * from test.t1 where b=5;
-select * from test.t2 where b=5;
-select * from test.t3 where b=5;
+select * from test.t1 force index(index_b) where b=5;
+select * from test.t2 force index(index_b) where b=5;
+select * from test.t3 force index(index_b) where b=5;
--connection default
@@ -202,9 +236,9 @@ update test.t1 set d=d+1 where a=301;
update test.t2 set d=d+1 where a=301;
update test.t3 set d=d+1 where a=301;
# select with index
-select * from test.t1 where b=5;
-select * from test.t2 where b=5;
-select * from test.t3 where b=5;
+select * from test.t1 force index(index_b) where b=5;
+select * from test.t2 force index(index_b) where b=5;
+select * from test.t3 force index(index_b) where b=5;
--connection default
@@ -257,9 +291,9 @@ update test.t1 set d=d+1 where a=401;
update test.t2 set d=d+1 where a=401;
update test.t3 set d=d+1 where a=401;
# select with index
-select * from test.t1 where b=5;
-select * from test.t2 where b=5;
-select * from test.t3 where b=5;
+select * from test.t1 force index(index_b) where b=5;
+select * from test.t2 force index(index_b) where b=5;
+select * from test.t3 force index(index_b) where b=5;
--connection default
@@ -494,4 +528,5 @@ execute dump_waits_table_lock;
execute dump_objects_summary;
# On test failures, may help to track the root cause
-show status like "performance_schema%";
+show global status like "performance_schema%";
+
diff --git a/mysql-test/suite/perfschema/include/table_aggregate_setup.inc b/mysql-test/suite/perfschema/include/table_aggregate_setup.inc
index 79aa5482838..79f7bd70a3f 100644
--- a/mysql-test/suite/perfschema/include/table_aggregate_setup.inc
+++ b/mysql-test/suite/perfschema/include/table_aggregate_setup.inc
@@ -222,7 +222,9 @@ prepare dump_waits_global from
order by event_name;";
prepare dump_waits_history from
- "select event_name, count(event_name), object_type, object_schema, object_name
+ "select event_name,
+ sum(if(number_of_bytes is null, 1, number_of_bytes)) as 'count(event_name)',
+ object_type, object_schema, object_name
from performance_schema.events_waits_history_long
where event_name in
(\'wait/io/table/sql/handler\',
@@ -254,7 +256,7 @@ prepare dump_waits_table_lock from
count_read_normal, count_read_with_shared_locks,
count_read_high_priority, count_read_no_insert,
count_read_external,
- count_write_delayed, count_write_low_priority,
+ count_write_low_priority,
count_write_external
from performance_schema.table_lock_waits_summary_by_table
where object_type='TABLE' and object_schema='test'
diff --git a/mysql-test/suite/perfschema/include/table_io_result_helper.inc b/mysql-test/suite/perfschema/include/table_io_result_helper.inc
index 4732806488e..66431b6a8c6 100644
--- a/mysql-test/suite/perfschema/include/table_io_result_helper.inc
+++ b/mysql-test/suite/perfschema/include/table_io_result_helper.inc
@@ -14,8 +14,7 @@ eval select event_name,
order by thread_id, event_id;
# In case of failures, this will tell if table io are lost.
-show status where Variable_name like 'performance_schema_%' and
- Variable_name not like 'performance_schema_%_classes_lost';
+show global status like 'performance_schema_%';
# Cleanup
truncate performance_schema.events_waits_history_long;
diff --git a/mysql-test/suite/perfschema/include/transaction_cleanup.inc b/mysql-test/suite/perfschema/include/transaction_cleanup.inc
new file mode 100644
index 00000000000..3b8ed02d6b6
--- /dev/null
+++ b/mysql-test/suite/perfschema/include/transaction_cleanup.inc
@@ -0,0 +1,12 @@
+# Tests for the performance schema
+
+# ==========================================
+# HELPER include/transaction_cleanup.inc
+# ==========================================
+
+DROP PROCEDURE clear_transaction_tables;
+DROP PROCEDURE clear_transaction_history;
+DROP PROCEDURE clear_statement_history;
+DROP PROCEDURE clear_history;
+DROP PROCEDURE transaction_verifier;
+
diff --git a/mysql-test/suite/perfschema/include/transaction_nested_events_verifier.inc b/mysql-test/suite/perfschema/include/transaction_nested_events_verifier.inc
new file mode 100644
index 00000000000..baee5e840a5
--- /dev/null
+++ b/mysql-test/suite/perfschema/include/transaction_nested_events_verifier.inc
@@ -0,0 +1,145 @@
+# Tests for the performance schema
+
+# =====================================================
+# HELPER include/transaction_nested_events_verifier.inc
+# =====================================================
+
+--connection default
+--disable_query_log
+
+# Poll till the activity of the actor connection con1 caused by the last
+# statement issued has finished.
+let $wait_timeout= 10;
+let $wait_condition=
+ SELECT COUNT(*) > 0 FROM performance_schema.threads
+ WHERE THREAD_ID = @con1_thread_id
+ AND PROCESSLIST_COMMAND = 'Sleep';
+--source include/wait_condition.inc
+if(!$success)
+{
+ --echo # The activity of connection con1 did not finish.
+ SELECT thread_id , PROCESSLIST_id, PROCESSLIST_STATE, PROCESSLIST_INFO
+ FROM performance_schema.threads
+ WHERE thread_id = @con1_thread_id;
+ --echo # Abort.
+ exit;
+}
+
+--echo #========================================================================
+--echo # Verify
+--echo #========================================================================
+
+SELECT event_id into @base_tx_event_id
+ from performance_schema.events_transactions_history_long
+ where (THREAD_ID = @con1_thread_id)
+ order by event_id limit 1;
+
+SELECT event_id into @base_stmt_event_id from performance_schema.events_statements_history_long
+ where (THREAD_ID = @con1_thread_id)
+ order by event_id limit 1;
+
+select if(@base_tx_event_id < @base_stmt_event_id,
+ @base_tx_event_id - 1,
+ @base_stmt_event_id - 1)
+ into @base_event_id;
+
+# Debug helpers
+# set @base_event_id = 0;
+# select @base_tx_event_id, @base_stmt_event_id, @base_event_id;
+
+--echo #
+--echo # EVENTS_TRANSACTIONS_CURRENT
+--echo #
+
+--replace_column 1 thread_id
+
+SELECT THREAD_ID,
+ LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
+ LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
+ RPAD(EVENT_NAME, 11, ' ') 'EVENT_NAME ',
+ RPAD(STATE, 11, ' ') 'STATE ',
+ RPAD(ACCESS_MODE, 11, ' ') ACCESS_MODE,
+ RPAD(ISOLATION_LEVEL, 16, ' ') 'ISOLATION_LEVEL ',
+ RPAD(AUTOCOMMIT, 4, ' ') AUTO,
+ LPAD(NESTING_EVENT_ID - @base_event_id, 19, ' ') as R_NESTING_EVENT_ID,
+ RPAD(IFNULL(NESTING_EVENT_TYPE, 'NULL'), 18, ' ') NESTING_EVENT_TYPE
+FROM performance_schema.events_transactions_current
+WHERE ((THREAD_ID = @con1_thread_id) OR (@all_threads = 1))
+ORDER BY thread_id, event_id;
+
+--echo #
+--echo # EVENTS_TRANSACTIONS_HISTORY_LONG
+--echo #
+
+--replace_column 1 thread_id
+
+SELECT THREAD_ID,
+ LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
+ LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
+ RPAD(EVENT_NAME, 11, ' ') 'EVENT_NAME ',
+ RPAD(STATE, 11, ' ') 'STATE ',
+ RPAD(ACCESS_MODE, 11, ' ') ACCESS_MODE,
+ RPAD(ISOLATION_LEVEL, 16, ' ') 'ISOLATION_LEVEL ',
+ RPAD(AUTOCOMMIT, 4, ' ') AUTO,
+ LPAD(NESTING_EVENT_ID - @base_event_id, 19, ' ') as R_NESTING_EVENT_ID,
+ RPAD(IFNULL(NESTING_EVENT_TYPE, 'NULL'), 18, ' ') NESTING_EVENT_TYPE
+FROM performance_schema.events_transactions_history_long
+WHERE ((THREAD_ID = @con1_thread_id) OR (@all_threads = 1))
+ORDER BY thread_id, event_id;
+
+--echo #
+--echo # EVENTS_STATEMENTS_HISTORY_LONG
+--echo #
+
+--replace_column 1 thread_id
+
+SELECT THREAD_ID,
+ LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
+ LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
+ RPAD(EVENT_NAME, 30, ' ') 'EVENT_NAME ',
+ RPAD(IFNULL(object_name, 'NULL'), 12, ' ') 'OBJECT_NAME ',
+ LPAD(IFNULL(NESTING_EVENT_ID - @base_event_id, 'NULL'), 19, ' ') as R_NESTING_EVENT_ID,
+ RPAD(IFNULL(NESTING_EVENT_TYPE, 'NULL'), 18, ' ') NESTING_EVENT_TYPE,
+ LPAD(NESTING_EVENT_LEVEL, 5, ' ') LEVEL,
+ SQL_TEXT
+FROM performance_schema.events_statements_history_long
+WHERE ((THREAD_ID = @con1_thread_id) OR (@all_threads = 1))
+ORDER BY thread_id, event_id;
+
+--echo #
+--echo ### Combined statement and transaction event history ordered by event id
+--echo #
+--echo #EVENTS_STATEMENTS_HISTORY_LONG + EVENTS_TRANSACTIONS_HISTORY_LONG
+--echo #
+
+--replace_column 1 thread_id
+
+SELECT THREAD_ID,
+ LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
+ LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
+ RPAD(EVENT_NAME, 25, ' ') 'EVENT_NAME ',
+ LPAD(NESTING_EVENT_ID - @base_event_id, 19, ' ') as R_NESTING_EVENT_ID,
+ RPAD(IFNULL(NESTING_EVENT_TYPE, 'NULL'), 18, ' ') NESTING_EVENT_TYPE,
+ '<transaction started>' AS SQL_TXT
+FROM performance_schema.events_transactions_history_long t
+WHERE (t.thread_id = @con1_thread_id)
+UNION
+SELECT THREAD_ID,
+ LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
+ LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
+ RPAD(EVENT_NAME, 25, ' ') 'EVENT_NAME ',
+ LPAD(IFNULL(NESTING_EVENT_ID - @base_event_id, 'NULL'), 19, ' ') as R_NESTING_EVENT_ID,
+ RPAD(IFNULL(NESTING_EVENT_TYPE, 'NULL'), 18, ' ') NESTING_EVENT_TYPE,
+ SQL_TEXT
+FROM performance_schema.events_statements_history_long s
+WHERE ((s.thread_id = @con1_thread_id) OR (@all_threads = 1))
+ORDER BY thread_id, r_event_id;
+
+--echo #
+--echo ### Clear statement and transaction history
+--echo # CALL test.clear_history();
+CALL test.clear_history();
+--enable_query_log
+--echo ## Reset db.t1
+DELETE FROM db.t1;
+--echo #
diff --git a/mysql-test/suite/perfschema/include/transaction_setup.inc b/mysql-test/suite/perfschema/include/transaction_setup.inc
new file mode 100644
index 00000000000..78697425731
--- /dev/null
+++ b/mysql-test/suite/perfschema/include/transaction_setup.inc
@@ -0,0 +1,231 @@
+# Tests for the performance schema
+
+# ==========================================
+# HELPER include/transaction_setup.inc
+# ==========================================
+
+#
+# UTILITY QUERIES
+#
+let $get_thread_id=
+ SELECT thread_id INTO @my_thread_id
+ FROM performance_schema.threads
+ WHERE processlist_id = connection_id();
+
+let $disable_instruments=
+ UPDATE performance_schema.setup_instruments
+ SET enabled='no', timed='no'
+ WHERE name IN ('transaction');
+
+let $enable_instruments=
+ UPDATE performance_schema.setup_instruments
+ SET enabled='yes', timed='yes'
+ WHERE name IN ('transaction');
+
+let $def_count = -1;
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS clear_transaction_tables;
+--enable_warnings
+
+--disable_result_log
+
+DELIMITER $$;
+CREATE PROCEDURE clear_transaction_tables()
+BEGIN
+ truncate table performance_schema.events_transactions_current;
+ truncate table performance_schema.events_transactions_history;
+ truncate table performance_schema.events_transactions_history_long;
+ truncate table performance_schema.events_transactions_summary_by_thread_by_event_name;
+ truncate table performance_schema.events_transactions_summary_by_account_by_event_name;
+ truncate table performance_schema.events_transactions_summary_by_host_by_event_name;
+ truncate table performance_schema.events_transactions_summary_by_user_by_event_name;
+ truncate table performance_schema.events_transactions_summary_global_by_event_name;
+END$$
+
+CREATE PROCEDURE clear_transaction_history()
+BEGIN
+ truncate table performance_schema.events_transactions_current;
+ truncate table performance_schema.events_transactions_history;
+ truncate table performance_schema.events_transactions_history_long;
+END$$
+
+CREATE PROCEDURE clear_statement_history()
+BEGIN
+ truncate table performance_schema.events_statements_current;
+ truncate table performance_schema.events_statements_history;
+ truncate table performance_schema.events_statements_history_long;
+END$$
+
+CREATE PROCEDURE clear_history()
+BEGIN
+ truncate table performance_schema.events_statements_current;
+ truncate table performance_schema.events_statements_history;
+ truncate table performance_schema.events_statements_history_long;
+ truncate table performance_schema.events_transactions_current;
+ truncate table performance_schema.events_transactions_history;
+ truncate table performance_schema.events_transactions_history_long;
+END$$
+
+CREATE PROCEDURE transaction_verifier(IN i_table INT,
+ IN i_thread_id INT,
+ IN i_event_name VARCHAR(64),
+ IN i_state VARCHAR(32),
+ IN i_xid_format_id INT,
+ IN i_xid_gtrid VARCHAR(130),
+ IN i_xid_bqual VARCHAR(130),
+ IN i_xa_state VARCHAR(64),
+ IN i_gtid VARCHAR(64),
+ IN i_access_mode VARCHAR(32),
+ IN i_isolation_level VARCHAR(64),
+ IN i_autocommit VARCHAR(16),
+ IN i_savepoints INT,
+ IN i_rb_savepoint INT,
+ IN i_rel_savepoint INT,
+ IN i_expected INT)
+BEGIN
+ DECLARE table_name VARCHAR(64);
+ SET @thread_id = i_thread_id;
+ SET @event_id = 0;
+ SET @event_name = i_event_name;
+ SET @state = i_state;
+ SET @xid_format_id = i_xid_format_id;
+ SET @xid_gtrid = i_xid_gtrid;
+ SET @xid_bqual = i_xid_bqual;
+ SET @xa_state = i_xa_state;
+ SET @gtid = i_gtid;
+ SET @access_mode = i_access_mode;
+ SET @isolation_level = i_isolation_level;
+ SET @autocommit = i_autocommit;
+ SET @savepoints = i_savepoints;
+ SET @rb_savepoint = i_rb_savepoint;
+ SET @rel_savepoint = i_rel_savepoint;
+ SET @expected = i_expected;
+
+ #
+ # Build verification query based upon input parameters
+ #
+
+ IF i_table = 0 THEN
+ SET table_name = 'performance_schema.events_transactions_current';
+ ELSEIF i_table = 1 THEN
+ SET table_name = 'performance_schema.events_transactions_history';
+ ELSEIF i_table = 2 THEN
+ SET table_name = 'performance_schema.events_transactions_history_long';
+ ELSE
+ SET table_name = 'performance_schema.events_transactions_history';
+ END IF;
+
+ SET @query = CONCAT('SELECT COUNT(*) INTO @actual FROM ', table_name, ' WHERE');
+
+ IF i_thread_id != 0 THEN
+ SET @query = CONCAT(@query, ' (thread_id = @thread_id)');
+ END IF;
+ IF i_event_name != '' THEN
+ SET @query = CONCAT(@query, ' AND (event_name = @event_name)');
+ END IF;
+ IF i_state != '' THEN
+ SET @query = CONCAT(@query, ' AND (state = @state)');
+ END IF;
+ IF i_xid_format_id != '' THEN
+ SET @query = CONCAT(@query, ' AND (xid_format_id = @xid_format_id)');
+ END IF;
+ IF i_xid_gtrid != '' THEN
+ SET @query = CONCAT(@query, ' AND (xid_gtrid = @xid_gtrid)');
+ END IF;
+ IF i_xid_bqual != '' THEN
+ SET @query = CONCAT(@query, ' AND (xid_bqual = @xid_bqual)');
+ END IF;
+ IF i_xa_state != '' THEN
+ SET @query = CONCAT(@query, ' AND (xa_state = @xa_state)');
+ END IF;
+ IF i_gtid = 'NULL' THEN
+ SET @query = CONCAT(@query, ' AND (gtid IS NULL)');
+ ELSEIF i_gtid != '' THEN
+ SET @query = CONCAT(@query, ' AND (gtid = @gtid)');
+ END IF;
+ IF i_access_mode != '' THEN
+ SET @query = CONCAT(@query, ' AND (access_mode = @access_mode)');
+ END IF;
+ IF i_isolation_level != '' THEN
+ SET @query = CONCAT(@query, ' AND (isolation_level = @isolation_level)');
+ END IF;
+ IF i_autocommit != '' THEN
+ SET @query = CONCAT(@query, ' AND (autocommit = @autocommit)');
+ END IF;
+ IF i_savepoints != 0 THEN
+ SET @query = CONCAT(@query, ' AND (number_of_savepoints = @savepoints)');
+ END IF;
+ IF i_rb_savepoint != 0 THEN
+ SET @query = CONCAT(@query, ' AND (number_of_rollback_to_savepoint = @rb_savepoint)');
+ END IF;
+ IF i_rel_savepoint != 0 THEN
+ SET @query = CONCAT(@query, ' AND (number_of_release_savepoint = @rel_savepoint)');
+ END IF;
+
+ SET @query = CONCAT(@query, ' ORDER BY event_id;');
+
+ ## DEBUG ## SELECT * FROM performance_schema.events_transactions_history ORDER BY event_id;
+ ## SELECT @query AS "QUERY";
+ PREPARE stmt1 FROM @query;
+ EXECUTE stmt1;
+ DEALLOCATE PREPARE stmt1;
+
+ SELECT LPAD(@actual, 6, ' ') AS "ACTUAL", LPAD(@expected, 8, ' ') AS "EXPECTED";
+
+ IF @actual != @expected THEN
+ SELECT "" AS "ERROR: Row count mismatch";
+ SELECT @query AS "VERIFIER QUERY:";
+ SELECT "";
+
+ SET @columns = ' LPAD(@thread_id, 9, " ") AS thread_id,';
+ SET @columns = CONCAT(@columns, ' LPAD(@event_id, 10, " ") AS "..event_id",');
+ SET @columns = CONCAT(@columns, ' RPAD(@event_name, 11, " ") AS "event_name ",');
+ SET @columns = CONCAT(@columns, ' RPAD(@state, 11, " ") AS "state ",');
+ SET @columns = CONCAT(@columns, ' RPAD(@xid_format_id, 15, " ") AS "xid_format_id ",');
+ SET @columns = CONCAT(@columns, ' RPAD(@xid_gtrid, 15, " ") AS "xid_gtrid ",');
+ SET @columns = CONCAT(@columns, ' RPAD(@xid_bqual, 15, " ") AS "xid_bqual ",');
+ SET @columns = CONCAT(@columns, ' RPAD(@xa_state, 12, " ") AS "xa_state ",');
+ SET @columns = CONCAT(@columns, ' RPAD(@gtid, 38, " ") AS "gtid ",');
+ SET @columns = CONCAT(@columns, ' RPAD(@access_mode, 11, " ") AS access_mode,');
+ SET @columns = CONCAT(@columns, ' RPAD(@isolation_level, 16, " ") AS "isolation_level ",');
+ SET @columns = CONCAT(@columns, ' RPAD(@autocommit, 10, " ") AS autocommit,');
+ SET @columns = CONCAT(@columns, ' LPAD(@savepoints, 10, " ") AS savepoints,');
+ SET @columns = CONCAT(@columns, ' LPAD(@rb_savepoint, 21, " ") AS rollback_to_savepoint,');
+ SET @columns = CONCAT(@columns, ' LPAD(@rel_savepoint, 17, " ") AS release_savepoint');
+ SET @query2 = CONCAT('SELECT', ' LPAD(@expected, 13, " ") AS ROWS_EXPECTED, ', @columns, ';');
+# SET @query2 = CONCAT('SELECT " " AS EXPECTED, ', @columns, ';');
+ PREPARE stmt2 FROM @query2;
+ EXECUTE stmt2;
+ DEALLOCATE PREPARE stmt2;
+
+ SET @columns = ' LPAD(thread_id, 9, " ") AS thread_id,';
+ SET @columns = CONCAT(@columns, ' LPAD(event_id, 10, " ") AS "..event_id",');
+ SET @columns = CONCAT(@columns, ' RPAD(event_name, 11, " ") AS "event_name ",');
+ SET @columns = CONCAT(@columns, ' RPAD(state, 11, " ") AS "state ",');
+ SET @columns = CONCAT(@columns, ' RPAD(IFNULL(xid_format_id, "NULL"), 15, " ") AS "xid_format_id ",');
+ SET @columns = CONCAT(@columns, ' RPAD(IFNULL(xid_gtrid, "NULL"), 15, " ") AS "xid_gtrid ",');
+ SET @columns = CONCAT(@columns, ' RPAD(IFNULL(xid_bqual, "NULL"), 15, " ") AS "xid_bqual ",');
+ SET @columns = CONCAT(@columns, ' RPAD(IFNULL(xa_state, "NULL"), 12, " ") AS "xa_state ",');
+ SET @columns = CONCAT(@columns, ' RPAD(IFNULL(gtid, "NULL"), 38, " ") AS "gtid ",');
+ SET @columns = CONCAT(@columns, ' RPAD(access_mode, 11, " ") AS access_mode,');
+ SET @columns = CONCAT(@columns, ' RPAD(isolation_level, 16, " ") AS "isolation_level ",');
+ SET @columns = CONCAT(@columns, ' RPAD(autocommit, 10, " ") AS autocommit,');
+ SET @columns = CONCAT(@columns, ' LPAD(number_of_savepoints, 10, " ") AS savepoints,');
+ SET @columns = CONCAT(@columns, ' LPAD(number_of_rollback_to_savepoint, 21, " ") AS rollback_to_savepoint,');
+ SET @columns = CONCAT(@columns, ' LPAD(number_of_release_savepoint, 17, " ") AS release_savepoint');
+# SET @query3 = CONCAT('SELECT " " AS "ACTUAL ", ', @columns, ' FROM ', table_name, ' ORDER BY event_id;');
+ SET @query3 = CONCAT('SELECT', ' LPAD(@actual, 13, " ") AS "ROWS_ACTUAL ",', @columns, ' FROM ', table_name, ' ORDER BY event_id;');
+ PREPARE stmt3 FROM @query3;
+ EXECUTE stmt3;
+ DEALLOCATE PREPARE stmt3;
+
+ END IF;
+END$$
+
+DELIMITER ;$$
+
+--enable_result_log
+
+
+
diff --git a/mysql-test/suite/perfschema/include/upgrade_check.inc b/mysql-test/suite/perfschema/include/upgrade_check.inc
index 79a81311b05..c16e90c78c2 100644
--- a/mysql-test/suite/perfschema/include/upgrade_check.inc
+++ b/mysql-test/suite/perfschema/include/upgrade_check.inc
@@ -13,4 +13,3 @@
--remove_file $MYSQLTEST_VARDIR/tmp/out_file
--remove_file $MYSQLTEST_VARDIR/tmp/err_file
--remove_file $MYSQLD_DATADIR/mysql_upgrade_info
-
diff --git a/mysql-test/suite/perfschema/include/wait_for_pfs_thread_count.inc b/mysql-test/suite/perfschema/include/wait_for_pfs_thread_count.inc
index a2ed41d9d1b..2375bdf1cac 100644
--- a/mysql-test/suite/perfschema/include/wait_for_pfs_thread_count.inc
+++ b/mysql-test/suite/perfschema/include/wait_for_pfs_thread_count.inc
@@ -14,7 +14,7 @@ let $wait_condition=
# Because instrumentation is optional, we use "<=" here.
let $wait_condition=
- select count(*) <= 1 from performance_schema.threads
+ select count(*) <= 2 from performance_schema.threads
where `TYPE`='FOREGROUND';
--source include/wait_condition.inc
diff --git a/mysql-test/suite/perfschema/r/all_tests.result b/mysql-test/suite/perfschema/r/all_tests.result
index 3f413ca9a1e..6b343d9d801 100644
--- a/mysql-test/suite/perfschema/r/all_tests.result
+++ b/mysql-test/suite/perfschema/r/all_tests.result
@@ -10,10 +10,13 @@ where table_schema='performance_schema';
update t2 set test_name= replace(test_name, "events_waits_summary_", "ews_");
update t2 set test_name= replace(test_name, "events_stages_summary_", "esgs_");
update t2 set test_name= replace(test_name, "events_statements_summary_", "esms_");
+update t2 set test_name= replace(test_name, "events_transactions_summary_", "ets_");
update t2 set test_name= replace(test_name, "file_summary_", "fs_");
update t2 set test_name= replace(test_name, "objects_summary_", "os_");
update t2 set test_name= replace(test_name, "table_io_waits_summary_", "tiws_");
update t2 set test_name= replace(test_name, "table_lock_waits_summary_", "tlws_");
+update t2 set test_name= replace(test_name, "memory_summary_", "mems_");
+update t2 set test_name= replace(test_name, "user_variables_", "uvar_");
delete from t2 where t2.test_name in (select t1.test_name from t1);
select test_name as `MISSING DDL/DML TESTS` from t2;
MISSING DDL/DML TESTS
diff --git a/mysql-test/suite/perfschema/r/alter_table_progress.result b/mysql-test/suite/perfschema/r/alter_table_progress.result
new file mode 100644
index 00000000000..08c2c3a6145
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/alter_table_progress.result
@@ -0,0 +1,100 @@
+connect con1, localhost, root, , ;
+drop table if exists t1;
+create table t1(a int) engine = myisam;
+insert into t1 values (1), (2), (3), (4), (5);
+connection default;
+update performance_schema.threads
+set instrumented = 'NO'
+ where processlist_id = connection_id();
+truncate table performance_schema.events_statements_history_long;
+truncate table performance_schema.events_stages_history_long;
+connection con1;
+SET DEBUG_SYNC='RESET';
+SET DEBUG_SYNC='copy_data_between_tables_before SIGNAL found_row WAIT_FOR wait_row EXECUTE 5';
+ALTER TABLE t1 engine = innodb;;
+connection default;
+SET DEBUG_SYNC='now WAIT_FOR found_row';
+select event_id from performance_schema.events_statements_current
+where thread_id = @con1_thread_id into @con1_stmt_id;
+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_NAME, WORK_COMPLETED, WORK_ESTIMATED
+from performance_schema.events_stages_current
+where (thread_id = @con1_thread_id);
+EVENT_NAME WORK_COMPLETED WORK_ESTIMATED
+stage/sql/copy to tmp table 0 5
+SET DEBUG_SYNC='now SIGNAL wait_row';
+SET DEBUG_SYNC='now WAIT_FOR found_row';
+select EVENT_NAME, WORK_COMPLETED, WORK_ESTIMATED
+from performance_schema.events_stages_current
+where (thread_id = @con1_thread_id);
+EVENT_NAME WORK_COMPLETED WORK_ESTIMATED
+stage/sql/copy to tmp table 1 5
+SET DEBUG_SYNC='now SIGNAL wait_row';
+SET DEBUG_SYNC='now WAIT_FOR found_row';
+select EVENT_NAME, WORK_COMPLETED, WORK_ESTIMATED
+from performance_schema.events_stages_current
+where (thread_id = @con1_thread_id);
+EVENT_NAME WORK_COMPLETED WORK_ESTIMATED
+stage/sql/copy to tmp table 2 5
+SET DEBUG_SYNC='now SIGNAL wait_row';
+SET DEBUG_SYNC='now WAIT_FOR found_row';
+select EVENT_NAME, WORK_COMPLETED, WORK_ESTIMATED
+from performance_schema.events_stages_current
+where (thread_id = @con1_thread_id);
+EVENT_NAME WORK_COMPLETED WORK_ESTIMATED
+stage/sql/copy to tmp table 3 5
+SET DEBUG_SYNC='now SIGNAL wait_row';
+SET DEBUG_SYNC='now WAIT_FOR found_row';
+select EVENT_NAME, WORK_COMPLETED, WORK_ESTIMATED
+from performance_schema.events_stages_current
+where (thread_id = @con1_thread_id);
+EVENT_NAME WORK_COMPLETED WORK_ESTIMATED
+stage/sql/copy to tmp table 4 5
+SET DEBUG_SYNC='now SIGNAL wait_row';
+connection con1;
+select "After payload";
+After payload
+After payload
+connection default;
+# Dumping ALTER TABLE stages
+select EVENT_NAME, WORK_COMPLETED, WORK_ESTIMATED
+from performance_schema.events_stages_history_long
+where (thread_id = @con1_thread_id)
+and (nesting_event_id = @con1_stmt_id)
+order by thread_id, event_id;
+EVENT_NAME WORK_COMPLETED WORK_ESTIMATED
+stage/sql/starting NULL NULL
+stage/sql/checking permissions NULL NULL
+stage/sql/init for update NULL NULL
+stage/sql/Opening tables NULL NULL
+stage/sql/After opening tables NULL NULL
+stage/sql/setup NULL NULL
+stage/sql/creating table NULL NULL
+stage/sql/After create NULL NULL
+stage/sql/System lock NULL NULL
+stage/sql/table lock NULL NULL
+stage/sql/After create NULL NULL
+stage/sql/copy to tmp table 5 5
+stage/sql/Enabling keys NULL NULL
+stage/sql/Rename result table NULL NULL
+stage/sql/Unlocking tables NULL NULL
+stage/sql/Rename result table NULL NULL
+stage/sql/End of update loop NULL NULL
+stage/sql/Query end NULL NULL
+stage/sql/Commit NULL NULL
+stage/sql/closing tables NULL NULL
+stage/sql/Unlocking tables NULL NULL
+stage/sql/closing tables NULL NULL
+stage/sql/Commit implicit NULL NULL
+stage/sql/Starting cleanup NULL NULL
+stage/sql/Freeing items NULL NULL
+stage/sql/Reset for next command NULL NULL
+SET DEBUG_SYNC='RESET';
+connection con1;
+drop table t1;
+disconnect con1;
+connection default;
+update performance_schema.threads
+set instrumented = 'YES'
+ where processlist_id = connection_id();
diff --git a/mysql-test/suite/perfschema/r/bad_option.result b/mysql-test/suite/perfschema/r/bad_option.result
new file mode 100644
index 00000000000..b14dad9600e
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/bad_option.result
@@ -0,0 +1,8 @@
+FOUND 1 /\[ERROR\].*unknown variable 'performance-schema-enabled=maybe'/ in my_restart.err
+# Server start with invalid startup option value 'performance-schema-enabled=maybe' : pass
+FOUND 1 /\[ERROR\].*unknown variable 'performance-schema-max_=12'/ in my_restart.err
+# Server start with ambigous startup option 'performance-schema-max_=12' : pass
+FOUND 1 /\[ERROR\].*unknown option '--performance-schema-unknown_99'/ in my_restart.err
+# Server start with invalid startup option '--performance-schema-unknown_99' : pass
+FOUND 1 /Can.t change dir to .*bad_option_h_param/ in my_restart.err
+# Server start with invalid startup option value '--datadir=bad_option_h_param' : pass
diff --git a/mysql-test/suite/perfschema/r/bad_option_1.result b/mysql-test/suite/perfschema/r/bad_option_1.result
deleted file mode 100644
index 05ff5663882..00000000000
--- a/mysql-test/suite/perfschema/r/bad_option_1.result
+++ /dev/null
@@ -1,4 +0,0 @@
-# Kill the server
-Found: unknown variable 'performance-schema-enabled=maybe'
-Found: Aborting
-# restart
diff --git a/mysql-test/suite/perfschema/r/bad_option_2.result b/mysql-test/suite/perfschema/r/bad_option_2.result
deleted file mode 100644
index c2809525827..00000000000
--- a/mysql-test/suite/perfschema/r/bad_option_2.result
+++ /dev/null
@@ -1,3 +0,0 @@
-# Kill the server
-FOUND 1 /ambiguous option '--performance-schema-max_=12'/ in bad_option_2.txt
-# restart
diff --git a/mysql-test/suite/perfschema/r/bad_option_3.result b/mysql-test/suite/perfschema/r/bad_option_3.result
deleted file mode 100644
index 1981f0b2044..00000000000
--- a/mysql-test/suite/perfschema/r/bad_option_3.result
+++ /dev/null
@@ -1,4 +0,0 @@
-# Kill the server
-Found: unknown option '-x'
-Found: Aborting
-# restart
diff --git a/mysql-test/suite/perfschema/r/bad_option_4.result b/mysql-test/suite/perfschema/r/bad_option_4.result
deleted file mode 100644
index 1d50a80be3d..00000000000
--- a/mysql-test/suite/perfschema/r/bad_option_4.result
+++ /dev/null
@@ -1,4 +0,0 @@
-# Kill the server
-Found: Can't change dir to.*bad_option_h_param
-Found: Aborting
-# restart
diff --git a/mysql-test/suite/perfschema/r/bad_option_5.result b/mysql-test/suite/perfschema/r/bad_option_5.result
deleted file mode 100644
index 840717023ac..00000000000
--- a/mysql-test/suite/perfschema/r/bad_option_5.result
+++ /dev/null
@@ -1,4 +0,0 @@
-# Kill the server
-Found: unknown option '-X'
-Found: Aborting
-# restart
diff --git a/mysql-test/suite/perfschema/r/batch_table_io_func.result b/mysql-test/suite/perfschema/r/batch_table_io_func.result
new file mode 100644
index 00000000000..212c08c7e90
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/batch_table_io_func.result
@@ -0,0 +1,195 @@
+UPDATE performance_schema.setup_instruments SET enabled = 'NO', timed = 'YES';
+UPDATE performance_schema.setup_instruments SET enabled = 'YES'
+WHERE name in ('wait/io/table/sql/handler',
+'wait/lock/table/sql/handler');
+drop procedure if exists before_payload;
+drop procedure if exists after_payload;
+create procedure before_payload()
+begin
+TRUNCATE TABLE performance_schema.table_io_waits_summary_by_index_usage;
+TRUNCATE TABLE performance_schema.table_io_waits_summary_by_table;
+TRUNCATE TABLE performance_schema.events_waits_history_long;
+TRUNCATE TABLE performance_schema.events_waits_history;
+TRUNCATE TABLE performance_schema.events_waits_current;
+end
+$$
+create procedure after_payload()
+begin
+select count(1) as number_seen,
+OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME, INDEX_NAME,
+OPERATION, NUMBER_OF_BYTES
+from performance_schema.events_waits_history_long
+where OBJECT_SCHEMA = "test"
+ group by OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME, INDEX_NAME, OPERATION, NUMBER_OF_BYTES;
+select OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME, INDEX_NAME,
+COUNT_STAR, COUNT_READ, COUNT_WRITE
+from performance_schema.table_io_waits_summary_by_index_usage
+where OBJECT_SCHEMA = "test"
+ order by OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME, INDEX_NAME;
+select OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME,
+COUNT_STAR, COUNT_READ, COUNT_WRITE
+from performance_schema.table_io_waits_summary_by_table
+where OBJECT_SCHEMA = "test"
+ order by OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME;
+end
+$$
+drop table if exists t1;
+drop table if exists t2;
+drop table if exists t3;
+create table t0(v int);
+create table t1(id1 int, a int);
+create table t2(id1 int, id2 int, b int);
+create table t3(id2 int, id3 int, c int);
+insert into t0 values
+(0), (1), (2), (3), (4),
+(5), (6), (7), (8), (9);
+insert into t1(id1, a)
+select v, 100*v from t0;
+insert into t2(id1, id2, b)
+select X.v, 10*X.v + Y.v, 100*X.v + 10*Y.v
+from t0 X, t0 Y;
+insert into t3(id2, id3, c)
+select 10*X.v + Y.v, 100*X.v + 10*Y.v + Z.v, 100*X.v + 10*Y.v + Z.v
+from t0 X, t0 Y, t0 Z;
+analyze table t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+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 status OK
+analyze table t3;
+Table Op Msg_type Msg_text
+test.t3 analyze status Engine-independent statistics collected
+test.t3 analyze status OK
+select * from t1 order by a;
+id1 a
+0 0
+1 100
+2 200
+3 300
+4 400
+5 500
+6 600
+7 700
+8 800
+9 900
+select * from t2
+where (b >= 180) and (b <= 220)
+order by b;
+id1 id2 b
+1 18 180
+1 19 190
+2 20 200
+2 21 210
+2 22 220
+select * from t3
+where (c >= 587) and (c <= 612)
+order by c;
+id2 id3 c
+58 587 587
+58 588 588
+58 589 589
+59 590 590
+59 591 591
+59 592 592
+59 593 593
+59 594 594
+59 595 595
+59 596 596
+59 597 597
+59 598 598
+59 599 599
+60 600 600
+60 601 601
+60 602 602
+60 603 603
+60 604 604
+60 605 605
+60 606 606
+60 607 607
+60 608 608
+60 609 609
+61 610 610
+61 611 611
+61 612 612
+explain extended select t1.*, t2.*, t3.*
+from t1 join t2 using (id1) join t3 using (id2);
+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
+1 SIMPLE t2 ALL NULL NULL NULL NULL 100 100.00 Using where; Using join buffer (flat, BNL join)
+1 SIMPLE t3 ALL NULL NULL NULL NULL 1000 100.00 Using where; Using join buffer (incremental, BNL join)
+Warnings:
+Note 1003 select `test`.`t1`.`id1` AS `id1`,`test`.`t1`.`a` AS `a`,`test`.`t2`.`id1` AS `id1`,`test`.`t2`.`id2` AS `id2`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`id2` AS `id2`,`test`.`t3`.`id3` AS `id3`,`test`.`t3`.`c` AS `c` from `test`.`t1` join `test`.`t2` join `test`.`t3` where `test`.`t3`.`id2` = `test`.`t2`.`id2` and `test`.`t2`.`id1` = `test`.`t1`.`id1`
+call before_payload();
+select t1.*, t2.*, t3.*
+from t1 join t2 using (id1) join t3 using (id2);
+call after_payload();
+number_seen OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME INDEX_NAME OPERATION NUMBER_OF_BYTES
+11 TABLE test t1 NULL fetch 1
+1 TABLE test t1 NULL read external NULL
+1 TABLE test t1 NULL read normal NULL
+101 TABLE test t2 NULL fetch 1
+1 TABLE test t2 NULL read external NULL
+1 TABLE test t2 NULL read normal NULL
+1 TABLE test t3 NULL fetch 1000
+1 TABLE test t3 NULL read external NULL
+1 TABLE test t3 NULL read normal NULL
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME INDEX_NAME COUNT_STAR COUNT_READ COUNT_WRITE
+TABLE test t0 NULL 0 0 0
+TABLE test t1 NULL 11 11 0
+TABLE test t2 NULL 101 101 0
+TABLE test t3 NULL 1000 1000 0
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME COUNT_STAR COUNT_READ COUNT_WRITE
+TABLE test t0 0 0 0
+TABLE test t1 11 11 0
+TABLE test t2 101 101 0
+TABLE test t3 1000 1000 0
+alter table t1 add unique index(id1);
+alter table t2 add unique index(id2);
+alter table t2 add index(id1);
+alter table t3 add unique index(id3);
+alter table t3 add index(id2);
+explain extended select t1.*, t2.*, t3.*
+from t1 join t2 using (id1) join t3 using (id2);
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL id1 NULL NULL NULL 10 100.00 Using where
+1 SIMPLE t2 ref id2,id1 id1 5 test.t1.id1 10 100.00 Using where
+1 SIMPLE t3 ref id2 id2 5 test.t2.id2 10 100.00
+Warnings:
+Note 1003 select `test`.`t1`.`id1` AS `id1`,`test`.`t1`.`a` AS `a`,`test`.`t2`.`id1` AS `id1`,`test`.`t2`.`id2` AS `id2`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`id2` AS `id2`,`test`.`t3`.`id3` AS `id3`,`test`.`t3`.`c` AS `c` from `test`.`t1` join `test`.`t2` join `test`.`t3` where `test`.`t3`.`id2` = `test`.`t2`.`id2` and `test`.`t2`.`id1` = `test`.`t1`.`id1`
+call before_payload();
+select t1.*, t2.*, t3.*
+from t1 join t2 using (id1) join t3 using (id2);
+call after_payload();
+number_seen OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME INDEX_NAME OPERATION NUMBER_OF_BYTES
+11 TABLE test t1 NULL fetch 1
+1 TABLE test t1 id1 read external NULL
+1 TABLE test t1 id1 read normal NULL
+110 TABLE test t2 id1 fetch 1
+1 TABLE test t2 id2 read external NULL
+1 TABLE test t2 id2 read normal NULL
+100 TABLE test t3 id2 fetch 10
+1 TABLE test t3 id3 read external NULL
+1 TABLE test t3 id3 read normal NULL
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME INDEX_NAME COUNT_STAR COUNT_READ COUNT_WRITE
+TABLE test t0 NULL 0 0 0
+TABLE test t1 NULL 11 11 0
+TABLE test t1 id1 0 0 0
+TABLE test t2 id1 110 110 0
+TABLE test t2 id2 0 0 0
+TABLE test t3 id2 1000 1000 0
+TABLE test t3 id3 0 0 0
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME COUNT_STAR COUNT_READ COUNT_WRITE
+TABLE test t0 0 0 0
+TABLE test t1 11 11 0
+TABLE test t2 110 110 0
+TABLE test t3 1000 1000 0
+drop table t0;
+drop table t1;
+drop table t2;
+drop table t3;
+drop procedure before_payload;
+drop procedure after_payload;
+UPDATE performance_schema.setup_instruments SET enabled = 'YES', timed = 'YES';
diff --git a/mysql-test/suite/perfschema/r/binlog_edge_mix.result b/mysql-test/suite/perfschema/r/binlog_edge_mix.result
index b9673e74855..e4b95cb69ff 100644
--- a/mysql-test/suite/perfschema/r/binlog_edge_mix.result
+++ b/mysql-test/suite/perfschema/r/binlog_edge_mix.result
@@ -84,19 +84,19 @@ Warnings:
Note 1051 Unknown table 'test.marker_multi_delete'
use my_replicated_db;
insert into performance_schema.setup_actors
-values ('FOO', 'FOO', 'FOO');
+values ('FOO', 'FOO', 'FOO', 'YES', 'YES');
delete my_tx_table.*, performance_schema.setup_actors.*
from my_tx_table, performance_schema.setup_actors
where my_tx_table.a != 1000
or performance_schema.setup_actors.role='FOO';
insert into performance_schema.setup_actors
-values ('BAR', 'BAR', 'BAR');
+values ('BAR', 'BAR', 'BAR', 'YES', 'YES');
delete my_non_tx_table.*, performance_schema.setup_actors.*
from my_non_tx_table, performance_schema.setup_actors
where my_non_tx_table.a != 1000
or performance_schema.setup_actors.role='BAR';
insert into performance_schema.setup_actors
-values ('BAZ', 'BAZ', 'BAZ');
+values ('BAZ', 'BAZ', 'BAZ', 'YES', 'YES');
delete my_bh_table.*, performance_schema.setup_actors.*
from my_bh_table, performance_schema.setup_actors
where my_bh_table.a != 1000
@@ -175,4 +175,4 @@ master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `marker_end` /* generated by server */
master-bin.000001 # Query # # drop database my_replicated_db
truncate table performance_schema.setup_actors;
-insert into performance_schema.setup_actors values ('%', '%', '%');
+insert into performance_schema.setup_actors values ('%', '%', '%', 'YES', 'YES');
diff --git a/mysql-test/suite/perfschema/r/binlog_edge_row.result b/mysql-test/suite/perfschema/r/binlog_edge_row.result
index 40595a804f7..52296de4bb9 100644
--- a/mysql-test/suite/perfschema/r/binlog_edge_row.result
+++ b/mysql-test/suite/perfschema/r/binlog_edge_row.result
@@ -86,19 +86,19 @@ Warnings:
Note 1051 Unknown table 'test.marker_multi_delete'
use my_replicated_db;
insert into performance_schema.setup_actors
-values ('FOO', 'FOO', 'FOO');
+values ('FOO', 'FOO', 'FOO', 'YES', 'YES');
delete my_tx_table.*, performance_schema.setup_actors.*
from my_tx_table, performance_schema.setup_actors
where my_tx_table.a != 1000
or performance_schema.setup_actors.role='FOO';
insert into performance_schema.setup_actors
-values ('BAR', 'BAR', 'BAR');
+values ('BAR', 'BAR', 'BAR', 'YES', 'YES');
delete my_non_tx_table.*, performance_schema.setup_actors.*
from my_non_tx_table, performance_schema.setup_actors
where my_non_tx_table.a != 1000
or performance_schema.setup_actors.role='BAR';
insert into performance_schema.setup_actors
-values ('BAZ', 'BAZ', 'BAZ');
+values ('BAZ', 'BAZ', 'BAZ', 'YES', 'YES');
delete my_bh_table.*, performance_schema.setup_actors.*
from my_bh_table, performance_schema.setup_actors
where my_bh_table.a != 1000
@@ -180,4 +180,4 @@ master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `marker_end` /* generated by server */
master-bin.000001 # Query # # drop database my_replicated_db
truncate table performance_schema.setup_actors;
-insert into performance_schema.setup_actors values ('%', '%', '%');
+insert into performance_schema.setup_actors values ('%', '%', '%', 'YES', 'YES');
diff --git a/mysql-test/suite/perfschema/r/binlog_edge_stmt.result b/mysql-test/suite/perfschema/r/binlog_edge_stmt.result
index fdbf34b07a2..2a09614179f 100644
--- a/mysql-test/suite/perfschema/r/binlog_edge_stmt.result
+++ b/mysql-test/suite/perfschema/r/binlog_edge_stmt.result
@@ -120,19 +120,19 @@ Warnings:
Note 1051 Unknown table 'test.marker_multi_delete'
use my_replicated_db;
insert into performance_schema.setup_actors
-values ('FOO', 'FOO', 'FOO');
+values ('FOO', 'FOO', 'FOO', 'YES', 'YES');
delete my_tx_table.*, performance_schema.setup_actors.*
from my_tx_table, performance_schema.setup_actors
where my_tx_table.a != 1000
or performance_schema.setup_actors.role='FOO';
insert into performance_schema.setup_actors
-values ('BAR', 'BAR', 'BAR');
+values ('BAR', 'BAR', 'BAR', 'YES', 'YES');
delete my_non_tx_table.*, performance_schema.setup_actors.*
from my_non_tx_table, performance_schema.setup_actors
where my_non_tx_table.a != 1000
or performance_schema.setup_actors.role='BAR';
insert into performance_schema.setup_actors
-values ('BAZ', 'BAZ', 'BAZ');
+values ('BAZ', 'BAZ', 'BAZ', 'YES', 'YES');
delete my_bh_table.*, performance_schema.setup_actors.*
from my_bh_table, performance_schema.setup_actors
where my_bh_table.a != 1000
@@ -255,4 +255,4 @@ master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `marker_multi_del
master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `marker_end` /* generated by server */
master-bin.000001 # Query # # drop database my_replicated_db
truncate table performance_schema.setup_actors;
-insert into performance_schema.setup_actors values ('%', '%', '%');
+insert into performance_schema.setup_actors values ('%', '%', '%', 'YES', 'YES');
diff --git a/mysql-test/suite/perfschema/r/binlog_ok_mix.result b/mysql-test/suite/perfschema/r/binlog_ok_mix.result
index 3e6237e1256..cc2c08baa8d 100644
--- a/mysql-test/suite/perfschema/r/binlog_ok_mix.result
+++ b/mysql-test/suite/perfschema/r/binlog_ok_mix.result
@@ -43,10 +43,10 @@ values ('XXX', 'XXX', 'XXX'),
('ZZZ', 'ZZZ', 'ZZZ');
select * from performance_schema.setup_actors
where user in ('XXX', 'YYY', 'ZZZ') order by user;
-HOST USER ROLE
-XXX XXX XXX
-YYY YYY YYY
-ZZZ ZZZ ZZZ
+HOST USER ROLE ENABLED HISTORY
+XXX XXX XXX YES YES
+YYY YYY YYY YES YES
+ZZZ ZZZ ZZZ YES YES
insert into performance_schema.setup_objects
(object_type, object_schema, object_name, enabled, timed)
values ('TABLE', 'DB1', 'AAA', 'YES', 'YES'),
diff --git a/mysql-test/suite/perfschema/r/binlog_ok_row.result b/mysql-test/suite/perfschema/r/binlog_ok_row.result
index 5cf9062138c..0beea6ae878 100644
--- a/mysql-test/suite/perfschema/r/binlog_ok_row.result
+++ b/mysql-test/suite/perfschema/r/binlog_ok_row.result
@@ -43,10 +43,10 @@ values ('XXX', 'XXX', 'XXX'),
('ZZZ', 'ZZZ', 'ZZZ');
select * from performance_schema.setup_actors
where user in ('XXX', 'YYY', 'ZZZ') order by user;
-HOST USER ROLE
-XXX XXX XXX
-YYY YYY YYY
-ZZZ ZZZ ZZZ
+HOST USER ROLE ENABLED HISTORY
+XXX XXX XXX YES YES
+YYY YYY YYY YES YES
+ZZZ ZZZ ZZZ YES YES
insert into performance_schema.setup_objects
(object_type, object_schema, object_name, enabled, timed)
values ('TABLE', 'DB1', 'AAA', 'YES', 'YES'),
diff --git a/mysql-test/suite/perfschema/r/binlog_ok_stmt.result b/mysql-test/suite/perfschema/r/binlog_ok_stmt.result
index fe71c3024d1..9fd9af6c383 100644
--- a/mysql-test/suite/perfschema/r/binlog_ok_stmt.result
+++ b/mysql-test/suite/perfschema/r/binlog_ok_stmt.result
@@ -43,10 +43,10 @@ values ('XXX', 'XXX', 'XXX'),
('ZZZ', 'ZZZ', 'ZZZ');
select * from performance_schema.setup_actors
where user in ('XXX', 'YYY', 'ZZZ') order by user;
-HOST USER ROLE
-XXX XXX XXX
-YYY YYY YYY
-ZZZ ZZZ ZZZ
+HOST USER ROLE ENABLED HISTORY
+XXX XXX XXX YES YES
+YYY YYY YYY YES YES
+ZZZ ZZZ ZZZ YES YES
insert into performance_schema.setup_objects
(object_type, object_schema, object_name, enabled, timed)
values ('TABLE', 'DB1', 'AAA', 'YES', 'YES'),
diff --git a/mysql-test/suite/perfschema/r/checksum.result b/mysql-test/suite/perfschema/r/checksum.result
index f2a0f5a7713..1ed6e70e6de 100644
--- a/mysql-test/suite/perfschema/r/checksum.result
+++ b/mysql-test/suite/perfschema/r/checksum.result
@@ -16,6 +16,14 @@ checksum table performance_schema.events_statements_summary_by_host_by_event_nam
checksum table performance_schema.events_statements_summary_by_thread_by_event_name;
checksum table performance_schema.events_statements_summary_by_user_by_event_name;
checksum table performance_schema.events_statements_summary_global_by_event_name;
+checksum table performance_schema.events_transactions_current;
+checksum table performance_schema.events_transactions_history;
+checksum table performance_schema.events_transactions_history_long;
+checksum table performance_schema.events_transactions_summary_by_account_by_event_name;
+checksum table performance_schema.events_transactions_summary_by_host_by_event_name;
+checksum table performance_schema.events_transactions_summary_by_thread_by_event_name;
+checksum table performance_schema.events_transactions_summary_by_user_by_event_name;
+checksum table performance_schema.events_transactions_summary_global_by_event_name;
checksum table performance_schema.events_waits_current;
checksum table performance_schema.events_waits_history;
checksum table performance_schema.events_waits_history_long;
@@ -61,6 +69,14 @@ checksum table performance_schema.events_statements_summary_by_host_by_event_nam
checksum table performance_schema.events_statements_summary_by_thread_by_event_name extended;
checksum table performance_schema.events_statements_summary_by_user_by_event_name extended;
checksum table performance_schema.events_statements_summary_global_by_event_name extended;
+checksum table performance_schema.events_transactions_current extended;
+checksum table performance_schema.events_transactions_history extended;
+checksum table performance_schema.events_transactions_history_long extended;
+checksum table performance_schema.events_transactions_summary_by_account_by_event_name extended;
+checksum table performance_schema.events_transactions_summary_by_host_by_event_name extended;
+checksum table performance_schema.events_transactions_summary_by_thread_by_event_name extended;
+checksum table performance_schema.events_transactions_summary_by_user_by_event_name extended;
+checksum table performance_schema.events_transactions_summary_global_by_event_name extended;
checksum table performance_schema.events_waits_current extended;
checksum table performance_schema.events_waits_history extended;
checksum table performance_schema.events_waits_history_long extended;
diff --git a/mysql-test/suite/perfschema/r/cnf_option.result b/mysql-test/suite/perfschema/r/cnf_option.result
index 85adfb5113d..c991311d136 100644
--- a/mysql-test/suite/perfschema/r/cnf_option.result
+++ b/mysql-test/suite/perfschema/r/cnf_option.result
@@ -1,6 +1,6 @@
-show variables like 'performance_schema_max_thread_classes';
+show global variables like 'performance_schema_max_thread_classes';
Variable_name Value
performance_schema_max_thread_classes 12
-show variables like 'performance_schema_max_thread_instances';
+show global variables like 'performance_schema_max_thread_instances';
Variable_name Value
performance_schema_max_thread_instances 318
diff --git a/mysql-test/suite/perfschema/r/connect_attrs.result b/mysql-test/suite/perfschema/r/connect_attrs.result
index 5e45a4cd900..eb83cb5e886 100644
--- a/mysql-test/suite/perfschema/r/connect_attrs.result
+++ b/mysql-test/suite/perfschema/r/connect_attrs.result
@@ -38,9 +38,11 @@ FROM performance_schema.session_connect_attrs;
COUNT(DISTINCT PROCESSLIST_ID)
2
connection non_privileged_user;
+# must return 1
SELECT COUNT(DISTINCT PROCESSLIST_ID)
FROM performance_schema.session_account_connect_attrs;
-ERROR 42000: SELECT command denied to user 'wl5924'@'localhost' for table 'session_account_connect_attrs'
+COUNT(DISTINCT PROCESSLIST_ID)
+1
SELECT COUNT(DISTINCT PROCESSLIST_ID)
FROM performance_schema.session_connect_attrs;
ERROR 42000: SELECT command denied to user 'wl5924'@'localhost' for table 'session_connect_attrs'
diff --git a/mysql-test/suite/perfschema/r/connection_type_notwin.result b/mysql-test/suite/perfschema/r/connection_type_notwin.result
new file mode 100644
index 00000000000..d0415cf8df6
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/connection_type_notwin.result
@@ -0,0 +1,79 @@
+# Default connection
+select NAME, PROCESSLIST_USER, PROCESSLIST_HOST, CONNECTION_TYPE
+from performance_schema.threads
+where PROCESSLIST_ID = connection_id();
+NAME thread/sql/one_connection
+PROCESSLIST_USER root
+PROCESSLIST_HOST localhost
+CONNECTION_TYPE Socket
+create user 'root'@'santa.claus.ipv4.example.com';
+grant select on *.* to 'root'@'santa.claus.ipv4.example.com';
+create user 'rootssl'@'santa.claus.ipv4.example.com'
+ require SSL;
+grant select on *.* to 'rootssl'@'santa.claus.ipv4.example.com';
+set @old_dbug=@@global.debug_dbug;
+set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
+TRUNCATE TABLE mysql.general_log;
+SET @old_log_output= @@global.log_output;
+SET @old_general_log= @@global.general_log;
+SET @old_general_log_file= @@global.general_log_file;
+SET GLOBAL general_log_file = '.../log/rewrite_general_con.log';
+SET GLOBAL log_output = 'FILE,TABLE';
+SET GLOBAL general_log= 'ON';
+connect con1, localhost, root,,;
+select NAME, PROCESSLIST_USER, PROCESSLIST_HOST, CONNECTION_TYPE
+from performance_schema.threads
+where PROCESSLIST_ID = connection_id();
+NAME thread/sql/one_connection
+PROCESSLIST_USER root
+PROCESSLIST_HOST localhost
+CONNECTION_TYPE Socket
+disconnect con1;
+connect con2, "127.0.0.1", root,,test,$MASTER_MYPORT,;
+select NAME, PROCESSLIST_USER, PROCESSLIST_HOST, CONNECTION_TYPE
+from performance_schema.threads
+where PROCESSLIST_ID = connection_id();
+NAME thread/sql/one_connection
+PROCESSLIST_USER root
+PROCESSLIST_HOST santa.claus.ipv4.example.com
+CONNECTION_TYPE TCP/IP
+disconnect con2;
+connect con3, "127.0.0.1", rootssl,,test,$MASTER_MYPORT,,SSL;
+select NAME, PROCESSLIST_USER, PROCESSLIST_HOST, CONNECTION_TYPE
+from performance_schema.threads
+where PROCESSLIST_ID = connection_id();
+NAME thread/sql/one_connection
+PROCESSLIST_USER rootssl
+PROCESSLIST_HOST santa.claus.ipv4.example.com
+CONNECTION_TYPE SSL/TLS
+disconnect con3;
+connection default;
+SET GLOBAL general_log= 'OFF';
+CREATE TABLE test_log (argument TEXT);
+LOAD DATA LOCAL INFILE '.../log/rewrite_general_con.log'
+ INTO TABLE test_log FIELDS TERMINATED BY '\n' LINES TERMINATED BY '\n';
+select user_host, command_type, argument from mysql.general_log
+where command_type = "Connect";
+user_host [root] @ localhost []
+command_type Connect
+argument root@localhost on test using Socket
+user_host [root] @ santa.claus.ipv4.example.com [192.0.2.4]
+command_type Connect
+argument root@santa.claus.ipv4.example.com on test using TCP/IP
+user_host [rootssl] @ santa.claus.ipv4.example.com [192.0.2.4]
+command_type Connect
+argument rootssl@santa.claus.ipv4.example.com on test using SSL/TLS
+select substring(argument, locate("Connect", argument)) from test_log
+where argument like "%Connect%on test%";
+substring(argument, locate("Connect", argument)) Connect root@localhost on test using Socket
+substring(argument, locate("Connect", argument)) Connect root@santa.claus.ipv4.example.com on test using TCP/IP
+substring(argument, locate("Connect", argument)) Connect rootssl@santa.claus.ipv4.example.com on test using SSL/TLS
+DROP TABLE test_log;
+SET GLOBAL general_log_file= @old_general_log_file;
+SET GLOBAL general_log= @old_general_log;
+SET GLOBAL log_output= @old_log_output;
+set global debug_dbug= @old_dbug;
+revoke select on *.* from 'root'@'santa.claus.ipv4.example.com';
+drop user 'root'@'santa.claus.ipv4.example.com';
+revoke select on *.* from 'rootssl'@'santa.claus.ipv4.example.com';
+drop user 'rootssl'@'santa.claus.ipv4.example.com';
diff --git a/mysql-test/suite/perfschema/r/connection_type_win.result b/mysql-test/suite/perfschema/r/connection_type_win.result
new file mode 100644
index 00000000000..8dc064babff
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/connection_type_win.result
@@ -0,0 +1,78 @@
+# Default connection
+select NAME, PROCESSLIST_USER, PROCESSLIST_HOST, CONNECTION_TYPE
+from performance_schema.threads
+where PROCESSLIST_ID = connection_id();
+NAME thread/sql/one_connection
+PROCESSLIST_USER root
+PROCESSLIST_HOST localhost
+CONNECTION_TYPE TCP/IP
+create user 'root'@'santa.claus.ipv4.example.com';
+grant select on *.* to 'root'@'santa.claus.ipv4.example.com';
+create user 'rootssl'@'santa.claus.ipv4.example.com'
+ require SSL;
+grant select on *.* to 'rootssl'@'santa.claus.ipv4.example.com';
+set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
+TRUNCATE TABLE mysql.general_log;
+SET @old_log_output= @@global.log_output;
+SET @old_general_log= @@global.general_log;
+SET @old_general_log_file= @@global.general_log_file;
+SET GLOBAL general_log_file = '.../log/rewrite_general_con.log';
+SET GLOBAL log_output = 'FILE,TABLE';
+SET GLOBAL general_log= 'ON';
+connect con1, localhost, root,,;
+select NAME, PROCESSLIST_USER, PROCESSLIST_HOST, CONNECTION_TYPE
+from performance_schema.threads
+where PROCESSLIST_ID = connection_id();
+NAME thread/sql/one_connection
+PROCESSLIST_USER root
+PROCESSLIST_HOST santa.claus.ipv4.example.com
+CONNECTION_TYPE TCP/IP
+disconnect con1;
+connect con2, "127.0.0.1", root,,test,$MASTER_MYPORT,;
+select NAME, PROCESSLIST_USER, PROCESSLIST_HOST, CONNECTION_TYPE
+from performance_schema.threads
+where PROCESSLIST_ID = connection_id();
+NAME thread/sql/one_connection
+PROCESSLIST_USER root
+PROCESSLIST_HOST santa.claus.ipv4.example.com
+CONNECTION_TYPE TCP/IP
+disconnect con2;
+connect con3, "127.0.0.1", rootssl,,test,$MASTER_MYPORT,,SSL;
+select NAME, PROCESSLIST_USER, PROCESSLIST_HOST, CONNECTION_TYPE
+from performance_schema.threads
+where PROCESSLIST_ID = connection_id();
+NAME thread/sql/one_connection
+PROCESSLIST_USER rootssl
+PROCESSLIST_HOST santa.claus.ipv4.example.com
+CONNECTION_TYPE SSL/TLS
+disconnect con3;
+connection default;
+SET GLOBAL general_log= 'OFF';
+CREATE TABLE test_log (argument TEXT);
+LOAD DATA LOCAL INFILE '.../log/rewrite_general_con.log'
+ INTO TABLE test_log FIELDS TERMINATED BY '\n' LINES TERMINATED BY '\n';
+select user_host, command_type, argument from mysql.general_log
+where command_type = "Connect";
+user_host [root] @ santa.claus.ipv4.example.com [192.0.2.4]
+command_type Connect
+argument root@santa.claus.ipv4.example.com on test using TCP/IP
+user_host [root] @ santa.claus.ipv4.example.com [192.0.2.4]
+command_type Connect
+argument root@santa.claus.ipv4.example.com on test using TCP/IP
+user_host [rootssl] @ santa.claus.ipv4.example.com [192.0.2.4]
+command_type Connect
+argument rootssl@santa.claus.ipv4.example.com on test using SSL/TLS
+select substring(argument, locate("Connect", argument)) from test_log
+where argument like "%Connect%on test%";
+substring(argument, locate("Connect", argument)) Connect root@santa.claus.ipv4.example.com on test using TCP/IP
+substring(argument, locate("Connect", argument)) Connect root@santa.claus.ipv4.example.com on test using TCP/IP
+substring(argument, locate("Connect", argument)) Connect rootssl@santa.claus.ipv4.example.com on test using SSL/TLS
+DROP TABLE test_log;
+SET GLOBAL general_log_file= @old_general_log_file;
+SET GLOBAL general_log= @old_general_log;
+SET GLOBAL log_output= @old_log_output;
+set global debug_dbug= default;
+revoke select on *.* from 'root'@'santa.claus.ipv4.example.com';
+drop user 'root'@'santa.claus.ipv4.example.com';
+revoke select on *.* from 'rootssl'@'santa.claus.ipv4.example.com';
+drop user 'rootssl'@'santa.claus.ipv4.example.com';
diff --git a/mysql-test/suite/perfschema/r/csv_table_io.result b/mysql-test/suite/perfschema/r/csv_table_io.result
index 84b39119dd8..0e50dc24927 100644
--- a/mysql-test/suite/perfschema/r/csv_table_io.result
+++ b/mysql-test/suite/perfschema/r/csv_table_io.result
@@ -70,63 +70,69 @@ where event_name like 'wait/io/table/%'
and object_schema in ("test")
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 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
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab delete NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab 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 no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab 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
-show status where Variable_name like 'performance_schema_%' and
-Variable_name not like 'performance_schema_%_classes_lost';
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test no_index_tab insert 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test no_index_tab insert 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test no_index_tab insert 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 3
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 1
+wait/io/table/sql/handler TABLE test no_index_tab update 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 1
+wait/io/table/sql/handler TABLE test no_index_tab update 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 1
+wait/io/table/sql/handler TABLE test no_index_tab update 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 2
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 1
+wait/io/table/sql/handler TABLE test no_index_tab delete 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 2
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 2
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test marker insert 1
+show global status like 'performance_schema_%';
Variable_name Value
Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
Performance_schema_cond_instances_lost 0
Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
Performance_schema_file_handles_lost 0
Performance_schema_file_instances_lost 0
Performance_schema_hosts_lost 0
+Performance_schema_index_stat_lost 0
Performance_schema_locker_lost 0
+Performance_schema_memory_classes_lost 0
+Performance_schema_metadata_lock_lost 0
+Performance_schema_mutex_classes_lost 0
Performance_schema_mutex_instances_lost 0
+Performance_schema_nested_statement_lost 0
+Performance_schema_prepared_statements_lost 0
+Performance_schema_program_lost 0
+Performance_schema_rwlock_classes_lost 0
Performance_schema_rwlock_instances_lost 0
Performance_schema_session_connect_attrs_lost 0
+Performance_schema_socket_classes_lost 0
Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
Performance_schema_table_handles_lost 0
Performance_schema_table_instances_lost 0
+Performance_schema_table_lock_stat_lost 0
+Performance_schema_thread_classes_lost 0
Performance_schema_thread_instances_lost 0
Performance_schema_users_lost 0
truncate performance_schema.events_waits_history_long;
diff --git a/mysql-test/suite/perfschema/r/ddl_esms_by_program.result b/mysql-test/suite/perfschema/r/ddl_esms_by_program.result
new file mode 100644
index 00000000000..66e49f8aeea
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/ddl_esms_by_program.result
@@ -0,0 +1,9 @@
+alter table performance_schema.events_statements_summary_by_program
+add column foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+truncate table performance_schema.events_statements_summary_by_program;
+ALTER TABLE performance_schema.events_statements_summary_by_program ADD INDEX test_index(OBJECT_NAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index
+ON performance_schema.events_statements_summary_by_program(OBJECT_NAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
diff --git a/mysql-test/suite/perfschema/r/ddl_ets_by_account_by_event_name.result b/mysql-test/suite/perfschema/r/ddl_ets_by_account_by_event_name.result
new file mode 100644
index 00000000000..23bd048d8a6
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/ddl_ets_by_account_by_event_name.result
@@ -0,0 +1,10 @@
+alter table performance_schema.events_transactions_summary_by_account_by_event_name
+add column foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+truncate table performance_schema.events_transactions_summary_by_account_by_event_name;
+ALTER TABLE performance_schema.events_transactions_summary_by_account_by_event_name
+ADD INDEX test_index(USERNAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index
+ON performance_schema.events_transactions_summary_by_account_by_event_name(USERNAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
diff --git a/mysql-test/suite/perfschema/r/ddl_ets_by_host_by_event_name.result b/mysql-test/suite/perfschema/r/ddl_ets_by_host_by_event_name.result
new file mode 100644
index 00000000000..7e3b5ccd70c
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/ddl_ets_by_host_by_event_name.result
@@ -0,0 +1,10 @@
+alter table performance_schema.events_transactions_summary_by_host_by_event_name
+add column foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+truncate table performance_schema.events_transactions_summary_by_host_by_event_name;
+ALTER TABLE performance_schema.events_transactions_summary_by_host_by_event_name
+ADD INDEX test_index(HOSTNAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index
+ON performance_schema.events_transactions_summary_by_host_by_event_name(HOSTNAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
diff --git a/mysql-test/suite/perfschema/r/ddl_ets_by_thread_by_event_name.result b/mysql-test/suite/perfschema/r/ddl_ets_by_thread_by_event_name.result
new file mode 100644
index 00000000000..bd3c57f9257
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/ddl_ets_by_thread_by_event_name.result
@@ -0,0 +1,9 @@
+alter table performance_schema.events_transactions_summary_by_thread_by_event_name
+add column foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+truncate table performance_schema.events_transactions_summary_by_thread_by_event_name;
+ALTER TABLE performance_schema.events_transactions_summary_by_thread_by_event_name ADD INDEX test_index(THREAD_ID);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index
+ON performance_schema.events_transactions_summary_by_thread_by_event_name(THREAD_ID);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
diff --git a/mysql-test/suite/perfschema/r/ddl_ets_by_user_by_event_name.result b/mysql-test/suite/perfschema/r/ddl_ets_by_user_by_event_name.result
new file mode 100644
index 00000000000..981de1a7b19
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/ddl_ets_by_user_by_event_name.result
@@ -0,0 +1,10 @@
+alter table performance_schema.events_transactions_summary_by_user_by_event_name
+add column foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+truncate table performance_schema.events_transactions_summary_by_user_by_event_name;
+ALTER TABLE performance_schema.events_transactions_summary_by_user_by_event_name
+ADD INDEX test_index(USERNAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index
+ON performance_schema.events_transactions_summary_by_user_by_event_name(USERNAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
diff --git a/mysql-test/suite/perfschema/r/ddl_ets_global_by_event_name.result b/mysql-test/suite/perfschema/r/ddl_ets_global_by_event_name.result
new file mode 100644
index 00000000000..13606ace640
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/ddl_ets_global_by_event_name.result
@@ -0,0 +1,10 @@
+alter table performance_schema.events_transactions_summary_global_by_event_name
+add column foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+truncate table performance_schema.events_transactions_summary_global_by_event_name;
+ALTER TABLE performance_schema.events_transactions_summary_global_by_event_name
+ADD INDEX test_index(EVENT_NAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index
+ON performance_schema.events_transactions_summary_global_by_event_name(EVENT_NAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
diff --git a/mysql-test/suite/perfschema/r/ddl_events_stages_current.result b/mysql-test/suite/perfschema/r/ddl_events_stages_current.result
index d9094ffb366..bc5921d900a 100644
--- a/mysql-test/suite/perfschema/r/ddl_events_stages_current.result
+++ b/mysql-test/suite/perfschema/r/ddl_events_stages_current.result
@@ -5,3 +5,6 @@ ALTER TABLE performance_schema.events_stages_current ADD INDEX test_index(EVENT_
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
CREATE UNIQUE INDEX test_index ON performance_schema.events_stages_current(EVENT_ID);
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT IS_GENERATED GENERATION_EXPRESSION
+def performance_schema events_stages_current WORK_COMPLETED 9 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_stages_current WORK_ESTIMATED 10 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
diff --git a/mysql-test/suite/perfschema/r/ddl_events_stages_history.result b/mysql-test/suite/perfschema/r/ddl_events_stages_history.result
index 0b6d6df06d2..f099964b4df 100644
--- a/mysql-test/suite/perfschema/r/ddl_events_stages_history.result
+++ b/mysql-test/suite/perfschema/r/ddl_events_stages_history.result
@@ -5,3 +5,6 @@ ALTER TABLE performance_schema.events_stages_history ADD INDEX test_index(EVENT_
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
CREATE UNIQUE INDEX test_index ON performance_schema.events_stages_history(EVENT_ID);
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT IS_GENERATED GENERATION_EXPRESSION
+def performance_schema events_stages_history WORK_COMPLETED 9 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_stages_history WORK_ESTIMATED 10 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
diff --git a/mysql-test/suite/perfschema/r/ddl_events_stages_history_long.result b/mysql-test/suite/perfschema/r/ddl_events_stages_history_long.result
index 7843f61aa0d..f7f6d319564 100644
--- a/mysql-test/suite/perfschema/r/ddl_events_stages_history_long.result
+++ b/mysql-test/suite/perfschema/r/ddl_events_stages_history_long.result
@@ -5,3 +5,6 @@ ALTER TABLE performance_schema.events_stages_history_long ADD INDEX test_index(E
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
CREATE UNIQUE INDEX test_index ON performance_schema.events_stages_history_long(EVENT_ID);
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT IS_GENERATED GENERATION_EXPRESSION
+def performance_schema events_stages_history_long WORK_COMPLETED 9 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_stages_history_long WORK_ESTIMATED 10 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
diff --git a/mysql-test/suite/perfschema/r/ddl_events_transactions_current.result b/mysql-test/suite/perfschema/r/ddl_events_transactions_current.result
new file mode 100644
index 00000000000..6d4d280118f
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/ddl_events_transactions_current.result
@@ -0,0 +1,7 @@
+alter table performance_schema.events_transactions_current add column foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+truncate table performance_schema.events_transactions_current;
+ALTER TABLE performance_schema.events_transactions_current ADD INDEX test_index(EVENT_ID);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index ON performance_schema.events_transactions_current(EVENT_ID);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
diff --git a/mysql-test/suite/perfschema/r/ddl_events_transactions_history.result b/mysql-test/suite/perfschema/r/ddl_events_transactions_history.result
new file mode 100644
index 00000000000..dbbac3ea9df
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/ddl_events_transactions_history.result
@@ -0,0 +1,7 @@
+alter table performance_schema.events_transactions_history add column foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+truncate table performance_schema.events_transactions_history;
+ALTER TABLE performance_schema.events_transactions_history ADD INDEX test_index(EVENT_ID);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index ON performance_schema.events_transactions_history(EVENT_ID);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
diff --git a/mysql-test/suite/perfschema/r/ddl_events_transactions_history_long.result b/mysql-test/suite/perfschema/r/ddl_events_transactions_history_long.result
new file mode 100644
index 00000000000..7a4a5f0542e
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/ddl_events_transactions_history_long.result
@@ -0,0 +1,7 @@
+alter table performance_schema.events_transactions_history_long add column foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+truncate table performance_schema.events_transactions_history_long;
+ALTER TABLE performance_schema.events_transactions_history_long ADD INDEX test_index(EVENT_ID);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index ON performance_schema.events_transactions_history_long(EVENT_ID);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
diff --git a/mysql-test/suite/perfschema/r/ddl_global_status.result b/mysql-test/suite/perfschema/r/ddl_global_status.result
new file mode 100644
index 00000000000..10af700eadd
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/ddl_global_status.result
@@ -0,0 +1,10 @@
+alter table performance_schema.global_status
+add column foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+truncate table performance_schema.global_status;
+ALTER TABLE performance_schema.global_status
+ADD INDEX test_index(VARIABLE_NAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index
+ON performance_schema.global_status(VARIABLE_NAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
diff --git a/mysql-test/suite/perfschema/r/ddl_global_variables.result b/mysql-test/suite/perfschema/r/ddl_global_variables.result
new file mode 100644
index 00000000000..e15b8166b2b
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/ddl_global_variables.result
@@ -0,0 +1,11 @@
+alter table performance_schema.global_variables
+add column foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+truncate table performance_schema.global_variables;
+ERROR HY000: Invalid performance_schema usage
+ALTER TABLE performance_schema.global_variables
+ADD INDEX test_index(VARIABLE_NAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index
+ON performance_schema.global_variables(VARIABLE_NAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
diff --git a/mysql-test/suite/perfschema/r/ddl_mems_by_account_by_event_name.result b/mysql-test/suite/perfschema/r/ddl_mems_by_account_by_event_name.result
new file mode 100644
index 00000000000..4d7581a7c2e
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/ddl_mems_by_account_by_event_name.result
@@ -0,0 +1,10 @@
+alter table performance_schema.memory_summary_by_account_by_event_name
+add column foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+truncate table performance_schema.memory_summary_by_account_by_event_name;
+ALTER TABLE performance_schema.memory_summary_by_account_by_event_name
+ADD INDEX test_index(USERNAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index
+ON performance_schema.memory_summary_by_account_by_event_name(USERNAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
diff --git a/mysql-test/suite/perfschema/r/ddl_mems_by_host_by_event_name.result b/mysql-test/suite/perfschema/r/ddl_mems_by_host_by_event_name.result
new file mode 100644
index 00000000000..dae5dd2445c
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/ddl_mems_by_host_by_event_name.result
@@ -0,0 +1,10 @@
+alter table performance_schema.memory_summary_by_host_by_event_name
+add column foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+truncate table performance_schema.memory_summary_by_host_by_event_name;
+ALTER TABLE performance_schema.memory_summary_by_host_by_event_name
+ADD INDEX test_index(USERNAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index
+ON performance_schema.memory_summary_by_host_by_event_name(USERNAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
diff --git a/mysql-test/suite/perfschema/r/ddl_mems_by_thread_by_event_name.result b/mysql-test/suite/perfschema/r/ddl_mems_by_thread_by_event_name.result
new file mode 100644
index 00000000000..eae9e7020e3
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/ddl_mems_by_thread_by_event_name.result
@@ -0,0 +1,10 @@
+alter table performance_schema.memory_summary_by_thread_by_event_name
+add column foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+truncate table performance_schema.memory_summary_by_thread_by_event_name;
+ALTER TABLE performance_schema.memory_summary_by_thread_by_event_name
+ADD INDEX test_index(USERNAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index
+ON performance_schema.memory_summary_by_thread_by_event_name(USERNAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
diff --git a/mysql-test/suite/perfschema/r/ddl_mems_by_user_by_event_name.result b/mysql-test/suite/perfschema/r/ddl_mems_by_user_by_event_name.result
new file mode 100644
index 00000000000..de6d52b69e6
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/ddl_mems_by_user_by_event_name.result
@@ -0,0 +1,10 @@
+alter table performance_schema.memory_summary_by_user_by_event_name
+add column foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+truncate table performance_schema.memory_summary_by_user_by_event_name;
+ALTER TABLE performance_schema.memory_summary_by_user_by_event_name
+ADD INDEX test_index(USERNAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index
+ON performance_schema.memory_summary_by_user_by_event_name(USERNAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
diff --git a/mysql-test/suite/perfschema/r/ddl_mems_global_by_event_name.result b/mysql-test/suite/perfschema/r/ddl_mems_global_by_event_name.result
new file mode 100644
index 00000000000..9ed8b2b6dab
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/ddl_mems_global_by_event_name.result
@@ -0,0 +1,10 @@
+alter table performance_schema.memory_summary_global_by_event_name
+add column foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+truncate table performance_schema.memory_summary_global_by_event_name;
+ALTER TABLE performance_schema.memory_summary_global_by_event_name
+ADD INDEX test_index(USERNAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index
+ON performance_schema.memory_summary_global_by_event_name(USERNAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
diff --git a/mysql-test/suite/perfschema/r/ddl_metadata_locks.result b/mysql-test/suite/perfschema/r/ddl_metadata_locks.result
new file mode 100644
index 00000000000..426ec66943e
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/ddl_metadata_locks.result
@@ -0,0 +1,8 @@
+alter table performance_schema.metadata_locks add column foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+truncate table performance_schema.metadata_locks;
+ERROR HY000: Invalid performance_schema usage
+ALTER TABLE performance_schema.metadata_locks ADD INDEX test_index(TIMER_NAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index ON performance_schema.metadata_locks(TIMER_NAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
diff --git a/mysql-test/suite/perfschema/r/ddl_prepared_statements_instances.result b/mysql-test/suite/perfschema/r/ddl_prepared_statements_instances.result
new file mode 100644
index 00000000000..d71e6c1ebf4
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/ddl_prepared_statements_instances.result
@@ -0,0 +1,9 @@
+alter table performance_schema.prepared_statements_instances
+add column foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+truncate table performance_schema.prepared_statements_instances;
+ALTER TABLE performance_schema.prepared_statements_instances ADD INDEX test_index(OWNER_OBJECT_NAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index
+ON performance_schema.prepared_statements_instances(OWNER_OBJECT_NAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
diff --git a/mysql-test/suite/perfschema/r/ddl_replication_applier_configuration.result b/mysql-test/suite/perfschema/r/ddl_replication_applier_configuration.result
new file mode 100644
index 00000000000..db79022cbb4
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/ddl_replication_applier_configuration.result
@@ -0,0 +1,11 @@
+ALTER TABLE performance_schema.replication_applier_configuration
+ADD COLUMN foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+TRUNCATE TABLE performance_schema.replication_applier_configuration;
+ERROR HY000: Invalid performance_schema usage
+ALTER TABLE performance_schema.replication_applier_configuration
+ADD INDEX test_index(desired_delay);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index ON
+performance_schema.replication_applier_configuration(desired_delay);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
diff --git a/mysql-test/suite/perfschema/r/ddl_replication_applier_status.result b/mysql-test/suite/perfschema/r/ddl_replication_applier_status.result
new file mode 100644
index 00000000000..a6306e976ba
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/ddl_replication_applier_status.result
@@ -0,0 +1,11 @@
+ALTER TABLE performance_schema.replication_applier_status
+ADD COLUMN foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+TRUNCATE TABLE performance_schema.replication_applier_status;
+ERROR HY000: Invalid performance_schema usage
+ALTER TABLE performance_schema.replication_applier_status
+ADD INDEX test_index(remaining_delay);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index ON
+performance_schema.replication_applier_status(remaining_delay);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
diff --git a/mysql-test/suite/perfschema/r/ddl_replication_applier_status_by_coordinator.result b/mysql-test/suite/perfschema/r/ddl_replication_applier_status_by_coordinator.result
new file mode 100644
index 00000000000..414e8291ba8
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/ddl_replication_applier_status_by_coordinator.result
@@ -0,0 +1,11 @@
+ALTER TABLE performance_schema.replication_applier_status_by_coordinator
+ADD COLUMN foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+TRUNCATE TABLE performance_schema.replication_applier_status_by_coordinator;
+ERROR HY000: Invalid performance_schema usage
+ALTER TABLE performance_schema.replication_applier_status_by_coordinator
+ADD INDEX test_index(thread_id);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index ON
+performance_schema.replication_applier_status_by_coordinator(thread_id);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
diff --git a/mysql-test/suite/perfschema/r/ddl_replication_applier_status_by_worker.result b/mysql-test/suite/perfschema/r/ddl_replication_applier_status_by_worker.result
new file mode 100644
index 00000000000..e13b4f978e1
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/ddl_replication_applier_status_by_worker.result
@@ -0,0 +1,11 @@
+ALTER TABLE performance_schema.replication_applier_status_by_worker
+add column foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+TRUNCATE TABLE performance_schema.replication_applier_status_by_worker;
+ERROR HY000: Invalid performance_schema usage.
+ALTER TABLE performance_schema.replication_applier_status_by_worker
+ADD INDEX test_index(worker_id);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index ON
+performance_schema.replication_applier_status_by_worker(worker_id);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
diff --git a/mysql-test/suite/perfschema/r/ddl_replication_connection_configuration.result b/mysql-test/suite/perfschema/r/ddl_replication_connection_configuration.result
new file mode 100644
index 00000000000..19de9281a13
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/ddl_replication_connection_configuration.result
@@ -0,0 +1,11 @@
+ALTER TABLE performance_schema.replication_connection_configuration
+ADD COLUMN foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+TRUNCATE TABLE performance_schema.replication_connection_configuration;
+ERROR HY000: Invalid performance_schema usage
+ALTER TABLE performance_schema.replication_connection_configuration
+ADD INDEX test_index(HOST);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index
+ON performance_schema.replication_connection_configuration(HOST);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
diff --git a/mysql-test/suite/perfschema/r/ddl_replication_connection_status.result b/mysql-test/suite/perfschema/r/ddl_replication_connection_status.result
new file mode 100644
index 00000000000..4c650b030ed
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/ddl_replication_connection_status.result
@@ -0,0 +1,11 @@
+ALTER TABLE performance_schema.replication_connection_status
+ADD COLUMN foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+TRUNCATE TABLE performance_schema.replication_connection_status;
+ERROR HY000: Invalid performance_schema usage.
+ALTER TABLE performance_schema.replication_connection_status
+ADD INDEX test_index(Thread_Id);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index
+ON performance_schema.replication_connection_status(Thread_Id);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
diff --git a/mysql-test/suite/perfschema/r/ddl_replication_group_member_stats.result b/mysql-test/suite/perfschema/r/ddl_replication_group_member_stats.result
new file mode 100644
index 00000000000..cab3b0874fa
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/ddl_replication_group_member_stats.result
@@ -0,0 +1,11 @@
+ALTER TABLE performance_schema.replication_group_member_stats
+ADD COLUMN foo INTEGER;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+TRUNCATE TABLE performance_schema.replication_group_member_stats;
+ERROR HY000: Invalid performance_schema usage.
+ALTER TABLE performance_schema.replication_group_member_stats
+ADD INDEX test_index(Member_Id);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index
+ON performance_schema.replication_group_member_stats(Member_Id);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
diff --git a/mysql-test/suite/perfschema/r/ddl_replication_group_members.result b/mysql-test/suite/perfschema/r/ddl_replication_group_members.result
new file mode 100644
index 00000000000..25ed912a11a
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/ddl_replication_group_members.result
@@ -0,0 +1,11 @@
+ALTER TABLE performance_schema.replication_group_members
+ADD COLUMN foo INTEGER;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+TRUNCATE TABLE performance_schema.replication_group_members;
+ERROR HY000: Invalid performance_schema usage.
+ALTER TABLE performance_schema.replication_group_members
+ADD INDEX test_index(Member_Id);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index
+ON performance_schema.replication_group_members(Member_Id);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
diff --git a/mysql-test/suite/perfschema/r/ddl_session_status.result b/mysql-test/suite/perfschema/r/ddl_session_status.result
new file mode 100644
index 00000000000..de5669a3a64
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/ddl_session_status.result
@@ -0,0 +1,11 @@
+alter table performance_schema.session_status
+add column foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+truncate table performance_schema.session_status;
+ERROR HY000: Invalid performance_schema usage
+ALTER TABLE performance_schema.session_status
+ADD INDEX test_index(VARIABLE_NAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index
+ON performance_schema.session_status(VARIABLE_NAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
diff --git a/mysql-test/suite/perfschema/r/ddl_session_variables.result b/mysql-test/suite/perfschema/r/ddl_session_variables.result
new file mode 100644
index 00000000000..add637059b7
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/ddl_session_variables.result
@@ -0,0 +1,11 @@
+alter table performance_schema.session_variables
+add column foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+truncate table performance_schema.session_variables;
+ERROR HY000: Invalid performance_schema usage
+ALTER TABLE performance_schema.session_variables
+ADD INDEX test_index(VARIABLE_NAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index
+ON performance_schema.session_variables(VARIABLE_NAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
diff --git a/mysql-test/suite/perfschema/r/ddl_setup_actors.result b/mysql-test/suite/perfschema/r/ddl_setup_actors.result
index 753632eb62d..c17314e4362 100644
--- a/mysql-test/suite/perfschema/r/ddl_setup_actors.result
+++ b/mysql-test/suite/perfschema/r/ddl_setup_actors.result
@@ -14,3 +14,5 @@ ALTER TABLE performance_schema.setup_actors ADD INDEX test_index(HOST);
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
CREATE UNIQUE INDEX test_index ON performance_schema.setup_actors(HOST);
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+ALTER TABLE performance_schema.setup_actors ADD KEY ENA(ENABLED);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
diff --git a/mysql-test/suite/perfschema/r/ddl_status_by_account.result b/mysql-test/suite/perfschema/r/ddl_status_by_account.result
new file mode 100644
index 00000000000..d21b7ed1e0b
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/ddl_status_by_account.result
@@ -0,0 +1,10 @@
+alter table performance_schema.status_by_account
+add column foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+truncate table performance_schema.status_by_account;
+ALTER TABLE performance_schema.status_by_account
+ADD INDEX test_index(VARIABLE_NAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index
+ON performance_schema.status_by_account(VARIABLE_NAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
diff --git a/mysql-test/suite/perfschema/r/ddl_status_by_host.result b/mysql-test/suite/perfschema/r/ddl_status_by_host.result
new file mode 100644
index 00000000000..5e4ba3573e6
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/ddl_status_by_host.result
@@ -0,0 +1,10 @@
+alter table performance_schema.status_by_host
+add column foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+truncate table performance_schema.status_by_host;
+ALTER TABLE performance_schema.status_by_host
+ADD INDEX test_index(VARIABLE_NAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index
+ON performance_schema.status_by_host(VARIABLE_NAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
diff --git a/mysql-test/suite/perfschema/r/ddl_status_by_thread.result b/mysql-test/suite/perfschema/r/ddl_status_by_thread.result
new file mode 100644
index 00000000000..2333af91c10
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/ddl_status_by_thread.result
@@ -0,0 +1,10 @@
+alter table performance_schema.status_by_thread
+add column foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+truncate table performance_schema.status_by_thread;
+ALTER TABLE performance_schema.status_by_thread
+ADD INDEX test_index(VARIABLE_NAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index
+ON performance_schema.status_by_thread(VARIABLE_NAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
diff --git a/mysql-test/suite/perfschema/r/ddl_status_by_user.result b/mysql-test/suite/perfschema/r/ddl_status_by_user.result
new file mode 100644
index 00000000000..c7d396db225
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/ddl_status_by_user.result
@@ -0,0 +1,10 @@
+alter table performance_schema.status_by_user
+add column foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+truncate table performance_schema.status_by_user;
+ALTER TABLE performance_schema.status_by_user
+ADD INDEX test_index(VARIABLE_NAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index
+ON performance_schema.status_by_user(VARIABLE_NAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
diff --git a/mysql-test/suite/perfschema/r/ddl_table_handles.result b/mysql-test/suite/perfschema/r/ddl_table_handles.result
new file mode 100644
index 00000000000..79b7c96e2a3
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/ddl_table_handles.result
@@ -0,0 +1,8 @@
+alter table performance_schema.table_handles add column foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+truncate table performance_schema.table_handles;
+ERROR HY000: Invalid performance_schema usage
+ALTER TABLE performance_schema.table_handles ADD INDEX test_index(TIMER_NAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index ON performance_schema.table_handles(TIMER_NAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
diff --git a/mysql-test/suite/perfschema/r/ddl_uvar_by_thread.result b/mysql-test/suite/perfschema/r/ddl_uvar_by_thread.result
new file mode 100644
index 00000000000..b9961faa221
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/ddl_uvar_by_thread.result
@@ -0,0 +1,11 @@
+alter table performance_schema.user_variables_by_thread
+add column foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+truncate table performance_schema.user_variables_by_thread;
+ERROR HY000: Invalid performance_schema usage
+ALTER TABLE performance_schema.user_variables_by_thread
+ADD INDEX test_index(VARIABLE_NAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index
+ON performance_schema.user_variables_by_thread(VARIABLE_NAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
diff --git a/mysql-test/suite/perfschema/r/ddl_variables_by_thread.result b/mysql-test/suite/perfschema/r/ddl_variables_by_thread.result
new file mode 100644
index 00000000000..43e2f24f7fc
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/ddl_variables_by_thread.result
@@ -0,0 +1,11 @@
+alter table performance_schema.variables_by_thread
+add column foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+truncate table performance_schema.variables_by_thread;
+ERROR HY000: Invalid performance_schema usage
+ALTER TABLE performance_schema.variables_by_thread
+ADD INDEX test_index(VARIABLE_NAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index
+ON performance_schema.variables_by_thread(VARIABLE_NAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
diff --git a/mysql-test/suite/perfschema/r/digest_table_full.result b/mysql-test/suite/perfschema/r/digest_table_full.result
index 5c8d2eb23d1..84a7b5c3c7c 100644
--- a/mysql-test/suite/perfschema/r/digest_table_full.result
+++ b/mysql-test/suite/perfschema/r/digest_table_full.result
@@ -114,7 +114,7 @@ SUM_ERRORS FROM performance_schema.events_statements_summary_by_digest;
SCHEMA_NAME DIGEST_TEXT COUNT_STAR SUM_ROWS_AFFECTED SUM_WARNINGS SUM_ERRORS
NULL NULL 55 32 1 2
statements_digest TRUNCATE TABLE `performance_schema` . `events_statements_summary_by_digest` 1 0 0 0
-SHOW VARIABLES LIKE "performance_schema_digests_size";
+SHOW GLOBAL VARIABLES LIKE "performance_schema_digests_size";
Variable_name Value
performance_schema_digests_size 2
SELECT COUNT(*) FROM performance_schema.events_statements_summary_by_digest;
diff --git a/mysql-test/suite/perfschema/r/dml_esms_by_program.result b/mysql-test/suite/perfschema/r/dml_esms_by_program.result
new file mode 100644
index 00000000000..b8c86fe3e45
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/dml_esms_by_program.result
@@ -0,0 +1,27 @@
+select * from performance_schema.events_statements_summary_by_program
+where object_name like 'XXYYZZ%' limit 1;
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT COUNT_STATEMENTS SUM_STATEMENTS_WAIT MIN_STATEMENTS_WAIT AVG_STATEMENTS_WAIT MAX_STATEMENTS_WAIT SUM_LOCK_TIME SUM_ERRORS SUM_WARNINGS SUM_ROWS_AFFECTED SUM_ROWS_SENT SUM_ROWS_EXAMINED SUM_CREATED_TMP_DISK_TABLES SUM_CREATED_TMP_TABLES SUM_SELECT_FULL_JOIN SUM_SELECT_FULL_RANGE_JOIN SUM_SELECT_RANGE SUM_SELECT_RANGE_CHECK SUM_SELECT_SCAN SUM_SORT_MERGE_PASSES SUM_SORT_RANGE SUM_SORT_ROWS SUM_SORT_SCAN SUM_NO_INDEX_USED SUM_NO_GOOD_INDEX_USED
+select * from performance_schema.events_statements_summary_by_program
+where object_name='XXYYZZ';
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT COUNT_STATEMENTS SUM_STATEMENTS_WAIT MIN_STATEMENTS_WAIT AVG_STATEMENTS_WAIT MAX_STATEMENTS_WAIT SUM_LOCK_TIME SUM_ERRORS SUM_WARNINGS SUM_ROWS_AFFECTED SUM_ROWS_SENT SUM_ROWS_EXAMINED SUM_CREATED_TMP_DISK_TABLES SUM_CREATED_TMP_TABLES SUM_SELECT_FULL_JOIN SUM_SELECT_FULL_RANGE_JOIN SUM_SELECT_RANGE SUM_SELECT_RANGE_CHECK SUM_SELECT_SCAN SUM_SORT_MERGE_PASSES SUM_SORT_RANGE SUM_SORT_ROWS SUM_SORT_SCAN SUM_NO_INDEX_USED SUM_NO_GOOD_INDEX_USED
+insert into performance_schema.events_statements_summary_by_program
+set object_name='XXYYZZ', count_star=1, sum_timer_wait=2, min_timer_wait=3,
+avg_timer_wait=4, max_timer_wait=5;
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'events_statements_summary_by_program'
+update performance_schema.events_statements_summary_by_program
+set count_star=12;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_statements_summary_by_program'
+update performance_schema.events_statements_summary_by_program
+set count_star=12 where object_name like "XXYYZZ";
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_statements_summary_by_program'
+delete from performance_schema.events_statements_summary_by_program
+where count_star=1;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_statements_summary_by_program'
+delete from performance_schema.events_statements_summary_by_program;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_statements_summary_by_program'
+LOCK TABLES performance_schema.events_statements_summary_by_program READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_statements_summary_by_program'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.events_statements_summary_by_program WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_statements_summary_by_program'
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_ets_by_account_by_event_name.result b/mysql-test/suite/perfschema/r/dml_ets_by_account_by_event_name.result
new file mode 100644
index 00000000000..66a0f733d19
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/dml_ets_by_account_by_event_name.result
@@ -0,0 +1,26 @@
+select * from performance_schema.events_transactions_summary_by_account_by_event_name
+where event_name in ('transaction') limit 1;
+select * from performance_schema.events_transactions_summary_by_account_by_event_name
+where event_name='FOO';
+insert into performance_schema.events_transactions_summary_by_account_by_event_name
+set event_name='FOO', user='BAR', host='BAZ',
+count_star=1, sum_timer_wait=2, min_timer_wait=3,
+avg_timer_wait=4, max_timer_wait=5;
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'events_transactions_summary_by_account_by_event_name'
+update performance_schema.events_transactions_summary_by_account_by_event_name
+set count_star=12;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_transactions_summary_by_account_by_event_name'
+update performance_schema.events_transactions_summary_by_account_by_event_name
+set count_star=12 where event_name like "FOO";
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_transactions_summary_by_account_by_event_name'
+delete from performance_schema.events_transactions_summary_by_account_by_event_name
+where count_star=1;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_transactions_summary_by_account_by_event_name'
+delete from performance_schema.events_transactions_summary_by_account_by_event_name;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_transactions_summary_by_account_by_event_name'
+LOCK TABLES performance_schema.events_transactions_summary_by_account_by_event_name READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_transactions_summary_by_account_by_event_name'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.events_transactions_summary_by_account_by_event_name WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_transactions_summary_by_account_by_event_name'
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_ets_by_host_by_event_name.result b/mysql-test/suite/perfschema/r/dml_ets_by_host_by_event_name.result
new file mode 100644
index 00000000000..194d8ff0b4b
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/dml_ets_by_host_by_event_name.result
@@ -0,0 +1,26 @@
+select * from performance_schema.events_transactions_summary_by_host_by_event_name
+where event_name in ('transaction') limit 1;
+select * from performance_schema.events_transactions_summary_by_host_by_event_name
+where event_name='FOO';
+insert into performance_schema.events_transactions_summary_by_host_by_event_name
+set event_name='FOO', thread_id=1,
+count_star=1, sum_timer_wait=2, min_timer_wait=3,
+avg_timer_wait=4, max_timer_wait=5;
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'events_transactions_summary_by_host_by_event_name'
+update performance_schema.events_transactions_summary_by_host_by_event_name
+set count_star=12;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_transactions_summary_by_host_by_event_name'
+update performance_schema.events_transactions_summary_by_host_by_event_name
+set count_star=12 where event_name like "FOO";
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_transactions_summary_by_host_by_event_name'
+delete from performance_schema.events_transactions_summary_by_host_by_event_name
+where count_star=1;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_transactions_summary_by_host_by_event_name'
+delete from performance_schema.events_transactions_summary_by_host_by_event_name;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_transactions_summary_by_host_by_event_name'
+LOCK TABLES performance_schema.events_transactions_summary_by_host_by_event_name READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_transactions_summary_by_host_by_event_name'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.events_transactions_summary_by_host_by_event_name WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_transactions_summary_by_host_by_event_name'
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_ets_by_thread_by_event_name.result b/mysql-test/suite/perfschema/r/dml_ets_by_thread_by_event_name.result
new file mode 100644
index 00000000000..f096d265457
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/dml_ets_by_thread_by_event_name.result
@@ -0,0 +1,26 @@
+select * from performance_schema.events_transactions_summary_by_thread_by_event_name
+where event_name in ('transaction') limit 1;
+select * from performance_schema.events_transactions_summary_by_thread_by_event_name
+where event_name='FOO';
+insert into performance_schema.events_transactions_summary_by_thread_by_event_name
+set event_name='FOO', thread_id=1,
+count_star=1, sum_timer_wait=2, min_timer_wait=3,
+avg_timer_wait=4, max_timer_wait=5;
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'events_transactions_summary_by_thread_by_event_name'
+update performance_schema.events_transactions_summary_by_thread_by_event_name
+set count_star=12;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_transactions_summary_by_thread_by_event_name'
+update performance_schema.events_transactions_summary_by_thread_by_event_name
+set count_star=12 where event_name like "FOO";
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_transactions_summary_by_thread_by_event_name'
+delete from performance_schema.events_transactions_summary_by_thread_by_event_name
+where count_star=1;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_transactions_summary_by_thread_by_event_name'
+delete from performance_schema.events_transactions_summary_by_thread_by_event_name;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_transactions_summary_by_thread_by_event_name'
+LOCK TABLES performance_schema.events_transactions_summary_by_thread_by_event_name READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_transactions_summary_by_thread_by_event_name'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.events_transactions_summary_by_thread_by_event_name WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_transactions_summary_by_thread_by_event_name'
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_ets_by_user_by_event_name.result b/mysql-test/suite/perfschema/r/dml_ets_by_user_by_event_name.result
new file mode 100644
index 00000000000..11d455a35a7
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/dml_ets_by_user_by_event_name.result
@@ -0,0 +1,26 @@
+select * from performance_schema.events_transactions_summary_by_user_by_event_name
+where event_name in ('transaction') limit 1;
+select * from performance_schema.events_transactions_summary_by_user_by_event_name
+where event_name='FOO';
+insert into performance_schema.events_transactions_summary_by_user_by_event_name
+set event_name='FOO', user='BAR',
+count_star=1, sum_timer_wait=2, min_timer_wait=3,
+avg_timer_wait=4, max_timer_wait=5;
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'events_transactions_summary_by_user_by_event_name'
+update performance_schema.events_transactions_summary_by_user_by_event_name
+set count_star=12;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_transactions_summary_by_user_by_event_name'
+update performance_schema.events_transactions_summary_by_user_by_event_name
+set count_star=12 where event_name like "FOO";
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_transactions_summary_by_user_by_event_name'
+delete from performance_schema.events_transactions_summary_by_user_by_event_name
+where count_star=1;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_transactions_summary_by_user_by_event_name'
+delete from performance_schema.events_transactions_summary_by_user_by_event_name;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_transactions_summary_by_user_by_event_name'
+LOCK TABLES performance_schema.events_transactions_summary_by_user_by_event_name READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_transactions_summary_by_user_by_event_name'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.events_transactions_summary_by_user_by_event_name WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_transactions_summary_by_user_by_event_name'
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_ets_global_by_event_name.result b/mysql-test/suite/perfschema/r/dml_ets_global_by_event_name.result
new file mode 100644
index 00000000000..0f2bd599af8
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/dml_ets_global_by_event_name.result
@@ -0,0 +1,25 @@
+select * from performance_schema.events_transactions_summary_global_by_event_name
+where event_name in ('transaction') limit 1;
+select * from performance_schema.events_transactions_summary_global_by_event_name
+where event_name='FOO';
+insert into performance_schema.events_transactions_summary_global_by_event_name
+set event_name='FOO', count_star=1, sum_timer_wait=2, min_timer_wait=3,
+avg_timer_wait=4, max_timer_wait=5;
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'events_transactions_summary_global_by_event_name'
+update performance_schema.events_transactions_summary_global_by_event_name
+set count_star=12;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_transactions_summary_global_by_event_name'
+update performance_schema.events_transactions_summary_global_by_event_name
+set count_star=12 where event_name like "FOO";
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_transactions_summary_global_by_event_name'
+delete from performance_schema.events_transactions_summary_global_by_event_name
+where count_star=1;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_transactions_summary_global_by_event_name'
+delete from performance_schema.events_transactions_summary_global_by_event_name;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_transactions_summary_global_by_event_name'
+LOCK TABLES performance_schema.events_transactions_summary_global_by_event_name READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_transactions_summary_global_by_event_name'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.events_transactions_summary_global_by_event_name WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_transactions_summary_global_by_event_name'
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_events_stages_current.result b/mysql-test/suite/perfschema/r/dml_events_stages_current.result
index 326f87644ea..5b8d0c61de4 100644
--- a/mysql-test/suite/perfschema/r/dml_events_stages_current.result
+++ b/mysql-test/suite/perfschema/r/dml_events_stages_current.result
@@ -38,5 +38,7 @@ SOURCE Name and line number of the source file containing the instrumented code
TIMER_START Value in picoseconds when the event timing started or NULL if timing is not collected.
TIMER_END Value in picoseconds when the event timing ended, or NULL if the event has not ended or timing is not collected.
TIMER_WAIT Value in picoseconds of the event's duration or NULL if the event has not ended or timing is not collected.
+WORK_COMPLETED
+WORK_ESTIMATED
NESTING_EVENT_ID EVENT_ID of event within which this event nests.
NESTING_EVENT_TYPE Nesting event type. Either statement, stage or wait.
diff --git a/mysql-test/suite/perfschema/r/dml_events_stages_history.result b/mysql-test/suite/perfschema/r/dml_events_stages_history.result
index b00963e5bd9..d76e2c2e7df 100644
--- a/mysql-test/suite/perfschema/r/dml_events_stages_history.result
+++ b/mysql-test/suite/perfschema/r/dml_events_stages_history.result
@@ -42,5 +42,7 @@ SOURCE Name and line number of the source file containing the instrumented code
TIMER_START Value in picoseconds when the event timing started or NULL if timing is not collected.
TIMER_END Value in picoseconds when the event timing ended, or NULL if the event has not ended or timing is not collected.
TIMER_WAIT Value in picoseconds of the event's duration or NULL if the event has not ended or timing is not collected.
+WORK_COMPLETED
+WORK_ESTIMATED
NESTING_EVENT_ID EVENT_ID of event within which this event nests.
NESTING_EVENT_TYPE Nesting event type. Either statement, stage or wait.
diff --git a/mysql-test/suite/perfschema/r/dml_events_stages_history_long.result b/mysql-test/suite/perfschema/r/dml_events_stages_history_long.result
index 9c20113b2af..4eeb1f8dc2e 100644
--- a/mysql-test/suite/perfschema/r/dml_events_stages_history_long.result
+++ b/mysql-test/suite/perfschema/r/dml_events_stages_history_long.result
@@ -42,5 +42,7 @@ SOURCE Name and line number of the source file containing the instrumented code
TIMER_START Value in picoseconds when the event timing started or NULL if timing is not collected.
TIMER_END Value in picoseconds when the event timing ended, or NULL if the event has not ended or timing is not collected.
TIMER_WAIT Value in picoseconds of the event's duration or NULL if the event has not ended or timing is not collected.
+WORK_COMPLETED
+WORK_ESTIMATED
NESTING_EVENT_ID EVENT_ID of event within which this event nests.
NESTING_EVENT_TYPE Nesting event type. Either statement, stage or wait.
diff --git a/mysql-test/suite/perfschema/r/dml_events_statements_current.result b/mysql-test/suite/perfschema/r/dml_events_statements_current.result
index 5f3b0f221c0..45e3682439c 100644
--- a/mysql-test/suite/perfschema/r/dml_events_statements_current.result
+++ b/mysql-test/suite/perfschema/r/dml_events_statements_current.result
@@ -70,3 +70,4 @@ NO_INDEX_USED 0 if the statement performed a table scan with an index, 1 if with
NO_GOOD_INDEX_USED 0 if a good index was found for the statement, 1 if no good index was found. See the Range checked for each record description in the EXPLAIN article.
NESTING_EVENT_ID Reserved, currently NULL.
NESTING_EVENT_TYPE Reserved, currently NULL.
+NESTING_EVENT_LEVEL
diff --git a/mysql-test/suite/perfschema/r/dml_events_statements_history.result b/mysql-test/suite/perfschema/r/dml_events_statements_history.result
index f5f77bfdfb5..b96d7497037 100644
--- a/mysql-test/suite/perfschema/r/dml_events_statements_history.result
+++ b/mysql-test/suite/perfschema/r/dml_events_statements_history.result
@@ -74,3 +74,4 @@ NO_INDEX_USED 0 if the statement performed a table scan with an index, 1 if with
NO_GOOD_INDEX_USED 0 if a good index was found for the statement, 1 if no good index was found. See the Range checked for each record description in the EXPLAIN article.
NESTING_EVENT_ID Reserved, currently NULL.
NESTING_EVENT_TYPE Reserved, currently NULL.
+NESTING_EVENT_LEVEL
diff --git a/mysql-test/suite/perfschema/r/dml_events_statements_history_long.result b/mysql-test/suite/perfschema/r/dml_events_statements_history_long.result
index e8b58122b16..ce89c5e6219 100644
--- a/mysql-test/suite/perfschema/r/dml_events_statements_history_long.result
+++ b/mysql-test/suite/perfschema/r/dml_events_statements_history_long.result
@@ -74,3 +74,4 @@ NO_INDEX_USED 0 if the statement performed a table scan with an index, 1 if with
NO_GOOD_INDEX_USED 0 if a good index was found for the statement, 1 if no good index was found. See the Range checked for each record description in the EXPLAIN article.
NESTING_EVENT_ID Reserved, currently NULL.
NESTING_EVENT_TYPE Reserved, currently NULL.
+NESTING_EVENT_LEVEL
diff --git a/mysql-test/suite/perfschema/r/dml_events_transactions_current.result b/mysql-test/suite/perfschema/r/dml_events_transactions_current.result
new file mode 100644
index 00000000000..9a6c4f3bd58
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/dml_events_transactions_current.result
@@ -0,0 +1,25 @@
+select * from performance_schema.events_transactions_current
+where event_name in ('transaction') limit 1;
+select * from performance_schema.events_transactions_current
+where event_name='FOO';
+insert into performance_schema.events_transactions_current
+set thread_id='1', event_id=1,
+event_name='FOO', timer_start=1, timer_end=2, timer_wait=3;
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'events_transactions_current'
+update performance_schema.events_transactions_current
+set timer_start=12;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_transactions_current'
+update performance_schema.events_transactions_current
+set timer_start=12 where thread_id=0;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_transactions_current'
+delete from performance_schema.events_transactions_current
+where thread_id=1;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_transactions_current'
+delete from performance_schema.events_transactions_current;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_transactions_current'
+LOCK TABLES performance_schema.events_transactions_current READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_transactions_current'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.events_transactions_current WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_transactions_current'
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_events_transactions_history.result b/mysql-test/suite/perfschema/r/dml_events_transactions_history.result
new file mode 100644
index 00000000000..000e6a26753
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/dml_events_transactions_history.result
@@ -0,0 +1,29 @@
+select * from performance_schema.events_transactions_history
+where event_name in ('transaction') limit 1;
+select * from performance_schema.events_transactions_history
+where event_name='FOO';
+select * from performance_schema.events_transactions_history
+where event_name in ('transaction') order by timer_wait limit 1;
+select * from performance_schema.events_transactions_history
+where event_name in ('transaction') order by timer_wait desc limit 1;
+insert into performance_schema.events_transactions_history
+set thread_id='1', event_id=1,
+event_name='FOO', timer_start=1, timer_end=2, timer_wait=3;
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'events_transactions_history'
+update performance_schema.events_transactions_history
+set timer_start=12;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_transactions_history'
+update performance_schema.events_transactions_history
+set timer_start=12 where thread_id=0;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_transactions_history'
+delete from performance_schema.events_transactions_history
+where thread_id=1;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_transactions_history'
+delete from performance_schema.events_transactions_history;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_transactions_history'
+LOCK TABLES performance_schema.events_transactions_history READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_transactions_history'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.events_transactions_history WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_transactions_history'
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_events_transactions_history_long.result b/mysql-test/suite/perfschema/r/dml_events_transactions_history_long.result
new file mode 100644
index 00000000000..e954bcd1be1
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/dml_events_transactions_history_long.result
@@ -0,0 +1,29 @@
+select * from performance_schema.events_transactions_history_long
+where event_name in ('transaction') limit 1;
+select * from performance_schema.events_transactions_history_long
+where event_name='FOO';
+select * from performance_schema.events_transactions_history_long
+where event_name in ('transaction') order by timer_wait limit 1;
+select * from performance_schema.events_transactions_history_long
+where event_name in ('transaction') order by timer_wait desc limit 1;
+insert into performance_schema.events_transactions_history_long
+set thread_id='1', event_id=1,
+event_name='FOO', timer_start=1, timer_end=2, timer_wait=3;
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'events_transactions_history_long'
+update performance_schema.events_transactions_history_long
+set timer_start=12;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_transactions_history_long'
+update performance_schema.events_transactions_history_long
+set timer_start=12 where thread_id=0;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_transactions_history_long'
+delete from performance_schema.events_transactions_history_long
+where thread_id=1;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_transactions_history_long'
+delete from performance_schema.events_transactions_history_long;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_transactions_history_long'
+LOCK TABLES performance_schema.events_transactions_history_long READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_transactions_history_long'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.events_transactions_history_long WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_transactions_history_long'
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_file_instances.result b/mysql-test/suite/perfschema/r/dml_file_instances.result
index 3ecbc18c0ad..a87d7d2b55e 100644
--- a/mysql-test/suite/perfschema/r/dml_file_instances.result
+++ b/mysql-test/suite/perfschema/r/dml_file_instances.result
@@ -28,3 +28,62 @@ column_name column_comment
FILE_NAME File name.
EVENT_NAME Instrument name associated with the file.
OPEN_COUNT Open handles on the file. A value of greater than zero means that the file is currently open.
+###
+### Bug#26152751: INNODB LEAKS MEMORY, PERFORMANCE_SCHEMA FILE_INSTANCES
+### #SQL-IB3129987-252773.IBD
+###
+CREATE DATABASE db_26152751;
+USE db_26152751;
+SELECT FILE_NAME FROM performance_schema.file_instances WHERE FILE_NAME LIKE "%t_db_26152751%";
+FILE_NAME
+CREATE TABLE t_db_26152751 (a INT) ENGINE=MYISAM;
+SELECT FILE_NAME FROM performance_schema.file_instances WHERE FILE_NAME LIKE "%t_db_26152751%";
+FILE_NAME
+t_db_26152751.MYD
+t_db_26152751.MYI
+t_db_26152751.frm
+RENAME TABLE t_db_26152751 to t_db_26152751_new;
+SELECT FILE_NAME FROM performance_schema.file_instances WHERE FILE_NAME LIKE "%t_db_26152751%";
+FILE_NAME
+t_db_26152751_new.MYD
+t_db_26152751_new.MYI
+t_db_26152751_new.frm
+RENAME TABLE t_db_26152751_new to t_db_26152751;
+SELECT FILE_NAME FROM performance_schema.file_instances WHERE FILE_NAME LIKE "%t_db_26152751%";
+FILE_NAME
+t_db_26152751.MYD
+t_db_26152751.MYI
+t_db_26152751.frm
+ALTER TABLE t_db_26152751 ADD COLUMN b INT;
+SELECT FILE_NAME FROM performance_schema.file_instances WHERE FILE_NAME LIKE "%t_db_26152751%";
+FILE_NAME
+t_db_26152751.frm
+t_db_26152751.MYI
+t_db_26152751.MYD
+DROP TABLE t_db_26152751;
+SELECT FILE_NAME FROM performance_schema.file_instances WHERE FILE_NAME LIKE "%t_db_26152751%";
+FILE_NAME
+CREATE TABLE t_db_26152751 (a INT) ENGINE=INNODB;
+SELECT FILE_NAME FROM performance_schema.file_instances WHERE FILE_NAME LIKE "%t_db_26152751%";
+FILE_NAME
+t_db_26152751.frm
+t_db_26152751.ibd
+RENAME TABLE t_db_26152751 to t_db_26152751_new;
+SELECT FILE_NAME FROM performance_schema.file_instances WHERE FILE_NAME LIKE "%t_db_26152751%";
+FILE_NAME
+t_db_26152751_new.frm
+t_db_26152751_new.ibd
+RENAME TABLE t_db_26152751_new to t_db_26152751;
+SELECT FILE_NAME FROM performance_schema.file_instances WHERE FILE_NAME LIKE "%t_db_26152751%";
+FILE_NAME
+t_db_26152751.frm
+t_db_26152751.ibd
+ALTER TABLE t_db_26152751 ADD COLUMN b INT;
+SELECT FILE_NAME FROM performance_schema.file_instances WHERE FILE_NAME LIKE "%t_db_26152751%";
+FILE_NAME
+t_db_26152751.frm
+t_db_26152751.ibd
+DROP TABLE t_db_26152751;
+SELECT FILE_NAME FROM performance_schema.file_instances WHERE FILE_NAME LIKE "%t_db_26152751%";
+FILE_NAME
+DROP DATABASE db_26152751;
diff --git a/mysql-test/suite/perfschema/r/dml_global_status.result b/mysql-test/suite/perfschema/r/dml_global_status.result
new file mode 100644
index 00000000000..90b7ac8147f
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/dml_global_status.result
@@ -0,0 +1,21 @@
+select * from performance_schema.global_status
+where variable_name like 'bytes_%' limit 1;
+select * from performance_schema.global_status
+where variable_name='FOO';
+insert into performance_schema.global_status
+set variable_name='FOO', variable_value='BAR';
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'global_status'
+update performance_schema.global_status
+set variable_name='FOO', variable_value='BAR';
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'global_status'
+delete from performance_schema.global_status
+where variable_name <> 'FOO';
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'global_status'
+delete from performance_schema.global_status;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'global_status'
+LOCK TABLES performance_schema.global_status READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'global_status'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.global_status WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'global_status'
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_global_variables.result b/mysql-test/suite/perfschema/r/dml_global_variables.result
new file mode 100644
index 00000000000..08d15af34d3
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/dml_global_variables.result
@@ -0,0 +1,21 @@
+select * from performance_schema.global_variables
+where variable_name like 'autocommit%' limit 1;
+select * from performance_schema.global_variables
+where variable_name='FOO';
+insert into performance_schema.global_variables
+set variable_name='FOO', variable_value='BAR';
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'global_variables'
+update performance_schema.global_variables
+set variable_name='FOO', variable_value='BAR';
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'global_variables'
+delete from performance_schema.global_variables
+where variable_name <> 'FOO';
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'global_variables'
+delete from performance_schema.global_variables;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'global_variables'
+LOCK TABLES performance_schema.global_variables READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'global_variables'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.global_variables WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'global_variables'
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_handler.result b/mysql-test/suite/perfschema/r/dml_handler.result
index ce0f87e7733..ce4ae6bf9a3 100644
--- a/mysql-test/suite/perfschema/r/dml_handler.result
+++ b/mysql-test/suite/perfschema/r/dml_handler.result
@@ -1,6 +1,6 @@
-
+#
# Create a temporary table of performance schema table names
-
+#
CREATE TEMPORARY TABLE table_list (id INT AUTO_INCREMENT, PRIMARY KEY (id)) AS
SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_SCHEMA='performance_schema'
@@ -8,118 +8,202 @@ WHERE TABLE_SCHEMA='performance_schema'
SELECT COUNT(*) FROM table_list INTO @table_count;
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
-
+#
# For each table in the performance schema, attempt HANDLER...OPEN,
# which should fail with an error 1031, ER_ILLEGAL_HA.
-
-SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=52;
+#
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=80;
+HANDLER performance_schema.user_variables_by_thread OPEN;
+ERROR HY000: Storage engine PERFORMANCE_SCHEMA of the table `performance_schema`.`user_variables_by_thread` doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=79;
HANDLER performance_schema.users OPEN;
ERROR HY000: Storage engine PERFORMANCE_SCHEMA of the table `performance_schema`.`users` doesn't have this option
-SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=51;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=78;
HANDLER performance_schema.threads OPEN;
ERROR HY000: Storage engine PERFORMANCE_SCHEMA of the table `performance_schema`.`threads` doesn't have this option
-SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=50;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=77;
HANDLER performance_schema.table_lock_waits_summary_by_table OPEN;
ERROR HY000: Storage engine PERFORMANCE_SCHEMA of the table `performance_schema`.`table_lock_waits_summary_by_table` doesn't have this option
-SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=49;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=76;
HANDLER performance_schema.table_io_waits_summary_by_table OPEN;
ERROR HY000: Storage engine PERFORMANCE_SCHEMA of the table `performance_schema`.`table_io_waits_summary_by_table` doesn't have this option
-SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=48;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=75;
HANDLER performance_schema.table_io_waits_summary_by_index_usage OPEN;
ERROR HY000: Storage engine PERFORMANCE_SCHEMA of the table `performance_schema`.`table_io_waits_summary_by_index_usage` doesn't have this option
-SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=47;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=74;
+HANDLER performance_schema.table_handles OPEN;
+ERROR HY000: Storage engine PERFORMANCE_SCHEMA of the table `performance_schema`.`table_handles` doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=73;
+HANDLER performance_schema.status_by_user OPEN;
+ERROR HY000: Storage engine PERFORMANCE_SCHEMA of the table `performance_schema`.`status_by_user` doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=72;
+HANDLER performance_schema.status_by_thread OPEN;
+ERROR HY000: Storage engine PERFORMANCE_SCHEMA of the table `performance_schema`.`status_by_thread` doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=71;
+HANDLER performance_schema.status_by_host OPEN;
+ERROR HY000: Storage engine PERFORMANCE_SCHEMA of the table `performance_schema`.`status_by_host` doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=70;
+HANDLER performance_schema.status_by_account OPEN;
+ERROR HY000: Storage engine PERFORMANCE_SCHEMA of the table `performance_schema`.`status_by_account` doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=69;
HANDLER performance_schema.socket_summary_by_instance OPEN;
ERROR HY000: Storage engine PERFORMANCE_SCHEMA of the table `performance_schema`.`socket_summary_by_instance` doesn't have this option
-SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=46;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=68;
HANDLER performance_schema.socket_summary_by_event_name OPEN;
ERROR HY000: Storage engine PERFORMANCE_SCHEMA of the table `performance_schema`.`socket_summary_by_event_name` doesn't have this option
-SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=45;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=67;
HANDLER performance_schema.socket_instances OPEN;
ERROR HY000: Storage engine PERFORMANCE_SCHEMA of the table `performance_schema`.`socket_instances` doesn't have this option
-SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=44;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=66;
HANDLER performance_schema.setup_timers OPEN;
ERROR HY000: Storage engine PERFORMANCE_SCHEMA of the table `performance_schema`.`setup_timers` doesn't have this option
-SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=43;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=65;
HANDLER performance_schema.setup_objects OPEN;
ERROR HY000: Storage engine PERFORMANCE_SCHEMA of the table `performance_schema`.`setup_objects` doesn't have this option
-SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=42;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=64;
HANDLER performance_schema.setup_instruments OPEN;
ERROR HY000: Storage engine PERFORMANCE_SCHEMA of the table `performance_schema`.`setup_instruments` doesn't have this option
-SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=41;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=63;
HANDLER performance_schema.setup_consumers OPEN;
ERROR HY000: Storage engine PERFORMANCE_SCHEMA of the table `performance_schema`.`setup_consumers` doesn't have this option
-SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=40;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=62;
HANDLER performance_schema.setup_actors OPEN;
ERROR HY000: Storage engine PERFORMANCE_SCHEMA of the table `performance_schema`.`setup_actors` doesn't have this option
-SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=39;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=61;
+HANDLER performance_schema.session_status OPEN;
+ERROR HY000: Storage engine PERFORMANCE_SCHEMA of the table `performance_schema`.`session_status` doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=60;
HANDLER performance_schema.session_connect_attrs OPEN;
ERROR HY000: Storage engine PERFORMANCE_SCHEMA of the table `performance_schema`.`session_connect_attrs` doesn't have this option
-SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=38;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=59;
HANDLER performance_schema.session_account_connect_attrs OPEN;
ERROR HY000: Storage engine PERFORMANCE_SCHEMA of the table `performance_schema`.`session_account_connect_attrs` doesn't have this option
-SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=37;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=58;
HANDLER performance_schema.rwlock_instances OPEN;
ERROR HY000: Storage engine PERFORMANCE_SCHEMA of the table `performance_schema`.`rwlock_instances` doesn't have this option
-SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=36;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=57;
+HANDLER performance_schema.replication_connection_configuration OPEN;
+ERROR HY000: Storage engine PERFORMANCE_SCHEMA of the table `performance_schema`.`replication_connection_configuration` doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=56;
+HANDLER performance_schema.replication_applier_status_by_coordinator OPEN;
+ERROR HY000: Storage engine PERFORMANCE_SCHEMA of the table `performance_schema`.`replication_applier_status_by_coordinator` doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=55;
+HANDLER performance_schema.replication_applier_status OPEN;
+ERROR HY000: Storage engine PERFORMANCE_SCHEMA of the table `performance_schema`.`replication_applier_status` doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=54;
+HANDLER performance_schema.replication_applier_configuration OPEN;
+ERROR HY000: Storage engine PERFORMANCE_SCHEMA of the table `performance_schema`.`replication_applier_configuration` doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=53;
+HANDLER performance_schema.prepared_statements_instances OPEN;
+ERROR HY000: Storage engine PERFORMANCE_SCHEMA of the table `performance_schema`.`prepared_statements_instances` doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=52;
HANDLER performance_schema.performance_timers OPEN;
ERROR HY000: Storage engine PERFORMANCE_SCHEMA of the table `performance_schema`.`performance_timers` doesn't have this option
-SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=35;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=51;
HANDLER performance_schema.objects_summary_global_by_type OPEN;
ERROR HY000: Storage engine PERFORMANCE_SCHEMA of the table `performance_schema`.`objects_summary_global_by_type` doesn't have this option
-SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=34;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=50;
HANDLER performance_schema.mutex_instances OPEN;
ERROR HY000: Storage engine PERFORMANCE_SCHEMA of the table `performance_schema`.`mutex_instances` doesn't have this option
-SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=33;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=49;
+HANDLER performance_schema.metadata_locks OPEN;
+ERROR HY000: Storage engine PERFORMANCE_SCHEMA of the table `performance_schema`.`metadata_locks` doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=48;
+HANDLER performance_schema.memory_summary_global_by_event_name OPEN;
+ERROR HY000: Storage engine PERFORMANCE_SCHEMA of the table `performance_schema`.`memory_summary_global_by_event_name` doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=47;
+HANDLER performance_schema.memory_summary_by_user_by_event_name OPEN;
+ERROR HY000: Storage engine PERFORMANCE_SCHEMA of the table `performance_schema`.`memory_summary_by_user_by_event_name` doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=46;
+HANDLER performance_schema.memory_summary_by_thread_by_event_name OPEN;
+ERROR HY000: Storage engine PERFORMANCE_SCHEMA of the table `performance_schema`.`memory_summary_by_thread_by_event_name` doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=45;
+HANDLER performance_schema.memory_summary_by_host_by_event_name OPEN;
+ERROR HY000: Storage engine PERFORMANCE_SCHEMA of the table `performance_schema`.`memory_summary_by_host_by_event_name` doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=44;
+HANDLER performance_schema.memory_summary_by_account_by_event_name OPEN;
+ERROR HY000: Storage engine PERFORMANCE_SCHEMA of the table `performance_schema`.`memory_summary_by_account_by_event_name` doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=43;
HANDLER performance_schema.host_cache OPEN;
ERROR HY000: Storage engine PERFORMANCE_SCHEMA of the table `performance_schema`.`host_cache` doesn't have this option
-SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=32;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=42;
HANDLER performance_schema.hosts OPEN;
ERROR HY000: Storage engine PERFORMANCE_SCHEMA of the table `performance_schema`.`hosts` doesn't have this option
-SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=31;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=41;
+HANDLER performance_schema.global_status OPEN;
+ERROR HY000: Storage engine PERFORMANCE_SCHEMA of the table `performance_schema`.`global_status` doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=40;
HANDLER performance_schema.file_summary_by_instance OPEN;
ERROR HY000: Storage engine PERFORMANCE_SCHEMA of the table `performance_schema`.`file_summary_by_instance` doesn't have this option
-SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=30;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=39;
HANDLER performance_schema.file_summary_by_event_name OPEN;
ERROR HY000: Storage engine PERFORMANCE_SCHEMA of the table `performance_schema`.`file_summary_by_event_name` doesn't have this option
-SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=29;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=38;
HANDLER performance_schema.file_instances OPEN;
ERROR HY000: Storage engine PERFORMANCE_SCHEMA of the table `performance_schema`.`file_instances` doesn't have this option
-SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=28;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=37;
HANDLER performance_schema.events_waits_summary_global_by_event_name OPEN;
ERROR HY000: Storage engine PERFORMANCE_SCHEMA of the table `performance_schema`.`events_waits_summary_global_by_event_name` doesn't have this option
-SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=27;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=36;
HANDLER performance_schema.events_waits_summary_by_user_by_event_name OPEN;
ERROR HY000: Storage engine PERFORMANCE_SCHEMA of the table `performance_schema`.`events_waits_summary_by_user_by_event_name` doesn't have this option
-SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=26;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=35;
HANDLER performance_schema.events_waits_summary_by_thread_by_event_name OPEN;
ERROR HY000: Storage engine PERFORMANCE_SCHEMA of the table `performance_schema`.`events_waits_summary_by_thread_by_event_name` doesn't have this option
-SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=25;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=34;
HANDLER performance_schema.events_waits_summary_by_instance OPEN;
ERROR HY000: Storage engine PERFORMANCE_SCHEMA of the table `performance_schema`.`events_waits_summary_by_instance` doesn't have this option
-SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=24;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=33;
HANDLER performance_schema.events_waits_summary_by_host_by_event_name OPEN;
ERROR HY000: Storage engine PERFORMANCE_SCHEMA of the table `performance_schema`.`events_waits_summary_by_host_by_event_name` doesn't have this option
-SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=23;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=32;
HANDLER performance_schema.events_waits_summary_by_account_by_event_name OPEN;
ERROR HY000: Storage engine PERFORMANCE_SCHEMA of the table `performance_schema`.`events_waits_summary_by_account_by_event_name` doesn't have this option
-SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=22;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=31;
HANDLER performance_schema.events_waits_history_long OPEN;
ERROR HY000: Storage engine PERFORMANCE_SCHEMA of the table `performance_schema`.`events_waits_history_long` doesn't have this option
-SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=21;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=30;
HANDLER performance_schema.events_waits_history OPEN;
ERROR HY000: Storage engine PERFORMANCE_SCHEMA of the table `performance_schema`.`events_waits_history` doesn't have this option
-SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=20;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=29;
HANDLER performance_schema.events_waits_current OPEN;
ERROR HY000: Storage engine PERFORMANCE_SCHEMA of the table `performance_schema`.`events_waits_current` doesn't have this option
-SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=19;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=28;
+HANDLER performance_schema.events_transactions_summary_global_by_event_name OPEN;
+ERROR HY000: Storage engine PERFORMANCE_SCHEMA of the table `performance_schema`.`events_transactions_summary_global_by_event_name` doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=27;
+HANDLER performance_schema.events_transactions_summary_by_user_by_event_name OPEN;
+ERROR HY000: Storage engine PERFORMANCE_SCHEMA of the table `performance_schema`.`events_transactions_summary_by_user_by_event_name` doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=26;
+HANDLER performance_schema.events_transactions_summary_by_thread_by_event_name OPEN;
+ERROR HY000: Storage engine PERFORMANCE_SCHEMA of the table `performance_schema`.`events_transactions_summary_by_thread_by_event_name` doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=25;
+HANDLER performance_schema.events_transactions_summary_by_host_by_event_name OPEN;
+ERROR HY000: Storage engine PERFORMANCE_SCHEMA of the table `performance_schema`.`events_transactions_summary_by_host_by_event_name` doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=24;
+HANDLER performance_schema.events_transactions_summary_by_account_by_event_name OPEN;
+ERROR HY000: Storage engine PERFORMANCE_SCHEMA of the table `performance_schema`.`events_transactions_summary_by_account_by_event_name` doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=23;
+HANDLER performance_schema.events_transactions_history_long OPEN;
+ERROR HY000: Storage engine PERFORMANCE_SCHEMA of the table `performance_schema`.`events_transactions_history_long` doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=22;
+HANDLER performance_schema.events_transactions_history OPEN;
+ERROR HY000: Storage engine PERFORMANCE_SCHEMA of the table `performance_schema`.`events_transactions_history` doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=21;
+HANDLER performance_schema.events_transactions_current OPEN;
+ERROR HY000: Storage engine PERFORMANCE_SCHEMA of the table `performance_schema`.`events_transactions_current` doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=20;
HANDLER performance_schema.events_statements_summary_global_by_event_name OPEN;
ERROR HY000: Storage engine PERFORMANCE_SCHEMA of the table `performance_schema`.`events_statements_summary_global_by_event_name` doesn't have this option
-SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=18;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=19;
HANDLER performance_schema.events_statements_summary_by_user_by_event_name OPEN;
ERROR HY000: Storage engine PERFORMANCE_SCHEMA of the table `performance_schema`.`events_statements_summary_by_user_by_event_name` doesn't have this option
-SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=17;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=18;
HANDLER performance_schema.events_statements_summary_by_thread_by_event_name OPEN;
ERROR HY000: Storage engine PERFORMANCE_SCHEMA of the table `performance_schema`.`events_statements_summary_by_thread_by_event_name` doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=17;
+HANDLER performance_schema.events_statements_summary_by_program OPEN;
+ERROR HY000: Storage engine PERFORMANCE_SCHEMA of the table `performance_schema`.`events_statements_summary_by_program` doesn't have this option
SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=16;
HANDLER performance_schema.events_statements_summary_by_host_by_event_name OPEN;
ERROR HY000: Storage engine PERFORMANCE_SCHEMA of the table `performance_schema`.`events_statements_summary_by_host_by_event_name` doesn't have this option
diff --git a/mysql-test/suite/perfschema/r/dml_mems_by_account_by_event_name.result b/mysql-test/suite/perfschema/r/dml_mems_by_account_by_event_name.result
new file mode 100644
index 00000000000..6333ae9c3c3
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/dml_mems_by_account_by_event_name.result
@@ -0,0 +1,26 @@
+select * from performance_schema.memory_summary_by_account_by_event_name
+where event_name like 'memory/%' limit 1;
+select * from performance_schema.memory_summary_by_account_by_event_name
+where event_name='FOO';
+insert into performance_schema.memory_summary_by_account_by_event_name
+set event_name='FOO', user='BAR', host='BAZ',
+count_alloc=1, count_free=2, sum_number_of_bytes_alloc=3,
+sum_number_of_bytes_free=4, low_count_used=5;
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'memory_summary_by_account_by_event_name'
+update performance_schema.memory_summary_by_account_by_event_name
+set count_alloc=12;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'memory_summary_by_account_by_event_name'
+update performance_schema.memory_summary_by_account_by_event_name
+set count_alloc=12 where event_name like "FOO";
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'memory_summary_by_account_by_event_name'
+delete from performance_schema.memory_summary_by_account_by_event_name
+where count_alloc=1;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'memory_summary_by_account_by_event_name'
+delete from performance_schema.memory_summary_by_account_by_event_name;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'memory_summary_by_account_by_event_name'
+LOCK TABLES performance_schema.memory_summary_by_account_by_event_name READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'memory_summary_by_account_by_event_name'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.memory_summary_by_account_by_event_name WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'memory_summary_by_account_by_event_name'
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_mems_by_host_by_event_name.result b/mysql-test/suite/perfschema/r/dml_mems_by_host_by_event_name.result
new file mode 100644
index 00000000000..6e2c855c581
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/dml_mems_by_host_by_event_name.result
@@ -0,0 +1,26 @@
+select * from performance_schema.memory_summary_by_host_by_event_name
+where event_name like 'memory/%' limit 1;
+select * from performance_schema.memory_summary_by_host_by_event_name
+where event_name='FOO';
+insert into performance_schema.memory_summary_by_host_by_event_name
+set event_name='FOO', host='BAZ',
+count_alloc=1, count_free=2, sum_number_of_bytes_alloc=3,
+sum_number_of_bytes_free=4, low_count_used=5;
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'memory_summary_by_host_by_event_name'
+update performance_schema.memory_summary_by_host_by_event_name
+set count_alloc=12;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'memory_summary_by_host_by_event_name'
+update performance_schema.memory_summary_by_host_by_event_name
+set count_alloc=12 where event_name like "FOO";
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'memory_summary_by_host_by_event_name'
+delete from performance_schema.memory_summary_by_host_by_event_name
+where count_alloc=1;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'memory_summary_by_host_by_event_name'
+delete from performance_schema.memory_summary_by_host_by_event_name;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'memory_summary_by_host_by_event_name'
+LOCK TABLES performance_schema.memory_summary_by_host_by_event_name READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'memory_summary_by_host_by_event_name'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.memory_summary_by_host_by_event_name WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'memory_summary_by_host_by_event_name'
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_mems_by_thread_by_event_name.result b/mysql-test/suite/perfschema/r/dml_mems_by_thread_by_event_name.result
new file mode 100644
index 00000000000..f1576b22896
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/dml_mems_by_thread_by_event_name.result
@@ -0,0 +1,26 @@
+select * from performance_schema.memory_summary_by_thread_by_event_name
+where event_name like 'memory/%' limit 1;
+select * from performance_schema.memory_summary_by_thread_by_event_name
+where event_name='FOO';
+insert into performance_schema.memory_summary_by_thread_by_event_name
+set event_name='FOO', thread_id=12,
+count_alloc=1, count_free=2, sum_number_of_bytes_alloc=3,
+sum_number_of_bytes_free=4, low_count_used=5;
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'memory_summary_by_thread_by_event_name'
+update performance_schema.memory_summary_by_thread_by_event_name
+set count_alloc=12;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'memory_summary_by_thread_by_event_name'
+update performance_schema.memory_summary_by_thread_by_event_name
+set count_alloc=12 where event_name like "FOO";
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'memory_summary_by_thread_by_event_name'
+delete from performance_schema.memory_summary_by_thread_by_event_name
+where count_alloc=1;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'memory_summary_by_thread_by_event_name'
+delete from performance_schema.memory_summary_by_thread_by_event_name;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'memory_summary_by_thread_by_event_name'
+LOCK TABLES performance_schema.memory_summary_by_thread_by_event_name READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'memory_summary_by_thread_by_event_name'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.memory_summary_by_thread_by_event_name WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'memory_summary_by_thread_by_event_name'
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_mems_by_user_by_event_name.result b/mysql-test/suite/perfschema/r/dml_mems_by_user_by_event_name.result
new file mode 100644
index 00000000000..3beab7f9ba4
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/dml_mems_by_user_by_event_name.result
@@ -0,0 +1,26 @@
+select * from performance_schema.memory_summary_by_user_by_event_name
+where event_name like 'memory/%' limit 1;
+select * from performance_schema.memory_summary_by_user_by_event_name
+where event_name='FOO';
+insert into performance_schema.memory_summary_by_user_by_event_name
+set event_name='FOO', user='BAR',
+count_alloc=1, count_free=2, sum_number_of_bytes_alloc=3,
+sum_number_of_bytes_free=4, low_count_used=5;
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'memory_summary_by_user_by_event_name'
+update performance_schema.memory_summary_by_user_by_event_name
+set count_alloc=12;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'memory_summary_by_user_by_event_name'
+update performance_schema.memory_summary_by_user_by_event_name
+set count_alloc=12 where event_name like "FOO";
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'memory_summary_by_user_by_event_name'
+delete from performance_schema.memory_summary_by_user_by_event_name
+where count_alloc=1;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'memory_summary_by_user_by_event_name'
+delete from performance_schema.memory_summary_by_user_by_event_name;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'memory_summary_by_user_by_event_name'
+LOCK TABLES performance_schema.memory_summary_by_user_by_event_name READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'memory_summary_by_user_by_event_name'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.memory_summary_by_user_by_event_name WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'memory_summary_by_user_by_event_name'
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_mems_global_by_event_name.result b/mysql-test/suite/perfschema/r/dml_mems_global_by_event_name.result
new file mode 100644
index 00000000000..06ac00d1d8f
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/dml_mems_global_by_event_name.result
@@ -0,0 +1,26 @@
+select * from performance_schema.memory_summary_global_by_event_name
+where event_name like 'memory/%' limit 1;
+select * from performance_schema.memory_summary_global_by_event_name
+where event_name='FOO';
+insert into performance_schema.memory_summary_global_by_event_name
+set event_name='FOO',
+count_alloc=1, count_free=2, sum_number_of_bytes_alloc=3,
+sum_number_of_bytes_free=4, low_count_used=5;
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'memory_summary_global_by_event_name'
+update performance_schema.memory_summary_global_by_event_name
+set count_alloc=12;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'memory_summary_global_by_event_name'
+update performance_schema.memory_summary_global_by_event_name
+set count_alloc=12 where event_name like "FOO";
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'memory_summary_global_by_event_name'
+delete from performance_schema.memory_summary_global_by_event_name
+where count_alloc=1;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'memory_summary_global_by_event_name'
+delete from performance_schema.memory_summary_global_by_event_name;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'memory_summary_global_by_event_name'
+LOCK TABLES performance_schema.memory_summary_global_by_event_name READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'memory_summary_global_by_event_name'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.memory_summary_global_by_event_name WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'memory_summary_global_by_event_name'
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_metadata_locks.result b/mysql-test/suite/perfschema/r/dml_metadata_locks.result
new file mode 100644
index 00000000000..03f62bc95c5
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/dml_metadata_locks.result
@@ -0,0 +1,21 @@
+select * from performance_schema.metadata_locks;
+select * from performance_schema.metadata_locks
+where object_name='foo';
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME OBJECT_INSTANCE_BEGIN LOCK_TYPE LOCK_DURATION LOCK_STATUS SOURCE OWNER_THREAD_ID OWNER_EVENT_ID
+insert into performance_schema.metadata_locks
+set object_name='FOO', owner_thread_id=1;
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'metadata_locks'
+update performance_schema.metadata_locks
+set owner_thread_id=12 where object_name='foo';
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'metadata_locks'
+delete from performance_schema.metadata_locks;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'metadata_locks'
+delete from performance_schema.metadata_locks
+where timer_name='CYCLE';
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'metadata_locks'
+LOCK TABLES performance_schema.metadata_locks READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'metadata_locks'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.metadata_locks WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'metadata_locks'
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_prepared_statements_instances.result b/mysql-test/suite/perfschema/r/dml_prepared_statements_instances.result
new file mode 100644
index 00000000000..dbccb963a61
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/dml_prepared_statements_instances.result
@@ -0,0 +1,26 @@
+select * from performance_schema.prepared_statements_instances
+where owner_object_name like 'XXYYZZ%' limit 1;
+OBJECT_INSTANCE_BEGIN STATEMENT_ID STATEMENT_NAME SQL_TEXT OWNER_THREAD_ID OWNER_EVENT_ID OWNER_OBJECT_TYPE OWNER_OBJECT_SCHEMA OWNER_OBJECT_NAME TIMER_PREPARE COUNT_REPREPARE COUNT_EXECUTE SUM_TIMER_EXECUTE MIN_TIMER_EXECUTE AVG_TIMER_EXECUTE MAX_TIMER_EXECUTE SUM_LOCK_TIME SUM_ERRORS SUM_WARNINGS SUM_ROWS_AFFECTED SUM_ROWS_SENT SUM_ROWS_EXAMINED SUM_CREATED_TMP_DISK_TABLES SUM_CREATED_TMP_TABLES SUM_SELECT_FULL_JOIN SUM_SELECT_FULL_RANGE_JOIN SUM_SELECT_RANGE SUM_SELECT_RANGE_CHECK SUM_SELECT_SCAN SUM_SORT_MERGE_PASSES SUM_SORT_RANGE SUM_SORT_ROWS SUM_SORT_SCAN SUM_NO_INDEX_USED SUM_NO_GOOD_INDEX_USED
+select * from performance_schema.prepared_statements_instances
+where owner_object_name='XXYYZZ';
+OBJECT_INSTANCE_BEGIN STATEMENT_ID STATEMENT_NAME SQL_TEXT OWNER_THREAD_ID OWNER_EVENT_ID OWNER_OBJECT_TYPE OWNER_OBJECT_SCHEMA OWNER_OBJECT_NAME TIMER_PREPARE COUNT_REPREPARE COUNT_EXECUTE SUM_TIMER_EXECUTE MIN_TIMER_EXECUTE AVG_TIMER_EXECUTE MAX_TIMER_EXECUTE SUM_LOCK_TIME SUM_ERRORS SUM_WARNINGS SUM_ROWS_AFFECTED SUM_ROWS_SENT SUM_ROWS_EXAMINED SUM_CREATED_TMP_DISK_TABLES SUM_CREATED_TMP_TABLES SUM_SELECT_FULL_JOIN SUM_SELECT_FULL_RANGE_JOIN SUM_SELECT_RANGE SUM_SELECT_RANGE_CHECK SUM_SELECT_SCAN SUM_SORT_MERGE_PASSES SUM_SORT_RANGE SUM_SORT_ROWS SUM_SORT_SCAN SUM_NO_INDEX_USED SUM_NO_GOOD_INDEX_USED
+insert into performance_schema.prepared_statements_instances
+set owner_object_name='XXYYZZ', count_execute=1, sum_timer_execute=2,
+min_timer_execute=3, avg_timer_execute=4, max_timer_execute=5;
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'prepared_statements_instances'
+update performance_schema.prepared_statements_instances set count_execute=12;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'prepared_statements_instances'
+update performance_schema.prepared_statements_instances
+set count_execute=12 where owner_object_name like "XXYYZZ";
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'prepared_statements_instances'
+delete from performance_schema.prepared_statements_instances
+where count_execute=1;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'prepared_statements_instances'
+delete from performance_schema.prepared_statements_instances;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'prepared_statements_instances'
+LOCK TABLES performance_schema.prepared_statements_instances READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'prepared_statements_instances'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.prepared_statements_instances WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'prepared_statements_instances'
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_replication_applier_configuration.result b/mysql-test/suite/perfschema/r/dml_replication_applier_configuration.result
new file mode 100644
index 00000000000..0e5711b5732
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/dml_replication_applier_configuration.result
@@ -0,0 +1,21 @@
+SELECT * FROM performance_schema.replication_applier_configuration
+LIMIT 1;
+sELECT * FROM performance_schema.replication_applier_configuration
+WHERE desired_delay=12;
+INSERT INTO performance_schema.replication_applier_configuration
+SET desired_delay=2;
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'replication_applier_configuration'
+UPDATE performance_schema.replication_applier_configuration
+SET desired_delay=12 WHERE desired_delay=2;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'replication_applier_configuration'
+DELETE FROM performance_schema.replication_applier_configuration
+WHERE desired_delay=12;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'replication_applier_configuration'
+DELETE FROM performance_schema.replication_applier_configuration;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'replication_applier_configuration'
+LOCK TABLES performance_schema.replication_applier_configuration READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'replication_applier_configuration'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.replication_applier_configuration WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'replication_applier_configuration'
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_replication_applier_status.result b/mysql-test/suite/perfschema/r/dml_replication_applier_status.result
new file mode 100644
index 00000000000..e6464c58e85
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/dml_replication_applier_status.result
@@ -0,0 +1,24 @@
+SELECT * FROM performance_schema.replication_applier_status
+LIMIT 1;
+SELECT * FROM performance_schema.replication_applier_status
+WHERE service_state='YES' OR remaining_delay=12;
+INSERT INTO performance_schema.replication_applier_status
+SET service_state='YES', remaining_delay=12;
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'replication_applier_status'
+UPDATE performance_schema.replication_applier_status
+SET remaining_delay=12;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'replication_applier_status'
+UPDATE performance_schema.replication_applier_status
+SET remaining_delay=12 WHERE service_state='YES';
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'replication_applier_status'
+DELETE FROM performance_schema.replication_applier_status
+WHERE service_state='YES';
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'replication_applier_status'
+DELETE FROM performance_schema.replication_applier_status;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'replication_applier_status'
+LOCK TABLES performance_schema.replication_applier_status READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'replication_applier_status'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.replication_applier_status WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'replication_applier_status'
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_replication_applier_status_by_coordinator.result b/mysql-test/suite/perfschema/r/dml_replication_applier_status_by_coordinator.result
new file mode 100644
index 00000000000..d6818fd1280
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/dml_replication_applier_status_by_coordinator.result
@@ -0,0 +1,25 @@
+SELECT * FROM performance_schema.replication_applier_status_by_coordinator
+LIMIT 1;
+SELECT * FROM performance_schema.replication_applier_status_by_coordinator
+WHERE service_state='YES' or last_error_message='ERROR';
+INSERT INTO performance_schema.replication_applier_status_by_coordinator
+SET service_state='YES', last_error_message='ERROR', thread_id=2,
+last_error_number=1234;
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'replication_applier_status_by_coordinator'
+UPDATE performance_schema.replication_applier_status_by_coordinator
+SET last_error_number=1234;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'replication_applier_status_by_coordinator'
+UPDATE performance_schema.replication_applier_status_by_coordinator
+SET last_error_number=1234 where service_state like "YES";
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'replication_applier_status_by_coordinator'
+DELETE FROM performance_schema.replication_applier_status_by_coordinator
+WHERE thread_id=1;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'replication_applier_status_by_coordinator'
+DELETE FROM performance_schema.replication_applier_status_by_coordinator;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'replication_applier_status_by_coordinator'
+LOCK TABLES performance_schema.replication_applier_status_by_coordinator READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'replication_applier_status_by_coordinator'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.replication_applier_status_by_coordinator WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'replication_applier_status_by_coordinator'
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_replication_applier_status_by_worker.result b/mysql-test/suite/perfschema/r/dml_replication_applier_status_by_worker.result
new file mode 100644
index 00000000000..8033da46a1d
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/dml_replication_applier_status_by_worker.result
@@ -0,0 +1,25 @@
+SELECT * FROM performance_schema.replication_applier_status_by_worker
+LIMIT 1;
+SELECT * FROM performance_schema.replication_applier_status_by_worker
+WHERE service_state='YES' OR last_error_message='ERROR';
+INSERT INTO performance_schema.replication_applier_status_by_worker
+SET service_state='YES', last_error_message='ERROR',
+worker_id=1, thread_id=2, last_error_number=1234;
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'replication_applier_status_by_worker'
+UPDATE performance_schema.replication_applier_status_by_worker
+SET worker_id=12;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'replication_applier_status_by_worker'
+UPDATE performance_schema.replication_applier_status_by_worker
+SET worker_d=12 where service_state like "YES";
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'replication_applier_status_by_worker'
+DELETE FROM performance_schema.replication_applier_status_by_worker
+WHERE worker_id=1;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'replication_applier_status_by_worker'
+DELETE FROM performance_schema.replication_applier_status_by_worker;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'replication_applier_status_by_worker'
+LOCK TABLES performance_schema.replication_applier_status_by_worker READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'replication_applier_status_by_worker'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.replication_applier_status_by_worker WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'replication_applier_status_by_worker'
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_replication_connection_configuration.result b/mysql-test/suite/perfschema/r/dml_replication_connection_configuration.result
new file mode 100644
index 00000000000..d338d4ab38a
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/dml_replication_connection_configuration.result
@@ -0,0 +1,25 @@
+SELECT * FROM performance_schema.replication_connection_configuration
+LIMIT 1;
+SELECT * FROM performance_schema.replication_connection_configuration
+WHERE user='FOO' or host='BAR';
+INSERT INTO performance_schema.replication_connection_configuration
+SET user='FOO', host='BAR',
+port=1, connection_retry_count=2;
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'replication_connection_configuration'
+UPDATE performance_schema.replication_connection_configuration
+SET connection_retry_interval=12;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'replication_connection_configuration'
+UPDATE performance_schema.replication_connection_configuration
+SET connection_retry_interval=12 WHERE host LIKE "FOO";
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'replication_connection_configuration'
+DELETE FROM performance_schema.replication_connection_configuration
+WHERE connection_retry_count=1;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'replication_connection_configuration'
+DELETE FROM performance_schema.replication_connection_configuration;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'replication_connection_configuration'
+LOCK TABLES performance_schema.replication_connection_configuration READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'replication_connection_configuration'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.replication_connection_configuration WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'replication_connection_configuration'
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_replication_connection_status.result b/mysql-test/suite/perfschema/r/dml_replication_connection_status.result
new file mode 100644
index 00000000000..981a064f534
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/dml_replication_connection_status.result
@@ -0,0 +1,25 @@
+SELECT * FROM performance_schema.replication_connection_status
+LIMIT 1;
+SELECT * FROM performance_schema.replication_connection_status
+WHERE received_transaction_set='FOO' OR last_error_message='BAR';
+INSERT INTO performance_schema.replication_connection_status
+SET received_transaction_set='FOO', last_error_message='BAR',
+thread_id=1, last_error_number=2;
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'replication_connection_status'
+UPDATE performance_schema.replication_connection_status
+SET last_error_number=12;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'replication_connection_status'
+UPDATE performance_schema.replication_connection_status
+SET thread_id=12 WHERE received_transaction_set like "FOO";
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'replication_connection_status'
+DELETE FROM performance_schema.replication_connection_status
+WHERE last_error_number=1;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'replication_connection_status'
+DELETE FROM performance_schema.replication_connection_status;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'replication_connection_status'
+LOCK TABLES performance_schema.replication_connection_status READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'replication_connection_status'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.replication_connection_status WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'replication_connection_status'
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_replication_group_member_stats.result b/mysql-test/suite/perfschema/r/dml_replication_group_member_stats.result
new file mode 100644
index 00000000000..f2d67f16734
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/dml_replication_group_member_stats.result
@@ -0,0 +1,26 @@
+SELECT * FROM performance_schema.replication_group_member_stats
+LIMIT 1;
+CHANNEL_NAME VIEW_ID MEMBER_ID COUNT_TRANSACTIONS_IN_QUEUE COUNT_TRANSACTIONS_CHECKED COUNT_CONFLICTS_DETECTED COUNT_TRANSACTIONS_ROWS_VALIDATING TRANSACTIONS_COMMITTED_ALL_MEMBERS LAST_CONFLICT_FREE_TRANSACTION
+SELECT * FROM performance_schema.replication_group_member_stats
+WHERE channel_name='FOO';
+CHANNEL_NAME VIEW_ID MEMBER_ID COUNT_TRANSACTIONS_IN_QUEUE COUNT_TRANSACTIONS_CHECKED COUNT_CONFLICTS_DETECTED COUNT_TRANSACTIONS_ROWS_VALIDATING TRANSACTIONS_COMMITTED_ALL_MEMBERS LAST_CONFLICT_FREE_TRANSACTION
+INSERT INTO performance_schema.replication_group_member_stats
+SET channel_name='FOO', node_id=1;
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'replication_group_member_stats'
+UPDATE performance_schema.replication_group_member_stats
+SET member_id=12;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'replication_group_member_stats'
+UPDATE performance_schema.replication_group_member_stats
+SET member_id=12 WHERE group_name LIKE "FOO";
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'replication_group_member_stats'
+DELETE FROM performance_schema.replication_group_member_stats
+WHERE member_id=1;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'replication_group_member_stats'
+DELETE FROM performance_schema.replication_group_member_stats;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'replication_group_member_stats'
+LOCK TABLES performance_schema.replication_group_member_stats READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'replication_group_member_stats'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.replication_group_member_stats WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'replication_group_member_stats'
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_replication_group_members.result b/mysql-test/suite/perfschema/r/dml_replication_group_members.result
new file mode 100644
index 00000000000..cdc211b9978
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/dml_replication_group_members.result
@@ -0,0 +1,24 @@
+SELECT * FROM performance_schema.replication_group_members
+LIMIT 1;
+SELECT * FROM performance_schema.replication_group_members
+WHERE channel_name='FOO';
+INSERT INTO performance_schema.replication_group_members
+SET channel_name='FOO', member_id=1;
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'replication_group_members'
+UPDATE performance_schema.replication_group_members
+SET member_id=12;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'replication_group_members'
+UPDATE performance_schema.replication_group_members
+SET member_id=12 WHERE channel_name LIKE "FOO";
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'replication_group_members'
+DELETE FROM performance_schema.replication_group_members
+WHERE member_id=1;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'replication_group_members'
+DELETE FROM performance_schema.replication_group_members;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'replication_group_members'
+LOCK TABLES performance_schema.replication_group_members READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'replication_group_members'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.replication_group_members WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'replication_group_members'
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_session_status.result b/mysql-test/suite/perfschema/r/dml_session_status.result
new file mode 100644
index 00000000000..979d97daa83
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/dml_session_status.result
@@ -0,0 +1,21 @@
+select * from performance_schema.session_status
+where variable_name like 'bytes_%' limit 1;
+select * from performance_schema.session_status
+where variable_name='FOO';
+insert into performance_schema.session_status
+set variable_name='FOO', variable_value='BAR';
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'session_status'
+update performance_schema.session_status
+set variable_name='FOO', variable_value='BAR';
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'session_status'
+delete from performance_schema.session_status
+where variable_name <> 'FOO';
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'session_status'
+delete from performance_schema.session_status;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'session_status'
+LOCK TABLES performance_schema.session_status READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'session_status'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.session_status WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'session_status'
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_session_variables.result b/mysql-test/suite/perfschema/r/dml_session_variables.result
new file mode 100644
index 00000000000..c8933a383ce
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/dml_session_variables.result
@@ -0,0 +1,21 @@
+select * from performance_schema.session_variables
+where variable_name like 'bytes_%' limit 1;
+select * from performance_schema.session_variables
+where variable_name='FOO';
+insert into performance_schema.session_variables
+set variable_name='FOO', variable_value='BAR';
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'session_variables'
+update performance_schema.session_variables
+set variable_name='FOO', variable_value='BAR';
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'session_variables'
+delete from performance_schema.session_variables
+where variable_name <> 'FOO';
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'session_variables'
+delete from performance_schema.session_variables;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'session_variables'
+LOCK TABLES performance_schema.session_variables READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'session_variables'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.session_variables WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'session_variables'
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_setup_actors.result b/mysql-test/suite/perfschema/r/dml_setup_actors.result
index e487bb1995b..36030d383bd 100644
--- a/mysql-test/suite/perfschema/r/dml_setup_actors.result
+++ b/mysql-test/suite/perfschema/r/dml_setup_actors.result
@@ -1,12 +1,18 @@
drop table if exists test.setup_actors;
create table test.setup_actors as
select * from performance_schema.setup_actors;
+insert into performance_schema.setup_actors
+values ('%','%','%','YES', 'YES');
+ERROR 23000: Can't write; duplicate key in table 'setup_actors'
+insert into performance_schema.setup_actors
+values ('%','%','%','NO', 'NO');
+ERROR 23000: Can't write; duplicate key in table 'setup_actors'
truncate table performance_schema.setup_actors;
select * from performance_schema.setup_actors;
-HOST USER ROLE
+HOST USER ROLE ENABLED HISTORY
select * from performance_schema.setup_actors
where user = '%';
-HOST USER ROLE
+HOST USER ROLE ENABLED HISTORY
insert into performance_schema.setup_actors
set user='Joe', host='localhost';
insert into performance_schema.setup_actors
@@ -15,13 +21,19 @@ insert into performance_schema.setup_actors
set user='%', host='server1';
insert into performance_schema.setup_actors
set user='%', host='%';
+insert into performance_schema.setup_actors
+values ('localhost', 'user1', '%', 'NO%', 'NO');
+ERROR 01000: Data truncated for column 'ENABLED' at row 1
+insert into performance_schema.setup_actors
+values ('localhost', 'user1', '%', 'NO', 'KO');
+ERROR 01000: Data truncated for column 'HISTORY' at row 1
select * from performance_schema.setup_actors
order by USER, HOST;
-HOST USER ROLE
-% % %
-server1 % %
-% Joe %
-localhost Joe %
+HOST USER ROLE ENABLED HISTORY
+% % % YES YES
+server1 % % YES YES
+% Joe % YES YES
+localhost Joe % YES YES
update performance_schema.setup_actors
set user='ILLEGAL';
ERROR HY000: Invalid performance_schema usage
@@ -31,29 +43,61 @@ ERROR HY000: Invalid performance_schema usage
update performance_schema.setup_actors
set role='ILLEGAL';
ERROR HY000: Invalid performance_schema usage
+update performance_schema.setup_actors
+set ENABLED='YES';
+update performance_schema.setup_actors
+set HISTORY='YES';
+update performance_schema.setup_actors
+set ENABLED='';
+ERROR 01000: Data truncated for column 'ENABLED' at row 1
+update performance_schema.setup_actors
+set ENABLED='YESS';
+ERROR 01000: Data truncated for column 'ENABLED' at row 1
+update performance_schema.setup_actors
+set ENABLED='NO%';
+ERROR 01000: Data truncated for column 'ENABLED' at row 1
+update performance_schema.setup_actors
+set ENABLED=NULL;
+ERROR 23000: Column 'ENABLED' cannot be null
+update performance_schema.setup_actors
+set HISTORY='YESS';
+ERROR 01000: Data truncated for column 'HISTORY' at row 1
+update performance_schema.setup_actors
+set HISTORY='NO%';
+ERROR 01000: Data truncated for column 'HISTORY' at row 1
+update performance_schema.setup_actors
+set HISTORY=NULL;
+ERROR 23000: Column 'HISTORY' cannot be null
select * from performance_schema.setup_actors
order by USER, HOST;
-HOST USER ROLE
-% % %
-server1 % %
-% Joe %
-localhost Joe %
+HOST USER ROLE ENABLED HISTORY
+% % % YES YES
+server1 % % YES YES
+% Joe % YES YES
+localhost Joe % YES YES
delete from performance_schema.setup_actors
where user = 'Joe' and host = 'localhost';
select * from performance_schema.setup_actors
order by USER, HOST;
-HOST USER ROLE
-% % %
-server1 % %
-% Joe %
+HOST USER ROLE ENABLED HISTORY
+% % % YES YES
+server1 % % YES YES
+% Joe % YES YES
delete from performance_schema.setup_actors;
select * from performance_schema.setup_actors
order by USER, HOST;
-HOST USER ROLE
+HOST USER ROLE ENABLED HISTORY
LOCK TABLES performance_schema.setup_actors READ;
UNLOCK TABLES;
LOCK TABLES performance_schema.setup_actors WRITE;
UNLOCK TABLES;
+#
+# WL#2284: Increase the length of a user name
+#
+insert into performance_schema.setup_actors
+set user='user_name_len_22_01234', host='localhost';
+delete from performance_schema.setup_actors
+where user = 'user_name_len_22_01234' and host = 'localhost';
truncate table performance_schema.setup_actors;
insert into performance_schema.setup_actors
select * from test.setup_actors;
@@ -68,3 +112,5 @@ column_name column_comment
HOST Host name, either a literal, or the % wildcard representing any host.
USER User name, either a literal or the % wildcard representing any name.
ROLE Unused
+ENABLED
+HISTORY
diff --git a/mysql-test/suite/perfschema/r/dml_setup_consumers.result b/mysql-test/suite/perfschema/r/dml_setup_consumers.result
index c8d4515583e..d5db0fb7a88 100644
--- a/mysql-test/suite/perfschema/r/dml_setup_consumers.result
+++ b/mysql-test/suite/perfschema/r/dml_setup_consumers.result
@@ -6,6 +6,9 @@ events_stages_history_long YES
events_statements_current YES
events_statements_history YES
events_statements_history_long YES
+events_transactions_current YES
+events_transactions_history YES
+events_transactions_history_long YES
events_waits_current YES
events_waits_history YES
events_waits_history_long YES
@@ -25,6 +28,9 @@ events_stages_history_long YES
events_statements_current YES
events_statements_history YES
events_statements_history_long YES
+events_transactions_current YES
+events_transactions_history YES
+events_transactions_history_long YES
events_waits_current YES
events_waits_history YES
events_waits_history_long YES
diff --git a/mysql-test/suite/perfschema/r/dml_setup_instruments.result b/mysql-test/suite/perfschema/r/dml_setup_instruments.result
index 3be1da544e4..c07e66a9fa6 100644
--- a/mysql-test/suite/perfschema/r/dml_setup_instruments.result
+++ b/mysql-test/suite/perfschema/r/dml_setup_instruments.result
@@ -34,8 +34,11 @@ wait/synch/rwlock/sql/MDL_context::LOCK_waiting_for YES YES
select * from performance_schema.setup_instruments
where name like 'Wait/Synch/Cond/sql/%'
and name not in (
+'wait/synch/cond/sql/COND_open',
'wait/synch/cond/sql/COND_handler_count',
-'wait/synch/cond/sql/DEBUG_SYNC::cond')
+'wait/synch/cond/sql/DEBUG_SYNC::cond',
+'wait/synch/cond/sql/COND_socket_listener_active',
+'wait/synch/cond/sql/COND_start_signal_handler')
order by name limit 10;
NAME ENABLED TIMED
wait/synch/cond/sql/Ack_receiver::cond YES YES
@@ -74,12 +77,14 @@ LOCK TABLES performance_schema.setup_instruments READ;
UNLOCK TABLES;
LOCK TABLES performance_schema.setup_instruments WRITE;
UNLOCK TABLES;
-
+#
# Bug#13813193 ASSERTION `TABLE->READ_SET ==
# &TABLE->DEF_READ_SET' FAILED / MYSQL_UPDATE
-
+#
UPDATE performance_schema.setup_instruments SET timed='NO'
ORDER BY RAND();
+update performance_schema.setup_instruments
+set enabled='YES', TIMED='YES';
#
# MDEV-25325 column_comment for performance_schema tables
#
diff --git a/mysql-test/suite/perfschema/r/dml_setup_objects.result b/mysql-test/suite/perfschema/r/dml_setup_objects.result
index 92c8cab01c7..5e6110f8683 100644
--- a/mysql-test/suite/perfschema/r/dml_setup_objects.result
+++ b/mysql-test/suite/perfschema/r/dml_setup_objects.result
@@ -1,4 +1,5 @@
drop table if exists test.setup_objects;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table test.setup_objects as
select * from performance_schema.setup_objects;
truncate table performance_schema.setup_objects;
@@ -68,6 +69,7 @@ truncate table performance_schema.setup_objects;
insert into performance_schema.setup_objects
select * from test.setup_objects;
drop table test.setup_objects;
+SET sql_mode = default;
#
# MDEV-25325 column_comment for performance_schema tables
#
@@ -75,7 +77,7 @@ select column_name, column_comment
from information_schema.columns
where table_schema='performance_schema' and table_name='setup_objects';
column_name column_comment
-OBJECT_TYPE Type of object to instrument. Currently, only TABLE, for base table.
+OBJECT_TYPE Type of object to instrument.
OBJECT_SCHEMA Schema containing the object, either the literal or % for any schema.
OBJECT_NAME Name of the instrumented object, either the literal or % for any object.
ENABLED Whether the object's events are instrumented or not. Can be disabled, in which case monitoring is not enabled for those objects.
diff --git a/mysql-test/suite/perfschema/r/dml_setup_timers.result b/mysql-test/suite/perfschema/r/dml_setup_timers.result
index 9dcc7f8e1c6..9783425a642 100644
--- a/mysql-test/suite/perfschema/r/dml_setup_timers.result
+++ b/mysql-test/suite/perfschema/r/dml_setup_timers.result
@@ -1,25 +1,44 @@
update performance_schema.setup_timers
set timer_name='CYCLE' where name="wait";
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release
update performance_schema.setup_timers
set timer_name='NANOSECOND' where name="stage";
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release
update performance_schema.setup_timers
set timer_name='NANOSECOND' where name="statement";
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release
+update performance_schema.setup_timers
+set timer_name='MICROSECOND' where name="transaction";
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release
update performance_schema.setup_timers
set timer_name='MICROSECOND' where name="idle";
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release
select * from performance_schema.setup_timers;
NAME TIMER_NAME
idle MICROSECOND
wait CYCLE
stage NANOSECOND
statement NANOSECOND
+transaction MICROSECOND
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release
select * from performance_schema.setup_timers
where name='Wait';
NAME TIMER_NAME
wait CYCLE
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release
select * from performance_schema.setup_timers
where timer_name='CYCLE';
NAME TIMER_NAME
wait CYCLE
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release
insert into performance_schema.setup_timers
set name='FOO', timer_name='CYCLE';
ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'setup_timers'
@@ -28,14 +47,21 @@ set name='FOO';
ERROR HY000: Invalid performance_schema usage
update performance_schema.setup_timers
set timer_name='MILLISECOND';
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release
select * from performance_schema.setup_timers;
NAME TIMER_NAME
idle MILLISECOND
wait MILLISECOND
stage MILLISECOND
statement MILLISECOND
+transaction MILLISECOND
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release
update performance_schema.setup_timers
set timer_name='CYCLE';
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release
delete from performance_schema.setup_timers;
ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'setup_timers'
delete from performance_schema.setup_timers
@@ -47,18 +73,33 @@ LOCK TABLES performance_schema.setup_timers WRITE;
UNLOCK TABLES;
update performance_schema.setup_timers
set timer_name='CYCLE' where name="wait";
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release
update performance_schema.setup_timers
set timer_name='NANOSECOND' where name="stage";
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release
update performance_schema.setup_timers
set timer_name='NANOSECOND' where name="statement";
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release
+update performance_schema.setup_timers
+set timer_name='MICROSECOND' where name="transaction";
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release
update performance_schema.setup_timers
set timer_name='MICROSECOND' where name="idle";
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release
select * from performance_schema.setup_timers;
NAME TIMER_NAME
idle MICROSECOND
wait CYCLE
stage NANOSECOND
statement NANOSECOND
+transaction MICROSECOND
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release
#
# MDEV-25325 column_comment for performance_schema tables
#
diff --git a/mysql-test/suite/perfschema/r/dml_status_by_account.result b/mysql-test/suite/perfschema/r/dml_status_by_account.result
new file mode 100644
index 00000000000..1b45920c70b
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/dml_status_by_account.result
@@ -0,0 +1,24 @@
+select * from performance_schema.status_by_account
+where variable_name like 'bytes_%' limit 1;
+select * from performance_schema.status_by_account
+where variable_name='FOO';
+insert into performance_schema.status_by_account
+set user='USER', host='HOST', variable_name='FOO', variable_value='BAR';
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'status_by_account'
+update performance_schema.status_by_account
+set variable_name='FOO', variable_value='BAR';
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'status_by_account'
+update performance_schema.status_by_account
+set variable_name='FOO' where user <> 'USER';
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'status_by_account'
+delete from performance_schema.status_by_account
+where user <> 'USER';
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'status_by_account'
+delete from performance_schema.status_by_account;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'status_by_account'
+LOCK TABLES performance_schema.status_by_account READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'status_by_account'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.status_by_account WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'status_by_account'
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_status_by_host.result b/mysql-test/suite/perfschema/r/dml_status_by_host.result
new file mode 100644
index 00000000000..cfe74eaabbf
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/dml_status_by_host.result
@@ -0,0 +1,24 @@
+select * from performance_schema.status_by_host
+where variable_name like 'bytes_%' limit 1;
+select * from performance_schema.status_by_host
+where variable_name='FOO';
+insert into performance_schema.status_by_host
+set host='HOST', variable_name='FOO', variable_value='BAR';
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'status_by_host'
+update performance_schema.status_by_host
+set variable_name='FOO', variable_value='BAR';
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'status_by_host'
+update performance_schema.status_by_host
+set variable_name='FOO' where host <> 'HOST';
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'status_by_host'
+delete from performance_schema.status_by_host
+where host <> 'HOST';
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'status_by_host'
+delete from performance_schema.status_by_host;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'status_by_host'
+LOCK TABLES performance_schema.status_by_host READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'status_by_host'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.status_by_host WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'status_by_host'
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_status_by_thread.result b/mysql-test/suite/perfschema/r/dml_status_by_thread.result
new file mode 100644
index 00000000000..afe2cf407ed
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/dml_status_by_thread.result
@@ -0,0 +1,24 @@
+select * from performance_schema.status_by_thread
+where variable_name like 'bytes_%' limit 1;
+select * from performance_schema.status_by_thread
+where variable_name='FOO';
+insert into performance_schema.status_by_thread
+set thread_id=1, variable_name='FOO', variable_value='BAR';
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'status_by_thread'
+update performance_schema.status_by_thread
+set variable_name='FOO', variable_value='BAR';
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'status_by_thread'
+update performance_schema.status_by_thread
+set variable_name='FOO' where thread_id=0;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'status_by_thread'
+delete from performance_schema.status_by_thread
+where thread_id=1;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'status_by_thread'
+delete from performance_schema.status_by_thread;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'status_by_thread'
+LOCK TABLES performance_schema.status_by_thread READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'status_by_thread'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.status_by_thread WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'status_by_thread'
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_status_by_user.result b/mysql-test/suite/perfschema/r/dml_status_by_user.result
new file mode 100644
index 00000000000..430bb622d3b
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/dml_status_by_user.result
@@ -0,0 +1,24 @@
+select * from performance_schema.status_by_user
+where variable_name like 'bytes_%' limit 1;
+select * from performance_schema.status_by_user
+where variable_name='FOO';
+insert into performance_schema.status_by_user
+set user='USER', variable_name='FOO', variable_value='BAR';
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'status_by_user'
+update performance_schema.status_by_user
+set variable_name='FOO', variable_value='BAR';
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'status_by_user'
+update performance_schema.status_by_user
+set variable_name='FOO' where user <> 'USER';
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'status_by_user'
+delete from performance_schema.status_by_user
+where user <> 'USER';
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'status_by_user'
+delete from performance_schema.status_by_user;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'status_by_user'
+LOCK TABLES performance_schema.status_by_user READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'status_by_user'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.status_by_user WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'status_by_user'
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_table_handles.result b/mysql-test/suite/perfschema/r/dml_table_handles.result
new file mode 100644
index 00000000000..5f6f0a43ad8
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/dml_table_handles.result
@@ -0,0 +1,21 @@
+select * from performance_schema.table_handles;
+select * from performance_schema.table_handles
+where object_name='foo';
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME OBJECT_INSTANCE_BEGIN OWNER_THREAD_ID OWNER_EVENT_ID INTERNAL_LOCK EXTERNAL_LOCK
+insert into performance_schema.table_handles
+set object_name='FOO', owner_event_id=1;
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'table_handles'
+update performance_schema.table_handles
+set owner_event_id=12 where object_name='foo';
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'table_handles'
+delete from performance_schema.table_handles;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'table_handles'
+delete from performance_schema.table_handles
+where timer_name='CYCLE';
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'table_handles'
+LOCK TABLES performance_schema.table_handles READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'table_handles'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.table_handles WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'table_handles'
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_threads.result b/mysql-test/suite/perfschema/r/dml_threads.result
index a5fcc80f944..c8169a49607 100644
--- a/mysql-test/suite/perfschema/r/dml_threads.result
+++ b/mysql-test/suite/perfschema/r/dml_threads.result
@@ -53,3 +53,6 @@ PROCESSLIST_INFO Statement being executed by the thread, or NULL if a statement
PARENT_THREAD_ID THREAD_ID of the parent thread, if any. Subthreads can for example be spawned as a result of INSERT DELAYED statements.
ROLE Unused.
INSTRUMENTED YES or NO for Whether the thread is instrumented or not. For foreground threads, the initial value is determined by whether there's a user/host match in the setup_actors table. Subthreads are again matched, while for background threads, this will be set to YES by default. To monitor events that the thread executes, INSTRUMENTED must be YES and the thread_instrumentation consumer in the setup_consumers table must also be YES.
+HISTORY
+CONNECTION_TYPE
+THREAD_OS_ID
diff --git a/mysql-test/suite/perfschema/r/dml_uvar_by_thread.result b/mysql-test/suite/perfschema/r/dml_uvar_by_thread.result
new file mode 100644
index 00000000000..ae6dc4ec3d9
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/dml_uvar_by_thread.result
@@ -0,0 +1,30 @@
+select * from performance_schema.user_variables_by_thread
+where variable_name like 'foo%' limit 1;
+select * from performance_schema.user_variables_by_thread
+where variable_name='FOO';
+insert into performance_schema.user_variables_by_thread
+set thread_id=12, variable_name='foo', variable_value='bar';
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'user_variables_by_thread'
+update performance_schema.user_variables_by_thread
+set thread_id=12;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'user_variables_by_thread'
+update performance_schema.user_variables_by_thread
+set thread_id=12 where variable_name like "FOO";
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'user_variables_by_thread'
+delete from performance_schema.user_variables_by_thread
+where thread_id=1;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'user_variables_by_thread'
+delete from performance_schema.user_variables_by_thread;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'user_variables_by_thread'
+LOCK TABLES performance_schema.user_variables_by_thread READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'user_variables_by_thread'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.user_variables_by_thread WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'user_variables_by_thread'
+UNLOCK TABLES;
+CREATE TRIGGER test_uvar_trigger
+AFTER INSERT ON performance_schema.user_variables_by_thread
+FOR EACH ROW BEGIN
+set @a='OK';
+END|
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
diff --git a/mysql-test/suite/perfschema/r/dml_variables_by_thread.result b/mysql-test/suite/perfschema/r/dml_variables_by_thread.result
new file mode 100644
index 00000000000..b98907b3ba8
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/dml_variables_by_thread.result
@@ -0,0 +1,24 @@
+select * from performance_schema.variables_by_thread
+where variable_name like 'autocommit%' limit 1;
+select * from performance_schema.variables_by_thread
+where variable_name='FOO';
+insert into performance_schema.variables_by_thread
+set thread_id=1, variable_name='FOO', variable_value='BAR';
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'variables_by_thread'
+update performance_schema.variables_by_thread
+set variable_name='FOO', variable_value='BAR';
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'variables_by_thread'
+update performance_schema.variables_by_thread
+set variable_name='FOO' where thread_id=0;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'variables_by_thread'
+delete from performance_schema.variables_by_thread
+where thread_id=1;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'variables_by_thread'
+delete from performance_schema.variables_by_thread;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'variables_by_thread'
+LOCK TABLES performance_schema.variables_by_thread READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'variables_by_thread'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.variables_by_thread WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'variables_by_thread'
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/event_aggregate.result b/mysql-test/suite/perfschema/r/event_aggregate.result
index 7fa08534bb1..4ad4c773941 100644
--- a/mysql-test/suite/perfschema/r/event_aggregate.result
+++ b/mysql-test/suite/perfschema/r/event_aggregate.result
@@ -15,14 +15,10 @@ user event_name count_star
execute dump_waits_host;
host event_name count_star
localhost wait/io/file/sql/query_log 0
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
@@ -32,18 +28,18 @@ execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 0
-localhost stage/sql/Closing tables 0
-localhost stage/sql/Init 0
-localhost stage/sql/Init for update 0
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
localhost stage/sql/Opening tables 0
+localhost stage/sql/starting 0
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
execute dump_statements_account;
@@ -54,16 +50,30 @@ execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 0
+localhost statement/sp/freturn 0
localhost statement/sql/insert 0
localhost statement/sql/select 0
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 0
statement/sql/insert 0
statement/sql/select 0
execute dump_statements_history;
event_name count(event_name)
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 0
+execute dump_transactions_global;
+event_name count_star
+transaction 0
+execute dump_transactions_history;
+event_name count(event_name)
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -79,8 +89,6 @@ connection default;
call dump_thread();
username event_name count_star
user1 wait/io/file/sql/query_log 1
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
user1 wait/synch/rwlock/sql/LOCK_grant 0
username status
user2 not found
@@ -91,86 +99,96 @@ user4 not found
execute dump_waits_account;
user host event_name count_star
user1 localhost wait/io/file/sql/query_log 1
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_user;
user event_name count_star
user1 wait/io/file/sql/query_log 1
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
user1 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_host;
host event_name count_star
localhost wait/io/file/sql/query_log 1
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 1
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
wait/io/file/sql/query_log 1
execute dump_stages_account;
user host event_name count_star
-user1 localhost stage/sql/Checking permissions 0
-user1 localhost stage/sql/Closing tables 0
-user1 localhost stage/sql/Init 0
-user1 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
user1 localhost stage/sql/Opening tables 0
+user1 localhost stage/sql/starting 0
execute dump_stages_user;
user event_name count_star
-user1 stage/sql/Checking permissions 0
-user1 stage/sql/Closing tables 0
-user1 stage/sql/Init 0
-user1 stage/sql/Init for update 0
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
user1 stage/sql/Opening tables 0
+user1 stage/sql/starting 0
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 0
-localhost stage/sql/Closing tables 0
-localhost stage/sql/Init 0
-localhost stage/sql/Init for update 0
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
localhost stage/sql/Opening tables 0
+localhost stage/sql/starting 0
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 0
+user1 localhost statement/sp/freturn 0
user1 localhost statement/sql/insert 0
user1 localhost statement/sql/select 0
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 0
+user1 statement/sp/freturn 0
user1 statement/sql/insert 0
user1 statement/sql/select 0
execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 0
+localhost statement/sp/freturn 0
localhost statement/sql/insert 0
localhost statement/sql/select 0
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 0
statement/sql/insert 0
statement/sql/select 0
execute dump_statements_history;
event_name count(event_name)
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 0
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 0
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 0
+execute dump_transactions_global;
+event_name count_star
+transaction 0
+execute dump_transactions_history;
+event_name count(event_name)
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -183,20 +201,23 @@ execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 2 2
connection con1;
-select get_lock("marker", 10);
-get_lock("marker", 10)
+select uuid_short() <> 1;
+uuid_short() <> 1
1
-select release_lock("marker");
-release_lock("marker")
+select uuid_short() <> 1;
+uuid_short() <> 1
1
+start transaction;
insert into test.t1 values ("marker");
+commit;
+select test.f(10,20);
+test.f(10,20)
+30
connection default;
"================== Step 3 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
username status
user2 not found
@@ -206,95 +227,107 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/file/sql/query_log 4
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user1 localhost wait/io/file/sql/query_log 7
user1 localhost wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_user;
user event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_host;
host event_name count_star
-localhost wait/io/file/sql/query_log 4
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/io/file/sql/query_log 7
localhost wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 4
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 7
wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 4
+wait/io/file/sql/query_log 7
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 6
-user1 localhost stage/sql/Init 5
-user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 4
+user1 localhost stage/sql/checking permissions 4
+user1 localhost stage/sql/closing tables 11
+user1 localhost stage/sql/init 3
+user1 localhost stage/sql/Opening tables 7
+user1 localhost stage/sql/starting 6
execute dump_stages_user;
user event_name count_star
-user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 6
-user1 stage/sql/Init 5
-user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 4
+user1 stage/sql/checking permissions 4
+user1 stage/sql/closing tables 11
+user1 stage/sql/init 3
+user1 stage/sql/Opening tables 7
+user1 stage/sql/starting 6
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 3
-localhost stage/sql/Closing tables 6
-localhost stage/sql/Init 5
-localhost stage/sql/Init for update 1
-localhost stage/sql/Opening tables 4
+localhost stage/sql/checking permissions 4
+localhost stage/sql/closing tables 11
+localhost stage/sql/init 3
+localhost stage/sql/Opening tables 7
+localhost stage/sql/starting 6
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 3
-stage/sql/Closing tables 6
-stage/sql/Init 5
-stage/sql/Init for update 1
-stage/sql/Opening tables 4
+stage/sql/checking permissions 4
+stage/sql/closing tables 11
+stage/sql/init 3
+stage/sql/Opening tables 7
+stage/sql/starting 6
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 3
-stage/sql/Closing tables 6
-stage/sql/Init 5
-stage/sql/Init for update 1
-stage/sql/Opening tables 4
+stage/sql/checking permissions 4
+stage/sql/closing tables 11
+stage/sql/init 3
+stage/sql/Opening tables 7
+stage/sql/starting 6
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 0
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 0
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 0
+localhost statement/sp/freturn 1
localhost statement/sql/insert 1
-localhost statement/sql/select 2
+localhost statement/sql/select 3
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 1
statement/sql/insert 1
-statement/sql/select 2
+statement/sql/select 3
execute dump_statements_history;
event_name count(event_name)
+statement/sp/freturn 1
statement/sql/insert 1
-statement/sql/select 2
+statement/sql/select 3
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 2
+execute dump_transactions_global;
+event_name count_star
+transaction 2
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 2
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -311,14 +344,10 @@ connection default;
"================== Step 4 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
user2 wait/io/file/sql/query_log 1
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
user2 wait/synch/rwlock/sql/LOCK_grant 0
username status
user3 not found
@@ -326,121 +355,133 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/file/sql/query_log 4
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user1 localhost wait/io/file/sql/query_log 7
user1 localhost wait/synch/rwlock/sql/LOCK_grant 1
user2 localhost wait/io/file/sql/query_log 1
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
user2 wait/io/file/sql/query_log 1
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
user2 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/file/sql/query_log 5
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/io/file/sql/query_log 8
localhost wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 5
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 8
wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 5
+wait/io/file/sql/query_log 8
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 6
-user1 localhost stage/sql/Init 5
-user1 localhost stage/sql/Init for update 1
-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
-user2 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/checking permissions 4
+user1 localhost stage/sql/closing tables 11
+user1 localhost stage/sql/init 3
+user1 localhost stage/sql/Opening tables 7
+user1 localhost stage/sql/starting 6
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
user2 localhost stage/sql/Opening tables 0
+user2 localhost stage/sql/starting 0
execute dump_stages_user;
user event_name count_star
-user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 6
-user1 stage/sql/Init 5
-user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 4
-user2 stage/sql/Checking permissions 0
-user2 stage/sql/Closing tables 0
-user2 stage/sql/Init 0
-user2 stage/sql/Init for update 0
+user1 stage/sql/checking permissions 4
+user1 stage/sql/closing tables 11
+user1 stage/sql/init 3
+user1 stage/sql/Opening tables 7
+user1 stage/sql/starting 6
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
user2 stage/sql/Opening tables 0
+user2 stage/sql/starting 0
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 3
-localhost stage/sql/Closing tables 6
-localhost stage/sql/Init 5
-localhost stage/sql/Init for update 1
-localhost stage/sql/Opening tables 4
+localhost stage/sql/checking permissions 4
+localhost stage/sql/closing tables 11
+localhost stage/sql/init 3
+localhost stage/sql/Opening tables 7
+localhost stage/sql/starting 6
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 3
-stage/sql/Closing tables 6
-stage/sql/Init 5
-stage/sql/Init for update 1
-stage/sql/Opening tables 4
+stage/sql/checking permissions 4
+stage/sql/closing tables 11
+stage/sql/init 3
+stage/sql/Opening tables 7
+stage/sql/starting 6
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 3
-stage/sql/Closing tables 6
-stage/sql/Init 5
-stage/sql/Init for update 1
-stage/sql/Opening tables 4
+stage/sql/checking permissions 4
+stage/sql/closing tables 11
+stage/sql/init 3
+stage/sql/Opening tables 7
+stage/sql/starting 6
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 0
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 0
+user2 localhost statement/sp/freturn 0
user2 localhost statement/sql/insert 0
user2 localhost statement/sql/select 0
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 0
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 0
+user2 statement/sp/freturn 0
user2 statement/sql/insert 0
user2 statement/sql/select 0
execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 0
+localhost statement/sp/freturn 1
localhost statement/sql/insert 1
-localhost statement/sql/select 2
+localhost statement/sql/select 3
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 1
statement/sql/insert 1
-statement/sql/select 2
+statement/sql/select 3
execute dump_statements_history;
event_name count(event_name)
+statement/sp/freturn 1
statement/sql/insert 1
-statement/sql/select 2
+statement/sql/select 3
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 0
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 0
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 2
+execute dump_transactions_global;
+event_name count_star
+transaction 2
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 2
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -455,25 +496,26 @@ execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 3 3
connection con2;
-select get_lock("marker", 10);
-get_lock("marker", 10)
+select uuid_short() <> 1;
+uuid_short() <> 1
1
-select release_lock("marker");
-release_lock("marker")
+select uuid_short() <> 1;
+uuid_short() <> 1
1
+start transaction;
insert into test.t1 values ("marker");
+commit;
+select test.f(10,20);
+test.f(10,20)
+30
connection default;
"================== Step 5 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user2 wait/io/file/sql/query_log 4
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 7
user2 wait/synch/rwlock/sql/LOCK_grant 1
username status
user3 not found
@@ -481,121 +523,133 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/file/sql/query_log 4
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user1 localhost wait/io/file/sql/query_log 7
user1 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user2 localhost wait/io/file/sql/query_log 4
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user2 localhost wait/io/file/sql/query_log 7
user2 localhost wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_user;
user event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
-user2 wait/io/file/sql/query_log 4
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 7
user2 wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_host;
host event_name count_star
-localhost wait/io/file/sql/query_log 8
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/io/file/sql/query_log 14
localhost wait/synch/rwlock/sql/LOCK_grant 2
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 8
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 14
wait/synch/rwlock/sql/LOCK_grant 2
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 8
+wait/io/file/sql/query_log 14
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 6
-user1 localhost stage/sql/Init 5
-user1 localhost stage/sql/Init for update 1
-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
-user2 localhost stage/sql/Init for update 1
-user2 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/checking permissions 4
+user1 localhost stage/sql/closing tables 11
+user1 localhost stage/sql/init 3
+user1 localhost stage/sql/Opening tables 7
+user1 localhost stage/sql/starting 6
+user2 localhost stage/sql/checking permissions 4
+user2 localhost stage/sql/closing tables 10
+user2 localhost stage/sql/init 3
+user2 localhost stage/sql/Opening tables 6
+user2 localhost stage/sql/starting 6
execute dump_stages_user;
user event_name count_star
-user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 6
-user1 stage/sql/Init 5
-user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 4
-user2 stage/sql/Checking permissions 3
-user2 stage/sql/Closing tables 4
-user2 stage/sql/Init 5
-user2 stage/sql/Init for update 1
-user2 stage/sql/Opening tables 3
+user1 stage/sql/checking permissions 4
+user1 stage/sql/closing tables 11
+user1 stage/sql/init 3
+user1 stage/sql/Opening tables 7
+user1 stage/sql/starting 6
+user2 stage/sql/checking permissions 4
+user2 stage/sql/closing tables 10
+user2 stage/sql/init 3
+user2 stage/sql/Opening tables 6
+user2 stage/sql/starting 6
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 6
-localhost stage/sql/Closing tables 10
-localhost stage/sql/Init 10
-localhost stage/sql/Init for update 2
-localhost stage/sql/Opening tables 7
+localhost stage/sql/checking permissions 8
+localhost stage/sql/closing tables 21
+localhost stage/sql/init 6
+localhost stage/sql/Opening tables 13
+localhost stage/sql/starting 12
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 6
-stage/sql/Closing tables 10
-stage/sql/Init 10
-stage/sql/Init for update 2
-stage/sql/Opening tables 7
+stage/sql/checking permissions 8
+stage/sql/closing tables 21
+stage/sql/init 6
+stage/sql/Opening tables 13
+stage/sql/starting 12
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 6
-stage/sql/Closing tables 10
-stage/sql/Init 10
-stage/sql/Init for update 2
-stage/sql/Opening tables 7
+stage/sql/checking permissions 8
+stage/sql/closing tables 21
+stage/sql/init 6
+stage/sql/Opening tables 13
+stage/sql/starting 12
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 0
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 0
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 0
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 0
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 0
+localhost statement/sp/freturn 2
localhost statement/sql/insert 2
-localhost statement/sql/select 4
+localhost statement/sql/select 6
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 2
statement/sql/insert 2
-statement/sql/select 4
+statement/sql/select 6
execute dump_statements_history;
event_name count(event_name)
+statement/sp/freturn 2
statement/sql/insert 2
-statement/sql/select 4
+statement/sql/select 6
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 4
+execute dump_transactions_global;
+event_name count_star
+transaction 4
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 4
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -614,165 +668,171 @@ connection default;
"================== Step 6 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user2 wait/io/file/sql/query_log 4
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 7
user2 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
user3 wait/io/file/sql/query_log 1
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
user3 wait/synch/rwlock/sql/LOCK_grant 0
username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/file/sql/query_log 4
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user1 localhost wait/io/file/sql/query_log 7
user1 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user2 localhost wait/io/file/sql/query_log 4
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user2 localhost wait/io/file/sql/query_log 7
user2 localhost wait/synch/rwlock/sql/LOCK_grant 1
user3 localhost wait/io/file/sql/query_log 1
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
-user2 wait/io/file/sql/query_log 4
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 7
user2 wait/synch/rwlock/sql/LOCK_grant 1
user3 wait/io/file/sql/query_log 1
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
user3 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/file/sql/query_log 9
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/io/file/sql/query_log 15
localhost wait/synch/rwlock/sql/LOCK_grant 2
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 9
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 15
wait/synch/rwlock/sql/LOCK_grant 2
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 9
+wait/io/file/sql/query_log 15
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 6
-user1 localhost stage/sql/Init 5
-user1 localhost stage/sql/Init for update 1
-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
-user2 localhost stage/sql/Init for update 1
-user2 localhost stage/sql/Opening tables 3
-user3 localhost stage/sql/Checking permissions 0
-user3 localhost stage/sql/Closing tables 0
-user3 localhost stage/sql/Init 0
-user3 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/checking permissions 4
+user1 localhost stage/sql/closing tables 11
+user1 localhost stage/sql/init 3
+user1 localhost stage/sql/Opening tables 7
+user1 localhost stage/sql/starting 6
+user2 localhost stage/sql/checking permissions 4
+user2 localhost stage/sql/closing tables 10
+user2 localhost stage/sql/init 3
+user2 localhost stage/sql/Opening tables 6
+user2 localhost stage/sql/starting 6
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
user3 localhost stage/sql/Opening tables 0
+user3 localhost stage/sql/starting 0
execute dump_stages_user;
user event_name count_star
-user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 6
-user1 stage/sql/Init 5
-user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 4
-user2 stage/sql/Checking permissions 3
-user2 stage/sql/Closing tables 4
-user2 stage/sql/Init 5
-user2 stage/sql/Init for update 1
-user2 stage/sql/Opening tables 3
-user3 stage/sql/Checking permissions 0
-user3 stage/sql/Closing tables 0
-user3 stage/sql/Init 0
-user3 stage/sql/Init for update 0
+user1 stage/sql/checking permissions 4
+user1 stage/sql/closing tables 11
+user1 stage/sql/init 3
+user1 stage/sql/Opening tables 7
+user1 stage/sql/starting 6
+user2 stage/sql/checking permissions 4
+user2 stage/sql/closing tables 10
+user2 stage/sql/init 3
+user2 stage/sql/Opening tables 6
+user2 stage/sql/starting 6
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
user3 stage/sql/Opening tables 0
+user3 stage/sql/starting 0
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 6
-localhost stage/sql/Closing tables 10
-localhost stage/sql/Init 10
-localhost stage/sql/Init for update 2
-localhost stage/sql/Opening tables 7
+localhost stage/sql/checking permissions 8
+localhost stage/sql/closing tables 21
+localhost stage/sql/init 6
+localhost stage/sql/Opening tables 13
+localhost stage/sql/starting 12
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 6
-stage/sql/Closing tables 10
-stage/sql/Init 10
-stage/sql/Init for update 2
-stage/sql/Opening tables 7
+stage/sql/checking permissions 8
+stage/sql/closing tables 21
+stage/sql/init 6
+stage/sql/Opening tables 13
+stage/sql/starting 12
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 6
-stage/sql/Closing tables 10
-stage/sql/Init 10
-stage/sql/Init for update 2
-stage/sql/Opening tables 7
+stage/sql/checking permissions 8
+stage/sql/closing tables 21
+stage/sql/init 6
+stage/sql/Opening tables 13
+stage/sql/starting 12
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 0
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 0
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 0
+user3 localhost statement/sp/freturn 0
user3 localhost statement/sql/insert 0
user3 localhost statement/sql/select 0
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 0
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 0
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 0
+user3 statement/sp/freturn 0
user3 statement/sql/insert 0
user3 statement/sql/select 0
execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 0
+localhost statement/sp/freturn 2
localhost statement/sql/insert 2
-localhost statement/sql/select 4
+localhost statement/sql/select 6
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 2
statement/sql/insert 2
-statement/sql/select 4
+statement/sql/select 6
execute dump_statements_history;
event_name count(event_name)
+statement/sp/freturn 2
statement/sql/insert 2
-statement/sql/select 4
+statement/sql/select 6
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 0
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 0
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 4
+execute dump_transactions_global;
+event_name count_star
+transaction 4
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 4
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -789,176 +849,187 @@ execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 4 4
connection con3;
-select get_lock("marker", 10);
-get_lock("marker", 10)
+select uuid_short() <> 1;
+uuid_short() <> 1
1
-select release_lock("marker");
-release_lock("marker")
+select uuid_short() <> 1;
+uuid_short() <> 1
1
+start transaction;
insert into test.t1 values ("marker");
+commit;
+select test.f(10,20);
+test.f(10,20)
+30
connection default;
"================== Step 7 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user2 wait/io/file/sql/query_log 4
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 7
user2 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user3 wait/io/file/sql/query_log 4
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/io/file/sql/query_log 7
user3 wait/synch/rwlock/sql/LOCK_grant 1
username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/file/sql/query_log 4
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user1 localhost wait/io/file/sql/query_log 7
user1 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user2 localhost wait/io/file/sql/query_log 4
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user2 localhost wait/io/file/sql/query_log 7
user2 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user3 localhost wait/io/file/sql/query_log 4
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user3 localhost wait/io/file/sql/query_log 7
user3 localhost wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_user;
user event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
-user2 wait/io/file/sql/query_log 4
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 7
user2 wait/synch/rwlock/sql/LOCK_grant 1
-user3 wait/io/file/sql/query_log 4
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/io/file/sql/query_log 7
user3 wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_host;
host event_name count_star
-localhost wait/io/file/sql/query_log 12
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/io/file/sql/query_log 21
localhost wait/synch/rwlock/sql/LOCK_grant 3
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 12
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 21
wait/synch/rwlock/sql/LOCK_grant 3
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 12
+wait/io/file/sql/query_log 21
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 6
-user1 localhost stage/sql/Init 5
-user1 localhost stage/sql/Init for update 1
-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
-user2 localhost stage/sql/Init for update 1
-user2 localhost stage/sql/Opening tables 3
-user3 localhost stage/sql/Checking permissions 3
-user3 localhost stage/sql/Closing tables 4
-user3 localhost stage/sql/Init 5
-user3 localhost stage/sql/Init for update 1
-user3 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/checking permissions 4
+user1 localhost stage/sql/closing tables 11
+user1 localhost stage/sql/init 3
+user1 localhost stage/sql/Opening tables 7
+user1 localhost stage/sql/starting 6
+user2 localhost stage/sql/checking permissions 4
+user2 localhost stage/sql/closing tables 10
+user2 localhost stage/sql/init 3
+user2 localhost stage/sql/Opening tables 6
+user2 localhost stage/sql/starting 6
+user3 localhost stage/sql/checking permissions 4
+user3 localhost stage/sql/closing tables 10
+user3 localhost stage/sql/init 3
+user3 localhost stage/sql/Opening tables 6
+user3 localhost stage/sql/starting 6
execute dump_stages_user;
user event_name count_star
-user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 6
-user1 stage/sql/Init 5
-user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 4
-user2 stage/sql/Checking permissions 3
-user2 stage/sql/Closing tables 4
-user2 stage/sql/Init 5
-user2 stage/sql/Init for update 1
-user2 stage/sql/Opening tables 3
-user3 stage/sql/Checking permissions 3
-user3 stage/sql/Closing tables 4
-user3 stage/sql/Init 5
-user3 stage/sql/Init for update 1
-user3 stage/sql/Opening tables 3
+user1 stage/sql/checking permissions 4
+user1 stage/sql/closing tables 11
+user1 stage/sql/init 3
+user1 stage/sql/Opening tables 7
+user1 stage/sql/starting 6
+user2 stage/sql/checking permissions 4
+user2 stage/sql/closing tables 10
+user2 stage/sql/init 3
+user2 stage/sql/Opening tables 6
+user2 stage/sql/starting 6
+user3 stage/sql/checking permissions 4
+user3 stage/sql/closing tables 10
+user3 stage/sql/init 3
+user3 stage/sql/Opening tables 6
+user3 stage/sql/starting 6
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 9
-localhost stage/sql/Closing tables 14
-localhost stage/sql/Init 15
-localhost stage/sql/Init for update 3
-localhost stage/sql/Opening tables 10
+localhost stage/sql/checking permissions 12
+localhost stage/sql/closing tables 31
+localhost stage/sql/init 9
+localhost stage/sql/Opening tables 19
+localhost stage/sql/starting 18
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 9
-stage/sql/Closing tables 14
-stage/sql/Init 15
-stage/sql/Init for update 3
-stage/sql/Opening tables 10
+stage/sql/checking permissions 12
+stage/sql/closing tables 31
+stage/sql/init 9
+stage/sql/Opening tables 19
+stage/sql/starting 18
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 9
-stage/sql/Closing tables 14
-stage/sql/Init 15
-stage/sql/Init for update 3
-stage/sql/Opening tables 10
+stage/sql/checking permissions 12
+stage/sql/closing tables 31
+stage/sql/init 9
+stage/sql/Opening tables 19
+stage/sql/starting 18
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 0
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 0
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 0
+user3 localhost statement/sp/freturn 1
user3 localhost statement/sql/insert 1
-user3 localhost statement/sql/select 2
+user3 localhost statement/sql/select 3
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 0
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 0
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 0
+user3 statement/sp/freturn 1
user3 statement/sql/insert 1
-user3 statement/sql/select 2
+user3 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 0
+localhost statement/sp/freturn 3
localhost statement/sql/insert 3
-localhost statement/sql/select 6
+localhost statement/sql/select 9
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 3
statement/sql/insert 3
-statement/sql/select 6
+statement/sql/select 9
execute dump_statements_history;
event_name count(event_name)
+statement/sp/freturn 3
statement/sql/insert 3
-statement/sql/select 6
+statement/sql/select 9
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 6
+execute dump_transactions_global;
+event_name count_star
+transaction 6
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 6
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -979,194 +1050,198 @@ connection default;
"================== Step 8 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user2 wait/io/file/sql/query_log 4
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 7
user2 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user3 wait/io/file/sql/query_log 4
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/io/file/sql/query_log 7
user3 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
user4 wait/io/file/sql/query_log 1
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
user4 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/file/sql/query_log 4
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user1 localhost wait/io/file/sql/query_log 7
user1 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user2 localhost wait/io/file/sql/query_log 4
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user2 localhost wait/io/file/sql/query_log 7
user2 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user3 localhost wait/io/file/sql/query_log 4
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user3 localhost wait/io/file/sql/query_log 7
user3 localhost wait/synch/rwlock/sql/LOCK_grant 1
user4 localhost wait/io/file/sql/query_log 1
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
-user2 wait/io/file/sql/query_log 4
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 7
user2 wait/synch/rwlock/sql/LOCK_grant 1
-user3 wait/io/file/sql/query_log 4
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/io/file/sql/query_log 7
user3 wait/synch/rwlock/sql/LOCK_grant 1
user4 wait/io/file/sql/query_log 1
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
user4 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/file/sql/query_log 13
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/io/file/sql/query_log 22
localhost wait/synch/rwlock/sql/LOCK_grant 3
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 13
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 22
wait/synch/rwlock/sql/LOCK_grant 3
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 13
+wait/io/file/sql/query_log 22
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 6
-user1 localhost stage/sql/Init 5
-user1 localhost stage/sql/Init for update 1
-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
-user2 localhost stage/sql/Init for update 1
-user2 localhost stage/sql/Opening tables 3
-user3 localhost stage/sql/Checking permissions 3
-user3 localhost stage/sql/Closing tables 4
-user3 localhost stage/sql/Init 5
-user3 localhost stage/sql/Init for update 1
-user3 localhost stage/sql/Opening tables 3
-user4 localhost stage/sql/Checking permissions 0
-user4 localhost stage/sql/Closing tables 0
-user4 localhost stage/sql/Init 0
-user4 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/checking permissions 4
+user1 localhost stage/sql/closing tables 11
+user1 localhost stage/sql/init 3
+user1 localhost stage/sql/Opening tables 7
+user1 localhost stage/sql/starting 6
+user2 localhost stage/sql/checking permissions 4
+user2 localhost stage/sql/closing tables 10
+user2 localhost stage/sql/init 3
+user2 localhost stage/sql/Opening tables 6
+user2 localhost stage/sql/starting 6
+user3 localhost stage/sql/checking permissions 4
+user3 localhost stage/sql/closing tables 10
+user3 localhost stage/sql/init 3
+user3 localhost stage/sql/Opening tables 6
+user3 localhost stage/sql/starting 6
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
user4 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/starting 0
execute dump_stages_user;
user event_name count_star
-user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 6
-user1 stage/sql/Init 5
-user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 4
-user2 stage/sql/Checking permissions 3
-user2 stage/sql/Closing tables 4
-user2 stage/sql/Init 5
-user2 stage/sql/Init for update 1
-user2 stage/sql/Opening tables 3
-user3 stage/sql/Checking permissions 3
-user3 stage/sql/Closing tables 4
-user3 stage/sql/Init 5
-user3 stage/sql/Init for update 1
-user3 stage/sql/Opening tables 3
-user4 stage/sql/Checking permissions 0
-user4 stage/sql/Closing tables 0
-user4 stage/sql/Init 0
-user4 stage/sql/Init for update 0
+user1 stage/sql/checking permissions 4
+user1 stage/sql/closing tables 11
+user1 stage/sql/init 3
+user1 stage/sql/Opening tables 7
+user1 stage/sql/starting 6
+user2 stage/sql/checking permissions 4
+user2 stage/sql/closing tables 10
+user2 stage/sql/init 3
+user2 stage/sql/Opening tables 6
+user2 stage/sql/starting 6
+user3 stage/sql/checking permissions 4
+user3 stage/sql/closing tables 10
+user3 stage/sql/init 3
+user3 stage/sql/Opening tables 6
+user3 stage/sql/starting 6
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
user4 stage/sql/Opening tables 0
+user4 stage/sql/starting 0
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 9
-localhost stage/sql/Closing tables 14
-localhost stage/sql/Init 15
-localhost stage/sql/Init for update 3
-localhost stage/sql/Opening tables 10
+localhost stage/sql/checking permissions 12
+localhost stage/sql/closing tables 31
+localhost stage/sql/init 9
+localhost stage/sql/Opening tables 19
+localhost stage/sql/starting 18
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 9
-stage/sql/Closing tables 14
-stage/sql/Init 15
-stage/sql/Init for update 3
-stage/sql/Opening tables 10
+stage/sql/checking permissions 12
+stage/sql/closing tables 31
+stage/sql/init 9
+stage/sql/Opening tables 19
+stage/sql/starting 18
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 9
-stage/sql/Closing tables 14
-stage/sql/Init 15
-stage/sql/Init for update 3
-stage/sql/Opening tables 10
+stage/sql/checking permissions 12
+stage/sql/closing tables 31
+stage/sql/init 9
+stage/sql/Opening tables 19
+stage/sql/starting 18
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 0
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 0
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 0
+user3 localhost statement/sp/freturn 1
user3 localhost statement/sql/insert 1
-user3 localhost statement/sql/select 2
+user3 localhost statement/sql/select 3
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 0
+user4 localhost statement/sp/freturn 0
user4 localhost statement/sql/insert 0
user4 localhost statement/sql/select 0
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 0
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 0
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 0
+user3 statement/sp/freturn 1
user3 statement/sql/insert 1
-user3 statement/sql/select 2
+user3 statement/sql/select 3
user4 statement/com/Error 0
user4 statement/com/Quit 0
+user4 statement/sp/freturn 0
user4 statement/sql/insert 0
user4 statement/sql/select 0
execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 0
+localhost statement/sp/freturn 3
localhost statement/sql/insert 3
-localhost statement/sql/select 6
+localhost statement/sql/select 9
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 3
statement/sql/insert 3
-statement/sql/select 6
+statement/sql/select 9
execute dump_statements_history;
event_name count(event_name)
+statement/sp/freturn 3
statement/sql/insert 3
-statement/sql/select 6
+statement/sql/select 9
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 0
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 0
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 6
+execute dump_transactions_global;
+event_name count_star
+transaction 6
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 6
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -1185,205 +1260,214 @@ execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 5 5
connection con4;
-select get_lock("marker", 10);
-get_lock("marker", 10)
+select uuid_short() <> 1;
+uuid_short() <> 1
1
-select release_lock("marker");
-release_lock("marker")
+select uuid_short() <> 1;
+uuid_short() <> 1
1
+start transaction;
insert into test.t1 values ("marker");
+commit;
+select test.f(10,20);
+test.f(10,20)
+30
connection default;
"================== Step 9 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user2 wait/io/file/sql/query_log 4
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 7
user2 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user3 wait/io/file/sql/query_log 4
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/io/file/sql/query_log 7
user3 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user4 wait/io/file/sql/query_log 4
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/io/file/sql/query_log 7
user4 wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/file/sql/query_log 4
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user1 localhost wait/io/file/sql/query_log 7
user1 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user2 localhost wait/io/file/sql/query_log 4
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user2 localhost wait/io/file/sql/query_log 7
user2 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user3 localhost wait/io/file/sql/query_log 4
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user3 localhost wait/io/file/sql/query_log 7
user3 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user4 localhost wait/io/file/sql/query_log 4
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user4 localhost wait/io/file/sql/query_log 7
user4 localhost wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_user;
user event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
-user2 wait/io/file/sql/query_log 4
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 7
user2 wait/synch/rwlock/sql/LOCK_grant 1
-user3 wait/io/file/sql/query_log 4
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/io/file/sql/query_log 7
user3 wait/synch/rwlock/sql/LOCK_grant 1
-user4 wait/io/file/sql/query_log 4
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/io/file/sql/query_log 7
user4 wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_host;
host event_name count_star
-localhost wait/io/file/sql/query_log 16
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/io/file/sql/query_log 28
localhost wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 16
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 28
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 16
+wait/io/file/sql/query_log 28
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 6
-user1 localhost stage/sql/Init 5
-user1 localhost stage/sql/Init for update 1
-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
-user2 localhost stage/sql/Init for update 1
-user2 localhost stage/sql/Opening tables 3
-user3 localhost stage/sql/Checking permissions 3
-user3 localhost stage/sql/Closing tables 4
-user3 localhost stage/sql/Init 5
-user3 localhost stage/sql/Init for update 1
-user3 localhost stage/sql/Opening tables 3
-user4 localhost stage/sql/Checking permissions 3
-user4 localhost stage/sql/Closing tables 4
-user4 localhost stage/sql/Init 5
-user4 localhost stage/sql/Init for update 1
-user4 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/checking permissions 4
+user1 localhost stage/sql/closing tables 11
+user1 localhost stage/sql/init 3
+user1 localhost stage/sql/Opening tables 7
+user1 localhost stage/sql/starting 6
+user2 localhost stage/sql/checking permissions 4
+user2 localhost stage/sql/closing tables 10
+user2 localhost stage/sql/init 3
+user2 localhost stage/sql/Opening tables 6
+user2 localhost stage/sql/starting 6
+user3 localhost stage/sql/checking permissions 4
+user3 localhost stage/sql/closing tables 10
+user3 localhost stage/sql/init 3
+user3 localhost stage/sql/Opening tables 6
+user3 localhost stage/sql/starting 6
+user4 localhost stage/sql/checking permissions 4
+user4 localhost stage/sql/closing tables 10
+user4 localhost stage/sql/init 3
+user4 localhost stage/sql/Opening tables 6
+user4 localhost stage/sql/starting 6
execute dump_stages_user;
user event_name count_star
-user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 6
-user1 stage/sql/Init 5
-user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 4
-user2 stage/sql/Checking permissions 3
-user2 stage/sql/Closing tables 4
-user2 stage/sql/Init 5
-user2 stage/sql/Init for update 1
-user2 stage/sql/Opening tables 3
-user3 stage/sql/Checking permissions 3
-user3 stage/sql/Closing tables 4
-user3 stage/sql/Init 5
-user3 stage/sql/Init for update 1
-user3 stage/sql/Opening tables 3
-user4 stage/sql/Checking permissions 3
-user4 stage/sql/Closing tables 4
-user4 stage/sql/Init 5
-user4 stage/sql/Init for update 1
-user4 stage/sql/Opening tables 3
+user1 stage/sql/checking permissions 4
+user1 stage/sql/closing tables 11
+user1 stage/sql/init 3
+user1 stage/sql/Opening tables 7
+user1 stage/sql/starting 6
+user2 stage/sql/checking permissions 4
+user2 stage/sql/closing tables 10
+user2 stage/sql/init 3
+user2 stage/sql/Opening tables 6
+user2 stage/sql/starting 6
+user3 stage/sql/checking permissions 4
+user3 stage/sql/closing tables 10
+user3 stage/sql/init 3
+user3 stage/sql/Opening tables 6
+user3 stage/sql/starting 6
+user4 stage/sql/checking permissions 4
+user4 stage/sql/closing tables 10
+user4 stage/sql/init 3
+user4 stage/sql/Opening tables 6
+user4 stage/sql/starting 6
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 18
-localhost stage/sql/Init 20
-localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 13
+localhost stage/sql/checking permissions 16
+localhost stage/sql/closing tables 41
+localhost stage/sql/init 12
+localhost stage/sql/Opening tables 25
+localhost stage/sql/starting 24
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 20
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 24
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 20
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 24
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 0
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 0
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 0
+user3 localhost statement/sp/freturn 1
user3 localhost statement/sql/insert 1
-user3 localhost statement/sql/select 2
+user3 localhost statement/sql/select 3
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 0
+user4 localhost statement/sp/freturn 1
user4 localhost statement/sql/insert 1
-user4 localhost statement/sql/select 2
+user4 localhost statement/sql/select 3
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 0
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 0
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 0
+user3 statement/sp/freturn 1
user3 statement/sql/insert 1
-user3 statement/sql/select 2
+user3 statement/sql/select 3
user4 statement/com/Error 0
user4 statement/com/Quit 0
+user4 statement/sp/freturn 1
user4 statement/sql/insert 1
-user4 statement/sql/select 2
+user4 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 0
+localhost statement/sp/freturn 4
localhost statement/sql/insert 4
-localhost statement/sql/select 8
+localhost statement/sql/select 12
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -1408,191 +1492,196 @@ call dump_thread();
username status
user1 not found
username event_name count_star
-user2 wait/io/file/sql/query_log 4
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 7
user2 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user3 wait/io/file/sql/query_log 4
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/io/file/sql/query_log 7
user3 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user4 wait/io/file/sql/query_log 4
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/io/file/sql/query_log 7
user4 wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/file/sql/query_log 5
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 1
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user1 localhost wait/io/file/sql/query_log 8
user1 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user2 localhost wait/io/file/sql/query_log 4
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user2 localhost wait/io/file/sql/query_log 7
user2 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user3 localhost wait/io/file/sql/query_log 4
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user3 localhost wait/io/file/sql/query_log 7
user3 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user4 localhost wait/io/file/sql/query_log 4
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user4 localhost wait/io/file/sql/query_log 7
user4 localhost wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_user;
user event_name count_star
-user1 wait/io/file/sql/query_log 5
-user1 wait/synch/mutex/sql/LOCK_connection_count 1
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 8
user1 wait/synch/rwlock/sql/LOCK_grant 1
-user2 wait/io/file/sql/query_log 4
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 7
user2 wait/synch/rwlock/sql/LOCK_grant 1
-user3 wait/io/file/sql/query_log 4
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/io/file/sql/query_log 7
user3 wait/synch/rwlock/sql/LOCK_grant 1
-user4 wait/io/file/sql/query_log 4
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/io/file/sql/query_log 7
user4 wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_host;
host event_name count_star
-localhost wait/io/file/sql/query_log 17
-localhost wait/synch/mutex/sql/LOCK_connection_count 1
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/io/file/sql/query_log 29
localhost wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 17
-wait/synch/mutex/sql/LOCK_connection_count 1
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 29
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 17
-wait/synch/mutex/sql/LOCK_connection_count 1
+wait/io/file/sql/query_log 29
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 6
-user1 localhost stage/sql/Init 6
-user1 localhost stage/sql/Init for update 1
-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
-user2 localhost stage/sql/Init for update 1
-user2 localhost stage/sql/Opening tables 3
-user3 localhost stage/sql/Checking permissions 3
-user3 localhost stage/sql/Closing tables 4
-user3 localhost stage/sql/Init 5
-user3 localhost stage/sql/Init for update 1
-user3 localhost stage/sql/Opening tables 3
-user4 localhost stage/sql/Checking permissions 3
-user4 localhost stage/sql/Closing tables 4
-user4 localhost stage/sql/Init 5
-user4 localhost stage/sql/Init for update 1
-user4 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/checking permissions 4
+user1 localhost stage/sql/closing tables 11
+user1 localhost stage/sql/init 3
+user1 localhost stage/sql/Opening tables 7
+user1 localhost stage/sql/starting 7
+user2 localhost stage/sql/checking permissions 4
+user2 localhost stage/sql/closing tables 10
+user2 localhost stage/sql/init 3
+user2 localhost stage/sql/Opening tables 6
+user2 localhost stage/sql/starting 6
+user3 localhost stage/sql/checking permissions 4
+user3 localhost stage/sql/closing tables 10
+user3 localhost stage/sql/init 3
+user3 localhost stage/sql/Opening tables 6
+user3 localhost stage/sql/starting 6
+user4 localhost stage/sql/checking permissions 4
+user4 localhost stage/sql/closing tables 10
+user4 localhost stage/sql/init 3
+user4 localhost stage/sql/Opening tables 6
+user4 localhost stage/sql/starting 6
execute dump_stages_user;
user event_name count_star
-user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 6
-user1 stage/sql/Init 6
-user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 4
-user2 stage/sql/Checking permissions 3
-user2 stage/sql/Closing tables 4
-user2 stage/sql/Init 5
-user2 stage/sql/Init for update 1
-user2 stage/sql/Opening tables 3
-user3 stage/sql/Checking permissions 3
-user3 stage/sql/Closing tables 4
-user3 stage/sql/Init 5
-user3 stage/sql/Init for update 1
-user3 stage/sql/Opening tables 3
-user4 stage/sql/Checking permissions 3
-user4 stage/sql/Closing tables 4
-user4 stage/sql/Init 5
-user4 stage/sql/Init for update 1
-user4 stage/sql/Opening tables 3
+user1 stage/sql/checking permissions 4
+user1 stage/sql/closing tables 11
+user1 stage/sql/init 3
+user1 stage/sql/Opening tables 7
+user1 stage/sql/starting 7
+user2 stage/sql/checking permissions 4
+user2 stage/sql/closing tables 10
+user2 stage/sql/init 3
+user2 stage/sql/Opening tables 6
+user2 stage/sql/starting 6
+user3 stage/sql/checking permissions 4
+user3 stage/sql/closing tables 10
+user3 stage/sql/init 3
+user3 stage/sql/Opening tables 6
+user3 stage/sql/starting 6
+user4 stage/sql/checking permissions 4
+user4 stage/sql/closing tables 10
+user4 stage/sql/init 3
+user4 stage/sql/Opening tables 6
+user4 stage/sql/starting 6
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 18
-localhost stage/sql/Init 21
-localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 13
+localhost stage/sql/checking permissions 16
+localhost stage/sql/closing tables 41
+localhost stage/sql/init 12
+localhost stage/sql/Opening tables 25
+localhost stage/sql/starting 25
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 21
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 25
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 21
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 25
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 1
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 0
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 0
+user3 localhost statement/sp/freturn 1
user3 localhost statement/sql/insert 1
-user3 localhost statement/sql/select 2
+user3 localhost statement/sql/select 3
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 0
+user4 localhost statement/sp/freturn 1
user4 localhost statement/sql/insert 1
-user4 localhost statement/sql/select 2
+user4 localhost statement/sql/select 3
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 1
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 0
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 0
+user3 statement/sp/freturn 1
user3 statement/sql/insert 1
-user3 statement/sql/select 2
+user3 statement/sql/select 3
user4 statement/com/Error 0
user4 statement/com/Quit 0
+user4 statement/sp/freturn 1
user4 statement/sql/insert 1
-user4 statement/sql/select 2
+user4 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 1
+localhost statement/sp/freturn 4
localhost statement/sql/insert 4
-localhost statement/sql/select 8
+localhost statement/sql/select 12
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 1
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 1
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -1619,186 +1708,193 @@ user1 not found
username status
user2 not found
username event_name count_star
-user3 wait/io/file/sql/query_log 4
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/io/file/sql/query_log 7
user3 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user4 wait/io/file/sql/query_log 4
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/io/file/sql/query_log 7
user4 wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/file/sql/query_log 5
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 1
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user1 localhost wait/io/file/sql/query_log 8
user1 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user2 localhost wait/io/file/sql/query_log 5
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 1
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user2 localhost wait/io/file/sql/query_log 8
user2 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user3 localhost wait/io/file/sql/query_log 4
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user3 localhost wait/io/file/sql/query_log 7
user3 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user4 localhost wait/io/file/sql/query_log 4
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user4 localhost wait/io/file/sql/query_log 7
user4 localhost wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_user;
user event_name count_star
-user1 wait/io/file/sql/query_log 5
-user1 wait/synch/mutex/sql/LOCK_connection_count 1
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 8
user1 wait/synch/rwlock/sql/LOCK_grant 1
-user2 wait/io/file/sql/query_log 5
-user2 wait/synch/mutex/sql/LOCK_connection_count 1
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 8
user2 wait/synch/rwlock/sql/LOCK_grant 1
-user3 wait/io/file/sql/query_log 4
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/io/file/sql/query_log 7
user3 wait/synch/rwlock/sql/LOCK_grant 1
-user4 wait/io/file/sql/query_log 4
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/io/file/sql/query_log 7
user4 wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_host;
host event_name count_star
-localhost wait/io/file/sql/query_log 18
-localhost wait/synch/mutex/sql/LOCK_connection_count 2
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/io/file/sql/query_log 30
localhost wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 18
-wait/synch/mutex/sql/LOCK_connection_count 2
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 30
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 18
-wait/synch/mutex/sql/LOCK_connection_count 2
+wait/io/file/sql/query_log 30
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 6
-user1 localhost stage/sql/Init 6
-user1 localhost stage/sql/Init for update 1
-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
-user2 localhost stage/sql/Init for update 1
-user2 localhost stage/sql/Opening tables 3
-user3 localhost stage/sql/Checking permissions 3
-user3 localhost stage/sql/Closing tables 4
-user3 localhost stage/sql/Init 5
-user3 localhost stage/sql/Init for update 1
-user3 localhost stage/sql/Opening tables 3
-user4 localhost stage/sql/Checking permissions 3
-user4 localhost stage/sql/Closing tables 4
-user4 localhost stage/sql/Init 5
-user4 localhost stage/sql/Init for update 1
-user4 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/checking permissions 4
+user1 localhost stage/sql/closing tables 11
+user1 localhost stage/sql/init 3
+user1 localhost stage/sql/Opening tables 7
+user1 localhost stage/sql/starting 7
+user2 localhost stage/sql/checking permissions 4
+user2 localhost stage/sql/closing tables 10
+user2 localhost stage/sql/init 3
+user2 localhost stage/sql/Opening tables 6
+user2 localhost stage/sql/starting 7
+user3 localhost stage/sql/checking permissions 4
+user3 localhost stage/sql/closing tables 10
+user3 localhost stage/sql/init 3
+user3 localhost stage/sql/Opening tables 6
+user3 localhost stage/sql/starting 6
+user4 localhost stage/sql/checking permissions 4
+user4 localhost stage/sql/closing tables 10
+user4 localhost stage/sql/init 3
+user4 localhost stage/sql/Opening tables 6
+user4 localhost stage/sql/starting 6
execute dump_stages_user;
user event_name count_star
-user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 6
-user1 stage/sql/Init 6
-user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 4
-user2 stage/sql/Checking permissions 3
-user2 stage/sql/Closing tables 4
-user2 stage/sql/Init 6
-user2 stage/sql/Init for update 1
-user2 stage/sql/Opening tables 3
-user3 stage/sql/Checking permissions 3
-user3 stage/sql/Closing tables 4
-user3 stage/sql/Init 5
-user3 stage/sql/Init for update 1
-user3 stage/sql/Opening tables 3
-user4 stage/sql/Checking permissions 3
-user4 stage/sql/Closing tables 4
-user4 stage/sql/Init 5
-user4 stage/sql/Init for update 1
-user4 stage/sql/Opening tables 3
+user1 stage/sql/checking permissions 4
+user1 stage/sql/closing tables 11
+user1 stage/sql/init 3
+user1 stage/sql/Opening tables 7
+user1 stage/sql/starting 7
+user2 stage/sql/checking permissions 4
+user2 stage/sql/closing tables 10
+user2 stage/sql/init 3
+user2 stage/sql/Opening tables 6
+user2 stage/sql/starting 7
+user3 stage/sql/checking permissions 4
+user3 stage/sql/closing tables 10
+user3 stage/sql/init 3
+user3 stage/sql/Opening tables 6
+user3 stage/sql/starting 6
+user4 stage/sql/checking permissions 4
+user4 stage/sql/closing tables 10
+user4 stage/sql/init 3
+user4 stage/sql/Opening tables 6
+user4 stage/sql/starting 6
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 18
-localhost stage/sql/Init 22
-localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 13
+localhost stage/sql/checking permissions 16
+localhost stage/sql/closing tables 41
+localhost stage/sql/init 12
+localhost stage/sql/Opening tables 25
+localhost stage/sql/starting 26
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 22
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 26
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 22
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 26
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 1
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 1
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 0
+user3 localhost statement/sp/freturn 1
user3 localhost statement/sql/insert 1
-user3 localhost statement/sql/select 2
+user3 localhost statement/sql/select 3
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 0
+user4 localhost statement/sp/freturn 1
user4 localhost statement/sql/insert 1
-user4 localhost statement/sql/select 2
+user4 localhost statement/sql/select 3
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 1
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 1
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 0
+user3 statement/sp/freturn 1
user3 statement/sql/insert 1
-user3 statement/sql/select 2
+user3 statement/sql/select 3
user4 statement/com/Error 0
user4 statement/com/Quit 0
+user4 statement/sp/freturn 1
user4 statement/sql/insert 1
-user4 statement/sql/select 2
+user4 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 2
+localhost statement/sp/freturn 4
localhost statement/sql/insert 4
-localhost statement/sql/select 8
+localhost statement/sql/select 12
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 2
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 2
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -1827,181 +1923,190 @@ user2 not found
username status
user3 not found
username event_name count_star
-user4 wait/io/file/sql/query_log 4
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/io/file/sql/query_log 7
user4 wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/file/sql/query_log 5
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 1
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user1 localhost wait/io/file/sql/query_log 8
user1 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user2 localhost wait/io/file/sql/query_log 5
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 1
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user2 localhost wait/io/file/sql/query_log 8
user2 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user3 localhost wait/io/file/sql/query_log 5
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 1
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user3 localhost wait/io/file/sql/query_log 8
user3 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user4 localhost wait/io/file/sql/query_log 4
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user4 localhost wait/io/file/sql/query_log 7
user4 localhost wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_user;
user event_name count_star
-user1 wait/io/file/sql/query_log 5
-user1 wait/synch/mutex/sql/LOCK_connection_count 1
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 8
user1 wait/synch/rwlock/sql/LOCK_grant 1
-user2 wait/io/file/sql/query_log 5
-user2 wait/synch/mutex/sql/LOCK_connection_count 1
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 8
user2 wait/synch/rwlock/sql/LOCK_grant 1
-user3 wait/io/file/sql/query_log 5
-user3 wait/synch/mutex/sql/LOCK_connection_count 1
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/io/file/sql/query_log 8
user3 wait/synch/rwlock/sql/LOCK_grant 1
-user4 wait/io/file/sql/query_log 4
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/io/file/sql/query_log 7
user4 wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_host;
host event_name count_star
-localhost wait/io/file/sql/query_log 19
-localhost wait/synch/mutex/sql/LOCK_connection_count 3
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/io/file/sql/query_log 31
localhost wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 19
-wait/synch/mutex/sql/LOCK_connection_count 3
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 31
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 19
-wait/synch/mutex/sql/LOCK_connection_count 3
+wait/io/file/sql/query_log 31
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 6
-user1 localhost stage/sql/Init 6
-user1 localhost stage/sql/Init for update 1
-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
-user2 localhost stage/sql/Init for update 1
-user2 localhost stage/sql/Opening tables 3
-user3 localhost stage/sql/Checking permissions 3
-user3 localhost stage/sql/Closing tables 4
-user3 localhost stage/sql/Init 6
-user3 localhost stage/sql/Init for update 1
-user3 localhost stage/sql/Opening tables 3
-user4 localhost stage/sql/Checking permissions 3
-user4 localhost stage/sql/Closing tables 4
-user4 localhost stage/sql/Init 5
-user4 localhost stage/sql/Init for update 1
-user4 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/checking permissions 4
+user1 localhost stage/sql/closing tables 11
+user1 localhost stage/sql/init 3
+user1 localhost stage/sql/Opening tables 7
+user1 localhost stage/sql/starting 7
+user2 localhost stage/sql/checking permissions 4
+user2 localhost stage/sql/closing tables 10
+user2 localhost stage/sql/init 3
+user2 localhost stage/sql/Opening tables 6
+user2 localhost stage/sql/starting 7
+user3 localhost stage/sql/checking permissions 4
+user3 localhost stage/sql/closing tables 10
+user3 localhost stage/sql/init 3
+user3 localhost stage/sql/Opening tables 6
+user3 localhost stage/sql/starting 7
+user4 localhost stage/sql/checking permissions 4
+user4 localhost stage/sql/closing tables 10
+user4 localhost stage/sql/init 3
+user4 localhost stage/sql/Opening tables 6
+user4 localhost stage/sql/starting 6
execute dump_stages_user;
user event_name count_star
-user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 6
-user1 stage/sql/Init 6
-user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 4
-user2 stage/sql/Checking permissions 3
-user2 stage/sql/Closing tables 4
-user2 stage/sql/Init 6
-user2 stage/sql/Init for update 1
-user2 stage/sql/Opening tables 3
-user3 stage/sql/Checking permissions 3
-user3 stage/sql/Closing tables 4
-user3 stage/sql/Init 6
-user3 stage/sql/Init for update 1
-user3 stage/sql/Opening tables 3
-user4 stage/sql/Checking permissions 3
-user4 stage/sql/Closing tables 4
-user4 stage/sql/Init 5
-user4 stage/sql/Init for update 1
-user4 stage/sql/Opening tables 3
+user1 stage/sql/checking permissions 4
+user1 stage/sql/closing tables 11
+user1 stage/sql/init 3
+user1 stage/sql/Opening tables 7
+user1 stage/sql/starting 7
+user2 stage/sql/checking permissions 4
+user2 stage/sql/closing tables 10
+user2 stage/sql/init 3
+user2 stage/sql/Opening tables 6
+user2 stage/sql/starting 7
+user3 stage/sql/checking permissions 4
+user3 stage/sql/closing tables 10
+user3 stage/sql/init 3
+user3 stage/sql/Opening tables 6
+user3 stage/sql/starting 7
+user4 stage/sql/checking permissions 4
+user4 stage/sql/closing tables 10
+user4 stage/sql/init 3
+user4 stage/sql/Opening tables 6
+user4 stage/sql/starting 6
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 18
-localhost stage/sql/Init 23
-localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 13
+localhost stage/sql/checking permissions 16
+localhost stage/sql/closing tables 41
+localhost stage/sql/init 12
+localhost stage/sql/Opening tables 25
+localhost stage/sql/starting 27
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 23
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 27
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 23
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 27
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 1
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 1
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 1
+user3 localhost statement/sp/freturn 1
user3 localhost statement/sql/insert 1
-user3 localhost statement/sql/select 2
+user3 localhost statement/sql/select 3
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 0
+user4 localhost statement/sp/freturn 1
user4 localhost statement/sql/insert 1
-user4 localhost statement/sql/select 2
+user4 localhost statement/sql/select 3
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 1
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 1
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 1
+user3 statement/sp/freturn 1
user3 statement/sql/insert 1
-user3 statement/sql/select 2
+user3 statement/sql/select 3
user4 statement/com/Error 0
user4 statement/com/Quit 0
+user4 statement/sp/freturn 1
user4 statement/sql/insert 1
-user4 statement/sql/select 2
+user4 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 3
+localhost statement/sp/freturn 4
localhost statement/sql/insert 4
-localhost statement/sql/select 8
+localhost statement/sql/select 12
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 3
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 3
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -2033,175 +2138,186 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/file/sql/query_log 5
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 1
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user1 localhost wait/io/file/sql/query_log 8
user1 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user2 localhost wait/io/file/sql/query_log 5
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 1
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user2 localhost wait/io/file/sql/query_log 8
user2 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user3 localhost wait/io/file/sql/query_log 5
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 1
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user3 localhost wait/io/file/sql/query_log 8
user3 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user4 localhost wait/io/file/sql/query_log 5
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 1
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user4 localhost wait/io/file/sql/query_log 8
user4 localhost wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_user;
user event_name count_star
-user1 wait/io/file/sql/query_log 5
-user1 wait/synch/mutex/sql/LOCK_connection_count 1
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 8
user1 wait/synch/rwlock/sql/LOCK_grant 1
-user2 wait/io/file/sql/query_log 5
-user2 wait/synch/mutex/sql/LOCK_connection_count 1
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 8
user2 wait/synch/rwlock/sql/LOCK_grant 1
-user3 wait/io/file/sql/query_log 5
-user3 wait/synch/mutex/sql/LOCK_connection_count 1
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/io/file/sql/query_log 8
user3 wait/synch/rwlock/sql/LOCK_grant 1
-user4 wait/io/file/sql/query_log 5
-user4 wait/synch/mutex/sql/LOCK_connection_count 1
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/io/file/sql/query_log 8
user4 wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_host;
host event_name count_star
-localhost wait/io/file/sql/query_log 20
-localhost wait/synch/mutex/sql/LOCK_connection_count 4
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/io/file/sql/query_log 32
localhost wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
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 6
-user1 localhost stage/sql/Init 6
-user1 localhost stage/sql/Init for update 1
-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
-user2 localhost stage/sql/Init for update 1
-user2 localhost stage/sql/Opening tables 3
-user3 localhost stage/sql/Checking permissions 3
-user3 localhost stage/sql/Closing tables 4
-user3 localhost stage/sql/Init 6
-user3 localhost stage/sql/Init for update 1
-user3 localhost stage/sql/Opening tables 3
-user4 localhost stage/sql/Checking permissions 3
-user4 localhost stage/sql/Closing tables 4
-user4 localhost stage/sql/Init 6
-user4 localhost stage/sql/Init for update 1
-user4 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/checking permissions 4
+user1 localhost stage/sql/closing tables 11
+user1 localhost stage/sql/init 3
+user1 localhost stage/sql/Opening tables 7
+user1 localhost stage/sql/starting 7
+user2 localhost stage/sql/checking permissions 4
+user2 localhost stage/sql/closing tables 10
+user2 localhost stage/sql/init 3
+user2 localhost stage/sql/Opening tables 6
+user2 localhost stage/sql/starting 7
+user3 localhost stage/sql/checking permissions 4
+user3 localhost stage/sql/closing tables 10
+user3 localhost stage/sql/init 3
+user3 localhost stage/sql/Opening tables 6
+user3 localhost stage/sql/starting 7
+user4 localhost stage/sql/checking permissions 4
+user4 localhost stage/sql/closing tables 10
+user4 localhost stage/sql/init 3
+user4 localhost stage/sql/Opening tables 6
+user4 localhost stage/sql/starting 7
execute dump_stages_user;
user event_name count_star
-user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 6
-user1 stage/sql/Init 6
-user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 4
-user2 stage/sql/Checking permissions 3
-user2 stage/sql/Closing tables 4
-user2 stage/sql/Init 6
-user2 stage/sql/Init for update 1
-user2 stage/sql/Opening tables 3
-user3 stage/sql/Checking permissions 3
-user3 stage/sql/Closing tables 4
-user3 stage/sql/Init 6
-user3 stage/sql/Init for update 1
-user3 stage/sql/Opening tables 3
-user4 stage/sql/Checking permissions 3
-user4 stage/sql/Closing tables 4
-user4 stage/sql/Init 6
-user4 stage/sql/Init for update 1
-user4 stage/sql/Opening tables 3
+user1 stage/sql/checking permissions 4
+user1 stage/sql/closing tables 11
+user1 stage/sql/init 3
+user1 stage/sql/Opening tables 7
+user1 stage/sql/starting 7
+user2 stage/sql/checking permissions 4
+user2 stage/sql/closing tables 10
+user2 stage/sql/init 3
+user2 stage/sql/Opening tables 6
+user2 stage/sql/starting 7
+user3 stage/sql/checking permissions 4
+user3 stage/sql/closing tables 10
+user3 stage/sql/init 3
+user3 stage/sql/Opening tables 6
+user3 stage/sql/starting 7
+user4 stage/sql/checking permissions 4
+user4 stage/sql/closing tables 10
+user4 stage/sql/init 3
+user4 stage/sql/Opening tables 6
+user4 stage/sql/starting 7
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 18
-localhost stage/sql/Init 24
-localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 13
+localhost stage/sql/checking permissions 16
+localhost stage/sql/closing tables 41
+localhost stage/sql/init 12
+localhost stage/sql/Opening tables 25
+localhost stage/sql/starting 28
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 1
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 1
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 1
+user3 localhost statement/sp/freturn 1
user3 localhost statement/sql/insert 1
-user3 localhost statement/sql/select 2
+user3 localhost statement/sql/select 3
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 1
+user4 localhost statement/sp/freturn 1
user4 localhost statement/sql/insert 1
-user4 localhost statement/sql/select 2
+user4 localhost statement/sql/select 3
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 1
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 1
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 1
+user3 statement/sp/freturn 1
user3 statement/sql/insert 1
-user3 statement/sql/select 2
+user3 statement/sql/select 3
user4 statement/com/Error 0
user4 statement/com/Quit 1
+user4 statement/sp/freturn 1
user4 statement/sql/insert 1
-user4 statement/sql/select 2
+user4 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 4
+localhost statement/sp/freturn 4
localhost statement/sql/insert 4
-localhost statement/sql/select 8
+localhost statement/sql/select 12
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -2234,175 +2350,186 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/file/sql/query_log 5
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 1
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user1 localhost wait/io/file/sql/query_log 8
user1 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user2 localhost wait/io/file/sql/query_log 5
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 1
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user2 localhost wait/io/file/sql/query_log 8
user2 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user3 localhost wait/io/file/sql/query_log 5
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 1
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user3 localhost wait/io/file/sql/query_log 8
user3 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user4 localhost wait/io/file/sql/query_log 5
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 1
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user4 localhost wait/io/file/sql/query_log 8
user4 localhost wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_user;
user event_name count_star
-user1 wait/io/file/sql/query_log 5
-user1 wait/synch/mutex/sql/LOCK_connection_count 1
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 8
user1 wait/synch/rwlock/sql/LOCK_grant 1
-user2 wait/io/file/sql/query_log 5
-user2 wait/synch/mutex/sql/LOCK_connection_count 1
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 8
user2 wait/synch/rwlock/sql/LOCK_grant 1
-user3 wait/io/file/sql/query_log 5
-user3 wait/synch/mutex/sql/LOCK_connection_count 1
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/io/file/sql/query_log 8
user3 wait/synch/rwlock/sql/LOCK_grant 1
-user4 wait/io/file/sql/query_log 5
-user4 wait/synch/mutex/sql/LOCK_connection_count 1
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/io/file/sql/query_log 8
user4 wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_host;
host event_name count_star
-localhost wait/io/file/sql/query_log 20
-localhost wait/synch/mutex/sql/LOCK_connection_count 4
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/io/file/sql/query_log 32
localhost wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
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 6
-user1 localhost stage/sql/Init 6
-user1 localhost stage/sql/Init for update 1
-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
-user2 localhost stage/sql/Init for update 1
-user2 localhost stage/sql/Opening tables 3
-user3 localhost stage/sql/Checking permissions 3
-user3 localhost stage/sql/Closing tables 4
-user3 localhost stage/sql/Init 6
-user3 localhost stage/sql/Init for update 1
-user3 localhost stage/sql/Opening tables 3
-user4 localhost stage/sql/Checking permissions 3
-user4 localhost stage/sql/Closing tables 4
-user4 localhost stage/sql/Init 6
-user4 localhost stage/sql/Init for update 1
-user4 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/checking permissions 4
+user1 localhost stage/sql/closing tables 11
+user1 localhost stage/sql/init 3
+user1 localhost stage/sql/Opening tables 7
+user1 localhost stage/sql/starting 7
+user2 localhost stage/sql/checking permissions 4
+user2 localhost stage/sql/closing tables 10
+user2 localhost stage/sql/init 3
+user2 localhost stage/sql/Opening tables 6
+user2 localhost stage/sql/starting 7
+user3 localhost stage/sql/checking permissions 4
+user3 localhost stage/sql/closing tables 10
+user3 localhost stage/sql/init 3
+user3 localhost stage/sql/Opening tables 6
+user3 localhost stage/sql/starting 7
+user4 localhost stage/sql/checking permissions 4
+user4 localhost stage/sql/closing tables 10
+user4 localhost stage/sql/init 3
+user4 localhost stage/sql/Opening tables 6
+user4 localhost stage/sql/starting 7
execute dump_stages_user;
user event_name count_star
-user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 6
-user1 stage/sql/Init 6
-user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 4
-user2 stage/sql/Checking permissions 3
-user2 stage/sql/Closing tables 4
-user2 stage/sql/Init 6
-user2 stage/sql/Init for update 1
-user2 stage/sql/Opening tables 3
-user3 stage/sql/Checking permissions 3
-user3 stage/sql/Closing tables 4
-user3 stage/sql/Init 6
-user3 stage/sql/Init for update 1
-user3 stage/sql/Opening tables 3
-user4 stage/sql/Checking permissions 3
-user4 stage/sql/Closing tables 4
-user4 stage/sql/Init 6
-user4 stage/sql/Init for update 1
-user4 stage/sql/Opening tables 3
+user1 stage/sql/checking permissions 4
+user1 stage/sql/closing tables 11
+user1 stage/sql/init 3
+user1 stage/sql/Opening tables 7
+user1 stage/sql/starting 7
+user2 stage/sql/checking permissions 4
+user2 stage/sql/closing tables 10
+user2 stage/sql/init 3
+user2 stage/sql/Opening tables 6
+user2 stage/sql/starting 7
+user3 stage/sql/checking permissions 4
+user3 stage/sql/closing tables 10
+user3 stage/sql/init 3
+user3 stage/sql/Opening tables 6
+user3 stage/sql/starting 7
+user4 stage/sql/checking permissions 4
+user4 stage/sql/closing tables 10
+user4 stage/sql/init 3
+user4 stage/sql/Opening tables 6
+user4 stage/sql/starting 7
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 18
-localhost stage/sql/Init 24
-localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 13
+localhost stage/sql/checking permissions 16
+localhost stage/sql/closing tables 41
+localhost stage/sql/init 12
+localhost stage/sql/Opening tables 25
+localhost stage/sql/starting 28
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 1
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 1
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 1
+user3 localhost statement/sp/freturn 1
user3 localhost statement/sql/insert 1
-user3 localhost statement/sql/select 2
+user3 localhost statement/sql/select 3
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 1
+user4 localhost statement/sp/freturn 1
user4 localhost statement/sql/insert 1
-user4 localhost statement/sql/select 2
+user4 localhost statement/sql/select 3
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 1
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 1
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 1
+user3 statement/sp/freturn 1
user3 statement/sql/insert 1
-user3 statement/sql/select 2
+user3 statement/sql/select 3
user4 statement/com/Error 0
user4 statement/com/Quit 1
+user4 statement/sp/freturn 1
user4 statement/sql/insert 1
-user4 statement/sql/select 2
+user4 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 4
+localhost statement/sp/freturn 4
localhost statement/sql/insert 4
-localhost statement/sql/select 8
+localhost statement/sql/select 12
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -2435,174 +2562,185 @@ user4 not found
execute dump_waits_account;
user host event_name count_star
user1 localhost wait/io/file/sql/query_log 0
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
user2 localhost wait/io/file/sql/query_log 0
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
user3 localhost wait/io/file/sql/query_log 0
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
user4 localhost wait/io/file/sql/query_log 0
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/file/sql/query_log 5
-user1 wait/synch/mutex/sql/LOCK_connection_count 1
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 8
user1 wait/synch/rwlock/sql/LOCK_grant 1
-user2 wait/io/file/sql/query_log 5
-user2 wait/synch/mutex/sql/LOCK_connection_count 1
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 8
user2 wait/synch/rwlock/sql/LOCK_grant 1
-user3 wait/io/file/sql/query_log 5
-user3 wait/synch/mutex/sql/LOCK_connection_count 1
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/io/file/sql/query_log 8
user3 wait/synch/rwlock/sql/LOCK_grant 1
-user4 wait/io/file/sql/query_log 5
-user4 wait/synch/mutex/sql/LOCK_connection_count 1
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/io/file/sql/query_log 8
user4 wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_host;
host event_name count_star
-localhost wait/io/file/sql/query_log 20
-localhost wait/synch/mutex/sql/LOCK_connection_count 4
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/io/file/sql/query_log 32
localhost wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
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 6
-user1 localhost stage/sql/Init 6
-user1 localhost stage/sql/Init for update 1
-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
-user2 localhost stage/sql/Init for update 1
-user2 localhost stage/sql/Opening tables 3
-user3 localhost stage/sql/Checking permissions 3
-user3 localhost stage/sql/Closing tables 4
-user3 localhost stage/sql/Init 6
-user3 localhost stage/sql/Init for update 1
-user3 localhost stage/sql/Opening tables 3
-user4 localhost stage/sql/Checking permissions 3
-user4 localhost stage/sql/Closing tables 4
-user4 localhost stage/sql/Init 6
-user4 localhost stage/sql/Init for update 1
-user4 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/checking permissions 4
+user1 localhost stage/sql/closing tables 11
+user1 localhost stage/sql/init 3
+user1 localhost stage/sql/Opening tables 7
+user1 localhost stage/sql/starting 7
+user2 localhost stage/sql/checking permissions 4
+user2 localhost stage/sql/closing tables 10
+user2 localhost stage/sql/init 3
+user2 localhost stage/sql/Opening tables 6
+user2 localhost stage/sql/starting 7
+user3 localhost stage/sql/checking permissions 4
+user3 localhost stage/sql/closing tables 10
+user3 localhost stage/sql/init 3
+user3 localhost stage/sql/Opening tables 6
+user3 localhost stage/sql/starting 7
+user4 localhost stage/sql/checking permissions 4
+user4 localhost stage/sql/closing tables 10
+user4 localhost stage/sql/init 3
+user4 localhost stage/sql/Opening tables 6
+user4 localhost stage/sql/starting 7
execute dump_stages_user;
user event_name count_star
-user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 6
-user1 stage/sql/Init 6
-user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 4
-user2 stage/sql/Checking permissions 3
-user2 stage/sql/Closing tables 4
-user2 stage/sql/Init 6
-user2 stage/sql/Init for update 1
-user2 stage/sql/Opening tables 3
-user3 stage/sql/Checking permissions 3
-user3 stage/sql/Closing tables 4
-user3 stage/sql/Init 6
-user3 stage/sql/Init for update 1
-user3 stage/sql/Opening tables 3
-user4 stage/sql/Checking permissions 3
-user4 stage/sql/Closing tables 4
-user4 stage/sql/Init 6
-user4 stage/sql/Init for update 1
-user4 stage/sql/Opening tables 3
+user1 stage/sql/checking permissions 4
+user1 stage/sql/closing tables 11
+user1 stage/sql/init 3
+user1 stage/sql/Opening tables 7
+user1 stage/sql/starting 7
+user2 stage/sql/checking permissions 4
+user2 stage/sql/closing tables 10
+user2 stage/sql/init 3
+user2 stage/sql/Opening tables 6
+user2 stage/sql/starting 7
+user3 stage/sql/checking permissions 4
+user3 stage/sql/closing tables 10
+user3 stage/sql/init 3
+user3 stage/sql/Opening tables 6
+user3 stage/sql/starting 7
+user4 stage/sql/checking permissions 4
+user4 stage/sql/closing tables 10
+user4 stage/sql/init 3
+user4 stage/sql/Opening tables 6
+user4 stage/sql/starting 7
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 18
-localhost stage/sql/Init 24
-localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 13
+localhost stage/sql/checking permissions 16
+localhost stage/sql/closing tables 41
+localhost stage/sql/init 12
+localhost stage/sql/Opening tables 25
+localhost stage/sql/starting 28
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 1
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 1
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 1
+user3 localhost statement/sp/freturn 1
user3 localhost statement/sql/insert 1
-user3 localhost statement/sql/select 2
+user3 localhost statement/sql/select 3
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 1
+user4 localhost statement/sp/freturn 1
user4 localhost statement/sql/insert 1
-user4 localhost statement/sql/select 2
+user4 localhost statement/sql/select 3
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 1
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 1
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 1
+user3 statement/sp/freturn 1
user3 statement/sql/insert 1
-user3 statement/sql/select 2
+user3 statement/sql/select 3
user4 statement/com/Error 0
user4 statement/com/Quit 1
+user4 statement/sp/freturn 1
user4 statement/sql/insert 1
-user4 statement/sql/select 2
+user4 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 4
+localhost statement/sp/freturn 4
localhost statement/sql/insert 4
-localhost statement/sql/select 8
+localhost statement/sql/select 12
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -2635,174 +2773,185 @@ user4 not found
execute dump_waits_account;
user host event_name count_star
user1 localhost wait/io/file/sql/query_log 0
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
user2 localhost wait/io/file/sql/query_log 0
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
user3 localhost wait/io/file/sql/query_log 0
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
user4 localhost wait/io/file/sql/query_log 0
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_user;
user event_name count_star
user1 wait/io/file/sql/query_log 0
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
user1 wait/synch/rwlock/sql/LOCK_grant 0
user2 wait/io/file/sql/query_log 0
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
user2 wait/synch/rwlock/sql/LOCK_grant 0
user3 wait/io/file/sql/query_log 0
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
user3 wait/synch/rwlock/sql/LOCK_grant 0
user4 wait/io/file/sql/query_log 0
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
user4 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/file/sql/query_log 20
-localhost wait/synch/mutex/sql/LOCK_connection_count 4
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/io/file/sql/query_log 32
localhost wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
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 6
-user1 localhost stage/sql/Init 6
-user1 localhost stage/sql/Init for update 1
-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
-user2 localhost stage/sql/Init for update 1
-user2 localhost stage/sql/Opening tables 3
-user3 localhost stage/sql/Checking permissions 3
-user3 localhost stage/sql/Closing tables 4
-user3 localhost stage/sql/Init 6
-user3 localhost stage/sql/Init for update 1
-user3 localhost stage/sql/Opening tables 3
-user4 localhost stage/sql/Checking permissions 3
-user4 localhost stage/sql/Closing tables 4
-user4 localhost stage/sql/Init 6
-user4 localhost stage/sql/Init for update 1
-user4 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/checking permissions 4
+user1 localhost stage/sql/closing tables 11
+user1 localhost stage/sql/init 3
+user1 localhost stage/sql/Opening tables 7
+user1 localhost stage/sql/starting 7
+user2 localhost stage/sql/checking permissions 4
+user2 localhost stage/sql/closing tables 10
+user2 localhost stage/sql/init 3
+user2 localhost stage/sql/Opening tables 6
+user2 localhost stage/sql/starting 7
+user3 localhost stage/sql/checking permissions 4
+user3 localhost stage/sql/closing tables 10
+user3 localhost stage/sql/init 3
+user3 localhost stage/sql/Opening tables 6
+user3 localhost stage/sql/starting 7
+user4 localhost stage/sql/checking permissions 4
+user4 localhost stage/sql/closing tables 10
+user4 localhost stage/sql/init 3
+user4 localhost stage/sql/Opening tables 6
+user4 localhost stage/sql/starting 7
execute dump_stages_user;
user event_name count_star
-user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 6
-user1 stage/sql/Init 6
-user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 4
-user2 stage/sql/Checking permissions 3
-user2 stage/sql/Closing tables 4
-user2 stage/sql/Init 6
-user2 stage/sql/Init for update 1
-user2 stage/sql/Opening tables 3
-user3 stage/sql/Checking permissions 3
-user3 stage/sql/Closing tables 4
-user3 stage/sql/Init 6
-user3 stage/sql/Init for update 1
-user3 stage/sql/Opening tables 3
-user4 stage/sql/Checking permissions 3
-user4 stage/sql/Closing tables 4
-user4 stage/sql/Init 6
-user4 stage/sql/Init for update 1
-user4 stage/sql/Opening tables 3
+user1 stage/sql/checking permissions 4
+user1 stage/sql/closing tables 11
+user1 stage/sql/init 3
+user1 stage/sql/Opening tables 7
+user1 stage/sql/starting 7
+user2 stage/sql/checking permissions 4
+user2 stage/sql/closing tables 10
+user2 stage/sql/init 3
+user2 stage/sql/Opening tables 6
+user2 stage/sql/starting 7
+user3 stage/sql/checking permissions 4
+user3 stage/sql/closing tables 10
+user3 stage/sql/init 3
+user3 stage/sql/Opening tables 6
+user3 stage/sql/starting 7
+user4 stage/sql/checking permissions 4
+user4 stage/sql/closing tables 10
+user4 stage/sql/init 3
+user4 stage/sql/Opening tables 6
+user4 stage/sql/starting 7
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 18
-localhost stage/sql/Init 24
-localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 13
+localhost stage/sql/checking permissions 16
+localhost stage/sql/closing tables 41
+localhost stage/sql/init 12
+localhost stage/sql/Opening tables 25
+localhost stage/sql/starting 28
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 1
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 1
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 1
+user3 localhost statement/sp/freturn 1
user3 localhost statement/sql/insert 1
-user3 localhost statement/sql/select 2
+user3 localhost statement/sql/select 3
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 1
+user4 localhost statement/sp/freturn 1
user4 localhost statement/sql/insert 1
-user4 localhost statement/sql/select 2
+user4 localhost statement/sql/select 3
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 1
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 1
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 1
+user3 statement/sp/freturn 1
user3 statement/sql/insert 1
-user3 statement/sql/select 2
+user3 statement/sql/select 3
user4 statement/com/Error 0
user4 statement/com/Quit 1
+user4 statement/sp/freturn 1
user4 statement/sql/insert 1
-user4 statement/sql/select 2
+user4 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 4
+localhost statement/sp/freturn 4
localhost statement/sql/insert 4
-localhost statement/sql/select 8
+localhost statement/sql/select 12
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -2835,174 +2984,185 @@ user4 not found
execute dump_waits_account;
user host event_name count_star
user1 localhost wait/io/file/sql/query_log 0
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
user2 localhost wait/io/file/sql/query_log 0
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
user3 localhost wait/io/file/sql/query_log 0
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
user4 localhost wait/io/file/sql/query_log 0
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_user;
user event_name count_star
user1 wait/io/file/sql/query_log 0
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
user1 wait/synch/rwlock/sql/LOCK_grant 0
user2 wait/io/file/sql/query_log 0
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
user2 wait/synch/rwlock/sql/LOCK_grant 0
user3 wait/io/file/sql/query_log 0
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
user3 wait/synch/rwlock/sql/LOCK_grant 0
user4 wait/io/file/sql/query_log 0
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
user4 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_host;
host event_name count_star
localhost wait/io/file/sql/query_log 0
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
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 6
-user1 localhost stage/sql/Init 6
-user1 localhost stage/sql/Init for update 1
-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
-user2 localhost stage/sql/Init for update 1
-user2 localhost stage/sql/Opening tables 3
-user3 localhost stage/sql/Checking permissions 3
-user3 localhost stage/sql/Closing tables 4
-user3 localhost stage/sql/Init 6
-user3 localhost stage/sql/Init for update 1
-user3 localhost stage/sql/Opening tables 3
-user4 localhost stage/sql/Checking permissions 3
-user4 localhost stage/sql/Closing tables 4
-user4 localhost stage/sql/Init 6
-user4 localhost stage/sql/Init for update 1
-user4 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/checking permissions 4
+user1 localhost stage/sql/closing tables 11
+user1 localhost stage/sql/init 3
+user1 localhost stage/sql/Opening tables 7
+user1 localhost stage/sql/starting 7
+user2 localhost stage/sql/checking permissions 4
+user2 localhost stage/sql/closing tables 10
+user2 localhost stage/sql/init 3
+user2 localhost stage/sql/Opening tables 6
+user2 localhost stage/sql/starting 7
+user3 localhost stage/sql/checking permissions 4
+user3 localhost stage/sql/closing tables 10
+user3 localhost stage/sql/init 3
+user3 localhost stage/sql/Opening tables 6
+user3 localhost stage/sql/starting 7
+user4 localhost stage/sql/checking permissions 4
+user4 localhost stage/sql/closing tables 10
+user4 localhost stage/sql/init 3
+user4 localhost stage/sql/Opening tables 6
+user4 localhost stage/sql/starting 7
execute dump_stages_user;
user event_name count_star
-user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 6
-user1 stage/sql/Init 6
-user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 4
-user2 stage/sql/Checking permissions 3
-user2 stage/sql/Closing tables 4
-user2 stage/sql/Init 6
-user2 stage/sql/Init for update 1
-user2 stage/sql/Opening tables 3
-user3 stage/sql/Checking permissions 3
-user3 stage/sql/Closing tables 4
-user3 stage/sql/Init 6
-user3 stage/sql/Init for update 1
-user3 stage/sql/Opening tables 3
-user4 stage/sql/Checking permissions 3
-user4 stage/sql/Closing tables 4
-user4 stage/sql/Init 6
-user4 stage/sql/Init for update 1
-user4 stage/sql/Opening tables 3
+user1 stage/sql/checking permissions 4
+user1 stage/sql/closing tables 11
+user1 stage/sql/init 3
+user1 stage/sql/Opening tables 7
+user1 stage/sql/starting 7
+user2 stage/sql/checking permissions 4
+user2 stage/sql/closing tables 10
+user2 stage/sql/init 3
+user2 stage/sql/Opening tables 6
+user2 stage/sql/starting 7
+user3 stage/sql/checking permissions 4
+user3 stage/sql/closing tables 10
+user3 stage/sql/init 3
+user3 stage/sql/Opening tables 6
+user3 stage/sql/starting 7
+user4 stage/sql/checking permissions 4
+user4 stage/sql/closing tables 10
+user4 stage/sql/init 3
+user4 stage/sql/Opening tables 6
+user4 stage/sql/starting 7
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 18
-localhost stage/sql/Init 24
-localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 13
+localhost stage/sql/checking permissions 16
+localhost stage/sql/closing tables 41
+localhost stage/sql/init 12
+localhost stage/sql/Opening tables 25
+localhost stage/sql/starting 28
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 1
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 1
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 1
+user3 localhost statement/sp/freturn 1
user3 localhost statement/sql/insert 1
-user3 localhost statement/sql/select 2
+user3 localhost statement/sql/select 3
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 1
+user4 localhost statement/sp/freturn 1
user4 localhost statement/sql/insert 1
-user4 localhost statement/sql/select 2
+user4 localhost statement/sql/select 3
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 1
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 1
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 1
+user3 statement/sp/freturn 1
user3 statement/sql/insert 1
-user3 statement/sql/select 2
+user3 statement/sql/select 3
user4 statement/com/Error 0
user4 statement/com/Quit 1
+user4 statement/sp/freturn 1
user4 statement/sql/insert 1
-user4 statement/sql/select 2
+user4 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 4
+localhost statement/sp/freturn 4
localhost statement/sql/insert 4
-localhost statement/sql/select 8
+localhost statement/sql/select 12
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -3035,174 +3195,185 @@ user4 not found
execute dump_waits_account;
user host event_name count_star
user1 localhost wait/io/file/sql/query_log 0
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
user2 localhost wait/io/file/sql/query_log 0
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
user3 localhost wait/io/file/sql/query_log 0
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
user4 localhost wait/io/file/sql/query_log 0
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_user;
user event_name count_star
user1 wait/io/file/sql/query_log 0
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
user1 wait/synch/rwlock/sql/LOCK_grant 0
user2 wait/io/file/sql/query_log 0
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
user2 wait/synch/rwlock/sql/LOCK_grant 0
user3 wait/io/file/sql/query_log 0
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
user3 wait/synch/rwlock/sql/LOCK_grant 0
user4 wait/io/file/sql/query_log 0
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
user4 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_host;
host event_name count_star
localhost wait/io/file/sql/query_log 0
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
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 6
-user1 localhost stage/sql/Init 6
-user1 localhost stage/sql/Init for update 1
-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
-user2 localhost stage/sql/Init for update 1
-user2 localhost stage/sql/Opening tables 3
-user3 localhost stage/sql/Checking permissions 3
-user3 localhost stage/sql/Closing tables 4
-user3 localhost stage/sql/Init 6
-user3 localhost stage/sql/Init for update 1
-user3 localhost stage/sql/Opening tables 3
-user4 localhost stage/sql/Checking permissions 3
-user4 localhost stage/sql/Closing tables 4
-user4 localhost stage/sql/Init 6
-user4 localhost stage/sql/Init for update 1
-user4 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/checking permissions 4
+user1 localhost stage/sql/closing tables 11
+user1 localhost stage/sql/init 3
+user1 localhost stage/sql/Opening tables 7
+user1 localhost stage/sql/starting 7
+user2 localhost stage/sql/checking permissions 4
+user2 localhost stage/sql/closing tables 10
+user2 localhost stage/sql/init 3
+user2 localhost stage/sql/Opening tables 6
+user2 localhost stage/sql/starting 7
+user3 localhost stage/sql/checking permissions 4
+user3 localhost stage/sql/closing tables 10
+user3 localhost stage/sql/init 3
+user3 localhost stage/sql/Opening tables 6
+user3 localhost stage/sql/starting 7
+user4 localhost stage/sql/checking permissions 4
+user4 localhost stage/sql/closing tables 10
+user4 localhost stage/sql/init 3
+user4 localhost stage/sql/Opening tables 6
+user4 localhost stage/sql/starting 7
execute dump_stages_user;
user event_name count_star
-user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 6
-user1 stage/sql/Init 6
-user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 4
-user2 stage/sql/Checking permissions 3
-user2 stage/sql/Closing tables 4
-user2 stage/sql/Init 6
-user2 stage/sql/Init for update 1
-user2 stage/sql/Opening tables 3
-user3 stage/sql/Checking permissions 3
-user3 stage/sql/Closing tables 4
-user3 stage/sql/Init 6
-user3 stage/sql/Init for update 1
-user3 stage/sql/Opening tables 3
-user4 stage/sql/Checking permissions 3
-user4 stage/sql/Closing tables 4
-user4 stage/sql/Init 6
-user4 stage/sql/Init for update 1
-user4 stage/sql/Opening tables 3
+user1 stage/sql/checking permissions 4
+user1 stage/sql/closing tables 11
+user1 stage/sql/init 3
+user1 stage/sql/Opening tables 7
+user1 stage/sql/starting 7
+user2 stage/sql/checking permissions 4
+user2 stage/sql/closing tables 10
+user2 stage/sql/init 3
+user2 stage/sql/Opening tables 6
+user2 stage/sql/starting 7
+user3 stage/sql/checking permissions 4
+user3 stage/sql/closing tables 10
+user3 stage/sql/init 3
+user3 stage/sql/Opening tables 6
+user3 stage/sql/starting 7
+user4 stage/sql/checking permissions 4
+user4 stage/sql/closing tables 10
+user4 stage/sql/init 3
+user4 stage/sql/Opening tables 6
+user4 stage/sql/starting 7
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 18
-localhost stage/sql/Init 24
-localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 13
+localhost stage/sql/checking permissions 16
+localhost stage/sql/closing tables 41
+localhost stage/sql/init 12
+localhost stage/sql/Opening tables 25
+localhost stage/sql/starting 28
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 1
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 1
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 1
+user3 localhost statement/sp/freturn 1
user3 localhost statement/sql/insert 1
-user3 localhost statement/sql/select 2
+user3 localhost statement/sql/select 3
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 1
+user4 localhost statement/sp/freturn 1
user4 localhost statement/sql/insert 1
-user4 localhost statement/sql/select 2
+user4 localhost statement/sql/select 3
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 1
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 1
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 1
+user3 statement/sp/freturn 1
user3 statement/sql/insert 1
-user3 statement/sql/select 2
+user3 statement/sql/select 3
user4 statement/com/Error 0
user4 statement/com/Quit 1
+user4 statement/sp/freturn 1
user4 statement/sql/insert 1
-user4 statement/sql/select 2
+user4 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 4
+localhost statement/sp/freturn 4
localhost statement/sql/insert 4
-localhost statement/sql/select 8
+localhost statement/sql/select 12
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -3235,174 +3406,185 @@ user4 not found
execute dump_waits_account;
user host event_name count_star
user1 localhost wait/io/file/sql/query_log 0
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
user2 localhost wait/io/file/sql/query_log 0
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
user3 localhost wait/io/file/sql/query_log 0
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
user4 localhost wait/io/file/sql/query_log 0
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_user;
user event_name count_star
user1 wait/io/file/sql/query_log 0
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
user1 wait/synch/rwlock/sql/LOCK_grant 0
user2 wait/io/file/sql/query_log 0
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
user2 wait/synch/rwlock/sql/LOCK_grant 0
user3 wait/io/file/sql/query_log 0
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
user3 wait/synch/rwlock/sql/LOCK_grant 0
user4 wait/io/file/sql/query_log 0
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
user4 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_host;
host event_name count_star
localhost wait/io/file/sql/query_log 0
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
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 6
-user1 localhost stage/sql/Init 6
-user1 localhost stage/sql/Init for update 1
-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
-user2 localhost stage/sql/Init for update 1
-user2 localhost stage/sql/Opening tables 3
-user3 localhost stage/sql/Checking permissions 3
-user3 localhost stage/sql/Closing tables 4
-user3 localhost stage/sql/Init 6
-user3 localhost stage/sql/Init for update 1
-user3 localhost stage/sql/Opening tables 3
-user4 localhost stage/sql/Checking permissions 3
-user4 localhost stage/sql/Closing tables 4
-user4 localhost stage/sql/Init 6
-user4 localhost stage/sql/Init for update 1
-user4 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/checking permissions 4
+user1 localhost stage/sql/closing tables 11
+user1 localhost stage/sql/init 3
+user1 localhost stage/sql/Opening tables 7
+user1 localhost stage/sql/starting 7
+user2 localhost stage/sql/checking permissions 4
+user2 localhost stage/sql/closing tables 10
+user2 localhost stage/sql/init 3
+user2 localhost stage/sql/Opening tables 6
+user2 localhost stage/sql/starting 7
+user3 localhost stage/sql/checking permissions 4
+user3 localhost stage/sql/closing tables 10
+user3 localhost stage/sql/init 3
+user3 localhost stage/sql/Opening tables 6
+user3 localhost stage/sql/starting 7
+user4 localhost stage/sql/checking permissions 4
+user4 localhost stage/sql/closing tables 10
+user4 localhost stage/sql/init 3
+user4 localhost stage/sql/Opening tables 6
+user4 localhost stage/sql/starting 7
execute dump_stages_user;
user event_name count_star
-user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 6
-user1 stage/sql/Init 6
-user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 4
-user2 stage/sql/Checking permissions 3
-user2 stage/sql/Closing tables 4
-user2 stage/sql/Init 6
-user2 stage/sql/Init for update 1
-user2 stage/sql/Opening tables 3
-user3 stage/sql/Checking permissions 3
-user3 stage/sql/Closing tables 4
-user3 stage/sql/Init 6
-user3 stage/sql/Init for update 1
-user3 stage/sql/Opening tables 3
-user4 stage/sql/Checking permissions 3
-user4 stage/sql/Closing tables 4
-user4 stage/sql/Init 6
-user4 stage/sql/Init for update 1
-user4 stage/sql/Opening tables 3
+user1 stage/sql/checking permissions 4
+user1 stage/sql/closing tables 11
+user1 stage/sql/init 3
+user1 stage/sql/Opening tables 7
+user1 stage/sql/starting 7
+user2 stage/sql/checking permissions 4
+user2 stage/sql/closing tables 10
+user2 stage/sql/init 3
+user2 stage/sql/Opening tables 6
+user2 stage/sql/starting 7
+user3 stage/sql/checking permissions 4
+user3 stage/sql/closing tables 10
+user3 stage/sql/init 3
+user3 stage/sql/Opening tables 6
+user3 stage/sql/starting 7
+user4 stage/sql/checking permissions 4
+user4 stage/sql/closing tables 10
+user4 stage/sql/init 3
+user4 stage/sql/Opening tables 6
+user4 stage/sql/starting 7
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 18
-localhost stage/sql/Init 24
-localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 13
+localhost stage/sql/checking permissions 16
+localhost stage/sql/closing tables 41
+localhost stage/sql/init 12
+localhost stage/sql/Opening tables 25
+localhost stage/sql/starting 28
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 1
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 1
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 1
+user3 localhost statement/sp/freturn 1
user3 localhost statement/sql/insert 1
-user3 localhost statement/sql/select 2
+user3 localhost statement/sql/select 3
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 1
+user4 localhost statement/sp/freturn 1
user4 localhost statement/sql/insert 1
-user4 localhost statement/sql/select 2
+user4 localhost statement/sql/select 3
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 1
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 1
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 1
+user3 statement/sp/freturn 1
user3 statement/sql/insert 1
-user3 statement/sql/select 2
+user3 statement/sql/select 3
user4 statement/com/Error 0
user4 statement/com/Quit 1
+user4 statement/sp/freturn 1
user4 statement/sql/insert 1
-user4 statement/sql/select 2
+user4 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 4
+localhost statement/sp/freturn 4
localhost statement/sql/insert 4
-localhost statement/sql/select 8
+localhost statement/sql/select 12
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -3435,174 +3617,185 @@ user4 not found
execute dump_waits_account;
user host event_name count_star
user1 localhost wait/io/file/sql/query_log 0
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
user2 localhost wait/io/file/sql/query_log 0
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
user3 localhost wait/io/file/sql/query_log 0
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
user4 localhost wait/io/file/sql/query_log 0
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_user;
user event_name count_star
user1 wait/io/file/sql/query_log 0
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
user1 wait/synch/rwlock/sql/LOCK_grant 0
user2 wait/io/file/sql/query_log 0
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
user2 wait/synch/rwlock/sql/LOCK_grant 0
user3 wait/io/file/sql/query_log 0
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
user3 wait/synch/rwlock/sql/LOCK_grant 0
user4 wait/io/file/sql/query_log 0
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
user4 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_host;
host event_name count_star
localhost wait/io/file/sql/query_log 0
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
-user1 localhost stage/sql/Checking permissions 0
-user1 localhost stage/sql/Closing tables 0
-user1 localhost stage/sql/Init 0
-user1 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
user1 localhost stage/sql/Opening tables 0
-user2 localhost stage/sql/Checking permissions 0
-user2 localhost stage/sql/Closing tables 0
-user2 localhost stage/sql/Init 0
-user2 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/starting 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
user2 localhost stage/sql/Opening tables 0
-user3 localhost stage/sql/Checking permissions 0
-user3 localhost stage/sql/Closing tables 0
-user3 localhost stage/sql/Init 0
-user3 localhost stage/sql/Init for update 0
+user2 localhost stage/sql/starting 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
user3 localhost stage/sql/Opening tables 0
-user4 localhost stage/sql/Checking permissions 0
-user4 localhost stage/sql/Closing tables 0
-user4 localhost stage/sql/Init 0
-user4 localhost stage/sql/Init for update 0
+user3 localhost stage/sql/starting 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
user4 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/starting 0
execute dump_stages_user;
user event_name count_star
-user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 6
-user1 stage/sql/Init 6
-user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 4
-user2 stage/sql/Checking permissions 3
-user2 stage/sql/Closing tables 4
-user2 stage/sql/Init 6
-user2 stage/sql/Init for update 1
-user2 stage/sql/Opening tables 3
-user3 stage/sql/Checking permissions 3
-user3 stage/sql/Closing tables 4
-user3 stage/sql/Init 6
-user3 stage/sql/Init for update 1
-user3 stage/sql/Opening tables 3
-user4 stage/sql/Checking permissions 3
-user4 stage/sql/Closing tables 4
-user4 stage/sql/Init 6
-user4 stage/sql/Init for update 1
-user4 stage/sql/Opening tables 3
+user1 stage/sql/checking permissions 4
+user1 stage/sql/closing tables 11
+user1 stage/sql/init 3
+user1 stage/sql/Opening tables 7
+user1 stage/sql/starting 7
+user2 stage/sql/checking permissions 4
+user2 stage/sql/closing tables 10
+user2 stage/sql/init 3
+user2 stage/sql/Opening tables 6
+user2 stage/sql/starting 7
+user3 stage/sql/checking permissions 4
+user3 stage/sql/closing tables 10
+user3 stage/sql/init 3
+user3 stage/sql/Opening tables 6
+user3 stage/sql/starting 7
+user4 stage/sql/checking permissions 4
+user4 stage/sql/closing tables 10
+user4 stage/sql/init 3
+user4 stage/sql/Opening tables 6
+user4 stage/sql/starting 7
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 18
-localhost stage/sql/Init 24
-localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 13
+localhost stage/sql/checking permissions 16
+localhost stage/sql/closing tables 41
+localhost stage/sql/init 12
+localhost stage/sql/Opening tables 25
+localhost stage/sql/starting 28
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 1
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 1
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 1
+user3 localhost statement/sp/freturn 1
user3 localhost statement/sql/insert 1
-user3 localhost statement/sql/select 2
+user3 localhost statement/sql/select 3
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 1
+user4 localhost statement/sp/freturn 1
user4 localhost statement/sql/insert 1
-user4 localhost statement/sql/select 2
+user4 localhost statement/sql/select 3
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 1
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 1
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 1
+user3 statement/sp/freturn 1
user3 statement/sql/insert 1
-user3 statement/sql/select 2
+user3 statement/sql/select 3
user4 statement/com/Error 0
user4 statement/com/Quit 1
+user4 statement/sp/freturn 1
user4 statement/sql/insert 1
-user4 statement/sql/select 2
+user4 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 4
+localhost statement/sp/freturn 4
localhost statement/sql/insert 4
-localhost statement/sql/select 8
+localhost statement/sql/select 12
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -3635,174 +3828,185 @@ user4 not found
execute dump_waits_account;
user host event_name count_star
user1 localhost wait/io/file/sql/query_log 0
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
user2 localhost wait/io/file/sql/query_log 0
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
user3 localhost wait/io/file/sql/query_log 0
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
user4 localhost wait/io/file/sql/query_log 0
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_user;
user event_name count_star
user1 wait/io/file/sql/query_log 0
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
user1 wait/synch/rwlock/sql/LOCK_grant 0
user2 wait/io/file/sql/query_log 0
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
user2 wait/synch/rwlock/sql/LOCK_grant 0
user3 wait/io/file/sql/query_log 0
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
user3 wait/synch/rwlock/sql/LOCK_grant 0
user4 wait/io/file/sql/query_log 0
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
user4 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_host;
host event_name count_star
localhost wait/io/file/sql/query_log 0
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
-user1 localhost stage/sql/Checking permissions 0
-user1 localhost stage/sql/Closing tables 0
-user1 localhost stage/sql/Init 0
-user1 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
user1 localhost stage/sql/Opening tables 0
-user2 localhost stage/sql/Checking permissions 0
-user2 localhost stage/sql/Closing tables 0
-user2 localhost stage/sql/Init 0
-user2 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/starting 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
user2 localhost stage/sql/Opening tables 0
-user3 localhost stage/sql/Checking permissions 0
-user3 localhost stage/sql/Closing tables 0
-user3 localhost stage/sql/Init 0
-user3 localhost stage/sql/Init for update 0
+user2 localhost stage/sql/starting 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
user3 localhost stage/sql/Opening tables 0
-user4 localhost stage/sql/Checking permissions 0
-user4 localhost stage/sql/Closing tables 0
-user4 localhost stage/sql/Init 0
-user4 localhost stage/sql/Init for update 0
+user3 localhost stage/sql/starting 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
user4 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/starting 0
execute dump_stages_user;
user event_name count_star
-user1 stage/sql/Checking permissions 0
-user1 stage/sql/Closing tables 0
-user1 stage/sql/Init 0
-user1 stage/sql/Init for update 0
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
user1 stage/sql/Opening tables 0
-user2 stage/sql/Checking permissions 0
-user2 stage/sql/Closing tables 0
-user2 stage/sql/Init 0
-user2 stage/sql/Init for update 0
+user1 stage/sql/starting 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
user2 stage/sql/Opening tables 0
-user3 stage/sql/Checking permissions 0
-user3 stage/sql/Closing tables 0
-user3 stage/sql/Init 0
-user3 stage/sql/Init for update 0
+user2 stage/sql/starting 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
user3 stage/sql/Opening tables 0
-user4 stage/sql/Checking permissions 0
-user4 stage/sql/Closing tables 0
-user4 stage/sql/Init 0
-user4 stage/sql/Init for update 0
+user3 stage/sql/starting 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
user4 stage/sql/Opening tables 0
+user4 stage/sql/starting 0
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 18
-localhost stage/sql/Init 24
-localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 13
+localhost stage/sql/checking permissions 16
+localhost stage/sql/closing tables 41
+localhost stage/sql/init 12
+localhost stage/sql/Opening tables 25
+localhost stage/sql/starting 28
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 1
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 1
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 1
+user3 localhost statement/sp/freturn 1
user3 localhost statement/sql/insert 1
-user3 localhost statement/sql/select 2
+user3 localhost statement/sql/select 3
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 1
+user4 localhost statement/sp/freturn 1
user4 localhost statement/sql/insert 1
-user4 localhost statement/sql/select 2
+user4 localhost statement/sql/select 3
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 1
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 1
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 1
+user3 statement/sp/freturn 1
user3 statement/sql/insert 1
-user3 statement/sql/select 2
+user3 statement/sql/select 3
user4 statement/com/Error 0
user4 statement/com/Quit 1
+user4 statement/sp/freturn 1
user4 statement/sql/insert 1
-user4 statement/sql/select 2
+user4 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 4
+localhost statement/sp/freturn 4
localhost statement/sql/insert 4
-localhost statement/sql/select 8
+localhost statement/sql/select 12
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -3835,174 +4039,185 @@ user4 not found
execute dump_waits_account;
user host event_name count_star
user1 localhost wait/io/file/sql/query_log 0
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
user2 localhost wait/io/file/sql/query_log 0
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
user3 localhost wait/io/file/sql/query_log 0
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
user4 localhost wait/io/file/sql/query_log 0
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_user;
user event_name count_star
user1 wait/io/file/sql/query_log 0
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
user1 wait/synch/rwlock/sql/LOCK_grant 0
user2 wait/io/file/sql/query_log 0
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
user2 wait/synch/rwlock/sql/LOCK_grant 0
user3 wait/io/file/sql/query_log 0
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
user3 wait/synch/rwlock/sql/LOCK_grant 0
user4 wait/io/file/sql/query_log 0
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
user4 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_host;
host event_name count_star
localhost wait/io/file/sql/query_log 0
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
-user1 localhost stage/sql/Checking permissions 0
-user1 localhost stage/sql/Closing tables 0
-user1 localhost stage/sql/Init 0
-user1 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
user1 localhost stage/sql/Opening tables 0
-user2 localhost stage/sql/Checking permissions 0
-user2 localhost stage/sql/Closing tables 0
-user2 localhost stage/sql/Init 0
-user2 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/starting 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
user2 localhost stage/sql/Opening tables 0
-user3 localhost stage/sql/Checking permissions 0
-user3 localhost stage/sql/Closing tables 0
-user3 localhost stage/sql/Init 0
-user3 localhost stage/sql/Init for update 0
+user2 localhost stage/sql/starting 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
user3 localhost stage/sql/Opening tables 0
-user4 localhost stage/sql/Checking permissions 0
-user4 localhost stage/sql/Closing tables 0
-user4 localhost stage/sql/Init 0
-user4 localhost stage/sql/Init for update 0
+user3 localhost stage/sql/starting 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
user4 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/starting 0
execute dump_stages_user;
user event_name count_star
-user1 stage/sql/Checking permissions 0
-user1 stage/sql/Closing tables 0
-user1 stage/sql/Init 0
-user1 stage/sql/Init for update 0
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
user1 stage/sql/Opening tables 0
-user2 stage/sql/Checking permissions 0
-user2 stage/sql/Closing tables 0
-user2 stage/sql/Init 0
-user2 stage/sql/Init for update 0
+user1 stage/sql/starting 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
user2 stage/sql/Opening tables 0
-user3 stage/sql/Checking permissions 0
-user3 stage/sql/Closing tables 0
-user3 stage/sql/Init 0
-user3 stage/sql/Init for update 0
+user2 stage/sql/starting 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
user3 stage/sql/Opening tables 0
-user4 stage/sql/Checking permissions 0
-user4 stage/sql/Closing tables 0
-user4 stage/sql/Init 0
-user4 stage/sql/Init for update 0
+user3 stage/sql/starting 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
user4 stage/sql/Opening tables 0
+user4 stage/sql/starting 0
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 0
-localhost stage/sql/Closing tables 0
-localhost stage/sql/Init 0
-localhost stage/sql/Init for update 0
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
localhost stage/sql/Opening tables 0
+localhost stage/sql/starting 0
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 1
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 1
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 1
+user3 localhost statement/sp/freturn 1
user3 localhost statement/sql/insert 1
-user3 localhost statement/sql/select 2
+user3 localhost statement/sql/select 3
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 1
+user4 localhost statement/sp/freturn 1
user4 localhost statement/sql/insert 1
-user4 localhost statement/sql/select 2
+user4 localhost statement/sql/select 3
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 1
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 1
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 1
+user3 statement/sp/freturn 1
user3 statement/sql/insert 1
-user3 statement/sql/select 2
+user3 statement/sql/select 3
user4 statement/com/Error 0
user4 statement/com/Quit 1
+user4 statement/sp/freturn 1
user4 statement/sql/insert 1
-user4 statement/sql/select 2
+user4 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 4
+localhost statement/sp/freturn 4
localhost statement/sql/insert 4
-localhost statement/sql/select 8
+localhost statement/sql/select 12
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -4035,174 +4250,185 @@ user4 not found
execute dump_waits_account;
user host event_name count_star
user1 localhost wait/io/file/sql/query_log 0
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
user2 localhost wait/io/file/sql/query_log 0
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
user3 localhost wait/io/file/sql/query_log 0
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
user4 localhost wait/io/file/sql/query_log 0
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_user;
user event_name count_star
user1 wait/io/file/sql/query_log 0
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
user1 wait/synch/rwlock/sql/LOCK_grant 0
user2 wait/io/file/sql/query_log 0
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
user2 wait/synch/rwlock/sql/LOCK_grant 0
user3 wait/io/file/sql/query_log 0
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
user3 wait/synch/rwlock/sql/LOCK_grant 0
user4 wait/io/file/sql/query_log 0
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
user4 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_host;
host event_name count_star
localhost wait/io/file/sql/query_log 0
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
-user1 localhost stage/sql/Checking permissions 0
-user1 localhost stage/sql/Closing tables 0
-user1 localhost stage/sql/Init 0
-user1 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
user1 localhost stage/sql/Opening tables 0
-user2 localhost stage/sql/Checking permissions 0
-user2 localhost stage/sql/Closing tables 0
-user2 localhost stage/sql/Init 0
-user2 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/starting 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
user2 localhost stage/sql/Opening tables 0
-user3 localhost stage/sql/Checking permissions 0
-user3 localhost stage/sql/Closing tables 0
-user3 localhost stage/sql/Init 0
-user3 localhost stage/sql/Init for update 0
+user2 localhost stage/sql/starting 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
user3 localhost stage/sql/Opening tables 0
-user4 localhost stage/sql/Checking permissions 0
-user4 localhost stage/sql/Closing tables 0
-user4 localhost stage/sql/Init 0
-user4 localhost stage/sql/Init for update 0
+user3 localhost stage/sql/starting 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
user4 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/starting 0
execute dump_stages_user;
user event_name count_star
-user1 stage/sql/Checking permissions 0
-user1 stage/sql/Closing tables 0
-user1 stage/sql/Init 0
-user1 stage/sql/Init for update 0
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
user1 stage/sql/Opening tables 0
-user2 stage/sql/Checking permissions 0
-user2 stage/sql/Closing tables 0
-user2 stage/sql/Init 0
-user2 stage/sql/Init for update 0
+user1 stage/sql/starting 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
user2 stage/sql/Opening tables 0
-user3 stage/sql/Checking permissions 0
-user3 stage/sql/Closing tables 0
-user3 stage/sql/Init 0
-user3 stage/sql/Init for update 0
+user2 stage/sql/starting 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
user3 stage/sql/Opening tables 0
-user4 stage/sql/Checking permissions 0
-user4 stage/sql/Closing tables 0
-user4 stage/sql/Init 0
-user4 stage/sql/Init for update 0
+user3 stage/sql/starting 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
user4 stage/sql/Opening tables 0
+user4 stage/sql/starting 0
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 0
-localhost stage/sql/Closing tables 0
-localhost stage/sql/Init 0
-localhost stage/sql/Init for update 0
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
localhost stage/sql/Opening tables 0
+localhost stage/sql/starting 0
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 1
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 1
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 1
+user3 localhost statement/sp/freturn 1
user3 localhost statement/sql/insert 1
-user3 localhost statement/sql/select 2
+user3 localhost statement/sql/select 3
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 1
+user4 localhost statement/sp/freturn 1
user4 localhost statement/sql/insert 1
-user4 localhost statement/sql/select 2
+user4 localhost statement/sql/select 3
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 1
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 1
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 1
+user3 statement/sp/freturn 1
user3 statement/sql/insert 1
-user3 statement/sql/select 2
+user3 statement/sql/select 3
user4 statement/com/Error 0
user4 statement/com/Quit 1
+user4 statement/sp/freturn 1
user4 statement/sql/insert 1
-user4 statement/sql/select 2
+user4 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 4
+localhost statement/sp/freturn 4
localhost statement/sql/insert 4
-localhost statement/sql/select 8
+localhost statement/sql/select 12
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -4235,174 +4461,185 @@ user4 not found
execute dump_waits_account;
user host event_name count_star
user1 localhost wait/io/file/sql/query_log 0
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
user2 localhost wait/io/file/sql/query_log 0
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
user3 localhost wait/io/file/sql/query_log 0
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
user4 localhost wait/io/file/sql/query_log 0
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_user;
user event_name count_star
user1 wait/io/file/sql/query_log 0
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
user1 wait/synch/rwlock/sql/LOCK_grant 0
user2 wait/io/file/sql/query_log 0
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
user2 wait/synch/rwlock/sql/LOCK_grant 0
user3 wait/io/file/sql/query_log 0
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
user3 wait/synch/rwlock/sql/LOCK_grant 0
user4 wait/io/file/sql/query_log 0
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
user4 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_host;
host event_name count_star
localhost wait/io/file/sql/query_log 0
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
-user1 localhost stage/sql/Checking permissions 0
-user1 localhost stage/sql/Closing tables 0
-user1 localhost stage/sql/Init 0
-user1 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
user1 localhost stage/sql/Opening tables 0
-user2 localhost stage/sql/Checking permissions 0
-user2 localhost stage/sql/Closing tables 0
-user2 localhost stage/sql/Init 0
-user2 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/starting 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
user2 localhost stage/sql/Opening tables 0
-user3 localhost stage/sql/Checking permissions 0
-user3 localhost stage/sql/Closing tables 0
-user3 localhost stage/sql/Init 0
-user3 localhost stage/sql/Init for update 0
+user2 localhost stage/sql/starting 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
user3 localhost stage/sql/Opening tables 0
-user4 localhost stage/sql/Checking permissions 0
-user4 localhost stage/sql/Closing tables 0
-user4 localhost stage/sql/Init 0
-user4 localhost stage/sql/Init for update 0
+user3 localhost stage/sql/starting 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
user4 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/starting 0
execute dump_stages_user;
user event_name count_star
-user1 stage/sql/Checking permissions 0
-user1 stage/sql/Closing tables 0
-user1 stage/sql/Init 0
-user1 stage/sql/Init for update 0
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
user1 stage/sql/Opening tables 0
-user2 stage/sql/Checking permissions 0
-user2 stage/sql/Closing tables 0
-user2 stage/sql/Init 0
-user2 stage/sql/Init for update 0
+user1 stage/sql/starting 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
user2 stage/sql/Opening tables 0
-user3 stage/sql/Checking permissions 0
-user3 stage/sql/Closing tables 0
-user3 stage/sql/Init 0
-user3 stage/sql/Init for update 0
+user2 stage/sql/starting 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
user3 stage/sql/Opening tables 0
-user4 stage/sql/Checking permissions 0
-user4 stage/sql/Closing tables 0
-user4 stage/sql/Init 0
-user4 stage/sql/Init for update 0
+user3 stage/sql/starting 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
user4 stage/sql/Opening tables 0
+user4 stage/sql/starting 0
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 0
-localhost stage/sql/Closing tables 0
-localhost stage/sql/Init 0
-localhost stage/sql/Init for update 0
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
localhost stage/sql/Opening tables 0
+localhost stage/sql/starting 0
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 1
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 1
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 1
+user3 localhost statement/sp/freturn 1
user3 localhost statement/sql/insert 1
-user3 localhost statement/sql/select 2
+user3 localhost statement/sql/select 3
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 1
+user4 localhost statement/sp/freturn 1
user4 localhost statement/sql/insert 1
-user4 localhost statement/sql/select 2
+user4 localhost statement/sql/select 3
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 1
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 1
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 1
+user3 statement/sp/freturn 1
user3 statement/sql/insert 1
-user3 statement/sql/select 2
+user3 statement/sql/select 3
user4 statement/com/Error 0
user4 statement/com/Quit 1
+user4 statement/sp/freturn 1
user4 statement/sql/insert 1
-user4 statement/sql/select 2
+user4 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 4
+localhost statement/sp/freturn 4
localhost statement/sql/insert 4
-localhost statement/sql/select 8
+localhost statement/sql/select 12
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -4435,174 +4672,185 @@ user4 not found
execute dump_waits_account;
user host event_name count_star
user1 localhost wait/io/file/sql/query_log 0
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
user2 localhost wait/io/file/sql/query_log 0
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
user3 localhost wait/io/file/sql/query_log 0
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
user4 localhost wait/io/file/sql/query_log 0
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_user;
user event_name count_star
user1 wait/io/file/sql/query_log 0
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
user1 wait/synch/rwlock/sql/LOCK_grant 0
user2 wait/io/file/sql/query_log 0
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
user2 wait/synch/rwlock/sql/LOCK_grant 0
user3 wait/io/file/sql/query_log 0
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
user3 wait/synch/rwlock/sql/LOCK_grant 0
user4 wait/io/file/sql/query_log 0
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
user4 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_host;
host event_name count_star
localhost wait/io/file/sql/query_log 0
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
-user1 localhost stage/sql/Checking permissions 0
-user1 localhost stage/sql/Closing tables 0
-user1 localhost stage/sql/Init 0
-user1 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
user1 localhost stage/sql/Opening tables 0
-user2 localhost stage/sql/Checking permissions 0
-user2 localhost stage/sql/Closing tables 0
-user2 localhost stage/sql/Init 0
-user2 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/starting 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
user2 localhost stage/sql/Opening tables 0
-user3 localhost stage/sql/Checking permissions 0
-user3 localhost stage/sql/Closing tables 0
-user3 localhost stage/sql/Init 0
-user3 localhost stage/sql/Init for update 0
+user2 localhost stage/sql/starting 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
user3 localhost stage/sql/Opening tables 0
-user4 localhost stage/sql/Checking permissions 0
-user4 localhost stage/sql/Closing tables 0
-user4 localhost stage/sql/Init 0
-user4 localhost stage/sql/Init for update 0
+user3 localhost stage/sql/starting 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
user4 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/starting 0
execute dump_stages_user;
user event_name count_star
-user1 stage/sql/Checking permissions 0
-user1 stage/sql/Closing tables 0
-user1 stage/sql/Init 0
-user1 stage/sql/Init for update 0
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
user1 stage/sql/Opening tables 0
-user2 stage/sql/Checking permissions 0
-user2 stage/sql/Closing tables 0
-user2 stage/sql/Init 0
-user2 stage/sql/Init for update 0
+user1 stage/sql/starting 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
user2 stage/sql/Opening tables 0
-user3 stage/sql/Checking permissions 0
-user3 stage/sql/Closing tables 0
-user3 stage/sql/Init 0
-user3 stage/sql/Init for update 0
+user2 stage/sql/starting 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
user3 stage/sql/Opening tables 0
-user4 stage/sql/Checking permissions 0
-user4 stage/sql/Closing tables 0
-user4 stage/sql/Init 0
-user4 stage/sql/Init for update 0
+user3 stage/sql/starting 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
user4 stage/sql/Opening tables 0
+user4 stage/sql/starting 0
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 0
-localhost stage/sql/Closing tables 0
-localhost stage/sql/Init 0
-localhost stage/sql/Init for update 0
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
localhost stage/sql/Opening tables 0
+localhost stage/sql/starting 0
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 0
+user1 localhost statement/sp/freturn 0
user1 localhost statement/sql/insert 0
user1 localhost statement/sql/select 0
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 0
+user2 localhost statement/sp/freturn 0
user2 localhost statement/sql/insert 0
user2 localhost statement/sql/select 0
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 0
+user3 localhost statement/sp/freturn 0
user3 localhost statement/sql/insert 0
user3 localhost statement/sql/select 0
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 0
+user4 localhost statement/sp/freturn 0
user4 localhost statement/sql/insert 0
user4 localhost statement/sql/select 0
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 1
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 1
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 1
+user3 statement/sp/freturn 1
user3 statement/sql/insert 1
-user3 statement/sql/select 2
+user3 statement/sql/select 3
user4 statement/com/Error 0
user4 statement/com/Quit 1
+user4 statement/sp/freturn 1
user4 statement/sql/insert 1
-user4 statement/sql/select 2
+user4 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 4
+localhost statement/sp/freturn 4
localhost statement/sql/insert 4
-localhost statement/sql/select 8
+localhost statement/sql/select 12
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -4635,174 +4883,185 @@ user4 not found
execute dump_waits_account;
user host event_name count_star
user1 localhost wait/io/file/sql/query_log 0
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
user2 localhost wait/io/file/sql/query_log 0
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
user3 localhost wait/io/file/sql/query_log 0
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
user4 localhost wait/io/file/sql/query_log 0
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_user;
user event_name count_star
user1 wait/io/file/sql/query_log 0
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
user1 wait/synch/rwlock/sql/LOCK_grant 0
user2 wait/io/file/sql/query_log 0
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
user2 wait/synch/rwlock/sql/LOCK_grant 0
user3 wait/io/file/sql/query_log 0
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
user3 wait/synch/rwlock/sql/LOCK_grant 0
user4 wait/io/file/sql/query_log 0
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
user4 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_host;
host event_name count_star
localhost wait/io/file/sql/query_log 0
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
-user1 localhost stage/sql/Checking permissions 0
-user1 localhost stage/sql/Closing tables 0
-user1 localhost stage/sql/Init 0
-user1 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
user1 localhost stage/sql/Opening tables 0
-user2 localhost stage/sql/Checking permissions 0
-user2 localhost stage/sql/Closing tables 0
-user2 localhost stage/sql/Init 0
-user2 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/starting 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
user2 localhost stage/sql/Opening tables 0
-user3 localhost stage/sql/Checking permissions 0
-user3 localhost stage/sql/Closing tables 0
-user3 localhost stage/sql/Init 0
-user3 localhost stage/sql/Init for update 0
+user2 localhost stage/sql/starting 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
user3 localhost stage/sql/Opening tables 0
-user4 localhost stage/sql/Checking permissions 0
-user4 localhost stage/sql/Closing tables 0
-user4 localhost stage/sql/Init 0
-user4 localhost stage/sql/Init for update 0
+user3 localhost stage/sql/starting 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
user4 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/starting 0
execute dump_stages_user;
user event_name count_star
-user1 stage/sql/Checking permissions 0
-user1 stage/sql/Closing tables 0
-user1 stage/sql/Init 0
-user1 stage/sql/Init for update 0
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
user1 stage/sql/Opening tables 0
-user2 stage/sql/Checking permissions 0
-user2 stage/sql/Closing tables 0
-user2 stage/sql/Init 0
-user2 stage/sql/Init for update 0
+user1 stage/sql/starting 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
user2 stage/sql/Opening tables 0
-user3 stage/sql/Checking permissions 0
-user3 stage/sql/Closing tables 0
-user3 stage/sql/Init 0
-user3 stage/sql/Init for update 0
+user2 stage/sql/starting 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
user3 stage/sql/Opening tables 0
-user4 stage/sql/Checking permissions 0
-user4 stage/sql/Closing tables 0
-user4 stage/sql/Init 0
-user4 stage/sql/Init for update 0
+user3 stage/sql/starting 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
user4 stage/sql/Opening tables 0
+user4 stage/sql/starting 0
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 0
-localhost stage/sql/Closing tables 0
-localhost stage/sql/Init 0
-localhost stage/sql/Init for update 0
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
localhost stage/sql/Opening tables 0
+localhost stage/sql/starting 0
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 0
+user1 localhost statement/sp/freturn 0
user1 localhost statement/sql/insert 0
user1 localhost statement/sql/select 0
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 0
+user2 localhost statement/sp/freturn 0
user2 localhost statement/sql/insert 0
user2 localhost statement/sql/select 0
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 0
+user3 localhost statement/sp/freturn 0
user3 localhost statement/sql/insert 0
user3 localhost statement/sql/select 0
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 0
+user4 localhost statement/sp/freturn 0
user4 localhost statement/sql/insert 0
user4 localhost statement/sql/select 0
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 0
+user1 statement/sp/freturn 0
user1 statement/sql/insert 0
user1 statement/sql/select 0
user2 statement/com/Error 0
user2 statement/com/Quit 0
+user2 statement/sp/freturn 0
user2 statement/sql/insert 0
user2 statement/sql/select 0
user3 statement/com/Error 0
user3 statement/com/Quit 0
+user3 statement/sp/freturn 0
user3 statement/sql/insert 0
user3 statement/sql/select 0
user4 statement/com/Error 0
user4 statement/com/Quit 0
+user4 statement/sp/freturn 0
user4 statement/sql/insert 0
user4 statement/sql/select 0
execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 4
+localhost statement/sp/freturn 4
localhost statement/sql/insert 4
-localhost statement/sql/select 8
+localhost statement/sql/select 12
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -4835,174 +5094,185 @@ user4 not found
execute dump_waits_account;
user host event_name count_star
user1 localhost wait/io/file/sql/query_log 0
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
user2 localhost wait/io/file/sql/query_log 0
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
user3 localhost wait/io/file/sql/query_log 0
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
user4 localhost wait/io/file/sql/query_log 0
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_user;
user event_name count_star
user1 wait/io/file/sql/query_log 0
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
user1 wait/synch/rwlock/sql/LOCK_grant 0
user2 wait/io/file/sql/query_log 0
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
user2 wait/synch/rwlock/sql/LOCK_grant 0
user3 wait/io/file/sql/query_log 0
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
user3 wait/synch/rwlock/sql/LOCK_grant 0
user4 wait/io/file/sql/query_log 0
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
user4 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_host;
host event_name count_star
localhost wait/io/file/sql/query_log 0
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
-user1 localhost stage/sql/Checking permissions 0
-user1 localhost stage/sql/Closing tables 0
-user1 localhost stage/sql/Init 0
-user1 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
user1 localhost stage/sql/Opening tables 0
-user2 localhost stage/sql/Checking permissions 0
-user2 localhost stage/sql/Closing tables 0
-user2 localhost stage/sql/Init 0
-user2 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/starting 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
user2 localhost stage/sql/Opening tables 0
-user3 localhost stage/sql/Checking permissions 0
-user3 localhost stage/sql/Closing tables 0
-user3 localhost stage/sql/Init 0
-user3 localhost stage/sql/Init for update 0
+user2 localhost stage/sql/starting 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
user3 localhost stage/sql/Opening tables 0
-user4 localhost stage/sql/Checking permissions 0
-user4 localhost stage/sql/Closing tables 0
-user4 localhost stage/sql/Init 0
-user4 localhost stage/sql/Init for update 0
+user3 localhost stage/sql/starting 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
user4 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/starting 0
execute dump_stages_user;
user event_name count_star
-user1 stage/sql/Checking permissions 0
-user1 stage/sql/Closing tables 0
-user1 stage/sql/Init 0
-user1 stage/sql/Init for update 0
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
user1 stage/sql/Opening tables 0
-user2 stage/sql/Checking permissions 0
-user2 stage/sql/Closing tables 0
-user2 stage/sql/Init 0
-user2 stage/sql/Init for update 0
+user1 stage/sql/starting 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
user2 stage/sql/Opening tables 0
-user3 stage/sql/Checking permissions 0
-user3 stage/sql/Closing tables 0
-user3 stage/sql/Init 0
-user3 stage/sql/Init for update 0
+user2 stage/sql/starting 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
user3 stage/sql/Opening tables 0
-user4 stage/sql/Checking permissions 0
-user4 stage/sql/Closing tables 0
-user4 stage/sql/Init 0
-user4 stage/sql/Init for update 0
+user3 stage/sql/starting 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
user4 stage/sql/Opening tables 0
+user4 stage/sql/starting 0
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 0
-localhost stage/sql/Closing tables 0
-localhost stage/sql/Init 0
-localhost stage/sql/Init for update 0
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
localhost stage/sql/Opening tables 0
+localhost stage/sql/starting 0
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 0
+user1 localhost statement/sp/freturn 0
user1 localhost statement/sql/insert 0
user1 localhost statement/sql/select 0
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 0
+user2 localhost statement/sp/freturn 0
user2 localhost statement/sql/insert 0
user2 localhost statement/sql/select 0
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 0
+user3 localhost statement/sp/freturn 0
user3 localhost statement/sql/insert 0
user3 localhost statement/sql/select 0
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 0
+user4 localhost statement/sp/freturn 0
user4 localhost statement/sql/insert 0
user4 localhost statement/sql/select 0
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 0
+user1 statement/sp/freturn 0
user1 statement/sql/insert 0
user1 statement/sql/select 0
user2 statement/com/Error 0
user2 statement/com/Quit 0
+user2 statement/sp/freturn 0
user2 statement/sql/insert 0
user2 statement/sql/select 0
user3 statement/com/Error 0
user3 statement/com/Quit 0
+user3 statement/sp/freturn 0
user3 statement/sql/insert 0
user3 statement/sql/select 0
user4 statement/com/Error 0
user4 statement/com/Quit 0
+user4 statement/sp/freturn 0
user4 statement/sql/insert 0
user4 statement/sql/select 0
execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 0
+localhost statement/sp/freturn 0
localhost statement/sql/insert 0
localhost statement/sql/select 0
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -5035,174 +5305,1240 @@ user4 not found
execute dump_waits_account;
user host event_name count_star
user1 localhost wait/io/file/sql/query_log 0
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
user2 localhost wait/io/file/sql/query_log 0
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
user3 localhost wait/io/file/sql/query_log 0
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
user4 localhost wait/io/file/sql/query_log 0
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_user;
user event_name count_star
user1 wait/io/file/sql/query_log 0
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
user1 wait/synch/rwlock/sql/LOCK_grant 0
user2 wait/io/file/sql/query_log 0
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
user2 wait/synch/rwlock/sql/LOCK_grant 0
user3 wait/io/file/sql/query_log 0
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
user3 wait/synch/rwlock/sql/LOCK_grant 0
user4 wait/io/file/sql/query_log 0
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
user4 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_host;
host event_name count_star
localhost wait/io/file/sql/query_log 0
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
-user1 localhost stage/sql/Checking permissions 0
-user1 localhost stage/sql/Closing tables 0
-user1 localhost stage/sql/Init 0
-user1 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
user1 localhost stage/sql/Opening tables 0
-user2 localhost stage/sql/Checking permissions 0
-user2 localhost stage/sql/Closing tables 0
-user2 localhost stage/sql/Init 0
-user2 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/starting 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
user2 localhost stage/sql/Opening tables 0
-user3 localhost stage/sql/Checking permissions 0
-user3 localhost stage/sql/Closing tables 0
-user3 localhost stage/sql/Init 0
-user3 localhost stage/sql/Init for update 0
+user2 localhost stage/sql/starting 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
user3 localhost stage/sql/Opening tables 0
-user4 localhost stage/sql/Checking permissions 0
-user4 localhost stage/sql/Closing tables 0
-user4 localhost stage/sql/Init 0
-user4 localhost stage/sql/Init for update 0
+user3 localhost stage/sql/starting 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
user4 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/starting 0
execute dump_stages_user;
user event_name count_star
-user1 stage/sql/Checking permissions 0
-user1 stage/sql/Closing tables 0
-user1 stage/sql/Init 0
-user1 stage/sql/Init for update 0
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
user1 stage/sql/Opening tables 0
-user2 stage/sql/Checking permissions 0
-user2 stage/sql/Closing tables 0
-user2 stage/sql/Init 0
-user2 stage/sql/Init for update 0
+user1 stage/sql/starting 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
user2 stage/sql/Opening tables 0
-user3 stage/sql/Checking permissions 0
-user3 stage/sql/Closing tables 0
-user3 stage/sql/Init 0
-user3 stage/sql/Init for update 0
+user2 stage/sql/starting 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
user3 stage/sql/Opening tables 0
-user4 stage/sql/Checking permissions 0
-user4 stage/sql/Closing tables 0
-user4 stage/sql/Init 0
-user4 stage/sql/Init for update 0
+user3 stage/sql/starting 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
user4 stage/sql/Opening tables 0
+user4 stage/sql/starting 0
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 0
-localhost stage/sql/Closing tables 0
-localhost stage/sql/Init 0
-localhost stage/sql/Init for update 0
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
localhost stage/sql/Opening tables 0
+localhost stage/sql/starting 0
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 0
+user1 localhost statement/sp/freturn 0
user1 localhost statement/sql/insert 0
user1 localhost statement/sql/select 0
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 0
+user2 localhost statement/sp/freturn 0
user2 localhost statement/sql/insert 0
user2 localhost statement/sql/select 0
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 0
+user3 localhost statement/sp/freturn 0
user3 localhost statement/sql/insert 0
user3 localhost statement/sql/select 0
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 0
+user4 localhost statement/sp/freturn 0
user4 localhost statement/sql/insert 0
user4 localhost statement/sql/select 0
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 0
+user1 statement/sp/freturn 0
user1 statement/sql/insert 0
user1 statement/sql/select 0
user2 statement/com/Error 0
user2 statement/com/Quit 0
+user2 statement/sp/freturn 0
user2 statement/sql/insert 0
user2 statement/sql/select 0
user3 statement/com/Error 0
user3 statement/com/Quit 0
+user3 statement/sp/freturn 0
user3 statement/sql/insert 0
user3 statement/sql/select 0
user4 statement/com/Error 0
user4 statement/com/Quit 0
+user4 statement/sp/freturn 0
user4 statement/sql/insert 0
user4 statement/sql/select 0
execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 0
+localhost statement/sp/freturn 0
localhost statement/sql/insert 0
localhost statement/sql/select 0
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 0
statement/sql/insert 0
statement/sql/select 0
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_transactions_summary_by_thread_by_event_name;
+"================== TRANSACTIONS_BY_THREAD truncated =================="
+"================== Step 29 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/file/sql/query_log 0
+user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
+user2 localhost wait/io/file/sql/query_log 0
+user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
+user3 localhost wait/io/file/sql/query_log 0
+user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
+user4 localhost wait/io/file/sql/query_log 0
+user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+user2 wait/io/file/sql/query_log 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+user3 wait/io/file/sql/query_log 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+user4 wait/io/file/sql/query_log 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 32
+wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
+user1 localhost stage/sql/Opening tables 0
+user1 localhost stage/sql/starting 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
+user2 localhost stage/sql/Opening tables 0
+user2 localhost stage/sql/starting 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
+user3 localhost stage/sql/Opening tables 0
+user3 localhost stage/sql/starting 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
+user4 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/starting 0
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
+user1 stage/sql/Opening tables 0
+user1 stage/sql/starting 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
+user2 stage/sql/Opening tables 0
+user2 stage/sql/starting 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
+user3 stage/sql/Opening tables 0
+user3 stage/sql/starting 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
+user4 stage/sql/Opening tables 0
+user4 stage/sql/starting 0
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
+localhost stage/sql/Opening tables 0
+localhost stage/sql/starting 0
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+stage/sql/starting 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 0
+user1 localhost statement/sp/freturn 0
+user1 localhost statement/sql/insert 0
+user1 localhost statement/sql/select 0
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 0
+user2 localhost statement/sp/freturn 0
+user2 localhost statement/sql/insert 0
+user2 localhost statement/sql/select 0
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 0
+user3 localhost statement/sp/freturn 0
+user3 localhost statement/sql/insert 0
+user3 localhost statement/sql/select 0
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 0
+user4 localhost statement/sp/freturn 0
+user4 localhost statement/sql/insert 0
+user4 localhost statement/sql/select 0
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 0
+user1 statement/sp/freturn 0
+user1 statement/sql/insert 0
+user1 statement/sql/select 0
+user2 statement/com/Error 0
+user2 statement/com/Quit 0
+user2 statement/sp/freturn 0
+user2 statement/sql/insert 0
+user2 statement/sql/select 0
+user3 statement/com/Error 0
+user3 statement/com/Quit 0
+user3 statement/sp/freturn 0
+user3 statement/sql/insert 0
+user3 statement/sql/select 0
+user4 statement/com/Error 0
+user4 statement/com/Quit 0
+user4 statement/sp/freturn 0
+user4 statement/sql/insert 0
+user4 statement/sql/select 0
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 0
+localhost statement/sp/freturn 0
+localhost statement/sql/insert 0
+localhost statement/sql/select 0
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sp/freturn 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sp/freturn 4
+statement/sql/insert 4
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_transactions_summary_by_account_by_event_name;
+"================== TRANSACTIONS_BY_ACCOUNT truncated =================="
+"================== Step 30 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/file/sql/query_log 0
+user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
+user2 localhost wait/io/file/sql/query_log 0
+user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
+user3 localhost wait/io/file/sql/query_log 0
+user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
+user4 localhost wait/io/file/sql/query_log 0
+user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+user2 wait/io/file/sql/query_log 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+user3 wait/io/file/sql/query_log 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+user4 wait/io/file/sql/query_log 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 32
+wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
+user1 localhost stage/sql/Opening tables 0
+user1 localhost stage/sql/starting 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
+user2 localhost stage/sql/Opening tables 0
+user2 localhost stage/sql/starting 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
+user3 localhost stage/sql/Opening tables 0
+user3 localhost stage/sql/starting 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
+user4 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/starting 0
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
+user1 stage/sql/Opening tables 0
+user1 stage/sql/starting 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
+user2 stage/sql/Opening tables 0
+user2 stage/sql/starting 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
+user3 stage/sql/Opening tables 0
+user3 stage/sql/starting 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
+user4 stage/sql/Opening tables 0
+user4 stage/sql/starting 0
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
+localhost stage/sql/Opening tables 0
+localhost stage/sql/starting 0
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+stage/sql/starting 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 0
+user1 localhost statement/sp/freturn 0
+user1 localhost statement/sql/insert 0
+user1 localhost statement/sql/select 0
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 0
+user2 localhost statement/sp/freturn 0
+user2 localhost statement/sql/insert 0
+user2 localhost statement/sql/select 0
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 0
+user3 localhost statement/sp/freturn 0
+user3 localhost statement/sql/insert 0
+user3 localhost statement/sql/select 0
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 0
+user4 localhost statement/sp/freturn 0
+user4 localhost statement/sql/insert 0
+user4 localhost statement/sql/select 0
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 0
+user1 statement/sp/freturn 0
+user1 statement/sql/insert 0
+user1 statement/sql/select 0
+user2 statement/com/Error 0
+user2 statement/com/Quit 0
+user2 statement/sp/freturn 0
+user2 statement/sql/insert 0
+user2 statement/sql/select 0
+user3 statement/com/Error 0
+user3 statement/com/Quit 0
+user3 statement/sp/freturn 0
+user3 statement/sql/insert 0
+user3 statement/sql/select 0
+user4 statement/com/Error 0
+user4 statement/com/Quit 0
+user4 statement/sp/freturn 0
+user4 statement/sql/insert 0
+user4 statement/sql/select 0
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 0
+localhost statement/sp/freturn 0
+localhost statement/sql/insert 0
+localhost statement/sql/select 0
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sp/freturn 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sp/freturn 4
+statement/sql/insert 4
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 0
+user2 localhost transaction 0
+user3 localhost transaction 0
+user4 localhost transaction 0
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_transactions_summary_by_user_by_event_name;
+"================== TRANSACTIONS_BY_USER truncated =================="
+"================== Step 31 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/file/sql/query_log 0
+user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
+user2 localhost wait/io/file/sql/query_log 0
+user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
+user3 localhost wait/io/file/sql/query_log 0
+user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
+user4 localhost wait/io/file/sql/query_log 0
+user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+user2 wait/io/file/sql/query_log 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+user3 wait/io/file/sql/query_log 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+user4 wait/io/file/sql/query_log 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 32
+wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
+user1 localhost stage/sql/Opening tables 0
+user1 localhost stage/sql/starting 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
+user2 localhost stage/sql/Opening tables 0
+user2 localhost stage/sql/starting 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
+user3 localhost stage/sql/Opening tables 0
+user3 localhost stage/sql/starting 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
+user4 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/starting 0
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
+user1 stage/sql/Opening tables 0
+user1 stage/sql/starting 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
+user2 stage/sql/Opening tables 0
+user2 stage/sql/starting 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
+user3 stage/sql/Opening tables 0
+user3 stage/sql/starting 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
+user4 stage/sql/Opening tables 0
+user4 stage/sql/starting 0
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
+localhost stage/sql/Opening tables 0
+localhost stage/sql/starting 0
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+stage/sql/starting 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 0
+user1 localhost statement/sp/freturn 0
+user1 localhost statement/sql/insert 0
+user1 localhost statement/sql/select 0
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 0
+user2 localhost statement/sp/freturn 0
+user2 localhost statement/sql/insert 0
+user2 localhost statement/sql/select 0
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 0
+user3 localhost statement/sp/freturn 0
+user3 localhost statement/sql/insert 0
+user3 localhost statement/sql/select 0
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 0
+user4 localhost statement/sp/freturn 0
+user4 localhost statement/sql/insert 0
+user4 localhost statement/sql/select 0
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 0
+user1 statement/sp/freturn 0
+user1 statement/sql/insert 0
+user1 statement/sql/select 0
+user2 statement/com/Error 0
+user2 statement/com/Quit 0
+user2 statement/sp/freturn 0
+user2 statement/sql/insert 0
+user2 statement/sql/select 0
+user3 statement/com/Error 0
+user3 statement/com/Quit 0
+user3 statement/sp/freturn 0
+user3 statement/sql/insert 0
+user3 statement/sql/select 0
+user4 statement/com/Error 0
+user4 statement/com/Quit 0
+user4 statement/sp/freturn 0
+user4 statement/sql/insert 0
+user4 statement/sql/select 0
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 0
+localhost statement/sp/freturn 0
+localhost statement/sql/insert 0
+localhost statement/sql/select 0
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sp/freturn 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sp/freturn 4
+statement/sql/insert 4
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 0
+user2 localhost transaction 0
+user3 localhost transaction 0
+user4 localhost transaction 0
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 0
+user2 transaction 0
+user3 transaction 0
+user4 transaction 0
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_transactions_summary_by_host_by_event_name;
+"================== TRANSACTIONS_BY_HOST truncated =================="
+"================== Step 32 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/file/sql/query_log 0
+user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
+user2 localhost wait/io/file/sql/query_log 0
+user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
+user3 localhost wait/io/file/sql/query_log 0
+user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
+user4 localhost wait/io/file/sql/query_log 0
+user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+user2 wait/io/file/sql/query_log 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+user3 wait/io/file/sql/query_log 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+user4 wait/io/file/sql/query_log 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 32
+wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
+user1 localhost stage/sql/Opening tables 0
+user1 localhost stage/sql/starting 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
+user2 localhost stage/sql/Opening tables 0
+user2 localhost stage/sql/starting 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
+user3 localhost stage/sql/Opening tables 0
+user3 localhost stage/sql/starting 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
+user4 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/starting 0
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
+user1 stage/sql/Opening tables 0
+user1 stage/sql/starting 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
+user2 stage/sql/Opening tables 0
+user2 stage/sql/starting 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
+user3 stage/sql/Opening tables 0
+user3 stage/sql/starting 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
+user4 stage/sql/Opening tables 0
+user4 stage/sql/starting 0
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
+localhost stage/sql/Opening tables 0
+localhost stage/sql/starting 0
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+stage/sql/starting 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 0
+user1 localhost statement/sp/freturn 0
+user1 localhost statement/sql/insert 0
+user1 localhost statement/sql/select 0
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 0
+user2 localhost statement/sp/freturn 0
+user2 localhost statement/sql/insert 0
+user2 localhost statement/sql/select 0
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 0
+user3 localhost statement/sp/freturn 0
+user3 localhost statement/sql/insert 0
+user3 localhost statement/sql/select 0
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 0
+user4 localhost statement/sp/freturn 0
+user4 localhost statement/sql/insert 0
+user4 localhost statement/sql/select 0
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 0
+user1 statement/sp/freturn 0
+user1 statement/sql/insert 0
+user1 statement/sql/select 0
+user2 statement/com/Error 0
+user2 statement/com/Quit 0
+user2 statement/sp/freturn 0
+user2 statement/sql/insert 0
+user2 statement/sql/select 0
+user3 statement/com/Error 0
+user3 statement/com/Quit 0
+user3 statement/sp/freturn 0
+user3 statement/sql/insert 0
+user3 statement/sql/select 0
+user4 statement/com/Error 0
+user4 statement/com/Quit 0
+user4 statement/sp/freturn 0
+user4 statement/sql/insert 0
+user4 statement/sql/select 0
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 0
+localhost statement/sp/freturn 0
+localhost statement/sql/insert 0
+localhost statement/sql/select 0
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sp/freturn 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sp/freturn 4
+statement/sql/insert 4
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 0
+user2 localhost transaction 0
+user3 localhost transaction 0
+user4 localhost transaction 0
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 0
+user2 transaction 0
+user3 transaction 0
+user4 transaction 0
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 0
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_transactions_summary_global_by_event_name;
+"================== TRANSACTIONS_GLOBAL truncated =================="
+"================== Step 33 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/file/sql/query_log 0
+user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
+user2 localhost wait/io/file/sql/query_log 0
+user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
+user3 localhost wait/io/file/sql/query_log 0
+user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
+user4 localhost wait/io/file/sql/query_log 0
+user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+user2 wait/io/file/sql/query_log 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+user3 wait/io/file/sql/query_log 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+user4 wait/io/file/sql/query_log 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 32
+wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
+user1 localhost stage/sql/Opening tables 0
+user1 localhost stage/sql/starting 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
+user2 localhost stage/sql/Opening tables 0
+user2 localhost stage/sql/starting 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
+user3 localhost stage/sql/Opening tables 0
+user3 localhost stage/sql/starting 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
+user4 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/starting 0
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
+user1 stage/sql/Opening tables 0
+user1 stage/sql/starting 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
+user2 stage/sql/Opening tables 0
+user2 stage/sql/starting 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
+user3 stage/sql/Opening tables 0
+user3 stage/sql/starting 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
+user4 stage/sql/Opening tables 0
+user4 stage/sql/starting 0
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
+localhost stage/sql/Opening tables 0
+localhost stage/sql/starting 0
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+stage/sql/starting 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 0
+user1 localhost statement/sp/freturn 0
+user1 localhost statement/sql/insert 0
+user1 localhost statement/sql/select 0
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 0
+user2 localhost statement/sp/freturn 0
+user2 localhost statement/sql/insert 0
+user2 localhost statement/sql/select 0
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 0
+user3 localhost statement/sp/freturn 0
+user3 localhost statement/sql/insert 0
+user3 localhost statement/sql/select 0
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 0
+user4 localhost statement/sp/freturn 0
+user4 localhost statement/sql/insert 0
+user4 localhost statement/sql/select 0
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 0
+user1 statement/sp/freturn 0
+user1 statement/sql/insert 0
+user1 statement/sql/select 0
+user2 statement/com/Error 0
+user2 statement/com/Quit 0
+user2 statement/sp/freturn 0
+user2 statement/sql/insert 0
+user2 statement/sql/select 0
+user3 statement/com/Error 0
+user3 statement/com/Quit 0
+user3 statement/sp/freturn 0
+user3 statement/sql/insert 0
+user3 statement/sql/select 0
+user4 statement/com/Error 0
+user4 statement/com/Quit 0
+user4 statement/sp/freturn 0
+user4 statement/sql/insert 0
+user4 statement/sql/select 0
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 0
+localhost statement/sp/freturn 0
+localhost statement/sql/insert 0
+localhost statement/sql/select 0
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sp/freturn 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sp/freturn 4
+statement/sql/insert 4
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 0
+user2 localhost transaction 0
+user3 localhost transaction 0
+user4 localhost transaction 0
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 0
+user2 transaction 0
+user3 transaction 0
+user4 transaction 0
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 0
+execute dump_transactions_global;
+event_name count_star
+transaction 0
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -5222,7 +6558,7 @@ HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 1 5
truncate performance_schema.accounts;
"================== ACCOUNTS truncated =================="
-"================== Step 29 =================="
+"================== Step 34 =================="
call dump_thread();
username status
user1 not found
@@ -5237,120 +6573,131 @@ user host event_name count_star
execute dump_waits_user;
user event_name count_star
user1 wait/io/file/sql/query_log 0
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
user1 wait/synch/rwlock/sql/LOCK_grant 0
user2 wait/io/file/sql/query_log 0
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
user2 wait/synch/rwlock/sql/LOCK_grant 0
user3 wait/io/file/sql/query_log 0
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
user3 wait/synch/rwlock/sql/LOCK_grant 0
user4 wait/io/file/sql/query_log 0
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
user4 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_host;
host event_name count_star
localhost wait/io/file/sql/query_log 0
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
execute dump_stages_user;
user event_name count_star
-user1 stage/sql/Checking permissions 0
-user1 stage/sql/Closing tables 0
-user1 stage/sql/Init 0
-user1 stage/sql/Init for update 0
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
user1 stage/sql/Opening tables 0
-user2 stage/sql/Checking permissions 0
-user2 stage/sql/Closing tables 0
-user2 stage/sql/Init 0
-user2 stage/sql/Init for update 0
+user1 stage/sql/starting 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
user2 stage/sql/Opening tables 0
-user3 stage/sql/Checking permissions 0
-user3 stage/sql/Closing tables 0
-user3 stage/sql/Init 0
-user3 stage/sql/Init for update 0
+user2 stage/sql/starting 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
user3 stage/sql/Opening tables 0
-user4 stage/sql/Checking permissions 0
-user4 stage/sql/Closing tables 0
-user4 stage/sql/Init 0
-user4 stage/sql/Init for update 0
+user3 stage/sql/starting 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
user4 stage/sql/Opening tables 0
+user4 stage/sql/starting 0
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 0
-localhost stage/sql/Closing tables 0
-localhost stage/sql/Init 0
-localhost stage/sql/Init for update 0
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
localhost stage/sql/Opening tables 0
+localhost stage/sql/starting 0
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 0
+user1 statement/sp/freturn 0
user1 statement/sql/insert 0
user1 statement/sql/select 0
user2 statement/com/Error 0
user2 statement/com/Quit 0
+user2 statement/sp/freturn 0
user2 statement/sql/insert 0
user2 statement/sql/select 0
user3 statement/com/Error 0
user3 statement/com/Quit 0
+user3 statement/sp/freturn 0
user3 statement/sql/insert 0
user3 statement/sql/select 0
user4 statement/com/Error 0
user4 statement/com/Quit 0
+user4 statement/sp/freturn 0
user4 statement/sql/insert 0
user4 statement/sql/select 0
execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 0
+localhost statement/sp/freturn 0
localhost statement/sql/insert 0
localhost statement/sql/select 0
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 0
statement/sql/insert 0
statement/sql/select 0
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 0
+user2 transaction 0
+user3 transaction 0
+user4 transaction 0
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 0
+execute dump_transactions_global;
+event_name count_star
+transaction 0
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -5366,7 +6713,7 @@ HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 1 5
truncate performance_schema.users;
"================== USERS truncated =================="
-"================== Step 30 =================="
+"================== Step 35 =================="
call dump_thread();
username status
user1 not found
@@ -5383,19 +6730,14 @@ user event_name count_star
execute dump_waits_host;
host event_name count_star
localhost wait/io/file/sql/query_log 0
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
@@ -5403,25 +6745,25 @@ execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 0
-localhost stage/sql/Closing tables 0
-localhost stage/sql/Init 0
-localhost stage/sql/Init for update 0
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
localhost stage/sql/Opening tables 0
+localhost stage/sql/starting 0
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -5430,19 +6772,35 @@ execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 0
+localhost statement/sp/freturn 0
localhost statement/sql/insert 0
localhost statement/sql/select 0
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 0
statement/sql/insert 0
statement/sql/select 0
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 0
+execute dump_transactions_global;
+event_name count_star
+transaction 0
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -5454,7 +6812,7 @@ HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 1 5
truncate performance_schema.hosts;
"================== HOSTS truncated =================="
-"================== Step 31 =================="
+"================== Step 36 =================="
call dump_thread();
username status
user1 not found
@@ -5471,19 +6829,14 @@ user event_name count_star
execute dump_waits_host;
host event_name count_star
localhost wait/io/file/sql/query_log 0
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
@@ -5491,25 +6844,25 @@ execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 0
-localhost stage/sql/Closing tables 0
-localhost stage/sql/Init 0
-localhost stage/sql/Init for update 0
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
localhost stage/sql/Opening tables 0
+localhost stage/sql/starting 0
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -5518,19 +6871,35 @@ execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 0
+localhost statement/sp/freturn 0
localhost statement/sql/insert 0
localhost statement/sql/select 0
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 0
statement/sql/insert 0
statement/sql/select 0
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 0
+execute dump_transactions_global;
+event_name count_star
+transaction 0
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
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 19dec52aa47..9ce3bb7efe8 100644
--- a/mysql-test/suite/perfschema/r/event_aggregate_no_a.result
+++ b/mysql-test/suite/perfschema/r/event_aggregate_no_a.result
@@ -15,14 +15,10 @@ user event_name count_star
execute dump_waits_host;
host event_name count_star
localhost wait/io/file/sql/query_log 0
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
@@ -32,18 +28,18 @@ execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 0
-localhost stage/sql/Closing tables 0
-localhost stage/sql/Init 0
-localhost stage/sql/Init for update 0
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
localhost stage/sql/Opening tables 0
+localhost stage/sql/starting 0
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
execute dump_statements_account;
@@ -54,16 +50,30 @@ execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 0
+localhost statement/sp/freturn 0
localhost statement/sql/insert 0
localhost statement/sql/select 0
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 0
statement/sql/insert 0
statement/sql/select 0
execute dump_statements_history;
event_name count(event_name)
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 0
+execute dump_transactions_global;
+event_name count_star
+transaction 0
+execute dump_transactions_history;
+event_name count(event_name)
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -78,8 +88,6 @@ connection default;
call dump_thread();
username event_name count_star
user1 wait/io/file/sql/query_log 1
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
user1 wait/synch/rwlock/sql/LOCK_grant 0
username status
user2 not found
@@ -92,20 +100,14 @@ user host event_name count_star
execute dump_waits_user;
user event_name count_star
user1 wait/io/file/sql/query_log 1
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
user1 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_host;
host event_name count_star
localhost wait/io/file/sql/query_log 1
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 1
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
@@ -114,25 +116,25 @@ execute dump_stages_account;
user host event_name count_star
execute dump_stages_user;
user event_name count_star
-user1 stage/sql/Checking permissions 0
-user1 stage/sql/Closing tables 0
-user1 stage/sql/Init 0
-user1 stage/sql/Init for update 0
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
user1 stage/sql/Opening tables 0
+user1 stage/sql/starting 0
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 0
-localhost stage/sql/Closing tables 0
-localhost stage/sql/Init 0
-localhost stage/sql/Init for update 0
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
localhost stage/sql/Opening tables 0
+localhost stage/sql/starting 0
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
execute dump_statements_account;
@@ -141,22 +143,38 @@ execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 0
+user1 statement/sp/freturn 0
user1 statement/sql/insert 0
user1 statement/sql/select 0
execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 0
+localhost statement/sp/freturn 0
localhost statement/sql/insert 0
localhost statement/sql/select 0
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 0
statement/sql/insert 0
statement/sql/select 0
execute dump_statements_history;
event_name count(event_name)
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 0
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 0
+execute dump_transactions_global;
+event_name count_star
+transaction 0
+execute dump_transactions_history;
+event_name count(event_name)
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -167,20 +185,23 @@ execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 2 2
connection con1;
-select get_lock("marker", 10);
-get_lock("marker", 10)
+select uuid_short() <> 1;
+uuid_short() <> 1
1
-select release_lock("marker");
-release_lock("marker")
+select uuid_short() <> 1;
+uuid_short() <> 1
1
+start transaction;
insert into test.t1 values ("marker");
+commit;
+select test.f(10,20);
+test.f(10,20)
+30
connection default;
"================== Step 3 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
username status
user2 not found
@@ -192,80 +213,92 @@ execute dump_waits_account;
user host event_name count_star
execute dump_waits_user;
user event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_host;
host event_name count_star
-localhost wait/io/file/sql/query_log 4
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/io/file/sql/query_log 7
localhost wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 4
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 7
wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 4
+wait/io/file/sql/query_log 7
wait/synch/rwlock/sql/LOCK_grant 1
execute dump_stages_account;
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 6
-user1 stage/sql/Init 5
-user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 4
+user1 stage/sql/checking permissions 4
+user1 stage/sql/closing tables 11
+user1 stage/sql/init 3
+user1 stage/sql/Opening tables 7
+user1 stage/sql/starting 6
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 3
-localhost stage/sql/Closing tables 6
-localhost stage/sql/Init 5
-localhost stage/sql/Init for update 1
-localhost stage/sql/Opening tables 4
+localhost stage/sql/checking permissions 4
+localhost stage/sql/closing tables 11
+localhost stage/sql/init 3
+localhost stage/sql/Opening tables 7
+localhost stage/sql/starting 6
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 3
-stage/sql/Closing tables 6
-stage/sql/Init 5
-stage/sql/Init for update 1
-stage/sql/Opening tables 4
+stage/sql/checking permissions 4
+stage/sql/closing tables 11
+stage/sql/init 3
+stage/sql/Opening tables 7
+stage/sql/starting 6
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 3
-stage/sql/Closing tables 6
-stage/sql/Init 5
-stage/sql/Init for update 1
-stage/sql/Opening tables 4
+stage/sql/checking permissions 4
+stage/sql/closing tables 11
+stage/sql/init 3
+stage/sql/Opening tables 7
+stage/sql/starting 6
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 0
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 0
+localhost statement/sp/freturn 1
localhost statement/sql/insert 1
-localhost statement/sql/select 2
+localhost statement/sql/select 3
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 1
statement/sql/insert 1
-statement/sql/select 2
+statement/sql/select 3
execute dump_statements_history;
event_name count(event_name)
+statement/sp/freturn 1
statement/sql/insert 1
-statement/sql/select 2
+statement/sql/select 3
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 2
+execute dump_transactions_global;
+event_name count_star
+transaction 2
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 2
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -280,14 +313,10 @@ connection default;
"================== Step 4 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
user2 wait/io/file/sql/query_log 1
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
user2 wait/synch/rwlock/sql/LOCK_grant 0
username status
user3 not found
@@ -297,93 +326,105 @@ execute dump_waits_account;
user host event_name count_star
execute dump_waits_user;
user event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
user2 wait/io/file/sql/query_log 1
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
user2 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/file/sql/query_log 5
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/io/file/sql/query_log 8
localhost wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 5
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 8
wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 5
+wait/io/file/sql/query_log 8
wait/synch/rwlock/sql/LOCK_grant 1
execute dump_stages_account;
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 6
-user1 stage/sql/Init 5
-user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 4
-user2 stage/sql/Checking permissions 0
-user2 stage/sql/Closing tables 0
-user2 stage/sql/Init 0
-user2 stage/sql/Init for update 0
+user1 stage/sql/checking permissions 4
+user1 stage/sql/closing tables 11
+user1 stage/sql/init 3
+user1 stage/sql/Opening tables 7
+user1 stage/sql/starting 6
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
user2 stage/sql/Opening tables 0
+user2 stage/sql/starting 0
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 3
-localhost stage/sql/Closing tables 6
-localhost stage/sql/Init 5
-localhost stage/sql/Init for update 1
-localhost stage/sql/Opening tables 4
+localhost stage/sql/checking permissions 4
+localhost stage/sql/closing tables 11
+localhost stage/sql/init 3
+localhost stage/sql/Opening tables 7
+localhost stage/sql/starting 6
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 3
-stage/sql/Closing tables 6
-stage/sql/Init 5
-stage/sql/Init for update 1
-stage/sql/Opening tables 4
+stage/sql/checking permissions 4
+stage/sql/closing tables 11
+stage/sql/init 3
+stage/sql/Opening tables 7
+stage/sql/starting 6
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 3
-stage/sql/Closing tables 6
-stage/sql/Init 5
-stage/sql/Init for update 1
-stage/sql/Opening tables 4
+stage/sql/checking permissions 4
+stage/sql/closing tables 11
+stage/sql/init 3
+stage/sql/Opening tables 7
+stage/sql/starting 6
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 0
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 0
+user2 statement/sp/freturn 0
user2 statement/sql/insert 0
user2 statement/sql/select 0
execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 0
+localhost statement/sp/freturn 1
localhost statement/sql/insert 1
-localhost statement/sql/select 2
+localhost statement/sql/select 3
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 1
statement/sql/insert 1
-statement/sql/select 2
+statement/sql/select 3
execute dump_statements_history;
event_name count(event_name)
+statement/sp/freturn 1
statement/sql/insert 1
-statement/sql/select 2
+statement/sql/select 3
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 0
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 2
+execute dump_transactions_global;
+event_name count_star
+transaction 2
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 2
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -395,25 +436,26 @@ execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 3 3
connection con2;
-select get_lock("marker", 10);
-get_lock("marker", 10)
+select uuid_short() <> 1;
+uuid_short() <> 1
1
-select release_lock("marker");
-release_lock("marker")
+select uuid_short() <> 1;
+uuid_short() <> 1
1
+start transaction;
insert into test.t1 values ("marker");
+commit;
+select test.f(10,20);
+test.f(10,20)
+30
connection default;
"================== Step 5 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user2 wait/io/file/sql/query_log 4
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 7
user2 wait/synch/rwlock/sql/LOCK_grant 1
username status
user3 not found
@@ -423,93 +465,105 @@ execute dump_waits_account;
user host event_name count_star
execute dump_waits_user;
user event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
-user2 wait/io/file/sql/query_log 4
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 7
user2 wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_host;
host event_name count_star
-localhost wait/io/file/sql/query_log 8
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/io/file/sql/query_log 14
localhost wait/synch/rwlock/sql/LOCK_grant 2
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 8
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 14
wait/synch/rwlock/sql/LOCK_grant 2
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 8
+wait/io/file/sql/query_log 14
wait/synch/rwlock/sql/LOCK_grant 2
execute dump_stages_account;
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 6
-user1 stage/sql/Init 5
-user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 4
-user2 stage/sql/Checking permissions 3
-user2 stage/sql/Closing tables 4
-user2 stage/sql/Init 5
-user2 stage/sql/Init for update 1
-user2 stage/sql/Opening tables 3
+user1 stage/sql/checking permissions 4
+user1 stage/sql/closing tables 11
+user1 stage/sql/init 3
+user1 stage/sql/Opening tables 7
+user1 stage/sql/starting 6
+user2 stage/sql/checking permissions 4
+user2 stage/sql/closing tables 10
+user2 stage/sql/init 3
+user2 stage/sql/Opening tables 6
+user2 stage/sql/starting 6
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 6
-localhost stage/sql/Closing tables 10
-localhost stage/sql/Init 10
-localhost stage/sql/Init for update 2
-localhost stage/sql/Opening tables 7
+localhost stage/sql/checking permissions 8
+localhost stage/sql/closing tables 21
+localhost stage/sql/init 6
+localhost stage/sql/Opening tables 13
+localhost stage/sql/starting 12
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 6
-stage/sql/Closing tables 10
-stage/sql/Init 10
-stage/sql/Init for update 2
-stage/sql/Opening tables 7
+stage/sql/checking permissions 8
+stage/sql/closing tables 21
+stage/sql/init 6
+stage/sql/Opening tables 13
+stage/sql/starting 12
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 6
-stage/sql/Closing tables 10
-stage/sql/Init 10
-stage/sql/Init for update 2
-stage/sql/Opening tables 7
+stage/sql/checking permissions 8
+stage/sql/closing tables 21
+stage/sql/init 6
+stage/sql/Opening tables 13
+stage/sql/starting 12
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 0
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 0
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 0
+localhost statement/sp/freturn 2
localhost statement/sql/insert 2
-localhost statement/sql/select 4
+localhost statement/sql/select 6
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 2
statement/sql/insert 2
-statement/sql/select 4
+statement/sql/select 6
execute dump_statements_history;
event_name count(event_name)
+statement/sp/freturn 2
statement/sql/insert 2
-statement/sql/select 4
+statement/sql/select 6
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 4
+execute dump_transactions_global;
+event_name count_star
+transaction 4
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 4
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -525,19 +579,13 @@ connection default;
"================== Step 6 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user2 wait/io/file/sql/query_log 4
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 7
user2 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
user3 wait/io/file/sql/query_log 1
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
user3 wait/synch/rwlock/sql/LOCK_grant 0
username status
user4 not found
@@ -545,106 +593,118 @@ execute dump_waits_account;
user host event_name count_star
execute dump_waits_user;
user event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
-user2 wait/io/file/sql/query_log 4
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 7
user2 wait/synch/rwlock/sql/LOCK_grant 1
user3 wait/io/file/sql/query_log 1
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
user3 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/file/sql/query_log 9
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/io/file/sql/query_log 15
localhost wait/synch/rwlock/sql/LOCK_grant 2
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 9
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 15
wait/synch/rwlock/sql/LOCK_grant 2
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 9
+wait/io/file/sql/query_log 15
wait/synch/rwlock/sql/LOCK_grant 2
execute dump_stages_account;
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 6
-user1 stage/sql/Init 5
-user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 4
-user2 stage/sql/Checking permissions 3
-user2 stage/sql/Closing tables 4
-user2 stage/sql/Init 5
-user2 stage/sql/Init for update 1
-user2 stage/sql/Opening tables 3
-user3 stage/sql/Checking permissions 0
-user3 stage/sql/Closing tables 0
-user3 stage/sql/Init 0
-user3 stage/sql/Init for update 0
+user1 stage/sql/checking permissions 4
+user1 stage/sql/closing tables 11
+user1 stage/sql/init 3
+user1 stage/sql/Opening tables 7
+user1 stage/sql/starting 6
+user2 stage/sql/checking permissions 4
+user2 stage/sql/closing tables 10
+user2 stage/sql/init 3
+user2 stage/sql/Opening tables 6
+user2 stage/sql/starting 6
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
user3 stage/sql/Opening tables 0
+user3 stage/sql/starting 0
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 6
-localhost stage/sql/Closing tables 10
-localhost stage/sql/Init 10
-localhost stage/sql/Init for update 2
-localhost stage/sql/Opening tables 7
+localhost stage/sql/checking permissions 8
+localhost stage/sql/closing tables 21
+localhost stage/sql/init 6
+localhost stage/sql/Opening tables 13
+localhost stage/sql/starting 12
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 6
-stage/sql/Closing tables 10
-stage/sql/Init 10
-stage/sql/Init for update 2
-stage/sql/Opening tables 7
+stage/sql/checking permissions 8
+stage/sql/closing tables 21
+stage/sql/init 6
+stage/sql/Opening tables 13
+stage/sql/starting 12
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 6
-stage/sql/Closing tables 10
-stage/sql/Init 10
-stage/sql/Init for update 2
-stage/sql/Opening tables 7
+stage/sql/checking permissions 8
+stage/sql/closing tables 21
+stage/sql/init 6
+stage/sql/Opening tables 13
+stage/sql/starting 12
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 0
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 0
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 0
+user3 statement/sp/freturn 0
user3 statement/sql/insert 0
user3 statement/sql/select 0
execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 0
+localhost statement/sp/freturn 2
localhost statement/sql/insert 2
-localhost statement/sql/select 4
+localhost statement/sql/select 6
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 2
statement/sql/insert 2
-statement/sql/select 4
+statement/sql/select 6
execute dump_statements_history;
event_name count(event_name)
+statement/sp/freturn 2
statement/sql/insert 2
-statement/sql/select 4
+statement/sql/select 6
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 0
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 4
+execute dump_transactions_global;
+event_name count_star
+transaction 4
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 4
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -657,30 +717,29 @@ execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 4 4
connection con3;
-select get_lock("marker", 10);
-get_lock("marker", 10)
+select uuid_short() <> 1;
+uuid_short() <> 1
1
-select release_lock("marker");
-release_lock("marker")
+select uuid_short() <> 1;
+uuid_short() <> 1
1
+start transaction;
insert into test.t1 values ("marker");
+commit;
+select test.f(10,20);
+test.f(10,20)
+30
connection default;
"================== Step 7 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user2 wait/io/file/sql/query_log 4
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 7
user2 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user3 wait/io/file/sql/query_log 4
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/io/file/sql/query_log 7
user3 wait/synch/rwlock/sql/LOCK_grant 1
username status
user4 not found
@@ -688,106 +747,118 @@ execute dump_waits_account;
user host event_name count_star
execute dump_waits_user;
user event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
-user2 wait/io/file/sql/query_log 4
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 7
user2 wait/synch/rwlock/sql/LOCK_grant 1
-user3 wait/io/file/sql/query_log 4
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/io/file/sql/query_log 7
user3 wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_host;
host event_name count_star
-localhost wait/io/file/sql/query_log 12
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/io/file/sql/query_log 21
localhost wait/synch/rwlock/sql/LOCK_grant 3
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 12
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 21
wait/synch/rwlock/sql/LOCK_grant 3
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 12
+wait/io/file/sql/query_log 21
wait/synch/rwlock/sql/LOCK_grant 3
execute dump_stages_account;
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 6
-user1 stage/sql/Init 5
-user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 4
-user2 stage/sql/Checking permissions 3
-user2 stage/sql/Closing tables 4
-user2 stage/sql/Init 5
-user2 stage/sql/Init for update 1
-user2 stage/sql/Opening tables 3
-user3 stage/sql/Checking permissions 3
-user3 stage/sql/Closing tables 4
-user3 stage/sql/Init 5
-user3 stage/sql/Init for update 1
-user3 stage/sql/Opening tables 3
+user1 stage/sql/checking permissions 4
+user1 stage/sql/closing tables 11
+user1 stage/sql/init 3
+user1 stage/sql/Opening tables 7
+user1 stage/sql/starting 6
+user2 stage/sql/checking permissions 4
+user2 stage/sql/closing tables 10
+user2 stage/sql/init 3
+user2 stage/sql/Opening tables 6
+user2 stage/sql/starting 6
+user3 stage/sql/checking permissions 4
+user3 stage/sql/closing tables 10
+user3 stage/sql/init 3
+user3 stage/sql/Opening tables 6
+user3 stage/sql/starting 6
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 9
-localhost stage/sql/Closing tables 14
-localhost stage/sql/Init 15
-localhost stage/sql/Init for update 3
-localhost stage/sql/Opening tables 10
+localhost stage/sql/checking permissions 12
+localhost stage/sql/closing tables 31
+localhost stage/sql/init 9
+localhost stage/sql/Opening tables 19
+localhost stage/sql/starting 18
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 9
-stage/sql/Closing tables 14
-stage/sql/Init 15
-stage/sql/Init for update 3
-stage/sql/Opening tables 10
+stage/sql/checking permissions 12
+stage/sql/closing tables 31
+stage/sql/init 9
+stage/sql/Opening tables 19
+stage/sql/starting 18
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 9
-stage/sql/Closing tables 14
-stage/sql/Init 15
-stage/sql/Init for update 3
-stage/sql/Opening tables 10
+stage/sql/checking permissions 12
+stage/sql/closing tables 31
+stage/sql/init 9
+stage/sql/Opening tables 19
+stage/sql/starting 18
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 0
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 0
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 0
+user3 statement/sp/freturn 1
user3 statement/sql/insert 1
-user3 statement/sql/select 2
+user3 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 0
+localhost statement/sp/freturn 3
localhost statement/sql/insert 3
-localhost statement/sql/select 6
+localhost statement/sql/select 9
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 3
statement/sql/insert 3
-statement/sql/select 6
+statement/sql/select 9
execute dump_statements_history;
event_name count(event_name)
+statement/sp/freturn 3
statement/sql/insert 3
-statement/sql/select 6
+statement/sql/select 9
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 6
+execute dump_transactions_global;
+event_name count_star
+transaction 6
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 6
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -804,142 +875,146 @@ connection default;
"================== Step 8 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user2 wait/io/file/sql/query_log 4
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 7
user2 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user3 wait/io/file/sql/query_log 4
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/io/file/sql/query_log 7
user3 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
user4 wait/io/file/sql/query_log 1
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
user4 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_account;
user host event_name count_star
execute dump_waits_user;
user event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
-user2 wait/io/file/sql/query_log 4
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 7
user2 wait/synch/rwlock/sql/LOCK_grant 1
-user3 wait/io/file/sql/query_log 4
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/io/file/sql/query_log 7
user3 wait/synch/rwlock/sql/LOCK_grant 1
user4 wait/io/file/sql/query_log 1
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
user4 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/file/sql/query_log 13
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/io/file/sql/query_log 22
localhost wait/synch/rwlock/sql/LOCK_grant 3
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 13
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 22
wait/synch/rwlock/sql/LOCK_grant 3
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 13
+wait/io/file/sql/query_log 22
wait/synch/rwlock/sql/LOCK_grant 3
execute dump_stages_account;
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 6
-user1 stage/sql/Init 5
-user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 4
-user2 stage/sql/Checking permissions 3
-user2 stage/sql/Closing tables 4
-user2 stage/sql/Init 5
-user2 stage/sql/Init for update 1
-user2 stage/sql/Opening tables 3
-user3 stage/sql/Checking permissions 3
-user3 stage/sql/Closing tables 4
-user3 stage/sql/Init 5
-user3 stage/sql/Init for update 1
-user3 stage/sql/Opening tables 3
-user4 stage/sql/Checking permissions 0
-user4 stage/sql/Closing tables 0
-user4 stage/sql/Init 0
-user4 stage/sql/Init for update 0
+user1 stage/sql/checking permissions 4
+user1 stage/sql/closing tables 11
+user1 stage/sql/init 3
+user1 stage/sql/Opening tables 7
+user1 stage/sql/starting 6
+user2 stage/sql/checking permissions 4
+user2 stage/sql/closing tables 10
+user2 stage/sql/init 3
+user2 stage/sql/Opening tables 6
+user2 stage/sql/starting 6
+user3 stage/sql/checking permissions 4
+user3 stage/sql/closing tables 10
+user3 stage/sql/init 3
+user3 stage/sql/Opening tables 6
+user3 stage/sql/starting 6
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
user4 stage/sql/Opening tables 0
+user4 stage/sql/starting 0
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 9
-localhost stage/sql/Closing tables 14
-localhost stage/sql/Init 15
-localhost stage/sql/Init for update 3
-localhost stage/sql/Opening tables 10
+localhost stage/sql/checking permissions 12
+localhost stage/sql/closing tables 31
+localhost stage/sql/init 9
+localhost stage/sql/Opening tables 19
+localhost stage/sql/starting 18
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 9
-stage/sql/Closing tables 14
-stage/sql/Init 15
-stage/sql/Init for update 3
-stage/sql/Opening tables 10
+stage/sql/checking permissions 12
+stage/sql/closing tables 31
+stage/sql/init 9
+stage/sql/Opening tables 19
+stage/sql/starting 18
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 9
-stage/sql/Closing tables 14
-stage/sql/Init 15
-stage/sql/Init for update 3
-stage/sql/Opening tables 10
+stage/sql/checking permissions 12
+stage/sql/closing tables 31
+stage/sql/init 9
+stage/sql/Opening tables 19
+stage/sql/starting 18
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 0
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 0
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 0
+user3 statement/sp/freturn 1
user3 statement/sql/insert 1
-user3 statement/sql/select 2
+user3 statement/sql/select 3
user4 statement/com/Error 0
user4 statement/com/Quit 0
+user4 statement/sp/freturn 0
user4 statement/sql/insert 0
user4 statement/sql/select 0
execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 0
+localhost statement/sp/freturn 3
localhost statement/sql/insert 3
-localhost statement/sql/select 6
+localhost statement/sql/select 9
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 3
statement/sql/insert 3
-statement/sql/select 6
+statement/sql/select 9
execute dump_statements_history;
event_name count(event_name)
+statement/sp/freturn 3
statement/sql/insert 3
-statement/sql/select 6
+statement/sql/select 9
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 0
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 6
+execute dump_transactions_global;
+event_name count_star
+transaction 6
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 6
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -953,153 +1028,162 @@ execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 5 5
connection con4;
-select get_lock("marker", 10);
-get_lock("marker", 10)
+select uuid_short() <> 1;
+uuid_short() <> 1
1
-select release_lock("marker");
-release_lock("marker")
+select uuid_short() <> 1;
+uuid_short() <> 1
1
+start transaction;
insert into test.t1 values ("marker");
+commit;
+select test.f(10,20);
+test.f(10,20)
+30
connection default;
"================== Step 9 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user2 wait/io/file/sql/query_log 4
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 7
user2 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user3 wait/io/file/sql/query_log 4
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/io/file/sql/query_log 7
user3 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user4 wait/io/file/sql/query_log 4
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/io/file/sql/query_log 7
user4 wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_account;
user host event_name count_star
execute dump_waits_user;
user event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
-user2 wait/io/file/sql/query_log 4
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 7
user2 wait/synch/rwlock/sql/LOCK_grant 1
-user3 wait/io/file/sql/query_log 4
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/io/file/sql/query_log 7
user3 wait/synch/rwlock/sql/LOCK_grant 1
-user4 wait/io/file/sql/query_log 4
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/io/file/sql/query_log 7
user4 wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_host;
host event_name count_star
-localhost wait/io/file/sql/query_log 16
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/io/file/sql/query_log 28
localhost wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 16
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 28
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 16
+wait/io/file/sql/query_log 28
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
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 6
-user1 stage/sql/Init 5
-user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 4
-user2 stage/sql/Checking permissions 3
-user2 stage/sql/Closing tables 4
-user2 stage/sql/Init 5
-user2 stage/sql/Init for update 1
-user2 stage/sql/Opening tables 3
-user3 stage/sql/Checking permissions 3
-user3 stage/sql/Closing tables 4
-user3 stage/sql/Init 5
-user3 stage/sql/Init for update 1
-user3 stage/sql/Opening tables 3
-user4 stage/sql/Checking permissions 3
-user4 stage/sql/Closing tables 4
-user4 stage/sql/Init 5
-user4 stage/sql/Init for update 1
-user4 stage/sql/Opening tables 3
+user1 stage/sql/checking permissions 4
+user1 stage/sql/closing tables 11
+user1 stage/sql/init 3
+user1 stage/sql/Opening tables 7
+user1 stage/sql/starting 6
+user2 stage/sql/checking permissions 4
+user2 stage/sql/closing tables 10
+user2 stage/sql/init 3
+user2 stage/sql/Opening tables 6
+user2 stage/sql/starting 6
+user3 stage/sql/checking permissions 4
+user3 stage/sql/closing tables 10
+user3 stage/sql/init 3
+user3 stage/sql/Opening tables 6
+user3 stage/sql/starting 6
+user4 stage/sql/checking permissions 4
+user4 stage/sql/closing tables 10
+user4 stage/sql/init 3
+user4 stage/sql/Opening tables 6
+user4 stage/sql/starting 6
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 18
-localhost stage/sql/Init 20
-localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 13
+localhost stage/sql/checking permissions 16
+localhost stage/sql/closing tables 41
+localhost stage/sql/init 12
+localhost stage/sql/Opening tables 25
+localhost stage/sql/starting 24
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 20
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 24
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 20
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 24
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 0
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 0
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 0
+user3 statement/sp/freturn 1
user3 statement/sql/insert 1
-user3 statement/sql/select 2
+user3 statement/sql/select 3
user4 statement/com/Error 0
user4 statement/com/Quit 0
+user4 statement/sp/freturn 1
user4 statement/sql/insert 1
-user4 statement/sql/select 2
+user4 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 0
+localhost statement/sp/freturn 4
localhost statement/sql/insert 4
-localhost statement/sql/select 8
+localhost statement/sql/select 12
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -1119,139 +1203,144 @@ call dump_thread();
username status
user1 not found
username event_name count_star
-user2 wait/io/file/sql/query_log 4
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 7
user2 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user3 wait/io/file/sql/query_log 4
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/io/file/sql/query_log 7
user3 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user4 wait/io/file/sql/query_log 4
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/io/file/sql/query_log 7
user4 wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_account;
user host event_name count_star
execute dump_waits_user;
user event_name count_star
-user1 wait/io/file/sql/query_log 5
-user1 wait/synch/mutex/sql/LOCK_connection_count 1
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 8
user1 wait/synch/rwlock/sql/LOCK_grant 1
-user2 wait/io/file/sql/query_log 4
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 7
user2 wait/synch/rwlock/sql/LOCK_grant 1
-user3 wait/io/file/sql/query_log 4
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/io/file/sql/query_log 7
user3 wait/synch/rwlock/sql/LOCK_grant 1
-user4 wait/io/file/sql/query_log 4
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/io/file/sql/query_log 7
user4 wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_host;
host event_name count_star
-localhost wait/io/file/sql/query_log 17
-localhost wait/synch/mutex/sql/LOCK_connection_count 1
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/io/file/sql/query_log 29
localhost wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 17
-wait/synch/mutex/sql/LOCK_connection_count 1
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 29
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 17
-wait/synch/mutex/sql/LOCK_connection_count 1
+wait/io/file/sql/query_log 29
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
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 6
-user1 stage/sql/Init 6
-user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 4
-user2 stage/sql/Checking permissions 3
-user2 stage/sql/Closing tables 4
-user2 stage/sql/Init 5
-user2 stage/sql/Init for update 1
-user2 stage/sql/Opening tables 3
-user3 stage/sql/Checking permissions 3
-user3 stage/sql/Closing tables 4
-user3 stage/sql/Init 5
-user3 stage/sql/Init for update 1
-user3 stage/sql/Opening tables 3
-user4 stage/sql/Checking permissions 3
-user4 stage/sql/Closing tables 4
-user4 stage/sql/Init 5
-user4 stage/sql/Init for update 1
-user4 stage/sql/Opening tables 3
+user1 stage/sql/checking permissions 4
+user1 stage/sql/closing tables 11
+user1 stage/sql/init 3
+user1 stage/sql/Opening tables 7
+user1 stage/sql/starting 7
+user2 stage/sql/checking permissions 4
+user2 stage/sql/closing tables 10
+user2 stage/sql/init 3
+user2 stage/sql/Opening tables 6
+user2 stage/sql/starting 6
+user3 stage/sql/checking permissions 4
+user3 stage/sql/closing tables 10
+user3 stage/sql/init 3
+user3 stage/sql/Opening tables 6
+user3 stage/sql/starting 6
+user4 stage/sql/checking permissions 4
+user4 stage/sql/closing tables 10
+user4 stage/sql/init 3
+user4 stage/sql/Opening tables 6
+user4 stage/sql/starting 6
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 18
-localhost stage/sql/Init 21
-localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 13
+localhost stage/sql/checking permissions 16
+localhost stage/sql/closing tables 41
+localhost stage/sql/init 12
+localhost stage/sql/Opening tables 25
+localhost stage/sql/starting 25
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 21
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 25
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 21
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 25
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 1
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 0
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 0
+user3 statement/sp/freturn 1
user3 statement/sql/insert 1
-user3 statement/sql/select 2
+user3 statement/sql/select 3
user4 statement/com/Error 0
user4 statement/com/Quit 0
+user4 statement/sp/freturn 1
user4 statement/sql/insert 1
-user4 statement/sql/select 2
+user4 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 1
+localhost statement/sp/freturn 4
localhost statement/sql/insert 4
-localhost statement/sql/select 8
+localhost statement/sql/select 12
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 1
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 1
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -1273,134 +1362,141 @@ user1 not found
username status
user2 not found
username event_name count_star
-user3 wait/io/file/sql/query_log 4
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/io/file/sql/query_log 7
user3 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user4 wait/io/file/sql/query_log 4
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/io/file/sql/query_log 7
user4 wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_account;
user host event_name count_star
execute dump_waits_user;
user event_name count_star
-user1 wait/io/file/sql/query_log 5
-user1 wait/synch/mutex/sql/LOCK_connection_count 1
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 8
user1 wait/synch/rwlock/sql/LOCK_grant 1
-user2 wait/io/file/sql/query_log 5
-user2 wait/synch/mutex/sql/LOCK_connection_count 1
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 8
user2 wait/synch/rwlock/sql/LOCK_grant 1
-user3 wait/io/file/sql/query_log 4
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/io/file/sql/query_log 7
user3 wait/synch/rwlock/sql/LOCK_grant 1
-user4 wait/io/file/sql/query_log 4
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/io/file/sql/query_log 7
user4 wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_host;
host event_name count_star
-localhost wait/io/file/sql/query_log 18
-localhost wait/synch/mutex/sql/LOCK_connection_count 2
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/io/file/sql/query_log 30
localhost wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 18
-wait/synch/mutex/sql/LOCK_connection_count 2
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 30
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 18
-wait/synch/mutex/sql/LOCK_connection_count 2
+wait/io/file/sql/query_log 30
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
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 6
-user1 stage/sql/Init 6
-user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 4
-user2 stage/sql/Checking permissions 3
-user2 stage/sql/Closing tables 4
-user2 stage/sql/Init 6
-user2 stage/sql/Init for update 1
-user2 stage/sql/Opening tables 3
-user3 stage/sql/Checking permissions 3
-user3 stage/sql/Closing tables 4
-user3 stage/sql/Init 5
-user3 stage/sql/Init for update 1
-user3 stage/sql/Opening tables 3
-user4 stage/sql/Checking permissions 3
-user4 stage/sql/Closing tables 4
-user4 stage/sql/Init 5
-user4 stage/sql/Init for update 1
-user4 stage/sql/Opening tables 3
+user1 stage/sql/checking permissions 4
+user1 stage/sql/closing tables 11
+user1 stage/sql/init 3
+user1 stage/sql/Opening tables 7
+user1 stage/sql/starting 7
+user2 stage/sql/checking permissions 4
+user2 stage/sql/closing tables 10
+user2 stage/sql/init 3
+user2 stage/sql/Opening tables 6
+user2 stage/sql/starting 7
+user3 stage/sql/checking permissions 4
+user3 stage/sql/closing tables 10
+user3 stage/sql/init 3
+user3 stage/sql/Opening tables 6
+user3 stage/sql/starting 6
+user4 stage/sql/checking permissions 4
+user4 stage/sql/closing tables 10
+user4 stage/sql/init 3
+user4 stage/sql/Opening tables 6
+user4 stage/sql/starting 6
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 18
-localhost stage/sql/Init 22
-localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 13
+localhost stage/sql/checking permissions 16
+localhost stage/sql/closing tables 41
+localhost stage/sql/init 12
+localhost stage/sql/Opening tables 25
+localhost stage/sql/starting 26
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 22
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 26
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 22
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 26
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 1
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 1
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 0
+user3 statement/sp/freturn 1
user3 statement/sql/insert 1
-user3 statement/sql/select 2
+user3 statement/sql/select 3
user4 statement/com/Error 0
user4 statement/com/Quit 0
+user4 statement/sp/freturn 1
user4 statement/sql/insert 1
-user4 statement/sql/select 2
+user4 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 2
+localhost statement/sp/freturn 4
localhost statement/sql/insert 4
-localhost statement/sql/select 8
+localhost statement/sql/select 12
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 2
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 2
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -1424,129 +1520,138 @@ user2 not found
username status
user3 not found
username event_name count_star
-user4 wait/io/file/sql/query_log 4
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/io/file/sql/query_log 7
user4 wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_account;
user host event_name count_star
execute dump_waits_user;
user event_name count_star
-user1 wait/io/file/sql/query_log 5
-user1 wait/synch/mutex/sql/LOCK_connection_count 1
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 8
user1 wait/synch/rwlock/sql/LOCK_grant 1
-user2 wait/io/file/sql/query_log 5
-user2 wait/synch/mutex/sql/LOCK_connection_count 1
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 8
user2 wait/synch/rwlock/sql/LOCK_grant 1
-user3 wait/io/file/sql/query_log 5
-user3 wait/synch/mutex/sql/LOCK_connection_count 1
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/io/file/sql/query_log 8
user3 wait/synch/rwlock/sql/LOCK_grant 1
-user4 wait/io/file/sql/query_log 4
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/io/file/sql/query_log 7
user4 wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_host;
host event_name count_star
-localhost wait/io/file/sql/query_log 19
-localhost wait/synch/mutex/sql/LOCK_connection_count 3
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/io/file/sql/query_log 31
localhost wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 19
-wait/synch/mutex/sql/LOCK_connection_count 3
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 31
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 19
-wait/synch/mutex/sql/LOCK_connection_count 3
+wait/io/file/sql/query_log 31
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
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 6
-user1 stage/sql/Init 6
-user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 4
-user2 stage/sql/Checking permissions 3
-user2 stage/sql/Closing tables 4
-user2 stage/sql/Init 6
-user2 stage/sql/Init for update 1
-user2 stage/sql/Opening tables 3
-user3 stage/sql/Checking permissions 3
-user3 stage/sql/Closing tables 4
-user3 stage/sql/Init 6
-user3 stage/sql/Init for update 1
-user3 stage/sql/Opening tables 3
-user4 stage/sql/Checking permissions 3
-user4 stage/sql/Closing tables 4
-user4 stage/sql/Init 5
-user4 stage/sql/Init for update 1
-user4 stage/sql/Opening tables 3
+user1 stage/sql/checking permissions 4
+user1 stage/sql/closing tables 11
+user1 stage/sql/init 3
+user1 stage/sql/Opening tables 7
+user1 stage/sql/starting 7
+user2 stage/sql/checking permissions 4
+user2 stage/sql/closing tables 10
+user2 stage/sql/init 3
+user2 stage/sql/Opening tables 6
+user2 stage/sql/starting 7
+user3 stage/sql/checking permissions 4
+user3 stage/sql/closing tables 10
+user3 stage/sql/init 3
+user3 stage/sql/Opening tables 6
+user3 stage/sql/starting 7
+user4 stage/sql/checking permissions 4
+user4 stage/sql/closing tables 10
+user4 stage/sql/init 3
+user4 stage/sql/Opening tables 6
+user4 stage/sql/starting 6
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 18
-localhost stage/sql/Init 23
-localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 13
+localhost stage/sql/checking permissions 16
+localhost stage/sql/closing tables 41
+localhost stage/sql/init 12
+localhost stage/sql/Opening tables 25
+localhost stage/sql/starting 27
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 23
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 27
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 23
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 27
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 1
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 1
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 1
+user3 statement/sp/freturn 1
user3 statement/sql/insert 1
-user3 statement/sql/select 2
+user3 statement/sql/select 3
user4 statement/com/Error 0
user4 statement/com/Quit 0
+user4 statement/sp/freturn 1
user4 statement/sql/insert 1
-user4 statement/sql/select 2
+user4 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 3
+localhost statement/sp/freturn 4
localhost statement/sql/insert 4
-localhost statement/sql/select 8
+localhost statement/sql/select 12
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 3
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 3
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -1575,121 +1680,132 @@ execute dump_waits_account;
user host event_name count_star
execute dump_waits_user;
user event_name count_star
-user1 wait/io/file/sql/query_log 5
-user1 wait/synch/mutex/sql/LOCK_connection_count 1
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 8
user1 wait/synch/rwlock/sql/LOCK_grant 1
-user2 wait/io/file/sql/query_log 5
-user2 wait/synch/mutex/sql/LOCK_connection_count 1
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 8
user2 wait/synch/rwlock/sql/LOCK_grant 1
-user3 wait/io/file/sql/query_log 5
-user3 wait/synch/mutex/sql/LOCK_connection_count 1
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/io/file/sql/query_log 8
user3 wait/synch/rwlock/sql/LOCK_grant 1
-user4 wait/io/file/sql/query_log 5
-user4 wait/synch/mutex/sql/LOCK_connection_count 1
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/io/file/sql/query_log 8
user4 wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_host;
host event_name count_star
-localhost wait/io/file/sql/query_log 20
-localhost wait/synch/mutex/sql/LOCK_connection_count 4
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/io/file/sql/query_log 32
localhost wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
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 6
-user1 stage/sql/Init 6
-user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 4
-user2 stage/sql/Checking permissions 3
-user2 stage/sql/Closing tables 4
-user2 stage/sql/Init 6
-user2 stage/sql/Init for update 1
-user2 stage/sql/Opening tables 3
-user3 stage/sql/Checking permissions 3
-user3 stage/sql/Closing tables 4
-user3 stage/sql/Init 6
-user3 stage/sql/Init for update 1
-user3 stage/sql/Opening tables 3
-user4 stage/sql/Checking permissions 3
-user4 stage/sql/Closing tables 4
-user4 stage/sql/Init 6
-user4 stage/sql/Init for update 1
-user4 stage/sql/Opening tables 3
+user1 stage/sql/checking permissions 4
+user1 stage/sql/closing tables 11
+user1 stage/sql/init 3
+user1 stage/sql/Opening tables 7
+user1 stage/sql/starting 7
+user2 stage/sql/checking permissions 4
+user2 stage/sql/closing tables 10
+user2 stage/sql/init 3
+user2 stage/sql/Opening tables 6
+user2 stage/sql/starting 7
+user3 stage/sql/checking permissions 4
+user3 stage/sql/closing tables 10
+user3 stage/sql/init 3
+user3 stage/sql/Opening tables 6
+user3 stage/sql/starting 7
+user4 stage/sql/checking permissions 4
+user4 stage/sql/closing tables 10
+user4 stage/sql/init 3
+user4 stage/sql/Opening tables 6
+user4 stage/sql/starting 7
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 18
-localhost stage/sql/Init 24
-localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 13
+localhost stage/sql/checking permissions 16
+localhost stage/sql/closing tables 41
+localhost stage/sql/init 12
+localhost stage/sql/Opening tables 25
+localhost stage/sql/starting 28
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 1
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 1
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 1
+user3 statement/sp/freturn 1
user3 statement/sql/insert 1
-user3 statement/sql/select 2
+user3 statement/sql/select 3
user4 statement/com/Error 0
user4 statement/com/Quit 1
+user4 statement/sp/freturn 1
user4 statement/sql/insert 1
-user4 statement/sql/select 2
+user4 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 4
+localhost statement/sp/freturn 4
localhost statement/sql/insert 4
-localhost statement/sql/select 8
+localhost statement/sql/select 12
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -1719,121 +1835,132 @@ execute dump_waits_account;
user host event_name count_star
execute dump_waits_user;
user event_name count_star
-user1 wait/io/file/sql/query_log 5
-user1 wait/synch/mutex/sql/LOCK_connection_count 1
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 8
user1 wait/synch/rwlock/sql/LOCK_grant 1
-user2 wait/io/file/sql/query_log 5
-user2 wait/synch/mutex/sql/LOCK_connection_count 1
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 8
user2 wait/synch/rwlock/sql/LOCK_grant 1
-user3 wait/io/file/sql/query_log 5
-user3 wait/synch/mutex/sql/LOCK_connection_count 1
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/io/file/sql/query_log 8
user3 wait/synch/rwlock/sql/LOCK_grant 1
-user4 wait/io/file/sql/query_log 5
-user4 wait/synch/mutex/sql/LOCK_connection_count 1
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/io/file/sql/query_log 8
user4 wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_host;
host event_name count_star
-localhost wait/io/file/sql/query_log 20
-localhost wait/synch/mutex/sql/LOCK_connection_count 4
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/io/file/sql/query_log 32
localhost wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
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 6
-user1 stage/sql/Init 6
-user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 4
-user2 stage/sql/Checking permissions 3
-user2 stage/sql/Closing tables 4
-user2 stage/sql/Init 6
-user2 stage/sql/Init for update 1
-user2 stage/sql/Opening tables 3
-user3 stage/sql/Checking permissions 3
-user3 stage/sql/Closing tables 4
-user3 stage/sql/Init 6
-user3 stage/sql/Init for update 1
-user3 stage/sql/Opening tables 3
-user4 stage/sql/Checking permissions 3
-user4 stage/sql/Closing tables 4
-user4 stage/sql/Init 6
-user4 stage/sql/Init for update 1
-user4 stage/sql/Opening tables 3
+user1 stage/sql/checking permissions 4
+user1 stage/sql/closing tables 11
+user1 stage/sql/init 3
+user1 stage/sql/Opening tables 7
+user1 stage/sql/starting 7
+user2 stage/sql/checking permissions 4
+user2 stage/sql/closing tables 10
+user2 stage/sql/init 3
+user2 stage/sql/Opening tables 6
+user2 stage/sql/starting 7
+user3 stage/sql/checking permissions 4
+user3 stage/sql/closing tables 10
+user3 stage/sql/init 3
+user3 stage/sql/Opening tables 6
+user3 stage/sql/starting 7
+user4 stage/sql/checking permissions 4
+user4 stage/sql/closing tables 10
+user4 stage/sql/init 3
+user4 stage/sql/Opening tables 6
+user4 stage/sql/starting 7
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 18
-localhost stage/sql/Init 24
-localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 13
+localhost stage/sql/checking permissions 16
+localhost stage/sql/closing tables 41
+localhost stage/sql/init 12
+localhost stage/sql/Opening tables 25
+localhost stage/sql/starting 28
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 1
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 1
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 1
+user3 statement/sp/freturn 1
user3 statement/sql/insert 1
-user3 statement/sql/select 2
+user3 statement/sql/select 3
user4 statement/com/Error 0
user4 statement/com/Quit 1
+user4 statement/sp/freturn 1
user4 statement/sql/insert 1
-user4 statement/sql/select 2
+user4 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 4
+localhost statement/sp/freturn 4
localhost statement/sql/insert 4
-localhost statement/sql/select 8
+localhost statement/sql/select 12
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -1862,121 +1989,132 @@ execute dump_waits_account;
user host event_name count_star
execute dump_waits_user;
user event_name count_star
-user1 wait/io/file/sql/query_log 5
-user1 wait/synch/mutex/sql/LOCK_connection_count 1
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 8
user1 wait/synch/rwlock/sql/LOCK_grant 1
-user2 wait/io/file/sql/query_log 5
-user2 wait/synch/mutex/sql/LOCK_connection_count 1
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 8
user2 wait/synch/rwlock/sql/LOCK_grant 1
-user3 wait/io/file/sql/query_log 5
-user3 wait/synch/mutex/sql/LOCK_connection_count 1
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/io/file/sql/query_log 8
user3 wait/synch/rwlock/sql/LOCK_grant 1
-user4 wait/io/file/sql/query_log 5
-user4 wait/synch/mutex/sql/LOCK_connection_count 1
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/io/file/sql/query_log 8
user4 wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_host;
host event_name count_star
-localhost wait/io/file/sql/query_log 20
-localhost wait/synch/mutex/sql/LOCK_connection_count 4
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/io/file/sql/query_log 32
localhost wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
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 6
-user1 stage/sql/Init 6
-user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 4
-user2 stage/sql/Checking permissions 3
-user2 stage/sql/Closing tables 4
-user2 stage/sql/Init 6
-user2 stage/sql/Init for update 1
-user2 stage/sql/Opening tables 3
-user3 stage/sql/Checking permissions 3
-user3 stage/sql/Closing tables 4
-user3 stage/sql/Init 6
-user3 stage/sql/Init for update 1
-user3 stage/sql/Opening tables 3
-user4 stage/sql/Checking permissions 3
-user4 stage/sql/Closing tables 4
-user4 stage/sql/Init 6
-user4 stage/sql/Init for update 1
-user4 stage/sql/Opening tables 3
+user1 stage/sql/checking permissions 4
+user1 stage/sql/closing tables 11
+user1 stage/sql/init 3
+user1 stage/sql/Opening tables 7
+user1 stage/sql/starting 7
+user2 stage/sql/checking permissions 4
+user2 stage/sql/closing tables 10
+user2 stage/sql/init 3
+user2 stage/sql/Opening tables 6
+user2 stage/sql/starting 7
+user3 stage/sql/checking permissions 4
+user3 stage/sql/closing tables 10
+user3 stage/sql/init 3
+user3 stage/sql/Opening tables 6
+user3 stage/sql/starting 7
+user4 stage/sql/checking permissions 4
+user4 stage/sql/closing tables 10
+user4 stage/sql/init 3
+user4 stage/sql/Opening tables 6
+user4 stage/sql/starting 7
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 18
-localhost stage/sql/Init 24
-localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 13
+localhost stage/sql/checking permissions 16
+localhost stage/sql/closing tables 41
+localhost stage/sql/init 12
+localhost stage/sql/Opening tables 25
+localhost stage/sql/starting 28
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 1
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 1
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 1
+user3 statement/sp/freturn 1
user3 statement/sql/insert 1
-user3 statement/sql/select 2
+user3 statement/sql/select 3
user4 statement/com/Error 0
user4 statement/com/Quit 1
+user4 statement/sp/freturn 1
user4 statement/sql/insert 1
-user4 statement/sql/select 2
+user4 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 4
+localhost statement/sp/freturn 4
localhost statement/sql/insert 4
-localhost statement/sql/select 8
+localhost statement/sql/select 12
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -2006,120 +2144,131 @@ user host event_name count_star
execute dump_waits_user;
user event_name count_star
user1 wait/io/file/sql/query_log 0
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
user1 wait/synch/rwlock/sql/LOCK_grant 0
user2 wait/io/file/sql/query_log 0
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
user2 wait/synch/rwlock/sql/LOCK_grant 0
user3 wait/io/file/sql/query_log 0
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
user3 wait/synch/rwlock/sql/LOCK_grant 0
user4 wait/io/file/sql/query_log 0
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
user4 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/file/sql/query_log 20
-localhost wait/synch/mutex/sql/LOCK_connection_count 4
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/io/file/sql/query_log 32
localhost wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
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 6
-user1 stage/sql/Init 6
-user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 4
-user2 stage/sql/Checking permissions 3
-user2 stage/sql/Closing tables 4
-user2 stage/sql/Init 6
-user2 stage/sql/Init for update 1
-user2 stage/sql/Opening tables 3
-user3 stage/sql/Checking permissions 3
-user3 stage/sql/Closing tables 4
-user3 stage/sql/Init 6
-user3 stage/sql/Init for update 1
-user3 stage/sql/Opening tables 3
-user4 stage/sql/Checking permissions 3
-user4 stage/sql/Closing tables 4
-user4 stage/sql/Init 6
-user4 stage/sql/Init for update 1
-user4 stage/sql/Opening tables 3
+user1 stage/sql/checking permissions 4
+user1 stage/sql/closing tables 11
+user1 stage/sql/init 3
+user1 stage/sql/Opening tables 7
+user1 stage/sql/starting 7
+user2 stage/sql/checking permissions 4
+user2 stage/sql/closing tables 10
+user2 stage/sql/init 3
+user2 stage/sql/Opening tables 6
+user2 stage/sql/starting 7
+user3 stage/sql/checking permissions 4
+user3 stage/sql/closing tables 10
+user3 stage/sql/init 3
+user3 stage/sql/Opening tables 6
+user3 stage/sql/starting 7
+user4 stage/sql/checking permissions 4
+user4 stage/sql/closing tables 10
+user4 stage/sql/init 3
+user4 stage/sql/Opening tables 6
+user4 stage/sql/starting 7
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 18
-localhost stage/sql/Init 24
-localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 13
+localhost stage/sql/checking permissions 16
+localhost stage/sql/closing tables 41
+localhost stage/sql/init 12
+localhost stage/sql/Opening tables 25
+localhost stage/sql/starting 28
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 1
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 1
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 1
+user3 statement/sp/freturn 1
user3 statement/sql/insert 1
-user3 statement/sql/select 2
+user3 statement/sql/select 3
user4 statement/com/Error 0
user4 statement/com/Quit 1
+user4 statement/sp/freturn 1
user4 statement/sql/insert 1
-user4 statement/sql/select 2
+user4 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 4
+localhost statement/sp/freturn 4
localhost statement/sql/insert 4
-localhost statement/sql/select 8
+localhost statement/sql/select 12
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -2149,120 +2298,131 @@ user host event_name count_star
execute dump_waits_user;
user event_name count_star
user1 wait/io/file/sql/query_log 0
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
user1 wait/synch/rwlock/sql/LOCK_grant 0
user2 wait/io/file/sql/query_log 0
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
user2 wait/synch/rwlock/sql/LOCK_grant 0
user3 wait/io/file/sql/query_log 0
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
user3 wait/synch/rwlock/sql/LOCK_grant 0
user4 wait/io/file/sql/query_log 0
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
user4 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_host;
host event_name count_star
localhost wait/io/file/sql/query_log 0
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
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 6
-user1 stage/sql/Init 6
-user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 4
-user2 stage/sql/Checking permissions 3
-user2 stage/sql/Closing tables 4
-user2 stage/sql/Init 6
-user2 stage/sql/Init for update 1
-user2 stage/sql/Opening tables 3
-user3 stage/sql/Checking permissions 3
-user3 stage/sql/Closing tables 4
-user3 stage/sql/Init 6
-user3 stage/sql/Init for update 1
-user3 stage/sql/Opening tables 3
-user4 stage/sql/Checking permissions 3
-user4 stage/sql/Closing tables 4
-user4 stage/sql/Init 6
-user4 stage/sql/Init for update 1
-user4 stage/sql/Opening tables 3
+user1 stage/sql/checking permissions 4
+user1 stage/sql/closing tables 11
+user1 stage/sql/init 3
+user1 stage/sql/Opening tables 7
+user1 stage/sql/starting 7
+user2 stage/sql/checking permissions 4
+user2 stage/sql/closing tables 10
+user2 stage/sql/init 3
+user2 stage/sql/Opening tables 6
+user2 stage/sql/starting 7
+user3 stage/sql/checking permissions 4
+user3 stage/sql/closing tables 10
+user3 stage/sql/init 3
+user3 stage/sql/Opening tables 6
+user3 stage/sql/starting 7
+user4 stage/sql/checking permissions 4
+user4 stage/sql/closing tables 10
+user4 stage/sql/init 3
+user4 stage/sql/Opening tables 6
+user4 stage/sql/starting 7
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 18
-localhost stage/sql/Init 24
-localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 13
+localhost stage/sql/checking permissions 16
+localhost stage/sql/closing tables 41
+localhost stage/sql/init 12
+localhost stage/sql/Opening tables 25
+localhost stage/sql/starting 28
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 1
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 1
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 1
+user3 statement/sp/freturn 1
user3 statement/sql/insert 1
-user3 statement/sql/select 2
+user3 statement/sql/select 3
user4 statement/com/Error 0
user4 statement/com/Quit 1
+user4 statement/sp/freturn 1
user4 statement/sql/insert 1
-user4 statement/sql/select 2
+user4 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 4
+localhost statement/sp/freturn 4
localhost statement/sql/insert 4
-localhost statement/sql/select 8
+localhost statement/sql/select 12
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -2292,120 +2452,131 @@ user host event_name count_star
execute dump_waits_user;
user event_name count_star
user1 wait/io/file/sql/query_log 0
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
user1 wait/synch/rwlock/sql/LOCK_grant 0
user2 wait/io/file/sql/query_log 0
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
user2 wait/synch/rwlock/sql/LOCK_grant 0
user3 wait/io/file/sql/query_log 0
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
user3 wait/synch/rwlock/sql/LOCK_grant 0
user4 wait/io/file/sql/query_log 0
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
user4 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_host;
host event_name count_star
localhost wait/io/file/sql/query_log 0
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
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 6
-user1 stage/sql/Init 6
-user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 4
-user2 stage/sql/Checking permissions 3
-user2 stage/sql/Closing tables 4
-user2 stage/sql/Init 6
-user2 stage/sql/Init for update 1
-user2 stage/sql/Opening tables 3
-user3 stage/sql/Checking permissions 3
-user3 stage/sql/Closing tables 4
-user3 stage/sql/Init 6
-user3 stage/sql/Init for update 1
-user3 stage/sql/Opening tables 3
-user4 stage/sql/Checking permissions 3
-user4 stage/sql/Closing tables 4
-user4 stage/sql/Init 6
-user4 stage/sql/Init for update 1
-user4 stage/sql/Opening tables 3
+user1 stage/sql/checking permissions 4
+user1 stage/sql/closing tables 11
+user1 stage/sql/init 3
+user1 stage/sql/Opening tables 7
+user1 stage/sql/starting 7
+user2 stage/sql/checking permissions 4
+user2 stage/sql/closing tables 10
+user2 stage/sql/init 3
+user2 stage/sql/Opening tables 6
+user2 stage/sql/starting 7
+user3 stage/sql/checking permissions 4
+user3 stage/sql/closing tables 10
+user3 stage/sql/init 3
+user3 stage/sql/Opening tables 6
+user3 stage/sql/starting 7
+user4 stage/sql/checking permissions 4
+user4 stage/sql/closing tables 10
+user4 stage/sql/init 3
+user4 stage/sql/Opening tables 6
+user4 stage/sql/starting 7
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 18
-localhost stage/sql/Init 24
-localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 13
+localhost stage/sql/checking permissions 16
+localhost stage/sql/closing tables 41
+localhost stage/sql/init 12
+localhost stage/sql/Opening tables 25
+localhost stage/sql/starting 28
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 1
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 1
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 1
+user3 statement/sp/freturn 1
user3 statement/sql/insert 1
-user3 statement/sql/select 2
+user3 statement/sql/select 3
user4 statement/com/Error 0
user4 statement/com/Quit 1
+user4 statement/sp/freturn 1
user4 statement/sql/insert 1
-user4 statement/sql/select 2
+user4 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 4
+localhost statement/sp/freturn 4
localhost statement/sql/insert 4
-localhost statement/sql/select 8
+localhost statement/sql/select 12
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -2435,120 +2606,131 @@ user host event_name count_star
execute dump_waits_user;
user event_name count_star
user1 wait/io/file/sql/query_log 0
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
user1 wait/synch/rwlock/sql/LOCK_grant 0
user2 wait/io/file/sql/query_log 0
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
user2 wait/synch/rwlock/sql/LOCK_grant 0
user3 wait/io/file/sql/query_log 0
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
user3 wait/synch/rwlock/sql/LOCK_grant 0
user4 wait/io/file/sql/query_log 0
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
user4 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_host;
host event_name count_star
localhost wait/io/file/sql/query_log 0
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
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 6
-user1 stage/sql/Init 6
-user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 4
-user2 stage/sql/Checking permissions 3
-user2 stage/sql/Closing tables 4
-user2 stage/sql/Init 6
-user2 stage/sql/Init for update 1
-user2 stage/sql/Opening tables 3
-user3 stage/sql/Checking permissions 3
-user3 stage/sql/Closing tables 4
-user3 stage/sql/Init 6
-user3 stage/sql/Init for update 1
-user3 stage/sql/Opening tables 3
-user4 stage/sql/Checking permissions 3
-user4 stage/sql/Closing tables 4
-user4 stage/sql/Init 6
-user4 stage/sql/Init for update 1
-user4 stage/sql/Opening tables 3
+user1 stage/sql/checking permissions 4
+user1 stage/sql/closing tables 11
+user1 stage/sql/init 3
+user1 stage/sql/Opening tables 7
+user1 stage/sql/starting 7
+user2 stage/sql/checking permissions 4
+user2 stage/sql/closing tables 10
+user2 stage/sql/init 3
+user2 stage/sql/Opening tables 6
+user2 stage/sql/starting 7
+user3 stage/sql/checking permissions 4
+user3 stage/sql/closing tables 10
+user3 stage/sql/init 3
+user3 stage/sql/Opening tables 6
+user3 stage/sql/starting 7
+user4 stage/sql/checking permissions 4
+user4 stage/sql/closing tables 10
+user4 stage/sql/init 3
+user4 stage/sql/Opening tables 6
+user4 stage/sql/starting 7
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 18
-localhost stage/sql/Init 24
-localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 13
+localhost stage/sql/checking permissions 16
+localhost stage/sql/closing tables 41
+localhost stage/sql/init 12
+localhost stage/sql/Opening tables 25
+localhost stage/sql/starting 28
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 1
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 1
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 1
+user3 statement/sp/freturn 1
user3 statement/sql/insert 1
-user3 statement/sql/select 2
+user3 statement/sql/select 3
user4 statement/com/Error 0
user4 statement/com/Quit 1
+user4 statement/sp/freturn 1
user4 statement/sql/insert 1
-user4 statement/sql/select 2
+user4 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 4
+localhost statement/sp/freturn 4
localhost statement/sql/insert 4
-localhost statement/sql/select 8
+localhost statement/sql/select 12
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -2578,120 +2760,131 @@ user host event_name count_star
execute dump_waits_user;
user event_name count_star
user1 wait/io/file/sql/query_log 0
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
user1 wait/synch/rwlock/sql/LOCK_grant 0
user2 wait/io/file/sql/query_log 0
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
user2 wait/synch/rwlock/sql/LOCK_grant 0
user3 wait/io/file/sql/query_log 0
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
user3 wait/synch/rwlock/sql/LOCK_grant 0
user4 wait/io/file/sql/query_log 0
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
user4 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_host;
host event_name count_star
localhost wait/io/file/sql/query_log 0
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
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 6
-user1 stage/sql/Init 6
-user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 4
-user2 stage/sql/Checking permissions 3
-user2 stage/sql/Closing tables 4
-user2 stage/sql/Init 6
-user2 stage/sql/Init for update 1
-user2 stage/sql/Opening tables 3
-user3 stage/sql/Checking permissions 3
-user3 stage/sql/Closing tables 4
-user3 stage/sql/Init 6
-user3 stage/sql/Init for update 1
-user3 stage/sql/Opening tables 3
-user4 stage/sql/Checking permissions 3
-user4 stage/sql/Closing tables 4
-user4 stage/sql/Init 6
-user4 stage/sql/Init for update 1
-user4 stage/sql/Opening tables 3
+user1 stage/sql/checking permissions 4
+user1 stage/sql/closing tables 11
+user1 stage/sql/init 3
+user1 stage/sql/Opening tables 7
+user1 stage/sql/starting 7
+user2 stage/sql/checking permissions 4
+user2 stage/sql/closing tables 10
+user2 stage/sql/init 3
+user2 stage/sql/Opening tables 6
+user2 stage/sql/starting 7
+user3 stage/sql/checking permissions 4
+user3 stage/sql/closing tables 10
+user3 stage/sql/init 3
+user3 stage/sql/Opening tables 6
+user3 stage/sql/starting 7
+user4 stage/sql/checking permissions 4
+user4 stage/sql/closing tables 10
+user4 stage/sql/init 3
+user4 stage/sql/Opening tables 6
+user4 stage/sql/starting 7
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 18
-localhost stage/sql/Init 24
-localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 13
+localhost stage/sql/checking permissions 16
+localhost stage/sql/closing tables 41
+localhost stage/sql/init 12
+localhost stage/sql/Opening tables 25
+localhost stage/sql/starting 28
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 1
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 1
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 1
+user3 statement/sp/freturn 1
user3 statement/sql/insert 1
-user3 statement/sql/select 2
+user3 statement/sql/select 3
user4 statement/com/Error 0
user4 statement/com/Quit 1
+user4 statement/sp/freturn 1
user4 statement/sql/insert 1
-user4 statement/sql/select 2
+user4 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 4
+localhost statement/sp/freturn 4
localhost statement/sql/insert 4
-localhost statement/sql/select 8
+localhost statement/sql/select 12
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -2721,120 +2914,131 @@ user host event_name count_star
execute dump_waits_user;
user event_name count_star
user1 wait/io/file/sql/query_log 0
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
user1 wait/synch/rwlock/sql/LOCK_grant 0
user2 wait/io/file/sql/query_log 0
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
user2 wait/synch/rwlock/sql/LOCK_grant 0
user3 wait/io/file/sql/query_log 0
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
user3 wait/synch/rwlock/sql/LOCK_grant 0
user4 wait/io/file/sql/query_log 0
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
user4 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_host;
host event_name count_star
localhost wait/io/file/sql/query_log 0
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
execute dump_stages_user;
user event_name count_star
-user1 stage/sql/Checking permissions 0
-user1 stage/sql/Closing tables 0
-user1 stage/sql/Init 0
-user1 stage/sql/Init for update 0
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
user1 stage/sql/Opening tables 0
-user2 stage/sql/Checking permissions 0
-user2 stage/sql/Closing tables 0
-user2 stage/sql/Init 0
-user2 stage/sql/Init for update 0
+user1 stage/sql/starting 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
user2 stage/sql/Opening tables 0
-user3 stage/sql/Checking permissions 0
-user3 stage/sql/Closing tables 0
-user3 stage/sql/Init 0
-user3 stage/sql/Init for update 0
+user2 stage/sql/starting 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
user3 stage/sql/Opening tables 0
-user4 stage/sql/Checking permissions 0
-user4 stage/sql/Closing tables 0
-user4 stage/sql/Init 0
-user4 stage/sql/Init for update 0
+user3 stage/sql/starting 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
user4 stage/sql/Opening tables 0
+user4 stage/sql/starting 0
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 18
-localhost stage/sql/Init 24
-localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 13
+localhost stage/sql/checking permissions 16
+localhost stage/sql/closing tables 41
+localhost stage/sql/init 12
+localhost stage/sql/Opening tables 25
+localhost stage/sql/starting 28
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 1
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 1
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 1
+user3 statement/sp/freturn 1
user3 statement/sql/insert 1
-user3 statement/sql/select 2
+user3 statement/sql/select 3
user4 statement/com/Error 0
user4 statement/com/Quit 1
+user4 statement/sp/freturn 1
user4 statement/sql/insert 1
-user4 statement/sql/select 2
+user4 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 4
+localhost statement/sp/freturn 4
localhost statement/sql/insert 4
-localhost statement/sql/select 8
+localhost statement/sql/select 12
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -2864,120 +3068,131 @@ user host event_name count_star
execute dump_waits_user;
user event_name count_star
user1 wait/io/file/sql/query_log 0
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
user1 wait/synch/rwlock/sql/LOCK_grant 0
user2 wait/io/file/sql/query_log 0
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
user2 wait/synch/rwlock/sql/LOCK_grant 0
user3 wait/io/file/sql/query_log 0
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
user3 wait/synch/rwlock/sql/LOCK_grant 0
user4 wait/io/file/sql/query_log 0
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
user4 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_host;
host event_name count_star
localhost wait/io/file/sql/query_log 0
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
execute dump_stages_user;
user event_name count_star
-user1 stage/sql/Checking permissions 0
-user1 stage/sql/Closing tables 0
-user1 stage/sql/Init 0
-user1 stage/sql/Init for update 0
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
user1 stage/sql/Opening tables 0
-user2 stage/sql/Checking permissions 0
-user2 stage/sql/Closing tables 0
-user2 stage/sql/Init 0
-user2 stage/sql/Init for update 0
+user1 stage/sql/starting 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
user2 stage/sql/Opening tables 0
-user3 stage/sql/Checking permissions 0
-user3 stage/sql/Closing tables 0
-user3 stage/sql/Init 0
-user3 stage/sql/Init for update 0
+user2 stage/sql/starting 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
user3 stage/sql/Opening tables 0
-user4 stage/sql/Checking permissions 0
-user4 stage/sql/Closing tables 0
-user4 stage/sql/Init 0
-user4 stage/sql/Init for update 0
+user3 stage/sql/starting 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
user4 stage/sql/Opening tables 0
+user4 stage/sql/starting 0
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 0
-localhost stage/sql/Closing tables 0
-localhost stage/sql/Init 0
-localhost stage/sql/Init for update 0
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
localhost stage/sql/Opening tables 0
+localhost stage/sql/starting 0
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 1
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 1
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 1
+user3 statement/sp/freturn 1
user3 statement/sql/insert 1
-user3 statement/sql/select 2
+user3 statement/sql/select 3
user4 statement/com/Error 0
user4 statement/com/Quit 1
+user4 statement/sp/freturn 1
user4 statement/sql/insert 1
-user4 statement/sql/select 2
+user4 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 4
+localhost statement/sp/freturn 4
localhost statement/sql/insert 4
-localhost statement/sql/select 8
+localhost statement/sql/select 12
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -3007,120 +3222,131 @@ user host event_name count_star
execute dump_waits_user;
user event_name count_star
user1 wait/io/file/sql/query_log 0
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
user1 wait/synch/rwlock/sql/LOCK_grant 0
user2 wait/io/file/sql/query_log 0
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
user2 wait/synch/rwlock/sql/LOCK_grant 0
user3 wait/io/file/sql/query_log 0
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
user3 wait/synch/rwlock/sql/LOCK_grant 0
user4 wait/io/file/sql/query_log 0
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
user4 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_host;
host event_name count_star
localhost wait/io/file/sql/query_log 0
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
execute dump_stages_user;
user event_name count_star
-user1 stage/sql/Checking permissions 0
-user1 stage/sql/Closing tables 0
-user1 stage/sql/Init 0
-user1 stage/sql/Init for update 0
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
user1 stage/sql/Opening tables 0
-user2 stage/sql/Checking permissions 0
-user2 stage/sql/Closing tables 0
-user2 stage/sql/Init 0
-user2 stage/sql/Init for update 0
+user1 stage/sql/starting 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
user2 stage/sql/Opening tables 0
-user3 stage/sql/Checking permissions 0
-user3 stage/sql/Closing tables 0
-user3 stage/sql/Init 0
-user3 stage/sql/Init for update 0
+user2 stage/sql/starting 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
user3 stage/sql/Opening tables 0
-user4 stage/sql/Checking permissions 0
-user4 stage/sql/Closing tables 0
-user4 stage/sql/Init 0
-user4 stage/sql/Init for update 0
+user3 stage/sql/starting 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
user4 stage/sql/Opening tables 0
+user4 stage/sql/starting 0
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 0
-localhost stage/sql/Closing tables 0
-localhost stage/sql/Init 0
-localhost stage/sql/Init for update 0
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
localhost stage/sql/Opening tables 0
+localhost stage/sql/starting 0
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 1
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 1
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 1
+user3 statement/sp/freturn 1
user3 statement/sql/insert 1
-user3 statement/sql/select 2
+user3 statement/sql/select 3
user4 statement/com/Error 0
user4 statement/com/Quit 1
+user4 statement/sp/freturn 1
user4 statement/sql/insert 1
-user4 statement/sql/select 2
+user4 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 4
+localhost statement/sp/freturn 4
localhost statement/sql/insert 4
-localhost statement/sql/select 8
+localhost statement/sql/select 12
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -3150,120 +3376,131 @@ user host event_name count_star
execute dump_waits_user;
user event_name count_star
user1 wait/io/file/sql/query_log 0
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
user1 wait/synch/rwlock/sql/LOCK_grant 0
user2 wait/io/file/sql/query_log 0
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
user2 wait/synch/rwlock/sql/LOCK_grant 0
user3 wait/io/file/sql/query_log 0
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
user3 wait/synch/rwlock/sql/LOCK_grant 0
user4 wait/io/file/sql/query_log 0
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
user4 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_host;
host event_name count_star
localhost wait/io/file/sql/query_log 0
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
execute dump_stages_user;
user event_name count_star
-user1 stage/sql/Checking permissions 0
-user1 stage/sql/Closing tables 0
-user1 stage/sql/Init 0
-user1 stage/sql/Init for update 0
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
user1 stage/sql/Opening tables 0
-user2 stage/sql/Checking permissions 0
-user2 stage/sql/Closing tables 0
-user2 stage/sql/Init 0
-user2 stage/sql/Init for update 0
+user1 stage/sql/starting 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
user2 stage/sql/Opening tables 0
-user3 stage/sql/Checking permissions 0
-user3 stage/sql/Closing tables 0
-user3 stage/sql/Init 0
-user3 stage/sql/Init for update 0
+user2 stage/sql/starting 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
user3 stage/sql/Opening tables 0
-user4 stage/sql/Checking permissions 0
-user4 stage/sql/Closing tables 0
-user4 stage/sql/Init 0
-user4 stage/sql/Init for update 0
+user3 stage/sql/starting 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
user4 stage/sql/Opening tables 0
+user4 stage/sql/starting 0
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 0
-localhost stage/sql/Closing tables 0
-localhost stage/sql/Init 0
-localhost stage/sql/Init for update 0
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
localhost stage/sql/Opening tables 0
+localhost stage/sql/starting 0
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 1
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 1
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 1
+user3 statement/sp/freturn 1
user3 statement/sql/insert 1
-user3 statement/sql/select 2
+user3 statement/sql/select 3
user4 statement/com/Error 0
user4 statement/com/Quit 1
+user4 statement/sp/freturn 1
user4 statement/sql/insert 1
-user4 statement/sql/select 2
+user4 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 4
+localhost statement/sp/freturn 4
localhost statement/sql/insert 4
-localhost statement/sql/select 8
+localhost statement/sql/select 12
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -3293,120 +3530,131 @@ user host event_name count_star
execute dump_waits_user;
user event_name count_star
user1 wait/io/file/sql/query_log 0
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
user1 wait/synch/rwlock/sql/LOCK_grant 0
user2 wait/io/file/sql/query_log 0
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
user2 wait/synch/rwlock/sql/LOCK_grant 0
user3 wait/io/file/sql/query_log 0
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
user3 wait/synch/rwlock/sql/LOCK_grant 0
user4 wait/io/file/sql/query_log 0
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
user4 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_host;
host event_name count_star
localhost wait/io/file/sql/query_log 0
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
execute dump_stages_user;
user event_name count_star
-user1 stage/sql/Checking permissions 0
-user1 stage/sql/Closing tables 0
-user1 stage/sql/Init 0
-user1 stage/sql/Init for update 0
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
user1 stage/sql/Opening tables 0
-user2 stage/sql/Checking permissions 0
-user2 stage/sql/Closing tables 0
-user2 stage/sql/Init 0
-user2 stage/sql/Init for update 0
+user1 stage/sql/starting 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
user2 stage/sql/Opening tables 0
-user3 stage/sql/Checking permissions 0
-user3 stage/sql/Closing tables 0
-user3 stage/sql/Init 0
-user3 stage/sql/Init for update 0
+user2 stage/sql/starting 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
user3 stage/sql/Opening tables 0
-user4 stage/sql/Checking permissions 0
-user4 stage/sql/Closing tables 0
-user4 stage/sql/Init 0
-user4 stage/sql/Init for update 0
+user3 stage/sql/starting 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
user4 stage/sql/Opening tables 0
+user4 stage/sql/starting 0
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 0
-localhost stage/sql/Closing tables 0
-localhost stage/sql/Init 0
-localhost stage/sql/Init for update 0
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
localhost stage/sql/Opening tables 0
+localhost stage/sql/starting 0
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 1
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 1
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 1
+user3 statement/sp/freturn 1
user3 statement/sql/insert 1
-user3 statement/sql/select 2
+user3 statement/sql/select 3
user4 statement/com/Error 0
user4 statement/com/Quit 1
+user4 statement/sp/freturn 1
user4 statement/sql/insert 1
-user4 statement/sql/select 2
+user4 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 4
+localhost statement/sp/freturn 4
localhost statement/sql/insert 4
-localhost statement/sql/select 8
+localhost statement/sql/select 12
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -3436,120 +3684,131 @@ user host event_name count_star
execute dump_waits_user;
user event_name count_star
user1 wait/io/file/sql/query_log 0
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
user1 wait/synch/rwlock/sql/LOCK_grant 0
user2 wait/io/file/sql/query_log 0
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
user2 wait/synch/rwlock/sql/LOCK_grant 0
user3 wait/io/file/sql/query_log 0
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
user3 wait/synch/rwlock/sql/LOCK_grant 0
user4 wait/io/file/sql/query_log 0
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
user4 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_host;
host event_name count_star
localhost wait/io/file/sql/query_log 0
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
execute dump_stages_user;
user event_name count_star
-user1 stage/sql/Checking permissions 0
-user1 stage/sql/Closing tables 0
-user1 stage/sql/Init 0
-user1 stage/sql/Init for update 0
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
user1 stage/sql/Opening tables 0
-user2 stage/sql/Checking permissions 0
-user2 stage/sql/Closing tables 0
-user2 stage/sql/Init 0
-user2 stage/sql/Init for update 0
+user1 stage/sql/starting 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
user2 stage/sql/Opening tables 0
-user3 stage/sql/Checking permissions 0
-user3 stage/sql/Closing tables 0
-user3 stage/sql/Init 0
-user3 stage/sql/Init for update 0
+user2 stage/sql/starting 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
user3 stage/sql/Opening tables 0
-user4 stage/sql/Checking permissions 0
-user4 stage/sql/Closing tables 0
-user4 stage/sql/Init 0
-user4 stage/sql/Init for update 0
+user3 stage/sql/starting 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
user4 stage/sql/Opening tables 0
+user4 stage/sql/starting 0
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 0
-localhost stage/sql/Closing tables 0
-localhost stage/sql/Init 0
-localhost stage/sql/Init for update 0
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
localhost stage/sql/Opening tables 0
+localhost stage/sql/starting 0
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 0
+user1 statement/sp/freturn 0
user1 statement/sql/insert 0
user1 statement/sql/select 0
user2 statement/com/Error 0
user2 statement/com/Quit 0
+user2 statement/sp/freturn 0
user2 statement/sql/insert 0
user2 statement/sql/select 0
user3 statement/com/Error 0
user3 statement/com/Quit 0
+user3 statement/sp/freturn 0
user3 statement/sql/insert 0
user3 statement/sql/select 0
user4 statement/com/Error 0
user4 statement/com/Quit 0
+user4 statement/sp/freturn 0
user4 statement/sql/insert 0
user4 statement/sql/select 0
execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 4
+localhost statement/sp/freturn 4
localhost statement/sql/insert 4
-localhost statement/sql/select 8
+localhost statement/sql/select 12
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -3579,120 +3838,131 @@ user host event_name count_star
execute dump_waits_user;
user event_name count_star
user1 wait/io/file/sql/query_log 0
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
user1 wait/synch/rwlock/sql/LOCK_grant 0
user2 wait/io/file/sql/query_log 0
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
user2 wait/synch/rwlock/sql/LOCK_grant 0
user3 wait/io/file/sql/query_log 0
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
user3 wait/synch/rwlock/sql/LOCK_grant 0
user4 wait/io/file/sql/query_log 0
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
user4 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_host;
host event_name count_star
localhost wait/io/file/sql/query_log 0
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
execute dump_stages_user;
user event_name count_star
-user1 stage/sql/Checking permissions 0
-user1 stage/sql/Closing tables 0
-user1 stage/sql/Init 0
-user1 stage/sql/Init for update 0
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
user1 stage/sql/Opening tables 0
-user2 stage/sql/Checking permissions 0
-user2 stage/sql/Closing tables 0
-user2 stage/sql/Init 0
-user2 stage/sql/Init for update 0
+user1 stage/sql/starting 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
user2 stage/sql/Opening tables 0
-user3 stage/sql/Checking permissions 0
-user3 stage/sql/Closing tables 0
-user3 stage/sql/Init 0
-user3 stage/sql/Init for update 0
+user2 stage/sql/starting 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
user3 stage/sql/Opening tables 0
-user4 stage/sql/Checking permissions 0
-user4 stage/sql/Closing tables 0
-user4 stage/sql/Init 0
-user4 stage/sql/Init for update 0
+user3 stage/sql/starting 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
user4 stage/sql/Opening tables 0
+user4 stage/sql/starting 0
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 0
-localhost stage/sql/Closing tables 0
-localhost stage/sql/Init 0
-localhost stage/sql/Init for update 0
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
localhost stage/sql/Opening tables 0
+localhost stage/sql/starting 0
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 0
+user1 statement/sp/freturn 0
user1 statement/sql/insert 0
user1 statement/sql/select 0
user2 statement/com/Error 0
user2 statement/com/Quit 0
+user2 statement/sp/freturn 0
user2 statement/sql/insert 0
user2 statement/sql/select 0
user3 statement/com/Error 0
user3 statement/com/Quit 0
+user3 statement/sp/freturn 0
user3 statement/sql/insert 0
user3 statement/sql/select 0
user4 statement/com/Error 0
user4 statement/com/Quit 0
+user4 statement/sp/freturn 0
user4 statement/sql/insert 0
user4 statement/sql/select 0
execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 0
+localhost statement/sp/freturn 0
localhost statement/sql/insert 0
localhost statement/sql/select 0
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -3722,120 +3992,901 @@ user host event_name count_star
execute dump_waits_user;
user event_name count_star
user1 wait/io/file/sql/query_log 0
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
user1 wait/synch/rwlock/sql/LOCK_grant 0
user2 wait/io/file/sql/query_log 0
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
user2 wait/synch/rwlock/sql/LOCK_grant 0
user3 wait/io/file/sql/query_log 0
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
user3 wait/synch/rwlock/sql/LOCK_grant 0
user4 wait/io/file/sql/query_log 0
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
user4 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_host;
host event_name count_star
localhost wait/io/file/sql/query_log 0
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
execute dump_stages_user;
user event_name count_star
-user1 stage/sql/Checking permissions 0
-user1 stage/sql/Closing tables 0
-user1 stage/sql/Init 0
-user1 stage/sql/Init for update 0
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
user1 stage/sql/Opening tables 0
-user2 stage/sql/Checking permissions 0
-user2 stage/sql/Closing tables 0
-user2 stage/sql/Init 0
-user2 stage/sql/Init for update 0
+user1 stage/sql/starting 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
user2 stage/sql/Opening tables 0
-user3 stage/sql/Checking permissions 0
-user3 stage/sql/Closing tables 0
-user3 stage/sql/Init 0
-user3 stage/sql/Init for update 0
+user2 stage/sql/starting 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
user3 stage/sql/Opening tables 0
-user4 stage/sql/Checking permissions 0
-user4 stage/sql/Closing tables 0
-user4 stage/sql/Init 0
-user4 stage/sql/Init for update 0
+user3 stage/sql/starting 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
user4 stage/sql/Opening tables 0
+user4 stage/sql/starting 0
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 0
-localhost stage/sql/Closing tables 0
-localhost stage/sql/Init 0
-localhost stage/sql/Init for update 0
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
localhost stage/sql/Opening tables 0
+localhost stage/sql/starting 0
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 0
+user1 statement/sp/freturn 0
+user1 statement/sql/insert 0
+user1 statement/sql/select 0
+user2 statement/com/Error 0
+user2 statement/com/Quit 0
+user2 statement/sp/freturn 0
+user2 statement/sql/insert 0
+user2 statement/sql/select 0
+user3 statement/com/Error 0
+user3 statement/com/Quit 0
+user3 statement/sp/freturn 0
+user3 statement/sql/insert 0
+user3 statement/sql/select 0
+user4 statement/com/Error 0
+user4 statement/com/Quit 0
+user4 statement/sp/freturn 0
+user4 statement/sql/insert 0
+user4 statement/sql/select 0
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 0
+localhost statement/sp/freturn 0
+localhost statement/sql/insert 0
+localhost statement/sql/select 0
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sp/freturn 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sp/freturn 4
+statement/sql/insert 4
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_transactions_summary_by_thread_by_event_name;
+"================== TRANSACTIONS_BY_THREAD truncated =================="
+"================== Step 29 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+user2 wait/io/file/sql/query_log 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+user3 wait/io/file/sql/query_log 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+user4 wait/io/file/sql/query_log 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 32
+wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
+user1 stage/sql/Opening tables 0
+user1 stage/sql/starting 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
+user2 stage/sql/Opening tables 0
+user2 stage/sql/starting 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
+user3 stage/sql/Opening tables 0
+user3 stage/sql/starting 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
+user4 stage/sql/Opening tables 0
+user4 stage/sql/starting 0
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
+localhost stage/sql/Opening tables 0
+localhost stage/sql/starting 0
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+stage/sql/starting 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 0
+user1 statement/sp/freturn 0
+user1 statement/sql/insert 0
+user1 statement/sql/select 0
+user2 statement/com/Error 0
+user2 statement/com/Quit 0
+user2 statement/sp/freturn 0
+user2 statement/sql/insert 0
+user2 statement/sql/select 0
+user3 statement/com/Error 0
+user3 statement/com/Quit 0
+user3 statement/sp/freturn 0
+user3 statement/sql/insert 0
+user3 statement/sql/select 0
+user4 statement/com/Error 0
+user4 statement/com/Quit 0
+user4 statement/sp/freturn 0
+user4 statement/sql/insert 0
+user4 statement/sql/select 0
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 0
+localhost statement/sp/freturn 0
+localhost statement/sql/insert 0
+localhost statement/sql/select 0
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sp/freturn 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sp/freturn 4
+statement/sql/insert 4
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_transactions_summary_by_account_by_event_name;
+"================== TRANSACTIONS_BY_ACCOUNT truncated =================="
+"================== Step 30 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+user2 wait/io/file/sql/query_log 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+user3 wait/io/file/sql/query_log 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+user4 wait/io/file/sql/query_log 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 32
+wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
+user1 stage/sql/Opening tables 0
+user1 stage/sql/starting 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
+user2 stage/sql/Opening tables 0
+user2 stage/sql/starting 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
+user3 stage/sql/Opening tables 0
+user3 stage/sql/starting 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
+user4 stage/sql/Opening tables 0
+user4 stage/sql/starting 0
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
+localhost stage/sql/Opening tables 0
+localhost stage/sql/starting 0
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+stage/sql/starting 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 0
+user1 statement/sp/freturn 0
+user1 statement/sql/insert 0
+user1 statement/sql/select 0
+user2 statement/com/Error 0
+user2 statement/com/Quit 0
+user2 statement/sp/freturn 0
+user2 statement/sql/insert 0
+user2 statement/sql/select 0
+user3 statement/com/Error 0
+user3 statement/com/Quit 0
+user3 statement/sp/freturn 0
+user3 statement/sql/insert 0
+user3 statement/sql/select 0
+user4 statement/com/Error 0
+user4 statement/com/Quit 0
+user4 statement/sp/freturn 0
+user4 statement/sql/insert 0
+user4 statement/sql/select 0
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 0
+localhost statement/sp/freturn 0
+localhost statement/sql/insert 0
+localhost statement/sql/select 0
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sp/freturn 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sp/freturn 4
+statement/sql/insert 4
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_transactions_summary_by_user_by_event_name;
+"================== TRANSACTIONS_BY_USER truncated =================="
+"================== Step 31 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+user2 wait/io/file/sql/query_log 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+user3 wait/io/file/sql/query_log 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+user4 wait/io/file/sql/query_log 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 32
+wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
+user1 stage/sql/Opening tables 0
+user1 stage/sql/starting 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
+user2 stage/sql/Opening tables 0
+user2 stage/sql/starting 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
+user3 stage/sql/Opening tables 0
+user3 stage/sql/starting 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
+user4 stage/sql/Opening tables 0
+user4 stage/sql/starting 0
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
+localhost stage/sql/Opening tables 0
+localhost stage/sql/starting 0
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+stage/sql/starting 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 0
+user1 statement/sp/freturn 0
+user1 statement/sql/insert 0
+user1 statement/sql/select 0
+user2 statement/com/Error 0
+user2 statement/com/Quit 0
+user2 statement/sp/freturn 0
+user2 statement/sql/insert 0
+user2 statement/sql/select 0
+user3 statement/com/Error 0
+user3 statement/com/Quit 0
+user3 statement/sp/freturn 0
+user3 statement/sql/insert 0
+user3 statement/sql/select 0
+user4 statement/com/Error 0
+user4 statement/com/Quit 0
+user4 statement/sp/freturn 0
+user4 statement/sql/insert 0
+user4 statement/sql/select 0
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 0
+localhost statement/sp/freturn 0
+localhost statement/sql/insert 0
+localhost statement/sql/select 0
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sp/freturn 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sp/freturn 4
+statement/sql/insert 4
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 0
+user2 transaction 0
+user3 transaction 0
+user4 transaction 0
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_transactions_summary_by_host_by_event_name;
+"================== TRANSACTIONS_BY_HOST truncated =================="
+"================== Step 32 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+user2 wait/io/file/sql/query_log 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+user3 wait/io/file/sql/query_log 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+user4 wait/io/file/sql/query_log 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 32
+wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
+user1 stage/sql/Opening tables 0
+user1 stage/sql/starting 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
+user2 stage/sql/Opening tables 0
+user2 stage/sql/starting 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
+user3 stage/sql/Opening tables 0
+user3 stage/sql/starting 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
+user4 stage/sql/Opening tables 0
+user4 stage/sql/starting 0
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
+localhost stage/sql/Opening tables 0
+localhost stage/sql/starting 0
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+stage/sql/starting 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 0
+user1 statement/sp/freturn 0
+user1 statement/sql/insert 0
+user1 statement/sql/select 0
+user2 statement/com/Error 0
+user2 statement/com/Quit 0
+user2 statement/sp/freturn 0
+user2 statement/sql/insert 0
+user2 statement/sql/select 0
+user3 statement/com/Error 0
+user3 statement/com/Quit 0
+user3 statement/sp/freturn 0
+user3 statement/sql/insert 0
+user3 statement/sql/select 0
+user4 statement/com/Error 0
+user4 statement/com/Quit 0
+user4 statement/sp/freturn 0
+user4 statement/sql/insert 0
+user4 statement/sql/select 0
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 0
+localhost statement/sp/freturn 0
+localhost statement/sql/insert 0
+localhost statement/sql/select 0
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sp/freturn 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sp/freturn 4
+statement/sql/insert 4
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 0
+user2 transaction 0
+user3 transaction 0
+user4 transaction 0
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 0
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_transactions_summary_global_by_event_name;
+"================== TRANSACTIONS_GLOBAL truncated =================="
+"================== Step 33 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+user2 wait/io/file/sql/query_log 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+user3 wait/io/file/sql/query_log 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+user4 wait/io/file/sql/query_log 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 32
+wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
+user1 stage/sql/Opening tables 0
+user1 stage/sql/starting 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
+user2 stage/sql/Opening tables 0
+user2 stage/sql/starting 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
+user3 stage/sql/Opening tables 0
+user3 stage/sql/starting 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
+user4 stage/sql/Opening tables 0
+user4 stage/sql/starting 0
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
+localhost stage/sql/Opening tables 0
+localhost stage/sql/starting 0
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+stage/sql/starting 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 0
+user1 statement/sp/freturn 0
user1 statement/sql/insert 0
user1 statement/sql/select 0
user2 statement/com/Error 0
user2 statement/com/Quit 0
+user2 statement/sp/freturn 0
user2 statement/sql/insert 0
user2 statement/sql/select 0
user3 statement/com/Error 0
user3 statement/com/Quit 0
+user3 statement/sp/freturn 0
user3 statement/sql/insert 0
user3 statement/sql/select 0
user4 statement/com/Error 0
user4 statement/com/Quit 0
+user4 statement/sp/freturn 0
user4 statement/sql/insert 0
user4 statement/sql/select 0
execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 0
+localhost statement/sp/freturn 0
localhost statement/sql/insert 0
localhost statement/sql/select 0
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 0
statement/sql/insert 0
statement/sql/select 0
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 0
+user2 transaction 0
+user3 transaction 0
+user4 transaction 0
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 0
+execute dump_transactions_global;
+event_name count_star
+transaction 0
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -3850,7 +4901,7 @@ HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 1 5
truncate performance_schema.accounts;
"================== ACCOUNTS truncated =================="
-"================== Step 29 =================="
+"================== Step 34 =================="
call dump_thread();
username status
user1 not found
@@ -3865,120 +4916,131 @@ user host event_name count_star
execute dump_waits_user;
user event_name count_star
user1 wait/io/file/sql/query_log 0
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
user1 wait/synch/rwlock/sql/LOCK_grant 0
user2 wait/io/file/sql/query_log 0
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
user2 wait/synch/rwlock/sql/LOCK_grant 0
user3 wait/io/file/sql/query_log 0
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
user3 wait/synch/rwlock/sql/LOCK_grant 0
user4 wait/io/file/sql/query_log 0
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
user4 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_host;
host event_name count_star
localhost wait/io/file/sql/query_log 0
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
execute dump_stages_user;
user event_name count_star
-user1 stage/sql/Checking permissions 0
-user1 stage/sql/Closing tables 0
-user1 stage/sql/Init 0
-user1 stage/sql/Init for update 0
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
user1 stage/sql/Opening tables 0
-user2 stage/sql/Checking permissions 0
-user2 stage/sql/Closing tables 0
-user2 stage/sql/Init 0
-user2 stage/sql/Init for update 0
+user1 stage/sql/starting 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
user2 stage/sql/Opening tables 0
-user3 stage/sql/Checking permissions 0
-user3 stage/sql/Closing tables 0
-user3 stage/sql/Init 0
-user3 stage/sql/Init for update 0
+user2 stage/sql/starting 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
user3 stage/sql/Opening tables 0
-user4 stage/sql/Checking permissions 0
-user4 stage/sql/Closing tables 0
-user4 stage/sql/Init 0
-user4 stage/sql/Init for update 0
+user3 stage/sql/starting 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
user4 stage/sql/Opening tables 0
+user4 stage/sql/starting 0
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 0
-localhost stage/sql/Closing tables 0
-localhost stage/sql/Init 0
-localhost stage/sql/Init for update 0
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
localhost stage/sql/Opening tables 0
+localhost stage/sql/starting 0
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 0
+user1 statement/sp/freturn 0
user1 statement/sql/insert 0
user1 statement/sql/select 0
user2 statement/com/Error 0
user2 statement/com/Quit 0
+user2 statement/sp/freturn 0
user2 statement/sql/insert 0
user2 statement/sql/select 0
user3 statement/com/Error 0
user3 statement/com/Quit 0
+user3 statement/sp/freturn 0
user3 statement/sql/insert 0
user3 statement/sql/select 0
user4 statement/com/Error 0
user4 statement/com/Quit 0
+user4 statement/sp/freturn 0
user4 statement/sql/insert 0
user4 statement/sql/select 0
execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 0
+localhost statement/sp/freturn 0
localhost statement/sql/insert 0
localhost statement/sql/select 0
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 0
statement/sql/insert 0
statement/sql/select 0
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 0
+user2 transaction 0
+user3 transaction 0
+user4 transaction 0
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 0
+execute dump_transactions_global;
+event_name count_star
+transaction 0
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -3993,7 +5055,7 @@ HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 1 5
truncate performance_schema.users;
"================== USERS truncated =================="
-"================== Step 30 =================="
+"================== Step 35 =================="
call dump_thread();
username status
user1 not found
@@ -4010,19 +5072,14 @@ user event_name count_star
execute dump_waits_host;
host event_name count_star
localhost wait/io/file/sql/query_log 0
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
@@ -4030,25 +5087,25 @@ execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 0
-localhost stage/sql/Closing tables 0
-localhost stage/sql/Init 0
-localhost stage/sql/Init for update 0
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
localhost stage/sql/Opening tables 0
+localhost stage/sql/starting 0
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -4057,19 +5114,35 @@ execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 0
+localhost statement/sp/freturn 0
localhost statement/sql/insert 0
localhost statement/sql/select 0
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 0
statement/sql/insert 0
statement/sql/select 0
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 0
+execute dump_transactions_global;
+event_name count_star
+transaction 0
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -4080,7 +5153,7 @@ HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 1 5
truncate performance_schema.hosts;
"================== HOSTS truncated =================="
-"================== Step 31 =================="
+"================== Step 36 =================="
call dump_thread();
username status
user1 not found
@@ -4097,19 +5170,14 @@ user event_name count_star
execute dump_waits_host;
host event_name count_star
localhost wait/io/file/sql/query_log 0
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
@@ -4117,25 +5185,25 @@ execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 0
-localhost stage/sql/Closing tables 0
-localhost stage/sql/Init 0
-localhost stage/sql/Init for update 0
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
localhost stage/sql/Opening tables 0
+localhost stage/sql/starting 0
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -4144,19 +5212,35 @@ execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 0
+localhost statement/sp/freturn 0
localhost statement/sql/insert 0
localhost statement/sql/select 0
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 0
statement/sql/insert 0
statement/sql/select 0
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 0
+execute dump_transactions_global;
+event_name count_star
+transaction 0
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
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 3aa27664cac..6590c162dda 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
@@ -17,8 +17,6 @@ host event_name count_star
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
@@ -30,11 +28,11 @@ execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
execute dump_statements_account;
@@ -47,10 +45,22 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 0
statement/sql/insert 0
statement/sql/select 0
execute dump_statements_history;
event_name count(event_name)
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 0
+execute dump_transactions_history;
+event_name count(event_name)
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -64,8 +74,6 @@ connection default;
call dump_thread();
username event_name count_star
user1 wait/io/file/sql/query_log 1
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
user1 wait/synch/rwlock/sql/LOCK_grant 0
username status
user2 not found
@@ -78,16 +86,12 @@ user host event_name count_star
execute dump_waits_user;
user event_name count_star
user1 wait/io/file/sql/query_log 1
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
user1 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 1
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
@@ -96,20 +100,20 @@ execute dump_stages_account;
user host event_name count_star
execute dump_stages_user;
user event_name count_star
-user1 stage/sql/Checking permissions 0
-user1 stage/sql/Closing tables 0
-user1 stage/sql/Init 0
-user1 stage/sql/Init for update 0
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
user1 stage/sql/Opening tables 0
+user1 stage/sql/starting 0
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
execute dump_statements_account;
@@ -118,6 +122,7 @@ execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 0
+user1 statement/sp/freturn 0
user1 statement/sql/insert 0
user1 statement/sql/select 0
execute dump_statements_host;
@@ -126,10 +131,23 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 0
statement/sql/insert 0
statement/sql/select 0
execute dump_statements_history;
event_name count(event_name)
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 0
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 0
+execute dump_transactions_history;
+event_name count(event_name)
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -139,20 +157,23 @@ user1 1 1
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
connection con1;
-select get_lock("marker", 10);
-get_lock("marker", 10)
+select uuid_short() <> 1;
+uuid_short() <> 1
1
-select release_lock("marker");
-release_lock("marker")
+select uuid_short() <> 1;
+uuid_short() <> 1
1
+start transaction;
insert into test.t1 values ("marker");
+commit;
+select test.f(10,20);
+test.f(10,20)
+30
connection default;
"================== Step 3 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
username status
user2 not found
@@ -164,67 +185,79 @@ execute dump_waits_account;
user host event_name count_star
execute dump_waits_user;
user event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 4
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 7
wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 4
+wait/io/file/sql/query_log 7
wait/synch/rwlock/sql/LOCK_grant 1
execute dump_stages_account;
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 6
-user1 stage/sql/Init 5
-user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 4
+user1 stage/sql/checking permissions 4
+user1 stage/sql/closing tables 11
+user1 stage/sql/init 3
+user1 stage/sql/Opening tables 7
+user1 stage/sql/starting 6
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 6
-stage/sql/Init 5
-stage/sql/Init for update 1
-stage/sql/Opening tables 4
+stage/sql/checking permissions 4
+stage/sql/closing tables 11
+stage/sql/init 3
+stage/sql/Opening tables 7
+stage/sql/starting 6
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 3
-stage/sql/Closing tables 6
-stage/sql/Init 5
-stage/sql/Init for update 1
-stage/sql/Opening tables 4
+stage/sql/checking permissions 4
+stage/sql/closing tables 11
+stage/sql/init 3
+stage/sql/Opening tables 7
+stage/sql/starting 6
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 0
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 1
statement/sql/insert 1
-statement/sql/select 2
+statement/sql/select 3
execute dump_statements_history;
event_name count(event_name)
+statement/sp/freturn 1
statement/sql/insert 1
-statement/sql/select 2
+statement/sql/select 3
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 2
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 2
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -238,14 +271,10 @@ connection default;
"================== Step 4 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
user2 wait/io/file/sql/query_log 1
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
user2 wait/synch/rwlock/sql/LOCK_grant 0
username status
user3 not found
@@ -255,66 +284,62 @@ execute dump_waits_account;
user host event_name count_star
execute dump_waits_user;
user event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
user2 wait/io/file/sql/query_log 1
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
user2 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 5
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 8
wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 5
+wait/io/file/sql/query_log 8
wait/synch/rwlock/sql/LOCK_grant 1
execute dump_stages_account;
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 6
-user1 stage/sql/Init 5
-user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 4
-user2 stage/sql/Checking permissions 0
-user2 stage/sql/Closing tables 0
-user2 stage/sql/Init 0
-user2 stage/sql/Init for update 0
+user1 stage/sql/checking permissions 4
+user1 stage/sql/closing tables 11
+user1 stage/sql/init 3
+user1 stage/sql/Opening tables 7
+user1 stage/sql/starting 6
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
user2 stage/sql/Opening tables 0
+user2 stage/sql/starting 0
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 6
-stage/sql/Init 5
-stage/sql/Init for update 1
-stage/sql/Opening tables 4
+stage/sql/checking permissions 4
+stage/sql/closing tables 11
+stage/sql/init 3
+stage/sql/Opening tables 7
+stage/sql/starting 6
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 3
-stage/sql/Closing tables 6
-stage/sql/Init 5
-stage/sql/Init for update 1
-stage/sql/Opening tables 4
+stage/sql/checking permissions 4
+stage/sql/closing tables 11
+stage/sql/init 3
+stage/sql/Opening tables 7
+stage/sql/starting 6
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 0
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 0
+user2 statement/sp/freturn 0
user2 statement/sql/insert 0
user2 statement/sql/select 0
execute dump_statements_host;
@@ -323,12 +348,28 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 1
statement/sql/insert 1
-statement/sql/select 2
+statement/sql/select 3
execute dump_statements_history;
event_name count(event_name)
+statement/sp/freturn 1
statement/sql/insert 1
-statement/sql/select 2
+statement/sql/select 3
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 0
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 2
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 2
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -339,25 +380,26 @@ user2 1 1
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
connection con2;
-select get_lock("marker", 10);
-get_lock("marker", 10)
+select uuid_short() <> 1;
+uuid_short() <> 1
1
-select release_lock("marker");
-release_lock("marker")
+select uuid_short() <> 1;
+uuid_short() <> 1
1
+start transaction;
insert into test.t1 values ("marker");
+commit;
+select test.f(10,20);
+test.f(10,20)
+30
connection default;
"================== Step 5 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user2 wait/io/file/sql/query_log 4
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 7
user2 wait/synch/rwlock/sql/LOCK_grant 1
username status
user3 not found
@@ -367,80 +409,92 @@ execute dump_waits_account;
user host event_name count_star
execute dump_waits_user;
user event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
-user2 wait/io/file/sql/query_log 4
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 7
user2 wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 8
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 14
wait/synch/rwlock/sql/LOCK_grant 2
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 8
+wait/io/file/sql/query_log 14
wait/synch/rwlock/sql/LOCK_grant 2
execute dump_stages_account;
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 6
-user1 stage/sql/Init 5
-user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 4
-user2 stage/sql/Checking permissions 3
-user2 stage/sql/Closing tables 4
-user2 stage/sql/Init 5
-user2 stage/sql/Init for update 1
-user2 stage/sql/Opening tables 3
+user1 stage/sql/checking permissions 4
+user1 stage/sql/closing tables 11
+user1 stage/sql/init 3
+user1 stage/sql/Opening tables 7
+user1 stage/sql/starting 6
+user2 stage/sql/checking permissions 4
+user2 stage/sql/closing tables 10
+user2 stage/sql/init 3
+user2 stage/sql/Opening tables 6
+user2 stage/sql/starting 6
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 6
-stage/sql/Closing tables 10
-stage/sql/Init 10
-stage/sql/Init for update 2
-stage/sql/Opening tables 7
+stage/sql/checking permissions 8
+stage/sql/closing tables 21
+stage/sql/init 6
+stage/sql/Opening tables 13
+stage/sql/starting 12
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 6
-stage/sql/Closing tables 10
-stage/sql/Init 10
-stage/sql/Init for update 2
-stage/sql/Opening tables 7
+stage/sql/checking permissions 8
+stage/sql/closing tables 21
+stage/sql/init 6
+stage/sql/Opening tables 13
+stage/sql/starting 12
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 0
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 0
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 2
statement/sql/insert 2
-statement/sql/select 4
+statement/sql/select 6
execute dump_statements_history;
event_name count(event_name)
+statement/sp/freturn 2
statement/sql/insert 2
-statement/sql/select 4
+statement/sql/select 6
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 4
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 4
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -455,19 +509,13 @@ connection default;
"================== Step 6 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user2 wait/io/file/sql/query_log 4
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 7
user2 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
user3 wait/io/file/sql/query_log 1
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
user3 wait/synch/rwlock/sql/LOCK_grant 0
username status
user4 not found
@@ -475,79 +523,74 @@ execute dump_waits_account;
user host event_name count_star
execute dump_waits_user;
user event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
-user2 wait/io/file/sql/query_log 4
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 7
user2 wait/synch/rwlock/sql/LOCK_grant 1
user3 wait/io/file/sql/query_log 1
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
user3 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 9
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 15
wait/synch/rwlock/sql/LOCK_grant 2
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 9
+wait/io/file/sql/query_log 15
wait/synch/rwlock/sql/LOCK_grant 2
execute dump_stages_account;
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 6
-user1 stage/sql/Init 5
-user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 4
-user2 stage/sql/Checking permissions 3
-user2 stage/sql/Closing tables 4
-user2 stage/sql/Init 5
-user2 stage/sql/Init for update 1
-user2 stage/sql/Opening tables 3
-user3 stage/sql/Checking permissions 0
-user3 stage/sql/Closing tables 0
-user3 stage/sql/Init 0
-user3 stage/sql/Init for update 0
+user1 stage/sql/checking permissions 4
+user1 stage/sql/closing tables 11
+user1 stage/sql/init 3
+user1 stage/sql/Opening tables 7
+user1 stage/sql/starting 6
+user2 stage/sql/checking permissions 4
+user2 stage/sql/closing tables 10
+user2 stage/sql/init 3
+user2 stage/sql/Opening tables 6
+user2 stage/sql/starting 6
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
user3 stage/sql/Opening tables 0
+user3 stage/sql/starting 0
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 6
-stage/sql/Closing tables 10
-stage/sql/Init 10
-stage/sql/Init for update 2
-stage/sql/Opening tables 7
+stage/sql/checking permissions 8
+stage/sql/closing tables 21
+stage/sql/init 6
+stage/sql/Opening tables 13
+stage/sql/starting 12
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 6
-stage/sql/Closing tables 10
-stage/sql/Init 10
-stage/sql/Init for update 2
-stage/sql/Opening tables 7
+stage/sql/checking permissions 8
+stage/sql/closing tables 21
+stage/sql/init 6
+stage/sql/Opening tables 13
+stage/sql/starting 12
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 0
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 0
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 0
+user3 statement/sp/freturn 0
user3 statement/sql/insert 0
user3 statement/sql/select 0
execute dump_statements_host;
@@ -556,12 +599,29 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 2
statement/sql/insert 2
-statement/sql/select 4
+statement/sql/select 6
execute dump_statements_history;
event_name count(event_name)
+statement/sp/freturn 2
statement/sql/insert 2
-statement/sql/select 4
+statement/sql/select 6
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 0
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 4
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 4
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -573,30 +633,29 @@ user3 1 1
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
connection con3;
-select get_lock("marker", 10);
-get_lock("marker", 10)
+select uuid_short() <> 1;
+uuid_short() <> 1
1
-select release_lock("marker");
-release_lock("marker")
+select uuid_short() <> 1;
+uuid_short() <> 1
1
+start transaction;
insert into test.t1 values ("marker");
+commit;
+select test.f(10,20);
+test.f(10,20)
+30
connection default;
"================== Step 7 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user2 wait/io/file/sql/query_log 4
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 7
user2 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user3 wait/io/file/sql/query_log 4
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/io/file/sql/query_log 7
user3 wait/synch/rwlock/sql/LOCK_grant 1
username status
user4 not found
@@ -604,93 +663,105 @@ execute dump_waits_account;
user host event_name count_star
execute dump_waits_user;
user event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
-user2 wait/io/file/sql/query_log 4
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 7
user2 wait/synch/rwlock/sql/LOCK_grant 1
-user3 wait/io/file/sql/query_log 4
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/io/file/sql/query_log 7
user3 wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 12
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 21
wait/synch/rwlock/sql/LOCK_grant 3
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 12
+wait/io/file/sql/query_log 21
wait/synch/rwlock/sql/LOCK_grant 3
execute dump_stages_account;
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 6
-user1 stage/sql/Init 5
-user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 4
-user2 stage/sql/Checking permissions 3
-user2 stage/sql/Closing tables 4
-user2 stage/sql/Init 5
-user2 stage/sql/Init for update 1
-user2 stage/sql/Opening tables 3
-user3 stage/sql/Checking permissions 3
-user3 stage/sql/Closing tables 4
-user3 stage/sql/Init 5
-user3 stage/sql/Init for update 1
-user3 stage/sql/Opening tables 3
+user1 stage/sql/checking permissions 4
+user1 stage/sql/closing tables 11
+user1 stage/sql/init 3
+user1 stage/sql/Opening tables 7
+user1 stage/sql/starting 6
+user2 stage/sql/checking permissions 4
+user2 stage/sql/closing tables 10
+user2 stage/sql/init 3
+user2 stage/sql/Opening tables 6
+user2 stage/sql/starting 6
+user3 stage/sql/checking permissions 4
+user3 stage/sql/closing tables 10
+user3 stage/sql/init 3
+user3 stage/sql/Opening tables 6
+user3 stage/sql/starting 6
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 9
-stage/sql/Closing tables 14
-stage/sql/Init 15
-stage/sql/Init for update 3
-stage/sql/Opening tables 10
+stage/sql/checking permissions 12
+stage/sql/closing tables 31
+stage/sql/init 9
+stage/sql/Opening tables 19
+stage/sql/starting 18
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 9
-stage/sql/Closing tables 14
-stage/sql/Init 15
-stage/sql/Init for update 3
-stage/sql/Opening tables 10
+stage/sql/checking permissions 12
+stage/sql/closing tables 31
+stage/sql/init 9
+stage/sql/Opening tables 19
+stage/sql/starting 18
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 0
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 0
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 0
+user3 statement/sp/freturn 1
user3 statement/sql/insert 1
-user3 statement/sql/select 2
+user3 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 3
statement/sql/insert 3
-statement/sql/select 6
+statement/sql/select 9
execute dump_statements_history;
event_name count(event_name)
+statement/sp/freturn 3
statement/sql/insert 3
-statement/sql/select 6
+statement/sql/select 9
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 6
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 6
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -706,115 +777,101 @@ connection default;
"================== Step 8 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user2 wait/io/file/sql/query_log 4
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 7
user2 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user3 wait/io/file/sql/query_log 4
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/io/file/sql/query_log 7
user3 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
user4 wait/io/file/sql/query_log 1
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
user4 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_account;
user host event_name count_star
execute dump_waits_user;
user event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
-user2 wait/io/file/sql/query_log 4
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 7
user2 wait/synch/rwlock/sql/LOCK_grant 1
-user3 wait/io/file/sql/query_log 4
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/io/file/sql/query_log 7
user3 wait/synch/rwlock/sql/LOCK_grant 1
user4 wait/io/file/sql/query_log 1
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
user4 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 13
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 22
wait/synch/rwlock/sql/LOCK_grant 3
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 13
+wait/io/file/sql/query_log 22
wait/synch/rwlock/sql/LOCK_grant 3
execute dump_stages_account;
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 6
-user1 stage/sql/Init 5
-user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 4
-user2 stage/sql/Checking permissions 3
-user2 stage/sql/Closing tables 4
-user2 stage/sql/Init 5
-user2 stage/sql/Init for update 1
-user2 stage/sql/Opening tables 3
-user3 stage/sql/Checking permissions 3
-user3 stage/sql/Closing tables 4
-user3 stage/sql/Init 5
-user3 stage/sql/Init for update 1
-user3 stage/sql/Opening tables 3
-user4 stage/sql/Checking permissions 0
-user4 stage/sql/Closing tables 0
-user4 stage/sql/Init 0
-user4 stage/sql/Init for update 0
+user1 stage/sql/checking permissions 4
+user1 stage/sql/closing tables 11
+user1 stage/sql/init 3
+user1 stage/sql/Opening tables 7
+user1 stage/sql/starting 6
+user2 stage/sql/checking permissions 4
+user2 stage/sql/closing tables 10
+user2 stage/sql/init 3
+user2 stage/sql/Opening tables 6
+user2 stage/sql/starting 6
+user3 stage/sql/checking permissions 4
+user3 stage/sql/closing tables 10
+user3 stage/sql/init 3
+user3 stage/sql/Opening tables 6
+user3 stage/sql/starting 6
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
user4 stage/sql/Opening tables 0
+user4 stage/sql/starting 0
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 9
-stage/sql/Closing tables 14
-stage/sql/Init 15
-stage/sql/Init for update 3
-stage/sql/Opening tables 10
+stage/sql/checking permissions 12
+stage/sql/closing tables 31
+stage/sql/init 9
+stage/sql/Opening tables 19
+stage/sql/starting 18
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 9
-stage/sql/Closing tables 14
-stage/sql/Init 15
-stage/sql/Init for update 3
-stage/sql/Opening tables 10
+stage/sql/checking permissions 12
+stage/sql/closing tables 31
+stage/sql/init 9
+stage/sql/Opening tables 19
+stage/sql/starting 18
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 0
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 0
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 0
+user3 statement/sp/freturn 1
user3 statement/sql/insert 1
-user3 statement/sql/select 2
+user3 statement/sql/select 3
user4 statement/com/Error 0
user4 statement/com/Quit 0
+user4 statement/sp/freturn 0
user4 statement/sql/insert 0
user4 statement/sql/select 0
execute dump_statements_host;
@@ -823,12 +880,30 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 3
statement/sql/insert 3
-statement/sql/select 6
+statement/sql/select 9
execute dump_statements_history;
event_name count(event_name)
+statement/sp/freturn 3
statement/sql/insert 3
-statement/sql/select 6
+statement/sql/select 9
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 0
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 6
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 6
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -841,140 +916,149 @@ user4 1 1
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
connection con4;
-select get_lock("marker", 10);
-get_lock("marker", 10)
+select uuid_short() <> 1;
+uuid_short() <> 1
1
-select release_lock("marker");
-release_lock("marker")
+select uuid_short() <> 1;
+uuid_short() <> 1
1
+start transaction;
insert into test.t1 values ("marker");
+commit;
+select test.f(10,20);
+test.f(10,20)
+30
connection default;
"================== Step 9 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user2 wait/io/file/sql/query_log 4
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 7
user2 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user3 wait/io/file/sql/query_log 4
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/io/file/sql/query_log 7
user3 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user4 wait/io/file/sql/query_log 4
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/io/file/sql/query_log 7
user4 wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_account;
user host event_name count_star
execute dump_waits_user;
user event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
-user2 wait/io/file/sql/query_log 4
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 7
user2 wait/synch/rwlock/sql/LOCK_grant 1
-user3 wait/io/file/sql/query_log 4
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/io/file/sql/query_log 7
user3 wait/synch/rwlock/sql/LOCK_grant 1
-user4 wait/io/file/sql/query_log 4
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/io/file/sql/query_log 7
user4 wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 16
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 28
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 16
+wait/io/file/sql/query_log 28
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
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 6
-user1 stage/sql/Init 5
-user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 4
-user2 stage/sql/Checking permissions 3
-user2 stage/sql/Closing tables 4
-user2 stage/sql/Init 5
-user2 stage/sql/Init for update 1
-user2 stage/sql/Opening tables 3
-user3 stage/sql/Checking permissions 3
-user3 stage/sql/Closing tables 4
-user3 stage/sql/Init 5
-user3 stage/sql/Init for update 1
-user3 stage/sql/Opening tables 3
-user4 stage/sql/Checking permissions 3
-user4 stage/sql/Closing tables 4
-user4 stage/sql/Init 5
-user4 stage/sql/Init for update 1
-user4 stage/sql/Opening tables 3
+user1 stage/sql/checking permissions 4
+user1 stage/sql/closing tables 11
+user1 stage/sql/init 3
+user1 stage/sql/Opening tables 7
+user1 stage/sql/starting 6
+user2 stage/sql/checking permissions 4
+user2 stage/sql/closing tables 10
+user2 stage/sql/init 3
+user2 stage/sql/Opening tables 6
+user2 stage/sql/starting 6
+user3 stage/sql/checking permissions 4
+user3 stage/sql/closing tables 10
+user3 stage/sql/init 3
+user3 stage/sql/Opening tables 6
+user3 stage/sql/starting 6
+user4 stage/sql/checking permissions 4
+user4 stage/sql/closing tables 10
+user4 stage/sql/init 3
+user4 stage/sql/Opening tables 6
+user4 stage/sql/starting 6
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 20
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 24
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 20
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 24
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 0
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 0
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 0
+user3 statement/sp/freturn 1
user3 statement/sql/insert 1
-user3 statement/sql/select 2
+user3 statement/sql/select 3
user4 statement/com/Error 0
user4 statement/com/Quit 0
+user4 statement/sp/freturn 1
user4 statement/sql/insert 1
-user4 statement/sql/select 2
+user4 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -993,126 +1077,131 @@ call dump_thread();
username status
user1 not found
username event_name count_star
-user2 wait/io/file/sql/query_log 4
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 7
user2 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user3 wait/io/file/sql/query_log 4
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/io/file/sql/query_log 7
user3 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user4 wait/io/file/sql/query_log 4
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/io/file/sql/query_log 7
user4 wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_account;
user host event_name count_star
execute dump_waits_user;
user event_name count_star
-user1 wait/io/file/sql/query_log 5
-user1 wait/synch/mutex/sql/LOCK_connection_count 1
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 8
user1 wait/synch/rwlock/sql/LOCK_grant 1
-user2 wait/io/file/sql/query_log 4
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 7
user2 wait/synch/rwlock/sql/LOCK_grant 1
-user3 wait/io/file/sql/query_log 4
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/io/file/sql/query_log 7
user3 wait/synch/rwlock/sql/LOCK_grant 1
-user4 wait/io/file/sql/query_log 4
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/io/file/sql/query_log 7
user4 wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 17
-wait/synch/mutex/sql/LOCK_connection_count 1
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 29
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 17
-wait/synch/mutex/sql/LOCK_connection_count 1
+wait/io/file/sql/query_log 29
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
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 6
-user1 stage/sql/Init 6
-user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 4
-user2 stage/sql/Checking permissions 3
-user2 stage/sql/Closing tables 4
-user2 stage/sql/Init 5
-user2 stage/sql/Init for update 1
-user2 stage/sql/Opening tables 3
-user3 stage/sql/Checking permissions 3
-user3 stage/sql/Closing tables 4
-user3 stage/sql/Init 5
-user3 stage/sql/Init for update 1
-user3 stage/sql/Opening tables 3
-user4 stage/sql/Checking permissions 3
-user4 stage/sql/Closing tables 4
-user4 stage/sql/Init 5
-user4 stage/sql/Init for update 1
-user4 stage/sql/Opening tables 3
+user1 stage/sql/checking permissions 4
+user1 stage/sql/closing tables 11
+user1 stage/sql/init 3
+user1 stage/sql/Opening tables 7
+user1 stage/sql/starting 7
+user2 stage/sql/checking permissions 4
+user2 stage/sql/closing tables 10
+user2 stage/sql/init 3
+user2 stage/sql/Opening tables 6
+user2 stage/sql/starting 6
+user3 stage/sql/checking permissions 4
+user3 stage/sql/closing tables 10
+user3 stage/sql/init 3
+user3 stage/sql/Opening tables 6
+user3 stage/sql/starting 6
+user4 stage/sql/checking permissions 4
+user4 stage/sql/closing tables 10
+user4 stage/sql/init 3
+user4 stage/sql/Opening tables 6
+user4 stage/sql/starting 6
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 21
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 25
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 21
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 25
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 1
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 0
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 0
+user3 statement/sp/freturn 1
user3 statement/sql/insert 1
-user3 statement/sql/select 2
+user3 statement/sql/select 3
user4 statement/com/Error 0
user4 statement/com/Quit 0
+user4 statement/sp/freturn 1
user4 statement/sql/insert 1
-user4 statement/sql/select 2
+user4 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 1
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 1
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -1133,121 +1222,128 @@ user1 not found
username status
user2 not found
username event_name count_star
-user3 wait/io/file/sql/query_log 4
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/io/file/sql/query_log 7
user3 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user4 wait/io/file/sql/query_log 4
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/io/file/sql/query_log 7
user4 wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_account;
user host event_name count_star
execute dump_waits_user;
user event_name count_star
-user1 wait/io/file/sql/query_log 5
-user1 wait/synch/mutex/sql/LOCK_connection_count 1
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 8
user1 wait/synch/rwlock/sql/LOCK_grant 1
-user2 wait/io/file/sql/query_log 5
-user2 wait/synch/mutex/sql/LOCK_connection_count 1
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 8
user2 wait/synch/rwlock/sql/LOCK_grant 1
-user3 wait/io/file/sql/query_log 4
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/io/file/sql/query_log 7
user3 wait/synch/rwlock/sql/LOCK_grant 1
-user4 wait/io/file/sql/query_log 4
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/io/file/sql/query_log 7
user4 wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 18
-wait/synch/mutex/sql/LOCK_connection_count 2
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 30
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 18
-wait/synch/mutex/sql/LOCK_connection_count 2
+wait/io/file/sql/query_log 30
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
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 6
-user1 stage/sql/Init 6
-user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 4
-user2 stage/sql/Checking permissions 3
-user2 stage/sql/Closing tables 4
-user2 stage/sql/Init 6
-user2 stage/sql/Init for update 1
-user2 stage/sql/Opening tables 3
-user3 stage/sql/Checking permissions 3
-user3 stage/sql/Closing tables 4
-user3 stage/sql/Init 5
-user3 stage/sql/Init for update 1
-user3 stage/sql/Opening tables 3
-user4 stage/sql/Checking permissions 3
-user4 stage/sql/Closing tables 4
-user4 stage/sql/Init 5
-user4 stage/sql/Init for update 1
-user4 stage/sql/Opening tables 3
+user1 stage/sql/checking permissions 4
+user1 stage/sql/closing tables 11
+user1 stage/sql/init 3
+user1 stage/sql/Opening tables 7
+user1 stage/sql/starting 7
+user2 stage/sql/checking permissions 4
+user2 stage/sql/closing tables 10
+user2 stage/sql/init 3
+user2 stage/sql/Opening tables 6
+user2 stage/sql/starting 7
+user3 stage/sql/checking permissions 4
+user3 stage/sql/closing tables 10
+user3 stage/sql/init 3
+user3 stage/sql/Opening tables 6
+user3 stage/sql/starting 6
+user4 stage/sql/checking permissions 4
+user4 stage/sql/closing tables 10
+user4 stage/sql/init 3
+user4 stage/sql/Opening tables 6
+user4 stage/sql/starting 6
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 22
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 26
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 22
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 26
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 1
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 1
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 0
+user3 statement/sp/freturn 1
user3 statement/sql/insert 1
-user3 statement/sql/select 2
+user3 statement/sql/select 3
user4 statement/com/Error 0
user4 statement/com/Quit 0
+user4 statement/sp/freturn 1
user4 statement/sql/insert 1
-user4 statement/sql/select 2
+user4 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 2
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 2
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -1270,116 +1366,125 @@ user2 not found
username status
user3 not found
username event_name count_star
-user4 wait/io/file/sql/query_log 4
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/io/file/sql/query_log 7
user4 wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_account;
user host event_name count_star
execute dump_waits_user;
user event_name count_star
-user1 wait/io/file/sql/query_log 5
-user1 wait/synch/mutex/sql/LOCK_connection_count 1
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 8
user1 wait/synch/rwlock/sql/LOCK_grant 1
-user2 wait/io/file/sql/query_log 5
-user2 wait/synch/mutex/sql/LOCK_connection_count 1
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 8
user2 wait/synch/rwlock/sql/LOCK_grant 1
-user3 wait/io/file/sql/query_log 5
-user3 wait/synch/mutex/sql/LOCK_connection_count 1
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/io/file/sql/query_log 8
user3 wait/synch/rwlock/sql/LOCK_grant 1
-user4 wait/io/file/sql/query_log 4
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/io/file/sql/query_log 7
user4 wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 19
-wait/synch/mutex/sql/LOCK_connection_count 3
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 31
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 19
-wait/synch/mutex/sql/LOCK_connection_count 3
+wait/io/file/sql/query_log 31
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
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 6
-user1 stage/sql/Init 6
-user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 4
-user2 stage/sql/Checking permissions 3
-user2 stage/sql/Closing tables 4
-user2 stage/sql/Init 6
-user2 stage/sql/Init for update 1
-user2 stage/sql/Opening tables 3
-user3 stage/sql/Checking permissions 3
-user3 stage/sql/Closing tables 4
-user3 stage/sql/Init 6
-user3 stage/sql/Init for update 1
-user3 stage/sql/Opening tables 3
-user4 stage/sql/Checking permissions 3
-user4 stage/sql/Closing tables 4
-user4 stage/sql/Init 5
-user4 stage/sql/Init for update 1
-user4 stage/sql/Opening tables 3
+user1 stage/sql/checking permissions 4
+user1 stage/sql/closing tables 11
+user1 stage/sql/init 3
+user1 stage/sql/Opening tables 7
+user1 stage/sql/starting 7
+user2 stage/sql/checking permissions 4
+user2 stage/sql/closing tables 10
+user2 stage/sql/init 3
+user2 stage/sql/Opening tables 6
+user2 stage/sql/starting 7
+user3 stage/sql/checking permissions 4
+user3 stage/sql/closing tables 10
+user3 stage/sql/init 3
+user3 stage/sql/Opening tables 6
+user3 stage/sql/starting 7
+user4 stage/sql/checking permissions 4
+user4 stage/sql/closing tables 10
+user4 stage/sql/init 3
+user4 stage/sql/Opening tables 6
+user4 stage/sql/starting 6
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 23
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 27
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 23
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 27
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 1
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 1
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 1
+user3 statement/sp/freturn 1
user3 statement/sql/insert 1
-user3 statement/sql/select 2
+user3 statement/sql/select 3
user4 statement/com/Error 0
user4 statement/com/Quit 0
+user4 statement/sp/freturn 1
user4 statement/sql/insert 1
-user4 statement/sql/select 2
+user4 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 3
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 3
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -1407,108 +1512,119 @@ execute dump_waits_account;
user host event_name count_star
execute dump_waits_user;
user event_name count_star
-user1 wait/io/file/sql/query_log 5
-user1 wait/synch/mutex/sql/LOCK_connection_count 1
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 8
user1 wait/synch/rwlock/sql/LOCK_grant 1
-user2 wait/io/file/sql/query_log 5
-user2 wait/synch/mutex/sql/LOCK_connection_count 1
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 8
user2 wait/synch/rwlock/sql/LOCK_grant 1
-user3 wait/io/file/sql/query_log 5
-user3 wait/synch/mutex/sql/LOCK_connection_count 1
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/io/file/sql/query_log 8
user3 wait/synch/rwlock/sql/LOCK_grant 1
-user4 wait/io/file/sql/query_log 5
-user4 wait/synch/mutex/sql/LOCK_connection_count 1
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/io/file/sql/query_log 8
user4 wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
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 6
-user1 stage/sql/Init 6
-user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 4
-user2 stage/sql/Checking permissions 3
-user2 stage/sql/Closing tables 4
-user2 stage/sql/Init 6
-user2 stage/sql/Init for update 1
-user2 stage/sql/Opening tables 3
-user3 stage/sql/Checking permissions 3
-user3 stage/sql/Closing tables 4
-user3 stage/sql/Init 6
-user3 stage/sql/Init for update 1
-user3 stage/sql/Opening tables 3
-user4 stage/sql/Checking permissions 3
-user4 stage/sql/Closing tables 4
-user4 stage/sql/Init 6
-user4 stage/sql/Init for update 1
-user4 stage/sql/Opening tables 3
+user1 stage/sql/checking permissions 4
+user1 stage/sql/closing tables 11
+user1 stage/sql/init 3
+user1 stage/sql/Opening tables 7
+user1 stage/sql/starting 7
+user2 stage/sql/checking permissions 4
+user2 stage/sql/closing tables 10
+user2 stage/sql/init 3
+user2 stage/sql/Opening tables 6
+user2 stage/sql/starting 7
+user3 stage/sql/checking permissions 4
+user3 stage/sql/closing tables 10
+user3 stage/sql/init 3
+user3 stage/sql/Opening tables 6
+user3 stage/sql/starting 7
+user4 stage/sql/checking permissions 4
+user4 stage/sql/closing tables 10
+user4 stage/sql/init 3
+user4 stage/sql/Opening tables 6
+user4 stage/sql/starting 7
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 1
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 1
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 1
+user3 statement/sp/freturn 1
user3 statement/sql/insert 1
-user3 statement/sql/select 2
+user3 statement/sql/select 3
user4 statement/com/Error 0
user4 statement/com/Quit 1
+user4 statement/sp/freturn 1
user4 statement/sql/insert 1
-user4 statement/sql/select 2
+user4 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -1537,108 +1653,119 @@ execute dump_waits_account;
user host event_name count_star
execute dump_waits_user;
user event_name count_star
-user1 wait/io/file/sql/query_log 5
-user1 wait/synch/mutex/sql/LOCK_connection_count 1
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 8
user1 wait/synch/rwlock/sql/LOCK_grant 1
-user2 wait/io/file/sql/query_log 5
-user2 wait/synch/mutex/sql/LOCK_connection_count 1
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 8
user2 wait/synch/rwlock/sql/LOCK_grant 1
-user3 wait/io/file/sql/query_log 5
-user3 wait/synch/mutex/sql/LOCK_connection_count 1
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/io/file/sql/query_log 8
user3 wait/synch/rwlock/sql/LOCK_grant 1
-user4 wait/io/file/sql/query_log 5
-user4 wait/synch/mutex/sql/LOCK_connection_count 1
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/io/file/sql/query_log 8
user4 wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
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 6
-user1 stage/sql/Init 6
-user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 4
-user2 stage/sql/Checking permissions 3
-user2 stage/sql/Closing tables 4
-user2 stage/sql/Init 6
-user2 stage/sql/Init for update 1
-user2 stage/sql/Opening tables 3
-user3 stage/sql/Checking permissions 3
-user3 stage/sql/Closing tables 4
-user3 stage/sql/Init 6
-user3 stage/sql/Init for update 1
-user3 stage/sql/Opening tables 3
-user4 stage/sql/Checking permissions 3
-user4 stage/sql/Closing tables 4
-user4 stage/sql/Init 6
-user4 stage/sql/Init for update 1
-user4 stage/sql/Opening tables 3
+user1 stage/sql/checking permissions 4
+user1 stage/sql/closing tables 11
+user1 stage/sql/init 3
+user1 stage/sql/Opening tables 7
+user1 stage/sql/starting 7
+user2 stage/sql/checking permissions 4
+user2 stage/sql/closing tables 10
+user2 stage/sql/init 3
+user2 stage/sql/Opening tables 6
+user2 stage/sql/starting 7
+user3 stage/sql/checking permissions 4
+user3 stage/sql/closing tables 10
+user3 stage/sql/init 3
+user3 stage/sql/Opening tables 6
+user3 stage/sql/starting 7
+user4 stage/sql/checking permissions 4
+user4 stage/sql/closing tables 10
+user4 stage/sql/init 3
+user4 stage/sql/Opening tables 6
+user4 stage/sql/starting 7
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 1
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 1
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 1
+user3 statement/sp/freturn 1
user3 statement/sql/insert 1
-user3 statement/sql/select 2
+user3 statement/sql/select 3
user4 statement/com/Error 0
user4 statement/com/Quit 1
+user4 statement/sp/freturn 1
user4 statement/sql/insert 1
-user4 statement/sql/select 2
+user4 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -1666,108 +1793,119 @@ execute dump_waits_account;
user host event_name count_star
execute dump_waits_user;
user event_name count_star
-user1 wait/io/file/sql/query_log 5
-user1 wait/synch/mutex/sql/LOCK_connection_count 1
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 8
user1 wait/synch/rwlock/sql/LOCK_grant 1
-user2 wait/io/file/sql/query_log 5
-user2 wait/synch/mutex/sql/LOCK_connection_count 1
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 8
user2 wait/synch/rwlock/sql/LOCK_grant 1
-user3 wait/io/file/sql/query_log 5
-user3 wait/synch/mutex/sql/LOCK_connection_count 1
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/io/file/sql/query_log 8
user3 wait/synch/rwlock/sql/LOCK_grant 1
-user4 wait/io/file/sql/query_log 5
-user4 wait/synch/mutex/sql/LOCK_connection_count 1
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/io/file/sql/query_log 8
user4 wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
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 6
-user1 stage/sql/Init 6
-user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 4
-user2 stage/sql/Checking permissions 3
-user2 stage/sql/Closing tables 4
-user2 stage/sql/Init 6
-user2 stage/sql/Init for update 1
-user2 stage/sql/Opening tables 3
-user3 stage/sql/Checking permissions 3
-user3 stage/sql/Closing tables 4
-user3 stage/sql/Init 6
-user3 stage/sql/Init for update 1
-user3 stage/sql/Opening tables 3
-user4 stage/sql/Checking permissions 3
-user4 stage/sql/Closing tables 4
-user4 stage/sql/Init 6
-user4 stage/sql/Init for update 1
-user4 stage/sql/Opening tables 3
+user1 stage/sql/checking permissions 4
+user1 stage/sql/closing tables 11
+user1 stage/sql/init 3
+user1 stage/sql/Opening tables 7
+user1 stage/sql/starting 7
+user2 stage/sql/checking permissions 4
+user2 stage/sql/closing tables 10
+user2 stage/sql/init 3
+user2 stage/sql/Opening tables 6
+user2 stage/sql/starting 7
+user3 stage/sql/checking permissions 4
+user3 stage/sql/closing tables 10
+user3 stage/sql/init 3
+user3 stage/sql/Opening tables 6
+user3 stage/sql/starting 7
+user4 stage/sql/checking permissions 4
+user4 stage/sql/closing tables 10
+user4 stage/sql/init 3
+user4 stage/sql/Opening tables 6
+user4 stage/sql/starting 7
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 1
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 1
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 1
+user3 statement/sp/freturn 1
user3 statement/sql/insert 1
-user3 statement/sql/select 2
+user3 statement/sql/select 3
user4 statement/com/Error 0
user4 statement/com/Quit 1
+user4 statement/sp/freturn 1
user4 statement/sql/insert 1
-user4 statement/sql/select 2
+user4 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -1796,107 +1934,118 @@ user host event_name count_star
execute dump_waits_user;
user event_name count_star
user1 wait/io/file/sql/query_log 0
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
user1 wait/synch/rwlock/sql/LOCK_grant 0
user2 wait/io/file/sql/query_log 0
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
user2 wait/synch/rwlock/sql/LOCK_grant 0
user3 wait/io/file/sql/query_log 0
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
user3 wait/synch/rwlock/sql/LOCK_grant 0
user4 wait/io/file/sql/query_log 0
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
user4 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
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 6
-user1 stage/sql/Init 6
-user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 4
-user2 stage/sql/Checking permissions 3
-user2 stage/sql/Closing tables 4
-user2 stage/sql/Init 6
-user2 stage/sql/Init for update 1
-user2 stage/sql/Opening tables 3
-user3 stage/sql/Checking permissions 3
-user3 stage/sql/Closing tables 4
-user3 stage/sql/Init 6
-user3 stage/sql/Init for update 1
-user3 stage/sql/Opening tables 3
-user4 stage/sql/Checking permissions 3
-user4 stage/sql/Closing tables 4
-user4 stage/sql/Init 6
-user4 stage/sql/Init for update 1
-user4 stage/sql/Opening tables 3
+user1 stage/sql/checking permissions 4
+user1 stage/sql/closing tables 11
+user1 stage/sql/init 3
+user1 stage/sql/Opening tables 7
+user1 stage/sql/starting 7
+user2 stage/sql/checking permissions 4
+user2 stage/sql/closing tables 10
+user2 stage/sql/init 3
+user2 stage/sql/Opening tables 6
+user2 stage/sql/starting 7
+user3 stage/sql/checking permissions 4
+user3 stage/sql/closing tables 10
+user3 stage/sql/init 3
+user3 stage/sql/Opening tables 6
+user3 stage/sql/starting 7
+user4 stage/sql/checking permissions 4
+user4 stage/sql/closing tables 10
+user4 stage/sql/init 3
+user4 stage/sql/Opening tables 6
+user4 stage/sql/starting 7
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 1
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 1
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 1
+user3 statement/sp/freturn 1
user3 statement/sql/insert 1
-user3 statement/sql/select 2
+user3 statement/sql/select 3
user4 statement/com/Error 0
user4 statement/com/Quit 1
+user4 statement/sp/freturn 1
user4 statement/sql/insert 1
-user4 statement/sql/select 2
+user4 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -1925,107 +2074,118 @@ user host event_name count_star
execute dump_waits_user;
user event_name count_star
user1 wait/io/file/sql/query_log 0
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
user1 wait/synch/rwlock/sql/LOCK_grant 0
user2 wait/io/file/sql/query_log 0
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
user2 wait/synch/rwlock/sql/LOCK_grant 0
user3 wait/io/file/sql/query_log 0
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
user3 wait/synch/rwlock/sql/LOCK_grant 0
user4 wait/io/file/sql/query_log 0
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
user4 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
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 6
-user1 stage/sql/Init 6
-user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 4
-user2 stage/sql/Checking permissions 3
-user2 stage/sql/Closing tables 4
-user2 stage/sql/Init 6
-user2 stage/sql/Init for update 1
-user2 stage/sql/Opening tables 3
-user3 stage/sql/Checking permissions 3
-user3 stage/sql/Closing tables 4
-user3 stage/sql/Init 6
-user3 stage/sql/Init for update 1
-user3 stage/sql/Opening tables 3
-user4 stage/sql/Checking permissions 3
-user4 stage/sql/Closing tables 4
-user4 stage/sql/Init 6
-user4 stage/sql/Init for update 1
-user4 stage/sql/Opening tables 3
+user1 stage/sql/checking permissions 4
+user1 stage/sql/closing tables 11
+user1 stage/sql/init 3
+user1 stage/sql/Opening tables 7
+user1 stage/sql/starting 7
+user2 stage/sql/checking permissions 4
+user2 stage/sql/closing tables 10
+user2 stage/sql/init 3
+user2 stage/sql/Opening tables 6
+user2 stage/sql/starting 7
+user3 stage/sql/checking permissions 4
+user3 stage/sql/closing tables 10
+user3 stage/sql/init 3
+user3 stage/sql/Opening tables 6
+user3 stage/sql/starting 7
+user4 stage/sql/checking permissions 4
+user4 stage/sql/closing tables 10
+user4 stage/sql/init 3
+user4 stage/sql/Opening tables 6
+user4 stage/sql/starting 7
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 1
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 1
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 1
+user3 statement/sp/freturn 1
user3 statement/sql/insert 1
-user3 statement/sql/select 2
+user3 statement/sql/select 3
user4 statement/com/Error 0
user4 statement/com/Quit 1
+user4 statement/sp/freturn 1
user4 statement/sql/insert 1
-user4 statement/sql/select 2
+user4 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -2054,107 +2214,118 @@ user host event_name count_star
execute dump_waits_user;
user event_name count_star
user1 wait/io/file/sql/query_log 0
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
user1 wait/synch/rwlock/sql/LOCK_grant 0
user2 wait/io/file/sql/query_log 0
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
user2 wait/synch/rwlock/sql/LOCK_grant 0
user3 wait/io/file/sql/query_log 0
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
user3 wait/synch/rwlock/sql/LOCK_grant 0
user4 wait/io/file/sql/query_log 0
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
user4 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
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 6
-user1 stage/sql/Init 6
-user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 4
-user2 stage/sql/Checking permissions 3
-user2 stage/sql/Closing tables 4
-user2 stage/sql/Init 6
-user2 stage/sql/Init for update 1
-user2 stage/sql/Opening tables 3
-user3 stage/sql/Checking permissions 3
-user3 stage/sql/Closing tables 4
-user3 stage/sql/Init 6
-user3 stage/sql/Init for update 1
-user3 stage/sql/Opening tables 3
-user4 stage/sql/Checking permissions 3
-user4 stage/sql/Closing tables 4
-user4 stage/sql/Init 6
-user4 stage/sql/Init for update 1
-user4 stage/sql/Opening tables 3
+user1 stage/sql/checking permissions 4
+user1 stage/sql/closing tables 11
+user1 stage/sql/init 3
+user1 stage/sql/Opening tables 7
+user1 stage/sql/starting 7
+user2 stage/sql/checking permissions 4
+user2 stage/sql/closing tables 10
+user2 stage/sql/init 3
+user2 stage/sql/Opening tables 6
+user2 stage/sql/starting 7
+user3 stage/sql/checking permissions 4
+user3 stage/sql/closing tables 10
+user3 stage/sql/init 3
+user3 stage/sql/Opening tables 6
+user3 stage/sql/starting 7
+user4 stage/sql/checking permissions 4
+user4 stage/sql/closing tables 10
+user4 stage/sql/init 3
+user4 stage/sql/Opening tables 6
+user4 stage/sql/starting 7
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 1
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 1
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 1
+user3 statement/sp/freturn 1
user3 statement/sql/insert 1
-user3 statement/sql/select 2
+user3 statement/sql/select 3
user4 statement/com/Error 0
user4 statement/com/Quit 1
+user4 statement/sp/freturn 1
user4 statement/sql/insert 1
-user4 statement/sql/select 2
+user4 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -2183,107 +2354,118 @@ user host event_name count_star
execute dump_waits_user;
user event_name count_star
user1 wait/io/file/sql/query_log 0
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
user1 wait/synch/rwlock/sql/LOCK_grant 0
user2 wait/io/file/sql/query_log 0
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
user2 wait/synch/rwlock/sql/LOCK_grant 0
user3 wait/io/file/sql/query_log 0
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
user3 wait/synch/rwlock/sql/LOCK_grant 0
user4 wait/io/file/sql/query_log 0
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
user4 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
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 6
-user1 stage/sql/Init 6
-user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 4
-user2 stage/sql/Checking permissions 3
-user2 stage/sql/Closing tables 4
-user2 stage/sql/Init 6
-user2 stage/sql/Init for update 1
-user2 stage/sql/Opening tables 3
-user3 stage/sql/Checking permissions 3
-user3 stage/sql/Closing tables 4
-user3 stage/sql/Init 6
-user3 stage/sql/Init for update 1
-user3 stage/sql/Opening tables 3
-user4 stage/sql/Checking permissions 3
-user4 stage/sql/Closing tables 4
-user4 stage/sql/Init 6
-user4 stage/sql/Init for update 1
-user4 stage/sql/Opening tables 3
+user1 stage/sql/checking permissions 4
+user1 stage/sql/closing tables 11
+user1 stage/sql/init 3
+user1 stage/sql/Opening tables 7
+user1 stage/sql/starting 7
+user2 stage/sql/checking permissions 4
+user2 stage/sql/closing tables 10
+user2 stage/sql/init 3
+user2 stage/sql/Opening tables 6
+user2 stage/sql/starting 7
+user3 stage/sql/checking permissions 4
+user3 stage/sql/closing tables 10
+user3 stage/sql/init 3
+user3 stage/sql/Opening tables 6
+user3 stage/sql/starting 7
+user4 stage/sql/checking permissions 4
+user4 stage/sql/closing tables 10
+user4 stage/sql/init 3
+user4 stage/sql/Opening tables 6
+user4 stage/sql/starting 7
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 1
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 1
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 1
+user3 statement/sp/freturn 1
user3 statement/sql/insert 1
-user3 statement/sql/select 2
+user3 statement/sql/select 3
user4 statement/com/Error 0
user4 statement/com/Quit 1
+user4 statement/sp/freturn 1
user4 statement/sql/insert 1
-user4 statement/sql/select 2
+user4 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -2312,107 +2494,118 @@ user host event_name count_star
execute dump_waits_user;
user event_name count_star
user1 wait/io/file/sql/query_log 0
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
user1 wait/synch/rwlock/sql/LOCK_grant 0
user2 wait/io/file/sql/query_log 0
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
user2 wait/synch/rwlock/sql/LOCK_grant 0
user3 wait/io/file/sql/query_log 0
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
user3 wait/synch/rwlock/sql/LOCK_grant 0
user4 wait/io/file/sql/query_log 0
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
user4 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
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 6
-user1 stage/sql/Init 6
-user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 4
-user2 stage/sql/Checking permissions 3
-user2 stage/sql/Closing tables 4
-user2 stage/sql/Init 6
-user2 stage/sql/Init for update 1
-user2 stage/sql/Opening tables 3
-user3 stage/sql/Checking permissions 3
-user3 stage/sql/Closing tables 4
-user3 stage/sql/Init 6
-user3 stage/sql/Init for update 1
-user3 stage/sql/Opening tables 3
-user4 stage/sql/Checking permissions 3
-user4 stage/sql/Closing tables 4
-user4 stage/sql/Init 6
-user4 stage/sql/Init for update 1
-user4 stage/sql/Opening tables 3
+user1 stage/sql/checking permissions 4
+user1 stage/sql/closing tables 11
+user1 stage/sql/init 3
+user1 stage/sql/Opening tables 7
+user1 stage/sql/starting 7
+user2 stage/sql/checking permissions 4
+user2 stage/sql/closing tables 10
+user2 stage/sql/init 3
+user2 stage/sql/Opening tables 6
+user2 stage/sql/starting 7
+user3 stage/sql/checking permissions 4
+user3 stage/sql/closing tables 10
+user3 stage/sql/init 3
+user3 stage/sql/Opening tables 6
+user3 stage/sql/starting 7
+user4 stage/sql/checking permissions 4
+user4 stage/sql/closing tables 10
+user4 stage/sql/init 3
+user4 stage/sql/Opening tables 6
+user4 stage/sql/starting 7
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 1
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 1
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 1
+user3 statement/sp/freturn 1
user3 statement/sql/insert 1
-user3 statement/sql/select 2
+user3 statement/sql/select 3
user4 statement/com/Error 0
user4 statement/com/Quit 1
+user4 statement/sp/freturn 1
user4 statement/sql/insert 1
-user4 statement/sql/select 2
+user4 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -2441,107 +2634,118 @@ user host event_name count_star
execute dump_waits_user;
user event_name count_star
user1 wait/io/file/sql/query_log 0
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
user1 wait/synch/rwlock/sql/LOCK_grant 0
user2 wait/io/file/sql/query_log 0
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
user2 wait/synch/rwlock/sql/LOCK_grant 0
user3 wait/io/file/sql/query_log 0
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
user3 wait/synch/rwlock/sql/LOCK_grant 0
user4 wait/io/file/sql/query_log 0
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
user4 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
execute dump_stages_user;
user event_name count_star
-user1 stage/sql/Checking permissions 0
-user1 stage/sql/Closing tables 0
-user1 stage/sql/Init 0
-user1 stage/sql/Init for update 0
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
user1 stage/sql/Opening tables 0
-user2 stage/sql/Checking permissions 0
-user2 stage/sql/Closing tables 0
-user2 stage/sql/Init 0
-user2 stage/sql/Init for update 0
+user1 stage/sql/starting 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
user2 stage/sql/Opening tables 0
-user3 stage/sql/Checking permissions 0
-user3 stage/sql/Closing tables 0
-user3 stage/sql/Init 0
-user3 stage/sql/Init for update 0
+user2 stage/sql/starting 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
user3 stage/sql/Opening tables 0
-user4 stage/sql/Checking permissions 0
-user4 stage/sql/Closing tables 0
-user4 stage/sql/Init 0
-user4 stage/sql/Init for update 0
+user3 stage/sql/starting 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
user4 stage/sql/Opening tables 0
+user4 stage/sql/starting 0
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 1
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 1
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 1
+user3 statement/sp/freturn 1
user3 statement/sql/insert 1
-user3 statement/sql/select 2
+user3 statement/sql/select 3
user4 statement/com/Error 0
user4 statement/com/Quit 1
+user4 statement/sp/freturn 1
user4 statement/sql/insert 1
-user4 statement/sql/select 2
+user4 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -2570,107 +2774,118 @@ user host event_name count_star
execute dump_waits_user;
user event_name count_star
user1 wait/io/file/sql/query_log 0
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
user1 wait/synch/rwlock/sql/LOCK_grant 0
user2 wait/io/file/sql/query_log 0
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
user2 wait/synch/rwlock/sql/LOCK_grant 0
user3 wait/io/file/sql/query_log 0
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
user3 wait/synch/rwlock/sql/LOCK_grant 0
user4 wait/io/file/sql/query_log 0
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
user4 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
execute dump_stages_user;
user event_name count_star
-user1 stage/sql/Checking permissions 0
-user1 stage/sql/Closing tables 0
-user1 stage/sql/Init 0
-user1 stage/sql/Init for update 0
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
user1 stage/sql/Opening tables 0
-user2 stage/sql/Checking permissions 0
-user2 stage/sql/Closing tables 0
-user2 stage/sql/Init 0
-user2 stage/sql/Init for update 0
+user1 stage/sql/starting 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
user2 stage/sql/Opening tables 0
-user3 stage/sql/Checking permissions 0
-user3 stage/sql/Closing tables 0
-user3 stage/sql/Init 0
-user3 stage/sql/Init for update 0
+user2 stage/sql/starting 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
user3 stage/sql/Opening tables 0
-user4 stage/sql/Checking permissions 0
-user4 stage/sql/Closing tables 0
-user4 stage/sql/Init 0
-user4 stage/sql/Init for update 0
+user3 stage/sql/starting 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
user4 stage/sql/Opening tables 0
+user4 stage/sql/starting 0
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 1
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 1
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 1
+user3 statement/sp/freturn 1
user3 statement/sql/insert 1
-user3 statement/sql/select 2
+user3 statement/sql/select 3
user4 statement/com/Error 0
user4 statement/com/Quit 1
+user4 statement/sp/freturn 1
user4 statement/sql/insert 1
-user4 statement/sql/select 2
+user4 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -2699,107 +2914,118 @@ user host event_name count_star
execute dump_waits_user;
user event_name count_star
user1 wait/io/file/sql/query_log 0
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
user1 wait/synch/rwlock/sql/LOCK_grant 0
user2 wait/io/file/sql/query_log 0
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
user2 wait/synch/rwlock/sql/LOCK_grant 0
user3 wait/io/file/sql/query_log 0
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
user3 wait/synch/rwlock/sql/LOCK_grant 0
user4 wait/io/file/sql/query_log 0
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
user4 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
execute dump_stages_user;
user event_name count_star
-user1 stage/sql/Checking permissions 0
-user1 stage/sql/Closing tables 0
-user1 stage/sql/Init 0
-user1 stage/sql/Init for update 0
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
user1 stage/sql/Opening tables 0
-user2 stage/sql/Checking permissions 0
-user2 stage/sql/Closing tables 0
-user2 stage/sql/Init 0
-user2 stage/sql/Init for update 0
+user1 stage/sql/starting 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
user2 stage/sql/Opening tables 0
-user3 stage/sql/Checking permissions 0
-user3 stage/sql/Closing tables 0
-user3 stage/sql/Init 0
-user3 stage/sql/Init for update 0
+user2 stage/sql/starting 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
user3 stage/sql/Opening tables 0
-user4 stage/sql/Checking permissions 0
-user4 stage/sql/Closing tables 0
-user4 stage/sql/Init 0
-user4 stage/sql/Init for update 0
+user3 stage/sql/starting 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
user4 stage/sql/Opening tables 0
+user4 stage/sql/starting 0
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 1
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 1
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 1
+user3 statement/sp/freturn 1
user3 statement/sql/insert 1
-user3 statement/sql/select 2
+user3 statement/sql/select 3
user4 statement/com/Error 0
user4 statement/com/Quit 1
+user4 statement/sp/freturn 1
user4 statement/sql/insert 1
-user4 statement/sql/select 2
+user4 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -2828,107 +3054,118 @@ user host event_name count_star
execute dump_waits_user;
user event_name count_star
user1 wait/io/file/sql/query_log 0
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
user1 wait/synch/rwlock/sql/LOCK_grant 0
user2 wait/io/file/sql/query_log 0
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
user2 wait/synch/rwlock/sql/LOCK_grant 0
user3 wait/io/file/sql/query_log 0
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
user3 wait/synch/rwlock/sql/LOCK_grant 0
user4 wait/io/file/sql/query_log 0
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
user4 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
execute dump_stages_user;
user event_name count_star
-user1 stage/sql/Checking permissions 0
-user1 stage/sql/Closing tables 0
-user1 stage/sql/Init 0
-user1 stage/sql/Init for update 0
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
user1 stage/sql/Opening tables 0
-user2 stage/sql/Checking permissions 0
-user2 stage/sql/Closing tables 0
-user2 stage/sql/Init 0
-user2 stage/sql/Init for update 0
+user1 stage/sql/starting 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
user2 stage/sql/Opening tables 0
-user3 stage/sql/Checking permissions 0
-user3 stage/sql/Closing tables 0
-user3 stage/sql/Init 0
-user3 stage/sql/Init for update 0
+user2 stage/sql/starting 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
user3 stage/sql/Opening tables 0
-user4 stage/sql/Checking permissions 0
-user4 stage/sql/Closing tables 0
-user4 stage/sql/Init 0
-user4 stage/sql/Init for update 0
+user3 stage/sql/starting 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
user4 stage/sql/Opening tables 0
+user4 stage/sql/starting 0
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 1
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 1
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 1
+user3 statement/sp/freturn 1
user3 statement/sql/insert 1
-user3 statement/sql/select 2
+user3 statement/sql/select 3
user4 statement/com/Error 0
user4 statement/com/Quit 1
+user4 statement/sp/freturn 1
user4 statement/sql/insert 1
-user4 statement/sql/select 2
+user4 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -2957,107 +3194,118 @@ user host event_name count_star
execute dump_waits_user;
user event_name count_star
user1 wait/io/file/sql/query_log 0
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
user1 wait/synch/rwlock/sql/LOCK_grant 0
user2 wait/io/file/sql/query_log 0
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
user2 wait/synch/rwlock/sql/LOCK_grant 0
user3 wait/io/file/sql/query_log 0
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
user3 wait/synch/rwlock/sql/LOCK_grant 0
user4 wait/io/file/sql/query_log 0
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
user4 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
execute dump_stages_user;
user event_name count_star
-user1 stage/sql/Checking permissions 0
-user1 stage/sql/Closing tables 0
-user1 stage/sql/Init 0
-user1 stage/sql/Init for update 0
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
user1 stage/sql/Opening tables 0
-user2 stage/sql/Checking permissions 0
-user2 stage/sql/Closing tables 0
-user2 stage/sql/Init 0
-user2 stage/sql/Init for update 0
+user1 stage/sql/starting 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
user2 stage/sql/Opening tables 0
-user3 stage/sql/Checking permissions 0
-user3 stage/sql/Closing tables 0
-user3 stage/sql/Init 0
-user3 stage/sql/Init for update 0
+user2 stage/sql/starting 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
user3 stage/sql/Opening tables 0
-user4 stage/sql/Checking permissions 0
-user4 stage/sql/Closing tables 0
-user4 stage/sql/Init 0
-user4 stage/sql/Init for update 0
+user3 stage/sql/starting 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
user4 stage/sql/Opening tables 0
+user4 stage/sql/starting 0
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 1
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 1
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 1
+user3 statement/sp/freturn 1
user3 statement/sql/insert 1
-user3 statement/sql/select 2
+user3 statement/sql/select 3
user4 statement/com/Error 0
user4 statement/com/Quit 1
+user4 statement/sp/freturn 1
user4 statement/sql/insert 1
-user4 statement/sql/select 2
+user4 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -3086,92 +3334,85 @@ user host event_name count_star
execute dump_waits_user;
user event_name count_star
user1 wait/io/file/sql/query_log 0
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
user1 wait/synch/rwlock/sql/LOCK_grant 0
user2 wait/io/file/sql/query_log 0
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
user2 wait/synch/rwlock/sql/LOCK_grant 0
user3 wait/io/file/sql/query_log 0
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
user3 wait/synch/rwlock/sql/LOCK_grant 0
user4 wait/io/file/sql/query_log 0
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
user4 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
execute dump_stages_user;
user event_name count_star
-user1 stage/sql/Checking permissions 0
-user1 stage/sql/Closing tables 0
-user1 stage/sql/Init 0
-user1 stage/sql/Init for update 0
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
user1 stage/sql/Opening tables 0
-user2 stage/sql/Checking permissions 0
-user2 stage/sql/Closing tables 0
-user2 stage/sql/Init 0
-user2 stage/sql/Init for update 0
+user1 stage/sql/starting 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
user2 stage/sql/Opening tables 0
-user3 stage/sql/Checking permissions 0
-user3 stage/sql/Closing tables 0
-user3 stage/sql/Init 0
-user3 stage/sql/Init for update 0
+user2 stage/sql/starting 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
user3 stage/sql/Opening tables 0
-user4 stage/sql/Checking permissions 0
-user4 stage/sql/Closing tables 0
-user4 stage/sql/Init 0
-user4 stage/sql/Init for update 0
+user3 stage/sql/starting 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
user4 stage/sql/Opening tables 0
+user4 stage/sql/starting 0
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 0
+user1 statement/sp/freturn 0
user1 statement/sql/insert 0
user1 statement/sql/select 0
user2 statement/com/Error 0
user2 statement/com/Quit 0
+user2 statement/sp/freturn 0
user2 statement/sql/insert 0
user2 statement/sql/select 0
user3 statement/com/Error 0
user3 statement/com/Quit 0
+user3 statement/sp/freturn 0
user3 statement/sql/insert 0
user3 statement/sql/select 0
user4 statement/com/Error 0
user4 statement/com/Quit 0
+user4 statement/sp/freturn 0
user4 statement/sql/insert 0
user4 statement/sql/select 0
execute dump_statements_host;
@@ -3180,13 +3421,31 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -3215,92 +3474,85 @@ user host event_name count_star
execute dump_waits_user;
user event_name count_star
user1 wait/io/file/sql/query_log 0
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
user1 wait/synch/rwlock/sql/LOCK_grant 0
user2 wait/io/file/sql/query_log 0
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
user2 wait/synch/rwlock/sql/LOCK_grant 0
user3 wait/io/file/sql/query_log 0
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
user3 wait/synch/rwlock/sql/LOCK_grant 0
user4 wait/io/file/sql/query_log 0
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
user4 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
execute dump_stages_user;
user event_name count_star
-user1 stage/sql/Checking permissions 0
-user1 stage/sql/Closing tables 0
-user1 stage/sql/Init 0
-user1 stage/sql/Init for update 0
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
user1 stage/sql/Opening tables 0
-user2 stage/sql/Checking permissions 0
-user2 stage/sql/Closing tables 0
-user2 stage/sql/Init 0
-user2 stage/sql/Init for update 0
+user1 stage/sql/starting 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
user2 stage/sql/Opening tables 0
-user3 stage/sql/Checking permissions 0
-user3 stage/sql/Closing tables 0
-user3 stage/sql/Init 0
-user3 stage/sql/Init for update 0
+user2 stage/sql/starting 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
user3 stage/sql/Opening tables 0
-user4 stage/sql/Checking permissions 0
-user4 stage/sql/Closing tables 0
-user4 stage/sql/Init 0
-user4 stage/sql/Init for update 0
+user3 stage/sql/starting 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
user4 stage/sql/Opening tables 0
+user4 stage/sql/starting 0
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 0
+user1 statement/sp/freturn 0
user1 statement/sql/insert 0
user1 statement/sql/select 0
user2 statement/com/Error 0
user2 statement/com/Quit 0
+user2 statement/sp/freturn 0
user2 statement/sql/insert 0
user2 statement/sql/select 0
user3 statement/com/Error 0
user3 statement/com/Quit 0
+user3 statement/sp/freturn 0
user3 statement/sql/insert 0
user3 statement/sql/select 0
user4 statement/com/Error 0
user4 statement/com/Quit 0
+user4 statement/sp/freturn 0
user4 statement/sql/insert 0
user4 statement/sql/select 0
execute dump_statements_host;
@@ -3309,13 +3561,31 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -3344,92 +3614,225 @@ user host event_name count_star
execute dump_waits_user;
user event_name count_star
user1 wait/io/file/sql/query_log 0
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
user1 wait/synch/rwlock/sql/LOCK_grant 0
user2 wait/io/file/sql/query_log 0
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
user2 wait/synch/rwlock/sql/LOCK_grant 0
user3 wait/io/file/sql/query_log 0
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
user3 wait/synch/rwlock/sql/LOCK_grant 0
user4 wait/io/file/sql/query_log 0
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
user4 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
execute dump_stages_user;
user event_name count_star
-user1 stage/sql/Checking permissions 0
-user1 stage/sql/Closing tables 0
-user1 stage/sql/Init 0
-user1 stage/sql/Init for update 0
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
user1 stage/sql/Opening tables 0
-user2 stage/sql/Checking permissions 0
-user2 stage/sql/Closing tables 0
-user2 stage/sql/Init 0
-user2 stage/sql/Init for update 0
+user1 stage/sql/starting 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
user2 stage/sql/Opening tables 0
-user3 stage/sql/Checking permissions 0
-user3 stage/sql/Closing tables 0
-user3 stage/sql/Init 0
-user3 stage/sql/Init for update 0
+user2 stage/sql/starting 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
user3 stage/sql/Opening tables 0
-user4 stage/sql/Checking permissions 0
-user4 stage/sql/Closing tables 0
-user4 stage/sql/Init 0
-user4 stage/sql/Init for update 0
+user3 stage/sql/starting 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
user4 stage/sql/Opening tables 0
+user4 stage/sql/starting 0
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 0
+user1 statement/sp/freturn 0
+user1 statement/sql/insert 0
+user1 statement/sql/select 0
+user2 statement/com/Error 0
+user2 statement/com/Quit 0
+user2 statement/sp/freturn 0
+user2 statement/sql/insert 0
+user2 statement/sql/select 0
+user3 statement/com/Error 0
+user3 statement/com/Quit 0
+user3 statement/sp/freturn 0
+user3 statement/sql/insert 0
+user3 statement/sql/select 0
+user4 statement/com/Error 0
+user4 statement/com/Quit 0
+user4 statement/sp/freturn 0
+user4 statement/sql/insert 0
+user4 statement/sql/select 0
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sp/freturn 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sp/freturn 4
+statement/sql/insert 4
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_transactions_summary_by_thread_by_event_name;
+"================== TRANSACTIONS_BY_THREAD truncated =================="
+"================== Step 29 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+user2 wait/io/file/sql/query_log 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+user3 wait/io/file/sql/query_log 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+user4 wait/io/file/sql/query_log 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 32
+wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
+user1 stage/sql/Opening tables 0
+user1 stage/sql/starting 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
+user2 stage/sql/Opening tables 0
+user2 stage/sql/starting 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
+user3 stage/sql/Opening tables 0
+user3 stage/sql/starting 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
+user4 stage/sql/Opening tables 0
+user4 stage/sql/starting 0
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+stage/sql/starting 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 0
+user1 statement/sp/freturn 0
user1 statement/sql/insert 0
user1 statement/sql/select 0
user2 statement/com/Error 0
user2 statement/com/Quit 0
+user2 statement/sp/freturn 0
user2 statement/sql/insert 0
user2 statement/sql/select 0
user3 statement/com/Error 0
user3 statement/com/Quit 0
+user3 statement/sp/freturn 0
user3 statement/sql/insert 0
user3 statement/sql/select 0
user4 statement/com/Error 0
user4 statement/com/Quit 0
+user4 statement/sp/freturn 0
user4 statement/sql/insert 0
user4 statement/sql/select 0
execute dump_statements_host;
@@ -3438,13 +3841,591 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 0
statement/sql/insert 0
statement/sql/select 0
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_transactions_summary_by_account_by_event_name;
+"================== TRANSACTIONS_BY_ACCOUNT truncated =================="
+"================== Step 30 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+user2 wait/io/file/sql/query_log 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+user3 wait/io/file/sql/query_log 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+user4 wait/io/file/sql/query_log 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 32
+wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
+user1 stage/sql/Opening tables 0
+user1 stage/sql/starting 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
+user2 stage/sql/Opening tables 0
+user2 stage/sql/starting 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
+user3 stage/sql/Opening tables 0
+user3 stage/sql/starting 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
+user4 stage/sql/Opening tables 0
+user4 stage/sql/starting 0
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+stage/sql/starting 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 0
+user1 statement/sp/freturn 0
+user1 statement/sql/insert 0
+user1 statement/sql/select 0
+user2 statement/com/Error 0
+user2 statement/com/Quit 0
+user2 statement/sp/freturn 0
+user2 statement/sql/insert 0
+user2 statement/sql/select 0
+user3 statement/com/Error 0
+user3 statement/com/Quit 0
+user3 statement/sp/freturn 0
+user3 statement/sql/insert 0
+user3 statement/sql/select 0
+user4 statement/com/Error 0
+user4 statement/com/Quit 0
+user4 statement/sp/freturn 0
+user4 statement/sql/insert 0
+user4 statement/sql/select 0
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sp/freturn 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sp/freturn 4
+statement/sql/insert 4
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_transactions_summary_by_user_by_event_name;
+"================== TRANSACTIONS_BY_USER truncated =================="
+"================== Step 31 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+user2 wait/io/file/sql/query_log 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+user3 wait/io/file/sql/query_log 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+user4 wait/io/file/sql/query_log 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 32
+wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
+user1 stage/sql/Opening tables 0
+user1 stage/sql/starting 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
+user2 stage/sql/Opening tables 0
+user2 stage/sql/starting 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
+user3 stage/sql/Opening tables 0
+user3 stage/sql/starting 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
+user4 stage/sql/Opening tables 0
+user4 stage/sql/starting 0
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+stage/sql/starting 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 0
+user1 statement/sp/freturn 0
+user1 statement/sql/insert 0
+user1 statement/sql/select 0
+user2 statement/com/Error 0
+user2 statement/com/Quit 0
+user2 statement/sp/freturn 0
+user2 statement/sql/insert 0
+user2 statement/sql/select 0
+user3 statement/com/Error 0
+user3 statement/com/Quit 0
+user3 statement/sp/freturn 0
+user3 statement/sql/insert 0
+user3 statement/sql/select 0
+user4 statement/com/Error 0
+user4 statement/com/Quit 0
+user4 statement/sp/freturn 0
+user4 statement/sql/insert 0
+user4 statement/sql/select 0
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sp/freturn 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sp/freturn 4
+statement/sql/insert 4
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 0
+user2 transaction 0
+user3 transaction 0
+user4 transaction 0
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_transactions_summary_by_host_by_event_name;
+"================== TRANSACTIONS_BY_HOST truncated =================="
+"================== Step 32 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+user2 wait/io/file/sql/query_log 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+user3 wait/io/file/sql/query_log 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+user4 wait/io/file/sql/query_log 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 32
+wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
+user1 stage/sql/Opening tables 0
+user1 stage/sql/starting 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
+user2 stage/sql/Opening tables 0
+user2 stage/sql/starting 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
+user3 stage/sql/Opening tables 0
+user3 stage/sql/starting 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
+user4 stage/sql/Opening tables 0
+user4 stage/sql/starting 0
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+stage/sql/starting 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 0
+user1 statement/sp/freturn 0
+user1 statement/sql/insert 0
+user1 statement/sql/select 0
+user2 statement/com/Error 0
+user2 statement/com/Quit 0
+user2 statement/sp/freturn 0
+user2 statement/sql/insert 0
+user2 statement/sql/select 0
+user3 statement/com/Error 0
+user3 statement/com/Quit 0
+user3 statement/sp/freturn 0
+user3 statement/sql/insert 0
+user3 statement/sql/select 0
+user4 statement/com/Error 0
+user4 statement/com/Quit 0
+user4 statement/sp/freturn 0
+user4 statement/sql/insert 0
+user4 statement/sql/select 0
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sp/freturn 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sp/freturn 4
+statement/sql/insert 4
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 0
+user2 transaction 0
+user3 transaction 0
+user4 transaction 0
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_transactions_summary_global_by_event_name;
+"================== TRANSACTIONS_GLOBAL truncated =================="
+"================== Step 33 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+user2 wait/io/file/sql/query_log 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+user3 wait/io/file/sql/query_log 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+user4 wait/io/file/sql/query_log 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 32
+wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
+user1 stage/sql/Opening tables 0
+user1 stage/sql/starting 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
+user2 stage/sql/Opening tables 0
+user2 stage/sql/starting 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
+user3 stage/sql/Opening tables 0
+user3 stage/sql/starting 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
+user4 stage/sql/Opening tables 0
+user4 stage/sql/starting 0
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+stage/sql/starting 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 0
+user1 statement/sp/freturn 0
+user1 statement/sql/insert 0
+user1 statement/sql/select 0
+user2 statement/com/Error 0
+user2 statement/com/Quit 0
+user2 statement/sp/freturn 0
+user2 statement/sql/insert 0
+user2 statement/sql/select 0
+user3 statement/com/Error 0
+user3 statement/com/Quit 0
+user3 statement/sp/freturn 0
+user3 statement/sql/insert 0
+user3 statement/sql/select 0
+user4 statement/com/Error 0
+user4 statement/com/Quit 0
+user4 statement/sp/freturn 0
+user4 statement/sql/insert 0
+user4 statement/sql/select 0
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sp/freturn 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sp/freturn 4
+statement/sql/insert 4
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 0
+user2 transaction 0
+user3 transaction 0
+user4 transaction 0
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 0
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -3458,7 +4439,7 @@ execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
truncate performance_schema.accounts;
"================== ACCOUNTS truncated =================="
-"================== Step 29 =================="
+"================== Step 34 =================="
call dump_thread();
username status
user1 not found
@@ -3473,92 +4454,85 @@ user host event_name count_star
execute dump_waits_user;
user event_name count_star
user1 wait/io/file/sql/query_log 0
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
user1 wait/synch/rwlock/sql/LOCK_grant 0
user2 wait/io/file/sql/query_log 0
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
user2 wait/synch/rwlock/sql/LOCK_grant 0
user3 wait/io/file/sql/query_log 0
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
user3 wait/synch/rwlock/sql/LOCK_grant 0
user4 wait/io/file/sql/query_log 0
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
user4 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
execute dump_stages_user;
user event_name count_star
-user1 stage/sql/Checking permissions 0
-user1 stage/sql/Closing tables 0
-user1 stage/sql/Init 0
-user1 stage/sql/Init for update 0
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
user1 stage/sql/Opening tables 0
-user2 stage/sql/Checking permissions 0
-user2 stage/sql/Closing tables 0
-user2 stage/sql/Init 0
-user2 stage/sql/Init for update 0
+user1 stage/sql/starting 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
user2 stage/sql/Opening tables 0
-user3 stage/sql/Checking permissions 0
-user3 stage/sql/Closing tables 0
-user3 stage/sql/Init 0
-user3 stage/sql/Init for update 0
+user2 stage/sql/starting 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
user3 stage/sql/Opening tables 0
-user4 stage/sql/Checking permissions 0
-user4 stage/sql/Closing tables 0
-user4 stage/sql/Init 0
-user4 stage/sql/Init for update 0
+user3 stage/sql/starting 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
user4 stage/sql/Opening tables 0
+user4 stage/sql/starting 0
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 0
+user1 statement/sp/freturn 0
user1 statement/sql/insert 0
user1 statement/sql/select 0
user2 statement/com/Error 0
user2 statement/com/Quit 0
+user2 statement/sp/freturn 0
user2 statement/sql/insert 0
user2 statement/sql/select 0
user3 statement/com/Error 0
user3 statement/com/Quit 0
+user3 statement/sp/freturn 0
user3 statement/sql/insert 0
user3 statement/sql/select 0
user4 statement/com/Error 0
user4 statement/com/Quit 0
+user4 statement/sp/freturn 0
user4 statement/sql/insert 0
user4 statement/sql/select 0
execute dump_statements_host;
@@ -3567,13 +4541,31 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 0
statement/sql/insert 0
statement/sql/select 0
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 0
+user2 transaction 0
+user3 transaction 0
+user4 transaction 0
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 0
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -3587,7 +4579,7 @@ execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
truncate performance_schema.users;
"================== USERS truncated =================="
-"================== Step 30 =================="
+"================== Step 35 =================="
call dump_thread();
username status
user1 not found
@@ -3606,13 +4598,10 @@ host event_name count_star
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
@@ -3622,18 +4611,18 @@ execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -3644,13 +4633,27 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 0
statement/sql/insert 0
statement/sql/select 0
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 0
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -3660,7 +4663,7 @@ execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
truncate performance_schema.hosts;
"================== HOSTS truncated =================="
-"================== Step 31 =================="
+"================== Step 36 =================="
call dump_thread();
username status
user1 not found
@@ -3679,13 +4682,10 @@ host event_name count_star
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
@@ -3695,18 +4695,18 @@ execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -3717,13 +4717,27 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 0
statement/sql/insert 0
statement/sql/select 0
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 0
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
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 4d4a842948f..b7cf3b8a5ce 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
@@ -15,14 +15,10 @@ user event_name count_star
execute dump_waits_host;
host event_name count_star
localhost wait/io/file/sql/query_log 0
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
@@ -32,18 +28,18 @@ execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 0
-localhost stage/sql/Closing tables 0
-localhost stage/sql/Init 0
-localhost stage/sql/Init for update 0
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
localhost stage/sql/Opening tables 0
+localhost stage/sql/starting 0
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
execute dump_statements_account;
@@ -54,16 +50,30 @@ execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 0
+localhost statement/sp/freturn 0
localhost statement/sql/insert 0
localhost statement/sql/select 0
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 0
statement/sql/insert 0
statement/sql/select 0
execute dump_statements_history;
event_name count(event_name)
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 0
+execute dump_transactions_global;
+event_name count_star
+transaction 0
+execute dump_transactions_history;
+event_name count(event_name)
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -77,8 +87,6 @@ connection default;
call dump_thread();
username event_name count_star
user1 wait/io/file/sql/query_log 1
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
user1 wait/synch/rwlock/sql/LOCK_grant 0
username status
user2 not found
@@ -93,14 +101,10 @@ user event_name count_star
execute dump_waits_host;
host event_name count_star
localhost wait/io/file/sql/query_log 1
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 1
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
@@ -111,18 +115,18 @@ execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 0
-localhost stage/sql/Closing tables 0
-localhost stage/sql/Init 0
-localhost stage/sql/Init for update 0
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
localhost stage/sql/Opening tables 0
+localhost stage/sql/starting 0
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
execute dump_statements_account;
@@ -133,16 +137,30 @@ execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 0
+localhost statement/sp/freturn 0
localhost statement/sql/insert 0
localhost statement/sql/select 0
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 0
statement/sql/insert 0
statement/sql/select 0
execute dump_statements_history;
event_name count(event_name)
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 0
+execute dump_transactions_global;
+event_name count_star
+transaction 0
+execute dump_transactions_history;
+event_name count(event_name)
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -151,20 +169,23 @@ execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 2 2
connection con1;
-select get_lock("marker", 10);
-get_lock("marker", 10)
+select uuid_short() <> 1;
+uuid_short() <> 1
1
-select release_lock("marker");
-release_lock("marker")
+select uuid_short() <> 1;
+uuid_short() <> 1
1
+start transaction;
insert into test.t1 values ("marker");
+commit;
+select test.f(10,20);
+test.f(10,20)
+30
connection default;
"================== Step 3 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
username status
user2 not found
@@ -178,19 +199,15 @@ execute dump_waits_user;
user event_name count_star
execute dump_waits_host;
host event_name count_star
-localhost wait/io/file/sql/query_log 4
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/io/file/sql/query_log 7
localhost wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 4
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 7
wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 4
+wait/io/file/sql/query_log 7
wait/synch/rwlock/sql/LOCK_grant 1
execute dump_stages_account;
user host event_name count_star
@@ -198,25 +215,25 @@ 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 6
-localhost stage/sql/Init 5
-localhost stage/sql/Init for update 1
-localhost stage/sql/Opening tables 4
+localhost stage/sql/checking permissions 4
+localhost stage/sql/closing tables 11
+localhost stage/sql/init 3
+localhost stage/sql/Opening tables 7
+localhost stage/sql/starting 6
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 3
-stage/sql/Closing tables 6
-stage/sql/Init 5
-stage/sql/Init for update 1
-stage/sql/Opening tables 4
+stage/sql/checking permissions 4
+stage/sql/closing tables 11
+stage/sql/init 3
+stage/sql/Opening tables 7
+stage/sql/starting 6
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 3
-stage/sql/Closing tables 6
-stage/sql/Init 5
-stage/sql/Init for update 1
-stage/sql/Opening tables 4
+stage/sql/checking permissions 4
+stage/sql/closing tables 11
+stage/sql/init 3
+stage/sql/Opening tables 7
+stage/sql/starting 6
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -225,18 +242,34 @@ execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 0
+localhost statement/sp/freturn 1
localhost statement/sql/insert 1
-localhost statement/sql/select 2
+localhost statement/sql/select 3
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 1
statement/sql/insert 1
-statement/sql/select 2
+statement/sql/select 3
execute dump_statements_history;
event_name count(event_name)
+statement/sp/freturn 1
statement/sql/insert 1
-statement/sql/select 2
+statement/sql/select 3
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 2
+execute dump_transactions_global;
+event_name count_star
+transaction 2
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 2
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -249,14 +282,10 @@ connection default;
"================== Step 4 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
user2 wait/io/file/sql/query_log 1
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
user2 wait/synch/rwlock/sql/LOCK_grant 0
username status
user3 not found
@@ -268,19 +297,15 @@ execute dump_waits_user;
user event_name count_star
execute dump_waits_host;
host event_name count_star
-localhost wait/io/file/sql/query_log 5
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/io/file/sql/query_log 8
localhost wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 5
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 8
wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 5
+wait/io/file/sql/query_log 8
wait/synch/rwlock/sql/LOCK_grant 1
execute dump_stages_account;
user host event_name count_star
@@ -288,25 +313,25 @@ 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 6
-localhost stage/sql/Init 5
-localhost stage/sql/Init for update 1
-localhost stage/sql/Opening tables 4
+localhost stage/sql/checking permissions 4
+localhost stage/sql/closing tables 11
+localhost stage/sql/init 3
+localhost stage/sql/Opening tables 7
+localhost stage/sql/starting 6
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 3
-stage/sql/Closing tables 6
-stage/sql/Init 5
-stage/sql/Init for update 1
-stage/sql/Opening tables 4
+stage/sql/checking permissions 4
+stage/sql/closing tables 11
+stage/sql/init 3
+stage/sql/Opening tables 7
+stage/sql/starting 6
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 3
-stage/sql/Closing tables 6
-stage/sql/Init 5
-stage/sql/Init for update 1
-stage/sql/Opening tables 4
+stage/sql/checking permissions 4
+stage/sql/closing tables 11
+stage/sql/init 3
+stage/sql/Opening tables 7
+stage/sql/starting 6
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -315,18 +340,34 @@ execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 0
+localhost statement/sp/freturn 1
localhost statement/sql/insert 1
-localhost statement/sql/select 2
+localhost statement/sql/select 3
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 1
statement/sql/insert 1
-statement/sql/select 2
+statement/sql/select 3
execute dump_statements_history;
event_name count(event_name)
+statement/sp/freturn 1
statement/sql/insert 1
-statement/sql/select 2
+statement/sql/select 3
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 2
+execute dump_transactions_global;
+event_name count_star
+transaction 2
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 2
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -335,25 +376,26 @@ execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 3 3
connection con2;
-select get_lock("marker", 10);
-get_lock("marker", 10)
+select uuid_short() <> 1;
+uuid_short() <> 1
1
-select release_lock("marker");
-release_lock("marker")
+select uuid_short() <> 1;
+uuid_short() <> 1
1
+start transaction;
insert into test.t1 values ("marker");
+commit;
+select test.f(10,20);
+test.f(10,20)
+30
connection default;
"================== Step 5 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user2 wait/io/file/sql/query_log 4
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 7
user2 wait/synch/rwlock/sql/LOCK_grant 1
username status
user3 not found
@@ -365,19 +407,15 @@ execute dump_waits_user;
user event_name count_star
execute dump_waits_host;
host event_name count_star
-localhost wait/io/file/sql/query_log 8
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/io/file/sql/query_log 14
localhost wait/synch/rwlock/sql/LOCK_grant 2
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 8
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 14
wait/synch/rwlock/sql/LOCK_grant 2
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 8
+wait/io/file/sql/query_log 14
wait/synch/rwlock/sql/LOCK_grant 2
execute dump_stages_account;
user host event_name count_star
@@ -385,25 +423,25 @@ execute dump_stages_user;
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 10
-localhost stage/sql/Init 10
-localhost stage/sql/Init for update 2
-localhost stage/sql/Opening tables 7
+localhost stage/sql/checking permissions 8
+localhost stage/sql/closing tables 21
+localhost stage/sql/init 6
+localhost stage/sql/Opening tables 13
+localhost stage/sql/starting 12
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 6
-stage/sql/Closing tables 10
-stage/sql/Init 10
-stage/sql/Init for update 2
-stage/sql/Opening tables 7
+stage/sql/checking permissions 8
+stage/sql/closing tables 21
+stage/sql/init 6
+stage/sql/Opening tables 13
+stage/sql/starting 12
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 6
-stage/sql/Closing tables 10
-stage/sql/Init 10
-stage/sql/Init for update 2
-stage/sql/Opening tables 7
+stage/sql/checking permissions 8
+stage/sql/closing tables 21
+stage/sql/init 6
+stage/sql/Opening tables 13
+stage/sql/starting 12
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -412,18 +450,34 @@ execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 0
+localhost statement/sp/freturn 2
localhost statement/sql/insert 2
-localhost statement/sql/select 4
+localhost statement/sql/select 6
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 2
statement/sql/insert 2
-statement/sql/select 4
+statement/sql/select 6
execute dump_statements_history;
event_name count(event_name)
+statement/sp/freturn 2
statement/sql/insert 2
-statement/sql/select 4
+statement/sql/select 6
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 4
+execute dump_transactions_global;
+event_name count_star
+transaction 4
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 4
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -436,19 +490,13 @@ connection default;
"================== Step 6 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user2 wait/io/file/sql/query_log 4
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 7
user2 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
user3 wait/io/file/sql/query_log 1
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
user3 wait/synch/rwlock/sql/LOCK_grant 0
username status
user4 not found
@@ -458,19 +506,15 @@ execute dump_waits_user;
user event_name count_star
execute dump_waits_host;
host event_name count_star
-localhost wait/io/file/sql/query_log 9
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/io/file/sql/query_log 15
localhost wait/synch/rwlock/sql/LOCK_grant 2
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 9
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 15
wait/synch/rwlock/sql/LOCK_grant 2
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 9
+wait/io/file/sql/query_log 15
wait/synch/rwlock/sql/LOCK_grant 2
execute dump_stages_account;
user host event_name count_star
@@ -478,25 +522,25 @@ execute dump_stages_user;
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 10
-localhost stage/sql/Init 10
-localhost stage/sql/Init for update 2
-localhost stage/sql/Opening tables 7
+localhost stage/sql/checking permissions 8
+localhost stage/sql/closing tables 21
+localhost stage/sql/init 6
+localhost stage/sql/Opening tables 13
+localhost stage/sql/starting 12
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 6
-stage/sql/Closing tables 10
-stage/sql/Init 10
-stage/sql/Init for update 2
-stage/sql/Opening tables 7
+stage/sql/checking permissions 8
+stage/sql/closing tables 21
+stage/sql/init 6
+stage/sql/Opening tables 13
+stage/sql/starting 12
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 6
-stage/sql/Closing tables 10
-stage/sql/Init 10
-stage/sql/Init for update 2
-stage/sql/Opening tables 7
+stage/sql/checking permissions 8
+stage/sql/closing tables 21
+stage/sql/init 6
+stage/sql/Opening tables 13
+stage/sql/starting 12
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -505,18 +549,34 @@ execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 0
+localhost statement/sp/freturn 2
localhost statement/sql/insert 2
-localhost statement/sql/select 4
+localhost statement/sql/select 6
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 2
statement/sql/insert 2
-statement/sql/select 4
+statement/sql/select 6
execute dump_statements_history;
event_name count(event_name)
+statement/sp/freturn 2
statement/sql/insert 2
-statement/sql/select 4
+statement/sql/select 6
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 4
+execute dump_transactions_global;
+event_name count_star
+transaction 4
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 4
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -525,30 +585,29 @@ execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 4 4
connection con3;
-select get_lock("marker", 10);
-get_lock("marker", 10)
+select uuid_short() <> 1;
+uuid_short() <> 1
1
-select release_lock("marker");
-release_lock("marker")
+select uuid_short() <> 1;
+uuid_short() <> 1
1
+start transaction;
insert into test.t1 values ("marker");
+commit;
+select test.f(10,20);
+test.f(10,20)
+30
connection default;
"================== Step 7 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user2 wait/io/file/sql/query_log 4
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 7
user2 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user3 wait/io/file/sql/query_log 4
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/io/file/sql/query_log 7
user3 wait/synch/rwlock/sql/LOCK_grant 1
username status
user4 not found
@@ -558,19 +617,15 @@ execute dump_waits_user;
user event_name count_star
execute dump_waits_host;
host event_name count_star
-localhost wait/io/file/sql/query_log 12
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/io/file/sql/query_log 21
localhost wait/synch/rwlock/sql/LOCK_grant 3
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 12
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 21
wait/synch/rwlock/sql/LOCK_grant 3
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 12
+wait/io/file/sql/query_log 21
wait/synch/rwlock/sql/LOCK_grant 3
execute dump_stages_account;
user host event_name count_star
@@ -578,25 +633,25 @@ execute dump_stages_user;
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 14
-localhost stage/sql/Init 15
-localhost stage/sql/Init for update 3
-localhost stage/sql/Opening tables 10
+localhost stage/sql/checking permissions 12
+localhost stage/sql/closing tables 31
+localhost stage/sql/init 9
+localhost stage/sql/Opening tables 19
+localhost stage/sql/starting 18
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 9
-stage/sql/Closing tables 14
-stage/sql/Init 15
-stage/sql/Init for update 3
-stage/sql/Opening tables 10
+stage/sql/checking permissions 12
+stage/sql/closing tables 31
+stage/sql/init 9
+stage/sql/Opening tables 19
+stage/sql/starting 18
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 9
-stage/sql/Closing tables 14
-stage/sql/Init 15
-stage/sql/Init for update 3
-stage/sql/Opening tables 10
+stage/sql/checking permissions 12
+stage/sql/closing tables 31
+stage/sql/init 9
+stage/sql/Opening tables 19
+stage/sql/starting 18
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -605,18 +660,34 @@ execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 0
+localhost statement/sp/freturn 3
localhost statement/sql/insert 3
-localhost statement/sql/select 6
+localhost statement/sql/select 9
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 3
statement/sql/insert 3
-statement/sql/select 6
+statement/sql/select 9
execute dump_statements_history;
event_name count(event_name)
+statement/sp/freturn 3
statement/sql/insert 3
-statement/sql/select 6
+statement/sql/select 9
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 6
+execute dump_transactions_global;
+event_name count_star
+transaction 6
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 6
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -629,24 +700,16 @@ connection default;
"================== Step 8 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user2 wait/io/file/sql/query_log 4
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 7
user2 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user3 wait/io/file/sql/query_log 4
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/io/file/sql/query_log 7
user3 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
user4 wait/io/file/sql/query_log 1
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
user4 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_account;
user host event_name count_star
@@ -654,19 +717,15 @@ execute dump_waits_user;
user event_name count_star
execute dump_waits_host;
host event_name count_star
-localhost wait/io/file/sql/query_log 13
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/io/file/sql/query_log 22
localhost wait/synch/rwlock/sql/LOCK_grant 3
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 13
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 22
wait/synch/rwlock/sql/LOCK_grant 3
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 13
+wait/io/file/sql/query_log 22
wait/synch/rwlock/sql/LOCK_grant 3
execute dump_stages_account;
user host event_name count_star
@@ -674,25 +733,25 @@ execute dump_stages_user;
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 14
-localhost stage/sql/Init 15
-localhost stage/sql/Init for update 3
-localhost stage/sql/Opening tables 10
+localhost stage/sql/checking permissions 12
+localhost stage/sql/closing tables 31
+localhost stage/sql/init 9
+localhost stage/sql/Opening tables 19
+localhost stage/sql/starting 18
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 9
-stage/sql/Closing tables 14
-stage/sql/Init 15
-stage/sql/Init for update 3
-stage/sql/Opening tables 10
+stage/sql/checking permissions 12
+stage/sql/closing tables 31
+stage/sql/init 9
+stage/sql/Opening tables 19
+stage/sql/starting 18
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 9
-stage/sql/Closing tables 14
-stage/sql/Init 15
-stage/sql/Init for update 3
-stage/sql/Opening tables 10
+stage/sql/checking permissions 12
+stage/sql/closing tables 31
+stage/sql/init 9
+stage/sql/Opening tables 19
+stage/sql/starting 18
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -701,18 +760,34 @@ execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 0
+localhost statement/sp/freturn 3
localhost statement/sql/insert 3
-localhost statement/sql/select 6
+localhost statement/sql/select 9
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 3
statement/sql/insert 3
-statement/sql/select 6
+statement/sql/select 9
execute dump_statements_history;
event_name count(event_name)
+statement/sp/freturn 3
statement/sql/insert 3
-statement/sql/select 6
+statement/sql/select 9
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 6
+execute dump_transactions_global;
+event_name count_star
+transaction 6
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 6
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -721,35 +796,32 @@ execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 5 5
connection con4;
-select get_lock("marker", 10);
-get_lock("marker", 10)
+select uuid_short() <> 1;
+uuid_short() <> 1
1
-select release_lock("marker");
-release_lock("marker")
+select uuid_short() <> 1;
+uuid_short() <> 1
1
+start transaction;
insert into test.t1 values ("marker");
+commit;
+select test.f(10,20);
+test.f(10,20)
+30
connection default;
"================== Step 9 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user2 wait/io/file/sql/query_log 4
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 7
user2 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user3 wait/io/file/sql/query_log 4
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/io/file/sql/query_log 7
user3 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user4 wait/io/file/sql/query_log 4
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/io/file/sql/query_log 7
user4 wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_account;
user host event_name count_star
@@ -757,19 +829,15 @@ execute dump_waits_user;
user event_name count_star
execute dump_waits_host;
host event_name count_star
-localhost wait/io/file/sql/query_log 16
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/io/file/sql/query_log 28
localhost wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 16
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 28
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 16
+wait/io/file/sql/query_log 28
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
@@ -777,25 +845,25 @@ execute dump_stages_user;
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 18
-localhost stage/sql/Init 20
-localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 13
+localhost stage/sql/checking permissions 16
+localhost stage/sql/closing tables 41
+localhost stage/sql/init 12
+localhost stage/sql/Opening tables 25
+localhost stage/sql/starting 24
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 20
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 24
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 20
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 24
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -804,18 +872,34 @@ execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 0
+localhost statement/sp/freturn 4
localhost statement/sql/insert 4
-localhost statement/sql/select 8
+localhost statement/sql/select 12
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -830,19 +914,13 @@ call dump_thread();
username status
user1 not found
username event_name count_star
-user2 wait/io/file/sql/query_log 4
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 7
user2 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user3 wait/io/file/sql/query_log 4
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/io/file/sql/query_log 7
user3 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user4 wait/io/file/sql/query_log 4
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/io/file/sql/query_log 7
user4 wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_account;
user host event_name count_star
@@ -850,20 +928,15 @@ execute dump_waits_user;
user event_name count_star
execute dump_waits_host;
host event_name count_star
-localhost wait/io/file/sql/query_log 17
-localhost wait/synch/mutex/sql/LOCK_connection_count 1
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/io/file/sql/query_log 29
localhost wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 17
-wait/synch/mutex/sql/LOCK_connection_count 1
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 29
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 17
-wait/synch/mutex/sql/LOCK_connection_count 1
+wait/io/file/sql/query_log 29
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
@@ -871,25 +944,25 @@ execute dump_stages_user;
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 18
-localhost stage/sql/Init 21
-localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 13
+localhost stage/sql/checking permissions 16
+localhost stage/sql/closing tables 41
+localhost stage/sql/init 12
+localhost stage/sql/Opening tables 25
+localhost stage/sql/starting 25
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 21
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 25
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 21
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 25
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -898,19 +971,35 @@ execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 1
+localhost statement/sp/freturn 4
localhost statement/sql/insert 4
-localhost statement/sql/select 8
+localhost statement/sql/select 12
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 1
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 1
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -927,14 +1016,10 @@ user1 not found
username status
user2 not found
username event_name count_star
-user3 wait/io/file/sql/query_log 4
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/io/file/sql/query_log 7
user3 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user4 wait/io/file/sql/query_log 4
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/io/file/sql/query_log 7
user4 wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_account;
user host event_name count_star
@@ -942,20 +1027,15 @@ execute dump_waits_user;
user event_name count_star
execute dump_waits_host;
host event_name count_star
-localhost wait/io/file/sql/query_log 18
-localhost wait/synch/mutex/sql/LOCK_connection_count 2
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/io/file/sql/query_log 30
localhost wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 18
-wait/synch/mutex/sql/LOCK_connection_count 2
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 30
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 18
-wait/synch/mutex/sql/LOCK_connection_count 2
+wait/io/file/sql/query_log 30
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
@@ -963,25 +1043,25 @@ execute dump_stages_user;
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 18
-localhost stage/sql/Init 22
-localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 13
+localhost stage/sql/checking permissions 16
+localhost stage/sql/closing tables 41
+localhost stage/sql/init 12
+localhost stage/sql/Opening tables 25
+localhost stage/sql/starting 26
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 22
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 26
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 22
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 26
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -990,19 +1070,35 @@ execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 2
+localhost statement/sp/freturn 4
localhost statement/sql/insert 4
-localhost statement/sql/select 8
+localhost statement/sql/select 12
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 2
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 2
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -1021,9 +1117,7 @@ user2 not found
username status
user3 not found
username event_name count_star
-user4 wait/io/file/sql/query_log 4
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/io/file/sql/query_log 7
user4 wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_account;
user host event_name count_star
@@ -1031,20 +1125,15 @@ execute dump_waits_user;
user event_name count_star
execute dump_waits_host;
host event_name count_star
-localhost wait/io/file/sql/query_log 19
-localhost wait/synch/mutex/sql/LOCK_connection_count 3
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/io/file/sql/query_log 31
localhost wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 19
-wait/synch/mutex/sql/LOCK_connection_count 3
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 31
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 19
-wait/synch/mutex/sql/LOCK_connection_count 3
+wait/io/file/sql/query_log 31
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
@@ -1052,25 +1141,25 @@ execute dump_stages_user;
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 18
-localhost stage/sql/Init 23
-localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 13
+localhost stage/sql/checking permissions 16
+localhost stage/sql/closing tables 41
+localhost stage/sql/init 12
+localhost stage/sql/Opening tables 25
+localhost stage/sql/starting 27
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 23
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 27
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 23
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 27
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1079,19 +1168,35 @@ execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 3
+localhost statement/sp/freturn 4
localhost statement/sql/insert 4
-localhost statement/sql/select 8
+localhost statement/sql/select 12
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 3
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 3
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -1117,20 +1222,15 @@ execute dump_waits_user;
user event_name count_star
execute dump_waits_host;
host event_name count_star
-localhost wait/io/file/sql/query_log 20
-localhost wait/synch/mutex/sql/LOCK_connection_count 4
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/io/file/sql/query_log 32
localhost wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
@@ -1138,25 +1238,25 @@ execute dump_stages_user;
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 18
-localhost stage/sql/Init 24
-localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 13
+localhost stage/sql/checking permissions 16
+localhost stage/sql/closing tables 41
+localhost stage/sql/init 12
+localhost stage/sql/Opening tables 25
+localhost stage/sql/starting 28
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1165,19 +1265,35 @@ execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 4
+localhost statement/sp/freturn 4
localhost statement/sql/insert 4
-localhost statement/sql/select 8
+localhost statement/sql/select 12
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -1204,20 +1320,15 @@ execute dump_waits_user;
user event_name count_star
execute dump_waits_host;
host event_name count_star
-localhost wait/io/file/sql/query_log 20
-localhost wait/synch/mutex/sql/LOCK_connection_count 4
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/io/file/sql/query_log 32
localhost wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
@@ -1225,25 +1336,25 @@ execute dump_stages_user;
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 18
-localhost stage/sql/Init 24
-localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 13
+localhost stage/sql/checking permissions 16
+localhost stage/sql/closing tables 41
+localhost stage/sql/init 12
+localhost stage/sql/Opening tables 25
+localhost stage/sql/starting 28
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1252,19 +1363,35 @@ execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 4
+localhost statement/sp/freturn 4
localhost statement/sql/insert 4
-localhost statement/sql/select 8
+localhost statement/sql/select 12
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -1290,20 +1417,15 @@ execute dump_waits_user;
user event_name count_star
execute dump_waits_host;
host event_name count_star
-localhost wait/io/file/sql/query_log 20
-localhost wait/synch/mutex/sql/LOCK_connection_count 4
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/io/file/sql/query_log 32
localhost wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
@@ -1311,25 +1433,25 @@ execute dump_stages_user;
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 18
-localhost stage/sql/Init 24
-localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 13
+localhost stage/sql/checking permissions 16
+localhost stage/sql/closing tables 41
+localhost stage/sql/init 12
+localhost stage/sql/Opening tables 25
+localhost stage/sql/starting 28
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1338,19 +1460,35 @@ execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 4
+localhost statement/sp/freturn 4
localhost statement/sql/insert 4
-localhost statement/sql/select 8
+localhost statement/sql/select 12
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -1376,20 +1514,15 @@ execute dump_waits_user;
user event_name count_star
execute dump_waits_host;
host event_name count_star
-localhost wait/io/file/sql/query_log 20
-localhost wait/synch/mutex/sql/LOCK_connection_count 4
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/io/file/sql/query_log 32
localhost wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
@@ -1397,25 +1530,25 @@ execute dump_stages_user;
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 18
-localhost stage/sql/Init 24
-localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 13
+localhost stage/sql/checking permissions 16
+localhost stage/sql/closing tables 41
+localhost stage/sql/init 12
+localhost stage/sql/Opening tables 25
+localhost stage/sql/starting 28
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1424,19 +1557,35 @@ execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 4
+localhost statement/sp/freturn 4
localhost statement/sql/insert 4
-localhost statement/sql/select 8
+localhost statement/sql/select 12
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -1463,19 +1612,14 @@ user event_name count_star
execute dump_waits_host;
host event_name count_star
localhost wait/io/file/sql/query_log 0
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
@@ -1483,25 +1627,25 @@ execute dump_stages_user;
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 18
-localhost stage/sql/Init 24
-localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 13
+localhost stage/sql/checking permissions 16
+localhost stage/sql/closing tables 41
+localhost stage/sql/init 12
+localhost stage/sql/Opening tables 25
+localhost stage/sql/starting 28
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1510,19 +1654,35 @@ execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 4
+localhost statement/sp/freturn 4
localhost statement/sql/insert 4
-localhost statement/sql/select 8
+localhost statement/sql/select 12
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -1549,19 +1709,14 @@ user event_name count_star
execute dump_waits_host;
host event_name count_star
localhost wait/io/file/sql/query_log 0
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
@@ -1569,25 +1724,25 @@ execute dump_stages_user;
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 18
-localhost stage/sql/Init 24
-localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 13
+localhost stage/sql/checking permissions 16
+localhost stage/sql/closing tables 41
+localhost stage/sql/init 12
+localhost stage/sql/Opening tables 25
+localhost stage/sql/starting 28
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1596,19 +1751,35 @@ execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 4
+localhost statement/sp/freturn 4
localhost statement/sql/insert 4
-localhost statement/sql/select 8
+localhost statement/sql/select 12
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -1635,19 +1806,14 @@ user event_name count_star
execute dump_waits_host;
host event_name count_star
localhost wait/io/file/sql/query_log 0
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
@@ -1655,25 +1821,25 @@ execute dump_stages_user;
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 18
-localhost stage/sql/Init 24
-localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 13
+localhost stage/sql/checking permissions 16
+localhost stage/sql/closing tables 41
+localhost stage/sql/init 12
+localhost stage/sql/Opening tables 25
+localhost stage/sql/starting 28
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1682,19 +1848,35 @@ execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 4
+localhost statement/sp/freturn 4
localhost statement/sql/insert 4
-localhost statement/sql/select 8
+localhost statement/sql/select 12
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -1721,19 +1903,14 @@ user event_name count_star
execute dump_waits_host;
host event_name count_star
localhost wait/io/file/sql/query_log 0
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
@@ -1741,25 +1918,25 @@ execute dump_stages_user;
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 18
-localhost stage/sql/Init 24
-localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 13
+localhost stage/sql/checking permissions 16
+localhost stage/sql/closing tables 41
+localhost stage/sql/init 12
+localhost stage/sql/Opening tables 25
+localhost stage/sql/starting 28
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1768,19 +1945,35 @@ execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 4
+localhost statement/sp/freturn 4
localhost statement/sql/insert 4
-localhost statement/sql/select 8
+localhost statement/sql/select 12
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -1807,19 +2000,14 @@ user event_name count_star
execute dump_waits_host;
host event_name count_star
localhost wait/io/file/sql/query_log 0
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
@@ -1827,25 +2015,25 @@ execute dump_stages_user;
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 18
-localhost stage/sql/Init 24
-localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 13
+localhost stage/sql/checking permissions 16
+localhost stage/sql/closing tables 41
+localhost stage/sql/init 12
+localhost stage/sql/Opening tables 25
+localhost stage/sql/starting 28
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1854,19 +2042,35 @@ execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 4
+localhost statement/sp/freturn 4
localhost statement/sql/insert 4
-localhost statement/sql/select 8
+localhost statement/sql/select 12
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -1893,19 +2097,14 @@ user event_name count_star
execute dump_waits_host;
host event_name count_star
localhost wait/io/file/sql/query_log 0
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
@@ -1913,25 +2112,25 @@ execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 0
-localhost stage/sql/Closing tables 0
-localhost stage/sql/Init 0
-localhost stage/sql/Init for update 0
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
localhost stage/sql/Opening tables 0
+localhost stage/sql/starting 0
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1940,19 +2139,35 @@ execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 4
+localhost statement/sp/freturn 4
localhost statement/sql/insert 4
-localhost statement/sql/select 8
+localhost statement/sql/select 12
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -1979,19 +2194,14 @@ user event_name count_star
execute dump_waits_host;
host event_name count_star
localhost wait/io/file/sql/query_log 0
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
@@ -1999,25 +2209,25 @@ execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 0
-localhost stage/sql/Closing tables 0
-localhost stage/sql/Init 0
-localhost stage/sql/Init for update 0
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
localhost stage/sql/Opening tables 0
+localhost stage/sql/starting 0
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2026,19 +2236,35 @@ execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 4
+localhost statement/sp/freturn 4
localhost statement/sql/insert 4
-localhost statement/sql/select 8
+localhost statement/sql/select 12
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -2065,19 +2291,14 @@ user event_name count_star
execute dump_waits_host;
host event_name count_star
localhost wait/io/file/sql/query_log 0
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
@@ -2085,25 +2306,25 @@ execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 0
-localhost stage/sql/Closing tables 0
-localhost stage/sql/Init 0
-localhost stage/sql/Init for update 0
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
localhost stage/sql/Opening tables 0
+localhost stage/sql/starting 0
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2112,19 +2333,35 @@ execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 4
+localhost statement/sp/freturn 4
localhost statement/sql/insert 4
-localhost statement/sql/select 8
+localhost statement/sql/select 12
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -2151,19 +2388,14 @@ user event_name count_star
execute dump_waits_host;
host event_name count_star
localhost wait/io/file/sql/query_log 0
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
@@ -2171,25 +2403,25 @@ execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 0
-localhost stage/sql/Closing tables 0
-localhost stage/sql/Init 0
-localhost stage/sql/Init for update 0
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
localhost stage/sql/Opening tables 0
+localhost stage/sql/starting 0
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2198,19 +2430,35 @@ execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 4
+localhost statement/sp/freturn 4
localhost statement/sql/insert 4
-localhost statement/sql/select 8
+localhost statement/sql/select 12
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -2237,19 +2485,14 @@ user event_name count_star
execute dump_waits_host;
host event_name count_star
localhost wait/io/file/sql/query_log 0
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
@@ -2257,25 +2500,25 @@ execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 0
-localhost stage/sql/Closing tables 0
-localhost stage/sql/Init 0
-localhost stage/sql/Init for update 0
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
localhost stage/sql/Opening tables 0
+localhost stage/sql/starting 0
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2284,19 +2527,35 @@ execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 4
+localhost statement/sp/freturn 4
localhost statement/sql/insert 4
-localhost statement/sql/select 8
+localhost statement/sql/select 12
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -2323,19 +2582,14 @@ user event_name count_star
execute dump_waits_host;
host event_name count_star
localhost wait/io/file/sql/query_log 0
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
@@ -2343,25 +2597,25 @@ execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 0
-localhost stage/sql/Closing tables 0
-localhost stage/sql/Init 0
-localhost stage/sql/Init for update 0
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
localhost stage/sql/Opening tables 0
+localhost stage/sql/starting 0
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2370,19 +2624,35 @@ execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 0
+localhost statement/sp/freturn 0
localhost statement/sql/insert 0
localhost statement/sql/select 0
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -2409,19 +2679,14 @@ user event_name count_star
execute dump_waits_host;
host event_name count_star
localhost wait/io/file/sql/query_log 0
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
@@ -2429,25 +2694,25 @@ execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 0
-localhost stage/sql/Closing tables 0
-localhost stage/sql/Init 0
-localhost stage/sql/Init for update 0
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
localhost stage/sql/Opening tables 0
+localhost stage/sql/starting 0
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2456,19 +2721,520 @@ execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 0
+localhost statement/sp/freturn 0
localhost statement/sql/insert 0
localhost statement/sql/select 0
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 0
statement/sql/insert 0
statement/sql/select 0
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_transactions_summary_by_thread_by_event_name;
+"================== TRANSACTIONS_BY_THREAD truncated =================="
+"================== Step 29 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 32
+wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
+localhost stage/sql/Opening tables 0
+localhost stage/sql/starting 0
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+stage/sql/starting 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 0
+localhost statement/sp/freturn 0
+localhost statement/sql/insert 0
+localhost statement/sql/select 0
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sp/freturn 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sp/freturn 4
+statement/sql/insert 4
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_transactions_summary_by_account_by_event_name;
+"================== TRANSACTIONS_BY_ACCOUNT truncated =================="
+"================== Step 30 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 32
+wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
+localhost stage/sql/Opening tables 0
+localhost stage/sql/starting 0
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+stage/sql/starting 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 0
+localhost statement/sp/freturn 0
+localhost statement/sql/insert 0
+localhost statement/sql/select 0
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sp/freturn 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sp/freturn 4
+statement/sql/insert 4
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_transactions_summary_by_user_by_event_name;
+"================== TRANSACTIONS_BY_USER truncated =================="
+"================== Step 31 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 32
+wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
+localhost stage/sql/Opening tables 0
+localhost stage/sql/starting 0
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+stage/sql/starting 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 0
+localhost statement/sp/freturn 0
+localhost statement/sql/insert 0
+localhost statement/sql/select 0
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sp/freturn 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sp/freturn 4
+statement/sql/insert 4
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_transactions_summary_by_host_by_event_name;
+"================== TRANSACTIONS_BY_HOST truncated =================="
+"================== Step 32 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 32
+wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
+localhost stage/sql/Opening tables 0
+localhost stage/sql/starting 0
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+stage/sql/starting 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 0
+localhost statement/sp/freturn 0
+localhost statement/sql/insert 0
+localhost statement/sql/select 0
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sp/freturn 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sp/freturn 4
+statement/sql/insert 4
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 0
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_transactions_summary_global_by_event_name;
+"================== TRANSACTIONS_GLOBAL truncated =================="
+"================== Step 33 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 32
+wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
+localhost stage/sql/Opening tables 0
+localhost stage/sql/starting 0
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+stage/sql/starting 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 0
+localhost statement/sp/freturn 0
+localhost statement/sql/insert 0
+localhost statement/sql/select 0
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sp/freturn 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sp/freturn 4
+statement/sql/insert 4
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 0
+execute dump_transactions_global;
+event_name count_star
+transaction 0
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -2478,7 +3244,7 @@ HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 1 5
truncate performance_schema.accounts;
"================== ACCOUNTS truncated =================="
-"================== Step 29 =================="
+"================== Step 34 =================="
call dump_thread();
username status
user1 not found
@@ -2495,19 +3261,14 @@ user event_name count_star
execute dump_waits_host;
host event_name count_star
localhost wait/io/file/sql/query_log 0
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
@@ -2515,25 +3276,25 @@ execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 0
-localhost stage/sql/Closing tables 0
-localhost stage/sql/Init 0
-localhost stage/sql/Init for update 0
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
localhost stage/sql/Opening tables 0
+localhost stage/sql/starting 0
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2542,19 +3303,35 @@ execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 0
+localhost statement/sp/freturn 0
localhost statement/sql/insert 0
localhost statement/sql/select 0
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 0
statement/sql/insert 0
statement/sql/select 0
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 0
+execute dump_transactions_global;
+event_name count_star
+transaction 0
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -2564,7 +3341,7 @@ HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 1 5
truncate performance_schema.users;
"================== USERS truncated =================="
-"================== Step 30 =================="
+"================== Step 35 =================="
call dump_thread();
username status
user1 not found
@@ -2581,19 +3358,14 @@ user event_name count_star
execute dump_waits_host;
host event_name count_star
localhost wait/io/file/sql/query_log 0
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
@@ -2601,25 +3373,25 @@ execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 0
-localhost stage/sql/Closing tables 0
-localhost stage/sql/Init 0
-localhost stage/sql/Init for update 0
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
localhost stage/sql/Opening tables 0
+localhost stage/sql/starting 0
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2628,19 +3400,35 @@ execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 0
+localhost statement/sp/freturn 0
localhost statement/sql/insert 0
localhost statement/sql/select 0
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 0
statement/sql/insert 0
statement/sql/select 0
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 0
+execute dump_transactions_global;
+event_name count_star
+transaction 0
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -2650,7 +3438,7 @@ HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 1 5
truncate performance_schema.hosts;
"================== HOSTS truncated =================="
-"================== Step 31 =================="
+"================== Step 36 =================="
call dump_thread();
username status
user1 not found
@@ -2667,19 +3455,14 @@ user event_name count_star
execute dump_waits_host;
host event_name count_star
localhost wait/io/file/sql/query_log 0
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
@@ -2687,25 +3470,25 @@ execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 0
-localhost stage/sql/Closing tables 0
-localhost stage/sql/Init 0
-localhost stage/sql/Init for update 0
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
localhost stage/sql/Opening tables 0
+localhost stage/sql/starting 0
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2714,19 +3497,35 @@ execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 0
+localhost statement/sp/freturn 0
localhost statement/sql/insert 0
localhost statement/sql/select 0
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 0
statement/sql/insert 0
statement/sql/select 0
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 0
+execute dump_transactions_global;
+event_name count_star
+transaction 0
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
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 db281652c0c..24de36da22b 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
@@ -17,8 +17,6 @@ host event_name count_star
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
@@ -30,11 +28,11 @@ execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
execute dump_statements_account;
@@ -47,10 +45,22 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 0
statement/sql/insert 0
statement/sql/select 0
execute dump_statements_history;
event_name count(event_name)
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 0
+execute dump_transactions_history;
+event_name count(event_name)
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -63,8 +73,6 @@ connection default;
call dump_thread();
username event_name count_star
user1 wait/io/file/sql/query_log 1
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
user1 wait/synch/rwlock/sql/LOCK_grant 0
username status
user2 not found
@@ -81,8 +89,6 @@ host event_name count_star
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 1
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
@@ -95,11 +101,11 @@ execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
execute dump_statements_account;
@@ -112,10 +118,22 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 0
statement/sql/insert 0
statement/sql/select 0
execute dump_statements_history;
event_name count(event_name)
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 0
+execute dump_transactions_history;
+event_name count(event_name)
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -123,20 +141,23 @@ USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
connection con1;
-select get_lock("marker", 10);
-get_lock("marker", 10)
+select uuid_short() <> 1;
+uuid_short() <> 1
1
-select release_lock("marker");
-release_lock("marker")
+select uuid_short() <> 1;
+uuid_short() <> 1
1
+start transaction;
insert into test.t1 values ("marker");
+commit;
+select test.f(10,20);
+test.f(10,20)
+30
connection default;
"================== Step 3 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
username status
user2 not found
@@ -152,13 +173,11 @@ execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 4
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 7
wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 4
+wait/io/file/sql/query_log 7
wait/synch/rwlock/sql/LOCK_grant 1
execute dump_stages_account;
user host event_name count_star
@@ -168,18 +187,18 @@ 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 6
-stage/sql/Init 5
-stage/sql/Init for update 1
-stage/sql/Opening tables 4
+stage/sql/checking permissions 4
+stage/sql/closing tables 11
+stage/sql/init 3
+stage/sql/Opening tables 7
+stage/sql/starting 6
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 3
-stage/sql/Closing tables 6
-stage/sql/Init 5
-stage/sql/Init for update 1
-stage/sql/Opening tables 4
+stage/sql/checking permissions 4
+stage/sql/closing tables 11
+stage/sql/init 3
+stage/sql/Opening tables 7
+stage/sql/starting 6
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -190,12 +209,26 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 1
statement/sql/insert 1
-statement/sql/select 2
+statement/sql/select 3
execute dump_statements_history;
event_name count(event_name)
+statement/sp/freturn 1
statement/sql/insert 1
-statement/sql/select 2
+statement/sql/select 3
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 2
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 2
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -207,14 +240,10 @@ connection default;
"================== Step 4 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
user2 wait/io/file/sql/query_log 1
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
user2 wait/synch/rwlock/sql/LOCK_grant 0
username status
user3 not found
@@ -228,13 +257,11 @@ execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 5
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 8
wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 5
+wait/io/file/sql/query_log 8
wait/synch/rwlock/sql/LOCK_grant 1
execute dump_stages_account;
user host event_name count_star
@@ -244,18 +271,18 @@ 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 6
-stage/sql/Init 5
-stage/sql/Init for update 1
-stage/sql/Opening tables 4
+stage/sql/checking permissions 4
+stage/sql/closing tables 11
+stage/sql/init 3
+stage/sql/Opening tables 7
+stage/sql/starting 6
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 3
-stage/sql/Closing tables 6
-stage/sql/Init 5
-stage/sql/Init for update 1
-stage/sql/Opening tables 4
+stage/sql/checking permissions 4
+stage/sql/closing tables 11
+stage/sql/init 3
+stage/sql/Opening tables 7
+stage/sql/starting 6
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -266,12 +293,26 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 1
statement/sql/insert 1
-statement/sql/select 2
+statement/sql/select 3
execute dump_statements_history;
event_name count(event_name)
+statement/sp/freturn 1
statement/sql/insert 1
-statement/sql/select 2
+statement/sql/select 3
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 2
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 2
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -279,25 +320,26 @@ USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
connection con2;
-select get_lock("marker", 10);
-get_lock("marker", 10)
+select uuid_short() <> 1;
+uuid_short() <> 1
1
-select release_lock("marker");
-release_lock("marker")
+select uuid_short() <> 1;
+uuid_short() <> 1
1
+start transaction;
insert into test.t1 values ("marker");
+commit;
+select test.f(10,20);
+test.f(10,20)
+30
connection default;
"================== Step 5 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user2 wait/io/file/sql/query_log 4
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 7
user2 wait/synch/rwlock/sql/LOCK_grant 1
username status
user3 not found
@@ -311,13 +353,11 @@ execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 8
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 14
wait/synch/rwlock/sql/LOCK_grant 2
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 8
+wait/io/file/sql/query_log 14
wait/synch/rwlock/sql/LOCK_grant 2
execute dump_stages_account;
user host event_name count_star
@@ -327,18 +367,18 @@ execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 6
-stage/sql/Closing tables 10
-stage/sql/Init 10
-stage/sql/Init for update 2
-stage/sql/Opening tables 7
+stage/sql/checking permissions 8
+stage/sql/closing tables 21
+stage/sql/init 6
+stage/sql/Opening tables 13
+stage/sql/starting 12
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 6
-stage/sql/Closing tables 10
-stage/sql/Init 10
-stage/sql/Init for update 2
-stage/sql/Opening tables 7
+stage/sql/checking permissions 8
+stage/sql/closing tables 21
+stage/sql/init 6
+stage/sql/Opening tables 13
+stage/sql/starting 12
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -349,12 +389,26 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 2
statement/sql/insert 2
-statement/sql/select 4
+statement/sql/select 6
execute dump_statements_history;
event_name count(event_name)
+statement/sp/freturn 2
statement/sql/insert 2
-statement/sql/select 4
+statement/sql/select 6
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 4
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 4
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -366,19 +420,13 @@ connection default;
"================== Step 6 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user2 wait/io/file/sql/query_log 4
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 7
user2 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
user3 wait/io/file/sql/query_log 1
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
user3 wait/synch/rwlock/sql/LOCK_grant 0
username status
user4 not found
@@ -390,13 +438,11 @@ execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 9
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 15
wait/synch/rwlock/sql/LOCK_grant 2
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 9
+wait/io/file/sql/query_log 15
wait/synch/rwlock/sql/LOCK_grant 2
execute dump_stages_account;
user host event_name count_star
@@ -406,18 +452,18 @@ execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 6
-stage/sql/Closing tables 10
-stage/sql/Init 10
-stage/sql/Init for update 2
-stage/sql/Opening tables 7
+stage/sql/checking permissions 8
+stage/sql/closing tables 21
+stage/sql/init 6
+stage/sql/Opening tables 13
+stage/sql/starting 12
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 6
-stage/sql/Closing tables 10
-stage/sql/Init 10
-stage/sql/Init for update 2
-stage/sql/Opening tables 7
+stage/sql/checking permissions 8
+stage/sql/closing tables 21
+stage/sql/init 6
+stage/sql/Opening tables 13
+stage/sql/starting 12
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -428,12 +474,26 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 2
statement/sql/insert 2
-statement/sql/select 4
+statement/sql/select 6
execute dump_statements_history;
event_name count(event_name)
+statement/sp/freturn 2
statement/sql/insert 2
-statement/sql/select 4
+statement/sql/select 6
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 4
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 4
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -441,30 +501,29 @@ USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
connection con3;
-select get_lock("marker", 10);
-get_lock("marker", 10)
+select uuid_short() <> 1;
+uuid_short() <> 1
1
-select release_lock("marker");
-release_lock("marker")
+select uuid_short() <> 1;
+uuid_short() <> 1
1
+start transaction;
insert into test.t1 values ("marker");
+commit;
+select test.f(10,20);
+test.f(10,20)
+30
connection default;
"================== Step 7 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user2 wait/io/file/sql/query_log 4
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 7
user2 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user3 wait/io/file/sql/query_log 4
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/io/file/sql/query_log 7
user3 wait/synch/rwlock/sql/LOCK_grant 1
username status
user4 not found
@@ -476,13 +535,11 @@ execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 12
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 21
wait/synch/rwlock/sql/LOCK_grant 3
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 12
+wait/io/file/sql/query_log 21
wait/synch/rwlock/sql/LOCK_grant 3
execute dump_stages_account;
user host event_name count_star
@@ -492,18 +549,18 @@ execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 9
-stage/sql/Closing tables 14
-stage/sql/Init 15
-stage/sql/Init for update 3
-stage/sql/Opening tables 10
+stage/sql/checking permissions 12
+stage/sql/closing tables 31
+stage/sql/init 9
+stage/sql/Opening tables 19
+stage/sql/starting 18
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 9
-stage/sql/Closing tables 14
-stage/sql/Init 15
-stage/sql/Init for update 3
-stage/sql/Opening tables 10
+stage/sql/checking permissions 12
+stage/sql/closing tables 31
+stage/sql/init 9
+stage/sql/Opening tables 19
+stage/sql/starting 18
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -514,12 +571,26 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 3
statement/sql/insert 3
-statement/sql/select 6
+statement/sql/select 9
execute dump_statements_history;
event_name count(event_name)
+statement/sp/freturn 3
statement/sql/insert 3
-statement/sql/select 6
+statement/sql/select 9
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 6
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 6
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -531,24 +602,16 @@ connection default;
"================== Step 8 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user2 wait/io/file/sql/query_log 4
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 7
user2 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user3 wait/io/file/sql/query_log 4
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/io/file/sql/query_log 7
user3 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
user4 wait/io/file/sql/query_log 1
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
user4 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_account;
user host event_name count_star
@@ -558,13 +621,11 @@ execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 13
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 22
wait/synch/rwlock/sql/LOCK_grant 3
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 13
+wait/io/file/sql/query_log 22
wait/synch/rwlock/sql/LOCK_grant 3
execute dump_stages_account;
user host event_name count_star
@@ -574,18 +635,18 @@ execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 9
-stage/sql/Closing tables 14
-stage/sql/Init 15
-stage/sql/Init for update 3
-stage/sql/Opening tables 10
+stage/sql/checking permissions 12
+stage/sql/closing tables 31
+stage/sql/init 9
+stage/sql/Opening tables 19
+stage/sql/starting 18
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 9
-stage/sql/Closing tables 14
-stage/sql/Init 15
-stage/sql/Init for update 3
-stage/sql/Opening tables 10
+stage/sql/checking permissions 12
+stage/sql/closing tables 31
+stage/sql/init 9
+stage/sql/Opening tables 19
+stage/sql/starting 18
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -596,12 +657,26 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 3
statement/sql/insert 3
-statement/sql/select 6
+statement/sql/select 9
execute dump_statements_history;
event_name count(event_name)
+statement/sp/freturn 3
statement/sql/insert 3
-statement/sql/select 6
+statement/sql/select 9
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 6
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 6
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -609,35 +684,32 @@ USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
connection con4;
-select get_lock("marker", 10);
-get_lock("marker", 10)
+select uuid_short() <> 1;
+uuid_short() <> 1
1
-select release_lock("marker");
-release_lock("marker")
+select uuid_short() <> 1;
+uuid_short() <> 1
1
+start transaction;
insert into test.t1 values ("marker");
+commit;
+select test.f(10,20);
+test.f(10,20)
+30
connection default;
"================== Step 9 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user2 wait/io/file/sql/query_log 4
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 7
user2 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user3 wait/io/file/sql/query_log 4
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/io/file/sql/query_log 7
user3 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user4 wait/io/file/sql/query_log 4
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/io/file/sql/query_log 7
user4 wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_account;
user host event_name count_star
@@ -647,13 +719,11 @@ execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 16
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 28
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 16
+wait/io/file/sql/query_log 28
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
@@ -663,18 +733,18 @@ execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 20
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 24
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 20
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 24
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -685,12 +755,26 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -704,19 +788,13 @@ call dump_thread();
username status
user1 not found
username event_name count_star
-user2 wait/io/file/sql/query_log 4
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 7
user2 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user3 wait/io/file/sql/query_log 4
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/io/file/sql/query_log 7
user3 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user4 wait/io/file/sql/query_log 4
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/io/file/sql/query_log 7
user4 wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_account;
user host event_name count_star
@@ -726,14 +804,11 @@ execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 17
-wait/synch/mutex/sql/LOCK_connection_count 1
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 29
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 17
-wait/synch/mutex/sql/LOCK_connection_count 1
+wait/io/file/sql/query_log 29
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
@@ -743,18 +818,18 @@ execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 21
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 25
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 21
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 25
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -765,13 +840,27 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 1
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 1
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -787,14 +876,10 @@ user1 not found
username status
user2 not found
username event_name count_star
-user3 wait/io/file/sql/query_log 4
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/io/file/sql/query_log 7
user3 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user4 wait/io/file/sql/query_log 4
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/io/file/sql/query_log 7
user4 wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_account;
user host event_name count_star
@@ -804,14 +889,11 @@ execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 18
-wait/synch/mutex/sql/LOCK_connection_count 2
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 30
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 18
-wait/synch/mutex/sql/LOCK_connection_count 2
+wait/io/file/sql/query_log 30
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
@@ -821,18 +903,18 @@ execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 22
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 26
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 22
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 26
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -843,13 +925,27 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 2
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 2
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -867,9 +963,7 @@ user2 not found
username status
user3 not found
username event_name count_star
-user4 wait/io/file/sql/query_log 4
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/io/file/sql/query_log 7
user4 wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_account;
user host event_name count_star
@@ -879,14 +973,11 @@ execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 19
-wait/synch/mutex/sql/LOCK_connection_count 3
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 31
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 19
-wait/synch/mutex/sql/LOCK_connection_count 3
+wait/io/file/sql/query_log 31
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
@@ -896,18 +987,18 @@ execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 23
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 27
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 23
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 27
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -918,13 +1009,27 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 3
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 3
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -951,14 +1056,11 @@ execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
@@ -968,18 +1070,18 @@ execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -990,13 +1092,27 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -1024,14 +1140,11 @@ execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
@@ -1041,18 +1154,18 @@ execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1063,13 +1176,27 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -1096,14 +1223,11 @@ execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
@@ -1113,18 +1237,18 @@ execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1135,13 +1259,27 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -1168,14 +1306,11 @@ execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
@@ -1185,18 +1320,18 @@ execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1207,13 +1342,27 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -1240,14 +1389,11 @@ execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
@@ -1257,18 +1403,18 @@ execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1279,13 +1425,27 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -1313,13 +1473,10 @@ host event_name count_star
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
@@ -1329,18 +1486,18 @@ execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1351,13 +1508,27 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -1385,13 +1556,10 @@ host event_name count_star
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
@@ -1401,18 +1569,18 @@ execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1423,13 +1591,27 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -1457,13 +1639,10 @@ host event_name count_star
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
@@ -1473,18 +1652,18 @@ execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1495,13 +1674,27 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -1529,13 +1722,10 @@ host event_name count_star
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
@@ -1545,18 +1735,18 @@ execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1567,13 +1757,27 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -1601,13 +1805,10 @@ host event_name count_star
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
@@ -1617,18 +1818,18 @@ execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1639,13 +1840,27 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -1673,13 +1888,10 @@ host event_name count_star
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
@@ -1689,18 +1901,18 @@ execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1711,13 +1923,27 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -1745,13 +1971,10 @@ host event_name count_star
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
@@ -1761,18 +1984,18 @@ execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1783,13 +2006,27 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -1817,13 +2054,10 @@ host event_name count_star
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
@@ -1833,18 +2067,18 @@ execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1855,13 +2089,27 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -1889,13 +2137,10 @@ host event_name count_star
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
@@ -1905,18 +2150,18 @@ execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1927,13 +2172,27 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -1961,13 +2220,10 @@ host event_name count_star
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
@@ -1977,18 +2233,18 @@ execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1999,13 +2255,27 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -2033,13 +2303,10 @@ host event_name count_star
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
@@ -2049,18 +2316,184 @@ execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sp/freturn 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sp/freturn 4
+statement/sql/insert 4
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_transactions_summary_by_thread_by_event_name;
+"================== TRANSACTIONS_BY_THREAD truncated =================="
+"================== Step 29 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 32
+wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+stage/sql/starting 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sp/freturn 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sp/freturn 4
+statement/sql/insert 4
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_transactions_summary_by_account_by_event_name;
+"================== TRANSACTIONS_BY_ACCOUNT truncated =================="
+"================== Step 30 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 32
+wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+stage/sql/starting 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2071,13 +2504,276 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 0
statement/sql/insert 0
statement/sql/select 0
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_transactions_summary_by_user_by_event_name;
+"================== TRANSACTIONS_BY_USER truncated =================="
+"================== Step 31 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 32
+wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+stage/sql/starting 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sp/freturn 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sp/freturn 4
+statement/sql/insert 4
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_transactions_summary_by_host_by_event_name;
+"================== TRANSACTIONS_BY_HOST truncated =================="
+"================== Step 32 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 32
+wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+stage/sql/starting 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sp/freturn 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sp/freturn 4
+statement/sql/insert 4
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_transactions_summary_global_by_event_name;
+"================== TRANSACTIONS_GLOBAL truncated =================="
+"================== Step 33 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 32
+wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+stage/sql/starting 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sp/freturn 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sp/freturn 4
+statement/sql/insert 4
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 0
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -2086,7 +2782,7 @@ execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
truncate performance_schema.accounts;
"================== ACCOUNTS truncated =================="
-"================== Step 29 =================="
+"================== Step 34 =================="
call dump_thread();
username status
user1 not found
@@ -2105,13 +2801,10 @@ host event_name count_star
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
@@ -2121,18 +2814,18 @@ execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2143,13 +2836,27 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 0
statement/sql/insert 0
statement/sql/select 0
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 0
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -2158,7 +2865,7 @@ execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
truncate performance_schema.users;
"================== USERS truncated =================="
-"================== Step 30 =================="
+"================== Step 35 =================="
call dump_thread();
username status
user1 not found
@@ -2177,13 +2884,10 @@ host event_name count_star
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
@@ -2193,18 +2897,18 @@ execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2215,13 +2919,27 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 0
statement/sql/insert 0
statement/sql/select 0
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 0
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
@@ -2230,7 +2948,7 @@ execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
truncate performance_schema.hosts;
"================== HOSTS truncated =================="
-"================== Step 31 =================="
+"================== Step 36 =================="
call dump_thread();
username status
user1 not found
@@ -2249,13 +2967,10 @@ host event_name count_star
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
@@ -2265,18 +2980,18 @@ execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2287,13 +3002,27 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 0
statement/sql/insert 0
statement/sql/select 0
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 0
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_users;
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 c8996fa2846..2f0c96d7234 100644
--- a/mysql-test/suite/perfschema/r/event_aggregate_no_h.result
+++ b/mysql-test/suite/perfschema/r/event_aggregate_no_h.result
@@ -17,8 +17,6 @@ host event_name count_star
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
@@ -30,11 +28,11 @@ execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
execute dump_statements_account;
@@ -47,10 +45,22 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 0
statement/sql/insert 0
statement/sql/select 0
execute dump_statements_history;
event_name count(event_name)
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 0
+execute dump_transactions_history;
+event_name count(event_name)
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -65,8 +75,6 @@ connection default;
call dump_thread();
username event_name count_star
user1 wait/io/file/sql/query_log 1
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
user1 wait/synch/rwlock/sql/LOCK_grant 0
username status
user2 not found
@@ -77,61 +85,57 @@ user4 not found
execute dump_waits_account;
user host event_name count_star
user1 localhost wait/io/file/sql/query_log 1
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_user;
user event_name count_star
user1 wait/io/file/sql/query_log 1
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
user1 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 1
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
wait/io/file/sql/query_log 1
execute dump_stages_account;
user host event_name count_star
-user1 localhost stage/sql/Checking permissions 0
-user1 localhost stage/sql/Closing tables 0
-user1 localhost stage/sql/Init 0
-user1 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
user1 localhost stage/sql/Opening tables 0
+user1 localhost stage/sql/starting 0
execute dump_stages_user;
user event_name count_star
-user1 stage/sql/Checking permissions 0
-user1 stage/sql/Closing tables 0
-user1 stage/sql/Init 0
-user1 stage/sql/Init for update 0
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
user1 stage/sql/Opening tables 0
+user1 stage/sql/starting 0
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 0
+user1 localhost statement/sp/freturn 0
user1 localhost statement/sql/insert 0
user1 localhost statement/sql/select 0
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 0
+user1 statement/sp/freturn 0
user1 statement/sql/insert 0
user1 statement/sql/select 0
execute dump_statements_host;
@@ -140,10 +144,24 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 0
statement/sql/insert 0
statement/sql/select 0
execute dump_statements_history;
event_name count(event_name)
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 0
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 0
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 0
+execute dump_transactions_history;
+event_name count(event_name)
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -155,20 +173,23 @@ user1 1 1
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
connection con1;
-select get_lock("marker", 10);
-get_lock("marker", 10)
+select uuid_short() <> 1;
+uuid_short() <> 1
1
-select release_lock("marker");
-release_lock("marker")
+select uuid_short() <> 1;
+uuid_short() <> 1
1
+start transaction;
insert into test.t1 values ("marker");
+commit;
+select test.f(10,20);
+test.f(10,20)
+30
connection default;
"================== Step 3 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
username status
user2 not found
@@ -178,82 +199,94 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/file/sql/query_log 4
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user1 localhost wait/io/file/sql/query_log 7
user1 localhost wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_user;
user event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 4
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 7
wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 4
+wait/io/file/sql/query_log 7
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 6
-user1 localhost stage/sql/Init 5
-user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 4
+user1 localhost stage/sql/checking permissions 4
+user1 localhost stage/sql/closing tables 11
+user1 localhost stage/sql/init 3
+user1 localhost stage/sql/Opening tables 7
+user1 localhost stage/sql/starting 6
execute dump_stages_user;
user event_name count_star
-user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 6
-user1 stage/sql/Init 5
-user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 4
+user1 stage/sql/checking permissions 4
+user1 stage/sql/closing tables 11
+user1 stage/sql/init 3
+user1 stage/sql/Opening tables 7
+user1 stage/sql/starting 6
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 6
-stage/sql/Init 5
-stage/sql/Init for update 1
-stage/sql/Opening tables 4
+stage/sql/checking permissions 4
+stage/sql/closing tables 11
+stage/sql/init 3
+stage/sql/Opening tables 7
+stage/sql/starting 6
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 3
-stage/sql/Closing tables 6
-stage/sql/Init 5
-stage/sql/Init for update 1
-stage/sql/Opening tables 4
+stage/sql/checking permissions 4
+stage/sql/closing tables 11
+stage/sql/init 3
+stage/sql/Opening tables 7
+stage/sql/starting 6
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 0
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 0
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 1
statement/sql/insert 1
-statement/sql/select 2
+statement/sql/select 3
execute dump_statements_history;
event_name count(event_name)
+statement/sp/freturn 1
statement/sql/insert 1
-statement/sql/select 2
+statement/sql/select 3
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 2
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 2
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -269,14 +302,10 @@ connection default;
"================== Step 4 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
user2 wait/io/file/sql/query_log 1
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
user2 wait/synch/rwlock/sql/LOCK_grant 0
username status
user3 not found
@@ -284,94 +313,88 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/file/sql/query_log 4
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user1 localhost wait/io/file/sql/query_log 7
user1 localhost wait/synch/rwlock/sql/LOCK_grant 1
user2 localhost wait/io/file/sql/query_log 1
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
user2 wait/io/file/sql/query_log 1
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
user2 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 5
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 8
wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 5
+wait/io/file/sql/query_log 8
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 6
-user1 localhost stage/sql/Init 5
-user1 localhost stage/sql/Init for update 1
-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
-user2 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/checking permissions 4
+user1 localhost stage/sql/closing tables 11
+user1 localhost stage/sql/init 3
+user1 localhost stage/sql/Opening tables 7
+user1 localhost stage/sql/starting 6
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
user2 localhost stage/sql/Opening tables 0
+user2 localhost stage/sql/starting 0
execute dump_stages_user;
user event_name count_star
-user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 6
-user1 stage/sql/Init 5
-user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 4
-user2 stage/sql/Checking permissions 0
-user2 stage/sql/Closing tables 0
-user2 stage/sql/Init 0
-user2 stage/sql/Init for update 0
+user1 stage/sql/checking permissions 4
+user1 stage/sql/closing tables 11
+user1 stage/sql/init 3
+user1 stage/sql/Opening tables 7
+user1 stage/sql/starting 6
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
user2 stage/sql/Opening tables 0
+user2 stage/sql/starting 0
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 6
-stage/sql/Init 5
-stage/sql/Init for update 1
-stage/sql/Opening tables 4
+stage/sql/checking permissions 4
+stage/sql/closing tables 11
+stage/sql/init 3
+stage/sql/Opening tables 7
+stage/sql/starting 6
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 3
-stage/sql/Closing tables 6
-stage/sql/Init 5
-stage/sql/Init for update 1
-stage/sql/Opening tables 4
+stage/sql/checking permissions 4
+stage/sql/closing tables 11
+stage/sql/init 3
+stage/sql/Opening tables 7
+stage/sql/starting 6
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 0
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 0
+user2 localhost statement/sp/freturn 0
user2 localhost statement/sql/insert 0
user2 localhost statement/sql/select 0
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 0
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 0
+user2 statement/sp/freturn 0
user2 statement/sql/insert 0
user2 statement/sql/select 0
execute dump_statements_host;
@@ -380,12 +403,30 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 1
statement/sql/insert 1
-statement/sql/select 2
+statement/sql/select 3
execute dump_statements_history;
event_name count(event_name)
+statement/sp/freturn 1
statement/sql/insert 1
-statement/sql/select 2
+statement/sql/select 3
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 0
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 0
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 2
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 2
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -399,25 +440,26 @@ user2 1 1
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
connection con2;
-select get_lock("marker", 10);
-get_lock("marker", 10)
+select uuid_short() <> 1;
+uuid_short() <> 1
1
-select release_lock("marker");
-release_lock("marker")
+select uuid_short() <> 1;
+uuid_short() <> 1
1
+start transaction;
insert into test.t1 values ("marker");
+commit;
+select test.f(10,20);
+test.f(10,20)
+30
connection default;
"================== Step 5 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user2 wait/io/file/sql/query_log 4
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 7
user2 wait/synch/rwlock/sql/LOCK_grant 1
username status
user3 not found
@@ -425,108 +467,120 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/file/sql/query_log 4
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user1 localhost wait/io/file/sql/query_log 7
user1 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user2 localhost wait/io/file/sql/query_log 4
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user2 localhost wait/io/file/sql/query_log 7
user2 localhost wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_user;
user event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
-user2 wait/io/file/sql/query_log 4
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 7
user2 wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 8
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 14
wait/synch/rwlock/sql/LOCK_grant 2
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 8
+wait/io/file/sql/query_log 14
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 6
-user1 localhost stage/sql/Init 5
-user1 localhost stage/sql/Init for update 1
-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
-user2 localhost stage/sql/Init for update 1
-user2 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/checking permissions 4
+user1 localhost stage/sql/closing tables 11
+user1 localhost stage/sql/init 3
+user1 localhost stage/sql/Opening tables 7
+user1 localhost stage/sql/starting 6
+user2 localhost stage/sql/checking permissions 4
+user2 localhost stage/sql/closing tables 10
+user2 localhost stage/sql/init 3
+user2 localhost stage/sql/Opening tables 6
+user2 localhost stage/sql/starting 6
execute dump_stages_user;
user event_name count_star
-user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 6
-user1 stage/sql/Init 5
-user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 4
-user2 stage/sql/Checking permissions 3
-user2 stage/sql/Closing tables 4
-user2 stage/sql/Init 5
-user2 stage/sql/Init for update 1
-user2 stage/sql/Opening tables 3
+user1 stage/sql/checking permissions 4
+user1 stage/sql/closing tables 11
+user1 stage/sql/init 3
+user1 stage/sql/Opening tables 7
+user1 stage/sql/starting 6
+user2 stage/sql/checking permissions 4
+user2 stage/sql/closing tables 10
+user2 stage/sql/init 3
+user2 stage/sql/Opening tables 6
+user2 stage/sql/starting 6
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 6
-stage/sql/Closing tables 10
-stage/sql/Init 10
-stage/sql/Init for update 2
-stage/sql/Opening tables 7
+stage/sql/checking permissions 8
+stage/sql/closing tables 21
+stage/sql/init 6
+stage/sql/Opening tables 13
+stage/sql/starting 12
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 6
-stage/sql/Closing tables 10
-stage/sql/Init 10
-stage/sql/Init for update 2
-stage/sql/Opening tables 7
+stage/sql/checking permissions 8
+stage/sql/closing tables 21
+stage/sql/init 6
+stage/sql/Opening tables 13
+stage/sql/starting 12
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 0
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 0
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 0
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 0
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 2
statement/sql/insert 2
-statement/sql/select 4
+statement/sql/select 6
execute dump_statements_history;
event_name count(event_name)
+statement/sp/freturn 2
statement/sql/insert 2
-statement/sql/select 4
+statement/sql/select 6
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 4
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 4
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -544,138 +598,124 @@ connection default;
"================== Step 6 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user2 wait/io/file/sql/query_log 4
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 7
user2 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
user3 wait/io/file/sql/query_log 1
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
user3 wait/synch/rwlock/sql/LOCK_grant 0
username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/file/sql/query_log 4
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user1 localhost wait/io/file/sql/query_log 7
user1 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user2 localhost wait/io/file/sql/query_log 4
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user2 localhost wait/io/file/sql/query_log 7
user2 localhost wait/synch/rwlock/sql/LOCK_grant 1
user3 localhost wait/io/file/sql/query_log 1
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
-user2 wait/io/file/sql/query_log 4
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 7
user2 wait/synch/rwlock/sql/LOCK_grant 1
user3 wait/io/file/sql/query_log 1
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
user3 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 9
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 15
wait/synch/rwlock/sql/LOCK_grant 2
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 9
+wait/io/file/sql/query_log 15
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 6
-user1 localhost stage/sql/Init 5
-user1 localhost stage/sql/Init for update 1
-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
-user2 localhost stage/sql/Init for update 1
-user2 localhost stage/sql/Opening tables 3
-user3 localhost stage/sql/Checking permissions 0
-user3 localhost stage/sql/Closing tables 0
-user3 localhost stage/sql/Init 0
-user3 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/checking permissions 4
+user1 localhost stage/sql/closing tables 11
+user1 localhost stage/sql/init 3
+user1 localhost stage/sql/Opening tables 7
+user1 localhost stage/sql/starting 6
+user2 localhost stage/sql/checking permissions 4
+user2 localhost stage/sql/closing tables 10
+user2 localhost stage/sql/init 3
+user2 localhost stage/sql/Opening tables 6
+user2 localhost stage/sql/starting 6
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
user3 localhost stage/sql/Opening tables 0
+user3 localhost stage/sql/starting 0
execute dump_stages_user;
user event_name count_star
-user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 6
-user1 stage/sql/Init 5
-user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 4
-user2 stage/sql/Checking permissions 3
-user2 stage/sql/Closing tables 4
-user2 stage/sql/Init 5
-user2 stage/sql/Init for update 1
-user2 stage/sql/Opening tables 3
-user3 stage/sql/Checking permissions 0
-user3 stage/sql/Closing tables 0
-user3 stage/sql/Init 0
-user3 stage/sql/Init for update 0
+user1 stage/sql/checking permissions 4
+user1 stage/sql/closing tables 11
+user1 stage/sql/init 3
+user1 stage/sql/Opening tables 7
+user1 stage/sql/starting 6
+user2 stage/sql/checking permissions 4
+user2 stage/sql/closing tables 10
+user2 stage/sql/init 3
+user2 stage/sql/Opening tables 6
+user2 stage/sql/starting 6
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
user3 stage/sql/Opening tables 0
+user3 stage/sql/starting 0
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 6
-stage/sql/Closing tables 10
-stage/sql/Init 10
-stage/sql/Init for update 2
-stage/sql/Opening tables 7
+stage/sql/checking permissions 8
+stage/sql/closing tables 21
+stage/sql/init 6
+stage/sql/Opening tables 13
+stage/sql/starting 12
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 6
-stage/sql/Closing tables 10
-stage/sql/Init 10
-stage/sql/Init for update 2
-stage/sql/Opening tables 7
+stage/sql/checking permissions 8
+stage/sql/closing tables 21
+stage/sql/init 6
+stage/sql/Opening tables 13
+stage/sql/starting 12
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 0
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 0
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 0
+user3 localhost statement/sp/freturn 0
user3 localhost statement/sql/insert 0
user3 localhost statement/sql/select 0
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 0
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 0
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 0
+user3 statement/sp/freturn 0
user3 statement/sql/insert 0
user3 statement/sql/select 0
execute dump_statements_host;
@@ -684,12 +724,32 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 2
statement/sql/insert 2
-statement/sql/select 4
+statement/sql/select 6
execute dump_statements_history;
event_name count(event_name)
+statement/sp/freturn 2
statement/sql/insert 2
-statement/sql/select 4
+statement/sql/select 6
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 0
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 0
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 4
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 4
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -705,163 +765,174 @@ user3 1 1
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
connection con3;
-select get_lock("marker", 10);
-get_lock("marker", 10)
+select uuid_short() <> 1;
+uuid_short() <> 1
1
-select release_lock("marker");
-release_lock("marker")
+select uuid_short() <> 1;
+uuid_short() <> 1
1
+start transaction;
insert into test.t1 values ("marker");
+commit;
+select test.f(10,20);
+test.f(10,20)
+30
connection default;
"================== Step 7 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user2 wait/io/file/sql/query_log 4
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 7
user2 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user3 wait/io/file/sql/query_log 4
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/io/file/sql/query_log 7
user3 wait/synch/rwlock/sql/LOCK_grant 1
username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/file/sql/query_log 4
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user1 localhost wait/io/file/sql/query_log 7
user1 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user2 localhost wait/io/file/sql/query_log 4
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user2 localhost wait/io/file/sql/query_log 7
user2 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user3 localhost wait/io/file/sql/query_log 4
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user3 localhost wait/io/file/sql/query_log 7
user3 localhost wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_user;
user event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
-user2 wait/io/file/sql/query_log 4
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 7
user2 wait/synch/rwlock/sql/LOCK_grant 1
-user3 wait/io/file/sql/query_log 4
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/io/file/sql/query_log 7
user3 wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 12
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 21
wait/synch/rwlock/sql/LOCK_grant 3
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 12
+wait/io/file/sql/query_log 21
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 6
-user1 localhost stage/sql/Init 5
-user1 localhost stage/sql/Init for update 1
-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
-user2 localhost stage/sql/Init for update 1
-user2 localhost stage/sql/Opening tables 3
-user3 localhost stage/sql/Checking permissions 3
-user3 localhost stage/sql/Closing tables 4
-user3 localhost stage/sql/Init 5
-user3 localhost stage/sql/Init for update 1
-user3 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/checking permissions 4
+user1 localhost stage/sql/closing tables 11
+user1 localhost stage/sql/init 3
+user1 localhost stage/sql/Opening tables 7
+user1 localhost stage/sql/starting 6
+user2 localhost stage/sql/checking permissions 4
+user2 localhost stage/sql/closing tables 10
+user2 localhost stage/sql/init 3
+user2 localhost stage/sql/Opening tables 6
+user2 localhost stage/sql/starting 6
+user3 localhost stage/sql/checking permissions 4
+user3 localhost stage/sql/closing tables 10
+user3 localhost stage/sql/init 3
+user3 localhost stage/sql/Opening tables 6
+user3 localhost stage/sql/starting 6
execute dump_stages_user;
user event_name count_star
-user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 6
-user1 stage/sql/Init 5
-user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 4
-user2 stage/sql/Checking permissions 3
-user2 stage/sql/Closing tables 4
-user2 stage/sql/Init 5
-user2 stage/sql/Init for update 1
-user2 stage/sql/Opening tables 3
-user3 stage/sql/Checking permissions 3
-user3 stage/sql/Closing tables 4
-user3 stage/sql/Init 5
-user3 stage/sql/Init for update 1
-user3 stage/sql/Opening tables 3
+user1 stage/sql/checking permissions 4
+user1 stage/sql/closing tables 11
+user1 stage/sql/init 3
+user1 stage/sql/Opening tables 7
+user1 stage/sql/starting 6
+user2 stage/sql/checking permissions 4
+user2 stage/sql/closing tables 10
+user2 stage/sql/init 3
+user2 stage/sql/Opening tables 6
+user2 stage/sql/starting 6
+user3 stage/sql/checking permissions 4
+user3 stage/sql/closing tables 10
+user3 stage/sql/init 3
+user3 stage/sql/Opening tables 6
+user3 stage/sql/starting 6
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 9
-stage/sql/Closing tables 14
-stage/sql/Init 15
-stage/sql/Init for update 3
-stage/sql/Opening tables 10
+stage/sql/checking permissions 12
+stage/sql/closing tables 31
+stage/sql/init 9
+stage/sql/Opening tables 19
+stage/sql/starting 18
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 9
-stage/sql/Closing tables 14
-stage/sql/Init 15
-stage/sql/Init for update 3
-stage/sql/Opening tables 10
+stage/sql/checking permissions 12
+stage/sql/closing tables 31
+stage/sql/init 9
+stage/sql/Opening tables 19
+stage/sql/starting 18
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 0
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 0
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 0
+user3 localhost statement/sp/freturn 1
user3 localhost statement/sql/insert 1
-user3 localhost statement/sql/select 2
+user3 localhost statement/sql/select 3
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 0
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 0
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 0
+user3 statement/sp/freturn 1
user3 statement/sql/insert 1
-user3 statement/sql/select 2
+user3 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 3
statement/sql/insert 3
-statement/sql/select 6
+statement/sql/select 9
execute dump_statements_history;
event_name count(event_name)
+statement/sp/freturn 3
statement/sql/insert 3
-statement/sql/select 6
+statement/sql/select 9
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 6
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 6
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -881,167 +952,149 @@ connection default;
"================== Step 8 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user2 wait/io/file/sql/query_log 4
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 7
user2 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user3 wait/io/file/sql/query_log 4
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/io/file/sql/query_log 7
user3 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
user4 wait/io/file/sql/query_log 1
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
user4 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/file/sql/query_log 4
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user1 localhost wait/io/file/sql/query_log 7
user1 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user2 localhost wait/io/file/sql/query_log 4
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user2 localhost wait/io/file/sql/query_log 7
user2 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user3 localhost wait/io/file/sql/query_log 4
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user3 localhost wait/io/file/sql/query_log 7
user3 localhost wait/synch/rwlock/sql/LOCK_grant 1
user4 localhost wait/io/file/sql/query_log 1
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
-user2 wait/io/file/sql/query_log 4
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 7
user2 wait/synch/rwlock/sql/LOCK_grant 1
-user3 wait/io/file/sql/query_log 4
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/io/file/sql/query_log 7
user3 wait/synch/rwlock/sql/LOCK_grant 1
user4 wait/io/file/sql/query_log 1
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
user4 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 13
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 22
wait/synch/rwlock/sql/LOCK_grant 3
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 13
+wait/io/file/sql/query_log 22
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 6
-user1 localhost stage/sql/Init 5
-user1 localhost stage/sql/Init for update 1
-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
-user2 localhost stage/sql/Init for update 1
-user2 localhost stage/sql/Opening tables 3
-user3 localhost stage/sql/Checking permissions 3
-user3 localhost stage/sql/Closing tables 4
-user3 localhost stage/sql/Init 5
-user3 localhost stage/sql/Init for update 1
-user3 localhost stage/sql/Opening tables 3
-user4 localhost stage/sql/Checking permissions 0
-user4 localhost stage/sql/Closing tables 0
-user4 localhost stage/sql/Init 0
-user4 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/checking permissions 4
+user1 localhost stage/sql/closing tables 11
+user1 localhost stage/sql/init 3
+user1 localhost stage/sql/Opening tables 7
+user1 localhost stage/sql/starting 6
+user2 localhost stage/sql/checking permissions 4
+user2 localhost stage/sql/closing tables 10
+user2 localhost stage/sql/init 3
+user2 localhost stage/sql/Opening tables 6
+user2 localhost stage/sql/starting 6
+user3 localhost stage/sql/checking permissions 4
+user3 localhost stage/sql/closing tables 10
+user3 localhost stage/sql/init 3
+user3 localhost stage/sql/Opening tables 6
+user3 localhost stage/sql/starting 6
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
user4 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/starting 0
execute dump_stages_user;
user event_name count_star
-user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 6
-user1 stage/sql/Init 5
-user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 4
-user2 stage/sql/Checking permissions 3
-user2 stage/sql/Closing tables 4
-user2 stage/sql/Init 5
-user2 stage/sql/Init for update 1
-user2 stage/sql/Opening tables 3
-user3 stage/sql/Checking permissions 3
-user3 stage/sql/Closing tables 4
-user3 stage/sql/Init 5
-user3 stage/sql/Init for update 1
-user3 stage/sql/Opening tables 3
-user4 stage/sql/Checking permissions 0
-user4 stage/sql/Closing tables 0
-user4 stage/sql/Init 0
-user4 stage/sql/Init for update 0
+user1 stage/sql/checking permissions 4
+user1 stage/sql/closing tables 11
+user1 stage/sql/init 3
+user1 stage/sql/Opening tables 7
+user1 stage/sql/starting 6
+user2 stage/sql/checking permissions 4
+user2 stage/sql/closing tables 10
+user2 stage/sql/init 3
+user2 stage/sql/Opening tables 6
+user2 stage/sql/starting 6
+user3 stage/sql/checking permissions 4
+user3 stage/sql/closing tables 10
+user3 stage/sql/init 3
+user3 stage/sql/Opening tables 6
+user3 stage/sql/starting 6
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
user4 stage/sql/Opening tables 0
+user4 stage/sql/starting 0
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 9
-stage/sql/Closing tables 14
-stage/sql/Init 15
-stage/sql/Init for update 3
-stage/sql/Opening tables 10
+stage/sql/checking permissions 12
+stage/sql/closing tables 31
+stage/sql/init 9
+stage/sql/Opening tables 19
+stage/sql/starting 18
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 9
-stage/sql/Closing tables 14
-stage/sql/Init 15
-stage/sql/Init for update 3
-stage/sql/Opening tables 10
+stage/sql/checking permissions 12
+stage/sql/closing tables 31
+stage/sql/init 9
+stage/sql/Opening tables 19
+stage/sql/starting 18
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 0
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 0
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 0
+user3 localhost statement/sp/freturn 1
user3 localhost statement/sql/insert 1
-user3 localhost statement/sql/select 2
+user3 localhost statement/sql/select 3
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 0
+user4 localhost statement/sp/freturn 0
user4 localhost statement/sql/insert 0
user4 localhost statement/sql/select 0
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 0
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 0
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 0
+user3 statement/sp/freturn 1
user3 statement/sql/insert 1
-user3 statement/sql/select 2
+user3 statement/sql/select 3
user4 statement/com/Error 0
user4 statement/com/Quit 0
+user4 statement/sp/freturn 0
user4 statement/sql/insert 0
user4 statement/sql/select 0
execute dump_statements_host;
@@ -1050,12 +1103,34 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 3
statement/sql/insert 3
-statement/sql/select 6
+statement/sql/select 9
execute dump_statements_history;
event_name count(event_name)
+statement/sp/freturn 3
statement/sql/insert 3
-statement/sql/select 6
+statement/sql/select 9
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 0
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 0
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 6
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 6
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -1073,192 +1148,201 @@ user4 1 1
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
connection con4;
-select get_lock("marker", 10);
-get_lock("marker", 10)
+select uuid_short() <> 1;
+uuid_short() <> 1
1
-select release_lock("marker");
-release_lock("marker")
+select uuid_short() <> 1;
+uuid_short() <> 1
1
+start transaction;
insert into test.t1 values ("marker");
+commit;
+select test.f(10,20);
+test.f(10,20)
+30
connection default;
"================== Step 9 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user2 wait/io/file/sql/query_log 4
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 7
user2 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user3 wait/io/file/sql/query_log 4
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/io/file/sql/query_log 7
user3 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user4 wait/io/file/sql/query_log 4
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/io/file/sql/query_log 7
user4 wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/file/sql/query_log 4
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user1 localhost wait/io/file/sql/query_log 7
user1 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user2 localhost wait/io/file/sql/query_log 4
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user2 localhost wait/io/file/sql/query_log 7
user2 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user3 localhost wait/io/file/sql/query_log 4
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user3 localhost wait/io/file/sql/query_log 7
user3 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user4 localhost wait/io/file/sql/query_log 4
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user4 localhost wait/io/file/sql/query_log 7
user4 localhost wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_user;
user event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
-user2 wait/io/file/sql/query_log 4
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 7
user2 wait/synch/rwlock/sql/LOCK_grant 1
-user3 wait/io/file/sql/query_log 4
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/io/file/sql/query_log 7
user3 wait/synch/rwlock/sql/LOCK_grant 1
-user4 wait/io/file/sql/query_log 4
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/io/file/sql/query_log 7
user4 wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 16
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 28
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 16
+wait/io/file/sql/query_log 28
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 6
-user1 localhost stage/sql/Init 5
-user1 localhost stage/sql/Init for update 1
-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
-user2 localhost stage/sql/Init for update 1
-user2 localhost stage/sql/Opening tables 3
-user3 localhost stage/sql/Checking permissions 3
-user3 localhost stage/sql/Closing tables 4
-user3 localhost stage/sql/Init 5
-user3 localhost stage/sql/Init for update 1
-user3 localhost stage/sql/Opening tables 3
-user4 localhost stage/sql/Checking permissions 3
-user4 localhost stage/sql/Closing tables 4
-user4 localhost stage/sql/Init 5
-user4 localhost stage/sql/Init for update 1
-user4 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/checking permissions 4
+user1 localhost stage/sql/closing tables 11
+user1 localhost stage/sql/init 3
+user1 localhost stage/sql/Opening tables 7
+user1 localhost stage/sql/starting 6
+user2 localhost stage/sql/checking permissions 4
+user2 localhost stage/sql/closing tables 10
+user2 localhost stage/sql/init 3
+user2 localhost stage/sql/Opening tables 6
+user2 localhost stage/sql/starting 6
+user3 localhost stage/sql/checking permissions 4
+user3 localhost stage/sql/closing tables 10
+user3 localhost stage/sql/init 3
+user3 localhost stage/sql/Opening tables 6
+user3 localhost stage/sql/starting 6
+user4 localhost stage/sql/checking permissions 4
+user4 localhost stage/sql/closing tables 10
+user4 localhost stage/sql/init 3
+user4 localhost stage/sql/Opening tables 6
+user4 localhost stage/sql/starting 6
execute dump_stages_user;
user event_name count_star
-user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 6
-user1 stage/sql/Init 5
-user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 4
-user2 stage/sql/Checking permissions 3
-user2 stage/sql/Closing tables 4
-user2 stage/sql/Init 5
-user2 stage/sql/Init for update 1
-user2 stage/sql/Opening tables 3
-user3 stage/sql/Checking permissions 3
-user3 stage/sql/Closing tables 4
-user3 stage/sql/Init 5
-user3 stage/sql/Init for update 1
-user3 stage/sql/Opening tables 3
-user4 stage/sql/Checking permissions 3
-user4 stage/sql/Closing tables 4
-user4 stage/sql/Init 5
-user4 stage/sql/Init for update 1
-user4 stage/sql/Opening tables 3
+user1 stage/sql/checking permissions 4
+user1 stage/sql/closing tables 11
+user1 stage/sql/init 3
+user1 stage/sql/Opening tables 7
+user1 stage/sql/starting 6
+user2 stage/sql/checking permissions 4
+user2 stage/sql/closing tables 10
+user2 stage/sql/init 3
+user2 stage/sql/Opening tables 6
+user2 stage/sql/starting 6
+user3 stage/sql/checking permissions 4
+user3 stage/sql/closing tables 10
+user3 stage/sql/init 3
+user3 stage/sql/Opening tables 6
+user3 stage/sql/starting 6
+user4 stage/sql/checking permissions 4
+user4 stage/sql/closing tables 10
+user4 stage/sql/init 3
+user4 stage/sql/Opening tables 6
+user4 stage/sql/starting 6
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 20
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 24
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 20
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 24
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 0
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 0
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 0
+user3 localhost statement/sp/freturn 1
user3 localhost statement/sql/insert 1
-user3 localhost statement/sql/select 2
+user3 localhost statement/sql/select 3
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 0
+user4 localhost statement/sp/freturn 1
user4 localhost statement/sql/insert 1
-user4 localhost statement/sql/select 2
+user4 localhost statement/sql/select 3
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 0
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 0
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 0
+user3 statement/sp/freturn 1
user3 statement/sql/insert 1
-user3 statement/sql/select 2
+user3 statement/sql/select 3
user4 statement/com/Error 0
user4 statement/com/Quit 0
+user4 statement/sp/freturn 1
user4 statement/sql/insert 1
-user4 statement/sql/select 2
+user4 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -1282,178 +1366,183 @@ call dump_thread();
username status
user1 not found
username event_name count_star
-user2 wait/io/file/sql/query_log 4
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 7
user2 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user3 wait/io/file/sql/query_log 4
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/io/file/sql/query_log 7
user3 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user4 wait/io/file/sql/query_log 4
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/io/file/sql/query_log 7
user4 wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/file/sql/query_log 5
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 1
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user1 localhost wait/io/file/sql/query_log 8
user1 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user2 localhost wait/io/file/sql/query_log 4
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user2 localhost wait/io/file/sql/query_log 7
user2 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user3 localhost wait/io/file/sql/query_log 4
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user3 localhost wait/io/file/sql/query_log 7
user3 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user4 localhost wait/io/file/sql/query_log 4
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user4 localhost wait/io/file/sql/query_log 7
user4 localhost wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_user;
user event_name count_star
-user1 wait/io/file/sql/query_log 5
-user1 wait/synch/mutex/sql/LOCK_connection_count 1
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 8
user1 wait/synch/rwlock/sql/LOCK_grant 1
-user2 wait/io/file/sql/query_log 4
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 7
user2 wait/synch/rwlock/sql/LOCK_grant 1
-user3 wait/io/file/sql/query_log 4
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/io/file/sql/query_log 7
user3 wait/synch/rwlock/sql/LOCK_grant 1
-user4 wait/io/file/sql/query_log 4
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/io/file/sql/query_log 7
user4 wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 17
-wait/synch/mutex/sql/LOCK_connection_count 1
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 29
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 17
-wait/synch/mutex/sql/LOCK_connection_count 1
+wait/io/file/sql/query_log 29
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 6
-user1 localhost stage/sql/Init 6
-user1 localhost stage/sql/Init for update 1
-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
-user2 localhost stage/sql/Init for update 1
-user2 localhost stage/sql/Opening tables 3
-user3 localhost stage/sql/Checking permissions 3
-user3 localhost stage/sql/Closing tables 4
-user3 localhost stage/sql/Init 5
-user3 localhost stage/sql/Init for update 1
-user3 localhost stage/sql/Opening tables 3
-user4 localhost stage/sql/Checking permissions 3
-user4 localhost stage/sql/Closing tables 4
-user4 localhost stage/sql/Init 5
-user4 localhost stage/sql/Init for update 1
-user4 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/checking permissions 4
+user1 localhost stage/sql/closing tables 11
+user1 localhost stage/sql/init 3
+user1 localhost stage/sql/Opening tables 7
+user1 localhost stage/sql/starting 7
+user2 localhost stage/sql/checking permissions 4
+user2 localhost stage/sql/closing tables 10
+user2 localhost stage/sql/init 3
+user2 localhost stage/sql/Opening tables 6
+user2 localhost stage/sql/starting 6
+user3 localhost stage/sql/checking permissions 4
+user3 localhost stage/sql/closing tables 10
+user3 localhost stage/sql/init 3
+user3 localhost stage/sql/Opening tables 6
+user3 localhost stage/sql/starting 6
+user4 localhost stage/sql/checking permissions 4
+user4 localhost stage/sql/closing tables 10
+user4 localhost stage/sql/init 3
+user4 localhost stage/sql/Opening tables 6
+user4 localhost stage/sql/starting 6
execute dump_stages_user;
user event_name count_star
-user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 6
-user1 stage/sql/Init 6
-user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 4
-user2 stage/sql/Checking permissions 3
-user2 stage/sql/Closing tables 4
-user2 stage/sql/Init 5
-user2 stage/sql/Init for update 1
-user2 stage/sql/Opening tables 3
-user3 stage/sql/Checking permissions 3
-user3 stage/sql/Closing tables 4
-user3 stage/sql/Init 5
-user3 stage/sql/Init for update 1
-user3 stage/sql/Opening tables 3
-user4 stage/sql/Checking permissions 3
-user4 stage/sql/Closing tables 4
-user4 stage/sql/Init 5
-user4 stage/sql/Init for update 1
-user4 stage/sql/Opening tables 3
+user1 stage/sql/checking permissions 4
+user1 stage/sql/closing tables 11
+user1 stage/sql/init 3
+user1 stage/sql/Opening tables 7
+user1 stage/sql/starting 7
+user2 stage/sql/checking permissions 4
+user2 stage/sql/closing tables 10
+user2 stage/sql/init 3
+user2 stage/sql/Opening tables 6
+user2 stage/sql/starting 6
+user3 stage/sql/checking permissions 4
+user3 stage/sql/closing tables 10
+user3 stage/sql/init 3
+user3 stage/sql/Opening tables 6
+user3 stage/sql/starting 6
+user4 stage/sql/checking permissions 4
+user4 stage/sql/closing tables 10
+user4 stage/sql/init 3
+user4 stage/sql/Opening tables 6
+user4 stage/sql/starting 6
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 21
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 25
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 21
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 25
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 1
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 0
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 0
+user3 localhost statement/sp/freturn 1
user3 localhost statement/sql/insert 1
-user3 localhost statement/sql/select 2
+user3 localhost statement/sql/select 3
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 0
+user4 localhost statement/sp/freturn 1
user4 localhost statement/sql/insert 1
-user4 localhost statement/sql/select 2
+user4 localhost statement/sql/select 3
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 1
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 0
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 0
+user3 statement/sp/freturn 1
user3 statement/sql/insert 1
-user3 statement/sql/select 2
+user3 statement/sql/select 3
user4 statement/com/Error 0
user4 statement/com/Quit 0
+user4 statement/sp/freturn 1
user4 statement/sql/insert 1
-user4 statement/sql/select 2
+user4 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 1
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 1
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -1479,173 +1568,180 @@ user1 not found
username status
user2 not found
username event_name count_star
-user3 wait/io/file/sql/query_log 4
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/io/file/sql/query_log 7
user3 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user4 wait/io/file/sql/query_log 4
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/io/file/sql/query_log 7
user4 wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/file/sql/query_log 5
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 1
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user1 localhost wait/io/file/sql/query_log 8
user1 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user2 localhost wait/io/file/sql/query_log 5
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 1
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user2 localhost wait/io/file/sql/query_log 8
user2 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user3 localhost wait/io/file/sql/query_log 4
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user3 localhost wait/io/file/sql/query_log 7
user3 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user4 localhost wait/io/file/sql/query_log 4
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user4 localhost wait/io/file/sql/query_log 7
user4 localhost wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_user;
user event_name count_star
-user1 wait/io/file/sql/query_log 5
-user1 wait/synch/mutex/sql/LOCK_connection_count 1
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 8
user1 wait/synch/rwlock/sql/LOCK_grant 1
-user2 wait/io/file/sql/query_log 5
-user2 wait/synch/mutex/sql/LOCK_connection_count 1
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 8
user2 wait/synch/rwlock/sql/LOCK_grant 1
-user3 wait/io/file/sql/query_log 4
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/io/file/sql/query_log 7
user3 wait/synch/rwlock/sql/LOCK_grant 1
-user4 wait/io/file/sql/query_log 4
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/io/file/sql/query_log 7
user4 wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 18
-wait/synch/mutex/sql/LOCK_connection_count 2
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 30
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 18
-wait/synch/mutex/sql/LOCK_connection_count 2
+wait/io/file/sql/query_log 30
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 6
-user1 localhost stage/sql/Init 6
-user1 localhost stage/sql/Init for update 1
-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
-user2 localhost stage/sql/Init for update 1
-user2 localhost stage/sql/Opening tables 3
-user3 localhost stage/sql/Checking permissions 3
-user3 localhost stage/sql/Closing tables 4
-user3 localhost stage/sql/Init 5
-user3 localhost stage/sql/Init for update 1
-user3 localhost stage/sql/Opening tables 3
-user4 localhost stage/sql/Checking permissions 3
-user4 localhost stage/sql/Closing tables 4
-user4 localhost stage/sql/Init 5
-user4 localhost stage/sql/Init for update 1
-user4 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/checking permissions 4
+user1 localhost stage/sql/closing tables 11
+user1 localhost stage/sql/init 3
+user1 localhost stage/sql/Opening tables 7
+user1 localhost stage/sql/starting 7
+user2 localhost stage/sql/checking permissions 4
+user2 localhost stage/sql/closing tables 10
+user2 localhost stage/sql/init 3
+user2 localhost stage/sql/Opening tables 6
+user2 localhost stage/sql/starting 7
+user3 localhost stage/sql/checking permissions 4
+user3 localhost stage/sql/closing tables 10
+user3 localhost stage/sql/init 3
+user3 localhost stage/sql/Opening tables 6
+user3 localhost stage/sql/starting 6
+user4 localhost stage/sql/checking permissions 4
+user4 localhost stage/sql/closing tables 10
+user4 localhost stage/sql/init 3
+user4 localhost stage/sql/Opening tables 6
+user4 localhost stage/sql/starting 6
execute dump_stages_user;
user event_name count_star
-user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 6
-user1 stage/sql/Init 6
-user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 4
-user2 stage/sql/Checking permissions 3
-user2 stage/sql/Closing tables 4
-user2 stage/sql/Init 6
-user2 stage/sql/Init for update 1
-user2 stage/sql/Opening tables 3
-user3 stage/sql/Checking permissions 3
-user3 stage/sql/Closing tables 4
-user3 stage/sql/Init 5
-user3 stage/sql/Init for update 1
-user3 stage/sql/Opening tables 3
-user4 stage/sql/Checking permissions 3
-user4 stage/sql/Closing tables 4
-user4 stage/sql/Init 5
-user4 stage/sql/Init for update 1
-user4 stage/sql/Opening tables 3
+user1 stage/sql/checking permissions 4
+user1 stage/sql/closing tables 11
+user1 stage/sql/init 3
+user1 stage/sql/Opening tables 7
+user1 stage/sql/starting 7
+user2 stage/sql/checking permissions 4
+user2 stage/sql/closing tables 10
+user2 stage/sql/init 3
+user2 stage/sql/Opening tables 6
+user2 stage/sql/starting 7
+user3 stage/sql/checking permissions 4
+user3 stage/sql/closing tables 10
+user3 stage/sql/init 3
+user3 stage/sql/Opening tables 6
+user3 stage/sql/starting 6
+user4 stage/sql/checking permissions 4
+user4 stage/sql/closing tables 10
+user4 stage/sql/init 3
+user4 stage/sql/Opening tables 6
+user4 stage/sql/starting 6
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 22
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 26
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 22
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 26
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 1
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 1
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 0
+user3 localhost statement/sp/freturn 1
user3 localhost statement/sql/insert 1
-user3 localhost statement/sql/select 2
+user3 localhost statement/sql/select 3
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 0
+user4 localhost statement/sp/freturn 1
user4 localhost statement/sql/insert 1
-user4 localhost statement/sql/select 2
+user4 localhost statement/sql/select 3
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 1
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 1
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 0
+user3 statement/sp/freturn 1
user3 statement/sql/insert 1
-user3 statement/sql/select 2
+user3 statement/sql/select 3
user4 statement/com/Error 0
user4 statement/com/Quit 0
+user4 statement/sp/freturn 1
user4 statement/sql/insert 1
-user4 statement/sql/select 2
+user4 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 2
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 2
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -1673,168 +1769,177 @@ user2 not found
username status
user3 not found
username event_name count_star
-user4 wait/io/file/sql/query_log 4
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/io/file/sql/query_log 7
user4 wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/file/sql/query_log 5
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 1
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user1 localhost wait/io/file/sql/query_log 8
user1 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user2 localhost wait/io/file/sql/query_log 5
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 1
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user2 localhost wait/io/file/sql/query_log 8
user2 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user3 localhost wait/io/file/sql/query_log 5
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 1
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user3 localhost wait/io/file/sql/query_log 8
user3 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user4 localhost wait/io/file/sql/query_log 4
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user4 localhost wait/io/file/sql/query_log 7
user4 localhost wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_user;
user event_name count_star
-user1 wait/io/file/sql/query_log 5
-user1 wait/synch/mutex/sql/LOCK_connection_count 1
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 8
user1 wait/synch/rwlock/sql/LOCK_grant 1
-user2 wait/io/file/sql/query_log 5
-user2 wait/synch/mutex/sql/LOCK_connection_count 1
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 8
user2 wait/synch/rwlock/sql/LOCK_grant 1
-user3 wait/io/file/sql/query_log 5
-user3 wait/synch/mutex/sql/LOCK_connection_count 1
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/io/file/sql/query_log 8
user3 wait/synch/rwlock/sql/LOCK_grant 1
-user4 wait/io/file/sql/query_log 4
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/io/file/sql/query_log 7
user4 wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 19
-wait/synch/mutex/sql/LOCK_connection_count 3
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 31
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 19
-wait/synch/mutex/sql/LOCK_connection_count 3
+wait/io/file/sql/query_log 31
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 6
-user1 localhost stage/sql/Init 6
-user1 localhost stage/sql/Init for update 1
-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
-user2 localhost stage/sql/Init for update 1
-user2 localhost stage/sql/Opening tables 3
-user3 localhost stage/sql/Checking permissions 3
-user3 localhost stage/sql/Closing tables 4
-user3 localhost stage/sql/Init 6
-user3 localhost stage/sql/Init for update 1
-user3 localhost stage/sql/Opening tables 3
-user4 localhost stage/sql/Checking permissions 3
-user4 localhost stage/sql/Closing tables 4
-user4 localhost stage/sql/Init 5
-user4 localhost stage/sql/Init for update 1
-user4 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/checking permissions 4
+user1 localhost stage/sql/closing tables 11
+user1 localhost stage/sql/init 3
+user1 localhost stage/sql/Opening tables 7
+user1 localhost stage/sql/starting 7
+user2 localhost stage/sql/checking permissions 4
+user2 localhost stage/sql/closing tables 10
+user2 localhost stage/sql/init 3
+user2 localhost stage/sql/Opening tables 6
+user2 localhost stage/sql/starting 7
+user3 localhost stage/sql/checking permissions 4
+user3 localhost stage/sql/closing tables 10
+user3 localhost stage/sql/init 3
+user3 localhost stage/sql/Opening tables 6
+user3 localhost stage/sql/starting 7
+user4 localhost stage/sql/checking permissions 4
+user4 localhost stage/sql/closing tables 10
+user4 localhost stage/sql/init 3
+user4 localhost stage/sql/Opening tables 6
+user4 localhost stage/sql/starting 6
execute dump_stages_user;
user event_name count_star
-user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 6
-user1 stage/sql/Init 6
-user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 4
-user2 stage/sql/Checking permissions 3
-user2 stage/sql/Closing tables 4
-user2 stage/sql/Init 6
-user2 stage/sql/Init for update 1
-user2 stage/sql/Opening tables 3
-user3 stage/sql/Checking permissions 3
-user3 stage/sql/Closing tables 4
-user3 stage/sql/Init 6
-user3 stage/sql/Init for update 1
-user3 stage/sql/Opening tables 3
-user4 stage/sql/Checking permissions 3
-user4 stage/sql/Closing tables 4
-user4 stage/sql/Init 5
-user4 stage/sql/Init for update 1
-user4 stage/sql/Opening tables 3
+user1 stage/sql/checking permissions 4
+user1 stage/sql/closing tables 11
+user1 stage/sql/init 3
+user1 stage/sql/Opening tables 7
+user1 stage/sql/starting 7
+user2 stage/sql/checking permissions 4
+user2 stage/sql/closing tables 10
+user2 stage/sql/init 3
+user2 stage/sql/Opening tables 6
+user2 stage/sql/starting 7
+user3 stage/sql/checking permissions 4
+user3 stage/sql/closing tables 10
+user3 stage/sql/init 3
+user3 stage/sql/Opening tables 6
+user3 stage/sql/starting 7
+user4 stage/sql/checking permissions 4
+user4 stage/sql/closing tables 10
+user4 stage/sql/init 3
+user4 stage/sql/Opening tables 6
+user4 stage/sql/starting 6
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 23
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 27
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 23
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 27
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 1
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 1
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 1
+user3 localhost statement/sp/freturn 1
user3 localhost statement/sql/insert 1
-user3 localhost statement/sql/select 2
+user3 localhost statement/sql/select 3
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 0
+user4 localhost statement/sp/freturn 1
user4 localhost statement/sql/insert 1
-user4 localhost statement/sql/select 2
+user4 localhost statement/sql/select 3
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 1
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 1
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 1
+user3 statement/sp/freturn 1
user3 statement/sql/insert 1
-user3 statement/sql/select 2
+user3 statement/sql/select 3
user4 statement/com/Error 0
user4 statement/com/Quit 0
+user4 statement/sp/freturn 1
user4 statement/sql/insert 1
-user4 statement/sql/select 2
+user4 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 3
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 3
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -1865,162 +1970,173 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/file/sql/query_log 5
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 1
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user1 localhost wait/io/file/sql/query_log 8
user1 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user2 localhost wait/io/file/sql/query_log 5
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 1
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user2 localhost wait/io/file/sql/query_log 8
user2 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user3 localhost wait/io/file/sql/query_log 5
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 1
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user3 localhost wait/io/file/sql/query_log 8
user3 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user4 localhost wait/io/file/sql/query_log 5
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 1
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user4 localhost wait/io/file/sql/query_log 8
user4 localhost wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_user;
user event_name count_star
-user1 wait/io/file/sql/query_log 5
-user1 wait/synch/mutex/sql/LOCK_connection_count 1
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 8
user1 wait/synch/rwlock/sql/LOCK_grant 1
-user2 wait/io/file/sql/query_log 5
-user2 wait/synch/mutex/sql/LOCK_connection_count 1
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 8
user2 wait/synch/rwlock/sql/LOCK_grant 1
-user3 wait/io/file/sql/query_log 5
-user3 wait/synch/mutex/sql/LOCK_connection_count 1
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/io/file/sql/query_log 8
user3 wait/synch/rwlock/sql/LOCK_grant 1
-user4 wait/io/file/sql/query_log 5
-user4 wait/synch/mutex/sql/LOCK_connection_count 1
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/io/file/sql/query_log 8
user4 wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
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 6
-user1 localhost stage/sql/Init 6
-user1 localhost stage/sql/Init for update 1
-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
-user2 localhost stage/sql/Init for update 1
-user2 localhost stage/sql/Opening tables 3
-user3 localhost stage/sql/Checking permissions 3
-user3 localhost stage/sql/Closing tables 4
-user3 localhost stage/sql/Init 6
-user3 localhost stage/sql/Init for update 1
-user3 localhost stage/sql/Opening tables 3
-user4 localhost stage/sql/Checking permissions 3
-user4 localhost stage/sql/Closing tables 4
-user4 localhost stage/sql/Init 6
-user4 localhost stage/sql/Init for update 1
-user4 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/checking permissions 4
+user1 localhost stage/sql/closing tables 11
+user1 localhost stage/sql/init 3
+user1 localhost stage/sql/Opening tables 7
+user1 localhost stage/sql/starting 7
+user2 localhost stage/sql/checking permissions 4
+user2 localhost stage/sql/closing tables 10
+user2 localhost stage/sql/init 3
+user2 localhost stage/sql/Opening tables 6
+user2 localhost stage/sql/starting 7
+user3 localhost stage/sql/checking permissions 4
+user3 localhost stage/sql/closing tables 10
+user3 localhost stage/sql/init 3
+user3 localhost stage/sql/Opening tables 6
+user3 localhost stage/sql/starting 7
+user4 localhost stage/sql/checking permissions 4
+user4 localhost stage/sql/closing tables 10
+user4 localhost stage/sql/init 3
+user4 localhost stage/sql/Opening tables 6
+user4 localhost stage/sql/starting 7
execute dump_stages_user;
user event_name count_star
-user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 6
-user1 stage/sql/Init 6
-user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 4
-user2 stage/sql/Checking permissions 3
-user2 stage/sql/Closing tables 4
-user2 stage/sql/Init 6
-user2 stage/sql/Init for update 1
-user2 stage/sql/Opening tables 3
-user3 stage/sql/Checking permissions 3
-user3 stage/sql/Closing tables 4
-user3 stage/sql/Init 6
-user3 stage/sql/Init for update 1
-user3 stage/sql/Opening tables 3
-user4 stage/sql/Checking permissions 3
-user4 stage/sql/Closing tables 4
-user4 stage/sql/Init 6
-user4 stage/sql/Init for update 1
-user4 stage/sql/Opening tables 3
+user1 stage/sql/checking permissions 4
+user1 stage/sql/closing tables 11
+user1 stage/sql/init 3
+user1 stage/sql/Opening tables 7
+user1 stage/sql/starting 7
+user2 stage/sql/checking permissions 4
+user2 stage/sql/closing tables 10
+user2 stage/sql/init 3
+user2 stage/sql/Opening tables 6
+user2 stage/sql/starting 7
+user3 stage/sql/checking permissions 4
+user3 stage/sql/closing tables 10
+user3 stage/sql/init 3
+user3 stage/sql/Opening tables 6
+user3 stage/sql/starting 7
+user4 stage/sql/checking permissions 4
+user4 stage/sql/closing tables 10
+user4 stage/sql/init 3
+user4 stage/sql/Opening tables 6
+user4 stage/sql/starting 7
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 1
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 1
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 1
+user3 localhost statement/sp/freturn 1
user3 localhost statement/sql/insert 1
-user3 localhost statement/sql/select 2
+user3 localhost statement/sql/select 3
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 1
+user4 localhost statement/sp/freturn 1
user4 localhost statement/sql/insert 1
-user4 localhost statement/sql/select 2
+user4 localhost statement/sql/select 3
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 1
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 1
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 1
+user3 statement/sp/freturn 1
user3 statement/sql/insert 1
-user3 statement/sql/select 2
+user3 statement/sql/select 3
user4 statement/com/Error 0
user4 statement/com/Quit 1
+user4 statement/sp/freturn 1
user4 statement/sql/insert 1
-user4 statement/sql/select 2
+user4 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -2052,162 +2168,173 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/file/sql/query_log 5
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 1
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user1 localhost wait/io/file/sql/query_log 8
user1 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user2 localhost wait/io/file/sql/query_log 5
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 1
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user2 localhost wait/io/file/sql/query_log 8
user2 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user3 localhost wait/io/file/sql/query_log 5
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 1
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user3 localhost wait/io/file/sql/query_log 8
user3 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user4 localhost wait/io/file/sql/query_log 5
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 1
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user4 localhost wait/io/file/sql/query_log 8
user4 localhost wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_user;
user event_name count_star
-user1 wait/io/file/sql/query_log 5
-user1 wait/synch/mutex/sql/LOCK_connection_count 1
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 8
user1 wait/synch/rwlock/sql/LOCK_grant 1
-user2 wait/io/file/sql/query_log 5
-user2 wait/synch/mutex/sql/LOCK_connection_count 1
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 8
user2 wait/synch/rwlock/sql/LOCK_grant 1
-user3 wait/io/file/sql/query_log 5
-user3 wait/synch/mutex/sql/LOCK_connection_count 1
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/io/file/sql/query_log 8
user3 wait/synch/rwlock/sql/LOCK_grant 1
-user4 wait/io/file/sql/query_log 5
-user4 wait/synch/mutex/sql/LOCK_connection_count 1
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/io/file/sql/query_log 8
user4 wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
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 6
-user1 localhost stage/sql/Init 6
-user1 localhost stage/sql/Init for update 1
-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
-user2 localhost stage/sql/Init for update 1
-user2 localhost stage/sql/Opening tables 3
-user3 localhost stage/sql/Checking permissions 3
-user3 localhost stage/sql/Closing tables 4
-user3 localhost stage/sql/Init 6
-user3 localhost stage/sql/Init for update 1
-user3 localhost stage/sql/Opening tables 3
-user4 localhost stage/sql/Checking permissions 3
-user4 localhost stage/sql/Closing tables 4
-user4 localhost stage/sql/Init 6
-user4 localhost stage/sql/Init for update 1
-user4 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/checking permissions 4
+user1 localhost stage/sql/closing tables 11
+user1 localhost stage/sql/init 3
+user1 localhost stage/sql/Opening tables 7
+user1 localhost stage/sql/starting 7
+user2 localhost stage/sql/checking permissions 4
+user2 localhost stage/sql/closing tables 10
+user2 localhost stage/sql/init 3
+user2 localhost stage/sql/Opening tables 6
+user2 localhost stage/sql/starting 7
+user3 localhost stage/sql/checking permissions 4
+user3 localhost stage/sql/closing tables 10
+user3 localhost stage/sql/init 3
+user3 localhost stage/sql/Opening tables 6
+user3 localhost stage/sql/starting 7
+user4 localhost stage/sql/checking permissions 4
+user4 localhost stage/sql/closing tables 10
+user4 localhost stage/sql/init 3
+user4 localhost stage/sql/Opening tables 6
+user4 localhost stage/sql/starting 7
execute dump_stages_user;
user event_name count_star
-user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 6
-user1 stage/sql/Init 6
-user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 4
-user2 stage/sql/Checking permissions 3
-user2 stage/sql/Closing tables 4
-user2 stage/sql/Init 6
-user2 stage/sql/Init for update 1
-user2 stage/sql/Opening tables 3
-user3 stage/sql/Checking permissions 3
-user3 stage/sql/Closing tables 4
-user3 stage/sql/Init 6
-user3 stage/sql/Init for update 1
-user3 stage/sql/Opening tables 3
-user4 stage/sql/Checking permissions 3
-user4 stage/sql/Closing tables 4
-user4 stage/sql/Init 6
-user4 stage/sql/Init for update 1
-user4 stage/sql/Opening tables 3
+user1 stage/sql/checking permissions 4
+user1 stage/sql/closing tables 11
+user1 stage/sql/init 3
+user1 stage/sql/Opening tables 7
+user1 stage/sql/starting 7
+user2 stage/sql/checking permissions 4
+user2 stage/sql/closing tables 10
+user2 stage/sql/init 3
+user2 stage/sql/Opening tables 6
+user2 stage/sql/starting 7
+user3 stage/sql/checking permissions 4
+user3 stage/sql/closing tables 10
+user3 stage/sql/init 3
+user3 stage/sql/Opening tables 6
+user3 stage/sql/starting 7
+user4 stage/sql/checking permissions 4
+user4 stage/sql/closing tables 10
+user4 stage/sql/init 3
+user4 stage/sql/Opening tables 6
+user4 stage/sql/starting 7
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 1
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 1
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 1
+user3 localhost statement/sp/freturn 1
user3 localhost statement/sql/insert 1
-user3 localhost statement/sql/select 2
+user3 localhost statement/sql/select 3
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 1
+user4 localhost statement/sp/freturn 1
user4 localhost statement/sql/insert 1
-user4 localhost statement/sql/select 2
+user4 localhost statement/sql/select 3
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 1
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 1
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 1
+user3 statement/sp/freturn 1
user3 statement/sql/insert 1
-user3 statement/sql/select 2
+user3 statement/sql/select 3
user4 statement/com/Error 0
user4 statement/com/Quit 1
+user4 statement/sp/freturn 1
user4 statement/sql/insert 1
-user4 statement/sql/select 2
+user4 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -2239,161 +2366,172 @@ user4 not found
execute dump_waits_account;
user host event_name count_star
user1 localhost wait/io/file/sql/query_log 0
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
user2 localhost wait/io/file/sql/query_log 0
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
user3 localhost wait/io/file/sql/query_log 0
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
user4 localhost wait/io/file/sql/query_log 0
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/file/sql/query_log 5
-user1 wait/synch/mutex/sql/LOCK_connection_count 1
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 8
user1 wait/synch/rwlock/sql/LOCK_grant 1
-user2 wait/io/file/sql/query_log 5
-user2 wait/synch/mutex/sql/LOCK_connection_count 1
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 8
user2 wait/synch/rwlock/sql/LOCK_grant 1
-user3 wait/io/file/sql/query_log 5
-user3 wait/synch/mutex/sql/LOCK_connection_count 1
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/io/file/sql/query_log 8
user3 wait/synch/rwlock/sql/LOCK_grant 1
-user4 wait/io/file/sql/query_log 5
-user4 wait/synch/mutex/sql/LOCK_connection_count 1
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/io/file/sql/query_log 8
user4 wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
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 6
-user1 localhost stage/sql/Init 6
-user1 localhost stage/sql/Init for update 1
-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
-user2 localhost stage/sql/Init for update 1
-user2 localhost stage/sql/Opening tables 3
-user3 localhost stage/sql/Checking permissions 3
-user3 localhost stage/sql/Closing tables 4
-user3 localhost stage/sql/Init 6
-user3 localhost stage/sql/Init for update 1
-user3 localhost stage/sql/Opening tables 3
-user4 localhost stage/sql/Checking permissions 3
-user4 localhost stage/sql/Closing tables 4
-user4 localhost stage/sql/Init 6
-user4 localhost stage/sql/Init for update 1
-user4 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/checking permissions 4
+user1 localhost stage/sql/closing tables 11
+user1 localhost stage/sql/init 3
+user1 localhost stage/sql/Opening tables 7
+user1 localhost stage/sql/starting 7
+user2 localhost stage/sql/checking permissions 4
+user2 localhost stage/sql/closing tables 10
+user2 localhost stage/sql/init 3
+user2 localhost stage/sql/Opening tables 6
+user2 localhost stage/sql/starting 7
+user3 localhost stage/sql/checking permissions 4
+user3 localhost stage/sql/closing tables 10
+user3 localhost stage/sql/init 3
+user3 localhost stage/sql/Opening tables 6
+user3 localhost stage/sql/starting 7
+user4 localhost stage/sql/checking permissions 4
+user4 localhost stage/sql/closing tables 10
+user4 localhost stage/sql/init 3
+user4 localhost stage/sql/Opening tables 6
+user4 localhost stage/sql/starting 7
execute dump_stages_user;
user event_name count_star
-user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 6
-user1 stage/sql/Init 6
-user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 4
-user2 stage/sql/Checking permissions 3
-user2 stage/sql/Closing tables 4
-user2 stage/sql/Init 6
-user2 stage/sql/Init for update 1
-user2 stage/sql/Opening tables 3
-user3 stage/sql/Checking permissions 3
-user3 stage/sql/Closing tables 4
-user3 stage/sql/Init 6
-user3 stage/sql/Init for update 1
-user3 stage/sql/Opening tables 3
-user4 stage/sql/Checking permissions 3
-user4 stage/sql/Closing tables 4
-user4 stage/sql/Init 6
-user4 stage/sql/Init for update 1
-user4 stage/sql/Opening tables 3
+user1 stage/sql/checking permissions 4
+user1 stage/sql/closing tables 11
+user1 stage/sql/init 3
+user1 stage/sql/Opening tables 7
+user1 stage/sql/starting 7
+user2 stage/sql/checking permissions 4
+user2 stage/sql/closing tables 10
+user2 stage/sql/init 3
+user2 stage/sql/Opening tables 6
+user2 stage/sql/starting 7
+user3 stage/sql/checking permissions 4
+user3 stage/sql/closing tables 10
+user3 stage/sql/init 3
+user3 stage/sql/Opening tables 6
+user3 stage/sql/starting 7
+user4 stage/sql/checking permissions 4
+user4 stage/sql/closing tables 10
+user4 stage/sql/init 3
+user4 stage/sql/Opening tables 6
+user4 stage/sql/starting 7
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 1
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 1
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 1
+user3 localhost statement/sp/freturn 1
user3 localhost statement/sql/insert 1
-user3 localhost statement/sql/select 2
+user3 localhost statement/sql/select 3
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 1
+user4 localhost statement/sp/freturn 1
user4 localhost statement/sql/insert 1
-user4 localhost statement/sql/select 2
+user4 localhost statement/sql/select 3
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 1
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 1
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 1
+user3 statement/sp/freturn 1
user3 statement/sql/insert 1
-user3 statement/sql/select 2
+user3 statement/sql/select 3
user4 statement/com/Error 0
user4 statement/com/Quit 1
+user4 statement/sp/freturn 1
user4 statement/sql/insert 1
-user4 statement/sql/select 2
+user4 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -2425,161 +2563,172 @@ user4 not found
execute dump_waits_account;
user host event_name count_star
user1 localhost wait/io/file/sql/query_log 0
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
user2 localhost wait/io/file/sql/query_log 0
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
user3 localhost wait/io/file/sql/query_log 0
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
user4 localhost wait/io/file/sql/query_log 0
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_user;
user event_name count_star
user1 wait/io/file/sql/query_log 0
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
user1 wait/synch/rwlock/sql/LOCK_grant 0
user2 wait/io/file/sql/query_log 0
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
user2 wait/synch/rwlock/sql/LOCK_grant 0
user3 wait/io/file/sql/query_log 0
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
user3 wait/synch/rwlock/sql/LOCK_grant 0
user4 wait/io/file/sql/query_log 0
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
user4 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
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 6
-user1 localhost stage/sql/Init 6
-user1 localhost stage/sql/Init for update 1
-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
-user2 localhost stage/sql/Init for update 1
-user2 localhost stage/sql/Opening tables 3
-user3 localhost stage/sql/Checking permissions 3
-user3 localhost stage/sql/Closing tables 4
-user3 localhost stage/sql/Init 6
-user3 localhost stage/sql/Init for update 1
-user3 localhost stage/sql/Opening tables 3
-user4 localhost stage/sql/Checking permissions 3
-user4 localhost stage/sql/Closing tables 4
-user4 localhost stage/sql/Init 6
-user4 localhost stage/sql/Init for update 1
-user4 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/checking permissions 4
+user1 localhost stage/sql/closing tables 11
+user1 localhost stage/sql/init 3
+user1 localhost stage/sql/Opening tables 7
+user1 localhost stage/sql/starting 7
+user2 localhost stage/sql/checking permissions 4
+user2 localhost stage/sql/closing tables 10
+user2 localhost stage/sql/init 3
+user2 localhost stage/sql/Opening tables 6
+user2 localhost stage/sql/starting 7
+user3 localhost stage/sql/checking permissions 4
+user3 localhost stage/sql/closing tables 10
+user3 localhost stage/sql/init 3
+user3 localhost stage/sql/Opening tables 6
+user3 localhost stage/sql/starting 7
+user4 localhost stage/sql/checking permissions 4
+user4 localhost stage/sql/closing tables 10
+user4 localhost stage/sql/init 3
+user4 localhost stage/sql/Opening tables 6
+user4 localhost stage/sql/starting 7
execute dump_stages_user;
user event_name count_star
-user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 6
-user1 stage/sql/Init 6
-user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 4
-user2 stage/sql/Checking permissions 3
-user2 stage/sql/Closing tables 4
-user2 stage/sql/Init 6
-user2 stage/sql/Init for update 1
-user2 stage/sql/Opening tables 3
-user3 stage/sql/Checking permissions 3
-user3 stage/sql/Closing tables 4
-user3 stage/sql/Init 6
-user3 stage/sql/Init for update 1
-user3 stage/sql/Opening tables 3
-user4 stage/sql/Checking permissions 3
-user4 stage/sql/Closing tables 4
-user4 stage/sql/Init 6
-user4 stage/sql/Init for update 1
-user4 stage/sql/Opening tables 3
+user1 stage/sql/checking permissions 4
+user1 stage/sql/closing tables 11
+user1 stage/sql/init 3
+user1 stage/sql/Opening tables 7
+user1 stage/sql/starting 7
+user2 stage/sql/checking permissions 4
+user2 stage/sql/closing tables 10
+user2 stage/sql/init 3
+user2 stage/sql/Opening tables 6
+user2 stage/sql/starting 7
+user3 stage/sql/checking permissions 4
+user3 stage/sql/closing tables 10
+user3 stage/sql/init 3
+user3 stage/sql/Opening tables 6
+user3 stage/sql/starting 7
+user4 stage/sql/checking permissions 4
+user4 stage/sql/closing tables 10
+user4 stage/sql/init 3
+user4 stage/sql/Opening tables 6
+user4 stage/sql/starting 7
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 1
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 1
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 1
+user3 localhost statement/sp/freturn 1
user3 localhost statement/sql/insert 1
-user3 localhost statement/sql/select 2
+user3 localhost statement/sql/select 3
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 1
+user4 localhost statement/sp/freturn 1
user4 localhost statement/sql/insert 1
-user4 localhost statement/sql/select 2
+user4 localhost statement/sql/select 3
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 1
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 1
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 1
+user3 statement/sp/freturn 1
user3 statement/sql/insert 1
-user3 statement/sql/select 2
+user3 statement/sql/select 3
user4 statement/com/Error 0
user4 statement/com/Quit 1
+user4 statement/sp/freturn 1
user4 statement/sql/insert 1
-user4 statement/sql/select 2
+user4 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -2611,161 +2760,172 @@ user4 not found
execute dump_waits_account;
user host event_name count_star
user1 localhost wait/io/file/sql/query_log 0
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
user2 localhost wait/io/file/sql/query_log 0
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
user3 localhost wait/io/file/sql/query_log 0
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
user4 localhost wait/io/file/sql/query_log 0
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_user;
user event_name count_star
user1 wait/io/file/sql/query_log 0
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
user1 wait/synch/rwlock/sql/LOCK_grant 0
user2 wait/io/file/sql/query_log 0
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
user2 wait/synch/rwlock/sql/LOCK_grant 0
user3 wait/io/file/sql/query_log 0
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
user3 wait/synch/rwlock/sql/LOCK_grant 0
user4 wait/io/file/sql/query_log 0
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
user4 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
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 6
-user1 localhost stage/sql/Init 6
-user1 localhost stage/sql/Init for update 1
-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
-user2 localhost stage/sql/Init for update 1
-user2 localhost stage/sql/Opening tables 3
-user3 localhost stage/sql/Checking permissions 3
-user3 localhost stage/sql/Closing tables 4
-user3 localhost stage/sql/Init 6
-user3 localhost stage/sql/Init for update 1
-user3 localhost stage/sql/Opening tables 3
-user4 localhost stage/sql/Checking permissions 3
-user4 localhost stage/sql/Closing tables 4
-user4 localhost stage/sql/Init 6
-user4 localhost stage/sql/Init for update 1
-user4 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/checking permissions 4
+user1 localhost stage/sql/closing tables 11
+user1 localhost stage/sql/init 3
+user1 localhost stage/sql/Opening tables 7
+user1 localhost stage/sql/starting 7
+user2 localhost stage/sql/checking permissions 4
+user2 localhost stage/sql/closing tables 10
+user2 localhost stage/sql/init 3
+user2 localhost stage/sql/Opening tables 6
+user2 localhost stage/sql/starting 7
+user3 localhost stage/sql/checking permissions 4
+user3 localhost stage/sql/closing tables 10
+user3 localhost stage/sql/init 3
+user3 localhost stage/sql/Opening tables 6
+user3 localhost stage/sql/starting 7
+user4 localhost stage/sql/checking permissions 4
+user4 localhost stage/sql/closing tables 10
+user4 localhost stage/sql/init 3
+user4 localhost stage/sql/Opening tables 6
+user4 localhost stage/sql/starting 7
execute dump_stages_user;
user event_name count_star
-user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 6
-user1 stage/sql/Init 6
-user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 4
-user2 stage/sql/Checking permissions 3
-user2 stage/sql/Closing tables 4
-user2 stage/sql/Init 6
-user2 stage/sql/Init for update 1
-user2 stage/sql/Opening tables 3
-user3 stage/sql/Checking permissions 3
-user3 stage/sql/Closing tables 4
-user3 stage/sql/Init 6
-user3 stage/sql/Init for update 1
-user3 stage/sql/Opening tables 3
-user4 stage/sql/Checking permissions 3
-user4 stage/sql/Closing tables 4
-user4 stage/sql/Init 6
-user4 stage/sql/Init for update 1
-user4 stage/sql/Opening tables 3
+user1 stage/sql/checking permissions 4
+user1 stage/sql/closing tables 11
+user1 stage/sql/init 3
+user1 stage/sql/Opening tables 7
+user1 stage/sql/starting 7
+user2 stage/sql/checking permissions 4
+user2 stage/sql/closing tables 10
+user2 stage/sql/init 3
+user2 stage/sql/Opening tables 6
+user2 stage/sql/starting 7
+user3 stage/sql/checking permissions 4
+user3 stage/sql/closing tables 10
+user3 stage/sql/init 3
+user3 stage/sql/Opening tables 6
+user3 stage/sql/starting 7
+user4 stage/sql/checking permissions 4
+user4 stage/sql/closing tables 10
+user4 stage/sql/init 3
+user4 stage/sql/Opening tables 6
+user4 stage/sql/starting 7
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 1
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 1
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 1
+user3 localhost statement/sp/freturn 1
user3 localhost statement/sql/insert 1
-user3 localhost statement/sql/select 2
+user3 localhost statement/sql/select 3
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 1
+user4 localhost statement/sp/freturn 1
user4 localhost statement/sql/insert 1
-user4 localhost statement/sql/select 2
+user4 localhost statement/sql/select 3
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 1
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 1
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 1
+user3 statement/sp/freturn 1
user3 statement/sql/insert 1
-user3 statement/sql/select 2
+user3 statement/sql/select 3
user4 statement/com/Error 0
user4 statement/com/Quit 1
+user4 statement/sp/freturn 1
user4 statement/sql/insert 1
-user4 statement/sql/select 2
+user4 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -2797,161 +2957,172 @@ user4 not found
execute dump_waits_account;
user host event_name count_star
user1 localhost wait/io/file/sql/query_log 0
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
user2 localhost wait/io/file/sql/query_log 0
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
user3 localhost wait/io/file/sql/query_log 0
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
user4 localhost wait/io/file/sql/query_log 0
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_user;
user event_name count_star
user1 wait/io/file/sql/query_log 0
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
user1 wait/synch/rwlock/sql/LOCK_grant 0
user2 wait/io/file/sql/query_log 0
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
user2 wait/synch/rwlock/sql/LOCK_grant 0
user3 wait/io/file/sql/query_log 0
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
user3 wait/synch/rwlock/sql/LOCK_grant 0
user4 wait/io/file/sql/query_log 0
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
user4 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
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 6
-user1 localhost stage/sql/Init 6
-user1 localhost stage/sql/Init for update 1
-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
-user2 localhost stage/sql/Init for update 1
-user2 localhost stage/sql/Opening tables 3
-user3 localhost stage/sql/Checking permissions 3
-user3 localhost stage/sql/Closing tables 4
-user3 localhost stage/sql/Init 6
-user3 localhost stage/sql/Init for update 1
-user3 localhost stage/sql/Opening tables 3
-user4 localhost stage/sql/Checking permissions 3
-user4 localhost stage/sql/Closing tables 4
-user4 localhost stage/sql/Init 6
-user4 localhost stage/sql/Init for update 1
-user4 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/checking permissions 4
+user1 localhost stage/sql/closing tables 11
+user1 localhost stage/sql/init 3
+user1 localhost stage/sql/Opening tables 7
+user1 localhost stage/sql/starting 7
+user2 localhost stage/sql/checking permissions 4
+user2 localhost stage/sql/closing tables 10
+user2 localhost stage/sql/init 3
+user2 localhost stage/sql/Opening tables 6
+user2 localhost stage/sql/starting 7
+user3 localhost stage/sql/checking permissions 4
+user3 localhost stage/sql/closing tables 10
+user3 localhost stage/sql/init 3
+user3 localhost stage/sql/Opening tables 6
+user3 localhost stage/sql/starting 7
+user4 localhost stage/sql/checking permissions 4
+user4 localhost stage/sql/closing tables 10
+user4 localhost stage/sql/init 3
+user4 localhost stage/sql/Opening tables 6
+user4 localhost stage/sql/starting 7
execute dump_stages_user;
user event_name count_star
-user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 6
-user1 stage/sql/Init 6
-user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 4
-user2 stage/sql/Checking permissions 3
-user2 stage/sql/Closing tables 4
-user2 stage/sql/Init 6
-user2 stage/sql/Init for update 1
-user2 stage/sql/Opening tables 3
-user3 stage/sql/Checking permissions 3
-user3 stage/sql/Closing tables 4
-user3 stage/sql/Init 6
-user3 stage/sql/Init for update 1
-user3 stage/sql/Opening tables 3
-user4 stage/sql/Checking permissions 3
-user4 stage/sql/Closing tables 4
-user4 stage/sql/Init 6
-user4 stage/sql/Init for update 1
-user4 stage/sql/Opening tables 3
+user1 stage/sql/checking permissions 4
+user1 stage/sql/closing tables 11
+user1 stage/sql/init 3
+user1 stage/sql/Opening tables 7
+user1 stage/sql/starting 7
+user2 stage/sql/checking permissions 4
+user2 stage/sql/closing tables 10
+user2 stage/sql/init 3
+user2 stage/sql/Opening tables 6
+user2 stage/sql/starting 7
+user3 stage/sql/checking permissions 4
+user3 stage/sql/closing tables 10
+user3 stage/sql/init 3
+user3 stage/sql/Opening tables 6
+user3 stage/sql/starting 7
+user4 stage/sql/checking permissions 4
+user4 stage/sql/closing tables 10
+user4 stage/sql/init 3
+user4 stage/sql/Opening tables 6
+user4 stage/sql/starting 7
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 1
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 1
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 1
+user3 localhost statement/sp/freturn 1
user3 localhost statement/sql/insert 1
-user3 localhost statement/sql/select 2
+user3 localhost statement/sql/select 3
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 1
+user4 localhost statement/sp/freturn 1
user4 localhost statement/sql/insert 1
-user4 localhost statement/sql/select 2
+user4 localhost statement/sql/select 3
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 1
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 1
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 1
+user3 statement/sp/freturn 1
user3 statement/sql/insert 1
-user3 statement/sql/select 2
+user3 statement/sql/select 3
user4 statement/com/Error 0
user4 statement/com/Quit 1
+user4 statement/sp/freturn 1
user4 statement/sql/insert 1
-user4 statement/sql/select 2
+user4 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -2983,161 +3154,172 @@ user4 not found
execute dump_waits_account;
user host event_name count_star
user1 localhost wait/io/file/sql/query_log 0
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
user2 localhost wait/io/file/sql/query_log 0
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
user3 localhost wait/io/file/sql/query_log 0
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
user4 localhost wait/io/file/sql/query_log 0
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_user;
user event_name count_star
user1 wait/io/file/sql/query_log 0
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
user1 wait/synch/rwlock/sql/LOCK_grant 0
user2 wait/io/file/sql/query_log 0
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
user2 wait/synch/rwlock/sql/LOCK_grant 0
user3 wait/io/file/sql/query_log 0
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
user3 wait/synch/rwlock/sql/LOCK_grant 0
user4 wait/io/file/sql/query_log 0
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
user4 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
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 6
-user1 localhost stage/sql/Init 6
-user1 localhost stage/sql/Init for update 1
-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
-user2 localhost stage/sql/Init for update 1
-user2 localhost stage/sql/Opening tables 3
-user3 localhost stage/sql/Checking permissions 3
-user3 localhost stage/sql/Closing tables 4
-user3 localhost stage/sql/Init 6
-user3 localhost stage/sql/Init for update 1
-user3 localhost stage/sql/Opening tables 3
-user4 localhost stage/sql/Checking permissions 3
-user4 localhost stage/sql/Closing tables 4
-user4 localhost stage/sql/Init 6
-user4 localhost stage/sql/Init for update 1
-user4 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/checking permissions 4
+user1 localhost stage/sql/closing tables 11
+user1 localhost stage/sql/init 3
+user1 localhost stage/sql/Opening tables 7
+user1 localhost stage/sql/starting 7
+user2 localhost stage/sql/checking permissions 4
+user2 localhost stage/sql/closing tables 10
+user2 localhost stage/sql/init 3
+user2 localhost stage/sql/Opening tables 6
+user2 localhost stage/sql/starting 7
+user3 localhost stage/sql/checking permissions 4
+user3 localhost stage/sql/closing tables 10
+user3 localhost stage/sql/init 3
+user3 localhost stage/sql/Opening tables 6
+user3 localhost stage/sql/starting 7
+user4 localhost stage/sql/checking permissions 4
+user4 localhost stage/sql/closing tables 10
+user4 localhost stage/sql/init 3
+user4 localhost stage/sql/Opening tables 6
+user4 localhost stage/sql/starting 7
execute dump_stages_user;
user event_name count_star
-user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 6
-user1 stage/sql/Init 6
-user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 4
-user2 stage/sql/Checking permissions 3
-user2 stage/sql/Closing tables 4
-user2 stage/sql/Init 6
-user2 stage/sql/Init for update 1
-user2 stage/sql/Opening tables 3
-user3 stage/sql/Checking permissions 3
-user3 stage/sql/Closing tables 4
-user3 stage/sql/Init 6
-user3 stage/sql/Init for update 1
-user3 stage/sql/Opening tables 3
-user4 stage/sql/Checking permissions 3
-user4 stage/sql/Closing tables 4
-user4 stage/sql/Init 6
-user4 stage/sql/Init for update 1
-user4 stage/sql/Opening tables 3
+user1 stage/sql/checking permissions 4
+user1 stage/sql/closing tables 11
+user1 stage/sql/init 3
+user1 stage/sql/Opening tables 7
+user1 stage/sql/starting 7
+user2 stage/sql/checking permissions 4
+user2 stage/sql/closing tables 10
+user2 stage/sql/init 3
+user2 stage/sql/Opening tables 6
+user2 stage/sql/starting 7
+user3 stage/sql/checking permissions 4
+user3 stage/sql/closing tables 10
+user3 stage/sql/init 3
+user3 stage/sql/Opening tables 6
+user3 stage/sql/starting 7
+user4 stage/sql/checking permissions 4
+user4 stage/sql/closing tables 10
+user4 stage/sql/init 3
+user4 stage/sql/Opening tables 6
+user4 stage/sql/starting 7
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 1
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 1
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 1
+user3 localhost statement/sp/freturn 1
user3 localhost statement/sql/insert 1
-user3 localhost statement/sql/select 2
+user3 localhost statement/sql/select 3
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 1
+user4 localhost statement/sp/freturn 1
user4 localhost statement/sql/insert 1
-user4 localhost statement/sql/select 2
+user4 localhost statement/sql/select 3
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 1
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 1
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 1
+user3 statement/sp/freturn 1
user3 statement/sql/insert 1
-user3 statement/sql/select 2
+user3 statement/sql/select 3
user4 statement/com/Error 0
user4 statement/com/Quit 1
+user4 statement/sp/freturn 1
user4 statement/sql/insert 1
-user4 statement/sql/select 2
+user4 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -3169,161 +3351,172 @@ user4 not found
execute dump_waits_account;
user host event_name count_star
user1 localhost wait/io/file/sql/query_log 0
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
user2 localhost wait/io/file/sql/query_log 0
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
user3 localhost wait/io/file/sql/query_log 0
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
user4 localhost wait/io/file/sql/query_log 0
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_user;
user event_name count_star
user1 wait/io/file/sql/query_log 0
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
user1 wait/synch/rwlock/sql/LOCK_grant 0
user2 wait/io/file/sql/query_log 0
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
user2 wait/synch/rwlock/sql/LOCK_grant 0
user3 wait/io/file/sql/query_log 0
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
user3 wait/synch/rwlock/sql/LOCK_grant 0
user4 wait/io/file/sql/query_log 0
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
user4 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
-user1 localhost stage/sql/Checking permissions 0
-user1 localhost stage/sql/Closing tables 0
-user1 localhost stage/sql/Init 0
-user1 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
user1 localhost stage/sql/Opening tables 0
-user2 localhost stage/sql/Checking permissions 0
-user2 localhost stage/sql/Closing tables 0
-user2 localhost stage/sql/Init 0
-user2 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/starting 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
user2 localhost stage/sql/Opening tables 0
-user3 localhost stage/sql/Checking permissions 0
-user3 localhost stage/sql/Closing tables 0
-user3 localhost stage/sql/Init 0
-user3 localhost stage/sql/Init for update 0
+user2 localhost stage/sql/starting 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
user3 localhost stage/sql/Opening tables 0
-user4 localhost stage/sql/Checking permissions 0
-user4 localhost stage/sql/Closing tables 0
-user4 localhost stage/sql/Init 0
-user4 localhost stage/sql/Init for update 0
+user3 localhost stage/sql/starting 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
user4 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/starting 0
execute dump_stages_user;
user event_name count_star
-user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 6
-user1 stage/sql/Init 6
-user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 4
-user2 stage/sql/Checking permissions 3
-user2 stage/sql/Closing tables 4
-user2 stage/sql/Init 6
-user2 stage/sql/Init for update 1
-user2 stage/sql/Opening tables 3
-user3 stage/sql/Checking permissions 3
-user3 stage/sql/Closing tables 4
-user3 stage/sql/Init 6
-user3 stage/sql/Init for update 1
-user3 stage/sql/Opening tables 3
-user4 stage/sql/Checking permissions 3
-user4 stage/sql/Closing tables 4
-user4 stage/sql/Init 6
-user4 stage/sql/Init for update 1
-user4 stage/sql/Opening tables 3
+user1 stage/sql/checking permissions 4
+user1 stage/sql/closing tables 11
+user1 stage/sql/init 3
+user1 stage/sql/Opening tables 7
+user1 stage/sql/starting 7
+user2 stage/sql/checking permissions 4
+user2 stage/sql/closing tables 10
+user2 stage/sql/init 3
+user2 stage/sql/Opening tables 6
+user2 stage/sql/starting 7
+user3 stage/sql/checking permissions 4
+user3 stage/sql/closing tables 10
+user3 stage/sql/init 3
+user3 stage/sql/Opening tables 6
+user3 stage/sql/starting 7
+user4 stage/sql/checking permissions 4
+user4 stage/sql/closing tables 10
+user4 stage/sql/init 3
+user4 stage/sql/Opening tables 6
+user4 stage/sql/starting 7
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 1
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 1
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 1
+user3 localhost statement/sp/freturn 1
user3 localhost statement/sql/insert 1
-user3 localhost statement/sql/select 2
+user3 localhost statement/sql/select 3
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 1
+user4 localhost statement/sp/freturn 1
user4 localhost statement/sql/insert 1
-user4 localhost statement/sql/select 2
+user4 localhost statement/sql/select 3
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 1
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 1
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 1
+user3 statement/sp/freturn 1
user3 statement/sql/insert 1
-user3 statement/sql/select 2
+user3 statement/sql/select 3
user4 statement/com/Error 0
user4 statement/com/Quit 1
+user4 statement/sp/freturn 1
user4 statement/sql/insert 1
-user4 statement/sql/select 2
+user4 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -3355,161 +3548,172 @@ user4 not found
execute dump_waits_account;
user host event_name count_star
user1 localhost wait/io/file/sql/query_log 0
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
user2 localhost wait/io/file/sql/query_log 0
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
user3 localhost wait/io/file/sql/query_log 0
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
user4 localhost wait/io/file/sql/query_log 0
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_user;
user event_name count_star
user1 wait/io/file/sql/query_log 0
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
user1 wait/synch/rwlock/sql/LOCK_grant 0
user2 wait/io/file/sql/query_log 0
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
user2 wait/synch/rwlock/sql/LOCK_grant 0
user3 wait/io/file/sql/query_log 0
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
user3 wait/synch/rwlock/sql/LOCK_grant 0
user4 wait/io/file/sql/query_log 0
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
user4 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
-user1 localhost stage/sql/Checking permissions 0
-user1 localhost stage/sql/Closing tables 0
-user1 localhost stage/sql/Init 0
-user1 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
user1 localhost stage/sql/Opening tables 0
-user2 localhost stage/sql/Checking permissions 0
-user2 localhost stage/sql/Closing tables 0
-user2 localhost stage/sql/Init 0
-user2 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/starting 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
user2 localhost stage/sql/Opening tables 0
-user3 localhost stage/sql/Checking permissions 0
-user3 localhost stage/sql/Closing tables 0
-user3 localhost stage/sql/Init 0
-user3 localhost stage/sql/Init for update 0
+user2 localhost stage/sql/starting 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
user3 localhost stage/sql/Opening tables 0
-user4 localhost stage/sql/Checking permissions 0
-user4 localhost stage/sql/Closing tables 0
-user4 localhost stage/sql/Init 0
-user4 localhost stage/sql/Init for update 0
+user3 localhost stage/sql/starting 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
user4 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/starting 0
execute dump_stages_user;
user event_name count_star
-user1 stage/sql/Checking permissions 0
-user1 stage/sql/Closing tables 0
-user1 stage/sql/Init 0
-user1 stage/sql/Init for update 0
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
user1 stage/sql/Opening tables 0
-user2 stage/sql/Checking permissions 0
-user2 stage/sql/Closing tables 0
-user2 stage/sql/Init 0
-user2 stage/sql/Init for update 0
+user1 stage/sql/starting 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
user2 stage/sql/Opening tables 0
-user3 stage/sql/Checking permissions 0
-user3 stage/sql/Closing tables 0
-user3 stage/sql/Init 0
-user3 stage/sql/Init for update 0
+user2 stage/sql/starting 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
user3 stage/sql/Opening tables 0
-user4 stage/sql/Checking permissions 0
-user4 stage/sql/Closing tables 0
-user4 stage/sql/Init 0
-user4 stage/sql/Init for update 0
+user3 stage/sql/starting 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
user4 stage/sql/Opening tables 0
+user4 stage/sql/starting 0
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 1
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 1
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 1
+user3 localhost statement/sp/freturn 1
user3 localhost statement/sql/insert 1
-user3 localhost statement/sql/select 2
+user3 localhost statement/sql/select 3
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 1
+user4 localhost statement/sp/freturn 1
user4 localhost statement/sql/insert 1
-user4 localhost statement/sql/select 2
+user4 localhost statement/sql/select 3
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 1
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 1
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 1
+user3 statement/sp/freturn 1
user3 statement/sql/insert 1
-user3 statement/sql/select 2
+user3 statement/sql/select 3
user4 statement/com/Error 0
user4 statement/com/Quit 1
+user4 statement/sp/freturn 1
user4 statement/sql/insert 1
-user4 statement/sql/select 2
+user4 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -3541,161 +3745,172 @@ user4 not found
execute dump_waits_account;
user host event_name count_star
user1 localhost wait/io/file/sql/query_log 0
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
user2 localhost wait/io/file/sql/query_log 0
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
user3 localhost wait/io/file/sql/query_log 0
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
user4 localhost wait/io/file/sql/query_log 0
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_user;
user event_name count_star
user1 wait/io/file/sql/query_log 0
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
user1 wait/synch/rwlock/sql/LOCK_grant 0
user2 wait/io/file/sql/query_log 0
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
user2 wait/synch/rwlock/sql/LOCK_grant 0
user3 wait/io/file/sql/query_log 0
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
user3 wait/synch/rwlock/sql/LOCK_grant 0
user4 wait/io/file/sql/query_log 0
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
user4 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
-user1 localhost stage/sql/Checking permissions 0
-user1 localhost stage/sql/Closing tables 0
-user1 localhost stage/sql/Init 0
-user1 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
user1 localhost stage/sql/Opening tables 0
-user2 localhost stage/sql/Checking permissions 0
-user2 localhost stage/sql/Closing tables 0
-user2 localhost stage/sql/Init 0
-user2 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/starting 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
user2 localhost stage/sql/Opening tables 0
-user3 localhost stage/sql/Checking permissions 0
-user3 localhost stage/sql/Closing tables 0
-user3 localhost stage/sql/Init 0
-user3 localhost stage/sql/Init for update 0
+user2 localhost stage/sql/starting 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
user3 localhost stage/sql/Opening tables 0
-user4 localhost stage/sql/Checking permissions 0
-user4 localhost stage/sql/Closing tables 0
-user4 localhost stage/sql/Init 0
-user4 localhost stage/sql/Init for update 0
+user3 localhost stage/sql/starting 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
user4 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/starting 0
execute dump_stages_user;
user event_name count_star
-user1 stage/sql/Checking permissions 0
-user1 stage/sql/Closing tables 0
-user1 stage/sql/Init 0
-user1 stage/sql/Init for update 0
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
user1 stage/sql/Opening tables 0
-user2 stage/sql/Checking permissions 0
-user2 stage/sql/Closing tables 0
-user2 stage/sql/Init 0
-user2 stage/sql/Init for update 0
+user1 stage/sql/starting 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
user2 stage/sql/Opening tables 0
-user3 stage/sql/Checking permissions 0
-user3 stage/sql/Closing tables 0
-user3 stage/sql/Init 0
-user3 stage/sql/Init for update 0
+user2 stage/sql/starting 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
user3 stage/sql/Opening tables 0
-user4 stage/sql/Checking permissions 0
-user4 stage/sql/Closing tables 0
-user4 stage/sql/Init 0
-user4 stage/sql/Init for update 0
+user3 stage/sql/starting 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
user4 stage/sql/Opening tables 0
+user4 stage/sql/starting 0
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 1
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 1
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 1
+user3 localhost statement/sp/freturn 1
user3 localhost statement/sql/insert 1
-user3 localhost statement/sql/select 2
+user3 localhost statement/sql/select 3
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 1
+user4 localhost statement/sp/freturn 1
user4 localhost statement/sql/insert 1
-user4 localhost statement/sql/select 2
+user4 localhost statement/sql/select 3
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 1
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 1
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 1
+user3 statement/sp/freturn 1
user3 statement/sql/insert 1
-user3 statement/sql/select 2
+user3 statement/sql/select 3
user4 statement/com/Error 0
user4 statement/com/Quit 1
+user4 statement/sp/freturn 1
user4 statement/sql/insert 1
-user4 statement/sql/select 2
+user4 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -3727,161 +3942,172 @@ user4 not found
execute dump_waits_account;
user host event_name count_star
user1 localhost wait/io/file/sql/query_log 0
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
user2 localhost wait/io/file/sql/query_log 0
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
user3 localhost wait/io/file/sql/query_log 0
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
user4 localhost wait/io/file/sql/query_log 0
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_user;
user event_name count_star
user1 wait/io/file/sql/query_log 0
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
user1 wait/synch/rwlock/sql/LOCK_grant 0
user2 wait/io/file/sql/query_log 0
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
user2 wait/synch/rwlock/sql/LOCK_grant 0
user3 wait/io/file/sql/query_log 0
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
user3 wait/synch/rwlock/sql/LOCK_grant 0
user4 wait/io/file/sql/query_log 0
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
user4 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
-user1 localhost stage/sql/Checking permissions 0
-user1 localhost stage/sql/Closing tables 0
-user1 localhost stage/sql/Init 0
-user1 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
user1 localhost stage/sql/Opening tables 0
-user2 localhost stage/sql/Checking permissions 0
-user2 localhost stage/sql/Closing tables 0
-user2 localhost stage/sql/Init 0
-user2 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/starting 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
user2 localhost stage/sql/Opening tables 0
-user3 localhost stage/sql/Checking permissions 0
-user3 localhost stage/sql/Closing tables 0
-user3 localhost stage/sql/Init 0
-user3 localhost stage/sql/Init for update 0
+user2 localhost stage/sql/starting 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
user3 localhost stage/sql/Opening tables 0
-user4 localhost stage/sql/Checking permissions 0
-user4 localhost stage/sql/Closing tables 0
-user4 localhost stage/sql/Init 0
-user4 localhost stage/sql/Init for update 0
+user3 localhost stage/sql/starting 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
user4 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/starting 0
execute dump_stages_user;
user event_name count_star
-user1 stage/sql/Checking permissions 0
-user1 stage/sql/Closing tables 0
-user1 stage/sql/Init 0
-user1 stage/sql/Init for update 0
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
user1 stage/sql/Opening tables 0
-user2 stage/sql/Checking permissions 0
-user2 stage/sql/Closing tables 0
-user2 stage/sql/Init 0
-user2 stage/sql/Init for update 0
+user1 stage/sql/starting 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
user2 stage/sql/Opening tables 0
-user3 stage/sql/Checking permissions 0
-user3 stage/sql/Closing tables 0
-user3 stage/sql/Init 0
-user3 stage/sql/Init for update 0
+user2 stage/sql/starting 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
user3 stage/sql/Opening tables 0
-user4 stage/sql/Checking permissions 0
-user4 stage/sql/Closing tables 0
-user4 stage/sql/Init 0
-user4 stage/sql/Init for update 0
+user3 stage/sql/starting 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
user4 stage/sql/Opening tables 0
+user4 stage/sql/starting 0
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 1
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 1
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 1
+user3 localhost statement/sp/freturn 1
user3 localhost statement/sql/insert 1
-user3 localhost statement/sql/select 2
+user3 localhost statement/sql/select 3
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 1
+user4 localhost statement/sp/freturn 1
user4 localhost statement/sql/insert 1
-user4 localhost statement/sql/select 2
+user4 localhost statement/sql/select 3
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 1
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 1
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 1
+user3 statement/sp/freturn 1
user3 statement/sql/insert 1
-user3 statement/sql/select 2
+user3 statement/sql/select 3
user4 statement/com/Error 0
user4 statement/com/Quit 1
+user4 statement/sp/freturn 1
user4 statement/sql/insert 1
-user4 statement/sql/select 2
+user4 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -3913,161 +4139,172 @@ user4 not found
execute dump_waits_account;
user host event_name count_star
user1 localhost wait/io/file/sql/query_log 0
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
user2 localhost wait/io/file/sql/query_log 0
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
user3 localhost wait/io/file/sql/query_log 0
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
user4 localhost wait/io/file/sql/query_log 0
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_user;
user event_name count_star
user1 wait/io/file/sql/query_log 0
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
user1 wait/synch/rwlock/sql/LOCK_grant 0
user2 wait/io/file/sql/query_log 0
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
user2 wait/synch/rwlock/sql/LOCK_grant 0
user3 wait/io/file/sql/query_log 0
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
user3 wait/synch/rwlock/sql/LOCK_grant 0
user4 wait/io/file/sql/query_log 0
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
user4 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
-user1 localhost stage/sql/Checking permissions 0
-user1 localhost stage/sql/Closing tables 0
-user1 localhost stage/sql/Init 0
-user1 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
user1 localhost stage/sql/Opening tables 0
-user2 localhost stage/sql/Checking permissions 0
-user2 localhost stage/sql/Closing tables 0
-user2 localhost stage/sql/Init 0
-user2 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/starting 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
user2 localhost stage/sql/Opening tables 0
-user3 localhost stage/sql/Checking permissions 0
-user3 localhost stage/sql/Closing tables 0
-user3 localhost stage/sql/Init 0
-user3 localhost stage/sql/Init for update 0
+user2 localhost stage/sql/starting 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
user3 localhost stage/sql/Opening tables 0
-user4 localhost stage/sql/Checking permissions 0
-user4 localhost stage/sql/Closing tables 0
-user4 localhost stage/sql/Init 0
-user4 localhost stage/sql/Init for update 0
+user3 localhost stage/sql/starting 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
user4 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/starting 0
execute dump_stages_user;
user event_name count_star
-user1 stage/sql/Checking permissions 0
-user1 stage/sql/Closing tables 0
-user1 stage/sql/Init 0
-user1 stage/sql/Init for update 0
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
user1 stage/sql/Opening tables 0
-user2 stage/sql/Checking permissions 0
-user2 stage/sql/Closing tables 0
-user2 stage/sql/Init 0
-user2 stage/sql/Init for update 0
+user1 stage/sql/starting 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
user2 stage/sql/Opening tables 0
-user3 stage/sql/Checking permissions 0
-user3 stage/sql/Closing tables 0
-user3 stage/sql/Init 0
-user3 stage/sql/Init for update 0
+user2 stage/sql/starting 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
user3 stage/sql/Opening tables 0
-user4 stage/sql/Checking permissions 0
-user4 stage/sql/Closing tables 0
-user4 stage/sql/Init 0
-user4 stage/sql/Init for update 0
+user3 stage/sql/starting 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
user4 stage/sql/Opening tables 0
+user4 stage/sql/starting 0
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 1
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 1
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 1
+user3 localhost statement/sp/freturn 1
user3 localhost statement/sql/insert 1
-user3 localhost statement/sql/select 2
+user3 localhost statement/sql/select 3
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 1
+user4 localhost statement/sp/freturn 1
user4 localhost statement/sql/insert 1
-user4 localhost statement/sql/select 2
+user4 localhost statement/sql/select 3
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 1
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 1
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 1
+user3 statement/sp/freturn 1
user3 statement/sql/insert 1
-user3 statement/sql/select 2
+user3 statement/sql/select 3
user4 statement/com/Error 0
user4 statement/com/Quit 1
+user4 statement/sp/freturn 1
user4 statement/sql/insert 1
-user4 statement/sql/select 2
+user4 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -4099,161 +4336,172 @@ user4 not found
execute dump_waits_account;
user host event_name count_star
user1 localhost wait/io/file/sql/query_log 0
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
user2 localhost wait/io/file/sql/query_log 0
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
user3 localhost wait/io/file/sql/query_log 0
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
user4 localhost wait/io/file/sql/query_log 0
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_user;
user event_name count_star
user1 wait/io/file/sql/query_log 0
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
user1 wait/synch/rwlock/sql/LOCK_grant 0
user2 wait/io/file/sql/query_log 0
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
user2 wait/synch/rwlock/sql/LOCK_grant 0
user3 wait/io/file/sql/query_log 0
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
user3 wait/synch/rwlock/sql/LOCK_grant 0
user4 wait/io/file/sql/query_log 0
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
user4 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
-user1 localhost stage/sql/Checking permissions 0
-user1 localhost stage/sql/Closing tables 0
-user1 localhost stage/sql/Init 0
-user1 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
user1 localhost stage/sql/Opening tables 0
-user2 localhost stage/sql/Checking permissions 0
-user2 localhost stage/sql/Closing tables 0
-user2 localhost stage/sql/Init 0
-user2 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/starting 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
user2 localhost stage/sql/Opening tables 0
-user3 localhost stage/sql/Checking permissions 0
-user3 localhost stage/sql/Closing tables 0
-user3 localhost stage/sql/Init 0
-user3 localhost stage/sql/Init for update 0
+user2 localhost stage/sql/starting 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
user3 localhost stage/sql/Opening tables 0
-user4 localhost stage/sql/Checking permissions 0
-user4 localhost stage/sql/Closing tables 0
-user4 localhost stage/sql/Init 0
-user4 localhost stage/sql/Init for update 0
+user3 localhost stage/sql/starting 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
user4 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/starting 0
execute dump_stages_user;
user event_name count_star
-user1 stage/sql/Checking permissions 0
-user1 stage/sql/Closing tables 0
-user1 stage/sql/Init 0
-user1 stage/sql/Init for update 0
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
user1 stage/sql/Opening tables 0
-user2 stage/sql/Checking permissions 0
-user2 stage/sql/Closing tables 0
-user2 stage/sql/Init 0
-user2 stage/sql/Init for update 0
+user1 stage/sql/starting 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
user2 stage/sql/Opening tables 0
-user3 stage/sql/Checking permissions 0
-user3 stage/sql/Closing tables 0
-user3 stage/sql/Init 0
-user3 stage/sql/Init for update 0
+user2 stage/sql/starting 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
user3 stage/sql/Opening tables 0
-user4 stage/sql/Checking permissions 0
-user4 stage/sql/Closing tables 0
-user4 stage/sql/Init 0
-user4 stage/sql/Init for update 0
+user3 stage/sql/starting 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
user4 stage/sql/Opening tables 0
+user4 stage/sql/starting 0
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 0
+user1 localhost statement/sp/freturn 0
user1 localhost statement/sql/insert 0
user1 localhost statement/sql/select 0
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 0
+user2 localhost statement/sp/freturn 0
user2 localhost statement/sql/insert 0
user2 localhost statement/sql/select 0
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 0
+user3 localhost statement/sp/freturn 0
user3 localhost statement/sql/insert 0
user3 localhost statement/sql/select 0
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 0
+user4 localhost statement/sp/freturn 0
user4 localhost statement/sql/insert 0
user4 localhost statement/sql/select 0
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 1
+user1 statement/sp/freturn 1
user1 statement/sql/insert 1
-user1 statement/sql/select 2
+user1 statement/sql/select 3
user2 statement/com/Error 0
user2 statement/com/Quit 1
+user2 statement/sp/freturn 1
user2 statement/sql/insert 1
-user2 statement/sql/select 2
+user2 statement/sql/select 3
user3 statement/com/Error 0
user3 statement/com/Quit 1
+user3 statement/sp/freturn 1
user3 statement/sql/insert 1
-user3 statement/sql/select 2
+user3 statement/sql/select 3
user4 statement/com/Error 0
user4 statement/com/Quit 1
+user4 statement/sp/freturn 1
user4 statement/sql/insert 1
-user4 statement/sql/select 2
+user4 statement/sql/select 3
execute dump_statements_host;
host event_name count_star
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -4285,146 +4533,135 @@ user4 not found
execute dump_waits_account;
user host event_name count_star
user1 localhost wait/io/file/sql/query_log 0
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
user2 localhost wait/io/file/sql/query_log 0
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
user3 localhost wait/io/file/sql/query_log 0
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
user4 localhost wait/io/file/sql/query_log 0
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_user;
user event_name count_star
user1 wait/io/file/sql/query_log 0
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
user1 wait/synch/rwlock/sql/LOCK_grant 0
user2 wait/io/file/sql/query_log 0
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
user2 wait/synch/rwlock/sql/LOCK_grant 0
user3 wait/io/file/sql/query_log 0
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
user3 wait/synch/rwlock/sql/LOCK_grant 0
user4 wait/io/file/sql/query_log 0
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
user4 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
-user1 localhost stage/sql/Checking permissions 0
-user1 localhost stage/sql/Closing tables 0
-user1 localhost stage/sql/Init 0
-user1 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
user1 localhost stage/sql/Opening tables 0
-user2 localhost stage/sql/Checking permissions 0
-user2 localhost stage/sql/Closing tables 0
-user2 localhost stage/sql/Init 0
-user2 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/starting 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
user2 localhost stage/sql/Opening tables 0
-user3 localhost stage/sql/Checking permissions 0
-user3 localhost stage/sql/Closing tables 0
-user3 localhost stage/sql/Init 0
-user3 localhost stage/sql/Init for update 0
+user2 localhost stage/sql/starting 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
user3 localhost stage/sql/Opening tables 0
-user4 localhost stage/sql/Checking permissions 0
-user4 localhost stage/sql/Closing tables 0
-user4 localhost stage/sql/Init 0
-user4 localhost stage/sql/Init for update 0
+user3 localhost stage/sql/starting 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
user4 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/starting 0
execute dump_stages_user;
user event_name count_star
-user1 stage/sql/Checking permissions 0
-user1 stage/sql/Closing tables 0
-user1 stage/sql/Init 0
-user1 stage/sql/Init for update 0
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
user1 stage/sql/Opening tables 0
-user2 stage/sql/Checking permissions 0
-user2 stage/sql/Closing tables 0
-user2 stage/sql/Init 0
-user2 stage/sql/Init for update 0
+user1 stage/sql/starting 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
user2 stage/sql/Opening tables 0
-user3 stage/sql/Checking permissions 0
-user3 stage/sql/Closing tables 0
-user3 stage/sql/Init 0
-user3 stage/sql/Init for update 0
+user2 stage/sql/starting 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
user3 stage/sql/Opening tables 0
-user4 stage/sql/Checking permissions 0
-user4 stage/sql/Closing tables 0
-user4 stage/sql/Init 0
-user4 stage/sql/Init for update 0
+user3 stage/sql/starting 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
user4 stage/sql/Opening tables 0
+user4 stage/sql/starting 0
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 0
+user1 localhost statement/sp/freturn 0
user1 localhost statement/sql/insert 0
user1 localhost statement/sql/select 0
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 0
+user2 localhost statement/sp/freturn 0
user2 localhost statement/sql/insert 0
user2 localhost statement/sql/select 0
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 0
+user3 localhost statement/sp/freturn 0
user3 localhost statement/sql/insert 0
user3 localhost statement/sql/select 0
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 0
+user4 localhost statement/sp/freturn 0
user4 localhost statement/sql/insert 0
user4 localhost statement/sql/select 0
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 0
+user1 statement/sp/freturn 0
user1 statement/sql/insert 0
user1 statement/sql/select 0
user2 statement/com/Error 0
user2 statement/com/Quit 0
+user2 statement/sp/freturn 0
user2 statement/sql/insert 0
user2 statement/sql/select 0
user3 statement/com/Error 0
user3 statement/com/Quit 0
+user3 statement/sp/freturn 0
user3 statement/sql/insert 0
user3 statement/sql/select 0
user4 statement/com/Error 0
user4 statement/com/Quit 0
+user4 statement/sp/freturn 0
user4 statement/sql/insert 0
user4 statement/sql/select 0
execute dump_statements_host;
@@ -4433,13 +4670,35 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -4471,146 +4730,135 @@ user4 not found
execute dump_waits_account;
user host event_name count_star
user1 localhost wait/io/file/sql/query_log 0
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
user2 localhost wait/io/file/sql/query_log 0
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
user3 localhost wait/io/file/sql/query_log 0
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
user4 localhost wait/io/file/sql/query_log 0
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_user;
user event_name count_star
user1 wait/io/file/sql/query_log 0
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
user1 wait/synch/rwlock/sql/LOCK_grant 0
user2 wait/io/file/sql/query_log 0
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
user2 wait/synch/rwlock/sql/LOCK_grant 0
user3 wait/io/file/sql/query_log 0
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
user3 wait/synch/rwlock/sql/LOCK_grant 0
user4 wait/io/file/sql/query_log 0
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
user4 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
-user1 localhost stage/sql/Checking permissions 0
-user1 localhost stage/sql/Closing tables 0
-user1 localhost stage/sql/Init 0
-user1 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
user1 localhost stage/sql/Opening tables 0
-user2 localhost stage/sql/Checking permissions 0
-user2 localhost stage/sql/Closing tables 0
-user2 localhost stage/sql/Init 0
-user2 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/starting 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
user2 localhost stage/sql/Opening tables 0
-user3 localhost stage/sql/Checking permissions 0
-user3 localhost stage/sql/Closing tables 0
-user3 localhost stage/sql/Init 0
-user3 localhost stage/sql/Init for update 0
+user2 localhost stage/sql/starting 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
user3 localhost stage/sql/Opening tables 0
-user4 localhost stage/sql/Checking permissions 0
-user4 localhost stage/sql/Closing tables 0
-user4 localhost stage/sql/Init 0
-user4 localhost stage/sql/Init for update 0
+user3 localhost stage/sql/starting 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
user4 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/starting 0
execute dump_stages_user;
user event_name count_star
-user1 stage/sql/Checking permissions 0
-user1 stage/sql/Closing tables 0
-user1 stage/sql/Init 0
-user1 stage/sql/Init for update 0
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
user1 stage/sql/Opening tables 0
-user2 stage/sql/Checking permissions 0
-user2 stage/sql/Closing tables 0
-user2 stage/sql/Init 0
-user2 stage/sql/Init for update 0
+user1 stage/sql/starting 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
user2 stage/sql/Opening tables 0
-user3 stage/sql/Checking permissions 0
-user3 stage/sql/Closing tables 0
-user3 stage/sql/Init 0
-user3 stage/sql/Init for update 0
+user2 stage/sql/starting 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
user3 stage/sql/Opening tables 0
-user4 stage/sql/Checking permissions 0
-user4 stage/sql/Closing tables 0
-user4 stage/sql/Init 0
-user4 stage/sql/Init for update 0
+user3 stage/sql/starting 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
user4 stage/sql/Opening tables 0
+user4 stage/sql/starting 0
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 0
+user1 localhost statement/sp/freturn 0
user1 localhost statement/sql/insert 0
user1 localhost statement/sql/select 0
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 0
+user2 localhost statement/sp/freturn 0
user2 localhost statement/sql/insert 0
user2 localhost statement/sql/select 0
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 0
+user3 localhost statement/sp/freturn 0
user3 localhost statement/sql/insert 0
user3 localhost statement/sql/select 0
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 0
+user4 localhost statement/sp/freturn 0
user4 localhost statement/sql/insert 0
user4 localhost statement/sql/select 0
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 0
+user1 statement/sp/freturn 0
user1 statement/sql/insert 0
user1 statement/sql/select 0
user2 statement/com/Error 0
user2 statement/com/Quit 0
+user2 statement/sp/freturn 0
user2 statement/sql/insert 0
user2 statement/sql/select 0
user3 statement/com/Error 0
user3 statement/com/Quit 0
+user3 statement/sp/freturn 0
user3 statement/sql/insert 0
user3 statement/sql/select 0
user4 statement/com/Error 0
user4 statement/com/Quit 0
+user4 statement/sp/freturn 0
user4 statement/sql/insert 0
user4 statement/sql/select 0
execute dump_statements_host;
@@ -4619,13 +4867,35 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -4657,146 +4927,923 @@ user4 not found
execute dump_waits_account;
user host event_name count_star
user1 localhost wait/io/file/sql/query_log 0
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
user2 localhost wait/io/file/sql/query_log 0
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
user3 localhost wait/io/file/sql/query_log 0
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
user4 localhost wait/io/file/sql/query_log 0
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_user;
user event_name count_star
user1 wait/io/file/sql/query_log 0
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
user1 wait/synch/rwlock/sql/LOCK_grant 0
user2 wait/io/file/sql/query_log 0
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
user2 wait/synch/rwlock/sql/LOCK_grant 0
user3 wait/io/file/sql/query_log 0
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
user3 wait/synch/rwlock/sql/LOCK_grant 0
user4 wait/io/file/sql/query_log 0
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
user4 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
-user1 localhost stage/sql/Checking permissions 0
-user1 localhost stage/sql/Closing tables 0
-user1 localhost stage/sql/Init 0
-user1 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
user1 localhost stage/sql/Opening tables 0
-user2 localhost stage/sql/Checking permissions 0
-user2 localhost stage/sql/Closing tables 0
-user2 localhost stage/sql/Init 0
-user2 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/starting 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
user2 localhost stage/sql/Opening tables 0
-user3 localhost stage/sql/Checking permissions 0
-user3 localhost stage/sql/Closing tables 0
-user3 localhost stage/sql/Init 0
-user3 localhost stage/sql/Init for update 0
+user2 localhost stage/sql/starting 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
user3 localhost stage/sql/Opening tables 0
-user4 localhost stage/sql/Checking permissions 0
-user4 localhost stage/sql/Closing tables 0
-user4 localhost stage/sql/Init 0
-user4 localhost stage/sql/Init for update 0
+user3 localhost stage/sql/starting 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
user4 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/starting 0
execute dump_stages_user;
user event_name count_star
-user1 stage/sql/Checking permissions 0
-user1 stage/sql/Closing tables 0
-user1 stage/sql/Init 0
-user1 stage/sql/Init for update 0
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
user1 stage/sql/Opening tables 0
-user2 stage/sql/Checking permissions 0
-user2 stage/sql/Closing tables 0
-user2 stage/sql/Init 0
-user2 stage/sql/Init for update 0
+user1 stage/sql/starting 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
user2 stage/sql/Opening tables 0
-user3 stage/sql/Checking permissions 0
-user3 stage/sql/Closing tables 0
-user3 stage/sql/Init 0
-user3 stage/sql/Init for update 0
+user2 stage/sql/starting 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
user3 stage/sql/Opening tables 0
-user4 stage/sql/Checking permissions 0
-user4 stage/sql/Closing tables 0
-user4 stage/sql/Init 0
-user4 stage/sql/Init for update 0
+user3 stage/sql/starting 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
user4 stage/sql/Opening tables 0
+user4 stage/sql/starting 0
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 0
+user1 localhost statement/sp/freturn 0
+user1 localhost statement/sql/insert 0
+user1 localhost statement/sql/select 0
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 0
+user2 localhost statement/sp/freturn 0
+user2 localhost statement/sql/insert 0
+user2 localhost statement/sql/select 0
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 0
+user3 localhost statement/sp/freturn 0
+user3 localhost statement/sql/insert 0
+user3 localhost statement/sql/select 0
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 0
+user4 localhost statement/sp/freturn 0
+user4 localhost statement/sql/insert 0
+user4 localhost statement/sql/select 0
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 0
+user1 statement/sp/freturn 0
+user1 statement/sql/insert 0
+user1 statement/sql/select 0
+user2 statement/com/Error 0
+user2 statement/com/Quit 0
+user2 statement/sp/freturn 0
+user2 statement/sql/insert 0
+user2 statement/sql/select 0
+user3 statement/com/Error 0
+user3 statement/com/Quit 0
+user3 statement/sp/freturn 0
+user3 statement/sql/insert 0
+user3 statement/sql/select 0
+user4 statement/com/Error 0
+user4 statement/com/Quit 0
+user4 statement/sp/freturn 0
+user4 statement/sql/insert 0
+user4 statement/sql/select 0
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sp/freturn 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sp/freturn 4
+statement/sql/insert 4
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_transactions_summary_by_thread_by_event_name;
+"================== TRANSACTIONS_BY_THREAD truncated =================="
+"================== Step 29 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/file/sql/query_log 0
+user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
+user2 localhost wait/io/file/sql/query_log 0
+user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
+user3 localhost wait/io/file/sql/query_log 0
+user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
+user4 localhost wait/io/file/sql/query_log 0
+user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+user2 wait/io/file/sql/query_log 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+user3 wait/io/file/sql/query_log 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+user4 wait/io/file/sql/query_log 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 32
+wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
+user1 localhost stage/sql/Opening tables 0
+user1 localhost stage/sql/starting 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
+user2 localhost stage/sql/Opening tables 0
+user2 localhost stage/sql/starting 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
+user3 localhost stage/sql/Opening tables 0
+user3 localhost stage/sql/starting 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
+user4 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/starting 0
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
+user1 stage/sql/Opening tables 0
+user1 stage/sql/starting 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
+user2 stage/sql/Opening tables 0
+user2 stage/sql/starting 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
+user3 stage/sql/Opening tables 0
+user3 stage/sql/starting 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
+user4 stage/sql/Opening tables 0
+user4 stage/sql/starting 0
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+stage/sql/starting 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 0
+user1 localhost statement/sp/freturn 0
+user1 localhost statement/sql/insert 0
+user1 localhost statement/sql/select 0
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 0
+user2 localhost statement/sp/freturn 0
+user2 localhost statement/sql/insert 0
+user2 localhost statement/sql/select 0
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 0
+user3 localhost statement/sp/freturn 0
+user3 localhost statement/sql/insert 0
+user3 localhost statement/sql/select 0
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 0
+user4 localhost statement/sp/freturn 0
+user4 localhost statement/sql/insert 0
+user4 localhost statement/sql/select 0
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 0
+user1 statement/sp/freturn 0
+user1 statement/sql/insert 0
+user1 statement/sql/select 0
+user2 statement/com/Error 0
+user2 statement/com/Quit 0
+user2 statement/sp/freturn 0
+user2 statement/sql/insert 0
+user2 statement/sql/select 0
+user3 statement/com/Error 0
+user3 statement/com/Quit 0
+user3 statement/sp/freturn 0
+user3 statement/sql/insert 0
+user3 statement/sql/select 0
+user4 statement/com/Error 0
+user4 statement/com/Quit 0
+user4 statement/sp/freturn 0
+user4 statement/sql/insert 0
+user4 statement/sql/select 0
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sp/freturn 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sp/freturn 4
+statement/sql/insert 4
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_transactions_summary_by_account_by_event_name;
+"================== TRANSACTIONS_BY_ACCOUNT truncated =================="
+"================== Step 30 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/file/sql/query_log 0
+user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
+user2 localhost wait/io/file/sql/query_log 0
+user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
+user3 localhost wait/io/file/sql/query_log 0
+user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
+user4 localhost wait/io/file/sql/query_log 0
+user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+user2 wait/io/file/sql/query_log 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+user3 wait/io/file/sql/query_log 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+user4 wait/io/file/sql/query_log 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 32
+wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
+user1 localhost stage/sql/Opening tables 0
+user1 localhost stage/sql/starting 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
+user2 localhost stage/sql/Opening tables 0
+user2 localhost stage/sql/starting 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
+user3 localhost stage/sql/Opening tables 0
+user3 localhost stage/sql/starting 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
+user4 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/starting 0
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
+user1 stage/sql/Opening tables 0
+user1 stage/sql/starting 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
+user2 stage/sql/Opening tables 0
+user2 stage/sql/starting 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
+user3 stage/sql/Opening tables 0
+user3 stage/sql/starting 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
+user4 stage/sql/Opening tables 0
+user4 stage/sql/starting 0
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+stage/sql/starting 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 0
+user1 localhost statement/sp/freturn 0
+user1 localhost statement/sql/insert 0
+user1 localhost statement/sql/select 0
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 0
+user2 localhost statement/sp/freturn 0
+user2 localhost statement/sql/insert 0
+user2 localhost statement/sql/select 0
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 0
+user3 localhost statement/sp/freturn 0
+user3 localhost statement/sql/insert 0
+user3 localhost statement/sql/select 0
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 0
+user4 localhost statement/sp/freturn 0
+user4 localhost statement/sql/insert 0
+user4 localhost statement/sql/select 0
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 0
+user1 statement/sp/freturn 0
+user1 statement/sql/insert 0
+user1 statement/sql/select 0
+user2 statement/com/Error 0
+user2 statement/com/Quit 0
+user2 statement/sp/freturn 0
+user2 statement/sql/insert 0
+user2 statement/sql/select 0
+user3 statement/com/Error 0
+user3 statement/com/Quit 0
+user3 statement/sp/freturn 0
+user3 statement/sql/insert 0
+user3 statement/sql/select 0
+user4 statement/com/Error 0
+user4 statement/com/Quit 0
+user4 statement/sp/freturn 0
+user4 statement/sql/insert 0
+user4 statement/sql/select 0
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sp/freturn 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sp/freturn 4
+statement/sql/insert 4
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 0
+user2 localhost transaction 0
+user3 localhost transaction 0
+user4 localhost transaction 0
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 2
+user2 transaction 2
+user3 transaction 2
+user4 transaction 2
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_transactions_summary_by_user_by_event_name;
+"================== TRANSACTIONS_BY_USER truncated =================="
+"================== Step 31 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/file/sql/query_log 0
+user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
+user2 localhost wait/io/file/sql/query_log 0
+user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
+user3 localhost wait/io/file/sql/query_log 0
+user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
+user4 localhost wait/io/file/sql/query_log 0
+user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+user2 wait/io/file/sql/query_log 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+user3 wait/io/file/sql/query_log 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+user4 wait/io/file/sql/query_log 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 32
+wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
+user1 localhost stage/sql/Opening tables 0
+user1 localhost stage/sql/starting 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
+user2 localhost stage/sql/Opening tables 0
+user2 localhost stage/sql/starting 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
+user3 localhost stage/sql/Opening tables 0
+user3 localhost stage/sql/starting 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
+user4 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/starting 0
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
+user1 stage/sql/Opening tables 0
+user1 stage/sql/starting 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
+user2 stage/sql/Opening tables 0
+user2 stage/sql/starting 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
+user3 stage/sql/Opening tables 0
+user3 stage/sql/starting 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
+user4 stage/sql/Opening tables 0
+user4 stage/sql/starting 0
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+stage/sql/starting 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 0
+user1 localhost statement/sp/freturn 0
+user1 localhost statement/sql/insert 0
+user1 localhost statement/sql/select 0
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 0
+user2 localhost statement/sp/freturn 0
+user2 localhost statement/sql/insert 0
+user2 localhost statement/sql/select 0
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 0
+user3 localhost statement/sp/freturn 0
+user3 localhost statement/sql/insert 0
+user3 localhost statement/sql/select 0
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 0
+user4 localhost statement/sp/freturn 0
+user4 localhost statement/sql/insert 0
+user4 localhost statement/sql/select 0
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 0
+user1 statement/sp/freturn 0
+user1 statement/sql/insert 0
+user1 statement/sql/select 0
+user2 statement/com/Error 0
+user2 statement/com/Quit 0
+user2 statement/sp/freturn 0
+user2 statement/sql/insert 0
+user2 statement/sql/select 0
+user3 statement/com/Error 0
+user3 statement/com/Quit 0
+user3 statement/sp/freturn 0
+user3 statement/sql/insert 0
+user3 statement/sql/select 0
+user4 statement/com/Error 0
+user4 statement/com/Quit 0
+user4 statement/sp/freturn 0
+user4 statement/sql/insert 0
+user4 statement/sql/select 0
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sp/freturn 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sp/freturn 4
+statement/sql/insert 4
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 0
+user2 localhost transaction 0
+user3 localhost transaction 0
+user4 localhost transaction 0
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 0
+user2 transaction 0
+user3 transaction 0
+user4 transaction 0
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_transactions_summary_by_host_by_event_name;
+"================== TRANSACTIONS_BY_HOST truncated =================="
+"================== Step 32 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/file/sql/query_log 0
+user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
+user2 localhost wait/io/file/sql/query_log 0
+user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
+user3 localhost wait/io/file/sql/query_log 0
+user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
+user4 localhost wait/io/file/sql/query_log 0
+user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+user2 wait/io/file/sql/query_log 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+user3 wait/io/file/sql/query_log 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+user4 wait/io/file/sql/query_log 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 32
+wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
+user1 localhost stage/sql/Opening tables 0
+user1 localhost stage/sql/starting 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
+user2 localhost stage/sql/Opening tables 0
+user2 localhost stage/sql/starting 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
+user3 localhost stage/sql/Opening tables 0
+user3 localhost stage/sql/starting 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
+user4 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/starting 0
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
+user1 stage/sql/Opening tables 0
+user1 stage/sql/starting 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
+user2 stage/sql/Opening tables 0
+user2 stage/sql/starting 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
+user3 stage/sql/Opening tables 0
+user3 stage/sql/starting 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
+user4 stage/sql/Opening tables 0
+user4 stage/sql/starting 0
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+stage/sql/starting 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 0
+user1 localhost statement/sp/freturn 0
user1 localhost statement/sql/insert 0
user1 localhost statement/sql/select 0
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 0
+user2 localhost statement/sp/freturn 0
user2 localhost statement/sql/insert 0
user2 localhost statement/sql/select 0
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 0
+user3 localhost statement/sp/freturn 0
user3 localhost statement/sql/insert 0
user3 localhost statement/sql/select 0
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 0
+user4 localhost statement/sp/freturn 0
user4 localhost statement/sql/insert 0
user4 localhost statement/sql/select 0
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 0
+user1 statement/sp/freturn 0
user1 statement/sql/insert 0
user1 statement/sql/select 0
user2 statement/com/Error 0
user2 statement/com/Quit 0
+user2 statement/sp/freturn 0
user2 statement/sql/insert 0
user2 statement/sql/select 0
user3 statement/com/Error 0
user3 statement/com/Quit 0
+user3 statement/sp/freturn 0
user3 statement/sql/insert 0
user3 statement/sql/select 0
user4 statement/com/Error 0
user4 statement/com/Quit 0
+user4 statement/sp/freturn 0
user4 statement/sql/insert 0
user4 statement/sql/select 0
execute dump_statements_host;
@@ -4805,13 +5852,232 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 0
statement/sql/insert 0
statement/sql/select 0
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 0
+user2 localhost transaction 0
+user3 localhost transaction 0
+user4 localhost transaction 0
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 0
+user2 transaction 0
+user3 transaction 0
+user4 transaction 0
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_transactions_summary_global_by_event_name;
+"================== TRANSACTIONS_GLOBAL truncated =================="
+"================== Step 33 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/file/sql/query_log 0
+user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
+user2 localhost wait/io/file/sql/query_log 0
+user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
+user3 localhost wait/io/file/sql/query_log 0
+user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
+user4 localhost wait/io/file/sql/query_log 0
+user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+user2 wait/io/file/sql/query_log 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+user3 wait/io/file/sql/query_log 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+user4 wait/io/file/sql/query_log 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 32
+wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
+user1 localhost stage/sql/Opening tables 0
+user1 localhost stage/sql/starting 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
+user2 localhost stage/sql/Opening tables 0
+user2 localhost stage/sql/starting 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
+user3 localhost stage/sql/Opening tables 0
+user3 localhost stage/sql/starting 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
+user4 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/starting 0
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
+user1 stage/sql/Opening tables 0
+user1 stage/sql/starting 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
+user2 stage/sql/Opening tables 0
+user2 stage/sql/starting 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
+user3 stage/sql/Opening tables 0
+user3 stage/sql/starting 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
+user4 stage/sql/Opening tables 0
+user4 stage/sql/starting 0
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+stage/sql/starting 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 0
+user1 localhost statement/sp/freturn 0
+user1 localhost statement/sql/insert 0
+user1 localhost statement/sql/select 0
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 0
+user2 localhost statement/sp/freturn 0
+user2 localhost statement/sql/insert 0
+user2 localhost statement/sql/select 0
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 0
+user3 localhost statement/sp/freturn 0
+user3 localhost statement/sql/insert 0
+user3 localhost statement/sql/select 0
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 0
+user4 localhost statement/sp/freturn 0
+user4 localhost statement/sql/insert 0
+user4 localhost statement/sql/select 0
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 0
+user1 statement/sp/freturn 0
+user1 statement/sql/insert 0
+user1 statement/sql/select 0
+user2 statement/com/Error 0
+user2 statement/com/Quit 0
+user2 statement/sp/freturn 0
+user2 statement/sql/insert 0
+user2 statement/sql/select 0
+user3 statement/com/Error 0
+user3 statement/com/Quit 0
+user3 statement/sp/freturn 0
+user3 statement/sql/insert 0
+user3 statement/sql/select 0
+user4 statement/com/Error 0
+user4 statement/com/Quit 0
+user4 statement/sp/freturn 0
+user4 statement/sql/insert 0
+user4 statement/sql/select 0
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sp/freturn 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sp/freturn 4
+statement/sql/insert 4
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 0
+user2 localhost transaction 0
+user3 localhost transaction 0
+user4 localhost transaction 0
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 0
+user2 transaction 0
+user3 transaction 0
+user4 transaction 0
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 0
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -4830,7 +6096,7 @@ execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
truncate performance_schema.accounts;
"================== ACCOUNTS truncated =================="
-"================== Step 29 =================="
+"================== Step 34 =================="
call dump_thread();
username status
user1 not found
@@ -4845,92 +6111,85 @@ user host event_name count_star
execute dump_waits_user;
user event_name count_star
user1 wait/io/file/sql/query_log 0
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
user1 wait/synch/rwlock/sql/LOCK_grant 0
user2 wait/io/file/sql/query_log 0
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
user2 wait/synch/rwlock/sql/LOCK_grant 0
user3 wait/io/file/sql/query_log 0
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
user3 wait/synch/rwlock/sql/LOCK_grant 0
user4 wait/io/file/sql/query_log 0
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
user4 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
execute dump_stages_user;
user event_name count_star
-user1 stage/sql/Checking permissions 0
-user1 stage/sql/Closing tables 0
-user1 stage/sql/Init 0
-user1 stage/sql/Init for update 0
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
user1 stage/sql/Opening tables 0
-user2 stage/sql/Checking permissions 0
-user2 stage/sql/Closing tables 0
-user2 stage/sql/Init 0
-user2 stage/sql/Init for update 0
+user1 stage/sql/starting 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
user2 stage/sql/Opening tables 0
-user3 stage/sql/Checking permissions 0
-user3 stage/sql/Closing tables 0
-user3 stage/sql/Init 0
-user3 stage/sql/Init for update 0
+user2 stage/sql/starting 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
user3 stage/sql/Opening tables 0
-user4 stage/sql/Checking permissions 0
-user4 stage/sql/Closing tables 0
-user4 stage/sql/Init 0
-user4 stage/sql/Init for update 0
+user3 stage/sql/starting 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
user4 stage/sql/Opening tables 0
+user4 stage/sql/starting 0
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
user event_name count_star
user1 statement/com/Error 0
user1 statement/com/Quit 0
+user1 statement/sp/freturn 0
user1 statement/sql/insert 0
user1 statement/sql/select 0
user2 statement/com/Error 0
user2 statement/com/Quit 0
+user2 statement/sp/freturn 0
user2 statement/sql/insert 0
user2 statement/sql/select 0
user3 statement/com/Error 0
user3 statement/com/Quit 0
+user3 statement/sp/freturn 0
user3 statement/sql/insert 0
user3 statement/sql/select 0
user4 statement/com/Error 0
user4 statement/com/Quit 0
+user4 statement/sp/freturn 0
user4 statement/sql/insert 0
user4 statement/sql/select 0
execute dump_statements_host;
@@ -4939,13 +6198,31 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 0
statement/sql/insert 0
statement/sql/select 0
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+user1 transaction 0
+user2 transaction 0
+user3 transaction 0
+user4 transaction 0
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 0
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -4960,7 +6237,7 @@ execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
truncate performance_schema.users;
"================== USERS truncated =================="
-"================== Step 30 =================="
+"================== Step 35 =================="
call dump_thread();
username status
user1 not found
@@ -4979,13 +6256,10 @@ host event_name count_star
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
@@ -4995,18 +6269,18 @@ execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -5017,13 +6291,27 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 0
statement/sql/insert 0
statement/sql/select 0
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 0
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -5034,7 +6322,7 @@ execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
truncate performance_schema.hosts;
"================== HOSTS truncated =================="
-"================== Step 31 =================="
+"================== Step 36 =================="
call dump_thread();
username status
user1 not found
@@ -5053,13 +6341,10 @@ host event_name count_star
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
@@ -5069,18 +6354,18 @@ execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -5091,13 +6376,27 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 0
statement/sql/insert 0
statement/sql/select 0
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 0
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
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 508a65d9ba0..618201d9b85 100644
--- a/mysql-test/suite/perfschema/r/event_aggregate_no_u.result
+++ b/mysql-test/suite/perfschema/r/event_aggregate_no_u.result
@@ -15,14 +15,10 @@ user event_name count_star
execute dump_waits_host;
host event_name count_star
localhost wait/io/file/sql/query_log 0
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
@@ -32,18 +28,18 @@ execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 0
-localhost stage/sql/Closing tables 0
-localhost stage/sql/Init 0
-localhost stage/sql/Init for update 0
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
localhost stage/sql/Opening tables 0
+localhost stage/sql/starting 0
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
execute dump_statements_account;
@@ -54,16 +50,30 @@ execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 0
+localhost statement/sp/freturn 0
localhost statement/sql/insert 0
localhost statement/sql/select 0
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 0
statement/sql/insert 0
statement/sql/select 0
execute dump_statements_history;
event_name count(event_name)
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 0
+execute dump_transactions_global;
+event_name count_star
+transaction 0
+execute dump_transactions_history;
+event_name count(event_name)
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -78,8 +88,6 @@ connection default;
call dump_thread();
username event_name count_star
user1 wait/io/file/sql/query_log 1
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
user1 wait/synch/rwlock/sql/LOCK_grant 0
username status
user2 not found
@@ -90,55 +98,50 @@ user4 not found
execute dump_waits_account;
user host event_name count_star
user1 localhost wait/io/file/sql/query_log 1
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_user;
user event_name count_star
execute dump_waits_host;
host event_name count_star
localhost wait/io/file/sql/query_log 1
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 1
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
wait/io/file/sql/query_log 1
execute dump_stages_account;
user host event_name count_star
-user1 localhost stage/sql/Checking permissions 0
-user1 localhost stage/sql/Closing tables 0
-user1 localhost stage/sql/Init 0
-user1 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
user1 localhost stage/sql/Opening tables 0
+user1 localhost stage/sql/starting 0
execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 0
-localhost stage/sql/Closing tables 0
-localhost stage/sql/Init 0
-localhost stage/sql/Init for update 0
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
localhost stage/sql/Opening tables 0
+localhost stage/sql/starting 0
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 0
+user1 localhost statement/sp/freturn 0
user1 localhost statement/sql/insert 0
user1 localhost statement/sql/select 0
execute dump_statements_user;
@@ -147,16 +150,31 @@ execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 0
+localhost statement/sp/freturn 0
localhost statement/sql/insert 0
localhost statement/sql/select 0
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 0
statement/sql/insert 0
statement/sql/select 0
execute dump_statements_history;
event_name count(event_name)
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 0
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 0
+execute dump_transactions_global;
+event_name count_star
+transaction 0
+execute dump_transactions_history;
+event_name count(event_name)
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -167,20 +185,23 @@ execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 2 2
connection con1;
-select get_lock("marker", 10);
-get_lock("marker", 10)
+select uuid_short() <> 1;
+uuid_short() <> 1
1
-select release_lock("marker");
-release_lock("marker")
+select uuid_short() <> 1;
+uuid_short() <> 1
1
+start transaction;
insert into test.t1 values ("marker");
+commit;
+select test.f(10,20);
+test.f(10,20)
+30
connection default;
"================== Step 3 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
username status
user2 not found
@@ -190,82 +211,94 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/file/sql/query_log 4
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user1 localhost wait/io/file/sql/query_log 7
user1 localhost wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_user;
user event_name count_star
execute dump_waits_host;
host event_name count_star
-localhost wait/io/file/sql/query_log 4
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/io/file/sql/query_log 7
localhost wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 4
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 7
wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 4
+wait/io/file/sql/query_log 7
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 6
-user1 localhost stage/sql/Init 5
-user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 4
+user1 localhost stage/sql/checking permissions 4
+user1 localhost stage/sql/closing tables 11
+user1 localhost stage/sql/init 3
+user1 localhost stage/sql/Opening tables 7
+user1 localhost stage/sql/starting 6
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 6
-localhost stage/sql/Init 5
-localhost stage/sql/Init for update 1
-localhost stage/sql/Opening tables 4
+localhost stage/sql/checking permissions 4
+localhost stage/sql/closing tables 11
+localhost stage/sql/init 3
+localhost stage/sql/Opening tables 7
+localhost stage/sql/starting 6
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 3
-stage/sql/Closing tables 6
-stage/sql/Init 5
-stage/sql/Init for update 1
-stage/sql/Opening tables 4
+stage/sql/checking permissions 4
+stage/sql/closing tables 11
+stage/sql/init 3
+stage/sql/Opening tables 7
+stage/sql/starting 6
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 3
-stage/sql/Closing tables 6
-stage/sql/Init 5
-stage/sql/Init for update 1
-stage/sql/Opening tables 4
+stage/sql/checking permissions 4
+stage/sql/closing tables 11
+stage/sql/init 3
+stage/sql/Opening tables 7
+stage/sql/starting 6
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 0
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
execute dump_statements_user;
user event_name count_star
execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 0
+localhost statement/sp/freturn 1
localhost statement/sql/insert 1
-localhost statement/sql/select 2
+localhost statement/sql/select 3
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 1
statement/sql/insert 1
-statement/sql/select 2
+statement/sql/select 3
execute dump_statements_history;
event_name count(event_name)
+statement/sp/freturn 1
statement/sql/insert 1
-statement/sql/select 2
+statement/sql/select 3
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 2
+execute dump_transactions_global;
+event_name count_star
+transaction 2
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 2
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -280,14 +313,10 @@ connection default;
"================== Step 4 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
user2 wait/io/file/sql/query_log 1
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
user2 wait/synch/rwlock/sql/LOCK_grant 0
username status
user3 not found
@@ -295,75 +324,69 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/file/sql/query_log 4
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user1 localhost wait/io/file/sql/query_log 7
user1 localhost wait/synch/rwlock/sql/LOCK_grant 1
user2 localhost wait/io/file/sql/query_log 1
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_user;
user event_name count_star
execute dump_waits_host;
host event_name count_star
-localhost wait/io/file/sql/query_log 5
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/io/file/sql/query_log 8
localhost wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 5
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 8
wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 5
+wait/io/file/sql/query_log 8
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 6
-user1 localhost stage/sql/Init 5
-user1 localhost stage/sql/Init for update 1
-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
-user2 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/checking permissions 4
+user1 localhost stage/sql/closing tables 11
+user1 localhost stage/sql/init 3
+user1 localhost stage/sql/Opening tables 7
+user1 localhost stage/sql/starting 6
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
user2 localhost stage/sql/Opening tables 0
+user2 localhost stage/sql/starting 0
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 6
-localhost stage/sql/Init 5
-localhost stage/sql/Init for update 1
-localhost stage/sql/Opening tables 4
+localhost stage/sql/checking permissions 4
+localhost stage/sql/closing tables 11
+localhost stage/sql/init 3
+localhost stage/sql/Opening tables 7
+localhost stage/sql/starting 6
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 3
-stage/sql/Closing tables 6
-stage/sql/Init 5
-stage/sql/Init for update 1
-stage/sql/Opening tables 4
+stage/sql/checking permissions 4
+stage/sql/closing tables 11
+stage/sql/init 3
+stage/sql/Opening tables 7
+stage/sql/starting 6
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 3
-stage/sql/Closing tables 6
-stage/sql/Init 5
-stage/sql/Init for update 1
-stage/sql/Opening tables 4
+stage/sql/checking permissions 4
+stage/sql/closing tables 11
+stage/sql/init 3
+stage/sql/Opening tables 7
+stage/sql/starting 6
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 0
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 0
+user2 localhost statement/sp/freturn 0
user2 localhost statement/sql/insert 0
user2 localhost statement/sql/select 0
execute dump_statements_user;
@@ -372,18 +395,36 @@ execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 0
+localhost statement/sp/freturn 1
localhost statement/sql/insert 1
-localhost statement/sql/select 2
+localhost statement/sql/select 3
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 1
statement/sql/insert 1
-statement/sql/select 2
+statement/sql/select 3
execute dump_statements_history;
event_name count(event_name)
+statement/sp/freturn 1
statement/sql/insert 1
-statement/sql/select 2
+statement/sql/select 3
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 0
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 2
+execute dump_transactions_global;
+event_name count_star
+transaction 2
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 2
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -395,25 +436,26 @@ execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 3 3
connection con2;
-select get_lock("marker", 10);
-get_lock("marker", 10)
+select uuid_short() <> 1;
+uuid_short() <> 1
1
-select release_lock("marker");
-release_lock("marker")
+select uuid_short() <> 1;
+uuid_short() <> 1
1
+start transaction;
insert into test.t1 values ("marker");
+commit;
+select test.f(10,20);
+test.f(10,20)
+30
connection default;
"================== Step 5 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user2 wait/io/file/sql/query_log 4
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 7
user2 wait/synch/rwlock/sql/LOCK_grant 1
username status
user3 not found
@@ -421,95 +463,107 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/file/sql/query_log 4
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user1 localhost wait/io/file/sql/query_log 7
user1 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user2 localhost wait/io/file/sql/query_log 4
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user2 localhost wait/io/file/sql/query_log 7
user2 localhost wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_user;
user event_name count_star
execute dump_waits_host;
host event_name count_star
-localhost wait/io/file/sql/query_log 8
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/io/file/sql/query_log 14
localhost wait/synch/rwlock/sql/LOCK_grant 2
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 8
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 14
wait/synch/rwlock/sql/LOCK_grant 2
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 8
+wait/io/file/sql/query_log 14
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 6
-user1 localhost stage/sql/Init 5
-user1 localhost stage/sql/Init for update 1
-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
-user2 localhost stage/sql/Init for update 1
-user2 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/checking permissions 4
+user1 localhost stage/sql/closing tables 11
+user1 localhost stage/sql/init 3
+user1 localhost stage/sql/Opening tables 7
+user1 localhost stage/sql/starting 6
+user2 localhost stage/sql/checking permissions 4
+user2 localhost stage/sql/closing tables 10
+user2 localhost stage/sql/init 3
+user2 localhost stage/sql/Opening tables 6
+user2 localhost stage/sql/starting 6
execute dump_stages_user;
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 10
-localhost stage/sql/Init 10
-localhost stage/sql/Init for update 2
-localhost stage/sql/Opening tables 7
+localhost stage/sql/checking permissions 8
+localhost stage/sql/closing tables 21
+localhost stage/sql/init 6
+localhost stage/sql/Opening tables 13
+localhost stage/sql/starting 12
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 6
-stage/sql/Closing tables 10
-stage/sql/Init 10
-stage/sql/Init for update 2
-stage/sql/Opening tables 7
+stage/sql/checking permissions 8
+stage/sql/closing tables 21
+stage/sql/init 6
+stage/sql/Opening tables 13
+stage/sql/starting 12
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 6
-stage/sql/Closing tables 10
-stage/sql/Init 10
-stage/sql/Init for update 2
-stage/sql/Opening tables 7
+stage/sql/checking permissions 8
+stage/sql/closing tables 21
+stage/sql/init 6
+stage/sql/Opening tables 13
+stage/sql/starting 12
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 0
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 0
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
execute dump_statements_user;
user event_name count_star
execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 0
+localhost statement/sp/freturn 2
localhost statement/sql/insert 2
-localhost statement/sql/select 4
+localhost statement/sql/select 6
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 2
statement/sql/insert 2
-statement/sql/select 4
+statement/sql/select 6
execute dump_statements_history;
event_name count(event_name)
+statement/sp/freturn 2
statement/sql/insert 2
-statement/sql/select 4
+statement/sql/select 6
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 4
+execute dump_transactions_global;
+event_name count_star
+transaction 4
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 4
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -525,106 +579,93 @@ connection default;
"================== Step 6 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user2 wait/io/file/sql/query_log 4
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 7
user2 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
user3 wait/io/file/sql/query_log 1
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
user3 wait/synch/rwlock/sql/LOCK_grant 0
username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/file/sql/query_log 4
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user1 localhost wait/io/file/sql/query_log 7
user1 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user2 localhost wait/io/file/sql/query_log 4
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user2 localhost wait/io/file/sql/query_log 7
user2 localhost wait/synch/rwlock/sql/LOCK_grant 1
user3 localhost wait/io/file/sql/query_log 1
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_user;
user event_name count_star
execute dump_waits_host;
host event_name count_star
-localhost wait/io/file/sql/query_log 9
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/io/file/sql/query_log 15
localhost wait/synch/rwlock/sql/LOCK_grant 2
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 9
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 15
wait/synch/rwlock/sql/LOCK_grant 2
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 9
+wait/io/file/sql/query_log 15
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 6
-user1 localhost stage/sql/Init 5
-user1 localhost stage/sql/Init for update 1
-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
-user2 localhost stage/sql/Init for update 1
-user2 localhost stage/sql/Opening tables 3
-user3 localhost stage/sql/Checking permissions 0
-user3 localhost stage/sql/Closing tables 0
-user3 localhost stage/sql/Init 0
-user3 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/checking permissions 4
+user1 localhost stage/sql/closing tables 11
+user1 localhost stage/sql/init 3
+user1 localhost stage/sql/Opening tables 7
+user1 localhost stage/sql/starting 6
+user2 localhost stage/sql/checking permissions 4
+user2 localhost stage/sql/closing tables 10
+user2 localhost stage/sql/init 3
+user2 localhost stage/sql/Opening tables 6
+user2 localhost stage/sql/starting 6
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
user3 localhost stage/sql/Opening tables 0
+user3 localhost stage/sql/starting 0
execute dump_stages_user;
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 10
-localhost stage/sql/Init 10
-localhost stage/sql/Init for update 2
-localhost stage/sql/Opening tables 7
+localhost stage/sql/checking permissions 8
+localhost stage/sql/closing tables 21
+localhost stage/sql/init 6
+localhost stage/sql/Opening tables 13
+localhost stage/sql/starting 12
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 6
-stage/sql/Closing tables 10
-stage/sql/Init 10
-stage/sql/Init for update 2
-stage/sql/Opening tables 7
+stage/sql/checking permissions 8
+stage/sql/closing tables 21
+stage/sql/init 6
+stage/sql/Opening tables 13
+stage/sql/starting 12
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 6
-stage/sql/Closing tables 10
-stage/sql/Init 10
-stage/sql/Init for update 2
-stage/sql/Opening tables 7
+stage/sql/checking permissions 8
+stage/sql/closing tables 21
+stage/sql/init 6
+stage/sql/Opening tables 13
+stage/sql/starting 12
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 0
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 0
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 0
+user3 localhost statement/sp/freturn 0
user3 localhost statement/sql/insert 0
user3 localhost statement/sql/select 0
execute dump_statements_user;
@@ -633,18 +674,37 @@ execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 0
+localhost statement/sp/freturn 2
localhost statement/sql/insert 2
-localhost statement/sql/select 4
+localhost statement/sql/select 6
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 2
statement/sql/insert 2
-statement/sql/select 4
+statement/sql/select 6
execute dump_statements_history;
event_name count(event_name)
+statement/sp/freturn 2
statement/sql/insert 2
-statement/sql/select 4
+statement/sql/select 6
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 0
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 4
+execute dump_transactions_global;
+event_name count_star
+transaction 4
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 4
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -657,137 +717,148 @@ execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 4 4
connection con3;
-select get_lock("marker", 10);
-get_lock("marker", 10)
+select uuid_short() <> 1;
+uuid_short() <> 1
1
-select release_lock("marker");
-release_lock("marker")
+select uuid_short() <> 1;
+uuid_short() <> 1
1
+start transaction;
insert into test.t1 values ("marker");
+commit;
+select test.f(10,20);
+test.f(10,20)
+30
connection default;
"================== Step 7 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user2 wait/io/file/sql/query_log 4
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 7
user2 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user3 wait/io/file/sql/query_log 4
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/io/file/sql/query_log 7
user3 wait/synch/rwlock/sql/LOCK_grant 1
username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/file/sql/query_log 4
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user1 localhost wait/io/file/sql/query_log 7
user1 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user2 localhost wait/io/file/sql/query_log 4
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user2 localhost wait/io/file/sql/query_log 7
user2 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user3 localhost wait/io/file/sql/query_log 4
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user3 localhost wait/io/file/sql/query_log 7
user3 localhost wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_user;
user event_name count_star
execute dump_waits_host;
host event_name count_star
-localhost wait/io/file/sql/query_log 12
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/io/file/sql/query_log 21
localhost wait/synch/rwlock/sql/LOCK_grant 3
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 12
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 21
wait/synch/rwlock/sql/LOCK_grant 3
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 12
+wait/io/file/sql/query_log 21
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 6
-user1 localhost stage/sql/Init 5
-user1 localhost stage/sql/Init for update 1
-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
-user2 localhost stage/sql/Init for update 1
-user2 localhost stage/sql/Opening tables 3
-user3 localhost stage/sql/Checking permissions 3
-user3 localhost stage/sql/Closing tables 4
-user3 localhost stage/sql/Init 5
-user3 localhost stage/sql/Init for update 1
-user3 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/checking permissions 4
+user1 localhost stage/sql/closing tables 11
+user1 localhost stage/sql/init 3
+user1 localhost stage/sql/Opening tables 7
+user1 localhost stage/sql/starting 6
+user2 localhost stage/sql/checking permissions 4
+user2 localhost stage/sql/closing tables 10
+user2 localhost stage/sql/init 3
+user2 localhost stage/sql/Opening tables 6
+user2 localhost stage/sql/starting 6
+user3 localhost stage/sql/checking permissions 4
+user3 localhost stage/sql/closing tables 10
+user3 localhost stage/sql/init 3
+user3 localhost stage/sql/Opening tables 6
+user3 localhost stage/sql/starting 6
execute dump_stages_user;
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 14
-localhost stage/sql/Init 15
-localhost stage/sql/Init for update 3
-localhost stage/sql/Opening tables 10
+localhost stage/sql/checking permissions 12
+localhost stage/sql/closing tables 31
+localhost stage/sql/init 9
+localhost stage/sql/Opening tables 19
+localhost stage/sql/starting 18
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 9
-stage/sql/Closing tables 14
-stage/sql/Init 15
-stage/sql/Init for update 3
-stage/sql/Opening tables 10
+stage/sql/checking permissions 12
+stage/sql/closing tables 31
+stage/sql/init 9
+stage/sql/Opening tables 19
+stage/sql/starting 18
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 9
-stage/sql/Closing tables 14
-stage/sql/Init 15
-stage/sql/Init for update 3
-stage/sql/Opening tables 10
+stage/sql/checking permissions 12
+stage/sql/closing tables 31
+stage/sql/init 9
+stage/sql/Opening tables 19
+stage/sql/starting 18
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 0
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 0
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 0
+user3 localhost statement/sp/freturn 1
user3 localhost statement/sql/insert 1
-user3 localhost statement/sql/select 2
+user3 localhost statement/sql/select 3
execute dump_statements_user;
user event_name count_star
execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 0
+localhost statement/sp/freturn 3
localhost statement/sql/insert 3
-localhost statement/sql/select 6
+localhost statement/sql/select 9
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 3
statement/sql/insert 3
-statement/sql/select 6
+statement/sql/select 9
execute dump_statements_history;
event_name count(event_name)
+statement/sp/freturn 3
statement/sql/insert 3
-statement/sql/select 6
+statement/sql/select 9
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 6
+execute dump_transactions_global;
+event_name count_star
+transaction 6
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 6
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -804,122 +875,106 @@ connection default;
"================== Step 8 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user2 wait/io/file/sql/query_log 4
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 7
user2 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user3 wait/io/file/sql/query_log 4
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/io/file/sql/query_log 7
user3 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
user4 wait/io/file/sql/query_log 1
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
user4 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/file/sql/query_log 4
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user1 localhost wait/io/file/sql/query_log 7
user1 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user2 localhost wait/io/file/sql/query_log 4
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user2 localhost wait/io/file/sql/query_log 7
user2 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user3 localhost wait/io/file/sql/query_log 4
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user3 localhost wait/io/file/sql/query_log 7
user3 localhost wait/synch/rwlock/sql/LOCK_grant 1
user4 localhost wait/io/file/sql/query_log 1
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_user;
user event_name count_star
execute dump_waits_host;
host event_name count_star
-localhost wait/io/file/sql/query_log 13
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/io/file/sql/query_log 22
localhost wait/synch/rwlock/sql/LOCK_grant 3
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 13
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 22
wait/synch/rwlock/sql/LOCK_grant 3
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 13
+wait/io/file/sql/query_log 22
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 6
-user1 localhost stage/sql/Init 5
-user1 localhost stage/sql/Init for update 1
-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
-user2 localhost stage/sql/Init for update 1
-user2 localhost stage/sql/Opening tables 3
-user3 localhost stage/sql/Checking permissions 3
-user3 localhost stage/sql/Closing tables 4
-user3 localhost stage/sql/Init 5
-user3 localhost stage/sql/Init for update 1
-user3 localhost stage/sql/Opening tables 3
-user4 localhost stage/sql/Checking permissions 0
-user4 localhost stage/sql/Closing tables 0
-user4 localhost stage/sql/Init 0
-user4 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/checking permissions 4
+user1 localhost stage/sql/closing tables 11
+user1 localhost stage/sql/init 3
+user1 localhost stage/sql/Opening tables 7
+user1 localhost stage/sql/starting 6
+user2 localhost stage/sql/checking permissions 4
+user2 localhost stage/sql/closing tables 10
+user2 localhost stage/sql/init 3
+user2 localhost stage/sql/Opening tables 6
+user2 localhost stage/sql/starting 6
+user3 localhost stage/sql/checking permissions 4
+user3 localhost stage/sql/closing tables 10
+user3 localhost stage/sql/init 3
+user3 localhost stage/sql/Opening tables 6
+user3 localhost stage/sql/starting 6
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
user4 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/starting 0
execute dump_stages_user;
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 14
-localhost stage/sql/Init 15
-localhost stage/sql/Init for update 3
-localhost stage/sql/Opening tables 10
+localhost stage/sql/checking permissions 12
+localhost stage/sql/closing tables 31
+localhost stage/sql/init 9
+localhost stage/sql/Opening tables 19
+localhost stage/sql/starting 18
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 9
-stage/sql/Closing tables 14
-stage/sql/Init 15
-stage/sql/Init for update 3
-stage/sql/Opening tables 10
+stage/sql/checking permissions 12
+stage/sql/closing tables 31
+stage/sql/init 9
+stage/sql/Opening tables 19
+stage/sql/starting 18
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 9
-stage/sql/Closing tables 14
-stage/sql/Init 15
-stage/sql/Init for update 3
-stage/sql/Opening tables 10
+stage/sql/checking permissions 12
+stage/sql/closing tables 31
+stage/sql/init 9
+stage/sql/Opening tables 19
+stage/sql/starting 18
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 0
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 0
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 0
+user3 localhost statement/sp/freturn 1
user3 localhost statement/sql/insert 1
-user3 localhost statement/sql/select 2
+user3 localhost statement/sql/select 3
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 0
+user4 localhost statement/sp/freturn 0
user4 localhost statement/sql/insert 0
user4 localhost statement/sql/select 0
execute dump_statements_user;
@@ -928,18 +983,38 @@ execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 0
+localhost statement/sp/freturn 3
localhost statement/sql/insert 3
-localhost statement/sql/select 6
+localhost statement/sql/select 9
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 3
statement/sql/insert 3
-statement/sql/select 6
+statement/sql/select 9
execute dump_statements_history;
event_name count(event_name)
+statement/sp/freturn 3
statement/sql/insert 3
-statement/sql/select 6
+statement/sql/select 9
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 0
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 6
+execute dump_transactions_global;
+event_name count_star
+transaction 6
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 6
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -953,153 +1028,162 @@ execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 5 5
connection con4;
-select get_lock("marker", 10);
-get_lock("marker", 10)
+select uuid_short() <> 1;
+uuid_short() <> 1
1
-select release_lock("marker");
-release_lock("marker")
+select uuid_short() <> 1;
+uuid_short() <> 1
1
+start transaction;
insert into test.t1 values ("marker");
+commit;
+select test.f(10,20);
+test.f(10,20)
+30
connection default;
"================== Step 9 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user2 wait/io/file/sql/query_log 4
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 7
user2 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user3 wait/io/file/sql/query_log 4
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/io/file/sql/query_log 7
user3 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user4 wait/io/file/sql/query_log 4
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/io/file/sql/query_log 7
user4 wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/file/sql/query_log 4
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user1 localhost wait/io/file/sql/query_log 7
user1 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user2 localhost wait/io/file/sql/query_log 4
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user2 localhost wait/io/file/sql/query_log 7
user2 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user3 localhost wait/io/file/sql/query_log 4
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user3 localhost wait/io/file/sql/query_log 7
user3 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user4 localhost wait/io/file/sql/query_log 4
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user4 localhost wait/io/file/sql/query_log 7
user4 localhost wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_user;
user event_name count_star
execute dump_waits_host;
host event_name count_star
-localhost wait/io/file/sql/query_log 16
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/io/file/sql/query_log 28
localhost wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 16
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 28
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 16
+wait/io/file/sql/query_log 28
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 6
-user1 localhost stage/sql/Init 5
-user1 localhost stage/sql/Init for update 1
-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
-user2 localhost stage/sql/Init for update 1
-user2 localhost stage/sql/Opening tables 3
-user3 localhost stage/sql/Checking permissions 3
-user3 localhost stage/sql/Closing tables 4
-user3 localhost stage/sql/Init 5
-user3 localhost stage/sql/Init for update 1
-user3 localhost stage/sql/Opening tables 3
-user4 localhost stage/sql/Checking permissions 3
-user4 localhost stage/sql/Closing tables 4
-user4 localhost stage/sql/Init 5
-user4 localhost stage/sql/Init for update 1
-user4 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/checking permissions 4
+user1 localhost stage/sql/closing tables 11
+user1 localhost stage/sql/init 3
+user1 localhost stage/sql/Opening tables 7
+user1 localhost stage/sql/starting 6
+user2 localhost stage/sql/checking permissions 4
+user2 localhost stage/sql/closing tables 10
+user2 localhost stage/sql/init 3
+user2 localhost stage/sql/Opening tables 6
+user2 localhost stage/sql/starting 6
+user3 localhost stage/sql/checking permissions 4
+user3 localhost stage/sql/closing tables 10
+user3 localhost stage/sql/init 3
+user3 localhost stage/sql/Opening tables 6
+user3 localhost stage/sql/starting 6
+user4 localhost stage/sql/checking permissions 4
+user4 localhost stage/sql/closing tables 10
+user4 localhost stage/sql/init 3
+user4 localhost stage/sql/Opening tables 6
+user4 localhost stage/sql/starting 6
execute dump_stages_user;
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 18
-localhost stage/sql/Init 20
-localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 13
+localhost stage/sql/checking permissions 16
+localhost stage/sql/closing tables 41
+localhost stage/sql/init 12
+localhost stage/sql/Opening tables 25
+localhost stage/sql/starting 24
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 20
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 24
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 20
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 24
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 0
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 0
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 0
+user3 localhost statement/sp/freturn 1
user3 localhost statement/sql/insert 1
-user3 localhost statement/sql/select 2
+user3 localhost statement/sql/select 3
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 0
+user4 localhost statement/sp/freturn 1
user4 localhost statement/sql/insert 1
-user4 localhost statement/sql/select 2
+user4 localhost statement/sql/select 3
execute dump_statements_user;
user event_name count_star
execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 0
+localhost statement/sp/freturn 4
localhost statement/sql/insert 4
-localhost statement/sql/select 8
+localhost statement/sql/select 12
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -1119,139 +1203,144 @@ call dump_thread();
username status
user1 not found
username event_name count_star
-user2 wait/io/file/sql/query_log 4
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 7
user2 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user3 wait/io/file/sql/query_log 4
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/io/file/sql/query_log 7
user3 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user4 wait/io/file/sql/query_log 4
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/io/file/sql/query_log 7
user4 wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/file/sql/query_log 5
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 1
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user1 localhost wait/io/file/sql/query_log 8
user1 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user2 localhost wait/io/file/sql/query_log 4
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user2 localhost wait/io/file/sql/query_log 7
user2 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user3 localhost wait/io/file/sql/query_log 4
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user3 localhost wait/io/file/sql/query_log 7
user3 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user4 localhost wait/io/file/sql/query_log 4
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user4 localhost wait/io/file/sql/query_log 7
user4 localhost wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_user;
user event_name count_star
execute dump_waits_host;
host event_name count_star
-localhost wait/io/file/sql/query_log 17
-localhost wait/synch/mutex/sql/LOCK_connection_count 1
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/io/file/sql/query_log 29
localhost wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 17
-wait/synch/mutex/sql/LOCK_connection_count 1
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 29
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 17
-wait/synch/mutex/sql/LOCK_connection_count 1
+wait/io/file/sql/query_log 29
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 6
-user1 localhost stage/sql/Init 6
-user1 localhost stage/sql/Init for update 1
-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
-user2 localhost stage/sql/Init for update 1
-user2 localhost stage/sql/Opening tables 3
-user3 localhost stage/sql/Checking permissions 3
-user3 localhost stage/sql/Closing tables 4
-user3 localhost stage/sql/Init 5
-user3 localhost stage/sql/Init for update 1
-user3 localhost stage/sql/Opening tables 3
-user4 localhost stage/sql/Checking permissions 3
-user4 localhost stage/sql/Closing tables 4
-user4 localhost stage/sql/Init 5
-user4 localhost stage/sql/Init for update 1
-user4 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/checking permissions 4
+user1 localhost stage/sql/closing tables 11
+user1 localhost stage/sql/init 3
+user1 localhost stage/sql/Opening tables 7
+user1 localhost stage/sql/starting 7
+user2 localhost stage/sql/checking permissions 4
+user2 localhost stage/sql/closing tables 10
+user2 localhost stage/sql/init 3
+user2 localhost stage/sql/Opening tables 6
+user2 localhost stage/sql/starting 6
+user3 localhost stage/sql/checking permissions 4
+user3 localhost stage/sql/closing tables 10
+user3 localhost stage/sql/init 3
+user3 localhost stage/sql/Opening tables 6
+user3 localhost stage/sql/starting 6
+user4 localhost stage/sql/checking permissions 4
+user4 localhost stage/sql/closing tables 10
+user4 localhost stage/sql/init 3
+user4 localhost stage/sql/Opening tables 6
+user4 localhost stage/sql/starting 6
execute dump_stages_user;
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 18
-localhost stage/sql/Init 21
-localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 13
+localhost stage/sql/checking permissions 16
+localhost stage/sql/closing tables 41
+localhost stage/sql/init 12
+localhost stage/sql/Opening tables 25
+localhost stage/sql/starting 25
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 21
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 25
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 21
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 25
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 1
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 0
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 0
+user3 localhost statement/sp/freturn 1
user3 localhost statement/sql/insert 1
-user3 localhost statement/sql/select 2
+user3 localhost statement/sql/select 3
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 0
+user4 localhost statement/sp/freturn 1
user4 localhost statement/sql/insert 1
-user4 localhost statement/sql/select 2
+user4 localhost statement/sql/select 3
execute dump_statements_user;
user event_name count_star
execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 1
+localhost statement/sp/freturn 4
localhost statement/sql/insert 4
-localhost statement/sql/select 8
+localhost statement/sql/select 12
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 1
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 1
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -1273,134 +1362,141 @@ user1 not found
username status
user2 not found
username event_name count_star
-user3 wait/io/file/sql/query_log 4
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/io/file/sql/query_log 7
user3 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user4 wait/io/file/sql/query_log 4
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/io/file/sql/query_log 7
user4 wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/file/sql/query_log 5
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 1
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user1 localhost wait/io/file/sql/query_log 8
user1 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user2 localhost wait/io/file/sql/query_log 5
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 1
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user2 localhost wait/io/file/sql/query_log 8
user2 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user3 localhost wait/io/file/sql/query_log 4
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user3 localhost wait/io/file/sql/query_log 7
user3 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user4 localhost wait/io/file/sql/query_log 4
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user4 localhost wait/io/file/sql/query_log 7
user4 localhost wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_user;
user event_name count_star
execute dump_waits_host;
host event_name count_star
-localhost wait/io/file/sql/query_log 18
-localhost wait/synch/mutex/sql/LOCK_connection_count 2
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/io/file/sql/query_log 30
localhost wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 18
-wait/synch/mutex/sql/LOCK_connection_count 2
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 30
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 18
-wait/synch/mutex/sql/LOCK_connection_count 2
+wait/io/file/sql/query_log 30
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 6
-user1 localhost stage/sql/Init 6
-user1 localhost stage/sql/Init for update 1
-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
-user2 localhost stage/sql/Init for update 1
-user2 localhost stage/sql/Opening tables 3
-user3 localhost stage/sql/Checking permissions 3
-user3 localhost stage/sql/Closing tables 4
-user3 localhost stage/sql/Init 5
-user3 localhost stage/sql/Init for update 1
-user3 localhost stage/sql/Opening tables 3
-user4 localhost stage/sql/Checking permissions 3
-user4 localhost stage/sql/Closing tables 4
-user4 localhost stage/sql/Init 5
-user4 localhost stage/sql/Init for update 1
-user4 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/checking permissions 4
+user1 localhost stage/sql/closing tables 11
+user1 localhost stage/sql/init 3
+user1 localhost stage/sql/Opening tables 7
+user1 localhost stage/sql/starting 7
+user2 localhost stage/sql/checking permissions 4
+user2 localhost stage/sql/closing tables 10
+user2 localhost stage/sql/init 3
+user2 localhost stage/sql/Opening tables 6
+user2 localhost stage/sql/starting 7
+user3 localhost stage/sql/checking permissions 4
+user3 localhost stage/sql/closing tables 10
+user3 localhost stage/sql/init 3
+user3 localhost stage/sql/Opening tables 6
+user3 localhost stage/sql/starting 6
+user4 localhost stage/sql/checking permissions 4
+user4 localhost stage/sql/closing tables 10
+user4 localhost stage/sql/init 3
+user4 localhost stage/sql/Opening tables 6
+user4 localhost stage/sql/starting 6
execute dump_stages_user;
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 18
-localhost stage/sql/Init 22
-localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 13
+localhost stage/sql/checking permissions 16
+localhost stage/sql/closing tables 41
+localhost stage/sql/init 12
+localhost stage/sql/Opening tables 25
+localhost stage/sql/starting 26
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 22
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 26
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 22
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 26
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 1
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 1
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 0
+user3 localhost statement/sp/freturn 1
user3 localhost statement/sql/insert 1
-user3 localhost statement/sql/select 2
+user3 localhost statement/sql/select 3
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 0
+user4 localhost statement/sp/freturn 1
user4 localhost statement/sql/insert 1
-user4 localhost statement/sql/select 2
+user4 localhost statement/sql/select 3
execute dump_statements_user;
user event_name count_star
execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 2
+localhost statement/sp/freturn 4
localhost statement/sql/insert 4
-localhost statement/sql/select 8
+localhost statement/sql/select 12
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 2
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 2
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -1424,129 +1520,138 @@ user2 not found
username status
user3 not found
username event_name count_star
-user4 wait/io/file/sql/query_log 4
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/io/file/sql/query_log 7
user4 wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/file/sql/query_log 5
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 1
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user1 localhost wait/io/file/sql/query_log 8
user1 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user2 localhost wait/io/file/sql/query_log 5
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 1
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user2 localhost wait/io/file/sql/query_log 8
user2 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user3 localhost wait/io/file/sql/query_log 5
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 1
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user3 localhost wait/io/file/sql/query_log 8
user3 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user4 localhost wait/io/file/sql/query_log 4
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user4 localhost wait/io/file/sql/query_log 7
user4 localhost wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_user;
user event_name count_star
execute dump_waits_host;
host event_name count_star
-localhost wait/io/file/sql/query_log 19
-localhost wait/synch/mutex/sql/LOCK_connection_count 3
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/io/file/sql/query_log 31
localhost wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 19
-wait/synch/mutex/sql/LOCK_connection_count 3
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 31
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 19
-wait/synch/mutex/sql/LOCK_connection_count 3
+wait/io/file/sql/query_log 31
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 6
-user1 localhost stage/sql/Init 6
-user1 localhost stage/sql/Init for update 1
-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
-user2 localhost stage/sql/Init for update 1
-user2 localhost stage/sql/Opening tables 3
-user3 localhost stage/sql/Checking permissions 3
-user3 localhost stage/sql/Closing tables 4
-user3 localhost stage/sql/Init 6
-user3 localhost stage/sql/Init for update 1
-user3 localhost stage/sql/Opening tables 3
-user4 localhost stage/sql/Checking permissions 3
-user4 localhost stage/sql/Closing tables 4
-user4 localhost stage/sql/Init 5
-user4 localhost stage/sql/Init for update 1
-user4 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/checking permissions 4
+user1 localhost stage/sql/closing tables 11
+user1 localhost stage/sql/init 3
+user1 localhost stage/sql/Opening tables 7
+user1 localhost stage/sql/starting 7
+user2 localhost stage/sql/checking permissions 4
+user2 localhost stage/sql/closing tables 10
+user2 localhost stage/sql/init 3
+user2 localhost stage/sql/Opening tables 6
+user2 localhost stage/sql/starting 7
+user3 localhost stage/sql/checking permissions 4
+user3 localhost stage/sql/closing tables 10
+user3 localhost stage/sql/init 3
+user3 localhost stage/sql/Opening tables 6
+user3 localhost stage/sql/starting 7
+user4 localhost stage/sql/checking permissions 4
+user4 localhost stage/sql/closing tables 10
+user4 localhost stage/sql/init 3
+user4 localhost stage/sql/Opening tables 6
+user4 localhost stage/sql/starting 6
execute dump_stages_user;
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 18
-localhost stage/sql/Init 23
-localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 13
+localhost stage/sql/checking permissions 16
+localhost stage/sql/closing tables 41
+localhost stage/sql/init 12
+localhost stage/sql/Opening tables 25
+localhost stage/sql/starting 27
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 23
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 27
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 23
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 27
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 1
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 1
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 1
+user3 localhost statement/sp/freturn 1
user3 localhost statement/sql/insert 1
-user3 localhost statement/sql/select 2
+user3 localhost statement/sql/select 3
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 0
+user4 localhost statement/sp/freturn 1
user4 localhost statement/sql/insert 1
-user4 localhost statement/sql/select 2
+user4 localhost statement/sql/select 3
execute dump_statements_user;
user event_name count_star
execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 3
+localhost statement/sp/freturn 4
localhost statement/sql/insert 4
-localhost statement/sql/select 8
+localhost statement/sql/select 12
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 3
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 3
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -1573,123 +1678,134 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/file/sql/query_log 5
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 1
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user1 localhost wait/io/file/sql/query_log 8
user1 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user2 localhost wait/io/file/sql/query_log 5
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 1
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user2 localhost wait/io/file/sql/query_log 8
user2 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user3 localhost wait/io/file/sql/query_log 5
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 1
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user3 localhost wait/io/file/sql/query_log 8
user3 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user4 localhost wait/io/file/sql/query_log 5
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 1
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user4 localhost wait/io/file/sql/query_log 8
user4 localhost wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_user;
user event_name count_star
execute dump_waits_host;
host event_name count_star
-localhost wait/io/file/sql/query_log 20
-localhost wait/synch/mutex/sql/LOCK_connection_count 4
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/io/file/sql/query_log 32
localhost wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
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 6
-user1 localhost stage/sql/Init 6
-user1 localhost stage/sql/Init for update 1
-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
-user2 localhost stage/sql/Init for update 1
-user2 localhost stage/sql/Opening tables 3
-user3 localhost stage/sql/Checking permissions 3
-user3 localhost stage/sql/Closing tables 4
-user3 localhost stage/sql/Init 6
-user3 localhost stage/sql/Init for update 1
-user3 localhost stage/sql/Opening tables 3
-user4 localhost stage/sql/Checking permissions 3
-user4 localhost stage/sql/Closing tables 4
-user4 localhost stage/sql/Init 6
-user4 localhost stage/sql/Init for update 1
-user4 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/checking permissions 4
+user1 localhost stage/sql/closing tables 11
+user1 localhost stage/sql/init 3
+user1 localhost stage/sql/Opening tables 7
+user1 localhost stage/sql/starting 7
+user2 localhost stage/sql/checking permissions 4
+user2 localhost stage/sql/closing tables 10
+user2 localhost stage/sql/init 3
+user2 localhost stage/sql/Opening tables 6
+user2 localhost stage/sql/starting 7
+user3 localhost stage/sql/checking permissions 4
+user3 localhost stage/sql/closing tables 10
+user3 localhost stage/sql/init 3
+user3 localhost stage/sql/Opening tables 6
+user3 localhost stage/sql/starting 7
+user4 localhost stage/sql/checking permissions 4
+user4 localhost stage/sql/closing tables 10
+user4 localhost stage/sql/init 3
+user4 localhost stage/sql/Opening tables 6
+user4 localhost stage/sql/starting 7
execute dump_stages_user;
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 18
-localhost stage/sql/Init 24
-localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 13
+localhost stage/sql/checking permissions 16
+localhost stage/sql/closing tables 41
+localhost stage/sql/init 12
+localhost stage/sql/Opening tables 25
+localhost stage/sql/starting 28
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 1
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 1
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 1
+user3 localhost statement/sp/freturn 1
user3 localhost statement/sql/insert 1
-user3 localhost statement/sql/select 2
+user3 localhost statement/sql/select 3
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 1
+user4 localhost statement/sp/freturn 1
user4 localhost statement/sql/insert 1
-user4 localhost statement/sql/select 2
+user4 localhost statement/sql/select 3
execute dump_statements_user;
user event_name count_star
execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 4
+localhost statement/sp/freturn 4
localhost statement/sql/insert 4
-localhost statement/sql/select 8
+localhost statement/sql/select 12
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -1717,123 +1833,134 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/file/sql/query_log 5
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 1
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user1 localhost wait/io/file/sql/query_log 8
user1 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user2 localhost wait/io/file/sql/query_log 5
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 1
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user2 localhost wait/io/file/sql/query_log 8
user2 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user3 localhost wait/io/file/sql/query_log 5
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 1
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user3 localhost wait/io/file/sql/query_log 8
user3 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user4 localhost wait/io/file/sql/query_log 5
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 1
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user4 localhost wait/io/file/sql/query_log 8
user4 localhost wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_user;
user event_name count_star
execute dump_waits_host;
host event_name count_star
-localhost wait/io/file/sql/query_log 20
-localhost wait/synch/mutex/sql/LOCK_connection_count 4
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/io/file/sql/query_log 32
localhost wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
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 6
-user1 localhost stage/sql/Init 6
-user1 localhost stage/sql/Init for update 1
-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
-user2 localhost stage/sql/Init for update 1
-user2 localhost stage/sql/Opening tables 3
-user3 localhost stage/sql/Checking permissions 3
-user3 localhost stage/sql/Closing tables 4
-user3 localhost stage/sql/Init 6
-user3 localhost stage/sql/Init for update 1
-user3 localhost stage/sql/Opening tables 3
-user4 localhost stage/sql/Checking permissions 3
-user4 localhost stage/sql/Closing tables 4
-user4 localhost stage/sql/Init 6
-user4 localhost stage/sql/Init for update 1
-user4 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/checking permissions 4
+user1 localhost stage/sql/closing tables 11
+user1 localhost stage/sql/init 3
+user1 localhost stage/sql/Opening tables 7
+user1 localhost stage/sql/starting 7
+user2 localhost stage/sql/checking permissions 4
+user2 localhost stage/sql/closing tables 10
+user2 localhost stage/sql/init 3
+user2 localhost stage/sql/Opening tables 6
+user2 localhost stage/sql/starting 7
+user3 localhost stage/sql/checking permissions 4
+user3 localhost stage/sql/closing tables 10
+user3 localhost stage/sql/init 3
+user3 localhost stage/sql/Opening tables 6
+user3 localhost stage/sql/starting 7
+user4 localhost stage/sql/checking permissions 4
+user4 localhost stage/sql/closing tables 10
+user4 localhost stage/sql/init 3
+user4 localhost stage/sql/Opening tables 6
+user4 localhost stage/sql/starting 7
execute dump_stages_user;
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 18
-localhost stage/sql/Init 24
-localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 13
+localhost stage/sql/checking permissions 16
+localhost stage/sql/closing tables 41
+localhost stage/sql/init 12
+localhost stage/sql/Opening tables 25
+localhost stage/sql/starting 28
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 1
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 1
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 1
+user3 localhost statement/sp/freturn 1
user3 localhost statement/sql/insert 1
-user3 localhost statement/sql/select 2
+user3 localhost statement/sql/select 3
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 1
+user4 localhost statement/sp/freturn 1
user4 localhost statement/sql/insert 1
-user4 localhost statement/sql/select 2
+user4 localhost statement/sql/select 3
execute dump_statements_user;
user event_name count_star
execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 4
+localhost statement/sp/freturn 4
localhost statement/sql/insert 4
-localhost statement/sql/select 8
+localhost statement/sql/select 12
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -1861,122 +1988,133 @@ user4 not found
execute dump_waits_account;
user host event_name count_star
user1 localhost wait/io/file/sql/query_log 0
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
user2 localhost wait/io/file/sql/query_log 0
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
user3 localhost wait/io/file/sql/query_log 0
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
user4 localhost wait/io/file/sql/query_log 0
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_user;
user event_name count_star
execute dump_waits_host;
host event_name count_star
-localhost wait/io/file/sql/query_log 20
-localhost wait/synch/mutex/sql/LOCK_connection_count 4
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/io/file/sql/query_log 32
localhost wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
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 6
-user1 localhost stage/sql/Init 6
-user1 localhost stage/sql/Init for update 1
-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
-user2 localhost stage/sql/Init for update 1
-user2 localhost stage/sql/Opening tables 3
-user3 localhost stage/sql/Checking permissions 3
-user3 localhost stage/sql/Closing tables 4
-user3 localhost stage/sql/Init 6
-user3 localhost stage/sql/Init for update 1
-user3 localhost stage/sql/Opening tables 3
-user4 localhost stage/sql/Checking permissions 3
-user4 localhost stage/sql/Closing tables 4
-user4 localhost stage/sql/Init 6
-user4 localhost stage/sql/Init for update 1
-user4 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/checking permissions 4
+user1 localhost stage/sql/closing tables 11
+user1 localhost stage/sql/init 3
+user1 localhost stage/sql/Opening tables 7
+user1 localhost stage/sql/starting 7
+user2 localhost stage/sql/checking permissions 4
+user2 localhost stage/sql/closing tables 10
+user2 localhost stage/sql/init 3
+user2 localhost stage/sql/Opening tables 6
+user2 localhost stage/sql/starting 7
+user3 localhost stage/sql/checking permissions 4
+user3 localhost stage/sql/closing tables 10
+user3 localhost stage/sql/init 3
+user3 localhost stage/sql/Opening tables 6
+user3 localhost stage/sql/starting 7
+user4 localhost stage/sql/checking permissions 4
+user4 localhost stage/sql/closing tables 10
+user4 localhost stage/sql/init 3
+user4 localhost stage/sql/Opening tables 6
+user4 localhost stage/sql/starting 7
execute dump_stages_user;
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 18
-localhost stage/sql/Init 24
-localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 13
+localhost stage/sql/checking permissions 16
+localhost stage/sql/closing tables 41
+localhost stage/sql/init 12
+localhost stage/sql/Opening tables 25
+localhost stage/sql/starting 28
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 1
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 1
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 1
+user3 localhost statement/sp/freturn 1
user3 localhost statement/sql/insert 1
-user3 localhost statement/sql/select 2
+user3 localhost statement/sql/select 3
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 1
+user4 localhost statement/sp/freturn 1
user4 localhost statement/sql/insert 1
-user4 localhost statement/sql/select 2
+user4 localhost statement/sql/select 3
execute dump_statements_user;
user event_name count_star
execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 4
+localhost statement/sp/freturn 4
localhost statement/sql/insert 4
-localhost statement/sql/select 8
+localhost statement/sql/select 12
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -2004,122 +2142,133 @@ user4 not found
execute dump_waits_account;
user host event_name count_star
user1 localhost wait/io/file/sql/query_log 0
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
user2 localhost wait/io/file/sql/query_log 0
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
user3 localhost wait/io/file/sql/query_log 0
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
user4 localhost wait/io/file/sql/query_log 0
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_user;
user event_name count_star
execute dump_waits_host;
host event_name count_star
-localhost wait/io/file/sql/query_log 20
-localhost wait/synch/mutex/sql/LOCK_connection_count 4
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/io/file/sql/query_log 32
localhost wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
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 6
-user1 localhost stage/sql/Init 6
-user1 localhost stage/sql/Init for update 1
-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
-user2 localhost stage/sql/Init for update 1
-user2 localhost stage/sql/Opening tables 3
-user3 localhost stage/sql/Checking permissions 3
-user3 localhost stage/sql/Closing tables 4
-user3 localhost stage/sql/Init 6
-user3 localhost stage/sql/Init for update 1
-user3 localhost stage/sql/Opening tables 3
-user4 localhost stage/sql/Checking permissions 3
-user4 localhost stage/sql/Closing tables 4
-user4 localhost stage/sql/Init 6
-user4 localhost stage/sql/Init for update 1
-user4 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/checking permissions 4
+user1 localhost stage/sql/closing tables 11
+user1 localhost stage/sql/init 3
+user1 localhost stage/sql/Opening tables 7
+user1 localhost stage/sql/starting 7
+user2 localhost stage/sql/checking permissions 4
+user2 localhost stage/sql/closing tables 10
+user2 localhost stage/sql/init 3
+user2 localhost stage/sql/Opening tables 6
+user2 localhost stage/sql/starting 7
+user3 localhost stage/sql/checking permissions 4
+user3 localhost stage/sql/closing tables 10
+user3 localhost stage/sql/init 3
+user3 localhost stage/sql/Opening tables 6
+user3 localhost stage/sql/starting 7
+user4 localhost stage/sql/checking permissions 4
+user4 localhost stage/sql/closing tables 10
+user4 localhost stage/sql/init 3
+user4 localhost stage/sql/Opening tables 6
+user4 localhost stage/sql/starting 7
execute dump_stages_user;
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 18
-localhost stage/sql/Init 24
-localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 13
+localhost stage/sql/checking permissions 16
+localhost stage/sql/closing tables 41
+localhost stage/sql/init 12
+localhost stage/sql/Opening tables 25
+localhost stage/sql/starting 28
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 1
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 1
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 1
+user3 localhost statement/sp/freturn 1
user3 localhost statement/sql/insert 1
-user3 localhost statement/sql/select 2
+user3 localhost statement/sql/select 3
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 1
+user4 localhost statement/sp/freturn 1
user4 localhost statement/sql/insert 1
-user4 localhost statement/sql/select 2
+user4 localhost statement/sql/select 3
execute dump_statements_user;
user event_name count_star
execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 4
+localhost statement/sp/freturn 4
localhost statement/sql/insert 4
-localhost statement/sql/select 8
+localhost statement/sql/select 12
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -2147,122 +2296,133 @@ user4 not found
execute dump_waits_account;
user host event_name count_star
user1 localhost wait/io/file/sql/query_log 0
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
user2 localhost wait/io/file/sql/query_log 0
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
user3 localhost wait/io/file/sql/query_log 0
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
user4 localhost wait/io/file/sql/query_log 0
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_user;
user event_name count_star
execute dump_waits_host;
host event_name count_star
localhost wait/io/file/sql/query_log 0
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
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 6
-user1 localhost stage/sql/Init 6
-user1 localhost stage/sql/Init for update 1
-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
-user2 localhost stage/sql/Init for update 1
-user2 localhost stage/sql/Opening tables 3
-user3 localhost stage/sql/Checking permissions 3
-user3 localhost stage/sql/Closing tables 4
-user3 localhost stage/sql/Init 6
-user3 localhost stage/sql/Init for update 1
-user3 localhost stage/sql/Opening tables 3
-user4 localhost stage/sql/Checking permissions 3
-user4 localhost stage/sql/Closing tables 4
-user4 localhost stage/sql/Init 6
-user4 localhost stage/sql/Init for update 1
-user4 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/checking permissions 4
+user1 localhost stage/sql/closing tables 11
+user1 localhost stage/sql/init 3
+user1 localhost stage/sql/Opening tables 7
+user1 localhost stage/sql/starting 7
+user2 localhost stage/sql/checking permissions 4
+user2 localhost stage/sql/closing tables 10
+user2 localhost stage/sql/init 3
+user2 localhost stage/sql/Opening tables 6
+user2 localhost stage/sql/starting 7
+user3 localhost stage/sql/checking permissions 4
+user3 localhost stage/sql/closing tables 10
+user3 localhost stage/sql/init 3
+user3 localhost stage/sql/Opening tables 6
+user3 localhost stage/sql/starting 7
+user4 localhost stage/sql/checking permissions 4
+user4 localhost stage/sql/closing tables 10
+user4 localhost stage/sql/init 3
+user4 localhost stage/sql/Opening tables 6
+user4 localhost stage/sql/starting 7
execute dump_stages_user;
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 18
-localhost stage/sql/Init 24
-localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 13
+localhost stage/sql/checking permissions 16
+localhost stage/sql/closing tables 41
+localhost stage/sql/init 12
+localhost stage/sql/Opening tables 25
+localhost stage/sql/starting 28
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 1
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 1
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 1
+user3 localhost statement/sp/freturn 1
user3 localhost statement/sql/insert 1
-user3 localhost statement/sql/select 2
+user3 localhost statement/sql/select 3
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 1
+user4 localhost statement/sp/freturn 1
user4 localhost statement/sql/insert 1
-user4 localhost statement/sql/select 2
+user4 localhost statement/sql/select 3
execute dump_statements_user;
user event_name count_star
execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 4
+localhost statement/sp/freturn 4
localhost statement/sql/insert 4
-localhost statement/sql/select 8
+localhost statement/sql/select 12
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -2290,122 +2450,133 @@ user4 not found
execute dump_waits_account;
user host event_name count_star
user1 localhost wait/io/file/sql/query_log 0
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
user2 localhost wait/io/file/sql/query_log 0
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
user3 localhost wait/io/file/sql/query_log 0
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
user4 localhost wait/io/file/sql/query_log 0
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_user;
user event_name count_star
execute dump_waits_host;
host event_name count_star
localhost wait/io/file/sql/query_log 0
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
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 6
-user1 localhost stage/sql/Init 6
-user1 localhost stage/sql/Init for update 1
-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
-user2 localhost stage/sql/Init for update 1
-user2 localhost stage/sql/Opening tables 3
-user3 localhost stage/sql/Checking permissions 3
-user3 localhost stage/sql/Closing tables 4
-user3 localhost stage/sql/Init 6
-user3 localhost stage/sql/Init for update 1
-user3 localhost stage/sql/Opening tables 3
-user4 localhost stage/sql/Checking permissions 3
-user4 localhost stage/sql/Closing tables 4
-user4 localhost stage/sql/Init 6
-user4 localhost stage/sql/Init for update 1
-user4 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/checking permissions 4
+user1 localhost stage/sql/closing tables 11
+user1 localhost stage/sql/init 3
+user1 localhost stage/sql/Opening tables 7
+user1 localhost stage/sql/starting 7
+user2 localhost stage/sql/checking permissions 4
+user2 localhost stage/sql/closing tables 10
+user2 localhost stage/sql/init 3
+user2 localhost stage/sql/Opening tables 6
+user2 localhost stage/sql/starting 7
+user3 localhost stage/sql/checking permissions 4
+user3 localhost stage/sql/closing tables 10
+user3 localhost stage/sql/init 3
+user3 localhost stage/sql/Opening tables 6
+user3 localhost stage/sql/starting 7
+user4 localhost stage/sql/checking permissions 4
+user4 localhost stage/sql/closing tables 10
+user4 localhost stage/sql/init 3
+user4 localhost stage/sql/Opening tables 6
+user4 localhost stage/sql/starting 7
execute dump_stages_user;
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 18
-localhost stage/sql/Init 24
-localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 13
+localhost stage/sql/checking permissions 16
+localhost stage/sql/closing tables 41
+localhost stage/sql/init 12
+localhost stage/sql/Opening tables 25
+localhost stage/sql/starting 28
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 1
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 1
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 1
+user3 localhost statement/sp/freturn 1
user3 localhost statement/sql/insert 1
-user3 localhost statement/sql/select 2
+user3 localhost statement/sql/select 3
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 1
+user4 localhost statement/sp/freturn 1
user4 localhost statement/sql/insert 1
-user4 localhost statement/sql/select 2
+user4 localhost statement/sql/select 3
execute dump_statements_user;
user event_name count_star
execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 4
+localhost statement/sp/freturn 4
localhost statement/sql/insert 4
-localhost statement/sql/select 8
+localhost statement/sql/select 12
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -2433,122 +2604,133 @@ user4 not found
execute dump_waits_account;
user host event_name count_star
user1 localhost wait/io/file/sql/query_log 0
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
user2 localhost wait/io/file/sql/query_log 0
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
user3 localhost wait/io/file/sql/query_log 0
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
user4 localhost wait/io/file/sql/query_log 0
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_user;
user event_name count_star
execute dump_waits_host;
host event_name count_star
localhost wait/io/file/sql/query_log 0
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
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 6
-user1 localhost stage/sql/Init 6
-user1 localhost stage/sql/Init for update 1
-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
-user2 localhost stage/sql/Init for update 1
-user2 localhost stage/sql/Opening tables 3
-user3 localhost stage/sql/Checking permissions 3
-user3 localhost stage/sql/Closing tables 4
-user3 localhost stage/sql/Init 6
-user3 localhost stage/sql/Init for update 1
-user3 localhost stage/sql/Opening tables 3
-user4 localhost stage/sql/Checking permissions 3
-user4 localhost stage/sql/Closing tables 4
-user4 localhost stage/sql/Init 6
-user4 localhost stage/sql/Init for update 1
-user4 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/checking permissions 4
+user1 localhost stage/sql/closing tables 11
+user1 localhost stage/sql/init 3
+user1 localhost stage/sql/Opening tables 7
+user1 localhost stage/sql/starting 7
+user2 localhost stage/sql/checking permissions 4
+user2 localhost stage/sql/closing tables 10
+user2 localhost stage/sql/init 3
+user2 localhost stage/sql/Opening tables 6
+user2 localhost stage/sql/starting 7
+user3 localhost stage/sql/checking permissions 4
+user3 localhost stage/sql/closing tables 10
+user3 localhost stage/sql/init 3
+user3 localhost stage/sql/Opening tables 6
+user3 localhost stage/sql/starting 7
+user4 localhost stage/sql/checking permissions 4
+user4 localhost stage/sql/closing tables 10
+user4 localhost stage/sql/init 3
+user4 localhost stage/sql/Opening tables 6
+user4 localhost stage/sql/starting 7
execute dump_stages_user;
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 18
-localhost stage/sql/Init 24
-localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 13
+localhost stage/sql/checking permissions 16
+localhost stage/sql/closing tables 41
+localhost stage/sql/init 12
+localhost stage/sql/Opening tables 25
+localhost stage/sql/starting 28
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 1
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 1
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 1
+user3 localhost statement/sp/freturn 1
user3 localhost statement/sql/insert 1
-user3 localhost statement/sql/select 2
+user3 localhost statement/sql/select 3
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 1
+user4 localhost statement/sp/freturn 1
user4 localhost statement/sql/insert 1
-user4 localhost statement/sql/select 2
+user4 localhost statement/sql/select 3
execute dump_statements_user;
user event_name count_star
execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 4
+localhost statement/sp/freturn 4
localhost statement/sql/insert 4
-localhost statement/sql/select 8
+localhost statement/sql/select 12
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -2576,122 +2758,133 @@ user4 not found
execute dump_waits_account;
user host event_name count_star
user1 localhost wait/io/file/sql/query_log 0
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
user2 localhost wait/io/file/sql/query_log 0
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
user3 localhost wait/io/file/sql/query_log 0
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
user4 localhost wait/io/file/sql/query_log 0
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_user;
user event_name count_star
execute dump_waits_host;
host event_name count_star
localhost wait/io/file/sql/query_log 0
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
-user1 localhost stage/sql/Checking permissions 0
-user1 localhost stage/sql/Closing tables 0
-user1 localhost stage/sql/Init 0
-user1 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
user1 localhost stage/sql/Opening tables 0
-user2 localhost stage/sql/Checking permissions 0
-user2 localhost stage/sql/Closing tables 0
-user2 localhost stage/sql/Init 0
-user2 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/starting 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
user2 localhost stage/sql/Opening tables 0
-user3 localhost stage/sql/Checking permissions 0
-user3 localhost stage/sql/Closing tables 0
-user3 localhost stage/sql/Init 0
-user3 localhost stage/sql/Init for update 0
+user2 localhost stage/sql/starting 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
user3 localhost stage/sql/Opening tables 0
-user4 localhost stage/sql/Checking permissions 0
-user4 localhost stage/sql/Closing tables 0
-user4 localhost stage/sql/Init 0
-user4 localhost stage/sql/Init for update 0
+user3 localhost stage/sql/starting 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
user4 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/starting 0
execute dump_stages_user;
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 18
-localhost stage/sql/Init 24
-localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 13
+localhost stage/sql/checking permissions 16
+localhost stage/sql/closing tables 41
+localhost stage/sql/init 12
+localhost stage/sql/Opening tables 25
+localhost stage/sql/starting 28
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 1
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 1
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 1
+user3 localhost statement/sp/freturn 1
user3 localhost statement/sql/insert 1
-user3 localhost statement/sql/select 2
+user3 localhost statement/sql/select 3
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 1
+user4 localhost statement/sp/freturn 1
user4 localhost statement/sql/insert 1
-user4 localhost statement/sql/select 2
+user4 localhost statement/sql/select 3
execute dump_statements_user;
user event_name count_star
execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 4
+localhost statement/sp/freturn 4
localhost statement/sql/insert 4
-localhost statement/sql/select 8
+localhost statement/sql/select 12
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -2719,122 +2912,133 @@ user4 not found
execute dump_waits_account;
user host event_name count_star
user1 localhost wait/io/file/sql/query_log 0
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
user2 localhost wait/io/file/sql/query_log 0
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
user3 localhost wait/io/file/sql/query_log 0
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
user4 localhost wait/io/file/sql/query_log 0
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_user;
user event_name count_star
execute dump_waits_host;
host event_name count_star
localhost wait/io/file/sql/query_log 0
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
-user1 localhost stage/sql/Checking permissions 0
-user1 localhost stage/sql/Closing tables 0
-user1 localhost stage/sql/Init 0
-user1 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
user1 localhost stage/sql/Opening tables 0
-user2 localhost stage/sql/Checking permissions 0
-user2 localhost stage/sql/Closing tables 0
-user2 localhost stage/sql/Init 0
-user2 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/starting 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
user2 localhost stage/sql/Opening tables 0
-user3 localhost stage/sql/Checking permissions 0
-user3 localhost stage/sql/Closing tables 0
-user3 localhost stage/sql/Init 0
-user3 localhost stage/sql/Init for update 0
+user2 localhost stage/sql/starting 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
user3 localhost stage/sql/Opening tables 0
-user4 localhost stage/sql/Checking permissions 0
-user4 localhost stage/sql/Closing tables 0
-user4 localhost stage/sql/Init 0
-user4 localhost stage/sql/Init for update 0
+user3 localhost stage/sql/starting 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
user4 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/starting 0
execute dump_stages_user;
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 18
-localhost stage/sql/Init 24
-localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 13
+localhost stage/sql/checking permissions 16
+localhost stage/sql/closing tables 41
+localhost stage/sql/init 12
+localhost stage/sql/Opening tables 25
+localhost stage/sql/starting 28
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 1
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 1
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 1
+user3 localhost statement/sp/freturn 1
user3 localhost statement/sql/insert 1
-user3 localhost statement/sql/select 2
+user3 localhost statement/sql/select 3
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 1
+user4 localhost statement/sp/freturn 1
user4 localhost statement/sql/insert 1
-user4 localhost statement/sql/select 2
+user4 localhost statement/sql/select 3
execute dump_statements_user;
user event_name count_star
execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 4
+localhost statement/sp/freturn 4
localhost statement/sql/insert 4
-localhost statement/sql/select 8
+localhost statement/sql/select 12
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -2862,122 +3066,133 @@ user4 not found
execute dump_waits_account;
user host event_name count_star
user1 localhost wait/io/file/sql/query_log 0
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
user2 localhost wait/io/file/sql/query_log 0
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
user3 localhost wait/io/file/sql/query_log 0
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
user4 localhost wait/io/file/sql/query_log 0
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_user;
user event_name count_star
execute dump_waits_host;
host event_name count_star
localhost wait/io/file/sql/query_log 0
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
-user1 localhost stage/sql/Checking permissions 0
-user1 localhost stage/sql/Closing tables 0
-user1 localhost stage/sql/Init 0
-user1 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
user1 localhost stage/sql/Opening tables 0
-user2 localhost stage/sql/Checking permissions 0
-user2 localhost stage/sql/Closing tables 0
-user2 localhost stage/sql/Init 0
-user2 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/starting 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
user2 localhost stage/sql/Opening tables 0
-user3 localhost stage/sql/Checking permissions 0
-user3 localhost stage/sql/Closing tables 0
-user3 localhost stage/sql/Init 0
-user3 localhost stage/sql/Init for update 0
+user2 localhost stage/sql/starting 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
user3 localhost stage/sql/Opening tables 0
-user4 localhost stage/sql/Checking permissions 0
-user4 localhost stage/sql/Closing tables 0
-user4 localhost stage/sql/Init 0
-user4 localhost stage/sql/Init for update 0
+user3 localhost stage/sql/starting 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
user4 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/starting 0
execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 0
-localhost stage/sql/Closing tables 0
-localhost stage/sql/Init 0
-localhost stage/sql/Init for update 0
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
localhost stage/sql/Opening tables 0
+localhost stage/sql/starting 0
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 1
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 1
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 1
+user3 localhost statement/sp/freturn 1
user3 localhost statement/sql/insert 1
-user3 localhost statement/sql/select 2
+user3 localhost statement/sql/select 3
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 1
+user4 localhost statement/sp/freturn 1
user4 localhost statement/sql/insert 1
-user4 localhost statement/sql/select 2
+user4 localhost statement/sql/select 3
execute dump_statements_user;
user event_name count_star
execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 4
+localhost statement/sp/freturn 4
localhost statement/sql/insert 4
-localhost statement/sql/select 8
+localhost statement/sql/select 12
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -3005,122 +3220,133 @@ user4 not found
execute dump_waits_account;
user host event_name count_star
user1 localhost wait/io/file/sql/query_log 0
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
user2 localhost wait/io/file/sql/query_log 0
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
user3 localhost wait/io/file/sql/query_log 0
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
user4 localhost wait/io/file/sql/query_log 0
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_user;
user event_name count_star
execute dump_waits_host;
host event_name count_star
localhost wait/io/file/sql/query_log 0
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
-user1 localhost stage/sql/Checking permissions 0
-user1 localhost stage/sql/Closing tables 0
-user1 localhost stage/sql/Init 0
-user1 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
user1 localhost stage/sql/Opening tables 0
-user2 localhost stage/sql/Checking permissions 0
-user2 localhost stage/sql/Closing tables 0
-user2 localhost stage/sql/Init 0
-user2 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/starting 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
user2 localhost stage/sql/Opening tables 0
-user3 localhost stage/sql/Checking permissions 0
-user3 localhost stage/sql/Closing tables 0
-user3 localhost stage/sql/Init 0
-user3 localhost stage/sql/Init for update 0
+user2 localhost stage/sql/starting 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
user3 localhost stage/sql/Opening tables 0
-user4 localhost stage/sql/Checking permissions 0
-user4 localhost stage/sql/Closing tables 0
-user4 localhost stage/sql/Init 0
-user4 localhost stage/sql/Init for update 0
+user3 localhost stage/sql/starting 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
user4 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/starting 0
execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 0
-localhost stage/sql/Closing tables 0
-localhost stage/sql/Init 0
-localhost stage/sql/Init for update 0
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
localhost stage/sql/Opening tables 0
+localhost stage/sql/starting 0
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 1
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 1
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 1
+user3 localhost statement/sp/freturn 1
user3 localhost statement/sql/insert 1
-user3 localhost statement/sql/select 2
+user3 localhost statement/sql/select 3
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 1
+user4 localhost statement/sp/freturn 1
user4 localhost statement/sql/insert 1
-user4 localhost statement/sql/select 2
+user4 localhost statement/sql/select 3
execute dump_statements_user;
user event_name count_star
execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 4
+localhost statement/sp/freturn 4
localhost statement/sql/insert 4
-localhost statement/sql/select 8
+localhost statement/sql/select 12
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -3148,122 +3374,133 @@ user4 not found
execute dump_waits_account;
user host event_name count_star
user1 localhost wait/io/file/sql/query_log 0
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
user2 localhost wait/io/file/sql/query_log 0
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
user3 localhost wait/io/file/sql/query_log 0
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
user4 localhost wait/io/file/sql/query_log 0
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_user;
user event_name count_star
execute dump_waits_host;
host event_name count_star
localhost wait/io/file/sql/query_log 0
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
-user1 localhost stage/sql/Checking permissions 0
-user1 localhost stage/sql/Closing tables 0
-user1 localhost stage/sql/Init 0
-user1 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
user1 localhost stage/sql/Opening tables 0
-user2 localhost stage/sql/Checking permissions 0
-user2 localhost stage/sql/Closing tables 0
-user2 localhost stage/sql/Init 0
-user2 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/starting 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
user2 localhost stage/sql/Opening tables 0
-user3 localhost stage/sql/Checking permissions 0
-user3 localhost stage/sql/Closing tables 0
-user3 localhost stage/sql/Init 0
-user3 localhost stage/sql/Init for update 0
+user2 localhost stage/sql/starting 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
user3 localhost stage/sql/Opening tables 0
-user4 localhost stage/sql/Checking permissions 0
-user4 localhost stage/sql/Closing tables 0
-user4 localhost stage/sql/Init 0
-user4 localhost stage/sql/Init for update 0
+user3 localhost stage/sql/starting 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
user4 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/starting 0
execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 0
-localhost stage/sql/Closing tables 0
-localhost stage/sql/Init 0
-localhost stage/sql/Init for update 0
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
localhost stage/sql/Opening tables 0
+localhost stage/sql/starting 0
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 1
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 1
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 1
+user3 localhost statement/sp/freturn 1
user3 localhost statement/sql/insert 1
-user3 localhost statement/sql/select 2
+user3 localhost statement/sql/select 3
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 1
+user4 localhost statement/sp/freturn 1
user4 localhost statement/sql/insert 1
-user4 localhost statement/sql/select 2
+user4 localhost statement/sql/select 3
execute dump_statements_user;
user event_name count_star
execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 4
+localhost statement/sp/freturn 4
localhost statement/sql/insert 4
-localhost statement/sql/select 8
+localhost statement/sql/select 12
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -3291,101 +3528,92 @@ user4 not found
execute dump_waits_account;
user host event_name count_star
user1 localhost wait/io/file/sql/query_log 0
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
user2 localhost wait/io/file/sql/query_log 0
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
user3 localhost wait/io/file/sql/query_log 0
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
user4 localhost wait/io/file/sql/query_log 0
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_user;
user event_name count_star
execute dump_waits_host;
host event_name count_star
localhost wait/io/file/sql/query_log 0
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
-user1 localhost stage/sql/Checking permissions 0
-user1 localhost stage/sql/Closing tables 0
-user1 localhost stage/sql/Init 0
-user1 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
user1 localhost stage/sql/Opening tables 0
-user2 localhost stage/sql/Checking permissions 0
-user2 localhost stage/sql/Closing tables 0
-user2 localhost stage/sql/Init 0
-user2 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/starting 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
user2 localhost stage/sql/Opening tables 0
-user3 localhost stage/sql/Checking permissions 0
-user3 localhost stage/sql/Closing tables 0
-user3 localhost stage/sql/Init 0
-user3 localhost stage/sql/Init for update 0
+user2 localhost stage/sql/starting 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
user3 localhost stage/sql/Opening tables 0
-user4 localhost stage/sql/Checking permissions 0
-user4 localhost stage/sql/Closing tables 0
-user4 localhost stage/sql/Init 0
-user4 localhost stage/sql/Init for update 0
+user3 localhost stage/sql/starting 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
user4 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/starting 0
execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 0
-localhost stage/sql/Closing tables 0
-localhost stage/sql/Init 0
-localhost stage/sql/Init for update 0
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
localhost stage/sql/Opening tables 0
+localhost stage/sql/starting 0
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 0
+user1 localhost statement/sp/freturn 0
user1 localhost statement/sql/insert 0
user1 localhost statement/sql/select 0
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 0
+user2 localhost statement/sp/freturn 0
user2 localhost statement/sql/insert 0
user2 localhost statement/sql/select 0
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 0
+user3 localhost statement/sp/freturn 0
user3 localhost statement/sql/insert 0
user3 localhost statement/sql/select 0
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 0
+user4 localhost statement/sp/freturn 0
user4 localhost statement/sql/insert 0
user4 localhost statement/sql/select 0
execute dump_statements_user;
@@ -3394,19 +3622,39 @@ execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 4
+localhost statement/sp/freturn 4
localhost statement/sql/insert 4
-localhost statement/sql/select 8
+localhost statement/sql/select 12
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -3434,101 +3682,92 @@ user4 not found
execute dump_waits_account;
user host event_name count_star
user1 localhost wait/io/file/sql/query_log 0
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
user2 localhost wait/io/file/sql/query_log 0
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
user3 localhost wait/io/file/sql/query_log 0
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
user4 localhost wait/io/file/sql/query_log 0
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_user;
user event_name count_star
execute dump_waits_host;
host event_name count_star
localhost wait/io/file/sql/query_log 0
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
-user1 localhost stage/sql/Checking permissions 0
-user1 localhost stage/sql/Closing tables 0
-user1 localhost stage/sql/Init 0
-user1 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
user1 localhost stage/sql/Opening tables 0
-user2 localhost stage/sql/Checking permissions 0
-user2 localhost stage/sql/Closing tables 0
-user2 localhost stage/sql/Init 0
-user2 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/starting 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
user2 localhost stage/sql/Opening tables 0
-user3 localhost stage/sql/Checking permissions 0
-user3 localhost stage/sql/Closing tables 0
-user3 localhost stage/sql/Init 0
-user3 localhost stage/sql/Init for update 0
+user2 localhost stage/sql/starting 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
user3 localhost stage/sql/Opening tables 0
-user4 localhost stage/sql/Checking permissions 0
-user4 localhost stage/sql/Closing tables 0
-user4 localhost stage/sql/Init 0
-user4 localhost stage/sql/Init for update 0
+user3 localhost stage/sql/starting 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
user4 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/starting 0
execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 0
-localhost stage/sql/Closing tables 0
-localhost stage/sql/Init 0
-localhost stage/sql/Init for update 0
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
localhost stage/sql/Opening tables 0
+localhost stage/sql/starting 0
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 0
+user1 localhost statement/sp/freturn 0
user1 localhost statement/sql/insert 0
user1 localhost statement/sql/select 0
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 0
+user2 localhost statement/sp/freturn 0
user2 localhost statement/sql/insert 0
user2 localhost statement/sql/select 0
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 0
+user3 localhost statement/sp/freturn 0
user3 localhost statement/sql/insert 0
user3 localhost statement/sql/select 0
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 0
+user4 localhost statement/sp/freturn 0
user4 localhost statement/sql/insert 0
user4 localhost statement/sql/select 0
execute dump_statements_user;
@@ -3537,19 +3776,39 @@ execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 4
+localhost statement/sp/freturn 4
localhost statement/sql/insert 4
-localhost statement/sql/select 8
+localhost statement/sql/select 12
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -3577,101 +3836,92 @@ user4 not found
execute dump_waits_account;
user host event_name count_star
user1 localhost wait/io/file/sql/query_log 0
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
user2 localhost wait/io/file/sql/query_log 0
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
user3 localhost wait/io/file/sql/query_log 0
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
user4 localhost wait/io/file/sql/query_log 0
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_user;
user event_name count_star
execute dump_waits_host;
host event_name count_star
localhost wait/io/file/sql/query_log 0
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
-user1 localhost stage/sql/Checking permissions 0
-user1 localhost stage/sql/Closing tables 0
-user1 localhost stage/sql/Init 0
-user1 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
user1 localhost stage/sql/Opening tables 0
-user2 localhost stage/sql/Checking permissions 0
-user2 localhost stage/sql/Closing tables 0
-user2 localhost stage/sql/Init 0
-user2 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/starting 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
user2 localhost stage/sql/Opening tables 0
-user3 localhost stage/sql/Checking permissions 0
-user3 localhost stage/sql/Closing tables 0
-user3 localhost stage/sql/Init 0
-user3 localhost stage/sql/Init for update 0
+user2 localhost stage/sql/starting 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
user3 localhost stage/sql/Opening tables 0
-user4 localhost stage/sql/Checking permissions 0
-user4 localhost stage/sql/Closing tables 0
-user4 localhost stage/sql/Init 0
-user4 localhost stage/sql/Init for update 0
+user3 localhost stage/sql/starting 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
user4 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/starting 0
execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 0
-localhost stage/sql/Closing tables 0
-localhost stage/sql/Init 0
-localhost stage/sql/Init for update 0
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
localhost stage/sql/Opening tables 0
+localhost stage/sql/starting 0
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 0
+user1 localhost statement/sp/freturn 0
user1 localhost statement/sql/insert 0
user1 localhost statement/sql/select 0
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 0
+user2 localhost statement/sp/freturn 0
user2 localhost statement/sql/insert 0
user2 localhost statement/sql/select 0
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 0
+user3 localhost statement/sp/freturn 0
user3 localhost statement/sql/insert 0
user3 localhost statement/sql/select 0
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 0
+user4 localhost statement/sp/freturn 0
user4 localhost statement/sql/insert 0
user4 localhost statement/sql/select 0
execute dump_statements_user;
@@ -3680,19 +3930,39 @@ execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 0
+localhost statement/sp/freturn 0
localhost statement/sql/insert 0
localhost statement/sql/select 0
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -3720,101 +3990,862 @@ user4 not found
execute dump_waits_account;
user host event_name count_star
user1 localhost wait/io/file/sql/query_log 0
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
user2 localhost wait/io/file/sql/query_log 0
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
user3 localhost wait/io/file/sql/query_log 0
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
user4 localhost wait/io/file/sql/query_log 0
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_user;
user event_name count_star
execute dump_waits_host;
host event_name count_star
localhost wait/io/file/sql/query_log 0
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
-user1 localhost stage/sql/Checking permissions 0
-user1 localhost stage/sql/Closing tables 0
-user1 localhost stage/sql/Init 0
-user1 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
user1 localhost stage/sql/Opening tables 0
-user2 localhost stage/sql/Checking permissions 0
-user2 localhost stage/sql/Closing tables 0
-user2 localhost stage/sql/Init 0
-user2 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/starting 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
user2 localhost stage/sql/Opening tables 0
-user3 localhost stage/sql/Checking permissions 0
-user3 localhost stage/sql/Closing tables 0
-user3 localhost stage/sql/Init 0
-user3 localhost stage/sql/Init for update 0
+user2 localhost stage/sql/starting 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
user3 localhost stage/sql/Opening tables 0
-user4 localhost stage/sql/Checking permissions 0
-user4 localhost stage/sql/Closing tables 0
-user4 localhost stage/sql/Init 0
-user4 localhost stage/sql/Init for update 0
+user3 localhost stage/sql/starting 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
user4 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/starting 0
execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 0
-localhost stage/sql/Closing tables 0
-localhost stage/sql/Init 0
-localhost stage/sql/Init for update 0
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
localhost stage/sql/Opening tables 0
+localhost stage/sql/starting 0
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 0
+user1 localhost statement/sp/freturn 0
+user1 localhost statement/sql/insert 0
+user1 localhost statement/sql/select 0
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 0
+user2 localhost statement/sp/freturn 0
+user2 localhost statement/sql/insert 0
+user2 localhost statement/sql/select 0
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 0
+user3 localhost statement/sp/freturn 0
+user3 localhost statement/sql/insert 0
+user3 localhost statement/sql/select 0
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 0
+user4 localhost statement/sp/freturn 0
+user4 localhost statement/sql/insert 0
+user4 localhost statement/sql/select 0
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 0
+localhost statement/sp/freturn 0
+localhost statement/sql/insert 0
+localhost statement/sql/select 0
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sp/freturn 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sp/freturn 4
+statement/sql/insert 4
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_transactions_summary_by_thread_by_event_name;
+"================== TRANSACTIONS_BY_THREAD truncated =================="
+"================== Step 29 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/file/sql/query_log 0
+user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
+user2 localhost wait/io/file/sql/query_log 0
+user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
+user3 localhost wait/io/file/sql/query_log 0
+user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
+user4 localhost wait/io/file/sql/query_log 0
+user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 32
+wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
+user1 localhost stage/sql/Opening tables 0
+user1 localhost stage/sql/starting 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
+user2 localhost stage/sql/Opening tables 0
+user2 localhost stage/sql/starting 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
+user3 localhost stage/sql/Opening tables 0
+user3 localhost stage/sql/starting 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
+user4 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/starting 0
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
+localhost stage/sql/Opening tables 0
+localhost stage/sql/starting 0
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+stage/sql/starting 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 0
+user1 localhost statement/sp/freturn 0
+user1 localhost statement/sql/insert 0
+user1 localhost statement/sql/select 0
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 0
+user2 localhost statement/sp/freturn 0
+user2 localhost statement/sql/insert 0
+user2 localhost statement/sql/select 0
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 0
+user3 localhost statement/sp/freturn 0
+user3 localhost statement/sql/insert 0
+user3 localhost statement/sql/select 0
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 0
+user4 localhost statement/sp/freturn 0
+user4 localhost statement/sql/insert 0
+user4 localhost statement/sql/select 0
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 0
+localhost statement/sp/freturn 0
+localhost statement/sql/insert 0
+localhost statement/sql/select 0
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sp/freturn 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sp/freturn 4
+statement/sql/insert 4
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_transactions_summary_by_account_by_event_name;
+"================== TRANSACTIONS_BY_ACCOUNT truncated =================="
+"================== Step 30 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/file/sql/query_log 0
+user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
+user2 localhost wait/io/file/sql/query_log 0
+user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
+user3 localhost wait/io/file/sql/query_log 0
+user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
+user4 localhost wait/io/file/sql/query_log 0
+user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 32
+wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
+user1 localhost stage/sql/Opening tables 0
+user1 localhost stage/sql/starting 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
+user2 localhost stage/sql/Opening tables 0
+user2 localhost stage/sql/starting 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
+user3 localhost stage/sql/Opening tables 0
+user3 localhost stage/sql/starting 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
+user4 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/starting 0
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
+localhost stage/sql/Opening tables 0
+localhost stage/sql/starting 0
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+stage/sql/starting 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 0
+user1 localhost statement/sp/freturn 0
+user1 localhost statement/sql/insert 0
+user1 localhost statement/sql/select 0
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 0
+user2 localhost statement/sp/freturn 0
+user2 localhost statement/sql/insert 0
+user2 localhost statement/sql/select 0
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 0
+user3 localhost statement/sp/freturn 0
+user3 localhost statement/sql/insert 0
+user3 localhost statement/sql/select 0
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 0
+user4 localhost statement/sp/freturn 0
+user4 localhost statement/sql/insert 0
+user4 localhost statement/sql/select 0
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 0
+localhost statement/sp/freturn 0
+localhost statement/sql/insert 0
+localhost statement/sql/select 0
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sp/freturn 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sp/freturn 4
+statement/sql/insert 4
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 0
+user2 localhost transaction 0
+user3 localhost transaction 0
+user4 localhost transaction 0
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_transactions_summary_by_user_by_event_name;
+"================== TRANSACTIONS_BY_USER truncated =================="
+"================== Step 31 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/file/sql/query_log 0
+user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
+user2 localhost wait/io/file/sql/query_log 0
+user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
+user3 localhost wait/io/file/sql/query_log 0
+user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
+user4 localhost wait/io/file/sql/query_log 0
+user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 32
+wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
+user1 localhost stage/sql/Opening tables 0
+user1 localhost stage/sql/starting 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
+user2 localhost stage/sql/Opening tables 0
+user2 localhost stage/sql/starting 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
+user3 localhost stage/sql/Opening tables 0
+user3 localhost stage/sql/starting 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
+user4 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/starting 0
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
+localhost stage/sql/Opening tables 0
+localhost stage/sql/starting 0
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+stage/sql/starting 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 0
+user1 localhost statement/sp/freturn 0
+user1 localhost statement/sql/insert 0
+user1 localhost statement/sql/select 0
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 0
+user2 localhost statement/sp/freturn 0
+user2 localhost statement/sql/insert 0
+user2 localhost statement/sql/select 0
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 0
+user3 localhost statement/sp/freturn 0
+user3 localhost statement/sql/insert 0
+user3 localhost statement/sql/select 0
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 0
+user4 localhost statement/sp/freturn 0
+user4 localhost statement/sql/insert 0
+user4 localhost statement/sql/select 0
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 0
+localhost statement/sp/freturn 0
+localhost statement/sql/insert 0
+localhost statement/sql/select 0
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sp/freturn 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sp/freturn 4
+statement/sql/insert 4
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 0
+user2 localhost transaction 0
+user3 localhost transaction 0
+user4 localhost transaction 0
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 8
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_transactions_summary_by_host_by_event_name;
+"================== TRANSACTIONS_BY_HOST truncated =================="
+"================== Step 32 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/file/sql/query_log 0
+user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
+user2 localhost wait/io/file/sql/query_log 0
+user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
+user3 localhost wait/io/file/sql/query_log 0
+user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
+user4 localhost wait/io/file/sql/query_log 0
+user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 32
+wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
+user1 localhost stage/sql/Opening tables 0
+user1 localhost stage/sql/starting 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
+user2 localhost stage/sql/Opening tables 0
+user2 localhost stage/sql/starting 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
+user3 localhost stage/sql/Opening tables 0
+user3 localhost stage/sql/starting 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
+user4 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/starting 0
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
+localhost stage/sql/Opening tables 0
+localhost stage/sql/starting 0
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+stage/sql/starting 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 0
+user1 localhost statement/sp/freturn 0
+user1 localhost statement/sql/insert 0
+user1 localhost statement/sql/select 0
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 0
+user2 localhost statement/sp/freturn 0
+user2 localhost statement/sql/insert 0
+user2 localhost statement/sql/select 0
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 0
+user3 localhost statement/sp/freturn 0
+user3 localhost statement/sql/insert 0
+user3 localhost statement/sql/select 0
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 0
+user4 localhost statement/sp/freturn 0
+user4 localhost statement/sql/insert 0
+user4 localhost statement/sql/select 0
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 0
+localhost statement/sp/freturn 0
+localhost statement/sql/insert 0
+localhost statement/sql/select 0
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sp/freturn 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sp/freturn 4
+statement/sql/insert 4
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 0
+user2 localhost transaction 0
+user3 localhost transaction 0
+user4 localhost transaction 0
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 0
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_transactions_summary_global_by_event_name;
+"================== TRANSACTIONS_GLOBAL truncated =================="
+"================== Step 33 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/file/sql/query_log 0
+user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
+user2 localhost wait/io/file/sql/query_log 0
+user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
+user3 localhost wait/io/file/sql/query_log 0
+user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
+user4 localhost wait/io/file/sql/query_log 0
+user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 32
+wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
+user1 localhost stage/sql/Opening tables 0
+user1 localhost stage/sql/starting 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
+user2 localhost stage/sql/Opening tables 0
+user2 localhost stage/sql/starting 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
+user3 localhost stage/sql/Opening tables 0
+user3 localhost stage/sql/starting 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
+user4 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/starting 0
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
+localhost stage/sql/Opening tables 0
+localhost stage/sql/starting 0
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+stage/sql/starting 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 0
+user1 localhost statement/sp/freturn 0
user1 localhost statement/sql/insert 0
user1 localhost statement/sql/select 0
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 0
+user2 localhost statement/sp/freturn 0
user2 localhost statement/sql/insert 0
user2 localhost statement/sql/select 0
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 0
+user3 localhost statement/sp/freturn 0
user3 localhost statement/sql/insert 0
user3 localhost statement/sql/select 0
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 0
+user4 localhost statement/sp/freturn 0
user4 localhost statement/sql/insert 0
user4 localhost statement/sql/select 0
execute dump_statements_user;
@@ -3823,19 +4854,39 @@ execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 0
+localhost statement/sp/freturn 0
localhost statement/sql/insert 0
localhost statement/sql/select 0
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 0
statement/sql/insert 0
statement/sql/select 0
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 0
+user2 localhost transaction 0
+user3 localhost transaction 0
+user4 localhost transaction 0
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 0
+execute dump_transactions_global;
+event_name count_star
+transaction 0
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -3850,7 +4901,7 @@ HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 1 5
truncate performance_schema.accounts;
"================== ACCOUNTS truncated =================="
-"================== Step 29 =================="
+"================== Step 34 =================="
call dump_thread();
username status
user1 not found
@@ -3867,19 +4918,14 @@ user event_name count_star
execute dump_waits_host;
host event_name count_star
localhost wait/io/file/sql/query_log 0
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
@@ -3887,25 +4933,25 @@ execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 0
-localhost stage/sql/Closing tables 0
-localhost stage/sql/Init 0
-localhost stage/sql/Init for update 0
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
localhost stage/sql/Opening tables 0
+localhost stage/sql/starting 0
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -3914,19 +4960,35 @@ execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 0
+localhost statement/sp/freturn 0
localhost statement/sql/insert 0
localhost statement/sql/select 0
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 0
statement/sql/insert 0
statement/sql/select 0
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 0
+execute dump_transactions_global;
+event_name count_star
+transaction 0
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -3937,7 +4999,7 @@ HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 1 5
truncate performance_schema.users;
"================== USERS truncated =================="
-"================== Step 30 =================="
+"================== Step 35 =================="
call dump_thread();
username status
user1 not found
@@ -3954,19 +5016,14 @@ user event_name count_star
execute dump_waits_host;
host event_name count_star
localhost wait/io/file/sql/query_log 0
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
@@ -3974,25 +5031,25 @@ execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 0
-localhost stage/sql/Closing tables 0
-localhost stage/sql/Init 0
-localhost stage/sql/Init for update 0
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
localhost stage/sql/Opening tables 0
+localhost stage/sql/starting 0
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -4001,19 +5058,35 @@ execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 0
+localhost statement/sp/freturn 0
localhost statement/sql/insert 0
localhost statement/sql/select 0
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 0
statement/sql/insert 0
statement/sql/select 0
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 0
+execute dump_transactions_global;
+event_name count_star
+transaction 0
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -4024,7 +5097,7 @@ HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 1 5
truncate performance_schema.hosts;
"================== HOSTS truncated =================="
-"================== Step 31 =================="
+"================== Step 36 =================="
call dump_thread();
username status
user1 not found
@@ -4041,19 +5114,14 @@ user event_name count_star
execute dump_waits_host;
host event_name count_star
localhost wait/io/file/sql/query_log 0
-localhost wait/synch/mutex/sql/LOCK_connection_count 0
-localhost wait/synch/mutex/sql/LOCK_user_locks 0
localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
@@ -4061,25 +5129,25 @@ execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
host event_name count_star
-localhost stage/sql/Checking permissions 0
-localhost stage/sql/Closing tables 0
-localhost stage/sql/Init 0
-localhost stage/sql/Init for update 0
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
localhost stage/sql/Opening tables 0
+localhost stage/sql/starting 0
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -4088,19 +5156,35 @@ execute dump_statements_host;
host event_name count_star
localhost statement/com/Error 0
localhost statement/com/Quit 0
+localhost statement/sp/freturn 0
localhost statement/sql/insert 0
localhost statement/sql/select 0
execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 0
statement/sql/insert 0
statement/sql/select 0
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+localhost transaction 0
+execute dump_transactions_global;
+event_name count_star
+transaction 0
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
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 579fadc51c0..d6dd322a70c 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
@@ -17,8 +17,6 @@ host event_name count_star
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
@@ -30,11 +28,11 @@ execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
execute dump_statements_account;
@@ -47,10 +45,22 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 0
statement/sql/insert 0
statement/sql/select 0
execute dump_statements_history;
event_name count(event_name)
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 0
+execute dump_transactions_history;
+event_name count(event_name)
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -64,8 +74,6 @@ connection default;
call dump_thread();
username event_name count_star
user1 wait/io/file/sql/query_log 1
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
user1 wait/synch/rwlock/sql/LOCK_grant 0
username status
user2 not found
@@ -76,8 +84,6 @@ user4 not found
execute dump_waits_account;
user host event_name count_star
user1 localhost wait/io/file/sql/query_log 1
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_user;
user event_name count_star
@@ -86,36 +92,35 @@ host event_name count_star
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 1
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
wait/io/file/sql/query_log 1
execute dump_stages_account;
user host event_name count_star
-user1 localhost stage/sql/Checking permissions 0
-user1 localhost stage/sql/Closing tables 0
-user1 localhost stage/sql/Init 0
-user1 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
user1 localhost stage/sql/Opening tables 0
+user1 localhost stage/sql/starting 0
execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 0
+user1 localhost statement/sp/freturn 0
user1 localhost statement/sql/insert 0
user1 localhost statement/sql/select 0
execute dump_statements_user;
@@ -126,10 +131,23 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 0
statement/sql/insert 0
statement/sql/select 0
execute dump_statements_history;
event_name count(event_name)
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 0
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 0
+execute dump_transactions_history;
+event_name count(event_name)
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -139,20 +157,23 @@ USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
connection con1;
-select get_lock("marker", 10);
-get_lock("marker", 10)
+select uuid_short() <> 1;
+uuid_short() <> 1
1
-select release_lock("marker");
-release_lock("marker")
+select uuid_short() <> 1;
+uuid_short() <> 1
1
+start transaction;
insert into test.t1 values ("marker");
+commit;
+select test.f(10,20);
+test.f(10,20)
+30
connection default;
"================== Step 3 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
username status
user2 not found
@@ -162,9 +183,7 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/file/sql/query_log 4
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user1 localhost wait/io/file/sql/query_log 7
user1 localhost wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_user;
user event_name count_star
@@ -172,45 +191,44 @@ execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 4
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 7
wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 4
+wait/io/file/sql/query_log 7
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 6
-user1 localhost stage/sql/Init 5
-user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 4
+user1 localhost stage/sql/checking permissions 4
+user1 localhost stage/sql/closing tables 11
+user1 localhost stage/sql/init 3
+user1 localhost stage/sql/Opening tables 7
+user1 localhost stage/sql/starting 6
execute dump_stages_user;
user event_name count_star
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 6
-stage/sql/Init 5
-stage/sql/Init for update 1
-stage/sql/Opening tables 4
+stage/sql/checking permissions 4
+stage/sql/closing tables 11
+stage/sql/init 3
+stage/sql/Opening tables 7
+stage/sql/starting 6
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 3
-stage/sql/Closing tables 6
-stage/sql/Init 5
-stage/sql/Init for update 1
-stage/sql/Opening tables 4
+stage/sql/checking permissions 4
+stage/sql/closing tables 11
+stage/sql/init 3
+stage/sql/Opening tables 7
+stage/sql/starting 6
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 0
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
execute dump_statements_user;
user event_name count_star
execute dump_statements_host;
@@ -219,12 +237,27 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 1
statement/sql/insert 1
-statement/sql/select 2
+statement/sql/select 3
execute dump_statements_history;
event_name count(event_name)
+statement/sp/freturn 1
statement/sql/insert 1
-statement/sql/select 2
+statement/sql/select 3
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 2
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 2
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -238,14 +271,10 @@ connection default;
"================== Step 4 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
user2 wait/io/file/sql/query_log 1
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
user2 wait/synch/rwlock/sql/LOCK_grant 0
username status
user3 not found
@@ -253,13 +282,9 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/file/sql/query_log 4
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user1 localhost wait/io/file/sql/query_log 7
user1 localhost wait/synch/rwlock/sql/LOCK_grant 1
user2 localhost wait/io/file/sql/query_log 1
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_user;
user event_name count_star
@@ -267,52 +292,52 @@ execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 5
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 8
wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 5
+wait/io/file/sql/query_log 8
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 6
-user1 localhost stage/sql/Init 5
-user1 localhost stage/sql/Init for update 1
-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
-user2 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/checking permissions 4
+user1 localhost stage/sql/closing tables 11
+user1 localhost stage/sql/init 3
+user1 localhost stage/sql/Opening tables 7
+user1 localhost stage/sql/starting 6
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
user2 localhost stage/sql/Opening tables 0
+user2 localhost stage/sql/starting 0
execute dump_stages_user;
user event_name count_star
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 6
-stage/sql/Init 5
-stage/sql/Init for update 1
-stage/sql/Opening tables 4
+stage/sql/checking permissions 4
+stage/sql/closing tables 11
+stage/sql/init 3
+stage/sql/Opening tables 7
+stage/sql/starting 6
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 3
-stage/sql/Closing tables 6
-stage/sql/Init 5
-stage/sql/Init for update 1
-stage/sql/Opening tables 4
+stage/sql/checking permissions 4
+stage/sql/closing tables 11
+stage/sql/init 3
+stage/sql/Opening tables 7
+stage/sql/starting 6
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 0
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 0
+user2 localhost statement/sp/freturn 0
user2 localhost statement/sql/insert 0
user2 localhost statement/sql/select 0
execute dump_statements_user;
@@ -323,12 +348,28 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 1
statement/sql/insert 1
-statement/sql/select 2
+statement/sql/select 3
execute dump_statements_history;
event_name count(event_name)
+statement/sp/freturn 1
statement/sql/insert 1
-statement/sql/select 2
+statement/sql/select 3
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 0
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 2
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 2
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -339,25 +380,26 @@ USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
connection con2;
-select get_lock("marker", 10);
-get_lock("marker", 10)
+select uuid_short() <> 1;
+uuid_short() <> 1
1
-select release_lock("marker");
-release_lock("marker")
+select uuid_short() <> 1;
+uuid_short() <> 1
1
+start transaction;
insert into test.t1 values ("marker");
+commit;
+select test.f(10,20);
+test.f(10,20)
+30
connection default;
"================== Step 5 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user2 wait/io/file/sql/query_log 4
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 7
user2 wait/synch/rwlock/sql/LOCK_grant 1
username status
user3 not found
@@ -365,13 +407,9 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/file/sql/query_log 4
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user1 localhost wait/io/file/sql/query_log 7
user1 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user2 localhost wait/io/file/sql/query_log 4
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user2 localhost wait/io/file/sql/query_log 7
user2 localhost wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_user;
user event_name count_star
@@ -379,54 +417,54 @@ execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 8
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 14
wait/synch/rwlock/sql/LOCK_grant 2
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 8
+wait/io/file/sql/query_log 14
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 6
-user1 localhost stage/sql/Init 5
-user1 localhost stage/sql/Init for update 1
-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
-user2 localhost stage/sql/Init for update 1
-user2 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/checking permissions 4
+user1 localhost stage/sql/closing tables 11
+user1 localhost stage/sql/init 3
+user1 localhost stage/sql/Opening tables 7
+user1 localhost stage/sql/starting 6
+user2 localhost stage/sql/checking permissions 4
+user2 localhost stage/sql/closing tables 10
+user2 localhost stage/sql/init 3
+user2 localhost stage/sql/Opening tables 6
+user2 localhost stage/sql/starting 6
execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 6
-stage/sql/Closing tables 10
-stage/sql/Init 10
-stage/sql/Init for update 2
-stage/sql/Opening tables 7
+stage/sql/checking permissions 8
+stage/sql/closing tables 21
+stage/sql/init 6
+stage/sql/Opening tables 13
+stage/sql/starting 12
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 6
-stage/sql/Closing tables 10
-stage/sql/Init 10
-stage/sql/Init for update 2
-stage/sql/Opening tables 7
+stage/sql/checking permissions 8
+stage/sql/closing tables 21
+stage/sql/init 6
+stage/sql/Opening tables 13
+stage/sql/starting 12
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 0
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 0
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
execute dump_statements_user;
user event_name count_star
execute dump_statements_host;
@@ -435,12 +473,28 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 2
statement/sql/insert 2
-statement/sql/select 4
+statement/sql/select 6
execute dump_statements_history;
event_name count(event_name)
+statement/sp/freturn 2
statement/sql/insert 2
-statement/sql/select 4
+statement/sql/select 6
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 4
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 4
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -455,35 +509,23 @@ connection default;
"================== Step 6 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user2 wait/io/file/sql/query_log 4
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 7
user2 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
user3 wait/io/file/sql/query_log 1
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
user3 wait/synch/rwlock/sql/LOCK_grant 0
username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/file/sql/query_log 4
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user1 localhost wait/io/file/sql/query_log 7
user1 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user2 localhost wait/io/file/sql/query_log 4
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user2 localhost wait/io/file/sql/query_log 7
user2 localhost wait/synch/rwlock/sql/LOCK_grant 1
user3 localhost wait/io/file/sql/query_log 1
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_user;
user event_name count_star
@@ -491,61 +533,62 @@ execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 9
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 15
wait/synch/rwlock/sql/LOCK_grant 2
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 9
+wait/io/file/sql/query_log 15
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 6
-user1 localhost stage/sql/Init 5
-user1 localhost stage/sql/Init for update 1
-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
-user2 localhost stage/sql/Init for update 1
-user2 localhost stage/sql/Opening tables 3
-user3 localhost stage/sql/Checking permissions 0
-user3 localhost stage/sql/Closing tables 0
-user3 localhost stage/sql/Init 0
-user3 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/checking permissions 4
+user1 localhost stage/sql/closing tables 11
+user1 localhost stage/sql/init 3
+user1 localhost stage/sql/Opening tables 7
+user1 localhost stage/sql/starting 6
+user2 localhost stage/sql/checking permissions 4
+user2 localhost stage/sql/closing tables 10
+user2 localhost stage/sql/init 3
+user2 localhost stage/sql/Opening tables 6
+user2 localhost stage/sql/starting 6
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
user3 localhost stage/sql/Opening tables 0
+user3 localhost stage/sql/starting 0
execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 6
-stage/sql/Closing tables 10
-stage/sql/Init 10
-stage/sql/Init for update 2
-stage/sql/Opening tables 7
+stage/sql/checking permissions 8
+stage/sql/closing tables 21
+stage/sql/init 6
+stage/sql/Opening tables 13
+stage/sql/starting 12
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 6
-stage/sql/Closing tables 10
-stage/sql/Init 10
-stage/sql/Init for update 2
-stage/sql/Opening tables 7
+stage/sql/checking permissions 8
+stage/sql/closing tables 21
+stage/sql/init 6
+stage/sql/Opening tables 13
+stage/sql/starting 12
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 0
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 0
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 0
+user3 localhost statement/sp/freturn 0
user3 localhost statement/sql/insert 0
user3 localhost statement/sql/select 0
execute dump_statements_user;
@@ -556,12 +599,29 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 2
statement/sql/insert 2
-statement/sql/select 4
+statement/sql/select 6
execute dump_statements_history;
event_name count(event_name)
+statement/sp/freturn 2
statement/sql/insert 2
-statement/sql/select 4
+statement/sql/select 6
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 0
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 4
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 4
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -573,46 +633,39 @@ USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
connection con3;
-select get_lock("marker", 10);
-get_lock("marker", 10)
+select uuid_short() <> 1;
+uuid_short() <> 1
1
-select release_lock("marker");
-release_lock("marker")
+select uuid_short() <> 1;
+uuid_short() <> 1
1
+start transaction;
insert into test.t1 values ("marker");
+commit;
+select test.f(10,20);
+test.f(10,20)
+30
connection default;
"================== Step 7 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user2 wait/io/file/sql/query_log 4
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 7
user2 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user3 wait/io/file/sql/query_log 4
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/io/file/sql/query_log 7
user3 wait/synch/rwlock/sql/LOCK_grant 1
username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/file/sql/query_log 4
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user1 localhost wait/io/file/sql/query_log 7
user1 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user2 localhost wait/io/file/sql/query_log 4
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user2 localhost wait/io/file/sql/query_log 7
user2 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user3 localhost wait/io/file/sql/query_log 4
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user3 localhost wait/io/file/sql/query_log 7
user3 localhost wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_user;
user event_name count_star
@@ -620,63 +673,64 @@ execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 12
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 21
wait/synch/rwlock/sql/LOCK_grant 3
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 12
+wait/io/file/sql/query_log 21
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 6
-user1 localhost stage/sql/Init 5
-user1 localhost stage/sql/Init for update 1
-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
-user2 localhost stage/sql/Init for update 1
-user2 localhost stage/sql/Opening tables 3
-user3 localhost stage/sql/Checking permissions 3
-user3 localhost stage/sql/Closing tables 4
-user3 localhost stage/sql/Init 5
-user3 localhost stage/sql/Init for update 1
-user3 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/checking permissions 4
+user1 localhost stage/sql/closing tables 11
+user1 localhost stage/sql/init 3
+user1 localhost stage/sql/Opening tables 7
+user1 localhost stage/sql/starting 6
+user2 localhost stage/sql/checking permissions 4
+user2 localhost stage/sql/closing tables 10
+user2 localhost stage/sql/init 3
+user2 localhost stage/sql/Opening tables 6
+user2 localhost stage/sql/starting 6
+user3 localhost stage/sql/checking permissions 4
+user3 localhost stage/sql/closing tables 10
+user3 localhost stage/sql/init 3
+user3 localhost stage/sql/Opening tables 6
+user3 localhost stage/sql/starting 6
execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 9
-stage/sql/Closing tables 14
-stage/sql/Init 15
-stage/sql/Init for update 3
-stage/sql/Opening tables 10
+stage/sql/checking permissions 12
+stage/sql/closing tables 31
+stage/sql/init 9
+stage/sql/Opening tables 19
+stage/sql/starting 18
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 9
-stage/sql/Closing tables 14
-stage/sql/Init 15
-stage/sql/Init for update 3
-stage/sql/Opening tables 10
+stage/sql/checking permissions 12
+stage/sql/closing tables 31
+stage/sql/init 9
+stage/sql/Opening tables 19
+stage/sql/starting 18
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 0
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 0
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 0
+user3 localhost statement/sp/freturn 1
user3 localhost statement/sql/insert 1
-user3 localhost statement/sql/select 2
+user3 localhost statement/sql/select 3
execute dump_statements_user;
user event_name count_star
execute dump_statements_host;
@@ -685,12 +739,29 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 3
statement/sql/insert 3
-statement/sql/select 6
+statement/sql/select 9
execute dump_statements_history;
event_name count(event_name)
+statement/sp/freturn 3
statement/sql/insert 3
-statement/sql/select 6
+statement/sql/select 9
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 6
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 6
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -706,42 +777,26 @@ connection default;
"================== Step 8 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user2 wait/io/file/sql/query_log 4
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 7
user2 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user3 wait/io/file/sql/query_log 4
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/io/file/sql/query_log 7
user3 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
user4 wait/io/file/sql/query_log 1
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
user4 wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/file/sql/query_log 4
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user1 localhost wait/io/file/sql/query_log 7
user1 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user2 localhost wait/io/file/sql/query_log 4
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user2 localhost wait/io/file/sql/query_log 7
user2 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user3 localhost wait/io/file/sql/query_log 4
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user3 localhost wait/io/file/sql/query_log 7
user3 localhost wait/synch/rwlock/sql/LOCK_grant 1
user4 localhost wait/io/file/sql/query_log 1
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_user;
user event_name count_star
@@ -749,70 +804,72 @@ execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 13
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 22
wait/synch/rwlock/sql/LOCK_grant 3
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 13
+wait/io/file/sql/query_log 22
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 6
-user1 localhost stage/sql/Init 5
-user1 localhost stage/sql/Init for update 1
-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
-user2 localhost stage/sql/Init for update 1
-user2 localhost stage/sql/Opening tables 3
-user3 localhost stage/sql/Checking permissions 3
-user3 localhost stage/sql/Closing tables 4
-user3 localhost stage/sql/Init 5
-user3 localhost stage/sql/Init for update 1
-user3 localhost stage/sql/Opening tables 3
-user4 localhost stage/sql/Checking permissions 0
-user4 localhost stage/sql/Closing tables 0
-user4 localhost stage/sql/Init 0
-user4 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/checking permissions 4
+user1 localhost stage/sql/closing tables 11
+user1 localhost stage/sql/init 3
+user1 localhost stage/sql/Opening tables 7
+user1 localhost stage/sql/starting 6
+user2 localhost stage/sql/checking permissions 4
+user2 localhost stage/sql/closing tables 10
+user2 localhost stage/sql/init 3
+user2 localhost stage/sql/Opening tables 6
+user2 localhost stage/sql/starting 6
+user3 localhost stage/sql/checking permissions 4
+user3 localhost stage/sql/closing tables 10
+user3 localhost stage/sql/init 3
+user3 localhost stage/sql/Opening tables 6
+user3 localhost stage/sql/starting 6
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
user4 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/starting 0
execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 9
-stage/sql/Closing tables 14
-stage/sql/Init 15
-stage/sql/Init for update 3
-stage/sql/Opening tables 10
+stage/sql/checking permissions 12
+stage/sql/closing tables 31
+stage/sql/init 9
+stage/sql/Opening tables 19
+stage/sql/starting 18
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 9
-stage/sql/Closing tables 14
-stage/sql/Init 15
-stage/sql/Init for update 3
-stage/sql/Opening tables 10
+stage/sql/checking permissions 12
+stage/sql/closing tables 31
+stage/sql/init 9
+stage/sql/Opening tables 19
+stage/sql/starting 18
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 0
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 0
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 0
+user3 localhost statement/sp/freturn 1
user3 localhost statement/sql/insert 1
-user3 localhost statement/sql/select 2
+user3 localhost statement/sql/select 3
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 0
+user4 localhost statement/sp/freturn 0
user4 localhost statement/sql/insert 0
user4 localhost statement/sql/select 0
execute dump_statements_user;
@@ -823,12 +880,30 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 3
statement/sql/insert 3
-statement/sql/select 6
+statement/sql/select 9
execute dump_statements_history;
event_name count(event_name)
+statement/sp/freturn 3
statement/sql/insert 3
-statement/sql/select 6
+statement/sql/select 9
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 0
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 6
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 6
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -841,53 +916,42 @@ USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
connection con4;
-select get_lock("marker", 10);
-get_lock("marker", 10)
+select uuid_short() <> 1;
+uuid_short() <> 1
1
-select release_lock("marker");
-release_lock("marker")
+select uuid_short() <> 1;
+uuid_short() <> 1
1
+start transaction;
insert into test.t1 values ("marker");
+commit;
+select test.f(10,20);
+test.f(10,20)
+30
connection default;
"================== Step 9 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/file/sql/query_log 4
-user1 wait/synch/mutex/sql/LOCK_connection_count 0
-user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/io/file/sql/query_log 7
user1 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user2 wait/io/file/sql/query_log 4
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 7
user2 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user3 wait/io/file/sql/query_log 4
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/io/file/sql/query_log 7
user3 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user4 wait/io/file/sql/query_log 4
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/io/file/sql/query_log 7
user4 wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/file/sql/query_log 4
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user1 localhost wait/io/file/sql/query_log 7
user1 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user2 localhost wait/io/file/sql/query_log 4
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user2 localhost wait/io/file/sql/query_log 7
user2 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user3 localhost wait/io/file/sql/query_log 4
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user3 localhost wait/io/file/sql/query_log 7
user3 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user4 localhost wait/io/file/sql/query_log 4
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user4 localhost wait/io/file/sql/query_log 7
user4 localhost wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_user;
user event_name count_star
@@ -895,72 +959,74 @@ execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 16
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 28
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 16
+wait/io/file/sql/query_log 28
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 6
-user1 localhost stage/sql/Init 5
-user1 localhost stage/sql/Init for update 1
-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
-user2 localhost stage/sql/Init for update 1
-user2 localhost stage/sql/Opening tables 3
-user3 localhost stage/sql/Checking permissions 3
-user3 localhost stage/sql/Closing tables 4
-user3 localhost stage/sql/Init 5
-user3 localhost stage/sql/Init for update 1
-user3 localhost stage/sql/Opening tables 3
-user4 localhost stage/sql/Checking permissions 3
-user4 localhost stage/sql/Closing tables 4
-user4 localhost stage/sql/Init 5
-user4 localhost stage/sql/Init for update 1
-user4 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/checking permissions 4
+user1 localhost stage/sql/closing tables 11
+user1 localhost stage/sql/init 3
+user1 localhost stage/sql/Opening tables 7
+user1 localhost stage/sql/starting 6
+user2 localhost stage/sql/checking permissions 4
+user2 localhost stage/sql/closing tables 10
+user2 localhost stage/sql/init 3
+user2 localhost stage/sql/Opening tables 6
+user2 localhost stage/sql/starting 6
+user3 localhost stage/sql/checking permissions 4
+user3 localhost stage/sql/closing tables 10
+user3 localhost stage/sql/init 3
+user3 localhost stage/sql/Opening tables 6
+user3 localhost stage/sql/starting 6
+user4 localhost stage/sql/checking permissions 4
+user4 localhost stage/sql/closing tables 10
+user4 localhost stage/sql/init 3
+user4 localhost stage/sql/Opening tables 6
+user4 localhost stage/sql/starting 6
execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 20
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 24
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 20
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 24
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 0
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 0
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 0
+user3 localhost statement/sp/freturn 1
user3 localhost statement/sql/insert 1
-user3 localhost statement/sql/select 2
+user3 localhost statement/sql/select 3
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 0
+user4 localhost statement/sp/freturn 1
user4 localhost statement/sql/insert 1
-user4 localhost statement/sql/select 2
+user4 localhost statement/sql/select 3
execute dump_statements_user;
user event_name count_star
execute dump_statements_host;
@@ -969,12 +1035,30 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -993,37 +1077,23 @@ call dump_thread();
username status
user1 not found
username event_name count_star
-user2 wait/io/file/sql/query_log 4
-user2 wait/synch/mutex/sql/LOCK_connection_count 0
-user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/io/file/sql/query_log 7
user2 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user3 wait/io/file/sql/query_log 4
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/io/file/sql/query_log 7
user3 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user4 wait/io/file/sql/query_log 4
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/io/file/sql/query_log 7
user4 wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/file/sql/query_log 5
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 1
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user1 localhost wait/io/file/sql/query_log 8
user1 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user2 localhost wait/io/file/sql/query_log 4
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user2 localhost wait/io/file/sql/query_log 7
user2 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user3 localhost wait/io/file/sql/query_log 4
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user3 localhost wait/io/file/sql/query_log 7
user3 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user4 localhost wait/io/file/sql/query_log 4
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user4 localhost wait/io/file/sql/query_log 7
user4 localhost wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_user;
user event_name count_star
@@ -1031,73 +1101,74 @@ execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 17
-wait/synch/mutex/sql/LOCK_connection_count 1
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 29
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 17
-wait/synch/mutex/sql/LOCK_connection_count 1
+wait/io/file/sql/query_log 29
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 6
-user1 localhost stage/sql/Init 6
-user1 localhost stage/sql/Init for update 1
-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
-user2 localhost stage/sql/Init for update 1
-user2 localhost stage/sql/Opening tables 3
-user3 localhost stage/sql/Checking permissions 3
-user3 localhost stage/sql/Closing tables 4
-user3 localhost stage/sql/Init 5
-user3 localhost stage/sql/Init for update 1
-user3 localhost stage/sql/Opening tables 3
-user4 localhost stage/sql/Checking permissions 3
-user4 localhost stage/sql/Closing tables 4
-user4 localhost stage/sql/Init 5
-user4 localhost stage/sql/Init for update 1
-user4 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/checking permissions 4
+user1 localhost stage/sql/closing tables 11
+user1 localhost stage/sql/init 3
+user1 localhost stage/sql/Opening tables 7
+user1 localhost stage/sql/starting 7
+user2 localhost stage/sql/checking permissions 4
+user2 localhost stage/sql/closing tables 10
+user2 localhost stage/sql/init 3
+user2 localhost stage/sql/Opening tables 6
+user2 localhost stage/sql/starting 6
+user3 localhost stage/sql/checking permissions 4
+user3 localhost stage/sql/closing tables 10
+user3 localhost stage/sql/init 3
+user3 localhost stage/sql/Opening tables 6
+user3 localhost stage/sql/starting 6
+user4 localhost stage/sql/checking permissions 4
+user4 localhost stage/sql/closing tables 10
+user4 localhost stage/sql/init 3
+user4 localhost stage/sql/Opening tables 6
+user4 localhost stage/sql/starting 6
execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 21
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 25
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 21
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 25
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 1
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 0
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 0
+user3 localhost statement/sp/freturn 1
user3 localhost statement/sql/insert 1
-user3 localhost statement/sql/select 2
+user3 localhost statement/sql/select 3
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 0
+user4 localhost statement/sp/freturn 1
user4 localhost statement/sql/insert 1
-user4 localhost statement/sql/select 2
+user4 localhost statement/sql/select 3
execute dump_statements_user;
user event_name count_star
execute dump_statements_host;
@@ -1106,13 +1177,31 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 1
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 1
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -1133,32 +1222,20 @@ user1 not found
username status
user2 not found
username event_name count_star
-user3 wait/io/file/sql/query_log 4
-user3 wait/synch/mutex/sql/LOCK_connection_count 0
-user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/io/file/sql/query_log 7
user3 wait/synch/rwlock/sql/LOCK_grant 1
username event_name count_star
-user4 wait/io/file/sql/query_log 4
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/io/file/sql/query_log 7
user4 wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/file/sql/query_log 5
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 1
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user1 localhost wait/io/file/sql/query_log 8
user1 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user2 localhost wait/io/file/sql/query_log 5
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 1
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user2 localhost wait/io/file/sql/query_log 8
user2 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user3 localhost wait/io/file/sql/query_log 4
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user3 localhost wait/io/file/sql/query_log 7
user3 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user4 localhost wait/io/file/sql/query_log 4
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user4 localhost wait/io/file/sql/query_log 7
user4 localhost wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_user;
user event_name count_star
@@ -1166,73 +1243,74 @@ execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 18
-wait/synch/mutex/sql/LOCK_connection_count 2
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 30
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 18
-wait/synch/mutex/sql/LOCK_connection_count 2
+wait/io/file/sql/query_log 30
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 6
-user1 localhost stage/sql/Init 6
-user1 localhost stage/sql/Init for update 1
-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
-user2 localhost stage/sql/Init for update 1
-user2 localhost stage/sql/Opening tables 3
-user3 localhost stage/sql/Checking permissions 3
-user3 localhost stage/sql/Closing tables 4
-user3 localhost stage/sql/Init 5
-user3 localhost stage/sql/Init for update 1
-user3 localhost stage/sql/Opening tables 3
-user4 localhost stage/sql/Checking permissions 3
-user4 localhost stage/sql/Closing tables 4
-user4 localhost stage/sql/Init 5
-user4 localhost stage/sql/Init for update 1
-user4 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/checking permissions 4
+user1 localhost stage/sql/closing tables 11
+user1 localhost stage/sql/init 3
+user1 localhost stage/sql/Opening tables 7
+user1 localhost stage/sql/starting 7
+user2 localhost stage/sql/checking permissions 4
+user2 localhost stage/sql/closing tables 10
+user2 localhost stage/sql/init 3
+user2 localhost stage/sql/Opening tables 6
+user2 localhost stage/sql/starting 7
+user3 localhost stage/sql/checking permissions 4
+user3 localhost stage/sql/closing tables 10
+user3 localhost stage/sql/init 3
+user3 localhost stage/sql/Opening tables 6
+user3 localhost stage/sql/starting 6
+user4 localhost stage/sql/checking permissions 4
+user4 localhost stage/sql/closing tables 10
+user4 localhost stage/sql/init 3
+user4 localhost stage/sql/Opening tables 6
+user4 localhost stage/sql/starting 6
execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 22
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 26
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 22
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 26
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 1
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 1
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 0
+user3 localhost statement/sp/freturn 1
user3 localhost statement/sql/insert 1
-user3 localhost statement/sql/select 2
+user3 localhost statement/sql/select 3
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 0
+user4 localhost statement/sp/freturn 1
user4 localhost statement/sql/insert 1
-user4 localhost statement/sql/select 2
+user4 localhost statement/sql/select 3
execute dump_statements_user;
user event_name count_star
execute dump_statements_host;
@@ -1241,13 +1319,31 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 2
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 2
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -1270,27 +1366,17 @@ user2 not found
username status
user3 not found
username event_name count_star
-user4 wait/io/file/sql/query_log 4
-user4 wait/synch/mutex/sql/LOCK_connection_count 0
-user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/io/file/sql/query_log 7
user4 wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/file/sql/query_log 5
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 1
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user1 localhost wait/io/file/sql/query_log 8
user1 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user2 localhost wait/io/file/sql/query_log 5
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 1
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user2 localhost wait/io/file/sql/query_log 8
user2 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user3 localhost wait/io/file/sql/query_log 5
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 1
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user3 localhost wait/io/file/sql/query_log 8
user3 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user4 localhost wait/io/file/sql/query_log 4
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user4 localhost wait/io/file/sql/query_log 7
user4 localhost wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_user;
user event_name count_star
@@ -1298,73 +1384,74 @@ execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 19
-wait/synch/mutex/sql/LOCK_connection_count 3
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 31
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 19
-wait/synch/mutex/sql/LOCK_connection_count 3
+wait/io/file/sql/query_log 31
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 6
-user1 localhost stage/sql/Init 6
-user1 localhost stage/sql/Init for update 1
-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
-user2 localhost stage/sql/Init for update 1
-user2 localhost stage/sql/Opening tables 3
-user3 localhost stage/sql/Checking permissions 3
-user3 localhost stage/sql/Closing tables 4
-user3 localhost stage/sql/Init 6
-user3 localhost stage/sql/Init for update 1
-user3 localhost stage/sql/Opening tables 3
-user4 localhost stage/sql/Checking permissions 3
-user4 localhost stage/sql/Closing tables 4
-user4 localhost stage/sql/Init 5
-user4 localhost stage/sql/Init for update 1
-user4 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/checking permissions 4
+user1 localhost stage/sql/closing tables 11
+user1 localhost stage/sql/init 3
+user1 localhost stage/sql/Opening tables 7
+user1 localhost stage/sql/starting 7
+user2 localhost stage/sql/checking permissions 4
+user2 localhost stage/sql/closing tables 10
+user2 localhost stage/sql/init 3
+user2 localhost stage/sql/Opening tables 6
+user2 localhost stage/sql/starting 7
+user3 localhost stage/sql/checking permissions 4
+user3 localhost stage/sql/closing tables 10
+user3 localhost stage/sql/init 3
+user3 localhost stage/sql/Opening tables 6
+user3 localhost stage/sql/starting 7
+user4 localhost stage/sql/checking permissions 4
+user4 localhost stage/sql/closing tables 10
+user4 localhost stage/sql/init 3
+user4 localhost stage/sql/Opening tables 6
+user4 localhost stage/sql/starting 6
execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 23
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 27
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 23
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 27
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 1
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 1
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 1
+user3 localhost statement/sp/freturn 1
user3 localhost statement/sql/insert 1
-user3 localhost statement/sql/select 2
+user3 localhost statement/sql/select 3
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 0
+user4 localhost statement/sp/freturn 1
user4 localhost statement/sql/insert 1
-user4 localhost statement/sql/select 2
+user4 localhost statement/sql/select 3
execute dump_statements_user;
user event_name count_star
execute dump_statements_host;
@@ -1373,13 +1460,31 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 3
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 3
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -1405,21 +1510,13 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/file/sql/query_log 5
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 1
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user1 localhost wait/io/file/sql/query_log 8
user1 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user2 localhost wait/io/file/sql/query_log 5
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 1
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user2 localhost wait/io/file/sql/query_log 8
user2 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user3 localhost wait/io/file/sql/query_log 5
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 1
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user3 localhost wait/io/file/sql/query_log 8
user3 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user4 localhost wait/io/file/sql/query_log 5
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 1
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user4 localhost wait/io/file/sql/query_log 8
user4 localhost wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_user;
user event_name count_star
@@ -1427,73 +1524,74 @@ execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
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 6
-user1 localhost stage/sql/Init 6
-user1 localhost stage/sql/Init for update 1
-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
-user2 localhost stage/sql/Init for update 1
-user2 localhost stage/sql/Opening tables 3
-user3 localhost stage/sql/Checking permissions 3
-user3 localhost stage/sql/Closing tables 4
-user3 localhost stage/sql/Init 6
-user3 localhost stage/sql/Init for update 1
-user3 localhost stage/sql/Opening tables 3
-user4 localhost stage/sql/Checking permissions 3
-user4 localhost stage/sql/Closing tables 4
-user4 localhost stage/sql/Init 6
-user4 localhost stage/sql/Init for update 1
-user4 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/checking permissions 4
+user1 localhost stage/sql/closing tables 11
+user1 localhost stage/sql/init 3
+user1 localhost stage/sql/Opening tables 7
+user1 localhost stage/sql/starting 7
+user2 localhost stage/sql/checking permissions 4
+user2 localhost stage/sql/closing tables 10
+user2 localhost stage/sql/init 3
+user2 localhost stage/sql/Opening tables 6
+user2 localhost stage/sql/starting 7
+user3 localhost stage/sql/checking permissions 4
+user3 localhost stage/sql/closing tables 10
+user3 localhost stage/sql/init 3
+user3 localhost stage/sql/Opening tables 6
+user3 localhost stage/sql/starting 7
+user4 localhost stage/sql/checking permissions 4
+user4 localhost stage/sql/closing tables 10
+user4 localhost stage/sql/init 3
+user4 localhost stage/sql/Opening tables 6
+user4 localhost stage/sql/starting 7
execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 1
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 1
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 1
+user3 localhost statement/sp/freturn 1
user3 localhost statement/sql/insert 1
-user3 localhost statement/sql/select 2
+user3 localhost statement/sql/select 3
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 1
+user4 localhost statement/sp/freturn 1
user4 localhost statement/sql/insert 1
-user4 localhost statement/sql/select 2
+user4 localhost statement/sql/select 3
execute dump_statements_user;
user event_name count_star
execute dump_statements_host;
@@ -1502,13 +1600,31 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -1535,21 +1651,13 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/file/sql/query_log 5
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 1
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user1 localhost wait/io/file/sql/query_log 8
user1 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user2 localhost wait/io/file/sql/query_log 5
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 1
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user2 localhost wait/io/file/sql/query_log 8
user2 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user3 localhost wait/io/file/sql/query_log 5
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 1
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user3 localhost wait/io/file/sql/query_log 8
user3 localhost wait/synch/rwlock/sql/LOCK_grant 1
-user4 localhost wait/io/file/sql/query_log 5
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 1
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
+user4 localhost wait/io/file/sql/query_log 8
user4 localhost wait/synch/rwlock/sql/LOCK_grant 1
execute dump_waits_user;
user event_name count_star
@@ -1557,73 +1665,74 @@ execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
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 6
-user1 localhost stage/sql/Init 6
-user1 localhost stage/sql/Init for update 1
-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
-user2 localhost stage/sql/Init for update 1
-user2 localhost stage/sql/Opening tables 3
-user3 localhost stage/sql/Checking permissions 3
-user3 localhost stage/sql/Closing tables 4
-user3 localhost stage/sql/Init 6
-user3 localhost stage/sql/Init for update 1
-user3 localhost stage/sql/Opening tables 3
-user4 localhost stage/sql/Checking permissions 3
-user4 localhost stage/sql/Closing tables 4
-user4 localhost stage/sql/Init 6
-user4 localhost stage/sql/Init for update 1
-user4 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/checking permissions 4
+user1 localhost stage/sql/closing tables 11
+user1 localhost stage/sql/init 3
+user1 localhost stage/sql/Opening tables 7
+user1 localhost stage/sql/starting 7
+user2 localhost stage/sql/checking permissions 4
+user2 localhost stage/sql/closing tables 10
+user2 localhost stage/sql/init 3
+user2 localhost stage/sql/Opening tables 6
+user2 localhost stage/sql/starting 7
+user3 localhost stage/sql/checking permissions 4
+user3 localhost stage/sql/closing tables 10
+user3 localhost stage/sql/init 3
+user3 localhost stage/sql/Opening tables 6
+user3 localhost stage/sql/starting 7
+user4 localhost stage/sql/checking permissions 4
+user4 localhost stage/sql/closing tables 10
+user4 localhost stage/sql/init 3
+user4 localhost stage/sql/Opening tables 6
+user4 localhost stage/sql/starting 7
execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 1
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 1
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 1
+user3 localhost statement/sp/freturn 1
user3 localhost statement/sql/insert 1
-user3 localhost statement/sql/select 2
+user3 localhost statement/sql/select 3
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 1
+user4 localhost statement/sp/freturn 1
user4 localhost statement/sql/insert 1
-user4 localhost statement/sql/select 2
+user4 localhost statement/sql/select 3
execute dump_statements_user;
user event_name count_star
execute dump_statements_host;
@@ -1632,13 +1741,31 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -1665,20 +1792,12 @@ user4 not found
execute dump_waits_account;
user host event_name count_star
user1 localhost wait/io/file/sql/query_log 0
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
user2 localhost wait/io/file/sql/query_log 0
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
user3 localhost wait/io/file/sql/query_log 0
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
user4 localhost wait/io/file/sql/query_log 0
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_user;
user event_name count_star
@@ -1686,73 +1805,74 @@ execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
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 6
-user1 localhost stage/sql/Init 6
-user1 localhost stage/sql/Init for update 1
-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
-user2 localhost stage/sql/Init for update 1
-user2 localhost stage/sql/Opening tables 3
-user3 localhost stage/sql/Checking permissions 3
-user3 localhost stage/sql/Closing tables 4
-user3 localhost stage/sql/Init 6
-user3 localhost stage/sql/Init for update 1
-user3 localhost stage/sql/Opening tables 3
-user4 localhost stage/sql/Checking permissions 3
-user4 localhost stage/sql/Closing tables 4
-user4 localhost stage/sql/Init 6
-user4 localhost stage/sql/Init for update 1
-user4 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/checking permissions 4
+user1 localhost stage/sql/closing tables 11
+user1 localhost stage/sql/init 3
+user1 localhost stage/sql/Opening tables 7
+user1 localhost stage/sql/starting 7
+user2 localhost stage/sql/checking permissions 4
+user2 localhost stage/sql/closing tables 10
+user2 localhost stage/sql/init 3
+user2 localhost stage/sql/Opening tables 6
+user2 localhost stage/sql/starting 7
+user3 localhost stage/sql/checking permissions 4
+user3 localhost stage/sql/closing tables 10
+user3 localhost stage/sql/init 3
+user3 localhost stage/sql/Opening tables 6
+user3 localhost stage/sql/starting 7
+user4 localhost stage/sql/checking permissions 4
+user4 localhost stage/sql/closing tables 10
+user4 localhost stage/sql/init 3
+user4 localhost stage/sql/Opening tables 6
+user4 localhost stage/sql/starting 7
execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 1
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 1
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 1
+user3 localhost statement/sp/freturn 1
user3 localhost statement/sql/insert 1
-user3 localhost statement/sql/select 2
+user3 localhost statement/sql/select 3
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 1
+user4 localhost statement/sp/freturn 1
user4 localhost statement/sql/insert 1
-user4 localhost statement/sql/select 2
+user4 localhost statement/sql/select 3
execute dump_statements_user;
user event_name count_star
execute dump_statements_host;
@@ -1761,13 +1881,31 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -1794,20 +1932,12 @@ user4 not found
execute dump_waits_account;
user host event_name count_star
user1 localhost wait/io/file/sql/query_log 0
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
user2 localhost wait/io/file/sql/query_log 0
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
user3 localhost wait/io/file/sql/query_log 0
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
user4 localhost wait/io/file/sql/query_log 0
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_user;
user event_name count_star
@@ -1815,73 +1945,74 @@ execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
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 6
-user1 localhost stage/sql/Init 6
-user1 localhost stage/sql/Init for update 1
-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
-user2 localhost stage/sql/Init for update 1
-user2 localhost stage/sql/Opening tables 3
-user3 localhost stage/sql/Checking permissions 3
-user3 localhost stage/sql/Closing tables 4
-user3 localhost stage/sql/Init 6
-user3 localhost stage/sql/Init for update 1
-user3 localhost stage/sql/Opening tables 3
-user4 localhost stage/sql/Checking permissions 3
-user4 localhost stage/sql/Closing tables 4
-user4 localhost stage/sql/Init 6
-user4 localhost stage/sql/Init for update 1
-user4 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/checking permissions 4
+user1 localhost stage/sql/closing tables 11
+user1 localhost stage/sql/init 3
+user1 localhost stage/sql/Opening tables 7
+user1 localhost stage/sql/starting 7
+user2 localhost stage/sql/checking permissions 4
+user2 localhost stage/sql/closing tables 10
+user2 localhost stage/sql/init 3
+user2 localhost stage/sql/Opening tables 6
+user2 localhost stage/sql/starting 7
+user3 localhost stage/sql/checking permissions 4
+user3 localhost stage/sql/closing tables 10
+user3 localhost stage/sql/init 3
+user3 localhost stage/sql/Opening tables 6
+user3 localhost stage/sql/starting 7
+user4 localhost stage/sql/checking permissions 4
+user4 localhost stage/sql/closing tables 10
+user4 localhost stage/sql/init 3
+user4 localhost stage/sql/Opening tables 6
+user4 localhost stage/sql/starting 7
execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 1
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 1
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 1
+user3 localhost statement/sp/freturn 1
user3 localhost statement/sql/insert 1
-user3 localhost statement/sql/select 2
+user3 localhost statement/sql/select 3
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 1
+user4 localhost statement/sp/freturn 1
user4 localhost statement/sql/insert 1
-user4 localhost statement/sql/select 2
+user4 localhost statement/sql/select 3
execute dump_statements_user;
user event_name count_star
execute dump_statements_host;
@@ -1890,13 +2021,31 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -1923,20 +2072,12 @@ user4 not found
execute dump_waits_account;
user host event_name count_star
user1 localhost wait/io/file/sql/query_log 0
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
user2 localhost wait/io/file/sql/query_log 0
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
user3 localhost wait/io/file/sql/query_log 0
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
user4 localhost wait/io/file/sql/query_log 0
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_user;
user event_name count_star
@@ -1944,73 +2085,74 @@ execute dump_waits_host;
host event_name count_star
execute dump_waits_global;
event_name count_star
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
-wait/synch/mutex/sql/LOCK_user_locks 0
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
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 6
-user1 localhost stage/sql/Init 6
-user1 localhost stage/sql/Init for update 1
-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
-user2 localhost stage/sql/Init for update 1
-user2 localhost stage/sql/Opening tables 3
-user3 localhost stage/sql/Checking permissions 3
-user3 localhost stage/sql/Closing tables 4
-user3 localhost stage/sql/Init 6
-user3 localhost stage/sql/Init for update 1
-user3 localhost stage/sql/Opening tables 3
-user4 localhost stage/sql/Checking permissions 3
-user4 localhost stage/sql/Closing tables 4
-user4 localhost stage/sql/Init 6
-user4 localhost stage/sql/Init for update 1
-user4 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/checking permissions 4
+user1 localhost stage/sql/closing tables 11
+user1 localhost stage/sql/init 3
+user1 localhost stage/sql/Opening tables 7
+user1 localhost stage/sql/starting 7
+user2 localhost stage/sql/checking permissions 4
+user2 localhost stage/sql/closing tables 10
+user2 localhost stage/sql/init 3
+user2 localhost stage/sql/Opening tables 6
+user2 localhost stage/sql/starting 7
+user3 localhost stage/sql/checking permissions 4
+user3 localhost stage/sql/closing tables 10
+user3 localhost stage/sql/init 3
+user3 localhost stage/sql/Opening tables 6
+user3 localhost stage/sql/starting 7
+user4 localhost stage/sql/checking permissions 4
+user4 localhost stage/sql/closing tables 10
+user4 localhost stage/sql/init 3
+user4 localhost stage/sql/Opening tables 6
+user4 localhost stage/sql/starting 7
execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 1
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 1
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 1
+user3 localhost statement/sp/freturn 1
user3 localhost statement/sql/insert 1
-user3 localhost statement/sql/select 2
+user3 localhost statement/sql/select 3
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 1
+user4 localhost statement/sp/freturn 1
user4 localhost statement/sql/insert 1
-user4 localhost statement/sql/select 2
+user4 localhost statement/sql/select 3
execute dump_statements_user;
user event_name count_star
execute dump_statements_host;
@@ -2019,13 +2161,31 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -2052,20 +2212,12 @@ user4 not found
execute dump_waits_account;
user host event_name count_star
user1 localhost wait/io/file/sql/query_log 0
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
user2 localhost wait/io/file/sql/query_log 0
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
user3 localhost wait/io/file/sql/query_log 0
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
user4 localhost wait/io/file/sql/query_log 0
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_user;
user event_name count_star
@@ -2074,72 +2226,73 @@ host event_name count_star
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
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 6
-user1 localhost stage/sql/Init 6
-user1 localhost stage/sql/Init for update 1
-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
-user2 localhost stage/sql/Init for update 1
-user2 localhost stage/sql/Opening tables 3
-user3 localhost stage/sql/Checking permissions 3
-user3 localhost stage/sql/Closing tables 4
-user3 localhost stage/sql/Init 6
-user3 localhost stage/sql/Init for update 1
-user3 localhost stage/sql/Opening tables 3
-user4 localhost stage/sql/Checking permissions 3
-user4 localhost stage/sql/Closing tables 4
-user4 localhost stage/sql/Init 6
-user4 localhost stage/sql/Init for update 1
-user4 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/checking permissions 4
+user1 localhost stage/sql/closing tables 11
+user1 localhost stage/sql/init 3
+user1 localhost stage/sql/Opening tables 7
+user1 localhost stage/sql/starting 7
+user2 localhost stage/sql/checking permissions 4
+user2 localhost stage/sql/closing tables 10
+user2 localhost stage/sql/init 3
+user2 localhost stage/sql/Opening tables 6
+user2 localhost stage/sql/starting 7
+user3 localhost stage/sql/checking permissions 4
+user3 localhost stage/sql/closing tables 10
+user3 localhost stage/sql/init 3
+user3 localhost stage/sql/Opening tables 6
+user3 localhost stage/sql/starting 7
+user4 localhost stage/sql/checking permissions 4
+user4 localhost stage/sql/closing tables 10
+user4 localhost stage/sql/init 3
+user4 localhost stage/sql/Opening tables 6
+user4 localhost stage/sql/starting 7
execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 1
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 1
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 1
+user3 localhost statement/sp/freturn 1
user3 localhost statement/sql/insert 1
-user3 localhost statement/sql/select 2
+user3 localhost statement/sql/select 3
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 1
+user4 localhost statement/sp/freturn 1
user4 localhost statement/sql/insert 1
-user4 localhost statement/sql/select 2
+user4 localhost statement/sql/select 3
execute dump_statements_user;
user event_name count_star
execute dump_statements_host;
@@ -2148,13 +2301,31 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -2181,20 +2352,12 @@ user4 not found
execute dump_waits_account;
user host event_name count_star
user1 localhost wait/io/file/sql/query_log 0
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
user2 localhost wait/io/file/sql/query_log 0
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
user3 localhost wait/io/file/sql/query_log 0
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
user4 localhost wait/io/file/sql/query_log 0
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_user;
user event_name count_star
@@ -2203,72 +2366,73 @@ host event_name count_star
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
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 6
-user1 localhost stage/sql/Init 6
-user1 localhost stage/sql/Init for update 1
-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
-user2 localhost stage/sql/Init for update 1
-user2 localhost stage/sql/Opening tables 3
-user3 localhost stage/sql/Checking permissions 3
-user3 localhost stage/sql/Closing tables 4
-user3 localhost stage/sql/Init 6
-user3 localhost stage/sql/Init for update 1
-user3 localhost stage/sql/Opening tables 3
-user4 localhost stage/sql/Checking permissions 3
-user4 localhost stage/sql/Closing tables 4
-user4 localhost stage/sql/Init 6
-user4 localhost stage/sql/Init for update 1
-user4 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/checking permissions 4
+user1 localhost stage/sql/closing tables 11
+user1 localhost stage/sql/init 3
+user1 localhost stage/sql/Opening tables 7
+user1 localhost stage/sql/starting 7
+user2 localhost stage/sql/checking permissions 4
+user2 localhost stage/sql/closing tables 10
+user2 localhost stage/sql/init 3
+user2 localhost stage/sql/Opening tables 6
+user2 localhost stage/sql/starting 7
+user3 localhost stage/sql/checking permissions 4
+user3 localhost stage/sql/closing tables 10
+user3 localhost stage/sql/init 3
+user3 localhost stage/sql/Opening tables 6
+user3 localhost stage/sql/starting 7
+user4 localhost stage/sql/checking permissions 4
+user4 localhost stage/sql/closing tables 10
+user4 localhost stage/sql/init 3
+user4 localhost stage/sql/Opening tables 6
+user4 localhost stage/sql/starting 7
execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 1
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 1
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 1
+user3 localhost statement/sp/freturn 1
user3 localhost statement/sql/insert 1
-user3 localhost statement/sql/select 2
+user3 localhost statement/sql/select 3
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 1
+user4 localhost statement/sp/freturn 1
user4 localhost statement/sql/insert 1
-user4 localhost statement/sql/select 2
+user4 localhost statement/sql/select 3
execute dump_statements_user;
user event_name count_star
execute dump_statements_host;
@@ -2277,13 +2441,31 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -2310,20 +2492,12 @@ user4 not found
execute dump_waits_account;
user host event_name count_star
user1 localhost wait/io/file/sql/query_log 0
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
user2 localhost wait/io/file/sql/query_log 0
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
user3 localhost wait/io/file/sql/query_log 0
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
user4 localhost wait/io/file/sql/query_log 0
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_user;
user event_name count_star
@@ -2332,72 +2506,73 @@ host event_name count_star
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
-user1 localhost stage/sql/Checking permissions 0
-user1 localhost stage/sql/Closing tables 0
-user1 localhost stage/sql/Init 0
-user1 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
user1 localhost stage/sql/Opening tables 0
-user2 localhost stage/sql/Checking permissions 0
-user2 localhost stage/sql/Closing tables 0
-user2 localhost stage/sql/Init 0
-user2 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/starting 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
user2 localhost stage/sql/Opening tables 0
-user3 localhost stage/sql/Checking permissions 0
-user3 localhost stage/sql/Closing tables 0
-user3 localhost stage/sql/Init 0
-user3 localhost stage/sql/Init for update 0
+user2 localhost stage/sql/starting 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
user3 localhost stage/sql/Opening tables 0
-user4 localhost stage/sql/Checking permissions 0
-user4 localhost stage/sql/Closing tables 0
-user4 localhost stage/sql/Init 0
-user4 localhost stage/sql/Init for update 0
+user3 localhost stage/sql/starting 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
user4 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/starting 0
execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 1
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 1
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 1
+user3 localhost statement/sp/freturn 1
user3 localhost statement/sql/insert 1
-user3 localhost statement/sql/select 2
+user3 localhost statement/sql/select 3
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 1
+user4 localhost statement/sp/freturn 1
user4 localhost statement/sql/insert 1
-user4 localhost statement/sql/select 2
+user4 localhost statement/sql/select 3
execute dump_statements_user;
user event_name count_star
execute dump_statements_host;
@@ -2406,13 +2581,31 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -2439,20 +2632,12 @@ user4 not found
execute dump_waits_account;
user host event_name count_star
user1 localhost wait/io/file/sql/query_log 0
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
user2 localhost wait/io/file/sql/query_log 0
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
user3 localhost wait/io/file/sql/query_log 0
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
user4 localhost wait/io/file/sql/query_log 0
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_user;
user event_name count_star
@@ -2461,72 +2646,73 @@ host event_name count_star
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
-user1 localhost stage/sql/Checking permissions 0
-user1 localhost stage/sql/Closing tables 0
-user1 localhost stage/sql/Init 0
-user1 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
user1 localhost stage/sql/Opening tables 0
-user2 localhost stage/sql/Checking permissions 0
-user2 localhost stage/sql/Closing tables 0
-user2 localhost stage/sql/Init 0
-user2 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/starting 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
user2 localhost stage/sql/Opening tables 0
-user3 localhost stage/sql/Checking permissions 0
-user3 localhost stage/sql/Closing tables 0
-user3 localhost stage/sql/Init 0
-user3 localhost stage/sql/Init for update 0
+user2 localhost stage/sql/starting 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
user3 localhost stage/sql/Opening tables 0
-user4 localhost stage/sql/Checking permissions 0
-user4 localhost stage/sql/Closing tables 0
-user4 localhost stage/sql/Init 0
-user4 localhost stage/sql/Init for update 0
+user3 localhost stage/sql/starting 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
user4 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/starting 0
execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 1
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 1
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 1
+user3 localhost statement/sp/freturn 1
user3 localhost statement/sql/insert 1
-user3 localhost statement/sql/select 2
+user3 localhost statement/sql/select 3
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 1
+user4 localhost statement/sp/freturn 1
user4 localhost statement/sql/insert 1
-user4 localhost statement/sql/select 2
+user4 localhost statement/sql/select 3
execute dump_statements_user;
user event_name count_star
execute dump_statements_host;
@@ -2535,13 +2721,31 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -2568,20 +2772,12 @@ user4 not found
execute dump_waits_account;
user host event_name count_star
user1 localhost wait/io/file/sql/query_log 0
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
user2 localhost wait/io/file/sql/query_log 0
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
user3 localhost wait/io/file/sql/query_log 0
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
user4 localhost wait/io/file/sql/query_log 0
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_user;
user event_name count_star
@@ -2590,72 +2786,73 @@ host event_name count_star
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
-user1 localhost stage/sql/Checking permissions 0
-user1 localhost stage/sql/Closing tables 0
-user1 localhost stage/sql/Init 0
-user1 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
user1 localhost stage/sql/Opening tables 0
-user2 localhost stage/sql/Checking permissions 0
-user2 localhost stage/sql/Closing tables 0
-user2 localhost stage/sql/Init 0
-user2 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/starting 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
user2 localhost stage/sql/Opening tables 0
-user3 localhost stage/sql/Checking permissions 0
-user3 localhost stage/sql/Closing tables 0
-user3 localhost stage/sql/Init 0
-user3 localhost stage/sql/Init for update 0
+user2 localhost stage/sql/starting 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
user3 localhost stage/sql/Opening tables 0
-user4 localhost stage/sql/Checking permissions 0
-user4 localhost stage/sql/Closing tables 0
-user4 localhost stage/sql/Init 0
-user4 localhost stage/sql/Init for update 0
+user3 localhost stage/sql/starting 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
user4 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/starting 0
execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 1
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 1
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 1
+user3 localhost statement/sp/freturn 1
user3 localhost statement/sql/insert 1
-user3 localhost statement/sql/select 2
+user3 localhost statement/sql/select 3
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 1
+user4 localhost statement/sp/freturn 1
user4 localhost statement/sql/insert 1
-user4 localhost statement/sql/select 2
+user4 localhost statement/sql/select 3
execute dump_statements_user;
user event_name count_star
execute dump_statements_host;
@@ -2664,13 +2861,31 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -2697,20 +2912,12 @@ user4 not found
execute dump_waits_account;
user host event_name count_star
user1 localhost wait/io/file/sql/query_log 0
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
user2 localhost wait/io/file/sql/query_log 0
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
user3 localhost wait/io/file/sql/query_log 0
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
user4 localhost wait/io/file/sql/query_log 0
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_user;
user event_name count_star
@@ -2719,72 +2926,73 @@ host event_name count_star
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
-user1 localhost stage/sql/Checking permissions 0
-user1 localhost stage/sql/Closing tables 0
-user1 localhost stage/sql/Init 0
-user1 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
user1 localhost stage/sql/Opening tables 0
-user2 localhost stage/sql/Checking permissions 0
-user2 localhost stage/sql/Closing tables 0
-user2 localhost stage/sql/Init 0
-user2 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/starting 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
user2 localhost stage/sql/Opening tables 0
-user3 localhost stage/sql/Checking permissions 0
-user3 localhost stage/sql/Closing tables 0
-user3 localhost stage/sql/Init 0
-user3 localhost stage/sql/Init for update 0
+user2 localhost stage/sql/starting 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
user3 localhost stage/sql/Opening tables 0
-user4 localhost stage/sql/Checking permissions 0
-user4 localhost stage/sql/Closing tables 0
-user4 localhost stage/sql/Init 0
-user4 localhost stage/sql/Init for update 0
+user3 localhost stage/sql/starting 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
user4 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/starting 0
execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 1
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 1
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 1
+user3 localhost statement/sp/freturn 1
user3 localhost statement/sql/insert 1
-user3 localhost statement/sql/select 2
+user3 localhost statement/sql/select 3
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 1
+user4 localhost statement/sp/freturn 1
user4 localhost statement/sql/insert 1
-user4 localhost statement/sql/select 2
+user4 localhost statement/sql/select 3
execute dump_statements_user;
user event_name count_star
execute dump_statements_host;
@@ -2793,13 +3001,31 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -2826,20 +3052,12 @@ user4 not found
execute dump_waits_account;
user host event_name count_star
user1 localhost wait/io/file/sql/query_log 0
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
user2 localhost wait/io/file/sql/query_log 0
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
user3 localhost wait/io/file/sql/query_log 0
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
user4 localhost wait/io/file/sql/query_log 0
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_user;
user event_name count_star
@@ -2848,72 +3066,73 @@ host event_name count_star
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
-user1 localhost stage/sql/Checking permissions 0
-user1 localhost stage/sql/Closing tables 0
-user1 localhost stage/sql/Init 0
-user1 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
user1 localhost stage/sql/Opening tables 0
-user2 localhost stage/sql/Checking permissions 0
-user2 localhost stage/sql/Closing tables 0
-user2 localhost stage/sql/Init 0
-user2 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/starting 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
user2 localhost stage/sql/Opening tables 0
-user3 localhost stage/sql/Checking permissions 0
-user3 localhost stage/sql/Closing tables 0
-user3 localhost stage/sql/Init 0
-user3 localhost stage/sql/Init for update 0
+user2 localhost stage/sql/starting 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
user3 localhost stage/sql/Opening tables 0
-user4 localhost stage/sql/Checking permissions 0
-user4 localhost stage/sql/Closing tables 0
-user4 localhost stage/sql/Init 0
-user4 localhost stage/sql/Init for update 0
+user3 localhost stage/sql/starting 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
user4 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/starting 0
execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 1
+user1 localhost statement/sp/freturn 1
user1 localhost statement/sql/insert 1
-user1 localhost statement/sql/select 2
+user1 localhost statement/sql/select 3
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 1
+user2 localhost statement/sp/freturn 1
user2 localhost statement/sql/insert 1
-user2 localhost statement/sql/select 2
+user2 localhost statement/sql/select 3
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 1
+user3 localhost statement/sp/freturn 1
user3 localhost statement/sql/insert 1
-user3 localhost statement/sql/select 2
+user3 localhost statement/sql/select 3
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 1
+user4 localhost statement/sp/freturn 1
user4 localhost statement/sql/insert 1
-user4 localhost statement/sql/select 2
+user4 localhost statement/sql/select 3
execute dump_statements_user;
user event_name count_star
execute dump_statements_host;
@@ -2922,13 +3141,31 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -2955,20 +3192,12 @@ user4 not found
execute dump_waits_account;
user host event_name count_star
user1 localhost wait/io/file/sql/query_log 0
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
user2 localhost wait/io/file/sql/query_log 0
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
user3 localhost wait/io/file/sql/query_log 0
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
user4 localhost wait/io/file/sql/query_log 0
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_user;
user event_name count_star
@@ -2977,70 +3206,71 @@ host event_name count_star
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
-user1 localhost stage/sql/Checking permissions 0
-user1 localhost stage/sql/Closing tables 0
-user1 localhost stage/sql/Init 0
-user1 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
user1 localhost stage/sql/Opening tables 0
-user2 localhost stage/sql/Checking permissions 0
-user2 localhost stage/sql/Closing tables 0
-user2 localhost stage/sql/Init 0
-user2 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/starting 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
user2 localhost stage/sql/Opening tables 0
-user3 localhost stage/sql/Checking permissions 0
-user3 localhost stage/sql/Closing tables 0
-user3 localhost stage/sql/Init 0
-user3 localhost stage/sql/Init for update 0
+user2 localhost stage/sql/starting 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
user3 localhost stage/sql/Opening tables 0
-user4 localhost stage/sql/Checking permissions 0
-user4 localhost stage/sql/Closing tables 0
-user4 localhost stage/sql/Init 0
-user4 localhost stage/sql/Init for update 0
+user3 localhost stage/sql/starting 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
user4 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/starting 0
execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 0
+user1 localhost statement/sp/freturn 0
user1 localhost statement/sql/insert 0
user1 localhost statement/sql/select 0
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 0
+user2 localhost statement/sp/freturn 0
user2 localhost statement/sql/insert 0
user2 localhost statement/sql/select 0
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 0
+user3 localhost statement/sp/freturn 0
user3 localhost statement/sql/insert 0
user3 localhost statement/sql/select 0
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 0
+user4 localhost statement/sp/freturn 0
user4 localhost statement/sql/insert 0
user4 localhost statement/sql/select 0
execute dump_statements_user;
@@ -3051,13 +3281,31 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -3084,20 +3332,12 @@ user4 not found
execute dump_waits_account;
user host event_name count_star
user1 localhost wait/io/file/sql/query_log 0
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
user2 localhost wait/io/file/sql/query_log 0
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
user3 localhost wait/io/file/sql/query_log 0
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
user4 localhost wait/io/file/sql/query_log 0
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_user;
user event_name count_star
@@ -3106,70 +3346,71 @@ host event_name count_star
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
-user1 localhost stage/sql/Checking permissions 0
-user1 localhost stage/sql/Closing tables 0
-user1 localhost stage/sql/Init 0
-user1 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
user1 localhost stage/sql/Opening tables 0
-user2 localhost stage/sql/Checking permissions 0
-user2 localhost stage/sql/Closing tables 0
-user2 localhost stage/sql/Init 0
-user2 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/starting 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
user2 localhost stage/sql/Opening tables 0
-user3 localhost stage/sql/Checking permissions 0
-user3 localhost stage/sql/Closing tables 0
-user3 localhost stage/sql/Init 0
-user3 localhost stage/sql/Init for update 0
+user2 localhost stage/sql/starting 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
user3 localhost stage/sql/Opening tables 0
-user4 localhost stage/sql/Checking permissions 0
-user4 localhost stage/sql/Closing tables 0
-user4 localhost stage/sql/Init 0
-user4 localhost stage/sql/Init for update 0
+user3 localhost stage/sql/starting 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
user4 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/starting 0
execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 0
+user1 localhost statement/sp/freturn 0
user1 localhost statement/sql/insert 0
user1 localhost statement/sql/select 0
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 0
+user2 localhost statement/sp/freturn 0
user2 localhost statement/sql/insert 0
user2 localhost statement/sql/select 0
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 0
+user3 localhost statement/sp/freturn 0
user3 localhost statement/sql/insert 0
user3 localhost statement/sql/select 0
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 0
+user4 localhost statement/sp/freturn 0
user4 localhost statement/sql/insert 0
user4 localhost statement/sql/select 0
execute dump_statements_user;
@@ -3180,13 +3421,31 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -3213,20 +3472,12 @@ user4 not found
execute dump_waits_account;
user host event_name count_star
user1 localhost wait/io/file/sql/query_log 0
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
user2 localhost wait/io/file/sql/query_log 0
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
user3 localhost wait/io/file/sql/query_log 0
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
user4 localhost wait/io/file/sql/query_log 0
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_user;
user event_name count_star
@@ -3235,70 +3486,71 @@ host event_name count_star
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
-user1 localhost stage/sql/Checking permissions 0
-user1 localhost stage/sql/Closing tables 0
-user1 localhost stage/sql/Init 0
-user1 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
user1 localhost stage/sql/Opening tables 0
-user2 localhost stage/sql/Checking permissions 0
-user2 localhost stage/sql/Closing tables 0
-user2 localhost stage/sql/Init 0
-user2 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/starting 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
user2 localhost stage/sql/Opening tables 0
-user3 localhost stage/sql/Checking permissions 0
-user3 localhost stage/sql/Closing tables 0
-user3 localhost stage/sql/Init 0
-user3 localhost stage/sql/Init for update 0
+user2 localhost stage/sql/starting 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
user3 localhost stage/sql/Opening tables 0
-user4 localhost stage/sql/Checking permissions 0
-user4 localhost stage/sql/Closing tables 0
-user4 localhost stage/sql/Init 0
-user4 localhost stage/sql/Init for update 0
+user3 localhost stage/sql/starting 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
user4 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/starting 0
execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 0
+user1 localhost statement/sp/freturn 0
user1 localhost statement/sql/insert 0
user1 localhost statement/sql/select 0
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 0
+user2 localhost statement/sp/freturn 0
user2 localhost statement/sql/insert 0
user2 localhost statement/sql/select 0
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 0
+user3 localhost statement/sp/freturn 0
user3 localhost statement/sql/insert 0
user3 localhost statement/sql/select 0
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 0
+user4 localhost statement/sp/freturn 0
user4 localhost statement/sql/insert 0
user4 localhost statement/sql/select 0
execute dump_statements_user;
@@ -3309,13 +3561,31 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -3342,20 +3612,12 @@ user4 not found
execute dump_waits_account;
user host event_name count_star
user1 localhost wait/io/file/sql/query_log 0
-user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
user2 localhost wait/io/file/sql/query_log 0
-user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
user3 localhost wait/io/file/sql/query_log 0
-user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
user4 localhost wait/io/file/sql/query_log 0
-user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
-user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0
user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_user;
user event_name count_star
@@ -3364,70 +3626,211 @@ host event_name count_star
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
-user1 localhost stage/sql/Checking permissions 0
-user1 localhost stage/sql/Closing tables 0
-user1 localhost stage/sql/Init 0
-user1 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
user1 localhost stage/sql/Opening tables 0
-user2 localhost stage/sql/Checking permissions 0
-user2 localhost stage/sql/Closing tables 0
-user2 localhost stage/sql/Init 0
-user2 localhost stage/sql/Init for update 0
+user1 localhost stage/sql/starting 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
user2 localhost stage/sql/Opening tables 0
-user3 localhost stage/sql/Checking permissions 0
-user3 localhost stage/sql/Closing tables 0
-user3 localhost stage/sql/Init 0
-user3 localhost stage/sql/Init for update 0
+user2 localhost stage/sql/starting 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
user3 localhost stage/sql/Opening tables 0
-user4 localhost stage/sql/Checking permissions 0
-user4 localhost stage/sql/Closing tables 0
-user4 localhost stage/sql/Init 0
-user4 localhost stage/sql/Init for update 0
+user3 localhost stage/sql/starting 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
user4 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/starting 0
execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 0
+user1 localhost statement/sp/freturn 0
+user1 localhost statement/sql/insert 0
+user1 localhost statement/sql/select 0
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 0
+user2 localhost statement/sp/freturn 0
+user2 localhost statement/sql/insert 0
+user2 localhost statement/sql/select 0
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 0
+user3 localhost statement/sp/freturn 0
+user3 localhost statement/sql/insert 0
+user3 localhost statement/sql/select 0
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 0
+user4 localhost statement/sp/freturn 0
+user4 localhost statement/sql/insert 0
+user4 localhost statement/sql/select 0
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sp/freturn 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sp/freturn 4
+statement/sql/insert 4
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_transactions_summary_by_thread_by_event_name;
+"================== TRANSACTIONS_BY_THREAD truncated =================="
+"================== Step 29 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/file/sql/query_log 0
+user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
+user2 localhost wait/io/file/sql/query_log 0
+user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
+user3 localhost wait/io/file/sql/query_log 0
+user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
+user4 localhost wait/io/file/sql/query_log 0
+user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 32
+wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
+user1 localhost stage/sql/Opening tables 0
+user1 localhost stage/sql/starting 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
+user2 localhost stage/sql/Opening tables 0
+user2 localhost stage/sql/starting 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
+user3 localhost stage/sql/Opening tables 0
+user3 localhost stage/sql/starting 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
+user4 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/starting 0
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+stage/sql/starting 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
user1 localhost statement/com/Quit 0
+user1 localhost statement/sp/freturn 0
user1 localhost statement/sql/insert 0
user1 localhost statement/sql/select 0
user2 localhost statement/com/Error 0
user2 localhost statement/com/Quit 0
+user2 localhost statement/sp/freturn 0
user2 localhost statement/sql/insert 0
user2 localhost statement/sql/select 0
user3 localhost statement/com/Error 0
user3 localhost statement/com/Quit 0
+user3 localhost statement/sp/freturn 0
user3 localhost statement/sql/insert 0
user3 localhost statement/sql/select 0
user4 localhost statement/com/Error 0
user4 localhost statement/com/Quit 0
+user4 localhost statement/sp/freturn 0
user4 localhost statement/sql/insert 0
user4 localhost statement/sql/select 0
execute dump_statements_user;
@@ -3438,13 +3841,591 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 0
statement/sql/insert 0
statement/sql/select 0
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 2
+user2 localhost transaction 2
+user3 localhost transaction 2
+user4 localhost transaction 2
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_transactions_summary_by_account_by_event_name;
+"================== TRANSACTIONS_BY_ACCOUNT truncated =================="
+"================== Step 30 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/file/sql/query_log 0
+user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
+user2 localhost wait/io/file/sql/query_log 0
+user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
+user3 localhost wait/io/file/sql/query_log 0
+user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
+user4 localhost wait/io/file/sql/query_log 0
+user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 32
+wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
+user1 localhost stage/sql/Opening tables 0
+user1 localhost stage/sql/starting 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
+user2 localhost stage/sql/Opening tables 0
+user2 localhost stage/sql/starting 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
+user3 localhost stage/sql/Opening tables 0
+user3 localhost stage/sql/starting 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
+user4 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/starting 0
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+stage/sql/starting 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 0
+user1 localhost statement/sp/freturn 0
+user1 localhost statement/sql/insert 0
+user1 localhost statement/sql/select 0
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 0
+user2 localhost statement/sp/freturn 0
+user2 localhost statement/sql/insert 0
+user2 localhost statement/sql/select 0
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 0
+user3 localhost statement/sp/freturn 0
+user3 localhost statement/sql/insert 0
+user3 localhost statement/sql/select 0
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 0
+user4 localhost statement/sp/freturn 0
+user4 localhost statement/sql/insert 0
+user4 localhost statement/sql/select 0
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sp/freturn 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sp/freturn 4
+statement/sql/insert 4
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 0
+user2 localhost transaction 0
+user3 localhost transaction 0
+user4 localhost transaction 0
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_transactions_summary_by_user_by_event_name;
+"================== TRANSACTIONS_BY_USER truncated =================="
+"================== Step 31 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/file/sql/query_log 0
+user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
+user2 localhost wait/io/file/sql/query_log 0
+user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
+user3 localhost wait/io/file/sql/query_log 0
+user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
+user4 localhost wait/io/file/sql/query_log 0
+user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 32
+wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
+user1 localhost stage/sql/Opening tables 0
+user1 localhost stage/sql/starting 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
+user2 localhost stage/sql/Opening tables 0
+user2 localhost stage/sql/starting 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
+user3 localhost stage/sql/Opening tables 0
+user3 localhost stage/sql/starting 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
+user4 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/starting 0
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+stage/sql/starting 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 0
+user1 localhost statement/sp/freturn 0
+user1 localhost statement/sql/insert 0
+user1 localhost statement/sql/select 0
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 0
+user2 localhost statement/sp/freturn 0
+user2 localhost statement/sql/insert 0
+user2 localhost statement/sql/select 0
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 0
+user3 localhost statement/sp/freturn 0
+user3 localhost statement/sql/insert 0
+user3 localhost statement/sql/select 0
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 0
+user4 localhost statement/sp/freturn 0
+user4 localhost statement/sql/insert 0
+user4 localhost statement/sql/select 0
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sp/freturn 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sp/freturn 4
+statement/sql/insert 4
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 0
+user2 localhost transaction 0
+user3 localhost transaction 0
+user4 localhost transaction 0
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_transactions_summary_by_host_by_event_name;
+"================== TRANSACTIONS_BY_HOST truncated =================="
+"================== Step 32 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/file/sql/query_log 0
+user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
+user2 localhost wait/io/file/sql/query_log 0
+user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
+user3 localhost wait/io/file/sql/query_log 0
+user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
+user4 localhost wait/io/file/sql/query_log 0
+user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 32
+wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
+user1 localhost stage/sql/Opening tables 0
+user1 localhost stage/sql/starting 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
+user2 localhost stage/sql/Opening tables 0
+user2 localhost stage/sql/starting 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
+user3 localhost stage/sql/Opening tables 0
+user3 localhost stage/sql/starting 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
+user4 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/starting 0
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+stage/sql/starting 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 0
+user1 localhost statement/sp/freturn 0
+user1 localhost statement/sql/insert 0
+user1 localhost statement/sql/select 0
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 0
+user2 localhost statement/sp/freturn 0
+user2 localhost statement/sql/insert 0
+user2 localhost statement/sql/select 0
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 0
+user3 localhost statement/sp/freturn 0
+user3 localhost statement/sql/insert 0
+user3 localhost statement/sql/select 0
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 0
+user4 localhost statement/sp/freturn 0
+user4 localhost statement/sql/insert 0
+user4 localhost statement/sql/select 0
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sp/freturn 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sp/freturn 4
+statement/sql/insert 4
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 0
+user2 localhost transaction 0
+user3 localhost transaction 0
+user4 localhost transaction 0
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 8
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_transactions_summary_global_by_event_name;
+"================== TRANSACTIONS_GLOBAL truncated =================="
+"================== Step 33 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/file/sql/query_log 0
+user1 localhost wait/synch/rwlock/sql/LOCK_grant 0
+user2 localhost wait/io/file/sql/query_log 0
+user2 localhost wait/synch/rwlock/sql/LOCK_grant 0
+user3 localhost wait/io/file/sql/query_log 0
+user3 localhost wait/synch/rwlock/sql/LOCK_grant 0
+user4 localhost wait/io/file/sql/query_log 0
+user4 localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 32
+wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
+user1 localhost stage/sql/Opening tables 0
+user1 localhost stage/sql/starting 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
+user2 localhost stage/sql/Opening tables 0
+user2 localhost stage/sql/starting 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
+user3 localhost stage/sql/Opening tables 0
+user3 localhost stage/sql/starting 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
+user4 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/starting 0
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+stage/sql/starting 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 0
+user1 localhost statement/sp/freturn 0
+user1 localhost statement/sql/insert 0
+user1 localhost statement/sql/select 0
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 0
+user2 localhost statement/sp/freturn 0
+user2 localhost statement/sql/insert 0
+user2 localhost statement/sql/select 0
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 0
+user3 localhost statement/sp/freturn 0
+user3 localhost statement/sql/insert 0
+user3 localhost statement/sql/select 0
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 0
+user4 localhost statement/sp/freturn 0
+user4 localhost statement/sql/insert 0
+user4 localhost statement/sql/select 0
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sp/freturn 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sp/freturn 4
+statement/sql/insert 4
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+user1 localhost transaction 0
+user2 localhost transaction 0
+user3 localhost transaction 0
+user4 localhost transaction 0
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 0
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -3458,7 +4439,7 @@ execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
truncate performance_schema.accounts;
"================== ACCOUNTS truncated =================="
-"================== Step 29 =================="
+"================== Step 34 =================="
call dump_thread();
username status
user1 not found
@@ -3477,13 +4458,10 @@ host event_name count_star
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
@@ -3493,18 +4471,18 @@ execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -3515,13 +4493,27 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 0
statement/sql/insert 0
statement/sql/select 0
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 0
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -3531,7 +4523,7 @@ execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
truncate performance_schema.users;
"================== USERS truncated =================="
-"================== Step 30 =================="
+"================== Step 35 =================="
call dump_thread();
username status
user1 not found
@@ -3550,13 +4542,10 @@ host event_name count_star
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
@@ -3566,18 +4555,18 @@ execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -3588,13 +4577,27 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 0
statement/sql/insert 0
statement/sql/select 0
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 0
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
@@ -3604,7 +4607,7 @@ execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
truncate performance_schema.hosts;
"================== HOSTS truncated =================="
-"================== Step 31 =================="
+"================== Step 36 =================="
call dump_thread();
username status
user1 not found
@@ -3623,13 +4626,10 @@ host event_name count_star
execute dump_waits_global;
event_name count_star
wait/io/file/sql/query_log 0
-wait/synch/mutex/sql/LOCK_connection_count 0
-wait/synch/mutex/sql/LOCK_user_locks 0
wait/synch/rwlock/sql/LOCK_grant 0
execute dump_waits_history;
event_name count(event_name)
-wait/io/file/sql/query_log 20
-wait/synch/mutex/sql/LOCK_connection_count 4
+wait/io/file/sql/query_log 32
wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
@@ -3639,18 +4639,18 @@ execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
-stage/sql/Checking permissions 0
-stage/sql/Closing tables 0
-stage/sql/Init 0
-stage/sql/Init for update 0
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
stage/sql/Opening tables 0
+stage/sql/starting 0
execute dump_stages_history;
event_name count(event_name)
-stage/sql/Checking permissions 12
-stage/sql/Closing tables 18
-stage/sql/Init 24
-stage/sql/Init for update 4
-stage/sql/Opening tables 13
+stage/sql/checking permissions 16
+stage/sql/closing tables 41
+stage/sql/init 12
+stage/sql/Opening tables 25
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -3661,13 +4661,27 @@ execute dump_statements_global;
event_name count_star
statement/com/Error 0
statement/com/Quit 0
+statement/sp/freturn 0
statement/sql/insert 0
statement/sql/select 0
execute dump_statements_history;
event_name count(event_name)
statement/com/Quit 4
+statement/sp/freturn 4
statement/sql/insert 4
-statement/sql/select 8
+statement/sql/select 12
+execute dump_transactions_account;
+user host event_name count_star
+execute dump_transactions_user;
+user event_name count_star
+execute dump_transactions_host;
+host event_name count_star
+execute dump_transactions_global;
+event_name count_star
+transaction 0
+execute dump_transactions_history;
+event_name count(event_name)
+transaction 8
execute dump_accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root localhost 1 1
diff --git a/mysql-test/suite/perfschema/r/file_misc.result b/mysql-test/suite/perfschema/r/file_misc.result
new file mode 100644
index 00000000000..31094e64b59
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/file_misc.result
@@ -0,0 +1 @@
+select * from information_schema.columns ORDER BY table_name;
diff --git a/mysql-test/suite/perfschema/r/func_file_io.result b/mysql-test/suite/perfschema/r/func_file_io.result
index d710774a1f4..880e00367d0 100644
--- a/mysql-test/suite/perfschema/r/func_file_io.result
+++ b/mysql-test/suite/perfschema/r/func_file_io.result
@@ -130,7 +130,7 @@ GROUP BY p.processlist_user, h.operation
HAVING BYTES > 0
ORDER BY p.processlist_user, h.operation;
UPDATE performance_schema.setup_instruments SET enabled = 'YES', timed = 'YES';
-show status like "performance_schema%";
+show global status like "performance_schema%";
Variable_name Value
Performance_schema_accounts_lost 0
Performance_schema_cond_classes_lost 0
@@ -140,9 +140,15 @@ Performance_schema_file_classes_lost 0
Performance_schema_file_handles_lost 0
Performance_schema_file_instances_lost 0
Performance_schema_hosts_lost 0
+Performance_schema_index_stat_lost 0
Performance_schema_locker_lost 0
+Performance_schema_memory_classes_lost 0
+Performance_schema_metadata_lock_lost 0
Performance_schema_mutex_classes_lost 0
Performance_schema_mutex_instances_lost 0
+Performance_schema_nested_statement_lost 0
+Performance_schema_prepared_statements_lost 0
+Performance_schema_program_lost 0
Performance_schema_rwlock_classes_lost 0
Performance_schema_rwlock_instances_lost 0
Performance_schema_session_connect_attrs_lost 0
@@ -152,6 +158,7 @@ Performance_schema_stage_classes_lost 0
Performance_schema_statement_classes_lost 0
Performance_schema_table_handles_lost 0
Performance_schema_table_instances_lost 0
+Performance_schema_table_lock_stat_lost 0
Performance_schema_thread_classes_lost 0
Performance_schema_thread_instances_lost 0
Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/func_mutex.result b/mysql-test/suite/perfschema/r/func_mutex.result
index 1bd70b16811..b5c5e33f2c6 100644
--- a/mysql-test/suite/perfschema/r/func_mutex.result
+++ b/mysql-test/suite/perfschema/r/func_mutex.result
@@ -9,7 +9,7 @@ where NAME = 'wait/synch/mutex/mysys/THR_LOCK::mutex' GROUP BY NAME;
NAME
wait/synch/mutex/mysys/THR_LOCK::mutex
select NAME from performance_schema.rwlock_instances
-where NAME = 'wait/synch/rwlock/sql/LOCK_grant';
+where NAME = 'wait/synch/rwlock/sql/LOCK_grant' limit 1;
NAME
wait/synch/rwlock/sql/LOCK_grant
DROP TABLE IF EXISTS t1;
@@ -105,7 +105,7 @@ Success
UPDATE performance_schema.setup_instruments SET enabled = 'YES';
DROP TABLE t1;
UPDATE performance_schema.setup_instruments SET enabled = 'YES', timed = 'YES';
-show status like "performance_schema%";
+show global status like "performance_schema%";
Variable_name Value
Performance_schema_accounts_lost 0
Performance_schema_cond_classes_lost 0
@@ -115,9 +115,15 @@ Performance_schema_file_classes_lost 0
Performance_schema_file_handles_lost 0
Performance_schema_file_instances_lost 0
Performance_schema_hosts_lost 0
+Performance_schema_index_stat_lost 0
Performance_schema_locker_lost 0
+Performance_schema_memory_classes_lost 0
+Performance_schema_metadata_lock_lost 0
Performance_schema_mutex_classes_lost 0
Performance_schema_mutex_instances_lost 0
+Performance_schema_nested_statement_lost 0
+Performance_schema_prepared_statements_lost 0
+Performance_schema_program_lost 0
Performance_schema_rwlock_classes_lost 0
Performance_schema_rwlock_instances_lost 0
Performance_schema_session_connect_attrs_lost 0
@@ -127,6 +133,7 @@ Performance_schema_stage_classes_lost 0
Performance_schema_statement_classes_lost 0
Performance_schema_table_handles_lost 0
Performance_schema_table_instances_lost 0
+Performance_schema_table_lock_stat_lost 0
Performance_schema_thread_classes_lost 0
Performance_schema_thread_instances_lost 0
Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/global_objects.result b/mysql-test/suite/perfschema/r/global_objects.result
new file mode 100644
index 00000000000..dd53a11ddac
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/global_objects.result
@@ -0,0 +1,33 @@
+select count(*) from performance_schema.setup_instruments
+where enabled='YES'
+ and name like "wait/%";
+count(*)
+0
+select count(*) > 0 from performance_schema.mutex_instances;
+count(*) > 0
+1
+select count(*) > 0 from performance_schema.rwlock_instances;
+count(*) > 0
+1
+select count(*) > 0 from performance_schema.cond_instances;
+count(*) > 0
+1
+select count(*) > 0 from performance_schema.socket_instances;
+count(*) > 0
+1
+select NAME from performance_schema.mutex_instances
+where NAME = "wait/synch/mutex/sql/LOCK_gdl";
+NAME
+wait/synch/mutex/sql/LOCK_gdl
+select NAME from performance_schema.rwlock_instances
+where NAME = "wait/synch/rwlock/sql/LOCK_system_variables_hash";
+NAME
+wait/synch/rwlock/sql/LOCK_system_variables_hash
+select NAME from performance_schema.cond_instances
+where NAME = "wait/synch/cond/sql/COND_server_started";
+NAME
+wait/synch/cond/sql/COND_server_started
+select EVENT_NAME from performance_schema.socket_instances
+where EVENT_NAME = "wait/io/socket/sql/client_connection";
+EVENT_NAME
+wait/io/socket/sql/client_connection
diff --git a/mysql-test/suite/perfschema/r/global_read_lock.result b/mysql-test/suite/perfschema/r/global_read_lock.result
index 6eed64f12d5..df98b9bd1bb 100644
--- a/mysql-test/suite/perfschema/r/global_read_lock.result
+++ b/mysql-test/suite/perfschema/r/global_read_lock.result
@@ -27,7 +27,7 @@ operation
from performance_schema.events_waits_current
where event_name like "wait/synch/cond/sql/MDL_context::COND_wait_status";
event_name short_source timer_end timer_wait operation
-wait/synch/cond/sql/MDL_context::COND_wait_status mdl.cc: SET SET timed_wait
+wait/synch/cond/sql/MDL_context::COND_wait_status SET SET timed_wait
unlock tables;
connection con1;
update performance_schema.setup_instruments set enabled='NO';
diff --git a/mysql-test/suite/perfschema/r/grant.result b/mysql-test/suite/perfschema/r/grant.result
new file mode 100644
index 00000000000..4679499279f
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/grant.result
@@ -0,0 +1,7 @@
+create user a@localhost;
+connect a,localhost,a;
+select * from performance_schema.global_status where variable_name='b';
+VARIABLE_NAME VARIABLE_VALUE
+connection default;
+disconnect a;
+drop user a@localhost;
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_again_allow.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_again_allow.result
index 86cab03c4c6..d84d6a72239 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_again_allow.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_again_allow.result
@@ -33,7 +33,7 @@ current_user()
root@192.0.2.4
disconnect con2;
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST NULL
HOST_VALIDATED NO
@@ -70,7 +70,7 @@ current_user()
root@192.0.2.4
disconnect con3;
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST NULL
HOST_VALIDATED NO
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_again_deny.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_again_deny.result
index f824c319afa..10861f5e352 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_again_deny.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_again_deny.result
@@ -24,7 +24,7 @@ SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_error_again";
ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MariaDB server
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST NULL
HOST_VALIDATED NO
@@ -54,7 +54,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MariaDB server
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST NULL
HOST_VALIDATED NO
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_bad_allow.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_bad_allow.result
index 33948013822..8e87d0dc50e 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_bad_allow.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_bad_allow.result
@@ -33,7 +33,7 @@ current_user()
root@192.0.2.4
disconnect con2;
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST NULL
HOST_VALIDATED YES
@@ -70,7 +70,7 @@ current_user()
root@192.0.2.4
disconnect con3;
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST NULL
HOST_VALIDATED YES
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_bad_deny.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_bad_deny.result
index 096c5c3dbd5..3b39b09d3e1 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_bad_deny.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_bad_deny.result
@@ -24,7 +24,7 @@ SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_bad_ipv4";
ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MariaDB server
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST NULL
HOST_VALIDATED YES
@@ -54,7 +54,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MariaDB server
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST NULL
HOST_VALIDATED YES
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_good_allow.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_good_allow.result
index f36e4604a7c..d14a73a8f46 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_good_allow.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_good_allow.result
@@ -33,7 +33,7 @@ current_user()
root@santa.claus.ipv4.example.com
disconnect con2;
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -70,7 +70,7 @@ current_user()
root@santa.claus.ipv4.example.com
disconnect con3;
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_good_deny.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_good_deny.result
index d84ffe2e9df..5cd714fba4f 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_good_deny.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_good_deny.result
@@ -24,7 +24,7 @@ SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
ERROR HY000: Host 'santa.claus.ipv4.example.com' is not allowed to connect to this MariaDB server
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -54,7 +54,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR HY000: Host 'santa.claus.ipv4.example.com' is not allowed to connect to this MariaDB server
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_noname_allow.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_noname_allow.result
index ff2a93efec4..c52da0dc578 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_noname_allow.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_noname_allow.result
@@ -35,7 +35,7 @@ current_user()
root@192.0.2.4
disconnect con2;
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST NULL
HOST_VALIDATED YES
@@ -72,7 +72,7 @@ current_user()
root@192.0.2.4
disconnect con3;
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST NULL
HOST_VALIDATED YES
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_noname_deny.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_noname_deny.result
index c300d6a50af..b889df4e451 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_noname_deny.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_noname_deny.result
@@ -24,7 +24,7 @@ SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_error_noname";
ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MariaDB server
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST NULL
HOST_VALIDATED YES
@@ -54,7 +54,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MariaDB server
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST NULL
HOST_VALIDATED YES
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_auth_ed25519.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_auth_ed25519.result
index fdb2c53fcf3..6e3d928509c 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_auth_ed25519.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_auth_ed25519.result
@@ -22,7 +22,7 @@ set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddr
connect(127.0.0.1,plug1,foo,test,PORT,SOCKET);
connect con1, 127.0.0.1, plug1,foo,,$MASTER_MYPORT;
ERROR 28000: Access denied for user 'plug1'@'santa.claus.ipv4.example.com' (using password: YES)
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -53,7 +53,7 @@ LAST_ERROR_SEEN set
connect(127.0.0.1,plug2,bar,test,PORT,SOCKET);
connect con1, 127.0.0.1, plug2,bar,,$MASTER_MYPORT;
ERROR 28000: Access denied for user 'plug2'@'santa.claus.ipv4.example.com' (using password: YES)
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -87,7 +87,7 @@ current_user()
plug2@santa.claus.ipv4.example.com
disconnect con1;
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_auth_plugin.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_auth_plugin.result
index 1c34faa9457..31ffb4065b9 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_auth_plugin.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_auth_plugin.result
@@ -29,7 +29,7 @@ set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddr
uninstall plugin test_plugin_server;
ERROR HY000: Plugin 'test_plugin_server' is not loaded
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -59,7 +59,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR HY000: Plugin 'test_plugin_server' is not loaded
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -90,7 +90,7 @@ LAST_ERROR_SEEN set
install plugin test_plugin_server soname 'PLUGIN_AUTH';
ERROR 28000: Access denied for user 'plug'@'santa.claus.ipv4.example.com' (using password: YES)
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -120,7 +120,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 28000: Access denied for user 'plug'@'santa.claus.ipv4.example.com' (using password: YES)
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -162,7 +162,7 @@ current_user()
plug_dest@santa.claus.ipv4.example.com
disconnect con4;
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_blocked.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_blocked.result
index 2751dbd7edb..6be60f0a070 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_blocked.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_blocked.result
@@ -29,7 +29,7 @@ SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4,native_password_bad_reply";
ERROR 08S01: Bad handshake
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -59,7 +59,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 08S01: Bad handshake
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -89,7 +89,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 08S01: Bad handshake
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -117,9 +117,9 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
-ERROR HY000: Host '192.0.2.4' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'
+ERROR HY000: Host '192.0.2.4' is blocked because of many connection errors; unblock with 'mariadb-admin flush-hosts'
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -147,9 +147,9 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
-ERROR HY000: Host '192.0.2.4' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'
+ERROR HY000: Host '192.0.2.4' is blocked because of many connection errors; unblock with 'mariadb-admin flush-hosts'
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -180,7 +180,7 @@ LAST_ERROR_SEEN set
flush hosts;
ERROR 08S01: Bad handshake
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -210,7 +210,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 08S01: Bad handshake
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -245,7 +245,7 @@ Valid connection should reset SUM_CONNECT_ERROR counter
connection default;
set global debug_dbug= "+d,native_password_bad_reply";
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -275,7 +275,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 08S01: Bad handshake
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -305,7 +305,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 08S01: Bad handshake
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -335,7 +335,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 08S01: Bad handshake
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -363,9 +363,9 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
-ERROR HY000: Host '192.0.2.4' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'
+ERROR HY000: Host '192.0.2.4' is blocked because of many connection errors; unblock with 'mariadb-admin flush-hosts'
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -393,9 +393,9 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
-ERROR HY000: Host '192.0.2.4' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'
+ERROR HY000: Host '192.0.2.4' is blocked because of many connection errors; unblock with 'mariadb-admin flush-hosts'
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_format.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_format.result
index 18e437559e4..42030ed8ac0 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_format.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_format.result
@@ -24,7 +24,7 @@ SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_format_ipv4";
ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MariaDB server
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST NULL
HOST_VALIDATED NO
@@ -54,7 +54,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MariaDB server
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST NULL
HOST_VALIDATED NO
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_max_con.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_max_con.result
index 3d41f013ba9..2ea779fd351 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_max_con.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_max_con.result
@@ -36,7 +36,7 @@ current_user()
quota@santa.claus.ipv4.example.com
disconnect con2a;
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -73,7 +73,7 @@ current_user()
quota@santa.claus.ipv4.example.com
disconnect con2b;
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -110,7 +110,7 @@ current_user()
quota@santa.claus.ipv4.example.com
disconnect con2c;
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -140,7 +140,7 @@ FIRST_ERROR_SEEN null
LAST_ERROR_SEEN null
ERROR 42000: User 'quota' has exceeded the 'max_connections_per_hour' resource (current value: 3)
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -170,7 +170,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 42000: User 'quota' has exceeded the 'max_connections_per_hour' resource (current value: 3)
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -211,7 +211,7 @@ select current_user();
current_user()
quota@santa.claus.ipv4.example.com
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -247,7 +247,7 @@ select current_user();
current_user()
quota@santa.claus.ipv4.example.com
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -283,7 +283,7 @@ select current_user();
current_user()
quota@santa.claus.ipv4.example.com
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -313,7 +313,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 42000: User 'quota' has exceeded the 'max_user_connections' resource (current value: 3)
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -343,7 +343,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 42000: User 'quota' has exceeded the 'max_user_connections' resource (current value: 3)
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -386,7 +386,7 @@ select current_user();
current_user()
quota@santa.claus.ipv4.example.com
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -422,7 +422,7 @@ select current_user();
current_user()
quota@santa.claus.ipv4.example.com
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -458,7 +458,7 @@ select current_user();
current_user()
quota@santa.claus.ipv4.example.com
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -488,7 +488,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 42000: User quota already has more than 'max_user_connections' active connections
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -518,7 +518,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 42000: User quota already has more than 'max_user_connections' active connections
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -567,7 +567,7 @@ select current_user();
current_user()
quota@santa.claus.ipv4.example.com
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -603,7 +603,7 @@ select current_user();
current_user()
quota@santa.claus.ipv4.example.com
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -633,7 +633,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
Got one of the listed errors
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -663,7 +663,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
Got one of the listed errors
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
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 bc7721aef30..60852eb2021 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
@@ -35,7 +35,7 @@ current_user()
root@192.0.2.4
disconnect con2;
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST NULL
HOST_VALIDATED NO
@@ -72,7 +72,7 @@ current_user()
root@192.0.2.4
disconnect con3;
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST NULL
HOST_VALIDATED NO
@@ -110,7 +110,7 @@ current_user()
root@santa.claus.ipv4.example.com
disconnect con4;
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -147,7 +147,7 @@ current_user()
root@santa.claus.ipv4.example.com
disconnect con5;
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_deny.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_deny.result
index 3896ed086ba..c453bc35cd5 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_deny.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_deny.result
@@ -24,7 +24,7 @@ SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_error_again";
ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MariaDB server
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST NULL
HOST_VALIDATED NO
@@ -54,7 +54,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MariaDB server
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST NULL
HOST_VALIDATED NO
@@ -85,7 +85,7 @@ LAST_ERROR_SEEN set
set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
ERROR HY000: Host 'santa.claus.ipv4.example.com' is not allowed to connect to this MariaDB server
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -115,7 +115,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR HY000: Host 'santa.claus.ipv4.example.com' is not allowed to connect to this MariaDB server
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_noname_allow.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_noname_allow.result
index 236bc12d9bf..1b07f4fcd16 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_noname_allow.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_noname_allow.result
@@ -33,7 +33,7 @@ current_user()
root@192.0.2.4
disconnect con2;
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST NULL
HOST_VALIDATED YES
@@ -70,7 +70,7 @@ current_user()
root@192.0.2.4
disconnect con3;
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST NULL
HOST_VALIDATED YES
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_noname_deny.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_noname_deny.result
index 5479393c29b..63baa481d09 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_noname_deny.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_noname_deny.result
@@ -24,7 +24,7 @@ SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_error_noname";
ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MariaDB server
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST NULL
HOST_VALIDATED YES
@@ -54,7 +54,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MariaDB server
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST NULL
HOST_VALIDATED YES
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_passwd.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_passwd.result
index 4c2a9d48a63..8d69d9c4d9a 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_passwd.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_passwd.result
@@ -28,7 +28,7 @@ SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
ERROR 28000: Access denied for user 'user_without'@'santa.claus.ipv4.example.com' (using password: YES)
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -58,7 +58,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 28000: Access denied for user 'user_without'@'santa.claus.ipv4.example.com' (using password: YES)
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -88,7 +88,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 28000: Access denied for user 'user_with'@'santa.claus.ipv4.example.com' (using password: NO)
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -118,7 +118,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 28000: Access denied for user 'user_with'@'santa.claus.ipv4.example.com' (using password: NO)
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -148,7 +148,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 28000: Access denied for user 'user_with'@'santa.claus.ipv4.example.com' (using password: YES)
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -178,7 +178,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 28000: Access denied for user 'user_with'@'santa.claus.ipv4.example.com' (using password: YES)
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_ssl.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_ssl.result
index 267f346836d..33f3528b8b3 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_ssl.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_ssl.result
@@ -32,7 +32,7 @@ SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
ERROR 28000: Access denied for user 'user_ssl'@'santa.claus.ipv4.example.com' (using password: NO)
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -62,7 +62,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 28000: Access denied for user 'user_ssl'@'santa.claus.ipv4.example.com' (using password: NO)
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -92,7 +92,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 28000: Access denied for user 'user_ssl_x509'@'santa.claus.ipv4.example.com' (using password: YES)
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -122,7 +122,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 28000: Access denied for user 'user_ssl_x509'@'santa.claus.ipv4.example.com' (using password: YES)
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_again_allow.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_again_allow.result
index 4325cfec6dc..2b0f4ff7da6 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_again_allow.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_again_allow.result
@@ -33,7 +33,7 @@ current_user()
root@2001:db8::6:6
disconnect con2;
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST NULL
HOST_VALIDATED NO
@@ -70,7 +70,7 @@ current_user()
root@2001:db8::6:6
disconnect con3;
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST NULL
HOST_VALIDATED NO
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_again_deny.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_again_deny.result
index 12435dd54f5..12b27c8ecb5 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_again_deny.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_again_deny.result
@@ -24,7 +24,7 @@ SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_error_again";
ERROR HY000: Host '2001:db8::6:6' is not allowed to connect to this MariaDB server
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST NULL
HOST_VALIDATED NO
@@ -54,7 +54,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR HY000: Host '2001:db8::6:6' is not allowed to connect to this MariaDB server
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST NULL
HOST_VALIDATED NO
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_bad_allow.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_bad_allow.result
index 57e14dfe913..5d8d7fd3f63 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_bad_allow.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_bad_allow.result
@@ -33,7 +33,7 @@ current_user()
root@2001:db8::6:6
disconnect con2;
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST NULL
HOST_VALIDATED YES
@@ -70,7 +70,7 @@ current_user()
root@2001:db8::6:6
disconnect con3;
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST NULL
HOST_VALIDATED YES
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_bad_deny.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_bad_deny.result
index 654ed7759b1..c46ea3dc342 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_bad_deny.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_bad_deny.result
@@ -24,7 +24,7 @@ SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_bad_ipv6";
ERROR HY000: Host '2001:db8::6:6' is not allowed to connect to this MariaDB server
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST NULL
HOST_VALIDATED YES
@@ -54,7 +54,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR HY000: Host '2001:db8::6:6' is not allowed to connect to this MariaDB server
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST NULL
HOST_VALIDATED YES
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_good_allow.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_good_allow.result
index f68d90978e7..786f1b8a6c8 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_good_allow.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_good_allow.result
@@ -33,7 +33,7 @@ current_user()
root@santa.claus.ipv6.example.com
disconnect con2;
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -70,7 +70,7 @@ current_user()
root@santa.claus.ipv6.example.com
disconnect con3;
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_good_deny.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_good_deny.result
index e63c84bf352..8dfcdac1b44 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_good_deny.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_good_deny.result
@@ -23,7 +23,7 @@ SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6";
ERROR HY000: Host 'santa.claus.ipv6.example.com' is not allowed to connect to this MariaDB server
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -53,7 +53,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR HY000: Host 'santa.claus.ipv6.example.com' is not allowed to connect to this MariaDB server
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_noname_allow.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_noname_allow.result
index 50297797f6a..f2aa7fe02a2 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_noname_allow.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_noname_allow.result
@@ -35,7 +35,7 @@ current_user()
root@2001:db8::6:6
disconnect con2;
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST NULL
HOST_VALIDATED YES
@@ -72,7 +72,7 @@ current_user()
root@2001:db8::6:6
disconnect con3;
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST NULL
HOST_VALIDATED YES
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_noname_deny.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_noname_deny.result
index 549e83369df..2fda71b3c38 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_noname_deny.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_noname_deny.result
@@ -24,7 +24,7 @@ SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_error_noname";
ERROR HY000: Host '2001:db8::6:6' is not allowed to connect to this MariaDB server
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST NULL
HOST_VALIDATED YES
@@ -54,7 +54,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR HY000: Host '2001:db8::6:6' is not allowed to connect to this MariaDB server
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST NULL
HOST_VALIDATED YES
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_auth_plugin.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_auth_plugin.result
index 5312958bd91..09b965f443b 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv6_auth_plugin.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_auth_plugin.result
@@ -29,7 +29,7 @@ set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddr
uninstall plugin test_plugin_server;
ERROR HY000: Plugin 'test_plugin_server' is not loaded
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -59,7 +59,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR HY000: Plugin 'test_plugin_server' is not loaded
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -90,7 +90,7 @@ LAST_ERROR_SEEN set
install plugin test_plugin_server soname 'PLUGIN_AUTH';
ERROR 28000: Access denied for user 'plug'@'santa.claus.ipv6.example.com' (using password: YES)
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -120,7 +120,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 28000: Access denied for user 'plug'@'santa.claus.ipv6.example.com' (using password: YES)
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -162,7 +162,7 @@ current_user()
plug_dest@santa.claus.ipv6.example.com
disconnect con4;
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_blocked.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_blocked.result
index 757285b1033..4cef13e028d 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv6_blocked.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_blocked.result
@@ -29,7 +29,7 @@ SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6,native_password_bad_reply";
ERROR 08S01: Bad handshake
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -59,7 +59,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 08S01: Bad handshake
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -89,7 +89,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 08S01: Bad handshake
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -117,9 +117,9 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
-ERROR HY000: Host '2001:db8::6:6' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'
+ERROR HY000: Host '2001:db8::6:6' is blocked because of many connection errors; unblock with 'mariadb-admin flush-hosts'
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -147,9 +147,9 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
-ERROR HY000: Host '2001:db8::6:6' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'
+ERROR HY000: Host '2001:db8::6:6' is blocked because of many connection errors; unblock with 'mariadb-admin flush-hosts'
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -180,7 +180,7 @@ LAST_ERROR_SEEN set
flush hosts;
ERROR 08S01: Bad handshake
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -210,7 +210,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 08S01: Bad handshake
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -245,7 +245,7 @@ Valid connection should reset SUM_CONNECT_ERROR counter
connection default;
set global debug_dbug= "+d,native_password_bad_reply";
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -275,7 +275,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 08S01: Bad handshake
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -305,7 +305,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 08S01: Bad handshake
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -335,7 +335,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 08S01: Bad handshake
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -363,9 +363,9 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
-ERROR HY000: Host '2001:db8::6:6' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'
+ERROR HY000: Host '2001:db8::6:6' is blocked because of many connection errors; unblock with 'mariadb-admin flush-hosts'
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -393,9 +393,9 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
-ERROR HY000: Host '2001:db8::6:6' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'
+ERROR HY000: Host '2001:db8::6:6' is blocked because of many connection errors; unblock with 'mariadb-admin flush-hosts'
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_max_con.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_max_con.result
index f2e25ab6ca1..c109fe8cff0 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv6_max_con.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_max_con.result
@@ -36,7 +36,7 @@ current_user()
quota@santa.claus.ipv6.example.com
disconnect con2a;
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -73,7 +73,7 @@ current_user()
quota@santa.claus.ipv6.example.com
disconnect con2b;
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -110,7 +110,7 @@ current_user()
quota@santa.claus.ipv6.example.com
disconnect con2c;
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -140,7 +140,7 @@ FIRST_ERROR_SEEN null
LAST_ERROR_SEEN null
ERROR 42000: User 'quota' has exceeded the 'max_connections_per_hour' resource (current value: 3)
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -170,7 +170,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 42000: User 'quota' has exceeded the 'max_connections_per_hour' resource (current value: 3)
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -211,7 +211,7 @@ select current_user();
current_user()
quota@santa.claus.ipv6.example.com
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -247,7 +247,7 @@ select current_user();
current_user()
quota@santa.claus.ipv6.example.com
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -283,7 +283,7 @@ select current_user();
current_user()
quota@santa.claus.ipv6.example.com
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -313,7 +313,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 42000: User 'quota' has exceeded the 'max_user_connections' resource (current value: 3)
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -343,7 +343,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 42000: User 'quota' has exceeded the 'max_user_connections' resource (current value: 3)
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -386,7 +386,7 @@ select current_user();
current_user()
quota@santa.claus.ipv6.example.com
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -422,7 +422,7 @@ select current_user();
current_user()
quota@santa.claus.ipv6.example.com
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -458,7 +458,7 @@ select current_user();
current_user()
quota@santa.claus.ipv6.example.com
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -488,7 +488,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 42000: User quota already has more than 'max_user_connections' active connections
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -518,7 +518,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 42000: User quota already has more than 'max_user_connections' active connections
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -567,7 +567,7 @@ select current_user();
current_user()
quota@santa.claus.ipv6.example.com
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -603,7 +603,7 @@ select current_user();
current_user()
quota@santa.claus.ipv6.example.com
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -633,7 +633,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
Got one of the listed errors
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -663,7 +663,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
Got one of the listed errors
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
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 357dfd3db3e..f9c1f736365 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
@@ -35,7 +35,7 @@ current_user()
root@2001:db8::6:6
disconnect con2;
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST NULL
HOST_VALIDATED NO
@@ -72,7 +72,7 @@ current_user()
root@2001:db8::6:6
disconnect con3;
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST NULL
HOST_VALIDATED NO
@@ -110,7 +110,7 @@ current_user()
root@santa.claus.ipv6.example.com
disconnect con4;
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -147,7 +147,7 @@ current_user()
root@santa.claus.ipv6.example.com
disconnect con5;
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_again_deny.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_again_deny.result
index 5befbd98087..675694d1fb9 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_again_deny.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_again_deny.result
@@ -24,7 +24,7 @@ SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_error_again";
ERROR HY000: Host '2001:db8::6:6' is not allowed to connect to this MariaDB server
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST NULL
HOST_VALIDATED NO
@@ -54,7 +54,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR HY000: Host '2001:db8::6:6' is not allowed to connect to this MariaDB server
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST NULL
HOST_VALIDATED NO
@@ -85,7 +85,7 @@ LAST_ERROR_SEEN set
set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6";
ERROR HY000: Host 'santa.claus.ipv6.example.com' is not allowed to connect to this MariaDB server
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -115,7 +115,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR HY000: Host 'santa.claus.ipv6.example.com' is not allowed to connect to this MariaDB server
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_noname_allow.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_noname_allow.result
index f899cb935e9..b8ae214fd7a 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_noname_allow.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_noname_allow.result
@@ -33,7 +33,7 @@ current_user()
root@2001:db8::6:6
disconnect con2;
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST NULL
HOST_VALIDATED YES
@@ -70,7 +70,7 @@ current_user()
root@2001:db8::6:6
disconnect con3;
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST NULL
HOST_VALIDATED YES
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_noname_deny.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_noname_deny.result
index 6d50530ffa0..b5f098a6a1f 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_noname_deny.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_noname_deny.result
@@ -24,7 +24,7 @@ SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_error_noname";
ERROR HY000: Host '2001:db8::6:6' is not allowed to connect to this MariaDB server
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST NULL
HOST_VALIDATED YES
@@ -54,7 +54,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR HY000: Host '2001:db8::6:6' is not allowed to connect to this MariaDB server
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST NULL
HOST_VALIDATED YES
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_passwd.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_passwd.result
index 670a3713d91..a6f04e0c6b6 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv6_passwd.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_passwd.result
@@ -28,7 +28,7 @@ SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6";
ERROR 28000: Access denied for user 'user_without'@'santa.claus.ipv6.example.com' (using password: YES)
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -58,7 +58,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 28000: Access denied for user 'user_without'@'santa.claus.ipv6.example.com' (using password: YES)
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -88,7 +88,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 28000: Access denied for user 'user_with'@'santa.claus.ipv6.example.com' (using password: NO)
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -118,7 +118,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 28000: Access denied for user 'user_with'@'santa.claus.ipv6.example.com' (using password: NO)
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -148,7 +148,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 28000: Access denied for user 'user_with'@'santa.claus.ipv6.example.com' (using password: YES)
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -178,7 +178,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 28000: Access denied for user 'user_with'@'santa.claus.ipv6.example.com' (using password: YES)
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_ssl.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_ssl.result
index 9ec33df2fee..90c8d9cce39 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv6_ssl.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_ssl.result
@@ -32,7 +32,7 @@ SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6";
ERROR 28000: Access denied for user 'user_ssl'@'santa.claus.ipv6.example.com' (using password: NO)
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -62,7 +62,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 28000: Access denied for user 'user_ssl'@'santa.claus.ipv6.example.com' (using password: NO)
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -92,7 +92,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 28000: Access denied for user 'user_ssl_x509'@'santa.claus.ipv6.example.com' (using password: YES)
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -122,7 +122,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 28000: Access denied for user 'user_ssl_x509'@'santa.claus.ipv6.example.com' (using password: YES)
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
diff --git a/mysql-test/suite/perfschema/r/hostcache_peer_addr.result b/mysql-test/suite/perfschema/r/hostcache_peer_addr.result
index 6d15f2f5b25..6aad20ec488 100644
--- a/mysql-test/suite/perfschema/r/hostcache_peer_addr.result
+++ b/mysql-test/suite/perfschema/r/hostcache_peer_addr.result
@@ -39,7 +39,7 @@ Connection_errors_max_connections 0
Connection_errors_peer_address 1
Connection_errors_select 0
Connection_errors_tcpwrap 0
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
ERROR HY000: Can't get hostname for your address
connection default;
show global status like "connection_errors_%";
@@ -50,7 +50,7 @@ Connection_errors_max_connections 0
Connection_errors_peer_address 2
Connection_errors_select 0
Connection_errors_tcpwrap 0
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
SET @@GLOBAL.debug_dbug = @saved_dbug;
flush status;
show global status like "connection_errors_%";
diff --git a/mysql-test/suite/perfschema/r/indexed_table_io.result b/mysql-test/suite/perfschema/r/indexed_table_io.result
index 57518673491..75bc57dcbcf 100644
--- a/mysql-test/suite/perfschema/r/indexed_table_io.result
+++ b/mysql-test/suite/perfschema/r/indexed_table_io.result
@@ -30,19 +30,19 @@ truncate table performance_schema.events_waits_history_long;
update performance_schema.setup_consumers set enabled='YES';
# Printing of 100 inserts per table is suppressed
update performance_schema.setup_consumers set enabled='NO';
-select COUNT(*)
+select SUM(NUMBER_OF_BYTES)
from performance_schema.events_waits_history_long
where event_name like 'wait/io/table/%'
and object_schema = 'test'
and object_name = 'no_index_tab';
-COUNT(*)
+SUM(NUMBER_OF_BYTES)
100
-select COUNT(*)
+select SUM(NUMBER_OF_BYTES)
from performance_schema.events_waits_history_long
where event_name like 'wait/io/table/%'
and object_schema = 'test'
and object_name = 'index_tab';
-COUNT(*)
+SUM(NUMBER_OF_BYTES)
100
select count(*) from test.no_index_tab;
count(*)
@@ -56,75 +56,75 @@ select avg(a) from test.no_index_tab;
avg(a)
50.5000
update performance_schema.setup_consumers set enabled='NO';
-select COUNT(*)
+select SUM(NUMBER_OF_BYTES)
from performance_schema.events_waits_history_long
where event_name like 'wait/io/table/%'
and object_schema = 'test'
and object_name = 'no_index_tab';
-COUNT(*)
-101
+SUM(NUMBER_OF_BYTES)
+100
truncate table performance_schema.events_waits_history_long;
update performance_schema.setup_consumers set enabled='YES';
select avg(a) from test.index_tab;
avg(a)
50.5000
update performance_schema.setup_consumers set enabled='NO';
-select COUNT(*)
+select SUM(NUMBER_OF_BYTES)
from performance_schema.events_waits_history_long
where event_name like 'wait/io/table/%'
and object_schema = 'test'
and object_name = 'index_tab';
-COUNT(*)
-101
+SUM(NUMBER_OF_BYTES)
+100
truncate table performance_schema.events_waits_history_long;
update performance_schema.setup_consumers set enabled='YES';
select 1 as my_column from test.no_index_tab where a = 50;
my_column
1
update performance_schema.setup_consumers set enabled='NO';
-select COUNT(*)
+select SUM(NUMBER_OF_BYTES)
from performance_schema.events_waits_history_long
where event_name like 'wait/io/table/%'
and object_schema = 'test'
and object_name = 'no_index_tab';
-COUNT(*)
-101
+SUM(NUMBER_OF_BYTES)
+100
truncate table performance_schema.events_waits_history_long;
update performance_schema.setup_consumers set enabled='YES';
select 1 as my_column from test.index_tab where a = 50;
my_column
1
update performance_schema.setup_consumers set enabled='NO';
-select COUNT(*)
+select SUM(NUMBER_OF_BYTES)
from performance_schema.events_waits_history_long
where event_name like 'wait/io/table/%'
and object_schema = 'test'
and object_name = 'index_tab';
-COUNT(*)
+SUM(NUMBER_OF_BYTES)
1
truncate table performance_schema.events_waits_history_long;
update performance_schema.setup_consumers set enabled='YES';
delete from test.no_index_tab where a = 51;
update performance_schema.setup_consumers set enabled='NO';
-select COUNT(*)
+select SUM(NUMBER_OF_BYTES)
from performance_schema.events_waits_history_long
where event_name like 'wait/io/table/%'
and object_schema = 'test'
and object_name = 'no_index_tab';
-COUNT(*)
+SUM(NUMBER_OF_BYTES)
102
truncate table performance_schema.events_waits_history_long;
update performance_schema.setup_consumers set enabled='YES';
delete from test.index_tab where a = 51;
update performance_schema.setup_consumers set enabled='NO';
-select COUNT(*)
+select SUM(NUMBER_OF_BYTES)
from performance_schema.events_waits_history_long
where event_name like 'wait/io/table/%'
and object_schema = 'test'
and object_name = 'index_tab';
-COUNT(*)
+SUM(NUMBER_OF_BYTES)
2
-show status like 'performance_schema_%';
+show global status like 'performance_schema_%';
Variable_name Value
Performance_schema_accounts_lost 0
Performance_schema_cond_classes_lost 0
@@ -134,9 +134,15 @@ Performance_schema_file_classes_lost 0
Performance_schema_file_handles_lost 0
Performance_schema_file_instances_lost 0
Performance_schema_hosts_lost 0
+Performance_schema_index_stat_lost 0
Performance_schema_locker_lost 0
+Performance_schema_memory_classes_lost 0
+Performance_schema_metadata_lock_lost 0
Performance_schema_mutex_classes_lost 0
Performance_schema_mutex_instances_lost 0
+Performance_schema_nested_statement_lost 0
+Performance_schema_prepared_statements_lost 0
+Performance_schema_program_lost 0
Performance_schema_rwlock_classes_lost 0
Performance_schema_rwlock_instances_lost 0
Performance_schema_session_connect_attrs_lost 0
@@ -146,6 +152,7 @@ Performance_schema_stage_classes_lost 0
Performance_schema_statement_classes_lost 0
Performance_schema_table_handles_lost 0
Performance_schema_table_instances_lost 0
+Performance_schema_table_lock_stat_lost 0
Performance_schema_thread_classes_lost 0
Performance_schema_thread_instances_lost 0
Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/information_schema.result b/mysql-test/suite/perfschema/r/information_schema.result
index a684fd7b84e..3f4a8cf6336 100644
--- a/mysql-test/suite/perfschema/r/information_schema.result
+++ b/mysql-test/suite/perfschema/r/information_schema.result
@@ -19,9 +19,18 @@ performance_schema events_statements_history_long def
performance_schema events_statements_summary_by_account_by_event_name def
performance_schema events_statements_summary_by_digest def
performance_schema events_statements_summary_by_host_by_event_name def
+performance_schema events_statements_summary_by_program def
performance_schema events_statements_summary_by_thread_by_event_name def
performance_schema events_statements_summary_by_user_by_event_name def
performance_schema events_statements_summary_global_by_event_name def
+performance_schema events_transactions_current def
+performance_schema events_transactions_history def
+performance_schema events_transactions_history_long def
+performance_schema events_transactions_summary_by_account_by_event_name def
+performance_schema events_transactions_summary_by_host_by_event_name def
+performance_schema events_transactions_summary_by_thread_by_event_name def
+performance_schema events_transactions_summary_by_user_by_event_name def
+performance_schema events_transactions_summary_global_by_event_name def
performance_schema events_waits_current def
performance_schema events_waits_history def
performance_schema events_waits_history_long def
@@ -34,14 +43,27 @@ performance_schema events_waits_summary_global_by_event_name def
performance_schema file_instances def
performance_schema file_summary_by_event_name def
performance_schema file_summary_by_instance def
+performance_schema global_status def
performance_schema hosts def
performance_schema host_cache def
+performance_schema memory_summary_by_account_by_event_name def
+performance_schema memory_summary_by_host_by_event_name def
+performance_schema memory_summary_by_thread_by_event_name def
+performance_schema memory_summary_by_user_by_event_name def
+performance_schema memory_summary_global_by_event_name def
+performance_schema metadata_locks def
performance_schema mutex_instances def
performance_schema objects_summary_global_by_type def
performance_schema performance_timers def
+performance_schema prepared_statements_instances def
+performance_schema replication_applier_configuration def
+performance_schema replication_applier_status def
+performance_schema replication_applier_status_by_coordinator def
+performance_schema replication_connection_configuration def
performance_schema rwlock_instances def
performance_schema session_account_connect_attrs def
performance_schema session_connect_attrs def
+performance_schema session_status def
performance_schema setup_actors def
performance_schema setup_consumers def
performance_schema setup_instruments def
@@ -50,11 +72,17 @@ performance_schema setup_timers def
performance_schema socket_instances def
performance_schema socket_summary_by_event_name def
performance_schema socket_summary_by_instance def
+performance_schema status_by_account def
+performance_schema status_by_host def
+performance_schema status_by_thread def
+performance_schema status_by_user def
+performance_schema table_handles def
performance_schema table_io_waits_summary_by_index_usage def
performance_schema table_io_waits_summary_by_table def
performance_schema table_lock_waits_summary_by_table def
performance_schema threads def
performance_schema users def
+performance_schema user_variables_by_thread def
select lower(TABLE_NAME), TABLE_TYPE, ENGINE
from information_schema.tables
where TABLE_SCHEMA='performance_schema'
@@ -76,9 +104,18 @@ events_statements_history_long BASE TABLE PERFORMANCE_SCHEMA
events_statements_summary_by_account_by_event_name BASE TABLE PERFORMANCE_SCHEMA
events_statements_summary_by_digest BASE TABLE PERFORMANCE_SCHEMA
events_statements_summary_by_host_by_event_name BASE TABLE PERFORMANCE_SCHEMA
+events_statements_summary_by_program BASE TABLE PERFORMANCE_SCHEMA
events_statements_summary_by_thread_by_event_name BASE TABLE PERFORMANCE_SCHEMA
events_statements_summary_by_user_by_event_name BASE TABLE PERFORMANCE_SCHEMA
events_statements_summary_global_by_event_name BASE TABLE PERFORMANCE_SCHEMA
+events_transactions_current BASE TABLE PERFORMANCE_SCHEMA
+events_transactions_history BASE TABLE PERFORMANCE_SCHEMA
+events_transactions_history_long BASE TABLE PERFORMANCE_SCHEMA
+events_transactions_summary_by_account_by_event_name BASE TABLE PERFORMANCE_SCHEMA
+events_transactions_summary_by_host_by_event_name BASE TABLE PERFORMANCE_SCHEMA
+events_transactions_summary_by_thread_by_event_name BASE TABLE PERFORMANCE_SCHEMA
+events_transactions_summary_by_user_by_event_name BASE TABLE PERFORMANCE_SCHEMA
+events_transactions_summary_global_by_event_name BASE TABLE PERFORMANCE_SCHEMA
events_waits_current BASE TABLE PERFORMANCE_SCHEMA
events_waits_history BASE TABLE PERFORMANCE_SCHEMA
events_waits_history_long BASE TABLE PERFORMANCE_SCHEMA
@@ -91,14 +128,27 @@ events_waits_summary_global_by_event_name BASE TABLE PERFORMANCE_SCHEMA
file_instances BASE TABLE PERFORMANCE_SCHEMA
file_summary_by_event_name BASE TABLE PERFORMANCE_SCHEMA
file_summary_by_instance BASE TABLE PERFORMANCE_SCHEMA
+global_status BASE TABLE PERFORMANCE_SCHEMA
hosts BASE TABLE PERFORMANCE_SCHEMA
host_cache BASE TABLE PERFORMANCE_SCHEMA
+memory_summary_by_account_by_event_name BASE TABLE PERFORMANCE_SCHEMA
+memory_summary_by_host_by_event_name BASE TABLE PERFORMANCE_SCHEMA
+memory_summary_by_thread_by_event_name BASE TABLE PERFORMANCE_SCHEMA
+memory_summary_by_user_by_event_name BASE TABLE PERFORMANCE_SCHEMA
+memory_summary_global_by_event_name BASE TABLE PERFORMANCE_SCHEMA
+metadata_locks BASE TABLE PERFORMANCE_SCHEMA
mutex_instances BASE TABLE PERFORMANCE_SCHEMA
objects_summary_global_by_type BASE TABLE PERFORMANCE_SCHEMA
performance_timers BASE TABLE PERFORMANCE_SCHEMA
+prepared_statements_instances BASE TABLE PERFORMANCE_SCHEMA
+replication_applier_configuration BASE TABLE PERFORMANCE_SCHEMA
+replication_applier_status BASE TABLE PERFORMANCE_SCHEMA
+replication_applier_status_by_coordinator BASE TABLE PERFORMANCE_SCHEMA
+replication_connection_configuration BASE TABLE PERFORMANCE_SCHEMA
rwlock_instances BASE TABLE PERFORMANCE_SCHEMA
session_account_connect_attrs BASE TABLE PERFORMANCE_SCHEMA
session_connect_attrs BASE TABLE PERFORMANCE_SCHEMA
+session_status BASE TABLE PERFORMANCE_SCHEMA
setup_actors BASE TABLE PERFORMANCE_SCHEMA
setup_consumers BASE TABLE PERFORMANCE_SCHEMA
setup_instruments BASE TABLE PERFORMANCE_SCHEMA
@@ -107,11 +157,17 @@ setup_timers BASE TABLE PERFORMANCE_SCHEMA
socket_instances BASE TABLE PERFORMANCE_SCHEMA
socket_summary_by_event_name BASE TABLE PERFORMANCE_SCHEMA
socket_summary_by_instance BASE TABLE PERFORMANCE_SCHEMA
+status_by_account BASE TABLE PERFORMANCE_SCHEMA
+status_by_host BASE TABLE PERFORMANCE_SCHEMA
+status_by_thread BASE TABLE PERFORMANCE_SCHEMA
+status_by_user BASE TABLE PERFORMANCE_SCHEMA
+table_handles BASE TABLE PERFORMANCE_SCHEMA
table_io_waits_summary_by_index_usage BASE TABLE PERFORMANCE_SCHEMA
table_io_waits_summary_by_table BASE TABLE PERFORMANCE_SCHEMA
table_lock_waits_summary_by_table BASE TABLE PERFORMANCE_SCHEMA
threads BASE TABLE PERFORMANCE_SCHEMA
users BASE TABLE PERFORMANCE_SCHEMA
+user_variables_by_thread BASE TABLE PERFORMANCE_SCHEMA
select lower(TABLE_NAME), VERSION, ROW_FORMAT
from information_schema.tables
where TABLE_SCHEMA='performance_schema'
@@ -133,9 +189,18 @@ events_statements_history_long 10 Dynamic
events_statements_summary_by_account_by_event_name 10 Dynamic
events_statements_summary_by_digest 10 Dynamic
events_statements_summary_by_host_by_event_name 10 Dynamic
+events_statements_summary_by_program 10 Dynamic
events_statements_summary_by_thread_by_event_name 10 Dynamic
events_statements_summary_by_user_by_event_name 10 Dynamic
events_statements_summary_global_by_event_name 10 Dynamic
+events_transactions_current 10 Dynamic
+events_transactions_history 10 Dynamic
+events_transactions_history_long 10 Dynamic
+events_transactions_summary_by_account_by_event_name 10 Dynamic
+events_transactions_summary_by_host_by_event_name 10 Dynamic
+events_transactions_summary_by_thread_by_event_name 10 Dynamic
+events_transactions_summary_by_user_by_event_name 10 Dynamic
+events_transactions_summary_global_by_event_name 10 Dynamic
events_waits_current 10 Dynamic
events_waits_history 10 Dynamic
events_waits_history_long 10 Dynamic
@@ -148,14 +213,27 @@ events_waits_summary_global_by_event_name 10 Dynamic
file_instances 10 Dynamic
file_summary_by_event_name 10 Dynamic
file_summary_by_instance 10 Dynamic
+global_status 10 Dynamic
hosts 10 Fixed
host_cache 10 Dynamic
+memory_summary_by_account_by_event_name 10 Dynamic
+memory_summary_by_host_by_event_name 10 Dynamic
+memory_summary_by_thread_by_event_name 10 Dynamic
+memory_summary_by_user_by_event_name 10 Dynamic
+memory_summary_global_by_event_name 10 Dynamic
+metadata_locks 10 Dynamic
mutex_instances 10 Dynamic
objects_summary_global_by_type 10 Dynamic
performance_timers 10 Fixed
+prepared_statements_instances 10 Dynamic
+replication_applier_configuration 10 Fixed
+replication_applier_status 10 Fixed
+replication_applier_status_by_coordinator 10 Dynamic
+replication_connection_configuration 10 Dynamic
rwlock_instances 10 Dynamic
session_account_connect_attrs 10 Dynamic
session_connect_attrs 10 Dynamic
+session_status 10 Dynamic
setup_actors 10 Fixed
setup_consumers 10 Dynamic
setup_instruments 10 Dynamic
@@ -164,68 +242,109 @@ setup_timers 10 Dynamic
socket_instances 10 Dynamic
socket_summary_by_event_name 10 Dynamic
socket_summary_by_instance 10 Dynamic
+status_by_account 10 Dynamic
+status_by_host 10 Dynamic
+status_by_thread 10 Dynamic
+status_by_user 10 Dynamic
+table_handles 10 Dynamic
table_io_waits_summary_by_index_usage 10 Dynamic
table_io_waits_summary_by_table 10 Dynamic
table_lock_waits_summary_by_table 10 Dynamic
threads 10 Dynamic
users 10 Fixed
+user_variables_by_thread 10 Dynamic
+select lower(TABLE_NAME), AVG_ROW_LENGTH
+from information_schema.tables
+where TABLE_SCHEMA='performance_schema' and
+lower(TABLE_NAME) not regexp '^variables|variables$|^status|session_status|global_status'
+ order by table_name;
+lower(TABLE_NAME) AVG_ROW_LENGTH
+accounts 0
+cond_instances 0
+events_stages_current 0
+events_stages_history 0
+events_stages_history_long 0
+events_stages_summary_by_account_by_event_name 0
+events_stages_summary_by_host_by_event_name 0
+events_stages_summary_by_thread_by_event_name 0
+events_stages_summary_by_user_by_event_name 0
+events_stages_summary_global_by_event_name 0
+events_statements_current 0
+events_statements_history 0
+events_statements_history_long 0
+events_statements_summary_by_account_by_event_name 0
+events_statements_summary_by_digest 0
+events_statements_summary_by_host_by_event_name 0
+events_statements_summary_by_program 0
+events_statements_summary_by_thread_by_event_name 0
+events_statements_summary_by_user_by_event_name 0
+events_statements_summary_global_by_event_name 0
+events_transactions_current 0
+events_transactions_history 0
+events_transactions_history_long 0
+events_transactions_summary_by_account_by_event_name 0
+events_transactions_summary_by_host_by_event_name 0
+events_transactions_summary_by_thread_by_event_name 0
+events_transactions_summary_by_user_by_event_name 0
+events_transactions_summary_global_by_event_name 0
+events_waits_current 0
+events_waits_history 0
+events_waits_history_long 0
+events_waits_summary_by_account_by_event_name 0
+events_waits_summary_by_host_by_event_name 0
+events_waits_summary_by_instance 0
+events_waits_summary_by_thread_by_event_name 0
+events_waits_summary_by_user_by_event_name 0
+events_waits_summary_global_by_event_name 0
+file_instances 0
+file_summary_by_event_name 0
+file_summary_by_instance 0
+hosts 0
+host_cache 0
+memory_summary_by_account_by_event_name 0
+memory_summary_by_host_by_event_name 0
+memory_summary_by_thread_by_event_name 0
+memory_summary_by_user_by_event_name 0
+memory_summary_global_by_event_name 0
+metadata_locks 0
+mutex_instances 0
+objects_summary_global_by_type 0
+performance_timers 0
+prepared_statements_instances 0
+replication_applier_configuration 0
+replication_applier_status 0
+replication_applier_status_by_coordinator 0
+replication_connection_configuration 0
+rwlock_instances 0
+session_account_connect_attrs 0
+session_connect_attrs 0
+setup_actors 0
+setup_consumers 0
+setup_instruments 0
+setup_objects 0
+setup_timers 0
+socket_instances 0
+socket_summary_by_event_name 0
+socket_summary_by_instance 0
+table_handles 0
+table_io_waits_summary_by_index_usage 0
+table_io_waits_summary_by_table 0
+table_lock_waits_summary_by_table 0
+threads 0
+users 0
+user_variables_by_thread 0
select lower(TABLE_NAME), TABLE_ROWS, AVG_ROW_LENGTH
from information_schema.tables
-where TABLE_SCHEMA='performance_schema'
+where TABLE_SCHEMA='performance_schema' and
+lower(TABLE_NAME) regexp '^variables|variables$|^status|session_status|global_status'
order by table_name;
lower(TABLE_NAME) TABLE_ROWS AVG_ROW_LENGTH
-accounts 1000 0
-cond_instances 1000 0
-events_stages_current 1000 0
-events_stages_history 1000 0
-events_stages_history_long 10000 0
-events_stages_summary_by_account_by_event_name 1000 0
-events_stages_summary_by_host_by_event_name 1000 0
-events_stages_summary_by_thread_by_event_name 1000 0
-events_stages_summary_by_user_by_event_name 1000 0
-events_stages_summary_global_by_event_name 1000 0
-events_statements_current 1000 0
-events_statements_history 1000 0
-events_statements_history_long 10000 0
-events_statements_summary_by_account_by_event_name 1000 0
-events_statements_summary_by_digest 1000 0
-events_statements_summary_by_host_by_event_name 1000 0
-events_statements_summary_by_thread_by_event_name 1000 0
-events_statements_summary_by_user_by_event_name 1000 0
-events_statements_summary_global_by_event_name 1000 0
-events_waits_current 1000 0
-events_waits_history 1000 0
-events_waits_history_long 10000 0
-events_waits_summary_by_account_by_event_name 1000 0
-events_waits_summary_by_host_by_event_name 1000 0
-events_waits_summary_by_instance 1000 0
-events_waits_summary_by_thread_by_event_name 1000 0
-events_waits_summary_by_user_by_event_name 1000 0
-events_waits_summary_global_by_event_name 1000 0
-file_instances 1000 0
-file_summary_by_event_name 1000 0
-file_summary_by_instance 1000 0
-hosts 1000 0
-host_cache 1000 0
-mutex_instances 1000 0
-objects_summary_global_by_type 1000 0
-performance_timers 5 0
-rwlock_instances 1000 0
-session_account_connect_attrs 1000 0
-session_connect_attrs 1000 0
-setup_actors 1 0
-setup_consumers 12 0
-setup_instruments 1000 0
-setup_objects 4 0
-setup_timers 4 0
-socket_instances 1000 0
-socket_summary_by_event_name 1000 0
-socket_summary_by_instance 1000 0
-table_io_waits_summary_by_index_usage 1000 0
-table_io_waits_summary_by_table 1000 0
-table_lock_waits_summary_by_table 1000 0
-threads 1000 0
-users 1000 0
+global_status table_rows avg_row_len
+session_status table_rows avg_row_len
+status_by_account table_rows avg_row_len
+status_by_host table_rows avg_row_len
+status_by_thread table_rows avg_row_len
+status_by_user table_rows avg_row_len
select lower(TABLE_NAME), DATA_LENGTH, MAX_DATA_LENGTH
from information_schema.tables
where TABLE_SCHEMA='performance_schema'
@@ -247,9 +366,18 @@ events_statements_history_long 0 0
events_statements_summary_by_account_by_event_name 0 0
events_statements_summary_by_digest 0 0
events_statements_summary_by_host_by_event_name 0 0
+events_statements_summary_by_program 0 0
events_statements_summary_by_thread_by_event_name 0 0
events_statements_summary_by_user_by_event_name 0 0
events_statements_summary_global_by_event_name 0 0
+events_transactions_current 0 0
+events_transactions_history 0 0
+events_transactions_history_long 0 0
+events_transactions_summary_by_account_by_event_name 0 0
+events_transactions_summary_by_host_by_event_name 0 0
+events_transactions_summary_by_thread_by_event_name 0 0
+events_transactions_summary_by_user_by_event_name 0 0
+events_transactions_summary_global_by_event_name 0 0
events_waits_current 0 0
events_waits_history 0 0
events_waits_history_long 0 0
@@ -262,14 +390,27 @@ events_waits_summary_global_by_event_name 0 0
file_instances 0 0
file_summary_by_event_name 0 0
file_summary_by_instance 0 0
+global_status 0 0
hosts 0 0
host_cache 0 0
+memory_summary_by_account_by_event_name 0 0
+memory_summary_by_host_by_event_name 0 0
+memory_summary_by_thread_by_event_name 0 0
+memory_summary_by_user_by_event_name 0 0
+memory_summary_global_by_event_name 0 0
+metadata_locks 0 0
mutex_instances 0 0
objects_summary_global_by_type 0 0
performance_timers 0 0
+prepared_statements_instances 0 0
+replication_applier_configuration 0 0
+replication_applier_status 0 0
+replication_applier_status_by_coordinator 0 0
+replication_connection_configuration 0 0
rwlock_instances 0 0
session_account_connect_attrs 0 0
session_connect_attrs 0 0
+session_status 0 0
setup_actors 0 0
setup_consumers 0 0
setup_instruments 0 0
@@ -278,11 +419,17 @@ setup_timers 0 0
socket_instances 0 0
socket_summary_by_event_name 0 0
socket_summary_by_instance 0 0
+status_by_account 0 0
+status_by_host 0 0
+status_by_thread 0 0
+status_by_user 0 0
+table_handles 0 0
table_io_waits_summary_by_index_usage 0 0
table_io_waits_summary_by_table 0 0
table_lock_waits_summary_by_table 0 0
threads 0 0
users 0 0
+user_variables_by_thread 0 0
select lower(TABLE_NAME), INDEX_LENGTH, DATA_FREE, AUTO_INCREMENT
from information_schema.tables
where TABLE_SCHEMA='performance_schema'
@@ -304,9 +451,18 @@ events_statements_history_long 0 0 NULL
events_statements_summary_by_account_by_event_name 0 0 NULL
events_statements_summary_by_digest 0 0 NULL
events_statements_summary_by_host_by_event_name 0 0 NULL
+events_statements_summary_by_program 0 0 NULL
events_statements_summary_by_thread_by_event_name 0 0 NULL
events_statements_summary_by_user_by_event_name 0 0 NULL
events_statements_summary_global_by_event_name 0 0 NULL
+events_transactions_current 0 0 NULL
+events_transactions_history 0 0 NULL
+events_transactions_history_long 0 0 NULL
+events_transactions_summary_by_account_by_event_name 0 0 NULL
+events_transactions_summary_by_host_by_event_name 0 0 NULL
+events_transactions_summary_by_thread_by_event_name 0 0 NULL
+events_transactions_summary_by_user_by_event_name 0 0 NULL
+events_transactions_summary_global_by_event_name 0 0 NULL
events_waits_current 0 0 NULL
events_waits_history 0 0 NULL
events_waits_history_long 0 0 NULL
@@ -319,14 +475,27 @@ events_waits_summary_global_by_event_name 0 0 NULL
file_instances 0 0 NULL
file_summary_by_event_name 0 0 NULL
file_summary_by_instance 0 0 NULL
+global_status 0 0 NULL
hosts 0 0 NULL
host_cache 0 0 NULL
+memory_summary_by_account_by_event_name 0 0 NULL
+memory_summary_by_host_by_event_name 0 0 NULL
+memory_summary_by_thread_by_event_name 0 0 NULL
+memory_summary_by_user_by_event_name 0 0 NULL
+memory_summary_global_by_event_name 0 0 NULL
+metadata_locks 0 0 NULL
mutex_instances 0 0 NULL
objects_summary_global_by_type 0 0 NULL
performance_timers 0 0 NULL
+prepared_statements_instances 0 0 NULL
+replication_applier_configuration 0 0 NULL
+replication_applier_status 0 0 NULL
+replication_applier_status_by_coordinator 0 0 NULL
+replication_connection_configuration 0 0 NULL
rwlock_instances 0 0 NULL
session_account_connect_attrs 0 0 NULL
session_connect_attrs 0 0 NULL
+session_status 0 0 NULL
setup_actors 0 0 NULL
setup_consumers 0 0 NULL
setup_instruments 0 0 NULL
@@ -335,11 +504,17 @@ setup_timers 0 0 NULL
socket_instances 0 0 NULL
socket_summary_by_event_name 0 0 NULL
socket_summary_by_instance 0 0 NULL
+status_by_account 0 0 NULL
+status_by_host 0 0 NULL
+status_by_thread 0 0 NULL
+status_by_user 0 0 NULL
+table_handles 0 0 NULL
table_io_waits_summary_by_index_usage 0 0 NULL
table_io_waits_summary_by_table 0 0 NULL
table_lock_waits_summary_by_table 0 0 NULL
threads 0 0 NULL
users 0 0 NULL
+user_variables_by_thread 0 0 NULL
select lower(TABLE_NAME), CREATE_TIME, UPDATE_TIME, CHECK_TIME
from information_schema.tables
where TABLE_SCHEMA='performance_schema'
@@ -361,9 +536,18 @@ events_statements_history_long NULL NULL NULL
events_statements_summary_by_account_by_event_name NULL NULL NULL
events_statements_summary_by_digest NULL NULL NULL
events_statements_summary_by_host_by_event_name NULL NULL NULL
+events_statements_summary_by_program NULL NULL NULL
events_statements_summary_by_thread_by_event_name NULL NULL NULL
events_statements_summary_by_user_by_event_name NULL NULL NULL
events_statements_summary_global_by_event_name NULL NULL NULL
+events_transactions_current NULL NULL NULL
+events_transactions_history NULL NULL NULL
+events_transactions_history_long NULL NULL NULL
+events_transactions_summary_by_account_by_event_name NULL NULL NULL
+events_transactions_summary_by_host_by_event_name NULL NULL NULL
+events_transactions_summary_by_thread_by_event_name NULL NULL NULL
+events_transactions_summary_by_user_by_event_name NULL NULL NULL
+events_transactions_summary_global_by_event_name NULL NULL NULL
events_waits_current NULL NULL NULL
events_waits_history NULL NULL NULL
events_waits_history_long NULL NULL NULL
@@ -376,14 +560,27 @@ events_waits_summary_global_by_event_name NULL NULL NULL
file_instances NULL NULL NULL
file_summary_by_event_name NULL NULL NULL
file_summary_by_instance NULL NULL NULL
+global_status NULL NULL NULL
hosts NULL NULL NULL
host_cache NULL NULL NULL
+memory_summary_by_account_by_event_name NULL NULL NULL
+memory_summary_by_host_by_event_name NULL NULL NULL
+memory_summary_by_thread_by_event_name NULL NULL NULL
+memory_summary_by_user_by_event_name NULL NULL NULL
+memory_summary_global_by_event_name NULL NULL NULL
+metadata_locks NULL NULL NULL
mutex_instances NULL NULL NULL
objects_summary_global_by_type NULL NULL NULL
performance_timers NULL NULL NULL
+prepared_statements_instances NULL NULL NULL
+replication_applier_configuration NULL NULL NULL
+replication_applier_status NULL NULL NULL
+replication_applier_status_by_coordinator NULL NULL NULL
+replication_connection_configuration NULL NULL NULL
rwlock_instances NULL NULL NULL
session_account_connect_attrs NULL NULL NULL
session_connect_attrs NULL NULL NULL
+session_status NULL NULL NULL
setup_actors NULL NULL NULL
setup_consumers NULL NULL NULL
setup_instruments NULL NULL NULL
@@ -392,11 +589,17 @@ setup_timers NULL NULL NULL
socket_instances NULL NULL NULL
socket_summary_by_event_name NULL NULL NULL
socket_summary_by_instance NULL NULL NULL
+status_by_account NULL NULL NULL
+status_by_host NULL NULL NULL
+status_by_thread NULL NULL NULL
+status_by_user NULL NULL NULL
+table_handles NULL NULL NULL
table_io_waits_summary_by_index_usage NULL NULL NULL
table_io_waits_summary_by_table NULL NULL NULL
table_lock_waits_summary_by_table NULL NULL NULL
threads NULL NULL NULL
users NULL NULL NULL
+user_variables_by_thread NULL NULL NULL
select lower(TABLE_NAME), TABLE_COLLATION, CHECKSUM
from information_schema.tables
where TABLE_SCHEMA='performance_schema'
@@ -418,9 +621,18 @@ events_statements_history_long utf8_general_ci NULL
events_statements_summary_by_account_by_event_name utf8_general_ci NULL
events_statements_summary_by_digest utf8_general_ci NULL
events_statements_summary_by_host_by_event_name utf8_general_ci NULL
+events_statements_summary_by_program utf8_general_ci NULL
events_statements_summary_by_thread_by_event_name utf8_general_ci NULL
events_statements_summary_by_user_by_event_name utf8_general_ci NULL
events_statements_summary_global_by_event_name utf8_general_ci NULL
+events_transactions_current utf8_general_ci NULL
+events_transactions_history utf8_general_ci NULL
+events_transactions_history_long utf8_general_ci NULL
+events_transactions_summary_by_account_by_event_name utf8_general_ci NULL
+events_transactions_summary_by_host_by_event_name utf8_general_ci NULL
+events_transactions_summary_by_thread_by_event_name utf8_general_ci NULL
+events_transactions_summary_by_user_by_event_name utf8_general_ci NULL
+events_transactions_summary_global_by_event_name utf8_general_ci NULL
events_waits_current utf8_general_ci NULL
events_waits_history utf8_general_ci NULL
events_waits_history_long utf8_general_ci NULL
@@ -433,14 +645,27 @@ events_waits_summary_global_by_event_name utf8_general_ci NULL
file_instances utf8_general_ci NULL
file_summary_by_event_name utf8_general_ci NULL
file_summary_by_instance utf8_general_ci NULL
+global_status utf8_general_ci NULL
hosts utf8_general_ci NULL
host_cache utf8_general_ci NULL
+memory_summary_by_account_by_event_name utf8_general_ci NULL
+memory_summary_by_host_by_event_name utf8_general_ci NULL
+memory_summary_by_thread_by_event_name utf8_general_ci NULL
+memory_summary_by_user_by_event_name utf8_general_ci NULL
+memory_summary_global_by_event_name utf8_general_ci NULL
+metadata_locks utf8_general_ci NULL
mutex_instances utf8_general_ci NULL
objects_summary_global_by_type utf8_general_ci NULL
performance_timers utf8_general_ci NULL
+prepared_statements_instances utf8_general_ci NULL
+replication_applier_configuration utf8_general_ci NULL
+replication_applier_status utf8_general_ci NULL
+replication_applier_status_by_coordinator utf8_general_ci NULL
+replication_connection_configuration utf8_general_ci NULL
rwlock_instances utf8_general_ci NULL
session_account_connect_attrs utf8_bin NULL
session_connect_attrs utf8_bin NULL
+session_status utf8_general_ci NULL
setup_actors utf8_general_ci NULL
setup_consumers utf8_general_ci NULL
setup_instruments utf8_general_ci NULL
@@ -449,11 +674,102 @@ setup_timers utf8_general_ci NULL
socket_instances utf8_general_ci NULL
socket_summary_by_event_name utf8_general_ci NULL
socket_summary_by_instance utf8_general_ci NULL
+status_by_account utf8_general_ci NULL
+status_by_host utf8_general_ci NULL
+status_by_thread utf8_general_ci NULL
+status_by_user utf8_general_ci NULL
+table_handles utf8_general_ci NULL
table_io_waits_summary_by_index_usage utf8_general_ci NULL
table_io_waits_summary_by_table utf8_general_ci NULL
table_lock_waits_summary_by_table utf8_general_ci NULL
threads utf8_general_ci NULL
users utf8_general_ci NULL
+user_variables_by_thread utf8_general_ci NULL
+select lower(TABLE_NAME), CREATE_OPTIONS
+from information_schema.tables
+where TABLE_SCHEMA='performance_schema'
+ order by table_name;
+lower(TABLE_NAME) CREATE_OPTIONS
+accounts
+cond_instances
+events_stages_current
+events_stages_history
+events_stages_history_long
+events_stages_summary_by_account_by_event_name
+events_stages_summary_by_host_by_event_name
+events_stages_summary_by_thread_by_event_name
+events_stages_summary_by_user_by_event_name
+events_stages_summary_global_by_event_name
+events_statements_current
+events_statements_history
+events_statements_history_long
+events_statements_summary_by_account_by_event_name
+events_statements_summary_by_digest
+events_statements_summary_by_host_by_event_name
+events_statements_summary_by_program
+events_statements_summary_by_thread_by_event_name
+events_statements_summary_by_user_by_event_name
+events_statements_summary_global_by_event_name
+events_transactions_current
+events_transactions_history
+events_transactions_history_long
+events_transactions_summary_by_account_by_event_name
+events_transactions_summary_by_host_by_event_name
+events_transactions_summary_by_thread_by_event_name
+events_transactions_summary_by_user_by_event_name
+events_transactions_summary_global_by_event_name
+events_waits_current
+events_waits_history
+events_waits_history_long
+events_waits_summary_by_account_by_event_name
+events_waits_summary_by_host_by_event_name
+events_waits_summary_by_instance
+events_waits_summary_by_thread_by_event_name
+events_waits_summary_by_user_by_event_name
+events_waits_summary_global_by_event_name
+file_instances
+file_summary_by_event_name
+file_summary_by_instance
+global_status
+hosts
+host_cache
+memory_summary_by_account_by_event_name
+memory_summary_by_host_by_event_name
+memory_summary_by_thread_by_event_name
+memory_summary_by_user_by_event_name
+memory_summary_global_by_event_name
+metadata_locks
+mutex_instances
+objects_summary_global_by_type
+performance_timers
+prepared_statements_instances
+replication_applier_configuration
+replication_applier_status
+replication_applier_status_by_coordinator
+replication_connection_configuration
+rwlock_instances
+session_account_connect_attrs
+session_connect_attrs
+session_status
+setup_actors
+setup_consumers
+setup_instruments
+setup_objects
+setup_timers
+socket_instances
+socket_summary_by_event_name
+socket_summary_by_instance
+status_by_account
+status_by_host
+status_by_thread
+status_by_user
+table_handles
+table_io_waits_summary_by_index_usage
+table_io_waits_summary_by_table
+table_lock_waits_summary_by_table
+threads
+users
+user_variables_by_thread
select lower(TABLE_NAME), TABLE_COMMENT
from information_schema.tables
where TABLE_SCHEMA='performance_schema'
@@ -475,9 +791,18 @@ events_statements_history_long
events_statements_summary_by_account_by_event_name
events_statements_summary_by_digest
events_statements_summary_by_host_by_event_name
+events_statements_summary_by_program
events_statements_summary_by_thread_by_event_name
events_statements_summary_by_user_by_event_name
events_statements_summary_global_by_event_name
+events_transactions_current
+events_transactions_history
+events_transactions_history_long
+events_transactions_summary_by_account_by_event_name
+events_transactions_summary_by_host_by_event_name
+events_transactions_summary_by_thread_by_event_name
+events_transactions_summary_by_user_by_event_name
+events_transactions_summary_global_by_event_name
events_waits_current
events_waits_history
events_waits_history_long
@@ -490,14 +815,27 @@ events_waits_summary_global_by_event_name
file_instances
file_summary_by_event_name
file_summary_by_instance
+global_status
hosts
host_cache
+memory_summary_by_account_by_event_name
+memory_summary_by_host_by_event_name
+memory_summary_by_thread_by_event_name
+memory_summary_by_user_by_event_name
+memory_summary_global_by_event_name
+metadata_locks
mutex_instances
objects_summary_global_by_type
performance_timers
+prepared_statements_instances
+replication_applier_configuration
+replication_applier_status
+replication_applier_status_by_coordinator
+replication_connection_configuration
rwlock_instances
session_account_connect_attrs
session_connect_attrs
+session_status
setup_actors
setup_consumers
setup_instruments
@@ -506,8 +844,14 @@ setup_timers
socket_instances
socket_summary_by_event_name
socket_summary_by_instance
+status_by_account
+status_by_host
+status_by_thread
+status_by_user
+table_handles
table_io_waits_summary_by_index_usage
table_io_waits_summary_by_table
table_lock_waits_summary_by_table
threads
users
+user_variables_by_thread
diff --git a/mysql-test/suite/perfschema/r/innodb_events_transactions_history_long.result b/mysql-test/suite/perfschema/r/innodb_events_transactions_history_long.result
new file mode 100644
index 00000000000..1d8c372fa39
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/innodb_events_transactions_history_long.result
@@ -0,0 +1,16 @@
+#
+# MDEV-24600 performance_schema.events_transactions_history_long.trx_id
+# reports garbage
+#
+TRUNCATE performance_schema.events_transactions_history_long;
+START TRANSACTION WITH CONSISTENT SNAPSHOT;
+COMMIT;
+BEGIN;
+SELECT table_name FROM mysql.innodb_table_stats LIMIT 0 LOCK IN SHARE MODE;
+table_name
+COMMIT;
+SELECT state,trx_id,gtid
+FROM performance_schema.events_transactions_history_long;
+state trx_id gtid
+COMMITTED NULL 0-0-0
+COMMITTED NULL 0-0-0
diff --git a/mysql-test/suite/perfschema/r/innodb_table_io.result b/mysql-test/suite/perfschema/r/innodb_table_io.result
index c37c1035e5a..286f0516e62 100644
--- a/mysql-test/suite/perfschema/r/innodb_table_io.result
+++ b/mysql-test/suite/perfschema/r/innodb_table_io.result
@@ -71,63 +71,69 @@ where event_name like 'wait/io/table/%'
and object_schema in ("test")
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 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
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab delete NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab 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 no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab 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
-show status where Variable_name like 'performance_schema_%' and
-Variable_name not like 'performance_schema_%_classes_lost';
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test no_index_tab insert 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test no_index_tab insert 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test no_index_tab insert 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 3
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 1
+wait/io/table/sql/handler TABLE test no_index_tab update 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 1
+wait/io/table/sql/handler TABLE test no_index_tab update 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 1
+wait/io/table/sql/handler TABLE test no_index_tab update 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 2
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 1
+wait/io/table/sql/handler TABLE test no_index_tab delete 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 2
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 2
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test marker insert 1
+show global status like 'performance_schema_%';
Variable_name Value
Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
Performance_schema_cond_instances_lost 0
Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
Performance_schema_file_handles_lost 0
Performance_schema_file_instances_lost 0
Performance_schema_hosts_lost 0
+Performance_schema_index_stat_lost 0
Performance_schema_locker_lost 0
+Performance_schema_memory_classes_lost 0
+Performance_schema_metadata_lock_lost 0
+Performance_schema_mutex_classes_lost 0
Performance_schema_mutex_instances_lost 0
+Performance_schema_nested_statement_lost 0
+Performance_schema_prepared_statements_lost 0
+Performance_schema_program_lost 0
+Performance_schema_rwlock_classes_lost 0
Performance_schema_rwlock_instances_lost 0
Performance_schema_session_connect_attrs_lost 0
+Performance_schema_socket_classes_lost 0
Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
Performance_schema_table_handles_lost 0
Performance_schema_table_instances_lost 0
+Performance_schema_table_lock_stat_lost 0
+Performance_schema_thread_classes_lost 0
Performance_schema_thread_instances_lost 0
Performance_schema_users_lost 0
truncate performance_schema.events_waits_history_long;
diff --git a/mysql-test/suite/perfschema/r/io_cache.result b/mysql-test/suite/perfschema/r/io_cache.result
new file mode 100644
index 00000000000..9a7f04dace7
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/io_cache.result
@@ -0,0 +1,96 @@
+#
+## Connection default
+#
+connection default;
+USE test;
+DROP TABLE IF EXISTS t1;
+SELECT @@global.binlog_cache_size;
+@@global.binlog_cache_size
+4096
+SELECT @@global.binlog_stmt_cache_size;
+@@global.binlog_stmt_cache_size
+4096
+SELECT * FROM performance_schema.setup_instruments WHERE name LIKE "%file/sql/io_cache%";
+NAME ENABLED TIMED
+wait/io/file/sql/io_cache YES YES
+#
+## Connection con1
+#
+connect con1, localhost, root,,;
+USE test;
+CREATE TABLE t1 (s1 INT, s2 VARCHAR(4096));
+SET SESSION AUTOCOMMIT = 0;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1,'
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+');
+INSERT INTO t1 VALUES (2,'
+bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
+bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
+bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
+bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
+bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
+');
+INSERT INTO t1 VALUES (3,'
+cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
+cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
+cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
+cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
+cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
+');
+INSERT INTO t1 VALUES (4,'
+dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
+dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
+dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
+dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
+dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
+');
+INSERT INTO t1 VALUES (5,'
+eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
+eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
+eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
+eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
+eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
+');
+INSERT INTO t1 VALUES (6,'
+ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+');
+INSERT INTO t1 VALUES (7,'
+gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+');
+INSERT INTO t1 VALUES (8,'
+hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+');
+COMMIT;
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+8
+disconnect con1;
+#
+## Connection default
+#
+connection default;
+SELECT COUNT(*) FROM test.t1;
+COUNT(*)
+8
+SELECT COUNT(*) FROM performance_schema.file_summary_by_event_name WHERE event_name LIKE "%io_cache%";
+COUNT(*)
+1
+connection default;
+DROP TABLE t1;
diff --git a/mysql-test/suite/perfschema/r/max_program_zero.result b/mysql-test/suite/perfschema/r/max_program_zero.result
new file mode 100644
index 00000000000..b75b24ffdb4
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/max_program_zero.result
@@ -0,0 +1,313 @@
+show databases;
+Database
+information_schema
+mtr
+mysql
+performance_schema
+test
+select count(*) from performance_schema.performance_timers;
+count(*)
+5
+select count(*) from performance_schema.setup_consumers;
+count(*)
+15
+select count(*) > 4 from performance_schema.setup_instruments;
+count(*) > 4
+1
+select count(*) from performance_schema.setup_timers;
+count(*)
+5
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release
+select * from performance_schema.accounts;
+select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_digest;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_transactions_current;
+select * from performance_schema.events_transactions_history;
+select * from performance_schema.events_transactions_history_long;
+select * from performance_schema.events_transactions_summary_by_account_by_event_name;
+select * from performance_schema.events_transactions_summary_by_host_by_event_name;
+select * from performance_schema.events_transactions_summary_by_thread_by_event_name;
+select * from performance_schema.events_transactions_summary_by_user_by_event_name;
+select * from performance_schema.events_transactions_summary_global_by_event_name;
+select * from performance_schema.events_waits_current;
+select * from performance_schema.events_waits_history;
+select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+select * from performance_schema.events_waits_summary_by_instance;
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.file_instances;
+select * from performance_schema.file_summary_by_event_name;
+select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.hosts;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.metadata_locks;
+select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
+select * from performance_schema.performance_timers;
+select * from performance_schema.rwlock_instances;
+select * from performance_schema.session_account_connect_attrs;
+select * from performance_schema.session_connect_attrs;
+select * from performance_schema.setup_actors;
+select * from performance_schema.setup_consumers;
+select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
+select * from performance_schema.setup_timers;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.table_handles;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
+select * from performance_schema.threads;
+select * from performance_schema.users;
+select * from performance_schema.replication_connection_configuration;
+select * from performance_schema.replication_applier_configuration;
+select * from performance_schema.replication_applier_status;
+select * from performance_schema.replication_applier_status_by_coordinator;
+select * from performance_schema.global_status;
+select * from performance_schema.status_by_thread;
+select * from performance_schema.status_by_user;
+select * from performance_schema.status_by_host;
+select * from performance_schema.status_by_account;
+select * from performance_schema.session_status;
+show global variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_transactions_history_long_size 1000
+performance_schema_events_transactions_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 90
+performance_schema_max_cond_instances 1000
+performance_schema_max_digest_length 1024
+performance_schema_max_file_classes 80
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_index_stat 5000
+performance_schema_max_memory_classes 320
+performance_schema_max_metadata_locks 10000
+performance_schema_max_mutex_classes 210
+performance_schema_max_mutex_instances 5000
+performance_schema_max_prepared_statements_instances 100
+performance_schema_max_program_instances 0
+performance_schema_max_rwlock_classes 50
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_sql_text_length 1024
+performance_schema_max_stage_classes 160
+performance_schema_max_statement_classes 222
+performance_schema_max_statement_stack 1
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_table_lock_stat 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_session_connect_attrs_size 2048
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
+show engine PERFORMANCE_SCHEMA status;
+show global status like "performance_schema%";
+show global variables like "performance_schema_max_program_instances";
+Variable_name Value
+performance_schema_max_program_instances 0
+show global variables like "performance_schema_max_statement_stack";
+Variable_name Value
+performance_schema_max_statement_stack 1
+#####################
+# Setup
+#####################
+# SET-UP
+CREATE DATABASE nested_sp;
+USE nested_sp;
+CREATE TABLE t1(
+id CHAR(16) NOT NULL DEFAULT '',
+data INT NOT NULL
+);
+CREATE TABLE t2(
+n INT UNSIGNED NOT NULL,
+f BIGINT UNSIGNED
+) engine=innodb;
+############################
+# Creating Stored Programs #
+############################
+CREATE PROCEDURE c1(x INT)
+CALL c2("c", x)|
+CREATE PROCEDURE c2(s CHAR(16), x INT)
+CALL c3(x, s)|
+CREATE PROCEDURE c3(x INT, s CHAR(16))
+CALL c4("level", x, s)|
+CREATE PROCEDURE c4(l CHAR(8), x INT, s CHAR(16))
+INSERT INTO t1 VALUES (concat(l,s), x)|
+CREATE PROCEDURE iotest(x1 CHAR(16), x2 CHAR(16), y INT)
+BEGIN
+CALL inc2(x2, y);
+INSERT INTO t1 VALUES (x1, y);
+END|
+CREATE PROCEDURE inc2(x CHAR(16), y INT)
+BEGIN
+CALL inc(y);
+INSERT INTO t1 VALUES (x, y);
+END|
+CREATE PROCEDURE inc(inout io INT)
+SET io = io + 1|
+CREATE FUNCTION mul(x INT, y INT) RETURNS INT
+RETURN x*y|
+CREATE FUNCTION inc(i INT) RETURNS INT
+RETURN i+1|
+CREATE FUNCTION fac(n INT UNSIGNED) RETURNS BIGINT UNSIGNED
+BEGIN
+DECLARE f BIGINT UNSIGNED DEFAULT 1;
+WHILE n > 1 DO
+SET f = f * n;
+SET n = n - 1;
+END WHILE;
+RETURN f;
+END|
+CREATE FUNCTION fun(i INT, u INT UNSIGNED) RETURNS DOUBLE
+RETURN mul(inc(i), fac(u))|
+CREATE PROCEDURE ifac(n INT UNSIGNED)
+BEGIN
+DECLARE i BIGINT UNSIGNED DEFAULT 1;
+IF n > 20 THEN
+SET n = 20; # bigint overflow otherwise
+END IF;
+WHILE i <= n DO
+BEGIN
+INSERT INTO t2 VALUES (i, fac(i));
+SET i = i + 1;
+END;
+END WHILE;
+END|
+CREATE TRIGGER trg AFTER INSERT ON t1 FOR EACH ROW
+CALL ifac(10)|
+TRUNCATE performance_schema.events_statements_summary_by_program;
+#####################
+# Executing Queries
+#####################
+#####################
+# Executing queries #
+#####################
+CALL c1(42);
+SELECT * FROM t1;
+id data
+levelc 42
+DELETE FROM t1;
+CALL iotest("io1", "io2", 1);
+SELECT * FROM t1 ORDER BY data DESC;
+id data
+io2 2
+io1 1
+DELETE FROM t1;
+SELECT fun(6,10);
+fun(6,10)
+25401600
+INSERT INTO t1 VALUES (20,13);
+SELECT * FROM t2;
+n f
+1 1
+2 2
+3 6
+4 24
+5 120
+6 720
+7 5040
+8 40320
+9 362880
+10 3628800
+1 1
+2 2
+3 6
+4 24
+5 120
+6 720
+7 5040
+8 40320
+9 362880
+10 3628800
+1 1
+2 2
+3 6
+4 24
+5 120
+6 720
+7 5040
+8 40320
+9 362880
+10 3628800
+1 1
+2 2
+3 6
+4 24
+5 120
+6 720
+7 5040
+8 40320
+9 362880
+10 3628800
+###########################################
+# Quering PS statement summary table #
+###########################################
+SELECT OBJECT_TYPE, OBJECT_NAME, OBJECT_SCHEMA
+FROM performance_schema.events_statements_summary_by_program;
+OBJECT_TYPE OBJECT_NAME OBJECT_SCHEMA
+SELECT COUNT(*) FROM performance_schema.events_statements_summary_by_program;
+COUNT(*)
+0
+#####################
+# Cleanup
+#####################
+DROP PROCEDURE c4;
+DROP PROCEDURE c3;
+DROP PROCEDURE c2;
+DROP PROCEDURE c1;
+DROP PROCEDURE inc;
+DROP PROCEDURE inc2;
+DROP PROCEDURE iotest;
+DROP FUNCTION mul;
+DROP FUNCTION inc;
+DROP FUNCTION fac;
+DROP FUNCTION fun;
+DROP PROCEDURE ifac;
+DROP TRIGGER trg;
+DROP TABLE t1,t2;
+DROP DATABASE nested_sp;
diff --git a/mysql-test/suite/perfschema/r/mdl_func.result b/mysql-test/suite/perfschema/r/mdl_func.result
new file mode 100644
index 00000000000..4887b15efa5
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/mdl_func.result
@@ -0,0 +1,920 @@
+UPDATE performance_schema.setup_instruments SET enabled = 'NO', timed = 'YES';
+UPDATE performance_schema.setup_instruments SET enabled = 'YES'
+WHERE name in ('wait/io/table/sql/handler',
+'wait/lock/table/sql/handler',
+'wait/lock/metadata/sql/mdl');
+set @orig_sql_mode= @@sql_mode;
+set sql_mode= (select replace(@@sql_mode,'NO_AUTO_CREATE_USER',''));
+grant ALL on *.* to user1@localhost;
+grant ALL on *.* to user2@localhost;
+set sql_mode= @orig_sql_mode;
+insert into performance_schema.setup_objects (object_type, object_schema, object_name, enabled, timed)
+values ('TABLE', 'mtr', '%', 'NO', 'NO');
+# Switch to (con1, localhost, user1, , )
+connect con1, localhost, user1, , ;
+# Switch to (con2, localhost, user2, , )
+connect con2, localhost, user2, , ;
+connection default;
+drop function if exists thread_id_name;
+create function thread_id_name(THREAD_ID int)
+returns varchar(16)
+begin
+if (THREAD_ID IS NULL)
+then
+return NULL;
+end if;
+if (THREAD_ID = @user1_tid)
+then
+return "USER1";
+end if;
+if (THREAD_ID = @user2_tid)
+then
+return "USER2";
+end if;
+return "OTHER";
+end;
+//
+select thread_id_name(NULL);
+thread_id_name(NULL)
+NULL
+select thread_id_name(@user1_tid);
+thread_id_name(@user1_tid)
+USER1
+select thread_id_name(@user2_tid);
+thread_id_name(@user2_tid)
+USER2
+prepare dump_metadata_locks from
+"select OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME,
+ LOCK_TYPE, LOCK_DURATION, LOCK_STATUS,
+ thread_id_name(OWNER_THREAD_ID) as OWNER_THREAD_ID
+ from performance_schema.metadata_locks
+ order by OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME,
+ LOCK_TYPE, LOCK_DURATION, LOCK_STATUS, OWNER_THREAD_ID;";
+prepare dump_table_handles from
+"select OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME,
+ INTERNAL_LOCK, EXTERNAL_LOCK,
+ thread_id_name(OWNER_THREAD_ID) as OWNER_THREAD_ID
+ from performance_schema.table_handles
+ order by OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME,
+ INTERNAL_LOCK, EXTERNAL_LOCK, OWNER_THREAD_ID;";
+prepare dump_waits_current from
+"select thread_id_name(THREAD_ID) as THREAD_ID,
+ EVENT_NAME,
+ TIMER_START is not NULL as TIMER_START_SET,
+ TIMER_END is not NULL as TIMER_END_SET,
+ OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME, INDEX_NAME,
+ OPERATION
+ from performance_schema.events_waits_current
+ where event_name = \'wait/lock/metadata/sql/mdl\';";
+prepare dump_waits_history_long from
+"select thread_id_name(THREAD_ID) as THREAD_ID,
+ EVENT_NAME,
+ TIMER_START is not NULL as TIMER_START_SET,
+ TIMER_END is not NULL as TIMER_END_SET,
+ OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME, INDEX_NAME,
+ OPERATION
+ from performance_schema.events_waits_history_long
+ where event_name = \'wait/lock/metadata/sql/mdl\';";
+truncate table performance_schema.events_statements_summary_by_digest;
+flush status;
+flush tables;
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1 (id INT PRIMARY KEY, b CHAR(100) DEFAULT 'initial value');
+INSERT INTO t1 (id) VALUES (1), (2), (3), (4), (5), (6), (7), (8);
+TRUNCATE TABLE performance_schema.events_waits_history_long;
+TRUNCATE TABLE performance_schema.events_waits_history;
+TRUNCATE TABLE performance_schema.events_waits_current;
+connection con1;
+BEGIN;
+SELECT * from t1 where id=1;
+id b
+1 initial value
+connection default;
+"---- Marker 1 ----"
+execute dump_metadata_locks;
+OBJECT_TYPE FUNCTION
+OBJECT_SCHEMA test
+OBJECT_NAME thread_id_name
+LOCK_TYPE SHARED
+LOCK_DURATION TRANSACTION
+LOCK_STATUS GRANTED
+OWNER_THREAD_ID OTHER
+OBJECT_TYPE TABLE
+OBJECT_SCHEMA performance_schema
+OBJECT_NAME metadata_locks
+LOCK_TYPE SHARED_READ
+LOCK_DURATION TRANSACTION
+LOCK_STATUS GRANTED
+OWNER_THREAD_ID OTHER
+OBJECT_TYPE TABLE
+OBJECT_SCHEMA test
+OBJECT_NAME t1
+LOCK_TYPE SHARED_READ
+LOCK_DURATION TRANSACTION
+LOCK_STATUS GRANTED
+OWNER_THREAD_ID USER1
+execute dump_table_handles;
+OBJECT_TYPE TABLE
+OBJECT_SCHEMA test
+OBJECT_NAME t1
+INTERNAL_LOCK READ
+EXTERNAL_LOCK NULL
+OWNER_THREAD_ID OTHER
+execute dump_waits_current;
+execute dump_waits_history_long;
+connection con1;
+COMMIT;
+connection default;
+"---- Marker 2 ----"
+execute dump_metadata_locks;
+OBJECT_TYPE FUNCTION
+OBJECT_SCHEMA test
+OBJECT_NAME thread_id_name
+LOCK_TYPE SHARED
+LOCK_DURATION TRANSACTION
+LOCK_STATUS GRANTED
+OWNER_THREAD_ID OTHER
+OBJECT_TYPE TABLE
+OBJECT_SCHEMA performance_schema
+OBJECT_NAME metadata_locks
+LOCK_TYPE SHARED_READ
+LOCK_DURATION TRANSACTION
+LOCK_STATUS GRANTED
+OWNER_THREAD_ID OTHER
+execute dump_table_handles;
+OBJECT_TYPE TABLE
+OBJECT_SCHEMA test
+OBJECT_NAME t1
+INTERNAL_LOCK READ
+EXTERNAL_LOCK NULL
+OWNER_THREAD_ID OTHER
+execute dump_waits_current;
+execute dump_waits_history_long;
+connection con1;
+BEGIN;
+UPDATE t1 set b="new value" where id=2;
+connection default;
+"---- Marker 3 ----"
+execute dump_metadata_locks;
+OBJECT_TYPE FUNCTION
+OBJECT_SCHEMA test
+OBJECT_NAME thread_id_name
+LOCK_TYPE SHARED
+LOCK_DURATION TRANSACTION
+LOCK_STATUS GRANTED
+OWNER_THREAD_ID OTHER
+OBJECT_TYPE TABLE
+OBJECT_SCHEMA performance_schema
+OBJECT_NAME metadata_locks
+LOCK_TYPE SHARED_READ
+LOCK_DURATION TRANSACTION
+LOCK_STATUS GRANTED
+OWNER_THREAD_ID OTHER
+OBJECT_TYPE TABLE
+OBJECT_SCHEMA test
+OBJECT_NAME t1
+LOCK_TYPE SHARED_WRITE
+LOCK_DURATION TRANSACTION
+LOCK_STATUS GRANTED
+OWNER_THREAD_ID USER1
+execute dump_table_handles;
+OBJECT_TYPE TABLE
+OBJECT_SCHEMA test
+OBJECT_NAME t1
+INTERNAL_LOCK WRITE
+EXTERNAL_LOCK NULL
+OWNER_THREAD_ID OTHER
+execute dump_waits_current;
+execute dump_waits_history_long;
+connection con2;
+BEGIN;
+DROP TABLE t1;;
+connection default;
+"---- Marker 4 ----"
+execute dump_metadata_locks;
+OBJECT_TYPE FUNCTION
+OBJECT_SCHEMA test
+OBJECT_NAME thread_id_name
+LOCK_TYPE SHARED
+LOCK_DURATION TRANSACTION
+LOCK_STATUS GRANTED
+OWNER_THREAD_ID OTHER
+OBJECT_TYPE SCHEMA
+OBJECT_SCHEMA test
+OBJECT_NAME NULL
+LOCK_TYPE INTENTION_EXCLUSIVE
+LOCK_DURATION TRANSACTION
+LOCK_STATUS GRANTED
+OWNER_THREAD_ID USER2
+OBJECT_TYPE TABLE
+OBJECT_SCHEMA performance_schema
+OBJECT_NAME metadata_locks
+LOCK_TYPE SHARED_READ
+LOCK_DURATION TRANSACTION
+LOCK_STATUS GRANTED
+OWNER_THREAD_ID OTHER
+OBJECT_TYPE TABLE
+OBJECT_SCHEMA test
+OBJECT_NAME t1
+LOCK_TYPE EXCLUSIVE
+LOCK_DURATION TRANSACTION
+LOCK_STATUS PENDING
+OWNER_THREAD_ID USER2
+OBJECT_TYPE TABLE
+OBJECT_SCHEMA test
+OBJECT_NAME t1
+LOCK_TYPE SHARED_WRITE
+LOCK_DURATION TRANSACTION
+LOCK_STATUS GRANTED
+OWNER_THREAD_ID USER1
+execute dump_table_handles;
+OBJECT_TYPE TABLE
+OBJECT_SCHEMA test
+OBJECT_NAME t1
+INTERNAL_LOCK WRITE
+EXTERNAL_LOCK NULL
+OWNER_THREAD_ID OTHER
+execute dump_waits_current;
+THREAD_ID USER2
+EVENT_NAME wait/lock/metadata/sql/mdl
+TIMER_START_SET 1
+TIMER_END_SET 1
+OBJECT_TYPE TABLE
+OBJECT_SCHEMA test
+OBJECT_NAME t1
+INDEX_NAME NULL
+OPERATION metadata lock
+execute dump_waits_history_long;
+connection con1;
+COMMIT;
+connection con2;
+connection default;
+"---- Marker 5 ----"
+execute dump_metadata_locks;
+OBJECT_TYPE FUNCTION
+OBJECT_SCHEMA test
+OBJECT_NAME thread_id_name
+LOCK_TYPE SHARED
+LOCK_DURATION TRANSACTION
+LOCK_STATUS GRANTED
+OWNER_THREAD_ID OTHER
+OBJECT_TYPE TABLE
+OBJECT_SCHEMA performance_schema
+OBJECT_NAME metadata_locks
+LOCK_TYPE SHARED_READ
+LOCK_DURATION TRANSACTION
+LOCK_STATUS GRANTED
+OWNER_THREAD_ID OTHER
+execute dump_table_handles;
+execute dump_waits_current;
+THREAD_ID USER2
+EVENT_NAME wait/lock/metadata/sql/mdl
+TIMER_START_SET 1
+TIMER_END_SET 1
+OBJECT_TYPE TABLE
+OBJECT_SCHEMA test
+OBJECT_NAME t1
+INDEX_NAME NULL
+OPERATION metadata lock
+execute dump_waits_history_long;
+THREAD_ID USER2
+EVENT_NAME wait/lock/metadata/sql/mdl
+TIMER_START_SET 1
+TIMER_END_SET 1
+OBJECT_TYPE TABLE
+OBJECT_SCHEMA test
+OBJECT_NAME t1
+INDEX_NAME NULL
+OPERATION metadata lock
+connection default;
+TRUNCATE TABLE performance_schema.events_waits_history_long;
+TRUNCATE TABLE performance_schema.events_waits_history;
+TRUNCATE TABLE performance_schema.events_waits_current;
+create table t1 (a int);
+connection con1;
+LOCK TABLE t1 READ;
+connection default;
+"---- Marker 6 ----"
+execute dump_metadata_locks;
+OBJECT_TYPE FUNCTION
+OBJECT_SCHEMA test
+OBJECT_NAME thread_id_name
+LOCK_TYPE SHARED
+LOCK_DURATION TRANSACTION
+LOCK_STATUS GRANTED
+OWNER_THREAD_ID OTHER
+OBJECT_TYPE TABLE
+OBJECT_SCHEMA performance_schema
+OBJECT_NAME metadata_locks
+LOCK_TYPE SHARED_READ
+LOCK_DURATION TRANSACTION
+LOCK_STATUS GRANTED
+OWNER_THREAD_ID OTHER
+OBJECT_TYPE TABLE
+OBJECT_SCHEMA test
+OBJECT_NAME t1
+LOCK_TYPE SHARED_READ
+LOCK_DURATION TRANSACTION
+LOCK_STATUS GRANTED
+OWNER_THREAD_ID USER1
+execute dump_table_handles;
+OBJECT_TYPE TABLE
+OBJECT_SCHEMA test
+OBJECT_NAME t1
+INTERNAL_LOCK READ NO INSERT
+EXTERNAL_LOCK READ EXTERNAL
+OWNER_THREAD_ID USER1
+execute dump_waits_current;
+execute dump_waits_history_long;
+connection con2;
+LOCK TABLE t1 write;;
+connection default;
+"---- Marker 7 ----"
+execute dump_metadata_locks;
+OBJECT_TYPE FUNCTION
+OBJECT_SCHEMA test
+OBJECT_NAME thread_id_name
+LOCK_TYPE SHARED
+LOCK_DURATION TRANSACTION
+LOCK_STATUS GRANTED
+OWNER_THREAD_ID OTHER
+OBJECT_TYPE SCHEMA
+OBJECT_SCHEMA test
+OBJECT_NAME NULL
+LOCK_TYPE INTENTION_EXCLUSIVE
+LOCK_DURATION TRANSACTION
+LOCK_STATUS GRANTED
+OWNER_THREAD_ID USER2
+OBJECT_TYPE TABLE
+OBJECT_SCHEMA performance_schema
+OBJECT_NAME metadata_locks
+LOCK_TYPE SHARED_READ
+LOCK_DURATION TRANSACTION
+LOCK_STATUS GRANTED
+OWNER_THREAD_ID OTHER
+OBJECT_TYPE TABLE
+OBJECT_SCHEMA test
+OBJECT_NAME t1
+LOCK_TYPE SHARED_NO_READ_WRITE
+LOCK_DURATION TRANSACTION
+LOCK_STATUS PENDING
+OWNER_THREAD_ID USER2
+OBJECT_TYPE TABLE
+OBJECT_SCHEMA test
+OBJECT_NAME t1
+LOCK_TYPE SHARED_READ
+LOCK_DURATION TRANSACTION
+LOCK_STATUS GRANTED
+OWNER_THREAD_ID USER1
+execute dump_table_handles;
+OBJECT_TYPE TABLE
+OBJECT_SCHEMA test
+OBJECT_NAME t1
+INTERNAL_LOCK READ NO INSERT
+EXTERNAL_LOCK READ EXTERNAL
+OWNER_THREAD_ID USER1
+execute dump_waits_current;
+THREAD_ID USER2
+EVENT_NAME wait/lock/metadata/sql/mdl
+TIMER_START_SET 1
+TIMER_END_SET 1
+OBJECT_TYPE TABLE
+OBJECT_SCHEMA test
+OBJECT_NAME t1
+INDEX_NAME NULL
+OPERATION metadata lock
+execute dump_waits_history_long;
+connection con1;
+UNLOCK TABLES;
+connection con2;
+connection default;
+"---- Marker 8 ----"
+execute dump_metadata_locks;
+OBJECT_TYPE BACKUP
+OBJECT_SCHEMA NULL
+OBJECT_NAME NULL
+LOCK_TYPE BACKUP_DDL
+LOCK_DURATION STATEMENT
+LOCK_STATUS GRANTED
+OWNER_THREAD_ID USER2
+OBJECT_TYPE BACKUP
+OBJECT_SCHEMA NULL
+OBJECT_NAME NULL
+LOCK_TYPE BACKUP_DML
+LOCK_DURATION STATEMENT
+LOCK_STATUS GRANTED
+OWNER_THREAD_ID USER2
+OBJECT_TYPE FUNCTION
+OBJECT_SCHEMA test
+OBJECT_NAME thread_id_name
+LOCK_TYPE SHARED
+LOCK_DURATION TRANSACTION
+LOCK_STATUS GRANTED
+OWNER_THREAD_ID OTHER
+OBJECT_TYPE SCHEMA
+OBJECT_SCHEMA test
+OBJECT_NAME NULL
+LOCK_TYPE INTENTION_EXCLUSIVE
+LOCK_DURATION TRANSACTION
+LOCK_STATUS GRANTED
+OWNER_THREAD_ID USER2
+OBJECT_TYPE TABLE
+OBJECT_SCHEMA performance_schema
+OBJECT_NAME metadata_locks
+LOCK_TYPE SHARED_READ
+LOCK_DURATION TRANSACTION
+LOCK_STATUS GRANTED
+OWNER_THREAD_ID OTHER
+OBJECT_TYPE TABLE
+OBJECT_SCHEMA test
+OBJECT_NAME t1
+LOCK_TYPE SHARED_NO_READ_WRITE
+LOCK_DURATION TRANSACTION
+LOCK_STATUS GRANTED
+OWNER_THREAD_ID USER2
+execute dump_table_handles;
+OBJECT_TYPE TABLE
+OBJECT_SCHEMA test
+OBJECT_NAME t1
+INTERNAL_LOCK WRITE
+EXTERNAL_LOCK WRITE EXTERNAL
+OWNER_THREAD_ID USER2
+execute dump_waits_current;
+execute dump_waits_history_long;
+THREAD_ID USER2
+EVENT_NAME wait/lock/metadata/sql/mdl
+TIMER_START_SET 1
+TIMER_END_SET 1
+OBJECT_TYPE TABLE
+OBJECT_SCHEMA test
+OBJECT_NAME t1
+INDEX_NAME NULL
+OPERATION metadata lock
+connection con1;
+LOCK TABLES t1 read;;
+connection default;
+"---- Marker 9 ----"
+execute dump_metadata_locks;
+OBJECT_TYPE BACKUP
+OBJECT_SCHEMA NULL
+OBJECT_NAME NULL
+LOCK_TYPE BACKUP_DDL
+LOCK_DURATION STATEMENT
+LOCK_STATUS GRANTED
+OWNER_THREAD_ID USER2
+OBJECT_TYPE BACKUP
+OBJECT_SCHEMA NULL
+OBJECT_NAME NULL
+LOCK_TYPE BACKUP_DML
+LOCK_DURATION STATEMENT
+LOCK_STATUS GRANTED
+OWNER_THREAD_ID USER2
+OBJECT_TYPE FUNCTION
+OBJECT_SCHEMA test
+OBJECT_NAME thread_id_name
+LOCK_TYPE SHARED
+LOCK_DURATION TRANSACTION
+LOCK_STATUS GRANTED
+OWNER_THREAD_ID OTHER
+OBJECT_TYPE SCHEMA
+OBJECT_SCHEMA test
+OBJECT_NAME NULL
+LOCK_TYPE INTENTION_EXCLUSIVE
+LOCK_DURATION TRANSACTION
+LOCK_STATUS GRANTED
+OWNER_THREAD_ID USER2
+OBJECT_TYPE TABLE
+OBJECT_SCHEMA performance_schema
+OBJECT_NAME metadata_locks
+LOCK_TYPE SHARED_READ
+LOCK_DURATION TRANSACTION
+LOCK_STATUS GRANTED
+OWNER_THREAD_ID OTHER
+OBJECT_TYPE TABLE
+OBJECT_SCHEMA test
+OBJECT_NAME t1
+LOCK_TYPE SHARED_NO_READ_WRITE
+LOCK_DURATION TRANSACTION
+LOCK_STATUS GRANTED
+OWNER_THREAD_ID USER2
+OBJECT_TYPE TABLE
+OBJECT_SCHEMA test
+OBJECT_NAME t1
+LOCK_TYPE SHARED_READ
+LOCK_DURATION TRANSACTION
+LOCK_STATUS PENDING
+OWNER_THREAD_ID USER1
+execute dump_table_handles;
+OBJECT_TYPE TABLE
+OBJECT_SCHEMA test
+OBJECT_NAME t1
+INTERNAL_LOCK WRITE
+EXTERNAL_LOCK WRITE EXTERNAL
+OWNER_THREAD_ID USER2
+execute dump_waits_current;
+THREAD_ID USER1
+EVENT_NAME wait/lock/metadata/sql/mdl
+TIMER_START_SET 1
+TIMER_END_SET 1
+OBJECT_TYPE TABLE
+OBJECT_SCHEMA test
+OBJECT_NAME t1
+INDEX_NAME NULL
+OPERATION metadata lock
+execute dump_waits_history_long;
+THREAD_ID USER2
+EVENT_NAME wait/lock/metadata/sql/mdl
+TIMER_START_SET 1
+TIMER_END_SET 1
+OBJECT_TYPE TABLE
+OBJECT_SCHEMA test
+OBJECT_NAME t1
+INDEX_NAME NULL
+OPERATION metadata lock
+connection con2;
+UNLOCK TABLES;
+connection con1;
+connection default;
+"---- Marker 10 ----"
+execute dump_metadata_locks;
+OBJECT_TYPE FUNCTION
+OBJECT_SCHEMA test
+OBJECT_NAME thread_id_name
+LOCK_TYPE SHARED
+LOCK_DURATION TRANSACTION
+LOCK_STATUS GRANTED
+OWNER_THREAD_ID OTHER
+OBJECT_TYPE TABLE
+OBJECT_SCHEMA performance_schema
+OBJECT_NAME metadata_locks
+LOCK_TYPE SHARED_READ
+LOCK_DURATION TRANSACTION
+LOCK_STATUS GRANTED
+OWNER_THREAD_ID OTHER
+OBJECT_TYPE TABLE
+OBJECT_SCHEMA test
+OBJECT_NAME t1
+LOCK_TYPE SHARED_READ
+LOCK_DURATION TRANSACTION
+LOCK_STATUS GRANTED
+OWNER_THREAD_ID USER1
+execute dump_table_handles;
+OBJECT_TYPE TABLE
+OBJECT_SCHEMA test
+OBJECT_NAME t1
+INTERNAL_LOCK READ NO INSERT
+EXTERNAL_LOCK READ EXTERNAL
+OWNER_THREAD_ID USER1
+execute dump_waits_current;
+execute dump_waits_history_long;
+THREAD_ID USER2
+EVENT_NAME wait/lock/metadata/sql/mdl
+TIMER_START_SET 1
+TIMER_END_SET 1
+OBJECT_TYPE TABLE
+OBJECT_SCHEMA test
+OBJECT_NAME t1
+INDEX_NAME NULL
+OPERATION metadata lock
+THREAD_ID USER1
+EVENT_NAME wait/lock/metadata/sql/mdl
+TIMER_START_SET 1
+TIMER_END_SET 1
+OBJECT_TYPE TABLE
+OBJECT_SCHEMA test
+OBJECT_NAME t1
+INDEX_NAME NULL
+OPERATION metadata lock
+connection con1;
+UNLOCK TABLES;
+connection default;
+"---- Marker 11 ----"
+execute dump_metadata_locks;
+OBJECT_TYPE FUNCTION
+OBJECT_SCHEMA test
+OBJECT_NAME thread_id_name
+LOCK_TYPE SHARED
+LOCK_DURATION TRANSACTION
+LOCK_STATUS GRANTED
+OWNER_THREAD_ID OTHER
+OBJECT_TYPE TABLE
+OBJECT_SCHEMA performance_schema
+OBJECT_NAME metadata_locks
+LOCK_TYPE SHARED_READ
+LOCK_DURATION TRANSACTION
+LOCK_STATUS GRANTED
+OWNER_THREAD_ID OTHER
+execute dump_table_handles;
+OBJECT_TYPE TABLE
+OBJECT_SCHEMA test
+OBJECT_NAME t1
+INTERNAL_LOCK READ NO INSERT
+EXTERNAL_LOCK NULL
+OWNER_THREAD_ID OTHER
+execute dump_waits_current;
+execute dump_waits_history_long;
+THREAD_ID USER2
+EVENT_NAME wait/lock/metadata/sql/mdl
+TIMER_START_SET 1
+TIMER_END_SET 1
+OBJECT_TYPE TABLE
+OBJECT_SCHEMA test
+OBJECT_NAME t1
+INDEX_NAME NULL
+OPERATION metadata lock
+THREAD_ID USER1
+EVENT_NAME wait/lock/metadata/sql/mdl
+TIMER_START_SET 1
+TIMER_END_SET 1
+OBJECT_TYPE TABLE
+OBJECT_SCHEMA test
+OBJECT_NAME t1
+INDEX_NAME NULL
+OPERATION metadata lock
+TRUNCATE TABLE performance_schema.events_waits_history_long;
+TRUNCATE TABLE performance_schema.events_waits_history;
+TRUNCATE TABLE performance_schema.events_waits_current;
+connection con1;
+BEGIN;
+UPDATE LOW_PRIORITY t1 SET a=8;
+connection default;
+"---- Marker 12 ----"
+execute dump_metadata_locks;
+OBJECT_TYPE FUNCTION
+OBJECT_SCHEMA test
+OBJECT_NAME thread_id_name
+LOCK_TYPE SHARED
+LOCK_DURATION TRANSACTION
+LOCK_STATUS GRANTED
+OWNER_THREAD_ID OTHER
+OBJECT_TYPE TABLE
+OBJECT_SCHEMA performance_schema
+OBJECT_NAME metadata_locks
+LOCK_TYPE SHARED_READ
+LOCK_DURATION TRANSACTION
+LOCK_STATUS GRANTED
+OWNER_THREAD_ID OTHER
+OBJECT_TYPE TABLE
+OBJECT_SCHEMA test
+OBJECT_NAME t1
+LOCK_TYPE SHARED_WRITE
+LOCK_DURATION TRANSACTION
+LOCK_STATUS GRANTED
+OWNER_THREAD_ID USER1
+execute dump_table_handles;
+OBJECT_TYPE TABLE
+OBJECT_SCHEMA test
+OBJECT_NAME t1
+INTERNAL_LOCK WRITE LOW PRIORITY
+EXTERNAL_LOCK NULL
+OWNER_THREAD_ID OTHER
+execute dump_waits_current;
+execute dump_waits_history_long;
+connection con1;
+COMMIT;
+connection default;
+TRUNCATE TABLE performance_schema.events_waits_history_long;
+TRUNCATE TABLE performance_schema.events_waits_history;
+TRUNCATE TABLE performance_schema.events_waits_current;
+connection con1;
+SELECT GET_LOCK('test', 0);
+GET_LOCK('test', 0)
+1
+connection default;
+"---- Marker 13 ----"
+execute dump_metadata_locks;
+OBJECT_TYPE FUNCTION
+OBJECT_SCHEMA test
+OBJECT_NAME thread_id_name
+LOCK_TYPE SHARED
+LOCK_DURATION TRANSACTION
+LOCK_STATUS GRANTED
+OWNER_THREAD_ID OTHER
+OBJECT_TYPE TABLE
+OBJECT_SCHEMA performance_schema
+OBJECT_NAME metadata_locks
+LOCK_TYPE SHARED_READ
+LOCK_DURATION TRANSACTION
+LOCK_STATUS GRANTED
+OWNER_THREAD_ID OTHER
+OBJECT_TYPE USER LEVEL LOCK
+OBJECT_SCHEMA NULL
+OBJECT_NAME test
+LOCK_TYPE SHARED_NO_WRITE
+LOCK_DURATION EXPLICIT
+LOCK_STATUS GRANTED
+OWNER_THREAD_ID USER1
+execute dump_table_handles;
+OBJECT_TYPE TABLE
+OBJECT_SCHEMA test
+OBJECT_NAME t1
+INTERNAL_LOCK WRITE LOW PRIORITY
+EXTERNAL_LOCK NULL
+OWNER_THREAD_ID OTHER
+execute dump_waits_current;
+execute dump_waits_history_long;
+connection con2;
+SELECT GET_LOCK('test', 120);;
+connection default;
+"---- Marker 14 ----"
+execute dump_metadata_locks;
+OBJECT_TYPE FUNCTION
+OBJECT_SCHEMA test
+OBJECT_NAME thread_id_name
+LOCK_TYPE SHARED
+LOCK_DURATION TRANSACTION
+LOCK_STATUS GRANTED
+OWNER_THREAD_ID OTHER
+OBJECT_TYPE TABLE
+OBJECT_SCHEMA performance_schema
+OBJECT_NAME metadata_locks
+LOCK_TYPE SHARED_READ
+LOCK_DURATION TRANSACTION
+LOCK_STATUS GRANTED
+OWNER_THREAD_ID OTHER
+OBJECT_TYPE USER LEVEL LOCK
+OBJECT_SCHEMA NULL
+OBJECT_NAME test
+LOCK_TYPE SHARED_NO_WRITE
+LOCK_DURATION EXPLICIT
+LOCK_STATUS GRANTED
+OWNER_THREAD_ID USER1
+OBJECT_TYPE USER LEVEL LOCK
+OBJECT_SCHEMA NULL
+OBJECT_NAME test
+LOCK_TYPE SHARED_NO_WRITE
+LOCK_DURATION EXPLICIT
+LOCK_STATUS PENDING
+OWNER_THREAD_ID USER2
+execute dump_table_handles;
+OBJECT_TYPE TABLE
+OBJECT_SCHEMA test
+OBJECT_NAME t1
+INTERNAL_LOCK WRITE LOW PRIORITY
+EXTERNAL_LOCK NULL
+OWNER_THREAD_ID OTHER
+execute dump_waits_current;
+THREAD_ID USER2
+EVENT_NAME wait/lock/metadata/sql/mdl
+TIMER_START_SET 1
+TIMER_END_SET 1
+OBJECT_TYPE USER LEVEL LOCK
+OBJECT_SCHEMA NULL
+OBJECT_NAME test
+INDEX_NAME NULL
+OPERATION metadata lock
+execute dump_waits_history_long;
+connection con1;
+SELECT RELEASE_LOCK('test');
+RELEASE_LOCK('test')
+1
+connection con2;
+GET_LOCK('test', 120)
+1
+connection default;
+"---- Marker 15 ----"
+execute dump_metadata_locks;
+OBJECT_TYPE FUNCTION
+OBJECT_SCHEMA test
+OBJECT_NAME thread_id_name
+LOCK_TYPE SHARED
+LOCK_DURATION TRANSACTION
+LOCK_STATUS GRANTED
+OWNER_THREAD_ID OTHER
+OBJECT_TYPE TABLE
+OBJECT_SCHEMA performance_schema
+OBJECT_NAME metadata_locks
+LOCK_TYPE SHARED_READ
+LOCK_DURATION TRANSACTION
+LOCK_STATUS GRANTED
+OWNER_THREAD_ID OTHER
+OBJECT_TYPE USER LEVEL LOCK
+OBJECT_SCHEMA NULL
+OBJECT_NAME test
+LOCK_TYPE SHARED_NO_WRITE
+LOCK_DURATION EXPLICIT
+LOCK_STATUS GRANTED
+OWNER_THREAD_ID USER2
+execute dump_table_handles;
+OBJECT_TYPE TABLE
+OBJECT_SCHEMA test
+OBJECT_NAME t1
+INTERNAL_LOCK WRITE LOW PRIORITY
+EXTERNAL_LOCK NULL
+OWNER_THREAD_ID OTHER
+execute dump_waits_current;
+THREAD_ID USER2
+EVENT_NAME wait/lock/metadata/sql/mdl
+TIMER_START_SET 1
+TIMER_END_SET 1
+OBJECT_TYPE USER LEVEL LOCK
+OBJECT_SCHEMA NULL
+OBJECT_NAME test
+INDEX_NAME NULL
+OPERATION metadata lock
+execute dump_waits_history_long;
+THREAD_ID USER2
+EVENT_NAME wait/lock/metadata/sql/mdl
+TIMER_START_SET 1
+TIMER_END_SET 1
+OBJECT_TYPE USER LEVEL LOCK
+OBJECT_SCHEMA NULL
+OBJECT_NAME test
+INDEX_NAME NULL
+OPERATION metadata lock
+connection con2;
+SELECT RELEASE_LOCK('test');
+RELEASE_LOCK('test')
+1
+connection default;
+"---- Marker 16 ----"
+execute dump_metadata_locks;
+OBJECT_TYPE FUNCTION
+OBJECT_SCHEMA test
+OBJECT_NAME thread_id_name
+LOCK_TYPE SHARED
+LOCK_DURATION TRANSACTION
+LOCK_STATUS GRANTED
+OWNER_THREAD_ID OTHER
+OBJECT_TYPE TABLE
+OBJECT_SCHEMA performance_schema
+OBJECT_NAME metadata_locks
+LOCK_TYPE SHARED_READ
+LOCK_DURATION TRANSACTION
+LOCK_STATUS GRANTED
+OWNER_THREAD_ID OTHER
+execute dump_table_handles;
+OBJECT_TYPE TABLE
+OBJECT_SCHEMA test
+OBJECT_NAME t1
+INTERNAL_LOCK WRITE LOW PRIORITY
+EXTERNAL_LOCK NULL
+OWNER_THREAD_ID OTHER
+execute dump_waits_current;
+THREAD_ID USER2
+EVENT_NAME wait/lock/metadata/sql/mdl
+TIMER_START_SET 1
+TIMER_END_SET 1
+OBJECT_TYPE USER LEVEL LOCK
+OBJECT_SCHEMA NULL
+OBJECT_NAME test
+INDEX_NAME NULL
+OPERATION metadata lock
+execute dump_waits_history_long;
+THREAD_ID USER2
+EVENT_NAME wait/lock/metadata/sql/mdl
+TIMER_START_SET 1
+TIMER_END_SET 1
+OBJECT_TYPE USER LEVEL LOCK
+OBJECT_SCHEMA NULL
+OBJECT_NAME test
+INDEX_NAME NULL
+OPERATION metadata lock
+disconnect con1;
+disconnect con2;
+connection default;
+drop table t1;
+UPDATE performance_schema.setup_instruments SET enabled = 'YES', timed = 'YES';
+revoke all privileges, grant option from user1@localhost;
+revoke all privileges, grant option from user2@localhost;
+drop user user1@localhost;
+drop user user2@localhost;
+drop function thread_id_name;
+drop prepare dump_metadata_locks;
+drop prepare dump_table_handles;
+drop prepare dump_waits_current;
+drop prepare dump_waits_history_long;
+delete from performance_schema.setup_objects
+where object_schema='mtr';
+show global status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_index_stat_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_memory_classes_lost 0
+Performance_schema_metadata_lock_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_nested_statement_lost 0
+Performance_schema_prepared_statements_lost 0
+Performance_schema_program_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_session_connect_attrs_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_table_lock_stat_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/memory_aggregate.result b/mysql-test/suite/perfschema/r/memory_aggregate.result
new file mode 100644
index 00000000000..69eb033e74b
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/memory_aggregate.result
@@ -0,0 +1,5602 @@
+show global status like "performance_schema_memory_classes_lost";
+Variable_name Value
+Performance_schema_memory_classes_lost 0
+"================== Step 1 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 1
+connect con1, localhost, user1, , ;
+"================== con1 connected =================="
+connection default;
+"================== Step 2 =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 2 2
+connection con1;
+set GLOBAL query_cache_size=1000*1024;
+select get_lock("marker_1", 10);
+get_lock("marker_1", 10)
+1
+select release_lock("marker_1");
+release_lock("marker_1")
+1
+set @v1 = repeat("a", 1000);
+set @v2 = repeat("b", 2000);
+set @v3 = repeat("c", 4000);
+"================== con1 marker =================="
+connection default;
+"================== Step 3 =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 4
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7120
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 4
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 7120
+HIGH_NUMBER_OF_BYTES_USED 7120
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 2
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 32768
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 4
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7120
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 4
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 7120
+HIGH_NUMBER_OF_BYTES_USED 7120
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 2 2
+connect con2, localhost, user2, , ;
+"================== con2 connected =================="
+connection default;
+"================== Step 4 =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+username user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 4
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7120
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 4
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 7120
+HIGH_NUMBER_OF_BYTES_USED 7120
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 2
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 32768
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 4
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7120
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 4
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 7120
+HIGH_NUMBER_OF_BYTES_USED 7120
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+user2 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+user2 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 3 3
+connection con2;
+set GLOBAL query_cache_size=2000*1024;
+select get_lock("marker_2", 10);
+get_lock("marker_2", 10)
+1
+select release_lock("marker_2");
+release_lock("marker_2")
+1
+set @v1 = repeat("a", 1000);
+set @v2 = repeat("b", 2000);
+set @v3 = repeat("c", 4000);
+"================== con2 marker =================="
+connection default;
+"================== Step 5 =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 32
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 512
+HIGH_NUMBER_OF_BYTES_USED 544
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 7
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 14144
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 7
+HIGH_COUNT_USED 7
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 14144
+HIGH_NUMBER_OF_BYTES_USED 14144
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 65536
+SUM_NUMBER_OF_BYTES_FREE 32768
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 32
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 512
+HIGH_NUMBER_OF_BYTES_USED 544
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 7
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 14144
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 7
+HIGH_COUNT_USED 7
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 14144
+HIGH_NUMBER_OF_BYTES_USED 14144
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+user2 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+user2 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 3 3
+truncate table performance_schema.memory_summary_by_thread_by_event_name;
+"================== MEMORY_BY_THREAD truncated =================="
+"================== Step 5b =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 32
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 512
+HIGH_NUMBER_OF_BYTES_USED 544
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 7
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 14144
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 7
+HIGH_COUNT_USED 7
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 14144
+HIGH_NUMBER_OF_BYTES_USED 14144
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 65536
+SUM_NUMBER_OF_BYTES_FREE 32768
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 32
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 512
+HIGH_NUMBER_OF_BYTES_USED 544
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 7
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 14144
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 7
+HIGH_COUNT_USED 7
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 14144
+HIGH_NUMBER_OF_BYTES_USED 14144
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+user2 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+user2 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 3 3
+connect con3, localhost, user3, , ;
+"================== con3 connected =================="
+connection default;
+"================== Step 6 =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+username user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+username user4
+status not found
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 32
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 512
+HIGH_NUMBER_OF_BYTES_USED 544
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 7
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 14144
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 7
+HIGH_COUNT_USED 7
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 14144
+HIGH_NUMBER_OF_BYTES_USED 14144
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 65536
+SUM_NUMBER_OF_BYTES_FREE 32768
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 32
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 512
+HIGH_NUMBER_OF_BYTES_USED 544
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 7
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 14144
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 7
+HIGH_COUNT_USED 7
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 14144
+HIGH_NUMBER_OF_BYTES_USED 14144
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+user2 localhost 1 1
+user3 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+user2 1 1
+user3 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 4 4
+connection con3;
+set GLOBAL query_cache_size=500*1024;
+select get_lock("marker_3", 10);
+get_lock("marker_3", 10)
+1
+select release_lock("marker_3");
+release_lock("marker_3")
+1
+set @v1 = repeat("a", 1000);
+set @v2 = repeat("b", 2000);
+set @v3 = repeat("c", 4000);
+"================== con3 marker =================="
+connection default;
+"================== Step 7 =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user4
+status not found
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 6
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 816
+SUM_NUMBER_OF_BYTES_FREE 48
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 768
+HIGH_NUMBER_OF_BYTES_USED 816
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 10
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 21168
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 10
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 21168
+HIGH_NUMBER_OF_BYTES_USED 21168
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 6
+COUNT_FREE 4
+SUM_NUMBER_OF_BYTES_ALLOC 98304
+SUM_NUMBER_OF_BYTES_FREE 65536
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 6
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 816
+SUM_NUMBER_OF_BYTES_FREE 48
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 768
+HIGH_NUMBER_OF_BYTES_USED 816
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 10
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 21168
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 10
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 21168
+HIGH_NUMBER_OF_BYTES_USED 21168
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+user2 localhost 1 1
+user3 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+user2 1 1
+user3 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 4 4
+connect con4, localhost, user4, , ;
+connect con5, localhost, user4, , ;
+"================== con4/con5 (both user4) connected =================="
+connection default;
+"================== Step 8 =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+username user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 6
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 816
+SUM_NUMBER_OF_BYTES_FREE 48
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 768
+HIGH_NUMBER_OF_BYTES_USED 816
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 10
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 21168
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 10
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 21168
+HIGH_NUMBER_OF_BYTES_USED 21168
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 6
+COUNT_FREE 4
+SUM_NUMBER_OF_BYTES_ALLOC 98304
+SUM_NUMBER_OF_BYTES_FREE 65536
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 6
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 816
+SUM_NUMBER_OF_BYTES_FREE 48
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 768
+HIGH_NUMBER_OF_BYTES_USED 816
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 10
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 21168
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 10
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 21168
+HIGH_NUMBER_OF_BYTES_USED 21168
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+user2 localhost 1 1
+user3 localhost 1 1
+user4 localhost 2 2
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+user2 1 1
+user3 1 1
+user4 2 2
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 6 6
+connection con4;
+set GLOBAL query_cache_size=4000*1024;
+select get_lock("marker_4", 10);
+get_lock("marker_4", 10)
+1
+select release_lock("marker_4");
+release_lock("marker_4")
+1
+set @v1 = repeat("a", 1000);
+set @v2 = repeat("b", 2000);
+set @v3 = repeat("c", 4000);
+connection con5;
+select get_lock("marker_5", 10);
+get_lock("marker_5", 10)
+1
+select release_lock("marker_5");
+release_lock("marker_5")
+1
+set @v1 = repeat("a", 1000);
+set @v2 = repeat("b", 2000);
+set @v3 = repeat("c", 4000);
+"================== con4/con5 marker =================="
+connection default;
+"================== Step 9 =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 32
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 512
+HIGH_NUMBER_OF_BYTES_USED 544
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 6
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 14048
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 6
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 14048
+HIGH_NUMBER_OF_BYTES_USED 14048
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 32
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 512
+HIGH_NUMBER_OF_BYTES_USED 544
+USER user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 6
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 14048
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 6
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 14048
+HIGH_NUMBER_OF_BYTES_USED 14048
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 5
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 80
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 5
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 1280
+HIGH_NUMBER_OF_BYTES_USED 1360
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 16
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 35216
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 131072
+SUM_NUMBER_OF_BYTES_FREE 98304
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 5
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 80
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 5
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 1280
+HIGH_NUMBER_OF_BYTES_USED 1360
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 16
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 35216
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+user2 localhost 1 1
+user3 localhost 1 1
+user4 localhost 2 2
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+user2 1 1
+user3 1 1
+user4 2 2
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 6 6
+disconnect con1;
+disconnect con5;
+connection default;
+"================== con1/con5 disconnected =================="
+"================== Step 10 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 288
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 544
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 6
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 14048
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 14048
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 288
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 544
+USER user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 6
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 14048
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 14048
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 7
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 592
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 768
+HIGH_NUMBER_OF_BYTES_USED 1360
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 14048
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 10
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 21168
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 131072
+SUM_NUMBER_OF_BYTES_FREE 98304
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 7
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 592
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 768
+HIGH_NUMBER_OF_BYTES_USED 1360
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 14048
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 10
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 21168
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 1 1
+user3 localhost 1 1
+user4 localhost 1 2
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 1 1
+user3 1 1
+user4 1 2
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 4 6
+disconnect con2;
+connection default;
+"================== con2 disconnected =================="
+"================== Step 11 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 288
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 544
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 6
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 14048
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 14048
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 288
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 544
+USER user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 6
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 14048
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 14048
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 8
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 848
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 512
+HIGH_NUMBER_OF_BYTES_USED 1360
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 9
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 21072
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 7
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 14144
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 131072
+SUM_NUMBER_OF_BYTES_FREE 98304
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 8
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 848
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 512
+HIGH_NUMBER_OF_BYTES_USED 1360
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 9
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 21072
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 7
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 14144
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 1 1
+user4 localhost 1 2
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 1 1
+user4 1 2
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 3 6
+disconnect con3;
+connection default;
+"================== con3 disconnected =================="
+"================== Step 12 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 288
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 544
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 6
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 14048
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 14048
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 288
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 544
+USER user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 6
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 14048
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 14048
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 9
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 1104
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 1360
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 12
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 28096
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 4
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 7120
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 131072
+SUM_NUMBER_OF_BYTES_FREE 98304
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 9
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 1104
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 1360
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 12
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 28096
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 4
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 7120
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 1 2
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 1 2
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 2 6
+disconnect con4;
+connection default;
+"================== con4 disconnected =================="
+"================== Step 13 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 4
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 544
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 544
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 6
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 14048
+SUM_NUMBER_OF_BYTES_FREE 14048
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 14048
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 4
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 544
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 544
+USER user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 6
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 14048
+SUM_NUMBER_OF_BYTES_FREE 14048
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 14048
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 10
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 1360
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 1360
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 15
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 35120
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 131072
+SUM_NUMBER_OF_BYTES_FREE 98304
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 10
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 1360
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 1360
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 15
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 35120
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 2
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 2
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 6
+connection default;
+truncate performance_schema.memory_summary_by_thread_by_event_name;
+"================== MEMORY_BY_THREAD truncated =================="
+"================== Step 14 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 4
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 544
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 544
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 6
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 14048
+SUM_NUMBER_OF_BYTES_FREE 14048
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 14048
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 4
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 544
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 544
+USER user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 6
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 14048
+SUM_NUMBER_OF_BYTES_FREE 14048
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 14048
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 10
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 1360
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 1360
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 15
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 35120
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 131072
+SUM_NUMBER_OF_BYTES_FREE 98304
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 10
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 1360
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 1360
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 15
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 35120
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 2
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 2
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 6
+truncate performance_schema.memory_summary_by_account_by_event_name;
+"================== MEMORY_BY_ACCOUNT truncated =================="
+"================== Step 15 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 4
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 544
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 544
+USER user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 6
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 14048
+SUM_NUMBER_OF_BYTES_FREE 14048
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 14048
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 10
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 1360
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 1360
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 15
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 35120
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 131072
+SUM_NUMBER_OF_BYTES_FREE 98304
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 10
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 1360
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 1360
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 15
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 35120
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 2
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 2
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 6
+truncate performance_schema.memory_summary_by_user_by_event_name;
+"================== MEMORY_BY_USER truncated =================="
+"================== Step 16 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 10
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 1360
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 1360
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 15
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 35120
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 131072
+SUM_NUMBER_OF_BYTES_FREE 98304
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 10
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 1360
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 1360
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 15
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 35120
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 2
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 2
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 6
+truncate performance_schema.memory_summary_by_host_by_event_name;
+"================== MEMORY_BY_HOST truncated =================="
+"================== Step 17 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 131072
+SUM_NUMBER_OF_BYTES_FREE 98304
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 10
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 1360
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 1360
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 15
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 35120
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 2
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 2
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 6
+truncate performance_schema.memory_summary_global_by_event_name;
+"================== MEMORY_GLOBAL truncated =================="
+"================== Step 18 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 2
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 32768
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 2
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 32768
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 2
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 2
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 6
+truncate performance_schema.accounts;
+"================== ACCOUNTS truncated =================="
+"================== Step 19 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 2
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 32768
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 2
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 32768
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 2
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 6
+truncate performance_schema.users;
+"================== USERS truncated =================="
+"================== Step 20 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 2
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 32768
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 2
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 32768
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 6
+truncate performance_schema.hosts;
+"================== HOSTS truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 2
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 32768
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 2
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 32768
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 1
diff --git a/mysql-test/suite/perfschema/r/memory_aggregate_32bit.result b/mysql-test/suite/perfschema/r/memory_aggregate_32bit.result
new file mode 100644
index 00000000000..2b8ee675650
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/memory_aggregate_32bit.result
@@ -0,0 +1,5602 @@
+show global status like "performance_schema_memory_classes_lost";
+Variable_name Value
+Performance_schema_memory_classes_lost 0
+"================== Step 1 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 1
+connect con1, localhost, user1, , ;
+"================== con1 connected =================="
+connection default;
+"================== Step 2 =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 2 2
+connection con1;
+set GLOBAL query_cache_size=1000*1024;
+select get_lock("marker_1", 10);
+get_lock("marker_1", 10)
+1
+select release_lock("marker_1");
+release_lock("marker_1")
+1
+set @v1 = repeat("a", 1000);
+set @v2 = repeat("b", 2000);
+set @v3 = repeat("c", 4000);
+"================== con1 marker =================="
+connection default;
+"================== Step 3 =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 8
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 192
+HIGH_NUMBER_OF_BYTES_USED 200
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 8
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 192
+HIGH_NUMBER_OF_BYTES_USED 200
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 8
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 192
+HIGH_NUMBER_OF_BYTES_USED 200
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 8
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 192
+HIGH_NUMBER_OF_BYTES_USED 200
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 4
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7120
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 4
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 7120
+HIGH_NUMBER_OF_BYTES_USED 7120
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 2
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 24576
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 24576
+HIGH_NUMBER_OF_BYTES_USED 24576
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 8
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 192
+HIGH_NUMBER_OF_BYTES_USED 200
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 4
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7120
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 4
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 7120
+HIGH_NUMBER_OF_BYTES_USED 7120
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 2 2
+connect con2, localhost, user2, , ;
+"================== con2 connected =================="
+connection default;
+"================== Step 4 =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 8
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 192
+HIGH_NUMBER_OF_BYTES_USED 200
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+username user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 8
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 192
+HIGH_NUMBER_OF_BYTES_USED 200
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 8
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 192
+HIGH_NUMBER_OF_BYTES_USED 200
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 8
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 192
+HIGH_NUMBER_OF_BYTES_USED 200
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 4
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7120
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 4
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 7120
+HIGH_NUMBER_OF_BYTES_USED 7120
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 2
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 24576
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 24576
+HIGH_NUMBER_OF_BYTES_USED 24576
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 8
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 192
+HIGH_NUMBER_OF_BYTES_USED 200
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 4
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7120
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 4
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 7120
+HIGH_NUMBER_OF_BYTES_USED 7120
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+user2 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+user2 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 3 3
+connection con2;
+set GLOBAL query_cache_size=2000*1024;
+select get_lock("marker_2", 10);
+get_lock("marker_2", 10)
+1
+select release_lock("marker_2");
+release_lock("marker_2")
+1
+set @v1 = repeat("a", 1000);
+set @v2 = repeat("b", 2000);
+set @v3 = repeat("c", 4000);
+"================== con2 marker =================="
+connection default;
+"================== Step 5 =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 8
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 192
+HIGH_NUMBER_OF_BYTES_USED 200
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 8
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 192
+HIGH_NUMBER_OF_BYTES_USED 200
+username user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 8
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 192
+HIGH_NUMBER_OF_BYTES_USED 200
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 8
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 192
+HIGH_NUMBER_OF_BYTES_USED 200
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 8
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 192
+HIGH_NUMBER_OF_BYTES_USED 200
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 8
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 192
+HIGH_NUMBER_OF_BYTES_USED 200
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 400
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 384
+HIGH_NUMBER_OF_BYTES_USED 400
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 7
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 14144
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 7
+HIGH_COUNT_USED 7
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 14144
+HIGH_NUMBER_OF_BYTES_USED 14144
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 49152
+SUM_NUMBER_OF_BYTES_FREE 24576
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 24576
+HIGH_NUMBER_OF_BYTES_USED 24576
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 400
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 384
+HIGH_NUMBER_OF_BYTES_USED 400
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 7
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 14144
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 7
+HIGH_COUNT_USED 7
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 14144
+HIGH_NUMBER_OF_BYTES_USED 14144
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+user2 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+user2 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 3 3
+truncate table performance_schema.memory_summary_by_thread_by_event_name;
+"================== MEMORY_BY_THREAD truncated =================="
+"================== Step 5b =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 192
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 192
+CURRENT_NUMBER_OF_BYTES_USED 192
+HIGH_NUMBER_OF_BYTES_USED 192
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 192
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 192
+CURRENT_NUMBER_OF_BYTES_USED 192
+HIGH_NUMBER_OF_BYTES_USED 192
+username user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 8
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 192
+HIGH_NUMBER_OF_BYTES_USED 200
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 8
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 192
+HIGH_NUMBER_OF_BYTES_USED 200
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 8
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 192
+HIGH_NUMBER_OF_BYTES_USED 200
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 8
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 192
+HIGH_NUMBER_OF_BYTES_USED 200
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 400
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 384
+HIGH_NUMBER_OF_BYTES_USED 400
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 7
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 14144
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 7
+HIGH_COUNT_USED 7
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 14144
+HIGH_NUMBER_OF_BYTES_USED 14144
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 49152
+SUM_NUMBER_OF_BYTES_FREE 24576
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 24576
+HIGH_NUMBER_OF_BYTES_USED 24576
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 400
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 384
+HIGH_NUMBER_OF_BYTES_USED 400
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 7
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 14144
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 7
+HIGH_COUNT_USED 7
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 14144
+HIGH_NUMBER_OF_BYTES_USED 14144
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+user2 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+user2 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 3 3
+connect con3, localhost, user3, , ;
+"================== con3 connected =================="
+connection default;
+"================== Step 6 =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 192
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 192
+CURRENT_NUMBER_OF_BYTES_USED 192
+HIGH_NUMBER_OF_BYTES_USED 192
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 192
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 192
+CURRENT_NUMBER_OF_BYTES_USED 192
+HIGH_NUMBER_OF_BYTES_USED 192
+username user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+username user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+username user4
+status not found
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 8
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 192
+HIGH_NUMBER_OF_BYTES_USED 200
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 8
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 192
+HIGH_NUMBER_OF_BYTES_USED 200
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 8
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 192
+HIGH_NUMBER_OF_BYTES_USED 200
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 8
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 192
+HIGH_NUMBER_OF_BYTES_USED 200
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 400
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 384
+HIGH_NUMBER_OF_BYTES_USED 400
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 7
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 14144
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 7
+HIGH_COUNT_USED 7
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 14144
+HIGH_NUMBER_OF_BYTES_USED 14144
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 49152
+SUM_NUMBER_OF_BYTES_FREE 24576
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 24576
+HIGH_NUMBER_OF_BYTES_USED 24576
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 400
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 384
+HIGH_NUMBER_OF_BYTES_USED 400
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 7
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 14144
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 7
+HIGH_COUNT_USED 7
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 14144
+HIGH_NUMBER_OF_BYTES_USED 14144
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+user2 localhost 1 1
+user3 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+user2 1 1
+user3 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 4 4
+connection con3;
+set GLOBAL query_cache_size=500*1024;
+select get_lock("marker_3", 10);
+get_lock("marker_3", 10)
+1
+select release_lock("marker_3");
+release_lock("marker_3")
+1
+set @v1 = repeat("a", 1000);
+set @v2 = repeat("b", 2000);
+set @v3 = repeat("c", 4000);
+"================== con3 marker =================="
+connection default;
+"================== Step 7 =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 192
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 192
+CURRENT_NUMBER_OF_BYTES_USED 192
+HIGH_NUMBER_OF_BYTES_USED 192
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 192
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 192
+CURRENT_NUMBER_OF_BYTES_USED 192
+HIGH_NUMBER_OF_BYTES_USED 192
+username user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 8
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 192
+HIGH_NUMBER_OF_BYTES_USED 200
+username user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user4
+status not found
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 8
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 192
+HIGH_NUMBER_OF_BYTES_USED 200
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 8
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 192
+HIGH_NUMBER_OF_BYTES_USED 200
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 8
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 192
+HIGH_NUMBER_OF_BYTES_USED 200
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 8
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 192
+HIGH_NUMBER_OF_BYTES_USED 200
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 8
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 192
+HIGH_NUMBER_OF_BYTES_USED 200
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 8
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 192
+HIGH_NUMBER_OF_BYTES_USED 200
+USER user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 6
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 600
+SUM_NUMBER_OF_BYTES_FREE 24
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 576
+HIGH_NUMBER_OF_BYTES_USED 600
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 10
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 21168
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 10
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 21168
+HIGH_NUMBER_OF_BYTES_USED 21168
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 6
+COUNT_FREE 4
+SUM_NUMBER_OF_BYTES_ALLOC 73728
+SUM_NUMBER_OF_BYTES_FREE 49152
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 24576
+HIGH_NUMBER_OF_BYTES_USED 24576
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 6
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 600
+SUM_NUMBER_OF_BYTES_FREE 24
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 576
+HIGH_NUMBER_OF_BYTES_USED 600
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 10
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 21168
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 10
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 21168
+HIGH_NUMBER_OF_BYTES_USED 21168
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+user2 localhost 1 1
+user3 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+user2 1 1
+user3 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 4 4
+connect con4, localhost, user4, , ;
+connect con5, localhost, user4, , ;
+"================== con4/con5 (both user4) connected =================="
+connection default;
+"================== Step 8 =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 192
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 192
+CURRENT_NUMBER_OF_BYTES_USED 192
+HIGH_NUMBER_OF_BYTES_USED 192
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 192
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 192
+CURRENT_NUMBER_OF_BYTES_USED 192
+HIGH_NUMBER_OF_BYTES_USED 192
+username user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 8
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 192
+HIGH_NUMBER_OF_BYTES_USED 200
+username user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+username user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 8
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 192
+HIGH_NUMBER_OF_BYTES_USED 200
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 8
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 192
+HIGH_NUMBER_OF_BYTES_USED 200
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 8
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 192
+HIGH_NUMBER_OF_BYTES_USED 200
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 8
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 192
+HIGH_NUMBER_OF_BYTES_USED 200
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 8
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 192
+HIGH_NUMBER_OF_BYTES_USED 200
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 8
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 192
+HIGH_NUMBER_OF_BYTES_USED 200
+USER user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 6
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 600
+SUM_NUMBER_OF_BYTES_FREE 24
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 576
+HIGH_NUMBER_OF_BYTES_USED 600
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 10
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 21168
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 10
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 21168
+HIGH_NUMBER_OF_BYTES_USED 21168
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 6
+COUNT_FREE 4
+SUM_NUMBER_OF_BYTES_ALLOC 73728
+SUM_NUMBER_OF_BYTES_FREE 49152
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 24576
+HIGH_NUMBER_OF_BYTES_USED 24576
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 6
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 600
+SUM_NUMBER_OF_BYTES_FREE 24
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 576
+HIGH_NUMBER_OF_BYTES_USED 600
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 10
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 21168
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 10
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 21168
+HIGH_NUMBER_OF_BYTES_USED 21168
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+user2 localhost 1 1
+user3 localhost 1 1
+user4 localhost 2 2
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+user2 1 1
+user3 1 1
+user4 2 2
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 6 6
+connection con4;
+set GLOBAL query_cache_size=4000*1024;
+select get_lock("marker_4", 10);
+get_lock("marker_4", 10)
+1
+select release_lock("marker_4");
+release_lock("marker_4")
+1
+set @v1 = repeat("a", 1000);
+set @v2 = repeat("b", 2000);
+set @v3 = repeat("c", 4000);
+connection con5;
+select get_lock("marker_5", 10);
+get_lock("marker_5", 10)
+1
+select release_lock("marker_5");
+release_lock("marker_5")
+1
+set @v1 = repeat("a", 1000);
+set @v2 = repeat("b", 2000);
+set @v3 = repeat("c", 4000);
+"================== con4/con5 marker =================="
+connection default;
+"================== Step 9 =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 192
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 192
+CURRENT_NUMBER_OF_BYTES_USED 192
+HIGH_NUMBER_OF_BYTES_USED 192
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 192
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 192
+CURRENT_NUMBER_OF_BYTES_USED 192
+HIGH_NUMBER_OF_BYTES_USED 192
+username user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 8
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 192
+HIGH_NUMBER_OF_BYTES_USED 200
+username user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 8
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 192
+HIGH_NUMBER_OF_BYTES_USED 200
+username user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 8
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 192
+HIGH_NUMBER_OF_BYTES_USED 200
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 8
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 192
+HIGH_NUMBER_OF_BYTES_USED 200
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 8
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 192
+HIGH_NUMBER_OF_BYTES_USED 200
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 400
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 384
+HIGH_NUMBER_OF_BYTES_USED 400
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 6
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 14048
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 6
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 14048
+HIGH_NUMBER_OF_BYTES_USED 14048
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 8
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 192
+HIGH_NUMBER_OF_BYTES_USED 200
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 8
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 192
+HIGH_NUMBER_OF_BYTES_USED 200
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 8
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 192
+HIGH_NUMBER_OF_BYTES_USED 200
+USER user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 400
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 384
+HIGH_NUMBER_OF_BYTES_USED 400
+USER user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 6
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 14048
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 6
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 14048
+HIGH_NUMBER_OF_BYTES_USED 14048
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 5
+SUM_NUMBER_OF_BYTES_ALLOC 1000
+SUM_NUMBER_OF_BYTES_FREE 40
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 5
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 960
+HIGH_NUMBER_OF_BYTES_USED 1000
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 16
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 35216
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 98304
+SUM_NUMBER_OF_BYTES_FREE 73728
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 24576
+HIGH_NUMBER_OF_BYTES_USED 24576
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 5
+SUM_NUMBER_OF_BYTES_ALLOC 1000
+SUM_NUMBER_OF_BYTES_FREE 40
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 5
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 960
+HIGH_NUMBER_OF_BYTES_USED 1000
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 16
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 35216
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+user2 localhost 1 1
+user3 localhost 1 1
+user4 localhost 2 2
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+user2 1 1
+user3 1 1
+user4 2 2
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 6 6
+disconnect con1;
+disconnect con5;
+connection default;
+"================== con1/con5 disconnected =================="
+"================== Step 10 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 192
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 192
+CURRENT_NUMBER_OF_BYTES_USED 192
+HIGH_NUMBER_OF_BYTES_USED 192
+username user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 8
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 192
+HIGH_NUMBER_OF_BYTES_USED 200
+username user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 8
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 192
+HIGH_NUMBER_OF_BYTES_USED 200
+username user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 200
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 200
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 8
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 192
+HIGH_NUMBER_OF_BYTES_USED 200
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 8
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 192
+HIGH_NUMBER_OF_BYTES_USED 200
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 400
+SUM_NUMBER_OF_BYTES_FREE 208
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 192
+HIGH_NUMBER_OF_BYTES_USED 400
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 6
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 14048
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 14048
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 200
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 200
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 8
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 192
+HIGH_NUMBER_OF_BYTES_USED 200
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 8
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 192
+HIGH_NUMBER_OF_BYTES_USED 200
+USER user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 400
+SUM_NUMBER_OF_BYTES_FREE 208
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 192
+HIGH_NUMBER_OF_BYTES_USED 400
+USER user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 6
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 14048
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 14048
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 7
+SUM_NUMBER_OF_BYTES_ALLOC 1000
+SUM_NUMBER_OF_BYTES_FREE 424
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 576
+HIGH_NUMBER_OF_BYTES_USED 1000
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 14048
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 10
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 21168
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 98304
+SUM_NUMBER_OF_BYTES_FREE 73728
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 24576
+HIGH_NUMBER_OF_BYTES_USED 24576
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 7
+SUM_NUMBER_OF_BYTES_ALLOC 1000
+SUM_NUMBER_OF_BYTES_FREE 424
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 576
+HIGH_NUMBER_OF_BYTES_USED 1000
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 14048
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 10
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 21168
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 1 1
+user3 localhost 1 1
+user4 localhost 1 2
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 1 1
+user3 1 1
+user4 1 2
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 4 6
+disconnect con2;
+connection default;
+"================== con2 disconnected =================="
+"================== Step 11 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 8
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 192
+HIGH_NUMBER_OF_BYTES_USED 200
+username user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 8
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 192
+HIGH_NUMBER_OF_BYTES_USED 200
+username user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 200
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 200
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 200
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 200
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 8
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 192
+HIGH_NUMBER_OF_BYTES_USED 200
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 400
+SUM_NUMBER_OF_BYTES_FREE 208
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 192
+HIGH_NUMBER_OF_BYTES_USED 400
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 6
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 14048
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 14048
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 200
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 200
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 200
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 200
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 8
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 192
+HIGH_NUMBER_OF_BYTES_USED 200
+USER user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 400
+SUM_NUMBER_OF_BYTES_FREE 208
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 192
+HIGH_NUMBER_OF_BYTES_USED 400
+USER user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 6
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 14048
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 14048
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 8
+SUM_NUMBER_OF_BYTES_ALLOC 1000
+SUM_NUMBER_OF_BYTES_FREE 616
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 384
+HIGH_NUMBER_OF_BYTES_USED 1000
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 9
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 21072
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 7
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 14144
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 98304
+SUM_NUMBER_OF_BYTES_FREE 73728
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 24576
+HIGH_NUMBER_OF_BYTES_USED 24576
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 8
+SUM_NUMBER_OF_BYTES_ALLOC 1000
+SUM_NUMBER_OF_BYTES_FREE 616
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 384
+HIGH_NUMBER_OF_BYTES_USED 1000
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 9
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 21072
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 7
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 14144
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 1 1
+user4 localhost 1 2
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 1 1
+user4 1 2
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 3 6
+disconnect con3;
+connection default;
+"================== con3 disconnected =================="
+"================== Step 12 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 8
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 192
+HIGH_NUMBER_OF_BYTES_USED 200
+username user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 200
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 200
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 200
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 200
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 200
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 200
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 400
+SUM_NUMBER_OF_BYTES_FREE 208
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 192
+HIGH_NUMBER_OF_BYTES_USED 400
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 6
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 14048
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 14048
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 200
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 200
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 200
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 200
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 200
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 200
+USER user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 400
+SUM_NUMBER_OF_BYTES_FREE 208
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 192
+HIGH_NUMBER_OF_BYTES_USED 400
+USER user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 6
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 14048
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 14048
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 9
+SUM_NUMBER_OF_BYTES_ALLOC 1000
+SUM_NUMBER_OF_BYTES_FREE 808
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 192
+HIGH_NUMBER_OF_BYTES_USED 1000
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 12
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 28096
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 4
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 7120
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 98304
+SUM_NUMBER_OF_BYTES_FREE 73728
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 24576
+HIGH_NUMBER_OF_BYTES_USED 24576
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 9
+SUM_NUMBER_OF_BYTES_ALLOC 1000
+SUM_NUMBER_OF_BYTES_FREE 808
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 192
+HIGH_NUMBER_OF_BYTES_USED 1000
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 12
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 28096
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 4
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 7120
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 1 2
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 1 2
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 2 6
+disconnect con4;
+connection default;
+"================== con4 disconnected =================="
+"================== Step 13 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 200
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 200
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 200
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 200
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 200
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 200
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 4
+SUM_NUMBER_OF_BYTES_ALLOC 400
+SUM_NUMBER_OF_BYTES_FREE 400
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 400
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 6
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 14048
+SUM_NUMBER_OF_BYTES_FREE 14048
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 14048
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 200
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 200
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 200
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 200
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 200
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 200
+USER user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 4
+SUM_NUMBER_OF_BYTES_ALLOC 400
+SUM_NUMBER_OF_BYTES_FREE 400
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 400
+USER user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 6
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 14048
+SUM_NUMBER_OF_BYTES_FREE 14048
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 14048
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 10
+SUM_NUMBER_OF_BYTES_ALLOC 1000
+SUM_NUMBER_OF_BYTES_FREE 1000
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 1000
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 15
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 35120
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 98304
+SUM_NUMBER_OF_BYTES_FREE 73728
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 24576
+HIGH_NUMBER_OF_BYTES_USED 24576
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 10
+SUM_NUMBER_OF_BYTES_ALLOC 1000
+SUM_NUMBER_OF_BYTES_FREE 1000
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 1000
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 15
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 35120
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 2
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 2
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 6
+connection default;
+truncate performance_schema.memory_summary_by_thread_by_event_name;
+"================== MEMORY_BY_THREAD truncated =================="
+"================== Step 14 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 200
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 200
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 200
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 200
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 200
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 200
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 4
+SUM_NUMBER_OF_BYTES_ALLOC 400
+SUM_NUMBER_OF_BYTES_FREE 400
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 400
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 6
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 14048
+SUM_NUMBER_OF_BYTES_FREE 14048
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 14048
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 200
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 200
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 200
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 200
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 200
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 200
+USER user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 4
+SUM_NUMBER_OF_BYTES_ALLOC 400
+SUM_NUMBER_OF_BYTES_FREE 400
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 400
+USER user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 6
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 14048
+SUM_NUMBER_OF_BYTES_FREE 14048
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 14048
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 10
+SUM_NUMBER_OF_BYTES_ALLOC 1000
+SUM_NUMBER_OF_BYTES_FREE 1000
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 1000
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 15
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 35120
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 98304
+SUM_NUMBER_OF_BYTES_FREE 73728
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 24576
+HIGH_NUMBER_OF_BYTES_USED 24576
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 10
+SUM_NUMBER_OF_BYTES_ALLOC 1000
+SUM_NUMBER_OF_BYTES_FREE 1000
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 1000
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 15
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 35120
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 2
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 2
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 6
+truncate performance_schema.memory_summary_by_account_by_event_name;
+"================== MEMORY_BY_ACCOUNT truncated =================="
+"================== Step 15 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 200
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 200
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 200
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 200
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 200
+SUM_NUMBER_OF_BYTES_FREE 200
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 200
+USER user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 4
+SUM_NUMBER_OF_BYTES_ALLOC 400
+SUM_NUMBER_OF_BYTES_FREE 400
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 400
+USER user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 6
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 14048
+SUM_NUMBER_OF_BYTES_FREE 14048
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 14048
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 10
+SUM_NUMBER_OF_BYTES_ALLOC 1000
+SUM_NUMBER_OF_BYTES_FREE 1000
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 1000
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 15
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 35120
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 98304
+SUM_NUMBER_OF_BYTES_FREE 73728
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 24576
+HIGH_NUMBER_OF_BYTES_USED 24576
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 10
+SUM_NUMBER_OF_BYTES_ALLOC 1000
+SUM_NUMBER_OF_BYTES_FREE 1000
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 1000
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 15
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 35120
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 2
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 2
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 6
+truncate performance_schema.memory_summary_by_user_by_event_name;
+"================== MEMORY_BY_USER truncated =================="
+"================== Step 16 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 10
+SUM_NUMBER_OF_BYTES_ALLOC 1000
+SUM_NUMBER_OF_BYTES_FREE 1000
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 1000
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 15
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 35120
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 98304
+SUM_NUMBER_OF_BYTES_FREE 73728
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 24576
+HIGH_NUMBER_OF_BYTES_USED 24576
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 10
+SUM_NUMBER_OF_BYTES_ALLOC 1000
+SUM_NUMBER_OF_BYTES_FREE 1000
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 1000
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 15
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 35120
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 2
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 2
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 6
+truncate performance_schema.memory_summary_by_host_by_event_name;
+"================== MEMORY_BY_HOST truncated =================="
+"================== Step 17 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 98304
+SUM_NUMBER_OF_BYTES_FREE 73728
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 24576
+HIGH_NUMBER_OF_BYTES_USED 24576
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 10
+SUM_NUMBER_OF_BYTES_ALLOC 1000
+SUM_NUMBER_OF_BYTES_FREE 1000
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 1000
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 15
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 35120
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 2
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 2
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 6
+truncate performance_schema.memory_summary_global_by_event_name;
+"================== MEMORY_GLOBAL truncated =================="
+"================== Step 18 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 2
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 24576
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 2
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 24576
+CURRENT_NUMBER_OF_BYTES_USED 24576
+HIGH_NUMBER_OF_BYTES_USED 24576
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 2
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 2
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 6
+truncate performance_schema.accounts;
+"================== ACCOUNTS truncated =================="
+"================== Step 19 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 2
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 24576
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 2
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 24576
+CURRENT_NUMBER_OF_BYTES_USED 24576
+HIGH_NUMBER_OF_BYTES_USED 24576
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 2
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 6
+truncate performance_schema.users;
+"================== USERS truncated =================="
+"================== Step 20 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 2
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 24576
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 2
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 24576
+CURRENT_NUMBER_OF_BYTES_USED 24576
+HIGH_NUMBER_OF_BYTES_USED 24576
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 6
+truncate performance_schema.hosts;
+"================== HOSTS truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 2
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 24576
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 2
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 24576
+CURRENT_NUMBER_OF_BYTES_USED 24576
+HIGH_NUMBER_OF_BYTES_USED 24576
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 1
diff --git a/mysql-test/suite/perfschema/r/memory_aggregate_no_a.result b/mysql-test/suite/perfschema/r/memory_aggregate_no_a.result
new file mode 100644
index 00000000000..b5c8e1cd3c7
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/memory_aggregate_no_a.result
@@ -0,0 +1,4014 @@
+show global status like "performance_schema_memory_classes_lost";
+Variable_name Value
+Performance_schema_memory_classes_lost 0
+"================== Step 1 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 1
+connect con1, localhost, user1, , ;
+"================== con1 connected =================="
+connection default;
+"================== Step 2 =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 2 2
+connection con1;
+set GLOBAL query_cache_size=1000*1024;
+select get_lock("marker_1", 10);
+get_lock("marker_1", 10)
+1
+select release_lock("marker_1");
+release_lock("marker_1")
+1
+set @v1 = repeat("a", 1000);
+set @v2 = repeat("b", 2000);
+set @v3 = repeat("c", 4000);
+"================== con1 marker =================="
+connection default;
+"================== Step 3 =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 4
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7120
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 4
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 7120
+HIGH_NUMBER_OF_BYTES_USED 7120
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 2
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 32768
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 4
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7120
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 4
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 7120
+HIGH_NUMBER_OF_BYTES_USED 7120
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 2 2
+connect con2, localhost, user2, , ;
+"================== con2 connected =================="
+connection default;
+"================== Step 4 =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+username user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 4
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7120
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 4
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 7120
+HIGH_NUMBER_OF_BYTES_USED 7120
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 2
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 32768
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 4
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7120
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 4
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 7120
+HIGH_NUMBER_OF_BYTES_USED 7120
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+user2 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 3 3
+connection con2;
+set GLOBAL query_cache_size=2000*1024;
+select get_lock("marker_2", 10);
+get_lock("marker_2", 10)
+1
+select release_lock("marker_2");
+release_lock("marker_2")
+1
+set @v1 = repeat("a", 1000);
+set @v2 = repeat("b", 2000);
+set @v3 = repeat("c", 4000);
+"================== con2 marker =================="
+connection default;
+"================== Step 5 =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 32
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 512
+HIGH_NUMBER_OF_BYTES_USED 544
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 7
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 14144
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 7
+HIGH_COUNT_USED 7
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 14144
+HIGH_NUMBER_OF_BYTES_USED 14144
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 65536
+SUM_NUMBER_OF_BYTES_FREE 32768
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 32
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 512
+HIGH_NUMBER_OF_BYTES_USED 544
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 7
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 14144
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 7
+HIGH_COUNT_USED 7
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 14144
+HIGH_NUMBER_OF_BYTES_USED 14144
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+user2 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 3 3
+truncate table performance_schema.memory_summary_by_thread_by_event_name;
+"================== MEMORY_BY_THREAD truncated =================="
+"================== Step 5b =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 32
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 512
+HIGH_NUMBER_OF_BYTES_USED 544
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 7
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 14144
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 7
+HIGH_COUNT_USED 7
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 14144
+HIGH_NUMBER_OF_BYTES_USED 14144
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 65536
+SUM_NUMBER_OF_BYTES_FREE 32768
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 32
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 512
+HIGH_NUMBER_OF_BYTES_USED 544
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 7
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 14144
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 7
+HIGH_COUNT_USED 7
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 14144
+HIGH_NUMBER_OF_BYTES_USED 14144
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+user2 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 3 3
+connect con3, localhost, user3, , ;
+"================== con3 connected =================="
+connection default;
+"================== Step 6 =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+username user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 32
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 512
+HIGH_NUMBER_OF_BYTES_USED 544
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 7
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 14144
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 7
+HIGH_COUNT_USED 7
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 14144
+HIGH_NUMBER_OF_BYTES_USED 14144
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 65536
+SUM_NUMBER_OF_BYTES_FREE 32768
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 32
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 512
+HIGH_NUMBER_OF_BYTES_USED 544
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 7
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 14144
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 7
+HIGH_COUNT_USED 7
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 14144
+HIGH_NUMBER_OF_BYTES_USED 14144
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+user2 1 1
+user3 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 4 4
+connection con3;
+set GLOBAL query_cache_size=500*1024;
+select get_lock("marker_3", 10);
+get_lock("marker_3", 10)
+1
+select release_lock("marker_3");
+release_lock("marker_3")
+1
+set @v1 = repeat("a", 1000);
+set @v2 = repeat("b", 2000);
+set @v3 = repeat("c", 4000);
+"================== con3 marker =================="
+connection default;
+"================== Step 7 =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 6
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 816
+SUM_NUMBER_OF_BYTES_FREE 48
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 768
+HIGH_NUMBER_OF_BYTES_USED 784
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 10
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 21168
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 10
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 21168
+HIGH_NUMBER_OF_BYTES_USED 21168
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 6
+COUNT_FREE 4
+SUM_NUMBER_OF_BYTES_ALLOC 98304
+SUM_NUMBER_OF_BYTES_FREE 65536
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 6
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 816
+SUM_NUMBER_OF_BYTES_FREE 48
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 768
+HIGH_NUMBER_OF_BYTES_USED 784
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 10
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 21168
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 10
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 21168
+HIGH_NUMBER_OF_BYTES_USED 21168
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+user2 1 1
+user3 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 4 4
+connect con4, localhost, user4, , ;
+connect con5, localhost, user4, , ;
+"================== con4/con5 (both user4) connected =================="
+connection default;
+"================== Step 8 =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+username user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_account;
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 6
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 816
+SUM_NUMBER_OF_BYTES_FREE 48
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 768
+HIGH_NUMBER_OF_BYTES_USED 784
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 10
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 21168
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 10
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 21168
+HIGH_NUMBER_OF_BYTES_USED 21168
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 6
+COUNT_FREE 4
+SUM_NUMBER_OF_BYTES_ALLOC 98304
+SUM_NUMBER_OF_BYTES_FREE 65536
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 6
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 816
+SUM_NUMBER_OF_BYTES_FREE 48
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 768
+HIGH_NUMBER_OF_BYTES_USED 784
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 10
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 21168
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 10
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 21168
+HIGH_NUMBER_OF_BYTES_USED 21168
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+user2 1 1
+user3 1 1
+user4 2 2
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 6 6
+connection con4;
+set GLOBAL query_cache_size=4000*1024;
+select get_lock("marker_4", 10);
+get_lock("marker_4", 10)
+1
+select release_lock("marker_4");
+release_lock("marker_4")
+1
+set @v1 = repeat("a", 1000);
+set @v2 = repeat("b", 2000);
+set @v3 = repeat("c", 4000);
+connection con5;
+select get_lock("marker_5", 10);
+get_lock("marker_5", 10)
+1
+select release_lock("marker_5");
+release_lock("marker_5")
+1
+set @v1 = repeat("a", 1000);
+set @v2 = repeat("b", 2000);
+set @v3 = repeat("c", 4000);
+"================== con4/con5 marker =================="
+connection default;
+"================== Step 9 =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+execute dump_memory_account;
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 32
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 512
+HIGH_NUMBER_OF_BYTES_USED 544
+USER user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 6
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 14048
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 6
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 14048
+HIGH_NUMBER_OF_BYTES_USED 14048
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 5
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 80
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 5
+HIGH_COUNT_USED 8
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 1280
+HIGH_NUMBER_OF_BYTES_USED 1328
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 16
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 35216
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 131072
+SUM_NUMBER_OF_BYTES_FREE 98304
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 5
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 80
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 5
+HIGH_COUNT_USED 8
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 1280
+HIGH_NUMBER_OF_BYTES_USED 1328
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 16
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 35216
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+user2 1 1
+user3 1 1
+user4 2 2
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 6 6
+disconnect con1;
+disconnect con5;
+connection default;
+"================== con1/con5 disconnected =================="
+"================== Step 10 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+execute dump_memory_account;
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 288
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 544
+USER user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 6
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 14048
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 14048
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 7
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 592
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 8
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 768
+HIGH_NUMBER_OF_BYTES_USED 1328
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 14048
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 10
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 21168
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 131072
+SUM_NUMBER_OF_BYTES_FREE 98304
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 7
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 592
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 8
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 768
+HIGH_NUMBER_OF_BYTES_USED 1328
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 14048
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 10
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 21168
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 1 1
+user3 1 1
+user4 1 2
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 4 6
+disconnect con2;
+connection default;
+"================== con2 disconnected =================="
+"================== Step 11 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+execute dump_memory_account;
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 288
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 544
+USER user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 6
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 14048
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 14048
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 8
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 848
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 8
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 512
+HIGH_NUMBER_OF_BYTES_USED 1328
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 9
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 21072
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 7
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 14144
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 131072
+SUM_NUMBER_OF_BYTES_FREE 98304
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 8
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 848
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 8
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 512
+HIGH_NUMBER_OF_BYTES_USED 1328
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 9
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 21072
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 7
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 14144
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 1 1
+user4 1 2
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 3 6
+disconnect con3;
+connection default;
+"================== con3 disconnected =================="
+"================== Step 12 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+execute dump_memory_account;
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 288
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 544
+USER user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 6
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 14048
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 14048
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 9
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 1104
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 8
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 1328
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 12
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 28096
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 4
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 7120
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 131072
+SUM_NUMBER_OF_BYTES_FREE 98304
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 9
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 1104
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 8
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 1328
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 12
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 28096
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 4
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 7120
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 1 2
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 2 6
+disconnect con4;
+connection default;
+"================== con4 disconnected =================="
+"================== Step 13 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 4
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 544
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 544
+USER user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 6
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 14048
+SUM_NUMBER_OF_BYTES_FREE 14048
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 14048
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 10
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 1360
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 8
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 1328
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 15
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 35120
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 131072
+SUM_NUMBER_OF_BYTES_FREE 98304
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 10
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 1360
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 8
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 1328
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 15
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 35120
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 2
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 6
+connection default;
+truncate performance_schema.memory_summary_by_thread_by_event_name;
+"================== MEMORY_BY_THREAD truncated =================="
+"================== Step 14 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 4
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 544
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 544
+USER user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 6
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 14048
+SUM_NUMBER_OF_BYTES_FREE 14048
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 14048
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 10
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 1360
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 8
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 1328
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 15
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 35120
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 131072
+SUM_NUMBER_OF_BYTES_FREE 98304
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 10
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 1360
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 8
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 1328
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 15
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 35120
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 2
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 6
+truncate performance_schema.memory_summary_by_account_by_event_name;
+"================== MEMORY_BY_ACCOUNT truncated =================="
+"================== Step 15 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 4
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 544
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 544
+USER user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 6
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 14048
+SUM_NUMBER_OF_BYTES_FREE 14048
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 14048
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 10
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 1360
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 8
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 1328
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 15
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 35120
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 131072
+SUM_NUMBER_OF_BYTES_FREE 98304
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 10
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 1360
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 8
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 1328
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 15
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 35120
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 2
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 6
+truncate performance_schema.memory_summary_by_user_by_event_name;
+"================== MEMORY_BY_USER truncated =================="
+"================== Step 16 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 10
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 1360
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 8
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 1328
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 15
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 35120
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 131072
+SUM_NUMBER_OF_BYTES_FREE 98304
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 10
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 1360
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 8
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 1328
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 15
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 35120
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 2
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 6
+truncate performance_schema.memory_summary_by_host_by_event_name;
+"================== MEMORY_BY_HOST truncated =================="
+"================== Step 17 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 131072
+SUM_NUMBER_OF_BYTES_FREE 98304
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 10
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 1360
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 8
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 1328
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 15
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 35120
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 2
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 6
+truncate performance_schema.memory_summary_global_by_event_name;
+"================== MEMORY_GLOBAL truncated =================="
+"================== Step 18 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 2
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 32768
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 2
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 32768
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 2
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 6
+truncate performance_schema.accounts;
+"================== ACCOUNTS truncated =================="
+"================== Step 19 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 2
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 32768
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 2
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 32768
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 2
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 6
+truncate performance_schema.users;
+"================== USERS truncated =================="
+"================== Step 20 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 2
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 32768
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 2
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 32768
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 6
+truncate performance_schema.hosts;
+"================== HOSTS truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 2
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 32768
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 2
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 32768
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 1
diff --git a/mysql-test/suite/perfschema/r/memory_aggregate_no_a_no_h.result b/mysql-test/suite/perfschema/r/memory_aggregate_no_a_no_h.result
new file mode 100644
index 00000000000..cc0e0c03dcf
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/memory_aggregate_no_a_no_h.result
@@ -0,0 +1,3464 @@
+show global status like "performance_schema_memory_classes_lost";
+Variable_name Value
+Performance_schema_memory_classes_lost 0
+"================== Step 1 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+connect con1, localhost, user1, , ;
+"================== con1 connected =================="
+connection default;
+"================== Step 2 =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+connection con1;
+set GLOBAL query_cache_size=1000*1024;
+select get_lock("marker_1", 10);
+get_lock("marker_1", 10)
+1
+select release_lock("marker_1");
+release_lock("marker_1")
+1
+set @v1 = repeat("a", 1000);
+set @v2 = repeat("b", 2000);
+set @v3 = repeat("c", 4000);
+"================== con1 marker =================="
+connection default;
+"================== Step 3 =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 2
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 32768
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 4
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7120
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 4
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 7120
+HIGH_NUMBER_OF_BYTES_USED 7120
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+connect con2, localhost, user2, , ;
+"================== con2 connected =================="
+connection default;
+"================== Step 4 =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+username user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 2
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 32768
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 4
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7120
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 4
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 7120
+HIGH_NUMBER_OF_BYTES_USED 7120
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+user2 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+connection con2;
+set GLOBAL query_cache_size=2000*1024;
+select get_lock("marker_2", 10);
+get_lock("marker_2", 10)
+1
+select release_lock("marker_2");
+release_lock("marker_2")
+1
+set @v1 = repeat("a", 1000);
+set @v2 = repeat("b", 2000);
+set @v3 = repeat("c", 4000);
+"================== con2 marker =================="
+connection default;
+"================== Step 5 =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 65536
+SUM_NUMBER_OF_BYTES_FREE 32768
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 32
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 512
+HIGH_NUMBER_OF_BYTES_USED 544
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 7
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 14144
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 7
+HIGH_COUNT_USED 7
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 14144
+HIGH_NUMBER_OF_BYTES_USED 14144
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+user2 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate table performance_schema.memory_summary_by_thread_by_event_name;
+"================== MEMORY_BY_THREAD truncated =================="
+"================== Step 5b =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 65536
+SUM_NUMBER_OF_BYTES_FREE 32768
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 32
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 512
+HIGH_NUMBER_OF_BYTES_USED 544
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 7
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 14144
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 7
+HIGH_COUNT_USED 7
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 14144
+HIGH_NUMBER_OF_BYTES_USED 14144
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+user2 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+connect con3, localhost, user3, , ;
+"================== con3 connected =================="
+connection default;
+"================== Step 6 =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+username user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 65536
+SUM_NUMBER_OF_BYTES_FREE 32768
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 32
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 512
+HIGH_NUMBER_OF_BYTES_USED 544
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 7
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 14144
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 7
+HIGH_COUNT_USED 7
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 14144
+HIGH_NUMBER_OF_BYTES_USED 14144
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+user2 1 1
+user3 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+connection con3;
+set GLOBAL query_cache_size=500*1024;
+select get_lock("marker_3", 10);
+get_lock("marker_3", 10)
+1
+select release_lock("marker_3");
+release_lock("marker_3")
+1
+set @v1 = repeat("a", 1000);
+set @v2 = repeat("b", 2000);
+set @v3 = repeat("c", 4000);
+"================== con3 marker =================="
+connection default;
+"================== Step 7 =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 6
+COUNT_FREE 4
+SUM_NUMBER_OF_BYTES_ALLOC 98304
+SUM_NUMBER_OF_BYTES_FREE 65536
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 6
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 816
+SUM_NUMBER_OF_BYTES_FREE 48
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 768
+HIGH_NUMBER_OF_BYTES_USED 784
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 10
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 21168
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 10
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 21168
+HIGH_NUMBER_OF_BYTES_USED 21168
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+user2 1 1
+user3 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+connect con4, localhost, user4, , ;
+connect con5, localhost, user4, , ;
+"================== con4/con5 (both user4) connected =================="
+connection default;
+"================== Step 8 =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+username user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_account;
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 6
+COUNT_FREE 4
+SUM_NUMBER_OF_BYTES_ALLOC 98304
+SUM_NUMBER_OF_BYTES_FREE 65536
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 6
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 816
+SUM_NUMBER_OF_BYTES_FREE 48
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 768
+HIGH_NUMBER_OF_BYTES_USED 784
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 10
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 21168
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 10
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 21168
+HIGH_NUMBER_OF_BYTES_USED 21168
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+user2 1 1
+user3 1 1
+user4 2 2
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+connection con4;
+set GLOBAL query_cache_size=4000*1024;
+select get_lock("marker_4", 10);
+get_lock("marker_4", 10)
+1
+select release_lock("marker_4");
+release_lock("marker_4")
+1
+set @v1 = repeat("a", 1000);
+set @v2 = repeat("b", 2000);
+set @v3 = repeat("c", 4000);
+connection con5;
+select get_lock("marker_5", 10);
+get_lock("marker_5", 10)
+1
+select release_lock("marker_5");
+release_lock("marker_5")
+1
+set @v1 = repeat("a", 1000);
+set @v2 = repeat("b", 2000);
+set @v3 = repeat("c", 4000);
+"================== con4/con5 marker =================="
+connection default;
+"================== Step 9 =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+execute dump_memory_account;
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 32
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 512
+HIGH_NUMBER_OF_BYTES_USED 544
+USER user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 6
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 14048
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 6
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 14048
+HIGH_NUMBER_OF_BYTES_USED 14048
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 131072
+SUM_NUMBER_OF_BYTES_FREE 98304
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 5
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 80
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 5
+HIGH_COUNT_USED 8
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 1280
+HIGH_NUMBER_OF_BYTES_USED 1328
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 16
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 35216
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+user2 1 1
+user3 1 1
+user4 2 2
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+disconnect con1;
+disconnect con5;
+connection default;
+"================== con1/con5 disconnected =================="
+"================== Step 10 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+execute dump_memory_account;
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 288
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 544
+USER user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 6
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 14048
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 14048
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 131072
+SUM_NUMBER_OF_BYTES_FREE 98304
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 7
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 592
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 8
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 768
+HIGH_NUMBER_OF_BYTES_USED 1328
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 14048
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 10
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 21168
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 1 1
+user3 1 1
+user4 1 2
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+disconnect con2;
+connection default;
+"================== con2 disconnected =================="
+"================== Step 11 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+execute dump_memory_account;
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 288
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 544
+USER user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 6
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 14048
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 14048
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 131072
+SUM_NUMBER_OF_BYTES_FREE 98304
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 8
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 848
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 8
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 512
+HIGH_NUMBER_OF_BYTES_USED 1328
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 9
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 21072
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 7
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 14144
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 1 1
+user4 1 2
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+disconnect con3;
+connection default;
+"================== con3 disconnected =================="
+"================== Step 12 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+execute dump_memory_account;
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 288
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 544
+USER user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 6
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 14048
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 14048
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 131072
+SUM_NUMBER_OF_BYTES_FREE 98304
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 9
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 1104
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 8
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 1328
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 12
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 28096
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 4
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 7120
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 1 2
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+disconnect con4;
+connection default;
+"================== con4 disconnected =================="
+"================== Step 13 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 4
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 544
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 544
+USER user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 6
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 14048
+SUM_NUMBER_OF_BYTES_FREE 14048
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 14048
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 131072
+SUM_NUMBER_OF_BYTES_FREE 98304
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 10
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 1360
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 8
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 1328
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 15
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 35120
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 2
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+connection default;
+truncate performance_schema.memory_summary_by_thread_by_event_name;
+"================== MEMORY_BY_THREAD truncated =================="
+"================== Step 14 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 4
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 544
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 544
+USER user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 6
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 14048
+SUM_NUMBER_OF_BYTES_FREE 14048
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 14048
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 131072
+SUM_NUMBER_OF_BYTES_FREE 98304
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 10
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 1360
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 8
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 1328
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 15
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 35120
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 2
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.memory_summary_by_account_by_event_name;
+"================== MEMORY_BY_ACCOUNT truncated =================="
+"================== Step 15 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 4
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 544
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 544
+USER user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 6
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 14048
+SUM_NUMBER_OF_BYTES_FREE 14048
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 14048
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 131072
+SUM_NUMBER_OF_BYTES_FREE 98304
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 10
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 1360
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 8
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 1328
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 15
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 35120
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 2
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.memory_summary_by_user_by_event_name;
+"================== MEMORY_BY_USER truncated =================="
+"================== Step 16 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 131072
+SUM_NUMBER_OF_BYTES_FREE 98304
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 10
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 1360
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 8
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 1328
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 15
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 35120
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 2
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.memory_summary_by_host_by_event_name;
+"================== MEMORY_BY_HOST truncated =================="
+"================== Step 17 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 131072
+SUM_NUMBER_OF_BYTES_FREE 98304
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 10
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 1360
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 8
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 1328
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 15
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 35120
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 2
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.memory_summary_global_by_event_name;
+"================== MEMORY_GLOBAL truncated =================="
+"================== Step 18 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 2
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 32768
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 2
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 32768
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 2
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.accounts;
+"================== ACCOUNTS truncated =================="
+"================== Step 19 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 2
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 32768
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 2
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 32768
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 2
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.users;
+"================== USERS truncated =================="
+"================== Step 20 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 2
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 32768
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 2
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 32768
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.hosts;
+"================== HOSTS truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 2
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 32768
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 2
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 32768
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
diff --git a/mysql-test/suite/perfschema/r/memory_aggregate_no_a_no_u.result b/mysql-test/suite/perfschema/r/memory_aggregate_no_a_no_u.result
new file mode 100644
index 00000000000..8b24b5b565b
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/memory_aggregate_no_a_no_u.result
@@ -0,0 +1,2442 @@
+show global status like "performance_schema_memory_classes_lost";
+Variable_name Value
+Performance_schema_memory_classes_lost 0
+"================== Step 1 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 1
+connect con1, localhost, user1, , ;
+"================== con1 connected =================="
+connection default;
+"================== Step 2 =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 2 2
+connection con1;
+set GLOBAL query_cache_size=1000*1024;
+select get_lock("marker_1", 10);
+get_lock("marker_1", 10)
+1
+select release_lock("marker_1");
+release_lock("marker_1")
+1
+set @v1 = repeat("a", 1000);
+set @v2 = repeat("b", 2000);
+set @v3 = repeat("c", 4000);
+"================== con1 marker =================="
+connection default;
+"================== Step 3 =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 4
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7120
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 4
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 7120
+HIGH_NUMBER_OF_BYTES_USED 7120
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 2
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 32768
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 4
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7120
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 4
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 7120
+HIGH_NUMBER_OF_BYTES_USED 7120
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 2 2
+connect con2, localhost, user2, , ;
+"================== con2 connected =================="
+connection default;
+"================== Step 4 =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+username user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 4
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7120
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 4
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 7120
+HIGH_NUMBER_OF_BYTES_USED 7120
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 2
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 32768
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 4
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7120
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 4
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 7120
+HIGH_NUMBER_OF_BYTES_USED 7120
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 3 3
+connection con2;
+set GLOBAL query_cache_size=2000*1024;
+select get_lock("marker_2", 10);
+get_lock("marker_2", 10)
+1
+select release_lock("marker_2");
+release_lock("marker_2")
+1
+set @v1 = repeat("a", 1000);
+set @v2 = repeat("b", 2000);
+set @v3 = repeat("c", 4000);
+"================== con2 marker =================="
+connection default;
+"================== Step 5 =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 32
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 512
+HIGH_NUMBER_OF_BYTES_USED 544
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 7
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 14144
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 7
+HIGH_COUNT_USED 7
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 14144
+HIGH_NUMBER_OF_BYTES_USED 14144
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 65536
+SUM_NUMBER_OF_BYTES_FREE 32768
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 32
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 512
+HIGH_NUMBER_OF_BYTES_USED 544
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 7
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 14144
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 7
+HIGH_COUNT_USED 7
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 14144
+HIGH_NUMBER_OF_BYTES_USED 14144
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 3 3
+truncate table performance_schema.memory_summary_by_thread_by_event_name;
+"================== MEMORY_BY_THREAD truncated =================="
+"================== Step 5b =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 32
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 512
+HIGH_NUMBER_OF_BYTES_USED 544
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 7
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 14144
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 7
+HIGH_COUNT_USED 7
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 14144
+HIGH_NUMBER_OF_BYTES_USED 14144
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 65536
+SUM_NUMBER_OF_BYTES_FREE 32768
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 32
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 512
+HIGH_NUMBER_OF_BYTES_USED 544
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 7
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 14144
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 7
+HIGH_COUNT_USED 7
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 14144
+HIGH_NUMBER_OF_BYTES_USED 14144
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 3 3
+connect con3, localhost, user3, , ;
+"================== con3 connected =================="
+connection default;
+"================== Step 6 =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+username user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 32
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 512
+HIGH_NUMBER_OF_BYTES_USED 544
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 7
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 14144
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 7
+HIGH_COUNT_USED 7
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 14144
+HIGH_NUMBER_OF_BYTES_USED 14144
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 65536
+SUM_NUMBER_OF_BYTES_FREE 32768
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 32
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 512
+HIGH_NUMBER_OF_BYTES_USED 544
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 7
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 14144
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 7
+HIGH_COUNT_USED 7
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 14144
+HIGH_NUMBER_OF_BYTES_USED 14144
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 4 4
+connection con3;
+set GLOBAL query_cache_size=500*1024;
+select get_lock("marker_3", 10);
+get_lock("marker_3", 10)
+1
+select release_lock("marker_3");
+release_lock("marker_3")
+1
+set @v1 = repeat("a", 1000);
+set @v2 = repeat("b", 2000);
+set @v3 = repeat("c", 4000);
+"================== con3 marker =================="
+connection default;
+"================== Step 7 =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 6
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 816
+SUM_NUMBER_OF_BYTES_FREE 48
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 768
+HIGH_NUMBER_OF_BYTES_USED 784
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 10
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 21168
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 10
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 21168
+HIGH_NUMBER_OF_BYTES_USED 21168
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 6
+COUNT_FREE 4
+SUM_NUMBER_OF_BYTES_ALLOC 98304
+SUM_NUMBER_OF_BYTES_FREE 65536
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 6
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 816
+SUM_NUMBER_OF_BYTES_FREE 48
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 768
+HIGH_NUMBER_OF_BYTES_USED 784
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 10
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 21168
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 10
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 21168
+HIGH_NUMBER_OF_BYTES_USED 21168
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 4 4
+connect con4, localhost, user4, , ;
+connect con5, localhost, user4, , ;
+"================== con4/con5 (both user4) connected =================="
+connection default;
+"================== Step 8 =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+username user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 6
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 816
+SUM_NUMBER_OF_BYTES_FREE 48
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 768
+HIGH_NUMBER_OF_BYTES_USED 784
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 10
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 21168
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 10
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 21168
+HIGH_NUMBER_OF_BYTES_USED 21168
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 6
+COUNT_FREE 4
+SUM_NUMBER_OF_BYTES_ALLOC 98304
+SUM_NUMBER_OF_BYTES_FREE 65536
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 6
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 816
+SUM_NUMBER_OF_BYTES_FREE 48
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 768
+HIGH_NUMBER_OF_BYTES_USED 784
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 10
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 21168
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 10
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 21168
+HIGH_NUMBER_OF_BYTES_USED 21168
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 6 6
+connection con4;
+set GLOBAL query_cache_size=4000*1024;
+select get_lock("marker_4", 10);
+get_lock("marker_4", 10)
+1
+select release_lock("marker_4");
+release_lock("marker_4")
+1
+set @v1 = repeat("a", 1000);
+set @v2 = repeat("b", 2000);
+set @v3 = repeat("c", 4000);
+connection con5;
+select get_lock("marker_5", 10);
+get_lock("marker_5", 10)
+1
+select release_lock("marker_5");
+release_lock("marker_5")
+1
+set @v1 = repeat("a", 1000);
+set @v2 = repeat("b", 2000);
+set @v3 = repeat("c", 4000);
+"================== con4/con5 marker =================="
+connection default;
+"================== Step 9 =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 5
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 80
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 5
+HIGH_COUNT_USED 8
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 1280
+HIGH_NUMBER_OF_BYTES_USED 1328
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 16
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 35216
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 131072
+SUM_NUMBER_OF_BYTES_FREE 98304
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 5
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 80
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 5
+HIGH_COUNT_USED 8
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 1280
+HIGH_NUMBER_OF_BYTES_USED 1328
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 16
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 35216
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 6 6
+disconnect con1;
+disconnect con5;
+connection default;
+"================== con1/con5 disconnected =================="
+"================== Step 10 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 7
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 592
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 8
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 768
+HIGH_NUMBER_OF_BYTES_USED 1328
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 14048
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 10
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 21168
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 131072
+SUM_NUMBER_OF_BYTES_FREE 98304
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 7
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 592
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 8
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 768
+HIGH_NUMBER_OF_BYTES_USED 1328
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 14048
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 10
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 21168
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 4 6
+disconnect con2;
+connection default;
+"================== con2 disconnected =================="
+"================== Step 11 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 8
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 848
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 8
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 512
+HIGH_NUMBER_OF_BYTES_USED 1328
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 9
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 21072
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 7
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 14144
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 131072
+SUM_NUMBER_OF_BYTES_FREE 98304
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 8
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 848
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 8
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 512
+HIGH_NUMBER_OF_BYTES_USED 1328
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 9
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 21072
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 7
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 14144
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 3 6
+disconnect con3;
+connection default;
+"================== con3 disconnected =================="
+"================== Step 12 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 9
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 1104
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 8
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 1328
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 12
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 28096
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 4
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 7120
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 131072
+SUM_NUMBER_OF_BYTES_FREE 98304
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 9
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 1104
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 8
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 1328
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 12
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 28096
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 4
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 7120
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 2 6
+disconnect con4;
+connection default;
+"================== con4 disconnected =================="
+"================== Step 13 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 10
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 1360
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 8
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 1328
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 15
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 35120
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 131072
+SUM_NUMBER_OF_BYTES_FREE 98304
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 10
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 1360
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 8
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 1328
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 15
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 35120
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 6
+connection default;
+truncate performance_schema.memory_summary_by_thread_by_event_name;
+"================== MEMORY_BY_THREAD truncated =================="
+"================== Step 14 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 10
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 1360
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 8
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 1328
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 15
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 35120
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 131072
+SUM_NUMBER_OF_BYTES_FREE 98304
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 10
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 1360
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 8
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 1328
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 15
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 35120
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 6
+truncate performance_schema.memory_summary_by_account_by_event_name;
+"================== MEMORY_BY_ACCOUNT truncated =================="
+"================== Step 15 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 10
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 1360
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 8
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 1328
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 15
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 35120
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 131072
+SUM_NUMBER_OF_BYTES_FREE 98304
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 10
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 1360
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 8
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 1328
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 15
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 35120
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 6
+truncate performance_schema.memory_summary_by_user_by_event_name;
+"================== MEMORY_BY_USER truncated =================="
+"================== Step 16 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 10
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 1360
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 8
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 1328
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 15
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 35120
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 131072
+SUM_NUMBER_OF_BYTES_FREE 98304
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 10
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 1360
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 8
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 1328
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 15
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 35120
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 6
+truncate performance_schema.memory_summary_by_host_by_event_name;
+"================== MEMORY_BY_HOST truncated =================="
+"================== Step 17 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 131072
+SUM_NUMBER_OF_BYTES_FREE 98304
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 10
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 1360
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 8
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 1328
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 15
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 35120
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 6
+truncate performance_schema.memory_summary_global_by_event_name;
+"================== MEMORY_GLOBAL truncated =================="
+"================== Step 18 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 2
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 32768
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 2
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 32768
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 6
+truncate performance_schema.accounts;
+"================== ACCOUNTS truncated =================="
+"================== Step 19 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 2
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 32768
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 2
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 32768
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 6
+truncate performance_schema.users;
+"================== USERS truncated =================="
+"================== Step 20 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 2
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 32768
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 2
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 32768
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 6
+truncate performance_schema.hosts;
+"================== HOSTS truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 2
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 32768
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 2
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 32768
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 1
diff --git a/mysql-test/suite/perfschema/r/memory_aggregate_no_a_no_u_no_h.result b/mysql-test/suite/perfschema/r/memory_aggregate_no_a_no_u_no_h.result
new file mode 100644
index 00000000000..45cbaf88372
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/memory_aggregate_no_a_no_u_no_h.result
@@ -0,0 +1,1892 @@
+show global status like "performance_schema_memory_classes_lost";
+Variable_name Value
+Performance_schema_memory_classes_lost 0
+"================== Step 1 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+connect con1, localhost, user1, , ;
+"================== con1 connected =================="
+connection default;
+"================== Step 2 =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+connection con1;
+set GLOBAL query_cache_size=1000*1024;
+select get_lock("marker_1", 10);
+get_lock("marker_1", 10)
+1
+select release_lock("marker_1");
+release_lock("marker_1")
+1
+set @v1 = repeat("a", 1000);
+set @v2 = repeat("b", 2000);
+set @v3 = repeat("c", 4000);
+"================== con1 marker =================="
+connection default;
+"================== Step 3 =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 2
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 32768
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 4
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7120
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 4
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 7120
+HIGH_NUMBER_OF_BYTES_USED 7120
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+connect con2, localhost, user2, , ;
+"================== con2 connected =================="
+connection default;
+"================== Step 4 =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+username user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 2
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 32768
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 4
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7120
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 4
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 7120
+HIGH_NUMBER_OF_BYTES_USED 7120
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+connection con2;
+set GLOBAL query_cache_size=2000*1024;
+select get_lock("marker_2", 10);
+get_lock("marker_2", 10)
+1
+select release_lock("marker_2");
+release_lock("marker_2")
+1
+set @v1 = repeat("a", 1000);
+set @v2 = repeat("b", 2000);
+set @v3 = repeat("c", 4000);
+"================== con2 marker =================="
+connection default;
+"================== Step 5 =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 65536
+SUM_NUMBER_OF_BYTES_FREE 32768
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 32
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 512
+HIGH_NUMBER_OF_BYTES_USED 544
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 7
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 14144
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 7
+HIGH_COUNT_USED 7
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 14144
+HIGH_NUMBER_OF_BYTES_USED 14144
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate table performance_schema.memory_summary_by_thread_by_event_name;
+"================== MEMORY_BY_THREAD truncated =================="
+"================== Step 5b =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 65536
+SUM_NUMBER_OF_BYTES_FREE 32768
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 32
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 512
+HIGH_NUMBER_OF_BYTES_USED 544
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 7
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 14144
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 7
+HIGH_COUNT_USED 7
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 14144
+HIGH_NUMBER_OF_BYTES_USED 14144
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+connect con3, localhost, user3, , ;
+"================== con3 connected =================="
+connection default;
+"================== Step 6 =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+username user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 65536
+SUM_NUMBER_OF_BYTES_FREE 32768
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 32
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 512
+HIGH_NUMBER_OF_BYTES_USED 544
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 7
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 14144
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 7
+HIGH_COUNT_USED 7
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 14144
+HIGH_NUMBER_OF_BYTES_USED 14144
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+connection con3;
+set GLOBAL query_cache_size=500*1024;
+select get_lock("marker_3", 10);
+get_lock("marker_3", 10)
+1
+select release_lock("marker_3");
+release_lock("marker_3")
+1
+set @v1 = repeat("a", 1000);
+set @v2 = repeat("b", 2000);
+set @v3 = repeat("c", 4000);
+"================== con3 marker =================="
+connection default;
+"================== Step 7 =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 6
+COUNT_FREE 4
+SUM_NUMBER_OF_BYTES_ALLOC 98304
+SUM_NUMBER_OF_BYTES_FREE 65536
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 6
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 816
+SUM_NUMBER_OF_BYTES_FREE 48
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 768
+HIGH_NUMBER_OF_BYTES_USED 784
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 10
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 21168
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 10
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 21168
+HIGH_NUMBER_OF_BYTES_USED 21168
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+connect con4, localhost, user4, , ;
+connect con5, localhost, user4, , ;
+"================== con4/con5 (both user4) connected =================="
+connection default;
+"================== Step 8 =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+username user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 6
+COUNT_FREE 4
+SUM_NUMBER_OF_BYTES_ALLOC 98304
+SUM_NUMBER_OF_BYTES_FREE 65536
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 6
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 816
+SUM_NUMBER_OF_BYTES_FREE 48
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 768
+HIGH_NUMBER_OF_BYTES_USED 784
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 10
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 21168
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 10
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 21168
+HIGH_NUMBER_OF_BYTES_USED 21168
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+connection con4;
+set GLOBAL query_cache_size=4000*1024;
+select get_lock("marker_4", 10);
+get_lock("marker_4", 10)
+1
+select release_lock("marker_4");
+release_lock("marker_4")
+1
+set @v1 = repeat("a", 1000);
+set @v2 = repeat("b", 2000);
+set @v3 = repeat("c", 4000);
+connection con5;
+select get_lock("marker_5", 10);
+get_lock("marker_5", 10)
+1
+select release_lock("marker_5");
+release_lock("marker_5")
+1
+set @v1 = repeat("a", 1000);
+set @v2 = repeat("b", 2000);
+set @v3 = repeat("c", 4000);
+"================== con4/con5 marker =================="
+connection default;
+"================== Step 9 =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 131072
+SUM_NUMBER_OF_BYTES_FREE 98304
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 5
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 80
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 5
+HIGH_COUNT_USED 8
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 1280
+HIGH_NUMBER_OF_BYTES_USED 1328
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 16
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 35216
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+disconnect con1;
+disconnect con5;
+connection default;
+"================== con1/con5 disconnected =================="
+"================== Step 10 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 131072
+SUM_NUMBER_OF_BYTES_FREE 98304
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 7
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 592
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 8
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 768
+HIGH_NUMBER_OF_BYTES_USED 1328
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 14048
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 10
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 21168
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+disconnect con2;
+connection default;
+"================== con2 disconnected =================="
+"================== Step 11 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 131072
+SUM_NUMBER_OF_BYTES_FREE 98304
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 8
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 848
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 8
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 512
+HIGH_NUMBER_OF_BYTES_USED 1328
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 9
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 21072
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 7
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 14144
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+disconnect con3;
+connection default;
+"================== con3 disconnected =================="
+"================== Step 12 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 131072
+SUM_NUMBER_OF_BYTES_FREE 98304
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 9
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 1104
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 8
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 1328
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 12
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 28096
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 4
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 7120
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+disconnect con4;
+connection default;
+"================== con4 disconnected =================="
+"================== Step 13 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 131072
+SUM_NUMBER_OF_BYTES_FREE 98304
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 10
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 1360
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 8
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 1328
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 15
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 35120
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+connection default;
+truncate performance_schema.memory_summary_by_thread_by_event_name;
+"================== MEMORY_BY_THREAD truncated =================="
+"================== Step 14 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 131072
+SUM_NUMBER_OF_BYTES_FREE 98304
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 10
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 1360
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 8
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 1328
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 15
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 35120
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.memory_summary_by_account_by_event_name;
+"================== MEMORY_BY_ACCOUNT truncated =================="
+"================== Step 15 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 131072
+SUM_NUMBER_OF_BYTES_FREE 98304
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 10
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 1360
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 8
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 1328
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 15
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 35120
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.memory_summary_by_user_by_event_name;
+"================== MEMORY_BY_USER truncated =================="
+"================== Step 16 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 131072
+SUM_NUMBER_OF_BYTES_FREE 98304
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 10
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 1360
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 8
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 1328
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 15
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 35120
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.memory_summary_by_host_by_event_name;
+"================== MEMORY_BY_HOST truncated =================="
+"================== Step 17 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 131072
+SUM_NUMBER_OF_BYTES_FREE 98304
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 10
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 1360
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 8
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 1328
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 15
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 35120
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.memory_summary_global_by_event_name;
+"================== MEMORY_GLOBAL truncated =================="
+"================== Step 18 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 2
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 32768
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 2
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 32768
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.accounts;
+"================== ACCOUNTS truncated =================="
+"================== Step 19 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 2
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 32768
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 2
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 32768
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.users;
+"================== USERS truncated =================="
+"================== Step 20 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 2
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 32768
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 2
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 32768
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.hosts;
+"================== HOSTS truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 2
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 32768
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 2
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 32768
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
diff --git a/mysql-test/suite/perfschema/r/memory_aggregate_no_h.result b/mysql-test/suite/perfschema/r/memory_aggregate_no_h.result
new file mode 100644
index 00000000000..35d528bf63c
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/memory_aggregate_no_h.result
@@ -0,0 +1,5052 @@
+show global status like "performance_schema_memory_classes_lost";
+Variable_name Value
+Performance_schema_memory_classes_lost 0
+"================== Step 1 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+connect con1, localhost, user1, , ;
+"================== con1 connected =================="
+connection default;
+"================== Step 2 =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+connection con1;
+set GLOBAL query_cache_size=1000*1024;
+select get_lock("marker_1", 10);
+get_lock("marker_1", 10)
+1
+select release_lock("marker_1");
+release_lock("marker_1")
+1
+set @v1 = repeat("a", 1000);
+set @v2 = repeat("b", 2000);
+set @v3 = repeat("c", 4000);
+"================== con1 marker =================="
+connection default;
+"================== Step 3 =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 2
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 32768
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 4
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7120
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 4
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 7120
+HIGH_NUMBER_OF_BYTES_USED 7120
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+connect con2, localhost, user2, , ;
+"================== con2 connected =================="
+connection default;
+"================== Step 4 =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+username user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 2
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 32768
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 4
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7120
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 4
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 7120
+HIGH_NUMBER_OF_BYTES_USED 7120
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+user2 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+user2 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+connection con2;
+set GLOBAL query_cache_size=2000*1024;
+select get_lock("marker_2", 10);
+get_lock("marker_2", 10)
+1
+select release_lock("marker_2");
+release_lock("marker_2")
+1
+set @v1 = repeat("a", 1000);
+set @v2 = repeat("b", 2000);
+set @v3 = repeat("c", 4000);
+"================== con2 marker =================="
+connection default;
+"================== Step 5 =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 65536
+SUM_NUMBER_OF_BYTES_FREE 32768
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 32
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 512
+HIGH_NUMBER_OF_BYTES_USED 544
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 7
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 14144
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 7
+HIGH_COUNT_USED 7
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 14144
+HIGH_NUMBER_OF_BYTES_USED 14144
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+user2 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+user2 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate table performance_schema.memory_summary_by_thread_by_event_name;
+"================== MEMORY_BY_THREAD truncated =================="
+"================== Step 5b =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 65536
+SUM_NUMBER_OF_BYTES_FREE 32768
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 32
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 512
+HIGH_NUMBER_OF_BYTES_USED 544
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 7
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 14144
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 7
+HIGH_COUNT_USED 7
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 14144
+HIGH_NUMBER_OF_BYTES_USED 14144
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+user2 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+user2 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+connect con3, localhost, user3, , ;
+"================== con3 connected =================="
+connection default;
+"================== Step 6 =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+username user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+username user4
+status not found
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 65536
+SUM_NUMBER_OF_BYTES_FREE 32768
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 32
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 512
+HIGH_NUMBER_OF_BYTES_USED 544
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 7
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 14144
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 7
+HIGH_COUNT_USED 7
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 14144
+HIGH_NUMBER_OF_BYTES_USED 14144
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+user2 localhost 1 1
+user3 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+user2 1 1
+user3 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+connection con3;
+set GLOBAL query_cache_size=500*1024;
+select get_lock("marker_3", 10);
+get_lock("marker_3", 10)
+1
+select release_lock("marker_3");
+release_lock("marker_3")
+1
+set @v1 = repeat("a", 1000);
+set @v2 = repeat("b", 2000);
+set @v3 = repeat("c", 4000);
+"================== con3 marker =================="
+connection default;
+"================== Step 7 =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user4
+status not found
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 6
+COUNT_FREE 4
+SUM_NUMBER_OF_BYTES_ALLOC 98304
+SUM_NUMBER_OF_BYTES_FREE 65536
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 6
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 816
+SUM_NUMBER_OF_BYTES_FREE 48
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 768
+HIGH_NUMBER_OF_BYTES_USED 816
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 10
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 21168
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 10
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 21168
+HIGH_NUMBER_OF_BYTES_USED 21168
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+user2 localhost 1 1
+user3 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+user2 1 1
+user3 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+connect con4, localhost, user4, , ;
+connect con5, localhost, user4, , ;
+"================== con4/con5 (both user4) connected =================="
+connection default;
+"================== Step 8 =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+username user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 6
+COUNT_FREE 4
+SUM_NUMBER_OF_BYTES_ALLOC 98304
+SUM_NUMBER_OF_BYTES_FREE 65536
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 6
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 816
+SUM_NUMBER_OF_BYTES_FREE 48
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 768
+HIGH_NUMBER_OF_BYTES_USED 816
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 10
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 21168
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 10
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 21168
+HIGH_NUMBER_OF_BYTES_USED 21168
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+user2 localhost 1 1
+user3 localhost 1 1
+user4 localhost 2 2
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+user2 1 1
+user3 1 1
+user4 2 2
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+connection con4;
+set GLOBAL query_cache_size=4000*1024;
+select get_lock("marker_4", 10);
+get_lock("marker_4", 10)
+1
+select release_lock("marker_4");
+release_lock("marker_4")
+1
+set @v1 = repeat("a", 1000);
+set @v2 = repeat("b", 2000);
+set @v3 = repeat("c", 4000);
+connection con5;
+select get_lock("marker_5", 10);
+get_lock("marker_5", 10)
+1
+select release_lock("marker_5");
+release_lock("marker_5")
+1
+set @v1 = repeat("a", 1000);
+set @v2 = repeat("b", 2000);
+set @v3 = repeat("c", 4000);
+"================== con4/con5 marker =================="
+connection default;
+"================== Step 9 =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 32
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 512
+HIGH_NUMBER_OF_BYTES_USED 544
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 6
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 14048
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 6
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 14048
+HIGH_NUMBER_OF_BYTES_USED 14048
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 32
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 512
+HIGH_NUMBER_OF_BYTES_USED 544
+USER user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 6
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 14048
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 6
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 14048
+HIGH_NUMBER_OF_BYTES_USED 14048
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 131072
+SUM_NUMBER_OF_BYTES_FREE 98304
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 5
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 80
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 5
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 1280
+HIGH_NUMBER_OF_BYTES_USED 1360
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 16
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 35216
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+user2 localhost 1 1
+user3 localhost 1 1
+user4 localhost 2 2
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+user2 1 1
+user3 1 1
+user4 2 2
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+disconnect con1;
+disconnect con5;
+connection default;
+"================== con1/con5 disconnected =================="
+"================== Step 10 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 288
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 544
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 6
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 14048
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 14048
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 288
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 544
+USER user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 6
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 14048
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 14048
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 131072
+SUM_NUMBER_OF_BYTES_FREE 98304
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 7
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 592
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 768
+HIGH_NUMBER_OF_BYTES_USED 1360
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 14048
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 10
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 21168
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 1 1
+user3 localhost 1 1
+user4 localhost 1 2
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 1 1
+user3 1 1
+user4 1 2
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+disconnect con2;
+connection default;
+"================== con2 disconnected =================="
+"================== Step 11 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 288
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 544
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 6
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 14048
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 14048
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 288
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 544
+USER user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 6
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 14048
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 14048
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 131072
+SUM_NUMBER_OF_BYTES_FREE 98304
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 8
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 848
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 512
+HIGH_NUMBER_OF_BYTES_USED 1360
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 9
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 21072
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 7
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 14144
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 1 1
+user4 localhost 1 2
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 1 1
+user4 1 2
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+disconnect con3;
+connection default;
+"================== con3 disconnected =================="
+"================== Step 12 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 288
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 544
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 6
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 14048
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 14048
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 288
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 544
+USER user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 6
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 14048
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 14048
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 131072
+SUM_NUMBER_OF_BYTES_FREE 98304
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 9
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 1104
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 1360
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 12
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 28096
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 4
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 7120
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 1 2
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 1 2
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+disconnect con4;
+connection default;
+"================== con4 disconnected =================="
+"================== Step 13 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 4
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 544
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 544
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 6
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 14048
+SUM_NUMBER_OF_BYTES_FREE 14048
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 14048
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 4
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 544
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 544
+USER user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 6
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 14048
+SUM_NUMBER_OF_BYTES_FREE 14048
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 14048
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 131072
+SUM_NUMBER_OF_BYTES_FREE 98304
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 10
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 1360
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 1360
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 15
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 35120
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 2
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 2
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+connection default;
+truncate performance_schema.memory_summary_by_thread_by_event_name;
+"================== MEMORY_BY_THREAD truncated =================="
+"================== Step 14 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 4
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 544
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 544
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 6
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 14048
+SUM_NUMBER_OF_BYTES_FREE 14048
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 14048
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 4
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 544
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 544
+USER user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 6
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 14048
+SUM_NUMBER_OF_BYTES_FREE 14048
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 14048
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 131072
+SUM_NUMBER_OF_BYTES_FREE 98304
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 10
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 1360
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 1360
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 15
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 35120
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 2
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 2
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.memory_summary_by_account_by_event_name;
+"================== MEMORY_BY_ACCOUNT truncated =================="
+"================== Step 15 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 4
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 544
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 544
+USER user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 6
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 14048
+SUM_NUMBER_OF_BYTES_FREE 14048
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 14048
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 131072
+SUM_NUMBER_OF_BYTES_FREE 98304
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 10
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 1360
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 1360
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 15
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 35120
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 2
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 2
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.memory_summary_by_user_by_event_name;
+"================== MEMORY_BY_USER truncated =================="
+"================== Step 16 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 131072
+SUM_NUMBER_OF_BYTES_FREE 98304
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 10
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 1360
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 1360
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 15
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 35120
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 2
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 2
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.memory_summary_by_host_by_event_name;
+"================== MEMORY_BY_HOST truncated =================="
+"================== Step 17 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 131072
+SUM_NUMBER_OF_BYTES_FREE 98304
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 10
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 1360
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 1360
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 15
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 35120
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 2
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 2
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.memory_summary_global_by_event_name;
+"================== MEMORY_GLOBAL truncated =================="
+"================== Step 18 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 2
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 32768
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 2
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 32768
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 2
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 2
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.accounts;
+"================== ACCOUNTS truncated =================="
+"================== Step 19 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+USER user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 2
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 32768
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 2
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 32768
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 2
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.users;
+"================== USERS truncated =================="
+"================== Step 20 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 2
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 32768
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 2
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 32768
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.hosts;
+"================== HOSTS truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 2
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 32768
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 2
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 32768
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
diff --git a/mysql-test/suite/perfschema/r/memory_aggregate_no_u.result b/mysql-test/suite/perfschema/r/memory_aggregate_no_u.result
new file mode 100644
index 00000000000..1f800ce4ba6
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/memory_aggregate_no_u.result
@@ -0,0 +1,4030 @@
+show global status like "performance_schema_memory_classes_lost";
+Variable_name Value
+Performance_schema_memory_classes_lost 0
+"================== Step 1 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 1
+connect con1, localhost, user1, , ;
+"================== con1 connected =================="
+connection default;
+"================== Step 2 =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_user;
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 2 2
+connection con1;
+set GLOBAL query_cache_size=1000*1024;
+select get_lock("marker_1", 10);
+get_lock("marker_1", 10)
+1
+select release_lock("marker_1");
+release_lock("marker_1")
+1
+set @v1 = repeat("a", 1000);
+set @v2 = repeat("b", 2000);
+set @v3 = repeat("c", 4000);
+"================== con1 marker =================="
+connection default;
+"================== Step 3 =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+execute dump_memory_user;
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 4
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7120
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 4
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 7120
+HIGH_NUMBER_OF_BYTES_USED 7120
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 2
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 32768
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 4
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7120
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 4
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 7120
+HIGH_NUMBER_OF_BYTES_USED 7120
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 2 2
+connect con2, localhost, user2, , ;
+"================== con2 connected =================="
+connection default;
+"================== Step 4 =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+username user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_user;
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 4
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7120
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 4
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 7120
+HIGH_NUMBER_OF_BYTES_USED 7120
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 2
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 32768
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 4
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7120
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 4
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 7120
+HIGH_NUMBER_OF_BYTES_USED 7120
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+user2 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 3 3
+connection con2;
+set GLOBAL query_cache_size=2000*1024;
+select get_lock("marker_2", 10);
+get_lock("marker_2", 10)
+1
+select release_lock("marker_2");
+release_lock("marker_2")
+1
+set @v1 = repeat("a", 1000);
+set @v2 = repeat("b", 2000);
+set @v3 = repeat("c", 4000);
+"================== con2 marker =================="
+connection default;
+"================== Step 5 =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+execute dump_memory_user;
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 32
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 512
+HIGH_NUMBER_OF_BYTES_USED 544
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 7
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 14144
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 7
+HIGH_COUNT_USED 7
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 14144
+HIGH_NUMBER_OF_BYTES_USED 14144
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 65536
+SUM_NUMBER_OF_BYTES_FREE 32768
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 32
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 512
+HIGH_NUMBER_OF_BYTES_USED 544
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 7
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 14144
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 7
+HIGH_COUNT_USED 7
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 14144
+HIGH_NUMBER_OF_BYTES_USED 14144
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+user2 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 3 3
+truncate table performance_schema.memory_summary_by_thread_by_event_name;
+"================== MEMORY_BY_THREAD truncated =================="
+"================== Step 5b =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+execute dump_memory_user;
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 32
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 512
+HIGH_NUMBER_OF_BYTES_USED 544
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 7
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 14144
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 7
+HIGH_COUNT_USED 7
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 14144
+HIGH_NUMBER_OF_BYTES_USED 14144
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 65536
+SUM_NUMBER_OF_BYTES_FREE 32768
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 32
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 512
+HIGH_NUMBER_OF_BYTES_USED 544
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 7
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 14144
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 7
+HIGH_COUNT_USED 7
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 14144
+HIGH_NUMBER_OF_BYTES_USED 14144
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+user2 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 3 3
+connect con3, localhost, user3, , ;
+"================== con3 connected =================="
+connection default;
+"================== Step 6 =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+username user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+username user4
+status not found
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_user;
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 32
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 512
+HIGH_NUMBER_OF_BYTES_USED 544
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 7
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 14144
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 7
+HIGH_COUNT_USED 7
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 14144
+HIGH_NUMBER_OF_BYTES_USED 14144
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 65536
+SUM_NUMBER_OF_BYTES_FREE 32768
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 32
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 512
+HIGH_NUMBER_OF_BYTES_USED 544
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 7
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 14144
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 7
+HIGH_COUNT_USED 7
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 14144
+HIGH_NUMBER_OF_BYTES_USED 14144
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+user2 localhost 1 1
+user3 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 4 4
+connection con3;
+set GLOBAL query_cache_size=500*1024;
+select get_lock("marker_3", 10);
+get_lock("marker_3", 10)
+1
+select release_lock("marker_3");
+release_lock("marker_3")
+1
+set @v1 = repeat("a", 1000);
+set @v2 = repeat("b", 2000);
+set @v3 = repeat("c", 4000);
+"================== con3 marker =================="
+connection default;
+"================== Step 7 =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user4
+status not found
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+execute dump_memory_user;
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 6
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 816
+SUM_NUMBER_OF_BYTES_FREE 48
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 768
+HIGH_NUMBER_OF_BYTES_USED 816
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 10
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 21168
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 10
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 21168
+HIGH_NUMBER_OF_BYTES_USED 21168
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 6
+COUNT_FREE 4
+SUM_NUMBER_OF_BYTES_ALLOC 98304
+SUM_NUMBER_OF_BYTES_FREE 65536
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 6
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 816
+SUM_NUMBER_OF_BYTES_FREE 48
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 768
+HIGH_NUMBER_OF_BYTES_USED 816
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 10
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 21168
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 10
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 21168
+HIGH_NUMBER_OF_BYTES_USED 21168
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+user2 localhost 1 1
+user3 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 4 4
+connect con4, localhost, user4, , ;
+connect con5, localhost, user4, , ;
+"================== con4/con5 (both user4) connected =================="
+connection default;
+"================== Step 8 =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+username user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_user;
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 6
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 816
+SUM_NUMBER_OF_BYTES_FREE 48
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 768
+HIGH_NUMBER_OF_BYTES_USED 816
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 10
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 21168
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 10
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 21168
+HIGH_NUMBER_OF_BYTES_USED 21168
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 6
+COUNT_FREE 4
+SUM_NUMBER_OF_BYTES_ALLOC 98304
+SUM_NUMBER_OF_BYTES_FREE 65536
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 6
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 816
+SUM_NUMBER_OF_BYTES_FREE 48
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 768
+HIGH_NUMBER_OF_BYTES_USED 816
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 10
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 21168
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 10
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 21168
+HIGH_NUMBER_OF_BYTES_USED 21168
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+user2 localhost 1 1
+user3 localhost 1 1
+user4 localhost 2 2
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 6 6
+connection con4;
+set GLOBAL query_cache_size=4000*1024;
+select get_lock("marker_4", 10);
+get_lock("marker_4", 10)
+1
+select release_lock("marker_4");
+release_lock("marker_4")
+1
+set @v1 = repeat("a", 1000);
+set @v2 = repeat("b", 2000);
+set @v3 = repeat("c", 4000);
+connection con5;
+select get_lock("marker_5", 10);
+get_lock("marker_5", 10)
+1
+select release_lock("marker_5");
+release_lock("marker_5")
+1
+set @v1 = repeat("a", 1000);
+set @v2 = repeat("b", 2000);
+set @v3 = repeat("c", 4000);
+"================== con4/con5 marker =================="
+connection default;
+"================== Step 9 =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 32
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 512
+HIGH_NUMBER_OF_BYTES_USED 544
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 6
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 14048
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 6
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 14048
+HIGH_NUMBER_OF_BYTES_USED 14048
+execute dump_memory_user;
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 5
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 80
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 5
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 1280
+HIGH_NUMBER_OF_BYTES_USED 1360
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 16
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 35216
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 131072
+SUM_NUMBER_OF_BYTES_FREE 98304
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 5
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 80
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 5
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 1280
+HIGH_NUMBER_OF_BYTES_USED 1360
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 16
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 35216
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+user2 localhost 1 1
+user3 localhost 1 1
+user4 localhost 2 2
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 6 6
+disconnect con1;
+disconnect con5;
+connection default;
+"================== con1/con5 disconnected =================="
+"================== Step 10 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 288
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 544
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 6
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 14048
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 14048
+execute dump_memory_user;
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 7
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 592
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 768
+HIGH_NUMBER_OF_BYTES_USED 1360
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 14048
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 10
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 21168
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 131072
+SUM_NUMBER_OF_BYTES_FREE 98304
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 7
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 592
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 768
+HIGH_NUMBER_OF_BYTES_USED 1360
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 14048
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 10
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 21168
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 1 1
+user3 localhost 1 1
+user4 localhost 1 2
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 4 6
+disconnect con2;
+connection default;
+"================== con2 disconnected =================="
+"================== Step 11 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 288
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 544
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 6
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 14048
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 14048
+execute dump_memory_user;
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 8
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 848
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 512
+HIGH_NUMBER_OF_BYTES_USED 1360
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 9
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 21072
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 7
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 14144
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 131072
+SUM_NUMBER_OF_BYTES_FREE 98304
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 8
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 848
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 512
+HIGH_NUMBER_OF_BYTES_USED 1360
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 9
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 21072
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 7
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 14144
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 1 1
+user4 localhost 1 2
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 3 6
+disconnect con3;
+connection default;
+"================== con3 disconnected =================="
+"================== Step 12 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 288
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 544
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 6
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 14048
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 14048
+execute dump_memory_user;
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 9
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 1104
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 1360
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 12
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 28096
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 4
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 7120
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 131072
+SUM_NUMBER_OF_BYTES_FREE 98304
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 9
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 1104
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 1360
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 12
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 28096
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 4
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 7120
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 1 2
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 2 6
+disconnect con4;
+connection default;
+"================== con4 disconnected =================="
+"================== Step 13 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 4
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 544
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 544
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 6
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 14048
+SUM_NUMBER_OF_BYTES_FREE 14048
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 14048
+execute dump_memory_user;
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 10
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 1360
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 1360
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 15
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 35120
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 131072
+SUM_NUMBER_OF_BYTES_FREE 98304
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 10
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 1360
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 1360
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 15
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 35120
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 2
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 6
+connection default;
+truncate performance_schema.memory_summary_by_thread_by_event_name;
+"================== MEMORY_BY_THREAD truncated =================="
+"================== Step 14 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 4
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 544
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 544
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 6
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 14048
+SUM_NUMBER_OF_BYTES_FREE 14048
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 14048
+execute dump_memory_user;
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 10
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 1360
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 1360
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 15
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 35120
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 131072
+SUM_NUMBER_OF_BYTES_FREE 98304
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 10
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 1360
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 1360
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 15
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 35120
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 2
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 6
+truncate performance_schema.memory_summary_by_account_by_event_name;
+"================== MEMORY_BY_ACCOUNT truncated =================="
+"================== Step 15 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_user;
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 10
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 1360
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 1360
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 15
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 35120
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 131072
+SUM_NUMBER_OF_BYTES_FREE 98304
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 10
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 1360
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 1360
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 15
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 35120
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 2
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 6
+truncate performance_schema.memory_summary_by_user_by_event_name;
+"================== MEMORY_BY_USER truncated =================="
+"================== Step 16 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_user;
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 10
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 1360
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 1360
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 15
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 35120
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 131072
+SUM_NUMBER_OF_BYTES_FREE 98304
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 10
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 1360
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 1360
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 15
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 35120
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 2
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 6
+truncate performance_schema.memory_summary_by_host_by_event_name;
+"================== MEMORY_BY_HOST truncated =================="
+"================== Step 17 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_user;
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 131072
+SUM_NUMBER_OF_BYTES_FREE 98304
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 10
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 1360
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 1360
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 15
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 35120
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 2
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 6
+truncate performance_schema.memory_summary_global_by_event_name;
+"================== MEMORY_GLOBAL truncated =================="
+"================== Step 18 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_user;
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 2
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 32768
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 2
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 32768
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 2
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 6
+truncate performance_schema.accounts;
+"================== ACCOUNTS truncated =================="
+"================== Step 19 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 2
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 32768
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 2
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 32768
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 6
+truncate performance_schema.users;
+"================== USERS truncated =================="
+"================== Step 20 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 2
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 32768
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 2
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 32768
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 6
+truncate performance_schema.hosts;
+"================== HOSTS truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 2
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 32768
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 2
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 32768
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 1
diff --git a/mysql-test/suite/perfschema/r/memory_aggregate_no_u_no_h.result b/mysql-test/suite/perfschema/r/memory_aggregate_no_u_no_h.result
new file mode 100644
index 00000000000..b1ac5f24ec9
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/memory_aggregate_no_u_no_h.result
@@ -0,0 +1,3480 @@
+show global status like "performance_schema_memory_classes_lost";
+Variable_name Value
+Performance_schema_memory_classes_lost 0
+"================== Step 1 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+connect con1, localhost, user1, , ;
+"================== con1 connected =================="
+connection default;
+"================== Step 2 =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_user;
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+connection con1;
+set GLOBAL query_cache_size=1000*1024;
+select get_lock("marker_1", 10);
+get_lock("marker_1", 10)
+1
+select release_lock("marker_1");
+release_lock("marker_1")
+1
+set @v1 = repeat("a", 1000);
+set @v2 = repeat("b", 2000);
+set @v3 = repeat("c", 4000);
+"================== con1 marker =================="
+connection default;
+"================== Step 3 =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+execute dump_memory_user;
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 2
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 32768
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 4
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7120
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 4
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 7120
+HIGH_NUMBER_OF_BYTES_USED 7120
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+connect con2, localhost, user2, , ;
+"================== con2 connected =================="
+connection default;
+"================== Step 4 =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+username user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_user;
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 2
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 32768
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 4
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7120
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 4
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 7120
+HIGH_NUMBER_OF_BYTES_USED 7120
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+user2 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+connection con2;
+set GLOBAL query_cache_size=2000*1024;
+select get_lock("marker_2", 10);
+get_lock("marker_2", 10)
+1
+select release_lock("marker_2");
+release_lock("marker_2")
+1
+set @v1 = repeat("a", 1000);
+set @v2 = repeat("b", 2000);
+set @v3 = repeat("c", 4000);
+"================== con2 marker =================="
+connection default;
+"================== Step 5 =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+execute dump_memory_user;
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 65536
+SUM_NUMBER_OF_BYTES_FREE 32768
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 32
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 512
+HIGH_NUMBER_OF_BYTES_USED 544
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 7
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 14144
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 7
+HIGH_COUNT_USED 7
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 14144
+HIGH_NUMBER_OF_BYTES_USED 14144
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+user2 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate table performance_schema.memory_summary_by_thread_by_event_name;
+"================== MEMORY_BY_THREAD truncated =================="
+"================== Step 5b =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+execute dump_memory_user;
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 65536
+SUM_NUMBER_OF_BYTES_FREE 32768
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 32
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 512
+HIGH_NUMBER_OF_BYTES_USED 544
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 7
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 14144
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 7
+HIGH_COUNT_USED 7
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 14144
+HIGH_NUMBER_OF_BYTES_USED 14144
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+user2 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+connect con3, localhost, user3, , ;
+"================== con3 connected =================="
+connection default;
+"================== Step 6 =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+username user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+username user4
+status not found
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_user;
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 65536
+SUM_NUMBER_OF_BYTES_FREE 32768
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 32
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 512
+HIGH_NUMBER_OF_BYTES_USED 544
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 7
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 14144
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 7
+HIGH_COUNT_USED 7
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 14144
+HIGH_NUMBER_OF_BYTES_USED 14144
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+user2 localhost 1 1
+user3 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+connection con3;
+set GLOBAL query_cache_size=500*1024;
+select get_lock("marker_3", 10);
+get_lock("marker_3", 10)
+1
+select release_lock("marker_3");
+release_lock("marker_3")
+1
+set @v1 = repeat("a", 1000);
+set @v2 = repeat("b", 2000);
+set @v3 = repeat("c", 4000);
+"================== con3 marker =================="
+connection default;
+"================== Step 7 =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user4
+status not found
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+execute dump_memory_user;
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 6
+COUNT_FREE 4
+SUM_NUMBER_OF_BYTES_ALLOC 98304
+SUM_NUMBER_OF_BYTES_FREE 65536
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 6
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 816
+SUM_NUMBER_OF_BYTES_FREE 48
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 768
+HIGH_NUMBER_OF_BYTES_USED 816
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 10
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 21168
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 10
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 21168
+HIGH_NUMBER_OF_BYTES_USED 21168
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+user2 localhost 1 1
+user3 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+connect con4, localhost, user4, , ;
+connect con5, localhost, user4, , ;
+"================== con4/con5 (both user4) connected =================="
+connection default;
+"================== Step 8 =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+username user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_user;
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 6
+COUNT_FREE 4
+SUM_NUMBER_OF_BYTES_ALLOC 98304
+SUM_NUMBER_OF_BYTES_FREE 65536
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 6
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 816
+SUM_NUMBER_OF_BYTES_FREE 48
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 768
+HIGH_NUMBER_OF_BYTES_USED 816
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 10
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 21168
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 10
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 21168
+HIGH_NUMBER_OF_BYTES_USED 21168
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+user2 localhost 1 1
+user3 localhost 1 1
+user4 localhost 2 2
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+connection con4;
+set GLOBAL query_cache_size=4000*1024;
+select get_lock("marker_4", 10);
+get_lock("marker_4", 10)
+1
+select release_lock("marker_4");
+release_lock("marker_4")
+1
+set @v1 = repeat("a", 1000);
+set @v2 = repeat("b", 2000);
+set @v3 = repeat("c", 4000);
+connection con5;
+select get_lock("marker_5", 10);
+get_lock("marker_5", 10)
+1
+select release_lock("marker_5");
+release_lock("marker_5")
+1
+set @v1 = repeat("a", 1000);
+set @v2 = repeat("b", 2000);
+set @v3 = repeat("c", 4000);
+"================== con4/con5 marker =================="
+connection default;
+"================== Step 9 =================="
+call dump_thread();
+username user1
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user1
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 32
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 512
+HIGH_NUMBER_OF_BYTES_USED 544
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 6
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 14048
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 6
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 14048
+HIGH_NUMBER_OF_BYTES_USED 14048
+execute dump_memory_user;
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 131072
+SUM_NUMBER_OF_BYTES_FREE 98304
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 5
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 80
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 5
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 1280
+HIGH_NUMBER_OF_BYTES_USED 1360
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 16
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 35216
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+user2 localhost 1 1
+user3 localhost 1 1
+user4 localhost 2 2
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+disconnect con1;
+disconnect con5;
+connection default;
+"================== con1/con5 disconnected =================="
+"================== Step 10 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 256
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 256
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 256
+username user2
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 3
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 7024
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 288
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 544
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 6
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 14048
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 14048
+execute dump_memory_user;
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 131072
+SUM_NUMBER_OF_BYTES_FREE 98304
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 7
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 592
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 768
+HIGH_NUMBER_OF_BYTES_USED 1360
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 14048
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 10
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 21168
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 1 1
+user3 localhost 1 1
+user4 localhost 1 2
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+disconnect con2;
+connection default;
+"================== con2 disconnected =================="
+"================== Step 11 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user3
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+username user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 288
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 544
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 6
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 14048
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 14048
+execute dump_memory_user;
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 131072
+SUM_NUMBER_OF_BYTES_FREE 98304
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 8
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 848
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 512
+HIGH_NUMBER_OF_BYTES_USED 1360
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 9
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 21072
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 7
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 14144
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 1 1
+user4 localhost 1 2
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+disconnect con3;
+connection default;
+"================== con3 disconnected =================="
+"================== Step 12 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 1
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 16
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 272
+username user4
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 7024
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 288
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 544
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 6
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 14048
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 3
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 7024
+HIGH_NUMBER_OF_BYTES_USED 14048
+execute dump_memory_user;
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 131072
+SUM_NUMBER_OF_BYTES_FREE 98304
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 9
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 1104
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 256
+HIGH_NUMBER_OF_BYTES_USED 1360
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 12
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 28096
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 4
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 7120
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 1 2
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+disconnect con4;
+connection default;
+"================== con4 disconnected =================="
+"================== Step 13 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 4
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 544
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 544
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 6
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 14048
+SUM_NUMBER_OF_BYTES_FREE 14048
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 14048
+execute dump_memory_user;
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 131072
+SUM_NUMBER_OF_BYTES_FREE 98304
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 10
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 1360
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 1360
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 15
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 35120
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 2
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+connection default;
+truncate performance_schema.memory_summary_by_thread_by_event_name;
+"================== MEMORY_BY_THREAD truncated =================="
+"================== Step 14 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 2
+COUNT_FREE 2
+SUM_NUMBER_OF_BYTES_ALLOC 272
+SUM_NUMBER_OF_BYTES_FREE 272
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 272
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 3
+COUNT_FREE 3
+SUM_NUMBER_OF_BYTES_ALLOC 7024
+SUM_NUMBER_OF_BYTES_FREE 7024
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 3
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 7024
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 4
+COUNT_FREE 4
+SUM_NUMBER_OF_BYTES_ALLOC 544
+SUM_NUMBER_OF_BYTES_FREE 544
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 4
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 544
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 6
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 14048
+SUM_NUMBER_OF_BYTES_FREE 14048
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 6
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 14048
+execute dump_memory_user;
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 131072
+SUM_NUMBER_OF_BYTES_FREE 98304
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 10
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 1360
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 1360
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 15
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 35120
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 2
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.memory_summary_by_account_by_event_name;
+"================== MEMORY_BY_ACCOUNT truncated =================="
+"================== Step 15 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_user;
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 131072
+SUM_NUMBER_OF_BYTES_FREE 98304
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 10
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 1360
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 1360
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 15
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 35120
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 2
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.memory_summary_by_user_by_event_name;
+"================== MEMORY_BY_USER truncated =================="
+"================== Step 16 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_user;
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 131072
+SUM_NUMBER_OF_BYTES_FREE 98304
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 10
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 1360
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 1360
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 15
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 35120
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 2
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.memory_summary_by_host_by_event_name;
+"================== MEMORY_BY_HOST truncated =================="
+"================== Step 17 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_user;
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 8
+COUNT_FREE 6
+SUM_NUMBER_OF_BYTES_ALLOC 131072
+SUM_NUMBER_OF_BYTES_FREE 98304
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 10
+COUNT_FREE 10
+SUM_NUMBER_OF_BYTES_ALLOC 1360
+SUM_NUMBER_OF_BYTES_FREE 1360
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 10
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 1360
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 16
+COUNT_FREE 15
+SUM_NUMBER_OF_BYTES_ALLOC 35216
+SUM_NUMBER_OF_BYTES_FREE 35120
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 16
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 35216
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 2
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.memory_summary_global_by_event_name;
+"================== MEMORY_GLOBAL truncated =================="
+"================== Step 18 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user1
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user2
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user3
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+USER user4
+HOST localhost
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+execute dump_memory_user;
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 2
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 32768
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 2
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 32768
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 2
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.accounts;
+"================== ACCOUNTS truncated =================="
+"================== Step 19 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 2
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 32768
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 2
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 32768
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.users;
+"================== USERS truncated =================="
+"================== Step 20 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 2
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 32768
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 2
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 32768
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.hosts;
+"================== HOSTS truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username user1
+status not found
+username user2
+status not found
+username user3
+status not found
+username user4
+status not found
+execute dump_memory_account;
+execute dump_memory_user;
+execute dump_memory_host;
+execute dump_memory_global;
+EVENT_NAME memory/sql/Query_cache
+COUNT_ALLOC 2
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 32768
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 2
+CURRENT_COUNT_USED 2
+HIGH_COUNT_USED 2
+LOW_NUMBER_OF_BYTES_USED 32768
+CURRENT_NUMBER_OF_BYTES_USED 32768
+HIGH_NUMBER_OF_BYTES_USED 32768
+EVENT_NAME memory/sql/User_level_lock
+COUNT_ALLOC 0
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 0
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 0
+CURRENT_COUNT_USED 0
+HIGH_COUNT_USED 0
+LOW_NUMBER_OF_BYTES_USED 0
+CURRENT_NUMBER_OF_BYTES_USED 0
+HIGH_NUMBER_OF_BYTES_USED 0
+EVENT_NAME memory/sql/user_var_entry::value
+COUNT_ALLOC 1
+COUNT_FREE 0
+SUM_NUMBER_OF_BYTES_ALLOC 96
+SUM_NUMBER_OF_BYTES_FREE 0
+LOW_COUNT_USED 1
+CURRENT_COUNT_USED 1
+HIGH_COUNT_USED 1
+LOW_NUMBER_OF_BYTES_USED 96
+CURRENT_NUMBER_OF_BYTES_USED 96
+HIGH_NUMBER_OF_BYTES_USED 96
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
diff --git a/mysql-test/suite/perfschema/r/memory_table_io.result b/mysql-test/suite/perfschema/r/memory_table_io.result
index 7942015f618..033c355dfa3 100644
--- a/mysql-test/suite/perfschema/r/memory_table_io.result
+++ b/mysql-test/suite/perfschema/r/memory_table_io.result
@@ -70,65 +70,69 @@ where event_name like 'wait/io/table/%'
and object_schema in ("test")
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 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
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab delete NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab 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 no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab 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
-show status where Variable_name like 'performance_schema_%' and
-Variable_name not like 'performance_schema_%_classes_lost';
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test no_index_tab insert 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test no_index_tab insert 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test no_index_tab insert 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 3
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 1
+wait/io/table/sql/handler TABLE test no_index_tab update 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 1
+wait/io/table/sql/handler TABLE test no_index_tab update 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 1
+wait/io/table/sql/handler TABLE test no_index_tab update 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 2
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 1
+wait/io/table/sql/handler TABLE test no_index_tab delete 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 2
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 2
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test marker insert 1
+show global status like 'performance_schema_%';
Variable_name Value
Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
Performance_schema_cond_instances_lost 0
Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
Performance_schema_file_handles_lost 0
Performance_schema_file_instances_lost 0
Performance_schema_hosts_lost 0
+Performance_schema_index_stat_lost 0
Performance_schema_locker_lost 0
+Performance_schema_memory_classes_lost 0
+Performance_schema_metadata_lock_lost 0
+Performance_schema_mutex_classes_lost 0
Performance_schema_mutex_instances_lost 0
+Performance_schema_nested_statement_lost 0
+Performance_schema_prepared_statements_lost 0
+Performance_schema_program_lost 0
+Performance_schema_rwlock_classes_lost 0
Performance_schema_rwlock_instances_lost 0
Performance_schema_session_connect_attrs_lost 0
+Performance_schema_socket_classes_lost 0
Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
Performance_schema_table_handles_lost 0
Performance_schema_table_instances_lost 0
+Performance_schema_table_lock_stat_lost 0
+Performance_schema_thread_classes_lost 0
Performance_schema_thread_instances_lost 0
Performance_schema_users_lost 0
truncate performance_schema.events_waits_history_long;
diff --git a/mysql-test/suite/perfschema/r/merge_table_io.result b/mysql-test/suite/perfschema/r/merge_table_io.result
index d390ba67b5f..e65cc45dc84 100644
--- a/mysql-test/suite/perfschema/r/merge_table_io.result
+++ b/mysql-test/suite/perfschema/r/merge_table_io.result
@@ -96,69 +96,75 @@ where event_name like 'wait/io/table/%'
and object_schema in ("test")
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 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
-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
-wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab delete NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab 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 no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab 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
-wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
-show status where Variable_name like 'performance_schema_%' and
-Variable_name not like 'performance_schema_%_classes_lost';
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test no_index_tab insert 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test no_index_tab insert 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test no_index_tab insert 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 3
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 1
+wait/io/table/sql/handler TABLE test no_index_tab update 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 1
+wait/io/table/sql/handler TABLE test no_index_tab update 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 1
+wait/io/table/sql/handler TABLE test no_index_tab update 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 2
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 1
+wait/io/table/sql/handler TABLE test no_index_tab delete 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 2
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 2
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test marker insert 1
+show global status like 'performance_schema_%';
Variable_name Value
Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
Performance_schema_cond_instances_lost 0
Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
Performance_schema_file_handles_lost 0
Performance_schema_file_instances_lost 0
Performance_schema_hosts_lost 0
+Performance_schema_index_stat_lost 0
Performance_schema_locker_lost 0
+Performance_schema_memory_classes_lost 0
+Performance_schema_metadata_lock_lost 0
+Performance_schema_mutex_classes_lost 0
Performance_schema_mutex_instances_lost 0
+Performance_schema_nested_statement_lost 0
+Performance_schema_prepared_statements_lost 0
+Performance_schema_program_lost 0
+Performance_schema_rwlock_classes_lost 0
Performance_schema_rwlock_instances_lost 0
Performance_schema_session_connect_attrs_lost 0
+Performance_schema_socket_classes_lost 0
Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
Performance_schema_table_handles_lost 0
Performance_schema_table_instances_lost 0
+Performance_schema_table_lock_stat_lost 0
+Performance_schema_thread_classes_lost 0
Performance_schema_thread_instances_lost 0
Performance_schema_users_lost 0
truncate performance_schema.events_waits_history_long;
diff --git a/mysql-test/suite/perfschema/r/misc.result b/mysql-test/suite/perfschema/r/misc.result
index 2e4d21d625a..83ca6d5cf3f 100644
--- a/mysql-test/suite/perfschema/r/misc.result
+++ b/mysql-test/suite/perfschema/r/misc.result
@@ -92,6 +92,20 @@ object_schema object_name index_name count_fetch count_insert count_update count
test t_60905 i 2 0 0 1
test t_60905 NULL 5 5 0 1
DROP TABLE t_60905;
+show global variables like "performance_schema_max_thread_instances";
+Variable_name Value
+performance_schema_max_thread_instances 200
+explain select * from performance_schema.threads;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE threads ALL NULL NULL NULL NULL 256
+use performance_schema;
+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
+show events from performance_schema;
+Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
+show events where Db= 'performance_schema';
+Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
+use test;
use test;
truncate performance_schema.events_statements_history;
truncate performance_schema.events_statements_history_long;
@@ -102,7 +116,7 @@ select mysql_errno, returned_sqlstate, message_text, errors, warnings
from performance_schema.events_statements_history where errors > 0;
mysql_errno returned_sqlstate message_text errors warnings
1146 42S02 Table 'test.t1' doesn't exist 1 0
-
+#
select mysql_errno, returned_sqlstate, message_text, errors, warnings from
performance_schema.events_statements_history_long where errors > 0;
mysql_errno returned_sqlstate message_text errors warnings
@@ -150,3 +164,13 @@ Warnings:
Note 1051 Unknown table 'test.t0'
FLUSH TABLE t0;
DROP TABLE t0;
+#
+# MDEV-24364 Alter rename table does not remove PFS share
+#
+create or replace table yt4 (x int) engine innodb;
+alter table yt4 rename to t1, algorithm=copy;
+drop tables t1;
+select object_type, object_schema, object_name
+from performance_schema.objects_summary_global_by_type
+where object_schema="test";
+object_type object_schema object_name
diff --git a/mysql-test/suite/perfschema/r/multi_table_io.result b/mysql-test/suite/perfschema/r/multi_table_io.result
index 929e1791c61..54dc0fba3d1 100644
--- a/mysql-test/suite/perfschema/r/multi_table_io.result
+++ b/mysql-test/suite/perfschema/r/multi_table_io.result
@@ -52,42 +52,56 @@ where event_name like 'wait/io/table/%'
and object_schema in ('test','test1')
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 test t1 fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test1 t2 insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test t1 fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test1 t2 fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test t1 fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test1 t2 fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test t1 fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test1 t2 fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test t1 update NULL
-wait/io/table/sql/handler handler.cc: TABLE test1 t2 fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test1 t2 update NULL
-wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test t1 fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test1 t2 fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test t1 delete NULL
-wait/io/table/sql/handler handler.cc: TABLE test1 t2 fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test1 t2 delete NULL
-show status where Variable_name like 'performance_schema_%' and
-Variable_name not like 'performance_schema_%_classes_lost';
+wait/io/table/sql/handler TABLE test t1 fetch 1
+wait/io/table/sql/handler TABLE test1 t2 insert 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test t1 fetch 1
+wait/io/table/sql/handler TABLE test1 t2 fetch 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test t1 fetch 1
+wait/io/table/sql/handler TABLE test1 t2 fetch 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test t1 fetch 1
+wait/io/table/sql/handler TABLE test1 t2 fetch 1
+wait/io/table/sql/handler TABLE test t1 update 1
+wait/io/table/sql/handler TABLE test1 t2 fetch 1
+wait/io/table/sql/handler TABLE test1 t2 update 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test t1 fetch 1
+wait/io/table/sql/handler TABLE test1 t2 fetch 1
+wait/io/table/sql/handler TABLE test t1 delete 1
+wait/io/table/sql/handler TABLE test1 t2 fetch 1
+wait/io/table/sql/handler TABLE test1 t2 delete 1
+show global status like 'performance_schema_%';
Variable_name Value
Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
Performance_schema_cond_instances_lost 0
Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
Performance_schema_file_handles_lost 0
Performance_schema_file_instances_lost 0
Performance_schema_hosts_lost 0
+Performance_schema_index_stat_lost 0
Performance_schema_locker_lost 0
+Performance_schema_memory_classes_lost 0
+Performance_schema_metadata_lock_lost 0
+Performance_schema_mutex_classes_lost 0
Performance_schema_mutex_instances_lost 0
+Performance_schema_nested_statement_lost 0
+Performance_schema_prepared_statements_lost 0
+Performance_schema_program_lost 0
+Performance_schema_rwlock_classes_lost 0
Performance_schema_rwlock_instances_lost 0
Performance_schema_session_connect_attrs_lost 0
+Performance_schema_socket_classes_lost 0
Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
Performance_schema_table_handles_lost 0
Performance_schema_table_instances_lost 0
+Performance_schema_table_lock_stat_lost 0
+Performance_schema_thread_classes_lost 0
Performance_schema_thread_instances_lost 0
Performance_schema_users_lost 0
truncate performance_schema.events_waits_history_long;
diff --git a/mysql-test/suite/perfschema/r/myisam_file_io.result b/mysql-test/suite/perfschema/r/myisam_file_io.result
index ea1e0bd52b8..ec03a16e8a1 100644
--- a/mysql-test/suite/perfschema/r/myisam_file_io.result
+++ b/mysql-test/suite/perfschema/r/myisam_file_io.result
@@ -21,29 +21,29 @@ where operation not like "tell"
having short_name <> ""
order by thread_id, event_id;
event_name short_source operation number_of_bytes short_name
-wait/io/file/myisam/kfile mi_create.c: create NULL no_index_tab.MYI
-wait/io/file/myisam/dfile mi_create.c: create NULL no_index_tab.MYD
-wait/io/file/myisam/kfile mi_open.c: write 176 no_index_tab.MYI
-wait/io/file/myisam/kfile mi_open.c: write 100 no_index_tab.MYI
-wait/io/file/myisam/kfile mi_open.c: write 7 no_index_tab.MYI
-wait/io/file/myisam/kfile mi_open.c: write 7 no_index_tab.MYI
-wait/io/file/myisam/kfile mi_open.c: write 7 no_index_tab.MYI
-wait/io/file/myisam/kfile mi_create.c: chsize 1024 no_index_tab.MYI
-wait/io/file/myisam/dfile mi_create.c: close NULL no_index_tab.MYD
-wait/io/file/myisam/kfile mi_create.c: close NULL no_index_tab.MYI
-wait/io/file/myisam/kfile mi_open.c: open NULL no_index_tab.MYI
-wait/io/file/myisam/kfile mi_open.c: read 24 no_index_tab.MYI
-wait/io/file/myisam/kfile mi_open.c: seek NULL no_index_tab.MYI
-wait/io/file/myisam/kfile mi_open.c: read 297 no_index_tab.MYI
-wait/io/file/myisam/dfile mi_open.c: open NULL no_index_tab.MYD
-wait/io/file/myisam/kfile mi_locking.c: write 3 no_index_tab.MYI
-wait/io/file/myisam/dfile mi_dynrec.c: write 20 no_index_tab.MYD
-wait/io/file/myisam/kfile mi_open.c: write 124 no_index_tab.MYI
-wait/io/file/myisam/dfile mi_dynrec.c: write 20 no_index_tab.MYD
-wait/io/file/myisam/kfile mi_open.c: write 124 no_index_tab.MYI
-wait/io/file/myisam/dfile mi_dynrec.c: write 20 no_index_tab.MYD
-wait/io/file/myisam/kfile mi_open.c: write 124 no_index_tab.MYI
-show status like 'performance_schema_%';
+wait/io/file/myisam/kfile create NULL no_index_tab.MYI
+wait/io/file/myisam/dfile create NULL no_index_tab.MYD
+wait/io/file/myisam/kfile write 176 no_index_tab.MYI
+wait/io/file/myisam/kfile write 100 no_index_tab.MYI
+wait/io/file/myisam/kfile write 7 no_index_tab.MYI
+wait/io/file/myisam/kfile write 7 no_index_tab.MYI
+wait/io/file/myisam/kfile write 7 no_index_tab.MYI
+wait/io/file/myisam/kfile chsize 1024 no_index_tab.MYI
+wait/io/file/myisam/dfile close NULL no_index_tab.MYD
+wait/io/file/myisam/kfile close NULL no_index_tab.MYI
+wait/io/file/myisam/kfile open NULL no_index_tab.MYI
+wait/io/file/myisam/kfile read 24 no_index_tab.MYI
+wait/io/file/myisam/kfile seek NULL no_index_tab.MYI
+wait/io/file/myisam/kfile read 297 no_index_tab.MYI
+wait/io/file/myisam/dfile open NULL no_index_tab.MYD
+wait/io/file/myisam/kfile write 3 no_index_tab.MYI
+wait/io/file/myisam/dfile write 20 no_index_tab.MYD
+wait/io/file/myisam/kfile write 124 no_index_tab.MYI
+wait/io/file/myisam/dfile write 20 no_index_tab.MYD
+wait/io/file/myisam/kfile write 124 no_index_tab.MYI
+wait/io/file/myisam/dfile write 20 no_index_tab.MYD
+wait/io/file/myisam/kfile write 124 no_index_tab.MYI
+show global status like 'performance_schema_%';
Variable_name Value
Performance_schema_accounts_lost 0
Performance_schema_cond_classes_lost 0
@@ -53,9 +53,15 @@ Performance_schema_file_classes_lost 0
Performance_schema_file_handles_lost 0
Performance_schema_file_instances_lost 0
Performance_schema_hosts_lost 0
+Performance_schema_index_stat_lost 0
Performance_schema_locker_lost 0
+Performance_schema_memory_classes_lost 0
+Performance_schema_metadata_lock_lost 0
Performance_schema_mutex_classes_lost 0
Performance_schema_mutex_instances_lost 0
+Performance_schema_nested_statement_lost 0
+Performance_schema_prepared_statements_lost 0
+Performance_schema_program_lost 0
Performance_schema_rwlock_classes_lost 0
Performance_schema_rwlock_instances_lost 0
Performance_schema_session_connect_attrs_lost 0
@@ -65,6 +71,7 @@ Performance_schema_stage_classes_lost 0
Performance_schema_statement_classes_lost 0
Performance_schema_table_handles_lost 0
Performance_schema_table_instances_lost 0
+Performance_schema_table_lock_stat_lost 0
Performance_schema_thread_classes_lost 0
Performance_schema_thread_instances_lost 0
Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/myisam_table_io.result b/mysql-test/suite/perfschema/r/myisam_table_io.result
index 97a099581d4..9e5d95683ed 100644
--- a/mysql-test/suite/perfschema/r/myisam_table_io.result
+++ b/mysql-test/suite/perfschema/r/myisam_table_io.result
@@ -70,63 +70,69 @@ where event_name like 'wait/io/table/%'
and object_schema in ("test")
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 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
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab delete NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab 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 no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab 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
-show status where Variable_name like 'performance_schema_%' and
-Variable_name not like 'performance_schema_%_classes_lost';
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test no_index_tab insert 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test no_index_tab insert 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test no_index_tab insert 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 3
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 1
+wait/io/table/sql/handler TABLE test no_index_tab update 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 1
+wait/io/table/sql/handler TABLE test no_index_tab update 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 1
+wait/io/table/sql/handler TABLE test no_index_tab update 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 2
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 1
+wait/io/table/sql/handler TABLE test no_index_tab delete 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 2
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 2
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test marker insert 1
+show global status like 'performance_schema_%';
Variable_name Value
Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
Performance_schema_cond_instances_lost 0
Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
Performance_schema_file_handles_lost 0
Performance_schema_file_instances_lost 0
Performance_schema_hosts_lost 0
+Performance_schema_index_stat_lost 0
Performance_schema_locker_lost 0
+Performance_schema_memory_classes_lost 0
+Performance_schema_metadata_lock_lost 0
+Performance_schema_mutex_classes_lost 0
Performance_schema_mutex_instances_lost 0
+Performance_schema_nested_statement_lost 0
+Performance_schema_prepared_statements_lost 0
+Performance_schema_program_lost 0
+Performance_schema_rwlock_classes_lost 0
Performance_schema_rwlock_instances_lost 0
Performance_schema_session_connect_attrs_lost 0
+Performance_schema_socket_classes_lost 0
Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
Performance_schema_table_handles_lost 0
Performance_schema_table_instances_lost 0
+Performance_schema_table_lock_stat_lost 0
+Performance_schema_thread_classes_lost 0
Performance_schema_thread_instances_lost 0
Performance_schema_users_lost 0
truncate performance_schema.events_waits_history_long;
diff --git a/mysql-test/suite/perfschema/r/nesting.result b/mysql-test/suite/perfschema/r/nesting.result
index 6f0030489f6..ba655d3c329 100644
--- a/mysql-test/suite/perfschema/r/nesting.result
+++ b/mysql-test/suite/perfschema/r/nesting.result
@@ -40,7 +40,7 @@ where sql_text like "%MARKER_END%" and thread_id = @con1_tid);
select (@marker_end is not null) as expected;
expected
1
-show status like "performance_schema%";
+show global status like "performance_schema%";
Variable_name Value
Performance_schema_accounts_lost 0
Performance_schema_cond_classes_lost 0
@@ -50,9 +50,15 @@ Performance_schema_file_classes_lost 0
Performance_schema_file_handles_lost 0
Performance_schema_file_instances_lost 0
Performance_schema_hosts_lost 0
+Performance_schema_index_stat_lost 0
Performance_schema_locker_lost 0
+Performance_schema_memory_classes_lost 0
+Performance_schema_metadata_lock_lost 0
Performance_schema_mutex_classes_lost 0
Performance_schema_mutex_instances_lost 0
+Performance_schema_nested_statement_lost 0
+Performance_schema_prepared_statements_lost 0
+Performance_schema_program_lost 0
Performance_schema_rwlock_classes_lost 0
Performance_schema_rwlock_instances_lost 0
Performance_schema_session_connect_attrs_lost 0
@@ -62,6 +68,7 @@ Performance_schema_stage_classes_lost 0
Performance_schema_statement_classes_lost 0
Performance_schema_table_handles_lost 0
Performance_schema_table_instances_lost 0
+Performance_schema_table_lock_stat_lost 0
Performance_schema_thread_classes_lost 0
Performance_schema_thread_instances_lost 0
Performance_schema_users_lost 0
@@ -108,21 +115,21 @@ and (end_event_id <= @marker_end)
order by relative_event_id asc;
relative_event_id relative_end_event_id event_name comment nesting_event_type relative_nesting_event_id
0 21 statement/sql/select select "MARKER_BEGIN" as marker NULL NULL
-1 5 stage/sql/Init (stage) STATEMENT 0
+1 5 stage/sql/starting (stage) STATEMENT 0
2 2 wait/io/socket/sql/client_connection recv STAGE 1
3 3 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 1
4 4 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 1
5 5 wait/io/file/sql/query_log write STAGE 1
-6 6 stage/sql/Checking permissions (stage) STATEMENT 0
+6 6 stage/sql/checking permissions (stage) STATEMENT 0
7 7 stage/sql/Opening tables (stage) STATEMENT 0
8 8 stage/sql/After opening tables (stage) STATEMENT 0
-9 9 stage/sql/Init (stage) STATEMENT 0
+9 9 stage/sql/init (stage) STATEMENT 0
10 10 stage/sql/Optimizing (stage) STATEMENT 0
11 11 stage/sql/Executing (stage) STATEMENT 0
12 12 stage/sql/End of update loop (stage) STATEMENT 0
13 13 stage/sql/Query end (stage) STATEMENT 0
14 14 stage/sql/Commit (stage) STATEMENT 0
-15 15 stage/sql/Closing tables (stage) STATEMENT 0
+15 15 stage/sql/closing tables (stage) STATEMENT 0
16 16 stage/sql/Starting cleanup (stage) STATEMENT 0
17 17 stage/sql/Freeing items (stage) STATEMENT 0
18 18 wait/io/socket/sql/client_connection send STATEMENT 0
@@ -132,21 +139,21 @@ relative_event_id relative_end_event_id event_name comment nesting_event_type re
22 22 wait/synch/mutex/sql/THD::LOCK_thd_data lock STATEMENT 0
23 23 idle idle NULL NULL
24 45 statement/sql/select select "This is simple statement one" as payload NULL NULL
-25 29 stage/sql/Init (stage) STATEMENT 24
+25 29 stage/sql/starting (stage) STATEMENT 24
26 26 wait/io/socket/sql/client_connection recv STAGE 25
27 27 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 25
28 28 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 25
29 29 wait/io/file/sql/query_log write STAGE 25
-30 30 stage/sql/Checking permissions (stage) STATEMENT 24
+30 30 stage/sql/checking permissions (stage) STATEMENT 24
31 31 stage/sql/Opening tables (stage) STATEMENT 24
32 32 stage/sql/After opening tables (stage) STATEMENT 24
-33 33 stage/sql/Init (stage) STATEMENT 24
+33 33 stage/sql/init (stage) STATEMENT 24
34 34 stage/sql/Optimizing (stage) STATEMENT 24
35 35 stage/sql/Executing (stage) STATEMENT 24
36 36 stage/sql/End of update loop (stage) STATEMENT 24
37 37 stage/sql/Query end (stage) STATEMENT 24
38 38 stage/sql/Commit (stage) STATEMENT 24
-39 39 stage/sql/Closing tables (stage) STATEMENT 24
+39 39 stage/sql/closing tables (stage) STATEMENT 24
40 40 stage/sql/Starting cleanup (stage) STATEMENT 24
41 41 stage/sql/Freeing items (stage) STATEMENT 24
42 42 wait/io/socket/sql/client_connection send STATEMENT 24
@@ -156,21 +163,21 @@ relative_event_id relative_end_event_id event_name comment nesting_event_type re
46 46 wait/synch/mutex/sql/THD::LOCK_thd_data lock STATEMENT 24
47 47 idle idle NULL NULL
48 69 statement/sql/select select "This is simple statement two" as payload NULL NULL
-49 53 stage/sql/Init (stage) STATEMENT 48
+49 53 stage/sql/starting (stage) STATEMENT 48
50 50 wait/io/socket/sql/client_connection recv STAGE 49
51 51 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 49
52 52 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 49
53 53 wait/io/file/sql/query_log write STAGE 49
-54 54 stage/sql/Checking permissions (stage) STATEMENT 48
+54 54 stage/sql/checking permissions (stage) STATEMENT 48
55 55 stage/sql/Opening tables (stage) STATEMENT 48
56 56 stage/sql/After opening tables (stage) STATEMENT 48
-57 57 stage/sql/Init (stage) STATEMENT 48
+57 57 stage/sql/init (stage) STATEMENT 48
58 58 stage/sql/Optimizing (stage) STATEMENT 48
59 59 stage/sql/Executing (stage) STATEMENT 48
60 60 stage/sql/End of update loop (stage) STATEMENT 48
61 61 stage/sql/Query end (stage) STATEMENT 48
62 62 stage/sql/Commit (stage) STATEMENT 48
-63 63 stage/sql/Closing tables (stage) STATEMENT 48
+63 63 stage/sql/closing tables (stage) STATEMENT 48
64 64 stage/sql/Starting cleanup (stage) STATEMENT 48
65 65 stage/sql/Freeing items (stage) STATEMENT 48
66 66 wait/io/socket/sql/client_connection send STATEMENT 48
@@ -182,58 +189,58 @@ relative_event_id relative_end_event_id event_name comment nesting_event_type re
72 92 statement/sql/select select "This is the first part of a multi query" as payload;
select "And this is the second part of a multi query" as payload;
select "With a third part to make things complete" as payload NULL NULL
-73 78 stage/sql/Init (stage) STATEMENT 72
+73 78 stage/sql/starting (stage) STATEMENT 72
74 74 wait/io/socket/sql/client_connection recv STAGE 73
75 75 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 73
76 76 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 73
77 77 wait/io/file/sql/query_log write STAGE 73
78 78 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 73
-79 79 stage/sql/Checking permissions (stage) STATEMENT 72
+79 79 stage/sql/checking permissions (stage) STATEMENT 72
80 80 stage/sql/Opening tables (stage) STATEMENT 72
81 81 stage/sql/After opening tables (stage) STATEMENT 72
-82 82 stage/sql/Init (stage) STATEMENT 72
+82 82 stage/sql/init (stage) STATEMENT 72
83 83 stage/sql/Optimizing (stage) STATEMENT 72
84 84 stage/sql/Executing (stage) STATEMENT 72
85 85 stage/sql/End of update loop (stage) STATEMENT 72
86 86 stage/sql/Query end (stage) STATEMENT 72
87 87 stage/sql/Commit (stage) STATEMENT 72
-88 88 stage/sql/Closing tables (stage) STATEMENT 72
+88 88 stage/sql/closing tables (stage) STATEMENT 72
89 89 stage/sql/Starting cleanup (stage) STATEMENT 72
90 92 stage/sql/Freeing items (stage) STATEMENT 72
91 91 wait/io/socket/sql/client_connection send STAGE 90
92 92 wait/synch/mutex/sql/THD::LOCK_thd_kill lock STAGE 90
93 110 statement/sql/select select "And this is the second part of a multi query" as payload;
select "With a third part to make things complete" as payload NULL NULL
-94 96 stage/sql/Init (stage) STATEMENT 93
+94 96 stage/sql/starting (stage) STATEMENT 93
95 95 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 94
96 96 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 94
-97 97 stage/sql/Checking permissions (stage) STATEMENT 93
+97 97 stage/sql/checking permissions (stage) STATEMENT 93
98 98 stage/sql/Opening tables (stage) STATEMENT 93
99 99 stage/sql/After opening tables (stage) STATEMENT 93
-100 100 stage/sql/Init (stage) STATEMENT 93
+100 100 stage/sql/init (stage) STATEMENT 93
101 101 stage/sql/Optimizing (stage) STATEMENT 93
102 102 stage/sql/Executing (stage) STATEMENT 93
103 103 stage/sql/End of update loop (stage) STATEMENT 93
104 104 stage/sql/Query end (stage) STATEMENT 93
105 105 stage/sql/Commit (stage) STATEMENT 93
-106 106 stage/sql/Closing tables (stage) STATEMENT 93
+106 106 stage/sql/closing tables (stage) STATEMENT 93
107 107 stage/sql/Starting cleanup (stage) STATEMENT 93
108 110 stage/sql/Freeing items (stage) STATEMENT 93
109 109 wait/io/socket/sql/client_connection send STAGE 108
110 110 wait/synch/mutex/sql/THD::LOCK_thd_kill lock STAGE 108
111 129 statement/sql/select select "With a third part to make things complete" as payload NULL NULL
-112 113 stage/sql/Init (stage) STATEMENT 111
+112 113 stage/sql/starting (stage) STATEMENT 111
113 113 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 112
-114 114 stage/sql/Checking permissions (stage) STATEMENT 111
+114 114 stage/sql/checking permissions (stage) STATEMENT 111
115 115 stage/sql/Opening tables (stage) STATEMENT 111
116 116 stage/sql/After opening tables (stage) STATEMENT 111
-117 117 stage/sql/Init (stage) STATEMENT 111
+117 117 stage/sql/init (stage) STATEMENT 111
118 118 stage/sql/Optimizing (stage) STATEMENT 111
119 119 stage/sql/Executing (stage) STATEMENT 111
120 120 stage/sql/End of update loop (stage) STATEMENT 111
121 121 stage/sql/Query end (stage) STATEMENT 111
122 122 stage/sql/Commit (stage) STATEMENT 111
-123 123 stage/sql/Closing tables (stage) STATEMENT 111
+123 123 stage/sql/closing tables (stage) STATEMENT 111
124 124 stage/sql/Starting cleanup (stage) STATEMENT 111
125 125 stage/sql/Freeing items (stage) STATEMENT 111
126 126 wait/io/socket/sql/client_connection send STATEMENT 111
@@ -243,21 +250,21 @@ select "With a third part to make things complete" as payload NULL NULL
130 130 wait/synch/mutex/sql/THD::LOCK_thd_data lock STATEMENT 111
131 131 idle idle NULL NULL
132 153 statement/sql/select select "MARKER_END" as marker NULL NULL
-133 137 stage/sql/Init (stage) STATEMENT 132
+133 137 stage/sql/starting (stage) STATEMENT 132
134 134 wait/io/socket/sql/client_connection recv STAGE 133
135 135 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 133
136 136 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 133
137 137 wait/io/file/sql/query_log write STAGE 133
-138 138 stage/sql/Checking permissions (stage) STATEMENT 132
+138 138 stage/sql/checking permissions (stage) STATEMENT 132
139 139 stage/sql/Opening tables (stage) STATEMENT 132
140 140 stage/sql/After opening tables (stage) STATEMENT 132
-141 141 stage/sql/Init (stage) STATEMENT 132
+141 141 stage/sql/init (stage) STATEMENT 132
142 142 stage/sql/Optimizing (stage) STATEMENT 132
143 143 stage/sql/Executing (stage) STATEMENT 132
144 144 stage/sql/End of update loop (stage) STATEMENT 132
145 145 stage/sql/Query end (stage) STATEMENT 132
146 146 stage/sql/Commit (stage) STATEMENT 132
-147 147 stage/sql/Closing tables (stage) STATEMENT 132
+147 147 stage/sql/closing tables (stage) STATEMENT 132
148 148 stage/sql/Starting cleanup (stage) STATEMENT 132
149 149 stage/sql/Freeing items (stage) STATEMENT 132
150 150 wait/io/socket/sql/client_connection send STATEMENT 132
diff --git a/mysql-test/suite/perfschema/r/no_threads.result b/mysql-test/suite/perfschema/r/no_threads.result
index f78667f4f01..21991b15931 100644
--- a/mysql-test/suite/perfschema/r/no_threads.result
+++ b/mysql-test/suite/perfschema/r/no_threads.result
@@ -6,17 +6,20 @@ drop table if exists test.t1;
truncate table performance_schema.events_waits_current;
truncate table performance_schema.events_waits_history;
truncate table performance_schema.events_waits_history_long;
-show variables like "thread_handling";
+show global variables like "thread_handling";
Variable_name Value
thread_handling no-threads
+show status like "Performance_schema_thread_instances_lost";
+Variable_name Value
+Performance_schema_thread_instances_lost 0
create table test.t1(a int) engine=MYISAM;
-show variables like "performance_schema";
+show global variables like "performance_schema";
Variable_name Value
performance_schema ON
-show variables like "performance_schema_max_thread%";
+show global variables like "performance_schema_max_thread%";
Variable_name Value
performance_schema_max_thread_classes 50
-performance_schema_max_thread_instances 10
+performance_schema_max_thread_instances 50
select count(*) from performance_schema.threads
where name like "thread/sql/main";
count(*)
@@ -29,16 +32,16 @@ select event_name, operation,
left(source, locate(":", source)) as short_source
from performance_schema.events_waits_current;
event_name operation short_source
-wait/synch/mutex/mysys/THR_LOCK_myisam lock mi_create.c:
+wait/synch/mutex/mysys/THR_LOCK_myisam lock
select event_name, operation,
left(source, locate(":", source)) as short_source
from performance_schema.events_waits_history;
event_name operation short_source
-wait/synch/mutex/mysys/THR_LOCK_myisam lock mi_create.c:
+wait/synch/mutex/mysys/THR_LOCK_myisam lock
select event_name, operation,
left(source, locate(":", source)) as short_source
from performance_schema.events_waits_history_long;
event_name operation short_source
-wait/synch/mutex/mysys/THR_LOCK_myisam lock mi_create.c:
+wait/synch/mutex/mysys/THR_LOCK_myisam lock
update performance_schema.setup_instruments set enabled='YES';
drop table test.t1;
diff --git a/mysql-test/suite/perfschema/r/one_thread_per_con.result b/mysql-test/suite/perfschema/r/one_thread_per_con.result
index 03966ad8556..649243db831 100644
--- a/mysql-test/suite/perfschema/r/one_thread_per_con.result
+++ b/mysql-test/suite/perfschema/r/one_thread_per_con.result
@@ -8,7 +8,7 @@ drop table if exists test.t1;
drop table if exists test.t2;
drop table if exists test.t3;
truncate table performance_schema.events_waits_history_long;
-show variables like "thread_handling";
+show global variables like "thread_handling";
Variable_name Value
thread_handling one-thread-per-connection
connection con1;
@@ -20,19 +20,19 @@ create table test.t3(a int) engine=MYISAM;
connection default;
execute stmt_dump_events using @tid;
event_name short_source operation number_of_bytes
-wait/synch/mutex/mysys/THR_LOCK_myisam mi_create.c: lock NULL
+wait/synch/mutex/mysys/THR_LOCK_myisam lock NULL
execute stmt_dump_thread using @tid;
name
thread/sql/one_connection
execute stmt_dump_events using @tid;
event_name short_source operation number_of_bytes
-wait/synch/mutex/mysys/THR_LOCK_myisam mi_create.c: lock NULL
+wait/synch/mutex/mysys/THR_LOCK_myisam lock NULL
execute stmt_dump_thread using @tid;
name
thread/sql/one_connection
execute stmt_dump_events using @tid;
event_name short_source operation number_of_bytes
-wait/synch/mutex/mysys/THR_LOCK_myisam mi_create.c: lock NULL
+wait/synch/mutex/mysys/THR_LOCK_myisam lock NULL
execute stmt_dump_thread using @tid;
name
thread/sql/one_connection
diff --git a/mysql-test/suite/perfschema/r/ortho_iter.result b/mysql-test/suite/perfschema/r/ortho_iter.result
index dfd31a80b3f..9489c1049e5 100644
--- a/mysql-test/suite/perfschema/r/ortho_iter.result
+++ b/mysql-test/suite/perfschema/r/ortho_iter.result
@@ -3,14 +3,25 @@ truncate table performance_schema.events_statements_summary_by_digest;
flush status;
create procedure check_instrument(in instr_name varchar(128))
begin
+declare save_count_expected integer;
declare count_expected integer;
-declare count_actual integer;
+declare count_builtin_expected integer;
+declare count_global_expected integer;
declare is_wait integer;
+declare is_wait_file integer;
+declare is_wait_socket integer;
declare is_stage integer;
declare is_statement integer;
+declare is_transaction integer;
+declare is_memory integer;
declare is_wait_table integer;
+declare is_wait_file_table integer;
+declare is_wait_socket_table integer;
declare is_stage_table integer;
declare is_statement_table integer;
+declare is_transaction_table integer;
+declare is_memory_table integer;
+declare is_memory_global_table integer;
declare pfs_table_name varchar(64);
declare msg varchar(512);
declare msg_detail varchar(512);
@@ -21,19 +32,53 @@ declare debug integer default 0;
declare pfs_cursor CURSOR FOR
select table_name from information_schema.tables
where table_schema= 'performance_schema'
- and table_name like "events_%_by_event_name%"
+ and table_name like "%_by_event_name%"
order by table_name;
declare continue handler for sqlstate '02000'
set done = 1;
-select (instr_name like "wait/%") or (instr_name like "idle/%") into is_wait;
+select (instr_name like "wait/%") or (instr_name like "idle") into is_wait;
+select (instr_name like "wait/io/file/%") into is_wait_file;
+select (instr_name like "wait/io/socket/%") into is_wait_socket;
select (instr_name like "stage/%") into is_stage;
select (instr_name like "statement/%") into is_statement;
-select instr_name, is_wait, is_stage, is_statement;
+select (instr_name like "memory/%") into is_memory;
+select (instr_name like "transaction") into is_transaction;
+select instr_name, is_wait, is_wait_file, is_wait_socket, is_stage, is_statement, is_memory, is_transaction;
select count(name)
from performance_schema.setup_instruments
where (name like (concat(instr_name, "%")))
and (not name like "%/abstract/%")
-into count_expected;
+and (not name like "memory/performance_schema/%")
+into save_count_expected;
+select count(name)
+from performance_schema.setup_instruments
+where (name like (concat(instr_name, "%")))
+and (name like "memory/performance_schema/%")
+into count_builtin_expected;
+select count(name)
+from performance_schema.setup_instruments
+where (name like (concat(instr_name, "%")))
+and (name in (
+"memory/sql/buffered_logs",
+"memory/sql/sql_acl_mem",
+"memory/sql/sql_acl_memex",
+"memory/sql/acl_cache",
+"memory/sql/TABLE_SHARE::mem_root",
+"memory/sql/TABLE",
+"memory/sql/Query_cache",
+"memory/sql/native_functions",
+"memory/sql/Event_basic::mem_root",
+"memory/sql/root",
+"memory/sql/load_env_plugins",
+"memory/sql/plugin_ref",
+"memory/sql/plugin_mem_root",
+"memory/sql/plugin_bookmark",
+"memory/csv/TINA_SHARE",
+"memory/sql/tz_storage",
+"memory/sql/servers_cache",
+"memory/sql/udf_mem"
+ ))
+into count_global_expected;
set cmd_1= "select count(*) from (select distinct event_name from performance_schema.";
set cmd_2= concat(" where event_name like \"",
instr_name,
@@ -43,8 +88,22 @@ repeat
fetch pfs_cursor into pfs_table_name;
if not done then
select (pfs_table_name like "%waits%") into is_wait_table;
+select (pfs_table_name like "file_summary%") into is_wait_file_table;
+select (pfs_table_name like "socket_summary%") into is_wait_socket_table;
select (pfs_table_name like "%stages%") into is_stage_table;
select (pfs_table_name like "%statements%") into is_statement_table;
+select (pfs_table_name like "%memory%") into is_memory_table;
+select (pfs_table_name like "memory_summary_global_by_event_name") into is_memory_global_table;
+select (pfs_table_name like "%transaction%") into is_transaction_table;
+set count_expected = save_count_expected;
+if is_memory_global_table
+then
+set count_expected = save_count_expected + count_builtin_expected;
+end if;
+if is_memory_table = 1 and is_memory_global_table = 0
+then
+set count_expected = save_count_expected - count_global_expected;
+end if;
select concat("Checking table ", pfs_table_name, " ...") as status;
select concat(cmd_1, pfs_table_name, cmd_2) into @cmd;
if debug = 1
@@ -57,37 +116,101 @@ drop prepare stmt;
set msg_detail= concat("table ", pfs_table_name,
", instruments ", count_expected,
", found ", @count_actual);
-if is_wait = 1 and is_wait_table = 1 and @count_actual <> count_expected
+if is_wait = 1
+then
+if is_wait_table = 1 and @count_actual <> count_expected
then
set msg= concat("Missing wait events: ", msg_detail);
signal sqlstate '05000' set message_text= msg;
end if;
-if is_wait = 1 and is_wait_table = 0 and @count_actual <> 0
+if is_wait_table = 0
+and is_wait_file_table = 0
+and is_wait_socket_table = 0
+and @count_actual <> 0
then
set msg= concat("Unexpected wait events: ", msg_detail);
signal sqlstate '05000' set message_text= msg;
end if;
-if is_stage = 1 and is_stage_table = 1 and @count_actual <> count_expected
+end if;
+if is_wait_file = 1
+then
+if is_wait_file_table = 1 and @count_actual <> count_expected
+then
+set msg= concat("Missing wait/io/file events: ", msg_detail);
+signal sqlstate '05000' set message_text= msg;
+end if;
+if is_wait_table = 0 and is_wait_file_table = 0 and @count_actual <> 0
+then
+set msg= concat("Unexpected wait/io/file events: ", msg_detail);
+signal sqlstate '05000' set message_text= msg;
+end if;
+end if;
+if is_wait_socket = 1
+then
+if is_wait_socket_table = 1 and @count_actual <> count_expected
+then
+set msg= concat("Missing wait/io/socket events: ", msg_detail);
+signal sqlstate '05000' set message_text= msg;
+end if;
+if is_wait_table = 0 and is_wait_socket_table = 0 and @count_actual <> 0
+then
+set msg= concat("Unexpected wait/io/socket events: ", msg_detail);
+signal sqlstate '05000' set message_text= msg;
+end if;
+end if;
+if is_stage = 1
+then
+if is_stage_table = 1 and @count_actual <> count_expected
then
set msg= concat("Missing stage events: ", msg_detail);
signal sqlstate '05000' set message_text= msg;
end if;
-if is_stage = 1 and is_stage_table = 0 and @count_actual <> 0
+if is_stage_table = 0 and @count_actual <> 0
then
set msg= concat("Unexpected stage events: ", msg_detail);
signal sqlstate '05000' set message_text= msg;
end if;
-if is_statement = 1 and is_statement_table = 1 and @count_actual <> count_expected
+end if;
+if is_statement = 1
+then
+if is_statement_table = 1 and @count_actual <> count_expected
then
set msg= concat("Missing statement events: ", msg_detail);
signal sqlstate '05000' set message_text= msg;
end if;
-if is_statement = 1 and is_statement_table = 0 and @count_actual <> 0
+if is_statement_table = 0 and @count_actual <> 0
then
set msg= concat("Unexpected statement events: ", msg_detail);
signal sqlstate '05000' set message_text= msg;
end if;
end if;
+if is_memory = 1
+then
+if is_memory_table = 1 and @count_actual <> count_expected
+then
+set msg= concat("Missing memory events: ", msg_detail);
+signal sqlstate '05000' set message_text= msg;
+end if;
+if is_memory_table = 0 and @count_actual <> 0
+then
+set msg= concat("Unexpected memory events: ", msg_detail);
+signal sqlstate '05000' set message_text= msg;
+end if;
+end if;
+if is_transaction = 1
+then
+if is_transaction_table = 1 and @count_actual <> count_expected
+then
+set msg= concat("Missing transaction events: ", msg_detail);
+signal sqlstate '05000' set message_text= msg;
+end if;
+if is_transaction_table = 0 and @count_actual <> 0
+then
+set msg= concat("Unexpected transaction events: ", msg_detail);
+signal sqlstate '05000' set message_text= msg;
+end if;
+end if;
+end if;
until done
end repeat;
close pfs_cursor;
@@ -97,9 +220,9 @@ end
$
Warnings:
Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
-show variables where
-`Variable_name` != "performance_schema_max_statement_classes" and
-`Variable_name` like "performance_schema%";
+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
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
+show global variables like "performance_schema%";
Variable_name Value
performance_schema ON
performance_schema_accounts_size 100
@@ -108,24 +231,35 @@ performance_schema_events_stages_history_long_size 1000
performance_schema_events_stages_history_size 10
performance_schema_events_statements_history_long_size 1000
performance_schema_events_statements_history_size 10
+performance_schema_events_transactions_history_long_size 1000
+performance_schema_events_transactions_history_size 10
performance_schema_events_waits_history_long_size 10000
performance_schema_events_waits_history_size 10
performance_schema_hosts_size 100
performance_schema_max_cond_classes 90
performance_schema_max_cond_instances 1000
performance_schema_max_digest_length 1024
-performance_schema_max_file_classes 50
+performance_schema_max_file_classes 80
performance_schema_max_file_handles 32768
performance_schema_max_file_instances 10000
-performance_schema_max_mutex_classes 200
+performance_schema_max_index_stat 5000
+performance_schema_max_memory_classes 320
+performance_schema_max_metadata_locks 10000
+performance_schema_max_mutex_classes 210
performance_schema_max_mutex_instances 5000
-performance_schema_max_rwlock_classes 40
+performance_schema_max_prepared_statements_instances 100
+performance_schema_max_program_instances 5000
+performance_schema_max_rwlock_classes 50
performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
+performance_schema_max_sql_text_length 1024
performance_schema_max_stage_classes 160
+performance_schema_max_statement_classes 222
+performance_schema_max_statement_stack 10
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
+performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
performance_schema_max_thread_instances 200
performance_schema_session_connect_attrs_size 2048
@@ -133,8 +267,8 @@ performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
performance_schema_users_size 100
call check_instrument("wait/synch/mutex/");
-instr_name is_wait is_stage is_statement
-wait/synch/mutex/ 1 0 0
+instr_name is_wait is_wait_file is_wait_socket is_stage is_statement is_memory is_transaction
+wait/synch/mutex/ 1 0 0 0 0 0 0
status
Checking table events_stages_summary_by_account_by_event_name ...
status
@@ -156,6 +290,16 @@ Checking table events_statements_summary_by_user_by_event_name ...
status
Checking table events_statements_summary_global_by_event_name ...
status
+Checking table events_transactions_summary_by_account_by_event_name ...
+status
+Checking table events_transactions_summary_by_host_by_event_name ...
+status
+Checking table events_transactions_summary_by_thread_by_event_name ...
+status
+Checking table events_transactions_summary_by_user_by_event_name ...
+status
+Checking table events_transactions_summary_global_by_event_name ...
+status
Checking table events_waits_summary_by_account_by_event_name ...
status
Checking table events_waits_summary_by_host_by_event_name ...
@@ -165,11 +309,25 @@ status
Checking table events_waits_summary_by_user_by_event_name ...
status
Checking table events_waits_summary_global_by_event_name ...
+status
+Checking table file_summary_by_event_name ...
+status
+Checking table memory_summary_by_account_by_event_name ...
+status
+Checking table memory_summary_by_host_by_event_name ...
+status
+Checking table memory_summary_by_thread_by_event_name ...
+status
+Checking table memory_summary_by_user_by_event_name ...
+status
+Checking table memory_summary_global_by_event_name ...
+status
+Checking table socket_summary_by_event_name ...
Warnings:
Warning 12000 Done
call check_instrument("wait/synch/rwlock/");
-instr_name is_wait is_stage is_statement
-wait/synch/rwlock/ 1 0 0
+instr_name is_wait is_wait_file is_wait_socket is_stage is_statement is_memory is_transaction
+wait/synch/rwlock/ 1 0 0 0 0 0 0
status
Checking table events_stages_summary_by_account_by_event_name ...
status
@@ -191,6 +349,16 @@ Checking table events_statements_summary_by_user_by_event_name ...
status
Checking table events_statements_summary_global_by_event_name ...
status
+Checking table events_transactions_summary_by_account_by_event_name ...
+status
+Checking table events_transactions_summary_by_host_by_event_name ...
+status
+Checking table events_transactions_summary_by_thread_by_event_name ...
+status
+Checking table events_transactions_summary_by_user_by_event_name ...
+status
+Checking table events_transactions_summary_global_by_event_name ...
+status
Checking table events_waits_summary_by_account_by_event_name ...
status
Checking table events_waits_summary_by_host_by_event_name ...
@@ -200,11 +368,84 @@ status
Checking table events_waits_summary_by_user_by_event_name ...
status
Checking table events_waits_summary_global_by_event_name ...
+status
+Checking table file_summary_by_event_name ...
+status
+Checking table memory_summary_by_account_by_event_name ...
+status
+Checking table memory_summary_by_host_by_event_name ...
+status
+Checking table memory_summary_by_thread_by_event_name ...
+status
+Checking table memory_summary_by_user_by_event_name ...
+status
+Checking table memory_summary_global_by_event_name ...
+status
+Checking table socket_summary_by_event_name ...
+Warnings:
+Warning 12000 Done
+call check_instrument("wait/synch/sxlock/");
+instr_name is_wait is_wait_file is_wait_socket is_stage is_statement is_memory is_transaction
+wait/synch/sxlock/ 1 0 0 0 0 0 0
+status
+Checking table events_stages_summary_by_account_by_event_name ...
+status
+Checking table events_stages_summary_by_host_by_event_name ...
+status
+Checking table events_stages_summary_by_thread_by_event_name ...
+status
+Checking table events_stages_summary_by_user_by_event_name ...
+status
+Checking table events_stages_summary_global_by_event_name ...
+status
+Checking table events_statements_summary_by_account_by_event_name ...
+status
+Checking table events_statements_summary_by_host_by_event_name ...
+status
+Checking table events_statements_summary_by_thread_by_event_name ...
+status
+Checking table events_statements_summary_by_user_by_event_name ...
+status
+Checking table events_statements_summary_global_by_event_name ...
+status
+Checking table events_transactions_summary_by_account_by_event_name ...
+status
+Checking table events_transactions_summary_by_host_by_event_name ...
+status
+Checking table events_transactions_summary_by_thread_by_event_name ...
+status
+Checking table events_transactions_summary_by_user_by_event_name ...
+status
+Checking table events_transactions_summary_global_by_event_name ...
+status
+Checking table events_waits_summary_by_account_by_event_name ...
+status
+Checking table events_waits_summary_by_host_by_event_name ...
+status
+Checking table events_waits_summary_by_thread_by_event_name ...
+status
+Checking table events_waits_summary_by_user_by_event_name ...
+status
+Checking table events_waits_summary_global_by_event_name ...
+status
+Checking table file_summary_by_event_name ...
+status
+Checking table memory_summary_by_account_by_event_name ...
+status
+Checking table memory_summary_by_host_by_event_name ...
+status
+Checking table memory_summary_by_thread_by_event_name ...
+status
+Checking table memory_summary_by_user_by_event_name ...
+status
+Checking table memory_summary_global_by_event_name ...
+status
+Checking table socket_summary_by_event_name ...
Warnings:
Warning 12000 Done
call check_instrument("wait/synch/cond/");
-instr_name is_wait is_stage is_statement
-wait/synch/cond/ 1 0 0
+instr_name is_wait is_wait_file is_wait_socket is_stage is_statement is_memory is_transaction
+wait/synch/cond/ 1 0 0 0 0 0 0
status
Checking table events_stages_summary_by_account_by_event_name ...
status
@@ -226,6 +467,16 @@ Checking table events_statements_summary_by_user_by_event_name ...
status
Checking table events_statements_summary_global_by_event_name ...
status
+Checking table events_transactions_summary_by_account_by_event_name ...
+status
+Checking table events_transactions_summary_by_host_by_event_name ...
+status
+Checking table events_transactions_summary_by_thread_by_event_name ...
+status
+Checking table events_transactions_summary_by_user_by_event_name ...
+status
+Checking table events_transactions_summary_global_by_event_name ...
+status
Checking table events_waits_summary_by_account_by_event_name ...
status
Checking table events_waits_summary_by_host_by_event_name ...
@@ -235,11 +486,25 @@ status
Checking table events_waits_summary_by_user_by_event_name ...
status
Checking table events_waits_summary_global_by_event_name ...
+status
+Checking table file_summary_by_event_name ...
+status
+Checking table memory_summary_by_account_by_event_name ...
+status
+Checking table memory_summary_by_host_by_event_name ...
+status
+Checking table memory_summary_by_thread_by_event_name ...
+status
+Checking table memory_summary_by_user_by_event_name ...
+status
+Checking table memory_summary_global_by_event_name ...
+status
+Checking table socket_summary_by_event_name ...
Warnings:
Warning 12000 Done
call check_instrument("wait/synch/");
-instr_name is_wait is_stage is_statement
-wait/synch/ 1 0 0
+instr_name is_wait is_wait_file is_wait_socket is_stage is_statement is_memory is_transaction
+wait/synch/ 1 0 0 0 0 0 0
status
Checking table events_stages_summary_by_account_by_event_name ...
status
@@ -261,6 +526,16 @@ Checking table events_statements_summary_by_user_by_event_name ...
status
Checking table events_statements_summary_global_by_event_name ...
status
+Checking table events_transactions_summary_by_account_by_event_name ...
+status
+Checking table events_transactions_summary_by_host_by_event_name ...
+status
+Checking table events_transactions_summary_by_thread_by_event_name ...
+status
+Checking table events_transactions_summary_by_user_by_event_name ...
+status
+Checking table events_transactions_summary_global_by_event_name ...
+status
Checking table events_waits_summary_by_account_by_event_name ...
status
Checking table events_waits_summary_by_host_by_event_name ...
@@ -270,11 +545,25 @@ status
Checking table events_waits_summary_by_user_by_event_name ...
status
Checking table events_waits_summary_global_by_event_name ...
+status
+Checking table file_summary_by_event_name ...
+status
+Checking table memory_summary_by_account_by_event_name ...
+status
+Checking table memory_summary_by_host_by_event_name ...
+status
+Checking table memory_summary_by_thread_by_event_name ...
+status
+Checking table memory_summary_by_user_by_event_name ...
+status
+Checking table memory_summary_global_by_event_name ...
+status
+Checking table socket_summary_by_event_name ...
Warnings:
Warning 12000 Done
call check_instrument("wait/io/file/");
-instr_name is_wait is_stage is_statement
-wait/io/file/ 1 0 0
+instr_name is_wait is_wait_file is_wait_socket is_stage is_statement is_memory is_transaction
+wait/io/file/ 1 1 0 0 0 0 0
status
Checking table events_stages_summary_by_account_by_event_name ...
status
@@ -296,6 +585,16 @@ Checking table events_statements_summary_by_user_by_event_name ...
status
Checking table events_statements_summary_global_by_event_name ...
status
+Checking table events_transactions_summary_by_account_by_event_name ...
+status
+Checking table events_transactions_summary_by_host_by_event_name ...
+status
+Checking table events_transactions_summary_by_thread_by_event_name ...
+status
+Checking table events_transactions_summary_by_user_by_event_name ...
+status
+Checking table events_transactions_summary_global_by_event_name ...
+status
Checking table events_waits_summary_by_account_by_event_name ...
status
Checking table events_waits_summary_by_host_by_event_name ...
@@ -305,11 +604,25 @@ status
Checking table events_waits_summary_by_user_by_event_name ...
status
Checking table events_waits_summary_global_by_event_name ...
+status
+Checking table file_summary_by_event_name ...
+status
+Checking table memory_summary_by_account_by_event_name ...
+status
+Checking table memory_summary_by_host_by_event_name ...
+status
+Checking table memory_summary_by_thread_by_event_name ...
+status
+Checking table memory_summary_by_user_by_event_name ...
+status
+Checking table memory_summary_global_by_event_name ...
+status
+Checking table socket_summary_by_event_name ...
Warnings:
Warning 12000 Done
-call check_instrument("wait/io/net/");
-instr_name is_wait is_stage is_statement
-wait/io/net/ 1 0 0
+call check_instrument("wait/io/socket/");
+instr_name is_wait is_wait_file is_wait_socket is_stage is_statement is_memory is_transaction
+wait/io/socket/ 1 0 1 0 0 0 0
status
Checking table events_stages_summary_by_account_by_event_name ...
status
@@ -331,6 +644,16 @@ Checking table events_statements_summary_by_user_by_event_name ...
status
Checking table events_statements_summary_global_by_event_name ...
status
+Checking table events_transactions_summary_by_account_by_event_name ...
+status
+Checking table events_transactions_summary_by_host_by_event_name ...
+status
+Checking table events_transactions_summary_by_thread_by_event_name ...
+status
+Checking table events_transactions_summary_by_user_by_event_name ...
+status
+Checking table events_transactions_summary_global_by_event_name ...
+status
Checking table events_waits_summary_by_account_by_event_name ...
status
Checking table events_waits_summary_by_host_by_event_name ...
@@ -340,11 +663,25 @@ status
Checking table events_waits_summary_by_user_by_event_name ...
status
Checking table events_waits_summary_global_by_event_name ...
+status
+Checking table file_summary_by_event_name ...
+status
+Checking table memory_summary_by_account_by_event_name ...
+status
+Checking table memory_summary_by_host_by_event_name ...
+status
+Checking table memory_summary_by_thread_by_event_name ...
+status
+Checking table memory_summary_by_user_by_event_name ...
+status
+Checking table memory_summary_global_by_event_name ...
+status
+Checking table socket_summary_by_event_name ...
Warnings:
Warning 12000 Done
call check_instrument("wait/io/table/");
-instr_name is_wait is_stage is_statement
-wait/io/table/ 1 0 0
+instr_name is_wait is_wait_file is_wait_socket is_stage is_statement is_memory is_transaction
+wait/io/table/ 1 0 0 0 0 0 0
status
Checking table events_stages_summary_by_account_by_event_name ...
status
@@ -366,6 +703,16 @@ Checking table events_statements_summary_by_user_by_event_name ...
status
Checking table events_statements_summary_global_by_event_name ...
status
+Checking table events_transactions_summary_by_account_by_event_name ...
+status
+Checking table events_transactions_summary_by_host_by_event_name ...
+status
+Checking table events_transactions_summary_by_thread_by_event_name ...
+status
+Checking table events_transactions_summary_by_user_by_event_name ...
+status
+Checking table events_transactions_summary_global_by_event_name ...
+status
Checking table events_waits_summary_by_account_by_event_name ...
status
Checking table events_waits_summary_by_host_by_event_name ...
@@ -375,11 +722,25 @@ status
Checking table events_waits_summary_by_user_by_event_name ...
status
Checking table events_waits_summary_global_by_event_name ...
+status
+Checking table file_summary_by_event_name ...
+status
+Checking table memory_summary_by_account_by_event_name ...
+status
+Checking table memory_summary_by_host_by_event_name ...
+status
+Checking table memory_summary_by_thread_by_event_name ...
+status
+Checking table memory_summary_by_user_by_event_name ...
+status
+Checking table memory_summary_global_by_event_name ...
+status
+Checking table socket_summary_by_event_name ...
Warnings:
Warning 12000 Done
call check_instrument("wait/io/");
-instr_name is_wait is_stage is_statement
-wait/io/ 1 0 0
+instr_name is_wait is_wait_file is_wait_socket is_stage is_statement is_memory is_transaction
+wait/io/ 1 0 0 0 0 0 0
status
Checking table events_stages_summary_by_account_by_event_name ...
status
@@ -401,6 +762,16 @@ Checking table events_statements_summary_by_user_by_event_name ...
status
Checking table events_statements_summary_global_by_event_name ...
status
+Checking table events_transactions_summary_by_account_by_event_name ...
+status
+Checking table events_transactions_summary_by_host_by_event_name ...
+status
+Checking table events_transactions_summary_by_thread_by_event_name ...
+status
+Checking table events_transactions_summary_by_user_by_event_name ...
+status
+Checking table events_transactions_summary_global_by_event_name ...
+status
Checking table events_waits_summary_by_account_by_event_name ...
status
Checking table events_waits_summary_by_host_by_event_name ...
@@ -410,11 +781,25 @@ status
Checking table events_waits_summary_by_user_by_event_name ...
status
Checking table events_waits_summary_global_by_event_name ...
+status
+Checking table file_summary_by_event_name ...
+status
+Checking table memory_summary_by_account_by_event_name ...
+status
+Checking table memory_summary_by_host_by_event_name ...
+status
+Checking table memory_summary_by_thread_by_event_name ...
+status
+Checking table memory_summary_by_user_by_event_name ...
+status
+Checking table memory_summary_global_by_event_name ...
+status
+Checking table socket_summary_by_event_name ...
Warnings:
Warning 12000 Done
call check_instrument("wait/lock/table/");
-instr_name is_wait is_stage is_statement
-wait/lock/table/ 1 0 0
+instr_name is_wait is_wait_file is_wait_socket is_stage is_statement is_memory is_transaction
+wait/lock/table/ 1 0 0 0 0 0 0
status
Checking table events_stages_summary_by_account_by_event_name ...
status
@@ -436,6 +821,16 @@ Checking table events_statements_summary_by_user_by_event_name ...
status
Checking table events_statements_summary_global_by_event_name ...
status
+Checking table events_transactions_summary_by_account_by_event_name ...
+status
+Checking table events_transactions_summary_by_host_by_event_name ...
+status
+Checking table events_transactions_summary_by_thread_by_event_name ...
+status
+Checking table events_transactions_summary_by_user_by_event_name ...
+status
+Checking table events_transactions_summary_global_by_event_name ...
+status
Checking table events_waits_summary_by_account_by_event_name ...
status
Checking table events_waits_summary_by_host_by_event_name ...
@@ -445,11 +840,25 @@ status
Checking table events_waits_summary_by_user_by_event_name ...
status
Checking table events_waits_summary_global_by_event_name ...
+status
+Checking table file_summary_by_event_name ...
+status
+Checking table memory_summary_by_account_by_event_name ...
+status
+Checking table memory_summary_by_host_by_event_name ...
+status
+Checking table memory_summary_by_thread_by_event_name ...
+status
+Checking table memory_summary_by_user_by_event_name ...
+status
+Checking table memory_summary_global_by_event_name ...
+status
+Checking table socket_summary_by_event_name ...
Warnings:
Warning 12000 Done
call check_instrument("wait/lock/");
-instr_name is_wait is_stage is_statement
-wait/lock/ 1 0 0
+instr_name is_wait is_wait_file is_wait_socket is_stage is_statement is_memory is_transaction
+wait/lock/ 1 0 0 0 0 0 0
status
Checking table events_stages_summary_by_account_by_event_name ...
status
@@ -471,6 +880,16 @@ Checking table events_statements_summary_by_user_by_event_name ...
status
Checking table events_statements_summary_global_by_event_name ...
status
+Checking table events_transactions_summary_by_account_by_event_name ...
+status
+Checking table events_transactions_summary_by_host_by_event_name ...
+status
+Checking table events_transactions_summary_by_thread_by_event_name ...
+status
+Checking table events_transactions_summary_by_user_by_event_name ...
+status
+Checking table events_transactions_summary_global_by_event_name ...
+status
Checking table events_waits_summary_by_account_by_event_name ...
status
Checking table events_waits_summary_by_host_by_event_name ...
@@ -480,11 +899,25 @@ status
Checking table events_waits_summary_by_user_by_event_name ...
status
Checking table events_waits_summary_global_by_event_name ...
+status
+Checking table file_summary_by_event_name ...
+status
+Checking table memory_summary_by_account_by_event_name ...
+status
+Checking table memory_summary_by_host_by_event_name ...
+status
+Checking table memory_summary_by_thread_by_event_name ...
+status
+Checking table memory_summary_by_user_by_event_name ...
+status
+Checking table memory_summary_global_by_event_name ...
+status
+Checking table socket_summary_by_event_name ...
Warnings:
Warning 12000 Done
call check_instrument("wait/");
-instr_name is_wait is_stage is_statement
-wait/ 1 0 0
+instr_name is_wait is_wait_file is_wait_socket is_stage is_statement is_memory is_transaction
+wait/ 1 0 0 0 0 0 0
status
Checking table events_stages_summary_by_account_by_event_name ...
status
@@ -506,6 +939,16 @@ Checking table events_statements_summary_by_user_by_event_name ...
status
Checking table events_statements_summary_global_by_event_name ...
status
+Checking table events_transactions_summary_by_account_by_event_name ...
+status
+Checking table events_transactions_summary_by_host_by_event_name ...
+status
+Checking table events_transactions_summary_by_thread_by_event_name ...
+status
+Checking table events_transactions_summary_by_user_by_event_name ...
+status
+Checking table events_transactions_summary_global_by_event_name ...
+status
Checking table events_waits_summary_by_account_by_event_name ...
status
Checking table events_waits_summary_by_host_by_event_name ...
@@ -515,11 +958,25 @@ status
Checking table events_waits_summary_by_user_by_event_name ...
status
Checking table events_waits_summary_global_by_event_name ...
+status
+Checking table file_summary_by_event_name ...
+status
+Checking table memory_summary_by_account_by_event_name ...
+status
+Checking table memory_summary_by_host_by_event_name ...
+status
+Checking table memory_summary_by_thread_by_event_name ...
+status
+Checking table memory_summary_by_user_by_event_name ...
+status
+Checking table memory_summary_global_by_event_name ...
+status
+Checking table socket_summary_by_event_name ...
Warnings:
Warning 12000 Done
call check_instrument("stage/");
-instr_name is_wait is_stage is_statement
-stage/ 0 1 0
+instr_name is_wait is_wait_file is_wait_socket is_stage is_statement is_memory is_transaction
+stage/ 0 0 0 1 0 0 0
status
Checking table events_stages_summary_by_account_by_event_name ...
status
@@ -541,6 +998,16 @@ Checking table events_statements_summary_by_user_by_event_name ...
status
Checking table events_statements_summary_global_by_event_name ...
status
+Checking table events_transactions_summary_by_account_by_event_name ...
+status
+Checking table events_transactions_summary_by_host_by_event_name ...
+status
+Checking table events_transactions_summary_by_thread_by_event_name ...
+status
+Checking table events_transactions_summary_by_user_by_event_name ...
+status
+Checking table events_transactions_summary_global_by_event_name ...
+status
Checking table events_waits_summary_by_account_by_event_name ...
status
Checking table events_waits_summary_by_host_by_event_name ...
@@ -550,11 +1017,25 @@ status
Checking table events_waits_summary_by_user_by_event_name ...
status
Checking table events_waits_summary_global_by_event_name ...
+status
+Checking table file_summary_by_event_name ...
+status
+Checking table memory_summary_by_account_by_event_name ...
+status
+Checking table memory_summary_by_host_by_event_name ...
+status
+Checking table memory_summary_by_thread_by_event_name ...
+status
+Checking table memory_summary_by_user_by_event_name ...
+status
+Checking table memory_summary_global_by_event_name ...
+status
+Checking table socket_summary_by_event_name ...
Warnings:
Warning 12000 Done
call check_instrument("statement/com/");
-instr_name is_wait is_stage is_statement
-statement/com/ 0 0 1
+instr_name is_wait is_wait_file is_wait_socket is_stage is_statement is_memory is_transaction
+statement/com/ 0 0 0 0 1 0 0
status
Checking table events_stages_summary_by_account_by_event_name ...
status
@@ -576,6 +1057,16 @@ Checking table events_statements_summary_by_user_by_event_name ...
status
Checking table events_statements_summary_global_by_event_name ...
status
+Checking table events_transactions_summary_by_account_by_event_name ...
+status
+Checking table events_transactions_summary_by_host_by_event_name ...
+status
+Checking table events_transactions_summary_by_thread_by_event_name ...
+status
+Checking table events_transactions_summary_by_user_by_event_name ...
+status
+Checking table events_transactions_summary_global_by_event_name ...
+status
Checking table events_waits_summary_by_account_by_event_name ...
status
Checking table events_waits_summary_by_host_by_event_name ...
@@ -585,11 +1076,25 @@ status
Checking table events_waits_summary_by_user_by_event_name ...
status
Checking table events_waits_summary_global_by_event_name ...
+status
+Checking table file_summary_by_event_name ...
+status
+Checking table memory_summary_by_account_by_event_name ...
+status
+Checking table memory_summary_by_host_by_event_name ...
+status
+Checking table memory_summary_by_thread_by_event_name ...
+status
+Checking table memory_summary_by_user_by_event_name ...
+status
+Checking table memory_summary_global_by_event_name ...
+status
+Checking table socket_summary_by_event_name ...
Warnings:
Warning 12000 Done
call check_instrument("statement/sql/");
-instr_name is_wait is_stage is_statement
-statement/sql/ 0 0 1
+instr_name is_wait is_wait_file is_wait_socket is_stage is_statement is_memory is_transaction
+statement/sql/ 0 0 0 0 1 0 0
status
Checking table events_stages_summary_by_account_by_event_name ...
status
@@ -611,6 +1116,16 @@ Checking table events_statements_summary_by_user_by_event_name ...
status
Checking table events_statements_summary_global_by_event_name ...
status
+Checking table events_transactions_summary_by_account_by_event_name ...
+status
+Checking table events_transactions_summary_by_host_by_event_name ...
+status
+Checking table events_transactions_summary_by_thread_by_event_name ...
+status
+Checking table events_transactions_summary_by_user_by_event_name ...
+status
+Checking table events_transactions_summary_global_by_event_name ...
+status
Checking table events_waits_summary_by_account_by_event_name ...
status
Checking table events_waits_summary_by_host_by_event_name ...
@@ -620,11 +1135,25 @@ status
Checking table events_waits_summary_by_user_by_event_name ...
status
Checking table events_waits_summary_global_by_event_name ...
+status
+Checking table file_summary_by_event_name ...
+status
+Checking table memory_summary_by_account_by_event_name ...
+status
+Checking table memory_summary_by_host_by_event_name ...
+status
+Checking table memory_summary_by_thread_by_event_name ...
+status
+Checking table memory_summary_by_user_by_event_name ...
+status
+Checking table memory_summary_global_by_event_name ...
+status
+Checking table socket_summary_by_event_name ...
Warnings:
Warning 12000 Done
call check_instrument("statement/abstract/");
-instr_name is_wait is_stage is_statement
-statement/abstract/ 0 0 1
+instr_name is_wait is_wait_file is_wait_socket is_stage is_statement is_memory is_transaction
+statement/abstract/ 0 0 0 0 1 0 0
status
Checking table events_stages_summary_by_account_by_event_name ...
status
@@ -646,6 +1175,16 @@ Checking table events_statements_summary_by_user_by_event_name ...
status
Checking table events_statements_summary_global_by_event_name ...
status
+Checking table events_transactions_summary_by_account_by_event_name ...
+status
+Checking table events_transactions_summary_by_host_by_event_name ...
+status
+Checking table events_transactions_summary_by_thread_by_event_name ...
+status
+Checking table events_transactions_summary_by_user_by_event_name ...
+status
+Checking table events_transactions_summary_global_by_event_name ...
+status
Checking table events_waits_summary_by_account_by_event_name ...
status
Checking table events_waits_summary_by_host_by_event_name ...
@@ -655,11 +1194,25 @@ status
Checking table events_waits_summary_by_user_by_event_name ...
status
Checking table events_waits_summary_global_by_event_name ...
+status
+Checking table file_summary_by_event_name ...
+status
+Checking table memory_summary_by_account_by_event_name ...
+status
+Checking table memory_summary_by_host_by_event_name ...
+status
+Checking table memory_summary_by_thread_by_event_name ...
+status
+Checking table memory_summary_by_user_by_event_name ...
+status
+Checking table memory_summary_global_by_event_name ...
+status
+Checking table socket_summary_by_event_name ...
Warnings:
Warning 12000 Done
call check_instrument("statement/");
-instr_name is_wait is_stage is_statement
-statement/ 0 0 1
+instr_name is_wait is_wait_file is_wait_socket is_stage is_statement is_memory is_transaction
+statement/ 0 0 0 0 1 0 0
status
Checking table events_stages_summary_by_account_by_event_name ...
status
@@ -681,6 +1234,16 @@ Checking table events_statements_summary_by_user_by_event_name ...
status
Checking table events_statements_summary_global_by_event_name ...
status
+Checking table events_transactions_summary_by_account_by_event_name ...
+status
+Checking table events_transactions_summary_by_host_by_event_name ...
+status
+Checking table events_transactions_summary_by_thread_by_event_name ...
+status
+Checking table events_transactions_summary_by_user_by_event_name ...
+status
+Checking table events_transactions_summary_global_by_event_name ...
+status
Checking table events_waits_summary_by_account_by_event_name ...
status
Checking table events_waits_summary_by_host_by_event_name ...
@@ -690,11 +1253,25 @@ status
Checking table events_waits_summary_by_user_by_event_name ...
status
Checking table events_waits_summary_global_by_event_name ...
+status
+Checking table file_summary_by_event_name ...
+status
+Checking table memory_summary_by_account_by_event_name ...
+status
+Checking table memory_summary_by_host_by_event_name ...
+status
+Checking table memory_summary_by_thread_by_event_name ...
+status
+Checking table memory_summary_by_user_by_event_name ...
+status
+Checking table memory_summary_global_by_event_name ...
+status
+Checking table socket_summary_by_event_name ...
Warnings:
Warning 12000 Done
-call check_instrument("idle/io/socket");
-instr_name is_wait is_stage is_statement
-idle/io/socket 1 0 0
+call check_instrument("idle");
+instr_name is_wait is_wait_file is_wait_socket is_stage is_statement is_memory is_transaction
+idle 1 0 0 0 0 0 0
status
Checking table events_stages_summary_by_account_by_event_name ...
status
@@ -716,6 +1293,16 @@ Checking table events_statements_summary_by_user_by_event_name ...
status
Checking table events_statements_summary_global_by_event_name ...
status
+Checking table events_transactions_summary_by_account_by_event_name ...
+status
+Checking table events_transactions_summary_by_host_by_event_name ...
+status
+Checking table events_transactions_summary_by_thread_by_event_name ...
+status
+Checking table events_transactions_summary_by_user_by_event_name ...
+status
+Checking table events_transactions_summary_global_by_event_name ...
+status
Checking table events_waits_summary_by_account_by_event_name ...
status
Checking table events_waits_summary_by_host_by_event_name ...
@@ -725,11 +1312,25 @@ status
Checking table events_waits_summary_by_user_by_event_name ...
status
Checking table events_waits_summary_global_by_event_name ...
+status
+Checking table file_summary_by_event_name ...
+status
+Checking table memory_summary_by_account_by_event_name ...
+status
+Checking table memory_summary_by_host_by_event_name ...
+status
+Checking table memory_summary_by_thread_by_event_name ...
+status
+Checking table memory_summary_by_user_by_event_name ...
+status
+Checking table memory_summary_global_by_event_name ...
+status
+Checking table socket_summary_by_event_name ...
Warnings:
Warning 12000 Done
-call check_instrument("idle/");
-instr_name is_wait is_stage is_statement
-idle/ 1 0 0
+call check_instrument("memory/");
+instr_name is_wait is_wait_file is_wait_socket is_stage is_statement is_memory is_transaction
+memory/ 0 0 0 0 0 1 0
status
Checking table events_stages_summary_by_account_by_event_name ...
status
@@ -751,6 +1352,75 @@ Checking table events_statements_summary_by_user_by_event_name ...
status
Checking table events_statements_summary_global_by_event_name ...
status
+Checking table events_transactions_summary_by_account_by_event_name ...
+status
+Checking table events_transactions_summary_by_host_by_event_name ...
+status
+Checking table events_transactions_summary_by_thread_by_event_name ...
+status
+Checking table events_transactions_summary_by_user_by_event_name ...
+status
+Checking table events_transactions_summary_global_by_event_name ...
+status
+Checking table events_waits_summary_by_account_by_event_name ...
+status
+Checking table events_waits_summary_by_host_by_event_name ...
+status
+Checking table events_waits_summary_by_thread_by_event_name ...
+status
+Checking table events_waits_summary_by_user_by_event_name ...
+status
+Checking table events_waits_summary_global_by_event_name ...
+status
+Checking table file_summary_by_event_name ...
+status
+Checking table memory_summary_by_account_by_event_name ...
+status
+Checking table memory_summary_by_host_by_event_name ...
+status
+Checking table memory_summary_by_thread_by_event_name ...
+status
+Checking table memory_summary_by_user_by_event_name ...
+status
+Checking table memory_summary_global_by_event_name ...
+status
+Checking table socket_summary_by_event_name ...
+Warnings:
+Warning 12000 Done
+call check_instrument("memory/performance_schema/");
+instr_name is_wait is_wait_file is_wait_socket is_stage is_statement is_memory is_transaction
+memory/performance_schema/ 0 0 0 0 0 1 0
+status
+Checking table events_stages_summary_by_account_by_event_name ...
+status
+Checking table events_stages_summary_by_host_by_event_name ...
+status
+Checking table events_stages_summary_by_thread_by_event_name ...
+status
+Checking table events_stages_summary_by_user_by_event_name ...
+status
+Checking table events_stages_summary_global_by_event_name ...
+status
+Checking table events_statements_summary_by_account_by_event_name ...
+status
+Checking table events_statements_summary_by_host_by_event_name ...
+status
+Checking table events_statements_summary_by_thread_by_event_name ...
+status
+Checking table events_statements_summary_by_user_by_event_name ...
+status
+Checking table events_statements_summary_global_by_event_name ...
+status
+Checking table events_transactions_summary_by_account_by_event_name ...
+status
+Checking table events_transactions_summary_by_host_by_event_name ...
+status
+Checking table events_transactions_summary_by_thread_by_event_name ...
+status
+Checking table events_transactions_summary_by_user_by_event_name ...
+status
+Checking table events_transactions_summary_global_by_event_name ...
+status
Checking table events_waits_summary_by_account_by_event_name ...
status
Checking table events_waits_summary_by_host_by_event_name ...
@@ -760,6 +1430,79 @@ status
Checking table events_waits_summary_by_user_by_event_name ...
status
Checking table events_waits_summary_global_by_event_name ...
+status
+Checking table file_summary_by_event_name ...
+status
+Checking table memory_summary_by_account_by_event_name ...
+status
+Checking table memory_summary_by_host_by_event_name ...
+status
+Checking table memory_summary_by_thread_by_event_name ...
+status
+Checking table memory_summary_by_user_by_event_name ...
+status
+Checking table memory_summary_global_by_event_name ...
+status
+Checking table socket_summary_by_event_name ...
+Warnings:
+Warning 12000 Done
+call check_instrument("transaction");
+instr_name is_wait is_wait_file is_wait_socket is_stage is_statement is_memory is_transaction
+transaction 0 0 0 0 0 0 1
+status
+Checking table events_stages_summary_by_account_by_event_name ...
+status
+Checking table events_stages_summary_by_host_by_event_name ...
+status
+Checking table events_stages_summary_by_thread_by_event_name ...
+status
+Checking table events_stages_summary_by_user_by_event_name ...
+status
+Checking table events_stages_summary_global_by_event_name ...
+status
+Checking table events_statements_summary_by_account_by_event_name ...
+status
+Checking table events_statements_summary_by_host_by_event_name ...
+status
+Checking table events_statements_summary_by_thread_by_event_name ...
+status
+Checking table events_statements_summary_by_user_by_event_name ...
+status
+Checking table events_statements_summary_global_by_event_name ...
+status
+Checking table events_transactions_summary_by_account_by_event_name ...
+status
+Checking table events_transactions_summary_by_host_by_event_name ...
+status
+Checking table events_transactions_summary_by_thread_by_event_name ...
+status
+Checking table events_transactions_summary_by_user_by_event_name ...
+status
+Checking table events_transactions_summary_global_by_event_name ...
+status
+Checking table events_waits_summary_by_account_by_event_name ...
+status
+Checking table events_waits_summary_by_host_by_event_name ...
+status
+Checking table events_waits_summary_by_thread_by_event_name ...
+status
+Checking table events_waits_summary_by_user_by_event_name ...
+status
+Checking table events_waits_summary_global_by_event_name ...
+status
+Checking table file_summary_by_event_name ...
+status
+Checking table memory_summary_by_account_by_event_name ...
+status
+Checking table memory_summary_by_host_by_event_name ...
+status
+Checking table memory_summary_by_thread_by_event_name ...
+status
+Checking table memory_summary_by_user_by_event_name ...
+status
+Checking table memory_summary_global_by_event_name ...
+status
+Checking table socket_summary_by_event_name ...
Warnings:
Warning 12000 Done
drop procedure check_instrument;
diff --git a/mysql-test/suite/perfschema/r/part_table_io.result b/mysql-test/suite/perfschema/r/part_table_io.result
index 4f2bd7169d7..48b7c891693 100644
--- a/mysql-test/suite/perfschema/r/part_table_io.result
+++ b/mysql-test/suite/perfschema/r/part_table_io.result
@@ -73,62 +73,68 @@ where event_name like 'wait/io/table/%'
and object_schema in ("test")
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 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
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab delete NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab 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 no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab 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
-show status where Variable_name like 'performance_schema_%' and
-Variable_name not like 'performance_schema_%_classes_lost';
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test no_index_tab insert 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test no_index_tab insert 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test no_index_tab insert 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 3
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 1
+wait/io/table/sql/handler TABLE test no_index_tab update 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 1
+wait/io/table/sql/handler TABLE test no_index_tab update 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 1
+wait/io/table/sql/handler TABLE test no_index_tab update 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 2
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 1
+wait/io/table/sql/handler TABLE test no_index_tab delete 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 2
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 2
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test marker insert 1
+show global status like 'performance_schema_%';
Variable_name Value
Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
Performance_schema_cond_instances_lost 0
Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
Performance_schema_file_handles_lost 0
Performance_schema_file_instances_lost 0
Performance_schema_hosts_lost 0
+Performance_schema_index_stat_lost 0
Performance_schema_locker_lost 0
+Performance_schema_memory_classes_lost 0
+Performance_schema_metadata_lock_lost 0
+Performance_schema_mutex_classes_lost 0
Performance_schema_mutex_instances_lost 0
+Performance_schema_nested_statement_lost 0
+Performance_schema_prepared_statements_lost 0
+Performance_schema_program_lost 0
+Performance_schema_rwlock_classes_lost 0
Performance_schema_rwlock_instances_lost 0
Performance_schema_session_connect_attrs_lost 0
+Performance_schema_socket_classes_lost 0
Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
Performance_schema_table_handles_lost 0
Performance_schema_table_instances_lost 0
+Performance_schema_table_lock_stat_lost 0
+Performance_schema_thread_classes_lost 0
Performance_schema_thread_instances_lost 0
Performance_schema_users_lost 0
truncate performance_schema.events_waits_history_long;
diff --git a/mysql-test/suite/perfschema/r/pfs_upgrade_event.result b/mysql-test/suite/perfschema/r/pfs_upgrade_event.result
index cbaeec201e0..f4cf01406d3 100644
--- a/mysql-test/suite/perfschema/r/pfs_upgrade_event.result
+++ b/mysql-test/suite/perfschema/r/pfs_upgrade_event.result
@@ -1,4 +1,4 @@
-"Testing mysql_upgrade with EVENT performance_schema.user_event"
+# Testing mysql_upgrade with EVENT performance_schema.user_event
create event test.user_event on schedule every 1 day do
select "not supposed to be here";
Warnings:
diff --git a/mysql-test/suite/perfschema/r/pfs_upgrade_func.result b/mysql-test/suite/perfschema/r/pfs_upgrade_func.result
index b91cb5d14a8..92f2a18af2f 100644
--- a/mysql-test/suite/perfschema/r/pfs_upgrade_func.result
+++ b/mysql-test/suite/perfschema/r/pfs_upgrade_func.result
@@ -1,4 +1,4 @@
-"Testing mysql_upgrade with FUNCTION performance_schema.user_func"
+# Testing mysql_upgrade with FUNCTION performance_schema.user_func
create function test.user_func() returns integer
return 0;
update mysql.proc set db='performance_schema' where name='user_func';
diff --git a/mysql-test/suite/perfschema/r/pfs_upgrade_proc.result b/mysql-test/suite/perfschema/r/pfs_upgrade_proc.result
index 651bc506eee..9452ec866f7 100644
--- a/mysql-test/suite/perfschema/r/pfs_upgrade_proc.result
+++ b/mysql-test/suite/perfschema/r/pfs_upgrade_proc.result
@@ -1,4 +1,4 @@
-"Testing mysql_upgrade with PROCEDURE performance_schema.user_proc"
+# Testing mysql_upgrade with PROCEDURE performance_schema.user_proc
create procedure test.user_proc()
select "Not supposed to be here";
update mysql.proc set db='performance_schema' where name='user_proc';
diff --git a/mysql-test/suite/perfschema/r/pfs_upgrade_table.result b/mysql-test/suite/perfschema/r/pfs_upgrade_table.result
index 5ff608a825f..0c7b024a71e 100644
--- a/mysql-test/suite/perfschema/r/pfs_upgrade_table.result
+++ b/mysql-test/suite/perfschema/r/pfs_upgrade_table.result
@@ -1,4 +1,4 @@
-"Testing mysql_upgrade with TABLE performance_schema.user_table"
+# Testing mysql_upgrade with TABLE performance_schema.user_table
create table test.user_table(a int);
use performance_schema;
show tables like "user_table";
diff --git a/mysql-test/suite/perfschema/r/pfs_upgrade_view.result b/mysql-test/suite/perfschema/r/pfs_upgrade_view.result
index 14a1d8deae4..49928bbe8e3 100644
--- a/mysql-test/suite/perfschema/r/pfs_upgrade_view.result
+++ b/mysql-test/suite/perfschema/r/pfs_upgrade_view.result
@@ -1,4 +1,4 @@
-"Testing mysql_upgrade with VIEW performance_schema.user_view"
+# Testing mysql_upgrade with VIEW performance_schema.user_view
create view test.user_view as select "Not supposed to be here";
use performance_schema;
show tables like "user_view";
diff --git a/mysql-test/suite/perfschema/r/prepared_statements.result b/mysql-test/suite/perfschema/r/prepared_statements.result
new file mode 100644
index 00000000000..c11b486094e
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/prepared_statements.result
@@ -0,0 +1,672 @@
+CREATE DATABASE db;
+USE db;
+TRUNCATE TABLE performance_schema.prepared_statements_instances ;
+TRUNCATE TABLE performance_schema.events_statements_history_long ;
+CREATE TABLE t1 (a INT NOT NULL);
+INSERT INTO t1 VALUES (4), (8), (11), (32), (80);
+PREPARE st1 FROM 'SELECT SQRT(POW(?,2) + POW(?,2)) AS hypotenuse';
+SET @table = 't1';
+SET @s = CONCAT('SELECT * FROM ', @table);
+PREPARE st2 FROM @s;
+PREPARE st3 FROM 'INSERT INTO t1 SELECT * FROM t1 WHERE a<=?';
+PREPARE st4 FROM
+'(SELECT a FROM t1) UNION (SELECT a+10 FROM t1) ORDER BY RAND()*0+a';
+SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ;
+STATEMENT_NAME st1
+SQL_TEXT SELECT SQRT(POW(?,2) + POW(?,2)) AS hypotenuse
+COUNT_REPREPARE 0
+COUNT_EXECUTE 0
+SUM_ROWS_SENT 0
+SUM_SELECT_SCAN 0
+SUM_NO_INDEX_USED 0
+STATEMENT_NAME st2
+SQL_TEXT SELECT * FROM t1
+COUNT_REPREPARE 0
+COUNT_EXECUTE 0
+SUM_ROWS_SENT 0
+SUM_SELECT_SCAN 0
+SUM_NO_INDEX_USED 0
+STATEMENT_NAME st3
+SQL_TEXT INSERT INTO t1 SELECT * FROM t1 WHERE a<=?
+COUNT_REPREPARE 0
+COUNT_EXECUTE 0
+SUM_ROWS_SENT 0
+SUM_SELECT_SCAN 0
+SUM_NO_INDEX_USED 0
+STATEMENT_NAME st4
+SQL_TEXT (SELECT a FROM t1) UNION (SELECT a+10 FROM t1) ORDER BY RAND()*0+a
+COUNT_REPREPARE 0
+COUNT_EXECUTE 0
+SUM_ROWS_SENT 0
+SUM_SELECT_SCAN 0
+SUM_NO_INDEX_USED 0
+SELECT EVENT_NAME, SQL_TEXT, OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME FROM performance_schema.events_statements_history_long WHERE CURRENT_SCHEMA='db' ;
+EVENT_NAME statement/sql/truncate
+SQL_TEXT TRUNCATE TABLE performance_schema.events_statements_history_long
+OBJECT_TYPE NULL
+OBJECT_SCHEMA NULL
+OBJECT_NAME NULL
+EVENT_NAME statement/sql/create_table
+SQL_TEXT CREATE TABLE t1 (a INT NOT NULL)
+OBJECT_TYPE NULL
+OBJECT_SCHEMA NULL
+OBJECT_NAME NULL
+EVENT_NAME statement/sql/insert
+SQL_TEXT INSERT INTO t1 VALUES (4), (8), (11), (32), (80)
+OBJECT_TYPE NULL
+OBJECT_SCHEMA NULL
+OBJECT_NAME NULL
+EVENT_NAME statement/sql/prepare_sql
+SQL_TEXT PREPARE st1 FROM 'SELECT SQRT(POW(?,2) + POW(?,2)) AS hypotenuse'
+OBJECT_TYPE NULL
+OBJECT_SCHEMA NULL
+OBJECT_NAME NULL
+EVENT_NAME statement/sql/set_option
+SQL_TEXT SET @table = 't1'
+OBJECT_TYPE NULL
+OBJECT_SCHEMA NULL
+OBJECT_NAME NULL
+EVENT_NAME statement/sql/set_option
+SQL_TEXT SET @s = CONCAT('SELECT * FROM ', @table)
+OBJECT_TYPE NULL
+OBJECT_SCHEMA NULL
+OBJECT_NAME NULL
+EVENT_NAME statement/sql/prepare_sql
+SQL_TEXT PREPARE st2 FROM @s
+OBJECT_TYPE NULL
+OBJECT_SCHEMA NULL
+OBJECT_NAME NULL
+EVENT_NAME statement/sql/prepare_sql
+SQL_TEXT PREPARE st3 FROM 'INSERT INTO t1 SELECT * FROM t1 WHERE a<=?'
+OBJECT_TYPE NULL
+OBJECT_SCHEMA NULL
+OBJECT_NAME NULL
+EVENT_NAME statement/sql/prepare_sql
+SQL_TEXT PREPARE st4 FROM
+'(SELECT a FROM t1) UNION (SELECT a+10 FROM t1) ORDER BY RAND()*0+a'
+OBJECT_TYPE NULL
+OBJECT_SCHEMA NULL
+OBJECT_NAME NULL
+EVENT_NAME statement/sql/select
+SQL_TEXT SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances
+OBJECT_TYPE NULL
+OBJECT_SCHEMA NULL
+OBJECT_NAME NULL
+SET @a = 3;
+SET @b = 4;
+EXECUTE st1 USING @a, @b;
+hypotenuse
+5
+EXECUTE st2;
+a
+4
+8
+11
+32
+80
+SET @c=3;
+EXECUTE st3 using @c;
+EXECUTE st4;
+a
+4
+8
+11
+14
+18
+21
+32
+42
+80
+90
+SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ;
+STATEMENT_NAME st1
+SQL_TEXT SELECT SQRT(POW(?,2) + POW(?,2)) AS hypotenuse
+COUNT_REPREPARE 0
+COUNT_EXECUTE 1
+SUM_ROWS_SENT 1
+SUM_SELECT_SCAN 0
+SUM_NO_INDEX_USED 0
+STATEMENT_NAME st2
+SQL_TEXT SELECT * FROM t1
+COUNT_REPREPARE 0
+COUNT_EXECUTE 1
+SUM_ROWS_SENT 5
+SUM_SELECT_SCAN 1
+SUM_NO_INDEX_USED 1
+STATEMENT_NAME st3
+SQL_TEXT INSERT INTO t1 SELECT * FROM t1 WHERE a<=?
+COUNT_REPREPARE 0
+COUNT_EXECUTE 1
+SUM_ROWS_SENT 0
+SUM_SELECT_SCAN 1
+SUM_NO_INDEX_USED 1
+STATEMENT_NAME st4
+SQL_TEXT (SELECT a FROM t1) UNION (SELECT a+10 FROM t1) ORDER BY RAND()*0+a
+COUNT_REPREPARE 0
+COUNT_EXECUTE 1
+SUM_ROWS_SENT 10
+SUM_SELECT_SCAN 3
+SUM_NO_INDEX_USED 1
+SELECT EVENT_NAME, SQL_TEXT, OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME FROM performance_schema.events_statements_history_long WHERE CURRENT_SCHEMA='db' ;
+EVENT_NAME statement/sql/truncate
+SQL_TEXT TRUNCATE TABLE performance_schema.events_statements_history_long
+OBJECT_TYPE NULL
+OBJECT_SCHEMA NULL
+OBJECT_NAME NULL
+EVENT_NAME statement/sql/create_table
+SQL_TEXT CREATE TABLE t1 (a INT NOT NULL)
+OBJECT_TYPE NULL
+OBJECT_SCHEMA NULL
+OBJECT_NAME NULL
+EVENT_NAME statement/sql/insert
+SQL_TEXT INSERT INTO t1 VALUES (4), (8), (11), (32), (80)
+OBJECT_TYPE NULL
+OBJECT_SCHEMA NULL
+OBJECT_NAME NULL
+EVENT_NAME statement/sql/prepare_sql
+SQL_TEXT PREPARE st1 FROM 'SELECT SQRT(POW(?,2) + POW(?,2)) AS hypotenuse'
+OBJECT_TYPE NULL
+OBJECT_SCHEMA NULL
+OBJECT_NAME NULL
+EVENT_NAME statement/sql/set_option
+SQL_TEXT SET @table = 't1'
+OBJECT_TYPE NULL
+OBJECT_SCHEMA NULL
+OBJECT_NAME NULL
+EVENT_NAME statement/sql/set_option
+SQL_TEXT SET @s = CONCAT('SELECT * FROM ', @table)
+OBJECT_TYPE NULL
+OBJECT_SCHEMA NULL
+OBJECT_NAME NULL
+EVENT_NAME statement/sql/prepare_sql
+SQL_TEXT PREPARE st2 FROM @s
+OBJECT_TYPE NULL
+OBJECT_SCHEMA NULL
+OBJECT_NAME NULL
+EVENT_NAME statement/sql/prepare_sql
+SQL_TEXT PREPARE st3 FROM 'INSERT INTO t1 SELECT * FROM t1 WHERE a<=?'
+OBJECT_TYPE NULL
+OBJECT_SCHEMA NULL
+OBJECT_NAME NULL
+EVENT_NAME statement/sql/prepare_sql
+SQL_TEXT PREPARE st4 FROM
+'(SELECT a FROM t1) UNION (SELECT a+10 FROM t1) ORDER BY RAND()*0+a'
+OBJECT_TYPE NULL
+OBJECT_SCHEMA NULL
+OBJECT_NAME NULL
+EVENT_NAME statement/sql/select
+SQL_TEXT SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances
+OBJECT_TYPE NULL
+OBJECT_SCHEMA NULL
+OBJECT_NAME NULL
+EVENT_NAME statement/sql/select
+SQL_TEXT SELECT EVENT_NAME, SQL_TEXT, OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME FROM performance_schema.events_statements_history_long WHERE CURRENT_SCHEMA='db'
+OBJECT_TYPE NULL
+OBJECT_SCHEMA NULL
+OBJECT_NAME NULL
+EVENT_NAME statement/sql/set_option
+SQL_TEXT SET @a = 3
+OBJECT_TYPE NULL
+OBJECT_SCHEMA NULL
+OBJECT_NAME NULL
+EVENT_NAME statement/sql/set_option
+SQL_TEXT SET @b = 4
+OBJECT_TYPE NULL
+OBJECT_SCHEMA NULL
+OBJECT_NAME NULL
+EVENT_NAME statement/sql/execute_sql
+SQL_TEXT EXECUTE st1 USING @a, @b
+OBJECT_TYPE NULL
+OBJECT_SCHEMA NULL
+OBJECT_NAME NULL
+EVENT_NAME statement/sql/execute_sql
+SQL_TEXT EXECUTE st2
+OBJECT_TYPE NULL
+OBJECT_SCHEMA NULL
+OBJECT_NAME NULL
+EVENT_NAME statement/sql/set_option
+SQL_TEXT SET @c=3
+OBJECT_TYPE NULL
+OBJECT_SCHEMA NULL
+OBJECT_NAME NULL
+EVENT_NAME statement/sql/execute_sql
+SQL_TEXT EXECUTE st3 using @c
+OBJECT_TYPE NULL
+OBJECT_SCHEMA NULL
+OBJECT_NAME NULL
+EVENT_NAME statement/sql/execute_sql
+SQL_TEXT EXECUTE st4
+OBJECT_TYPE NULL
+OBJECT_SCHEMA NULL
+OBJECT_NAME NULL
+EVENT_NAME statement/sql/select
+SQL_TEXT SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances
+OBJECT_TYPE NULL
+OBJECT_SCHEMA NULL
+OBJECT_NAME NULL
+TRUNCATE TABLE performance_schema.prepared_statements_instances ;
+SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ;
+STATEMENT_NAME st1
+SQL_TEXT SELECT SQRT(POW(?,2) + POW(?,2)) AS hypotenuse
+COUNT_REPREPARE 0
+COUNT_EXECUTE 0
+SUM_ROWS_SENT 0
+SUM_SELECT_SCAN 0
+SUM_NO_INDEX_USED 0
+STATEMENT_NAME st2
+SQL_TEXT SELECT * FROM t1
+COUNT_REPREPARE 0
+COUNT_EXECUTE 0
+SUM_ROWS_SENT 0
+SUM_SELECT_SCAN 0
+SUM_NO_INDEX_USED 0
+STATEMENT_NAME st3
+SQL_TEXT INSERT INTO t1 SELECT * FROM t1 WHERE a<=?
+COUNT_REPREPARE 0
+COUNT_EXECUTE 0
+SUM_ROWS_SENT 0
+SUM_SELECT_SCAN 0
+SUM_NO_INDEX_USED 0
+STATEMENT_NAME st4
+SQL_TEXT (SELECT a FROM t1) UNION (SELECT a+10 FROM t1) ORDER BY RAND()*0+a
+COUNT_REPREPARE 0
+COUNT_EXECUTE 0
+SUM_ROWS_SENT 0
+SUM_SELECT_SCAN 0
+SUM_NO_INDEX_USED 0
+DEALLOCATE PREPARE st1;
+DEALLOCATE PREPARE st2;
+DEALLOCATE PREPARE st3;
+DEALLOCATE PREPARE st4;
+DROP TABLE t1;
+SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ;
+SELECT EVENT_NAME, SQL_TEXT, OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME FROM performance_schema.events_statements_history_long WHERE CURRENT_SCHEMA='db' ;
+EVENT_NAME statement/sql/truncate
+SQL_TEXT TRUNCATE TABLE performance_schema.events_statements_history_long
+OBJECT_TYPE NULL
+OBJECT_SCHEMA NULL
+OBJECT_NAME NULL
+EVENT_NAME statement/sql/create_table
+SQL_TEXT CREATE TABLE t1 (a INT NOT NULL)
+OBJECT_TYPE NULL
+OBJECT_SCHEMA NULL
+OBJECT_NAME NULL
+EVENT_NAME statement/sql/insert
+SQL_TEXT INSERT INTO t1 VALUES (4), (8), (11), (32), (80)
+OBJECT_TYPE NULL
+OBJECT_SCHEMA NULL
+OBJECT_NAME NULL
+EVENT_NAME statement/sql/prepare_sql
+SQL_TEXT PREPARE st1 FROM 'SELECT SQRT(POW(?,2) + POW(?,2)) AS hypotenuse'
+OBJECT_TYPE NULL
+OBJECT_SCHEMA NULL
+OBJECT_NAME NULL
+EVENT_NAME statement/sql/set_option
+SQL_TEXT SET @table = 't1'
+OBJECT_TYPE NULL
+OBJECT_SCHEMA NULL
+OBJECT_NAME NULL
+EVENT_NAME statement/sql/set_option
+SQL_TEXT SET @s = CONCAT('SELECT * FROM ', @table)
+OBJECT_TYPE NULL
+OBJECT_SCHEMA NULL
+OBJECT_NAME NULL
+EVENT_NAME statement/sql/prepare_sql
+SQL_TEXT PREPARE st2 FROM @s
+OBJECT_TYPE NULL
+OBJECT_SCHEMA NULL
+OBJECT_NAME NULL
+EVENT_NAME statement/sql/prepare_sql
+SQL_TEXT PREPARE st3 FROM 'INSERT INTO t1 SELECT * FROM t1 WHERE a<=?'
+OBJECT_TYPE NULL
+OBJECT_SCHEMA NULL
+OBJECT_NAME NULL
+EVENT_NAME statement/sql/prepare_sql
+SQL_TEXT PREPARE st4 FROM
+'(SELECT a FROM t1) UNION (SELECT a+10 FROM t1) ORDER BY RAND()*0+a'
+OBJECT_TYPE NULL
+OBJECT_SCHEMA NULL
+OBJECT_NAME NULL
+EVENT_NAME statement/sql/select
+SQL_TEXT SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances
+OBJECT_TYPE NULL
+OBJECT_SCHEMA NULL
+OBJECT_NAME NULL
+EVENT_NAME statement/sql/select
+SQL_TEXT SELECT EVENT_NAME, SQL_TEXT, OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME FROM performance_schema.events_statements_history_long WHERE CURRENT_SCHEMA='db'
+OBJECT_TYPE NULL
+OBJECT_SCHEMA NULL
+OBJECT_NAME NULL
+EVENT_NAME statement/sql/set_option
+SQL_TEXT SET @a = 3
+OBJECT_TYPE NULL
+OBJECT_SCHEMA NULL
+OBJECT_NAME NULL
+EVENT_NAME statement/sql/set_option
+SQL_TEXT SET @b = 4
+OBJECT_TYPE NULL
+OBJECT_SCHEMA NULL
+OBJECT_NAME NULL
+EVENT_NAME statement/sql/execute_sql
+SQL_TEXT EXECUTE st1 USING @a, @b
+OBJECT_TYPE NULL
+OBJECT_SCHEMA NULL
+OBJECT_NAME NULL
+EVENT_NAME statement/sql/execute_sql
+SQL_TEXT EXECUTE st2
+OBJECT_TYPE NULL
+OBJECT_SCHEMA NULL
+OBJECT_NAME NULL
+EVENT_NAME statement/sql/set_option
+SQL_TEXT SET @c=3
+OBJECT_TYPE NULL
+OBJECT_SCHEMA NULL
+OBJECT_NAME NULL
+EVENT_NAME statement/sql/execute_sql
+SQL_TEXT EXECUTE st3 using @c
+OBJECT_TYPE NULL
+OBJECT_SCHEMA NULL
+OBJECT_NAME NULL
+EVENT_NAME statement/sql/execute_sql
+SQL_TEXT EXECUTE st4
+OBJECT_TYPE NULL
+OBJECT_SCHEMA NULL
+OBJECT_NAME NULL
+EVENT_NAME statement/sql/select
+SQL_TEXT SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances
+OBJECT_TYPE NULL
+OBJECT_SCHEMA NULL
+OBJECT_NAME NULL
+EVENT_NAME statement/sql/select
+SQL_TEXT SELECT EVENT_NAME, SQL_TEXT, OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME FROM performance_schema.events_statements_history_long WHERE CURRENT_SCHEMA='db'
+OBJECT_TYPE NULL
+OBJECT_SCHEMA NULL
+OBJECT_NAME NULL
+EVENT_NAME statement/sql/truncate
+SQL_TEXT TRUNCATE TABLE performance_schema.prepared_statements_instances
+OBJECT_TYPE NULL
+OBJECT_SCHEMA NULL
+OBJECT_NAME NULL
+EVENT_NAME statement/sql/select
+SQL_TEXT SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances
+OBJECT_TYPE NULL
+OBJECT_SCHEMA NULL
+OBJECT_NAME NULL
+EVENT_NAME statement/sql/dealloc_sql
+SQL_TEXT DEALLOCATE PREPARE st1
+OBJECT_TYPE NULL
+OBJECT_SCHEMA NULL
+OBJECT_NAME NULL
+EVENT_NAME statement/sql/dealloc_sql
+SQL_TEXT DEALLOCATE PREPARE st2
+OBJECT_TYPE NULL
+OBJECT_SCHEMA NULL
+OBJECT_NAME NULL
+EVENT_NAME statement/sql/dealloc_sql
+SQL_TEXT DEALLOCATE PREPARE st3
+OBJECT_TYPE NULL
+OBJECT_SCHEMA NULL
+OBJECT_NAME NULL
+EVENT_NAME statement/sql/dealloc_sql
+SQL_TEXT DEALLOCATE PREPARE st4
+OBJECT_TYPE NULL
+OBJECT_SCHEMA NULL
+OBJECT_NAME NULL
+EVENT_NAME statement/sql/drop_table
+SQL_TEXT DROP TABLE t1
+OBJECT_TYPE NULL
+OBJECT_SCHEMA NULL
+OBJECT_NAME NULL
+EVENT_NAME statement/sql/select
+SQL_TEXT SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances
+OBJECT_TYPE NULL
+OBJECT_SCHEMA NULL
+OBJECT_NAME NULL
+TRUNCATE TABLE performance_schema.events_statements_history_long ;
+UPDATE performance_schema.setup_consumers SET ENABLED = 'NO';
+CREATE TABLE t1 (a INT NOT NULL);
+INSERT INTO t1 VALUES (4), (8), (11), (32), (80);
+PREPARE st1 FROM 'SELECT SQRT(POW(?,2) + POW(?,2)) AS hypotenuse';
+SET @table = 't1';
+SET @s = CONCAT('SELECT * FROM ', @table);
+PREPARE st2 FROM @s;
+PREPARE st3 FROM 'INSERT INTO t1 SELECT * FROM t1 WHERE a<=?';
+PREPARE st4 FROM
+'(SELECT a FROM t1) UNION (SELECT a+10 FROM t1) ORDER BY RAND()*0+a';
+SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ;
+SELECT EVENT_NAME, SQL_TEXT, OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME FROM performance_schema.events_statements_history_long WHERE CURRENT_SCHEMA='db' ;
+EVENT_NAME statement/sql/truncate
+SQL_TEXT TRUNCATE TABLE performance_schema.events_statements_history_long
+OBJECT_TYPE NULL
+OBJECT_SCHEMA NULL
+OBJECT_NAME NULL
+SET @a = 3;
+SET @b = 4;
+EXECUTE st1 USING @a, @b;
+hypotenuse
+5
+EXECUTE st2;
+a
+4
+8
+11
+32
+80
+SET @c=3;
+EXECUTE st3 using @c;
+EXECUTE st4;
+a
+4
+8
+11
+14
+18
+21
+32
+42
+80
+90
+SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ;
+SELECT EVENT_NAME, SQL_TEXT, OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME FROM performance_schema.events_statements_history_long WHERE CURRENT_SCHEMA='db' ;
+EVENT_NAME statement/sql/truncate
+SQL_TEXT TRUNCATE TABLE performance_schema.events_statements_history_long
+OBJECT_TYPE NULL
+OBJECT_SCHEMA NULL
+OBJECT_NAME NULL
+DEALLOCATE PREPARE st1;
+DEALLOCATE PREPARE st2;
+DEALLOCATE PREPARE st3;
+DEALLOCATE PREPARE st4;
+DROP TABLE t1;
+SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ;
+SELECT EVENT_NAME, SQL_TEXT, OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME FROM performance_schema.events_statements_history_long WHERE CURRENT_SCHEMA='db' ;
+EVENT_NAME statement/sql/truncate
+SQL_TEXT TRUNCATE TABLE performance_schema.events_statements_history_long
+OBJECT_TYPE NULL
+OBJECT_SCHEMA NULL
+OBJECT_NAME NULL
+TRUNCATE TABLE performance_schema.events_statements_history_long ;
+UPDATE performance_schema.setup_consumers SET ENABLED = 'YES';
+PREPARE st FROM 'SELECT SUM(1000 + ?) AS total';
+SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ;
+STATEMENT_NAME st
+SQL_TEXT SELECT SUM(1000 + ?) AS total
+COUNT_REPREPARE 0
+COUNT_EXECUTE 0
+SUM_ROWS_SENT 0
+SUM_SELECT_SCAN 0
+SUM_NO_INDEX_USED 0
+SET @d=100;
+EXECUTE st USING @d;
+total
+1100
+SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ;
+STATEMENT_NAME st
+SQL_TEXT SELECT SUM(1000 + ?) AS total
+COUNT_REPREPARE 0
+COUNT_EXECUTE 1
+SUM_ROWS_SENT 1
+SUM_SELECT_SCAN 0
+SUM_NO_INDEX_USED 0
+SET @d = @d + 100;
+EXECUTE st USING @d;
+total
+1200
+SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ;
+STATEMENT_NAME st
+SQL_TEXT SELECT SUM(1000 + ?) AS total
+COUNT_REPREPARE 0
+COUNT_EXECUTE 2
+SUM_ROWS_SENT 2
+SUM_SELECT_SCAN 0
+SUM_NO_INDEX_USED 0
+SET @d = @d + 100;
+EXECUTE st USING @d;
+total
+1300
+SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ;
+STATEMENT_NAME st
+SQL_TEXT SELECT SUM(1000 + ?) AS total
+COUNT_REPREPARE 0
+COUNT_EXECUTE 3
+SUM_ROWS_SENT 3
+SUM_SELECT_SCAN 0
+SUM_NO_INDEX_USED 0
+SET @d = @d + 100;
+EXECUTE st USING @d;
+total
+1400
+SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ;
+STATEMENT_NAME st
+SQL_TEXT SELECT SUM(1000 + ?) AS total
+COUNT_REPREPARE 0
+COUNT_EXECUTE 4
+SUM_ROWS_SENT 4
+SUM_SELECT_SCAN 0
+SUM_NO_INDEX_USED 0
+SET @d = @d + 100;
+EXECUTE st USING @d;
+total
+1500
+SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ;
+STATEMENT_NAME st
+SQL_TEXT SELECT SUM(1000 + ?) AS total
+COUNT_REPREPARE 0
+COUNT_EXECUTE 5
+SUM_ROWS_SENT 5
+SUM_SELECT_SCAN 0
+SUM_NO_INDEX_USED 0
+SET @d = @d + 100;
+EXECUTE st USING @d;
+total
+1600
+SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ;
+STATEMENT_NAME st
+SQL_TEXT SELECT SUM(1000 + ?) AS total
+COUNT_REPREPARE 0
+COUNT_EXECUTE 6
+SUM_ROWS_SENT 6
+SUM_SELECT_SCAN 0
+SUM_NO_INDEX_USED 0
+TRUNCATE TABLE performance_schema.prepared_statements_instances ;
+SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ;
+STATEMENT_NAME st
+SQL_TEXT SELECT SUM(1000 + ?) AS total
+COUNT_REPREPARE 0
+COUNT_EXECUTE 0
+SUM_ROWS_SENT 0
+SUM_SELECT_SCAN 0
+SUM_NO_INDEX_USED 0
+UPDATE performance_schema.setup_instruments SET ENABLED = 'NO'
+WHERE NAME like "statement/sql/execute%";
+SET @d=3274;
+EXECUTE st USING @d;
+total
+4274
+SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ;
+STATEMENT_NAME st
+SQL_TEXT SELECT SUM(1000 + ?) AS total
+COUNT_REPREPARE 0
+COUNT_EXECUTE 0
+SUM_ROWS_SENT 0
+SUM_SELECT_SCAN 0
+SUM_NO_INDEX_USED 0
+UPDATE performance_schema.setup_instruments SET ENABLED = 'NO'
+ WHERE NAME like "statement/sql/prepare%";
+DEALLOCATE PREPARE st;
+SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ;
+UPDATE performance_schema.setup_instruments SET ENABLED = 'YES'
+ WHERE NAME like "statement/sql/prepare%";
+UPDATE performance_schema.setup_instruments SET ENABLED = 'YES'
+WHERE NAME like "statement/sql/execute%";
+CREATE TABLE tab(
+Id INT,
+name CHAR(10),
+age INT
+);
+INSERT INTO tab VALUES(1,"Nakshatr",25),(2,"chanda",24),(3,"tejas",78);
+PREPARE st FROM 'SELECT * FROM tab';
+SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ;
+STATEMENT_NAME st
+SQL_TEXT SELECT * FROM tab
+COUNT_REPREPARE 0
+COUNT_EXECUTE 0
+SUM_ROWS_SENT 0
+SUM_SELECT_SCAN 0
+SUM_NO_INDEX_USED 0
+EXECUTE st;
+Id name age
+1 Nakshatr 25
+2 chanda 24
+3 tejas 78
+SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ;
+STATEMENT_NAME st
+SQL_TEXT SELECT * FROM tab
+COUNT_REPREPARE 0
+COUNT_EXECUTE 1
+SUM_ROWS_SENT 3
+SUM_SELECT_SCAN 1
+SUM_NO_INDEX_USED 1
+ALTER TABLE tab DROP COLUMN age;
+EXECUTE st;
+Id name
+1 Nakshatr
+2 chanda
+3 tejas
+SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ;
+STATEMENT_NAME st
+SQL_TEXT SELECT * FROM tab
+COUNT_REPREPARE 1
+COUNT_EXECUTE 2
+SUM_ROWS_SENT 6
+SUM_SELECT_SCAN 2
+SUM_NO_INDEX_USED 2
+ALTER TABLE tab ADD COLUMN age INT NULL;
+EXECUTE st;
+Id name age
+1 Nakshatr NULL
+2 chanda NULL
+3 tejas NULL
+SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ;
+STATEMENT_NAME st
+SQL_TEXT SELECT * FROM tab
+COUNT_REPREPARE 2
+COUNT_EXECUTE 3
+SUM_ROWS_SENT 9
+SUM_SELECT_SCAN 3
+SUM_NO_INDEX_USED 3
+TRUNCATE TABLE performance_schema.prepared_statements_instances ;
+SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ;
+STATEMENT_NAME st
+SQL_TEXT SELECT * FROM tab
+COUNT_REPREPARE 0
+COUNT_EXECUTE 0
+SUM_ROWS_SENT 0
+SUM_SELECT_SCAN 0
+SUM_NO_INDEX_USED 0
+DEALLOCATE PREPARE st;
+SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances ;
+TRUNCATE TABLE performance_schema.prepared_statements_instances ;
+TRUNCATE TABLE performance_schema.events_statements_history_long ;
+DROP TABLE tab;
+DROP DATABASE db;
diff --git a/mysql-test/suite/perfschema/r/prepared_stmts_by_stored_programs.result b/mysql-test/suite/perfschema/r/prepared_stmts_by_stored_programs.result
new file mode 100644
index 00000000000..318c4a1d21b
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/prepared_stmts_by_stored_programs.result
@@ -0,0 +1,126 @@
+TRUNCATE TABLE performance_schema.prepared_statements_instances;
+CREATE DATABASE db;
+USE db;
+CREATE TABLE t
+(
+a INT,
+b CHAR(10),
+name CHAR(10)
+);
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
+INSERT INTO t VALUES (1,"kuchipudi","Vempati");
+INSERT INTO t VALUES (2,"odissi","Mohapatra");
+INSERT INTO t VALUES (3,"kathak","Maharaj");
+INSERT INTO t VALUES (4,"mohiyattam","Kalyanikutty");
+Warnings:
+Warning 1265 Data truncated for column 'name' at row 1
+INSERT INTO t VALUES (5,"manipuri","Guru");
+INSERT INTO t VALUES (6,"kathakali","Manavedan");
+SET sql_mode= default;
+CREATE PROCEDURE p1()
+BEGIN
+PREPARE st FROM 'SELECT * FROM t WHERE a<=?' ;
+SET @a=3;
+EXECUTE st using @a;
+END|
+CALL p1()|
+a b name
+1 kuchipudi Vempati
+2 odissi Mohapatra
+3 kathak Maharaj
+SELECT STATEMENT_NAME, SQL_TEXT, COUNT_EXECUTE, COUNT_REPREPARE, OWNER_OBJECT_TYPE, OWNER_OBJECT_SCHEMA, OWNER_OBJECT_NAME FROM performance_schema.prepared_statements_instances|
+STATEMENT_NAME SQL_TEXT COUNT_EXECUTE COUNT_REPREPARE OWNER_OBJECT_TYPE OWNER_OBJECT_SCHEMA OWNER_OBJECT_NAME
+st SELECT * FROM t WHERE a<=? 1 0 PROCEDURE db p1
+DEALLOCATE PREPARE st|
+SELECT STATEMENT_NAME, SQL_TEXT, COUNT_EXECUTE, COUNT_REPREPARE, OWNER_OBJECT_TYPE, OWNER_OBJECT_SCHEMA, OWNER_OBJECT_NAME FROM performance_schema.prepared_statements_instances|
+STATEMENT_NAME SQL_TEXT COUNT_EXECUTE COUNT_REPREPARE OWNER_OBJECT_TYPE OWNER_OBJECT_SCHEMA OWNER_OBJECT_NAME
+CREATE PROCEDURE p2()
+BEGIN
+PREPARE st1 FROM 'INSERT INTO t SELECT * FROM t WHERE a<=?' ;
+END|
+CALL p2()|
+SELECT STATEMENT_NAME, SQL_TEXT, COUNT_EXECUTE, COUNT_REPREPARE, OWNER_OBJECT_TYPE, OWNER_OBJECT_SCHEMA, OWNER_OBJECT_NAME FROM performance_schema.prepared_statements_instances|
+STATEMENT_NAME SQL_TEXT COUNT_EXECUTE COUNT_REPREPARE OWNER_OBJECT_TYPE OWNER_OBJECT_SCHEMA OWNER_OBJECT_NAME
+st1 INSERT INTO t SELECT * FROM t WHERE a<=? 0 0 PROCEDURE db p2
+SET @a=4|
+EXECUTE st1 using @a|
+SELECT STATEMENT_NAME, SQL_TEXT, COUNT_EXECUTE, COUNT_REPREPARE, OWNER_OBJECT_TYPE, OWNER_OBJECT_SCHEMA, OWNER_OBJECT_NAME FROM performance_schema.prepared_statements_instances|
+STATEMENT_NAME SQL_TEXT COUNT_EXECUTE COUNT_REPREPARE OWNER_OBJECT_TYPE OWNER_OBJECT_SCHEMA OWNER_OBJECT_NAME
+st1 INSERT INTO t SELECT * FROM t WHERE a<=? 1 0 PROCEDURE db p2
+CREATE PROCEDURE p3()
+BEGIN
+SET @a=2;
+EXECUTE st1 using @a;
+END|
+CALL p3()|
+SELECT STATEMENT_NAME, SQL_TEXT, COUNT_EXECUTE, COUNT_REPREPARE, OWNER_OBJECT_TYPE, OWNER_OBJECT_SCHEMA, OWNER_OBJECT_NAME FROM performance_schema.prepared_statements_instances|
+STATEMENT_NAME SQL_TEXT COUNT_EXECUTE COUNT_REPREPARE OWNER_OBJECT_TYPE OWNER_OBJECT_SCHEMA OWNER_OBJECT_NAME
+st1 INSERT INTO t SELECT * FROM t WHERE a<=? 2 0 PROCEDURE db p2
+DEALLOCATE PREPARE st1|
+SELECT STATEMENT_NAME, SQL_TEXT, COUNT_EXECUTE, COUNT_REPREPARE, OWNER_OBJECT_TYPE, OWNER_OBJECT_SCHEMA, OWNER_OBJECT_NAME FROM performance_schema.prepared_statements_instances|
+STATEMENT_NAME SQL_TEXT COUNT_EXECUTE COUNT_REPREPARE OWNER_OBJECT_TYPE OWNER_OBJECT_SCHEMA OWNER_OBJECT_NAME
+PREPARE st2 FROM 'UPDATE t SET a=a+1 WHERE b=?'|
+SELECT STATEMENT_NAME, SQL_TEXT, COUNT_EXECUTE, COUNT_REPREPARE, OWNER_OBJECT_TYPE, OWNER_OBJECT_SCHEMA, OWNER_OBJECT_NAME FROM performance_schema.prepared_statements_instances|
+STATEMENT_NAME SQL_TEXT COUNT_EXECUTE COUNT_REPREPARE OWNER_OBJECT_TYPE OWNER_OBJECT_SCHEMA OWNER_OBJECT_NAME
+st2 UPDATE t SET a=a+1 WHERE b=? 0 0 NULL NULL NULL
+CREATE PROCEDURE p4()
+BEGIN
+SET @b='kuchipudi';
+EXECUTE st2 USING @b;
+END|
+CALL p4()|
+SELECT STATEMENT_NAME, SQL_TEXT, COUNT_EXECUTE, COUNT_REPREPARE, OWNER_OBJECT_TYPE, OWNER_OBJECT_SCHEMA, OWNER_OBJECT_NAME FROM performance_schema.prepared_statements_instances|
+STATEMENT_NAME SQL_TEXT COUNT_EXECUTE COUNT_REPREPARE OWNER_OBJECT_TYPE OWNER_OBJECT_SCHEMA OWNER_OBJECT_NAME
+st2 UPDATE t SET a=a+1 WHERE b=? 1 0 NULL NULL NULL
+ALTER TABLE t DROP COLUMN name;
+# COUNT_REPREPARE must be 1
+CALL p4()|
+SELECT STATEMENT_NAME, SQL_TEXT, COUNT_EXECUTE, COUNT_REPREPARE, OWNER_OBJECT_TYPE, OWNER_OBJECT_SCHEMA, OWNER_OBJECT_NAME FROM performance_schema.prepared_statements_instances|
+STATEMENT_NAME SQL_TEXT COUNT_EXECUTE COUNT_REPREPARE OWNER_OBJECT_TYPE OWNER_OBJECT_SCHEMA OWNER_OBJECT_NAME
+st2 UPDATE t SET a=a+1 WHERE b=? 2 1 NULL NULL NULL
+DEALLOCATE PREPARE st2|
+SELECT STATEMENT_NAME, SQL_TEXT, COUNT_EXECUTE, COUNT_REPREPARE, OWNER_OBJECT_TYPE, OWNER_OBJECT_SCHEMA, OWNER_OBJECT_NAME FROM performance_schema.prepared_statements_instances|
+STATEMENT_NAME SQL_TEXT COUNT_EXECUTE COUNT_REPREPARE OWNER_OBJECT_TYPE OWNER_OBJECT_SCHEMA OWNER_OBJECT_NAME
+CREATE PROCEDURE p5()
+BEGIN
+SET @a=1;
+SELECT @a;
+END|
+PREPARE st3 FROM 'CALL p5()'|
+SELECT STATEMENT_NAME, SQL_TEXT, COUNT_EXECUTE, COUNT_REPREPARE, OWNER_OBJECT_TYPE, OWNER_OBJECT_SCHEMA, OWNER_OBJECT_NAME FROM performance_schema.prepared_statements_instances|
+STATEMENT_NAME SQL_TEXT COUNT_EXECUTE COUNT_REPREPARE OWNER_OBJECT_TYPE OWNER_OBJECT_SCHEMA OWNER_OBJECT_NAME
+st3 CALL p5() 0 0 NULL NULL NULL
+EXECUTE st3|
+@a
+1
+SELECT STATEMENT_NAME, SQL_TEXT, COUNT_EXECUTE, COUNT_REPREPARE, OWNER_OBJECT_TYPE, OWNER_OBJECT_SCHEMA, OWNER_OBJECT_NAME FROM performance_schema.prepared_statements_instances|
+STATEMENT_NAME SQL_TEXT COUNT_EXECUTE COUNT_REPREPARE OWNER_OBJECT_TYPE OWNER_OBJECT_SCHEMA OWNER_OBJECT_NAME
+st3 CALL p5() 1 0 NULL NULL NULL
+DEALLOCATE PREPARE st3|
+SELECT STATEMENT_NAME, SQL_TEXT, COUNT_EXECUTE, COUNT_REPREPARE, OWNER_OBJECT_TYPE, OWNER_OBJECT_SCHEMA, OWNER_OBJECT_NAME FROM performance_schema.prepared_statements_instances|
+STATEMENT_NAME SQL_TEXT COUNT_EXECUTE COUNT_REPREPARE OWNER_OBJECT_TYPE OWNER_OBJECT_SCHEMA OWNER_OBJECT_NAME
+CREATE TABLE tab(a INT);
+SET GLOBAL event_scheduler=ON;
+CREATE EVENT e1 ON SCHEDULE EVERY 10 HOUR DO
+BEGIN
+PREPARE st FROM 'INSERT INTO tab VALUES(?)';
+SET @a=1;
+EXECUTE st USING @a;
+END|
+SELECT * FROM tab LIMIT 1;
+a
+1
+SET GLOBAL event_scheduler=OFF;
+SELECT STATEMENT_NAME, SQL_TEXT, COUNT_EXECUTE, COUNT_REPREPARE, OWNER_OBJECT_TYPE, OWNER_OBJECT_SCHEMA, OWNER_OBJECT_NAME FROM performance_schema.prepared_statements_instances;
+STATEMENT_NAME SQL_TEXT COUNT_EXECUTE COUNT_REPREPARE OWNER_OBJECT_TYPE OWNER_OBJECT_SCHEMA OWNER_OBJECT_NAME
+TRUNCATE TABLE performance_schema.prepared_statements_instances;
+TRUNCATE TABLE performance_schema.events_statements_history_long;
+DROP TABLE t;
+DROP TABLE tab;
+DROP PROCEDURE p1;
+DROP PROCEDURE p2;
+DROP PROCEDURE p3;
+DROP PROCEDURE p4;
+DROP PROCEDURE p5;
+DROP EVENT IF EXISTS e1;
+DROP DATABASE db;
diff --git a/mysql-test/suite/perfschema/r/privilege.result b/mysql-test/suite/perfschema/r/privilege.result
index 0a038000536..c5e0ebf3c92 100644
--- a/mysql-test/suite/perfschema/r/privilege.result
+++ b/mysql-test/suite/perfschema/r/privilege.result
@@ -581,6 +581,8 @@ WHERE name LIKE 'wait/synch/mutex/%'
OR name LIKE 'wait/synch/rwlock/%';
UPDATE performance_schema.setup_consumers SET enabled = 'YES';
UPDATE performance_schema.setup_timers SET timer_name = 'TICK' WHERE name <> "wait";
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release
TRUNCATE TABLE performance_schema.events_waits_history_long;
TRUNCATE TABLE performance_schema.events_waits_history;
TRUNCATE TABLE performance_schema.events_waits_current;
@@ -593,5 +595,19 @@ flush privileges;
UPDATE performance_schema.setup_instruments SET enabled = 'YES', timed = 'YES';
UPDATE performance_schema.setup_consumers SET enabled = 'YES';
UPDATE performance_schema.setup_timers SET timer_name = 'MICROSECOND' where name="idle";
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release
UPDATE performance_schema.setup_timers SET timer_name = 'NANOSECOND' where name="stage";
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release
UPDATE performance_schema.setup_timers SET timer_name = 'NANOSECOND' where name="statement";
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release
+#
+# WL#2284: Increase the length of a user name
+#
+CREATE USER 'user_name_len_22_01234'@localhost;
+GRANT ALL ON performance_schema.* TO 'user_name_len_22_01234'@localhost with GRANT OPTION;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'user_name_len_22_01234'@localhost;
+DROP USER 'user_name_len_22_01234'@localhost;
diff --git a/mysql-test/suite/perfschema/r/privilege_table_io.result b/mysql-test/suite/perfschema/r/privilege_table_io.result
index fd56d3e1776..94cc2b33b49 100644
--- a/mysql-test/suite/perfschema/r/privilege_table_io.result
+++ b/mysql-test/suite/perfschema/r/privilege_table_io.result
@@ -24,9 +24,7 @@ flush privileges;
insert into test.marker set a = 1;
insert into test.marker set a = 1;
insert into test.marker set a = 1;
-show variables where
-`Variable_name` != "performance_schema_max_statement_classes" and
-`Variable_name` like "performance_schema%";
+show global variables like "performance_schema%";
Variable_name Value
performance_schema ON
performance_schema_accounts_size 100
@@ -35,31 +33,42 @@ performance_schema_events_stages_history_long_size 1000
performance_schema_events_stages_history_size 10
performance_schema_events_statements_history_long_size 1000
performance_schema_events_statements_history_size 10
+performance_schema_events_transactions_history_long_size 1000
+performance_schema_events_transactions_history_size 10
performance_schema_events_waits_history_long_size 10000
performance_schema_events_waits_history_size 10
performance_schema_hosts_size 100
performance_schema_max_cond_classes 90
performance_schema_max_cond_instances 1000
performance_schema_max_digest_length 1024
-performance_schema_max_file_classes 50
+performance_schema_max_file_classes 80
performance_schema_max_file_handles 32768
performance_schema_max_file_instances 10000
-performance_schema_max_mutex_classes 200
+performance_schema_max_index_stat 5000
+performance_schema_max_memory_classes 320
+performance_schema_max_metadata_locks 10000
+performance_schema_max_mutex_classes 210
performance_schema_max_mutex_instances 5000
-performance_schema_max_rwlock_classes 40
+performance_schema_max_prepared_statements_instances 100
+performance_schema_max_program_instances 5000
+performance_schema_max_rwlock_classes 50
performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
+performance_schema_max_sql_text_length 1024
performance_schema_max_stage_classes 160
+performance_schema_max_statement_classes 222
+performance_schema_max_statement_stack 10
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
+performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
performance_schema_max_thread_instances 200
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
performance_schema_users_size 100
-show status like "performance_schema%";
+show global status like "performance_schema%";
Variable_name Value
Performance_schema_accounts_lost 0
Performance_schema_cond_classes_lost 0
@@ -69,9 +78,15 @@ Performance_schema_file_classes_lost 0
Performance_schema_file_handles_lost 0
Performance_schema_file_instances_lost 0
Performance_schema_hosts_lost 0
+Performance_schema_index_stat_lost 0
Performance_schema_locker_lost 0
+Performance_schema_memory_classes_lost 0
+Performance_schema_metadata_lock_lost 0
Performance_schema_mutex_classes_lost 0
Performance_schema_mutex_instances_lost 0
+Performance_schema_nested_statement_lost 0
+Performance_schema_prepared_statements_lost 0
+Performance_schema_program_lost 0
Performance_schema_rwlock_classes_lost 0
Performance_schema_rwlock_instances_lost 0
Performance_schema_session_connect_attrs_lost 0
@@ -81,6 +96,7 @@ Performance_schema_stage_classes_lost 0
Performance_schema_statement_classes_lost 0
Performance_schema_table_handles_lost 0
Performance_schema_table_instances_lost 0
+Performance_schema_table_lock_stat_lost 0
Performance_schema_thread_classes_lost 0
Performance_schema_thread_instances_lost 0
Performance_schema_users_lost 0
@@ -96,44 +112,58 @@ 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 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 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
-wait/io/table/sql/handler handler.cc: TABLE mysql proxies_priv fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE mysql proxies_priv fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE mysql proxies_priv fetch NULL
-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 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
-show status where Variable_name like 'performance_schema_%' and
-Variable_name not like 'performance_schema_%_classes_lost';
+wait/io/table/sql/handler TABLE mysql global_priv fetch 1
+wait/io/table/sql/handler TABLE mysql global_priv fetch 1
+wait/io/table/sql/handler TABLE mysql global_priv fetch 1
+wait/io/table/sql/handler TABLE mysql global_priv fetch 1
+wait/io/table/sql/handler TABLE mysql global_priv fetch 1
+wait/io/table/sql/handler TABLE mysql global_priv fetch 1
+wait/io/table/sql/handler TABLE mysql db fetch 1
+wait/io/table/sql/handler TABLE mysql db fetch 1
+wait/io/table/sql/handler TABLE mysql db fetch 1
+wait/io/table/sql/handler TABLE mysql proxies_priv fetch 1
+wait/io/table/sql/handler TABLE mysql proxies_priv fetch 1
+wait/io/table/sql/handler TABLE mysql proxies_priv fetch 1
+wait/io/table/sql/handler TABLE mysql roles_mapping fetch 1
+wait/io/table/sql/handler TABLE mysql tables_priv fetch 1
+wait/io/table/sql/handler TABLE mysql tables_priv fetch 1
+wait/io/table/sql/handler TABLE mysql procs_priv fetch 1
+wait/io/table/sql/handler TABLE mysql servers fetch 1
+wait/io/table/sql/handler TABLE mysql table_stats fetch 1
+wait/io/table/sql/handler TABLE mysql column_stats fetch 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test marker insert 1
+show global status like 'performance_schema_%';
Variable_name Value
Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
Performance_schema_cond_instances_lost 0
Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
Performance_schema_file_handles_lost 0
Performance_schema_file_instances_lost 0
Performance_schema_hosts_lost 0
+Performance_schema_index_stat_lost 0
Performance_schema_locker_lost 0
+Performance_schema_memory_classes_lost 0
+Performance_schema_metadata_lock_lost 0
+Performance_schema_mutex_classes_lost 0
Performance_schema_mutex_instances_lost 0
+Performance_schema_nested_statement_lost 0
+Performance_schema_prepared_statements_lost 0
+Performance_schema_program_lost 0
+Performance_schema_rwlock_classes_lost 0
Performance_schema_rwlock_instances_lost 0
Performance_schema_session_connect_attrs_lost 0
+Performance_schema_socket_classes_lost 0
Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
Performance_schema_table_handles_lost 0
Performance_schema_table_instances_lost 0
+Performance_schema_table_lock_stat_lost 0
+Performance_schema_thread_classes_lost 0
Performance_schema_thread_instances_lost 0
Performance_schema_users_lost 0
truncate performance_schema.events_waits_history_long;
diff --git a/mysql-test/suite/perfschema/r/query_cache.result b/mysql-test/suite/perfschema/r/query_cache.result
index ae64c90582c..a84fff60431 100644
--- a/mysql-test/suite/perfschema/r/query_cache.result
+++ b/mysql-test/suite/perfschema/r/query_cache.result
@@ -11,13 +11,13 @@ a
1
2
3
-show status like "Qcache_queries_in_cache";
+show global status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 1
-show status like "Qcache_inserts";
+show global status like "Qcache_inserts";
Variable_name Value
Qcache_inserts 1
-show status like "Qcache_hits";
+show global status like "Qcache_hits";
Variable_name Value
Qcache_hits 0
select * from t1;
@@ -25,13 +25,13 @@ a
1
2
3
-show status like "Qcache_queries_in_cache";
+show global status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 1
-show status like "Qcache_inserts";
+show global status like "Qcache_inserts";
Variable_name Value
Qcache_inserts 1
-show status like "Qcache_hits";
+show global status like "Qcache_hits";
Variable_name Value
Qcache_hits 1
select spins from performance_schema.events_waits_current order by event_name limit 1;
@@ -40,13 +40,15 @@ NULL
select * from performance_schema.setup_timers where name='wait';
NAME TIMER_NAME
wait {CYCLE_OR_NANOSECOND}
-show status like "Qcache_queries_in_cache";
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release
+show global status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 1
-show status like "Qcache_inserts";
+show global status like "Qcache_inserts";
Variable_name Value
Qcache_inserts 1
-show status like "Qcache_hits";
+show global status like "Qcache_hits";
Variable_name Value
Qcache_hits 1
select spins from performance_schema.events_waits_current order by event_name limit 1;
@@ -55,13 +57,15 @@ NULL
select * from performance_schema.setup_timers where name='wait';
NAME TIMER_NAME
wait {CYCLE_OR_NANOSECOND}
-show status like "Qcache_queries_in_cache";
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release
+show global status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 1
-show status like "Qcache_inserts";
+show global status like "Qcache_inserts";
Variable_name Value
Qcache_inserts 1
-show status like "Qcache_hits";
+show global status like "Qcache_hits";
Variable_name Value
Qcache_hits 1
SET GLOBAL query_cache_size=@save_query_cache_size;
diff --git a/mysql-test/suite/perfschema/r/read_only.result b/mysql-test/suite/perfschema/r/read_only.result
index 32e3a724b5e..344526bbd63 100644
--- a/mysql-test/suite/perfschema/r/read_only.result
+++ b/mysql-test/suite/perfschema/r/read_only.result
@@ -14,6 +14,7 @@ show grants;
Grants for pfsuser@localhost
GRANT USAGE ON *.* TO `pfsuser`@`localhost`
GRANT SELECT, UPDATE ON `performance_schema`.* TO `pfsuser`@`localhost`
+# Update on perf_schema is allowed in read_only mode.
select * from performance_schema.setup_instruments;
update performance_schema.setup_instruments set enabled='NO';
update performance_schema.setup_instruments set enabled='YES';
@@ -31,7 +32,7 @@ select * from performance_schema.setup_instruments;
update performance_schema.setup_instruments set enabled='NO';
update performance_schema.setup_instruments set enabled='YES';
connection default;
-grant super on *.* to pfsuser@localhost;
+grant READ_ONLY ADMIN on *.* to pfsuser@localhost;
flush privileges;
disconnect con1;
connect con1, localhost, pfsuser, , test;
@@ -40,7 +41,7 @@ select @@global.read_only;
1
show grants;
Grants for pfsuser@localhost
-GRANT SUPER ON *.* TO `pfsuser`@`localhost`
+GRANT READ_ONLY ADMIN ON *.* TO `pfsuser`@`localhost`
GRANT SELECT, UPDATE ON `performance_schema`.* TO `pfsuser`@`localhost`
select * from performance_schema.setup_instruments;
update performance_schema.setup_instruments set enabled='NO';
diff --git a/mysql-test/suite/perfschema/r/relaylog.result b/mysql-test/suite/perfschema/r/relaylog.result
index 3fcf7367b53..ce3e9c04a5e 100644
--- a/mysql-test/suite/perfschema/r/relaylog.result
+++ b/mysql-test/suite/perfschema/r/relaylog.result
@@ -50,7 +50,9 @@ from performance_schema.file_summary_by_event_name
where event_name like "%binlog%" order by event_name;
EVENT_NAME COUNT_READ COUNT_WRITE SUM_NUMBER_OF_BYTES_READ SUM_NUMBER_OF_BYTES_WRITE
wait/io/file/sql/binlog MANY MANY MANY MANY
+wait/io/file/sql/binlog_cache NONE NONE NONE NONE
wait/io/file/sql/binlog_index MANY MANY MANY MANY
+wait/io/file/sql/binlog_index_cache NONE NONE NONE NONE
wait/io/file/sql/binlog_state NONE NONE NONE NONE
select
EVENT_NAME,
@@ -77,7 +79,9 @@ select * from performance_schema.file_summary_by_event_name
where event_name like "%relaylog%" order by event_name;
EVENT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT COUNT_READ SUM_TIMER_READ MIN_TIMER_READ AVG_TIMER_READ MAX_TIMER_READ SUM_NUMBER_OF_BYTES_READ COUNT_WRITE SUM_TIMER_WRITE MIN_TIMER_WRITE AVG_TIMER_WRITE MAX_TIMER_WRITE SUM_NUMBER_OF_BYTES_WRITE COUNT_MISC SUM_TIMER_MISC MIN_TIMER_MISC AVG_TIMER_MISC MAX_TIMER_MISC
wait/io/file/sql/relaylog 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+wait/io/file/sql/relaylog_cache 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
wait/io/file/sql/relaylog_index 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+wait/io/file/sql/relaylog_index_cache 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
select * from performance_schema.events_waits_summary_global_by_event_name
where event_name like "%MYSQL_RELAY_LOG%"
and event_name not like "%MYSQL_RELAY_LOG::update_cond"
@@ -135,7 +139,9 @@ from performance_schema.file_summary_by_event_name
where event_name like "%binlog%" order by event_name;
EVENT_NAME COUNT_READ COUNT_WRITE SUM_NUMBER_OF_BYTES_READ SUM_NUMBER_OF_BYTES_WRITE
wait/io/file/sql/binlog MANY MANY MANY MANY
+wait/io/file/sql/binlog_cache NONE NONE NONE NONE
wait/io/file/sql/binlog_index MANY MANY MANY MANY
+wait/io/file/sql/binlog_index_cache NONE NONE NONE NONE
wait/io/file/sql/binlog_state NONE NONE NONE NONE
select
EVENT_NAME,
@@ -182,7 +188,9 @@ from performance_schema.file_summary_by_event_name
where event_name like "%relaylog%" order by event_name;
EVENT_NAME COUNT_READ COUNT_WRITE SUM_NUMBER_OF_BYTES_READ SUM_NUMBER_OF_BYTES_WRITE
wait/io/file/sql/relaylog MANY MANY MANY MANY
+wait/io/file/sql/relaylog_cache NONE NONE NONE NONE
wait/io/file/sql/relaylog_index MANY MANY MANY MANY
+wait/io/file/sql/relaylog_index_cache NONE NONE NONE NONE
select
EVENT_NAME,
if (count_star > 0, "MANY", "NONE") as COUNT_STAR
diff --git a/mysql-test/suite/perfschema/r/rollback_table_io.result b/mysql-test/suite/perfschema/r/rollback_table_io.result
index a9cc5b1da39..a7946da7eab 100644
--- a/mysql-test/suite/perfschema/r/rollback_table_io.result
+++ b/mysql-test/suite/perfschema/r/rollback_table_io.result
@@ -42,34 +42,48 @@ where event_name like 'wait/io/table/%'
and object_schema in ('test')
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 test t1 fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test t1 delete NULL
-wait/io/table/sql/handler handler.cc: TABLE test t1 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 t1 fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test t1 update NULL
-wait/io/table/sql/handler handler.cc: TABLE test t1 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 t1 insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
-show status where Variable_name like 'performance_schema_%' and
-Variable_name not like 'performance_schema_%_classes_lost';
+wait/io/table/sql/handler TABLE test t1 fetch 1
+wait/io/table/sql/handler TABLE test t1 delete 1
+wait/io/table/sql/handler TABLE test t1 fetch 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test t1 fetch 1
+wait/io/table/sql/handler TABLE test t1 update 1
+wait/io/table/sql/handler TABLE test t1 fetch 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test t1 insert 1
+wait/io/table/sql/handler TABLE test marker insert 1
+show global status like 'performance_schema_%';
Variable_name Value
Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
Performance_schema_cond_instances_lost 0
Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
Performance_schema_file_handles_lost 0
Performance_schema_file_instances_lost 0
Performance_schema_hosts_lost 0
+Performance_schema_index_stat_lost 0
Performance_schema_locker_lost 0
+Performance_schema_memory_classes_lost 0
+Performance_schema_metadata_lock_lost 0
+Performance_schema_mutex_classes_lost 0
Performance_schema_mutex_instances_lost 0
+Performance_schema_nested_statement_lost 0
+Performance_schema_prepared_statements_lost 0
+Performance_schema_program_lost 0
+Performance_schema_rwlock_classes_lost 0
Performance_schema_rwlock_instances_lost 0
Performance_schema_session_connect_attrs_lost 0
+Performance_schema_socket_classes_lost 0
Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
Performance_schema_table_handles_lost 0
Performance_schema_table_instances_lost 0
+Performance_schema_table_lock_stat_lost 0
+Performance_schema_thread_classes_lost 0
Performance_schema_thread_instances_lost 0
Performance_schema_users_lost 0
truncate performance_schema.events_waits_history_long;
diff --git a/mysql-test/suite/perfschema/r/rpl_group_member_stats.result b/mysql-test/suite/perfschema/r/rpl_group_member_stats.result
new file mode 100644
index 00000000000..fd36a774307
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/rpl_group_member_stats.result
@@ -0,0 +1,8 @@
+include/assert.inc [The value of member_id should not be present]
+include/assert.inc [The value of view_id should not be present]
+include/assert.inc [The value of Count_Transactions_in_queue should be 0]
+include/assert.inc [The value of Count_Transactions_checked should be 0]
+include/assert.inc [The value of Count_conflicts_detected should be 0]
+include/assert.inc [The value of Count_Transactions_rows_validating should be 0]
+include/assert.inc [The value of Transactions_Committed_all_members should be 0]
+include/assert.inc [The value of Last_conflict_free_transaction should not be present]
diff --git a/mysql-test/suite/perfschema/r/rpl_group_members.result b/mysql-test/suite/perfschema/r/rpl_group_members.result
new file mode 100644
index 00000000000..2715a0d9f23
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/rpl_group_members.result
@@ -0,0 +1,5 @@
+include/assert.inc [The value of channel name should be empty]
+include/assert.inc [The value of member_id should be empty]
+include/assert.inc [The value of member_host should be empty]
+include/assert.inc [The value of member_port should be empty]
+include/assert.inc [The value of member_state should be empty]
diff --git a/mysql-test/suite/perfschema/r/rpl_gtid_func.result b/mysql-test/suite/perfschema/r/rpl_gtid_func.result
index b07c29a054c..de4b1ea18ca 100644
--- a/mysql-test/suite/perfschema/r/rpl_gtid_func.result
+++ b/mysql-test/suite/perfschema/r/rpl_gtid_func.result
@@ -18,7 +18,7 @@ update performance_schema.setup_instruments
set enabled='YES', timed='NO';
connection master;
select * from performance_schema.setup_instruments
-where timed='NO';
+where timed='NO' and name not like "memory/%";
NAME ENABLED TIMED
select "This better be in the master" as in_master_digest;
in_master_digest
@@ -28,11 +28,27 @@ values ('TABLE', 'master', 'foo', 'YES', 'YES');
select * from performance_schema.setup_objects
order by object_type, object_schema, object_name;
OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
+EVENT % % YES YES
+EVENT information_schema % NO NO
+EVENT mysql % NO NO
+EVENT performance_schema % NO NO
+FUNCTION % % YES YES
+FUNCTION information_schema % NO NO
+FUNCTION mysql % NO NO
+FUNCTION performance_schema % NO NO
+PROCEDURE % % YES YES
+PROCEDURE information_schema % NO NO
+PROCEDURE mysql % NO NO
+PROCEDURE performance_schema % NO NO
TABLE % % YES YES
TABLE information_schema % NO NO
TABLE master foo YES YES
TABLE mysql % NO NO
TABLE performance_schema % NO NO
+TRIGGER % % YES YES
+TRIGGER information_schema % NO NO
+TRIGGER mysql % NO NO
+TRIGGER performance_schema % NO NO
select digest_text, count_star
from performance_schema.events_statements_summary_by_digest
where digest_text like "%in_%_digest%";
@@ -55,11 +71,27 @@ values ('TABLE', 'slave', 'foo', 'YES', 'YES');
select * from performance_schema.setup_objects
order by object_type, object_schema, object_name;
OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
+EVENT % % YES YES
+EVENT information_schema % NO NO
+EVENT mysql % NO NO
+EVENT performance_schema % NO NO
+FUNCTION % % YES YES
+FUNCTION information_schema % NO NO
+FUNCTION mysql % NO NO
+FUNCTION performance_schema % NO NO
+PROCEDURE % % YES YES
+PROCEDURE information_schema % NO NO
+PROCEDURE mysql % NO NO
+PROCEDURE performance_schema % NO NO
TABLE % % YES YES
TABLE information_schema % NO NO
TABLE mysql % NO NO
TABLE performance_schema % NO NO
TABLE slave foo YES YES
+TRIGGER % % YES YES
+TRIGGER information_schema % NO NO
+TRIGGER mysql % NO NO
+TRIGGER performance_schema % NO NO
select digest_text, count_star
from performance_schema.events_statements_summary_by_digest
where digest_text like "%in_%_digest%";
@@ -73,8 +105,24 @@ delete from performance_schema.setup_objects
where object_schema='slave';
select * from performance_schema.setup_objects;
OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
+EVENT mysql % NO NO
+EVENT performance_schema % NO NO
+EVENT information_schema % NO NO
+EVENT % % YES YES
+FUNCTION mysql % NO NO
+FUNCTION performance_schema % NO NO
+FUNCTION information_schema % NO NO
+FUNCTION % % YES YES
+PROCEDURE mysql % NO NO
+PROCEDURE performance_schema % NO NO
+PROCEDURE information_schema % NO NO
+PROCEDURE % % YES YES
TABLE mysql % NO NO
TABLE performance_schema % NO NO
TABLE information_schema % NO NO
TABLE % % YES YES
+TRIGGER mysql % NO NO
+TRIGGER performance_schema % NO NO
+TRIGGER information_schema % NO NO
+TRIGGER % % YES YES
include/rpl_end.inc
diff --git a/mysql-test/suite/perfschema/r/rpl_statements.result b/mysql-test/suite/perfschema/r/rpl_statements.result
index 431b8445309..2027456d978 100644
--- a/mysql-test/suite/perfschema/r/rpl_statements.result
+++ b/mysql-test/suite/perfschema/r/rpl_statements.result
@@ -1,14 +1,14 @@
include/master-slave.inc
[connection master]
-
+#
#
# STEP 1 - CREATE AND REPLICATE TEST TABLES
#
connection master;
-
-*** Create test tables
-
-show variables like 'binlog_format%';
+#
+# *** Create test tables
+#
+show global variables like 'binlog_format%';
Variable_name Value
binlog_format MIXED
drop table if exists test.marker;
@@ -17,73 +17,73 @@ from performance_schema.threads
where processlist_id = connection_id();
create table test.marker(s1 int) engine=innodb;
connection slave;
-
-*** Clear statement events
-
+#
+# *** Clear statement events
+#
#
# STEP 2 - REPLICATE ONE ROW ON MASTER TO GET REPLICATION THREAD ID ON SLAVE
#
connection master;
-
+#
insert into test.marker values (0);
-
+#
connection slave;
-
-*** Verify row, get replication thread id, clear statement events
-
+#
+# *** Verify row, get replication thread id, clear statement events
+#
select thread_id into @slave_thread_id from performance_schema.events_statements_history
where sql_text like '%marker%';
-*** Verify row inserted on master was replicated
+# *** Verify row inserted on master was replicated
select count(*) = 1 as 'Expect 1' from test.marker;
Expect 1
1
-*** Clear statement events
-
+# *** Clear statement events
+#
#
# STEP 3 - PERFORM DML STATEMENTS ON MASTER
#
connection master;
-
-show variables like 'binlog_format%';
+#
+show global variables like 'binlog_format%';
Variable_name Value
binlog_format MIXED
-*** Clear statement events
-
-*** Create/drop table, create/drop database
-
+# *** Clear statement events
+#
+# *** Create/drop table, create/drop database
+#
create database marker1_db;
create database marker2_db;
create table marker1_db.table1 (s1 int) engine=innodb;
create table marker2_db.table1 (s1 int) engine=innodb;
create table marker2_db.table2 (s1 int) engine=innodb;
-
-*** Transaction
+#
+# *** Transaction
start transaction;
insert into marker1_db.table1 values (1), (2), (3);
insert into marker2_db.table1 values (1), (2), (3);
commit;
-
-*** Alter
+#
+# *** Alter
alter table marker1_db.table1 add column (s2 varchar(32));
-
-*** Insert, Update
+#
+# *** Insert, Update
start transaction;
insert into marker1_db.table1 values (4, 'four'), (5, 'five'), (6, 'six');
update marker1_db.table1 set s1 = s1 + 1;
commit;
-
-*** Rollback
+#
+# *** Rollback
start transaction;
insert into marker1_db.table1 values (7, 'seven'), (8, 'eight'), (9, 'nine');
rollback;
-
-*** Autocommit, Delete, Drop
+#
+# *** Autocommit, Delete, Drop
delete from marker1_db.table1 where s1 > 4;
drop table marker2_db.table1;
drop database marker2_db;
-
-*** Examine statements events that will be compared on the slave
-
+#
+# *** Examine statements events that will be compared on the slave
+#
select thread_id, event_id, rpad(event_name, 28, ' ') event_name, rpad(current_schema, 10, ' ') current_schema, rpad(digest_text, 72, ' ') digest_text, sql_text from performance_schema.events_statements_history_long
where sql_text like '%marker%' order by event_id;
thread_id event_id event_name current_schema digest_text sql_text
@@ -101,13 +101,13 @@ thread_id event_id event_name current_schema digest_text sql_text
[THREAD_ID] [EVENT_ID] statement/sql/delete test DELETE FROM `marker1_db` . `table1` WHERE `s1` > ? delete from marker1_db.table1 where s1 > 4
[THREAD_ID] [EVENT_ID] statement/sql/drop_table test DROP TABLE `marker2_db` . `table1` drop table marker2_db.table1
[THREAD_ID] [EVENT_ID] statement/sql/drop_db test DROP SCHEMA `marker2_db` drop database marker2_db
-
+#
#
# STEP 4 - REPLICATE STATEMENT EVENTS ON MASTER TO SLAVE
#
-
-*** Store statement events in holding table, then replicate
-
+#
+# *** Store statement events in holding table, then replicate
+#
#
# Create table to hold statement events for later comparison on the slave
#
@@ -115,14 +115,14 @@ create table test.master_events_statements_history_long as
(select thread_id, event_id, event_name, sql_text, digest, digest_text, current_schema, rows_affected
from performance_schema.events_statements_history_long
where (thread_id=@my_thread_id and digest_text like '%marker%'));
-
+#
#
# STEP 5 - VERIFY DML AND DDL STATEMENT EVENTS ON SLAVE
#
connection slave;
-
-*** List statement events from master
-
+#
+# *** List statement events from master
+#
select thread_id, event_id, rpad(event_name, 28, ' ') event_name, rpad(current_schema, 10, ' ') current_schema, rpad(digest_text, 72, ' ') digest_text, sql_text from master_events_statements_history_long order by event_id;
thread_id event_id event_name current_schema digest_text sql_text
[THREAD_ID] [EVENT_ID] statement/sql/create_db test CREATE SCHEMA `marker1_db` create database marker1_db
@@ -139,9 +139,9 @@ thread_id event_id event_name current_schema digest_text sql_text
[THREAD_ID] [EVENT_ID] statement/sql/delete test DELETE FROM `marker1_db` . `table1` WHERE `s1` > ? delete from marker1_db.table1 where s1 > 4
[THREAD_ID] [EVENT_ID] statement/sql/drop_table test DROP TABLE `marker2_db` . `table1` drop table marker2_db.table1
[THREAD_ID] [EVENT_ID] statement/sql/drop_db test DROP SCHEMA `marker2_db` drop database marker2_db
-
-*** List statement events on slave
-
+#
+# *** List statement events on slave
+#
select thread_id, event_id, rpad(event_name, 28, ' ') event_name, rpad(current_schema, 10, ' ') current_schema, rpad(digest_text, 72, ' ') digest_text, sql_text from performance_schema.events_statements_history_long
where thread_id = @slave_thread_id and sql_text like '%marker%' order by event_id;
thread_id event_id event_name current_schema digest_text sql_text
@@ -158,11 +158,11 @@ thread_id event_id event_name current_schema digest_text sql_text
[THREAD_ID] [EVENT_ID] statement/sql/delete test DELETE FROM `marker1_db` . `table1` WHERE `s1` > ? delete from marker1_db.table1 where s1 > 4
[THREAD_ID] [EVENT_ID] statement/sql/drop_table test DROP TABLE `marker2_db` . `table1` DROP TABLE `marker2_db`.`table1` /* generated by server */
[THREAD_ID] [EVENT_ID] statement/sql/drop_db marker2_db DROP SCHEMA `marker2_db` drop database marker2_db
+#
+# *** Compare master and slave events
+#
-*** Compare master and slave events
-
-
-*** Event name comparison - expect 0 mismatches
+# *** Event name comparison - expect 0 mismatches
select thread_id, event_id, event_name, digest_text, sql_text from performance_schema.events_statements_history_long t1
where t1.thread_id = @slave_thread_id and
@@ -170,14 +170,14 @@ sql_text like '%marker%' and
not exists (select * from master_events_statements_history_long t2 where t2.event_name = t1.event_name);
thread_id event_id event_name digest_text sql_text
-*** Statement digest comparison - expect 1 mismatch for DROP TABLE
+# *** Statement digest comparison - expect 1 mismatch for DROP TABLE
select thread_id, event_id, event_name, digest, digest_text, sql_text from performance_schema.events_statements_history_long t1
where t1.thread_id = @slave_thread_id and
sql_text like '%marker%' and
not exists (select * from master_events_statements_history_long t2 where t2.digest = t1.digest);
thread_id event_id event_name digest digest_text sql_text
-
+#
#
# STEP 6 - DISABLE REPLICATED STATEMENT EVENTS ON SLAVE
#
@@ -186,38 +186,38 @@ update performance_schema.setup_instruments set enabled='no', timed='no'
select * from performance_schema.setup_instruments where name like '%statement/abstract/relay_log%';
NAME ENABLED TIMED
statement/abstract/relay_log NO NO
-
+#
#
# STEP 7 - UPDATE TABLES ON MASTER, REPLICATE
#
connection master;
-
-*** Clear statement events
-*** Update some tables, then replicate
-
+#
+# *** Clear statement events
+# *** Update some tables, then replicate
+#
insert into marker1_db.table1 values (999, '999'), (998, '998'), (997, '997');
-
+#
#
# STEP 8 - VERIFY TABLE UPDATES FROM MASTER, EXPECT NO STATEMENT EVENTS ON SLAVE
#
connection slave;
-
-*** Confirm rows were replicated
-
+#
+# *** Confirm rows were replicated
+#
select * from marker1_db.table1 where s1 > 900 order by s1;
s1 s2
997 997
998 998
999 999
-
-*** Confirm that are no statements events from the replication thread
-
+#
+# *** Confirm that are no statements events from the replication thread
+#
select * from performance_schema.events_statements_history_long
where thread_id = @slave_thread_id;
-THREAD_ID EVENT_ID END_EVENT_ID EVENT_NAME SOURCE TIMER_START TIMER_END TIMER_WAIT LOCK_TIME SQL_TEXT DIGEST DIGEST_TEXT CURRENT_SCHEMA OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME OBJECT_INSTANCE_BEGIN MYSQL_ERRNO RETURNED_SQLSTATE MESSAGE_TEXT ERRORS WARNINGS ROWS_AFFECTED ROWS_SENT ROWS_EXAMINED CREATED_TMP_DISK_TABLES CREATED_TMP_TABLES SELECT_FULL_JOIN SELECT_FULL_RANGE_JOIN SELECT_RANGE SELECT_RANGE_CHECK SELECT_SCAN SORT_MERGE_PASSES SORT_RANGE SORT_ROWS SORT_SCAN NO_INDEX_USED NO_GOOD_INDEX_USED NESTING_EVENT_ID NESTING_EVENT_TYPE
-
+THREAD_ID EVENT_ID END_EVENT_ID EVENT_NAME SOURCE TIMER_START TIMER_END TIMER_WAIT LOCK_TIME SQL_TEXT DIGEST DIGEST_TEXT CURRENT_SCHEMA OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME OBJECT_INSTANCE_BEGIN MYSQL_ERRNO RETURNED_SQLSTATE MESSAGE_TEXT ERRORS WARNINGS ROWS_AFFECTED ROWS_SENT ROWS_EXAMINED CREATED_TMP_DISK_TABLES CREATED_TMP_TABLES SELECT_FULL_JOIN SELECT_FULL_RANGE_JOIN SELECT_RANGE SELECT_RANGE_CHECK SELECT_SCAN SORT_MERGE_PASSES SORT_RANGE SORT_ROWS SORT_SCAN NO_INDEX_USED NO_GOOD_INDEX_USED NESTING_EVENT_ID NESTING_EVENT_TYPE NESTING_EVENT_LEVEL
+#
#
# STEP 9 - CLEAN UP
#
-
+#
include/rpl_end.inc
diff --git a/mysql-test/suite/perfschema/r/rpl_threads.result b/mysql-test/suite/perfschema/r/rpl_threads.result
new file mode 100644
index 00000000000..c756b4d9046
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/rpl_threads.result
@@ -0,0 +1,61 @@
+include/master-slave.inc
+[connection master]
+drop table if exists test.t1;
+connection slave;
+reset master;
+create table test.t1(a int);
+drop table test.t1;
+include/show_binlog_events.inc
+Log_name Pos Event_type Server_id End_log_pos Info
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `test`; create table test.t1(a int)
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */
+connection master;
+"============ Performance schema on master ============"
+select ID from INFORMATION_SCHEMA.PROCESSLIST
+where COMMAND = "Binlog Dump"
+ into @master_dump_pid;
+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 COMMAND, STATE
+from INFORMATION_SCHEMA.PROCESSLIST
+where ID = @master_dump_pid;
+COMMAND STATE
+Binlog Dump Master has sent all binlog to slave; waiting for more updates
+select NAME, TYPE, PROCESSLIST_COMMAND, PROCESSLIST_STATE
+from performance_schema.threads
+where PROCESSLIST_ID = @master_dump_pid;
+NAME TYPE PROCESSLIST_COMMAND PROCESSLIST_STATE
+thread/sql/one_connection FOREGROUND Binlog Dump Master has sent all binlog to slave; waiting for more updates
+connection slave;
+"============ Performance schema on slave ============"
+select ID from INFORMATION_SCHEMA.PROCESSLIST
+where STATE like "Waiting for master to send event%"
+ into @slave_io_pid;
+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 COMMAND, STATE
+from INFORMATION_SCHEMA.PROCESSLIST
+where ID = @slave_io_pid;
+COMMAND STATE
+Slave_IO Waiting for master to send event
+select NAME, TYPE, PROCESSLIST_COMMAND, PROCESSLIST_STATE
+from performance_schema.threads
+where PROCESSLIST_ID = @slave_io_pid;
+NAME TYPE PROCESSLIST_COMMAND PROCESSLIST_STATE
+select ID from INFORMATION_SCHEMA.PROCESSLIST
+where STATE like "Slave has read all relay log%"
+ into @slave_sql_pid;
+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 COMMAND, STATE
+from INFORMATION_SCHEMA.PROCESSLIST
+where ID = @slave_sql_pid;
+COMMAND STATE
+Slave_SQL Slave has read all relay log; waiting for more updates
+select NAME, TYPE, PROCESSLIST_COMMAND, PROCESSLIST_STATE
+from performance_schema.threads
+where PROCESSLIST_ID = @slave_sql_pid;
+NAME TYPE PROCESSLIST_COMMAND PROCESSLIST_STATE
+include/rpl_end.inc
diff --git a/mysql-test/suite/perfschema/r/schema.result b/mysql-test/suite/perfschema/r/schema.result
index 8b3e5eff8b7..2eb58a1d43a 100644
--- a/mysql-test/suite/perfschema/r/schema.result
+++ b/mysql-test/suite/perfschema/r/schema.result
@@ -23,9 +23,18 @@ events_statements_history_long
events_statements_summary_by_account_by_event_name
events_statements_summary_by_digest
events_statements_summary_by_host_by_event_name
+events_statements_summary_by_program
events_statements_summary_by_thread_by_event_name
events_statements_summary_by_user_by_event_name
events_statements_summary_global_by_event_name
+events_transactions_current
+events_transactions_history
+events_transactions_history_long
+events_transactions_summary_by_account_by_event_name
+events_transactions_summary_by_host_by_event_name
+events_transactions_summary_by_thread_by_event_name
+events_transactions_summary_by_user_by_event_name
+events_transactions_summary_global_by_event_name
events_waits_current
events_waits_history
events_waits_history_long
@@ -38,14 +47,27 @@ events_waits_summary_global_by_event_name
file_instances
file_summary_by_event_name
file_summary_by_instance
+global_status
host_cache
hosts
+memory_summary_by_account_by_event_name
+memory_summary_by_host_by_event_name
+memory_summary_by_thread_by_event_name
+memory_summary_by_user_by_event_name
+memory_summary_global_by_event_name
+metadata_locks
mutex_instances
objects_summary_global_by_type
performance_timers
+prepared_statements_instances
+replication_applier_configuration
+replication_applier_status
+replication_applier_status_by_coordinator
+replication_connection_configuration
rwlock_instances
session_account_connect_attrs
session_connect_attrs
+session_status
setup_actors
setup_consumers
setup_instruments
@@ -54,10 +76,16 @@ setup_timers
socket_instances
socket_summary_by_event_name
socket_summary_by_instance
+status_by_account
+status_by_host
+status_by_thread
+status_by_user
+table_handles
table_io_waits_summary_by_index_usage
table_io_waits_summary_by_table
table_lock_waits_summary_by_table
threads
+user_variables_by_thread
users
show create table accounts;
Table Create Table
@@ -84,8 +112,10 @@ events_stages_current CREATE TABLE `events_stages_current` (
`TIMER_START` bigint(20) unsigned DEFAULT NULL COMMENT 'Value in picoseconds when the event timing started or NULL if timing is not collected.',
`TIMER_END` bigint(20) unsigned DEFAULT NULL COMMENT 'Value in picoseconds when the event timing ended, or NULL if the event has not ended or timing is not collected.',
`TIMER_WAIT` bigint(20) unsigned DEFAULT NULL COMMENT 'Value in picoseconds of the event''s duration or NULL if the event has not ended or timing is not collected.',
+ `WORK_COMPLETED` bigint(20) unsigned DEFAULT NULL,
+ `WORK_ESTIMATED` bigint(20) unsigned DEFAULT NULL,
`NESTING_EVENT_ID` bigint(20) unsigned DEFAULT NULL COMMENT 'EVENT_ID of event within which this event nests.',
- `NESTING_EVENT_TYPE` enum('STATEMENT','STAGE','WAIT') DEFAULT NULL COMMENT 'Nesting event type. Either statement, stage or wait.'
+ `NESTING_EVENT_TYPE` enum('TRANSACTION','STATEMENT','STAGE','WAIT') DEFAULT NULL COMMENT 'Nesting event type. Either statement, stage or wait.'
) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
show create table events_stages_history;
Table Create Table
@@ -98,8 +128,10 @@ events_stages_history CREATE TABLE `events_stages_history` (
`TIMER_START` bigint(20) unsigned DEFAULT NULL COMMENT 'Value in picoseconds when the event timing started or NULL if timing is not collected.',
`TIMER_END` bigint(20) unsigned DEFAULT NULL COMMENT 'Value in picoseconds when the event timing ended, or NULL if the event has not ended or timing is not collected.',
`TIMER_WAIT` bigint(20) unsigned DEFAULT NULL COMMENT 'Value in picoseconds of the event''s duration or NULL if the event has not ended or timing is not collected.',
+ `WORK_COMPLETED` bigint(20) unsigned DEFAULT NULL,
+ `WORK_ESTIMATED` bigint(20) unsigned DEFAULT NULL,
`NESTING_EVENT_ID` bigint(20) unsigned DEFAULT NULL COMMENT 'EVENT_ID of event within which this event nests.',
- `NESTING_EVENT_TYPE` enum('STATEMENT','STAGE','WAIT') DEFAULT NULL COMMENT 'Nesting event type. Either statement, stage or wait.'
+ `NESTING_EVENT_TYPE` enum('TRANSACTION','STATEMENT','STAGE','WAIT') DEFAULT NULL COMMENT 'Nesting event type. Either statement, stage or wait.'
) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
show create table events_stages_history_long;
Table Create Table
@@ -112,8 +144,10 @@ events_stages_history_long CREATE TABLE `events_stages_history_long` (
`TIMER_START` bigint(20) unsigned DEFAULT NULL COMMENT 'Value in picoseconds when the event timing started or NULL if timing is not collected.',
`TIMER_END` bigint(20) unsigned DEFAULT NULL COMMENT 'Value in picoseconds when the event timing ended, or NULL if the event has not ended or timing is not collected.',
`TIMER_WAIT` bigint(20) unsigned DEFAULT NULL COMMENT 'Value in picoseconds of the event''s duration or NULL if the event has not ended or timing is not collected.',
+ `WORK_COMPLETED` bigint(20) unsigned DEFAULT NULL,
+ `WORK_ESTIMATED` bigint(20) unsigned DEFAULT NULL,
`NESTING_EVENT_ID` bigint(20) unsigned DEFAULT NULL COMMENT 'EVENT_ID of event within which this event nests.',
- `NESTING_EVENT_TYPE` enum('STATEMENT','STAGE','WAIT') DEFAULT NULL COMMENT 'Nesting event type. Either statement, stage or wait.'
+ `NESTING_EVENT_TYPE` enum('TRANSACTION','STATEMENT','STAGE','WAIT') DEFAULT NULL COMMENT 'Nesting event type. Either statement, stage or wait.'
) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
show create table events_stages_summary_by_host_by_event_name;
Table Create Table
@@ -212,7 +246,8 @@ events_statements_current CREATE TABLE `events_statements_current` (
`NO_INDEX_USED` bigint(20) unsigned NOT NULL COMMENT '0 if the statement performed a table scan with an index, 1 if without an index.',
`NO_GOOD_INDEX_USED` bigint(20) unsigned NOT NULL COMMENT '0 if a good index was found for the statement, 1 if no good index was found. See the Range checked for each record description in the EXPLAIN article.',
`NESTING_EVENT_ID` bigint(20) unsigned DEFAULT NULL COMMENT 'Reserved, currently NULL.',
- `NESTING_EVENT_TYPE` enum('STATEMENT','STAGE','WAIT') DEFAULT NULL COMMENT 'Reserved, currently NULL.'
+ `NESTING_EVENT_TYPE` enum('TRANSACTION','STATEMENT','STAGE','WAIT') DEFAULT NULL COMMENT 'Reserved, currently NULL.',
+ `NESTING_EVENT_LEVEL` int(11) DEFAULT NULL
) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
show create table events_statements_history;
Table Create Table
@@ -256,7 +291,8 @@ events_statements_history CREATE TABLE `events_statements_history` (
`NO_INDEX_USED` bigint(20) unsigned NOT NULL COMMENT '0 if the statement performed a table scan with an index, 1 if without an index.',
`NO_GOOD_INDEX_USED` bigint(20) unsigned NOT NULL COMMENT '0 if a good index was found for the statement, 1 if no good index was found. See the Range checked for each record description in the EXPLAIN article.',
`NESTING_EVENT_ID` bigint(20) unsigned DEFAULT NULL COMMENT 'Reserved, currently NULL.',
- `NESTING_EVENT_TYPE` enum('STATEMENT','STAGE','WAIT') DEFAULT NULL COMMENT 'Reserved, currently NULL.'
+ `NESTING_EVENT_TYPE` enum('TRANSACTION','STATEMENT','STAGE','WAIT') DEFAULT NULL COMMENT 'Reserved, currently NULL.',
+ `NESTING_EVENT_LEVEL` int(11) DEFAULT NULL
) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
show create table events_statements_history_long;
Table Create Table
@@ -300,7 +336,8 @@ events_statements_history_long CREATE TABLE `events_statements_history_long` (
`NO_INDEX_USED` bigint(20) unsigned NOT NULL COMMENT '0 if the statement performed a table scan with an index, 1 if without an index.',
`NO_GOOD_INDEX_USED` bigint(20) unsigned NOT NULL COMMENT '0 if a good index was found for the statement, 1 if no good index was found. See the Range checked for each record description in the EXPLAIN article.',
`NESTING_EVENT_ID` bigint(20) unsigned DEFAULT NULL COMMENT 'Reserved, currently NULL.',
- `NESTING_EVENT_TYPE` enum('STATEMENT','STAGE','WAIT') DEFAULT NULL COMMENT 'Reserved, currently NULL.'
+ `NESTING_EVENT_TYPE` enum('TRANSACTION','STATEMENT','STAGE','WAIT') DEFAULT NULL COMMENT 'Reserved, currently NULL.',
+ `NESTING_EVENT_LEVEL` int(11) DEFAULT NULL
) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
show create table events_statements_summary_by_digest;
Table Create Table
@@ -485,6 +522,195 @@ events_statements_summary_global_by_event_name CREATE TABLE `events_statements_s
`SUM_NO_INDEX_USED` bigint(20) unsigned NOT NULL COMMENT 'Sum of the NO_INDEX_USED column in the events_statements_current table.',
`SUM_NO_GOOD_INDEX_USED` bigint(20) unsigned NOT NULL COMMENT 'Sum of the NO_GOOD_INDEX_USED column in the events_statements_current table.'
) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table events_transactions_current;
+Table Create Table
+events_transactions_current CREATE TABLE `events_transactions_current` (
+ `THREAD_ID` bigint(20) unsigned NOT NULL,
+ `EVENT_ID` bigint(20) unsigned NOT NULL,
+ `END_EVENT_ID` bigint(20) unsigned DEFAULT NULL,
+ `EVENT_NAME` varchar(128) NOT NULL,
+ `STATE` enum('ACTIVE','COMMITTED','ROLLED BACK') DEFAULT NULL,
+ `TRX_ID` bigint(20) unsigned DEFAULT NULL,
+ `GTID` varchar(64) DEFAULT NULL,
+ `XID_FORMAT_ID` int(11) DEFAULT NULL,
+ `XID_GTRID` varchar(130) DEFAULT NULL,
+ `XID_BQUAL` varchar(130) DEFAULT NULL,
+ `XA_STATE` varchar(64) DEFAULT NULL,
+ `SOURCE` varchar(64) DEFAULT NULL,
+ `TIMER_START` bigint(20) unsigned DEFAULT NULL,
+ `TIMER_END` bigint(20) unsigned DEFAULT NULL,
+ `TIMER_WAIT` bigint(20) unsigned DEFAULT NULL,
+ `ACCESS_MODE` enum('READ ONLY','READ WRITE') DEFAULT NULL,
+ `ISOLATION_LEVEL` varchar(64) DEFAULT NULL,
+ `AUTOCOMMIT` enum('YES','NO') NOT NULL,
+ `NUMBER_OF_SAVEPOINTS` bigint(20) unsigned DEFAULT NULL,
+ `NUMBER_OF_ROLLBACK_TO_SAVEPOINT` bigint(20) unsigned DEFAULT NULL,
+ `NUMBER_OF_RELEASE_SAVEPOINT` bigint(20) unsigned DEFAULT NULL,
+ `OBJECT_INSTANCE_BEGIN` bigint(20) unsigned DEFAULT NULL,
+ `NESTING_EVENT_ID` bigint(20) unsigned DEFAULT NULL,
+ `NESTING_EVENT_TYPE` enum('TRANSACTION','STATEMENT','STAGE','WAIT') DEFAULT NULL
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table events_transactions_history;
+Table Create Table
+events_transactions_history CREATE TABLE `events_transactions_history` (
+ `THREAD_ID` bigint(20) unsigned NOT NULL,
+ `EVENT_ID` bigint(20) unsigned NOT NULL,
+ `END_EVENT_ID` bigint(20) unsigned DEFAULT NULL,
+ `EVENT_NAME` varchar(128) NOT NULL,
+ `STATE` enum('ACTIVE','COMMITTED','ROLLED BACK') DEFAULT NULL,
+ `TRX_ID` bigint(20) unsigned DEFAULT NULL,
+ `GTID` varchar(64) DEFAULT NULL,
+ `XID_FORMAT_ID` int(11) DEFAULT NULL,
+ `XID_GTRID` varchar(130) DEFAULT NULL,
+ `XID_BQUAL` varchar(130) DEFAULT NULL,
+ `XA_STATE` varchar(64) DEFAULT NULL,
+ `SOURCE` varchar(64) DEFAULT NULL,
+ `TIMER_START` bigint(20) unsigned DEFAULT NULL,
+ `TIMER_END` bigint(20) unsigned DEFAULT NULL,
+ `TIMER_WAIT` bigint(20) unsigned DEFAULT NULL,
+ `ACCESS_MODE` enum('READ ONLY','READ WRITE') DEFAULT NULL,
+ `ISOLATION_LEVEL` varchar(64) DEFAULT NULL,
+ `AUTOCOMMIT` enum('YES','NO') NOT NULL,
+ `NUMBER_OF_SAVEPOINTS` bigint(20) unsigned DEFAULT NULL,
+ `NUMBER_OF_ROLLBACK_TO_SAVEPOINT` bigint(20) unsigned DEFAULT NULL,
+ `NUMBER_OF_RELEASE_SAVEPOINT` bigint(20) unsigned DEFAULT NULL,
+ `OBJECT_INSTANCE_BEGIN` bigint(20) unsigned DEFAULT NULL,
+ `NESTING_EVENT_ID` bigint(20) unsigned DEFAULT NULL,
+ `NESTING_EVENT_TYPE` enum('TRANSACTION','STATEMENT','STAGE','WAIT') DEFAULT NULL
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table events_transactions_history_long;
+Table Create Table
+events_transactions_history_long CREATE TABLE `events_transactions_history_long` (
+ `THREAD_ID` bigint(20) unsigned NOT NULL,
+ `EVENT_ID` bigint(20) unsigned NOT NULL,
+ `END_EVENT_ID` bigint(20) unsigned DEFAULT NULL,
+ `EVENT_NAME` varchar(128) NOT NULL,
+ `STATE` enum('ACTIVE','COMMITTED','ROLLED BACK') DEFAULT NULL,
+ `TRX_ID` bigint(20) unsigned DEFAULT NULL,
+ `GTID` varchar(64) DEFAULT NULL,
+ `XID_FORMAT_ID` int(11) DEFAULT NULL,
+ `XID_GTRID` varchar(130) DEFAULT NULL,
+ `XID_BQUAL` varchar(130) DEFAULT NULL,
+ `XA_STATE` varchar(64) DEFAULT NULL,
+ `SOURCE` varchar(64) DEFAULT NULL,
+ `TIMER_START` bigint(20) unsigned DEFAULT NULL,
+ `TIMER_END` bigint(20) unsigned DEFAULT NULL,
+ `TIMER_WAIT` bigint(20) unsigned DEFAULT NULL,
+ `ACCESS_MODE` enum('READ ONLY','READ WRITE') DEFAULT NULL,
+ `ISOLATION_LEVEL` varchar(64) DEFAULT NULL,
+ `AUTOCOMMIT` enum('YES','NO') NOT NULL,
+ `NUMBER_OF_SAVEPOINTS` bigint(20) unsigned DEFAULT NULL,
+ `NUMBER_OF_ROLLBACK_TO_SAVEPOINT` bigint(20) unsigned DEFAULT NULL,
+ `NUMBER_OF_RELEASE_SAVEPOINT` bigint(20) unsigned DEFAULT NULL,
+ `OBJECT_INSTANCE_BEGIN` bigint(20) unsigned DEFAULT NULL,
+ `NESTING_EVENT_ID` bigint(20) unsigned DEFAULT NULL,
+ `NESTING_EVENT_TYPE` enum('TRANSACTION','STATEMENT','STAGE','WAIT') DEFAULT NULL
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table events_transactions_summary_by_host_by_event_name;
+Table Create Table
+events_transactions_summary_by_host_by_event_name CREATE TABLE `events_transactions_summary_by_host_by_event_name` (
+ `HOST` char(60) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
+ `EVENT_NAME` varchar(128) NOT NULL,
+ `COUNT_STAR` bigint(20) unsigned NOT NULL,
+ `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `MIN_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `AVG_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `MAX_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `COUNT_READ_WRITE` bigint(20) unsigned NOT NULL,
+ `SUM_TIMER_READ_WRITE` bigint(20) unsigned NOT NULL,
+ `MIN_TIMER_READ_WRITE` bigint(20) unsigned NOT NULL,
+ `AVG_TIMER_READ_WRITE` bigint(20) unsigned NOT NULL,
+ `MAX_TIMER_READ_WRITE` bigint(20) unsigned NOT NULL,
+ `COUNT_READ_ONLY` bigint(20) unsigned NOT NULL,
+ `SUM_TIMER_READ_ONLY` bigint(20) unsigned NOT NULL,
+ `MIN_TIMER_READ_ONLY` bigint(20) unsigned NOT NULL,
+ `AVG_TIMER_READ_ONLY` bigint(20) unsigned NOT NULL,
+ `MAX_TIMER_READ_ONLY` bigint(20) unsigned NOT NULL
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table events_transactions_summary_by_thread_by_event_name;
+Table Create Table
+events_transactions_summary_by_thread_by_event_name CREATE TABLE `events_transactions_summary_by_thread_by_event_name` (
+ `THREAD_ID` bigint(20) unsigned NOT NULL,
+ `EVENT_NAME` varchar(128) NOT NULL,
+ `COUNT_STAR` bigint(20) unsigned NOT NULL,
+ `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `MIN_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `AVG_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `MAX_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `COUNT_READ_WRITE` bigint(20) unsigned NOT NULL,
+ `SUM_TIMER_READ_WRITE` bigint(20) unsigned NOT NULL,
+ `MIN_TIMER_READ_WRITE` bigint(20) unsigned NOT NULL,
+ `AVG_TIMER_READ_WRITE` bigint(20) unsigned NOT NULL,
+ `MAX_TIMER_READ_WRITE` bigint(20) unsigned NOT NULL,
+ `COUNT_READ_ONLY` bigint(20) unsigned NOT NULL,
+ `SUM_TIMER_READ_ONLY` bigint(20) unsigned NOT NULL,
+ `MIN_TIMER_READ_ONLY` bigint(20) unsigned NOT NULL,
+ `AVG_TIMER_READ_ONLY` bigint(20) unsigned NOT NULL,
+ `MAX_TIMER_READ_ONLY` bigint(20) unsigned NOT NULL
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table events_transactions_summary_by_user_by_event_name;
+Table Create Table
+events_transactions_summary_by_user_by_event_name CREATE TABLE `events_transactions_summary_by_user_by_event_name` (
+ `USER` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
+ `EVENT_NAME` varchar(128) NOT NULL,
+ `COUNT_STAR` bigint(20) unsigned NOT NULL,
+ `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `MIN_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `AVG_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `MAX_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `COUNT_READ_WRITE` bigint(20) unsigned NOT NULL,
+ `SUM_TIMER_READ_WRITE` bigint(20) unsigned NOT NULL,
+ `MIN_TIMER_READ_WRITE` bigint(20) unsigned NOT NULL,
+ `AVG_TIMER_READ_WRITE` bigint(20) unsigned NOT NULL,
+ `MAX_TIMER_READ_WRITE` bigint(20) unsigned NOT NULL,
+ `COUNT_READ_ONLY` bigint(20) unsigned NOT NULL,
+ `SUM_TIMER_READ_ONLY` bigint(20) unsigned NOT NULL,
+ `MIN_TIMER_READ_ONLY` bigint(20) unsigned NOT NULL,
+ `AVG_TIMER_READ_ONLY` bigint(20) unsigned NOT NULL,
+ `MAX_TIMER_READ_ONLY` bigint(20) unsigned NOT NULL
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table events_transactions_summary_by_account_by_event_name;
+Table Create Table
+events_transactions_summary_by_account_by_event_name CREATE TABLE `events_transactions_summary_by_account_by_event_name` (
+ `USER` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
+ `HOST` char(60) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
+ `EVENT_NAME` varchar(128) NOT NULL,
+ `COUNT_STAR` bigint(20) unsigned NOT NULL,
+ `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `MIN_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `AVG_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `MAX_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `COUNT_READ_WRITE` bigint(20) unsigned NOT NULL,
+ `SUM_TIMER_READ_WRITE` bigint(20) unsigned NOT NULL,
+ `MIN_TIMER_READ_WRITE` bigint(20) unsigned NOT NULL,
+ `AVG_TIMER_READ_WRITE` bigint(20) unsigned NOT NULL,
+ `MAX_TIMER_READ_WRITE` bigint(20) unsigned NOT NULL,
+ `COUNT_READ_ONLY` bigint(20) unsigned NOT NULL,
+ `SUM_TIMER_READ_ONLY` bigint(20) unsigned NOT NULL,
+ `MIN_TIMER_READ_ONLY` bigint(20) unsigned NOT NULL,
+ `AVG_TIMER_READ_ONLY` bigint(20) unsigned NOT NULL,
+ `MAX_TIMER_READ_ONLY` bigint(20) unsigned NOT NULL
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table events_transactions_summary_global_by_event_name;
+Table Create Table
+events_transactions_summary_global_by_event_name CREATE TABLE `events_transactions_summary_global_by_event_name` (
+ `EVENT_NAME` varchar(128) NOT NULL,
+ `COUNT_STAR` bigint(20) unsigned NOT NULL,
+ `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `MIN_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `AVG_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `MAX_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `COUNT_READ_WRITE` bigint(20) unsigned NOT NULL,
+ `SUM_TIMER_READ_WRITE` bigint(20) unsigned NOT NULL,
+ `MIN_TIMER_READ_WRITE` bigint(20) unsigned NOT NULL,
+ `AVG_TIMER_READ_WRITE` bigint(20) unsigned NOT NULL,
+ `MAX_TIMER_READ_WRITE` bigint(20) unsigned NOT NULL,
+ `COUNT_READ_ONLY` bigint(20) unsigned NOT NULL,
+ `SUM_TIMER_READ_ONLY` bigint(20) unsigned NOT NULL,
+ `MIN_TIMER_READ_ONLY` bigint(20) unsigned NOT NULL,
+ `AVG_TIMER_READ_ONLY` bigint(20) unsigned NOT NULL,
+ `MAX_TIMER_READ_ONLY` bigint(20) unsigned NOT NULL
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
show create table events_waits_current;
Table Create Table
events_waits_current CREATE TABLE `events_waits_current` (
@@ -503,7 +729,7 @@ events_waits_current CREATE TABLE `events_waits_current` (
`OBJECT_TYPE` varchar(64) DEFAULT NULL COMMENT 'FILE for a file object, TABLE or TEMPORARY TABLE for a table object, or NULL for a synchronization object.',
`OBJECT_INSTANCE_BEGIN` bigint(20) unsigned NOT NULL COMMENT 'Address in memory of the object.',
`NESTING_EVENT_ID` bigint(20) unsigned DEFAULT NULL COMMENT 'EVENT_ID of event within which this event nests.',
- `NESTING_EVENT_TYPE` enum('STATEMENT','STAGE','WAIT') DEFAULT NULL COMMENT 'Nesting event type. Either statement, stage or wait.',
+ `NESTING_EVENT_TYPE` enum('TRANSACTION','STATEMENT','STAGE','WAIT') DEFAULT NULL COMMENT 'Nesting event type. Either statement, stage or wait.',
`OPERATION` varchar(32) NOT NULL COMMENT 'Operation type, for example read, write or lock',
`NUMBER_OF_BYTES` bigint(20) DEFAULT NULL COMMENT 'Number of bytes that the operation read or wrote, or NULL for table I/O waits.',
`FLAGS` int(10) unsigned DEFAULT NULL COMMENT 'Reserved for use in the future.'
@@ -526,7 +752,7 @@ events_waits_history CREATE TABLE `events_waits_history` (
`OBJECT_TYPE` varchar(64) DEFAULT NULL COMMENT 'FILE for a file object, TABLE or TEMPORARY TABLE for a table object, or NULL for a synchronization object.',
`OBJECT_INSTANCE_BEGIN` bigint(20) unsigned NOT NULL COMMENT 'Address in memory of the object.',
`NESTING_EVENT_ID` bigint(20) unsigned DEFAULT NULL COMMENT 'EVENT_ID of event within which this event nests.',
- `NESTING_EVENT_TYPE` enum('STATEMENT','STAGE','WAIT') DEFAULT NULL COMMENT 'Nesting event type. Either statement, stage or wait.',
+ `NESTING_EVENT_TYPE` enum('TRANSACTION','STATEMENT','STAGE','WAIT') DEFAULT NULL COMMENT 'Nesting event type. Either statement, stage or wait.',
`OPERATION` varchar(32) NOT NULL COMMENT 'Operation type, for example read, write or lock',
`NUMBER_OF_BYTES` bigint(20) DEFAULT NULL COMMENT 'Number of bytes that the operation read or wrote, or NULL for table I/O waits.',
`FLAGS` int(10) unsigned DEFAULT NULL COMMENT 'Reserved for use in the future.'
@@ -549,7 +775,7 @@ events_waits_history_long CREATE TABLE `events_waits_history_long` (
`OBJECT_TYPE` varchar(64) DEFAULT NULL COMMENT 'FILE for a file object, TABLE or TEMPORARY TABLE for a table object, or NULL for a synchronization object.',
`OBJECT_INSTANCE_BEGIN` bigint(20) unsigned NOT NULL COMMENT 'Address in memory of the object.',
`NESTING_EVENT_ID` bigint(20) unsigned DEFAULT NULL COMMENT 'EVENT_ID of event within which this event nests.',
- `NESTING_EVENT_TYPE` enum('STATEMENT','STAGE','WAIT') DEFAULT NULL COMMENT 'Nesting event type. Either statement, stage or wait.',
+ `NESTING_EVENT_TYPE` enum('TRANSACTION','STATEMENT','STAGE','WAIT') DEFAULT NULL COMMENT 'Nesting event type. Either statement, stage or wait.',
`OPERATION` varchar(32) NOT NULL COMMENT 'Operation type, for example read, write or lock',
`NUMBER_OF_BYTES` bigint(20) DEFAULT NULL COMMENT 'Number of bytes that the operation read or wrote, or NULL for table I/O waits.',
`FLAGS` int(10) unsigned DEFAULT NULL COMMENT 'Reserved for use in the future.'
@@ -620,6 +846,100 @@ events_waits_summary_global_by_event_name CREATE TABLE `events_waits_summary_glo
`AVG_TIMER_WAIT` bigint(20) unsigned NOT NULL COMMENT 'Average wait time of the summarized events that are timed.',
`MAX_TIMER_WAIT` bigint(20) unsigned NOT NULL COMMENT 'Maximum wait time of the summarized events that are timed.'
) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table memory_summary_by_host_by_event_name;
+Table Create Table
+memory_summary_by_host_by_event_name CREATE TABLE `memory_summary_by_host_by_event_name` (
+ `HOST` char(60) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
+ `EVENT_NAME` varchar(128) NOT NULL,
+ `COUNT_ALLOC` bigint(20) unsigned NOT NULL,
+ `COUNT_FREE` bigint(20) unsigned NOT NULL,
+ `SUM_NUMBER_OF_BYTES_ALLOC` bigint(20) unsigned NOT NULL,
+ `SUM_NUMBER_OF_BYTES_FREE` bigint(20) unsigned NOT NULL,
+ `LOW_COUNT_USED` bigint(20) NOT NULL,
+ `CURRENT_COUNT_USED` bigint(20) NOT NULL,
+ `HIGH_COUNT_USED` bigint(20) NOT NULL,
+ `LOW_NUMBER_OF_BYTES_USED` bigint(20) NOT NULL,
+ `CURRENT_NUMBER_OF_BYTES_USED` bigint(20) NOT NULL,
+ `HIGH_NUMBER_OF_BYTES_USED` bigint(20) NOT NULL
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table memory_summary_by_thread_by_event_name;
+Table Create Table
+memory_summary_by_thread_by_event_name CREATE TABLE `memory_summary_by_thread_by_event_name` (
+ `THREAD_ID` bigint(20) unsigned NOT NULL,
+ `EVENT_NAME` varchar(128) NOT NULL,
+ `COUNT_ALLOC` bigint(20) unsigned NOT NULL,
+ `COUNT_FREE` bigint(20) unsigned NOT NULL,
+ `SUM_NUMBER_OF_BYTES_ALLOC` bigint(20) unsigned NOT NULL,
+ `SUM_NUMBER_OF_BYTES_FREE` bigint(20) unsigned NOT NULL,
+ `LOW_COUNT_USED` bigint(20) NOT NULL,
+ `CURRENT_COUNT_USED` bigint(20) NOT NULL,
+ `HIGH_COUNT_USED` bigint(20) NOT NULL,
+ `LOW_NUMBER_OF_BYTES_USED` bigint(20) NOT NULL,
+ `CURRENT_NUMBER_OF_BYTES_USED` bigint(20) NOT NULL,
+ `HIGH_NUMBER_OF_BYTES_USED` bigint(20) NOT NULL
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table memory_summary_by_user_by_event_name;
+Table Create Table
+memory_summary_by_user_by_event_name CREATE TABLE `memory_summary_by_user_by_event_name` (
+ `USER` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
+ `EVENT_NAME` varchar(128) NOT NULL,
+ `COUNT_ALLOC` bigint(20) unsigned NOT NULL,
+ `COUNT_FREE` bigint(20) unsigned NOT NULL,
+ `SUM_NUMBER_OF_BYTES_ALLOC` bigint(20) unsigned NOT NULL,
+ `SUM_NUMBER_OF_BYTES_FREE` bigint(20) unsigned NOT NULL,
+ `LOW_COUNT_USED` bigint(20) NOT NULL,
+ `CURRENT_COUNT_USED` bigint(20) NOT NULL,
+ `HIGH_COUNT_USED` bigint(20) NOT NULL,
+ `LOW_NUMBER_OF_BYTES_USED` bigint(20) NOT NULL,
+ `CURRENT_NUMBER_OF_BYTES_USED` bigint(20) NOT NULL,
+ `HIGH_NUMBER_OF_BYTES_USED` bigint(20) NOT NULL
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table memory_summary_by_account_by_event_name;
+Table Create Table
+memory_summary_by_account_by_event_name CREATE TABLE `memory_summary_by_account_by_event_name` (
+ `USER` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
+ `HOST` char(60) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
+ `EVENT_NAME` varchar(128) NOT NULL,
+ `COUNT_ALLOC` bigint(20) unsigned NOT NULL,
+ `COUNT_FREE` bigint(20) unsigned NOT NULL,
+ `SUM_NUMBER_OF_BYTES_ALLOC` bigint(20) unsigned NOT NULL,
+ `SUM_NUMBER_OF_BYTES_FREE` bigint(20) unsigned NOT NULL,
+ `LOW_COUNT_USED` bigint(20) NOT NULL,
+ `CURRENT_COUNT_USED` bigint(20) NOT NULL,
+ `HIGH_COUNT_USED` bigint(20) NOT NULL,
+ `LOW_NUMBER_OF_BYTES_USED` bigint(20) NOT NULL,
+ `CURRENT_NUMBER_OF_BYTES_USED` bigint(20) NOT NULL,
+ `HIGH_NUMBER_OF_BYTES_USED` bigint(20) NOT NULL
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table memory_summary_global_by_event_name;
+Table Create Table
+memory_summary_global_by_event_name CREATE TABLE `memory_summary_global_by_event_name` (
+ `EVENT_NAME` varchar(128) NOT NULL,
+ `COUNT_ALLOC` bigint(20) unsigned NOT NULL,
+ `COUNT_FREE` bigint(20) unsigned NOT NULL,
+ `SUM_NUMBER_OF_BYTES_ALLOC` bigint(20) unsigned NOT NULL,
+ `SUM_NUMBER_OF_BYTES_FREE` bigint(20) unsigned NOT NULL,
+ `LOW_COUNT_USED` bigint(20) NOT NULL,
+ `CURRENT_COUNT_USED` bigint(20) NOT NULL,
+ `HIGH_COUNT_USED` bigint(20) NOT NULL,
+ `LOW_NUMBER_OF_BYTES_USED` bigint(20) NOT NULL,
+ `CURRENT_NUMBER_OF_BYTES_USED` bigint(20) NOT NULL,
+ `HIGH_NUMBER_OF_BYTES_USED` bigint(20) NOT NULL
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table metadata_locks;
+Table Create Table
+metadata_locks CREATE TABLE `metadata_locks` (
+ `OBJECT_TYPE` varchar(64) NOT NULL,
+ `OBJECT_SCHEMA` varchar(64) DEFAULT NULL,
+ `OBJECT_NAME` varchar(64) DEFAULT NULL,
+ `OBJECT_INSTANCE_BEGIN` bigint(20) unsigned NOT NULL,
+ `LOCK_TYPE` varchar(32) NOT NULL,
+ `LOCK_DURATION` varchar(32) NOT NULL,
+ `LOCK_STATUS` varchar(32) NOT NULL,
+ `SOURCE` varchar(64) DEFAULT NULL,
+ `OWNER_THREAD_ID` bigint(20) unsigned DEFAULT NULL,
+ `OWNER_EVENT_ID` bigint(20) unsigned DEFAULT NULL
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
show create table file_instances;
Table Create Table
file_instances CREATE TABLE `file_instances` (
@@ -763,7 +1083,9 @@ Table Create Table
setup_actors CREATE TABLE `setup_actors` (
`HOST` char(60) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '%' COMMENT 'Host name, either a literal, or the % wildcard representing any host.',
`USER` char(128) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '%' COMMENT 'User name, either a literal or the % wildcard representing any name.',
- `ROLE` char(128) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '%' COMMENT 'Unused'
+ `ROLE` char(128) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '%' COMMENT 'Unused',
+ `ENABLED` enum('YES','NO') NOT NULL DEFAULT 'YES',
+ `HISTORY` enum('YES','NO') NOT NULL DEFAULT 'YES'
) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
show create table setup_consumers;
Table Create Table
@@ -781,7 +1103,7 @@ setup_instruments CREATE TABLE `setup_instruments` (
show create table setup_objects;
Table Create Table
setup_objects CREATE TABLE `setup_objects` (
- `OBJECT_TYPE` enum('TABLE') NOT NULL DEFAULT 'TABLE' COMMENT 'Type of object to instrument. Currently, only TABLE, for base table.',
+ `OBJECT_TYPE` enum('EVENT','FUNCTION','PROCEDURE','TABLE','TRIGGER') NOT NULL DEFAULT 'TABLE' COMMENT 'Type of object to instrument.',
`OBJECT_SCHEMA` varchar(64) DEFAULT '%' COMMENT 'Schema containing the object, either the literal or % for any schema.',
`OBJECT_NAME` varchar(64) NOT NULL DEFAULT '%' COMMENT 'Name of the instrumented object, either the literal or % for any object.',
`ENABLED` enum('YES','NO') NOT NULL DEFAULT 'YES' COMMENT 'Whether the object''s events are instrumented or not. Can be disabled, in which case monitoring is not enabled for those objects.',
@@ -859,6 +1181,18 @@ socket_summary_by_event_name CREATE TABLE `socket_summary_by_event_name` (
`AVG_TIMER_MISC` bigint(20) unsigned NOT NULL COMMENT 'Average wait time of all miscellaneous operations that are timed.',
`MAX_TIMER_MISC` bigint(20) unsigned NOT NULL COMMENT 'Maximum wait time of all miscellaneous operations that are timed.'
) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table table_handles;
+Table Create Table
+table_handles CREATE TABLE `table_handles` (
+ `OBJECT_TYPE` varchar(64) NOT NULL,
+ `OBJECT_SCHEMA` varchar(64) NOT NULL,
+ `OBJECT_NAME` varchar(64) NOT NULL,
+ `OBJECT_INSTANCE_BEGIN` bigint(20) unsigned NOT NULL,
+ `OWNER_THREAD_ID` bigint(20) unsigned DEFAULT NULL,
+ `OWNER_EVENT_ID` bigint(20) unsigned DEFAULT NULL,
+ `INTERNAL_LOCK` varchar(64) DEFAULT NULL,
+ `EXTERNAL_LOCK` varchar(64) DEFAULT NULL
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
show create table table_io_waits_summary_by_index_usage;
Table Create Table
table_io_waits_summary_by_index_usage CREATE TABLE `table_io_waits_summary_by_index_usage` (
@@ -1037,7 +1371,10 @@ threads CREATE TABLE `threads` (
`PROCESSLIST_INFO` longtext DEFAULT NULL COMMENT 'Statement being executed by the thread, or NULL if a statement is not being executed. If a statement results in calling other statements, such as for a stored procedure, the innermost statement from the stored procedure is shown here.',
`PARENT_THREAD_ID` bigint(20) unsigned DEFAULT NULL COMMENT 'THREAD_ID of the parent thread, if any. Subthreads can for example be spawned as a result of INSERT DELAYED statements.',
`ROLE` varchar(64) DEFAULT NULL COMMENT 'Unused.',
- `INSTRUMENTED` enum('YES','NO') NOT NULL COMMENT 'YES or NO for Whether the thread is instrumented or not. For foreground threads, the initial value is determined by whether there''s a user/host match in the setup_actors table. Subthreads are again matched, while for background threads, this will be set to YES by default. To monitor events that the thread executes, INSTRUMENTED must be YES and the thread_instrumentation consumer in the setup_consumers table must also be YES.'
+ `INSTRUMENTED` enum('YES','NO') NOT NULL COMMENT 'YES or NO for Whether the thread is instrumented or not. For foreground threads, the initial value is determined by whether there''s a user/host match in the setup_actors table. Subthreads are again matched, while for background threads, this will be set to YES by default. To monitor events that the thread executes, INSTRUMENTED must be YES and the thread_instrumentation consumer in the setup_consumers table must also be YES.',
+ `HISTORY` enum('YES','NO') NOT NULL,
+ `CONNECTION_TYPE` varchar(16) DEFAULT NULL,
+ `THREAD_OS_ID` bigint(20) unsigned DEFAULT NULL
) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
show create table users;
Table Create Table
diff --git a/mysql-test/suite/perfschema/r/server_init.result b/mysql-test/suite/perfschema/r/server_init.result
index 25f3f180735..82f53ad5b74 100644
--- a/mysql-test/suite/perfschema/r/server_init.result
+++ b/mysql-test/suite/perfschema/r/server_init.result
@@ -1,9 +1,5 @@
use performance_schema;
select count(name) from mutex_instances
-where name like "wait/synch/mutex/mysys/THR_LOCK_threads";
-count(name)
-1
-select count(name) from mutex_instances
where name like "wait/synch/mutex/mysys/THR_LOCK_malloc";
count(name)
1
@@ -27,12 +23,16 @@ select count(name) from mutex_instances
where name like "wait/synch/mutex/mysys/THR_LOCK_charset";
count(name)
1
-select count(name) from cond_instances
-where name like "wait/synch/cond/mysys/THR_COND_threads";
+select count(name) from mutex_instances
+<<<<<<< HEAD
+where name like "wait/synch/mutex/sql/LOCK_thread_count";
+=======
+where name like "wait/synch/mutex/sql/LOCK_open";
count(name)
1
select count(name) from mutex_instances
-where name like "wait/synch/mutex/sql/LOCK_thread_count";
+where name like "wait/synch/mutex/sql/LOCK_thd_list";
+>>>>>>> merge-perfschema-5.7
count(name)
1
select count(name) from mutex_instances
@@ -44,31 +44,19 @@ where name like "wait/synch/mutex/sql/LOCK_status";
count(name)
1
select count(name) from mutex_instances
-where name like "wait/synch/mutex/sql/LOCK_error_log";
-count(name)
-1
-select count(name) from mutex_instances
-where name like "wait/synch/mutex/sql/LOCK_delayed_insert";
-count(name)
-1
-select count(name) from mutex_instances
where name like "wait/synch/mutex/sql/LOCK_uuid_generator";
count(name)
0
select count(name) from mutex_instances
-where name like "wait/synch/mutex/sql/LOCK_delayed_status";
-count(name)
-1
-select count(name) from mutex_instances
-where name like "wait/synch/mutex/sql/LOCK_delayed_create";
-count(name)
-1
-select count(name) from mutex_instances
where name like "wait/synch/mutex/sql/LOCK_crypt";
count(name)
1
select count(name) from mutex_instances
+<<<<<<< HEAD
where name like "wait/synch/mutex/sql/LOCK_active_mi";
+=======
+where name like "wait/synch/mutex/sql/LOCK_slave_list";
+>>>>>>> 258e16fa2de... WIP 5.7 P_S
count(name)
1
select count(name) from mutex_instances
@@ -88,10 +76,6 @@ where name like "wait/synch/mutex/sql/LOCK_prepared_stmt_count";
count(name)
1
select count(name) from mutex_instances
-where name like "wait/synch/mutex/sql/LOCK_connection_count";
-count(name)
-1
-select count(name) from mutex_instances
where name like "wait/synch/mutex/sql/LOCK_server_started";
count(name)
1
@@ -104,18 +88,21 @@ where name like "wait/synch/mutex/sql/LOCK_event_queue";
count(name)
1
select count(name) from mutex_instances
-where name like "wait/synch/mutex/sql/LOCK_user_locks";
+where name like "wait/synch/mutex/sql/LOCK_item_func_sleep";
count(name)
1
select count(name) from mutex_instances
-where name like "wait/synch/mutex/sql/Cversion_lock";
+where name like "wait/synch/mutex/sql/LOCK_audit_mask";
count(name)
1
select count(name) from mutex_instances
-where name like "wait/synch/mutex/sql/LOCK_audit_mask";
+<<<<<<< HEAD
+=======
+where name like "wait/synch/mutex/sql/LOCK_transaction_cache";
count(name)
1
select count(name) from mutex_instances
+>>>>>>> merge-perfschema-5.7
where name like "wait/synch/mutex/sql/LOCK_plugin";
count(name)
1
@@ -124,10 +111,6 @@ where name like "wait/synch/mutex/sql/tz_LOCK";
count(name)
1
select count(name) from rwlock_instances
-where name like "wait/synch/rwlock/sql/LOCK_grant";
-count(name)
-1
-select count(name) from rwlock_instances
where name like "wait/synch/rwlock/sql/LOCK_sys_init_connect";
count(name)
1
@@ -150,7 +133,7 @@ count(name)
select count(name) from cond_instances
where name like "wait/synch/cond/sql/COND_thread_count";
count(name)
-1
+0
select count(name) from cond_instances
where name like "wait/synch/cond/sql/COND_manager";
count(name)
diff --git a/mysql-test/suite/perfschema/r/setup_actors.result b/mysql-test/suite/perfschema/r/setup_actors.result
index 3474b678321..b6d528173bf 100644
--- a/mysql-test/suite/perfschema/r/setup_actors.result
+++ b/mysql-test/suite/perfschema/r/setup_actors.result
@@ -1,22 +1,22 @@
select * from performance_schema.setup_actors;
-HOST USER ROLE
-% % %
+HOST USER ROLE ENABLED HISTORY
+% % % YES YES
truncate table performance_schema.setup_actors;
insert into performance_schema.setup_actors
-values ('hosta', 'user1', '%');
+values ('hosta', 'user1', '%', 'YES', 'YES');
insert into performance_schema.setup_actors
-values ('%', 'user2', '%');
+values ('%', 'user2', '%', 'YES', 'YES');
insert into performance_schema.setup_actors
-values ('localhost', 'user3', '%');
+values ('localhost', 'user3', '%', 'YES', 'YES');
insert into performance_schema.setup_actors
-values ('hostb', '%', '%');
+values ('hostb', '%', '%', 'YES', 'YES');
select * from performance_schema.setup_actors
order by USER, HOST, ROLE;
-HOST USER ROLE
-hostb % %
-hosta user1 %
-% user2 %
-localhost user3 %
+HOST USER ROLE ENABLED HISTORY
+hostb % % YES YES
+hosta user1 % YES YES
+% user2 % YES YES
+localhost user3 % YES YES
create user user1@localhost;
grant ALL on *.* to user1@localhost;
create user user2@localhost;
@@ -36,7 +36,7 @@ NAME TYPE INSTRUMENTED PROCESSLIST_USER PROCESSLIST_HOST
thread/sql/one_connection FOREGROUND NO user1 localhost
connection default;
insert into performance_schema.setup_actors
-values ('%', 'user1', '%');
+values ('%', 'user1', '%', 'YES', 'YES');
connection con1;
select NAME, TYPE, INSTRUMENTED, PROCESSLIST_USER, PROCESSLIST_HOST
from performance_schema.threads
@@ -90,16 +90,16 @@ thread/sql/one_connection FOREGROUND NO user4 localhost
disconnect con4;
connection default;
insert into performance_schema.setup_actors
-values ('localhost', '%', '%');
+values ('localhost', '%', '%', 'YES', 'YES');
select * from performance_schema.setup_actors
order by USER, HOST, ROLE;
-HOST USER ROLE
-hostb % %
-localhost % %
-% user1 %
-hosta user1 %
-% user2 %
-localhost user3 %
+HOST USER ROLE ENABLED HISTORY
+hostb % % YES YES
+localhost % % YES YES
+% user1 % YES YES
+hosta user1 % YES YES
+% user2 % YES YES
+localhost user3 % YES YES
connect con4b, localhost, user4, , ;
select NAME, TYPE, INSTRUMENTED, PROCESSLIST_USER, PROCESSLIST_HOST
from performance_schema.threads
@@ -109,7 +109,7 @@ thread/sql/one_connection FOREGROUND YES user4 localhost
disconnect con4b;
connection default;
insert into performance_schema.setup_actors
-values ('%', 'user5', '%');
+values ('%', 'user5', '%', 'YES', 'YES');
create sql security definer view test.v1 as select NAME, TYPE, INSTRUMENTED, PROCESSLIST_USER, PROCESSLIST_HOST
from performance_schema.threads
where PROCESSLIST_ID = connection_id();
@@ -135,7 +135,7 @@ drop user user5@localhost;
flush privileges;
truncate table performance_schema.setup_actors;
insert into performance_schema.setup_actors
-values ('%', '%', '%');
+values ('%', '%', '%', 'YES', 'YES');
select * from performance_schema.setup_actors;
-HOST USER ROLE
-% % %
+HOST USER ROLE ENABLED HISTORY
+% % % YES YES
diff --git a/mysql-test/suite/perfschema/r/setup_actors_enabled.result b/mysql-test/suite/perfschema/r/setup_actors_enabled.result
new file mode 100644
index 00000000000..c0dda748f28
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/setup_actors_enabled.result
@@ -0,0 +1,136 @@
+select * from performance_schema.setup_actors;
+HOST USER ROLE ENABLED HISTORY
+% % % YES YES
+truncate table performance_schema.setup_actors;
+insert into performance_schema.setup_actors
+values ('localhost', 'user1', '%', 'YES', 'YES');
+insert into performance_schema.setup_actors
+values ('localhost', 'user2', '%', 'NO', 'NO');
+set @orig_sql_mode= @@sql_mode;
+set sql_mode= (select replace(@@sql_mode,'NO_AUTO_CREATE_USER',''));
+grant ALL on *.* to user1@localhost;
+grant ALL on *.* to user2@localhost;
+set sql_mode= @orig_sql_mode;
+flush privileges;
+# Switch to (con1, localhost, user1, , )
+connect con1, localhost, user1, , ;
+select NAME, TYPE, INSTRUMENTED, PROCESSLIST_USER, PROCESSLIST_HOST
+from performance_schema.threads
+where PROCESSLIST_ID = connection_id();
+NAME TYPE INSTRUMENTED PROCESSLIST_USER PROCESSLIST_HOST
+thread/sql/one_connection FOREGROUND YES user1 localhost
+# Switch to (con2, localhost, user2, , )
+connect con2, localhost, user2, , ;
+select NAME, TYPE, INSTRUMENTED, PROCESSLIST_USER, PROCESSLIST_HOST
+from performance_schema.threads
+where PROCESSLIST_ID = connection_id();
+NAME TYPE INSTRUMENTED PROCESSLIST_USER PROCESSLIST_HOST
+thread/sql/one_connection FOREGROUND NO user2 localhost
+# Switch to connection default
+connection default;
+update performance_schema.setup_actors set ENABLED='NO' where USER='user1';
+update performance_schema.setup_actors set ENABLED='YES' where USER='user2';
+# Switch to connection con1
+connection con1;
+select NAME, TYPE, INSTRUMENTED, PROCESSLIST_USER, PROCESSLIST_HOST
+from performance_schema.threads
+where PROCESSLIST_ID = connection_id();
+NAME TYPE INSTRUMENTED PROCESSLIST_USER PROCESSLIST_HOST
+thread/sql/one_connection FOREGROUND YES user1 localhost
+# Switch to connection con2
+connection con2;
+select NAME, TYPE, INSTRUMENTED, PROCESSLIST_USER, PROCESSLIST_HOST
+from performance_schema.threads
+where PROCESSLIST_ID = connection_id();
+NAME TYPE INSTRUMENTED PROCESSLIST_USER PROCESSLIST_HOST
+thread/sql/one_connection FOREGROUND NO user2 localhost
+# Disconnect con1 and con2
+disconnect con1;
+disconnect con2;
+# Switch to (con1, localhost, user1, , )
+connect con1, localhost, user1, , ;
+select NAME, TYPE, INSTRUMENTED, PROCESSLIST_USER, PROCESSLIST_HOST
+from performance_schema.threads
+where PROCESSLIST_ID = connection_id();
+NAME TYPE INSTRUMENTED PROCESSLIST_USER PROCESSLIST_HOST
+thread/sql/one_connection FOREGROUND NO user1 localhost
+# Switch to (con2 localhost, user2, , )
+connect con2, localhost, user2, , ;
+select NAME, TYPE, INSTRUMENTED, PROCESSLIST_USER, PROCESSLIST_HOST
+from performance_schema.threads
+where PROCESSLIST_ID = connection_id();
+NAME TYPE INSTRUMENTED PROCESSLIST_USER PROCESSLIST_HOST
+thread/sql/one_connection FOREGROUND YES user2 localhost
+# Disconnect con1 and con2
+disconnect con1;
+disconnect con2;
+# Switch to connection default
+connection default;
+revoke update on *.* from 'user2'@'localhost';
+flush privileges;
+# Switch to (con2 localhost, user2, , )
+connect con2, localhost, user2, , ;
+update performance_schema.setup_actors
+set ENABLED='NO';
+ERROR 42000: UPDATE command denied to user 'user2'@'localhost' for table 'setup_actors'
+disconnect con2;
+connection default;
+insert into performance_schema.setup_actors
+values ('%', 'user1', '%', 'YES', 'YES');
+insert into performance_schema.setup_actors
+values ('localhost', '%', '%', 'NO', 'NO');
+insert into performance_schema.setup_actors
+values ('%', '%', '%', 'YES', 'YES');
+# Switch to (con1, localhost, user1, , )
+connect con1, localhost, user1, , ;
+select NAME, TYPE, INSTRUMENTED, PROCESSLIST_USER, PROCESSLIST_HOST
+from performance_schema.threads
+where PROCESSLIST_ID = connection_id();
+NAME TYPE INSTRUMENTED PROCESSLIST_USER PROCESSLIST_HOST
+thread/sql/one_connection FOREGROUND NO user1 localhost
+disconnect con1;
+connection default;
+delete from performance_schema.setup_actors where
+HOST='localhost' and USER='user1';
+# Switch to (con1, localhost, user1, , )
+connect con1, localhost, user1, , ;
+select NAME, TYPE, INSTRUMENTED, PROCESSLIST_USER, PROCESSLIST_HOST
+from performance_schema.threads
+where PROCESSLIST_ID = connection_id();
+NAME TYPE INSTRUMENTED PROCESSLIST_USER PROCESSLIST_HOST
+thread/sql/one_connection FOREGROUND YES user1 localhost
+disconnect con1;
+connection default;
+delete from performance_schema.setup_actors where
+HOST='%' and USER='user1';
+# Switch to (con1, localhost, user1, , )
+connect con1, localhost, user1, , ;
+select NAME, TYPE, INSTRUMENTED, PROCESSLIST_USER, PROCESSLIST_HOST
+from performance_schema.threads
+where PROCESSLIST_ID = connection_id();
+NAME TYPE INSTRUMENTED PROCESSLIST_USER PROCESSLIST_HOST
+thread/sql/one_connection FOREGROUND NO user1 localhost
+disconnect con1;
+connection default;
+delete from performance_schema.setup_actors where
+HOST='localhost' and USER='%';
+# Switch to (con1, localhost, user1, , )
+connect con1, localhost, user1, , ;
+select NAME, TYPE, INSTRUMENTED, PROCESSLIST_USER, PROCESSLIST_HOST
+from performance_schema.threads
+where PROCESSLIST_ID = connection_id();
+NAME TYPE INSTRUMENTED PROCESSLIST_USER PROCESSLIST_HOST
+thread/sql/one_connection FOREGROUND YES user1 localhost
+disconnect con1;
+connection default;
+revoke all privileges, grant option from user1@localhost;
+revoke all privileges, grant option from user2@localhost;
+drop user user1@localhost;
+drop user user2@localhost;
+flush privileges;
+truncate table performance_schema.setup_actors;
+insert into performance_schema.setup_actors
+values ('%', '%', '%', 'YES', 'YES');
+select * from performance_schema.setup_actors;
+HOST USER ROLE ENABLED HISTORY
+% % % YES YES
diff --git a/mysql-test/suite/perfschema/r/setup_actors_history.result b/mysql-test/suite/perfschema/r/setup_actors_history.result
new file mode 100644
index 00000000000..cbf531911f8
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/setup_actors_history.result
@@ -0,0 +1,138 @@
+select * from performance_schema.setup_actors;
+HOST USER ROLE ENABLED HISTORY
+% % % YES YES
+truncate table performance_schema.setup_actors;
+insert into performance_schema.setup_actors
+values ('localhost', 'user1', '%', 'YES', 'YES');
+insert into performance_schema.setup_actors
+values ('localhost', 'user2', '%', 'YES', 'NO');
+insert into performance_schema.setup_actors
+values ('localhost', 'user3', '%', 'NO', 'YES');
+insert into performance_schema.setup_actors
+values ('localhost', 'user4', '%', 'NO', 'NO');
+create user user1@localhost;
+create user user2@localhost;
+create user user3@localhost;
+create user user4@localhost;
+grant ALL on *.* to user1@localhost;
+grant ALL on *.* to user2@localhost;
+grant ALL on *.* to user3@localhost;
+grant ALL on *.* to user4@localhost;
+flush privileges;
+# Switch to (con1, localhost, user1, , )
+connect con1, localhost, user1, , ;
+select NAME, TYPE, INSTRUMENTED, HISTORY, PROCESSLIST_USER, PROCESSLIST_HOST
+from performance_schema.threads
+where PROCESSLIST_ID = connection_id();
+NAME TYPE INSTRUMENTED HISTORY PROCESSLIST_USER PROCESSLIST_HOST
+thread/sql/one_connection FOREGROUND YES YES user1 localhost
+# Switch to (con2, localhost, user2, , )
+connect con2, localhost, user2, , ;
+select NAME, TYPE, INSTRUMENTED, HISTORY, PROCESSLIST_USER, PROCESSLIST_HOST
+from performance_schema.threads
+where PROCESSLIST_ID = connection_id();
+NAME TYPE INSTRUMENTED HISTORY PROCESSLIST_USER PROCESSLIST_HOST
+thread/sql/one_connection FOREGROUND YES NO user2 localhost
+# Switch to (con3, localhost, user3, , )
+connect con3, localhost, user3, , ;
+select NAME, TYPE, INSTRUMENTED, HISTORY, PROCESSLIST_USER, PROCESSLIST_HOST
+from performance_schema.threads
+where PROCESSLIST_ID = connection_id();
+NAME TYPE INSTRUMENTED HISTORY PROCESSLIST_USER PROCESSLIST_HOST
+thread/sql/one_connection FOREGROUND NO YES user3 localhost
+# Switch to (con4, localhost, user4, , )
+connect con4, localhost, user4, , ;
+select NAME, TYPE, INSTRUMENTED, HISTORY, PROCESSLIST_USER, PROCESSLIST_HOST
+from performance_schema.threads
+where PROCESSLIST_ID = connection_id();
+NAME TYPE INSTRUMENTED HISTORY PROCESSLIST_USER PROCESSLIST_HOST
+thread/sql/one_connection FOREGROUND NO NO user4 localhost
+# Switch to connection default
+connection default;
+update performance_schema.setup_actors
+set HISTORY='NO' where USER in ('user1', 'user3');
+update performance_schema.setup_actors
+set HISTORY='YES' where USER in ('user2', 'user4');
+# Switch to connection con1
+connection con1;
+select NAME, TYPE, INSTRUMENTED, HISTORY, PROCESSLIST_USER, PROCESSLIST_HOST
+from performance_schema.threads
+where PROCESSLIST_ID = connection_id();
+NAME TYPE INSTRUMENTED HISTORY PROCESSLIST_USER PROCESSLIST_HOST
+thread/sql/one_connection FOREGROUND YES YES user1 localhost
+# Switch to connection con2
+connection con2;
+select NAME, TYPE, INSTRUMENTED, HISTORY, PROCESSLIST_USER, PROCESSLIST_HOST
+from performance_schema.threads
+where PROCESSLIST_ID = connection_id();
+NAME TYPE INSTRUMENTED HISTORY PROCESSLIST_USER PROCESSLIST_HOST
+thread/sql/one_connection FOREGROUND YES NO user2 localhost
+# Switch to connection con3
+connection con3;
+select NAME, TYPE, INSTRUMENTED, HISTORY, PROCESSLIST_USER, PROCESSLIST_HOST
+from performance_schema.threads
+where PROCESSLIST_ID = connection_id();
+NAME TYPE INSTRUMENTED HISTORY PROCESSLIST_USER PROCESSLIST_HOST
+thread/sql/one_connection FOREGROUND NO YES user3 localhost
+# Switch to connection con4
+connection con4;
+select NAME, TYPE, INSTRUMENTED, HISTORY, PROCESSLIST_USER, PROCESSLIST_HOST
+from performance_schema.threads
+where PROCESSLIST_ID = connection_id();
+NAME TYPE INSTRUMENTED HISTORY PROCESSLIST_USER PROCESSLIST_HOST
+thread/sql/one_connection FOREGROUND NO NO user4 localhost
+# Disconnect all con
+disconnect con1;
+disconnect con2;
+disconnect con3;
+disconnect con4;
+# Switch to (con1, localhost, user1, , )
+connect con1, localhost, user1, , ;
+select NAME, TYPE, INSTRUMENTED, HISTORY, PROCESSLIST_USER, PROCESSLIST_HOST
+from performance_schema.threads
+where PROCESSLIST_ID = connection_id();
+NAME TYPE INSTRUMENTED HISTORY PROCESSLIST_USER PROCESSLIST_HOST
+thread/sql/one_connection FOREGROUND YES NO user1 localhost
+# Switch to (con2 localhost, user2, , )
+connect con2, localhost, user2, , ;
+select NAME, TYPE, INSTRUMENTED, HISTORY, PROCESSLIST_USER, PROCESSLIST_HOST
+from performance_schema.threads
+where PROCESSLIST_ID = connection_id();
+NAME TYPE INSTRUMENTED HISTORY PROCESSLIST_USER PROCESSLIST_HOST
+thread/sql/one_connection FOREGROUND YES YES user2 localhost
+# Switch to (con3, localhost, user3, , )
+connect con3, localhost, user3, , ;
+select NAME, TYPE, INSTRUMENTED, HISTORY, PROCESSLIST_USER, PROCESSLIST_HOST
+from performance_schema.threads
+where PROCESSLIST_ID = connection_id();
+NAME TYPE INSTRUMENTED HISTORY PROCESSLIST_USER PROCESSLIST_HOST
+thread/sql/one_connection FOREGROUND NO NO user3 localhost
+# Switch to (con4 localhost, user4, , )
+connect con4, localhost, user4, , ;
+select NAME, TYPE, INSTRUMENTED, HISTORY, PROCESSLIST_USER, PROCESSLIST_HOST
+from performance_schema.threads
+where PROCESSLIST_ID = connection_id();
+NAME TYPE INSTRUMENTED HISTORY PROCESSLIST_USER PROCESSLIST_HOST
+thread/sql/one_connection FOREGROUND NO YES user4 localhost
+# Disconnect all con
+disconnect con1;
+disconnect con2;
+disconnect con3;
+disconnect con4;
+# Switch to connection default
+connection default;
+revoke all privileges, grant option from user1@localhost;
+revoke all privileges, grant option from user2@localhost;
+revoke all privileges, grant option from user3@localhost;
+revoke all privileges, grant option from user4@localhost;
+drop user user1@localhost;
+drop user user2@localhost;
+drop user user3@localhost;
+drop user user4@localhost;
+flush privileges;
+truncate table performance_schema.setup_actors;
+insert into performance_schema.setup_actors
+values ('%', '%', '%', 'YES', 'YES');
+select * from performance_schema.setup_actors;
+HOST USER ROLE ENABLED HISTORY
+% % % YES YES
diff --git a/mysql-test/suite/perfschema/r/setup_consumers_defaults.result b/mysql-test/suite/perfschema/r/setup_consumers_defaults.result
index c6e03513d75..c3ec620a2a6 100644
--- a/mysql-test/suite/perfschema/r/setup_consumers_defaults.result
+++ b/mysql-test/suite/perfschema/r/setup_consumers_defaults.result
@@ -6,6 +6,9 @@ events_stages_history_long NO
events_statements_current YES
events_statements_history NO
events_statements_history_long YES
+events_transactions_current YES
+events_transactions_history NO
+events_transactions_history_long YES
events_waits_current NO
events_waits_history YES
events_waits_history_long NO
@@ -16,5 +19,5 @@ SELECT @@performance_schema_consumer_events_stages_current;
ERROR HY000: Unknown system variable 'performance_schema_consumer_events_stages_current'
SET @@performance_schema_consumer_events_stages_current=0;
ERROR HY000: Unknown system variable 'performance_schema_consumer_events_stages_current'
-SHOW VARIABLES LIKE "performance_schema_consumer%";
+SHOW GLOBAL VARIABLES LIKE "performance_schema_consumer%";
Variable_name Value
diff --git a/mysql-test/suite/perfschema/r/setup_instruments_defaults.result b/mysql-test/suite/perfschema/r/setup_instruments_defaults.result
index 7384313917d..4c638197235 100644
--- a/mysql-test/suite/perfschema/r/setup_instruments_defaults.result
+++ b/mysql-test/suite/perfschema/r/setup_instruments_defaults.result
@@ -10,21 +10,20 @@ WHERE name IN (
AND enabled = 'yes' AND timed = 'no'
ORDER BY name;
NAME ENABLED TIMED
-stage/sql/Creating table YES NO
+stage/sql/creating table YES NO
wait/synch/mutex/sql/LOCK_plugin YES NO
wait/synch/mutex/sql/LOCK_user_conn YES NO
SELECT * FROM performance_schema.setup_instruments
-WHERE name = 'wait/synch/mutex/sql/LOCK_thread_count'
+WHERE name = 'wait/synch/mutex/sql/LOCK_thd_list'
AND enabled = 'no' AND timed = 'no';
NAME ENABLED TIMED
SELECT * FROM performance_schema.setup_instruments
WHERE name IN (
'wait/synch/mutex/sql/LOG_INFO::lock',
-'wait/synch/mutex/sql/THD::LOCK_thd_data')
+'wait/synch/mutex/sql/THD::LOCK_thd_list')
AND enabled = 'yes' AND timed = 'yes'
ORDER BY name;
NAME ENABLED TIMED
-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'
AND enabled = 'no' AND timed = 'no'
@@ -32,6 +31,20 @@ ORDER BY name;
NAME ENABLED TIMED
wait/synch/mutex/sql/hash_filo::lock NO NO
#
+# Verify that the memory instruments are never timed
+#
+SELECT * FROM performance_schema.setup_instruments
+WHERE name like 'memory/%'
+AND timed = 'YES';
+NAME ENABLED TIMED
+#
+# Verify that the memory/performance_schema instruments are never disabled
+#
+SELECT * FROM performance_schema.setup_instruments
+WHERE name like 'memory/performance_schema/%'
+AND enabled = 'NO';
+NAME ENABLED TIMED
+#
# Verify that the instrument startup settings are not not visible.
#
SHOW VARIABLES LIKE "%/wait/synch/mutex%";
diff --git a/mysql-test/suite/perfschema/r/setup_object_table_lock_io.result b/mysql-test/suite/perfschema/r/setup_object_table_lock_io.result
new file mode 100644
index 00000000000..97fda63d7ee
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/setup_object_table_lock_io.result
@@ -0,0 +1,91 @@
+drop table if exists test.setup_objects;
+update performance_schema.setup_instruments set enabled='NO';
+update performance_schema.setup_instruments set enabled='YES', timed='YES'
+ where name in ('wait/io/table/sql/handler', 'wait/lock/table/sql/handler');
+truncate table performance_schema.table_io_waits_summary_by_table;
+truncate table performance_schema.table_lock_waits_summary_by_table;
+create table test.setup_objects as select * from performance_schema.setup_objects;
+truncate table performance_schema.setup_objects;
+select * from performance_schema.setup_objects;
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
+insert into performance_schema.setup_objects
+values ('TABLE', 'db1', 't1', 'YES', 'YES');
+insert into performance_schema.setup_objects
+values ('TABLE', 'db1', 't2', 'YES', 'YES');
+select * from performance_schema.setup_objects
+order by OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME;
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
+TABLE db1 t1 YES YES
+TABLE db1 t2 YES YES
+SET sql_mode = default;
+drop database if exists db1;
+create database db1;
+create table db1.t1 (a int, b char(10) default 'default', unique key uidx(a));
+create table db1.t2 (a int, b char(10) default 'default');
+insert into db1.t1 values('11', 'db1.t1');
+insert into db1.t1 values('12', 'db1.t1');
+insert into db1.t1 values('13', 'db1.t1');
+insert into db1.t2 values('21', 'db1.t2');
+insert into db1.t2 values('22', 'db1.t2');
+insert into db1.t2 values('23', 'db1.t2');
+select OBJECT_SCHEMA, OBJECT_NAME, COUNT_STAR, COUNT_READ, COUNT_WRITE
+from performance_schema.table_lock_waits_summary_by_table
+where OBJECT_SCHEMA='db1';
+OBJECT_SCHEMA OBJECT_NAME COUNT_STAR COUNT_READ COUNT_WRITE
+db1 t1 6 0 6
+db1 t2 6 0 6
+select OBJECT_SCHEMA, OBJECT_NAME, COUNT_STAR, COUNT_READ, COUNT_WRITE
+from performance_schema.table_io_waits_summary_by_table
+where OBJECT_SCHEMA='db1';
+OBJECT_SCHEMA OBJECT_NAME COUNT_STAR COUNT_READ COUNT_WRITE
+db1 t1 3 0 3
+db1 t2 3 0 3
+truncate table db1.t1;
+truncate table db1.t2;
+select OBJECT_SCHEMA, OBJECT_NAME, COUNT_STAR, COUNT_READ, COUNT_WRITE
+from performance_schema.table_lock_waits_summary_by_table
+where OBJECT_SCHEMA='db1';
+OBJECT_SCHEMA OBJECT_NAME COUNT_STAR COUNT_READ COUNT_WRITE
+db1 t1 6 0 6
+db1 t2 6 0 6
+select OBJECT_SCHEMA, OBJECT_NAME, COUNT_STAR, COUNT_READ, COUNT_WRITE
+from performance_schema.table_io_waits_summary_by_table
+where OBJECT_SCHEMA='db1';
+OBJECT_SCHEMA OBJECT_NAME COUNT_STAR COUNT_READ COUNT_WRITE
+db1 t1 3 0 3
+db1 t2 3 0 3
+update performance_schema.setup_objects
+set ENABLED='NO' where OBJECT_SCHEMA = 'db1' and OBJECT_NAME='t1';
+select OBJECT_SCHEMA, OBJECT_NAME, COUNT_STAR, COUNT_READ, COUNT_WRITE
+from performance_schema.table_lock_waits_summary_by_table
+where OBJECT_SCHEMA='db1';
+OBJECT_SCHEMA OBJECT_NAME COUNT_STAR COUNT_READ COUNT_WRITE
+db1 t2 6 0 6
+select OBJECT_SCHEMA, OBJECT_NAME, COUNT_STAR, COUNT_READ, COUNT_WRITE
+from performance_schema.table_io_waits_summary_by_table
+where OBJECT_SCHEMA='db1';
+OBJECT_SCHEMA OBJECT_NAME COUNT_STAR COUNT_READ COUNT_WRITE
+db1 t2 3 0 3
+update performance_schema.setup_objects
+set ENABLED='YES' where OBJECT_SCHEMA = 'db1' and OBJECT_NAME='t1';
+select OBJECT_SCHEMA, OBJECT_NAME, COUNT_STAR, COUNT_READ, COUNT_WRITE
+from performance_schema.table_lock_waits_summary_by_table
+where OBJECT_SCHEMA='db1';
+OBJECT_SCHEMA OBJECT_NAME COUNT_STAR COUNT_READ COUNT_WRITE
+db1 t1 0 0 0
+db1 t2 6 0 6
+select OBJECT_SCHEMA, OBJECT_NAME, COUNT_STAR, COUNT_READ, COUNT_WRITE
+from performance_schema.table_io_waits_summary_by_table
+where OBJECT_SCHEMA='db1';
+OBJECT_SCHEMA OBJECT_NAME COUNT_STAR COUNT_READ COUNT_WRITE
+db1 t1 0 0 0
+db1 t2 3 0 3
+truncate table performance_schema.setup_objects;
+select count(*) from performance_schema.setup_objects;
+count(*)
+0
+drop database db1;
+truncate table performance_schema.setup_objects;
+insert into performance_schema.setup_objects select * from test.setup_objects;
+drop table test.setup_objects;
+update performance_schema.setup_instruments set enabled='YES', timed='YES';
diff --git a/mysql-test/suite/perfschema/r/setup_objects.result b/mysql-test/suite/perfschema/r/setup_objects.result
index c29aaa2114f..ec9a0089b8d 100644
--- a/mysql-test/suite/perfschema/r/setup_objects.result
+++ b/mysql-test/suite/perfschema/r/setup_objects.result
@@ -25,7 +25,7 @@ insert into performance_schema.setup_objects
values ('TABLE', 'db4', 't1', 'NO', 'YES');
insert into performance_schema.setup_objects
values ('TABLE', 'db4', '%', 'YES', 'NO');
-set sql_mode= '';
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
insert into performance_schema.setup_objects
values ('SOMETHING', 'bad1', 'bad1', 'YES', 'NO');
ERROR 23000: Cannot add or update a child row: a foreign key constraint fails
@@ -82,7 +82,7 @@ TABLE db3 t1 YES YES
TABLE db3 t2 NO NO
TABLE db4 % YES NO
TABLE db4 t1 NO YES
-set sql_mode= DEFAULT;
+SET sql_mode = default;
drop database if exists db1;
drop database if exists db2;
drop database if exists db3;
diff --git a/mysql-test/suite/perfschema/r/short_option_1.result b/mysql-test/suite/perfschema/r/short_option_1.result
index 45f7d989d8e..ab3a13b8eed 100644
--- a/mysql-test/suite/perfschema/r/short_option_1.result
+++ b/mysql-test/suite/perfschema/r/short_option_1.result
@@ -4,20 +4,20 @@ Ok, the server started
select @@SQL_MODE;
@@SQL_MODE
REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ANSI
-show variables like 'sql_mode';
+show global variables like 'sql_mode';
Variable_name Value
sql_mode REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ANSI
select @@character_set_server;
@@character_set_server
utf8
-show variables like 'character_set_system';
+show global variables like 'character_set_system';
Variable_name Value
character_set_system utf8
-show variables like 'general_log';
+show global variables like 'general_log';
Variable_name Value
general_log ON
-show variables like 'new';
+show global variables like 'new';
Variable_name Value
-show variables like 'log_warnings';
+show global variables like 'log_warnings';
Variable_name Value
-log_warnings 3
+log_warnings 2
diff --git a/mysql-test/suite/perfschema/r/short_option_2.result b/mysql-test/suite/perfschema/r/short_option_2.result
index 0587fdef73b..6b5b06cb4a1 100644
--- a/mysql-test/suite/perfschema/r/short_option_2.result
+++ b/mysql-test/suite/perfschema/r/short_option_2.result
@@ -6,4 +6,4 @@ select @@SQL_MODE;
REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ANSI
select @@log_warnings;
@@log_warnings
-5
+2
diff --git a/mysql-test/suite/perfschema/r/show_aggregate.result b/mysql-test/suite/perfschema/r/show_aggregate.result
new file mode 100644
index 00000000000..7b104a56ba0
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/show_aggregate.result
@@ -0,0 +1,530 @@
+#
+# ================================================================================
+# SETUP
+# ================================================================================
+SET @@session.sql_log_bin=OFF;
+#
+# CREATE 3 CLIENTS, 3 CONNECTIONS, RESULTS TABLE
+connection default;
+USE test;
+#
+# Create results table
+CREATE TABLE test.status_results
+(variable_name VARCHAR(64), start INT DEFAULT 0, stop INT DEFAULT 0, delta INT DEFAULT 0,
+t1 INT DEFAULT 0, t2 INT DEFAULT 0, t3 INT DEFAULT 0, thread INT DEFAULT 0,
+u1 INT DEFAULT 0, u2 INT DEFAULT 0, u3 INT DEFAULT 0, user INT DEFAULT 0,
+h1 INT DEFAULT 0, h2 INT DEFAULT 0, h3 INT DEFAULT 0, host INT DEFAULT 0,
+a1 INT DEFAULT 0, a2 INT DEFAULT 0, a3 INT DEFAULT 0, acct INT DEFAULT 0);
+INSERT INTO test.status_results (variable_name, start)
+SELECT sg.variable_name, sg.variable_value+0 FROM performance_schema.global_status sg
+WHERE variable_name IN ('handler_delete', 'handler_rollback');
+
+# Create test tables
+CREATE TABLE t1 (s1 int) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1), (2), (2), (3), (3), (3);
+CREATE TABLE t2 (s1 int) ENGINE=InnoDB;
+CREATE TABLE t3 (s1 int) ENGINE=InnoDB;
+#
+set @orig_sql_mode= @@sql_mode;
+set sql_mode= (select replace(@@sql_mode,'NO_AUTO_CREATE_USER',''));
+GRANT ALL ON *.* to 'user1'@localhost;
+GRANT ALL ON *.* to 'user2'@localhost;
+GRANT ALL ON *.* to 'user3'@localhost;
+set sql_mode= @orig_sql_mode;
+#
+# ================================================================================
+# CONNECTION 1: DELETE 1, ROLLBACK x 1
+# ================================================================================
+connect con1, localhost, user1,,;
+SET @@session.sql_log_bin=OFF;
+DELETE FROM t1 WHERE s1 = 1;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+ROLLBACK;
+#
+# ================================================================================
+# CONNECTION 2: DELETE 2, ROLLBACK x 2
+# ================================================================================
+connect con2, localhost, user2,,;
+SET @@session.sql_log_bin=OFF;
+DELETE FROM t1 WHERE s1 = 2;
+#
+START TRANSACTION;
+INSERT INTO t1 VALUES (2);
+ROLLBACK;
+#
+START TRANSACTION;
+INSERT INTO t1 VALUES (2);
+ROLLBACK;
+#
+# ================================================================================
+# CONNECTION 3: DELETE 3, ROLLBACK x 3
+# ================================================================================
+connect con3, localhost, user3,,;
+SET @@session.sql_log_bin=OFF;
+DELETE FROM t1 WHERE s1 = 3;
+#
+START TRANSACTION;
+INSERT INTO t1 VALUES (3);
+ROLLBACK;
+#
+START TRANSACTION;
+INSERT INTO t1 VALUES (3);
+ROLLBACK;
+#
+START TRANSACTION;
+INSERT INTO t1 VALUES (3);
+ROLLBACK;
+#
+# ================================================================================
+# CONNECTION DEFAULT: Gather results, compare session and global status counts
+# ================================================================================
+connection default;
+# Get thread ids for each connection.
+USE performance_schema;
+SELECT thread_id INTO @con1_id FROM threads WHERE processlist_user IN ('user1');
+SELECT thread_id INTO @con2_id FROM threads WHERE processlist_user IN ('user2');
+SELECT thread_id INTO @con3_id FROM threads WHERE processlist_user IN ('user3');
+#=================
+# Global results
+#=================
+USE test;
+UPDATE test.status_results sr, performance_schema.global_status sg
+SET sr.stop = sg.variable_value
+WHERE sr.variable_name = sg.variable_name
+AND sg.variable_name IN ('handler_delete', 'handler_rollback');
+#
+# Global deltas: END - START.
+UPDATE test.status_results sr
+SET sr.delta = sr.stop - sr.start;
+#=================
+# Status by thread
+#=================
+# Thread results from CON1.
+UPDATE test.status_results sr, performance_schema.status_by_thread sbt
+SET sr.t1 = sbt.variable_value
+WHERE sr.variable_name = sbt.variable_name
+AND sbt.variable_name IN ('handler_delete', 'handler_rollback')
+AND sbt.thread_id = @con1_id;
+#
+# Thread results from CON2.
+UPDATE test.status_results sr, performance_schema.status_by_thread sbt
+SET sr.t2 = sbt.variable_value
+WHERE sr.variable_name = sbt.variable_name
+AND sbt.variable_name IN ('handler_delete', 'handler_rollback')
+AND sbt.thread_id = @con2_id;
+#
+# Thread results from CON3.
+UPDATE test.status_results sr, performance_schema.status_by_thread sbt
+SET sr.t3 = sbt.variable_value
+WHERE sr.variable_name = sbt.variable_name
+AND sbt.variable_name IN ('handler_delete', 'handler_rollback')
+AND sbt.thread_id = @con3_id;
+#
+# Thread totals for 3 connections.
+UPDATE test.status_results sr
+SET sr.thread = sr.t1 + sr.t2 + sr.t3;
+#=================
+# Status by user
+#=================
+# User1
+UPDATE test.status_results sr, performance_schema.status_by_user sbu
+SET sr.u1 = sbu.variable_value
+WHERE sr.variable_name = sbu.variable_name
+AND sbu.variable_name IN ('handler_delete', 'handler_rollback')
+AND sbu.user IN ('user1');
+#
+# User2
+UPDATE test.status_results sr, performance_schema.status_by_user sbu
+SET sr.u2 = sbu.variable_value
+WHERE sr.variable_name = sbu.variable_name
+AND sbu.variable_name IN ('handler_delete', 'handler_rollback')
+AND sbu.user IN ('user2');
+#
+# User3
+UPDATE test.status_results sr, performance_schema.status_by_user sbu
+SET sr.u3 = sbu.variable_value
+WHERE sr.variable_name = sbu.variable_name
+AND sbu.variable_name IN ('handler_delete', 'handler_rollback')
+AND sbu.user IN ('user3');
+#
+# Status totals for 3 users.
+UPDATE test.status_results sr
+SET sr.user = sr.u1 + sr.u2 + sr.u3;
+#===========================
+# Status by host (localhost)
+#===========================
+#
+# host1 = localhost
+UPDATE test.status_results sr, performance_schema.status_by_host sbh
+SET sr.h1 = sbh.variable_value
+WHERE sr.variable_name = sbh.variable_name
+AND sbh.variable_name IN ('handler_delete', 'handler_rollback')
+AND sbh.host IN ('localhost');
+#
+# Status totals for 'localhost' only.
+UPDATE test.status_results sr
+SET sr.host = sr.h1 + sr.h2 + sr.h3;
+#==================
+# Status by account
+#==================
+# User1@localhost
+UPDATE test.status_results sr, performance_schema.status_by_account sba
+SET sr.a1 = sba.variable_value
+WHERE sr.variable_name = sba.variable_name
+AND sba.variable_name IN ('handler_delete', 'handler_rollback')
+AND sba.user IN ('user1');
+#
+# User2@localhost
+UPDATE test.status_results sr, performance_schema.status_by_account sba
+SET sr.a2 = sba.variable_value
+WHERE sr.variable_name = sba.variable_name
+AND sba.variable_name IN ('handler_delete', 'handler_rollback')
+AND sba.user IN ('user2');
+#
+# User3@localhost
+UPDATE test.status_results sr, performance_schema.status_by_account sba
+SET sr.a3 = sba.variable_value
+WHERE sr.variable_name = sba.variable_name
+AND sba.variable_name IN ('handler_delete', 'handler_rollback')
+AND sba.user IN ('user3');
+#
+#
+# Status totals for 3 accounts.
+UPDATE test.status_results sr
+SET sr.acct = sr.a1 + sr.a2 + sr.a3;
+#
+# ================================================================================
+# TEST 1: STATUS_BY_THREAD: Verify expected status counts per thread (1,2,3)
+# ================================================================================
+#
+# Review per-thread status counts
+#
+USE performance_schema;
+SELECT * FROM status_by_thread WHERE thread_id IN (@con1_id, @con2_id, @con3_id) AND variable_name IN ('handler_delete', 'handler_rollback') ORDER BY thread_id;
+THREAD_ID VARIABLE_NAME VARIABLE_VALUE
+thread_id Handler_delete 1
+thread_id Handler_rollback 1
+thread_id Handler_delete 2
+thread_id Handler_rollback 2
+thread_id Handler_delete 3
+thread_id Handler_rollback 3
+#
+# Verify expected counts for 'handler_delete' per thread
+#
+SELECT *, IF (variable_value = 1,'OK','ERROR') AS Expected FROM status_by_thread WHERE thread_id = @con1_id AND variable_name IN ('handler_delete');
+THREAD_ID VARIABLE_NAME VARIABLE_VALUE Expected
+connect_1 Handler_delete 1 OK
+#
+SELECT *, IF (variable_value = 2,'OK','ERROR') AS Expected FROM status_by_thread WHERE thread_id = @con2_id AND variable_name IN ('handler_delete');
+THREAD_ID VARIABLE_NAME VARIABLE_VALUE Expected
+connnect_2 Handler_delete 2 OK
+#
+SELECT *, IF (variable_value = 3,'OK','ERROR') AS Expected FROM status_by_thread WHERE thread_id = @con3_id AND variable_name IN ('handler_delete');
+THREAD_ID VARIABLE_NAME VARIABLE_VALUE Expected
+connnect_3 Handler_delete 3 OK
+#
+# STATUS_BY_THREAD vs. GLOBAL_STATUS
+#
+SELECT variable_name, t1, t2, t3, delta, thread, IF(thread=delta,'OK','ERROR') Expected
+FROM test.status_results
+ORDER BY variable_name;
+variable_name t1 t2 t3 delta thread Expected
+Handler_delete 1 2 3 6 6 OK
+Handler_rollback 1 2 3 6 6 OK
+#
+# ================================================================================
+# TEST 2: STATUS_BY_USER: Verify expected status counts per user (1,2,3)
+# ================================================================================
+SELECT *, IF (variable_value = 1,'OK','ERROR') AS Expected FROM status_by_user WHERE user IN ('user1') AND variable_name IN ('handler_delete');
+USER VARIABLE_NAME VARIABLE_VALUE Expected
+user1 Handler_delete 1 OK
+#
+SELECT *, IF (variable_value = 2,'OK','ERROR') AS Expected FROM status_by_user WHERE user IN ('user2') AND variable_name IN ('handler_delete');
+USER VARIABLE_NAME VARIABLE_VALUE Expected
+user2 Handler_delete 2 OK
+#
+SELECT *, IF (variable_value = 3,'OK','ERROR') AS Expected FROM status_by_user WHERE user IN ('user3') AND variable_name IN ('handler_delete');
+USER VARIABLE_NAME VARIABLE_VALUE Expected
+user3 Handler_delete 3 OK
+#
+# STATUS_BY_USER vs. GLOBAL_STATUS
+#
+SELECT variable_name, u1, u2, u3, delta, user, IF(user=delta,'OK','ERROR') Expected
+FROM test.status_results
+ORDER BY variable_name;
+variable_name u1 u2 u3 delta user Expected
+Handler_delete 1 2 3 6 6 OK
+Handler_rollback 1 2 3 6 6 OK
+#
+# ================================================================================
+# TEST 3: STATUS_BY_ACCOUNT: Verify expected status counts per user, host (1,2,3)
+# ================================================================================
+SELECT *, IF (variable_value = 1,'OK','ERROR') AS Expected FROM status_by_account WHERE user IN ('user1') AND variable_name IN ('handler_delete');
+USER HOST VARIABLE_NAME VARIABLE_VALUE Expected
+user1 localhost Handler_delete 1 OK
+#
+SELECT *, IF (variable_value = 2,'OK','ERROR') AS Expected FROM status_by_account WHERE user IN ('user2') AND variable_name IN ('handler_delete');
+USER HOST VARIABLE_NAME VARIABLE_VALUE Expected
+user2 localhost Handler_delete 2 OK
+#
+SELECT *, IF (variable_value = 3,'OK','ERROR') AS Expected FROM status_by_account WHERE user IN ('user3') AND variable_name IN ('handler_delete');
+USER HOST VARIABLE_NAME VARIABLE_VALUE Expected
+user3 localhost Handler_delete 3 OK
+#
+# STATUS_BY_ACCOUNT vs. GLOBAL_STATUS
+#
+SELECT variable_name, a1, a2, a3, delta, acct, IF(acct=delta,'OK','ERROR') Expected
+FROM test.status_results
+ORDER BY variable_name;
+variable_name a1 a2 a3 delta acct Expected
+Handler_delete 1 2 3 6 6 OK
+Handler_rollback 1 2 3 6 6 OK
+# ================================================================================
+# TEST 4: STATUS_BY_HOST: Verify expected status counts per host (6)
+# ================================================================================
+SELECT *, IF (variable_value = 6,'OK','ERROR') AS Expected FROM status_by_host WHERE host IN ('localhost') AND variable_name IN ('handler_delete');
+HOST VARIABLE_NAME VARIABLE_VALUE Expected
+localhost Handler_delete 6 OK
+#
+# STATUS_BY_HOST vs. GLOBAL_STATUS
+#
+# Special case: No way to isolate pre-existing 'localhost' activity, so
+# just check global totals = sum(status_by_host).
+#
+SELECT variable_name, h1, h2, h3, delta, host, IF(host=delta,'OK','ERROR') Expected
+FROM test.status_results
+ORDER BY variable_name;
+variable_name h1 h2 h3 delta host Expected
+Handler_delete 6 0 0 6 6 OK
+Handler_rollback 6 0 0 6 6 OK
+#
+# ================================================================================
+# DISCONNECT ALL USERS AND RUN THE TESTS AGAIN. RESULTS SHOULD NOT CHANGE.
+# ================================================================================
+connection default;
+disconnect con1;
+disconnect con2;
+disconnect con3;
+#
+USE test;
+#
+# Clear results table, leave initial global_status counts
+UPDATE test.status_results
+SET stop=0, delta=0,
+t1=0, t2=0, t3=0, thread=0,
+u1=0, u2=0, u3=0, user=0,
+h1=0, h2=0, h3=0, host=0,
+a1=0, a2=0, a3=0, acct=0;
+#
+#=================
+# Global results
+#=================
+USE test;
+UPDATE test.status_results sr, performance_schema.global_status sg
+SET sr.stop = sg.variable_value
+WHERE sr.variable_name = sg.variable_name
+AND sg.variable_name IN ('handler_delete', 'handler_rollback');
+#
+# Global deltas: END - START.
+UPDATE test.status_results sr
+SET sr.delta = sr.stop - sr.start;
+#=================
+# Status by thread
+#=================
+# Thread results from CON1.
+UPDATE test.status_results sr, performance_schema.status_by_thread sbt
+SET sr.t1 = sbt.variable_value
+WHERE sr.variable_name = sbt.variable_name
+AND sbt.variable_name IN ('handler_delete', 'handler_rollback')
+AND sbt.thread_id = @con1_id;
+#
+# Thread results from CON2.
+UPDATE test.status_results sr, performance_schema.status_by_thread sbt
+SET sr.t2 = sbt.variable_value
+WHERE sr.variable_name = sbt.variable_name
+AND sbt.variable_name IN ('handler_delete', 'handler_rollback')
+AND sbt.thread_id = @con2_id;
+#
+# Thread results from CON3.
+UPDATE test.status_results sr, performance_schema.status_by_thread sbt
+SET sr.t3 = sbt.variable_value
+WHERE sr.variable_name = sbt.variable_name
+AND sbt.variable_name IN ('handler_delete', 'handler_rollback')
+AND sbt.thread_id = @con3_id;
+#
+# Thread totals for 3 connections.
+UPDATE test.status_results sr
+SET sr.thread = sr.t1 + sr.t2 + sr.t3;
+#=================
+# Status by user
+#=================
+# User1
+UPDATE test.status_results sr, performance_schema.status_by_user sbu
+SET sr.u1 = sbu.variable_value
+WHERE sr.variable_name = sbu.variable_name
+AND sbu.variable_name IN ('handler_delete', 'handler_rollback')
+AND sbu.user IN ('user1');
+#
+# User2
+UPDATE test.status_results sr, performance_schema.status_by_user sbu
+SET sr.u2 = sbu.variable_value
+WHERE sr.variable_name = sbu.variable_name
+AND sbu.variable_name IN ('handler_delete', 'handler_rollback')
+AND sbu.user IN ('user2');
+#
+# User3
+UPDATE test.status_results sr, performance_schema.status_by_user sbu
+SET sr.u3 = sbu.variable_value
+WHERE sr.variable_name = sbu.variable_name
+AND sbu.variable_name IN ('handler_delete', 'handler_rollback')
+AND sbu.user IN ('user3');
+#
+# Status totals for 3 users.
+UPDATE test.status_results sr
+SET sr.user = sr.u1 + sr.u2 + sr.u3;
+#===========================
+# Status by host (localhost)
+#===========================
+#
+# host1 = localhost
+UPDATE test.status_results sr, performance_schema.status_by_host sbh
+SET sr.h1 = sbh.variable_value
+WHERE sr.variable_name = sbh.variable_name
+AND sbh.variable_name IN ('handler_delete', 'handler_rollback')
+AND sbh.host IN ('localhost');
+#
+# Status totals for 'localhost' only.
+UPDATE test.status_results sr
+SET sr.host = sr.h1 + sr.h2 + sr.h3;
+#==================
+# Status by account
+#==================
+# User1@localhost
+UPDATE test.status_results sr, performance_schema.status_by_account sba
+SET sr.a1 = sba.variable_value
+WHERE sr.variable_name = sba.variable_name
+AND sba.variable_name IN ('handler_delete', 'handler_rollback')
+AND sba.user IN ('user1');
+#
+# User2@localhost
+UPDATE test.status_results sr, performance_schema.status_by_account sba
+SET sr.a2 = sba.variable_value
+WHERE sr.variable_name = sba.variable_name
+AND sba.variable_name IN ('handler_delete', 'handler_rollback')
+AND sba.user IN ('user2');
+#
+# User3@localhost
+UPDATE test.status_results sr, performance_schema.status_by_account sba
+SET sr.a3 = sba.variable_value
+WHERE sr.variable_name = sba.variable_name
+AND sba.variable_name IN ('handler_delete', 'handler_rollback')
+AND sba.user IN ('user3');
+#
+#
+# Status totals for 3 accounts.
+UPDATE test.status_results sr
+SET sr.acct = sr.a1 + sr.a2 + sr.a3;
+USE performance_schema;
+#
+# ================================================================================
+# TEST X: STATUS_BY_THREAD: Connections are gone--nothing to verify.
+# ================================================================================
+#
+# ================================================================================
+# TEST 5: STATUS_BY_USER: Verify expected status counts per user (1,2,3)
+# ================================================================================
+SELECT *, IF (variable_value = 1,'OK','ERROR') AS Expected FROM status_by_user WHERE user IN ('user1') AND variable_name IN ('handler_delete');
+USER VARIABLE_NAME VARIABLE_VALUE Expected
+user1 Handler_delete 1 OK
+#
+SELECT *, IF (variable_value = 2,'OK','ERROR') AS Expected FROM status_by_user WHERE user IN ('user2') AND variable_name IN ('handler_delete');
+USER VARIABLE_NAME VARIABLE_VALUE Expected
+user2 Handler_delete 2 OK
+#
+SELECT *, IF (variable_value = 3,'OK','ERROR') AS Expected FROM status_by_user WHERE user IN ('user3') AND variable_name IN ('handler_delete');
+USER VARIABLE_NAME VARIABLE_VALUE Expected
+user3 Handler_delete 3 OK
+#
+# STATUS_BY_USER vs. GLOBAL_STATUS
+#
+SELECT variable_name, u1, u2, u3, delta, user, IF(user=delta,'OK','ERROR') Expected
+FROM test.status_results
+ORDER BY variable_name;
+variable_name u1 u2 u3 delta user Expected
+Handler_delete 1 2 3 6 6 OK
+Handler_rollback 1 2 3 6 6 OK
+#
+# ================================================================================
+# TEST 6: STATUS_BY_ACCOUNT: Verify expected status counts per user:host (1,2,3)
+# ================================================================================
+SELECT *, IF (variable_value = 1,'OK','ERROR') AS Expected FROM status_by_account WHERE user IN ('user1') AND variable_name IN ('handler_delete');
+USER HOST VARIABLE_NAME VARIABLE_VALUE Expected
+user1 localhost Handler_delete 1 OK
+#
+SELECT *, IF (variable_value = 2,'OK','ERROR') AS Expected FROM status_by_account WHERE user IN ('user2') AND variable_name IN ('handler_delete');
+USER HOST VARIABLE_NAME VARIABLE_VALUE Expected
+user2 localhost Handler_delete 2 OK
+#
+SELECT *, IF (variable_value = 3,'OK','ERROR') AS Expected FROM status_by_account WHERE user IN ('user3') AND variable_name IN ('handler_delete');
+USER HOST VARIABLE_NAME VARIABLE_VALUE Expected
+user3 localhost Handler_delete 3 OK
+#
+# STATUS_BY_ACCOUNT vs. GLOBAL_STATUS
+#
+SELECT variable_name, a1, a2, a3, delta, acct, IF(acct=delta,'OK','ERROR') Expected
+FROM test.status_results
+ORDER BY variable_name;
+variable_name a1 a2 a3 delta acct Expected
+Handler_delete 1 2 3 6 6 OK
+Handler_rollback 1 2 3 6 6 OK
+# ================================================================================
+# TEST 7: STATUS_BY_HOST: Verify expected status counts per host (6)
+# ================================================================================
+SELECT *, IF (variable_value = 6,'OK','ERROR') AS Expected FROM status_by_host WHERE host IN ('localhost') AND variable_name IN ('handler_delete');
+HOST VARIABLE_NAME VARIABLE_VALUE Expected
+localhost Handler_delete 6 OK
+#
+# STATUS_BY_HOST vs. GLOBAL_STATUS
+#
+# Special case: No way to isolate pre-existing 'localhost' activity, so
+# just check global totals = sum(status_by_host).
+#
+SELECT variable_name, h1, h2, h3, delta, host, IF(host=delta,'OK','ERROR') Expected
+FROM test.status_results
+ORDER BY variable_name;
+variable_name h1 h2 h3 delta host Expected
+Handler_delete 6 0 0 6 6 OK
+Handler_rollback 6 0 0 6 6 OK
+# ================================================================================
+# TEST 8: FLUSH STATUS should clear account, host and user status
+# ================================================================================
+#
+FLUSH STATUS;
+#
+SELECT * FROM status_by_account WHERE user IN ('user1', 'user2', 'user3') AND variable_name IN ('handler_delete');
+USER HOST VARIABLE_NAME VARIABLE_VALUE
+user1 localhost Handler_delete 0
+user2 localhost Handler_delete 0
+user3 localhost Handler_delete 0
+#
+SELECT * FROM status_by_host WHERE host IN ('localhost') AND variable_name IN ('handler_delete');
+HOST VARIABLE_NAME VARIABLE_VALUE
+localhost Handler_delete 0
+#
+SELECT * FROM status_by_user WHERE user IN ('user1', 'user2', 'user3') AND variable_name IN ('handler_delete');
+USER VARIABLE_NAME VARIABLE_VALUE
+user1 Handler_delete 0
+user2 Handler_delete 0
+user3 Handler_delete 0
+# ================================================================================
+# CLEANUP
+# ================================================================================
+DROP TABLE test.t1;
+DROP TABLE test.t2;
+DROP TABLE test.t3;
+DROP TABLE test.status_results;
+DROP USER 'user1'@localhost;
+DROP USER 'user2'@localhost;
+DROP USER 'user3'@localhost;
+#
diff --git a/mysql-test/suite/perfschema/r/show_coverage.result b/mysql-test/suite/perfschema/r/show_coverage.result
new file mode 100644
index 00000000000..933554d81a3
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/show_coverage.result
@@ -0,0 +1,142 @@
+
+# TEST 1
+# Handling of SHOW STATUS/VARIABLES ... WHERE
+#
+SHOW STATUS WHERE VARIABLE_NAME LIKE "foo";
+Variable_name Value
+
+SHOW GLOBAL STATUS WHERE VARIABLE_NAME LIKE "foo";
+Variable_name Value
+
+SHOW SESSION STATUS WHERE VARIABLE_NAME LIKE "foo";
+Variable_name Value
+
+SHOW VARIABLES WHERE VARIABLE_NAME LIKE "foo";
+Variable_name Value
+
+SHOW GLOBAL VARIABLES WHERE VARIABLE_NAME LIKE "foo";
+Variable_name Value
+
+SHOW SESSION VARIABLES WHERE VARIABLE_NAME LIKE "foo";
+Variable_name Value
+
+# TEST 2
+# CREATE..SELECT -- Expect correct ER_WARN_DEPRECATED_SYNTAX
+#
+USE test;
+CREATE TABLE t0 SELECT * FROM information_schema.global_status WHERE variable_name = 'COM_SELECT';
+DROP TABLE t0;
+
+# TEST 3
+# Select status and system variable tables using ORDER BY to exercise the
+# rnd_pos() method
+#
+use performance_schema;
+select * from global_variables order by variable_name;
+select * from variables_by_thread order by variable_name;
+select * from session_variables order by variable_name;
+select * from global_status order by variable_name;
+select * from session_status order by variable_name;
+select * from status_by_thread order by variable_name;
+select * from status_by_user order by variable_name;
+select * from status_by_host order by variable_name;
+select * from status_by_account order by variable_name;
+
+# TEST 4
+# Handling of SHOW STATUS/VARIABLES ... WHERE
+#
+SHOW STATUS WHERE VARIABLE_NAME LIKE "foo";
+Variable_name Value
+
+SHOW GLOBAL STATUS WHERE VARIABLE_NAME LIKE "foo";
+Variable_name Value
+
+SHOW SESSION STATUS WHERE VARIABLE_NAME LIKE "foo";
+Variable_name Value
+
+SHOW VARIABLES WHERE VARIABLE_NAME LIKE "foo";
+Variable_name Value
+
+SHOW GLOBAL VARIABLES WHERE VARIABLE_NAME LIKE "foo";
+Variable_name Value
+
+SHOW SESSION VARIABLES WHERE VARIABLE_NAME LIKE "foo";
+Variable_name Value
+
+# TEST 5
+# Confirm FLUSH STATUS resets counters for all threads.
+#
+
+# Create a new connection
+connect con1, localhost, root,,;
+
+# Record thread id
+
+# Increase bytes_received for new connection
+USE test;
+SHOW TABLES;
+Tables_in_test
+connection default;
+USE performance_schema;
+
+# Record bytes_received for other connection
+SELECT variable_value FROM status_by_thread
+WHERE variable_name = "bytes_received" and thread_id = @thread_id INTO @bytes_before;
+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
+Warning 1329 No data - zero rows fetched, selected, or processed
+
+# Reset status counters
+FLUSH STATUS;
+
+# Record bytes_received after reset
+SELECT variable_value FROM status_by_thread
+WHERE variable_name = "bytes_received" and thread_id = @thread_id INTO @bytes_after;
+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
+Warning 1329 No data - zero rows fetched, selected, or processed
+
+# Expect bytes_before > bytes_after
+SELECT @bytes_before > @bytes_after AS 'Expect 1';
+Expect 1
+NULL
+
+# Expect bytes_after is zero
+SELECT @bytes_after AS 'Expect 0';
+Expect 0
+NULL
+disconnect con1;
+
+# TEST 6
+#
+# Bug#28291258 FLUSH STATUS ADDS TWICE TO GLOBAL VALUES
+#
+
+# Default connection
+
+# First connection
+connect con1, localhost, root,,;
+include/assert.inc [Global value requested from the first session must not change]
+
+# Generate a slow query
+
+SET long_query_time = 2;
+SELECT SLEEP(4);
+SLEEP(4)
+0
+SET long_query_time = @@global.long_query_time;
+
+include/assert.inc [Global value requested from the first session after SLEEP() must increase by 1]
+include/assert.inc [First session value must increase by 1]
+connection default;
+disconnect con1;
+
+# Default connection
+connection default;
+include/assert.inc [Global value requested from the default session after DISCONNECT must remain the same]
+include/assert.inc [Default session value must remain zero]
+
+FLUSH STATUS;
+
+include/assert.inc [Global value requested from the default session after FLUSH must remain the same]
+include/assert.inc [Default session value after FLUSH must remain zero]
diff --git a/mysql-test/suite/perfschema/r/show_misc.result b/mysql-test/suite/perfschema/r/show_misc.result
new file mode 100644
index 00000000000..6b5baaaf498
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/show_misc.result
@@ -0,0 +1,74 @@
+select 1;
+1
+1
+SHOW STATUS LIKE 'Last_query_partial_plans';
+Variable_name Value
+select 2;
+2
+2
+SHOW STATUS LIKE 'Last_query_cost';
+Variable_name Value
+Last_query_cost 0.000000
+flush status;
+SHOW STATUS LIKE 'Created_tmp_tables';
+Variable_name Value
+Created_tmp_tables 0
+
+================================================================================
+Bug#21789221 SHOW STATUS FAILS WITH LOCK TABLES AND SHOW_COMPATIBILITY_56=OFF
+================================================================================
+Verify that SHOW STATUS and SHOW VARIABLES works under LOCK TABLES mode
+
+CREATE TABLE test.t1 (s1 INT);
+LOCK TABLE test.t1 READ;
+
+SHOW GLOBAL STATUS WHERE VARIABLE_NAME LIKE "foo";
+Variable_name Value
+
+SHOW SESSION STATUS WHERE VARIABLE_NAME LIKE "foo";
+Variable_name Value
+
+SHOW GLOBAL VARIABLES WHERE VARIABLE_NAME LIKE "foo";
+Variable_name Value
+
+SHOW SESSION VARIABLES WHERE VARIABLE_NAME LIKE "foo";
+Variable_name Value
+
+UNLOCK TABLES;
+
+LOCK TABLE test.t1 WRITE;
+
+SHOW GLOBAL STATUS WHERE VARIABLE_NAME LIKE "foo";
+Variable_name Value
+
+SHOW SESSION STATUS WHERE VARIABLE_NAME LIKE "foo";
+Variable_name Value
+
+SHOW GLOBAL VARIABLES WHERE VARIABLE_NAME LIKE "foo";
+Variable_name Value
+
+SHOW SESSION VARIABLES WHERE VARIABLE_NAME LIKE "foo";
+Variable_name Value
+
+UNLOCK TABLES;
+DROP TABLE test.t1;
+
+================================================================================
+Bug#28515475 BOGUS DATA WHEN ORDERING RESULTS FROM VARIABLES_BY_THREAD
+================================================================================
+Verify the results from "WHERE variable_name IN(...)", particularly for those
+variables that are listed after the deprecated variable gtid_executed.
+The ORDER BY also forces an additional code path through rnd_pos().
+
+SELECT variable_name FROM performance_schema.variables_by_thread
+WHERE variable_name IN ('interactive_timeout','net_read_timeout','net_write_timeout','wait_timeout')
+ORDER BY variable_name;
+variable_name
+interactive_timeout
+net_read_timeout
+net_write_timeout
+wait_timeout
+
+================================================================================
+CLEAN UP
+================================================================================
diff --git a/mysql-test/suite/perfschema/r/show_plugin.result b/mysql-test/suite/perfschema/r/show_plugin.result
new file mode 100644
index 00000000000..172cea22574
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/show_plugin.result
@@ -0,0 +1,626 @@
+
+================================================================================
+SETUP
+================================================================================
+# Save the initial number of concurrent sessions
+
+# Verify EXAMPLE plugin is not loaded
+SELECT COUNT(*) = 0 AS "Expect 1" FROM information_schema.plugins WHERE plugin_name = "EXAMPLE";
+Expect 1
+1
+
+# Create one session to force local and global system variables
+connect con0, localhost, root,,;
+connection default;
+
+================================================================================
+TEST 1- NO PLUGIN VARS
+================================================================================
+
+SHOW GLOBAL STATUS LIKE "example_%";
+Variable_name Value
+
+SHOW SESSION STATUS LIKE "example_%";
+Variable_name Value
+
+SHOW GLOBAL VARIABLES LIKE "example_%";
+Variable_name Value
+
+SHOW SESSION VARIABLES LIKE "example_%";
+Variable_name Value
+
+SELECT variable_name, variable_value FROM performance_schema.global_status WHERE variable_name LIKE "example_%";
+variable_name variable_value
+
+SELECT variable_name, variable_value FROM performance_schema.session_status WHERE variable_name LIKE "example_%";
+variable_name variable_value
+
+SELECT variable_name, variable_value FROM performance_schema.global_variables WHERE variable_name LIKE "example_%";
+variable_name variable_value
+
+SELECT variable_name, variable_value FROM performance_schema.session_variables WHERE variable_name LIKE "example_%";
+variable_name variable_value
+
+================================================================================
+TEST 2 - PLUGIN LOAD, UNLOAD, RELOAD
+================================================================================
+================================================================================
+2.1 - INSTALL PLUGIN
+================================================================================
+INSTALL PLUGIN example SONAME 'ha_example';
+
+================================================================================
+2.1a - FORCE SYNC OF LOCAL AND GLOBAL SYSTEM VARS
+================================================================================
+
+SHOW GLOBAL STATUS LIKE "example_%";
+Variable_name Value
+Example_func_example enum_var is 0, ulong_var is 8, int_var is 0, double_var is 8.500000, really
+
+SHOW SESSION STATUS LIKE "example_%";
+Variable_name Value
+Example_func_example enum_var is 0, ulong_var is 8, int_var is 0, double_var is 8.500000, really
+
+SHOW GLOBAL VARIABLES LIKE "example_%";
+Variable_name Value
+example_double_thdvar 8.500000
+example_double_var 8.500000
+example_enum_var e1
+example_int_var 0
+example_ulong_var 8
+example_varopt_default 5
+
+SHOW SESSION VARIABLES LIKE "example_%";
+Variable_name Value
+example_double_thdvar 8.500000
+example_double_var 8.500000
+example_enum_var e1
+example_int_var 0
+example_ulong_var 8
+example_varopt_default 5
+
+SELECT variable_name, variable_value FROM performance_schema.global_status WHERE variable_name LIKE "example_%";
+variable_name variable_value
+
+SELECT variable_name, variable_value FROM performance_schema.session_status WHERE variable_name LIKE "example_%";
+variable_name variable_value
+
+SELECT variable_name, variable_value FROM performance_schema.global_variables WHERE variable_name LIKE "example_%";
+variable_name variable_value
+example_double_thdvar 8.500000
+example_double_var 8.500000
+example_enum_var e1
+example_int_var 0
+example_ulong_var 8
+example_varopt_default 5
+
+SELECT variable_name, variable_value FROM performance_schema.session_variables WHERE variable_name LIKE "example_%";
+variable_name variable_value
+disconnect con0;
+
+================================================================================
+2.2 - SET PLUGIN VARS
+================================================================================
+# GLOBAL
+SET GLOBAL example_ulong_var = 100;
+SET GLOBAL example_enum_var = e1;
+SET GLOBAL example_double_var = 100.9990;
+SET GLOBAL example_double_thdvar = 101.9991;
+# SESSION
+SET SESSION example_double_thdvar = 102.9992;
+
+================================================================================
+2.3 - VERIFY UPDATED PLUGIN VARS
+================================================================================
+
+SHOW GLOBAL STATUS LIKE "example_%";
+Variable_name Value
+Example_func_example enum_var is 0, ulong_var is 100, int_var is 0, double_var is 100.999000, really
+
+SHOW SESSION STATUS LIKE "example_%";
+Variable_name Value
+Example_func_example enum_var is 0, ulong_var is 100, int_var is 0, double_var is 100.999000, really
+
+SHOW GLOBAL VARIABLES LIKE "example_%";
+Variable_name Value
+example_double_thdvar 101.999100
+example_double_var 100.999000
+example_enum_var e1
+example_int_var 0
+example_ulong_var 100
+example_varopt_default 5
+
+SHOW SESSION VARIABLES LIKE "example_%";
+Variable_name Value
+example_double_thdvar 102.999200
+example_double_var 100.999000
+example_enum_var e1
+example_int_var 0
+example_ulong_var 100
+example_varopt_default 5
+
+SELECT variable_name, variable_value FROM performance_schema.global_status WHERE variable_name LIKE "example_%";
+variable_name variable_value
+
+SELECT variable_name, variable_value FROM performance_schema.session_status WHERE variable_name LIKE "example_%";
+variable_name variable_value
+
+SELECT variable_name, variable_value FROM performance_schema.global_variables WHERE variable_name LIKE "example_%";
+variable_name variable_value
+example_double_thdvar 101.999100
+example_double_var 100.999000
+example_enum_var e1
+example_int_var 0
+example_ulong_var 100
+example_varopt_default 5
+
+SELECT variable_name, variable_value FROM performance_schema.session_variables WHERE variable_name LIKE "example_%";
+variable_name variable_value
+
+================================================================================
+2.4 - UNINSTALL PLUGIN
+================================================================================
+UNINSTALL PLUGIN example;
+
+================================================================================
+2.5 - VERIFY NO PLUGIN VARS
+================================================================================
+
+SHOW GLOBAL STATUS LIKE "example_%";
+Variable_name Value
+
+SHOW SESSION STATUS LIKE "example_%";
+Variable_name Value
+
+SHOW GLOBAL VARIABLES LIKE "example_%";
+Variable_name Value
+
+SHOW SESSION VARIABLES LIKE "example_%";
+Variable_name Value
+
+SELECT variable_name, variable_value FROM performance_schema.global_status WHERE variable_name LIKE "example_%";
+variable_name variable_value
+
+SELECT variable_name, variable_value FROM performance_schema.session_status WHERE variable_name LIKE "example_%";
+variable_name variable_value
+
+SELECT variable_name, variable_value FROM performance_schema.global_variables WHERE variable_name LIKE "example_%";
+variable_name variable_value
+
+SELECT variable_name, variable_value FROM performance_schema.session_variables WHERE variable_name LIKE "example_%";
+variable_name variable_value
+
+================================================================================
+2.6 - REINSTALL PLUGIN
+================================================================================
+# Reinstall EXAMPLE plugin
+INSTALL PLUGIN example SONAME 'ha_example';
+
+================================================================================
+2.7 - SET PLUGIN VARS AGAIN
+================================================================================
+# GLOBAL
+SET GLOBAL example_ulong_var = 200;
+SET GLOBAL example_enum_var = e2;
+SET GLOBAL example_double_var = 200.8880;
+SET GLOBAL example_double_thdvar = 201.8881;
+# SESSION
+SET SESSION example_double_thdvar = 202.8882;
+
+================================================================================
+2.8 - VERIFY PLUGIN VARS
+================================================================================
+
+SHOW GLOBAL STATUS LIKE "example_%";
+Variable_name Value
+Example_func_example enum_var is 1, ulong_var is 200, int_var is 0, double_var is 200.888000, really
+
+SHOW SESSION STATUS LIKE "example_%";
+Variable_name Value
+Example_func_example enum_var is 1, ulong_var is 200, int_var is 0, double_var is 200.888000, really
+
+SHOW GLOBAL VARIABLES LIKE "example_%";
+Variable_name Value
+example_double_thdvar 201.888100
+example_double_var 200.888000
+example_enum_var e2
+example_int_var 0
+example_ulong_var 200
+example_varopt_default 5
+
+SHOW SESSION VARIABLES LIKE "example_%";
+Variable_name Value
+example_double_thdvar 202.888200
+example_double_var 200.888000
+example_enum_var e2
+example_int_var 0
+example_ulong_var 200
+example_varopt_default 5
+
+SELECT variable_name, variable_value FROM performance_schema.global_status WHERE variable_name LIKE "example_%";
+variable_name variable_value
+
+SELECT variable_name, variable_value FROM performance_schema.session_status WHERE variable_name LIKE "example_%";
+variable_name variable_value
+
+SELECT variable_name, variable_value FROM performance_schema.global_variables WHERE variable_name LIKE "example_%";
+variable_name variable_value
+example_double_thdvar 201.888100
+example_double_var 200.888000
+example_enum_var e2
+example_int_var 0
+example_ulong_var 200
+example_varopt_default 5
+
+SELECT variable_name, variable_value FROM performance_schema.session_variables WHERE variable_name LIKE "example_%";
+variable_name variable_value
+
+================================================================================
+2.9 - UNINSTALL PLUGIN
+================================================================================
+UNINSTALL PLUGIN example;
+
+================================================================================
+2.10 - VERIFY NO PLUGIN VARS
+================================================================================
+
+SHOW GLOBAL STATUS LIKE "example_%";
+Variable_name Value
+
+SHOW SESSION STATUS LIKE "example_%";
+Variable_name Value
+
+SHOW GLOBAL VARIABLES LIKE "example_%";
+Variable_name Value
+
+SHOW SESSION VARIABLES LIKE "example_%";
+Variable_name Value
+
+SELECT variable_name, variable_value FROM performance_schema.global_status WHERE variable_name LIKE "example_%";
+variable_name variable_value
+
+SELECT variable_name, variable_value FROM performance_schema.session_status WHERE variable_name LIKE "example_%";
+variable_name variable_value
+
+SELECT variable_name, variable_value FROM performance_schema.global_variables WHERE variable_name LIKE "example_%";
+variable_name variable_value
+
+SELECT variable_name, variable_value FROM performance_schema.session_variables WHERE variable_name LIKE "example_%";
+variable_name variable_value
+
+================================================================================
+TEST 3 - SESSION PLUGIN VARS ON MULTIPLE CONNECTIONS
+================================================================================
+
+================================================================================
+3.1 - INSTALL PLUGIN
+================================================================================
+INSTALL PLUGIN example SONAME 'ha_example';
+
+================================================================================
+3.2 - SET GLOBAL AND DEFAULT CONNECTION VARS
+================================================================================
+connection default;
+SET GLOBAL example_ulong_var = 300;
+SET GLOBAL example_enum_var = e1;
+SET GLOBAL example_double_var = 301.0000;
+SET GLOBAL example_double_thdvar = 302.0000;
+SET SESSION example_double_thdvar = 300.0000;
+
+================================================================================
+3.3 - CONNECT 3 CLIENTS, SET LOCAL PLUGIN VARS
+================================================================================
+connect con1, localhost, root,,;
+SET SESSION example_double_thdvar = 300.1111;
+
+connect con2, localhost, root,,;
+SET SESSION example_double_thdvar = 300.2222;
+
+connect con3, localhost, root,,;
+SET SESSION example_double_thdvar = 300.3333;
+
+connection default;
+
+================================================================================
+3.4 - VERIFY GLOBAL AND SESSION PLUGIN VARS
+================================================================================
+
+SHOW GLOBAL STATUS LIKE "example_%";
+Variable_name Value
+Example_func_example enum_var is 0, ulong_var is 300, int_var is 0, double_var is 301.000000, really
+
+SHOW SESSION STATUS LIKE "example_%";
+Variable_name Value
+Example_func_example enum_var is 0, ulong_var is 300, int_var is 0, double_var is 301.000000, really
+
+SHOW GLOBAL VARIABLES LIKE "example_%";
+Variable_name Value
+example_double_thdvar 302.000000
+example_double_var 301.000000
+example_enum_var e1
+example_int_var 0
+example_ulong_var 300
+example_varopt_default 5
+
+SHOW SESSION VARIABLES LIKE "example_%";
+Variable_name Value
+example_double_thdvar 300.000000
+example_double_var 301.000000
+example_enum_var e1
+example_int_var 0
+example_ulong_var 300
+example_varopt_default 5
+
+SELECT variable_name, variable_value FROM performance_schema.global_status WHERE variable_name LIKE "example_%";
+variable_name variable_value
+
+SELECT variable_name, variable_value FROM performance_schema.session_status WHERE variable_name LIKE "example_%";
+variable_name variable_value
+
+SELECT variable_name, variable_value FROM performance_schema.global_variables WHERE variable_name LIKE "example_%";
+variable_name variable_value
+example_double_thdvar 302.000000
+example_double_var 301.000000
+example_enum_var e1
+example_int_var 0
+example_ulong_var 300
+example_varopt_default 5
+
+SELECT variable_name, variable_value FROM performance_schema.session_variables WHERE variable_name LIKE "example_%";
+variable_name variable_value
+
+# Variables by thread
+SELECT variable_name, variable_value FROM performance_schema.variables_by_thread
+WHERE variable_name LIKE "example_%" ORDER BY variable_value;
+variable_name variable_value
+
+================================================================================
+3.5 - DISCONNECT CLIENTS
+================================================================================
+connection con1;
+disconnect con1;
+connection con2;
+disconnect con2;
+connection con3;
+disconnect con3;
+connection default;
+
+================================================================================
+3.6 - VERIFY SESSION VARS ARE REMOVED
+================================================================================
+
+SHOW GLOBAL STATUS LIKE "example_%";
+Variable_name Value
+Example_func_example enum_var is 0, ulong_var is 300, int_var is 0, double_var is 301.000000, really
+
+SHOW SESSION STATUS LIKE "example_%";
+Variable_name Value
+Example_func_example enum_var is 0, ulong_var is 300, int_var is 0, double_var is 301.000000, really
+
+SHOW GLOBAL VARIABLES LIKE "example_%";
+Variable_name Value
+example_double_thdvar 302.000000
+example_double_var 301.000000
+example_enum_var e1
+example_int_var 0
+example_ulong_var 300
+example_varopt_default 5
+
+SHOW SESSION VARIABLES LIKE "example_%";
+Variable_name Value
+example_double_thdvar 300.000000
+example_double_var 301.000000
+example_enum_var e1
+example_int_var 0
+example_ulong_var 300
+example_varopt_default 5
+
+SELECT variable_name, variable_value FROM performance_schema.global_status WHERE variable_name LIKE "example_%";
+variable_name variable_value
+
+SELECT variable_name, variable_value FROM performance_schema.session_status WHERE variable_name LIKE "example_%";
+variable_name variable_value
+
+SELECT variable_name, variable_value FROM performance_schema.global_variables WHERE variable_name LIKE "example_%";
+variable_name variable_value
+example_double_thdvar 302.000000
+example_double_var 301.000000
+example_enum_var e1
+example_int_var 0
+example_ulong_var 300
+example_varopt_default 5
+
+SELECT variable_name, variable_value FROM performance_schema.session_variables WHERE variable_name LIKE "example_%";
+variable_name variable_value
+
+# Variables by thread
+SELECT variable_name, variable_value FROM performance_schema.variables_by_thread
+WHERE variable_name LIKE "example_%" ORDER BY variable_value;
+variable_name variable_value
+
+================================================================================
+3.7 - RECONNECT 3 CLIENTS, SET SESSION VARS FOR EACH
+================================================================================
+connect con1, localhost, root,,;
+SET SESSION example_double_thdvar = 311.1111;
+
+connect con2, localhost, root,,;
+SET SESSION example_double_thdvar = 322.2222;
+
+connect con3, localhost, root,,;
+SET SESSION example_double_thdvar = 333.3333;
+
+connection default;
+
+================================================================================
+3.8 - VERIFY GLOBAL AND SESSION VARS
+================================================================================
+
+SHOW GLOBAL STATUS LIKE "example_%";
+Variable_name Value
+Example_func_example enum_var is 0, ulong_var is 300, int_var is 0, double_var is 301.000000, really
+
+SHOW SESSION STATUS LIKE "example_%";
+Variable_name Value
+Example_func_example enum_var is 0, ulong_var is 300, int_var is 0, double_var is 301.000000, really
+
+SHOW GLOBAL VARIABLES LIKE "example_%";
+Variable_name Value
+example_double_thdvar 302.000000
+example_double_var 301.000000
+example_enum_var e1
+example_int_var 0
+example_ulong_var 300
+example_varopt_default 5
+
+SHOW SESSION VARIABLES LIKE "example_%";
+Variable_name Value
+example_double_thdvar 300.000000
+example_double_var 301.000000
+example_enum_var e1
+example_int_var 0
+example_ulong_var 300
+example_varopt_default 5
+
+SELECT variable_name, variable_value FROM performance_schema.global_status WHERE variable_name LIKE "example_%";
+variable_name variable_value
+
+SELECT variable_name, variable_value FROM performance_schema.session_status WHERE variable_name LIKE "example_%";
+variable_name variable_value
+
+SELECT variable_name, variable_value FROM performance_schema.global_variables WHERE variable_name LIKE "example_%";
+variable_name variable_value
+example_double_thdvar 302.000000
+example_double_var 301.000000
+example_enum_var e1
+example_int_var 0
+example_ulong_var 300
+example_varopt_default 5
+
+SELECT variable_name, variable_value FROM performance_schema.session_variables WHERE variable_name LIKE "example_%";
+variable_name variable_value
+
+# Variables by thread
+SELECT variable_name, variable_value FROM performance_schema.variables_by_thread
+WHERE variable_name LIKE "example_%" ORDER BY variable_value;
+variable_name variable_value
+
+================================================================================
+3.9 - UNINSTALL PLUGIN, LEAVE CLIENTS CONNECTED
+================================================================================
+UNINSTALL PLUGIN example;
+
+================================================================================
+3.10 - VERIFY SESSION VARS ARE REMOVED
+================================================================================
+
+SHOW GLOBAL STATUS LIKE "example_%";
+Variable_name Value
+
+SHOW SESSION STATUS LIKE "example_%";
+Variable_name Value
+
+SHOW GLOBAL VARIABLES LIKE "example_%";
+Variable_name Value
+
+SHOW SESSION VARIABLES LIKE "example_%";
+Variable_name Value
+
+SELECT variable_name, variable_value FROM performance_schema.global_status WHERE variable_name LIKE "example_%";
+variable_name variable_value
+
+SELECT variable_name, variable_value FROM performance_schema.session_status WHERE variable_name LIKE "example_%";
+variable_name variable_value
+
+SELECT variable_name, variable_value FROM performance_schema.global_variables WHERE variable_name LIKE "example_%";
+variable_name variable_value
+
+SELECT variable_name, variable_value FROM performance_schema.session_variables WHERE variable_name LIKE "example_%";
+variable_name variable_value
+
+# VARIABLES BY THREAD
+SELECT variable_name, variable_value FROM performance_schema.variables_by_thread
+WHERE variable_name LIKE "example_%" ORDER BY variable_value;
+variable_name variable_value
+
+================================================================================
+3.11 - DISCONNECT CLIENTS
+================================================================================
+connection con1;
+disconnect con1;
+connection con2;
+disconnect con2;
+connection con3;
+disconnect con3;
+connection default;
+
+================================================================================
+3.12 - VERIFY CLIENTS ARE REMOVED
+================================================================================
+
+SHOW GLOBAL STATUS LIKE "example_%";
+Variable_name Value
+
+SHOW SESSION STATUS LIKE "example_%";
+Variable_name Value
+
+SHOW GLOBAL VARIABLES LIKE "example_%";
+Variable_name Value
+
+SHOW SESSION VARIABLES LIKE "example_%";
+Variable_name Value
+
+SELECT variable_name, variable_value FROM performance_schema.global_status WHERE variable_name LIKE "example_%";
+variable_name variable_value
+
+SELECT variable_name, variable_value FROM performance_schema.session_status WHERE variable_name LIKE "example_%";
+variable_name variable_value
+
+SELECT variable_name, variable_value FROM performance_schema.global_variables WHERE variable_name LIKE "example_%";
+variable_name variable_value
+
+SELECT variable_name, variable_value FROM performance_schema.session_variables WHERE variable_name LIKE "example_%";
+variable_name variable_value
+
+# VARIABLES BY THREAD
+SELECT variable_name, variable_value FROM performance_schema.variables_by_thread
+WHERE variable_name LIKE "example_%" ORDER BY variable_value;
+variable_name variable_value
+
+================================================================================
+TEST 4 - BUG#18008907: DEADLOCK WITH CHANGE_USER, SHOW VARIABLES, INSTALL PLUGIN
+================================================================================
+
+
+================================================================================
+TEST 5 - BUG#22225549 MYSQL_CHANGE_USER/MYSQL_RESET_CONNECTION + SET INNODB...
+Update to plugin-defined session variable triggers resync with global
+variables and deadlocks on THD::LOCK_thd_sysvar.
+================================================================================
+select @@session.innodb_strict_mode;
+@@session.innodb_strict_mode
+1
+select user(), current_user();
+user() current_user()
+root@localhost root@localhost
+change_user root
+#
+# Trigger a resync of session variables with global variables.
+#
+set @@session.innodb_strict_mode=off;
+
+# Restore
+
+set @@session.innodb_strict_mode=1;
+select @@session.innodb_strict_mode;
+@@session.innodb_strict_mode
+1
+
+================================================================================
+CLEAN UP
+================================================================================
+connection default;
+
+
+
+# Wait till we reached the initial number of concurrent sessions
diff --git a/mysql-test/suite/perfschema/r/show_sanity.result b/mysql-test/suite/perfschema/r/show_sanity.result
new file mode 100644
index 00000000000..71bc92a2c2f
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/show_sanity.result
@@ -0,0 +1,853 @@
+create table test.sanity(
+`SHOW_MODE` varchar(48) NOT NULL,
+`SOURCE` varchar(64) NOT NULL,
+`VARIABLE_NAME` varchar(64) NOT NULL);
+select thread_id from performance_schema.threads
+where processlist_id = connection_id()
+into @my_tid;
+select @@global.show_compatibility_56 into @show_compatibility_56_save;
+set @my_user='root';
+set @my_host='localhost';
+
+================================================================================
+SHOW_COMPATIBILITY_56 = ON
+================================================================================
+set global show_compatibility_56 = on;
+
+# STEP 1-1
+insert into test.sanity
+select "5.6", "I_S.GLOBAL_VARIABLES", variable_name
+from information_schema.global_variables;
+Warnings:
+Warning 1287 'INFORMATION_SCHEMA.GLOBAL_VARIABLES' is deprecated and will be removed in a future release. Please use performance_schema.global_variables instead
+
+# STEP 1-2
+insert into test.sanity
+select "5.6", "I_S.SESSION_VARIABLES", variable_name
+from information_schema.session_variables;
+Warnings:
+Warning 1287 'INFORMATION_SCHEMA.SESSION_VARIABLES' is deprecated and will be removed in a future release. Please use performance_schema.session_variables instead
+
+# STEP 1-3
+insert into test.sanity
+select "5.6", "P_S.GLOBAL_VARIABLES", variable_name
+from performance_schema.global_variables;
+
+# STEP 1-4
+insert into test.sanity
+select "5.6", "P_S.VARIABLES_BY_THREAD", variable_name
+from performance_schema.variables_by_thread
+where thread_id = @my_tid;
+
+# STEP 1-5
+insert into test.sanity
+select "5.6", "P_S.SESSION_VARIABLES", variable_name
+from performance_schema.session_variables;
+
+# STEP 1-6
+insert into test.sanity
+select "5.6", "I_S.GLOBAL_STATUS", variable_name
+from information_schema.global_status;
+Warnings:
+Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
+
+# STEP 1-7
+insert into test.sanity
+select "5.6", "I_S.SESSION_STATUS", variable_name
+from information_schema.session_status;
+Warnings:
+Warning 1287 'INFORMATION_SCHEMA.SESSION_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.session_status instead
+
+# STEP 1-8
+insert into test.sanity
+select "5.6", "P_S.GLOBAL_STATUS", variable_name
+from performance_schema.global_status;
+
+# STEP 1-9
+# EMPTY, NO WARNINGS (not available in 5.6 mode)
+select *
+from performance_schema.status_by_thread;
+THREAD_ID VARIABLE_NAME VARIABLE_VALUE
+
+# STEP 1-10
+insert into test.sanity
+select "5.6", "P_S.SESSION_STATUS", variable_name
+from performance_schema.session_status;
+
+# STEP 1-11
+# EMPTY, NO WARNINGS (not available in 5.6 mode)
+select *
+from performance_schema.status_by_account;
+USER HOST VARIABLE_NAME VARIABLE_VALUE
+
+# STEP 1-12
+# EMPTY, NO WARNINGS (not available in 5.6 mode)
+select *
+from performance_schema.status_by_user;
+USER VARIABLE_NAME VARIABLE_VALUE
+
+# STEP 1-13
+# EMPTY, NO WARNINGS (not available in 5.6 mode)
+select *
+from performance_schema.status_by_host;
+HOST VARIABLE_NAME VARIABLE_VALUE
+
+================================================================================
+SHOW_COMPATIBILITY_56 = OFF
+================================================================================
+set global show_compatibility_56 = off;
+
+# STEP 2-1
+# FAILS WITH ERROR
+select *
+from information_schema.global_variables;
+ERROR HY000: The 'INFORMATION_SCHEMA.GLOBAL_VARIABLES' feature is disabled; see the documentation for 'show_compatibility_56'
+
+# STEP 2-2
+# FAILS WITH ERROR
+select *
+from information_schema.session_variables;
+ERROR HY000: The 'INFORMATION_SCHEMA.SESSION_VARIABLES' feature is disabled; see the documentation for 'show_compatibility_56'
+
+# STEP 2-3
+insert into test.sanity
+select "5.7", "P_S.GLOBAL_VARIABLES", variable_name
+from performance_schema.global_variables;
+
+# STEP 2-4
+insert into test.sanity
+select "5.7", "P_S.VARIABLES_BY_THREAD", variable_name
+from performance_schema.variables_by_thread
+where thread_id = @my_tid;
+
+# STEP 2-5
+insert into test.sanity
+select "5.7", "P_S.SESSION_VARIABLES", variable_name
+from performance_schema.session_variables;
+
+# STEP 2-6
+# FAILS WITH ERROR
+select *
+from information_schema.global_status;
+ERROR HY000: The 'INFORMATION_SCHEMA.GLOBAL_STATUS' feature is disabled; see the documentation for 'show_compatibility_56'
+
+# STEP 2-7
+# FAILS WITH ERROR
+select *
+from information_schema.session_status;
+ERROR HY000: The 'INFORMATION_SCHEMA.SESSION_STATUS' feature is disabled; see the documentation for 'show_compatibility_56'
+
+# STEP 2-8
+insert into test.sanity
+select "5.7", "P_S.GLOBAL_STATUS", variable_name
+from performance_schema.global_status;
+
+# STEP 2-9
+insert into test.sanity
+select "5.7", "P_S.STATUS_BY_THREAD", variable_name
+from performance_schema.status_by_thread
+where thread_id = @my_tid;
+
+# STEP 2-10
+insert into test.sanity
+select "5.7", "P_S.SESSION_STATUS", variable_name
+from performance_schema.session_status;
+
+# STEP 2-11
+insert into test.sanity
+select "5.7", "P_S.STATUS_BY_ACCOUNT", variable_name
+from performance_schema.status_by_account
+where `user` = @my_user and `host` = @my_host;
+
+# STEP 2-12
+insert into test.sanity
+select "5.7", "P_S.STATUS_BY_USER", variable_name
+from performance_schema.status_by_user
+where `user` = @my_user;
+
+# STEP 2-13
+insert into test.sanity
+select "5.7", "P_S.STATUS_BY_HOST", variable_name
+from performance_schema.status_by_host
+where `host` = @my_host;
+
+# STEP 2-14
+# Known global variables in 5.6 that should not display in session queries.
+# These should be global-only system variables.
+
+# STEP 2-15
+# Known global status in 5.6 that should not exist in session queries.
+# These should be global-only status variables.
+
+# STEP 2-15A
+# COM counters appear in I_S.SESSION_STATUS, but not in P_S.SESSION_STATUS
+
+# STEP 2-15B
+# These slave status counters appear in I_S.SESSION_STATUS, but not in P_S.SESSION_STATUS
+insert into test.sanity values
+("JUNK: SLAVE-ONLY", "I_S.SESSION_STATUS", "SLAVE_HEARTBEAT_PERIOD"),
+("JUNK: SLAVE-ONLY", "I_S.SESSION_STATUS", "SLAVE_LAST_HEARTBEAT"),
+("JUNK: SLAVE-ONLY", "I_S.SESSION_STATUS", "SLAVE_RECEIVED_HEARTBEATS"),
+("JUNK: SLAVE-ONLY", "I_S.SESSION_STATUS", "SLAVE_RETRIED_TRANSACTIONS"),
+("JUNK: SLAVE-ONLY", "I_S.SESSION_STATUS", "SLAVE_RUNNING")
+;
+
+# STEP 2-16
+# Known session-only status in 5.6 that should not exist in global queries.
+insert into test.sanity values
+("JUNK: SESSION-ONLY", "I_S.GLOBAL_STATUS", "COMPRESSION"),
+("JUNK: SESSION-ONLY", "I_S.GLOBAL_STATUS", "LAST_QUERY_COST"),
+("JUNK: SESSION-ONLY", "I_S.GLOBAL_STATUS", "LAST_QUERY_PARTIAL_PLANS")
+;
+
+# STEP 2-16A
+# COM counters appear in I_S.GLOBAL_STATUS but not in P_S.GLOBAL_STATUS
+
+# STEP 2-16B
+# These slave status counters appear in I_S.GLOBAL_STATUS, but not in P_S.GLOBAL_STATUS
+insert into test.sanity values
+("JUNK: SLAVE-ONLY", "I_S.GLOBAL_STATUS", "SLAVE_HEARTBEAT_PERIOD"),
+("JUNK: SLAVE-ONLY", "I_S.GLOBAL_STATUS", "SLAVE_LAST_HEARTBEAT"),
+("JUNK: SLAVE-ONLY", "I_S.GLOBAL_STATUS", "SLAVE_RECEIVED_HEARTBEATS"),
+("JUNK: SLAVE-ONLY", "I_S.GLOBAL_STATUS", "SLAVE_RETRIED_TRANSACTIONS"),
+("JUNK: SLAVE-ONLY", "I_S.GLOBAL_STATUS", "SLAVE_RUNNING")
+;
+
+# STEP 2-17
+# Status variables that should not exist in queries that aggregate across threads.
+# Criteria: Session-only OR non-aggregatable.
+insert into test.sanity values
+("JUNK", "NO AGGREGATE", "COMPRESSION"),
+("JUNK", "NO AGGREGATE", "LAST_QUERY_COST"),
+("JUNK", "NO AGGREGATE", "LAST_QUERY_PARTIAL_PLANS"),
+("JUNK", "NO AGGREGATE", "OPEN_TABLES"),
+("JUNK", "NO AGGREGATE", "QUERIES"),
+("JUNK", "NO AGGREGATE", "SLOW_LAUNCH_THREADS"),
+("JUNK", "NO AGGREGATE", "SSL_CIPHER"),
+("JUNK", "NO AGGREGATE", "SSL_CIPHER_LIST"),
+("JUNK", "NO AGGREGATE", "SSL_DEFAULT_TIMEOUT"),
+("JUNK", "NO AGGREGATE", "SSL_SERVER_NOT_AFTER"),
+("JUNK", "NO AGGREGATE", "SSL_SERVER_NOT_BEFORE"),
+("JUNK", "NO AGGREGATE", "SSL_SESSIONS_REUSED"),
+("JUNK", "NO AGGREGATE", "SSL_VERIFY_DEPTH"),
+("JUNK", "NO AGGREGATE", "SSL_VERIFY_MODE"),
+("JUNK", "NO AGGREGATE", "SSL_VERSION")
+;
+
+================================================================================
+TEST 1A
+Present in 5.6 P_S.GLOBAL_VARIABLES (1-3)
+Missing in 5.6 I_S.GLOBAL_VARIABLES (1-1)
+================================================================================
+select * from test.sanity
+where show_mode = "5.6"
+ and source = "P_S.GLOBAL_VARIABLES"
+ and upper(variable_name) not in (
+select upper(variable_name) from test.sanity
+where show_mode = "5.6"
+ and source = "I_S.GLOBAL_VARIABLES")
+order by show_mode, source, variable_name;
+SHOW_MODE SOURCE VARIABLE_NAME
+
+================================================================================
+TEST 1B
+Present in 5.7 P_S.GLOBAL_VARIABLES (2-3)
+Missing in 5.6 I_S.GLOBAL_VARIABLES (1-1)
+================================================================================
+select * from test.sanity
+where show_mode = "5.7"
+ and source = "P_S.GLOBAL_VARIABLES"
+ and upper(variable_name) not in (
+select upper(variable_name) from test.sanity
+where show_mode = "5.6"
+ and source = "I_S.GLOBAL_VARIABLES")
+order by show_mode, source, variable_name;
+SHOW_MODE SOURCE VARIABLE_NAME
+
+================================================================================
+TEST 2A
+Present in 5.6 I_S.GLOBAL_VARIABLES (1-1)
+Missing in 5.6 P_S.GLOBAL_VARIABLES (1-3)
+================================================================================
+select * from test.sanity
+where show_mode = "5.6"
+ and source = "I_S.GLOBAL_VARIABLES"
+ and upper(variable_name) not in (
+select upper(variable_name) from test.sanity
+where show_mode = "5.6"
+ and source = "P_S.GLOBAL_VARIABLES")
+order by show_mode, source, variable_name;
+SHOW_MODE SOURCE VARIABLE_NAME
+5.6 I_S.GLOBAL_VARIABLES SQL_LOG_BIN
+
+================================================================================
+TEST 2B
+Present in 5.6 I_S.GLOBAL_VARIABLES (1-1)
+Missing in 5.7 P_S.GLOBAL_VARIABLES (2-3)
+================================================================================
+select * from test.sanity
+where show_mode = "5.6"
+ and source = "I_S.GLOBAL_VARIABLES"
+ and upper(variable_name) not in (
+select upper(variable_name) from test.sanity
+where show_mode = "5.7"
+ and source = "P_S.GLOBAL_VARIABLES")
+order by show_mode, source, variable_name;
+SHOW_MODE SOURCE VARIABLE_NAME
+5.6 I_S.GLOBAL_VARIABLES SQL_LOG_BIN
+
+================================================================================
+TEST 3A
+Present in 5.6 P_S.SESSION_VARIABLES (1-5)
+Missing in 5.6 I_S.SESSION_VARIABLES (1-2)
+================================================================================
+select * from test.sanity
+where show_mode = "5.6"
+ and source = "P_S.SESSION_VARIABLES"
+ and upper(variable_name) not in (
+select upper(variable_name) from test.sanity
+where show_mode = "5.6"
+ and source = "I_S.SESSION_VARIABLES")
+order by show_mode, source, variable_name;
+SHOW_MODE SOURCE VARIABLE_NAME
+
+================================================================================
+TEST 3B
+Present in 5.7 P_S.SESSION_VARIABLES (2-5)
+Missing in 5.6 I_S.SESSION_VARIABLES (1-2)
+================================================================================
+select * from test.sanity
+where show_mode = "5.7"
+ and source = "P_S.SESSION_VARIABLES"
+ and upper(variable_name) not in (
+select upper(variable_name) from test.sanity
+where show_mode = "5.6"
+ and source = "I_S.SESSION_VARIABLES")
+order by show_mode, source, variable_name;
+SHOW_MODE SOURCE VARIABLE_NAME
+
+================================================================================
+TEST 4A
+Present in 5.6 I_S.SESSION_VARIABLES (1-2)
+Missing in 5.6 P_S.SESSION_VARIABLES (1-5)
+================================================================================
+select * from test.sanity
+where show_mode = "5.6"
+ and source = "I_S.SESSION_VARIABLES"
+ and upper(variable_name) not in (
+select upper(variable_name) from test.sanity
+where show_mode = "5.6"
+ and source = "P_S.SESSION_VARIABLES")
+order by show_mode, source, variable_name;
+SHOW_MODE SOURCE VARIABLE_NAME
+5.6 I_S.SESSION_VARIABLES GTID_EXECUTED
+
+================================================================================
+TEST 4B
+Present in 5.6 I_S.SESSION_VARIABLES (1-2)
+Missing in 5.7 P_S.SESSION_VARIABLES (2-5)
+================================================================================
+select * from test.sanity
+where show_mode = "5.6"
+ and source = "I_S.SESSION_VARIABLES"
+ and upper(variable_name) not in (
+select upper(variable_name) from test.sanity
+where show_mode = "5.7"
+ and source = "P_S.SESSION_VARIABLES")
+order by show_mode, source, variable_name;
+SHOW_MODE SOURCE VARIABLE_NAME
+5.6 I_S.SESSION_VARIABLES GTID_EXECUTED
+
+================================================================================
+TEST 5A
+Present in 5.6 P_S.VARIABLES_BY_THREAD (1-4)
+Missing in 5.6 I_S.SESSION_VARIABLES (1-2)
+================================================================================
+select * from test.sanity
+where show_mode = "5.6"
+ and source = "P_S.VARIABLES_BY_THREAD"
+ and upper(variable_name) not in (
+select upper(variable_name) from test.sanity
+where show_mode = "5.6"
+ and source = "I_S.SESSION_VARIABLES")
+order by show_mode, source, variable_name;
+SHOW_MODE SOURCE VARIABLE_NAME
+
+================================================================================
+TEST 5B
+Present in 5.7 P_S.VARIABLES_BY_THREAD (2-4)
+Missing in 5.6 I_S.SESSION_VARIABLES (1-2)
+================================================================================
+select * from test.sanity
+where show_mode = "5.7"
+ and source = "P_S.VARIABLES_BY_THREAD"
+ and upper(variable_name) not in (
+select upper(variable_name) from test.sanity
+where show_mode = "5.6"
+ and source = "I_S.SESSION_VARIABLES")
+order by show_mode, source, variable_name;
+SHOW_MODE SOURCE VARIABLE_NAME
+
+================================================================================
+TEST 5C
+Present in 5.6 I_S.SESSION_VARIABLES (1-2)
+Missing in 5.6 P_S.VARIABLES_BY_THREAD (1-4)
+EXPECT NOTHING BESIDE KNOWN GLOBAL VARIABLES (2-14)
+================================================================================
+select * from test.sanity
+where show_mode = "5.6"
+ and source = "I_S.SESSION_VARIABLES"
+ and upper(variable_name) not in (
+select upper(variable_name) from test.sanity
+where show_mode = "5.6"
+ and source = "P_S.VARIABLES_BY_THREAD")
+and upper(variable_name) not in (
+select upper(variable_name) from test.sanity
+where show_mode = "JUNK: GLOBAL-ONLY"
+ and source = "I_S.SESSION_VARIABLES")
+order by show_mode, source, variable_name;
+SHOW_MODE SOURCE VARIABLE_NAME
+5.6 I_S.SESSION_VARIABLES BINLOG_TRANSACTION_DEPENDENCY_HISTORY_SIZE
+5.6 I_S.SESSION_VARIABLES BINLOG_TRANSACTION_DEPENDENCY_TRACKING
+5.6 I_S.SESSION_VARIABLES GTID_EXECUTED
+5.6 I_S.SESSION_VARIABLES INNODB_DEADLOCK_DETECT
+5.6 I_S.SESSION_VARIABLES INNODB_STATS_INCLUDE_DELETE_MARKED
+5.6 I_S.SESSION_VARIABLES KEYRING_OPERATIONS
+5.6 I_S.SESSION_VARIABLES LOG_STATEMENTS_UNSAFE_FOR_BINLOG
+5.6 I_S.SESSION_VARIABLES TLS_VERSION
+
+================================================================================
+TEST 5D
+Present in 5.6 I_S.SESSION_VARIABLES (1-2)
+Missing in 5.7 P_S.VARIABLES_BY_THREAD (2-5)
+EXPECT NOTHING BESIDE KNOWN GLOBAL VARIABLES (2-14)
+================================================================================
+select * from test.sanity
+where show_mode = "5.6"
+ and source = "I_S.SESSION_VARIABLES"
+ and upper(variable_name) not in (
+select upper(variable_name) from test.sanity
+where show_mode = "5.7"
+ and source = "P_S.VARIABLES_BY_THREAD")
+and upper(variable_name) not in (
+select upper(variable_name) from test.sanity
+where show_mode = "JUNK: GLOBAL-ONLY"
+ and source = "I_S.SESSION_VARIABLES")
+order by show_mode, source, variable_name;
+SHOW_MODE SOURCE VARIABLE_NAME
+5.6 I_S.SESSION_VARIABLES BINLOG_TRANSACTION_DEPENDENCY_HISTORY_SIZE
+5.6 I_S.SESSION_VARIABLES BINLOG_TRANSACTION_DEPENDENCY_TRACKING
+5.6 I_S.SESSION_VARIABLES GTID_EXECUTED
+5.6 I_S.SESSION_VARIABLES INNODB_DEADLOCK_DETECT
+5.6 I_S.SESSION_VARIABLES INNODB_STATS_INCLUDE_DELETE_MARKED
+5.6 I_S.SESSION_VARIABLES KEYRING_OPERATIONS
+5.6 I_S.SESSION_VARIABLES LOG_STATEMENTS_UNSAFE_FOR_BINLOG
+5.6 I_S.SESSION_VARIABLES TLS_VERSION
+
+================================================================================
+TEST 5E
+KNOWN GLOBAL VARIABLES (2-14)
+Expect missing in 5.6 P_S.VARIABLES_BY_THREAD (1-4)
+================================================================================
+select * from test.sanity
+where show_mode = "JUNK: GLOBAL-ONLY"
+ and source = "I_S.SESSION_VARIABLES"
+ and upper(variable_name) in (
+select upper(variable_name) from test.sanity
+where show_mode = "5.6"
+ and source = "P_S.VARIABLES_BY_THREAD")
+order by show_mode, source, variable_name;
+SHOW_MODE SOURCE VARIABLE_NAME
+
+================================================================================
+TEST 5F
+KNOWN GLOBAL VARIABLES (2-14)
+Expect missing in 5.7 P_S.VARIABLES_BY_THREAD (2-5)
+================================================================================
+select * from test.sanity
+where show_mode = "JUNK: GLOBAL-ONLY"
+ and source = "I_S.SESSION_VARIABLES"
+ and upper(variable_name) in (
+select upper(variable_name) from test.sanity
+where show_mode = "5.7"
+ and source = "P_S.VARIABLES_BY_THREAD")
+order by show_mode, source, variable_name;
+SHOW_MODE SOURCE VARIABLE_NAME
+
+================================================================================
+TEST 6A
+Present in 5.7 P_S.GLOBAL_STATUS (2-8)
+Missing in 5.6 I_S.GLOBAL_STATUS (1-6)
+EXPECT NOTHING
+================================================================================
+select * from test.sanity
+where show_mode = "5.7"
+ and source = "P_S.GLOBAL_STATUS"
+ and upper(variable_name) not in (
+select upper(variable_name) from test.sanity
+where show_mode = "5.6"
+ and source = "I_S.GLOBAL_STATUS")
+order by show_mode, source, variable_name;
+SHOW_MODE SOURCE VARIABLE_NAME
+
+================================================================================
+TEST 6B
+Present in 5.7 P_S.GLOBAL_STATUS (2-8)
+Missing in 5.6 P_S.GLOBAL_STATUS (1-8)
+EXPECT NOTHING
+================================================================================
+select * from test.sanity
+where show_mode = "5.7"
+ and source = "P_S.GLOBAL_STATUS"
+ and upper(variable_name) not in (
+select upper(variable_name) from test.sanity
+where show_mode = "5.6"
+ and source = "P_S.GLOBAL_STATUS")
+order by show_mode, source, variable_name;
+SHOW_MODE SOURCE VARIABLE_NAME
+
+================================================================================
+TEST 6C
+Present in 5.6 P_S.GLOBAL_STATUS (1-8)
+Missing in 5.7 P_S.GLOBAL_STATUS (2-8)
+EXPECT NOTHING
+================================================================================
+select * from test.sanity
+where show_mode = "5.6"
+ and source = "P_S.GLOBAL_STATUS"
+ and upper(variable_name) not in (
+select upper(variable_name) from test.sanity
+where show_mode = "5.7"
+ and source = "P_S.GLOBAL_STATUS")
+order by show_mode, source, variable_name;
+SHOW_MODE SOURCE VARIABLE_NAME
+
+================================================================================
+TEST 7
+Present in 5.6 I_S.GLOBAL_STATUS (1-6)
+Missing in 5.7 P_S.GLOBAL_STATUS (2-8)
+EXPECT NOTHING AFTER REMOVING KNOWN SESSION-ONLY, COM COUNTERS AND SLAVE-ONLY (2-16 & 2-16A & 2-16B)
+================================================================================
+select * from test.sanity
+where show_mode = "5.6"
+ and source = "I_S.GLOBAL_STATUS"
+ and upper(variable_name) not in (
+select upper(variable_name) from test.sanity
+where (show_mode = "JUNK: SESSION-ONLY" or show_mode = "JUNK: COM COUNTER" or show_mode = "JUNK: SLAVE-ONLY")
+and source = "I_S.GLOBAL_STATUS")
+and upper(variable_name) not in (
+select upper(variable_name) from test.sanity
+where show_mode = "5.7"
+ and source = "P_S.GLOBAL_STATUS")
+order by show_mode, source, variable_name;
+SHOW_MODE SOURCE VARIABLE_NAME
+5.6 I_S.GLOBAL_STATUS COM_SHUTDOWN
+
+================================================================================
+TEST 8
+KNOWN SESSION-ONLY (2-16)
+KNOWN COM COUNTERS (2-16A)
+KNOWN SLAVE-ONLY (2-16B)
+Status variables that should NOT be present in 5.7 P_S.GLOBAL_STATUS (2-8)
+EXPECT NOTHING
+================================================================================
+select * from test.sanity
+where show_mode = "5.7"
+ and source = "P_S.GLOBAL_STATUS"
+ and upper(variable_name) in (
+select upper(variable_name) from test.sanity
+where (show_mode = "JUNK: SESSION-ONLY" or show_mode = "JUNK: COM COUNTER" or show_mode = "JUNK: SLAVE-ONLY")
+and source = "I_S.GLOBAL_STATUS")
+order by show_mode, source, variable_name;
+SHOW_MODE SOURCE VARIABLE_NAME
+
+================================================================================
+TEST 9A
+Present in 5.7 P_S.SESSION_STATUS (2-10)
+Missing in 5.6 I_S.SESSION_STATUS (1-7)
+EXPECT NOTHING
+================================================================================
+select * from test.sanity
+where show_mode = "5.7"
+ and source = "P_S.SESSION_STATUS"
+ and upper(variable_name) not in (
+select upper(variable_name) from test.sanity
+where show_mode = "5.6"
+ and source = "I_S.SESSION_STATUS")
+order by show_mode, source, variable_name;
+SHOW_MODE SOURCE VARIABLE_NAME
+
+================================================================================
+TEST 9B
+Present in 5.7 P_S.SESSION_STATUS (2-10)
+Missing in 5.6 P_S.SESSION_STATUS (1-10)
+EXPECT NOTHING
+================================================================================
+select * from test.sanity
+where show_mode = "5.7"
+ and source = "P_S.SESSION_STATUS"
+ and upper(variable_name) not in (
+select upper(variable_name) from test.sanity
+where show_mode = "5.6"
+ and source = "P_S.SESSION_STATUS")
+order by show_mode, source, variable_name;
+SHOW_MODE SOURCE VARIABLE_NAME
+
+================================================================================
+TEST 9C
+Present in 5.6 P_S.SESSION_STATUS (1-10)
+Missing in 5.7 P_S.SESSION_STATUS (2-10)
+EXPECT NOTHING
+================================================================================
+select * from test.sanity
+where show_mode = "5.6"
+ and source = "P_S.SESSION_STATUS"
+ and upper(variable_name) not in (
+select upper(variable_name) from test.sanity
+where show_mode = "5.7"
+ and source = "P_S.SESSION_STATUS")
+order by show_mode, source, variable_name;
+SHOW_MODE SOURCE VARIABLE_NAME
+
+================================================================================
+TEST 10
+Present in 5.6 I_S.SESSION_STATUS (1-7)
+Missing in 5.7 P_S.SESSION_STATUS (2-10)
+EXPECT NOTHING AFTER REMOVING KNOWN COM COUNTERS AND SLAVE-ONLY (2-15A & 2-15B)
+================================================================================
+select * from test.sanity
+where show_mode = "5.6"
+ and source = "I_S.SESSION_STATUS"
+ and upper(variable_name) not in (
+select upper(variable_name) from test.sanity
+where (show_mode = "JUNK: COM COUNTER" or show_mode = "JUNK: SLAVE-ONLY")
+and source = "I_S.SESSION_STATUS")
+and upper(variable_name) not in (
+select upper(variable_name) from test.sanity
+where show_mode = "5.7"
+ and source = "P_S.SESSION_STATUS")
+order by show_mode, source, variable_name;
+SHOW_MODE SOURCE VARIABLE_NAME
+5.6 I_S.SESSION_STATUS COM_SHUTDOWN
+
+================================================================================
+TEST 11
+KNOWN COM COUNTERS (2-15A)
+KNOWN SLAVE-ONLY (2-15B)
+Status variables that should NOT be present in 5.7 P_S.SESSION_STATUS (2-10)
+EXPECT NOTHING
+================================================================================
+select * from test.sanity
+where show_mode = "5.7"
+ and source = "P_S.SESSION_STATUS"
+ and upper(variable_name) in (
+select upper(variable_name) from test.sanity
+where (show_mode = "JUNK: COM COUNTER" or show_mode = "JUNK: SLAVE-ONLY")
+and source = "I_S.SESSION_STATUS")
+order by show_mode, source, variable_name;
+SHOW_MODE SOURCE VARIABLE_NAME
+
+================================================================================
+TEST 12
+Present in 5.7 P_S.SESSION_STATUS (2-10)
+Missing in 5.7 P_S.STATUS_BY_THREAD
+EXPECT NOTHING AFTER REMOVING KNOWN GLOBAL-ONLY (2-15)
+================================================================================
+select * from test.sanity
+where show_mode = "5.7"
+ and source = "P_S.SESSION_STATUS"
+ and upper(variable_name) not in (
+select upper(variable_name) from test.sanity
+where show_mode = "5.7"
+ and source = "P_S.STATUS_BY_THREAD")
+and upper(variable_name) not in (
+select upper(variable_name) from test.sanity
+where (show_mode = "JUNK: GLOBAL-ONLY")
+and source = "I_S.SESSION_STATUS")
+order by show_mode, source, variable_name;
+SHOW_MODE SOURCE VARIABLE_NAME
+
+================================================================================
+TEST 13
+Present in 5.7 P_S.STATUS_BY_THREAD
+Missing in 5.7 P_S.SESSION_STATUS (2-10)
+EXPECT NOTHING
+================================================================================
+select * from test.sanity
+where show_mode = "5.7"
+ and source = "P_S.STATUS_BY_THREAD"
+ and upper(variable_name) not in (
+select upper(variable_name) from test.sanity
+where show_mode = "5.7"
+ and source = "P_S.SESSION_STATUS")
+order by show_mode, source, variable_name;
+SHOW_MODE SOURCE VARIABLE_NAME
+
+================================================================================
+TEST 14
+Present in 5.7 P_S.SESSION_STATUS (2-10)
+Missing in 5.7 P_S.STATUS_BY_ACCOUNT
+EXPECT NOTHING AFTER REMOVING
+- KNOWN GLOBAL-ONLY (2-15)
+- STATUS VARS THAT CAN'T BE AGGREGATED (2-17)
+================================================================================
+select * from test.sanity
+where show_mode = "5.7"
+ and source = "P_S.SESSION_STATUS"
+ and upper(variable_name) not in (
+select upper(variable_name) from test.sanity
+where show_mode = "JUNK"
+ and source = "NO AGGREGATE")
+and upper(variable_name) not in (
+select upper(variable_name) from test.sanity
+where (show_mode = "JUNK: GLOBAL-ONLY")
+and source = "I_S.SESSION_STATUS")
+and upper(variable_name) not in (
+select upper(variable_name) from test.sanity
+where show_mode = "5.7"
+ and source = "P_S.STATUS_BY_ACCOUNT")
+order by show_mode, source, variable_name;
+SHOW_MODE SOURCE VARIABLE_NAME
+
+================================================================================
+TEST 15
+Present in 5.7 P_S.STATUS_BY_ACCOUNT
+Missing in 5.7 P_S.SESSION_STATUS (2-10)
+EXPECT NOTHING
+================================================================================
+select * from test.sanity
+where show_mode = "5.7"
+ and source = "P_S.STATUS_BY_ACCOUNT"
+ and upper(variable_name) not in (
+select upper(variable_name) from test.sanity
+where show_mode = "5.7"
+ and source = "P_S.SESSION_STATUS")
+order by show_mode, source, variable_name;
+SHOW_MODE SOURCE VARIABLE_NAME
+
+================================================================================
+TEST 16
+KNOWN STATUS VARS THAT CAN'T BE AGGREGATED (2-17)
+Status variables that should NOT be present in 5.7 P_S.STATUS_BY_ACCOUNT
+================================================================================
+select * from performance_schema.status_by_account
+where upper(variable_name) in (
+select upper(variable_name) from test.sanity
+where show_mode = "JUNK"
+ and source = "NO AGGREGATE")
+order by variable_name;
+USER HOST VARIABLE_NAME VARIABLE_VALUE
+
+================================================================================
+TEST 17
+Present in 5.7 P_S.SESSION_STATUS (2-10)
+Missing in 5.7 P_S.STATUS_BY_USER
+EXPECT NOTHING AFTER REMOVING
+- KNOWN GLOBAL-ONLY (2-15)
+- STATUS VARS THAT CAN'T BE AGGREGATED (2-17)
+================================================================================
+select * from test.sanity
+where show_mode = "5.7"
+ and source = "P_S.SESSION_STATUS"
+ and upper(variable_name) not in (
+select upper(variable_name) from test.sanity
+where show_mode = "JUNK"
+ and source = "NO AGGREGATE")
+and upper(variable_name) not in (
+select upper(variable_name) from test.sanity
+where (show_mode = "JUNK: GLOBAL-ONLY")
+and source = "I_S.SESSION_STATUS")
+and upper(variable_name) not in (
+select upper(variable_name) from test.sanity
+where show_mode = "5.7"
+ and source = "P_S.STATUS_BY_USER")
+order by show_mode, source, variable_name;
+SHOW_MODE SOURCE VARIABLE_NAME
+
+================================================================================
+TEST 18
+Present in 5.7 P_S.STATUS_BY_USER
+Missing in 5.7 P_S.SESSION_STATUS (2-10)
+================================================================================
+select * from test.sanity
+where show_mode = "5.7"
+ and source = "P_S.STATUS_BY_USER"
+ and upper(variable_name) not in (
+select upper(variable_name) from test.sanity
+where show_mode = "5.7"
+ and source = "P_S.SESSION_STATUS")
+order by show_mode, source, variable_name;
+SHOW_MODE SOURCE VARIABLE_NAME
+
+================================================================================
+TEST 19
+KNOWN STATUS VARS THAT CAN'T BE AGGREGATED (2-17)
+Status variables that should NOT be present in 5.7 P_S.STATUS_BY_USER
+================================================================================
+select * from performance_schema.status_by_user
+where upper(variable_name) in (
+select upper(variable_name) from test.sanity
+where show_mode = "JUNK"
+ and source = "NO AGGREGATE")
+order by variable_name;
+USER VARIABLE_NAME VARIABLE_VALUE
+
+================================================================================
+TEST 20
+Present in 5.7 P_S.SESSION_STATUS (2-10)
+Missing in 5.7 P_S.STATUS_BY_HOST
+EXPECT NOTHING AFTER REMOVING
+- KNOWN GLOBAL-ONLY (2-15)
+- STATUS VARS THAT CAN'T BE AGGREGATED (2-17)
+================================================================================
+select * from test.sanity
+where show_mode = "5.7"
+ and source = "P_S.SESSION_STATUS"
+ and upper(variable_name) not in (
+select upper(variable_name) from test.sanity
+where show_mode = "JUNK"
+ and source = "NO AGGREGATE")
+and upper(variable_name) not in (
+select upper(variable_name) from test.sanity
+where (show_mode = "JUNK: GLOBAL-ONLY")
+and source = "I_S.SESSION_STATUS")
+and upper(variable_name) not in (
+select upper(variable_name) from test.sanity
+where show_mode = "5.7"
+ and source = "P_S.STATUS_BY_HOST")
+order by show_mode, source, variable_name;
+SHOW_MODE SOURCE VARIABLE_NAME
+
+================================================================================
+TEST 21
+Present in 5.7 P_S.STATUS_BY_HOST
+Missing in 5.7 P_S.SESSION_STATUS (2-10)
+================================================================================
+select * from test.sanity
+where show_mode = "5.7"
+ and source = "P_S.STATUS_BY_HOST"
+ and upper(variable_name) not in (
+select upper(variable_name) from test.sanity
+where show_mode = "5.7"
+ and source = "P_S.SESSION_STATUS")
+order by show_mode, source, variable_name;
+SHOW_MODE SOURCE VARIABLE_NAME
+
+================================================================================
+TEST 22
+KNOWN STATUS VARS THAT CAN'T BE AGGREGATED (2-17)
+Status variables that should NOT be present in 5.7 P_S.STATUS_BY_HOST
+================================================================================
+select * from performance_schema.status_by_host
+where upper(variable_name) in (
+select upper(variable_name) from test.sanity
+where show_mode = "JUNK"
+ and source = "NO AGGREGATE")
+order by variable_name;
+HOST VARIABLE_NAME VARIABLE_VALUE
+
+================================================================================
+CLEAN UP
+================================================================================
+set @@global.show_compatibility_56 = @show_compatibility_56_save;
+drop table test.sanity;
diff --git a/mysql-test/suite/perfschema/r/sizing_default.result b/mysql-test/suite/perfschema/r/sizing_default.result
deleted file mode 100644
index ea611315be3..00000000000
--- a/mysql-test/suite/perfschema/r/sizing_default.result
+++ /dev/null
@@ -1,72 +0,0 @@
-show variables like "table_definition_cache";
-Variable_name Value
-table_definition_cache 400
-show variables like "table_open_cache";
-Variable_name Value
-table_open_cache 421
-show variables like "max_connections";
-Variable_name Value
-max_connections 151
-show variables like "open_files_limit";
-Variable_name Value
-open_files_limit 1024
-show variables where
-`Variable_name` != "performance_schema_max_statement_classes" and
-`Variable_name` like "performance_schema%";
-Variable_name Value
-performance_schema ON
-performance_schema_accounts_size 100
-performance_schema_digests_size 5000
-performance_schema_events_stages_history_long_size 1000
-performance_schema_events_stages_history_size 20
-performance_schema_events_statements_history_long_size 1000
-performance_schema_events_statements_history_size 20
-performance_schema_events_waits_history_long_size 1000
-performance_schema_events_waits_history_size 20
-performance_schema_hosts_size 100
-performance_schema_max_cond_classes 90
-performance_schema_max_cond_instances 1360
-performance_schema_max_digest_length 1024
-performance_schema_max_file_classes 50
-performance_schema_max_file_handles 32768
-performance_schema_max_file_instances 2500
-performance_schema_max_mutex_classes 200
-performance_schema_max_mutex_instances 5648
-performance_schema_max_rwlock_classes 40
-performance_schema_max_rwlock_instances 3073
-performance_schema_max_socket_classes 10
-performance_schema_max_socket_instances 230
-performance_schema_max_stage_classes 160
-performance_schema_max_table_handles 2858
-performance_schema_max_table_instances 667
-performance_schema_max_thread_classes 50
-performance_schema_max_thread_instances 288
-performance_schema_session_connect_attrs_size 512
-performance_schema_setup_actors_size 100
-performance_schema_setup_objects_size 100
-performance_schema_users_size 100
-show status like "%performance_schema%";
-Variable_name Value
-Performance_schema_accounts_lost 0
-Performance_schema_cond_classes_lost 0
-Performance_schema_cond_instances_lost 0
-Performance_schema_digest_lost 0
-Performance_schema_file_classes_lost 0
-Performance_schema_file_handles_lost 0
-Performance_schema_file_instances_lost 0
-Performance_schema_hosts_lost 0
-Performance_schema_locker_lost 0
-Performance_schema_mutex_classes_lost 0
-Performance_schema_mutex_instances_lost 0
-Performance_schema_rwlock_classes_lost 0
-Performance_schema_rwlock_instances_lost 0
-Performance_schema_session_connect_attrs_lost 0
-Performance_schema_socket_classes_lost 0
-Performance_schema_socket_instances_lost 0
-Performance_schema_stage_classes_lost 0
-Performance_schema_statement_classes_lost 0
-Performance_schema_table_handles_lost 0
-Performance_schema_table_instances_lost 0
-Performance_schema_thread_classes_lost 0
-Performance_schema_thread_instances_lost 0
-Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/sizing_growth.result b/mysql-test/suite/perfschema/r/sizing_growth.result
deleted file mode 100644
index 2190e904fd4..00000000000
--- a/mysql-test/suite/perfschema/r/sizing_growth.result
+++ /dev/null
@@ -1,255 +0,0 @@
-flush status;
-flush tables;
-select * from performance_schema.mutex_instances;
-select * from performance_schema.rwlock_instances;
-select * from performance_schema.cond_instances;
-select * from performance_schema.file_instances;
-select count(*) from performance_schema.mutex_instances
-into @v0_mutex_instances;
-select count(*) from performance_schema.rwlock_instances
-into @v0_rwlock_instances;
-select count(*) from performance_schema.cond_instances
-into @v0_cond_instances;
-select count(*) from performance_schema.file_instances
-into @v0_file_instances;
-select count(*) from performance_schema.mutex_instances
-into @v1_mutex_instances;
-select count(*) from performance_schema.rwlock_instances
-into @v1_rwlock_instances;
-select count(*) from performance_schema.cond_instances
-into @v1_cond_instances;
-select count(*) from performance_schema.file_instances
-into @v1_file_instances;
-select count(name), name from performance_schema.mutex_instances
-group by name;
-select count(name), name from performance_schema.rwlock_instances
-group by name;
-select count(name), name from performance_schema.cond_instances
-group by name;
-select count(event_name), event_name from performance_schema.file_instances
-group by event_name;
-begin;
-create table test.t1(a int) engine = innodb;
-create table test.t2(a int) engine = innodb;
-create table test.t3(a int) engine = innodb;
-create table test.t4(a int) engine = innodb;
-create table test.t5(a int) engine = innodb;
-create table test.t6(a int) engine = innodb;
-create table test.t7(a int) engine = innodb;
-create table test.t8(a int) engine = innodb;
-create table test.t9(a int) engine = innodb;
-create table test.t10(a int) engine = innodb;
-select * from test.t1;
-select * from test.t2;
-select * from test.t3;
-select * from test.t4;
-select * from test.t5;
-select * from test.t6;
-select * from test.t7;
-select * from test.t8;
-select * from test.t9;
-select * from test.t10;
-commit;
-select count(*) from performance_schema.mutex_instances
-into @v2_mutex_instances;
-select count(*) from performance_schema.rwlock_instances
-into @v2_rwlock_instances;
-select count(*) from performance_schema.cond_instances
-into @v2_cond_instances;
-select count(*) from performance_schema.file_instances
-into @v2_file_instances;
-select count(name), name from performance_schema.mutex_instances
-group by name;
-select count(name), name from performance_schema.rwlock_instances
-group by name;
-select count(name), name from performance_schema.cond_instances
-group by name;
-select count(event_name), event_name from performance_schema.file_instances
-group by event_name;
-select @v2_mutex_instances, @v1_mutex_instances, @v0_mutex_instances;
-select @v2_rwlock_instances, @v1_rwlock_instances, @v0_rwlock_instances;
-select @v2_cond_instances, @v1_cond_instances, @v0_cond_instances;
-select @v2_file_instances, @v1_file_instances, @v0_file_instances;
-select round((@v2_mutex_instances - @v1_mutex_instances) / 10)
-into @mutex_per_share;
-select round((@v2_rwlock_instances - @v1_rwlock_instances) / 10)
-into @rwlock_per_share;
-select round((@v2_cond_instances - @v1_cond_instances) / 10)
-into @cond_per_share;
-select round((@v2_file_instances - @v1_file_instances) / 10)
-into @file_per_share;
-select "con1 connected";
-select "con2 connected";
-select "con3 connected";
-select "con4 connected";
-select "con5 connected";
-select "con6 connected";
-select "con7 connected";
-select "con8 connected";
-select "con9 connected";
-select "con10 connected";
-select count(*) from performance_schema.mutex_instances
-into @v3_mutex_instances;
-select count(*) from performance_schema.rwlock_instances
-into @v3_rwlock_instances;
-select count(*) from performance_schema.cond_instances
-into @v3_cond_instances;
-select count(*) from performance_schema.file_instances
-into @v3_file_instances;
-select count(name), name from performance_schema.mutex_instances
-group by name;
-select count(name), name from performance_schema.rwlock_instances
-group by name;
-select count(name), name from performance_schema.cond_instances
-group by name;
-select count(event_name), event_name from performance_schema.file_instances
-group by event_name;
-select @v3_mutex_instances, @v2_mutex_instances;
-select @v3_rwlock_instances, @v2_rwlock_instances;
-select @v3_cond_instances, @v2_cond_instances;
-select @v3_file_instances, @v2_file_instances;
-select round((@v3_mutex_instances - @v2_mutex_instances) / 10)
-into @mutex_per_con;
-select round((@v3_rwlock_instances - @v2_rwlock_instances) / 10)
-into @rwlock_per_con;
-select round((@v3_cond_instances - @v2_cond_instances) / 10)
-into @cond_per_con;
-select round((@v3_file_instances - @v2_file_instances) / 10)
-into @file_per_con;
-lock table test.t1 write, test.t2 write, test.t3 write, test.t4 write,
-test.t5 write, test.t6 write, test.t7 write, test.t8 write, test.t9 write,
-test.t10 write;
-select t1.*, t2.*, t3.*, t4.*, t5.*, t6.*, t7.*, t8.*, t9.*, t10.*
-from t1, t2, t3, t4, t5, t6, t7, t8, t9, t10;
-select t1.*, t2.*, t3.*, t4.*, t5.*, t6.*, t7.*, t8.*, t9.*, t10.*
-from t1, t2, t3, t4, t5, t6, t7, t8, t9, t10;
-select t1.*, t2.*, t3.*, t4.*, t5.*, t6.*, t7.*, t8.*, t9.*, t10.*
-from t1, t2, t3, t4, t5, t6, t7, t8, t9, t10;
-select t1.*, t2.*, t3.*, t4.*, t5.*, t6.*, t7.*, t8.*, t9.*, t10.*
-from t1, t2, t3, t4, t5, t6, t7, t8, t9, t10;
-select t1.*, t2.*, t3.*, t4.*, t5.*, t6.*, t7.*, t8.*, t9.*, t10.*
-from t1, t2, t3, t4, t5, t6, t7, t8, t9, t10;
-select t1.*, t2.*, t3.*, t4.*, t5.*, t6.*, t7.*, t8.*, t9.*, t10.*
-from t1, t2, t3, t4, t5, t6, t7, t8, t9, t10;
-select t1.*, t2.*, t3.*, t4.*, t5.*, t6.*, t7.*, t8.*, t9.*, t10.*
-from t1, t2, t3, t4, t5, t6, t7, t8, t9, t10;
-select t1.*, t2.*, t3.*, t4.*, t5.*, t6.*, t7.*, t8.*, t9.*, t10.*
-from t1, t2, t3, t4, t5, t6, t7, t8, t9, t10;
-select t1.*, t2.*, t3.*, t4.*, t5.*, t6.*, t7.*, t8.*, t9.*, t10.*
-from t1, t2, t3, t4, t5, t6, t7, t8, t9, t10;
-select t1.*, t2.*, t3.*, t4.*, t5.*, t6.*, t7.*, t8.*, t9.*, t10.*
-from t1, t2, t3, t4, t5, t6, t7, t8, t9, t10;
-select count(*) from performance_schema.mutex_instances
-into @v4_mutex_instances;
-select count(*) from performance_schema.rwlock_instances
-into @v4_rwlock_instances;
-select count(*) from performance_schema.cond_instances
-into @v4_cond_instances;
-select count(*) from performance_schema.file_instances
-into @v4_file_instances;
-select count(name), name from performance_schema.mutex_instances
-group by name;
-select count(name), name from performance_schema.rwlock_instances
-group by name;
-select count(name), name from performance_schema.cond_instances
-group by name;
-select count(event_name), event_name from performance_schema.file_instances
-group by event_name;
-select @v4_mutex_instances, @v3_mutex_instances;
-select @v4_rwlock_instances, @v3_rwlock_instances;
-select @v4_cond_instances, @v3_cond_instances;
-select @v4_file_instances, @v3_file_instances;
-select round((@v4_mutex_instances - @v3_mutex_instances) / 10)
-into @mutex_per_handle;
-select round((@v4_rwlock_instances - @v3_rwlock_instances) / 10)
-into @rwlock_per_handle;
-select round((@v4_cond_instances - @v3_cond_instances) / 10)
-into @cond_per_handle;
-select round((@v4_file_instances - @v3_file_instances) / 10)
-into @file_per_handle;
-unlock tables;
-drop table test.t1;
-drop table test.t2;
-drop table test.t3;
-drop table test.t4;
-drop table test.t5;
-drop table test.t6;
-drop table test.t7;
-drop table test.t8;
-drop table test.t9;
-drop table test.t10;
-show status like "performance_schema%";
-Variable_name Value
-Performance_schema_accounts_lost 0
-Performance_schema_cond_classes_lost 0
-Performance_schema_cond_instances_lost 0
-Performance_schema_digest_lost 0
-Performance_schema_file_classes_lost 0
-Performance_schema_file_handles_lost 0
-Performance_schema_file_instances_lost 0
-Performance_schema_hosts_lost 0
-Performance_schema_locker_lost 0
-Performance_schema_mutex_classes_lost 0
-Performance_schema_mutex_instances_lost 0
-Performance_schema_rwlock_classes_lost 0
-Performance_schema_rwlock_instances_lost 0
-Performance_schema_session_connect_attrs_lost 0
-Performance_schema_socket_classes_lost 0
-Performance_schema_socket_instances_lost 0
-Performance_schema_stage_classes_lost 0
-Performance_schema_statement_classes_lost 0
-Performance_schema_table_handles_lost 0
-Performance_schema_table_instances_lost 0
-Performance_schema_thread_classes_lost 0
-Performance_schema_thread_instances_lost 0
-Performance_schema_users_lost 0
-select @rwlock_per_share <= 3;
-@rwlock_per_share <= 3
-1
-select @cond_per_share;
-@cond_per_share
-0
-select @file_per_share <= 3;
-@file_per_share <= 3
-1
-select @mutex_per_con;
-@mutex_per_con
-3
-select @rwlock_per_con;
-@rwlock_per_con
-1
-select @cond_per_con;
-@cond_per_con
-2
-select @file_per_con;
-@file_per_con
-0
-select @mutex_per_handle;
-@mutex_per_handle
-0
-select @rwlock_per_handle;
-@rwlock_per_handle
-0
-select @cond_per_handle;
-@cond_per_handle
-0
-select @file_per_handle;
-@file_per_handle
-0
-select if(
-(@rwlock_per_share <= 3)
-AND (@cond_per_share = 0)
-AND (@file_per_share <= 3)
-AND (@mutex_per_con = 3)
-AND (@rwlock_per_con = 1)
-AND (@cond_per_con = 2)
-AND (@file_per_con = 0)
-AND (@mutex_per_handle = 0)
-AND (@rwlock_per_handle = 0)
-AND (@cond_per_handle = 0)
-AND (@file_per_handle = 0),
-"OK: heuristics are up to date",
-"FAILED: heuristics need to be updated")
-as status;
-status
-OK: heuristics are up to date
diff --git a/mysql-test/suite/perfschema/r/sizing_high.result b/mysql-test/suite/perfschema/r/sizing_high.result
deleted file mode 100644
index 1f63ac6015a..00000000000
--- a/mysql-test/suite/perfschema/r/sizing_high.result
+++ /dev/null
@@ -1,72 +0,0 @@
-show variables like "table_definition_cache";
-Variable_name Value
-table_definition_cache 5000
-show variables like "table_open_cache";
-Variable_name Value
-table_open_cache 397
-show variables like "max_connections";
-Variable_name Value
-max_connections 200
-show variables like "open_files_limit";
-Variable_name Value
-open_files_limit 1024
-show variables where
-`Variable_name` != "performance_schema_max_statement_classes" and
-`Variable_name` like "performance_schema%";
-Variable_name Value
-performance_schema ON
-performance_schema_accounts_size 100
-performance_schema_digests_size 5000
-performance_schema_events_stages_history_long_size 1000
-performance_schema_events_stages_history_size 20
-performance_schema_events_statements_history_long_size 1000
-performance_schema_events_statements_history_size 20
-performance_schema_events_waits_history_long_size 1000
-performance_schema_events_waits_history_size 20
-performance_schema_hosts_size 100
-performance_schema_max_cond_classes 90
-performance_schema_max_cond_instances 1500
-performance_schema_max_digest_length 1024
-performance_schema_max_file_classes 50
-performance_schema_max_file_handles 32768
-performance_schema_max_file_instances 2500
-performance_schema_max_mutex_classes 200
-performance_schema_max_mutex_instances 5858
-performance_schema_max_rwlock_classes 40
-performance_schema_max_rwlock_instances 3143
-performance_schema_max_socket_classes 10
-performance_schema_max_socket_instances 300
-performance_schema_max_stage_classes 160
-performance_schema_max_table_handles 2858
-performance_schema_max_table_instances 667
-performance_schema_max_thread_classes 50
-performance_schema_max_thread_instances 358
-performance_schema_session_connect_attrs_size 512
-performance_schema_setup_actors_size 100
-performance_schema_setup_objects_size 100
-performance_schema_users_size 100
-show status like "%performance_schema%";
-Variable_name Value
-Performance_schema_accounts_lost 0
-Performance_schema_cond_classes_lost 0
-Performance_schema_cond_instances_lost 0
-Performance_schema_digest_lost 0
-Performance_schema_file_classes_lost 0
-Performance_schema_file_handles_lost 0
-Performance_schema_file_instances_lost 0
-Performance_schema_hosts_lost 0
-Performance_schema_locker_lost 0
-Performance_schema_mutex_classes_lost 0
-Performance_schema_mutex_instances_lost 0
-Performance_schema_rwlock_classes_lost 0
-Performance_schema_rwlock_instances_lost 0
-Performance_schema_session_connect_attrs_lost 0
-Performance_schema_socket_classes_lost 0
-Performance_schema_socket_instances_lost 0
-Performance_schema_stage_classes_lost 0
-Performance_schema_statement_classes_lost 0
-Performance_schema_table_handles_lost 0
-Performance_schema_table_instances_lost 0
-Performance_schema_thread_classes_lost 0
-Performance_schema_thread_instances_lost 0
-Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/sizing_low.result b/mysql-test/suite/perfschema/r/sizing_low.result
deleted file mode 100644
index d6d6baeca9a..00000000000
--- a/mysql-test/suite/perfschema/r/sizing_low.result
+++ /dev/null
@@ -1,73 +0,0 @@
-show variables like "table_definition_cache";
-Variable_name Value
-table_definition_cache 400
-show variables like "table_open_cache";
-Variable_name Value
-table_open_cache 100
-show variables like "max_connections";
-Variable_name Value
-max_connections 50
-show variables like "open_files_limit";
-Variable_name Value
-open_files_limit 1024
-show variables where
-`Variable_name` != "performance_schema_max_statement_classes" and
-`Variable_name` like "performance_schema%";
-Variable_name Value
-performance_schema ON
-performance_schema_accounts_size 100
-performance_schema_digests_size 5000
-performance_schema_events_stages_history_long_size 1000
-performance_schema_events_stages_history_size 20
-performance_schema_events_statements_history_long_size 1000
-performance_schema_events_statements_history_size 20
-performance_schema_events_waits_history_long_size 1000
-performance_schema_events_waits_history_size 20
-performance_schema_hosts_size 100
-performance_schema_max_cond_classes 90
-performance_schema_max_cond_instances 1072
-performance_schema_max_digest_length 1024
-performance_schema_max_file_classes 50
-performance_schema_max_file_handles 32768
-performance_schema_max_file_instances 2500
-performance_schema_max_mutex_classes 200
-performance_schema_max_mutex_instances 5215
-performance_schema_max_rwlock_classes 40
-performance_schema_max_rwlock_instances 2929
-performance_schema_max_socket_classes 10
-performance_schema_max_socket_instances 86
-performance_schema_max_stage_classes 160
-performance_schema_max_table_handles 2858
-performance_schema_max_table_instances 667
-performance_schema_max_thread_classes 50
-performance_schema_max_thread_instances 143
-performance_schema_session_connect_attrs_size 512
-performance_schema_setup_actors_size 100
-performance_schema_setup_objects_size 100
-performance_schema_users_size 100
-show status like "%performance_schema%";
-Variable_name Value
-Performance_schema_accounts_lost 0
-Performance_schema_cond_classes_lost 0
-Performance_schema_cond_instances_lost 0
-Performance_schema_digest_lost 0
-Performance_schema_file_classes_lost 0
-Performance_schema_file_handles_lost 0
-Performance_schema_file_instances_lost 0
-Performance_schema_hosts_lost 0
-Performance_schema_locker_lost 0
-Performance_schema_mutex_classes_lost 0
-Performance_schema_mutex_instances_lost 0
-Performance_schema_rwlock_classes_lost 0
-Performance_schema_rwlock_instances_lost 0
-Performance_schema_session_connect_attrs_lost 0
-Performance_schema_socket_classes_lost 0
-Performance_schema_socket_instances_lost 0
-Performance_schema_stage_classes_lost 0
-Performance_schema_statement_classes_lost 0
-Performance_schema_table_handles_lost 0
-Performance_schema_table_instances_lost 0
-Performance_schema_thread_classes_lost 0
-Performance_schema_thread_instances_lost 0
-Performance_schema_users_lost 0
-CALL mtr.add_suppression("innodb_open_files should not be greater than the open_files_limit.");
diff --git a/mysql-test/suite/perfschema/r/sizing_med.result b/mysql-test/suite/perfschema/r/sizing_med.result
deleted file mode 100644
index f662809b5cd..00000000000
--- a/mysql-test/suite/perfschema/r/sizing_med.result
+++ /dev/null
@@ -1,72 +0,0 @@
-show variables like "table_definition_cache";
-Variable_name Value
-table_definition_cache 401
-show variables like "table_open_cache";
-Variable_name Value
-table_open_cache 401
-show variables like "max_connections";
-Variable_name Value
-max_connections 152
-show variables like "open_files_limit";
-Variable_name Value
-open_files_limit 1024
-show variables where
-`Variable_name` != "performance_schema_max_statement_classes" and
-`Variable_name` like "performance_schema%";
-Variable_name Value
-performance_schema ON
-performance_schema_accounts_size 100
-performance_schema_digests_size 5000
-performance_schema_events_stages_history_long_size 1000
-performance_schema_events_stages_history_size 20
-performance_schema_events_statements_history_long_size 1000
-performance_schema_events_statements_history_size 20
-performance_schema_events_waits_history_long_size 1000
-performance_schema_events_waits_history_size 20
-performance_schema_hosts_size 100
-performance_schema_max_cond_classes 90
-performance_schema_max_cond_instances 1363
-performance_schema_max_digest_length 1024
-performance_schema_max_file_classes 50
-performance_schema_max_file_handles 32768
-performance_schema_max_file_instances 2500
-performance_schema_max_mutex_classes 200
-performance_schema_max_mutex_instances 5652
-performance_schema_max_rwlock_classes 40
-performance_schema_max_rwlock_instances 3075
-performance_schema_max_socket_classes 10
-performance_schema_max_socket_instances 232
-performance_schema_max_stage_classes 160
-performance_schema_max_table_handles 2858
-performance_schema_max_table_instances 667
-performance_schema_max_thread_classes 50
-performance_schema_max_thread_instances 289
-performance_schema_session_connect_attrs_size 512
-performance_schema_setup_actors_size 100
-performance_schema_setup_objects_size 100
-performance_schema_users_size 100
-show status like "%performance_schema%";
-Variable_name Value
-Performance_schema_accounts_lost 0
-Performance_schema_cond_classes_lost 0
-Performance_schema_cond_instances_lost 0
-Performance_schema_digest_lost 0
-Performance_schema_file_classes_lost 0
-Performance_schema_file_handles_lost 0
-Performance_schema_file_instances_lost 0
-Performance_schema_hosts_lost 0
-Performance_schema_locker_lost 0
-Performance_schema_mutex_classes_lost 0
-Performance_schema_mutex_instances_lost 0
-Performance_schema_rwlock_classes_lost 0
-Performance_schema_rwlock_instances_lost 0
-Performance_schema_session_connect_attrs_lost 0
-Performance_schema_socket_classes_lost 0
-Performance_schema_socket_instances_lost 0
-Performance_schema_stage_classes_lost 0
-Performance_schema_statement_classes_lost 0
-Performance_schema_table_handles_lost 0
-Performance_schema_table_instances_lost 0
-Performance_schema_thread_classes_lost 0
-Performance_schema_thread_instances_lost 0
-Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/sizing_off.result b/mysql-test/suite/perfschema/r/sizing_off.result
deleted file mode 100644
index d3c0a0de0a1..00000000000
--- a/mysql-test/suite/perfschema/r/sizing_off.result
+++ /dev/null
@@ -1,60 +0,0 @@
-show variables where
-`Variable_name` != "performance_schema_max_statement_classes" and
-`Variable_name` like "performance_schema%";
-Variable_name Value
-performance_schema OFF
-performance_schema_accounts_size -1
-performance_schema_digests_size -1
-performance_schema_events_stages_history_long_size -1
-performance_schema_events_stages_history_size -1
-performance_schema_events_statements_history_long_size -1
-performance_schema_events_statements_history_size -1
-performance_schema_events_waits_history_long_size -1
-performance_schema_events_waits_history_size -1
-performance_schema_hosts_size -1
-performance_schema_max_cond_classes 90
-performance_schema_max_cond_instances -1
-performance_schema_max_digest_length 1024
-performance_schema_max_file_classes 50
-performance_schema_max_file_handles 32768
-performance_schema_max_file_instances -1
-performance_schema_max_mutex_classes 200
-performance_schema_max_mutex_instances -1
-performance_schema_max_rwlock_classes 40
-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_table_handles -1
-performance_schema_max_table_instances -1
-performance_schema_max_thread_classes 50
-performance_schema_max_thread_instances -1
-performance_schema_session_connect_attrs_size -1
-performance_schema_setup_actors_size 100
-performance_schema_setup_objects_size 100
-performance_schema_users_size -1
-show status like "performance_schema%";
-Variable_name Value
-Performance_schema_accounts_lost 0
-Performance_schema_cond_classes_lost 0
-Performance_schema_cond_instances_lost 0
-Performance_schema_digest_lost 0
-Performance_schema_file_classes_lost 0
-Performance_schema_file_handles_lost 0
-Performance_schema_file_instances_lost 0
-Performance_schema_hosts_lost 0
-Performance_schema_locker_lost 0
-Performance_schema_mutex_classes_lost 0
-Performance_schema_mutex_instances_lost 0
-Performance_schema_rwlock_classes_lost 0
-Performance_schema_rwlock_instances_lost 0
-Performance_schema_session_connect_attrs_lost 0
-Performance_schema_socket_classes_lost 0
-Performance_schema_socket_instances_lost 0
-Performance_schema_stage_classes_lost 0
-Performance_schema_statement_classes_lost 0
-Performance_schema_table_handles_lost 0
-Performance_schema_table_instances_lost 0
-Performance_schema_thread_classes_lost 0
-Performance_schema_thread_instances_lost 0
-Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/socket_connect.result b/mysql-test/suite/perfschema/r/socket_connect.result
index 304521b044f..b729b7b3840 100644
--- a/mysql-test/suite/perfschema/r/socket_connect.result
+++ b/mysql-test/suite/perfschema/r/socket_connect.result
@@ -11,21 +11,21 @@ SELECT @@port INTO @MY_MASTER_PORT;
# 1.0 Get the default connection object_instance_begin, thread id and verify
# the expected number of client connections.
#==============================================================================
-
+#
# 1.1 Confirm only one client connection
-
+#
SELECT COUNT(*) INTO @my_client_connections
FROM performance_schema.socket_instances
WHERE EVENT_NAME LIKE "%client_connection%";
-
+#
# 1.2 Get the default THREAD_ID;
-
+#
SELECT THREAD_ID INTO @my_thread_id
FROM performance_schema.threads
WHERE PROCESSLIST_ID = CONNECTION_ID();
-
+#
# 1.3 Get the default OBJECT_INSTANCE_BEGIN
-
+#
SELECT OBJECT_INSTANCE_BEGIN INTO @my_object_instance_begin
FROM performance_schema.socket_instances
WHERE THREAD_ID = @my_thread_id;
@@ -33,27 +33,27 @@ WHERE THREAD_ID = @my_thread_id;
# 2.0 ESTABLISH TCP/IP CONNECTION 1
# Connect with IP = localhost (127.0.0.1 or ::1)
#==============================================================================
-
+#
# 2.1 Get the connection thread id
-
+#
SELECT THREAD_ID INTO @my_thread_id
FROM performance_schema.threads
WHERE PROCESSLIST_ID = CONNECTION_ID();
-
+#
# 2.2 Get the connection object instance begin
-
+#
SELECT OBJECT_INSTANCE_BEGIN INTO @my_object_instance_begin
FROM performance_schema.socket_instances
WHERE THREAD_ID = @my_thread_id;
-
+#
# 2.3 Get the connection port
-
+#
SELECT PORT INTO @my_port
FROM performance_schema.socket_instances
WHERE THREAD_ID = @my_thread_id;
-
+#
# 2.4 Verify that the connection is 127.0.0.1 or ::1
-
+#
SELECT COUNT(*) = 1 AS 'Expect 1'
FROM performance_schema.socket_instances
WHERE EVENT_NAME LIKE '%client_connection%'
@@ -62,44 +62,44 @@ AND PORT= @con1_port
AND OBJECT_INSTANCE_BEGIN= @con1_object_id;
Expect 1
1
-
+#
# 2.5 Verify that the same connection is in the summary instance table
-
+#
SELECT COUNT(*) = 1 AS 'Expect 1'
FROM performance_schema.socket_summary_by_instance
WHERE EVENT_NAME LIKE '%client_connection%'
AND OBJECT_INSTANCE_BEGIN= @con1_object_id;
Expect 1
1
-
+#
# Switch to connection default
-
+#
connection default;
#==============================================================================
# 3.0 ESTABLISH TCP/IP CONNECTION 2
# Connect with IP = localhost (127.0.0.1 or ::1)
#==============================================================================
-
+#
# 3.1 Get the connection thread id
-
+#
SELECT THREAD_ID INTO @my_thread_id
FROM performance_schema.threads
WHERE PROCESSLIST_ID = CONNECTION_ID();
-
+#
# 3.2 Get the connection object instance begin
-
+#
SELECT OBJECT_INSTANCE_BEGIN INTO @my_object_instance_begin
FROM performance_schema.socket_instances
WHERE THREAD_ID = @my_thread_id;
-
+#
# 3.3 Get the connection port
-
+#
SELECT PORT INTO @my_port
FROM performance_schema.socket_instances
WHERE THREAD_ID = @my_thread_id;
-
+#
# 3.4 Verify that the connection is 127.0.0.1 or ::1
-
+#
SELECT COUNT(*) = 1 AS 'Expect 1'
FROM performance_schema.socket_instances
WHERE EVENT_NAME LIKE '%client_connection%'
@@ -108,18 +108,18 @@ AND PORT= @con2_port
AND OBJECT_INSTANCE_BEGIN= @con2_object_id;
Expect 1
1
-
+#
# 3.5 Verify that the same connection is in the summary instance table
-
+#
SELECT COUNT(*) = 1 AS 'Expect 1'
FROM performance_schema.socket_summary_by_instance
WHERE EVENT_NAME LIKE '%client_connection%'
AND OBJECT_INSTANCE_BEGIN= @con2_object_id;
Expect 1
1
-
+#
# 3.6 Verify that the connection is 127.0.0.1 or ::1
-
+#
SELECT COUNT(*) = 1 AS 'Expect 1'
FROM performance_schema.socket_instances
WHERE EVENT_NAME LIKE '%client_connection%'
@@ -132,9 +132,9 @@ Expect 1
# 4.0 Verify both connections exist in the instance tables
#==============================================================================
connection default;
-
+#
# 4.1 Verify that there are two TCP/IP connections in the socket instance table
-
+#
SELECT COUNT(*) = 2 AS 'Expect 1'
FROM performance_schema.socket_instances
WHERE EVENT_NAME LIKE '%client_connection%'
@@ -142,9 +142,9 @@ WHERE EVENT_NAME LIKE '%client_connection%'
AND (IP LIKE '%127.0.0.1' OR IP LIKE '%::1');
Expect 1
1
-
+#
# 4.2 Verify that there are two TCP/IP connections in the summary instance table
-
+#
SELECT COUNT(*) = 2 AS 'Expect 1'
FROM performance_schema.socket_summary_by_instance
WHERE EVENT_NAME LIKE '%client_connection%'
@@ -164,9 +164,9 @@ connection default;
#==============================================================================
# 6.0 Verify sockets were removed from the instance tables
#==============================================================================
-
+#
# 6.1 Verify that there are no TCP/IP connections in the socket instance table
-
-
+#
+#
# 6.2 Verify that there are no TCP/IP connections in the summary instance table
-
+#
diff --git a/mysql-test/suite/perfschema/r/socket_summary_by_event_name_func.result b/mysql-test/suite/perfschema/r/socket_summary_by_event_name_func.result
index 455b6a2ad00..01e374ed94f 100644
--- a/mysql-test/suite/perfschema/r/socket_summary_by_event_name_func.result
+++ b/mysql-test/suite/perfschema/r/socket_summary_by_event_name_func.result
@@ -10,123 +10,123 @@ SELECT @@port INTO @MY_MASTER_PORT;
#==============================================================================
# 1.0 TEST INITIALIZATION
#==============================================================================
-
+#
# 1.1 Disable instrumentation of the default (this) connection
-
+#
connection default;
UPDATE performance_schema.threads
SET INSTRUMENTED='NO' WHERE PROCESSLIST_ID = CONNECTION_ID();
-
+#
# 1.2 Get the default THREAD_ID;
-
+#
SELECT THREAD_ID INTO @my_thread_id
FROM performance_schema.threads
WHERE PROCESSLIST_ID = CONNECTION_ID();
-
+#
# 1.3 Get the default OBJECT_INSTANCE_BEGIN
-
+#
SELECT OBJECT_INSTANCE_BEGIN INTO @my_object_instance_begin
FROM performance_schema.socket_instances
WHERE THREAD_ID = @my_thread_id;
-
+#
# 1.4 Create a test database
-
+#
CREATE SCHEMA mysqltest;
-
+#
# 1.5 Create a table to store summary values from socket_summary_by_instance
and socket_summary_by_event_name
-
+#
CREATE TABLE mysqltest.my_socket_summary AS
SELECT * FROM performance_schema.socket_summary_by_instance
WHERE 1 = 0;
-
+#
# 1.6 Drop object_instance_begin from my_socket_summary
-
+#
ALTER TABLE mysqltest.my_socket_summary
DROP COLUMN OBJECT_INSTANCE_BEGIN;
-
+#
# 1.7 Add an auto_inc column to my_socket_summary
-
+#
ALTER TABLE mysqltest.my_socket_summary
ADD COLUMN (n INT AUTO_INCREMENT, PRIMARY KEY(n));
-
+#
# 1.8 Create test tables
-
+#
CREATE TABLE mysqltest.t1 (n INT AUTO_INCREMENT, s1 VARCHAR(1024), PRIMARY KEY(n));
CREATE TABLE mysqltest.t2 (n INT AUTO_INCREMENT, s1 VARCHAR(1024), PRIMARY KEY(n));
#==============================================================================
# 2.0 ESTABLISH CLIENT CONNECTIONS
#==============================================================================
-
+#
# 2.1 Connection 1 (tcp/ip, 127.0.0.1 or ::1)
-
-
+#
+#
# 2.2 Connection 2 (localhost or unix domain socket)
-
+#
#==============================================================================
# 3.0 RUN THE TESTS
#==============================================================================
-
+#
# 3.1 Clear performance schema tables
-
+#
TRUNCATE performance_schema.socket_summary_by_instance;
TRUNCATE performance_schema.socket_summary_by_event_name;
-
+#
# 3.2 Get the 'before' sum of bytes written from socket_summary_by_instance
for later comparison to the 'after' byte count as a simple confirmation
that the table was updated.
-
+#
connection default;
SELECT sum(SUM_NUMBER_OF_BYTES_WRITE) INTO @my_write_count
FROM performance_schema.socket_summary_by_instance;
-
+#
# 3.3 From connection 1, insert one a 1K row of data into t1
-
+#
connection con1;
USE mysqltest;
INSERT INTO t1 (s1) VALUES (REPEAT('a', 1024));
INSERT INTO t1 (s1) SELECT s1 FROM t1;
-
+#
# 3.4 From connection 2, insert one a 1K row of data into t2
-
+#
connection con2;
USE mysqltest;
INSERT INTO t2 (s1) VALUES (REPEAT('a', 1024));
INSERT INTO t2 (s1) SELECT s1 FROM t2;
-
+#
# 3.5 Get the 'after' sum of bytes written from socket_summary_by_instance
-
+#
connection default;
SELECT sum(SUM_NUMBER_OF_BYTES_WRITE) INTO @my_write_count
FROM performance_schema.socket_summary_by_instance;
-
+#
# 3.6 Verify that SUM_NUMBER_OF_BYTES_WRITE increased
-
-
+#
+#
# socket_summary_by_instance was updated
-
+#
#==============================================================================
# 4.0 VERIFY RESULTS
#==============================================================================
-
+#
# 4.1 Verify that the totals in socket_summary_by_event_name are
consistent with totals in socket_summary_by_instance
-
+#
#==============================================================================
# 5.0 Clean up
#==============================================================================
-
+#
# 5.1 Disconnect con1
-
+#
connection con1;
disconnect con1;
-
+#
# 5.2 Disconnect con2
-
+#
connection con2;
disconnect con2;
-
+#
# 5.3 Drop mysqltest
-
+#
connection default;
DROP DATABASE mysqltest;
diff --git a/mysql-test/suite/perfschema/r/socket_summary_by_instance_func.result b/mysql-test/suite/perfschema/r/socket_summary_by_instance_func.result
index dec4dc431f5..a70ff6149eb 100644
--- a/mysql-test/suite/perfschema/r/socket_summary_by_instance_func.result
+++ b/mysql-test/suite/perfschema/r/socket_summary_by_instance_func.result
@@ -1,4 +1,3 @@
-set global session_track_schema=FALSE;
# The logging of commands and result sets is mostly disabled.
# There are some messages which help to observe the progress of the test.
# In case some check fails
@@ -8,6 +7,8 @@ set global session_track_schema=FALSE;
# - the test might abort
#
# 0. Check, build or set prequisites
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release
UPDATE performance_schema.threads
SET INSTRUMENTED='NO' WHERE PROCESSLIST_ID = CONNECTION_ID();
# 1. Basic checks
@@ -139,47 +140,47 @@ connection default;
# 4.4.4 Compare impact of statements
# SELECT col2 FROM does_not_exist WHERE col1 = 0
# SELECT col2 FROM does_not_exist
-# One statement is longer than the other.
+# # One statement is longer than the other.
# Both statements fail with the same error message (table does not exist)
# 4.4.5 Compare impact of statements
# SELECT col2 FROM does_not_exist WHERE col1 A 0
# SELECT col2 FROM does_not_exist WHERE col1 = 0
-# Both statements have the same length and fail.
+# # Both statements have the same length and fail.
# The length of the error messages differs.
# 4.4.6 Compare impact of statements
# SELECT col2 FROM does_not_exist0123
# SELECT col2 FROM does_not_exist
-# Both statements fail (table does not exist).
+# # Both statements fail (table does not exist).
# The length of the statement and the length of the error messages differs.
# Reason for both differences is the length of the table name.
# 4.4.7 Compare impact of statements
# SELECT col2 AS my_super_col FROM mysqltest.my_aux WHERE col1 = -1
# SELECT col2 FROM mysqltest.my_aux WHERE col1 = -1
-# Both statements get an empty result set.
+# # Both statements get an empty result set.
# The length of the statements and the length of the result sets differs.
# Reason for both differences is the length of the some column name.
# 4.4.8 Compare impact of statements
# SELECT col2 FROM mysqltest.my_aux WHERE col1 = 1
# SELECT col2 FROM mysqltest.my_aux WHERE col1 = -1
-# Both statements differ in the statement length.
+# # Both statements differ in the statement length.
# One statement earns an empty result set.
# The other statement earns one row containing an empty string.
# 4.4.9 Compare impact of statements
# SELECT col2 FROM mysqltest.my_aux WHERE col1 = 2
# SELECT col2 FROM mysqltest.my_aux WHERE col1 = 1
-# Both statements have the same length.
+# # Both statements have the same length.
# One statement earns an one row containing an empty string.
# The other statement earns one row containing a string 1 byte long.
# 4.4.10 Compare impact of statements
# SELECT col2 FROM mysqltest.my_aux WHERE col1 = 3
# SELECT col2 FROM mysqltest.my_aux WHERE col1 = 1
-# Both statements have the same length.
+# # Both statements have the same length.
# One statement earns an one row containing an empty string.
# The other statement earns one row containing a string 1024 byte long.
# 4.4.11 Compare impact of statements
# SELECT col2 FROM mysqltest.my_aux WHERE col1 < 2
# SELECT col2 FROM mysqltest.my_aux WHERE col1 = 1
-# Both statements have the same length.
+# # Both statements have the same length.
# One statement earns an one row containing an empty string.
# The other statement earns two rows containing an empty string.
# 4.5 Check the differences caused by Connects
@@ -208,7 +209,9 @@ connection default;
# server_unix_socket are already checked
# - the stability of results is already checked
# So we con go with the results of the first run.
-# 4.6.1 The SUM_OF_BYTES_WRITE value is the same for all Connects.
+# 4.6.1 The SUM_OF_BYTES_WRITE value depends on length of database
+# since the database name is written in OK packet.
+# Hence the value 2.
# 4.6.2 The SUM_OF_BYTES_WRITE value hast to be > 100.
# 4.6.3 COUNT_READ, COUNT_WRITE and COUNT_MISC have to be to be > 0
# 4.6.4 Checks based on comparison of results for connects
@@ -218,5 +221,6 @@ connection default;
# It must reset all counters.
TRUNCATE TABLE performance_schema.socket_summary_by_instance;
# 6. Cleanup
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release
connection default;
-set global session_track_schema=DEFAULT;
diff --git a/mysql-test/suite/perfschema/r/socket_summary_by_instance_func_win.result b/mysql-test/suite/perfschema/r/socket_summary_by_instance_func_win.result
index 2c5a9e9284f..6215976eab0 100644
--- a/mysql-test/suite/perfschema/r/socket_summary_by_instance_func_win.result
+++ b/mysql-test/suite/perfschema/r/socket_summary_by_instance_func_win.result
@@ -7,6 +7,8 @@
# - the test might abort
#
# 0. Check, build or set prequisites
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release.
UPDATE performance_schema.threads
SET INSTRUMENTED='NO' WHERE PROCESSLIST_ID = CONNECTION_ID();
# 1. Basic checks
@@ -33,12 +35,30 @@ ERROR 28000: Access denied for user 'boot0123456789'@'localhost' (using password
# 2.5 Connect should pass, host = localhost
# length of user name = 10 character
# length of default db = 9 character
+SET @orig_sql_mode= @@sql_mode;
+SET sql_mode= (SELECT replace(@@sql_mode,'NO_AUTO_CREATE_USER',''));
+Warnings:
+Warning 3090 Changing sql mode 'NO_AUTO_CREATE_USER' is deprecated. It will be removed in a future release.
GRANT ALL PRIVILEGES ON *.* TO 'root012345'@'localhost';
+Warnings:
+Warning 1287 Using GRANT for creating new user is deprecated and will be removed in future release. Create new user with CREATE USER statement.
+SET sql_mode= @orig_sql_mode;
+Warnings:
+Warning 3090 Changing sql mode 'NO_AUTO_CREATE_USER' is deprecated. It will be removed in a future release.
DROP USER 'root012345'@'localhost';
# 2.6 Connect should pass, host = localhost
# length of user name = 14 character
# length of default db = 9 character
+SET @orig_sql_mode= @@sql_mode;
+SET sql_mode= (SELECT replace(@@sql_mode,'NO_AUTO_CREATE_USER',''));
+Warnings:
+Warning 3090 Changing sql mode 'NO_AUTO_CREATE_USER' is deprecated. It will be removed in a future release.
GRANT ALL PRIVILEGES ON *.* to 'root0123456789'@'localhost';
+Warnings:
+Warning 1287 Using GRANT for creating new user is deprecated and will be removed in future release. Create new user with CREATE USER statement.
+SET sql_mode= @orig_sql_mode;
+Warnings:
+Warning 3090 Changing sql mode 'NO_AUTO_CREATE_USER' is deprecated. It will be removed in a future release.
DROP USER 'root0123456789'@'localhost';
# 2.7 Connect should pass, host = my_localhost
# length of user name = 4 character
@@ -196,7 +216,9 @@ col2
# server_unix_socket are already checked
# - the stability of results is already checked
# So we con go with the results of the first run.
-# 4.6.1 The SUM_OF_BYTES_WRITE value is the same for all Connects.
+# 4.6.1 The SUM_OF_BYTES_WRITE value depends on length of database
+# since the database name is written in OK packet.
+# Hence the value 2.
# 4.6.2 The SUM_OF_BYTES_WRITE value hast to be > 100.
# 4.6.3 COUNT_READ, COUNT_WRITE and COUNT_MISC have to be to be > 0
# 4.6.4 Checks based on comparison of results for connects
@@ -206,3 +228,5 @@ col2
# It must reset all counters.
TRUNCATE TABLE performance_schema.socket_summary_by_instance;
# 6. Cleanup
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release.
diff --git a/mysql-test/suite/perfschema/r/stage_mdl_function.result b/mysql-test/suite/perfschema/r/stage_mdl_function.result
index 5f55dd6c28e..87068e6330d 100644
--- a/mysql-test/suite/perfschema/r/stage_mdl_function.result
+++ b/mysql-test/suite/perfschema/r/stage_mdl_function.result
@@ -14,23 +14,13 @@ username event_name sql_text
user1 statement/sql/select select test.f1()
username event_name nesting_event_type
username event_name nesting_event_type
-user1 stage/sql/Closing tables STATEMENT
-user1 stage/sql/End of update loop STATEMENT
-user1 stage/sql/Query end STATEMENT
-user1 stage/sql/Commit STATEMENT
-user1 stage/sql/Closing tables STATEMENT
-user1 stage/sql/Unlocking tables STATEMENT
-user1 stage/sql/Closing tables STATEMENT
-user1 stage/sql/Starting cleanup STATEMENT
-user1 stage/sql/Freeing items STATEMENT
-user1 stage/sql/Reset for next command STATEMENT
call dump_one_thread('user2');
username event_name sql_text
user2 statement/sql/drop_function drop function test.f1
username event_name nesting_event_type
user2 stage/sql/Waiting for stored function metadata lock STATEMENT
username event_name nesting_event_type
-user2 stage/sql/Init STATEMENT
+user2 stage/sql/starting STATEMENT
connection con1;
select f1();
f1()
diff --git a/mysql-test/suite/perfschema/r/stage_mdl_global.result b/mysql-test/suite/perfschema/r/stage_mdl_global.result
index aab68fa7cc7..b9eda506700 100644
--- a/mysql-test/suite/perfschema/r/stage_mdl_global.result
+++ b/mysql-test/suite/perfschema/r/stage_mdl_global.result
@@ -8,12 +8,12 @@ username event_name sql_text
user1 statement/sql/flush flush tables with read lock
username event_name nesting_event_type
username event_name nesting_event_type
-user1 stage/sql/Init STATEMENT
-user1 stage/sql/Init STATEMENT
+user1 stage/sql/starting STATEMENT
+user1 stage/sql/starting STATEMENT
user1 stage/sql/Query end STATEMENT
user1 stage/sql/Commit STATEMENT
-user1 stage/sql/Closing tables STATEMENT
-user1 stage/sql/Commit_implicit STATEMENT
+user1 stage/sql/closing tables STATEMENT
+user1 stage/sql/Commit implicit STATEMENT
user1 stage/sql/Starting cleanup STATEMENT
user1 stage/sql/Freeing items STATEMENT
user1 stage/sql/Reset for next command STATEMENT
@@ -23,8 +23,8 @@ user2 statement/sql/insert insert into test.t1 values (1), (2), (3)
username event_name nesting_event_type
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
+user2 stage/sql/starting STATEMENT
+user2 stage/sql/checking permissions STATEMENT
user2 stage/sql/Opening tables STATEMENT
connection con1;
unlock tables;
diff --git a/mysql-test/suite/perfschema/r/stage_mdl_procedure.result b/mysql-test/suite/perfschema/r/stage_mdl_procedure.result
index 6362f725b88..613a20fdd4f 100644
--- a/mysql-test/suite/perfschema/r/stage_mdl_procedure.result
+++ b/mysql-test/suite/perfschema/r/stage_mdl_procedure.result
@@ -21,23 +21,13 @@ username event_name sql_text
user1 statement/sql/select select test.f1()
username event_name nesting_event_type
username event_name nesting_event_type
-user1 stage/sql/Closing tables STATEMENT
-user1 stage/sql/End of update loop STATEMENT
-user1 stage/sql/Query end STATEMENT
-user1 stage/sql/Commit STATEMENT
-user1 stage/sql/Closing tables STATEMENT
-user1 stage/sql/Unlocking tables STATEMENT
-user1 stage/sql/Closing tables STATEMENT
-user1 stage/sql/Starting cleanup STATEMENT
-user1 stage/sql/Freeing items STATEMENT
-user1 stage/sql/Reset for next command STATEMENT
call dump_one_thread('user2');
username event_name sql_text
user2 statement/sql/drop_procedure drop procedure test.p1
username event_name nesting_event_type
user2 stage/sql/Waiting for stored procedure metadata lock STATEMENT
username event_name nesting_event_type
-user2 stage/sql/Init STATEMENT
+user2 stage/sql/starting STATEMENT
connection con1;
select test.f1();
test.f1()
diff --git a/mysql-test/suite/perfschema/r/stage_mdl_table.result b/mysql-test/suite/perfschema/r/stage_mdl_table.result
index c703e910891..5ba0ba04fca 100644
--- a/mysql-test/suite/perfschema/r/stage_mdl_table.result
+++ b/mysql-test/suite/perfschema/r/stage_mdl_table.result
@@ -20,9 +20,9 @@ user1 stage/sql/Sending data STATEMENT
user1 stage/sql/End of update loop STATEMENT
user1 stage/sql/Query end STATEMENT
user1 stage/sql/Commit STATEMENT
-user1 stage/sql/Closing tables STATEMENT
+user1 stage/sql/closing tables STATEMENT
user1 stage/sql/Unlocking tables STATEMENT
-user1 stage/sql/Closing tables STATEMENT
+user1 stage/sql/closing tables STATEMENT
user1 stage/sql/Starting cleanup STATEMENT
user1 stage/sql/Freeing items STATEMENT
user1 stage/sql/Reset for next command STATEMENT
@@ -32,13 +32,13 @@ user2 statement/sql/alter_table alter table test.t1 add column (b int)
username event_name nesting_event_type
user2 stage/sql/Waiting for table metadata lock STATEMENT
username event_name nesting_event_type
-user2 stage/sql/Init STATEMENT
-user2 stage/sql/Checking permissions STATEMENT
-user2 stage/sql/Init for update STATEMENT
+user2 stage/sql/starting STATEMENT
+user2 stage/sql/checking permissions STATEMENT
+user2 stage/sql/init for update STATEMENT
user2 stage/sql/Opening tables STATEMENT
user2 stage/sql/After opening tables STATEMENT
-user2 stage/sql/Setup STATEMENT
-user2 stage/sql/Creating table STATEMENT
+user2 stage/sql/setup STATEMENT
+user2 stage/sql/creating table STATEMENT
user2 stage/sql/After create STATEMENT
connection con1;
commit;
diff --git a/mysql-test/suite/perfschema/r/start_server_disable_idle.result b/mysql-test/suite/perfschema/r/start_server_disable_idle.result
index 294c3a72f58..00baba09fb6 100644
--- a/mysql-test/suite/perfschema/r/start_server_disable_idle.result
+++ b/mysql-test/suite/perfschema/r/start_server_disable_idle.result
@@ -10,15 +10,143 @@ count(*)
5
select count(*) from performance_schema.setup_consumers;
count(*)
-12
-select count(*) > 3 from performance_schema.setup_instruments;
-count(*) > 3
+15
+select count(*) > 4 from performance_schema.setup_instruments;
+count(*) > 4
1
select count(*) from performance_schema.setup_timers;
count(*)
-4
+5
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release
+select * from performance_schema.accounts;
+select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_digest;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_transactions_current;
+select * from performance_schema.events_transactions_history;
+select * from performance_schema.events_transactions_history_long;
+select * from performance_schema.events_transactions_summary_by_account_by_event_name;
+select * from performance_schema.events_transactions_summary_by_host_by_event_name;
+select * from performance_schema.events_transactions_summary_by_thread_by_event_name;
+select * from performance_schema.events_transactions_summary_by_user_by_event_name;
+select * from performance_schema.events_transactions_summary_global_by_event_name;
+select * from performance_schema.events_waits_current;
+select * from performance_schema.events_waits_history;
+select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+select * from performance_schema.events_waits_summary_by_instance;
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.file_instances;
+select * from performance_schema.file_summary_by_event_name;
+select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.hosts;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.metadata_locks;
+select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
+select * from performance_schema.performance_timers;
+select * from performance_schema.rwlock_instances;
+select * from performance_schema.session_account_connect_attrs;
+select * from performance_schema.session_connect_attrs;
+select * from performance_schema.setup_actors;
+select * from performance_schema.setup_consumers;
+select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
+select * from performance_schema.setup_timers;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.table_handles;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
+select * from performance_schema.threads;
+select * from performance_schema.users;
+select * from performance_schema.replication_connection_configuration;
+select * from performance_schema.replication_applier_configuration;
+select * from performance_schema.replication_applier_status;
+select * from performance_schema.replication_applier_status_by_coordinator;
+select * from performance_schema.global_status;
+select * from performance_schema.status_by_thread;
+select * from performance_schema.status_by_user;
+select * from performance_schema.status_by_host;
+select * from performance_schema.status_by_account;
+select * from performance_schema.session_status;
+show global variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_transactions_history_long_size 1000
+performance_schema_events_transactions_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 90
+performance_schema_max_cond_instances 1000
+performance_schema_max_digest_length 1024
+performance_schema_max_file_classes 80
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_index_stat 5000
+performance_schema_max_memory_classes 320
+performance_schema_max_metadata_locks 10000
+performance_schema_max_mutex_classes 210
+performance_schema_max_mutex_instances 5000
+performance_schema_max_prepared_statements_instances 100
+performance_schema_max_program_instances 5000
+performance_schema_max_rwlock_classes 50
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_sql_text_length 1024
+performance_schema_max_stage_classes 160
+performance_schema_max_statement_classes 222
+performance_schema_max_statement_stack 10
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_table_lock_stat 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_session_connect_attrs_size 2048
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
-show status like "performance_schema%";
+show global status like "performance_schema%";
select * from performance_schema.setup_instruments
where name like "idle" and enabled='YES';
NAME ENABLED TIMED
diff --git a/mysql-test/suite/perfschema/r/start_server_disable_stages.result b/mysql-test/suite/perfschema/r/start_server_disable_stages.result
index 6ed2234babe..6fe051b3c42 100644
--- a/mysql-test/suite/perfschema/r/start_server_disable_stages.result
+++ b/mysql-test/suite/perfschema/r/start_server_disable_stages.result
@@ -10,15 +10,143 @@ count(*)
5
select count(*) from performance_schema.setup_consumers;
count(*)
-12
-select count(*) > 3 from performance_schema.setup_instruments;
-count(*) > 3
+15
+select count(*) > 4 from performance_schema.setup_instruments;
+count(*) > 4
1
select count(*) from performance_schema.setup_timers;
count(*)
-4
+5
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release
+select * from performance_schema.accounts;
+select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_digest;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_transactions_current;
+select * from performance_schema.events_transactions_history;
+select * from performance_schema.events_transactions_history_long;
+select * from performance_schema.events_transactions_summary_by_account_by_event_name;
+select * from performance_schema.events_transactions_summary_by_host_by_event_name;
+select * from performance_schema.events_transactions_summary_by_thread_by_event_name;
+select * from performance_schema.events_transactions_summary_by_user_by_event_name;
+select * from performance_schema.events_transactions_summary_global_by_event_name;
+select * from performance_schema.events_waits_current;
+select * from performance_schema.events_waits_history;
+select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+select * from performance_schema.events_waits_summary_by_instance;
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.file_instances;
+select * from performance_schema.file_summary_by_event_name;
+select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.hosts;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.metadata_locks;
+select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
+select * from performance_schema.performance_timers;
+select * from performance_schema.rwlock_instances;
+select * from performance_schema.session_account_connect_attrs;
+select * from performance_schema.session_connect_attrs;
+select * from performance_schema.setup_actors;
+select * from performance_schema.setup_consumers;
+select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
+select * from performance_schema.setup_timers;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.table_handles;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
+select * from performance_schema.threads;
+select * from performance_schema.users;
+select * from performance_schema.replication_connection_configuration;
+select * from performance_schema.replication_applier_configuration;
+select * from performance_schema.replication_applier_status;
+select * from performance_schema.replication_applier_status_by_coordinator;
+select * from performance_schema.global_status;
+select * from performance_schema.status_by_thread;
+select * from performance_schema.status_by_user;
+select * from performance_schema.status_by_host;
+select * from performance_schema.status_by_account;
+select * from performance_schema.session_status;
+show global variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_transactions_history_long_size 1000
+performance_schema_events_transactions_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 90
+performance_schema_max_cond_instances 1000
+performance_schema_max_digest_length 1024
+performance_schema_max_file_classes 80
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_index_stat 5000
+performance_schema_max_memory_classes 320
+performance_schema_max_metadata_locks 10000
+performance_schema_max_mutex_classes 210
+performance_schema_max_mutex_instances 5000
+performance_schema_max_prepared_statements_instances 100
+performance_schema_max_program_instances 5000
+performance_schema_max_rwlock_classes 50
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_sql_text_length 1024
+performance_schema_max_stage_classes 160
+performance_schema_max_statement_classes 222
+performance_schema_max_statement_stack 10
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_table_lock_stat 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_session_connect_attrs_size 2048
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
-show status like "performance_schema%";
+show global status like "performance_schema%";
select * from performance_schema.setup_instruments
where name like "stage/%" and enabled='YES';
NAME ENABLED TIMED
diff --git a/mysql-test/suite/perfschema/r/start_server_disable_statements.result b/mysql-test/suite/perfschema/r/start_server_disable_statements.result
index f942f2ee570..b582ca072c8 100644
--- a/mysql-test/suite/perfschema/r/start_server_disable_statements.result
+++ b/mysql-test/suite/perfschema/r/start_server_disable_statements.result
@@ -10,15 +10,143 @@ count(*)
5
select count(*) from performance_schema.setup_consumers;
count(*)
-12
-select count(*) > 3 from performance_schema.setup_instruments;
-count(*) > 3
+15
+select count(*) > 4 from performance_schema.setup_instruments;
+count(*) > 4
1
select count(*) from performance_schema.setup_timers;
count(*)
-4
+5
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release
+select * from performance_schema.accounts;
+select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_digest;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_transactions_current;
+select * from performance_schema.events_transactions_history;
+select * from performance_schema.events_transactions_history_long;
+select * from performance_schema.events_transactions_summary_by_account_by_event_name;
+select * from performance_schema.events_transactions_summary_by_host_by_event_name;
+select * from performance_schema.events_transactions_summary_by_thread_by_event_name;
+select * from performance_schema.events_transactions_summary_by_user_by_event_name;
+select * from performance_schema.events_transactions_summary_global_by_event_name;
+select * from performance_schema.events_waits_current;
+select * from performance_schema.events_waits_history;
+select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+select * from performance_schema.events_waits_summary_by_instance;
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.file_instances;
+select * from performance_schema.file_summary_by_event_name;
+select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.hosts;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.metadata_locks;
+select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
+select * from performance_schema.performance_timers;
+select * from performance_schema.rwlock_instances;
+select * from performance_schema.session_account_connect_attrs;
+select * from performance_schema.session_connect_attrs;
+select * from performance_schema.setup_actors;
+select * from performance_schema.setup_consumers;
+select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
+select * from performance_schema.setup_timers;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.table_handles;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
+select * from performance_schema.threads;
+select * from performance_schema.users;
+select * from performance_schema.replication_connection_configuration;
+select * from performance_schema.replication_applier_configuration;
+select * from performance_schema.replication_applier_status;
+select * from performance_schema.replication_applier_status_by_coordinator;
+select * from performance_schema.global_status;
+select * from performance_schema.status_by_thread;
+select * from performance_schema.status_by_user;
+select * from performance_schema.status_by_host;
+select * from performance_schema.status_by_account;
+select * from performance_schema.session_status;
+show global variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_transactions_history_long_size 1000
+performance_schema_events_transactions_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 90
+performance_schema_max_cond_instances 1000
+performance_schema_max_digest_length 1024
+performance_schema_max_file_classes 80
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_index_stat 5000
+performance_schema_max_memory_classes 320
+performance_schema_max_metadata_locks 10000
+performance_schema_max_mutex_classes 210
+performance_schema_max_mutex_instances 5000
+performance_schema_max_prepared_statements_instances 100
+performance_schema_max_program_instances 5000
+performance_schema_max_rwlock_classes 50
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_sql_text_length 1024
+performance_schema_max_stage_classes 160
+performance_schema_max_statement_classes 222
+performance_schema_max_statement_stack 10
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_table_lock_stat 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_session_connect_attrs_size 2048
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
-show status like "performance_schema%";
+show global status like "performance_schema%";
select * from performance_schema.setup_instruments
where name like "statement/%" and enabled='YES';
NAME ENABLED TIMED
diff --git a/mysql-test/suite/perfschema/r/start_server_disable_transactions.result b/mysql-test/suite/perfschema/r/start_server_disable_transactions.result
new file mode 100644
index 00000000000..1431f925ae2
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/start_server_disable_transactions.result
@@ -0,0 +1,167 @@
+show databases;
+Database
+information_schema
+mtr
+mysql
+performance_schema
+test
+select count(*) from performance_schema.performance_timers;
+count(*)
+5
+select count(*) from performance_schema.setup_consumers;
+count(*)
+15
+select count(*) > 4 from performance_schema.setup_instruments;
+count(*) > 4
+1
+select count(*) from performance_schema.setup_timers;
+count(*)
+5
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release
+select * from performance_schema.accounts;
+select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_digest;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_transactions_current;
+select * from performance_schema.events_transactions_history;
+select * from performance_schema.events_transactions_history_long;
+select * from performance_schema.events_transactions_summary_by_account_by_event_name;
+select * from performance_schema.events_transactions_summary_by_host_by_event_name;
+select * from performance_schema.events_transactions_summary_by_thread_by_event_name;
+select * from performance_schema.events_transactions_summary_by_user_by_event_name;
+select * from performance_schema.events_transactions_summary_global_by_event_name;
+select * from performance_schema.events_waits_current;
+select * from performance_schema.events_waits_history;
+select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+select * from performance_schema.events_waits_summary_by_instance;
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.file_instances;
+select * from performance_schema.file_summary_by_event_name;
+select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.hosts;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.metadata_locks;
+select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
+select * from performance_schema.performance_timers;
+select * from performance_schema.rwlock_instances;
+select * from performance_schema.session_account_connect_attrs;
+select * from performance_schema.session_connect_attrs;
+select * from performance_schema.setup_actors;
+select * from performance_schema.setup_consumers;
+select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
+select * from performance_schema.setup_timers;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.table_handles;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
+select * from performance_schema.threads;
+select * from performance_schema.users;
+select * from performance_schema.replication_connection_configuration;
+select * from performance_schema.replication_applier_configuration;
+select * from performance_schema.replication_applier_status;
+select * from performance_schema.replication_applier_status_by_coordinator;
+select * from performance_schema.global_status;
+select * from performance_schema.status_by_thread;
+select * from performance_schema.status_by_user;
+select * from performance_schema.status_by_host;
+select * from performance_schema.status_by_account;
+select * from performance_schema.session_status;
+show global variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_transactions_history_long_size 1000
+performance_schema_events_transactions_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 90
+performance_schema_max_cond_instances 1000
+performance_schema_max_digest_length 1024
+performance_schema_max_file_classes 80
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_index_stat 5000
+performance_schema_max_memory_classes 320
+performance_schema_max_metadata_locks 10000
+performance_schema_max_mutex_classes 210
+performance_schema_max_mutex_instances 5000
+performance_schema_max_prepared_statements_instances 100
+performance_schema_max_program_instances 5000
+performance_schema_max_rwlock_classes 50
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_sql_text_length 1024
+performance_schema_max_stage_classes 160
+performance_schema_max_statement_classes 222
+performance_schema_max_statement_stack 10
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_table_lock_stat 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_session_connect_attrs_size 2048
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
+show engine PERFORMANCE_SCHEMA status;
+show global status like "performance_schema%";
+select * from performance_schema.setup_instruments
+where name in ('transaction') and enabled='YES';
+NAME ENABLED TIMED
+select * from performance_schema.events_transactions_summary_global_by_event_name
+where count_star > 0;
+EVENT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT COUNT_READ_WRITE SUM_TIMER_READ_WRITE MIN_TIMER_READ_WRITE AVG_TIMER_READ_WRITE MAX_TIMER_READ_WRITE COUNT_READ_ONLY SUM_TIMER_READ_ONLY MIN_TIMER_READ_ONLY AVG_TIMER_READ_ONLY MAX_TIMER_READ_ONLY
+select * from performance_schema.events_transactions_summary_by_thread_by_event_name
+where count_star > 0;
+THREAD_ID EVENT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT COUNT_READ_WRITE SUM_TIMER_READ_WRITE MIN_TIMER_READ_WRITE AVG_TIMER_READ_WRITE MAX_TIMER_READ_WRITE COUNT_READ_ONLY SUM_TIMER_READ_ONLY MIN_TIMER_READ_ONLY AVG_TIMER_READ_ONLY MAX_TIMER_READ_ONLY
+select * from performance_schema.events_transactions_summary_by_user_by_event_name
+where count_star > 0;
+USER EVENT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT COUNT_READ_WRITE SUM_TIMER_READ_WRITE MIN_TIMER_READ_WRITE AVG_TIMER_READ_WRITE MAX_TIMER_READ_WRITE COUNT_READ_ONLY SUM_TIMER_READ_ONLY MIN_TIMER_READ_ONLY AVG_TIMER_READ_ONLY MAX_TIMER_READ_ONLY
+select * from performance_schema.events_transactions_summary_by_host_by_event_name
+where count_star > 0;
+HOST EVENT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT COUNT_READ_WRITE SUM_TIMER_READ_WRITE MIN_TIMER_READ_WRITE AVG_TIMER_READ_WRITE MAX_TIMER_READ_WRITE COUNT_READ_ONLY SUM_TIMER_READ_ONLY MIN_TIMER_READ_ONLY AVG_TIMER_READ_ONLY MAX_TIMER_READ_ONLY
+select * from performance_schema.events_transactions_summary_by_account_by_event_name
+where count_star > 0;
+USER HOST EVENT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT COUNT_READ_WRITE SUM_TIMER_READ_WRITE MIN_TIMER_READ_WRITE AVG_TIMER_READ_WRITE MAX_TIMER_READ_WRITE COUNT_READ_ONLY SUM_TIMER_READ_ONLY MIN_TIMER_READ_ONLY AVG_TIMER_READ_ONLY MAX_TIMER_READ_ONLY
diff --git a/mysql-test/suite/perfschema/r/start_server_disable_waits.result b/mysql-test/suite/perfschema/r/start_server_disable_waits.result
index fb02ace2ed4..1b9356b34a2 100644
--- a/mysql-test/suite/perfschema/r/start_server_disable_waits.result
+++ b/mysql-test/suite/perfschema/r/start_server_disable_waits.result
@@ -10,15 +10,143 @@ count(*)
5
select count(*) from performance_schema.setup_consumers;
count(*)
-12
-select count(*) > 3 from performance_schema.setup_instruments;
-count(*) > 3
+15
+select count(*) > 4 from performance_schema.setup_instruments;
+count(*) > 4
1
select count(*) from performance_schema.setup_timers;
count(*)
-4
+5
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release
+select * from performance_schema.accounts;
+select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_digest;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_transactions_current;
+select * from performance_schema.events_transactions_history;
+select * from performance_schema.events_transactions_history_long;
+select * from performance_schema.events_transactions_summary_by_account_by_event_name;
+select * from performance_schema.events_transactions_summary_by_host_by_event_name;
+select * from performance_schema.events_transactions_summary_by_thread_by_event_name;
+select * from performance_schema.events_transactions_summary_by_user_by_event_name;
+select * from performance_schema.events_transactions_summary_global_by_event_name;
+select * from performance_schema.events_waits_current;
+select * from performance_schema.events_waits_history;
+select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+select * from performance_schema.events_waits_summary_by_instance;
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.file_instances;
+select * from performance_schema.file_summary_by_event_name;
+select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.hosts;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.metadata_locks;
+select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
+select * from performance_schema.performance_timers;
+select * from performance_schema.rwlock_instances;
+select * from performance_schema.session_account_connect_attrs;
+select * from performance_schema.session_connect_attrs;
+select * from performance_schema.setup_actors;
+select * from performance_schema.setup_consumers;
+select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
+select * from performance_schema.setup_timers;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.table_handles;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
+select * from performance_schema.threads;
+select * from performance_schema.users;
+select * from performance_schema.replication_connection_configuration;
+select * from performance_schema.replication_applier_configuration;
+select * from performance_schema.replication_applier_status;
+select * from performance_schema.replication_applier_status_by_coordinator;
+select * from performance_schema.global_status;
+select * from performance_schema.status_by_thread;
+select * from performance_schema.status_by_user;
+select * from performance_schema.status_by_host;
+select * from performance_schema.status_by_account;
+select * from performance_schema.session_status;
+show global variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_transactions_history_long_size 1000
+performance_schema_events_transactions_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 90
+performance_schema_max_cond_instances 1000
+performance_schema_max_digest_length 1024
+performance_schema_max_file_classes 80
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_index_stat 5000
+performance_schema_max_memory_classes 320
+performance_schema_max_metadata_locks 10000
+performance_schema_max_mutex_classes 210
+performance_schema_max_mutex_instances 5000
+performance_schema_max_prepared_statements_instances 100
+performance_schema_max_program_instances 5000
+performance_schema_max_rwlock_classes 50
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_sql_text_length 1024
+performance_schema_max_stage_classes 160
+performance_schema_max_statement_classes 222
+performance_schema_max_statement_stack 10
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_table_lock_stat 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_session_connect_attrs_size 2048
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
-show status like "performance_schema%";
+show global status like "performance_schema%";
select * from performance_schema.setup_instruments
where name like "wait/%" and enabled='YES';
NAME ENABLED TIMED
diff --git a/mysql-test/suite/perfschema/r/start_server_innodb.result b/mysql-test/suite/perfschema/r/start_server_innodb.result
index cf210c0935c..c64e4f8416d 100644
--- a/mysql-test/suite/perfschema/r/start_server_innodb.result
+++ b/mysql-test/suite/perfschema/r/start_server_innodb.result
@@ -10,16 +10,144 @@ count(*)
5
select count(*) from performance_schema.setup_consumers;
count(*)
-12
-select count(*) > 3 from performance_schema.setup_instruments;
-count(*) > 3
+15
+select count(*) > 4 from performance_schema.setup_instruments;
+count(*) > 4
1
select count(*) from performance_schema.setup_timers;
count(*)
-4
+5
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release
+select * from performance_schema.accounts;
+select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_digest;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_transactions_current;
+select * from performance_schema.events_transactions_history;
+select * from performance_schema.events_transactions_history_long;
+select * from performance_schema.events_transactions_summary_by_account_by_event_name;
+select * from performance_schema.events_transactions_summary_by_host_by_event_name;
+select * from performance_schema.events_transactions_summary_by_thread_by_event_name;
+select * from performance_schema.events_transactions_summary_by_user_by_event_name;
+select * from performance_schema.events_transactions_summary_global_by_event_name;
+select * from performance_schema.events_waits_current;
+select * from performance_schema.events_waits_history;
+select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+select * from performance_schema.events_waits_summary_by_instance;
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.file_instances;
+select * from performance_schema.file_summary_by_event_name;
+select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.hosts;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.metadata_locks;
+select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
+select * from performance_schema.performance_timers;
+select * from performance_schema.rwlock_instances;
+select * from performance_schema.session_account_connect_attrs;
+select * from performance_schema.session_connect_attrs;
+select * from performance_schema.setup_actors;
+select * from performance_schema.setup_consumers;
+select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
+select * from performance_schema.setup_timers;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.table_handles;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
+select * from performance_schema.threads;
+select * from performance_schema.users;
+select * from performance_schema.replication_connection_configuration;
+select * from performance_schema.replication_applier_configuration;
+select * from performance_schema.replication_applier_status;
+select * from performance_schema.replication_applier_status_by_coordinator;
+select * from performance_schema.global_status;
+select * from performance_schema.status_by_thread;
+select * from performance_schema.status_by_user;
+select * from performance_schema.status_by_host;
+select * from performance_schema.status_by_account;
+select * from performance_schema.session_status;
+show global variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_transactions_history_long_size 1000
+performance_schema_events_transactions_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 90
+performance_schema_max_cond_instances 1000
+performance_schema_max_digest_length 1024
+performance_schema_max_file_classes 80
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_index_stat 5000
+performance_schema_max_memory_classes 320
+performance_schema_max_metadata_locks 10000
+performance_schema_max_mutex_classes 210
+performance_schema_max_mutex_instances 5000
+performance_schema_max_prepared_statements_instances 100
+performance_schema_max_program_instances 5000
+performance_schema_max_rwlock_classes 50
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_sql_text_length 1024
+performance_schema_max_stage_classes 160
+performance_schema_max_statement_classes 222
+performance_schema_max_statement_stack 10
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_table_lock_stat 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_session_connect_attrs_size 2048
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
-show status like "performance_schema%";
-show status like "performance_schema%";
+show global status like "performance_schema%";
+show global status like "performance_schema%";
Variable_name Value
Performance_schema_accounts_lost 0
Performance_schema_cond_classes_lost 0
@@ -29,9 +157,15 @@ Performance_schema_file_classes_lost 0
Performance_schema_file_handles_lost 0
Performance_schema_file_instances_lost 0
Performance_schema_hosts_lost 0
+Performance_schema_index_stat_lost 0
Performance_schema_locker_lost 0
+Performance_schema_memory_classes_lost 0
+Performance_schema_metadata_lock_lost 0
Performance_schema_mutex_classes_lost 0
Performance_schema_mutex_instances_lost 0
+Performance_schema_nested_statement_lost 0
+Performance_schema_prepared_statements_lost 0
+Performance_schema_program_lost 0
Performance_schema_rwlock_classes_lost 0
Performance_schema_rwlock_instances_lost 0
Performance_schema_session_connect_attrs_lost 0
@@ -41,6 +175,7 @@ Performance_schema_stage_classes_lost 0
Performance_schema_statement_classes_lost 0
Performance_schema_table_handles_lost 0
Performance_schema_table_instances_lost 0
+Performance_schema_table_lock_stat_lost 0
Performance_schema_thread_classes_lost 0
Performance_schema_thread_instances_lost 0
Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/start_server_low_digest_sql_length.result b/mysql-test/suite/perfschema/r/start_server_low_digest_sql_length.result
new file mode 100644
index 00000000000..9f3726a2345
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/start_server_low_digest_sql_length.result
@@ -0,0 +1,12 @@
+USE performance_schema;
+truncate table events_statements_history_long;
+SELECT 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1
+74
+####################################
+# QUERYING PS STATEMENT DIGEST
+####################################
+SELECT event_name, digest, digest_text, sql_text FROM events_statements_history_long;
+event_name digest digest_text sql_text
+statement/sql/select beb5bd93b7e8c45bc5cb6060804988e8 SELECT ? + ? + SELECT ...
+statement/sql/truncate faf6cefb662b443f05e97b5c5ab14a59 TRUNCATE TABLE truncat...
diff --git a/mysql-test/suite/perfschema/r/start_server_low_index.result b/mysql-test/suite/perfschema/r/start_server_low_index.result
new file mode 100644
index 00000000000..9fd9a8a447c
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/start_server_low_index.result
@@ -0,0 +1,280 @@
+show databases;
+Database
+information_schema
+mtr
+mysql
+performance_schema
+test
+select count(*) from performance_schema.performance_timers;
+count(*)
+5
+select count(*) from performance_schema.setup_consumers;
+count(*)
+15
+select count(*) > 4 from performance_schema.setup_instruments;
+count(*) > 4
+1
+select count(*) from performance_schema.setup_timers;
+count(*)
+5
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release
+select * from performance_schema.accounts;
+select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_digest;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_transactions_current;
+select * from performance_schema.events_transactions_history;
+select * from performance_schema.events_transactions_history_long;
+select * from performance_schema.events_transactions_summary_by_account_by_event_name;
+select * from performance_schema.events_transactions_summary_by_host_by_event_name;
+select * from performance_schema.events_transactions_summary_by_thread_by_event_name;
+select * from performance_schema.events_transactions_summary_by_user_by_event_name;
+select * from performance_schema.events_transactions_summary_global_by_event_name;
+select * from performance_schema.events_waits_current;
+select * from performance_schema.events_waits_history;
+select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+select * from performance_schema.events_waits_summary_by_instance;
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.file_instances;
+select * from performance_schema.file_summary_by_event_name;
+select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.hosts;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.metadata_locks;
+select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
+select * from performance_schema.performance_timers;
+select * from performance_schema.rwlock_instances;
+select * from performance_schema.session_account_connect_attrs;
+select * from performance_schema.session_connect_attrs;
+select * from performance_schema.setup_actors;
+select * from performance_schema.setup_consumers;
+select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
+select * from performance_schema.setup_timers;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.table_handles;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
+select * from performance_schema.threads;
+select * from performance_schema.users;
+select * from performance_schema.replication_connection_configuration;
+select * from performance_schema.replication_applier_configuration;
+select * from performance_schema.replication_applier_status;
+select * from performance_schema.replication_applier_status_by_coordinator;
+select * from performance_schema.global_status;
+select * from performance_schema.status_by_thread;
+select * from performance_schema.status_by_user;
+select * from performance_schema.status_by_host;
+select * from performance_schema.status_by_account;
+select * from performance_schema.session_status;
+show global variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_transactions_history_long_size 1000
+performance_schema_events_transactions_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 90
+performance_schema_max_cond_instances 1000
+performance_schema_max_digest_length 1024
+performance_schema_max_file_classes 80
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_index_stat 34
+performance_schema_max_memory_classes 320
+performance_schema_max_metadata_locks 10000
+performance_schema_max_mutex_classes 210
+performance_schema_max_mutex_instances 5000
+performance_schema_max_prepared_statements_instances 100
+performance_schema_max_program_instances 5000
+performance_schema_max_rwlock_classes 50
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_sql_text_length 1024
+performance_schema_max_stage_classes 160
+performance_schema_max_statement_classes 222
+performance_schema_max_statement_stack 10
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_table_lock_stat 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_session_connect_attrs_size 2048
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
+show engine PERFORMANCE_SCHEMA status;
+show global status like "performance_schema%";
+drop table if exists db1.t1;
+drop database if exists db1;
+create database db1;
+create table db1.t1 (a int, b char(10) default 'default',
+unique key uidx(a));
+insert into db1.t1 values('1', 'abc');
+insert into db1.t1 values('2', 'abc');
+select * from db1.t1 where a='1';
+a b
+1 abc
+select COUNT_STAR, OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME
+from performance_schema.table_io_waits_summary_by_table
+where OBJECT_SCHEMA='db1'
+ order by OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME;
+COUNT_STAR OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME
+3 TABLE db1 t1
+select COUNT_STAR, OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME, INDEX_NAME
+from performance_schema.table_io_waits_summary_by_index_usage
+where OBJECT_SCHEMA='db1'
+ order by OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME, INDEX_NAME;
+COUNT_STAR OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME INDEX_NAME
+2 TABLE db1 t1 NULL
+1 TABLE db1 t1 uidx
+flush tables;
+select COUNT_STAR, OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME
+from performance_schema.table_io_waits_summary_by_table
+where OBJECT_SCHEMA='db1'
+ order by OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME;
+COUNT_STAR OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME
+1 TABLE db1 t1
+select COUNT_STAR, OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME, INDEX_NAME
+from performance_schema.table_io_waits_summary_by_index_usage
+where OBJECT_SCHEMA='db1'
+ order by OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME, INDEX_NAME;
+COUNT_STAR OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME INDEX_NAME
+1 TABLE db1 t1 uidx
+select variable_value > 0 from information_schema.global_status
+where variable_name like 'PERFORMANCE_SCHEMA_INDEX_STAT_LOST';
+variable_value > 0
+1
+FLUSH STATUS;
+select variable_value from information_schema.global_status
+where variable_name like 'PERFORMANCE_SCHEMA_INDEX_STAT_LOST';
+variable_value
+0
+create table db1.t2 (a int, b char(10) default 'default',
+unique key uidx(a));
+insert into db1.t1 values('3', 'abc');
+insert into db1.t1 values('4', 'abc');
+select * from db1.t1 where a='1';
+a b
+1 abc
+insert into db1.t2 values('1', 'abc');
+insert into db1.t2 values('2', 'abc');
+select * from db1.t2 where a='1';
+a b
+1 abc
+select COUNT_STAR, OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME
+from performance_schema.table_io_waits_summary_by_table
+where OBJECT_SCHEMA='db1'
+ order by OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME;
+COUNT_STAR OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME
+4 TABLE db1 t1
+3 TABLE db1 t2
+select COUNT_STAR, OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME, INDEX_NAME
+from performance_schema.table_io_waits_summary_by_index_usage
+where OBJECT_SCHEMA='db1'
+ order by OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME, INDEX_NAME;
+COUNT_STAR OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME INDEX_NAME
+2 TABLE db1 t1 NULL
+2 TABLE db1 t1 uidx
+2 TABLE db1 t2 NULL
+1 TABLE db1 t2 (index 0)
+flush tables;
+select COUNT_STAR, OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME
+from performance_schema.table_io_waits_summary_by_table
+where OBJECT_SCHEMA='db1'
+ order by OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME;
+COUNT_STAR OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME
+2 TABLE db1 t1
+0 TABLE db1 t2
+select COUNT_STAR, OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME, INDEX_NAME
+from performance_schema.table_io_waits_summary_by_index_usage
+where OBJECT_SCHEMA='db1'
+ order by OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME, INDEX_NAME;
+COUNT_STAR OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME INDEX_NAME
+2 TABLE db1 t1 uidx
+select variable_value > 0 from information_schema.global_status
+where variable_name like 'PERFORMANCE_SCHEMA_INDEX_STAT_LOST';
+variable_value > 0
+1
+FLUSH STATUS;
+update performance_schema.setup_objects set ENABLED='NO' where OBJECT_TYPE='TABLE';
+insert into db1.t1 values('5', 'abc');
+insert into db1.t1 values('6', 'abc');
+select * from db1.t1 where a='1';
+a b
+1 abc
+insert into db1.t2 values('3', 'abc');
+insert into db1.t2 values('4', 'abc');
+select * from db1.t2 where a='1';
+a b
+1 abc
+select COUNT_STAR, OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME
+from performance_schema.table_io_waits_summary_by_table
+where OBJECT_SCHEMA='db1'
+ order by OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME;
+COUNT_STAR OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME
+select COUNT_STAR, OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME, INDEX_NAME
+from performance_schema.table_io_waits_summary_by_index_usage
+where OBJECT_SCHEMA='db1'
+ order by OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME, INDEX_NAME;
+COUNT_STAR OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME INDEX_NAME
+flush tables;
+select COUNT_STAR, OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME
+from performance_schema.table_io_waits_summary_by_table
+where OBJECT_SCHEMA='db1'
+ order by OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME;
+COUNT_STAR OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME
+select COUNT_STAR, OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME, INDEX_NAME
+from performance_schema.table_io_waits_summary_by_index_usage
+where OBJECT_SCHEMA='db1'
+ order by OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME, INDEX_NAME;
+COUNT_STAR OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME INDEX_NAME
+select variable_value from information_schema.global_status
+where variable_name like 'PERFORMANCE_SCHEMA_INDEX_STAT_LOST';
+variable_value
+0
+drop database db1;
+update performance_schema.setup_objects set ENABLED='YES'
+ where OBJECT_TYPE='TABLE' and OBJECT_SCHEMA="%";
diff --git a/mysql-test/suite/perfschema/r/start_server_low_table_lock.result b/mysql-test/suite/perfschema/r/start_server_low_table_lock.result
new file mode 100644
index 00000000000..981fa297971
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/start_server_low_table_lock.result
@@ -0,0 +1,237 @@
+show databases;
+Database
+information_schema
+mtr
+mysql
+performance_schema
+test
+select count(*) from performance_schema.performance_timers;
+count(*)
+5
+select count(*) from performance_schema.setup_consumers;
+count(*)
+15
+select count(*) > 4 from performance_schema.setup_instruments;
+count(*) > 4
+1
+select count(*) from performance_schema.setup_timers;
+count(*)
+5
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release
+select * from performance_schema.accounts;
+select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_digest;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_transactions_current;
+select * from performance_schema.events_transactions_history;
+select * from performance_schema.events_transactions_history_long;
+select * from performance_schema.events_transactions_summary_by_account_by_event_name;
+select * from performance_schema.events_transactions_summary_by_host_by_event_name;
+select * from performance_schema.events_transactions_summary_by_thread_by_event_name;
+select * from performance_schema.events_transactions_summary_by_user_by_event_name;
+select * from performance_schema.events_transactions_summary_global_by_event_name;
+select * from performance_schema.events_waits_current;
+select * from performance_schema.events_waits_history;
+select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+select * from performance_schema.events_waits_summary_by_instance;
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.file_instances;
+select * from performance_schema.file_summary_by_event_name;
+select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.hosts;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.metadata_locks;
+select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
+select * from performance_schema.performance_timers;
+select * from performance_schema.rwlock_instances;
+select * from performance_schema.session_account_connect_attrs;
+select * from performance_schema.session_connect_attrs;
+select * from performance_schema.setup_actors;
+select * from performance_schema.setup_consumers;
+select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
+select * from performance_schema.setup_timers;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.table_handles;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
+select * from performance_schema.threads;
+select * from performance_schema.users;
+select * from performance_schema.replication_connection_configuration;
+select * from performance_schema.replication_applier_configuration;
+select * from performance_schema.replication_applier_status;
+select * from performance_schema.replication_applier_status_by_coordinator;
+select * from performance_schema.global_status;
+select * from performance_schema.status_by_thread;
+select * from performance_schema.status_by_user;
+select * from performance_schema.status_by_host;
+select * from performance_schema.status_by_account;
+select * from performance_schema.session_status;
+show global variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_transactions_history_long_size 1000
+performance_schema_events_transactions_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 90
+performance_schema_max_cond_instances 1000
+performance_schema_max_digest_length 1024
+performance_schema_max_file_classes 80
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_index_stat 5000
+performance_schema_max_memory_classes 320
+performance_schema_max_metadata_locks 10000
+performance_schema_max_mutex_classes 210
+performance_schema_max_mutex_instances 5000
+performance_schema_max_prepared_statements_instances 100
+performance_schema_max_program_instances 5000
+performance_schema_max_rwlock_classes 50
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_sql_text_length 1024
+performance_schema_max_stage_classes 160
+performance_schema_max_statement_classes 222
+performance_schema_max_statement_stack 10
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_table_lock_stat 1
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_session_connect_attrs_size 2048
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
+show engine PERFORMANCE_SCHEMA status;
+show global status like "performance_schema%";
+drop table if exists db1.t1;
+drop database if exists db1;
+create database db1;
+create table db1.t1 (a int, b char(10) default 'default');
+insert into db1.t1 values('1', 'abc');
+insert into db1.t1 values('2', 'abc');
+select * from db1.t1 where a='1';
+a b
+1 abc
+select COUNT_STAR, OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME
+from performance_schema.table_lock_waits_summary_by_table
+where OBJECT_SCHEMA='db1'
+ order by OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME;
+COUNT_STAR OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME
+6 TABLE db1 t1
+flush tables;
+select COUNT_STAR, OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME
+from performance_schema.table_lock_waits_summary_by_table
+where OBJECT_SCHEMA='db1'
+ order by OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME;
+COUNT_STAR OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME
+6 TABLE db1 t1
+select variable_value from information_schema.global_status
+where variable_name like 'PERFORMANCE_SCHEMA_TABLE_LOCK_STAT_LOST';
+variable_value
+0
+create table db1.t2 (a int, b char(10) default 'default',
+unique key uidx(a));
+insert into db1.t1 values('3', 'abc');
+insert into db1.t1 values('4', 'abc');
+select * from db1.t1 where a='1';
+a b
+1 abc
+insert into db1.t2 values('1', 'abc');
+insert into db1.t2 values('2', 'abc');
+select * from db1.t2 where a='1';
+a b
+1 abc
+select COUNT_STAR, OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME
+from performance_schema.table_lock_waits_summary_by_table
+where OBJECT_SCHEMA='db1'
+ order by OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME;
+COUNT_STAR OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME
+12 TABLE db1 t1
+6 TABLE db1 t2
+flush tables;
+select COUNT_STAR, OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME
+from performance_schema.table_lock_waits_summary_by_table
+where OBJECT_SCHEMA='db1'
+ order by OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME;
+COUNT_STAR OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME
+12 TABLE db1 t1
+0 TABLE db1 t2
+select variable_value > 0 from information_schema.global_status
+where variable_name like 'PERFORMANCE_SCHEMA_TABLE_LOCK_STAT_LOST';
+variable_value > 0
+1
+flush status;
+update performance_schema.setup_objects set ENABLED='NO'
+ where OBJECT_TYPE='TABLE' and OBJECT_SCHEMA="%";
+insert into db1.t1 values('5', 'abc');
+insert into db1.t1 values('6', 'abc');
+select * from db1.t1 where a='1';
+a b
+1 abc
+insert into db1.t2 values('3', 'abc');
+insert into db1.t2 values('4', 'abc');
+select * from db1.t2 where a='1';
+a b
+1 abc
+select COUNT_STAR, OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME
+from performance_schema.table_lock_waits_summary_by_table
+where OBJECT_SCHEMA='db1'
+ order by OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME;
+COUNT_STAR OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME
+flush tables;
+select COUNT_STAR, OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME
+from performance_schema.table_lock_waits_summary_by_table
+where OBJECT_SCHEMA='db1'
+ order by OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME;
+COUNT_STAR OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME
+select variable_value from information_schema.global_status
+where variable_name like 'PERFORMANCE_SCHEMA_TABLE_LOCK_STAT_LOST';
+variable_value
+0
+drop database db1;
+update performance_schema.setup_objects set ENABLED='YES'
+ where OBJECT_TYPE='TABLE' and OBJECT_SCHEMA="%";
diff --git a/mysql-test/suite/perfschema/r/start_server_no_account.result b/mysql-test/suite/perfschema/r/start_server_no_account.result
index c02b75e5c33..4333c6f74d2 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_account.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_account.result
@@ -10,16 +10,144 @@ count(*)
5
select count(*) from performance_schema.setup_consumers;
count(*)
-12
-select count(*) > 3 from performance_schema.setup_instruments;
-count(*) > 3
+15
+select count(*) > 4 from performance_schema.setup_instruments;
+count(*) > 4
1
select count(*) from performance_schema.setup_timers;
count(*)
-4
+5
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release
+select * from performance_schema.accounts;
+select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_digest;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_transactions_current;
+select * from performance_schema.events_transactions_history;
+select * from performance_schema.events_transactions_history_long;
+select * from performance_schema.events_transactions_summary_by_account_by_event_name;
+select * from performance_schema.events_transactions_summary_by_host_by_event_name;
+select * from performance_schema.events_transactions_summary_by_thread_by_event_name;
+select * from performance_schema.events_transactions_summary_by_user_by_event_name;
+select * from performance_schema.events_transactions_summary_global_by_event_name;
+select * from performance_schema.events_waits_current;
+select * from performance_schema.events_waits_history;
+select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+select * from performance_schema.events_waits_summary_by_instance;
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.file_instances;
+select * from performance_schema.file_summary_by_event_name;
+select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.hosts;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.metadata_locks;
+select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
+select * from performance_schema.performance_timers;
+select * from performance_schema.rwlock_instances;
+select * from performance_schema.session_account_connect_attrs;
+select * from performance_schema.session_connect_attrs;
+select * from performance_schema.setup_actors;
+select * from performance_schema.setup_consumers;
+select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
+select * from performance_schema.setup_timers;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.table_handles;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
+select * from performance_schema.threads;
+select * from performance_schema.users;
+select * from performance_schema.replication_connection_configuration;
+select * from performance_schema.replication_applier_configuration;
+select * from performance_schema.replication_applier_status;
+select * from performance_schema.replication_applier_status_by_coordinator;
+select * from performance_schema.global_status;
+select * from performance_schema.status_by_thread;
+select * from performance_schema.status_by_user;
+select * from performance_schema.status_by_host;
+select * from performance_schema.status_by_account;
+select * from performance_schema.session_status;
+show global variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 0
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_transactions_history_long_size 1000
+performance_schema_events_transactions_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 90
+performance_schema_max_cond_instances 1000
+performance_schema_max_digest_length 1024
+performance_schema_max_file_classes 80
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_index_stat 5000
+performance_schema_max_memory_classes 320
+performance_schema_max_metadata_locks 10000
+performance_schema_max_mutex_classes 210
+performance_schema_max_mutex_instances 5000
+performance_schema_max_prepared_statements_instances 100
+performance_schema_max_program_instances 5000
+performance_schema_max_rwlock_classes 50
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_sql_text_length 1024
+performance_schema_max_stage_classes 160
+performance_schema_max_statement_classes 222
+performance_schema_max_statement_stack 10
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_table_lock_stat 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_session_connect_attrs_size 2048
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
-show status like "performance_schema%";
-show variables like "performance_schema_accounts_size";
+show global status like "performance_schema%";
+show global variables like "performance_schema_accounts_size";
Variable_name Value
performance_schema_accounts_size 0
select count(*) from performance_schema.accounts;
diff --git a/mysql-test/suite/perfschema/r/start_server_no_cond_class.result b/mysql-test/suite/perfschema/r/start_server_no_cond_class.result
index a3e16b4be8d..74c4bed9696 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_cond_class.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_cond_class.result
@@ -10,16 +10,144 @@ count(*)
5
select count(*) from performance_schema.setup_consumers;
count(*)
-12
-select count(*) > 3 from performance_schema.setup_instruments;
-count(*) > 3
+15
+select count(*) > 4 from performance_schema.setup_instruments;
+count(*) > 4
1
select count(*) from performance_schema.setup_timers;
count(*)
-4
+5
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release
+select * from performance_schema.accounts;
+select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_digest;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_transactions_current;
+select * from performance_schema.events_transactions_history;
+select * from performance_schema.events_transactions_history_long;
+select * from performance_schema.events_transactions_summary_by_account_by_event_name;
+select * from performance_schema.events_transactions_summary_by_host_by_event_name;
+select * from performance_schema.events_transactions_summary_by_thread_by_event_name;
+select * from performance_schema.events_transactions_summary_by_user_by_event_name;
+select * from performance_schema.events_transactions_summary_global_by_event_name;
+select * from performance_schema.events_waits_current;
+select * from performance_schema.events_waits_history;
+select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+select * from performance_schema.events_waits_summary_by_instance;
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.file_instances;
+select * from performance_schema.file_summary_by_event_name;
+select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.hosts;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.metadata_locks;
+select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
+select * from performance_schema.performance_timers;
+select * from performance_schema.rwlock_instances;
+select * from performance_schema.session_account_connect_attrs;
+select * from performance_schema.session_connect_attrs;
+select * from performance_schema.setup_actors;
+select * from performance_schema.setup_consumers;
+select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
+select * from performance_schema.setup_timers;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.table_handles;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
+select * from performance_schema.threads;
+select * from performance_schema.users;
+select * from performance_schema.replication_connection_configuration;
+select * from performance_schema.replication_applier_configuration;
+select * from performance_schema.replication_applier_status;
+select * from performance_schema.replication_applier_status_by_coordinator;
+select * from performance_schema.global_status;
+select * from performance_schema.status_by_thread;
+select * from performance_schema.status_by_user;
+select * from performance_schema.status_by_host;
+select * from performance_schema.status_by_account;
+select * from performance_schema.session_status;
+show global variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_transactions_history_long_size 1000
+performance_schema_events_transactions_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 0
+performance_schema_max_cond_instances 1000
+performance_schema_max_digest_length 1024
+performance_schema_max_file_classes 80
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_index_stat 5000
+performance_schema_max_memory_classes 320
+performance_schema_max_metadata_locks 10000
+performance_schema_max_mutex_classes 210
+performance_schema_max_mutex_instances 5000
+performance_schema_max_prepared_statements_instances 100
+performance_schema_max_program_instances 5000
+performance_schema_max_rwlock_classes 50
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_sql_text_length 1024
+performance_schema_max_stage_classes 160
+performance_schema_max_statement_classes 222
+performance_schema_max_statement_stack 10
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_table_lock_stat 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_session_connect_attrs_size 2048
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
-show status like "performance_schema%";
-show variables like "performance_schema_max_cond_classes";
+show global status like "performance_schema%";
+show global variables like "performance_schema_max_cond_classes";
Variable_name Value
performance_schema_max_cond_classes 0
select count(*) from performance_schema.setup_instruments
@@ -33,6 +161,6 @@ variable_value > 0
select count(*) from performance_schema.cond_instances;
count(*)
0
-show status like "performance_schema_cond_instances_lost";
+show global status like "performance_schema_cond_instances_lost";
Variable_name Value
Performance_schema_cond_instances_lost 0
diff --git a/mysql-test/suite/perfschema/r/start_server_no_cond_inst.result b/mysql-test/suite/perfschema/r/start_server_no_cond_inst.result
index bb3d0a24db9..03a7f935317 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_cond_inst.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_cond_inst.result
@@ -10,26 +10,154 @@ count(*)
5
select count(*) from performance_schema.setup_consumers;
count(*)
-12
-select count(*) > 3 from performance_schema.setup_instruments;
-count(*) > 3
+15
+select count(*) > 4 from performance_schema.setup_instruments;
+count(*) > 4
1
select count(*) from performance_schema.setup_timers;
count(*)
-4
+5
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release
+select * from performance_schema.accounts;
+select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_digest;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_transactions_current;
+select * from performance_schema.events_transactions_history;
+select * from performance_schema.events_transactions_history_long;
+select * from performance_schema.events_transactions_summary_by_account_by_event_name;
+select * from performance_schema.events_transactions_summary_by_host_by_event_name;
+select * from performance_schema.events_transactions_summary_by_thread_by_event_name;
+select * from performance_schema.events_transactions_summary_by_user_by_event_name;
+select * from performance_schema.events_transactions_summary_global_by_event_name;
+select * from performance_schema.events_waits_current;
+select * from performance_schema.events_waits_history;
+select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+select * from performance_schema.events_waits_summary_by_instance;
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.file_instances;
+select * from performance_schema.file_summary_by_event_name;
+select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.hosts;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.metadata_locks;
+select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
+select * from performance_schema.performance_timers;
+select * from performance_schema.rwlock_instances;
+select * from performance_schema.session_account_connect_attrs;
+select * from performance_schema.session_connect_attrs;
+select * from performance_schema.setup_actors;
+select * from performance_schema.setup_consumers;
+select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
+select * from performance_schema.setup_timers;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.table_handles;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
+select * from performance_schema.threads;
+select * from performance_schema.users;
+select * from performance_schema.replication_connection_configuration;
+select * from performance_schema.replication_applier_configuration;
+select * from performance_schema.replication_applier_status;
+select * from performance_schema.replication_applier_status_by_coordinator;
+select * from performance_schema.global_status;
+select * from performance_schema.status_by_thread;
+select * from performance_schema.status_by_user;
+select * from performance_schema.status_by_host;
+select * from performance_schema.status_by_account;
+select * from performance_schema.session_status;
+show global variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_transactions_history_long_size 1000
+performance_schema_events_transactions_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 90
+performance_schema_max_cond_instances 0
+performance_schema_max_digest_length 1024
+performance_schema_max_file_classes 80
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_index_stat 5000
+performance_schema_max_memory_classes 320
+performance_schema_max_metadata_locks 10000
+performance_schema_max_mutex_classes 210
+performance_schema_max_mutex_instances 5000
+performance_schema_max_prepared_statements_instances 100
+performance_schema_max_program_instances 5000
+performance_schema_max_rwlock_classes 50
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_sql_text_length 1024
+performance_schema_max_stage_classes 160
+performance_schema_max_statement_classes 222
+performance_schema_max_statement_stack 10
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_table_lock_stat 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_session_connect_attrs_size 2048
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
-show status like "performance_schema%";
-show variables like "performance_schema_max_cond_classes";
+show global status like "performance_schema%";
+show global variables like "performance_schema_max_cond_classes";
Variable_name Value
performance_schema_max_cond_classes 90
select count(*) > 0 from performance_schema.setup_instruments
where name like "wait/synch/cond/%";
count(*) > 0
1
-show status like "performance_schema_cond_classes_lost";
+show global status like "performance_schema_cond_classes_lost";
Variable_name Value
Performance_schema_cond_classes_lost 0
-show variables like "performance_schema_max_cond_instances";
+show global variables like "performance_schema_max_cond_instances";
Variable_name Value
performance_schema_max_cond_instances 0
select count(*) from performance_schema.cond_instances;
diff --git a/mysql-test/suite/perfschema/r/start_server_no_digests.result b/mysql-test/suite/perfschema/r/start_server_no_digests.result
index f8301e62a7f..e3072cb2fe7 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_digests.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_digests.result
@@ -112,7 +112,7 @@ DROP TRIGGER trg;
SELECT SCHEMA_NAME, DIGEST_TEXT, COUNT_STAR, SUM_ROWS_AFFECTED, SUM_WARNINGS,
SUM_ERRORS FROM performance_schema.events_statements_summary_by_digest;
SCHEMA_NAME DIGEST_TEXT COUNT_STAR SUM_ROWS_AFFECTED SUM_WARNINGS SUM_ERRORS
-SHOW VARIABLES LIKE "performance_schema_digests_size";
+SHOW GLOBAL VARIABLES LIKE "performance_schema_digests_size";
Variable_name Value
performance_schema_digests_size 0
SELECT COUNT(*) FROM performance_schema.events_statements_summary_by_digest;
diff --git a/mysql-test/suite/perfschema/r/start_server_no_file_class.result b/mysql-test/suite/perfschema/r/start_server_no_file_class.result
index 5e6da344a70..c962a74e0db 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_file_class.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_file_class.result
@@ -10,16 +10,144 @@ count(*)
5
select count(*) from performance_schema.setup_consumers;
count(*)
-12
-select count(*) > 3 from performance_schema.setup_instruments;
-count(*) > 3
+15
+select count(*) > 4 from performance_schema.setup_instruments;
+count(*) > 4
1
select count(*) from performance_schema.setup_timers;
count(*)
-4
+5
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release
+select * from performance_schema.accounts;
+select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_digest;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_transactions_current;
+select * from performance_schema.events_transactions_history;
+select * from performance_schema.events_transactions_history_long;
+select * from performance_schema.events_transactions_summary_by_account_by_event_name;
+select * from performance_schema.events_transactions_summary_by_host_by_event_name;
+select * from performance_schema.events_transactions_summary_by_thread_by_event_name;
+select * from performance_schema.events_transactions_summary_by_user_by_event_name;
+select * from performance_schema.events_transactions_summary_global_by_event_name;
+select * from performance_schema.events_waits_current;
+select * from performance_schema.events_waits_history;
+select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+select * from performance_schema.events_waits_summary_by_instance;
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.file_instances;
+select * from performance_schema.file_summary_by_event_name;
+select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.hosts;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.metadata_locks;
+select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
+select * from performance_schema.performance_timers;
+select * from performance_schema.rwlock_instances;
+select * from performance_schema.session_account_connect_attrs;
+select * from performance_schema.session_connect_attrs;
+select * from performance_schema.setup_actors;
+select * from performance_schema.setup_consumers;
+select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
+select * from performance_schema.setup_timers;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.table_handles;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
+select * from performance_schema.threads;
+select * from performance_schema.users;
+select * from performance_schema.replication_connection_configuration;
+select * from performance_schema.replication_applier_configuration;
+select * from performance_schema.replication_applier_status;
+select * from performance_schema.replication_applier_status_by_coordinator;
+select * from performance_schema.global_status;
+select * from performance_schema.status_by_thread;
+select * from performance_schema.status_by_user;
+select * from performance_schema.status_by_host;
+select * from performance_schema.status_by_account;
+select * from performance_schema.session_status;
+show global variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_transactions_history_long_size 1000
+performance_schema_events_transactions_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 90
+performance_schema_max_cond_instances 1000
+performance_schema_max_digest_length 1024
+performance_schema_max_file_classes 0
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_index_stat 5000
+performance_schema_max_memory_classes 320
+performance_schema_max_metadata_locks 10000
+performance_schema_max_mutex_classes 210
+performance_schema_max_mutex_instances 5000
+performance_schema_max_prepared_statements_instances 100
+performance_schema_max_program_instances 5000
+performance_schema_max_rwlock_classes 50
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_sql_text_length 1024
+performance_schema_max_stage_classes 160
+performance_schema_max_statement_classes 222
+performance_schema_max_statement_stack 10
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_table_lock_stat 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_session_connect_attrs_size 2048
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
-show status like "performance_schema%";
-show variables like "performance_schema_max_file_classes";
+show global status like "performance_schema%";
+show global variables like "performance_schema_max_file_classes";
Variable_name Value
performance_schema_max_file_classes 0
select count(*) from performance_schema.setup_instruments
@@ -33,6 +161,6 @@ variable_value > 0
select count(*) from performance_schema.file_instances;
count(*)
0
-show status like "performance_schema_file_instances_lost";
+show global status like "performance_schema_file_instances_lost";
Variable_name Value
Performance_schema_file_instances_lost 0
diff --git a/mysql-test/suite/perfschema/r/start_server_no_file_inst.result b/mysql-test/suite/perfschema/r/start_server_no_file_inst.result
index 33dce305ef3..ef80d6e3a2d 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_file_inst.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_file_inst.result
@@ -10,26 +10,154 @@ count(*)
5
select count(*) from performance_schema.setup_consumers;
count(*)
-12
-select count(*) > 3 from performance_schema.setup_instruments;
-count(*) > 3
+15
+select count(*) > 4 from performance_schema.setup_instruments;
+count(*) > 4
1
select count(*) from performance_schema.setup_timers;
count(*)
-4
+5
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release
+select * from performance_schema.accounts;
+select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_digest;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_transactions_current;
+select * from performance_schema.events_transactions_history;
+select * from performance_schema.events_transactions_history_long;
+select * from performance_schema.events_transactions_summary_by_account_by_event_name;
+select * from performance_schema.events_transactions_summary_by_host_by_event_name;
+select * from performance_schema.events_transactions_summary_by_thread_by_event_name;
+select * from performance_schema.events_transactions_summary_by_user_by_event_name;
+select * from performance_schema.events_transactions_summary_global_by_event_name;
+select * from performance_schema.events_waits_current;
+select * from performance_schema.events_waits_history;
+select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+select * from performance_schema.events_waits_summary_by_instance;
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.file_instances;
+select * from performance_schema.file_summary_by_event_name;
+select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.hosts;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.metadata_locks;
+select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
+select * from performance_schema.performance_timers;
+select * from performance_schema.rwlock_instances;
+select * from performance_schema.session_account_connect_attrs;
+select * from performance_schema.session_connect_attrs;
+select * from performance_schema.setup_actors;
+select * from performance_schema.setup_consumers;
+select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
+select * from performance_schema.setup_timers;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.table_handles;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
+select * from performance_schema.threads;
+select * from performance_schema.users;
+select * from performance_schema.replication_connection_configuration;
+select * from performance_schema.replication_applier_configuration;
+select * from performance_schema.replication_applier_status;
+select * from performance_schema.replication_applier_status_by_coordinator;
+select * from performance_schema.global_status;
+select * from performance_schema.status_by_thread;
+select * from performance_schema.status_by_user;
+select * from performance_schema.status_by_host;
+select * from performance_schema.status_by_account;
+select * from performance_schema.session_status;
+show global variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_transactions_history_long_size 1000
+performance_schema_events_transactions_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 90
+performance_schema_max_cond_instances 1000
+performance_schema_max_digest_length 1024
+performance_schema_max_file_classes 80
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 0
+performance_schema_max_index_stat 5000
+performance_schema_max_memory_classes 320
+performance_schema_max_metadata_locks 10000
+performance_schema_max_mutex_classes 210
+performance_schema_max_mutex_instances 5000
+performance_schema_max_prepared_statements_instances 100
+performance_schema_max_program_instances 5000
+performance_schema_max_rwlock_classes 50
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_sql_text_length 1024
+performance_schema_max_stage_classes 160
+performance_schema_max_statement_classes 222
+performance_schema_max_statement_stack 10
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_table_lock_stat 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_session_connect_attrs_size 2048
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
-show status like "performance_schema%";
-show variables like "performance_schema_max_file_classes";
+show global status like "performance_schema%";
+show global variables like "performance_schema_max_file_classes";
Variable_name Value
-performance_schema_max_file_classes 50
+performance_schema_max_file_classes 80
select count(*) > 0 from performance_schema.setup_instruments
where name like "wait/io/file/%";
count(*) > 0
1
-show status like "performance_schema_file_classes_lost";
+show global status like "performance_schema_file_classes_lost";
Variable_name Value
Performance_schema_file_classes_lost 0
-show variables like "performance_schema_max_file_instances";
+show global variables like "performance_schema_max_file_instances";
Variable_name Value
performance_schema_max_file_instances 0
select count(*) from performance_schema.file_instances;
diff --git a/mysql-test/suite/perfschema/r/start_server_no_host.result b/mysql-test/suite/perfschema/r/start_server_no_host.result
index a4f362b256f..b58acf57362 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_host.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_host.result
@@ -10,16 +10,144 @@ count(*)
5
select count(*) from performance_schema.setup_consumers;
count(*)
-12
-select count(*) > 3 from performance_schema.setup_instruments;
-count(*) > 3
+15
+select count(*) > 4 from performance_schema.setup_instruments;
+count(*) > 4
1
select count(*) from performance_schema.setup_timers;
count(*)
-4
+5
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release
+select * from performance_schema.accounts;
+select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_digest;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_transactions_current;
+select * from performance_schema.events_transactions_history;
+select * from performance_schema.events_transactions_history_long;
+select * from performance_schema.events_transactions_summary_by_account_by_event_name;
+select * from performance_schema.events_transactions_summary_by_host_by_event_name;
+select * from performance_schema.events_transactions_summary_by_thread_by_event_name;
+select * from performance_schema.events_transactions_summary_by_user_by_event_name;
+select * from performance_schema.events_transactions_summary_global_by_event_name;
+select * from performance_schema.events_waits_current;
+select * from performance_schema.events_waits_history;
+select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+select * from performance_schema.events_waits_summary_by_instance;
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.file_instances;
+select * from performance_schema.file_summary_by_event_name;
+select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.hosts;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.metadata_locks;
+select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
+select * from performance_schema.performance_timers;
+select * from performance_schema.rwlock_instances;
+select * from performance_schema.session_account_connect_attrs;
+select * from performance_schema.session_connect_attrs;
+select * from performance_schema.setup_actors;
+select * from performance_schema.setup_consumers;
+select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
+select * from performance_schema.setup_timers;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.table_handles;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
+select * from performance_schema.threads;
+select * from performance_schema.users;
+select * from performance_schema.replication_connection_configuration;
+select * from performance_schema.replication_applier_configuration;
+select * from performance_schema.replication_applier_status;
+select * from performance_schema.replication_applier_status_by_coordinator;
+select * from performance_schema.global_status;
+select * from performance_schema.status_by_thread;
+select * from performance_schema.status_by_user;
+select * from performance_schema.status_by_host;
+select * from performance_schema.status_by_account;
+select * from performance_schema.session_status;
+show global variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_transactions_history_long_size 1000
+performance_schema_events_transactions_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 0
+performance_schema_max_cond_classes 90
+performance_schema_max_cond_instances 1000
+performance_schema_max_digest_length 1024
+performance_schema_max_file_classes 80
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_index_stat 5000
+performance_schema_max_memory_classes 320
+performance_schema_max_metadata_locks 10000
+performance_schema_max_mutex_classes 210
+performance_schema_max_mutex_instances 5000
+performance_schema_max_prepared_statements_instances 100
+performance_schema_max_program_instances 5000
+performance_schema_max_rwlock_classes 50
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_sql_text_length 1024
+performance_schema_max_stage_classes 160
+performance_schema_max_statement_classes 222
+performance_schema_max_statement_stack 10
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_table_lock_stat 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_session_connect_attrs_size 2048
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
-show status like "performance_schema%";
-show variables like "performance_schema_hosts_size";
+show global status like "performance_schema%";
+show global variables like "performance_schema_hosts_size";
Variable_name Value
performance_schema_hosts_size 0
select count(*) from performance_schema.hosts;
diff --git a/mysql-test/suite/perfschema/r/start_server_no_index.result b/mysql-test/suite/perfschema/r/start_server_no_index.result
new file mode 100644
index 00000000000..9e7a2bf34a7
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/start_server_no_index.result
@@ -0,0 +1,185 @@
+show databases;
+Database
+information_schema
+mtr
+mysql
+performance_schema
+test
+select count(*) from performance_schema.performance_timers;
+count(*)
+5
+select count(*) from performance_schema.setup_consumers;
+count(*)
+15
+select count(*) > 4 from performance_schema.setup_instruments;
+count(*) > 4
+1
+select count(*) from performance_schema.setup_timers;
+count(*)
+5
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release
+select * from performance_schema.accounts;
+select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_digest;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_transactions_current;
+select * from performance_schema.events_transactions_history;
+select * from performance_schema.events_transactions_history_long;
+select * from performance_schema.events_transactions_summary_by_account_by_event_name;
+select * from performance_schema.events_transactions_summary_by_host_by_event_name;
+select * from performance_schema.events_transactions_summary_by_thread_by_event_name;
+select * from performance_schema.events_transactions_summary_by_user_by_event_name;
+select * from performance_schema.events_transactions_summary_global_by_event_name;
+select * from performance_schema.events_waits_current;
+select * from performance_schema.events_waits_history;
+select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+select * from performance_schema.events_waits_summary_by_instance;
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.file_instances;
+select * from performance_schema.file_summary_by_event_name;
+select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.hosts;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.metadata_locks;
+select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
+select * from performance_schema.performance_timers;
+select * from performance_schema.rwlock_instances;
+select * from performance_schema.session_account_connect_attrs;
+select * from performance_schema.session_connect_attrs;
+select * from performance_schema.setup_actors;
+select * from performance_schema.setup_consumers;
+select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
+select * from performance_schema.setup_timers;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.table_handles;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
+select * from performance_schema.threads;
+select * from performance_schema.users;
+select * from performance_schema.replication_connection_configuration;
+select * from performance_schema.replication_applier_configuration;
+select * from performance_schema.replication_applier_status;
+select * from performance_schema.replication_applier_status_by_coordinator;
+select * from performance_schema.global_status;
+select * from performance_schema.status_by_thread;
+select * from performance_schema.status_by_user;
+select * from performance_schema.status_by_host;
+select * from performance_schema.status_by_account;
+select * from performance_schema.session_status;
+show global variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_transactions_history_long_size 1000
+performance_schema_events_transactions_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 90
+performance_schema_max_cond_instances 1000
+performance_schema_max_digest_length 1024
+performance_schema_max_file_classes 80
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_index_stat 0
+performance_schema_max_memory_classes 320
+performance_schema_max_metadata_locks 10000
+performance_schema_max_mutex_classes 210
+performance_schema_max_mutex_instances 5000
+performance_schema_max_prepared_statements_instances 100
+performance_schema_max_program_instances 5000
+performance_schema_max_rwlock_classes 50
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_sql_text_length 1024
+performance_schema_max_stage_classes 160
+performance_schema_max_statement_classes 222
+performance_schema_max_statement_stack 10
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_table_lock_stat 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_session_connect_attrs_size 2048
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
+show engine PERFORMANCE_SCHEMA status;
+show global status like "performance_schema%";
+drop table if exists db1.t1;
+drop database if exists db1;
+create database db1;
+create table db1.t1 (a int, b char(10) default 'default',
+unique key uidx(a));
+insert into db1.t1 values('1', 'abc');
+insert into db1.t1 values('2', 'abc');
+select * from db1.t1 where a='1';
+a b
+1 abc
+select COUNT_STAR from performance_schema.table_io_waits_summary_by_table
+where OBJECT_SCHEMA='db1' and OBJECT_NAME='t1';
+COUNT_STAR
+3
+select COUNT_STAR from performance_schema.table_io_waits_summary_by_index_usage
+where INDEX_NAME!='NULL';
+COUNT_STAR
+1
+FLUSH TABLES;
+select COUNT_STAR from performance_schema.table_io_waits_summary_by_table
+where OBJECT_SCHEMA='db1' and OBJECT_NAME='t1';
+COUNT_STAR
+0
+select COUNT_STAR from performance_schema.table_io_waits_summary_by_index_usage
+where INDEX_NAME!='NULL';
+COUNT_STAR
+select variable_value > 0 from information_schema.global_status
+where variable_name like 'PERFORMANCE_SCHEMA_INDEX_STAT_LOST';
+variable_value > 0
+1
+FLUSH STATUS;
+select variable_value from information_schema.global_status
+where variable_name like 'PERFORMANCE_SCHEMA_INDEX_STAT_LOST';
+variable_value
+0
+drop database db1;
diff --git a/mysql-test/suite/perfschema/r/start_server_no_mdl.result b/mysql-test/suite/perfschema/r/start_server_no_mdl.result
new file mode 100644
index 00000000000..886a1ee1633
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/start_server_no_mdl.result
@@ -0,0 +1,161 @@
+show databases;
+Database
+information_schema
+mtr
+mysql
+performance_schema
+test
+select count(*) from performance_schema.performance_timers;
+count(*)
+5
+select count(*) from performance_schema.setup_consumers;
+count(*)
+15
+select count(*) > 4 from performance_schema.setup_instruments;
+count(*) > 4
+1
+select count(*) from performance_schema.setup_timers;
+count(*)
+5
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release
+select * from performance_schema.accounts;
+select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_digest;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_transactions_current;
+select * from performance_schema.events_transactions_history;
+select * from performance_schema.events_transactions_history_long;
+select * from performance_schema.events_transactions_summary_by_account_by_event_name;
+select * from performance_schema.events_transactions_summary_by_host_by_event_name;
+select * from performance_schema.events_transactions_summary_by_thread_by_event_name;
+select * from performance_schema.events_transactions_summary_by_user_by_event_name;
+select * from performance_schema.events_transactions_summary_global_by_event_name;
+select * from performance_schema.events_waits_current;
+select * from performance_schema.events_waits_history;
+select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+select * from performance_schema.events_waits_summary_by_instance;
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.file_instances;
+select * from performance_schema.file_summary_by_event_name;
+select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.hosts;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.metadata_locks;
+select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
+select * from performance_schema.performance_timers;
+select * from performance_schema.rwlock_instances;
+select * from performance_schema.session_account_connect_attrs;
+select * from performance_schema.session_connect_attrs;
+select * from performance_schema.setup_actors;
+select * from performance_schema.setup_consumers;
+select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
+select * from performance_schema.setup_timers;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.table_handles;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
+select * from performance_schema.threads;
+select * from performance_schema.users;
+select * from performance_schema.replication_connection_configuration;
+select * from performance_schema.replication_applier_configuration;
+select * from performance_schema.replication_applier_status;
+select * from performance_schema.replication_applier_status_by_coordinator;
+select * from performance_schema.global_status;
+select * from performance_schema.status_by_thread;
+select * from performance_schema.status_by_user;
+select * from performance_schema.status_by_host;
+select * from performance_schema.status_by_account;
+select * from performance_schema.session_status;
+show global variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_transactions_history_long_size 1000
+performance_schema_events_transactions_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 90
+performance_schema_max_cond_instances 1000
+performance_schema_max_digest_length 1024
+performance_schema_max_file_classes 80
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_index_stat 5000
+performance_schema_max_memory_classes 320
+performance_schema_max_metadata_locks 0
+performance_schema_max_mutex_classes 210
+performance_schema_max_mutex_instances 5000
+performance_schema_max_prepared_statements_instances 100
+performance_schema_max_program_instances 5000
+performance_schema_max_rwlock_classes 50
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_sql_text_length 1024
+performance_schema_max_stage_classes 160
+performance_schema_max_statement_classes 222
+performance_schema_max_statement_stack 10
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_table_lock_stat 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_session_connect_attrs_size 2048
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
+show engine PERFORMANCE_SCHEMA status;
+show global status like "performance_schema%";
+select count(*) from performance_schema.metadata_locks;
+count(*)
+0
+select variable_value > 0 from information_schema.global_status
+where variable_name like 'PERFORMANCE_SCHEMA_METADATA_LOCK_LOST';
+variable_value > 0
+1
+FLUSH STATUS;
+select variable_value from information_schema.global_status
+where variable_name like 'PERFORMANCE_SCHEMA_METADATA_LOCK_LOST';
+variable_value
+0
diff --git a/mysql-test/suite/perfschema/r/start_server_no_memory_class.result b/mysql-test/suite/perfschema/r/start_server_no_memory_class.result
new file mode 100644
index 00000000000..a6605cc5ffb
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/start_server_no_memory_class.result
@@ -0,0 +1,235 @@
+show databases;
+Database
+information_schema
+mtr
+mysql
+performance_schema
+test
+select count(*) from performance_schema.performance_timers;
+count(*)
+5
+select count(*) from performance_schema.setup_consumers;
+count(*)
+15
+select count(*) > 4 from performance_schema.setup_instruments;
+count(*) > 4
+1
+select count(*) from performance_schema.setup_timers;
+count(*)
+5
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release
+select * from performance_schema.accounts;
+select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_digest;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_transactions_current;
+select * from performance_schema.events_transactions_history;
+select * from performance_schema.events_transactions_history_long;
+select * from performance_schema.events_transactions_summary_by_account_by_event_name;
+select * from performance_schema.events_transactions_summary_by_host_by_event_name;
+select * from performance_schema.events_transactions_summary_by_thread_by_event_name;
+select * from performance_schema.events_transactions_summary_by_user_by_event_name;
+select * from performance_schema.events_transactions_summary_global_by_event_name;
+select * from performance_schema.events_waits_current;
+select * from performance_schema.events_waits_history;
+select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+select * from performance_schema.events_waits_summary_by_instance;
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.file_instances;
+select * from performance_schema.file_summary_by_event_name;
+select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.hosts;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.metadata_locks;
+select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
+select * from performance_schema.performance_timers;
+select * from performance_schema.rwlock_instances;
+select * from performance_schema.session_account_connect_attrs;
+select * from performance_schema.session_connect_attrs;
+select * from performance_schema.setup_actors;
+select * from performance_schema.setup_consumers;
+select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
+select * from performance_schema.setup_timers;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.table_handles;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
+select * from performance_schema.threads;
+select * from performance_schema.users;
+select * from performance_schema.replication_connection_configuration;
+select * from performance_schema.replication_applier_configuration;
+select * from performance_schema.replication_applier_status;
+select * from performance_schema.replication_applier_status_by_coordinator;
+select * from performance_schema.global_status;
+select * from performance_schema.status_by_thread;
+select * from performance_schema.status_by_user;
+select * from performance_schema.status_by_host;
+select * from performance_schema.status_by_account;
+select * from performance_schema.session_status;
+show global variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_transactions_history_long_size 1000
+performance_schema_events_transactions_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 90
+performance_schema_max_cond_instances 1000
+performance_schema_max_digest_length 1024
+performance_schema_max_file_classes 80
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_index_stat 5000
+performance_schema_max_memory_classes 0
+performance_schema_max_metadata_locks 10000
+performance_schema_max_mutex_classes 210
+performance_schema_max_mutex_instances 5000
+performance_schema_max_prepared_statements_instances 100
+performance_schema_max_program_instances 5000
+performance_schema_max_rwlock_classes 50
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_sql_text_length 1024
+performance_schema_max_stage_classes 160
+performance_schema_max_statement_classes 222
+performance_schema_max_statement_stack 10
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_table_lock_stat 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_session_connect_attrs_size 2048
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
+show engine PERFORMANCE_SCHEMA status;
+show global status like "performance_schema%";
+show global variables like "performance_schema_max_memory_classes";
+Variable_name Value
+performance_schema_max_memory_classes 0
+select name from performance_schema.setup_instruments
+where name like "memory/performance_schema/%"
+ order by name;
+name
+memory/performance_schema/accounts
+memory/performance_schema/cond_class
+memory/performance_schema/cond_instances
+memory/performance_schema/events_stages_history
+memory/performance_schema/events_stages_history_long
+memory/performance_schema/events_stages_summary_by_account_by_event_name
+memory/performance_schema/events_stages_summary_by_host_by_event_name
+memory/performance_schema/events_stages_summary_by_thread_by_event_name
+memory/performance_schema/events_stages_summary_by_user_by_event_name
+memory/performance_schema/events_stages_summary_global_by_event_name
+memory/performance_schema/events_statements_current
+memory/performance_schema/events_statements_current.sqltext
+memory/performance_schema/events_statements_current.tokens
+memory/performance_schema/events_statements_history
+memory/performance_schema/events_statements_history.sqltext
+memory/performance_schema/events_statements_history.tokens
+memory/performance_schema/events_statements_history_long
+memory/performance_schema/events_statements_history_long.sqltext
+memory/performance_schema/events_statements_history_long.tokens
+memory/performance_schema/events_statements_summary_by_account_by_event_name
+memory/performance_schema/events_statements_summary_by_digest
+memory/performance_schema/events_statements_summary_by_digest.tokens
+memory/performance_schema/events_statements_summary_by_host_by_event_name
+memory/performance_schema/events_statements_summary_by_program
+memory/performance_schema/events_statements_summary_by_thread_by_event_name
+memory/performance_schema/events_statements_summary_by_user_by_event_name
+memory/performance_schema/events_statements_summary_global_by_event_name
+memory/performance_schema/events_transactions_history
+memory/performance_schema/events_transactions_history_long
+memory/performance_schema/events_transactions_summary_by_account_by_event_name
+memory/performance_schema/events_transactions_summary_by_host_by_event_name
+memory/performance_schema/events_transactions_summary_by_thread_by_event_name
+memory/performance_schema/events_transactions_summary_by_user_by_event_name
+memory/performance_schema/events_waits_history
+memory/performance_schema/events_waits_history_long
+memory/performance_schema/events_waits_summary_by_account_by_event_name
+memory/performance_schema/events_waits_summary_by_host_by_event_name
+memory/performance_schema/events_waits_summary_by_thread_by_event_name
+memory/performance_schema/events_waits_summary_by_user_by_event_name
+memory/performance_schema/file_class
+memory/performance_schema/file_handle
+memory/performance_schema/file_instances
+memory/performance_schema/hosts
+memory/performance_schema/memory_class
+memory/performance_schema/memory_summary_by_account_by_event_name
+memory/performance_schema/memory_summary_by_host_by_event_name
+memory/performance_schema/memory_summary_by_thread_by_event_name
+memory/performance_schema/memory_summary_by_user_by_event_name
+memory/performance_schema/memory_summary_global_by_event_name
+memory/performance_schema/metadata_locks
+memory/performance_schema/mutex_class
+memory/performance_schema/mutex_instances
+memory/performance_schema/prepared_statements_instances
+memory/performance_schema/rwlock_class
+memory/performance_schema/rwlock_instances
+memory/performance_schema/scalable_buffer
+memory/performance_schema/session_connect_attrs
+memory/performance_schema/setup_actors
+memory/performance_schema/setup_objects
+memory/performance_schema/socket_class
+memory/performance_schema/socket_instances
+memory/performance_schema/stage_class
+memory/performance_schema/statement_class
+memory/performance_schema/table_handles
+memory/performance_schema/table_io_waits_summary_by_index_usage
+memory/performance_schema/table_lock_waits_summary_by_table
+memory/performance_schema/table_shares
+memory/performance_schema/threads
+memory/performance_schema/thread_class
+memory/performance_schema/users
+select count(*) from performance_schema.setup_instruments
+where name like "memory/%"
+ and name not like "memory/performance_schema/%";
+count(*)
+0
+select variable_value > 0 from information_schema.global_status
+where variable_name like 'PERFORMANCE_SCHEMA_MEMORY_CLASSES_LOST';
+variable_value > 0
+1
diff --git a/mysql-test/suite/perfschema/r/start_server_no_mutex_class.result b/mysql-test/suite/perfschema/r/start_server_no_mutex_class.result
index 9fadcc581c7..ae30ac59bdb 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_mutex_class.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_mutex_class.result
@@ -10,16 +10,144 @@ count(*)
5
select count(*) from performance_schema.setup_consumers;
count(*)
-12
-select count(*) > 3 from performance_schema.setup_instruments;
-count(*) > 3
+15
+select count(*) > 4 from performance_schema.setup_instruments;
+count(*) > 4
1
select count(*) from performance_schema.setup_timers;
count(*)
-4
+5
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release
+select * from performance_schema.accounts;
+select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_digest;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_transactions_current;
+select * from performance_schema.events_transactions_history;
+select * from performance_schema.events_transactions_history_long;
+select * from performance_schema.events_transactions_summary_by_account_by_event_name;
+select * from performance_schema.events_transactions_summary_by_host_by_event_name;
+select * from performance_schema.events_transactions_summary_by_thread_by_event_name;
+select * from performance_schema.events_transactions_summary_by_user_by_event_name;
+select * from performance_schema.events_transactions_summary_global_by_event_name;
+select * from performance_schema.events_waits_current;
+select * from performance_schema.events_waits_history;
+select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+select * from performance_schema.events_waits_summary_by_instance;
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.file_instances;
+select * from performance_schema.file_summary_by_event_name;
+select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.hosts;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.metadata_locks;
+select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
+select * from performance_schema.performance_timers;
+select * from performance_schema.rwlock_instances;
+select * from performance_schema.session_account_connect_attrs;
+select * from performance_schema.session_connect_attrs;
+select * from performance_schema.setup_actors;
+select * from performance_schema.setup_consumers;
+select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
+select * from performance_schema.setup_timers;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.table_handles;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
+select * from performance_schema.threads;
+select * from performance_schema.users;
+select * from performance_schema.replication_connection_configuration;
+select * from performance_schema.replication_applier_configuration;
+select * from performance_schema.replication_applier_status;
+select * from performance_schema.replication_applier_status_by_coordinator;
+select * from performance_schema.global_status;
+select * from performance_schema.status_by_thread;
+select * from performance_schema.status_by_user;
+select * from performance_schema.status_by_host;
+select * from performance_schema.status_by_account;
+select * from performance_schema.session_status;
+show global variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_transactions_history_long_size 1000
+performance_schema_events_transactions_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 90
+performance_schema_max_cond_instances 1000
+performance_schema_max_digest_length 1024
+performance_schema_max_file_classes 80
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_index_stat 5000
+performance_schema_max_memory_classes 320
+performance_schema_max_metadata_locks 10000
+performance_schema_max_mutex_classes 0
+performance_schema_max_mutex_instances 5000
+performance_schema_max_prepared_statements_instances 100
+performance_schema_max_program_instances 5000
+performance_schema_max_rwlock_classes 50
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_sql_text_length 1024
+performance_schema_max_stage_classes 160
+performance_schema_max_statement_classes 222
+performance_schema_max_statement_stack 10
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_table_lock_stat 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_session_connect_attrs_size 2048
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
-show status like "performance_schema%";
-show variables like "performance_schema_max_mutex_classes";
+show global status like "performance_schema%";
+show global variables like "performance_schema_max_mutex_classes";
Variable_name Value
performance_schema_max_mutex_classes 0
select count(*) from performance_schema.setup_instruments
@@ -33,6 +161,6 @@ variable_value > 0
select count(*) from performance_schema.mutex_instances;
count(*)
0
-show status like "performance_schema_mutex_instances_lost";
+show global status like "performance_schema_mutex_instances_lost";
Variable_name Value
Performance_schema_mutex_instances_lost 0
diff --git a/mysql-test/suite/perfschema/r/start_server_no_mutex_inst.result b/mysql-test/suite/perfschema/r/start_server_no_mutex_inst.result
index c443a4e58db..1f4086500a0 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_mutex_inst.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_mutex_inst.result
@@ -10,26 +10,154 @@ count(*)
5
select count(*) from performance_schema.setup_consumers;
count(*)
-12
-select count(*) > 3 from performance_schema.setup_instruments;
-count(*) > 3
+15
+select count(*) > 4 from performance_schema.setup_instruments;
+count(*) > 4
1
select count(*) from performance_schema.setup_timers;
count(*)
-4
+5
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release
+select * from performance_schema.accounts;
+select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_digest;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_transactions_current;
+select * from performance_schema.events_transactions_history;
+select * from performance_schema.events_transactions_history_long;
+select * from performance_schema.events_transactions_summary_by_account_by_event_name;
+select * from performance_schema.events_transactions_summary_by_host_by_event_name;
+select * from performance_schema.events_transactions_summary_by_thread_by_event_name;
+select * from performance_schema.events_transactions_summary_by_user_by_event_name;
+select * from performance_schema.events_transactions_summary_global_by_event_name;
+select * from performance_schema.events_waits_current;
+select * from performance_schema.events_waits_history;
+select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+select * from performance_schema.events_waits_summary_by_instance;
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.file_instances;
+select * from performance_schema.file_summary_by_event_name;
+select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.hosts;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.metadata_locks;
+select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
+select * from performance_schema.performance_timers;
+select * from performance_schema.rwlock_instances;
+select * from performance_schema.session_account_connect_attrs;
+select * from performance_schema.session_connect_attrs;
+select * from performance_schema.setup_actors;
+select * from performance_schema.setup_consumers;
+select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
+select * from performance_schema.setup_timers;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.table_handles;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
+select * from performance_schema.threads;
+select * from performance_schema.users;
+select * from performance_schema.replication_connection_configuration;
+select * from performance_schema.replication_applier_configuration;
+select * from performance_schema.replication_applier_status;
+select * from performance_schema.replication_applier_status_by_coordinator;
+select * from performance_schema.global_status;
+select * from performance_schema.status_by_thread;
+select * from performance_schema.status_by_user;
+select * from performance_schema.status_by_host;
+select * from performance_schema.status_by_account;
+select * from performance_schema.session_status;
+show global variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_transactions_history_long_size 1000
+performance_schema_events_transactions_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 90
+performance_schema_max_cond_instances 1000
+performance_schema_max_digest_length 1024
+performance_schema_max_file_classes 80
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_index_stat 5000
+performance_schema_max_memory_classes 320
+performance_schema_max_metadata_locks 10000
+performance_schema_max_mutex_classes 210
+performance_schema_max_mutex_instances 0
+performance_schema_max_prepared_statements_instances 100
+performance_schema_max_program_instances 5000
+performance_schema_max_rwlock_classes 50
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_sql_text_length 1024
+performance_schema_max_stage_classes 160
+performance_schema_max_statement_classes 222
+performance_schema_max_statement_stack 10
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_table_lock_stat 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_session_connect_attrs_size 2048
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
-show status like "performance_schema%";
-show variables like "performance_schema_max_mutex_classes";
+show global status like "performance_schema%";
+show global variables like "performance_schema_max_mutex_classes";
Variable_name Value
-performance_schema_max_mutex_classes 200
+performance_schema_max_mutex_classes 210
select count(*) > 0 from performance_schema.setup_instruments
where name like "wait/synch/mutex/%";
count(*) > 0
1
-show status like "performance_schema_mutex_classes_lost";
+show global status like "performance_schema_mutex_classes_lost";
Variable_name Value
Performance_schema_mutex_classes_lost 0
-show variables like "performance_schema_max_mutex_instances";
+show global variables like "performance_schema_max_mutex_instances";
Variable_name Value
performance_schema_max_mutex_instances 0
select count(*) from performance_schema.mutex_instances;
diff --git a/mysql-test/suite/perfschema/r/start_server_no_prepared_stmts_instances.result b/mysql-test/suite/perfschema/r/start_server_no_prepared_stmts_instances.result
new file mode 100644
index 00000000000..32356175e82
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/start_server_no_prepared_stmts_instances.result
@@ -0,0 +1,212 @@
+show databases;
+Database
+information_schema
+mtr
+mysql
+performance_schema
+test
+select count(*) from performance_schema.performance_timers;
+count(*)
+5
+select count(*) from performance_schema.setup_consumers;
+count(*)
+15
+select count(*) > 4 from performance_schema.setup_instruments;
+count(*) > 4
+1
+select count(*) from performance_schema.setup_timers;
+count(*)
+5
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release
+select * from performance_schema.accounts;
+select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_digest;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_transactions_current;
+select * from performance_schema.events_transactions_history;
+select * from performance_schema.events_transactions_history_long;
+select * from performance_schema.events_transactions_summary_by_account_by_event_name;
+select * from performance_schema.events_transactions_summary_by_host_by_event_name;
+select * from performance_schema.events_transactions_summary_by_thread_by_event_name;
+select * from performance_schema.events_transactions_summary_by_user_by_event_name;
+select * from performance_schema.events_transactions_summary_global_by_event_name;
+select * from performance_schema.events_waits_current;
+select * from performance_schema.events_waits_history;
+select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+select * from performance_schema.events_waits_summary_by_instance;
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.file_instances;
+select * from performance_schema.file_summary_by_event_name;
+select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.hosts;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.metadata_locks;
+select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
+select * from performance_schema.performance_timers;
+select * from performance_schema.rwlock_instances;
+select * from performance_schema.session_account_connect_attrs;
+select * from performance_schema.session_connect_attrs;
+select * from performance_schema.setup_actors;
+select * from performance_schema.setup_consumers;
+select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
+select * from performance_schema.setup_timers;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.table_handles;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
+select * from performance_schema.threads;
+select * from performance_schema.users;
+select * from performance_schema.replication_connection_configuration;
+select * from performance_schema.replication_applier_configuration;
+select * from performance_schema.replication_applier_status;
+select * from performance_schema.replication_applier_status_by_coordinator;
+select * from performance_schema.global_status;
+select * from performance_schema.status_by_thread;
+select * from performance_schema.status_by_user;
+select * from performance_schema.status_by_host;
+select * from performance_schema.status_by_account;
+select * from performance_schema.session_status;
+show global variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_transactions_history_long_size 1000
+performance_schema_events_transactions_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 90
+performance_schema_max_cond_instances 1000
+performance_schema_max_digest_length 1024
+performance_schema_max_file_classes 80
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_index_stat 5000
+performance_schema_max_memory_classes 320
+performance_schema_max_metadata_locks 10000
+performance_schema_max_mutex_classes 210
+performance_schema_max_mutex_instances 5000
+performance_schema_max_prepared_statements_instances 0
+performance_schema_max_program_instances 5000
+performance_schema_max_rwlock_classes 50
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_sql_text_length 1024
+performance_schema_max_stage_classes 160
+performance_schema_max_statement_classes 222
+performance_schema_max_statement_stack 10
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_table_lock_stat 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_session_connect_attrs_size 2048
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
+show engine PERFORMANCE_SCHEMA status;
+show global status like "performance_schema%";
+CREATE DATABASE db;
+USE db;
+show global variables like "performance_schema_max_prepared_statements_instances";
+Variable_name Value
+performance_schema_max_prepared_statements_instances 0
+select count(*) from performance_schema.prepared_statements_instances;
+count(*)
+0
+truncate table performance_schema.prepared_statements_instances;
+CREATE TABLE t1 (a INT NOT NULL);
+INSERT INTO t1 VALUES (4), (8), (11), (32), (80);
+PREPARE st1 FROM 'SELECT SQRT(POW(?,2) + POW(?,2)) AS hypotenuse';
+SET @table = 't1';
+SET @s = CONCAT('SELECT * FROM ', @table);
+PREPARE st2 FROM @s;
+PREPARE st3 FROM 'INSERT INTO t1 SELECT * FROM t1 WHERE a<=?';
+PREPARE st4 FROM
+'(SELECT a FROM t1) UNION (SELECT a+10 FROM t1) ORDER BY RAND()*0+a';
+show global status like "%performance_schema_prepared_statements_lost%";
+Variable_name Value
+Performance_schema_prepared_statements_lost 4
+SET @a = 3;
+SET @b = 4;
+EXECUTE st1 USING @a, @b;
+hypotenuse
+5
+EXECUTE st2;
+a
+4
+8
+11
+32
+80
+SET @c=3;
+EXECUTE st3 using @c;
+EXECUTE st4;
+a
+4
+8
+11
+14
+18
+21
+32
+42
+80
+90
+show global status like "%performance_schema_prepared_statements_lost%";
+Variable_name Value
+Performance_schema_prepared_statements_lost 4
+DEALLOCATE PREPARE st1;
+DEALLOCATE PREPARE st2;
+DEALLOCATE PREPARE st3;
+DEALLOCATE PREPARE st4;
+DROP TABLE t1;
+show global status like "%performance_schema_prepared_statements_lost%";
+Variable_name Value
+Performance_schema_prepared_statements_lost 4
+flush status;
+show global status like "%performance_schema_prepared_statements_lost%";
+Variable_name Value
+Performance_schema_prepared_statements_lost 0
+DROP DATABASE db;
diff --git a/mysql-test/suite/perfschema/r/start_server_no_rwlock_class.result b/mysql-test/suite/perfschema/r/start_server_no_rwlock_class.result
index c3939ced060..75ebff83745 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_rwlock_class.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_rwlock_class.result
@@ -10,16 +10,144 @@ count(*)
5
select count(*) from performance_schema.setup_consumers;
count(*)
-12
-select count(*) > 3 from performance_schema.setup_instruments;
-count(*) > 3
+15
+select count(*) > 4 from performance_schema.setup_instruments;
+count(*) > 4
1
select count(*) from performance_schema.setup_timers;
count(*)
-4
+5
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release
+select * from performance_schema.accounts;
+select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_digest;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_transactions_current;
+select * from performance_schema.events_transactions_history;
+select * from performance_schema.events_transactions_history_long;
+select * from performance_schema.events_transactions_summary_by_account_by_event_name;
+select * from performance_schema.events_transactions_summary_by_host_by_event_name;
+select * from performance_schema.events_transactions_summary_by_thread_by_event_name;
+select * from performance_schema.events_transactions_summary_by_user_by_event_name;
+select * from performance_schema.events_transactions_summary_global_by_event_name;
+select * from performance_schema.events_waits_current;
+select * from performance_schema.events_waits_history;
+select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+select * from performance_schema.events_waits_summary_by_instance;
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.file_instances;
+select * from performance_schema.file_summary_by_event_name;
+select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.hosts;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.metadata_locks;
+select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
+select * from performance_schema.performance_timers;
+select * from performance_schema.rwlock_instances;
+select * from performance_schema.session_account_connect_attrs;
+select * from performance_schema.session_connect_attrs;
+select * from performance_schema.setup_actors;
+select * from performance_schema.setup_consumers;
+select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
+select * from performance_schema.setup_timers;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.table_handles;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
+select * from performance_schema.threads;
+select * from performance_schema.users;
+select * from performance_schema.replication_connection_configuration;
+select * from performance_schema.replication_applier_configuration;
+select * from performance_schema.replication_applier_status;
+select * from performance_schema.replication_applier_status_by_coordinator;
+select * from performance_schema.global_status;
+select * from performance_schema.status_by_thread;
+select * from performance_schema.status_by_user;
+select * from performance_schema.status_by_host;
+select * from performance_schema.status_by_account;
+select * from performance_schema.session_status;
+show global variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_transactions_history_long_size 1000
+performance_schema_events_transactions_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 90
+performance_schema_max_cond_instances 1000
+performance_schema_max_digest_length 1024
+performance_schema_max_file_classes 80
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_index_stat 5000
+performance_schema_max_memory_classes 320
+performance_schema_max_metadata_locks 10000
+performance_schema_max_mutex_classes 210
+performance_schema_max_mutex_instances 5000
+performance_schema_max_prepared_statements_instances 100
+performance_schema_max_program_instances 5000
+performance_schema_max_rwlock_classes 0
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_sql_text_length 1024
+performance_schema_max_stage_classes 160
+performance_schema_max_statement_classes 222
+performance_schema_max_statement_stack 10
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_table_lock_stat 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_session_connect_attrs_size 2048
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
-show status like "performance_schema%";
-show variables like "performance_schema_max_rwlock_classes";
+show global status like "performance_schema%";
+show global variables like "performance_schema_max_rwlock_classes";
Variable_name Value
performance_schema_max_rwlock_classes 0
select count(*) from performance_schema.setup_instruments
@@ -33,6 +161,6 @@ variable_value > 0
select count(*) from performance_schema.rwlock_instances;
count(*)
0
-show status like "performance_schema_rwlock_instances_lost";
+show global status like "performance_schema_rwlock_instances_lost";
Variable_name Value
Performance_schema_rwlock_instances_lost 0
diff --git a/mysql-test/suite/perfschema/r/start_server_no_rwlock_inst.result b/mysql-test/suite/perfschema/r/start_server_no_rwlock_inst.result
index 7892c6ba753..d7ebfb33d5b 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_rwlock_inst.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_rwlock_inst.result
@@ -10,26 +10,154 @@ count(*)
5
select count(*) from performance_schema.setup_consumers;
count(*)
-12
-select count(*) > 3 from performance_schema.setup_instruments;
-count(*) > 3
+15
+select count(*) > 4 from performance_schema.setup_instruments;
+count(*) > 4
1
select count(*) from performance_schema.setup_timers;
count(*)
-4
+5
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release
+select * from performance_schema.accounts;
+select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_digest;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_transactions_current;
+select * from performance_schema.events_transactions_history;
+select * from performance_schema.events_transactions_history_long;
+select * from performance_schema.events_transactions_summary_by_account_by_event_name;
+select * from performance_schema.events_transactions_summary_by_host_by_event_name;
+select * from performance_schema.events_transactions_summary_by_thread_by_event_name;
+select * from performance_schema.events_transactions_summary_by_user_by_event_name;
+select * from performance_schema.events_transactions_summary_global_by_event_name;
+select * from performance_schema.events_waits_current;
+select * from performance_schema.events_waits_history;
+select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+select * from performance_schema.events_waits_summary_by_instance;
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.file_instances;
+select * from performance_schema.file_summary_by_event_name;
+select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.hosts;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.metadata_locks;
+select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
+select * from performance_schema.performance_timers;
+select * from performance_schema.rwlock_instances;
+select * from performance_schema.session_account_connect_attrs;
+select * from performance_schema.session_connect_attrs;
+select * from performance_schema.setup_actors;
+select * from performance_schema.setup_consumers;
+select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
+select * from performance_schema.setup_timers;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.table_handles;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
+select * from performance_schema.threads;
+select * from performance_schema.users;
+select * from performance_schema.replication_connection_configuration;
+select * from performance_schema.replication_applier_configuration;
+select * from performance_schema.replication_applier_status;
+select * from performance_schema.replication_applier_status_by_coordinator;
+select * from performance_schema.global_status;
+select * from performance_schema.status_by_thread;
+select * from performance_schema.status_by_user;
+select * from performance_schema.status_by_host;
+select * from performance_schema.status_by_account;
+select * from performance_schema.session_status;
+show global variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_transactions_history_long_size 1000
+performance_schema_events_transactions_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 90
+performance_schema_max_cond_instances 1000
+performance_schema_max_digest_length 1024
+performance_schema_max_file_classes 80
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_index_stat 5000
+performance_schema_max_memory_classes 320
+performance_schema_max_metadata_locks 10000
+performance_schema_max_mutex_classes 210
+performance_schema_max_mutex_instances 5000
+performance_schema_max_prepared_statements_instances 100
+performance_schema_max_program_instances 5000
+performance_schema_max_rwlock_classes 50
+performance_schema_max_rwlock_instances 0
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_sql_text_length 1024
+performance_schema_max_stage_classes 160
+performance_schema_max_statement_classes 222
+performance_schema_max_statement_stack 10
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_table_lock_stat 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_session_connect_attrs_size 2048
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
-show status like "performance_schema%";
-show variables like "performance_schema_max_rwlock_classes";
+show global status like "performance_schema%";
+show global variables like "performance_schema_max_rwlock_classes";
Variable_name Value
-performance_schema_max_rwlock_classes 40
+performance_schema_max_rwlock_classes 50
select count(*) > 0 from performance_schema.setup_instruments
where name like "wait/synch/rwlock/%";
count(*) > 0
1
-show status like "performance_schema_rwlock_classes_lost";
+show global status like "performance_schema_rwlock_classes_lost";
Variable_name Value
Performance_schema_rwlock_classes_lost 0
-show variables like "performance_schema_max_rwlock_instances";
+show global variables like "performance_schema_max_rwlock_instances";
Variable_name Value
performance_schema_max_rwlock_instances 0
select count(*) from performance_schema.rwlock_instances;
diff --git a/mysql-test/suite/perfschema/r/start_server_no_setup_actors.result b/mysql-test/suite/perfschema/r/start_server_no_setup_actors.result
index 24b0ee16685..b4b79d02b32 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_setup_actors.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_setup_actors.result
@@ -10,16 +10,144 @@ count(*)
5
select count(*) from performance_schema.setup_consumers;
count(*)
-12
-select count(*) > 3 from performance_schema.setup_instruments;
-count(*) > 3
+15
+select count(*) > 4 from performance_schema.setup_instruments;
+count(*) > 4
1
select count(*) from performance_schema.setup_timers;
count(*)
-4
+5
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release
+select * from performance_schema.accounts;
+select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_digest;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_transactions_current;
+select * from performance_schema.events_transactions_history;
+select * from performance_schema.events_transactions_history_long;
+select * from performance_schema.events_transactions_summary_by_account_by_event_name;
+select * from performance_schema.events_transactions_summary_by_host_by_event_name;
+select * from performance_schema.events_transactions_summary_by_thread_by_event_name;
+select * from performance_schema.events_transactions_summary_by_user_by_event_name;
+select * from performance_schema.events_transactions_summary_global_by_event_name;
+select * from performance_schema.events_waits_current;
+select * from performance_schema.events_waits_history;
+select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+select * from performance_schema.events_waits_summary_by_instance;
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.file_instances;
+select * from performance_schema.file_summary_by_event_name;
+select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.hosts;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.metadata_locks;
+select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
+select * from performance_schema.performance_timers;
+select * from performance_schema.rwlock_instances;
+select * from performance_schema.session_account_connect_attrs;
+select * from performance_schema.session_connect_attrs;
+select * from performance_schema.setup_actors;
+select * from performance_schema.setup_consumers;
+select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
+select * from performance_schema.setup_timers;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.table_handles;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
+select * from performance_schema.threads;
+select * from performance_schema.users;
+select * from performance_schema.replication_connection_configuration;
+select * from performance_schema.replication_applier_configuration;
+select * from performance_schema.replication_applier_status;
+select * from performance_schema.replication_applier_status_by_coordinator;
+select * from performance_schema.global_status;
+select * from performance_schema.status_by_thread;
+select * from performance_schema.status_by_user;
+select * from performance_schema.status_by_host;
+select * from performance_schema.status_by_account;
+select * from performance_schema.session_status;
+show global variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_transactions_history_long_size 1000
+performance_schema_events_transactions_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 90
+performance_schema_max_cond_instances 1000
+performance_schema_max_digest_length 1024
+performance_schema_max_file_classes 80
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_index_stat 5000
+performance_schema_max_memory_classes 320
+performance_schema_max_metadata_locks 10000
+performance_schema_max_mutex_classes 210
+performance_schema_max_mutex_instances 5000
+performance_schema_max_prepared_statements_instances 100
+performance_schema_max_program_instances 5000
+performance_schema_max_rwlock_classes 50
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_sql_text_length 1024
+performance_schema_max_stage_classes 160
+performance_schema_max_statement_classes 222
+performance_schema_max_statement_stack 10
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_table_lock_stat 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_session_connect_attrs_size 2048
+performance_schema_setup_actors_size 0
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
-show status like "performance_schema%";
-show variables like "performance_schema_setup_actors_size";
+show global status like "performance_schema%";
+show global variables like "performance_schema_setup_actors_size";
Variable_name Value
performance_schema_setup_actors_size 0
select count(*) from performance_schema.setup_actors;
diff --git a/mysql-test/suite/perfschema/r/start_server_no_setup_objects.result b/mysql-test/suite/perfschema/r/start_server_no_setup_objects.result
index 630284c69be..aef0eb7c14d 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_setup_objects.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_setup_objects.result
@@ -10,16 +10,144 @@ count(*)
5
select count(*) from performance_schema.setup_consumers;
count(*)
-12
-select count(*) > 3 from performance_schema.setup_instruments;
-count(*) > 3
+15
+select count(*) > 4 from performance_schema.setup_instruments;
+count(*) > 4
1
select count(*) from performance_schema.setup_timers;
count(*)
-4
+5
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release
+select * from performance_schema.accounts;
+select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_digest;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_transactions_current;
+select * from performance_schema.events_transactions_history;
+select * from performance_schema.events_transactions_history_long;
+select * from performance_schema.events_transactions_summary_by_account_by_event_name;
+select * from performance_schema.events_transactions_summary_by_host_by_event_name;
+select * from performance_schema.events_transactions_summary_by_thread_by_event_name;
+select * from performance_schema.events_transactions_summary_by_user_by_event_name;
+select * from performance_schema.events_transactions_summary_global_by_event_name;
+select * from performance_schema.events_waits_current;
+select * from performance_schema.events_waits_history;
+select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+select * from performance_schema.events_waits_summary_by_instance;
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.file_instances;
+select * from performance_schema.file_summary_by_event_name;
+select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.hosts;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.metadata_locks;
+select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
+select * from performance_schema.performance_timers;
+select * from performance_schema.rwlock_instances;
+select * from performance_schema.session_account_connect_attrs;
+select * from performance_schema.session_connect_attrs;
+select * from performance_schema.setup_actors;
+select * from performance_schema.setup_consumers;
+select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
+select * from performance_schema.setup_timers;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.table_handles;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
+select * from performance_schema.threads;
+select * from performance_schema.users;
+select * from performance_schema.replication_connection_configuration;
+select * from performance_schema.replication_applier_configuration;
+select * from performance_schema.replication_applier_status;
+select * from performance_schema.replication_applier_status_by_coordinator;
+select * from performance_schema.global_status;
+select * from performance_schema.status_by_thread;
+select * from performance_schema.status_by_user;
+select * from performance_schema.status_by_host;
+select * from performance_schema.status_by_account;
+select * from performance_schema.session_status;
+show global variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_transactions_history_long_size 1000
+performance_schema_events_transactions_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 90
+performance_schema_max_cond_instances 1000
+performance_schema_max_digest_length 1024
+performance_schema_max_file_classes 80
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_index_stat 5000
+performance_schema_max_memory_classes 320
+performance_schema_max_metadata_locks 10000
+performance_schema_max_mutex_classes 210
+performance_schema_max_mutex_instances 5000
+performance_schema_max_prepared_statements_instances 100
+performance_schema_max_program_instances 5000
+performance_schema_max_rwlock_classes 50
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_sql_text_length 1024
+performance_schema_max_stage_classes 160
+performance_schema_max_statement_classes 222
+performance_schema_max_statement_stack 10
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_table_lock_stat 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_session_connect_attrs_size 2048
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 0
+performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
-show status like "performance_schema%";
-show variables like "performance_schema_setup_objects_size";
+show global status like "performance_schema%";
+show global variables like "performance_schema_setup_objects_size";
Variable_name Value
performance_schema_setup_objects_size 0
select count(*) from performance_schema.setup_objects;
diff --git a/mysql-test/suite/perfschema/r/start_server_no_socket_class.result b/mysql-test/suite/perfschema/r/start_server_no_socket_class.result
index 45e353a1372..4695c03dc34 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_socket_class.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_socket_class.result
@@ -10,16 +10,144 @@ count(*)
5
select count(*) from performance_schema.setup_consumers;
count(*)
-12
-select count(*) > 3 from performance_schema.setup_instruments;
-count(*) > 3
+15
+select count(*) > 4 from performance_schema.setup_instruments;
+count(*) > 4
1
select count(*) from performance_schema.setup_timers;
count(*)
-4
+5
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release
+select * from performance_schema.accounts;
+select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_digest;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_transactions_current;
+select * from performance_schema.events_transactions_history;
+select * from performance_schema.events_transactions_history_long;
+select * from performance_schema.events_transactions_summary_by_account_by_event_name;
+select * from performance_schema.events_transactions_summary_by_host_by_event_name;
+select * from performance_schema.events_transactions_summary_by_thread_by_event_name;
+select * from performance_schema.events_transactions_summary_by_user_by_event_name;
+select * from performance_schema.events_transactions_summary_global_by_event_name;
+select * from performance_schema.events_waits_current;
+select * from performance_schema.events_waits_history;
+select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+select * from performance_schema.events_waits_summary_by_instance;
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.file_instances;
+select * from performance_schema.file_summary_by_event_name;
+select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.hosts;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.metadata_locks;
+select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
+select * from performance_schema.performance_timers;
+select * from performance_schema.rwlock_instances;
+select * from performance_schema.session_account_connect_attrs;
+select * from performance_schema.session_connect_attrs;
+select * from performance_schema.setup_actors;
+select * from performance_schema.setup_consumers;
+select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
+select * from performance_schema.setup_timers;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.table_handles;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
+select * from performance_schema.threads;
+select * from performance_schema.users;
+select * from performance_schema.replication_connection_configuration;
+select * from performance_schema.replication_applier_configuration;
+select * from performance_schema.replication_applier_status;
+select * from performance_schema.replication_applier_status_by_coordinator;
+select * from performance_schema.global_status;
+select * from performance_schema.status_by_thread;
+select * from performance_schema.status_by_user;
+select * from performance_schema.status_by_host;
+select * from performance_schema.status_by_account;
+select * from performance_schema.session_status;
+show global variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_transactions_history_long_size 1000
+performance_schema_events_transactions_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 90
+performance_schema_max_cond_instances 1000
+performance_schema_max_digest_length 1024
+performance_schema_max_file_classes 80
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_index_stat 5000
+performance_schema_max_memory_classes 320
+performance_schema_max_metadata_locks 10000
+performance_schema_max_mutex_classes 210
+performance_schema_max_mutex_instances 5000
+performance_schema_max_prepared_statements_instances 100
+performance_schema_max_program_instances 5000
+performance_schema_max_rwlock_classes 50
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 0
+performance_schema_max_socket_instances 1000
+performance_schema_max_sql_text_length 1024
+performance_schema_max_stage_classes 160
+performance_schema_max_statement_classes 222
+performance_schema_max_statement_stack 10
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_table_lock_stat 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_session_connect_attrs_size 2048
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
-show status like "performance_schema%";
-show variables like "performance_schema_max_socket_classes";
+show global status like "performance_schema%";
+show global variables like "performance_schema_max_socket_classes";
Variable_name Value
performance_schema_max_socket_classes 0
select count(*) from performance_schema.setup_instruments
@@ -33,6 +161,6 @@ variable_value > 0
select count(*) from performance_schema.socket_instances;
count(*)
0
-show status like "performance_schema_socket_instances_lost";
+show global status like "performance_schema_socket_instances_lost";
Variable_name Value
Performance_schema_socket_instances_lost 0
diff --git a/mysql-test/suite/perfschema/r/start_server_no_socket_inst.result b/mysql-test/suite/perfschema/r/start_server_no_socket_inst.result
index 0c78ec66db9..45f668bd668 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_socket_inst.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_socket_inst.result
@@ -10,26 +10,154 @@ count(*)
5
select count(*) from performance_schema.setup_consumers;
count(*)
-12
-select count(*) > 3 from performance_schema.setup_instruments;
-count(*) > 3
+15
+select count(*) > 4 from performance_schema.setup_instruments;
+count(*) > 4
1
select count(*) from performance_schema.setup_timers;
count(*)
-4
+5
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release
+select * from performance_schema.accounts;
+select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_digest;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_transactions_current;
+select * from performance_schema.events_transactions_history;
+select * from performance_schema.events_transactions_history_long;
+select * from performance_schema.events_transactions_summary_by_account_by_event_name;
+select * from performance_schema.events_transactions_summary_by_host_by_event_name;
+select * from performance_schema.events_transactions_summary_by_thread_by_event_name;
+select * from performance_schema.events_transactions_summary_by_user_by_event_name;
+select * from performance_schema.events_transactions_summary_global_by_event_name;
+select * from performance_schema.events_waits_current;
+select * from performance_schema.events_waits_history;
+select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+select * from performance_schema.events_waits_summary_by_instance;
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.file_instances;
+select * from performance_schema.file_summary_by_event_name;
+select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.hosts;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.metadata_locks;
+select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
+select * from performance_schema.performance_timers;
+select * from performance_schema.rwlock_instances;
+select * from performance_schema.session_account_connect_attrs;
+select * from performance_schema.session_connect_attrs;
+select * from performance_schema.setup_actors;
+select * from performance_schema.setup_consumers;
+select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
+select * from performance_schema.setup_timers;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.table_handles;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
+select * from performance_schema.threads;
+select * from performance_schema.users;
+select * from performance_schema.replication_connection_configuration;
+select * from performance_schema.replication_applier_configuration;
+select * from performance_schema.replication_applier_status;
+select * from performance_schema.replication_applier_status_by_coordinator;
+select * from performance_schema.global_status;
+select * from performance_schema.status_by_thread;
+select * from performance_schema.status_by_user;
+select * from performance_schema.status_by_host;
+select * from performance_schema.status_by_account;
+select * from performance_schema.session_status;
+show global variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_transactions_history_long_size 1000
+performance_schema_events_transactions_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 90
+performance_schema_max_cond_instances 1000
+performance_schema_max_digest_length 1024
+performance_schema_max_file_classes 80
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_index_stat 5000
+performance_schema_max_memory_classes 320
+performance_schema_max_metadata_locks 10000
+performance_schema_max_mutex_classes 210
+performance_schema_max_mutex_instances 5000
+performance_schema_max_prepared_statements_instances 100
+performance_schema_max_program_instances 5000
+performance_schema_max_rwlock_classes 50
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 0
+performance_schema_max_sql_text_length 1024
+performance_schema_max_stage_classes 160
+performance_schema_max_statement_classes 222
+performance_schema_max_statement_stack 10
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_table_lock_stat 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_session_connect_attrs_size 2048
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
-show status like "performance_schema%";
-show variables like "performance_schema_max_socket_classes";
+show global status like "performance_schema%";
+show global variables like "performance_schema_max_socket_classes";
Variable_name Value
performance_schema_max_socket_classes 10
select count(*) > 0 from performance_schema.setup_instruments
where name like "wait/io/socket/%";
count(*) > 0
1
-show status like "performance_schema_socket_classes_lost";
+show global status like "performance_schema_socket_classes_lost";
Variable_name Value
Performance_schema_socket_classes_lost 0
-show variables like "performance_schema_max_socket_instances";
+show global variables like "performance_schema_max_socket_instances";
Variable_name Value
performance_schema_max_socket_instances 0
select count(*) from performance_schema.socket_instances;
diff --git a/mysql-test/suite/perfschema/r/start_server_no_stage_class.result b/mysql-test/suite/perfschema/r/start_server_no_stage_class.result
index f3e95c3ac7b..cccc88ea078 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_stage_class.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_stage_class.result
@@ -10,16 +10,144 @@ count(*)
5
select count(*) from performance_schema.setup_consumers;
count(*)
-12
-select count(*) > 3 from performance_schema.setup_instruments;
-count(*) > 3
+15
+select count(*) > 4 from performance_schema.setup_instruments;
+count(*) > 4
1
select count(*) from performance_schema.setup_timers;
count(*)
-4
+5
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release
+select * from performance_schema.accounts;
+select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_digest;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_transactions_current;
+select * from performance_schema.events_transactions_history;
+select * from performance_schema.events_transactions_history_long;
+select * from performance_schema.events_transactions_summary_by_account_by_event_name;
+select * from performance_schema.events_transactions_summary_by_host_by_event_name;
+select * from performance_schema.events_transactions_summary_by_thread_by_event_name;
+select * from performance_schema.events_transactions_summary_by_user_by_event_name;
+select * from performance_schema.events_transactions_summary_global_by_event_name;
+select * from performance_schema.events_waits_current;
+select * from performance_schema.events_waits_history;
+select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+select * from performance_schema.events_waits_summary_by_instance;
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.file_instances;
+select * from performance_schema.file_summary_by_event_name;
+select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.hosts;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.metadata_locks;
+select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
+select * from performance_schema.performance_timers;
+select * from performance_schema.rwlock_instances;
+select * from performance_schema.session_account_connect_attrs;
+select * from performance_schema.session_connect_attrs;
+select * from performance_schema.setup_actors;
+select * from performance_schema.setup_consumers;
+select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
+select * from performance_schema.setup_timers;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.table_handles;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
+select * from performance_schema.threads;
+select * from performance_schema.users;
+select * from performance_schema.replication_connection_configuration;
+select * from performance_schema.replication_applier_configuration;
+select * from performance_schema.replication_applier_status;
+select * from performance_schema.replication_applier_status_by_coordinator;
+select * from performance_schema.global_status;
+select * from performance_schema.status_by_thread;
+select * from performance_schema.status_by_user;
+select * from performance_schema.status_by_host;
+select * from performance_schema.status_by_account;
+select * from performance_schema.session_status;
+show global variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_transactions_history_long_size 1000
+performance_schema_events_transactions_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 90
+performance_schema_max_cond_instances 1000
+performance_schema_max_digest_length 1024
+performance_schema_max_file_classes 80
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_index_stat 5000
+performance_schema_max_memory_classes 320
+performance_schema_max_metadata_locks 10000
+performance_schema_max_mutex_classes 210
+performance_schema_max_mutex_instances 5000
+performance_schema_max_prepared_statements_instances 100
+performance_schema_max_program_instances 5000
+performance_schema_max_rwlock_classes 50
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_sql_text_length 1024
+performance_schema_max_stage_classes 0
+performance_schema_max_statement_classes 222
+performance_schema_max_statement_stack 10
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_table_lock_stat 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_session_connect_attrs_size 2048
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
-show status like "performance_schema%";
-show variables like "performance_schema_max_stage_classes";
+show global status like "performance_schema%";
+show global variables like "performance_schema_max_stage_classes";
Variable_name Value
performance_schema_max_stage_classes 0
select count(*) from performance_schema.setup_instruments
diff --git a/mysql-test/suite/perfschema/r/start_server_no_stages_history.result b/mysql-test/suite/perfschema/r/start_server_no_stages_history.result
index 2e5005323dd..3631b3e401f 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_stages_history.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_stages_history.result
@@ -10,16 +10,144 @@ count(*)
5
select count(*) from performance_schema.setup_consumers;
count(*)
-12
-select count(*) > 3 from performance_schema.setup_instruments;
-count(*) > 3
+15
+select count(*) > 4 from performance_schema.setup_instruments;
+count(*) > 4
1
select count(*) from performance_schema.setup_timers;
count(*)
-4
+5
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release
+select * from performance_schema.accounts;
+select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_digest;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_transactions_current;
+select * from performance_schema.events_transactions_history;
+select * from performance_schema.events_transactions_history_long;
+select * from performance_schema.events_transactions_summary_by_account_by_event_name;
+select * from performance_schema.events_transactions_summary_by_host_by_event_name;
+select * from performance_schema.events_transactions_summary_by_thread_by_event_name;
+select * from performance_schema.events_transactions_summary_by_user_by_event_name;
+select * from performance_schema.events_transactions_summary_global_by_event_name;
+select * from performance_schema.events_waits_current;
+select * from performance_schema.events_waits_history;
+select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+select * from performance_schema.events_waits_summary_by_instance;
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.file_instances;
+select * from performance_schema.file_summary_by_event_name;
+select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.hosts;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.metadata_locks;
+select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
+select * from performance_schema.performance_timers;
+select * from performance_schema.rwlock_instances;
+select * from performance_schema.session_account_connect_attrs;
+select * from performance_schema.session_connect_attrs;
+select * from performance_schema.setup_actors;
+select * from performance_schema.setup_consumers;
+select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
+select * from performance_schema.setup_timers;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.table_handles;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
+select * from performance_schema.threads;
+select * from performance_schema.users;
+select * from performance_schema.replication_connection_configuration;
+select * from performance_schema.replication_applier_configuration;
+select * from performance_schema.replication_applier_status;
+select * from performance_schema.replication_applier_status_by_coordinator;
+select * from performance_schema.global_status;
+select * from performance_schema.status_by_thread;
+select * from performance_schema.status_by_user;
+select * from performance_schema.status_by_host;
+select * from performance_schema.status_by_account;
+select * from performance_schema.session_status;
+show global variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 0
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_transactions_history_long_size 1000
+performance_schema_events_transactions_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 90
+performance_schema_max_cond_instances 1000
+performance_schema_max_digest_length 1024
+performance_schema_max_file_classes 80
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_index_stat 5000
+performance_schema_max_memory_classes 320
+performance_schema_max_metadata_locks 10000
+performance_schema_max_mutex_classes 210
+performance_schema_max_mutex_instances 5000
+performance_schema_max_prepared_statements_instances 100
+performance_schema_max_program_instances 5000
+performance_schema_max_rwlock_classes 50
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_sql_text_length 1024
+performance_schema_max_stage_classes 160
+performance_schema_max_statement_classes 222
+performance_schema_max_statement_stack 10
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_table_lock_stat 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_session_connect_attrs_size 2048
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
-show status like "performance_schema%";
-show variables like "performance_schema_events_stages_history_size";
+show global status like "performance_schema%";
+show global variables like "performance_schema_events_stages_history_size";
Variable_name Value
performance_schema_events_stages_history_size 0
select count(*) from performance_schema.events_stages_history;
diff --git a/mysql-test/suite/perfschema/r/start_server_no_stages_history_long.result b/mysql-test/suite/perfschema/r/start_server_no_stages_history_long.result
index cb29a5812fc..bb17a80d853 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_stages_history_long.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_stages_history_long.result
@@ -10,16 +10,144 @@ count(*)
5
select count(*) from performance_schema.setup_consumers;
count(*)
-12
-select count(*) > 3 from performance_schema.setup_instruments;
-count(*) > 3
+15
+select count(*) > 4 from performance_schema.setup_instruments;
+count(*) > 4
1
select count(*) from performance_schema.setup_timers;
count(*)
-4
+5
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release
+select * from performance_schema.accounts;
+select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_digest;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_transactions_current;
+select * from performance_schema.events_transactions_history;
+select * from performance_schema.events_transactions_history_long;
+select * from performance_schema.events_transactions_summary_by_account_by_event_name;
+select * from performance_schema.events_transactions_summary_by_host_by_event_name;
+select * from performance_schema.events_transactions_summary_by_thread_by_event_name;
+select * from performance_schema.events_transactions_summary_by_user_by_event_name;
+select * from performance_schema.events_transactions_summary_global_by_event_name;
+select * from performance_schema.events_waits_current;
+select * from performance_schema.events_waits_history;
+select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+select * from performance_schema.events_waits_summary_by_instance;
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.file_instances;
+select * from performance_schema.file_summary_by_event_name;
+select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.hosts;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.metadata_locks;
+select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
+select * from performance_schema.performance_timers;
+select * from performance_schema.rwlock_instances;
+select * from performance_schema.session_account_connect_attrs;
+select * from performance_schema.session_connect_attrs;
+select * from performance_schema.setup_actors;
+select * from performance_schema.setup_consumers;
+select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
+select * from performance_schema.setup_timers;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.table_handles;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
+select * from performance_schema.threads;
+select * from performance_schema.users;
+select * from performance_schema.replication_connection_configuration;
+select * from performance_schema.replication_applier_configuration;
+select * from performance_schema.replication_applier_status;
+select * from performance_schema.replication_applier_status_by_coordinator;
+select * from performance_schema.global_status;
+select * from performance_schema.status_by_thread;
+select * from performance_schema.status_by_user;
+select * from performance_schema.status_by_host;
+select * from performance_schema.status_by_account;
+select * from performance_schema.session_status;
+show global variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 0
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_transactions_history_long_size 1000
+performance_schema_events_transactions_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 90
+performance_schema_max_cond_instances 1000
+performance_schema_max_digest_length 1024
+performance_schema_max_file_classes 80
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_index_stat 5000
+performance_schema_max_memory_classes 320
+performance_schema_max_metadata_locks 10000
+performance_schema_max_mutex_classes 210
+performance_schema_max_mutex_instances 5000
+performance_schema_max_prepared_statements_instances 100
+performance_schema_max_program_instances 5000
+performance_schema_max_rwlock_classes 50
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_sql_text_length 1024
+performance_schema_max_stage_classes 160
+performance_schema_max_statement_classes 222
+performance_schema_max_statement_stack 10
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_table_lock_stat 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_session_connect_attrs_size 2048
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
-show status like "performance_schema%";
-show variables like "performance_schema_events_stages_history_long_size";
+show global status like "performance_schema%";
+show global variables like "performance_schema_events_stages_history_long_size";
Variable_name Value
performance_schema_events_stages_history_long_size 0
select count(*) from performance_schema.events_stages_history_long;
diff --git a/mysql-test/suite/perfschema/r/start_server_no_statement_class.result b/mysql-test/suite/perfschema/r/start_server_no_statement_class.result
index d62b4ba1daa..61cf11f2238 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_statement_class.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_statement_class.result
@@ -10,16 +10,144 @@ count(*)
5
select count(*) from performance_schema.setup_consumers;
count(*)
-12
-select count(*) > 3 from performance_schema.setup_instruments;
-count(*) > 3
+15
+select count(*) > 4 from performance_schema.setup_instruments;
+count(*) > 4
1
select count(*) from performance_schema.setup_timers;
count(*)
-4
+5
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release
+select * from performance_schema.accounts;
+select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_digest;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_transactions_current;
+select * from performance_schema.events_transactions_history;
+select * from performance_schema.events_transactions_history_long;
+select * from performance_schema.events_transactions_summary_by_account_by_event_name;
+select * from performance_schema.events_transactions_summary_by_host_by_event_name;
+select * from performance_schema.events_transactions_summary_by_thread_by_event_name;
+select * from performance_schema.events_transactions_summary_by_user_by_event_name;
+select * from performance_schema.events_transactions_summary_global_by_event_name;
+select * from performance_schema.events_waits_current;
+select * from performance_schema.events_waits_history;
+select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+select * from performance_schema.events_waits_summary_by_instance;
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.file_instances;
+select * from performance_schema.file_summary_by_event_name;
+select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.hosts;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.metadata_locks;
+select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
+select * from performance_schema.performance_timers;
+select * from performance_schema.rwlock_instances;
+select * from performance_schema.session_account_connect_attrs;
+select * from performance_schema.session_connect_attrs;
+select * from performance_schema.setup_actors;
+select * from performance_schema.setup_consumers;
+select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
+select * from performance_schema.setup_timers;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.table_handles;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
+select * from performance_schema.threads;
+select * from performance_schema.users;
+select * from performance_schema.replication_connection_configuration;
+select * from performance_schema.replication_applier_configuration;
+select * from performance_schema.replication_applier_status;
+select * from performance_schema.replication_applier_status_by_coordinator;
+select * from performance_schema.global_status;
+select * from performance_schema.status_by_thread;
+select * from performance_schema.status_by_user;
+select * from performance_schema.status_by_host;
+select * from performance_schema.status_by_account;
+select * from performance_schema.session_status;
+show global variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_transactions_history_long_size 1000
+performance_schema_events_transactions_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 90
+performance_schema_max_cond_instances 1000
+performance_schema_max_digest_length 1024
+performance_schema_max_file_classes 80
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_index_stat 5000
+performance_schema_max_memory_classes 320
+performance_schema_max_metadata_locks 10000
+performance_schema_max_mutex_classes 210
+performance_schema_max_mutex_instances 5000
+performance_schema_max_prepared_statements_instances 100
+performance_schema_max_program_instances 5000
+performance_schema_max_rwlock_classes 50
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_sql_text_length 1024
+performance_schema_max_stage_classes 160
+performance_schema_max_statement_classes 0
+performance_schema_max_statement_stack 10
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_table_lock_stat 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_session_connect_attrs_size 2048
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
-show status like "performance_schema%";
-show variables like "performance_schema_max_statement_classes";
+show global status like "performance_schema%";
+show global variables like "performance_schema_max_statement_classes";
Variable_name Value
performance_schema_max_statement_classes 0
select count(*) from performance_schema.setup_instruments
diff --git a/mysql-test/suite/perfschema/r/start_server_no_statements_history.result b/mysql-test/suite/perfschema/r/start_server_no_statements_history.result
index ed4b2870e6d..94811c40c53 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_statements_history.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_statements_history.result
@@ -10,16 +10,144 @@ count(*)
5
select count(*) from performance_schema.setup_consumers;
count(*)
-12
-select count(*) > 3 from performance_schema.setup_instruments;
-count(*) > 3
+15
+select count(*) > 4 from performance_schema.setup_instruments;
+count(*) > 4
1
select count(*) from performance_schema.setup_timers;
count(*)
-4
+5
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release
+select * from performance_schema.accounts;
+select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_digest;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_transactions_current;
+select * from performance_schema.events_transactions_history;
+select * from performance_schema.events_transactions_history_long;
+select * from performance_schema.events_transactions_summary_by_account_by_event_name;
+select * from performance_schema.events_transactions_summary_by_host_by_event_name;
+select * from performance_schema.events_transactions_summary_by_thread_by_event_name;
+select * from performance_schema.events_transactions_summary_by_user_by_event_name;
+select * from performance_schema.events_transactions_summary_global_by_event_name;
+select * from performance_schema.events_waits_current;
+select * from performance_schema.events_waits_history;
+select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+select * from performance_schema.events_waits_summary_by_instance;
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.file_instances;
+select * from performance_schema.file_summary_by_event_name;
+select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.hosts;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.metadata_locks;
+select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
+select * from performance_schema.performance_timers;
+select * from performance_schema.rwlock_instances;
+select * from performance_schema.session_account_connect_attrs;
+select * from performance_schema.session_connect_attrs;
+select * from performance_schema.setup_actors;
+select * from performance_schema.setup_consumers;
+select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
+select * from performance_schema.setup_timers;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.table_handles;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
+select * from performance_schema.threads;
+select * from performance_schema.users;
+select * from performance_schema.replication_connection_configuration;
+select * from performance_schema.replication_applier_configuration;
+select * from performance_schema.replication_applier_status;
+select * from performance_schema.replication_applier_status_by_coordinator;
+select * from performance_schema.global_status;
+select * from performance_schema.status_by_thread;
+select * from performance_schema.status_by_user;
+select * from performance_schema.status_by_host;
+select * from performance_schema.status_by_account;
+select * from performance_schema.session_status;
+show global variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 0
+performance_schema_events_transactions_history_long_size 1000
+performance_schema_events_transactions_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 90
+performance_schema_max_cond_instances 1000
+performance_schema_max_digest_length 1024
+performance_schema_max_file_classes 80
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_index_stat 5000
+performance_schema_max_memory_classes 320
+performance_schema_max_metadata_locks 10000
+performance_schema_max_mutex_classes 210
+performance_schema_max_mutex_instances 5000
+performance_schema_max_prepared_statements_instances 100
+performance_schema_max_program_instances 5000
+performance_schema_max_rwlock_classes 50
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_sql_text_length 1024
+performance_schema_max_stage_classes 160
+performance_schema_max_statement_classes 222
+performance_schema_max_statement_stack 10
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_table_lock_stat 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_session_connect_attrs_size 2048
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
-show status like "performance_schema%";
-show variables like "performance_schema_events_statements_history_size";
+show global status like "performance_schema%";
+show global variables like "performance_schema_events_statements_history_size";
Variable_name Value
performance_schema_events_statements_history_size 0
select count(*) from performance_schema.events_statements_history;
diff --git a/mysql-test/suite/perfschema/r/start_server_no_statements_history_long.result b/mysql-test/suite/perfschema/r/start_server_no_statements_history_long.result
index a48d5fa9339..4d61bf58fca 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_statements_history_long.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_statements_history_long.result
@@ -10,16 +10,144 @@ count(*)
5
select count(*) from performance_schema.setup_consumers;
count(*)
-12
-select count(*) > 3 from performance_schema.setup_instruments;
-count(*) > 3
+15
+select count(*) > 4 from performance_schema.setup_instruments;
+count(*) > 4
1
select count(*) from performance_schema.setup_timers;
count(*)
-4
+5
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release
+select * from performance_schema.accounts;
+select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_digest;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_transactions_current;
+select * from performance_schema.events_transactions_history;
+select * from performance_schema.events_transactions_history_long;
+select * from performance_schema.events_transactions_summary_by_account_by_event_name;
+select * from performance_schema.events_transactions_summary_by_host_by_event_name;
+select * from performance_schema.events_transactions_summary_by_thread_by_event_name;
+select * from performance_schema.events_transactions_summary_by_user_by_event_name;
+select * from performance_schema.events_transactions_summary_global_by_event_name;
+select * from performance_schema.events_waits_current;
+select * from performance_schema.events_waits_history;
+select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+select * from performance_schema.events_waits_summary_by_instance;
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.file_instances;
+select * from performance_schema.file_summary_by_event_name;
+select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.hosts;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.metadata_locks;
+select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
+select * from performance_schema.performance_timers;
+select * from performance_schema.rwlock_instances;
+select * from performance_schema.session_account_connect_attrs;
+select * from performance_schema.session_connect_attrs;
+select * from performance_schema.setup_actors;
+select * from performance_schema.setup_consumers;
+select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
+select * from performance_schema.setup_timers;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.table_handles;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
+select * from performance_schema.threads;
+select * from performance_schema.users;
+select * from performance_schema.replication_connection_configuration;
+select * from performance_schema.replication_applier_configuration;
+select * from performance_schema.replication_applier_status;
+select * from performance_schema.replication_applier_status_by_coordinator;
+select * from performance_schema.global_status;
+select * from performance_schema.status_by_thread;
+select * from performance_schema.status_by_user;
+select * from performance_schema.status_by_host;
+select * from performance_schema.status_by_account;
+select * from performance_schema.session_status;
+show global variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 0
+performance_schema_events_statements_history_size 10
+performance_schema_events_transactions_history_long_size 1000
+performance_schema_events_transactions_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 90
+performance_schema_max_cond_instances 1000
+performance_schema_max_digest_length 1024
+performance_schema_max_file_classes 80
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_index_stat 5000
+performance_schema_max_memory_classes 320
+performance_schema_max_metadata_locks 10000
+performance_schema_max_mutex_classes 210
+performance_schema_max_mutex_instances 5000
+performance_schema_max_prepared_statements_instances 100
+performance_schema_max_program_instances 5000
+performance_schema_max_rwlock_classes 50
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_sql_text_length 1024
+performance_schema_max_stage_classes 160
+performance_schema_max_statement_classes 222
+performance_schema_max_statement_stack 10
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_table_lock_stat 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_session_connect_attrs_size 2048
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
-show status like "performance_schema%";
-show variables like "performance_schema_events_statements_history_long_size";
+show global status like "performance_schema%";
+show global variables like "performance_schema_events_statements_history_long_size";
Variable_name Value
performance_schema_events_statements_history_long_size 0
select count(*) from performance_schema.events_statements_history_long;
diff --git a/mysql-test/suite/perfschema/r/start_server_no_table_hdl.result b/mysql-test/suite/perfschema/r/start_server_no_table_hdl.result
index 5bc38231122..49b59cbc48c 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_table_hdl.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_table_hdl.result
@@ -10,19 +10,147 @@ count(*)
5
select count(*) from performance_schema.setup_consumers;
count(*)
-12
-select count(*) > 3 from performance_schema.setup_instruments;
-count(*) > 3
+15
+select count(*) > 4 from performance_schema.setup_instruments;
+count(*) > 4
1
select count(*) from performance_schema.setup_timers;
count(*)
-4
+5
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release
+select * from performance_schema.accounts;
+select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_digest;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_transactions_current;
+select * from performance_schema.events_transactions_history;
+select * from performance_schema.events_transactions_history_long;
+select * from performance_schema.events_transactions_summary_by_account_by_event_name;
+select * from performance_schema.events_transactions_summary_by_host_by_event_name;
+select * from performance_schema.events_transactions_summary_by_thread_by_event_name;
+select * from performance_schema.events_transactions_summary_by_user_by_event_name;
+select * from performance_schema.events_transactions_summary_global_by_event_name;
+select * from performance_schema.events_waits_current;
+select * from performance_schema.events_waits_history;
+select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+select * from performance_schema.events_waits_summary_by_instance;
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.file_instances;
+select * from performance_schema.file_summary_by_event_name;
+select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.hosts;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.metadata_locks;
+select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
+select * from performance_schema.performance_timers;
+select * from performance_schema.rwlock_instances;
+select * from performance_schema.session_account_connect_attrs;
+select * from performance_schema.session_connect_attrs;
+select * from performance_schema.setup_actors;
+select * from performance_schema.setup_consumers;
+select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
+select * from performance_schema.setup_timers;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.table_handles;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
+select * from performance_schema.threads;
+select * from performance_schema.users;
+select * from performance_schema.replication_connection_configuration;
+select * from performance_schema.replication_applier_configuration;
+select * from performance_schema.replication_applier_status;
+select * from performance_schema.replication_applier_status_by_coordinator;
+select * from performance_schema.global_status;
+select * from performance_schema.status_by_thread;
+select * from performance_schema.status_by_user;
+select * from performance_schema.status_by_host;
+select * from performance_schema.status_by_account;
+select * from performance_schema.session_status;
+show global variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_transactions_history_long_size 1000
+performance_schema_events_transactions_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 90
+performance_schema_max_cond_instances 1000
+performance_schema_max_digest_length 1024
+performance_schema_max_file_classes 80
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_index_stat 5000
+performance_schema_max_memory_classes 320
+performance_schema_max_metadata_locks 10000
+performance_schema_max_mutex_classes 210
+performance_schema_max_mutex_instances 5000
+performance_schema_max_prepared_statements_instances 100
+performance_schema_max_program_instances 5000
+performance_schema_max_rwlock_classes 50
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_sql_text_length 1024
+performance_schema_max_stage_classes 160
+performance_schema_max_statement_classes 222
+performance_schema_max_statement_stack 10
+performance_schema_max_table_handles 0
+performance_schema_max_table_instances 500
+performance_schema_max_table_lock_stat 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_session_connect_attrs_size 2048
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
-show status like "performance_schema%";
-show variables like "performance_schema_max_table_instances";
+show global status like "performance_schema%";
+show global variables like "performance_schema_max_table_instances";
Variable_name Value
performance_schema_max_table_instances 500
-show variables like "performance_schema_max_table_handles";
+show global variables like "performance_schema_max_table_handles";
Variable_name Value
performance_schema_max_table_handles 0
drop table if exists test.instrument_me;
@@ -34,7 +162,7 @@ a
2
3
drop table test.instrument_me;
-show variables like "performance_schema_max_table_instances";
+show global variables like "performance_schema_max_table_instances";
Variable_name Value
performance_schema_max_table_instances 500
select variable_value > 0 from information_schema.global_status
diff --git a/mysql-test/suite/perfschema/r/start_server_no_table_inst.result b/mysql-test/suite/perfschema/r/start_server_no_table_inst.result
index def59b8b54b..17a10cf715e 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_table_inst.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_table_inst.result
@@ -10,19 +10,147 @@ count(*)
5
select count(*) from performance_schema.setup_consumers;
count(*)
-12
-select count(*) > 3 from performance_schema.setup_instruments;
-count(*) > 3
+15
+select count(*) > 4 from performance_schema.setup_instruments;
+count(*) > 4
1
select count(*) from performance_schema.setup_timers;
count(*)
-4
+5
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release
+select * from performance_schema.accounts;
+select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_digest;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_transactions_current;
+select * from performance_schema.events_transactions_history;
+select * from performance_schema.events_transactions_history_long;
+select * from performance_schema.events_transactions_summary_by_account_by_event_name;
+select * from performance_schema.events_transactions_summary_by_host_by_event_name;
+select * from performance_schema.events_transactions_summary_by_thread_by_event_name;
+select * from performance_schema.events_transactions_summary_by_user_by_event_name;
+select * from performance_schema.events_transactions_summary_global_by_event_name;
+select * from performance_schema.events_waits_current;
+select * from performance_schema.events_waits_history;
+select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+select * from performance_schema.events_waits_summary_by_instance;
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.file_instances;
+select * from performance_schema.file_summary_by_event_name;
+select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.hosts;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.metadata_locks;
+select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
+select * from performance_schema.performance_timers;
+select * from performance_schema.rwlock_instances;
+select * from performance_schema.session_account_connect_attrs;
+select * from performance_schema.session_connect_attrs;
+select * from performance_schema.setup_actors;
+select * from performance_schema.setup_consumers;
+select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
+select * from performance_schema.setup_timers;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.table_handles;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
+select * from performance_schema.threads;
+select * from performance_schema.users;
+select * from performance_schema.replication_connection_configuration;
+select * from performance_schema.replication_applier_configuration;
+select * from performance_schema.replication_applier_status;
+select * from performance_schema.replication_applier_status_by_coordinator;
+select * from performance_schema.global_status;
+select * from performance_schema.status_by_thread;
+select * from performance_schema.status_by_user;
+select * from performance_schema.status_by_host;
+select * from performance_schema.status_by_account;
+select * from performance_schema.session_status;
+show global variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_transactions_history_long_size 1000
+performance_schema_events_transactions_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 90
+performance_schema_max_cond_instances 1000
+performance_schema_max_digest_length 1024
+performance_schema_max_file_classes 80
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_index_stat 0
+performance_schema_max_memory_classes 320
+performance_schema_max_metadata_locks 10000
+performance_schema_max_mutex_classes 210
+performance_schema_max_mutex_instances 5000
+performance_schema_max_prepared_statements_instances 100
+performance_schema_max_program_instances 5000
+performance_schema_max_rwlock_classes 50
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_sql_text_length 1024
+performance_schema_max_stage_classes 160
+performance_schema_max_statement_classes 222
+performance_schema_max_statement_stack 10
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 0
+performance_schema_max_table_lock_stat 0
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_session_connect_attrs_size 2048
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
-show status like "performance_schema%";
-show variables like "performance_schema_max_table_instances";
+show global status like "performance_schema%";
+show global variables like "performance_schema_max_table_instances";
Variable_name Value
performance_schema_max_table_instances 0
-show variables like "performance_schema_max_table_handles";
+show global variables like "performance_schema_max_table_handles";
Variable_name Value
performance_schema_max_table_handles 1000
drop table if exists test.instrument_me;
@@ -38,6 +166,6 @@ select variable_value > 0 from information_schema.global_status
where variable_name like 'PERFORMANCE_SCHEMA_TABLE_INSTANCES_LOST';
variable_value > 0
1
-show status like "performance_schema_table_handles_lost";
+show global status like "performance_schema_table_handles_lost";
Variable_name Value
Performance_schema_table_handles_lost 0
diff --git a/mysql-test/suite/perfschema/r/start_server_no_table_lock.result b/mysql-test/suite/perfschema/r/start_server_no_table_lock.result
new file mode 100644
index 00000000000..a93f900f650
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/start_server_no_table_lock.result
@@ -0,0 +1,177 @@
+show databases;
+Database
+information_schema
+mtr
+mysql
+performance_schema
+test
+select count(*) from performance_schema.performance_timers;
+count(*)
+5
+select count(*) from performance_schema.setup_consumers;
+count(*)
+15
+select count(*) > 4 from performance_schema.setup_instruments;
+count(*) > 4
+1
+select count(*) from performance_schema.setup_timers;
+count(*)
+5
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release
+select * from performance_schema.accounts;
+select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_digest;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_transactions_current;
+select * from performance_schema.events_transactions_history;
+select * from performance_schema.events_transactions_history_long;
+select * from performance_schema.events_transactions_summary_by_account_by_event_name;
+select * from performance_schema.events_transactions_summary_by_host_by_event_name;
+select * from performance_schema.events_transactions_summary_by_thread_by_event_name;
+select * from performance_schema.events_transactions_summary_by_user_by_event_name;
+select * from performance_schema.events_transactions_summary_global_by_event_name;
+select * from performance_schema.events_waits_current;
+select * from performance_schema.events_waits_history;
+select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+select * from performance_schema.events_waits_summary_by_instance;
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.file_instances;
+select * from performance_schema.file_summary_by_event_name;
+select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.hosts;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.metadata_locks;
+select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
+select * from performance_schema.performance_timers;
+select * from performance_schema.rwlock_instances;
+select * from performance_schema.session_account_connect_attrs;
+select * from performance_schema.session_connect_attrs;
+select * from performance_schema.setup_actors;
+select * from performance_schema.setup_consumers;
+select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
+select * from performance_schema.setup_timers;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.table_handles;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
+select * from performance_schema.threads;
+select * from performance_schema.users;
+select * from performance_schema.replication_connection_configuration;
+select * from performance_schema.replication_applier_configuration;
+select * from performance_schema.replication_applier_status;
+select * from performance_schema.replication_applier_status_by_coordinator;
+select * from performance_schema.global_status;
+select * from performance_schema.status_by_thread;
+select * from performance_schema.status_by_user;
+select * from performance_schema.status_by_host;
+select * from performance_schema.status_by_account;
+select * from performance_schema.session_status;
+show global variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_transactions_history_long_size 1000
+performance_schema_events_transactions_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 90
+performance_schema_max_cond_instances 1000
+performance_schema_max_digest_length 1024
+performance_schema_max_file_classes 80
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_index_stat 5000
+performance_schema_max_memory_classes 320
+performance_schema_max_metadata_locks 10000
+performance_schema_max_mutex_classes 210
+performance_schema_max_mutex_instances 5000
+performance_schema_max_prepared_statements_instances 100
+performance_schema_max_program_instances 5000
+performance_schema_max_rwlock_classes 50
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_sql_text_length 1024
+performance_schema_max_stage_classes 160
+performance_schema_max_statement_classes 222
+performance_schema_max_statement_stack 10
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_table_lock_stat 0
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_session_connect_attrs_size 2048
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
+show engine PERFORMANCE_SCHEMA status;
+show global status like "performance_schema%";
+drop table if exists db1.t1;
+drop database if exists db1;
+create database db1;
+create table db1.t1 (a int, b char(10) default 'default');
+insert into db1.t1 values('1', 'abc');
+insert into db1.t1 values('2', 'abc');
+select * from db1.t1 where a='1';
+a b
+1 abc
+select COUNT_STAR from performance_schema.table_lock_waits_summary_by_table
+where OBJECT_SCHEMA='db1' and OBJECT_NAME='t1';
+COUNT_STAR
+6
+FLUSH TABLES;
+select COUNT_STAR from performance_schema.table_lock_waits_summary_by_table
+where OBJECT_SCHEMA='db1' and OBJECT_NAME='t1';
+COUNT_STAR
+0
+select variable_value > 0 from information_schema.global_status
+where variable_name like 'PERFORMANCE_SCHEMA_TABLE_LOCK_STAT_LOST';
+variable_value > 0
+1
+FLUSH STATUS;
+select variable_value from information_schema.global_status
+where variable_name like 'PERFORMANCE_SCHEMA_TABLE_LOCK_STAT_LOST';
+variable_value
+0
+drop database db1;
diff --git a/mysql-test/suite/perfschema/r/start_server_no_thread_class.result b/mysql-test/suite/perfschema/r/start_server_no_thread_class.result
index 16952409b56..051c81dd12f 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_thread_class.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_thread_class.result
@@ -10,16 +10,144 @@ count(*)
5
select count(*) from performance_schema.setup_consumers;
count(*)
-12
-select count(*) > 3 from performance_schema.setup_instruments;
-count(*) > 3
+15
+select count(*) > 4 from performance_schema.setup_instruments;
+count(*) > 4
1
select count(*) from performance_schema.setup_timers;
count(*)
-4
+5
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release
+select * from performance_schema.accounts;
+select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_digest;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_transactions_current;
+select * from performance_schema.events_transactions_history;
+select * from performance_schema.events_transactions_history_long;
+select * from performance_schema.events_transactions_summary_by_account_by_event_name;
+select * from performance_schema.events_transactions_summary_by_host_by_event_name;
+select * from performance_schema.events_transactions_summary_by_thread_by_event_name;
+select * from performance_schema.events_transactions_summary_by_user_by_event_name;
+select * from performance_schema.events_transactions_summary_global_by_event_name;
+select * from performance_schema.events_waits_current;
+select * from performance_schema.events_waits_history;
+select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+select * from performance_schema.events_waits_summary_by_instance;
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.file_instances;
+select * from performance_schema.file_summary_by_event_name;
+select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.hosts;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.metadata_locks;
+select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
+select * from performance_schema.performance_timers;
+select * from performance_schema.rwlock_instances;
+select * from performance_schema.session_account_connect_attrs;
+select * from performance_schema.session_connect_attrs;
+select * from performance_schema.setup_actors;
+select * from performance_schema.setup_consumers;
+select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
+select * from performance_schema.setup_timers;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.table_handles;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
+select * from performance_schema.threads;
+select * from performance_schema.users;
+select * from performance_schema.replication_connection_configuration;
+select * from performance_schema.replication_applier_configuration;
+select * from performance_schema.replication_applier_status;
+select * from performance_schema.replication_applier_status_by_coordinator;
+select * from performance_schema.global_status;
+select * from performance_schema.status_by_thread;
+select * from performance_schema.status_by_user;
+select * from performance_schema.status_by_host;
+select * from performance_schema.status_by_account;
+select * from performance_schema.session_status;
+show global variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_transactions_history_long_size 1000
+performance_schema_events_transactions_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 90
+performance_schema_max_cond_instances 1000
+performance_schema_max_digest_length 1024
+performance_schema_max_file_classes 80
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_index_stat 5000
+performance_schema_max_memory_classes 320
+performance_schema_max_metadata_locks 10000
+performance_schema_max_mutex_classes 210
+performance_schema_max_mutex_instances 5000
+performance_schema_max_prepared_statements_instances 100
+performance_schema_max_program_instances 5000
+performance_schema_max_rwlock_classes 50
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_sql_text_length 1024
+performance_schema_max_stage_classes 160
+performance_schema_max_statement_classes 222
+performance_schema_max_statement_stack 10
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_table_lock_stat 500
+performance_schema_max_thread_classes 0
+performance_schema_max_thread_instances 200
+performance_schema_session_connect_attrs_size 2048
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
-show status like "performance_schema%";
-show variables like "performance_schema_max_thread_classes";
+show global status like "performance_schema%";
+show global variables like "performance_schema_max_thread_classes";
Variable_name Value
performance_schema_max_thread_classes 0
select count(*) from performance_schema.setup_instruments
@@ -33,6 +161,6 @@ variable_value > 0
select count(*) from performance_schema.threads;
count(*)
0
-show status like "performance_schema_thread_instances_lost";
+show global status like "performance_schema_thread_instances_lost";
Variable_name Value
Performance_schema_thread_instances_lost 0
diff --git a/mysql-test/suite/perfschema/r/start_server_no_thread_inst.result b/mysql-test/suite/perfschema/r/start_server_no_thread_inst.result
index e3ccd3f91e6..abedd06c0d9 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_thread_inst.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_thread_inst.result
@@ -10,22 +10,150 @@ count(*)
5
select count(*) from performance_schema.setup_consumers;
count(*)
-12
-select count(*) > 3 from performance_schema.setup_instruments;
-count(*) > 3
+15
+select count(*) > 4 from performance_schema.setup_instruments;
+count(*) > 4
1
select count(*) from performance_schema.setup_timers;
count(*)
-4
+5
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release
+select * from performance_schema.accounts;
+select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_digest;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_transactions_current;
+select * from performance_schema.events_transactions_history;
+select * from performance_schema.events_transactions_history_long;
+select * from performance_schema.events_transactions_summary_by_account_by_event_name;
+select * from performance_schema.events_transactions_summary_by_host_by_event_name;
+select * from performance_schema.events_transactions_summary_by_thread_by_event_name;
+select * from performance_schema.events_transactions_summary_by_user_by_event_name;
+select * from performance_schema.events_transactions_summary_global_by_event_name;
+select * from performance_schema.events_waits_current;
+select * from performance_schema.events_waits_history;
+select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+select * from performance_schema.events_waits_summary_by_instance;
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.file_instances;
+select * from performance_schema.file_summary_by_event_name;
+select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.hosts;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.metadata_locks;
+select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
+select * from performance_schema.performance_timers;
+select * from performance_schema.rwlock_instances;
+select * from performance_schema.session_account_connect_attrs;
+select * from performance_schema.session_connect_attrs;
+select * from performance_schema.setup_actors;
+select * from performance_schema.setup_consumers;
+select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
+select * from performance_schema.setup_timers;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.table_handles;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
+select * from performance_schema.threads;
+select * from performance_schema.users;
+select * from performance_schema.replication_connection_configuration;
+select * from performance_schema.replication_applier_configuration;
+select * from performance_schema.replication_applier_status;
+select * from performance_schema.replication_applier_status_by_coordinator;
+select * from performance_schema.global_status;
+select * from performance_schema.status_by_thread;
+select * from performance_schema.status_by_user;
+select * from performance_schema.status_by_host;
+select * from performance_schema.status_by_account;
+select * from performance_schema.session_status;
+show global variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_transactions_history_long_size 1000
+performance_schema_events_transactions_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 90
+performance_schema_max_cond_instances 1000
+performance_schema_max_digest_length 1024
+performance_schema_max_file_classes 80
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_index_stat 5000
+performance_schema_max_memory_classes 320
+performance_schema_max_metadata_locks 10000
+performance_schema_max_mutex_classes 210
+performance_schema_max_mutex_instances 5000
+performance_schema_max_prepared_statements_instances 100
+performance_schema_max_program_instances 5000
+performance_schema_max_rwlock_classes 50
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_sql_text_length 1024
+performance_schema_max_stage_classes 160
+performance_schema_max_statement_classes 222
+performance_schema_max_statement_stack 10
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_table_lock_stat 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 0
+performance_schema_session_connect_attrs_size 2048
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
-show status like "performance_schema%";
-show variables like "performance_schema_max_thread_classes";
+show global status like "performance_schema%";
+show global variables like "performance_schema_max_thread_classes";
Variable_name Value
performance_schema_max_thread_classes 50
-show status like "performance_schema_thread_classes_lost";
+show global status like "performance_schema_thread_classes_lost";
Variable_name Value
Performance_schema_thread_classes_lost 0
-show variables like "performance_schema_max_thread_instances";
+show global variables like "performance_schema_max_thread_instances";
Variable_name Value
performance_schema_max_thread_instances 0
select count(*) from performance_schema.threads;
diff --git a/mysql-test/suite/perfschema/r/start_server_no_transactions_history.result b/mysql-test/suite/perfschema/r/start_server_no_transactions_history.result
new file mode 100644
index 00000000000..1d5597f554b
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/start_server_no_transactions_history.result
@@ -0,0 +1,156 @@
+show databases;
+Database
+information_schema
+mtr
+mysql
+performance_schema
+test
+select count(*) from performance_schema.performance_timers;
+count(*)
+5
+select count(*) from performance_schema.setup_consumers;
+count(*)
+15
+select count(*) > 4 from performance_schema.setup_instruments;
+count(*) > 4
+1
+select count(*) from performance_schema.setup_timers;
+count(*)
+5
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release
+select * from performance_schema.accounts;
+select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_digest;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_transactions_current;
+select * from performance_schema.events_transactions_history;
+select * from performance_schema.events_transactions_history_long;
+select * from performance_schema.events_transactions_summary_by_account_by_event_name;
+select * from performance_schema.events_transactions_summary_by_host_by_event_name;
+select * from performance_schema.events_transactions_summary_by_thread_by_event_name;
+select * from performance_schema.events_transactions_summary_by_user_by_event_name;
+select * from performance_schema.events_transactions_summary_global_by_event_name;
+select * from performance_schema.events_waits_current;
+select * from performance_schema.events_waits_history;
+select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+select * from performance_schema.events_waits_summary_by_instance;
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.file_instances;
+select * from performance_schema.file_summary_by_event_name;
+select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.hosts;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.metadata_locks;
+select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
+select * from performance_schema.performance_timers;
+select * from performance_schema.rwlock_instances;
+select * from performance_schema.session_account_connect_attrs;
+select * from performance_schema.session_connect_attrs;
+select * from performance_schema.setup_actors;
+select * from performance_schema.setup_consumers;
+select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
+select * from performance_schema.setup_timers;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.table_handles;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
+select * from performance_schema.threads;
+select * from performance_schema.users;
+select * from performance_schema.replication_connection_configuration;
+select * from performance_schema.replication_applier_configuration;
+select * from performance_schema.replication_applier_status;
+select * from performance_schema.replication_applier_status_by_coordinator;
+select * from performance_schema.global_status;
+select * from performance_schema.status_by_thread;
+select * from performance_schema.status_by_user;
+select * from performance_schema.status_by_host;
+select * from performance_schema.status_by_account;
+select * from performance_schema.session_status;
+show global variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_transactions_history_long_size 1000
+performance_schema_events_transactions_history_size 0
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 90
+performance_schema_max_cond_instances 1000
+performance_schema_max_digest_length 1024
+performance_schema_max_file_classes 80
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_index_stat 5000
+performance_schema_max_memory_classes 320
+performance_schema_max_metadata_locks 10000
+performance_schema_max_mutex_classes 210
+performance_schema_max_mutex_instances 5000
+performance_schema_max_prepared_statements_instances 100
+performance_schema_max_program_instances 5000
+performance_schema_max_rwlock_classes 50
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_sql_text_length 1024
+performance_schema_max_stage_classes 160
+performance_schema_max_statement_classes 222
+performance_schema_max_statement_stack 10
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_table_lock_stat 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_session_connect_attrs_size 2048
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
+show engine PERFORMANCE_SCHEMA status;
+show global status like "performance_schema%";
+show global variables like "performance_schema_events_transactions_history_size";
+Variable_name Value
+performance_schema_events_transactions_history_size 0
+select count(*) from performance_schema.events_transactions_history;
+count(*)
+0
+truncate table performance_schema.events_transactions_history;
diff --git a/mysql-test/suite/perfschema/r/start_server_no_transactions_history_long.result b/mysql-test/suite/perfschema/r/start_server_no_transactions_history_long.result
new file mode 100644
index 00000000000..99e170c9bb1
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/start_server_no_transactions_history_long.result
@@ -0,0 +1,156 @@
+show databases;
+Database
+information_schema
+mtr
+mysql
+performance_schema
+test
+select count(*) from performance_schema.performance_timers;
+count(*)
+5
+select count(*) from performance_schema.setup_consumers;
+count(*)
+15
+select count(*) > 4 from performance_schema.setup_instruments;
+count(*) > 4
+1
+select count(*) from performance_schema.setup_timers;
+count(*)
+5
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release
+select * from performance_schema.accounts;
+select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_digest;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_transactions_current;
+select * from performance_schema.events_transactions_history;
+select * from performance_schema.events_transactions_history_long;
+select * from performance_schema.events_transactions_summary_by_account_by_event_name;
+select * from performance_schema.events_transactions_summary_by_host_by_event_name;
+select * from performance_schema.events_transactions_summary_by_thread_by_event_name;
+select * from performance_schema.events_transactions_summary_by_user_by_event_name;
+select * from performance_schema.events_transactions_summary_global_by_event_name;
+select * from performance_schema.events_waits_current;
+select * from performance_schema.events_waits_history;
+select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+select * from performance_schema.events_waits_summary_by_instance;
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.file_instances;
+select * from performance_schema.file_summary_by_event_name;
+select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.hosts;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.metadata_locks;
+select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
+select * from performance_schema.performance_timers;
+select * from performance_schema.rwlock_instances;
+select * from performance_schema.session_account_connect_attrs;
+select * from performance_schema.session_connect_attrs;
+select * from performance_schema.setup_actors;
+select * from performance_schema.setup_consumers;
+select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
+select * from performance_schema.setup_timers;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.table_handles;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
+select * from performance_schema.threads;
+select * from performance_schema.users;
+select * from performance_schema.replication_connection_configuration;
+select * from performance_schema.replication_applier_configuration;
+select * from performance_schema.replication_applier_status;
+select * from performance_schema.replication_applier_status_by_coordinator;
+select * from performance_schema.global_status;
+select * from performance_schema.status_by_thread;
+select * from performance_schema.status_by_user;
+select * from performance_schema.status_by_host;
+select * from performance_schema.status_by_account;
+select * from performance_schema.session_status;
+show global variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_transactions_history_long_size 0
+performance_schema_events_transactions_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 90
+performance_schema_max_cond_instances 1000
+performance_schema_max_digest_length 1024
+performance_schema_max_file_classes 80
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_index_stat 5000
+performance_schema_max_memory_classes 320
+performance_schema_max_metadata_locks 10000
+performance_schema_max_mutex_classes 210
+performance_schema_max_mutex_instances 5000
+performance_schema_max_prepared_statements_instances 100
+performance_schema_max_program_instances 5000
+performance_schema_max_rwlock_classes 50
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_sql_text_length 1024
+performance_schema_max_stage_classes 160
+performance_schema_max_statement_classes 222
+performance_schema_max_statement_stack 10
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_table_lock_stat 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_session_connect_attrs_size 2048
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
+show engine PERFORMANCE_SCHEMA status;
+show global status like "performance_schema%";
+show global variables like "performance_schema_events_transactions_history_long_size";
+Variable_name Value
+performance_schema_events_transactions_history_long_size 0
+select count(*) from performance_schema.events_transactions_history_long;
+count(*)
+0
+truncate table performance_schema.events_transactions_history_long;
diff --git a/mysql-test/suite/perfschema/r/start_server_no_user.result b/mysql-test/suite/perfschema/r/start_server_no_user.result
index 7f006d6b47a..46aaa06bf65 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_user.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_user.result
@@ -10,16 +10,144 @@ count(*)
5
select count(*) from performance_schema.setup_consumers;
count(*)
-12
-select count(*) > 3 from performance_schema.setup_instruments;
-count(*) > 3
+15
+select count(*) > 4 from performance_schema.setup_instruments;
+count(*) > 4
1
select count(*) from performance_schema.setup_timers;
count(*)
-4
+5
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release
+select * from performance_schema.accounts;
+select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_digest;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_transactions_current;
+select * from performance_schema.events_transactions_history;
+select * from performance_schema.events_transactions_history_long;
+select * from performance_schema.events_transactions_summary_by_account_by_event_name;
+select * from performance_schema.events_transactions_summary_by_host_by_event_name;
+select * from performance_schema.events_transactions_summary_by_thread_by_event_name;
+select * from performance_schema.events_transactions_summary_by_user_by_event_name;
+select * from performance_schema.events_transactions_summary_global_by_event_name;
+select * from performance_schema.events_waits_current;
+select * from performance_schema.events_waits_history;
+select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+select * from performance_schema.events_waits_summary_by_instance;
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.file_instances;
+select * from performance_schema.file_summary_by_event_name;
+select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.hosts;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.metadata_locks;
+select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
+select * from performance_schema.performance_timers;
+select * from performance_schema.rwlock_instances;
+select * from performance_schema.session_account_connect_attrs;
+select * from performance_schema.session_connect_attrs;
+select * from performance_schema.setup_actors;
+select * from performance_schema.setup_consumers;
+select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
+select * from performance_schema.setup_timers;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.table_handles;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
+select * from performance_schema.threads;
+select * from performance_schema.users;
+select * from performance_schema.replication_connection_configuration;
+select * from performance_schema.replication_applier_configuration;
+select * from performance_schema.replication_applier_status;
+select * from performance_schema.replication_applier_status_by_coordinator;
+select * from performance_schema.global_status;
+select * from performance_schema.status_by_thread;
+select * from performance_schema.status_by_user;
+select * from performance_schema.status_by_host;
+select * from performance_schema.status_by_account;
+select * from performance_schema.session_status;
+show global variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_transactions_history_long_size 1000
+performance_schema_events_transactions_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 90
+performance_schema_max_cond_instances 1000
+performance_schema_max_digest_length 1024
+performance_schema_max_file_classes 80
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_index_stat 5000
+performance_schema_max_memory_classes 320
+performance_schema_max_metadata_locks 10000
+performance_schema_max_mutex_classes 210
+performance_schema_max_mutex_instances 5000
+performance_schema_max_prepared_statements_instances 100
+performance_schema_max_program_instances 5000
+performance_schema_max_rwlock_classes 50
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_sql_text_length 1024
+performance_schema_max_stage_classes 160
+performance_schema_max_statement_classes 222
+performance_schema_max_statement_stack 10
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_table_lock_stat 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_session_connect_attrs_size 2048
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 0
show engine PERFORMANCE_SCHEMA status;
-show status like "performance_schema%";
-show variables like "performance_schema_users_size";
+show global status like "performance_schema%";
+show global variables like "performance_schema_users_size";
Variable_name Value
performance_schema_users_size 0
select count(*) from performance_schema.users;
diff --git a/mysql-test/suite/perfschema/r/start_server_no_waits_history.result b/mysql-test/suite/perfschema/r/start_server_no_waits_history.result
index 27122723030..1b717b9f768 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_waits_history.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_waits_history.result
@@ -10,16 +10,144 @@ count(*)
5
select count(*) from performance_schema.setup_consumers;
count(*)
-12
-select count(*) > 3 from performance_schema.setup_instruments;
-count(*) > 3
+15
+select count(*) > 4 from performance_schema.setup_instruments;
+count(*) > 4
1
select count(*) from performance_schema.setup_timers;
count(*)
-4
+5
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release
+select * from performance_schema.accounts;
+select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_digest;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_transactions_current;
+select * from performance_schema.events_transactions_history;
+select * from performance_schema.events_transactions_history_long;
+select * from performance_schema.events_transactions_summary_by_account_by_event_name;
+select * from performance_schema.events_transactions_summary_by_host_by_event_name;
+select * from performance_schema.events_transactions_summary_by_thread_by_event_name;
+select * from performance_schema.events_transactions_summary_by_user_by_event_name;
+select * from performance_schema.events_transactions_summary_global_by_event_name;
+select * from performance_schema.events_waits_current;
+select * from performance_schema.events_waits_history;
+select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+select * from performance_schema.events_waits_summary_by_instance;
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.file_instances;
+select * from performance_schema.file_summary_by_event_name;
+select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.hosts;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.metadata_locks;
+select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
+select * from performance_schema.performance_timers;
+select * from performance_schema.rwlock_instances;
+select * from performance_schema.session_account_connect_attrs;
+select * from performance_schema.session_connect_attrs;
+select * from performance_schema.setup_actors;
+select * from performance_schema.setup_consumers;
+select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
+select * from performance_schema.setup_timers;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.table_handles;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
+select * from performance_schema.threads;
+select * from performance_schema.users;
+select * from performance_schema.replication_connection_configuration;
+select * from performance_schema.replication_applier_configuration;
+select * from performance_schema.replication_applier_status;
+select * from performance_schema.replication_applier_status_by_coordinator;
+select * from performance_schema.global_status;
+select * from performance_schema.status_by_thread;
+select * from performance_schema.status_by_user;
+select * from performance_schema.status_by_host;
+select * from performance_schema.status_by_account;
+select * from performance_schema.session_status;
+show global variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_transactions_history_long_size 1000
+performance_schema_events_transactions_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 0
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 90
+performance_schema_max_cond_instances 1000
+performance_schema_max_digest_length 1024
+performance_schema_max_file_classes 80
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_index_stat 5000
+performance_schema_max_memory_classes 320
+performance_schema_max_metadata_locks 10000
+performance_schema_max_mutex_classes 210
+performance_schema_max_mutex_instances 5000
+performance_schema_max_prepared_statements_instances 100
+performance_schema_max_program_instances 5000
+performance_schema_max_rwlock_classes 50
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_sql_text_length 1024
+performance_schema_max_stage_classes 160
+performance_schema_max_statement_classes 222
+performance_schema_max_statement_stack 10
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_table_lock_stat 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_session_connect_attrs_size 2048
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
-show status like "performance_schema%";
-show variables like "performance_schema_events_waits_history_size";
+show global status like "performance_schema%";
+show global variables like "performance_schema_events_waits_history_size";
Variable_name Value
performance_schema_events_waits_history_size 0
select count(*) from performance_schema.events_waits_history;
diff --git a/mysql-test/suite/perfschema/r/start_server_no_waits_history_long.result b/mysql-test/suite/perfschema/r/start_server_no_waits_history_long.result
index 16ee8a30343..5691b0e7826 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_waits_history_long.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_waits_history_long.result
@@ -10,16 +10,144 @@ count(*)
5
select count(*) from performance_schema.setup_consumers;
count(*)
-12
-select count(*) > 3 from performance_schema.setup_instruments;
-count(*) > 3
+15
+select count(*) > 4 from performance_schema.setup_instruments;
+count(*) > 4
1
select count(*) from performance_schema.setup_timers;
count(*)
-4
+5
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release
+select * from performance_schema.accounts;
+select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_digest;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_transactions_current;
+select * from performance_schema.events_transactions_history;
+select * from performance_schema.events_transactions_history_long;
+select * from performance_schema.events_transactions_summary_by_account_by_event_name;
+select * from performance_schema.events_transactions_summary_by_host_by_event_name;
+select * from performance_schema.events_transactions_summary_by_thread_by_event_name;
+select * from performance_schema.events_transactions_summary_by_user_by_event_name;
+select * from performance_schema.events_transactions_summary_global_by_event_name;
+select * from performance_schema.events_waits_current;
+select * from performance_schema.events_waits_history;
+select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+select * from performance_schema.events_waits_summary_by_instance;
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.file_instances;
+select * from performance_schema.file_summary_by_event_name;
+select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.hosts;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.metadata_locks;
+select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
+select * from performance_schema.performance_timers;
+select * from performance_schema.rwlock_instances;
+select * from performance_schema.session_account_connect_attrs;
+select * from performance_schema.session_connect_attrs;
+select * from performance_schema.setup_actors;
+select * from performance_schema.setup_consumers;
+select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
+select * from performance_schema.setup_timers;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.table_handles;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
+select * from performance_schema.threads;
+select * from performance_schema.users;
+select * from performance_schema.replication_connection_configuration;
+select * from performance_schema.replication_applier_configuration;
+select * from performance_schema.replication_applier_status;
+select * from performance_schema.replication_applier_status_by_coordinator;
+select * from performance_schema.global_status;
+select * from performance_schema.status_by_thread;
+select * from performance_schema.status_by_user;
+select * from performance_schema.status_by_host;
+select * from performance_schema.status_by_account;
+select * from performance_schema.session_status;
+show global variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_transactions_history_long_size 1000
+performance_schema_events_transactions_history_size 10
+performance_schema_events_waits_history_long_size 0
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 90
+performance_schema_max_cond_instances 1000
+performance_schema_max_digest_length 1024
+performance_schema_max_file_classes 80
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_index_stat 5000
+performance_schema_max_memory_classes 320
+performance_schema_max_metadata_locks 10000
+performance_schema_max_mutex_classes 210
+performance_schema_max_mutex_instances 5000
+performance_schema_max_prepared_statements_instances 100
+performance_schema_max_program_instances 5000
+performance_schema_max_rwlock_classes 50
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_sql_text_length 1024
+performance_schema_max_stage_classes 160
+performance_schema_max_statement_classes 222
+performance_schema_max_statement_stack 10
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_table_lock_stat 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_session_connect_attrs_size 2048
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
-show status like "performance_schema%";
-show variables like "performance_schema_events_waits_history_long_size";
+show global status like "performance_schema%";
+show global variables like "performance_schema_events_waits_history_long_size";
Variable_name Value
performance_schema_events_waits_history_long_size 0
select count(*) from performance_schema.events_waits_history_long;
diff --git a/mysql-test/suite/perfschema/r/start_server_nothing.result b/mysql-test/suite/perfschema/r/start_server_nothing.result
index 2aa5658f98c..5dcda26313a 100644
--- a/mysql-test/suite/perfschema/r/start_server_nothing.result
+++ b/mysql-test/suite/perfschema/r/start_server_nothing.result
@@ -10,24 +10,154 @@ count(*)
5
select count(*) from performance_schema.setup_consumers;
count(*)
-12
-select count(*) > 3 from performance_schema.setup_instruments;
-count(*) > 3
-0
+15
+select count(*) > 4 from performance_schema.setup_instruments;
+count(*) > 4
+1
select count(*) from performance_schema.setup_timers;
count(*)
-4
+5
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release
+select * from performance_schema.accounts;
+select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_digest;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_transactions_current;
+select * from performance_schema.events_transactions_history;
+select * from performance_schema.events_transactions_history_long;
+select * from performance_schema.events_transactions_summary_by_account_by_event_name;
+select * from performance_schema.events_transactions_summary_by_host_by_event_name;
+select * from performance_schema.events_transactions_summary_by_thread_by_event_name;
+select * from performance_schema.events_transactions_summary_by_user_by_event_name;
+select * from performance_schema.events_transactions_summary_global_by_event_name;
+select * from performance_schema.events_waits_current;
+select * from performance_schema.events_waits_history;
+select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+select * from performance_schema.events_waits_summary_by_instance;
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.file_instances;
+select * from performance_schema.file_summary_by_event_name;
+select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.hosts;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.metadata_locks;
+select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
+select * from performance_schema.performance_timers;
+select * from performance_schema.rwlock_instances;
+select * from performance_schema.session_account_connect_attrs;
+select * from performance_schema.session_connect_attrs;
+select * from performance_schema.setup_actors;
+select * from performance_schema.setup_consumers;
+select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
+select * from performance_schema.setup_timers;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.table_handles;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
+select * from performance_schema.threads;
+select * from performance_schema.users;
+select * from performance_schema.replication_connection_configuration;
+select * from performance_schema.replication_applier_configuration;
+select * from performance_schema.replication_applier_status;
+select * from performance_schema.replication_applier_status_by_coordinator;
+select * from performance_schema.global_status;
+select * from performance_schema.status_by_thread;
+select * from performance_schema.status_by_user;
+select * from performance_schema.status_by_host;
+select * from performance_schema.status_by_account;
+select * from performance_schema.session_status;
+show global variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 0
+performance_schema_digests_size 0
+performance_schema_events_stages_history_long_size 0
+performance_schema_events_stages_history_size 0
+performance_schema_events_statements_history_long_size 0
+performance_schema_events_statements_history_size 0
+performance_schema_events_transactions_history_long_size 1000
+performance_schema_events_transactions_history_size 10
+performance_schema_events_waits_history_long_size 0
+performance_schema_events_waits_history_size 0
+performance_schema_hosts_size 0
+performance_schema_max_cond_classes 0
+performance_schema_max_cond_instances 0
+performance_schema_max_digest_length 1024
+performance_schema_max_file_classes 0
+performance_schema_max_file_handles 0
+performance_schema_max_file_instances 0
+performance_schema_max_index_stat 0
+performance_schema_max_memory_classes 0
+performance_schema_max_metadata_locks 0
+performance_schema_max_mutex_classes 0
+performance_schema_max_mutex_instances 0
+performance_schema_max_prepared_statements_instances 100
+performance_schema_max_program_instances 0
+performance_schema_max_rwlock_classes 0
+performance_schema_max_rwlock_instances 0
+performance_schema_max_socket_classes 0
+performance_schema_max_socket_instances 0
+performance_schema_max_sql_text_length 1024
+performance_schema_max_stage_classes 0
+performance_schema_max_statement_classes 0
+performance_schema_max_statement_stack 1
+performance_schema_max_table_handles 0
+performance_schema_max_table_instances 0
+performance_schema_max_table_lock_stat 0
+performance_schema_max_thread_classes 0
+performance_schema_max_thread_instances 0
+performance_schema_session_connect_attrs_size 0
+performance_schema_setup_actors_size 0
+performance_schema_setup_objects_size 0
+performance_schema_users_size 0
show engine PERFORMANCE_SCHEMA status;
-show status like "performance_schema%";
-show variables like "performance_schema%";
+show global status like "performance_schema%";
+show global variables like "performance_schema%";
Variable_name Value
performance_schema ON
performance_schema_accounts_size 0
-performance_schema_digests_size 200
+performance_schema_digests_size 0
performance_schema_events_stages_history_long_size 0
performance_schema_events_stages_history_size 0
performance_schema_events_statements_history_long_size 0
performance_schema_events_statements_history_size 0
+performance_schema_events_transactions_history_long_size 1000
+performance_schema_events_transactions_history_size 10
performance_schema_events_waits_history_long_size 0
performance_schema_events_waits_history_size 0
performance_schema_hosts_size 0
@@ -37,27 +167,108 @@ performance_schema_max_digest_length 1024
performance_schema_max_file_classes 0
performance_schema_max_file_handles 0
performance_schema_max_file_instances 0
+performance_schema_max_index_stat 0
+performance_schema_max_memory_classes 0
+performance_schema_max_metadata_locks 0
performance_schema_max_mutex_classes 0
performance_schema_max_mutex_instances 0
+performance_schema_max_prepared_statements_instances 100
+performance_schema_max_program_instances 0
performance_schema_max_rwlock_classes 0
performance_schema_max_rwlock_instances 0
performance_schema_max_socket_classes 0
performance_schema_max_socket_instances 0
+performance_schema_max_sql_text_length 1024
performance_schema_max_stage_classes 0
performance_schema_max_statement_classes 0
+performance_schema_max_statement_stack 1
performance_schema_max_table_handles 0
performance_schema_max_table_instances 0
+performance_schema_max_table_lock_stat 0
performance_schema_max_thread_classes 0
performance_schema_max_thread_instances 0
performance_schema_session_connect_attrs_size 0
performance_schema_setup_actors_size 0
performance_schema_setup_objects_size 0
performance_schema_users_size 0
-select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_instruments
+order by name;
NAME ENABLED TIMED
+idle YES YES
+memory/performance_schema/accounts YES NO
+memory/performance_schema/cond_class YES NO
+memory/performance_schema/cond_instances YES NO
+memory/performance_schema/events_stages_history YES NO
+memory/performance_schema/events_stages_history_long YES NO
+memory/performance_schema/events_stages_summary_by_account_by_event_name YES NO
+memory/performance_schema/events_stages_summary_by_host_by_event_name YES NO
+memory/performance_schema/events_stages_summary_by_thread_by_event_name YES NO
+memory/performance_schema/events_stages_summary_by_user_by_event_name YES NO
+memory/performance_schema/events_stages_summary_global_by_event_name YES NO
+memory/performance_schema/events_statements_current YES NO
+memory/performance_schema/events_statements_current.sqltext YES NO
+memory/performance_schema/events_statements_current.tokens YES NO
+memory/performance_schema/events_statements_history YES NO
+memory/performance_schema/events_statements_history.sqltext YES NO
+memory/performance_schema/events_statements_history.tokens YES NO
+memory/performance_schema/events_statements_history_long YES NO
+memory/performance_schema/events_statements_history_long.sqltext YES NO
+memory/performance_schema/events_statements_history_long.tokens YES NO
+memory/performance_schema/events_statements_summary_by_account_by_event_name YES NO
+memory/performance_schema/events_statements_summary_by_digest YES NO
+memory/performance_schema/events_statements_summary_by_digest.tokens YES NO
+memory/performance_schema/events_statements_summary_by_host_by_event_name YES NO
+memory/performance_schema/events_statements_summary_by_program YES NO
+memory/performance_schema/events_statements_summary_by_thread_by_event_name YES NO
+memory/performance_schema/events_statements_summary_by_user_by_event_name YES NO
+memory/performance_schema/events_statements_summary_global_by_event_name YES NO
+memory/performance_schema/events_transactions_history YES NO
+memory/performance_schema/events_transactions_history_long YES NO
+memory/performance_schema/events_transactions_summary_by_account_by_event_name YES NO
+memory/performance_schema/events_transactions_summary_by_host_by_event_name YES NO
+memory/performance_schema/events_transactions_summary_by_thread_by_event_name YES NO
+memory/performance_schema/events_transactions_summary_by_user_by_event_name YES NO
+memory/performance_schema/events_waits_history YES NO
+memory/performance_schema/events_waits_history_long YES NO
+memory/performance_schema/events_waits_summary_by_account_by_event_name YES NO
+memory/performance_schema/events_waits_summary_by_host_by_event_name YES NO
+memory/performance_schema/events_waits_summary_by_thread_by_event_name YES NO
+memory/performance_schema/events_waits_summary_by_user_by_event_name YES NO
+memory/performance_schema/file_class YES NO
+memory/performance_schema/file_handle YES NO
+memory/performance_schema/file_instances YES NO
+memory/performance_schema/hosts YES NO
+memory/performance_schema/memory_class YES NO
+memory/performance_schema/memory_summary_by_account_by_event_name YES NO
+memory/performance_schema/memory_summary_by_host_by_event_name YES NO
+memory/performance_schema/memory_summary_by_thread_by_event_name YES NO
+memory/performance_schema/memory_summary_by_user_by_event_name YES NO
+memory/performance_schema/memory_summary_global_by_event_name YES NO
+memory/performance_schema/metadata_locks YES NO
+memory/performance_schema/mutex_class YES NO
+memory/performance_schema/mutex_instances YES NO
+memory/performance_schema/prepared_statements_instances YES NO
+memory/performance_schema/rwlock_class YES NO
+memory/performance_schema/rwlock_instances YES NO
+memory/performance_schema/scalable_buffer YES NO
+memory/performance_schema/session_connect_attrs YES NO
+memory/performance_schema/setup_actors YES NO
+memory/performance_schema/setup_objects YES NO
+memory/performance_schema/socket_class YES NO
+memory/performance_schema/socket_instances YES NO
+memory/performance_schema/stage_class YES NO
+memory/performance_schema/statement_class YES NO
+memory/performance_schema/table_handles YES NO
+memory/performance_schema/table_io_waits_summary_by_index_usage YES NO
+memory/performance_schema/table_lock_waits_summary_by_table YES NO
+memory/performance_schema/table_shares YES NO
+memory/performance_schema/threads YES NO
+memory/performance_schema/thread_class YES NO
+memory/performance_schema/users YES NO
+transaction YES YES
wait/io/table/sql/handler YES YES
+wait/lock/metadata/sql/mdl YES YES
wait/lock/table/sql/handler YES YES
-idle YES YES
select TIMER_NAME from performance_schema.performance_timers;
TIMER_NAME
CYCLE
@@ -73,6 +284,9 @@ events_stages_history_long YES
events_statements_current YES
events_statements_history YES
events_statements_history_long YES
+events_transactions_current YES
+events_transactions_history YES
+events_transactions_history_long YES
events_waits_current YES
events_waits_history YES
events_waits_history_long YES
@@ -85,16 +299,19 @@ idle
wait
stage
statement
+transaction
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release
select * from performance_schema.accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
select * from performance_schema.cond_instances;
NAME OBJECT_INSTANCE_BEGIN
select * from performance_schema.events_stages_current;
-THREAD_ID EVENT_ID END_EVENT_ID EVENT_NAME SOURCE TIMER_START TIMER_END TIMER_WAIT NESTING_EVENT_ID NESTING_EVENT_TYPE
+THREAD_ID EVENT_ID END_EVENT_ID EVENT_NAME SOURCE TIMER_START TIMER_END TIMER_WAIT WORK_COMPLETED WORK_ESTIMATED NESTING_EVENT_ID NESTING_EVENT_TYPE
select * from performance_schema.events_stages_history;
-THREAD_ID EVENT_ID END_EVENT_ID EVENT_NAME SOURCE TIMER_START TIMER_END TIMER_WAIT NESTING_EVENT_ID NESTING_EVENT_TYPE
+THREAD_ID EVENT_ID END_EVENT_ID EVENT_NAME SOURCE TIMER_START TIMER_END TIMER_WAIT WORK_COMPLETED WORK_ESTIMATED NESTING_EVENT_ID NESTING_EVENT_TYPE
select * from performance_schema.events_stages_history_long;
-THREAD_ID EVENT_ID END_EVENT_ID EVENT_NAME SOURCE TIMER_START TIMER_END TIMER_WAIT NESTING_EVENT_ID NESTING_EVENT_TYPE
+THREAD_ID EVENT_ID END_EVENT_ID EVENT_NAME SOURCE TIMER_START TIMER_END TIMER_WAIT WORK_COMPLETED WORK_ESTIMATED NESTING_EVENT_ID NESTING_EVENT_TYPE
select * from performance_schema.events_stages_summary_by_account_by_event_name;
USER HOST EVENT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT
select * from performance_schema.events_stages_summary_by_host_by_event_name;
@@ -106,11 +323,11 @@ USER EVENT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIME
select * from performance_schema.events_stages_summary_global_by_event_name;
EVENT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT
select * from performance_schema.events_statements_current;
-THREAD_ID EVENT_ID END_EVENT_ID EVENT_NAME SOURCE TIMER_START TIMER_END TIMER_WAIT LOCK_TIME SQL_TEXT DIGEST DIGEST_TEXT CURRENT_SCHEMA OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME OBJECT_INSTANCE_BEGIN MYSQL_ERRNO RETURNED_SQLSTATE MESSAGE_TEXT ERRORS WARNINGS ROWS_AFFECTED ROWS_SENT ROWS_EXAMINED CREATED_TMP_DISK_TABLES CREATED_TMP_TABLES SELECT_FULL_JOIN SELECT_FULL_RANGE_JOIN SELECT_RANGE SELECT_RANGE_CHECK SELECT_SCAN SORT_MERGE_PASSES SORT_RANGE SORT_ROWS SORT_SCAN NO_INDEX_USED NO_GOOD_INDEX_USED NESTING_EVENT_ID NESTING_EVENT_TYPE
+THREAD_ID EVENT_ID END_EVENT_ID EVENT_NAME SOURCE TIMER_START TIMER_END TIMER_WAIT LOCK_TIME SQL_TEXT DIGEST DIGEST_TEXT CURRENT_SCHEMA OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME OBJECT_INSTANCE_BEGIN MYSQL_ERRNO RETURNED_SQLSTATE MESSAGE_TEXT ERRORS WARNINGS ROWS_AFFECTED ROWS_SENT ROWS_EXAMINED CREATED_TMP_DISK_TABLES CREATED_TMP_TABLES SELECT_FULL_JOIN SELECT_FULL_RANGE_JOIN SELECT_RANGE SELECT_RANGE_CHECK SELECT_SCAN SORT_MERGE_PASSES SORT_RANGE SORT_ROWS SORT_SCAN NO_INDEX_USED NO_GOOD_INDEX_USED NESTING_EVENT_ID NESTING_EVENT_TYPE NESTING_EVENT_LEVEL
select * from performance_schema.events_statements_history;
-THREAD_ID EVENT_ID END_EVENT_ID EVENT_NAME SOURCE TIMER_START TIMER_END TIMER_WAIT LOCK_TIME SQL_TEXT DIGEST DIGEST_TEXT CURRENT_SCHEMA OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME OBJECT_INSTANCE_BEGIN MYSQL_ERRNO RETURNED_SQLSTATE MESSAGE_TEXT ERRORS WARNINGS ROWS_AFFECTED ROWS_SENT ROWS_EXAMINED CREATED_TMP_DISK_TABLES CREATED_TMP_TABLES SELECT_FULL_JOIN SELECT_FULL_RANGE_JOIN SELECT_RANGE SELECT_RANGE_CHECK SELECT_SCAN SORT_MERGE_PASSES SORT_RANGE SORT_ROWS SORT_SCAN NO_INDEX_USED NO_GOOD_INDEX_USED NESTING_EVENT_ID NESTING_EVENT_TYPE
+THREAD_ID EVENT_ID END_EVENT_ID EVENT_NAME SOURCE TIMER_START TIMER_END TIMER_WAIT LOCK_TIME SQL_TEXT DIGEST DIGEST_TEXT CURRENT_SCHEMA OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME OBJECT_INSTANCE_BEGIN MYSQL_ERRNO RETURNED_SQLSTATE MESSAGE_TEXT ERRORS WARNINGS ROWS_AFFECTED ROWS_SENT ROWS_EXAMINED CREATED_TMP_DISK_TABLES CREATED_TMP_TABLES SELECT_FULL_JOIN SELECT_FULL_RANGE_JOIN SELECT_RANGE SELECT_RANGE_CHECK SELECT_SCAN SORT_MERGE_PASSES SORT_RANGE SORT_ROWS SORT_SCAN NO_INDEX_USED NO_GOOD_INDEX_USED NESTING_EVENT_ID NESTING_EVENT_TYPE NESTING_EVENT_LEVEL
select * from performance_schema.events_statements_history_long;
-THREAD_ID EVENT_ID END_EVENT_ID EVENT_NAME SOURCE TIMER_START TIMER_END TIMER_WAIT LOCK_TIME SQL_TEXT DIGEST DIGEST_TEXT CURRENT_SCHEMA OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME OBJECT_INSTANCE_BEGIN MYSQL_ERRNO RETURNED_SQLSTATE MESSAGE_TEXT ERRORS WARNINGS ROWS_AFFECTED ROWS_SENT ROWS_EXAMINED CREATED_TMP_DISK_TABLES CREATED_TMP_TABLES SELECT_FULL_JOIN SELECT_FULL_RANGE_JOIN SELECT_RANGE SELECT_RANGE_CHECK SELECT_SCAN SORT_MERGE_PASSES SORT_RANGE SORT_ROWS SORT_SCAN NO_INDEX_USED NO_GOOD_INDEX_USED NESTING_EVENT_ID NESTING_EVENT_TYPE
+THREAD_ID EVENT_ID END_EVENT_ID EVENT_NAME SOURCE TIMER_START TIMER_END TIMER_WAIT LOCK_TIME SQL_TEXT DIGEST DIGEST_TEXT CURRENT_SCHEMA OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME OBJECT_INSTANCE_BEGIN MYSQL_ERRNO RETURNED_SQLSTATE MESSAGE_TEXT ERRORS WARNINGS ROWS_AFFECTED ROWS_SENT ROWS_EXAMINED CREATED_TMP_DISK_TABLES CREATED_TMP_TABLES SELECT_FULL_JOIN SELECT_FULL_RANGE_JOIN SELECT_RANGE SELECT_RANGE_CHECK SELECT_SCAN SORT_MERGE_PASSES SORT_RANGE SORT_ROWS SORT_SCAN NO_INDEX_USED NO_GOOD_INDEX_USED NESTING_EVENT_ID NESTING_EVENT_TYPE NESTING_EVENT_LEVEL
select * from performance_schema.events_statements_summary_by_account_by_event_name;
USER HOST EVENT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT SUM_LOCK_TIME SUM_ERRORS SUM_WARNINGS SUM_ROWS_AFFECTED SUM_ROWS_SENT SUM_ROWS_EXAMINED SUM_CREATED_TMP_DISK_TABLES SUM_CREATED_TMP_TABLES SUM_SELECT_FULL_JOIN SUM_SELECT_FULL_RANGE_JOIN SUM_SELECT_RANGE SUM_SELECT_RANGE_CHECK SUM_SELECT_SCAN SUM_SORT_MERGE_PASSES SUM_SORT_RANGE SUM_SORT_ROWS SUM_SORT_SCAN SUM_NO_INDEX_USED SUM_NO_GOOD_INDEX_USED
select * from performance_schema.events_statements_summary_by_host_by_event_name;
@@ -142,35 +359,40 @@ EVENT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAI
wait/io/table/sql/handler 0 0 0 0 0
wait/lock/table/sql/handler 0 0 0 0 0
idle 0 0 0 0 0
+wait/lock/metadata/sql/mdl 0 0 0 0 0
select * from performance_schema.file_instances;
FILE_NAME EVENT_NAME OPEN_COUNT
select * from performance_schema.file_summary_by_event_name;
EVENT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT COUNT_READ SUM_TIMER_READ MIN_TIMER_READ AVG_TIMER_READ MAX_TIMER_READ SUM_NUMBER_OF_BYTES_READ COUNT_WRITE SUM_TIMER_WRITE MIN_TIMER_WRITE AVG_TIMER_WRITE MAX_TIMER_WRITE SUM_NUMBER_OF_BYTES_WRITE COUNT_MISC SUM_TIMER_MISC MIN_TIMER_MISC AVG_TIMER_MISC MAX_TIMER_MISC
select * from performance_schema.file_summary_by_instance;
FILE_NAME EVENT_NAME OBJECT_INSTANCE_BEGIN COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT COUNT_READ SUM_TIMER_READ MIN_TIMER_READ AVG_TIMER_READ MAX_TIMER_READ SUM_NUMBER_OF_BYTES_READ COUNT_WRITE SUM_TIMER_WRITE MIN_TIMER_WRITE AVG_TIMER_WRITE MAX_TIMER_WRITE SUM_NUMBER_OF_BYTES_WRITE COUNT_MISC SUM_TIMER_MISC MIN_TIMER_MISC AVG_TIMER_MISC MAX_TIMER_MISC
-select * from performance_schema.session_account_connect_attrs;
-PROCESSLIST_ID ATTR_NAME ATTR_VALUE ORDINAL_POSITION
-select * from performance_schema.session_connect_attrs;
-PROCESSLIST_ID ATTR_NAME ATTR_VALUE ORDINAL_POSITION
-select * from performance_schema.socket_instances;
-EVENT_NAME OBJECT_INSTANCE_BEGIN THREAD_ID SOCKET_ID IP PORT STATE
-select * from performance_schema.socket_summary_by_instance;
-EVENT_NAME OBJECT_INSTANCE_BEGIN COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT COUNT_READ SUM_TIMER_READ MIN_TIMER_READ AVG_TIMER_READ MAX_TIMER_READ SUM_NUMBER_OF_BYTES_READ COUNT_WRITE SUM_TIMER_WRITE MIN_TIMER_WRITE AVG_TIMER_WRITE MAX_TIMER_WRITE SUM_NUMBER_OF_BYTES_WRITE COUNT_MISC SUM_TIMER_MISC MIN_TIMER_MISC AVG_TIMER_MISC MAX_TIMER_MISC
-select * from performance_schema.socket_summary_by_event_name;
-EVENT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT COUNT_READ SUM_TIMER_READ MIN_TIMER_READ AVG_TIMER_READ MAX_TIMER_READ SUM_NUMBER_OF_BYTES_READ COUNT_WRITE SUM_TIMER_WRITE MIN_TIMER_WRITE AVG_TIMER_WRITE MAX_TIMER_WRITE SUM_NUMBER_OF_BYTES_WRITE COUNT_MISC SUM_TIMER_MISC MIN_TIMER_MISC AVG_TIMER_MISC MAX_TIMER_MISC
select * from performance_schema.hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+select * from performance_schema.metadata_locks;
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME OBJECT_INSTANCE_BEGIN LOCK_TYPE LOCK_DURATION LOCK_STATUS SOURCE OWNER_THREAD_ID OWNER_EVENT_ID
select * from performance_schema.mutex_instances;
NAME OBJECT_INSTANCE_BEGIN LOCKED_BY_THREAD_ID
select * from performance_schema.objects_summary_global_by_type;
OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT
select * from performance_schema.rwlock_instances;
NAME OBJECT_INSTANCE_BEGIN WRITE_LOCKED_BY_THREAD_ID READ_LOCKED_BY_COUNT
+select * from performance_schema.session_account_connect_attrs;
+PROCESSLIST_ID ATTR_NAME ATTR_VALUE ORDINAL_POSITION
+select * from performance_schema.session_connect_attrs;
+PROCESSLIST_ID ATTR_NAME ATTR_VALUE ORDINAL_POSITION
select * from performance_schema.setup_actors;
-HOST USER ROLE
+HOST USER ROLE ENABLED HISTORY
select * from performance_schema.setup_objects;
OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
+select * from performance_schema.socket_instances;
+EVENT_NAME OBJECT_INSTANCE_BEGIN THREAD_ID SOCKET_ID IP PORT STATE
+select * from performance_schema.socket_summary_by_event_name;
+EVENT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT COUNT_READ SUM_TIMER_READ MIN_TIMER_READ AVG_TIMER_READ MAX_TIMER_READ SUM_NUMBER_OF_BYTES_READ COUNT_WRITE SUM_TIMER_WRITE MIN_TIMER_WRITE AVG_TIMER_WRITE MAX_TIMER_WRITE SUM_NUMBER_OF_BYTES_WRITE COUNT_MISC SUM_TIMER_MISC MIN_TIMER_MISC AVG_TIMER_MISC MAX_TIMER_MISC
+select * from performance_schema.socket_summary_by_instance;
+EVENT_NAME OBJECT_INSTANCE_BEGIN COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT COUNT_READ SUM_TIMER_READ MIN_TIMER_READ AVG_TIMER_READ MAX_TIMER_READ SUM_NUMBER_OF_BYTES_READ COUNT_WRITE SUM_TIMER_WRITE MIN_TIMER_WRITE AVG_TIMER_WRITE MAX_TIMER_WRITE SUM_NUMBER_OF_BYTES_WRITE COUNT_MISC SUM_TIMER_MISC MIN_TIMER_MISC AVG_TIMER_MISC MAX_TIMER_MISC
+select * from performance_schema.table_handles;
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME OBJECT_INSTANCE_BEGIN OWNER_THREAD_ID OWNER_EVENT_ID INTERNAL_LOCK EXTERNAL_LOCK
select * from performance_schema.threads;
-THREAD_ID NAME TYPE PROCESSLIST_ID PROCESSLIST_USER PROCESSLIST_HOST PROCESSLIST_DB PROCESSLIST_COMMAND PROCESSLIST_TIME PROCESSLIST_STATE PROCESSLIST_INFO PARENT_THREAD_ID ROLE INSTRUMENTED
+THREAD_ID NAME TYPE PROCESSLIST_ID PROCESSLIST_USER PROCESSLIST_HOST PROCESSLIST_DB PROCESSLIST_COMMAND PROCESSLIST_TIME PROCESSLIST_STATE PROCESSLIST_INFO PARENT_THREAD_ID ROLE INSTRUMENTED HISTORY CONNECTION_TYPE THREAD_OS_ID
select * from performance_schema.users;
USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
diff --git a/mysql-test/suite/perfschema/r/start_server_off.result b/mysql-test/suite/perfschema/r/start_server_off.result
index 8c8b8a3a7bb..06af389a857 100644
--- a/mysql-test/suite/perfschema/r/start_server_off.result
+++ b/mysql-test/suite/perfschema/r/start_server_off.result
@@ -11,14 +11,146 @@ count(*)
select count(*) from performance_schema.setup_consumers;
count(*)
0
-select count(*) > 3 from performance_schema.setup_instruments;
-count(*) > 3
+select count(*) > 4 from performance_schema.setup_instruments;
+count(*) > 4
0
select count(*) from performance_schema.setup_timers;
count(*)
0
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release
+select * from performance_schema.accounts;
+select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_digest;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_transactions_current;
+select * from performance_schema.events_transactions_history;
+select * from performance_schema.events_transactions_history_long;
+select * from performance_schema.events_transactions_summary_by_account_by_event_name;
+select * from performance_schema.events_transactions_summary_by_host_by_event_name;
+select * from performance_schema.events_transactions_summary_by_thread_by_event_name;
+select * from performance_schema.events_transactions_summary_by_user_by_event_name;
+select * from performance_schema.events_transactions_summary_global_by_event_name;
+select * from performance_schema.events_waits_current;
+select * from performance_schema.events_waits_history;
+select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+select * from performance_schema.events_waits_summary_by_instance;
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.file_instances;
+select * from performance_schema.file_summary_by_event_name;
+select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.hosts;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.metadata_locks;
+select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
+select * from performance_schema.performance_timers;
+select * from performance_schema.rwlock_instances;
+select * from performance_schema.session_account_connect_attrs;
+select * from performance_schema.session_connect_attrs;
+select * from performance_schema.setup_actors;
+select * from performance_schema.setup_consumers;
+select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
+select * from performance_schema.setup_timers;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.table_handles;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
+select * from performance_schema.threads;
+select * from performance_schema.users;
+select * from performance_schema.replication_connection_configuration;
+select * from performance_schema.replication_applier_configuration;
+select * from performance_schema.replication_applier_status;
+select * from performance_schema.replication_applier_status_by_coordinator;
+select * from performance_schema.global_status;
+select * from performance_schema.status_by_thread;
+select * from performance_schema.status_by_user;
+select * from performance_schema.status_by_host;
+select * from performance_schema.status_by_account;
+select * from performance_schema.session_status;
+show global variables like "performance_schema%";
+Variable_name Value
+performance_schema OFF
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_transactions_history_long_size 1000
+performance_schema_events_transactions_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 90
+performance_schema_max_cond_instances 1000
+performance_schema_max_digest_length 1024
+performance_schema_max_file_classes 80
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_index_stat 5000
+performance_schema_max_memory_classes 320
+performance_schema_max_metadata_locks 10000
+performance_schema_max_mutex_classes 210
+performance_schema_max_mutex_instances 5000
+performance_schema_max_prepared_statements_instances 100
+performance_schema_max_program_instances 5000
+performance_schema_max_rwlock_classes 50
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_sql_text_length 1024
+performance_schema_max_stage_classes 160
+performance_schema_max_statement_classes 222
+performance_schema_max_statement_stack 10
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_table_lock_stat 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_session_connect_attrs_size 2048
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
-show status like "performance_schema%";
+show global status like "performance_schema%";
+select * from information_schema.engines
+where engine = "PERFORMANCE_SCHEMA";
+ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
+PERFORMANCE_SCHEMA YES Performance Schema NO NO NO
show status like "performance_schema%";
Variable_name Value
Performance_schema_accounts_lost 0
@@ -29,9 +161,15 @@ Performance_schema_file_classes_lost 0
Performance_schema_file_handles_lost 0
Performance_schema_file_instances_lost 0
Performance_schema_hosts_lost 0
+Performance_schema_index_stat_lost 0
Performance_schema_locker_lost 0
+Performance_schema_memory_classes_lost 0
+Performance_schema_metadata_lock_lost 0
Performance_schema_mutex_classes_lost 0
Performance_schema_mutex_instances_lost 0
+Performance_schema_nested_statement_lost 0
+Performance_schema_prepared_statements_lost 0
+Performance_schema_program_lost 0
Performance_schema_rwlock_classes_lost 0
Performance_schema_rwlock_instances_lost 0
Performance_schema_session_connect_attrs_lost 0
@@ -41,6 +179,7 @@ Performance_schema_stage_classes_lost 0
Performance_schema_statement_classes_lost 0
Performance_schema_table_handles_lost 0
Performance_schema_table_instances_lost 0
+Performance_schema_table_lock_stat_lost 0
Performance_schema_thread_classes_lost 0
Performance_schema_thread_instances_lost 0
Performance_schema_users_lost 0
@@ -52,21 +191,23 @@ NAME ENABLED
select * from performance_schema.setup_instruments;
NAME ENABLED TIMED
select * from performance_schema.setup_actors;
-HOST USER ROLE
+HOST USER ROLE ENABLED HISTORY
select * from performance_schema.setup_objects;
OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
select * from performance_schema.setup_timers;
NAME TIMER_NAME
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release
insert into performance_schema.setup_objects values ('TABLE', 'myschema', 'myobject', 'YES', 'YES');
ERROR HY000: Invalid performance_schema usage
-insert into performance_schema.setup_actors values ('myhost', 'mysuser', 'myrole');
+insert into performance_schema.setup_actors values ('myhost', 'mysuser', 'myrole', 'YES', 'YES');
ERROR HY000: Invalid performance_schema usage
select * from performance_schema.setup_objects;
OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
update performance_schema.setup_objects set OBJECT_NAME = 'myobject';
delete from performance_schema.setup_objects;
select * from performance_schema.setup_actors;
-HOST USER ROLE
+HOST USER ROLE ENABLED HISTORY
update performance_schema.setup_actors set HOST = 'myhost';
delete from performance_schema.setup_actors;
truncate performance_schema.events_stages_history_long;
@@ -74,3 +215,67 @@ truncate performance_schema.events_statements_history_long;
truncate performance_schema.events_waits_history_long;
truncate performance_schema.setup_objects;
truncate performance_schema.setup_actors;
+show global status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_index_stat_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_memory_classes_lost 0
+Performance_schema_metadata_lock_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_nested_statement_lost 0
+Performance_schema_prepared_statements_lost 0
+Performance_schema_program_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_session_connect_attrs_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_table_lock_stat_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
+show session status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_index_stat_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_memory_classes_lost 0
+Performance_schema_metadata_lock_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_nested_statement_lost 0
+Performance_schema_prepared_statements_lost 0
+Performance_schema_program_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_session_connect_attrs_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_table_lock_stat_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/start_server_on.result b/mysql-test/suite/perfschema/r/start_server_on.result
index cf210c0935c..c64e4f8416d 100644
--- a/mysql-test/suite/perfschema/r/start_server_on.result
+++ b/mysql-test/suite/perfschema/r/start_server_on.result
@@ -10,16 +10,144 @@ count(*)
5
select count(*) from performance_schema.setup_consumers;
count(*)
-12
-select count(*) > 3 from performance_schema.setup_instruments;
-count(*) > 3
+15
+select count(*) > 4 from performance_schema.setup_instruments;
+count(*) > 4
1
select count(*) from performance_schema.setup_timers;
count(*)
-4
+5
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release
+select * from performance_schema.accounts;
+select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_digest;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_transactions_current;
+select * from performance_schema.events_transactions_history;
+select * from performance_schema.events_transactions_history_long;
+select * from performance_schema.events_transactions_summary_by_account_by_event_name;
+select * from performance_schema.events_transactions_summary_by_host_by_event_name;
+select * from performance_schema.events_transactions_summary_by_thread_by_event_name;
+select * from performance_schema.events_transactions_summary_by_user_by_event_name;
+select * from performance_schema.events_transactions_summary_global_by_event_name;
+select * from performance_schema.events_waits_current;
+select * from performance_schema.events_waits_history;
+select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+select * from performance_schema.events_waits_summary_by_instance;
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.file_instances;
+select * from performance_schema.file_summary_by_event_name;
+select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.hosts;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.metadata_locks;
+select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
+select * from performance_schema.performance_timers;
+select * from performance_schema.rwlock_instances;
+select * from performance_schema.session_account_connect_attrs;
+select * from performance_schema.session_connect_attrs;
+select * from performance_schema.setup_actors;
+select * from performance_schema.setup_consumers;
+select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
+select * from performance_schema.setup_timers;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.table_handles;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
+select * from performance_schema.threads;
+select * from performance_schema.users;
+select * from performance_schema.replication_connection_configuration;
+select * from performance_schema.replication_applier_configuration;
+select * from performance_schema.replication_applier_status;
+select * from performance_schema.replication_applier_status_by_coordinator;
+select * from performance_schema.global_status;
+select * from performance_schema.status_by_thread;
+select * from performance_schema.status_by_user;
+select * from performance_schema.status_by_host;
+select * from performance_schema.status_by_account;
+select * from performance_schema.session_status;
+show global variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_transactions_history_long_size 1000
+performance_schema_events_transactions_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 90
+performance_schema_max_cond_instances 1000
+performance_schema_max_digest_length 1024
+performance_schema_max_file_classes 80
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_index_stat 5000
+performance_schema_max_memory_classes 320
+performance_schema_max_metadata_locks 10000
+performance_schema_max_mutex_classes 210
+performance_schema_max_mutex_instances 5000
+performance_schema_max_prepared_statements_instances 100
+performance_schema_max_program_instances 5000
+performance_schema_max_rwlock_classes 50
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_sql_text_length 1024
+performance_schema_max_stage_classes 160
+performance_schema_max_statement_classes 222
+performance_schema_max_statement_stack 10
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_table_lock_stat 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_session_connect_attrs_size 2048
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
-show status like "performance_schema%";
-show status like "performance_schema%";
+show global status like "performance_schema%";
+show global status like "performance_schema%";
Variable_name Value
Performance_schema_accounts_lost 0
Performance_schema_cond_classes_lost 0
@@ -29,9 +157,15 @@ Performance_schema_file_classes_lost 0
Performance_schema_file_handles_lost 0
Performance_schema_file_instances_lost 0
Performance_schema_hosts_lost 0
+Performance_schema_index_stat_lost 0
Performance_schema_locker_lost 0
+Performance_schema_memory_classes_lost 0
+Performance_schema_metadata_lock_lost 0
Performance_schema_mutex_classes_lost 0
Performance_schema_mutex_instances_lost 0
+Performance_schema_nested_statement_lost 0
+Performance_schema_prepared_statements_lost 0
+Performance_schema_program_lost 0
Performance_schema_rwlock_classes_lost 0
Performance_schema_rwlock_instances_lost 0
Performance_schema_session_connect_attrs_lost 0
@@ -41,6 +175,7 @@ Performance_schema_stage_classes_lost 0
Performance_schema_statement_classes_lost 0
Performance_schema_table_handles_lost 0
Performance_schema_table_instances_lost 0
+Performance_schema_table_lock_stat_lost 0
Performance_schema_thread_classes_lost 0
Performance_schema_thread_instances_lost 0
Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/start_server_variables.result b/mysql-test/suite/perfschema/r/start_server_variables.result
index 6199fb94f92..6ed93360d9b 100644
--- a/mysql-test/suite/perfschema/r/start_server_variables.result
+++ b/mysql-test/suite/perfschema/r/start_server_variables.result
@@ -10,15 +10,143 @@ count(*)
5
select count(*) from performance_schema.setup_consumers;
count(*)
-12
-select count(*) > 3 from performance_schema.setup_instruments;
-count(*) > 3
+15
+select count(*) > 4 from performance_schema.setup_instruments;
+count(*) > 4
1
select count(*) from performance_schema.setup_timers;
count(*)
-4
+5
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release
+select * from performance_schema.accounts;
+select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_digest;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_transactions_current;
+select * from performance_schema.events_transactions_history;
+select * from performance_schema.events_transactions_history_long;
+select * from performance_schema.events_transactions_summary_by_account_by_event_name;
+select * from performance_schema.events_transactions_summary_by_host_by_event_name;
+select * from performance_schema.events_transactions_summary_by_thread_by_event_name;
+select * from performance_schema.events_transactions_summary_by_user_by_event_name;
+select * from performance_schema.events_transactions_summary_global_by_event_name;
+select * from performance_schema.events_waits_current;
+select * from performance_schema.events_waits_history;
+select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+select * from performance_schema.events_waits_summary_by_instance;
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.file_instances;
+select * from performance_schema.file_summary_by_event_name;
+select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.hosts;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.metadata_locks;
+select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
+select * from performance_schema.performance_timers;
+select * from performance_schema.rwlock_instances;
+select * from performance_schema.session_account_connect_attrs;
+select * from performance_schema.session_connect_attrs;
+select * from performance_schema.setup_actors;
+select * from performance_schema.setup_consumers;
+select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
+select * from performance_schema.setup_timers;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.table_handles;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
+select * from performance_schema.threads;
+select * from performance_schema.users;
+select * from performance_schema.replication_connection_configuration;
+select * from performance_schema.replication_applier_configuration;
+select * from performance_schema.replication_applier_status;
+select * from performance_schema.replication_applier_status_by_coordinator;
+select * from performance_schema.global_status;
+select * from performance_schema.status_by_thread;
+select * from performance_schema.status_by_user;
+select * from performance_schema.status_by_host;
+select * from performance_schema.status_by_account;
+select * from performance_schema.session_status;
+show global variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_transactions_history_long_size 1000
+performance_schema_events_transactions_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 90
+performance_schema_max_cond_instances 1000
+performance_schema_max_digest_length 1024
+performance_schema_max_file_classes 80
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_index_stat 5000
+performance_schema_max_memory_classes 320
+performance_schema_max_metadata_locks 10000
+performance_schema_max_mutex_classes 210
+performance_schema_max_mutex_instances 5000
+performance_schema_max_prepared_statements_instances 100
+performance_schema_max_program_instances 5000
+performance_schema_max_rwlock_classes 50
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_sql_text_length 1024
+performance_schema_max_stage_classes 160
+performance_schema_max_statement_classes 222
+performance_schema_max_statement_stack 10
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_table_lock_stat 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_session_connect_attrs_size 2048
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
-show status like "performance_schema%";
+show global status like "performance_schema%";
show variables where
`Variable_name` != "performance_schema_max_statement_classes" and
`Variable_name` like "performance_schema%";
@@ -30,24 +158,34 @@ performance_schema_events_stages_history_long_size 1000
performance_schema_events_stages_history_size 10
performance_schema_events_statements_history_long_size 1000
performance_schema_events_statements_history_size 10
+performance_schema_events_transactions_history_long_size 1000
+performance_schema_events_transactions_history_size 10
performance_schema_events_waits_history_long_size 10000
performance_schema_events_waits_history_size 10
performance_schema_hosts_size 100
performance_schema_max_cond_classes 90
performance_schema_max_cond_instances 1000
performance_schema_max_digest_length 1024
-performance_schema_max_file_classes 50
+performance_schema_max_file_classes 80
performance_schema_max_file_handles 32768
performance_schema_max_file_instances 10000
-performance_schema_max_mutex_classes 200
+performance_schema_max_index_stat 5000
+performance_schema_max_memory_classes 320
+performance_schema_max_metadata_locks 10000
+performance_schema_max_mutex_classes 210
performance_schema_max_mutex_instances 5000
-performance_schema_max_rwlock_classes 40
+performance_schema_max_prepared_statements_instances 100
+performance_schema_max_program_instances 5000
+performance_schema_max_rwlock_classes 50
performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
+performance_schema_max_sql_text_length 1024
performance_schema_max_stage_classes 160
+performance_schema_max_statement_stack 10
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
+performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
performance_schema_max_thread_instances 200
performance_schema_session_connect_attrs_size 2048
diff --git a/mysql-test/suite/perfschema/r/start_server_zero_digest_sql_length.result b/mysql-test/suite/perfschema/r/start_server_zero_digest_sql_length.result
new file mode 100644
index 00000000000..c21d16fca0b
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/start_server_zero_digest_sql_length.result
@@ -0,0 +1,12 @@
+USE performance_schema;
+truncate table events_statements_history_long;
+SELECT 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1
+74
+####################################
+# QUERYING PS STATEMENT DIGEST
+####################################
+SELECT event_name, digest, digest_text, sql_text FROM events_statements_history_long;
+event_name digest digest_text sql_text
+statement/sql/truncate NULL NULL NULL
+statement/sql/select NULL NULL NULL
diff --git a/mysql-test/suite/perfschema/r/statement_digest.result b/mysql-test/suite/perfschema/r/statement_digest.result
index ba2e5069c9a..1dec89e8120 100644
--- a/mysql-test/suite/perfschema/r/statement_digest.result
+++ b/mysql-test/suite/perfschema/r/statement_digest.result
@@ -1,3 +1,4 @@
+SET sql_mode='NO_ENGINE_SUBSTITUTION';
####################################
# SETUP
####################################
@@ -159,3 +160,4 @@ DROP TABLE IF EXISTS t6;
DROP TABLE IF EXISTS t11;
DROP TABLE IF EXISTS t12;
DROP DATABASE IF EXISTS statements_digest;
+SET sql_mode=default;
diff --git a/mysql-test/suite/perfschema/r/statement_digest_consumers.result b/mysql-test/suite/perfschema/r/statement_digest_consumers.result
index 140c26f4edd..9722c371ecf 100644
--- a/mysql-test/suite/perfschema/r/statement_digest_consumers.result
+++ b/mysql-test/suite/perfschema/r/statement_digest_consumers.result
@@ -19,6 +19,9 @@ events_stages_history_long YES
events_statements_current NO
events_statements_history YES
events_statements_history_long YES
+events_transactions_current YES
+events_transactions_history YES
+events_transactions_history_long YES
events_waits_current YES
events_waits_history YES
events_waits_history_long YES
diff --git a/mysql-test/suite/perfschema/r/statement_digest_consumers2.result b/mysql-test/suite/perfschema/r/statement_digest_consumers2.result
index 54eba51c1ed..b59c4f06808 100644
--- a/mysql-test/suite/perfschema/r/statement_digest_consumers2.result
+++ b/mysql-test/suite/perfschema/r/statement_digest_consumers2.result
@@ -19,6 +19,9 @@ events_stages_history_long YES
events_statements_current YES
events_statements_history YES
events_statements_history_long YES
+events_transactions_current YES
+events_transactions_history YES
+events_transactions_history_long YES
events_waits_current YES
events_waits_history YES
events_waits_history_long YES
diff --git a/mysql-test/suite/perfschema/r/statement_digest_long_query.result b/mysql-test/suite/perfschema/r/statement_digest_long_query.result
index 1c581085eef..0ac1b5eb3b2 100644
--- a/mysql-test/suite/perfschema/r/statement_digest_long_query.result
+++ b/mysql-test/suite/perfschema/r/statement_digest_long_query.result
@@ -1,8 +1,8 @@
USE performance_schema;
truncate table events_statements_summary_by_digest;
-SELECT 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
+SELECT 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1
-511
+594
####################################
# QUERYING PS STATEMENT DIGEST
####################################
diff --git a/mysql-test/suite/perfschema/r/statement_program_concurrency.result b/mysql-test/suite/perfschema/r/statement_program_concurrency.result
new file mode 100644
index 00000000000..5635ae6ceea
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/statement_program_concurrency.result
@@ -0,0 +1,117 @@
+TRUNCATE TABLE performance_schema.events_statements_summary_by_program;
+TRUNCATE TABLE performance_schema.events_statements_history;
+# concurrency check through multi connections
+CREATE DATABASE db1;
+CREATE DATABASE db2;
+CREATE DATABASE db3;
+connect con1,localhost,root,,db1;
+USE db1;
+CREATE TABLE t1(
+i INT NOT NULL
+);
+LOAD DATA INFILE '../../std_data/wl5766_data.txt' INTO TABLE t1;
+CREATE PROCEDURE proc()
+BEGIN
+INSERT INTO t1 SELECT * FROM t1;
+END|
+CALL proc();;
+connect con2,localhost,root,,db2;
+USE db2;
+CREATE TABLE t2(
+i INT NOT NULL
+);
+LOAD DATA INFILE '../../std_data/wl5766_data.txt' INTO TABLE t2;
+CREATE FUNCTION addition(x INT, y INT) RETURNS INT
+BEGIN
+INSERT INTO t2 SELECT * FROM t2;
+RETURN x+y;
+END|
+SELECT addition(1234,9876);;
+connect con3,localhost,root,,db3;
+USE db3;
+CREATE TABLE t(
+i INT NOT NULL,
+j INT
+);
+CREATE TABLE t3(
+i INT NOT NULL
+);
+LOAD DATA INFILE '../../std_data/wl5766_data.txt' INTO TABLE t3;
+INSERT INTO t VALUES ( 10,1000 );
+CREATE TRIGGER trg AFTER INSERT ON t FOR EACH ROW
+INSERT INTO t3 SELECT * FROM t3;
+INSERT INTO t VALUES ( 20,2000);;
+connection con1;
+connection con2;
+addition(1234,9876)
+11110
+connection con3;
+connection default;
+SELECT OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME, COUNT_STAR, COUNT_STATEMENTS
+FROM performance_schema.events_statements_summary_by_program
+WHERE OBJECT_SCHEMA='db1' OR OBJECT_SCHEMA='db2' OR OBJECT_SCHEMA='db3'
+ ORDER BY OBJECT_SCHEMA, OBJECT_NAME;
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME COUNT_STAR COUNT_STATEMENTS
+PROCEDURE db1 proc 1 1
+FUNCTION db2 addition 1 2
+TRIGGER db3 trg 1 1
+SELECT EVENT_NAME, SQL_TEXT, CURRENT_SCHEMA, OBJECT_TYPE, OBJECT_SCHEMA,
+OBJECT_NAME, NESTING_EVENT_TYPE, NESTING_EVENT_LEVEL FROM
+performance_schema.events_statements_history WHERE CURRENT_SCHEMA='db1'
+ OR CURRENT_SCHEMA='db2' OR CURRENT_SCHEMA='db3'
+ORDER BY CURRENT_SCHEMA, OBJECT_NAME;
+EVENT_NAME SQL_TEXT CURRENT_SCHEMA OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME NESTING_EVENT_TYPE NESTING_EVENT_LEVEL
+statement/sql/change_db USE db1 db1 NULL NULL NULL NULL 0
+statement/sql/create_table CREATE TABLE t1(
+i INT NOT NULL
+) db1 NULL NULL NULL NULL 0
+statement/sql/load LOAD DATA INFILE '../../std_data/wl5766_data.txt' INTO TABLE t1 db1 NULL NULL NULL NULL 0
+statement/sql/create_procedure CREATE PROCEDURE proc()
+BEGIN
+INSERT INTO t1 SELECT * FROM t1;
+END db1 NULL NULL NULL NULL 0
+statement/sql/call_procedure CALL proc() db1 NULL NULL NULL NULL 0
+statement/sp/stmt INSERT INTO t1 SELECT * FROM t1 db1 PROCEDURE db1 proc STATEMENT 1
+statement/sql/change_db USE db2 db2 NULL NULL NULL NULL 0
+statement/sql/create_table CREATE TABLE t2(
+i INT NOT NULL
+) db2 NULL NULL NULL NULL 0
+statement/sql/load LOAD DATA INFILE '../../std_data/wl5766_data.txt' INTO TABLE t2 db2 NULL NULL NULL NULL 0
+statement/sql/create_function CREATE FUNCTION addition(x INT, y INT) RETURNS INT
+BEGIN
+INSERT INTO t2 SELECT * FROM t2;
+RETURN x+y;
+END db2 NULL NULL NULL NULL 0
+statement/sql/select SELECT addition(1234,9876) db2 NULL NULL NULL NULL 0
+statement/sp/stmt INSERT INTO t2 SELECT * FROM t2 db2 FUNCTION db2 addition STATEMENT 1
+statement/sp/freturn NULL db2 FUNCTION db2 addition STATEMENT 1
+statement/sql/change_db USE db3 db3 NULL NULL NULL NULL 0
+statement/sql/create_table CREATE TABLE t(
+i INT NOT NULL,
+j INT
+) db3 NULL NULL NULL NULL 0
+statement/sql/create_table CREATE TABLE t3(
+i INT NOT NULL
+) db3 NULL NULL NULL NULL 0
+statement/sql/load LOAD DATA INFILE '../../std_data/wl5766_data.txt' INTO TABLE t3 db3 NULL NULL NULL NULL 0
+statement/sql/insert INSERT INTO t VALUES ( 10,1000 ) db3 NULL NULL NULL NULL 0
+statement/sql/create_trigger CREATE TRIGGER trg AFTER INSERT ON t FOR EACH ROW
+INSERT INTO t3 SELECT * FROM t3 db3 NULL NULL NULL NULL 0
+statement/sql/insert INSERT INTO t VALUES ( 20,2000) db3 NULL NULL NULL NULL 0
+statement/sp/stmt INSERT INTO t3 SELECT * FROM t3 db3 TRIGGER db3 trg STATEMENT 1
+TRUNCATE TABLE performance_schema.events_statements_summary_by_program;
+TRUNCATE TABLE performance_schema.events_statements_history;
+# Clean-up
+DROP PROCEDURE db1.proc;
+DROP FUNCTION db2.addition;
+DROP TRIGGER db3.trg;
+DROP TABLE db1.t1;
+DROP TABLE db2.t2;
+DROP TABLE db3.t3;
+DROP TABLE db3.t;
+DROP DATABASE db1;
+DROP DATABASE db2;
+DROP DATABASE db3;
+disconnect con1;
+disconnect con2;
+disconnect con3;
diff --git a/mysql-test/suite/perfschema/r/statement_program_lost_inst.result b/mysql-test/suite/perfschema/r/statement_program_lost_inst.result
new file mode 100644
index 00000000000..ebacc9a8f7e
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/statement_program_lost_inst.result
@@ -0,0 +1,335 @@
+show databases;
+Database
+information_schema
+mtr
+mysql
+performance_schema
+test
+select count(*) from performance_schema.performance_timers;
+count(*)
+5
+select count(*) from performance_schema.setup_consumers;
+count(*)
+15
+select count(*) > 4 from performance_schema.setup_instruments;
+count(*) > 4
+1
+select count(*) from performance_schema.setup_timers;
+count(*)
+5
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release
+select * from performance_schema.accounts;
+select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_digest;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_transactions_current;
+select * from performance_schema.events_transactions_history;
+select * from performance_schema.events_transactions_history_long;
+select * from performance_schema.events_transactions_summary_by_account_by_event_name;
+select * from performance_schema.events_transactions_summary_by_host_by_event_name;
+select * from performance_schema.events_transactions_summary_by_thread_by_event_name;
+select * from performance_schema.events_transactions_summary_by_user_by_event_name;
+select * from performance_schema.events_transactions_summary_global_by_event_name;
+select * from performance_schema.events_waits_current;
+select * from performance_schema.events_waits_history;
+select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+select * from performance_schema.events_waits_summary_by_instance;
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.file_instances;
+select * from performance_schema.file_summary_by_event_name;
+select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.hosts;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.metadata_locks;
+select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
+select * from performance_schema.performance_timers;
+select * from performance_schema.rwlock_instances;
+select * from performance_schema.session_account_connect_attrs;
+select * from performance_schema.session_connect_attrs;
+select * from performance_schema.setup_actors;
+select * from performance_schema.setup_consumers;
+select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
+select * from performance_schema.setup_timers;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.table_handles;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
+select * from performance_schema.threads;
+select * from performance_schema.users;
+select * from performance_schema.replication_connection_configuration;
+select * from performance_schema.replication_applier_configuration;
+select * from performance_schema.replication_applier_status;
+select * from performance_schema.replication_applier_status_by_coordinator;
+select * from performance_schema.global_status;
+select * from performance_schema.status_by_thread;
+select * from performance_schema.status_by_user;
+select * from performance_schema.status_by_host;
+select * from performance_schema.status_by_account;
+select * from performance_schema.session_status;
+show global variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_transactions_history_long_size 1000
+performance_schema_events_transactions_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 90
+performance_schema_max_cond_instances 1000
+performance_schema_max_digest_length 1024
+performance_schema_max_file_classes 80
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_index_stat 5000
+performance_schema_max_memory_classes 320
+performance_schema_max_metadata_locks 10000
+performance_schema_max_mutex_classes 210
+performance_schema_max_mutex_instances 5000
+performance_schema_max_prepared_statements_instances 100
+performance_schema_max_program_instances 7
+performance_schema_max_rwlock_classes 50
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_sql_text_length 1024
+performance_schema_max_stage_classes 160
+performance_schema_max_statement_classes 222
+performance_schema_max_statement_stack 2
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_table_lock_stat 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_session_connect_attrs_size 2048
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
+show engine PERFORMANCE_SCHEMA status;
+show global status like "performance_schema%";
+show global variables like "performance_schema_max_program_instances";
+Variable_name Value
+performance_schema_max_program_instances 7
+show global variables like "performance_schema_max_statement_stack";
+Variable_name Value
+performance_schema_max_statement_stack 2
+#####################
+# Setup
+#####################
+# SET-UP
+CREATE DATABASE nested_sp;
+USE nested_sp;
+CREATE TABLE t1(
+id CHAR(16) NOT NULL DEFAULT '',
+data INT NOT NULL
+);
+CREATE TABLE t2(
+n INT UNSIGNED NOT NULL,
+f BIGINT UNSIGNED
+) engine=innodb;
+############################
+# Creating Stored Programs #
+############################
+CREATE PROCEDURE c1(x INT)
+CALL c2("c", x)|
+CREATE PROCEDURE c2(s CHAR(16), x INT)
+CALL c3(x, s)|
+CREATE PROCEDURE c3(x INT, s CHAR(16))
+CALL c4("level", x, s)|
+CREATE PROCEDURE c4(l CHAR(8), x INT, s CHAR(16))
+INSERT INTO t1 VALUES (concat(l,s), x)|
+CREATE PROCEDURE iotest(x1 CHAR(16), x2 CHAR(16), y INT)
+BEGIN
+CALL inc2(x2, y);
+INSERT INTO t1 VALUES (x1, y);
+END|
+CREATE PROCEDURE inc2(x CHAR(16), y INT)
+BEGIN
+CALL inc(y);
+INSERT INTO t1 VALUES (x, y);
+END|
+CREATE PROCEDURE inc(inout io INT)
+SET io = io + 1|
+CREATE FUNCTION mul(x INT, y INT) RETURNS INT
+RETURN x*y|
+CREATE FUNCTION inc(i INT) RETURNS INT
+RETURN i+1|
+CREATE FUNCTION fac(n INT UNSIGNED) RETURNS BIGINT UNSIGNED
+BEGIN
+DECLARE f BIGINT UNSIGNED DEFAULT 1;
+WHILE n > 1 DO
+SET f = f * n;
+SET n = n - 1;
+END WHILE;
+RETURN f;
+END|
+CREATE FUNCTION fun(i INT, u INT UNSIGNED) RETURNS DOUBLE
+RETURN mul(inc(i), fac(u))|
+CREATE PROCEDURE ifac(n INT UNSIGNED)
+BEGIN
+DECLARE i BIGINT UNSIGNED DEFAULT 1;
+IF n > 20 THEN
+SET n = 20; # bigint overflow otherwise
+END IF;
+WHILE i <= n DO
+BEGIN
+INSERT INTO t2 VALUES (i, fac(i));
+SET i = i + 1;
+END;
+END WHILE;
+END|
+CREATE TRIGGER trg AFTER INSERT ON t1 FOR EACH ROW
+CALL ifac(10)|
+TRUNCATE performance_schema.events_statements_summary_by_program;
+SELECT OBJECT_TYPE, OBJECT_NAME, OBJECT_SCHEMA FROM
+performance_schema.events_statements_summary_by_program
+WHERE OBJECT_SCHEMA='nested_sp' ORDER BY OBJECT_NAME;
+OBJECT_TYPE OBJECT_NAME OBJECT_SCHEMA
+Flush status;
+show global status like "%performance_schema_program_lost%";
+Variable_name Value
+Performance_schema_program_lost 0
+show global status like "%performance_schema_nested_statement_lost%";
+Variable_name Value
+Performance_schema_nested_statement_lost 0
+#####################
+# Executing Queries
+#####################
+#####################
+# Executing queries #
+#####################
+CALL c1(42);
+SELECT * FROM t1;
+id data
+levelc 42
+DELETE FROM t1;
+CALL iotest("io1", "io2", 1);
+SELECT * FROM t1 ORDER BY data DESC;
+id data
+io2 2
+io1 1
+DELETE FROM t1;
+SELECT fun(6,10);
+fun(6,10)
+25401600
+INSERT INTO t1 VALUES (20,13);
+SELECT * FROM t2;
+n f
+1 1
+2 2
+3 6
+4 24
+5 120
+6 720
+7 5040
+8 40320
+9 362880
+10 3628800
+1 1
+2 2
+3 6
+4 24
+5 120
+6 720
+7 5040
+8 40320
+9 362880
+10 3628800
+1 1
+2 2
+3 6
+4 24
+5 120
+6 720
+7 5040
+8 40320
+9 362880
+10 3628800
+1 1
+2 2
+3 6
+4 24
+5 120
+6 720
+7 5040
+8 40320
+9 362880
+10 3628800
+###########################################
+# Quering PS statement summary table #
+###########################################
+SELECT OBJECT_TYPE, OBJECT_NAME, OBJECT_SCHEMA
+FROM performance_schema.events_statements_summary_by_program
+WHERE OBJECT_SCHEMA='nested_sp' ORDER BY OBJECT_NAME;
+OBJECT_TYPE OBJECT_NAME OBJECT_SCHEMA
+PROCEDURE c1 nested_sp
+PROCEDURE c2 nested_sp
+PROCEDURE c3 nested_sp
+PROCEDURE c4 nested_sp
+FUNCTION fac nested_sp
+PROCEDURE ifac nested_sp
+TRIGGER trg nested_sp
+show global status like "%performance_schema_program_lost%";
+Variable_name Value
+Performance_schema_program_lost 6
+show global status like "%performance_schema_nested_statement_lost%";
+Variable_name Value
+Performance_schema_nested_statement_lost 1062
+#####################
+# Cleanup
+#####################
+DROP PROCEDURE c4;
+DROP PROCEDURE c3;
+DROP PROCEDURE c2;
+DROP PROCEDURE c1;
+DROP PROCEDURE inc;
+DROP PROCEDURE inc2;
+DROP PROCEDURE iotest;
+DROP FUNCTION mul;
+DROP FUNCTION inc;
+DROP FUNCTION fac;
+DROP FUNCTION fun;
+DROP PROCEDURE ifac;
+DROP TRIGGER trg;
+DROP TABLE t1,t2;
+DROP DATABASE nested_sp;
diff --git a/mysql-test/suite/perfschema/r/statement_program_nested.result b/mysql-test/suite/perfschema/r/statement_program_nested.result
new file mode 100644
index 00000000000..95cbdc81a1f
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/statement_program_nested.result
@@ -0,0 +1,2333 @@
+TRUNCATE TABLE performance_schema.events_statements_summary_by_program;
+TRUNCATE TABLE performance_schema.events_statements_history_long;
+#################################################
+# Quering PS statement summary and history_long #
+#################################################
+# SET-UP
+CREATE DATABASE nested_sp;
+USE nested_sp;
+CREATE TABLE t1(
+id CHAR(16) NOT NULL DEFAULT '',
+data INT NOT NULL
+);
+CREATE TABLE t2(
+n INT UNSIGNED NOT NULL,
+f BIGINT UNSIGNED
+) engine=innodb;
+############################
+# Creating Stored Programs #
+############################
+CREATE PROCEDURE c1(x INT)
+CALL c2("c", x)|
+CREATE PROCEDURE c2(s CHAR(16), x INT)
+CALL c3(x, s)|
+CREATE PROCEDURE c3(x INT, s CHAR(16))
+CALL c4("level", x, s)|
+CREATE PROCEDURE c4(l CHAR(8), x INT, s CHAR(16))
+INSERT INTO t1 VALUES (concat(l,s), x)|
+CREATE PROCEDURE iotest(x1 CHAR(16), x2 CHAR(16), y INT)
+BEGIN
+CALL inc2(x2, y);
+INSERT INTO t1 VALUES (x1, y);
+END|
+CREATE PROCEDURE inc2(x CHAR(16), y INT)
+BEGIN
+CALL inc(y);
+INSERT INTO t1 VALUES (x, y);
+END|
+CREATE PROCEDURE inc(inout io INT)
+SET io = io + 1|
+CREATE FUNCTION mul(x INT, y INT) RETURNS INT
+RETURN x*y|
+CREATE FUNCTION inc(i INT) RETURNS INT
+RETURN i+1|
+CREATE FUNCTION fac(n INT UNSIGNED) RETURNS BIGINT UNSIGNED
+BEGIN
+DECLARE f BIGINT UNSIGNED DEFAULT 1;
+WHILE n > 1 DO
+SET f = f * n;
+SET n = n - 1;
+END WHILE;
+RETURN f;
+END|
+CREATE FUNCTION fun(i INT, u INT UNSIGNED) RETURNS DOUBLE
+RETURN mul(inc(i), fac(u))|
+CREATE PROCEDURE ifac(n INT UNSIGNED)
+BEGIN
+DECLARE i BIGINT UNSIGNED DEFAULT 1;
+IF n > 20 THEN
+SET n = 20; # bigint overflow otherwise
+END IF;
+WHILE i <= n DO
+BEGIN
+INSERT INTO t2 VALUES (i, fac(i));
+SET i = i + 1;
+END;
+END WHILE;
+END|
+CREATE TRIGGER trg AFTER INSERT ON t1 FOR EACH ROW
+CALL ifac(10)|
+#####################
+# Executing queries #
+#####################
+CALL c1(42);
+SELECT * FROM t1;
+id data
+levelc 42
+DELETE FROM t1;
+CALL iotest("io1", "io2", 1);
+SELECT * FROM t1 ORDER BY data DESC;
+id data
+io2 2
+io1 1
+DELETE FROM t1;
+SELECT fun(6,10);
+fun(6,10)
+25401600
+INSERT INTO t1 VALUES (20,13);
+SELECT * FROM t2;
+n f
+1 1
+2 2
+3 6
+4 24
+5 120
+6 720
+7 5040
+8 40320
+9 362880
+10 3628800
+1 1
+2 2
+3 6
+4 24
+5 120
+6 720
+7 5040
+8 40320
+9 362880
+10 3628800
+1 1
+2 2
+3 6
+4 24
+5 120
+6 720
+7 5040
+8 40320
+9 362880
+10 3628800
+1 1
+2 2
+3 6
+4 24
+5 120
+6 720
+7 5040
+8 40320
+9 362880
+10 3628800
+SELECT EVENT_NAME, SQL_TEXT, CURRENT_SCHEMA, OBJECT_TYPE, OBJECT_SCHEMA,
+OBJECT_NAME, NESTING_EVENT_TYPE, NESTING_EVENT_LEVEL
+FROM performance_schema.events_statements_history_long WHERE
+CURRENT_SCHEMA='nested_sp' ORDER BY
+OBJECT_NAME,NESTING_EVENT_LEVEL,SQL_TEXT,EVENT_NAME;
+EVENT_NAME SQL_TEXT CURRENT_SCHEMA OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME NESTING_EVENT_TYPE NESTING_EVENT_LEVEL
+statement/sql/call_procedure CALL c1(42) nested_sp NULL NULL NULL NULL 0
+statement/sql/call_procedure CALL iotest("io1", "io2", 1) nested_sp NULL NULL NULL NULL 0
+statement/sql/delete DELETE FROM t1 nested_sp NULL NULL NULL NULL 0
+statement/sql/delete DELETE FROM t1 nested_sp NULL NULL NULL NULL 0
+statement/sql/insert INSERT INTO t1 VALUES (20,13) nested_sp NULL NULL NULL NULL 0
+statement/sql/select SELECT * FROM t1 nested_sp NULL NULL NULL NULL 0
+statement/sql/select SELECT * FROM t1 ORDER BY data DESC nested_sp NULL NULL NULL NULL 0
+statement/sql/select SELECT * FROM t2 nested_sp NULL NULL NULL NULL 0
+statement/sql/select SELECT fun(6,10) nested_sp NULL NULL NULL NULL 0
+statement/sp/stmt CALL c2("c", x) nested_sp PROCEDURE nested_sp c1 STATEMENT 1
+statement/sp/stmt CALL c3(x, s) nested_sp PROCEDURE nested_sp c2 STATEMENT 2
+statement/sp/stmt CALL c4("level", x, s) nested_sp PROCEDURE nested_sp c3 STATEMENT 3
+statement/sp/stmt INSERT INTO t1 VALUES (concat(l,s), x) nested_sp PROCEDURE nested_sp c4 STATEMENT 4
+statement/sp/freturn NULL nested_sp FUNCTION nested_sp fac STATEMENT 2
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 2
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 2
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 2
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 2
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 2
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 2
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 2
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 2
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 2
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 2
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 2
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 2
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 2
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 2
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 2
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 2
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 2
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 2
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 2
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 2
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 2
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 2
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 2
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 2
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 2
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 2
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 2
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 2
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 2
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 2
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 2
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 2
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 2
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 2
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 2
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 2
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 2
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 2
+statement/sp/freturn NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/freturn NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/freturn NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/freturn NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/freturn NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/freturn NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/freturn NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/freturn NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/freturn NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/freturn NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 3
+statement/sp/freturn NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/freturn NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/freturn NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/freturn NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/freturn NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/freturn NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/freturn NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/freturn NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/freturn NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/freturn NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 4
+statement/sp/freturn NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/freturn NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/freturn NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/freturn NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/freturn NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/freturn NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/freturn NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/freturn NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/freturn NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/freturn NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 5
+statement/sp/freturn NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/freturn NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/freturn NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/freturn NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/freturn NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/jump NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/jump_if_not NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/set NULL nested_sp FUNCTION nested_sp fac STATEMENT 7
+statement/sp/freturn NULL nested_sp FUNCTION nested_sp fun STATEMENT 1
+statement/sp/jump NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 2
+statement/sp/jump NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 2
+statement/sp/jump NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 2
+statement/sp/jump NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 2
+statement/sp/jump NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 2
+statement/sp/jump NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 2
+statement/sp/jump NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 2
+statement/sp/jump NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 2
+statement/sp/jump NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 2
+statement/sp/jump NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 2
+statement/sp/jump_if_not NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 2
+statement/sp/jump_if_not NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 2
+statement/sp/jump_if_not NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 2
+statement/sp/jump_if_not NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 2
+statement/sp/jump_if_not NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 2
+statement/sp/jump_if_not NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 2
+statement/sp/jump_if_not NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 2
+statement/sp/jump_if_not NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 2
+statement/sp/jump_if_not NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 2
+statement/sp/jump_if_not NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 2
+statement/sp/jump_if_not NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 2
+statement/sp/jump_if_not NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 2
+statement/sp/set NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 2
+statement/sp/set NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 2
+statement/sp/set NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 2
+statement/sp/set NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 2
+statement/sp/set NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 2
+statement/sp/set NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 2
+statement/sp/set NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 2
+statement/sp/set NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 2
+statement/sp/set NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 2
+statement/sp/set NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 2
+statement/sp/set NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 2
+statement/sp/stmt INSERT INTO t2 VALUES (i, fac(i)) nested_sp PROCEDURE nested_sp ifac STATEMENT 2
+statement/sp/stmt INSERT INTO t2 VALUES (i, fac(i)) nested_sp PROCEDURE nested_sp ifac STATEMENT 2
+statement/sp/stmt INSERT INTO t2 VALUES (i, fac(i)) nested_sp PROCEDURE nested_sp ifac STATEMENT 2
+statement/sp/stmt INSERT INTO t2 VALUES (i, fac(i)) nested_sp PROCEDURE nested_sp ifac STATEMENT 2
+statement/sp/stmt INSERT INTO t2 VALUES (i, fac(i)) nested_sp PROCEDURE nested_sp ifac STATEMENT 2
+statement/sp/stmt INSERT INTO t2 VALUES (i, fac(i)) nested_sp PROCEDURE nested_sp ifac STATEMENT 2
+statement/sp/stmt INSERT INTO t2 VALUES (i, fac(i)) nested_sp PROCEDURE nested_sp ifac STATEMENT 2
+statement/sp/stmt INSERT INTO t2 VALUES (i, fac(i)) nested_sp PROCEDURE nested_sp ifac STATEMENT 2
+statement/sp/stmt INSERT INTO t2 VALUES (i, fac(i)) nested_sp PROCEDURE nested_sp ifac STATEMENT 2
+statement/sp/stmt INSERT INTO t2 VALUES (i, fac(i)) nested_sp PROCEDURE nested_sp ifac STATEMENT 2
+statement/sp/jump NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 3
+statement/sp/jump NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 3
+statement/sp/jump NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 3
+statement/sp/jump NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 3
+statement/sp/jump NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 3
+statement/sp/jump NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 3
+statement/sp/jump NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 3
+statement/sp/jump NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 3
+statement/sp/jump NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 3
+statement/sp/jump NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 3
+statement/sp/jump_if_not NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 3
+statement/sp/jump_if_not NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 3
+statement/sp/jump_if_not NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 3
+statement/sp/jump_if_not NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 3
+statement/sp/jump_if_not NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 3
+statement/sp/jump_if_not NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 3
+statement/sp/jump_if_not NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 3
+statement/sp/jump_if_not NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 3
+statement/sp/jump_if_not NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 3
+statement/sp/jump_if_not NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 3
+statement/sp/jump_if_not NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 3
+statement/sp/jump_if_not NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 3
+statement/sp/set NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 3
+statement/sp/set NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 3
+statement/sp/set NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 3
+statement/sp/set NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 3
+statement/sp/set NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 3
+statement/sp/set NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 3
+statement/sp/set NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 3
+statement/sp/set NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 3
+statement/sp/set NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 3
+statement/sp/set NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 3
+statement/sp/set NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 3
+statement/sp/stmt INSERT INTO t2 VALUES (i, fac(i)) nested_sp PROCEDURE nested_sp ifac STATEMENT 3
+statement/sp/stmt INSERT INTO t2 VALUES (i, fac(i)) nested_sp PROCEDURE nested_sp ifac STATEMENT 3
+statement/sp/stmt INSERT INTO t2 VALUES (i, fac(i)) nested_sp PROCEDURE nested_sp ifac STATEMENT 3
+statement/sp/stmt INSERT INTO t2 VALUES (i, fac(i)) nested_sp PROCEDURE nested_sp ifac STATEMENT 3
+statement/sp/stmt INSERT INTO t2 VALUES (i, fac(i)) nested_sp PROCEDURE nested_sp ifac STATEMENT 3
+statement/sp/stmt INSERT INTO t2 VALUES (i, fac(i)) nested_sp PROCEDURE nested_sp ifac STATEMENT 3
+statement/sp/stmt INSERT INTO t2 VALUES (i, fac(i)) nested_sp PROCEDURE nested_sp ifac STATEMENT 3
+statement/sp/stmt INSERT INTO t2 VALUES (i, fac(i)) nested_sp PROCEDURE nested_sp ifac STATEMENT 3
+statement/sp/stmt INSERT INTO t2 VALUES (i, fac(i)) nested_sp PROCEDURE nested_sp ifac STATEMENT 3
+statement/sp/stmt INSERT INTO t2 VALUES (i, fac(i)) nested_sp PROCEDURE nested_sp ifac STATEMENT 3
+statement/sp/jump NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 4
+statement/sp/jump NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 4
+statement/sp/jump NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 4
+statement/sp/jump NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 4
+statement/sp/jump NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 4
+statement/sp/jump NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 4
+statement/sp/jump NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 4
+statement/sp/jump NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 4
+statement/sp/jump NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 4
+statement/sp/jump NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 4
+statement/sp/jump_if_not NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 4
+statement/sp/jump_if_not NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 4
+statement/sp/jump_if_not NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 4
+statement/sp/jump_if_not NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 4
+statement/sp/jump_if_not NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 4
+statement/sp/jump_if_not NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 4
+statement/sp/jump_if_not NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 4
+statement/sp/jump_if_not NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 4
+statement/sp/jump_if_not NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 4
+statement/sp/jump_if_not NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 4
+statement/sp/jump_if_not NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 4
+statement/sp/jump_if_not NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 4
+statement/sp/set NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 4
+statement/sp/set NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 4
+statement/sp/set NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 4
+statement/sp/set NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 4
+statement/sp/set NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 4
+statement/sp/set NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 4
+statement/sp/set NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 4
+statement/sp/set NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 4
+statement/sp/set NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 4
+statement/sp/set NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 4
+statement/sp/set NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 4
+statement/sp/stmt INSERT INTO t2 VALUES (i, fac(i)) nested_sp PROCEDURE nested_sp ifac STATEMENT 4
+statement/sp/stmt INSERT INTO t2 VALUES (i, fac(i)) nested_sp PROCEDURE nested_sp ifac STATEMENT 4
+statement/sp/stmt INSERT INTO t2 VALUES (i, fac(i)) nested_sp PROCEDURE nested_sp ifac STATEMENT 4
+statement/sp/stmt INSERT INTO t2 VALUES (i, fac(i)) nested_sp PROCEDURE nested_sp ifac STATEMENT 4
+statement/sp/stmt INSERT INTO t2 VALUES (i, fac(i)) nested_sp PROCEDURE nested_sp ifac STATEMENT 4
+statement/sp/stmt INSERT INTO t2 VALUES (i, fac(i)) nested_sp PROCEDURE nested_sp ifac STATEMENT 4
+statement/sp/stmt INSERT INTO t2 VALUES (i, fac(i)) nested_sp PROCEDURE nested_sp ifac STATEMENT 4
+statement/sp/stmt INSERT INTO t2 VALUES (i, fac(i)) nested_sp PROCEDURE nested_sp ifac STATEMENT 4
+statement/sp/stmt INSERT INTO t2 VALUES (i, fac(i)) nested_sp PROCEDURE nested_sp ifac STATEMENT 4
+statement/sp/stmt INSERT INTO t2 VALUES (i, fac(i)) nested_sp PROCEDURE nested_sp ifac STATEMENT 4
+statement/sp/jump NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 6
+statement/sp/jump NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 6
+statement/sp/jump NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 6
+statement/sp/jump NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 6
+statement/sp/jump NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 6
+statement/sp/jump NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 6
+statement/sp/jump_if_not NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 6
+statement/sp/jump_if_not NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 6
+statement/sp/jump_if_not NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 6
+statement/sp/jump_if_not NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 6
+statement/sp/jump_if_not NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 6
+statement/sp/jump_if_not NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 6
+statement/sp/set NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 6
+statement/sp/set NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 6
+statement/sp/set NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 6
+statement/sp/set NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 6
+statement/sp/set NULL nested_sp PROCEDURE nested_sp ifac STATEMENT 6
+statement/sp/stmt INSERT INTO t2 VALUES (i, fac(i)) nested_sp PROCEDURE nested_sp ifac STATEMENT 6
+statement/sp/stmt INSERT INTO t2 VALUES (i, fac(i)) nested_sp PROCEDURE nested_sp ifac STATEMENT 6
+statement/sp/stmt INSERT INTO t2 VALUES (i, fac(i)) nested_sp PROCEDURE nested_sp ifac STATEMENT 6
+statement/sp/stmt INSERT INTO t2 VALUES (i, fac(i)) nested_sp PROCEDURE nested_sp ifac STATEMENT 6
+statement/sp/stmt INSERT INTO t2 VALUES (i, fac(i)) nested_sp PROCEDURE nested_sp ifac STATEMENT 6
+statement/sp/freturn NULL nested_sp FUNCTION nested_sp inc STATEMENT 2
+statement/sp/set NULL nested_sp PROCEDURE nested_sp inc STATEMENT 3
+statement/sp/stmt CALL inc(y) nested_sp PROCEDURE nested_sp inc2 STATEMENT 2
+statement/sp/stmt INSERT INTO t1 VALUES (x, y) nested_sp PROCEDURE nested_sp inc2 STATEMENT 2
+statement/sp/stmt CALL inc2(x2, y) nested_sp PROCEDURE nested_sp iotest STATEMENT 1
+statement/sp/stmt INSERT INTO t1 VALUES (x1, y) nested_sp PROCEDURE nested_sp iotest STATEMENT 1
+statement/sp/freturn NULL nested_sp FUNCTION nested_sp mul STATEMENT 2
+statement/sp/stmt CALL ifac(10) nested_sp TRIGGER nested_sp trg TRANSACTION 1
+statement/sp/stmt CALL ifac(10) nested_sp TRIGGER nested_sp trg TRANSACTION 2
+statement/sp/stmt CALL ifac(10) nested_sp TRIGGER nested_sp trg TRANSACTION 3
+statement/sp/stmt CALL ifac(10) nested_sp TRIGGER nested_sp trg TRANSACTION 5
+SELECT OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME, COUNT_STAR, COUNT_STATEMENTS
+FROM performance_schema.events_statements_summary_by_program
+WHERE OBJECT_SCHEMA='nested_sp' ORDER BY OBJECT_NAME;
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME COUNT_STAR COUNT_STATEMENTS
+PROCEDURE nested_sp c1 1 1
+PROCEDURE nested_sp c2 1 1
+PROCEDURE nested_sp c3 1 1
+PROCEDURE nested_sp c4 1 1
+FUNCTION nested_sp fac 41 879
+FUNCTION nested_sp fun 1 1
+PROCEDURE nested_sp ifac 4 172
+PROCEDURE nested_sp inc 1 1
+FUNCTION nested_sp inc 1 1
+PROCEDURE nested_sp inc2 1 2
+PROCEDURE nested_sp iotest 1 2
+FUNCTION nested_sp mul 1 1
+TRIGGER nested_sp trg 4 4
+# clean-up
+TRUNCATE TABLE performance_schema.events_statements_summary_by_program;
+TRUNCATE TABLE performance_schema.events_statements_history_long;
+SELECT OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME, COUNT_STAR, COUNT_STATEMENTS
+FROM performance_schema.events_statements_summary_by_program
+WHERE OBJECT_SCHEMA='nested_sp' ORDER BY OBJECT_NAME;
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME COUNT_STAR COUNT_STATEMENTS
+PROCEDURE nested_sp c1 0 0
+PROCEDURE nested_sp c2 0 0
+PROCEDURE nested_sp c3 0 0
+PROCEDURE nested_sp c4 0 0
+FUNCTION nested_sp fac 0 0
+FUNCTION nested_sp fun 0 0
+PROCEDURE nested_sp ifac 0 0
+PROCEDURE nested_sp inc 0 0
+FUNCTION nested_sp inc 0 0
+PROCEDURE nested_sp inc2 0 0
+PROCEDURE nested_sp iotest 0 0
+FUNCTION nested_sp mul 0 0
+TRIGGER nested_sp trg 0 0
+DROP PROCEDURE c4;
+DROP PROCEDURE c3;
+DROP PROCEDURE c2;
+DROP PROCEDURE c1;
+DROP PROCEDURE inc;
+DROP PROCEDURE inc2;
+DROP PROCEDURE iotest;
+DROP FUNCTION mul;
+DROP FUNCTION inc;
+DROP FUNCTION fac;
+DROP FUNCTION fun;
+DROP PROCEDURE ifac;
+DROP TRIGGER trg;
+DROP TABLE t1,t2;
+DROP DATABASE nested_sp;
+SELECT OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME, COUNT_STAR, COUNT_STATEMENTS
+FROM performance_schema.events_statements_summary_by_program
+WHERE OBJECT_SCHEMA='nested_sp' ORDER BY OBJECT_NAME;
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME COUNT_STAR COUNT_STATEMENTS
+# SET-UP
+CREATE DATABASE nested_sp;
+USE nested_sp;
+CREATE TABLE t1(
+id CHAR(16) NOT NULL DEFAULT '',
+data INT NOT NULL
+);
+CREATE TABLE t2(
+n INT UNSIGNED NOT NULL,
+f BIGINT UNSIGNED
+) engine=innodb;
+############################
+# Creating Stored Programs #
+############################
+CREATE PROCEDURE c1(x INT)
+CALL c2("c", x)|
+CREATE PROCEDURE c2(s CHAR(16), x INT)
+CALL c3(x, s)|
+CREATE PROCEDURE c3(x INT, s CHAR(16))
+CALL c4("level", x, s)|
+CREATE PROCEDURE c4(l CHAR(8), x INT, s CHAR(16))
+INSERT INTO t1 VALUES (concat(l,s), x)|
+CREATE PROCEDURE iotest(x1 CHAR(16), x2 CHAR(16), y INT)
+BEGIN
+CALL inc2(x2, y);
+INSERT INTO t1 VALUES (x1, y);
+END|
+CREATE PROCEDURE inc2(x CHAR(16), y INT)
+BEGIN
+CALL inc(y);
+INSERT INTO t1 VALUES (x, y);
+END|
+CREATE PROCEDURE inc(inout io INT)
+SET io = io + 1|
+CREATE FUNCTION mul(x INT, y INT) RETURNS INT
+RETURN x*y|
+CREATE FUNCTION inc(i INT) RETURNS INT
+RETURN i+1|
+CREATE FUNCTION fac(n INT UNSIGNED) RETURNS BIGINT UNSIGNED
+BEGIN
+DECLARE f BIGINT UNSIGNED DEFAULT 1;
+WHILE n > 1 DO
+SET f = f * n;
+SET n = n - 1;
+END WHILE;
+RETURN f;
+END|
+CREATE FUNCTION fun(i INT, u INT UNSIGNED) RETURNS DOUBLE
+RETURN mul(inc(i), fac(u))|
+CREATE PROCEDURE ifac(n INT UNSIGNED)
+BEGIN
+DECLARE i BIGINT UNSIGNED DEFAULT 1;
+IF n > 20 THEN
+SET n = 20; # bigint overflow otherwise
+END IF;
+WHILE i <= n DO
+BEGIN
+INSERT INTO t2 VALUES (i, fac(i));
+SET i = i + 1;
+END;
+END WHILE;
+END|
+CREATE TRIGGER trg AFTER INSERT ON t1 FOR EACH ROW
+CALL ifac(10)|
+update performance_schema.setup_instruments set enabled='YES', timed='NO'
+ where name like "statement/sp/%" order by name;
+TRUNCATE TABLE performance_schema.events_statements_summary_by_program;
+TRUNCATE TABLE performance_schema.events_statements_history_long;
+#####################
+# Executing queries #
+#####################
+CALL c1(42);
+SELECT * FROM t1;
+id data
+levelc 42
+DELETE FROM t1;
+CALL iotest("io1", "io2", 1);
+SELECT * FROM t1 ORDER BY data DESC;
+id data
+io2 2
+io1 1
+DELETE FROM t1;
+SELECT fun(6,10);
+fun(6,10)
+25401600
+INSERT INTO t1 VALUES (20,13);
+SELECT * FROM t2;
+n f
+1 1
+2 2
+3 6
+4 24
+5 120
+6 720
+7 5040
+8 40320
+9 362880
+10 3628800
+1 1
+2 2
+3 6
+4 24
+5 120
+6 720
+7 5040
+8 40320
+9 362880
+10 3628800
+1 1
+2 2
+3 6
+4 24
+5 120
+6 720
+7 5040
+8 40320
+9 362880
+10 3628800
+1 1
+2 2
+3 6
+4 24
+5 120
+6 720
+7 5040
+8 40320
+9 362880
+10 3628800
+SELECT EVENT_NAME, TIMER_START, TIMER_END, TIMER_WAIT FROM
+performance_schema.events_statements_history_long WHERE
+CURRENT_SCHEMA='nested_sp' AND EVENT_NAME like "statement/sp/%";
+EVENT_NAME TIMER_START TIMER_END TIMER_WAIT
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/freturn NULL NULL NULL
+statement/sp/stmt NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/freturn NULL NULL NULL
+statement/sp/stmt NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/stmt NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/freturn NULL NULL NULL
+statement/sp/stmt NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/freturn NULL NULL NULL
+statement/sp/stmt NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/freturn NULL NULL NULL
+statement/sp/stmt NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/freturn NULL NULL NULL
+statement/sp/stmt NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/freturn NULL NULL NULL
+statement/sp/stmt NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/stmt NULL NULL NULL
+statement/sp/stmt NULL NULL NULL
+statement/sp/stmt NULL NULL NULL
+statement/sp/stmt NULL NULL NULL
+statement/sp/stmt NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/stmt NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/freturn NULL NULL NULL
+statement/sp/stmt NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/freturn NULL NULL NULL
+statement/sp/stmt NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/freturn NULL NULL NULL
+statement/sp/stmt NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/freturn NULL NULL NULL
+statement/sp/stmt NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/freturn NULL NULL NULL
+statement/sp/stmt NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/freturn NULL NULL NULL
+statement/sp/stmt NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/freturn NULL NULL NULL
+statement/sp/stmt NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/freturn NULL NULL NULL
+statement/sp/stmt NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/freturn NULL NULL NULL
+statement/sp/stmt NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/freturn NULL NULL NULL
+statement/sp/stmt NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/stmt NULL NULL NULL
+statement/sp/stmt NULL NULL NULL
+statement/sp/stmt NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/freturn NULL NULL NULL
+statement/sp/stmt NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/freturn NULL NULL NULL
+statement/sp/stmt NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/freturn NULL NULL NULL
+statement/sp/stmt NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/freturn NULL NULL NULL
+statement/sp/stmt NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/freturn NULL NULL NULL
+statement/sp/stmt NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/freturn NULL NULL NULL
+statement/sp/stmt NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/freturn NULL NULL NULL
+statement/sp/stmt NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/freturn NULL NULL NULL
+statement/sp/stmt NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/freturn NULL NULL NULL
+statement/sp/stmt NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/freturn NULL NULL NULL
+statement/sp/stmt NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/stmt NULL NULL NULL
+statement/sp/stmt NULL NULL NULL
+statement/sp/freturn NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/freturn NULL NULL NULL
+statement/sp/freturn NULL NULL NULL
+statement/sp/freturn NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/freturn NULL NULL NULL
+statement/sp/stmt NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/freturn NULL NULL NULL
+statement/sp/stmt NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/freturn NULL NULL NULL
+statement/sp/stmt NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/freturn NULL NULL NULL
+statement/sp/stmt NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/freturn NULL NULL NULL
+statement/sp/stmt NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/freturn NULL NULL NULL
+statement/sp/stmt NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/freturn NULL NULL NULL
+statement/sp/stmt NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/freturn NULL NULL NULL
+statement/sp/stmt NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+update performance_schema.setup_instruments set enabled='YES', timed='YES'
+ where name like "statement/sp/%" order by name;
+TRUNCATE TABLE performance_schema.events_statements_summary_by_program;
+TRUNCATE TABLE performance_schema.events_statements_history_long;
+DROP PROCEDURE c4;
+DROP PROCEDURE c3;
+DROP PROCEDURE c2;
+DROP PROCEDURE c1;
+DROP PROCEDURE inc;
+DROP PROCEDURE inc2;
+DROP PROCEDURE iotest;
+DROP FUNCTION mul;
+DROP FUNCTION inc;
+DROP FUNCTION fac;
+DROP FUNCTION fun;
+DROP PROCEDURE ifac;
+DROP TRIGGER trg;
+DROP TABLE t1,t2;
+DROP DATABASE nested_sp;
diff --git a/mysql-test/suite/perfschema/r/statement_program_nesting_event_check.result b/mysql-test/suite/perfschema/r/statement_program_nesting_event_check.result
new file mode 100644
index 00000000000..e045ff7db01
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/statement_program_nesting_event_check.result
@@ -0,0 +1,1512 @@
+TRUNCATE TABLE performance_schema.events_statements_history_long;
+#----------------------------
+# Non-nested Stored programs.
+#----------------------------
+# SET-UP
+CREATE DATABASE stored_programs;
+USE stored_programs;
+CREATE TABLE t1(
+i INT NOT NULL,
+j INT
+) engine=innodb;
+CREATE TABLE t2(
+name CHAR(16) NOT NULL DEFAULT '',
+id INT NOT NULL
+) engine=innodb;
+CREATE TABLE t3(
+d DATE,
+n INT,
+f DOUBLE,
+s VARCHAR(32)
+);
+CREATE TABLE t4(
+`k` int(10) unsigned NOT NULL AUTO_INCREMENT,
+`word` varchar(100) NOT NULL,
+`mean` varchar(300) NOT NULL,
+PRIMARY KEY (`k`)
+);
+############################
+# Creating Stored Programs #
+############################
+# Stored Routine ( Procedure & Function )
+CREATE PROCEDURE SampleProc1(x1 INT, x2 INT, y INT)
+BEGIN
+INSERT INTO t1 VALUES (x1, y);
+INSERT INTO t1 VALUES (x2, y);
+END|
+CREATE PROCEDURE SampleProc2(x CHAR(16), y INT)
+BEGIN
+DECLARE z1, z2 INT;
+SET z1 = y;
+SET z2 = z1+2;
+INSERT INTO t2 VALUES (x, z2);
+END|
+CREATE PROCEDURE SampleProc3()
+BEGIN
+DECLARE ld DATE;
+DECLARE li INT;
+DECLARE lf DOUBLE;
+DECLARE ls VARCHAR(32);
+SET ld = NULL, li = NULL, lf = NULL, ls = NULL;
+INSERT INTO t3 VALUES (ld, li, lf, ls);
+INSERT INTO t3 (n, f, s) VALUES ((ld IS NULL), 1, "ld is null"),
+((li IS NULL), 1, "li is null"),
+((li = 0), NULL, "li = 0"),
+((lf IS NULL), 1, "lf is null"),
+((lf = 0), NULL, "lf = 0"),
+((ls IS NULL), 1, "ls is null");
+END|
+CREATE PROCEDURE SampleProc4()
+BEGIN
+DECLARE x INT;
+SET x = 1;
+WHILE x <= 2 DO
+INSERT INTO t4(word, mean) VALUES('a','a mean');
+SET x = x + 1;
+END WHILE;
+END|
+CREATE FUNCTION append(s1 CHAR(8), s2 CHAR(8)) RETURNS CHAR(16)
+RETURN concat(s1, s2)|
+CREATE FUNCTION wt_avg(n1 INT, n2 INT, n3 INT, n4 INT)
+RETURNS INT
+DETERMINISTIC
+BEGIN
+DECLARE avg INT;
+SET avg = (n1+n2+n3*2+n4*4)/8;
+RETURN avg;
+END|
+CREATE FUNCTION fac(n INT UNSIGNED) RETURNS BIGINT UNSIGNED
+BEGIN
+DECLARE f BIGINT UNSIGNED DEFAULT 1;
+WHILE n > 1 DO
+SET f = f * n;
+SET n = n - 1;
+END WHILE;
+RETURN f;
+END|
+# Triggers
+CREATE TRIGGER trg1 BEFORE INSERT ON t1 FOR EACH ROW
+BEGIN
+if isnull(new.j) then
+SET new.j:= new.i * 10;
+END if;
+END|
+CREATE TRIGGER trg2 AFTER INSERT ON t2 FOR EACH ROW
+BEGIN
+UPDATE t1 SET i=new.id+i ;
+END|
+CREATE TRIGGER trg3 AFTER UPDATE ON t2 FOR EACH ROW
+SET @change:= @change + new.id - old.id|
+CREATE TRIGGER trg4 BEFORE DELETE ON t1 FOR EACH ROW
+SET @del:= @del + 1|
+CREATE TRIGGER trg5 AFTER DELETE ON t1 FOR EACH ROW
+SET @del:= @del + 8 + old.j|
+#####################
+# Executing queries #
+#####################
+INSERT INTO t1 VALUES (10,20);
+CALL SampleProc1(30,40,50);
+SET @a=1;
+SELECT @a;
+@a
+1
+CALL SampleProc2("Jwalamukhi",34);
+SELECT @a;
+@a
+1
+CALL SampleProc3();
+CALL SampleProc4();
+SET @change=1;
+SELECT @change;
+@change
+1
+UPDATE t2 SET id=22 WHERE name="Jwalamukhi";
+SELECT @change;
+@change
+-13
+SET @del=1;
+SELECT @del;
+@del
+1
+DELETE FROM t1 WHERE i=76;
+SELECT @del;
+@del
+60
+SELECT wt_avg(1, 12, 1990, 1121990);
+wt_avg(1, 12, 1990, 1121990)
+561494
+SELECT fac(5);
+fac(5)
+120
+SELECT append("Bolly", "wood");
+append("Bolly", "wood")
+Bollywood
+# Event
+SET GLOBAL event_scheduler=ON;
+CREATE TABLE table_t(a INT);
+CREATE EVENT e1 ON SCHEDULE EVERY 2 SECOND DO
+BEGIN
+INSERT INTO table_t VALUES(1);
+END|
+SELECT * FROM table_t;
+a
+1
+SET GLOBAL event_scheduler=OFF;
+SELECT EVENT_NAME, SQL_TEXT, OBJECT_NAME, NESTING_EVENT_TYPE, NESTING_EVENT_LEVEL
+FROM performance_schema.events_statements_history_long
+WHERE CURRENT_SCHEMA='stored_programs' AND
+(SQL_TEXT not like '%count(*) = %' OR SQL_TEXT IS NULL)
+ORDER BY OBJECT_NAME,NESTING_EVENT_LEVEL,SQL_TEXT;
+EVENT_NAME SQL_TEXT OBJECT_NAME NESTING_EVENT_TYPE NESTING_EVENT_LEVEL
+statement/scheduler/event NULL NULL NULL 0
+statement/sql/call_procedure CALL SampleProc1(30,40,50) NULL NULL 0
+statement/sql/call_procedure CALL SampleProc2("Jwalamukhi",34) NULL NULL 0
+statement/sql/call_procedure CALL SampleProc3() NULL NULL 0
+statement/sql/call_procedure CALL SampleProc4() NULL NULL 0
+statement/sql/create_event CREATE EVENT e1 ON SCHEDULE EVERY 2 SECOND DO
+BEGIN
+INSERT INTO table_t VALUES(1);
+END NULL NULL 0
+statement/sql/create_function CREATE FUNCTION append(s1 CHAR(8), s2 CHAR(8)) RETURNS CHAR(16)
+RETURN concat(s1, s2) NULL NULL 0
+statement/sql/create_function CREATE FUNCTION fac(n INT UNSIGNED) RETURNS BIGINT UNSIGNED
+BEGIN
+DECLARE f BIGINT UNSIGNED DEFAULT 1;
+WHILE n > 1 DO
+SET f = f * n;
+SET n = n - 1;
+END WHILE;
+RETURN f;
+END NULL NULL 0
+statement/sql/create_function CREATE FUNCTION wt_avg(n1 INT, n2 INT, n3 INT, n4 INT)
+RETURNS INT
+DETERMINISTIC
+BEGIN
+DECLARE avg INT;
+SET avg = (n1+n2+n3*2+n4*4)/8;
+RETURN avg;
+END NULL NULL 0
+statement/sql/create_procedure CREATE PROCEDURE SampleProc1(x1 INT, x2 INT, y INT)
+BEGIN
+INSERT INTO t1 VALUES (x1, y);
+INSERT INTO t1 VALUES (x2, y);
+END NULL NULL 0
+statement/sql/create_procedure CREATE PROCEDURE SampleProc2(x CHAR(16), y INT)
+BEGIN
+DECLARE z1, z2 INT;
+SET z1 = y;
+SET z2 = z1+2;
+INSERT INTO t2 VALUES (x, z2);
+END NULL NULL 0
+statement/sql/create_procedure CREATE PROCEDURE SampleProc3()
+BEGIN
+DECLARE ld DATE;
+DECLARE li INT;
+DECLARE lf DOUBLE;
+DECLARE ls VARCHAR(32);
+SET ld = NULL, li = NULL, lf = NULL, ls = NULL;
+INSERT INTO t3 VALUES (ld, li, lf, ls);
+INSERT INTO t3 (n, f, s) VALUES ((ld IS NULL), 1, "ld is null"),
+((li IS NULL), 1, "li is null"),
+((li = 0), NULL, "li = 0"),
+((lf IS NULL), 1, "lf is null"),
+((lf = 0), NULL, "lf = 0"),
+((ls IS NULL), 1, "ls is null");
+END NULL NULL 0
+statement/sql/create_procedure CREATE PROCEDURE SampleProc4()
+BEGIN
+DECLARE x INT;
+SET x = 1;
+WHILE x <= 2 DO
+INSERT INTO t4(word, mean) VALUES('a','a mean');
+SET x = x + 1;
+END WHILE;
+END NULL NULL 0
+statement/sql/create_table CREATE TABLE t1(
+i INT NOT NULL,
+j INT
+) engine=innodb NULL NULL 0
+statement/sql/create_table CREATE TABLE t2(
+name CHAR(16) NOT NULL DEFAULT '',
+id INT NOT NULL
+) engine=innodb NULL NULL 0
+statement/sql/create_table CREATE TABLE t3(
+d DATE,
+n INT,
+f DOUBLE,
+s VARCHAR(32)
+) NULL NULL 0
+statement/sql/create_table CREATE TABLE t4(
+`k` int(10) unsigned NOT NULL AUTO_INCREMENT,
+`word` varchar(100) NOT NULL,
+`mean` varchar(300) NOT NULL,
+PRIMARY KEY (`k`)
+) NULL NULL 0
+statement/sql/create_table CREATE TABLE table_t(a INT) NULL NULL 0
+statement/sql/create_trigger CREATE TRIGGER trg1 BEFORE INSERT ON t1 FOR EACH ROW
+BEGIN
+if isnull(new.j) then
+SET new.j:= new.i * 10;
+END if;
+END NULL NULL 0
+statement/sql/create_trigger CREATE TRIGGER trg2 AFTER INSERT ON t2 FOR EACH ROW
+BEGIN
+UPDATE t1 SET i=new.id+i ;
+END NULL NULL 0
+statement/sql/create_trigger CREATE TRIGGER trg3 AFTER UPDATE ON t2 FOR EACH ROW
+SET @change:= @change + new.id - old.id NULL NULL 0
+statement/sql/create_trigger CREATE TRIGGER trg4 BEFORE DELETE ON t1 FOR EACH ROW
+SET @del:= @del + 1 NULL NULL 0
+statement/sql/create_trigger CREATE TRIGGER trg5 AFTER DELETE ON t1 FOR EACH ROW
+SET @del:= @del + 8 + old.j NULL NULL 0
+statement/sql/delete DELETE FROM t1 WHERE i=76 NULL NULL 0
+statement/sql/insert INSERT INTO t1 VALUES (10,20) NULL NULL 0
+statement/sql/select SELECT * FROM table_t NULL NULL 0
+statement/sql/select SELECT 5 * 10 NULL NULL 0
+statement/sql/select SELECT @a NULL NULL 0
+statement/sql/select SELECT @a NULL NULL 0
+statement/sql/select SELECT @change NULL NULL 0
+statement/sql/select SELECT @change NULL NULL 0
+statement/sql/select SELECT @del NULL NULL 0
+statement/sql/select SELECT @del NULL NULL 0
+statement/sql/select SELECT append("Bolly", "wood") NULL NULL 0
+statement/sql/select SELECT fac(5) NULL NULL 0
+statement/sql/select SELECT wt_avg(1, 12, 1990, 1121990) NULL NULL 0
+statement/sql/set_option SET @a=1 NULL NULL 0
+statement/sql/set_option SET @change=1 NULL NULL 0
+statement/sql/set_option SET @del=1 NULL NULL 0
+statement/sql/set_option SET GLOBAL event_scheduler=OFF NULL NULL 0
+statement/sql/set_option SET GLOBAL event_scheduler=ON NULL NULL 0
+statement/sql/update UPDATE t2 SET id=22 WHERE name="Jwalamukhi" NULL NULL 0
+statement/sp/freturn NULL append STATEMENT 1
+statement/sp/stmt INSERT INTO table_t VALUES(1) e1 STATEMENT 1
+statement/sp/set NULL fac STATEMENT 1
+statement/sp/jump_if_not NULL fac STATEMENT 1
+statement/sp/set NULL fac STATEMENT 1
+statement/sp/set NULL fac STATEMENT 1
+statement/sp/jump NULL fac STATEMENT 1
+statement/sp/jump_if_not NULL fac STATEMENT 1
+statement/sp/set NULL fac STATEMENT 1
+statement/sp/set NULL fac STATEMENT 1
+statement/sp/jump NULL fac STATEMENT 1
+statement/sp/jump_if_not NULL fac STATEMENT 1
+statement/sp/set NULL fac STATEMENT 1
+statement/sp/set NULL fac STATEMENT 1
+statement/sp/jump NULL fac STATEMENT 1
+statement/sp/jump_if_not NULL fac STATEMENT 1
+statement/sp/set NULL fac STATEMENT 1
+statement/sp/set NULL fac STATEMENT 1
+statement/sp/jump NULL fac STATEMENT 1
+statement/sp/jump_if_not NULL fac STATEMENT 1
+statement/sp/freturn NULL fac STATEMENT 1
+statement/sp/stmt INSERT INTO t1 VALUES (x1, y) sampleproc1 STATEMENT 1
+statement/sp/stmt INSERT INTO t1 VALUES (x2, y) sampleproc1 STATEMENT 1
+statement/sp/set NULL sampleproc2 STATEMENT 1
+statement/sp/set NULL sampleproc2 STATEMENT 1
+statement/sp/set NULL sampleproc2 STATEMENT 1
+statement/sp/set NULL sampleproc2 STATEMENT 1
+statement/sp/stmt INSERT INTO t2 VALUES (x, z2) sampleproc2 STATEMENT 1
+statement/sp/set NULL sampleproc3 STATEMENT 1
+statement/sp/set NULL sampleproc3 STATEMENT 1
+statement/sp/set NULL sampleproc3 STATEMENT 1
+statement/sp/set NULL sampleproc3 STATEMENT 1
+statement/sp/set NULL sampleproc3 STATEMENT 1
+statement/sp/set NULL sampleproc3 STATEMENT 1
+statement/sp/set NULL sampleproc3 STATEMENT 1
+statement/sp/set NULL sampleproc3 STATEMENT 1
+statement/sp/stmt INSERT INTO t3 (n, f, s) VALUES ((ld IS NULL), 1, "ld is null"),
+((li IS NULL), 1, "li is null"),
+((li = 0), NULL, "li = 0"),
+((lf IS NULL), 1, "lf is null"),
+((lf = 0), NULL, "lf = 0"),
+((ls IS NULL), 1, "ls is null") sampleproc3 STATEMENT 1
+statement/sp/stmt INSERT INTO t3 VALUES (ld, li, lf, ls) sampleproc3 STATEMENT 1
+statement/sp/set NULL sampleproc4 STATEMENT 1
+statement/sp/set NULL sampleproc4 STATEMENT 1
+statement/sp/jump_if_not NULL sampleproc4 STATEMENT 1
+statement/sp/set NULL sampleproc4 STATEMENT 1
+statement/sp/jump NULL sampleproc4 STATEMENT 1
+statement/sp/jump_if_not NULL sampleproc4 STATEMENT 1
+statement/sp/set NULL sampleproc4 STATEMENT 1
+statement/sp/jump NULL sampleproc4 STATEMENT 1
+statement/sp/jump_if_not NULL sampleproc4 STATEMENT 1
+statement/sp/stmt INSERT INTO t4(word, mean) VALUES('a','a mean') sampleproc4 STATEMENT 1
+statement/sp/stmt INSERT INTO t4(word, mean) VALUES('a','a mean') sampleproc4 STATEMENT 1
+statement/sp/jump_if_not NULL trg1 TRANSACTION 1
+statement/sp/jump_if_not NULL trg1 TRANSACTION 2
+statement/sp/jump_if_not NULL trg1 TRANSACTION 2
+statement/sp/stmt UPDATE t1 SET i=new.id+i trg2 TRANSACTION 2
+statement/sp/stmt SET @change:= @change + new.id - old.id trg3 TRANSACTION 1
+statement/sp/stmt SET @del:= @del + 1 trg4 TRANSACTION 1
+statement/sp/stmt SET @del:= @del + 8 + old.j trg5 TRANSACTION 1
+statement/sp/set NULL wt_avg STATEMENT 1
+statement/sp/set NULL wt_avg STATEMENT 1
+statement/sp/freturn NULL wt_avg STATEMENT 1
+TRUNCATE TABLE performance_schema.events_statements_history_long;
+DROP PROCEDURE SampleProc1;
+DROP PROCEDURE SampleProc2;
+DROP PROCEDURE SampleProc3;
+DROP PROCEDURE SampleProc4;
+DROP FUNCTION wt_avg;
+DROP FUNCTION fac;
+DROP FUNCTION append;
+DROP TRIGGER trg1;
+DROP TRIGGER trg2;
+DROP TRIGGER trg3;
+DROP TRIGGER trg4;
+DROP TRIGGER trg5;
+DROP EVENT IF EXISTS e1;
+DROP TABLE t1;
+DROP TABLE t2;
+DROP TABLE t3;
+DROP TABLE t4;
+DROP TABLE table_t;
+DROP DATABASE stored_programs;
+#------------------------
+# Nested stored programs.
+#------------------------
+# SET-UP
+CREATE DATABASE nested_sp;
+USE nested_sp;
+CREATE TABLE t1(
+id CHAR(16) NOT NULL DEFAULT '',
+data INT NOT NULL
+);
+CREATE TABLE t2(
+n INT UNSIGNED NOT NULL,
+f BIGINT UNSIGNED
+) engine=innodb;
+############################
+# Creating Stored Programs #
+############################
+CREATE PROCEDURE c1(x INT)
+CALL c2("c", x)|
+CREATE PROCEDURE c2(s CHAR(16), x INT)
+CALL c3(x, s)|
+CREATE PROCEDURE c3(x INT, s CHAR(16))
+CALL c4("level", x, s)|
+CREATE PROCEDURE c4(l CHAR(8), x INT, s CHAR(16))
+INSERT INTO t1 VALUES (concat(l,s), x)|
+CREATE PROCEDURE iotest(x1 CHAR(16), x2 CHAR(16), y INT)
+BEGIN
+CALL inc2(x2, y);
+INSERT INTO t1 VALUES (x1, y);
+END|
+CREATE PROCEDURE inc2(x CHAR(16), y INT)
+BEGIN
+CALL inc(y);
+INSERT INTO t1 VALUES (x, y);
+END|
+CREATE PROCEDURE inc(inout io INT)
+SET io = io + 1|
+CREATE FUNCTION mul(x INT, y INT) RETURNS INT
+RETURN x*y|
+CREATE FUNCTION inc(i INT) RETURNS INT
+RETURN i+1|
+CREATE FUNCTION fac(n INT UNSIGNED) RETURNS BIGINT UNSIGNED
+BEGIN
+DECLARE f BIGINT UNSIGNED DEFAULT 1;
+WHILE n > 1 DO
+SET f = f * n;
+SET n = n - 1;
+END WHILE;
+RETURN f;
+END|
+CREATE FUNCTION fun(i INT, u INT UNSIGNED) RETURNS DOUBLE
+RETURN mul(inc(i), fac(u))|
+CREATE PROCEDURE ifac(n INT UNSIGNED)
+BEGIN
+DECLARE i BIGINT UNSIGNED DEFAULT 1;
+IF n > 20 THEN
+SET n = 20; # bigint overflow otherwise
+END IF;
+WHILE i <= n DO
+BEGIN
+INSERT INTO t2 VALUES (i, fac(i));
+SET i = i + 1;
+END;
+END WHILE;
+END|
+CREATE TRIGGER trg AFTER INSERT ON t1 FOR EACH ROW
+CALL ifac(10)|
+#####################
+# Executing queries #
+#####################
+CALL c1(42);
+SELECT * FROM t1;
+id data
+levelc 42
+DELETE FROM t1;
+CALL iotest("io1", "io2", 1);
+SELECT * FROM t1 ORDER BY data DESC;
+id data
+io2 2
+io1 1
+DELETE FROM t1;
+SELECT fun(6,10);
+fun(6,10)
+25401600
+INSERT INTO t1 VALUES (20,13);
+SELECT * FROM t2;
+n f
+1 1
+2 2
+3 6
+4 24
+5 120
+6 720
+7 5040
+8 40320
+9 362880
+10 3628800
+1 1
+2 2
+3 6
+4 24
+5 120
+6 720
+7 5040
+8 40320
+9 362880
+10 3628800
+1 1
+2 2
+3 6
+4 24
+5 120
+6 720
+7 5040
+8 40320
+9 362880
+10 3628800
+1 1
+2 2
+3 6
+4 24
+5 120
+6 720
+7 5040
+8 40320
+9 362880
+10 3628800
+SELECT EVENT_NAME, SQL_TEXT, OBJECT_NAME, NESTING_EVENT_TYPE, NESTING_EVENT_LEVEL
+FROM performance_schema.events_statements_history_long
+WHERE CURRENT_SCHEMA='nested_sp'
+ORDER BY OBJECT_NAME, NESTING_EVENT_LEVEL, SQL_TEXT, EVENT_NAME;
+EVENT_NAME SQL_TEXT OBJECT_NAME NESTING_EVENT_TYPE NESTING_EVENT_LEVEL
+statement/sql/call_procedure CALL c1(42) NULL NULL 0
+statement/sql/call_procedure CALL iotest("io1", "io2", 1) NULL NULL 0
+statement/sql/delete DELETE FROM t1 NULL NULL 0
+statement/sql/delete DELETE FROM t1 NULL NULL 0
+statement/sql/insert INSERT INTO t1 VALUES (20,13) NULL NULL 0
+statement/sql/select SELECT * FROM t1 NULL NULL 0
+statement/sql/select SELECT * FROM t1 ORDER BY data DESC NULL NULL 0
+statement/sql/select SELECT * FROM t2 NULL NULL 0
+statement/sql/select SELECT fun(6,10) NULL NULL 0
+statement/sp/stmt CALL c2("c", x) c1 STATEMENT 1
+statement/sp/stmt CALL c3(x, s) c2 STATEMENT 2
+statement/sp/stmt CALL c4("level", x, s) c3 STATEMENT 3
+statement/sp/stmt INSERT INTO t1 VALUES (concat(l,s), x) c4 STATEMENT 4
+statement/sp/freturn NULL fac STATEMENT 2
+statement/sp/jump NULL fac STATEMENT 2
+statement/sp/jump NULL fac STATEMENT 2
+statement/sp/jump NULL fac STATEMENT 2
+statement/sp/jump NULL fac STATEMENT 2
+statement/sp/jump NULL fac STATEMENT 2
+statement/sp/jump NULL fac STATEMENT 2
+statement/sp/jump NULL fac STATEMENT 2
+statement/sp/jump NULL fac STATEMENT 2
+statement/sp/jump NULL fac STATEMENT 2
+statement/sp/jump_if_not NULL fac STATEMENT 2
+statement/sp/jump_if_not NULL fac STATEMENT 2
+statement/sp/jump_if_not NULL fac STATEMENT 2
+statement/sp/jump_if_not NULL fac STATEMENT 2
+statement/sp/jump_if_not NULL fac STATEMENT 2
+statement/sp/jump_if_not NULL fac STATEMENT 2
+statement/sp/jump_if_not NULL fac STATEMENT 2
+statement/sp/jump_if_not NULL fac STATEMENT 2
+statement/sp/jump_if_not NULL fac STATEMENT 2
+statement/sp/jump_if_not NULL fac STATEMENT 2
+statement/sp/set NULL fac STATEMENT 2
+statement/sp/set NULL fac STATEMENT 2
+statement/sp/set NULL fac STATEMENT 2
+statement/sp/set NULL fac STATEMENT 2
+statement/sp/set NULL fac STATEMENT 2
+statement/sp/set NULL fac STATEMENT 2
+statement/sp/set NULL fac STATEMENT 2
+statement/sp/set NULL fac STATEMENT 2
+statement/sp/set NULL fac STATEMENT 2
+statement/sp/set NULL fac STATEMENT 2
+statement/sp/set NULL fac STATEMENT 2
+statement/sp/set NULL fac STATEMENT 2
+statement/sp/set NULL fac STATEMENT 2
+statement/sp/set NULL fac STATEMENT 2
+statement/sp/set NULL fac STATEMENT 2
+statement/sp/set NULL fac STATEMENT 2
+statement/sp/set NULL fac STATEMENT 2
+statement/sp/set NULL fac STATEMENT 2
+statement/sp/set NULL fac STATEMENT 2
+statement/sp/freturn NULL fac STATEMENT 3
+statement/sp/freturn NULL fac STATEMENT 3
+statement/sp/freturn NULL fac STATEMENT 3
+statement/sp/freturn NULL fac STATEMENT 3
+statement/sp/freturn NULL fac STATEMENT 3
+statement/sp/freturn NULL fac STATEMENT 3
+statement/sp/freturn NULL fac STATEMENT 3
+statement/sp/freturn NULL fac STATEMENT 3
+statement/sp/freturn NULL fac STATEMENT 3
+statement/sp/freturn NULL fac STATEMENT 3
+statement/sp/jump NULL fac STATEMENT 3
+statement/sp/jump NULL fac STATEMENT 3
+statement/sp/jump NULL fac STATEMENT 3
+statement/sp/jump NULL fac STATEMENT 3
+statement/sp/jump NULL fac STATEMENT 3
+statement/sp/jump NULL fac STATEMENT 3
+statement/sp/jump NULL fac STATEMENT 3
+statement/sp/jump NULL fac STATEMENT 3
+statement/sp/jump NULL fac STATEMENT 3
+statement/sp/jump NULL fac STATEMENT 3
+statement/sp/jump NULL fac STATEMENT 3
+statement/sp/jump NULL fac STATEMENT 3
+statement/sp/jump NULL fac STATEMENT 3
+statement/sp/jump NULL fac STATEMENT 3
+statement/sp/jump NULL fac STATEMENT 3
+statement/sp/jump NULL fac STATEMENT 3
+statement/sp/jump NULL fac STATEMENT 3
+statement/sp/jump NULL fac STATEMENT 3
+statement/sp/jump NULL fac STATEMENT 3
+statement/sp/jump NULL fac STATEMENT 3
+statement/sp/jump NULL fac STATEMENT 3
+statement/sp/jump NULL fac STATEMENT 3
+statement/sp/jump NULL fac STATEMENT 3
+statement/sp/jump NULL fac STATEMENT 3
+statement/sp/jump NULL fac STATEMENT 3
+statement/sp/jump NULL fac STATEMENT 3
+statement/sp/jump NULL fac STATEMENT 3
+statement/sp/jump NULL fac STATEMENT 3
+statement/sp/jump NULL fac STATEMENT 3
+statement/sp/jump NULL fac STATEMENT 3
+statement/sp/jump NULL fac STATEMENT 3
+statement/sp/jump NULL fac STATEMENT 3
+statement/sp/jump NULL fac STATEMENT 3
+statement/sp/jump NULL fac STATEMENT 3
+statement/sp/jump NULL fac STATEMENT 3
+statement/sp/jump NULL fac STATEMENT 3
+statement/sp/jump NULL fac STATEMENT 3
+statement/sp/jump NULL fac STATEMENT 3
+statement/sp/jump NULL fac STATEMENT 3
+statement/sp/jump NULL fac STATEMENT 3
+statement/sp/jump NULL fac STATEMENT 3
+statement/sp/jump NULL fac STATEMENT 3
+statement/sp/jump NULL fac STATEMENT 3
+statement/sp/jump NULL fac STATEMENT 3
+statement/sp/jump NULL fac STATEMENT 3
+statement/sp/jump_if_not NULL fac STATEMENT 3
+statement/sp/jump_if_not NULL fac STATEMENT 3
+statement/sp/jump_if_not NULL fac STATEMENT 3
+statement/sp/jump_if_not NULL fac STATEMENT 3
+statement/sp/jump_if_not NULL fac STATEMENT 3
+statement/sp/jump_if_not NULL fac STATEMENT 3
+statement/sp/jump_if_not NULL fac STATEMENT 3
+statement/sp/jump_if_not NULL fac STATEMENT 3
+statement/sp/jump_if_not NULL fac STATEMENT 3
+statement/sp/jump_if_not NULL fac STATEMENT 3
+statement/sp/jump_if_not NULL fac STATEMENT 3
+statement/sp/jump_if_not NULL fac STATEMENT 3
+statement/sp/jump_if_not NULL fac STATEMENT 3
+statement/sp/jump_if_not NULL fac STATEMENT 3
+statement/sp/jump_if_not NULL fac STATEMENT 3
+statement/sp/jump_if_not NULL fac STATEMENT 3
+statement/sp/jump_if_not NULL fac STATEMENT 3
+statement/sp/jump_if_not NULL fac STATEMENT 3
+statement/sp/jump_if_not NULL fac STATEMENT 3
+statement/sp/jump_if_not NULL fac STATEMENT 3
+statement/sp/jump_if_not NULL fac STATEMENT 3
+statement/sp/jump_if_not NULL fac STATEMENT 3
+statement/sp/jump_if_not NULL fac STATEMENT 3
+statement/sp/jump_if_not NULL fac STATEMENT 3
+statement/sp/jump_if_not NULL fac STATEMENT 3
+statement/sp/jump_if_not NULL fac STATEMENT 3
+statement/sp/jump_if_not NULL fac STATEMENT 3
+statement/sp/jump_if_not NULL fac STATEMENT 3
+statement/sp/jump_if_not NULL fac STATEMENT 3
+statement/sp/jump_if_not NULL fac STATEMENT 3
+statement/sp/jump_if_not NULL fac STATEMENT 3
+statement/sp/jump_if_not NULL fac STATEMENT 3
+statement/sp/jump_if_not NULL fac STATEMENT 3
+statement/sp/jump_if_not NULL fac STATEMENT 3
+statement/sp/jump_if_not NULL fac STATEMENT 3
+statement/sp/jump_if_not NULL fac STATEMENT 3
+statement/sp/jump_if_not NULL fac STATEMENT 3
+statement/sp/jump_if_not NULL fac STATEMENT 3
+statement/sp/jump_if_not NULL fac STATEMENT 3
+statement/sp/jump_if_not NULL fac STATEMENT 3
+statement/sp/jump_if_not NULL fac STATEMENT 3
+statement/sp/jump_if_not NULL fac STATEMENT 3
+statement/sp/jump_if_not NULL fac STATEMENT 3
+statement/sp/jump_if_not NULL fac STATEMENT 3
+statement/sp/jump_if_not NULL fac STATEMENT 3
+statement/sp/jump_if_not NULL fac STATEMENT 3
+statement/sp/jump_if_not NULL fac STATEMENT 3
+statement/sp/jump_if_not NULL fac STATEMENT 3
+statement/sp/jump_if_not NULL fac STATEMENT 3
+statement/sp/jump_if_not NULL fac STATEMENT 3
+statement/sp/jump_if_not NULL fac STATEMENT 3
+statement/sp/jump_if_not NULL fac STATEMENT 3
+statement/sp/jump_if_not NULL fac STATEMENT 3
+statement/sp/jump_if_not NULL fac STATEMENT 3
+statement/sp/jump_if_not NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/set NULL fac STATEMENT 3
+statement/sp/freturn NULL fac STATEMENT 4
+statement/sp/freturn NULL fac STATEMENT 4
+statement/sp/freturn NULL fac STATEMENT 4
+statement/sp/freturn NULL fac STATEMENT 4
+statement/sp/freturn NULL fac STATEMENT 4
+statement/sp/freturn NULL fac STATEMENT 4
+statement/sp/freturn NULL fac STATEMENT 4
+statement/sp/freturn NULL fac STATEMENT 4
+statement/sp/freturn NULL fac STATEMENT 4
+statement/sp/freturn NULL fac STATEMENT 4
+statement/sp/jump NULL fac STATEMENT 4
+statement/sp/jump NULL fac STATEMENT 4
+statement/sp/jump NULL fac STATEMENT 4
+statement/sp/jump NULL fac STATEMENT 4
+statement/sp/jump NULL fac STATEMENT 4
+statement/sp/jump NULL fac STATEMENT 4
+statement/sp/jump NULL fac STATEMENT 4
+statement/sp/jump NULL fac STATEMENT 4
+statement/sp/jump NULL fac STATEMENT 4
+statement/sp/jump NULL fac STATEMENT 4
+statement/sp/jump NULL fac STATEMENT 4
+statement/sp/jump NULL fac STATEMENT 4
+statement/sp/jump NULL fac STATEMENT 4
+statement/sp/jump NULL fac STATEMENT 4
+statement/sp/jump NULL fac STATEMENT 4
+statement/sp/jump NULL fac STATEMENT 4
+statement/sp/jump NULL fac STATEMENT 4
+statement/sp/jump NULL fac STATEMENT 4
+statement/sp/jump NULL fac STATEMENT 4
+statement/sp/jump NULL fac STATEMENT 4
+statement/sp/jump NULL fac STATEMENT 4
+statement/sp/jump NULL fac STATEMENT 4
+statement/sp/jump NULL fac STATEMENT 4
+statement/sp/jump NULL fac STATEMENT 4
+statement/sp/jump NULL fac STATEMENT 4
+statement/sp/jump NULL fac STATEMENT 4
+statement/sp/jump NULL fac STATEMENT 4
+statement/sp/jump NULL fac STATEMENT 4
+statement/sp/jump NULL fac STATEMENT 4
+statement/sp/jump NULL fac STATEMENT 4
+statement/sp/jump NULL fac STATEMENT 4
+statement/sp/jump NULL fac STATEMENT 4
+statement/sp/jump NULL fac STATEMENT 4
+statement/sp/jump NULL fac STATEMENT 4
+statement/sp/jump NULL fac STATEMENT 4
+statement/sp/jump NULL fac STATEMENT 4
+statement/sp/jump NULL fac STATEMENT 4
+statement/sp/jump NULL fac STATEMENT 4
+statement/sp/jump NULL fac STATEMENT 4
+statement/sp/jump NULL fac STATEMENT 4
+statement/sp/jump NULL fac STATEMENT 4
+statement/sp/jump NULL fac STATEMENT 4
+statement/sp/jump NULL fac STATEMENT 4
+statement/sp/jump NULL fac STATEMENT 4
+statement/sp/jump NULL fac STATEMENT 4
+statement/sp/jump_if_not NULL fac STATEMENT 4
+statement/sp/jump_if_not NULL fac STATEMENT 4
+statement/sp/jump_if_not NULL fac STATEMENT 4
+statement/sp/jump_if_not NULL fac STATEMENT 4
+statement/sp/jump_if_not NULL fac STATEMENT 4
+statement/sp/jump_if_not NULL fac STATEMENT 4
+statement/sp/jump_if_not NULL fac STATEMENT 4
+statement/sp/jump_if_not NULL fac STATEMENT 4
+statement/sp/jump_if_not NULL fac STATEMENT 4
+statement/sp/jump_if_not NULL fac STATEMENT 4
+statement/sp/jump_if_not NULL fac STATEMENT 4
+statement/sp/jump_if_not NULL fac STATEMENT 4
+statement/sp/jump_if_not NULL fac STATEMENT 4
+statement/sp/jump_if_not NULL fac STATEMENT 4
+statement/sp/jump_if_not NULL fac STATEMENT 4
+statement/sp/jump_if_not NULL fac STATEMENT 4
+statement/sp/jump_if_not NULL fac STATEMENT 4
+statement/sp/jump_if_not NULL fac STATEMENT 4
+statement/sp/jump_if_not NULL fac STATEMENT 4
+statement/sp/jump_if_not NULL fac STATEMENT 4
+statement/sp/jump_if_not NULL fac STATEMENT 4
+statement/sp/jump_if_not NULL fac STATEMENT 4
+statement/sp/jump_if_not NULL fac STATEMENT 4
+statement/sp/jump_if_not NULL fac STATEMENT 4
+statement/sp/jump_if_not NULL fac STATEMENT 4
+statement/sp/jump_if_not NULL fac STATEMENT 4
+statement/sp/jump_if_not NULL fac STATEMENT 4
+statement/sp/jump_if_not NULL fac STATEMENT 4
+statement/sp/jump_if_not NULL fac STATEMENT 4
+statement/sp/jump_if_not NULL fac STATEMENT 4
+statement/sp/jump_if_not NULL fac STATEMENT 4
+statement/sp/jump_if_not NULL fac STATEMENT 4
+statement/sp/jump_if_not NULL fac STATEMENT 4
+statement/sp/jump_if_not NULL fac STATEMENT 4
+statement/sp/jump_if_not NULL fac STATEMENT 4
+statement/sp/jump_if_not NULL fac STATEMENT 4
+statement/sp/jump_if_not NULL fac STATEMENT 4
+statement/sp/jump_if_not NULL fac STATEMENT 4
+statement/sp/jump_if_not NULL fac STATEMENT 4
+statement/sp/jump_if_not NULL fac STATEMENT 4
+statement/sp/jump_if_not NULL fac STATEMENT 4
+statement/sp/jump_if_not NULL fac STATEMENT 4
+statement/sp/jump_if_not NULL fac STATEMENT 4
+statement/sp/jump_if_not NULL fac STATEMENT 4
+statement/sp/jump_if_not NULL fac STATEMENT 4
+statement/sp/jump_if_not NULL fac STATEMENT 4
+statement/sp/jump_if_not NULL fac STATEMENT 4
+statement/sp/jump_if_not NULL fac STATEMENT 4
+statement/sp/jump_if_not NULL fac STATEMENT 4
+statement/sp/jump_if_not NULL fac STATEMENT 4
+statement/sp/jump_if_not NULL fac STATEMENT 4
+statement/sp/jump_if_not NULL fac STATEMENT 4
+statement/sp/jump_if_not NULL fac STATEMENT 4
+statement/sp/jump_if_not NULL fac STATEMENT 4
+statement/sp/jump_if_not NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/set NULL fac STATEMENT 4
+statement/sp/freturn NULL fac STATEMENT 5
+statement/sp/freturn NULL fac STATEMENT 5
+statement/sp/freturn NULL fac STATEMENT 5
+statement/sp/freturn NULL fac STATEMENT 5
+statement/sp/freturn NULL fac STATEMENT 5
+statement/sp/freturn NULL fac STATEMENT 5
+statement/sp/freturn NULL fac STATEMENT 5
+statement/sp/freturn NULL fac STATEMENT 5
+statement/sp/freturn NULL fac STATEMENT 5
+statement/sp/freturn NULL fac STATEMENT 5
+statement/sp/jump NULL fac STATEMENT 5
+statement/sp/jump NULL fac STATEMENT 5
+statement/sp/jump NULL fac STATEMENT 5
+statement/sp/jump NULL fac STATEMENT 5
+statement/sp/jump NULL fac STATEMENT 5
+statement/sp/jump NULL fac STATEMENT 5
+statement/sp/jump NULL fac STATEMENT 5
+statement/sp/jump NULL fac STATEMENT 5
+statement/sp/jump NULL fac STATEMENT 5
+statement/sp/jump NULL fac STATEMENT 5
+statement/sp/jump NULL fac STATEMENT 5
+statement/sp/jump NULL fac STATEMENT 5
+statement/sp/jump NULL fac STATEMENT 5
+statement/sp/jump NULL fac STATEMENT 5
+statement/sp/jump NULL fac STATEMENT 5
+statement/sp/jump NULL fac STATEMENT 5
+statement/sp/jump NULL fac STATEMENT 5
+statement/sp/jump NULL fac STATEMENT 5
+statement/sp/jump NULL fac STATEMENT 5
+statement/sp/jump NULL fac STATEMENT 5
+statement/sp/jump NULL fac STATEMENT 5
+statement/sp/jump NULL fac STATEMENT 5
+statement/sp/jump NULL fac STATEMENT 5
+statement/sp/jump NULL fac STATEMENT 5
+statement/sp/jump NULL fac STATEMENT 5
+statement/sp/jump NULL fac STATEMENT 5
+statement/sp/jump NULL fac STATEMENT 5
+statement/sp/jump NULL fac STATEMENT 5
+statement/sp/jump NULL fac STATEMENT 5
+statement/sp/jump NULL fac STATEMENT 5
+statement/sp/jump NULL fac STATEMENT 5
+statement/sp/jump NULL fac STATEMENT 5
+statement/sp/jump NULL fac STATEMENT 5
+statement/sp/jump NULL fac STATEMENT 5
+statement/sp/jump NULL fac STATEMENT 5
+statement/sp/jump NULL fac STATEMENT 5
+statement/sp/jump NULL fac STATEMENT 5
+statement/sp/jump NULL fac STATEMENT 5
+statement/sp/jump NULL fac STATEMENT 5
+statement/sp/jump NULL fac STATEMENT 5
+statement/sp/jump NULL fac STATEMENT 5
+statement/sp/jump NULL fac STATEMENT 5
+statement/sp/jump NULL fac STATEMENT 5
+statement/sp/jump NULL fac STATEMENT 5
+statement/sp/jump NULL fac STATEMENT 5
+statement/sp/jump_if_not NULL fac STATEMENT 5
+statement/sp/jump_if_not NULL fac STATEMENT 5
+statement/sp/jump_if_not NULL fac STATEMENT 5
+statement/sp/jump_if_not NULL fac STATEMENT 5
+statement/sp/jump_if_not NULL fac STATEMENT 5
+statement/sp/jump_if_not NULL fac STATEMENT 5
+statement/sp/jump_if_not NULL fac STATEMENT 5
+statement/sp/jump_if_not NULL fac STATEMENT 5
+statement/sp/jump_if_not NULL fac STATEMENT 5
+statement/sp/jump_if_not NULL fac STATEMENT 5
+statement/sp/jump_if_not NULL fac STATEMENT 5
+statement/sp/jump_if_not NULL fac STATEMENT 5
+statement/sp/jump_if_not NULL fac STATEMENT 5
+statement/sp/jump_if_not NULL fac STATEMENT 5
+statement/sp/jump_if_not NULL fac STATEMENT 5
+statement/sp/jump_if_not NULL fac STATEMENT 5
+statement/sp/jump_if_not NULL fac STATEMENT 5
+statement/sp/jump_if_not NULL fac STATEMENT 5
+statement/sp/jump_if_not NULL fac STATEMENT 5
+statement/sp/jump_if_not NULL fac STATEMENT 5
+statement/sp/jump_if_not NULL fac STATEMENT 5
+statement/sp/jump_if_not NULL fac STATEMENT 5
+statement/sp/jump_if_not NULL fac STATEMENT 5
+statement/sp/jump_if_not NULL fac STATEMENT 5
+statement/sp/jump_if_not NULL fac STATEMENT 5
+statement/sp/jump_if_not NULL fac STATEMENT 5
+statement/sp/jump_if_not NULL fac STATEMENT 5
+statement/sp/jump_if_not NULL fac STATEMENT 5
+statement/sp/jump_if_not NULL fac STATEMENT 5
+statement/sp/jump_if_not NULL fac STATEMENT 5
+statement/sp/jump_if_not NULL fac STATEMENT 5
+statement/sp/jump_if_not NULL fac STATEMENT 5
+statement/sp/jump_if_not NULL fac STATEMENT 5
+statement/sp/jump_if_not NULL fac STATEMENT 5
+statement/sp/jump_if_not NULL fac STATEMENT 5
+statement/sp/jump_if_not NULL fac STATEMENT 5
+statement/sp/jump_if_not NULL fac STATEMENT 5
+statement/sp/jump_if_not NULL fac STATEMENT 5
+statement/sp/jump_if_not NULL fac STATEMENT 5
+statement/sp/jump_if_not NULL fac STATEMENT 5
+statement/sp/jump_if_not NULL fac STATEMENT 5
+statement/sp/jump_if_not NULL fac STATEMENT 5
+statement/sp/jump_if_not NULL fac STATEMENT 5
+statement/sp/jump_if_not NULL fac STATEMENT 5
+statement/sp/jump_if_not NULL fac STATEMENT 5
+statement/sp/jump_if_not NULL fac STATEMENT 5
+statement/sp/jump_if_not NULL fac STATEMENT 5
+statement/sp/jump_if_not NULL fac STATEMENT 5
+statement/sp/jump_if_not NULL fac STATEMENT 5
+statement/sp/jump_if_not NULL fac STATEMENT 5
+statement/sp/jump_if_not NULL fac STATEMENT 5
+statement/sp/jump_if_not NULL fac STATEMENT 5
+statement/sp/jump_if_not NULL fac STATEMENT 5
+statement/sp/jump_if_not NULL fac STATEMENT 5
+statement/sp/jump_if_not NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/set NULL fac STATEMENT 5
+statement/sp/freturn NULL fac STATEMENT 7
+statement/sp/freturn NULL fac STATEMENT 7
+statement/sp/freturn NULL fac STATEMENT 7
+statement/sp/freturn NULL fac STATEMENT 7
+statement/sp/freturn NULL fac STATEMENT 7
+statement/sp/jump NULL fac STATEMENT 7
+statement/sp/jump NULL fac STATEMENT 7
+statement/sp/jump NULL fac STATEMENT 7
+statement/sp/jump NULL fac STATEMENT 7
+statement/sp/jump NULL fac STATEMENT 7
+statement/sp/jump NULL fac STATEMENT 7
+statement/sp/jump NULL fac STATEMENT 7
+statement/sp/jump NULL fac STATEMENT 7
+statement/sp/jump NULL fac STATEMENT 7
+statement/sp/jump NULL fac STATEMENT 7
+statement/sp/jump NULL fac STATEMENT 7
+statement/sp/jump NULL fac STATEMENT 7
+statement/sp/jump NULL fac STATEMENT 7
+statement/sp/jump NULL fac STATEMENT 7
+statement/sp/jump NULL fac STATEMENT 7
+statement/sp/jump NULL fac STATEMENT 7
+statement/sp/jump NULL fac STATEMENT 7
+statement/sp/jump NULL fac STATEMENT 7
+statement/sp/jump NULL fac STATEMENT 7
+statement/sp/jump NULL fac STATEMENT 7
+statement/sp/jump NULL fac STATEMENT 7
+statement/sp/jump NULL fac STATEMENT 7
+statement/sp/jump NULL fac STATEMENT 7
+statement/sp/jump NULL fac STATEMENT 7
+statement/sp/jump NULL fac STATEMENT 7
+statement/sp/jump NULL fac STATEMENT 7
+statement/sp/jump NULL fac STATEMENT 7
+statement/sp/jump NULL fac STATEMENT 7
+statement/sp/jump NULL fac STATEMENT 7
+statement/sp/jump NULL fac STATEMENT 7
+statement/sp/jump NULL fac STATEMENT 7
+statement/sp/jump NULL fac STATEMENT 7
+statement/sp/jump NULL fac STATEMENT 7
+statement/sp/jump NULL fac STATEMENT 7
+statement/sp/jump NULL fac STATEMENT 7
+statement/sp/jump_if_not NULL fac STATEMENT 7
+statement/sp/jump_if_not NULL fac STATEMENT 7
+statement/sp/jump_if_not NULL fac STATEMENT 7
+statement/sp/jump_if_not NULL fac STATEMENT 7
+statement/sp/jump_if_not NULL fac STATEMENT 7
+statement/sp/jump_if_not NULL fac STATEMENT 7
+statement/sp/jump_if_not NULL fac STATEMENT 7
+statement/sp/jump_if_not NULL fac STATEMENT 7
+statement/sp/jump_if_not NULL fac STATEMENT 7
+statement/sp/jump_if_not NULL fac STATEMENT 7
+statement/sp/jump_if_not NULL fac STATEMENT 7
+statement/sp/jump_if_not NULL fac STATEMENT 7
+statement/sp/jump_if_not NULL fac STATEMENT 7
+statement/sp/jump_if_not NULL fac STATEMENT 7
+statement/sp/jump_if_not NULL fac STATEMENT 7
+statement/sp/jump_if_not NULL fac STATEMENT 7
+statement/sp/jump_if_not NULL fac STATEMENT 7
+statement/sp/jump_if_not NULL fac STATEMENT 7
+statement/sp/jump_if_not NULL fac STATEMENT 7
+statement/sp/jump_if_not NULL fac STATEMENT 7
+statement/sp/jump_if_not NULL fac STATEMENT 7
+statement/sp/jump_if_not NULL fac STATEMENT 7
+statement/sp/jump_if_not NULL fac STATEMENT 7
+statement/sp/jump_if_not NULL fac STATEMENT 7
+statement/sp/jump_if_not NULL fac STATEMENT 7
+statement/sp/jump_if_not NULL fac STATEMENT 7
+statement/sp/jump_if_not NULL fac STATEMENT 7
+statement/sp/jump_if_not NULL fac STATEMENT 7
+statement/sp/jump_if_not NULL fac STATEMENT 7
+statement/sp/jump_if_not NULL fac STATEMENT 7
+statement/sp/jump_if_not NULL fac STATEMENT 7
+statement/sp/jump_if_not NULL fac STATEMENT 7
+statement/sp/jump_if_not NULL fac STATEMENT 7
+statement/sp/jump_if_not NULL fac STATEMENT 7
+statement/sp/jump_if_not NULL fac STATEMENT 7
+statement/sp/jump_if_not NULL fac STATEMENT 7
+statement/sp/jump_if_not NULL fac STATEMENT 7
+statement/sp/jump_if_not NULL fac STATEMENT 7
+statement/sp/jump_if_not NULL fac STATEMENT 7
+statement/sp/jump_if_not NULL fac STATEMENT 7
+statement/sp/set NULL fac STATEMENT 7
+statement/sp/set NULL fac STATEMENT 7
+statement/sp/set NULL fac STATEMENT 7
+statement/sp/set NULL fac STATEMENT 7
+statement/sp/set NULL fac STATEMENT 7
+statement/sp/set NULL fac STATEMENT 7
+statement/sp/set NULL fac STATEMENT 7
+statement/sp/set NULL fac STATEMENT 7
+statement/sp/set NULL fac STATEMENT 7
+statement/sp/set NULL fac STATEMENT 7
+statement/sp/set NULL fac STATEMENT 7
+statement/sp/set NULL fac STATEMENT 7
+statement/sp/set NULL fac STATEMENT 7
+statement/sp/set NULL fac STATEMENT 7
+statement/sp/set NULL fac STATEMENT 7
+statement/sp/set NULL fac STATEMENT 7
+statement/sp/set NULL fac STATEMENT 7
+statement/sp/set NULL fac STATEMENT 7
+statement/sp/set NULL fac STATEMENT 7
+statement/sp/set NULL fac STATEMENT 7
+statement/sp/set NULL fac STATEMENT 7
+statement/sp/set NULL fac STATEMENT 7
+statement/sp/set NULL fac STATEMENT 7
+statement/sp/set NULL fac STATEMENT 7
+statement/sp/set NULL fac STATEMENT 7
+statement/sp/set NULL fac STATEMENT 7
+statement/sp/set NULL fac STATEMENT 7
+statement/sp/set NULL fac STATEMENT 7
+statement/sp/set NULL fac STATEMENT 7
+statement/sp/set NULL fac STATEMENT 7
+statement/sp/set NULL fac STATEMENT 7
+statement/sp/set NULL fac STATEMENT 7
+statement/sp/set NULL fac STATEMENT 7
+statement/sp/set NULL fac STATEMENT 7
+statement/sp/set NULL fac STATEMENT 7
+statement/sp/set NULL fac STATEMENT 7
+statement/sp/set NULL fac STATEMENT 7
+statement/sp/set NULL fac STATEMENT 7
+statement/sp/set NULL fac STATEMENT 7
+statement/sp/set NULL fac STATEMENT 7
+statement/sp/set NULL fac STATEMENT 7
+statement/sp/set NULL fac STATEMENT 7
+statement/sp/set NULL fac STATEMENT 7
+statement/sp/set NULL fac STATEMENT 7
+statement/sp/set NULL fac STATEMENT 7
+statement/sp/set NULL fac STATEMENT 7
+statement/sp/set NULL fac STATEMENT 7
+statement/sp/set NULL fac STATEMENT 7
+statement/sp/set NULL fac STATEMENT 7
+statement/sp/set NULL fac STATEMENT 7
+statement/sp/set NULL fac STATEMENT 7
+statement/sp/set NULL fac STATEMENT 7
+statement/sp/set NULL fac STATEMENT 7
+statement/sp/set NULL fac STATEMENT 7
+statement/sp/set NULL fac STATEMENT 7
+statement/sp/set NULL fac STATEMENT 7
+statement/sp/set NULL fac STATEMENT 7
+statement/sp/set NULL fac STATEMENT 7
+statement/sp/set NULL fac STATEMENT 7
+statement/sp/set NULL fac STATEMENT 7
+statement/sp/set NULL fac STATEMENT 7
+statement/sp/set NULL fac STATEMENT 7
+statement/sp/set NULL fac STATEMENT 7
+statement/sp/set NULL fac STATEMENT 7
+statement/sp/set NULL fac STATEMENT 7
+statement/sp/set NULL fac STATEMENT 7
+statement/sp/set NULL fac STATEMENT 7
+statement/sp/set NULL fac STATEMENT 7
+statement/sp/set NULL fac STATEMENT 7
+statement/sp/set NULL fac STATEMENT 7
+statement/sp/set NULL fac STATEMENT 7
+statement/sp/set NULL fac STATEMENT 7
+statement/sp/set NULL fac STATEMENT 7
+statement/sp/set NULL fac STATEMENT 7
+statement/sp/set NULL fac STATEMENT 7
+statement/sp/freturn NULL fun STATEMENT 1
+statement/sp/jump NULL ifac STATEMENT 2
+statement/sp/jump NULL ifac STATEMENT 2
+statement/sp/jump NULL ifac STATEMENT 2
+statement/sp/jump NULL ifac STATEMENT 2
+statement/sp/jump NULL ifac STATEMENT 2
+statement/sp/jump NULL ifac STATEMENT 2
+statement/sp/jump NULL ifac STATEMENT 2
+statement/sp/jump NULL ifac STATEMENT 2
+statement/sp/jump NULL ifac STATEMENT 2
+statement/sp/jump NULL ifac STATEMENT 2
+statement/sp/jump_if_not NULL ifac STATEMENT 2
+statement/sp/jump_if_not NULL ifac STATEMENT 2
+statement/sp/jump_if_not NULL ifac STATEMENT 2
+statement/sp/jump_if_not NULL ifac STATEMENT 2
+statement/sp/jump_if_not NULL ifac STATEMENT 2
+statement/sp/jump_if_not NULL ifac STATEMENT 2
+statement/sp/jump_if_not NULL ifac STATEMENT 2
+statement/sp/jump_if_not NULL ifac STATEMENT 2
+statement/sp/jump_if_not NULL ifac STATEMENT 2
+statement/sp/jump_if_not NULL ifac STATEMENT 2
+statement/sp/jump_if_not NULL ifac STATEMENT 2
+statement/sp/jump_if_not NULL ifac STATEMENT 2
+statement/sp/set NULL ifac STATEMENT 2
+statement/sp/set NULL ifac STATEMENT 2
+statement/sp/set NULL ifac STATEMENT 2
+statement/sp/set NULL ifac STATEMENT 2
+statement/sp/set NULL ifac STATEMENT 2
+statement/sp/set NULL ifac STATEMENT 2
+statement/sp/set NULL ifac STATEMENT 2
+statement/sp/set NULL ifac STATEMENT 2
+statement/sp/set NULL ifac STATEMENT 2
+statement/sp/set NULL ifac STATEMENT 2
+statement/sp/set NULL ifac STATEMENT 2
+statement/sp/stmt INSERT INTO t2 VALUES (i, fac(i)) ifac STATEMENT 2
+statement/sp/stmt INSERT INTO t2 VALUES (i, fac(i)) ifac STATEMENT 2
+statement/sp/stmt INSERT INTO t2 VALUES (i, fac(i)) ifac STATEMENT 2
+statement/sp/stmt INSERT INTO t2 VALUES (i, fac(i)) ifac STATEMENT 2
+statement/sp/stmt INSERT INTO t2 VALUES (i, fac(i)) ifac STATEMENT 2
+statement/sp/stmt INSERT INTO t2 VALUES (i, fac(i)) ifac STATEMENT 2
+statement/sp/stmt INSERT INTO t2 VALUES (i, fac(i)) ifac STATEMENT 2
+statement/sp/stmt INSERT INTO t2 VALUES (i, fac(i)) ifac STATEMENT 2
+statement/sp/stmt INSERT INTO t2 VALUES (i, fac(i)) ifac STATEMENT 2
+statement/sp/stmt INSERT INTO t2 VALUES (i, fac(i)) ifac STATEMENT 2
+statement/sp/jump NULL ifac STATEMENT 3
+statement/sp/jump NULL ifac STATEMENT 3
+statement/sp/jump NULL ifac STATEMENT 3
+statement/sp/jump NULL ifac STATEMENT 3
+statement/sp/jump NULL ifac STATEMENT 3
+statement/sp/jump NULL ifac STATEMENT 3
+statement/sp/jump NULL ifac STATEMENT 3
+statement/sp/jump NULL ifac STATEMENT 3
+statement/sp/jump NULL ifac STATEMENT 3
+statement/sp/jump NULL ifac STATEMENT 3
+statement/sp/jump_if_not NULL ifac STATEMENT 3
+statement/sp/jump_if_not NULL ifac STATEMENT 3
+statement/sp/jump_if_not NULL ifac STATEMENT 3
+statement/sp/jump_if_not NULL ifac STATEMENT 3
+statement/sp/jump_if_not NULL ifac STATEMENT 3
+statement/sp/jump_if_not NULL ifac STATEMENT 3
+statement/sp/jump_if_not NULL ifac STATEMENT 3
+statement/sp/jump_if_not NULL ifac STATEMENT 3
+statement/sp/jump_if_not NULL ifac STATEMENT 3
+statement/sp/jump_if_not NULL ifac STATEMENT 3
+statement/sp/jump_if_not NULL ifac STATEMENT 3
+statement/sp/jump_if_not NULL ifac STATEMENT 3
+statement/sp/set NULL ifac STATEMENT 3
+statement/sp/set NULL ifac STATEMENT 3
+statement/sp/set NULL ifac STATEMENT 3
+statement/sp/set NULL ifac STATEMENT 3
+statement/sp/set NULL ifac STATEMENT 3
+statement/sp/set NULL ifac STATEMENT 3
+statement/sp/set NULL ifac STATEMENT 3
+statement/sp/set NULL ifac STATEMENT 3
+statement/sp/set NULL ifac STATEMENT 3
+statement/sp/set NULL ifac STATEMENT 3
+statement/sp/set NULL ifac STATEMENT 3
+statement/sp/stmt INSERT INTO t2 VALUES (i, fac(i)) ifac STATEMENT 3
+statement/sp/stmt INSERT INTO t2 VALUES (i, fac(i)) ifac STATEMENT 3
+statement/sp/stmt INSERT INTO t2 VALUES (i, fac(i)) ifac STATEMENT 3
+statement/sp/stmt INSERT INTO t2 VALUES (i, fac(i)) ifac STATEMENT 3
+statement/sp/stmt INSERT INTO t2 VALUES (i, fac(i)) ifac STATEMENT 3
+statement/sp/stmt INSERT INTO t2 VALUES (i, fac(i)) ifac STATEMENT 3
+statement/sp/stmt INSERT INTO t2 VALUES (i, fac(i)) ifac STATEMENT 3
+statement/sp/stmt INSERT INTO t2 VALUES (i, fac(i)) ifac STATEMENT 3
+statement/sp/stmt INSERT INTO t2 VALUES (i, fac(i)) ifac STATEMENT 3
+statement/sp/stmt INSERT INTO t2 VALUES (i, fac(i)) ifac STATEMENT 3
+statement/sp/jump NULL ifac STATEMENT 4
+statement/sp/jump NULL ifac STATEMENT 4
+statement/sp/jump NULL ifac STATEMENT 4
+statement/sp/jump NULL ifac STATEMENT 4
+statement/sp/jump NULL ifac STATEMENT 4
+statement/sp/jump NULL ifac STATEMENT 4
+statement/sp/jump NULL ifac STATEMENT 4
+statement/sp/jump NULL ifac STATEMENT 4
+statement/sp/jump NULL ifac STATEMENT 4
+statement/sp/jump NULL ifac STATEMENT 4
+statement/sp/jump_if_not NULL ifac STATEMENT 4
+statement/sp/jump_if_not NULL ifac STATEMENT 4
+statement/sp/jump_if_not NULL ifac STATEMENT 4
+statement/sp/jump_if_not NULL ifac STATEMENT 4
+statement/sp/jump_if_not NULL ifac STATEMENT 4
+statement/sp/jump_if_not NULL ifac STATEMENT 4
+statement/sp/jump_if_not NULL ifac STATEMENT 4
+statement/sp/jump_if_not NULL ifac STATEMENT 4
+statement/sp/jump_if_not NULL ifac STATEMENT 4
+statement/sp/jump_if_not NULL ifac STATEMENT 4
+statement/sp/jump_if_not NULL ifac STATEMENT 4
+statement/sp/jump_if_not NULL ifac STATEMENT 4
+statement/sp/set NULL ifac STATEMENT 4
+statement/sp/set NULL ifac STATEMENT 4
+statement/sp/set NULL ifac STATEMENT 4
+statement/sp/set NULL ifac STATEMENT 4
+statement/sp/set NULL ifac STATEMENT 4
+statement/sp/set NULL ifac STATEMENT 4
+statement/sp/set NULL ifac STATEMENT 4
+statement/sp/set NULL ifac STATEMENT 4
+statement/sp/set NULL ifac STATEMENT 4
+statement/sp/set NULL ifac STATEMENT 4
+statement/sp/set NULL ifac STATEMENT 4
+statement/sp/stmt INSERT INTO t2 VALUES (i, fac(i)) ifac STATEMENT 4
+statement/sp/stmt INSERT INTO t2 VALUES (i, fac(i)) ifac STATEMENT 4
+statement/sp/stmt INSERT INTO t2 VALUES (i, fac(i)) ifac STATEMENT 4
+statement/sp/stmt INSERT INTO t2 VALUES (i, fac(i)) ifac STATEMENT 4
+statement/sp/stmt INSERT INTO t2 VALUES (i, fac(i)) ifac STATEMENT 4
+statement/sp/stmt INSERT INTO t2 VALUES (i, fac(i)) ifac STATEMENT 4
+statement/sp/stmt INSERT INTO t2 VALUES (i, fac(i)) ifac STATEMENT 4
+statement/sp/stmt INSERT INTO t2 VALUES (i, fac(i)) ifac STATEMENT 4
+statement/sp/stmt INSERT INTO t2 VALUES (i, fac(i)) ifac STATEMENT 4
+statement/sp/stmt INSERT INTO t2 VALUES (i, fac(i)) ifac STATEMENT 4
+statement/sp/jump NULL ifac STATEMENT 6
+statement/sp/jump NULL ifac STATEMENT 6
+statement/sp/jump NULL ifac STATEMENT 6
+statement/sp/jump NULL ifac STATEMENT 6
+statement/sp/jump NULL ifac STATEMENT 6
+statement/sp/jump NULL ifac STATEMENT 6
+statement/sp/jump_if_not NULL ifac STATEMENT 6
+statement/sp/jump_if_not NULL ifac STATEMENT 6
+statement/sp/jump_if_not NULL ifac STATEMENT 6
+statement/sp/jump_if_not NULL ifac STATEMENT 6
+statement/sp/jump_if_not NULL ifac STATEMENT 6
+statement/sp/jump_if_not NULL ifac STATEMENT 6
+statement/sp/set NULL ifac STATEMENT 6
+statement/sp/set NULL ifac STATEMENT 6
+statement/sp/set NULL ifac STATEMENT 6
+statement/sp/set NULL ifac STATEMENT 6
+statement/sp/set NULL ifac STATEMENT 6
+statement/sp/stmt INSERT INTO t2 VALUES (i, fac(i)) ifac STATEMENT 6
+statement/sp/stmt INSERT INTO t2 VALUES (i, fac(i)) ifac STATEMENT 6
+statement/sp/stmt INSERT INTO t2 VALUES (i, fac(i)) ifac STATEMENT 6
+statement/sp/stmt INSERT INTO t2 VALUES (i, fac(i)) ifac STATEMENT 6
+statement/sp/stmt INSERT INTO t2 VALUES (i, fac(i)) ifac STATEMENT 6
+statement/sp/freturn NULL inc STATEMENT 2
+statement/sp/set NULL inc STATEMENT 3
+statement/sp/stmt CALL inc(y) inc2 STATEMENT 2
+statement/sp/stmt INSERT INTO t1 VALUES (x, y) inc2 STATEMENT 2
+statement/sp/stmt CALL inc2(x2, y) iotest STATEMENT 1
+statement/sp/stmt INSERT INTO t1 VALUES (x1, y) iotest STATEMENT 1
+statement/sp/freturn NULL mul STATEMENT 2
+statement/sp/stmt CALL ifac(10) trg TRANSACTION 1
+statement/sp/stmt CALL ifac(10) trg TRANSACTION 2
+statement/sp/stmt CALL ifac(10) trg TRANSACTION 3
+statement/sp/stmt CALL ifac(10) trg TRANSACTION 5
+TRUNCATE TABLE performance_schema.events_statements_history_long;
+DROP PROCEDURE c4;
+DROP PROCEDURE c3;
+DROP PROCEDURE c2;
+DROP PROCEDURE c1;
+DROP PROCEDURE inc;
+DROP PROCEDURE inc2;
+DROP PROCEDURE iotest;
+DROP FUNCTION mul;
+DROP FUNCTION inc;
+DROP FUNCTION fac;
+DROP FUNCTION fun;
+DROP PROCEDURE ifac;
+DROP TRIGGER trg;
+DROP TABLE t1,t2;
+DROP DATABASE nested_sp;
diff --git a/mysql-test/suite/perfschema/r/statement_program_non_nested.result b/mysql-test/suite/perfschema/r/statement_program_non_nested.result
new file mode 100644
index 00000000000..af9807cbc97
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/statement_program_non_nested.result
@@ -0,0 +1,704 @@
+TRUNCATE TABLE performance_schema.events_statements_summary_by_program;
+TRUNCATE TABLE performance_schema.events_statements_history_long;
+################################################
+# Quering PS statement summary and history_long#
+################################################
+# SET-UP
+CREATE DATABASE stored_programs;
+USE stored_programs;
+CREATE TABLE t1(
+i INT NOT NULL,
+j INT
+) engine=innodb;
+CREATE TABLE t2(
+name CHAR(16) NOT NULL DEFAULT '',
+id INT NOT NULL
+) engine=innodb;
+CREATE TABLE t3(
+d DATE,
+n INT,
+f DOUBLE,
+s VARCHAR(32)
+);
+CREATE TABLE t4(
+`k` int(10) unsigned NOT NULL AUTO_INCREMENT,
+`word` varchar(100) NOT NULL,
+`mean` varchar(300) NOT NULL,
+PRIMARY KEY (`k`)
+);
+############################
+# Creating Stored Programs #
+############################
+# Stored Routine ( Procedure & Function )
+CREATE PROCEDURE SampleProc1(x1 INT, x2 INT, y INT)
+BEGIN
+INSERT INTO t1 VALUES (x1, y);
+INSERT INTO t1 VALUES (x2, y);
+END|
+CREATE PROCEDURE SampleProc2(x CHAR(16), y INT)
+BEGIN
+DECLARE z1, z2 INT;
+SET z1 = y;
+SET z2 = z1+2;
+INSERT INTO t2 VALUES (x, z2);
+END|
+CREATE PROCEDURE SampleProc3()
+BEGIN
+DECLARE ld DATE;
+DECLARE li INT;
+DECLARE lf DOUBLE;
+DECLARE ls VARCHAR(32);
+SET ld = NULL, li = NULL, lf = NULL, ls = NULL;
+INSERT INTO t3 VALUES (ld, li, lf, ls);
+INSERT INTO t3 (n, f, s) VALUES ((ld IS NULL), 1, "ld is null"),
+((li IS NULL), 1, "li is null"),
+((li = 0), NULL, "li = 0"),
+((lf IS NULL), 1, "lf is null"),
+((lf = 0), NULL, "lf = 0"),
+((ls IS NULL), 1, "ls is null");
+END|
+CREATE PROCEDURE SampleProc4()
+BEGIN
+DECLARE x INT;
+SET x = 1;
+WHILE x <= 2 DO
+INSERT INTO t4(word, mean) VALUES('a','a mean');
+SET x = x + 1;
+END WHILE;
+END|
+CREATE FUNCTION append(s1 CHAR(8), s2 CHAR(8)) RETURNS CHAR(16)
+RETURN concat(s1, s2)|
+CREATE FUNCTION wt_avg(n1 INT, n2 INT, n3 INT, n4 INT)
+RETURNS INT
+DETERMINISTIC
+BEGIN
+DECLARE avg INT;
+SET avg = (n1+n2+n3*2+n4*4)/8;
+RETURN avg;
+END|
+CREATE FUNCTION fac(n INT UNSIGNED) RETURNS BIGINT UNSIGNED
+BEGIN
+DECLARE f BIGINT UNSIGNED DEFAULT 1;
+WHILE n > 1 DO
+SET f = f * n;
+SET n = n - 1;
+END WHILE;
+RETURN f;
+END|
+# Triggers
+CREATE TRIGGER trg1 BEFORE INSERT ON t1 FOR EACH ROW
+BEGIN
+if isnull(new.j) then
+SET new.j:= new.i * 10;
+END if;
+END|
+CREATE TRIGGER trg2 AFTER INSERT ON t2 FOR EACH ROW
+BEGIN
+UPDATE t1 SET i=new.id+i ;
+END|
+CREATE TRIGGER trg3 AFTER UPDATE ON t2 FOR EACH ROW
+SET @change:= @change + new.id - old.id|
+CREATE TRIGGER trg4 BEFORE DELETE ON t1 FOR EACH ROW
+SET @del:= @del + 1|
+CREATE TRIGGER trg5 AFTER DELETE ON t1 FOR EACH ROW
+SET @del:= @del + 8 + old.j|
+#####################
+# Executing queries #
+#####################
+INSERT INTO t1 VALUES (10,20);
+CALL SampleProc1(30,40,50);
+SET @a=1;
+SELECT @a;
+@a
+1
+CALL SampleProc2("Jwalamukhi",34);
+SELECT @a;
+@a
+1
+CALL SampleProc3();
+CALL SampleProc4();
+SET @change=1;
+SELECT @change;
+@change
+1
+UPDATE t2 SET id=22 WHERE name="Jwalamukhi";
+SELECT @change;
+@change
+-13
+SET @del=1;
+SELECT @del;
+@del
+1
+DELETE FROM t1 WHERE i=76;
+SELECT @del;
+@del
+60
+SELECT wt_avg(1, 12, 1990, 1121990);
+wt_avg(1, 12, 1990, 1121990)
+561494
+SELECT fac(5);
+fac(5)
+120
+SELECT append("Bolly", "wood");
+append("Bolly", "wood")
+Bollywood
+# Event
+SET GLOBAL event_scheduler=ON;
+CREATE TABLE table_t(a INT);
+CREATE EVENT e1 ON SCHEDULE EVERY 2 SECOND DO
+BEGIN
+INSERT INTO table_t VALUES(1);
+END|
+SELECT * FROM table_t;
+a
+1
+SET GLOBAL event_scheduler=OFF;
+SELECT OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME, COUNT_STAR, COUNT_STATEMENTS
+FROM performance_schema.events_statements_summary_by_program
+WHERE OBJECT_SCHEMA='stored_programs' ORDER BY OBJECT_NAME;
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME COUNT_STAR COUNT_STATEMENTS
+FUNCTION stored_programs append 1 1
+EVENT stored_programs e1 1 1
+FUNCTION stored_programs fac 1 19
+PROCEDURE stored_programs sampleproc1 1 2
+PROCEDURE stored_programs sampleproc2 1 5
+PROCEDURE stored_programs sampleproc3 1 10
+PROCEDURE stored_programs sampleproc4 1 11
+TRIGGER stored_programs trg1 3 3
+TRIGGER stored_programs trg2 1 1
+TRIGGER stored_programs trg3 1 1
+TRIGGER stored_programs trg4 1 1
+TRIGGER stored_programs trg5 1 1
+FUNCTION stored_programs wt_avg 1 3
+SELECT EVENT_NAME, SQL_TEXT, CURRENT_SCHEMA, OBJECT_TYPE, OBJECT_SCHEMA,
+OBJECT_NAME, NESTING_EVENT_TYPE, NESTING_EVENT_LEVEL FROM
+performance_schema.events_statements_history_long WHERE
+CURRENT_SCHEMA='stored_programs' AND
+(SQL_TEXT not like '%count(*) = %' OR SQL_TEXT IS NULL)
+ORDER BY OBJECT_NAME, NESTING_EVENT_LEVEL, SQL_TEXT;
+EVENT_NAME SQL_TEXT CURRENT_SCHEMA OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME NESTING_EVENT_TYPE NESTING_EVENT_LEVEL
+statement/scheduler/event NULL stored_programs NULL NULL NULL NULL 0
+statement/sql/call_procedure CALL SampleProc1(30,40,50) stored_programs NULL NULL NULL NULL 0
+statement/sql/call_procedure CALL SampleProc2("Jwalamukhi",34) stored_programs NULL NULL NULL NULL 0
+statement/sql/call_procedure CALL SampleProc3() stored_programs NULL NULL NULL NULL 0
+statement/sql/call_procedure CALL SampleProc4() stored_programs NULL NULL NULL NULL 0
+statement/sql/create_event CREATE EVENT e1 ON SCHEDULE EVERY 2 SECOND DO
+BEGIN
+INSERT INTO table_t VALUES(1);
+END stored_programs NULL NULL NULL NULL 0
+statement/sql/create_function CREATE FUNCTION append(s1 CHAR(8), s2 CHAR(8)) RETURNS CHAR(16)
+RETURN concat(s1, s2) stored_programs NULL NULL NULL NULL 0
+statement/sql/create_function CREATE FUNCTION fac(n INT UNSIGNED) RETURNS BIGINT UNSIGNED
+BEGIN
+DECLARE f BIGINT UNSIGNED DEFAULT 1;
+WHILE n > 1 DO
+SET f = f * n;
+SET n = n - 1;
+END WHILE;
+RETURN f;
+END stored_programs NULL NULL NULL NULL 0
+statement/sql/create_function CREATE FUNCTION wt_avg(n1 INT, n2 INT, n3 INT, n4 INT)
+RETURNS INT
+DETERMINISTIC
+BEGIN
+DECLARE avg INT;
+SET avg = (n1+n2+n3*2+n4*4)/8;
+RETURN avg;
+END stored_programs NULL NULL NULL NULL 0
+statement/sql/create_procedure CREATE PROCEDURE SampleProc1(x1 INT, x2 INT, y INT)
+BEGIN
+INSERT INTO t1 VALUES (x1, y);
+INSERT INTO t1 VALUES (x2, y);
+END stored_programs NULL NULL NULL NULL 0
+statement/sql/create_procedure CREATE PROCEDURE SampleProc2(x CHAR(16), y INT)
+BEGIN
+DECLARE z1, z2 INT;
+SET z1 = y;
+SET z2 = z1+2;
+INSERT INTO t2 VALUES (x, z2);
+END stored_programs NULL NULL NULL NULL 0
+statement/sql/create_procedure CREATE PROCEDURE SampleProc3()
+BEGIN
+DECLARE ld DATE;
+DECLARE li INT;
+DECLARE lf DOUBLE;
+DECLARE ls VARCHAR(32);
+SET ld = NULL, li = NULL, lf = NULL, ls = NULL;
+INSERT INTO t3 VALUES (ld, li, lf, ls);
+INSERT INTO t3 (n, f, s) VALUES ((ld IS NULL), 1, "ld is null"),
+((li IS NULL), 1, "li is null"),
+((li = 0), NULL, "li = 0"),
+((lf IS NULL), 1, "lf is null"),
+((lf = 0), NULL, "lf = 0"),
+((ls IS NULL), 1, "ls is null");
+END stored_programs NULL NULL NULL NULL 0
+statement/sql/create_procedure CREATE PROCEDURE SampleProc4()
+BEGIN
+DECLARE x INT;
+SET x = 1;
+WHILE x <= 2 DO
+INSERT INTO t4(word, mean) VALUES('a','a mean');
+SET x = x + 1;
+END WHILE;
+END stored_programs NULL NULL NULL NULL 0
+statement/sql/create_table CREATE TABLE t1(
+i INT NOT NULL,
+j INT
+) engine=innodb stored_programs NULL NULL NULL NULL 0
+statement/sql/create_table CREATE TABLE t2(
+name CHAR(16) NOT NULL DEFAULT '',
+id INT NOT NULL
+) engine=innodb stored_programs NULL NULL NULL NULL 0
+statement/sql/create_table CREATE TABLE t3(
+d DATE,
+n INT,
+f DOUBLE,
+s VARCHAR(32)
+) stored_programs NULL NULL NULL NULL 0
+statement/sql/create_table CREATE TABLE t4(
+`k` int(10) unsigned NOT NULL AUTO_INCREMENT,
+`word` varchar(100) NOT NULL,
+`mean` varchar(300) NOT NULL,
+PRIMARY KEY (`k`)
+) stored_programs NULL NULL NULL NULL 0
+statement/sql/create_table CREATE TABLE table_t(a INT) stored_programs NULL NULL NULL NULL 0
+statement/sql/create_trigger CREATE TRIGGER trg1 BEFORE INSERT ON t1 FOR EACH ROW
+BEGIN
+if isnull(new.j) then
+SET new.j:= new.i * 10;
+END if;
+END stored_programs NULL NULL NULL NULL 0
+statement/sql/create_trigger CREATE TRIGGER trg2 AFTER INSERT ON t2 FOR EACH ROW
+BEGIN
+UPDATE t1 SET i=new.id+i ;
+END stored_programs NULL NULL NULL NULL 0
+statement/sql/create_trigger CREATE TRIGGER trg3 AFTER UPDATE ON t2 FOR EACH ROW
+SET @change:= @change + new.id - old.id stored_programs NULL NULL NULL NULL 0
+statement/sql/create_trigger CREATE TRIGGER trg4 BEFORE DELETE ON t1 FOR EACH ROW
+SET @del:= @del + 1 stored_programs NULL NULL NULL NULL 0
+statement/sql/create_trigger CREATE TRIGGER trg5 AFTER DELETE ON t1 FOR EACH ROW
+SET @del:= @del + 8 + old.j stored_programs NULL NULL NULL NULL 0
+statement/sql/delete DELETE FROM t1 WHERE i=76 stored_programs NULL NULL NULL NULL 0
+statement/sql/insert INSERT INTO t1 VALUES (10,20) stored_programs NULL NULL NULL NULL 0
+statement/sql/select SELECT * FROM table_t stored_programs NULL NULL NULL NULL 0
+statement/sql/select SELECT 5 * 10 stored_programs NULL NULL NULL NULL 0
+statement/sql/select SELECT @a stored_programs NULL NULL NULL NULL 0
+statement/sql/select SELECT @a stored_programs NULL NULL NULL NULL 0
+statement/sql/select SELECT @change stored_programs NULL NULL NULL NULL 0
+statement/sql/select SELECT @change stored_programs NULL NULL NULL NULL 0
+statement/sql/select SELECT @del stored_programs NULL NULL NULL NULL 0
+statement/sql/select SELECT @del stored_programs NULL NULL NULL NULL 0
+statement/sql/select SELECT append("Bolly", "wood") stored_programs NULL NULL NULL NULL 0
+statement/sql/select SELECT fac(5) stored_programs NULL NULL NULL NULL 0
+statement/sql/select SELECT OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME, COUNT_STAR, COUNT_STATEMENTS
+FROM performance_schema.events_statements_summary_by_program
+WHERE OBJECT_SCHEMA='stored_programs' ORDER BY OBJECT_NAME stored_programs NULL NULL NULL NULL 0
+statement/sql/select SELECT wt_avg(1, 12, 1990, 1121990) stored_programs NULL NULL NULL NULL 0
+statement/sql/set_option SET @a=1 stored_programs NULL NULL NULL NULL 0
+statement/sql/set_option SET @change=1 stored_programs NULL NULL NULL NULL 0
+statement/sql/set_option SET @del=1 stored_programs NULL NULL NULL NULL 0
+statement/sql/set_option SET GLOBAL event_scheduler=OFF stored_programs NULL NULL NULL NULL 0
+statement/sql/set_option SET GLOBAL event_scheduler=ON stored_programs NULL NULL NULL NULL 0
+statement/sql/update UPDATE t2 SET id=22 WHERE name="Jwalamukhi" stored_programs NULL NULL NULL NULL 0
+statement/sp/freturn NULL stored_programs FUNCTION stored_programs append STATEMENT 1
+statement/sp/stmt INSERT INTO table_t VALUES(1) stored_programs EVENT stored_programs e1 STATEMENT 1
+statement/sp/set NULL stored_programs FUNCTION stored_programs fac STATEMENT 1
+statement/sp/jump_if_not NULL stored_programs FUNCTION stored_programs fac STATEMENT 1
+statement/sp/set NULL stored_programs FUNCTION stored_programs fac STATEMENT 1
+statement/sp/set NULL stored_programs FUNCTION stored_programs fac STATEMENT 1
+statement/sp/jump NULL stored_programs FUNCTION stored_programs fac STATEMENT 1
+statement/sp/jump_if_not NULL stored_programs FUNCTION stored_programs fac STATEMENT 1
+statement/sp/set NULL stored_programs FUNCTION stored_programs fac STATEMENT 1
+statement/sp/set NULL stored_programs FUNCTION stored_programs fac STATEMENT 1
+statement/sp/jump NULL stored_programs FUNCTION stored_programs fac STATEMENT 1
+statement/sp/jump_if_not NULL stored_programs FUNCTION stored_programs fac STATEMENT 1
+statement/sp/set NULL stored_programs FUNCTION stored_programs fac STATEMENT 1
+statement/sp/set NULL stored_programs FUNCTION stored_programs fac STATEMENT 1
+statement/sp/jump NULL stored_programs FUNCTION stored_programs fac STATEMENT 1
+statement/sp/jump_if_not NULL stored_programs FUNCTION stored_programs fac STATEMENT 1
+statement/sp/set NULL stored_programs FUNCTION stored_programs fac STATEMENT 1
+statement/sp/set NULL stored_programs FUNCTION stored_programs fac STATEMENT 1
+statement/sp/jump NULL stored_programs FUNCTION stored_programs fac STATEMENT 1
+statement/sp/jump_if_not NULL stored_programs FUNCTION stored_programs fac STATEMENT 1
+statement/sp/freturn NULL stored_programs FUNCTION stored_programs fac STATEMENT 1
+statement/sp/stmt INSERT INTO t1 VALUES (x1, y) stored_programs PROCEDURE stored_programs sampleproc1 STATEMENT 1
+statement/sp/stmt INSERT INTO t1 VALUES (x2, y) stored_programs PROCEDURE stored_programs sampleproc1 STATEMENT 1
+statement/sp/set NULL stored_programs PROCEDURE stored_programs sampleproc2 STATEMENT 1
+statement/sp/set NULL stored_programs PROCEDURE stored_programs sampleproc2 STATEMENT 1
+statement/sp/set NULL stored_programs PROCEDURE stored_programs sampleproc2 STATEMENT 1
+statement/sp/set NULL stored_programs PROCEDURE stored_programs sampleproc2 STATEMENT 1
+statement/sp/stmt INSERT INTO t2 VALUES (x, z2) stored_programs PROCEDURE stored_programs sampleproc2 STATEMENT 1
+statement/sp/set NULL stored_programs PROCEDURE stored_programs sampleproc3 STATEMENT 1
+statement/sp/set NULL stored_programs PROCEDURE stored_programs sampleproc3 STATEMENT 1
+statement/sp/set NULL stored_programs PROCEDURE stored_programs sampleproc3 STATEMENT 1
+statement/sp/set NULL stored_programs PROCEDURE stored_programs sampleproc3 STATEMENT 1
+statement/sp/set NULL stored_programs PROCEDURE stored_programs sampleproc3 STATEMENT 1
+statement/sp/set NULL stored_programs PROCEDURE stored_programs sampleproc3 STATEMENT 1
+statement/sp/set NULL stored_programs PROCEDURE stored_programs sampleproc3 STATEMENT 1
+statement/sp/set NULL stored_programs PROCEDURE stored_programs sampleproc3 STATEMENT 1
+statement/sp/stmt INSERT INTO t3 (n, f, s) VALUES ((ld IS NULL), 1, "ld is null"),
+((li IS NULL), 1, "li is null"),
+((li = 0), NULL, "li = 0"),
+((lf IS NULL), 1, "lf is null"),
+((lf = 0), NULL, "lf = 0"),
+((ls IS NULL), 1, "ls is null") stored_programs PROCEDURE stored_programs sampleproc3 STATEMENT 1
+statement/sp/stmt INSERT INTO t3 VALUES (ld, li, lf, ls) stored_programs PROCEDURE stored_programs sampleproc3 STATEMENT 1
+statement/sp/set NULL stored_programs PROCEDURE stored_programs sampleproc4 STATEMENT 1
+statement/sp/set NULL stored_programs PROCEDURE stored_programs sampleproc4 STATEMENT 1
+statement/sp/jump_if_not NULL stored_programs PROCEDURE stored_programs sampleproc4 STATEMENT 1
+statement/sp/set NULL stored_programs PROCEDURE stored_programs sampleproc4 STATEMENT 1
+statement/sp/jump NULL stored_programs PROCEDURE stored_programs sampleproc4 STATEMENT 1
+statement/sp/jump_if_not NULL stored_programs PROCEDURE stored_programs sampleproc4 STATEMENT 1
+statement/sp/set NULL stored_programs PROCEDURE stored_programs sampleproc4 STATEMENT 1
+statement/sp/jump NULL stored_programs PROCEDURE stored_programs sampleproc4 STATEMENT 1
+statement/sp/jump_if_not NULL stored_programs PROCEDURE stored_programs sampleproc4 STATEMENT 1
+statement/sp/stmt INSERT INTO t4(word, mean) VALUES('a','a mean') stored_programs PROCEDURE stored_programs sampleproc4 STATEMENT 1
+statement/sp/stmt INSERT INTO t4(word, mean) VALUES('a','a mean') stored_programs PROCEDURE stored_programs sampleproc4 STATEMENT 1
+statement/sp/jump_if_not NULL stored_programs TRIGGER stored_programs trg1 TRANSACTION 1
+statement/sp/jump_if_not NULL stored_programs TRIGGER stored_programs trg1 TRANSACTION 2
+statement/sp/jump_if_not NULL stored_programs TRIGGER stored_programs trg1 TRANSACTION 2
+statement/sp/stmt UPDATE t1 SET i=new.id+i stored_programs TRIGGER stored_programs trg2 TRANSACTION 2
+statement/sp/stmt SET @change:= @change + new.id - old.id stored_programs TRIGGER stored_programs trg3 TRANSACTION 1
+statement/sp/stmt SET @del:= @del + 1 stored_programs TRIGGER stored_programs trg4 TRANSACTION 1
+statement/sp/stmt SET @del:= @del + 8 + old.j stored_programs TRIGGER stored_programs trg5 TRANSACTION 1
+statement/sp/set NULL stored_programs FUNCTION stored_programs wt_avg STATEMENT 1
+statement/sp/set NULL stored_programs FUNCTION stored_programs wt_avg STATEMENT 1
+statement/sp/freturn NULL stored_programs FUNCTION stored_programs wt_avg STATEMENT 1
+# clean -up
+TRUNCATE TABLE performance_schema.events_statements_summary_by_program;
+TRUNCATE TABLE performance_schema.events_statements_history_long;
+SELECT OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME, COUNT_STAR, COUNT_STATEMENTS
+FROM performance_schema.events_statements_summary_by_program
+WHERE OBJECT_SCHEMA='stored_programs' ORDER BY OBJECT_NAME;
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME COUNT_STAR COUNT_STATEMENTS
+FUNCTION stored_programs append 0 0
+EVENT stored_programs e1 0 0
+FUNCTION stored_programs fac 0 0
+PROCEDURE stored_programs sampleproc1 0 0
+PROCEDURE stored_programs sampleproc2 0 0
+PROCEDURE stored_programs sampleproc3 0 0
+PROCEDURE stored_programs sampleproc4 0 0
+TRIGGER stored_programs trg1 0 0
+TRIGGER stored_programs trg2 0 0
+TRIGGER stored_programs trg3 0 0
+TRIGGER stored_programs trg4 0 0
+TRIGGER stored_programs trg5 0 0
+FUNCTION stored_programs wt_avg 0 0
+DROP PROCEDURE SampleProc1;
+DROP PROCEDURE SampleProc2;
+DROP PROCEDURE SampleProc3;
+DROP PROCEDURE SampleProc4;
+DROP FUNCTION wt_avg;
+DROP FUNCTION fac;
+DROP FUNCTION append;
+DROP TRIGGER trg1;
+DROP TRIGGER trg2;
+DROP TRIGGER trg3;
+DROP TRIGGER trg4;
+DROP TRIGGER trg5;
+DROP EVENT IF EXISTS e1;
+DROP TABLE t1;
+DROP TABLE t2;
+DROP TABLE t3;
+DROP TABLE t4;
+DROP TABLE table_t;
+DROP DATABASE stored_programs;
+SELECT OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME, COUNT_STAR, COUNT_STATEMENTS
+FROM performance_schema.events_statements_summary_by_program
+WHERE OBJECT_SCHEMA='stored_programs' ORDER BY OBJECT_NAME;
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME COUNT_STAR COUNT_STATEMENTS
+# SET-UP
+CREATE DATABASE stored_programs;
+USE stored_programs;
+CREATE TABLE t1(
+i INT NOT NULL,
+j INT
+) engine=innodb;
+CREATE TABLE t2(
+name CHAR(16) NOT NULL DEFAULT '',
+id INT NOT NULL
+) engine=innodb;
+CREATE TABLE t3(
+d DATE,
+n INT,
+f DOUBLE,
+s VARCHAR(32)
+);
+CREATE TABLE t4(
+`k` int(10) unsigned NOT NULL AUTO_INCREMENT,
+`word` varchar(100) NOT NULL,
+`mean` varchar(300) NOT NULL,
+PRIMARY KEY (`k`)
+);
+############################
+# Creating Stored Programs #
+############################
+# Stored Routine ( Procedure & Function )
+CREATE PROCEDURE SampleProc1(x1 INT, x2 INT, y INT)
+BEGIN
+INSERT INTO t1 VALUES (x1, y);
+INSERT INTO t1 VALUES (x2, y);
+END|
+CREATE PROCEDURE SampleProc2(x CHAR(16), y INT)
+BEGIN
+DECLARE z1, z2 INT;
+SET z1 = y;
+SET z2 = z1+2;
+INSERT INTO t2 VALUES (x, z2);
+END|
+CREATE PROCEDURE SampleProc3()
+BEGIN
+DECLARE ld DATE;
+DECLARE li INT;
+DECLARE lf DOUBLE;
+DECLARE ls VARCHAR(32);
+SET ld = NULL, li = NULL, lf = NULL, ls = NULL;
+INSERT INTO t3 VALUES (ld, li, lf, ls);
+INSERT INTO t3 (n, f, s) VALUES ((ld IS NULL), 1, "ld is null"),
+((li IS NULL), 1, "li is null"),
+((li = 0), NULL, "li = 0"),
+((lf IS NULL), 1, "lf is null"),
+((lf = 0), NULL, "lf = 0"),
+((ls IS NULL), 1, "ls is null");
+END|
+CREATE PROCEDURE SampleProc4()
+BEGIN
+DECLARE x INT;
+SET x = 1;
+WHILE x <= 2 DO
+INSERT INTO t4(word, mean) VALUES('a','a mean');
+SET x = x + 1;
+END WHILE;
+END|
+CREATE FUNCTION append(s1 CHAR(8), s2 CHAR(8)) RETURNS CHAR(16)
+RETURN concat(s1, s2)|
+CREATE FUNCTION wt_avg(n1 INT, n2 INT, n3 INT, n4 INT)
+RETURNS INT
+DETERMINISTIC
+BEGIN
+DECLARE avg INT;
+SET avg = (n1+n2+n3*2+n4*4)/8;
+RETURN avg;
+END|
+CREATE FUNCTION fac(n INT UNSIGNED) RETURNS BIGINT UNSIGNED
+BEGIN
+DECLARE f BIGINT UNSIGNED DEFAULT 1;
+WHILE n > 1 DO
+SET f = f * n;
+SET n = n - 1;
+END WHILE;
+RETURN f;
+END|
+# Triggers
+CREATE TRIGGER trg1 BEFORE INSERT ON t1 FOR EACH ROW
+BEGIN
+if isnull(new.j) then
+SET new.j:= new.i * 10;
+END if;
+END|
+CREATE TRIGGER trg2 AFTER INSERT ON t2 FOR EACH ROW
+BEGIN
+UPDATE t1 SET i=new.id+i ;
+END|
+CREATE TRIGGER trg3 AFTER UPDATE ON t2 FOR EACH ROW
+SET @change:= @change + new.id - old.id|
+CREATE TRIGGER trg4 BEFORE DELETE ON t1 FOR EACH ROW
+SET @del:= @del + 1|
+CREATE TRIGGER trg5 AFTER DELETE ON t1 FOR EACH ROW
+SET @del:= @del + 8 + old.j|
+update performance_schema.setup_instruments set enabled='YES', timed='NO'
+ where name like "statement/sp/%" order by name;
+TRUNCATE TABLE performance_schema.events_statements_summary_by_program;
+TRUNCATE TABLE performance_schema.events_statements_history_long;
+#####################
+# Executing queries #
+#####################
+INSERT INTO t1 VALUES (10,20);
+CALL SampleProc1(30,40,50);
+SET @a=1;
+SELECT @a;
+@a
+1
+CALL SampleProc2("Jwalamukhi",34);
+SELECT @a;
+@a
+1
+CALL SampleProc3();
+CALL SampleProc4();
+SET @change=1;
+SELECT @change;
+@change
+1
+UPDATE t2 SET id=22 WHERE name="Jwalamukhi";
+SELECT @change;
+@change
+-13
+SET @del=1;
+SELECT @del;
+@del
+1
+DELETE FROM t1 WHERE i=76;
+SELECT @del;
+@del
+60
+SELECT wt_avg(1, 12, 1990, 1121990);
+wt_avg(1, 12, 1990, 1121990)
+561494
+SELECT fac(5);
+fac(5)
+120
+SELECT append("Bolly", "wood");
+append("Bolly", "wood")
+Bollywood
+# Event
+SET GLOBAL event_scheduler=ON;
+CREATE TABLE table_t(a INT);
+CREATE EVENT e1 ON SCHEDULE EVERY 2 SECOND DO
+BEGIN
+INSERT INTO table_t VALUES(1);
+END|
+SELECT * FROM table_t;
+a
+1
+SET GLOBAL event_scheduler=OFF;
+SELECT EVENT_NAME, TIMER_START, TIMER_END, TIMER_WAIT FROM
+performance_schema.events_statements_history_long WHERE
+CURRENT_SCHEMA='stored_programs' AND EVENT_NAME like "statement/sp/%";
+EVENT_NAME TIMER_START TIMER_END TIMER_WAIT
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/stmt NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/stmt NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/stmt NULL NULL NULL
+statement/sp/stmt NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/stmt NULL NULL NULL
+statement/sp/stmt NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/stmt NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/stmt NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/stmt NULL NULL NULL
+statement/sp/stmt NULL NULL NULL
+statement/sp/stmt NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/freturn NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/set NULL NULL NULL
+statement/sp/jump NULL NULL NULL
+statement/sp/jump_if_not NULL NULL NULL
+statement/sp/freturn NULL NULL NULL
+statement/sp/freturn NULL NULL NULL
+statement/sp/stmt NULL NULL NULL
+update performance_schema.setup_instruments set enabled='YES', timed='YES'
+ where name like "statement/sp/%" order by name;
+TRUNCATE TABLE performance_schema.events_statements_summary_by_program;
+TRUNCATE TABLE performance_schema.events_statements_history_long;
+DROP PROCEDURE SampleProc1;
+DROP PROCEDURE SampleProc2;
+DROP PROCEDURE SampleProc3;
+DROP PROCEDURE SampleProc4;
+DROP FUNCTION wt_avg;
+DROP FUNCTION fac;
+DROP FUNCTION append;
+DROP TRIGGER trg1;
+DROP TRIGGER trg2;
+DROP TRIGGER trg3;
+DROP TRIGGER trg4;
+DROP TRIGGER trg5;
+DROP EVENT IF EXISTS e1;
+DROP TABLE t1;
+DROP TABLE t2;
+DROP TABLE t3;
+DROP TABLE t4;
+DROP TABLE table_t;
+DROP DATABASE stored_programs;
+# set-up
+CREATE DATABASE sp;
+USE sp;
+CREATE TABLE t1(
+a INT,
+b INT
+);
+# let the creation of the following stored programs fail
+CREATE PROCEDURE fail1(IN a INT OUT x CHAR(16))
+SET a=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 'OUT x CHAR(16))
+SET a=1' at line 1
+CREATE FUNCTION fail2(a INT , b INT) RETURNS INT
+x=SELECT COUNT(*) FROM t;
+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 '=SELECT COUNT(*) FROM t' at line 2
+CREATE EVENT fail3 SCHEDULE EVERY MICROSECOND DO
+DROP TABLE t;
+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 'SCHEDULE EVERY MICROSECOND DO
+DROP TABLE t' at line 1
+# the below query on PS table doesn't show any rows
+# as the creation of stored programs failed
+SELECT OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME, COUNT_STAR, COUNT_STATEMENTS
+FROM performance_schema.events_statements_summary_by_program
+WHERE OBJECT_SCHEMA='sp';
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME COUNT_STAR COUNT_STATEMENTS
+# create few stored programs
+CREATE PROCEDURE p(x1 INT, x2 INT)
+BEGIN
+INSERT INTO t1 VALUES (x1, x2);
+END|
+CREATE FUNCTION f(y1 INT, y2 INT) RETURNS INT
+RETURN y1+y2;
+CREATE TRIGGER trg AFTER INSERT ON t1 FOR EACH ROW
+SET @neg=-1;
+# execute the created stored programs such that they fail.
+CALL p(7);
+ERROR 42000: Incorrect number of arguments for PROCEDURE sp.p; expected 2, got 1
+SELECT f("add",1,3);
+ERROR 42000: Incorrect number of arguments for FUNCTION sp.f; expected 2, got 3
+INSERT INTO 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 '' at line 1
+# the below query on PS table doesn't expose any statistics as
+# execution of the created stored porgrams failed.
+SELECT OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME, COUNT_STAR, COUNT_STATEMENTS
+FROM performance_schema.events_statements_summary_by_program
+WHERE OBJECT_SCHEMA='sp';
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME COUNT_STAR COUNT_STATEMENTS
+PROCEDURE sp p 0 0
+FUNCTION sp f 0 0
+#clean-up
+DROP PROCEDURE p;
+DROP FUNCTION f;
+DROP TRIGGER trg;
+DROP TABLE t1;
+DROP DATABASE sp;
diff --git a/mysql-test/suite/perfschema/r/status_reprepare.result b/mysql-test/suite/perfschema/r/status_reprepare.result
new file mode 100644
index 00000000000..4ff713b9200
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/status_reprepare.result
@@ -0,0 +1,42 @@
+
+================================================================================
+SETUP
+================================================================================
+connect con1, localhost, root,,;
+CREATE TABLE test.t1 (c1 INT);
+PREPARE stmt1 FROM "SELECT c1 FROM test.t1";
+EXECUTE stmt1;
+c1
+SHOW SESSION STATUS LIKE "%com_stmt_%prepare%";
+Variable_name Value
+Com_stmt_prepare 1
+Com_stmt_reprepare 0
+SELECT * FROM performance_schema.session_status WHERE VARIABLE_NAME LIKE "%com_stmt%";
+VARIABLE_NAME VARIABLE_VALUE
+Com_stmt_reprepare 0
+SELECT VARIABLE_VALUE INTO @count_global_reprepare_before
+FROM performance_schema.global_status
+WHERE VARIABLE_NAME LIKE "Com_stmt_reprepare";
+ALTER TABLE test.t1 ADD COLUMN c2 INTEGER;
+EXECUTE stmt1;
+c1
+SHOW SESSION STATUS LIKE "%com_stmt_%prepare%";
+Variable_name Value
+Com_stmt_prepare 2
+Com_stmt_reprepare 1
+SELECT * FROM performance_schema.session_status WHERE VARIABLE_NAME LIKE "%com_stmt%";
+VARIABLE_NAME VARIABLE_VALUE
+Com_stmt_reprepare 1
+SELECT VARIABLE_VALUE INTO @count_global_reprepare_after
+FROM performance_schema.global_status
+WHERE VARIABLE_NAME LIKE "Com_stmt_reprepare";
+SELECT @count_global_reprepare_after - @count_global_reprepare_before;
+@count_global_reprepare_after - @count_global_reprepare_before
+1
+
+================================================================================
+CLEANUP
+================================================================================
+DROP TABLE test.t1;
+disconnect con1;
+connection default;
diff --git a/mysql-test/suite/perfschema/r/sxlock_func.result b/mysql-test/suite/perfschema/r/sxlock_func.result
new file mode 100644
index 00000000000..e7f4ba345c5
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/sxlock_func.result
@@ -0,0 +1,58 @@
+UPDATE performance_schema.setup_instruments SET enabled = 'NO', timed = 'YES';
+UPDATE performance_schema.setup_instruments SET enabled = 'YES'
+WHERE name like 'wait/synch/sxlock/%';
+TRUNCATE TABLE performance_schema.events_waits_history_long;
+TRUNCATE TABLE performance_schema.events_waits_history;
+TRUNCATE TABLE performance_schema.events_waits_current;
+select name from performance_schema.setup_instruments
+where name like "wait/synch/sxlock/%" order by name;
+name
+wait/synch/sxlock/innodb/btr_search_latch
+wait/synch/sxlock/innodb/dict_operation_lock
+wait/synch/sxlock/innodb/fil_space_latch
+wait/synch/sxlock/innodb/fts_cache_init_rw_lock
+wait/synch/sxlock/innodb/fts_cache_rw_lock
+wait/synch/sxlock/innodb/index_tree_rw_lock
+wait/synch/sxlock/innodb/trx_i_s_cache_lock
+wait/synch/sxlock/innodb/trx_purge_latch
+select name from performance_schema.rwlock_instances
+where name in
+(
+'wait/synch/sxlock/innodb/btr_search_latch',
+'wait/synch/sxlock/innodb/checkpoint_lock',
+'wait/synch/sxlock/innodb/dict_operation_lock',
+'wait/synch/sxlock/innodb/trx_i_s_cache_lock',
+'wait/synch/sxlock/innodb/trx_purge_latch'
+ )
+order by name;
+name
+wait/synch/sxlock/innodb/btr_search_latch
+wait/synch/sxlock/innodb/btr_search_latch
+wait/synch/sxlock/innodb/btr_search_latch
+wait/synch/sxlock/innodb/btr_search_latch
+wait/synch/sxlock/innodb/btr_search_latch
+wait/synch/sxlock/innodb/btr_search_latch
+wait/synch/sxlock/innodb/btr_search_latch
+wait/synch/sxlock/innodb/btr_search_latch
+wait/synch/sxlock/innodb/dict_operation_lock
+wait/synch/sxlock/innodb/trx_i_s_cache_lock
+wait/synch/sxlock/innodb/trx_purge_latch
+drop table if exists t1;
+create table t1(a int) engine=innodb;
+begin;
+insert into t1 values (1), (2), (3);
+insert into t1 values (1), (2), (3);
+insert into t1 values (1), (2), (3);
+commit;
+drop table t1;
+select operation from performance_schema.events_waits_history_long
+where event_name like "wait/synch/sxlock/%"
+ and operation = "shared_lock" limit 1;
+operation
+shared_lock
+select operation from performance_schema.events_waits_history_long
+where event_name like "wait/synch/sxlock/%"
+ and operation = "exclusive_lock" limit 1;
+operation
+exclusive_lock
+UPDATE performance_schema.setup_instruments SET enabled = 'YES', timed = 'YES';
diff --git a/mysql-test/suite/perfschema/r/table_aggregate_global_2u_2t.result b/mysql-test/suite/perfschema/r/table_aggregate_global_2u_2t.result
index dfaa91a3fbc..bc0367b83bf 100644
--- a/mysql-test/suite/perfschema/r/table_aggregate_global_2u_2t.result
+++ b/mysql-test/suite/perfschema/r/table_aggregate_global_2u_2t.result
@@ -6,9 +6,9 @@ delete from performance_schema.setup_objects
where object_name='t2';
select * from performance_schema.setup_actors
order by USER, HOST, ROLE;
-HOST USER ROLE
-localhost user1 %
-localhost user3 %
+HOST USER ROLE ENABLED HISTORY
+localhost user1 % YES YES
+localhost user3 % YES YES
select * from performance_schema.setup_objects
order by object_type, object_schema, object_name;
OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
@@ -22,6 +22,9 @@ events_stages_history_long YES
events_statements_current YES
events_statements_history YES
events_statements_history_long YES
+events_transactions_current YES
+events_transactions_history YES
+events_transactions_history_long YES
events_waits_current YES
events_waits_history YES
events_waits_history_long YES
@@ -65,28 +68,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -128,28 +123,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -180,15 +167,71 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=101;
update test.t2 set d=d+1 where a=101;
update test.t3 set d=d+1 where a=101;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 1
connection default;
-"================== Step 3 =================="
+"================== Step 3-A =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 23
+wait/lock/table/sql/handler 24
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t3 15 9 6 9 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 18
+TABLE test t2 0
+TABLE test t3 29
+connection con1;
+flush tables;
+"================== con1 FLUSH =================="
+connection default;
+"================== Step 3-B =================="
call dump_thread();
username event_name count_star
user1 wait/io/table/sql/handler 0
@@ -213,7 +256,7 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 25
+wait/io/table/sql/handler 23
wait/lock/table/sql/handler 24
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
@@ -223,29 +266,23 @@ TABLE test t1 NULL 6 4 2 4 1 1 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 2 1 1 1 0 1 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 14 8 6 8 3 3 0
-TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 1 1 0 1 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 8 5 3 5 1 2 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 17 11 6 11 3 3 0
+TABLE test t3 15 9 6 9 3 3 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 18
TABLE test t2 0
-TABLE test t3 31
+TABLE test t3 29
connect con2, localhost, user2, , ;
select concat(current_user(), " is connected") as status;
status
@@ -281,7 +318,7 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 25
+wait/io/table/sql/handler 23
wait/lock/table/sql/handler 24
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
@@ -291,29 +328,23 @@ TABLE test t1 NULL 6 4 2 4 1 1 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 2 1 1 1 0 1 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 14 8 6 8 3 3 0
-TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 1 1 0 1 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 8 5 3 5 1 2 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 17 11 6 11 3 3 0
+TABLE test t3 15 9 6 9 3 3 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 18
TABLE test t2 0
-TABLE test t3 31
+TABLE test t3 29
connection con2;
insert into test.t1 set a=201, b=1, c=1;
insert into test.t2 set a=202, b=2, c=2;
@@ -345,11 +376,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=201;
update test.t2 set d=d+1 where a=201;
update test.t3 set d=d+1 where a=201;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 2
205 5 5 1
@@ -384,39 +415,33 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 64
+wait/io/table/sql/handler 58
wait/lock/table/sql/handler 48
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 15 10 5 10 2 3 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 14 9 5 9 2 3 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 37 22 15 22 6 9 0
-TABLE test t3 index_b 5 5 0 5 0 0 0
+TABLE test t3 NULL 35 20 15 20 6 9 0
+TABLE test t3 index_b 3 3 0 3 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 20 13 7 13 2 5 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 44 29 15 29 6 9 0
+TABLE test t1 18 11 7 11 2 5 0
+TABLE test t3 40 25 15 25 6 9 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 6
+TABLE test t3 28 8 20 4 0 0 0 4 0 10
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 40
+TABLE test t1 38
TABLE test t2 0
-TABLE test t3 72
+TABLE test t3 68
connect con3, localhost, user3, , ;
select concat(current_user(), " is connected") as status;
status
@@ -457,39 +482,33 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 64
+wait/io/table/sql/handler 58
wait/lock/table/sql/handler 48
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 15 10 5 10 2 3 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 14 9 5 9 2 3 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 37 22 15 22 6 9 0
-TABLE test t3 index_b 5 5 0 5 0 0 0
+TABLE test t3 NULL 35 20 15 20 6 9 0
+TABLE test t3 index_b 3 3 0 3 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 20 13 7 13 2 5 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 44 29 15 29 6 9 0
+TABLE test t1 18 11 7 11 2 5 0
+TABLE test t3 40 25 15 25 6 9 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 6
+TABLE test t3 28 8 20 4 0 0 0 4 0 10
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 40
+TABLE test t1 38
TABLE test t2 0
-TABLE test t3 72
+TABLE test t3 68
connection con3;
insert into test.t1 set a=301, b=1, c=1;
insert into test.t2 set a=302, b=2, c=2;
@@ -527,11 +546,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=301;
update test.t2 set d=d+1 where a=301;
update test.t3 set d=d+1 where a=301;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 3
205 5 5 2
@@ -572,39 +591,33 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 116
+wait/io/table/sql/handler 106
wait/lock/table/sql/handler 72
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 27 18 9 18 3 6 0
-TABLE test t1 index_b 2 2 0 2 0 0 0
+TABLE test t1 NULL 25 16 9 16 3 6 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 6 3 3 3 0 3 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 69 42 27 42 9 18 0
-TABLE test t3 index_b 9 9 0 9 0 0 0
+TABLE test t3 NULL 66 39 27 39 9 18 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 3 3 0 3 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 35 23 12 23 3 9 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 81 54 27 54 9 18 0
+TABLE test t1 31 19 12 19 3 9 0
+TABLE test t3 75 48 27 48 9 18 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 30 12 18 6 0 0 0 6 0 0 9
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 42 12 30 6 0 0 0 6 0 0 15
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 30 12 18 6 0 0 0 6 0 9
+TABLE test t3 42 12 30 6 0 0 0 6 0 15
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 65
+TABLE test t1 61
TABLE test t2 0
-TABLE test t3 123
+TABLE test t3 117
connect con4, localhost, user4, , ;
select concat(current_user(), " is connected") as status;
status
@@ -650,39 +663,33 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 116
+wait/io/table/sql/handler 106
wait/lock/table/sql/handler 72
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 27 18 9 18 3 6 0
-TABLE test t1 index_b 2 2 0 2 0 0 0
+TABLE test t1 NULL 25 16 9 16 3 6 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 6 3 3 3 0 3 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 69 42 27 42 9 18 0
-TABLE test t3 index_b 9 9 0 9 0 0 0
+TABLE test t3 NULL 66 39 27 39 9 18 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 3 3 0 3 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 35 23 12 23 3 9 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 81 54 27 54 9 18 0
+TABLE test t1 31 19 12 19 3 9 0
+TABLE test t3 75 48 27 48 9 18 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 30 12 18 6 0 0 0 6 0 0 9
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 42 12 30 6 0 0 0 6 0 0 15
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 30 12 18 6 0 0 0 6 0 9
+TABLE test t3 42 12 30 6 0 0 0 6 0 15
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 65
+TABLE test t1 61
TABLE test t2 0
-TABLE test t3 123
+TABLE test t3 117
connection con4;
insert into test.t1 set a=401, b=1, c=1;
insert into test.t2 set a=402, b=2, c=2;
@@ -726,11 +733,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=401;
update test.t2 set d=d+1 where a=401;
update test.t3 set d=d+1 where a=401;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 4
205 5 5 3
@@ -777,39 +784,33 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 96
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 40 16 24 8 0 0 0 8 0 0 12
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 56 16 40 8 0 0 0 8 0 0 20
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 40 16 24 8 0 0 0 8 0 12
+TABLE test t3 56 16 40 8 0 0 0 8 0 20
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 93
+TABLE test t1 87
TABLE test t2 0
-TABLE test t3 184
+TABLE test t3 176
connection con1;
lock tables test.t1 read, test.t2 read, test.t3 read;
unlock tables;
@@ -856,39 +857,33 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 104
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
+TABLE test t1 91
TABLE test t2 0
-TABLE test t3 188
+TABLE test t3 180
connection default;
flush tables;
"================== flush marker =================="
@@ -932,39 +927,33 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 104
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
+TABLE test t1 91
TABLE test t2 0
-TABLE test t3 188
+TABLE test t3 180
set global read_only=1;
set global read_only=0;
"================== global read_only marker =================="
@@ -1008,39 +997,33 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 104
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
+TABLE test t1 91
TABLE test t2 0
-TABLE test t3 188
+TABLE test t3 180
disconnect con1;
"================== Step 13 =================="
call dump_thread();
@@ -1081,39 +1064,33 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 104
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
+TABLE test t1 91
TABLE test t2 0
-TABLE test t3 188
+TABLE test t3 180
disconnect con2;
"================== Step 14 =================="
call dump_thread();
@@ -1153,39 +1130,33 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 104
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
+TABLE test t1 91
TABLE test t2 0
-TABLE test t3 188
+TABLE test t3 180
disconnect con3;
"================== Step 15 =================="
call dump_thread();
@@ -1224,39 +1195,33 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 104
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
+TABLE test t1 91
TABLE test t2 0
-TABLE test t3 188
+TABLE test t3 180
disconnect con4;
"================== Step 16 =================="
call dump_thread();
@@ -1294,39 +1259,33 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 104
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
+TABLE test t1 91
TABLE test t2 0
-TABLE test t3 188
+TABLE test t3 180
connection default;
truncate performance_schema.events_waits_summary_by_thread_by_event_name;
"================== BY_THREAD truncated =================="
@@ -1366,39 +1325,33 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 104
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
+TABLE test t1 91
TABLE test t2 0
-TABLE test t3 188
+TABLE test t3 180
truncate performance_schema.events_waits_summary_by_account_by_event_name;
"================== BY_ACCOUNT truncated =================="
"================== Step 18 =================="
@@ -1437,39 +1390,33 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 104
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
+TABLE test t1 91
TABLE test t2 0
-TABLE test t3 188
+TABLE test t3 180
truncate performance_schema.events_waits_summary_by_user_by_event_name;
"================== BY_USER truncated =================="
"================== Step 19 =================="
@@ -1508,39 +1455,33 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 104
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
+TABLE test t1 91
TABLE test t2 0
-TABLE test t3 188
+TABLE test t3 180
truncate performance_schema.events_waits_summary_by_host_by_event_name;
"================== BY_HOST truncated =================="
"================== Step 21 =================="
@@ -1579,39 +1520,33 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 104
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
+TABLE test t1 91
TABLE test t2 0
-TABLE test t3 188
+TABLE test t3 180
truncate performance_schema.events_waits_summary_global_by_event_name;
"================== GLOBAL truncated =================="
"================== Step 21 =================="
@@ -1660,10 +1595,6 @@ TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
@@ -1671,19 +1602,17 @@ TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-show status like "performance_schema%";
+show global status like "performance_schema%";
Variable_name Value
Performance_schema_accounts_lost 0
Performance_schema_cond_classes_lost 0
@@ -1693,9 +1622,15 @@ Performance_schema_file_classes_lost 0
Performance_schema_file_handles_lost 0
Performance_schema_file_instances_lost 0
Performance_schema_hosts_lost 0
+Performance_schema_index_stat_lost 0
Performance_schema_locker_lost 0
+Performance_schema_memory_classes_lost 0
+Performance_schema_metadata_lock_lost 0
Performance_schema_mutex_classes_lost 0
Performance_schema_mutex_instances_lost 0
+Performance_schema_nested_statement_lost 0
+Performance_schema_prepared_statements_lost 0
+Performance_schema_program_lost 0
Performance_schema_rwlock_classes_lost 0
Performance_schema_rwlock_instances_lost 0
Performance_schema_session_connect_attrs_lost 0
@@ -1705,6 +1640,7 @@ Performance_schema_stage_classes_lost 0
Performance_schema_statement_classes_lost 0
Performance_schema_table_handles_lost 0
Performance_schema_table_instances_lost 0
+Performance_schema_table_lock_stat_lost 0
Performance_schema_thread_classes_lost 0
Performance_schema_thread_instances_lost 0
Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/table_aggregate_global_2u_3t.result b/mysql-test/suite/perfschema/r/table_aggregate_global_2u_3t.result
index 2a6537fd6bd..1be707c48ed 100644
--- a/mysql-test/suite/perfschema/r/table_aggregate_global_2u_3t.result
+++ b/mysql-test/suite/perfschema/r/table_aggregate_global_2u_3t.result
@@ -4,9 +4,9 @@ delete from performance_schema.setup_actors
where user in ('user2', 'user4');
select * from performance_schema.setup_actors
order by USER, HOST, ROLE;
-HOST USER ROLE
-localhost user1 %
-localhost user3 %
+HOST USER ROLE ENABLED HISTORY
+localhost user1 % YES YES
+localhost user3 % YES YES
select * from performance_schema.setup_objects
order by object_type, object_schema, object_name;
OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
@@ -21,6 +21,9 @@ events_stages_history_long YES
events_statements_current YES
events_statements_history YES
events_statements_history_long YES
+events_transactions_current YES
+events_transactions_history YES
+events_transactions_history_long YES
events_waits_current YES
events_waits_history YES
events_waits_history_long YES
@@ -64,15 +67,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -82,10 +82,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -127,15 +127,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -145,10 +142,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -179,15 +176,77 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=101;
update test.t2 set d=d+1 where a=101;
update test.t3 set d=d+1 where a=101;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 1
connection default;
-"================== Step 3 =================="
+"================== Step 3-A =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 33
+wait/lock/table/sql/handler 36
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t2 NULL 9 5 4 5 2 2 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 1 1 0 1 0 0 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t2 10 6 4 6 2 2 0
+TABLE test t3 15 9 6 9 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t2 12 4 8 2 0 0 0 2 0 4
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 18
+TABLE test t2 22
+TABLE test t3 29
+connection con1;
+flush tables;
+"================== con1 FLUSH =================="
+connection default;
+"================== Step 3-B =================="
call dump_thread();
username event_name count_star
user1 wait/io/table/sql/handler 0
@@ -212,7 +271,7 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 37
+wait/io/table/sql/handler 33
wait/lock/table/sql/handler 36
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
@@ -222,29 +281,29 @@ TABLE test t1 NULL 6 4 2 4 1 1 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 2 1 1 1 0 1 0
-TABLE test t2 NULL 10 6 4 6 2 2 0
-TABLE test t2 index_b 1 1 0 1 0 0 0
+TABLE test t2 NULL 9 5 4 5 2 2 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 1 1 0 1 0 0 0
-TABLE test t3 NULL 14 8 6 8 3 3 0
-TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 1 1 0 1 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 8 5 3 5 1 2 0
-TABLE test t2 12 8 4 8 2 2 0
-TABLE test t3 17 11 6 11 3 3 0
+TABLE test t2 10 6 4 6 2 2 0
+TABLE test t3 15 9 6 9 3 3 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
-TABLE test t2 12 4 8 2 0 0 0 2 0 0 4
-TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t2 12 4 8 2 0 0 0 2 0 4
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 18
-TABLE test t2 24
-TABLE test t3 31
+TABLE test t2 22
+TABLE test t3 29
connect con2, localhost, user2, , ;
select concat(current_user(), " is connected") as status;
status
@@ -280,7 +339,7 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 37
+wait/io/table/sql/handler 33
wait/lock/table/sql/handler 36
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
@@ -290,29 +349,29 @@ TABLE test t1 NULL 6 4 2 4 1 1 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 2 1 1 1 0 1 0
-TABLE test t2 NULL 10 6 4 6 2 2 0
-TABLE test t2 index_b 1 1 0 1 0 0 0
+TABLE test t2 NULL 9 5 4 5 2 2 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 1 1 0 1 0 0 0
-TABLE test t3 NULL 14 8 6 8 3 3 0
-TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 1 1 0 1 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 8 5 3 5 1 2 0
-TABLE test t2 12 8 4 8 2 2 0
-TABLE test t3 17 11 6 11 3 3 0
+TABLE test t2 10 6 4 6 2 2 0
+TABLE test t3 15 9 6 9 3 3 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
-TABLE test t2 12 4 8 2 0 0 0 2 0 0 4
-TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t2 12 4 8 2 0 0 0 2 0 4
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 18
-TABLE test t2 24
-TABLE test t3 31
+TABLE test t2 22
+TABLE test t3 29
connection con2;
insert into test.t1 set a=201, b=1, c=1;
insert into test.t2 set a=202, b=2, c=2;
@@ -344,11 +403,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=201;
update test.t2 set d=d+1 where a=201;
update test.t3 set d=d+1 where a=201;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 2
205 5 5 1
@@ -383,39 +442,39 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 94
+wait/io/table/sql/handler 84
wait/lock/table/sql/handler 72
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 15 10 5 10 2 3 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 14 9 5 9 2 3 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 26 16 10 16 4 6 0
-TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 NULL 24 14 10 14 4 6 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 2 2 0 2 0 0 0
-TABLE test t3 NULL 37 22 15 22 6 9 0
-TABLE test t3 index_b 5 5 0 5 0 0 0
+TABLE test t3 NULL 35 20 15 20 6 9 0
+TABLE test t3 index_b 3 3 0 3 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 20 13 7 13 2 5 0
-TABLE test t2 30 20 10 20 4 6 0
-TABLE test t3 44 29 15 29 6 9 0
+TABLE test t1 18 11 7 11 2 5 0
+TABLE test t2 26 16 10 16 4 6 0
+TABLE test t3 40 25 15 25 6 9 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
-TABLE test t2 24 8 16 4 0 0 0 4 0 0 8
-TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 6
+TABLE test t2 24 8 16 4 0 0 0 4 0 8
+TABLE test t3 28 8 20 4 0 0 0 4 0 10
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 40
-TABLE test t2 54
-TABLE test t3 72
+TABLE test t1 38
+TABLE test t2 50
+TABLE test t3 68
connect con3, localhost, user3, , ;
select concat(current_user(), " is connected") as status;
status
@@ -456,39 +515,39 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 94
+wait/io/table/sql/handler 84
wait/lock/table/sql/handler 72
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 15 10 5 10 2 3 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 14 9 5 9 2 3 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 26 16 10 16 4 6 0
-TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 NULL 24 14 10 14 4 6 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 2 2 0 2 0 0 0
-TABLE test t3 NULL 37 22 15 22 6 9 0
-TABLE test t3 index_b 5 5 0 5 0 0 0
+TABLE test t3 NULL 35 20 15 20 6 9 0
+TABLE test t3 index_b 3 3 0 3 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 20 13 7 13 2 5 0
-TABLE test t2 30 20 10 20 4 6 0
-TABLE test t3 44 29 15 29 6 9 0
+TABLE test t1 18 11 7 11 2 5 0
+TABLE test t2 26 16 10 16 4 6 0
+TABLE test t3 40 25 15 25 6 9 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
-TABLE test t2 24 8 16 4 0 0 0 4 0 0 8
-TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 6
+TABLE test t2 24 8 16 4 0 0 0 4 0 8
+TABLE test t3 28 8 20 4 0 0 0 4 0 10
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 40
-TABLE test t2 54
-TABLE test t3 72
+TABLE test t1 38
+TABLE test t2 50
+TABLE test t3 68
connection con3;
insert into test.t1 set a=301, b=1, c=1;
insert into test.t2 set a=302, b=2, c=2;
@@ -526,11 +585,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=301;
update test.t2 set d=d+1 where a=301;
update test.t3 set d=d+1 where a=301;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 3
205 5 5 2
@@ -571,39 +630,39 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 170
+wait/io/table/sql/handler 154
wait/lock/table/sql/handler 108
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 27 18 9 18 3 6 0
-TABLE test t1 index_b 2 2 0 2 0 0 0
+TABLE test t1 NULL 25 16 9 16 3 6 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 6 3 3 3 0 3 0
-TABLE test t2 NULL 48 30 18 30 6 12 0
-TABLE test t2 index_b 3 3 0 3 0 0 0
+TABLE test t2 NULL 45 27 18 27 6 12 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 3 3 0 3 0 0 0
-TABLE test t3 NULL 69 42 27 42 9 18 0
-TABLE test t3 index_b 9 9 0 9 0 0 0
+TABLE test t3 NULL 66 39 27 39 9 18 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 3 3 0 3 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 35 23 12 23 3 9 0
-TABLE test t2 54 36 18 36 6 12 0
-TABLE test t3 81 54 27 54 9 18 0
+TABLE test t1 31 19 12 19 3 9 0
+TABLE test t2 48 30 18 30 6 12 0
+TABLE test t3 75 48 27 48 9 18 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 30 12 18 6 0 0 0 6 0 0 9
-TABLE test t2 36 12 24 6 0 0 0 6 0 0 12
-TABLE test t3 42 12 30 6 0 0 0 6 0 0 15
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 30 12 18 6 0 0 0 6 0 9
+TABLE test t2 36 12 24 6 0 0 0 6 0 12
+TABLE test t3 42 12 30 6 0 0 0 6 0 15
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 65
-TABLE test t2 90
-TABLE test t3 123
+TABLE test t1 61
+TABLE test t2 84
+TABLE test t3 117
connect con4, localhost, user4, , ;
select concat(current_user(), " is connected") as status;
status
@@ -649,39 +708,39 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 170
+wait/io/table/sql/handler 154
wait/lock/table/sql/handler 108
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 27 18 9 18 3 6 0
-TABLE test t1 index_b 2 2 0 2 0 0 0
+TABLE test t1 NULL 25 16 9 16 3 6 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 6 3 3 3 0 3 0
-TABLE test t2 NULL 48 30 18 30 6 12 0
-TABLE test t2 index_b 3 3 0 3 0 0 0
+TABLE test t2 NULL 45 27 18 27 6 12 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 3 3 0 3 0 0 0
-TABLE test t3 NULL 69 42 27 42 9 18 0
-TABLE test t3 index_b 9 9 0 9 0 0 0
+TABLE test t3 NULL 66 39 27 39 9 18 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 3 3 0 3 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 35 23 12 23 3 9 0
-TABLE test t2 54 36 18 36 6 12 0
-TABLE test t3 81 54 27 54 9 18 0
+TABLE test t1 31 19 12 19 3 9 0
+TABLE test t2 48 30 18 30 6 12 0
+TABLE test t3 75 48 27 48 9 18 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 30 12 18 6 0 0 0 6 0 0 9
-TABLE test t2 36 12 24 6 0 0 0 6 0 0 12
-TABLE test t3 42 12 30 6 0 0 0 6 0 0 15
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 30 12 18 6 0 0 0 6 0 9
+TABLE test t2 36 12 24 6 0 0 0 6 0 12
+TABLE test t3 42 12 30 6 0 0 0 6 0 15
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 65
-TABLE test t2 90
-TABLE test t3 123
+TABLE test t1 61
+TABLE test t2 84
+TABLE test t3 117
connection con4;
insert into test.t1 set a=401, b=1, c=1;
insert into test.t2 set a=402, b=2, c=2;
@@ -725,11 +784,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=401;
update test.t2 set d=d+1 where a=401;
update test.t3 set d=d+1 where a=401;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 4
205 5 5 3
@@ -776,39 +835,39 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 144
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 40 16 24 8 0 0 0 8 0 0 12
-TABLE test t2 48 16 32 8 0 0 0 8 0 0 16
-TABLE test t3 56 16 40 8 0 0 0 8 0 0 20
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 40 16 24 8 0 0 0 8 0 12
+TABLE test t2 48 16 32 8 0 0 0 8 0 16
+TABLE test t3 56 16 40 8 0 0 0 8 0 20
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 93
-TABLE test t2 132
-TABLE test t3 184
+TABLE test t1 87
+TABLE test t2 124
+TABLE test t3 176
connection con1;
lock tables test.t1 read, test.t2 read, test.t3 read;
unlock tables;
@@ -855,39 +914,39 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 156
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
-TABLE test t2 136
-TABLE test t3 188
+TABLE test t1 91
+TABLE test t2 128
+TABLE test t3 180
connection default;
flush tables;
"================== flush marker =================="
@@ -931,39 +990,39 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 156
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
-TABLE test t2 136
-TABLE test t3 188
+TABLE test t1 91
+TABLE test t2 128
+TABLE test t3 180
set global read_only=1;
set global read_only=0;
"================== global read_only marker =================="
@@ -1007,39 +1066,39 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 156
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
-TABLE test t2 136
-TABLE test t3 188
+TABLE test t1 91
+TABLE test t2 128
+TABLE test t3 180
disconnect con1;
"================== Step 13 =================="
call dump_thread();
@@ -1080,39 +1139,39 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 156
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
-TABLE test t2 136
-TABLE test t3 188
+TABLE test t1 91
+TABLE test t2 128
+TABLE test t3 180
disconnect con2;
"================== Step 14 =================="
call dump_thread();
@@ -1152,39 +1211,39 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 156
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
-TABLE test t2 136
-TABLE test t3 188
+TABLE test t1 91
+TABLE test t2 128
+TABLE test t3 180
disconnect con3;
"================== Step 15 =================="
call dump_thread();
@@ -1223,39 +1282,39 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 156
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
-TABLE test t2 136
-TABLE test t3 188
+TABLE test t1 91
+TABLE test t2 128
+TABLE test t3 180
disconnect con4;
"================== Step 16 =================="
call dump_thread();
@@ -1293,39 +1352,39 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 156
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
-TABLE test t2 136
-TABLE test t3 188
+TABLE test t1 91
+TABLE test t2 128
+TABLE test t3 180
connection default;
truncate performance_schema.events_waits_summary_by_thread_by_event_name;
"================== BY_THREAD truncated =================="
@@ -1365,39 +1424,39 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 156
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
-TABLE test t2 136
-TABLE test t3 188
+TABLE test t1 91
+TABLE test t2 128
+TABLE test t3 180
truncate performance_schema.events_waits_summary_by_account_by_event_name;
"================== BY_ACCOUNT truncated =================="
"================== Step 18 =================="
@@ -1436,39 +1495,39 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 156
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
-TABLE test t2 136
-TABLE test t3 188
+TABLE test t1 91
+TABLE test t2 128
+TABLE test t3 180
truncate performance_schema.events_waits_summary_by_user_by_event_name;
"================== BY_USER truncated =================="
"================== Step 19 =================="
@@ -1507,39 +1566,39 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 156
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
-TABLE test t2 136
-TABLE test t3 188
+TABLE test t1 91
+TABLE test t2 128
+TABLE test t3 180
truncate performance_schema.events_waits_summary_by_host_by_event_name;
"================== BY_HOST truncated =================="
"================== Step 21 =================="
@@ -1578,39 +1637,39 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 156
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
-TABLE test t2 136
-TABLE test t3 188
+TABLE test t1 91
+TABLE test t2 128
+TABLE test t3 180
truncate performance_schema.events_waits_summary_global_by_event_name;
"================== GLOBAL truncated =================="
"================== Step 21 =================="
@@ -1673,16 +1732,16 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-show status like "performance_schema%";
+show global status like "performance_schema%";
Variable_name Value
Performance_schema_accounts_lost 0
Performance_schema_cond_classes_lost 0
@@ -1692,9 +1751,15 @@ Performance_schema_file_classes_lost 0
Performance_schema_file_handles_lost 0
Performance_schema_file_instances_lost 0
Performance_schema_hosts_lost 0
+Performance_schema_index_stat_lost 0
Performance_schema_locker_lost 0
+Performance_schema_memory_classes_lost 0
+Performance_schema_metadata_lock_lost 0
Performance_schema_mutex_classes_lost 0
Performance_schema_mutex_instances_lost 0
+Performance_schema_nested_statement_lost 0
+Performance_schema_prepared_statements_lost 0
+Performance_schema_program_lost 0
Performance_schema_rwlock_classes_lost 0
Performance_schema_rwlock_instances_lost 0
Performance_schema_session_connect_attrs_lost 0
@@ -1704,6 +1769,7 @@ Performance_schema_stage_classes_lost 0
Performance_schema_statement_classes_lost 0
Performance_schema_table_handles_lost 0
Performance_schema_table_instances_lost 0
+Performance_schema_table_lock_stat_lost 0
Performance_schema_thread_classes_lost 0
Performance_schema_thread_instances_lost 0
Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/table_aggregate_global_4u_2t.result b/mysql-test/suite/perfschema/r/table_aggregate_global_4u_2t.result
index 3eddd735aa2..0ed76c7ef06 100644
--- a/mysql-test/suite/perfschema/r/table_aggregate_global_4u_2t.result
+++ b/mysql-test/suite/perfschema/r/table_aggregate_global_4u_2t.result
@@ -4,11 +4,11 @@ delete from performance_schema.setup_objects
where object_name='t2';
select * from performance_schema.setup_actors
order by USER, HOST, ROLE;
-HOST USER ROLE
-localhost user1 %
-localhost user2 %
-localhost user3 %
-localhost user4 %
+HOST USER ROLE ENABLED HISTORY
+localhost user1 % YES YES
+localhost user2 % YES YES
+localhost user3 % YES YES
+localhost user4 % YES YES
select * from performance_schema.setup_objects
order by object_type, object_schema, object_name;
OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
@@ -22,6 +22,9 @@ events_stages_history_long YES
events_statements_current YES
events_statements_history YES
events_statements_history_long YES
+events_transactions_current YES
+events_transactions_history YES
+events_transactions_history_long YES
events_waits_current YES
events_waits_history YES
events_waits_history_long YES
@@ -65,28 +68,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -128,28 +123,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -180,15 +167,71 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=101;
update test.t2 set d=d+1 where a=101;
update test.t3 set d=d+1 where a=101;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 1
connection default;
-"================== Step 3 =================="
+"================== Step 3-A =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 23
+wait/lock/table/sql/handler 24
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t3 15 9 6 9 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 18
+TABLE test t2 0
+TABLE test t3 29
+connection con1;
+flush tables;
+"================== con1 FLUSH =================="
+connection default;
+"================== Step 3-B =================="
call dump_thread();
username event_name count_star
user1 wait/io/table/sql/handler 0
@@ -213,7 +256,7 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 25
+wait/io/table/sql/handler 23
wait/lock/table/sql/handler 24
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
@@ -223,29 +266,23 @@ TABLE test t1 NULL 6 4 2 4 1 1 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 2 1 1 1 0 1 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 14 8 6 8 3 3 0
-TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 1 1 0 1 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 8 5 3 5 1 2 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 17 11 6 11 3 3 0
+TABLE test t3 15 9 6 9 3 3 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 18
TABLE test t2 0
-TABLE test t3 31
+TABLE test t3 29
connect con2, localhost, user2, , ;
select concat(current_user(), " is connected") as status;
status
@@ -281,7 +318,7 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 25
+wait/io/table/sql/handler 23
wait/lock/table/sql/handler 24
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
@@ -291,29 +328,23 @@ TABLE test t1 NULL 6 4 2 4 1 1 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 2 1 1 1 0 1 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 14 8 6 8 3 3 0
-TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 1 1 0 1 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 8 5 3 5 1 2 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 17 11 6 11 3 3 0
+TABLE test t3 15 9 6 9 3 3 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 18
TABLE test t2 0
-TABLE test t3 31
+TABLE test t3 29
connection con2;
insert into test.t1 set a=201, b=1, c=1;
insert into test.t2 set a=202, b=2, c=2;
@@ -345,11 +376,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=201;
update test.t2 set d=d+1 where a=201;
update test.t3 set d=d+1 where a=201;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 2
205 5 5 1
@@ -384,39 +415,33 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 64
+wait/io/table/sql/handler 58
wait/lock/table/sql/handler 48
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 15 10 5 10 2 3 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 14 9 5 9 2 3 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 37 22 15 22 6 9 0
-TABLE test t3 index_b 5 5 0 5 0 0 0
+TABLE test t3 NULL 35 20 15 20 6 9 0
+TABLE test t3 index_b 3 3 0 3 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 20 13 7 13 2 5 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 44 29 15 29 6 9 0
+TABLE test t1 18 11 7 11 2 5 0
+TABLE test t3 40 25 15 25 6 9 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 6
+TABLE test t3 28 8 20 4 0 0 0 4 0 10
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 40
+TABLE test t1 38
TABLE test t2 0
-TABLE test t3 72
+TABLE test t3 68
connect con3, localhost, user3, , ;
select concat(current_user(), " is connected") as status;
status
@@ -457,39 +482,33 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 64
+wait/io/table/sql/handler 58
wait/lock/table/sql/handler 48
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 15 10 5 10 2 3 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 14 9 5 9 2 3 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 37 22 15 22 6 9 0
-TABLE test t3 index_b 5 5 0 5 0 0 0
+TABLE test t3 NULL 35 20 15 20 6 9 0
+TABLE test t3 index_b 3 3 0 3 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 20 13 7 13 2 5 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 44 29 15 29 6 9 0
+TABLE test t1 18 11 7 11 2 5 0
+TABLE test t3 40 25 15 25 6 9 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 6
+TABLE test t3 28 8 20 4 0 0 0 4 0 10
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 40
+TABLE test t1 38
TABLE test t2 0
-TABLE test t3 72
+TABLE test t3 68
connection con3;
insert into test.t1 set a=301, b=1, c=1;
insert into test.t2 set a=302, b=2, c=2;
@@ -527,11 +546,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=301;
update test.t2 set d=d+1 where a=301;
update test.t3 set d=d+1 where a=301;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 3
205 5 5 2
@@ -572,39 +591,33 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 116
+wait/io/table/sql/handler 106
wait/lock/table/sql/handler 72
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 27 18 9 18 3 6 0
-TABLE test t1 index_b 2 2 0 2 0 0 0
+TABLE test t1 NULL 25 16 9 16 3 6 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 6 3 3 3 0 3 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 69 42 27 42 9 18 0
-TABLE test t3 index_b 9 9 0 9 0 0 0
+TABLE test t3 NULL 66 39 27 39 9 18 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 3 3 0 3 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 35 23 12 23 3 9 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 81 54 27 54 9 18 0
+TABLE test t1 31 19 12 19 3 9 0
+TABLE test t3 75 48 27 48 9 18 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 30 12 18 6 0 0 0 6 0 0 9
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 42 12 30 6 0 0 0 6 0 0 15
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 30 12 18 6 0 0 0 6 0 9
+TABLE test t3 42 12 30 6 0 0 0 6 0 15
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 65
+TABLE test t1 61
TABLE test t2 0
-TABLE test t3 123
+TABLE test t3 117
connect con4, localhost, user4, , ;
select concat(current_user(), " is connected") as status;
status
@@ -650,39 +663,33 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 116
+wait/io/table/sql/handler 106
wait/lock/table/sql/handler 72
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 27 18 9 18 3 6 0
-TABLE test t1 index_b 2 2 0 2 0 0 0
+TABLE test t1 NULL 25 16 9 16 3 6 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 6 3 3 3 0 3 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 69 42 27 42 9 18 0
-TABLE test t3 index_b 9 9 0 9 0 0 0
+TABLE test t3 NULL 66 39 27 39 9 18 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 3 3 0 3 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 35 23 12 23 3 9 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 81 54 27 54 9 18 0
+TABLE test t1 31 19 12 19 3 9 0
+TABLE test t3 75 48 27 48 9 18 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 30 12 18 6 0 0 0 6 0 0 9
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 42 12 30 6 0 0 0 6 0 0 15
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 30 12 18 6 0 0 0 6 0 9
+TABLE test t3 42 12 30 6 0 0 0 6 0 15
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 65
+TABLE test t1 61
TABLE test t2 0
-TABLE test t3 123
+TABLE test t3 117
connection con4;
insert into test.t1 set a=401, b=1, c=1;
insert into test.t2 set a=402, b=2, c=2;
@@ -726,11 +733,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=401;
update test.t2 set d=d+1 where a=401;
update test.t3 set d=d+1 where a=401;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 4
205 5 5 3
@@ -777,39 +784,33 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 96
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 40 16 24 8 0 0 0 8 0 0 12
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 56 16 40 8 0 0 0 8 0 0 20
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 40 16 24 8 0 0 0 8 0 12
+TABLE test t3 56 16 40 8 0 0 0 8 0 20
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 93
+TABLE test t1 87
TABLE test t2 0
-TABLE test t3 184
+TABLE test t3 176
connection con1;
lock tables test.t1 read, test.t2 read, test.t3 read;
unlock tables;
@@ -856,39 +857,33 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 104
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
+TABLE test t1 91
TABLE test t2 0
-TABLE test t3 188
+TABLE test t3 180
connection default;
flush tables;
"================== flush marker =================="
@@ -932,39 +927,33 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 104
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
+TABLE test t1 91
TABLE test t2 0
-TABLE test t3 188
+TABLE test t3 180
set global read_only=1;
set global read_only=0;
"================== global read_only marker =================="
@@ -1008,39 +997,33 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 104
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
+TABLE test t1 91
TABLE test t2 0
-TABLE test t3 188
+TABLE test t3 180
disconnect con1;
"================== Step 13 =================="
call dump_thread();
@@ -1081,39 +1064,33 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 104
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
+TABLE test t1 91
TABLE test t2 0
-TABLE test t3 188
+TABLE test t3 180
disconnect con2;
"================== Step 14 =================="
call dump_thread();
@@ -1153,39 +1130,33 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 104
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
+TABLE test t1 91
TABLE test t2 0
-TABLE test t3 188
+TABLE test t3 180
disconnect con3;
"================== Step 15 =================="
call dump_thread();
@@ -1224,39 +1195,33 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 104
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
+TABLE test t1 91
TABLE test t2 0
-TABLE test t3 188
+TABLE test t3 180
disconnect con4;
"================== Step 16 =================="
call dump_thread();
@@ -1294,39 +1259,33 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 104
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
+TABLE test t1 91
TABLE test t2 0
-TABLE test t3 188
+TABLE test t3 180
connection default;
truncate performance_schema.events_waits_summary_by_thread_by_event_name;
"================== BY_THREAD truncated =================="
@@ -1366,39 +1325,33 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 104
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
+TABLE test t1 91
TABLE test t2 0
-TABLE test t3 188
+TABLE test t3 180
truncate performance_schema.events_waits_summary_by_account_by_event_name;
"================== BY_ACCOUNT truncated =================="
"================== Step 18 =================="
@@ -1437,39 +1390,33 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 104
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
+TABLE test t1 91
TABLE test t2 0
-TABLE test t3 188
+TABLE test t3 180
truncate performance_schema.events_waits_summary_by_user_by_event_name;
"================== BY_USER truncated =================="
"================== Step 19 =================="
@@ -1508,39 +1455,33 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 104
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
+TABLE test t1 91
TABLE test t2 0
-TABLE test t3 188
+TABLE test t3 180
truncate performance_schema.events_waits_summary_by_host_by_event_name;
"================== BY_HOST truncated =================="
"================== Step 21 =================="
@@ -1579,39 +1520,33 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 104
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
+TABLE test t1 91
TABLE test t2 0
-TABLE test t3 188
+TABLE test t3 180
truncate performance_schema.events_waits_summary_global_by_event_name;
"================== GLOBAL truncated =================="
"================== Step 21 =================="
@@ -1660,10 +1595,6 @@ TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
@@ -1671,19 +1602,17 @@ TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-show status like "performance_schema%";
+show global status like "performance_schema%";
Variable_name Value
Performance_schema_accounts_lost 0
Performance_schema_cond_classes_lost 0
@@ -1693,9 +1622,15 @@ Performance_schema_file_classes_lost 0
Performance_schema_file_handles_lost 0
Performance_schema_file_instances_lost 0
Performance_schema_hosts_lost 0
+Performance_schema_index_stat_lost 0
Performance_schema_locker_lost 0
+Performance_schema_memory_classes_lost 0
+Performance_schema_metadata_lock_lost 0
Performance_schema_mutex_classes_lost 0
Performance_schema_mutex_instances_lost 0
+Performance_schema_nested_statement_lost 0
+Performance_schema_prepared_statements_lost 0
+Performance_schema_program_lost 0
Performance_schema_rwlock_classes_lost 0
Performance_schema_rwlock_instances_lost 0
Performance_schema_session_connect_attrs_lost 0
@@ -1705,6 +1640,7 @@ Performance_schema_stage_classes_lost 0
Performance_schema_statement_classes_lost 0
Performance_schema_table_handles_lost 0
Performance_schema_table_instances_lost 0
+Performance_schema_table_lock_stat_lost 0
Performance_schema_thread_classes_lost 0
Performance_schema_thread_instances_lost 0
Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/table_aggregate_global_4u_3t.result b/mysql-test/suite/perfschema/r/table_aggregate_global_4u_3t.result
index fed189a7667..5d816b58777 100644
--- a/mysql-test/suite/perfschema/r/table_aggregate_global_4u_3t.result
+++ b/mysql-test/suite/perfschema/r/table_aggregate_global_4u_3t.result
@@ -2,11 +2,11 @@ update performance_schema.setup_consumers
set enabled='NO' where name='thread_instrumentation';
select * from performance_schema.setup_actors
order by USER, HOST, ROLE;
-HOST USER ROLE
-localhost user1 %
-localhost user2 %
-localhost user3 %
-localhost user4 %
+HOST USER ROLE ENABLED HISTORY
+localhost user1 % YES YES
+localhost user2 % YES YES
+localhost user3 % YES YES
+localhost user4 % YES YES
select * from performance_schema.setup_objects
order by object_type, object_schema, object_name;
OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
@@ -21,6 +21,9 @@ events_stages_history_long YES
events_statements_current YES
events_statements_history YES
events_statements_history_long YES
+events_transactions_current YES
+events_transactions_history YES
+events_transactions_history_long YES
events_waits_current YES
events_waits_history YES
events_waits_history_long YES
@@ -64,15 +67,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -82,10 +82,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -127,15 +127,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -145,10 +142,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -179,15 +176,77 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=101;
update test.t2 set d=d+1 where a=101;
update test.t3 set d=d+1 where a=101;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 1
connection default;
-"================== Step 3 =================="
+"================== Step 3-A =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 33
+wait/lock/table/sql/handler 36
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t2 NULL 9 5 4 5 2 2 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 1 1 0 1 0 0 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t2 10 6 4 6 2 2 0
+TABLE test t3 15 9 6 9 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t2 12 4 8 2 0 0 0 2 0 4
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 18
+TABLE test t2 22
+TABLE test t3 29
+connection con1;
+flush tables;
+"================== con1 FLUSH =================="
+connection default;
+"================== Step 3-B =================="
call dump_thread();
username event_name count_star
user1 wait/io/table/sql/handler 0
@@ -212,7 +271,7 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 37
+wait/io/table/sql/handler 33
wait/lock/table/sql/handler 36
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
@@ -222,29 +281,29 @@ TABLE test t1 NULL 6 4 2 4 1 1 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 2 1 1 1 0 1 0
-TABLE test t2 NULL 10 6 4 6 2 2 0
-TABLE test t2 index_b 1 1 0 1 0 0 0
+TABLE test t2 NULL 9 5 4 5 2 2 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 1 1 0 1 0 0 0
-TABLE test t3 NULL 14 8 6 8 3 3 0
-TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 1 1 0 1 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 8 5 3 5 1 2 0
-TABLE test t2 12 8 4 8 2 2 0
-TABLE test t3 17 11 6 11 3 3 0
+TABLE test t2 10 6 4 6 2 2 0
+TABLE test t3 15 9 6 9 3 3 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
-TABLE test t2 12 4 8 2 0 0 0 2 0 0 4
-TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t2 12 4 8 2 0 0 0 2 0 4
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 18
-TABLE test t2 24
-TABLE test t3 31
+TABLE test t2 22
+TABLE test t3 29
connect con2, localhost, user2, , ;
select concat(current_user(), " is connected") as status;
status
@@ -280,7 +339,7 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 37
+wait/io/table/sql/handler 33
wait/lock/table/sql/handler 36
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
@@ -290,29 +349,29 @@ TABLE test t1 NULL 6 4 2 4 1 1 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 2 1 1 1 0 1 0
-TABLE test t2 NULL 10 6 4 6 2 2 0
-TABLE test t2 index_b 1 1 0 1 0 0 0
+TABLE test t2 NULL 9 5 4 5 2 2 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 1 1 0 1 0 0 0
-TABLE test t3 NULL 14 8 6 8 3 3 0
-TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 1 1 0 1 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 8 5 3 5 1 2 0
-TABLE test t2 12 8 4 8 2 2 0
-TABLE test t3 17 11 6 11 3 3 0
+TABLE test t2 10 6 4 6 2 2 0
+TABLE test t3 15 9 6 9 3 3 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
-TABLE test t2 12 4 8 2 0 0 0 2 0 0 4
-TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t2 12 4 8 2 0 0 0 2 0 4
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 18
-TABLE test t2 24
-TABLE test t3 31
+TABLE test t2 22
+TABLE test t3 29
connection con2;
insert into test.t1 set a=201, b=1, c=1;
insert into test.t2 set a=202, b=2, c=2;
@@ -344,11 +403,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=201;
update test.t2 set d=d+1 where a=201;
update test.t3 set d=d+1 where a=201;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 2
205 5 5 1
@@ -383,39 +442,39 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 94
+wait/io/table/sql/handler 84
wait/lock/table/sql/handler 72
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 15 10 5 10 2 3 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 14 9 5 9 2 3 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 26 16 10 16 4 6 0
-TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 NULL 24 14 10 14 4 6 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 2 2 0 2 0 0 0
-TABLE test t3 NULL 37 22 15 22 6 9 0
-TABLE test t3 index_b 5 5 0 5 0 0 0
+TABLE test t3 NULL 35 20 15 20 6 9 0
+TABLE test t3 index_b 3 3 0 3 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 20 13 7 13 2 5 0
-TABLE test t2 30 20 10 20 4 6 0
-TABLE test t3 44 29 15 29 6 9 0
+TABLE test t1 18 11 7 11 2 5 0
+TABLE test t2 26 16 10 16 4 6 0
+TABLE test t3 40 25 15 25 6 9 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
-TABLE test t2 24 8 16 4 0 0 0 4 0 0 8
-TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 6
+TABLE test t2 24 8 16 4 0 0 0 4 0 8
+TABLE test t3 28 8 20 4 0 0 0 4 0 10
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 40
-TABLE test t2 54
-TABLE test t3 72
+TABLE test t1 38
+TABLE test t2 50
+TABLE test t3 68
connect con3, localhost, user3, , ;
select concat(current_user(), " is connected") as status;
status
@@ -456,39 +515,39 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 94
+wait/io/table/sql/handler 84
wait/lock/table/sql/handler 72
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 15 10 5 10 2 3 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 14 9 5 9 2 3 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 26 16 10 16 4 6 0
-TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 NULL 24 14 10 14 4 6 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 2 2 0 2 0 0 0
-TABLE test t3 NULL 37 22 15 22 6 9 0
-TABLE test t3 index_b 5 5 0 5 0 0 0
+TABLE test t3 NULL 35 20 15 20 6 9 0
+TABLE test t3 index_b 3 3 0 3 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 20 13 7 13 2 5 0
-TABLE test t2 30 20 10 20 4 6 0
-TABLE test t3 44 29 15 29 6 9 0
+TABLE test t1 18 11 7 11 2 5 0
+TABLE test t2 26 16 10 16 4 6 0
+TABLE test t3 40 25 15 25 6 9 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
-TABLE test t2 24 8 16 4 0 0 0 4 0 0 8
-TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 6
+TABLE test t2 24 8 16 4 0 0 0 4 0 8
+TABLE test t3 28 8 20 4 0 0 0 4 0 10
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 40
-TABLE test t2 54
-TABLE test t3 72
+TABLE test t1 38
+TABLE test t2 50
+TABLE test t3 68
connection con3;
insert into test.t1 set a=301, b=1, c=1;
insert into test.t2 set a=302, b=2, c=2;
@@ -526,11 +585,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=301;
update test.t2 set d=d+1 where a=301;
update test.t3 set d=d+1 where a=301;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 3
205 5 5 2
@@ -571,39 +630,39 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 170
+wait/io/table/sql/handler 154
wait/lock/table/sql/handler 108
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 27 18 9 18 3 6 0
-TABLE test t1 index_b 2 2 0 2 0 0 0
+TABLE test t1 NULL 25 16 9 16 3 6 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 6 3 3 3 0 3 0
-TABLE test t2 NULL 48 30 18 30 6 12 0
-TABLE test t2 index_b 3 3 0 3 0 0 0
+TABLE test t2 NULL 45 27 18 27 6 12 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 3 3 0 3 0 0 0
-TABLE test t3 NULL 69 42 27 42 9 18 0
-TABLE test t3 index_b 9 9 0 9 0 0 0
+TABLE test t3 NULL 66 39 27 39 9 18 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 3 3 0 3 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 35 23 12 23 3 9 0
-TABLE test t2 54 36 18 36 6 12 0
-TABLE test t3 81 54 27 54 9 18 0
+TABLE test t1 31 19 12 19 3 9 0
+TABLE test t2 48 30 18 30 6 12 0
+TABLE test t3 75 48 27 48 9 18 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 30 12 18 6 0 0 0 6 0 0 9
-TABLE test t2 36 12 24 6 0 0 0 6 0 0 12
-TABLE test t3 42 12 30 6 0 0 0 6 0 0 15
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 30 12 18 6 0 0 0 6 0 9
+TABLE test t2 36 12 24 6 0 0 0 6 0 12
+TABLE test t3 42 12 30 6 0 0 0 6 0 15
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 65
-TABLE test t2 90
-TABLE test t3 123
+TABLE test t1 61
+TABLE test t2 84
+TABLE test t3 117
connect con4, localhost, user4, , ;
select concat(current_user(), " is connected") as status;
status
@@ -649,39 +708,39 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 170
+wait/io/table/sql/handler 154
wait/lock/table/sql/handler 108
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 27 18 9 18 3 6 0
-TABLE test t1 index_b 2 2 0 2 0 0 0
+TABLE test t1 NULL 25 16 9 16 3 6 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 6 3 3 3 0 3 0
-TABLE test t2 NULL 48 30 18 30 6 12 0
-TABLE test t2 index_b 3 3 0 3 0 0 0
+TABLE test t2 NULL 45 27 18 27 6 12 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 3 3 0 3 0 0 0
-TABLE test t3 NULL 69 42 27 42 9 18 0
-TABLE test t3 index_b 9 9 0 9 0 0 0
+TABLE test t3 NULL 66 39 27 39 9 18 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 3 3 0 3 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 35 23 12 23 3 9 0
-TABLE test t2 54 36 18 36 6 12 0
-TABLE test t3 81 54 27 54 9 18 0
+TABLE test t1 31 19 12 19 3 9 0
+TABLE test t2 48 30 18 30 6 12 0
+TABLE test t3 75 48 27 48 9 18 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 30 12 18 6 0 0 0 6 0 0 9
-TABLE test t2 36 12 24 6 0 0 0 6 0 0 12
-TABLE test t3 42 12 30 6 0 0 0 6 0 0 15
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 30 12 18 6 0 0 0 6 0 9
+TABLE test t2 36 12 24 6 0 0 0 6 0 12
+TABLE test t3 42 12 30 6 0 0 0 6 0 15
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 65
-TABLE test t2 90
-TABLE test t3 123
+TABLE test t1 61
+TABLE test t2 84
+TABLE test t3 117
connection con4;
insert into test.t1 set a=401, b=1, c=1;
insert into test.t2 set a=402, b=2, c=2;
@@ -725,11 +784,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=401;
update test.t2 set d=d+1 where a=401;
update test.t3 set d=d+1 where a=401;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 4
205 5 5 3
@@ -776,39 +835,39 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 144
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 40 16 24 8 0 0 0 8 0 0 12
-TABLE test t2 48 16 32 8 0 0 0 8 0 0 16
-TABLE test t3 56 16 40 8 0 0 0 8 0 0 20
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 40 16 24 8 0 0 0 8 0 12
+TABLE test t2 48 16 32 8 0 0 0 8 0 16
+TABLE test t3 56 16 40 8 0 0 0 8 0 20
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 93
-TABLE test t2 132
-TABLE test t3 184
+TABLE test t1 87
+TABLE test t2 124
+TABLE test t3 176
connection con1;
lock tables test.t1 read, test.t2 read, test.t3 read;
unlock tables;
@@ -855,39 +914,39 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 156
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
-TABLE test t2 136
-TABLE test t3 188
+TABLE test t1 91
+TABLE test t2 128
+TABLE test t3 180
connection default;
flush tables;
"================== flush marker =================="
@@ -931,39 +990,39 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 156
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
-TABLE test t2 136
-TABLE test t3 188
+TABLE test t1 91
+TABLE test t2 128
+TABLE test t3 180
set global read_only=1;
set global read_only=0;
"================== global read_only marker =================="
@@ -1007,39 +1066,39 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 156
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
-TABLE test t2 136
-TABLE test t3 188
+TABLE test t1 91
+TABLE test t2 128
+TABLE test t3 180
disconnect con1;
"================== Step 13 =================="
call dump_thread();
@@ -1080,39 +1139,39 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 156
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
-TABLE test t2 136
-TABLE test t3 188
+TABLE test t1 91
+TABLE test t2 128
+TABLE test t3 180
disconnect con2;
"================== Step 14 =================="
call dump_thread();
@@ -1152,39 +1211,39 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 156
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
-TABLE test t2 136
-TABLE test t3 188
+TABLE test t1 91
+TABLE test t2 128
+TABLE test t3 180
disconnect con3;
"================== Step 15 =================="
call dump_thread();
@@ -1223,39 +1282,39 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 156
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
-TABLE test t2 136
-TABLE test t3 188
+TABLE test t1 91
+TABLE test t2 128
+TABLE test t3 180
disconnect con4;
"================== Step 16 =================="
call dump_thread();
@@ -1293,39 +1352,39 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 156
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
-TABLE test t2 136
-TABLE test t3 188
+TABLE test t1 91
+TABLE test t2 128
+TABLE test t3 180
connection default;
truncate performance_schema.events_waits_summary_by_thread_by_event_name;
"================== BY_THREAD truncated =================="
@@ -1365,39 +1424,39 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 156
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
-TABLE test t2 136
-TABLE test t3 188
+TABLE test t1 91
+TABLE test t2 128
+TABLE test t3 180
truncate performance_schema.events_waits_summary_by_account_by_event_name;
"================== BY_ACCOUNT truncated =================="
"================== Step 18 =================="
@@ -1436,39 +1495,39 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 156
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
-TABLE test t2 136
-TABLE test t3 188
+TABLE test t1 91
+TABLE test t2 128
+TABLE test t3 180
truncate performance_schema.events_waits_summary_by_user_by_event_name;
"================== BY_USER truncated =================="
"================== Step 19 =================="
@@ -1507,39 +1566,39 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 156
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
-TABLE test t2 136
-TABLE test t3 188
+TABLE test t1 91
+TABLE test t2 128
+TABLE test t3 180
truncate performance_schema.events_waits_summary_by_host_by_event_name;
"================== BY_HOST truncated =================="
"================== Step 21 =================="
@@ -1578,39 +1637,39 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 156
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
-TABLE test t2 136
-TABLE test t3 188
+TABLE test t1 91
+TABLE test t2 128
+TABLE test t3 180
truncate performance_schema.events_waits_summary_global_by_event_name;
"================== GLOBAL truncated =================="
"================== Step 21 =================="
@@ -1673,16 +1732,16 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-show status like "performance_schema%";
+show global status like "performance_schema%";
Variable_name Value
Performance_schema_accounts_lost 0
Performance_schema_cond_classes_lost 0
@@ -1692,9 +1751,15 @@ Performance_schema_file_classes_lost 0
Performance_schema_file_handles_lost 0
Performance_schema_file_instances_lost 0
Performance_schema_hosts_lost 0
+Performance_schema_index_stat_lost 0
Performance_schema_locker_lost 0
+Performance_schema_memory_classes_lost 0
+Performance_schema_metadata_lock_lost 0
Performance_schema_mutex_classes_lost 0
Performance_schema_mutex_instances_lost 0
+Performance_schema_nested_statement_lost 0
+Performance_schema_prepared_statements_lost 0
+Performance_schema_program_lost 0
Performance_schema_rwlock_classes_lost 0
Performance_schema_rwlock_instances_lost 0
Performance_schema_session_connect_attrs_lost 0
@@ -1704,6 +1769,7 @@ Performance_schema_stage_classes_lost 0
Performance_schema_statement_classes_lost 0
Performance_schema_table_handles_lost 0
Performance_schema_table_instances_lost 0
+Performance_schema_table_lock_stat_lost 0
Performance_schema_thread_classes_lost 0
Performance_schema_thread_instances_lost 0
Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/table_aggregate_hist_2u_2t.result b/mysql-test/suite/perfschema/r/table_aggregate_hist_2u_2t.result
index ee95e4c0417..52ece6d289d 100644
--- a/mysql-test/suite/perfschema/r/table_aggregate_hist_2u_2t.result
+++ b/mysql-test/suite/perfschema/r/table_aggregate_hist_2u_2t.result
@@ -4,9 +4,9 @@ delete from performance_schema.setup_objects
where object_name='t2';
select * from performance_schema.setup_actors
order by USER, HOST, ROLE;
-HOST USER ROLE
-localhost user1 %
-localhost user3 %
+HOST USER ROLE ENABLED HISTORY
+localhost user1 % YES YES
+localhost user3 % YES YES
select * from performance_schema.setup_objects
order by object_type, object_schema, object_name;
OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
@@ -20,6 +20,9 @@ events_stages_history_long YES
events_statements_current YES
events_statements_history YES
events_statements_history_long YES
+events_transactions_current YES
+events_transactions_history YES
+events_transactions_history_long YES
events_waits_current YES
events_waits_history YES
events_waits_history_long YES
@@ -63,28 +66,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -126,28 +121,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -178,18 +165,18 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=101;
update test.t2 set d=d+1 where a=101;
update test.t3 set d=d+1 where a=101;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 1
connection default;
-"================== Step 3 =================="
+"================== Step 3-A =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 24
username status
user2 not found
@@ -199,25 +186,25 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 24
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 24
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 25
+localhost wait/io/table/sql/handler 23
localhost wait/lock/table/sql/handler 24
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 25
+wait/io/table/sql/handler 23
wait/lock/table/sql/handler 24
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
wait/io/table/sql/handler 8 TABLE test t1
wait/lock/table/sql/handler 10 TABLE test t1
-wait/io/table/sql/handler 17 TABLE test t3
+wait/io/table/sql/handler 15 TABLE test t3
wait/lock/table/sql/handler 14 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
@@ -225,29 +212,83 @@ TABLE test t1 NULL 6 4 2 4 1 1 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 2 1 1 1 0 1 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 14 8 6 8 3 3 0
-TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 1 1 0 1 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 8 5 3 5 1 2 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 17 11 6 11 3 3 0
+TABLE test t3 15 9 6 9 3 3 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 18
TABLE test t2 0
-TABLE test t3 31
+TABLE test t3 29
+connection con1;
+flush tables;
+"================== con1 FLUSH =================="
+connection default;
+"================== Step 3-B =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 23
+user1 wait/lock/table/sql/handler 24
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 23
+user1 localhost wait/lock/table/sql/handler 24
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 23
+user1 wait/lock/table/sql/handler 24
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 23
+localhost wait/lock/table/sql/handler 24
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 23
+wait/lock/table/sql/handler 24
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 8 TABLE test t1
+wait/lock/table/sql/handler 10 TABLE test t1
+wait/io/table/sql/handler 15 TABLE test t3
+wait/lock/table/sql/handler 14 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t3 15 9 6 9 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 18
+TABLE test t2 0
+TABLE test t3 29
connect con2, localhost, user2, , ;
select concat(current_user(), " is connected") as status;
status
@@ -256,7 +297,7 @@ connection default;
"================== Step 4 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 24
username event_name count_star
user2 wait/io/table/sql/handler 0
@@ -267,29 +308,29 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 24
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 24
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 25
+localhost wait/io/table/sql/handler 23
localhost wait/lock/table/sql/handler 24
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 25
+wait/io/table/sql/handler 23
wait/lock/table/sql/handler 24
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
wait/io/table/sql/handler 8 TABLE test t1
wait/lock/table/sql/handler 10 TABLE test t1
-wait/io/table/sql/handler 17 TABLE test t3
+wait/io/table/sql/handler 15 TABLE test t3
wait/lock/table/sql/handler 14 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
@@ -297,29 +338,23 @@ TABLE test t1 NULL 6 4 2 4 1 1 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 2 1 1 1 0 1 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 14 8 6 8 3 3 0
-TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 1 1 0 1 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 8 5 3 5 1 2 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 17 11 6 11 3 3 0
+TABLE test t3 15 9 6 9 3 3 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 18
TABLE test t2 0
-TABLE test t3 31
+TABLE test t3 29
connection con2;
insert into test.t1 set a=201, b=1, c=1;
insert into test.t2 set a=202, b=2, c=2;
@@ -351,11 +386,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=201;
update test.t2 set d=d+1 where a=201;
update test.t3 set d=d+1 where a=201;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 2
205 5 5 1
@@ -363,7 +398,7 @@ connection default;
"================== Step 5 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 24
username event_name count_star
user2 wait/io/table/sql/handler 0
@@ -374,29 +409,29 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 24
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 24
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 25
+localhost wait/io/table/sql/handler 23
localhost wait/lock/table/sql/handler 24
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 25
+wait/io/table/sql/handler 23
wait/lock/table/sql/handler 24
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
wait/io/table/sql/handler 8 TABLE test t1
wait/lock/table/sql/handler 10 TABLE test t1
-wait/io/table/sql/handler 17 TABLE test t3
+wait/io/table/sql/handler 15 TABLE test t3
wait/lock/table/sql/handler 14 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
@@ -404,29 +439,23 @@ TABLE test t1 NULL 6 4 2 4 1 1 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 2 1 1 1 0 1 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 14 8 6 8 3 3 0
-TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 1 1 0 1 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 8 5 3 5 1 2 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 17 11 6 11 3 3 0
+TABLE test t3 15 9 6 9 3 3 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 18
TABLE test t2 0
-TABLE test t3 31
+TABLE test t3 29
connect con3, localhost, user3, , ;
select concat(current_user(), " is connected") as status;
status
@@ -435,7 +464,7 @@ connection default;
"================== Step 6 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 24
username event_name count_star
user2 wait/io/table/sql/handler 0
@@ -447,7 +476,7 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 24
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
@@ -455,7 +484,7 @@ user3 localhost wait/io/table/sql/handler 0
user3 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 24
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
@@ -463,17 +492,17 @@ user3 wait/io/table/sql/handler 0
user3 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 25
+localhost wait/io/table/sql/handler 23
localhost wait/lock/table/sql/handler 24
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 25
+wait/io/table/sql/handler 23
wait/lock/table/sql/handler 24
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
wait/io/table/sql/handler 8 TABLE test t1
wait/lock/table/sql/handler 10 TABLE test t1
-wait/io/table/sql/handler 17 TABLE test t3
+wait/io/table/sql/handler 15 TABLE test t3
wait/lock/table/sql/handler 14 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
@@ -481,29 +510,23 @@ TABLE test t1 NULL 6 4 2 4 1 1 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 2 1 1 1 0 1 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 14 8 6 8 3 3 0
-TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 1 1 0 1 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 8 5 3 5 1 2 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 17 11 6 11 3 3 0
+TABLE test t3 15 9 6 9 3 3 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 18
TABLE test t2 0
-TABLE test t3 31
+TABLE test t3 29
connection con3;
insert into test.t1 set a=301, b=1, c=1;
insert into test.t2 set a=302, b=2, c=2;
@@ -541,11 +564,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=301;
update test.t2 set d=d+1 where a=301;
update test.t3 set d=d+1 where a=301;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 3
205 5 5 2
@@ -554,75 +577,69 @@ connection default;
"================== Step 7 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 24
username event_name count_star
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 24
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 24
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 24
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 77
+localhost wait/io/table/sql/handler 71
localhost wait/lock/table/sql/handler 48
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 77
+wait/io/table/sql/handler 71
wait/lock/table/sql/handler 48
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 23 TABLE test t1
+wait/io/table/sql/handler 21 TABLE test t1
wait/lock/table/sql/handler 20 TABLE test t1
-wait/io/table/sql/handler 54 TABLE test t3
+wait/io/table/sql/handler 50 TABLE test t3
wait/lock/table/sql/handler 28 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 6
+TABLE test t3 28 8 20 4 0 0 0 4 0 10
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 43
+TABLE test t1 41
TABLE test t2 0
-TABLE test t3 82
+TABLE test t3 78
connect con4, localhost, user4, , ;
select concat(current_user(), " is connected") as status;
status
@@ -631,80 +648,74 @@ connection default;
"================== Step 8 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 24
username event_name count_star
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
username event_name count_star
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 24
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 24
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 24
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 77
+localhost wait/io/table/sql/handler 71
localhost wait/lock/table/sql/handler 48
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 77
+wait/io/table/sql/handler 71
wait/lock/table/sql/handler 48
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 23 TABLE test t1
+wait/io/table/sql/handler 21 TABLE test t1
wait/lock/table/sql/handler 20 TABLE test t1
-wait/io/table/sql/handler 54 TABLE test t3
+wait/io/table/sql/handler 50 TABLE test t3
wait/lock/table/sql/handler 28 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 6
+TABLE test t3 28 8 20 4 0 0 0 4 0 10
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 43
+TABLE test t1 41
TABLE test t2 0
-TABLE test t3 82
+TABLE test t3 78
connection con4;
insert into test.t1 set a=401, b=1, c=1;
insert into test.t2 set a=402, b=2, c=2;
@@ -748,11 +759,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=401;
update test.t2 set d=d+1 where a=401;
update test.t3 set d=d+1 where a=401;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 4
205 5 5 3
@@ -762,80 +773,74 @@ connection default;
"================== Step 9 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 24
username event_name count_star
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
username event_name count_star
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 24
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 24
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 24
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 77
+localhost wait/io/table/sql/handler 71
localhost wait/lock/table/sql/handler 48
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 77
+wait/io/table/sql/handler 71
wait/lock/table/sql/handler 48
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 23 TABLE test t1
+wait/io/table/sql/handler 21 TABLE test t1
wait/lock/table/sql/handler 20 TABLE test t1
-wait/io/table/sql/handler 54 TABLE test t3
+wait/io/table/sql/handler 50 TABLE test t3
wait/lock/table/sql/handler 28 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 6
+TABLE test t3 28 8 20 4 0 0 0 4 0 10
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 43
+TABLE test t1 41
TABLE test t2 0
-TABLE test t3 82
+TABLE test t3 78
connection con1;
lock tables test.t1 read, test.t2 read, test.t3 read;
unlock tables;
@@ -845,240 +850,222 @@ connection default;
"================== Step 10 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 32
username event_name count_star
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
username event_name count_star
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 32
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 24
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 32
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 77
+localhost wait/io/table/sql/handler 71
localhost wait/lock/table/sql/handler 56
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 77
+wait/io/table/sql/handler 71
wait/lock/table/sql/handler 56
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 23 TABLE test t1
+wait/io/table/sql/handler 21 TABLE test t1
wait/lock/table/sql/handler 24 TABLE test t1
-wait/io/table/sql/handler 54 TABLE test t3
+wait/io/table/sql/handler 50 TABLE test t3
wait/lock/table/sql/handler 32 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 47
+TABLE test t1 45
TABLE test t2 0
-TABLE test t3 86
+TABLE test t3 82
connection default;
flush tables;
"================== flush marker =================="
"================== Step 11 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 32
username event_name count_star
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
username event_name count_star
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 32
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 24
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 32
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 77
+localhost wait/io/table/sql/handler 71
localhost wait/lock/table/sql/handler 56
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 77
+wait/io/table/sql/handler 71
wait/lock/table/sql/handler 56
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 23 TABLE test t1
+wait/io/table/sql/handler 21 TABLE test t1
wait/lock/table/sql/handler 24 TABLE test t1
-wait/io/table/sql/handler 54 TABLE test t3
+wait/io/table/sql/handler 50 TABLE test t3
wait/lock/table/sql/handler 32 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 47
+TABLE test t1 45
TABLE test t2 0
-TABLE test t3 86
+TABLE test t3 82
set global read_only=1;
set global read_only=0;
"================== global read_only marker =================="
"================== Step 12 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 32
username event_name count_star
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
username event_name count_star
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 32
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 24
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 32
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 77
+localhost wait/io/table/sql/handler 71
localhost wait/lock/table/sql/handler 56
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 77
+wait/io/table/sql/handler 71
wait/lock/table/sql/handler 56
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 23 TABLE test t1
+wait/io/table/sql/handler 21 TABLE test t1
wait/lock/table/sql/handler 24 TABLE test t1
-wait/io/table/sql/handler 54 TABLE test t3
+wait/io/table/sql/handler 50 TABLE test t3
wait/lock/table/sql/handler 32 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 47
+TABLE test t1 45
TABLE test t2 0
-TABLE test t3 86
+TABLE test t3 82
disconnect con1;
"================== Step 13 =================="
call dump_thread();
@@ -1088,74 +1075,68 @@ username event_name count_star
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
username event_name count_star
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 32
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 24
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 32
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 77
+localhost wait/io/table/sql/handler 71
localhost wait/lock/table/sql/handler 56
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 77
+wait/io/table/sql/handler 71
wait/lock/table/sql/handler 56
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 23 TABLE test t1
+wait/io/table/sql/handler 21 TABLE test t1
wait/lock/table/sql/handler 24 TABLE test t1
-wait/io/table/sql/handler 54 TABLE test t3
+wait/io/table/sql/handler 50 TABLE test t3
wait/lock/table/sql/handler 32 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 47
+TABLE test t1 45
TABLE test t2 0
-TABLE test t3 86
+TABLE test t3 82
disconnect con2;
"================== Step 14 =================="
call dump_thread();
@@ -1164,74 +1145,68 @@ user1 not found
username status
user2 not found
username event_name count_star
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
username event_name count_star
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 32
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 24
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 32
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 77
+localhost wait/io/table/sql/handler 71
localhost wait/lock/table/sql/handler 56
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 77
+wait/io/table/sql/handler 71
wait/lock/table/sql/handler 56
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 23 TABLE test t1
+wait/io/table/sql/handler 21 TABLE test t1
wait/lock/table/sql/handler 24 TABLE test t1
-wait/io/table/sql/handler 54 TABLE test t3
+wait/io/table/sql/handler 50 TABLE test t3
wait/lock/table/sql/handler 32 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 47
+TABLE test t1 45
TABLE test t2 0
-TABLE test t3 86
+TABLE test t3 82
disconnect con3;
"================== Step 15 =================="
call dump_thread();
@@ -1246,67 +1221,61 @@ user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 32
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 24
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 32
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 77
+localhost wait/io/table/sql/handler 71
localhost wait/lock/table/sql/handler 56
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 77
+wait/io/table/sql/handler 71
wait/lock/table/sql/handler 56
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 23 TABLE test t1
+wait/io/table/sql/handler 21 TABLE test t1
wait/lock/table/sql/handler 24 TABLE test t1
-wait/io/table/sql/handler 54 TABLE test t3
+wait/io/table/sql/handler 50 TABLE test t3
wait/lock/table/sql/handler 32 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 47
+TABLE test t1 45
TABLE test t2 0
-TABLE test t3 86
+TABLE test t3 82
disconnect con4;
"================== Step 16 =================="
call dump_thread();
@@ -1320,67 +1289,61 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 32
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 24
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 32
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 77
+localhost wait/io/table/sql/handler 71
localhost wait/lock/table/sql/handler 56
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 77
+wait/io/table/sql/handler 71
wait/lock/table/sql/handler 56
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 23 TABLE test t1
+wait/io/table/sql/handler 21 TABLE test t1
wait/lock/table/sql/handler 24 TABLE test t1
-wait/io/table/sql/handler 54 TABLE test t3
+wait/io/table/sql/handler 50 TABLE test t3
wait/lock/table/sql/handler 32 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 47
+TABLE test t1 45
TABLE test t2 0
-TABLE test t3 86
+TABLE test t3 82
connection default;
truncate performance_schema.events_waits_summary_by_thread_by_event_name;
"================== BY_THREAD truncated =================="
@@ -1396,67 +1359,61 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 32
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 24
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 32
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 77
+localhost wait/io/table/sql/handler 71
localhost wait/lock/table/sql/handler 56
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 77
+wait/io/table/sql/handler 71
wait/lock/table/sql/handler 56
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 23 TABLE test t1
+wait/io/table/sql/handler 21 TABLE test t1
wait/lock/table/sql/handler 24 TABLE test t1
-wait/io/table/sql/handler 54 TABLE test t3
+wait/io/table/sql/handler 50 TABLE test t3
wait/lock/table/sql/handler 32 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 47
+TABLE test t1 45
TABLE test t2 0
-TABLE test t3 86
+TABLE test t3 82
truncate performance_schema.events_waits_summary_by_account_by_event_name;
"================== BY_ACCOUNT truncated =================="
"================== Step 18 =================="
@@ -1481,57 +1438,51 @@ user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 32
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 77
+localhost wait/io/table/sql/handler 71
localhost wait/lock/table/sql/handler 56
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 77
+wait/io/table/sql/handler 71
wait/lock/table/sql/handler 56
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 23 TABLE test t1
+wait/io/table/sql/handler 21 TABLE test t1
wait/lock/table/sql/handler 24 TABLE test t1
-wait/io/table/sql/handler 54 TABLE test t3
+wait/io/table/sql/handler 50 TABLE test t3
wait/lock/table/sql/handler 32 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 47
+TABLE test t1 45
TABLE test t2 0
-TABLE test t3 86
+TABLE test t3 82
truncate performance_schema.events_waits_summary_by_user_by_event_name;
"================== BY_USER truncated =================="
"================== Step 19 =================="
@@ -1566,47 +1517,41 @@ user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 77
+localhost wait/io/table/sql/handler 71
localhost wait/lock/table/sql/handler 56
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 77
+wait/io/table/sql/handler 71
wait/lock/table/sql/handler 56
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 23 TABLE test t1
+wait/io/table/sql/handler 21 TABLE test t1
wait/lock/table/sql/handler 24 TABLE test t1
-wait/io/table/sql/handler 54 TABLE test t3
+wait/io/table/sql/handler 50 TABLE test t3
wait/lock/table/sql/handler 32 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 47
+TABLE test t1 45
TABLE test t2 0
-TABLE test t3 86
+TABLE test t3 82
truncate performance_schema.events_waits_summary_by_host_by_event_name;
"================== BY_HOST truncated =================="
"================== Step 21 =================="
@@ -1645,43 +1590,37 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 77
+wait/io/table/sql/handler 71
wait/lock/table/sql/handler 56
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 23 TABLE test t1
+wait/io/table/sql/handler 21 TABLE test t1
wait/lock/table/sql/handler 24 TABLE test t1
-wait/io/table/sql/handler 54 TABLE test t3
+wait/io/table/sql/handler 50 TABLE test t3
wait/lock/table/sql/handler 32 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 47
+TABLE test t1 45
TABLE test t2 0
-TABLE test t3 86
+TABLE test t3 82
truncate performance_schema.events_waits_summary_global_by_event_name;
"================== GLOBAL truncated =================="
"================== Step 21 =================="
@@ -1724,9 +1663,9 @@ wait/io/table/sql/handler 0
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 23 TABLE test t1
+wait/io/table/sql/handler 21 TABLE test t1
wait/lock/table/sql/handler 24 TABLE test t1
-wait/io/table/sql/handler 54 TABLE test t3
+wait/io/table/sql/handler 50 TABLE test t3
wait/lock/table/sql/handler 32 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
@@ -1734,10 +1673,6 @@ TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
@@ -1745,19 +1680,17 @@ TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-show status like "performance_schema%";
+show global status like "performance_schema%";
Variable_name Value
Performance_schema_accounts_lost 0
Performance_schema_cond_classes_lost 0
@@ -1767,9 +1700,15 @@ Performance_schema_file_classes_lost 0
Performance_schema_file_handles_lost 0
Performance_schema_file_instances_lost 0
Performance_schema_hosts_lost 0
+Performance_schema_index_stat_lost 0
Performance_schema_locker_lost 0
+Performance_schema_memory_classes_lost 0
+Performance_schema_metadata_lock_lost 0
Performance_schema_mutex_classes_lost 0
Performance_schema_mutex_instances_lost 0
+Performance_schema_nested_statement_lost 0
+Performance_schema_prepared_statements_lost 0
+Performance_schema_program_lost 0
Performance_schema_rwlock_classes_lost 0
Performance_schema_rwlock_instances_lost 0
Performance_schema_session_connect_attrs_lost 0
@@ -1779,6 +1718,7 @@ Performance_schema_stage_classes_lost 0
Performance_schema_statement_classes_lost 0
Performance_schema_table_handles_lost 0
Performance_schema_table_instances_lost 0
+Performance_schema_table_lock_stat_lost 0
Performance_schema_thread_classes_lost 0
Performance_schema_thread_instances_lost 0
Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/table_aggregate_hist_2u_3t.result b/mysql-test/suite/perfschema/r/table_aggregate_hist_2u_3t.result
index d6e4e674258..b0ea06f4254 100644
--- a/mysql-test/suite/perfschema/r/table_aggregate_hist_2u_3t.result
+++ b/mysql-test/suite/perfschema/r/table_aggregate_hist_2u_3t.result
@@ -2,9 +2,9 @@ delete from performance_schema.setup_actors
where user in ('user2', 'user4');
select * from performance_schema.setup_actors
order by USER, HOST, ROLE;
-HOST USER ROLE
-localhost user1 %
-localhost user3 %
+HOST USER ROLE ENABLED HISTORY
+localhost user1 % YES YES
+localhost user3 % YES YES
select * from performance_schema.setup_objects
order by object_type, object_schema, object_name;
OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
@@ -19,6 +19,9 @@ events_stages_history_long YES
events_statements_current YES
events_statements_history YES
events_statements_history_long YES
+events_transactions_current YES
+events_transactions_history YES
+events_transactions_history_long YES
events_waits_current YES
events_waits_history YES
events_waits_history_long YES
@@ -62,15 +65,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -80,10 +80,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -125,15 +125,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -143,10 +140,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -177,18 +174,18 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=101;
update test.t2 set d=d+1 where a=101;
update test.t3 set d=d+1 where a=101;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 1
connection default;
-"================== Step 3 =================="
+"================== Step 3-A =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 36
username status
user2 not found
@@ -198,27 +195,27 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 36
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 36
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 37
+localhost wait/io/table/sql/handler 33
localhost wait/lock/table/sql/handler 36
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 37
+wait/io/table/sql/handler 33
wait/lock/table/sql/handler 36
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
wait/io/table/sql/handler 8 TABLE test t1
wait/lock/table/sql/handler 10 TABLE test t1
-wait/io/table/sql/handler 12 TABLE test t2
+wait/io/table/sql/handler 10 TABLE test t2
wait/lock/table/sql/handler 12 TABLE test t2
-wait/io/table/sql/handler 17 TABLE test t3
+wait/io/table/sql/handler 15 TABLE test t3
wait/lock/table/sql/handler 14 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
@@ -226,29 +223,97 @@ TABLE test t1 NULL 6 4 2 4 1 1 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 2 1 1 1 0 1 0
-TABLE test t2 NULL 10 6 4 6 2 2 0
-TABLE test t2 index_b 1 1 0 1 0 0 0
+TABLE test t2 NULL 9 5 4 5 2 2 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 1 1 0 1 0 0 0
-TABLE test t3 NULL 14 8 6 8 3 3 0
-TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 1 1 0 1 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 8 5 3 5 1 2 0
-TABLE test t2 12 8 4 8 2 2 0
-TABLE test t3 17 11 6 11 3 3 0
+TABLE test t2 10 6 4 6 2 2 0
+TABLE test t3 15 9 6 9 3 3 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
-TABLE test t2 12 4 8 2 0 0 0 2 0 0 4
-TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t2 12 4 8 2 0 0 0 2 0 4
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 18
-TABLE test t2 24
-TABLE test t3 31
+TABLE test t2 22
+TABLE test t3 29
+connection con1;
+flush tables;
+"================== con1 FLUSH =================="
+connection default;
+"================== Step 3-B =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 33
+user1 wait/lock/table/sql/handler 36
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 33
+user1 localhost wait/lock/table/sql/handler 36
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 33
+user1 wait/lock/table/sql/handler 36
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 33
+localhost wait/lock/table/sql/handler 36
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 33
+wait/lock/table/sql/handler 36
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 8 TABLE test t1
+wait/lock/table/sql/handler 10 TABLE test t1
+wait/io/table/sql/handler 10 TABLE test t2
+wait/lock/table/sql/handler 12 TABLE test t2
+wait/io/table/sql/handler 15 TABLE test t3
+wait/lock/table/sql/handler 14 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t2 NULL 9 5 4 5 2 2 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 1 1 0 1 0 0 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t2 10 6 4 6 2 2 0
+TABLE test t3 15 9 6 9 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t2 12 4 8 2 0 0 0 2 0 4
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 18
+TABLE test t2 22
+TABLE test t3 29
connect con2, localhost, user2, , ;
select concat(current_user(), " is connected") as status;
status
@@ -257,7 +322,7 @@ connection default;
"================== Step 4 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 36
username event_name count_star
user2 wait/io/table/sql/handler 0
@@ -268,31 +333,31 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 36
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 36
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 37
+localhost wait/io/table/sql/handler 33
localhost wait/lock/table/sql/handler 36
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 37
+wait/io/table/sql/handler 33
wait/lock/table/sql/handler 36
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
wait/io/table/sql/handler 8 TABLE test t1
wait/lock/table/sql/handler 10 TABLE test t1
-wait/io/table/sql/handler 12 TABLE test t2
+wait/io/table/sql/handler 10 TABLE test t2
wait/lock/table/sql/handler 12 TABLE test t2
-wait/io/table/sql/handler 17 TABLE test t3
+wait/io/table/sql/handler 15 TABLE test t3
wait/lock/table/sql/handler 14 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
@@ -300,29 +365,29 @@ TABLE test t1 NULL 6 4 2 4 1 1 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 2 1 1 1 0 1 0
-TABLE test t2 NULL 10 6 4 6 2 2 0
-TABLE test t2 index_b 1 1 0 1 0 0 0
+TABLE test t2 NULL 9 5 4 5 2 2 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 1 1 0 1 0 0 0
-TABLE test t3 NULL 14 8 6 8 3 3 0
-TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 1 1 0 1 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 8 5 3 5 1 2 0
-TABLE test t2 12 8 4 8 2 2 0
-TABLE test t3 17 11 6 11 3 3 0
+TABLE test t2 10 6 4 6 2 2 0
+TABLE test t3 15 9 6 9 3 3 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
-TABLE test t2 12 4 8 2 0 0 0 2 0 0 4
-TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t2 12 4 8 2 0 0 0 2 0 4
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 18
-TABLE test t2 24
-TABLE test t3 31
+TABLE test t2 22
+TABLE test t3 29
connection con2;
insert into test.t1 set a=201, b=1, c=1;
insert into test.t2 set a=202, b=2, c=2;
@@ -354,11 +419,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=201;
update test.t2 set d=d+1 where a=201;
update test.t3 set d=d+1 where a=201;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 2
205 5 5 1
@@ -366,7 +431,7 @@ connection default;
"================== Step 5 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 36
username event_name count_star
user2 wait/io/table/sql/handler 0
@@ -377,31 +442,31 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 36
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 36
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 37
+localhost wait/io/table/sql/handler 33
localhost wait/lock/table/sql/handler 36
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 37
+wait/io/table/sql/handler 33
wait/lock/table/sql/handler 36
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
wait/io/table/sql/handler 8 TABLE test t1
wait/lock/table/sql/handler 10 TABLE test t1
-wait/io/table/sql/handler 12 TABLE test t2
+wait/io/table/sql/handler 10 TABLE test t2
wait/lock/table/sql/handler 12 TABLE test t2
-wait/io/table/sql/handler 17 TABLE test t3
+wait/io/table/sql/handler 15 TABLE test t3
wait/lock/table/sql/handler 14 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
@@ -409,29 +474,29 @@ TABLE test t1 NULL 6 4 2 4 1 1 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 2 1 1 1 0 1 0
-TABLE test t2 NULL 10 6 4 6 2 2 0
-TABLE test t2 index_b 1 1 0 1 0 0 0
+TABLE test t2 NULL 9 5 4 5 2 2 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 1 1 0 1 0 0 0
-TABLE test t3 NULL 14 8 6 8 3 3 0
-TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 1 1 0 1 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 8 5 3 5 1 2 0
-TABLE test t2 12 8 4 8 2 2 0
-TABLE test t3 17 11 6 11 3 3 0
+TABLE test t2 10 6 4 6 2 2 0
+TABLE test t3 15 9 6 9 3 3 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
-TABLE test t2 12 4 8 2 0 0 0 2 0 0 4
-TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t2 12 4 8 2 0 0 0 2 0 4
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 18
-TABLE test t2 24
-TABLE test t3 31
+TABLE test t2 22
+TABLE test t3 29
connect con3, localhost, user3, , ;
select concat(current_user(), " is connected") as status;
status
@@ -440,7 +505,7 @@ connection default;
"================== Step 6 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 36
username event_name count_star
user2 wait/io/table/sql/handler 0
@@ -452,7 +517,7 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 36
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
@@ -460,7 +525,7 @@ user3 localhost wait/io/table/sql/handler 0
user3 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 36
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
@@ -468,19 +533,19 @@ user3 wait/io/table/sql/handler 0
user3 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 37
+localhost wait/io/table/sql/handler 33
localhost wait/lock/table/sql/handler 36
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 37
+wait/io/table/sql/handler 33
wait/lock/table/sql/handler 36
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
wait/io/table/sql/handler 8 TABLE test t1
wait/lock/table/sql/handler 10 TABLE test t1
-wait/io/table/sql/handler 12 TABLE test t2
+wait/io/table/sql/handler 10 TABLE test t2
wait/lock/table/sql/handler 12 TABLE test t2
-wait/io/table/sql/handler 17 TABLE test t3
+wait/io/table/sql/handler 15 TABLE test t3
wait/lock/table/sql/handler 14 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
@@ -488,29 +553,29 @@ TABLE test t1 NULL 6 4 2 4 1 1 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 2 1 1 1 0 1 0
-TABLE test t2 NULL 10 6 4 6 2 2 0
-TABLE test t2 index_b 1 1 0 1 0 0 0
+TABLE test t2 NULL 9 5 4 5 2 2 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 1 1 0 1 0 0 0
-TABLE test t3 NULL 14 8 6 8 3 3 0
-TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 1 1 0 1 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 8 5 3 5 1 2 0
-TABLE test t2 12 8 4 8 2 2 0
-TABLE test t3 17 11 6 11 3 3 0
+TABLE test t2 10 6 4 6 2 2 0
+TABLE test t3 15 9 6 9 3 3 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
-TABLE test t2 12 4 8 2 0 0 0 2 0 0 4
-TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t2 12 4 8 2 0 0 0 2 0 4
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 18
-TABLE test t2 24
-TABLE test t3 31
+TABLE test t2 22
+TABLE test t3 29
connection con3;
insert into test.t1 set a=301, b=1, c=1;
insert into test.t2 set a=302, b=2, c=2;
@@ -548,11 +613,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=301;
update test.t2 set d=d+1 where a=301;
update test.t3 set d=d+1 where a=301;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 3
205 5 5 2
@@ -561,77 +626,77 @@ connection default;
"================== Step 7 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 36
username event_name count_star
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 36
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 36
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 36
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 113
+localhost wait/io/table/sql/handler 103
localhost wait/lock/table/sql/handler 72
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 113
+wait/io/table/sql/handler 103
wait/lock/table/sql/handler 72
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 23 TABLE test t1
+wait/io/table/sql/handler 21 TABLE test t1
wait/lock/table/sql/handler 20 TABLE test t1
-wait/io/table/sql/handler 36 TABLE test t2
+wait/io/table/sql/handler 32 TABLE test t2
wait/lock/table/sql/handler 24 TABLE test t2
-wait/io/table/sql/handler 54 TABLE test t3
+wait/io/table/sql/handler 50 TABLE test t3
wait/lock/table/sql/handler 28 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 32 20 12 20 4 8 0
-TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 NULL 30 18 12 18 4 8 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 2 2 0 2 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 36 24 12 24 4 8 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t2 32 20 12 20 4 8 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
-TABLE test t2 24 8 16 4 0 0 0 4 0 0 8
-TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 6
+TABLE test t2 24 8 16 4 0 0 0 4 0 8
+TABLE test t3 28 8 20 4 0 0 0 4 0 10
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 43
-TABLE test t2 60
-TABLE test t3 82
+TABLE test t1 41
+TABLE test t2 56
+TABLE test t3 78
connect con4, localhost, user4, , ;
select concat(current_user(), " is connected") as status;
status
@@ -640,82 +705,82 @@ connection default;
"================== Step 8 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 36
username event_name count_star
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
username event_name count_star
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 36
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 36
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 36
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 113
+localhost wait/io/table/sql/handler 103
localhost wait/lock/table/sql/handler 72
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 113
+wait/io/table/sql/handler 103
wait/lock/table/sql/handler 72
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 23 TABLE test t1
+wait/io/table/sql/handler 21 TABLE test t1
wait/lock/table/sql/handler 20 TABLE test t1
-wait/io/table/sql/handler 36 TABLE test t2
+wait/io/table/sql/handler 32 TABLE test t2
wait/lock/table/sql/handler 24 TABLE test t2
-wait/io/table/sql/handler 54 TABLE test t3
+wait/io/table/sql/handler 50 TABLE test t3
wait/lock/table/sql/handler 28 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 32 20 12 20 4 8 0
-TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 NULL 30 18 12 18 4 8 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 2 2 0 2 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 36 24 12 24 4 8 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t2 32 20 12 20 4 8 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
-TABLE test t2 24 8 16 4 0 0 0 4 0 0 8
-TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 6
+TABLE test t2 24 8 16 4 0 0 0 4 0 8
+TABLE test t3 28 8 20 4 0 0 0 4 0 10
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 43
-TABLE test t2 60
-TABLE test t3 82
+TABLE test t1 41
+TABLE test t2 56
+TABLE test t3 78
connection con4;
insert into test.t1 set a=401, b=1, c=1;
insert into test.t2 set a=402, b=2, c=2;
@@ -759,11 +824,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=401;
update test.t2 set d=d+1 where a=401;
update test.t3 set d=d+1 where a=401;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 4
205 5 5 3
@@ -773,82 +838,82 @@ connection default;
"================== Step 9 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 36
username event_name count_star
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
username event_name count_star
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 36
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 36
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 36
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 113
+localhost wait/io/table/sql/handler 103
localhost wait/lock/table/sql/handler 72
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 113
+wait/io/table/sql/handler 103
wait/lock/table/sql/handler 72
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 23 TABLE test t1
+wait/io/table/sql/handler 21 TABLE test t1
wait/lock/table/sql/handler 20 TABLE test t1
-wait/io/table/sql/handler 36 TABLE test t2
+wait/io/table/sql/handler 32 TABLE test t2
wait/lock/table/sql/handler 24 TABLE test t2
-wait/io/table/sql/handler 54 TABLE test t3
+wait/io/table/sql/handler 50 TABLE test t3
wait/lock/table/sql/handler 28 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 32 20 12 20 4 8 0
-TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 NULL 30 18 12 18 4 8 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 2 2 0 2 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 36 24 12 24 4 8 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t2 32 20 12 20 4 8 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
-TABLE test t2 24 8 16 4 0 0 0 4 0 0 8
-TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 6
+TABLE test t2 24 8 16 4 0 0 0 4 0 8
+TABLE test t3 28 8 20 4 0 0 0 4 0 10
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 43
-TABLE test t2 60
-TABLE test t3 82
+TABLE test t1 41
+TABLE test t2 56
+TABLE test t3 78
connection con1;
lock tables test.t1 read, test.t2 read, test.t3 read;
unlock tables;
@@ -858,246 +923,246 @@ connection default;
"================== Step 10 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 48
username event_name count_star
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
username event_name count_star
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 48
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 36
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 48
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 113
+localhost wait/io/table/sql/handler 103
localhost wait/lock/table/sql/handler 84
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 113
+wait/io/table/sql/handler 103
wait/lock/table/sql/handler 84
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 23 TABLE test t1
+wait/io/table/sql/handler 21 TABLE test t1
wait/lock/table/sql/handler 24 TABLE test t1
-wait/io/table/sql/handler 36 TABLE test t2
+wait/io/table/sql/handler 32 TABLE test t2
wait/lock/table/sql/handler 28 TABLE test t2
-wait/io/table/sql/handler 54 TABLE test t3
+wait/io/table/sql/handler 50 TABLE test t3
wait/lock/table/sql/handler 32 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 32 20 12 20 4 8 0
-TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 NULL 30 18 12 18 4 8 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 2 2 0 2 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 36 24 12 24 4 8 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t2 32 20 12 20 4 8 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 47
-TABLE test t2 64
-TABLE test t3 86
+TABLE test t1 45
+TABLE test t2 60
+TABLE test t3 82
connection default;
flush tables;
"================== flush marker =================="
"================== Step 11 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 48
username event_name count_star
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
username event_name count_star
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 48
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 36
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 48
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 113
+localhost wait/io/table/sql/handler 103
localhost wait/lock/table/sql/handler 84
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 113
+wait/io/table/sql/handler 103
wait/lock/table/sql/handler 84
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 23 TABLE test t1
+wait/io/table/sql/handler 21 TABLE test t1
wait/lock/table/sql/handler 24 TABLE test t1
-wait/io/table/sql/handler 36 TABLE test t2
+wait/io/table/sql/handler 32 TABLE test t2
wait/lock/table/sql/handler 28 TABLE test t2
-wait/io/table/sql/handler 54 TABLE test t3
+wait/io/table/sql/handler 50 TABLE test t3
wait/lock/table/sql/handler 32 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 32 20 12 20 4 8 0
-TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 NULL 30 18 12 18 4 8 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 2 2 0 2 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 36 24 12 24 4 8 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t2 32 20 12 20 4 8 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 47
-TABLE test t2 64
-TABLE test t3 86
+TABLE test t1 45
+TABLE test t2 60
+TABLE test t3 82
set global read_only=1;
set global read_only=0;
"================== global read_only marker =================="
"================== Step 12 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 48
username event_name count_star
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
username event_name count_star
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 48
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 36
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 48
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 113
+localhost wait/io/table/sql/handler 103
localhost wait/lock/table/sql/handler 84
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 113
+wait/io/table/sql/handler 103
wait/lock/table/sql/handler 84
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 23 TABLE test t1
+wait/io/table/sql/handler 21 TABLE test t1
wait/lock/table/sql/handler 24 TABLE test t1
-wait/io/table/sql/handler 36 TABLE test t2
+wait/io/table/sql/handler 32 TABLE test t2
wait/lock/table/sql/handler 28 TABLE test t2
-wait/io/table/sql/handler 54 TABLE test t3
+wait/io/table/sql/handler 50 TABLE test t3
wait/lock/table/sql/handler 32 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 32 20 12 20 4 8 0
-TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 NULL 30 18 12 18 4 8 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 2 2 0 2 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 36 24 12 24 4 8 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t2 32 20 12 20 4 8 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 47
-TABLE test t2 64
-TABLE test t3 86
+TABLE test t1 45
+TABLE test t2 60
+TABLE test t3 82
disconnect con1;
"================== Step 13 =================="
call dump_thread();
@@ -1107,76 +1172,76 @@ username event_name count_star
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
username event_name count_star
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 48
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 36
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 48
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 113
+localhost wait/io/table/sql/handler 103
localhost wait/lock/table/sql/handler 84
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 113
+wait/io/table/sql/handler 103
wait/lock/table/sql/handler 84
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 23 TABLE test t1
+wait/io/table/sql/handler 21 TABLE test t1
wait/lock/table/sql/handler 24 TABLE test t1
-wait/io/table/sql/handler 36 TABLE test t2
+wait/io/table/sql/handler 32 TABLE test t2
wait/lock/table/sql/handler 28 TABLE test t2
-wait/io/table/sql/handler 54 TABLE test t3
+wait/io/table/sql/handler 50 TABLE test t3
wait/lock/table/sql/handler 32 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 32 20 12 20 4 8 0
-TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 NULL 30 18 12 18 4 8 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 2 2 0 2 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 36 24 12 24 4 8 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t2 32 20 12 20 4 8 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 47
-TABLE test t2 64
-TABLE test t3 86
+TABLE test t1 45
+TABLE test t2 60
+TABLE test t3 82
disconnect con2;
"================== Step 14 =================="
call dump_thread();
@@ -1185,76 +1250,76 @@ user1 not found
username status
user2 not found
username event_name count_star
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
username event_name count_star
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 48
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 36
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 48
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 113
+localhost wait/io/table/sql/handler 103
localhost wait/lock/table/sql/handler 84
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 113
+wait/io/table/sql/handler 103
wait/lock/table/sql/handler 84
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 23 TABLE test t1
+wait/io/table/sql/handler 21 TABLE test t1
wait/lock/table/sql/handler 24 TABLE test t1
-wait/io/table/sql/handler 36 TABLE test t2
+wait/io/table/sql/handler 32 TABLE test t2
wait/lock/table/sql/handler 28 TABLE test t2
-wait/io/table/sql/handler 54 TABLE test t3
+wait/io/table/sql/handler 50 TABLE test t3
wait/lock/table/sql/handler 32 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 32 20 12 20 4 8 0
-TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 NULL 30 18 12 18 4 8 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 2 2 0 2 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 36 24 12 24 4 8 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t2 32 20 12 20 4 8 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 47
-TABLE test t2 64
-TABLE test t3 86
+TABLE test t1 45
+TABLE test t2 60
+TABLE test t3 82
disconnect con3;
"================== Step 15 =================="
call dump_thread();
@@ -1269,69 +1334,69 @@ user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 48
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 36
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 48
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 113
+localhost wait/io/table/sql/handler 103
localhost wait/lock/table/sql/handler 84
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 113
+wait/io/table/sql/handler 103
wait/lock/table/sql/handler 84
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 23 TABLE test t1
+wait/io/table/sql/handler 21 TABLE test t1
wait/lock/table/sql/handler 24 TABLE test t1
-wait/io/table/sql/handler 36 TABLE test t2
+wait/io/table/sql/handler 32 TABLE test t2
wait/lock/table/sql/handler 28 TABLE test t2
-wait/io/table/sql/handler 54 TABLE test t3
+wait/io/table/sql/handler 50 TABLE test t3
wait/lock/table/sql/handler 32 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 32 20 12 20 4 8 0
-TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 NULL 30 18 12 18 4 8 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 2 2 0 2 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 36 24 12 24 4 8 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t2 32 20 12 20 4 8 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 47
-TABLE test t2 64
-TABLE test t3 86
+TABLE test t1 45
+TABLE test t2 60
+TABLE test t3 82
disconnect con4;
"================== Step 16 =================="
call dump_thread();
@@ -1345,69 +1410,69 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 48
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 36
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 48
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 113
+localhost wait/io/table/sql/handler 103
localhost wait/lock/table/sql/handler 84
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 113
+wait/io/table/sql/handler 103
wait/lock/table/sql/handler 84
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 23 TABLE test t1
+wait/io/table/sql/handler 21 TABLE test t1
wait/lock/table/sql/handler 24 TABLE test t1
-wait/io/table/sql/handler 36 TABLE test t2
+wait/io/table/sql/handler 32 TABLE test t2
wait/lock/table/sql/handler 28 TABLE test t2
-wait/io/table/sql/handler 54 TABLE test t3
+wait/io/table/sql/handler 50 TABLE test t3
wait/lock/table/sql/handler 32 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 32 20 12 20 4 8 0
-TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 NULL 30 18 12 18 4 8 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 2 2 0 2 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 36 24 12 24 4 8 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t2 32 20 12 20 4 8 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 47
-TABLE test t2 64
-TABLE test t3 86
+TABLE test t1 45
+TABLE test t2 60
+TABLE test t3 82
connection default;
truncate performance_schema.events_waits_summary_by_thread_by_event_name;
"================== BY_THREAD truncated =================="
@@ -1423,69 +1488,69 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 48
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 36
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 48
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 113
+localhost wait/io/table/sql/handler 103
localhost wait/lock/table/sql/handler 84
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 113
+wait/io/table/sql/handler 103
wait/lock/table/sql/handler 84
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 23 TABLE test t1
+wait/io/table/sql/handler 21 TABLE test t1
wait/lock/table/sql/handler 24 TABLE test t1
-wait/io/table/sql/handler 36 TABLE test t2
+wait/io/table/sql/handler 32 TABLE test t2
wait/lock/table/sql/handler 28 TABLE test t2
-wait/io/table/sql/handler 54 TABLE test t3
+wait/io/table/sql/handler 50 TABLE test t3
wait/lock/table/sql/handler 32 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 32 20 12 20 4 8 0
-TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 NULL 30 18 12 18 4 8 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 2 2 0 2 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 36 24 12 24 4 8 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t2 32 20 12 20 4 8 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 47
-TABLE test t2 64
-TABLE test t3 86
+TABLE test t1 45
+TABLE test t2 60
+TABLE test t3 82
truncate performance_schema.events_waits_summary_by_account_by_event_name;
"================== BY_ACCOUNT truncated =================="
"================== Step 18 =================="
@@ -1510,59 +1575,59 @@ user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 48
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 113
+localhost wait/io/table/sql/handler 103
localhost wait/lock/table/sql/handler 84
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 113
+wait/io/table/sql/handler 103
wait/lock/table/sql/handler 84
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 23 TABLE test t1
+wait/io/table/sql/handler 21 TABLE test t1
wait/lock/table/sql/handler 24 TABLE test t1
-wait/io/table/sql/handler 36 TABLE test t2
+wait/io/table/sql/handler 32 TABLE test t2
wait/lock/table/sql/handler 28 TABLE test t2
-wait/io/table/sql/handler 54 TABLE test t3
+wait/io/table/sql/handler 50 TABLE test t3
wait/lock/table/sql/handler 32 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 32 20 12 20 4 8 0
-TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 NULL 30 18 12 18 4 8 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 2 2 0 2 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 36 24 12 24 4 8 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t2 32 20 12 20 4 8 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 47
-TABLE test t2 64
-TABLE test t3 86
+TABLE test t1 45
+TABLE test t2 60
+TABLE test t3 82
truncate performance_schema.events_waits_summary_by_user_by_event_name;
"================== BY_USER truncated =================="
"================== Step 19 =================="
@@ -1597,49 +1662,49 @@ user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 113
+localhost wait/io/table/sql/handler 103
localhost wait/lock/table/sql/handler 84
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 113
+wait/io/table/sql/handler 103
wait/lock/table/sql/handler 84
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 23 TABLE test t1
+wait/io/table/sql/handler 21 TABLE test t1
wait/lock/table/sql/handler 24 TABLE test t1
-wait/io/table/sql/handler 36 TABLE test t2
+wait/io/table/sql/handler 32 TABLE test t2
wait/lock/table/sql/handler 28 TABLE test t2
-wait/io/table/sql/handler 54 TABLE test t3
+wait/io/table/sql/handler 50 TABLE test t3
wait/lock/table/sql/handler 32 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 32 20 12 20 4 8 0
-TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 NULL 30 18 12 18 4 8 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 2 2 0 2 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 36 24 12 24 4 8 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t2 32 20 12 20 4 8 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 47
-TABLE test t2 64
-TABLE test t3 86
+TABLE test t1 45
+TABLE test t2 60
+TABLE test t3 82
truncate performance_schema.events_waits_summary_by_host_by_event_name;
"================== BY_HOST truncated =================="
"================== Step 21 =================="
@@ -1678,45 +1743,45 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 113
+wait/io/table/sql/handler 103
wait/lock/table/sql/handler 84
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 23 TABLE test t1
+wait/io/table/sql/handler 21 TABLE test t1
wait/lock/table/sql/handler 24 TABLE test t1
-wait/io/table/sql/handler 36 TABLE test t2
+wait/io/table/sql/handler 32 TABLE test t2
wait/lock/table/sql/handler 28 TABLE test t2
-wait/io/table/sql/handler 54 TABLE test t3
+wait/io/table/sql/handler 50 TABLE test t3
wait/lock/table/sql/handler 32 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 32 20 12 20 4 8 0
-TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 NULL 30 18 12 18 4 8 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 2 2 0 2 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 36 24 12 24 4 8 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t2 32 20 12 20 4 8 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 47
-TABLE test t2 64
-TABLE test t3 86
+TABLE test t1 45
+TABLE test t2 60
+TABLE test t3 82
truncate performance_schema.events_waits_summary_global_by_event_name;
"================== GLOBAL truncated =================="
"================== Step 21 =================="
@@ -1759,11 +1824,11 @@ wait/io/table/sql/handler 0
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 23 TABLE test t1
+wait/io/table/sql/handler 21 TABLE test t1
wait/lock/table/sql/handler 24 TABLE test t1
-wait/io/table/sql/handler 36 TABLE test t2
+wait/io/table/sql/handler 32 TABLE test t2
wait/lock/table/sql/handler 28 TABLE test t2
-wait/io/table/sql/handler 54 TABLE test t3
+wait/io/table/sql/handler 50 TABLE test t3
wait/lock/table/sql/handler 32 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
@@ -1785,16 +1850,16 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-show status like "performance_schema%";
+show global status like "performance_schema%";
Variable_name Value
Performance_schema_accounts_lost 0
Performance_schema_cond_classes_lost 0
@@ -1804,9 +1869,15 @@ Performance_schema_file_classes_lost 0
Performance_schema_file_handles_lost 0
Performance_schema_file_instances_lost 0
Performance_schema_hosts_lost 0
+Performance_schema_index_stat_lost 0
Performance_schema_locker_lost 0
+Performance_schema_memory_classes_lost 0
+Performance_schema_metadata_lock_lost 0
Performance_schema_mutex_classes_lost 0
Performance_schema_mutex_instances_lost 0
+Performance_schema_nested_statement_lost 0
+Performance_schema_prepared_statements_lost 0
+Performance_schema_program_lost 0
Performance_schema_rwlock_classes_lost 0
Performance_schema_rwlock_instances_lost 0
Performance_schema_session_connect_attrs_lost 0
@@ -1816,6 +1887,7 @@ Performance_schema_stage_classes_lost 0
Performance_schema_statement_classes_lost 0
Performance_schema_table_handles_lost 0
Performance_schema_table_instances_lost 0
+Performance_schema_table_lock_stat_lost 0
Performance_schema_thread_classes_lost 0
Performance_schema_thread_instances_lost 0
Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/table_aggregate_hist_4u_2t.result b/mysql-test/suite/perfschema/r/table_aggregate_hist_4u_2t.result
index 2d2a55efa77..0a6dea739e4 100644
--- a/mysql-test/suite/perfschema/r/table_aggregate_hist_4u_2t.result
+++ b/mysql-test/suite/perfschema/r/table_aggregate_hist_4u_2t.result
@@ -2,11 +2,11 @@ delete from performance_schema.setup_objects
where object_name='t2';
select * from performance_schema.setup_actors
order by USER, HOST, ROLE;
-HOST USER ROLE
-localhost user1 %
-localhost user2 %
-localhost user3 %
-localhost user4 %
+HOST USER ROLE ENABLED HISTORY
+localhost user1 % YES YES
+localhost user2 % YES YES
+localhost user3 % YES YES
+localhost user4 % YES YES
select * from performance_schema.setup_objects
order by object_type, object_schema, object_name;
OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
@@ -20,6 +20,9 @@ events_stages_history_long YES
events_statements_current YES
events_statements_history YES
events_statements_history_long YES
+events_transactions_current YES
+events_transactions_history YES
+events_transactions_history_long YES
events_waits_current YES
events_waits_history YES
events_waits_history_long YES
@@ -63,28 +66,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -126,28 +121,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -178,18 +165,18 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=101;
update test.t2 set d=d+1 where a=101;
update test.t3 set d=d+1 where a=101;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 1
connection default;
-"================== Step 3 =================="
+"================== Step 3-A =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 24
username status
user2 not found
@@ -199,25 +186,25 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 24
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 24
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 25
+localhost wait/io/table/sql/handler 23
localhost wait/lock/table/sql/handler 24
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 25
+wait/io/table/sql/handler 23
wait/lock/table/sql/handler 24
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
wait/io/table/sql/handler 8 TABLE test t1
wait/lock/table/sql/handler 10 TABLE test t1
-wait/io/table/sql/handler 17 TABLE test t3
+wait/io/table/sql/handler 15 TABLE test t3
wait/lock/table/sql/handler 14 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
@@ -225,29 +212,83 @@ TABLE test t1 NULL 6 4 2 4 1 1 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 2 1 1 1 0 1 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 14 8 6 8 3 3 0
-TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 1 1 0 1 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 8 5 3 5 1 2 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 17 11 6 11 3 3 0
+TABLE test t3 15 9 6 9 3 3 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 18
TABLE test t2 0
-TABLE test t3 31
+TABLE test t3 29
+connection con1;
+flush tables;
+"================== con1 FLUSH =================="
+connection default;
+"================== Step 3-B =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 23
+user1 wait/lock/table/sql/handler 24
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 23
+user1 localhost wait/lock/table/sql/handler 24
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 23
+user1 wait/lock/table/sql/handler 24
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 23
+localhost wait/lock/table/sql/handler 24
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 23
+wait/lock/table/sql/handler 24
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 8 TABLE test t1
+wait/lock/table/sql/handler 10 TABLE test t1
+wait/io/table/sql/handler 15 TABLE test t3
+wait/lock/table/sql/handler 14 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t3 15 9 6 9 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 18
+TABLE test t2 0
+TABLE test t3 29
connect con2, localhost, user2, , ;
select concat(current_user(), " is connected") as status;
status
@@ -256,7 +297,7 @@ connection default;
"================== Step 4 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 24
username event_name count_star
user2 wait/io/table/sql/handler 0
@@ -267,29 +308,29 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 24
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 24
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 25
+localhost wait/io/table/sql/handler 23
localhost wait/lock/table/sql/handler 24
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 25
+wait/io/table/sql/handler 23
wait/lock/table/sql/handler 24
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
wait/io/table/sql/handler 8 TABLE test t1
wait/lock/table/sql/handler 10 TABLE test t1
-wait/io/table/sql/handler 17 TABLE test t3
+wait/io/table/sql/handler 15 TABLE test t3
wait/lock/table/sql/handler 14 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
@@ -297,29 +338,23 @@ TABLE test t1 NULL 6 4 2 4 1 1 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 2 1 1 1 0 1 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 14 8 6 8 3 3 0
-TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 1 1 0 1 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 8 5 3 5 1 2 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 17 11 6 11 3 3 0
+TABLE test t3 15 9 6 9 3 3 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 18
TABLE test t2 0
-TABLE test t3 31
+TABLE test t3 29
connection con2;
insert into test.t1 set a=201, b=1, c=1;
insert into test.t2 set a=202, b=2, c=2;
@@ -351,11 +386,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=201;
update test.t2 set d=d+1 where a=201;
update test.t3 set d=d+1 where a=201;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 2
205 5 5 1
@@ -363,10 +398,10 @@ connection default;
"================== Step 5 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 24
username event_name count_star
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 24
username status
user3 not found
@@ -374,59 +409,53 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 24
-user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/io/table/sql/handler 35
user2 localhost wait/lock/table/sql/handler 24
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 24
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 24
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 64
+localhost wait/io/table/sql/handler 58
localhost wait/lock/table/sql/handler 48
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 64
+wait/io/table/sql/handler 58
wait/lock/table/sql/handler 48
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 20 TABLE test t1
+wait/io/table/sql/handler 18 TABLE test t1
wait/lock/table/sql/handler 20 TABLE test t1
-wait/io/table/sql/handler 44 TABLE test t3
+wait/io/table/sql/handler 40 TABLE test t3
wait/lock/table/sql/handler 28 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 15 10 5 10 2 3 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 14 9 5 9 2 3 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 37 22 15 22 6 9 0
-TABLE test t3 index_b 5 5 0 5 0 0 0
+TABLE test t3 NULL 35 20 15 20 6 9 0
+TABLE test t3 index_b 3 3 0 3 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 20 13 7 13 2 5 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 44 29 15 29 6 9 0
+TABLE test t1 18 11 7 11 2 5 0
+TABLE test t3 40 25 15 25 6 9 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 6
+TABLE test t3 28 8 20 4 0 0 0 4 0 10
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 40
+TABLE test t1 38
TABLE test t2 0
-TABLE test t3 72
+TABLE test t3 68
connect con3, localhost, user3, , ;
select concat(current_user(), " is connected") as status;
status
@@ -435,10 +464,10 @@ connection default;
"================== Step 6 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 24
username event_name count_star
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 24
username event_name count_star
user3 wait/io/table/sql/handler 0
@@ -447,63 +476,57 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 24
-user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/io/table/sql/handler 35
user2 localhost wait/lock/table/sql/handler 24
user3 localhost wait/io/table/sql/handler 0
user3 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 24
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 24
user3 wait/io/table/sql/handler 0
user3 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 64
+localhost wait/io/table/sql/handler 58
localhost wait/lock/table/sql/handler 48
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 64
+wait/io/table/sql/handler 58
wait/lock/table/sql/handler 48
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 20 TABLE test t1
+wait/io/table/sql/handler 18 TABLE test t1
wait/lock/table/sql/handler 20 TABLE test t1
-wait/io/table/sql/handler 44 TABLE test t3
+wait/io/table/sql/handler 40 TABLE test t3
wait/lock/table/sql/handler 28 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 15 10 5 10 2 3 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 14 9 5 9 2 3 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 37 22 15 22 6 9 0
-TABLE test t3 index_b 5 5 0 5 0 0 0
+TABLE test t3 NULL 35 20 15 20 6 9 0
+TABLE test t3 index_b 3 3 0 3 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 20 13 7 13 2 5 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 44 29 15 29 6 9 0
+TABLE test t1 18 11 7 11 2 5 0
+TABLE test t3 40 25 15 25 6 9 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 6
+TABLE test t3 28 8 20 4 0 0 0 4 0 10
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 40
+TABLE test t1 38
TABLE test t2 0
-TABLE test t3 72
+TABLE test t3 68
connection con3;
insert into test.t1 set a=301, b=1, c=1;
insert into test.t2 set a=302, b=2, c=2;
@@ -541,11 +564,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=301;
update test.t2 set d=d+1 where a=301;
update test.t3 set d=d+1 where a=301;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 3
205 5 5 2
@@ -554,75 +577,69 @@ connection default;
"================== Step 7 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 24
username event_name count_star
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 24
username event_name count_star
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 24
-user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/io/table/sql/handler 35
user2 localhost wait/lock/table/sql/handler 24
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 24
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 24
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 24
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 116
+localhost wait/io/table/sql/handler 106
localhost wait/lock/table/sql/handler 72
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 116
+wait/io/table/sql/handler 106
wait/lock/table/sql/handler 72
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 35 TABLE test t1
+wait/io/table/sql/handler 31 TABLE test t1
wait/lock/table/sql/handler 30 TABLE test t1
-wait/io/table/sql/handler 81 TABLE test t3
+wait/io/table/sql/handler 75 TABLE test t3
wait/lock/table/sql/handler 42 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 27 18 9 18 3 6 0
-TABLE test t1 index_b 2 2 0 2 0 0 0
+TABLE test t1 NULL 25 16 9 16 3 6 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 6 3 3 3 0 3 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 69 42 27 42 9 18 0
-TABLE test t3 index_b 9 9 0 9 0 0 0
+TABLE test t3 NULL 66 39 27 39 9 18 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 3 3 0 3 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 35 23 12 23 3 9 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 81 54 27 54 9 18 0
+TABLE test t1 31 19 12 19 3 9 0
+TABLE test t3 75 48 27 48 9 18 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 30 12 18 6 0 0 0 6 0 0 9
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 42 12 30 6 0 0 0 6 0 0 15
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 30 12 18 6 0 0 0 6 0 9
+TABLE test t3 42 12 30 6 0 0 0 6 0 15
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 65
+TABLE test t1 61
TABLE test t2 0
-TABLE test t3 123
+TABLE test t3 117
connect con4, localhost, user4, , ;
select concat(current_user(), " is connected") as status;
status
@@ -631,80 +648,74 @@ connection default;
"================== Step 8 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 24
username event_name count_star
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 24
username event_name count_star
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
username event_name count_star
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 24
-user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/io/table/sql/handler 35
user2 localhost wait/lock/table/sql/handler 24
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 24
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 24
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 24
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 116
+localhost wait/io/table/sql/handler 106
localhost wait/lock/table/sql/handler 72
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 116
+wait/io/table/sql/handler 106
wait/lock/table/sql/handler 72
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 35 TABLE test t1
+wait/io/table/sql/handler 31 TABLE test t1
wait/lock/table/sql/handler 30 TABLE test t1
-wait/io/table/sql/handler 81 TABLE test t3
+wait/io/table/sql/handler 75 TABLE test t3
wait/lock/table/sql/handler 42 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 27 18 9 18 3 6 0
-TABLE test t1 index_b 2 2 0 2 0 0 0
+TABLE test t1 NULL 25 16 9 16 3 6 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 6 3 3 3 0 3 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 69 42 27 42 9 18 0
-TABLE test t3 index_b 9 9 0 9 0 0 0
+TABLE test t3 NULL 66 39 27 39 9 18 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 3 3 0 3 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 35 23 12 23 3 9 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 81 54 27 54 9 18 0
+TABLE test t1 31 19 12 19 3 9 0
+TABLE test t3 75 48 27 48 9 18 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 30 12 18 6 0 0 0 6 0 0 9
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 42 12 30 6 0 0 0 6 0 0 15
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 30 12 18 6 0 0 0 6 0 9
+TABLE test t3 42 12 30 6 0 0 0 6 0 15
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 65
+TABLE test t1 61
TABLE test t2 0
-TABLE test t3 123
+TABLE test t3 117
connection con4;
insert into test.t1 set a=401, b=1, c=1;
insert into test.t2 set a=402, b=2, c=2;
@@ -748,11 +759,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=401;
update test.t2 set d=d+1 where a=401;
update test.t3 set d=d+1 where a=401;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 4
205 5 5 3
@@ -762,80 +773,74 @@ connection default;
"================== Step 9 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 24
username event_name count_star
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 24
username event_name count_star
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
username event_name count_star
-user4 wait/io/table/sql/handler 65
+user4 wait/io/table/sql/handler 61
user4 wait/lock/table/sql/handler 24
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 24
-user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/io/table/sql/handler 35
user2 localhost wait/lock/table/sql/handler 24
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 24
-user4 localhost wait/io/table/sql/handler 65
+user4 localhost wait/io/table/sql/handler 61
user4 localhost wait/lock/table/sql/handler 24
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 24
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 24
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
-user4 wait/io/table/sql/handler 65
+user4 wait/io/table/sql/handler 61
user4 wait/lock/table/sql/handler 24
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 181
+localhost wait/io/table/sql/handler 167
localhost wait/lock/table/sql/handler 96
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 96
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 53 TABLE test t1
+wait/io/table/sql/handler 47 TABLE test t1
wait/lock/table/sql/handler 40 TABLE test t1
-wait/io/table/sql/handler 128 TABLE test t3
+wait/io/table/sql/handler 120 TABLE test t3
wait/lock/table/sql/handler 56 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 40 16 24 8 0 0 0 8 0 0 12
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 56 16 40 8 0 0 0 8 0 0 20
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 40 16 24 8 0 0 0 8 0 12
+TABLE test t3 56 16 40 8 0 0 0 8 0 20
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 93
+TABLE test t1 87
TABLE test t2 0
-TABLE test t3 184
+TABLE test t3 176
connection con1;
lock tables test.t1 read, test.t2 read, test.t3 read;
unlock tables;
@@ -845,317 +850,293 @@ connection default;
"================== Step 10 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 32
username event_name count_star
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 24
username event_name count_star
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
username event_name count_star
-user4 wait/io/table/sql/handler 65
+user4 wait/io/table/sql/handler 61
user4 wait/lock/table/sql/handler 24
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 32
-user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/io/table/sql/handler 35
user2 localhost wait/lock/table/sql/handler 24
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 24
-user4 localhost wait/io/table/sql/handler 65
+user4 localhost wait/io/table/sql/handler 61
user4 localhost wait/lock/table/sql/handler 24
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 32
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 24
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
-user4 wait/io/table/sql/handler 65
+user4 wait/io/table/sql/handler 61
user4 wait/lock/table/sql/handler 24
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 181
+localhost wait/io/table/sql/handler 167
localhost wait/lock/table/sql/handler 104
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 104
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 53 TABLE test t1
+wait/io/table/sql/handler 47 TABLE test t1
wait/lock/table/sql/handler 44 TABLE test t1
-wait/io/table/sql/handler 128 TABLE test t3
+wait/io/table/sql/handler 120 TABLE test t3
wait/lock/table/sql/handler 60 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
+TABLE test t1 91
TABLE test t2 0
-TABLE test t3 188
+TABLE test t3 180
connection default;
flush tables;
"================== flush marker =================="
"================== Step 11 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 32
username event_name count_star
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 24
username event_name count_star
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
username event_name count_star
-user4 wait/io/table/sql/handler 65
+user4 wait/io/table/sql/handler 61
user4 wait/lock/table/sql/handler 24
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 32
-user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/io/table/sql/handler 35
user2 localhost wait/lock/table/sql/handler 24
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 24
-user4 localhost wait/io/table/sql/handler 65
+user4 localhost wait/io/table/sql/handler 61
user4 localhost wait/lock/table/sql/handler 24
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 32
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 24
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
-user4 wait/io/table/sql/handler 65
+user4 wait/io/table/sql/handler 61
user4 wait/lock/table/sql/handler 24
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 181
+localhost wait/io/table/sql/handler 167
localhost wait/lock/table/sql/handler 104
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 104
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 53 TABLE test t1
+wait/io/table/sql/handler 47 TABLE test t1
wait/lock/table/sql/handler 44 TABLE test t1
-wait/io/table/sql/handler 128 TABLE test t3
+wait/io/table/sql/handler 120 TABLE test t3
wait/lock/table/sql/handler 60 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
+TABLE test t1 91
TABLE test t2 0
-TABLE test t3 188
+TABLE test t3 180
set global read_only=1;
set global read_only=0;
"================== global read_only marker =================="
"================== Step 12 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 32
username event_name count_star
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 24
username event_name count_star
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
username event_name count_star
-user4 wait/io/table/sql/handler 65
+user4 wait/io/table/sql/handler 61
user4 wait/lock/table/sql/handler 24
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 32
-user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/io/table/sql/handler 35
user2 localhost wait/lock/table/sql/handler 24
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 24
-user4 localhost wait/io/table/sql/handler 65
+user4 localhost wait/io/table/sql/handler 61
user4 localhost wait/lock/table/sql/handler 24
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 32
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 24
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
-user4 wait/io/table/sql/handler 65
+user4 wait/io/table/sql/handler 61
user4 wait/lock/table/sql/handler 24
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 181
+localhost wait/io/table/sql/handler 167
localhost wait/lock/table/sql/handler 104
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 104
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 53 TABLE test t1
+wait/io/table/sql/handler 47 TABLE test t1
wait/lock/table/sql/handler 44 TABLE test t1
-wait/io/table/sql/handler 128 TABLE test t3
+wait/io/table/sql/handler 120 TABLE test t3
wait/lock/table/sql/handler 60 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
+TABLE test t1 91
TABLE test t2 0
-TABLE test t3 188
+TABLE test t3 180
disconnect con1;
"================== Step 13 =================="
call dump_thread();
username status
user1 not found
username event_name count_star
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 24
username event_name count_star
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
username event_name count_star
-user4 wait/io/table/sql/handler 65
+user4 wait/io/table/sql/handler 61
user4 wait/lock/table/sql/handler 24
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 32
-user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/io/table/sql/handler 35
user2 localhost wait/lock/table/sql/handler 24
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 24
-user4 localhost wait/io/table/sql/handler 65
+user4 localhost wait/io/table/sql/handler 61
user4 localhost wait/lock/table/sql/handler 24
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 32
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 24
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
-user4 wait/io/table/sql/handler 65
+user4 wait/io/table/sql/handler 61
user4 wait/lock/table/sql/handler 24
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 181
+localhost wait/io/table/sql/handler 167
localhost wait/lock/table/sql/handler 104
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 104
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 53 TABLE test t1
+wait/io/table/sql/handler 47 TABLE test t1
wait/lock/table/sql/handler 44 TABLE test t1
-wait/io/table/sql/handler 128 TABLE test t3
+wait/io/table/sql/handler 120 TABLE test t3
wait/lock/table/sql/handler 60 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
+TABLE test t1 91
TABLE test t2 0
-TABLE test t3 188
+TABLE test t3 180
disconnect con2;
"================== Step 14 =================="
call dump_thread();
@@ -1164,74 +1145,68 @@ user1 not found
username status
user2 not found
username event_name count_star
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
username event_name count_star
-user4 wait/io/table/sql/handler 65
+user4 wait/io/table/sql/handler 61
user4 wait/lock/table/sql/handler 24
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 32
-user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/io/table/sql/handler 35
user2 localhost wait/lock/table/sql/handler 24
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 24
-user4 localhost wait/io/table/sql/handler 65
+user4 localhost wait/io/table/sql/handler 61
user4 localhost wait/lock/table/sql/handler 24
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 32
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 24
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
-user4 wait/io/table/sql/handler 65
+user4 wait/io/table/sql/handler 61
user4 wait/lock/table/sql/handler 24
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 181
+localhost wait/io/table/sql/handler 167
localhost wait/lock/table/sql/handler 104
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 104
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 53 TABLE test t1
+wait/io/table/sql/handler 47 TABLE test t1
wait/lock/table/sql/handler 44 TABLE test t1
-wait/io/table/sql/handler 128 TABLE test t3
+wait/io/table/sql/handler 120 TABLE test t3
wait/lock/table/sql/handler 60 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
+TABLE test t1 91
TABLE test t2 0
-TABLE test t3 188
+TABLE test t3 180
disconnect con3;
"================== Step 15 =================="
call dump_thread();
@@ -1242,71 +1217,65 @@ user2 not found
username status
user3 not found
username event_name count_star
-user4 wait/io/table/sql/handler 65
+user4 wait/io/table/sql/handler 61
user4 wait/lock/table/sql/handler 24
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 32
-user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/io/table/sql/handler 35
user2 localhost wait/lock/table/sql/handler 24
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 24
-user4 localhost wait/io/table/sql/handler 65
+user4 localhost wait/io/table/sql/handler 61
user4 localhost wait/lock/table/sql/handler 24
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 32
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 24
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
-user4 wait/io/table/sql/handler 65
+user4 wait/io/table/sql/handler 61
user4 wait/lock/table/sql/handler 24
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 181
+localhost wait/io/table/sql/handler 167
localhost wait/lock/table/sql/handler 104
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 104
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 53 TABLE test t1
+wait/io/table/sql/handler 47 TABLE test t1
wait/lock/table/sql/handler 44 TABLE test t1
-wait/io/table/sql/handler 128 TABLE test t3
+wait/io/table/sql/handler 120 TABLE test t3
wait/lock/table/sql/handler 60 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
+TABLE test t1 91
TABLE test t2 0
-TABLE test t3 188
+TABLE test t3 180
disconnect con4;
"================== Step 16 =================="
call dump_thread();
@@ -1320,67 +1289,61 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 32
-user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/io/table/sql/handler 35
user2 localhost wait/lock/table/sql/handler 24
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 24
-user4 localhost wait/io/table/sql/handler 65
+user4 localhost wait/io/table/sql/handler 61
user4 localhost wait/lock/table/sql/handler 24
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 32
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 24
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
-user4 wait/io/table/sql/handler 65
+user4 wait/io/table/sql/handler 61
user4 wait/lock/table/sql/handler 24
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 181
+localhost wait/io/table/sql/handler 167
localhost wait/lock/table/sql/handler 104
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 104
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 53 TABLE test t1
+wait/io/table/sql/handler 47 TABLE test t1
wait/lock/table/sql/handler 44 TABLE test t1
-wait/io/table/sql/handler 128 TABLE test t3
+wait/io/table/sql/handler 120 TABLE test t3
wait/lock/table/sql/handler 60 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
+TABLE test t1 91
TABLE test t2 0
-TABLE test t3 188
+TABLE test t3 180
connection default;
truncate performance_schema.events_waits_summary_by_thread_by_event_name;
"================== BY_THREAD truncated =================="
@@ -1396,67 +1359,61 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 32
-user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/io/table/sql/handler 35
user2 localhost wait/lock/table/sql/handler 24
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 24
-user4 localhost wait/io/table/sql/handler 65
+user4 localhost wait/io/table/sql/handler 61
user4 localhost wait/lock/table/sql/handler 24
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 32
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 24
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
-user4 wait/io/table/sql/handler 65
+user4 wait/io/table/sql/handler 61
user4 wait/lock/table/sql/handler 24
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 181
+localhost wait/io/table/sql/handler 167
localhost wait/lock/table/sql/handler 104
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 104
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 53 TABLE test t1
+wait/io/table/sql/handler 47 TABLE test t1
wait/lock/table/sql/handler 44 TABLE test t1
-wait/io/table/sql/handler 128 TABLE test t3
+wait/io/table/sql/handler 120 TABLE test t3
wait/lock/table/sql/handler 60 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
+TABLE test t1 91
TABLE test t2 0
-TABLE test t3 188
+TABLE test t3 180
truncate performance_schema.events_waits_summary_by_account_by_event_name;
"================== BY_ACCOUNT truncated =================="
"================== Step 18 =================="
@@ -1481,57 +1438,51 @@ user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 32
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 24
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
-user4 wait/io/table/sql/handler 65
+user4 wait/io/table/sql/handler 61
user4 wait/lock/table/sql/handler 24
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 181
+localhost wait/io/table/sql/handler 167
localhost wait/lock/table/sql/handler 104
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 104
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 53 TABLE test t1
+wait/io/table/sql/handler 47 TABLE test t1
wait/lock/table/sql/handler 44 TABLE test t1
-wait/io/table/sql/handler 128 TABLE test t3
+wait/io/table/sql/handler 120 TABLE test t3
wait/lock/table/sql/handler 60 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
+TABLE test t1 91
TABLE test t2 0
-TABLE test t3 188
+TABLE test t3 180
truncate performance_schema.events_waits_summary_by_user_by_event_name;
"================== BY_USER truncated =================="
"================== Step 19 =================="
@@ -1566,47 +1517,41 @@ user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 181
+localhost wait/io/table/sql/handler 167
localhost wait/lock/table/sql/handler 104
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 104
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 53 TABLE test t1
+wait/io/table/sql/handler 47 TABLE test t1
wait/lock/table/sql/handler 44 TABLE test t1
-wait/io/table/sql/handler 128 TABLE test t3
+wait/io/table/sql/handler 120 TABLE test t3
wait/lock/table/sql/handler 60 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
+TABLE test t1 91
TABLE test t2 0
-TABLE test t3 188
+TABLE test t3 180
truncate performance_schema.events_waits_summary_by_host_by_event_name;
"================== BY_HOST truncated =================="
"================== Step 21 =================="
@@ -1645,43 +1590,37 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 104
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 53 TABLE test t1
+wait/io/table/sql/handler 47 TABLE test t1
wait/lock/table/sql/handler 44 TABLE test t1
-wait/io/table/sql/handler 128 TABLE test t3
+wait/io/table/sql/handler 120 TABLE test t3
wait/lock/table/sql/handler 60 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
+TABLE test t1 91
TABLE test t2 0
-TABLE test t3 188
+TABLE test t3 180
truncate performance_schema.events_waits_summary_global_by_event_name;
"================== GLOBAL truncated =================="
"================== Step 21 =================="
@@ -1724,9 +1663,9 @@ wait/io/table/sql/handler 0
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 53 TABLE test t1
+wait/io/table/sql/handler 47 TABLE test t1
wait/lock/table/sql/handler 44 TABLE test t1
-wait/io/table/sql/handler 128 TABLE test t3
+wait/io/table/sql/handler 120 TABLE test t3
wait/lock/table/sql/handler 60 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
@@ -1734,10 +1673,6 @@ TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
@@ -1745,19 +1680,17 @@ TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-show status like "performance_schema%";
+show global status like "performance_schema%";
Variable_name Value
Performance_schema_accounts_lost 0
Performance_schema_cond_classes_lost 0
@@ -1767,9 +1700,15 @@ Performance_schema_file_classes_lost 0
Performance_schema_file_handles_lost 0
Performance_schema_file_instances_lost 0
Performance_schema_hosts_lost 0
+Performance_schema_index_stat_lost 0
Performance_schema_locker_lost 0
+Performance_schema_memory_classes_lost 0
+Performance_schema_metadata_lock_lost 0
Performance_schema_mutex_classes_lost 0
Performance_schema_mutex_instances_lost 0
+Performance_schema_nested_statement_lost 0
+Performance_schema_prepared_statements_lost 0
+Performance_schema_program_lost 0
Performance_schema_rwlock_classes_lost 0
Performance_schema_rwlock_instances_lost 0
Performance_schema_session_connect_attrs_lost 0
@@ -1779,6 +1718,7 @@ Performance_schema_stage_classes_lost 0
Performance_schema_statement_classes_lost 0
Performance_schema_table_handles_lost 0
Performance_schema_table_instances_lost 0
+Performance_schema_table_lock_stat_lost 0
Performance_schema_thread_classes_lost 0
Performance_schema_thread_instances_lost 0
Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/table_aggregate_hist_4u_3t.result b/mysql-test/suite/perfschema/r/table_aggregate_hist_4u_3t.result
index de8fc4702a6..c2eda2b8f23 100644
--- a/mysql-test/suite/perfschema/r/table_aggregate_hist_4u_3t.result
+++ b/mysql-test/suite/perfschema/r/table_aggregate_hist_4u_3t.result
@@ -1,10 +1,10 @@
select * from performance_schema.setup_actors
order by USER, HOST, ROLE;
-HOST USER ROLE
-localhost user1 %
-localhost user2 %
-localhost user3 %
-localhost user4 %
+HOST USER ROLE ENABLED HISTORY
+localhost user1 % YES YES
+localhost user2 % YES YES
+localhost user3 % YES YES
+localhost user4 % YES YES
select * from performance_schema.setup_objects
order by object_type, object_schema, object_name;
OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
@@ -19,6 +19,9 @@ events_stages_history_long YES
events_statements_current YES
events_statements_history YES
events_statements_history_long YES
+events_transactions_current YES
+events_transactions_history YES
+events_transactions_history_long YES
events_waits_current YES
events_waits_history YES
events_waits_history_long YES
@@ -62,15 +65,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -80,10 +80,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -125,15 +125,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -143,10 +140,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -177,18 +174,86 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=101;
update test.t2 set d=d+1 where a=101;
update test.t3 set d=d+1 where a=101;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 1
connection default;
-"================== Step 3 =================="
+"================== Step 3-A =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 33
+user1 wait/lock/table/sql/handler 36
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 33
+user1 localhost wait/lock/table/sql/handler 36
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 33
+user1 wait/lock/table/sql/handler 36
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 33
+localhost wait/lock/table/sql/handler 36
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 33
+wait/lock/table/sql/handler 36
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 8 TABLE test t1
+wait/lock/table/sql/handler 10 TABLE test t1
+wait/io/table/sql/handler 10 TABLE test t2
+wait/lock/table/sql/handler 12 TABLE test t2
+wait/io/table/sql/handler 15 TABLE test t3
+wait/lock/table/sql/handler 14 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t2 NULL 9 5 4 5 2 2 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 1 1 0 1 0 0 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t2 10 6 4 6 2 2 0
+TABLE test t3 15 9 6 9 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t2 12 4 8 2 0 0 0 2 0 4
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 18
+TABLE test t2 22
+TABLE test t3 29
+connection con1;
+flush tables;
+"================== con1 FLUSH =================="
+connection default;
+"================== Step 3-B =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 36
username status
user2 not found
@@ -198,27 +263,27 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 36
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 36
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 37
+localhost wait/io/table/sql/handler 33
localhost wait/lock/table/sql/handler 36
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 37
+wait/io/table/sql/handler 33
wait/lock/table/sql/handler 36
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
wait/io/table/sql/handler 8 TABLE test t1
wait/lock/table/sql/handler 10 TABLE test t1
-wait/io/table/sql/handler 12 TABLE test t2
+wait/io/table/sql/handler 10 TABLE test t2
wait/lock/table/sql/handler 12 TABLE test t2
-wait/io/table/sql/handler 17 TABLE test t3
+wait/io/table/sql/handler 15 TABLE test t3
wait/lock/table/sql/handler 14 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
@@ -226,29 +291,29 @@ TABLE test t1 NULL 6 4 2 4 1 1 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 2 1 1 1 0 1 0
-TABLE test t2 NULL 10 6 4 6 2 2 0
-TABLE test t2 index_b 1 1 0 1 0 0 0
+TABLE test t2 NULL 9 5 4 5 2 2 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 1 1 0 1 0 0 0
-TABLE test t3 NULL 14 8 6 8 3 3 0
-TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 1 1 0 1 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 8 5 3 5 1 2 0
-TABLE test t2 12 8 4 8 2 2 0
-TABLE test t3 17 11 6 11 3 3 0
+TABLE test t2 10 6 4 6 2 2 0
+TABLE test t3 15 9 6 9 3 3 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
-TABLE test t2 12 4 8 2 0 0 0 2 0 0 4
-TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t2 12 4 8 2 0 0 0 2 0 4
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 18
-TABLE test t2 24
-TABLE test t3 31
+TABLE test t2 22
+TABLE test t3 29
connect con2, localhost, user2, , ;
select concat(current_user(), " is connected") as status;
status
@@ -257,7 +322,7 @@ connection default;
"================== Step 4 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 36
username event_name count_star
user2 wait/io/table/sql/handler 0
@@ -268,31 +333,31 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 36
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 36
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 37
+localhost wait/io/table/sql/handler 33
localhost wait/lock/table/sql/handler 36
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 37
+wait/io/table/sql/handler 33
wait/lock/table/sql/handler 36
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
wait/io/table/sql/handler 8 TABLE test t1
wait/lock/table/sql/handler 10 TABLE test t1
-wait/io/table/sql/handler 12 TABLE test t2
+wait/io/table/sql/handler 10 TABLE test t2
wait/lock/table/sql/handler 12 TABLE test t2
-wait/io/table/sql/handler 17 TABLE test t3
+wait/io/table/sql/handler 15 TABLE test t3
wait/lock/table/sql/handler 14 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
@@ -300,29 +365,29 @@ TABLE test t1 NULL 6 4 2 4 1 1 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 2 1 1 1 0 1 0
-TABLE test t2 NULL 10 6 4 6 2 2 0
-TABLE test t2 index_b 1 1 0 1 0 0 0
+TABLE test t2 NULL 9 5 4 5 2 2 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 1 1 0 1 0 0 0
-TABLE test t3 NULL 14 8 6 8 3 3 0
-TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 1 1 0 1 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 8 5 3 5 1 2 0
-TABLE test t2 12 8 4 8 2 2 0
-TABLE test t3 17 11 6 11 3 3 0
+TABLE test t2 10 6 4 6 2 2 0
+TABLE test t3 15 9 6 9 3 3 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
-TABLE test t2 12 4 8 2 0 0 0 2 0 0 4
-TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t2 12 4 8 2 0 0 0 2 0 4
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 18
-TABLE test t2 24
-TABLE test t3 31
+TABLE test t2 22
+TABLE test t3 29
connection con2;
insert into test.t1 set a=201, b=1, c=1;
insert into test.t2 set a=202, b=2, c=2;
@@ -354,11 +419,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=201;
update test.t2 set d=d+1 where a=201;
update test.t3 set d=d+1 where a=201;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 2
205 5 5 1
@@ -366,10 +431,10 @@ connection default;
"================== Step 5 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 36
username event_name count_star
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 36
username status
user3 not found
@@ -377,61 +442,61 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 36
-user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/io/table/sql/handler 51
user2 localhost wait/lock/table/sql/handler 36
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 36
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 36
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 94
+localhost wait/io/table/sql/handler 84
localhost wait/lock/table/sql/handler 72
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 94
+wait/io/table/sql/handler 84
wait/lock/table/sql/handler 72
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 20 TABLE test t1
+wait/io/table/sql/handler 18 TABLE test t1
wait/lock/table/sql/handler 20 TABLE test t1
-wait/io/table/sql/handler 30 TABLE test t2
+wait/io/table/sql/handler 26 TABLE test t2
wait/lock/table/sql/handler 24 TABLE test t2
-wait/io/table/sql/handler 44 TABLE test t3
+wait/io/table/sql/handler 40 TABLE test t3
wait/lock/table/sql/handler 28 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 15 10 5 10 2 3 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 14 9 5 9 2 3 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 26 16 10 16 4 6 0
-TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 NULL 24 14 10 14 4 6 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 2 2 0 2 0 0 0
-TABLE test t3 NULL 37 22 15 22 6 9 0
-TABLE test t3 index_b 5 5 0 5 0 0 0
+TABLE test t3 NULL 35 20 15 20 6 9 0
+TABLE test t3 index_b 3 3 0 3 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 20 13 7 13 2 5 0
-TABLE test t2 30 20 10 20 4 6 0
-TABLE test t3 44 29 15 29 6 9 0
+TABLE test t1 18 11 7 11 2 5 0
+TABLE test t2 26 16 10 16 4 6 0
+TABLE test t3 40 25 15 25 6 9 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
-TABLE test t2 24 8 16 4 0 0 0 4 0 0 8
-TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 6
+TABLE test t2 24 8 16 4 0 0 0 4 0 8
+TABLE test t3 28 8 20 4 0 0 0 4 0 10
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 40
-TABLE test t2 54
-TABLE test t3 72
+TABLE test t1 38
+TABLE test t2 50
+TABLE test t3 68
connect con3, localhost, user3, , ;
select concat(current_user(), " is connected") as status;
status
@@ -440,10 +505,10 @@ connection default;
"================== Step 6 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 36
username event_name count_star
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 36
username event_name count_star
user3 wait/io/table/sql/handler 0
@@ -452,65 +517,65 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 36
-user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/io/table/sql/handler 51
user2 localhost wait/lock/table/sql/handler 36
user3 localhost wait/io/table/sql/handler 0
user3 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 36
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 36
user3 wait/io/table/sql/handler 0
user3 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 94
+localhost wait/io/table/sql/handler 84
localhost wait/lock/table/sql/handler 72
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 94
+wait/io/table/sql/handler 84
wait/lock/table/sql/handler 72
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 20 TABLE test t1
+wait/io/table/sql/handler 18 TABLE test t1
wait/lock/table/sql/handler 20 TABLE test t1
-wait/io/table/sql/handler 30 TABLE test t2
+wait/io/table/sql/handler 26 TABLE test t2
wait/lock/table/sql/handler 24 TABLE test t2
-wait/io/table/sql/handler 44 TABLE test t3
+wait/io/table/sql/handler 40 TABLE test t3
wait/lock/table/sql/handler 28 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 15 10 5 10 2 3 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 14 9 5 9 2 3 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 26 16 10 16 4 6 0
-TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 NULL 24 14 10 14 4 6 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 2 2 0 2 0 0 0
-TABLE test t3 NULL 37 22 15 22 6 9 0
-TABLE test t3 index_b 5 5 0 5 0 0 0
+TABLE test t3 NULL 35 20 15 20 6 9 0
+TABLE test t3 index_b 3 3 0 3 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 20 13 7 13 2 5 0
-TABLE test t2 30 20 10 20 4 6 0
-TABLE test t3 44 29 15 29 6 9 0
+TABLE test t1 18 11 7 11 2 5 0
+TABLE test t2 26 16 10 16 4 6 0
+TABLE test t3 40 25 15 25 6 9 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
-TABLE test t2 24 8 16 4 0 0 0 4 0 0 8
-TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 6
+TABLE test t2 24 8 16 4 0 0 0 4 0 8
+TABLE test t3 28 8 20 4 0 0 0 4 0 10
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 40
-TABLE test t2 54
-TABLE test t3 72
+TABLE test t1 38
+TABLE test t2 50
+TABLE test t3 68
connection con3;
insert into test.t1 set a=301, b=1, c=1;
insert into test.t2 set a=302, b=2, c=2;
@@ -548,11 +613,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=301;
update test.t2 set d=d+1 where a=301;
update test.t3 set d=d+1 where a=301;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 3
205 5 5 2
@@ -561,77 +626,77 @@ connection default;
"================== Step 7 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 36
username event_name count_star
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 36
username event_name count_star
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 36
-user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/io/table/sql/handler 51
user2 localhost wait/lock/table/sql/handler 36
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 36
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 36
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 36
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 170
+localhost wait/io/table/sql/handler 154
localhost wait/lock/table/sql/handler 108
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 170
+wait/io/table/sql/handler 154
wait/lock/table/sql/handler 108
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 35 TABLE test t1
+wait/io/table/sql/handler 31 TABLE test t1
wait/lock/table/sql/handler 30 TABLE test t1
-wait/io/table/sql/handler 54 TABLE test t2
+wait/io/table/sql/handler 48 TABLE test t2
wait/lock/table/sql/handler 36 TABLE test t2
-wait/io/table/sql/handler 81 TABLE test t3
+wait/io/table/sql/handler 75 TABLE test t3
wait/lock/table/sql/handler 42 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 27 18 9 18 3 6 0
-TABLE test t1 index_b 2 2 0 2 0 0 0
+TABLE test t1 NULL 25 16 9 16 3 6 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 6 3 3 3 0 3 0
-TABLE test t2 NULL 48 30 18 30 6 12 0
-TABLE test t2 index_b 3 3 0 3 0 0 0
+TABLE test t2 NULL 45 27 18 27 6 12 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 3 3 0 3 0 0 0
-TABLE test t3 NULL 69 42 27 42 9 18 0
-TABLE test t3 index_b 9 9 0 9 0 0 0
+TABLE test t3 NULL 66 39 27 39 9 18 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 3 3 0 3 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 35 23 12 23 3 9 0
-TABLE test t2 54 36 18 36 6 12 0
-TABLE test t3 81 54 27 54 9 18 0
+TABLE test t1 31 19 12 19 3 9 0
+TABLE test t2 48 30 18 30 6 12 0
+TABLE test t3 75 48 27 48 9 18 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 30 12 18 6 0 0 0 6 0 0 9
-TABLE test t2 36 12 24 6 0 0 0 6 0 0 12
-TABLE test t3 42 12 30 6 0 0 0 6 0 0 15
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 30 12 18 6 0 0 0 6 0 9
+TABLE test t2 36 12 24 6 0 0 0 6 0 12
+TABLE test t3 42 12 30 6 0 0 0 6 0 15
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 65
-TABLE test t2 90
-TABLE test t3 123
+TABLE test t1 61
+TABLE test t2 84
+TABLE test t3 117
connect con4, localhost, user4, , ;
select concat(current_user(), " is connected") as status;
status
@@ -640,82 +705,82 @@ connection default;
"================== Step 8 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 36
username event_name count_star
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 36
username event_name count_star
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
username event_name count_star
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 36
-user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/io/table/sql/handler 51
user2 localhost wait/lock/table/sql/handler 36
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 36
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 36
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 36
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 170
+localhost wait/io/table/sql/handler 154
localhost wait/lock/table/sql/handler 108
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 170
+wait/io/table/sql/handler 154
wait/lock/table/sql/handler 108
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 35 TABLE test t1
+wait/io/table/sql/handler 31 TABLE test t1
wait/lock/table/sql/handler 30 TABLE test t1
-wait/io/table/sql/handler 54 TABLE test t2
+wait/io/table/sql/handler 48 TABLE test t2
wait/lock/table/sql/handler 36 TABLE test t2
-wait/io/table/sql/handler 81 TABLE test t3
+wait/io/table/sql/handler 75 TABLE test t3
wait/lock/table/sql/handler 42 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 27 18 9 18 3 6 0
-TABLE test t1 index_b 2 2 0 2 0 0 0
+TABLE test t1 NULL 25 16 9 16 3 6 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 6 3 3 3 0 3 0
-TABLE test t2 NULL 48 30 18 30 6 12 0
-TABLE test t2 index_b 3 3 0 3 0 0 0
+TABLE test t2 NULL 45 27 18 27 6 12 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 3 3 0 3 0 0 0
-TABLE test t3 NULL 69 42 27 42 9 18 0
-TABLE test t3 index_b 9 9 0 9 0 0 0
+TABLE test t3 NULL 66 39 27 39 9 18 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 3 3 0 3 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 35 23 12 23 3 9 0
-TABLE test t2 54 36 18 36 6 12 0
-TABLE test t3 81 54 27 54 9 18 0
+TABLE test t1 31 19 12 19 3 9 0
+TABLE test t2 48 30 18 30 6 12 0
+TABLE test t3 75 48 27 48 9 18 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 30 12 18 6 0 0 0 6 0 0 9
-TABLE test t2 36 12 24 6 0 0 0 6 0 0 12
-TABLE test t3 42 12 30 6 0 0 0 6 0 0 15
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 30 12 18 6 0 0 0 6 0 9
+TABLE test t2 36 12 24 6 0 0 0 6 0 12
+TABLE test t3 42 12 30 6 0 0 0 6 0 15
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 65
-TABLE test t2 90
-TABLE test t3 123
+TABLE test t1 61
+TABLE test t2 84
+TABLE test t3 117
connection con4;
insert into test.t1 set a=401, b=1, c=1;
insert into test.t2 set a=402, b=2, c=2;
@@ -759,11 +824,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=401;
update test.t2 set d=d+1 where a=401;
update test.t3 set d=d+1 where a=401;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 4
205 5 5 3
@@ -773,82 +838,82 @@ connection default;
"================== Step 9 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 36
username event_name count_star
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 36
username event_name count_star
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
username event_name count_star
-user4 wait/io/table/sql/handler 95
+user4 wait/io/table/sql/handler 89
user4 wait/lock/table/sql/handler 36
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 36
-user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/io/table/sql/handler 51
user2 localhost wait/lock/table/sql/handler 36
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 36
-user4 localhost wait/io/table/sql/handler 95
+user4 localhost wait/io/table/sql/handler 89
user4 localhost wait/lock/table/sql/handler 36
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 36
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 36
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
-user4 wait/io/table/sql/handler 95
+user4 wait/io/table/sql/handler 89
user4 wait/lock/table/sql/handler 36
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 265
+localhost wait/io/table/sql/handler 243
localhost wait/lock/table/sql/handler 144
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 144
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 53 TABLE test t1
+wait/io/table/sql/handler 47 TABLE test t1
wait/lock/table/sql/handler 40 TABLE test t1
-wait/io/table/sql/handler 84 TABLE test t2
+wait/io/table/sql/handler 76 TABLE test t2
wait/lock/table/sql/handler 48 TABLE test t2
-wait/io/table/sql/handler 128 TABLE test t3
+wait/io/table/sql/handler 120 TABLE test t3
wait/lock/table/sql/handler 56 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 40 16 24 8 0 0 0 8 0 0 12
-TABLE test t2 48 16 32 8 0 0 0 8 0 0 16
-TABLE test t3 56 16 40 8 0 0 0 8 0 0 20
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 40 16 24 8 0 0 0 8 0 12
+TABLE test t2 48 16 32 8 0 0 0 8 0 16
+TABLE test t3 56 16 40 8 0 0 0 8 0 20
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 93
-TABLE test t2 132
-TABLE test t3 184
+TABLE test t1 87
+TABLE test t2 124
+TABLE test t3 176
connection con1;
lock tables test.t1 read, test.t2 read, test.t3 read;
unlock tables;
@@ -858,325 +923,325 @@ connection default;
"================== Step 10 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 48
username event_name count_star
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 36
username event_name count_star
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
username event_name count_star
-user4 wait/io/table/sql/handler 95
+user4 wait/io/table/sql/handler 89
user4 wait/lock/table/sql/handler 36
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 48
-user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/io/table/sql/handler 51
user2 localhost wait/lock/table/sql/handler 36
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 36
-user4 localhost wait/io/table/sql/handler 95
+user4 localhost wait/io/table/sql/handler 89
user4 localhost wait/lock/table/sql/handler 36
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 48
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 36
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
-user4 wait/io/table/sql/handler 95
+user4 wait/io/table/sql/handler 89
user4 wait/lock/table/sql/handler 36
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 265
+localhost wait/io/table/sql/handler 243
localhost wait/lock/table/sql/handler 156
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 156
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 53 TABLE test t1
+wait/io/table/sql/handler 47 TABLE test t1
wait/lock/table/sql/handler 44 TABLE test t1
-wait/io/table/sql/handler 84 TABLE test t2
+wait/io/table/sql/handler 76 TABLE test t2
wait/lock/table/sql/handler 52 TABLE test t2
-wait/io/table/sql/handler 128 TABLE test t3
+wait/io/table/sql/handler 120 TABLE test t3
wait/lock/table/sql/handler 60 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
-TABLE test t2 136
-TABLE test t3 188
+TABLE test t1 91
+TABLE test t2 128
+TABLE test t3 180
connection default;
flush tables;
"================== flush marker =================="
"================== Step 11 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 48
username event_name count_star
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 36
username event_name count_star
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
username event_name count_star
-user4 wait/io/table/sql/handler 95
+user4 wait/io/table/sql/handler 89
user4 wait/lock/table/sql/handler 36
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 48
-user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/io/table/sql/handler 51
user2 localhost wait/lock/table/sql/handler 36
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 36
-user4 localhost wait/io/table/sql/handler 95
+user4 localhost wait/io/table/sql/handler 89
user4 localhost wait/lock/table/sql/handler 36
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 48
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 36
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
-user4 wait/io/table/sql/handler 95
+user4 wait/io/table/sql/handler 89
user4 wait/lock/table/sql/handler 36
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 265
+localhost wait/io/table/sql/handler 243
localhost wait/lock/table/sql/handler 156
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 156
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 53 TABLE test t1
+wait/io/table/sql/handler 47 TABLE test t1
wait/lock/table/sql/handler 44 TABLE test t1
-wait/io/table/sql/handler 84 TABLE test t2
+wait/io/table/sql/handler 76 TABLE test t2
wait/lock/table/sql/handler 52 TABLE test t2
-wait/io/table/sql/handler 128 TABLE test t3
+wait/io/table/sql/handler 120 TABLE test t3
wait/lock/table/sql/handler 60 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
-TABLE test t2 136
-TABLE test t3 188
+TABLE test t1 91
+TABLE test t2 128
+TABLE test t3 180
set global read_only=1;
set global read_only=0;
"================== global read_only marker =================="
"================== Step 12 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 48
username event_name count_star
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 36
username event_name count_star
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
username event_name count_star
-user4 wait/io/table/sql/handler 95
+user4 wait/io/table/sql/handler 89
user4 wait/lock/table/sql/handler 36
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 48
-user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/io/table/sql/handler 51
user2 localhost wait/lock/table/sql/handler 36
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 36
-user4 localhost wait/io/table/sql/handler 95
+user4 localhost wait/io/table/sql/handler 89
user4 localhost wait/lock/table/sql/handler 36
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 48
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 36
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
-user4 wait/io/table/sql/handler 95
+user4 wait/io/table/sql/handler 89
user4 wait/lock/table/sql/handler 36
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 265
+localhost wait/io/table/sql/handler 243
localhost wait/lock/table/sql/handler 156
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 156
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 53 TABLE test t1
+wait/io/table/sql/handler 47 TABLE test t1
wait/lock/table/sql/handler 44 TABLE test t1
-wait/io/table/sql/handler 84 TABLE test t2
+wait/io/table/sql/handler 76 TABLE test t2
wait/lock/table/sql/handler 52 TABLE test t2
-wait/io/table/sql/handler 128 TABLE test t3
+wait/io/table/sql/handler 120 TABLE test t3
wait/lock/table/sql/handler 60 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
-TABLE test t2 136
-TABLE test t3 188
+TABLE test t1 91
+TABLE test t2 128
+TABLE test t3 180
disconnect con1;
"================== Step 13 =================="
call dump_thread();
username status
user1 not found
username event_name count_star
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 36
username event_name count_star
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
username event_name count_star
-user4 wait/io/table/sql/handler 95
+user4 wait/io/table/sql/handler 89
user4 wait/lock/table/sql/handler 36
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 48
-user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/io/table/sql/handler 51
user2 localhost wait/lock/table/sql/handler 36
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 36
-user4 localhost wait/io/table/sql/handler 95
+user4 localhost wait/io/table/sql/handler 89
user4 localhost wait/lock/table/sql/handler 36
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 48
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 36
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
-user4 wait/io/table/sql/handler 95
+user4 wait/io/table/sql/handler 89
user4 wait/lock/table/sql/handler 36
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 265
+localhost wait/io/table/sql/handler 243
localhost wait/lock/table/sql/handler 156
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 156
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 53 TABLE test t1
+wait/io/table/sql/handler 47 TABLE test t1
wait/lock/table/sql/handler 44 TABLE test t1
-wait/io/table/sql/handler 84 TABLE test t2
+wait/io/table/sql/handler 76 TABLE test t2
wait/lock/table/sql/handler 52 TABLE test t2
-wait/io/table/sql/handler 128 TABLE test t3
+wait/io/table/sql/handler 120 TABLE test t3
wait/lock/table/sql/handler 60 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
-TABLE test t2 136
-TABLE test t3 188
+TABLE test t1 91
+TABLE test t2 128
+TABLE test t3 180
disconnect con2;
"================== Step 14 =================="
call dump_thread();
@@ -1185,76 +1250,76 @@ user1 not found
username status
user2 not found
username event_name count_star
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
username event_name count_star
-user4 wait/io/table/sql/handler 95
+user4 wait/io/table/sql/handler 89
user4 wait/lock/table/sql/handler 36
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 48
-user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/io/table/sql/handler 51
user2 localhost wait/lock/table/sql/handler 36
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 36
-user4 localhost wait/io/table/sql/handler 95
+user4 localhost wait/io/table/sql/handler 89
user4 localhost wait/lock/table/sql/handler 36
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 48
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 36
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
-user4 wait/io/table/sql/handler 95
+user4 wait/io/table/sql/handler 89
user4 wait/lock/table/sql/handler 36
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 265
+localhost wait/io/table/sql/handler 243
localhost wait/lock/table/sql/handler 156
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 156
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 53 TABLE test t1
+wait/io/table/sql/handler 47 TABLE test t1
wait/lock/table/sql/handler 44 TABLE test t1
-wait/io/table/sql/handler 84 TABLE test t2
+wait/io/table/sql/handler 76 TABLE test t2
wait/lock/table/sql/handler 52 TABLE test t2
-wait/io/table/sql/handler 128 TABLE test t3
+wait/io/table/sql/handler 120 TABLE test t3
wait/lock/table/sql/handler 60 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
-TABLE test t2 136
-TABLE test t3 188
+TABLE test t1 91
+TABLE test t2 128
+TABLE test t3 180
disconnect con3;
"================== Step 15 =================="
call dump_thread();
@@ -1265,73 +1330,73 @@ user2 not found
username status
user3 not found
username event_name count_star
-user4 wait/io/table/sql/handler 95
+user4 wait/io/table/sql/handler 89
user4 wait/lock/table/sql/handler 36
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 48
-user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/io/table/sql/handler 51
user2 localhost wait/lock/table/sql/handler 36
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 36
-user4 localhost wait/io/table/sql/handler 95
+user4 localhost wait/io/table/sql/handler 89
user4 localhost wait/lock/table/sql/handler 36
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 48
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 36
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
-user4 wait/io/table/sql/handler 95
+user4 wait/io/table/sql/handler 89
user4 wait/lock/table/sql/handler 36
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 265
+localhost wait/io/table/sql/handler 243
localhost wait/lock/table/sql/handler 156
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 156
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 53 TABLE test t1
+wait/io/table/sql/handler 47 TABLE test t1
wait/lock/table/sql/handler 44 TABLE test t1
-wait/io/table/sql/handler 84 TABLE test t2
+wait/io/table/sql/handler 76 TABLE test t2
wait/lock/table/sql/handler 52 TABLE test t2
-wait/io/table/sql/handler 128 TABLE test t3
+wait/io/table/sql/handler 120 TABLE test t3
wait/lock/table/sql/handler 60 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
-TABLE test t2 136
-TABLE test t3 188
+TABLE test t1 91
+TABLE test t2 128
+TABLE test t3 180
disconnect con4;
"================== Step 16 =================="
call dump_thread();
@@ -1345,69 +1410,69 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 48
-user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/io/table/sql/handler 51
user2 localhost wait/lock/table/sql/handler 36
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 36
-user4 localhost wait/io/table/sql/handler 95
+user4 localhost wait/io/table/sql/handler 89
user4 localhost wait/lock/table/sql/handler 36
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 48
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 36
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
-user4 wait/io/table/sql/handler 95
+user4 wait/io/table/sql/handler 89
user4 wait/lock/table/sql/handler 36
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 265
+localhost wait/io/table/sql/handler 243
localhost wait/lock/table/sql/handler 156
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 156
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 53 TABLE test t1
+wait/io/table/sql/handler 47 TABLE test t1
wait/lock/table/sql/handler 44 TABLE test t1
-wait/io/table/sql/handler 84 TABLE test t2
+wait/io/table/sql/handler 76 TABLE test t2
wait/lock/table/sql/handler 52 TABLE test t2
-wait/io/table/sql/handler 128 TABLE test t3
+wait/io/table/sql/handler 120 TABLE test t3
wait/lock/table/sql/handler 60 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
-TABLE test t2 136
-TABLE test t3 188
+TABLE test t1 91
+TABLE test t2 128
+TABLE test t3 180
connection default;
truncate performance_schema.events_waits_summary_by_thread_by_event_name;
"================== BY_THREAD truncated =================="
@@ -1423,69 +1488,69 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 48
-user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/io/table/sql/handler 51
user2 localhost wait/lock/table/sql/handler 36
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 36
-user4 localhost wait/io/table/sql/handler 95
+user4 localhost wait/io/table/sql/handler 89
user4 localhost wait/lock/table/sql/handler 36
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 48
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 36
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
-user4 wait/io/table/sql/handler 95
+user4 wait/io/table/sql/handler 89
user4 wait/lock/table/sql/handler 36
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 265
+localhost wait/io/table/sql/handler 243
localhost wait/lock/table/sql/handler 156
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 156
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 53 TABLE test t1
+wait/io/table/sql/handler 47 TABLE test t1
wait/lock/table/sql/handler 44 TABLE test t1
-wait/io/table/sql/handler 84 TABLE test t2
+wait/io/table/sql/handler 76 TABLE test t2
wait/lock/table/sql/handler 52 TABLE test t2
-wait/io/table/sql/handler 128 TABLE test t3
+wait/io/table/sql/handler 120 TABLE test t3
wait/lock/table/sql/handler 60 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
-TABLE test t2 136
-TABLE test t3 188
+TABLE test t1 91
+TABLE test t2 128
+TABLE test t3 180
truncate performance_schema.events_waits_summary_by_account_by_event_name;
"================== BY_ACCOUNT truncated =================="
"================== Step 18 =================="
@@ -1510,59 +1575,59 @@ user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 48
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 36
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
-user4 wait/io/table/sql/handler 95
+user4 wait/io/table/sql/handler 89
user4 wait/lock/table/sql/handler 36
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 265
+localhost wait/io/table/sql/handler 243
localhost wait/lock/table/sql/handler 156
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 156
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 53 TABLE test t1
+wait/io/table/sql/handler 47 TABLE test t1
wait/lock/table/sql/handler 44 TABLE test t1
-wait/io/table/sql/handler 84 TABLE test t2
+wait/io/table/sql/handler 76 TABLE test t2
wait/lock/table/sql/handler 52 TABLE test t2
-wait/io/table/sql/handler 128 TABLE test t3
+wait/io/table/sql/handler 120 TABLE test t3
wait/lock/table/sql/handler 60 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
-TABLE test t2 136
-TABLE test t3 188
+TABLE test t1 91
+TABLE test t2 128
+TABLE test t3 180
truncate performance_schema.events_waits_summary_by_user_by_event_name;
"================== BY_USER truncated =================="
"================== Step 19 =================="
@@ -1597,49 +1662,49 @@ user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 265
+localhost wait/io/table/sql/handler 243
localhost wait/lock/table/sql/handler 156
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 156
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 53 TABLE test t1
+wait/io/table/sql/handler 47 TABLE test t1
wait/lock/table/sql/handler 44 TABLE test t1
-wait/io/table/sql/handler 84 TABLE test t2
+wait/io/table/sql/handler 76 TABLE test t2
wait/lock/table/sql/handler 52 TABLE test t2
-wait/io/table/sql/handler 128 TABLE test t3
+wait/io/table/sql/handler 120 TABLE test t3
wait/lock/table/sql/handler 60 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
-TABLE test t2 136
-TABLE test t3 188
+TABLE test t1 91
+TABLE test t2 128
+TABLE test t3 180
truncate performance_schema.events_waits_summary_by_host_by_event_name;
"================== BY_HOST truncated =================="
"================== Step 21 =================="
@@ -1678,45 +1743,45 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 156
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 53 TABLE test t1
+wait/io/table/sql/handler 47 TABLE test t1
wait/lock/table/sql/handler 44 TABLE test t1
-wait/io/table/sql/handler 84 TABLE test t2
+wait/io/table/sql/handler 76 TABLE test t2
wait/lock/table/sql/handler 52 TABLE test t2
-wait/io/table/sql/handler 128 TABLE test t3
+wait/io/table/sql/handler 120 TABLE test t3
wait/lock/table/sql/handler 60 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
-TABLE test t2 136
-TABLE test t3 188
+TABLE test t1 91
+TABLE test t2 128
+TABLE test t3 180
truncate performance_schema.events_waits_summary_global_by_event_name;
"================== GLOBAL truncated =================="
"================== Step 21 =================="
@@ -1759,11 +1824,11 @@ wait/io/table/sql/handler 0
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 53 TABLE test t1
+wait/io/table/sql/handler 47 TABLE test t1
wait/lock/table/sql/handler 44 TABLE test t1
-wait/io/table/sql/handler 84 TABLE test t2
+wait/io/table/sql/handler 76 TABLE test t2
wait/lock/table/sql/handler 52 TABLE test t2
-wait/io/table/sql/handler 128 TABLE test t3
+wait/io/table/sql/handler 120 TABLE test t3
wait/lock/table/sql/handler 60 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
@@ -1785,16 +1850,16 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-show status like "performance_schema%";
+show global status like "performance_schema%";
Variable_name Value
Performance_schema_accounts_lost 0
Performance_schema_cond_classes_lost 0
@@ -1804,9 +1869,15 @@ Performance_schema_file_classes_lost 0
Performance_schema_file_handles_lost 0
Performance_schema_file_instances_lost 0
Performance_schema_hosts_lost 0
+Performance_schema_index_stat_lost 0
Performance_schema_locker_lost 0
+Performance_schema_memory_classes_lost 0
+Performance_schema_metadata_lock_lost 0
Performance_schema_mutex_classes_lost 0
Performance_schema_mutex_instances_lost 0
+Performance_schema_nested_statement_lost 0
+Performance_schema_prepared_statements_lost 0
+Performance_schema_program_lost 0
Performance_schema_rwlock_classes_lost 0
Performance_schema_rwlock_instances_lost 0
Performance_schema_session_connect_attrs_lost 0
@@ -1816,6 +1887,7 @@ Performance_schema_stage_classes_lost 0
Performance_schema_statement_classes_lost 0
Performance_schema_table_handles_lost 0
Performance_schema_table_instances_lost 0
+Performance_schema_table_lock_stat_lost 0
Performance_schema_thread_classes_lost 0
Performance_schema_thread_instances_lost 0
Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/table_aggregate_off.result b/mysql-test/suite/perfschema/r/table_aggregate_off.result
index 77a714563fe..22fd9f9daf5 100644
--- a/mysql-test/suite/perfschema/r/table_aggregate_off.result
+++ b/mysql-test/suite/perfschema/r/table_aggregate_off.result
@@ -2,11 +2,11 @@ update performance_schema.setup_consumers
set enabled='NO' where name='global_instrumentation';
select * from performance_schema.setup_actors
order by USER, HOST, ROLE;
-HOST USER ROLE
-localhost user1 %
-localhost user2 %
-localhost user3 %
-localhost user4 %
+HOST USER ROLE ENABLED HISTORY
+localhost user1 % YES YES
+localhost user2 % YES YES
+localhost user3 % YES YES
+localhost user4 % YES YES
select * from performance_schema.setup_objects
order by object_type, object_schema, object_name;
OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
@@ -21,6 +21,9 @@ events_stages_history_long YES
events_statements_current YES
events_statements_history YES
events_statements_history_long YES
+events_transactions_current YES
+events_transactions_history YES
+events_transactions_history_long YES
events_waits_current YES
events_waits_history YES
events_waits_history_long YES
@@ -64,15 +67,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -82,10 +82,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -127,15 +127,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -145,10 +142,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -179,15 +176,15 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=101;
update test.t2 set d=d+1 where a=101;
update test.t3 set d=d+1 where a=101;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 1
connection default;
-"================== Step 3 =================="
+"================== Step 3-A =================="
call dump_thread();
username event_name count_star
user1 wait/io/table/sql/handler 0
@@ -218,15 +215,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -236,10 +230,69 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+connection con1;
+flush tables;
+"================== con1 FLUSH =================="
+connection default;
+"================== Step 3-B =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -286,15 +339,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -304,10 +354,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -344,11 +394,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=201;
update test.t2 set d=d+1 where a=201;
update test.t3 set d=d+1 where a=201;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 2
205 5 5 1
@@ -389,15 +439,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -407,10 +454,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -462,15 +509,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -480,10 +524,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -526,11 +570,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=301;
update test.t2 set d=d+1 where a=301;
update test.t3 set d=d+1 where a=301;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 3
205 5 5 2
@@ -577,15 +621,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -595,10 +636,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -655,15 +696,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -673,10 +711,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -725,11 +763,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=401;
update test.t2 set d=d+1 where a=401;
update test.t3 set d=d+1 where a=401;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 4
205 5 5 3
@@ -782,15 +820,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -800,10 +835,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -861,15 +896,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -879,10 +911,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -937,15 +969,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -955,10 +984,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -1013,15 +1042,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -1031,10 +1057,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -1086,15 +1112,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -1104,10 +1127,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -1158,15 +1181,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -1176,10 +1196,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -1229,15 +1249,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -1247,10 +1264,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -1299,15 +1316,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -1317,10 +1331,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -1371,15 +1385,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -1389,10 +1400,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -1442,15 +1453,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -1460,10 +1468,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -1513,15 +1521,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -1531,10 +1536,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -1584,15 +1589,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -1602,10 +1604,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -1655,15 +1657,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -1673,16 +1672,16 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-show status like "performance_schema%";
+show global status like "performance_schema%";
Variable_name Value
Performance_schema_accounts_lost 0
Performance_schema_cond_classes_lost 0
@@ -1692,9 +1691,15 @@ Performance_schema_file_classes_lost 0
Performance_schema_file_handles_lost 0
Performance_schema_file_instances_lost 0
Performance_schema_hosts_lost 0
+Performance_schema_index_stat_lost 0
Performance_schema_locker_lost 0
+Performance_schema_memory_classes_lost 0
+Performance_schema_metadata_lock_lost 0
Performance_schema_mutex_classes_lost 0
Performance_schema_mutex_instances_lost 0
+Performance_schema_nested_statement_lost 0
+Performance_schema_prepared_statements_lost 0
+Performance_schema_program_lost 0
Performance_schema_rwlock_classes_lost 0
Performance_schema_rwlock_instances_lost 0
Performance_schema_session_connect_attrs_lost 0
@@ -1704,6 +1709,7 @@ Performance_schema_stage_classes_lost 0
Performance_schema_statement_classes_lost 0
Performance_schema_table_handles_lost 0
Performance_schema_table_instances_lost 0
+Performance_schema_table_lock_stat_lost 0
Performance_schema_thread_classes_lost 0
Performance_schema_thread_instances_lost 0
Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/table_aggregate_thread_2u_2t.result b/mysql-test/suite/perfschema/r/table_aggregate_thread_2u_2t.result
index c176679a95d..eb4bdc0317e 100644
--- a/mysql-test/suite/perfschema/r/table_aggregate_thread_2u_2t.result
+++ b/mysql-test/suite/perfschema/r/table_aggregate_thread_2u_2t.result
@@ -6,9 +6,9 @@ delete from performance_schema.setup_objects
where object_name='t2';
select * from performance_schema.setup_actors
order by USER, HOST, ROLE;
-HOST USER ROLE
-localhost user1 %
-localhost user3 %
+HOST USER ROLE ENABLED HISTORY
+localhost user1 % YES YES
+localhost user3 % YES YES
select * from performance_schema.setup_objects
order by object_type, object_schema, object_name;
OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
@@ -22,6 +22,9 @@ events_stages_history_long NO
events_statements_current NO
events_statements_history NO
events_statements_history_long NO
+events_transactions_current NO
+events_transactions_history NO
+events_transactions_history_long NO
events_waits_current NO
events_waits_history NO
events_waits_history_long NO
@@ -65,28 +68,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -128,28 +123,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -180,18 +167,74 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=101;
update test.t2 set d=d+1 where a=101;
update test.t3 set d=d+1 where a=101;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 1
connection default;
-"================== Step 3 =================="
+"================== Step 3-A =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 23
+user1 wait/lock/table/sql/handler 24
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 23
+user1 localhost wait/lock/table/sql/handler 24
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 23
+user1 wait/lock/table/sql/handler 24
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 23
+localhost wait/lock/table/sql/handler 24
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 23
+wait/lock/table/sql/handler 24
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t3 15 9 6 9 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 18
+TABLE test t2 0
+TABLE test t3 29
+connection con1;
+flush tables;
+"================== con1 FLUSH =================="
+connection default;
+"================== Step 3-B =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 24
username status
user2 not found
@@ -201,19 +244,19 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 24
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 24
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 25
+localhost wait/io/table/sql/handler 23
localhost wait/lock/table/sql/handler 24
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 25
+wait/io/table/sql/handler 23
wait/lock/table/sql/handler 24
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
@@ -223,29 +266,23 @@ TABLE test t1 NULL 6 4 2 4 1 1 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 2 1 1 1 0 1 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 14 8 6 8 3 3 0
-TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 1 1 0 1 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 8 5 3 5 1 2 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 17 11 6 11 3 3 0
+TABLE test t3 15 9 6 9 3 3 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 18
TABLE test t2 0
-TABLE test t3 31
+TABLE test t3 29
connect con2, localhost, user2, , ;
select concat(current_user(), " is connected") as status;
status
@@ -254,7 +291,7 @@ connection default;
"================== Step 4 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 24
username event_name count_star
user2 wait/io/table/sql/handler 0
@@ -265,23 +302,23 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 24
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 24
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 25
+localhost wait/io/table/sql/handler 23
localhost wait/lock/table/sql/handler 24
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 25
+wait/io/table/sql/handler 23
wait/lock/table/sql/handler 24
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
@@ -291,29 +328,23 @@ TABLE test t1 NULL 6 4 2 4 1 1 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 2 1 1 1 0 1 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 14 8 6 8 3 3 0
-TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 1 1 0 1 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 8 5 3 5 1 2 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 17 11 6 11 3 3 0
+TABLE test t3 15 9 6 9 3 3 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 18
TABLE test t2 0
-TABLE test t3 31
+TABLE test t3 29
connection con2;
insert into test.t1 set a=201, b=1, c=1;
insert into test.t2 set a=202, b=2, c=2;
@@ -345,11 +376,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=201;
update test.t2 set d=d+1 where a=201;
update test.t3 set d=d+1 where a=201;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 2
205 5 5 1
@@ -357,7 +388,7 @@ connection default;
"================== Step 5 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 24
username event_name count_star
user2 wait/io/table/sql/handler 0
@@ -368,23 +399,23 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 24
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 24
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 25
+localhost wait/io/table/sql/handler 23
localhost wait/lock/table/sql/handler 24
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 25
+wait/io/table/sql/handler 23
wait/lock/table/sql/handler 24
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
@@ -394,29 +425,23 @@ TABLE test t1 NULL 6 4 2 4 1 1 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 2 1 1 1 0 1 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 14 8 6 8 3 3 0
-TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 1 1 0 1 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 8 5 3 5 1 2 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 17 11 6 11 3 3 0
+TABLE test t3 15 9 6 9 3 3 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 18
TABLE test t2 0
-TABLE test t3 31
+TABLE test t3 29
connect con3, localhost, user3, , ;
select concat(current_user(), " is connected") as status;
status
@@ -425,7 +450,7 @@ connection default;
"================== Step 6 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 24
username event_name count_star
user2 wait/io/table/sql/handler 0
@@ -437,7 +462,7 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 24
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
@@ -445,7 +470,7 @@ user3 localhost wait/io/table/sql/handler 0
user3 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 24
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
@@ -453,11 +478,11 @@ user3 wait/io/table/sql/handler 0
user3 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 25
+localhost wait/io/table/sql/handler 23
localhost wait/lock/table/sql/handler 24
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 25
+wait/io/table/sql/handler 23
wait/lock/table/sql/handler 24
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
@@ -467,29 +492,23 @@ TABLE test t1 NULL 6 4 2 4 1 1 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 2 1 1 1 0 1 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 14 8 6 8 3 3 0
-TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 1 1 0 1 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 8 5 3 5 1 2 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 17 11 6 11 3 3 0
+TABLE test t3 15 9 6 9 3 3 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 18
TABLE test t2 0
-TABLE test t3 31
+TABLE test t3 29
connection con3;
insert into test.t1 set a=301, b=1, c=1;
insert into test.t2 set a=302, b=2, c=2;
@@ -527,11 +546,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=301;
update test.t2 set d=d+1 where a=301;
update test.t3 set d=d+1 where a=301;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 3
205 5 5 2
@@ -540,71 +559,65 @@ connection default;
"================== Step 7 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 24
username event_name count_star
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 24
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 24
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 24
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 77
+localhost wait/io/table/sql/handler 71
localhost wait/lock/table/sql/handler 48
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 77
+wait/io/table/sql/handler 71
wait/lock/table/sql/handler 48
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 6
+TABLE test t3 28 8 20 4 0 0 0 4 0 10
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 43
+TABLE test t1 41
TABLE test t2 0
-TABLE test t3 82
+TABLE test t3 78
connect con4, localhost, user4, , ;
select concat(current_user(), " is connected") as status;
status
@@ -613,76 +626,70 @@ connection default;
"================== Step 8 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 24
username event_name count_star
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
username event_name count_star
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 24
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 24
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 24
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 77
+localhost wait/io/table/sql/handler 71
localhost wait/lock/table/sql/handler 48
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 77
+wait/io/table/sql/handler 71
wait/lock/table/sql/handler 48
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 6
+TABLE test t3 28 8 20 4 0 0 0 4 0 10
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 43
+TABLE test t1 41
TABLE test t2 0
-TABLE test t3 82
+TABLE test t3 78
connection con4;
insert into test.t1 set a=401, b=1, c=1;
insert into test.t2 set a=402, b=2, c=2;
@@ -726,11 +733,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=401;
update test.t2 set d=d+1 where a=401;
update test.t3 set d=d+1 where a=401;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 4
205 5 5 3
@@ -740,76 +747,70 @@ connection default;
"================== Step 9 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 24
username event_name count_star
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
username event_name count_star
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 24
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 24
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 24
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 77
+localhost wait/io/table/sql/handler 71
localhost wait/lock/table/sql/handler 48
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 77
+wait/io/table/sql/handler 71
wait/lock/table/sql/handler 48
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 6
+TABLE test t3 28 8 20 4 0 0 0 4 0 10
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 43
+TABLE test t1 41
TABLE test t2 0
-TABLE test t3 82
+TABLE test t3 78
connection con1;
lock tables test.t1 read, test.t2 read, test.t3 read;
unlock tables;
@@ -819,228 +820,210 @@ connection default;
"================== Step 10 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 32
username event_name count_star
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
username event_name count_star
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 32
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 24
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 32
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 77
+localhost wait/io/table/sql/handler 71
localhost wait/lock/table/sql/handler 56
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 77
+wait/io/table/sql/handler 71
wait/lock/table/sql/handler 56
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 47
+TABLE test t1 45
TABLE test t2 0
-TABLE test t3 86
+TABLE test t3 82
connection default;
flush tables;
"================== flush marker =================="
"================== Step 11 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 32
username event_name count_star
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
username event_name count_star
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 32
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 24
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 32
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 77
+localhost wait/io/table/sql/handler 71
localhost wait/lock/table/sql/handler 56
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 77
+wait/io/table/sql/handler 71
wait/lock/table/sql/handler 56
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 47
+TABLE test t1 45
TABLE test t2 0
-TABLE test t3 86
+TABLE test t3 82
set global read_only=1;
set global read_only=0;
"================== global read_only marker =================="
"================== Step 12 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 32
username event_name count_star
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
username event_name count_star
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 32
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 24
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 32
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 77
+localhost wait/io/table/sql/handler 71
localhost wait/lock/table/sql/handler 56
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 77
+wait/io/table/sql/handler 71
wait/lock/table/sql/handler 56
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 47
+TABLE test t1 45
TABLE test t2 0
-TABLE test t3 86
+TABLE test t3 82
disconnect con1;
"================== Step 13 =================="
call dump_thread();
@@ -1050,70 +1033,64 @@ username event_name count_star
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
username event_name count_star
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 32
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 24
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 32
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 77
+localhost wait/io/table/sql/handler 71
localhost wait/lock/table/sql/handler 56
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 77
+wait/io/table/sql/handler 71
wait/lock/table/sql/handler 56
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 47
+TABLE test t1 45
TABLE test t2 0
-TABLE test t3 86
+TABLE test t3 82
disconnect con2;
"================== Step 14 =================="
call dump_thread();
@@ -1122,70 +1099,64 @@ user1 not found
username status
user2 not found
username event_name count_star
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
username event_name count_star
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 32
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 24
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 32
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 77
+localhost wait/io/table/sql/handler 71
localhost wait/lock/table/sql/handler 56
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 77
+wait/io/table/sql/handler 71
wait/lock/table/sql/handler 56
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 47
+TABLE test t1 45
TABLE test t2 0
-TABLE test t3 86
+TABLE test t3 82
disconnect con3;
"================== Step 15 =================="
call dump_thread();
@@ -1200,63 +1171,57 @@ user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 32
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 24
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 32
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 77
+localhost wait/io/table/sql/handler 71
localhost wait/lock/table/sql/handler 56
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 77
+wait/io/table/sql/handler 71
wait/lock/table/sql/handler 56
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 47
+TABLE test t1 45
TABLE test t2 0
-TABLE test t3 86
+TABLE test t3 82
disconnect con4;
"================== Step 16 =================="
call dump_thread();
@@ -1270,63 +1235,57 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 32
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 24
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 32
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 77
+localhost wait/io/table/sql/handler 71
localhost wait/lock/table/sql/handler 56
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 77
+wait/io/table/sql/handler 71
wait/lock/table/sql/handler 56
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 47
+TABLE test t1 45
TABLE test t2 0
-TABLE test t3 86
+TABLE test t3 82
connection default;
truncate performance_schema.events_waits_summary_by_thread_by_event_name;
"================== BY_THREAD truncated =================="
@@ -1342,63 +1301,57 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 32
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 24
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 32
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 77
+localhost wait/io/table/sql/handler 71
localhost wait/lock/table/sql/handler 56
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 77
+wait/io/table/sql/handler 71
wait/lock/table/sql/handler 56
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 47
+TABLE test t1 45
TABLE test t2 0
-TABLE test t3 86
+TABLE test t3 82
truncate performance_schema.events_waits_summary_by_account_by_event_name;
"================== BY_ACCOUNT truncated =================="
"================== Step 18 =================="
@@ -1423,53 +1376,47 @@ user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 32
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 77
+localhost wait/io/table/sql/handler 71
localhost wait/lock/table/sql/handler 56
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 77
+wait/io/table/sql/handler 71
wait/lock/table/sql/handler 56
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 47
+TABLE test t1 45
TABLE test t2 0
-TABLE test t3 86
+TABLE test t3 82
truncate performance_schema.events_waits_summary_by_user_by_event_name;
"================== BY_USER truncated =================="
"================== Step 19 =================="
@@ -1504,43 +1451,37 @@ user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 77
+localhost wait/io/table/sql/handler 71
localhost wait/lock/table/sql/handler 56
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 77
+wait/io/table/sql/handler 71
wait/lock/table/sql/handler 56
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 47
+TABLE test t1 45
TABLE test t2 0
-TABLE test t3 86
+TABLE test t3 82
truncate performance_schema.events_waits_summary_by_host_by_event_name;
"================== BY_HOST truncated =================="
"================== Step 21 =================="
@@ -1579,39 +1520,33 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 77
+wait/io/table/sql/handler 71
wait/lock/table/sql/handler 56
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 47
+TABLE test t1 45
TABLE test t2 0
-TABLE test t3 86
+TABLE test t3 82
truncate performance_schema.events_waits_summary_global_by_event_name;
"================== GLOBAL truncated =================="
"================== Step 21 =================="
@@ -1660,10 +1595,6 @@ TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
@@ -1671,19 +1602,17 @@ TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-show status like "performance_schema%";
+show global status like "performance_schema%";
Variable_name Value
Performance_schema_accounts_lost 0
Performance_schema_cond_classes_lost 0
@@ -1693,9 +1622,15 @@ Performance_schema_file_classes_lost 0
Performance_schema_file_handles_lost 0
Performance_schema_file_instances_lost 0
Performance_schema_hosts_lost 0
+Performance_schema_index_stat_lost 0
Performance_schema_locker_lost 0
+Performance_schema_memory_classes_lost 0
+Performance_schema_metadata_lock_lost 0
Performance_schema_mutex_classes_lost 0
Performance_schema_mutex_instances_lost 0
+Performance_schema_nested_statement_lost 0
+Performance_schema_prepared_statements_lost 0
+Performance_schema_program_lost 0
Performance_schema_rwlock_classes_lost 0
Performance_schema_rwlock_instances_lost 0
Performance_schema_session_connect_attrs_lost 0
@@ -1705,6 +1640,7 @@ Performance_schema_stage_classes_lost 0
Performance_schema_statement_classes_lost 0
Performance_schema_table_handles_lost 0
Performance_schema_table_instances_lost 0
+Performance_schema_table_lock_stat_lost 0
Performance_schema_thread_classes_lost 0
Performance_schema_thread_instances_lost 0
Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/table_aggregate_thread_2u_3t.result b/mysql-test/suite/perfschema/r/table_aggregate_thread_2u_3t.result
index 38c8813ea18..3d993ada59f 100644
--- a/mysql-test/suite/perfschema/r/table_aggregate_thread_2u_3t.result
+++ b/mysql-test/suite/perfschema/r/table_aggregate_thread_2u_3t.result
@@ -4,9 +4,9 @@ delete from performance_schema.setup_actors
where user in ('user2', 'user4');
select * from performance_schema.setup_actors
order by USER, HOST, ROLE;
-HOST USER ROLE
-localhost user1 %
-localhost user3 %
+HOST USER ROLE ENABLED HISTORY
+localhost user1 % YES YES
+localhost user3 % YES YES
select * from performance_schema.setup_objects
order by object_type, object_schema, object_name;
OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
@@ -21,6 +21,9 @@ events_stages_history_long NO
events_statements_current NO
events_statements_history NO
events_statements_history_long NO
+events_transactions_current NO
+events_transactions_history NO
+events_transactions_history_long NO
events_waits_current NO
events_waits_history NO
events_waits_history_long NO
@@ -64,15 +67,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -82,10 +82,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -127,15 +127,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -145,10 +142,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -179,18 +176,18 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=101;
update test.t2 set d=d+1 where a=101;
update test.t3 set d=d+1 where a=101;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 1
connection default;
-"================== Step 3 =================="
+"================== Step 3-A =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 36
username status
user2 not found
@@ -200,19 +197,19 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 36
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 36
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 37
+localhost wait/io/table/sql/handler 33
localhost wait/lock/table/sql/handler 36
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 37
+wait/io/table/sql/handler 33
wait/lock/table/sql/handler 36
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
@@ -222,29 +219,91 @@ TABLE test t1 NULL 6 4 2 4 1 1 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 2 1 1 1 0 1 0
-TABLE test t2 NULL 10 6 4 6 2 2 0
-TABLE test t2 index_b 1 1 0 1 0 0 0
+TABLE test t2 NULL 9 5 4 5 2 2 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 1 1 0 1 0 0 0
-TABLE test t3 NULL 14 8 6 8 3 3 0
-TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 1 1 0 1 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 8 5 3 5 1 2 0
-TABLE test t2 12 8 4 8 2 2 0
-TABLE test t3 17 11 6 11 3 3 0
+TABLE test t2 10 6 4 6 2 2 0
+TABLE test t3 15 9 6 9 3 3 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
-TABLE test t2 12 4 8 2 0 0 0 2 0 0 4
-TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t2 12 4 8 2 0 0 0 2 0 4
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 18
-TABLE test t2 24
-TABLE test t3 31
+TABLE test t2 22
+TABLE test t3 29
+connection con1;
+flush tables;
+"================== con1 FLUSH =================="
+connection default;
+"================== Step 3-B =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 33
+user1 wait/lock/table/sql/handler 36
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 33
+user1 localhost wait/lock/table/sql/handler 36
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 33
+user1 wait/lock/table/sql/handler 36
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 33
+localhost wait/lock/table/sql/handler 36
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 33
+wait/lock/table/sql/handler 36
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t2 NULL 9 5 4 5 2 2 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 1 1 0 1 0 0 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t2 10 6 4 6 2 2 0
+TABLE test t3 15 9 6 9 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t2 12 4 8 2 0 0 0 2 0 4
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 18
+TABLE test t2 22
+TABLE test t3 29
connect con2, localhost, user2, , ;
select concat(current_user(), " is connected") as status;
status
@@ -253,7 +312,7 @@ connection default;
"================== Step 4 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 36
username event_name count_star
user2 wait/io/table/sql/handler 0
@@ -264,23 +323,23 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 36
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 36
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 37
+localhost wait/io/table/sql/handler 33
localhost wait/lock/table/sql/handler 36
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 37
+wait/io/table/sql/handler 33
wait/lock/table/sql/handler 36
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
@@ -290,29 +349,29 @@ TABLE test t1 NULL 6 4 2 4 1 1 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 2 1 1 1 0 1 0
-TABLE test t2 NULL 10 6 4 6 2 2 0
-TABLE test t2 index_b 1 1 0 1 0 0 0
+TABLE test t2 NULL 9 5 4 5 2 2 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 1 1 0 1 0 0 0
-TABLE test t3 NULL 14 8 6 8 3 3 0
-TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 1 1 0 1 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 8 5 3 5 1 2 0
-TABLE test t2 12 8 4 8 2 2 0
-TABLE test t3 17 11 6 11 3 3 0
+TABLE test t2 10 6 4 6 2 2 0
+TABLE test t3 15 9 6 9 3 3 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
-TABLE test t2 12 4 8 2 0 0 0 2 0 0 4
-TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t2 12 4 8 2 0 0 0 2 0 4
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 18
-TABLE test t2 24
-TABLE test t3 31
+TABLE test t2 22
+TABLE test t3 29
connection con2;
insert into test.t1 set a=201, b=1, c=1;
insert into test.t2 set a=202, b=2, c=2;
@@ -344,11 +403,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=201;
update test.t2 set d=d+1 where a=201;
update test.t3 set d=d+1 where a=201;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 2
205 5 5 1
@@ -356,7 +415,7 @@ connection default;
"================== Step 5 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 36
username event_name count_star
user2 wait/io/table/sql/handler 0
@@ -367,23 +426,23 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 36
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 36
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 37
+localhost wait/io/table/sql/handler 33
localhost wait/lock/table/sql/handler 36
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 37
+wait/io/table/sql/handler 33
wait/lock/table/sql/handler 36
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
@@ -393,29 +452,29 @@ TABLE test t1 NULL 6 4 2 4 1 1 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 2 1 1 1 0 1 0
-TABLE test t2 NULL 10 6 4 6 2 2 0
-TABLE test t2 index_b 1 1 0 1 0 0 0
+TABLE test t2 NULL 9 5 4 5 2 2 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 1 1 0 1 0 0 0
-TABLE test t3 NULL 14 8 6 8 3 3 0
-TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 1 1 0 1 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 8 5 3 5 1 2 0
-TABLE test t2 12 8 4 8 2 2 0
-TABLE test t3 17 11 6 11 3 3 0
+TABLE test t2 10 6 4 6 2 2 0
+TABLE test t3 15 9 6 9 3 3 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
-TABLE test t2 12 4 8 2 0 0 0 2 0 0 4
-TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t2 12 4 8 2 0 0 0 2 0 4
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 18
-TABLE test t2 24
-TABLE test t3 31
+TABLE test t2 22
+TABLE test t3 29
connect con3, localhost, user3, , ;
select concat(current_user(), " is connected") as status;
status
@@ -424,7 +483,7 @@ connection default;
"================== Step 6 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 36
username event_name count_star
user2 wait/io/table/sql/handler 0
@@ -436,7 +495,7 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 36
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
@@ -444,7 +503,7 @@ user3 localhost wait/io/table/sql/handler 0
user3 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 36
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
@@ -452,11 +511,11 @@ user3 wait/io/table/sql/handler 0
user3 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 37
+localhost wait/io/table/sql/handler 33
localhost wait/lock/table/sql/handler 36
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 37
+wait/io/table/sql/handler 33
wait/lock/table/sql/handler 36
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
@@ -466,29 +525,29 @@ TABLE test t1 NULL 6 4 2 4 1 1 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 2 1 1 1 0 1 0
-TABLE test t2 NULL 10 6 4 6 2 2 0
-TABLE test t2 index_b 1 1 0 1 0 0 0
+TABLE test t2 NULL 9 5 4 5 2 2 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 1 1 0 1 0 0 0
-TABLE test t3 NULL 14 8 6 8 3 3 0
-TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 1 1 0 1 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 8 5 3 5 1 2 0
-TABLE test t2 12 8 4 8 2 2 0
-TABLE test t3 17 11 6 11 3 3 0
+TABLE test t2 10 6 4 6 2 2 0
+TABLE test t3 15 9 6 9 3 3 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
-TABLE test t2 12 4 8 2 0 0 0 2 0 0 4
-TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t2 12 4 8 2 0 0 0 2 0 4
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 18
-TABLE test t2 24
-TABLE test t3 31
+TABLE test t2 22
+TABLE test t3 29
connection con3;
insert into test.t1 set a=301, b=1, c=1;
insert into test.t2 set a=302, b=2, c=2;
@@ -526,11 +585,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=301;
update test.t2 set d=d+1 where a=301;
update test.t3 set d=d+1 where a=301;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 3
205 5 5 2
@@ -539,71 +598,71 @@ connection default;
"================== Step 7 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 36
username event_name count_star
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 36
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 36
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 36
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 113
+localhost wait/io/table/sql/handler 103
localhost wait/lock/table/sql/handler 72
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 113
+wait/io/table/sql/handler 103
wait/lock/table/sql/handler 72
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 32 20 12 20 4 8 0
-TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 NULL 30 18 12 18 4 8 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 2 2 0 2 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 36 24 12 24 4 8 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t2 32 20 12 20 4 8 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
-TABLE test t2 24 8 16 4 0 0 0 4 0 0 8
-TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 6
+TABLE test t2 24 8 16 4 0 0 0 4 0 8
+TABLE test t3 28 8 20 4 0 0 0 4 0 10
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 43
-TABLE test t2 60
-TABLE test t3 82
+TABLE test t1 41
+TABLE test t2 56
+TABLE test t3 78
connect con4, localhost, user4, , ;
select concat(current_user(), " is connected") as status;
status
@@ -612,76 +671,76 @@ connection default;
"================== Step 8 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 36
username event_name count_star
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
username event_name count_star
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 36
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 36
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 36
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 113
+localhost wait/io/table/sql/handler 103
localhost wait/lock/table/sql/handler 72
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 113
+wait/io/table/sql/handler 103
wait/lock/table/sql/handler 72
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 32 20 12 20 4 8 0
-TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 NULL 30 18 12 18 4 8 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 2 2 0 2 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 36 24 12 24 4 8 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t2 32 20 12 20 4 8 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
-TABLE test t2 24 8 16 4 0 0 0 4 0 0 8
-TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 6
+TABLE test t2 24 8 16 4 0 0 0 4 0 8
+TABLE test t3 28 8 20 4 0 0 0 4 0 10
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 43
-TABLE test t2 60
-TABLE test t3 82
+TABLE test t1 41
+TABLE test t2 56
+TABLE test t3 78
connection con4;
insert into test.t1 set a=401, b=1, c=1;
insert into test.t2 set a=402, b=2, c=2;
@@ -725,11 +784,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=401;
update test.t2 set d=d+1 where a=401;
update test.t3 set d=d+1 where a=401;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 4
205 5 5 3
@@ -739,76 +798,76 @@ connection default;
"================== Step 9 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 36
username event_name count_star
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
username event_name count_star
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 36
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 36
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 36
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 113
+localhost wait/io/table/sql/handler 103
localhost wait/lock/table/sql/handler 72
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 113
+wait/io/table/sql/handler 103
wait/lock/table/sql/handler 72
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 32 20 12 20 4 8 0
-TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 NULL 30 18 12 18 4 8 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 2 2 0 2 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 36 24 12 24 4 8 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t2 32 20 12 20 4 8 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
-TABLE test t2 24 8 16 4 0 0 0 4 0 0 8
-TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 6
+TABLE test t2 24 8 16 4 0 0 0 4 0 8
+TABLE test t3 28 8 20 4 0 0 0 4 0 10
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 43
-TABLE test t2 60
-TABLE test t3 82
+TABLE test t1 41
+TABLE test t2 56
+TABLE test t3 78
connection con1;
lock tables test.t1 read, test.t2 read, test.t3 read;
unlock tables;
@@ -818,228 +877,228 @@ connection default;
"================== Step 10 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 48
username event_name count_star
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
username event_name count_star
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 48
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 36
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 48
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 113
+localhost wait/io/table/sql/handler 103
localhost wait/lock/table/sql/handler 84
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 113
+wait/io/table/sql/handler 103
wait/lock/table/sql/handler 84
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 32 20 12 20 4 8 0
-TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 NULL 30 18 12 18 4 8 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 2 2 0 2 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 36 24 12 24 4 8 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t2 32 20 12 20 4 8 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 47
-TABLE test t2 64
-TABLE test t3 86
+TABLE test t1 45
+TABLE test t2 60
+TABLE test t3 82
connection default;
flush tables;
"================== flush marker =================="
"================== Step 11 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 48
username event_name count_star
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
username event_name count_star
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 48
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 36
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 48
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 113
+localhost wait/io/table/sql/handler 103
localhost wait/lock/table/sql/handler 84
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 113
+wait/io/table/sql/handler 103
wait/lock/table/sql/handler 84
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 32 20 12 20 4 8 0
-TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 NULL 30 18 12 18 4 8 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 2 2 0 2 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 36 24 12 24 4 8 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t2 32 20 12 20 4 8 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 47
-TABLE test t2 64
-TABLE test t3 86
+TABLE test t1 45
+TABLE test t2 60
+TABLE test t3 82
set global read_only=1;
set global read_only=0;
"================== global read_only marker =================="
"================== Step 12 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 48
username event_name count_star
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
username event_name count_star
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 48
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 36
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 48
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 113
+localhost wait/io/table/sql/handler 103
localhost wait/lock/table/sql/handler 84
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 113
+wait/io/table/sql/handler 103
wait/lock/table/sql/handler 84
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 32 20 12 20 4 8 0
-TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 NULL 30 18 12 18 4 8 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 2 2 0 2 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 36 24 12 24 4 8 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t2 32 20 12 20 4 8 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 47
-TABLE test t2 64
-TABLE test t3 86
+TABLE test t1 45
+TABLE test t2 60
+TABLE test t3 82
disconnect con1;
"================== Step 13 =================="
call dump_thread();
@@ -1049,70 +1108,70 @@ username event_name count_star
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
username event_name count_star
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 48
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 36
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 48
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 113
+localhost wait/io/table/sql/handler 103
localhost wait/lock/table/sql/handler 84
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 113
+wait/io/table/sql/handler 103
wait/lock/table/sql/handler 84
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 32 20 12 20 4 8 0
-TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 NULL 30 18 12 18 4 8 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 2 2 0 2 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 36 24 12 24 4 8 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t2 32 20 12 20 4 8 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 47
-TABLE test t2 64
-TABLE test t3 86
+TABLE test t1 45
+TABLE test t2 60
+TABLE test t3 82
disconnect con2;
"================== Step 14 =================="
call dump_thread();
@@ -1121,70 +1180,70 @@ user1 not found
username status
user2 not found
username event_name count_star
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
username event_name count_star
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 48
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 36
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 48
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 113
+localhost wait/io/table/sql/handler 103
localhost wait/lock/table/sql/handler 84
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 113
+wait/io/table/sql/handler 103
wait/lock/table/sql/handler 84
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 32 20 12 20 4 8 0
-TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 NULL 30 18 12 18 4 8 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 2 2 0 2 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 36 24 12 24 4 8 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t2 32 20 12 20 4 8 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 47
-TABLE test t2 64
-TABLE test t3 86
+TABLE test t1 45
+TABLE test t2 60
+TABLE test t3 82
disconnect con3;
"================== Step 15 =================="
call dump_thread();
@@ -1199,63 +1258,63 @@ user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 48
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 36
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 48
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 113
+localhost wait/io/table/sql/handler 103
localhost wait/lock/table/sql/handler 84
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 113
+wait/io/table/sql/handler 103
wait/lock/table/sql/handler 84
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 32 20 12 20 4 8 0
-TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 NULL 30 18 12 18 4 8 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 2 2 0 2 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 36 24 12 24 4 8 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t2 32 20 12 20 4 8 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 47
-TABLE test t2 64
-TABLE test t3 86
+TABLE test t1 45
+TABLE test t2 60
+TABLE test t3 82
disconnect con4;
"================== Step 16 =================="
call dump_thread();
@@ -1269,63 +1328,63 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 48
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 36
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 48
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 113
+localhost wait/io/table/sql/handler 103
localhost wait/lock/table/sql/handler 84
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 113
+wait/io/table/sql/handler 103
wait/lock/table/sql/handler 84
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 32 20 12 20 4 8 0
-TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 NULL 30 18 12 18 4 8 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 2 2 0 2 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 36 24 12 24 4 8 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t2 32 20 12 20 4 8 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 47
-TABLE test t2 64
-TABLE test t3 86
+TABLE test t1 45
+TABLE test t2 60
+TABLE test t3 82
connection default;
truncate performance_schema.events_waits_summary_by_thread_by_event_name;
"================== BY_THREAD truncated =================="
@@ -1341,63 +1400,63 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 48
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 36
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 48
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 113
+localhost wait/io/table/sql/handler 103
localhost wait/lock/table/sql/handler 84
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 113
+wait/io/table/sql/handler 103
wait/lock/table/sql/handler 84
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 32 20 12 20 4 8 0
-TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 NULL 30 18 12 18 4 8 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 2 2 0 2 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 36 24 12 24 4 8 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t2 32 20 12 20 4 8 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 47
-TABLE test t2 64
-TABLE test t3 86
+TABLE test t1 45
+TABLE test t2 60
+TABLE test t3 82
truncate performance_schema.events_waits_summary_by_account_by_event_name;
"================== BY_ACCOUNT truncated =================="
"================== Step 18 =================="
@@ -1422,53 +1481,53 @@ user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 48
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 113
+localhost wait/io/table/sql/handler 103
localhost wait/lock/table/sql/handler 84
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 113
+wait/io/table/sql/handler 103
wait/lock/table/sql/handler 84
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 32 20 12 20 4 8 0
-TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 NULL 30 18 12 18 4 8 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 2 2 0 2 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 36 24 12 24 4 8 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t2 32 20 12 20 4 8 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 47
-TABLE test t2 64
-TABLE test t3 86
+TABLE test t1 45
+TABLE test t2 60
+TABLE test t3 82
truncate performance_schema.events_waits_summary_by_user_by_event_name;
"================== BY_USER truncated =================="
"================== Step 19 =================="
@@ -1503,43 +1562,43 @@ user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 113
+localhost wait/io/table/sql/handler 103
localhost wait/lock/table/sql/handler 84
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 113
+wait/io/table/sql/handler 103
wait/lock/table/sql/handler 84
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 32 20 12 20 4 8 0
-TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 NULL 30 18 12 18 4 8 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 2 2 0 2 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 36 24 12 24 4 8 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t2 32 20 12 20 4 8 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 47
-TABLE test t2 64
-TABLE test t3 86
+TABLE test t1 45
+TABLE test t2 60
+TABLE test t3 82
truncate performance_schema.events_waits_summary_by_host_by_event_name;
"================== BY_HOST truncated =================="
"================== Step 21 =================="
@@ -1578,39 +1637,39 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 113
+wait/io/table/sql/handler 103
wait/lock/table/sql/handler 84
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 32 20 12 20 4 8 0
-TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 NULL 30 18 12 18 4 8 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 2 2 0 2 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 36 24 12 24 4 8 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t2 32 20 12 20 4 8 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 47
-TABLE test t2 64
-TABLE test t3 86
+TABLE test t1 45
+TABLE test t2 60
+TABLE test t3 82
truncate performance_schema.events_waits_summary_global_by_event_name;
"================== GLOBAL truncated =================="
"================== Step 21 =================="
@@ -1673,16 +1732,16 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-show status like "performance_schema%";
+show global status like "performance_schema%";
Variable_name Value
Performance_schema_accounts_lost 0
Performance_schema_cond_classes_lost 0
@@ -1692,9 +1751,15 @@ Performance_schema_file_classes_lost 0
Performance_schema_file_handles_lost 0
Performance_schema_file_instances_lost 0
Performance_schema_hosts_lost 0
+Performance_schema_index_stat_lost 0
Performance_schema_locker_lost 0
+Performance_schema_memory_classes_lost 0
+Performance_schema_metadata_lock_lost 0
Performance_schema_mutex_classes_lost 0
Performance_schema_mutex_instances_lost 0
+Performance_schema_nested_statement_lost 0
+Performance_schema_prepared_statements_lost 0
+Performance_schema_program_lost 0
Performance_schema_rwlock_classes_lost 0
Performance_schema_rwlock_instances_lost 0
Performance_schema_session_connect_attrs_lost 0
@@ -1704,6 +1769,7 @@ Performance_schema_stage_classes_lost 0
Performance_schema_statement_classes_lost 0
Performance_schema_table_handles_lost 0
Performance_schema_table_instances_lost 0
+Performance_schema_table_lock_stat_lost 0
Performance_schema_thread_classes_lost 0
Performance_schema_thread_instances_lost 0
Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/table_aggregate_thread_4u_2t.result b/mysql-test/suite/perfschema/r/table_aggregate_thread_4u_2t.result
index 9144d81c8a0..0c4f6592245 100644
--- a/mysql-test/suite/perfschema/r/table_aggregate_thread_4u_2t.result
+++ b/mysql-test/suite/perfschema/r/table_aggregate_thread_4u_2t.result
@@ -4,11 +4,11 @@ delete from performance_schema.setup_objects
where object_name='t2';
select * from performance_schema.setup_actors
order by USER, HOST, ROLE;
-HOST USER ROLE
-localhost user1 %
-localhost user2 %
-localhost user3 %
-localhost user4 %
+HOST USER ROLE ENABLED HISTORY
+localhost user1 % YES YES
+localhost user2 % YES YES
+localhost user3 % YES YES
+localhost user4 % YES YES
select * from performance_schema.setup_objects
order by object_type, object_schema, object_name;
OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
@@ -22,6 +22,9 @@ events_stages_history_long NO
events_statements_current NO
events_statements_history NO
events_statements_history_long NO
+events_transactions_current NO
+events_transactions_history NO
+events_transactions_history_long NO
events_waits_current NO
events_waits_history NO
events_waits_history_long NO
@@ -65,28 +68,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -128,28 +123,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -180,18 +167,74 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=101;
update test.t2 set d=d+1 where a=101;
update test.t3 set d=d+1 where a=101;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 1
connection default;
-"================== Step 3 =================="
+"================== Step 3-A =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 23
+user1 wait/lock/table/sql/handler 24
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 23
+user1 localhost wait/lock/table/sql/handler 24
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 23
+user1 wait/lock/table/sql/handler 24
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 23
+localhost wait/lock/table/sql/handler 24
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 23
+wait/lock/table/sql/handler 24
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t3 15 9 6 9 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 18
+TABLE test t2 0
+TABLE test t3 29
+connection con1;
+flush tables;
+"================== con1 FLUSH =================="
+connection default;
+"================== Step 3-B =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 24
username status
user2 not found
@@ -201,19 +244,19 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 24
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 24
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 25
+localhost wait/io/table/sql/handler 23
localhost wait/lock/table/sql/handler 24
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 25
+wait/io/table/sql/handler 23
wait/lock/table/sql/handler 24
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
@@ -223,29 +266,23 @@ TABLE test t1 NULL 6 4 2 4 1 1 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 2 1 1 1 0 1 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 14 8 6 8 3 3 0
-TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 1 1 0 1 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 8 5 3 5 1 2 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 17 11 6 11 3 3 0
+TABLE test t3 15 9 6 9 3 3 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 18
TABLE test t2 0
-TABLE test t3 31
+TABLE test t3 29
connect con2, localhost, user2, , ;
select concat(current_user(), " is connected") as status;
status
@@ -254,7 +291,7 @@ connection default;
"================== Step 4 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 24
username event_name count_star
user2 wait/io/table/sql/handler 0
@@ -265,23 +302,23 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 24
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 24
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 25
+localhost wait/io/table/sql/handler 23
localhost wait/lock/table/sql/handler 24
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 25
+wait/io/table/sql/handler 23
wait/lock/table/sql/handler 24
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
@@ -291,29 +328,23 @@ TABLE test t1 NULL 6 4 2 4 1 1 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 2 1 1 1 0 1 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 14 8 6 8 3 3 0
-TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 1 1 0 1 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 8 5 3 5 1 2 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 17 11 6 11 3 3 0
+TABLE test t3 15 9 6 9 3 3 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 18
TABLE test t2 0
-TABLE test t3 31
+TABLE test t3 29
connection con2;
insert into test.t1 set a=201, b=1, c=1;
insert into test.t2 set a=202, b=2, c=2;
@@ -345,11 +376,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=201;
update test.t2 set d=d+1 where a=201;
update test.t3 set d=d+1 where a=201;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 2
205 5 5 1
@@ -357,10 +388,10 @@ connection default;
"================== Step 5 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 24
username event_name count_star
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 24
username status
user3 not found
@@ -368,55 +399,49 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 24
-user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/io/table/sql/handler 35
user2 localhost wait/lock/table/sql/handler 24
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 24
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 24
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 64
+localhost wait/io/table/sql/handler 58
localhost wait/lock/table/sql/handler 48
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 64
+wait/io/table/sql/handler 58
wait/lock/table/sql/handler 48
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 15 10 5 10 2 3 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 14 9 5 9 2 3 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 37 22 15 22 6 9 0
-TABLE test t3 index_b 5 5 0 5 0 0 0
+TABLE test t3 NULL 35 20 15 20 6 9 0
+TABLE test t3 index_b 3 3 0 3 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 20 13 7 13 2 5 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 44 29 15 29 6 9 0
+TABLE test t1 18 11 7 11 2 5 0
+TABLE test t3 40 25 15 25 6 9 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 6
+TABLE test t3 28 8 20 4 0 0 0 4 0 10
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 40
+TABLE test t1 38
TABLE test t2 0
-TABLE test t3 72
+TABLE test t3 68
connect con3, localhost, user3, , ;
select concat(current_user(), " is connected") as status;
status
@@ -425,10 +450,10 @@ connection default;
"================== Step 6 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 24
username event_name count_star
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 24
username event_name count_star
user3 wait/io/table/sql/handler 0
@@ -437,59 +462,53 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 24
-user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/io/table/sql/handler 35
user2 localhost wait/lock/table/sql/handler 24
user3 localhost wait/io/table/sql/handler 0
user3 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 24
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 24
user3 wait/io/table/sql/handler 0
user3 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 64
+localhost wait/io/table/sql/handler 58
localhost wait/lock/table/sql/handler 48
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 64
+wait/io/table/sql/handler 58
wait/lock/table/sql/handler 48
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 15 10 5 10 2 3 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 14 9 5 9 2 3 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 37 22 15 22 6 9 0
-TABLE test t3 index_b 5 5 0 5 0 0 0
+TABLE test t3 NULL 35 20 15 20 6 9 0
+TABLE test t3 index_b 3 3 0 3 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 20 13 7 13 2 5 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 44 29 15 29 6 9 0
+TABLE test t1 18 11 7 11 2 5 0
+TABLE test t3 40 25 15 25 6 9 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 6
+TABLE test t3 28 8 20 4 0 0 0 4 0 10
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 40
+TABLE test t1 38
TABLE test t2 0
-TABLE test t3 72
+TABLE test t3 68
connection con3;
insert into test.t1 set a=301, b=1, c=1;
insert into test.t2 set a=302, b=2, c=2;
@@ -527,11 +546,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=301;
update test.t2 set d=d+1 where a=301;
update test.t3 set d=d+1 where a=301;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 3
205 5 5 2
@@ -540,71 +559,65 @@ connection default;
"================== Step 7 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 24
username event_name count_star
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 24
username event_name count_star
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 24
-user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/io/table/sql/handler 35
user2 localhost wait/lock/table/sql/handler 24
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 24
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 24
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 24
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 116
+localhost wait/io/table/sql/handler 106
localhost wait/lock/table/sql/handler 72
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 116
+wait/io/table/sql/handler 106
wait/lock/table/sql/handler 72
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 27 18 9 18 3 6 0
-TABLE test t1 index_b 2 2 0 2 0 0 0
+TABLE test t1 NULL 25 16 9 16 3 6 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 6 3 3 3 0 3 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 69 42 27 42 9 18 0
-TABLE test t3 index_b 9 9 0 9 0 0 0
+TABLE test t3 NULL 66 39 27 39 9 18 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 3 3 0 3 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 35 23 12 23 3 9 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 81 54 27 54 9 18 0
+TABLE test t1 31 19 12 19 3 9 0
+TABLE test t3 75 48 27 48 9 18 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 30 12 18 6 0 0 0 6 0 0 9
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 42 12 30 6 0 0 0 6 0 0 15
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 30 12 18 6 0 0 0 6 0 9
+TABLE test t3 42 12 30 6 0 0 0 6 0 15
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 65
+TABLE test t1 61
TABLE test t2 0
-TABLE test t3 123
+TABLE test t3 117
connect con4, localhost, user4, , ;
select concat(current_user(), " is connected") as status;
status
@@ -613,76 +626,70 @@ connection default;
"================== Step 8 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 24
username event_name count_star
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 24
username event_name count_star
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
username event_name count_star
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 24
-user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/io/table/sql/handler 35
user2 localhost wait/lock/table/sql/handler 24
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 24
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 24
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 24
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 116
+localhost wait/io/table/sql/handler 106
localhost wait/lock/table/sql/handler 72
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 116
+wait/io/table/sql/handler 106
wait/lock/table/sql/handler 72
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 27 18 9 18 3 6 0
-TABLE test t1 index_b 2 2 0 2 0 0 0
+TABLE test t1 NULL 25 16 9 16 3 6 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 6 3 3 3 0 3 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 69 42 27 42 9 18 0
-TABLE test t3 index_b 9 9 0 9 0 0 0
+TABLE test t3 NULL 66 39 27 39 9 18 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 3 3 0 3 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 35 23 12 23 3 9 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 81 54 27 54 9 18 0
+TABLE test t1 31 19 12 19 3 9 0
+TABLE test t3 75 48 27 48 9 18 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 30 12 18 6 0 0 0 6 0 0 9
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 42 12 30 6 0 0 0 6 0 0 15
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 30 12 18 6 0 0 0 6 0 9
+TABLE test t3 42 12 30 6 0 0 0 6 0 15
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 65
+TABLE test t1 61
TABLE test t2 0
-TABLE test t3 123
+TABLE test t3 117
connection con4;
insert into test.t1 set a=401, b=1, c=1;
insert into test.t2 set a=402, b=2, c=2;
@@ -726,11 +733,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=401;
update test.t2 set d=d+1 where a=401;
update test.t3 set d=d+1 where a=401;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 4
205 5 5 3
@@ -740,76 +747,70 @@ connection default;
"================== Step 9 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 24
username event_name count_star
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 24
username event_name count_star
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
username event_name count_star
-user4 wait/io/table/sql/handler 65
+user4 wait/io/table/sql/handler 61
user4 wait/lock/table/sql/handler 24
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 24
-user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/io/table/sql/handler 35
user2 localhost wait/lock/table/sql/handler 24
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 24
-user4 localhost wait/io/table/sql/handler 65
+user4 localhost wait/io/table/sql/handler 61
user4 localhost wait/lock/table/sql/handler 24
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 24
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 24
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
-user4 wait/io/table/sql/handler 65
+user4 wait/io/table/sql/handler 61
user4 wait/lock/table/sql/handler 24
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 181
+localhost wait/io/table/sql/handler 167
localhost wait/lock/table/sql/handler 96
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 96
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 40 16 24 8 0 0 0 8 0 0 12
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 56 16 40 8 0 0 0 8 0 0 20
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 40 16 24 8 0 0 0 8 0 12
+TABLE test t3 56 16 40 8 0 0 0 8 0 20
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 93
+TABLE test t1 87
TABLE test t2 0
-TABLE test t3 184
+TABLE test t3 176
connection con1;
lock tables test.t1 read, test.t2 read, test.t3 read;
unlock tables;
@@ -819,301 +820,277 @@ connection default;
"================== Step 10 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 32
username event_name count_star
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 24
username event_name count_star
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
username event_name count_star
-user4 wait/io/table/sql/handler 65
+user4 wait/io/table/sql/handler 61
user4 wait/lock/table/sql/handler 24
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 32
-user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/io/table/sql/handler 35
user2 localhost wait/lock/table/sql/handler 24
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 24
-user4 localhost wait/io/table/sql/handler 65
+user4 localhost wait/io/table/sql/handler 61
user4 localhost wait/lock/table/sql/handler 24
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 32
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 24
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
-user4 wait/io/table/sql/handler 65
+user4 wait/io/table/sql/handler 61
user4 wait/lock/table/sql/handler 24
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 181
+localhost wait/io/table/sql/handler 167
localhost wait/lock/table/sql/handler 104
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 104
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
+TABLE test t1 91
TABLE test t2 0
-TABLE test t3 188
+TABLE test t3 180
connection default;
flush tables;
"================== flush marker =================="
"================== Step 11 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 32
username event_name count_star
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 24
username event_name count_star
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
username event_name count_star
-user4 wait/io/table/sql/handler 65
+user4 wait/io/table/sql/handler 61
user4 wait/lock/table/sql/handler 24
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 32
-user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/io/table/sql/handler 35
user2 localhost wait/lock/table/sql/handler 24
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 24
-user4 localhost wait/io/table/sql/handler 65
+user4 localhost wait/io/table/sql/handler 61
user4 localhost wait/lock/table/sql/handler 24
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 32
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 24
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
-user4 wait/io/table/sql/handler 65
+user4 wait/io/table/sql/handler 61
user4 wait/lock/table/sql/handler 24
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 181
+localhost wait/io/table/sql/handler 167
localhost wait/lock/table/sql/handler 104
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 104
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
+TABLE test t1 91
TABLE test t2 0
-TABLE test t3 188
+TABLE test t3 180
set global read_only=1;
set global read_only=0;
"================== global read_only marker =================="
"================== Step 12 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 32
username event_name count_star
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 24
username event_name count_star
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
username event_name count_star
-user4 wait/io/table/sql/handler 65
+user4 wait/io/table/sql/handler 61
user4 wait/lock/table/sql/handler 24
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 32
-user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/io/table/sql/handler 35
user2 localhost wait/lock/table/sql/handler 24
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 24
-user4 localhost wait/io/table/sql/handler 65
+user4 localhost wait/io/table/sql/handler 61
user4 localhost wait/lock/table/sql/handler 24
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 32
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 24
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
-user4 wait/io/table/sql/handler 65
+user4 wait/io/table/sql/handler 61
user4 wait/lock/table/sql/handler 24
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 181
+localhost wait/io/table/sql/handler 167
localhost wait/lock/table/sql/handler 104
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 104
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
+TABLE test t1 91
TABLE test t2 0
-TABLE test t3 188
+TABLE test t3 180
disconnect con1;
"================== Step 13 =================="
call dump_thread();
username status
user1 not found
username event_name count_star
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 24
username event_name count_star
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
username event_name count_star
-user4 wait/io/table/sql/handler 65
+user4 wait/io/table/sql/handler 61
user4 wait/lock/table/sql/handler 24
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 32
-user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/io/table/sql/handler 35
user2 localhost wait/lock/table/sql/handler 24
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 24
-user4 localhost wait/io/table/sql/handler 65
+user4 localhost wait/io/table/sql/handler 61
user4 localhost wait/lock/table/sql/handler 24
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 32
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 24
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
-user4 wait/io/table/sql/handler 65
+user4 wait/io/table/sql/handler 61
user4 wait/lock/table/sql/handler 24
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 181
+localhost wait/io/table/sql/handler 167
localhost wait/lock/table/sql/handler 104
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 104
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
+TABLE test t1 91
TABLE test t2 0
-TABLE test t3 188
+TABLE test t3 180
disconnect con2;
"================== Step 14 =================="
call dump_thread();
@@ -1122,70 +1099,64 @@ user1 not found
username status
user2 not found
username event_name count_star
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
username event_name count_star
-user4 wait/io/table/sql/handler 65
+user4 wait/io/table/sql/handler 61
user4 wait/lock/table/sql/handler 24
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 32
-user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/io/table/sql/handler 35
user2 localhost wait/lock/table/sql/handler 24
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 24
-user4 localhost wait/io/table/sql/handler 65
+user4 localhost wait/io/table/sql/handler 61
user4 localhost wait/lock/table/sql/handler 24
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 32
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 24
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
-user4 wait/io/table/sql/handler 65
+user4 wait/io/table/sql/handler 61
user4 wait/lock/table/sql/handler 24
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 181
+localhost wait/io/table/sql/handler 167
localhost wait/lock/table/sql/handler 104
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 104
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
+TABLE test t1 91
TABLE test t2 0
-TABLE test t3 188
+TABLE test t3 180
disconnect con3;
"================== Step 15 =================="
call dump_thread();
@@ -1196,67 +1167,61 @@ user2 not found
username status
user3 not found
username event_name count_star
-user4 wait/io/table/sql/handler 65
+user4 wait/io/table/sql/handler 61
user4 wait/lock/table/sql/handler 24
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 32
-user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/io/table/sql/handler 35
user2 localhost wait/lock/table/sql/handler 24
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 24
-user4 localhost wait/io/table/sql/handler 65
+user4 localhost wait/io/table/sql/handler 61
user4 localhost wait/lock/table/sql/handler 24
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 32
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 24
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
-user4 wait/io/table/sql/handler 65
+user4 wait/io/table/sql/handler 61
user4 wait/lock/table/sql/handler 24
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 181
+localhost wait/io/table/sql/handler 167
localhost wait/lock/table/sql/handler 104
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 104
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
+TABLE test t1 91
TABLE test t2 0
-TABLE test t3 188
+TABLE test t3 180
disconnect con4;
"================== Step 16 =================="
call dump_thread();
@@ -1270,63 +1235,57 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 32
-user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/io/table/sql/handler 35
user2 localhost wait/lock/table/sql/handler 24
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 24
-user4 localhost wait/io/table/sql/handler 65
+user4 localhost wait/io/table/sql/handler 61
user4 localhost wait/lock/table/sql/handler 24
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 32
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 24
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
-user4 wait/io/table/sql/handler 65
+user4 wait/io/table/sql/handler 61
user4 wait/lock/table/sql/handler 24
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 181
+localhost wait/io/table/sql/handler 167
localhost wait/lock/table/sql/handler 104
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 104
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
+TABLE test t1 91
TABLE test t2 0
-TABLE test t3 188
+TABLE test t3 180
connection default;
truncate performance_schema.events_waits_summary_by_thread_by_event_name;
"================== BY_THREAD truncated =================="
@@ -1342,63 +1301,57 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 32
-user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/io/table/sql/handler 35
user2 localhost wait/lock/table/sql/handler 24
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 24
-user4 localhost wait/io/table/sql/handler 65
+user4 localhost wait/io/table/sql/handler 61
user4 localhost wait/lock/table/sql/handler 24
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 32
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 24
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
-user4 wait/io/table/sql/handler 65
+user4 wait/io/table/sql/handler 61
user4 wait/lock/table/sql/handler 24
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 181
+localhost wait/io/table/sql/handler 167
localhost wait/lock/table/sql/handler 104
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 104
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
+TABLE test t1 91
TABLE test t2 0
-TABLE test t3 188
+TABLE test t3 180
truncate performance_schema.events_waits_summary_by_account_by_event_name;
"================== BY_ACCOUNT truncated =================="
"================== Step 18 =================="
@@ -1423,53 +1376,47 @@ user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 32
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 24
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 24
-user4 wait/io/table/sql/handler 65
+user4 wait/io/table/sql/handler 61
user4 wait/lock/table/sql/handler 24
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 181
+localhost wait/io/table/sql/handler 167
localhost wait/lock/table/sql/handler 104
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 104
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
+TABLE test t1 91
TABLE test t2 0
-TABLE test t3 188
+TABLE test t3 180
truncate performance_schema.events_waits_summary_by_user_by_event_name;
"================== BY_USER truncated =================="
"================== Step 19 =================="
@@ -1504,43 +1451,37 @@ user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 181
+localhost wait/io/table/sql/handler 167
localhost wait/lock/table/sql/handler 104
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 104
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
+TABLE test t1 91
TABLE test t2 0
-TABLE test t3 188
+TABLE test t3 180
truncate performance_schema.events_waits_summary_by_host_by_event_name;
"================== BY_HOST truncated =================="
"================== Step 21 =================="
@@ -1579,39 +1520,33 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 104
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
+TABLE test t1 91
TABLE test t2 0
-TABLE test t3 188
+TABLE test t3 180
truncate performance_schema.events_waits_summary_global_by_event_name;
"================== GLOBAL truncated =================="
"================== Step 21 =================="
@@ -1660,10 +1595,6 @@ TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
@@ -1671,19 +1602,17 @@ TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-show status like "performance_schema%";
+show global status like "performance_schema%";
Variable_name Value
Performance_schema_accounts_lost 0
Performance_schema_cond_classes_lost 0
@@ -1693,9 +1622,15 @@ Performance_schema_file_classes_lost 0
Performance_schema_file_handles_lost 0
Performance_schema_file_instances_lost 0
Performance_schema_hosts_lost 0
+Performance_schema_index_stat_lost 0
Performance_schema_locker_lost 0
+Performance_schema_memory_classes_lost 0
+Performance_schema_metadata_lock_lost 0
Performance_schema_mutex_classes_lost 0
Performance_schema_mutex_instances_lost 0
+Performance_schema_nested_statement_lost 0
+Performance_schema_prepared_statements_lost 0
+Performance_schema_program_lost 0
Performance_schema_rwlock_classes_lost 0
Performance_schema_rwlock_instances_lost 0
Performance_schema_session_connect_attrs_lost 0
@@ -1705,6 +1640,7 @@ Performance_schema_stage_classes_lost 0
Performance_schema_statement_classes_lost 0
Performance_schema_table_handles_lost 0
Performance_schema_table_instances_lost 0
+Performance_schema_table_lock_stat_lost 0
Performance_schema_thread_classes_lost 0
Performance_schema_thread_instances_lost 0
Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/table_aggregate_thread_4u_3t.result b/mysql-test/suite/perfschema/r/table_aggregate_thread_4u_3t.result
index 10736990dbe..603e5950b12 100644
--- a/mysql-test/suite/perfschema/r/table_aggregate_thread_4u_3t.result
+++ b/mysql-test/suite/perfschema/r/table_aggregate_thread_4u_3t.result
@@ -2,11 +2,11 @@ update performance_schema.setup_consumers
set enabled='NO' where name like 'event%';
select * from performance_schema.setup_actors
order by USER, HOST, ROLE;
-HOST USER ROLE
-localhost user1 %
-localhost user2 %
-localhost user3 %
-localhost user4 %
+HOST USER ROLE ENABLED HISTORY
+localhost user1 % YES YES
+localhost user2 % YES YES
+localhost user3 % YES YES
+localhost user4 % YES YES
select * from performance_schema.setup_objects
order by object_type, object_schema, object_name;
OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
@@ -21,6 +21,9 @@ events_stages_history_long NO
events_statements_current NO
events_statements_history NO
events_statements_history_long NO
+events_transactions_current NO
+events_transactions_history NO
+events_transactions_history_long NO
events_waits_current NO
events_waits_history NO
events_waits_history_long NO
@@ -64,15 +67,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -82,10 +82,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -127,15 +127,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -145,10 +142,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -179,18 +176,80 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=101;
update test.t2 set d=d+1 where a=101;
update test.t3 set d=d+1 where a=101;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 1
connection default;
-"================== Step 3 =================="
+"================== Step 3-A =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 33
+user1 wait/lock/table/sql/handler 36
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 33
+user1 localhost wait/lock/table/sql/handler 36
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 33
+user1 wait/lock/table/sql/handler 36
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 33
+localhost wait/lock/table/sql/handler 36
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 33
+wait/lock/table/sql/handler 36
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t2 NULL 9 5 4 5 2 2 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 1 1 0 1 0 0 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t2 10 6 4 6 2 2 0
+TABLE test t3 15 9 6 9 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t2 12 4 8 2 0 0 0 2 0 4
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 18
+TABLE test t2 22
+TABLE test t3 29
+connection con1;
+flush tables;
+"================== con1 FLUSH =================="
+connection default;
+"================== Step 3-B =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 36
username status
user2 not found
@@ -200,19 +259,19 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 36
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 36
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 37
+localhost wait/io/table/sql/handler 33
localhost wait/lock/table/sql/handler 36
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 37
+wait/io/table/sql/handler 33
wait/lock/table/sql/handler 36
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
@@ -222,29 +281,29 @@ TABLE test t1 NULL 6 4 2 4 1 1 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 2 1 1 1 0 1 0
-TABLE test t2 NULL 10 6 4 6 2 2 0
-TABLE test t2 index_b 1 1 0 1 0 0 0
+TABLE test t2 NULL 9 5 4 5 2 2 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 1 1 0 1 0 0 0
-TABLE test t3 NULL 14 8 6 8 3 3 0
-TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 1 1 0 1 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 8 5 3 5 1 2 0
-TABLE test t2 12 8 4 8 2 2 0
-TABLE test t3 17 11 6 11 3 3 0
+TABLE test t2 10 6 4 6 2 2 0
+TABLE test t3 15 9 6 9 3 3 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
-TABLE test t2 12 4 8 2 0 0 0 2 0 0 4
-TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t2 12 4 8 2 0 0 0 2 0 4
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 18
-TABLE test t2 24
-TABLE test t3 31
+TABLE test t2 22
+TABLE test t3 29
connect con2, localhost, user2, , ;
select concat(current_user(), " is connected") as status;
status
@@ -253,7 +312,7 @@ connection default;
"================== Step 4 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 36
username event_name count_star
user2 wait/io/table/sql/handler 0
@@ -264,23 +323,23 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 36
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 36
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 37
+localhost wait/io/table/sql/handler 33
localhost wait/lock/table/sql/handler 36
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 37
+wait/io/table/sql/handler 33
wait/lock/table/sql/handler 36
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
@@ -290,29 +349,29 @@ TABLE test t1 NULL 6 4 2 4 1 1 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 2 1 1 1 0 1 0
-TABLE test t2 NULL 10 6 4 6 2 2 0
-TABLE test t2 index_b 1 1 0 1 0 0 0
+TABLE test t2 NULL 9 5 4 5 2 2 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 1 1 0 1 0 0 0
-TABLE test t3 NULL 14 8 6 8 3 3 0
-TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 1 1 0 1 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 8 5 3 5 1 2 0
-TABLE test t2 12 8 4 8 2 2 0
-TABLE test t3 17 11 6 11 3 3 0
+TABLE test t2 10 6 4 6 2 2 0
+TABLE test t3 15 9 6 9 3 3 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
-TABLE test t2 12 4 8 2 0 0 0 2 0 0 4
-TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t2 12 4 8 2 0 0 0 2 0 4
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 18
-TABLE test t2 24
-TABLE test t3 31
+TABLE test t2 22
+TABLE test t3 29
connection con2;
insert into test.t1 set a=201, b=1, c=1;
insert into test.t2 set a=202, b=2, c=2;
@@ -344,11 +403,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=201;
update test.t2 set d=d+1 where a=201;
update test.t3 set d=d+1 where a=201;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 2
205 5 5 1
@@ -356,10 +415,10 @@ connection default;
"================== Step 5 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 36
username event_name count_star
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 36
username status
user3 not found
@@ -367,55 +426,55 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 36
-user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/io/table/sql/handler 51
user2 localhost wait/lock/table/sql/handler 36
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 36
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 36
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 94
+localhost wait/io/table/sql/handler 84
localhost wait/lock/table/sql/handler 72
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 94
+wait/io/table/sql/handler 84
wait/lock/table/sql/handler 72
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 15 10 5 10 2 3 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 14 9 5 9 2 3 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 26 16 10 16 4 6 0
-TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 NULL 24 14 10 14 4 6 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 2 2 0 2 0 0 0
-TABLE test t3 NULL 37 22 15 22 6 9 0
-TABLE test t3 index_b 5 5 0 5 0 0 0
+TABLE test t3 NULL 35 20 15 20 6 9 0
+TABLE test t3 index_b 3 3 0 3 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 20 13 7 13 2 5 0
-TABLE test t2 30 20 10 20 4 6 0
-TABLE test t3 44 29 15 29 6 9 0
+TABLE test t1 18 11 7 11 2 5 0
+TABLE test t2 26 16 10 16 4 6 0
+TABLE test t3 40 25 15 25 6 9 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
-TABLE test t2 24 8 16 4 0 0 0 4 0 0 8
-TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 6
+TABLE test t2 24 8 16 4 0 0 0 4 0 8
+TABLE test t3 28 8 20 4 0 0 0 4 0 10
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 40
-TABLE test t2 54
-TABLE test t3 72
+TABLE test t1 38
+TABLE test t2 50
+TABLE test t3 68
connect con3, localhost, user3, , ;
select concat(current_user(), " is connected") as status;
status
@@ -424,10 +483,10 @@ connection default;
"================== Step 6 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 36
username event_name count_star
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 36
username event_name count_star
user3 wait/io/table/sql/handler 0
@@ -436,59 +495,59 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 36
-user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/io/table/sql/handler 51
user2 localhost wait/lock/table/sql/handler 36
user3 localhost wait/io/table/sql/handler 0
user3 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 36
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 36
user3 wait/io/table/sql/handler 0
user3 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 94
+localhost wait/io/table/sql/handler 84
localhost wait/lock/table/sql/handler 72
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 94
+wait/io/table/sql/handler 84
wait/lock/table/sql/handler 72
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 15 10 5 10 2 3 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 14 9 5 9 2 3 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 26 16 10 16 4 6 0
-TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 NULL 24 14 10 14 4 6 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 2 2 0 2 0 0 0
-TABLE test t3 NULL 37 22 15 22 6 9 0
-TABLE test t3 index_b 5 5 0 5 0 0 0
+TABLE test t3 NULL 35 20 15 20 6 9 0
+TABLE test t3 index_b 3 3 0 3 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 20 13 7 13 2 5 0
-TABLE test t2 30 20 10 20 4 6 0
-TABLE test t3 44 29 15 29 6 9 0
+TABLE test t1 18 11 7 11 2 5 0
+TABLE test t2 26 16 10 16 4 6 0
+TABLE test t3 40 25 15 25 6 9 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
-TABLE test t2 24 8 16 4 0 0 0 4 0 0 8
-TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 6
+TABLE test t2 24 8 16 4 0 0 0 4 0 8
+TABLE test t3 28 8 20 4 0 0 0 4 0 10
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 40
-TABLE test t2 54
-TABLE test t3 72
+TABLE test t1 38
+TABLE test t2 50
+TABLE test t3 68
connection con3;
insert into test.t1 set a=301, b=1, c=1;
insert into test.t2 set a=302, b=2, c=2;
@@ -526,11 +585,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=301;
update test.t2 set d=d+1 where a=301;
update test.t3 set d=d+1 where a=301;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 3
205 5 5 2
@@ -539,71 +598,71 @@ connection default;
"================== Step 7 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 36
username event_name count_star
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 36
username event_name count_star
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 36
-user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/io/table/sql/handler 51
user2 localhost wait/lock/table/sql/handler 36
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 36
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 36
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 36
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 170
+localhost wait/io/table/sql/handler 154
localhost wait/lock/table/sql/handler 108
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 170
+wait/io/table/sql/handler 154
wait/lock/table/sql/handler 108
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 27 18 9 18 3 6 0
-TABLE test t1 index_b 2 2 0 2 0 0 0
+TABLE test t1 NULL 25 16 9 16 3 6 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 6 3 3 3 0 3 0
-TABLE test t2 NULL 48 30 18 30 6 12 0
-TABLE test t2 index_b 3 3 0 3 0 0 0
+TABLE test t2 NULL 45 27 18 27 6 12 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 3 3 0 3 0 0 0
-TABLE test t3 NULL 69 42 27 42 9 18 0
-TABLE test t3 index_b 9 9 0 9 0 0 0
+TABLE test t3 NULL 66 39 27 39 9 18 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 3 3 0 3 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 35 23 12 23 3 9 0
-TABLE test t2 54 36 18 36 6 12 0
-TABLE test t3 81 54 27 54 9 18 0
+TABLE test t1 31 19 12 19 3 9 0
+TABLE test t2 48 30 18 30 6 12 0
+TABLE test t3 75 48 27 48 9 18 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 30 12 18 6 0 0 0 6 0 0 9
-TABLE test t2 36 12 24 6 0 0 0 6 0 0 12
-TABLE test t3 42 12 30 6 0 0 0 6 0 0 15
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 30 12 18 6 0 0 0 6 0 9
+TABLE test t2 36 12 24 6 0 0 0 6 0 12
+TABLE test t3 42 12 30 6 0 0 0 6 0 15
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 65
-TABLE test t2 90
-TABLE test t3 123
+TABLE test t1 61
+TABLE test t2 84
+TABLE test t3 117
connect con4, localhost, user4, , ;
select concat(current_user(), " is connected") as status;
status
@@ -612,76 +671,76 @@ connection default;
"================== Step 8 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 36
username event_name count_star
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 36
username event_name count_star
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
username event_name count_star
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 36
-user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/io/table/sql/handler 51
user2 localhost wait/lock/table/sql/handler 36
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 36
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 36
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 36
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 170
+localhost wait/io/table/sql/handler 154
localhost wait/lock/table/sql/handler 108
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 170
+wait/io/table/sql/handler 154
wait/lock/table/sql/handler 108
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 27 18 9 18 3 6 0
-TABLE test t1 index_b 2 2 0 2 0 0 0
+TABLE test t1 NULL 25 16 9 16 3 6 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 6 3 3 3 0 3 0
-TABLE test t2 NULL 48 30 18 30 6 12 0
-TABLE test t2 index_b 3 3 0 3 0 0 0
+TABLE test t2 NULL 45 27 18 27 6 12 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 3 3 0 3 0 0 0
-TABLE test t3 NULL 69 42 27 42 9 18 0
-TABLE test t3 index_b 9 9 0 9 0 0 0
+TABLE test t3 NULL 66 39 27 39 9 18 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 3 3 0 3 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 35 23 12 23 3 9 0
-TABLE test t2 54 36 18 36 6 12 0
-TABLE test t3 81 54 27 54 9 18 0
+TABLE test t1 31 19 12 19 3 9 0
+TABLE test t2 48 30 18 30 6 12 0
+TABLE test t3 75 48 27 48 9 18 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 30 12 18 6 0 0 0 6 0 0 9
-TABLE test t2 36 12 24 6 0 0 0 6 0 0 12
-TABLE test t3 42 12 30 6 0 0 0 6 0 0 15
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 30 12 18 6 0 0 0 6 0 9
+TABLE test t2 36 12 24 6 0 0 0 6 0 12
+TABLE test t3 42 12 30 6 0 0 0 6 0 15
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 65
-TABLE test t2 90
-TABLE test t3 123
+TABLE test t1 61
+TABLE test t2 84
+TABLE test t3 117
connection con4;
insert into test.t1 set a=401, b=1, c=1;
insert into test.t2 set a=402, b=2, c=2;
@@ -725,11 +784,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=401;
update test.t2 set d=d+1 where a=401;
update test.t3 set d=d+1 where a=401;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 4
205 5 5 3
@@ -739,76 +798,76 @@ connection default;
"================== Step 9 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 36
username event_name count_star
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 36
username event_name count_star
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
username event_name count_star
-user4 wait/io/table/sql/handler 95
+user4 wait/io/table/sql/handler 89
user4 wait/lock/table/sql/handler 36
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 36
-user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/io/table/sql/handler 51
user2 localhost wait/lock/table/sql/handler 36
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 36
-user4 localhost wait/io/table/sql/handler 95
+user4 localhost wait/io/table/sql/handler 89
user4 localhost wait/lock/table/sql/handler 36
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 36
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 36
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
-user4 wait/io/table/sql/handler 95
+user4 wait/io/table/sql/handler 89
user4 wait/lock/table/sql/handler 36
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 265
+localhost wait/io/table/sql/handler 243
localhost wait/lock/table/sql/handler 144
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 144
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 40 16 24 8 0 0 0 8 0 0 12
-TABLE test t2 48 16 32 8 0 0 0 8 0 0 16
-TABLE test t3 56 16 40 8 0 0 0 8 0 0 20
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 40 16 24 8 0 0 0 8 0 12
+TABLE test t2 48 16 32 8 0 0 0 8 0 16
+TABLE test t3 56 16 40 8 0 0 0 8 0 20
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 93
-TABLE test t2 132
-TABLE test t3 184
+TABLE test t1 87
+TABLE test t2 124
+TABLE test t3 176
connection con1;
lock tables test.t1 read, test.t2 read, test.t3 read;
unlock tables;
@@ -818,301 +877,301 @@ connection default;
"================== Step 10 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 48
username event_name count_star
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 36
username event_name count_star
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
username event_name count_star
-user4 wait/io/table/sql/handler 95
+user4 wait/io/table/sql/handler 89
user4 wait/lock/table/sql/handler 36
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 48
-user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/io/table/sql/handler 51
user2 localhost wait/lock/table/sql/handler 36
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 36
-user4 localhost wait/io/table/sql/handler 95
+user4 localhost wait/io/table/sql/handler 89
user4 localhost wait/lock/table/sql/handler 36
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 48
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 36
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
-user4 wait/io/table/sql/handler 95
+user4 wait/io/table/sql/handler 89
user4 wait/lock/table/sql/handler 36
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 265
+localhost wait/io/table/sql/handler 243
localhost wait/lock/table/sql/handler 156
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 156
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
-TABLE test t2 136
-TABLE test t3 188
+TABLE test t1 91
+TABLE test t2 128
+TABLE test t3 180
connection default;
flush tables;
"================== flush marker =================="
"================== Step 11 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 48
username event_name count_star
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 36
username event_name count_star
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
username event_name count_star
-user4 wait/io/table/sql/handler 95
+user4 wait/io/table/sql/handler 89
user4 wait/lock/table/sql/handler 36
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 48
-user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/io/table/sql/handler 51
user2 localhost wait/lock/table/sql/handler 36
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 36
-user4 localhost wait/io/table/sql/handler 95
+user4 localhost wait/io/table/sql/handler 89
user4 localhost wait/lock/table/sql/handler 36
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 48
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 36
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
-user4 wait/io/table/sql/handler 95
+user4 wait/io/table/sql/handler 89
user4 wait/lock/table/sql/handler 36
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 265
+localhost wait/io/table/sql/handler 243
localhost wait/lock/table/sql/handler 156
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 156
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
-TABLE test t2 136
-TABLE test t3 188
+TABLE test t1 91
+TABLE test t2 128
+TABLE test t3 180
set global read_only=1;
set global read_only=0;
"================== global read_only marker =================="
"================== Step 12 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 48
username event_name count_star
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 36
username event_name count_star
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
username event_name count_star
-user4 wait/io/table/sql/handler 95
+user4 wait/io/table/sql/handler 89
user4 wait/lock/table/sql/handler 36
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 48
-user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/io/table/sql/handler 51
user2 localhost wait/lock/table/sql/handler 36
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 36
-user4 localhost wait/io/table/sql/handler 95
+user4 localhost wait/io/table/sql/handler 89
user4 localhost wait/lock/table/sql/handler 36
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 48
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 36
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
-user4 wait/io/table/sql/handler 95
+user4 wait/io/table/sql/handler 89
user4 wait/lock/table/sql/handler 36
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 265
+localhost wait/io/table/sql/handler 243
localhost wait/lock/table/sql/handler 156
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 156
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
-TABLE test t2 136
-TABLE test t3 188
+TABLE test t1 91
+TABLE test t2 128
+TABLE test t3 180
disconnect con1;
"================== Step 13 =================="
call dump_thread();
username status
user1 not found
username event_name count_star
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 36
username event_name count_star
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
username event_name count_star
-user4 wait/io/table/sql/handler 95
+user4 wait/io/table/sql/handler 89
user4 wait/lock/table/sql/handler 36
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 48
-user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/io/table/sql/handler 51
user2 localhost wait/lock/table/sql/handler 36
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 36
-user4 localhost wait/io/table/sql/handler 95
+user4 localhost wait/io/table/sql/handler 89
user4 localhost wait/lock/table/sql/handler 36
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 48
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 36
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
-user4 wait/io/table/sql/handler 95
+user4 wait/io/table/sql/handler 89
user4 wait/lock/table/sql/handler 36
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 265
+localhost wait/io/table/sql/handler 243
localhost wait/lock/table/sql/handler 156
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 156
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
-TABLE test t2 136
-TABLE test t3 188
+TABLE test t1 91
+TABLE test t2 128
+TABLE test t3 180
disconnect con2;
"================== Step 14 =================="
call dump_thread();
@@ -1121,70 +1180,70 @@ user1 not found
username status
user2 not found
username event_name count_star
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
username event_name count_star
-user4 wait/io/table/sql/handler 95
+user4 wait/io/table/sql/handler 89
user4 wait/lock/table/sql/handler 36
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 48
-user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/io/table/sql/handler 51
user2 localhost wait/lock/table/sql/handler 36
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 36
-user4 localhost wait/io/table/sql/handler 95
+user4 localhost wait/io/table/sql/handler 89
user4 localhost wait/lock/table/sql/handler 36
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 48
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 36
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
-user4 wait/io/table/sql/handler 95
+user4 wait/io/table/sql/handler 89
user4 wait/lock/table/sql/handler 36
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 265
+localhost wait/io/table/sql/handler 243
localhost wait/lock/table/sql/handler 156
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 156
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
-TABLE test t2 136
-TABLE test t3 188
+TABLE test t1 91
+TABLE test t2 128
+TABLE test t3 180
disconnect con3;
"================== Step 15 =================="
call dump_thread();
@@ -1195,67 +1254,67 @@ user2 not found
username status
user3 not found
username event_name count_star
-user4 wait/io/table/sql/handler 95
+user4 wait/io/table/sql/handler 89
user4 wait/lock/table/sql/handler 36
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 48
-user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/io/table/sql/handler 51
user2 localhost wait/lock/table/sql/handler 36
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 36
-user4 localhost wait/io/table/sql/handler 95
+user4 localhost wait/io/table/sql/handler 89
user4 localhost wait/lock/table/sql/handler 36
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 48
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 36
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
-user4 wait/io/table/sql/handler 95
+user4 wait/io/table/sql/handler 89
user4 wait/lock/table/sql/handler 36
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 265
+localhost wait/io/table/sql/handler 243
localhost wait/lock/table/sql/handler 156
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 156
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
-TABLE test t2 136
-TABLE test t3 188
+TABLE test t1 91
+TABLE test t2 128
+TABLE test t3 180
disconnect con4;
"================== Step 16 =================="
call dump_thread();
@@ -1269,63 +1328,63 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 48
-user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/io/table/sql/handler 51
user2 localhost wait/lock/table/sql/handler 36
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 36
-user4 localhost wait/io/table/sql/handler 95
+user4 localhost wait/io/table/sql/handler 89
user4 localhost wait/lock/table/sql/handler 36
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 48
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 36
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
-user4 wait/io/table/sql/handler 95
+user4 wait/io/table/sql/handler 89
user4 wait/lock/table/sql/handler 36
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 265
+localhost wait/io/table/sql/handler 243
localhost wait/lock/table/sql/handler 156
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 156
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
-TABLE test t2 136
-TABLE test t3 188
+TABLE test t1 91
+TABLE test t2 128
+TABLE test t3 180
connection default;
truncate performance_schema.events_waits_summary_by_thread_by_event_name;
"================== BY_THREAD truncated =================="
@@ -1341,63 +1400,63 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 48
-user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/io/table/sql/handler 51
user2 localhost wait/lock/table/sql/handler 36
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 36
-user4 localhost wait/io/table/sql/handler 95
+user4 localhost wait/io/table/sql/handler 89
user4 localhost wait/lock/table/sql/handler 36
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 48
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 36
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
-user4 wait/io/table/sql/handler 95
+user4 wait/io/table/sql/handler 89
user4 wait/lock/table/sql/handler 36
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 265
+localhost wait/io/table/sql/handler 243
localhost wait/lock/table/sql/handler 156
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 156
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
-TABLE test t2 136
-TABLE test t3 188
+TABLE test t1 91
+TABLE test t2 128
+TABLE test t3 180
truncate performance_schema.events_waits_summary_by_account_by_event_name;
"================== BY_ACCOUNT truncated =================="
"================== Step 18 =================="
@@ -1422,53 +1481,53 @@ user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 48
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 36
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 36
-user4 wait/io/table/sql/handler 95
+user4 wait/io/table/sql/handler 89
user4 wait/lock/table/sql/handler 36
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 265
+localhost wait/io/table/sql/handler 243
localhost wait/lock/table/sql/handler 156
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 156
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
-TABLE test t2 136
-TABLE test t3 188
+TABLE test t1 91
+TABLE test t2 128
+TABLE test t3 180
truncate performance_schema.events_waits_summary_by_user_by_event_name;
"================== BY_USER truncated =================="
"================== Step 19 =================="
@@ -1503,43 +1562,43 @@ user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 265
+localhost wait/io/table/sql/handler 243
localhost wait/lock/table/sql/handler 156
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 156
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
-TABLE test t2 136
-TABLE test t3 188
+TABLE test t1 91
+TABLE test t2 128
+TABLE test t3 180
truncate performance_schema.events_waits_summary_by_host_by_event_name;
"================== BY_HOST truncated =================="
"================== Step 21 =================="
@@ -1578,39 +1637,39 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 156
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 97
-TABLE test t2 136
-TABLE test t3 188
+TABLE test t1 91
+TABLE test t2 128
+TABLE test t3 180
truncate performance_schema.events_waits_summary_global_by_event_name;
"================== GLOBAL truncated =================="
"================== Step 21 =================="
@@ -1673,16 +1732,16 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-show status like "performance_schema%";
+show global status like "performance_schema%";
Variable_name Value
Performance_schema_accounts_lost 0
Performance_schema_cond_classes_lost 0
@@ -1692,9 +1751,15 @@ Performance_schema_file_classes_lost 0
Performance_schema_file_handles_lost 0
Performance_schema_file_instances_lost 0
Performance_schema_hosts_lost 0
+Performance_schema_index_stat_lost 0
Performance_schema_locker_lost 0
+Performance_schema_memory_classes_lost 0
+Performance_schema_metadata_lock_lost 0
Performance_schema_mutex_classes_lost 0
Performance_schema_mutex_instances_lost 0
+Performance_schema_nested_statement_lost 0
+Performance_schema_prepared_statements_lost 0
+Performance_schema_program_lost 0
Performance_schema_rwlock_classes_lost 0
Performance_schema_rwlock_instances_lost 0
Performance_schema_session_connect_attrs_lost 0
@@ -1704,6 +1769,7 @@ Performance_schema_stage_classes_lost 0
Performance_schema_statement_classes_lost 0
Performance_schema_table_handles_lost 0
Performance_schema_table_instances_lost 0
+Performance_schema_table_lock_stat_lost 0
Performance_schema_thread_classes_lost 0
Performance_schema_thread_instances_lost 0
Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/table_io_aggregate_global_2u_2t.result b/mysql-test/suite/perfschema/r/table_io_aggregate_global_2u_2t.result
index a8fd0a7eb72..abecba095bb 100644
--- a/mysql-test/suite/perfschema/r/table_io_aggregate_global_2u_2t.result
+++ b/mysql-test/suite/perfschema/r/table_io_aggregate_global_2u_2t.result
@@ -8,9 +8,9 @@ delete from performance_schema.setup_objects
where object_name='t2';
select * from performance_schema.setup_actors
order by USER, HOST, ROLE;
-HOST USER ROLE
-localhost user1 %
-localhost user3 %
+HOST USER ROLE ENABLED HISTORY
+localhost user1 % YES YES
+localhost user3 % YES YES
select * from performance_schema.setup_objects
order by object_type, object_schema, object_name;
OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
@@ -24,6 +24,9 @@ events_stages_history_long YES
events_statements_current YES
events_statements_history YES
events_statements_history_long YES
+events_transactions_current YES
+events_transactions_history YES
+events_transactions_history_long YES
events_waits_current YES
events_waits_history YES
events_waits_history_long YES
@@ -67,28 +70,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -130,28 +125,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -182,15 +169,71 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=101;
update test.t2 set d=d+1 where a=101;
update test.t3 set d=d+1 where a=101;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 1
connection default;
-"================== Step 3 =================="
+"================== Step 3-A =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 23
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t3 15 9 6 9 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 8
+TABLE test t2 0
+TABLE test t3 15
+connection con1;
+flush tables;
+"================== con1 FLUSH =================="
+connection default;
+"================== Step 3-B =================="
call dump_thread();
username event_name count_star
user1 wait/io/table/sql/handler 0
@@ -215,7 +258,7 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 25
+wait/io/table/sql/handler 23
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
@@ -225,29 +268,23 @@ TABLE test t1 NULL 6 4 2 4 1 1 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 2 1 1 1 0 1 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 14 8 6 8 3 3 0
-TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 1 1 0 1 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 8 5 3 5 1 2 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 17 11 6 11 3 3 0
+TABLE test t3 15 9 6 9 3 3 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 8
TABLE test t2 0
-TABLE test t3 17
+TABLE test t3 15
connect con2, localhost, user2, , ;
select concat(current_user(), " is connected") as status;
status
@@ -283,7 +320,7 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 25
+wait/io/table/sql/handler 23
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
@@ -293,29 +330,23 @@ TABLE test t1 NULL 6 4 2 4 1 1 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 2 1 1 1 0 1 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 14 8 6 8 3 3 0
-TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 1 1 0 1 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 8 5 3 5 1 2 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 17 11 6 11 3 3 0
+TABLE test t3 15 9 6 9 3 3 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 8
TABLE test t2 0
-TABLE test t3 17
+TABLE test t3 15
connection con2;
insert into test.t1 set a=201, b=1, c=1;
insert into test.t2 set a=202, b=2, c=2;
@@ -347,11 +378,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=201;
update test.t2 set d=d+1 where a=201;
update test.t3 set d=d+1 where a=201;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 2
205 5 5 1
@@ -386,39 +417,33 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 64
+wait/io/table/sql/handler 58
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 15 10 5 10 2 3 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 14 9 5 9 2 3 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 37 22 15 22 6 9 0
-TABLE test t3 index_b 5 5 0 5 0 0 0
+TABLE test t3 NULL 35 20 15 20 6 9 0
+TABLE test t3 index_b 3 3 0 3 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 20 13 7 13 2 5 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 44 29 15 29 6 9 0
+TABLE test t1 18 11 7 11 2 5 0
+TABLE test t3 40 25 15 25 6 9 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 20
+TABLE test t1 18
TABLE test t2 0
-TABLE test t3 44
+TABLE test t3 40
connect con3, localhost, user3, , ;
select concat(current_user(), " is connected") as status;
status
@@ -459,39 +484,33 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 64
+wait/io/table/sql/handler 58
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 15 10 5 10 2 3 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 14 9 5 9 2 3 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 37 22 15 22 6 9 0
-TABLE test t3 index_b 5 5 0 5 0 0 0
+TABLE test t3 NULL 35 20 15 20 6 9 0
+TABLE test t3 index_b 3 3 0 3 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 20 13 7 13 2 5 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 44 29 15 29 6 9 0
+TABLE test t1 18 11 7 11 2 5 0
+TABLE test t3 40 25 15 25 6 9 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 20
+TABLE test t1 18
TABLE test t2 0
-TABLE test t3 44
+TABLE test t3 40
connection con3;
insert into test.t1 set a=301, b=1, c=1;
insert into test.t2 set a=302, b=2, c=2;
@@ -529,11 +548,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=301;
update test.t2 set d=d+1 where a=301;
update test.t3 set d=d+1 where a=301;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 3
205 5 5 2
@@ -574,39 +593,33 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 116
+wait/io/table/sql/handler 106
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 27 18 9 18 3 6 0
-TABLE test t1 index_b 2 2 0 2 0 0 0
+TABLE test t1 NULL 25 16 9 16 3 6 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 6 3 3 3 0 3 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 69 42 27 42 9 18 0
-TABLE test t3 index_b 9 9 0 9 0 0 0
+TABLE test t3 NULL 66 39 27 39 9 18 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 3 3 0 3 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 35 23 12 23 3 9 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 81 54 27 54 9 18 0
+TABLE test t1 31 19 12 19 3 9 0
+TABLE test t3 75 48 27 48 9 18 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 35
+TABLE test t1 31
TABLE test t2 0
-TABLE test t3 81
+TABLE test t3 75
connect con4, localhost, user4, , ;
select concat(current_user(), " is connected") as status;
status
@@ -652,39 +665,33 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 116
+wait/io/table/sql/handler 106
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 27 18 9 18 3 6 0
-TABLE test t1 index_b 2 2 0 2 0 0 0
+TABLE test t1 NULL 25 16 9 16 3 6 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 6 3 3 3 0 3 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 69 42 27 42 9 18 0
-TABLE test t3 index_b 9 9 0 9 0 0 0
+TABLE test t3 NULL 66 39 27 39 9 18 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 3 3 0 3 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 35 23 12 23 3 9 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 81 54 27 54 9 18 0
+TABLE test t1 31 19 12 19 3 9 0
+TABLE test t3 75 48 27 48 9 18 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 35
+TABLE test t1 31
TABLE test t2 0
-TABLE test t3 81
+TABLE test t3 75
connection con4;
insert into test.t1 set a=401, b=1, c=1;
insert into test.t2 set a=402, b=2, c=2;
@@ -728,11 +735,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=401;
update test.t2 set d=d+1 where a=401;
update test.t3 set d=d+1 where a=401;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 4
205 5 5 3
@@ -779,39 +786,33 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
+TABLE test t1 47
TABLE test t2 0
-TABLE test t3 128
+TABLE test t3 120
connection con1;
lock tables test.t1 read, test.t2 read, test.t3 read;
unlock tables;
@@ -858,39 +859,33 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
+TABLE test t1 47
TABLE test t2 0
-TABLE test t3 128
+TABLE test t3 120
connection default;
flush tables;
"================== flush marker =================="
@@ -934,39 +929,33 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
+TABLE test t1 47
TABLE test t2 0
-TABLE test t3 128
+TABLE test t3 120
set global read_only=1;
set global read_only=0;
"================== global read_only marker =================="
@@ -1010,39 +999,33 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
+TABLE test t1 47
TABLE test t2 0
-TABLE test t3 128
+TABLE test t3 120
disconnect con1;
"================== Step 13 =================="
call dump_thread();
@@ -1083,39 +1066,33 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
+TABLE test t1 47
TABLE test t2 0
-TABLE test t3 128
+TABLE test t3 120
disconnect con2;
"================== Step 14 =================="
call dump_thread();
@@ -1155,39 +1132,33 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
+TABLE test t1 47
TABLE test t2 0
-TABLE test t3 128
+TABLE test t3 120
disconnect con3;
"================== Step 15 =================="
call dump_thread();
@@ -1226,39 +1197,33 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
+TABLE test t1 47
TABLE test t2 0
-TABLE test t3 128
+TABLE test t3 120
disconnect con4;
"================== Step 16 =================="
call dump_thread();
@@ -1296,39 +1261,33 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
+TABLE test t1 47
TABLE test t2 0
-TABLE test t3 128
+TABLE test t3 120
connection default;
truncate performance_schema.events_waits_summary_by_thread_by_event_name;
"================== BY_THREAD truncated =================="
@@ -1368,39 +1327,33 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
+TABLE test t1 47
TABLE test t2 0
-TABLE test t3 128
+TABLE test t3 120
truncate performance_schema.events_waits_summary_by_account_by_event_name;
"================== BY_ACCOUNT truncated =================="
"================== Step 18 =================="
@@ -1439,39 +1392,33 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
+TABLE test t1 47
TABLE test t2 0
-TABLE test t3 128
+TABLE test t3 120
truncate performance_schema.events_waits_summary_by_user_by_event_name;
"================== BY_USER truncated =================="
"================== Step 19 =================="
@@ -1510,39 +1457,33 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
+TABLE test t1 47
TABLE test t2 0
-TABLE test t3 128
+TABLE test t3 120
truncate performance_schema.events_waits_summary_by_host_by_event_name;
"================== BY_HOST truncated =================="
"================== Step 21 =================="
@@ -1581,39 +1522,33 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
+TABLE test t1 47
TABLE test t2 0
-TABLE test t3 128
+TABLE test t3 120
truncate performance_schema.events_waits_summary_global_by_event_name;
"================== GLOBAL truncated =================="
"================== Step 21 =================="
@@ -1662,10 +1597,6 @@ TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
@@ -1673,19 +1604,17 @@ TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-show status like "performance_schema%";
+show global status like "performance_schema%";
Variable_name Value
Performance_schema_accounts_lost 0
Performance_schema_cond_classes_lost 0
@@ -1695,9 +1624,15 @@ Performance_schema_file_classes_lost 0
Performance_schema_file_handles_lost 0
Performance_schema_file_instances_lost 0
Performance_schema_hosts_lost 0
+Performance_schema_index_stat_lost 0
Performance_schema_locker_lost 0
+Performance_schema_memory_classes_lost 0
+Performance_schema_metadata_lock_lost 0
Performance_schema_mutex_classes_lost 0
Performance_schema_mutex_instances_lost 0
+Performance_schema_nested_statement_lost 0
+Performance_schema_prepared_statements_lost 0
+Performance_schema_program_lost 0
Performance_schema_rwlock_classes_lost 0
Performance_schema_rwlock_instances_lost 0
Performance_schema_session_connect_attrs_lost 0
@@ -1707,6 +1642,7 @@ Performance_schema_stage_classes_lost 0
Performance_schema_statement_classes_lost 0
Performance_schema_table_handles_lost 0
Performance_schema_table_instances_lost 0
+Performance_schema_table_lock_stat_lost 0
Performance_schema_thread_classes_lost 0
Performance_schema_thread_instances_lost 0
Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/table_io_aggregate_global_2u_3t.result b/mysql-test/suite/perfschema/r/table_io_aggregate_global_2u_3t.result
index 701a25194f4..6df4cad7899 100644
--- a/mysql-test/suite/perfschema/r/table_io_aggregate_global_2u_3t.result
+++ b/mysql-test/suite/perfschema/r/table_io_aggregate_global_2u_3t.result
@@ -6,9 +6,9 @@ delete from performance_schema.setup_actors
where user in ('user2', 'user4');
select * from performance_schema.setup_actors
order by USER, HOST, ROLE;
-HOST USER ROLE
-localhost user1 %
-localhost user3 %
+HOST USER ROLE ENABLED HISTORY
+localhost user1 % YES YES
+localhost user3 % YES YES
select * from performance_schema.setup_objects
order by object_type, object_schema, object_name;
OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
@@ -23,6 +23,9 @@ events_stages_history_long YES
events_statements_current YES
events_statements_history YES
events_statements_history_long YES
+events_transactions_current YES
+events_transactions_history YES
+events_transactions_history_long YES
events_waits_current YES
events_waits_history YES
events_waits_history_long YES
@@ -66,15 +69,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -84,10 +84,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -129,15 +129,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -147,10 +144,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -181,15 +178,77 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=101;
update test.t2 set d=d+1 where a=101;
update test.t3 set d=d+1 where a=101;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 1
connection default;
-"================== Step 3 =================="
+"================== Step 3-A =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 33
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t2 NULL 9 5 4 5 2 2 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 1 1 0 1 0 0 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t2 10 6 4 6 2 2 0
+TABLE test t3 15 9 6 9 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 8
+TABLE test t2 10
+TABLE test t3 15
+connection con1;
+flush tables;
+"================== con1 FLUSH =================="
+connection default;
+"================== Step 3-B =================="
call dump_thread();
username event_name count_star
user1 wait/io/table/sql/handler 0
@@ -214,7 +273,7 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 37
+wait/io/table/sql/handler 33
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
@@ -224,29 +283,29 @@ TABLE test t1 NULL 6 4 2 4 1 1 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 2 1 1 1 0 1 0
-TABLE test t2 NULL 10 6 4 6 2 2 0
-TABLE test t2 index_b 1 1 0 1 0 0 0
+TABLE test t2 NULL 9 5 4 5 2 2 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 1 1 0 1 0 0 0
-TABLE test t3 NULL 14 8 6 8 3 3 0
-TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 1 1 0 1 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 8 5 3 5 1 2 0
-TABLE test t2 12 8 4 8 2 2 0
-TABLE test t3 17 11 6 11 3 3 0
+TABLE test t2 10 6 4 6 2 2 0
+TABLE test t3 15 9 6 9 3 3 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 8
-TABLE test t2 12
-TABLE test t3 17
+TABLE test t2 10
+TABLE test t3 15
connect con2, localhost, user2, , ;
select concat(current_user(), " is connected") as status;
status
@@ -282,7 +341,7 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 37
+wait/io/table/sql/handler 33
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
@@ -292,29 +351,29 @@ TABLE test t1 NULL 6 4 2 4 1 1 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 2 1 1 1 0 1 0
-TABLE test t2 NULL 10 6 4 6 2 2 0
-TABLE test t2 index_b 1 1 0 1 0 0 0
+TABLE test t2 NULL 9 5 4 5 2 2 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 1 1 0 1 0 0 0
-TABLE test t3 NULL 14 8 6 8 3 3 0
-TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 1 1 0 1 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 8 5 3 5 1 2 0
-TABLE test t2 12 8 4 8 2 2 0
-TABLE test t3 17 11 6 11 3 3 0
+TABLE test t2 10 6 4 6 2 2 0
+TABLE test t3 15 9 6 9 3 3 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 8
-TABLE test t2 12
-TABLE test t3 17
+TABLE test t2 10
+TABLE test t3 15
connection con2;
insert into test.t1 set a=201, b=1, c=1;
insert into test.t2 set a=202, b=2, c=2;
@@ -346,11 +405,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=201;
update test.t2 set d=d+1 where a=201;
update test.t3 set d=d+1 where a=201;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 2
205 5 5 1
@@ -385,39 +444,39 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 94
+wait/io/table/sql/handler 84
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 15 10 5 10 2 3 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 14 9 5 9 2 3 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 26 16 10 16 4 6 0
-TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 NULL 24 14 10 14 4 6 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 2 2 0 2 0 0 0
-TABLE test t3 NULL 37 22 15 22 6 9 0
-TABLE test t3 index_b 5 5 0 5 0 0 0
+TABLE test t3 NULL 35 20 15 20 6 9 0
+TABLE test t3 index_b 3 3 0 3 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 20 13 7 13 2 5 0
-TABLE test t2 30 20 10 20 4 6 0
-TABLE test t3 44 29 15 29 6 9 0
+TABLE test t1 18 11 7 11 2 5 0
+TABLE test t2 26 16 10 16 4 6 0
+TABLE test t3 40 25 15 25 6 9 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 20
-TABLE test t2 30
-TABLE test t3 44
+TABLE test t1 18
+TABLE test t2 26
+TABLE test t3 40
connect con3, localhost, user3, , ;
select concat(current_user(), " is connected") as status;
status
@@ -458,39 +517,39 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 94
+wait/io/table/sql/handler 84
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 15 10 5 10 2 3 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 14 9 5 9 2 3 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 26 16 10 16 4 6 0
-TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 NULL 24 14 10 14 4 6 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 2 2 0 2 0 0 0
-TABLE test t3 NULL 37 22 15 22 6 9 0
-TABLE test t3 index_b 5 5 0 5 0 0 0
+TABLE test t3 NULL 35 20 15 20 6 9 0
+TABLE test t3 index_b 3 3 0 3 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 20 13 7 13 2 5 0
-TABLE test t2 30 20 10 20 4 6 0
-TABLE test t3 44 29 15 29 6 9 0
+TABLE test t1 18 11 7 11 2 5 0
+TABLE test t2 26 16 10 16 4 6 0
+TABLE test t3 40 25 15 25 6 9 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 20
-TABLE test t2 30
-TABLE test t3 44
+TABLE test t1 18
+TABLE test t2 26
+TABLE test t3 40
connection con3;
insert into test.t1 set a=301, b=1, c=1;
insert into test.t2 set a=302, b=2, c=2;
@@ -528,11 +587,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=301;
update test.t2 set d=d+1 where a=301;
update test.t3 set d=d+1 where a=301;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 3
205 5 5 2
@@ -573,39 +632,39 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 170
+wait/io/table/sql/handler 154
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 27 18 9 18 3 6 0
-TABLE test t1 index_b 2 2 0 2 0 0 0
+TABLE test t1 NULL 25 16 9 16 3 6 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 6 3 3 3 0 3 0
-TABLE test t2 NULL 48 30 18 30 6 12 0
-TABLE test t2 index_b 3 3 0 3 0 0 0
+TABLE test t2 NULL 45 27 18 27 6 12 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 3 3 0 3 0 0 0
-TABLE test t3 NULL 69 42 27 42 9 18 0
-TABLE test t3 index_b 9 9 0 9 0 0 0
+TABLE test t3 NULL 66 39 27 39 9 18 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 3 3 0 3 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 35 23 12 23 3 9 0
-TABLE test t2 54 36 18 36 6 12 0
-TABLE test t3 81 54 27 54 9 18 0
+TABLE test t1 31 19 12 19 3 9 0
+TABLE test t2 48 30 18 30 6 12 0
+TABLE test t3 75 48 27 48 9 18 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 35
-TABLE test t2 54
-TABLE test t3 81
+TABLE test t1 31
+TABLE test t2 48
+TABLE test t3 75
connect con4, localhost, user4, , ;
select concat(current_user(), " is connected") as status;
status
@@ -651,39 +710,39 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 170
+wait/io/table/sql/handler 154
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 27 18 9 18 3 6 0
-TABLE test t1 index_b 2 2 0 2 0 0 0
+TABLE test t1 NULL 25 16 9 16 3 6 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 6 3 3 3 0 3 0
-TABLE test t2 NULL 48 30 18 30 6 12 0
-TABLE test t2 index_b 3 3 0 3 0 0 0
+TABLE test t2 NULL 45 27 18 27 6 12 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 3 3 0 3 0 0 0
-TABLE test t3 NULL 69 42 27 42 9 18 0
-TABLE test t3 index_b 9 9 0 9 0 0 0
+TABLE test t3 NULL 66 39 27 39 9 18 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 3 3 0 3 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 35 23 12 23 3 9 0
-TABLE test t2 54 36 18 36 6 12 0
-TABLE test t3 81 54 27 54 9 18 0
+TABLE test t1 31 19 12 19 3 9 0
+TABLE test t2 48 30 18 30 6 12 0
+TABLE test t3 75 48 27 48 9 18 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 35
-TABLE test t2 54
-TABLE test t3 81
+TABLE test t1 31
+TABLE test t2 48
+TABLE test t3 75
connection con4;
insert into test.t1 set a=401, b=1, c=1;
insert into test.t2 set a=402, b=2, c=2;
@@ -727,11 +786,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=401;
update test.t2 set d=d+1 where a=401;
update test.t3 set d=d+1 where a=401;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 4
205 5 5 3
@@ -778,39 +837,39 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
-TABLE test t2 84
-TABLE test t3 128
+TABLE test t1 47
+TABLE test t2 76
+TABLE test t3 120
connection con1;
lock tables test.t1 read, test.t2 read, test.t3 read;
unlock tables;
@@ -857,39 +916,39 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
-TABLE test t2 84
-TABLE test t3 128
+TABLE test t1 47
+TABLE test t2 76
+TABLE test t3 120
connection default;
flush tables;
"================== flush marker =================="
@@ -933,39 +992,39 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
-TABLE test t2 84
-TABLE test t3 128
+TABLE test t1 47
+TABLE test t2 76
+TABLE test t3 120
set global read_only=1;
set global read_only=0;
"================== global read_only marker =================="
@@ -1009,39 +1068,39 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
-TABLE test t2 84
-TABLE test t3 128
+TABLE test t1 47
+TABLE test t2 76
+TABLE test t3 120
disconnect con1;
"================== Step 13 =================="
call dump_thread();
@@ -1082,39 +1141,39 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
-TABLE test t2 84
-TABLE test t3 128
+TABLE test t1 47
+TABLE test t2 76
+TABLE test t3 120
disconnect con2;
"================== Step 14 =================="
call dump_thread();
@@ -1154,39 +1213,39 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
-TABLE test t2 84
-TABLE test t3 128
+TABLE test t1 47
+TABLE test t2 76
+TABLE test t3 120
disconnect con3;
"================== Step 15 =================="
call dump_thread();
@@ -1225,39 +1284,39 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
-TABLE test t2 84
-TABLE test t3 128
+TABLE test t1 47
+TABLE test t2 76
+TABLE test t3 120
disconnect con4;
"================== Step 16 =================="
call dump_thread();
@@ -1295,39 +1354,39 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
-TABLE test t2 84
-TABLE test t3 128
+TABLE test t1 47
+TABLE test t2 76
+TABLE test t3 120
connection default;
truncate performance_schema.events_waits_summary_by_thread_by_event_name;
"================== BY_THREAD truncated =================="
@@ -1367,39 +1426,39 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
-TABLE test t2 84
-TABLE test t3 128
+TABLE test t1 47
+TABLE test t2 76
+TABLE test t3 120
truncate performance_schema.events_waits_summary_by_account_by_event_name;
"================== BY_ACCOUNT truncated =================="
"================== Step 18 =================="
@@ -1438,39 +1497,39 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
-TABLE test t2 84
-TABLE test t3 128
+TABLE test t1 47
+TABLE test t2 76
+TABLE test t3 120
truncate performance_schema.events_waits_summary_by_user_by_event_name;
"================== BY_USER truncated =================="
"================== Step 19 =================="
@@ -1509,39 +1568,39 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
-TABLE test t2 84
-TABLE test t3 128
+TABLE test t1 47
+TABLE test t2 76
+TABLE test t3 120
truncate performance_schema.events_waits_summary_by_host_by_event_name;
"================== BY_HOST truncated =================="
"================== Step 21 =================="
@@ -1580,39 +1639,39 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
-TABLE test t2 84
-TABLE test t3 128
+TABLE test t1 47
+TABLE test t2 76
+TABLE test t3 120
truncate performance_schema.events_waits_summary_global_by_event_name;
"================== GLOBAL truncated =================="
"================== Step 21 =================="
@@ -1675,16 +1734,16 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-show status like "performance_schema%";
+show global status like "performance_schema%";
Variable_name Value
Performance_schema_accounts_lost 0
Performance_schema_cond_classes_lost 0
@@ -1694,9 +1753,15 @@ Performance_schema_file_classes_lost 0
Performance_schema_file_handles_lost 0
Performance_schema_file_instances_lost 0
Performance_schema_hosts_lost 0
+Performance_schema_index_stat_lost 0
Performance_schema_locker_lost 0
+Performance_schema_memory_classes_lost 0
+Performance_schema_metadata_lock_lost 0
Performance_schema_mutex_classes_lost 0
Performance_schema_mutex_instances_lost 0
+Performance_schema_nested_statement_lost 0
+Performance_schema_prepared_statements_lost 0
+Performance_schema_program_lost 0
Performance_schema_rwlock_classes_lost 0
Performance_schema_rwlock_instances_lost 0
Performance_schema_session_connect_attrs_lost 0
@@ -1706,6 +1771,7 @@ Performance_schema_stage_classes_lost 0
Performance_schema_statement_classes_lost 0
Performance_schema_table_handles_lost 0
Performance_schema_table_instances_lost 0
+Performance_schema_table_lock_stat_lost 0
Performance_schema_thread_classes_lost 0
Performance_schema_thread_instances_lost 0
Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/table_io_aggregate_global_4u_2t.result b/mysql-test/suite/perfschema/r/table_io_aggregate_global_4u_2t.result
index 4d8d625ee00..47397d72d4a 100644
--- a/mysql-test/suite/perfschema/r/table_io_aggregate_global_4u_2t.result
+++ b/mysql-test/suite/perfschema/r/table_io_aggregate_global_4u_2t.result
@@ -6,11 +6,11 @@ delete from performance_schema.setup_objects
where object_name='t2';
select * from performance_schema.setup_actors
order by USER, HOST, ROLE;
-HOST USER ROLE
-localhost user1 %
-localhost user2 %
-localhost user3 %
-localhost user4 %
+HOST USER ROLE ENABLED HISTORY
+localhost user1 % YES YES
+localhost user2 % YES YES
+localhost user3 % YES YES
+localhost user4 % YES YES
select * from performance_schema.setup_objects
order by object_type, object_schema, object_name;
OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
@@ -24,6 +24,9 @@ events_stages_history_long YES
events_statements_current YES
events_statements_history YES
events_statements_history_long YES
+events_transactions_current YES
+events_transactions_history YES
+events_transactions_history_long YES
events_waits_current YES
events_waits_history YES
events_waits_history_long YES
@@ -67,28 +70,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -130,28 +125,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -182,15 +169,71 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=101;
update test.t2 set d=d+1 where a=101;
update test.t3 set d=d+1 where a=101;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 1
connection default;
-"================== Step 3 =================="
+"================== Step 3-A =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 23
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t3 15 9 6 9 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 8
+TABLE test t2 0
+TABLE test t3 15
+connection con1;
+flush tables;
+"================== con1 FLUSH =================="
+connection default;
+"================== Step 3-B =================="
call dump_thread();
username event_name count_star
user1 wait/io/table/sql/handler 0
@@ -215,7 +258,7 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 25
+wait/io/table/sql/handler 23
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
@@ -225,29 +268,23 @@ TABLE test t1 NULL 6 4 2 4 1 1 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 2 1 1 1 0 1 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 14 8 6 8 3 3 0
-TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 1 1 0 1 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 8 5 3 5 1 2 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 17 11 6 11 3 3 0
+TABLE test t3 15 9 6 9 3 3 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 8
TABLE test t2 0
-TABLE test t3 17
+TABLE test t3 15
connect con2, localhost, user2, , ;
select concat(current_user(), " is connected") as status;
status
@@ -283,7 +320,7 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 25
+wait/io/table/sql/handler 23
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
@@ -293,29 +330,23 @@ TABLE test t1 NULL 6 4 2 4 1 1 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 2 1 1 1 0 1 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 14 8 6 8 3 3 0
-TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 1 1 0 1 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 8 5 3 5 1 2 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 17 11 6 11 3 3 0
+TABLE test t3 15 9 6 9 3 3 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 8
TABLE test t2 0
-TABLE test t3 17
+TABLE test t3 15
connection con2;
insert into test.t1 set a=201, b=1, c=1;
insert into test.t2 set a=202, b=2, c=2;
@@ -347,11 +378,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=201;
update test.t2 set d=d+1 where a=201;
update test.t3 set d=d+1 where a=201;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 2
205 5 5 1
@@ -386,39 +417,33 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 64
+wait/io/table/sql/handler 58
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 15 10 5 10 2 3 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 14 9 5 9 2 3 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 37 22 15 22 6 9 0
-TABLE test t3 index_b 5 5 0 5 0 0 0
+TABLE test t3 NULL 35 20 15 20 6 9 0
+TABLE test t3 index_b 3 3 0 3 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 20 13 7 13 2 5 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 44 29 15 29 6 9 0
+TABLE test t1 18 11 7 11 2 5 0
+TABLE test t3 40 25 15 25 6 9 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 20
+TABLE test t1 18
TABLE test t2 0
-TABLE test t3 44
+TABLE test t3 40
connect con3, localhost, user3, , ;
select concat(current_user(), " is connected") as status;
status
@@ -459,39 +484,33 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 64
+wait/io/table/sql/handler 58
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 15 10 5 10 2 3 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 14 9 5 9 2 3 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 37 22 15 22 6 9 0
-TABLE test t3 index_b 5 5 0 5 0 0 0
+TABLE test t3 NULL 35 20 15 20 6 9 0
+TABLE test t3 index_b 3 3 0 3 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 20 13 7 13 2 5 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 44 29 15 29 6 9 0
+TABLE test t1 18 11 7 11 2 5 0
+TABLE test t3 40 25 15 25 6 9 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 20
+TABLE test t1 18
TABLE test t2 0
-TABLE test t3 44
+TABLE test t3 40
connection con3;
insert into test.t1 set a=301, b=1, c=1;
insert into test.t2 set a=302, b=2, c=2;
@@ -529,11 +548,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=301;
update test.t2 set d=d+1 where a=301;
update test.t3 set d=d+1 where a=301;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 3
205 5 5 2
@@ -574,39 +593,33 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 116
+wait/io/table/sql/handler 106
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 27 18 9 18 3 6 0
-TABLE test t1 index_b 2 2 0 2 0 0 0
+TABLE test t1 NULL 25 16 9 16 3 6 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 6 3 3 3 0 3 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 69 42 27 42 9 18 0
-TABLE test t3 index_b 9 9 0 9 0 0 0
+TABLE test t3 NULL 66 39 27 39 9 18 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 3 3 0 3 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 35 23 12 23 3 9 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 81 54 27 54 9 18 0
+TABLE test t1 31 19 12 19 3 9 0
+TABLE test t3 75 48 27 48 9 18 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 35
+TABLE test t1 31
TABLE test t2 0
-TABLE test t3 81
+TABLE test t3 75
connect con4, localhost, user4, , ;
select concat(current_user(), " is connected") as status;
status
@@ -652,39 +665,33 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 116
+wait/io/table/sql/handler 106
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 27 18 9 18 3 6 0
-TABLE test t1 index_b 2 2 0 2 0 0 0
+TABLE test t1 NULL 25 16 9 16 3 6 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 6 3 3 3 0 3 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 69 42 27 42 9 18 0
-TABLE test t3 index_b 9 9 0 9 0 0 0
+TABLE test t3 NULL 66 39 27 39 9 18 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 3 3 0 3 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 35 23 12 23 3 9 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 81 54 27 54 9 18 0
+TABLE test t1 31 19 12 19 3 9 0
+TABLE test t3 75 48 27 48 9 18 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 35
+TABLE test t1 31
TABLE test t2 0
-TABLE test t3 81
+TABLE test t3 75
connection con4;
insert into test.t1 set a=401, b=1, c=1;
insert into test.t2 set a=402, b=2, c=2;
@@ -728,11 +735,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=401;
update test.t2 set d=d+1 where a=401;
update test.t3 set d=d+1 where a=401;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 4
205 5 5 3
@@ -779,39 +786,33 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
+TABLE test t1 47
TABLE test t2 0
-TABLE test t3 128
+TABLE test t3 120
connection con1;
lock tables test.t1 read, test.t2 read, test.t3 read;
unlock tables;
@@ -858,39 +859,33 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
+TABLE test t1 47
TABLE test t2 0
-TABLE test t3 128
+TABLE test t3 120
connection default;
flush tables;
"================== flush marker =================="
@@ -934,39 +929,33 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
+TABLE test t1 47
TABLE test t2 0
-TABLE test t3 128
+TABLE test t3 120
set global read_only=1;
set global read_only=0;
"================== global read_only marker =================="
@@ -1010,39 +999,33 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
+TABLE test t1 47
TABLE test t2 0
-TABLE test t3 128
+TABLE test t3 120
disconnect con1;
"================== Step 13 =================="
call dump_thread();
@@ -1083,39 +1066,33 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
+TABLE test t1 47
TABLE test t2 0
-TABLE test t3 128
+TABLE test t3 120
disconnect con2;
"================== Step 14 =================="
call dump_thread();
@@ -1155,39 +1132,33 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
+TABLE test t1 47
TABLE test t2 0
-TABLE test t3 128
+TABLE test t3 120
disconnect con3;
"================== Step 15 =================="
call dump_thread();
@@ -1226,39 +1197,33 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
+TABLE test t1 47
TABLE test t2 0
-TABLE test t3 128
+TABLE test t3 120
disconnect con4;
"================== Step 16 =================="
call dump_thread();
@@ -1296,39 +1261,33 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
+TABLE test t1 47
TABLE test t2 0
-TABLE test t3 128
+TABLE test t3 120
connection default;
truncate performance_schema.events_waits_summary_by_thread_by_event_name;
"================== BY_THREAD truncated =================="
@@ -1368,39 +1327,33 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
+TABLE test t1 47
TABLE test t2 0
-TABLE test t3 128
+TABLE test t3 120
truncate performance_schema.events_waits_summary_by_account_by_event_name;
"================== BY_ACCOUNT truncated =================="
"================== Step 18 =================="
@@ -1439,39 +1392,33 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
+TABLE test t1 47
TABLE test t2 0
-TABLE test t3 128
+TABLE test t3 120
truncate performance_schema.events_waits_summary_by_user_by_event_name;
"================== BY_USER truncated =================="
"================== Step 19 =================="
@@ -1510,39 +1457,33 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
+TABLE test t1 47
TABLE test t2 0
-TABLE test t3 128
+TABLE test t3 120
truncate performance_schema.events_waits_summary_by_host_by_event_name;
"================== BY_HOST truncated =================="
"================== Step 21 =================="
@@ -1581,39 +1522,33 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
+TABLE test t1 47
TABLE test t2 0
-TABLE test t3 128
+TABLE test t3 120
truncate performance_schema.events_waits_summary_global_by_event_name;
"================== GLOBAL truncated =================="
"================== Step 21 =================="
@@ -1662,10 +1597,6 @@ TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
@@ -1673,19 +1604,17 @@ TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-show status like "performance_schema%";
+show global status like "performance_schema%";
Variable_name Value
Performance_schema_accounts_lost 0
Performance_schema_cond_classes_lost 0
@@ -1695,9 +1624,15 @@ Performance_schema_file_classes_lost 0
Performance_schema_file_handles_lost 0
Performance_schema_file_instances_lost 0
Performance_schema_hosts_lost 0
+Performance_schema_index_stat_lost 0
Performance_schema_locker_lost 0
+Performance_schema_memory_classes_lost 0
+Performance_schema_metadata_lock_lost 0
Performance_schema_mutex_classes_lost 0
Performance_schema_mutex_instances_lost 0
+Performance_schema_nested_statement_lost 0
+Performance_schema_prepared_statements_lost 0
+Performance_schema_program_lost 0
Performance_schema_rwlock_classes_lost 0
Performance_schema_rwlock_instances_lost 0
Performance_schema_session_connect_attrs_lost 0
@@ -1707,6 +1642,7 @@ Performance_schema_stage_classes_lost 0
Performance_schema_statement_classes_lost 0
Performance_schema_table_handles_lost 0
Performance_schema_table_instances_lost 0
+Performance_schema_table_lock_stat_lost 0
Performance_schema_thread_classes_lost 0
Performance_schema_thread_instances_lost 0
Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/table_io_aggregate_global_4u_3t.result b/mysql-test/suite/perfschema/r/table_io_aggregate_global_4u_3t.result
index 8a8de99fd4f..a697a1ae36d 100644
--- a/mysql-test/suite/perfschema/r/table_io_aggregate_global_4u_3t.result
+++ b/mysql-test/suite/perfschema/r/table_io_aggregate_global_4u_3t.result
@@ -4,11 +4,11 @@ update performance_schema.setup_consumers
set enabled='NO' where name='thread_instrumentation';
select * from performance_schema.setup_actors
order by USER, HOST, ROLE;
-HOST USER ROLE
-localhost user1 %
-localhost user2 %
-localhost user3 %
-localhost user4 %
+HOST USER ROLE ENABLED HISTORY
+localhost user1 % YES YES
+localhost user2 % YES YES
+localhost user3 % YES YES
+localhost user4 % YES YES
select * from performance_schema.setup_objects
order by object_type, object_schema, object_name;
OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
@@ -23,6 +23,9 @@ events_stages_history_long YES
events_statements_current YES
events_statements_history YES
events_statements_history_long YES
+events_transactions_current YES
+events_transactions_history YES
+events_transactions_history_long YES
events_waits_current YES
events_waits_history YES
events_waits_history_long YES
@@ -66,15 +69,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -84,10 +84,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -129,15 +129,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -147,10 +144,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -181,15 +178,77 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=101;
update test.t2 set d=d+1 where a=101;
update test.t3 set d=d+1 where a=101;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 1
connection default;
-"================== Step 3 =================="
+"================== Step 3-A =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 33
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t2 NULL 9 5 4 5 2 2 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 1 1 0 1 0 0 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t2 10 6 4 6 2 2 0
+TABLE test t3 15 9 6 9 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 8
+TABLE test t2 10
+TABLE test t3 15
+connection con1;
+flush tables;
+"================== con1 FLUSH =================="
+connection default;
+"================== Step 3-B =================="
call dump_thread();
username event_name count_star
user1 wait/io/table/sql/handler 0
@@ -214,7 +273,7 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 37
+wait/io/table/sql/handler 33
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
@@ -224,29 +283,29 @@ TABLE test t1 NULL 6 4 2 4 1 1 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 2 1 1 1 0 1 0
-TABLE test t2 NULL 10 6 4 6 2 2 0
-TABLE test t2 index_b 1 1 0 1 0 0 0
+TABLE test t2 NULL 9 5 4 5 2 2 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 1 1 0 1 0 0 0
-TABLE test t3 NULL 14 8 6 8 3 3 0
-TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 1 1 0 1 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 8 5 3 5 1 2 0
-TABLE test t2 12 8 4 8 2 2 0
-TABLE test t3 17 11 6 11 3 3 0
+TABLE test t2 10 6 4 6 2 2 0
+TABLE test t3 15 9 6 9 3 3 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 8
-TABLE test t2 12
-TABLE test t3 17
+TABLE test t2 10
+TABLE test t3 15
connect con2, localhost, user2, , ;
select concat(current_user(), " is connected") as status;
status
@@ -282,7 +341,7 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 37
+wait/io/table/sql/handler 33
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
@@ -292,29 +351,29 @@ TABLE test t1 NULL 6 4 2 4 1 1 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 2 1 1 1 0 1 0
-TABLE test t2 NULL 10 6 4 6 2 2 0
-TABLE test t2 index_b 1 1 0 1 0 0 0
+TABLE test t2 NULL 9 5 4 5 2 2 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 1 1 0 1 0 0 0
-TABLE test t3 NULL 14 8 6 8 3 3 0
-TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 1 1 0 1 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 8 5 3 5 1 2 0
-TABLE test t2 12 8 4 8 2 2 0
-TABLE test t3 17 11 6 11 3 3 0
+TABLE test t2 10 6 4 6 2 2 0
+TABLE test t3 15 9 6 9 3 3 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 8
-TABLE test t2 12
-TABLE test t3 17
+TABLE test t2 10
+TABLE test t3 15
connection con2;
insert into test.t1 set a=201, b=1, c=1;
insert into test.t2 set a=202, b=2, c=2;
@@ -346,11 +405,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=201;
update test.t2 set d=d+1 where a=201;
update test.t3 set d=d+1 where a=201;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 2
205 5 5 1
@@ -385,39 +444,39 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 94
+wait/io/table/sql/handler 84
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 15 10 5 10 2 3 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 14 9 5 9 2 3 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 26 16 10 16 4 6 0
-TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 NULL 24 14 10 14 4 6 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 2 2 0 2 0 0 0
-TABLE test t3 NULL 37 22 15 22 6 9 0
-TABLE test t3 index_b 5 5 0 5 0 0 0
+TABLE test t3 NULL 35 20 15 20 6 9 0
+TABLE test t3 index_b 3 3 0 3 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 20 13 7 13 2 5 0
-TABLE test t2 30 20 10 20 4 6 0
-TABLE test t3 44 29 15 29 6 9 0
+TABLE test t1 18 11 7 11 2 5 0
+TABLE test t2 26 16 10 16 4 6 0
+TABLE test t3 40 25 15 25 6 9 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 20
-TABLE test t2 30
-TABLE test t3 44
+TABLE test t1 18
+TABLE test t2 26
+TABLE test t3 40
connect con3, localhost, user3, , ;
select concat(current_user(), " is connected") as status;
status
@@ -458,39 +517,39 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 94
+wait/io/table/sql/handler 84
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 15 10 5 10 2 3 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 14 9 5 9 2 3 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 26 16 10 16 4 6 0
-TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 NULL 24 14 10 14 4 6 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 2 2 0 2 0 0 0
-TABLE test t3 NULL 37 22 15 22 6 9 0
-TABLE test t3 index_b 5 5 0 5 0 0 0
+TABLE test t3 NULL 35 20 15 20 6 9 0
+TABLE test t3 index_b 3 3 0 3 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 20 13 7 13 2 5 0
-TABLE test t2 30 20 10 20 4 6 0
-TABLE test t3 44 29 15 29 6 9 0
+TABLE test t1 18 11 7 11 2 5 0
+TABLE test t2 26 16 10 16 4 6 0
+TABLE test t3 40 25 15 25 6 9 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 20
-TABLE test t2 30
-TABLE test t3 44
+TABLE test t1 18
+TABLE test t2 26
+TABLE test t3 40
connection con3;
insert into test.t1 set a=301, b=1, c=1;
insert into test.t2 set a=302, b=2, c=2;
@@ -528,11 +587,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=301;
update test.t2 set d=d+1 where a=301;
update test.t3 set d=d+1 where a=301;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 3
205 5 5 2
@@ -573,39 +632,39 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 170
+wait/io/table/sql/handler 154
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 27 18 9 18 3 6 0
-TABLE test t1 index_b 2 2 0 2 0 0 0
+TABLE test t1 NULL 25 16 9 16 3 6 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 6 3 3 3 0 3 0
-TABLE test t2 NULL 48 30 18 30 6 12 0
-TABLE test t2 index_b 3 3 0 3 0 0 0
+TABLE test t2 NULL 45 27 18 27 6 12 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 3 3 0 3 0 0 0
-TABLE test t3 NULL 69 42 27 42 9 18 0
-TABLE test t3 index_b 9 9 0 9 0 0 0
+TABLE test t3 NULL 66 39 27 39 9 18 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 3 3 0 3 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 35 23 12 23 3 9 0
-TABLE test t2 54 36 18 36 6 12 0
-TABLE test t3 81 54 27 54 9 18 0
+TABLE test t1 31 19 12 19 3 9 0
+TABLE test t2 48 30 18 30 6 12 0
+TABLE test t3 75 48 27 48 9 18 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 35
-TABLE test t2 54
-TABLE test t3 81
+TABLE test t1 31
+TABLE test t2 48
+TABLE test t3 75
connect con4, localhost, user4, , ;
select concat(current_user(), " is connected") as status;
status
@@ -651,39 +710,39 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 170
+wait/io/table/sql/handler 154
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 27 18 9 18 3 6 0
-TABLE test t1 index_b 2 2 0 2 0 0 0
+TABLE test t1 NULL 25 16 9 16 3 6 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 6 3 3 3 0 3 0
-TABLE test t2 NULL 48 30 18 30 6 12 0
-TABLE test t2 index_b 3 3 0 3 0 0 0
+TABLE test t2 NULL 45 27 18 27 6 12 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 3 3 0 3 0 0 0
-TABLE test t3 NULL 69 42 27 42 9 18 0
-TABLE test t3 index_b 9 9 0 9 0 0 0
+TABLE test t3 NULL 66 39 27 39 9 18 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 3 3 0 3 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 35 23 12 23 3 9 0
-TABLE test t2 54 36 18 36 6 12 0
-TABLE test t3 81 54 27 54 9 18 0
+TABLE test t1 31 19 12 19 3 9 0
+TABLE test t2 48 30 18 30 6 12 0
+TABLE test t3 75 48 27 48 9 18 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 35
-TABLE test t2 54
-TABLE test t3 81
+TABLE test t1 31
+TABLE test t2 48
+TABLE test t3 75
connection con4;
insert into test.t1 set a=401, b=1, c=1;
insert into test.t2 set a=402, b=2, c=2;
@@ -727,11 +786,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=401;
update test.t2 set d=d+1 where a=401;
update test.t3 set d=d+1 where a=401;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 4
205 5 5 3
@@ -778,39 +837,39 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
-TABLE test t2 84
-TABLE test t3 128
+TABLE test t1 47
+TABLE test t2 76
+TABLE test t3 120
connection con1;
lock tables test.t1 read, test.t2 read, test.t3 read;
unlock tables;
@@ -857,39 +916,39 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
-TABLE test t2 84
-TABLE test t3 128
+TABLE test t1 47
+TABLE test t2 76
+TABLE test t3 120
connection default;
flush tables;
"================== flush marker =================="
@@ -933,39 +992,39 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
-TABLE test t2 84
-TABLE test t3 128
+TABLE test t1 47
+TABLE test t2 76
+TABLE test t3 120
set global read_only=1;
set global read_only=0;
"================== global read_only marker =================="
@@ -1009,39 +1068,39 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
-TABLE test t2 84
-TABLE test t3 128
+TABLE test t1 47
+TABLE test t2 76
+TABLE test t3 120
disconnect con1;
"================== Step 13 =================="
call dump_thread();
@@ -1082,39 +1141,39 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
-TABLE test t2 84
-TABLE test t3 128
+TABLE test t1 47
+TABLE test t2 76
+TABLE test t3 120
disconnect con2;
"================== Step 14 =================="
call dump_thread();
@@ -1154,39 +1213,39 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
-TABLE test t2 84
-TABLE test t3 128
+TABLE test t1 47
+TABLE test t2 76
+TABLE test t3 120
disconnect con3;
"================== Step 15 =================="
call dump_thread();
@@ -1225,39 +1284,39 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
-TABLE test t2 84
-TABLE test t3 128
+TABLE test t1 47
+TABLE test t2 76
+TABLE test t3 120
disconnect con4;
"================== Step 16 =================="
call dump_thread();
@@ -1295,39 +1354,39 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
-TABLE test t2 84
-TABLE test t3 128
+TABLE test t1 47
+TABLE test t2 76
+TABLE test t3 120
connection default;
truncate performance_schema.events_waits_summary_by_thread_by_event_name;
"================== BY_THREAD truncated =================="
@@ -1367,39 +1426,39 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
-TABLE test t2 84
-TABLE test t3 128
+TABLE test t1 47
+TABLE test t2 76
+TABLE test t3 120
truncate performance_schema.events_waits_summary_by_account_by_event_name;
"================== BY_ACCOUNT truncated =================="
"================== Step 18 =================="
@@ -1438,39 +1497,39 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
-TABLE test t2 84
-TABLE test t3 128
+TABLE test t1 47
+TABLE test t2 76
+TABLE test t3 120
truncate performance_schema.events_waits_summary_by_user_by_event_name;
"================== BY_USER truncated =================="
"================== Step 19 =================="
@@ -1509,39 +1568,39 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
-TABLE test t2 84
-TABLE test t3 128
+TABLE test t1 47
+TABLE test t2 76
+TABLE test t3 120
truncate performance_schema.events_waits_summary_by_host_by_event_name;
"================== BY_HOST truncated =================="
"================== Step 21 =================="
@@ -1580,39 +1639,39 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
-TABLE test t2 84
-TABLE test t3 128
+TABLE test t1 47
+TABLE test t2 76
+TABLE test t3 120
truncate performance_schema.events_waits_summary_global_by_event_name;
"================== GLOBAL truncated =================="
"================== Step 21 =================="
@@ -1675,16 +1734,16 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-show status like "performance_schema%";
+show global status like "performance_schema%";
Variable_name Value
Performance_schema_accounts_lost 0
Performance_schema_cond_classes_lost 0
@@ -1694,9 +1753,15 @@ Performance_schema_file_classes_lost 0
Performance_schema_file_handles_lost 0
Performance_schema_file_instances_lost 0
Performance_schema_hosts_lost 0
+Performance_schema_index_stat_lost 0
Performance_schema_locker_lost 0
+Performance_schema_memory_classes_lost 0
+Performance_schema_metadata_lock_lost 0
Performance_schema_mutex_classes_lost 0
Performance_schema_mutex_instances_lost 0
+Performance_schema_nested_statement_lost 0
+Performance_schema_prepared_statements_lost 0
+Performance_schema_program_lost 0
Performance_schema_rwlock_classes_lost 0
Performance_schema_rwlock_instances_lost 0
Performance_schema_session_connect_attrs_lost 0
@@ -1706,6 +1771,7 @@ Performance_schema_stage_classes_lost 0
Performance_schema_statement_classes_lost 0
Performance_schema_table_handles_lost 0
Performance_schema_table_instances_lost 0
+Performance_schema_table_lock_stat_lost 0
Performance_schema_thread_classes_lost 0
Performance_schema_thread_instances_lost 0
Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/table_io_aggregate_hist_2u_2t.result b/mysql-test/suite/perfschema/r/table_io_aggregate_hist_2u_2t.result
index 987732538c4..1b0ba5e2235 100644
--- a/mysql-test/suite/perfschema/r/table_io_aggregate_hist_2u_2t.result
+++ b/mysql-test/suite/perfschema/r/table_io_aggregate_hist_2u_2t.result
@@ -6,9 +6,9 @@ delete from performance_schema.setup_objects
where object_name='t2';
select * from performance_schema.setup_actors
order by USER, HOST, ROLE;
-HOST USER ROLE
-localhost user1 %
-localhost user3 %
+HOST USER ROLE ENABLED HISTORY
+localhost user1 % YES YES
+localhost user3 % YES YES
select * from performance_schema.setup_objects
order by object_type, object_schema, object_name;
OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
@@ -22,6 +22,9 @@ events_stages_history_long YES
events_statements_current YES
events_statements_history YES
events_statements_history_long YES
+events_transactions_current YES
+events_transactions_history YES
+events_transactions_history_long YES
events_waits_current YES
events_waits_history YES
events_waits_history_long YES
@@ -65,28 +68,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -128,28 +123,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -180,18 +167,18 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=101;
update test.t2 set d=d+1 where a=101;
update test.t3 set d=d+1 where a=101;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 1
connection default;
-"================== Step 3 =================="
+"================== Step 3-A =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
username status
user2 not found
@@ -201,53 +188,105 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 25
+localhost wait/io/table/sql/handler 23
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 25
+wait/io/table/sql/handler 23
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
wait/io/table/sql/handler 8 TABLE test t1
-wait/io/table/sql/handler 17 TABLE test t3
+wait/io/table/sql/handler 15 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 NULL 6 4 2 4 1 1 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 2 1 1 1 0 1 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 14 8 6 8 3 3 0
-TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 1 1 0 1 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 8 5 3 5 1 2 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 17 11 6 11 3 3 0
+TABLE test t3 15 9 6 9 3 3 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 8
TABLE test t2 0
-TABLE test t3 17
+TABLE test t3 15
+connection con1;
+flush tables;
+"================== con1 FLUSH =================="
+connection default;
+"================== Step 3-B =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 23
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 23
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 23
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 23
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 23
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 8 TABLE test t1
+wait/io/table/sql/handler 15 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t3 15 9 6 9 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 8
+TABLE test t2 0
+TABLE test t3 15
connect con2, localhost, user2, , ;
select concat(current_user(), " is connected") as status;
status
@@ -256,7 +295,7 @@ connection default;
"================== Step 4 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
username event_name count_star
user2 wait/io/table/sql/handler 0
@@ -267,57 +306,51 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 0
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 25
+localhost wait/io/table/sql/handler 23
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 25
+wait/io/table/sql/handler 23
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
wait/io/table/sql/handler 8 TABLE test t1
-wait/io/table/sql/handler 17 TABLE test t3
+wait/io/table/sql/handler 15 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 NULL 6 4 2 4 1 1 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 2 1 1 1 0 1 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 14 8 6 8 3 3 0
-TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 1 1 0 1 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 8 5 3 5 1 2 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 17 11 6 11 3 3 0
+TABLE test t3 15 9 6 9 3 3 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 8
TABLE test t2 0
-TABLE test t3 17
+TABLE test t3 15
connection con2;
insert into test.t1 set a=201, b=1, c=1;
insert into test.t2 set a=202, b=2, c=2;
@@ -349,11 +382,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=201;
update test.t2 set d=d+1 where a=201;
update test.t3 set d=d+1 where a=201;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 2
205 5 5 1
@@ -361,7 +394,7 @@ connection default;
"================== Step 5 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
username event_name count_star
user2 wait/io/table/sql/handler 0
@@ -372,57 +405,51 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 0
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 25
+localhost wait/io/table/sql/handler 23
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 25
+wait/io/table/sql/handler 23
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
wait/io/table/sql/handler 8 TABLE test t1
-wait/io/table/sql/handler 17 TABLE test t3
+wait/io/table/sql/handler 15 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 NULL 6 4 2 4 1 1 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 2 1 1 1 0 1 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 14 8 6 8 3 3 0
-TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 1 1 0 1 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 8 5 3 5 1 2 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 17 11 6 11 3 3 0
+TABLE test t3 15 9 6 9 3 3 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 8
TABLE test t2 0
-TABLE test t3 17
+TABLE test t3 15
connect con3, localhost, user3, , ;
select concat(current_user(), " is connected") as status;
status
@@ -431,7 +458,7 @@ connection default;
"================== Step 6 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
username event_name count_star
user2 wait/io/table/sql/handler 0
@@ -443,7 +470,7 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 0
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
@@ -451,7 +478,7 @@ user3 localhost wait/io/table/sql/handler 0
user3 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
@@ -459,45 +486,39 @@ user3 wait/io/table/sql/handler 0
user3 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 25
+localhost wait/io/table/sql/handler 23
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 25
+wait/io/table/sql/handler 23
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
wait/io/table/sql/handler 8 TABLE test t1
-wait/io/table/sql/handler 17 TABLE test t3
+wait/io/table/sql/handler 15 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 NULL 6 4 2 4 1 1 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 2 1 1 1 0 1 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 14 8 6 8 3 3 0
-TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 1 1 0 1 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 8 5 3 5 1 2 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 17 11 6 11 3 3 0
+TABLE test t3 15 9 6 9 3 3 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 8
TABLE test t2 0
-TABLE test t3 17
+TABLE test t3 15
connection con3;
insert into test.t1 set a=301, b=1, c=1;
insert into test.t2 set a=302, b=2, c=2;
@@ -535,11 +556,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=301;
update test.t2 set d=d+1 where a=301;
update test.t3 set d=d+1 where a=301;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 3
205 5 5 2
@@ -548,73 +569,67 @@ connection default;
"================== Step 7 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
username event_name count_star
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 0
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 77
+localhost wait/io/table/sql/handler 71
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 77
+wait/io/table/sql/handler 71
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 23 TABLE test t1
-wait/io/table/sql/handler 54 TABLE test t3
+wait/io/table/sql/handler 21 TABLE test t1
+wait/io/table/sql/handler 50 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 23
+TABLE test t1 21
TABLE test t2 0
-TABLE test t3 54
+TABLE test t3 50
connect con4, localhost, user4, , ;
select concat(current_user(), " is connected") as status;
status
@@ -623,78 +638,72 @@ connection default;
"================== Step 8 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
username event_name count_star
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
username event_name count_star
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 0
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 0
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 77
+localhost wait/io/table/sql/handler 71
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 77
+wait/io/table/sql/handler 71
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 23 TABLE test t1
-wait/io/table/sql/handler 54 TABLE test t3
+wait/io/table/sql/handler 21 TABLE test t1
+wait/io/table/sql/handler 50 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 23
+TABLE test t1 21
TABLE test t2 0
-TABLE test t3 54
+TABLE test t3 50
connection con4;
insert into test.t1 set a=401, b=1, c=1;
insert into test.t2 set a=402, b=2, c=2;
@@ -738,11 +747,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=401;
update test.t2 set d=d+1 where a=401;
update test.t3 set d=d+1 where a=401;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 4
205 5 5 3
@@ -752,78 +761,72 @@ connection default;
"================== Step 9 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
username event_name count_star
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
username event_name count_star
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 0
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 0
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 77
+localhost wait/io/table/sql/handler 71
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 77
+wait/io/table/sql/handler 71
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 23 TABLE test t1
-wait/io/table/sql/handler 54 TABLE test t3
+wait/io/table/sql/handler 21 TABLE test t1
+wait/io/table/sql/handler 50 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 23
+TABLE test t1 21
TABLE test t2 0
-TABLE test t3 54
+TABLE test t3 50
connection con1;
lock tables test.t1 read, test.t2 read, test.t3 read;
unlock tables;
@@ -833,234 +836,216 @@ connection default;
"================== Step 10 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
username event_name count_star
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
username event_name count_star
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 0
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 0
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 77
+localhost wait/io/table/sql/handler 71
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 77
+wait/io/table/sql/handler 71
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 23 TABLE test t1
-wait/io/table/sql/handler 54 TABLE test t3
+wait/io/table/sql/handler 21 TABLE test t1
+wait/io/table/sql/handler 50 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 23
+TABLE test t1 21
TABLE test t2 0
-TABLE test t3 54
+TABLE test t3 50
connection default;
flush tables;
"================== flush marker =================="
"================== Step 11 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
username event_name count_star
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
username event_name count_star
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 0
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 0
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 77
+localhost wait/io/table/sql/handler 71
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 77
+wait/io/table/sql/handler 71
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 23 TABLE test t1
-wait/io/table/sql/handler 54 TABLE test t3
+wait/io/table/sql/handler 21 TABLE test t1
+wait/io/table/sql/handler 50 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 23
+TABLE test t1 21
TABLE test t2 0
-TABLE test t3 54
+TABLE test t3 50
set global read_only=1;
set global read_only=0;
"================== global read_only marker =================="
"================== Step 12 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
username event_name count_star
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
username event_name count_star
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 0
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 0
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 77
+localhost wait/io/table/sql/handler 71
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 77
+wait/io/table/sql/handler 71
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 23 TABLE test t1
-wait/io/table/sql/handler 54 TABLE test t3
+wait/io/table/sql/handler 21 TABLE test t1
+wait/io/table/sql/handler 50 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 23
+TABLE test t1 21
TABLE test t2 0
-TABLE test t3 54
+TABLE test t3 50
disconnect con1;
"================== Step 13 =================="
call dump_thread();
@@ -1070,72 +1055,66 @@ username event_name count_star
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
username event_name count_star
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 0
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 0
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 77
+localhost wait/io/table/sql/handler 71
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 77
+wait/io/table/sql/handler 71
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 23 TABLE test t1
-wait/io/table/sql/handler 54 TABLE test t3
+wait/io/table/sql/handler 21 TABLE test t1
+wait/io/table/sql/handler 50 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 23
+TABLE test t1 21
TABLE test t2 0
-TABLE test t3 54
+TABLE test t3 50
disconnect con2;
"================== Step 14 =================="
call dump_thread();
@@ -1144,72 +1123,66 @@ user1 not found
username status
user2 not found
username event_name count_star
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
username event_name count_star
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 0
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 0
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 77
+localhost wait/io/table/sql/handler 71
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 77
+wait/io/table/sql/handler 71
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 23 TABLE test t1
-wait/io/table/sql/handler 54 TABLE test t3
+wait/io/table/sql/handler 21 TABLE test t1
+wait/io/table/sql/handler 50 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 23
+TABLE test t1 21
TABLE test t2 0
-TABLE test t3 54
+TABLE test t3 50
disconnect con3;
"================== Step 15 =================="
call dump_thread();
@@ -1224,65 +1197,59 @@ user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 0
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 0
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 77
+localhost wait/io/table/sql/handler 71
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 77
+wait/io/table/sql/handler 71
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 23 TABLE test t1
-wait/io/table/sql/handler 54 TABLE test t3
+wait/io/table/sql/handler 21 TABLE test t1
+wait/io/table/sql/handler 50 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 23
+TABLE test t1 21
TABLE test t2 0
-TABLE test t3 54
+TABLE test t3 50
disconnect con4;
"================== Step 16 =================="
call dump_thread();
@@ -1296,65 +1263,59 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 0
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 0
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 77
+localhost wait/io/table/sql/handler 71
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 77
+wait/io/table/sql/handler 71
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 23 TABLE test t1
-wait/io/table/sql/handler 54 TABLE test t3
+wait/io/table/sql/handler 21 TABLE test t1
+wait/io/table/sql/handler 50 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 23
+TABLE test t1 21
TABLE test t2 0
-TABLE test t3 54
+TABLE test t3 50
connection default;
truncate performance_schema.events_waits_summary_by_thread_by_event_name;
"================== BY_THREAD truncated =================="
@@ -1370,65 +1331,59 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 0
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 0
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 77
+localhost wait/io/table/sql/handler 71
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 77
+wait/io/table/sql/handler 71
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 23 TABLE test t1
-wait/io/table/sql/handler 54 TABLE test t3
+wait/io/table/sql/handler 21 TABLE test t1
+wait/io/table/sql/handler 50 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 23
+TABLE test t1 21
TABLE test t2 0
-TABLE test t3 54
+TABLE test t3 50
truncate performance_schema.events_waits_summary_by_account_by_event_name;
"================== BY_ACCOUNT truncated =================="
"================== Step 18 =================="
@@ -1453,55 +1408,49 @@ user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 77
+localhost wait/io/table/sql/handler 71
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 77
+wait/io/table/sql/handler 71
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 23 TABLE test t1
-wait/io/table/sql/handler 54 TABLE test t3
+wait/io/table/sql/handler 21 TABLE test t1
+wait/io/table/sql/handler 50 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 23
+TABLE test t1 21
TABLE test t2 0
-TABLE test t3 54
+TABLE test t3 50
truncate performance_schema.events_waits_summary_by_user_by_event_name;
"================== BY_USER truncated =================="
"================== Step 19 =================="
@@ -1536,45 +1485,39 @@ user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 77
+localhost wait/io/table/sql/handler 71
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 77
+wait/io/table/sql/handler 71
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 23 TABLE test t1
-wait/io/table/sql/handler 54 TABLE test t3
+wait/io/table/sql/handler 21 TABLE test t1
+wait/io/table/sql/handler 50 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 23
+TABLE test t1 21
TABLE test t2 0
-TABLE test t3 54
+TABLE test t3 50
truncate performance_schema.events_waits_summary_by_host_by_event_name;
"================== BY_HOST truncated =================="
"================== Step 21 =================="
@@ -1613,41 +1556,35 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 77
+wait/io/table/sql/handler 71
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 23 TABLE test t1
-wait/io/table/sql/handler 54 TABLE test t3
+wait/io/table/sql/handler 21 TABLE test t1
+wait/io/table/sql/handler 50 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 23
+TABLE test t1 21
TABLE test t2 0
-TABLE test t3 54
+TABLE test t3 50
truncate performance_schema.events_waits_summary_global_by_event_name;
"================== GLOBAL truncated =================="
"================== Step 21 =================="
@@ -1690,18 +1627,14 @@ wait/io/table/sql/handler 0
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 23 TABLE test t1
-wait/io/table/sql/handler 54 TABLE test t3
+wait/io/table/sql/handler 21 TABLE test t1
+wait/io/table/sql/handler 50 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
@@ -1709,19 +1642,17 @@ TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-show status like "performance_schema%";
+show global status like "performance_schema%";
Variable_name Value
Performance_schema_accounts_lost 0
Performance_schema_cond_classes_lost 0
@@ -1731,9 +1662,15 @@ Performance_schema_file_classes_lost 0
Performance_schema_file_handles_lost 0
Performance_schema_file_instances_lost 0
Performance_schema_hosts_lost 0
+Performance_schema_index_stat_lost 0
Performance_schema_locker_lost 0
+Performance_schema_memory_classes_lost 0
+Performance_schema_metadata_lock_lost 0
Performance_schema_mutex_classes_lost 0
Performance_schema_mutex_instances_lost 0
+Performance_schema_nested_statement_lost 0
+Performance_schema_prepared_statements_lost 0
+Performance_schema_program_lost 0
Performance_schema_rwlock_classes_lost 0
Performance_schema_rwlock_instances_lost 0
Performance_schema_session_connect_attrs_lost 0
@@ -1743,6 +1680,7 @@ Performance_schema_stage_classes_lost 0
Performance_schema_statement_classes_lost 0
Performance_schema_table_handles_lost 0
Performance_schema_table_instances_lost 0
+Performance_schema_table_lock_stat_lost 0
Performance_schema_thread_classes_lost 0
Performance_schema_thread_instances_lost 0
Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/table_io_aggregate_hist_2u_3t.result b/mysql-test/suite/perfschema/r/table_io_aggregate_hist_2u_3t.result
index 324c6534303..b1813a1616e 100644
--- a/mysql-test/suite/perfschema/r/table_io_aggregate_hist_2u_3t.result
+++ b/mysql-test/suite/perfschema/r/table_io_aggregate_hist_2u_3t.result
@@ -4,9 +4,9 @@ delete from performance_schema.setup_actors
where user in ('user2', 'user4');
select * from performance_schema.setup_actors
order by USER, HOST, ROLE;
-HOST USER ROLE
-localhost user1 %
-localhost user3 %
+HOST USER ROLE ENABLED HISTORY
+localhost user1 % YES YES
+localhost user3 % YES YES
select * from performance_schema.setup_objects
order by object_type, object_schema, object_name;
OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
@@ -21,6 +21,9 @@ events_stages_history_long YES
events_statements_current YES
events_statements_history YES
events_statements_history_long YES
+events_transactions_current YES
+events_transactions_history YES
+events_transactions_history_long YES
events_waits_current YES
events_waits_history YES
events_waits_history_long YES
@@ -64,15 +67,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -82,10 +82,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -127,15 +127,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -145,10 +142,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -179,18 +176,18 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=101;
update test.t2 set d=d+1 where a=101;
update test.t3 set d=d+1 where a=101;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 1
connection default;
-"================== Step 3 =================="
+"================== Step 3-A =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
username status
user2 not found
@@ -200,54 +197,119 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 37
+localhost wait/io/table/sql/handler 33
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 37
+wait/io/table/sql/handler 33
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
wait/io/table/sql/handler 8 TABLE test t1
-wait/io/table/sql/handler 12 TABLE test t2
-wait/io/table/sql/handler 17 TABLE test t3
+wait/io/table/sql/handler 10 TABLE test t2
+wait/io/table/sql/handler 15 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 NULL 6 4 2 4 1 1 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 2 1 1 1 0 1 0
-TABLE test t2 NULL 10 6 4 6 2 2 0
-TABLE test t2 index_b 1 1 0 1 0 0 0
+TABLE test t2 NULL 9 5 4 5 2 2 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 1 1 0 1 0 0 0
-TABLE test t3 NULL 14 8 6 8 3 3 0
-TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 1 1 0 1 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 8 5 3 5 1 2 0
-TABLE test t2 12 8 4 8 2 2 0
-TABLE test t3 17 11 6 11 3 3 0
+TABLE test t2 10 6 4 6 2 2 0
+TABLE test t3 15 9 6 9 3 3 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 8
-TABLE test t2 12
-TABLE test t3 17
+TABLE test t2 10
+TABLE test t3 15
+connection con1;
+flush tables;
+"================== con1 FLUSH =================="
+connection default;
+"================== Step 3-B =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 33
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 33
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 33
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 33
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 33
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 8 TABLE test t1
+wait/io/table/sql/handler 10 TABLE test t2
+wait/io/table/sql/handler 15 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t2 NULL 9 5 4 5 2 2 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 1 1 0 1 0 0 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t2 10 6 4 6 2 2 0
+TABLE test t3 15 9 6 9 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 8
+TABLE test t2 10
+TABLE test t3 15
connect con2, localhost, user2, , ;
select concat(current_user(), " is connected") as status;
status
@@ -256,7 +318,7 @@ connection default;
"================== Step 4 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
username event_name count_star
user2 wait/io/table/sql/handler 0
@@ -267,58 +329,58 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 0
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 37
+localhost wait/io/table/sql/handler 33
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 37
+wait/io/table/sql/handler 33
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
wait/io/table/sql/handler 8 TABLE test t1
-wait/io/table/sql/handler 12 TABLE test t2
-wait/io/table/sql/handler 17 TABLE test t3
+wait/io/table/sql/handler 10 TABLE test t2
+wait/io/table/sql/handler 15 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 NULL 6 4 2 4 1 1 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 2 1 1 1 0 1 0
-TABLE test t2 NULL 10 6 4 6 2 2 0
-TABLE test t2 index_b 1 1 0 1 0 0 0
+TABLE test t2 NULL 9 5 4 5 2 2 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 1 1 0 1 0 0 0
-TABLE test t3 NULL 14 8 6 8 3 3 0
-TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 1 1 0 1 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 8 5 3 5 1 2 0
-TABLE test t2 12 8 4 8 2 2 0
-TABLE test t3 17 11 6 11 3 3 0
+TABLE test t2 10 6 4 6 2 2 0
+TABLE test t3 15 9 6 9 3 3 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 8
-TABLE test t2 12
-TABLE test t3 17
+TABLE test t2 10
+TABLE test t3 15
connection con2;
insert into test.t1 set a=201, b=1, c=1;
insert into test.t2 set a=202, b=2, c=2;
@@ -350,11 +412,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=201;
update test.t2 set d=d+1 where a=201;
update test.t3 set d=d+1 where a=201;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 2
205 5 5 1
@@ -362,7 +424,7 @@ connection default;
"================== Step 5 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
username event_name count_star
user2 wait/io/table/sql/handler 0
@@ -373,58 +435,58 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 0
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 37
+localhost wait/io/table/sql/handler 33
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 37
+wait/io/table/sql/handler 33
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
wait/io/table/sql/handler 8 TABLE test t1
-wait/io/table/sql/handler 12 TABLE test t2
-wait/io/table/sql/handler 17 TABLE test t3
+wait/io/table/sql/handler 10 TABLE test t2
+wait/io/table/sql/handler 15 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 NULL 6 4 2 4 1 1 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 2 1 1 1 0 1 0
-TABLE test t2 NULL 10 6 4 6 2 2 0
-TABLE test t2 index_b 1 1 0 1 0 0 0
+TABLE test t2 NULL 9 5 4 5 2 2 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 1 1 0 1 0 0 0
-TABLE test t3 NULL 14 8 6 8 3 3 0
-TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 1 1 0 1 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 8 5 3 5 1 2 0
-TABLE test t2 12 8 4 8 2 2 0
-TABLE test t3 17 11 6 11 3 3 0
+TABLE test t2 10 6 4 6 2 2 0
+TABLE test t3 15 9 6 9 3 3 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 8
-TABLE test t2 12
-TABLE test t3 17
+TABLE test t2 10
+TABLE test t3 15
connect con3, localhost, user3, , ;
select concat(current_user(), " is connected") as status;
status
@@ -433,7 +495,7 @@ connection default;
"================== Step 6 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
username event_name count_star
user2 wait/io/table/sql/handler 0
@@ -445,7 +507,7 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 0
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
@@ -453,7 +515,7 @@ user3 localhost wait/io/table/sql/handler 0
user3 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
@@ -461,46 +523,46 @@ user3 wait/io/table/sql/handler 0
user3 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 37
+localhost wait/io/table/sql/handler 33
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 37
+wait/io/table/sql/handler 33
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
wait/io/table/sql/handler 8 TABLE test t1
-wait/io/table/sql/handler 12 TABLE test t2
-wait/io/table/sql/handler 17 TABLE test t3
+wait/io/table/sql/handler 10 TABLE test t2
+wait/io/table/sql/handler 15 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 NULL 6 4 2 4 1 1 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 2 1 1 1 0 1 0
-TABLE test t2 NULL 10 6 4 6 2 2 0
-TABLE test t2 index_b 1 1 0 1 0 0 0
+TABLE test t2 NULL 9 5 4 5 2 2 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 1 1 0 1 0 0 0
-TABLE test t3 NULL 14 8 6 8 3 3 0
-TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 1 1 0 1 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 8 5 3 5 1 2 0
-TABLE test t2 12 8 4 8 2 2 0
-TABLE test t3 17 11 6 11 3 3 0
+TABLE test t2 10 6 4 6 2 2 0
+TABLE test t3 15 9 6 9 3 3 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 8
-TABLE test t2 12
-TABLE test t3 17
+TABLE test t2 10
+TABLE test t3 15
connection con3;
insert into test.t1 set a=301, b=1, c=1;
insert into test.t2 set a=302, b=2, c=2;
@@ -538,11 +600,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=301;
update test.t2 set d=d+1 where a=301;
update test.t3 set d=d+1 where a=301;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 3
205 5 5 2
@@ -551,74 +613,74 @@ connection default;
"================== Step 7 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
username event_name count_star
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 0
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 113
+localhost wait/io/table/sql/handler 103
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 113
+wait/io/table/sql/handler 103
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 23 TABLE test t1
-wait/io/table/sql/handler 36 TABLE test t2
-wait/io/table/sql/handler 54 TABLE test t3
+wait/io/table/sql/handler 21 TABLE test t1
+wait/io/table/sql/handler 32 TABLE test t2
+wait/io/table/sql/handler 50 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 32 20 12 20 4 8 0
-TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 NULL 30 18 12 18 4 8 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 2 2 0 2 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 36 24 12 24 4 8 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t2 32 20 12 20 4 8 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 23
-TABLE test t2 36
-TABLE test t3 54
+TABLE test t1 21
+TABLE test t2 32
+TABLE test t3 50
connect con4, localhost, user4, , ;
select concat(current_user(), " is connected") as status;
status
@@ -627,79 +689,79 @@ connection default;
"================== Step 8 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
username event_name count_star
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
username event_name count_star
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 0
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 0
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 113
+localhost wait/io/table/sql/handler 103
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 113
+wait/io/table/sql/handler 103
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 23 TABLE test t1
-wait/io/table/sql/handler 36 TABLE test t2
-wait/io/table/sql/handler 54 TABLE test t3
+wait/io/table/sql/handler 21 TABLE test t1
+wait/io/table/sql/handler 32 TABLE test t2
+wait/io/table/sql/handler 50 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 32 20 12 20 4 8 0
-TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 NULL 30 18 12 18 4 8 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 2 2 0 2 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 36 24 12 24 4 8 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t2 32 20 12 20 4 8 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 23
-TABLE test t2 36
-TABLE test t3 54
+TABLE test t1 21
+TABLE test t2 32
+TABLE test t3 50
connection con4;
insert into test.t1 set a=401, b=1, c=1;
insert into test.t2 set a=402, b=2, c=2;
@@ -743,11 +805,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=401;
update test.t2 set d=d+1 where a=401;
update test.t3 set d=d+1 where a=401;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 4
205 5 5 3
@@ -757,79 +819,79 @@ connection default;
"================== Step 9 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
username event_name count_star
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
username event_name count_star
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 0
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 0
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 113
+localhost wait/io/table/sql/handler 103
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 113
+wait/io/table/sql/handler 103
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 23 TABLE test t1
-wait/io/table/sql/handler 36 TABLE test t2
-wait/io/table/sql/handler 54 TABLE test t3
+wait/io/table/sql/handler 21 TABLE test t1
+wait/io/table/sql/handler 32 TABLE test t2
+wait/io/table/sql/handler 50 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 32 20 12 20 4 8 0
-TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 NULL 30 18 12 18 4 8 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 2 2 0 2 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 36 24 12 24 4 8 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t2 32 20 12 20 4 8 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 23
-TABLE test t2 36
-TABLE test t3 54
+TABLE test t1 21
+TABLE test t2 32
+TABLE test t3 50
connection con1;
lock tables test.t1 read, test.t2 read, test.t3 read;
unlock tables;
@@ -839,237 +901,237 @@ connection default;
"================== Step 10 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
username event_name count_star
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
username event_name count_star
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 0
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 0
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 113
+localhost wait/io/table/sql/handler 103
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 113
+wait/io/table/sql/handler 103
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 23 TABLE test t1
-wait/io/table/sql/handler 36 TABLE test t2
-wait/io/table/sql/handler 54 TABLE test t3
+wait/io/table/sql/handler 21 TABLE test t1
+wait/io/table/sql/handler 32 TABLE test t2
+wait/io/table/sql/handler 50 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 32 20 12 20 4 8 0
-TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 NULL 30 18 12 18 4 8 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 2 2 0 2 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 36 24 12 24 4 8 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t2 32 20 12 20 4 8 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 23
-TABLE test t2 36
-TABLE test t3 54
+TABLE test t1 21
+TABLE test t2 32
+TABLE test t3 50
connection default;
flush tables;
"================== flush marker =================="
"================== Step 11 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
username event_name count_star
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
username event_name count_star
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 0
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 0
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 113
+localhost wait/io/table/sql/handler 103
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 113
+wait/io/table/sql/handler 103
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 23 TABLE test t1
-wait/io/table/sql/handler 36 TABLE test t2
-wait/io/table/sql/handler 54 TABLE test t3
+wait/io/table/sql/handler 21 TABLE test t1
+wait/io/table/sql/handler 32 TABLE test t2
+wait/io/table/sql/handler 50 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 32 20 12 20 4 8 0
-TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 NULL 30 18 12 18 4 8 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 2 2 0 2 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 36 24 12 24 4 8 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t2 32 20 12 20 4 8 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 23
-TABLE test t2 36
-TABLE test t3 54
+TABLE test t1 21
+TABLE test t2 32
+TABLE test t3 50
set global read_only=1;
set global read_only=0;
"================== global read_only marker =================="
"================== Step 12 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
username event_name count_star
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
username event_name count_star
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 0
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 0
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 113
+localhost wait/io/table/sql/handler 103
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 113
+wait/io/table/sql/handler 103
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 23 TABLE test t1
-wait/io/table/sql/handler 36 TABLE test t2
-wait/io/table/sql/handler 54 TABLE test t3
+wait/io/table/sql/handler 21 TABLE test t1
+wait/io/table/sql/handler 32 TABLE test t2
+wait/io/table/sql/handler 50 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 32 20 12 20 4 8 0
-TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 NULL 30 18 12 18 4 8 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 2 2 0 2 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 36 24 12 24 4 8 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t2 32 20 12 20 4 8 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 23
-TABLE test t2 36
-TABLE test t3 54
+TABLE test t1 21
+TABLE test t2 32
+TABLE test t3 50
disconnect con1;
"================== Step 13 =================="
call dump_thread();
@@ -1079,73 +1141,73 @@ username event_name count_star
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
username event_name count_star
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 0
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 0
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 113
+localhost wait/io/table/sql/handler 103
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 113
+wait/io/table/sql/handler 103
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 23 TABLE test t1
-wait/io/table/sql/handler 36 TABLE test t2
-wait/io/table/sql/handler 54 TABLE test t3
+wait/io/table/sql/handler 21 TABLE test t1
+wait/io/table/sql/handler 32 TABLE test t2
+wait/io/table/sql/handler 50 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 32 20 12 20 4 8 0
-TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 NULL 30 18 12 18 4 8 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 2 2 0 2 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 36 24 12 24 4 8 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t2 32 20 12 20 4 8 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 23
-TABLE test t2 36
-TABLE test t3 54
+TABLE test t1 21
+TABLE test t2 32
+TABLE test t3 50
disconnect con2;
"================== Step 14 =================="
call dump_thread();
@@ -1154,73 +1216,73 @@ user1 not found
username status
user2 not found
username event_name count_star
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
username event_name count_star
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 0
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 0
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 113
+localhost wait/io/table/sql/handler 103
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 113
+wait/io/table/sql/handler 103
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 23 TABLE test t1
-wait/io/table/sql/handler 36 TABLE test t2
-wait/io/table/sql/handler 54 TABLE test t3
+wait/io/table/sql/handler 21 TABLE test t1
+wait/io/table/sql/handler 32 TABLE test t2
+wait/io/table/sql/handler 50 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 32 20 12 20 4 8 0
-TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 NULL 30 18 12 18 4 8 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 2 2 0 2 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 36 24 12 24 4 8 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t2 32 20 12 20 4 8 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 23
-TABLE test t2 36
-TABLE test t3 54
+TABLE test t1 21
+TABLE test t2 32
+TABLE test t3 50
disconnect con3;
"================== Step 15 =================="
call dump_thread();
@@ -1235,66 +1297,66 @@ user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 0
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 0
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 113
+localhost wait/io/table/sql/handler 103
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 113
+wait/io/table/sql/handler 103
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 23 TABLE test t1
-wait/io/table/sql/handler 36 TABLE test t2
-wait/io/table/sql/handler 54 TABLE test t3
+wait/io/table/sql/handler 21 TABLE test t1
+wait/io/table/sql/handler 32 TABLE test t2
+wait/io/table/sql/handler 50 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 32 20 12 20 4 8 0
-TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 NULL 30 18 12 18 4 8 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 2 2 0 2 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 36 24 12 24 4 8 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t2 32 20 12 20 4 8 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 23
-TABLE test t2 36
-TABLE test t3 54
+TABLE test t1 21
+TABLE test t2 32
+TABLE test t3 50
disconnect con4;
"================== Step 16 =================="
call dump_thread();
@@ -1308,66 +1370,66 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 0
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 0
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 113
+localhost wait/io/table/sql/handler 103
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 113
+wait/io/table/sql/handler 103
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 23 TABLE test t1
-wait/io/table/sql/handler 36 TABLE test t2
-wait/io/table/sql/handler 54 TABLE test t3
+wait/io/table/sql/handler 21 TABLE test t1
+wait/io/table/sql/handler 32 TABLE test t2
+wait/io/table/sql/handler 50 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 32 20 12 20 4 8 0
-TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 NULL 30 18 12 18 4 8 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 2 2 0 2 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 36 24 12 24 4 8 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t2 32 20 12 20 4 8 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 23
-TABLE test t2 36
-TABLE test t3 54
+TABLE test t1 21
+TABLE test t2 32
+TABLE test t3 50
connection default;
truncate performance_schema.events_waits_summary_by_thread_by_event_name;
"================== BY_THREAD truncated =================="
@@ -1383,66 +1445,66 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 0
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 0
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 113
+localhost wait/io/table/sql/handler 103
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 113
+wait/io/table/sql/handler 103
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 23 TABLE test t1
-wait/io/table/sql/handler 36 TABLE test t2
-wait/io/table/sql/handler 54 TABLE test t3
+wait/io/table/sql/handler 21 TABLE test t1
+wait/io/table/sql/handler 32 TABLE test t2
+wait/io/table/sql/handler 50 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 32 20 12 20 4 8 0
-TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 NULL 30 18 12 18 4 8 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 2 2 0 2 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 36 24 12 24 4 8 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t2 32 20 12 20 4 8 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 23
-TABLE test t2 36
-TABLE test t3 54
+TABLE test t1 21
+TABLE test t2 32
+TABLE test t3 50
truncate performance_schema.events_waits_summary_by_account_by_event_name;
"================== BY_ACCOUNT truncated =================="
"================== Step 18 =================="
@@ -1467,56 +1529,56 @@ user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 113
+localhost wait/io/table/sql/handler 103
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 113
+wait/io/table/sql/handler 103
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 23 TABLE test t1
-wait/io/table/sql/handler 36 TABLE test t2
-wait/io/table/sql/handler 54 TABLE test t3
+wait/io/table/sql/handler 21 TABLE test t1
+wait/io/table/sql/handler 32 TABLE test t2
+wait/io/table/sql/handler 50 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 32 20 12 20 4 8 0
-TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 NULL 30 18 12 18 4 8 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 2 2 0 2 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 36 24 12 24 4 8 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t2 32 20 12 20 4 8 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 23
-TABLE test t2 36
-TABLE test t3 54
+TABLE test t1 21
+TABLE test t2 32
+TABLE test t3 50
truncate performance_schema.events_waits_summary_by_user_by_event_name;
"================== BY_USER truncated =================="
"================== Step 19 =================="
@@ -1551,46 +1613,46 @@ user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 113
+localhost wait/io/table/sql/handler 103
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 113
+wait/io/table/sql/handler 103
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 23 TABLE test t1
-wait/io/table/sql/handler 36 TABLE test t2
-wait/io/table/sql/handler 54 TABLE test t3
+wait/io/table/sql/handler 21 TABLE test t1
+wait/io/table/sql/handler 32 TABLE test t2
+wait/io/table/sql/handler 50 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 32 20 12 20 4 8 0
-TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 NULL 30 18 12 18 4 8 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 2 2 0 2 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 36 24 12 24 4 8 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t2 32 20 12 20 4 8 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 23
-TABLE test t2 36
-TABLE test t3 54
+TABLE test t1 21
+TABLE test t2 32
+TABLE test t3 50
truncate performance_schema.events_waits_summary_by_host_by_event_name;
"================== BY_HOST truncated =================="
"================== Step 21 =================="
@@ -1629,42 +1691,42 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 113
+wait/io/table/sql/handler 103
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 23 TABLE test t1
-wait/io/table/sql/handler 36 TABLE test t2
-wait/io/table/sql/handler 54 TABLE test t3
+wait/io/table/sql/handler 21 TABLE test t1
+wait/io/table/sql/handler 32 TABLE test t2
+wait/io/table/sql/handler 50 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 32 20 12 20 4 8 0
-TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 NULL 30 18 12 18 4 8 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 2 2 0 2 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 36 24 12 24 4 8 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t2 32 20 12 20 4 8 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 23
-TABLE test t2 36
-TABLE test t3 54
+TABLE test t1 21
+TABLE test t2 32
+TABLE test t3 50
truncate performance_schema.events_waits_summary_global_by_event_name;
"================== GLOBAL truncated =================="
"================== Step 21 =================="
@@ -1707,9 +1769,9 @@ wait/io/table/sql/handler 0
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 23 TABLE test t1
-wait/io/table/sql/handler 36 TABLE test t2
-wait/io/table/sql/handler 54 TABLE test t3
+wait/io/table/sql/handler 21 TABLE test t1
+wait/io/table/sql/handler 32 TABLE test t2
+wait/io/table/sql/handler 50 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 NULL 0 0 0 0 0 0 0
@@ -1730,16 +1792,16 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-show status like "performance_schema%";
+show global status like "performance_schema%";
Variable_name Value
Performance_schema_accounts_lost 0
Performance_schema_cond_classes_lost 0
@@ -1749,9 +1811,15 @@ Performance_schema_file_classes_lost 0
Performance_schema_file_handles_lost 0
Performance_schema_file_instances_lost 0
Performance_schema_hosts_lost 0
+Performance_schema_index_stat_lost 0
Performance_schema_locker_lost 0
+Performance_schema_memory_classes_lost 0
+Performance_schema_metadata_lock_lost 0
Performance_schema_mutex_classes_lost 0
Performance_schema_mutex_instances_lost 0
+Performance_schema_nested_statement_lost 0
+Performance_schema_prepared_statements_lost 0
+Performance_schema_program_lost 0
Performance_schema_rwlock_classes_lost 0
Performance_schema_rwlock_instances_lost 0
Performance_schema_session_connect_attrs_lost 0
@@ -1761,6 +1829,7 @@ Performance_schema_stage_classes_lost 0
Performance_schema_statement_classes_lost 0
Performance_schema_table_handles_lost 0
Performance_schema_table_instances_lost 0
+Performance_schema_table_lock_stat_lost 0
Performance_schema_thread_classes_lost 0
Performance_schema_thread_instances_lost 0
Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/table_io_aggregate_hist_4u_2t.result b/mysql-test/suite/perfschema/r/table_io_aggregate_hist_4u_2t.result
index 914bcc7084b..a19d3798e8b 100644
--- a/mysql-test/suite/perfschema/r/table_io_aggregate_hist_4u_2t.result
+++ b/mysql-test/suite/perfschema/r/table_io_aggregate_hist_4u_2t.result
@@ -4,11 +4,11 @@ delete from performance_schema.setup_objects
where object_name='t2';
select * from performance_schema.setup_actors
order by USER, HOST, ROLE;
-HOST USER ROLE
-localhost user1 %
-localhost user2 %
-localhost user3 %
-localhost user4 %
+HOST USER ROLE ENABLED HISTORY
+localhost user1 % YES YES
+localhost user2 % YES YES
+localhost user3 % YES YES
+localhost user4 % YES YES
select * from performance_schema.setup_objects
order by object_type, object_schema, object_name;
OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
@@ -22,6 +22,9 @@ events_stages_history_long YES
events_statements_current YES
events_statements_history YES
events_statements_history_long YES
+events_transactions_current YES
+events_transactions_history YES
+events_transactions_history_long YES
events_waits_current YES
events_waits_history YES
events_waits_history_long YES
@@ -65,28 +68,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -128,28 +123,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -180,18 +167,18 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=101;
update test.t2 set d=d+1 where a=101;
update test.t3 set d=d+1 where a=101;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 1
connection default;
-"================== Step 3 =================="
+"================== Step 3-A =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
username status
user2 not found
@@ -201,53 +188,105 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 25
+localhost wait/io/table/sql/handler 23
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 25
+wait/io/table/sql/handler 23
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
wait/io/table/sql/handler 8 TABLE test t1
-wait/io/table/sql/handler 17 TABLE test t3
+wait/io/table/sql/handler 15 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 NULL 6 4 2 4 1 1 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 2 1 1 1 0 1 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 14 8 6 8 3 3 0
-TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 1 1 0 1 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 8 5 3 5 1 2 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 17 11 6 11 3 3 0
+TABLE test t3 15 9 6 9 3 3 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 8
TABLE test t2 0
-TABLE test t3 17
+TABLE test t3 15
+connection con1;
+flush tables;
+"================== con1 FLUSH =================="
+connection default;
+"================== Step 3-B =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 23
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 23
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 23
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 23
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 23
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 8 TABLE test t1
+wait/io/table/sql/handler 15 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t3 15 9 6 9 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 8
+TABLE test t2 0
+TABLE test t3 15
connect con2, localhost, user2, , ;
select concat(current_user(), " is connected") as status;
status
@@ -256,7 +295,7 @@ connection default;
"================== Step 4 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
username event_name count_star
user2 wait/io/table/sql/handler 0
@@ -267,57 +306,51 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 0
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 25
+localhost wait/io/table/sql/handler 23
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 25
+wait/io/table/sql/handler 23
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
wait/io/table/sql/handler 8 TABLE test t1
-wait/io/table/sql/handler 17 TABLE test t3
+wait/io/table/sql/handler 15 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 NULL 6 4 2 4 1 1 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 2 1 1 1 0 1 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 14 8 6 8 3 3 0
-TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 1 1 0 1 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 8 5 3 5 1 2 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 17 11 6 11 3 3 0
+TABLE test t3 15 9 6 9 3 3 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 8
TABLE test t2 0
-TABLE test t3 17
+TABLE test t3 15
connection con2;
insert into test.t1 set a=201, b=1, c=1;
insert into test.t2 set a=202, b=2, c=2;
@@ -349,11 +382,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=201;
update test.t2 set d=d+1 where a=201;
update test.t3 set d=d+1 where a=201;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 2
205 5 5 1
@@ -361,10 +394,10 @@ connection default;
"================== Step 5 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
username event_name count_star
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 0
username status
user3 not found
@@ -372,57 +405,51 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 0
-user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/io/table/sql/handler 35
user2 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 64
+localhost wait/io/table/sql/handler 58
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 64
+wait/io/table/sql/handler 58
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 20 TABLE test t1
-wait/io/table/sql/handler 44 TABLE test t3
+wait/io/table/sql/handler 18 TABLE test t1
+wait/io/table/sql/handler 40 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 15 10 5 10 2 3 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 14 9 5 9 2 3 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 37 22 15 22 6 9 0
-TABLE test t3 index_b 5 5 0 5 0 0 0
+TABLE test t3 NULL 35 20 15 20 6 9 0
+TABLE test t3 index_b 3 3 0 3 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 20 13 7 13 2 5 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 44 29 15 29 6 9 0
+TABLE test t1 18 11 7 11 2 5 0
+TABLE test t3 40 25 15 25 6 9 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 20
+TABLE test t1 18
TABLE test t2 0
-TABLE test t3 44
+TABLE test t3 40
connect con3, localhost, user3, , ;
select concat(current_user(), " is connected") as status;
status
@@ -431,10 +458,10 @@ connection default;
"================== Step 6 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
username event_name count_star
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 0
username event_name count_star
user3 wait/io/table/sql/handler 0
@@ -443,61 +470,55 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 0
-user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/io/table/sql/handler 35
user2 localhost wait/lock/table/sql/handler 0
user3 localhost wait/io/table/sql/handler 0
user3 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 0
user3 wait/io/table/sql/handler 0
user3 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 64
+localhost wait/io/table/sql/handler 58
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 64
+wait/io/table/sql/handler 58
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 20 TABLE test t1
-wait/io/table/sql/handler 44 TABLE test t3
+wait/io/table/sql/handler 18 TABLE test t1
+wait/io/table/sql/handler 40 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 15 10 5 10 2 3 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 14 9 5 9 2 3 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 37 22 15 22 6 9 0
-TABLE test t3 index_b 5 5 0 5 0 0 0
+TABLE test t3 NULL 35 20 15 20 6 9 0
+TABLE test t3 index_b 3 3 0 3 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 20 13 7 13 2 5 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 44 29 15 29 6 9 0
+TABLE test t1 18 11 7 11 2 5 0
+TABLE test t3 40 25 15 25 6 9 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 20
+TABLE test t1 18
TABLE test t2 0
-TABLE test t3 44
+TABLE test t3 40
connection con3;
insert into test.t1 set a=301, b=1, c=1;
insert into test.t2 set a=302, b=2, c=2;
@@ -535,11 +556,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=301;
update test.t2 set d=d+1 where a=301;
update test.t3 set d=d+1 where a=301;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 3
205 5 5 2
@@ -548,73 +569,67 @@ connection default;
"================== Step 7 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
username event_name count_star
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 0
-user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/io/table/sql/handler 35
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 116
+localhost wait/io/table/sql/handler 106
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 116
+wait/io/table/sql/handler 106
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 35 TABLE test t1
-wait/io/table/sql/handler 81 TABLE test t3
+wait/io/table/sql/handler 31 TABLE test t1
+wait/io/table/sql/handler 75 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 27 18 9 18 3 6 0
-TABLE test t1 index_b 2 2 0 2 0 0 0
+TABLE test t1 NULL 25 16 9 16 3 6 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 6 3 3 3 0 3 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 69 42 27 42 9 18 0
-TABLE test t3 index_b 9 9 0 9 0 0 0
+TABLE test t3 NULL 66 39 27 39 9 18 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 3 3 0 3 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 35 23 12 23 3 9 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 81 54 27 54 9 18 0
+TABLE test t1 31 19 12 19 3 9 0
+TABLE test t3 75 48 27 48 9 18 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 35
+TABLE test t1 31
TABLE test t2 0
-TABLE test t3 81
+TABLE test t3 75
connect con4, localhost, user4, , ;
select concat(current_user(), " is connected") as status;
status
@@ -623,78 +638,72 @@ connection default;
"================== Step 8 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
username event_name count_star
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
username event_name count_star
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 0
-user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/io/table/sql/handler 35
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 0
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 116
+localhost wait/io/table/sql/handler 106
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 116
+wait/io/table/sql/handler 106
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 35 TABLE test t1
-wait/io/table/sql/handler 81 TABLE test t3
+wait/io/table/sql/handler 31 TABLE test t1
+wait/io/table/sql/handler 75 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 27 18 9 18 3 6 0
-TABLE test t1 index_b 2 2 0 2 0 0 0
+TABLE test t1 NULL 25 16 9 16 3 6 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 6 3 3 3 0 3 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 69 42 27 42 9 18 0
-TABLE test t3 index_b 9 9 0 9 0 0 0
+TABLE test t3 NULL 66 39 27 39 9 18 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 3 3 0 3 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 35 23 12 23 3 9 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 81 54 27 54 9 18 0
+TABLE test t1 31 19 12 19 3 9 0
+TABLE test t3 75 48 27 48 9 18 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 35
+TABLE test t1 31
TABLE test t2 0
-TABLE test t3 81
+TABLE test t3 75
connection con4;
insert into test.t1 set a=401, b=1, c=1;
insert into test.t2 set a=402, b=2, c=2;
@@ -738,11 +747,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=401;
update test.t2 set d=d+1 where a=401;
update test.t3 set d=d+1 where a=401;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 4
205 5 5 3
@@ -752,78 +761,72 @@ connection default;
"================== Step 9 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
username event_name count_star
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
username event_name count_star
-user4 wait/io/table/sql/handler 65
+user4 wait/io/table/sql/handler 61
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 0
-user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/io/table/sql/handler 35
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 0
-user4 localhost wait/io/table/sql/handler 65
+user4 localhost wait/io/table/sql/handler 61
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
-user4 wait/io/table/sql/handler 65
+user4 wait/io/table/sql/handler 61
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 181
+localhost wait/io/table/sql/handler 167
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 53 TABLE test t1
-wait/io/table/sql/handler 128 TABLE test t3
+wait/io/table/sql/handler 47 TABLE test t1
+wait/io/table/sql/handler 120 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
+TABLE test t1 47
TABLE test t2 0
-TABLE test t3 128
+TABLE test t3 120
connection con1;
lock tables test.t1 read, test.t2 read, test.t3 read;
unlock tables;
@@ -833,309 +836,285 @@ connection default;
"================== Step 10 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
username event_name count_star
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
username event_name count_star
-user4 wait/io/table/sql/handler 65
+user4 wait/io/table/sql/handler 61
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 0
-user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/io/table/sql/handler 35
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 0
-user4 localhost wait/io/table/sql/handler 65
+user4 localhost wait/io/table/sql/handler 61
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
-user4 wait/io/table/sql/handler 65
+user4 wait/io/table/sql/handler 61
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 181
+localhost wait/io/table/sql/handler 167
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 53 TABLE test t1
-wait/io/table/sql/handler 128 TABLE test t3
+wait/io/table/sql/handler 47 TABLE test t1
+wait/io/table/sql/handler 120 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
+TABLE test t1 47
TABLE test t2 0
-TABLE test t3 128
+TABLE test t3 120
connection default;
flush tables;
"================== flush marker =================="
"================== Step 11 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
username event_name count_star
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
username event_name count_star
-user4 wait/io/table/sql/handler 65
+user4 wait/io/table/sql/handler 61
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 0
-user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/io/table/sql/handler 35
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 0
-user4 localhost wait/io/table/sql/handler 65
+user4 localhost wait/io/table/sql/handler 61
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
-user4 wait/io/table/sql/handler 65
+user4 wait/io/table/sql/handler 61
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 181
+localhost wait/io/table/sql/handler 167
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 53 TABLE test t1
-wait/io/table/sql/handler 128 TABLE test t3
+wait/io/table/sql/handler 47 TABLE test t1
+wait/io/table/sql/handler 120 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
+TABLE test t1 47
TABLE test t2 0
-TABLE test t3 128
+TABLE test t3 120
set global read_only=1;
set global read_only=0;
"================== global read_only marker =================="
"================== Step 12 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
username event_name count_star
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
username event_name count_star
-user4 wait/io/table/sql/handler 65
+user4 wait/io/table/sql/handler 61
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 0
-user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/io/table/sql/handler 35
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 0
-user4 localhost wait/io/table/sql/handler 65
+user4 localhost wait/io/table/sql/handler 61
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
-user4 wait/io/table/sql/handler 65
+user4 wait/io/table/sql/handler 61
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 181
+localhost wait/io/table/sql/handler 167
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 53 TABLE test t1
-wait/io/table/sql/handler 128 TABLE test t3
+wait/io/table/sql/handler 47 TABLE test t1
+wait/io/table/sql/handler 120 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
+TABLE test t1 47
TABLE test t2 0
-TABLE test t3 128
+TABLE test t3 120
disconnect con1;
"================== Step 13 =================="
call dump_thread();
username status
user1 not found
username event_name count_star
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
username event_name count_star
-user4 wait/io/table/sql/handler 65
+user4 wait/io/table/sql/handler 61
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 0
-user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/io/table/sql/handler 35
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 0
-user4 localhost wait/io/table/sql/handler 65
+user4 localhost wait/io/table/sql/handler 61
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
-user4 wait/io/table/sql/handler 65
+user4 wait/io/table/sql/handler 61
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 181
+localhost wait/io/table/sql/handler 167
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 53 TABLE test t1
-wait/io/table/sql/handler 128 TABLE test t3
+wait/io/table/sql/handler 47 TABLE test t1
+wait/io/table/sql/handler 120 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
+TABLE test t1 47
TABLE test t2 0
-TABLE test t3 128
+TABLE test t3 120
disconnect con2;
"================== Step 14 =================="
call dump_thread();
@@ -1144,72 +1123,66 @@ user1 not found
username status
user2 not found
username event_name count_star
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
username event_name count_star
-user4 wait/io/table/sql/handler 65
+user4 wait/io/table/sql/handler 61
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 0
-user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/io/table/sql/handler 35
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 0
-user4 localhost wait/io/table/sql/handler 65
+user4 localhost wait/io/table/sql/handler 61
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
-user4 wait/io/table/sql/handler 65
+user4 wait/io/table/sql/handler 61
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 181
+localhost wait/io/table/sql/handler 167
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 53 TABLE test t1
-wait/io/table/sql/handler 128 TABLE test t3
+wait/io/table/sql/handler 47 TABLE test t1
+wait/io/table/sql/handler 120 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
+TABLE test t1 47
TABLE test t2 0
-TABLE test t3 128
+TABLE test t3 120
disconnect con3;
"================== Step 15 =================="
call dump_thread();
@@ -1220,69 +1193,63 @@ user2 not found
username status
user3 not found
username event_name count_star
-user4 wait/io/table/sql/handler 65
+user4 wait/io/table/sql/handler 61
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 0
-user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/io/table/sql/handler 35
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 0
-user4 localhost wait/io/table/sql/handler 65
+user4 localhost wait/io/table/sql/handler 61
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
-user4 wait/io/table/sql/handler 65
+user4 wait/io/table/sql/handler 61
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 181
+localhost wait/io/table/sql/handler 167
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 53 TABLE test t1
-wait/io/table/sql/handler 128 TABLE test t3
+wait/io/table/sql/handler 47 TABLE test t1
+wait/io/table/sql/handler 120 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
+TABLE test t1 47
TABLE test t2 0
-TABLE test t3 128
+TABLE test t3 120
disconnect con4;
"================== Step 16 =================="
call dump_thread();
@@ -1296,65 +1263,59 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 0
-user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/io/table/sql/handler 35
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 0
-user4 localhost wait/io/table/sql/handler 65
+user4 localhost wait/io/table/sql/handler 61
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
-user4 wait/io/table/sql/handler 65
+user4 wait/io/table/sql/handler 61
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 181
+localhost wait/io/table/sql/handler 167
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 53 TABLE test t1
-wait/io/table/sql/handler 128 TABLE test t3
+wait/io/table/sql/handler 47 TABLE test t1
+wait/io/table/sql/handler 120 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
+TABLE test t1 47
TABLE test t2 0
-TABLE test t3 128
+TABLE test t3 120
connection default;
truncate performance_schema.events_waits_summary_by_thread_by_event_name;
"================== BY_THREAD truncated =================="
@@ -1370,65 +1331,59 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 0
-user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/io/table/sql/handler 35
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 0
-user4 localhost wait/io/table/sql/handler 65
+user4 localhost wait/io/table/sql/handler 61
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
-user4 wait/io/table/sql/handler 65
+user4 wait/io/table/sql/handler 61
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 181
+localhost wait/io/table/sql/handler 167
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 53 TABLE test t1
-wait/io/table/sql/handler 128 TABLE test t3
+wait/io/table/sql/handler 47 TABLE test t1
+wait/io/table/sql/handler 120 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
+TABLE test t1 47
TABLE test t2 0
-TABLE test t3 128
+TABLE test t3 120
truncate performance_schema.events_waits_summary_by_account_by_event_name;
"================== BY_ACCOUNT truncated =================="
"================== Step 18 =================="
@@ -1453,55 +1408,49 @@ user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
-user4 wait/io/table/sql/handler 65
+user4 wait/io/table/sql/handler 61
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 181
+localhost wait/io/table/sql/handler 167
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 53 TABLE test t1
-wait/io/table/sql/handler 128 TABLE test t3
+wait/io/table/sql/handler 47 TABLE test t1
+wait/io/table/sql/handler 120 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
+TABLE test t1 47
TABLE test t2 0
-TABLE test t3 128
+TABLE test t3 120
truncate performance_schema.events_waits_summary_by_user_by_event_name;
"================== BY_USER truncated =================="
"================== Step 19 =================="
@@ -1536,45 +1485,39 @@ user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 181
+localhost wait/io/table/sql/handler 167
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 53 TABLE test t1
-wait/io/table/sql/handler 128 TABLE test t3
+wait/io/table/sql/handler 47 TABLE test t1
+wait/io/table/sql/handler 120 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
+TABLE test t1 47
TABLE test t2 0
-TABLE test t3 128
+TABLE test t3 120
truncate performance_schema.events_waits_summary_by_host_by_event_name;
"================== BY_HOST truncated =================="
"================== Step 21 =================="
@@ -1613,41 +1556,35 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 53 TABLE test t1
-wait/io/table/sql/handler 128 TABLE test t3
+wait/io/table/sql/handler 47 TABLE test t1
+wait/io/table/sql/handler 120 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
+TABLE test t1 47
TABLE test t2 0
-TABLE test t3 128
+TABLE test t3 120
truncate performance_schema.events_waits_summary_global_by_event_name;
"================== GLOBAL truncated =================="
"================== Step 21 =================="
@@ -1690,18 +1627,14 @@ wait/io/table/sql/handler 0
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 53 TABLE test t1
-wait/io/table/sql/handler 128 TABLE test t3
+wait/io/table/sql/handler 47 TABLE test t1
+wait/io/table/sql/handler 120 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
@@ -1709,19 +1642,17 @@ TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-show status like "performance_schema%";
+show global status like "performance_schema%";
Variable_name Value
Performance_schema_accounts_lost 0
Performance_schema_cond_classes_lost 0
@@ -1731,9 +1662,15 @@ Performance_schema_file_classes_lost 0
Performance_schema_file_handles_lost 0
Performance_schema_file_instances_lost 0
Performance_schema_hosts_lost 0
+Performance_schema_index_stat_lost 0
Performance_schema_locker_lost 0
+Performance_schema_memory_classes_lost 0
+Performance_schema_metadata_lock_lost 0
Performance_schema_mutex_classes_lost 0
Performance_schema_mutex_instances_lost 0
+Performance_schema_nested_statement_lost 0
+Performance_schema_prepared_statements_lost 0
+Performance_schema_program_lost 0
Performance_schema_rwlock_classes_lost 0
Performance_schema_rwlock_instances_lost 0
Performance_schema_session_connect_attrs_lost 0
@@ -1743,6 +1680,7 @@ Performance_schema_stage_classes_lost 0
Performance_schema_statement_classes_lost 0
Performance_schema_table_handles_lost 0
Performance_schema_table_instances_lost 0
+Performance_schema_table_lock_stat_lost 0
Performance_schema_thread_classes_lost 0
Performance_schema_thread_instances_lost 0
Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/table_io_aggregate_hist_4u_3t.result b/mysql-test/suite/perfschema/r/table_io_aggregate_hist_4u_3t.result
index f92ebe8e467..6266fce73ad 100644
--- a/mysql-test/suite/perfschema/r/table_io_aggregate_hist_4u_3t.result
+++ b/mysql-test/suite/perfschema/r/table_io_aggregate_hist_4u_3t.result
@@ -2,11 +2,11 @@ update performance_schema.setup_instruments
set enabled='NO' where name='wait/lock/table/sql/handler';
select * from performance_schema.setup_actors
order by USER, HOST, ROLE;
-HOST USER ROLE
-localhost user1 %
-localhost user2 %
-localhost user3 %
-localhost user4 %
+HOST USER ROLE ENABLED HISTORY
+localhost user1 % YES YES
+localhost user2 % YES YES
+localhost user3 % YES YES
+localhost user4 % YES YES
select * from performance_schema.setup_objects
order by object_type, object_schema, object_name;
OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
@@ -21,6 +21,9 @@ events_stages_history_long YES
events_statements_current YES
events_statements_history YES
events_statements_history_long YES
+events_transactions_current YES
+events_transactions_history YES
+events_transactions_history_long YES
events_waits_current YES
events_waits_history YES
events_waits_history_long YES
@@ -64,15 +67,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -82,10 +82,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -127,15 +127,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -145,10 +142,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -179,18 +176,18 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=101;
update test.t2 set d=d+1 where a=101;
update test.t3 set d=d+1 where a=101;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 1
connection default;
-"================== Step 3 =================="
+"================== Step 3-A =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
username status
user2 not found
@@ -200,54 +197,119 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 37
+localhost wait/io/table/sql/handler 33
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 37
+wait/io/table/sql/handler 33
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
wait/io/table/sql/handler 8 TABLE test t1
-wait/io/table/sql/handler 12 TABLE test t2
-wait/io/table/sql/handler 17 TABLE test t3
+wait/io/table/sql/handler 10 TABLE test t2
+wait/io/table/sql/handler 15 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 NULL 6 4 2 4 1 1 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 2 1 1 1 0 1 0
-TABLE test t2 NULL 10 6 4 6 2 2 0
-TABLE test t2 index_b 1 1 0 1 0 0 0
+TABLE test t2 NULL 9 5 4 5 2 2 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 1 1 0 1 0 0 0
-TABLE test t3 NULL 14 8 6 8 3 3 0
-TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 1 1 0 1 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 8 5 3 5 1 2 0
-TABLE test t2 12 8 4 8 2 2 0
-TABLE test t3 17 11 6 11 3 3 0
+TABLE test t2 10 6 4 6 2 2 0
+TABLE test t3 15 9 6 9 3 3 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 8
-TABLE test t2 12
-TABLE test t3 17
+TABLE test t2 10
+TABLE test t3 15
+connection con1;
+flush tables;
+"================== con1 FLUSH =================="
+connection default;
+"================== Step 3-B =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 33
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 33
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 33
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 33
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 33
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 8 TABLE test t1
+wait/io/table/sql/handler 10 TABLE test t2
+wait/io/table/sql/handler 15 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t2 NULL 9 5 4 5 2 2 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 1 1 0 1 0 0 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t2 10 6 4 6 2 2 0
+TABLE test t3 15 9 6 9 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 8
+TABLE test t2 10
+TABLE test t3 15
connect con2, localhost, user2, , ;
select concat(current_user(), " is connected") as status;
status
@@ -256,7 +318,7 @@ connection default;
"================== Step 4 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
username event_name count_star
user2 wait/io/table/sql/handler 0
@@ -267,58 +329,58 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 0
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 37
+localhost wait/io/table/sql/handler 33
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 37
+wait/io/table/sql/handler 33
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
wait/io/table/sql/handler 8 TABLE test t1
-wait/io/table/sql/handler 12 TABLE test t2
-wait/io/table/sql/handler 17 TABLE test t3
+wait/io/table/sql/handler 10 TABLE test t2
+wait/io/table/sql/handler 15 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 NULL 6 4 2 4 1 1 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 2 1 1 1 0 1 0
-TABLE test t2 NULL 10 6 4 6 2 2 0
-TABLE test t2 index_b 1 1 0 1 0 0 0
+TABLE test t2 NULL 9 5 4 5 2 2 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 1 1 0 1 0 0 0
-TABLE test t3 NULL 14 8 6 8 3 3 0
-TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 1 1 0 1 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 8 5 3 5 1 2 0
-TABLE test t2 12 8 4 8 2 2 0
-TABLE test t3 17 11 6 11 3 3 0
+TABLE test t2 10 6 4 6 2 2 0
+TABLE test t3 15 9 6 9 3 3 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 8
-TABLE test t2 12
-TABLE test t3 17
+TABLE test t2 10
+TABLE test t3 15
connection con2;
insert into test.t1 set a=201, b=1, c=1;
insert into test.t2 set a=202, b=2, c=2;
@@ -350,11 +412,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=201;
update test.t2 set d=d+1 where a=201;
update test.t3 set d=d+1 where a=201;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 2
205 5 5 1
@@ -362,10 +424,10 @@ connection default;
"================== Step 5 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
username event_name count_star
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 0
username status
user3 not found
@@ -373,58 +435,58 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 0
-user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/io/table/sql/handler 51
user2 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 94
+localhost wait/io/table/sql/handler 84
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 94
+wait/io/table/sql/handler 84
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 20 TABLE test t1
-wait/io/table/sql/handler 30 TABLE test t2
-wait/io/table/sql/handler 44 TABLE test t3
+wait/io/table/sql/handler 18 TABLE test t1
+wait/io/table/sql/handler 26 TABLE test t2
+wait/io/table/sql/handler 40 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 15 10 5 10 2 3 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 14 9 5 9 2 3 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 26 16 10 16 4 6 0
-TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 NULL 24 14 10 14 4 6 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 2 2 0 2 0 0 0
-TABLE test t3 NULL 37 22 15 22 6 9 0
-TABLE test t3 index_b 5 5 0 5 0 0 0
+TABLE test t3 NULL 35 20 15 20 6 9 0
+TABLE test t3 index_b 3 3 0 3 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 20 13 7 13 2 5 0
-TABLE test t2 30 20 10 20 4 6 0
-TABLE test t3 44 29 15 29 6 9 0
+TABLE test t1 18 11 7 11 2 5 0
+TABLE test t2 26 16 10 16 4 6 0
+TABLE test t3 40 25 15 25 6 9 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 20
-TABLE test t2 30
-TABLE test t3 44
+TABLE test t1 18
+TABLE test t2 26
+TABLE test t3 40
connect con3, localhost, user3, , ;
select concat(current_user(), " is connected") as status;
status
@@ -433,10 +495,10 @@ connection default;
"================== Step 6 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
username event_name count_star
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 0
username event_name count_star
user3 wait/io/table/sql/handler 0
@@ -445,62 +507,62 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 0
-user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/io/table/sql/handler 51
user2 localhost wait/lock/table/sql/handler 0
user3 localhost wait/io/table/sql/handler 0
user3 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 0
user3 wait/io/table/sql/handler 0
user3 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 94
+localhost wait/io/table/sql/handler 84
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 94
+wait/io/table/sql/handler 84
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 20 TABLE test t1
-wait/io/table/sql/handler 30 TABLE test t2
-wait/io/table/sql/handler 44 TABLE test t3
+wait/io/table/sql/handler 18 TABLE test t1
+wait/io/table/sql/handler 26 TABLE test t2
+wait/io/table/sql/handler 40 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 15 10 5 10 2 3 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 14 9 5 9 2 3 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 26 16 10 16 4 6 0
-TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 NULL 24 14 10 14 4 6 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 2 2 0 2 0 0 0
-TABLE test t3 NULL 37 22 15 22 6 9 0
-TABLE test t3 index_b 5 5 0 5 0 0 0
+TABLE test t3 NULL 35 20 15 20 6 9 0
+TABLE test t3 index_b 3 3 0 3 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 20 13 7 13 2 5 0
-TABLE test t2 30 20 10 20 4 6 0
-TABLE test t3 44 29 15 29 6 9 0
+TABLE test t1 18 11 7 11 2 5 0
+TABLE test t2 26 16 10 16 4 6 0
+TABLE test t3 40 25 15 25 6 9 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 20
-TABLE test t2 30
-TABLE test t3 44
+TABLE test t1 18
+TABLE test t2 26
+TABLE test t3 40
connection con3;
insert into test.t1 set a=301, b=1, c=1;
insert into test.t2 set a=302, b=2, c=2;
@@ -538,11 +600,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=301;
update test.t2 set d=d+1 where a=301;
update test.t3 set d=d+1 where a=301;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 3
205 5 5 2
@@ -551,74 +613,74 @@ connection default;
"================== Step 7 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
username event_name count_star
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 0
-user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/io/table/sql/handler 51
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 170
+localhost wait/io/table/sql/handler 154
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 170
+wait/io/table/sql/handler 154
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 35 TABLE test t1
-wait/io/table/sql/handler 54 TABLE test t2
-wait/io/table/sql/handler 81 TABLE test t3
+wait/io/table/sql/handler 31 TABLE test t1
+wait/io/table/sql/handler 48 TABLE test t2
+wait/io/table/sql/handler 75 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 27 18 9 18 3 6 0
-TABLE test t1 index_b 2 2 0 2 0 0 0
+TABLE test t1 NULL 25 16 9 16 3 6 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 6 3 3 3 0 3 0
-TABLE test t2 NULL 48 30 18 30 6 12 0
-TABLE test t2 index_b 3 3 0 3 0 0 0
+TABLE test t2 NULL 45 27 18 27 6 12 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 3 3 0 3 0 0 0
-TABLE test t3 NULL 69 42 27 42 9 18 0
-TABLE test t3 index_b 9 9 0 9 0 0 0
+TABLE test t3 NULL 66 39 27 39 9 18 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 3 3 0 3 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 35 23 12 23 3 9 0
-TABLE test t2 54 36 18 36 6 12 0
-TABLE test t3 81 54 27 54 9 18 0
+TABLE test t1 31 19 12 19 3 9 0
+TABLE test t2 48 30 18 30 6 12 0
+TABLE test t3 75 48 27 48 9 18 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 35
-TABLE test t2 54
-TABLE test t3 81
+TABLE test t1 31
+TABLE test t2 48
+TABLE test t3 75
connect con4, localhost, user4, , ;
select concat(current_user(), " is connected") as status;
status
@@ -627,79 +689,79 @@ connection default;
"================== Step 8 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
username event_name count_star
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
username event_name count_star
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 0
-user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/io/table/sql/handler 51
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 0
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 170
+localhost wait/io/table/sql/handler 154
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 170
+wait/io/table/sql/handler 154
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 35 TABLE test t1
-wait/io/table/sql/handler 54 TABLE test t2
-wait/io/table/sql/handler 81 TABLE test t3
+wait/io/table/sql/handler 31 TABLE test t1
+wait/io/table/sql/handler 48 TABLE test t2
+wait/io/table/sql/handler 75 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 27 18 9 18 3 6 0
-TABLE test t1 index_b 2 2 0 2 0 0 0
+TABLE test t1 NULL 25 16 9 16 3 6 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 6 3 3 3 0 3 0
-TABLE test t2 NULL 48 30 18 30 6 12 0
-TABLE test t2 index_b 3 3 0 3 0 0 0
+TABLE test t2 NULL 45 27 18 27 6 12 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 3 3 0 3 0 0 0
-TABLE test t3 NULL 69 42 27 42 9 18 0
-TABLE test t3 index_b 9 9 0 9 0 0 0
+TABLE test t3 NULL 66 39 27 39 9 18 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 3 3 0 3 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 35 23 12 23 3 9 0
-TABLE test t2 54 36 18 36 6 12 0
-TABLE test t3 81 54 27 54 9 18 0
+TABLE test t1 31 19 12 19 3 9 0
+TABLE test t2 48 30 18 30 6 12 0
+TABLE test t3 75 48 27 48 9 18 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 35
-TABLE test t2 54
-TABLE test t3 81
+TABLE test t1 31
+TABLE test t2 48
+TABLE test t3 75
connection con4;
insert into test.t1 set a=401, b=1, c=1;
insert into test.t2 set a=402, b=2, c=2;
@@ -743,11 +805,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=401;
update test.t2 set d=d+1 where a=401;
update test.t3 set d=d+1 where a=401;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 4
205 5 5 3
@@ -757,79 +819,79 @@ connection default;
"================== Step 9 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
username event_name count_star
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
username event_name count_star
-user4 wait/io/table/sql/handler 95
+user4 wait/io/table/sql/handler 89
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 0
-user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/io/table/sql/handler 51
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 0
-user4 localhost wait/io/table/sql/handler 95
+user4 localhost wait/io/table/sql/handler 89
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
-user4 wait/io/table/sql/handler 95
+user4 wait/io/table/sql/handler 89
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 265
+localhost wait/io/table/sql/handler 243
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 53 TABLE test t1
-wait/io/table/sql/handler 84 TABLE test t2
-wait/io/table/sql/handler 128 TABLE test t3
+wait/io/table/sql/handler 47 TABLE test t1
+wait/io/table/sql/handler 76 TABLE test t2
+wait/io/table/sql/handler 120 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
-TABLE test t2 84
-TABLE test t3 128
+TABLE test t1 47
+TABLE test t2 76
+TABLE test t3 120
connection con1;
lock tables test.t1 read, test.t2 read, test.t3 read;
unlock tables;
@@ -839,313 +901,313 @@ connection default;
"================== Step 10 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
username event_name count_star
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
username event_name count_star
-user4 wait/io/table/sql/handler 95
+user4 wait/io/table/sql/handler 89
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 0
-user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/io/table/sql/handler 51
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 0
-user4 localhost wait/io/table/sql/handler 95
+user4 localhost wait/io/table/sql/handler 89
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
-user4 wait/io/table/sql/handler 95
+user4 wait/io/table/sql/handler 89
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 265
+localhost wait/io/table/sql/handler 243
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 53 TABLE test t1
-wait/io/table/sql/handler 84 TABLE test t2
-wait/io/table/sql/handler 128 TABLE test t3
+wait/io/table/sql/handler 47 TABLE test t1
+wait/io/table/sql/handler 76 TABLE test t2
+wait/io/table/sql/handler 120 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
-TABLE test t2 84
-TABLE test t3 128
+TABLE test t1 47
+TABLE test t2 76
+TABLE test t3 120
connection default;
flush tables;
"================== flush marker =================="
"================== Step 11 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
username event_name count_star
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
username event_name count_star
-user4 wait/io/table/sql/handler 95
+user4 wait/io/table/sql/handler 89
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 0
-user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/io/table/sql/handler 51
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 0
-user4 localhost wait/io/table/sql/handler 95
+user4 localhost wait/io/table/sql/handler 89
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
-user4 wait/io/table/sql/handler 95
+user4 wait/io/table/sql/handler 89
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 265
+localhost wait/io/table/sql/handler 243
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 53 TABLE test t1
-wait/io/table/sql/handler 84 TABLE test t2
-wait/io/table/sql/handler 128 TABLE test t3
+wait/io/table/sql/handler 47 TABLE test t1
+wait/io/table/sql/handler 76 TABLE test t2
+wait/io/table/sql/handler 120 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
-TABLE test t2 84
-TABLE test t3 128
+TABLE test t1 47
+TABLE test t2 76
+TABLE test t3 120
set global read_only=1;
set global read_only=0;
"================== global read_only marker =================="
"================== Step 12 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
username event_name count_star
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
username event_name count_star
-user4 wait/io/table/sql/handler 95
+user4 wait/io/table/sql/handler 89
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 0
-user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/io/table/sql/handler 51
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 0
-user4 localhost wait/io/table/sql/handler 95
+user4 localhost wait/io/table/sql/handler 89
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
-user4 wait/io/table/sql/handler 95
+user4 wait/io/table/sql/handler 89
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 265
+localhost wait/io/table/sql/handler 243
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 53 TABLE test t1
-wait/io/table/sql/handler 84 TABLE test t2
-wait/io/table/sql/handler 128 TABLE test t3
+wait/io/table/sql/handler 47 TABLE test t1
+wait/io/table/sql/handler 76 TABLE test t2
+wait/io/table/sql/handler 120 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
-TABLE test t2 84
-TABLE test t3 128
+TABLE test t1 47
+TABLE test t2 76
+TABLE test t3 120
disconnect con1;
"================== Step 13 =================="
call dump_thread();
username status
user1 not found
username event_name count_star
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
username event_name count_star
-user4 wait/io/table/sql/handler 95
+user4 wait/io/table/sql/handler 89
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 0
-user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/io/table/sql/handler 51
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 0
-user4 localhost wait/io/table/sql/handler 95
+user4 localhost wait/io/table/sql/handler 89
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
-user4 wait/io/table/sql/handler 95
+user4 wait/io/table/sql/handler 89
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 265
+localhost wait/io/table/sql/handler 243
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 53 TABLE test t1
-wait/io/table/sql/handler 84 TABLE test t2
-wait/io/table/sql/handler 128 TABLE test t3
+wait/io/table/sql/handler 47 TABLE test t1
+wait/io/table/sql/handler 76 TABLE test t2
+wait/io/table/sql/handler 120 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
-TABLE test t2 84
-TABLE test t3 128
+TABLE test t1 47
+TABLE test t2 76
+TABLE test t3 120
disconnect con2;
"================== Step 14 =================="
call dump_thread();
@@ -1154,73 +1216,73 @@ user1 not found
username status
user2 not found
username event_name count_star
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
username event_name count_star
-user4 wait/io/table/sql/handler 95
+user4 wait/io/table/sql/handler 89
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 0
-user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/io/table/sql/handler 51
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 0
-user4 localhost wait/io/table/sql/handler 95
+user4 localhost wait/io/table/sql/handler 89
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
-user4 wait/io/table/sql/handler 95
+user4 wait/io/table/sql/handler 89
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 265
+localhost wait/io/table/sql/handler 243
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 53 TABLE test t1
-wait/io/table/sql/handler 84 TABLE test t2
-wait/io/table/sql/handler 128 TABLE test t3
+wait/io/table/sql/handler 47 TABLE test t1
+wait/io/table/sql/handler 76 TABLE test t2
+wait/io/table/sql/handler 120 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
-TABLE test t2 84
-TABLE test t3 128
+TABLE test t1 47
+TABLE test t2 76
+TABLE test t3 120
disconnect con3;
"================== Step 15 =================="
call dump_thread();
@@ -1231,70 +1293,70 @@ user2 not found
username status
user3 not found
username event_name count_star
-user4 wait/io/table/sql/handler 95
+user4 wait/io/table/sql/handler 89
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 0
-user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/io/table/sql/handler 51
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 0
-user4 localhost wait/io/table/sql/handler 95
+user4 localhost wait/io/table/sql/handler 89
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
-user4 wait/io/table/sql/handler 95
+user4 wait/io/table/sql/handler 89
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 265
+localhost wait/io/table/sql/handler 243
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 53 TABLE test t1
-wait/io/table/sql/handler 84 TABLE test t2
-wait/io/table/sql/handler 128 TABLE test t3
+wait/io/table/sql/handler 47 TABLE test t1
+wait/io/table/sql/handler 76 TABLE test t2
+wait/io/table/sql/handler 120 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
-TABLE test t2 84
-TABLE test t3 128
+TABLE test t1 47
+TABLE test t2 76
+TABLE test t3 120
disconnect con4;
"================== Step 16 =================="
call dump_thread();
@@ -1308,66 +1370,66 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 0
-user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/io/table/sql/handler 51
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 0
-user4 localhost wait/io/table/sql/handler 95
+user4 localhost wait/io/table/sql/handler 89
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
-user4 wait/io/table/sql/handler 95
+user4 wait/io/table/sql/handler 89
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 265
+localhost wait/io/table/sql/handler 243
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 53 TABLE test t1
-wait/io/table/sql/handler 84 TABLE test t2
-wait/io/table/sql/handler 128 TABLE test t3
+wait/io/table/sql/handler 47 TABLE test t1
+wait/io/table/sql/handler 76 TABLE test t2
+wait/io/table/sql/handler 120 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
-TABLE test t2 84
-TABLE test t3 128
+TABLE test t1 47
+TABLE test t2 76
+TABLE test t3 120
connection default;
truncate performance_schema.events_waits_summary_by_thread_by_event_name;
"================== BY_THREAD truncated =================="
@@ -1383,66 +1445,66 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 0
-user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/io/table/sql/handler 51
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 0
-user4 localhost wait/io/table/sql/handler 95
+user4 localhost wait/io/table/sql/handler 89
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
-user4 wait/io/table/sql/handler 95
+user4 wait/io/table/sql/handler 89
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 265
+localhost wait/io/table/sql/handler 243
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 53 TABLE test t1
-wait/io/table/sql/handler 84 TABLE test t2
-wait/io/table/sql/handler 128 TABLE test t3
+wait/io/table/sql/handler 47 TABLE test t1
+wait/io/table/sql/handler 76 TABLE test t2
+wait/io/table/sql/handler 120 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
-TABLE test t2 84
-TABLE test t3 128
+TABLE test t1 47
+TABLE test t2 76
+TABLE test t3 120
truncate performance_schema.events_waits_summary_by_account_by_event_name;
"================== BY_ACCOUNT truncated =================="
"================== Step 18 =================="
@@ -1467,56 +1529,56 @@ user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
-user4 wait/io/table/sql/handler 95
+user4 wait/io/table/sql/handler 89
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 265
+localhost wait/io/table/sql/handler 243
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 53 TABLE test t1
-wait/io/table/sql/handler 84 TABLE test t2
-wait/io/table/sql/handler 128 TABLE test t3
+wait/io/table/sql/handler 47 TABLE test t1
+wait/io/table/sql/handler 76 TABLE test t2
+wait/io/table/sql/handler 120 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
-TABLE test t2 84
-TABLE test t3 128
+TABLE test t1 47
+TABLE test t2 76
+TABLE test t3 120
truncate performance_schema.events_waits_summary_by_user_by_event_name;
"================== BY_USER truncated =================="
"================== Step 19 =================="
@@ -1551,46 +1613,46 @@ user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 265
+localhost wait/io/table/sql/handler 243
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 53 TABLE test t1
-wait/io/table/sql/handler 84 TABLE test t2
-wait/io/table/sql/handler 128 TABLE test t3
+wait/io/table/sql/handler 47 TABLE test t1
+wait/io/table/sql/handler 76 TABLE test t2
+wait/io/table/sql/handler 120 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
-TABLE test t2 84
-TABLE test t3 128
+TABLE test t1 47
+TABLE test t2 76
+TABLE test t3 120
truncate performance_schema.events_waits_summary_by_host_by_event_name;
"================== BY_HOST truncated =================="
"================== Step 21 =================="
@@ -1629,42 +1691,42 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 53 TABLE test t1
-wait/io/table/sql/handler 84 TABLE test t2
-wait/io/table/sql/handler 128 TABLE test t3
+wait/io/table/sql/handler 47 TABLE test t1
+wait/io/table/sql/handler 76 TABLE test t2
+wait/io/table/sql/handler 120 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
-TABLE test t2 84
-TABLE test t3 128
+TABLE test t1 47
+TABLE test t2 76
+TABLE test t3 120
truncate performance_schema.events_waits_summary_global_by_event_name;
"================== GLOBAL truncated =================="
"================== Step 21 =================="
@@ -1707,9 +1769,9 @@ wait/io/table/sql/handler 0
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
-wait/io/table/sql/handler 53 TABLE test t1
-wait/io/table/sql/handler 84 TABLE test t2
-wait/io/table/sql/handler 128 TABLE test t3
+wait/io/table/sql/handler 47 TABLE test t1
+wait/io/table/sql/handler 76 TABLE test t2
+wait/io/table/sql/handler 120 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 NULL 0 0 0 0 0 0 0
@@ -1730,16 +1792,16 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-show status like "performance_schema%";
+show global status like "performance_schema%";
Variable_name Value
Performance_schema_accounts_lost 0
Performance_schema_cond_classes_lost 0
@@ -1749,9 +1811,15 @@ Performance_schema_file_classes_lost 0
Performance_schema_file_handles_lost 0
Performance_schema_file_instances_lost 0
Performance_schema_hosts_lost 0
+Performance_schema_index_stat_lost 0
Performance_schema_locker_lost 0
+Performance_schema_memory_classes_lost 0
+Performance_schema_metadata_lock_lost 0
Performance_schema_mutex_classes_lost 0
Performance_schema_mutex_instances_lost 0
+Performance_schema_nested_statement_lost 0
+Performance_schema_prepared_statements_lost 0
+Performance_schema_program_lost 0
Performance_schema_rwlock_classes_lost 0
Performance_schema_rwlock_instances_lost 0
Performance_schema_session_connect_attrs_lost 0
@@ -1761,6 +1829,7 @@ Performance_schema_stage_classes_lost 0
Performance_schema_statement_classes_lost 0
Performance_schema_table_handles_lost 0
Performance_schema_table_instances_lost 0
+Performance_schema_table_lock_stat_lost 0
Performance_schema_thread_classes_lost 0
Performance_schema_thread_instances_lost 0
Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/table_io_aggregate_thread_2u_2t.result b/mysql-test/suite/perfschema/r/table_io_aggregate_thread_2u_2t.result
index 8eb52d58efc..563793465c1 100644
--- a/mysql-test/suite/perfschema/r/table_io_aggregate_thread_2u_2t.result
+++ b/mysql-test/suite/perfschema/r/table_io_aggregate_thread_2u_2t.result
@@ -8,9 +8,9 @@ delete from performance_schema.setup_objects
where object_name='t2';
select * from performance_schema.setup_actors
order by USER, HOST, ROLE;
-HOST USER ROLE
-localhost user1 %
-localhost user3 %
+HOST USER ROLE ENABLED HISTORY
+localhost user1 % YES YES
+localhost user3 % YES YES
select * from performance_schema.setup_objects
order by object_type, object_schema, object_name;
OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
@@ -24,6 +24,9 @@ events_stages_history_long NO
events_statements_current NO
events_statements_history NO
events_statements_history_long NO
+events_transactions_current NO
+events_transactions_history NO
+events_transactions_history_long NO
events_waits_current NO
events_waits_history NO
events_waits_history_long NO
@@ -67,28 +70,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -130,28 +125,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -182,18 +169,74 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=101;
update test.t2 set d=d+1 where a=101;
update test.t3 set d=d+1 where a=101;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 1
connection default;
-"================== Step 3 =================="
+"================== Step 3-A =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 23
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 23
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 23
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 23
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 23
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t3 15 9 6 9 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 8
+TABLE test t2 0
+TABLE test t3 15
+connection con1;
+flush tables;
+"================== con1 FLUSH =================="
+connection default;
+"================== Step 3-B =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
username status
user2 not found
@@ -203,19 +246,19 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 25
+localhost wait/io/table/sql/handler 23
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 25
+wait/io/table/sql/handler 23
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
@@ -225,29 +268,23 @@ TABLE test t1 NULL 6 4 2 4 1 1 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 2 1 1 1 0 1 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 14 8 6 8 3 3 0
-TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 1 1 0 1 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 8 5 3 5 1 2 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 17 11 6 11 3 3 0
+TABLE test t3 15 9 6 9 3 3 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 8
TABLE test t2 0
-TABLE test t3 17
+TABLE test t3 15
connect con2, localhost, user2, , ;
select concat(current_user(), " is connected") as status;
status
@@ -256,7 +293,7 @@ connection default;
"================== Step 4 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
username event_name count_star
user2 wait/io/table/sql/handler 0
@@ -267,23 +304,23 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 0
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 25
+localhost wait/io/table/sql/handler 23
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 25
+wait/io/table/sql/handler 23
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
@@ -293,29 +330,23 @@ TABLE test t1 NULL 6 4 2 4 1 1 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 2 1 1 1 0 1 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 14 8 6 8 3 3 0
-TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 1 1 0 1 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 8 5 3 5 1 2 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 17 11 6 11 3 3 0
+TABLE test t3 15 9 6 9 3 3 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 8
TABLE test t2 0
-TABLE test t3 17
+TABLE test t3 15
connection con2;
insert into test.t1 set a=201, b=1, c=1;
insert into test.t2 set a=202, b=2, c=2;
@@ -347,11 +378,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=201;
update test.t2 set d=d+1 where a=201;
update test.t3 set d=d+1 where a=201;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 2
205 5 5 1
@@ -359,7 +390,7 @@ connection default;
"================== Step 5 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
username event_name count_star
user2 wait/io/table/sql/handler 0
@@ -370,23 +401,23 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 0
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 25
+localhost wait/io/table/sql/handler 23
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 25
+wait/io/table/sql/handler 23
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
@@ -396,29 +427,23 @@ TABLE test t1 NULL 6 4 2 4 1 1 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 2 1 1 1 0 1 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 14 8 6 8 3 3 0
-TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 1 1 0 1 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 8 5 3 5 1 2 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 17 11 6 11 3 3 0
+TABLE test t3 15 9 6 9 3 3 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 8
TABLE test t2 0
-TABLE test t3 17
+TABLE test t3 15
connect con3, localhost, user3, , ;
select concat(current_user(), " is connected") as status;
status
@@ -427,7 +452,7 @@ connection default;
"================== Step 6 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
username event_name count_star
user2 wait/io/table/sql/handler 0
@@ -439,7 +464,7 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 0
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
@@ -447,7 +472,7 @@ user3 localhost wait/io/table/sql/handler 0
user3 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
@@ -455,11 +480,11 @@ user3 wait/io/table/sql/handler 0
user3 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 25
+localhost wait/io/table/sql/handler 23
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 25
+wait/io/table/sql/handler 23
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
@@ -469,29 +494,23 @@ TABLE test t1 NULL 6 4 2 4 1 1 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 2 1 1 1 0 1 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 14 8 6 8 3 3 0
-TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 1 1 0 1 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 8 5 3 5 1 2 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 17 11 6 11 3 3 0
+TABLE test t3 15 9 6 9 3 3 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 8
TABLE test t2 0
-TABLE test t3 17
+TABLE test t3 15
connection con3;
insert into test.t1 set a=301, b=1, c=1;
insert into test.t2 set a=302, b=2, c=2;
@@ -529,11 +548,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=301;
update test.t2 set d=d+1 where a=301;
update test.t3 set d=d+1 where a=301;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 3
205 5 5 2
@@ -542,71 +561,65 @@ connection default;
"================== Step 7 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
username event_name count_star
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 0
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 77
+localhost wait/io/table/sql/handler 71
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 77
+wait/io/table/sql/handler 71
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 23
+TABLE test t1 21
TABLE test t2 0
-TABLE test t3 54
+TABLE test t3 50
connect con4, localhost, user4, , ;
select concat(current_user(), " is connected") as status;
status
@@ -615,76 +628,70 @@ connection default;
"================== Step 8 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
username event_name count_star
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
username event_name count_star
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 0
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 0
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 77
+localhost wait/io/table/sql/handler 71
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 77
+wait/io/table/sql/handler 71
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 23
+TABLE test t1 21
TABLE test t2 0
-TABLE test t3 54
+TABLE test t3 50
connection con4;
insert into test.t1 set a=401, b=1, c=1;
insert into test.t2 set a=402, b=2, c=2;
@@ -728,11 +735,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=401;
update test.t2 set d=d+1 where a=401;
update test.t3 set d=d+1 where a=401;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 4
205 5 5 3
@@ -742,76 +749,70 @@ connection default;
"================== Step 9 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
username event_name count_star
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
username event_name count_star
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 0
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 0
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 77
+localhost wait/io/table/sql/handler 71
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 77
+wait/io/table/sql/handler 71
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 23
+TABLE test t1 21
TABLE test t2 0
-TABLE test t3 54
+TABLE test t3 50
connection con1;
lock tables test.t1 read, test.t2 read, test.t3 read;
unlock tables;
@@ -821,228 +822,210 @@ connection default;
"================== Step 10 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
username event_name count_star
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
username event_name count_star
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 0
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 0
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 77
+localhost wait/io/table/sql/handler 71
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 77
+wait/io/table/sql/handler 71
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 23
+TABLE test t1 21
TABLE test t2 0
-TABLE test t3 54
+TABLE test t3 50
connection default;
flush tables;
"================== flush marker =================="
"================== Step 11 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
username event_name count_star
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
username event_name count_star
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 0
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 0
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 77
+localhost wait/io/table/sql/handler 71
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 77
+wait/io/table/sql/handler 71
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 23
+TABLE test t1 21
TABLE test t2 0
-TABLE test t3 54
+TABLE test t3 50
set global read_only=1;
set global read_only=0;
"================== global read_only marker =================="
"================== Step 12 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
username event_name count_star
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
username event_name count_star
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 0
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 0
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 77
+localhost wait/io/table/sql/handler 71
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 77
+wait/io/table/sql/handler 71
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 23
+TABLE test t1 21
TABLE test t2 0
-TABLE test t3 54
+TABLE test t3 50
disconnect con1;
"================== Step 13 =================="
call dump_thread();
@@ -1052,70 +1035,64 @@ username event_name count_star
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
username event_name count_star
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 0
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 0
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 77
+localhost wait/io/table/sql/handler 71
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 77
+wait/io/table/sql/handler 71
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 23
+TABLE test t1 21
TABLE test t2 0
-TABLE test t3 54
+TABLE test t3 50
disconnect con2;
"================== Step 14 =================="
call dump_thread();
@@ -1124,70 +1101,64 @@ user1 not found
username status
user2 not found
username event_name count_star
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
username event_name count_star
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 0
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 0
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 77
+localhost wait/io/table/sql/handler 71
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 77
+wait/io/table/sql/handler 71
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 23
+TABLE test t1 21
TABLE test t2 0
-TABLE test t3 54
+TABLE test t3 50
disconnect con3;
"================== Step 15 =================="
call dump_thread();
@@ -1202,63 +1173,57 @@ user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 0
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 0
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 77
+localhost wait/io/table/sql/handler 71
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 77
+wait/io/table/sql/handler 71
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 23
+TABLE test t1 21
TABLE test t2 0
-TABLE test t3 54
+TABLE test t3 50
disconnect con4;
"================== Step 16 =================="
call dump_thread();
@@ -1272,63 +1237,57 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 0
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 0
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 77
+localhost wait/io/table/sql/handler 71
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 77
+wait/io/table/sql/handler 71
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 23
+TABLE test t1 21
TABLE test t2 0
-TABLE test t3 54
+TABLE test t3 50
connection default;
truncate performance_schema.events_waits_summary_by_thread_by_event_name;
"================== BY_THREAD truncated =================="
@@ -1344,63 +1303,57 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 0
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 0
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 77
+localhost wait/io/table/sql/handler 71
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 77
+wait/io/table/sql/handler 71
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 23
+TABLE test t1 21
TABLE test t2 0
-TABLE test t3 54
+TABLE test t3 50
truncate performance_schema.events_waits_summary_by_account_by_event_name;
"================== BY_ACCOUNT truncated =================="
"================== Step 18 =================="
@@ -1425,53 +1378,47 @@ user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 77
+localhost wait/io/table/sql/handler 71
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 77
+wait/io/table/sql/handler 71
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 23
+TABLE test t1 21
TABLE test t2 0
-TABLE test t3 54
+TABLE test t3 50
truncate performance_schema.events_waits_summary_by_user_by_event_name;
"================== BY_USER truncated =================="
"================== Step 19 =================="
@@ -1506,43 +1453,37 @@ user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 77
+localhost wait/io/table/sql/handler 71
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 77
+wait/io/table/sql/handler 71
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 23
+TABLE test t1 21
TABLE test t2 0
-TABLE test t3 54
+TABLE test t3 50
truncate performance_schema.events_waits_summary_by_host_by_event_name;
"================== BY_HOST truncated =================="
"================== Step 21 =================="
@@ -1581,39 +1522,33 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 77
+wait/io/table/sql/handler 71
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 23
+TABLE test t1 21
TABLE test t2 0
-TABLE test t3 54
+TABLE test t3 50
truncate performance_schema.events_waits_summary_global_by_event_name;
"================== GLOBAL truncated =================="
"================== Step 21 =================="
@@ -1662,10 +1597,6 @@ TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
@@ -1673,19 +1604,17 @@ TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-show status like "performance_schema%";
+show global status like "performance_schema%";
Variable_name Value
Performance_schema_accounts_lost 0
Performance_schema_cond_classes_lost 0
@@ -1695,9 +1624,15 @@ Performance_schema_file_classes_lost 0
Performance_schema_file_handles_lost 0
Performance_schema_file_instances_lost 0
Performance_schema_hosts_lost 0
+Performance_schema_index_stat_lost 0
Performance_schema_locker_lost 0
+Performance_schema_memory_classes_lost 0
+Performance_schema_metadata_lock_lost 0
Performance_schema_mutex_classes_lost 0
Performance_schema_mutex_instances_lost 0
+Performance_schema_nested_statement_lost 0
+Performance_schema_prepared_statements_lost 0
+Performance_schema_program_lost 0
Performance_schema_rwlock_classes_lost 0
Performance_schema_rwlock_instances_lost 0
Performance_schema_session_connect_attrs_lost 0
@@ -1707,6 +1642,7 @@ Performance_schema_stage_classes_lost 0
Performance_schema_statement_classes_lost 0
Performance_schema_table_handles_lost 0
Performance_schema_table_instances_lost 0
+Performance_schema_table_lock_stat_lost 0
Performance_schema_thread_classes_lost 0
Performance_schema_thread_instances_lost 0
Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/table_io_aggregate_thread_2u_3t.result b/mysql-test/suite/perfschema/r/table_io_aggregate_thread_2u_3t.result
index fba8a48ad35..8cf139c412c 100644
--- a/mysql-test/suite/perfschema/r/table_io_aggregate_thread_2u_3t.result
+++ b/mysql-test/suite/perfschema/r/table_io_aggregate_thread_2u_3t.result
@@ -6,9 +6,9 @@ delete from performance_schema.setup_actors
where user in ('user2', 'user4');
select * from performance_schema.setup_actors
order by USER, HOST, ROLE;
-HOST USER ROLE
-localhost user1 %
-localhost user3 %
+HOST USER ROLE ENABLED HISTORY
+localhost user1 % YES YES
+localhost user3 % YES YES
select * from performance_schema.setup_objects
order by object_type, object_schema, object_name;
OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
@@ -23,6 +23,9 @@ events_stages_history_long NO
events_statements_current NO
events_statements_history NO
events_statements_history_long NO
+events_transactions_current NO
+events_transactions_history NO
+events_transactions_history_long NO
events_waits_current NO
events_waits_history NO
events_waits_history_long NO
@@ -66,15 +69,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -84,10 +84,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -129,15 +129,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -147,10 +144,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -181,18 +178,80 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=101;
update test.t2 set d=d+1 where a=101;
update test.t3 set d=d+1 where a=101;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 1
connection default;
-"================== Step 3 =================="
+"================== Step 3-A =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 33
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 33
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 33
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 33
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 33
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t2 NULL 9 5 4 5 2 2 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 1 1 0 1 0 0 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t2 10 6 4 6 2 2 0
+TABLE test t3 15 9 6 9 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 8
+TABLE test t2 10
+TABLE test t3 15
+connection con1;
+flush tables;
+"================== con1 FLUSH =================="
+connection default;
+"================== Step 3-B =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
username status
user2 not found
@@ -202,19 +261,19 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 37
+localhost wait/io/table/sql/handler 33
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 37
+wait/io/table/sql/handler 33
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
@@ -224,29 +283,29 @@ TABLE test t1 NULL 6 4 2 4 1 1 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 2 1 1 1 0 1 0
-TABLE test t2 NULL 10 6 4 6 2 2 0
-TABLE test t2 index_b 1 1 0 1 0 0 0
+TABLE test t2 NULL 9 5 4 5 2 2 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 1 1 0 1 0 0 0
-TABLE test t3 NULL 14 8 6 8 3 3 0
-TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 1 1 0 1 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 8 5 3 5 1 2 0
-TABLE test t2 12 8 4 8 2 2 0
-TABLE test t3 17 11 6 11 3 3 0
+TABLE test t2 10 6 4 6 2 2 0
+TABLE test t3 15 9 6 9 3 3 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 8
-TABLE test t2 12
-TABLE test t3 17
+TABLE test t2 10
+TABLE test t3 15
connect con2, localhost, user2, , ;
select concat(current_user(), " is connected") as status;
status
@@ -255,7 +314,7 @@ connection default;
"================== Step 4 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
username event_name count_star
user2 wait/io/table/sql/handler 0
@@ -266,23 +325,23 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 0
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 37
+localhost wait/io/table/sql/handler 33
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 37
+wait/io/table/sql/handler 33
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
@@ -292,29 +351,29 @@ TABLE test t1 NULL 6 4 2 4 1 1 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 2 1 1 1 0 1 0
-TABLE test t2 NULL 10 6 4 6 2 2 0
-TABLE test t2 index_b 1 1 0 1 0 0 0
+TABLE test t2 NULL 9 5 4 5 2 2 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 1 1 0 1 0 0 0
-TABLE test t3 NULL 14 8 6 8 3 3 0
-TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 1 1 0 1 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 8 5 3 5 1 2 0
-TABLE test t2 12 8 4 8 2 2 0
-TABLE test t3 17 11 6 11 3 3 0
+TABLE test t2 10 6 4 6 2 2 0
+TABLE test t3 15 9 6 9 3 3 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 8
-TABLE test t2 12
-TABLE test t3 17
+TABLE test t2 10
+TABLE test t3 15
connection con2;
insert into test.t1 set a=201, b=1, c=1;
insert into test.t2 set a=202, b=2, c=2;
@@ -346,11 +405,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=201;
update test.t2 set d=d+1 where a=201;
update test.t3 set d=d+1 where a=201;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 2
205 5 5 1
@@ -358,7 +417,7 @@ connection default;
"================== Step 5 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
username event_name count_star
user2 wait/io/table/sql/handler 0
@@ -369,23 +428,23 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 0
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 37
+localhost wait/io/table/sql/handler 33
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 37
+wait/io/table/sql/handler 33
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
@@ -395,29 +454,29 @@ TABLE test t1 NULL 6 4 2 4 1 1 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 2 1 1 1 0 1 0
-TABLE test t2 NULL 10 6 4 6 2 2 0
-TABLE test t2 index_b 1 1 0 1 0 0 0
+TABLE test t2 NULL 9 5 4 5 2 2 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 1 1 0 1 0 0 0
-TABLE test t3 NULL 14 8 6 8 3 3 0
-TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 1 1 0 1 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 8 5 3 5 1 2 0
-TABLE test t2 12 8 4 8 2 2 0
-TABLE test t3 17 11 6 11 3 3 0
+TABLE test t2 10 6 4 6 2 2 0
+TABLE test t3 15 9 6 9 3 3 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 8
-TABLE test t2 12
-TABLE test t3 17
+TABLE test t2 10
+TABLE test t3 15
connect con3, localhost, user3, , ;
select concat(current_user(), " is connected") as status;
status
@@ -426,7 +485,7 @@ connection default;
"================== Step 6 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
username event_name count_star
user2 wait/io/table/sql/handler 0
@@ -438,7 +497,7 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 0
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
@@ -446,7 +505,7 @@ user3 localhost wait/io/table/sql/handler 0
user3 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
@@ -454,11 +513,11 @@ user3 wait/io/table/sql/handler 0
user3 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 37
+localhost wait/io/table/sql/handler 33
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 37
+wait/io/table/sql/handler 33
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
@@ -468,29 +527,29 @@ TABLE test t1 NULL 6 4 2 4 1 1 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 2 1 1 1 0 1 0
-TABLE test t2 NULL 10 6 4 6 2 2 0
-TABLE test t2 index_b 1 1 0 1 0 0 0
+TABLE test t2 NULL 9 5 4 5 2 2 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 1 1 0 1 0 0 0
-TABLE test t3 NULL 14 8 6 8 3 3 0
-TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 1 1 0 1 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 8 5 3 5 1 2 0
-TABLE test t2 12 8 4 8 2 2 0
-TABLE test t3 17 11 6 11 3 3 0
+TABLE test t2 10 6 4 6 2 2 0
+TABLE test t3 15 9 6 9 3 3 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 8
-TABLE test t2 12
-TABLE test t3 17
+TABLE test t2 10
+TABLE test t3 15
connection con3;
insert into test.t1 set a=301, b=1, c=1;
insert into test.t2 set a=302, b=2, c=2;
@@ -528,11 +587,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=301;
update test.t2 set d=d+1 where a=301;
update test.t3 set d=d+1 where a=301;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 3
205 5 5 2
@@ -541,71 +600,71 @@ connection default;
"================== Step 7 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
username event_name count_star
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 0
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 113
+localhost wait/io/table/sql/handler 103
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 113
+wait/io/table/sql/handler 103
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 32 20 12 20 4 8 0
-TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 NULL 30 18 12 18 4 8 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 2 2 0 2 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 36 24 12 24 4 8 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t2 32 20 12 20 4 8 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 23
-TABLE test t2 36
-TABLE test t3 54
+TABLE test t1 21
+TABLE test t2 32
+TABLE test t3 50
connect con4, localhost, user4, , ;
select concat(current_user(), " is connected") as status;
status
@@ -614,76 +673,76 @@ connection default;
"================== Step 8 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
username event_name count_star
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
username event_name count_star
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 0
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 0
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 113
+localhost wait/io/table/sql/handler 103
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 113
+wait/io/table/sql/handler 103
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 32 20 12 20 4 8 0
-TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 NULL 30 18 12 18 4 8 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 2 2 0 2 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 36 24 12 24 4 8 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t2 32 20 12 20 4 8 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 23
-TABLE test t2 36
-TABLE test t3 54
+TABLE test t1 21
+TABLE test t2 32
+TABLE test t3 50
connection con4;
insert into test.t1 set a=401, b=1, c=1;
insert into test.t2 set a=402, b=2, c=2;
@@ -727,11 +786,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=401;
update test.t2 set d=d+1 where a=401;
update test.t3 set d=d+1 where a=401;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 4
205 5 5 3
@@ -741,76 +800,76 @@ connection default;
"================== Step 9 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
username event_name count_star
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
username event_name count_star
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 0
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 0
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 113
+localhost wait/io/table/sql/handler 103
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 113
+wait/io/table/sql/handler 103
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 32 20 12 20 4 8 0
-TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 NULL 30 18 12 18 4 8 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 2 2 0 2 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 36 24 12 24 4 8 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t2 32 20 12 20 4 8 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 23
-TABLE test t2 36
-TABLE test t3 54
+TABLE test t1 21
+TABLE test t2 32
+TABLE test t3 50
connection con1;
lock tables test.t1 read, test.t2 read, test.t3 read;
unlock tables;
@@ -820,228 +879,228 @@ connection default;
"================== Step 10 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
username event_name count_star
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
username event_name count_star
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 0
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 0
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 113
+localhost wait/io/table/sql/handler 103
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 113
+wait/io/table/sql/handler 103
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 32 20 12 20 4 8 0
-TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 NULL 30 18 12 18 4 8 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 2 2 0 2 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 36 24 12 24 4 8 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t2 32 20 12 20 4 8 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 23
-TABLE test t2 36
-TABLE test t3 54
+TABLE test t1 21
+TABLE test t2 32
+TABLE test t3 50
connection default;
flush tables;
"================== flush marker =================="
"================== Step 11 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
username event_name count_star
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
username event_name count_star
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 0
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 0
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 113
+localhost wait/io/table/sql/handler 103
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 113
+wait/io/table/sql/handler 103
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 32 20 12 20 4 8 0
-TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 NULL 30 18 12 18 4 8 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 2 2 0 2 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 36 24 12 24 4 8 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t2 32 20 12 20 4 8 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 23
-TABLE test t2 36
-TABLE test t3 54
+TABLE test t1 21
+TABLE test t2 32
+TABLE test t3 50
set global read_only=1;
set global read_only=0;
"================== global read_only marker =================="
"================== Step 12 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
username event_name count_star
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
username event_name count_star
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 0
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 0
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 113
+localhost wait/io/table/sql/handler 103
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 113
+wait/io/table/sql/handler 103
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 32 20 12 20 4 8 0
-TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 NULL 30 18 12 18 4 8 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 2 2 0 2 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 36 24 12 24 4 8 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t2 32 20 12 20 4 8 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 23
-TABLE test t2 36
-TABLE test t3 54
+TABLE test t1 21
+TABLE test t2 32
+TABLE test t3 50
disconnect con1;
"================== Step 13 =================="
call dump_thread();
@@ -1051,70 +1110,70 @@ username event_name count_star
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
username event_name count_star
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 0
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 0
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 113
+localhost wait/io/table/sql/handler 103
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 113
+wait/io/table/sql/handler 103
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 32 20 12 20 4 8 0
-TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 NULL 30 18 12 18 4 8 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 2 2 0 2 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 36 24 12 24 4 8 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t2 32 20 12 20 4 8 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 23
-TABLE test t2 36
-TABLE test t3 54
+TABLE test t1 21
+TABLE test t2 32
+TABLE test t3 50
disconnect con2;
"================== Step 14 =================="
call dump_thread();
@@ -1123,70 +1182,70 @@ user1 not found
username status
user2 not found
username event_name count_star
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
username event_name count_star
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 0
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 0
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 113
+localhost wait/io/table/sql/handler 103
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 113
+wait/io/table/sql/handler 103
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 32 20 12 20 4 8 0
-TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 NULL 30 18 12 18 4 8 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 2 2 0 2 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 36 24 12 24 4 8 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t2 32 20 12 20 4 8 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 23
-TABLE test t2 36
-TABLE test t3 54
+TABLE test t1 21
+TABLE test t2 32
+TABLE test t3 50
disconnect con3;
"================== Step 15 =================="
call dump_thread();
@@ -1201,63 +1260,63 @@ user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 0
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 0
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 113
+localhost wait/io/table/sql/handler 103
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 113
+wait/io/table/sql/handler 103
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 32 20 12 20 4 8 0
-TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 NULL 30 18 12 18 4 8 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 2 2 0 2 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 36 24 12 24 4 8 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t2 32 20 12 20 4 8 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 23
-TABLE test t2 36
-TABLE test t3 54
+TABLE test t1 21
+TABLE test t2 32
+TABLE test t3 50
disconnect con4;
"================== Step 16 =================="
call dump_thread();
@@ -1271,63 +1330,63 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 0
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 0
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 113
+localhost wait/io/table/sql/handler 103
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 113
+wait/io/table/sql/handler 103
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 32 20 12 20 4 8 0
-TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 NULL 30 18 12 18 4 8 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 2 2 0 2 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 36 24 12 24 4 8 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t2 32 20 12 20 4 8 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 23
-TABLE test t2 36
-TABLE test t3 54
+TABLE test t1 21
+TABLE test t2 32
+TABLE test t3 50
connection default;
truncate performance_schema.events_waits_summary_by_thread_by_event_name;
"================== BY_THREAD truncated =================="
@@ -1343,63 +1402,63 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 0
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 0
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 113
+localhost wait/io/table/sql/handler 103
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 113
+wait/io/table/sql/handler 103
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 32 20 12 20 4 8 0
-TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 NULL 30 18 12 18 4 8 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 2 2 0 2 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 36 24 12 24 4 8 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t2 32 20 12 20 4 8 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 23
-TABLE test t2 36
-TABLE test t3 54
+TABLE test t1 21
+TABLE test t2 32
+TABLE test t3 50
truncate performance_schema.events_waits_summary_by_account_by_event_name;
"================== BY_ACCOUNT truncated =================="
"================== Step 18 =================="
@@ -1424,53 +1483,53 @@ user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 113
+localhost wait/io/table/sql/handler 103
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 113
+wait/io/table/sql/handler 103
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 32 20 12 20 4 8 0
-TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 NULL 30 18 12 18 4 8 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 2 2 0 2 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 36 24 12 24 4 8 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t2 32 20 12 20 4 8 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 23
-TABLE test t2 36
-TABLE test t3 54
+TABLE test t1 21
+TABLE test t2 32
+TABLE test t3 50
truncate performance_schema.events_waits_summary_by_user_by_event_name;
"================== BY_USER truncated =================="
"================== Step 19 =================="
@@ -1505,43 +1564,43 @@ user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 113
+localhost wait/io/table/sql/handler 103
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 113
+wait/io/table/sql/handler 103
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 32 20 12 20 4 8 0
-TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 NULL 30 18 12 18 4 8 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 2 2 0 2 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 36 24 12 24 4 8 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t2 32 20 12 20 4 8 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 23
-TABLE test t2 36
-TABLE test t3 54
+TABLE test t1 21
+TABLE test t2 32
+TABLE test t3 50
truncate performance_schema.events_waits_summary_by_host_by_event_name;
"================== BY_HOST truncated =================="
"================== Step 21 =================="
@@ -1580,39 +1639,39 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 113
+wait/io/table/sql/handler 103
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 18 12 6 12 2 4 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 17 11 6 11 2 4 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 32 20 12 20 4 8 0
-TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 NULL 30 18 12 18 4 8 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 2 2 0 2 0 0 0
-TABLE test t3 NULL 46 28 18 28 6 12 0
-TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 NULL 44 26 18 26 6 12 0
+TABLE test t3 index_b 4 4 0 4 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 23 15 8 15 2 6 0
-TABLE test t2 36 24 12 24 4 8 0
-TABLE test t3 54 36 18 36 6 12 0
+TABLE test t1 21 13 8 13 2 6 0
+TABLE test t2 32 20 12 20 4 8 0
+TABLE test t3 50 32 18 32 6 12 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 23
-TABLE test t2 36
-TABLE test t3 54
+TABLE test t1 21
+TABLE test t2 32
+TABLE test t3 50
truncate performance_schema.events_waits_summary_global_by_event_name;
"================== GLOBAL truncated =================="
"================== Step 21 =================="
@@ -1675,16 +1734,16 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-show status like "performance_schema%";
+show global status like "performance_schema%";
Variable_name Value
Performance_schema_accounts_lost 0
Performance_schema_cond_classes_lost 0
@@ -1694,9 +1753,15 @@ Performance_schema_file_classes_lost 0
Performance_schema_file_handles_lost 0
Performance_schema_file_instances_lost 0
Performance_schema_hosts_lost 0
+Performance_schema_index_stat_lost 0
Performance_schema_locker_lost 0
+Performance_schema_memory_classes_lost 0
+Performance_schema_metadata_lock_lost 0
Performance_schema_mutex_classes_lost 0
Performance_schema_mutex_instances_lost 0
+Performance_schema_nested_statement_lost 0
+Performance_schema_prepared_statements_lost 0
+Performance_schema_program_lost 0
Performance_schema_rwlock_classes_lost 0
Performance_schema_rwlock_instances_lost 0
Performance_schema_session_connect_attrs_lost 0
@@ -1706,6 +1771,7 @@ Performance_schema_stage_classes_lost 0
Performance_schema_statement_classes_lost 0
Performance_schema_table_handles_lost 0
Performance_schema_table_instances_lost 0
+Performance_schema_table_lock_stat_lost 0
Performance_schema_thread_classes_lost 0
Performance_schema_thread_instances_lost 0
Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/table_io_aggregate_thread_4u_2t.result b/mysql-test/suite/perfschema/r/table_io_aggregate_thread_4u_2t.result
index 2bcabb81def..4f97cd6be4b 100644
--- a/mysql-test/suite/perfschema/r/table_io_aggregate_thread_4u_2t.result
+++ b/mysql-test/suite/perfschema/r/table_io_aggregate_thread_4u_2t.result
@@ -6,11 +6,11 @@ delete from performance_schema.setup_objects
where object_name='t2';
select * from performance_schema.setup_actors
order by USER, HOST, ROLE;
-HOST USER ROLE
-localhost user1 %
-localhost user2 %
-localhost user3 %
-localhost user4 %
+HOST USER ROLE ENABLED HISTORY
+localhost user1 % YES YES
+localhost user2 % YES YES
+localhost user3 % YES YES
+localhost user4 % YES YES
select * from performance_schema.setup_objects
order by object_type, object_schema, object_name;
OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
@@ -24,6 +24,9 @@ events_stages_history_long NO
events_statements_current NO
events_statements_history NO
events_statements_history_long NO
+events_transactions_current NO
+events_transactions_history NO
+events_transactions_history_long NO
events_waits_current NO
events_waits_history NO
events_waits_history_long NO
@@ -67,28 +70,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -130,28 +125,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -182,18 +169,74 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=101;
update test.t2 set d=d+1 where a=101;
update test.t3 set d=d+1 where a=101;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 1
connection default;
-"================== Step 3 =================="
+"================== Step 3-A =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 23
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 23
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 23
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 23
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 23
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t3 15 9 6 9 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 8
+TABLE test t2 0
+TABLE test t3 15
+connection con1;
+flush tables;
+"================== con1 FLUSH =================="
+connection default;
+"================== Step 3-B =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
username status
user2 not found
@@ -203,19 +246,19 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 25
+localhost wait/io/table/sql/handler 23
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 25
+wait/io/table/sql/handler 23
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
@@ -225,29 +268,23 @@ TABLE test t1 NULL 6 4 2 4 1 1 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 2 1 1 1 0 1 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 14 8 6 8 3 3 0
-TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 1 1 0 1 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 8 5 3 5 1 2 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 17 11 6 11 3 3 0
+TABLE test t3 15 9 6 9 3 3 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 8
TABLE test t2 0
-TABLE test t3 17
+TABLE test t3 15
connect con2, localhost, user2, , ;
select concat(current_user(), " is connected") as status;
status
@@ -256,7 +293,7 @@ connection default;
"================== Step 4 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
username event_name count_star
user2 wait/io/table/sql/handler 0
@@ -267,23 +304,23 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 0
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 25
+localhost wait/io/table/sql/handler 23
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 25
+wait/io/table/sql/handler 23
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
@@ -293,29 +330,23 @@ TABLE test t1 NULL 6 4 2 4 1 1 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 2 1 1 1 0 1 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 14 8 6 8 3 3 0
-TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 1 1 0 1 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 8 5 3 5 1 2 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 17 11 6 11 3 3 0
+TABLE test t3 15 9 6 9 3 3 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 8
TABLE test t2 0
-TABLE test t3 17
+TABLE test t3 15
connection con2;
insert into test.t1 set a=201, b=1, c=1;
insert into test.t2 set a=202, b=2, c=2;
@@ -347,11 +378,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=201;
update test.t2 set d=d+1 where a=201;
update test.t3 set d=d+1 where a=201;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 2
205 5 5 1
@@ -359,10 +390,10 @@ connection default;
"================== Step 5 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
username event_name count_star
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 0
username status
user3 not found
@@ -370,55 +401,49 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 0
-user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/io/table/sql/handler 35
user2 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 64
+localhost wait/io/table/sql/handler 58
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 64
+wait/io/table/sql/handler 58
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 15 10 5 10 2 3 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 14 9 5 9 2 3 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 37 22 15 22 6 9 0
-TABLE test t3 index_b 5 5 0 5 0 0 0
+TABLE test t3 NULL 35 20 15 20 6 9 0
+TABLE test t3 index_b 3 3 0 3 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 20 13 7 13 2 5 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 44 29 15 29 6 9 0
+TABLE test t1 18 11 7 11 2 5 0
+TABLE test t3 40 25 15 25 6 9 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 20
+TABLE test t1 18
TABLE test t2 0
-TABLE test t3 44
+TABLE test t3 40
connect con3, localhost, user3, , ;
select concat(current_user(), " is connected") as status;
status
@@ -427,10 +452,10 @@ connection default;
"================== Step 6 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
username event_name count_star
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 0
username event_name count_star
user3 wait/io/table/sql/handler 0
@@ -439,59 +464,53 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 0
-user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/io/table/sql/handler 35
user2 localhost wait/lock/table/sql/handler 0
user3 localhost wait/io/table/sql/handler 0
user3 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 0
user3 wait/io/table/sql/handler 0
user3 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 64
+localhost wait/io/table/sql/handler 58
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 64
+wait/io/table/sql/handler 58
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 15 10 5 10 2 3 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 14 9 5 9 2 3 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 37 22 15 22 6 9 0
-TABLE test t3 index_b 5 5 0 5 0 0 0
+TABLE test t3 NULL 35 20 15 20 6 9 0
+TABLE test t3 index_b 3 3 0 3 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 20 13 7 13 2 5 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 44 29 15 29 6 9 0
+TABLE test t1 18 11 7 11 2 5 0
+TABLE test t3 40 25 15 25 6 9 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 20
+TABLE test t1 18
TABLE test t2 0
-TABLE test t3 44
+TABLE test t3 40
connection con3;
insert into test.t1 set a=301, b=1, c=1;
insert into test.t2 set a=302, b=2, c=2;
@@ -529,11 +548,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=301;
update test.t2 set d=d+1 where a=301;
update test.t3 set d=d+1 where a=301;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 3
205 5 5 2
@@ -542,71 +561,65 @@ connection default;
"================== Step 7 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
username event_name count_star
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 0
-user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/io/table/sql/handler 35
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 116
+localhost wait/io/table/sql/handler 106
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 116
+wait/io/table/sql/handler 106
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 27 18 9 18 3 6 0
-TABLE test t1 index_b 2 2 0 2 0 0 0
+TABLE test t1 NULL 25 16 9 16 3 6 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 6 3 3 3 0 3 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 69 42 27 42 9 18 0
-TABLE test t3 index_b 9 9 0 9 0 0 0
+TABLE test t3 NULL 66 39 27 39 9 18 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 3 3 0 3 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 35 23 12 23 3 9 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 81 54 27 54 9 18 0
+TABLE test t1 31 19 12 19 3 9 0
+TABLE test t3 75 48 27 48 9 18 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 35
+TABLE test t1 31
TABLE test t2 0
-TABLE test t3 81
+TABLE test t3 75
connect con4, localhost, user4, , ;
select concat(current_user(), " is connected") as status;
status
@@ -615,76 +628,70 @@ connection default;
"================== Step 8 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
username event_name count_star
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
username event_name count_star
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 0
-user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/io/table/sql/handler 35
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 0
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 116
+localhost wait/io/table/sql/handler 106
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 116
+wait/io/table/sql/handler 106
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 27 18 9 18 3 6 0
-TABLE test t1 index_b 2 2 0 2 0 0 0
+TABLE test t1 NULL 25 16 9 16 3 6 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 6 3 3 3 0 3 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 69 42 27 42 9 18 0
-TABLE test t3 index_b 9 9 0 9 0 0 0
+TABLE test t3 NULL 66 39 27 39 9 18 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 3 3 0 3 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 35 23 12 23 3 9 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 81 54 27 54 9 18 0
+TABLE test t1 31 19 12 19 3 9 0
+TABLE test t3 75 48 27 48 9 18 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 35
+TABLE test t1 31
TABLE test t2 0
-TABLE test t3 81
+TABLE test t3 75
connection con4;
insert into test.t1 set a=401, b=1, c=1;
insert into test.t2 set a=402, b=2, c=2;
@@ -728,11 +735,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=401;
update test.t2 set d=d+1 where a=401;
update test.t3 set d=d+1 where a=401;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 4
205 5 5 3
@@ -742,76 +749,70 @@ connection default;
"================== Step 9 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
username event_name count_star
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
username event_name count_star
-user4 wait/io/table/sql/handler 65
+user4 wait/io/table/sql/handler 61
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 0
-user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/io/table/sql/handler 35
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 0
-user4 localhost wait/io/table/sql/handler 65
+user4 localhost wait/io/table/sql/handler 61
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
-user4 wait/io/table/sql/handler 65
+user4 wait/io/table/sql/handler 61
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 181
+localhost wait/io/table/sql/handler 167
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
+TABLE test t1 47
TABLE test t2 0
-TABLE test t3 128
+TABLE test t3 120
connection con1;
lock tables test.t1 read, test.t2 read, test.t3 read;
unlock tables;
@@ -821,301 +822,277 @@ connection default;
"================== Step 10 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
username event_name count_star
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
username event_name count_star
-user4 wait/io/table/sql/handler 65
+user4 wait/io/table/sql/handler 61
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 0
-user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/io/table/sql/handler 35
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 0
-user4 localhost wait/io/table/sql/handler 65
+user4 localhost wait/io/table/sql/handler 61
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
-user4 wait/io/table/sql/handler 65
+user4 wait/io/table/sql/handler 61
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 181
+localhost wait/io/table/sql/handler 167
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
+TABLE test t1 47
TABLE test t2 0
-TABLE test t3 128
+TABLE test t3 120
connection default;
flush tables;
"================== flush marker =================="
"================== Step 11 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
username event_name count_star
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
username event_name count_star
-user4 wait/io/table/sql/handler 65
+user4 wait/io/table/sql/handler 61
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 0
-user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/io/table/sql/handler 35
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 0
-user4 localhost wait/io/table/sql/handler 65
+user4 localhost wait/io/table/sql/handler 61
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
-user4 wait/io/table/sql/handler 65
+user4 wait/io/table/sql/handler 61
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 181
+localhost wait/io/table/sql/handler 167
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
+TABLE test t1 47
TABLE test t2 0
-TABLE test t3 128
+TABLE test t3 120
set global read_only=1;
set global read_only=0;
"================== global read_only marker =================="
"================== Step 12 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
username event_name count_star
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
username event_name count_star
-user4 wait/io/table/sql/handler 65
+user4 wait/io/table/sql/handler 61
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 0
-user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/io/table/sql/handler 35
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 0
-user4 localhost wait/io/table/sql/handler 65
+user4 localhost wait/io/table/sql/handler 61
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
-user4 wait/io/table/sql/handler 65
+user4 wait/io/table/sql/handler 61
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 181
+localhost wait/io/table/sql/handler 167
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
+TABLE test t1 47
TABLE test t2 0
-TABLE test t3 128
+TABLE test t3 120
disconnect con1;
"================== Step 13 =================="
call dump_thread();
username status
user1 not found
username event_name count_star
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
username event_name count_star
-user4 wait/io/table/sql/handler 65
+user4 wait/io/table/sql/handler 61
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 0
-user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/io/table/sql/handler 35
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 0
-user4 localhost wait/io/table/sql/handler 65
+user4 localhost wait/io/table/sql/handler 61
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
-user4 wait/io/table/sql/handler 65
+user4 wait/io/table/sql/handler 61
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 181
+localhost wait/io/table/sql/handler 167
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
+TABLE test t1 47
TABLE test t2 0
-TABLE test t3 128
+TABLE test t3 120
disconnect con2;
"================== Step 14 =================="
call dump_thread();
@@ -1124,70 +1101,64 @@ user1 not found
username status
user2 not found
username event_name count_star
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
username event_name count_star
-user4 wait/io/table/sql/handler 65
+user4 wait/io/table/sql/handler 61
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 0
-user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/io/table/sql/handler 35
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 0
-user4 localhost wait/io/table/sql/handler 65
+user4 localhost wait/io/table/sql/handler 61
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
-user4 wait/io/table/sql/handler 65
+user4 wait/io/table/sql/handler 61
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 181
+localhost wait/io/table/sql/handler 167
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
+TABLE test t1 47
TABLE test t2 0
-TABLE test t3 128
+TABLE test t3 120
disconnect con3;
"================== Step 15 =================="
call dump_thread();
@@ -1198,67 +1169,61 @@ user2 not found
username status
user3 not found
username event_name count_star
-user4 wait/io/table/sql/handler 65
+user4 wait/io/table/sql/handler 61
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 0
-user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/io/table/sql/handler 35
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 0
-user4 localhost wait/io/table/sql/handler 65
+user4 localhost wait/io/table/sql/handler 61
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
-user4 wait/io/table/sql/handler 65
+user4 wait/io/table/sql/handler 61
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 181
+localhost wait/io/table/sql/handler 167
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
+TABLE test t1 47
TABLE test t2 0
-TABLE test t3 128
+TABLE test t3 120
disconnect con4;
"================== Step 16 =================="
call dump_thread();
@@ -1272,63 +1237,57 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 0
-user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/io/table/sql/handler 35
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 0
-user4 localhost wait/io/table/sql/handler 65
+user4 localhost wait/io/table/sql/handler 61
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
-user4 wait/io/table/sql/handler 65
+user4 wait/io/table/sql/handler 61
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 181
+localhost wait/io/table/sql/handler 167
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
+TABLE test t1 47
TABLE test t2 0
-TABLE test t3 128
+TABLE test t3 120
connection default;
truncate performance_schema.events_waits_summary_by_thread_by_event_name;
"================== BY_THREAD truncated =================="
@@ -1344,63 +1303,57 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/io/table/sql/handler 23
user1 localhost wait/lock/table/sql/handler 0
-user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/io/table/sql/handler 35
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/io/table/sql/handler 48
user3 localhost wait/lock/table/sql/handler 0
-user4 localhost wait/io/table/sql/handler 65
+user4 localhost wait/io/table/sql/handler 61
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
-user4 wait/io/table/sql/handler 65
+user4 wait/io/table/sql/handler 61
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 181
+localhost wait/io/table/sql/handler 167
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
+TABLE test t1 47
TABLE test t2 0
-TABLE test t3 128
+TABLE test t3 120
truncate performance_schema.events_waits_summary_by_account_by_event_name;
"================== BY_ACCOUNT truncated =================="
"================== Step 18 =================="
@@ -1425,53 +1378,47 @@ user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 25
+user1 wait/io/table/sql/handler 23
user1 wait/lock/table/sql/handler 0
-user2 wait/io/table/sql/handler 39
+user2 wait/io/table/sql/handler 35
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 52
+user3 wait/io/table/sql/handler 48
user3 wait/lock/table/sql/handler 0
-user4 wait/io/table/sql/handler 65
+user4 wait/io/table/sql/handler 61
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 181
+localhost wait/io/table/sql/handler 167
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
+TABLE test t1 47
TABLE test t2 0
-TABLE test t3 128
+TABLE test t3 120
truncate performance_schema.events_waits_summary_by_user_by_event_name;
"================== BY_USER truncated =================="
"================== Step 19 =================="
@@ -1506,43 +1453,37 @@ user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 181
+localhost wait/io/table/sql/handler 167
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
+TABLE test t1 47
TABLE test t2 0
-TABLE test t3 128
+TABLE test t3 120
truncate performance_schema.events_waits_summary_by_host_by_event_name;
"================== BY_HOST truncated =================="
"================== Step 21 =================="
@@ -1581,39 +1522,33 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 181
+wait/io/table/sql/handler 167
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 0 0 0 0 0 0 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
+TABLE test t1 47
TABLE test t2 0
-TABLE test t3 128
+TABLE test t3 120
truncate performance_schema.events_waits_summary_global_by_event_name;
"================== GLOBAL truncated =================="
"================== Step 21 =================="
@@ -1662,10 +1597,6 @@ TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
@@ -1673,19 +1604,17 @@ TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-show status like "performance_schema%";
+show global status like "performance_schema%";
Variable_name Value
Performance_schema_accounts_lost 0
Performance_schema_cond_classes_lost 0
@@ -1695,9 +1624,15 @@ Performance_schema_file_classes_lost 0
Performance_schema_file_handles_lost 0
Performance_schema_file_instances_lost 0
Performance_schema_hosts_lost 0
+Performance_schema_index_stat_lost 0
Performance_schema_locker_lost 0
+Performance_schema_memory_classes_lost 0
+Performance_schema_metadata_lock_lost 0
Performance_schema_mutex_classes_lost 0
Performance_schema_mutex_instances_lost 0
+Performance_schema_nested_statement_lost 0
+Performance_schema_prepared_statements_lost 0
+Performance_schema_program_lost 0
Performance_schema_rwlock_classes_lost 0
Performance_schema_rwlock_instances_lost 0
Performance_schema_session_connect_attrs_lost 0
@@ -1707,6 +1642,7 @@ Performance_schema_stage_classes_lost 0
Performance_schema_statement_classes_lost 0
Performance_schema_table_handles_lost 0
Performance_schema_table_instances_lost 0
+Performance_schema_table_lock_stat_lost 0
Performance_schema_thread_classes_lost 0
Performance_schema_thread_instances_lost 0
Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/table_io_aggregate_thread_4u_3t.result b/mysql-test/suite/perfschema/r/table_io_aggregate_thread_4u_3t.result
index 323570b7d40..7fed2e31955 100644
--- a/mysql-test/suite/perfschema/r/table_io_aggregate_thread_4u_3t.result
+++ b/mysql-test/suite/perfschema/r/table_io_aggregate_thread_4u_3t.result
@@ -4,11 +4,11 @@ update performance_schema.setup_consumers
set enabled='NO' where name like 'event%';
select * from performance_schema.setup_actors
order by USER, HOST, ROLE;
-HOST USER ROLE
-localhost user1 %
-localhost user2 %
-localhost user3 %
-localhost user4 %
+HOST USER ROLE ENABLED HISTORY
+localhost user1 % YES YES
+localhost user2 % YES YES
+localhost user3 % YES YES
+localhost user4 % YES YES
select * from performance_schema.setup_objects
order by object_type, object_schema, object_name;
OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
@@ -23,6 +23,9 @@ events_stages_history_long NO
events_statements_current NO
events_statements_history NO
events_statements_history_long NO
+events_transactions_current NO
+events_transactions_history NO
+events_transactions_history_long NO
events_waits_current NO
events_waits_history NO
events_waits_history_long NO
@@ -66,15 +69,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -84,10 +84,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -129,15 +129,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -147,10 +144,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -181,18 +178,80 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=101;
update test.t2 set d=d+1 where a=101;
update test.t3 set d=d+1 where a=101;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 1
connection default;
-"================== Step 3 =================="
+"================== Step 3-A =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 33
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 33
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 33
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 33
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 33
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t2 NULL 9 5 4 5 2 2 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 1 1 0 1 0 0 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t2 10 6 4 6 2 2 0
+TABLE test t3 15 9 6 9 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 8
+TABLE test t2 10
+TABLE test t3 15
+connection con1;
+flush tables;
+"================== con1 FLUSH =================="
+connection default;
+"================== Step 3-B =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
username status
user2 not found
@@ -202,19 +261,19 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 37
+localhost wait/io/table/sql/handler 33
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 37
+wait/io/table/sql/handler 33
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
@@ -224,29 +283,29 @@ TABLE test t1 NULL 6 4 2 4 1 1 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 2 1 1 1 0 1 0
-TABLE test t2 NULL 10 6 4 6 2 2 0
-TABLE test t2 index_b 1 1 0 1 0 0 0
+TABLE test t2 NULL 9 5 4 5 2 2 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 1 1 0 1 0 0 0
-TABLE test t3 NULL 14 8 6 8 3 3 0
-TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 1 1 0 1 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 8 5 3 5 1 2 0
-TABLE test t2 12 8 4 8 2 2 0
-TABLE test t3 17 11 6 11 3 3 0
+TABLE test t2 10 6 4 6 2 2 0
+TABLE test t3 15 9 6 9 3 3 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 8
-TABLE test t2 12
-TABLE test t3 17
+TABLE test t2 10
+TABLE test t3 15
connect con2, localhost, user2, , ;
select concat(current_user(), " is connected") as status;
status
@@ -255,7 +314,7 @@ connection default;
"================== Step 4 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
username event_name count_star
user2 wait/io/table/sql/handler 0
@@ -266,23 +325,23 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 0
user2 localhost wait/io/table/sql/handler 0
user2 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
user2 wait/io/table/sql/handler 0
user2 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 37
+localhost wait/io/table/sql/handler 33
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 37
+wait/io/table/sql/handler 33
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
@@ -292,29 +351,29 @@ TABLE test t1 NULL 6 4 2 4 1 1 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 2 1 1 1 0 1 0
-TABLE test t2 NULL 10 6 4 6 2 2 0
-TABLE test t2 index_b 1 1 0 1 0 0 0
+TABLE test t2 NULL 9 5 4 5 2 2 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 1 1 0 1 0 0 0
-TABLE test t3 NULL 14 8 6 8 3 3 0
-TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 NULL 13 7 6 7 3 3 0
+TABLE test t3 index_b 1 1 0 1 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 1 1 0 1 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 8 5 3 5 1 2 0
-TABLE test t2 12 8 4 8 2 2 0
-TABLE test t3 17 11 6 11 3 3 0
+TABLE test t2 10 6 4 6 2 2 0
+TABLE test t3 15 9 6 9 3 3 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 8
-TABLE test t2 12
-TABLE test t3 17
+TABLE test t2 10
+TABLE test t3 15
connection con2;
insert into test.t1 set a=201, b=1, c=1;
insert into test.t2 set a=202, b=2, c=2;
@@ -346,11 +405,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=201;
update test.t2 set d=d+1 where a=201;
update test.t3 set d=d+1 where a=201;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 2
205 5 5 1
@@ -358,10 +417,10 @@ connection default;
"================== Step 5 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
username event_name count_star
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 0
username status
user3 not found
@@ -369,55 +428,55 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 0
-user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/io/table/sql/handler 51
user2 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 94
+localhost wait/io/table/sql/handler 84
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 94
+wait/io/table/sql/handler 84
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 15 10 5 10 2 3 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 14 9 5 9 2 3 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 26 16 10 16 4 6 0
-TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 NULL 24 14 10 14 4 6 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 2 2 0 2 0 0 0
-TABLE test t3 NULL 37 22 15 22 6 9 0
-TABLE test t3 index_b 5 5 0 5 0 0 0
+TABLE test t3 NULL 35 20 15 20 6 9 0
+TABLE test t3 index_b 3 3 0 3 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 20 13 7 13 2 5 0
-TABLE test t2 30 20 10 20 4 6 0
-TABLE test t3 44 29 15 29 6 9 0
+TABLE test t1 18 11 7 11 2 5 0
+TABLE test t2 26 16 10 16 4 6 0
+TABLE test t3 40 25 15 25 6 9 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 20
-TABLE test t2 30
-TABLE test t3 44
+TABLE test t1 18
+TABLE test t2 26
+TABLE test t3 40
connect con3, localhost, user3, , ;
select concat(current_user(), " is connected") as status;
status
@@ -426,10 +485,10 @@ connection default;
"================== Step 6 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
username event_name count_star
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 0
username event_name count_star
user3 wait/io/table/sql/handler 0
@@ -438,59 +497,59 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 0
-user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/io/table/sql/handler 51
user2 localhost wait/lock/table/sql/handler 0
user3 localhost wait/io/table/sql/handler 0
user3 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 0
user3 wait/io/table/sql/handler 0
user3 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 94
+localhost wait/io/table/sql/handler 84
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 94
+wait/io/table/sql/handler 84
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 15 10 5 10 2 3 0
-TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 NULL 14 9 5 9 2 3 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 4 2 2 2 0 2 0
-TABLE test t2 NULL 26 16 10 16 4 6 0
-TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 NULL 24 14 10 14 4 6 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 2 2 0 2 0 0 0
-TABLE test t3 NULL 37 22 15 22 6 9 0
-TABLE test t3 index_b 5 5 0 5 0 0 0
+TABLE test t3 NULL 35 20 15 20 6 9 0
+TABLE test t3 index_b 3 3 0 3 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 2 2 0 2 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 20 13 7 13 2 5 0
-TABLE test t2 30 20 10 20 4 6 0
-TABLE test t3 44 29 15 29 6 9 0
+TABLE test t1 18 11 7 11 2 5 0
+TABLE test t2 26 16 10 16 4 6 0
+TABLE test t3 40 25 15 25 6 9 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 20
-TABLE test t2 30
-TABLE test t3 44
+TABLE test t1 18
+TABLE test t2 26
+TABLE test t3 40
connection con3;
insert into test.t1 set a=301, b=1, c=1;
insert into test.t2 set a=302, b=2, c=2;
@@ -528,11 +587,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=301;
update test.t2 set d=d+1 where a=301;
update test.t3 set d=d+1 where a=301;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 3
205 5 5 2
@@ -541,71 +600,71 @@ connection default;
"================== Step 7 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
username event_name count_star
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 0
-user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/io/table/sql/handler 51
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 170
+localhost wait/io/table/sql/handler 154
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 170
+wait/io/table/sql/handler 154
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 27 18 9 18 3 6 0
-TABLE test t1 index_b 2 2 0 2 0 0 0
+TABLE test t1 NULL 25 16 9 16 3 6 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 6 3 3 3 0 3 0
-TABLE test t2 NULL 48 30 18 30 6 12 0
-TABLE test t2 index_b 3 3 0 3 0 0 0
+TABLE test t2 NULL 45 27 18 27 6 12 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 3 3 0 3 0 0 0
-TABLE test t3 NULL 69 42 27 42 9 18 0
-TABLE test t3 index_b 9 9 0 9 0 0 0
+TABLE test t3 NULL 66 39 27 39 9 18 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 3 3 0 3 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 35 23 12 23 3 9 0
-TABLE test t2 54 36 18 36 6 12 0
-TABLE test t3 81 54 27 54 9 18 0
+TABLE test t1 31 19 12 19 3 9 0
+TABLE test t2 48 30 18 30 6 12 0
+TABLE test t3 75 48 27 48 9 18 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 35
-TABLE test t2 54
-TABLE test t3 81
+TABLE test t1 31
+TABLE test t2 48
+TABLE test t3 75
connect con4, localhost, user4, , ;
select concat(current_user(), " is connected") as status;
status
@@ -614,76 +673,76 @@ connection default;
"================== Step 8 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
username event_name count_star
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
username event_name count_star
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 0
-user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/io/table/sql/handler 51
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 0
user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 170
+localhost wait/io/table/sql/handler 154
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 170
+wait/io/table/sql/handler 154
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 27 18 9 18 3 6 0
-TABLE test t1 index_b 2 2 0 2 0 0 0
+TABLE test t1 NULL 25 16 9 16 3 6 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 6 3 3 3 0 3 0
-TABLE test t2 NULL 48 30 18 30 6 12 0
-TABLE test t2 index_b 3 3 0 3 0 0 0
+TABLE test t2 NULL 45 27 18 27 6 12 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 3 3 0 3 0 0 0
-TABLE test t3 NULL 69 42 27 42 9 18 0
-TABLE test t3 index_b 9 9 0 9 0 0 0
+TABLE test t3 NULL 66 39 27 39 9 18 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 3 3 0 3 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 35 23 12 23 3 9 0
-TABLE test t2 54 36 18 36 6 12 0
-TABLE test t3 81 54 27 54 9 18 0
+TABLE test t1 31 19 12 19 3 9 0
+TABLE test t2 48 30 18 30 6 12 0
+TABLE test t3 75 48 27 48 9 18 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 35
-TABLE test t2 54
-TABLE test t3 81
+TABLE test t1 31
+TABLE test t2 48
+TABLE test t3 75
connection con4;
insert into test.t1 set a=401, b=1, c=1;
insert into test.t2 set a=402, b=2, c=2;
@@ -727,11 +786,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=401;
update test.t2 set d=d+1 where a=401;
update test.t3 set d=d+1 where a=401;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 4
205 5 5 3
@@ -741,76 +800,76 @@ connection default;
"================== Step 9 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
username event_name count_star
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
username event_name count_star
-user4 wait/io/table/sql/handler 95
+user4 wait/io/table/sql/handler 89
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 0
-user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/io/table/sql/handler 51
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 0
-user4 localhost wait/io/table/sql/handler 95
+user4 localhost wait/io/table/sql/handler 89
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
-user4 wait/io/table/sql/handler 95
+user4 wait/io/table/sql/handler 89
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 265
+localhost wait/io/table/sql/handler 243
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
-TABLE test t2 84
-TABLE test t3 128
+TABLE test t1 47
+TABLE test t2 76
+TABLE test t3 120
connection con1;
lock tables test.t1 read, test.t2 read, test.t3 read;
unlock tables;
@@ -820,301 +879,301 @@ connection default;
"================== Step 10 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
username event_name count_star
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
username event_name count_star
-user4 wait/io/table/sql/handler 95
+user4 wait/io/table/sql/handler 89
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 0
-user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/io/table/sql/handler 51
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 0
-user4 localhost wait/io/table/sql/handler 95
+user4 localhost wait/io/table/sql/handler 89
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
-user4 wait/io/table/sql/handler 95
+user4 wait/io/table/sql/handler 89
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 265
+localhost wait/io/table/sql/handler 243
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
-TABLE test t2 84
-TABLE test t3 128
+TABLE test t1 47
+TABLE test t2 76
+TABLE test t3 120
connection default;
flush tables;
"================== flush marker =================="
"================== Step 11 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
username event_name count_star
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
username event_name count_star
-user4 wait/io/table/sql/handler 95
+user4 wait/io/table/sql/handler 89
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 0
-user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/io/table/sql/handler 51
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 0
-user4 localhost wait/io/table/sql/handler 95
+user4 localhost wait/io/table/sql/handler 89
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
-user4 wait/io/table/sql/handler 95
+user4 wait/io/table/sql/handler 89
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 265
+localhost wait/io/table/sql/handler 243
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
-TABLE test t2 84
-TABLE test t3 128
+TABLE test t1 47
+TABLE test t2 76
+TABLE test t3 120
set global read_only=1;
set global read_only=0;
"================== global read_only marker =================="
"================== Step 12 =================="
call dump_thread();
username event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
username event_name count_star
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
username event_name count_star
-user4 wait/io/table/sql/handler 95
+user4 wait/io/table/sql/handler 89
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 0
-user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/io/table/sql/handler 51
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 0
-user4 localhost wait/io/table/sql/handler 95
+user4 localhost wait/io/table/sql/handler 89
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
-user4 wait/io/table/sql/handler 95
+user4 wait/io/table/sql/handler 89
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 265
+localhost wait/io/table/sql/handler 243
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
-TABLE test t2 84
-TABLE test t3 128
+TABLE test t1 47
+TABLE test t2 76
+TABLE test t3 120
disconnect con1;
"================== Step 13 =================="
call dump_thread();
username status
user1 not found
username event_name count_star
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 0
username event_name count_star
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
username event_name count_star
-user4 wait/io/table/sql/handler 95
+user4 wait/io/table/sql/handler 89
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 0
-user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/io/table/sql/handler 51
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 0
-user4 localhost wait/io/table/sql/handler 95
+user4 localhost wait/io/table/sql/handler 89
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
-user4 wait/io/table/sql/handler 95
+user4 wait/io/table/sql/handler 89
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 265
+localhost wait/io/table/sql/handler 243
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
-TABLE test t2 84
-TABLE test t3 128
+TABLE test t1 47
+TABLE test t2 76
+TABLE test t3 120
disconnect con2;
"================== Step 14 =================="
call dump_thread();
@@ -1123,70 +1182,70 @@ user1 not found
username status
user2 not found
username event_name count_star
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
username event_name count_star
-user4 wait/io/table/sql/handler 95
+user4 wait/io/table/sql/handler 89
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 0
-user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/io/table/sql/handler 51
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 0
-user4 localhost wait/io/table/sql/handler 95
+user4 localhost wait/io/table/sql/handler 89
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
-user4 wait/io/table/sql/handler 95
+user4 wait/io/table/sql/handler 89
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 265
+localhost wait/io/table/sql/handler 243
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
-TABLE test t2 84
-TABLE test t3 128
+TABLE test t1 47
+TABLE test t2 76
+TABLE test t3 120
disconnect con3;
"================== Step 15 =================="
call dump_thread();
@@ -1197,67 +1256,67 @@ user2 not found
username status
user3 not found
username event_name count_star
-user4 wait/io/table/sql/handler 95
+user4 wait/io/table/sql/handler 89
user4 wait/lock/table/sql/handler 0
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 0
-user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/io/table/sql/handler 51
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 0
-user4 localhost wait/io/table/sql/handler 95
+user4 localhost wait/io/table/sql/handler 89
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
-user4 wait/io/table/sql/handler 95
+user4 wait/io/table/sql/handler 89
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 265
+localhost wait/io/table/sql/handler 243
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
-TABLE test t2 84
-TABLE test t3 128
+TABLE test t1 47
+TABLE test t2 76
+TABLE test t3 120
disconnect con4;
"================== Step 16 =================="
call dump_thread();
@@ -1271,63 +1330,63 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 0
-user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/io/table/sql/handler 51
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 0
-user4 localhost wait/io/table/sql/handler 95
+user4 localhost wait/io/table/sql/handler 89
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
-user4 wait/io/table/sql/handler 95
+user4 wait/io/table/sql/handler 89
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 265
+localhost wait/io/table/sql/handler 243
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
-TABLE test t2 84
-TABLE test t3 128
+TABLE test t1 47
+TABLE test t2 76
+TABLE test t3 120
connection default;
truncate performance_schema.events_waits_summary_by_thread_by_event_name;
"================== BY_THREAD truncated =================="
@@ -1343,63 +1402,63 @@ username status
user4 not found
execute dump_waits_account;
user host event_name count_star
-user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/io/table/sql/handler 33
user1 localhost wait/lock/table/sql/handler 0
-user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/io/table/sql/handler 51
user2 localhost wait/lock/table/sql/handler 0
-user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/io/table/sql/handler 70
user3 localhost wait/lock/table/sql/handler 0
-user4 localhost wait/io/table/sql/handler 95
+user4 localhost wait/io/table/sql/handler 89
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
-user4 wait/io/table/sql/handler 95
+user4 wait/io/table/sql/handler 89
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 265
+localhost wait/io/table/sql/handler 243
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
-TABLE test t2 84
-TABLE test t3 128
+TABLE test t1 47
+TABLE test t2 76
+TABLE test t3 120
truncate performance_schema.events_waits_summary_by_account_by_event_name;
"================== BY_ACCOUNT truncated =================="
"================== Step 18 =================="
@@ -1424,53 +1483,53 @@ user4 localhost wait/io/table/sql/handler 0
user4 localhost wait/lock/table/sql/handler 0
execute dump_waits_user;
user event_name count_star
-user1 wait/io/table/sql/handler 37
+user1 wait/io/table/sql/handler 33
user1 wait/lock/table/sql/handler 0
-user2 wait/io/table/sql/handler 57
+user2 wait/io/table/sql/handler 51
user2 wait/lock/table/sql/handler 0
-user3 wait/io/table/sql/handler 76
+user3 wait/io/table/sql/handler 70
user3 wait/lock/table/sql/handler 0
-user4 wait/io/table/sql/handler 95
+user4 wait/io/table/sql/handler 89
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 265
+localhost wait/io/table/sql/handler 243
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
-TABLE test t2 84
-TABLE test t3 128
+TABLE test t1 47
+TABLE test t2 76
+TABLE test t3 120
truncate performance_schema.events_waits_summary_by_user_by_event_name;
"================== BY_USER truncated =================="
"================== Step 19 =================="
@@ -1505,43 +1564,43 @@ user4 wait/io/table/sql/handler 0
user4 wait/lock/table/sql/handler 0
execute dump_waits_host;
host event_name count_star
-localhost wait/io/table/sql/handler 265
+localhost wait/io/table/sql/handler 243
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
-TABLE test t2 84
-TABLE test t3 128
+TABLE test t1 47
+TABLE test t2 76
+TABLE test t3 120
truncate performance_schema.events_waits_summary_by_host_by_event_name;
"================== BY_HOST truncated =================="
"================== Step 21 =================="
@@ -1580,39 +1639,39 @@ localhost wait/io/table/sql/handler 0
localhost wait/lock/table/sql/handler 0
execute dump_waits_global;
event_name count_star
-wait/io/table/sql/handler 265
+wait/io/table/sql/handler 243
wait/lock/table/sql/handler 0
execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 42 28 14 28 4 10 0
-TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 NULL 39 25 14 25 4 10 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 8 4 4 4 0 4 0
-TABLE test t2 NULL 76 48 28 48 8 20 0
-TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 NULL 72 44 28 44 8 20 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 4 4 0 4 0 0 0
-TABLE test t3 NULL 110 68 42 68 12 30 0
-TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 NULL 106 64 42 64 12 30 0
+TABLE test t3 index_b 10 10 0 10 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 4 4 0 4 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 53 35 18 35 4 14 0
-TABLE test t2 84 56 28 56 8 20 0
-TABLE test t3 128 86 42 86 12 30 0
+TABLE test t1 47 29 18 29 4 14 0
+TABLE test t2 76 48 28 48 8 20 0
+TABLE test t3 120 78 42 78 12 30 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
-TABLE test t1 53
-TABLE test t2 84
-TABLE test t3 128
+TABLE test t1 47
+TABLE test t2 76
+TABLE test t3 120
truncate performance_schema.events_waits_summary_global_by_event_name;
"================== GLOBAL truncated =================="
"================== Step 21 =================="
@@ -1675,16 +1734,16 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-show status like "performance_schema%";
+show global status like "performance_schema%";
Variable_name Value
Performance_schema_accounts_lost 0
Performance_schema_cond_classes_lost 0
@@ -1694,9 +1753,15 @@ Performance_schema_file_classes_lost 0
Performance_schema_file_handles_lost 0
Performance_schema_file_instances_lost 0
Performance_schema_hosts_lost 0
+Performance_schema_index_stat_lost 0
Performance_schema_locker_lost 0
+Performance_schema_memory_classes_lost 0
+Performance_schema_metadata_lock_lost 0
Performance_schema_mutex_classes_lost 0
Performance_schema_mutex_instances_lost 0
+Performance_schema_nested_statement_lost 0
+Performance_schema_prepared_statements_lost 0
+Performance_schema_program_lost 0
Performance_schema_rwlock_classes_lost 0
Performance_schema_rwlock_instances_lost 0
Performance_schema_session_connect_attrs_lost 0
@@ -1706,6 +1771,7 @@ Performance_schema_stage_classes_lost 0
Performance_schema_statement_classes_lost 0
Performance_schema_table_handles_lost 0
Performance_schema_table_instances_lost 0
+Performance_schema_table_lock_stat_lost 0
Performance_schema_thread_classes_lost 0
Performance_schema_thread_instances_lost 0
Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/table_lock_aggregate_global_2u_2t.result b/mysql-test/suite/perfschema/r/table_lock_aggregate_global_2u_2t.result
index 3a3d093d91e..71fd39d17bd 100644
--- a/mysql-test/suite/perfschema/r/table_lock_aggregate_global_2u_2t.result
+++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_global_2u_2t.result
@@ -8,9 +8,9 @@ delete from performance_schema.setup_objects
where object_name='t2';
select * from performance_schema.setup_actors
order by USER, HOST, ROLE;
-HOST USER ROLE
-localhost user1 %
-localhost user3 %
+HOST USER ROLE ENABLED HISTORY
+localhost user1 % YES YES
+localhost user3 % YES YES
select * from performance_schema.setup_objects
order by object_type, object_schema, object_name;
OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
@@ -24,6 +24,9 @@ events_stages_history_long YES
events_statements_current YES
events_statements_history YES
events_statements_history_long YES
+events_transactions_current YES
+events_transactions_history YES
+events_transactions_history_long YES
events_waits_current YES
events_waits_history YES
events_waits_history_long YES
@@ -67,28 +70,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -130,28 +125,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -182,15 +169,15 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=101;
update test.t2 set d=d+1 where a=101;
update test.t3 set d=d+1 where a=101;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 1
connection default;
-"================== Step 3 =================="
+"================== Step 3-A =================="
call dump_thread();
username event_name count_star
user1 wait/io/table/sql/handler 0
@@ -221,28 +208,74 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 10
+TABLE test t2 0
+TABLE test t3 14
+connection con1;
+flush tables;
+"================== con1 FLUSH =================="
+connection default;
+"================== Step 3-B =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 24
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 10
@@ -289,28 +322,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 10
@@ -347,11 +372,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=201;
update test.t2 set d=d+1 where a=201;
update test.t3 set d=d+1 where a=201;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 2
205 5 5 1
@@ -392,28 +417,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 6
+TABLE test t3 28 8 20 4 0 0 0 4 0 10
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 20
@@ -465,28 +482,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 6
+TABLE test t3 28 8 20 4 0 0 0 4 0 10
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 20
@@ -529,11 +538,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=301;
update test.t2 set d=d+1 where a=301;
update test.t3 set d=d+1 where a=301;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 3
205 5 5 2
@@ -580,28 +589,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 30 12 18 6 0 0 0 6 0 0 9
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 42 12 30 6 0 0 0 6 0 0 15
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 30 12 18 6 0 0 0 6 0 9
+TABLE test t3 42 12 30 6 0 0 0 6 0 15
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 30
@@ -658,28 +659,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 30 12 18 6 0 0 0 6 0 0 9
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 42 12 30 6 0 0 0 6 0 0 15
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 30 12 18 6 0 0 0 6 0 9
+TABLE test t3 42 12 30 6 0 0 0 6 0 15
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 30
@@ -728,11 +721,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=401;
update test.t2 set d=d+1 where a=401;
update test.t3 set d=d+1 where a=401;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 4
205 5 5 3
@@ -785,28 +778,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 40 16 24 8 0 0 0 8 0 0 12
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 56 16 40 8 0 0 0 8 0 0 20
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 40 16 24 8 0 0 0 8 0 12
+TABLE test t3 56 16 40 8 0 0 0 8 0 20
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 40
@@ -864,28 +849,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -940,28 +917,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1016,28 +985,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1089,28 +1050,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1161,28 +1114,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1232,28 +1177,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1302,28 +1239,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1374,28 +1303,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1445,28 +1366,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1516,28 +1429,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1587,28 +1492,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1658,34 +1555,26 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-show status like "performance_schema%";
+show global status like "performance_schema%";
Variable_name Value
Performance_schema_accounts_lost 0
Performance_schema_cond_classes_lost 0
@@ -1695,9 +1584,15 @@ Performance_schema_file_classes_lost 0
Performance_schema_file_handles_lost 0
Performance_schema_file_instances_lost 0
Performance_schema_hosts_lost 0
+Performance_schema_index_stat_lost 0
Performance_schema_locker_lost 0
+Performance_schema_memory_classes_lost 0
+Performance_schema_metadata_lock_lost 0
Performance_schema_mutex_classes_lost 0
Performance_schema_mutex_instances_lost 0
+Performance_schema_nested_statement_lost 0
+Performance_schema_prepared_statements_lost 0
+Performance_schema_program_lost 0
Performance_schema_rwlock_classes_lost 0
Performance_schema_rwlock_instances_lost 0
Performance_schema_session_connect_attrs_lost 0
@@ -1707,6 +1602,7 @@ Performance_schema_stage_classes_lost 0
Performance_schema_statement_classes_lost 0
Performance_schema_table_handles_lost 0
Performance_schema_table_instances_lost 0
+Performance_schema_table_lock_stat_lost 0
Performance_schema_thread_classes_lost 0
Performance_schema_thread_instances_lost 0
Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/table_lock_aggregate_global_2u_3t.result b/mysql-test/suite/perfschema/r/table_lock_aggregate_global_2u_3t.result
index 04c4fe4d949..0474543c53c 100644
--- a/mysql-test/suite/perfschema/r/table_lock_aggregate_global_2u_3t.result
+++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_global_2u_3t.result
@@ -6,9 +6,9 @@ delete from performance_schema.setup_actors
where user in ('user2', 'user4');
select * from performance_schema.setup_actors
order by USER, HOST, ROLE;
-HOST USER ROLE
-localhost user1 %
-localhost user3 %
+HOST USER ROLE ENABLED HISTORY
+localhost user1 % YES YES
+localhost user3 % YES YES
select * from performance_schema.setup_objects
order by object_type, object_schema, object_name;
OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
@@ -23,6 +23,9 @@ events_stages_history_long YES
events_statements_current YES
events_statements_history YES
events_statements_history_long YES
+events_transactions_current YES
+events_transactions_history YES
+events_transactions_history_long YES
events_waits_current YES
events_waits_history YES
events_waits_history_long YES
@@ -66,15 +69,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -84,10 +84,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -129,15 +129,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -147,10 +144,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -181,15 +178,15 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=101;
update test.t2 set d=d+1 where a=101;
update test.t3 set d=d+1 where a=101;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 1
connection default;
-"================== Step 3 =================="
+"================== Step 3-A =================="
call dump_thread();
username event_name count_star
user1 wait/io/table/sql/handler 0
@@ -220,15 +217,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -238,10 +232,69 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
-TABLE test t2 12 4 8 2 0 0 0 2 0 0 4
-TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t2 12 4 8 2 0 0 0 2 0 4
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 10
+TABLE test t2 12
+TABLE test t3 14
+connection con1;
+flush tables;
+"================== con1 FLUSH =================="
+connection default;
+"================== Step 3-B =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 36
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t2 12 4 8 2 0 0 0 2 0 4
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 10
@@ -288,15 +341,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -306,10 +356,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
-TABLE test t2 12 4 8 2 0 0 0 2 0 0 4
-TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t2 12 4 8 2 0 0 0 2 0 4
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 10
@@ -346,11 +396,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=201;
update test.t2 set d=d+1 where a=201;
update test.t3 set d=d+1 where a=201;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 2
205 5 5 1
@@ -391,15 +441,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -409,10 +456,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
-TABLE test t2 24 8 16 4 0 0 0 4 0 0 8
-TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 6
+TABLE test t2 24 8 16 4 0 0 0 4 0 8
+TABLE test t3 28 8 20 4 0 0 0 4 0 10
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 20
@@ -464,15 +511,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -482,10 +526,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
-TABLE test t2 24 8 16 4 0 0 0 4 0 0 8
-TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 6
+TABLE test t2 24 8 16 4 0 0 0 4 0 8
+TABLE test t3 28 8 20 4 0 0 0 4 0 10
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 20
@@ -528,11 +572,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=301;
update test.t2 set d=d+1 where a=301;
update test.t3 set d=d+1 where a=301;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 3
205 5 5 2
@@ -579,15 +623,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -597,10 +638,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 30 12 18 6 0 0 0 6 0 0 9
-TABLE test t2 36 12 24 6 0 0 0 6 0 0 12
-TABLE test t3 42 12 30 6 0 0 0 6 0 0 15
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 30 12 18 6 0 0 0 6 0 9
+TABLE test t2 36 12 24 6 0 0 0 6 0 12
+TABLE test t3 42 12 30 6 0 0 0 6 0 15
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 30
@@ -657,15 +698,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -675,10 +713,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 30 12 18 6 0 0 0 6 0 0 9
-TABLE test t2 36 12 24 6 0 0 0 6 0 0 12
-TABLE test t3 42 12 30 6 0 0 0 6 0 0 15
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 30 12 18 6 0 0 0 6 0 9
+TABLE test t2 36 12 24 6 0 0 0 6 0 12
+TABLE test t3 42 12 30 6 0 0 0 6 0 15
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 30
@@ -727,11 +765,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=401;
update test.t2 set d=d+1 where a=401;
update test.t3 set d=d+1 where a=401;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 4
205 5 5 3
@@ -784,15 +822,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -802,10 +837,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 40 16 24 8 0 0 0 8 0 0 12
-TABLE test t2 48 16 32 8 0 0 0 8 0 0 16
-TABLE test t3 56 16 40 8 0 0 0 8 0 0 20
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 40 16 24 8 0 0 0 8 0 12
+TABLE test t2 48 16 32 8 0 0 0 8 0 16
+TABLE test t3 56 16 40 8 0 0 0 8 0 20
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 40
@@ -863,15 +898,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -881,10 +913,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -939,15 +971,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -957,10 +986,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1015,15 +1044,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -1033,10 +1059,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1088,15 +1114,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -1106,10 +1129,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1160,15 +1183,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -1178,10 +1198,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1231,15 +1251,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -1249,10 +1266,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1301,15 +1318,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -1319,10 +1333,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1373,15 +1387,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -1391,10 +1402,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1444,15 +1455,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -1462,10 +1470,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1515,15 +1523,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -1533,10 +1538,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1586,15 +1591,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -1604,10 +1606,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1657,15 +1659,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -1675,16 +1674,16 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-show status like "performance_schema%";
+show global status like "performance_schema%";
Variable_name Value
Performance_schema_accounts_lost 0
Performance_schema_cond_classes_lost 0
@@ -1694,9 +1693,15 @@ Performance_schema_file_classes_lost 0
Performance_schema_file_handles_lost 0
Performance_schema_file_instances_lost 0
Performance_schema_hosts_lost 0
+Performance_schema_index_stat_lost 0
Performance_schema_locker_lost 0
+Performance_schema_memory_classes_lost 0
+Performance_schema_metadata_lock_lost 0
Performance_schema_mutex_classes_lost 0
Performance_schema_mutex_instances_lost 0
+Performance_schema_nested_statement_lost 0
+Performance_schema_prepared_statements_lost 0
+Performance_schema_program_lost 0
Performance_schema_rwlock_classes_lost 0
Performance_schema_rwlock_instances_lost 0
Performance_schema_session_connect_attrs_lost 0
@@ -1706,6 +1711,7 @@ Performance_schema_stage_classes_lost 0
Performance_schema_statement_classes_lost 0
Performance_schema_table_handles_lost 0
Performance_schema_table_instances_lost 0
+Performance_schema_table_lock_stat_lost 0
Performance_schema_thread_classes_lost 0
Performance_schema_thread_instances_lost 0
Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/table_lock_aggregate_global_4u_2t.result b/mysql-test/suite/perfschema/r/table_lock_aggregate_global_4u_2t.result
index 61783e41b1b..4556c41c98d 100644
--- a/mysql-test/suite/perfschema/r/table_lock_aggregate_global_4u_2t.result
+++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_global_4u_2t.result
@@ -6,11 +6,11 @@ delete from performance_schema.setup_objects
where object_name='t2';
select * from performance_schema.setup_actors
order by USER, HOST, ROLE;
-HOST USER ROLE
-localhost user1 %
-localhost user2 %
-localhost user3 %
-localhost user4 %
+HOST USER ROLE ENABLED HISTORY
+localhost user1 % YES YES
+localhost user2 % YES YES
+localhost user3 % YES YES
+localhost user4 % YES YES
select * from performance_schema.setup_objects
order by object_type, object_schema, object_name;
OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
@@ -24,6 +24,9 @@ events_stages_history_long YES
events_statements_current YES
events_statements_history YES
events_statements_history_long YES
+events_transactions_current YES
+events_transactions_history YES
+events_transactions_history_long YES
events_waits_current YES
events_waits_history YES
events_waits_history_long YES
@@ -67,28 +70,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -130,28 +125,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -182,15 +169,15 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=101;
update test.t2 set d=d+1 where a=101;
update test.t3 set d=d+1 where a=101;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 1
connection default;
-"================== Step 3 =================="
+"================== Step 3-A =================="
call dump_thread();
username event_name count_star
user1 wait/io/table/sql/handler 0
@@ -221,28 +208,74 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 10
+TABLE test t2 0
+TABLE test t3 14
+connection con1;
+flush tables;
+"================== con1 FLUSH =================="
+connection default;
+"================== Step 3-B =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 24
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 10
@@ -289,28 +322,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 10
@@ -347,11 +372,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=201;
update test.t2 set d=d+1 where a=201;
update test.t3 set d=d+1 where a=201;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 2
205 5 5 1
@@ -392,28 +417,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 6
+TABLE test t3 28 8 20 4 0 0 0 4 0 10
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 20
@@ -465,28 +482,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 6
+TABLE test t3 28 8 20 4 0 0 0 4 0 10
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 20
@@ -529,11 +538,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=301;
update test.t2 set d=d+1 where a=301;
update test.t3 set d=d+1 where a=301;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 3
205 5 5 2
@@ -580,28 +589,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 30 12 18 6 0 0 0 6 0 0 9
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 42 12 30 6 0 0 0 6 0 0 15
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 30 12 18 6 0 0 0 6 0 9
+TABLE test t3 42 12 30 6 0 0 0 6 0 15
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 30
@@ -658,28 +659,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 30 12 18 6 0 0 0 6 0 0 9
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 42 12 30 6 0 0 0 6 0 0 15
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 30 12 18 6 0 0 0 6 0 9
+TABLE test t3 42 12 30 6 0 0 0 6 0 15
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 30
@@ -728,11 +721,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=401;
update test.t2 set d=d+1 where a=401;
update test.t3 set d=d+1 where a=401;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 4
205 5 5 3
@@ -785,28 +778,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 40 16 24 8 0 0 0 8 0 0 12
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 56 16 40 8 0 0 0 8 0 0 20
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 40 16 24 8 0 0 0 8 0 12
+TABLE test t3 56 16 40 8 0 0 0 8 0 20
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 40
@@ -864,28 +849,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -940,28 +917,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1016,28 +985,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1089,28 +1050,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1161,28 +1114,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1232,28 +1177,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1302,28 +1239,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1374,28 +1303,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1445,28 +1366,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1516,28 +1429,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1587,28 +1492,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1658,34 +1555,26 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-show status like "performance_schema%";
+show global status like "performance_schema%";
Variable_name Value
Performance_schema_accounts_lost 0
Performance_schema_cond_classes_lost 0
@@ -1695,9 +1584,15 @@ Performance_schema_file_classes_lost 0
Performance_schema_file_handles_lost 0
Performance_schema_file_instances_lost 0
Performance_schema_hosts_lost 0
+Performance_schema_index_stat_lost 0
Performance_schema_locker_lost 0
+Performance_schema_memory_classes_lost 0
+Performance_schema_metadata_lock_lost 0
Performance_schema_mutex_classes_lost 0
Performance_schema_mutex_instances_lost 0
+Performance_schema_nested_statement_lost 0
+Performance_schema_prepared_statements_lost 0
+Performance_schema_program_lost 0
Performance_schema_rwlock_classes_lost 0
Performance_schema_rwlock_instances_lost 0
Performance_schema_session_connect_attrs_lost 0
@@ -1707,6 +1602,7 @@ Performance_schema_stage_classes_lost 0
Performance_schema_statement_classes_lost 0
Performance_schema_table_handles_lost 0
Performance_schema_table_instances_lost 0
+Performance_schema_table_lock_stat_lost 0
Performance_schema_thread_classes_lost 0
Performance_schema_thread_instances_lost 0
Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/table_lock_aggregate_global_4u_3t.result b/mysql-test/suite/perfschema/r/table_lock_aggregate_global_4u_3t.result
index 2be8dbdf5b3..9285d43c058 100644
--- a/mysql-test/suite/perfschema/r/table_lock_aggregate_global_4u_3t.result
+++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_global_4u_3t.result
@@ -4,11 +4,11 @@ update performance_schema.setup_consumers
set enabled='NO' where name='thread_instrumentation';
select * from performance_schema.setup_actors
order by USER, HOST, ROLE;
-HOST USER ROLE
-localhost user1 %
-localhost user2 %
-localhost user3 %
-localhost user4 %
+HOST USER ROLE ENABLED HISTORY
+localhost user1 % YES YES
+localhost user2 % YES YES
+localhost user3 % YES YES
+localhost user4 % YES YES
select * from performance_schema.setup_objects
order by object_type, object_schema, object_name;
OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
@@ -23,6 +23,9 @@ events_stages_history_long YES
events_statements_current YES
events_statements_history YES
events_statements_history_long YES
+events_transactions_current YES
+events_transactions_history YES
+events_transactions_history_long YES
events_waits_current YES
events_waits_history YES
events_waits_history_long YES
@@ -66,15 +69,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -84,10 +84,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -129,15 +129,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -147,10 +144,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -181,15 +178,15 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=101;
update test.t2 set d=d+1 where a=101;
update test.t3 set d=d+1 where a=101;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 1
connection default;
-"================== Step 3 =================="
+"================== Step 3-A =================="
call dump_thread();
username event_name count_star
user1 wait/io/table/sql/handler 0
@@ -220,15 +217,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -238,10 +232,69 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
-TABLE test t2 12 4 8 2 0 0 0 2 0 0 4
-TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t2 12 4 8 2 0 0 0 2 0 4
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 10
+TABLE test t2 12
+TABLE test t3 14
+connection con1;
+flush tables;
+"================== con1 FLUSH =================="
+connection default;
+"================== Step 3-B =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 36
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t2 12 4 8 2 0 0 0 2 0 4
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 10
@@ -288,15 +341,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -306,10 +356,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
-TABLE test t2 12 4 8 2 0 0 0 2 0 0 4
-TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t2 12 4 8 2 0 0 0 2 0 4
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 10
@@ -346,11 +396,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=201;
update test.t2 set d=d+1 where a=201;
update test.t3 set d=d+1 where a=201;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 2
205 5 5 1
@@ -391,15 +441,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -409,10 +456,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
-TABLE test t2 24 8 16 4 0 0 0 4 0 0 8
-TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 6
+TABLE test t2 24 8 16 4 0 0 0 4 0 8
+TABLE test t3 28 8 20 4 0 0 0 4 0 10
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 20
@@ -464,15 +511,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -482,10 +526,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
-TABLE test t2 24 8 16 4 0 0 0 4 0 0 8
-TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 6
+TABLE test t2 24 8 16 4 0 0 0 4 0 8
+TABLE test t3 28 8 20 4 0 0 0 4 0 10
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 20
@@ -528,11 +572,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=301;
update test.t2 set d=d+1 where a=301;
update test.t3 set d=d+1 where a=301;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 3
205 5 5 2
@@ -579,15 +623,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -597,10 +638,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 30 12 18 6 0 0 0 6 0 0 9
-TABLE test t2 36 12 24 6 0 0 0 6 0 0 12
-TABLE test t3 42 12 30 6 0 0 0 6 0 0 15
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 30 12 18 6 0 0 0 6 0 9
+TABLE test t2 36 12 24 6 0 0 0 6 0 12
+TABLE test t3 42 12 30 6 0 0 0 6 0 15
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 30
@@ -657,15 +698,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -675,10 +713,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 30 12 18 6 0 0 0 6 0 0 9
-TABLE test t2 36 12 24 6 0 0 0 6 0 0 12
-TABLE test t3 42 12 30 6 0 0 0 6 0 0 15
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 30 12 18 6 0 0 0 6 0 9
+TABLE test t2 36 12 24 6 0 0 0 6 0 12
+TABLE test t3 42 12 30 6 0 0 0 6 0 15
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 30
@@ -727,11 +765,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=401;
update test.t2 set d=d+1 where a=401;
update test.t3 set d=d+1 where a=401;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 4
205 5 5 3
@@ -784,15 +822,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -802,10 +837,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 40 16 24 8 0 0 0 8 0 0 12
-TABLE test t2 48 16 32 8 0 0 0 8 0 0 16
-TABLE test t3 56 16 40 8 0 0 0 8 0 0 20
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 40 16 24 8 0 0 0 8 0 12
+TABLE test t2 48 16 32 8 0 0 0 8 0 16
+TABLE test t3 56 16 40 8 0 0 0 8 0 20
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 40
@@ -863,15 +898,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -881,10 +913,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -939,15 +971,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -957,10 +986,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1015,15 +1044,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -1033,10 +1059,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1088,15 +1114,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -1106,10 +1129,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1160,15 +1183,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -1178,10 +1198,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1231,15 +1251,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -1249,10 +1266,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1301,15 +1318,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -1319,10 +1333,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1373,15 +1387,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -1391,10 +1402,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1444,15 +1455,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -1462,10 +1470,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1515,15 +1523,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -1533,10 +1538,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1586,15 +1591,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -1604,10 +1606,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1657,15 +1659,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -1675,16 +1674,16 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-show status like "performance_schema%";
+show global status like "performance_schema%";
Variable_name Value
Performance_schema_accounts_lost 0
Performance_schema_cond_classes_lost 0
@@ -1694,9 +1693,15 @@ Performance_schema_file_classes_lost 0
Performance_schema_file_handles_lost 0
Performance_schema_file_instances_lost 0
Performance_schema_hosts_lost 0
+Performance_schema_index_stat_lost 0
Performance_schema_locker_lost 0
+Performance_schema_memory_classes_lost 0
+Performance_schema_metadata_lock_lost 0
Performance_schema_mutex_classes_lost 0
Performance_schema_mutex_instances_lost 0
+Performance_schema_nested_statement_lost 0
+Performance_schema_prepared_statements_lost 0
+Performance_schema_program_lost 0
Performance_schema_rwlock_classes_lost 0
Performance_schema_rwlock_instances_lost 0
Performance_schema_session_connect_attrs_lost 0
@@ -1706,6 +1711,7 @@ Performance_schema_stage_classes_lost 0
Performance_schema_statement_classes_lost 0
Performance_schema_table_handles_lost 0
Performance_schema_table_instances_lost 0
+Performance_schema_table_lock_stat_lost 0
Performance_schema_thread_classes_lost 0
Performance_schema_thread_instances_lost 0
Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_2u_2t.result b/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_2u_2t.result
index 0ded9d54590..4feb933aae4 100644
--- a/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_2u_2t.result
+++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_2u_2t.result
@@ -6,9 +6,9 @@ delete from performance_schema.setup_objects
where object_name='t2';
select * from performance_schema.setup_actors
order by USER, HOST, ROLE;
-HOST USER ROLE
-localhost user1 %
-localhost user3 %
+HOST USER ROLE ENABLED HISTORY
+localhost user1 % YES YES
+localhost user3 % YES YES
select * from performance_schema.setup_objects
order by object_type, object_schema, object_name;
OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
@@ -22,6 +22,9 @@ events_stages_history_long YES
events_statements_current YES
events_statements_history YES
events_statements_history_long YES
+events_transactions_current YES
+events_transactions_history YES
+events_transactions_history_long YES
events_waits_current YES
events_waits_history YES
events_waits_history_long YES
@@ -65,28 +68,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -128,28 +123,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -180,15 +167,15 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=101;
update test.t2 set d=d+1 where a=101;
update test.t3 set d=d+1 where a=101;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 1
connection default;
-"================== Step 3 =================="
+"================== Step 3-A =================="
call dump_thread();
username event_name count_star
user1 wait/io/table/sql/handler 0
@@ -221,28 +208,76 @@ wait/lock/table/sql/handler 10 TABLE test t1
wait/lock/table/sql/handler 14 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 10
+TABLE test t2 0
+TABLE test t3 14
+connection con1;
+flush tables;
+"================== con1 FLUSH =================="
+connection default;
+"================== Step 3-B =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 24
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 24
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 24
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 24
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 24
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 10 TABLE test t1
+wait/lock/table/sql/handler 14 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 10
@@ -291,28 +326,20 @@ wait/lock/table/sql/handler 10 TABLE test t1
wait/lock/table/sql/handler 14 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 10
@@ -349,11 +376,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=201;
update test.t2 set d=d+1 where a=201;
update test.t3 set d=d+1 where a=201;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 2
205 5 5 1
@@ -396,28 +423,20 @@ wait/lock/table/sql/handler 10 TABLE test t1
wait/lock/table/sql/handler 14 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 10
@@ -471,28 +490,20 @@ wait/lock/table/sql/handler 10 TABLE test t1
wait/lock/table/sql/handler 14 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 10
@@ -535,11 +546,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=301;
update test.t2 set d=d+1 where a=301;
update test.t3 set d=d+1 where a=301;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 3
205 5 5 2
@@ -588,28 +599,20 @@ wait/lock/table/sql/handler 20 TABLE test t1
wait/lock/table/sql/handler 28 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 6
+TABLE test t3 28 8 20 4 0 0 0 4 0 10
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 20
@@ -668,28 +671,20 @@ wait/lock/table/sql/handler 20 TABLE test t1
wait/lock/table/sql/handler 28 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 6
+TABLE test t3 28 8 20 4 0 0 0 4 0 10
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 20
@@ -738,11 +733,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=401;
update test.t2 set d=d+1 where a=401;
update test.t3 set d=d+1 where a=401;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 4
205 5 5 3
@@ -797,28 +792,20 @@ wait/lock/table/sql/handler 20 TABLE test t1
wait/lock/table/sql/handler 28 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 6
+TABLE test t3 28 8 20 4 0 0 0 4 0 10
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 20
@@ -878,28 +865,20 @@ wait/lock/table/sql/handler 24 TABLE test t1
wait/lock/table/sql/handler 32 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 24
@@ -956,28 +935,20 @@ wait/lock/table/sql/handler 24 TABLE test t1
wait/lock/table/sql/handler 32 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 24
@@ -1034,28 +1005,20 @@ wait/lock/table/sql/handler 24 TABLE test t1
wait/lock/table/sql/handler 32 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 24
@@ -1109,28 +1072,20 @@ wait/lock/table/sql/handler 24 TABLE test t1
wait/lock/table/sql/handler 32 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 24
@@ -1183,28 +1138,20 @@ wait/lock/table/sql/handler 24 TABLE test t1
wait/lock/table/sql/handler 32 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 24
@@ -1256,28 +1203,20 @@ wait/lock/table/sql/handler 24 TABLE test t1
wait/lock/table/sql/handler 32 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 24
@@ -1328,28 +1267,20 @@ wait/lock/table/sql/handler 24 TABLE test t1
wait/lock/table/sql/handler 32 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 24
@@ -1402,28 +1333,20 @@ wait/lock/table/sql/handler 24 TABLE test t1
wait/lock/table/sql/handler 32 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 24
@@ -1475,28 +1398,20 @@ wait/lock/table/sql/handler 24 TABLE test t1
wait/lock/table/sql/handler 32 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 24
@@ -1548,28 +1463,20 @@ wait/lock/table/sql/handler 24 TABLE test t1
wait/lock/table/sql/handler 32 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 24
@@ -1621,28 +1528,20 @@ wait/lock/table/sql/handler 24 TABLE test t1
wait/lock/table/sql/handler 32 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 24
@@ -1694,34 +1593,26 @@ wait/lock/table/sql/handler 24 TABLE test t1
wait/lock/table/sql/handler 32 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-show status like "performance_schema%";
+show global status like "performance_schema%";
Variable_name Value
Performance_schema_accounts_lost 0
Performance_schema_cond_classes_lost 0
@@ -1731,9 +1622,15 @@ Performance_schema_file_classes_lost 0
Performance_schema_file_handles_lost 0
Performance_schema_file_instances_lost 0
Performance_schema_hosts_lost 0
+Performance_schema_index_stat_lost 0
Performance_schema_locker_lost 0
+Performance_schema_memory_classes_lost 0
+Performance_schema_metadata_lock_lost 0
Performance_schema_mutex_classes_lost 0
Performance_schema_mutex_instances_lost 0
+Performance_schema_nested_statement_lost 0
+Performance_schema_prepared_statements_lost 0
+Performance_schema_program_lost 0
Performance_schema_rwlock_classes_lost 0
Performance_schema_rwlock_instances_lost 0
Performance_schema_session_connect_attrs_lost 0
@@ -1743,6 +1640,7 @@ Performance_schema_stage_classes_lost 0
Performance_schema_statement_classes_lost 0
Performance_schema_table_handles_lost 0
Performance_schema_table_instances_lost 0
+Performance_schema_table_lock_stat_lost 0
Performance_schema_thread_classes_lost 0
Performance_schema_thread_instances_lost 0
Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_2u_3t.result b/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_2u_3t.result
index 13642f45b5a..dee9ca7489c 100644
--- a/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_2u_3t.result
+++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_2u_3t.result
@@ -4,9 +4,9 @@ delete from performance_schema.setup_actors
where user in ('user2', 'user4');
select * from performance_schema.setup_actors
order by USER, HOST, ROLE;
-HOST USER ROLE
-localhost user1 %
-localhost user3 %
+HOST USER ROLE ENABLED HISTORY
+localhost user1 % YES YES
+localhost user3 % YES YES
select * from performance_schema.setup_objects
order by object_type, object_schema, object_name;
OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
@@ -21,6 +21,9 @@ events_stages_history_long YES
events_statements_current YES
events_statements_history YES
events_statements_history_long YES
+events_transactions_current YES
+events_transactions_history YES
+events_transactions_history_long YES
events_waits_current YES
events_waits_history YES
events_waits_history_long YES
@@ -64,15 +67,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -82,10 +82,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -127,15 +127,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -145,10 +142,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -179,15 +176,15 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=101;
update test.t2 set d=d+1 where a=101;
update test.t3 set d=d+1 where a=101;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 1
connection default;
-"================== Step 3 =================="
+"================== Step 3-A =================="
call dump_thread();
username event_name count_star
user1 wait/io/table/sql/handler 0
@@ -221,15 +218,12 @@ wait/lock/table/sql/handler 12 TABLE test t2
wait/lock/table/sql/handler 14 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -239,10 +233,72 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
-TABLE test t2 12 4 8 2 0 0 0 2 0 0 4
-TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t2 12 4 8 2 0 0 0 2 0 4
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 10
+TABLE test t2 12
+TABLE test t3 14
+connection con1;
+flush tables;
+"================== con1 FLUSH =================="
+connection default;
+"================== Step 3-B =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 36
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 36
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 36
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 36
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 36
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 10 TABLE test t1
+wait/lock/table/sql/handler 12 TABLE test t2
+wait/lock/table/sql/handler 14 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t2 12 4 8 2 0 0 0 2 0 4
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 10
@@ -292,15 +348,12 @@ wait/lock/table/sql/handler 12 TABLE test t2
wait/lock/table/sql/handler 14 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -310,10 +363,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
-TABLE test t2 12 4 8 2 0 0 0 2 0 0 4
-TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t2 12 4 8 2 0 0 0 2 0 4
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 10
@@ -350,11 +403,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=201;
update test.t2 set d=d+1 where a=201;
update test.t3 set d=d+1 where a=201;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 2
205 5 5 1
@@ -398,15 +451,12 @@ wait/lock/table/sql/handler 12 TABLE test t2
wait/lock/table/sql/handler 14 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -416,10 +466,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
-TABLE test t2 12 4 8 2 0 0 0 2 0 0 4
-TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t2 12 4 8 2 0 0 0 2 0 4
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 10
@@ -474,15 +524,12 @@ wait/lock/table/sql/handler 12 TABLE test t2
wait/lock/table/sql/handler 14 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -492,10 +539,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
-TABLE test t2 12 4 8 2 0 0 0 2 0 0 4
-TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t2 12 4 8 2 0 0 0 2 0 4
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 10
@@ -538,11 +585,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=301;
update test.t2 set d=d+1 where a=301;
update test.t3 set d=d+1 where a=301;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 3
205 5 5 2
@@ -592,15 +639,12 @@ wait/lock/table/sql/handler 24 TABLE test t2
wait/lock/table/sql/handler 28 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -610,10 +654,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
-TABLE test t2 24 8 16 4 0 0 0 4 0 0 8
-TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 6
+TABLE test t2 24 8 16 4 0 0 0 4 0 8
+TABLE test t3 28 8 20 4 0 0 0 4 0 10
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 20
@@ -673,15 +717,12 @@ wait/lock/table/sql/handler 24 TABLE test t2
wait/lock/table/sql/handler 28 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -691,10 +732,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
-TABLE test t2 24 8 16 4 0 0 0 4 0 0 8
-TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 6
+TABLE test t2 24 8 16 4 0 0 0 4 0 8
+TABLE test t3 28 8 20 4 0 0 0 4 0 10
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 20
@@ -743,11 +784,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=401;
update test.t2 set d=d+1 where a=401;
update test.t3 set d=d+1 where a=401;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 4
205 5 5 3
@@ -803,15 +844,12 @@ wait/lock/table/sql/handler 24 TABLE test t2
wait/lock/table/sql/handler 28 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -821,10 +859,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
-TABLE test t2 24 8 16 4 0 0 0 4 0 0 8
-TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 6
+TABLE test t2 24 8 16 4 0 0 0 4 0 8
+TABLE test t3 28 8 20 4 0 0 0 4 0 10
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 20
@@ -885,15 +923,12 @@ wait/lock/table/sql/handler 28 TABLE test t2
wait/lock/table/sql/handler 32 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -903,10 +938,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 24
@@ -964,15 +999,12 @@ wait/lock/table/sql/handler 28 TABLE test t2
wait/lock/table/sql/handler 32 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -982,10 +1014,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 24
@@ -1043,15 +1075,12 @@ wait/lock/table/sql/handler 28 TABLE test t2
wait/lock/table/sql/handler 32 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -1061,10 +1090,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 24
@@ -1119,15 +1148,12 @@ wait/lock/table/sql/handler 28 TABLE test t2
wait/lock/table/sql/handler 32 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -1137,10 +1163,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 24
@@ -1194,15 +1220,12 @@ wait/lock/table/sql/handler 28 TABLE test t2
wait/lock/table/sql/handler 32 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -1212,10 +1235,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 24
@@ -1268,15 +1291,12 @@ wait/lock/table/sql/handler 28 TABLE test t2
wait/lock/table/sql/handler 32 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -1286,10 +1306,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 24
@@ -1341,15 +1361,12 @@ wait/lock/table/sql/handler 28 TABLE test t2
wait/lock/table/sql/handler 32 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -1359,10 +1376,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 24
@@ -1416,15 +1433,12 @@ wait/lock/table/sql/handler 28 TABLE test t2
wait/lock/table/sql/handler 32 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -1434,10 +1448,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 24
@@ -1490,15 +1504,12 @@ wait/lock/table/sql/handler 28 TABLE test t2
wait/lock/table/sql/handler 32 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -1508,10 +1519,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 24
@@ -1564,15 +1575,12 @@ wait/lock/table/sql/handler 28 TABLE test t2
wait/lock/table/sql/handler 32 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -1582,10 +1590,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 24
@@ -1638,15 +1646,12 @@ wait/lock/table/sql/handler 28 TABLE test t2
wait/lock/table/sql/handler 32 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -1656,10 +1661,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 24
@@ -1712,15 +1717,12 @@ wait/lock/table/sql/handler 28 TABLE test t2
wait/lock/table/sql/handler 32 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -1730,16 +1732,16 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-show status like "performance_schema%";
+show global status like "performance_schema%";
Variable_name Value
Performance_schema_accounts_lost 0
Performance_schema_cond_classes_lost 0
@@ -1749,9 +1751,15 @@ Performance_schema_file_classes_lost 0
Performance_schema_file_handles_lost 0
Performance_schema_file_instances_lost 0
Performance_schema_hosts_lost 0
+Performance_schema_index_stat_lost 0
Performance_schema_locker_lost 0
+Performance_schema_memory_classes_lost 0
+Performance_schema_metadata_lock_lost 0
Performance_schema_mutex_classes_lost 0
Performance_schema_mutex_instances_lost 0
+Performance_schema_nested_statement_lost 0
+Performance_schema_prepared_statements_lost 0
+Performance_schema_program_lost 0
Performance_schema_rwlock_classes_lost 0
Performance_schema_rwlock_instances_lost 0
Performance_schema_session_connect_attrs_lost 0
@@ -1761,6 +1769,7 @@ Performance_schema_stage_classes_lost 0
Performance_schema_statement_classes_lost 0
Performance_schema_table_handles_lost 0
Performance_schema_table_instances_lost 0
+Performance_schema_table_lock_stat_lost 0
Performance_schema_thread_classes_lost 0
Performance_schema_thread_instances_lost 0
Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_4u_2t.result b/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_4u_2t.result
index 61c649bd2cf..045a04e7fe0 100644
--- a/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_4u_2t.result
+++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_4u_2t.result
@@ -4,11 +4,11 @@ delete from performance_schema.setup_objects
where object_name='t2';
select * from performance_schema.setup_actors
order by USER, HOST, ROLE;
-HOST USER ROLE
-localhost user1 %
-localhost user2 %
-localhost user3 %
-localhost user4 %
+HOST USER ROLE ENABLED HISTORY
+localhost user1 % YES YES
+localhost user2 % YES YES
+localhost user3 % YES YES
+localhost user4 % YES YES
select * from performance_schema.setup_objects
order by object_type, object_schema, object_name;
OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
@@ -22,6 +22,9 @@ events_stages_history_long YES
events_statements_current YES
events_statements_history YES
events_statements_history_long YES
+events_transactions_current YES
+events_transactions_history YES
+events_transactions_history_long YES
events_waits_current YES
events_waits_history YES
events_waits_history_long YES
@@ -65,28 +68,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -128,28 +123,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -180,15 +167,15 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=101;
update test.t2 set d=d+1 where a=101;
update test.t3 set d=d+1 where a=101;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 1
connection default;
-"================== Step 3 =================="
+"================== Step 3-A =================="
call dump_thread();
username event_name count_star
user1 wait/io/table/sql/handler 0
@@ -221,28 +208,76 @@ wait/lock/table/sql/handler 10 TABLE test t1
wait/lock/table/sql/handler 14 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 10
+TABLE test t2 0
+TABLE test t3 14
+connection con1;
+flush tables;
+"================== con1 FLUSH =================="
+connection default;
+"================== Step 3-B =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 24
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 24
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 24
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 24
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 24
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 10 TABLE test t1
+wait/lock/table/sql/handler 14 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 10
@@ -291,28 +326,20 @@ wait/lock/table/sql/handler 10 TABLE test t1
wait/lock/table/sql/handler 14 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 10
@@ -349,11 +376,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=201;
update test.t2 set d=d+1 where a=201;
update test.t3 set d=d+1 where a=201;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 2
205 5 5 1
@@ -396,28 +423,20 @@ wait/lock/table/sql/handler 20 TABLE test t1
wait/lock/table/sql/handler 28 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 6
+TABLE test t3 28 8 20 4 0 0 0 4 0 10
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 20
@@ -471,28 +490,20 @@ wait/lock/table/sql/handler 20 TABLE test t1
wait/lock/table/sql/handler 28 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 6
+TABLE test t3 28 8 20 4 0 0 0 4 0 10
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 20
@@ -535,11 +546,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=301;
update test.t2 set d=d+1 where a=301;
update test.t3 set d=d+1 where a=301;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 3
205 5 5 2
@@ -588,28 +599,20 @@ wait/lock/table/sql/handler 30 TABLE test t1
wait/lock/table/sql/handler 42 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 30 12 18 6 0 0 0 6 0 0 9
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 42 12 30 6 0 0 0 6 0 0 15
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 30 12 18 6 0 0 0 6 0 9
+TABLE test t3 42 12 30 6 0 0 0 6 0 15
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 30
@@ -668,28 +671,20 @@ wait/lock/table/sql/handler 30 TABLE test t1
wait/lock/table/sql/handler 42 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 30 12 18 6 0 0 0 6 0 0 9
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 42 12 30 6 0 0 0 6 0 0 15
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 30 12 18 6 0 0 0 6 0 9
+TABLE test t3 42 12 30 6 0 0 0 6 0 15
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 30
@@ -738,11 +733,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=401;
update test.t2 set d=d+1 where a=401;
update test.t3 set d=d+1 where a=401;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 4
205 5 5 3
@@ -797,28 +792,20 @@ wait/lock/table/sql/handler 40 TABLE test t1
wait/lock/table/sql/handler 56 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 40 16 24 8 0 0 0 8 0 0 12
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 56 16 40 8 0 0 0 8 0 0 20
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 40 16 24 8 0 0 0 8 0 12
+TABLE test t3 56 16 40 8 0 0 0 8 0 20
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 40
@@ -878,28 +865,20 @@ wait/lock/table/sql/handler 44 TABLE test t1
wait/lock/table/sql/handler 60 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -956,28 +935,20 @@ wait/lock/table/sql/handler 44 TABLE test t1
wait/lock/table/sql/handler 60 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1034,28 +1005,20 @@ wait/lock/table/sql/handler 44 TABLE test t1
wait/lock/table/sql/handler 60 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1109,28 +1072,20 @@ wait/lock/table/sql/handler 44 TABLE test t1
wait/lock/table/sql/handler 60 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1183,28 +1138,20 @@ wait/lock/table/sql/handler 44 TABLE test t1
wait/lock/table/sql/handler 60 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1256,28 +1203,20 @@ wait/lock/table/sql/handler 44 TABLE test t1
wait/lock/table/sql/handler 60 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1328,28 +1267,20 @@ wait/lock/table/sql/handler 44 TABLE test t1
wait/lock/table/sql/handler 60 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1402,28 +1333,20 @@ wait/lock/table/sql/handler 44 TABLE test t1
wait/lock/table/sql/handler 60 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1475,28 +1398,20 @@ wait/lock/table/sql/handler 44 TABLE test t1
wait/lock/table/sql/handler 60 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1548,28 +1463,20 @@ wait/lock/table/sql/handler 44 TABLE test t1
wait/lock/table/sql/handler 60 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1621,28 +1528,20 @@ wait/lock/table/sql/handler 44 TABLE test t1
wait/lock/table/sql/handler 60 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1694,34 +1593,26 @@ wait/lock/table/sql/handler 44 TABLE test t1
wait/lock/table/sql/handler 60 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-show status like "performance_schema%";
+show global status like "performance_schema%";
Variable_name Value
Performance_schema_accounts_lost 0
Performance_schema_cond_classes_lost 0
@@ -1731,9 +1622,15 @@ Performance_schema_file_classes_lost 0
Performance_schema_file_handles_lost 0
Performance_schema_file_instances_lost 0
Performance_schema_hosts_lost 0
+Performance_schema_index_stat_lost 0
Performance_schema_locker_lost 0
+Performance_schema_memory_classes_lost 0
+Performance_schema_metadata_lock_lost 0
Performance_schema_mutex_classes_lost 0
Performance_schema_mutex_instances_lost 0
+Performance_schema_nested_statement_lost 0
+Performance_schema_prepared_statements_lost 0
+Performance_schema_program_lost 0
Performance_schema_rwlock_classes_lost 0
Performance_schema_rwlock_instances_lost 0
Performance_schema_session_connect_attrs_lost 0
@@ -1743,6 +1640,7 @@ Performance_schema_stage_classes_lost 0
Performance_schema_statement_classes_lost 0
Performance_schema_table_handles_lost 0
Performance_schema_table_instances_lost 0
+Performance_schema_table_lock_stat_lost 0
Performance_schema_thread_classes_lost 0
Performance_schema_thread_instances_lost 0
Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_4u_3t.result b/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_4u_3t.result
index 5d5282ba899..e912664ec2f 100644
--- a/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_4u_3t.result
+++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_4u_3t.result
@@ -2,11 +2,11 @@ update performance_schema.setup_instruments
set enabled='NO' where name='wait/io/table/sql/handler';
select * from performance_schema.setup_actors
order by USER, HOST, ROLE;
-HOST USER ROLE
-localhost user1 %
-localhost user2 %
-localhost user3 %
-localhost user4 %
+HOST USER ROLE ENABLED HISTORY
+localhost user1 % YES YES
+localhost user2 % YES YES
+localhost user3 % YES YES
+localhost user4 % YES YES
select * from performance_schema.setup_objects
order by object_type, object_schema, object_name;
OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
@@ -21,6 +21,9 @@ events_stages_history_long YES
events_statements_current YES
events_statements_history YES
events_statements_history_long YES
+events_transactions_current YES
+events_transactions_history YES
+events_transactions_history_long YES
events_waits_current YES
events_waits_history YES
events_waits_history_long YES
@@ -64,15 +67,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -82,10 +82,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -127,15 +127,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -145,10 +142,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -179,15 +176,15 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=101;
update test.t2 set d=d+1 where a=101;
update test.t3 set d=d+1 where a=101;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 1
connection default;
-"================== Step 3 =================="
+"================== Step 3-A =================="
call dump_thread();
username event_name count_star
user1 wait/io/table/sql/handler 0
@@ -221,15 +218,12 @@ wait/lock/table/sql/handler 12 TABLE test t2
wait/lock/table/sql/handler 14 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -239,10 +233,72 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
-TABLE test t2 12 4 8 2 0 0 0 2 0 0 4
-TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t2 12 4 8 2 0 0 0 2 0 4
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 10
+TABLE test t2 12
+TABLE test t3 14
+connection con1;
+flush tables;
+"================== con1 FLUSH =================="
+connection default;
+"================== Step 3-B =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 36
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 36
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 36
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 36
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 36
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 10 TABLE test t1
+wait/lock/table/sql/handler 12 TABLE test t2
+wait/lock/table/sql/handler 14 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t2 12 4 8 2 0 0 0 2 0 4
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 10
@@ -292,15 +348,12 @@ wait/lock/table/sql/handler 12 TABLE test t2
wait/lock/table/sql/handler 14 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -310,10 +363,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
-TABLE test t2 12 4 8 2 0 0 0 2 0 0 4
-TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t2 12 4 8 2 0 0 0 2 0 4
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 10
@@ -350,11 +403,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=201;
update test.t2 set d=d+1 where a=201;
update test.t3 set d=d+1 where a=201;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 2
205 5 5 1
@@ -398,15 +451,12 @@ wait/lock/table/sql/handler 24 TABLE test t2
wait/lock/table/sql/handler 28 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -416,10 +466,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
-TABLE test t2 24 8 16 4 0 0 0 4 0 0 8
-TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 6
+TABLE test t2 24 8 16 4 0 0 0 4 0 8
+TABLE test t3 28 8 20 4 0 0 0 4 0 10
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 20
@@ -474,15 +524,12 @@ wait/lock/table/sql/handler 24 TABLE test t2
wait/lock/table/sql/handler 28 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -492,10 +539,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
-TABLE test t2 24 8 16 4 0 0 0 4 0 0 8
-TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 6
+TABLE test t2 24 8 16 4 0 0 0 4 0 8
+TABLE test t3 28 8 20 4 0 0 0 4 0 10
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 20
@@ -538,11 +585,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=301;
update test.t2 set d=d+1 where a=301;
update test.t3 set d=d+1 where a=301;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 3
205 5 5 2
@@ -592,15 +639,12 @@ wait/lock/table/sql/handler 36 TABLE test t2
wait/lock/table/sql/handler 42 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -610,10 +654,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 30 12 18 6 0 0 0 6 0 0 9
-TABLE test t2 36 12 24 6 0 0 0 6 0 0 12
-TABLE test t3 42 12 30 6 0 0 0 6 0 0 15
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 30 12 18 6 0 0 0 6 0 9
+TABLE test t2 36 12 24 6 0 0 0 6 0 12
+TABLE test t3 42 12 30 6 0 0 0 6 0 15
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 30
@@ -673,15 +717,12 @@ wait/lock/table/sql/handler 36 TABLE test t2
wait/lock/table/sql/handler 42 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -691,10 +732,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 30 12 18 6 0 0 0 6 0 0 9
-TABLE test t2 36 12 24 6 0 0 0 6 0 0 12
-TABLE test t3 42 12 30 6 0 0 0 6 0 0 15
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 30 12 18 6 0 0 0 6 0 9
+TABLE test t2 36 12 24 6 0 0 0 6 0 12
+TABLE test t3 42 12 30 6 0 0 0 6 0 15
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 30
@@ -743,11 +784,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=401;
update test.t2 set d=d+1 where a=401;
update test.t3 set d=d+1 where a=401;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 4
205 5 5 3
@@ -803,15 +844,12 @@ wait/lock/table/sql/handler 48 TABLE test t2
wait/lock/table/sql/handler 56 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -821,10 +859,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 40 16 24 8 0 0 0 8 0 0 12
-TABLE test t2 48 16 32 8 0 0 0 8 0 0 16
-TABLE test t3 56 16 40 8 0 0 0 8 0 0 20
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 40 16 24 8 0 0 0 8 0 12
+TABLE test t2 48 16 32 8 0 0 0 8 0 16
+TABLE test t3 56 16 40 8 0 0 0 8 0 20
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 40
@@ -885,15 +923,12 @@ wait/lock/table/sql/handler 52 TABLE test t2
wait/lock/table/sql/handler 60 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -903,10 +938,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -964,15 +999,12 @@ wait/lock/table/sql/handler 52 TABLE test t2
wait/lock/table/sql/handler 60 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -982,10 +1014,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1043,15 +1075,12 @@ wait/lock/table/sql/handler 52 TABLE test t2
wait/lock/table/sql/handler 60 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -1061,10 +1090,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1119,15 +1148,12 @@ wait/lock/table/sql/handler 52 TABLE test t2
wait/lock/table/sql/handler 60 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -1137,10 +1163,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1194,15 +1220,12 @@ wait/lock/table/sql/handler 52 TABLE test t2
wait/lock/table/sql/handler 60 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -1212,10 +1235,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1268,15 +1291,12 @@ wait/lock/table/sql/handler 52 TABLE test t2
wait/lock/table/sql/handler 60 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -1286,10 +1306,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1341,15 +1361,12 @@ wait/lock/table/sql/handler 52 TABLE test t2
wait/lock/table/sql/handler 60 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -1359,10 +1376,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1416,15 +1433,12 @@ wait/lock/table/sql/handler 52 TABLE test t2
wait/lock/table/sql/handler 60 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -1434,10 +1448,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1490,15 +1504,12 @@ wait/lock/table/sql/handler 52 TABLE test t2
wait/lock/table/sql/handler 60 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -1508,10 +1519,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1564,15 +1575,12 @@ wait/lock/table/sql/handler 52 TABLE test t2
wait/lock/table/sql/handler 60 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -1582,10 +1590,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1638,15 +1646,12 @@ wait/lock/table/sql/handler 52 TABLE test t2
wait/lock/table/sql/handler 60 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -1656,10 +1661,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1712,15 +1717,12 @@ wait/lock/table/sql/handler 52 TABLE test t2
wait/lock/table/sql/handler 60 TABLE test t3
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -1730,16 +1732,16 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-show status like "performance_schema%";
+show global status like "performance_schema%";
Variable_name Value
Performance_schema_accounts_lost 0
Performance_schema_cond_classes_lost 0
@@ -1749,9 +1751,15 @@ Performance_schema_file_classes_lost 0
Performance_schema_file_handles_lost 0
Performance_schema_file_instances_lost 0
Performance_schema_hosts_lost 0
+Performance_schema_index_stat_lost 0
Performance_schema_locker_lost 0
+Performance_schema_memory_classes_lost 0
+Performance_schema_metadata_lock_lost 0
Performance_schema_mutex_classes_lost 0
Performance_schema_mutex_instances_lost 0
+Performance_schema_nested_statement_lost 0
+Performance_schema_prepared_statements_lost 0
+Performance_schema_program_lost 0
Performance_schema_rwlock_classes_lost 0
Performance_schema_rwlock_instances_lost 0
Performance_schema_session_connect_attrs_lost 0
@@ -1761,6 +1769,7 @@ Performance_schema_stage_classes_lost 0
Performance_schema_statement_classes_lost 0
Performance_schema_table_handles_lost 0
Performance_schema_table_instances_lost 0
+Performance_schema_table_lock_stat_lost 0
Performance_schema_thread_classes_lost 0
Performance_schema_thread_instances_lost 0
Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_2t.result b/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_2t.result
index 8da7fca1d3e..eb1e66533d8 100644
--- a/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_2t.result
+++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_2t.result
@@ -8,9 +8,9 @@ delete from performance_schema.setup_objects
where object_name='t2';
select * from performance_schema.setup_actors
order by USER, HOST, ROLE;
-HOST USER ROLE
-localhost user1 %
-localhost user3 %
+HOST USER ROLE ENABLED HISTORY
+localhost user1 % YES YES
+localhost user3 % YES YES
select * from performance_schema.setup_objects
order by object_type, object_schema, object_name;
OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
@@ -24,6 +24,9 @@ events_stages_history_long NO
events_statements_current NO
events_statements_history NO
events_statements_history_long NO
+events_transactions_current NO
+events_transactions_history NO
+events_transactions_history_long NO
events_waits_current NO
events_waits_history NO
events_waits_history_long NO
@@ -67,28 +70,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -130,28 +125,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -182,15 +169,15 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=101;
update test.t2 set d=d+1 where a=101;
update test.t3 set d=d+1 where a=101;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 1
connection default;
-"================== Step 3 =================="
+"================== Step 3-A =================="
call dump_thread();
username event_name count_star
user1 wait/io/table/sql/handler 0
@@ -221,28 +208,74 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 10
+TABLE test t2 0
+TABLE test t3 14
+connection con1;
+flush tables;
+"================== con1 FLUSH =================="
+connection default;
+"================== Step 3-B =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 24
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 24
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 24
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 24
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 24
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 10
@@ -289,28 +322,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 10
@@ -347,11 +372,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=201;
update test.t2 set d=d+1 where a=201;
update test.t3 set d=d+1 where a=201;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 2
205 5 5 1
@@ -392,28 +417,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 10
@@ -465,28 +482,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 10
@@ -529,11 +538,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=301;
update test.t2 set d=d+1 where a=301;
update test.t3 set d=d+1 where a=301;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 3
205 5 5 2
@@ -580,28 +589,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 6
+TABLE test t3 28 8 20 4 0 0 0 4 0 10
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 20
@@ -658,28 +659,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 6
+TABLE test t3 28 8 20 4 0 0 0 4 0 10
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 20
@@ -728,11 +721,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=401;
update test.t2 set d=d+1 where a=401;
update test.t3 set d=d+1 where a=401;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 4
205 5 5 3
@@ -785,28 +778,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 6
+TABLE test t3 28 8 20 4 0 0 0 4 0 10
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 20
@@ -864,28 +849,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 24
@@ -940,28 +917,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 24
@@ -1016,28 +985,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 24
@@ -1089,28 +1050,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 24
@@ -1161,28 +1114,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 24
@@ -1232,28 +1177,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 24
@@ -1302,28 +1239,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 24
@@ -1374,28 +1303,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 24
@@ -1445,28 +1366,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 24
@@ -1516,28 +1429,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 24
@@ -1587,28 +1492,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 24
@@ -1658,34 +1555,26 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-show status like "performance_schema%";
+show global status like "performance_schema%";
Variable_name Value
Performance_schema_accounts_lost 0
Performance_schema_cond_classes_lost 0
@@ -1695,9 +1584,15 @@ Performance_schema_file_classes_lost 0
Performance_schema_file_handles_lost 0
Performance_schema_file_instances_lost 0
Performance_schema_hosts_lost 0
+Performance_schema_index_stat_lost 0
Performance_schema_locker_lost 0
+Performance_schema_memory_classes_lost 0
+Performance_schema_metadata_lock_lost 0
Performance_schema_mutex_classes_lost 0
Performance_schema_mutex_instances_lost 0
+Performance_schema_nested_statement_lost 0
+Performance_schema_prepared_statements_lost 0
+Performance_schema_program_lost 0
Performance_schema_rwlock_classes_lost 0
Performance_schema_rwlock_instances_lost 0
Performance_schema_session_connect_attrs_lost 0
@@ -1707,6 +1602,7 @@ Performance_schema_stage_classes_lost 0
Performance_schema_statement_classes_lost 0
Performance_schema_table_handles_lost 0
Performance_schema_table_instances_lost 0
+Performance_schema_table_lock_stat_lost 0
Performance_schema_thread_classes_lost 0
Performance_schema_thread_instances_lost 0
Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_3t.result b/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_3t.result
index 88f658778c4..17e3b901a3a 100644
--- a/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_3t.result
+++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_3t.result
@@ -6,9 +6,9 @@ delete from performance_schema.setup_actors
where user in ('user2', 'user4');
select * from performance_schema.setup_actors
order by USER, HOST, ROLE;
-HOST USER ROLE
-localhost user1 %
-localhost user3 %
+HOST USER ROLE ENABLED HISTORY
+localhost user1 % YES YES
+localhost user3 % YES YES
select * from performance_schema.setup_objects
order by object_type, object_schema, object_name;
OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
@@ -23,6 +23,9 @@ events_stages_history_long NO
events_statements_current NO
events_statements_history NO
events_statements_history_long NO
+events_transactions_current NO
+events_transactions_history NO
+events_transactions_history_long NO
events_waits_current NO
events_waits_history NO
events_waits_history_long NO
@@ -66,15 +69,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -84,10 +84,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -129,15 +129,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -147,10 +144,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -181,15 +178,15 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=101;
update test.t2 set d=d+1 where a=101;
update test.t3 set d=d+1 where a=101;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 1
connection default;
-"================== Step 3 =================="
+"================== Step 3-A =================="
call dump_thread();
username event_name count_star
user1 wait/io/table/sql/handler 0
@@ -220,15 +217,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -238,10 +232,69 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
-TABLE test t2 12 4 8 2 0 0 0 2 0 0 4
-TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t2 12 4 8 2 0 0 0 2 0 4
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 10
+TABLE test t2 12
+TABLE test t3 14
+connection con1;
+flush tables;
+"================== con1 FLUSH =================="
+connection default;
+"================== Step 3-B =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 36
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 36
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 36
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 36
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 36
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t2 12 4 8 2 0 0 0 2 0 4
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 10
@@ -288,15 +341,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -306,10 +356,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
-TABLE test t2 12 4 8 2 0 0 0 2 0 0 4
-TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t2 12 4 8 2 0 0 0 2 0 4
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 10
@@ -346,11 +396,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=201;
update test.t2 set d=d+1 where a=201;
update test.t3 set d=d+1 where a=201;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 2
205 5 5 1
@@ -391,15 +441,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -409,10 +456,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
-TABLE test t2 12 4 8 2 0 0 0 2 0 0 4
-TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t2 12 4 8 2 0 0 0 2 0 4
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 10
@@ -464,15 +511,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -482,10 +526,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
-TABLE test t2 12 4 8 2 0 0 0 2 0 0 4
-TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t2 12 4 8 2 0 0 0 2 0 4
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 10
@@ -528,11 +572,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=301;
update test.t2 set d=d+1 where a=301;
update test.t3 set d=d+1 where a=301;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 3
205 5 5 2
@@ -579,15 +623,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -597,10 +638,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
-TABLE test t2 24 8 16 4 0 0 0 4 0 0 8
-TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 6
+TABLE test t2 24 8 16 4 0 0 0 4 0 8
+TABLE test t3 28 8 20 4 0 0 0 4 0 10
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 20
@@ -657,15 +698,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -675,10 +713,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
-TABLE test t2 24 8 16 4 0 0 0 4 0 0 8
-TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 6
+TABLE test t2 24 8 16 4 0 0 0 4 0 8
+TABLE test t3 28 8 20 4 0 0 0 4 0 10
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 20
@@ -727,11 +765,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=401;
update test.t2 set d=d+1 where a=401;
update test.t3 set d=d+1 where a=401;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 4
205 5 5 3
@@ -784,15 +822,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -802,10 +837,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
-TABLE test t2 24 8 16 4 0 0 0 4 0 0 8
-TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 6
+TABLE test t2 24 8 16 4 0 0 0 4 0 8
+TABLE test t3 28 8 20 4 0 0 0 4 0 10
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 20
@@ -863,15 +898,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -881,10 +913,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 24
@@ -939,15 +971,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -957,10 +986,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 24
@@ -1015,15 +1044,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -1033,10 +1059,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 24
@@ -1088,15 +1114,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -1106,10 +1129,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 24
@@ -1160,15 +1183,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -1178,10 +1198,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 24
@@ -1231,15 +1251,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -1249,10 +1266,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 24
@@ -1301,15 +1318,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -1319,10 +1333,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 24
@@ -1373,15 +1387,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -1391,10 +1402,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 24
@@ -1444,15 +1455,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -1462,10 +1470,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 24
@@ -1515,15 +1523,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -1533,10 +1538,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 24
@@ -1586,15 +1591,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -1604,10 +1606,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
-TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
-TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 11
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 24
@@ -1657,15 +1659,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -1675,16 +1674,16 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-show status like "performance_schema%";
+show global status like "performance_schema%";
Variable_name Value
Performance_schema_accounts_lost 0
Performance_schema_cond_classes_lost 0
@@ -1694,9 +1693,15 @@ Performance_schema_file_classes_lost 0
Performance_schema_file_handles_lost 0
Performance_schema_file_instances_lost 0
Performance_schema_hosts_lost 0
+Performance_schema_index_stat_lost 0
Performance_schema_locker_lost 0
+Performance_schema_memory_classes_lost 0
+Performance_schema_metadata_lock_lost 0
Performance_schema_mutex_classes_lost 0
Performance_schema_mutex_instances_lost 0
+Performance_schema_nested_statement_lost 0
+Performance_schema_prepared_statements_lost 0
+Performance_schema_program_lost 0
Performance_schema_rwlock_classes_lost 0
Performance_schema_rwlock_instances_lost 0
Performance_schema_session_connect_attrs_lost 0
@@ -1706,6 +1711,7 @@ Performance_schema_stage_classes_lost 0
Performance_schema_statement_classes_lost 0
Performance_schema_table_handles_lost 0
Performance_schema_table_instances_lost 0
+Performance_schema_table_lock_stat_lost 0
Performance_schema_thread_classes_lost 0
Performance_schema_thread_instances_lost 0
Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_4u_2t.result b/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_4u_2t.result
index 72bc52cefa3..295dcadb28e 100644
--- a/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_4u_2t.result
+++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_4u_2t.result
@@ -6,11 +6,11 @@ delete from performance_schema.setup_objects
where object_name='t2';
select * from performance_schema.setup_actors
order by USER, HOST, ROLE;
-HOST USER ROLE
-localhost user1 %
-localhost user2 %
-localhost user3 %
-localhost user4 %
+HOST USER ROLE ENABLED HISTORY
+localhost user1 % YES YES
+localhost user2 % YES YES
+localhost user3 % YES YES
+localhost user4 % YES YES
select * from performance_schema.setup_objects
order by object_type, object_schema, object_name;
OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
@@ -24,6 +24,9 @@ events_stages_history_long NO
events_statements_current NO
events_statements_history NO
events_statements_history_long NO
+events_transactions_current NO
+events_transactions_history NO
+events_transactions_history_long NO
events_waits_current NO
events_waits_history NO
events_waits_history_long NO
@@ -67,28 +70,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -130,28 +125,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -182,15 +169,15 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=101;
update test.t2 set d=d+1 where a=101;
update test.t3 set d=d+1 where a=101;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 1
connection default;
-"================== Step 3 =================="
+"================== Step 3-A =================="
call dump_thread();
username event_name count_star
user1 wait/io/table/sql/handler 0
@@ -221,28 +208,74 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 10
+TABLE test t2 0
+TABLE test t3 14
+connection con1;
+flush tables;
+"================== con1 FLUSH =================="
+connection default;
+"================== Step 3-B =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 24
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 24
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 24
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 24
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 24
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 10
@@ -289,28 +322,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 10
@@ -347,11 +372,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=201;
update test.t2 set d=d+1 where a=201;
update test.t3 set d=d+1 where a=201;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 2
205 5 5 1
@@ -392,28 +417,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 6
+TABLE test t3 28 8 20 4 0 0 0 4 0 10
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 20
@@ -465,28 +482,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 6
+TABLE test t3 28 8 20 4 0 0 0 4 0 10
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 20
@@ -529,11 +538,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=301;
update test.t2 set d=d+1 where a=301;
update test.t3 set d=d+1 where a=301;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 3
205 5 5 2
@@ -580,28 +589,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 30 12 18 6 0 0 0 6 0 0 9
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 42 12 30 6 0 0 0 6 0 0 15
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 30 12 18 6 0 0 0 6 0 9
+TABLE test t3 42 12 30 6 0 0 0 6 0 15
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 30
@@ -658,28 +659,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 30 12 18 6 0 0 0 6 0 0 9
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 42 12 30 6 0 0 0 6 0 0 15
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 30 12 18 6 0 0 0 6 0 9
+TABLE test t3 42 12 30 6 0 0 0 6 0 15
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 30
@@ -728,11 +721,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=401;
update test.t2 set d=d+1 where a=401;
update test.t3 set d=d+1 where a=401;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 4
205 5 5 3
@@ -785,28 +778,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 40 16 24 8 0 0 0 8 0 0 12
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 56 16 40 8 0 0 0 8 0 0 20
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 40 16 24 8 0 0 0 8 0 12
+TABLE test t3 56 16 40 8 0 0 0 8 0 20
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 40
@@ -864,28 +849,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -940,28 +917,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1016,28 +985,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1089,28 +1050,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1161,28 +1114,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1232,28 +1177,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1302,28 +1239,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1374,28 +1303,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1445,28 +1366,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1516,28 +1429,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1587,28 +1492,20 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1658,34 +1555,26 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
-TABLE test t2 index_b 0 0 0 0 0 0 0
-TABLE test t2 index_cb 0 0 0 0 0 0 0
-TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
execute dump_waits_table_io;
object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
TABLE test t1 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-show status like "performance_schema%";
+show global status like "performance_schema%";
Variable_name Value
Performance_schema_accounts_lost 0
Performance_schema_cond_classes_lost 0
@@ -1695,9 +1584,15 @@ Performance_schema_file_classes_lost 0
Performance_schema_file_handles_lost 0
Performance_schema_file_instances_lost 0
Performance_schema_hosts_lost 0
+Performance_schema_index_stat_lost 0
Performance_schema_locker_lost 0
+Performance_schema_memory_classes_lost 0
+Performance_schema_metadata_lock_lost 0
Performance_schema_mutex_classes_lost 0
Performance_schema_mutex_instances_lost 0
+Performance_schema_nested_statement_lost 0
+Performance_schema_prepared_statements_lost 0
+Performance_schema_program_lost 0
Performance_schema_rwlock_classes_lost 0
Performance_schema_rwlock_instances_lost 0
Performance_schema_session_connect_attrs_lost 0
@@ -1707,6 +1602,7 @@ Performance_schema_stage_classes_lost 0
Performance_schema_statement_classes_lost 0
Performance_schema_table_handles_lost 0
Performance_schema_table_instances_lost 0
+Performance_schema_table_lock_stat_lost 0
Performance_schema_thread_classes_lost 0
Performance_schema_thread_instances_lost 0
Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_4u_3t.result b/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_4u_3t.result
index d2ee0bd6c5e..9d98d1f84d1 100644
--- a/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_4u_3t.result
+++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_4u_3t.result
@@ -4,11 +4,11 @@ update performance_schema.setup_consumers
set enabled='NO' where name like 'event%';
select * from performance_schema.setup_actors
order by USER, HOST, ROLE;
-HOST USER ROLE
-localhost user1 %
-localhost user2 %
-localhost user3 %
-localhost user4 %
+HOST USER ROLE ENABLED HISTORY
+localhost user1 % YES YES
+localhost user2 % YES YES
+localhost user3 % YES YES
+localhost user4 % YES YES
select * from performance_schema.setup_objects
order by object_type, object_schema, object_name;
OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
@@ -23,6 +23,9 @@ events_stages_history_long NO
events_statements_current NO
events_statements_history NO
events_statements_history_long NO
+events_transactions_current NO
+events_transactions_history NO
+events_transactions_history_long NO
events_waits_current NO
events_waits_history NO
events_waits_history_long NO
@@ -66,15 +69,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -84,10 +84,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -129,15 +129,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -147,10 +144,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
@@ -181,15 +178,15 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=101;
update test.t2 set d=d+1 where a=101;
update test.t3 set d=d+1 where a=101;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 1
connection default;
-"================== Step 3 =================="
+"================== Step 3-A =================="
call dump_thread();
username event_name count_star
user1 wait/io/table/sql/handler 0
@@ -220,15 +217,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -238,10 +232,69 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
-TABLE test t2 12 4 8 2 0 0 0 2 0 0 4
-TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t2 12 4 8 2 0 0 0 2 0 4
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 10
+TABLE test t2 12
+TABLE test t3 14
+connection con1;
+flush tables;
+"================== con1 FLUSH =================="
+connection default;
+"================== Step 3-B =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 36
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 36
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 36
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 36
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 36
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t2 12 4 8 2 0 0 0 2 0 4
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 10
@@ -288,15 +341,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -306,10 +356,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
-TABLE test t2 12 4 8 2 0 0 0 2 0 0 4
-TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 3
+TABLE test t2 12 4 8 2 0 0 0 2 0 4
+TABLE test t3 14 4 10 2 0 0 0 2 0 5
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 10
@@ -346,11 +396,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=201;
update test.t2 set d=d+1 where a=201;
update test.t3 set d=d+1 where a=201;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 2
205 5 5 1
@@ -391,15 +441,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -409,10 +456,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
-TABLE test t2 24 8 16 4 0 0 0 4 0 0 8
-TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 6
+TABLE test t2 24 8 16 4 0 0 0 4 0 8
+TABLE test t3 28 8 20 4 0 0 0 4 0 10
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 20
@@ -464,15 +511,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -482,10 +526,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
-TABLE test t2 24 8 16 4 0 0 0 4 0 0 8
-TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 6
+TABLE test t2 24 8 16 4 0 0 0 4 0 8
+TABLE test t3 28 8 20 4 0 0 0 4 0 10
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 20
@@ -528,11 +572,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=301;
update test.t2 set d=d+1 where a=301;
update test.t3 set d=d+1 where a=301;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 3
205 5 5 2
@@ -579,15 +623,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -597,10 +638,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 30 12 18 6 0 0 0 6 0 0 9
-TABLE test t2 36 12 24 6 0 0 0 6 0 0 12
-TABLE test t3 42 12 30 6 0 0 0 6 0 0 15
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 30 12 18 6 0 0 0 6 0 9
+TABLE test t2 36 12 24 6 0 0 0 6 0 12
+TABLE test t3 42 12 30 6 0 0 0 6 0 15
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 30
@@ -657,15 +698,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -675,10 +713,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 30 12 18 6 0 0 0 6 0 0 9
-TABLE test t2 36 12 24 6 0 0 0 6 0 0 12
-TABLE test t3 42 12 30 6 0 0 0 6 0 0 15
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 30 12 18 6 0 0 0 6 0 9
+TABLE test t2 36 12 24 6 0 0 0 6 0 12
+TABLE test t3 42 12 30 6 0 0 0 6 0 15
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 30
@@ -727,11 +765,11 @@ update test.t3 set d=d+1;
update test.t1 set d=d+1 where a=401;
update test.t2 set d=d+1 where a=401;
update test.t3 set d=d+1 where a=401;
-select * from test.t1 where b=5;
+select * from test.t1 force index(index_b) where b=5;
a b c d
-select * from test.t2 where b=5;
+select * from test.t2 force index(index_b) where b=5;
a b c d
-select * from test.t3 where b=5;
+select * from test.t3 force index(index_b) where b=5;
a b c d
105 5 5 4
205 5 5 3
@@ -784,15 +822,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -802,10 +837,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 40 16 24 8 0 0 0 8 0 0 12
-TABLE test t2 48 16 32 8 0 0 0 8 0 0 16
-TABLE test t3 56 16 40 8 0 0 0 8 0 0 20
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 40 16 24 8 0 0 0 8 0 12
+TABLE test t2 48 16 32 8 0 0 0 8 0 16
+TABLE test t3 56 16 40 8 0 0 0 8 0 20
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 40
@@ -863,15 +898,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -881,10 +913,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -939,15 +971,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -957,10 +986,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1015,15 +1044,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -1033,10 +1059,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1088,15 +1114,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -1106,10 +1129,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1160,15 +1183,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -1178,10 +1198,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1231,15 +1251,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -1249,10 +1266,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1301,15 +1318,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -1319,10 +1333,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1373,15 +1387,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -1391,10 +1402,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1444,15 +1455,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -1462,10 +1470,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1515,15 +1523,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -1533,10 +1538,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1586,15 +1591,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -1604,10 +1606,10 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
-TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
-TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 21
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 44
@@ -1657,15 +1659,12 @@ execute dump_waits_history;
event_name count(event_name) object_type object_schema object_name
execute dump_waits_index_io;
object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
-TABLE test t1 NULL 0 0 0 0 0 0 0
TABLE test t1 index_b 0 0 0 0 0 0 0
TABLE test t1 index_cb 0 0 0 0 0 0 0
TABLE test t1 PRIMARY 0 0 0 0 0 0 0
-TABLE test t2 NULL 0 0 0 0 0 0 0
TABLE test t2 index_b 0 0 0 0 0 0 0
TABLE test t2 index_cb 0 0 0 0 0 0 0
TABLE test t2 PRIMARY 0 0 0 0 0 0 0
-TABLE test t3 NULL 0 0 0 0 0 0 0
TABLE test t3 index_b 0 0 0 0 0 0 0
TABLE test t3 index_cb 0 0 0 0 0 0 0
TABLE test t3 PRIMARY 0 0 0 0 0 0 0
@@ -1675,16 +1674,16 @@ TABLE test t1 0 0 0 0 0 0 0
TABLE test t2 0 0 0 0 0 0 0
TABLE test t3 0 0 0 0 0 0 0
execute dump_waits_table_lock;
-object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
-TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
-TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0
execute dump_objects_summary;
object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-show status like "performance_schema%";
+show global status like "performance_schema%";
Variable_name Value
Performance_schema_accounts_lost 0
Performance_schema_cond_classes_lost 0
@@ -1694,9 +1693,15 @@ Performance_schema_file_classes_lost 0
Performance_schema_file_handles_lost 0
Performance_schema_file_instances_lost 0
Performance_schema_hosts_lost 0
+Performance_schema_index_stat_lost 0
Performance_schema_locker_lost 0
+Performance_schema_memory_classes_lost 0
+Performance_schema_metadata_lock_lost 0
Performance_schema_mutex_classes_lost 0
Performance_schema_mutex_instances_lost 0
+Performance_schema_nested_statement_lost 0
+Performance_schema_prepared_statements_lost 0
+Performance_schema_program_lost 0
Performance_schema_rwlock_classes_lost 0
Performance_schema_rwlock_instances_lost 0
Performance_schema_session_connect_attrs_lost 0
@@ -1706,6 +1711,7 @@ Performance_schema_stage_classes_lost 0
Performance_schema_statement_classes_lost 0
Performance_schema_table_handles_lost 0
Performance_schema_table_instances_lost 0
+Performance_schema_table_lock_stat_lost 0
Performance_schema_thread_classes_lost 0
Performance_schema_thread_instances_lost 0
Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/table_name.result b/mysql-test/suite/perfschema/r/table_name.result
index d6369ffc79e..1cca88baf2b 100644
--- a/mysql-test/suite/perfschema/r/table_name.result
+++ b/mysql-test/suite/perfschema/r/table_name.result
@@ -1,59 +1,63 @@
-
+#
#
# TEST 1: Normal tables prefixed with "#sql" and "sql".
#
USE test;
CREATE TABLE `#sql_1` (a int, b text);
INSERT INTO `#sql_1` VALUES(1,'one');
-
+#
CREATE TABLE `sql_1` (a int, b text);
INSERT INTO `sql_1` VALUES(1,'one');
-
+#
# Verify that the tables are treated as normal tables .
-
+#
SELECT object_type, object_schema, object_name
FROM performance_schema.objects_summary_global_by_type
-WHERE object_schema="test";
+WHERE object_schema="test"
+ORDER BY object_name;
object_type object_schema object_name
TABLE test #sql_1
TABLE test sql_1
-
+#
# Drop the tables, verify that the table objects are removed.
-
+#
DROP TABLE `#sql_1`;
DROP TABLE `sql_1`;
-
+#
SELECT object_type, object_schema, object_name
FROM performance_schema.objects_summary_global_by_type
-WHERE object_schema="test";
+WHERE object_schema="test"
+ORDER BY object_name;
object_type object_schema object_name
-
+#
#
# TEST 2: Temporary tables, no special prefix.
#
CREATE TEMPORARY TABLE sql_temp2_myisam (a int, b text) ENGINE=MYISAM;
INSERT INTO sql_temp2_myisam VALUES(1,'one');
-
+#
CREATE TEMPORARY TABLE sql_temp2_innodb (a int, b text) ENGINE=INNODB;
INSERT INTO sql_temp2_innodb VALUES(1,'one');
-
+#
# Confirm that the temporary tables are ignored.
-
+#
SELECT object_type, object_schema, object_name
FROM performance_schema.objects_summary_global_by_type
-WHERE object_schema="test";
+WHERE object_schema="test"
+ORDER BY object_name;
object_type object_schema object_name
-
+#
# Drop the tables, verify that the table objects are not created.
-
+#
DROP TABLE sql_temp2_myisam;
DROP TABLE sql_temp2_innodb;
-
+#
SELECT object_type, object_schema, object_name
FROM performance_schema.objects_summary_global_by_type
-WHERE object_schema="test";
+WHERE object_schema="test"
+ORDER BY object_name;
object_type object_schema object_name
-
+#
#
# TEST 3: Temporary tables with the "#sql" prefix.
#
@@ -62,73 +66,78 @@ CHECK TABLE `#sql_temp3_myisam`;
Table Op Msg_type Msg_text
test.#sql_temp3_myisam check status OK
INSERT INTO `#sql_temp3_myisam` VALUES(1,'one');
-
+#
CREATE TEMPORARY TABLE `#sql_temp3_innodb` (a int, b text) ENGINE=INNODB;
CHECK TABLE `#sql_temp3_innodb`;
Table Op Msg_type Msg_text
test.#sql_temp3_innodb check status OK
INSERT INTO `#sql_temp3_innodb` VALUES(1,'one');
-
+#
# Confirm that the temporary tables are ignored.
-
+#
SELECT object_type, object_schema, object_name
FROM performance_schema.objects_summary_global_by_type
-WHERE object_schema="test";
+WHERE object_schema="test"
+ORDER BY object_name;
object_type object_schema object_name
-
+#
# Drop the temporary tables.
-
+#
DROP TABLE `#sql_temp3_myisam`;
DROP TABLE `#sql_temp3_innodb`;
-
+#
# Confirm that the temporary tables are still ignored.
-
+#
SELECT object_type, object_schema, object_name
FROM performance_schema.objects_summary_global_by_type
-WHERE object_schema="test";
+WHERE object_schema="test"
+ORDER BY object_name;
object_type object_schema object_name
-
+#
#
# TEST 4: Special case: MyISAM temporary tables are recreated as non-temporary
# when they are truncated.
#
CREATE TEMPORARY TABLE `sql_temp4_myisam` (a int, b text) ENGINE=MYISAM;
INSERT INTO `sql_temp4_myisam` VALUES(1,'one');
-
+#
CREATE TEMPORARY TABLE `#sql_temp4_myisam` (a int, b text) ENGINE=MYISAM;
INSERT INTO `#sql_temp4_myisam` VALUES(1,'one');
-
+#
# Confirm that the MyISAM temporary tables are ignored.
-
+#
SELECT object_type, object_schema, object_name
FROM performance_schema.objects_summary_global_by_type
-WHERE object_schema="test";
+WHERE object_schema="test"
+ORDER BY object_name;
object_type object_schema object_name
-
+#
# Truncate the MyISAM temporary tables, forcing them to be recreated as non-temporary.
-
+#
TRUNCATE TABLE `sql_temp4_myisam`;
TRUNCATE TABLE `#sql_temp4_myisam`;
-
+#
# Confirm that the recreated MyISAM tables are still regarded as temporary and ignored.
-
+#
SELECT object_type, object_schema, object_name
FROM performance_schema.objects_summary_global_by_type
-WHERE object_schema="test";
+WHERE object_schema="test"
+ORDER BY object_name;
object_type object_schema object_name
-
+#
# Drop the recreated MyISAM tables;
-
+#
DROP TABLE `sql_temp4_myisam`;
DROP TABLE `#sql_temp4_myisam`;
-
+#
# Confirm that the recreated temporary tables are still ignored.
-
+#
SELECT object_type, object_schema, object_name
FROM performance_schema.objects_summary_global_by_type
-WHERE object_schema="test";
+WHERE object_schema="test"
+ORDER BY object_name;
object_type object_schema object_name
-
+#
#
# TEST 5: Generate temporary tables with ALTER MyISAM table.
#
@@ -136,21 +145,23 @@ USE test;
CREATE TABLE t1 (a int) ENGINE=MYISAM;
INSERT INTO t1 VALUES (1), (2), (3);
ALTER TABLE t1 ADD COLUMN (b int);
-
+#
# Confirm that the recreated temporary tables are still ignored.
-
+#
SELECT object_type, object_schema, object_name
FROM performance_schema.objects_summary_global_by_type
-WHERE object_schema="test";
+WHERE object_schema="test"
+ORDER BY object_name;
object_type object_schema object_name
-
+#
# Drop the MyISAM table
-
+#
DROP TABLE t1;
-
+#
# Confirm that no tables remain;
-
+#
SELECT object_type, object_schema, object_name
FROM performance_schema.objects_summary_global_by_type
-WHERE object_schema="test";
+WHERE object_schema="test"
+ORDER BY object_name;
object_type object_schema object_name
diff --git a/mysql-test/suite/perfschema/r/table_schema.result b/mysql-test/suite/perfschema/r/table_schema.result
index 4142c6b7acd..73232c95100 100644
--- a/mysql-test/suite/perfschema/r/table_schema.result
+++ b/mysql-test/suite/perfschema/r/table_schema.result
@@ -15,8 +15,10 @@ def performance_schema events_stages_current SOURCE 5 NULL YES varchar 64 192 NU
def performance_schema events_stages_current TIMER_START 6 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references Value in picoseconds when the event timing started or NULL if timing is not collected. NEVER NULL
def performance_schema events_stages_current TIMER_END 7 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references Value in picoseconds when the event timing ended, or NULL if the event has not ended or timing is not collected. NEVER NULL
def performance_schema events_stages_current TIMER_WAIT 8 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references Value in picoseconds of the event's duration or NULL if the event has not ended or timing is not collected. NEVER NULL
-def performance_schema events_stages_current NESTING_EVENT_ID 9 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references EVENT_ID of event within which this event nests. NEVER NULL
-def performance_schema events_stages_current NESTING_EVENT_TYPE 10 NULL YES enum 9 27 NULL NULL NULL utf8 utf8_general_ci enum('STATEMENT','STAGE','WAIT') select,insert,update,references Nesting event type. Either statement, stage or wait. NEVER NULL
+def performance_schema events_stages_current WORK_COMPLETED 9 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_stages_current WORK_ESTIMATED 10 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_stages_current NESTING_EVENT_ID 11 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references EVENT_ID of event within which this event nests. NEVER NULL
+def performance_schema events_stages_current NESTING_EVENT_TYPE 12 NULL YES enum 11 33 NULL NULL NULL utf8 utf8_general_ci enum('TRANSACTION','STATEMENT','STAGE','WAIT') select,insert,update,references Nesting event type. Either statement, stage or wait. NEVER NULL
def performance_schema events_stages_history THREAD_ID 1 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references Thread associated with the event. Together with EVENT_ID uniquely identifies the row. NEVER NULL
def performance_schema events_stages_history EVENT_ID 2 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references Thread's current event number at the start of the event. Together with THREAD_ID uniquely identifies the row. NEVER NULL
def performance_schema events_stages_history END_EVENT_ID 3 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NULL when the event starts, set to the thread's current event number at the end of the event. NEVER NULL
@@ -25,8 +27,10 @@ def performance_schema events_stages_history SOURCE 5 NULL YES varchar 64 192 NU
def performance_schema events_stages_history TIMER_START 6 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references Value in picoseconds when the event timing started or NULL if timing is not collected. NEVER NULL
def performance_schema events_stages_history TIMER_END 7 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references Value in picoseconds when the event timing ended, or NULL if the event has not ended or timing is not collected. NEVER NULL
def performance_schema events_stages_history TIMER_WAIT 8 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references Value in picoseconds of the event's duration or NULL if the event has not ended or timing is not collected. NEVER NULL
-def performance_schema events_stages_history NESTING_EVENT_ID 9 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references EVENT_ID of event within which this event nests. NEVER NULL
-def performance_schema events_stages_history NESTING_EVENT_TYPE 10 NULL YES enum 9 27 NULL NULL NULL utf8 utf8_general_ci enum('STATEMENT','STAGE','WAIT') select,insert,update,references Nesting event type. Either statement, stage or wait. NEVER NULL
+def performance_schema events_stages_history WORK_COMPLETED 9 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_stages_history WORK_ESTIMATED 10 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_stages_history NESTING_EVENT_ID 11 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references EVENT_ID of event within which this event nests. NEVER NULL
+def performance_schema events_stages_history NESTING_EVENT_TYPE 12 NULL YES enum 11 33 NULL NULL NULL utf8 utf8_general_ci enum('TRANSACTION','STATEMENT','STAGE','WAIT') select,insert,update,references Nesting event type. Either statement, stage or wait. NEVER NULL
def performance_schema events_stages_history_long THREAD_ID 1 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references Thread associated with the event. Together with EVENT_ID uniquely identifies the row. NEVER NULL
def performance_schema events_stages_history_long EVENT_ID 2 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references Thread's current event number at the start of the event. Together with THREAD_ID uniquely identifies the row. NEVER NULL
def performance_schema events_stages_history_long END_EVENT_ID 3 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NULL when the event starts, set to the thread's current event number at the end of the event. NEVER NULL
@@ -35,8 +39,10 @@ def performance_schema events_stages_history_long SOURCE 5 NULL YES varchar 64 1
def performance_schema events_stages_history_long TIMER_START 6 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references Value in picoseconds when the event timing started or NULL if timing is not collected. NEVER NULL
def performance_schema events_stages_history_long TIMER_END 7 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references Value in picoseconds when the event timing ended, or NULL if the event has not ended or timing is not collected. NEVER NULL
def performance_schema events_stages_history_long TIMER_WAIT 8 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references Value in picoseconds of the event's duration or NULL if the event has not ended or timing is not collected. NEVER NULL
-def performance_schema events_stages_history_long NESTING_EVENT_ID 9 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references EVENT_ID of event within which this event nests. NEVER NULL
-def performance_schema events_stages_history_long NESTING_EVENT_TYPE 10 NULL YES enum 9 27 NULL NULL NULL utf8 utf8_general_ci enum('STATEMENT','STAGE','WAIT') select,insert,update,references Nesting event type. Either statement, stage or wait. NEVER NULL
+def performance_schema events_stages_history_long WORK_COMPLETED 9 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_stages_history_long WORK_ESTIMATED 10 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_stages_history_long NESTING_EVENT_ID 11 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references EVENT_ID of event within which this event nests. NEVER NULL
+def performance_schema events_stages_history_long NESTING_EVENT_TYPE 12 NULL YES enum 11 33 NULL NULL NULL utf8 utf8_general_ci enum('TRANSACTION','STATEMENT','STAGE','WAIT') select,insert,update,references Nesting event type. Either statement, stage or wait. NEVER NULL
def performance_schema events_stages_summary_by_account_by_event_name USER 1 NULL YES char 128 384 NULL NULL NULL utf8 utf8_bin char(128) select,insert,update,references User. Used together with HOST and EVENT_NAME for grouping events. NEVER NULL
def performance_schema events_stages_summary_by_account_by_event_name HOST 2 NULL YES char 60 180 NULL NULL NULL utf8 utf8_bin char(60) select,insert,update,references Host. Used together with USER and EVENT_NAME for grouping events. NEVER NULL
def performance_schema events_stages_summary_by_account_by_event_name EVENT_NAME 3 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references Event name. Used together with USER and HOST for grouping events. NEVER NULL
@@ -111,7 +117,8 @@ def performance_schema events_statements_current SORT_SCAN 36 NULL NO bigint NUL
def performance_schema events_statements_current NO_INDEX_USED 37 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references 0 if the statement performed a table scan with an index, 1 if without an index. NEVER NULL
def performance_schema events_statements_current NO_GOOD_INDEX_USED 38 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references 0 if a good index was found for the statement, 1 if no good index was found. See the Range checked for each record description in the EXPLAIN article. NEVER NULL
def performance_schema events_statements_current NESTING_EVENT_ID 39 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references Reserved, currently NULL. NEVER NULL
-def performance_schema events_statements_current NESTING_EVENT_TYPE 40 NULL YES enum 9 27 NULL NULL NULL utf8 utf8_general_ci enum('STATEMENT','STAGE','WAIT') select,insert,update,references Reserved, currently NULL. NEVER NULL
+def performance_schema events_statements_current NESTING_EVENT_TYPE 40 NULL YES enum 11 33 NULL NULL NULL utf8 utf8_general_ci enum('TRANSACTION','STATEMENT','STAGE','WAIT') select,insert,update,references Reserved, currently NULL. NEVER NULL
+def performance_schema events_statements_current NESTING_EVENT_LEVEL 41 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
def performance_schema events_statements_history THREAD_ID 1 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references Thread associated with the event. Together with EVENT_ID uniquely identifies the row. NEVER NULL
def performance_schema events_statements_history EVENT_ID 2 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references Thread's current event number at the start of the event. Together with THREAD_ID uniquely identifies the row. NEVER NULL
def performance_schema events_statements_history END_EVENT_ID 3 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NULL when the event starts, set to the thread's current event number at the end of the event. NEVER NULL
@@ -151,7 +158,8 @@ def performance_schema events_statements_history SORT_SCAN 36 NULL NO bigint NUL
def performance_schema events_statements_history NO_INDEX_USED 37 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references 0 if the statement performed a table scan with an index, 1 if without an index. NEVER NULL
def performance_schema events_statements_history NO_GOOD_INDEX_USED 38 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references 0 if a good index was found for the statement, 1 if no good index was found. See the Range checked for each record description in the EXPLAIN article. NEVER NULL
def performance_schema events_statements_history NESTING_EVENT_ID 39 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references Reserved, currently NULL. NEVER NULL
-def performance_schema events_statements_history NESTING_EVENT_TYPE 40 NULL YES enum 9 27 NULL NULL NULL utf8 utf8_general_ci enum('STATEMENT','STAGE','WAIT') select,insert,update,references Reserved, currently NULL. NEVER NULL
+def performance_schema events_statements_history NESTING_EVENT_TYPE 40 NULL YES enum 11 33 NULL NULL NULL utf8 utf8_general_ci enum('TRANSACTION','STATEMENT','STAGE','WAIT') select,insert,update,references Reserved, currently NULL. NEVER NULL
+def performance_schema events_statements_history NESTING_EVENT_LEVEL 41 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
def performance_schema events_statements_history_long THREAD_ID 1 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references Thread associated with the event. Together with EVENT_ID uniquely identifies the row. NEVER NULL
def performance_schema events_statements_history_long EVENT_ID 2 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references Thread's current event number at the start of the event. Together with THREAD_ID uniquely identifies the row. NEVER NULL
def performance_schema events_statements_history_long END_EVENT_ID 3 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NULL when the event starts, set to the thread's current event number at the end of the event. NEVER NULL
@@ -191,7 +199,8 @@ def performance_schema events_statements_history_long SORT_SCAN 36 NULL NO bigin
def performance_schema events_statements_history_long NO_INDEX_USED 37 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references 0 if the statement performed a table scan with an index, 1 if without an index. NEVER NULL
def performance_schema events_statements_history_long NO_GOOD_INDEX_USED 38 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references 0 if a good index was found for the statement, 1 if no good index was found. See the Range checked for each record description in the EXPLAIN article. NEVER NULL
def performance_schema events_statements_history_long NESTING_EVENT_ID 39 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references Reserved, currently NULL. NEVER NULL
-def performance_schema events_statements_history_long NESTING_EVENT_TYPE 40 NULL YES enum 9 27 NULL NULL NULL utf8 utf8_general_ci enum('STATEMENT','STAGE','WAIT') select,insert,update,references Reserved, currently NULL. NEVER NULL
+def performance_schema events_statements_history_long NESTING_EVENT_TYPE 40 NULL YES enum 11 33 NULL NULL NULL utf8 utf8_general_ci enum('TRANSACTION','STATEMENT','STAGE','WAIT') select,insert,update,references Reserved, currently NULL. NEVER NULL
+def performance_schema events_statements_history_long NESTING_EVENT_LEVEL 41 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
def performance_schema events_statements_summary_by_account_by_event_name USER 1 NULL YES char 128 384 NULL NULL NULL utf8 utf8_bin char(128) select,insert,update,references User. Used together with HOST and EVENT_NAME for grouping events. NEVER NULL
def performance_schema events_statements_summary_by_account_by_event_name HOST 2 NULL YES char 60 180 NULL NULL NULL utf8 utf8_bin char(60) select,insert,update,references Host. Used together with USER and EVENT_NAME for grouping events. NEVER NULL
def performance_schema events_statements_summary_by_account_by_event_name EVENT_NAME 3 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references Event name. Used together with USER and HOST for grouping events. NEVER NULL
@@ -274,6 +283,38 @@ def performance_schema events_statements_summary_by_host_by_event_name SUM_SORT_
def performance_schema events_statements_summary_by_host_by_event_name SUM_SORT_SCAN 24 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references Sum of the SORT_SCAN column in the events_statements_current table. NEVER NULL
def performance_schema events_statements_summary_by_host_by_event_name SUM_NO_INDEX_USED 25 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references Sum of the NO_INDEX_USED column in the events_statements_current table. NEVER NULL
def performance_schema events_statements_summary_by_host_by_event_name SUM_NO_GOOD_INDEX_USED 26 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references Sum of the NO_GOOD_INDEX_USED column in the events_statements_current table. NEVER NULL
+def performance_schema events_statements_summary_by_program OBJECT_TYPE 1 NULL YES enum 9 27 NULL NULL NULL utf8 utf8_general_ci enum('EVENT','FUNCTION','PROCEDURE','TABLE','TRIGGER') select,insert,update,references NEVER NULL
+def performance_schema events_statements_summary_by_program OBJECT_SCHEMA 2 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references NEVER NULL
+def performance_schema events_statements_summary_by_program OBJECT_NAME 3 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references NEVER NULL
+def performance_schema events_statements_summary_by_program COUNT_STAR 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_statements_summary_by_program SUM_TIMER_WAIT 5 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_statements_summary_by_program MIN_TIMER_WAIT 6 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_statements_summary_by_program AVG_TIMER_WAIT 7 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_statements_summary_by_program MAX_TIMER_WAIT 8 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_statements_summary_by_program COUNT_STATEMENTS 9 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_statements_summary_by_program SUM_STATEMENTS_WAIT 10 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_statements_summary_by_program MIN_STATEMENTS_WAIT 11 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_statements_summary_by_program AVG_STATEMENTS_WAIT 12 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_statements_summary_by_program MAX_STATEMENTS_WAIT 13 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_statements_summary_by_program SUM_LOCK_TIME 14 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_statements_summary_by_program SUM_ERRORS 15 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_statements_summary_by_program SUM_WARNINGS 16 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_statements_summary_by_program SUM_ROWS_AFFECTED 17 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_statements_summary_by_program SUM_ROWS_SENT 18 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_statements_summary_by_program SUM_ROWS_EXAMINED 19 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_statements_summary_by_program SUM_CREATED_TMP_DISK_TABLES 20 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_statements_summary_by_program SUM_CREATED_TMP_TABLES 21 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_statements_summary_by_program SUM_SELECT_FULL_JOIN 22 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_statements_summary_by_program SUM_SELECT_FULL_RANGE_JOIN 23 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_statements_summary_by_program SUM_SELECT_RANGE 24 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_statements_summary_by_program SUM_SELECT_RANGE_CHECK 25 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_statements_summary_by_program SUM_SELECT_SCAN 26 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_statements_summary_by_program SUM_SORT_MERGE_PASSES 27 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_statements_summary_by_program SUM_SORT_RANGE 28 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_statements_summary_by_program SUM_SORT_ROWS 29 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_statements_summary_by_program SUM_SORT_SCAN 30 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_statements_summary_by_program SUM_NO_INDEX_USED 31 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_statements_summary_by_program SUM_NO_GOOD_INDEX_USED 32 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
def performance_schema events_statements_summary_by_thread_by_event_name THREAD_ID 1 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references Thread associated with the event. Together with EVENT_NAME uniquely identifies the row. NEVER NULL
def performance_schema events_statements_summary_by_thread_by_event_name EVENT_NAME 2 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references Event name. Used together with THREAD_ID for grouping events. NEVER NULL
def performance_schema events_statements_summary_by_thread_by_event_name COUNT_STAR 3 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references Number of summarized events NEVER NULL
@@ -351,6 +392,163 @@ def performance_schema events_statements_summary_global_by_event_name SUM_SORT_R
def performance_schema events_statements_summary_global_by_event_name SUM_SORT_SCAN 23 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references Sum of the SORT_SCAN column in the events_statements_current table. NEVER NULL
def performance_schema events_statements_summary_global_by_event_name SUM_NO_INDEX_USED 24 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references Sum of the NO_INDEX_USED column in the events_statements_current table. NEVER NULL
def performance_schema events_statements_summary_global_by_event_name SUM_NO_GOOD_INDEX_USED 25 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references Sum of the NO_GOOD_INDEX_USED column in the events_statements_current table. NEVER NULL
+def performance_schema events_transactions_current THREAD_ID 1 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_current EVENT_ID 2 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_current END_EVENT_ID 3 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_current EVENT_NAME 4 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references NEVER NULL
+def performance_schema events_transactions_current STATE 5 NULL YES enum 11 33 NULL NULL NULL utf8 utf8_general_ci enum('ACTIVE','COMMITTED','ROLLED BACK') select,insert,update,references NEVER NULL
+def performance_schema events_transactions_current TRX_ID 6 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_current GTID 7 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references NEVER NULL
+def performance_schema events_transactions_current XID_FORMAT_ID 8 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
+def performance_schema events_transactions_current XID_GTRID 9 NULL YES varchar 130 390 NULL NULL NULL utf8 utf8_general_ci varchar(130) select,insert,update,references NEVER NULL
+def performance_schema events_transactions_current XID_BQUAL 10 NULL YES varchar 130 390 NULL NULL NULL utf8 utf8_general_ci varchar(130) select,insert,update,references NEVER NULL
+def performance_schema events_transactions_current XA_STATE 11 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references NEVER NULL
+def performance_schema events_transactions_current SOURCE 12 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references NEVER NULL
+def performance_schema events_transactions_current TIMER_START 13 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_current TIMER_END 14 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_current TIMER_WAIT 15 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_current ACCESS_MODE 16 NULL YES enum 10 30 NULL NULL NULL utf8 utf8_general_ci enum('READ ONLY','READ WRITE') select,insert,update,references NEVER NULL
+def performance_schema events_transactions_current ISOLATION_LEVEL 17 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references NEVER NULL
+def performance_schema events_transactions_current AUTOCOMMIT 18 NULL NO enum 3 9 NULL NULL NULL utf8 utf8_general_ci enum('YES','NO') select,insert,update,references NEVER NULL
+def performance_schema events_transactions_current NUMBER_OF_SAVEPOINTS 19 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_current NUMBER_OF_ROLLBACK_TO_SAVEPOINT 20 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_current NUMBER_OF_RELEASE_SAVEPOINT 21 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_current OBJECT_INSTANCE_BEGIN 22 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_current NESTING_EVENT_ID 23 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_current NESTING_EVENT_TYPE 24 NULL YES enum 11 33 NULL NULL NULL utf8 utf8_general_ci enum('TRANSACTION','STATEMENT','STAGE','WAIT') select,insert,update,references NEVER NULL
+def performance_schema events_transactions_history THREAD_ID 1 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_history EVENT_ID 2 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_history END_EVENT_ID 3 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_history EVENT_NAME 4 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references NEVER NULL
+def performance_schema events_transactions_history STATE 5 NULL YES enum 11 33 NULL NULL NULL utf8 utf8_general_ci enum('ACTIVE','COMMITTED','ROLLED BACK') select,insert,update,references NEVER NULL
+def performance_schema events_transactions_history TRX_ID 6 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_history GTID 7 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references NEVER NULL
+def performance_schema events_transactions_history XID_FORMAT_ID 8 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
+def performance_schema events_transactions_history XID_GTRID 9 NULL YES varchar 130 390 NULL NULL NULL utf8 utf8_general_ci varchar(130) select,insert,update,references NEVER NULL
+def performance_schema events_transactions_history XID_BQUAL 10 NULL YES varchar 130 390 NULL NULL NULL utf8 utf8_general_ci varchar(130) select,insert,update,references NEVER NULL
+def performance_schema events_transactions_history XA_STATE 11 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references NEVER NULL
+def performance_schema events_transactions_history SOURCE 12 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references NEVER NULL
+def performance_schema events_transactions_history TIMER_START 13 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_history TIMER_END 14 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_history TIMER_WAIT 15 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_history ACCESS_MODE 16 NULL YES enum 10 30 NULL NULL NULL utf8 utf8_general_ci enum('READ ONLY','READ WRITE') select,insert,update,references NEVER NULL
+def performance_schema events_transactions_history ISOLATION_LEVEL 17 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references NEVER NULL
+def performance_schema events_transactions_history AUTOCOMMIT 18 NULL NO enum 3 9 NULL NULL NULL utf8 utf8_general_ci enum('YES','NO') select,insert,update,references NEVER NULL
+def performance_schema events_transactions_history NUMBER_OF_SAVEPOINTS 19 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_history NUMBER_OF_ROLLBACK_TO_SAVEPOINT 20 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_history NUMBER_OF_RELEASE_SAVEPOINT 21 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_history OBJECT_INSTANCE_BEGIN 22 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_history NESTING_EVENT_ID 23 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_history NESTING_EVENT_TYPE 24 NULL YES enum 11 33 NULL NULL NULL utf8 utf8_general_ci enum('TRANSACTION','STATEMENT','STAGE','WAIT') select,insert,update,references NEVER NULL
+def performance_schema events_transactions_history_long THREAD_ID 1 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_history_long EVENT_ID 2 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_history_long END_EVENT_ID 3 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_history_long EVENT_NAME 4 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references NEVER NULL
+def performance_schema events_transactions_history_long STATE 5 NULL YES enum 11 33 NULL NULL NULL utf8 utf8_general_ci enum('ACTIVE','COMMITTED','ROLLED BACK') select,insert,update,references NEVER NULL
+def performance_schema events_transactions_history_long TRX_ID 6 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_history_long GTID 7 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references NEVER NULL
+def performance_schema events_transactions_history_long XID_FORMAT_ID 8 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
+def performance_schema events_transactions_history_long XID_GTRID 9 NULL YES varchar 130 390 NULL NULL NULL utf8 utf8_general_ci varchar(130) select,insert,update,references NEVER NULL
+def performance_schema events_transactions_history_long XID_BQUAL 10 NULL YES varchar 130 390 NULL NULL NULL utf8 utf8_general_ci varchar(130) select,insert,update,references NEVER NULL
+def performance_schema events_transactions_history_long XA_STATE 11 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references NEVER NULL
+def performance_schema events_transactions_history_long SOURCE 12 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references NEVER NULL
+def performance_schema events_transactions_history_long TIMER_START 13 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_history_long TIMER_END 14 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_history_long TIMER_WAIT 15 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_history_long ACCESS_MODE 16 NULL YES enum 10 30 NULL NULL NULL utf8 utf8_general_ci enum('READ ONLY','READ WRITE') select,insert,update,references NEVER NULL
+def performance_schema events_transactions_history_long ISOLATION_LEVEL 17 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references NEVER NULL
+def performance_schema events_transactions_history_long AUTOCOMMIT 18 NULL NO enum 3 9 NULL NULL NULL utf8 utf8_general_ci enum('YES','NO') select,insert,update,references NEVER NULL
+def performance_schema events_transactions_history_long NUMBER_OF_SAVEPOINTS 19 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_history_long NUMBER_OF_ROLLBACK_TO_SAVEPOINT 20 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_history_long NUMBER_OF_RELEASE_SAVEPOINT 21 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_history_long OBJECT_INSTANCE_BEGIN 22 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_history_long NESTING_EVENT_ID 23 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_history_long NESTING_EVENT_TYPE 24 NULL YES enum 11 33 NULL NULL NULL utf8 utf8_general_ci enum('TRANSACTION','STATEMENT','STAGE','WAIT') select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_by_account_by_event_name USER 1 NULL YES char 32 96 NULL NULL NULL utf8 utf8_bin char(32) select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_by_account_by_event_name HOST 2 NULL YES char 60 180 NULL NULL NULL utf8 utf8_bin char(60) select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_by_account_by_event_name EVENT_NAME 3 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_by_account_by_event_name COUNT_STAR 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_by_account_by_event_name SUM_TIMER_WAIT 5 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_by_account_by_event_name MIN_TIMER_WAIT 6 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_by_account_by_event_name AVG_TIMER_WAIT 7 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_by_account_by_event_name MAX_TIMER_WAIT 8 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_by_account_by_event_name COUNT_READ_WRITE 9 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_by_account_by_event_name SUM_TIMER_READ_WRITE 10 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_by_account_by_event_name MIN_TIMER_READ_WRITE 11 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_by_account_by_event_name AVG_TIMER_READ_WRITE 12 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_by_account_by_event_name MAX_TIMER_READ_WRITE 13 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_by_account_by_event_name COUNT_READ_ONLY 14 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_by_account_by_event_name SUM_TIMER_READ_ONLY 15 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_by_account_by_event_name MIN_TIMER_READ_ONLY 16 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_by_account_by_event_name AVG_TIMER_READ_ONLY 17 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_by_account_by_event_name MAX_TIMER_READ_ONLY 18 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_by_host_by_event_name HOST 1 NULL YES char 60 180 NULL NULL NULL utf8 utf8_bin char(60) select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_by_host_by_event_name EVENT_NAME 2 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_by_host_by_event_name COUNT_STAR 3 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_by_host_by_event_name SUM_TIMER_WAIT 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_by_host_by_event_name MIN_TIMER_WAIT 5 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_by_host_by_event_name AVG_TIMER_WAIT 6 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_by_host_by_event_name MAX_TIMER_WAIT 7 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_by_host_by_event_name COUNT_READ_WRITE 8 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_by_host_by_event_name SUM_TIMER_READ_WRITE 9 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_by_host_by_event_name MIN_TIMER_READ_WRITE 10 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_by_host_by_event_name AVG_TIMER_READ_WRITE 11 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_by_host_by_event_name MAX_TIMER_READ_WRITE 12 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_by_host_by_event_name COUNT_READ_ONLY 13 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_by_host_by_event_name SUM_TIMER_READ_ONLY 14 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_by_host_by_event_name MIN_TIMER_READ_ONLY 15 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_by_host_by_event_name AVG_TIMER_READ_ONLY 16 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_by_host_by_event_name MAX_TIMER_READ_ONLY 17 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_by_thread_by_event_name THREAD_ID 1 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_by_thread_by_event_name EVENT_NAME 2 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_by_thread_by_event_name COUNT_STAR 3 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_by_thread_by_event_name SUM_TIMER_WAIT 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_by_thread_by_event_name MIN_TIMER_WAIT 5 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_by_thread_by_event_name AVG_TIMER_WAIT 6 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_by_thread_by_event_name MAX_TIMER_WAIT 7 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_by_thread_by_event_name COUNT_READ_WRITE 8 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_by_thread_by_event_name SUM_TIMER_READ_WRITE 9 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_by_thread_by_event_name MIN_TIMER_READ_WRITE 10 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_by_thread_by_event_name AVG_TIMER_READ_WRITE 11 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_by_thread_by_event_name MAX_TIMER_READ_WRITE 12 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_by_thread_by_event_name COUNT_READ_ONLY 13 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_by_thread_by_event_name SUM_TIMER_READ_ONLY 14 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_by_thread_by_event_name MIN_TIMER_READ_ONLY 15 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_by_thread_by_event_name AVG_TIMER_READ_ONLY 16 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_by_thread_by_event_name MAX_TIMER_READ_ONLY 17 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_by_user_by_event_name USER 1 NULL YES char 32 96 NULL NULL NULL utf8 utf8_bin char(32) select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_by_user_by_event_name EVENT_NAME 2 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_by_user_by_event_name COUNT_STAR 3 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_by_user_by_event_name SUM_TIMER_WAIT 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_by_user_by_event_name MIN_TIMER_WAIT 5 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_by_user_by_event_name AVG_TIMER_WAIT 6 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_by_user_by_event_name MAX_TIMER_WAIT 7 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_by_user_by_event_name COUNT_READ_WRITE 8 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_by_user_by_event_name SUM_TIMER_READ_WRITE 9 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_by_user_by_event_name MIN_TIMER_READ_WRITE 10 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_by_user_by_event_name AVG_TIMER_READ_WRITE 11 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_by_user_by_event_name MAX_TIMER_READ_WRITE 12 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_by_user_by_event_name COUNT_READ_ONLY 13 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_by_user_by_event_name SUM_TIMER_READ_ONLY 14 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_by_user_by_event_name MIN_TIMER_READ_ONLY 15 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_by_user_by_event_name AVG_TIMER_READ_ONLY 16 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_by_user_by_event_name MAX_TIMER_READ_ONLY 17 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_global_by_event_name EVENT_NAME 1 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_global_by_event_name COUNT_STAR 2 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_global_by_event_name SUM_TIMER_WAIT 3 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_global_by_event_name MIN_TIMER_WAIT 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_global_by_event_name AVG_TIMER_WAIT 5 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_global_by_event_name MAX_TIMER_WAIT 6 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_global_by_event_name COUNT_READ_WRITE 7 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_global_by_event_name SUM_TIMER_READ_WRITE 8 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_global_by_event_name MIN_TIMER_READ_WRITE 9 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_global_by_event_name AVG_TIMER_READ_WRITE 10 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_global_by_event_name MAX_TIMER_READ_WRITE 11 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_global_by_event_name COUNT_READ_ONLY 12 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_global_by_event_name SUM_TIMER_READ_ONLY 13 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_global_by_event_name MIN_TIMER_READ_ONLY 14 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_global_by_event_name AVG_TIMER_READ_ONLY 15 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema events_transactions_summary_global_by_event_name MAX_TIMER_READ_ONLY 16 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
def performance_schema events_waits_current THREAD_ID 1 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references Thread associated with the event. Together with EVENT_ID uniquely identifies the row. NEVER NULL
def performance_schema events_waits_current EVENT_ID 2 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references Thread's current event number at the start of the event. Together with THREAD_ID uniquely identifies the row. NEVER NULL
def performance_schema events_waits_current END_EVENT_ID 3 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NULL when the event starts, set to the thread's current event number at the end of the event. NEVER NULL
@@ -366,7 +564,7 @@ def performance_schema events_waits_current INDEX_NAME 12 NULL YES varchar 64 19
def performance_schema events_waits_current OBJECT_TYPE 13 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references FILE for a file object, TABLE or TEMPORARY TABLE for a table object, or NULL for a synchronization object. NEVER NULL
def performance_schema events_waits_current OBJECT_INSTANCE_BEGIN 14 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references Address in memory of the object. NEVER NULL
def performance_schema events_waits_current NESTING_EVENT_ID 15 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references EVENT_ID of event within which this event nests. NEVER NULL
-def performance_schema events_waits_current NESTING_EVENT_TYPE 16 NULL YES enum 9 27 NULL NULL NULL utf8 utf8_general_ci enum('STATEMENT','STAGE','WAIT') select,insert,update,references Nesting event type. Either statement, stage or wait. NEVER NULL
+def performance_schema events_waits_current NESTING_EVENT_TYPE 16 NULL YES enum 11 33 NULL NULL NULL utf8 utf8_general_ci enum('TRANSACTION','STATEMENT','STAGE','WAIT') select,insert,update,references Nesting event type. Either statement, stage or wait. NEVER NULL
def performance_schema events_waits_current OPERATION 17 NULL NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select,insert,update,references Operation type, for example read, write or lock NEVER NULL
def performance_schema events_waits_current NUMBER_OF_BYTES 18 NULL YES bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references Number of bytes that the operation read or wrote, or NULL for table I/O waits. NEVER NULL
def performance_schema events_waits_current FLAGS 19 NULL YES int NULL NULL 10 0 NULL NULL NULL int(10) unsigned select,insert,update,references Reserved for use in the future. NEVER NULL
@@ -385,7 +583,7 @@ def performance_schema events_waits_history INDEX_NAME 12 NULL YES varchar 64 19
def performance_schema events_waits_history OBJECT_TYPE 13 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references FILE for a file object, TABLE or TEMPORARY TABLE for a table object, or NULL for a synchronization object. NEVER NULL
def performance_schema events_waits_history OBJECT_INSTANCE_BEGIN 14 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references Address in memory of the object. NEVER NULL
def performance_schema events_waits_history NESTING_EVENT_ID 15 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references EVENT_ID of event within which this event nests. NEVER NULL
-def performance_schema events_waits_history NESTING_EVENT_TYPE 16 NULL YES enum 9 27 NULL NULL NULL utf8 utf8_general_ci enum('STATEMENT','STAGE','WAIT') select,insert,update,references Nesting event type. Either statement, stage or wait. NEVER NULL
+def performance_schema events_waits_history NESTING_EVENT_TYPE 16 NULL YES enum 11 33 NULL NULL NULL utf8 utf8_general_ci enum('TRANSACTION','STATEMENT','STAGE','WAIT') select,insert,update,references Nesting event type. Either statement, stage or wait. NEVER NULL
def performance_schema events_waits_history OPERATION 17 NULL NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select,insert,update,references Operation type, for example read, write or lock NEVER NULL
def performance_schema events_waits_history NUMBER_OF_BYTES 18 NULL YES bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references Number of bytes that the operation read or wrote, or NULL for table I/O waits. NEVER NULL
def performance_schema events_waits_history FLAGS 19 NULL YES int NULL NULL 10 0 NULL NULL NULL int(10) unsigned select,insert,update,references Reserved for use in the future. NEVER NULL
@@ -404,7 +602,7 @@ def performance_schema events_waits_history_long INDEX_NAME 12 NULL YES varchar
def performance_schema events_waits_history_long OBJECT_TYPE 13 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references FILE for a file object, TABLE or TEMPORARY TABLE for a table object, or NULL for a synchronization object. NEVER NULL
def performance_schema events_waits_history_long OBJECT_INSTANCE_BEGIN 14 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references Address in memory of the object. NEVER NULL
def performance_schema events_waits_history_long NESTING_EVENT_ID 15 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references EVENT_ID of event within which this event nests. NEVER NULL
-def performance_schema events_waits_history_long NESTING_EVENT_TYPE 16 NULL YES enum 9 27 NULL NULL NULL utf8 utf8_general_ci enum('STATEMENT','STAGE','WAIT') select,insert,update,references Nesting event type. Either statement, stage or wait. NEVER NULL
+def performance_schema events_waits_history_long NESTING_EVENT_TYPE 16 NULL YES enum 11 33 NULL NULL NULL utf8 utf8_general_ci enum('TRANSACTION','STATEMENT','STAGE','WAIT') select,insert,update,references Nesting event type. Either statement, stage or wait. NEVER NULL
def performance_schema events_waits_history_long OPERATION 17 NULL NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select,insert,update,references Operation type, for example read, write or lock NEVER NULL
def performance_schema events_waits_history_long NUMBER_OF_BYTES 18 NULL YES bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references Number of bytes that the operation read or wrote, or NULL for table I/O waits. NEVER NULL
def performance_schema events_waits_history_long FLAGS 19 NULL YES int NULL NULL 10 0 NULL NULL NULL int(10) unsigned select,insert,update,references Reserved for use in the future. NEVER NULL
@@ -501,6 +699,8 @@ def performance_schema file_summary_by_instance SUM_TIMER_MISC 22 NULL NO bigint
def performance_schema file_summary_by_instance MIN_TIMER_MISC 23 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references Minimum wait time of all miscellaneous operations that are timed. NEVER NULL
def performance_schema file_summary_by_instance AVG_TIMER_MISC 24 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references Average wait time of all miscellaneous operations that are timed. NEVER NULL
def performance_schema file_summary_by_instance MAX_TIMER_MISC 25 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references Maximum wait time of all miscellaneous operations that are timed. NEVER NULL
+def performance_schema global_status VARIABLE_NAME 1 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references NEVER NULL
+def performance_schema global_status VARIABLE_VALUE 2 NULL YES varchar 1024 3072 NULL NULL NULL utf8 utf8_general_ci varchar(1024) select,insert,update,references NEVER NULL
def performance_schema hosts HOST 1 NULL YES char 60 180 NULL NULL NULL utf8 utf8_bin char(60) select,insert,update,references Host name used by the client to connect, NULL for internal threads or user sessions that failed to authenticate. NEVER NULL
def performance_schema hosts CURRENT_CONNECTIONS 2 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references Current number of the host's connections. NEVER NULL
def performance_schema hosts TOTAL_CONNECTIONS 3 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references Total number of the host's connections NEVER NULL
@@ -533,6 +733,76 @@ def performance_schema host_cache FIRST_SEEN 26 '0000-00-00 00:00:00' NO timesta
def performance_schema host_cache LAST_SEEN 27 '0000-00-00 00:00:00' NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp select,insert,update,references Timestamp of the most recent connection attempt by the IP. NEVER NULL
def performance_schema host_cache FIRST_ERROR_SEEN 28 '0000-00-00 00:00:00' YES timestamp NULL NULL NULL NULL 0 NULL NULL timestamp select,insert,update,references Timestamp of the first error seen from the IP. NEVER NULL
def performance_schema host_cache LAST_ERROR_SEEN 29 '0000-00-00 00:00:00' YES timestamp NULL NULL NULL NULL 0 NULL NULL timestamp select,insert,update,references Timestamp of the most recent error seen from the IP. NEVER NULL
+def performance_schema memory_summary_by_account_by_event_name USER 1 NULL YES char 32 96 NULL NULL NULL utf8 utf8_bin char(32) select,insert,update,references NEVER NULL
+def performance_schema memory_summary_by_account_by_event_name HOST 2 NULL YES char 60 180 NULL NULL NULL utf8 utf8_bin char(60) select,insert,update,references NEVER NULL
+def performance_schema memory_summary_by_account_by_event_name EVENT_NAME 3 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references NEVER NULL
+def performance_schema memory_summary_by_account_by_event_name COUNT_ALLOC 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema memory_summary_by_account_by_event_name COUNT_FREE 5 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema memory_summary_by_account_by_event_name SUM_NUMBER_OF_BYTES_ALLOC 6 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema memory_summary_by_account_by_event_name SUM_NUMBER_OF_BYTES_FREE 7 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema memory_summary_by_account_by_event_name LOW_COUNT_USED 8 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL
+def performance_schema memory_summary_by_account_by_event_name CURRENT_COUNT_USED 9 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL
+def performance_schema memory_summary_by_account_by_event_name HIGH_COUNT_USED 10 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL
+def performance_schema memory_summary_by_account_by_event_name LOW_NUMBER_OF_BYTES_USED 11 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL
+def performance_schema memory_summary_by_account_by_event_name CURRENT_NUMBER_OF_BYTES_USED 12 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL
+def performance_schema memory_summary_by_account_by_event_name HIGH_NUMBER_OF_BYTES_USED 13 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL
+def performance_schema memory_summary_by_host_by_event_name HOST 1 NULL YES char 60 180 NULL NULL NULL utf8 utf8_bin char(60) select,insert,update,references NEVER NULL
+def performance_schema memory_summary_by_host_by_event_name EVENT_NAME 2 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references NEVER NULL
+def performance_schema memory_summary_by_host_by_event_name COUNT_ALLOC 3 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema memory_summary_by_host_by_event_name COUNT_FREE 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema memory_summary_by_host_by_event_name SUM_NUMBER_OF_BYTES_ALLOC 5 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema memory_summary_by_host_by_event_name SUM_NUMBER_OF_BYTES_FREE 6 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema memory_summary_by_host_by_event_name LOW_COUNT_USED 7 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL
+def performance_schema memory_summary_by_host_by_event_name CURRENT_COUNT_USED 8 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL
+def performance_schema memory_summary_by_host_by_event_name HIGH_COUNT_USED 9 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL
+def performance_schema memory_summary_by_host_by_event_name LOW_NUMBER_OF_BYTES_USED 10 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL
+def performance_schema memory_summary_by_host_by_event_name CURRENT_NUMBER_OF_BYTES_USED 11 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL
+def performance_schema memory_summary_by_host_by_event_name HIGH_NUMBER_OF_BYTES_USED 12 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL
+def performance_schema memory_summary_by_thread_by_event_name THREAD_ID 1 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema memory_summary_by_thread_by_event_name EVENT_NAME 2 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references NEVER NULL
+def performance_schema memory_summary_by_thread_by_event_name COUNT_ALLOC 3 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema memory_summary_by_thread_by_event_name COUNT_FREE 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema memory_summary_by_thread_by_event_name SUM_NUMBER_OF_BYTES_ALLOC 5 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema memory_summary_by_thread_by_event_name SUM_NUMBER_OF_BYTES_FREE 6 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema memory_summary_by_thread_by_event_name LOW_COUNT_USED 7 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL
+def performance_schema memory_summary_by_thread_by_event_name CURRENT_COUNT_USED 8 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL
+def performance_schema memory_summary_by_thread_by_event_name HIGH_COUNT_USED 9 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL
+def performance_schema memory_summary_by_thread_by_event_name LOW_NUMBER_OF_BYTES_USED 10 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL
+def performance_schema memory_summary_by_thread_by_event_name CURRENT_NUMBER_OF_BYTES_USED 11 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL
+def performance_schema memory_summary_by_thread_by_event_name HIGH_NUMBER_OF_BYTES_USED 12 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL
+def performance_schema memory_summary_by_user_by_event_name USER 1 NULL YES char 32 96 NULL NULL NULL utf8 utf8_bin char(32) select,insert,update,references NEVER NULL
+def performance_schema memory_summary_by_user_by_event_name EVENT_NAME 2 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references NEVER NULL
+def performance_schema memory_summary_by_user_by_event_name COUNT_ALLOC 3 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema memory_summary_by_user_by_event_name COUNT_FREE 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema memory_summary_by_user_by_event_name SUM_NUMBER_OF_BYTES_ALLOC 5 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema memory_summary_by_user_by_event_name SUM_NUMBER_OF_BYTES_FREE 6 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema memory_summary_by_user_by_event_name LOW_COUNT_USED 7 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL
+def performance_schema memory_summary_by_user_by_event_name CURRENT_COUNT_USED 8 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL
+def performance_schema memory_summary_by_user_by_event_name HIGH_COUNT_USED 9 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL
+def performance_schema memory_summary_by_user_by_event_name LOW_NUMBER_OF_BYTES_USED 10 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL
+def performance_schema memory_summary_by_user_by_event_name CURRENT_NUMBER_OF_BYTES_USED 11 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL
+def performance_schema memory_summary_by_user_by_event_name HIGH_NUMBER_OF_BYTES_USED 12 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL
+def performance_schema memory_summary_global_by_event_name EVENT_NAME 1 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references NEVER NULL
+def performance_schema memory_summary_global_by_event_name COUNT_ALLOC 2 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema memory_summary_global_by_event_name COUNT_FREE 3 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema memory_summary_global_by_event_name SUM_NUMBER_OF_BYTES_ALLOC 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema memory_summary_global_by_event_name SUM_NUMBER_OF_BYTES_FREE 5 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema memory_summary_global_by_event_name LOW_COUNT_USED 6 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL
+def performance_schema memory_summary_global_by_event_name CURRENT_COUNT_USED 7 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL
+def performance_schema memory_summary_global_by_event_name HIGH_COUNT_USED 8 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL
+def performance_schema memory_summary_global_by_event_name LOW_NUMBER_OF_BYTES_USED 9 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL
+def performance_schema memory_summary_global_by_event_name CURRENT_NUMBER_OF_BYTES_USED 10 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL
+def performance_schema memory_summary_global_by_event_name HIGH_NUMBER_OF_BYTES_USED 11 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL
+def performance_schema metadata_locks OBJECT_TYPE 1 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references NEVER NULL
+def performance_schema metadata_locks OBJECT_SCHEMA 2 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references NEVER NULL
+def performance_schema metadata_locks OBJECT_NAME 3 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references NEVER NULL
+def performance_schema metadata_locks OBJECT_INSTANCE_BEGIN 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema metadata_locks LOCK_TYPE 5 NULL NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select,insert,update,references NEVER NULL
+def performance_schema metadata_locks LOCK_DURATION 6 NULL NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select,insert,update,references NEVER NULL
+def performance_schema metadata_locks LOCK_STATUS 7 NULL NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select,insert,update,references NEVER NULL
+def performance_schema metadata_locks SOURCE 8 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references NEVER NULL
+def performance_schema metadata_locks OWNER_THREAD_ID 9 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema metadata_locks OWNER_EVENT_ID 10 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
def performance_schema mutex_instances NAME 1 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references Instrument name associated with the mutex. NEVER NULL
def performance_schema mutex_instances OBJECT_INSTANCE_BEGIN 2 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references Memory address of the instrumented mutex. NEVER NULL
def performance_schema mutex_instances LOCKED_BY_THREAD_ID 3 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references The THREAD_ID of the locking thread if a thread has a mutex locked, otherwise NULL. NEVER NULL
@@ -548,6 +818,72 @@ def performance_schema performance_timers TIMER_NAME 1 NULL NO enum 11 33 NULL N
def performance_schema performance_timers TIMER_FREQUENCY 2 NULL YES bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references Number of timer units per second. Dependent on the processor speed. NEVER NULL
def performance_schema performance_timers TIMER_RESOLUTION 3 NULL YES bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references Number of timer units by which timed values increase each time. NEVER NULL
def performance_schema performance_timers TIMER_OVERHEAD 4 NULL YES bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references Minimum timer overhead, determined during initialization by calling the timer 20 times and selecting the smallest value. Total overhead will be at least double this, as the timer is called at the beginning and end of each timed event. NEVER NULL
+def performance_schema prepared_statements_instances OBJECT_INSTANCE_BEGIN 1 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema prepared_statements_instances STATEMENT_ID 2 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema prepared_statements_instances STATEMENT_NAME 3 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references NEVER NULL
+def performance_schema prepared_statements_instances SQL_TEXT 4 NULL NO longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext select,insert,update,references NEVER NULL
+def performance_schema prepared_statements_instances OWNER_THREAD_ID 5 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema prepared_statements_instances OWNER_EVENT_ID 6 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema prepared_statements_instances OWNER_OBJECT_TYPE 7 NULL YES enum 9 27 NULL NULL NULL utf8 utf8_general_ci enum('EVENT','FUNCTION','PROCEDURE','TABLE','TRIGGER') select,insert,update,references NEVER NULL
+def performance_schema prepared_statements_instances OWNER_OBJECT_SCHEMA 8 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references NEVER NULL
+def performance_schema prepared_statements_instances OWNER_OBJECT_NAME 9 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references NEVER NULL
+def performance_schema prepared_statements_instances TIMER_PREPARE 10 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema prepared_statements_instances COUNT_REPREPARE 11 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema prepared_statements_instances COUNT_EXECUTE 12 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema prepared_statements_instances SUM_TIMER_EXECUTE 13 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema prepared_statements_instances MIN_TIMER_EXECUTE 14 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema prepared_statements_instances AVG_TIMER_EXECUTE 15 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema prepared_statements_instances MAX_TIMER_EXECUTE 16 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema prepared_statements_instances SUM_LOCK_TIME 17 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema prepared_statements_instances SUM_ERRORS 18 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema prepared_statements_instances SUM_WARNINGS 19 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema prepared_statements_instances SUM_ROWS_AFFECTED 20 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema prepared_statements_instances SUM_ROWS_SENT 21 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema prepared_statements_instances SUM_ROWS_EXAMINED 22 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema prepared_statements_instances SUM_CREATED_TMP_DISK_TABLES 23 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema prepared_statements_instances SUM_CREATED_TMP_TABLES 24 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema prepared_statements_instances SUM_SELECT_FULL_JOIN 25 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema prepared_statements_instances SUM_SELECT_FULL_RANGE_JOIN 26 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema prepared_statements_instances SUM_SELECT_RANGE 27 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema prepared_statements_instances SUM_SELECT_RANGE_CHECK 28 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema prepared_statements_instances SUM_SELECT_SCAN 29 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema prepared_statements_instances SUM_SORT_MERGE_PASSES 30 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema prepared_statements_instances SUM_SORT_RANGE 31 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema prepared_statements_instances SUM_SORT_ROWS 32 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema prepared_statements_instances SUM_SORT_SCAN 33 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema prepared_statements_instances SUM_NO_INDEX_USED 34 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema prepared_statements_instances SUM_NO_GOOD_INDEX_USED 35 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema replication_applier_configuration CHANNEL_NAME 1 NULL NO char 64 192 NULL NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references NEVER NULL
+def performance_schema replication_applier_configuration DESIRED_DELAY 2 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
+def performance_schema replication_applier_status CHANNEL_NAME 1 NULL NO char 64 192 NULL NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references NEVER NULL
+def performance_schema replication_applier_status SERVICE_STATE 2 NULL NO enum 3 9 NULL NULL NULL utf8 utf8_general_ci enum('ON','OFF') select,insert,update,references NEVER NULL
+def performance_schema replication_applier_status REMAINING_DELAY 3 NULL YES int NULL NULL 10 0 NULL NULL NULL int(10) unsigned select,insert,update,references NEVER NULL
+def performance_schema replication_applier_status COUNT_TRANSACTIONS_RETRIES 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema replication_applier_status_by_coordinator CHANNEL_NAME 1 NULL NO char 64 192 NULL NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references NEVER NULL
+def performance_schema replication_applier_status_by_coordinator THREAD_ID 2 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema replication_applier_status_by_coordinator SERVICE_STATE 3 NULL NO enum 3 9 NULL NULL NULL utf8 utf8_general_ci enum('ON','OFF') select,insert,update,references NEVER NULL
+def performance_schema replication_applier_status_by_coordinator LAST_ERROR_NUMBER 4 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
+def performance_schema replication_applier_status_by_coordinator LAST_ERROR_MESSAGE 5 NULL NO varchar 1024 3072 NULL NULL NULL utf8 utf8_general_ci varchar(1024) select,insert,update,references NEVER NULL
+def performance_schema replication_applier_status_by_coordinator LAST_ERROR_TIMESTAMP 6 current_timestamp() NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update current_timestamp() select,insert,update,references NEVER NULL
+def performance_schema replication_connection_configuration CHANNEL_NAME 1 NULL NO char 64 192 NULL NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references NEVER NULL
+def performance_schema replication_connection_configuration HOST 2 NULL NO char 60 180 NULL NULL NULL utf8 utf8_bin char(60) select,insert,update,references NEVER NULL
+def performance_schema replication_connection_configuration PORT 3 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
+def performance_schema replication_connection_configuration USER 4 NULL NO char 32 96 NULL NULL NULL utf8 utf8_bin char(32) select,insert,update,references NEVER NULL
+def performance_schema replication_connection_configuration NETWORK_INTERFACE 5 NULL NO char 60 180 NULL NULL NULL utf8 utf8_bin char(60) select,insert,update,references NEVER NULL
+def performance_schema replication_connection_configuration AUTO_POSITION 6 NULL NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('1','0') select,insert,update,references NEVER NULL
+def performance_schema replication_connection_configuration SSL_ALLOWED 7 NULL NO enum 7 21 NULL NULL NULL utf8 utf8_general_ci enum('YES','NO','IGNORED') select,insert,update,references NEVER NULL
+def performance_schema replication_connection_configuration SSL_CA_FILE 8 NULL NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select,insert,update,references NEVER NULL
+def performance_schema replication_connection_configuration SSL_CA_PATH 9 NULL NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select,insert,update,references NEVER NULL
+def performance_schema replication_connection_configuration SSL_CERTIFICATE 10 NULL NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select,insert,update,references NEVER NULL
+def performance_schema replication_connection_configuration SSL_CIPHER 11 NULL NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select,insert,update,references NEVER NULL
+def performance_schema replication_connection_configuration SSL_KEY 12 NULL NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select,insert,update,references NEVER NULL
+def performance_schema replication_connection_configuration SSL_VERIFY_SERVER_CERTIFICATE 13 NULL NO enum 3 9 NULL NULL NULL utf8 utf8_general_ci enum('YES','NO') select,insert,update,references NEVER NULL
+def performance_schema replication_connection_configuration SSL_CRL_FILE 14 NULL NO varchar 255 765 NULL NULL NULL utf8 utf8_general_ci varchar(255) select,insert,update,references NEVER NULL
+def performance_schema replication_connection_configuration SSL_CRL_PATH 15 NULL NO varchar 255 765 NULL NULL NULL utf8 utf8_general_ci varchar(255) select,insert,update,references NEVER NULL
+def performance_schema replication_connection_configuration CONNECTION_RETRY_INTERVAL 16 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
+def performance_schema replication_connection_configuration CONNECTION_RETRY_COUNT 17 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema replication_connection_configuration HEARTBEAT_INTERVAL 18 NULL NO double NULL NULL 10 3 NULL NULL NULL double(10,3) unsigned select,insert,update,references Number of seconds after which a heartbeat will be sent . NEVER NULL
+def performance_schema replication_connection_configuration TLS_VERSION 19 NULL NO varchar 255 765 NULL NULL NULL utf8 utf8_general_ci varchar(255) select,insert,update,references NEVER NULL
def performance_schema rwlock_instances NAME 1 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references Instrument name associated with the read write lock NEVER NULL
def performance_schema rwlock_instances OBJECT_INSTANCE_BEGIN 2 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references Address in memory of the instrumented lock NEVER NULL
def performance_schema rwlock_instances WRITE_LOCKED_BY_THREAD_ID 3 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references THREAD_ID of the locking thread if locked in write (exclusive) mode, otherwise NULL. NEVER NULL
@@ -560,15 +896,19 @@ def performance_schema session_connect_attrs PROCESSLIST_ID 1 NULL NO int NULL N
def performance_schema session_connect_attrs ATTR_NAME 2 NULL NO varchar 32 96 NULL NULL NULL utf8 utf8_bin varchar(32) select,insert,update,references Attribute name. NEVER NULL
def performance_schema session_connect_attrs ATTR_VALUE 3 NULL YES varchar 1024 3072 NULL NULL NULL utf8 utf8_bin varchar(1024) select,insert,update,references Attribute value. NEVER NULL
def performance_schema session_connect_attrs ORDINAL_POSITION 4 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references Order in which attribute was added to the connection attributes. NEVER NULL
+def performance_schema session_status VARIABLE_NAME 1 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references NEVER NULL
+def performance_schema session_status VARIABLE_VALUE 2 NULL YES varchar 1024 3072 NULL NULL NULL utf8 utf8_general_ci varchar(1024) select,insert,update,references NEVER NULL
def performance_schema setup_actors HOST 1 '%' NO char 60 180 NULL NULL NULL utf8 utf8_bin char(60) select,insert,update,references Host name, either a literal, or the % wildcard representing any host. NEVER NULL
def performance_schema setup_actors USER 2 '%' NO char 128 384 NULL NULL NULL utf8 utf8_bin char(128) select,insert,update,references User name, either a literal or the % wildcard representing any name. NEVER NULL
def performance_schema setup_actors ROLE 3 '%' NO char 128 384 NULL NULL NULL utf8 utf8_bin char(128) select,insert,update,references Unused NEVER NULL
+def performance_schema setup_actors ENABLED 4 'YES' NO enum 3 9 NULL NULL NULL utf8 utf8_general_ci enum('YES','NO') select,insert,update,references NEVER NULL
+def performance_schema setup_actors HISTORY 5 'YES' NO enum 3 9 NULL NULL NULL utf8 utf8_general_ci enum('YES','NO') select,insert,update,references NEVER NULL
def performance_schema setup_consumers NAME 1 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references Consumer name NEVER NULL
def performance_schema setup_consumers ENABLED 2 NULL NO enum 3 9 NULL NULL NULL utf8 utf8_general_ci enum('YES','NO') select,insert,update,references YES or NO for whether or not the consumer is enabled. You can modify this column to ensure that event information is added, or is not added. NEVER NULL
def performance_schema setup_instruments NAME 1 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references Instrument name NEVER NULL
def performance_schema setup_instruments ENABLED 2 NULL NO enum 3 9 NULL NULL NULL utf8 utf8_general_ci enum('YES','NO') select,insert,update,references Whether or not the instrument is enabled. It can be disabled, and the instrument will produce no events. NEVER NULL
def performance_schema setup_instruments TIMED 3 NULL NO enum 3 9 NULL NULL NULL utf8 utf8_general_ci enum('YES','NO') select,insert,update,references Whether or not the instrument is timed. It can be set, but if disabled, events produced by the instrument will have NULL values for the corresponding TIMER_START, TIMER_END, and TIMER_WAIT values. NEVER NULL
-def performance_schema setup_objects OBJECT_TYPE 1 'TABLE' NO enum 5 15 NULL NULL NULL utf8 utf8_general_ci enum('TABLE') select,insert,update,references Type of object to instrument. Currently, only TABLE, for base table. NEVER NULL
+def performance_schema setup_objects OBJECT_TYPE 1 'TABLE' NO enum 9 27 NULL NULL NULL utf8 utf8_general_ci enum('EVENT','FUNCTION','PROCEDURE','TABLE','TRIGGER') select,insert,update,references Type of object to instrument. NEVER NULL
def performance_schema setup_objects OBJECT_SCHEMA 2 '%' YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references Schema containing the object, either the literal or % for any schema. NEVER NULL
def performance_schema setup_objects OBJECT_NAME 3 '%' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references Name of the instrumented object, either the literal or % for any object. NEVER NULL
def performance_schema setup_objects ENABLED 4 'YES' NO enum 3 9 NULL NULL NULL utf8 utf8_general_ci enum('YES','NO') select,insert,update,references Whether the object's events are instrumented or not. Can be disabled, in which case monitoring is not enabled for those objects. NEVER NULL
@@ -629,6 +969,27 @@ def performance_schema socket_summary_by_instance SUM_TIMER_MISC 21 NULL NO bigi
def performance_schema socket_summary_by_instance MIN_TIMER_MISC 22 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references Minimum wait time of all miscellaneous operations that are timed. NEVER NULL
def performance_schema socket_summary_by_instance AVG_TIMER_MISC 23 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references Average wait time of all miscellaneous operations that are timed. NEVER NULL
def performance_schema socket_summary_by_instance MAX_TIMER_MISC 24 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references Maximum wait time of all miscellaneous operations that are timed. NEVER NULL
+def performance_schema status_by_account USER 1 NULL YES char 32 96 NULL NULL NULL utf8 utf8_bin char(32) select,insert,update,references NEVER NULL
+def performance_schema status_by_account HOST 2 NULL YES char 60 180 NULL NULL NULL utf8 utf8_bin char(60) select,insert,update,references NEVER NULL
+def performance_schema status_by_account VARIABLE_NAME 3 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references NEVER NULL
+def performance_schema status_by_account VARIABLE_VALUE 4 NULL YES varchar 1024 3072 NULL NULL NULL utf8 utf8_general_ci varchar(1024) select,insert,update,references NEVER NULL
+def performance_schema status_by_host HOST 1 NULL YES char 60 180 NULL NULL NULL utf8 utf8_bin char(60) select,insert,update,references NEVER NULL
+def performance_schema status_by_host VARIABLE_NAME 2 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references NEVER NULL
+def performance_schema status_by_host VARIABLE_VALUE 3 NULL YES varchar 1024 3072 NULL NULL NULL utf8 utf8_general_ci varchar(1024) select,insert,update,references NEVER NULL
+def performance_schema status_by_thread THREAD_ID 1 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema status_by_thread VARIABLE_NAME 2 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references NEVER NULL
+def performance_schema status_by_thread VARIABLE_VALUE 3 NULL YES varchar 1024 3072 NULL NULL NULL utf8 utf8_general_ci varchar(1024) select,insert,update,references NEVER NULL
+def performance_schema status_by_user USER 1 NULL YES char 32 96 NULL NULL NULL utf8 utf8_bin char(32) select,insert,update,references NEVER NULL
+def performance_schema status_by_user VARIABLE_NAME 2 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references NEVER NULL
+def performance_schema status_by_user VARIABLE_VALUE 3 NULL YES varchar 1024 3072 NULL NULL NULL utf8 utf8_general_ci varchar(1024) select,insert,update,references NEVER NULL
+def performance_schema table_handles OBJECT_TYPE 1 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references NEVER NULL
+def performance_schema table_handles OBJECT_SCHEMA 2 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references NEVER NULL
+def performance_schema table_handles OBJECT_NAME 3 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references NEVER NULL
+def performance_schema table_handles OBJECT_INSTANCE_BEGIN 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema table_handles OWNER_THREAD_ID 5 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema table_handles OWNER_EVENT_ID 6 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema table_handles INTERNAL_LOCK 7 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references NEVER NULL
+def performance_schema table_handles EXTERNAL_LOCK 8 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references NEVER NULL
def performance_schema table_io_waits_summary_by_index_usage OBJECT_TYPE 1 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references TABLE in the case of all indexes. NEVER NULL
def performance_schema table_io_waits_summary_by_index_usage OBJECT_SCHEMA 2 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references Schema name. NEVER NULL
def performance_schema table_io_waits_summary_by_index_usage OBJECT_NAME 3 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references Table name. NEVER NULL
@@ -793,40 +1154,38 @@ def performance_schema threads PROCESSLIST_INFO 11 NULL YES longtext 4294967295
def performance_schema threads PARENT_THREAD_ID 12 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references THREAD_ID of the parent thread, if any. Subthreads can for example be spawned as a result of INSERT DELAYED statements. NEVER NULL
def performance_schema threads ROLE 13 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references Unused. NEVER NULL
def performance_schema threads INSTRUMENTED 14 NULL NO enum 3 9 NULL NULL NULL utf8 utf8_general_ci enum('YES','NO') select,insert,update,references YES or NO for Whether the thread is instrumented or not. For foreground threads, the initial value is determined by whether there's a user/host match in the setup_actors table. Subthreads are again matched, while for background threads, this will be set to YES by default. To monitor events that the thread executes, INSTRUMENTED must be YES and the thread_instrumentation consumer in the setup_consumers table must also be YES. NEVER NULL
+def performance_schema threads HISTORY 15 NULL NO enum 3 9 NULL NULL NULL utf8 utf8_general_ci enum('YES','NO') select,insert,update,references NEVER NULL
+def performance_schema threads CONNECTION_TYPE 16 NULL YES varchar 16 48 NULL NULL NULL utf8 utf8_general_ci varchar(16) select,insert,update,references NEVER NULL
+def performance_schema threads THREAD_OS_ID 17 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
def performance_schema users USER 1 NULL YES char 128 384 NULL NULL NULL utf8 utf8_bin char(128) select,insert,update,references The connection's client user name for the connection, or NULL if an internal thread. NEVER NULL
def performance_schema users CURRENT_CONNECTIONS 2 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references Current connections for the user. NEVER NULL
def performance_schema users TOTAL_CONNECTIONS 3 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references Total connections for the user. NEVER NULL
-select count(*) from information_schema.columns
+def performance_schema user_variables_by_thread THREAD_ID 1 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def performance_schema user_variables_by_thread VARIABLE_NAME 2 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references NEVER NULL
+def performance_schema user_variables_by_thread VARIABLE_VALUE 3 NULL YES longblob 4294967295 4294967295 NULL NULL NULL NULL NULL longblob select,insert,update,references NEVER NULL
+select count(*) into @count_byte_columns from information_schema.columns
where table_schema="performance_schema" and data_type = "bigint"
- and column_name like "%number_of_bytes" into @count_byte_columns;
-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
+ and column_name like "%number_of_bytes";
select @count_byte_columns > 0;
@count_byte_columns > 0
1
-select count(*) from information_schema.columns
+select count(*) into @count_byte_signed from information_schema.columns
where table_schema="performance_schema" and data_type="bigint"
and column_name like "%number_of_bytes"
- and column_type not like "%unsigned" into @count_byte_signed;
-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
+ and column_type not like "%unsigned";
select (@count_byte_columns - @count_byte_signed) = 0;
(@count_byte_columns - @count_byte_signed) = 0
1
-select count(*) from information_schema.columns
+select count(*) into @count_object_columns from information_schema.columns
where table_schema="performance_schema" and data_type = "bigint"
- and column_name like "%object_instance_begin" into @count_object_columns;
-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
+ and column_name like "%object_instance_begin";
select @count_object_columns > 0;
@count_object_columns > 0
1
-select count(*) from information_schema.columns
+select count(*) into @count_object_unsigned from information_schema.columns
where table_schema="performance_schema" and data_type="bigint"
and column_name like "%object_instance_begin"
- and column_type like "%unsigned" into @count_object_unsigned;
-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
+ and column_type like "%unsigned";
select (@count_object_columns - @count_object_unsigned) = 0;
(@count_object_columns - @count_object_unsigned) = 0
1
@@ -834,4 +1193,4 @@ select count(*) from information_schema.columns
where table_schema="performance_schema"
and (column_comment is null or column_comment = '');
count(*)
-0
+366
diff --git a/mysql-test/suite/perfschema/r/temp_table_io.result b/mysql-test/suite/perfschema/r/temp_table_io.result
index 0e1bf01ef9a..a1b16c42108 100644
--- a/mysql-test/suite/perfschema/r/temp_table_io.result
+++ b/mysql-test/suite/perfschema/r/temp_table_io.result
@@ -70,36 +70,50 @@ where event_name like 'wait/io/table/%'
and object_schema in ("test")
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 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
-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
-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
-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
-wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
-show status where Variable_name like 'performance_schema_%' and
-Variable_name not like 'performance_schema_%_classes_lost';
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test marker insert 1
+show global status like 'performance_schema_%';
Variable_name Value
Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
Performance_schema_cond_instances_lost 0
Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
Performance_schema_file_handles_lost 0
Performance_schema_file_instances_lost 0
Performance_schema_hosts_lost 0
+Performance_schema_index_stat_lost 0
Performance_schema_locker_lost 0
+Performance_schema_memory_classes_lost 0
+Performance_schema_metadata_lock_lost 0
+Performance_schema_mutex_classes_lost 0
Performance_schema_mutex_instances_lost 0
+Performance_schema_nested_statement_lost 0
+Performance_schema_prepared_statements_lost 0
+Performance_schema_program_lost 0
+Performance_schema_rwlock_classes_lost 0
Performance_schema_rwlock_instances_lost 0
Performance_schema_session_connect_attrs_lost 0
+Performance_schema_socket_classes_lost 0
Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
Performance_schema_table_handles_lost 0
Performance_schema_table_instances_lost 0
+Performance_schema_table_lock_stat_lost 0
+Performance_schema_thread_classes_lost 0
Performance_schema_thread_instances_lost 0
Performance_schema_users_lost 0
truncate performance_schema.events_waits_history_long;
diff --git a/mysql-test/suite/perfschema/r/thread_cache.result b/mysql-test/suite/perfschema/r/thread_cache.result
index daa9f318e7b..8c39f4ddca5 100644
--- a/mysql-test/suite/perfschema/r/thread_cache.result
+++ b/mysql-test/suite/perfschema/r/thread_cache.result
@@ -1,7 +1,7 @@
flush status;
SET @saved_thread_cache_size = @@global.thread_cache_size;
set global thread_cache_size = 0;
-show variables like "thread_cache_size";
+show global variables like "thread_cache_size";
Variable_name Value
thread_cache_size 0
connect con1, localhost, root, , ;
@@ -26,7 +26,7 @@ select @thread_id_increment;
@thread_id_increment
1
set global thread_cache_size = 100;
-show variables like "thread_cache_size";
+show global variables like "thread_cache_size";
Variable_name Value
thread_cache_size 100
connect con1, localhost, root, , ;
@@ -51,7 +51,7 @@ select @thread_id_increment;
@thread_id_increment
1
set global thread_cache_size = @saved_thread_cache_size;
-show status like "performance_schema_thread%";
+show global status like "performance_schema_thread%";
Variable_name Value
Performance_schema_thread_classes_lost 0
Performance_schema_thread_instances_lost 0
diff --git a/mysql-test/suite/perfschema/r/thread_misc.result b/mysql-test/suite/perfschema/r/thread_misc.result
new file mode 100644
index 00000000000..31094e64b59
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/thread_misc.result
@@ -0,0 +1 @@
+select * from information_schema.columns ORDER BY table_name;
diff --git a/mysql-test/suite/perfschema/r/threads_history.result b/mysql-test/suite/perfschema/r/threads_history.result
new file mode 100644
index 00000000000..aaf2cd09e31
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/threads_history.result
@@ -0,0 +1,700 @@
+create user user1@localhost;
+create user user2@localhost;
+create user user3@localhost;
+create user user4@localhost;
+grant ALL on *.* to user1@localhost;
+grant ALL on *.* to user2@localhost;
+grant ALL on *.* to user3@localhost;
+grant ALL on *.* to user4@localhost;
+flush privileges;
+select * from performance_schema.setup_consumers;
+NAME ENABLED
+events_stages_current YES
+events_stages_history YES
+events_stages_history_long YES
+events_statements_current YES
+events_statements_history YES
+events_statements_history_long YES
+events_transactions_current YES
+events_transactions_history YES
+events_transactions_history_long YES
+events_waits_current YES
+events_waits_history YES
+events_waits_history_long YES
+global_instrumentation YES
+thread_instrumentation YES
+statements_digest YES
+# Switch to (con1, localhost, user1, , )
+connect con1, localhost, user1, , ;
+update performance_schema.threads
+set INSTRUMENTED='YES', HISTORY='YES'
+ where PROCESSLIST_ID = connection_id();
+# Switch to (con2, localhost, user2, , )
+connect con2, localhost, user2, , ;
+update performance_schema.threads
+set INSTRUMENTED='YES', HISTORY='NO'
+ where PROCESSLIST_ID = connection_id();
+# Switch to (con3, localhost, user3, , )
+connect con3, localhost, user3, , ;
+update performance_schema.threads
+set INSTRUMENTED='NO', HISTORY='YES'
+ where PROCESSLIST_ID = connection_id();
+# Switch to (con4, localhost, user4, , )
+connect con4, localhost, user4, , ;
+update performance_schema.threads
+set INSTRUMENTED='NO', HISTORY='NO'
+ where PROCESSLIST_ID = connection_id();
+# Switch to connection default
+connection default;
+truncate table performance_schema.events_transactions_current;
+truncate table performance_schema.events_transactions_history;
+truncate table performance_schema.events_transactions_history_long;
+truncate table performance_schema.events_statements_current;
+truncate table performance_schema.events_statements_history;
+truncate table performance_schema.events_statements_history_long;
+truncate table performance_schema.events_stages_current;
+truncate table performance_schema.events_stages_history;
+truncate table performance_schema.events_stages_history_long;
+truncate table performance_schema.events_waits_current;
+truncate table performance_schema.events_waits_history;
+truncate table performance_schema.events_waits_history_long;
+# Switch to connection con1
+connection con1;
+XA START 'XA_CON1', 'XA_BQUAL', 12;
+select "Hi from con1";
+Hi from con1
+Hi from con1
+XA END 'XA_CON1', 'XA_BQUAL', 12;
+XA PREPARE 'XA_CON1', 'XA_BQUAL', 12;
+XA COMMIT 'XA_CON1', 'XA_BQUAL', 12;
+# Switch to connection con2
+connection con2;
+XA START 'XA_CON2', 'XA_BQUAL', 12;
+select "Hi from con2";
+Hi from con2
+Hi from con2
+XA END 'XA_CON2', 'XA_BQUAL', 12;
+XA PREPARE 'XA_CON2', 'XA_BQUAL', 12;
+XA COMMIT 'XA_CON2', 'XA_BQUAL', 12;
+# Switch to connection con3
+connection con3;
+XA START 'XA_CON3', 'XA_BQUAL', 12;
+select "Hi from con3";
+Hi from con3
+Hi from con3
+XA END 'XA_CON3', 'XA_BQUAL', 12;
+XA PREPARE 'XA_CON3', 'XA_BQUAL', 12;
+XA COMMIT 'XA_CON3', 'XA_BQUAL', 12;
+# Switch to connection con4
+connection con4;
+XA START 'XA_CON4', 'XA_BQUAL', 12;
+select "Hi from con4";
+Hi from con4
+Hi from con4
+XA END 'XA_CON4', 'XA_BQUAL', 12;
+XA PREPARE 'XA_CON4', 'XA_BQUAL', 12;
+XA COMMIT 'XA_CON4', 'XA_BQUAL', 12;
+connection default;
+"=========================== Transactions user 1"
+XID_FORMAT_ID XID_GTRID XID_BQUAL
+12 XA_CON1 XA_BQUAL
+XID_FORMAT_ID XID_GTRID XID_BQUAL
+12 XA_CON1 XA_BQUAL
+XID_FORMAT_ID XID_GTRID XID_BQUAL
+12 XA_CON1 XA_BQUAL
+"=========================== Transactions user 2"
+XID_FORMAT_ID XID_GTRID XID_BQUAL
+12 XA_CON2 XA_BQUAL
+count(*)
+0
+count(*)
+0
+"=========================== Transactions user 3"
+count(*)
+0
+count(*)
+0
+count(*)
+0
+"=========================== Transactions user 4"
+count(*)
+0
+count(*)
+0
+count(*)
+0
+"=========================== Statements user 1"
+EVENT_NAME SQL_TEXT
+statement/sql/xa_commit XA COMMIT 'XA_CON1', 'XA_BQUAL', 12
+EVENT_NAME SQL_TEXT
+statement/sql/xa_start XA START 'XA_CON1', 'XA_BQUAL', 12
+statement/sql/select select "Hi from con1"
+statement/sql/xa_end XA END 'XA_CON1', 'XA_BQUAL', 12
+statement/sql/xa_prepare XA PREPARE 'XA_CON1', 'XA_BQUAL', 12
+statement/sql/xa_commit XA COMMIT 'XA_CON1', 'XA_BQUAL', 12
+EVENT_NAME SQL_TEXT
+statement/sql/xa_start XA START 'XA_CON1', 'XA_BQUAL', 12
+statement/sql/select select "Hi from con1"
+statement/sql/xa_end XA END 'XA_CON1', 'XA_BQUAL', 12
+statement/sql/xa_prepare XA PREPARE 'XA_CON1', 'XA_BQUAL', 12
+statement/sql/xa_commit XA COMMIT 'XA_CON1', 'XA_BQUAL', 12
+"=========================== Statements user 2"
+EVENT_NAME SQL_TEXT
+statement/sql/xa_commit XA COMMIT 'XA_CON2', 'XA_BQUAL', 12
+count(*)
+0
+count(*)
+0
+"=========================== Statements user 3"
+count(*)
+0
+count(*)
+0
+count(*)
+0
+"=========================== Statements user 4"
+count(*)
+0
+count(*)
+0
+count(*)
+0
+"=========================== Stages user 1"
+EVENT_NAME
+EVENT_NAME
+stage/sql/Starting cleanup
+stage/sql/Freeing items
+stage/sql/Reset for next command
+stage/sql/starting
+stage/sql/Query end
+stage/sql/Commit
+stage/sql/closing tables
+stage/sql/Starting cleanup
+stage/sql/Freeing items
+stage/sql/Reset for next command
+EVENT_NAME
+stage/sql/starting
+stage/sql/Query end
+stage/sql/Commit
+stage/sql/closing tables
+stage/sql/Starting cleanup
+stage/sql/Freeing items
+stage/sql/Reset for next command
+stage/sql/starting
+stage/sql/checking permissions
+stage/sql/Opening tables
+stage/sql/After opening tables
+stage/sql/init
+stage/sql/Optimizing
+stage/sql/Executing
+stage/sql/End of update loop
+stage/sql/Query end
+stage/sql/Commit
+stage/sql/closing tables
+stage/sql/Starting cleanup
+stage/sql/Freeing items
+stage/sql/Reset for next command
+stage/sql/starting
+stage/sql/Query end
+stage/sql/Commit
+stage/sql/closing tables
+stage/sql/Starting cleanup
+stage/sql/Freeing items
+stage/sql/Reset for next command
+stage/sql/starting
+stage/sql/Query end
+stage/sql/Commit
+stage/sql/closing tables
+stage/sql/Starting cleanup
+stage/sql/Freeing items
+stage/sql/Reset for next command
+stage/sql/starting
+stage/sql/Query end
+stage/sql/Commit
+stage/sql/closing tables
+stage/sql/Starting cleanup
+stage/sql/Freeing items
+stage/sql/Reset for next command
+"=========================== Stages user 2"
+EVENT_NAME
+count(*)
+0
+count(*)
+0
+"=========================== Stages user 3"
+count(*)
+0
+count(*)
+0
+count(*)
+0
+"=========================== Stages user 4"
+count(*)
+0
+count(*)
+0
+count(*)
+0
+"=========================== Waits user 1"
+EVENT_NAME
+idle
+has_waits
+1
+has_waits
+1
+"=========================== Waits user 2"
+EVENT_NAME
+idle
+count(*)
+0
+count(*)
+0
+"=========================== Waits user 3"
+count(*)
+0
+count(*)
+0
+count(*)
+0
+"=========================== Waits user 4"
+count(*)
+0
+count(*)
+0
+count(*)
+0
+# Switch to connection default, disable consumers
+connection default;
+update performance_schema.setup_consumers
+set enabled='NO' where name like "%history%";
+select * from performance_schema.setup_consumers;
+NAME ENABLED
+events_stages_current YES
+events_stages_history NO
+events_stages_history_long NO
+events_statements_current YES
+events_statements_history NO
+events_statements_history_long NO
+events_transactions_current YES
+events_transactions_history NO
+events_transactions_history_long NO
+events_waits_current YES
+events_waits_history NO
+events_waits_history_long NO
+global_instrumentation YES
+thread_instrumentation YES
+statements_digest YES
+truncate table performance_schema.events_transactions_current;
+truncate table performance_schema.events_transactions_history;
+truncate table performance_schema.events_transactions_history_long;
+truncate table performance_schema.events_statements_current;
+truncate table performance_schema.events_statements_history;
+truncate table performance_schema.events_statements_history_long;
+truncate table performance_schema.events_stages_current;
+truncate table performance_schema.events_stages_history;
+truncate table performance_schema.events_stages_history_long;
+truncate table performance_schema.events_waits_current;
+truncate table performance_schema.events_waits_history;
+truncate table performance_schema.events_waits_history_long;
+# Switch to connection con1
+connection con1;
+XA START 'XA_CON1', 'XA_BQUAL', 12;
+select "Hi from con1";
+Hi from con1
+Hi from con1
+XA END 'XA_CON1', 'XA_BQUAL', 12;
+XA PREPARE 'XA_CON1', 'XA_BQUAL', 12;
+XA COMMIT 'XA_CON1', 'XA_BQUAL', 12;
+# Switch to connection con2
+connection con2;
+XA START 'XA_CON2', 'XA_BQUAL', 12;
+select "Hi from con2";
+Hi from con2
+Hi from con2
+XA END 'XA_CON2', 'XA_BQUAL', 12;
+XA PREPARE 'XA_CON2', 'XA_BQUAL', 12;
+XA COMMIT 'XA_CON2', 'XA_BQUAL', 12;
+# Switch to connection con3
+connection con3;
+XA START 'XA_CON3', 'XA_BQUAL', 12;
+select "Hi from con3";
+Hi from con3
+Hi from con3
+XA END 'XA_CON3', 'XA_BQUAL', 12;
+XA PREPARE 'XA_CON3', 'XA_BQUAL', 12;
+XA COMMIT 'XA_CON3', 'XA_BQUAL', 12;
+# Switch to connection con4
+connection con4;
+XA START 'XA_CON4', 'XA_BQUAL', 12;
+select "Hi from con4";
+Hi from con4
+Hi from con4
+XA END 'XA_CON4', 'XA_BQUAL', 12;
+XA PREPARE 'XA_CON4', 'XA_BQUAL', 12;
+XA COMMIT 'XA_CON4', 'XA_BQUAL', 12;
+connection default;
+"=========================== Transactions user 1"
+XID_FORMAT_ID XID_GTRID XID_BQUAL
+12 XA_CON1 XA_BQUAL
+count(*)
+0
+count(*)
+0
+"=========================== Transactions user 2"
+XID_FORMAT_ID XID_GTRID XID_BQUAL
+12 XA_CON2 XA_BQUAL
+count(*)
+0
+count(*)
+0
+"=========================== Transactions user 3"
+count(*)
+0
+count(*)
+0
+count(*)
+0
+"=========================== Transactions user 4"
+count(*)
+0
+count(*)
+0
+count(*)
+0
+"=========================== Statements user 1"
+EVENT_NAME SQL_TEXT
+statement/sql/xa_commit XA COMMIT 'XA_CON1', 'XA_BQUAL', 12
+count(*)
+0
+count(*)
+0
+"=========================== Statements user 2"
+EVENT_NAME SQL_TEXT
+statement/sql/xa_commit XA COMMIT 'XA_CON2', 'XA_BQUAL', 12
+count(*)
+0
+count(*)
+0
+"=========================== Statements user 3"
+count(*)
+0
+count(*)
+0
+count(*)
+0
+"=========================== Statements user 4"
+count(*)
+0
+count(*)
+0
+count(*)
+0
+"=========================== Stages user 1"
+EVENT_NAME
+count(*)
+0
+count(*)
+0
+"=========================== Stages user 2"
+EVENT_NAME
+count(*)
+0
+count(*)
+0
+"=========================== Stages user 3"
+count(*)
+0
+count(*)
+0
+count(*)
+0
+"=========================== Stages user 4"
+count(*)
+0
+count(*)
+0
+count(*)
+0
+"=========================== Waits user 1"
+EVENT_NAME
+idle
+has_waits
+0
+has_waits
+0
+"=========================== Waits user 2"
+EVENT_NAME
+idle
+count(*)
+0
+count(*)
+0
+"=========================== Waits user 3"
+count(*)
+0
+count(*)
+0
+count(*)
+0
+"=========================== Waits user 4"
+count(*)
+0
+count(*)
+0
+count(*)
+0
+# Switch to connection default, enable consumers
+connection default;
+update performance_schema.setup_consumers
+set enabled='YES' where name like "%history%";
+select * from performance_schema.setup_consumers;
+NAME ENABLED
+events_stages_current YES
+events_stages_history YES
+events_stages_history_long YES
+events_statements_current YES
+events_statements_history YES
+events_statements_history_long YES
+events_transactions_current YES
+events_transactions_history YES
+events_transactions_history_long YES
+events_waits_current YES
+events_waits_history YES
+events_waits_history_long YES
+global_instrumentation YES
+thread_instrumentation YES
+statements_digest YES
+truncate table performance_schema.events_transactions_current;
+truncate table performance_schema.events_transactions_history;
+truncate table performance_schema.events_transactions_history_long;
+truncate table performance_schema.events_statements_current;
+truncate table performance_schema.events_statements_history;
+truncate table performance_schema.events_statements_history_long;
+truncate table performance_schema.events_stages_current;
+truncate table performance_schema.events_stages_history;
+truncate table performance_schema.events_stages_history_long;
+truncate table performance_schema.events_waits_current;
+truncate table performance_schema.events_waits_history;
+truncate table performance_schema.events_waits_history_long;
+# Switch to connection con1
+connection con1;
+XA START 'XA_CON1', 'XA_BQUAL', 12;
+select "Hi from con1";
+Hi from con1
+Hi from con1
+XA END 'XA_CON1', 'XA_BQUAL', 12;
+XA PREPARE 'XA_CON1', 'XA_BQUAL', 12;
+XA COMMIT 'XA_CON1', 'XA_BQUAL', 12;
+# Switch to connection con2
+connection con2;
+XA START 'XA_CON2', 'XA_BQUAL', 12;
+select "Hi from con2";
+Hi from con2
+Hi from con2
+XA END 'XA_CON2', 'XA_BQUAL', 12;
+XA PREPARE 'XA_CON2', 'XA_BQUAL', 12;
+XA COMMIT 'XA_CON2', 'XA_BQUAL', 12;
+# Switch to connection con3
+connection con3;
+XA START 'XA_CON3', 'XA_BQUAL', 12;
+select "Hi from con3";
+Hi from con3
+Hi from con3
+XA END 'XA_CON3', 'XA_BQUAL', 12;
+XA PREPARE 'XA_CON3', 'XA_BQUAL', 12;
+XA COMMIT 'XA_CON3', 'XA_BQUAL', 12;
+# Switch to connection con4
+connection con4;
+XA START 'XA_CON4', 'XA_BQUAL', 12;
+select "Hi from con4";
+Hi from con4
+Hi from con4
+XA END 'XA_CON4', 'XA_BQUAL', 12;
+XA PREPARE 'XA_CON4', 'XA_BQUAL', 12;
+XA COMMIT 'XA_CON4', 'XA_BQUAL', 12;
+connection default;
+"=========================== Transactions user 1"
+XID_FORMAT_ID XID_GTRID XID_BQUAL
+12 XA_CON1 XA_BQUAL
+XID_FORMAT_ID XID_GTRID XID_BQUAL
+12 XA_CON1 XA_BQUAL
+XID_FORMAT_ID XID_GTRID XID_BQUAL
+12 XA_CON1 XA_BQUAL
+"=========================== Transactions user 2"
+XID_FORMAT_ID XID_GTRID XID_BQUAL
+12 XA_CON2 XA_BQUAL
+count(*)
+0
+count(*)
+0
+"=========================== Transactions user 3"
+count(*)
+0
+count(*)
+0
+count(*)
+0
+"=========================== Transactions user 4"
+count(*)
+0
+count(*)
+0
+count(*)
+0
+"=========================== Statements user 1"
+EVENT_NAME SQL_TEXT
+statement/sql/xa_commit XA COMMIT 'XA_CON1', 'XA_BQUAL', 12
+EVENT_NAME SQL_TEXT
+statement/sql/xa_start XA START 'XA_CON1', 'XA_BQUAL', 12
+statement/sql/select select "Hi from con1"
+statement/sql/xa_end XA END 'XA_CON1', 'XA_BQUAL', 12
+statement/sql/xa_prepare XA PREPARE 'XA_CON1', 'XA_BQUAL', 12
+statement/sql/xa_commit XA COMMIT 'XA_CON1', 'XA_BQUAL', 12
+EVENT_NAME SQL_TEXT
+statement/sql/xa_start XA START 'XA_CON1', 'XA_BQUAL', 12
+statement/sql/select select "Hi from con1"
+statement/sql/xa_end XA END 'XA_CON1', 'XA_BQUAL', 12
+statement/sql/xa_prepare XA PREPARE 'XA_CON1', 'XA_BQUAL', 12
+statement/sql/xa_commit XA COMMIT 'XA_CON1', 'XA_BQUAL', 12
+"=========================== Statements user 2"
+EVENT_NAME SQL_TEXT
+statement/sql/xa_commit XA COMMIT 'XA_CON2', 'XA_BQUAL', 12
+count(*)
+0
+count(*)
+0
+"=========================== Statements user 3"
+count(*)
+0
+count(*)
+0
+count(*)
+0
+"=========================== Statements user 4"
+count(*)
+0
+count(*)
+0
+count(*)
+0
+"=========================== Stages user 1"
+EVENT_NAME
+EVENT_NAME
+stage/sql/Starting cleanup
+stage/sql/Freeing items
+stage/sql/Reset for next command
+stage/sql/starting
+stage/sql/Query end
+stage/sql/Commit
+stage/sql/closing tables
+stage/sql/Starting cleanup
+stage/sql/Freeing items
+stage/sql/Reset for next command
+EVENT_NAME
+stage/sql/starting
+stage/sql/Query end
+stage/sql/Commit
+stage/sql/closing tables
+stage/sql/Starting cleanup
+stage/sql/Freeing items
+stage/sql/Reset for next command
+stage/sql/starting
+stage/sql/checking permissions
+stage/sql/Opening tables
+stage/sql/After opening tables
+stage/sql/init
+stage/sql/Optimizing
+stage/sql/Executing
+stage/sql/End of update loop
+stage/sql/Query end
+stage/sql/Commit
+stage/sql/closing tables
+stage/sql/Starting cleanup
+stage/sql/Freeing items
+stage/sql/Reset for next command
+stage/sql/starting
+stage/sql/Query end
+stage/sql/Commit
+stage/sql/closing tables
+stage/sql/Starting cleanup
+stage/sql/Freeing items
+stage/sql/Reset for next command
+stage/sql/starting
+stage/sql/Query end
+stage/sql/Commit
+stage/sql/closing tables
+stage/sql/Starting cleanup
+stage/sql/Freeing items
+stage/sql/Reset for next command
+stage/sql/starting
+stage/sql/Query end
+stage/sql/Commit
+stage/sql/closing tables
+stage/sql/Starting cleanup
+stage/sql/Freeing items
+stage/sql/Reset for next command
+"=========================== Stages user 2"
+EVENT_NAME
+count(*)
+0
+count(*)
+0
+"=========================== Stages user 3"
+count(*)
+0
+count(*)
+0
+count(*)
+0
+"=========================== Stages user 4"
+count(*)
+0
+count(*)
+0
+count(*)
+0
+"=========================== Waits user 1"
+EVENT_NAME
+idle
+has_waits
+1
+has_waits
+1
+"=========================== Waits user 2"
+EVENT_NAME
+idle
+count(*)
+0
+count(*)
+0
+"=========================== Waits user 3"
+count(*)
+0
+count(*)
+0
+count(*)
+0
+"=========================== Waits user 4"
+count(*)
+0
+count(*)
+0
+count(*)
+0
+# Switch to connection default
+connection default;
+revoke all privileges, grant option from user1@localhost;
+revoke all privileges, grant option from user2@localhost;
+revoke all privileges, grant option from user3@localhost;
+revoke all privileges, grant option from user4@localhost;
+drop user user1@localhost;
+drop user user2@localhost;
+drop user user3@localhost;
+drop user user4@localhost;
+flush privileges;
+truncate table performance_schema.setup_actors;
+insert into performance_schema.setup_actors
+values ('%', '%', '%', 'YES', 'YES');
+select * from performance_schema.setup_actors;
+HOST USER ROLE ENABLED HISTORY
+% % % YES YES
diff --git a/mysql-test/suite/perfschema/r/threads_innodb.result b/mysql-test/suite/perfschema/r/threads_innodb.result
index 2229d972038..d79420f6fb5 100644
--- a/mysql-test/suite/perfschema/r/threads_innodb.result
+++ b/mysql-test/suite/perfschema/r/threads_innodb.result
@@ -5,14 +5,5 @@ FROM performance_schema.threads
WHERE name LIKE 'thread/innodb/%'
GROUP BY name;
name type processlist_user processlist_host processlist_db processlist_command processlist_time processlist_state processlist_info parent_thread_id role instrumented
-thread/innodb/io_ibuf_thread BACKGROUND NULL NULL NULL NULL NULL NULL NULL NULL NULL YES
-thread/innodb/io_log_thread BACKGROUND NULL NULL NULL NULL NULL NULL NULL NULL NULL YES
-thread/innodb/io_read_thread BACKGROUND NULL NULL NULL NULL NULL NULL NULL NULL NULL YES
-thread/innodb/io_write_thread BACKGROUND NULL NULL NULL NULL NULL NULL NULL NULL NULL YES
thread/innodb/page_cleaner_thread BACKGROUND NULL NULL NULL NULL NULL NULL NULL NULL NULL YES
-thread/innodb/srv_error_monitor_thread BACKGROUND NULL NULL NULL NULL NULL NULL NULL NULL NULL YES
-thread/innodb/srv_lock_timeout_thread BACKGROUND NULL NULL NULL NULL NULL NULL NULL NULL NULL YES
-thread/innodb/srv_master_thread BACKGROUND NULL NULL NULL NULL NULL NULL NULL NULL NULL YES
-thread/innodb/srv_monitor_thread BACKGROUND NULL NULL NULL NULL NULL NULL NULL NULL NULL YES
-thread/innodb/srv_purge_thread BACKGROUND NULL NULL NULL NULL NULL NULL NULL NULL NULL YES
-thread/innodb/thd_destructor_thread BACKGROUND NULL NULL NULL NULL NULL NULL NULL 1 NULL YES
+thread/innodb/thread_pool_thread BACKGROUND NULL NULL NULL NULL NULL NULL NULL NULL NULL YES
diff --git a/mysql-test/suite/perfschema/r/threads_mysql_freebsd.result b/mysql-test/suite/perfschema/r/threads_mysql_freebsd.result
new file mode 100644
index 00000000000..36158d06406
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/threads_mysql_freebsd.result
@@ -0,0 +1,3 @@
+SELECT THREAD_ID, NAME, THREAD_OS_ID from performance_schema.threads
+WHERE THREAD_OS_ID is NULL;
+THREAD_ID NAME THREAD_OS_ID
diff --git a/mysql-test/suite/perfschema/r/threads_mysql_linux.result b/mysql-test/suite/perfschema/r/threads_mysql_linux.result
new file mode 100644
index 00000000000..36158d06406
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/threads_mysql_linux.result
@@ -0,0 +1,3 @@
+SELECT THREAD_ID, NAME, THREAD_OS_ID from performance_schema.threads
+WHERE THREAD_OS_ID is NULL;
+THREAD_ID NAME THREAD_OS_ID
diff --git a/mysql-test/suite/perfschema/r/threads_mysql_windows.result b/mysql-test/suite/perfschema/r/threads_mysql_windows.result
new file mode 100644
index 00000000000..36158d06406
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/threads_mysql_windows.result
@@ -0,0 +1,3 @@
+SELECT THREAD_ID, NAME, THREAD_OS_ID from performance_schema.threads
+WHERE THREAD_OS_ID is NULL;
+THREAD_ID NAME THREAD_OS_ID
diff --git a/mysql-test/suite/perfschema/r/transaction.result b/mysql-test/suite/perfschema/r/transaction.result
new file mode 100644
index 00000000000..9a7eb5b3eb5
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/transaction.result
@@ -0,0 +1,680 @@
+set global binlog_format=ROW;
+#
+# ========================================================================
+# STEP 1 - SETUP
+# ========================================================================
+#
+# Control thread
+#
+connection default;
+SET SESSION AUTOCOMMIT= 1;
+SELECT thread_id INTO @my_thread_id
+FROM performance_schema.threads
+WHERE processlist_id = connection_id();
+#
+# Connection 1
+#
+connect con1, localhost, root,,;
+SET SESSION AUTOCOMMIT= 0;
+SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ, READ WRITE;
+connection default;
+#
+# Create test tables, one transactional and one non-transactional
+#
+connection default;
+DROP TABLE IF EXISTS t1;
+DROP TABLE IF EXISTS nt1;
+CREATE TABLE t1 (s1 int, s2 varchar(64)) ENGINE=INNODB;
+CREATE TABLE nt1 (s1 int, s2 varchar(64)) ENGINE=MYISAM;
+#
+# Disable all events from the control thread
+#
+#
+# Clear transaction tables
+#
+CALL clear_transaction_tables();
+#
+# ========================================================================
+# STEP 2 - BASIC TRANSACTION
+# ========================================================================
+#
+connection con1;
+SELECT @@global.tx_isolation;
+@@global.tx_isolation
+REPEATABLE-READ
+SELECT @@global.autocommit;
+@@global.autocommit
+1
+SELECT @@global.binlog_format;
+@@global.binlog_format
+ROW
+SELECT @@tx_isolation;
+@@tx_isolation
+REPEATABLE-READ
+SELECT @@autocommit;
+@@autocommit
+0
+SELECT @@binlog_format;
+@@binlog_format
+ROW
+#
+# STEP 2.1 - START/COMMIT
+#
+START TRANSACTION;
+INSERT INTO t1 VALUES (101, 'COMMITTED');
+COMMIT;
+#
+# STEP 2.2 - ROLLBACK
+#
+START TRANSACTION;
+INSERT INTO t1 VALUES (102, 'ROLLED BACK');
+ROLLBACK;
+#
+## Expect 1 committed and 1 rolled back transaction
+connection default;
+CALL transaction_verifier(1, @con1_thread_id, 'transaction', 'COMMITTED', 0, '', '', '', '', 'READ WRITE', 'REPEATABLE READ', 'NO', 0, 0, 0, 1);
+ACTUAL EXPECTED
+ 1 1
+CALL transaction_verifier(1, @con1_thread_id, 'transaction', 'ROLLED BACK', 0, '', '', '', '', 'READ WRITE', 'REPEATABLE READ', 'NO', 0, 0, 0, 1);
+ACTUAL EXPECTED
+ 1 1
+CALL clear_transaction_tables();
+#
+# STEP 2.3 - COMMIT AND CHAIN
+#
+connection con1;
+START TRANSACTION;
+INSERT INTO t1 VALUES (103, 'COMMIT AND CHAIN');
+COMMIT AND CHAIN;
+INSERT INTO t1 VALUES (104, 'COMMIT AND CHAIN');
+COMMIT;
+#
+## Expect 2 committed transactions
+connection default;
+CALL transaction_verifier(1, @con1_thread_id, 'transaction', 'COMMITTED', 0, '', '', '', '', 'READ WRITE', 'REPEATABLE READ', 'NO', 0, 0, 0, 2);
+ACTUAL EXPECTED
+ 2 2
+CALL clear_transaction_tables();
+#
+# ========================================================================
+# STEP 3 - ISOLATION LEVEL
+# ========================================================================
+#
+# connection con1
+connection con1;
+SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE;
+START TRANSACTION;
+INSERT INTO t1 VALUES (301, 'SERIALIZABLE');
+COMMIT;
+SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ;
+START TRANSACTION;
+INSERT INTO t1 VALUES (302, 'REPEATABLE READ');
+COMMIT;
+SELECT @@binlog_format INTO @binlog_save;
+SET SESSION BINLOG_FORMAT=ROW;
+SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
+START TRANSACTION;
+INSERT INTO t1 VALUES (303, 'READ COMMITTED');
+COMMIT;
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+START TRANSACTION;
+INSERT INTO t1 VALUES (304, 'READ UNCOMMITTED');
+COMMIT;
+SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ;
+SET binlog_format= @binlog_save;
+#
+connection default;
+CALL transaction_verifier(1, @con1_thread_id, 'transaction', 'COMMITTED', 0, '', '', '', '', 'READ WRITE', 'SERIALIZABLE', 'NO', 0, 0, 0, 1);
+ACTUAL EXPECTED
+ 1 1
+CALL transaction_verifier(1, @con1_thread_id, 'transaction', 'COMMITTED', 0, '', '', '', '', 'READ WRITE', 'REPEATABLE READ', 'NO', 0, 0, 0, 1);
+ACTUAL EXPECTED
+ 1 1
+CALL transaction_verifier(1, @con1_thread_id, 'transaction', 'COMMITTED', 0, '', '', '', '', 'READ WRITE', 'READ COMMITTED', 'NO', 0, 0, 0, 1);
+ACTUAL EXPECTED
+ 1 1
+CALL transaction_verifier(1, @con1_thread_id, 'transaction', 'COMMITTED', 0, '', '', '', '', 'READ WRITE', 'READ UNCOMMITTED', 'NO', 0, 0, 0, 1);
+ACTUAL EXPECTED
+ 1 1
+CALL clear_transaction_tables();
+#
+# ========================================================================
+# STEP 4 - ACCESS MODE
+# ========================================================================
+#
+# STEP 4.1 - READ ONLY, TIMING ENABLED
+#
+#
+# connection con1
+connection con1;
+SET SESSION TRANSACTION READ WRITE;
+START TRANSACTION;
+INSERT INTO t1 VALUES (410, 'READ ONLY');
+INSERT INTO t1 VALUES (411, 'READ ONLY');
+INSERT INTO t1 VALUES (412, 'READ ONLY');
+INSERT INTO t1 VALUES (413, 'READ ONLY');
+COMMIT;
+SET SESSION TRANSACTION READ ONLY;
+START TRANSACTION;
+SELECT * FROM t1 ORDER BY s1;
+s1 s2
+101 COMMITTED
+103 COMMIT AND CHAIN
+104 COMMIT AND CHAIN
+301 SERIALIZABLE
+302 REPEATABLE READ
+303 READ COMMITTED
+304 READ UNCOMMITTED
+410 READ ONLY
+411 READ ONLY
+412 READ ONLY
+413 READ ONLY
+COMMIT;
+#
+## Expect 1 read only, committed transaction in events_transactions_history
+connection default;
+CALL transaction_verifier(1, @con1_thread_id, 'transaction', 'COMMITTED', 0, '', '', '', '', 'READ ONLY', 'REPEATABLE READ', 'NO', 0, 0, 0, 1);
+ACTUAL EXPECTED
+ 1 1
+CALL clear_transaction_tables();
+#
+#
+# STEP 4.2 - READ ONLY, TIMING DISABLED
+#
+#
+## Disable timing stats for 'transaction'
+UPDATE performance_schema.setup_instruments SET timed = 'NO' WHERE name = 'transaction';
+#
+TRUNCATE performance_schema.events_transactions_summary_global_by_event_name;
+# connection con1
+connection con1;
+START TRANSACTION;
+SELECT * FROM t1 ORDER BY s1;
+s1 s2
+101 COMMITTED
+103 COMMIT AND CHAIN
+104 COMMIT AND CHAIN
+301 SERIALIZABLE
+302 REPEATABLE READ
+303 READ COMMITTED
+304 READ UNCOMMITTED
+410 READ ONLY
+411 READ ONLY
+412 READ ONLY
+413 READ ONLY
+COMMIT;
+#
+SET SESSION TRANSACTION READ WRITE;
+connection default;
+#
+## Expect 1 event, 0 stats
+SELECT * FROM performance_schema.events_transactions_summary_global_by_event_name;
+EVENT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT COUNT_READ_WRITE SUM_TIMER_READ_WRITE MIN_TIMER_READ_WRITE AVG_TIMER_READ_WRITE MAX_TIMER_READ_WRITE COUNT_READ_ONLY SUM_TIMER_READ_ONLY MIN_TIMER_READ_ONLY AVG_TIMER_READ_ONLY MAX_TIMER_READ_ONLY
+transaction 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0
+#
+## Restore setup_instruments
+UPDATE performance_schema.setup_instruments SET enabled = 'YES' WHERE name = 'transaction';
+#
+# ========================================================================
+# STEP 5 - IMPLICIT START
+# ========================================================================
+# When AUTOCOMMIT is disabled, the first statement following a committed
+# transaction marks the start of a new transaction. Subsequent statements will
+# be part of the transaction until it is committed.
+#
+connection con1;
+SET SESSION AUTOCOMMIT = 0;
+INSERT INTO t1 VALUES (501, 'IMPLICIT START');
+#
+## Expect 1 active transaction in events_transactions_current
+connection default;
+CALL transaction_verifier(0, @con1_thread_id, 'transaction', 'ACTIVE', 0, '', '', '', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1);
+ACTUAL EXPECTED
+ 1 1
+connection con1;
+INSERT INTO t1 VALUES (502, 'IMPLICIT START');
+COMMIT;
+#
+## Expect one committed transaction in events_transactions_current and history
+connection default;
+CALL transaction_verifier(0, @con1_thread_id, 'transaction', 'COMMITTED', 0, '', '', '', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1);
+ACTUAL EXPECTED
+ 1 1
+CALL transaction_verifier(1, @con1_thread_id, 'transaction', 'COMMITTED', 0, '', '', '', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1);
+ACTUAL EXPECTED
+ 1 1
+CALL clear_transaction_tables();
+#
+# ========================================================================
+# STEP 6 - IMPLICIT COMMIT (DDL, ETC)
+# ========================================================================
+# Transactions are implicitly ended by DDL statements, locking statements
+# and server administration commands.
+#
+connection con1;
+SET SESSION AUTOCOMMIT = 0;
+INSERT INTO t1 VALUES (601, 'IMPLICIT COMMIT');
+#
+## Expect one active transaction in events_transactions_current, zero events in history
+connection default;
+CALL transaction_verifier(0, @con1_thread_id, 'transaction', 'ACTIVE', 0, '', '', '', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1);
+ACTUAL EXPECTED
+ 1 1
+CALL transaction_verifier(1, @con1_thread_id, 'transaction', '', 0, '', '', '', '', '', '', 'NO', 0, 0, 0, 0);
+ACTUAL EXPECTED
+ 0 0
+connection con1;
+INSERT INTO t1 VALUES (602, 'IMPLICIT COMMIT');
+## Issue a DDL statement to force a commmit
+CREATE TABLE t2 (s1 INT, s2 VARCHAR(64)) ENGINE=INNODB;
+#
+## Expect 0 active transactions, 1 committed transaction
+connection default;
+CALL transaction_verifier(0, @con1_thread_id, 'transaction', 'ACTIVE', 0, '', '', '', '', 'READ WRITE', '', 'NO', 0, 0, 0, 0);
+ACTUAL EXPECTED
+ 0 0
+CALL transaction_verifier(0, @con1_thread_id, 'transaction', 'COMMITTED', 0, '', '', '', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1);
+ACTUAL EXPECTED
+ 1 1
+CALL transaction_verifier(1, @con1_thread_id, 'transaction', 'COMMITTED', 0, '', '', '', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1);
+ACTUAL EXPECTED
+ 1 1
+CALL clear_transaction_tables();
+DROP TABLE test.t2;
+#
+# ========================================================================
+# STEP 7 - XA TRANSACTIONS
+# ========================================================================
+#
+# STEP 7.1 - XA START
+#
+connection con1;
+XA START 'XA_CON1_GTRID_001', 'XA_CON1_BQUAL_001', 1234567890;
+#
+## Expect 1 active XA transaction, state ACTIVE
+connection default;
+CALL transaction_verifier(0, @con1_thread_id, 'transaction', 'ACTIVE', 1234567890, 'XA_CON1_GTRID_001', 'XA_CON1_BQUAL_001', 'ACTIVE', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1);
+ACTUAL EXPECTED
+ 1 1
+#
+# STEP 7.2 - XA END
+#
+connection con1;
+INSERT INTO t1 VALUES (701, 'XA');
+XA END 'XA_CON1_GTRID_001', 'XA_CON1_BQUAL_001', 1234567890;
+#
+## Expect 1 active XA transaction, state IDLE
+connection default;
+CALL transaction_verifier(0, @con1_thread_id, 'transaction', 'ACTIVE', 1234567890, 'XA_CON1_GTRID_001', 'XA_CON1_BQUAL_001', 'IDLE', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1);
+ACTUAL EXPECTED
+ 1 1
+#
+#
+# STEP 7.3 - XA PREPARE
+#
+connection con1;
+XA PREPARE 'XA_CON1_GTRID_001', 'XA_CON1_BQUAL_001', 1234567890;
+#
+## Expect 1 active XA transaction, state PREPARED
+connection default;
+CALL transaction_verifier(0, @con1_thread_id, 'transaction', 'ACTIVE', 1234567890, 'XA_CON1_GTRID_001', 'XA_CON1_BQUAL_001', 'PREPARED', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1);
+ACTUAL EXPECTED
+ 1 1
+#
+#
+# STEP 7.4 - XA COMMIT
+#
+connection con1;
+XA COMMIT 'XA_CON1_GTRID_001', 'XA_CON1_BQUAL_001', 1234567890;
+#
+## Expect 1 committed XA transaction, state COMMITTED in current and history
+connection default;
+CALL transaction_verifier(0, @con1_thread_id, 'transaction', 'COMMITTED', 1234567890, 'XA_CON1_GTRID_001', 'XA_CON1_BQUAL_001', 'COMMITTED', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1);
+ACTUAL EXPECTED
+ 1 1
+CALL transaction_verifier(1, @con1_thread_id, 'transaction', 'COMMITTED', 1234567890, 'XA_CON1_GTRID_001', 'XA_CON1_BQUAL_001', 'COMMITTED', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1);
+ACTUAL EXPECTED
+ 1 1
+CALL clear_transaction_tables();
+#
+#
+# STEP 7.5 - XA ROLLBACK
+#
+connection con1;
+XA START 'XA_CON1_002';
+INSERT INTO t1 VALUES (702, 'XA');
+XA END 'XA_CON1_002';
+XA PREPARE 'XA_CON1_002';
+#
+## Expect 1 active XA transaction, state PREPARED
+connection default;
+CALL transaction_verifier(0, @con1_thread_id, 'transaction', 'ACTIVE', 0, 'XA_CON1_002', '', 'PREPARED', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1);
+ACTUAL EXPECTED
+ 1 1
+connection con1;
+XA ROLLBACK 'XA_CON1_002';
+#
+## Expect 1 XA transaction, state ROLLBACK ONLY in current and history
+connection default;
+CALL transaction_verifier(0, @con1_thread_id, 'transaction', 'ROLLED BACK', 0, 'XA_CON1_002', '', 'ROLLBACK ONLY', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1);
+ACTUAL EXPECTED
+ 1 1
+CALL transaction_verifier(1, @con1_thread_id, 'transaction', 'ROLLED BACK', 0, 'XA_CON1_002', '', 'ROLLBACK ONLY', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1);
+ACTUAL EXPECTED
+ 1 1
+CALL clear_transaction_tables();
+SELECT * FROM performance_schema.events_transactions_current ORDER BY event_id;
+THREAD_ID EVENT_ID END_EVENT_ID EVENT_NAME STATE TRX_ID GTID XID_FORMAT_ID XID_GTRID XID_BQUAL XA_STATE SOURCE TIMER_START TIMER_END TIMER_WAIT ACCESS_MODE ISOLATION_LEVEL AUTOCOMMIT NUMBER_OF_SAVEPOINTS NUMBER_OF_ROLLBACK_TO_SAVEPOINT NUMBER_OF_RELEASE_SAVEPOINT OBJECT_INSTANCE_BEGIN NESTING_EVENT_ID NESTING_EVENT_TYPE
+#
+# STEP 7.6 - XA TRANSACTION - LONG GTRID AND BQUAL
+#
+connection con1;
+XA START 'GTRID_6789012345678901234567890123456789012345678901234567890123','BQUAL_6789012345678901234567890123456789012345678901234567890123',1234567890;
+INSERT INTO t1 VALUES (703, 'XA LONG');
+XA END 'GTRID_6789012345678901234567890123456789012345678901234567890123','BQUAL_6789012345678901234567890123456789012345678901234567890123',1234567890;
+XA PREPARE 'GTRID_6789012345678901234567890123456789012345678901234567890123','BQUAL_6789012345678901234567890123456789012345678901234567890123',1234567890;
+XA COMMIT 'GTRID_6789012345678901234567890123456789012345678901234567890123','BQUAL_6789012345678901234567890123456789012345678901234567890123',1234567890;
+#
+## Expect 1 committed XA transaction, state COMMITTED in current and history
+connection default;
+CALL transaction_verifier(0, @con1_thread_id, 'transaction', 'COMMITTED', 1234567890, 'GTRID_6789012345678901234567890123456789012345678901234567890123', 'BQUAL_6789012345678901234567890123456789012345678901234567890123', 'COMMITTED', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1);
+ACTUAL EXPECTED
+ 1 1
+CALL transaction_verifier(1, @con1_thread_id, 'transaction', 'COMMITTED', 1234567890, 'GTRID_6789012345678901234567890123456789012345678901234567890123', 'BQUAL_6789012345678901234567890123456789012345678901234567890123', 'COMMITTED', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1);
+ACTUAL EXPECTED
+ 1 1
+CALL clear_transaction_tables();
+#
+# STEP 7.7 - XA TRANSACTION - LONG GTRID AND BINARY BQUAL
+#
+connection con1;
+XA START 'GTRID_6789012345678901234567890123456789012345678901234567890123',0x425155414C5FA5A53839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233,1234567890;
+INSERT INTO t1 VALUES (704, 'XA LONG/BINARY');
+XA END 'GTRID_6789012345678901234567890123456789012345678901234567890123',0x425155414C5FA5A53839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233,1234567890;
+XA PREPARE 'GTRID_6789012345678901234567890123456789012345678901234567890123',0x425155414C5FA5A53839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233,1234567890;
+XA COMMIT 'GTRID_6789012345678901234567890123456789012345678901234567890123',0x425155414C5FA5A53839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233,1234567890;
+#
+## Expect 1 committed XA transaction, state COMMITTED in current and history
+connection default;
+CALL transaction_verifier(0, @con1_thread_id, 'transaction', 'COMMITTED', 1234567890, 'GTRID_6789012345678901234567890123456789012345678901234567890123', '0x425155414C5FA5A53839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233', 'COMMITTED', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1);
+ACTUAL EXPECTED
+ 1 1
+CALL transaction_verifier(1, @con1_thread_id, 'transaction', 'COMMITTED', 1234567890, 'GTRID_6789012345678901234567890123456789012345678901234567890123', '0x425155414C5FA5A53839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233', 'COMMITTED', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1);
+ACTUAL EXPECTED
+ 1 1
+CALL clear_transaction_tables();
+#
+# ========================================================================
+# STEP 8 - TRANSACTIONAL AND NON-TRANSACTIONAL TABLES
+# ========================================================================
+#
+## MariaDB bug: MDEV-6012? MDEV-14436?
+set @mariadb_bug=1;
+connection con1;
+SET SESSION AUTOCOMMIT = 0;
+SELECT * FROM performance_schema.events_transactions_current ORDER BY event_id;
+THREAD_ID EVENT_ID END_EVENT_ID EVENT_NAME STATE TRX_ID GTID XID_FORMAT_ID XID_GTRID XID_BQUAL XA_STATE SOURCE TIMER_START TIMER_END TIMER_WAIT ACCESS_MODE ISOLATION_LEVEL AUTOCOMMIT NUMBER_OF_SAVEPOINTS NUMBER_OF_ROLLBACK_TO_SAVEPOINT NUMBER_OF_RELEASE_SAVEPOINT OBJECT_INSTANCE_BEGIN NESTING_EVENT_ID NESTING_EVENT_TYPE
+#
+#
+# STEP 8.1 - UPDATE NON-TRANSACTIONAL TABLE
+#
+INSERT INTO nt1 VALUES (801, 'NON-TRANSACTIONAL');
+#
+## Expect 0 transactions in events_transactions_current
+connection default;
+CALL transaction_verifier(0, @con1_thread_id, 'transaction', '', 0, '', '', '', '', '', '', '', 0, 0, 0, @mariadb_bug);
+ACTUAL EXPECTED
+ 1 1
+connection con1;
+COMMIT;
+#
+## Expect 0 transactions in events_transactions_history
+connection default;
+CALL transaction_verifier(1, @con1_thread_id, 'transaction', '', 0, '', '', '', '', '', '', '', 0, 0, 0, @mariadb_bug);
+ACTUAL EXPECTED
+ 1 1
+#
+#
+# STEP 8.2 - UPDATE TRANSACTIONAL AND NON-TRANSACTIONAL TABLES
+#
+#
+## First non-transactional...
+#
+connection con1;
+INSERT INTO nt1 VALUES (802, 'NON-TRANSACTIONAL');
+#
+## Expect 0 transactions in events_transactions_current
+connection default;
+CALL transaction_verifier(0, @con1_thread_id, 'transaction', '', 0, '', '', '', '', '', '', '', 0, 0, 0, @mariadb_bug);
+ACTUAL EXPECTED
+ 1 1
+#
+## Now transactional. Transaction should be started.
+connection con1;
+INSERT INTO t1 VALUES (802, 'TRANSACTIONAL');
+#
+## Expect 1 transaction in events_transactions_current
+connection default;
+CALL transaction_verifier(0, @con1_thread_id, 'transaction', 'ACTIVE', 0, '', '', '', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1);
+ACTUAL EXPECTED
+ 1 1
+#
+connection con1;
+COMMIT;
+#
+## Expect 1 committed transaction in events_transactions_current and history
+connection default;
+CALL transaction_verifier(0, @con1_thread_id, 'transaction', 'COMMITTED', 0, '', '', '', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1);
+ACTUAL EXPECTED
+ 1 1
+CALL transaction_verifier(1, @con1_thread_id, 'transaction', 'COMMITTED', 0, '', '', '', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1+@mariadb_bug);
+ACTUAL EXPECTED
+ 2 2
+CALL clear_transaction_tables();
+#
+# ========================================================================
+# STEP 9 - SAVEPOINTS
+# ========================================================================
+#
+# STEP 9.1 - SAVEPOINT 1
+#
+connection con1;
+START TRANSACTION;
+INSERT INTO t1 VALUES (901, 'SAVEPOINT');
+SAVEPOINT SVP001;
+#
+## Expect 1 active transaction with 1 savepoint
+connection default;
+CALL transaction_verifier(0, @con1_thread_id, 'transaction', 'ACTIVE', 0, '', '', '', '', 'READ WRITE', '', 'NO', 1, 0, 0, 1);
+ACTUAL EXPECTED
+ 1 1
+#
+#
+# STEP 9.2 - SAVEPOINTS 2 and 3
+#
+connection con1;
+INSERT INTO t1 VALUES (902, 'SAVEPOINT');
+SAVEPOINT SVP002;
+INSERT INTO t1 VALUES (903, 'SAVEPOINT');
+SAVEPOINT SVP003;
+INSERT INTO t1 VALUES (904, 'SAVEPOINT');
+SELECT COUNT(*) FROM t1 WHERE s1 > 900;
+COUNT(*)
+4
+#
+#
+# STEP 9.3 - ROLLBACK TO SAVEPOINT 2
+#
+connection con1;
+ROLLBACK TO SVP002;
+#
+## Expect 1 active transaction with 3 savepoints, 1 rollback to savepoint
+connection default;
+CALL transaction_verifier(0, @con1_thread_id, 'transaction', 'ACTIVE', 0, '', '', '', '', 'READ WRITE', '', 'NO', 3, 1, 0, 1);
+ACTUAL EXPECTED
+ 1 1
+#
+#
+# STEP 9.4 - RELEASE SAVEPOINT 1
+#
+connection con1;
+RELEASE SAVEPOINT SVP001;
+#
+## Expect 1 active transaction with 3 savepoints, 1 rollback to savepoint, 1 release savepoint
+connection default;
+CALL transaction_verifier(0, @con1_thread_id, 'transaction', 'ACTIVE', 0, '', '', '', '', 'READ WRITE', '', 'NO', 3, 1, 1, 1);
+ACTUAL EXPECTED
+ 1 1
+#
+# STEP 9.5 - COMMIT
+#
+connection con1;
+COMMIT;
+#
+## Expect 1 committed transaction with 3 savepoints, 1 rollback to savepoint, 1 release savepoint
+connection default;
+CALL transaction_verifier(1, @con1_thread_id, 'transaction', 'COMMITTED', 0, '', '', '', '', 'READ WRITE', '', 'NO', 3, 1, 1, 1);
+ACTUAL EXPECTED
+ 1 1
+CALL clear_transaction_tables();
+#
+# ========================================================================
+# STEP 10 - GTIDs
+# ========================================================================
+# GTIDs are tested in transaction_gtid.test.
+#
+# ========================================================================
+# STEP 11 - MISCELLANY
+# ========================================================================
+#
+# STEP 11.1 - TRUNCATE DURING ACTIVE TRANSACTION
+#
+#
+# Verify that truncating events_transactions_current during an active transaction
+# does not leave an orphaned transaction event, and that the row index to
+# events_transactions_history is reset to 0.
+#
+connection con1;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1110, 'INSERT 1110');
+connection default;
+TRUNCATE performance_schema.events_transactions_current;
+connection con1;
+#
+COMMIT;
+#
+START TRANSACTION;
+INSERT INTO t1 VALUES (1111, 'INSERT 1111');
+COMMIT;
+#
+## Expect 1 transaction for connection 1
+connection default;
+CALL transaction_verifier(1, @con1_thread_id, 'transaction', 'COMMITTED', 0, '', '', '', '', '', '', '', 0, 0, 0, 1);
+ACTUAL EXPECTED
+ 1 1
+CALL clear_transaction_tables();
+#
+#
+# STEP 11.2 - DISABLE THREAD INSTRUMENTATION
+#
+connection default;
+UPDATE performance_schema.setup_consumers
+SET enabled = 'NO'
+ WHERE name = 'thread_instrumentation';
+#
+TRUNCATE performance_schema.events_transactions_summary_global_by_event_name;
+connection con1;
+#
+START TRANSACTION;
+INSERT INTO t1 VALUES (1120, 'INSERT 1120');
+COMMIT;
+connection default;
+#
+## Expect 1 event with non-zero summary stats
+SELECT EVENT_NAME, COUNT_STAR, SUM_TIMER_WAIT, MIN_TIMER_WAIT, AVG_TIMER_WAIT, COUNT_READ_WRITE
+FROM performance_schema.events_transactions_summary_global_by_event_name
+WHERE count_star = 1 and sum_timer_wait != 0;
+EVENT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT COUNT_READ_WRITE
+#
+## Disable timing stats for 'transaction'
+UPDATE performance_schema.setup_instruments SET timed = 'NO' WHERE name = 'transaction';
+#
+TRUNCATE performance_schema.events_transactions_summary_global_by_event_name;
+connection default;
+#
+START TRANSACTION;
+INSERT INTO t1 VALUES (1121, 'INSERT 1121');
+COMMIT;
+connection default;
+#
+## Expect 1 event, 0 stats
+SELECT * FROM performance_schema.events_transactions_summary_global_by_event_name;
+EVENT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT COUNT_READ_WRITE SUM_TIMER_READ_WRITE MIN_TIMER_READ_WRITE AVG_TIMER_READ_WRITE MAX_TIMER_READ_WRITE COUNT_READ_ONLY SUM_TIMER_READ_ONLY MIN_TIMER_READ_ONLY AVG_TIMER_READ_ONLY MAX_TIMER_READ_ONLY
+transaction 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0
+#
+## Restore setup_consumers and setup_instruments
+UPDATE performance_schema.setup_consumers SET enabled = 'YES' WHERE name = 'thread_instrumentation';
+UPDATE performance_schema.setup_instruments SET enabled = 'YES' WHERE name = 'transaction';
+#
+DELETE FROM t1;
+CALL clear_history();
+#
+#
+# STEP 11.3 - STATEMENT ROLLBACK - AUTOCOMMIT OFF - BINLOG FORMAT 'STATEMENT'
+#
+connection con1;
+SET SESSION binlog_format = STATEMENT;
+SET SESSION AUTOCOMMIT = 0;
+#
+START TRANSACTION;
+INSERT INTO t1 VALUES (1130, 'INSERT 1130');
+#
+## Expect binlog statement mode error
+UPDATE t1, performance_schema.setup_instruments pfs
+SET t1.s1 = 1, pfs.timed = 'NO';
+#
+COMMIT;
+#
+SET SESSION AUTOCOMMIT = 1;
+#
+## Expect 1 committed transaction
+connection default;
+CALL transaction_verifier(1, @con1_thread_id, 'transaction', 'COMMITTED', 0, '', '', '', '', '', '', 'NO', 0, 0, 0, 1);
+ACTUAL EXPECTED
+ 1 1
+#
+DELETE FROM t1;
+CALL clear_history();
+#
+#
+# STEP 11.4 - STATEMENT ROLLBACK - AUTOCOMMIT ON - BINLOG FORMAT 'STATEMENT'
+#
+connection con1;
+SET SESSION binlog_format = STATEMENT;
+SET SESSION AUTOCOMMIT = 1;
+#
+## Expect binlog statement mode error
+UPDATE t1, performance_schema.setup_instruments pfs
+SET t1.s1 = 1, pfs.timed = 'NO';
+#
+## Expect 1 rolled back transaction
+connection default;
+CALL transaction_verifier(1, @con1_thread_id, 'transaction', 'ROLLED BACK', 0, '', '', '', '', '', '', 'YES', 0, 0, 0, 1);
+ACTUAL EXPECTED
+ 1 1
+CALL clear_history();
+#
+# ========================================================================
+# CLEAN UP
+# ========================================================================
+#
+disconnect con1;
+connection default;
+DROP TABLE t1;
+DROP TABLE nt1;
+DROP PROCEDURE clear_transaction_tables;
+DROP PROCEDURE clear_transaction_history;
+DROP PROCEDURE clear_statement_history;
+DROP PROCEDURE clear_history;
+DROP PROCEDURE transaction_verifier;
+set global binlog_format=default;
diff --git a/mysql-test/suite/perfschema/r/transaction_gtid.result b/mysql-test/suite/perfschema/r/transaction_gtid.result
new file mode 100644
index 00000000000..ed0d743444f
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/transaction_gtid.result
@@ -0,0 +1,171 @@
+include/rpl_init.inc [topology=none]
+==== Configure ====
+SET GLOBAL ENFORCE_GTID_CONSISTENCY = ON;
+CREATE TABLE t1 (a INT);
+==== Test ====
+---- Case 1: Specify ANONYMOUS prior to transaction ----
+* BEGIN ... ROLLBACK
+- history=none current=none
+SET SESSION GTID_NEXT = 'ANONYMOUS';
+BEGIN;
+INSERT INTO t1 VALUES (1);
+ROLLBACK;
+- history=ANONYMOUS current=ANONYMOUS
+* BEGIN ... COMMIT
+- history=none current=none
+SET SESSION GTID_NEXT = 'ANONYMOUS';
+- history=none current=none
+[START] BEGIN;
+- history=none current=AUTOMATIC
+[END] BEGIN;
+- history=none current=ANONYMOUS
+INSERT INTO t1 VALUES (1);
+- history=none current=ANONYMOUS
+COMMIT;
+- history=ANONYMOUS current=ANONYMOUS
+* AUTOCOMMIT = OFF
+SET @@SESSION.AUTOCOMMIT = 0;
+- history=none current=none
+SET SESSION GTID_NEXT = 'ANONYMOUS';
+- history=none current=none
+[START] INSERT INTO t1 VALUES (1);
+- history=none current=ANONYMOUS
+[END] INSERT INTO t1 VALUES (1);
+- history=none current=ANONYMOUS
+COMMIT;
+- history=ANONYMOUS current=ANONYMOUS
+* AUTOCOMMIT = ON
+SET @@SESSION.AUTOCOMMIT = 1;
+- history=none current=none
+SET SESSION GTID_NEXT = 'ANONYMOUS';
+- history=none current=none
+[START] INSERT INTO t1 VALUES (1);
+- history=none current=ANONYMOUS
+[END] INSERT INTO t1 VALUES (1);
+- history=ANONYMOUS current=ANONYMOUS
+---- Case 2: Generate ANONYMOUS at commit ----
+* BEGIN ... ROLLBACK
+- history=none current=none
+SET SESSION GTID_NEXT = 'AUTOMATIC';
+BEGIN;
+INSERT INTO t1 VALUES (2);
+ROLLBACK;
+- history=AUTOMATIC current=AUTOMATIC
+* BEGIN ... COMMIT
+- history=none current=none
+SET SESSION GTID_NEXT = 'AUTOMATIC';
+- history=none current=none
+[START] BEGIN;
+- history=none current=AUTOMATIC
+[END] BEGIN;
+- history=none current=AUTOMATIC
+INSERT INTO t1 VALUES (2);
+- history=none current=AUTOMATIC
+COMMIT;
+- history=ANONYMOUS current=ANONYMOUS
+* AUTOCOMMIT = OFF
+SET @@SESSION.AUTOCOMMIT = 0;
+- history=none current=none
+SET SESSION GTID_NEXT = 'AUTOMATIC';
+- history=none current=none
+[START] INSERT INTO t1 VALUES (2);
+- history=none current=AUTOMATIC
+[END] INSERT INTO t1 VALUES (2);
+- history=none current=AUTOMATIC
+COMMIT;
+- history=ANONYMOUS current=ANONYMOUS
+* AUTOCOMMIT = ON
+SET @@SESSION.AUTOCOMMIT = 1;
+- history=none current=none
+SET SESSION GTID_NEXT = 'AUTOMATIC';
+- history=none current=none
+[START] INSERT INTO t1 VALUES (2);
+- history=none current=AUTOMATIC
+[END] INSERT INTO t1 VALUES (2);
+- history=ANONYMOUS current=ANONYMOUS
+include/rpl_set_gtid_mode.inc [ON on servers 1]
+---- Case 3: Specify GTID prior to transaction ----
+* BEGIN ... ROLLBACK
+- history=none current=none
+SET SESSION GTID_NEXT = 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:1';
+BEGIN;
+INSERT INTO t1 VALUES (3);
+ROLLBACK;
+- history=A:1 current=A:1
+* BEGIN ... COMMIT
+- history=none current=none
+SET SESSION GTID_NEXT = 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:1';
+- history=none current=none
+[START] BEGIN;
+- history=none current=AUTOMATIC
+[END] BEGIN;
+- history=none current=A:1
+INSERT INTO t1 VALUES (3);
+- history=none current=A:1
+COMMIT;
+- history=A:1 current=A:1
+* AUTOCOMMIT = OFF
+SET @@SESSION.AUTOCOMMIT = 0;
+- history=none current=none
+SET SESSION GTID_NEXT = 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:1';
+- history=none current=none
+[START] INSERT INTO t1 VALUES (3);
+- history=none current=A:1
+[END] INSERT INTO t1 VALUES (3);
+- history=none current=A:1
+COMMIT;
+- history=A:1 current=A:1
+* AUTOCOMMIT = ON
+SET @@SESSION.AUTOCOMMIT = 1;
+- history=none current=none
+SET SESSION GTID_NEXT = 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:1';
+- history=none current=none
+[START] INSERT INTO t1 VALUES (3);
+- history=none current=A:1
+[END] INSERT INTO t1 VALUES (3);
+- history=A:1 current=A:1
+---- Case 4: Generate GTID at commit ----
+* BEGIN ... ROLLBACK
+- history=none current=none
+SET SESSION GTID_NEXT = 'AUTOMATIC';
+BEGIN;
+INSERT INTO t1 VALUES (4);
+ROLLBACK;
+- history=AUTOMATIC current=AUTOMATIC
+* BEGIN ... COMMIT
+- history=none current=none
+SET SESSION GTID_NEXT = 'AUTOMATIC';
+- history=none current=none
+[START] BEGIN;
+- history=none current=AUTOMATIC
+[END] BEGIN;
+- history=none current=AUTOMATIC
+INSERT INTO t1 VALUES (4);
+- history=none current=AUTOMATIC
+COMMIT;
+- history=SERVER_UUID:1 current=SERVER_UUID:1
+* AUTOCOMMIT = OFF
+SET @@SESSION.AUTOCOMMIT = 0;
+- history=none current=none
+SET SESSION GTID_NEXT = 'AUTOMATIC';
+- history=none current=none
+[START] INSERT INTO t1 VALUES (4);
+- history=none current=AUTOMATIC
+[END] INSERT INTO t1 VALUES (4);
+- history=none current=AUTOMATIC
+COMMIT;
+- history=SERVER_UUID:1 current=SERVER_UUID:1
+* AUTOCOMMIT = ON
+SET @@SESSION.AUTOCOMMIT = 1;
+- history=none current=none
+SET SESSION GTID_NEXT = 'AUTOMATIC';
+- history=none current=none
+[START] INSERT INTO t1 VALUES (4);
+- history=none current=AUTOMATIC
+[END] INSERT INTO t1 VALUES (4);
+- history=SERVER_UUID:1 current=SERVER_UUID:1
+==== Clean up ====
+DROP TABLE t1;
+include/rpl_set_gtid_mode.inc [OFF on servers 1]
+SET GLOBAL ENFORCE_GTID_CONSISTENCY = OFF;
+include/rpl_end.inc
diff --git a/mysql-test/suite/perfschema/r/transaction_nested_events.result b/mysql-test/suite/perfschema/r/transaction_nested_events.result
new file mode 100644
index 00000000000..52fa3783a8b
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/transaction_nested_events.result
@@ -0,0 +1,1284 @@
+#
+#========================================================================
+# STEP 1 - SETUP
+#========================================================================
+#
+## Setup control thread
+#
+connection default;
+SET SESSION AUTOCOMMIT= 1;
+USE test;
+DROP DATABASE IF EXISTS db;
+#
+## Create test database, test tables, one transactional and one non-transactional
+CREATE DATABASE db;
+CREATE TABLE db.t1 (s1 int, s2 varchar(64)) ENGINE=INNODB;
+CREATE TABLE db.nt1 (s1 int, s2 varchar(64)) ENGINE=MYISAM;
+#
+## Setup connection 1
+connect con1, localhost, root,,;
+USE db;
+SET SESSION AUTOCOMMIT = 1;
+SELECT thread_id INTO @my_thread_id
+FROM performance_schema.threads
+WHERE processlist_id = connection_id();
+connection default;
+#
+## Disable events from the control (default) connection
+UPDATE performance_schema.threads SET instrumented = 'NO' WHERE processlist_id = CONNECTION_ID();
+SET @all_threads= 0;
+#
+## Enable only transaction and statement instruments
+UPDATE performance_schema.setup_instruments SET enabled='NO', timed='NO';
+UPDATE performance_schema.setup_instruments SET enabled='YES'
+ WHERE name LIKE ('statement/%') OR name = 'transaction';
+#
+## Clear statement and transaction history
+CALL test.clear_history();
+#
+#========================================================================
+# STEP 2 - BASIC TRANSACTION
+#========================================================================
+#
+# STEP 2.1 - IMPLICIT
+#
+connection con1;
+INSERT INTO t1 VALUES (210, "INSERT 210");
+INSERT INTO t1 VALUES (211, "INSERT 211");
+INSERT INTO t1 VALUES (212, "INSERT 212");
+UPDATE t1 SET s1 = s1 + 1 WHERE s1 = 212;
+connection default;
+#========================================================================
+# Verify
+#========================================================================
+SELECT event_id into @base_tx_event_id
+from performance_schema.events_transactions_history_long
+where (THREAD_ID = @con1_thread_id)
+order by event_id limit 1;
+SELECT event_id into @base_stmt_event_id from performance_schema.events_statements_history_long
+where (THREAD_ID = @con1_thread_id)
+order by event_id limit 1;
+select if(@base_tx_event_id < @base_stmt_event_id,
+@base_tx_event_id - 1,
+@base_stmt_event_id - 1)
+into @base_event_id;
+#
+# EVENTS_TRANSACTIONS_CURRENT
+#
+SELECT THREAD_ID,
+LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
+LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
+RPAD(EVENT_NAME, 11, ' ') 'EVENT_NAME ',
+RPAD(STATE, 11, ' ') 'STATE ',
+RPAD(ACCESS_MODE, 11, ' ') ACCESS_MODE,
+RPAD(ISOLATION_LEVEL, 16, ' ') 'ISOLATION_LEVEL ',
+RPAD(AUTOCOMMIT, 4, ' ') AUTO,
+LPAD(NESTING_EVENT_ID - @base_event_id, 19, ' ') as R_NESTING_EVENT_ID,
+RPAD(IFNULL(NESTING_EVENT_TYPE, 'NULL'), 18, ' ') NESTING_EVENT_TYPE
+FROM performance_schema.events_transactions_current
+WHERE ((THREAD_ID = @con1_thread_id) OR (@all_threads = 1))
+ORDER BY thread_id, event_id;
+THREAD_ID R_EVENT_ID R_END_EVENT_ID EVENT_NAME STATE ACCESS_MODE ISOLATION_LEVEL AUTO R_NESTING_EVENT_ID NESTING_EVENT_TYPE
+thread_id 8 8 transaction COMMITTED READ WRITE REPEATABLE READ YES 7 STATEMENT
+#
+# EVENTS_TRANSACTIONS_HISTORY_LONG
+#
+SELECT THREAD_ID,
+LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
+LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
+RPAD(EVENT_NAME, 11, ' ') 'EVENT_NAME ',
+RPAD(STATE, 11, ' ') 'STATE ',
+RPAD(ACCESS_MODE, 11, ' ') ACCESS_MODE,
+RPAD(ISOLATION_LEVEL, 16, ' ') 'ISOLATION_LEVEL ',
+RPAD(AUTOCOMMIT, 4, ' ') AUTO,
+LPAD(NESTING_EVENT_ID - @base_event_id, 19, ' ') as R_NESTING_EVENT_ID,
+RPAD(IFNULL(NESTING_EVENT_TYPE, 'NULL'), 18, ' ') NESTING_EVENT_TYPE
+FROM performance_schema.events_transactions_history_long
+WHERE ((THREAD_ID = @con1_thread_id) OR (@all_threads = 1))
+ORDER BY thread_id, event_id;
+THREAD_ID R_EVENT_ID R_END_EVENT_ID EVENT_NAME STATE ACCESS_MODE ISOLATION_LEVEL AUTO R_NESTING_EVENT_ID NESTING_EVENT_TYPE
+thread_id 2 2 transaction COMMITTED READ WRITE REPEATABLE READ YES 1 STATEMENT
+thread_id 4 4 transaction COMMITTED READ WRITE REPEATABLE READ YES 3 STATEMENT
+thread_id 6 6 transaction COMMITTED READ WRITE REPEATABLE READ YES 5 STATEMENT
+thread_id 8 8 transaction COMMITTED READ WRITE REPEATABLE READ YES 7 STATEMENT
+#
+# EVENTS_STATEMENTS_HISTORY_LONG
+#
+SELECT THREAD_ID,
+LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
+LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
+RPAD(EVENT_NAME, 30, ' ') 'EVENT_NAME ',
+RPAD(IFNULL(object_name, 'NULL'), 12, ' ') 'OBJECT_NAME ',
+LPAD(IFNULL(NESTING_EVENT_ID - @base_event_id, 'NULL'), 19, ' ') as R_NESTING_EVENT_ID,
+RPAD(IFNULL(NESTING_EVENT_TYPE, 'NULL'), 18, ' ') NESTING_EVENT_TYPE,
+LPAD(NESTING_EVENT_LEVEL, 5, ' ') LEVEL,
+SQL_TEXT
+FROM performance_schema.events_statements_history_long
+WHERE ((THREAD_ID = @con1_thread_id) OR (@all_threads = 1))
+ORDER BY thread_id, event_id;
+THREAD_ID R_EVENT_ID R_END_EVENT_ID EVENT_NAME OBJECT_NAME R_NESTING_EVENT_ID NESTING_EVENT_TYPE LEVEL SQL_TEXT
+thread_id 1 2 statement/sql/insert NULL NULL NULL 0 INSERT INTO t1 VALUES (210, "INSERT 210")
+thread_id 3 4 statement/sql/insert NULL NULL NULL 0 INSERT INTO t1 VALUES (211, "INSERT 211")
+thread_id 5 6 statement/sql/insert NULL NULL NULL 0 INSERT INTO t1 VALUES (212, "INSERT 212")
+thread_id 7 8 statement/sql/update NULL NULL NULL 0 UPDATE t1 SET s1 = s1 + 1 WHERE s1 = 212
+#
+### Combined statement and transaction event history ordered by event id
+#
+#EVENTS_STATEMENTS_HISTORY_LONG + EVENTS_TRANSACTIONS_HISTORY_LONG
+#
+SELECT THREAD_ID,
+LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
+LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
+RPAD(EVENT_NAME, 25, ' ') 'EVENT_NAME ',
+LPAD(NESTING_EVENT_ID - @base_event_id, 19, ' ') as R_NESTING_EVENT_ID,
+RPAD(IFNULL(NESTING_EVENT_TYPE, 'NULL'), 18, ' ') NESTING_EVENT_TYPE,
+'<transaction started>' AS SQL_TXT
+FROM performance_schema.events_transactions_history_long t
+WHERE (t.thread_id = @con1_thread_id)
+UNION
+SELECT THREAD_ID,
+LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
+LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
+RPAD(EVENT_NAME, 25, ' ') 'EVENT_NAME ',
+LPAD(IFNULL(NESTING_EVENT_ID - @base_event_id, 'NULL'), 19, ' ') as R_NESTING_EVENT_ID,
+RPAD(IFNULL(NESTING_EVENT_TYPE, 'NULL'), 18, ' ') NESTING_EVENT_TYPE,
+SQL_TEXT
+FROM performance_schema.events_statements_history_long s
+WHERE ((s.thread_id = @con1_thread_id) OR (@all_threads = 1))
+ORDER BY thread_id, r_event_id;
+THREAD_ID R_EVENT_ID R_END_EVENT_ID EVENT_NAME R_NESTING_EVENT_ID NESTING_EVENT_TYPE SQL_TXT
+thread_id 1 2 statement/sql/insert NULL NULL INSERT INTO t1 VALUES (210, "INSERT 210")
+thread_id 2 2 transaction 1 STATEMENT <transaction started>
+thread_id 3 4 statement/sql/insert NULL NULL INSERT INTO t1 VALUES (211, "INSERT 211")
+thread_id 4 4 transaction 3 STATEMENT <transaction started>
+thread_id 5 6 statement/sql/insert NULL NULL INSERT INTO t1 VALUES (212, "INSERT 212")
+thread_id 6 6 transaction 5 STATEMENT <transaction started>
+thread_id 7 8 statement/sql/update NULL NULL UPDATE t1 SET s1 = s1 + 1 WHERE s1 = 212
+thread_id 8 8 transaction 7 STATEMENT <transaction started>
+#
+### Clear statement and transaction history
+# CALL test.clear_history();
+CALL test.clear_history();
+## Reset db.t1
+DELETE FROM db.t1;
+#
+#
+# STEP 2.2 - EXPLICIT
+#
+connection con1;
+START TRANSACTION;
+INSERT INTO t1 VALUES (220, "INSERT 220"), (221, "INSERT 221");
+UPDATE t1 SET s2 = "UPDATE 221" WHERE s1 = 221;
+COMMIT;
+connection default;
+#========================================================================
+# Verify
+#========================================================================
+SELECT event_id into @base_tx_event_id
+from performance_schema.events_transactions_history_long
+where (THREAD_ID = @con1_thread_id)
+order by event_id limit 1;
+SELECT event_id into @base_stmt_event_id from performance_schema.events_statements_history_long
+where (THREAD_ID = @con1_thread_id)
+order by event_id limit 1;
+select if(@base_tx_event_id < @base_stmt_event_id,
+@base_tx_event_id - 1,
+@base_stmt_event_id - 1)
+into @base_event_id;
+#
+# EVENTS_TRANSACTIONS_CURRENT
+#
+SELECT THREAD_ID,
+LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
+LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
+RPAD(EVENT_NAME, 11, ' ') 'EVENT_NAME ',
+RPAD(STATE, 11, ' ') 'STATE ',
+RPAD(ACCESS_MODE, 11, ' ') ACCESS_MODE,
+RPAD(ISOLATION_LEVEL, 16, ' ') 'ISOLATION_LEVEL ',
+RPAD(AUTOCOMMIT, 4, ' ') AUTO,
+LPAD(NESTING_EVENT_ID - @base_event_id, 19, ' ') as R_NESTING_EVENT_ID,
+RPAD(IFNULL(NESTING_EVENT_TYPE, 'NULL'), 18, ' ') NESTING_EVENT_TYPE
+FROM performance_schema.events_transactions_current
+WHERE ((THREAD_ID = @con1_thread_id) OR (@all_threads = 1))
+ORDER BY thread_id, event_id;
+THREAD_ID R_EVENT_ID R_END_EVENT_ID EVENT_NAME STATE ACCESS_MODE ISOLATION_LEVEL AUTO R_NESTING_EVENT_ID NESTING_EVENT_TYPE
+thread_id 2 5 transaction COMMITTED READ WRITE REPEATABLE READ NO 1 STATEMENT
+#
+# EVENTS_TRANSACTIONS_HISTORY_LONG
+#
+SELECT THREAD_ID,
+LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
+LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
+RPAD(EVENT_NAME, 11, ' ') 'EVENT_NAME ',
+RPAD(STATE, 11, ' ') 'STATE ',
+RPAD(ACCESS_MODE, 11, ' ') ACCESS_MODE,
+RPAD(ISOLATION_LEVEL, 16, ' ') 'ISOLATION_LEVEL ',
+RPAD(AUTOCOMMIT, 4, ' ') AUTO,
+LPAD(NESTING_EVENT_ID - @base_event_id, 19, ' ') as R_NESTING_EVENT_ID,
+RPAD(IFNULL(NESTING_EVENT_TYPE, 'NULL'), 18, ' ') NESTING_EVENT_TYPE
+FROM performance_schema.events_transactions_history_long
+WHERE ((THREAD_ID = @con1_thread_id) OR (@all_threads = 1))
+ORDER BY thread_id, event_id;
+THREAD_ID R_EVENT_ID R_END_EVENT_ID EVENT_NAME STATE ACCESS_MODE ISOLATION_LEVEL AUTO R_NESTING_EVENT_ID NESTING_EVENT_TYPE
+thread_id 2 5 transaction COMMITTED READ WRITE REPEATABLE READ NO 1 STATEMENT
+#
+# EVENTS_STATEMENTS_HISTORY_LONG
+#
+SELECT THREAD_ID,
+LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
+LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
+RPAD(EVENT_NAME, 30, ' ') 'EVENT_NAME ',
+RPAD(IFNULL(object_name, 'NULL'), 12, ' ') 'OBJECT_NAME ',
+LPAD(IFNULL(NESTING_EVENT_ID - @base_event_id, 'NULL'), 19, ' ') as R_NESTING_EVENT_ID,
+RPAD(IFNULL(NESTING_EVENT_TYPE, 'NULL'), 18, ' ') NESTING_EVENT_TYPE,
+LPAD(NESTING_EVENT_LEVEL, 5, ' ') LEVEL,
+SQL_TEXT
+FROM performance_schema.events_statements_history_long
+WHERE ((THREAD_ID = @con1_thread_id) OR (@all_threads = 1))
+ORDER BY thread_id, event_id;
+THREAD_ID R_EVENT_ID R_END_EVENT_ID EVENT_NAME OBJECT_NAME R_NESTING_EVENT_ID NESTING_EVENT_TYPE LEVEL SQL_TEXT
+thread_id 1 2 statement/sql/begin NULL NULL NULL 0 START TRANSACTION
+thread_id 3 3 statement/sql/insert NULL 2 TRANSACTION 0 INSERT INTO t1 VALUES (220, "INSERT 220"), (221, "INSERT 221")
+thread_id 4 4 statement/sql/update NULL 2 TRANSACTION 0 UPDATE t1 SET s2 = "UPDATE 221" WHERE s1 = 221
+thread_id 5 5 statement/sql/commit NULL 2 TRANSACTION 0 COMMIT
+#
+### Combined statement and transaction event history ordered by event id
+#
+#EVENTS_STATEMENTS_HISTORY_LONG + EVENTS_TRANSACTIONS_HISTORY_LONG
+#
+SELECT THREAD_ID,
+LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
+LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
+RPAD(EVENT_NAME, 25, ' ') 'EVENT_NAME ',
+LPAD(NESTING_EVENT_ID - @base_event_id, 19, ' ') as R_NESTING_EVENT_ID,
+RPAD(IFNULL(NESTING_EVENT_TYPE, 'NULL'), 18, ' ') NESTING_EVENT_TYPE,
+'<transaction started>' AS SQL_TXT
+FROM performance_schema.events_transactions_history_long t
+WHERE (t.thread_id = @con1_thread_id)
+UNION
+SELECT THREAD_ID,
+LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
+LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
+RPAD(EVENT_NAME, 25, ' ') 'EVENT_NAME ',
+LPAD(IFNULL(NESTING_EVENT_ID - @base_event_id, 'NULL'), 19, ' ') as R_NESTING_EVENT_ID,
+RPAD(IFNULL(NESTING_EVENT_TYPE, 'NULL'), 18, ' ') NESTING_EVENT_TYPE,
+SQL_TEXT
+FROM performance_schema.events_statements_history_long s
+WHERE ((s.thread_id = @con1_thread_id) OR (@all_threads = 1))
+ORDER BY thread_id, r_event_id;
+THREAD_ID R_EVENT_ID R_END_EVENT_ID EVENT_NAME R_NESTING_EVENT_ID NESTING_EVENT_TYPE SQL_TXT
+thread_id 1 2 statement/sql/begin NULL NULL START TRANSACTION
+thread_id 2 5 transaction 1 STATEMENT <transaction started>
+thread_id 3 3 statement/sql/insert 2 TRANSACTION INSERT INTO t1 VALUES (220, "INSERT 220"), (221, "INSERT 221")
+thread_id 4 4 statement/sql/update 2 TRANSACTION UPDATE t1 SET s2 = "UPDATE 221" WHERE s1 = 221
+thread_id 5 5 statement/sql/commit 2 TRANSACTION COMMIT
+#
+### Clear statement and transaction history
+# CALL test.clear_history();
+CALL test.clear_history();
+## Reset db.t1
+DELETE FROM db.t1;
+#
+#========================================================================
+# STEP 3 - TRANSACTIONS AND STORED PROCEDURES
+#========================================================================
+#
+# STEP 3.1 - STORED PROCEDURE STARTED WITHIN TRANSACTION
+#
+connection con1;
+CREATE PROCEDURE tp_update() UPDATE t1 SET s1 = s1 + 1;
+#
+START TRANSACTION;
+INSERT INTO t1 VALUES (310, "INSERT 310");
+INSERT INTO t1 VALUES (311, "INSERT 311");
+INSERT INTO t1 VALUES (312, "INSERT 312");
+INSERT INTO t1 VALUES (313, "INSERT 313");
+CALL tp_update();
+COMMIT;
+connection default;
+#========================================================================
+# Verify
+#========================================================================
+SELECT event_id into @base_tx_event_id
+from performance_schema.events_transactions_history_long
+where (THREAD_ID = @con1_thread_id)
+order by event_id limit 1;
+SELECT event_id into @base_stmt_event_id from performance_schema.events_statements_history_long
+where (THREAD_ID = @con1_thread_id)
+order by event_id limit 1;
+select if(@base_tx_event_id < @base_stmt_event_id,
+@base_tx_event_id - 1,
+@base_stmt_event_id - 1)
+into @base_event_id;
+#
+# EVENTS_TRANSACTIONS_CURRENT
+#
+SELECT THREAD_ID,
+LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
+LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
+RPAD(EVENT_NAME, 11, ' ') 'EVENT_NAME ',
+RPAD(STATE, 11, ' ') 'STATE ',
+RPAD(ACCESS_MODE, 11, ' ') ACCESS_MODE,
+RPAD(ISOLATION_LEVEL, 16, ' ') 'ISOLATION_LEVEL ',
+RPAD(AUTOCOMMIT, 4, ' ') AUTO,
+LPAD(NESTING_EVENT_ID - @base_event_id, 19, ' ') as R_NESTING_EVENT_ID,
+RPAD(IFNULL(NESTING_EVENT_TYPE, 'NULL'), 18, ' ') NESTING_EVENT_TYPE
+FROM performance_schema.events_transactions_current
+WHERE ((THREAD_ID = @con1_thread_id) OR (@all_threads = 1))
+ORDER BY thread_id, event_id;
+THREAD_ID R_EVENT_ID R_END_EVENT_ID EVENT_NAME STATE ACCESS_MODE ISOLATION_LEVEL AUTO R_NESTING_EVENT_ID NESTING_EVENT_TYPE
+thread_id 10 12 transaction COMMITTED READ WRITE REPEATABLE READ NO 9 STATEMENT
+#
+# EVENTS_TRANSACTIONS_HISTORY_LONG
+#
+SELECT THREAD_ID,
+LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
+LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
+RPAD(EVENT_NAME, 11, ' ') 'EVENT_NAME ',
+RPAD(STATE, 11, ' ') 'STATE ',
+RPAD(ACCESS_MODE, 11, ' ') ACCESS_MODE,
+RPAD(ISOLATION_LEVEL, 16, ' ') 'ISOLATION_LEVEL ',
+RPAD(AUTOCOMMIT, 4, ' ') AUTO,
+LPAD(NESTING_EVENT_ID - @base_event_id, 19, ' ') as R_NESTING_EVENT_ID,
+RPAD(IFNULL(NESTING_EVENT_TYPE, 'NULL'), 18, ' ') NESTING_EVENT_TYPE
+FROM performance_schema.events_transactions_history_long
+WHERE ((THREAD_ID = @con1_thread_id) OR (@all_threads = 1))
+ORDER BY thread_id, event_id;
+THREAD_ID R_EVENT_ID R_END_EVENT_ID EVENT_NAME STATE ACCESS_MODE ISOLATION_LEVEL AUTO R_NESTING_EVENT_ID NESTING_EVENT_TYPE
+thread_id 2 2 transaction COMMITTED READ WRITE REPEATABLE READ YES 1 STATEMENT
+thread_id 10 10 transaction COMMITTED READ WRITE REPEATABLE READ NO 9 STATEMENT
+thread_id 10 12 transaction COMMITTED READ WRITE REPEATABLE READ NO 9 STATEMENT
+#
+# EVENTS_STATEMENTS_HISTORY_LONG
+#
+SELECT THREAD_ID,
+LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
+LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
+RPAD(EVENT_NAME, 30, ' ') 'EVENT_NAME ',
+RPAD(IFNULL(object_name, 'NULL'), 12, ' ') 'OBJECT_NAME ',
+LPAD(IFNULL(NESTING_EVENT_ID - @base_event_id, 'NULL'), 19, ' ') as R_NESTING_EVENT_ID,
+RPAD(IFNULL(NESTING_EVENT_TYPE, 'NULL'), 18, ' ') NESTING_EVENT_TYPE,
+LPAD(NESTING_EVENT_LEVEL, 5, ' ') LEVEL,
+SQL_TEXT
+FROM performance_schema.events_statements_history_long
+WHERE ((THREAD_ID = @con1_thread_id) OR (@all_threads = 1))
+ORDER BY thread_id, event_id;
+THREAD_ID R_EVENT_ID R_END_EVENT_ID EVENT_NAME OBJECT_NAME R_NESTING_EVENT_ID NESTING_EVENT_TYPE LEVEL SQL_TEXT
+thread_id 1 2 statement/sql/create_procedure NULL NULL NULL 0 CREATE PROCEDURE tp_update() UPDATE t1 SET s1 = s1 + 1
+thread_id 3 4 statement/sql/begin NULL NULL NULL 0 START TRANSACTION
+thread_id 5 5 statement/sql/insert NULL 4 TRANSACTION 0 INSERT INTO t1 VALUES (310, "INSERT 310")
+thread_id 6 6 statement/sql/insert NULL 4 TRANSACTION 0 INSERT INTO t1 VALUES (311, "INSERT 311")
+thread_id 7 7 statement/sql/insert NULL 4 TRANSACTION 0 INSERT INTO t1 VALUES (312, "INSERT 312")
+thread_id 8 8 statement/sql/insert NULL 4 TRANSACTION 0 INSERT INTO t1 VALUES (313, "INSERT 313")
+thread_id 9 11 statement/sql/call_procedure NULL 4 TRANSACTION 0 CALL tp_update()
+thread_id 11 11 statement/sp/stmt tp_update 9 STATEMENT 1 UPDATE t1 SET s1 = s1 + 1
+thread_id 12 12 statement/sql/commit NULL NULL NULL 0 COMMIT
+#
+### Combined statement and transaction event history ordered by event id
+#
+#EVENTS_STATEMENTS_HISTORY_LONG + EVENTS_TRANSACTIONS_HISTORY_LONG
+#
+SELECT THREAD_ID,
+LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
+LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
+RPAD(EVENT_NAME, 25, ' ') 'EVENT_NAME ',
+LPAD(NESTING_EVENT_ID - @base_event_id, 19, ' ') as R_NESTING_EVENT_ID,
+RPAD(IFNULL(NESTING_EVENT_TYPE, 'NULL'), 18, ' ') NESTING_EVENT_TYPE,
+'<transaction started>' AS SQL_TXT
+FROM performance_schema.events_transactions_history_long t
+WHERE (t.thread_id = @con1_thread_id)
+UNION
+SELECT THREAD_ID,
+LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
+LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
+RPAD(EVENT_NAME, 25, ' ') 'EVENT_NAME ',
+LPAD(IFNULL(NESTING_EVENT_ID - @base_event_id, 'NULL'), 19, ' ') as R_NESTING_EVENT_ID,
+RPAD(IFNULL(NESTING_EVENT_TYPE, 'NULL'), 18, ' ') NESTING_EVENT_TYPE,
+SQL_TEXT
+FROM performance_schema.events_statements_history_long s
+WHERE ((s.thread_id = @con1_thread_id) OR (@all_threads = 1))
+ORDER BY thread_id, r_event_id;
+THREAD_ID R_EVENT_ID R_END_EVENT_ID EVENT_NAME R_NESTING_EVENT_ID NESTING_EVENT_TYPE SQL_TXT
+thread_id 1 2 statement/sql/create_proc NULL NULL CREATE PROCEDURE tp_update() UPDATE t1 SET s1 = s1 + 1
+thread_id 2 2 transaction 1 STATEMENT <transaction started>
+thread_id 3 4 statement/sql/begin NULL NULL START TRANSACTION
+thread_id 5 5 statement/sql/insert 4 TRANSACTION INSERT INTO t1 VALUES (310, "INSERT 310")
+thread_id 6 6 statement/sql/insert 4 TRANSACTION INSERT INTO t1 VALUES (311, "INSERT 311")
+thread_id 7 7 statement/sql/insert 4 TRANSACTION INSERT INTO t1 VALUES (312, "INSERT 312")
+thread_id 8 8 statement/sql/insert 4 TRANSACTION INSERT INTO t1 VALUES (313, "INSERT 313")
+thread_id 9 11 statement/sql/call_proced 4 TRANSACTION CALL tp_update()
+thread_id 10 10 transaction 9 STATEMENT <transaction started>
+thread_id 10 12 transaction 9 STATEMENT <transaction started>
+thread_id 11 11 statement/sp/stmt 9 STATEMENT UPDATE t1 SET s1 = s1 + 1
+thread_id 12 12 statement/sql/commit NULL NULL COMMIT
+#
+### Clear statement and transaction history
+# CALL test.clear_history();
+CALL test.clear_history();
+## Reset db.t1
+DELETE FROM db.t1;
+#
+#
+# STEP 3.2 - TRANSACTION STARTED WITHIN STORED PROCEDURE
+#
+connection con1;
+CREATE PROCEDURE tp_start() START TRANSACTION;
+#
+CALL tp_start();
+INSERT INTO t1 VALUES (320, "INSERT 320"),(321, "INSERT 321");
+INSERT INTO t1 VALUES (322, "INSERT 322"),(323, "INSERT 323");
+UPDATE t1 SET s1 = s1 + 1 WHERE s1 > 320;
+#
+SELECT * FROM t1 ORDER BY s1;
+s1 s2
+320 INSERT 320
+322 INSERT 321
+323 INSERT 322
+324 INSERT 323
+COMMIT;
+connection default;
+#========================================================================
+# Verify
+#========================================================================
+SELECT event_id into @base_tx_event_id
+from performance_schema.events_transactions_history_long
+where (THREAD_ID = @con1_thread_id)
+order by event_id limit 1;
+SELECT event_id into @base_stmt_event_id from performance_schema.events_statements_history_long
+where (THREAD_ID = @con1_thread_id)
+order by event_id limit 1;
+select if(@base_tx_event_id < @base_stmt_event_id,
+@base_tx_event_id - 1,
+@base_stmt_event_id - 1)
+into @base_event_id;
+#
+# EVENTS_TRANSACTIONS_CURRENT
+#
+SELECT THREAD_ID,
+LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
+LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
+RPAD(EVENT_NAME, 11, ' ') 'EVENT_NAME ',
+RPAD(STATE, 11, ' ') 'STATE ',
+RPAD(ACCESS_MODE, 11, ' ') ACCESS_MODE,
+RPAD(ISOLATION_LEVEL, 16, ' ') 'ISOLATION_LEVEL ',
+RPAD(AUTOCOMMIT, 4, ' ') AUTO,
+LPAD(NESTING_EVENT_ID - @base_event_id, 19, ' ') as R_NESTING_EVENT_ID,
+RPAD(IFNULL(NESTING_EVENT_TYPE, 'NULL'), 18, ' ') NESTING_EVENT_TYPE
+FROM performance_schema.events_transactions_current
+WHERE ((THREAD_ID = @con1_thread_id) OR (@all_threads = 1))
+ORDER BY thread_id, event_id;
+THREAD_ID R_EVENT_ID R_END_EVENT_ID EVENT_NAME STATE ACCESS_MODE ISOLATION_LEVEL AUTO R_NESTING_EVENT_ID NESTING_EVENT_TYPE
+thread_id 6 11 transaction COMMITTED READ WRITE REPEATABLE READ NO 5 STATEMENT
+#
+# EVENTS_TRANSACTIONS_HISTORY_LONG
+#
+SELECT THREAD_ID,
+LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
+LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
+RPAD(EVENT_NAME, 11, ' ') 'EVENT_NAME ',
+RPAD(STATE, 11, ' ') 'STATE ',
+RPAD(ACCESS_MODE, 11, ' ') ACCESS_MODE,
+RPAD(ISOLATION_LEVEL, 16, ' ') 'ISOLATION_LEVEL ',
+RPAD(AUTOCOMMIT, 4, ' ') AUTO,
+LPAD(NESTING_EVENT_ID - @base_event_id, 19, ' ') as R_NESTING_EVENT_ID,
+RPAD(IFNULL(NESTING_EVENT_TYPE, 'NULL'), 18, ' ') NESTING_EVENT_TYPE
+FROM performance_schema.events_transactions_history_long
+WHERE ((THREAD_ID = @con1_thread_id) OR (@all_threads = 1))
+ORDER BY thread_id, event_id;
+THREAD_ID R_EVENT_ID R_END_EVENT_ID EVENT_NAME STATE ACCESS_MODE ISOLATION_LEVEL AUTO R_NESTING_EVENT_ID NESTING_EVENT_TYPE
+thread_id 2 2 transaction COMMITTED READ WRITE REPEATABLE READ YES 1 STATEMENT
+thread_id 4 4 transaction COMMITTED READ WRITE REPEATABLE READ YES 3 STATEMENT
+thread_id 6 11 transaction COMMITTED READ WRITE REPEATABLE READ NO 5 STATEMENT
+#
+# EVENTS_STATEMENTS_HISTORY_LONG
+#
+SELECT THREAD_ID,
+LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
+LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
+RPAD(EVENT_NAME, 30, ' ') 'EVENT_NAME ',
+RPAD(IFNULL(object_name, 'NULL'), 12, ' ') 'OBJECT_NAME ',
+LPAD(IFNULL(NESTING_EVENT_ID - @base_event_id, 'NULL'), 19, ' ') as R_NESTING_EVENT_ID,
+RPAD(IFNULL(NESTING_EVENT_TYPE, 'NULL'), 18, ' ') NESTING_EVENT_TYPE,
+LPAD(NESTING_EVENT_LEVEL, 5, ' ') LEVEL,
+SQL_TEXT
+FROM performance_schema.events_statements_history_long
+WHERE ((THREAD_ID = @con1_thread_id) OR (@all_threads = 1))
+ORDER BY thread_id, event_id;
+THREAD_ID R_EVENT_ID R_END_EVENT_ID EVENT_NAME OBJECT_NAME R_NESTING_EVENT_ID NESTING_EVENT_TYPE LEVEL SQL_TEXT
+thread_id 1 2 statement/sql/create_procedure NULL NULL NULL 0 CREATE PROCEDURE tp_start() START TRANSACTION
+thread_id 3 6 statement/sql/call_procedure NULL NULL NULL 0 CALL tp_start()
+thread_id 5 6 statement/sp/stmt tp_start 3 STATEMENT 1 START TRANSACTION
+thread_id 7 7 statement/sql/insert NULL 6 TRANSACTION 0 INSERT INTO t1 VALUES (320, "INSERT 320"),(321, "INSERT 321")
+thread_id 8 8 statement/sql/insert NULL 6 TRANSACTION 0 INSERT INTO t1 VALUES (322, "INSERT 322"),(323, "INSERT 323")
+thread_id 9 9 statement/sql/update NULL 6 TRANSACTION 0 UPDATE t1 SET s1 = s1 + 1 WHERE s1 > 320
+thread_id 10 10 statement/sql/select NULL 6 TRANSACTION 0 SELECT * FROM t1 ORDER BY s1
+thread_id 11 11 statement/sql/commit NULL 6 TRANSACTION 0 COMMIT
+#
+### Combined statement and transaction event history ordered by event id
+#
+#EVENTS_STATEMENTS_HISTORY_LONG + EVENTS_TRANSACTIONS_HISTORY_LONG
+#
+SELECT THREAD_ID,
+LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
+LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
+RPAD(EVENT_NAME, 25, ' ') 'EVENT_NAME ',
+LPAD(NESTING_EVENT_ID - @base_event_id, 19, ' ') as R_NESTING_EVENT_ID,
+RPAD(IFNULL(NESTING_EVENT_TYPE, 'NULL'), 18, ' ') NESTING_EVENT_TYPE,
+'<transaction started>' AS SQL_TXT
+FROM performance_schema.events_transactions_history_long t
+WHERE (t.thread_id = @con1_thread_id)
+UNION
+SELECT THREAD_ID,
+LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
+LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
+RPAD(EVENT_NAME, 25, ' ') 'EVENT_NAME ',
+LPAD(IFNULL(NESTING_EVENT_ID - @base_event_id, 'NULL'), 19, ' ') as R_NESTING_EVENT_ID,
+RPAD(IFNULL(NESTING_EVENT_TYPE, 'NULL'), 18, ' ') NESTING_EVENT_TYPE,
+SQL_TEXT
+FROM performance_schema.events_statements_history_long s
+WHERE ((s.thread_id = @con1_thread_id) OR (@all_threads = 1))
+ORDER BY thread_id, r_event_id;
+THREAD_ID R_EVENT_ID R_END_EVENT_ID EVENT_NAME R_NESTING_EVENT_ID NESTING_EVENT_TYPE SQL_TXT
+thread_id 1 2 statement/sql/create_proc NULL NULL CREATE PROCEDURE tp_start() START TRANSACTION
+thread_id 2 2 transaction 1 STATEMENT <transaction started>
+thread_id 3 6 statement/sql/call_proced NULL NULL CALL tp_start()
+thread_id 4 4 transaction 3 STATEMENT <transaction started>
+thread_id 5 6 statement/sp/stmt 3 STATEMENT START TRANSACTION
+thread_id 6 11 transaction 5 STATEMENT <transaction started>
+thread_id 7 7 statement/sql/insert 6 TRANSACTION INSERT INTO t1 VALUES (320, "INSERT 320"),(321, "INSERT 321")
+thread_id 8 8 statement/sql/insert 6 TRANSACTION INSERT INTO t1 VALUES (322, "INSERT 322"),(323, "INSERT 323")
+thread_id 9 9 statement/sql/update 6 TRANSACTION UPDATE t1 SET s1 = s1 + 1 WHERE s1 > 320
+thread_id 10 10 statement/sql/select 6 TRANSACTION SELECT * FROM t1 ORDER BY s1
+thread_id 11 11 statement/sql/commit 6 TRANSACTION COMMIT
+#
+### Clear statement and transaction history
+# CALL test.clear_history();
+CALL test.clear_history();
+## Reset db.t1
+DELETE FROM db.t1;
+#
+#
+# STEP 3.3 - TRANSACTION ENDED WITHIN STORED PROCEDURE
+#
+connection con1;
+CREATE PROCEDURE tp_rollback() ROLLBACK;
+CREATE PROCEDURE tp_commit() COMMIT;
+#
+## COMMIT within stored procedure
+START TRANSACTION;
+INSERT INTO t1 VALUES (330, "INSERT 330"),(331, "INSERT 331");
+INSERT INTO t1 VALUES (332, "INSERT 332"),(333, "INSERT 333");
+DELETE FROM t1 WHERE s1 > 331;
+CALL tp_commit();
+#
+SELECT * FROM t1 ORDER BY s1;
+s1 s2
+330 INSERT 330
+331 INSERT 331
+#
+## ROLLBACK within stored procedure
+START TRANSACTION;
+UPDATE t1 SET s1 = s1*2 WHERE s1 > 331;
+CALL tp_rollback();
+#
+SELECT * FROM t1 ORDER BY s1;
+s1 s2
+330 INSERT 330
+331 INSERT 331
+connection default;
+#========================================================================
+# Verify
+#========================================================================
+SELECT event_id into @base_tx_event_id
+from performance_schema.events_transactions_history_long
+where (THREAD_ID = @con1_thread_id)
+order by event_id limit 1;
+SELECT event_id into @base_stmt_event_id from performance_schema.events_statements_history_long
+where (THREAD_ID = @con1_thread_id)
+order by event_id limit 1;
+select if(@base_tx_event_id < @base_stmt_event_id,
+@base_tx_event_id - 1,
+@base_stmt_event_id - 1)
+into @base_event_id;
+#
+# EVENTS_TRANSACTIONS_CURRENT
+#
+SELECT THREAD_ID,
+LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
+LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
+RPAD(EVENT_NAME, 11, ' ') 'EVENT_NAME ',
+RPAD(STATE, 11, ' ') 'STATE ',
+RPAD(ACCESS_MODE, 11, ' ') ACCESS_MODE,
+RPAD(ISOLATION_LEVEL, 16, ' ') 'ISOLATION_LEVEL ',
+RPAD(AUTOCOMMIT, 4, ' ') AUTO,
+LPAD(NESTING_EVENT_ID - @base_event_id, 19, ' ') as R_NESTING_EVENT_ID,
+RPAD(IFNULL(NESTING_EVENT_TYPE, 'NULL'), 18, ' ') NESTING_EVENT_TYPE
+FROM performance_schema.events_transactions_current
+WHERE ((THREAD_ID = @con1_thread_id) OR (@all_threads = 1))
+ORDER BY thread_id, event_id;
+THREAD_ID R_EVENT_ID R_END_EVENT_ID EVENT_NAME STATE ACCESS_MODE ISOLATION_LEVEL AUTO R_NESTING_EVENT_ID NESTING_EVENT_TYPE
+thread_id 22 22 transaction COMMITTED READ WRITE REPEATABLE READ YES 21 STATEMENT
+#
+# EVENTS_TRANSACTIONS_HISTORY_LONG
+#
+SELECT THREAD_ID,
+LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
+LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
+RPAD(EVENT_NAME, 11, ' ') 'EVENT_NAME ',
+RPAD(STATE, 11, ' ') 'STATE ',
+RPAD(ACCESS_MODE, 11, ' ') ACCESS_MODE,
+RPAD(ISOLATION_LEVEL, 16, ' ') 'ISOLATION_LEVEL ',
+RPAD(AUTOCOMMIT, 4, ' ') AUTO,
+LPAD(NESTING_EVENT_ID - @base_event_id, 19, ' ') as R_NESTING_EVENT_ID,
+RPAD(IFNULL(NESTING_EVENT_TYPE, 'NULL'), 18, ' ') NESTING_EVENT_TYPE
+FROM performance_schema.events_transactions_history_long
+WHERE ((THREAD_ID = @con1_thread_id) OR (@all_threads = 1))
+ORDER BY thread_id, event_id;
+THREAD_ID R_EVENT_ID R_END_EVENT_ID EVENT_NAME STATE ACCESS_MODE ISOLATION_LEVEL AUTO R_NESTING_EVENT_ID NESTING_EVENT_TYPE
+thread_id 2 2 transaction COMMITTED READ WRITE REPEATABLE READ YES 1 STATEMENT
+thread_id 4 4 transaction COMMITTED READ WRITE REPEATABLE READ YES 3 STATEMENT
+thread_id 11 11 transaction COMMITTED READ WRITE REPEATABLE READ NO 10 STATEMENT
+thread_id 11 12 transaction COMMITTED READ WRITE REPEATABLE READ NO 10 STATEMENT
+thread_id 14 14 transaction COMMITTED READ WRITE REPEATABLE READ YES 13 STATEMENT
+thread_id 19 19 transaction COMMITTED READ WRITE REPEATABLE READ NO 18 STATEMENT
+thread_id 19 20 transaction ROLLED BACK READ WRITE REPEATABLE READ NO 18 STATEMENT
+thread_id 22 22 transaction COMMITTED READ WRITE REPEATABLE READ YES 21 STATEMENT
+#
+# EVENTS_STATEMENTS_HISTORY_LONG
+#
+SELECT THREAD_ID,
+LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
+LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
+RPAD(EVENT_NAME, 30, ' ') 'EVENT_NAME ',
+RPAD(IFNULL(object_name, 'NULL'), 12, ' ') 'OBJECT_NAME ',
+LPAD(IFNULL(NESTING_EVENT_ID - @base_event_id, 'NULL'), 19, ' ') as R_NESTING_EVENT_ID,
+RPAD(IFNULL(NESTING_EVENT_TYPE, 'NULL'), 18, ' ') NESTING_EVENT_TYPE,
+LPAD(NESTING_EVENT_LEVEL, 5, ' ') LEVEL,
+SQL_TEXT
+FROM performance_schema.events_statements_history_long
+WHERE ((THREAD_ID = @con1_thread_id) OR (@all_threads = 1))
+ORDER BY thread_id, event_id;
+THREAD_ID R_EVENT_ID R_END_EVENT_ID EVENT_NAME OBJECT_NAME R_NESTING_EVENT_ID NESTING_EVENT_TYPE LEVEL SQL_TEXT
+thread_id 1 2 statement/sql/create_procedure NULL NULL NULL 0 CREATE PROCEDURE tp_rollback() ROLLBACK
+thread_id 3 4 statement/sql/create_procedure NULL NULL NULL 0 CREATE PROCEDURE tp_commit() COMMIT
+thread_id 5 6 statement/sql/begin NULL NULL NULL 0 START TRANSACTION
+thread_id 7 7 statement/sql/insert NULL 6 TRANSACTION 0 INSERT INTO t1 VALUES (330, "INSERT 330"),(331, "INSERT 331")
+thread_id 8 8 statement/sql/insert NULL 6 TRANSACTION 0 INSERT INTO t1 VALUES (332, "INSERT 332"),(333, "INSERT 333")
+thread_id 9 9 statement/sql/delete NULL 6 TRANSACTION 0 DELETE FROM t1 WHERE s1 > 331
+thread_id 10 12 statement/sql/call_procedure NULL 6 TRANSACTION 0 CALL tp_commit()
+thread_id 12 12 statement/sp/stmt tp_commit 10 STATEMENT 1 COMMIT
+thread_id 13 14 statement/sql/select NULL NULL NULL 0 SELECT * FROM t1 ORDER BY s1
+thread_id 15 16 statement/sql/begin NULL NULL NULL 0 START TRANSACTION
+thread_id 17 17 statement/sql/update NULL 16 TRANSACTION 0 UPDATE t1 SET s1 = s1*2 WHERE s1 > 331
+thread_id 18 20 statement/sql/call_procedure NULL 16 TRANSACTION 0 CALL tp_rollback()
+thread_id 20 20 statement/sp/stmt tp_rollback 18 STATEMENT 1 ROLLBACK
+thread_id 21 22 statement/sql/select NULL NULL NULL 0 SELECT * FROM t1 ORDER BY s1
+#
+### Combined statement and transaction event history ordered by event id
+#
+#EVENTS_STATEMENTS_HISTORY_LONG + EVENTS_TRANSACTIONS_HISTORY_LONG
+#
+SELECT THREAD_ID,
+LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
+LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
+RPAD(EVENT_NAME, 25, ' ') 'EVENT_NAME ',
+LPAD(NESTING_EVENT_ID - @base_event_id, 19, ' ') as R_NESTING_EVENT_ID,
+RPAD(IFNULL(NESTING_EVENT_TYPE, 'NULL'), 18, ' ') NESTING_EVENT_TYPE,
+'<transaction started>' AS SQL_TXT
+FROM performance_schema.events_transactions_history_long t
+WHERE (t.thread_id = @con1_thread_id)
+UNION
+SELECT THREAD_ID,
+LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
+LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
+RPAD(EVENT_NAME, 25, ' ') 'EVENT_NAME ',
+LPAD(IFNULL(NESTING_EVENT_ID - @base_event_id, 'NULL'), 19, ' ') as R_NESTING_EVENT_ID,
+RPAD(IFNULL(NESTING_EVENT_TYPE, 'NULL'), 18, ' ') NESTING_EVENT_TYPE,
+SQL_TEXT
+FROM performance_schema.events_statements_history_long s
+WHERE ((s.thread_id = @con1_thread_id) OR (@all_threads = 1))
+ORDER BY thread_id, r_event_id;
+THREAD_ID R_EVENT_ID R_END_EVENT_ID EVENT_NAME R_NESTING_EVENT_ID NESTING_EVENT_TYPE SQL_TXT
+thread_id 1 2 statement/sql/create_proc NULL NULL CREATE PROCEDURE tp_rollback() ROLLBACK
+thread_id 2 2 transaction 1 STATEMENT <transaction started>
+thread_id 3 4 statement/sql/create_proc NULL NULL CREATE PROCEDURE tp_commit() COMMIT
+thread_id 4 4 transaction 3 STATEMENT <transaction started>
+thread_id 5 6 statement/sql/begin NULL NULL START TRANSACTION
+thread_id 7 7 statement/sql/insert 6 TRANSACTION INSERT INTO t1 VALUES (330, "INSERT 330"),(331, "INSERT 331")
+thread_id 8 8 statement/sql/insert 6 TRANSACTION INSERT INTO t1 VALUES (332, "INSERT 332"),(333, "INSERT 333")
+thread_id 9 9 statement/sql/delete 6 TRANSACTION DELETE FROM t1 WHERE s1 > 331
+thread_id 10 12 statement/sql/call_proced 6 TRANSACTION CALL tp_commit()
+thread_id 11 11 transaction 10 STATEMENT <transaction started>
+thread_id 11 12 transaction 10 STATEMENT <transaction started>
+thread_id 12 12 statement/sp/stmt 10 STATEMENT COMMIT
+thread_id 13 14 statement/sql/select NULL NULL SELECT * FROM t1 ORDER BY s1
+thread_id 14 14 transaction 13 STATEMENT <transaction started>
+thread_id 15 16 statement/sql/begin NULL NULL START TRANSACTION
+thread_id 17 17 statement/sql/update 16 TRANSACTION UPDATE t1 SET s1 = s1*2 WHERE s1 > 331
+thread_id 18 20 statement/sql/call_proced 16 TRANSACTION CALL tp_rollback()
+thread_id 19 19 transaction 18 STATEMENT <transaction started>
+thread_id 19 20 transaction 18 STATEMENT <transaction started>
+thread_id 20 20 statement/sp/stmt 18 STATEMENT ROLLBACK
+thread_id 21 22 statement/sql/select NULL NULL SELECT * FROM t1 ORDER BY s1
+thread_id 22 22 transaction 21 STATEMENT <transaction started>
+#
+### Clear statement and transaction history
+# CALL test.clear_history();
+CALL test.clear_history();
+## Reset db.t1
+DELETE FROM db.t1;
+#
+#========================================================================
+# STEP 4 - TRANSACTIONS AND STORED FUNCTIONS
+#========================================================================
+#
+#
+# STEP 4.1 - FUNCTION WITHIN A TRANSACTION
+#
+connection con1;
+CREATE FUNCTION fn_add(x INT, y INT) RETURNS INT
+BEGIN
+INSERT INTO t1 VALUES (x, "INSERT x"),(y, "INSERT y");
+RETURN x+y;
+END |
+#
+## Clear history
+connection default;
+CALL test.clear_history();
+connection con1;
+#
+START TRANSACTION;
+INSERT INTO t1 VALUES (410, "INSERT 410");
+INSERT INTO t1 VALUES (411, "INSERT 411");
+INSERT INTO t1 VALUES (412, "INSERT 412");
+DELETE FROM t1 WHERE s1 > 410;
+#
+SELECT * FROM t1 ORDER BY s1;
+s1 s2
+410 INSERT 410
+#
+SELECT fn_add(413, 414);
+fn_add(413, 414)
+827
+COMMIT;
+#
+SELECT * FROM t1 ORDER BY s1;
+s1 s2
+410 INSERT 410
+413 INSERT x
+414 INSERT y
+connection default;
+#========================================================================
+# Verify
+#========================================================================
+SELECT event_id into @base_tx_event_id
+from performance_schema.events_transactions_history_long
+where (THREAD_ID = @con1_thread_id)
+order by event_id limit 1;
+SELECT event_id into @base_stmt_event_id from performance_schema.events_statements_history_long
+where (THREAD_ID = @con1_thread_id)
+order by event_id limit 1;
+select if(@base_tx_event_id < @base_stmt_event_id,
+@base_tx_event_id - 1,
+@base_stmt_event_id - 1)
+into @base_event_id;
+#
+# EVENTS_TRANSACTIONS_CURRENT
+#
+SELECT THREAD_ID,
+LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
+LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
+RPAD(EVENT_NAME, 11, ' ') 'EVENT_NAME ',
+RPAD(STATE, 11, ' ') 'STATE ',
+RPAD(ACCESS_MODE, 11, ' ') ACCESS_MODE,
+RPAD(ISOLATION_LEVEL, 16, ' ') 'ISOLATION_LEVEL ',
+RPAD(AUTOCOMMIT, 4, ' ') AUTO,
+LPAD(NESTING_EVENT_ID - @base_event_id, 19, ' ') as R_NESTING_EVENT_ID,
+RPAD(IFNULL(NESTING_EVENT_TYPE, 'NULL'), 18, ' ') NESTING_EVENT_TYPE
+FROM performance_schema.events_transactions_current
+WHERE ((THREAD_ID = @con1_thread_id) OR (@all_threads = 1))
+ORDER BY thread_id, event_id;
+THREAD_ID R_EVENT_ID R_END_EVENT_ID EVENT_NAME STATE ACCESS_MODE ISOLATION_LEVEL AUTO R_NESTING_EVENT_ID NESTING_EVENT_TYPE
+thread_id 14 14 transaction COMMITTED READ WRITE REPEATABLE READ YES 13 STATEMENT
+#
+# EVENTS_TRANSACTIONS_HISTORY_LONG
+#
+SELECT THREAD_ID,
+LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
+LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
+RPAD(EVENT_NAME, 11, ' ') 'EVENT_NAME ',
+RPAD(STATE, 11, ' ') 'STATE ',
+RPAD(ACCESS_MODE, 11, ' ') ACCESS_MODE,
+RPAD(ISOLATION_LEVEL, 16, ' ') 'ISOLATION_LEVEL ',
+RPAD(AUTOCOMMIT, 4, ' ') AUTO,
+LPAD(NESTING_EVENT_ID - @base_event_id, 19, ' ') as R_NESTING_EVENT_ID,
+RPAD(IFNULL(NESTING_EVENT_TYPE, 'NULL'), 18, ' ') NESTING_EVENT_TYPE
+FROM performance_schema.events_transactions_history_long
+WHERE ((THREAD_ID = @con1_thread_id) OR (@all_threads = 1))
+ORDER BY thread_id, event_id;
+THREAD_ID R_EVENT_ID R_END_EVENT_ID EVENT_NAME STATE ACCESS_MODE ISOLATION_LEVEL AUTO R_NESTING_EVENT_ID NESTING_EVENT_TYPE
+thread_id 9 9 transaction COMMITTED READ WRITE REPEATABLE READ NO 8 STATEMENT
+thread_id 9 12 transaction COMMITTED READ WRITE REPEATABLE READ NO 8 STATEMENT
+thread_id 14 14 transaction COMMITTED READ WRITE REPEATABLE READ YES 13 STATEMENT
+#
+# EVENTS_STATEMENTS_HISTORY_LONG
+#
+SELECT THREAD_ID,
+LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
+LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
+RPAD(EVENT_NAME, 30, ' ') 'EVENT_NAME ',
+RPAD(IFNULL(object_name, 'NULL'), 12, ' ') 'OBJECT_NAME ',
+LPAD(IFNULL(NESTING_EVENT_ID - @base_event_id, 'NULL'), 19, ' ') as R_NESTING_EVENT_ID,
+RPAD(IFNULL(NESTING_EVENT_TYPE, 'NULL'), 18, ' ') NESTING_EVENT_TYPE,
+LPAD(NESTING_EVENT_LEVEL, 5, ' ') LEVEL,
+SQL_TEXT
+FROM performance_schema.events_statements_history_long
+WHERE ((THREAD_ID = @con1_thread_id) OR (@all_threads = 1))
+ORDER BY thread_id, event_id;
+THREAD_ID R_EVENT_ID R_END_EVENT_ID EVENT_NAME OBJECT_NAME R_NESTING_EVENT_ID NESTING_EVENT_TYPE LEVEL SQL_TEXT
+thread_id 1 2 statement/sql/begin NULL NULL NULL 0 START TRANSACTION
+thread_id 3 3 statement/sql/insert NULL 2 TRANSACTION 0 INSERT INTO t1 VALUES (410, "INSERT 410")
+thread_id 4 4 statement/sql/insert NULL 2 TRANSACTION 0 INSERT INTO t1 VALUES (411, "INSERT 411")
+thread_id 5 5 statement/sql/insert NULL 2 TRANSACTION 0 INSERT INTO t1 VALUES (412, "INSERT 412")
+thread_id 6 6 statement/sql/delete NULL 2 TRANSACTION 0 DELETE FROM t1 WHERE s1 > 410
+thread_id 7 7 statement/sql/select NULL 2 TRANSACTION 0 SELECT * FROM t1 ORDER BY s1
+thread_id 8 11 statement/sql/select NULL 2 TRANSACTION 0 SELECT fn_add(413, 414)
+thread_id 10 10 statement/sp/stmt fn_add 8 STATEMENT 1 INSERT INTO t1 VALUES (x, "INSERT x"),(y, "INSERT y")
+thread_id 11 11 statement/sp/freturn fn_add 8 STATEMENT 1 NULL
+thread_id 12 12 statement/sql/commit NULL NULL NULL 0 COMMIT
+thread_id 13 14 statement/sql/select NULL NULL NULL 0 SELECT * FROM t1 ORDER BY s1
+#
+### Combined statement and transaction event history ordered by event id
+#
+#EVENTS_STATEMENTS_HISTORY_LONG + EVENTS_TRANSACTIONS_HISTORY_LONG
+#
+SELECT THREAD_ID,
+LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
+LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
+RPAD(EVENT_NAME, 25, ' ') 'EVENT_NAME ',
+LPAD(NESTING_EVENT_ID - @base_event_id, 19, ' ') as R_NESTING_EVENT_ID,
+RPAD(IFNULL(NESTING_EVENT_TYPE, 'NULL'), 18, ' ') NESTING_EVENT_TYPE,
+'<transaction started>' AS SQL_TXT
+FROM performance_schema.events_transactions_history_long t
+WHERE (t.thread_id = @con1_thread_id)
+UNION
+SELECT THREAD_ID,
+LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
+LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
+RPAD(EVENT_NAME, 25, ' ') 'EVENT_NAME ',
+LPAD(IFNULL(NESTING_EVENT_ID - @base_event_id, 'NULL'), 19, ' ') as R_NESTING_EVENT_ID,
+RPAD(IFNULL(NESTING_EVENT_TYPE, 'NULL'), 18, ' ') NESTING_EVENT_TYPE,
+SQL_TEXT
+FROM performance_schema.events_statements_history_long s
+WHERE ((s.thread_id = @con1_thread_id) OR (@all_threads = 1))
+ORDER BY thread_id, r_event_id;
+THREAD_ID R_EVENT_ID R_END_EVENT_ID EVENT_NAME R_NESTING_EVENT_ID NESTING_EVENT_TYPE SQL_TXT
+thread_id 1 2 statement/sql/begin NULL NULL START TRANSACTION
+thread_id 3 3 statement/sql/insert 2 TRANSACTION INSERT INTO t1 VALUES (410, "INSERT 410")
+thread_id 4 4 statement/sql/insert 2 TRANSACTION INSERT INTO t1 VALUES (411, "INSERT 411")
+thread_id 5 5 statement/sql/insert 2 TRANSACTION INSERT INTO t1 VALUES (412, "INSERT 412")
+thread_id 6 6 statement/sql/delete 2 TRANSACTION DELETE FROM t1 WHERE s1 > 410
+thread_id 7 7 statement/sql/select 2 TRANSACTION SELECT * FROM t1 ORDER BY s1
+thread_id 8 11 statement/sql/select 2 TRANSACTION SELECT fn_add(413, 414)
+thread_id 9 9 transaction 8 STATEMENT <transaction started>
+thread_id 9 12 transaction 8 STATEMENT <transaction started>
+thread_id 10 10 statement/sp/stmt 8 STATEMENT INSERT INTO t1 VALUES (x, "INSERT x"),(y, "INSERT y")
+thread_id 11 11 statement/sp/freturn 8 STATEMENT NULL
+thread_id 12 12 statement/sql/commit NULL NULL COMMIT
+thread_id 13 14 statement/sql/select NULL NULL SELECT * FROM t1 ORDER BY s1
+thread_id 14 14 transaction 13 STATEMENT <transaction started>
+#
+### Clear statement and transaction history
+# CALL test.clear_history();
+CALL test.clear_history();
+## Reset db.t1
+DELETE FROM db.t1;
+#
+connection con1;
+#
+## Again, but this time with a rollback
+#
+START TRANSACTION;
+SELECT fn_add(415, 416);
+fn_add(415, 416)
+831
+#
+ROLLBACK;
+#
+SELECT * FROM t1 ORDER BY s1;
+s1 s2
+connection default;
+#========================================================================
+# Verify
+#========================================================================
+SELECT event_id into @base_tx_event_id
+from performance_schema.events_transactions_history_long
+where (THREAD_ID = @con1_thread_id)
+order by event_id limit 1;
+SELECT event_id into @base_stmt_event_id from performance_schema.events_statements_history_long
+where (THREAD_ID = @con1_thread_id)
+order by event_id limit 1;
+select if(@base_tx_event_id < @base_stmt_event_id,
+@base_tx_event_id - 1,
+@base_stmt_event_id - 1)
+into @base_event_id;
+#
+# EVENTS_TRANSACTIONS_CURRENT
+#
+SELECT THREAD_ID,
+LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
+LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
+RPAD(EVENT_NAME, 11, ' ') 'EVENT_NAME ',
+RPAD(STATE, 11, ' ') 'STATE ',
+RPAD(ACCESS_MODE, 11, ' ') ACCESS_MODE,
+RPAD(ISOLATION_LEVEL, 16, ' ') 'ISOLATION_LEVEL ',
+RPAD(AUTOCOMMIT, 4, ' ') AUTO,
+LPAD(NESTING_EVENT_ID - @base_event_id, 19, ' ') as R_NESTING_EVENT_ID,
+RPAD(IFNULL(NESTING_EVENT_TYPE, 'NULL'), 18, ' ') NESTING_EVENT_TYPE
+FROM performance_schema.events_transactions_current
+WHERE ((THREAD_ID = @con1_thread_id) OR (@all_threads = 1))
+ORDER BY thread_id, event_id;
+THREAD_ID R_EVENT_ID R_END_EVENT_ID EVENT_NAME STATE ACCESS_MODE ISOLATION_LEVEL AUTO R_NESTING_EVENT_ID NESTING_EVENT_TYPE
+thread_id 8 8 transaction COMMITTED READ WRITE REPEATABLE READ YES 7 STATEMENT
+#
+# EVENTS_TRANSACTIONS_HISTORY_LONG
+#
+SELECT THREAD_ID,
+LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
+LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
+RPAD(EVENT_NAME, 11, ' ') 'EVENT_NAME ',
+RPAD(STATE, 11, ' ') 'STATE ',
+RPAD(ACCESS_MODE, 11, ' ') ACCESS_MODE,
+RPAD(ISOLATION_LEVEL, 16, ' ') 'ISOLATION_LEVEL ',
+RPAD(AUTOCOMMIT, 4, ' ') AUTO,
+LPAD(NESTING_EVENT_ID - @base_event_id, 19, ' ') as R_NESTING_EVENT_ID,
+RPAD(IFNULL(NESTING_EVENT_TYPE, 'NULL'), 18, ' ') NESTING_EVENT_TYPE
+FROM performance_schema.events_transactions_history_long
+WHERE ((THREAD_ID = @con1_thread_id) OR (@all_threads = 1))
+ORDER BY thread_id, event_id;
+THREAD_ID R_EVENT_ID R_END_EVENT_ID EVENT_NAME STATE ACCESS_MODE ISOLATION_LEVEL AUTO R_NESTING_EVENT_ID NESTING_EVENT_TYPE
+thread_id 2 6 transaction ROLLED BACK READ WRITE REPEATABLE READ NO 1 STATEMENT
+thread_id 8 8 transaction COMMITTED READ WRITE REPEATABLE READ YES 7 STATEMENT
+#
+# EVENTS_STATEMENTS_HISTORY_LONG
+#
+SELECT THREAD_ID,
+LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
+LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
+RPAD(EVENT_NAME, 30, ' ') 'EVENT_NAME ',
+RPAD(IFNULL(object_name, 'NULL'), 12, ' ') 'OBJECT_NAME ',
+LPAD(IFNULL(NESTING_EVENT_ID - @base_event_id, 'NULL'), 19, ' ') as R_NESTING_EVENT_ID,
+RPAD(IFNULL(NESTING_EVENT_TYPE, 'NULL'), 18, ' ') NESTING_EVENT_TYPE,
+LPAD(NESTING_EVENT_LEVEL, 5, ' ') LEVEL,
+SQL_TEXT
+FROM performance_schema.events_statements_history_long
+WHERE ((THREAD_ID = @con1_thread_id) OR (@all_threads = 1))
+ORDER BY thread_id, event_id;
+THREAD_ID R_EVENT_ID R_END_EVENT_ID EVENT_NAME OBJECT_NAME R_NESTING_EVENT_ID NESTING_EVENT_TYPE LEVEL SQL_TEXT
+thread_id 1 2 statement/sql/begin NULL NULL NULL 0 START TRANSACTION
+thread_id 3 5 statement/sql/select NULL 2 TRANSACTION 0 SELECT fn_add(415, 416)
+thread_id 4 4 statement/sp/stmt fn_add 3 STATEMENT 1 INSERT INTO t1 VALUES (x, "INSERT x"),(y, "INSERT y")
+thread_id 5 5 statement/sp/freturn fn_add 3 STATEMENT 1 NULL
+thread_id 6 6 statement/sql/rollback NULL 2 TRANSACTION 0 ROLLBACK
+thread_id 7 8 statement/sql/select NULL NULL NULL 0 SELECT * FROM t1 ORDER BY s1
+#
+### Combined statement and transaction event history ordered by event id
+#
+#EVENTS_STATEMENTS_HISTORY_LONG + EVENTS_TRANSACTIONS_HISTORY_LONG
+#
+SELECT THREAD_ID,
+LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
+LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
+RPAD(EVENT_NAME, 25, ' ') 'EVENT_NAME ',
+LPAD(NESTING_EVENT_ID - @base_event_id, 19, ' ') as R_NESTING_EVENT_ID,
+RPAD(IFNULL(NESTING_EVENT_TYPE, 'NULL'), 18, ' ') NESTING_EVENT_TYPE,
+'<transaction started>' AS SQL_TXT
+FROM performance_schema.events_transactions_history_long t
+WHERE (t.thread_id = @con1_thread_id)
+UNION
+SELECT THREAD_ID,
+LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
+LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
+RPAD(EVENT_NAME, 25, ' ') 'EVENT_NAME ',
+LPAD(IFNULL(NESTING_EVENT_ID - @base_event_id, 'NULL'), 19, ' ') as R_NESTING_EVENT_ID,
+RPAD(IFNULL(NESTING_EVENT_TYPE, 'NULL'), 18, ' ') NESTING_EVENT_TYPE,
+SQL_TEXT
+FROM performance_schema.events_statements_history_long s
+WHERE ((s.thread_id = @con1_thread_id) OR (@all_threads = 1))
+ORDER BY thread_id, r_event_id;
+THREAD_ID R_EVENT_ID R_END_EVENT_ID EVENT_NAME R_NESTING_EVENT_ID NESTING_EVENT_TYPE SQL_TXT
+thread_id 1 2 statement/sql/begin NULL NULL START TRANSACTION
+thread_id 2 6 transaction 1 STATEMENT <transaction started>
+thread_id 3 5 statement/sql/select 2 TRANSACTION SELECT fn_add(415, 416)
+thread_id 4 4 statement/sp/stmt 3 STATEMENT INSERT INTO t1 VALUES (x, "INSERT x"),(y, "INSERT y")
+thread_id 5 5 statement/sp/freturn 3 STATEMENT NULL
+thread_id 6 6 statement/sql/rollback 2 TRANSACTION ROLLBACK
+thread_id 7 8 statement/sql/select NULL NULL SELECT * FROM t1 ORDER BY s1
+thread_id 8 8 transaction 7 STATEMENT <transaction started>
+#
+### Clear statement and transaction history
+# CALL test.clear_history();
+CALL test.clear_history();
+## Reset db.t1
+DELETE FROM db.t1;
+#
+#
+# STEP 4.2 - TRANSACTION CANNOT BE STARTED OR ENDED WITHIN FUNCTION
+#
+connection con1;
+CREATE FUNCTION fn_err1() RETURNS VARCHAR(10) BEGIN START TRANSACTION ; RETURN 'invalid' ; END|
+ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger
+#
+## Expect 0 transactions
+connection default;
+SELECT COUNT(*) FROM performance_schema.events_transactions_history;
+COUNT(*)
+0
+connection con1;
+#
+## Expect stored function does not exist
+#
+SELECT fn_err1();
+ERROR 42000: FUNCTION db.fn_err1 does not exist
+#
+## Expect 1 transactions
+connection default;
+SELECT COUNT(*) FROM performance_schema.events_transactions_history;
+COUNT(*)
+1
+connection con1;
+#
+CREATE FUNCTION fn_err2() RETURNS VARCHAR(10) BEGIN COMMIT; RETURN 'invalid' ; END|
+ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger
+#
+## Expect stored function does not exist
+#
+START TRANSACTION;
+DELETE FROM t1 WHERE s1 > 320;
+SELECT fn_err2();
+ERROR 42000: FUNCTION db.fn_err2 does not exist
+#
+## Expect 2 transactions
+connection default;
+SELECT COUNT(*) FROM performance_schema.events_transactions_history;
+COUNT(*)
+2
+#
+## Clear transaction and statement tables
+CALL test.clear_history();
+#========================================================================
+# STEP 5 - TRANSACTIONS AND TRIGGERS
+#========================================================================
+#
+#
+# STEP 5.1 - FORCE STATEMENT ROLLBACK FROM TRIGGER
+#
+connection con1;
+## Create a trigger to force statement rollback
+#
+CREATE TRIGGER trigger_before_update BEFORE UPDATE ON t1
+FOR EACH ROW
+BEGIN
+IF OLD.s1 >= 505 THEN
+SIGNAL sqlstate '45001' SET message_text = "FORCE ERROR";
+END IF;
+END;|
+#
+## Clear history
+connection default;
+CALL test.clear_history();
+connection con1;
+#
+## Insert multiple rows, then update. Trigger will force rollback the
+## UPDATE statement, but the transaction should not roll back.
+#
+START TRANSACTION;
+INSERT INTO t1 VALUES (500, "INSERT 500");
+INSERT INTO t1 VALUES (501, "INSERT 501");
+INSERT INTO t1 VALUES (502, "INSERT 502");
+INSERT INTO t1 VALUES (503, "INSERT 503");
+INSERT INTO t1 VALUES (504, "INSERT 504");
+INSERT INTO t1 VALUES (505, "INSERT 505");
+#
+SELECT * FROM t1 ORDER BY s1;
+s1 s2
+500 INSERT 500
+501 INSERT 501
+502 INSERT 502
+503 INSERT 503
+504 INSERT 504
+505 INSERT 505
+#
+## Expect error when UPDATE hits record 505
+#
+UPDATE t1 SET s1 = s1 * 2 WHERE s1 >= 500;
+ERROR 45001: FORCE ERROR
+#
+## Verify that INSERT succeeded, UPDATE failed and transaction did not rollback
+#
+SELECT * FROM t1 ORDER BY s1;
+s1 s2
+500 INSERT 500
+501 INSERT 501
+502 INSERT 502
+503 INSERT 503
+504 INSERT 504
+505 INSERT 505
+COMMIT;
+#
+DROP TRIGGER trigger_before_update;
+connection default;
+#========================================================================
+# Verify
+#========================================================================
+SELECT event_id into @base_tx_event_id
+from performance_schema.events_transactions_history_long
+where (THREAD_ID = @con1_thread_id)
+order by event_id limit 1;
+SELECT event_id into @base_stmt_event_id from performance_schema.events_statements_history_long
+where (THREAD_ID = @con1_thread_id)
+order by event_id limit 1;
+select if(@base_tx_event_id < @base_stmt_event_id,
+@base_tx_event_id - 1,
+@base_stmt_event_id - 1)
+into @base_event_id;
+#
+# EVENTS_TRANSACTIONS_CURRENT
+#
+SELECT THREAD_ID,
+LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
+LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
+RPAD(EVENT_NAME, 11, ' ') 'EVENT_NAME ',
+RPAD(STATE, 11, ' ') 'STATE ',
+RPAD(ACCESS_MODE, 11, ' ') ACCESS_MODE,
+RPAD(ISOLATION_LEVEL, 16, ' ') 'ISOLATION_LEVEL ',
+RPAD(AUTOCOMMIT, 4, ' ') AUTO,
+LPAD(NESTING_EVENT_ID - @base_event_id, 19, ' ') as R_NESTING_EVENT_ID,
+RPAD(IFNULL(NESTING_EVENT_TYPE, 'NULL'), 18, ' ') NESTING_EVENT_TYPE
+FROM performance_schema.events_transactions_current
+WHERE ((THREAD_ID = @con1_thread_id) OR (@all_threads = 1))
+ORDER BY thread_id, event_id;
+THREAD_ID R_EVENT_ID R_END_EVENT_ID EVENT_NAME STATE ACCESS_MODE ISOLATION_LEVEL AUTO R_NESTING_EVENT_ID NESTING_EVENT_TYPE
+thread_id 21 21 transaction COMMITTED READ WRITE REPEATABLE READ YES 20 STATEMENT
+#
+# EVENTS_TRANSACTIONS_HISTORY_LONG
+#
+SELECT THREAD_ID,
+LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
+LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
+RPAD(EVENT_NAME, 11, ' ') 'EVENT_NAME ',
+RPAD(STATE, 11, ' ') 'STATE ',
+RPAD(ACCESS_MODE, 11, ' ') ACCESS_MODE,
+RPAD(ISOLATION_LEVEL, 16, ' ') 'ISOLATION_LEVEL ',
+RPAD(AUTOCOMMIT, 4, ' ') AUTO,
+LPAD(NESTING_EVENT_ID - @base_event_id, 19, ' ') as R_NESTING_EVENT_ID,
+RPAD(IFNULL(NESTING_EVENT_TYPE, 'NULL'), 18, ' ') NESTING_EVENT_TYPE
+FROM performance_schema.events_transactions_history_long
+WHERE ((THREAD_ID = @con1_thread_id) OR (@all_threads = 1))
+ORDER BY thread_id, event_id;
+THREAD_ID R_EVENT_ID R_END_EVENT_ID EVENT_NAME STATE ACCESS_MODE ISOLATION_LEVEL AUTO R_NESTING_EVENT_ID NESTING_EVENT_TYPE
+thread_id 2 19 transaction COMMITTED READ WRITE REPEATABLE READ NO 1 STATEMENT
+thread_id 21 21 transaction COMMITTED READ WRITE REPEATABLE READ YES 20 STATEMENT
+#
+# EVENTS_STATEMENTS_HISTORY_LONG
+#
+SELECT THREAD_ID,
+LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
+LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
+RPAD(EVENT_NAME, 30, ' ') 'EVENT_NAME ',
+RPAD(IFNULL(object_name, 'NULL'), 12, ' ') 'OBJECT_NAME ',
+LPAD(IFNULL(NESTING_EVENT_ID - @base_event_id, 'NULL'), 19, ' ') as R_NESTING_EVENT_ID,
+RPAD(IFNULL(NESTING_EVENT_TYPE, 'NULL'), 18, ' ') NESTING_EVENT_TYPE,
+LPAD(NESTING_EVENT_LEVEL, 5, ' ') LEVEL,
+SQL_TEXT
+FROM performance_schema.events_statements_history_long
+WHERE ((THREAD_ID = @con1_thread_id) OR (@all_threads = 1))
+ORDER BY thread_id, event_id;
+THREAD_ID R_EVENT_ID R_END_EVENT_ID EVENT_NAME OBJECT_NAME R_NESTING_EVENT_ID NESTING_EVENT_TYPE LEVEL SQL_TEXT
+thread_id 1 2 statement/sql/begin NULL NULL NULL 0 START TRANSACTION
+thread_id 3 3 statement/sql/insert NULL 2 TRANSACTION 0 INSERT INTO t1 VALUES (500, "INSERT 500")
+thread_id 4 4 statement/sql/insert NULL 2 TRANSACTION 0 INSERT INTO t1 VALUES (501, "INSERT 501")
+thread_id 5 5 statement/sql/insert NULL 2 TRANSACTION 0 INSERT INTO t1 VALUES (502, "INSERT 502")
+thread_id 6 6 statement/sql/insert NULL 2 TRANSACTION 0 INSERT INTO t1 VALUES (503, "INSERT 503")
+thread_id 7 7 statement/sql/insert NULL 2 TRANSACTION 0 INSERT INTO t1 VALUES (504, "INSERT 504")
+thread_id 8 8 statement/sql/insert NULL 2 TRANSACTION 0 INSERT INTO t1 VALUES (505, "INSERT 505")
+thread_id 9 9 statement/sql/select NULL 2 TRANSACTION 0 SELECT * FROM t1 ORDER BY s1
+thread_id 10 17 statement/sql/update NULL 2 TRANSACTION 0 UPDATE t1 SET s1 = s1 * 2 WHERE s1 >= 500
+thread_id 11 11 statement/sp/jump_if_not trigger_befo 10 STATEMENT 1 NULL
+thread_id 12 12 statement/sp/jump_if_not trigger_befo 10 STATEMENT 1 NULL
+thread_id 13 13 statement/sp/jump_if_not trigger_befo 10 STATEMENT 1 NULL
+thread_id 14 14 statement/sp/jump_if_not trigger_befo 10 STATEMENT 1 NULL
+thread_id 15 15 statement/sp/jump_if_not trigger_befo 10 STATEMENT 1 NULL
+thread_id 16 16 statement/sp/jump_if_not trigger_befo 10 STATEMENT 1 NULL
+thread_id 17 17 statement/sp/stmt trigger_befo 10 STATEMENT 1 SIGNAL sqlstate '45001' SET message_text = "FORCE ERROR"
+thread_id 18 18 statement/sql/select NULL 2 TRANSACTION 0 SELECT * FROM t1 ORDER BY s1
+thread_id 19 19 statement/sql/commit NULL 2 TRANSACTION 0 COMMIT
+thread_id 20 21 statement/sql/drop_trigger NULL NULL NULL 0 DROP TRIGGER trigger_before_update
+#
+### Combined statement and transaction event history ordered by event id
+#
+#EVENTS_STATEMENTS_HISTORY_LONG + EVENTS_TRANSACTIONS_HISTORY_LONG
+#
+SELECT THREAD_ID,
+LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
+LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
+RPAD(EVENT_NAME, 25, ' ') 'EVENT_NAME ',
+LPAD(NESTING_EVENT_ID - @base_event_id, 19, ' ') as R_NESTING_EVENT_ID,
+RPAD(IFNULL(NESTING_EVENT_TYPE, 'NULL'), 18, ' ') NESTING_EVENT_TYPE,
+'<transaction started>' AS SQL_TXT
+FROM performance_schema.events_transactions_history_long t
+WHERE (t.thread_id = @con1_thread_id)
+UNION
+SELECT THREAD_ID,
+LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
+LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
+RPAD(EVENT_NAME, 25, ' ') 'EVENT_NAME ',
+LPAD(IFNULL(NESTING_EVENT_ID - @base_event_id, 'NULL'), 19, ' ') as R_NESTING_EVENT_ID,
+RPAD(IFNULL(NESTING_EVENT_TYPE, 'NULL'), 18, ' ') NESTING_EVENT_TYPE,
+SQL_TEXT
+FROM performance_schema.events_statements_history_long s
+WHERE ((s.thread_id = @con1_thread_id) OR (@all_threads = 1))
+ORDER BY thread_id, r_event_id;
+THREAD_ID R_EVENT_ID R_END_EVENT_ID EVENT_NAME R_NESTING_EVENT_ID NESTING_EVENT_TYPE SQL_TXT
+thread_id 1 2 statement/sql/begin NULL NULL START TRANSACTION
+thread_id 2 19 transaction 1 STATEMENT <transaction started>
+thread_id 3 3 statement/sql/insert 2 TRANSACTION INSERT INTO t1 VALUES (500, "INSERT 500")
+thread_id 4 4 statement/sql/insert 2 TRANSACTION INSERT INTO t1 VALUES (501, "INSERT 501")
+thread_id 5 5 statement/sql/insert 2 TRANSACTION INSERT INTO t1 VALUES (502, "INSERT 502")
+thread_id 6 6 statement/sql/insert 2 TRANSACTION INSERT INTO t1 VALUES (503, "INSERT 503")
+thread_id 7 7 statement/sql/insert 2 TRANSACTION INSERT INTO t1 VALUES (504, "INSERT 504")
+thread_id 8 8 statement/sql/insert 2 TRANSACTION INSERT INTO t1 VALUES (505, "INSERT 505")
+thread_id 9 9 statement/sql/select 2 TRANSACTION SELECT * FROM t1 ORDER BY s1
+thread_id 10 17 statement/sql/update 2 TRANSACTION UPDATE t1 SET s1 = s1 * 2 WHERE s1 >= 500
+thread_id 11 11 statement/sp/jump_if_not 10 STATEMENT NULL
+thread_id 12 12 statement/sp/jump_if_not 10 STATEMENT NULL
+thread_id 13 13 statement/sp/jump_if_not 10 STATEMENT NULL
+thread_id 14 14 statement/sp/jump_if_not 10 STATEMENT NULL
+thread_id 15 15 statement/sp/jump_if_not 10 STATEMENT NULL
+thread_id 16 16 statement/sp/jump_if_not 10 STATEMENT NULL
+thread_id 17 17 statement/sp/stmt 10 STATEMENT SIGNAL sqlstate '45001' SET message_text = "FORCE ERROR"
+thread_id 18 18 statement/sql/select 2 TRANSACTION SELECT * FROM t1 ORDER BY s1
+thread_id 19 19 statement/sql/commit 2 TRANSACTION COMMIT
+thread_id 20 21 statement/sql/drop_trigge NULL NULL DROP TRIGGER trigger_before_update
+thread_id 21 21 transaction 20 STATEMENT <transaction started>
+#
+### Clear statement and transaction history
+# CALL test.clear_history();
+CALL test.clear_history();
+## Reset db.t1
+DELETE FROM db.t1;
+#
+# TODO: Detect statement events from scheduled event
+#=======================================================================
+# Cleanup
+#=======================================================================
+connection con1;
+disconnect con1;
+connection default;
+DROP DATABASE db;
+UPDATE performance_schema.setup_instruments SET enabled='YES', timed='YES';
+DROP PROCEDURE clear_transaction_tables;
+DROP PROCEDURE clear_transaction_history;
+DROP PROCEDURE clear_statement_history;
+DROP PROCEDURE clear_history;
+DROP PROCEDURE transaction_verifier;
diff --git a/mysql-test/suite/perfschema/r/trigger_table_io.result b/mysql-test/suite/perfschema/r/trigger_table_io.result
index 9fc63e69675..02821a481af 100644
--- a/mysql-test/suite/perfschema/r/trigger_table_io.result
+++ b/mysql-test/suite/perfschema/r/trigger_table_io.result
@@ -83,108 +83,110 @@ where event_name like 'wait/io/table/%'
and object_schema in ("test")
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 test marker insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test t2 insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test t1 insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test t2 update NULL
-wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test t2 insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test t1 insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test t2 update NULL
-wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test t1 fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test t1 fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test t1 fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test t1 fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test t2 update NULL
-wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test t1 update NULL
-wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test t2 update NULL
-wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test t1 fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test t2 update NULL
-wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test t1 update NULL
-wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test t2 update NULL
-wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test t1 fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test t1 fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test t1 fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test t1 fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test t1 fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test t2 delete NULL
-wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test t1 delete NULL
-wait/io/table/sql/handler handler.cc: TABLE test t2 insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test t1 fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test t1 fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test t1 fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test t1 fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test t1 fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test t1 fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test t2 delete NULL
-wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test t1 delete NULL
-wait/io/table/sql/handler handler.cc: TABLE test t2 insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test t1 fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test t1 fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test t1 fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test t1 fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
-show status where Variable_name like 'performance_schema_%' and
-Variable_name not like 'performance_schema_%_classes_lost';
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test t2 insert 1
+wait/io/table/sql/handler TABLE test t1 insert 1
+wait/io/table/sql/handler TABLE test t2 fetch 1
+wait/io/table/sql/handler TABLE test t2 update 1
+wait/io/table/sql/handler TABLE test t2 fetch 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test t2 insert 1
+wait/io/table/sql/handler TABLE test t1 insert 1
+wait/io/table/sql/handler TABLE test t2 fetch 1
+wait/io/table/sql/handler TABLE test t2 fetch 1
+wait/io/table/sql/handler TABLE test t2 update 1
+wait/io/table/sql/handler TABLE test t2 fetch 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test t1 fetch 2
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test t2 fetch 2
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test t1 fetch 1
+wait/io/table/sql/handler TABLE test t2 fetch 1
+wait/io/table/sql/handler TABLE test t2 update 1
+wait/io/table/sql/handler TABLE test t2 fetch 1
+wait/io/table/sql/handler TABLE test t2 fetch 1
+wait/io/table/sql/handler TABLE test t1 update 1
+wait/io/table/sql/handler TABLE test t2 fetch 1
+wait/io/table/sql/handler TABLE test t2 update 1
+wait/io/table/sql/handler TABLE test t2 fetch 1
+wait/io/table/sql/handler TABLE test t2 fetch 1
+wait/io/table/sql/handler TABLE test t1 fetch 1
+wait/io/table/sql/handler TABLE test t2 fetch 1
+wait/io/table/sql/handler TABLE test t2 fetch 1
+wait/io/table/sql/handler TABLE test t2 update 1
+wait/io/table/sql/handler TABLE test t2 fetch 1
+wait/io/table/sql/handler TABLE test t1 update 1
+wait/io/table/sql/handler TABLE test t2 fetch 1
+wait/io/table/sql/handler TABLE test t2 fetch 1
+wait/io/table/sql/handler TABLE test t2 update 1
+wait/io/table/sql/handler TABLE test t2 fetch 1
+wait/io/table/sql/handler TABLE test t1 fetch 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test t1 fetch 2
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test t2 fetch 2
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test t1 fetch 1
+wait/io/table/sql/handler TABLE test t2 fetch 1
+wait/io/table/sql/handler TABLE test t2 delete 1
+wait/io/table/sql/handler TABLE test t2 fetch 1
+wait/io/table/sql/handler TABLE test t2 fetch 1
+wait/io/table/sql/handler TABLE test t1 delete 1
+wait/io/table/sql/handler TABLE test t2 insert 1
+wait/io/table/sql/handler TABLE test t1 fetch 1
+wait/io/table/sql/handler TABLE test t1 fetch 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test t1 fetch 1
+wait/io/table/sql/handler TABLE test t1 fetch 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test t2 fetch 2
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test t1 fetch 1
+wait/io/table/sql/handler TABLE test t1 fetch 1
+wait/io/table/sql/handler TABLE test t2 fetch 1
+wait/io/table/sql/handler TABLE test t2 fetch 1
+wait/io/table/sql/handler TABLE test t2 delete 1
+wait/io/table/sql/handler TABLE test t2 fetch 1
+wait/io/table/sql/handler TABLE test t1 delete 1
+wait/io/table/sql/handler TABLE test t2 insert 1
+wait/io/table/sql/handler TABLE test t1 fetch 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test t1 fetch 1
+wait/io/table/sql/handler TABLE test t1 fetch 1
+wait/io/table/sql/handler TABLE test t1 fetch 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test t2 fetch 2
+show global status like 'performance_schema_%';
Variable_name Value
Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
Performance_schema_cond_instances_lost 0
Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
Performance_schema_file_handles_lost 0
Performance_schema_file_instances_lost 0
Performance_schema_hosts_lost 0
+Performance_schema_index_stat_lost 0
Performance_schema_locker_lost 0
+Performance_schema_memory_classes_lost 0
+Performance_schema_metadata_lock_lost 0
+Performance_schema_mutex_classes_lost 0
Performance_schema_mutex_instances_lost 0
+Performance_schema_nested_statement_lost 0
+Performance_schema_prepared_statements_lost 0
+Performance_schema_program_lost 0
+Performance_schema_rwlock_classes_lost 0
Performance_schema_rwlock_instances_lost 0
Performance_schema_session_connect_attrs_lost 0
+Performance_schema_socket_classes_lost 0
Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
Performance_schema_table_handles_lost 0
Performance_schema_table_instances_lost 0
+Performance_schema_table_lock_stat_lost 0
+Performance_schema_thread_classes_lost 0
Performance_schema_thread_instances_lost 0
Performance_schema_users_lost 0
truncate performance_schema.events_waits_history_long;
diff --git a/mysql-test/suite/perfschema/r/user_var_func.result b/mysql-test/suite/perfschema/r/user_var_func.result
new file mode 100644
index 00000000000..82a8e7ec096
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/user_var_func.result
@@ -0,0 +1,91 @@
+set @v1a="Hello";
+set @v2a="World";
+set @v3a=65;
+set @v4a=NULL;
+select @v1a, @v2a, @v3a, @v4a, @v_unknown;
+@v1a @v2a @v3a @v4a @v_unknown
+Hello World 65 NULL NULL
+select VARIABLE_NAME, VARIABLE_VALUE
+from performance_schema.user_variables_by_thread
+order by VARIABLE_NAME;
+VARIABLE_NAME VARIABLE_VALUE
+v1a Hello
+v2a World
+v3a 65
+v4a NULL
+connect con1, localhost, root,,;
+set @v1b="Salut";
+set @v2b="La compagnie";
+set @v3b=12;
+set @v4b=NULL;
+select @v1b, @v2b, @v3b, @v4b, @v_unknown;
+@v1b @v2b @v3b @v4b @v_unknown
+Salut La compagnie 12 NULL NULL
+select VARIABLE_NAME, VARIABLE_VALUE
+from performance_schema.user_variables_by_thread
+order by VARIABLE_NAME;
+VARIABLE_NAME VARIABLE_VALUE
+v1a Hello
+v1b Salut
+v2a World
+v2b La compagnie
+v3a 65
+v3b 12
+v4a NULL
+v4b NULL
+connection default;
+disconnect con1;
+select VARIABLE_NAME, VARIABLE_VALUE
+from performance_schema.user_variables_by_thread
+order by VARIABLE_NAME;
+VARIABLE_NAME VARIABLE_VALUE
+v1a Hello
+v2a World
+v3a 65
+v4a NULL
+set @blob_under_16_bits=repeat("a", 65000);
+set @blob_under_24_bits=repeat("a", 1000000);
+select length(@blob_under_16_bits);
+length(@blob_under_16_bits)
+65000
+select length(@blob_under_24_bits);
+length(@blob_under_24_bits)
+1000000
+select variable_name, length(variable_value)
+from performance_schema.user_variables_by_thread
+where VARIABLE_NAME like "blob%"
+ order by VARIABLE_NAME;
+variable_name length(variable_value)
+blob_under_16_bits 65000
+blob_under_24_bits 1000000
+set @a=10;
+CREATE procedure test_user_val
+(IN input INT,OUT output INT)
+BEGIN
+SELECT input + input
+INTO output;
+END|
+CALL test_user_val(@a , @total);
+select VARIABLE_NAME,VARIABLE_VALUE from performance_schema.user_variables_by_thread
+where variable_name in ('a','total') order by VARIABLE_NAME;
+VARIABLE_NAME VARIABLE_VALUE
+a 10
+total 20
+create table t1 (c1 int);
+CREATE TRIGGER test_uvar_trigger
+AFTER INSERT ON t1
+FOR EACH ROW BEGIN
+set @a=@a+@a;
+END|
+insert into t1 values(1);
+select VARIABLE_NAME,VARIABLE_VALUE from performance_schema.user_variables_by_thread
+where variable_name ='a' order by VARIABLE_NAME;
+VARIABLE_NAME VARIABLE_VALUE
+a 20
+insert into t1 values(1);
+select VARIABLE_NAME,VARIABLE_VALUE from performance_schema.user_variables_by_thread
+where variable_name ='a' order by VARIABLE_NAME;
+VARIABLE_NAME VARIABLE_VALUE
+a 40
+drop table t1;
+drop procedure test_user_val;
diff --git a/mysql-test/suite/perfschema/r/view_table_io.result b/mysql-test/suite/perfschema/r/view_table_io.result
index 2f9a70cdeaa..f1591f46a41 100644
--- a/mysql-test/suite/perfschema/r/view_table_io.result
+++ b/mysql-test/suite/perfschema/r/view_table_io.result
@@ -77,65 +77,71 @@ where event_name like 'wait/io/table/%'
and object_schema in ("test")
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 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
-wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab delete NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab 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 no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE test no_index_tab 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
-show status where Variable_name like 'performance_schema_%' and
-Variable_name not like 'performance_schema_%_classes_lost';
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test no_index_tab insert 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test no_index_tab insert 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test no_index_tab insert 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 3
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 1
+wait/io/table/sql/handler TABLE test no_index_tab update 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 1
+wait/io/table/sql/handler TABLE test no_index_tab update 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 1
+wait/io/table/sql/handler TABLE test no_index_tab update 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 2
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 1
+wait/io/table/sql/handler TABLE test no_index_tab delete 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 2
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test no_index_tab fetch 2
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test marker insert 1
+wait/io/table/sql/handler TABLE test marker insert 1
+show global status like 'performance_schema_%';
Variable_name Value
Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
Performance_schema_cond_instances_lost 0
Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
Performance_schema_file_handles_lost 0
Performance_schema_file_instances_lost 0
Performance_schema_hosts_lost 0
+Performance_schema_index_stat_lost 0
Performance_schema_locker_lost 0
+Performance_schema_memory_classes_lost 0
+Performance_schema_metadata_lock_lost 0
+Performance_schema_mutex_classes_lost 0
Performance_schema_mutex_instances_lost 0
+Performance_schema_nested_statement_lost 0
+Performance_schema_prepared_statements_lost 0
+Performance_schema_program_lost 0
+Performance_schema_rwlock_classes_lost 0
Performance_schema_rwlock_instances_lost 0
Performance_schema_session_connect_attrs_lost 0
+Performance_schema_socket_classes_lost 0
Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
Performance_schema_table_handles_lost 0
Performance_schema_table_instances_lost 0
+Performance_schema_table_lock_stat_lost 0
+Performance_schema_thread_classes_lost 0
Performance_schema_thread_instances_lost 0
Performance_schema_users_lost 0
truncate performance_schema.events_waits_history_long;
diff --git a/mysql-test/suite/perfschema/t/all_tests.test b/mysql-test/suite/perfschema/t/all_tests.test
index e0db6d459de..b16364ba17f 100644
--- a/mysql-test/suite/perfschema/t/all_tests.test
+++ b/mysql-test/suite/perfschema/t/all_tests.test
@@ -43,10 +43,13 @@ insert into t2 select concat('dml_', table_name, '.test') from information_schem
update t2 set test_name= replace(test_name, "events_waits_summary_", "ews_");
update t2 set test_name= replace(test_name, "events_stages_summary_", "esgs_");
update t2 set test_name= replace(test_name, "events_statements_summary_", "esms_");
+update t2 set test_name= replace(test_name, "events_transactions_summary_", "ets_");
update t2 set test_name= replace(test_name, "file_summary_", "fs_");
update t2 set test_name= replace(test_name, "objects_summary_", "os_");
update t2 set test_name= replace(test_name, "table_io_waits_summary_", "tiws_");
update t2 set test_name= replace(test_name, "table_lock_waits_summary_", "tlws_");
+update t2 set test_name= replace(test_name, "memory_summary_", "mems_");
+update t2 set test_name= replace(test_name, "user_variables_", "uvar_");
# Debug
# select test_name as 'FOUND' from t1;
diff --git a/mysql-test/suite/perfschema/t/alter_table_progress.test b/mysql-test/suite/perfschema/t/alter_table_progress.test
new file mode 100644
index 00000000000..d0a4055ad0e
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/alter_table_progress.test
@@ -0,0 +1,145 @@
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_innodb.inc
+--source include/have_perfschema.inc
+--source include/have_debug.inc
+--source include/have_debug_sync.inc
+
+# Presence of the query cache changes query stages,
+# causing noise in the test output
+#--source include/have_query_cache_disabled.inc
+
+# Setup
+
+connect (con1, localhost, root, , );
+
+let $con1_THREAD_ID=`select thread_id from performance_schema.threads
+ where PROCESSLIST_ID = connection_id()`;
+
+--disable_warnings
+drop table if exists t1;
+--enable_warnings
+
+create table t1(a int) engine = myisam;
+
+insert into t1 values (1), (2), (3), (4), (5);
+
+--connection default
+
+update performance_schema.threads
+ set instrumented = 'NO'
+ where processlist_id = connection_id();
+
+truncate table performance_schema.events_statements_history_long;
+truncate table performance_schema.events_stages_history_long;
+
+--disable_query_log
+eval select $con1_THREAD_ID into @con1_thread_id;
+--enable_query_log
+
+--connection con1
+
+# ALTER TABLE statement to inspect,
+# execution should instrument progress
+
+SET DEBUG_SYNC='RESET';
+SET DEBUG_SYNC='copy_data_between_tables_before SIGNAL found_row WAIT_FOR wait_row EXECUTE 5';
+--send ALTER TABLE t1 engine = innodb;
+
+--connection default
+
+SET DEBUG_SYNC='now WAIT_FOR found_row';
+
+# Find the statement id of the ALTER TABLE
+select event_id from performance_schema.events_statements_current
+ where thread_id = @con1_thread_id into @con1_stmt_id;
+
+# completed 0
+select EVENT_NAME, WORK_COMPLETED, WORK_ESTIMATED
+ from performance_schema.events_stages_current
+ where (thread_id = @con1_thread_id);
+
+SET DEBUG_SYNC='now SIGNAL wait_row';
+
+#======
+
+SET DEBUG_SYNC='now WAIT_FOR found_row';
+
+# completed 1
+select EVENT_NAME, WORK_COMPLETED, WORK_ESTIMATED
+ from performance_schema.events_stages_current
+ where (thread_id = @con1_thread_id);
+
+SET DEBUG_SYNC='now SIGNAL wait_row';
+
+#======
+
+SET DEBUG_SYNC='now WAIT_FOR found_row';
+
+# completed 2
+select EVENT_NAME, WORK_COMPLETED, WORK_ESTIMATED
+ from performance_schema.events_stages_current
+ where (thread_id = @con1_thread_id);
+
+SET DEBUG_SYNC='now SIGNAL wait_row';
+
+#======
+
+SET DEBUG_SYNC='now WAIT_FOR found_row';
+
+# completed 3
+select EVENT_NAME, WORK_COMPLETED, WORK_ESTIMATED
+ from performance_schema.events_stages_current
+ where (thread_id = @con1_thread_id);
+
+SET DEBUG_SYNC='now SIGNAL wait_row';
+
+#======
+
+SET DEBUG_SYNC='now WAIT_FOR found_row';
+
+# completed 4
+select EVENT_NAME, WORK_COMPLETED, WORK_ESTIMATED
+ from performance_schema.events_stages_current
+ where (thread_id = @con1_thread_id);
+
+SET DEBUG_SYNC='now SIGNAL wait_row';
+
+#======
+
+--connection con1
+
+# Complete the ALTER TABLE statement.
+--reap
+
+# Make sure the ALTER TABLE cleanup is executed,
+# as the last stages are after writing back to the client,
+# and done asynchronously from the last 'reap'.
+select "After payload";
+
+--connection default
+
+--echo # Dumping ALTER TABLE stages
+
+# Print all stages for this ALTER TABLE statement
+select EVENT_NAME, WORK_COMPLETED, WORK_ESTIMATED
+ from performance_schema.events_stages_history_long
+ where (thread_id = @con1_thread_id)
+ and (nesting_event_id = @con1_stmt_id)
+ order by thread_id, event_id;
+
+SET DEBUG_SYNC='RESET';
+
+--connection con1
+
+drop table t1;
+
+--disconnect con1
+
+--connection default
+
+update performance_schema.threads
+ set instrumented = 'YES'
+ where processlist_id = connection_id();
+
diff --git a/mysql-test/suite/perfschema/t/bad_option.test b/mysql-test/suite/perfschema/t/bad_option.test
new file mode 100644
index 00000000000..5d4d49ed12c
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/bad_option.test
@@ -0,0 +1,74 @@
+# Tests for PERFORMANCE_SCHEMA
+# Check error handling for invalid server start options and values
+
+# The current test unites and replaces all suite/perfschema/t/bad_option_*.test
+# which were developed by Marc.
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+let $error_log= $MYSQLTEST_VARDIR/log/my_restart.err;
+--error 0,1
+--remove_file $error_log
+let SEARCH_FILE= $error_log;
+# Stop the server
+let $restart_file= $MYSQLTEST_VARDIR/tmp/mysqld.1.expect;
+--exec echo "wait" > $restart_file
+--shutdown_server
+--source include/wait_until_disconnected.inc
+--error 7
+--exec $MYSQLD_CMD --loose-console --skip-log-error --performance-schema-enabled=maybe > $error_log 2>&1
+# The server restart aborts
+# [ERROR] unknown variable 'performance-schema-enabled=maybe'
+let SEARCH_PATTERN= \[ERROR\].*unknown variable 'performance-schema-enabled=maybe';
+--source include/search_pattern_in_file.inc
+--echo # Server start with invalid startup option value 'performance-schema-enabled=maybe' : pass
+
+--remove_file $error_log
+--error 7
+--exec $MYSQLD_CMD --loose-console --skip-log-error --performance-schema-max_=12 > $error_log 2>&1
+# The server restart aborts
+# [ERROR] unknown variable 'performance-schema-max_=12'
+let SEARCH_PATTERN= \[ERROR\].*unknown variable 'performance-schema-max_=12';
+--source include/search_pattern_in_file.inc
+--echo # Server start with ambigous startup option 'performance-schema-max_=12' : pass
+# The important points is here:
+# 1. There is no option 'performance-schema-max_' or 'performance-schema-max-' at all.
+# 2. But we have many options where the name starts exact with this pattern.
+# 3. There is a value assigned.
+# 4. The server criticizes "variable" and not "option"!
+# This seems to be caused by 3. because "--performance-schema-unknown=ON" gets
+# a similar reaction.
+
+--remove_file $error_log
+--error 2
+--exec $MYSQLD_CMD --loose-console --skip-log-error --performance-schema-unknown_99 > $error_log 2>&1
+# The server restart aborts
+let SEARCH_PATTERN= \[ERROR\].*unknown option '--performance-schema-unknown_99';
+--source include/search_pattern_in_file.inc
+--echo # Server start with invalid startup option '--performance-schema-unknown_99' : pass
+
+--remove_file $error_log
+--error 1
+--exec $MYSQLD_CMD --loose-console --skip-log-error --datadir=bad_option_h_param > $error_log 2>&1
+# The server restart aborts
+# [ERROR] failed to set datadir to /work/repo1/mysql-trunk2/bad_option_h_param
+let SEARCH_PATTERN= Can.t change dir to .*bad_option_h_param;
+--source include/search_pattern_in_file.inc
+--echo # Server start with invalid startup option value '--datadir=bad_option_h_param' : pass
+# The important point is here:
+# There is no directory "bad_option_h_param".
+
+--remove_file $error_log
+# Write file to make mysql-test-run.pl start up the server again
+--exec echo "restart" > $restart_file
+
+# Turn on reconnect
+--enable_reconnect
+
+# Call script that will poll the server waiting for it to be back online again
+--source include/wait_until_connected_again.inc
+
+# Turn off reconnect again
+--disable_reconnect
+
diff --git a/mysql-test/suite/perfschema/t/bad_option_1.test b/mysql-test/suite/perfschema/t/bad_option_1.test
deleted file mode 100644
index bba0d6d5357..00000000000
--- a/mysql-test/suite/perfschema/t/bad_option_1.test
+++ /dev/null
@@ -1,39 +0,0 @@
-# Tests for PERFORMANCE_SCHEMA
-# Check error handling for invalid server start options
-
---source include/not_embedded.inc
---source include/have_perfschema.inc
-
---source include/kill_mysqld.inc
-
-let $outfile= $MYSQLTEST_VARDIR/tmp/bad_option_1.txt;
---disable_warnings
---error 0,1
---remove_file $outfile
---enable_warnings
---error 7
---exec $MYSQLD_BOOTSTRAP_CMD --loose-console --performance-schema-enabled=maybe > $outfile 2>&1
-
-perl;
- use strict;
- use warnings;
- my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/bad_option_1.txt";
- open(FILE, "<", $fname) or die;
- my @lines= <FILE>;
- # those must be in the file for the test to pass
- my @patterns=
- ("unknown variable 'performance-schema-enabled=maybe'",
- "Aborting");
- foreach my $one_line (@lines)
- {
- foreach my $one_pattern (@patterns)
- {
- # print pattern, not line, to get a stable output
- print "Found: $one_pattern\n" if ($one_line =~ /$one_pattern/);
- }
- }
- close FILE;
-EOF
---remove_file $outfile
-
---source include/start_mysqld.inc
diff --git a/mysql-test/suite/perfschema/t/bad_option_2.test b/mysql-test/suite/perfschema/t/bad_option_2.test
deleted file mode 100644
index d6c2b905167..00000000000
--- a/mysql-test/suite/perfschema/t/bad_option_2.test
+++ /dev/null
@@ -1,21 +0,0 @@
-# Tests for PERFORMANCE_SCHEMA
-# Check error handling for ambiguous server start options
-
---source include/not_embedded.inc
---source include/have_perfschema.inc
-
---source include/kill_mysqld.inc
-
-let $outfile= $MYSQLTEST_VARDIR/tmp/bad_option_2.txt;
---disable_warnings
---error 0,1
---remove_file $outfile
---enable_warnings
---error 3
---exec $MYSQLD_BOOTSTRAP_CMD --loose-console --enable-getopt-prefix-matching --performance-schema-max_=12 > $outfile 2>&1
---let SEARCH_PATTERN=ambiguous option '--performance-schema-max_=12'
---let SEARCH_FILE=$outfile
---source include/search_pattern_in_file.inc
---remove_file $outfile
-
---source include/start_mysqld.inc
diff --git a/mysql-test/suite/perfschema/t/bad_option_3.test b/mysql-test/suite/perfschema/t/bad_option_3.test
deleted file mode 100644
index a4efcbccd74..00000000000
--- a/mysql-test/suite/perfschema/t/bad_option_3.test
+++ /dev/null
@@ -1,39 +0,0 @@
-# Tests for PERFORMANCE_SCHEMA
-# Check error handling for invalid server start options
-
---source include/not_embedded.inc
---source include/have_perfschema.inc
-
---source include/kill_mysqld.inc
-
-let $outfile= $MYSQLTEST_VARDIR/tmp/bad_option_3.txt;
---disable_warnings
---error 0,1
---remove_file $outfile
---enable_warnings
---error 2
---exec $MYSQLD_BOOTSTRAP_CMD --loose-console -a -x > $outfile 2>&1
-
-perl;
- use strict;
- use warnings;
- my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/bad_option_3.txt";
- open(FILE, "<", $fname) or die;
- my @lines= <FILE>;
- # those must be in the file for the test to pass
- my @patterns=
- ("unknown option '-x'",
- "Aborting");
- foreach my $one_line (@lines)
- {
- foreach my $one_pattern (@patterns)
- {
- # print pattern, not line, to get a stable output
- print "Found: $one_pattern\n" if ($one_line =~ /$one_pattern/);
- }
- }
- close FILE;
-EOF
---remove_file $outfile
-
---source include/start_mysqld.inc
diff --git a/mysql-test/suite/perfschema/t/bad_option_4.test b/mysql-test/suite/perfschema/t/bad_option_4.test
deleted file mode 100644
index ee8705788bc..00000000000
--- a/mysql-test/suite/perfschema/t/bad_option_4.test
+++ /dev/null
@@ -1,39 +0,0 @@
-# Tests for PERFORMANCE_SCHEMA
-# Check error handling for invalid server start options
-
---source include/not_embedded.inc
---source include/have_perfschema.inc
-
---source include/kill_mysqld.inc
-
-let $outfile= $MYSQLTEST_VARDIR/tmp/bad_option_4.txt;
---disable_warnings
---error 0,1
---remove_file $outfile
---enable_warnings
---error 1
---exec $MYSQLD_BOOTSTRAP_CMD --loose-console -a -h bad_option_h_param > $outfile 2>&1
-
-perl;
- use strict;
- use warnings;
- my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/bad_option_4.txt";
- open(FILE, "<", $fname) or die;
- my @lines= <FILE>;
- # those must be in the file for the test to pass
- my @patterns=
- ("Can't change dir to.*bad_option_h_param",
- "Aborting");
- foreach my $one_line (@lines)
- {
- foreach my $one_pattern (@patterns)
- {
- # print pattern, not line, to get a stable output
- print "Found: $one_pattern\n" if ($one_line =~ /$one_pattern/);
- }
- }
- close FILE;
-EOF
---remove_file $outfile
-
---source include/start_mysqld.inc
diff --git a/mysql-test/suite/perfschema/t/bad_option_5.test b/mysql-test/suite/perfschema/t/bad_option_5.test
deleted file mode 100644
index c9c6fc75d52..00000000000
--- a/mysql-test/suite/perfschema/t/bad_option_5.test
+++ /dev/null
@@ -1,42 +0,0 @@
-# Tests for PERFORMANCE_SCHEMA
-# Check error handling for invalid server start options
-
---source include/not_embedded.inc
---source include/have_perfschema.inc
-
---source include/kill_mysqld.inc
-
-let $outfile= $MYSQLTEST_VARDIR/tmp/bad_option_5.txt;
---disable_warnings
---error 0,1
---remove_file $outfile
---enable_warnings
---error 2
---exec $MYSQLD_BOOTSTRAP_CMD --loose-console -aXbroken > $outfile 2>&1
-
-# -aXbroken should be parsed as -a -Xbroken, or --ansi -Xbroken,
-# therefore the -X option is what the server should complain about
-
-perl;
- use strict;
- use warnings;
- my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/bad_option_5.txt";
- open(FILE, "<", $fname) or die;
- my @lines= <FILE>;
- # those must be in the file for the test to pass
- my @patterns=
- ("unknown option '-X'",
- "Aborting");
- foreach my $one_line (@lines)
- {
- foreach my $one_pattern (@patterns)
- {
- # print pattern, not line, to get a stable output
- print "Found: $one_pattern\n" if ($one_line =~ /$one_pattern/);
- }
- }
- close FILE;
-EOF
---remove_file $outfile
-
---source include/start_mysqld.inc
diff --git a/mysql-test/suite/perfschema/t/batch_table_io_func.test b/mysql-test/suite/perfschema/t/batch_table_io_func.test
new file mode 100644
index 00000000000..c35d8a06125
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/batch_table_io_func.test
@@ -0,0 +1,148 @@
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+UPDATE performance_schema.setup_instruments SET enabled = 'NO', timed = 'YES';
+
+UPDATE performance_schema.setup_instruments SET enabled = 'YES'
+WHERE name in ('wait/io/table/sql/handler',
+ 'wait/lock/table/sql/handler');
+
+--disable_warnings
+drop procedure if exists before_payload;
+drop procedure if exists after_payload;
+--enable_warnings
+
+delimiter $$;
+
+create procedure before_payload()
+begin
+ TRUNCATE TABLE performance_schema.table_io_waits_summary_by_index_usage;
+ TRUNCATE TABLE performance_schema.table_io_waits_summary_by_table;
+ TRUNCATE TABLE performance_schema.events_waits_history_long;
+ TRUNCATE TABLE performance_schema.events_waits_history;
+ TRUNCATE TABLE performance_schema.events_waits_current;
+end
+$$
+
+create procedure after_payload()
+begin
+ select count(1) as number_seen,
+ OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME, INDEX_NAME,
+ OPERATION, NUMBER_OF_BYTES
+ from performance_schema.events_waits_history_long
+ where OBJECT_SCHEMA = "test"
+ group by OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME, INDEX_NAME, OPERATION, NUMBER_OF_BYTES;
+
+ select OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME, INDEX_NAME,
+ COUNT_STAR, COUNT_READ, COUNT_WRITE
+ from performance_schema.table_io_waits_summary_by_index_usage
+ where OBJECT_SCHEMA = "test"
+ order by OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME, INDEX_NAME;
+
+ select OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME,
+ COUNT_STAR, COUNT_READ, COUNT_WRITE
+ from performance_schema.table_io_waits_summary_by_table
+ where OBJECT_SCHEMA = "test"
+ order by OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME;
+end
+$$
+
+delimiter ;$$
+
+
+--disable_warnings
+drop table if exists t1;
+drop table if exists t2;
+drop table if exists t3;
+--enable_warnings
+
+create table t0(v int);
+create table t1(id1 int, a int);
+create table t2(id1 int, id2 int, b int);
+create table t3(id2 int, id3 int, c int);
+
+insert into t0 values
+ (0), (1), (2), (3), (4),
+ (5), (6), (7), (8), (9);
+
+insert into t1(id1, a)
+ select v, 100*v from t0;
+
+insert into t2(id1, id2, b)
+ select X.v, 10*X.v + Y.v, 100*X.v + 10*Y.v
+ from t0 X, t0 Y;
+
+insert into t3(id2, id3, c)
+ select 10*X.v + Y.v, 100*X.v + 10*Y.v + Z.v, 100*X.v + 10*Y.v + Z.v
+ from t0 X, t0 Y, t0 Z;
+
+analyze table t1;
+analyze table t2;
+analyze table t3;
+
+select * from t1 order by a;
+
+# Only dump a small part
+select * from t2
+ where (b >= 180) and (b <= 220)
+ order by b;
+
+# Only dump a small part
+select * from t3
+ where (c >= 587) and (c <= 612)
+ order by c;
+
+#
+# TEST 1 (join, no index)
+#
+
+explain extended select t1.*, t2.*, t3.*
+ from t1 join t2 using (id1) join t3 using (id2);
+
+call before_payload();
+
+# Payload query to analyse: should do batch io on t3
+
+--disable_result_log
+select t1.*, t2.*, t3.*
+ from t1 join t2 using (id1) join t3 using (id2);
+--enable_result_log
+
+call after_payload();
+
+#
+# TEST 2 (join, with index)
+#
+
+alter table t1 add unique index(id1);
+alter table t2 add unique index(id2);
+alter table t2 add index(id1);
+alter table t3 add unique index(id3);
+alter table t3 add index(id2);
+
+explain extended select t1.*, t2.*, t3.*
+ from t1 join t2 using (id1) join t3 using (id2);
+
+call before_payload();
+
+# Payload query to analyse: should do batch io on t3
+
+--disable_result_log
+select t1.*, t2.*, t3.*
+ from t1 join t2 using (id1) join t3 using (id2);
+--enable_result_log
+
+call after_payload();
+
+# Cleanup
+
+drop table t0;
+drop table t1;
+drop table t2;
+drop table t3;
+
+drop procedure before_payload;
+drop procedure after_payload;
+
+UPDATE performance_schema.setup_instruments SET enabled = 'YES', timed = 'YES';
+
diff --git a/mysql-test/suite/perfschema/t/checksum.test b/mysql-test/suite/perfschema/t/checksum.test
index 125573242cc..a2d43b27bce 100644
--- a/mysql-test/suite/perfschema/t/checksum.test
+++ b/mysql-test/suite/perfschema/t/checksum.test
@@ -27,6 +27,14 @@ checksum table performance_schema.events_statements_summary_by_host_by_event_nam
checksum table performance_schema.events_statements_summary_by_thread_by_event_name;
checksum table performance_schema.events_statements_summary_by_user_by_event_name;
checksum table performance_schema.events_statements_summary_global_by_event_name;
+checksum table performance_schema.events_transactions_current;
+checksum table performance_schema.events_transactions_history;
+checksum table performance_schema.events_transactions_history_long;
+checksum table performance_schema.events_transactions_summary_by_account_by_event_name;
+checksum table performance_schema.events_transactions_summary_by_host_by_event_name;
+checksum table performance_schema.events_transactions_summary_by_thread_by_event_name;
+checksum table performance_schema.events_transactions_summary_by_user_by_event_name;
+checksum table performance_schema.events_transactions_summary_global_by_event_name;
checksum table performance_schema.events_waits_current;
checksum table performance_schema.events_waits_history;
checksum table performance_schema.events_waits_history_long;
@@ -73,6 +81,14 @@ checksum table performance_schema.events_statements_summary_by_host_by_event_nam
checksum table performance_schema.events_statements_summary_by_thread_by_event_name extended;
checksum table performance_schema.events_statements_summary_by_user_by_event_name extended;
checksum table performance_schema.events_statements_summary_global_by_event_name extended;
+checksum table performance_schema.events_transactions_current extended;
+checksum table performance_schema.events_transactions_history extended;
+checksum table performance_schema.events_transactions_history_long extended;
+checksum table performance_schema.events_transactions_summary_by_account_by_event_name extended;
+checksum table performance_schema.events_transactions_summary_by_host_by_event_name extended;
+checksum table performance_schema.events_transactions_summary_by_thread_by_event_name extended;
+checksum table performance_schema.events_transactions_summary_by_user_by_event_name extended;
+checksum table performance_schema.events_transactions_summary_global_by_event_name extended;
checksum table performance_schema.events_waits_current extended;
checksum table performance_schema.events_waits_history extended;
checksum table performance_schema.events_waits_history_long extended;
diff --git a/mysql-test/suite/perfschema/t/cnf_option.test b/mysql-test/suite/perfschema/t/cnf_option.test
index 698bb44b104..04140310cf4 100644
--- a/mysql-test/suite/perfschema/t/cnf_option.test
+++ b/mysql-test/suite/perfschema/t/cnf_option.test
@@ -4,6 +4,6 @@
--source include/not_embedded.inc
--source include/have_perfschema.inc
-show variables like 'performance_schema_max_thread_classes';
-show variables like 'performance_schema_max_thread_instances';
+show global variables like 'performance_schema_max_thread_classes';
+show global variables like 'performance_schema_max_thread_instances';
diff --git a/mysql-test/suite/perfschema/t/connect_attrs.test b/mysql-test/suite/perfschema/t/connect_attrs.test
index 850d9ddd248..c703badef85 100644
--- a/mysql-test/suite/perfschema/t/connect_attrs.test
+++ b/mysql-test/suite/perfschema/t/connect_attrs.test
@@ -57,7 +57,7 @@ SELECT COUNT(DISTINCT PROCESSLIST_ID)
FROM performance_schema.session_connect_attrs;
connection non_privileged_user;
---error ER_TABLEACCESS_DENIED_ERROR
+--echo # must return 1
SELECT COUNT(DISTINCT PROCESSLIST_ID)
FROM performance_schema.session_account_connect_attrs;
diff --git a/mysql-test/suite/perfschema/t/connection_type_notwin.test b/mysql-test/suite/perfschema/t/connection_type_notwin.test
new file mode 100644
index 00000000000..07028e1fb81
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/connection_type_notwin.test
@@ -0,0 +1,92 @@
+
+--source include/not_windows.inc
+--source include/not_embedded.inc
+--source include/have_debug.inc
+--source include/have_perfschema.inc
+
+--echo # Default connection
+
+--vertical_results
+select NAME, PROCESSLIST_USER, PROCESSLIST_HOST, CONNECTION_TYPE
+ from performance_schema.threads
+ where PROCESSLIST_ID = connection_id();
+
+create user 'root'@'santa.claus.ipv4.example.com';
+grant select on *.* to 'root'@'santa.claus.ipv4.example.com';
+create user 'rootssl'@'santa.claus.ipv4.example.com'
+ require SSL;
+grant select on *.* to 'rootssl'@'santa.claus.ipv4.example.com';
+
+set @old_dbug=@@global.debug_dbug;
+set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
+
+# Setup
+# make sure we start with a clean slate. log_tables.test says this is OK.
+TRUNCATE TABLE mysql.general_log;
+
+SET @old_log_output= @@global.log_output;
+SET @old_general_log= @@global.general_log;
+SET @old_general_log_file= @@global.general_log_file;
+
+--replace_result $MYSQLTEST_VARDIR ...
+eval SET GLOBAL general_log_file = '$MYSQLTEST_VARDIR/log/rewrite_general_con.log';
+SET GLOBAL log_output = 'FILE,TABLE';
+SET GLOBAL general_log= 'ON';
+
+connect(con1, localhost, root,,);
+
+select NAME, PROCESSLIST_USER, PROCESSLIST_HOST, CONNECTION_TYPE
+ from performance_schema.threads
+ where PROCESSLIST_ID = connection_id();
+
+--disconnect con1
+
+connect(con2, "127.0.0.1", root,,test,$MASTER_MYPORT,);
+
+select NAME, PROCESSLIST_USER, PROCESSLIST_HOST, CONNECTION_TYPE
+ from performance_schema.threads
+ where PROCESSLIST_ID = connection_id();
+
+--disconnect con2
+
+connect(con3, "127.0.0.1", rootssl,,test,$MASTER_MYPORT,,SSL);
+
+select NAME, PROCESSLIST_USER, PROCESSLIST_HOST, CONNECTION_TYPE
+ from performance_schema.threads
+ where PROCESSLIST_ID = connection_id();
+
+--disconnect con3
+
+--connection default
+
+SET GLOBAL general_log= 'OFF';
+
+# show general-logging to file is correct
+CREATE TABLE test_log (argument TEXT);
+--replace_result $MYSQLTEST_VARDIR ...
+eval LOAD DATA LOCAL INFILE '$MYSQLTEST_VARDIR/log/rewrite_general_con.log'
+ INTO TABLE test_log FIELDS TERMINATED BY '\n' LINES TERMINATED BY '\n';
+
+select user_host, command_type, argument from mysql.general_log
+ where command_type = "Connect";
+
+select substring(argument, locate("Connect", argument)) from test_log
+ where argument like "%Connect%on test%";
+
+
+DROP TABLE test_log;
+
+--remove_file $MYSQLTEST_VARDIR/log/rewrite_general_con.log
+
+SET GLOBAL general_log_file= @old_general_log_file;
+SET GLOBAL general_log= @old_general_log;
+SET GLOBAL log_output= @old_log_output;
+
+--horizontal_results
+
+set global debug_dbug= @old_dbug;
+revoke select on *.* from 'root'@'santa.claus.ipv4.example.com';
+drop user 'root'@'santa.claus.ipv4.example.com';
+revoke select on *.* from 'rootssl'@'santa.claus.ipv4.example.com';
+drop user 'rootssl'@'santa.claus.ipv4.example.com';
+
diff --git a/mysql-test/suite/perfschema/t/connection_type_win.test b/mysql-test/suite/perfschema/t/connection_type_win.test
new file mode 100644
index 00000000000..2beccdbc5e5
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/connection_type_win.test
@@ -0,0 +1,90 @@
+
+--source include/windows.inc
+--source include/not_embedded.inc
+--source include/have_debug.inc
+--source include/have_perfschema.inc
+
+--echo # Default connection
+
+--vertical_results
+select NAME, PROCESSLIST_USER, PROCESSLIST_HOST, CONNECTION_TYPE
+ from performance_schema.threads
+ where PROCESSLIST_ID = connection_id();
+
+create user 'root'@'santa.claus.ipv4.example.com';
+grant select on *.* to 'root'@'santa.claus.ipv4.example.com';
+create user 'rootssl'@'santa.claus.ipv4.example.com'
+ require SSL;
+grant select on *.* to 'rootssl'@'santa.claus.ipv4.example.com';
+
+set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
+
+# Setup
+# make sure we start with a clean slate. log_tables.test says this is OK.
+TRUNCATE TABLE mysql.general_log;
+
+SET @old_log_output= @@global.log_output;
+SET @old_general_log= @@global.general_log;
+SET @old_general_log_file= @@global.general_log_file;
+
+--replace_result $MYSQLTEST_VARDIR ...
+eval SET GLOBAL general_log_file = '$MYSQLTEST_VARDIR/log/rewrite_general_con.log';
+SET GLOBAL log_output = 'FILE,TABLE';
+SET GLOBAL general_log= 'ON';
+
+connect(con1, localhost, root,,);
+
+select NAME, PROCESSLIST_USER, PROCESSLIST_HOST, CONNECTION_TYPE
+ from performance_schema.threads
+ where PROCESSLIST_ID = connection_id();
+
+--disconnect con1
+
+connect(con2, "127.0.0.1", root,,test,$MASTER_MYPORT,);
+
+select NAME, PROCESSLIST_USER, PROCESSLIST_HOST, CONNECTION_TYPE
+ from performance_schema.threads
+ where PROCESSLIST_ID = connection_id();
+
+--disconnect con2
+
+connect(con3, "127.0.0.1", rootssl,,test,$MASTER_MYPORT,,SSL);
+
+select NAME, PROCESSLIST_USER, PROCESSLIST_HOST, CONNECTION_TYPE
+ from performance_schema.threads
+ where PROCESSLIST_ID = connection_id();
+
+--disconnect con3
+
+--connection default
+
+SET GLOBAL general_log= 'OFF';
+
+# show general-logging to file is correct
+CREATE TABLE test_log (argument TEXT);
+--replace_result $MYSQLTEST_VARDIR ...
+eval LOAD DATA LOCAL INFILE '$MYSQLTEST_VARDIR/log/rewrite_general_con.log'
+ INTO TABLE test_log FIELDS TERMINATED BY '\n' LINES TERMINATED BY '\n';
+
+select user_host, command_type, argument from mysql.general_log
+ where command_type = "Connect";
+
+select substring(argument, locate("Connect", argument)) from test_log
+ where argument like "%Connect%on test%";
+
+
+DROP TABLE test_log;
+
+--remove_file $MYSQLTEST_VARDIR/log/rewrite_general_con.log
+
+SET GLOBAL general_log_file= @old_general_log_file;
+SET GLOBAL general_log= @old_general_log;
+SET GLOBAL log_output= @old_log_output;
+
+--horizontal_results
+
+set global debug_dbug= default;
+revoke select on *.* from 'root'@'santa.claus.ipv4.example.com';
+drop user 'root'@'santa.claus.ipv4.example.com';
+revoke select on *.* from 'rootssl'@'santa.claus.ipv4.example.com';
+drop user 'rootssl'@'santa.claus.ipv4.example.com';
diff --git a/mysql-test/suite/perfschema/t/ddl_esms_by_program.test b/mysql-test/suite/perfschema/t/ddl_esms_by_program.test
new file mode 100644
index 00000000000..ba24da5e4ba
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/ddl_esms_by_program.test
@@ -0,0 +1,21 @@
+# This line and the line below is a temporary line for tests that do not need MyISAM in future, but need to be kept for tests that need it.
+#--source include/have_myisam.inc
+
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+-- error ER_DBACCESS_DENIED_ERROR
+alter table performance_schema.events_statements_summary_by_program
+ add column foo integer;
+
+truncate table performance_schema.events_statements_summary_by_program;
+
+-- error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE performance_schema.events_statements_summary_by_program ADD INDEX test_index(OBJECT_NAME);
+
+-- error ER_DBACCESS_DENIED_ERROR
+CREATE UNIQUE INDEX test_index
+ ON performance_schema.events_statements_summary_by_program(OBJECT_NAME);
+
diff --git a/mysql-test/suite/perfschema/t/ddl_ets_by_account_by_event_name.test b/mysql-test/suite/perfschema/t/ddl_ets_by_account_by_event_name.test
new file mode 100644
index 00000000000..2ec1ddf79b3
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/ddl_ets_by_account_by_event_name.test
@@ -0,0 +1,19 @@
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+-- error ER_DBACCESS_DENIED_ERROR
+alter table performance_schema.events_transactions_summary_by_account_by_event_name
+ add column foo integer;
+
+truncate table performance_schema.events_transactions_summary_by_account_by_event_name;
+
+-- error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE performance_schema.events_transactions_summary_by_account_by_event_name
+ ADD INDEX test_index(USERNAME);
+
+-- error ER_DBACCESS_DENIED_ERROR
+CREATE UNIQUE INDEX test_index
+ ON performance_schema.events_transactions_summary_by_account_by_event_name(USERNAME);
+
diff --git a/mysql-test/suite/perfschema/t/ddl_ets_by_host_by_event_name.test b/mysql-test/suite/perfschema/t/ddl_ets_by_host_by_event_name.test
new file mode 100644
index 00000000000..47ae1d197f5
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/ddl_ets_by_host_by_event_name.test
@@ -0,0 +1,19 @@
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+-- error ER_DBACCESS_DENIED_ERROR
+alter table performance_schema.events_transactions_summary_by_host_by_event_name
+ add column foo integer;
+
+truncate table performance_schema.events_transactions_summary_by_host_by_event_name;
+
+-- error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE performance_schema.events_transactions_summary_by_host_by_event_name
+ ADD INDEX test_index(HOSTNAME);
+
+-- error ER_DBACCESS_DENIED_ERROR
+CREATE UNIQUE INDEX test_index
+ ON performance_schema.events_transactions_summary_by_host_by_event_name(HOSTNAME);
+
diff --git a/mysql-test/suite/perfschema/t/ddl_ets_by_thread_by_event_name.test b/mysql-test/suite/perfschema/t/ddl_ets_by_thread_by_event_name.test
new file mode 100644
index 00000000000..63cdfd898f3
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/ddl_ets_by_thread_by_event_name.test
@@ -0,0 +1,18 @@
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+-- error ER_DBACCESS_DENIED_ERROR
+alter table performance_schema.events_transactions_summary_by_thread_by_event_name
+ add column foo integer;
+
+truncate table performance_schema.events_transactions_summary_by_thread_by_event_name;
+
+-- error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE performance_schema.events_transactions_summary_by_thread_by_event_name ADD INDEX test_index(THREAD_ID);
+
+-- error ER_DBACCESS_DENIED_ERROR
+CREATE UNIQUE INDEX test_index
+ ON performance_schema.events_transactions_summary_by_thread_by_event_name(THREAD_ID);
+
diff --git a/mysql-test/suite/perfschema/t/ddl_ets_by_user_by_event_name.test b/mysql-test/suite/perfschema/t/ddl_ets_by_user_by_event_name.test
new file mode 100644
index 00000000000..9a70075b653
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/ddl_ets_by_user_by_event_name.test
@@ -0,0 +1,19 @@
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+-- error ER_DBACCESS_DENIED_ERROR
+alter table performance_schema.events_transactions_summary_by_user_by_event_name
+ add column foo integer;
+
+truncate table performance_schema.events_transactions_summary_by_user_by_event_name;
+
+-- error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE performance_schema.events_transactions_summary_by_user_by_event_name
+ ADD INDEX test_index(USERNAME);
+
+-- error ER_DBACCESS_DENIED_ERROR
+CREATE UNIQUE INDEX test_index
+ ON performance_schema.events_transactions_summary_by_user_by_event_name(USERNAME);
+
diff --git a/mysql-test/suite/perfschema/t/ddl_ets_global_by_event_name.test b/mysql-test/suite/perfschema/t/ddl_ets_global_by_event_name.test
new file mode 100644
index 00000000000..5bb70245bd4
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/ddl_ets_global_by_event_name.test
@@ -0,0 +1,19 @@
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+-- error ER_DBACCESS_DENIED_ERROR
+alter table performance_schema.events_transactions_summary_global_by_event_name
+ add column foo integer;
+
+truncate table performance_schema.events_transactions_summary_global_by_event_name;
+
+-- error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE performance_schema.events_transactions_summary_global_by_event_name
+ ADD INDEX test_index(EVENT_NAME);
+
+-- error ER_DBACCESS_DENIED_ERROR
+CREATE UNIQUE INDEX test_index
+ ON performance_schema.events_transactions_summary_global_by_event_name(EVENT_NAME);
+
diff --git a/mysql-test/suite/perfschema/t/ddl_events_stages_current.test b/mysql-test/suite/perfschema/t/ddl_events_stages_current.test
index 6085e41a7fd..822600ce6d4 100644
--- a/mysql-test/suite/perfschema/t/ddl_events_stages_current.test
+++ b/mysql-test/suite/perfschema/t/ddl_events_stages_current.test
@@ -14,3 +14,8 @@ ALTER TABLE performance_schema.events_stages_current ADD INDEX test_index(EVENT_
-- error ER_DBACCESS_DENIED_ERROR
CREATE UNIQUE INDEX test_index ON performance_schema.events_stages_current(EVENT_ID);
+--disable_query_log
+# Checking if the column WORK_COMPLETED and WORK_ESTIMATED exists
+select * from information_schema.columns where TABLE_NAME = 'events_stages_current' and column_name in ('WORK_COMPLETED','WORK_ESTIMATED')
+and table_schema='performance_schema';
+--enable_query_log
diff --git a/mysql-test/suite/perfschema/t/ddl_events_stages_history.test b/mysql-test/suite/perfschema/t/ddl_events_stages_history.test
index 1dd186571b2..eac2889e7cb 100644
--- a/mysql-test/suite/perfschema/t/ddl_events_stages_history.test
+++ b/mysql-test/suite/perfschema/t/ddl_events_stages_history.test
@@ -14,3 +14,8 @@ ALTER TABLE performance_schema.events_stages_history ADD INDEX test_index(EVENT_
-- error ER_DBACCESS_DENIED_ERROR
CREATE UNIQUE INDEX test_index ON performance_schema.events_stages_history(EVENT_ID);
+--disable_query_log
+# Checking if the column WORK_COMPLETED and WORK_ESTIMATED exists
+select * from information_schema.columns where TABLE_NAME ='events_stages_history' and column_name in ('WORK_COMPLETED','WORK_ESTIMATED')
+and table_schema='performance_schema';
+--enable_query_log
diff --git a/mysql-test/suite/perfschema/t/ddl_events_stages_history_long.test b/mysql-test/suite/perfschema/t/ddl_events_stages_history_long.test
index 8298500cf6d..2bc78b12674 100644
--- a/mysql-test/suite/perfschema/t/ddl_events_stages_history_long.test
+++ b/mysql-test/suite/perfschema/t/ddl_events_stages_history_long.test
@@ -14,3 +14,8 @@ ALTER TABLE performance_schema.events_stages_history_long ADD INDEX test_index(E
-- error ER_DBACCESS_DENIED_ERROR
CREATE UNIQUE INDEX test_index ON performance_schema.events_stages_history_long(EVENT_ID);
+--disable_query_log
+# Checking if the column WORK_COMPLETED and WORK_ESTIMATED exists
+select * from information_schema.columns where TABLE_NAME ='events_stages_history_long' and column_name in ('WORK_COMPLETED','WORK_ESTIMATED')
+and table_schema='performance_schema';
+--enable_query_log
diff --git a/mysql-test/suite/perfschema/t/ddl_events_transactions_current.test b/mysql-test/suite/perfschema/t/ddl_events_transactions_current.test
new file mode 100644
index 00000000000..5f64e65cd1e
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/ddl_events_transactions_current.test
@@ -0,0 +1,16 @@
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+-- error ER_DBACCESS_DENIED_ERROR
+alter table performance_schema.events_transactions_current add column foo integer;
+
+truncate table performance_schema.events_transactions_current;
+
+-- error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE performance_schema.events_transactions_current ADD INDEX test_index(EVENT_ID);
+
+-- error ER_DBACCESS_DENIED_ERROR
+CREATE UNIQUE INDEX test_index ON performance_schema.events_transactions_current(EVENT_ID);
+
diff --git a/mysql-test/suite/perfschema/t/ddl_events_transactions_history.test b/mysql-test/suite/perfschema/t/ddl_events_transactions_history.test
new file mode 100644
index 00000000000..a3b0cdded5e
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/ddl_events_transactions_history.test
@@ -0,0 +1,16 @@
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+-- error ER_DBACCESS_DENIED_ERROR
+alter table performance_schema.events_transactions_history add column foo integer;
+
+truncate table performance_schema.events_transactions_history;
+
+-- error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE performance_schema.events_transactions_history ADD INDEX test_index(EVENT_ID);
+
+-- error ER_DBACCESS_DENIED_ERROR
+CREATE UNIQUE INDEX test_index ON performance_schema.events_transactions_history(EVENT_ID);
+
diff --git a/mysql-test/suite/perfschema/t/ddl_events_transactions_history_long.test b/mysql-test/suite/perfschema/t/ddl_events_transactions_history_long.test
new file mode 100644
index 00000000000..1c8d6076f9f
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/ddl_events_transactions_history_long.test
@@ -0,0 +1,16 @@
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+-- error ER_DBACCESS_DENIED_ERROR
+alter table performance_schema.events_transactions_history_long add column foo integer;
+
+truncate table performance_schema.events_transactions_history_long;
+
+-- error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE performance_schema.events_transactions_history_long ADD INDEX test_index(EVENT_ID);
+
+-- error ER_DBACCESS_DENIED_ERROR
+CREATE UNIQUE INDEX test_index ON performance_schema.events_transactions_history_long(EVENT_ID);
+
diff --git a/mysql-test/suite/perfschema/t/ddl_global_status.test b/mysql-test/suite/perfschema/t/ddl_global_status.test
new file mode 100644
index 00000000000..fe65b79ab11
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/ddl_global_status.test
@@ -0,0 +1,19 @@
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+-- error ER_DBACCESS_DENIED_ERROR
+alter table performance_schema.global_status
+ add column foo integer;
+
+truncate table performance_schema.global_status;
+
+-- error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE performance_schema.global_status
+ ADD INDEX test_index(VARIABLE_NAME);
+
+-- error ER_DBACCESS_DENIED_ERROR
+CREATE UNIQUE INDEX test_index
+ ON performance_schema.global_status(VARIABLE_NAME);
+
diff --git a/mysql-test/suite/perfschema/t/ddl_global_variables.test b/mysql-test/suite/perfschema/t/ddl_global_variables.test
new file mode 100644
index 00000000000..f9b66a7d41c
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/ddl_global_variables.test
@@ -0,0 +1,20 @@
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+-- error ER_DBACCESS_DENIED_ERROR
+alter table performance_schema.global_variables
+ add column foo integer;
+
+-- error ER_WRONG_PERFSCHEMA_USAGE
+truncate table performance_schema.global_variables;
+
+-- error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE performance_schema.global_variables
+ ADD INDEX test_index(VARIABLE_NAME);
+
+-- error ER_DBACCESS_DENIED_ERROR
+CREATE UNIQUE INDEX test_index
+ ON performance_schema.global_variables(VARIABLE_NAME);
+
diff --git a/mysql-test/suite/perfschema/t/ddl_mems_by_account_by_event_name.test b/mysql-test/suite/perfschema/t/ddl_mems_by_account_by_event_name.test
new file mode 100644
index 00000000000..34d08cfe05c
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/ddl_mems_by_account_by_event_name.test
@@ -0,0 +1,19 @@
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+-- error ER_DBACCESS_DENIED_ERROR
+alter table performance_schema.memory_summary_by_account_by_event_name
+ add column foo integer;
+
+truncate table performance_schema.memory_summary_by_account_by_event_name;
+
+-- error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE performance_schema.memory_summary_by_account_by_event_name
+ ADD INDEX test_index(USERNAME);
+
+-- error ER_DBACCESS_DENIED_ERROR
+CREATE UNIQUE INDEX test_index
+ ON performance_schema.memory_summary_by_account_by_event_name(USERNAME);
+
diff --git a/mysql-test/suite/perfschema/t/ddl_mems_by_host_by_event_name.test b/mysql-test/suite/perfschema/t/ddl_mems_by_host_by_event_name.test
new file mode 100644
index 00000000000..fc2e8c054e4
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/ddl_mems_by_host_by_event_name.test
@@ -0,0 +1,19 @@
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+-- error ER_DBACCESS_DENIED_ERROR
+alter table performance_schema.memory_summary_by_host_by_event_name
+ add column foo integer;
+
+truncate table performance_schema.memory_summary_by_host_by_event_name;
+
+-- error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE performance_schema.memory_summary_by_host_by_event_name
+ ADD INDEX test_index(USERNAME);
+
+-- error ER_DBACCESS_DENIED_ERROR
+CREATE UNIQUE INDEX test_index
+ ON performance_schema.memory_summary_by_host_by_event_name(USERNAME);
+
diff --git a/mysql-test/suite/perfschema/t/ddl_mems_by_thread_by_event_name.test b/mysql-test/suite/perfschema/t/ddl_mems_by_thread_by_event_name.test
new file mode 100644
index 00000000000..d4fdf155710
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/ddl_mems_by_thread_by_event_name.test
@@ -0,0 +1,19 @@
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+-- error ER_DBACCESS_DENIED_ERROR
+alter table performance_schema.memory_summary_by_thread_by_event_name
+ add column foo integer;
+
+truncate table performance_schema.memory_summary_by_thread_by_event_name;
+
+-- error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE performance_schema.memory_summary_by_thread_by_event_name
+ ADD INDEX test_index(USERNAME);
+
+-- error ER_DBACCESS_DENIED_ERROR
+CREATE UNIQUE INDEX test_index
+ ON performance_schema.memory_summary_by_thread_by_event_name(USERNAME);
+
diff --git a/mysql-test/suite/perfschema/t/ddl_mems_by_user_by_event_name.test b/mysql-test/suite/perfschema/t/ddl_mems_by_user_by_event_name.test
new file mode 100644
index 00000000000..03e5cebe6a2
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/ddl_mems_by_user_by_event_name.test
@@ -0,0 +1,19 @@
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+-- error ER_DBACCESS_DENIED_ERROR
+alter table performance_schema.memory_summary_by_user_by_event_name
+ add column foo integer;
+
+truncate table performance_schema.memory_summary_by_user_by_event_name;
+
+-- error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE performance_schema.memory_summary_by_user_by_event_name
+ ADD INDEX test_index(USERNAME);
+
+-- error ER_DBACCESS_DENIED_ERROR
+CREATE UNIQUE INDEX test_index
+ ON performance_schema.memory_summary_by_user_by_event_name(USERNAME);
+
diff --git a/mysql-test/suite/perfschema/t/ddl_mems_global_by_event_name.test b/mysql-test/suite/perfschema/t/ddl_mems_global_by_event_name.test
new file mode 100644
index 00000000000..a2c48997877
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/ddl_mems_global_by_event_name.test
@@ -0,0 +1,19 @@
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+-- error ER_DBACCESS_DENIED_ERROR
+alter table performance_schema.memory_summary_global_by_event_name
+ add column foo integer;
+
+truncate table performance_schema.memory_summary_global_by_event_name;
+
+-- error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE performance_schema.memory_summary_global_by_event_name
+ ADD INDEX test_index(USERNAME);
+
+-- error ER_DBACCESS_DENIED_ERROR
+CREATE UNIQUE INDEX test_index
+ ON performance_schema.memory_summary_global_by_event_name(USERNAME);
+
diff --git a/mysql-test/suite/perfschema/t/ddl_metadata_locks.test b/mysql-test/suite/perfschema/t/ddl_metadata_locks.test
new file mode 100644
index 00000000000..520b8fcd3fb
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/ddl_metadata_locks.test
@@ -0,0 +1,17 @@
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+-- error ER_DBACCESS_DENIED_ERROR
+alter table performance_schema.metadata_locks add column foo integer;
+
+-- error ER_WRONG_PERFSCHEMA_USAGE
+truncate table performance_schema.metadata_locks;
+
+-- error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE performance_schema.metadata_locks ADD INDEX test_index(TIMER_NAME);
+
+-- error ER_DBACCESS_DENIED_ERROR
+CREATE UNIQUE INDEX test_index ON performance_schema.metadata_locks(TIMER_NAME);
+
diff --git a/mysql-test/suite/perfschema/t/ddl_prepared_statements_instances.test b/mysql-test/suite/perfschema/t/ddl_prepared_statements_instances.test
new file mode 100644
index 00000000000..0cba4c485a5
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/ddl_prepared_statements_instances.test
@@ -0,0 +1,21 @@
+# This line and the line below is a temporary line for tests that do not need MyISAM in future, but need to be kept for tests that need it.
+#--source include/have_myisam.inc
+
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+-- error ER_DBACCESS_DENIED_ERROR
+alter table performance_schema.prepared_statements_instances
+ add column foo integer;
+
+truncate table performance_schema.prepared_statements_instances;
+
+-- error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE performance_schema.prepared_statements_instances ADD INDEX test_index(OWNER_OBJECT_NAME);
+
+-- error ER_DBACCESS_DENIED_ERROR
+CREATE UNIQUE INDEX test_index
+ ON performance_schema.prepared_statements_instances(OWNER_OBJECT_NAME);
+
diff --git a/mysql-test/suite/perfschema/t/ddl_replication_applier_configuration.test b/mysql-test/suite/perfschema/t/ddl_replication_applier_configuration.test
new file mode 100644
index 00000000000..bc7ef8c28ab
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/ddl_replication_applier_configuration.test
@@ -0,0 +1,22 @@
+# Tests for PERFORMANCE_SCHEMA
+
+# This test verifies the correct behaviour in case of invalid
+# usage of DDLs on the table replication_applier_configuration
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+-- error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE performance_schema.replication_applier_configuration
+ ADD COLUMN foo integer;
+
+-- error ER_WRONG_PERFSCHEMA_USAGE
+TRUNCATE TABLE performance_schema.replication_applier_configuration;
+
+-- error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE performance_schema.replication_applier_configuration
+ ADD INDEX test_index(desired_delay);
+
+-- error ER_DBACCESS_DENIED_ERROR
+CREATE UNIQUE INDEX test_index ON
+ performance_schema.replication_applier_configuration(desired_delay);
diff --git a/mysql-test/suite/perfschema/t/ddl_replication_applier_status.test b/mysql-test/suite/perfschema/t/ddl_replication_applier_status.test
new file mode 100644
index 00000000000..7cf1f656cd5
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/ddl_replication_applier_status.test
@@ -0,0 +1,22 @@
+# Tests for PERFORMANCE_SCHEMA
+
+# This test verifies the correct behaviour in case of invalid
+# usage of DDLs on the table replication_applier_status
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+-- error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE performance_schema.replication_applier_status
+ ADD COLUMN foo integer;
+
+-- error ER_WRONG_PERFSCHEMA_USAGE
+TRUNCATE TABLE performance_schema.replication_applier_status;
+
+-- error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE performance_schema.replication_applier_status
+ ADD INDEX test_index(remaining_delay);
+
+-- error ER_DBACCESS_DENIED_ERROR
+CREATE UNIQUE INDEX test_index ON
+ performance_schema.replication_applier_status(remaining_delay);
diff --git a/mysql-test/suite/perfschema/t/ddl_replication_applier_status_by_coordinator.test b/mysql-test/suite/perfschema/t/ddl_replication_applier_status_by_coordinator.test
new file mode 100644
index 00000000000..0e5f172e2b6
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/ddl_replication_applier_status_by_coordinator.test
@@ -0,0 +1,22 @@
+# Tests for PERFORMANCE_SCHEMA
+
+# This test verifies the correct behaviour in case of invalid
+# usage of DDLs on the table replication_applier_status_by_coordinator
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+-- error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE performance_schema.replication_applier_status_by_coordinator
+ ADD COLUMN foo integer;
+
+-- error ER_WRONG_PERFSCHEMA_USAGE
+TRUNCATE TABLE performance_schema.replication_applier_status_by_coordinator;
+
+-- error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE performance_schema.replication_applier_status_by_coordinator
+ ADD INDEX test_index(thread_id);
+
+-- error ER_DBACCESS_DENIED_ERROR
+CREATE UNIQUE INDEX test_index ON
+ performance_schema.replication_applier_status_by_coordinator(thread_id);
diff --git a/mysql-test/suite/perfschema/t/ddl_replication_applier_status_by_worker.test b/mysql-test/suite/perfschema/t/ddl_replication_applier_status_by_worker.test
new file mode 100644
index 00000000000..c5adf4ea5c5
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/ddl_replication_applier_status_by_worker.test
@@ -0,0 +1,22 @@
+# Tests for PERFORMANCE_SCHEMA
+
+# This test verifies the correct behaviour in case of invalid
+# usage of DDLs on the table replication_applier_status_by_worker.
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+-- error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE performance_schema.replication_applier_status_by_worker
+ add column foo integer;
+
+-- error ER_WRONG_PERFSCHEMA_USAGE
+TRUNCATE TABLE performance_schema.replication_applier_status_by_worker;
+
+-- error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE performance_schema.replication_applier_status_by_worker
+ ADD INDEX test_index(worker_id);
+
+-- error ER_DBACCESS_DENIED_ERROR
+CREATE UNIQUE INDEX test_index ON
+ performance_schema.replication_applier_status_by_worker(worker_id);
diff --git a/mysql-test/suite/perfschema/t/ddl_replication_connection_configuration.test b/mysql-test/suite/perfschema/t/ddl_replication_connection_configuration.test
new file mode 100644
index 00000000000..4d1dd2ddc75
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/ddl_replication_connection_configuration.test
@@ -0,0 +1,22 @@
+# Tests for PERFORMANCE_SCHEMA
+
+# This test verifies the correct behaviour in case of invalid
+# usage of DDLs on the table replication_connection_configuration.
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+-- error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE performance_schema.replication_connection_configuration
+ ADD COLUMN foo integer;
+
+-- error ER_WRONG_PERFSCHEMA_USAGE
+TRUNCATE TABLE performance_schema.replication_connection_configuration;
+
+-- error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE performance_schema.replication_connection_configuration
+ ADD INDEX test_index(HOST);
+
+-- error ER_DBACCESS_DENIED_ERROR
+CREATE UNIQUE INDEX test_index
+ ON performance_schema.replication_connection_configuration(HOST);
diff --git a/mysql-test/suite/perfschema/t/ddl_replication_connection_status.test b/mysql-test/suite/perfschema/t/ddl_replication_connection_status.test
new file mode 100644
index 00000000000..4420a0dfbd4
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/ddl_replication_connection_status.test
@@ -0,0 +1,22 @@
+# Tests for PERFORMANCE_SCHEMA
+
+# This test verifies the correct behaviour in case of invalid
+# usage of DDLs on the table replication_connection_status.
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+-- error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE performance_schema.replication_connection_status
+ ADD COLUMN foo integer;
+
+-- error ER_WRONG_PERFSCHEMA_USAGE
+TRUNCATE TABLE performance_schema.replication_connection_status;
+
+-- error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE performance_schema.replication_connection_status
+ ADD INDEX test_index(Thread_Id);
+
+-- error ER_DBACCESS_DENIED_ERROR
+CREATE UNIQUE INDEX test_index
+ ON performance_schema.replication_connection_status(Thread_Id);
diff --git a/mysql-test/suite/perfschema/t/ddl_replication_group_member_stats.test b/mysql-test/suite/perfschema/t/ddl_replication_group_member_stats.test
new file mode 100644
index 00000000000..eae5ed1281a
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/ddl_replication_group_member_stats.test
@@ -0,0 +1,21 @@
+# Tests for PERFORMANCE_SCHEMA
+# This test verifies the correct behaviour in case of invalid
+# Usage of DDLs on the table replication_group_member_stats.
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+--error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE performance_schema.replication_group_member_stats
+ ADD COLUMN foo INTEGER;
+
+--error ER_WRONG_PERFSCHEMA_USAGE
+TRUNCATE TABLE performance_schema.replication_group_member_stats;
+
+--error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE performance_schema.replication_group_member_stats
+ ADD INDEX test_index(Member_Id);
+
+--error ER_DBACCESS_DENIED_ERROR
+CREATE UNIQUE INDEX test_index
+ ON performance_schema.replication_group_member_stats(Member_Id);
diff --git a/mysql-test/suite/perfschema/t/ddl_replication_group_members.test b/mysql-test/suite/perfschema/t/ddl_replication_group_members.test
new file mode 100644
index 00000000000..bcb2c962a50
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/ddl_replication_group_members.test
@@ -0,0 +1,22 @@
+# Tests for PERFORMANCE_SCHEMA
+
+# This test verifies the correct behaviour in case of invalid
+# usage of DDLs on the table replication_group_members.
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+--error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE performance_schema.replication_group_members
+ ADD COLUMN foo INTEGER;
+
+--error ER_WRONG_PERFSCHEMA_USAGE
+TRUNCATE TABLE performance_schema.replication_group_members;
+
+--error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE performance_schema.replication_group_members
+ ADD INDEX test_index(Member_Id);
+
+--error ER_DBACCESS_DENIED_ERROR
+CREATE UNIQUE INDEX test_index
+ ON performance_schema.replication_group_members(Member_Id);
diff --git a/mysql-test/suite/perfschema/t/ddl_session_status.test b/mysql-test/suite/perfschema/t/ddl_session_status.test
new file mode 100644
index 00000000000..5dfa74a0d36
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/ddl_session_status.test
@@ -0,0 +1,20 @@
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+-- error ER_DBACCESS_DENIED_ERROR
+alter table performance_schema.session_status
+ add column foo integer;
+
+-- error ER_WRONG_PERFSCHEMA_USAGE
+truncate table performance_schema.session_status;
+
+-- error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE performance_schema.session_status
+ ADD INDEX test_index(VARIABLE_NAME);
+
+-- error ER_DBACCESS_DENIED_ERROR
+CREATE UNIQUE INDEX test_index
+ ON performance_schema.session_status(VARIABLE_NAME);
+
diff --git a/mysql-test/suite/perfschema/t/ddl_session_variables.test b/mysql-test/suite/perfschema/t/ddl_session_variables.test
new file mode 100644
index 00000000000..a649d2bc921
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/ddl_session_variables.test
@@ -0,0 +1,20 @@
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+-- error ER_DBACCESS_DENIED_ERROR
+alter table performance_schema.session_variables
+ add column foo integer;
+
+-- error ER_WRONG_PERFSCHEMA_USAGE
+truncate table performance_schema.session_variables;
+
+-- error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE performance_schema.session_variables
+ ADD INDEX test_index(VARIABLE_NAME);
+
+-- error ER_DBACCESS_DENIED_ERROR
+CREATE UNIQUE INDEX test_index
+ ON performance_schema.session_variables(VARIABLE_NAME);
+
diff --git a/mysql-test/suite/perfschema/t/ddl_setup_actors.test b/mysql-test/suite/perfschema/t/ddl_setup_actors.test
index 836fe559d77..73e2c988939 100644
--- a/mysql-test/suite/perfschema/t/ddl_setup_actors.test
+++ b/mysql-test/suite/perfschema/t/ddl_setup_actors.test
@@ -27,3 +27,5 @@ ALTER TABLE performance_schema.setup_actors ADD INDEX test_index(HOST);
-- error ER_DBACCESS_DENIED_ERROR
CREATE UNIQUE INDEX test_index ON performance_schema.setup_actors(HOST);
+-- error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE performance_schema.setup_actors ADD KEY ENA(ENABLED);
diff --git a/mysql-test/suite/perfschema/t/ddl_status_by_account.test b/mysql-test/suite/perfschema/t/ddl_status_by_account.test
new file mode 100644
index 00000000000..52f5d72f04d
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/ddl_status_by_account.test
@@ -0,0 +1,19 @@
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+-- error ER_DBACCESS_DENIED_ERROR
+alter table performance_schema.status_by_account
+ add column foo integer;
+
+truncate table performance_schema.status_by_account;
+
+-- error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE performance_schema.status_by_account
+ ADD INDEX test_index(VARIABLE_NAME);
+
+-- error ER_DBACCESS_DENIED_ERROR
+CREATE UNIQUE INDEX test_index
+ ON performance_schema.status_by_account(VARIABLE_NAME);
+
diff --git a/mysql-test/suite/perfschema/t/ddl_status_by_host.test b/mysql-test/suite/perfschema/t/ddl_status_by_host.test
new file mode 100644
index 00000000000..418880d5c34
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/ddl_status_by_host.test
@@ -0,0 +1,19 @@
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+-- error ER_DBACCESS_DENIED_ERROR
+alter table performance_schema.status_by_host
+ add column foo integer;
+
+truncate table performance_schema.status_by_host;
+
+-- error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE performance_schema.status_by_host
+ ADD INDEX test_index(VARIABLE_NAME);
+
+-- error ER_DBACCESS_DENIED_ERROR
+CREATE UNIQUE INDEX test_index
+ ON performance_schema.status_by_host(VARIABLE_NAME);
+
diff --git a/mysql-test/suite/perfschema/t/ddl_status_by_thread.test b/mysql-test/suite/perfschema/t/ddl_status_by_thread.test
new file mode 100644
index 00000000000..8ac778a20ae
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/ddl_status_by_thread.test
@@ -0,0 +1,19 @@
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+-- error ER_DBACCESS_DENIED_ERROR
+alter table performance_schema.status_by_thread
+ add column foo integer;
+
+truncate table performance_schema.status_by_thread;
+
+-- error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE performance_schema.status_by_thread
+ ADD INDEX test_index(VARIABLE_NAME);
+
+-- error ER_DBACCESS_DENIED_ERROR
+CREATE UNIQUE INDEX test_index
+ ON performance_schema.status_by_thread(VARIABLE_NAME);
+
diff --git a/mysql-test/suite/perfschema/t/ddl_status_by_user.test b/mysql-test/suite/perfschema/t/ddl_status_by_user.test
new file mode 100644
index 00000000000..b0d97aebc6b
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/ddl_status_by_user.test
@@ -0,0 +1,19 @@
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+-- error ER_DBACCESS_DENIED_ERROR
+alter table performance_schema.status_by_user
+ add column foo integer;
+
+truncate table performance_schema.status_by_user;
+
+-- error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE performance_schema.status_by_user
+ ADD INDEX test_index(VARIABLE_NAME);
+
+-- error ER_DBACCESS_DENIED_ERROR
+CREATE UNIQUE INDEX test_index
+ ON performance_schema.status_by_user(VARIABLE_NAME);
+
diff --git a/mysql-test/suite/perfschema/t/ddl_table_handles.test b/mysql-test/suite/perfschema/t/ddl_table_handles.test
new file mode 100644
index 00000000000..15ef69f34e0
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/ddl_table_handles.test
@@ -0,0 +1,17 @@
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+-- error ER_DBACCESS_DENIED_ERROR
+alter table performance_schema.table_handles add column foo integer;
+
+-- error ER_WRONG_PERFSCHEMA_USAGE
+truncate table performance_schema.table_handles;
+
+-- error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE performance_schema.table_handles ADD INDEX test_index(TIMER_NAME);
+
+-- error ER_DBACCESS_DENIED_ERROR
+CREATE UNIQUE INDEX test_index ON performance_schema.table_handles(TIMER_NAME);
+
diff --git a/mysql-test/suite/perfschema/t/ddl_uvar_by_thread.test b/mysql-test/suite/perfschema/t/ddl_uvar_by_thread.test
new file mode 100644
index 00000000000..d8ccda59872
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/ddl_uvar_by_thread.test
@@ -0,0 +1,20 @@
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+-- error ER_DBACCESS_DENIED_ERROR
+alter table performance_schema.user_variables_by_thread
+ add column foo integer;
+
+-- error ER_WRONG_PERFSCHEMA_USAGE
+truncate table performance_schema.user_variables_by_thread;
+
+-- error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE performance_schema.user_variables_by_thread
+ ADD INDEX test_index(VARIABLE_NAME);
+
+-- error ER_DBACCESS_DENIED_ERROR
+CREATE UNIQUE INDEX test_index
+ ON performance_schema.user_variables_by_thread(VARIABLE_NAME);
+
diff --git a/mysql-test/suite/perfschema/t/ddl_variables_by_thread.test b/mysql-test/suite/perfschema/t/ddl_variables_by_thread.test
new file mode 100644
index 00000000000..e5d04f09695
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/ddl_variables_by_thread.test
@@ -0,0 +1,20 @@
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+-- error ER_DBACCESS_DENIED_ERROR
+alter table performance_schema.variables_by_thread
+ add column foo integer;
+
+-- error ER_WRONG_PERFSCHEMA_USAGE
+truncate table performance_schema.variables_by_thread;
+
+-- error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE performance_schema.variables_by_thread
+ ADD INDEX test_index(VARIABLE_NAME);
+
+-- error ER_DBACCESS_DENIED_ERROR
+CREATE UNIQUE INDEX test_index
+ ON performance_schema.variables_by_thread(VARIABLE_NAME);
+
diff --git a/mysql-test/suite/perfschema/t/digest_table_full.test b/mysql-test/suite/perfschema/t/digest_table_full.test
index dbbce662256..605ea1f31ab 100644
--- a/mysql-test/suite/perfschema/t/digest_table_full.test
+++ b/mysql-test/suite/perfschema/t/digest_table_full.test
@@ -24,7 +24,7 @@ SELECT SCHEMA_NAME, DIGEST_TEXT, COUNT_STAR, SUM_ROWS_AFFECTED, SUM_WARNINGS,
# Expect no digest
-SHOW VARIABLES LIKE "performance_schema_digests_size";
+SHOW GLOBAL VARIABLES LIKE "performance_schema_digests_size";
SELECT COUNT(*) FROM performance_schema.events_statements_summary_by_digest;
# Cleanup for Digest
diff --git a/mysql-test/suite/perfschema/t/disabled.def b/mysql-test/suite/perfschema/t/disabled.def
index 888298bbb09..2dc57ee9ad0 100644
--- a/mysql-test/suite/perfschema/t/disabled.def
+++ b/mysql-test/suite/perfschema/t/disabled.def
@@ -9,3 +9,4 @@
# Do not use any TAB characters for whitespace.
#
##############################################################################
+# perfschema.pfs_ccccccc : Bug#nnnnnnnn 2014-09-10 Anitha Frequent failures on PB2
diff --git a/mysql-test/suite/perfschema/t/dml_esms_by_program.test b/mysql-test/suite/perfschema/t/dml_esms_by_program.test
new file mode 100644
index 00000000000..b80b9aa5039
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/dml_esms_by_program.test
@@ -0,0 +1,44 @@
+# This line and the line below is a temporary line for tests that do not need MyISAM in future, but need to be kept for tests that need it.
+#--source include/have_myisam.inc
+
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+#--disable_result_log
+select * from performance_schema.events_statements_summary_by_program
+ where object_name like 'XXYYZZ%' limit 1;
+
+select * from performance_schema.events_statements_summary_by_program
+ where object_name='XXYYZZ';
+#--enable_result_log
+
+--error ER_TABLEACCESS_DENIED_ERROR
+insert into performance_schema.events_statements_summary_by_program
+ set object_name='XXYYZZ', count_star=1, sum_timer_wait=2, min_timer_wait=3,
+ avg_timer_wait=4, max_timer_wait=5;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+update performance_schema.events_statements_summary_by_program
+ set count_star=12;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+update performance_schema.events_statements_summary_by_program
+ set count_star=12 where object_name like "XXYYZZ";
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.events_statements_summary_by_program
+ where count_star=1;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.events_statements_summary_by_program;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.events_statements_summary_by_program READ;
+UNLOCK TABLES;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.events_statements_summary_by_program WRITE;
+UNLOCK TABLES;
+
diff --git a/mysql-test/suite/perfschema/t/dml_ets_by_account_by_event_name.test b/mysql-test/suite/perfschema/t/dml_ets_by_account_by_event_name.test
new file mode 100644
index 00000000000..ede5f708dd9
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/dml_ets_by_account_by_event_name.test
@@ -0,0 +1,42 @@
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+--disable_result_log
+select * from performance_schema.events_transactions_summary_by_account_by_event_name
+ where event_name in ('transaction') limit 1;
+
+select * from performance_schema.events_transactions_summary_by_account_by_event_name
+ where event_name='FOO';
+--enable_result_log
+
+--error ER_TABLEACCESS_DENIED_ERROR
+insert into performance_schema.events_transactions_summary_by_account_by_event_name
+ set event_name='FOO', user='BAR', host='BAZ',
+ count_star=1, sum_timer_wait=2, min_timer_wait=3,
+ avg_timer_wait=4, max_timer_wait=5;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+update performance_schema.events_transactions_summary_by_account_by_event_name
+ set count_star=12;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+update performance_schema.events_transactions_summary_by_account_by_event_name
+ set count_star=12 where event_name like "FOO";
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.events_transactions_summary_by_account_by_event_name
+ where count_star=1;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.events_transactions_summary_by_account_by_event_name;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.events_transactions_summary_by_account_by_event_name READ;
+UNLOCK TABLES;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.events_transactions_summary_by_account_by_event_name WRITE;
+UNLOCK TABLES;
+
diff --git a/mysql-test/suite/perfschema/t/dml_ets_by_host_by_event_name.test b/mysql-test/suite/perfschema/t/dml_ets_by_host_by_event_name.test
new file mode 100644
index 00000000000..a2163b166fd
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/dml_ets_by_host_by_event_name.test
@@ -0,0 +1,42 @@
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+--disable_result_log
+select * from performance_schema.events_transactions_summary_by_host_by_event_name
+ where event_name in ('transaction') limit 1;
+
+select * from performance_schema.events_transactions_summary_by_host_by_event_name
+ where event_name='FOO';
+--enable_result_log
+
+--error ER_TABLEACCESS_DENIED_ERROR
+insert into performance_schema.events_transactions_summary_by_host_by_event_name
+ set event_name='FOO', thread_id=1,
+ count_star=1, sum_timer_wait=2, min_timer_wait=3,
+ avg_timer_wait=4, max_timer_wait=5;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+update performance_schema.events_transactions_summary_by_host_by_event_name
+ set count_star=12;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+update performance_schema.events_transactions_summary_by_host_by_event_name
+ set count_star=12 where event_name like "FOO";
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.events_transactions_summary_by_host_by_event_name
+ where count_star=1;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.events_transactions_summary_by_host_by_event_name;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.events_transactions_summary_by_host_by_event_name READ;
+UNLOCK TABLES;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.events_transactions_summary_by_host_by_event_name WRITE;
+UNLOCK TABLES;
+
diff --git a/mysql-test/suite/perfschema/t/dml_ets_by_thread_by_event_name.test b/mysql-test/suite/perfschema/t/dml_ets_by_thread_by_event_name.test
new file mode 100644
index 00000000000..bbbb0cadcf2
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/dml_ets_by_thread_by_event_name.test
@@ -0,0 +1,42 @@
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+--disable_result_log
+select * from performance_schema.events_transactions_summary_by_thread_by_event_name
+ where event_name in ('transaction') limit 1;
+
+select * from performance_schema.events_transactions_summary_by_thread_by_event_name
+ where event_name='FOO';
+--enable_result_log
+
+--error ER_TABLEACCESS_DENIED_ERROR
+insert into performance_schema.events_transactions_summary_by_thread_by_event_name
+ set event_name='FOO', thread_id=1,
+ count_star=1, sum_timer_wait=2, min_timer_wait=3,
+ avg_timer_wait=4, max_timer_wait=5;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+update performance_schema.events_transactions_summary_by_thread_by_event_name
+ set count_star=12;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+update performance_schema.events_transactions_summary_by_thread_by_event_name
+ set count_star=12 where event_name like "FOO";
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.events_transactions_summary_by_thread_by_event_name
+ where count_star=1;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.events_transactions_summary_by_thread_by_event_name;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.events_transactions_summary_by_thread_by_event_name READ;
+UNLOCK TABLES;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.events_transactions_summary_by_thread_by_event_name WRITE;
+UNLOCK TABLES;
+
diff --git a/mysql-test/suite/perfschema/t/dml_ets_by_user_by_event_name.test b/mysql-test/suite/perfschema/t/dml_ets_by_user_by_event_name.test
new file mode 100644
index 00000000000..dcca969c041
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/dml_ets_by_user_by_event_name.test
@@ -0,0 +1,42 @@
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+--disable_result_log
+select * from performance_schema.events_transactions_summary_by_user_by_event_name
+ where event_name in ('transaction') limit 1;
+
+select * from performance_schema.events_transactions_summary_by_user_by_event_name
+ where event_name='FOO';
+--enable_result_log
+
+--error ER_TABLEACCESS_DENIED_ERROR
+insert into performance_schema.events_transactions_summary_by_user_by_event_name
+ set event_name='FOO', user='BAR',
+ count_star=1, sum_timer_wait=2, min_timer_wait=3,
+ avg_timer_wait=4, max_timer_wait=5;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+update performance_schema.events_transactions_summary_by_user_by_event_name
+ set count_star=12;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+update performance_schema.events_transactions_summary_by_user_by_event_name
+ set count_star=12 where event_name like "FOO";
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.events_transactions_summary_by_user_by_event_name
+ where count_star=1;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.events_transactions_summary_by_user_by_event_name;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.events_transactions_summary_by_user_by_event_name READ;
+UNLOCK TABLES;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.events_transactions_summary_by_user_by_event_name WRITE;
+UNLOCK TABLES;
+
diff --git a/mysql-test/suite/perfschema/t/dml_ets_global_by_event_name.test b/mysql-test/suite/perfschema/t/dml_ets_global_by_event_name.test
new file mode 100644
index 00000000000..f5c11cf8fda
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/dml_ets_global_by_event_name.test
@@ -0,0 +1,41 @@
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+--disable_result_log
+select * from performance_schema.events_transactions_summary_global_by_event_name
+ where event_name in ('transaction') limit 1;
+
+select * from performance_schema.events_transactions_summary_global_by_event_name
+ where event_name='FOO';
+--enable_result_log
+
+--error ER_TABLEACCESS_DENIED_ERROR
+insert into performance_schema.events_transactions_summary_global_by_event_name
+ set event_name='FOO', count_star=1, sum_timer_wait=2, min_timer_wait=3,
+ avg_timer_wait=4, max_timer_wait=5;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+update performance_schema.events_transactions_summary_global_by_event_name
+ set count_star=12;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+update performance_schema.events_transactions_summary_global_by_event_name
+ set count_star=12 where event_name like "FOO";
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.events_transactions_summary_global_by_event_name
+ where count_star=1;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.events_transactions_summary_global_by_event_name;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.events_transactions_summary_global_by_event_name READ;
+UNLOCK TABLES;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.events_transactions_summary_global_by_event_name WRITE;
+UNLOCK TABLES;
+
diff --git a/mysql-test/suite/perfschema/t/dml_events_transactions_current.test b/mysql-test/suite/perfschema/t/dml_events_transactions_current.test
new file mode 100644
index 00000000000..99ab2eda766
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/dml_events_transactions_current.test
@@ -0,0 +1,41 @@
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+--disable_result_log
+select * from performance_schema.events_transactions_current
+ where event_name in ('transaction') limit 1;
+
+select * from performance_schema.events_transactions_current
+ where event_name='FOO';
+--enable_result_log
+
+--error ER_TABLEACCESS_DENIED_ERROR
+insert into performance_schema.events_transactions_current
+ set thread_id='1', event_id=1,
+ event_name='FOO', timer_start=1, timer_end=2, timer_wait=3;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+update performance_schema.events_transactions_current
+ set timer_start=12;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+update performance_schema.events_transactions_current
+ set timer_start=12 where thread_id=0;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.events_transactions_current
+ where thread_id=1;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.events_transactions_current;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.events_transactions_current READ;
+UNLOCK TABLES;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.events_transactions_current WRITE;
+UNLOCK TABLES;
+
diff --git a/mysql-test/suite/perfschema/t/dml_events_transactions_history.test b/mysql-test/suite/perfschema/t/dml_events_transactions_history.test
new file mode 100644
index 00000000000..dfad802f219
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/dml_events_transactions_history.test
@@ -0,0 +1,47 @@
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+--disable_result_log
+select * from performance_schema.events_transactions_history
+ where event_name in ('transaction') limit 1;
+
+select * from performance_schema.events_transactions_history
+ where event_name='FOO';
+
+select * from performance_schema.events_transactions_history
+ where event_name in ('transaction') order by timer_wait limit 1;
+
+select * from performance_schema.events_transactions_history
+ where event_name in ('transaction') order by timer_wait desc limit 1;
+--enable_result_log
+
+--error ER_TABLEACCESS_DENIED_ERROR
+insert into performance_schema.events_transactions_history
+ set thread_id='1', event_id=1,
+ event_name='FOO', timer_start=1, timer_end=2, timer_wait=3;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+update performance_schema.events_transactions_history
+ set timer_start=12;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+update performance_schema.events_transactions_history
+ set timer_start=12 where thread_id=0;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.events_transactions_history
+ where thread_id=1;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.events_transactions_history;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.events_transactions_history READ;
+UNLOCK TABLES;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.events_transactions_history WRITE;
+UNLOCK TABLES;
+
diff --git a/mysql-test/suite/perfschema/t/dml_events_transactions_history_long.test b/mysql-test/suite/perfschema/t/dml_events_transactions_history_long.test
new file mode 100644
index 00000000000..b78f3e167d9
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/dml_events_transactions_history_long.test
@@ -0,0 +1,47 @@
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+--disable_result_log
+select * from performance_schema.events_transactions_history_long
+ where event_name in ('transaction') limit 1;
+
+select * from performance_schema.events_transactions_history_long
+ where event_name='FOO';
+
+select * from performance_schema.events_transactions_history_long
+ where event_name in ('transaction') order by timer_wait limit 1;
+
+select * from performance_schema.events_transactions_history_long
+ where event_name in ('transaction') order by timer_wait desc limit 1;
+--enable_result_log
+
+--error ER_TABLEACCESS_DENIED_ERROR
+insert into performance_schema.events_transactions_history_long
+ set thread_id='1', event_id=1,
+ event_name='FOO', timer_start=1, timer_end=2, timer_wait=3;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+update performance_schema.events_transactions_history_long
+ set timer_start=12;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+update performance_schema.events_transactions_history_long
+ set timer_start=12 where thread_id=0;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.events_transactions_history_long
+ where thread_id=1;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.events_transactions_history_long;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.events_transactions_history_long READ;
+UNLOCK TABLES;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.events_transactions_history_long WRITE;
+UNLOCK TABLES;
+
diff --git a/mysql-test/suite/perfschema/t/dml_file_instances.test b/mysql-test/suite/perfschema/t/dml_file_instances.test
index 33969452f03..e5d1e9903ec 100644
--- a/mysql-test/suite/perfschema/t/dml_file_instances.test
+++ b/mysql-test/suite/perfschema/t/dml_file_instances.test
@@ -2,6 +2,7 @@
--source include/not_embedded.inc
--source include/have_perfschema.inc
+--source include/have_innodb.inc
--disable_result_log
select * from performance_schema.file_instances limit 1;
@@ -33,11 +34,72 @@ UNLOCK TABLES;
LOCK TABLES performance_schema.file_instances WRITE;
UNLOCK TABLES;
-
-
--echo #
--echo # MDEV-25325 column_comment for performance_schema tables
--echo #
select column_name, column_comment
from information_schema.columns
where table_schema='performance_schema' and table_name='file_instances';
+
+--echo ###
+--echo ### Bug#26152751: INNODB LEAKS MEMORY, PERFORMANCE_SCHEMA FILE_INSTANCES
+--echo ### #SQL-IB3129987-252773.IBD
+--echo ###
+
+CREATE DATABASE db_26152751;
+USE db_26152751;
+
+SELECT FILE_NAME FROM performance_schema.file_instances WHERE FILE_NAME LIKE "%t_db_26152751%";
+
+CREATE TABLE t_db_26152751 (a INT) ENGINE=MYISAM;
+
+--sorted_result
+--replace_regex /.*\/t_db_26152751/t_db_26152751/
+SELECT FILE_NAME FROM performance_schema.file_instances WHERE FILE_NAME LIKE "%t_db_26152751%";
+
+RENAME TABLE t_db_26152751 to t_db_26152751_new;
+
+--sorted_result
+--replace_regex /.*\/t_db_26152751/t_db_26152751/
+SELECT FILE_NAME FROM performance_schema.file_instances WHERE FILE_NAME LIKE "%t_db_26152751%";
+
+RENAME TABLE t_db_26152751_new to t_db_26152751;
+
+--sorted_result
+--replace_regex /.*\/t_db_26152751/t_db_26152751/
+SELECT FILE_NAME FROM performance_schema.file_instances WHERE FILE_NAME LIKE "%t_db_26152751%";
+
+ALTER TABLE t_db_26152751 ADD COLUMN b INT;
+
+--replace_regex /.*\/t_db_26152751/t_db_26152751/
+SELECT FILE_NAME FROM performance_schema.file_instances WHERE FILE_NAME LIKE "%t_db_26152751%";
+
+DROP TABLE t_db_26152751;
+
+SELECT FILE_NAME FROM performance_schema.file_instances WHERE FILE_NAME LIKE "%t_db_26152751%";
+
+CREATE TABLE t_db_26152751 (a INT) ENGINE=INNODB;
+
+--replace_regex /.*\/t_db_26152751/t_db_26152751/
+SELECT FILE_NAME FROM performance_schema.file_instances WHERE FILE_NAME LIKE "%t_db_26152751%";
+
+RENAME TABLE t_db_26152751 to t_db_26152751_new;
+
+--replace_regex /.*\/t_db_26152751/t_db_26152751/
+SELECT FILE_NAME FROM performance_schema.file_instances WHERE FILE_NAME LIKE "%t_db_26152751%";
+
+RENAME TABLE t_db_26152751_new to t_db_26152751;
+
+--replace_regex /.*\/t_db_26152751/t_db_26152751/
+SELECT FILE_NAME FROM performance_schema.file_instances WHERE FILE_NAME LIKE "%t_db_26152751%";
+
+ALTER TABLE t_db_26152751 ADD COLUMN b INT;
+
+--replace_regex /.*\/t_db_26152751/t_db_26152751/
+SELECT FILE_NAME FROM performance_schema.file_instances WHERE FILE_NAME LIKE "%t_db_26152751%";
+
+DROP TABLE t_db_26152751;
+
+SELECT FILE_NAME FROM performance_schema.file_instances WHERE FILE_NAME LIKE "%t_db_26152751%";
+
+DROP DATABASE db_26152751;
diff --git a/mysql-test/suite/perfschema/t/dml_global_status.test b/mysql-test/suite/perfschema/t/dml_global_status.test
new file mode 100644
index 00000000000..65f7c3f5564
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/dml_global_status.test
@@ -0,0 +1,36 @@
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+--disable_result_log
+select * from performance_schema.global_status
+ where variable_name like 'bytes_%' limit 1;
+
+select * from performance_schema.global_status
+ where variable_name='FOO';
+--enable_result_log
+
+--error ER_TABLEACCESS_DENIED_ERROR
+insert into performance_schema.global_status
+ set variable_name='FOO', variable_value='BAR';
+
+--error ER_TABLEACCESS_DENIED_ERROR
+update performance_schema.global_status
+ set variable_name='FOO', variable_value='BAR';
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.global_status
+ where variable_name <> 'FOO';
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.global_status;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.global_status READ;
+UNLOCK TABLES;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.global_status WRITE;
+UNLOCK TABLES;
+
diff --git a/mysql-test/suite/perfschema/t/dml_global_variables.test b/mysql-test/suite/perfschema/t/dml_global_variables.test
new file mode 100644
index 00000000000..20507732818
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/dml_global_variables.test
@@ -0,0 +1,36 @@
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+--disable_result_log
+select * from performance_schema.global_variables
+ where variable_name like 'autocommit%' limit 1;
+
+select * from performance_schema.global_variables
+ where variable_name='FOO';
+--enable_result_log
+
+--error ER_TABLEACCESS_DENIED_ERROR
+insert into performance_schema.global_variables
+ set variable_name='FOO', variable_value='BAR';
+
+--error ER_TABLEACCESS_DENIED_ERROR
+update performance_schema.global_variables
+ set variable_name='FOO', variable_value='BAR';
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.global_variables
+ where variable_name <> 'FOO';
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.global_variables;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.global_variables READ;
+UNLOCK TABLES;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.global_variables WRITE;
+UNLOCK TABLES;
+
diff --git a/mysql-test/suite/perfschema/t/dml_handler.test b/mysql-test/suite/perfschema/t/dml_handler.test
index f12cc82f22f..16810fcba82 100644
--- a/mysql-test/suite/perfschema/t/dml_handler.test
+++ b/mysql-test/suite/perfschema/t/dml_handler.test
@@ -12,9 +12,9 @@
# which should return error 1031, "Table storage engine for '<table name>'
# doesn't have this option."
#
---echo
+--echo #
--echo # Create a temporary table of performance schema table names
---echo
+--echo #
CREATE TEMPORARY TABLE table_list (id INT AUTO_INCREMENT, PRIMARY KEY (id)) AS
SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES
@@ -25,10 +25,10 @@ SELECT COUNT(*) FROM table_list INTO @table_count;
let $count=`SELECT @table_count`;
---echo
+--echo #
--echo # For each table in the performance schema, attempt HANDLER...OPEN,
--echo # which should fail with an error 1031, ER_ILLEGAL_HA.
---echo
+--echo #
while ($count > 0)
{
diff --git a/mysql-test/suite/perfschema/t/dml_mems_by_account_by_event_name.test b/mysql-test/suite/perfschema/t/dml_mems_by_account_by_event_name.test
new file mode 100644
index 00000000000..a620f586553
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/dml_mems_by_account_by_event_name.test
@@ -0,0 +1,42 @@
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+--disable_result_log
+select * from performance_schema.memory_summary_by_account_by_event_name
+ where event_name like 'memory/%' limit 1;
+
+select * from performance_schema.memory_summary_by_account_by_event_name
+ where event_name='FOO';
+--enable_result_log
+
+--error ER_TABLEACCESS_DENIED_ERROR
+insert into performance_schema.memory_summary_by_account_by_event_name
+ set event_name='FOO', user='BAR', host='BAZ',
+ count_alloc=1, count_free=2, sum_number_of_bytes_alloc=3,
+ sum_number_of_bytes_free=4, low_count_used=5;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+update performance_schema.memory_summary_by_account_by_event_name
+ set count_alloc=12;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+update performance_schema.memory_summary_by_account_by_event_name
+ set count_alloc=12 where event_name like "FOO";
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.memory_summary_by_account_by_event_name
+ where count_alloc=1;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.memory_summary_by_account_by_event_name;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.memory_summary_by_account_by_event_name READ;
+UNLOCK TABLES;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.memory_summary_by_account_by_event_name WRITE;
+UNLOCK TABLES;
+
diff --git a/mysql-test/suite/perfschema/t/dml_mems_by_host_by_event_name.test b/mysql-test/suite/perfschema/t/dml_mems_by_host_by_event_name.test
new file mode 100644
index 00000000000..71c21457691
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/dml_mems_by_host_by_event_name.test
@@ -0,0 +1,42 @@
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+--disable_result_log
+select * from performance_schema.memory_summary_by_host_by_event_name
+ where event_name like 'memory/%' limit 1;
+
+select * from performance_schema.memory_summary_by_host_by_event_name
+ where event_name='FOO';
+--enable_result_log
+
+--error ER_TABLEACCESS_DENIED_ERROR
+insert into performance_schema.memory_summary_by_host_by_event_name
+ set event_name='FOO', host='BAZ',
+ count_alloc=1, count_free=2, sum_number_of_bytes_alloc=3,
+ sum_number_of_bytes_free=4, low_count_used=5;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+update performance_schema.memory_summary_by_host_by_event_name
+ set count_alloc=12;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+update performance_schema.memory_summary_by_host_by_event_name
+ set count_alloc=12 where event_name like "FOO";
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.memory_summary_by_host_by_event_name
+ where count_alloc=1;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.memory_summary_by_host_by_event_name;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.memory_summary_by_host_by_event_name READ;
+UNLOCK TABLES;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.memory_summary_by_host_by_event_name WRITE;
+UNLOCK TABLES;
+
diff --git a/mysql-test/suite/perfschema/t/dml_mems_by_thread_by_event_name.test b/mysql-test/suite/perfschema/t/dml_mems_by_thread_by_event_name.test
new file mode 100644
index 00000000000..5a75dbe78f2
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/dml_mems_by_thread_by_event_name.test
@@ -0,0 +1,42 @@
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+--disable_result_log
+select * from performance_schema.memory_summary_by_thread_by_event_name
+ where event_name like 'memory/%' limit 1;
+
+select * from performance_schema.memory_summary_by_thread_by_event_name
+ where event_name='FOO';
+--enable_result_log
+
+--error ER_TABLEACCESS_DENIED_ERROR
+insert into performance_schema.memory_summary_by_thread_by_event_name
+ set event_name='FOO', thread_id=12,
+ count_alloc=1, count_free=2, sum_number_of_bytes_alloc=3,
+ sum_number_of_bytes_free=4, low_count_used=5;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+update performance_schema.memory_summary_by_thread_by_event_name
+ set count_alloc=12;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+update performance_schema.memory_summary_by_thread_by_event_name
+ set count_alloc=12 where event_name like "FOO";
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.memory_summary_by_thread_by_event_name
+ where count_alloc=1;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.memory_summary_by_thread_by_event_name;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.memory_summary_by_thread_by_event_name READ;
+UNLOCK TABLES;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.memory_summary_by_thread_by_event_name WRITE;
+UNLOCK TABLES;
+
diff --git a/mysql-test/suite/perfschema/t/dml_mems_by_user_by_event_name.test b/mysql-test/suite/perfschema/t/dml_mems_by_user_by_event_name.test
new file mode 100644
index 00000000000..3cf63097356
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/dml_mems_by_user_by_event_name.test
@@ -0,0 +1,42 @@
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+--disable_result_log
+select * from performance_schema.memory_summary_by_user_by_event_name
+ where event_name like 'memory/%' limit 1;
+
+select * from performance_schema.memory_summary_by_user_by_event_name
+ where event_name='FOO';
+--enable_result_log
+
+--error ER_TABLEACCESS_DENIED_ERROR
+insert into performance_schema.memory_summary_by_user_by_event_name
+ set event_name='FOO', user='BAR',
+ count_alloc=1, count_free=2, sum_number_of_bytes_alloc=3,
+ sum_number_of_bytes_free=4, low_count_used=5;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+update performance_schema.memory_summary_by_user_by_event_name
+ set count_alloc=12;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+update performance_schema.memory_summary_by_user_by_event_name
+ set count_alloc=12 where event_name like "FOO";
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.memory_summary_by_user_by_event_name
+ where count_alloc=1;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.memory_summary_by_user_by_event_name;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.memory_summary_by_user_by_event_name READ;
+UNLOCK TABLES;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.memory_summary_by_user_by_event_name WRITE;
+UNLOCK TABLES;
+
diff --git a/mysql-test/suite/perfschema/t/dml_mems_global_by_event_name.test b/mysql-test/suite/perfschema/t/dml_mems_global_by_event_name.test
new file mode 100644
index 00000000000..4e716dc668f
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/dml_mems_global_by_event_name.test
@@ -0,0 +1,42 @@
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+--disable_result_log
+select * from performance_schema.memory_summary_global_by_event_name
+ where event_name like 'memory/%' limit 1;
+
+select * from performance_schema.memory_summary_global_by_event_name
+ where event_name='FOO';
+--enable_result_log
+
+--error ER_TABLEACCESS_DENIED_ERROR
+insert into performance_schema.memory_summary_global_by_event_name
+ set event_name='FOO',
+ count_alloc=1, count_free=2, sum_number_of_bytes_alloc=3,
+ sum_number_of_bytes_free=4, low_count_used=5;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+update performance_schema.memory_summary_global_by_event_name
+ set count_alloc=12;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+update performance_schema.memory_summary_global_by_event_name
+ set count_alloc=12 where event_name like "FOO";
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.memory_summary_global_by_event_name
+ where count_alloc=1;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.memory_summary_global_by_event_name;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.memory_summary_global_by_event_name READ;
+UNLOCK TABLES;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.memory_summary_global_by_event_name WRITE;
+UNLOCK TABLES;
+
diff --git a/mysql-test/suite/perfschema/t/dml_metadata_locks.test b/mysql-test/suite/perfschema/t/dml_metadata_locks.test
new file mode 100644
index 00000000000..d4ace2c708b
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/dml_metadata_locks.test
@@ -0,0 +1,35 @@
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+--disable_result_log
+select * from performance_schema.metadata_locks;
+--enable_result_log
+
+select * from performance_schema.metadata_locks
+ where object_name='foo';
+
+--error ER_TABLEACCESS_DENIED_ERROR
+insert into performance_schema.metadata_locks
+ set object_name='FOO', owner_thread_id=1;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+update performance_schema.metadata_locks
+ set owner_thread_id=12 where object_name='foo';
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.metadata_locks;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.metadata_locks
+ where timer_name='CYCLE';
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.metadata_locks READ;
+UNLOCK TABLES;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.metadata_locks WRITE;
+UNLOCK TABLES;
+
diff --git a/mysql-test/suite/perfschema/t/dml_prepared_statements_instances.test b/mysql-test/suite/perfschema/t/dml_prepared_statements_instances.test
new file mode 100644
index 00000000000..3c96740df77
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/dml_prepared_statements_instances.test
@@ -0,0 +1,43 @@
+# This line and the line below is a temporary line for tests that do not need MyISAM in future, but need to be kept for tests that need it.
+#--source include/have_myisam.inc
+
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+#--disable_result_log
+select * from performance_schema.prepared_statements_instances
+ where owner_object_name like 'XXYYZZ%' limit 1;
+
+select * from performance_schema.prepared_statements_instances
+ where owner_object_name='XXYYZZ';
+#--enable_result_log
+
+--error ER_TABLEACCESS_DENIED_ERROR
+insert into performance_schema.prepared_statements_instances
+ set owner_object_name='XXYYZZ', count_execute=1, sum_timer_execute=2,
+ min_timer_execute=3, avg_timer_execute=4, max_timer_execute=5;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+update performance_schema.prepared_statements_instances set count_execute=12;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+update performance_schema.prepared_statements_instances
+ set count_execute=12 where owner_object_name like "XXYYZZ";
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.prepared_statements_instances
+ where count_execute=1;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.prepared_statements_instances;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.prepared_statements_instances READ;
+UNLOCK TABLES;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.prepared_statements_instances WRITE;
+UNLOCK TABLES;
+
diff --git a/mysql-test/suite/perfschema/t/dml_replication_applier_configuration.test b/mysql-test/suite/perfschema/t/dml_replication_applier_configuration.test
new file mode 100644
index 00000000000..f465e8f7c0c
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/dml_replication_applier_configuration.test
@@ -0,0 +1,38 @@
+# Tests for PERFORMANCE_SCHEMA
+
+# This test verifies the correct behaviour in case of invalid
+# usage of DMLs on the table replication_applier_configuration.
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+--disable_result_log
+SELECT * FROM performance_schema.replication_applier_configuration
+ LIMIT 1;
+
+sELECT * FROM performance_schema.replication_applier_configuration
+ WHERE desired_delay=12;
+--enable_result_log
+
+--error ER_TABLEACCESS_DENIED_ERROR
+INSERT INTO performance_schema.replication_applier_configuration
+ SET desired_delay=2;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+UPDATE performance_schema.replication_applier_configuration
+ SET desired_delay=12 WHERE desired_delay=2;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+DELETE FROM performance_schema.replication_applier_configuration
+ WHERE desired_delay=12;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+DELETE FROM performance_schema.replication_applier_configuration;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.replication_applier_configuration READ;
+UNLOCK TABLES;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.replication_applier_configuration WRITE;
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/t/dml_replication_applier_status.test b/mysql-test/suite/perfschema/t/dml_replication_applier_status.test
new file mode 100644
index 00000000000..d2738c1c099
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/dml_replication_applier_status.test
@@ -0,0 +1,42 @@
+# Tests for PERFORMANCE_SCHEMA
+
+# This test verifies the correct behaviour in case of invalid
+# usage of DMLs on the table replication_applier_status.
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+--disable_result_log
+SELECT * FROM performance_schema.replication_applier_status
+ LIMIT 1;
+
+SELECT * FROM performance_schema.replication_applier_status
+ WHERE service_state='YES' OR remaining_delay=12;
+--enable_result_log
+
+--error ER_TABLEACCESS_DENIED_ERROR
+INSERT INTO performance_schema.replication_applier_status
+ SET service_state='YES', remaining_delay=12;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+UPDATE performance_schema.replication_applier_status
+ SET remaining_delay=12;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+UPDATE performance_schema.replication_applier_status
+ SET remaining_delay=12 WHERE service_state='YES';
+
+--error ER_TABLEACCESS_DENIED_ERROR
+DELETE FROM performance_schema.replication_applier_status
+ WHERE service_state='YES';
+
+--error ER_TABLEACCESS_DENIED_ERROR
+DELETE FROM performance_schema.replication_applier_status;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.replication_applier_status READ;
+UNLOCK TABLES;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.replication_applier_status WRITE;
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/t/dml_replication_applier_status_by_coordinator.test b/mysql-test/suite/perfschema/t/dml_replication_applier_status_by_coordinator.test
new file mode 100644
index 00000000000..6c1b82b823c
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/dml_replication_applier_status_by_coordinator.test
@@ -0,0 +1,43 @@
+# Tests for PERFORMANCE_SCHEMA
+
+# This test verifies the correct behaviour in case of invalid
+# usage of DMLs on the table replication_applier_status_by_coordinator
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+--disable_result_log
+SELECT * FROM performance_schema.replication_applier_status_by_coordinator
+ LIMIT 1;
+
+SELECT * FROM performance_schema.replication_applier_status_by_coordinator
+ WHERE service_state='YES' or last_error_message='ERROR';
+--enable_result_log
+
+--error ER_TABLEACCESS_DENIED_ERROR
+INSERT INTO performance_schema.replication_applier_status_by_coordinator
+ SET service_state='YES', last_error_message='ERROR', thread_id=2,
+ last_error_number=1234;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+UPDATE performance_schema.replication_applier_status_by_coordinator
+ SET last_error_number=1234;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+UPDATE performance_schema.replication_applier_status_by_coordinator
+ SET last_error_number=1234 where service_state like "YES";
+
+--error ER_TABLEACCESS_DENIED_ERROR
+DELETE FROM performance_schema.replication_applier_status_by_coordinator
+ WHERE thread_id=1;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+DELETE FROM performance_schema.replication_applier_status_by_coordinator;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.replication_applier_status_by_coordinator READ;
+UNLOCK TABLES;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.replication_applier_status_by_coordinator WRITE;
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/t/dml_replication_applier_status_by_worker.test b/mysql-test/suite/perfschema/t/dml_replication_applier_status_by_worker.test
new file mode 100644
index 00000000000..53f50935258
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/dml_replication_applier_status_by_worker.test
@@ -0,0 +1,43 @@
+# Tests for PERFORMANCE_SCHEMA
+
+# This test verifies the correct behaviour in case of invalid
+# usage of DMLs on the table replication_applier_status_by_worker.
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+--disable_result_log
+SELECT * FROM performance_schema.replication_applier_status_by_worker
+ LIMIT 1;
+
+SELECT * FROM performance_schema.replication_applier_status_by_worker
+ WHERE service_state='YES' OR last_error_message='ERROR';
+--enable_result_log
+
+--error ER_TABLEACCESS_DENIED_ERROR
+INSERT INTO performance_schema.replication_applier_status_by_worker
+ SET service_state='YES', last_error_message='ERROR',
+ worker_id=1, thread_id=2, last_error_number=1234;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+UPDATE performance_schema.replication_applier_status_by_worker
+ SET worker_id=12;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+UPDATE performance_schema.replication_applier_status_by_worker
+ SET worker_d=12 where service_state like "YES";
+
+--error ER_TABLEACCESS_DENIED_ERROR
+DELETE FROM performance_schema.replication_applier_status_by_worker
+ WHERE worker_id=1;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+DELETE FROM performance_schema.replication_applier_status_by_worker;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.replication_applier_status_by_worker READ;
+UNLOCK TABLES;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.replication_applier_status_by_worker WRITE;
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/t/dml_replication_connection_configuration.test b/mysql-test/suite/perfschema/t/dml_replication_connection_configuration.test
new file mode 100644
index 00000000000..b787cbf8f63
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/dml_replication_connection_configuration.test
@@ -0,0 +1,43 @@
+# Tests for PERFORMANCE_SCHEMA
+
+# This test verifies the correct behaviour in case of invalid
+# usage of DMLs on the table replication_connection_configuration.
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+--disable_result_log
+SELECT * FROM performance_schema.replication_connection_configuration
+ LIMIT 1;
+
+SELECT * FROM performance_schema.replication_connection_configuration
+ WHERE user='FOO' or host='BAR';
+--enable_result_log
+
+--error ER_TABLEACCESS_DENIED_ERROR
+INSERT INTO performance_schema.replication_connection_configuration
+ SET user='FOO', host='BAR',
+ port=1, connection_retry_count=2;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+UPDATE performance_schema.replication_connection_configuration
+ SET connection_retry_interval=12;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+UPDATE performance_schema.replication_connection_configuration
+ SET connection_retry_interval=12 WHERE host LIKE "FOO";
+
+--error ER_TABLEACCESS_DENIED_ERROR
+DELETE FROM performance_schema.replication_connection_configuration
+ WHERE connection_retry_count=1;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+DELETE FROM performance_schema.replication_connection_configuration;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.replication_connection_configuration READ;
+UNLOCK TABLES;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.replication_connection_configuration WRITE;
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/t/dml_replication_connection_status.test b/mysql-test/suite/perfschema/t/dml_replication_connection_status.test
new file mode 100644
index 00000000000..207ee9f5b32
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/dml_replication_connection_status.test
@@ -0,0 +1,43 @@
+# Tests for PERFORMANCE_SCHEMA
+
+# This test verifies the correct behaviour in case of invalid
+# usage of DMLs on the table replication_connection_status.
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+--disable_result_log
+SELECT * FROM performance_schema.replication_connection_status
+ LIMIT 1;
+
+SELECT * FROM performance_schema.replication_connection_status
+ WHERE received_transaction_set='FOO' OR last_error_message='BAR';
+--enable_result_log
+
+--error ER_TABLEACCESS_DENIED_ERROR
+INSERT INTO performance_schema.replication_connection_status
+ SET received_transaction_set='FOO', last_error_message='BAR',
+ thread_id=1, last_error_number=2;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+UPDATE performance_schema.replication_connection_status
+ SET last_error_number=12;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+UPDATE performance_schema.replication_connection_status
+ SET thread_id=12 WHERE received_transaction_set like "FOO";
+
+--error ER_TABLEACCESS_DENIED_ERROR
+DELETE FROM performance_schema.replication_connection_status
+ WHERE last_error_number=1;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+DELETE FROM performance_schema.replication_connection_status;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.replication_connection_status READ;
+UNLOCK TABLES;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.replication_connection_status WRITE;
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/t/dml_replication_group_member_stats.test b/mysql-test/suite/perfschema/t/dml_replication_group_member_stats.test
new file mode 100644
index 00000000000..db42ce2d7de
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/dml_replication_group_member_stats.test
@@ -0,0 +1,38 @@
+# This test verifies the correct behaviour in case of invalid
+# usage of DMLs on the table replication_group_member_stats
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+SELECT * FROM performance_schema.replication_group_member_stats
+ LIMIT 1;
+
+SELECT * FROM performance_schema.replication_group_member_stats
+ WHERE channel_name='FOO';
+
+--error ER_TABLEACCESS_DENIED_ERROR
+INSERT INTO performance_schema.replication_group_member_stats
+ SET channel_name='FOO', node_id=1;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+UPDATE performance_schema.replication_group_member_stats
+ SET member_id=12;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+UPDATE performance_schema.replication_group_member_stats
+ SET member_id=12 WHERE group_name LIKE "FOO";
+
+--error ER_TABLEACCESS_DENIED_ERROR
+DELETE FROM performance_schema.replication_group_member_stats
+ WHERE member_id=1;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+DELETE FROM performance_schema.replication_group_member_stats;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.replication_group_member_stats READ;
+UNLOCK TABLES;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.replication_group_member_stats WRITE;
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/t/dml_replication_group_members.test b/mysql-test/suite/perfschema/t/dml_replication_group_members.test
new file mode 100644
index 00000000000..1a49b2d162f
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/dml_replication_group_members.test
@@ -0,0 +1,40 @@
+# This test verifies the correct behaviour in case of invalid
+# usage of DMLs on the table replication_group_members.
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+--disable_result_log
+SELECT * FROM performance_schema.replication_group_members
+ LIMIT 1;
+
+SELECT * FROM performance_schema.replication_group_members
+ WHERE channel_name='FOO';
+--enable_result_log
+
+--error ER_TABLEACCESS_DENIED_ERROR
+INSERT INTO performance_schema.replication_group_members
+ SET channel_name='FOO', member_id=1;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+UPDATE performance_schema.replication_group_members
+ SET member_id=12;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+UPDATE performance_schema.replication_group_members
+ SET member_id=12 WHERE channel_name LIKE "FOO";
+
+--error ER_TABLEACCESS_DENIED_ERROR
+DELETE FROM performance_schema.replication_group_members
+ WHERE member_id=1;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+DELETE FROM performance_schema.replication_group_members;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.replication_group_members READ;
+UNLOCK TABLES;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.replication_group_members WRITE;
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/t/dml_session_status.test b/mysql-test/suite/perfschema/t/dml_session_status.test
new file mode 100644
index 00000000000..c5995738636
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/dml_session_status.test
@@ -0,0 +1,36 @@
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+--disable_result_log
+select * from performance_schema.session_status
+ where variable_name like 'bytes_%' limit 1;
+
+select * from performance_schema.session_status
+ where variable_name='FOO';
+--enable_result_log
+
+--error ER_TABLEACCESS_DENIED_ERROR
+insert into performance_schema.session_status
+ set variable_name='FOO', variable_value='BAR';
+
+--error ER_TABLEACCESS_DENIED_ERROR
+update performance_schema.session_status
+ set variable_name='FOO', variable_value='BAR';
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.session_status
+ where variable_name <> 'FOO';
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.session_status;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.session_status READ;
+UNLOCK TABLES;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.session_status WRITE;
+UNLOCK TABLES;
+
diff --git a/mysql-test/suite/perfschema/t/dml_session_variables.test b/mysql-test/suite/perfschema/t/dml_session_variables.test
new file mode 100644
index 00000000000..0640ce05ebb
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/dml_session_variables.test
@@ -0,0 +1,36 @@
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+--disable_result_log
+select * from performance_schema.session_variables
+ where variable_name like 'bytes_%' limit 1;
+
+select * from performance_schema.session_variables
+ where variable_name='FOO';
+--enable_result_log
+
+--error ER_TABLEACCESS_DENIED_ERROR
+insert into performance_schema.session_variables
+ set variable_name='FOO', variable_value='BAR';
+
+--error ER_TABLEACCESS_DENIED_ERROR
+update performance_schema.session_variables
+ set variable_name='FOO', variable_value='BAR';
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.session_variables
+ where variable_name <> 'FOO';
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.session_variables;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.session_variables READ;
+UNLOCK TABLES;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.session_variables WRITE;
+UNLOCK TABLES;
+
diff --git a/mysql-test/suite/perfschema/t/dml_setup_actors.test b/mysql-test/suite/perfschema/t/dml_setup_actors.test
index 4d39ef3cb2e..e6c17de37dc 100644
--- a/mysql-test/suite/perfschema/t/dml_setup_actors.test
+++ b/mysql-test/suite/perfschema/t/dml_setup_actors.test
@@ -10,6 +10,16 @@ drop table if exists test.setup_actors;
# Save the setup
create table test.setup_actors as
select * from performance_schema.setup_actors;
+
+# Inserting Duplicate values in the table should
+# throw error
+--error ER_DUP_KEY
+insert into performance_schema.setup_actors
+ values ('%','%','%','YES', 'YES');
+--error ER_DUP_KEY
+insert into performance_schema.setup_actors
+ values ('%','%','%','NO', 'NO');
+
truncate table performance_schema.setup_actors;
select * from performance_schema.setup_actors;
@@ -29,6 +39,16 @@ insert into performance_schema.setup_actors
insert into performance_schema.setup_actors
set user='%', host='%';
+# Insert with wrong value for ENABLED column
+--error 1265
+insert into performance_schema.setup_actors
+ values ('localhost', 'user1', '%', 'NO%', 'NO');
+
+# Insert with wrong value for HISTORY column
+--error 1265
+insert into performance_schema.setup_actors
+ values ('localhost', 'user1', '%', 'NO', 'KO');
+
select * from performance_schema.setup_actors
order by USER, HOST;
@@ -44,6 +64,44 @@ update performance_schema.setup_actors
update performance_schema.setup_actors
set role='ILLEGAL';
+# update on ENABLED column is allowed
+update performance_schema.setup_actors
+ set ENABLED='YES';
+
+# update on HISTORY column is allowed
+update performance_schema.setup_actors
+ set HISTORY='YES';
+
+# update on ENABLED column with wrong values
+#throws error
+--error 1265
+update performance_schema.setup_actors
+ set ENABLED='';
+
+--error 1265
+update performance_schema.setup_actors
+ set ENABLED='YESS';
+
+--error 1265
+update performance_schema.setup_actors
+ set ENABLED='NO%';
+
+--error ER_BAD_NULL_ERROR
+update performance_schema.setup_actors
+ set ENABLED=NULL;
+
+--error 1265
+update performance_schema.setup_actors
+ set HISTORY='YESS';
+
+--error 1265
+update performance_schema.setup_actors
+ set HISTORY='NO%';
+
+--error ER_BAD_NULL_ERROR
+update performance_schema.setup_actors
+ set HISTORY=NULL;
+
select * from performance_schema.setup_actors
order by USER, HOST;
@@ -64,6 +122,17 @@ UNLOCK TABLES;
LOCK TABLES performance_schema.setup_actors WRITE;
UNLOCK TABLES;
+--echo #
+--echo # WL#2284: Increase the length of a user name
+--echo #
+
+insert into performance_schema.setup_actors
+ set user='user_name_len_22_01234', host='localhost';
+
+delete from performance_schema.setup_actors
+ where user = 'user_name_len_22_01234' and host = 'localhost';
+
+
# Restore the setup
truncate table performance_schema.setup_actors;
insert into performance_schema.setup_actors
diff --git a/mysql-test/suite/perfschema/t/dml_setup_instruments.test b/mysql-test/suite/perfschema/t/dml_setup_instruments.test
index e3cc07fb889..f66f8d28176 100644
--- a/mysql-test/suite/perfschema/t/dml_setup_instruments.test
+++ b/mysql-test/suite/perfschema/t/dml_setup_instruments.test
@@ -33,12 +33,17 @@ select * from performance_schema.setup_instruments
# COND_handler_count is dependent on the build (Windows only)
# DEBUG_SYNC::cond is dependent on the build (DEBUG only)
+# COND_main_thread_in_use is dependent on the build (non Windows)
+# COND_start_signal_handler is dependent on the build (non Windows)
select * from performance_schema.setup_instruments
where name like 'Wait/Synch/Cond/sql/%'
and name not in (
+ 'wait/synch/cond/sql/COND_open',
'wait/synch/cond/sql/COND_handler_count',
- 'wait/synch/cond/sql/DEBUG_SYNC::cond')
+ 'wait/synch/cond/sql/DEBUG_SYNC::cond',
+ 'wait/synch/cond/sql/COND_socket_listener_active',
+ 'wait/synch/cond/sql/COND_start_signal_handler')
order by name limit 10;
--disable_result_log
@@ -85,19 +90,17 @@ UNLOCK TABLES;
LOCK TABLES performance_schema.setup_instruments WRITE;
UNLOCK TABLES;
---echo
+--echo #
--echo # Bug#13813193 ASSERTION `TABLE->READ_SET ==
--echo # &TABLE->DEF_READ_SET' FAILED / MYSQL_UPDATE
---echo
+--echo #
UPDATE performance_schema.setup_instruments SET timed='NO'
ORDER BY RAND();
-# MTR is configured to start with everything set to ON,
-# so we need to restore it after the previous update
---disable_query_log
-update performance_schema.setup_instruments set timed='YES';
---enable_query_log
+# Test cleanup
+update performance_schema.setup_instruments
+ set enabled='YES', TIMED='YES';
--echo #
--echo # MDEV-25325 column_comment for performance_schema tables
diff --git a/mysql-test/suite/perfschema/t/dml_setup_objects.test b/mysql-test/suite/perfschema/t/dml_setup_objects.test
index 8c9374293ef..3055cd8b007 100644
--- a/mysql-test/suite/perfschema/t/dml_setup_objects.test
+++ b/mysql-test/suite/perfschema/t/dml_setup_objects.test
@@ -6,7 +6,7 @@
--disable_warnings
drop table if exists test.setup_objects;
--enable_warnings
-
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
# Save the setup
create table test.setup_objects as
select * from performance_schema.setup_objects;
@@ -93,7 +93,7 @@ truncate table performance_schema.setup_objects;
insert into performance_schema.setup_objects
select * from test.setup_objects;
drop table test.setup_objects;
-
+SET sql_mode = default;
--echo #
--echo # MDEV-25325 column_comment for performance_schema tables
--echo #
diff --git a/mysql-test/suite/perfschema/t/dml_setup_timers.test b/mysql-test/suite/perfschema/t/dml_setup_timers.test
index c14ad6e73c2..6a90c669bf2 100644
--- a/mysql-test/suite/perfschema/t/dml_setup_timers.test
+++ b/mysql-test/suite/perfschema/t/dml_setup_timers.test
@@ -12,6 +12,8 @@ update performance_schema.setup_timers
update performance_schema.setup_timers
set timer_name='NANOSECOND' where name="statement";
update performance_schema.setup_timers
+ set timer_name='MICROSECOND' where name="transaction";
+update performance_schema.setup_timers
set timer_name='MICROSECOND' where name="idle";
select * from performance_schema.setup_timers;
@@ -60,6 +62,8 @@ update performance_schema.setup_timers
update performance_schema.setup_timers
set timer_name='NANOSECOND' where name="statement";
update performance_schema.setup_timers
+ set timer_name='MICROSECOND' where name="transaction";
+update performance_schema.setup_timers
set timer_name='MICROSECOND' where name="idle";
select * from performance_schema.setup_timers;
diff --git a/mysql-test/suite/perfschema/t/dml_status_by_account.test b/mysql-test/suite/perfschema/t/dml_status_by_account.test
new file mode 100644
index 00000000000..5b31a572955
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/dml_status_by_account.test
@@ -0,0 +1,40 @@
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+--disable_result_log
+select * from performance_schema.status_by_account
+ where variable_name like 'bytes_%' limit 1;
+
+select * from performance_schema.status_by_account
+ where variable_name='FOO';
+--enable_result_log
+
+--error ER_TABLEACCESS_DENIED_ERROR
+insert into performance_schema.status_by_account
+ set user='USER', host='HOST', variable_name='FOO', variable_value='BAR';
+
+--error ER_TABLEACCESS_DENIED_ERROR
+update performance_schema.status_by_account
+ set variable_name='FOO', variable_value='BAR';
+
+--error ER_TABLEACCESS_DENIED_ERROR
+update performance_schema.status_by_account
+ set variable_name='FOO' where user <> 'USER';
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.status_by_account
+ where user <> 'USER';
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.status_by_account;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.status_by_account READ;
+UNLOCK TABLES;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.status_by_account WRITE;
+UNLOCK TABLES;
+
diff --git a/mysql-test/suite/perfschema/t/dml_status_by_host.test b/mysql-test/suite/perfschema/t/dml_status_by_host.test
new file mode 100644
index 00000000000..6c5c4462688
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/dml_status_by_host.test
@@ -0,0 +1,40 @@
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+--disable_result_log
+select * from performance_schema.status_by_host
+ where variable_name like 'bytes_%' limit 1;
+
+select * from performance_schema.status_by_host
+ where variable_name='FOO';
+--enable_result_log
+
+--error ER_TABLEACCESS_DENIED_ERROR
+insert into performance_schema.status_by_host
+ set host='HOST', variable_name='FOO', variable_value='BAR';
+
+--error ER_TABLEACCESS_DENIED_ERROR
+update performance_schema.status_by_host
+ set variable_name='FOO', variable_value='BAR';
+
+--error ER_TABLEACCESS_DENIED_ERROR
+update performance_schema.status_by_host
+ set variable_name='FOO' where host <> 'HOST';
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.status_by_host
+ where host <> 'HOST';
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.status_by_host;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.status_by_host READ;
+UNLOCK TABLES;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.status_by_host WRITE;
+UNLOCK TABLES;
+
diff --git a/mysql-test/suite/perfschema/t/dml_status_by_thread.test b/mysql-test/suite/perfschema/t/dml_status_by_thread.test
new file mode 100644
index 00000000000..09022b05a47
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/dml_status_by_thread.test
@@ -0,0 +1,40 @@
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+--disable_result_log
+select * from performance_schema.status_by_thread
+ where variable_name like 'bytes_%' limit 1;
+
+select * from performance_schema.status_by_thread
+ where variable_name='FOO';
+--enable_result_log
+
+--error ER_TABLEACCESS_DENIED_ERROR
+insert into performance_schema.status_by_thread
+ set thread_id=1, variable_name='FOO', variable_value='BAR';
+
+--error ER_TABLEACCESS_DENIED_ERROR
+update performance_schema.status_by_thread
+ set variable_name='FOO', variable_value='BAR';
+
+--error ER_TABLEACCESS_DENIED_ERROR
+update performance_schema.status_by_thread
+ set variable_name='FOO' where thread_id=0;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.status_by_thread
+ where thread_id=1;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.status_by_thread;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.status_by_thread READ;
+UNLOCK TABLES;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.status_by_thread WRITE;
+UNLOCK TABLES;
+
diff --git a/mysql-test/suite/perfschema/t/dml_status_by_user.test b/mysql-test/suite/perfschema/t/dml_status_by_user.test
new file mode 100644
index 00000000000..25cba557228
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/dml_status_by_user.test
@@ -0,0 +1,40 @@
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+--disable_result_log
+select * from performance_schema.status_by_user
+ where variable_name like 'bytes_%' limit 1;
+
+select * from performance_schema.status_by_user
+ where variable_name='FOO';
+--enable_result_log
+
+--error ER_TABLEACCESS_DENIED_ERROR
+insert into performance_schema.status_by_user
+ set user='USER', variable_name='FOO', variable_value='BAR';
+
+--error ER_TABLEACCESS_DENIED_ERROR
+update performance_schema.status_by_user
+ set variable_name='FOO', variable_value='BAR';
+
+--error ER_TABLEACCESS_DENIED_ERROR
+update performance_schema.status_by_user
+ set variable_name='FOO' where user <> 'USER';
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.status_by_user
+ where user <> 'USER';
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.status_by_user;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.status_by_user READ;
+UNLOCK TABLES;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.status_by_user WRITE;
+UNLOCK TABLES;
+
diff --git a/mysql-test/suite/perfschema/t/dml_table_handles.test b/mysql-test/suite/perfschema/t/dml_table_handles.test
new file mode 100644
index 00000000000..31f5fe0bc46
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/dml_table_handles.test
@@ -0,0 +1,35 @@
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+--disable_result_log
+select * from performance_schema.table_handles;
+--enable_result_log
+
+select * from performance_schema.table_handles
+ where object_name='foo';
+
+--error ER_TABLEACCESS_DENIED_ERROR
+insert into performance_schema.table_handles
+ set object_name='FOO', owner_event_id=1;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+update performance_schema.table_handles
+ set owner_event_id=12 where object_name='foo';
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.table_handles;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.table_handles
+ where timer_name='CYCLE';
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.table_handles READ;
+UNLOCK TABLES;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.table_handles WRITE;
+UNLOCK TABLES;
+
diff --git a/mysql-test/suite/perfschema/t/dml_uvar_by_thread.test b/mysql-test/suite/perfschema/t/dml_uvar_by_thread.test
new file mode 100644
index 00000000000..71518d35d1f
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/dml_uvar_by_thread.test
@@ -0,0 +1,48 @@
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+--disable_result_log
+select * from performance_schema.user_variables_by_thread
+ where variable_name like 'foo%' limit 1;
+
+select * from performance_schema.user_variables_by_thread
+ where variable_name='FOO';
+--enable_result_log
+
+--error ER_TABLEACCESS_DENIED_ERROR
+insert into performance_schema.user_variables_by_thread
+ set thread_id=12, variable_name='foo', variable_value='bar';
+
+--error ER_TABLEACCESS_DENIED_ERROR
+update performance_schema.user_variables_by_thread
+ set thread_id=12;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+update performance_schema.user_variables_by_thread
+ set thread_id=12 where variable_name like "FOO";
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.user_variables_by_thread
+ where thread_id=1;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.user_variables_by_thread;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.user_variables_by_thread READ;
+UNLOCK TABLES;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.user_variables_by_thread WRITE;
+UNLOCK TABLES;
+
+DELIMITER |;
+-- error ER_DBACCESS_DENIED_ERROR
+CREATE TRIGGER test_uvar_trigger
+ AFTER INSERT ON performance_schema.user_variables_by_thread
+ FOR EACH ROW BEGIN
+ set @a='OK';
+END|
+DELIMITER ;|
diff --git a/mysql-test/suite/perfschema/t/dml_variables_by_thread.test b/mysql-test/suite/perfschema/t/dml_variables_by_thread.test
new file mode 100644
index 00000000000..db087d58ba4
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/dml_variables_by_thread.test
@@ -0,0 +1,40 @@
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+--disable_result_log
+select * from performance_schema.variables_by_thread
+ where variable_name like 'autocommit%' limit 1;
+
+select * from performance_schema.variables_by_thread
+ where variable_name='FOO';
+--enable_result_log
+
+--error ER_TABLEACCESS_DENIED_ERROR
+insert into performance_schema.variables_by_thread
+ set thread_id=1, variable_name='FOO', variable_value='BAR';
+
+--error ER_TABLEACCESS_DENIED_ERROR
+update performance_schema.variables_by_thread
+ set variable_name='FOO', variable_value='BAR';
+
+--error ER_TABLEACCESS_DENIED_ERROR
+update performance_schema.variables_by_thread
+ set variable_name='FOO' where thread_id=0;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.variables_by_thread
+ where thread_id=1;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.variables_by_thread;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.variables_by_thread READ;
+UNLOCK TABLES;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.variables_by_thread WRITE;
+UNLOCK TABLES;
+
diff --git a/mysql-test/suite/perfschema/t/event_aggregate.test b/mysql-test/suite/perfschema/t/event_aggregate.test
index 372cda050ee..685cbbaed28 100644
--- a/mysql-test/suite/perfschema/t/event_aggregate.test
+++ b/mysql-test/suite/perfschema/t/event_aggregate.test
@@ -1,6 +1,5 @@
# Tests for the performance schema
#
-
--source ../include/event_aggregate_setup.inc
--source ../include/event_aggregate_load.inc
--source ../include/event_aggregate_cleanup.inc
diff --git a/mysql-test/suite/perfschema/t/event_aggregate_no_a.test b/mysql-test/suite/perfschema/t/event_aggregate_no_a.test
index 372cda050ee..685cbbaed28 100644
--- a/mysql-test/suite/perfschema/t/event_aggregate_no_a.test
+++ b/mysql-test/suite/perfschema/t/event_aggregate_no_a.test
@@ -1,6 +1,5 @@
# Tests for the performance schema
#
-
--source ../include/event_aggregate_setup.inc
--source ../include/event_aggregate_load.inc
--source ../include/event_aggregate_cleanup.inc
diff --git a/mysql-test/suite/perfschema/t/event_aggregate_no_a_no_h.test b/mysql-test/suite/perfschema/t/event_aggregate_no_a_no_h.test
index 372cda050ee..685cbbaed28 100644
--- a/mysql-test/suite/perfschema/t/event_aggregate_no_a_no_h.test
+++ b/mysql-test/suite/perfschema/t/event_aggregate_no_a_no_h.test
@@ -1,6 +1,5 @@
# Tests for the performance schema
#
-
--source ../include/event_aggregate_setup.inc
--source ../include/event_aggregate_load.inc
--source ../include/event_aggregate_cleanup.inc
diff --git a/mysql-test/suite/perfschema/t/event_aggregate_no_a_no_u.test b/mysql-test/suite/perfschema/t/event_aggregate_no_a_no_u.test
index 372cda050ee..685cbbaed28 100644
--- a/mysql-test/suite/perfschema/t/event_aggregate_no_a_no_u.test
+++ b/mysql-test/suite/perfschema/t/event_aggregate_no_a_no_u.test
@@ -1,6 +1,5 @@
# Tests for the performance schema
#
-
--source ../include/event_aggregate_setup.inc
--source ../include/event_aggregate_load.inc
--source ../include/event_aggregate_cleanup.inc
diff --git a/mysql-test/suite/perfschema/t/event_aggregate_no_a_no_u_no_h.test b/mysql-test/suite/perfschema/t/event_aggregate_no_a_no_u_no_h.test
index 372cda050ee..685cbbaed28 100644
--- a/mysql-test/suite/perfschema/t/event_aggregate_no_a_no_u_no_h.test
+++ b/mysql-test/suite/perfschema/t/event_aggregate_no_a_no_u_no_h.test
@@ -1,6 +1,5 @@
# Tests for the performance schema
#
-
--source ../include/event_aggregate_setup.inc
--source ../include/event_aggregate_load.inc
--source ../include/event_aggregate_cleanup.inc
diff --git a/mysql-test/suite/perfschema/t/event_aggregate_no_h.test b/mysql-test/suite/perfschema/t/event_aggregate_no_h.test
index 372cda050ee..685cbbaed28 100644
--- a/mysql-test/suite/perfschema/t/event_aggregate_no_h.test
+++ b/mysql-test/suite/perfschema/t/event_aggregate_no_h.test
@@ -1,6 +1,5 @@
# Tests for the performance schema
#
-
--source ../include/event_aggregate_setup.inc
--source ../include/event_aggregate_load.inc
--source ../include/event_aggregate_cleanup.inc
diff --git a/mysql-test/suite/perfschema/t/event_aggregate_no_u.test b/mysql-test/suite/perfschema/t/event_aggregate_no_u.test
index 372cda050ee..685cbbaed28 100644
--- a/mysql-test/suite/perfschema/t/event_aggregate_no_u.test
+++ b/mysql-test/suite/perfschema/t/event_aggregate_no_u.test
@@ -1,6 +1,5 @@
# Tests for the performance schema
#
-
--source ../include/event_aggregate_setup.inc
--source ../include/event_aggregate_load.inc
--source ../include/event_aggregate_cleanup.inc
diff --git a/mysql-test/suite/perfschema/t/event_aggregate_no_u_no_h.test b/mysql-test/suite/perfschema/t/event_aggregate_no_u_no_h.test
index 372cda050ee..685cbbaed28 100644
--- a/mysql-test/suite/perfschema/t/event_aggregate_no_u_no_h.test
+++ b/mysql-test/suite/perfschema/t/event_aggregate_no_u_no_h.test
@@ -1,6 +1,5 @@
# Tests for the performance schema
#
-
--source ../include/event_aggregate_setup.inc
--source ../include/event_aggregate_load.inc
--source ../include/event_aggregate_cleanup.inc
diff --git a/mysql-test/suite/perfschema/t/file_misc-master.opt b/mysql-test/suite/perfschema/t/file_misc-master.opt
new file mode 100644
index 00000000000..9d6fb53ff50
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/file_misc-master.opt
@@ -0,0 +1 @@
+--loose-performance-schema-max-file-instances=0
diff --git a/mysql-test/suite/perfschema/t/file_misc.test b/mysql-test/suite/perfschema/t/file_misc.test
new file mode 100644
index 00000000000..e495aa90676
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/file_misc.test
@@ -0,0 +1,11 @@
+
+# Bug#22118669 - ASSERTION `PFS_FILE != __NULL' FAILED
+
+# Cause a temporary file to be instrumented,
+# while there are no file instruments available.
+
+--disable_result_log
+select * from information_schema.columns ORDER BY table_name;
+--enable_result_log
+
+
diff --git a/mysql-test/suite/perfschema/t/func_file_io.test b/mysql-test/suite/perfschema/t/func_file_io.test
index 2055fa9a008..e29b05b81ff 100644
--- a/mysql-test/suite/perfschema/t/func_file_io.test
+++ b/mysql-test/suite/perfschema/t/func_file_io.test
@@ -189,5 +189,5 @@ ORDER BY p.processlist_user, h.operation;
UPDATE performance_schema.setup_instruments SET enabled = 'YES', timed = 'YES';
# In case of failure, will indicate the root cause
-show status like "performance_schema%";
+show global status like "performance_schema%";
diff --git a/mysql-test/suite/perfschema/t/func_mutex.test b/mysql-test/suite/perfschema/t/func_mutex.test
index 66bcb68accb..1964852134d 100644
--- a/mysql-test/suite/perfschema/t/func_mutex.test
+++ b/mysql-test/suite/perfschema/t/func_mutex.test
@@ -21,7 +21,7 @@ flush status;
select NAME from performance_schema.mutex_instances
where NAME = 'wait/synch/mutex/mysys/THR_LOCK::mutex' GROUP BY NAME;
select NAME from performance_schema.rwlock_instances
- where NAME = 'wait/synch/rwlock/sql/LOCK_grant';
+ where NAME = 'wait/synch/rwlock/sql/LOCK_grant' limit 1;
--disable_warnings
DROP TABLE IF EXISTS t1;
@@ -130,5 +130,5 @@ DROP TABLE t1;
UPDATE performance_schema.setup_instruments SET enabled = 'YES', timed = 'YES';
# In case of failure, will indicate the root cause
-show status like "performance_schema%";
+show global status like "performance_schema%";
diff --git a/mysql-test/suite/perfschema/t/global_objects-master.opt b/mysql-test/suite/perfschema/t/global_objects-master.opt
new file mode 100644
index 00000000000..b00c11c1247
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/global_objects-master.opt
@@ -0,0 +1 @@
+--loose-performance-schema-instrument='%=OFF'
diff --git a/mysql-test/suite/perfschema/t/global_objects.test b/mysql-test/suite/perfschema/t/global_objects.test
new file mode 100644
index 00000000000..cf041c14b32
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/global_objects.test
@@ -0,0 +1,29 @@
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+--source include/no_protocol.inc
+--source include/not_windows.inc
+
+# Bug#79784 update setup_instruments do not affect the global
+# mutex/rwlock/cond
+
+# Verify instruments are off by default, per *.opt file
+select count(*) from performance_schema.setup_instruments
+ where enabled='YES'
+ and name like "wait/%";
+
+# Verify that we have instrumented objects
+select count(*) > 0 from performance_schema.mutex_instances;
+select count(*) > 0 from performance_schema.rwlock_instances;
+select count(*) > 0 from performance_schema.cond_instances;
+select count(*) > 0 from performance_schema.socket_instances;
+
+# Check for some known global objects.
+select NAME from performance_schema.mutex_instances
+ where NAME = "wait/synch/mutex/sql/LOCK_gdl";
+select NAME from performance_schema.rwlock_instances
+ where NAME = "wait/synch/rwlock/sql/LOCK_system_variables_hash";
+select NAME from performance_schema.cond_instances
+ where NAME = "wait/synch/cond/sql/COND_server_started";
+select EVENT_NAME from performance_schema.socket_instances
+ where EVENT_NAME = "wait/io/socket/sql/client_connection";
diff --git a/mysql-test/suite/perfschema/t/grant.test b/mysql-test/suite/perfschema/t/grant.test
new file mode 100644
index 00000000000..446965dfe9d
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/grant.test
@@ -0,0 +1,12 @@
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+#
+# MDEV-22884 Assertion `grant_table || grant_table_role' failed on perfschema
+#
+create user a@localhost;
+connect a,localhost,a;
+select * from performance_schema.global_status where variable_name='b';
+connection default;
+disconnect a;
+drop user a@localhost;
+
diff --git a/mysql-test/suite/perfschema/t/indexed_table_io.test b/mysql-test/suite/perfschema/t/indexed_table_io.test
index 1a7597113d2..59fe4dd134d 100644
--- a/mysql-test/suite/perfschema/t/indexed_table_io.test
+++ b/mysql-test/suite/perfschema/t/indexed_table_io.test
@@ -13,7 +13,7 @@ drop table if exists test.no_index_tab;
drop table if exists test.index_tab;
--enable_warnings
-let $table_io_select= select COUNT(*)
+let $table_io_select= select SUM(NUMBER_OF_BYTES)
from performance_schema.events_waits_history_long
where event_name like 'wait/io/table/%'
and object_schema = 'test'
@@ -104,7 +104,7 @@ update performance_schema.setup_consumers set enabled='NO';
eval $table_io_select 'index_tab';
# In case of failures, this will tell if table io are lost.
-show status like 'performance_schema_%';
+show global status like 'performance_schema_%';
# Cleanup
drop table test.no_index_tab;
diff --git a/mysql-test/suite/perfschema/t/information_schema.test b/mysql-test/suite/perfschema/t/information_schema.test
index 0152ef21905..937a1b4f61b 100644
--- a/mysql-test/suite/perfschema/t/information_schema.test
+++ b/mysql-test/suite/perfschema/t/information_schema.test
@@ -24,9 +24,21 @@ select lower(TABLE_NAME), VERSION, ROW_FORMAT
where TABLE_SCHEMA='performance_schema'
order by table_name;
+# Query status and system variable tables separately because AVG_ROW_LENGTH
+# depends upon which plugins are loaded at the time of the query.
+#
+# TABLE_ROWS is unpredictable with autoscaling buffers
+select lower(TABLE_NAME), AVG_ROW_LENGTH
+ from information_schema.tables
+ where TABLE_SCHEMA='performance_schema' and
+ lower(TABLE_NAME) not regexp '^variables|variables$|^status|session_status|global_status'
+ order by table_name;
+
+--replace_column 2 table_rows 3 avg_row_len
select lower(TABLE_NAME), TABLE_ROWS, AVG_ROW_LENGTH
from information_schema.tables
- where TABLE_SCHEMA='performance_schema'
+ where TABLE_SCHEMA='performance_schema' and
+ lower(TABLE_NAME) regexp '^variables|variables$|^status|session_status|global_status'
order by table_name;
select lower(TABLE_NAME), DATA_LENGTH, MAX_DATA_LENGTH
@@ -49,11 +61,10 @@ select lower(TABLE_NAME), TABLE_COLLATION, CHECKSUM
where TABLE_SCHEMA='performance_schema'
order by table_name;
-# TABLESPACE_NAME does not exist in 5.4
-# select lower(TABLE_NAME), CREATE_OPTIONS, TABLESPACE_NAME
-# from information_schema.tables
-# where TABLE_SCHEMA='performance_schema'
-# order by table_name;
+select lower(TABLE_NAME), CREATE_OPTIONS
+ from information_schema.tables
+ where TABLE_SCHEMA='performance_schema'
+ order by table_name;
select lower(TABLE_NAME), TABLE_COMMENT
from information_schema.tables
diff --git a/mysql-test/suite/perfschema/t/innodb_events_transactions_history_long.test b/mysql-test/suite/perfschema/t/innodb_events_transactions_history_long.test
new file mode 100644
index 00000000000..f13bfe87689
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/innodb_events_transactions_history_long.test
@@ -0,0 +1,19 @@
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+--source include/have_innodb.inc
+
+--echo #
+--echo # MDEV-24600 performance_schema.events_transactions_history_long.trx_id
+--echo # reports garbage
+--echo #
+
+TRUNCATE performance_schema.events_transactions_history_long;
+
+START TRANSACTION WITH CONSISTENT SNAPSHOT;
+COMMIT;
+BEGIN;
+SELECT table_name FROM mysql.innodb_table_stats LIMIT 0 LOCK IN SHARE MODE;
+COMMIT;
+
+SELECT state,trx_id,gtid
+FROM performance_schema.events_transactions_history_long;
diff --git a/mysql-test/suite/perfschema/t/io_cache-master.opt b/mysql-test/suite/perfschema/t/io_cache-master.opt
new file mode 100644
index 00000000000..8f75ada354c
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/io_cache-master.opt
@@ -0,0 +1,3 @@
+--binlog_cache_size=4096
+--binlog_stmt_cache_size=4096
+--log-bin=master-bin
diff --git a/mysql-test/suite/perfschema/t/io_cache.test b/mysql-test/suite/perfschema/t/io_cache.test
new file mode 100644
index 00000000000..201d042530d
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/io_cache.test
@@ -0,0 +1,121 @@
+################## suite/perfschema/t/io_cache.test###################
+# #
+# IO_CACHE is a file I/O caching mechanism that uses temporary files #
+# when the cache overflows. This test verifies that the temporary #
+# files created by the IO_CACHE buffers for the binlog_cache and #
+# binlog_stmt_cache are instrumented. #
+# #
+######################################################################
+
+--source include/have_perfschema.inc
+--source include/not_embedded.inc
+--source include/no_protocol.inc
+
+--echo #
+--echo ## Connection default
+--echo #
+--connection default
+--disable_warnings
+USE test;
+DROP TABLE IF EXISTS t1;
+--enable_warnings
+SELECT @@global.binlog_cache_size;
+SELECT @@global.binlog_stmt_cache_size;
+SELECT * FROM performance_schema.setup_instruments WHERE name LIKE "%file/sql/io_cache%";
+
+--echo #
+--echo ## Connection con1
+--echo #
+connect(con1, localhost, root,,);
+USE test;
+CREATE TABLE t1 (s1 INT, s2 VARCHAR(4096));
+SET SESSION AUTOCOMMIT = 0;
+
+#
+# Force an IO_CACHE overflow and subsequent write to a temporary file.
+#
+START TRANSACTION;
+INSERT INTO t1 VALUES (1,'
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+');
+
+INSERT INTO t1 VALUES (2,'
+bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
+bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
+bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
+bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
+bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
+');
+
+INSERT INTO t1 VALUES (3,'
+cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
+cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
+cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
+cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
+cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
+');
+
+INSERT INTO t1 VALUES (4,'
+dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
+dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
+dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
+dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
+dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
+');
+
+INSERT INTO t1 VALUES (5,'
+eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
+eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
+eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
+eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
+eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
+');
+
+INSERT INTO t1 VALUES (6,'
+ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+');
+
+INSERT INTO t1 VALUES (7,'
+gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+');
+
+INSERT INTO t1 VALUES (8,'
+hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+');
+
+COMMIT;
+SELECT COUNT(*) FROM t1;
+--disconnect con1
+
+--echo #
+--echo ## Connection default
+--echo #
+--connection default
+SELECT COUNT(*) FROM test.t1;
+
+#
+# Verify that IO events on the temporary file.
+#
+SELECT COUNT(*) FROM performance_schema.file_summary_by_event_name WHERE event_name LIKE "%io_cache%";
+
+--connection default
+DROP TABLE t1;
+
+
+
diff --git a/mysql-test/suite/perfschema/t/max_program_zero-master.opt b/mysql-test/suite/perfschema/t/max_program_zero-master.opt
new file mode 100644
index 00000000000..7803f9c5e1b
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/max_program_zero-master.opt
@@ -0,0 +1,3 @@
+--loose-performance_schema_max_program_instances=0
+--loose-performance_schema_max_statement_stack=1
+--thread_stack=655360
diff --git a/mysql-test/suite/perfschema/t/max_program_zero.test b/mysql-test/suite/perfschema/t/max_program_zero.test
new file mode 100644
index 00000000000..064ba2ae2d9
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/max_program_zero.test
@@ -0,0 +1,48 @@
+#-------------------------------------------------------------
+# Tests for PERFORMANCE_SCHEMA stored programs instrumentation
+#-------------------------------------------------------------
+
+#
+# Test case to show the behaviour of stored program instrumentation
+# when values of the system variables performance_schema_max_program_instances &
+# performance_schema_max_statement_stack are zero.
+# PS table will return empty set
+#
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+--source ../include/start_server_common.inc
+
+# Values of variables server variables
+show global variables like "performance_schema_max_program_instances";
+show global variables like "performance_schema_max_statement_stack";
+
+--echo #####################
+--echo # Setup
+--echo #####################
+--source suite/perfschema/include/program_nested_setup.inc
+
+# Truncate summary table
+TRUNCATE performance_schema.events_statements_summary_by_program;
+
+--echo #####################
+--echo # Executing Queries
+--echo #####################
+--source suite/perfschema/include/program_nested_execution.inc
+
+--echo ###########################################
+--echo # Quering PS statement summary table #
+--echo ###########################################
+
+SELECT OBJECT_TYPE, OBJECT_NAME, OBJECT_SCHEMA
+ FROM performance_schema.events_statements_summary_by_program;
+
+SELECT COUNT(*) FROM performance_schema.events_statements_summary_by_program;
+
+--echo #####################
+--echo # Cleanup
+--echo #####################
+--source suite/perfschema/include/program_nested_cleanup.inc
+
+
diff --git a/mysql-test/suite/perfschema/t/mdl_func.test b/mysql-test/suite/perfschema/t/mdl_func.test
new file mode 100644
index 00000000000..7f422a6e870
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/mdl_func.test
@@ -0,0 +1,479 @@
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+UPDATE performance_schema.setup_instruments SET enabled = 'NO', timed = 'YES';
+
+UPDATE performance_schema.setup_instruments SET enabled = 'YES'
+WHERE name in ('wait/io/table/sql/handler',
+ 'wait/lock/table/sql/handler',
+ 'wait/lock/metadata/sql/mdl');
+
+set @orig_sql_mode= @@sql_mode;
+set sql_mode= (select replace(@@sql_mode,'NO_AUTO_CREATE_USER',''));
+grant ALL on *.* to user1@localhost;
+grant ALL on *.* to user2@localhost;
+set sql_mode= @orig_sql_mode;
+
+insert into performance_schema.setup_objects (object_type, object_schema, object_name, enabled, timed)
+ values ('TABLE', 'mtr', '%', 'NO', 'NO');
+
+--echo # Switch to (con1, localhost, user1, , )
+connect (con1, localhost, user1, , );
+
+let $user1_tid=`select THREAD_ID from performance_schema.threads where PROCESSLIST_ID=connection_id()`;
+
+--echo # Switch to (con2, localhost, user2, , )
+connect (con2, localhost, user2, , );
+
+let $user2_tid=`select THREAD_ID from performance_schema.threads where PROCESSLIST_ID=connection_id()`;
+
+--connection default
+
+--disable_query_log
+--eval set @user1_tid= $user1_tid;
+--eval set @user2_tid= $user2_tid;
+--enable_query_log
+
+--disable_warnings
+drop function if exists thread_id_name;
+--enable_warnings
+
+--delimiter //
+
+create function thread_id_name(THREAD_ID int)
+returns varchar(16)
+begin
+ if (THREAD_ID IS NULL)
+ then
+ return NULL;
+ end if;
+ if (THREAD_ID = @user1_tid)
+ then
+ return "USER1";
+ end if;
+ if (THREAD_ID = @user2_tid)
+ then
+ return "USER2";
+ end if;
+ return "OTHER";
+end;
+//
+
+delimiter ;//
+
+select thread_id_name(NULL);
+select thread_id_name(@user1_tid);
+select thread_id_name(@user2_tid);
+
+prepare dump_metadata_locks from
+ "select OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME,
+ LOCK_TYPE, LOCK_DURATION, LOCK_STATUS,
+ thread_id_name(OWNER_THREAD_ID) as OWNER_THREAD_ID
+ from performance_schema.metadata_locks
+ order by OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME,
+ LOCK_TYPE, LOCK_DURATION, LOCK_STATUS, OWNER_THREAD_ID;";
+
+prepare dump_table_handles from
+ "select OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME,
+ INTERNAL_LOCK, EXTERNAL_LOCK,
+ thread_id_name(OWNER_THREAD_ID) as OWNER_THREAD_ID
+ from performance_schema.table_handles
+ order by OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME,
+ INTERNAL_LOCK, EXTERNAL_LOCK, OWNER_THREAD_ID;";
+
+prepare dump_waits_current from
+ "select thread_id_name(THREAD_ID) as THREAD_ID,
+ EVENT_NAME,
+ TIMER_START is not NULL as TIMER_START_SET,
+ TIMER_END is not NULL as TIMER_END_SET,
+ OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME, INDEX_NAME,
+ OPERATION
+ from performance_schema.events_waits_current
+ where event_name = \'wait/lock/metadata/sql/mdl\';";
+
+prepare dump_waits_history_long from
+ "select thread_id_name(THREAD_ID) as THREAD_ID,
+ EVENT_NAME,
+ TIMER_START is not NULL as TIMER_START_SET,
+ TIMER_END is not NULL as TIMER_END_SET,
+ OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME, INDEX_NAME,
+ OPERATION
+ from performance_schema.events_waits_history_long
+ where event_name = \'wait/lock/metadata/sql/mdl\';";
+
+# reset lost counters
+truncate table performance_schema.events_statements_summary_by_digest;
+flush status;
+
+flush tables;
+
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+--enable_warnings
+
+CREATE TABLE t1 (id INT PRIMARY KEY, b CHAR(100) DEFAULT 'initial value');
+
+INSERT INTO t1 (id) VALUES (1), (2), (3), (4), (5), (6), (7), (8);
+
+TRUNCATE TABLE performance_schema.events_waits_history_long;
+TRUNCATE TABLE performance_schema.events_waits_history;
+TRUNCATE TABLE performance_schema.events_waits_current;
+
+--connection con1
+
+BEGIN;
+
+# MDL lock granted immediately, no wait.
+SELECT * from t1 where id=1;
+
+--connection default
+
+echo "---- Marker 1 ----";
+
+--vertical_results
+execute dump_metadata_locks;
+execute dump_table_handles;
+execute dump_waits_current;
+execute dump_waits_history_long;
+--horizontal_results
+
+--connection con1
+
+# The MDL lock is now released
+COMMIT;
+
+--connection default
+
+echo "---- Marker 2 ----";
+
+--vertical_results
+execute dump_metadata_locks;
+execute dump_table_handles;
+execute dump_waits_current;
+execute dump_waits_history_long;
+--horizontal_results
+
+--connection con1
+
+BEGIN;
+
+# MDL lock is granted immediately, no wait
+UPDATE t1 set b="new value" where id=2;
+
+--connection default
+
+echo "---- Marker 3 ----";
+
+--vertical_results
+execute dump_metadata_locks;
+execute dump_table_handles;
+execute dump_waits_current;
+execute dump_waits_history_long;
+--horizontal_results
+
+--connection con2
+
+BEGIN;
+
+# MDL lock is PENDING : waiting for the update transaction
+--send DROP TABLE t1;
+
+--connection default
+
+# Wait for the DROP TABLE t1 to block
+let $wait_condition=
+ select count(*) = 1 from performance_schema.events_waits_current
+ where event_name = 'wait/lock/metadata/sql/mdl'
+ and object_name = 't1';
+--source include/wait_condition.inc
+
+echo "---- Marker 4 ----";
+
+--vertical_results
+execute dump_metadata_locks;
+execute dump_table_handles;
+execute dump_waits_current;
+execute dump_waits_history_long;
+--horizontal_results
+
+--connection con1
+
+# MDL lock on the update is released,
+# MDL pending lock is granted for the drop table, then released.
+COMMIT;
+
+--connection con2
+
+# complete DROP TABLE t1
+--reap
+
+--connection default
+
+echo "---- Marker 5 ----";
+
+--vertical_results
+execute dump_metadata_locks;
+execute dump_table_handles;
+execute dump_waits_current;
+execute dump_waits_history_long;
+--horizontal_results
+
+--connection default
+
+TRUNCATE TABLE performance_schema.events_waits_history_long;
+TRUNCATE TABLE performance_schema.events_waits_history;
+TRUNCATE TABLE performance_schema.events_waits_current;
+create table t1 (a int);
+
+--connection con1
+
+# Get MDL read lock
+LOCK TABLE t1 READ;
+
+--connection default
+
+echo "---- Marker 6 ----";
+
+--vertical_results
+execute dump_metadata_locks;
+execute dump_table_handles;
+execute dump_waits_current;
+execute dump_waits_history_long;
+--horizontal_results
+
+--connection con2
+
+# User1 has a READ LOCK
+# User2 waiting for WRITE LOCK
+--send LOCK TABLE t1 write;
+
+--connection default
+
+# Wait for the LOCK TABLE t1 write to block
+let $wait_condition=
+ select count(*) = 1 from performance_schema.events_waits_current
+ where event_name = 'wait/lock/metadata/sql/mdl'
+ and object_name = 't1';
+--source include/wait_condition.inc
+
+echo "---- Marker 7 ----";
+
+--vertical_results
+execute dump_metadata_locks;
+execute dump_table_handles;
+execute dump_waits_current;
+execute dump_waits_history_long;
+--horizontal_results
+
+--connection con1
+
+# User1 releases a READ LOCK
+# User2 granted a WRITE LOCK
+UNLOCK TABLES;
+
+--connection con2
+
+# Complete LOCK TABLE t1 write
+--reap
+
+--connection default
+
+echo "---- Marker 8 ----";
+
+--vertical_results
+execute dump_metadata_locks;
+execute dump_table_handles;
+execute dump_waits_current;
+execute dump_waits_history_long;
+--horizontal_results
+
+--connection con1
+
+# User2 granted a WRITE LOCK
+# User1 waits for a READ LOCK
+--send LOCK TABLES t1 read;
+
+--connection default
+
+# Wait for the LOCK TABLES t1 READ to block
+let $wait_condition=
+ select count(*) = 1 from performance_schema.events_waits_current
+ where event_name = 'wait/lock/metadata/sql/mdl'
+ and object_name = 't1';
+--source include/wait_condition.inc
+
+echo "---- Marker 9 ----";
+
+--vertical_results
+execute dump_metadata_locks;
+execute dump_table_handles;
+execute dump_waits_current;
+execute dump_waits_history_long;
+--horizontal_results
+
+--connection con2
+
+UNLOCK TABLES;
+
+--connection con1
+
+# Complete LOCK TABLE t1 read
+--reap
+
+--connection default
+
+echo "---- Marker 10 ----";
+
+--vertical_results
+execute dump_metadata_locks;
+execute dump_table_handles;
+execute dump_waits_current;
+execute dump_waits_history_long;
+--horizontal_results
+
+--connection con1
+
+UNLOCK TABLES;
+
+--connection default
+
+echo "---- Marker 11 ----";
+
+--vertical_results
+execute dump_metadata_locks;
+execute dump_table_handles;
+execute dump_waits_current;
+execute dump_waits_history_long;
+--horizontal_results
+
+
+TRUNCATE TABLE performance_schema.events_waits_history_long;
+TRUNCATE TABLE performance_schema.events_waits_history;
+TRUNCATE TABLE performance_schema.events_waits_current;
+--connection con1
+
+BEGIN;
+
+# MDL lock is granted immediately, no wait
+UPDATE LOW_PRIORITY t1 SET a=8;
+
+--connection default
+
+echo "---- Marker 12 ----";
+
+--vertical_results
+execute dump_metadata_locks;
+execute dump_table_handles;
+execute dump_waits_current;
+execute dump_waits_history_long;
+--horizontal_results
+
+--connection con1
+COMMIT;
+
+--connection default
+
+TRUNCATE TABLE performance_schema.events_waits_history_long;
+TRUNCATE TABLE performance_schema.events_waits_history;
+TRUNCATE TABLE performance_schema.events_waits_current;
+
+--connection con1
+
+SELECT GET_LOCK('test', 0);
+
+--connection default
+
+echo "---- Marker 13 ----";
+
+--vertical_results
+execute dump_metadata_locks;
+execute dump_table_handles;
+execute dump_waits_current;
+execute dump_waits_history_long;
+--horizontal_results
+
+--connection con2
+
+--send SELECT GET_LOCK('test', 120);
+
+--connection default
+
+let $wait_condition=
+ select count(*) = 1 from performance_schema.events_waits_current
+ where event_name = 'wait/lock/metadata/sql/mdl'
+ and object_name = 'test';
+--source include/wait_condition.inc
+
+echo "---- Marker 14 ----";
+
+--vertical_results
+execute dump_metadata_locks;
+execute dump_table_handles;
+execute dump_waits_current;
+execute dump_waits_history_long;
+--horizontal_results
+
+--connection con1
+
+SELECT RELEASE_LOCK('test');
+
+--connection con2
+
+--reap
+
+--connection default
+
+echo "---- Marker 15 ----";
+
+--vertical_results
+execute dump_metadata_locks;
+execute dump_table_handles;
+execute dump_waits_current;
+execute dump_waits_history_long;
+--horizontal_results
+
+--connection con2
+
+SELECT RELEASE_LOCK('test');
+
+--connection default
+
+echo "---- Marker 16 ----";
+
+--vertical_results
+execute dump_metadata_locks;
+execute dump_table_handles;
+execute dump_waits_current;
+execute dump_waits_history_long;
+--horizontal_results
+
+# Cleanup
+
+--disconnect con1
+--disconnect con2
+
+--connection default
+
+drop table t1;
+
+UPDATE performance_schema.setup_instruments SET enabled = 'YES', timed = 'YES';
+
+revoke all privileges, grant option from user1@localhost;
+revoke all privileges, grant option from user2@localhost;
+
+drop user user1@localhost;
+drop user user2@localhost;
+
+drop function thread_id_name;
+
+drop prepare dump_metadata_locks;
+drop prepare dump_table_handles;
+drop prepare dump_waits_current;
+drop prepare dump_waits_history_long;
+
+delete from performance_schema.setup_objects
+ where object_schema='mtr';
+
+# In case of failure, will indicate the root cause
+show global status like "performance_schema%";
+
diff --git a/mysql-test/suite/perfschema/t/memory_aggregate-master.opt b/mysql-test/suite/perfschema/t/memory_aggregate-master.opt
new file mode 100644
index 00000000000..cd2044483ef
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/memory_aggregate-master.opt
@@ -0,0 +1 @@
+--query_cache_size=0
diff --git a/mysql-test/suite/perfschema/t/memory_aggregate.test b/mysql-test/suite/perfschema/t/memory_aggregate.test
new file mode 100644
index 00000000000..a77dae2a65f
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/memory_aggregate.test
@@ -0,0 +1,7 @@
+# Tests for the performance schema
+#
+--source include/have_64bit.inc
+--source ../include/memory_aggregate_setup.inc
+--source ../include/memory_aggregate_load.inc
+--source ../include/memory_aggregate_cleanup.inc
+
diff --git a/mysql-test/suite/perfschema/t/memory_aggregate_32bit-master.opt b/mysql-test/suite/perfschema/t/memory_aggregate_32bit-master.opt
new file mode 100644
index 00000000000..cd2044483ef
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/memory_aggregate_32bit-master.opt
@@ -0,0 +1 @@
+--query_cache_size=0
diff --git a/mysql-test/suite/perfschema/t/memory_aggregate_32bit.test b/mysql-test/suite/perfschema/t/memory_aggregate_32bit.test
new file mode 100644
index 00000000000..abd16212acc
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/memory_aggregate_32bit.test
@@ -0,0 +1,7 @@
+# Tests for the performance schema
+#
+--source include/have_32bit.inc
+--source ../include/memory_aggregate_setup.inc
+--source ../include/memory_aggregate_load.inc
+--source ../include/memory_aggregate_cleanup.inc
+
diff --git a/mysql-test/suite/perfschema/t/memory_aggregate_no_a-master.opt b/mysql-test/suite/perfschema/t/memory_aggregate_no_a-master.opt
new file mode 100644
index 00000000000..0cdab7054d8
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/memory_aggregate_no_a-master.opt
@@ -0,0 +1,2 @@
+--query_cache_size=0
+--loose-performance_schema_accounts_size=0
diff --git a/mysql-test/suite/perfschema/t/memory_aggregate_no_a.test b/mysql-test/suite/perfschema/t/memory_aggregate_no_a.test
new file mode 100644
index 00000000000..a77dae2a65f
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/memory_aggregate_no_a.test
@@ -0,0 +1,7 @@
+# Tests for the performance schema
+#
+--source include/have_64bit.inc
+--source ../include/memory_aggregate_setup.inc
+--source ../include/memory_aggregate_load.inc
+--source ../include/memory_aggregate_cleanup.inc
+
diff --git a/mysql-test/suite/perfschema/t/memory_aggregate_no_a_no_h-master.opt b/mysql-test/suite/perfschema/t/memory_aggregate_no_a_no_h-master.opt
new file mode 100644
index 00000000000..30b8ed74c88
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/memory_aggregate_no_a_no_h-master.opt
@@ -0,0 +1,3 @@
+--query_cache_size=0
+--loose-performance_schema_accounts_size=0
+--loose-performance_schema_hosts_size=0
diff --git a/mysql-test/suite/perfschema/t/memory_aggregate_no_a_no_h.test b/mysql-test/suite/perfschema/t/memory_aggregate_no_a_no_h.test
new file mode 100644
index 00000000000..a77dae2a65f
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/memory_aggregate_no_a_no_h.test
@@ -0,0 +1,7 @@
+# Tests for the performance schema
+#
+--source include/have_64bit.inc
+--source ../include/memory_aggregate_setup.inc
+--source ../include/memory_aggregate_load.inc
+--source ../include/memory_aggregate_cleanup.inc
+
diff --git a/mysql-test/suite/perfschema/t/memory_aggregate_no_a_no_u-master.opt b/mysql-test/suite/perfschema/t/memory_aggregate_no_a_no_u-master.opt
new file mode 100644
index 00000000000..b0629a513c0
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/memory_aggregate_no_a_no_u-master.opt
@@ -0,0 +1,3 @@
+--query_cache_size=0
+--loose-performance_schema_accounts_size=0
+--loose-performance_schema_users_size=0
diff --git a/mysql-test/suite/perfschema/t/memory_aggregate_no_a_no_u.test b/mysql-test/suite/perfschema/t/memory_aggregate_no_a_no_u.test
new file mode 100644
index 00000000000..a77dae2a65f
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/memory_aggregate_no_a_no_u.test
@@ -0,0 +1,7 @@
+# Tests for the performance schema
+#
+--source include/have_64bit.inc
+--source ../include/memory_aggregate_setup.inc
+--source ../include/memory_aggregate_load.inc
+--source ../include/memory_aggregate_cleanup.inc
+
diff --git a/mysql-test/suite/perfschema/t/memory_aggregate_no_a_no_u_no_h-master.opt b/mysql-test/suite/perfschema/t/memory_aggregate_no_a_no_u_no_h-master.opt
new file mode 100644
index 00000000000..89df63a3251
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/memory_aggregate_no_a_no_u_no_h-master.opt
@@ -0,0 +1,4 @@
+--query_cache_size=0
+--loose-performance_schema_accounts_size=0
+--loose-performance_schema_users_size=0
+--loose-performance_schema_hosts_size=0
diff --git a/mysql-test/suite/perfschema/t/memory_aggregate_no_a_no_u_no_h.test b/mysql-test/suite/perfschema/t/memory_aggregate_no_a_no_u_no_h.test
new file mode 100644
index 00000000000..a77dae2a65f
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/memory_aggregate_no_a_no_u_no_h.test
@@ -0,0 +1,7 @@
+# Tests for the performance schema
+#
+--source include/have_64bit.inc
+--source ../include/memory_aggregate_setup.inc
+--source ../include/memory_aggregate_load.inc
+--source ../include/memory_aggregate_cleanup.inc
+
diff --git a/mysql-test/suite/perfschema/t/memory_aggregate_no_h-master.opt b/mysql-test/suite/perfschema/t/memory_aggregate_no_h-master.opt
new file mode 100644
index 00000000000..d630f88b87a
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/memory_aggregate_no_h-master.opt
@@ -0,0 +1,2 @@
+--query_cache_size=0
+--loose-performance_schema_hosts_size=0
diff --git a/mysql-test/suite/perfschema/t/memory_aggregate_no_h.test b/mysql-test/suite/perfschema/t/memory_aggregate_no_h.test
new file mode 100644
index 00000000000..a77dae2a65f
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/memory_aggregate_no_h.test
@@ -0,0 +1,7 @@
+# Tests for the performance schema
+#
+--source include/have_64bit.inc
+--source ../include/memory_aggregate_setup.inc
+--source ../include/memory_aggregate_load.inc
+--source ../include/memory_aggregate_cleanup.inc
+
diff --git a/mysql-test/suite/perfschema/t/memory_aggregate_no_u-master.opt b/mysql-test/suite/perfschema/t/memory_aggregate_no_u-master.opt
new file mode 100644
index 00000000000..0d4faa03cd1
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/memory_aggregate_no_u-master.opt
@@ -0,0 +1,2 @@
+--query_cache_size=0
+--loose-performance_schema_users_size=0
diff --git a/mysql-test/suite/perfschema/t/memory_aggregate_no_u.test b/mysql-test/suite/perfschema/t/memory_aggregate_no_u.test
new file mode 100644
index 00000000000..a77dae2a65f
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/memory_aggregate_no_u.test
@@ -0,0 +1,7 @@
+# Tests for the performance schema
+#
+--source include/have_64bit.inc
+--source ../include/memory_aggregate_setup.inc
+--source ../include/memory_aggregate_load.inc
+--source ../include/memory_aggregate_cleanup.inc
+
diff --git a/mysql-test/suite/perfschema/t/memory_aggregate_no_u_no_h-master.opt b/mysql-test/suite/perfschema/t/memory_aggregate_no_u_no_h-master.opt
new file mode 100644
index 00000000000..2a23af9d390
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/memory_aggregate_no_u_no_h-master.opt
@@ -0,0 +1,3 @@
+--query_cache_size=0
+--loose-performance_schema_users_size=0
+--loose-performance_schema_hosts_size=0
diff --git a/mysql-test/suite/perfschema/t/memory_aggregate_no_u_no_h.test b/mysql-test/suite/perfschema/t/memory_aggregate_no_u_no_h.test
new file mode 100644
index 00000000000..a77dae2a65f
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/memory_aggregate_no_u_no_h.test
@@ -0,0 +1,7 @@
+# Tests for the performance schema
+#
+--source include/have_64bit.inc
+--source ../include/memory_aggregate_setup.inc
+--source ../include/memory_aggregate_load.inc
+--source ../include/memory_aggregate_cleanup.inc
+
diff --git a/mysql-test/suite/perfschema/t/misc.test b/mysql-test/suite/perfschema/t/misc.test
index 80ce64f0302..848be3beea1 100644
--- a/mysql-test/suite/perfschema/t/misc.test
+++ b/mysql-test/suite/perfschema/t/misc.test
@@ -156,7 +156,7 @@ DELETE FROM t_60905 WHERE i = 1;
# should delete with a full scan (5 NULL fetch, 1 NULL delete)
DELETE FROM t_60905 WHERE j = 8;
-# show the instrument data
+# show the instrument data.
SELECT object_schema,
object_name,
index_name,
@@ -170,6 +170,23 @@ SELECT object_schema,
DROP TABLE t_60905;
+#
+# Bug#71278 NUMBER OF ROWS IN PERFORMANCE SCHEMA TABLES
+#
+
+show global variables like "performance_schema_max_thread_instances";
+explain select * from performance_schema.threads;
+
+#
+# Bug #73082 SHOW EVENTS in performance_schema gives Access Denied
+#
+
+use performance_schema;
+show events;
+show events from performance_schema;
+show events where Db= 'performance_schema';
+use test;
+
#
# Bug#11929832 - EVENTS_STATEMENTS_HISTORY HAS ERRORS=0 WHEN THERE ARE ERRORS
@@ -187,7 +204,7 @@ select * from t1;
select mysql_errno, returned_sqlstate, message_text, errors, warnings
from performance_schema.events_statements_history where errors > 0;
---echo
+--echo #
select mysql_errno, returned_sqlstate, message_text, errors, warnings from
performance_schema.events_statements_history_long where errors > 0;
@@ -270,3 +287,14 @@ enable_query_log;
# an unexpected refcount.
FLUSH TABLE t0;
DROP TABLE t0;
+
+--echo #
+--echo # MDEV-24364 Alter rename table does not remove PFS share
+--echo #
+create or replace table yt4 (x int) engine innodb;
+alter table yt4 rename to t1, algorithm=copy;
+drop tables t1;
+
+select object_type, object_schema, object_name
+from performance_schema.objects_summary_global_by_type
+where object_schema="test";
diff --git a/mysql-test/suite/perfschema/t/myisam_file_io.test b/mysql-test/suite/perfschema/t/myisam_file_io.test
index 3b6a1369ab5..96f24d8a835 100644
--- a/mysql-test/suite/perfschema/t/myisam_file_io.test
+++ b/mysql-test/suite/perfschema/t/myisam_file_io.test
@@ -51,7 +51,7 @@ select event_name,
order by thread_id, event_id;
# In case of failures, this will tell if file io are lost.
-show status like 'performance_schema_%';
+show global status like 'performance_schema_%';
# Cleanup
diff --git a/mysql-test/suite/perfschema/t/nesting.test b/mysql-test/suite/perfschema/t/nesting.test
index 6144d0ff6d3..ee1581c284b 100644
--- a/mysql-test/suite/perfschema/t/nesting.test
+++ b/mysql-test/suite/perfschema/t/nesting.test
@@ -1,5 +1,8 @@
# Test to check the proper nesting of events
+## To skip the test with QC enabled till BUG#14830950 is fixed.
+#-- source include/have_QC_Disabled.inc
+
--source include/not_embedded.inc
--source include/have_perfschema.inc
# On windows, the socket instrumentation collects an extra "opt"
@@ -42,6 +45,7 @@ update performance_schema.setup_instruments set enabled='YES', timed='YES'
'wait/synch/rwlock/sql/LOCK_grant',
'wait/synch/mutex/sql/THD::LOCK_thd_data',
'wait/synch/mutex/sql/THD::LOCK_thd_kill',
+ 'wait/synch/mutex/sql/THD::LOCK_thd_query',
'wait/io/file/sql/query_log');
update performance_schema.setup_instruments set enabled='YES', timed='YES'
@@ -107,7 +111,7 @@ set @marker_end = (select end_event_id from performance_schema.events_statements
select (@marker_end is not null) as expected;
# Will point to what happened on spurious test failures
-show status like "performance_schema%";
+show global status like "performance_schema%";
#
# This is the test itself:
@@ -185,5 +189,3 @@ update performance_schema.threads set instrumented='YES';
update performance_schema.setup_instruments set enabled='YES', timed='YES';
--enable_query_log
-
-
diff --git a/mysql-test/suite/perfschema/t/no_threads-master.opt b/mysql-test/suite/perfschema/t/no_threads-master.opt
index 64275d009d4..eea71a77864 100644
--- a/mysql-test/suite/perfschema/t/no_threads-master.opt
+++ b/mysql-test/suite/perfschema/t/no_threads-master.opt
@@ -1 +1,5 @@
---thread-handling=no-threads --loose-performance-schema-max-thread_instances=10 --default-storage-engine=MyISAM --skip-innodb
+--thread-handling=no-threads
+--loose-performance-schema-max-thread_instances=50
+--default-storage-engine=MyISAM
+--default-tmp-storage-engine=MyISAM
+--loose-skip-innodb
diff --git a/mysql-test/suite/perfschema/t/no_threads.test b/mysql-test/suite/perfschema/t/no_threads.test
index ee745bd87b0..b7b8767f1cc 100644
--- a/mysql-test/suite/perfschema/t/no_threads.test
+++ b/mysql-test/suite/perfschema/t/no_threads.test
@@ -2,7 +2,6 @@
--source include/not_embedded.inc
--source include/have_perfschema.inc
---source include/not_threadpool.inc
# Setup : in this main thread
@@ -20,14 +19,17 @@ truncate table performance_schema.events_waits_current;
truncate table performance_schema.events_waits_history;
truncate table performance_schema.events_waits_history_long;
-show variables like "thread_handling";
+show global variables like "thread_handling";
+
+# Make sure no thread instrumentation is lost
+show status like "Performance_schema_thread_instances_lost";
# Code to test : in this main thread
create table test.t1(a int) engine=MYISAM;
-show variables like "performance_schema";
-show variables like "performance_schema_max_thread%";
+show global variables like "performance_schema";
+show global variables like "performance_schema_max_thread%";
# Verification : in this main thread
diff --git a/mysql-test/suite/perfschema/t/one_thread_per_con.test b/mysql-test/suite/perfschema/t/one_thread_per_con.test
index 6aeec55dbb5..11a203a12e5 100644
--- a/mysql-test/suite/perfschema/t/one_thread_per_con.test
+++ b/mysql-test/suite/perfschema/t/one_thread_per_con.test
@@ -2,7 +2,6 @@
--source include/not_embedded.inc
--source include/have_perfschema.inc
---source include/not_threadpool.inc
# Setup
@@ -24,7 +23,7 @@ drop table if exists test.t3;
truncate table performance_schema.events_waits_history_long;
-show variables like "thread_handling";
+show global variables like "thread_handling";
# Code to test
diff --git a/mysql-test/suite/perfschema/t/ortho_iter.test b/mysql-test/suite/perfschema/t/ortho_iter.test
index f7e68538906..fe1d916b6a0 100644
--- a/mysql-test/suite/perfschema/t/ortho_iter.test
+++ b/mysql-test/suite/perfschema/t/ortho_iter.test
@@ -3,6 +3,7 @@
# for every table and instruments.
--source include/not_embedded.inc
+--source include/no_valgrind_without_big.inc
--source include/have_perfschema.inc
--disable_warnings
@@ -13,17 +14,39 @@ drop procedure if exists check_instrument;
truncate table performance_schema.events_statements_summary_by_digest;
flush status;
+# Print known global memory instruments (PSI_FLAG_GLOBAL),
+# see maintenance of count_global_expected below.
+
+# --echo "Known PSI_FLAG_GLOBAL memory instruments"
+# select name from performance_schema.setup_instruments
+# where (name like "memory/%")
+# and (name not like "memory/performance_schema/%")
+# and (name not in
+# (select event_name from
+# performance_schema.memory_summary_by_account_by_event_name));
+
delimiter $;
create procedure check_instrument(in instr_name varchar(128))
begin
+ declare save_count_expected integer;
declare count_expected integer;
- declare count_actual integer;
+ declare count_builtin_expected integer;
+ declare count_global_expected integer;
declare is_wait integer;
+ declare is_wait_file integer;
+ declare is_wait_socket integer;
declare is_stage integer;
declare is_statement integer;
+ declare is_transaction integer;
+ declare is_memory integer;
declare is_wait_table integer;
+ declare is_wait_file_table integer;
+ declare is_wait_socket_table integer;
declare is_stage_table integer;
declare is_statement_table integer;
+ declare is_transaction_table integer;
+ declare is_memory_table integer;
+ declare is_memory_global_table integer;
declare pfs_table_name varchar(64);
declare msg varchar(512);
declare msg_detail varchar(512);
@@ -35,23 +58,59 @@ begin
declare pfs_cursor CURSOR FOR
select table_name from information_schema.tables
where table_schema= 'performance_schema'
- and table_name like "events_%_by_event_name%"
+ and table_name like "%_by_event_name%"
order by table_name;
declare continue handler for sqlstate '02000'
set done = 1;
- select (instr_name like "wait/%") or (instr_name like "idle/%") into is_wait;
+ select (instr_name like "wait/%") or (instr_name like "idle") into is_wait;
+ select (instr_name like "wait/io/file/%") into is_wait_file;
+ select (instr_name like "wait/io/socket/%") into is_wait_socket;
select (instr_name like "stage/%") into is_stage;
select (instr_name like "statement/%") into is_statement;
+ select (instr_name like "memory/%") into is_memory;
+ select (instr_name like "transaction") into is_transaction;
- select instr_name, is_wait, is_stage, is_statement;
+ select instr_name, is_wait, is_wait_file, is_wait_socket, is_stage, is_statement, is_memory, is_transaction;
select count(name)
from performance_schema.setup_instruments
where (name like (concat(instr_name, "%")))
and (not name like "%/abstract/%")
- into count_expected;
+ and (not name like "memory/performance_schema/%")
+ into save_count_expected;
+
+ select count(name)
+ from performance_schema.setup_instruments
+ where (name like (concat(instr_name, "%")))
+ and (name like "memory/performance_schema/%")
+ into count_builtin_expected;
+
+ select count(name)
+ from performance_schema.setup_instruments
+ where (name like (concat(instr_name, "%")))
+ and (name in (
+ "memory/sql/buffered_logs",
+ "memory/sql/sql_acl_mem",
+ "memory/sql/sql_acl_memex",
+ "memory/sql/acl_cache",
+ "memory/sql/TABLE_SHARE::mem_root",
+ "memory/sql/TABLE",
+ "memory/sql/Query_cache",
+ "memory/sql/native_functions",
+ "memory/sql/Event_basic::mem_root",
+ "memory/sql/root",
+ "memory/sql/load_env_plugins",
+ "memory/sql/plugin_ref",
+ "memory/sql/plugin_mem_root",
+ "memory/sql/plugin_bookmark",
+ "memory/csv/TINA_SHARE",
+ "memory/sql/tz_storage",
+ "memory/sql/servers_cache",
+ "memory/sql/udf_mem"
+ ))
+ into count_global_expected;
set cmd_1= "select count(*) from (select distinct event_name from performance_schema.";
set cmd_2= concat(" where event_name like \"",
@@ -63,8 +122,25 @@ begin
fetch pfs_cursor into pfs_table_name;
if not done then
select (pfs_table_name like "%waits%") into is_wait_table;
+ select (pfs_table_name like "file_summary%") into is_wait_file_table;
+ select (pfs_table_name like "socket_summary%") into is_wait_socket_table;
select (pfs_table_name like "%stages%") into is_stage_table;
select (pfs_table_name like "%statements%") into is_statement_table;
+ select (pfs_table_name like "%memory%") into is_memory_table;
+ select (pfs_table_name like "memory_summary_global_by_event_name") into is_memory_global_table;
+ select (pfs_table_name like "%transaction%") into is_transaction_table;
+
+ set count_expected = save_count_expected;
+
+ if is_memory_global_table
+ then
+ set count_expected = save_count_expected + count_builtin_expected;
+ end if;
+
+ if is_memory_table = 1 and is_memory_global_table = 0
+ then
+ set count_expected = save_count_expected - count_global_expected;
+ end if;
select concat("Checking table ", pfs_table_name, " ...") as status;
select concat(cmd_1, pfs_table_name, cmd_2) into @cmd;
@@ -79,40 +155,112 @@ begin
", instruments ", count_expected,
", found ", @count_actual);
- if is_wait = 1 and is_wait_table = 1 and @count_actual <> count_expected
+ if is_wait = 1
then
- set msg= concat("Missing wait events: ", msg_detail);
- signal sqlstate '05000' set message_text= msg;
+ if is_wait_table = 1 and @count_actual <> count_expected
+ then
+ set msg= concat("Missing wait events: ", msg_detail);
+ signal sqlstate '05000' set message_text= msg;
+ end if;
+
+ if is_wait_table = 0
+ and is_wait_file_table = 0
+ and is_wait_socket_table = 0
+ and @count_actual <> 0
+ then
+ set msg= concat("Unexpected wait events: ", msg_detail);
+ signal sqlstate '05000' set message_text= msg;
+ end if;
end if;
- if is_wait = 1 and is_wait_table = 0 and @count_actual <> 0
+ if is_wait_file = 1
then
- set msg= concat("Unexpected wait events: ", msg_detail);
- signal sqlstate '05000' set message_text= msg;
+ if is_wait_file_table = 1 and @count_actual <> count_expected
+ then
+ set msg= concat("Missing wait/io/file events: ", msg_detail);
+ signal sqlstate '05000' set message_text= msg;
+ end if;
+
+ if is_wait_table = 0 and is_wait_file_table = 0 and @count_actual <> 0
+ then
+ set msg= concat("Unexpected wait/io/file events: ", msg_detail);
+ signal sqlstate '05000' set message_text= msg;
+ end if;
end if;
- if is_stage = 1 and is_stage_table = 1 and @count_actual <> count_expected
+ if is_wait_socket = 1
then
- set msg= concat("Missing stage events: ", msg_detail);
- signal sqlstate '05000' set message_text= msg;
+ if is_wait_socket_table = 1 and @count_actual <> count_expected
+ then
+ set msg= concat("Missing wait/io/socket events: ", msg_detail);
+ signal sqlstate '05000' set message_text= msg;
+ end if;
+
+ if is_wait_table = 0 and is_wait_socket_table = 0 and @count_actual <> 0
+ then
+ set msg= concat("Unexpected wait/io/socket events: ", msg_detail);
+ signal sqlstate '05000' set message_text= msg;
+ end if;
end if;
- if is_stage = 1 and is_stage_table = 0 and @count_actual <> 0
+ if is_stage = 1
then
- set msg= concat("Unexpected stage events: ", msg_detail);
- signal sqlstate '05000' set message_text= msg;
+ if is_stage_table = 1 and @count_actual <> count_expected
+ then
+ set msg= concat("Missing stage events: ", msg_detail);
+ signal sqlstate '05000' set message_text= msg;
+ end if;
+
+ if is_stage_table = 0 and @count_actual <> 0
+ then
+ set msg= concat("Unexpected stage events: ", msg_detail);
+ signal sqlstate '05000' set message_text= msg;
+ end if;
end if;
- if is_statement = 1 and is_statement_table = 1 and @count_actual <> count_expected
+ if is_statement = 1
then
- set msg= concat("Missing statement events: ", msg_detail);
- signal sqlstate '05000' set message_text= msg;
+ if is_statement_table = 1 and @count_actual <> count_expected
+ then
+ set msg= concat("Missing statement events: ", msg_detail);
+ signal sqlstate '05000' set message_text= msg;
+ end if;
+
+ if is_statement_table = 0 and @count_actual <> 0
+ then
+ set msg= concat("Unexpected statement events: ", msg_detail);
+ signal sqlstate '05000' set message_text= msg;
+ end if;
+ end if;
+
+ if is_memory = 1
+ then
+ if is_memory_table = 1 and @count_actual <> count_expected
+ then
+ set msg= concat("Missing memory events: ", msg_detail);
+ signal sqlstate '05000' set message_text= msg;
+ end if;
+
+ if is_memory_table = 0 and @count_actual <> 0
+ then
+ set msg= concat("Unexpected memory events: ", msg_detail);
+ signal sqlstate '05000' set message_text= msg;
+ end if;
end if;
- if is_statement = 1 and is_statement_table = 0 and @count_actual <> 0
+ if is_transaction = 1
then
- set msg= concat("Unexpected statement events: ", msg_detail);
- signal sqlstate '05000' set message_text= msg;
+ if is_transaction_table = 1 and @count_actual <> count_expected
+ then
+ set msg= concat("Missing transaction events: ", msg_detail);
+ signal sqlstate '05000' set message_text= msg;
+ end if;
+
+ if is_transaction_table = 0 and @count_actual <> 0
+ then
+ set msg= concat("Unexpected transaction events: ", msg_detail);
+ signal sqlstate '05000' set message_text= msg;
+ end if;
end if;
end if;
@@ -127,16 +275,15 @@ $
delimiter ;$
# Check the configuration is ok
-show variables where
- `Variable_name` != "performance_schema_max_statement_classes" and
- `Variable_name` like "performance_schema%";
+show global variables like "performance_schema%";
call check_instrument("wait/synch/mutex/");
call check_instrument("wait/synch/rwlock/");
+call check_instrument("wait/synch/sxlock/");
call check_instrument("wait/synch/cond/");
call check_instrument("wait/synch/");
call check_instrument("wait/io/file/");
-call check_instrument("wait/io/net/");
+call check_instrument("wait/io/socket/");
call check_instrument("wait/io/table/");
call check_instrument("wait/io/");
call check_instrument("wait/lock/table/");
@@ -147,8 +294,10 @@ call check_instrument("statement/com/");
call check_instrument("statement/sql/");
call check_instrument("statement/abstract/");
call check_instrument("statement/");
-call check_instrument("idle/io/socket");
-call check_instrument("idle/");
+call check_instrument("idle");
+call check_instrument("memory/");
+call check_instrument("memory/performance_schema/");
+call check_instrument("transaction");
drop procedure check_instrument;
diff --git a/mysql-test/suite/perfschema/t/pfs_upgrade_event-master.opt b/mysql-test/suite/perfschema/t/pfs_upgrade_event-master.opt
new file mode 100644
index 00000000000..275a585d298
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/pfs_upgrade_event-master.opt
@@ -0,0 +1,2 @@
+--general_log=0
+--slow_query_log=0
diff --git a/mysql-test/suite/perfschema/t/pfs_upgrade_event.test b/mysql-test/suite/perfschema/t/pfs_upgrade_event.test
index f16a073f212..809e5e05827 100644
--- a/mysql-test/suite/perfschema/t/pfs_upgrade_event.test
+++ b/mysql-test/suite/perfschema/t/pfs_upgrade_event.test
@@ -9,7 +9,7 @@
let $MYSQLD_DATADIR= `SELECT @@datadir`;
---echo "Testing mysql_upgrade with EVENT performance_schema.user_event"
+--echo # Testing mysql_upgrade with EVENT performance_schema.user_event
create event test.user_event on schedule every 1 day do
select "not supposed to be here";
diff --git a/mysql-test/suite/perfschema/t/pfs_upgrade_func-master.opt b/mysql-test/suite/perfschema/t/pfs_upgrade_func-master.opt
new file mode 100644
index 00000000000..275a585d298
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/pfs_upgrade_func-master.opt
@@ -0,0 +1,2 @@
+--general_log=0
+--slow_query_log=0
diff --git a/mysql-test/suite/perfschema/t/pfs_upgrade_func.test b/mysql-test/suite/perfschema/t/pfs_upgrade_func.test
index da2bc371308..8f3a1c0ea26 100644
--- a/mysql-test/suite/perfschema/t/pfs_upgrade_func.test
+++ b/mysql-test/suite/perfschema/t/pfs_upgrade_func.test
@@ -9,7 +9,7 @@
let $MYSQLD_DATADIR= `SELECT @@datadir`;
---echo "Testing mysql_upgrade with FUNCTION performance_schema.user_func"
+--echo # Testing mysql_upgrade with FUNCTION performance_schema.user_func
create function test.user_func() returns integer
return 0;
diff --git a/mysql-test/suite/perfschema/t/pfs_upgrade_proc-master.opt b/mysql-test/suite/perfschema/t/pfs_upgrade_proc-master.opt
new file mode 100644
index 00000000000..275a585d298
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/pfs_upgrade_proc-master.opt
@@ -0,0 +1,2 @@
+--general_log=0
+--slow_query_log=0
diff --git a/mysql-test/suite/perfschema/t/pfs_upgrade_proc.test b/mysql-test/suite/perfschema/t/pfs_upgrade_proc.test
index 99e0816ccbd..692507348e8 100644
--- a/mysql-test/suite/perfschema/t/pfs_upgrade_proc.test
+++ b/mysql-test/suite/perfschema/t/pfs_upgrade_proc.test
@@ -9,7 +9,7 @@
let $MYSQLD_DATADIR= `SELECT @@datadir`;
---echo "Testing mysql_upgrade with PROCEDURE performance_schema.user_proc"
+--echo # Testing mysql_upgrade with PROCEDURE performance_schema.user_proc
create procedure test.user_proc()
select "Not supposed to be here";
diff --git a/mysql-test/suite/perfschema/t/pfs_upgrade_table-master.opt b/mysql-test/suite/perfschema/t/pfs_upgrade_table-master.opt
new file mode 100644
index 00000000000..275a585d298
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/pfs_upgrade_table-master.opt
@@ -0,0 +1,2 @@
+--general_log=0
+--slow_query_log=0
diff --git a/mysql-test/suite/perfschema/t/pfs_upgrade_table.test b/mysql-test/suite/perfschema/t/pfs_upgrade_table.test
index 897ec23c552..8c69f0055f2 100644
--- a/mysql-test/suite/perfschema/t/pfs_upgrade_table.test
+++ b/mysql-test/suite/perfschema/t/pfs_upgrade_table.test
@@ -9,7 +9,7 @@
let $MYSQLD_DATADIR= `SELECT @@datadir`;
---echo "Testing mysql_upgrade with TABLE performance_schema.user_table"
+--echo # Testing mysql_upgrade with TABLE performance_schema.user_table
create table test.user_table(a int);
diff --git a/mysql-test/suite/perfschema/t/pfs_upgrade_view-master.opt b/mysql-test/suite/perfschema/t/pfs_upgrade_view-master.opt
new file mode 100644
index 00000000000..275a585d298
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/pfs_upgrade_view-master.opt
@@ -0,0 +1,2 @@
+--general_log=0
+--slow_query_log=0
diff --git a/mysql-test/suite/perfschema/t/pfs_upgrade_view.test b/mysql-test/suite/perfschema/t/pfs_upgrade_view.test
index 0c9af73a1d4..57a7cad2ac6 100644
--- a/mysql-test/suite/perfschema/t/pfs_upgrade_view.test
+++ b/mysql-test/suite/perfschema/t/pfs_upgrade_view.test
@@ -9,7 +9,7 @@
let $MYSQLD_DATADIR= `SELECT @@datadir`;
---echo "Testing mysql_upgrade with VIEW performance_schema.user_view"
+--echo # Testing mysql_upgrade with VIEW performance_schema.user_view
create view test.user_view as select "Not supposed to be here";
diff --git a/mysql-test/suite/perfschema/t/pool_of_threads-master.opt b/mysql-test/suite/perfschema/t/pool_of_threads-master.opt
deleted file mode 100644
index 75a5cd77203..00000000000
--- a/mysql-test/suite/perfschema/t/pool_of_threads-master.opt
+++ /dev/null
@@ -1 +0,0 @@
---loose-pool-of-threads
diff --git a/mysql-test/suite/perfschema/t/prepared_statements.test b/mysql-test/suite/perfschema/t/prepared_statements.test
new file mode 100644
index 00000000000..75d10238ac1
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/prepared_statements.test
@@ -0,0 +1,210 @@
+# Test for prepared statement instrumentation
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+--source include/no_protocol.inc
+
+CREATE DATABASE db;
+USE db;
+
+--let $psi_select = SELECT STATEMENT_NAME, SQL_TEXT, COUNT_REPREPARE, COUNT_EXECUTE, SUM_ROWS_SENT, SUM_SELECT_SCAN, SUM_NO_INDEX_USED FROM performance_schema.prepared_statements_instances
+--let $psi_truncate = TRUNCATE TABLE performance_schema.prepared_statements_instances
+--let $eshl_select = SELECT EVENT_NAME, SQL_TEXT, OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME FROM performance_schema.events_statements_history_long WHERE CURRENT_SCHEMA='db'
+--let $eshl_truncate = TRUNCATE TABLE performance_schema.events_statements_history_long
+
+--eval $psi_truncate
+--eval $eshl_truncate
+
+--source suite/perfschema/include/prepared_stmts_setup.inc
+
+--vertical_results
+--eval $psi_select
+--eval $eshl_select
+--horizontal_results
+
+--source suite/perfschema/include/prepared_stmts_execution.inc
+
+--vertical_results
+--eval $psi_select
+--eval $eshl_select
+--horizontal_results
+
+# Truncate to reset the statistics
+--eval $psi_truncate
+
+# check whether the statistics are reset
+--vertical_results
+--eval $psi_select
+--horizontal_results
+
+--source suite/perfschema/include/prepared_stmts_deallocation.inc
+
+--vertical_results
+# select query on prepared_statements_instances table must return empty set
+--eval $psi_select
+--eval $eshl_select
+--horizontal_results
+
+# truncate
+--eval $eshl_truncate
+
+#
+# Test to check the instrumentation of prepared statements
+# when all consumers in setup_consumers are disabled.
+#
+
+# Disable all consumers
+UPDATE performance_schema.setup_consumers SET ENABLED = 'NO';
+
+--source suite/perfschema/include/prepared_stmts_setup.inc
+
+--vertical_results
+--eval $psi_select
+--eval $eshl_select
+--horizontal_results
+
+--source suite/perfschema/include/prepared_stmts_execution.inc
+
+--vertical_results
+--eval $psi_select
+--eval $eshl_select
+--horizontal_results
+
+--source suite/perfschema/include/prepared_stmts_deallocation.inc
+
+--vertical_results
+--eval $psi_select
+--eval $eshl_select
+--horizontal_results
+
+# truncate
+--eval $eshl_truncate
+
+# restore the initial set-up of consumers table
+UPDATE performance_schema.setup_consumers SET ENABLED = 'YES';
+
+#
+# Aggregation
+#
+
+PREPARE st FROM 'SELECT SUM(1000 + ?) AS total';
+
+--vertical_results
+--eval $psi_select
+--horizontal_results
+
+SET @d=100;
+EXECUTE st USING @d;
+
+--vertical_results
+--eval $psi_select
+--horizontal_results
+
+let $i=5;
+while($i)
+{
+ SET @d = @d + 100;
+ EXECUTE st USING @d;
+ --vertical_results
+ --eval $psi_select
+ --horizontal_results
+ dec $i;
+}
+
+# truncate
+--eval $psi_truncate
+--vertical_results
+--eval $psi_select
+--horizontal_results
+
+#
+# check whether the instrumented prepared statement is removed from the
+# prepared_statement_instances table after de allocation of the prepared
+# statement even if instrumentation is disabled
+#
+
+# Disable prepared statement instrumentation
+UPDATE performance_schema.setup_instruments SET ENABLED = 'NO'
+ WHERE NAME like "statement/sql/execute%";
+
+SET @d=3274;
+# COUNT_EXECUTE should remain 0. No increment must be seen.
+EXECUTE st USING @d;
+--vertical_results
+--eval $psi_select
+--horizontal_results
+
+UPDATE performance_schema.setup_instruments SET ENABLED = 'NO'
+ WHERE NAME like "statement/sql/prepare%";
+
+DEALLOCATE PREPARE st;
+# should return empty set.
+--vertical_results
+--eval $psi_select
+--horizontal_results
+
+# Restore back teh initial set-up of setup_instruments table
+
+UPDATE performance_schema.setup_instruments SET ENABLED = 'YES'
+ WHERE NAME like "statement/sql/prepare%";
+UPDATE performance_schema.setup_instruments SET ENABLED = 'YES'
+ WHERE NAME like "statement/sql/execute%";
+
+
+# Reprepare
+
+CREATE TABLE tab(
+ Id INT,
+ name CHAR(10),
+ age INT
+);
+
+INSERT INTO tab VALUES(1,"Nakshatr",25),(2,"chanda",24),(3,"tejas",78);
+
+PREPARE st FROM 'SELECT * FROM tab';
+
+--vertical_results
+--eval $psi_select
+--horizontal_results
+
+EXECUTE st;
+
+--vertical_results
+--eval $psi_select
+--horizontal_results
+
+ALTER TABLE tab DROP COLUMN age;
+
+EXECUTE st;
+
+--vertical_results
+--eval $psi_select
+--horizontal_results
+
+ALTER TABLE tab ADD COLUMN age INT NULL;
+
+EXECUTE st;
+
+--vertical_results
+--eval $psi_select
+--horizontal_results
+
+# check if the statistics are reset
+--eval $psi_truncate
+--vertical_results
+--eval $psi_select
+--horizontal_results
+
+DEALLOCATE PREPARE st;
+
+--vertical_results
+--eval $psi_select
+--horizontal_results
+
+# clean up
+# truncate
+--eval $psi_truncate
+--eval $eshl_truncate
+
+DROP TABLE tab;
+DROP DATABASE db;
diff --git a/mysql-test/suite/perfschema/t/prepared_stmts_by_stored_programs.test b/mysql-test/suite/perfschema/t/prepared_stmts_by_stored_programs.test
new file mode 100644
index 00000000000..bf81d036c2d
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/prepared_stmts_by_stored_programs.test
@@ -0,0 +1,151 @@
+# Test to check instrumentation of prepared statements created by
+# stored programs. SQL prepared statements (PREPARE, EXECUTE, DEALLOCATE PREPARE)
+# can be used in stored procedures, but not stored functions or triggers.
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+--source include/no_protocol.inc
+
+--let $psi_select = SELECT STATEMENT_NAME, SQL_TEXT, COUNT_EXECUTE, COUNT_REPREPARE, OWNER_OBJECT_TYPE, OWNER_OBJECT_SCHEMA, OWNER_OBJECT_NAME FROM performance_schema.prepared_statements_instances
+TRUNCATE TABLE performance_schema.prepared_statements_instances;
+
+CREATE DATABASE db;
+USE db;
+
+CREATE TABLE t
+(
+ a INT,
+ b CHAR(10),
+ name CHAR(10)
+);
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
+INSERT INTO t VALUES (1,"kuchipudi","Vempati");
+INSERT INTO t VALUES (2,"odissi","Mohapatra");
+INSERT INTO t VALUES (3,"kathak","Maharaj");
+INSERT INTO t VALUES (4,"mohiyattam","Kalyanikutty");
+INSERT INTO t VALUES (5,"manipuri","Guru");
+INSERT INTO t VALUES (6,"kathakali","Manavedan");
+SET sql_mode= default;
+# Stored Procedure
+DELIMITER |;
+CREATE PROCEDURE p1()
+BEGIN
+ PREPARE st FROM 'SELECT * FROM t WHERE a<=?' ;
+ SET @a=3;
+ EXECUTE st using @a;
+END|
+
+CALL p1()|
+--eval $psi_select
+
+DEALLOCATE PREPARE st|
+--eval $psi_select
+
+CREATE PROCEDURE p2()
+BEGIN
+ PREPARE st1 FROM 'INSERT INTO t SELECT * FROM t WHERE a<=?' ;
+END|
+
+CALL p2()|
+--eval $psi_select
+
+SET @a=4|
+EXECUTE st1 using @a|
+--eval $psi_select
+
+CREATE PROCEDURE p3()
+BEGIN
+ SET @a=2;
+ EXECUTE st1 using @a;
+END|
+
+CALL p3()|
+--eval $psi_select
+
+DEALLOCATE PREPARE st1|
+--eval $psi_select
+
+PREPARE st2 FROM 'UPDATE t SET a=a+1 WHERE b=?'|
+--eval $psi_select
+
+CREATE PROCEDURE p4()
+BEGIN
+ SET @b='kuchipudi';
+ EXECUTE st2 USING @b;
+END|
+
+CALL p4()|
+--eval $psi_select
+
+ALTER TABLE t DROP COLUMN name;
+
+# COUNT_REPREPARE must be 1
+CALL p4()|
+--eval $psi_select
+
+DEALLOCATE PREPARE st2|
+--eval $psi_select
+
+CREATE PROCEDURE p5()
+BEGIN
+ SET @a=1;
+ SELECT @a;
+END|
+
+PREPARE st3 FROM 'CALL p5()'|
+--eval $psi_select
+EXECUTE st3|
+--eval $psi_select
+DEALLOCATE PREPARE st3|
+--eval $psi_select
+
+DELIMITER ;|
+
+# Events
+
+CREATE TABLE tab(a INT);
+
+SET GLOBAL event_scheduler=ON;
+
+DELIMITER |;
+CREATE EVENT e1 ON SCHEDULE EVERY 10 HOUR DO
+BEGIN
+ PREPARE st FROM 'INSERT INTO tab VALUES(?)';
+ SET @a=1;
+ EXECUTE st USING @a;
+END|
+
+DELIMITER ;|
+
+# Let e1 insert 1 records into the table tab
+
+--let $wait_condition= select count(*) >= 1 from tab
+--source include/wait_condition.inc
+SELECT * FROM tab LIMIT 1;
+
+# Wait till the above one execution of event is instrumented.
+
+--let $wait_condition= select count_star >= 1 from performance_schema.events_statements_summary_by_program where object_type='EVENT'
+--source include/wait_condition.inc
+
+SET GLOBAL event_scheduler=OFF;
+--source include/no_running_event_scheduler.inc
+
+# The following should return empty set as the instrumented prepared statement
+# row is removed as de allocation of the statement happens automatically as
+# event thread is cleaned up.
+--eval $psi_select
+
+# clean-up
+TRUNCATE TABLE performance_schema.prepared_statements_instances;
+TRUNCATE TABLE performance_schema.events_statements_history_long;
+
+DROP TABLE t;
+DROP TABLE tab;
+DROP PROCEDURE p1;
+DROP PROCEDURE p2;
+DROP PROCEDURE p3;
+DROP PROCEDURE p4;
+DROP PROCEDURE p5;
+DROP EVENT IF EXISTS e1;
+DROP DATABASE db;
diff --git a/mysql-test/suite/perfschema/t/privilege.test b/mysql-test/suite/perfschema/t/privilege.test
index 0e51d161934..a0af41e0372 100644
--- a/mysql-test/suite/perfschema/t/privilege.test
+++ b/mysql-test/suite/perfschema/t/privilege.test
@@ -336,3 +336,15 @@ UPDATE performance_schema.setup_consumers SET enabled = 'YES';
UPDATE performance_schema.setup_timers SET timer_name = 'MICROSECOND' where name="idle";
UPDATE performance_schema.setup_timers SET timer_name = 'NANOSECOND' where name="stage";
UPDATE performance_schema.setup_timers SET timer_name = 'NANOSECOND' where name="statement";
+
+--echo #
+--echo # WL#2284: Increase the length of a user name
+--echo #
+
+CREATE USER 'user_name_len_22_01234'@localhost;
+
+--error ER_DBACCESS_DENIED_ERROR
+GRANT ALL ON performance_schema.* TO 'user_name_len_22_01234'@localhost with GRANT OPTION;
+
+REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'user_name_len_22_01234'@localhost;
+DROP USER 'user_name_len_22_01234'@localhost;
diff --git a/mysql-test/suite/perfschema/t/privilege_table_io.test b/mysql-test/suite/perfschema/t/privilege_table_io.test
index a74805f5c7b..1265b03b503 100644
--- a/mysql-test/suite/perfschema/t/privilege_table_io.test
+++ b/mysql-test/suite/perfschema/t/privilege_table_io.test
@@ -40,10 +40,8 @@ insert into test.marker set a = 1;
# This will not, the ACL cache is already loaded
insert into test.marker set a = 1;
insert into test.marker set a = 1;
-show variables where
- `Variable_name` != "performance_schema_max_statement_classes" and
- `Variable_name` like "performance_schema%";
-show status like "performance_schema%";
+show global variables like "performance_schema%";
+show global status like "performance_schema%";
# Stop recording events + pull results
let $schema_to_dump= "test", "mysql";
--source ../include/table_io_result_helper.inc
diff --git a/mysql-test/suite/perfschema/t/query_cache.test b/mysql-test/suite/perfschema/t/query_cache.test
index 4c130813611..d5e3008d3af 100644
--- a/mysql-test/suite/perfschema/t/query_cache.test
+++ b/mysql-test/suite/perfschema/t/query_cache.test
@@ -24,33 +24,33 @@ flush status;
select * from t1;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
+show global status like "Qcache_queries_in_cache";
+show global status like "Qcache_inserts";
+show global status like "Qcache_hits";
select * from t1;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
+show global status like "Qcache_queries_in_cache";
+show global status like "Qcache_inserts";
+show global status like "Qcache_hits";
select spins from performance_schema.events_waits_current order by event_name limit 1;
--replace_result CYCLE {CYCLE_OR_NANOSECOND} NANOSECOND {CYCLE_OR_NANOSECOND}
select * from performance_schema.setup_timers where name='wait';
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
+show global status like "Qcache_queries_in_cache";
+show global status like "Qcache_inserts";
+show global status like "Qcache_hits";
select spins from performance_schema.events_waits_current order by event_name limit 1;
--replace_result CYCLE {CYCLE_OR_NANOSECOND} NANOSECOND {CYCLE_OR_NANOSECOND}
select * from performance_schema.setup_timers where name='wait';
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
+show global status like "Qcache_queries_in_cache";
+show global status like "Qcache_inserts";
+show global status like "Qcache_hits";
SET GLOBAL query_cache_size=@save_query_cache_size;
diff --git a/mysql-test/suite/perfschema/t/read_only.test b/mysql-test/suite/perfschema/t/read_only.test
index 0020c64937b..2d8e41595d1 100644
--- a/mysql-test/suite/perfschema/t/read_only.test
+++ b/mysql-test/suite/perfschema/t/read_only.test
@@ -6,6 +6,7 @@
--source include/not_embedded.inc
--source include/have_perfschema.inc
+--enable_connect_log
use performance_schema;
@@ -26,6 +27,7 @@ connection con1;
select @@global.read_only;
show grants;
--disable_result_log
+--echo # Update on perf_schema is allowed in read_only mode.
select * from performance_schema.setup_instruments;
update performance_schema.setup_instruments set enabled='NO';
update performance_schema.setup_instruments set enabled='YES';
@@ -49,7 +51,7 @@ update performance_schema.setup_instruments set enabled='YES';
connection default;
-grant super on *.* to pfsuser@localhost;
+grant READ_ONLY ADMIN on *.* to pfsuser@localhost;
flush privileges;
disconnect con1;
diff --git a/mysql-test/suite/perfschema/t/rpl_group_member_stats.test b/mysql-test/suite/perfschema/t/rpl_group_member_stats.test
new file mode 100644
index 00000000000..256c6a69c26
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/rpl_group_member_stats.test
@@ -0,0 +1,48 @@
+# WL#6839 - GCS Replication: P_S table to show DBSM stats
+#
+# This test proofs the existence of the replication_group_member_stats table
+# and all its fields. Since the table only returns values if the plugin is
+# loaded, all queries will return "No such row" or "0"
+#
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+--let $member_id= query_get_value(SELECT Member_Id from performance_schema.replication_group_member_stats, Member_Id, 1)
+--let $assert_text= The value of member_id should not be present
+--let $assert_cond= "$member_id" = "No such row"
+--source include/assert.inc
+
+--let $view_id= query_get_value(SELECT View_Id from performance_schema.replication_group_member_stats, View_Id, 1)
+--let $assert_text= The value of view_id should not be present
+--let $assert_cond= "$View_Id" = "No such row"
+--source include/assert.inc
+
+--let $transaction_in_queue= query_get_value(SELECT Count_Transactions_in_queue from performance_schema.replication_group_member_stats, Count_Transactions_in_queue, 1)
+--let $assert_text= The value of Count_Transactions_in_queue should be 0
+--let $assert_cond= "$transaction_in_queue" = 0
+--source include/assert.inc
+
+--let $certified_transactions= query_get_value(SELECT Count_Transactions_checked from performance_schema.replication_group_member_stats, Count_Transactions_checked, 1)
+--let $assert_text= The value of Count_Transactions_checked should be 0
+--let $assert_cond= "$certified_transactions" = 0
+--source include/assert.inc
+
+--let $negatively_certified= query_get_value(SELECT Count_conflicts_detected from performance_schema.replication_group_member_stats, Count_conflicts_detected, 1)
+--let $assert_text= The value of Count_conflicts_detected should be 0
+--let $assert_cond= "$negatively_certified" = 0
+--source include/assert.inc
+
+--let $certification_db_size= query_get_value(SELECT Count_Transactions_rows_validating from performance_schema.replication_group_member_stats, Count_Transactions_rows_validating, 1)
+--let $assert_text= The value of Count_Transactions_rows_validating should be 0
+--let $assert_cond= "$certification_db_size" = 0
+--source include/assert.inc
+
+--let $stable_set= query_get_value(SELECT Transactions_Committed_all_members from performance_schema.replication_group_member_stats, Transactions_Committed_all_members, 1)
+--let $assert_text= The value of Transactions_Committed_all_members should be 0
+--let $assert_cond= "$stable_set" = 0
+--source include/assert.inc
+
+--let $last_certified_transaction= query_get_value(SELECT Last_conflict_free_transaction from performance_schema.replication_group_member_stats, Last_conflict_free_transaction, 1)
+--let $assert_text= The value of Last_conflict_free_transaction should not be present
+--let $assert_cond= "$last_certified_transaction" = "No such row"
+--source include/assert.inc
diff --git a/mysql-test/suite/perfschema/t/rpl_group_members.test b/mysql-test/suite/perfschema/t/rpl_group_members.test
new file mode 100644
index 00000000000..e5dfde747f1
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/rpl_group_members.test
@@ -0,0 +1,33 @@
+# WL#6841 - GCS Replication: P_S table to show GCS kernel stats
+#
+# This test proofs the existence of the replication_connection_status table
+# and all its fields. Since the table only returns values if the plugin is
+# loaded, all queries will return "No such row" or "0"
+#
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+--let $channel_name= query_get_value(SELECT Channel_Name from performance_schema.replication_group_members, Channel_Name, 1)
+--let $assert_text= The value of channel name should be empty
+--let $assert_cond= "$channel_name" = "No such row"
+--source include/assert.inc
+
+--let $member_id= query_get_value(SELECT Member_Id from performance_schema.replication_group_members, Member_Id, 1)
+--let $assert_text= The value of member_id should be empty
+--let $assert_cond= "$member_id" = "No such row"
+--source include/assert.inc
+
+--let $member_host= query_get_value(SELECT Member_Host from performance_schema.replication_group_members, Member_Host, 1)
+--let $assert_text= The value of member_host should be empty
+--let $assert_cond= "$member_host" = "No such row"
+--source include/assert.inc
+
+--let $member_port= query_get_value(SELECT Member_Port from performance_schema.replication_group_members, Member_Port, 1)
+--let $assert_text= The value of member_port should be empty
+--let $assert_cond= "$member_port" = "No such row"
+--source include/assert.inc
+
+--let $member_state= query_get_value(SELECT Member_State from performance_schema.replication_group_members, Member_State, 1)
+--let $assert_text= The value of member_state should be empty
+--let $assert_cond= "$member_state" = "No such row"
+--source include/assert.inc
diff --git a/mysql-test/suite/perfschema/t/rpl_gtid_func.test b/mysql-test/suite/perfschema/t/rpl_gtid_func.test
index 048dbca0576..ffa58b27d4b 100644
--- a/mysql-test/suite/perfschema/t/rpl_gtid_func.test
+++ b/mysql-test/suite/perfschema/t/rpl_gtid_func.test
@@ -32,7 +32,7 @@ update performance_schema.setup_instruments
connection master;
select * from performance_schema.setup_instruments
- where timed='NO';
+ where timed='NO' and name not like "memory/%";
select "This better be in the master" as in_master_digest;
diff --git a/mysql-test/suite/perfschema/t/rpl_statements.test b/mysql-test/suite/perfschema/t/rpl_statements.test
index a4604e7904c..c97cd61941c 100644
--- a/mysql-test/suite/perfschema/t/rpl_statements.test
+++ b/mysql-test/suite/perfschema/t/rpl_statements.test
@@ -49,18 +49,18 @@ let $column_list=
# Define instrument name for enable/disable instruments
let $pfs_instrument='%statement/%';
---echo
+--echo #
--echo #
--echo # STEP 1 - CREATE AND REPLICATE TEST TABLES
--echo #
connection master;
---echo
---echo *** Create test tables
---echo
+--echo #
+--echo # *** Create test tables
+--echo #
-show variables like 'binlog_format%';
+show global variables like 'binlog_format%';
--disable_warnings
drop table if exists test.marker;
@@ -72,26 +72,26 @@ create table test.marker(s1 int) engine=innodb;
sync_slave_with_master;
---echo
---echo *** Clear statement events
+--echo #
+--echo # *** Clear statement events
--source ../include/rpl_statements_truncate.inc
---echo
+--echo #
--echo #
--echo # STEP 2 - REPLICATE ONE ROW ON MASTER TO GET REPLICATION THREAD ID ON SLAVE
--echo #
connection master;
---echo
+--echo #
insert into test.marker values (0);
---echo
+--echo #
sync_slave_with_master;
---echo
---echo *** Verify row, get replication thread id, clear statement events
---echo
+--echo #
+--echo # *** Verify row, get replication thread id, clear statement events
+--echo #
# TODO: Get slave thread id from threads using thread/sql/slave_sql event name
@@ -99,82 +99,82 @@ select thread_id into @slave_thread_id from performance_schema.events_statements
where sql_text like '%marker%';
let $slave_thread_id= `select @slave_thread_id`;
---echo *** Verify row inserted on master was replicated
+--echo # *** Verify row inserted on master was replicated
select count(*) = 1 as 'Expect 1' from test.marker;
---echo *** Clear statement events
+--echo # *** Clear statement events
--source ../include/rpl_statements_truncate.inc
---echo
+--echo #
--echo #
--echo # STEP 3 - PERFORM DML STATEMENTS ON MASTER
--echo #
connection master;
---echo
-show variables like 'binlog_format%';
+--echo #
+show global variables like 'binlog_format%';
---echo *** Clear statement events
+--echo # *** Clear statement events
--source ../include/rpl_statements_truncate.inc
---echo
---echo *** Create/drop table, create/drop database
---echo
+--echo #
+--echo # *** Create/drop table, create/drop database
+--echo #
create database marker1_db;
create database marker2_db;
create table marker1_db.table1 (s1 int) engine=innodb;
create table marker2_db.table1 (s1 int) engine=innodb;
create table marker2_db.table2 (s1 int) engine=innodb;
---echo
---echo *** Transaction
+--echo #
+--echo # *** Transaction
start transaction;
insert into marker1_db.table1 values (1), (2), (3);
insert into marker2_db.table1 values (1), (2), (3);
commit;
---echo
---echo *** Alter
+--echo #
+--echo # *** Alter
alter table marker1_db.table1 add column (s2 varchar(32));
---echo
---echo *** Insert, Update
+--echo #
+--echo # *** Insert, Update
start transaction;
insert into marker1_db.table1 values (4, 'four'), (5, 'five'), (6, 'six');
update marker1_db.table1 set s1 = s1 + 1;
commit;
---echo
---echo *** Rollback
+--echo #
+--echo # *** Rollback
start transaction;
insert into marker1_db.table1 values (7, 'seven'), (8, 'eight'), (9, 'nine');
rollback;
---echo
---echo *** Autocommit, Delete, Drop
+--echo #
+--echo # *** Autocommit, Delete, Drop
delete from marker1_db.table1 where s1 > 4;
drop table marker2_db.table1;
drop database marker2_db;
--source ../include/disable_instruments.inc
---echo
---echo *** Examine statements events that will be compared on the slave
---echo
+--echo #
+--echo # *** Examine statements events that will be compared on the slave
+--echo #
--replace_column 1 [THREAD_ID] 2 [EVENT_ID]
eval select $column_list from performance_schema.events_statements_history_long
where sql_text like '%marker%' order by event_id;
---echo
+--echo #
--echo #
--echo # STEP 4 - REPLICATE STATEMENT EVENTS ON MASTER TO SLAVE
--echo #
---echo
---echo *** Store statement events in holding table, then replicate
---echo
+--echo #
+--echo # *** Store statement events in holding table, then replicate
+--echo #
--source ../include/disable_instruments.inc
@@ -189,7 +189,7 @@ create table test.master_events_statements_history_long as
--source ../include/enable_instruments.inc
---echo
+--echo #
--echo #
--echo # STEP 5 - VERIFY DML AND DDL STATEMENT EVENTS ON SLAVE
--echo #
@@ -198,24 +198,24 @@ sync_slave_with_master;
--source ../include/disable_instruments.inc
---echo
---echo *** List statement events from master
---echo
+--echo #
+--echo # *** List statement events from master
+--echo #
--replace_column 1 [THREAD_ID] 2 [EVENT_ID]
eval select $column_list from master_events_statements_history_long order by event_id;
---echo
---echo *** List statement events on slave
---echo
+--echo #
+--echo # *** List statement events on slave
+--echo #
--replace_column 1 [THREAD_ID] 2 [EVENT_ID]
eval select $column_list from performance_schema.events_statements_history_long
where thread_id = @slave_thread_id and sql_text like '%marker%' order by event_id;
---echo
---echo *** Compare master and slave events
---echo
+--echo #
+--echo # *** Compare master and slave events
+--echo #
# Note: The statement digest provides a more robust comparison than the
# event name. However, in some cases, e.g. DROP TABLE, the server generates
@@ -224,7 +224,7 @@ eval select $column_list from performance_schema.events_statements_history_long
# statements, so we use both methods to ensure coverage.
--echo
---echo *** Event name comparison - expect 0 mismatches
+--echo # *** Event name comparison - expect 0 mismatches
--echo
select thread_id, event_id, event_name, digest_text, sql_text from performance_schema.events_statements_history_long t1
@@ -233,7 +233,7 @@ select thread_id, event_id, event_name, digest_text, sql_text from performance_s
not exists (select * from master_events_statements_history_long t2 where t2.event_name = t1.event_name);
--echo
---echo *** Statement digest comparison - expect 1 mismatch for DROP TABLE
+--echo # *** Statement digest comparison - expect 1 mismatch for DROP TABLE
--echo
--replace_column 1 [THREAD_ID] 2 [EVENT_ID] 4 [DIGEST]
@@ -243,7 +243,7 @@ select thread_id, event_id, event_name, digest, digest_text, sql_text from perfo
sql_text like '%marker%' and
not exists (select * from master_events_statements_history_long t2 where t2.digest = t1.digest);
---echo
+--echo #
--echo #
--echo # STEP 6 - DISABLE REPLICATED STATEMENT EVENTS ON SLAVE
--echo #
@@ -255,49 +255,49 @@ update performance_schema.setup_instruments set enabled='no', timed='no'
select * from performance_schema.setup_instruments where name like '%statement/abstract/relay_log%';
---echo
+--echo #
--echo #
--echo # STEP 7 - UPDATE TABLES ON MASTER, REPLICATE
--echo #
connection master;
---echo
---echo *** Clear statement events
+--echo #
+--echo # *** Clear statement events
--source ../include/rpl_statements_truncate.inc
---echo *** Update some tables, then replicate
---echo
+--echo # *** Update some tables, then replicate
+--echo #
insert into marker1_db.table1 values (999, '999'), (998, '998'), (997, '997');
---echo
+--echo #
--echo #
--echo # STEP 8 - VERIFY TABLE UPDATES FROM MASTER, EXPECT NO STATEMENT EVENTS ON SLAVE
--echo #
sync_slave_with_master;
---echo
---echo *** Confirm rows were replicated
---echo
+--echo #
+--echo # *** Confirm rows were replicated
+--echo #
select * from marker1_db.table1 where s1 > 900 order by s1;
---echo
---echo *** Confirm that are no statements events from the replication thread
---echo
+--echo #
+--echo # *** Confirm that are no statements events from the replication thread
+--echo #
select * from performance_schema.events_statements_history_long
where thread_id = @slave_thread_id;
--source ../include/enable_instruments.inc
---echo
+--echo #
--echo #
--echo # STEP 9 - CLEAN UP
--echo #
---echo
+--echo #
--disable_query_log
--disable_warnings
diff --git a/mysql-test/suite/perfschema/t/rpl_threads.test b/mysql-test/suite/perfschema/t/rpl_threads.test
new file mode 100644
index 00000000000..984939c21f8
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/rpl_threads.test
@@ -0,0 +1,79 @@
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/have_log_bin.inc
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+--source include/master-slave.inc
+
+--disable_warnings
+drop table if exists test.t1;
+--sync_slave_with_master
+reset master;
+--enable_warnings
+
+create table test.t1(a int);
+drop table test.t1;
+
+--source include/show_binlog_events.inc
+
+# Notes
+#
+# The point of this test is to make sure code is properly instrumented,
+# for replication threads.
+# Each time an ID is assigned to a replication thread,
+# visible in the INFORMATION_SCHEMA.PROCESSLIST table,
+# the same PROCESSLIST_ID should be visible in table performance_schema.threads
+
+connection master;
+-- echo "============ Performance schema on master ============"
+
+# Read the ID of the binlog dump connection,
+# as exposed in PROCESSLIST.
+select ID from INFORMATION_SCHEMA.PROCESSLIST
+ where COMMAND = "Binlog Dump"
+ into @master_dump_pid;
+
+select COMMAND, STATE
+ from INFORMATION_SCHEMA.PROCESSLIST
+ where ID = @master_dump_pid;
+
+# Make sure the performance schema also knows this PROCESSLIST_ID
+select NAME, TYPE, PROCESSLIST_COMMAND, PROCESSLIST_STATE
+ from performance_schema.threads
+ where PROCESSLIST_ID = @master_dump_pid;
+
+sync_slave_with_master;
+-- echo "============ Performance schema on slave ============"
+
+# Read the ID of the SLAVE IO thread,
+# as exposed in PROCESSLIST.
+select ID from INFORMATION_SCHEMA.PROCESSLIST
+ where STATE like "Waiting for master to send event%"
+ into @slave_io_pid;
+
+select COMMAND, STATE
+ from INFORMATION_SCHEMA.PROCESSLIST
+ where ID = @slave_io_pid;
+
+# Make sure the performance schema also knows this PROCESSLIST_ID
+select NAME, TYPE, PROCESSLIST_COMMAND, PROCESSLIST_STATE
+ from performance_schema.threads
+ where PROCESSLIST_ID = @slave_io_pid;
+
+# Read the ID of the SLAVE SQL thread,
+# as exposed in PROCESSLIST.
+select ID from INFORMATION_SCHEMA.PROCESSLIST
+ where STATE like "Slave has read all relay log%"
+ into @slave_sql_pid;
+
+select COMMAND, STATE
+ from INFORMATION_SCHEMA.PROCESSLIST
+ where ID = @slave_sql_pid;
+
+# Make sure the performance schema also knows this PROCESSLIST_ID
+select NAME, TYPE, PROCESSLIST_COMMAND, PROCESSLIST_STATE
+ from performance_schema.threads
+ where PROCESSLIST_ID = @slave_sql_pid;
+
+--source include/rpl_end.inc
+
diff --git a/mysql-test/suite/perfschema/t/server_init.test b/mysql-test/suite/perfschema/t/server_init.test
index 36e09adea78..ae4f7ac945b 100644
--- a/mysql-test/suite/perfschema/t/server_init.test
+++ b/mysql-test/suite/perfschema/t/server_init.test
@@ -14,9 +14,6 @@ use performance_schema;
# Verify that these global mutexes have been properly initilized in mysys
select count(name) from mutex_instances
- where name like "wait/synch/mutex/mysys/THR_LOCK_threads";
-
-select count(name) from mutex_instances
where name like "wait/synch/mutex/mysys/THR_LOCK_malloc";
select count(name) from mutex_instances
@@ -36,10 +33,8 @@ select count(name) from mutex_instances
# There are no global rwlock in mysys
-# Verify that these global conditions have been properly initilized in mysys
-
-select count(name) from cond_instances
- where name like "wait/synch/cond/mysys/THR_COND_threads";
+# There are no global conditions in mysys
+# (THR_COND_threads is only present in debug builds
# Verify that these global mutexes have been properly initilized in sql
@@ -53,21 +48,9 @@ select count(name) from mutex_instances
where name like "wait/synch/mutex/sql/LOCK_status";
select count(name) from mutex_instances
- where name like "wait/synch/mutex/sql/LOCK_error_log";
-
-select count(name) from mutex_instances
- where name like "wait/synch/mutex/sql/LOCK_delayed_insert";
-
-select count(name) from mutex_instances
where name like "wait/synch/mutex/sql/LOCK_uuid_generator";
select count(name) from mutex_instances
- where name like "wait/synch/mutex/sql/LOCK_delayed_status";
-
-select count(name) from mutex_instances
- where name like "wait/synch/mutex/sql/LOCK_delayed_create";
-
-select count(name) from mutex_instances
where name like "wait/synch/mutex/sql/LOCK_crypt";
select count(name) from mutex_instances
@@ -86,9 +69,6 @@ select count(name) from mutex_instances
where name like "wait/synch/mutex/sql/LOCK_prepared_stmt_count";
select count(name) from mutex_instances
- where name like "wait/synch/mutex/sql/LOCK_connection_count";
-
-select count(name) from mutex_instances
where name like "wait/synch/mutex/sql/LOCK_server_started";
# LOG_INFO object are created on demand, and are not global.
@@ -106,10 +86,7 @@ select count(name) from mutex_instances
where name like "wait/synch/mutex/sql/LOCK_event_queue";
select count(name) from mutex_instances
- where name like "wait/synch/mutex/sql/LOCK_user_locks";
-
-select count(name) from mutex_instances
- where name like "wait/synch/mutex/sql/Cversion_lock";
+ where name like "wait/synch/mutex/sql/LOCK_item_func_sleep";
select count(name) from mutex_instances
where name like "wait/synch/mutex/sql/LOCK_audit_mask";
@@ -127,9 +104,6 @@ select count(name) from mutex_instances
# Verify that these global rwlocks have been properly initilized in sql
select count(name) from rwlock_instances
- where name like "wait/synch/rwlock/sql/LOCK_grant";
-
-select count(name) from rwlock_instances
where name like "wait/synch/rwlock/sql/LOCK_sys_init_connect";
select count(name) from rwlock_instances
diff --git a/mysql-test/suite/perfschema/t/setup_actors.test b/mysql-test/suite/perfschema/t/setup_actors.test
index 1d4a86b6517..9e9e0a4eb80 100644
--- a/mysql-test/suite/perfschema/t/setup_actors.test
+++ b/mysql-test/suite/perfschema/t/setup_actors.test
@@ -9,26 +9,26 @@
# The initial number of rows is 1. The initial row always looks like this:
# mysql> select * from performance_schema.setup_actors;
-# +------+------+------+
-# | Host | User | ROLE |
-# +------+------+------+
-# | % | % | % |
-# +------+------+------+
+# +------+------+------+---------+---------+
+# | HOST | USER | ROLE | ENABLED | HISTORY |
+# +------+------+------+---------+---------+
+# | % | % | % | YES | YES |
+# +------+------+------+---------+---------+
select * from performance_schema.setup_actors;
truncate table performance_schema.setup_actors;
insert into performance_schema.setup_actors
-values ('hosta', 'user1', '%');
+values ('hosta', 'user1', '%', 'YES', 'YES');
insert into performance_schema.setup_actors
-values ('%', 'user2', '%');
+values ('%', 'user2', '%', 'YES', 'YES');
insert into performance_schema.setup_actors
-values ('localhost', 'user3', '%');
+values ('localhost', 'user3', '%', 'YES', 'YES');
insert into performance_schema.setup_actors
-values ('hostb', '%', '%');
+values ('hostb', '%', '%', 'YES', 'YES');
select * from performance_schema.setup_actors
order by USER, HOST, ROLE;
@@ -57,7 +57,7 @@ let $con1_thread_id= `select THREAD_ID from performance_schema.threads
--connection default
insert into performance_schema.setup_actors
-values ('%', 'user1', '%');
+values ('%', 'user1', '%', 'YES', 'YES');
--connection con1
# INSTRUMENTED must be NO because there was no match in performance_schema.setup_actors
@@ -165,7 +165,7 @@ where PROCESSLIST_ID = connection_id();
--connection default
insert into performance_schema.setup_actors
-values ('localhost', '%', '%');
+values ('localhost', '%', '%', 'YES', 'YES');
select * from performance_schema.setup_actors
order by USER, HOST, ROLE;
@@ -182,7 +182,7 @@ where PROCESSLIST_ID = connection_id();
--connection default
insert into performance_schema.setup_actors
-values ('%', 'user5', '%');
+values ('%', 'user5', '%', 'YES', 'YES');
create sql security definer view test.v1 as select NAME, TYPE, INSTRUMENTED, PROCESSLIST_USER, PROCESSLIST_HOST
from performance_schema.threads
@@ -224,7 +224,7 @@ flush privileges;
truncate table performance_schema.setup_actors;
insert into performance_schema.setup_actors
-values ('%', '%', '%');
+values ('%', '%', '%', 'YES', 'YES');
select * from performance_schema.setup_actors;
diff --git a/mysql-test/suite/perfschema/t/setup_actors_enabled.test b/mysql-test/suite/perfschema/t/setup_actors_enabled.test
new file mode 100644
index 00000000000..959c4d9cb80
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/setup_actors_enabled.test
@@ -0,0 +1,219 @@
+# Check the impact of changes done in ENABLED column in
+# performance_schema.setup_actors.
+
+--source include/not_windows.inc
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+# The initial number of rows is 1. The initial row always looks like this:
+# mysql> select * from performance_schema.setup_actors;
+# +------+------+------+---------+---------+
+# | HOST | USER | ROLE | ENABLED | HISTORY |
+# +------+------+------+---------+---------+
+# | % | % | % | YES | YES |
+# +------+------+------+---------+---------+
+select * from performance_schema.setup_actors;
+
+truncate table performance_schema.setup_actors;
+
+insert into performance_schema.setup_actors
+values ('localhost', 'user1', '%', 'YES', 'YES');
+
+insert into performance_schema.setup_actors
+values ('localhost', 'user2', '%', 'NO', 'NO');
+
+set @orig_sql_mode= @@sql_mode;
+set sql_mode= (select replace(@@sql_mode,'NO_AUTO_CREATE_USER',''));
+grant ALL on *.* to user1@localhost;
+grant ALL on *.* to user2@localhost;
+set sql_mode= @orig_sql_mode;
+
+flush privileges;
+
+--echo # Switch to (con1, localhost, user1, , )
+connect (con1, localhost, user1, , );
+
+# INSTRUMENTED must be YES because there is a match in
+# performance_schema.setup_actors and its ENABLED
+select NAME, TYPE, INSTRUMENTED, PROCESSLIST_USER, PROCESSLIST_HOST
+from performance_schema.threads
+where PROCESSLIST_ID = connection_id();
+let $con1_thread_id= `select THREAD_ID from performance_schema.threads
+ where PROCESSLIST_ID = connection_id()`;
+
+--echo # Switch to (con2, localhost, user2, , )
+connect (con2, localhost, user2, , );
+
+# INSTRUMENTED must be NO because there is a match in
+# performance_schema.setup_actors but its DISABLED.
+select NAME, TYPE, INSTRUMENTED, PROCESSLIST_USER, PROCESSLIST_HOST
+from performance_schema.threads
+where PROCESSLIST_ID = connection_id();
+let $con1_thread_id= `select THREAD_ID from performance_schema.threads
+ where PROCESSLIST_ID = connection_id()`;
+
+--echo # Switch to connection default
+--connection default
+update performance_schema.setup_actors set ENABLED='NO' where USER='user1';
+update performance_schema.setup_actors set ENABLED='YES' where USER='user2';
+
+--echo # Switch to connection con1
+--connection con1
+
+# INSTRUMENTED must still be YES because update to setup_actors doesn't affect
+# existing connetions.
+select NAME, TYPE, INSTRUMENTED, PROCESSLIST_USER, PROCESSLIST_HOST
+from performance_schema.threads
+where PROCESSLIST_ID = connection_id();
+let $con1_thread_id= `select THREAD_ID from performance_schema.threads
+ where PROCESSLIST_ID = connection_id()`;
+
+--echo # Switch to connection con2
+--connection con2
+
+# INSTRUMENTED must still be NO because update to setup_actors doesn't affect
+# existing connetions.
+select NAME, TYPE, INSTRUMENTED, PROCESSLIST_USER, PROCESSLIST_HOST
+from performance_schema.threads
+where PROCESSLIST_ID = connection_id();
+let $con1_thread_id= `select THREAD_ID from performance_schema.threads
+ where PROCESSLIST_ID = connection_id()`;
+
+--echo # Disconnect con1 and con2
+--disconnect con1
+--disconnect con2
+
+# Now reconnect
+--echo # Switch to (con1, localhost, user1, , )
+connect (con1, localhost, user1, , );
+
+# INSTRUMENTED must still be NO because update to setup_actors affects
+# new connetions.
+select NAME, TYPE, INSTRUMENTED, PROCESSLIST_USER, PROCESSLIST_HOST
+from performance_schema.threads
+where PROCESSLIST_ID = connection_id();
+let $con1_thread_id= `select THREAD_ID from performance_schema.threads
+ where PROCESSLIST_ID = connection_id()`;
+
+--echo # Switch to (con2 localhost, user2, , )
+connect (con2, localhost, user2, , );
+
+# INSTRUMENTED must still be YES because update to setup_actors affects
+# new connetions.
+select NAME, TYPE, INSTRUMENTED, PROCESSLIST_USER, PROCESSLIST_HOST
+from performance_schema.threads
+where PROCESSLIST_ID = connection_id();
+let $con1_thread_id= `select THREAD_ID from performance_schema.threads
+ where PROCESSLIST_ID = connection_id()`;
+
+--echo # Disconnect con1 and con2
+--disconnect con1
+--disconnect con2
+
+--echo # Switch to connection default
+--connection default
+
+# Checking if update is allowed on performance_schema.setup_actors ENABLED
+# column after revoke update privilege
+
+revoke update on *.* from 'user2'@'localhost';
+
+flush privileges;
+
+--echo # Switch to (con2 localhost, user2, , )
+connect (con2, localhost, user2, , );
+--error ER_TABLEACCESS_DENIED_ERROR
+update performance_schema.setup_actors
+ set ENABLED='NO';
+
+--disconnect con2
+--connection default
+
+# Checking for Rules Order
+# 1. a match for 'U1' and 'H1'.
+# 2. then for 'U1' and '%'.
+# 3. then for '%' and 'H1'.
+# 4. then for '%' and '%'.
+
+insert into performance_schema.setup_actors
+values ('%', 'user1', '%', 'YES', 'YES');
+
+
+insert into performance_schema.setup_actors
+values ('localhost', '%', '%', 'NO', 'NO');
+
+insert into performance_schema.setup_actors
+values ('%', '%', '%', 'YES', 'YES');
+
+
+--echo # Switch to (con1, localhost, user1, , )
+connect (con1, localhost, user1, , );
+
+# INSTRUMENTED must still be NO as it will match rule1
+# new connetions.
+select NAME, TYPE, INSTRUMENTED, PROCESSLIST_USER, PROCESSLIST_HOST
+from performance_schema.threads
+where PROCESSLIST_ID = connection_id();
+
+--disconnect con1
+--connection default
+
+delete from performance_schema.setup_actors where
+HOST='localhost' and USER='user1';
+
+--echo # Switch to (con1, localhost, user1, , )
+connect (con1, localhost, user1, , );
+
+# INSTRUMENTED must still be YES as it will match rule2
+# new connetions.
+select NAME, TYPE, INSTRUMENTED, PROCESSLIST_USER, PROCESSLIST_HOST
+from performance_schema.threads
+where PROCESSLIST_ID = connection_id();
+
+
+--disconnect con1
+--connection default
+
+delete from performance_schema.setup_actors where
+HOST='%' and USER='user1';
+
+--echo # Switch to (con1, localhost, user1, , )
+connect (con1, localhost, user1, , );
+
+# INSTRUMENTED must still be NO as it will match rule3
+# new connetions.
+select NAME, TYPE, INSTRUMENTED, PROCESSLIST_USER, PROCESSLIST_HOST
+from performance_schema.threads
+where PROCESSLIST_ID = connection_id();
+
+--disconnect con1
+--connection default
+
+delete from performance_schema.setup_actors where
+HOST='localhost' and USER='%';
+
+--echo # Switch to (con1, localhost, user1, , )
+connect (con1, localhost, user1, , );
+
+# INSTRUMENTED must still be YES as it will match rule4
+# new connetions.
+select NAME, TYPE, INSTRUMENTED, PROCESSLIST_USER, PROCESSLIST_HOST
+from performance_schema.threads
+where PROCESSLIST_ID = connection_id();
+
+--disconnect con1
+--connection default
+
+revoke all privileges, grant option from user1@localhost;
+revoke all privileges, grant option from user2@localhost;
+drop user user1@localhost;
+drop user user2@localhost;
+flush privileges;
+
+truncate table performance_schema.setup_actors;
+
+insert into performance_schema.setup_actors
+values ('%', '%', '%', 'YES', 'YES');
+
+select * from performance_schema.setup_actors;
+
diff --git a/mysql-test/suite/perfschema/t/setup_actors_history.test b/mysql-test/suite/perfschema/t/setup_actors_history.test
new file mode 100644
index 00000000000..ecb3324a3c5
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/setup_actors_history.test
@@ -0,0 +1,177 @@
+# Check the impact of changes done in HISTORY column in
+# performance_schema.setup_actors.
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+# The initial number of rows is 1. The initial row always looks like this:
+# mysql> select * from performance_schema.setup_actors;
+# +------+------+------+---------+---------+
+# | HOST | USER | ROLE | ENABLED | HISTORY |
+# +------+------+------+---------+---------+
+# | % | % | % | YES | YES |
+# +------+------+------+---------+---------+
+select * from performance_schema.setup_actors;
+
+truncate table performance_schema.setup_actors;
+
+insert into performance_schema.setup_actors
+values ('localhost', 'user1', '%', 'YES', 'YES');
+
+insert into performance_schema.setup_actors
+values ('localhost', 'user2', '%', 'YES', 'NO');
+
+insert into performance_schema.setup_actors
+values ('localhost', 'user3', '%', 'NO', 'YES');
+
+insert into performance_schema.setup_actors
+values ('localhost', 'user4', '%', 'NO', 'NO');
+
+create user user1@localhost;
+create user user2@localhost;
+create user user3@localhost;
+create user user4@localhost;
+
+grant ALL on *.* to user1@localhost;
+grant ALL on *.* to user2@localhost;
+grant ALL on *.* to user3@localhost;
+grant ALL on *.* to user4@localhost;
+
+flush privileges;
+
+--echo # Switch to (con1, localhost, user1, , )
+connect (con1, localhost, user1, , );
+
+# Expecting INSTRUMENTED=YES, HISTORY=YES
+select NAME, TYPE, INSTRUMENTED, HISTORY, PROCESSLIST_USER, PROCESSLIST_HOST
+from performance_schema.threads
+where PROCESSLIST_ID = connection_id();
+
+--echo # Switch to (con2, localhost, user2, , )
+connect (con2, localhost, user2, , );
+
+# Expecting INSTRUMENTED=YES, HISTORY=NO
+select NAME, TYPE, INSTRUMENTED, HISTORY, PROCESSLIST_USER, PROCESSLIST_HOST
+from performance_schema.threads
+where PROCESSLIST_ID = connection_id();
+
+--echo # Switch to (con3, localhost, user3, , )
+connect (con3, localhost, user3, , );
+
+# Expecting INSTRUMENTED=NO, HISTORY=YES
+select NAME, TYPE, INSTRUMENTED, HISTORY, PROCESSLIST_USER, PROCESSLIST_HOST
+from performance_schema.threads
+where PROCESSLIST_ID = connection_id();
+
+--echo # Switch to (con4, localhost, user4, , )
+connect (con4, localhost, user4, , );
+
+# Expecting INSTRUMENTED=NO, HISTORY=NO
+select NAME, TYPE, INSTRUMENTED, HISTORY, PROCESSLIST_USER, PROCESSLIST_HOST
+from performance_schema.threads
+where PROCESSLIST_ID = connection_id();
+
+--echo # Switch to connection default
+--connection default
+update performance_schema.setup_actors
+ set HISTORY='NO' where USER in ('user1', 'user3');
+update performance_schema.setup_actors
+ set HISTORY='YES' where USER in ('user2', 'user4');
+
+--echo # Switch to connection con1
+--connection con1
+
+# Expecting INSTRUMENTED=YES, HISTORY=YES
+select NAME, TYPE, INSTRUMENTED, HISTORY, PROCESSLIST_USER, PROCESSLIST_HOST
+from performance_schema.threads
+where PROCESSLIST_ID = connection_id();
+
+--echo # Switch to connection con2
+--connection con2
+
+# Expecting INSTRUMENTED=YES, HISTORY=NO
+select NAME, TYPE, INSTRUMENTED, HISTORY, PROCESSLIST_USER, PROCESSLIST_HOST
+from performance_schema.threads
+where PROCESSLIST_ID = connection_id();
+
+--echo # Switch to connection con3
+--connection con3
+
+# Expecting INSTRUMENTED=NO, HISTORY=YES
+select NAME, TYPE, INSTRUMENTED, HISTORY, PROCESSLIST_USER, PROCESSLIST_HOST
+from performance_schema.threads
+where PROCESSLIST_ID = connection_id();
+
+--echo # Switch to connection con4
+--connection con4
+
+# Expecting INSTRUMENTED=NO, HISTORY=NO
+select NAME, TYPE, INSTRUMENTED, HISTORY, PROCESSLIST_USER, PROCESSLIST_HOST
+from performance_schema.threads
+where PROCESSLIST_ID = connection_id();
+
+--echo # Disconnect all con
+--disconnect con1
+--disconnect con2
+--disconnect con3
+--disconnect con4
+
+# Now reconnect
+--echo # Switch to (con1, localhost, user1, , )
+connect (con1, localhost, user1, , );
+
+# Expecting INSTRUMENTED=YES, HISTORY=NO
+select NAME, TYPE, INSTRUMENTED, HISTORY, PROCESSLIST_USER, PROCESSLIST_HOST
+from performance_schema.threads
+where PROCESSLIST_ID = connection_id();
+
+--echo # Switch to (con2 localhost, user2, , )
+connect (con2, localhost, user2, , );
+
+# Expecting INSTRUMENTED=YES, HISTORY=YES
+select NAME, TYPE, INSTRUMENTED, HISTORY, PROCESSLIST_USER, PROCESSLIST_HOST
+from performance_schema.threads
+where PROCESSLIST_ID = connection_id();
+
+--echo # Switch to (con3, localhost, user3, , )
+connect (con3, localhost, user3, , );
+
+# Expecting INSTRUMENTED=NO, HISTORY=NO
+select NAME, TYPE, INSTRUMENTED, HISTORY, PROCESSLIST_USER, PROCESSLIST_HOST
+from performance_schema.threads
+where PROCESSLIST_ID = connection_id();
+
+--echo # Switch to (con4 localhost, user4, , )
+connect (con4, localhost, user4, , );
+
+# Expecting INSTRUMENTED=NO, HISTORY=YES
+select NAME, TYPE, INSTRUMENTED, HISTORY, PROCESSLIST_USER, PROCESSLIST_HOST
+from performance_schema.threads
+where PROCESSLIST_ID = connection_id();
+
+--echo # Disconnect all con
+--disconnect con1
+--disconnect con2
+--disconnect con3
+--disconnect con4
+
+--echo # Switch to connection default
+--connection default
+
+revoke all privileges, grant option from user1@localhost;
+revoke all privileges, grant option from user2@localhost;
+revoke all privileges, grant option from user3@localhost;
+revoke all privileges, grant option from user4@localhost;
+drop user user1@localhost;
+drop user user2@localhost;
+drop user user3@localhost;
+drop user user4@localhost;
+flush privileges;
+
+truncate table performance_schema.setup_actors;
+
+insert into performance_schema.setup_actors
+values ('%', '%', '%', 'YES', 'YES');
+
+select * from performance_schema.setup_actors;
+
diff --git a/mysql-test/suite/perfschema/t/setup_consumers_defaults-master.opt b/mysql-test/suite/perfschema/t/setup_consumers_defaults-master.opt
index bc05fa8d5bc..db53957b031 100644
--- a/mysql-test/suite/perfschema/t/setup_consumers_defaults-master.opt
+++ b/mysql-test/suite/perfschema/t/setup_consumers_defaults-master.opt
@@ -1,11 +1,18 @@
--loose-performance-schema-consumer-events-stages-current=OFF
--loose-performance-schema-consumer-events-stages-history=ON
--loose-performance-schema-consumer-events-stages-history-long=OFF
+
--loose-performance-schema-consumer-events-statements-current=ON
--loose-performance-schema-consumer-events-statements-history=OFF
--loose-performance-schema-consumer-events-statements-history-long=ON
+
+--loose-performance-schema-consumer-events-transactions-current=ON
+--loose-performance-schema-consumer-events-transactions-history=OFF
+--loose-performance-schema-consumer-events-transactions-history-long=ON
+
--loose-performance-schema-consumer-events-waits-current=OFF
--loose-performance-schema-consumer-events-waits-history=ON
--loose-performance-schema-consumer-events-waits-history-long=OFF
+
--loose-performance-schema-consumer-global-instrumentation=ON
--loose-performance-schema-consumer-thread-instrumentation=ON
diff --git a/mysql-test/suite/perfschema/t/setup_consumers_defaults.test b/mysql-test/suite/perfschema/t/setup_consumers_defaults.test
index e845e577fb7..d8aa52a1796 100644
--- a/mysql-test/suite/perfschema/t/setup_consumers_defaults.test
+++ b/mysql-test/suite/perfschema/t/setup_consumers_defaults.test
@@ -15,4 +15,4 @@ SELECT @@performance_schema_consumer_events_stages_current;
--error ER_UNKNOWN_SYSTEM_VARIABLE
SET @@performance_schema_consumer_events_stages_current=0;
-SHOW VARIABLES LIKE "performance_schema_consumer%";
+SHOW GLOBAL VARIABLES LIKE "performance_schema_consumer%";
diff --git a/mysql-test/suite/perfschema/t/setup_instruments_defaults-master.opt b/mysql-test/suite/perfschema/t/setup_instruments_defaults-master.opt
index ed6702ed5ef..dd2aa078cc4 100644
--- a/mysql-test/suite/perfschema/t/setup_instruments_defaults-master.opt
+++ b/mysql-test/suite/perfschema/t/setup_instruments_defaults-master.opt
@@ -9,7 +9,7 @@
--loose-performance-schema-instrument=' wait/synch/mutex/sql/% = OFF '
--loose-performance-schema-instrument='wait/synch/mutex/sql/% = OFF '
--loose-performance-schema-instrument='wait/synch/mutex/sql/LOCK% = ON'
---loose-performance-schema-instrument='wait/synch/mutex/sql/LOCK_thread_count=OFF'
+--loose-performance-schema-instrument='wait/synch/mutex/sql/LOCK_thd_count=OFF'
--loose-performance-schema-instrument=' wait/synch/mutex/sql/LOCK_user_conn = COUNTED'
--loose-performance-schema-instrument='wait%/synch/mutex/sql/LOCK_uu%_genera%/= COUNTED'
--loose-performance-schema-instrument='%%wait/synch/mutex/sql/LOCK_plugin=COUNTED'
@@ -23,7 +23,6 @@
--loose-performance-schema-instrument='wait/synch/mutex/sql/THD::LOCK_thd_data= TRUE'
--loose-performance-schema-instrument='wait/synch/mutex/sql/hash_filo::lock =FALSE'
--loose-performance-schema-instrument='wait/synch/mutex/sql/TABLE_SHARE::LOCK_ha_data= NO'
-
-
-
+--loose-performance-schema-instrument='memory/%=ON'
+--loose-performance-schema-instrument='memory/performance_schema/%=OFF'
diff --git a/mysql-test/suite/perfschema/t/setup_instruments_defaults.test b/mysql-test/suite/perfschema/t/setup_instruments_defaults.test
index 5e0a3a5067a..ea59cd4f266 100644
--- a/mysql-test/suite/perfschema/t/setup_instruments_defaults.test
+++ b/mysql-test/suite/perfschema/t/setup_instruments_defaults.test
@@ -21,13 +21,13 @@ AND enabled = 'yes' AND timed = 'no'
ORDER BY name;
SELECT * FROM performance_schema.setup_instruments
-WHERE name = 'wait/synch/mutex/sql/LOCK_thread_count'
+WHERE name = 'wait/synch/mutex/sql/LOCK_thd_list'
AND enabled = 'no' AND timed = 'no';
SELECT * FROM performance_schema.setup_instruments
WHERE name IN (
'wait/synch/mutex/sql/LOG_INFO::lock',
- 'wait/synch/mutex/sql/THD::LOCK_thd_data')
+ 'wait/synch/mutex/sql/THD::LOCK_thd_list')
AND enabled = 'yes' AND timed = 'yes'
ORDER BY name;
@@ -37,6 +37,21 @@ AND enabled = 'no' AND timed = 'no'
ORDER BY name;
--echo #
+--echo # Verify that the memory instruments are never timed
+--echo #
+SELECT * FROM performance_schema.setup_instruments
+WHERE name like 'memory/%'
+AND timed = 'YES';
+
+--echo #
+--echo # Verify that the memory/performance_schema instruments are never disabled
+--echo #
+SELECT * FROM performance_schema.setup_instruments
+WHERE name like 'memory/performance_schema/%'
+AND enabled = 'NO';
+
+
+--echo #
--echo # Verify that the instrument startup settings are not not visible.
--echo #
SHOW VARIABLES LIKE "%/wait/synch/mutex%";
diff --git a/mysql-test/suite/perfschema/t/setup_object_table_lock_io.test b/mysql-test/suite/perfschema/t/setup_object_table_lock_io.test
new file mode 100644
index 00000000000..aaa17fa79ad
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/setup_object_table_lock_io.test
@@ -0,0 +1,107 @@
+# Test for Performance Schema.
+# To test the effect of disabling/enabling instrumentation for a table
+# in setup_objects table.
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+--disable_warnings
+drop table if exists test.setup_objects;
+--enable_warnings
+
+# Make sure only table io / table lock is instrumented and timed
+update performance_schema.setup_instruments set enabled='NO';
+update performance_schema.setup_instruments set enabled='YES', timed='YES'
+ where name in ('wait/io/table/sql/handler', 'wait/lock/table/sql/handler');
+
+# Remove noise from previous tests
+truncate table performance_schema.table_io_waits_summary_by_table;
+truncate table performance_schema.table_lock_waits_summary_by_table;
+
+# Save the setup
+create table test.setup_objects as select * from performance_schema.setup_objects;
+truncate table performance_schema.setup_objects;
+select * from performance_schema.setup_objects;
+
+insert into performance_schema.setup_objects
+ values ('TABLE', 'db1', 't1', 'YES', 'YES');
+
+insert into performance_schema.setup_objects
+ values ('TABLE', 'db1', 't2', 'YES', 'YES');
+
+select * from performance_schema.setup_objects
+ order by OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME;
+SET sql_mode = default;
+
+--disable_warnings
+drop database if exists db1;
+--enable_warnings
+
+create database db1;
+create table db1.t1 (a int, b char(10) default 'default', unique key uidx(a));
+create table db1.t2 (a int, b char(10) default 'default');
+
+# Insert some values in tables.
+insert into db1.t1 values('11', 'db1.t1');
+insert into db1.t1 values('12', 'db1.t1');
+insert into db1.t1 values('13', 'db1.t1');
+insert into db1.t2 values('21', 'db1.t2');
+insert into db1.t2 values('22', 'db1.t2');
+insert into db1.t2 values('23', 'db1.t2');
+
+# Query P_S tables. Stats should be updated.
+select OBJECT_SCHEMA, OBJECT_NAME, COUNT_STAR, COUNT_READ, COUNT_WRITE
+ from performance_schema.table_lock_waits_summary_by_table
+ where OBJECT_SCHEMA='db1';
+select OBJECT_SCHEMA, OBJECT_NAME, COUNT_STAR, COUNT_READ, COUNT_WRITE
+ from performance_schema.table_io_waits_summary_by_table
+ where OBJECT_SCHEMA='db1';
+
+truncate table db1.t1;
+truncate table db1.t2;
+
+# Query P_S tables. Stats should be updated.
+select OBJECT_SCHEMA, OBJECT_NAME, COUNT_STAR, COUNT_READ, COUNT_WRITE
+ from performance_schema.table_lock_waits_summary_by_table
+ where OBJECT_SCHEMA='db1';
+select OBJECT_SCHEMA, OBJECT_NAME, COUNT_STAR, COUNT_READ, COUNT_WRITE
+ from performance_schema.table_io_waits_summary_by_table
+ where OBJECT_SCHEMA='db1';
+
+# Disable instrumentation for db1.t1
+update performance_schema.setup_objects
+ set ENABLED='NO' where OBJECT_SCHEMA = 'db1' and OBJECT_NAME='t1';
+
+# Query P_S tables. Stats for db1.t1 should have been removed while for db1.t2 it should have been preserved.
+select OBJECT_SCHEMA, OBJECT_NAME, COUNT_STAR, COUNT_READ, COUNT_WRITE
+ from performance_schema.table_lock_waits_summary_by_table
+ where OBJECT_SCHEMA='db1';
+select OBJECT_SCHEMA, OBJECT_NAME, COUNT_STAR, COUNT_READ, COUNT_WRITE
+ from performance_schema.table_io_waits_summary_by_table
+ where OBJECT_SCHEMA='db1';
+
+# Enable instrumentation for db1.t1
+update performance_schema.setup_objects
+ set ENABLED='YES' where OBJECT_SCHEMA = 'db1' and OBJECT_NAME='t1';
+
+# Query P_S tables. Stats for db1.t1 should have been reset while for db1.t2 it should have been preserved.
+select OBJECT_SCHEMA, OBJECT_NAME, COUNT_STAR, COUNT_READ, COUNT_WRITE
+ from performance_schema.table_lock_waits_summary_by_table
+ where OBJECT_SCHEMA='db1';
+select OBJECT_SCHEMA, OBJECT_NAME, COUNT_STAR, COUNT_READ, COUNT_WRITE
+ from performance_schema.table_io_waits_summary_by_table
+ where OBJECT_SCHEMA='db1';
+
+truncate table performance_schema.setup_objects;
+
+select count(*) from performance_schema.setup_objects;
+
+drop database db1;
+
+# Restore the setup
+truncate table performance_schema.setup_objects;
+insert into performance_schema.setup_objects select * from test.setup_objects;
+drop table test.setup_objects;
+
+update performance_schema.setup_instruments set enabled='YES', timed='YES';
+
diff --git a/mysql-test/suite/perfschema/t/setup_objects.test b/mysql-test/suite/perfschema/t/setup_objects.test
index eb22953b1a6..604b35b00ca 100644
--- a/mysql-test/suite/perfschema/t/setup_objects.test
+++ b/mysql-test/suite/perfschema/t/setup_objects.test
@@ -48,8 +48,7 @@ insert into performance_schema.setup_objects
values ('TABLE', 'db4', '%', 'YES', 'NO');
# Also test insert of invalid enum values
-
-set sql_mode= '';
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
--error ER_NO_REFERENCED_ROW_2
insert into performance_schema.setup_objects
values ('SOMETHING', 'bad1', 'bad1', 'YES', 'NO');
@@ -89,8 +88,7 @@ update performance_schema.setup_objects
select * from performance_schema.setup_objects
order by OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME;
-set sql_mode= DEFAULT;
-
+SET sql_mode = default;
--disable_warnings
drop database if exists db1;
drop database if exists db2;
diff --git a/mysql-test/suite/perfschema/t/short_option_1-master.opt b/mysql-test/suite/perfschema/t/short_option_1-master.opt
index d3ad08d3d54..a9cda7a08ed 100644
--- a/mysql-test/suite/perfschema/t/short_option_1-master.opt
+++ b/mysql-test/suite/perfschema/t/short_option_1-master.opt
@@ -1 +1 @@
--a -Cutf8 --collation-server=utf8_bin -T12 -W3
+-a -Cutf8 --collation-server=utf8_bin -T12 -W2
diff --git a/mysql-test/suite/perfschema/t/short_option_1.test b/mysql-test/suite/perfschema/t/short_option_1.test
index ff62a392cfa..4d00c3729d8 100644
--- a/mysql-test/suite/perfschema/t/short_option_1.test
+++ b/mysql-test/suite/perfschema/t/short_option_1.test
@@ -6,13 +6,13 @@ select 'Ok, the server started' as result;
# See the associated -master.opt file.
select @@SQL_MODE;
-show variables like 'sql_mode';
+show global variables like 'sql_mode';
select @@character_set_server;
-show variables like 'character_set_system';
+show global variables like 'character_set_system';
-show variables like 'general_log';
+show global variables like 'general_log';
-show variables like 'new';
+show global variables like 'new';
-show variables like 'log_warnings';
+show global variables like 'log_warnings';
diff --git a/mysql-test/suite/perfschema/t/short_option_2-master.opt b/mysql-test/suite/perfschema/t/short_option_2-master.opt
index 5cf7590a1c8..5d45b9ec91d 100644
--- a/mysql-test/suite/perfschema/t/short_option_2-master.opt
+++ b/mysql-test/suite/perfschema/t/short_option_2-master.opt
@@ -1 +1 @@
--aW5
+-aW2
diff --git a/mysql-test/suite/perfschema/t/short_option_2.test b/mysql-test/suite/perfschema/t/short_option_2.test
index 77798c36722..0921849cd08 100644
--- a/mysql-test/suite/perfschema/t/short_option_2.test
+++ b/mysql-test/suite/perfschema/t/short_option_2.test
@@ -4,11 +4,11 @@
select 'Ok, the server started' as result;
# See the associated -master.opt file.
-# -aW5 should be parsed as -a -W5, which are two separate short options
+# -aW2 should be parsed as -a -W2, which are two separate short options
# stuffed inside a single argv[i] argument.
# Should contain ANSI, since we started the server with -a (stands for --ansi)
select @@SQL_MODE;
-# Should be 5, since we started the server with -W5
+# Should be 2, since we started the server with -W2
select @@log_warnings;
diff --git a/mysql-test/suite/perfschema/t/show_aggregate.test b/mysql-test/suite/perfschema/t/show_aggregate.test
new file mode 100644
index 00000000000..3f01de15b01
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/show_aggregate.test
@@ -0,0 +1,306 @@
+################# suite/perfschema/t/show_aggregate.test #######################
+# #
+# This test verifies: #
+# 1. Status variable values are consistent with corresponding server events. #
+# 2. Status variable values are consistent across session, thread, account, #
+# host, user and global tables. #
+# 3. Status totals for user, host and account are retained after related #
+# threads disconnect. #
+################################################################################
+
+--source include/have_perfschema.inc
+--source include/have_innodb.inc
+--source include/not_embedded.inc
+--source include/no_protocol.inc
+--source include/maybe_pool_of_threads.inc
+
+--enable_connect_log
+
+--echo #
+--echo # ================================================================================
+--echo # SETUP
+--echo # ================================================================================
+SET @@session.sql_log_bin=OFF;
+--echo #
+--echo # CREATE 3 CLIENTS, 3 CONNECTIONS, RESULTS TABLE
+connection default;
+USE test;
+
+# Clear user, host and account status accumulated from preliminary checks by mtr.
+--disable_query_log
+flush status;
+--enable_query_log
+
+--echo #
+--echo # Create results table
+CREATE TABLE test.status_results
+ (variable_name VARCHAR(64), start INT DEFAULT 0, stop INT DEFAULT 0, delta INT DEFAULT 0,
+ t1 INT DEFAULT 0, t2 INT DEFAULT 0, t3 INT DEFAULT 0, thread INT DEFAULT 0,
+ u1 INT DEFAULT 0, u2 INT DEFAULT 0, u3 INT DEFAULT 0, user INT DEFAULT 0,
+ h1 INT DEFAULT 0, h2 INT DEFAULT 0, h3 INT DEFAULT 0, host INT DEFAULT 0,
+ a1 INT DEFAULT 0, a2 INT DEFAULT 0, a3 INT DEFAULT 0, acct INT DEFAULT 0);
+
+INSERT INTO test.status_results (variable_name, start)
+ SELECT sg.variable_name, sg.variable_value+0 FROM performance_schema.global_status sg
+ WHERE variable_name IN ('handler_delete', 'handler_rollback');
+
+--echo
+--echo # Create test tables
+CREATE TABLE t1 (s1 int) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1), (2), (2), (3), (3), (3);
+CREATE TABLE t2 (s1 int) ENGINE=InnoDB;
+CREATE TABLE t3 (s1 int) ENGINE=InnoDB;
+--echo #
+set @orig_sql_mode= @@sql_mode;
+set sql_mode= (select replace(@@sql_mode,'NO_AUTO_CREATE_USER',''));
+GRANT ALL ON *.* to 'user1'@localhost;
+GRANT ALL ON *.* to 'user2'@localhost;
+GRANT ALL ON *.* to 'user3'@localhost;
+set sql_mode= @orig_sql_mode;
+
+--echo #
+--echo # ================================================================================
+--echo # CONNECTION 1: DELETE 1, ROLLBACK x 1
+--echo # ================================================================================
+connect(con1, localhost, user1,,);
+SET @@session.sql_log_bin=OFF;
+DELETE FROM t1 WHERE s1 = 1;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+ROLLBACK;
+
+--echo #
+--echo # ================================================================================
+--echo # CONNECTION 2: DELETE 2, ROLLBACK x 2
+--echo # ================================================================================
+connect(con2, localhost, user2,,);
+SET @@session.sql_log_bin=OFF;
+DELETE FROM t1 WHERE s1 = 2;
+--echo #
+START TRANSACTION;
+INSERT INTO t1 VALUES (2);
+ROLLBACK;
+--echo #
+START TRANSACTION;
+INSERT INTO t1 VALUES (2);
+ROLLBACK;
+
+--echo #
+--echo # ================================================================================
+--echo # CONNECTION 3: DELETE 3, ROLLBACK x 3
+--echo # ================================================================================
+connect(con3, localhost, user3,,);
+SET @@session.sql_log_bin=OFF;
+DELETE FROM t1 WHERE s1 = 3;
+--echo #
+START TRANSACTION;
+INSERT INTO t1 VALUES (3);
+ROLLBACK;
+--echo #
+START TRANSACTION;
+INSERT INTO t1 VALUES (3);
+ROLLBACK;
+--echo #
+START TRANSACTION;
+INSERT INTO t1 VALUES (3);
+ROLLBACK;
+
+--echo #
+--echo # ================================================================================
+--echo # CONNECTION DEFAULT: Gather results, compare session and global status counts
+--echo # ================================================================================
+connection default;
+--echo # Get thread ids for each connection.
+USE performance_schema;
+SELECT thread_id INTO @con1_id FROM threads WHERE processlist_user IN ('user1');
+SELECT thread_id INTO @con2_id FROM threads WHERE processlist_user IN ('user2');
+SELECT thread_id INTO @con3_id FROM threads WHERE processlist_user IN ('user3');
+
+--source ../include/show_aggregate.inc
+
+#--echo DEBUG
+#USE test;
+#SELECT * FROM test.status_results;
+
+--echo #
+--echo # ================================================================================
+--echo # TEST 1: STATUS_BY_THREAD: Verify expected status counts per thread (1,2,3)
+--echo # ================================================================================
+--echo #
+--echo # Review per-thread status counts
+--echo #
+USE performance_schema;
+--replace_column 1 thread_id
+SELECT * FROM status_by_thread WHERE thread_id IN (@con1_id, @con2_id, @con3_id) AND variable_name IN ('handler_delete', 'handler_rollback') ORDER BY thread_id;
+
+--echo #
+--echo # Verify expected counts for 'handler_delete' per thread
+--echo #
+--replace_column 1 connect_1
+SELECT *, IF (variable_value = 1,'OK','ERROR') AS Expected FROM status_by_thread WHERE thread_id = @con1_id AND variable_name IN ('handler_delete');
+--echo #
+--replace_column 1 connnect_2
+SELECT *, IF (variable_value = 2,'OK','ERROR') AS Expected FROM status_by_thread WHERE thread_id = @con2_id AND variable_name IN ('handler_delete');
+--echo #
+--replace_column 1 connnect_3
+SELECT *, IF (variable_value = 3,'OK','ERROR') AS Expected FROM status_by_thread WHERE thread_id = @con3_id AND variable_name IN ('handler_delete');
+
+--echo #
+--echo # STATUS_BY_THREAD vs. GLOBAL_STATUS
+--echo #
+SELECT variable_name, t1, t2, t3, delta, thread, IF(thread=delta,'OK','ERROR') Expected
+FROM test.status_results
+ORDER BY variable_name;
+
+--echo #
+--echo # ================================================================================
+--echo # TEST 2: STATUS_BY_USER: Verify expected status counts per user (1,2,3)
+--echo # ================================================================================
+SELECT *, IF (variable_value = 1,'OK','ERROR') AS Expected FROM status_by_user WHERE user IN ('user1') AND variable_name IN ('handler_delete');
+--echo #
+SELECT *, IF (variable_value = 2,'OK','ERROR') AS Expected FROM status_by_user WHERE user IN ('user2') AND variable_name IN ('handler_delete');
+--echo #
+SELECT *, IF (variable_value = 3,'OK','ERROR') AS Expected FROM status_by_user WHERE user IN ('user3') AND variable_name IN ('handler_delete');
+
+--echo #
+--echo # STATUS_BY_USER vs. GLOBAL_STATUS
+--echo #
+SELECT variable_name, u1, u2, u3, delta, user, IF(user=delta,'OK','ERROR') Expected
+FROM test.status_results
+ORDER BY variable_name;
+
+--echo #
+--echo # ================================================================================
+--echo # TEST 3: STATUS_BY_ACCOUNT: Verify expected status counts per user, host (1,2,3)
+--echo # ================================================================================
+SELECT *, IF (variable_value = 1,'OK','ERROR') AS Expected FROM status_by_account WHERE user IN ('user1') AND variable_name IN ('handler_delete');
+--echo #
+SELECT *, IF (variable_value = 2,'OK','ERROR') AS Expected FROM status_by_account WHERE user IN ('user2') AND variable_name IN ('handler_delete');
+--echo #
+SELECT *, IF (variable_value = 3,'OK','ERROR') AS Expected FROM status_by_account WHERE user IN ('user3') AND variable_name IN ('handler_delete');
+
+--echo #
+--echo # STATUS_BY_ACCOUNT vs. GLOBAL_STATUS
+--echo #
+SELECT variable_name, a1, a2, a3, delta, acct, IF(acct=delta,'OK','ERROR') Expected
+FROM test.status_results
+ORDER BY variable_name;
+
+--echo # ================================================================================
+--echo # TEST 4: STATUS_BY_HOST: Verify expected status counts per host (6)
+--echo # ================================================================================
+SELECT *, IF (variable_value = 6,'OK','ERROR') AS Expected FROM status_by_host WHERE host IN ('localhost') AND variable_name IN ('handler_delete');
+
+--echo #
+--echo # STATUS_BY_HOST vs. GLOBAL_STATUS
+--echo #
+--echo # Special case: No way to isolate pre-existing 'localhost' activity, so
+--echo # just check global totals = sum(status_by_host).
+--echo #
+SELECT variable_name, h1, h2, h3, delta, host, IF(host=delta,'OK','ERROR') Expected
+FROM test.status_results
+ORDER BY variable_name;
+
+--echo #
+--echo # ================================================================================
+--echo # DISCONNECT ALL USERS AND RUN THE TESTS AGAIN. RESULTS SHOULD NOT CHANGE.
+--echo # ================================================================================
+connection default;
+disconnect con1;
+disconnect con2;
+disconnect con3;
+--echo #
+USE test;
+--echo #
+--echo # Clear results table, leave initial global_status counts
+UPDATE test.status_results
+ SET stop=0, delta=0,
+ t1=0, t2=0, t3=0, thread=0,
+ u1=0, u2=0, u3=0, user=0,
+ h1=0, h2=0, h3=0, host=0,
+ a1=0, a2=0, a3=0, acct=0;
+
+#--echo DEBUG
+#SELECT * FROM test.status_results;
+--echo #
+--source ../include/show_aggregate.inc
+
+USE performance_schema;
+--echo #
+--echo # ================================================================================
+--echo # TEST X: STATUS_BY_THREAD: Connections are gone--nothing to verify.
+--echo # ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # TEST 5: STATUS_BY_USER: Verify expected status counts per user (1,2,3)
+--echo # ================================================================================
+SELECT *, IF (variable_value = 1,'OK','ERROR') AS Expected FROM status_by_user WHERE user IN ('user1') AND variable_name IN ('handler_delete');
+--echo #
+SELECT *, IF (variable_value = 2,'OK','ERROR') AS Expected FROM status_by_user WHERE user IN ('user2') AND variable_name IN ('handler_delete');
+--echo #
+SELECT *, IF (variable_value = 3,'OK','ERROR') AS Expected FROM status_by_user WHERE user IN ('user3') AND variable_name IN ('handler_delete');
+
+--echo #
+--echo # STATUS_BY_USER vs. GLOBAL_STATUS
+--echo #
+SELECT variable_name, u1, u2, u3, delta, user, IF(user=delta,'OK','ERROR') Expected
+FROM test.status_results
+ORDER BY variable_name;
+
+--echo #
+--echo # ================================================================================
+--echo # TEST 6: STATUS_BY_ACCOUNT: Verify expected status counts per user:host (1,2,3)
+--echo # ================================================================================
+SELECT *, IF (variable_value = 1,'OK','ERROR') AS Expected FROM status_by_account WHERE user IN ('user1') AND variable_name IN ('handler_delete');
+--echo #
+SELECT *, IF (variable_value = 2,'OK','ERROR') AS Expected FROM status_by_account WHERE user IN ('user2') AND variable_name IN ('handler_delete');
+--echo #
+SELECT *, IF (variable_value = 3,'OK','ERROR') AS Expected FROM status_by_account WHERE user IN ('user3') AND variable_name IN ('handler_delete');
+
+--echo #
+--echo # STATUS_BY_ACCOUNT vs. GLOBAL_STATUS
+--echo #
+SELECT variable_name, a1, a2, a3, delta, acct, IF(acct=delta,'OK','ERROR') Expected
+FROM test.status_results
+ORDER BY variable_name;
+
+--echo # ================================================================================
+--echo # TEST 7: STATUS_BY_HOST: Verify expected status counts per host (6)
+--echo # ================================================================================
+SELECT *, IF (variable_value = 6,'OK','ERROR') AS Expected FROM status_by_host WHERE host IN ('localhost') AND variable_name IN ('handler_delete');
+
+--echo #
+--echo # STATUS_BY_HOST vs. GLOBAL_STATUS
+--echo #
+--echo # Special case: No way to isolate pre-existing 'localhost' activity, so
+--echo # just check global totals = sum(status_by_host).
+--echo #
+SELECT variable_name, h1, h2, h3, delta, host, IF(host=delta,'OK','ERROR') Expected
+FROM test.status_results
+ORDER BY variable_name;
+
+
+--echo # ================================================================================
+--echo # TEST 8: FLUSH STATUS should clear account, host and user status
+--echo # ================================================================================
+--echo #
+FLUSH STATUS;
+--echo #
+SELECT * FROM status_by_account WHERE user IN ('user1', 'user2', 'user3') AND variable_name IN ('handler_delete');
+--echo #
+SELECT * FROM status_by_host WHERE host IN ('localhost') AND variable_name IN ('handler_delete');
+--echo #
+SELECT * FROM status_by_user WHERE user IN ('user1', 'user2', 'user3') AND variable_name IN ('handler_delete');
+
+
+--echo # ================================================================================
+--echo # CLEANUP
+--echo # ================================================================================
+DROP TABLE test.t1;
+DROP TABLE test.t2;
+DROP TABLE test.t3;
+DROP TABLE test.status_results;
+DROP USER 'user1'@localhost;
+DROP USER 'user2'@localhost;
+DROP USER 'user3'@localhost;
+--echo #
diff --git a/mysql-test/suite/perfschema/t/show_coverage.test b/mysql-test/suite/perfschema/t/show_coverage.test
new file mode 100644
index 00000000000..6a8d90d6058
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/show_coverage.test
@@ -0,0 +1,186 @@
+################### suite/perfschema/t/show_coverage.test ######################
+# #
+# Testcases to increase DGCOV coverage of the status and system variable #
+# implementation in the Performance Schema. #
+# #
+################################################################################
+--source include/have_perfschema.inc
+--source include/not_embedded.inc
+--source include/no_protocol.inc
+--source include/count_sessions.inc
+
+--echo #
+--echo # TEST 1
+--echo # Handling of SHOW STATUS/VARIABLES ... WHERE
+--echo #
+SHOW STATUS WHERE VARIABLE_NAME LIKE "foo";
+--echo #
+SHOW GLOBAL STATUS WHERE VARIABLE_NAME LIKE "foo";
+--echo #
+SHOW SESSION STATUS WHERE VARIABLE_NAME LIKE "foo";
+--echo #
+SHOW VARIABLES WHERE VARIABLE_NAME LIKE "foo";
+--echo #
+SHOW GLOBAL VARIABLES WHERE VARIABLE_NAME LIKE "foo";
+--echo #
+SHOW SESSION VARIABLES WHERE VARIABLE_NAME LIKE "foo";
+
+--echo #
+--echo # TEST 2
+--echo # CREATE..SELECT -- Expect correct ER_WARN_DEPRECATED_SYNTAX
+--echo #
+USE test;
+CREATE TABLE t0 SELECT * FROM information_schema.global_status WHERE variable_name = 'COM_SELECT';
+DROP TABLE t0;
+
+--echo #
+--echo # TEST 3
+--echo # Select status and system variable tables using ORDER BY to exercise the
+--echo # rnd_pos() method
+--echo #
+use performance_schema;
+--disable_result_log
+select * from global_variables order by variable_name;
+select * from variables_by_thread order by variable_name;
+select * from session_variables order by variable_name;
+select * from global_status order by variable_name;
+select * from session_status order by variable_name;
+select * from status_by_thread order by variable_name;
+select * from status_by_user order by variable_name;
+select * from status_by_host order by variable_name;
+select * from status_by_account order by variable_name;
+--enable_result_log
+
+--echo #
+--echo # TEST 4
+--echo # Handling of SHOW STATUS/VARIABLES ... WHERE
+--echo #
+SHOW STATUS WHERE VARIABLE_NAME LIKE "foo";
+--echo #
+SHOW GLOBAL STATUS WHERE VARIABLE_NAME LIKE "foo";
+--echo #
+SHOW SESSION STATUS WHERE VARIABLE_NAME LIKE "foo";
+--echo #
+SHOW VARIABLES WHERE VARIABLE_NAME LIKE "foo";
+--echo #
+SHOW GLOBAL VARIABLES WHERE VARIABLE_NAME LIKE "foo";
+--echo #
+SHOW SESSION VARIABLES WHERE VARIABLE_NAME LIKE "foo";
+
+--echo #
+--echo # TEST 5
+--echo # Confirm FLUSH STATUS resets counters for all threads.
+--echo #
+--echo #
+--echo # Create a new connection
+--connect(con1, localhost, root,,)
+--echo #
+--echo # Record thread id
+let $thread_id= `SELECT THREAD_ID FROM performance_schema.threads WHERE PROCESSLIST_ID = CONNECTION_ID()`;
+--echo #
+--echo # Increase bytes_received for new connection
+USE test;
+SHOW TABLES;
+--connection default
+USE performance_schema;
+--disable_query_log
+eval SELECT $thread_id INTO @thread_id;
+--enable_query_log
+
+--echo #
+--echo # Record bytes_received for other connection
+SELECT variable_value FROM status_by_thread
+ WHERE variable_name = "bytes_received" and thread_id = @thread_id INTO @bytes_before;
+--echo #
+--echo # Reset status counters
+FLUSH STATUS;
+--echo #
+--echo # Record bytes_received after reset
+SELECT variable_value FROM status_by_thread
+ WHERE variable_name = "bytes_received" and thread_id = @thread_id INTO @bytes_after;
+--echo #
+--echo # Expect bytes_before > bytes_after
+SELECT @bytes_before > @bytes_after AS 'Expect 1';
+--echo #
+--echo # Expect bytes_after is zero
+SELECT @bytes_after AS 'Expect 0';
+
+disconnect con1;
+--source include/wait_until_count_sessions.inc
+
+
+--echo #
+--echo # TEST 6
+--echo #
+--echo # Bug#28291258 FLUSH STATUS ADDS TWICE TO GLOBAL VALUES
+--echo #
+
+--echo #
+--echo # Default connection
+--let $initial_global_value = query_get_value(SHOW GLOBAL STATUS LIKE 'Slow_queries', Value, 1)
+
+--source include/count_sessions.inc
+
+--echo #
+--echo # First connection
+--connect (con1, localhost, root,,)
+
+## Global value requested from the first session must not change
+--let $current_global_value = query_get_value(SHOW GLOBAL STATUS LIKE 'Slow_queries', Value, 1)
+--let $assert_cond = $current_global_value - $initial_global_value = 0
+--let $assert_text = Global value requested from the first session must not change
+--source include/assert.inc
+
+--echo #
+--echo # Generate a slow query
+--echo #
+SET long_query_time = 2;
+SELECT SLEEP(4);
+SET long_query_time = @@global.long_query_time;
+--echo #
+
+## Global value requested from the first session after SLEEP() must increase by 1
+--let $current_global_value = query_get_value(SHOW GLOBAL STATUS LIKE 'Slow_queries', Value, 1)
+--let $first_session_value = query_get_value(SHOW SESSION STATUS LIKE 'Slow_queries', Value, 1)
+--let $assert_cond = $current_global_value - $initial_global_value = 1
+--let $assert_text = Global value requested from the first session after SLEEP() must increase by 1
+--source include/assert.inc
+--let $assert_cond = $first_session_value = 1
+--let $assert_text = First session value must increase by 1
+--source include/assert.inc
+
+--connection default
+--disconnect con1
+--source include/wait_until_count_sessions.inc
+
+--echo #
+--echo # Default connection
+--connection default
+
+## Global value requested from the default session after DISCONNECT must remain the same
+--let $current_global_value = query_get_value(SHOW GLOBAL STATUS LIKE 'Slow_queries', Value, 1)
+--let $default_session_value = query_get_value(SHOW SESSION STATUS LIKE 'Slow_queries', Value, 1)
+--let $assert_cond = $current_global_value - $initial_global_value = 1
+--let $assert_text = Global value requested from the default session after DISCONNECT must remain the same
+--source include/assert.inc
+
+## Default session value must remain zero
+--let $assert_cond = $default_session_value = 0
+--let $assert_text = Default session value must remain zero
+--source include/assert.inc
+
+--echo #
+FLUSH STATUS;
+--echo #
+
+## Global value requested from the default session after FLUSH must remain the same
+--let $current_global_value = query_get_value(SHOW GLOBAL STATUS LIKE 'Slow_queries', Value, 1)
+--let $default_session_value = query_get_value(SHOW SESSION STATUS LIKE 'Slow_queries', Value, 1)
+--let $assert_cond = $current_global_value - $initial_global_value = 1
+--let $assert_text = Global value requested from the default session after FLUSH must remain the same
+--source include/assert.inc
+
+## Default session value after FLUSH must remain zero
+--let $assert_cond = $default_session_value = 0
+--let $assert_text = Default session value after FLUSH must remain zero
+--source include/assert.inc
diff --git a/mysql-test/suite/perfschema/t/show_misc.test b/mysql-test/suite/perfschema/t/show_misc.test
new file mode 100644
index 00000000000..e557ef31e94
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/show_misc.test
@@ -0,0 +1,64 @@
+--source include/have_perfschema.inc
+--source include/not_embedded.inc
+--source include/no_protocol.inc
+
+select 1;
+SHOW STATUS LIKE 'Last_query_partial_plans';
+select 2;
+SHOW STATUS LIKE 'Last_query_cost';
+
+flush status;
+SHOW STATUS LIKE 'Created_tmp_tables';
+
+--echo #
+--echo # ================================================================================
+--echo # Bug#21789221 SHOW STATUS FAILS WITH LOCK TABLES AND SHOW_COMPATIBILITY_56=OFF
+--echo # ================================================================================
+--echo # Verify that SHOW STATUS and SHOW VARIABLES works under LOCK TABLES mode
+--echo #
+CREATE TABLE test.t1 (s1 INT);
+LOCK TABLE test.t1 READ;
+--echo #
+SHOW GLOBAL STATUS WHERE VARIABLE_NAME LIKE "foo";
+--echo #
+SHOW SESSION STATUS WHERE VARIABLE_NAME LIKE "foo";
+--echo #
+SHOW GLOBAL VARIABLES WHERE VARIABLE_NAME LIKE "foo";
+--echo #
+SHOW SESSION VARIABLES WHERE VARIABLE_NAME LIKE "foo";
+--echo #
+UNLOCK TABLES;
+--echo #
+LOCK TABLE test.t1 WRITE;
+--echo #
+SHOW GLOBAL STATUS WHERE VARIABLE_NAME LIKE "foo";
+--echo #
+SHOW SESSION STATUS WHERE VARIABLE_NAME LIKE "foo";
+--echo #
+SHOW GLOBAL VARIABLES WHERE VARIABLE_NAME LIKE "foo";
+--echo #
+SHOW SESSION VARIABLES WHERE VARIABLE_NAME LIKE "foo";
+--echo #
+UNLOCK TABLES;
+
+DROP TABLE test.t1;
+
+
+--echo #
+--echo # ================================================================================
+--echo # Bug#28515475 BOGUS DATA WHEN ORDERING RESULTS FROM VARIABLES_BY_THREAD
+--echo # ================================================================================
+--echo # Verify the results from "WHERE variable_name IN(...)", particularly for those
+--echo # variables that are listed after the deprecated variable gtid_executed.
+--echo # The ORDER BY also forces an additional code path through rnd_pos().
+--echo #
+
+SELECT variable_name FROM performance_schema.variables_by_thread
+ WHERE variable_name IN ('interactive_timeout','net_read_timeout','net_write_timeout','wait_timeout')
+ ORDER BY variable_name;
+
+
+--echo #
+--echo # ================================================================================
+--echo # CLEAN UP
+--echo # ================================================================================
diff --git a/mysql-test/suite/perfschema/t/show_plugin.test b/mysql-test/suite/perfschema/t/show_plugin.test
new file mode 100644
index 00000000000..7109c3140c6
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/show_plugin.test
@@ -0,0 +1,321 @@
+################# suite/perfschema/t/show_plugin.test ##########################
+# #
+# MySQL plugins can define their own status variables and system variables. #
+# This test exercises SHOW STATUS, SHOW VARIABLES and the status and system #
+# variable tables while the EXAMPLE plugin is loaded and unloaded. #
+# #
+# The EXAMPLE plugin defines the following system and status variables: #
+# Global system variables: #
+# example_double_thdvar #
+# example_double_var #
+# example_enum_var #
+# example_ulong_var #
+# #
+# Session variables: #
+# example_double_thdvar - Local and/or global #
+# #
+# Global status: #
+# example_func_example - Status function #
+# #
+################################################################################
+
+--source include/have_perfschema.inc
+--source include/not_embedded.inc
+--source include/not_windows_embedded.inc
+--source include/have_example_plugin.inc
+--source include/have_innodb.inc
+--source include/have_debug_sync.inc
+
+--enable_connect_log
+
+--echo #
+--echo # ================================================================================
+--echo # SETUP
+--echo # ================================================================================
+--echo # Save the initial number of concurrent sessions
+--source include/count_sessions.inc
+--echo #
+--echo # Verify EXAMPLE plugin is not loaded
+SELECT COUNT(*) = 0 AS "Expect 1" FROM information_schema.plugins WHERE plugin_name = "EXAMPLE";
+--echo #
+--echo # Create one session to force local and global system variables
+--connect(con0, localhost, root,,)
+--connection default
+--echo #
+--echo # ================================================================================
+--echo # TEST 1- NO PLUGIN VARS
+--echo # ================================================================================
+--source ../include/show_plugin_verifier.inc
+--echo #
+
+--echo # ================================================================================
+--echo # TEST 2 - PLUGIN LOAD, UNLOAD, RELOAD
+--echo # ================================================================================
+--echo # ================================================================================
+--echo # 2.1 - INSTALL PLUGIN
+--echo # ================================================================================
+INSTALL PLUGIN example SONAME 'ha_example';
+
+--echo #
+--echo # ================================================================================
+--echo # 2.1a - FORCE SYNC OF LOCAL AND GLOBAL SYSTEM VARS
+--echo # ================================================================================
+--source ../include/show_plugin_verifier.inc
+
+--disconnect con0
+
+--echo #
+--echo # ================================================================================
+--echo # 2.2 - SET PLUGIN VARS
+--echo # ================================================================================
+--echo # GLOBAL
+SET GLOBAL example_ulong_var = 100;
+SET GLOBAL example_enum_var = e1;
+SET GLOBAL example_double_var = 100.9990;
+SET GLOBAL example_double_thdvar = 101.9991;
+--echo # SESSION
+SET SESSION example_double_thdvar = 102.9992;
+
+--echo #
+--echo # ================================================================================
+--echo # 2.3 - VERIFY UPDATED PLUGIN VARS
+--echo # ================================================================================
+--source ../include/show_plugin_verifier.inc
+
+--echo #
+--echo # ================================================================================
+--echo # 2.4 - UNINSTALL PLUGIN
+--echo # ================================================================================
+UNINSTALL PLUGIN example;
+
+--echo #
+--echo # ================================================================================
+--echo # 2.5 - VERIFY NO PLUGIN VARS
+--echo # ================================================================================
+--source ../include/show_plugin_verifier.inc
+
+--echo #
+--echo # ================================================================================
+--echo # 2.6 - REINSTALL PLUGIN
+--echo # ================================================================================
+--echo # Reinstall EXAMPLE plugin
+INSTALL PLUGIN example SONAME 'ha_example';
+
+--echo #
+--echo # ================================================================================
+--echo # 2.7 - SET PLUGIN VARS AGAIN
+--echo # ================================================================================
+--echo # GLOBAL
+SET GLOBAL example_ulong_var = 200;
+SET GLOBAL example_enum_var = e2;
+SET GLOBAL example_double_var = 200.8880;
+SET GLOBAL example_double_thdvar = 201.8881;
+--echo # SESSION
+SET SESSION example_double_thdvar = 202.8882;
+
+--echo #
+--echo # ================================================================================
+--echo # 2.8 - VERIFY PLUGIN VARS
+--echo # ================================================================================
+--source ../include/show_plugin_verifier.inc
+
+--echo #
+--echo # ================================================================================
+--echo # 2.9 - UNINSTALL PLUGIN
+--echo # ================================================================================
+UNINSTALL PLUGIN example;
+
+--echo #
+--echo # ================================================================================
+--echo # 2.10 - VERIFY NO PLUGIN VARS
+--echo # ================================================================================
+--source ../include/show_plugin_verifier.inc
+
+--echo #
+--echo # ================================================================================
+--echo # TEST 3 - SESSION PLUGIN VARS ON MULTIPLE CONNECTIONS
+--echo # ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # 3.1 - INSTALL PLUGIN
+--echo # ================================================================================
+INSTALL PLUGIN example SONAME 'ha_example';
+
+--echo #
+--echo # ================================================================================
+--echo # 3.2 - SET GLOBAL AND DEFAULT CONNECTION VARS
+--echo # ================================================================================
+--connection default
+SET GLOBAL example_ulong_var = 300;
+SET GLOBAL example_enum_var = e1;
+SET GLOBAL example_double_var = 301.0000;
+SET GLOBAL example_double_thdvar = 302.0000;
+SET SESSION example_double_thdvar = 300.0000;
+
+--echo #
+--echo # ================================================================================
+--echo # 3.3 - CONNECT 3 CLIENTS, SET LOCAL PLUGIN VARS
+--echo # ================================================================================
+--connect(con1, localhost, root,,)
+SET SESSION example_double_thdvar = 300.1111;
+--echo #
+--connect(con2, localhost, root,,)
+SET SESSION example_double_thdvar = 300.2222;
+--echo #
+--connect(con3, localhost, root,,)
+SET SESSION example_double_thdvar = 300.3333;
+--echo #
+--connection default
+
+--echo #
+--echo # ================================================================================
+--echo # 3.4 - VERIFY GLOBAL AND SESSION PLUGIN VARS
+--echo # ================================================================================
+--source ../include/show_plugin_verifier.inc
+--echo #
+--echo # Variables by thread
+SELECT variable_name, variable_value FROM performance_schema.variables_by_thread
+WHERE variable_name LIKE "example_%" ORDER BY variable_value;
+
+--echo #
+--echo # ================================================================================
+--echo # 3.5 - DISCONNECT CLIENTS
+--echo # ================================================================================
+--connection con1
+--disconnect con1
+--source include/wait_until_disconnected.inc
+
+--connection con2
+--disconnect con2
+--source include/wait_until_disconnected.inc
+
+--connection con3
+--disconnect con3
+--source include/wait_until_disconnected.inc
+
+--connection default
+
+--echo #
+--echo # ================================================================================
+--echo # 3.6 - VERIFY SESSION VARS ARE REMOVED
+--echo # ================================================================================
+--source ../include/show_plugin_verifier.inc
+--echo #
+--echo # Variables by thread
+SELECT variable_name, variable_value FROM performance_schema.variables_by_thread
+WHERE variable_name LIKE "example_%" ORDER BY variable_value;
+
+--echo #
+--echo # ================================================================================
+--echo # 3.7 - RECONNECT 3 CLIENTS, SET SESSION VARS FOR EACH
+--echo # ================================================================================
+--connect(con1, localhost, root,,)
+SET SESSION example_double_thdvar = 311.1111;
+--echo #
+--connect(con2, localhost, root,,)
+SET SESSION example_double_thdvar = 322.2222;
+--echo #
+--connect(con3, localhost, root,,)
+SET SESSION example_double_thdvar = 333.3333;
+--echo #
+--connection default
+
+--echo #
+--echo # ================================================================================
+--echo # 3.8 - VERIFY GLOBAL AND SESSION VARS
+--echo # ================================================================================
+--source ../include/show_plugin_verifier.inc
+--echo #
+--echo # Variables by thread
+SELECT variable_name, variable_value FROM performance_schema.variables_by_thread
+WHERE variable_name LIKE "example_%" ORDER BY variable_value;
+
+--echo #
+--echo # ================================================================================
+--echo # 3.9 - UNINSTALL PLUGIN, LEAVE CLIENTS CONNECTED
+--echo # ================================================================================
+UNINSTALL PLUGIN example;
+
+--echo #
+--echo # ================================================================================
+--echo # 3.10 - VERIFY SESSION VARS ARE REMOVED
+--echo # ================================================================================
+--source ../include/show_plugin_verifier.inc
+--echo #
+--echo # VARIABLES BY THREAD
+SELECT variable_name, variable_value FROM performance_schema.variables_by_thread
+WHERE variable_name LIKE "example_%" ORDER BY variable_value;
+
+--echo #
+--echo # ================================================================================
+--echo # 3.11 - DISCONNECT CLIENTS
+--echo # ================================================================================
+--connection con1
+--disconnect con1
+--source include/wait_until_disconnected.inc
+
+--connection con2
+--disconnect con2
+--source include/wait_until_disconnected.inc
+
+--connection con3
+--disconnect con3
+--source include/wait_until_disconnected.inc
+
+--connection default
+
+--echo #
+--echo # ================================================================================
+--echo # 3.12 - VERIFY CLIENTS ARE REMOVED
+--echo # ================================================================================
+--source ../include/show_plugin_verifier.inc
+--echo #
+--echo # VARIABLES BY THREAD
+SELECT variable_name, variable_value FROM performance_schema.variables_by_thread
+WHERE variable_name LIKE "example_%" ORDER BY variable_value;
+
+--echo #
+--echo # ================================================================================
+--echo # TEST 4 - BUG#18008907: DEADLOCK WITH CHANGE_USER, SHOW VARIABLES, INSTALL PLUGIN
+--echo # ================================================================================
+--echo #
+--echo #
+--echo # ================================================================================
+--echo # TEST 5 - BUG#22225549 MYSQL_CHANGE_USER/MYSQL_RESET_CONNECTION + SET INNODB...
+--echo Update to plugin-defined session variable triggers resync with global
+--echo variables and deadlocks on THD::LOCK_thd_sysvar.
+--echo # ================================================================================
+#
+# The deadlock occurs when plugin-defined session variables are resynced with the global
+# variables. To force a resync, change the user and update a session variable from a
+# plugin, in this case InnoDB.
+#
+select @@session.innodb_strict_mode;
+let $innodb_strict_mode_save = `select @@session.innodb_strict_mode`;
+select user(), current_user();
+--echo # change_user root
+--change_user root
+--echo #
+--echo # Trigger a resync of session variables with global variables.
+--echo #
+set @@session.innodb_strict_mode=off;
+
+--echo #
+--echo # Restore
+--echo #
+eval set @@session.innodb_strict_mode=$innodb_strict_mode_save;
+select @@session.innodb_strict_mode;
+
+--echo #
+--echo # ================================================================================
+--echo # CLEAN UP
+--echo # ================================================================================
+--connection default
+--echo #
+
+--echo #
+--disable_connect_log
+
+--echo #
+--echo # Wait till we reached the initial number of concurrent sessions
+--source include/wait_until_count_sessions.inc
diff --git a/mysql-test/suite/perfschema/t/show_sanity.test b/mysql-test/suite/perfschema/t/show_sanity.test
new file mode 100644
index 00000000000..61161ea5df6
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/show_sanity.test
@@ -0,0 +1,1850 @@
+################# suite/perfschema/t/show_sanity.test ##########################
+# #
+# Compare global/session status and system variables in the Information Schema #
+# to those in Performance Schema. Do this once with SHOW_COMPATIBILITY_56 = ON #
+# again with SHOW_COMPATIBILITY_56 = OFF. #
+# #
+# Status and system variables may have a scope of: #
+# #
+# GLOBAL - System level only. #
+# SESSION - Applies at both the global and session level. #
+# Status variables with SESSION scope are totaled across all #
+# threads for global queries such as SHOW GLOBAL STATUS. #
+# System variables with SESSION scope have a global default #
+# that can be changed at the session level. #
+# SESSION-ONLY - Client connection level only. #
+# #
+#==============================================================================#
+# This test consists of two phases: #
+# #
+# COLLECTION - Gather results from SHOW commands and SELECTs on the I_S/P_S #
+# tables into a single table. Tag each variable with the source (SHOW, SELECT, #
+# P_S, I_S) and compatibility mode setting (OFF, ON). #
+# #
+# VERIFICATION - Compare and cross-reference the results between and across #
+# sources and compatibility modes, factoring in the known variances. #
+# #
+# The verification phase assumes that there will be no variation between the #
+# 5.6 and 5.7 results as long as known discrepancies in scope handling are #
+# accounted for. Expected variations are tagged as "JUNK" and filtered from #
+# the comparisons. #
+# #
+# The expected scope for each variable was initially determined from the MySQL #
+# system and status variable documentation and then further verified by the #
+# actual implementation. #
+# #
+# The difference between how 5.6 and 5.7 manage query scope vs. variable scope #
+# are summarized as follows: #
+# #
+# *** SHOW_COMPATIBILITY_56 = ON *** #
+# #
+# SHOW GLOBAL STATUS / I_S.GLOBAL_STATUS #
+# GLOBAL - Yes #
+# SESSION - Yes, totaled across all threads #
+# SESSION-ONLY - Yes, current session #
+# #
+# SHOW SESSION STATUS / I_S.SESSION_STATUS #
+# GLOBAL - Yes #
+# SESSION - Yes, current session #
+# SESSION-ONLY - Yes #
+# #
+# SHOW GLOBAL VARIABLES / I_S.GLOBAL_VARIABLES #
+# GLOBAL - Yes #
+# SESSION - Yes #
+# SESSION-ONLY - No #
+# #
+# SHOW SESSION VARIABLES / I_S.SESSION_VARIABLES #
+# GLOBAL - Yes #
+# SESSION - Yes, current session #
+# SESSION-ONLY - Yes #
+# #
+# *** SHOW_COMPATIBILITY_56 = OFF *** #
+# #
+# Information Schema status and system tables are disabled #
+# (ER_FEATURE_DISABLED_SEE_DOC). #
+# #
+# SHOW GLOBAL STATUS / P_S.GLOBAL_STATUS #
+# GLOBAL - Yes #
+# SESSION - Yes (totaled across all threads for SHOW STATUS) #
+# SESSION-ONLY - No #
+# #
+# SHOW SESSION STATUS / P_S.SESSION_STATUS, STATUS_BY_THREAD #
+# GLOBAL - No #
+# SESSION - Yes #
+# SESSION-ONLY - Yes #
+# #
+# P_S.STATUS_BY_USER / HOST / ACCOUNT #
+# GLOBAL - No #
+# SESSION - Yes (totaled across all related threads) #
+# SESSION-ONLY - No #
+# #
+# SHOW GLOBAL VARIABLES / P_S.GLOBAL_VARIABLES #
+# GLOBAL - Yes #
+# SESSION - No #
+# SESSION-ONLY - No #
+# #
+# SHOW SESSION VARIABLES / P_S.SESSION_VARIABLES, VARIABLES_BY_THREAD #
+# GLOBAL - No #
+# SESSION - Yes #
+# SESSION-ONLY - Yes #
+# #
+# In addition to the differences in how variable scope is handled, comparisons #
+# between 5.6 and 5.7 must also account for differences in how variables are #
+# represented based upon the variable type or meaning. For example, #
+# SESSION-ONLY variables such as "Last Query Cost" have no meaning when #
+# aggregated by user, account or host. #
+# #
+# These additional differences are summarized as follows: #
+# #
+# I_S.GLOBAL_STATUS vs. P_S.GLOBAL_STATUS #
+# - Remove SESSION-ONLY #
+# - Remove SLAVE-ONLY #
+# #
+# I_S.SESSION_STATUS vs. P_S.SESSION_STATUS #
+# - Remove GLOBAL-only vars #
+# - Remove SLAVE-ONLY #
+# #
+# P_S.SESSION_STATUS vs. P_S.STATUS_BY_USER/HOST/ACCOUNT #
+# - Remove SESSION-ONLY #
+# - Remove non-aggregatable #
+# #
+################################################################################
+--source include/have_perfschema.inc
+--source include/not_embedded.inc
+--source include/no_protocol.inc
+
+create table test.sanity(
+ `SHOW_MODE` varchar(48) NOT NULL,
+ `SOURCE` varchar(64) NOT NULL,
+ `VARIABLE_NAME` varchar(64) NOT NULL);
+
+select thread_id from performance_schema.threads
+ where processlist_id = connection_id()
+ into @my_tid;
+
+select @@global.show_compatibility_56 into @show_compatibility_56_save;
+
+set @my_user='root';
+set @my_host='localhost';
+
+# Debug
+# select connection_id(), @my_tid, @my_user, @my_host;
+# show plugins
+--echo #
+--echo # ================================================================================
+--echo # SHOW_COMPATIBILITY_56 = ON
+--echo # ================================================================================
+set global show_compatibility_56 = on;
+
+--echo #
+--echo # STEP 1-1
+insert into test.sanity
+ select "5.6", "I_S.GLOBAL_VARIABLES", variable_name
+ from information_schema.global_variables;
+
+--echo #
+--echo # STEP 1-2
+insert into test.sanity
+ select "5.6", "I_S.SESSION_VARIABLES", variable_name
+ from information_schema.session_variables;
+
+--echo #
+--echo # STEP 1-3
+insert into test.sanity
+ select "5.6", "P_S.GLOBAL_VARIABLES", variable_name
+ from performance_schema.global_variables;
+
+--echo #
+--echo # STEP 1-4
+insert into test.sanity
+ select "5.6", "P_S.VARIABLES_BY_THREAD", variable_name
+ from performance_schema.variables_by_thread
+ where thread_id = @my_tid;
+
+--echo #
+--echo # STEP 1-5
+insert into test.sanity
+ select "5.6", "P_S.SESSION_VARIABLES", variable_name
+ from performance_schema.session_variables;
+
+--echo #
+--echo # STEP 1-6
+insert into test.sanity
+ select "5.6", "I_S.GLOBAL_STATUS", variable_name
+ from information_schema.global_status;
+
+--echo #
+--echo # STEP 1-7
+insert into test.sanity
+ select "5.6", "I_S.SESSION_STATUS", variable_name
+ from information_schema.session_status;
+
+--echo #
+--echo # STEP 1-8
+insert into test.sanity
+ select "5.6", "P_S.GLOBAL_STATUS", variable_name
+ from performance_schema.global_status;
+
+--echo #
+--echo # STEP 1-9
+--echo # EMPTY, NO WARNINGS (not available in 5.6 mode)
+select *
+ from performance_schema.status_by_thread;
+
+--echo #
+--echo # STEP 1-10
+insert into test.sanity
+ select "5.6", "P_S.SESSION_STATUS", variable_name
+ from performance_schema.session_status;
+
+--echo #
+--echo # STEP 1-11
+--echo # EMPTY, NO WARNINGS (not available in 5.6 mode)
+select *
+ from performance_schema.status_by_account;
+
+--echo #
+--echo # STEP 1-12
+--echo # EMPTY, NO WARNINGS (not available in 5.6 mode)
+select *
+ from performance_schema.status_by_user;
+
+--echo #
+--echo # STEP 1-13
+--echo # EMPTY, NO WARNINGS (not available in 5.6 mode)
+select *
+ from performance_schema.status_by_host;
+
+--echo #
+--echo # ================================================================================
+--echo # SHOW_COMPATIBILITY_56 = OFF
+--echo # ================================================================================
+set global show_compatibility_56 = off;
+
+--echo #
+--echo # STEP 2-1
+--echo # FAILS WITH ERROR
+--error ER_FEATURE_DISABLED_SEE_DOC
+select *
+ from information_schema.global_variables;
+
+--echo #
+--echo # STEP 2-2
+--echo # FAILS WITH ERROR
+--error ER_FEATURE_DISABLED_SEE_DOC
+select *
+ from information_schema.session_variables;
+
+--echo #
+--echo # STEP 2-3
+insert into test.sanity
+ select "5.7", "P_S.GLOBAL_VARIABLES", variable_name
+ from performance_schema.global_variables;
+
+--echo #
+--echo # STEP 2-4
+insert into test.sanity
+ select "5.7", "P_S.VARIABLES_BY_THREAD", variable_name
+ from performance_schema.variables_by_thread
+ where thread_id = @my_tid;
+
+--echo #
+--echo # STEP 2-5
+insert into test.sanity
+ select "5.7", "P_S.SESSION_VARIABLES", variable_name
+ from performance_schema.session_variables;
+
+--echo #
+--echo # STEP 2-6
+--echo # FAILS WITH ERROR
+--error ER_FEATURE_DISABLED_SEE_DOC
+select *
+ from information_schema.global_status;
+
+--echo #
+--echo # STEP 2-7
+--echo # FAILS WITH ERROR
+--error ER_FEATURE_DISABLED_SEE_DOC
+select *
+ from information_schema.session_status;
+
+--echo #
+--echo # STEP 2-8
+insert into test.sanity
+ select "5.7", "P_S.GLOBAL_STATUS", variable_name
+ from performance_schema.global_status;
+
+--echo #
+--echo # STEP 2-9
+insert into test.sanity
+ select "5.7", "P_S.STATUS_BY_THREAD", variable_name
+ from performance_schema.status_by_thread
+ where thread_id = @my_tid;
+
+--echo #
+--echo # STEP 2-10
+insert into test.sanity
+ select "5.7", "P_S.SESSION_STATUS", variable_name
+ from performance_schema.session_status;
+
+--echo #
+--echo # STEP 2-11
+insert into test.sanity
+ select "5.7", "P_S.STATUS_BY_ACCOUNT", variable_name
+ from performance_schema.status_by_account
+ where `user` = @my_user and `host` = @my_host;
+
+--echo #
+--echo # STEP 2-12
+insert into test.sanity
+ select "5.7", "P_S.STATUS_BY_USER", variable_name
+ from performance_schema.status_by_user
+ where `user` = @my_user;
+
+--echo #
+--echo # STEP 2-13
+insert into test.sanity
+ select "5.7", "P_S.STATUS_BY_HOST", variable_name
+ from performance_schema.status_by_host
+ where `host` = @my_host;
+
+--echo #
+--echo # STEP 2-14
+--echo # Known global variables in 5.6 that should not display in session queries.
+--echo # These should be global-only system variables.
+--disable_query_log
+insert into test.sanity values
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "AUTO_GENERATE_CERTS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "AUTOMATIC_SP_PRIVILEGES"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "AVOID_TEMPORAL_UPGRADE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "BACK_LOG"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "BASEDIR"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "BIND_ADDRESS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "BINLOGGING_IMPOSSIBLE_MODE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "BINLOG_CACHE_SIZE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "BINLOG_CHECKSUM"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "BINLOG_ERROR_ACTION"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "BINLOG_GROUP_COMMIT_SYNC_DELAY"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "BINLOG_GROUP_COMMIT_SYNC_NO_DELAY_COUNT"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "BINLOG_GTID_SIMPLE_RECOVERY"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "BINLOG_MAX_FLUSH_QUEUE_TIME"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "BINLOG_ORDER_COMMITS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "BINLOG_STMT_CACHE_SIZE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "CHARACTER_SETS_DIR"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "CHARACTER_SET_SYSTEM"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "CHECK_PROXY_USERS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "CONCURRENT_INSERT"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "CONNECT_TIMEOUT"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "CORE_FILE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "DATADIR"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "DATETIME_FORMAT"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "DATE_FORMAT"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "DEFAULT_AUTHENTICATION_PLUGIN"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "DEFAULT_PASSWORD_LIFETIME"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "DELAYED_INSERT_LIMIT"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "DELAYED_INSERT_TIMEOUT"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "DELAYED_QUEUE_SIZE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "DELAY_KEY_WRITE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "DISABLED_STORAGE_ENGINES"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "DISCONNECT_ON_EXPIRED_PASSWORD"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "ENFORCE_GTID_CONSISTENCY"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "EVENT_SCHEDULER"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "EXECUTED_GTIDS_COMPRESSION_PERIOD"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "EXPIRE_LOGS_DAYS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "FLUSH"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "FLUSH_TIME"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "FT_BOOLEAN_SYNTAX"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "FT_MAX_WORD_LEN"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "FT_MIN_WORD_LEN"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "FT_QUERY_EXPANSION_LIMIT"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "FT_STOPWORD_FILE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "GENERAL_LOG"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "GENERAL_LOG_FILE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "GTID_EXECUTED_COMPRESSION_PERIOD"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "GTID_MODE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "GTID_PURGED"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "HAVE_COMPRESS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "HAVE_CRYPT"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "HAVE_DYNAMIC_LOADING"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "HAVE_GEOMETRY"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "HAVE_OPENSSL"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "HAVE_PROFILING"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "HAVE_QUERY_CACHE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "HAVE_RTREE_KEYS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "HAVE_SSL"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "HAVE_STATEMENT_TIMEOUT"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "HAVE_SYMLINK"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "HOSTNAME"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "HOST_CACHE_SIZE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "IGNORE_BUILTIN_INNODB"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "IGNORE_DB_DIRS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INIT_CONNECT"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INIT_FILE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INIT_SLAVE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_ADAPTIVE_FLUSHING"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_ADAPTIVE_FLUSHING_LWM"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_FLUSH_SYNC"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_ADAPTIVE_HASH_INDEX"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_ADAPTIVE_HASH_INDEX_PARTS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_ADAPTIVE_MAX_SLEEP_DELAY"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_AUTOEXTEND_INCREMENT"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_AUTOINC_LOCK_MODE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_BACKGROUND_DROP_LIST_EMPTY"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_BUFFER_POOL_CHUNK_SIZE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_BUFFER_POOL_DUMP_AT_SHUTDOWN"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_BUFFER_POOL_DUMP_NOW"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_BUFFER_POOL_DUMP_PCT"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_BUFFER_POOL_EVICT"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_BUFFER_POOL_FILENAME"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_BUFFER_POOL_INSTANCES"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_BUFFER_POOL_LOAD_ABORT"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_BUFFER_POOL_LOAD_AT_STARTUP"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_BUFFER_POOL_LOAD_NOW"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_BUFFER_POOL_SIZE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_BUF_FLUSH_LIST_NOW"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_CHANGE_BUFFERING"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_CHANGE_BUFFERING_DEBUG"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_CHANGE_BUFFER_MAX_SIZE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_CHECKSUMS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_CHECKSUM_ALGORITHM"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_CMP_PER_INDEX_ENABLED"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_COMMIT_CONCURRENCY"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_COMPRESS_DEBUG"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_COMPRESSION_FAILURE_THRESHOLD_PCT"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_COMPRESSION_LEVEL"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_COMPRESSION_PAD_PCT_MAX"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_CONCURRENCY_TICKETS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_DATA_FILE_PATH"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_DATA_HOME_DIR"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_DEFAULT_ROW_FORMAT"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_DICT_STATS_DISABLED_DEBUG"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_DISABLE_BACKGROUND_MERGE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_DISABLE_RESIZE_BUFFER_POOL_DEBUG"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_DISABLE_SORT_FILE_CACHE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_DOUBLEWRITE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_FAST_SHUTDOWN"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_FILE_PER_TABLE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_FILL_FACTOR"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_FIL_MAKE_PAGE_DIRTY_DEBUG"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_FLUSHING_AVG_LOOPS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_FLUSH_LOG_AT_TIMEOUT"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_FLUSH_LOG_AT_TRX_COMMIT"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_FLUSH_METHOD"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_FLUSH_NEIGHBORS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_FORCE_LOAD_CORRUPTED"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_FORCE_RECOVERY"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_FT_AUX_TABLE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_FT_CACHE_SIZE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_FT_ENABLE_DIAG_PRINT"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_FT_MAX_TOKEN_SIZE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_FT_MIN_TOKEN_SIZE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_FT_NUM_WORD_OPTIMIZE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_FT_RESULT_CACHE_LIMIT"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_FT_SERVER_STOPWORD_TABLE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_FT_SORT_PLL_DEGREE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_FT_TOTAL_CACHE_SIZE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_IO_CAPACITY"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_IO_CAPACITY_MAX"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_LARGE_PREFIX"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_LIMIT_OPTIMISTIC_INSERT_DEBUG"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_LOCKS_UNSAFE_FOR_BINLOG"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_LOG_BUFFER_SIZE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_LOG_CHECKPOINT_NOW"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_LOG_CHECKSUMS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_LOG_COMPRESSED_PAGES"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_LOG_FILES_IN_GROUP"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_LOG_FILE_SIZE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_LOG_GROUP_HOME_DIR"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_LOG_WRITE_AHEAD_SIZE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_LRU_SCAN_DEPTH"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_MASTER_THREAD_DISABLED_DEBUG"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_MAX_DIRTY_PAGES_PCT"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_MAX_DIRTY_PAGES_PCT_LWM"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_MAX_PURGE_LAG"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_MAX_PURGE_LAG_DELAY"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_MAX_UNDO_LOG_SIZE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_MERGE_THRESHOLD_SET_ALL_DEBUG"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_MONITOR_DISABLE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_MONITOR_ENABLE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_MONITOR_RESET"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_MONITOR_RESET_ALL"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_NUMA_INTERLEAVE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_OLD_BLOCKS_PCT"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_OLD_BLOCKS_TIME"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_ONLINE_ALTER_LOG_MAX_SIZE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_OPEN_FILES"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_OPTIMIZE_FULLTEXT_ONLY"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_PAGE_CLEANERS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_PAGE_CLEANER_DISABLED_DEBUG"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_PAGE_SIZE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_PRINT_ALL_DEADLOCKS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_PURGE_BATCH_SIZE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_PURGE_RSEG_TRUNCATE_FREQUENCY"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_PURGE_THREADS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_RANDOM_READ_AHEAD"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_READ_AHEAD_THRESHOLD"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_READ_IO_THREADS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_READ_ONLY"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_REPLICATION_DELAY"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_ROLLBACK_ON_TIMEOUT"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_ROLLBACK_SEGMENTS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_SAVED_PAGE_NUMBER_DEBUG"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_SEMAPHORE_WAIT_TIMEOUT_DEBUG"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_SORT_BUFFER_SIZE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_SPIN_WAIT_DELAY"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_STATS_AUTO_RECALC"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_STATS_METHOD"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_STATS_ON_METADATA"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_STATS_PERSISTENT"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_STATS_PERSISTENT_SAMPLE_PAGES"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_STATS_SAMPLE_PAGES"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_STATS_TRANSIENT_SAMPLE_PAGES"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_STATUS_OUTPUT"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_STATUS_OUTPUT_LOCKS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_SYNC_ARRAY_SIZE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_SYNC_SPIN_LOOPS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_SYNC_DEBUG"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_TEMP_DATA_FILE_PATH"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_THREAD_CONCURRENCY"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_THREAD_SLEEP_DELAY"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_TRX_PURGE_VIEW_UPDATE_ONLY_DEBUG"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_TRX_RSEG_N_SLOTS_DEBUG"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_UNDO_DIRECTORY"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_UNDO_LOG_TRUNCATE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_UNDO_LOGS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_UNDO_TABLESPACES"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_USE_NATIVE_AIO"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_VERSION"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_WRITE_IO_THREADS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INTERNAL_TMP_DISK_STORAGE_ENGINE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "KEY_BUFFER_SIZE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "KEY_CACHE_AGE_THRESHOLD"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "KEY_CACHE_BLOCK_SIZE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "KEY_CACHE_DIVISION_LIMIT"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "LARGE_FILES_SUPPORT"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "LARGE_PAGES"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "LARGE_PAGE_SIZE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "LC_MESSAGES_DIR"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "LICENSE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "LOCAL_INFILE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "LOCKED_IN_MEMORY"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "LOG_BIN"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "LOG_BIN_BASENAME"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "LOG_BIN_INDEX"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "LOG_BIN_TRUST_FUNCTION_CREATORS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "LOG_BIN_USE_V1_ROW_EVENTS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "LOG_BUILTIN_AS_IDENTIFIED_BY_PASSWORD"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "LOG_ERROR"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "LOG_ERROR_VERBOSITY"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "LOG_OUTPUT"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "LOG_QUERIES_NOT_USING_INDEXES"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "LOG_SLAVE_UPDATES"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "LOG_SLOW_ADMIN_STATEMENTS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "LOG_SLOW_SLAVE_STATEMENTS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "LOG_SYSLOG"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "LOG_SYSLOG_FACILITY"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "LOG_SYSLOG_INCLUDE_PID"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "LOG_SYSLOG_TAG"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "LOG_THROTTLE_QUERIES_NOT_USING_INDEXES"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "LOG_TIMESTAMPS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "LOG_WARNINGS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "LOWER_CASE_FILE_SYSTEM"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "LOWER_CASE_TABLE_NAMES"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "MASTER_INFO_REPOSITORY"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "MASTER_VERIFY_CHECKSUM"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "MAX_BINLOG_CACHE_SIZE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "MAX_BINLOG_SIZE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "MAX_BINLOG_STMT_CACHE_SIZE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "MAX_CONNECTIONS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "MAX_CONNECT_ERRORS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "MAX_DIGEST_LENGTH"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "MAX_PREPARED_STMT_COUNT"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "MAX_RELAY_LOG_SIZE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "MAX_WRITE_LOCK_COUNT"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "METADATA_LOCKS_CACHE_SIZE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "METADATA_LOCKS_HASH_INSTANCES"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "MYISAM_DATA_POINTER_SIZE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "MYISAM_MAX_SORT_FILE_SIZE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "MYISAM_MMAP_SIZE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "MYISAM_RECOVER_OPTIONS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "MYISAM_USE_MMAP"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "MYSQL_NATIVE_PASSWORD_PROXY_USERS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "NAMED_PIPE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "NAMED_PIPE_FULL_ACCESS_GROUP"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "NDBINFO_DATABASE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "NDBINFO_OFFLINE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "NDBINFO_TABLE_PREFIX"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "NDBINFO_VERSION"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "NGRAM_TOKEN_SIZE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "OFFLINE_MODE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "OLD"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "OPEN_FILES_LIMIT"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "PERFORMANCE_SCHEMA"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "PERFORMANCE_SCHEMA_ACCOUNTS_SIZE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "PERFORMANCE_SCHEMA_DIGESTS_SIZE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "PERFORMANCE_SCHEMA_EVENTS_STAGES_HISTORY_LONG_SIZE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "PERFORMANCE_SCHEMA_EVENTS_STAGES_HISTORY_SIZE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "PERFORMANCE_SCHEMA_EVENTS_STATEMENTS_HISTORY_LONG_SIZE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "PERFORMANCE_SCHEMA_EVENTS_STATEMENTS_HISTORY_SIZE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "PERFORMANCE_SCHEMA_EVENTS_TRANSACTIONS_HISTORY_LONG_SIZE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "PERFORMANCE_SCHEMA_EVENTS_TRANSACTIONS_HISTORY_SIZE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "PERFORMANCE_SCHEMA_EVENTS_WAITS_HISTORY_LONG_SIZE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "PERFORMANCE_SCHEMA_EVENTS_WAITS_HISTORY_SIZE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "PERFORMANCE_SCHEMA_HOSTS_SIZE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "PERFORMANCE_SCHEMA_MAX_COND_CLASSES"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "PERFORMANCE_SCHEMA_MAX_COND_INSTANCES"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "PERFORMANCE_SCHEMA_MAX_DIGEST_LENGTH"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "PERFORMANCE_SCHEMA_MAX_FILE_CLASSES"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "PERFORMANCE_SCHEMA_MAX_FILE_HANDLES"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "PERFORMANCE_SCHEMA_MAX_FILE_INSTANCES"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "PERFORMANCE_SCHEMA_MAX_INDEX_STAT"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "PERFORMANCE_SCHEMA_MAX_MEMORY_CLASSES"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "PERFORMANCE_SCHEMA_MAX_METADATA_LOCKS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "PERFORMANCE_SCHEMA_MAX_MUTEX_CLASSES"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "PERFORMANCE_SCHEMA_MAX_MUTEX_INSTANCES"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "PERFORMANCE_SCHEMA_MAX_PREPARED_STATEMENTS_INSTANCES"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "PERFORMANCE_SCHEMA_MAX_PROGRAM_INSTANCES"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "PERFORMANCE_SCHEMA_MAX_RWLOCK_CLASSES"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "PERFORMANCE_SCHEMA_MAX_RWLOCK_INSTANCES"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "PERFORMANCE_SCHEMA_MAX_SOCKET_CLASSES"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "PERFORMANCE_SCHEMA_MAX_SOCKET_INSTANCES"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "PERFORMANCE_SCHEMA_MAX_SQL_TEXT_LENGTH"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "PERFORMANCE_SCHEMA_MAX_STAGE_CLASSES"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "PERFORMANCE_SCHEMA_MAX_STATEMENT_CLASSES"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "PERFORMANCE_SCHEMA_MAX_STATEMENT_STACK"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "PERFORMANCE_SCHEMA_MAX_TABLE_HANDLES"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "PERFORMANCE_SCHEMA_MAX_TABLE_INSTANCES"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "PERFORMANCE_SCHEMA_MAX_TABLE_LOCK_STAT"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "PERFORMANCE_SCHEMA_MAX_THREAD_CLASSES"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "PERFORMANCE_SCHEMA_MAX_THREAD_INSTANCES"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "PERFORMANCE_SCHEMA_SESSION_CONNECT_ATTRS_SIZE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "PERFORMANCE_SCHEMA_SETUP_ACTORS_SIZE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "PERFORMANCE_SCHEMA_SETUP_OBJECTS_SIZE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "PERFORMANCE_SCHEMA_USERS_SIZE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "PID_FILE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "PLUGIN_DIR"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "PORT"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "PROTOCOL_VERSION"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "QUERY_CACHE_LIMIT"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "QUERY_CACHE_MIN_RES_UNIT"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "QUERY_CACHE_SIZE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "READ_ONLY"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "RELAY_LOG"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "RELAY_LOG_BASENAME"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "RELAY_LOG_INDEX"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "RELAY_LOG_INFO_FILE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "RELAY_LOG_INFO_REPOSITORY"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "RELAY_LOG_PURGE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "RELAY_LOG_RECOVERY"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "RELAY_LOG_SPACE_LIMIT"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "REPORT_HOST"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "REPORT_PASSWORD"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "REPORT_PORT"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "REPORT_USER"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "RPL_STOP_SLAVE_TIMEOUT"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "SECURE_AUTH"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "SECURE_FILE_PRIV"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "SERVER_ID"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "SERVER_ID_BITS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "SERVER_UUID"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "SHA256_PASSWORD_AUTO_GENERATE_RSA_KEYS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "SHA256_PASSWORD_PRIVATE_KEY_PATH"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "SHA256_PASSWORD_PUBLIC_KEY_PATH"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "SHARED_MEMORY"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "SHARED_MEMORY_BASE_NAME"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "SHA256_PASSWORD_PROXY_USERS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "SHOW_COMPATIBILITY_56"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "SIMPLIFIED_BINLOG_GTID_RECOVERY"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "SKIP_EXTERNAL_LOCKING"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "SKIP_NAME_RESOLVE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "SKIP_NETWORKING"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "SKIP_SHOW_DATABASE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "SLAVE_ALLOW_BATCHING"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "SLAVE_CHECKPOINT_GROUP"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "SLAVE_CHECKPOINT_PERIOD"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "SLAVE_COMPRESSED_PROTOCOL"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "SLAVE_EXEC_MODE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "SLAVE_LOAD_TMPDIR"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "SLAVE_MAX_ALLOWED_PACKET"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "SLAVE_NET_TIMEOUT"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "SLAVE_PARALLEL_TYPE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "SLAVE_PARALLEL_WORKERS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "SLAVE_PENDING_JOBS_SIZE_MAX"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "SLAVE_PRESERVE_COMMIT_ORDER"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "SLAVE_ROWS_SEARCH_ALGORITHMS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "SLAVE_SKIP_ERRORS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "SLAVE_SQL_VERIFY_CHECKSUM"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "SLAVE_TRANSACTION_RETRIES"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "SLAVE_TYPE_CONVERSIONS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "SLOW_LAUNCH_TIME"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "SLOW_QUERY_LOG"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "SLOW_QUERY_LOG_FILE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "SOCKET"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "SQL_SLAVE_SKIP_COUNTER"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "SSL_CA"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "SSL_CAPATH"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "SSL_CERT"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "SSL_CIPHER"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "SSL_CRL"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "SSL_CRLPATH"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "SSL_KEY"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "SUPER_READ_ONLY"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "STORED_PROGRAM_CACHE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "SYNC_BINLOG"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "SYNC_FRM"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "SYNC_MASTER_INFO"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "SYNC_RELAY_LOG"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "SYNC_RELAY_LOG_INFO"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "SYSTEM_TIME_ZONE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "TABLE_DEFINITION_CACHE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "TABLE_OPEN_CACHE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "TABLE_OPEN_CACHE_INSTANCES"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "THREAD_CACHE_SIZE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "THREAD_HANDLING"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "THREAD_STACK"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "TIME_FORMAT"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "TMPDIR"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "VERSION"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "VERSION_COMMENT"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "VERSION_COMPILE_MACHINE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "VERSION_COMPILE_OS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "REQUIRE_SECURE_TRANSPORT")
+;
+--enable_query_log
+
+--echo #
+--echo # STEP 2-15
+--echo # Known global status in 5.6 that should not exist in session queries.
+--echo # These should be global-only status variables.
+--disable_query_log
+insert into test.sanity values
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "ABORTED_CLIENTS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "ABORTED_CONNECTS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "BINLOG_CACHE_DISK_USE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "BINLOG_CACHE_USE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "BINLOG_STMT_CACHE_DISK_USE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "BINLOG_STMT_CACHE_USE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "CONNECTIONS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "CONNECTION_ERRORS_ACCEPT"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "CONNECTION_ERRORS_INTERNAL"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "CONNECTION_ERRORS_MAX_CONNECTIONS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "CONNECTION_ERRORS_PEER_ADDRESS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "CONNECTION_ERRORS_SELECT"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "CONNECTION_ERRORS_TCPWRAP"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "CREATED_TMP_FILES"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "DELAYED_ERRORS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "DELAYED_INSERT_THREADS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "DELAYED_WRITES"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "FLUSH_COMMANDS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "INNODB_AHI_DROP_LOOKUPS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "INNODB_AVAILABLE_UNDO_LOGS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "INNODB_BUFFER_POOL_BYTES_DATA"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "INNODB_BUFFER_POOL_BYTES_DIRTY"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "INNODB_BUFFER_POOL_DUMP_STATUS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "INNODB_BUFFER_POOL_LOAD_STATUS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "INNODB_BUFFER_POOL_PAGES_DATA"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "INNODB_BUFFER_POOL_PAGES_DIRTY"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "INNODB_BUFFER_POOL_PAGES_FLUSHED"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "INNODB_BUFFER_POOL_PAGES_FREE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "INNODB_BUFFER_POOL_PAGES_LATCHED"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "INNODB_BUFFER_POOL_PAGES_MISC"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "INNODB_BUFFER_POOL_PAGES_TOTAL"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "INNODB_BUFFER_POOL_READS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "INNODB_BUFFER_POOL_READ_AHEAD"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "INNODB_BUFFER_POOL_READ_AHEAD_EVICTED"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "INNODB_BUFFER_POOL_READ_AHEAD_RND"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "INNODB_BUFFER_POOL_READ_REQUESTS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "INNODB_BUFFER_POOL_RESIZE_STATUS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "INNODB_BUFFER_POOL_WAIT_FREE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "INNODB_BUFFER_POOL_WRITE_REQUESTS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "INNODB_DATA_FSYNCS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "INNODB_DATA_PENDING_FSYNCS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "INNODB_DATA_PENDING_READS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "INNODB_DATA_PENDING_WRITES"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "INNODB_DATA_READ"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "INNODB_DATA_READS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "INNODB_DATA_WRITES"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "INNODB_DATA_WRITTEN"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "INNODB_DBLWR_PAGES_WRITTEN"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "INNODB_DBLWR_WRITES"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "INNODB_HAVE_ATOMIC_BUILTINS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "INNODB_LOG_WAITS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "INNODB_LOG_WRITES"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "INNODB_LOG_WRITE_REQUESTS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "INNODB_NUM_OPEN_FILES"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "INNODB_OS_LOG_FSYNCS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "INNODB_OS_LOG_PENDING_FSYNCS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "INNODB_OS_LOG_PENDING_WRITES"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "INNODB_OS_LOG_WRITTEN"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "INNODB_PAGES_CREATED"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "INNODB_PAGES_READ"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "INNODB_PAGES_WRITTEN"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "INNODB_PAGE_SIZE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "INNODB_PURGE_TRX_ID_AGE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "INNODB_PURGE_VIEW_TRX_ID_AGE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "INNODB_ROWS_DELETED"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "INNODB_ROWS_INSERTED"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "INNODB_ROWS_READ"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "INNODB_ROWS_UPDATED"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "INNODB_ROW_LOCK_CURRENT_WAITS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "INNODB_ROW_LOCK_TIME"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "INNODB_ROW_LOCK_TIME_AVG"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "INNODB_ROW_LOCK_TIME_MAX"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "INNODB_ROW_LOCK_WAITS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "INNODB_TRUNCATED_STATUS_WRITES"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "KEY_BLOCKS_NOT_FLUSHED"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "KEY_BLOCKS_UNUSED"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "KEY_BLOCKS_USED"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "KEY_READS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "KEY_READ_REQUESTS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "KEY_WRITES"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "KEY_WRITE_REQUESTS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "LOCKED_CONNECTS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "MAX_USED_CONNECTIONS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "MAX_USED_CONNECTIONS_TIME"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "NOT_FLUSHED_DELAYED_ROWS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "OPENED_FILES"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "OPEN_FILES"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "OPEN_STREAMS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "OPEN_TABLE_DEFINITIONS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "ONGOING_ANONYMOUS_TRANSACTION_COUNT"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "PERFORMANCE_SCHEMA_ACCOUNTS_LOST"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "PERFORMANCE_SCHEMA_COND_CLASSES_LOST"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "PERFORMANCE_SCHEMA_COND_INSTANCES_LOST"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "PERFORMANCE_SCHEMA_DIGEST_LOST"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "PERFORMANCE_SCHEMA_FILE_CLASSES_LOST"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "PERFORMANCE_SCHEMA_FILE_HANDLES_LOST"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "PERFORMANCE_SCHEMA_FILE_INSTANCES_LOST"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "PERFORMANCE_SCHEMA_INDEX_STAT_LOST"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "PERFORMANCE_SCHEMA_HOSTS_LOST"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "PERFORMANCE_SCHEMA_LOCKER_LOST"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "PERFORMANCE_SCHEMA_MEMORY_CLASSES_LOST"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "PERFORMANCE_SCHEMA_METADATA_LOCK_LOST"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "PERFORMANCE_SCHEMA_MUTEX_CLASSES_LOST"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "PERFORMANCE_SCHEMA_MUTEX_INSTANCES_LOST"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "PERFORMANCE_SCHEMA_NESTED_STATEMENT_LOST"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "PERFORMANCE_SCHEMA_PREPARED_STATEMENTS_LOST"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "PERFORMANCE_SCHEMA_PROGRAM_LOST"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "PERFORMANCE_SCHEMA_RWLOCK_CLASSES_LOST"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "PERFORMANCE_SCHEMA_RWLOCK_INSTANCES_LOST"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "PERFORMANCE_SCHEMA_SESSION_CONNECT_ATTRS_LOST"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "PERFORMANCE_SCHEMA_SOCKET_CLASSES_LOST"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "PERFORMANCE_SCHEMA_SOCKET_INSTANCES_LOST"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "PERFORMANCE_SCHEMA_STAGE_CLASSES_LOST"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "PERFORMANCE_SCHEMA_STATEMENT_CLASSES_LOST"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "PERFORMANCE_SCHEMA_TABLE_HANDLES_LOST"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "PERFORMANCE_SCHEMA_TABLE_INSTANCES_LOST"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "PERFORMANCE_SCHEMA_TABLE_LOCK_STAT_LOST"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "PERFORMANCE_SCHEMA_THREAD_CLASSES_LOST"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "PERFORMANCE_SCHEMA_THREAD_INSTANCES_LOST"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "PERFORMANCE_SCHEMA_USERS_LOST"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "PREPARED_STMT_COUNT"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "QCACHE_FREE_BLOCKS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "QCACHE_FREE_MEMORY"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "QCACHE_HITS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "QCACHE_INSERTS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "QCACHE_LOWMEM_PRUNES"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "QCACHE_NOT_CACHED"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "QCACHE_QUERIES_IN_CACHE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "QCACHE_TOTAL_BLOCKS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "RSA_PUBLIC_KEY"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "SLAVE_OPEN_TEMP_TABLES"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "SLAVE_ROWS_LAST_SEARCH_ALGORITHM_USED"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "SSL_ACCEPTS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "SSL_ACCEPT_RENEGOTIATES"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "SSL_CALLBACK_CACHE_HITS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "SSL_CLIENT_CONNECTS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "SSL_CONNECT_RENEGOTIATES"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "SSL_CTX_VERIFY_DEPTH"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "SSL_CTX_VERIFY_MODE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "SSL_FINISHED_ACCEPTS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "SSL_FINISHED_CONNECTS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "SSL_SESSION_CACHE_HITS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "SSL_SESSION_CACHE_MISSES"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "SSL_SESSION_CACHE_MODE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "SSL_SESSION_CACHE_OVERFLOWS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "SSL_SESSION_CACHE_SIZE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "SSL_SESSION_CACHE_TIMEOUTS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "SSL_USED_SESSION_CACHE_ENTRIES"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "TABLE_LOCKS_IMMEDIATE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "TABLE_LOCKS_WAITED"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "TC_LOG_MAX_PAGES_USED"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "TC_LOG_PAGE_SIZE"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "TC_LOG_PAGE_WAITS"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "THREADS_CACHED"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "THREADS_CONNECTED"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "THREADS_CREATED"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "THREADS_RUNNING"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "UPTIME"),
+ ("JUNK: GLOBAL-ONLY", "I_S.SESSION_STATUS", "UPTIME_SINCE_FLUSH_STATUS")
+;
+--enable_query_log
+
+--echo #
+--echo # STEP 2-15A
+--echo # COM counters appear in I_S.SESSION_STATUS, but not in P_S.SESSION_STATUS
+--disable_query_log
+insert into test.sanity values
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_ADMIN_COMMANDS"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_ALTER_DB"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_ALTER_DB_UPGRADE"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_ALTER_EVENT"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_ALTER_FUNCTION"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_ALTER_INSTANCE"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_ALTER_PROCEDURE"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_ALTER_SERVER"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_ALTER_TABLE"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_ALTER_TABLESPACE"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_ALTER_USER"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_ANALYZE"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_ASSIGN_TO_KEYCACHE"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_BEGIN"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_BINLOG"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_CALL_PROCEDURE"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_CHANGE_DB"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_CHANGE_MASTER"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_CHANGE_REPL_FILTER"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_CHECK"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_CHECKSUM"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_COMMIT"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_CREATE_DB"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_CREATE_EVENT"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_CREATE_FUNCTION"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_CREATE_INDEX"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_CREATE_PROCEDURE"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_CREATE_SERVER"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_CREATE_TABLE"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_CREATE_TRIGGER"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_CREATE_UDF"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_CREATE_USER"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_CREATE_VIEW"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_DEALLOC_SQL"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_DELETE"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_DELETE_MULTI"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_DO"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_DROP_DB"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_DROP_EVENT"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_DROP_FUNCTION"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_DROP_INDEX"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_DROP_PROCEDURE"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_DROP_SERVER"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_DROP_TABLE"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_DROP_TRIGGER"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_DROP_USER"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_DROP_VIEW"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_EMPTY_QUERY"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_EXECUTE_SQL"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_EXPLAIN_OTHER"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_FLUSH"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_GET_DIAGNOSTICS"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_GROUP_REPLICATION_START"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_GROUP_REPLICATION_STOP"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_GRANT"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_HA_CLOSE"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_HA_OPEN"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_HA_READ"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_HELP"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_INSERT"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_INSERT_SELECT"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_INSTALL_PLUGIN"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_KILL"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_LOAD"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_LOCK_TABLES"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_OPTIMIZE"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_PRELOAD_KEYS"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_PREPARE_SQL"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_PURGE"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_PURGE_BEFORE_DATE"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_RELEASE_SAVEPOINT"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_RENAME_TABLE"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_RENAME_USER"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_REPAIR"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_REPLACE"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_REPLACE_SELECT"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_RESET"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_RESIGNAL"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_REVOKE"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_REVOKE_ALL"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_ROLLBACK"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_ROLLBACK_TO_SAVEPOINT"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_SAVEPOINT"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_SELECT"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_SET_OPTION"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_SHOW_BINLOGS"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_SHOW_BINLOG_EVENTS"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_SHOW_CHARSETS"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_SHOW_COLLATIONS"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_SHOW_CREATE_DB"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_SHOW_CREATE_EVENT"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_SHOW_CREATE_FUNC"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_SHOW_CREATE_PROC"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_SHOW_CREATE_TABLE"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_SHOW_CREATE_TRIGGER"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_SHOW_CREATE_USER"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_SHOW_DATABASES"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_SHOW_ENGINE_LOGS"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_SHOW_ENGINE_MUTEX"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_SHOW_ENGINE_STATUS"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_SHOW_ERRORS"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_SHOW_EVENTS"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_SHOW_FIELDS"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_SHOW_FUNCTION_CODE"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_SHOW_FUNCTION_STATUS"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_SHOW_GRANTS"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_SHOW_KEYS"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_SHOW_MASTER_STATUS"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_SHOW_OPEN_TABLES"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_SHOW_PLUGINS"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_SHOW_PRIVILEGES"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_SHOW_PROCEDURE_CODE"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_SHOW_PROCEDURE_STATUS"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_SHOW_PROCESSLIST"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_SHOW_PROFILE"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_SHOW_PROFILES"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_SHOW_RELAYLOG_EVENTS"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_SHOW_SLAVE_HOSTS"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_SHOW_SLAVE_STATUS"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_SHOW_SLAVE_STATUS_NONBLOCKING"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_SHOW_STATUS"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_SHOW_STORAGE_ENGINES"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_SHOW_TABLES"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_SHOW_TABLE_STATUS"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_SHOW_TRIGGERS"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_SHOW_VARIABLES"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_SHOW_WARNINGS"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_SIGNAL"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_SLAVE_START"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_SLAVE_STOP"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_STMT_CLOSE"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_STMT_EXECUTE"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_STMT_FETCH"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_STMT_PREPARE"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_STMT_RESET"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_STMT_SEND_LONG_DATA"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_TRUNCATE"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_UNINSTALL_PLUGIN"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_UNLOCK_TABLES"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_UPDATE"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_UPDATE_MULTI"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_XA_COMMIT"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_XA_END"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_XA_PREPARE"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_XA_RECOVER"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_XA_ROLLBACK"),
+ ("JUNK: COM COUNTER", "I_S.SESSION_STATUS", "COM_XA_START")
+;
+
+--enable_query_log
+
+--echo #
+--echo # STEP 2-15B
+--echo # These slave status counters appear in I_S.SESSION_STATUS, but not in P_S.SESSION_STATUS
+insert into test.sanity values
+ ("JUNK: SLAVE-ONLY", "I_S.SESSION_STATUS", "SLAVE_HEARTBEAT_PERIOD"),
+ ("JUNK: SLAVE-ONLY", "I_S.SESSION_STATUS", "SLAVE_LAST_HEARTBEAT"),
+ ("JUNK: SLAVE-ONLY", "I_S.SESSION_STATUS", "SLAVE_RECEIVED_HEARTBEATS"),
+ ("JUNK: SLAVE-ONLY", "I_S.SESSION_STATUS", "SLAVE_RETRIED_TRANSACTIONS"),
+ ("JUNK: SLAVE-ONLY", "I_S.SESSION_STATUS", "SLAVE_RUNNING")
+;
+
+--echo #
+--echo # STEP 2-16
+--echo # Known session-only status in 5.6 that should not exist in global queries.
+insert into test.sanity values
+ ("JUNK: SESSION-ONLY", "I_S.GLOBAL_STATUS", "COMPRESSION"),
+ ("JUNK: SESSION-ONLY", "I_S.GLOBAL_STATUS", "LAST_QUERY_COST"),
+ ("JUNK: SESSION-ONLY", "I_S.GLOBAL_STATUS", "LAST_QUERY_PARTIAL_PLANS")
+;
+
+--echo #
+--echo # STEP 2-16A
+--echo # COM counters appear in I_S.GLOBAL_STATUS but not in P_S.GLOBAL_STATUS
+--disable_query_log
+insert into test.sanity values
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_ADMIN_COMMANDS"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_ALTER_DB"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_ALTER_DB_UPGRADE"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_ALTER_EVENT"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_ALTER_FUNCTION"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_ALTER_INSTANCE"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_ALTER_PROCEDURE"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_ALTER_SERVER"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_ALTER_TABLE"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_ALTER_TABLESPACE"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_ALTER_USER"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_ANALYZE"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_ASSIGN_TO_KEYCACHE"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_BEGIN"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_BINLOG"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_CALL_PROCEDURE"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_CHANGE_DB"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_CHANGE_MASTER"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_CHANGE_REPL_FILTER"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_CHECK"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_CHECKSUM"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_COMMIT"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_CREATE_DB"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_CREATE_EVENT"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_CREATE_FUNCTION"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_CREATE_INDEX"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_CREATE_PROCEDURE"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_CREATE_SERVER"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_CREATE_TABLE"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_CREATE_TRIGGER"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_CREATE_UDF"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_CREATE_USER"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_CREATE_VIEW"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_DEALLOC_SQL"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_DELETE"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_DELETE_MULTI"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_DO"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_DROP_DB"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_DROP_EVENT"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_DROP_FUNCTION"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_DROP_INDEX"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_DROP_PROCEDURE"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_DROP_SERVER"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_DROP_TABLE"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_DROP_TRIGGER"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_DROP_USER"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_DROP_VIEW"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_EMPTY_QUERY"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_EXECUTE_SQL"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_EXPLAIN_OTHER"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_FLUSH"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_GET_DIAGNOSTICS"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_GRANT"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_GROUP_REPLICATION_START"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_GROUP_REPLICATION_STOP"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_HA_CLOSE"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_HA_OPEN"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_HA_READ"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_HELP"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_INSERT"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_INSERT_SELECT"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_INSTALL_PLUGIN"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_KILL"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_LOAD"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_LOCK_TABLES"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_OPTIMIZE"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_PRELOAD_KEYS"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_PREPARE_SQL"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_PURGE"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_PURGE_BEFORE_DATE"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_RELEASE_SAVEPOINT"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_RENAME_TABLE"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_RENAME_USER"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_REPAIR"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_REPLACE"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_REPLACE_SELECT"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_RESET"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_RESIGNAL"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_REVOKE"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_REVOKE_ALL"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_ROLLBACK"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_ROLLBACK_TO_SAVEPOINT"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_SAVEPOINT"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_SELECT"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_SET_OPTION"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_SHOW_BINLOGS"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_SHOW_BINLOG_EVENTS"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_SHOW_CHARSETS"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_SHOW_COLLATIONS"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_SHOW_CREATE_DB"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_SHOW_CREATE_EVENT"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_SHOW_CREATE_FUNC"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_SHOW_CREATE_PROC"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_SHOW_CREATE_TABLE"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_SHOW_CREATE_TRIGGER"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_SHOW_CREATE_USER"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_SHOW_DATABASES"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_SHOW_ENGINE_LOGS"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_SHOW_ENGINE_MUTEX"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_SHOW_ENGINE_STATUS"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_SHOW_ERRORS"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_SHOW_EVENTS"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_SHOW_FIELDS"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_SHOW_FUNCTION_CODE"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_SHOW_FUNCTION_STATUS"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_SHOW_GRANTS"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_SHOW_KEYS"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_SHOW_MASTER_STATUS"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_SHOW_OPEN_TABLES"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_SHOW_PLUGINS"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_SHOW_PRIVILEGES"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_SHOW_PROCEDURE_CODE"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_SHOW_PROCEDURE_STATUS"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_SHOW_PROCESSLIST"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_SHOW_PROFILE"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_SHOW_PROFILES"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_SHOW_RELAYLOG_EVENTS"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_SHOW_SLAVE_HOSTS"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_SHOW_SLAVE_STATUS"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_SHOW_SLAVE_STATUS_NONBLOCKING"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_SHOW_STATUS"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_SHOW_STORAGE_ENGINES"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_SHOW_TABLES"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_SHOW_TABLE_STATUS"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_SHOW_TRIGGERS"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_SHOW_VARIABLES"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_SHOW_WARNINGS"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_SIGNAL"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_SLAVE_START"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_SLAVE_STOP"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_STMT_CLOSE"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_STMT_EXECUTE"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_STMT_FETCH"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_STMT_PREPARE"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_STMT_RESET"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_STMT_SEND_LONG_DATA"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_TRUNCATE"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_UNINSTALL_PLUGIN"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_UNLOCK_TABLES"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_UPDATE"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_UPDATE_MULTI"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_XA_COMMIT"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_XA_END"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_XA_PREPARE"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_XA_RECOVER"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_XA_ROLLBACK"),
+ ("JUNK: COM COUNTER", "I_S.GLOBAL_STATUS", "COM_XA_START")
+ ;
+
+--enable_query_log
+
+--echo #
+--echo # STEP 2-16B
+--echo # These slave status counters appear in I_S.GLOBAL_STATUS, but not in P_S.GLOBAL_STATUS
+insert into test.sanity values
+ ("JUNK: SLAVE-ONLY", "I_S.GLOBAL_STATUS", "SLAVE_HEARTBEAT_PERIOD"),
+ ("JUNK: SLAVE-ONLY", "I_S.GLOBAL_STATUS", "SLAVE_LAST_HEARTBEAT"),
+ ("JUNK: SLAVE-ONLY", "I_S.GLOBAL_STATUS", "SLAVE_RECEIVED_HEARTBEATS"),
+ ("JUNK: SLAVE-ONLY", "I_S.GLOBAL_STATUS", "SLAVE_RETRIED_TRANSACTIONS"),
+ ("JUNK: SLAVE-ONLY", "I_S.GLOBAL_STATUS", "SLAVE_RUNNING")
+;
+
+--echo #
+--echo # STEP 2-17
+--echo # Status variables that should not exist in queries that aggregate across threads.
+--echo # Criteria: Session-only OR non-aggregatable.
+insert into test.sanity values
+ ("JUNK", "NO AGGREGATE", "COMPRESSION"),
+ ("JUNK", "NO AGGREGATE", "LAST_QUERY_COST"),
+ ("JUNK", "NO AGGREGATE", "LAST_QUERY_PARTIAL_PLANS"),
+ ("JUNK", "NO AGGREGATE", "OPEN_TABLES"),
+ ("JUNK", "NO AGGREGATE", "QUERIES"),
+ ("JUNK", "NO AGGREGATE", "SLOW_LAUNCH_THREADS"),
+ ("JUNK", "NO AGGREGATE", "SSL_CIPHER"),
+ ("JUNK", "NO AGGREGATE", "SSL_CIPHER_LIST"),
+ ("JUNK", "NO AGGREGATE", "SSL_DEFAULT_TIMEOUT"),
+ ("JUNK", "NO AGGREGATE", "SSL_SERVER_NOT_AFTER"),
+ ("JUNK", "NO AGGREGATE", "SSL_SERVER_NOT_BEFORE"),
+ ("JUNK", "NO AGGREGATE", "SSL_SESSIONS_REUSED"),
+ ("JUNK", "NO AGGREGATE", "SSL_VERIFY_DEPTH"),
+ ("JUNK", "NO AGGREGATE", "SSL_VERIFY_MODE"),
+ ("JUNK", "NO AGGREGATE", "SSL_VERSION")
+;
+
+#Debug
+#select * from test.sanity order by show_mode, source, variable_name;
+
+--echo #
+--echo # ================================================================================
+--echo # TEST 1A
+--echo # Present in 5.6 P_S.GLOBAL_VARIABLES (1-3)
+--echo # Missing in 5.6 I_S.GLOBAL_VARIABLES (1-1)
+--echo # ================================================================================
+select * from test.sanity
+ where show_mode = "5.6"
+ and source = "P_S.GLOBAL_VARIABLES"
+ and upper(variable_name) not in (
+ select upper(variable_name) from test.sanity
+ where show_mode = "5.6"
+ and source = "I_S.GLOBAL_VARIABLES")
+ order by show_mode, source, variable_name;
+
+--echo #
+--echo # ================================================================================
+--echo # TEST 1B
+--echo # Present in 5.7 P_S.GLOBAL_VARIABLES (2-3)
+--echo # Missing in 5.6 I_S.GLOBAL_VARIABLES (1-1)
+--echo # ================================================================================
+select * from test.sanity
+ where show_mode = "5.7"
+ and source = "P_S.GLOBAL_VARIABLES"
+ and upper(variable_name) not in (
+ select upper(variable_name) from test.sanity
+ where show_mode = "5.6"
+ and source = "I_S.GLOBAL_VARIABLES")
+ order by show_mode, source, variable_name;
+
+--echo #
+--echo # ================================================================================
+--echo # TEST 2A
+--echo # Present in 5.6 I_S.GLOBAL_VARIABLES (1-1)
+--echo # Missing in 5.6 P_S.GLOBAL_VARIABLES (1-3)
+--echo # ================================================================================
+select * from test.sanity
+ where show_mode = "5.6"
+ and source = "I_S.GLOBAL_VARIABLES"
+ and upper(variable_name) not in (
+ select upper(variable_name) from test.sanity
+ where show_mode = "5.6"
+ and source = "P_S.GLOBAL_VARIABLES")
+ order by show_mode, source, variable_name;
+
+--echo #
+--echo # ================================================================================
+--echo # TEST 2B
+--echo # Present in 5.6 I_S.GLOBAL_VARIABLES (1-1)
+--echo # Missing in 5.7 P_S.GLOBAL_VARIABLES (2-3)
+--echo # ================================================================================
+select * from test.sanity
+ where show_mode = "5.6"
+ and source = "I_S.GLOBAL_VARIABLES"
+ and upper(variable_name) not in (
+ select upper(variable_name) from test.sanity
+ where show_mode = "5.7"
+ and source = "P_S.GLOBAL_VARIABLES")
+ order by show_mode, source, variable_name;
+
+--echo #
+--echo # ================================================================================
+--echo # TEST 3A
+--echo # Present in 5.6 P_S.SESSION_VARIABLES (1-5)
+--echo # Missing in 5.6 I_S.SESSION_VARIABLES (1-2)
+--echo # ================================================================================
+select * from test.sanity
+ where show_mode = "5.6"
+ and source = "P_S.SESSION_VARIABLES"
+ and upper(variable_name) not in (
+ select upper(variable_name) from test.sanity
+ where show_mode = "5.6"
+ and source = "I_S.SESSION_VARIABLES")
+ order by show_mode, source, variable_name;
+
+--echo #
+--echo # ================================================================================
+--echo # TEST 3B
+--echo # Present in 5.7 P_S.SESSION_VARIABLES (2-5)
+--echo # Missing in 5.6 I_S.SESSION_VARIABLES (1-2)
+--echo # ================================================================================
+select * from test.sanity
+ where show_mode = "5.7"
+ and source = "P_S.SESSION_VARIABLES"
+ and upper(variable_name) not in (
+ select upper(variable_name) from test.sanity
+ where show_mode = "5.6"
+ and source = "I_S.SESSION_VARIABLES")
+ order by show_mode, source, variable_name;
+
+--echo #
+--echo # ================================================================================
+--echo # TEST 4A
+--echo # Present in 5.6 I_S.SESSION_VARIABLES (1-2)
+--echo # Missing in 5.6 P_S.SESSION_VARIABLES (1-5)
+--echo # ================================================================================
+select * from test.sanity
+ where show_mode = "5.6"
+ and source = "I_S.SESSION_VARIABLES"
+ and upper(variable_name) not in (
+ select upper(variable_name) from test.sanity
+ where show_mode = "5.6"
+ and source = "P_S.SESSION_VARIABLES")
+ order by show_mode, source, variable_name;
+
+--echo #
+--echo # ================================================================================
+--echo # TEST 4B
+--echo # Present in 5.6 I_S.SESSION_VARIABLES (1-2)
+--echo # Missing in 5.7 P_S.SESSION_VARIABLES (2-5)
+--echo # ================================================================================
+select * from test.sanity
+ where show_mode = "5.6"
+ and source = "I_S.SESSION_VARIABLES"
+ and upper(variable_name) not in (
+ select upper(variable_name) from test.sanity
+ where show_mode = "5.7"
+ and source = "P_S.SESSION_VARIABLES")
+ order by show_mode, source, variable_name;
+
+--echo #
+--echo # ================================================================================
+--echo # TEST 5A
+--echo # Present in 5.6 P_S.VARIABLES_BY_THREAD (1-4)
+--echo # Missing in 5.6 I_S.SESSION_VARIABLES (1-2)
+--echo # ================================================================================
+select * from test.sanity
+ where show_mode = "5.6"
+ and source = "P_S.VARIABLES_BY_THREAD"
+ and upper(variable_name) not in (
+ select upper(variable_name) from test.sanity
+ where show_mode = "5.6"
+ and source = "I_S.SESSION_VARIABLES")
+ order by show_mode, source, variable_name;
+
+--echo #
+--echo # ================================================================================
+--echo # TEST 5B
+--echo # Present in 5.7 P_S.VARIABLES_BY_THREAD (2-4)
+--echo # Missing in 5.6 I_S.SESSION_VARIABLES (1-2)
+--echo # ================================================================================
+select * from test.sanity
+ where show_mode = "5.7"
+ and source = "P_S.VARIABLES_BY_THREAD"
+ and upper(variable_name) not in (
+ select upper(variable_name) from test.sanity
+ where show_mode = "5.6"
+ and source = "I_S.SESSION_VARIABLES")
+ order by show_mode, source, variable_name;
+
+--echo #
+--echo # ================================================================================
+--echo # TEST 5C
+--echo # Present in 5.6 I_S.SESSION_VARIABLES (1-2)
+--echo # Missing in 5.6 P_S.VARIABLES_BY_THREAD (1-4)
+--echo # EXPECT NOTHING BESIDE KNOWN GLOBAL VARIABLES (2-14)
+--echo # ================================================================================
+select * from test.sanity
+ where show_mode = "5.6"
+ and source = "I_S.SESSION_VARIABLES"
+ and upper(variable_name) not in (
+ select upper(variable_name) from test.sanity
+ where show_mode = "5.6"
+ and source = "P_S.VARIABLES_BY_THREAD")
+ and upper(variable_name) not in (
+ select upper(variable_name) from test.sanity
+ where show_mode = "JUNK: GLOBAL-ONLY"
+ and source = "I_S.SESSION_VARIABLES")
+ order by show_mode, source, variable_name;
+
+--echo #
+--echo # ================================================================================
+--echo # TEST 5D
+--echo # Present in 5.6 I_S.SESSION_VARIABLES (1-2)
+--echo # Missing in 5.7 P_S.VARIABLES_BY_THREAD (2-5)
+--echo # EXPECT NOTHING BESIDE KNOWN GLOBAL VARIABLES (2-14)
+--echo # ================================================================================
+select * from test.sanity
+ where show_mode = "5.6"
+ and source = "I_S.SESSION_VARIABLES"
+ and upper(variable_name) not in (
+ select upper(variable_name) from test.sanity
+ where show_mode = "5.7"
+ and source = "P_S.VARIABLES_BY_THREAD")
+ and upper(variable_name) not in (
+ select upper(variable_name) from test.sanity
+ where show_mode = "JUNK: GLOBAL-ONLY"
+ and source = "I_S.SESSION_VARIABLES")
+ order by show_mode, source, variable_name;
+
+--echo #
+--echo # ================================================================================
+--echo # TEST 5E
+--echo # KNOWN GLOBAL VARIABLES (2-14)
+--echo # Expect missing in 5.6 P_S.VARIABLES_BY_THREAD (1-4)
+--echo # ================================================================================
+select * from test.sanity
+ where show_mode = "JUNK: GLOBAL-ONLY"
+ and source = "I_S.SESSION_VARIABLES"
+ and upper(variable_name) in (
+ select upper(variable_name) from test.sanity
+ where show_mode = "5.6"
+ and source = "P_S.VARIABLES_BY_THREAD")
+ order by show_mode, source, variable_name;
+
+--echo #
+--echo # ================================================================================
+--echo # TEST 5F
+--echo # KNOWN GLOBAL VARIABLES (2-14)
+--echo # Expect missing in 5.7 P_S.VARIABLES_BY_THREAD (2-5)
+--echo # ================================================================================
+select * from test.sanity
+ where show_mode = "JUNK: GLOBAL-ONLY"
+ and source = "I_S.SESSION_VARIABLES"
+ and upper(variable_name) in (
+ select upper(variable_name) from test.sanity
+ where show_mode = "5.7"
+ and source = "P_S.VARIABLES_BY_THREAD")
+ order by show_mode, source, variable_name;
+
+--echo #
+--echo # ================================================================================
+--echo # TEST 6A
+--echo # Present in 5.7 P_S.GLOBAL_STATUS (2-8)
+--echo # Missing in 5.6 I_S.GLOBAL_STATUS (1-6)
+--echo # EXPECT NOTHING
+--echo # ================================================================================
+select * from test.sanity
+ where show_mode = "5.7"
+ and source = "P_S.GLOBAL_STATUS"
+ and upper(variable_name) not in (
+ select upper(variable_name) from test.sanity
+ where show_mode = "5.6"
+ and source = "I_S.GLOBAL_STATUS")
+ order by show_mode, source, variable_name;
+
+--echo #
+--echo # ================================================================================
+--echo # TEST 6B
+--echo # Present in 5.7 P_S.GLOBAL_STATUS (2-8)
+--echo # Missing in 5.6 P_S.GLOBAL_STATUS (1-8)
+--echo # EXPECT NOTHING
+--echo # ================================================================================
+select * from test.sanity
+ where show_mode = "5.7"
+ and source = "P_S.GLOBAL_STATUS"
+ and upper(variable_name) not in (
+ select upper(variable_name) from test.sanity
+ where show_mode = "5.6"
+ and source = "P_S.GLOBAL_STATUS")
+ order by show_mode, source, variable_name;
+
+--echo #
+--echo # ================================================================================
+--echo # TEST 6C
+--echo # Present in 5.6 P_S.GLOBAL_STATUS (1-8)
+--echo # Missing in 5.7 P_S.GLOBAL_STATUS (2-8)
+--echo # EXPECT NOTHING
+--echo # ================================================================================
+select * from test.sanity
+ where show_mode = "5.6"
+ and source = "P_S.GLOBAL_STATUS"
+ and upper(variable_name) not in (
+ select upper(variable_name) from test.sanity
+ where show_mode = "5.7"
+ and source = "P_S.GLOBAL_STATUS")
+ order by show_mode, source, variable_name;
+
+--echo #
+--echo # ================================================================================
+--echo # TEST 7
+--echo # Present in 5.6 I_S.GLOBAL_STATUS (1-6)
+--echo # Missing in 5.7 P_S.GLOBAL_STATUS (2-8)
+--echo # EXPECT NOTHING AFTER REMOVING KNOWN SESSION-ONLY, COM COUNTERS AND SLAVE-ONLY (2-16 & 2-16A & 2-16B)
+--echo # ================================================================================
+select * from test.sanity
+ where show_mode = "5.6"
+ and source = "I_S.GLOBAL_STATUS"
+ and upper(variable_name) not in (
+ select upper(variable_name) from test.sanity
+ where (show_mode = "JUNK: SESSION-ONLY" or show_mode = "JUNK: COM COUNTER" or show_mode = "JUNK: SLAVE-ONLY")
+ and source = "I_S.GLOBAL_STATUS")
+ and upper(variable_name) not in (
+ select upper(variable_name) from test.sanity
+ where show_mode = "5.7"
+ and source = "P_S.GLOBAL_STATUS")
+ order by show_mode, source, variable_name;
+
+--echo #
+--echo # ================================================================================
+--echo # TEST 8
+--echo # KNOWN SESSION-ONLY (2-16)
+--echo # KNOWN COM COUNTERS (2-16A)
+--echo # KNOWN SLAVE-ONLY (2-16B)
+--echo # Status variables that should NOT be present in 5.7 P_S.GLOBAL_STATUS (2-8)
+--echo # EXPECT NOTHING
+--echo # ================================================================================
+select * from test.sanity
+ where show_mode = "5.7"
+ and source = "P_S.GLOBAL_STATUS"
+ and upper(variable_name) in (
+ select upper(variable_name) from test.sanity
+ where (show_mode = "JUNK: SESSION-ONLY" or show_mode = "JUNK: COM COUNTER" or show_mode = "JUNK: SLAVE-ONLY")
+ and source = "I_S.GLOBAL_STATUS")
+ order by show_mode, source, variable_name;
+
+--echo #
+--echo # ================================================================================
+--echo # TEST 9A
+--echo # Present in 5.7 P_S.SESSION_STATUS (2-10)
+--echo # Missing in 5.6 I_S.SESSION_STATUS (1-7)
+--echo # EXPECT NOTHING
+--echo # ================================================================================
+select * from test.sanity
+ where show_mode = "5.7"
+ and source = "P_S.SESSION_STATUS"
+ and upper(variable_name) not in (
+ select upper(variable_name) from test.sanity
+ where show_mode = "5.6"
+ and source = "I_S.SESSION_STATUS")
+ order by show_mode, source, variable_name;
+
+--echo #
+--echo # ================================================================================
+--echo # TEST 9B
+--echo # Present in 5.7 P_S.SESSION_STATUS (2-10)
+--echo # Missing in 5.6 P_S.SESSION_STATUS (1-10)
+--echo # EXPECT NOTHING
+--echo # ================================================================================
+select * from test.sanity
+ where show_mode = "5.7"
+ and source = "P_S.SESSION_STATUS"
+ and upper(variable_name) not in (
+ select upper(variable_name) from test.sanity
+ where show_mode = "5.6"
+ and source = "P_S.SESSION_STATUS")
+ order by show_mode, source, variable_name;
+
+--echo #
+--echo # ================================================================================
+--echo # TEST 9C
+--echo # Present in 5.6 P_S.SESSION_STATUS (1-10)
+--echo # Missing in 5.7 P_S.SESSION_STATUS (2-10)
+--echo # EXPECT NOTHING
+--echo # ================================================================================
+select * from test.sanity
+ where show_mode = "5.6"
+ and source = "P_S.SESSION_STATUS"
+ and upper(variable_name) not in (
+ select upper(variable_name) from test.sanity
+ where show_mode = "5.7"
+ and source = "P_S.SESSION_STATUS")
+ order by show_mode, source, variable_name;
+
+--echo #
+--echo # ================================================================================
+--echo # TEST 10
+--echo # Present in 5.6 I_S.SESSION_STATUS (1-7)
+--echo # Missing in 5.7 P_S.SESSION_STATUS (2-10)
+--echo # EXPECT NOTHING AFTER REMOVING KNOWN COM COUNTERS AND SLAVE-ONLY (2-15A & 2-15B)
+--echo # ================================================================================
+select * from test.sanity
+ where show_mode = "5.6"
+ and source = "I_S.SESSION_STATUS"
+ and upper(variable_name) not in (
+ select upper(variable_name) from test.sanity
+ where (show_mode = "JUNK: COM COUNTER" or show_mode = "JUNK: SLAVE-ONLY")
+ and source = "I_S.SESSION_STATUS")
+ and upper(variable_name) not in (
+ select upper(variable_name) from test.sanity
+ where show_mode = "5.7"
+ and source = "P_S.SESSION_STATUS")
+ order by show_mode, source, variable_name;
+
+--echo #
+--echo # ================================================================================
+--echo # TEST 11
+--echo # KNOWN COM COUNTERS (2-15A)
+--echo # KNOWN SLAVE-ONLY (2-15B)
+--echo # Status variables that should NOT be present in 5.7 P_S.SESSION_STATUS (2-10)
+--echo # EXPECT NOTHING
+--echo # ================================================================================
+select * from test.sanity
+ where show_mode = "5.7"
+ and source = "P_S.SESSION_STATUS"
+ and upper(variable_name) in (
+ select upper(variable_name) from test.sanity
+ where (show_mode = "JUNK: COM COUNTER" or show_mode = "JUNK: SLAVE-ONLY")
+ and source = "I_S.SESSION_STATUS")
+ order by show_mode, source, variable_name;
+
+--echo #
+--echo # ================================================================================
+--echo # TEST 12
+--echo # Present in 5.7 P_S.SESSION_STATUS (2-10)
+--echo # Missing in 5.7 P_S.STATUS_BY_THREAD
+--echo # EXPECT NOTHING AFTER REMOVING KNOWN GLOBAL-ONLY (2-15)
+--echo # ================================================================================
+select * from test.sanity
+ where show_mode = "5.7"
+ and source = "P_S.SESSION_STATUS"
+ and upper(variable_name) not in (
+ select upper(variable_name) from test.sanity
+ where show_mode = "5.7"
+ and source = "P_S.STATUS_BY_THREAD")
+ and upper(variable_name) not in (
+ select upper(variable_name) from test.sanity
+ where (show_mode = "JUNK: GLOBAL-ONLY")
+ and source = "I_S.SESSION_STATUS")
+ order by show_mode, source, variable_name;
+
+--echo #
+--echo # ================================================================================
+--echo # TEST 13
+--echo # Present in 5.7 P_S.STATUS_BY_THREAD
+--echo # Missing in 5.7 P_S.SESSION_STATUS (2-10)
+--echo # EXPECT NOTHING
+--echo # ================================================================================
+select * from test.sanity
+ where show_mode = "5.7"
+ and source = "P_S.STATUS_BY_THREAD"
+ and upper(variable_name) not in (
+ select upper(variable_name) from test.sanity
+ where show_mode = "5.7"
+ and source = "P_S.SESSION_STATUS")
+ order by show_mode, source, variable_name;
+
+--echo #
+--echo # ================================================================================
+--echo # TEST 14
+--echo # Present in 5.7 P_S.SESSION_STATUS (2-10)
+--echo # Missing in 5.7 P_S.STATUS_BY_ACCOUNT
+--echo # EXPECT NOTHING AFTER REMOVING
+--echo # - KNOWN GLOBAL-ONLY (2-15)
+--echo # - STATUS VARS THAT CAN'T BE AGGREGATED (2-17)
+--echo # ================================================================================
+select * from test.sanity
+ where show_mode = "5.7"
+ and source = "P_S.SESSION_STATUS"
+ and upper(variable_name) not in (
+ select upper(variable_name) from test.sanity
+ where show_mode = "JUNK"
+ and source = "NO AGGREGATE")
+ and upper(variable_name) not in (
+ select upper(variable_name) from test.sanity
+ where (show_mode = "JUNK: GLOBAL-ONLY")
+ and source = "I_S.SESSION_STATUS")
+ and upper(variable_name) not in (
+ select upper(variable_name) from test.sanity
+ where show_mode = "5.7"
+ and source = "P_S.STATUS_BY_ACCOUNT")
+ order by show_mode, source, variable_name;
+
+--echo #
+--echo # ================================================================================
+--echo # TEST 15
+--echo # Present in 5.7 P_S.STATUS_BY_ACCOUNT
+--echo # Missing in 5.7 P_S.SESSION_STATUS (2-10)
+--echo # EXPECT NOTHING
+--echo # ================================================================================
+select * from test.sanity
+ where show_mode = "5.7"
+ and source = "P_S.STATUS_BY_ACCOUNT"
+ and upper(variable_name) not in (
+ select upper(variable_name) from test.sanity
+ where show_mode = "5.7"
+ and source = "P_S.SESSION_STATUS")
+ order by show_mode, source, variable_name;
+
+--echo #
+--echo # ================================================================================
+--echo # TEST 16
+--echo # KNOWN STATUS VARS THAT CAN'T BE AGGREGATED (2-17)
+--echo # Status variables that should NOT be present in 5.7 P_S.STATUS_BY_ACCOUNT
+--echo # ================================================================================
+select * from performance_schema.status_by_account
+ where upper(variable_name) in (
+ select upper(variable_name) from test.sanity
+ where show_mode = "JUNK"
+ and source = "NO AGGREGATE")
+ order by variable_name;
+
+--echo #
+--echo # ================================================================================
+--echo # TEST 17
+--echo # Present in 5.7 P_S.SESSION_STATUS (2-10)
+--echo # Missing in 5.7 P_S.STATUS_BY_USER
+--echo # EXPECT NOTHING AFTER REMOVING
+--echo # - KNOWN GLOBAL-ONLY (2-15)
+--echo # - STATUS VARS THAT CAN'T BE AGGREGATED (2-17)
+--echo # ================================================================================
+select * from test.sanity
+ where show_mode = "5.7"
+ and source = "P_S.SESSION_STATUS"
+ and upper(variable_name) not in (
+ select upper(variable_name) from test.sanity
+ where show_mode = "JUNK"
+ and source = "NO AGGREGATE")
+ and upper(variable_name) not in (
+ select upper(variable_name) from test.sanity
+ where (show_mode = "JUNK: GLOBAL-ONLY")
+ and source = "I_S.SESSION_STATUS")
+ and upper(variable_name) not in (
+ select upper(variable_name) from test.sanity
+ where show_mode = "5.7"
+ and source = "P_S.STATUS_BY_USER")
+ order by show_mode, source, variable_name;
+
+--echo #
+--echo # ================================================================================
+--echo # TEST 18
+--echo # Present in 5.7 P_S.STATUS_BY_USER
+--echo # Missing in 5.7 P_S.SESSION_STATUS (2-10)
+--echo # ================================================================================
+select * from test.sanity
+ where show_mode = "5.7"
+ and source = "P_S.STATUS_BY_USER"
+ and upper(variable_name) not in (
+ select upper(variable_name) from test.sanity
+ where show_mode = "5.7"
+ and source = "P_S.SESSION_STATUS")
+ order by show_mode, source, variable_name;
+
+--echo #
+--echo # ================================================================================
+--echo # TEST 19
+--echo # KNOWN STATUS VARS THAT CAN'T BE AGGREGATED (2-17)
+--echo # Status variables that should NOT be present in 5.7 P_S.STATUS_BY_USER
+--echo # ================================================================================
+select * from performance_schema.status_by_user
+ where upper(variable_name) in (
+ select upper(variable_name) from test.sanity
+ where show_mode = "JUNK"
+ and source = "NO AGGREGATE")
+ order by variable_name;
+
+--echo #
+--echo # ================================================================================
+--echo # TEST 20
+--echo # Present in 5.7 P_S.SESSION_STATUS (2-10)
+--echo # Missing in 5.7 P_S.STATUS_BY_HOST
+--echo # EXPECT NOTHING AFTER REMOVING
+--echo # - KNOWN GLOBAL-ONLY (2-15)
+--echo # - STATUS VARS THAT CAN'T BE AGGREGATED (2-17)
+--echo # ================================================================================
+select * from test.sanity
+ where show_mode = "5.7"
+ and source = "P_S.SESSION_STATUS"
+ and upper(variable_name) not in (
+ select upper(variable_name) from test.sanity
+ where show_mode = "JUNK"
+ and source = "NO AGGREGATE")
+ and upper(variable_name) not in (
+ select upper(variable_name) from test.sanity
+ where (show_mode = "JUNK: GLOBAL-ONLY")
+ and source = "I_S.SESSION_STATUS")
+ and upper(variable_name) not in (
+ select upper(variable_name) from test.sanity
+ where show_mode = "5.7"
+ and source = "P_S.STATUS_BY_HOST")
+ order by show_mode, source, variable_name;
+
+--echo #
+--echo # ================================================================================
+--echo # TEST 21
+--echo # Present in 5.7 P_S.STATUS_BY_HOST
+--echo # Missing in 5.7 P_S.SESSION_STATUS (2-10)
+--echo # ================================================================================
+select * from test.sanity
+ where show_mode = "5.7"
+ and source = "P_S.STATUS_BY_HOST"
+ and upper(variable_name) not in (
+ select upper(variable_name) from test.sanity
+ where show_mode = "5.7"
+ and source = "P_S.SESSION_STATUS")
+ order by show_mode, source, variable_name;
+
+--echo #
+--echo # ================================================================================
+--echo # TEST 22
+--echo # KNOWN STATUS VARS THAT CAN'T BE AGGREGATED (2-17)
+--echo # Status variables that should NOT be present in 5.7 P_S.STATUS_BY_HOST
+--echo # ================================================================================
+select * from performance_schema.status_by_host
+ where upper(variable_name) in (
+ select upper(variable_name) from test.sanity
+ where show_mode = "JUNK"
+ and source = "NO AGGREGATE")
+ order by variable_name;
+
+--echo #
+--echo # ================================================================================
+--echo # CLEAN UP
+--echo # ================================================================================
+set @@global.show_compatibility_56 = @show_compatibility_56_save;
+drop table test.sanity;
+
+
diff --git a/mysql-test/suite/perfschema/t/sizing_default.cnf b/mysql-test/suite/perfschema/t/sizing_default.cnf
deleted file mode 100644
index 0515832d41c..00000000000
--- a/mysql-test/suite/perfschema/t/sizing_default.cnf
+++ /dev/null
@@ -1,39 +0,0 @@
-
-!include suite/perfschema/include/default_mysqld_autosize.cnf
-
-[mysqld.1]
-
-# Default values used in the server, out of the box
-# open_files_limit can be scaled down based on the os configuration (ulimit -n),
-# so to get a stable test output, make sure ulimit -n is big enough
-#
-# What is supposed to happen here by default:
-# table_open_cache = 2000
-# table_definition_cache = 400 + 2000/2 = 1400
-# max_connections = 151
-
-# Automated sizing for everything
-
-loose-enable-performance-schema
-
-loose-performance-schema-accounts-size=-1
-loose-performance-schema-digests-size=-1
-loose-performance-schema-hosts-size=-1
-loose-performance-schema-users-size=-1
-
-loose-performance-schema-events-waits-history-size=-1
-loose-performance-schema-events-waits-history-long-size=-1
-loose-performance-schema-events-stages-history-size=-1
-loose-performance-schema-events-stages-history-long-size=-1
-loose-performance-schema-events-statements-history-size=-1
-loose-performance-schema-events-statements-history-long-size=-1
-
-loose-performance-schema-max-mutex-instances=-1
-loose-performance-schema-max-rwlock-instances=-1
-loose-performance-schema-max-cond-instances=-1
-loose-performance-schema-max-file-instances=-1
-loose-performance-schema-max-socket-instances=-1
-loose-performance-schema-max-thread-instances=-1
-loose-performance-schema-max-table-instances=-1
-loose-performance-schema-max-table-handles=-1
-
diff --git a/mysql-test/suite/perfschema/t/sizing_default.test b/mysql-test/suite/perfschema/t/sizing_default.test
deleted file mode 100644
index f8086cc7afd..00000000000
--- a/mysql-test/suite/perfschema/t/sizing_default.test
+++ /dev/null
@@ -1,29 +0,0 @@
-
---source include/not_embedded.inc
---source include/have_perfschema.inc
---source include/have_64bit.inc
---source include/not_valgrind.inc
---source ../include/have_aligned_memory.inc
-
-#SELECT @@open_files_limit, @@table_open_cache, @@table_definition_cache, @@max_connections;
-#exit;
-
-# Skip test if not defaults is used.
-if (`SELECT @@open_files_limit < 1024`)
-{
- skip Need open_files_limit to be at least 1024;
-}
-if (`SELECT @@table_open_cache != 421`)
-{
- skip Need table_open_cache to be exactly 421;
-}
-if (`SELECT @@table_definition_cache != 400`)
-{
- skip Need table_definition_cache to be exactly 400;
-}
-if (`SELECT @@max_connections != 151`)
-{
- skip Need max_connections to be exactly 151;
-}
-
---source ../include/sizing_auto.inc
diff --git a/mysql-test/suite/perfschema/t/sizing_growth-master.opt b/mysql-test/suite/perfschema/t/sizing_growth-master.opt
deleted file mode 100644
index 69f0f157f70..00000000000
--- a/mysql-test/suite/perfschema/t/sizing_growth-master.opt
+++ /dev/null
@@ -1,3 +0,0 @@
---force-restart
---innodb_file_per_table=1
-
diff --git a/mysql-test/suite/perfschema/t/sizing_growth.test b/mysql-test/suite/perfschema/t/sizing_growth.test
deleted file mode 100644
index d6944d2aee0..00000000000
--- a/mysql-test/suite/perfschema/t/sizing_growth.test
+++ /dev/null
@@ -1,478 +0,0 @@
-# Tests for PERFORMANCE_SCHEMA
-
---source include/not_embedded.inc
---source include/have_perfschema.inc
-
-#
-# Important note:
-# this test is extremely sensitive to how threads are running inside the server,
-# so it has it's own -master.opt file, to enforce it runs alone in mysqld
-#
-
-# Setup
-
-flush status;
-flush tables;
-
-# Remove to debug
---disable_result_log
-
-# Make sure the internal server caches are all full
-select * from performance_schema.mutex_instances;
-select * from performance_schema.rwlock_instances;
-select * from performance_schema.cond_instances;
-select * from performance_schema.file_instances;
-
-select count(*) from performance_schema.mutex_instances
- into @v0_mutex_instances;
-
-select count(*) from performance_schema.rwlock_instances
- into @v0_rwlock_instances;
-
-select count(*) from performance_schema.cond_instances
- into @v0_cond_instances;
-
-select count(*) from performance_schema.file_instances
- into @v0_file_instances;
-
-select count(*) from performance_schema.mutex_instances
- into @v1_mutex_instances;
-
-select count(*) from performance_schema.rwlock_instances
- into @v1_rwlock_instances;
-
-select count(*) from performance_schema.cond_instances
- into @v1_cond_instances;
-
-select count(*) from performance_schema.file_instances
- into @v1_file_instances;
-
-select count(name), name from performance_schema.mutex_instances
- group by name;
-
-select count(name), name from performance_schema.rwlock_instances
- group by name;
-
-select count(name), name from performance_schema.cond_instances
- group by name;
-
-select count(event_name), event_name from performance_schema.file_instances
- group by event_name;
-
-begin;
-create table test.t1(a int) engine = innodb;
-create table test.t2(a int) engine = innodb;
-create table test.t3(a int) engine = innodb;
-create table test.t4(a int) engine = innodb;
-create table test.t5(a int) engine = innodb;
-create table test.t6(a int) engine = innodb;
-create table test.t7(a int) engine = innodb;
-create table test.t8(a int) engine = innodb;
-create table test.t9(a int) engine = innodb;
-create table test.t10(a int) engine = innodb;
-
-# Make sure there is at least 1 table handle,
-# to fully initialize the storage engine share if needed.
-select * from test.t1;
-select * from test.t2;
-select * from test.t3;
-select * from test.t4;
-select * from test.t5;
-select * from test.t6;
-select * from test.t7;
-select * from test.t8;
-select * from test.t9;
-select * from test.t10;
-commit;
-
-select count(*) from performance_schema.mutex_instances
- into @v2_mutex_instances;
-
-select count(*) from performance_schema.rwlock_instances
- into @v2_rwlock_instances;
-
-select count(*) from performance_schema.cond_instances
- into @v2_cond_instances;
-
-select count(*) from performance_schema.file_instances
- into @v2_file_instances;
-
-select count(name), name from performance_schema.mutex_instances
- group by name;
-
-select count(name), name from performance_schema.rwlock_instances
- group by name;
-
-select count(name), name from performance_schema.cond_instances
- group by name;
-
-select count(event_name), event_name from performance_schema.file_instances
- group by event_name;
-
-select @v2_mutex_instances, @v1_mutex_instances, @v0_mutex_instances;
-select @v2_rwlock_instances, @v1_rwlock_instances, @v0_rwlock_instances;
-select @v2_cond_instances, @v1_cond_instances, @v0_cond_instances;
-select @v2_file_instances, @v1_file_instances, @v0_file_instances;
-
-select round((@v2_mutex_instances - @v1_mutex_instances) / 10)
- into @mutex_per_share;
-select round((@v2_rwlock_instances - @v1_rwlock_instances) / 10)
- into @rwlock_per_share;
-select round((@v2_cond_instances - @v1_cond_instances) / 10)
- into @cond_per_share;
-select round((@v2_file_instances - @v1_file_instances) / 10)
- into @file_per_share;
-
-connect (con1, localhost, root,,);
-select "con1 connected";
-
-connect (con2, localhost, root,,);
-select "con2 connected";
-
-connect (con3, localhost, root,,);
-select "con3 connected";
-
-connect (con4, localhost, root,,);
-select "con4 connected";
-
-connect (con5, localhost, root,,);
-select "con5 connected";
-
-connect (con6, localhost, root,,);
-select "con6 connected";
-
-connect (con7, localhost, root,,);
-select "con7 connected";
-
-connect (con8, localhost, root,,);
-select "con8 connected";
-
-connect (con9, localhost, root,,);
-select "con9 connected";
-
-connect (con10, localhost, root,,);
-select "con10 connected";
-
-connection default;
-
-select count(*) from performance_schema.mutex_instances
- into @v3_mutex_instances;
-
-select count(*) from performance_schema.rwlock_instances
- into @v3_rwlock_instances;
-
-select count(*) from performance_schema.cond_instances
- into @v3_cond_instances;
-
-select count(*) from performance_schema.file_instances
- into @v3_file_instances;
-
-select count(name), name from performance_schema.mutex_instances
- group by name;
-
-select count(name), name from performance_schema.rwlock_instances
- group by name;
-
-select count(name), name from performance_schema.cond_instances
- group by name;
-
-select count(event_name), event_name from performance_schema.file_instances
- group by event_name;
-
-select @v3_mutex_instances, @v2_mutex_instances;
-select @v3_rwlock_instances, @v2_rwlock_instances;
-select @v3_cond_instances, @v2_cond_instances;
-select @v3_file_instances, @v2_file_instances;
-
-select round((@v3_mutex_instances - @v2_mutex_instances) / 10)
- into @mutex_per_con;
-select round((@v3_rwlock_instances - @v2_rwlock_instances) / 10)
- into @rwlock_per_con;
-select round((@v3_cond_instances - @v2_cond_instances) / 10)
- into @cond_per_con;
-select round((@v3_file_instances - @v2_file_instances) / 10)
- into @file_per_con;
-
---connection con1
-
-lock table test.t1 write, test.t2 write, test.t3 write, test.t4 write,
-test.t5 write, test.t6 write, test.t7 write, test.t8 write, test.t9 write,
-test.t10 write;
-
---send
-select t1.*, t2.*, t3.*, t4.*, t5.*, t6.*, t7.*, t8.*, t9.*, t10.*
- from t1, t2, t3, t4, t5, t6, t7, t8, t9, t10;
-
---connection con2
-
---send
-select t1.*, t2.*, t3.*, t4.*, t5.*, t6.*, t7.*, t8.*, t9.*, t10.*
- from t1, t2, t3, t4, t5, t6, t7, t8, t9, t10;
-
---connection con3
-
---send
-select t1.*, t2.*, t3.*, t4.*, t5.*, t6.*, t7.*, t8.*, t9.*, t10.*
- from t1, t2, t3, t4, t5, t6, t7, t8, t9, t10;
-
---connection con4
-
---send
-select t1.*, t2.*, t3.*, t4.*, t5.*, t6.*, t7.*, t8.*, t9.*, t10.*
- from t1, t2, t3, t4, t5, t6, t7, t8, t9, t10;
-
---connection con5
-
---send
-select t1.*, t2.*, t3.*, t4.*, t5.*, t6.*, t7.*, t8.*, t9.*, t10.*
- from t1, t2, t3, t4, t5, t6, t7, t8, t9, t10;
-
---connection con6
-
---send
-select t1.*, t2.*, t3.*, t4.*, t5.*, t6.*, t7.*, t8.*, t9.*, t10.*
- from t1, t2, t3, t4, t5, t6, t7, t8, t9, t10;
-
---connection con7
-
---send
-select t1.*, t2.*, t3.*, t4.*, t5.*, t6.*, t7.*, t8.*, t9.*, t10.*
- from t1, t2, t3, t4, t5, t6, t7, t8, t9, t10;
-
---connection con8
-
---send
-select t1.*, t2.*, t3.*, t4.*, t5.*, t6.*, t7.*, t8.*, t9.*, t10.*
- from t1, t2, t3, t4, t5, t6, t7, t8, t9, t10;
-
---connection con9
-
---send
-select t1.*, t2.*, t3.*, t4.*, t5.*, t6.*, t7.*, t8.*, t9.*, t10.*
- from t1, t2, t3, t4, t5, t6, t7, t8, t9, t10;
-
---connection con10
-
---send
-select t1.*, t2.*, t3.*, t4.*, t5.*, t6.*, t7.*, t8.*, t9.*, t10.*
- from t1, t2, t3, t4, t5, t6, t7, t8, t9, t10;
-
-connection default;
-
-select count(*) from performance_schema.mutex_instances
- into @v4_mutex_instances;
-
-select count(*) from performance_schema.rwlock_instances
- into @v4_rwlock_instances;
-
-select count(*) from performance_schema.cond_instances
- into @v4_cond_instances;
-
-select count(*) from performance_schema.file_instances
- into @v4_file_instances;
-
-select count(name), name from performance_schema.mutex_instances
- group by name;
-
-select count(name), name from performance_schema.rwlock_instances
- group by name;
-
-select count(name), name from performance_schema.cond_instances
- group by name;
-
-select count(event_name), event_name from performance_schema.file_instances
- group by event_name;
-
-select @v4_mutex_instances, @v3_mutex_instances;
-select @v4_rwlock_instances, @v3_rwlock_instances;
-select @v4_cond_instances, @v3_cond_instances;
-select @v4_file_instances, @v3_file_instances;
-
-select round((@v4_mutex_instances - @v3_mutex_instances) / 10)
- into @mutex_per_handle;
-select round((@v4_rwlock_instances - @v3_rwlock_instances) / 10)
- into @rwlock_per_handle;
-select round((@v4_cond_instances - @v3_cond_instances) / 10)
- into @cond_per_handle;
-select round((@v4_file_instances - @v3_file_instances) / 10)
- into @file_per_handle;
-
---connection con1
---reap
-
-unlock tables;
-
---connection con2
---reap
-
---connection con3
---reap
-
---connection con4
---reap
-
---connection con5
---reap
-
---connection con6
---reap
-
---connection con7
---reap
-
---connection con8
---reap
-
---connection con9
---reap
-
---connection con10
---reap
-
---disconnect con1
---disconnect con2
---disconnect con3
---disconnect con4
---disconnect con5
---disconnect con6
---disconnect con7
---disconnect con8
---disconnect con9
---disconnect con10
-
---connection default
-
-drop table test.t1;
-drop table test.t2;
-drop table test.t3;
-drop table test.t4;
-drop table test.t5;
-drop table test.t6;
-drop table test.t7;
-drop table test.t8;
-drop table test.t9;
-drop table test.t10;
-
---enable_result_log
-
-#
-# This test must have *_lost = 0,
-# otherwise the measurement is just wrong.
-#
-
-show status like "performance_schema%";
-
-#
-# Expecting 2:
-# - wait/synch/mutex/sql/MDL_wait::LOCK_wait_status
-# - wait/synch/mutex/sql/TABLE_SHARE::LOCK_ha_data
-# plus mutexes used inside the storage engine
-# This is very storage engine dependent
-# For innodb:
-# - wait/synch/mutex/innodb/autoinc_mutex
-# - wait/synch/mutex/innodb/os_mutex
-# Note that depending on the platform,
-# and the version of the compiler used,
-# code in the server may use either native platform atomics
-# or a mutex.
-# Note also that in DEBUG builds, code uses more mutexes.
-# Because of all these parameters,
-# this test is disabled, as predicting an exact number is difficult.
-#
-# commented: select @mutex_per_share <= 5;
-
-#
-# Expecting 1:
-# - wait/synch/rwlock/sql/MDL_lock::rwlock
-# plus rwlocks used inside the storage engine
-# This is very storage engine dependent
-#
-select @rwlock_per_share <= 3;
-
-#
-# Expecting 0:
-#
-select @cond_per_share;
-
-#
-# Expecting 1:
-# - wait/io/file/sql/FRM
-# plus files used inside the storage engine
-# This is very storage engine dependent
-#
-select @file_per_share <= 3;
-
-#
-# Expecting 3:
-# - wait/synch/mutex/mysys/my_thread_var::mutex
-# - wait/synch/mutex/mysys/THR_LOCK::mutex
-# - wait/synch/mutex/sql/THD::LOCK_thd_data
-#
-select @mutex_per_con;
-
-#
-# Expecting 1:
-# - wait/synch/rwlock/sql/MDL_context::LOCK_waiting_for
-#
-select @rwlock_per_con;
-
-#
-# Expecting 2:
-# - wait/synch/cond/mysys/my_thread_var::suspend
-# - wait/synch/cond/sql/MDL_context::COND_wait_status
-#
-select @cond_per_con;
-
-#
-# Expecting 0:
-#
-select @file_per_con;
-
-#
-# Expecting 0:
-#
-select @mutex_per_handle;
-
-#
-# Expecting 0:
-#
-select @rwlock_per_handle;
-
-#
-# Expecting 0:
-#
-select @cond_per_handle;
-
-#
-# Expecting 0:
-#
-select @file_per_handle;
-
-#
-# IMPORTANT NOTE:
-# when any measurement here changes, the heuristics
-# in storage/perfschema/pfs_autosize.cc need to be updated.
-# Note that this in turns will lead to different estimations for automated
-# sizing, and imply to update the results for sizing_*.
-#
-
-# commented: (@mutex_per_share <= 5)
-# Mutexes are not instrumented by default,
-# not enforcing mutex estimates
-
-select if(
- (@rwlock_per_share <= 3)
- AND (@cond_per_share = 0)
- AND (@file_per_share <= 3)
- AND (@mutex_per_con = 3)
- AND (@rwlock_per_con = 1)
- AND (@cond_per_con = 2)
- AND (@file_per_con = 0)
- AND (@mutex_per_handle = 0)
- AND (@rwlock_per_handle = 0)
- AND (@cond_per_handle = 0)
- AND (@file_per_handle = 0),
- "OK: heuristics are up to date",
- "FAILED: heuristics need to be updated")
- as status;
-
diff --git a/mysql-test/suite/perfschema/t/sizing_high.cnf b/mysql-test/suite/perfschema/t/sizing_high.cnf
deleted file mode 100644
index 519ad79f3ad..00000000000
--- a/mysql-test/suite/perfschema/t/sizing_high.cnf
+++ /dev/null
@@ -1,57 +0,0 @@
-
-!include suite/perfschema/include/default_mysqld_autosize.cnf
-
-[mysqld.1]
-
-# WARNING about open_files_limit and ulimit -n
-#
-# mysqld checks how many files can be opened on the machine,
-# and this is by definition very:
-# - os dependent, see OS_FILE_LIMIT, HAVE_GETRLIMIT
-# - configuration dependent, for each machine (ulimit -n), see
-# my_set_max_open_files() in mysys/my_file.c,
-# see getrlimit(RLIMIT_NOFILE)
-#
-# Based on the this, the server tunes _down_ max_connections and
-# table_cache_size to match the open_files_limit found,
-# which significantly interfere with this test.
-#
-# Solution: use a big table definition cache,
-# but small values for max_connection and table_open_cache,
-# to stay within open_files_limit of 1024.
-#
-# This is the best test we can do that has a chance to pass on all
-# platforms, while still providing code coverage.
-
-table_definition_cache=5000
-table_open_cache=400
-max_connections=200
-open_files_limit=1024
-
-# 10+max_connections+table_cache_size*2 = 10 + 200 + 400*2 = 1010
-# max_connections*5 = 200*5 = 1000
-
-# Automated sizing for everything
-loose-enable-performance-schema
-
-loose-performance-schema-accounts-size=-1
-loose-performance-schema-digests-size=-1
-loose-performance-schema-hosts-size=-1
-loose-performance-schema-users-size=-1
-
-loose-performance-schema-events-waits-history-size=-1
-loose-performance-schema-events-waits-history-long-size=-1
-loose-performance-schema-events-stages-history-size=-1
-loose-performance-schema-events-stages-history-long-size=-1
-loose-performance-schema-events-statements-history-size=-1
-loose-performance-schema-events-statements-history-long-size=-1
-
-loose-performance-schema-max-mutex-instances=-1
-loose-performance-schema-max-rwlock-instances=-1
-loose-performance-schema-max-cond-instances=-1
-loose-performance-schema-max-file-instances=-1
-loose-performance-schema-max-socket-instances=-1
-loose-performance-schema-max-thread-instances=-1
-loose-performance-schema-max-table-instances=-1
-loose-performance-schema-max-table-handles=-1
-
diff --git a/mysql-test/suite/perfschema/t/sizing_high.test b/mysql-test/suite/perfschema/t/sizing_high.test
deleted file mode 100644
index 4d02d41aecd..00000000000
--- a/mysql-test/suite/perfschema/t/sizing_high.test
+++ /dev/null
@@ -1,9 +0,0 @@
-
---source include/not_embedded.inc
---source include/have_perfschema.inc
---source include/have_64bit.inc
---source include/not_valgrind.inc
---source ../include/have_aligned_memory.inc
-
---source ../include/sizing_auto.inc
-
diff --git a/mysql-test/suite/perfschema/t/sizing_low.cnf b/mysql-test/suite/perfschema/t/sizing_low.cnf
deleted file mode 100644
index 79e891bda60..00000000000
--- a/mysql-test/suite/perfschema/t/sizing_low.cnf
+++ /dev/null
@@ -1,34 +0,0 @@
-
-!include suite/perfschema/include/default_mysqld_autosize.cnf
-
-[mysqld.1]
-
-table_definition_cache=400
-table_open_cache=100
-max_connections=50
-open_files_limit=1024
-
-# Automated sizing for everything
-loose-enable-performance-schema
-
-loose-performance-schema-accounts-size=-1
-loose-performance-schema-digests-size=-1
-loose-performance-schema-hosts-size=-1
-loose-performance-schema-users-size=-1
-
-loose-performance-schema-events-waits-history-size=-1
-loose-performance-schema-events-waits-history-long-size=-1
-loose-performance-schema-events-stages-history-size=-1
-loose-performance-schema-events-stages-history-long-size=-1
-loose-performance-schema-events-statements-history-size=-1
-loose-performance-schema-events-statements-history-long-size=-1
-
-loose-performance-schema-max-mutex-instances=-1
-loose-performance-schema-max-rwlock-instances=-1
-loose-performance-schema-max-cond-instances=-1
-loose-performance-schema-max-file-instances=-1
-loose-performance-schema-max-socket-instances=-1
-loose-performance-schema-max-thread-instances=-1
-loose-performance-schema-max-table-instances=-1
-loose-performance-schema-max-table-handles=-1
-
diff --git a/mysql-test/suite/perfschema/t/sizing_low.test b/mysql-test/suite/perfschema/t/sizing_low.test
deleted file mode 100644
index 56446fd6973..00000000000
--- a/mysql-test/suite/perfschema/t/sizing_low.test
+++ /dev/null
@@ -1,10 +0,0 @@
-
---source include/not_embedded.inc
---source include/have_perfschema.inc
---source include/have_64bit.inc
---source include/not_valgrind.inc
---source ../include/have_aligned_memory.inc
-
---source ../include/sizing_auto.inc
-
-CALL mtr.add_suppression("innodb_open_files should not be greater than the open_files_limit.");
diff --git a/mysql-test/suite/perfschema/t/sizing_med.cnf b/mysql-test/suite/perfschema/t/sizing_med.cnf
deleted file mode 100644
index 4a113272e38..00000000000
--- a/mysql-test/suite/perfschema/t/sizing_med.cnf
+++ /dev/null
@@ -1,34 +0,0 @@
-
-!include suite/perfschema/include/default_mysqld_autosize.cnf
-
-[mysqld.1]
-
-table_definition_cache=401
-table_open_cache=401
-max_connections=152
-open_files_limit=1024
-
-# Automated sizing for everything
-loose-enable-performance-schema
-
-loose-performance-schema-accounts-size=-1
-loose-performance-schema-digests-size=-1
-loose-performance-schema-hosts-size=-1
-loose-performance-schema-users-size=-1
-
-loose-performance-schema-events-waits-history-size=-1
-loose-performance-schema-events-waits-history-long-size=-1
-loose-performance-schema-events-stages-history-size=-1
-loose-performance-schema-events-stages-history-long-size=-1
-loose-performance-schema-events-statements-history-size=-1
-loose-performance-schema-events-statements-history-long-size=-1
-
-loose-performance-schema-max-mutex-instances=-1
-loose-performance-schema-max-rwlock-instances=-1
-loose-performance-schema-max-cond-instances=-1
-loose-performance-schema-max-file-instances=-1
-loose-performance-schema-max-socket-instances=-1
-loose-performance-schema-max-thread-instances=-1
-loose-performance-schema-max-table-instances=-1
-loose-performance-schema-max-table-handles=-1
-
diff --git a/mysql-test/suite/perfschema/t/sizing_med.test b/mysql-test/suite/perfschema/t/sizing_med.test
deleted file mode 100644
index 4d02d41aecd..00000000000
--- a/mysql-test/suite/perfschema/t/sizing_med.test
+++ /dev/null
@@ -1,9 +0,0 @@
-
---source include/not_embedded.inc
---source include/have_perfschema.inc
---source include/have_64bit.inc
---source include/not_valgrind.inc
---source ../include/have_aligned_memory.inc
-
---source ../include/sizing_auto.inc
-
diff --git a/mysql-test/suite/perfschema/t/sizing_off.cnf b/mysql-test/suite/perfschema/t/sizing_off.cnf
deleted file mode 100644
index 80c00494791..00000000000
--- a/mysql-test/suite/perfschema/t/sizing_off.cnf
+++ /dev/null
@@ -1,38 +0,0 @@
-
-!include suite/perfschema/include/default_mysqld_autosize.cnf
-
-[mysqld.1]
-
-# Default values used in the server, out of the box
-table_definition_cache=400
-table_open_cache=400
-max_connections=151
-open_files_limit=1024
-
-# Disable the performacne schema.
-# Sizing does not occur then
-loose-skip-performance-schema
-
-# Automated sizing for everything
-
-loose-performance-schema-accounts-size=-1
-loose-performance-schema-digests-size=-1
-loose-performance-schema-hosts-size=-1
-loose-performance-schema-users-size=-1
-
-loose-performance-schema-events-waits-history-size=-1
-loose-performance-schema-events-waits-history-long-size=-1
-loose-performance-schema-events-stages-history-size=-1
-loose-performance-schema-events-stages-history-long-size=-1
-loose-performance-schema-events-statements-history-size=-1
-loose-performance-schema-events-statements-history-long-size=-1
-
-loose-performance-schema-max-mutex-instances=-1
-loose-performance-schema-max-rwlock-instances=-1
-loose-performance-schema-max-cond-instances=-1
-loose-performance-schema-max-file-instances=-1
-loose-performance-schema-max-socket-instances=-1
-loose-performance-schema-max-thread-instances=-1
-loose-performance-schema-max-table-instances=-1
-loose-performance-schema-max-table-handles=-1
-
diff --git a/mysql-test/suite/perfschema/t/sizing_off.test b/mysql-test/suite/perfschema/t/sizing_off.test
deleted file mode 100644
index 32729918bd1..00000000000
--- a/mysql-test/suite/perfschema/t/sizing_off.test
+++ /dev/null
@@ -1,8 +0,0 @@
-
---source include/not_embedded.inc
---source include/have_perfschema.inc
-
-show variables where
- `Variable_name` != "performance_schema_max_statement_classes" and
- `Variable_name` like "performance_schema%";
-show status like "performance_schema%";
diff --git a/mysql-test/suite/perfschema/t/socket_connect.test b/mysql-test/suite/perfschema/t/socket_connect.test
index b4579605eb5..4ae9608cd0e 100644
--- a/mysql-test/suite/perfschema/t/socket_connect.test
+++ b/mysql-test/suite/perfschema/t/socket_connect.test
@@ -57,9 +57,9 @@ let $ip_localhost=
--echo # 1.0 Get the default connection object_instance_begin, thread id and verify
--echo # the expected number of client connections.
--echo #==============================================================================
---echo
+--echo #
--echo # 1.1 Confirm only one client connection
---echo
+--echo #
eval $count_client_connections;
if (`SELECT @my_client_connections != 1`)
@@ -70,15 +70,15 @@ if (`SELECT @my_client_connections != 1`)
exit;
}
---echo
+--echo #
--echo # 1.2 Get the default THREAD_ID;
---echo
+--echo #
eval $get_thread_id;
let $default_thread_id= `SELECT @my_thread_id`;
---echo
+--echo #
--echo # 1.3 Get the default OBJECT_INSTANCE_BEGIN
---echo
+--echo #
eval $get_object_instance_begin;
let $default_object_instance_begin= `SELECT @my_object_instance_begin`;
--disable_query_log
@@ -99,19 +99,19 @@ if ($my_socket_debug)
--connect (con1,$my_localhost,root,,test,,$MASTER_MYPORT)
--enable_query_log
---echo
+--echo #
--echo # 2.1 Get the connection thread id
---echo
+--echo #
eval $get_thread_id;
---echo
+--echo #
--echo # 2.2 Get the connection object instance begin
---echo
+--echo #
eval $get_object_instance_begin;
---echo
+--echo #
--echo # 2.3 Get the connection port
---echo
+--echo #
eval $get_port;
--disable_query_log
@@ -134,9 +134,9 @@ if ($my_socket_debug)
--echo # Con1 name2 = $con1_name2
}
---echo
+--echo #
--echo # 2.4 Verify that the connection is 127.0.0.1 or ::1
---echo
+--echo #
eval SELECT COUNT(*) = 1 AS 'Expect 1'
FROM performance_schema.socket_instances
WHERE EVENT_NAME LIKE '%client_connection%'
@@ -144,17 +144,17 @@ WHERE EVENT_NAME LIKE '%client_connection%'
AND PORT= @con1_port
AND OBJECT_INSTANCE_BEGIN= @con1_object_id;
---echo
+--echo #
--echo # 2.5 Verify that the same connection is in the summary instance table
---echo
+--echo #
eval SELECT COUNT(*) = 1 AS 'Expect 1'
FROM performance_schema.socket_summary_by_instance
WHERE EVENT_NAME LIKE '%client_connection%'
AND OBJECT_INSTANCE_BEGIN= @con1_object_id;
---echo
+--echo #
--echo # Switch to connection default
---echo
+--echo #
--connection default
--echo #==============================================================================
@@ -165,19 +165,19 @@ WHERE EVENT_NAME LIKE '%client_connection%'
--connect (con2,$my_localhost,root,,test,,$MASTER_MYPORT)
--enable_query_log
---echo
+--echo #
--echo # 3.1 Get the connection thread id
---echo
+--echo #
eval $get_thread_id;
---echo
+--echo #
--echo # 3.2 Get the connection object instance begin
---echo
+--echo #
eval $get_object_instance_begin;
---echo
+--echo #
--echo # 3.3 Get the connection port
---echo
+--echo #
eval $get_port;
--disable_query_log
@@ -200,9 +200,9 @@ if ($my_socket_debug)
--echo # con2 name2 = $con2_name2
}
---echo
+--echo #
--echo # 3.4 Verify that the connection is 127.0.0.1 or ::1
---echo
+--echo #
eval SELECT COUNT(*) = 1 AS 'Expect 1'
FROM performance_schema.socket_instances
@@ -211,17 +211,17 @@ WHERE EVENT_NAME LIKE '%client_connection%'
AND PORT= @con2_port
AND OBJECT_INSTANCE_BEGIN= @con2_object_id;
---echo
+--echo #
--echo # 3.5 Verify that the same connection is in the summary instance table
---echo
+--echo #
eval SELECT COUNT(*) = 1 AS 'Expect 1'
FROM performance_schema.socket_summary_by_instance
WHERE EVENT_NAME LIKE '%client_connection%'
AND OBJECT_INSTANCE_BEGIN= @con2_object_id;
---echo
+--echo #
--echo # 3.6 Verify that the connection is 127.0.0.1 or ::1
---echo
+--echo #
eval SELECT COUNT(*) = 1 AS 'Expect 1'
FROM performance_schema.socket_instances
WHERE EVENT_NAME LIKE '%client_connection%'
@@ -234,18 +234,18 @@ WHERE EVENT_NAME LIKE '%client_connection%'
--echo #==============================================================================
--connection default
---echo
+--echo #
--echo # 4.1 Verify that there are two TCP/IP connections in the socket instance table
---echo
+--echo #
eval SELECT COUNT(*) = 2 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;
---echo
+--echo #
--echo # 4.2 Verify that there are two TCP/IP connections in the summary instance table
---echo
+--echo #
eval SELECT COUNT(*) = 2 AS 'Expect 1'
FROM performance_schema.socket_summary_by_instance
WHERE EVENT_NAME LIKE '%client_connection%'
@@ -270,9 +270,9 @@ WHERE EVENT_NAME LIKE '%client_connection%'
--echo # 6.0 Verify sockets were removed from the instance tables
--echo #==============================================================================
---echo
+--echo #
--echo # 6.1 Verify that there are no TCP/IP connections in the socket instance table
---echo
+--echo #
let $wait_condition=
SELECT COUNT(*) = 0 AS 'Expect 1'
FROM performance_schema.socket_instances
@@ -281,9 +281,9 @@ WHERE EVENT_NAME LIKE '%client_connection%'
AND $ip_localhost;
--source include/wait_condition.inc
---echo
+--echo #
--echo # 6.2 Verify that there are no TCP/IP connections in the summary instance table
---echo
+--echo #
let $wait_condition=
SELECT COUNT(*) = 0 AS 'Expect 1'
FROM performance_schema.socket_summary_by_instance
diff --git a/mysql-test/suite/perfschema/t/socket_summary_by_event_name_func.test b/mysql-test/suite/perfschema/t/socket_summary_by_event_name_func.test
index c6860eb3213..4a6ee2b6277 100644
--- a/mysql-test/suite/perfschema/t/socket_summary_by_event_name_func.test
+++ b/mysql-test/suite/perfschema/t/socket_summary_by_event_name_func.test
@@ -28,6 +28,8 @@
# prepared statement.
--source include/no_protocol.inc
+#--source include/turn_off_only_full_group_by.inc
+
# Set this to enable debugging output
let $my_socket_debug_dbug= 0;
@@ -137,22 +139,22 @@ WHERE t_inst.event_name LIKE '%client%'
--echo #==============================================================================
--echo # 1.0 TEST INITIALIZATION
--echo #==============================================================================
---echo
+--echo #
--echo # 1.1 Disable instrumentation of the default (this) connection
---echo
+--echo #
--connection default
UPDATE performance_schema.threads
SET INSTRUMENTED='NO' WHERE PROCESSLIST_ID = CONNECTION_ID();
---echo
+--echo #
--echo # 1.2 Get the default THREAD_ID;
---echo
+--echo #
eval $get_thread_id;
let $default_thread_id= `SELECT @my_thread_id`;
---echo
+--echo #
--echo # 1.3 Get the default OBJECT_INSTANCE_BEGIN
---echo
+--echo #
eval $get_object_instance_begin;
let $default_object_instance_begin= `SELECT @my_object_instance_begin`;
@@ -166,50 +168,50 @@ if ($my_socket_debug)
--echo # Default thread id = $default_thread_id
}
---echo
+--echo #
--echo # 1.4 Create a test database
---echo
+--echo #
CREATE SCHEMA mysqltest;
---echo
+--echo #
--echo # 1.5 Create a table to store summary values from socket_summary_by_instance
--echo and socket_summary_by_event_name
---echo
+--echo #
CREATE TABLE mysqltest.my_socket_summary AS
SELECT * FROM performance_schema.socket_summary_by_instance
WHERE 1 = 0;
---echo
+--echo #
--echo # 1.6 Drop object_instance_begin from my_socket_summary
---echo
+--echo #
ALTER TABLE mysqltest.my_socket_summary
DROP COLUMN OBJECT_INSTANCE_BEGIN;
---echo
+--echo #
--echo # 1.7 Add an auto_inc column to my_socket_summary
---echo
+--echo #
ALTER TABLE mysqltest.my_socket_summary
ADD COLUMN (n INT AUTO_INCREMENT, PRIMARY KEY(n));
---echo
+--echo #
--echo # 1.8 Create test tables
---echo
+--echo #
CREATE TABLE mysqltest.t1 (n INT AUTO_INCREMENT, s1 VARCHAR(1024), PRIMARY KEY(n));
CREATE TABLE mysqltest.t2 (n INT AUTO_INCREMENT, s1 VARCHAR(1024), PRIMARY KEY(n));
--echo #==============================================================================
--echo # 2.0 ESTABLISH CLIENT CONNECTIONS
--echo #==============================================================================
---echo
+--echo #
--echo # 2.1 Connection 1 (tcp/ip, 127.0.0.1 or ::1)
---echo
+--echo #
--disable_query_log
--connect (con1,$my_localhost,root,,,,$MASTER_MYPORT)
--enable_query_log
---echo
+--echo #
--echo # 2.2 Connection 2 (localhost or unix domain socket)
---echo
+--echo #
--disable_query_log
--connect (con2,localhost,root,,,,)
--enable_query_log
@@ -217,47 +219,47 @@ CREATE TABLE mysqltest.t2 (n INT AUTO_INCREMENT, s1 VARCHAR(1024), PRIMARY KEY(n
--echo #==============================================================================
--echo # 3.0 RUN THE TESTS
--echo #==============================================================================
---echo
+--echo #
--echo # 3.1 Clear performance schema tables
---echo
+--echo #
TRUNCATE performance_schema.socket_summary_by_instance;
TRUNCATE performance_schema.socket_summary_by_event_name;
---echo
+--echo #
--echo # 3.2 Get the 'before' sum of bytes written from socket_summary_by_instance
--echo for later comparison to the 'after' byte count as a simple confirmation
--echo that the table was updated.
---echo
+--echo #
--connection default
eval $get_write_count;
let $my_count_before= `SELECT @my_write_count`;
---echo
+--echo #
--echo # 3.3 From connection 1, insert one a 1K row of data into t1
---echo
+--echo #
--connection con1
USE mysqltest;
INSERT INTO t1 (s1) VALUES (REPEAT('a', 1024));
INSERT INTO t1 (s1) SELECT s1 FROM t1;
---echo
+--echo #
--echo # 3.4 From connection 2, insert one a 1K row of data into t2
---echo
+--echo #
--connection con2
USE mysqltest;
INSERT INTO t2 (s1) VALUES (REPEAT('a', 1024));
INSERT INTO t2 (s1) SELECT s1 FROM t2;
---echo
+--echo #
--echo # 3.5 Get the 'after' sum of bytes written from socket_summary_by_instance
---echo
+--echo #
--connection default
eval $get_write_count;
let $my_count_after= `SELECT @my_write_count`;
---echo
+--echo #
--echo # 3.6 Verify that SUM_NUMBER_OF_BYTES_WRITE increased
---echo
+--echo #
if ($my_count_before >= $my_count_after)
{
@@ -272,17 +274,17 @@ if ($my_count_before >= $my_count_after)
exit;
}
---echo
+--echo #
--echo # socket_summary_by_instance was updated
---echo
+--echo #
--echo #==============================================================================
--echo # 4.0 VERIFY RESULTS
--echo #==============================================================================
---echo
+--echo #
--echo # 4.1 Verify that the totals in socket_summary_by_event_name are
--echo consistent with totals in socket_summary_by_instance
---echo
+--echo #
--disable_query_log
eval $compare_tables_and_verify;
@@ -309,25 +311,27 @@ if (`SELECT @tables_match = 0`)
--echo # 5.0 Clean up
--echo #==============================================================================
---echo
+--echo #
--echo # 5.1 Disconnect con1
---echo
+--echo #
--connection con1
--disconnect con1
--source include/wait_until_disconnected.inc
---echo
+--echo #
--echo # 5.2 Disconnect con2
---echo
+--echo #
--connection con2
--disconnect con2
--source include/wait_until_disconnected.inc
---echo
+--echo #
--echo # 5.3 Drop mysqltest
---echo
+--echo #
--connection default
DROP DATABASE mysqltest;
+#--source include/restore_sql_mode_after_turn_off_only_full_group_by.inc
+
exit;
diff --git a/mysql-test/suite/perfschema/t/socket_summary_by_instance_func.test b/mysql-test/suite/perfschema/t/socket_summary_by_instance_func.test
index 42bcb3e4d70..fc848922667 100644
--- a/mysql-test/suite/perfschema/t/socket_summary_by_instance_func.test
+++ b/mysql-test/suite/perfschema/t/socket_summary_by_instance_func.test
@@ -30,6 +30,7 @@
# Embedded server does not supprt the performance_schema.
--source include/not_embedded.inc
--source include/not_windows.inc
+--source include/no_valgrind_without_big.inc
--source include/have_perfschema.inc
# The values in the performance_schema tables depend on how much communication
@@ -38,8 +39,6 @@
# prepared statement.
--source include/no_protocol.inc
-set global session_track_schema=FALSE;
-
#===================================
# Set IP address defaults with respect to IPV6 support
#
@@ -1464,9 +1463,11 @@ if(`SELECT COUNT(*) $part`)
# 4 6706392 85 3 15509472 117 2 34851168 Connect (con*,localhost,root012345,,mysqltest,,)
# 4 10543632 89 3 10578744 117 2 39460872 Connect (con*,localhost,root0123456789,,mysqltest,,)
---echo # 4.6.1 The SUM_OF_BYTES_WRITE value is the same for all Connects.
+--echo # 4.6.1 The SUM_OF_BYTES_WRITE value depends on length of database
+--echo # since the database name is written in OK packet.
+--echo # Hence the value 2.
#========================================================================
-let $my_rules= COUNT(DISTINCT SUM_NUMBER_OF_BYTES_WRITE) = 1;
+let $my_rules= COUNT(DISTINCT SUM_NUMBER_OF_BYTES_WRITE) = 2;
let $part=
FROM mysqltest.socket_summary_by_instance_detail
WHERE OBJECT_INSTANCE_BEGIN <> @default_object_instance_begin
@@ -1710,5 +1711,3 @@ DROP SCHEMA mysqlsupertest;
--source include/wait_until_disconnected.inc
--connection default
--enable_query_log
-
-set global session_track_schema=DEFAULT;
diff --git a/mysql-test/suite/perfschema/t/socket_summary_by_instance_func_win.test b/mysql-test/suite/perfschema/t/socket_summary_by_instance_func_win.test
index 0ecb51af203..2c6a375b688 100644
--- a/mysql-test/suite/perfschema/t/socket_summary_by_instance_func_win.test
+++ b/mysql-test/suite/perfschema/t/socket_summary_by_instance_func_win.test
@@ -495,7 +495,10 @@ let $connect_user= root;
--echo # length of user name = 10 character
--echo # length of default db = 9 character
#========================================================================
+SET @orig_sql_mode= @@sql_mode;
+SET sql_mode= (SELECT replace(@@sql_mode,'NO_AUTO_CREATE_USER',''));
GRANT ALL PRIVILEGES ON *.* TO 'root012345'@'localhost';
+SET sql_mode= @orig_sql_mode;
let $connect_host= localhost;
let $connect_db= mysqltest;
let $connect_user= root012345;
@@ -506,7 +509,10 @@ DROP USER 'root012345'@'localhost';
--echo # length of user name = 14 character
--echo # length of default db = 9 character
#========================================================================
+SET @orig_sql_mode= @@sql_mode;
+SET sql_mode= (SELECT replace(@@sql_mode,'NO_AUTO_CREATE_USER',''));
GRANT ALL PRIVILEGES ON *.* to 'root0123456789'@'localhost';
+SET sql_mode= @orig_sql_mode;
let $connect_host= localhost;
let $connect_db= mysqltest;
let $connect_user= root0123456789;
@@ -1473,9 +1479,11 @@ if(`SELECT COUNT(*) $part`)
# 4 6706392 85 3 15509472 117 2 34851168 Connect (con*,localhost,root012345,,mysqltest,,)
# 4 10543632 89 3 10578744 117 2 39460872 Connect (con*,localhost,root0123456789,,mysqltest,,)
---echo # 4.6.1 The SUM_OF_BYTES_WRITE value is the same for all Connects.
+--echo # 4.6.1 The SUM_OF_BYTES_WRITE value depends on length of database
+--echo # since the database name is written in OK packet.
+--echo # Hence the value 2.
#========================================================================
-let $my_rules= COUNT(DISTINCT SUM_NUMBER_OF_BYTES_WRITE) = 1;
+let $my_rules= COUNT(DISTINCT SUM_NUMBER_OF_BYTES_WRITE) = 2;
let $part=
FROM mysqltest.socket_summary_by_instance_detail
WHERE OBJECT_INSTANCE_BEGIN <> @default_object_instance_begin
diff --git a/mysql-test/suite/perfschema/t/start_server_disable_transactions-master.opt b/mysql-test/suite/perfschema/t/start_server_disable_transactions-master.opt
new file mode 100644
index 00000000000..20f93f92f52
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/start_server_disable_transactions-master.opt
@@ -0,0 +1 @@
+--loose-performance-schema-instrument='transaction=OFF'
diff --git a/mysql-test/suite/perfschema/t/start_server_disable_transactions.test b/mysql-test/suite/perfschema/t/start_server_disable_transactions.test
new file mode 100644
index 00000000000..723dd1027c9
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/start_server_disable_transactions.test
@@ -0,0 +1,28 @@
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+--source ../include/start_server_common.inc
+
+# Expect no enabled statements instruments
+select * from performance_schema.setup_instruments
+ where name in ('transaction') and enabled='YES';
+
+# Expect no statement statistics collected
+
+select * from performance_schema.events_transactions_summary_global_by_event_name
+ where count_star > 0;
+
+select * from performance_schema.events_transactions_summary_by_thread_by_event_name
+ where count_star > 0;
+
+select * from performance_schema.events_transactions_summary_by_user_by_event_name
+ where count_star > 0;
+
+select * from performance_schema.events_transactions_summary_by_host_by_event_name
+ where count_star > 0;
+
+select * from performance_schema.events_transactions_summary_by_account_by_event_name
+ where count_star > 0;
+
diff --git a/mysql-test/suite/perfschema/t/start_server_innodb.test b/mysql-test/suite/perfschema/t/start_server_innodb.test
index 68a164a0bc1..f190482b7d5 100644
--- a/mysql-test/suite/perfschema/t/start_server_innodb.test
+++ b/mysql-test/suite/perfschema/t/start_server_innodb.test
@@ -8,4 +8,4 @@
# Expecting nothing lost with default parameters
-show status like "performance_schema%";
+show global status like "performance_schema%";
diff --git a/mysql-test/suite/perfschema/t/start_server_low_digest_sql_length-master.opt b/mysql-test/suite/perfschema/t/start_server_low_digest_sql_length-master.opt
new file mode 100644
index 00000000000..e6483c360f9
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/start_server_low_digest_sql_length-master.opt
@@ -0,0 +1,3 @@
+--thread_stack=655360
+--max_digest_length=10
+--loose-performance_schema_max_sql_text_length=10
diff --git a/mysql-test/suite/perfschema/t/start_server_low_digest_sql_length.test b/mysql-test/suite/perfschema/t/start_server_low_digest_sql_length.test
new file mode 100644
index 00000000000..ce8233a98ce
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/start_server_low_digest_sql_length.test
@@ -0,0 +1,23 @@
+# -----------------------------------------------------------------------
+# Tests for the performance schema statement Digests.
+# -----------------------------------------------------------------------
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+--source include/no_protocol.inc
+
+USE performance_schema;
+truncate table events_statements_history_long;
+
+# -----------------------------------------------------------------------
+# Test to show how the digest behaves with low value of
+# - performance_schema_max_digest_length
+# - performance_schema_max_sql_text_length
+# -----------------------------------------------------------------------
+SELECT 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
+
+--echo ####################################
+--echo # QUERYING PS STATEMENT DIGEST
+--echo ####################################
+--sorted_result
+SELECT event_name, digest, digest_text, sql_text FROM events_statements_history_long;
diff --git a/mysql-test/suite/perfschema/t/start_server_low_index-master.opt b/mysql-test/suite/perfschema/t/start_server_low_index-master.opt
new file mode 100644
index 00000000000..29cbfa631c3
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/start_server_low_index-master.opt
@@ -0,0 +1,2 @@
+--loose-enable-performance-schema
+--loose-performance_schema_max_index_stat=34
diff --git a/mysql-test/suite/perfschema/t/start_server_low_index.test b/mysql-test/suite/perfschema/t/start_server_low_index.test
new file mode 100644
index 00000000000..18004e1993c
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/start_server_low_index.test
@@ -0,0 +1,181 @@
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_valgrind.inc
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+--source ../include/start_server_common.inc
+
+
+# NOTE : Index stats are manifested during table creation. To force a low index
+# condition, performance_schema_max_index_stat must be set to the number of
+# all system table indexes, plus 1.
+
+#############################
+# Setup database and tables.
+#############################
+--disable_warnings
+drop table if exists db1.t1;
+drop database if exists db1;
+--enable_warnings
+create database db1;
+create table db1.t1 (a int, b char(10) default 'default',
+ unique key uidx(a));
+
+#######################
+# Execute few queries.
+#######################
+insert into db1.t1 values('1', 'abc');
+insert into db1.t1 values('2', 'abc');
+select * from db1.t1 where a='1';
+
+#####################################################
+# Run few queries on Performance Schema stats tables.
+#####################################################
+# There should be 3 entries in following table. 2 for insert and 1 for select.
+select COUNT_STAR, OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME
+ from performance_schema.table_io_waits_summary_by_table
+ where OBJECT_SCHEMA='db1'
+ order by OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME;
+
+# Stats for 2 indexes (full scan, uidx)
+select COUNT_STAR, OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME, INDEX_NAME
+ from performance_schema.table_io_waits_summary_by_index_usage
+ where OBJECT_SCHEMA='db1'
+ order by OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME, INDEX_NAME;
+
+flush tables;
+
+# Stats for full scan lost
+select COUNT_STAR, OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME
+ from performance_schema.table_io_waits_summary_by_table
+ where OBJECT_SCHEMA='db1'
+ order by OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME;
+
+# Stats for only 1 index, uidx
+# Stats for full scan lost
+select COUNT_STAR, OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME, INDEX_NAME
+ from performance_schema.table_io_waits_summary_by_index_usage
+ where OBJECT_SCHEMA='db1'
+ order by OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME, INDEX_NAME;
+
+# Expect INDEX_STAT lost, we have room for 1 out of 2
+--disable_warnings
+select variable_value > 0 from information_schema.global_status
+ where variable_name like 'PERFORMANCE_SCHEMA_INDEX_STAT_LOST';
+
+# While at it, check that FLUSH STATUS Resets the lost counter
+FLUSH STATUS;
+
+select variable_value from information_schema.global_status
+ where variable_name like 'PERFORMANCE_SCHEMA_INDEX_STAT_LOST';
+--enable_warnings
+
+
+create table db1.t2 (a int, b char(10) default 'default',
+ unique key uidx(a));
+
+#######################
+# Execute few queries.
+#######################
+insert into db1.t1 values('3', 'abc');
+insert into db1.t1 values('4', 'abc');
+select * from db1.t1 where a='1';
+
+insert into db1.t2 values('1', 'abc');
+insert into db1.t2 values('2', 'abc');
+select * from db1.t2 where a='1';
+
+#####################################################
+# Run few queries on Performance Schema stats tables.
+#####################################################
+
+select COUNT_STAR, OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME
+ from performance_schema.table_io_waits_summary_by_table
+ where OBJECT_SCHEMA='db1'
+ order by OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME;
+
+select COUNT_STAR, OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME, INDEX_NAME
+ from performance_schema.table_io_waits_summary_by_index_usage
+ where OBJECT_SCHEMA='db1'
+ order by OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME, INDEX_NAME;
+
+flush tables;
+
+select COUNT_STAR, OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME
+ from performance_schema.table_io_waits_summary_by_table
+ where OBJECT_SCHEMA='db1'
+ order by OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME;
+
+select COUNT_STAR, OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME, INDEX_NAME
+ from performance_schema.table_io_waits_summary_by_index_usage
+ where OBJECT_SCHEMA='db1'
+ order by OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME, INDEX_NAME;
+
+# Expect INDEX_STAT lost
+--disable_warnings
+select variable_value > 0 from information_schema.global_status
+ where variable_name like 'PERFORMANCE_SCHEMA_INDEX_STAT_LOST';
+--enable_warnings
+
+FLUSH STATUS;
+
+
+#####################################################################################
+# Update setup_objects to DISABLE TABLE and check index lost stats after flush tables
+#####################################################################################
+
+update performance_schema.setup_objects set ENABLED='NO' where OBJECT_TYPE='TABLE';
+
+
+
+#######################
+# Execute few queries.
+#######################
+insert into db1.t1 values('5', 'abc');
+insert into db1.t1 values('6', 'abc');
+select * from db1.t1 where a='1';
+
+insert into db1.t2 values('3', 'abc');
+insert into db1.t2 values('4', 'abc');
+select * from db1.t2 where a='1';
+
+# Empty, objects are disabled
+select COUNT_STAR, OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME
+ from performance_schema.table_io_waits_summary_by_table
+ where OBJECT_SCHEMA='db1'
+ order by OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME;
+
+# Empty, objects are disabled
+select COUNT_STAR, OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME, INDEX_NAME
+ from performance_schema.table_io_waits_summary_by_index_usage
+ where OBJECT_SCHEMA='db1'
+ order by OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME, INDEX_NAME;
+
+flush tables;
+
+# Empty, objects are disabled
+select COUNT_STAR, OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME
+ from performance_schema.table_io_waits_summary_by_table
+ where OBJECT_SCHEMA='db1'
+ order by OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME;
+
+# Empty, objects are disabled
+select COUNT_STAR, OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME, INDEX_NAME
+ from performance_schema.table_io_waits_summary_by_index_usage
+ where OBJECT_SCHEMA='db1'
+ order by OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME, INDEX_NAME;
+
+# Do not expect lost counter in INDEX_STAT
+--disable_warnings
+select variable_value from information_schema.global_status
+ where variable_name like 'PERFORMANCE_SCHEMA_INDEX_STAT_LOST';
+--enable_warnings
+
+###########
+# Cleanup.
+###########
+drop database db1;
+
+update performance_schema.setup_objects set ENABLED='YES'
+ where OBJECT_TYPE='TABLE' and OBJECT_SCHEMA="%";
diff --git a/mysql-test/suite/perfschema/t/start_server_low_table_lock-master.opt b/mysql-test/suite/perfschema/t/start_server_low_table_lock-master.opt
new file mode 100644
index 00000000000..d687f8d04b5
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/start_server_low_table_lock-master.opt
@@ -0,0 +1,2 @@
+--loose-enable-performance-schema
+--loose-performance_schema_max_table_lock_stat=1
diff --git a/mysql-test/suite/perfschema/t/start_server_low_table_lock.test b/mysql-test/suite/perfschema/t/start_server_low_table_lock.test
new file mode 100644
index 00000000000..8f35eb64e2a
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/start_server_low_table_lock.test
@@ -0,0 +1,130 @@
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+--source ../include/start_server_common.inc
+
+#############################
+# Setup database and tables.
+#############################
+--disable_warnings
+drop table if exists db1.t1;
+drop database if exists db1;
+--enable_warnings
+create database db1;
+create table db1.t1 (a int, b char(10) default 'default');
+
+#######################
+# Execute few queries.
+#######################
+insert into db1.t1 values('1', 'abc');
+insert into db1.t1 values('2', 'abc');
+select * from db1.t1 where a='1';
+
+#####################################################
+# Run few queries on Performance Schema stats tables.
+#####################################################
+# There should be 3 entries in following table. 2 for insert and 1 for select.
+select COUNT_STAR, OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME
+ from performance_schema.table_lock_waits_summary_by_table
+ where OBJECT_SCHEMA='db1'
+ order by OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME;
+
+flush tables;
+
+select COUNT_STAR, OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME
+ from performance_schema.table_lock_waits_summary_by_table
+ where OBJECT_SCHEMA='db1'
+ order by OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME;
+
+# Expect no TABLE_LOCK_STAT lost, we have room for 1 table lock for db1.t1
+--disable_warnings
+select variable_value from information_schema.global_status
+ where variable_name like 'PERFORMANCE_SCHEMA_TABLE_LOCK_STAT_LOST';
+--enable_warnings
+
+create table db1.t2 (a int, b char(10) default 'default',
+ unique key uidx(a));
+
+#######################
+# Execute few queries.
+#######################
+insert into db1.t1 values('3', 'abc');
+insert into db1.t1 values('4', 'abc');
+select * from db1.t1 where a='1';
+
+insert into db1.t2 values('1', 'abc');
+insert into db1.t2 values('2', 'abc');
+select * from db1.t2 where a='1';
+
+#####################################################
+# Run few queries on Performance Schema stats tables.
+#####################################################
+
+select COUNT_STAR, OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME
+ from performance_schema.table_lock_waits_summary_by_table
+ where OBJECT_SCHEMA='db1'
+ order by OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME;
+
+flush tables;
+
+select COUNT_STAR, OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME
+ from performance_schema.table_lock_waits_summary_by_table
+ where OBJECT_SCHEMA='db1'
+ order by OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME;
+
+# Expect TABLE_LOCK_STAT lost, we can not keep stats for db1.t2
+--disable_warnings
+select variable_value > 0 from information_schema.global_status
+ where variable_name like 'PERFORMANCE_SCHEMA_TABLE_LOCK_STAT_LOST';
+--enable_warnings
+
+flush status;
+
+
+#######################################
+# Update setup_objects to DISABLE TABLE
+#######################################
+
+update performance_schema.setup_objects set ENABLED='NO'
+ where OBJECT_TYPE='TABLE' and OBJECT_SCHEMA="%";
+
+#######################
+# Execute few queries.
+#######################
+insert into db1.t1 values('5', 'abc');
+insert into db1.t1 values('6', 'abc');
+select * from db1.t1 where a='1';
+
+insert into db1.t2 values('3', 'abc');
+insert into db1.t2 values('4', 'abc');
+select * from db1.t2 where a='1';
+
+# Empty, objects are disabled
+select COUNT_STAR, OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME
+ from performance_schema.table_lock_waits_summary_by_table
+ where OBJECT_SCHEMA='db1'
+ order by OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME;
+
+flush tables;
+
+# Empty, objects are disabled
+select COUNT_STAR, OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME
+ from performance_schema.table_lock_waits_summary_by_table
+ where OBJECT_SCHEMA='db1'
+ order by OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME;
+
+# Do not expect lost counter in TABLE_LOCK_STAT
+--disable_warnings
+select variable_value from information_schema.global_status
+ where variable_name like 'PERFORMANCE_SCHEMA_TABLE_LOCK_STAT_LOST';
+--enable_warnings
+
+###########
+# Cleanup.
+###########
+drop database db1;
+
+update performance_schema.setup_objects set ENABLED='YES'
+ where OBJECT_TYPE='TABLE' and OBJECT_SCHEMA="%";
diff --git a/mysql-test/suite/perfschema/t/start_server_no_account.test b/mysql-test/suite/perfschema/t/start_server_no_account.test
index b9b0c858dfb..563fdbaa1f0 100644
--- a/mysql-test/suite/perfschema/t/start_server_no_account.test
+++ b/mysql-test/suite/perfschema/t/start_server_no_account.test
@@ -6,11 +6,13 @@
--source ../include/start_server_common.inc
# Expect no records
-show variables like "performance_schema_accounts_size";
+show global variables like "performance_schema_accounts_size";
select count(*) from performance_schema.accounts;
# We lost all the data
+--disable_warnings
select variable_value > 0 from information_schema.global_status
where variable_name like 'PERFORMANCE_SCHEMA_ACCOUNTS_LOST';
+--enable_warnings
diff --git a/mysql-test/suite/perfschema/t/start_server_no_cond_class.test b/mysql-test/suite/perfschema/t/start_server_no_cond_class.test
index 31578f80238..8a5cf0f5797 100644
--- a/mysql-test/suite/perfschema/t/start_server_no_cond_class.test
+++ b/mysql-test/suite/perfschema/t/start_server_no_cond_class.test
@@ -6,18 +6,20 @@
--source ../include/start_server_common.inc
# Expect no classes
-show variables like "performance_schema_max_cond_classes";
+show global variables like "performance_schema_max_cond_classes";
select count(*) from performance_schema.setup_instruments
where name like "wait/synch/cond/%";
# We lost all the classes
+--disable_warnings
select variable_value > 0 from information_schema.global_status
where variable_name like 'PERFORMANCE_SCHEMA_COND_CLASSES_LOST';
+--enable_warnings
# Expect no instances
select count(*) from performance_schema.cond_instances;
# Expect no instances lost
-show status like "performance_schema_cond_instances_lost";
+show global status like "performance_schema_cond_instances_lost";
diff --git a/mysql-test/suite/perfschema/t/start_server_no_cond_inst.test b/mysql-test/suite/perfschema/t/start_server_no_cond_inst.test
index 03b9b16ef4e..8168ef1024d 100644
--- a/mysql-test/suite/perfschema/t/start_server_no_cond_inst.test
+++ b/mysql-test/suite/perfschema/t/start_server_no_cond_inst.test
@@ -6,21 +6,23 @@
--source ../include/start_server_common.inc
# Expect classes
-show variables like "performance_schema_max_cond_classes";
+show global variables like "performance_schema_max_cond_classes";
select count(*) > 0 from performance_schema.setup_instruments
where name like "wait/synch/cond/%";
# Expect no class lost
-show status like "performance_schema_cond_classes_lost";
+show global status like "performance_schema_cond_classes_lost";
# Expect no instances
-show variables like "performance_schema_max_cond_instances";
+show global variables like "performance_schema_max_cond_instances";
select count(*) from performance_schema.cond_instances;
# Expect instances lost
+--disable_warnings
select variable_value > 0 from information_schema.global_status
where variable_name like 'PERFORMANCE_SCHEMA_COND_INSTANCES_LOST';
+--enable_warnings
diff --git a/mysql-test/suite/perfschema/t/start_server_no_digests.test b/mysql-test/suite/perfschema/t/start_server_no_digests.test
index dbbce662256..605ea1f31ab 100644
--- a/mysql-test/suite/perfschema/t/start_server_no_digests.test
+++ b/mysql-test/suite/perfschema/t/start_server_no_digests.test
@@ -24,7 +24,7 @@ SELECT SCHEMA_NAME, DIGEST_TEXT, COUNT_STAR, SUM_ROWS_AFFECTED, SUM_WARNINGS,
# Expect no digest
-SHOW VARIABLES LIKE "performance_schema_digests_size";
+SHOW GLOBAL VARIABLES LIKE "performance_schema_digests_size";
SELECT COUNT(*) FROM performance_schema.events_statements_summary_by_digest;
# Cleanup for Digest
diff --git a/mysql-test/suite/perfschema/t/start_server_no_file_class.test b/mysql-test/suite/perfschema/t/start_server_no_file_class.test
index b2c97ccde1e..74ed465a0d8 100644
--- a/mysql-test/suite/perfschema/t/start_server_no_file_class.test
+++ b/mysql-test/suite/perfschema/t/start_server_no_file_class.test
@@ -6,18 +6,20 @@
--source ../include/start_server_common.inc
# Expect no classes
-show variables like "performance_schema_max_file_classes";
+show global variables like "performance_schema_max_file_classes";
select count(*) from performance_schema.setup_instruments
where name like "wait/io/file/%";
# We lost all the classes
+--disable_warnings
select variable_value > 0 from information_schema.global_status
where variable_name like 'PERFORMANCE_SCHEMA_FILE_CLASSES_LOST';
+--enable_warnings
# Expect no instances
select count(*) from performance_schema.file_instances;
# Expect no instances lost
-show status like "performance_schema_file_instances_lost";
+show global status like "performance_schema_file_instances_lost";
diff --git a/mysql-test/suite/perfschema/t/start_server_no_file_inst.test b/mysql-test/suite/perfschema/t/start_server_no_file_inst.test
index d8a7402a948..715fe656cc2 100644
--- a/mysql-test/suite/perfschema/t/start_server_no_file_inst.test
+++ b/mysql-test/suite/perfschema/t/start_server_no_file_inst.test
@@ -6,21 +6,23 @@
--source ../include/start_server_common.inc
# Expect classes
-show variables like "performance_schema_max_file_classes";
+show global variables like "performance_schema_max_file_classes";
select count(*) > 0 from performance_schema.setup_instruments
where name like "wait/io/file/%";
# Expect no class lost
-show status like "performance_schema_file_classes_lost";
+show global status like "performance_schema_file_classes_lost";
# Expect no instances
-show variables like "performance_schema_max_file_instances";
+show global variables like "performance_schema_max_file_instances";
select count(*) from performance_schema.file_instances;
# Expect instances lost
+--disable_warnings
select variable_value > 0 from information_schema.global_status
where variable_name like 'PERFORMANCE_SCHEMA_FILE_INSTANCES_LOST';
+--enable_warnings
diff --git a/mysql-test/suite/perfschema/t/start_server_no_host.test b/mysql-test/suite/perfschema/t/start_server_no_host.test
index e0d3d4b1f0f..5f9dd7067cc 100644
--- a/mysql-test/suite/perfschema/t/start_server_no_host.test
+++ b/mysql-test/suite/perfschema/t/start_server_no_host.test
@@ -6,11 +6,13 @@
--source ../include/start_server_common.inc
# Expect no records
-show variables like "performance_schema_hosts_size";
+show global variables like "performance_schema_hosts_size";
select count(*) from performance_schema.hosts;
# We lost all the data
+--disable_warnings
select variable_value > 0 from information_schema.global_status
where variable_name like 'PERFORMANCE_SCHEMA_HOSTS_LOST';
+--enable_warnings
diff --git a/mysql-test/suite/perfschema/t/start_server_no_index-master.opt b/mysql-test/suite/perfschema/t/start_server_no_index-master.opt
new file mode 100644
index 00000000000..38bbb9efed2
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/start_server_no_index-master.opt
@@ -0,0 +1,2 @@
+--loose-enable-performance-schema
+--loose-performance_schema_max_index_stat=0
diff --git a/mysql-test/suite/perfschema/t/start_server_no_index.test b/mysql-test/suite/perfschema/t/start_server_no_index.test
new file mode 100644
index 00000000000..8c636cc6163
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/start_server_no_index.test
@@ -0,0 +1,64 @@
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+--source ../include/start_server_common.inc
+
+#############################
+# Setup database and tables.
+#############################
+--disable_warnings
+drop table if exists db1.t1;
+drop database if exists db1;
+--enable_warnings
+create database db1;
+create table db1.t1 (a int, b char(10) default 'default',
+ unique key uidx(a));
+
+#######################
+# Execute few queries.
+#######################
+insert into db1.t1 values('1', 'abc');
+insert into db1.t1 values('2', 'abc');
+select * from db1.t1 where a='1';
+
+#####################################################
+# Run few queries on Performance Schema stats tables.
+#####################################################
+# There should be 3 entries in following table. 2 for insert and 1 for select.
+# This is because lock stats are still in the table handles
+select COUNT_STAR from performance_schema.table_io_waits_summary_by_table
+ where OBJECT_SCHEMA='db1' and OBJECT_NAME='t1';
+# There should be 1 entry in following table. Thats is for select.
+# This is because lock stats are still in the table handles
+select COUNT_STAR from performance_schema.table_io_waits_summary_by_index_usage
+ where INDEX_NAME!='NULL';
+
+# Now force aggregation by closing table handles
+FLUSH TABLES;
+
+# Stats are now missing
+select COUNT_STAR from performance_schema.table_io_waits_summary_by_table
+ where OBJECT_SCHEMA='db1' and OBJECT_NAME='t1';
+
+# Stats are now missing
+select COUNT_STAR from performance_schema.table_io_waits_summary_by_index_usage
+ where INDEX_NAME!='NULL';
+
+# Expect INDEX_STAT lost
+--disable_warnings
+select variable_value > 0 from information_schema.global_status
+ where variable_name like 'PERFORMANCE_SCHEMA_INDEX_STAT_LOST';
+
+# While at it, check that FLUSH STATUS Resets the lost counter
+FLUSH STATUS;
+
+select variable_value from information_schema.global_status
+ where variable_name like 'PERFORMANCE_SCHEMA_INDEX_STAT_LOST';
+--enable_warnings
+
+###########
+# Cleanup.
+###########
+drop database db1;
diff --git a/mysql-test/suite/perfschema/t/start_server_no_mdl-master.opt b/mysql-test/suite/perfschema/t/start_server_no_mdl-master.opt
new file mode 100644
index 00000000000..93a55af2f9d
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/start_server_no_mdl-master.opt
@@ -0,0 +1,2 @@
+--loose-enable-performance-schema
+--loose-performance_schema_max_metadata_locks=0
diff --git a/mysql-test/suite/perfschema/t/start_server_no_mdl.test b/mysql-test/suite/perfschema/t/start_server_no_mdl.test
new file mode 100644
index 00000000000..c3d1ca7d791
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/start_server_no_mdl.test
@@ -0,0 +1,23 @@
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+--source ../include/start_server_common.inc
+
+select count(*) from performance_schema.metadata_locks;
+
+# Expect metadata locks lost
+--disable_warnings
+select variable_value > 0 from information_schema.global_status
+ where variable_name like 'PERFORMANCE_SCHEMA_METADATA_LOCK_LOST';
+--enable_warnings
+
+# While at it, check that flush status resets the lost counter
+FLUSH STATUS;
+
+--disable_warnings
+select variable_value from information_schema.global_status
+ where variable_name like 'PERFORMANCE_SCHEMA_METADATA_LOCK_LOST';
+--enable_warnings
+
diff --git a/mysql-test/suite/perfschema/t/start_server_no_memory_class-master.opt b/mysql-test/suite/perfschema/t/start_server_no_memory_class-master.opt
new file mode 100644
index 00000000000..9ff2f77a19e
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/start_server_no_memory_class-master.opt
@@ -0,0 +1,2 @@
+--loose-enable-performance-schema
+--loose-performance_schema_max_memory_classes=0
diff --git a/mysql-test/suite/perfschema/t/start_server_no_memory_class.test b/mysql-test/suite/perfschema/t/start_server_no_memory_class.test
new file mode 100644
index 00000000000..e14e5f39d7f
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/start_server_no_memory_class.test
@@ -0,0 +1,26 @@
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+--source ../include/start_server_common.inc
+
+# Expect no classes
+show global variables like "performance_schema_max_memory_classes";
+
+# Expect builtin memory classes
+select name from performance_schema.setup_instruments
+ where name like "memory/performance_schema/%"
+ order by name;
+
+# Expect no memory classes
+select count(*) from performance_schema.setup_instruments
+ where name like "memory/%"
+ and name not like "memory/performance_schema/%";
+
+# We lost all the classes
+--disable_warnings
+select variable_value > 0 from information_schema.global_status
+ where variable_name like 'PERFORMANCE_SCHEMA_MEMORY_CLASSES_LOST';
+--enable_warnings
+
diff --git a/mysql-test/suite/perfschema/t/start_server_no_mutex_class.test b/mysql-test/suite/perfschema/t/start_server_no_mutex_class.test
index 43798ecf01f..918d79e9417 100644
--- a/mysql-test/suite/perfschema/t/start_server_no_mutex_class.test
+++ b/mysql-test/suite/perfschema/t/start_server_no_mutex_class.test
@@ -6,18 +6,20 @@
--source ../include/start_server_common.inc
# Expect no classes
-show variables like "performance_schema_max_mutex_classes";
+show global variables like "performance_schema_max_mutex_classes";
select count(*) from performance_schema.setup_instruments
where name like "wait/synch/mutex/%";
# We lost all the classes
+--disable_warnings
select variable_value > 0 from information_schema.global_status
where variable_name like 'PERFORMANCE_SCHEMA_MUTEX_CLASSES_LOST';
+--enable_warnings
# Expect no instances
select count(*) from performance_schema.mutex_instances;
# Expect no instances lost
-show status like "performance_schema_mutex_instances_lost";
+show global status like "performance_schema_mutex_instances_lost";
diff --git a/mysql-test/suite/perfschema/t/start_server_no_mutex_inst.test b/mysql-test/suite/perfschema/t/start_server_no_mutex_inst.test
index bffb8218937..106d5df0307 100644
--- a/mysql-test/suite/perfschema/t/start_server_no_mutex_inst.test
+++ b/mysql-test/suite/perfschema/t/start_server_no_mutex_inst.test
@@ -6,21 +6,23 @@
--source ../include/start_server_common.inc
# Expect classes
-show variables like "performance_schema_max_mutex_classes";
+show global variables like "performance_schema_max_mutex_classes";
select count(*) > 0 from performance_schema.setup_instruments
where name like "wait/synch/mutex/%";
# Expect no class lost
-show status like "performance_schema_mutex_classes_lost";
+show global status like "performance_schema_mutex_classes_lost";
# Expect no instances
-show variables like "performance_schema_max_mutex_instances";
+show global variables like "performance_schema_max_mutex_instances";
select count(*) from performance_schema.mutex_instances;
# Expect instances lost
+--disable_warnings
select variable_value > 0 from information_schema.global_status
where variable_name like 'PERFORMANCE_SCHEMA_MUTEX_INSTANCES_LOST';
+--enable_warnings
diff --git a/mysql-test/suite/perfschema/t/start_server_no_prepared_stmts_instances-master.opt b/mysql-test/suite/perfschema/t/start_server_no_prepared_stmts_instances-master.opt
new file mode 100644
index 00000000000..5a9501cb6e7
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/start_server_no_prepared_stmts_instances-master.opt
@@ -0,0 +1,2 @@
+--loose-enable-performance-schema
+--loose-performance_schema_max_prepared_statements_instances=0
diff --git a/mysql-test/suite/perfschema/t/start_server_no_prepared_stmts_instances.test b/mysql-test/suite/perfschema/t/start_server_no_prepared_stmts_instances.test
new file mode 100644
index 00000000000..840b3afdbf3
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/start_server_no_prepared_stmts_instances.test
@@ -0,0 +1,43 @@
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+--source include/no_protocol.inc
+
+--source ../include/start_server_common.inc
+
+CREATE DATABASE db;
+USE db;
+
+# Expect no history
+
+show global variables like "performance_schema_max_prepared_statements_instances";
+select count(*) from performance_schema.prepared_statements_instances;
+
+# Valid operation, edge case
+
+truncate table performance_schema.prepared_statements_instances;
+
+# Prepare statements
+--source suite/perfschema/include/prepared_stmts_setup.inc
+
+# check the lost status
+show global status like "%performance_schema_prepared_statements_lost%";
+
+# Execute statements
+--source suite/perfschema/include/prepared_stmts_execution.inc
+
+# check the lost status
+show global status like "%performance_schema_prepared_statements_lost%";
+
+# deallocate prepared statements
+--source suite/perfschema/include/prepared_stmts_deallocation.inc
+
+# check the lost status
+show global status like "%performance_schema_prepared_statements_lost%";
+
+# Flush status now
+flush status;
+
+# status after flush. expect 0.
+show global status like "%performance_schema_prepared_statements_lost%";
+
+DROP DATABASE db;
diff --git a/mysql-test/suite/perfschema/t/start_server_no_rwlock_class.test b/mysql-test/suite/perfschema/t/start_server_no_rwlock_class.test
index 3c4f32137cc..e876faabed6 100644
--- a/mysql-test/suite/perfschema/t/start_server_no_rwlock_class.test
+++ b/mysql-test/suite/perfschema/t/start_server_no_rwlock_class.test
@@ -6,18 +6,20 @@
--source ../include/start_server_common.inc
# Expect no classes
-show variables like "performance_schema_max_rwlock_classes";
+show global variables like "performance_schema_max_rwlock_classes";
select count(*) from performance_schema.setup_instruments
where name like "wait/synch/rwlock/%";
# We lost all the classes
+--disable_warnings
select variable_value > 0 from information_schema.global_status
where variable_name like 'PERFORMANCE_SCHEMA_RWLOCK_CLASSES_LOST';
+--enable_warnings
# Expect no instances
select count(*) from performance_schema.rwlock_instances;
# Expect no instances lost
-show status like "performance_schema_rwlock_instances_lost";
+show global status like "performance_schema_rwlock_instances_lost";
diff --git a/mysql-test/suite/perfschema/t/start_server_no_rwlock_inst.test b/mysql-test/suite/perfschema/t/start_server_no_rwlock_inst.test
index 68cb75ea37e..ace773a6dac 100644
--- a/mysql-test/suite/perfschema/t/start_server_no_rwlock_inst.test
+++ b/mysql-test/suite/perfschema/t/start_server_no_rwlock_inst.test
@@ -6,21 +6,23 @@
--source ../include/start_server_common.inc
# Expect classes
-show variables like "performance_schema_max_rwlock_classes";
+show global variables like "performance_schema_max_rwlock_classes";
select count(*) > 0 from performance_schema.setup_instruments
where name like "wait/synch/rwlock/%";
# Expect no class lost
-show status like "performance_schema_rwlock_classes_lost";
+show global status like "performance_schema_rwlock_classes_lost";
# Expect no instances
-show variables like "performance_schema_max_rwlock_instances";
+show global variables like "performance_schema_max_rwlock_instances";
select count(*) from performance_schema.rwlock_instances;
# Expect instances lost
+--disable_warnings
select variable_value > 0 from information_schema.global_status
where variable_name like 'PERFORMANCE_SCHEMA_RWLOCK_INSTANCES_LOST';
+--enable_warnings
diff --git a/mysql-test/suite/perfschema/t/start_server_no_setup_actors.test b/mysql-test/suite/perfschema/t/start_server_no_setup_actors.test
index d1433053df8..970f500815d 100644
--- a/mysql-test/suite/perfschema/t/start_server_no_setup_actors.test
+++ b/mysql-test/suite/perfschema/t/start_server_no_setup_actors.test
@@ -6,7 +6,7 @@
--source ../include/start_server_common.inc
# Expect no setup_actors
-show variables like "performance_schema_setup_actors_size";
+show global variables like "performance_schema_setup_actors_size";
# Expect no setup_actors
select count(*) from performance_schema.setup_actors;
diff --git a/mysql-test/suite/perfschema/t/start_server_no_setup_objects.test b/mysql-test/suite/perfschema/t/start_server_no_setup_objects.test
index d46805e5b25..039e963e8d6 100644
--- a/mysql-test/suite/perfschema/t/start_server_no_setup_objects.test
+++ b/mysql-test/suite/perfschema/t/start_server_no_setup_objects.test
@@ -6,7 +6,7 @@
--source ../include/start_server_common.inc
# Expect no setup_objects
-show variables like "performance_schema_setup_objects_size";
+show global variables like "performance_schema_setup_objects_size";
# Expect no setup_objects
select count(*) from performance_schema.setup_objects;
diff --git a/mysql-test/suite/perfschema/t/start_server_no_socket_class.test b/mysql-test/suite/perfschema/t/start_server_no_socket_class.test
index ec1a2495413..a956a63ec0d 100644
--- a/mysql-test/suite/perfschema/t/start_server_no_socket_class.test
+++ b/mysql-test/suite/perfschema/t/start_server_no_socket_class.test
@@ -6,18 +6,20 @@
--source ../include/start_server_common.inc
# Expect no classes
-show variables like "performance_schema_max_socket_classes";
+show global variables like "performance_schema_max_socket_classes";
select count(*) from performance_schema.setup_instruments
where name like "wait/io/socket/%";
# We lost all the classes
+--disable_warnings
select variable_value > 0 from information_schema.global_status
where variable_name like 'PERFORMANCE_SCHEMA_SOCKET_CLASSES_LOST';
+--enable_warnings
# Expect no instances
select count(*) from performance_schema.socket_instances;
# Expect no instances lost
-show status like "performance_schema_socket_instances_lost";
+show global status like "performance_schema_socket_instances_lost";
diff --git a/mysql-test/suite/perfschema/t/start_server_no_socket_inst.test b/mysql-test/suite/perfschema/t/start_server_no_socket_inst.test
index 752a1666550..0202869dd9d 100644
--- a/mysql-test/suite/perfschema/t/start_server_no_socket_inst.test
+++ b/mysql-test/suite/perfschema/t/start_server_no_socket_inst.test
@@ -6,21 +6,23 @@
--source ../include/start_server_common.inc
# Expect classes
-show variables like "performance_schema_max_socket_classes";
+show global variables like "performance_schema_max_socket_classes";
select count(*) > 0 from performance_schema.setup_instruments
where name like "wait/io/socket/%";
# Expect no class lost
-show status like "performance_schema_socket_classes_lost";
+show global status like "performance_schema_socket_classes_lost";
# Expect no instances
-show variables like "performance_schema_max_socket_instances";
+show global variables like "performance_schema_max_socket_instances";
select count(*) from performance_schema.socket_instances;
# Expect instances lost
+--disable_warnings
select variable_value > 0 from information_schema.global_status
where variable_name like 'PERFORMANCE_SCHEMA_SOCKET_INSTANCES_LOST';
+--enable_warnings
diff --git a/mysql-test/suite/perfschema/t/start_server_no_stage_class.test b/mysql-test/suite/perfschema/t/start_server_no_stage_class.test
index 23d22ac5431..d0a9d8acb63 100644
--- a/mysql-test/suite/perfschema/t/start_server_no_stage_class.test
+++ b/mysql-test/suite/perfschema/t/start_server_no_stage_class.test
@@ -6,14 +6,16 @@
--source ../include/start_server_common.inc
# Expect no classes
-show variables like "performance_schema_max_stage_classes";
+show global variables like "performance_schema_max_stage_classes";
select count(*) from performance_schema.setup_instruments
where name like "stage/%";
# We lost all the classes
+--disable_warnings
select variable_value > 0 from information_schema.global_status
where variable_name like 'PERFORMANCE_SCHEMA_STAGE_CLASSES_LOST';
+--enable_warnings
# Expect no stages
select count(*) from performance_schema.events_stages_current;
diff --git a/mysql-test/suite/perfschema/t/start_server_no_stages_history.test b/mysql-test/suite/perfschema/t/start_server_no_stages_history.test
index 1f5df187646..fca9b5f6cfd 100644
--- a/mysql-test/suite/perfschema/t/start_server_no_stages_history.test
+++ b/mysql-test/suite/perfschema/t/start_server_no_stages_history.test
@@ -6,7 +6,7 @@
--source ../include/start_server_common.inc
# Expect no history
-show variables like "performance_schema_events_stages_history_size";
+show global variables like "performance_schema_events_stages_history_size";
select count(*) from performance_schema.events_stages_history;
# Valid operation, edge case
diff --git a/mysql-test/suite/perfschema/t/start_server_no_stages_history_long.test b/mysql-test/suite/perfschema/t/start_server_no_stages_history_long.test
index 84c227790c9..282e396ac00 100644
--- a/mysql-test/suite/perfschema/t/start_server_no_stages_history_long.test
+++ b/mysql-test/suite/perfschema/t/start_server_no_stages_history_long.test
@@ -6,7 +6,7 @@
--source ../include/start_server_common.inc
# Expect no history long
-show variables like "performance_schema_events_stages_history_long_size";
+show global variables like "performance_schema_events_stages_history_long_size";
select count(*) from performance_schema.events_stages_history_long;
# Valid operation, edge case
diff --git a/mysql-test/suite/perfschema/t/start_server_no_statement_class.test b/mysql-test/suite/perfschema/t/start_server_no_statement_class.test
index 71deb85680a..fa80d328484 100644
--- a/mysql-test/suite/perfschema/t/start_server_no_statement_class.test
+++ b/mysql-test/suite/perfschema/t/start_server_no_statement_class.test
@@ -6,14 +6,16 @@
--source ../include/start_server_common.inc
# Expect no classes
-show variables like "performance_schema_max_statement_classes";
+show global variables like "performance_schema_max_statement_classes";
select count(*) from performance_schema.setup_instruments
where name like "statement/%";
# We lost all the classes
+--disable_warnings
select variable_value > 0 from information_schema.global_status
where variable_name like 'PERFORMANCE_SCHEMA_STATEMENT_CLASSES_LOST';
+--enable_warnings
# Expect no statements
select count(*) from performance_schema.events_statements_current;
diff --git a/mysql-test/suite/perfschema/t/start_server_no_statements_history.test b/mysql-test/suite/perfschema/t/start_server_no_statements_history.test
index 625e0bb3cd3..e87a59dd676 100644
--- a/mysql-test/suite/perfschema/t/start_server_no_statements_history.test
+++ b/mysql-test/suite/perfschema/t/start_server_no_statements_history.test
@@ -6,7 +6,7 @@
--source ../include/start_server_common.inc
# Expect no history
-show variables like "performance_schema_events_statements_history_size";
+show global variables like "performance_schema_events_statements_history_size";
select count(*) from performance_schema.events_statements_history;
# Valid operation, edge case
diff --git a/mysql-test/suite/perfschema/t/start_server_no_statements_history_long.test b/mysql-test/suite/perfschema/t/start_server_no_statements_history_long.test
index a8d551cbed0..c14df52a24f 100644
--- a/mysql-test/suite/perfschema/t/start_server_no_statements_history_long.test
+++ b/mysql-test/suite/perfschema/t/start_server_no_statements_history_long.test
@@ -6,7 +6,7 @@
--source ../include/start_server_common.inc
# Expect no history long
-show variables like "performance_schema_events_statements_history_long_size";
+show global variables like "performance_schema_events_statements_history_long_size";
select count(*) from performance_schema.events_statements_history_long;
# Valid operation, edge case
diff --git a/mysql-test/suite/perfschema/t/start_server_no_table_hdl.test b/mysql-test/suite/perfschema/t/start_server_no_table_hdl.test
index 80553f11866..87c4173ccb6 100644
--- a/mysql-test/suite/perfschema/t/start_server_no_table_hdl.test
+++ b/mysql-test/suite/perfschema/t/start_server_no_table_hdl.test
@@ -6,10 +6,10 @@
--source ../include/start_server_common.inc
# Expect instances
-show variables like "performance_schema_max_table_instances";
+show global variables like "performance_schema_max_table_instances";
# Expect no handles
-show variables like "performance_schema_max_table_handles";
+show global variables like "performance_schema_max_table_handles";
# Create an instrumented table
--disable_warnings
@@ -22,9 +22,11 @@ select * from test.instrument_me;
drop table test.instrument_me;
# Expect no instances lost
-show variables like "performance_schema_max_table_instances";
+show global variables like "performance_schema_max_table_instances";
# We lost all the handles
+--disable_warnings
select variable_value > 0 from information_schema.global_status
where variable_name like 'PERFORMANCE_SCHEMA_TABLE_HANDLES_LOST';
+--enable_warnings
diff --git a/mysql-test/suite/perfschema/t/start_server_no_table_inst-master.opt b/mysql-test/suite/perfschema/t/start_server_no_table_inst-master.opt
index 50abd1264f5..57145166385 100644
--- a/mysql-test/suite/perfschema/t/start_server_no_table_inst-master.opt
+++ b/mysql-test/suite/perfschema/t/start_server_no_table_inst-master.opt
@@ -1,2 +1,4 @@
--loose-enable-performance-schema
--loose-performance_schema_max_table_instances=0
+--loose-performance_schema_max_index_stat=0
+--loose-performance_schema_max_table_lock_stat=0
diff --git a/mysql-test/suite/perfschema/t/start_server_no_table_inst.test b/mysql-test/suite/perfschema/t/start_server_no_table_inst.test
index bd6ad54325e..ec6674efb37 100644
--- a/mysql-test/suite/perfschema/t/start_server_no_table_inst.test
+++ b/mysql-test/suite/perfschema/t/start_server_no_table_inst.test
@@ -6,10 +6,10 @@
--source ../include/start_server_common.inc
# Expect no instances
-show variables like "performance_schema_max_table_instances";
+show global variables like "performance_schema_max_table_instances";
# Expect handles
-show variables like "performance_schema_max_table_handles";
+show global variables like "performance_schema_max_table_handles";
# Create an instrumented table
--disable_warnings
@@ -22,9 +22,11 @@ select * from test.instrument_me;
drop table test.instrument_me;
# We lost all the instances
+--disable_warnings
select variable_value > 0 from information_schema.global_status
where variable_name like 'PERFORMANCE_SCHEMA_TABLE_INSTANCES_LOST';
+--enable_warnings
# Expect no handle lost
-show status like "performance_schema_table_handles_lost";
+show global status like "performance_schema_table_handles_lost";
diff --git a/mysql-test/suite/perfschema/t/start_server_no_table_lock-master.opt b/mysql-test/suite/perfschema/t/start_server_no_table_lock-master.opt
new file mode 100644
index 00000000000..2fe2a5245c8
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/start_server_no_table_lock-master.opt
@@ -0,0 +1,2 @@
+--loose-enable-performance-schema
+--loose-performance_schema_max_table_lock_stat=0
diff --git a/mysql-test/suite/perfschema/t/start_server_no_table_lock.test b/mysql-test/suite/perfschema/t/start_server_no_table_lock.test
new file mode 100644
index 00000000000..c80639a5799
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/start_server_no_table_lock.test
@@ -0,0 +1,54 @@
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+--source ../include/start_server_common.inc
+
+#############################
+# Setup database and tables.
+#############################
+--disable_warnings
+drop table if exists db1.t1;
+drop database if exists db1;
+--enable_warnings
+create database db1;
+create table db1.t1 (a int, b char(10) default 'default');
+
+#######################
+# Execute few queries.
+#######################
+insert into db1.t1 values('1', 'abc');
+insert into db1.t1 values('2', 'abc');
+select * from db1.t1 where a='1';
+
+#####################################################
+# Run few queries on Performance Schema stats tables.
+#####################################################
+# There should be 3 entries in following table. 2 for insert and 1 for select.
+# This is because lock stats are still in the table handles
+select COUNT_STAR from performance_schema.table_lock_waits_summary_by_table
+ where OBJECT_SCHEMA='db1' and OBJECT_NAME='t1';
+
+# Now force aggregation by closing table handles
+FLUSH TABLES;
+
+select COUNT_STAR from performance_schema.table_lock_waits_summary_by_table
+ where OBJECT_SCHEMA='db1' and OBJECT_NAME='t1';
+
+# Expect TABLE_LOCK_STAT lost
+--disable_warnings
+select variable_value > 0 from information_schema.global_status
+ where variable_name like 'PERFORMANCE_SCHEMA_TABLE_LOCK_STAT_LOST';
+
+# While at it, check that FLUSH STATUS Resets the lost counter
+FLUSH STATUS;
+
+select variable_value from information_schema.global_status
+ where variable_name like 'PERFORMANCE_SCHEMA_TABLE_LOCK_STAT_LOST';
+--enable_warnings
+
+###########
+# Cleanup.
+###########
+drop database db1;
diff --git a/mysql-test/suite/perfschema/t/start_server_no_thread_class.test b/mysql-test/suite/perfschema/t/start_server_no_thread_class.test
index e37faeacf53..7909eb11fed 100644
--- a/mysql-test/suite/perfschema/t/start_server_no_thread_class.test
+++ b/mysql-test/suite/perfschema/t/start_server_no_thread_class.test
@@ -6,18 +6,20 @@
--source ../include/start_server_common.inc
# Expect no classes
-show variables like "performance_schema_max_thread_classes";
+show global variables like "performance_schema_max_thread_classes";
select count(*) from performance_schema.setup_instruments
where name like "thread/%";
# We lost all the classes
+--disable_warnings
select variable_value > 0 from information_schema.global_status
where variable_name like 'PERFORMANCE_SCHEMA_THREAD_CLASSES_LOST';
+--enable_warnings
# Expect no instances
select count(*) from performance_schema.threads;
# Expect no instances lost
-show status like "performance_schema_thread_instances_lost";
+show global status like "performance_schema_thread_instances_lost";
diff --git a/mysql-test/suite/perfschema/t/start_server_no_thread_inst.test b/mysql-test/suite/perfschema/t/start_server_no_thread_inst.test
index c27de1d4027..f1e221cc74e 100644
--- a/mysql-test/suite/perfschema/t/start_server_no_thread_inst.test
+++ b/mysql-test/suite/perfschema/t/start_server_no_thread_inst.test
@@ -6,22 +6,24 @@
--source ../include/start_server_common.inc
# Expect classes
-show variables like "performance_schema_max_thread_classes";
+show global variables like "performance_schema_max_thread_classes";
# Not observable yet
# select count(*) > 0 from performance_schema.setup_instruments
# where name like "thread/%";
# Expect no class lost
-show status like "performance_schema_thread_classes_lost";
+show global status like "performance_schema_thread_classes_lost";
# Expect no instances
-show variables like "performance_schema_max_thread_instances";
+show global variables like "performance_schema_max_thread_instances";
select count(*) from performance_schema.threads;
# Expect instances lost
+--disable_warnings
select variable_value > 0 from information_schema.global_status
where variable_name like 'PERFORMANCE_SCHEMA_THREAD_INSTANCES_LOST';
+--enable_warnings
diff --git a/mysql-test/suite/perfschema/t/start_server_no_transactions_history-master.opt b/mysql-test/suite/perfschema/t/start_server_no_transactions_history-master.opt
new file mode 100644
index 00000000000..76ffd3787bb
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/start_server_no_transactions_history-master.opt
@@ -0,0 +1,2 @@
+--loose-enable-performance-schema
+--loose-performance_schema_events_transactions_history_size=0
diff --git a/mysql-test/suite/perfschema/t/start_server_no_transactions_history.test b/mysql-test/suite/perfschema/t/start_server_no_transactions_history.test
new file mode 100644
index 00000000000..266af484c7b
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/start_server_no_transactions_history.test
@@ -0,0 +1,14 @@
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+--source ../include/start_server_common.inc
+
+# Expect no history
+show global variables like "performance_schema_events_transactions_history_size";
+select count(*) from performance_schema.events_transactions_history;
+
+# Valid operation, edge case
+truncate table performance_schema.events_transactions_history;
+
diff --git a/mysql-test/suite/perfschema/t/start_server_no_transactions_history_long-master.opt b/mysql-test/suite/perfschema/t/start_server_no_transactions_history_long-master.opt
new file mode 100644
index 00000000000..60d148e8079
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/start_server_no_transactions_history_long-master.opt
@@ -0,0 +1,2 @@
+--loose-enable-performance-schema
+--loose-performance_schema_events_transactions_history_long_size=0
diff --git a/mysql-test/suite/perfschema/t/start_server_no_transactions_history_long.test b/mysql-test/suite/perfschema/t/start_server_no_transactions_history_long.test
new file mode 100644
index 00000000000..83f80b528e6
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/start_server_no_transactions_history_long.test
@@ -0,0 +1,14 @@
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+--source ../include/start_server_common.inc
+
+# Expect no history long
+show global variables like "performance_schema_events_transactions_history_long_size";
+select count(*) from performance_schema.events_transactions_history_long;
+
+# Valid operation, edge case
+truncate table performance_schema.events_transactions_history_long;
+
diff --git a/mysql-test/suite/perfschema/t/start_server_no_user.test b/mysql-test/suite/perfschema/t/start_server_no_user.test
index 549b90a5851..2b1b9fed5c7 100644
--- a/mysql-test/suite/perfschema/t/start_server_no_user.test
+++ b/mysql-test/suite/perfschema/t/start_server_no_user.test
@@ -6,11 +6,13 @@
--source ../include/start_server_common.inc
# Expect no records
-show variables like "performance_schema_users_size";
+show global variables like "performance_schema_users_size";
select count(*) from performance_schema.users;
# We lost all the data
+--disable_warnings
select variable_value > 0 from information_schema.global_status
where variable_name like 'PERFORMANCE_SCHEMA_USERS_LOST';
+--enable_warnings
diff --git a/mysql-test/suite/perfschema/t/start_server_no_waits_history.test b/mysql-test/suite/perfschema/t/start_server_no_waits_history.test
index 2ee7dba2526..3eb561770b7 100644
--- a/mysql-test/suite/perfschema/t/start_server_no_waits_history.test
+++ b/mysql-test/suite/perfschema/t/start_server_no_waits_history.test
@@ -6,7 +6,7 @@
--source ../include/start_server_common.inc
# Expect no history
-show variables like "performance_schema_events_waits_history_size";
+show global variables like "performance_schema_events_waits_history_size";
select count(*) from performance_schema.events_waits_history;
# Valid operation, edge case
diff --git a/mysql-test/suite/perfschema/t/start_server_no_waits_history_long.test b/mysql-test/suite/perfschema/t/start_server_no_waits_history_long.test
index e393304a94d..b22b1e7ef05 100644
--- a/mysql-test/suite/perfschema/t/start_server_no_waits_history_long.test
+++ b/mysql-test/suite/perfschema/t/start_server_no_waits_history_long.test
@@ -6,7 +6,7 @@
--source ../include/start_server_common.inc
# Expect no history long
-show variables like "performance_schema_events_waits_history_long_size";
+show global variables like "performance_schema_events_waits_history_long_size";
select count(*) from performance_schema.events_waits_history_long;
# Valid operation, edge case
diff --git a/mysql-test/suite/perfschema/t/start_server_nothing-master.opt b/mysql-test/suite/perfschema/t/start_server_nothing-master.opt
index afd804c1bd0..aa7d019af5d 100644
--- a/mysql-test/suite/perfschema/t/start_server_nothing-master.opt
+++ b/mysql-test/suite/perfschema/t/start_server_nothing-master.opt
@@ -9,6 +9,7 @@
--loose-performance_schema_max_file_classes=0
--loose-performance_schema_max_thread_classes=0
--loose-performance_schema_max_socket_classes=0
+--loose-performance_schema_max_memory_classes=0
--loose-performance_schema_max_mutex_instances=0
--loose-performance_schema_max_rwlock_instances=0
@@ -20,6 +21,8 @@
--loose-performance_schema_max_table_instances=0
--loose-performance_schema_max_file_handles=0
--loose-performance_schema_max_table_handles=0
+--loose-performance_schema_max_index_stat=0
+--loose-performance_schema_max_table_lock_stat=0
--loose-performance_schema_setup_actors_size=0
--loose-performance_schema_setup_objects_size=0
@@ -37,3 +40,8 @@
--loose-performance_schema_session_connect_attrs_size=0
+--loose-performance_schema_digests_size=0
+--loose-performance_schema_max_metadata_locks=0
+
+--loose-performance_schema_max_program_instances=0
+--loose-performance_schema_max_statement_stack=1
diff --git a/mysql-test/suite/perfschema/t/start_server_nothing.test b/mysql-test/suite/perfschema/t/start_server_nothing.test
index c337ef604f6..957a289473b 100644
--- a/mysql-test/suite/perfschema/t/start_server_nothing.test
+++ b/mysql-test/suite/perfschema/t/start_server_nothing.test
@@ -5,10 +5,11 @@
--source ../include/start_server_common.inc
-show variables like "performance_schema%";
+show global variables like "performance_schema%";
# Not empty
-select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_instruments
+ order by name;
select TIMER_NAME from performance_schema.performance_timers;
select * from performance_schema.setup_consumers;
select NAME from performance_schema.setup_timers;
@@ -44,17 +45,18 @@ select * from performance_schema.events_waits_summary_global_by_event_name;
select * from performance_schema.file_instances;
select * from performance_schema.file_summary_by_event_name;
select * from performance_schema.file_summary_by_instance;
-select * from performance_schema.session_account_connect_attrs;
-select * from performance_schema.session_connect_attrs;
-select * from performance_schema.socket_instances;
-select * from performance_schema.socket_summary_by_instance;
-select * from performance_schema.socket_summary_by_event_name;
select * from performance_schema.hosts;
+select * from performance_schema.metadata_locks;
select * from performance_schema.mutex_instances;
select * from performance_schema.objects_summary_global_by_type;
select * from performance_schema.rwlock_instances;
+select * from performance_schema.session_account_connect_attrs;
+select * from performance_schema.session_connect_attrs;
select * from performance_schema.setup_actors;
select * from performance_schema.setup_objects;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.table_handles;
select * from performance_schema.threads;
select * from performance_schema.users;
-
diff --git a/mysql-test/suite/perfschema/t/start_server_off.test b/mysql-test/suite/perfschema/t/start_server_off.test
index 400303e05d2..6fdc02acf9b 100644
--- a/mysql-test/suite/perfschema/t/start_server_off.test
+++ b/mysql-test/suite/perfschema/t/start_server_off.test
@@ -5,6 +5,9 @@
--source ../include/start_server_common.inc
+select * from information_schema.engines
+ where engine = "PERFORMANCE_SCHEMA";
+
# Expecting all off / zero
show status like "performance_schema%";
show variables like "performance_schema";
@@ -27,7 +30,7 @@ select * from performance_schema.setup_timers;
insert into performance_schema.setup_objects values ('TABLE', 'myschema', 'myobject', 'YES', 'YES');
--error ER_WRONG_PERFSCHEMA_USAGE
-insert into performance_schema.setup_actors values ('myhost', 'mysuser', 'myrole');
+insert into performance_schema.setup_actors values ('myhost', 'mysuser', 'myrole', 'YES', 'YES');
# Expect SELECT, UPDATE, DELETE and TRUNCATE to affect 0 rows, but with
# no error because the target row(s) will not be found
@@ -45,3 +48,9 @@ truncate performance_schema.events_statements_history_long;
truncate performance_schema.events_waits_history_long;
truncate performance_schema.setup_objects;
truncate performance_schema.setup_actors;
+
+--disable_warnings
+# Expect that status variables are still accessible
+show global status like "performance_schema%";
+show session status like "performance_schema%";
+--enable_warnings
diff --git a/mysql-test/suite/perfschema/t/start_server_on.test b/mysql-test/suite/perfschema/t/start_server_on.test
index 18789e9d16a..dabef20efe3 100644
--- a/mysql-test/suite/perfschema/t/start_server_on.test
+++ b/mysql-test/suite/perfschema/t/start_server_on.test
@@ -7,4 +7,4 @@
# Expecting nothing lost with default parameters
-show status like "performance_schema%";
+show global status like "performance_schema%";
diff --git a/mysql-test/suite/perfschema/t/start_server_zero_digest_sql_length-master.opt b/mysql-test/suite/perfschema/t/start_server_zero_digest_sql_length-master.opt
new file mode 100644
index 00000000000..5ee2230e539
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/start_server_zero_digest_sql_length-master.opt
@@ -0,0 +1,3 @@
+--thread_stack=655360
+--max_digest_length=0
+--loose-performance_schema_max_sql_text_length=0
diff --git a/mysql-test/suite/perfschema/t/start_server_zero_digest_sql_length.test b/mysql-test/suite/perfschema/t/start_server_zero_digest_sql_length.test
new file mode 100644
index 00000000000..4d5d5ce7859
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/start_server_zero_digest_sql_length.test
@@ -0,0 +1,20 @@
+# -----------------------------------------------------------------------
+# Tests for the performance schema statement Digests.
+# -----------------------------------------------------------------------
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+--source include/no_protocol.inc
+
+USE performance_schema;
+truncate table events_statements_history_long;
+
+# -----------------------------------------------------------------------
+# Test to show how the digest behaves with low value of max_digest_length
+# -----------------------------------------------------------------------
+SELECT 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
+
+--echo ####################################
+--echo # QUERYING PS STATEMENT DIGEST
+--echo ####################################
+SELECT event_name, digest, digest_text, sql_text FROM events_statements_history_long;
diff --git a/mysql-test/suite/perfschema/t/statement_digest.test b/mysql-test/suite/perfschema/t/statement_digest.test
index 59486ad61d8..724f9192955 100644
--- a/mysql-test/suite/perfschema/t/statement_digest.test
+++ b/mysql-test/suite/perfschema/t/statement_digest.test
@@ -5,6 +5,7 @@
--source include/not_embedded.inc
--source include/have_perfschema.inc
+SET sql_mode='NO_ENGINE_SUBSTITUTION';
# Initial Setup for Digest
--source ../include/digest_setup.inc
@@ -21,3 +22,4 @@ SELECT SCHEMA_NAME, DIGEST_TEXT, COUNT_STAR, SUM_ROWS_AFFECTED, SUM_WARNINGS,
# Cleanup for Digest
--source ../include/digest_cleanup.inc
+SET sql_mode=default;
diff --git a/mysql-test/suite/perfschema/t/statement_digest_long_query.test b/mysql-test/suite/perfschema/t/statement_digest_long_query.test
index 7a080f7a29f..efa33800b58 100644
--- a/mysql-test/suite/perfschema/t/statement_digest_long_query.test
+++ b/mysql-test/suite/perfschema/t/statement_digest_long_query.test
@@ -4,18 +4,26 @@
--source include/not_embedded.inc
--source include/have_perfschema.inc
+# Test requires: sp-protocol/ps-protocol/view-protocol/cursor-protocol disabled
--source include/no_protocol.inc
+# Thread stack overrun on solaris
+let $have_solaris = `select convert(@@version_compile_os using latin1) LIKE ("solaris%")`;
+if ($have_solaris)
+{
+ skip Test requires: 'not_solaris';
+}
USE performance_schema;
truncate table events_statements_summary_by_digest;
# -----------------------------------------------------------------------
# Test to show how the digest behaves with long queries, when the token
-# stream is truncated (digest text should end with "...")
+# stream is truncated. digest text is calculated based on value of
+# performance_schema_max_digest_length.
# NOTE: For this test case to run, we need to start mysql server
# with bigger stack using "--thread_stack=#" option.
# -----------------------------------------------------------------------
-SELECT 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
+SELECT 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
--echo ####################################
--echo # QUERYING PS STATEMENT DIGEST
diff --git a/mysql-test/suite/perfschema/t/statement_program_concurrency-master.opt b/mysql-test/suite/perfschema/t/statement_program_concurrency-master.opt
new file mode 100644
index 00000000000..8c0dedeeb17
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/statement_program_concurrency-master.opt
@@ -0,0 +1 @@
+--innodb_lock_wait_timeout=1 --thread_stack=655360
diff --git a/mysql-test/suite/perfschema/t/statement_program_concurrency.test b/mysql-test/suite/perfschema/t/statement_program_concurrency.test
new file mode 100644
index 00000000000..75261254c00
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/statement_program_concurrency.test
@@ -0,0 +1,130 @@
+#----------------------------------------------------------
+# Concurrency check for instrumentation of stored programs
+#----------------------------------------------------------
+
+
+--source include/big_test.inc
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+--source include/no_protocol.inc
+
+TRUNCATE TABLE performance_schema.events_statements_summary_by_program;
+TRUNCATE TABLE performance_schema.events_statements_history;
+
+--echo # concurrency check through multi connections
+
+# Save the initial number of concurrent sessions
+--source include/count_sessions.inc
+
+CREATE DATABASE db1;
+CREATE DATABASE db2;
+CREATE DATABASE db3;
+
+# connection 1
+connect (con1,localhost,root,,db1);
+
+USE db1;
+
+CREATE TABLE t1(
+ i INT NOT NULL
+);
+
+LOAD DATA INFILE '../../std_data/wl5766_data.txt' INTO TABLE t1;
+
+DELIMITER |;
+CREATE PROCEDURE proc()
+BEGIN
+ INSERT INTO t1 SELECT * FROM t1;
+END|
+DELIMITER ;|
+
+--send CALL proc();
+
+# connection 2
+connect (con2,localhost,root,,db2);
+
+USE db2;
+
+CREATE TABLE t2(
+ i INT NOT NULL
+);
+
+LOAD DATA INFILE '../../std_data/wl5766_data.txt' INTO TABLE t2;
+DELIMITER |;
+CREATE FUNCTION addition(x INT, y INT) RETURNS INT
+BEGIN
+ INSERT INTO t2 SELECT * FROM t2;
+ RETURN x+y;
+END|
+DELIMITER ;|
+
+--send SELECT addition(1234,9876);
+
+# connection 3
+connect (con3,localhost,root,,db3);
+
+USE db3;
+
+CREATE TABLE t(
+ i INT NOT NULL,
+ j INT
+);
+
+CREATE TABLE t3(
+ i INT NOT NULL
+);
+
+LOAD DATA INFILE '../../std_data/wl5766_data.txt' INTO TABLE t3;
+INSERT INTO t VALUES ( 10,1000 );
+CREATE TRIGGER trg AFTER INSERT ON t FOR EACH ROW
+ INSERT INTO t3 SELECT * FROM t3;
+
+--send INSERT INTO t VALUES ( 20,2000);
+
+connection con1;
+--reap;
+
+connection con2;
+--reap;
+
+connection con3;
+--reap;
+
+connection default;
+--source include/wait_until_connected_again.inc
+
+SELECT OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME, COUNT_STAR, COUNT_STATEMENTS
+ FROM performance_schema.events_statements_summary_by_program
+ WHERE OBJECT_SCHEMA='db1' OR OBJECT_SCHEMA='db2' OR OBJECT_SCHEMA='db3'
+ ORDER BY OBJECT_SCHEMA, OBJECT_NAME;
+
+SELECT EVENT_NAME, SQL_TEXT, CURRENT_SCHEMA, OBJECT_TYPE, OBJECT_SCHEMA,
+ OBJECT_NAME, NESTING_EVENT_TYPE, NESTING_EVENT_LEVEL FROM
+ performance_schema.events_statements_history WHERE CURRENT_SCHEMA='db1'
+ OR CURRENT_SCHEMA='db2' OR CURRENT_SCHEMA='db3'
+ ORDER BY CURRENT_SCHEMA, OBJECT_NAME;
+
+TRUNCATE TABLE performance_schema.events_statements_summary_by_program;
+TRUNCATE TABLE performance_schema.events_statements_history;
+
+--echo # Clean-up
+
+DROP PROCEDURE db1.proc;
+DROP FUNCTION db2.addition;
+DROP TRIGGER db3.trg;
+
+DROP TABLE db1.t1;
+DROP TABLE db2.t2;
+DROP TABLE db3.t3;
+DROP TABLE db3.t;
+
+DROP DATABASE db1;
+DROP DATABASE db2;
+DROP DATABASE db3;
+
+disconnect con1;
+disconnect con2;
+disconnect con3;
+
+# Wait till all disconnects are completed
+--source include/wait_until_count_sessions.inc
diff --git a/mysql-test/suite/perfschema/t/statement_program_lost_inst-master.opt b/mysql-test/suite/perfschema/t/statement_program_lost_inst-master.opt
new file mode 100644
index 00000000000..699c91930ae
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/statement_program_lost_inst-master.opt
@@ -0,0 +1,3 @@
+--loose-performance_schema_max_program_instances=7
+--loose-performance_schema_max_statement_stack=2
+--thread_stack=655360
diff --git a/mysql-test/suite/perfschema/t/statement_program_lost_inst.test b/mysql-test/suite/perfschema/t/statement_program_lost_inst.test
new file mode 100644
index 00000000000..023180b9d2b
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/statement_program_lost_inst.test
@@ -0,0 +1,72 @@
+#-------------------------------------------------------------
+# Tests for PERFORMANCE_SCHEMA stored programs instrumentation
+#-------------------------------------------------------------
+
+#
+# Test case to show the behaviour of stored program instrumentation
+# when values of the system variables performance_schema_max_program_instances &
+# performance_schema_max_statement_stack are less than the statistics collected.
+# The status of the lost instrumentation is shown through the status variables
+# performance_schema_program_lost & performance_schema_nested_statement_lost
+#
+
+# Restarting the server at the begining of the test.
+# This is to avoid the instrumentation of extra SPs called by MTR
+# These additional stored programs which will be added might cause
+# result content mismatch failure.
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+let $restart_file= $MYSQLTEST_VARDIR/tmp/mysqld.1.expect;
+--exec echo "wait" > $restart_file
+--shutdown_server
+--source include/wait_until_disconnected.inc
+--exec echo "restart:--performance_schema_max_program_instances=7 --performance_schema_max_statement_stack=2 --thread_stack=655360">$restart_file
+--enable_reconnect
+--source include/wait_until_connected_again.inc
+
+--source ../include/start_server_common.inc
+
+# Values of variables server variables
+show global variables like "performance_schema_max_program_instances";
+show global variables like "performance_schema_max_statement_stack";
+
+--echo #####################
+--echo # Setup
+--echo #####################
+--source suite/perfschema/include/program_nested_setup.inc
+
+# Truncate summary table
+TRUNCATE performance_schema.events_statements_summary_by_program;
+SELECT OBJECT_TYPE, OBJECT_NAME, OBJECT_SCHEMA FROM
+performance_schema.events_statements_summary_by_program
+WHERE OBJECT_SCHEMA='nested_sp' ORDER BY OBJECT_NAME;
+# Flush status now
+Flush status;
+show global status like "%performance_schema_program_lost%";
+show global status like "%performance_schema_nested_statement_lost%";
+
+--echo #####################
+--echo # Executing Queries
+--echo #####################
+--source suite/perfschema/include/program_nested_execution.inc
+
+--echo ###########################################
+--echo # Quering PS statement summary table #
+--echo ###########################################
+
+SELECT OBJECT_TYPE, OBJECT_NAME, OBJECT_SCHEMA
+ FROM performance_schema.events_statements_summary_by_program
+ WHERE OBJECT_SCHEMA='nested_sp' ORDER BY OBJECT_NAME;
+
+# Now check the lost status
+show global status like "%performance_schema_program_lost%";
+show global status like "%performance_schema_nested_statement_lost%";
+
+--echo #####################
+--echo # Cleanup
+--echo #####################
+--source suite/perfschema/include/program_nested_cleanup.inc
+
+
diff --git a/mysql-test/suite/perfschema/t/statement_program_nested-master.opt b/mysql-test/suite/perfschema/t/statement_program_nested-master.opt
new file mode 100644
index 00000000000..3f9d7900961
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/statement_program_nested-master.opt
@@ -0,0 +1 @@
+--thread_stack=655360
diff --git a/mysql-test/suite/perfschema/t/statement_program_nested.test b/mysql-test/suite/perfschema/t/statement_program_nested.test
new file mode 100644
index 00000000000..e6649704bbf
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/statement_program_nested.test
@@ -0,0 +1,73 @@
+# -----------------------------------------------------------------------
+# Tests for the performance schema nested stored program instrumentation.
+# -----------------------------------------------------------------------
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+TRUNCATE TABLE performance_schema.events_statements_summary_by_program;
+TRUNCATE TABLE performance_schema.events_statements_history_long;
+
+--echo #################################################
+--echo # Quering PS statement summary and history_long #
+--echo #################################################
+
+--source suite/perfschema/include/program_nested_setup.inc
+--source suite/perfschema/include/program_nested_execution.inc
+
+SELECT EVENT_NAME, SQL_TEXT, CURRENT_SCHEMA, OBJECT_TYPE, OBJECT_SCHEMA,
+ OBJECT_NAME, NESTING_EVENT_TYPE, NESTING_EVENT_LEVEL
+ FROM performance_schema.events_statements_history_long WHERE
+ CURRENT_SCHEMA='nested_sp' ORDER BY
+ OBJECT_NAME,NESTING_EVENT_LEVEL,SQL_TEXT,EVENT_NAME;
+
+SELECT OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME, COUNT_STAR, COUNT_STATEMENTS
+ FROM performance_schema.events_statements_summary_by_program
+ WHERE OBJECT_SCHEMA='nested_sp' ORDER BY OBJECT_NAME;
+
+--echo # clean-up
+TRUNCATE TABLE performance_schema.events_statements_summary_by_program;
+TRUNCATE TABLE performance_schema.events_statements_history_long;
+
+# After truncate the statictics collected will are reset
+SELECT OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME, COUNT_STAR, COUNT_STATEMENTS
+ FROM performance_schema.events_statements_summary_by_program
+ WHERE OBJECT_SCHEMA='nested_sp' ORDER BY OBJECT_NAME;
+
+--source suite/perfschema/include/program_nested_cleanup.inc
+
+# After clean-up the stored programs are removed from PS tables
+SELECT OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME, COUNT_STAR, COUNT_STATEMENTS
+ FROM performance_schema.events_statements_summary_by_program
+ WHERE OBJECT_SCHEMA='nested_sp' ORDER BY OBJECT_NAME;
+
+
+# Check the intrumentation of stored programs
+# when statement/sp/% instruments not timed
+
+--source suite/perfschema/include/program_nested_setup.inc
+
+update performance_schema.setup_instruments set enabled='YES', timed='NO'
+ where name like "statement/sp/%" order by name;
+
+TRUNCATE TABLE performance_schema.events_statements_summary_by_program;
+TRUNCATE TABLE performance_schema.events_statements_history_long;
+
+--source suite/perfschema/include/program_nested_execution.inc
+
+# check instrumentation
+
+SELECT EVENT_NAME, TIMER_START, TIMER_END, TIMER_WAIT FROM
+ performance_schema.events_statements_history_long WHERE
+ CURRENT_SCHEMA='nested_sp' AND EVENT_NAME like "statement/sp/%";
+
+# clean-up
+
+# Restore the setup
+update performance_schema.setup_instruments set enabled='YES', timed='YES'
+ where name like "statement/sp/%" order by name;
+
+TRUNCATE TABLE performance_schema.events_statements_summary_by_program;
+TRUNCATE TABLE performance_schema.events_statements_history_long;
+
+--source suite/perfschema/include/program_nested_cleanup.inc
diff --git a/mysql-test/suite/perfschema/t/statement_program_nesting_event_check-master.opt b/mysql-test/suite/perfschema/t/statement_program_nesting_event_check-master.opt
new file mode 100644
index 00000000000..3f9d7900961
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/statement_program_nesting_event_check-master.opt
@@ -0,0 +1 @@
+--thread_stack=655360
diff --git a/mysql-test/suite/perfschema/t/statement_program_nesting_event_check.test b/mysql-test/suite/perfschema/t/statement_program_nesting_event_check.test
new file mode 100644
index 00000000000..20c59e9a3a8
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/statement_program_nesting_event_check.test
@@ -0,0 +1,44 @@
+#-------------------------------------------------------------
+# Tests for PERFORMANCE_SCHEMA stored programs instrumentation
+#-------------------------------------------------------------
+
+# Test to check the values populated in NESTING_EVENT_TYPE
+# columns of events_statements_current/history/history_long PS tables.
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+TRUNCATE TABLE performance_schema.events_statements_history_long;
+
+--echo #----------------------------
+--echo # Non-nested Stored programs.
+--echo #----------------------------
+--source suite/perfschema/include/program_setup.inc
+--source suite/perfschema/include/program_execution.inc
+
+SELECT EVENT_NAME, SQL_TEXT, OBJECT_NAME, NESTING_EVENT_TYPE, NESTING_EVENT_LEVEL
+ FROM performance_schema.events_statements_history_long
+ WHERE CURRENT_SCHEMA='stored_programs' AND
+ (SQL_TEXT not like '%count(*) = %' OR SQL_TEXT IS NULL)
+ ORDER BY OBJECT_NAME,NESTING_EVENT_LEVEL,SQL_TEXT;
+
+TRUNCATE TABLE performance_schema.events_statements_history_long;
+
+# Clean-up
+--source suite/perfschema/include/program_cleanup.inc
+
+--echo #------------------------
+--echo # Nested stored programs.
+--echo #------------------------
+--source suite/perfschema/include/program_nested_setup.inc
+--source suite/perfschema/include/program_nested_execution.inc
+
+SELECT EVENT_NAME, SQL_TEXT, OBJECT_NAME, NESTING_EVENT_TYPE, NESTING_EVENT_LEVEL
+ FROM performance_schema.events_statements_history_long
+ WHERE CURRENT_SCHEMA='nested_sp'
+ ORDER BY OBJECT_NAME, NESTING_EVENT_LEVEL, SQL_TEXT, EVENT_NAME;
+
+TRUNCATE TABLE performance_schema.events_statements_history_long;
+
+# Clean-up
+--source suite/perfschema/include/program_nested_cleanup.inc
diff --git a/mysql-test/suite/perfschema/t/statement_program_non_nested-master.opt b/mysql-test/suite/perfschema/t/statement_program_non_nested-master.opt
new file mode 100644
index 00000000000..3f9d7900961
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/statement_program_non_nested-master.opt
@@ -0,0 +1 @@
+--thread_stack=655360
diff --git a/mysql-test/suite/perfschema/t/statement_program_non_nested.test b/mysql-test/suite/perfschema/t/statement_program_non_nested.test
new file mode 100644
index 00000000000..559bd03950e
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/statement_program_non_nested.test
@@ -0,0 +1,144 @@
+# -----------------------------------------------------------------------
+# Tests for the performance schema stored program instrumentation.
+# -----------------------------------------------------------------------
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+TRUNCATE TABLE performance_schema.events_statements_summary_by_program;
+TRUNCATE TABLE performance_schema.events_statements_history_long;
+
+--echo ################################################
+--echo # Quering PS statement summary and history_long#
+--echo ################################################
+
+--source suite/perfschema/include/program_setup.inc
+--source suite/perfschema/include/program_execution.inc
+
+SELECT OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME, COUNT_STAR, COUNT_STATEMENTS
+ FROM performance_schema.events_statements_summary_by_program
+ WHERE OBJECT_SCHEMA='stored_programs' ORDER BY OBJECT_NAME;
+
+SELECT EVENT_NAME, SQL_TEXT, CURRENT_SCHEMA, OBJECT_TYPE, OBJECT_SCHEMA,
+ OBJECT_NAME, NESTING_EVENT_TYPE, NESTING_EVENT_LEVEL FROM
+ performance_schema.events_statements_history_long WHERE
+ CURRENT_SCHEMA='stored_programs' AND
+ (SQL_TEXT not like '%count(*) = %' OR SQL_TEXT IS NULL)
+ ORDER BY OBJECT_NAME, NESTING_EVENT_LEVEL, SQL_TEXT;
+
+
+--echo # clean -up
+
+TRUNCATE TABLE performance_schema.events_statements_summary_by_program;
+TRUNCATE TABLE performance_schema.events_statements_history_long;
+
+# After truncate the statictics collected will are reset
+SELECT OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME, COUNT_STAR, COUNT_STATEMENTS
+ FROM performance_schema.events_statements_summary_by_program
+ WHERE OBJECT_SCHEMA='stored_programs' ORDER BY OBJECT_NAME;
+
+--source suite/perfschema/include/program_cleanup.inc
+
+# After clean-up the stored programs are removed from PS tables
+
+SELECT OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME, COUNT_STAR, COUNT_STATEMENTS
+ FROM performance_schema.events_statements_summary_by_program
+ WHERE OBJECT_SCHEMA='stored_programs' ORDER BY OBJECT_NAME;
+
+# Check the intrumentation of stored programs
+# when statement/sp/% instruments not timed
+
+--source suite/perfschema/include/program_setup.inc
+
+update performance_schema.setup_instruments set enabled='YES', timed='NO'
+ where name like "statement/sp/%" order by name;
+
+TRUNCATE TABLE performance_schema.events_statements_summary_by_program;
+TRUNCATE TABLE performance_schema.events_statements_history_long;
+
+--source suite/perfschema/include/program_execution.inc
+
+# check instrumentation
+
+SELECT EVENT_NAME, TIMER_START, TIMER_END, TIMER_WAIT FROM
+ performance_schema.events_statements_history_long WHERE
+ CURRENT_SCHEMA='stored_programs' AND EVENT_NAME like "statement/sp/%";
+
+# clean-up
+
+# Restore the setup
+update performance_schema.setup_instruments set enabled='YES', timed='YES'
+ where name like "statement/sp/%" order by name;
+
+TRUNCATE TABLE performance_schema.events_statements_summary_by_program;
+TRUNCATE TABLE performance_schema.events_statements_history_long;
+
+--source suite/perfschema/include/program_cleanup.inc
+
+#----------------------------------------------------------------
+# The statistics of a stored program are not collected
+# if its execution fails
+#----------------------------------------------------------------
+
+--echo # set-up
+CREATE DATABASE sp;
+USE sp;
+
+CREATE TABLE t1(
+ a INT,
+ b INT
+);
+
+--echo # let the creation of the following stored programs fail
+--error 1064
+CREATE PROCEDURE fail1(IN a INT OUT x CHAR(16))
+ SET a=1;
+
+--error 1064
+CREATE FUNCTION fail2(a INT , b INT) RETURNS INT
+ x=SELECT COUNT(*) FROM t;
+
+--error 1064
+CREATE EVENT fail3 SCHEDULE EVERY MICROSECOND DO
+ DROP TABLE t;
+
+--echo # the below query on PS table doesn't show any rows
+--echo # as the creation of stored programs failed
+SELECT OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME, COUNT_STAR, COUNT_STATEMENTS
+ FROM performance_schema.events_statements_summary_by_program
+ WHERE OBJECT_SCHEMA='sp';
+
+--echo # create few stored programs
+DELIMITER |;
+CREATE PROCEDURE p(x1 INT, x2 INT)
+BEGIN
+ INSERT INTO t1 VALUES (x1, x2);
+END|
+DELIMITER ;|
+
+CREATE FUNCTION f(y1 INT, y2 INT) RETURNS INT
+ RETURN y1+y2;
+
+CREATE TRIGGER trg AFTER INSERT ON t1 FOR EACH ROW
+ SET @neg=-1;
+
+--echo # execute the created stored programs such that they fail.
+--error 1318
+CALL p(7);
+--error 1318
+SELECT f("add",1,3);
+--error 1064
+INSERT INTO t1;
+
+--echo # the below query on PS table doesn't expose any statistics as
+--echo # execution of the created stored porgrams failed.
+SELECT OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME, COUNT_STAR, COUNT_STATEMENTS
+ FROM performance_schema.events_statements_summary_by_program
+ WHERE OBJECT_SCHEMA='sp';
+
+--echo #clean-up
+DROP PROCEDURE p;
+DROP FUNCTION f;
+DROP TRIGGER trg;
+DROP TABLE t1;
+DROP DATABASE sp;
diff --git a/mysql-test/suite/perfschema/t/status_reprepare.test b/mysql-test/suite/perfschema/t/status_reprepare.test
new file mode 100644
index 00000000000..6393655bfa3
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/status_reprepare.test
@@ -0,0 +1,61 @@
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/no_protocol.inc
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+--echo #
+--echo # ================================================================================
+--echo # SETUP
+--echo # ================================================================================
+
+# Create a new connection, to get clean statistics
+connect(con1, localhost, root,,);
+
+# Create a table
+CREATE TABLE test.t1 (c1 INT);
+
+#prepare a statement
+PREPARE stmt1 FROM "SELECT c1 FROM test.t1";
+
+#execute prepared statement;
+EXECUTE stmt1;
+
+# Check status from SHOW STATUS
+SHOW SESSION STATUS LIKE "%com_stmt_%prepare%";
+
+#check the statistics
+SELECT * FROM performance_schema.session_status WHERE VARIABLE_NAME LIKE "%com_stmt%";
+
+SELECT VARIABLE_VALUE INTO @count_global_reprepare_before
+ FROM performance_schema.global_status
+ WHERE VARIABLE_NAME LIKE "Com_stmt_reprepare";
+
+# Alter table to make server reprepare the statement
+ALTER TABLE test.t1 ADD COLUMN c2 INTEGER;
+
+#execute prepared statement;
+EXECUTE stmt1;
+
+# Check status from SHOW STATUS
+SHOW SESSION STATUS LIKE "%com_stmt_%prepare%";
+
+#check the statistics
+SELECT * FROM performance_schema.session_status WHERE VARIABLE_NAME LIKE "%com_stmt%";
+
+SELECT VARIABLE_VALUE INTO @count_global_reprepare_after
+ FROM performance_schema.global_status
+ WHERE VARIABLE_NAME LIKE "Com_stmt_reprepare";
+
+# Should increment by 1
+SELECT @count_global_reprepare_after - @count_global_reprepare_before;
+
+--echo #
+--echo # ================================================================================
+--echo # CLEANUP
+--echo # ================================================================================
+
+DROP TABLE test.t1;
+
+--disconnect con1
+--connection default
diff --git a/mysql-test/suite/perfschema/t/sxlock_func.test b/mysql-test/suite/perfschema/t/sxlock_func.test
new file mode 100644
index 00000000000..f5f38f51c78
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/sxlock_func.test
@@ -0,0 +1,75 @@
+# Performance schema tests, for SX-lock
+# Note that only Innodb provides instrumented SX-locks,
+# so this test depends largely on the innodb instrumentation.
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+--source include/have_innodb.inc
+
+UPDATE performance_schema.setup_instruments SET enabled = 'NO', timed = 'YES';
+
+UPDATE performance_schema.setup_instruments SET enabled = 'YES'
+WHERE name like 'wait/synch/sxlock/%';
+
+TRUNCATE TABLE performance_schema.events_waits_history_long;
+TRUNCATE TABLE performance_schema.events_waits_history;
+TRUNCATE TABLE performance_schema.events_waits_current;
+
+# Check some SX-locks classes are instrumented
+select name from performance_schema.setup_instruments
+where name like "wait/synch/sxlock/%" order by name;
+
+# Check some SX-locks instances are instrumented
+select name from performance_schema.rwlock_instances
+ where name in
+ (
+ 'wait/synch/sxlock/innodb/btr_search_latch',
+ 'wait/synch/sxlock/innodb/checkpoint_lock',
+ 'wait/synch/sxlock/innodb/dict_operation_lock',
+ 'wait/synch/sxlock/innodb/trx_i_s_cache_lock',
+ 'wait/synch/sxlock/innodb/trx_purge_latch'
+ )
+ order by name;
+
+# Some Innodb payload, to produce data
+
+--disable_warnings
+drop table if exists t1;
+--enable_warnings
+
+create table t1(a int) engine=innodb;
+begin;
+insert into t1 values (1), (2), (3);
+insert into t1 values (1), (2), (3);
+insert into t1 values (1), (2), (3);
+commit;
+drop table t1;
+
+# Make sure some shared_lock operations have been executed
+
+select operation from performance_schema.events_waits_history_long
+ where event_name like "wait/synch/sxlock/%"
+ and operation = "shared_lock" limit 1;
+
+# Make sure some exclusive_lock operations have been executed
+
+select operation from performance_schema.events_waits_history_long
+ where event_name like "wait/synch/sxlock/%"
+ and operation = "exclusive_lock" limit 1;
+
+# The following operations are not verified in this test:
+# - shared_exclusive_lock
+# - try_shared_lock
+# - try_shared_exclusive_lock
+# - try_exclusive_lock
+# because to observe them:
+# - there must be an actual code path using the operation
+# (this affects try operations, which are not all used)
+# - there must be a repeatable scenario to trigger the
+# code path, to use as payload in the test script
+
+# Cleanup
+
+
+UPDATE performance_schema.setup_instruments SET enabled = 'YES', timed = 'YES';
+
diff --git a/mysql-test/suite/perfschema/t/table_lock_aggregate_global_2u_2t.test b/mysql-test/suite/perfschema/t/table_lock_aggregate_global_2u_2t.test
index c64838b206b..9205e2b9232 100644
--- a/mysql-test/suite/perfschema/t/table_lock_aggregate_global_2u_2t.test
+++ b/mysql-test/suite/perfschema/t/table_lock_aggregate_global_2u_2t.test
@@ -1,5 +1,8 @@
# Tests for the performance schema
+# Use MyISAM as InnoDB SE no longer uses THR_LOCK locks.
+#--source include/force_myisam_default.inc
+
--source ../include/table_aggregate_setup.inc
# table lock
diff --git a/mysql-test/suite/perfschema/t/table_lock_aggregate_global_2u_3t.test b/mysql-test/suite/perfschema/t/table_lock_aggregate_global_2u_3t.test
index 7a0676c6006..60db987b9df 100644
--- a/mysql-test/suite/perfschema/t/table_lock_aggregate_global_2u_3t.test
+++ b/mysql-test/suite/perfschema/t/table_lock_aggregate_global_2u_3t.test
@@ -1,5 +1,8 @@
# Tests for the performance schema
+# Use MyISAM as InnoDB SE no longer uses THR_LOCK locks.
+#--source include/force_myisam_default.inc
+
--source ../include/table_aggregate_setup.inc
# table lock
diff --git a/mysql-test/suite/perfschema/t/table_lock_aggregate_global_4u_2t.test b/mysql-test/suite/perfschema/t/table_lock_aggregate_global_4u_2t.test
index fb9f896eeca..1bac2d52014 100644
--- a/mysql-test/suite/perfschema/t/table_lock_aggregate_global_4u_2t.test
+++ b/mysql-test/suite/perfschema/t/table_lock_aggregate_global_4u_2t.test
@@ -1,5 +1,8 @@
# Tests for the performance schema
+# Use MyISAM as InnoDB SE no longer uses THR_LOCK locks.
+#--source include/force_myisam_default.inc
+
--source ../include/table_aggregate_setup.inc
# table lock
diff --git a/mysql-test/suite/perfschema/t/table_lock_aggregate_global_4u_3t.test b/mysql-test/suite/perfschema/t/table_lock_aggregate_global_4u_3t.test
index eb9b7b4faa8..4909defee60 100644
--- a/mysql-test/suite/perfschema/t/table_lock_aggregate_global_4u_3t.test
+++ b/mysql-test/suite/perfschema/t/table_lock_aggregate_global_4u_3t.test
@@ -1,5 +1,8 @@
# Tests for the performance schema
+# Use MyISAM as InnoDB SE no longer uses THR_LOCK locks.
+#--source include/force_myisam_default.inc
+
--source ../include/table_aggregate_setup.inc
# table lock
diff --git a/mysql-test/suite/perfschema/t/table_lock_aggregate_hist_2u_2t.test b/mysql-test/suite/perfschema/t/table_lock_aggregate_hist_2u_2t.test
index 5d1f36228e8..7721599ba5d 100644
--- a/mysql-test/suite/perfschema/t/table_lock_aggregate_hist_2u_2t.test
+++ b/mysql-test/suite/perfschema/t/table_lock_aggregate_hist_2u_2t.test
@@ -1,5 +1,8 @@
# Tests for the performance schema
+# Use MyISAM as InnoDB SE no longer uses THR_LOCK locks.
+#--source include/force_myisam_default.inc
+
--source ../include/table_aggregate_setup.inc
# table lock
diff --git a/mysql-test/suite/perfschema/t/table_lock_aggregate_hist_2u_3t.test b/mysql-test/suite/perfschema/t/table_lock_aggregate_hist_2u_3t.test
index b1e4043f12f..ef1e196a151 100644
--- a/mysql-test/suite/perfschema/t/table_lock_aggregate_hist_2u_3t.test
+++ b/mysql-test/suite/perfschema/t/table_lock_aggregate_hist_2u_3t.test
@@ -1,5 +1,8 @@
# Tests for the performance schema
+# Use MyISAM as InnoDB SE no longer uses THR_LOCK locks.
+#--source include/force_myisam_default.inc
+
--source ../include/table_aggregate_setup.inc
# hist by default
diff --git a/mysql-test/suite/perfschema/t/table_lock_aggregate_hist_4u_2t.test b/mysql-test/suite/perfschema/t/table_lock_aggregate_hist_4u_2t.test
index 53992612fc2..ad34cd9f44f 100644
--- a/mysql-test/suite/perfschema/t/table_lock_aggregate_hist_4u_2t.test
+++ b/mysql-test/suite/perfschema/t/table_lock_aggregate_hist_4u_2t.test
@@ -1,5 +1,8 @@
# Tests for the performance schema
+# Use MyISAM as InnoDB SE no longer uses THR_LOCK locks.
+#--source include/force_myisam_default.inc
+
--source ../include/table_aggregate_setup.inc
# table lock
diff --git a/mysql-test/suite/perfschema/t/table_lock_aggregate_hist_4u_3t.test b/mysql-test/suite/perfschema/t/table_lock_aggregate_hist_4u_3t.test
index 05306d74d8b..078a6d9e245 100644
--- a/mysql-test/suite/perfschema/t/table_lock_aggregate_hist_4u_3t.test
+++ b/mysql-test/suite/perfschema/t/table_lock_aggregate_hist_4u_3t.test
@@ -1,5 +1,8 @@
# Tests for the performance schema
+# Use MyISAM as InnoDB SE no longer uses THR_LOCK locks.
+#--source include/force_myisam_default.inc
+
--source ../include/table_aggregate_setup.inc
# table lock
diff --git a/mysql-test/suite/perfschema/t/table_lock_aggregate_thread_2u_2t.test b/mysql-test/suite/perfschema/t/table_lock_aggregate_thread_2u_2t.test
index 4376b49eb3c..a155619e9aa 100644
--- a/mysql-test/suite/perfschema/t/table_lock_aggregate_thread_2u_2t.test
+++ b/mysql-test/suite/perfschema/t/table_lock_aggregate_thread_2u_2t.test
@@ -1,5 +1,8 @@
# Tests for the performance schema
+# Use MyISAM as InnoDB SE no longer uses THR_LOCK locks.
+#--source include/force_myisam_default.inc
+
--source ../include/table_aggregate_setup.inc
# table lock
diff --git a/mysql-test/suite/perfschema/t/table_lock_aggregate_thread_2u_3t.test b/mysql-test/suite/perfschema/t/table_lock_aggregate_thread_2u_3t.test
index d1412b148da..c48d39f5eb7 100644
--- a/mysql-test/suite/perfschema/t/table_lock_aggregate_thread_2u_3t.test
+++ b/mysql-test/suite/perfschema/t/table_lock_aggregate_thread_2u_3t.test
@@ -1,5 +1,8 @@
# Tests for the performance schema
+# Use MyISAM as InnoDB SE no longer uses THR_LOCK locks.
+#--source include/force_myisam_default.inc
+
--source ../include/table_aggregate_setup.inc
# table lock
diff --git a/mysql-test/suite/perfschema/t/table_lock_aggregate_thread_4u_2t.test b/mysql-test/suite/perfschema/t/table_lock_aggregate_thread_4u_2t.test
index 46ab5ce3b01..ff69d164f64 100644
--- a/mysql-test/suite/perfschema/t/table_lock_aggregate_thread_4u_2t.test
+++ b/mysql-test/suite/perfschema/t/table_lock_aggregate_thread_4u_2t.test
@@ -1,5 +1,8 @@
# Tests for the performance schema
+# Use MyISAM as InnoDB SE no longer uses THR_LOCK locks.
+#--source include/force_myisam_default.inc
+
--source ../include/table_aggregate_setup.inc
# table lock
diff --git a/mysql-test/suite/perfschema/t/table_lock_aggregate_thread_4u_3t.test b/mysql-test/suite/perfschema/t/table_lock_aggregate_thread_4u_3t.test
index 9ee66735961..3ee77d05700 100644
--- a/mysql-test/suite/perfschema/t/table_lock_aggregate_thread_4u_3t.test
+++ b/mysql-test/suite/perfschema/t/table_lock_aggregate_thread_4u_3t.test
@@ -1,5 +1,8 @@
# Tests for the performance schema
+# Use MyISAM as InnoDB SE no longer uses THR_LOCK locks.
+#--source include/force_myisam_default.inc
+
--source ../include/table_aggregate_setup.inc
# table lock
diff --git a/mysql-test/suite/perfschema/t/table_name.test b/mysql-test/suite/perfschema/t/table_name.test
index 5fb8ccd0f7f..aca713c3987 100644
--- a/mysql-test/suite/perfschema/t/table_name.test
+++ b/mysql-test/suite/perfschema/t/table_name.test
@@ -17,7 +17,7 @@
--source include/have_innodb.inc
--source include/not_embedded.inc
---echo
+--echo #
--echo #
--echo # TEST 1: Normal tables prefixed with "#sql" and "sql".
--echo #
@@ -25,120 +25,129 @@ USE test;
CREATE TABLE `#sql_1` (a int, b text);
# INSERT forces path through get_table_share()
INSERT INTO `#sql_1` VALUES(1,'one');
---echo
+--echo #
CREATE TABLE `sql_1` (a int, b text);
INSERT INTO `sql_1` VALUES(1,'one');
---echo
+--echo #
--echo # Verify that the tables are treated as normal tables .
---echo
+--echo #
--sorted_result
SELECT object_type, object_schema, object_name
FROM performance_schema.objects_summary_global_by_type
-WHERE object_schema="test";
---echo
+WHERE object_schema="test"
+ORDER BY object_name;
+--echo #
--echo # Drop the tables, verify that the table objects are removed.
---echo
+--echo #
DROP TABLE `#sql_1`;
DROP TABLE `sql_1`;
---echo
+--echo #
SELECT object_type, object_schema, object_name
FROM performance_schema.objects_summary_global_by_type
-WHERE object_schema="test";
+WHERE object_schema="test"
+ORDER BY object_name;
---echo
+--echo #
--echo #
--echo # TEST 2: Temporary tables, no special prefix.
--echo #
CREATE TEMPORARY TABLE sql_temp2_myisam (a int, b text) ENGINE=MYISAM;
INSERT INTO sql_temp2_myisam VALUES(1,'one');
---echo
+--echo #
CREATE TEMPORARY TABLE sql_temp2_innodb (a int, b text) ENGINE=INNODB;
INSERT INTO sql_temp2_innodb VALUES(1,'one');
---echo
+--echo #
--echo # Confirm that the temporary tables are ignored.
---echo
+--echo #
SELECT object_type, object_schema, object_name
FROM performance_schema.objects_summary_global_by_type
-WHERE object_schema="test";
---echo
+WHERE object_schema="test"
+ORDER BY object_name;
+--echo #
--echo # Drop the tables, verify that the table objects are not created.
---echo
+--echo #
DROP TABLE sql_temp2_myisam;
DROP TABLE sql_temp2_innodb;
---echo
+--echo #
SELECT object_type, object_schema, object_name
FROM performance_schema.objects_summary_global_by_type
-WHERE object_schema="test";
+WHERE object_schema="test"
+ORDER BY object_name;
---echo
+--echo #
--echo #
--echo # TEST 3: Temporary tables with the "#sql" prefix.
--echo #
CREATE TEMPORARY TABLE `#sql_temp3_myisam` (a int, b text) ENGINE=MYISAM;
CHECK TABLE `#sql_temp3_myisam`;
INSERT INTO `#sql_temp3_myisam` VALUES(1,'one');
---echo
+--echo #
CREATE TEMPORARY TABLE `#sql_temp3_innodb` (a int, b text) ENGINE=INNODB;
CHECK TABLE `#sql_temp3_innodb`;
INSERT INTO `#sql_temp3_innodb` VALUES(1,'one');
---echo
+--echo #
--echo # Confirm that the temporary tables are ignored.
---echo
+--echo #
SELECT object_type, object_schema, object_name
FROM performance_schema.objects_summary_global_by_type
-WHERE object_schema="test";
---echo
+WHERE object_schema="test"
+ORDER BY object_name;
+--echo #
--echo # Drop the temporary tables.
---echo
+--echo #
DROP TABLE `#sql_temp3_myisam`;
DROP TABLE `#sql_temp3_innodb`;
---echo
+--echo #
--echo # Confirm that the temporary tables are still ignored.
---echo
+--echo #
SELECT object_type, object_schema, object_name
FROM performance_schema.objects_summary_global_by_type
-WHERE object_schema="test";
+WHERE object_schema="test"
+ORDER BY object_name;
---echo
+--echo #
--echo #
--echo # TEST 4: Special case: MyISAM temporary tables are recreated as non-temporary
--echo # when they are truncated.
--echo #
CREATE TEMPORARY TABLE `sql_temp4_myisam` (a int, b text) ENGINE=MYISAM;
INSERT INTO `sql_temp4_myisam` VALUES(1,'one');
---echo
+--echo #
CREATE TEMPORARY TABLE `#sql_temp4_myisam` (a int, b text) ENGINE=MYISAM;
INSERT INTO `#sql_temp4_myisam` VALUES(1,'one');
---echo
+--echo #
--echo # Confirm that the MyISAM temporary tables are ignored.
---echo
+--echo #
SELECT object_type, object_schema, object_name
FROM performance_schema.objects_summary_global_by_type
-WHERE object_schema="test";
---echo
+WHERE object_schema="test"
+ORDER BY object_name;
+--echo #
--echo # Truncate the MyISAM temporary tables, forcing them to be recreated as non-temporary.
---echo
+--echo #
TRUNCATE TABLE `sql_temp4_myisam`;
TRUNCATE TABLE `#sql_temp4_myisam`;
---echo
+--echo #
--echo # Confirm that the recreated MyISAM tables are still regarded as temporary and ignored.
---echo
+--echo #
SELECT object_type, object_schema, object_name
FROM performance_schema.objects_summary_global_by_type
-WHERE object_schema="test";
---echo
+WHERE object_schema="test"
+ORDER BY object_name;
+--echo #
--echo # Drop the recreated MyISAM tables;
---echo
+--echo #
DROP TABLE `sql_temp4_myisam`;
DROP TABLE `#sql_temp4_myisam`;
---echo
+--echo #
--echo # Confirm that the recreated temporary tables are still ignored.
---echo
+--echo #
SELECT object_type, object_schema, object_name
FROM performance_schema.objects_summary_global_by_type
-WHERE object_schema="test";
+WHERE object_schema="test"
+ORDER BY object_name;
---echo
+--echo #
--echo #
--echo # TEST 5: Generate temporary tables with ALTER MyISAM table.
--echo #
@@ -147,20 +156,22 @@ CREATE TABLE t1 (a int) ENGINE=MYISAM;
INSERT INTO t1 VALUES (1), (2), (3);
# Force a path throug mysql_alter_table() and ha_create_table().
ALTER TABLE t1 ADD COLUMN (b int);
---echo
+--echo #
--echo # Confirm that the recreated temporary tables are still ignored.
---echo
+--echo #
SELECT object_type, object_schema, object_name
FROM performance_schema.objects_summary_global_by_type
-WHERE object_schema="test";
---echo
+WHERE object_schema="test"
+ORDER BY object_name;
+--echo #
--echo # Drop the MyISAM table
---echo
+--echo #
DROP TABLE t1;
---echo
+--echo #
--echo # Confirm that no tables remain;
---echo
+--echo #
SELECT object_type, object_schema, object_name
FROM performance_schema.objects_summary_global_by_type
-WHERE object_schema="test";
+WHERE object_schema="test"
+ORDER BY object_name;
diff --git a/mysql-test/suite/perfschema/t/table_schema.test b/mysql-test/suite/perfschema/t/table_schema.test
index d141420b209..935bd667f2d 100644
--- a/mysql-test/suite/perfschema/t/table_schema.test
+++ b/mysql-test/suite/perfschema/t/table_schema.test
@@ -16,9 +16,9 @@ select * from information_schema.columns where table_schema="performance_schema"
# Count the number of NUMBER_OF_BYTES columns.
-select count(*) from information_schema.columns
+select count(*) into @count_byte_columns from information_schema.columns
where table_schema="performance_schema" and data_type = "bigint"
- and column_name like "%number_of_bytes" into @count_byte_columns;
+ and column_name like "%number_of_bytes";
# Confirm that at least one column was found.
@@ -26,10 +26,10 @@ select @count_byte_columns > 0;
# Confirm that all NUMBER_OF_BYTES columns are BIGINT signed.
-select count(*) from information_schema.columns
+select count(*) into @count_byte_signed from information_schema.columns
where table_schema="performance_schema" and data_type="bigint"
and column_name like "%number_of_bytes"
- and column_type not like "%unsigned" into @count_byte_signed;
+ and column_type not like "%unsigned";
select (@count_byte_columns - @count_byte_signed) = 0;
@@ -38,9 +38,9 @@ select (@count_byte_columns - @count_byte_signed) = 0;
#
# Count the number of OBJECT_INSTANCE_BEGIN columns.
-select count(*) from information_schema.columns
+select count(*) into @count_object_columns from information_schema.columns
where table_schema="performance_schema" and data_type = "bigint"
- and column_name like "%object_instance_begin" into @count_object_columns;
+ and column_name like "%object_instance_begin";
# Confirm that at least one column was found.
@@ -48,10 +48,10 @@ select @count_object_columns > 0;
# Confirm that all OBJECT_INSTANCE_BEGIN columns are BIGINT unsigned.
-select count(*) from information_schema.columns
+select count(*) into @count_object_unsigned from information_schema.columns
where table_schema="performance_schema" and data_type="bigint"
and column_name like "%object_instance_begin"
- and column_type like "%unsigned" into @count_object_unsigned;
+ and column_type like "%unsigned";
select (@count_object_columns - @count_object_unsigned) = 0;
diff --git a/mysql-test/suite/perfschema/t/thread_cache.test b/mysql-test/suite/perfschema/t/thread_cache.test
index 4ebadfde9fb..92309bb9ca1 100644
--- a/mysql-test/suite/perfschema/t/thread_cache.test
+++ b/mysql-test/suite/perfschema/t/thread_cache.test
@@ -17,7 +17,7 @@ SET @saved_thread_cache_size = @@global.thread_cache_size;
set global thread_cache_size = 0;
-show variables like "thread_cache_size";
+show global variables like "thread_cache_size";
connect (con1, localhost, root, , );
@@ -91,7 +91,7 @@ select @thread_id_increment;
set global thread_cache_size = 100;
-show variables like "thread_cache_size";
+show global variables like "thread_cache_size";
connect (con1, localhost, root, , );
@@ -169,5 +169,5 @@ select @thread_id_increment;
set global thread_cache_size = @saved_thread_cache_size;
-show status like "performance_schema_thread%";
+show global status like "performance_schema_thread%";
diff --git a/mysql-test/suite/perfschema/t/thread_misc-master.opt b/mysql-test/suite/perfschema/t/thread_misc-master.opt
new file mode 100644
index 00000000000..34586f1fed5
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/thread_misc-master.opt
@@ -0,0 +1 @@
+--loose-performance-schema-consumer-thread-instrumentation=0
diff --git a/mysql-test/suite/perfschema/t/thread_misc.test b/mysql-test/suite/perfschema/t/thread_misc.test
new file mode 100644
index 00000000000..4f5fa4f0ac1
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/thread_misc.test
@@ -0,0 +1,11 @@
+
+# Bug#22118669 - ASSERTION `PFS_FILE != __NULL' FAILED
+
+# Cause a temporary file to be instrumented,
+# while there are no per thread statistics collected.
+
+--disable_result_log
+select * from information_schema.columns ORDER BY table_name;
+--enable_result_log
+
+
diff --git a/mysql-test/suite/perfschema/t/threads_history.test b/mysql-test/suite/perfschema/t/threads_history.test
new file mode 100644
index 00000000000..f42dd6d0ab4
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/threads_history.test
@@ -0,0 +1,727 @@
+# Check the impact of changes done in HISTORY column in
+# performance_schema.setup_actors.
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+--source include/no_protocol.inc
+
+# Presence of the query cache changes query stages,
+# causing noise in the test output
+#--source include/have_query_cache_disabled.inc
+
+create user user1@localhost;
+create user user2@localhost;
+create user user3@localhost;
+create user user4@localhost;
+
+grant ALL on *.* to user1@localhost;
+grant ALL on *.* to user2@localhost;
+grant ALL on *.* to user3@localhost;
+grant ALL on *.* to user4@localhost;
+
+flush privileges;
+
+select * from performance_schema.setup_consumers;
+
+--echo # Switch to (con1, localhost, user1, , )
+connect (con1, localhost, user1, , );
+
+update performance_schema.threads
+ set INSTRUMENTED='YES', HISTORY='YES'
+ where PROCESSLIST_ID = connection_id();
+
+let $con1_thread_id= `select THREAD_ID from performance_schema.threads
+ where PROCESSLIST_ID = connection_id()`;
+
+--echo # Switch to (con2, localhost, user2, , )
+connect (con2, localhost, user2, , );
+
+update performance_schema.threads
+ set INSTRUMENTED='YES', HISTORY='NO'
+ where PROCESSLIST_ID = connection_id();
+
+let $con2_thread_id= `select THREAD_ID from performance_schema.threads
+ where PROCESSLIST_ID = connection_id()`;
+
+--echo # Switch to (con3, localhost, user3, , )
+connect (con3, localhost, user3, , );
+
+update performance_schema.threads
+ set INSTRUMENTED='NO', HISTORY='YES'
+ where PROCESSLIST_ID = connection_id();
+
+let $con3_thread_id= `select THREAD_ID from performance_schema.threads
+ where PROCESSLIST_ID = connection_id()`;
+
+--echo # Switch to (con4, localhost, user4, , )
+connect (con4, localhost, user4, , );
+
+update performance_schema.threads
+ set INSTRUMENTED='NO', HISTORY='NO'
+ where PROCESSLIST_ID = connection_id();
+
+let $con4_thread_id= `select THREAD_ID from performance_schema.threads
+ where PROCESSLIST_ID = connection_id()`;
+
+--echo # Switch to connection default
+--connection default
+
+truncate table performance_schema.events_transactions_current;
+truncate table performance_schema.events_transactions_history;
+truncate table performance_schema.events_transactions_history_long;
+truncate table performance_schema.events_statements_current;
+truncate table performance_schema.events_statements_history;
+truncate table performance_schema.events_statements_history_long;
+truncate table performance_schema.events_stages_current;
+truncate table performance_schema.events_stages_history;
+truncate table performance_schema.events_stages_history_long;
+truncate table performance_schema.events_waits_current;
+truncate table performance_schema.events_waits_history;
+truncate table performance_schema.events_waits_history_long;
+
+--echo # Switch to connection con1
+--connection con1
+
+XA START 'XA_CON1', 'XA_BQUAL', 12;
+select "Hi from con1";
+XA END 'XA_CON1', 'XA_BQUAL', 12;
+XA PREPARE 'XA_CON1', 'XA_BQUAL', 12;
+XA COMMIT 'XA_CON1', 'XA_BQUAL', 12;
+
+--echo # Switch to connection con2
+--connection con2
+
+XA START 'XA_CON2', 'XA_BQUAL', 12;
+select "Hi from con2";
+XA END 'XA_CON2', 'XA_BQUAL', 12;
+XA PREPARE 'XA_CON2', 'XA_BQUAL', 12;
+XA COMMIT 'XA_CON2', 'XA_BQUAL', 12;
+
+--echo # Switch to connection con3
+--connection con3
+
+XA START 'XA_CON3', 'XA_BQUAL', 12;
+select "Hi from con3";
+XA END 'XA_CON3', 'XA_BQUAL', 12;
+XA PREPARE 'XA_CON3', 'XA_BQUAL', 12;
+XA COMMIT 'XA_CON3', 'XA_BQUAL', 12;
+
+--echo # Switch to connection con4
+--connection con4
+
+XA START 'XA_CON4', 'XA_BQUAL', 12;
+select "Hi from con4";
+XA END 'XA_CON4', 'XA_BQUAL', 12;
+XA PREPARE 'XA_CON4', 'XA_BQUAL', 12;
+XA COMMIT 'XA_CON4', 'XA_BQUAL', 12;
+
+--connection default
+
+--disable_query_log
+
+echo "=========================== Transactions user 1";
+
+eval select XID_FORMAT_ID, XID_GTRID, XID_BQUAL from performance_schema.events_transactions_current
+ where THREAD_ID = $con1_thread_id;
+eval select XID_FORMAT_ID, XID_GTRID, XID_BQUAL from performance_schema.events_transactions_history
+ where THREAD_ID = $con1_thread_id;
+eval select XID_FORMAT_ID, XID_GTRID, XID_BQUAL from performance_schema.events_transactions_history_long
+ where THREAD_ID = $con1_thread_id;
+
+echo "=========================== Transactions user 2";
+
+eval select XID_FORMAT_ID, XID_GTRID, XID_BQUAL from performance_schema.events_transactions_current
+ where THREAD_ID = $con2_thread_id;
+eval select count(*) from performance_schema.events_transactions_history
+ where THREAD_ID = $con2_thread_id;
+eval select count(*) from performance_schema.events_transactions_history_long
+ where THREAD_ID = $con2_thread_id;
+
+echo "=========================== Transactions user 3";
+
+eval select count(*) from performance_schema.events_transactions_current
+ where THREAD_ID = $con3_thread_id;
+eval select count(*) from performance_schema.events_transactions_history
+ where THREAD_ID = $con3_thread_id;
+eval select count(*) from performance_schema.events_transactions_history_long
+ where THREAD_ID = $con3_thread_id;
+
+echo "=========================== Transactions user 4";
+
+eval select count(*) from performance_schema.events_transactions_current
+ where THREAD_ID = $con4_thread_id;
+eval select count(*) from performance_schema.events_transactions_history
+ where THREAD_ID = $con4_thread_id;
+eval select count(*) from performance_schema.events_transactions_history_long
+ where THREAD_ID = $con4_thread_id;
+
+echo "=========================== Statements user 1";
+
+eval select EVENT_NAME, SQL_TEXT from performance_schema.events_statements_current
+ where THREAD_ID = $con1_thread_id
+ order by THREAD_ID, EVENT_ID;
+eval select EVENT_NAME, SQL_TEXT from performance_schema.events_statements_history
+ where THREAD_ID = $con1_thread_id
+ order by THREAD_ID, EVENT_ID;
+eval select EVENT_NAME, SQL_TEXT from performance_schema.events_statements_history_long
+ where THREAD_ID = $con1_thread_id
+ order by THREAD_ID, EVENT_ID;
+
+echo "=========================== Statements user 2";
+
+eval select EVENT_NAME, SQL_TEXT from performance_schema.events_statements_current
+ where THREAD_ID = $con2_thread_id
+ order by THREAD_ID, EVENT_ID;
+eval select count(*) from performance_schema.events_statements_history
+ where THREAD_ID = $con2_thread_id;
+eval select count(*) from performance_schema.events_statements_history_long
+ where THREAD_ID = $con2_thread_id;
+
+echo "=========================== Statements user 3";
+
+eval select count(*) from performance_schema.events_statements_current
+ where THREAD_ID = $con3_thread_id;
+eval select count(*) from performance_schema.events_statements_history
+ where THREAD_ID = $con3_thread_id;
+eval select count(*) from performance_schema.events_statements_history_long
+ where THREAD_ID = $con3_thread_id;
+
+echo "=========================== Statements user 4";
+
+eval select count(*) from performance_schema.events_statements_current
+ where THREAD_ID = $con4_thread_id;
+eval select count(*) from performance_schema.events_statements_history
+ where THREAD_ID = $con4_thread_id;
+eval select count(*) from performance_schema.events_statements_history_long
+ where THREAD_ID = $con4_thread_id;
+
+echo "=========================== Stages user 1";
+
+eval select EVENT_NAME from performance_schema.events_stages_current
+ where THREAD_ID = $con1_thread_id
+ order by THREAD_ID, EVENT_ID;
+eval select EVENT_NAME from performance_schema.events_stages_history
+ where THREAD_ID = $con1_thread_id
+ order by THREAD_ID, EVENT_ID;
+eval select EVENT_NAME from performance_schema.events_stages_history_long
+ where THREAD_ID = $con1_thread_id
+ order by THREAD_ID, EVENT_ID;
+
+echo "=========================== Stages user 2";
+
+eval select EVENT_NAME from performance_schema.events_stages_current
+ where THREAD_ID = $con2_thread_id
+ order by THREAD_ID, EVENT_ID;
+eval select count(*) from performance_schema.events_stages_history
+ where THREAD_ID = $con2_thread_id;
+eval select count(*) from performance_schema.events_stages_history_long
+ where THREAD_ID = $con2_thread_id;
+
+echo "=========================== Stages user 3";
+
+eval select count(*) from performance_schema.events_stages_current
+ where THREAD_ID = $con3_thread_id;
+eval select count(*) from performance_schema.events_stages_history
+ where THREAD_ID = $con3_thread_id;
+eval select count(*) from performance_schema.events_stages_history_long
+ where THREAD_ID = $con3_thread_id;
+
+echo "=========================== Stages user 4";
+
+eval select count(*) from performance_schema.events_stages_current
+ where THREAD_ID = $con4_thread_id;
+eval select count(*) from performance_schema.events_stages_history
+ where THREAD_ID = $con4_thread_id;
+eval select count(*) from performance_schema.events_stages_history_long
+ where THREAD_ID = $con4_thread_id;
+
+echo "=========================== Waits user 1";
+
+eval select EVENT_NAME from performance_schema.events_waits_current
+ where THREAD_ID = $con1_thread_id
+ order by THREAD_ID, EVENT_ID;
+eval select (count(*) > 5) as has_waits from performance_schema.events_waits_history
+ where THREAD_ID = $con1_thread_id;
+eval select (count(*) > 15) as has_waits from performance_schema.events_waits_history_long
+ where THREAD_ID = $con1_thread_id;
+
+echo "=========================== Waits user 2";
+
+eval select EVENT_NAME from performance_schema.events_waits_current
+ where THREAD_ID = $con2_thread_id
+ order by THREAD_ID, EVENT_ID;
+eval select count(*) from performance_schema.events_waits_history
+ where THREAD_ID = $con2_thread_id;
+eval select count(*) from performance_schema.events_waits_history_long
+ where THREAD_ID = $con2_thread_id;
+
+echo "=========================== Waits user 3";
+
+eval select count(*) from performance_schema.events_waits_current
+ where THREAD_ID = $con3_thread_id;
+eval select count(*) from performance_schema.events_waits_history
+ where THREAD_ID = $con3_thread_id;
+eval select count(*) from performance_schema.events_waits_history_long
+ where THREAD_ID = $con3_thread_id;
+
+echo "=========================== Waits user 4";
+
+eval select count(*) from performance_schema.events_waits_current
+ where THREAD_ID = $con4_thread_id;
+eval select count(*) from performance_schema.events_waits_history
+ where THREAD_ID = $con4_thread_id;
+eval select count(*) from performance_schema.events_waits_history_long
+ where THREAD_ID = $con4_thread_id;
+
+--enable_query_log
+
+--echo # Switch to connection default, disable consumers
+--connection default
+
+update performance_schema.setup_consumers
+ set enabled='NO' where name like "%history%";
+
+select * from performance_schema.setup_consumers;
+
+truncate table performance_schema.events_transactions_current;
+truncate table performance_schema.events_transactions_history;
+truncate table performance_schema.events_transactions_history_long;
+truncate table performance_schema.events_statements_current;
+truncate table performance_schema.events_statements_history;
+truncate table performance_schema.events_statements_history_long;
+truncate table performance_schema.events_stages_current;
+truncate table performance_schema.events_stages_history;
+truncate table performance_schema.events_stages_history_long;
+truncate table performance_schema.events_waits_current;
+truncate table performance_schema.events_waits_history;
+truncate table performance_schema.events_waits_history_long;
+
+--echo # Switch to connection con1
+--connection con1
+
+XA START 'XA_CON1', 'XA_BQUAL', 12;
+select "Hi from con1";
+XA END 'XA_CON1', 'XA_BQUAL', 12;
+XA PREPARE 'XA_CON1', 'XA_BQUAL', 12;
+XA COMMIT 'XA_CON1', 'XA_BQUAL', 12;
+
+--echo # Switch to connection con2
+--connection con2
+
+XA START 'XA_CON2', 'XA_BQUAL', 12;
+select "Hi from con2";
+XA END 'XA_CON2', 'XA_BQUAL', 12;
+XA PREPARE 'XA_CON2', 'XA_BQUAL', 12;
+XA COMMIT 'XA_CON2', 'XA_BQUAL', 12;
+
+--echo # Switch to connection con3
+--connection con3
+
+XA START 'XA_CON3', 'XA_BQUAL', 12;
+select "Hi from con3";
+XA END 'XA_CON3', 'XA_BQUAL', 12;
+XA PREPARE 'XA_CON3', 'XA_BQUAL', 12;
+XA COMMIT 'XA_CON3', 'XA_BQUAL', 12;
+
+--echo # Switch to connection con4
+--connection con4
+
+XA START 'XA_CON4', 'XA_BQUAL', 12;
+select "Hi from con4";
+XA END 'XA_CON4', 'XA_BQUAL', 12;
+XA PREPARE 'XA_CON4', 'XA_BQUAL', 12;
+XA COMMIT 'XA_CON4', 'XA_BQUAL', 12;
+
+--connection default
+
+--disable_query_log
+
+echo "=========================== Transactions user 1";
+
+eval select XID_FORMAT_ID, XID_GTRID, XID_BQUAL from performance_schema.events_transactions_current
+ where THREAD_ID = $con1_thread_id;
+eval select count(*) from performance_schema.events_transactions_history
+ where THREAD_ID = $con1_thread_id;
+eval select count(*) from performance_schema.events_transactions_history_long
+ where THREAD_ID = $con1_thread_id;
+
+echo "=========================== Transactions user 2";
+
+eval select XID_FORMAT_ID, XID_GTRID, XID_BQUAL from performance_schema.events_transactions_current
+ where THREAD_ID = $con2_thread_id;
+eval select count(*) from performance_schema.events_transactions_history
+ where THREAD_ID = $con2_thread_id;
+eval select count(*) from performance_schema.events_transactions_history_long
+ where THREAD_ID = $con2_thread_id;
+
+echo "=========================== Transactions user 3";
+
+eval select count(*) from performance_schema.events_transactions_current
+ where THREAD_ID = $con3_thread_id;
+eval select count(*) from performance_schema.events_transactions_history
+ where THREAD_ID = $con3_thread_id;
+eval select count(*) from performance_schema.events_transactions_history_long
+ where THREAD_ID = $con3_thread_id;
+
+echo "=========================== Transactions user 4";
+
+eval select count(*) from performance_schema.events_transactions_current
+ where THREAD_ID = $con4_thread_id;
+eval select count(*) from performance_schema.events_transactions_history
+ where THREAD_ID = $con4_thread_id;
+eval select count(*) from performance_schema.events_transactions_history_long
+ where THREAD_ID = $con4_thread_id;
+
+echo "=========================== Statements user 1";
+
+eval select EVENT_NAME, SQL_TEXT from performance_schema.events_statements_current
+ where THREAD_ID = $con1_thread_id
+ order by THREAD_ID, EVENT_ID;
+eval select count(*) from performance_schema.events_statements_history
+ where THREAD_ID = $con1_thread_id;
+eval select count(*) from performance_schema.events_statements_history_long
+ where THREAD_ID = $con1_thread_id;
+
+echo "=========================== Statements user 2";
+
+eval select EVENT_NAME, SQL_TEXT from performance_schema.events_statements_current
+ where THREAD_ID = $con2_thread_id
+ order by THREAD_ID, EVENT_ID;
+eval select count(*) from performance_schema.events_statements_history
+ where THREAD_ID = $con2_thread_id;
+eval select count(*) from performance_schema.events_statements_history_long
+ where THREAD_ID = $con2_thread_id;
+
+echo "=========================== Statements user 3";
+
+eval select count(*) from performance_schema.events_statements_current
+ where THREAD_ID = $con3_thread_id;
+eval select count(*) from performance_schema.events_statements_history
+ where THREAD_ID = $con3_thread_id;
+eval select count(*) from performance_schema.events_statements_history_long
+ where THREAD_ID = $con3_thread_id;
+
+echo "=========================== Statements user 4";
+
+eval select count(*) from performance_schema.events_statements_current
+ where THREAD_ID = $con4_thread_id;
+eval select count(*) from performance_schema.events_statements_history
+ where THREAD_ID = $con4_thread_id;
+eval select count(*) from performance_schema.events_statements_history_long
+ where THREAD_ID = $con4_thread_id;
+
+echo "=========================== Stages user 1";
+
+eval select EVENT_NAME from performance_schema.events_stages_current
+ where THREAD_ID = $con1_thread_id
+ order by THREAD_ID, EVENT_ID;
+eval select count(*) from performance_schema.events_stages_history
+ where THREAD_ID = $con1_thread_id;
+eval select count(*) from performance_schema.events_stages_history_long
+ where THREAD_ID = $con1_thread_id;
+
+echo "=========================== Stages user 2";
+
+eval select EVENT_NAME from performance_schema.events_stages_current
+ where THREAD_ID = $con2_thread_id
+ order by THREAD_ID, EVENT_ID;
+eval select count(*) from performance_schema.events_stages_history
+ where THREAD_ID = $con2_thread_id;
+eval select count(*) from performance_schema.events_stages_history_long
+ where THREAD_ID = $con2_thread_id;
+
+echo "=========================== Stages user 3";
+
+eval select count(*) from performance_schema.events_stages_current
+ where THREAD_ID = $con3_thread_id;
+eval select count(*) from performance_schema.events_stages_history
+ where THREAD_ID = $con3_thread_id;
+eval select count(*) from performance_schema.events_stages_history_long
+ where THREAD_ID = $con3_thread_id;
+
+echo "=========================== Stages user 4";
+
+eval select count(*) from performance_schema.events_stages_current
+ where THREAD_ID = $con4_thread_id;
+eval select count(*) from performance_schema.events_stages_history
+ where THREAD_ID = $con4_thread_id;
+eval select count(*) from performance_schema.events_stages_history_long
+ where THREAD_ID = $con4_thread_id;
+
+echo "=========================== Waits user 1";
+
+eval select EVENT_NAME from performance_schema.events_waits_current
+ where THREAD_ID = $con1_thread_id
+ order by THREAD_ID, EVENT_ID;
+eval select count(*) as has_waits from performance_schema.events_waits_history
+ where THREAD_ID = $con1_thread_id;
+eval select count(*) as has_waits from performance_schema.events_waits_history_long
+ where THREAD_ID = $con1_thread_id;
+
+echo "=========================== Waits user 2";
+
+eval select EVENT_NAME from performance_schema.events_waits_current
+ where THREAD_ID = $con2_thread_id
+ order by THREAD_ID, EVENT_ID;
+eval select count(*) from performance_schema.events_waits_history
+ where THREAD_ID = $con2_thread_id;
+eval select count(*) from performance_schema.events_waits_history_long
+ where THREAD_ID = $con2_thread_id;
+
+echo "=========================== Waits user 3";
+
+eval select count(*) from performance_schema.events_waits_current
+ where THREAD_ID = $con3_thread_id;
+eval select count(*) from performance_schema.events_waits_history
+ where THREAD_ID = $con3_thread_id;
+eval select count(*) from performance_schema.events_waits_history_long
+ where THREAD_ID = $con3_thread_id;
+
+echo "=========================== Waits user 4";
+
+eval select count(*) from performance_schema.events_waits_current
+ where THREAD_ID = $con4_thread_id;
+eval select count(*) from performance_schema.events_waits_history
+ where THREAD_ID = $con4_thread_id;
+eval select count(*) from performance_schema.events_waits_history_long
+ where THREAD_ID = $con4_thread_id;
+
+--enable_query_log
+
+--echo # Switch to connection default, enable consumers
+--connection default
+
+update performance_schema.setup_consumers
+ set enabled='YES' where name like "%history%";
+
+select * from performance_schema.setup_consumers;
+
+truncate table performance_schema.events_transactions_current;
+truncate table performance_schema.events_transactions_history;
+truncate table performance_schema.events_transactions_history_long;
+truncate table performance_schema.events_statements_current;
+truncate table performance_schema.events_statements_history;
+truncate table performance_schema.events_statements_history_long;
+truncate table performance_schema.events_stages_current;
+truncate table performance_schema.events_stages_history;
+truncate table performance_schema.events_stages_history_long;
+truncate table performance_schema.events_waits_current;
+truncate table performance_schema.events_waits_history;
+truncate table performance_schema.events_waits_history_long;
+
+--echo # Switch to connection con1
+--connection con1
+
+XA START 'XA_CON1', 'XA_BQUAL', 12;
+select "Hi from con1";
+XA END 'XA_CON1', 'XA_BQUAL', 12;
+XA PREPARE 'XA_CON1', 'XA_BQUAL', 12;
+XA COMMIT 'XA_CON1', 'XA_BQUAL', 12;
+
+--echo # Switch to connection con2
+--connection con2
+
+XA START 'XA_CON2', 'XA_BQUAL', 12;
+select "Hi from con2";
+XA END 'XA_CON2', 'XA_BQUAL', 12;
+XA PREPARE 'XA_CON2', 'XA_BQUAL', 12;
+XA COMMIT 'XA_CON2', 'XA_BQUAL', 12;
+
+--echo # Switch to connection con3
+--connection con3
+
+XA START 'XA_CON3', 'XA_BQUAL', 12;
+select "Hi from con3";
+XA END 'XA_CON3', 'XA_BQUAL', 12;
+XA PREPARE 'XA_CON3', 'XA_BQUAL', 12;
+XA COMMIT 'XA_CON3', 'XA_BQUAL', 12;
+
+--echo # Switch to connection con4
+--connection con4
+
+XA START 'XA_CON4', 'XA_BQUAL', 12;
+select "Hi from con4";
+XA END 'XA_CON4', 'XA_BQUAL', 12;
+XA PREPARE 'XA_CON4', 'XA_BQUAL', 12;
+XA COMMIT 'XA_CON4', 'XA_BQUAL', 12;
+
+--connection default
+
+--disable_query_log
+
+echo "=========================== Transactions user 1";
+
+eval select XID_FORMAT_ID, XID_GTRID, XID_BQUAL from performance_schema.events_transactions_current
+ where THREAD_ID = $con1_thread_id;
+eval select XID_FORMAT_ID, XID_GTRID, XID_BQUAL from performance_schema.events_transactions_history
+ where THREAD_ID = $con1_thread_id;
+eval select XID_FORMAT_ID, XID_GTRID, XID_BQUAL from performance_schema.events_transactions_history_long
+ where THREAD_ID = $con1_thread_id;
+
+echo "=========================== Transactions user 2";
+
+eval select XID_FORMAT_ID, XID_GTRID, XID_BQUAL from performance_schema.events_transactions_current
+ where THREAD_ID = $con2_thread_id;
+eval select count(*) from performance_schema.events_transactions_history
+ where THREAD_ID = $con2_thread_id;
+eval select count(*) from performance_schema.events_transactions_history_long
+ where THREAD_ID = $con2_thread_id;
+
+echo "=========================== Transactions user 3";
+
+eval select count(*) from performance_schema.events_transactions_current
+ where THREAD_ID = $con3_thread_id;
+eval select count(*) from performance_schema.events_transactions_history
+ where THREAD_ID = $con3_thread_id;
+eval select count(*) from performance_schema.events_transactions_history_long
+ where THREAD_ID = $con3_thread_id;
+
+echo "=========================== Transactions user 4";
+
+eval select count(*) from performance_schema.events_transactions_current
+ where THREAD_ID = $con4_thread_id;
+eval select count(*) from performance_schema.events_transactions_history
+ where THREAD_ID = $con4_thread_id;
+eval select count(*) from performance_schema.events_transactions_history_long
+ where THREAD_ID = $con4_thread_id;
+
+echo "=========================== Statements user 1";
+
+eval select EVENT_NAME, SQL_TEXT from performance_schema.events_statements_current
+ where THREAD_ID = $con1_thread_id
+ order by THREAD_ID, EVENT_ID;
+eval select EVENT_NAME, SQL_TEXT from performance_schema.events_statements_history
+ where THREAD_ID = $con1_thread_id
+ order by THREAD_ID, EVENT_ID;
+eval select EVENT_NAME, SQL_TEXT from performance_schema.events_statements_history_long
+ where THREAD_ID = $con1_thread_id
+ order by THREAD_ID, EVENT_ID;
+
+echo "=========================== Statements user 2";
+
+eval select EVENT_NAME, SQL_TEXT from performance_schema.events_statements_current
+ where THREAD_ID = $con2_thread_id
+ order by THREAD_ID, EVENT_ID;
+eval select count(*) from performance_schema.events_statements_history
+ where THREAD_ID = $con2_thread_id;
+eval select count(*) from performance_schema.events_statements_history_long
+ where THREAD_ID = $con2_thread_id;
+
+echo "=========================== Statements user 3";
+
+eval select count(*) from performance_schema.events_statements_current
+ where THREAD_ID = $con3_thread_id;
+eval select count(*) from performance_schema.events_statements_history
+ where THREAD_ID = $con3_thread_id;
+eval select count(*) from performance_schema.events_statements_history_long
+ where THREAD_ID = $con3_thread_id;
+
+echo "=========================== Statements user 4";
+
+eval select count(*) from performance_schema.events_statements_current
+ where THREAD_ID = $con4_thread_id;
+eval select count(*) from performance_schema.events_statements_history
+ where THREAD_ID = $con4_thread_id;
+eval select count(*) from performance_schema.events_statements_history_long
+ where THREAD_ID = $con4_thread_id;
+
+echo "=========================== Stages user 1";
+
+eval select EVENT_NAME from performance_schema.events_stages_current
+ where THREAD_ID = $con1_thread_id
+ order by THREAD_ID, EVENT_ID;
+eval select EVENT_NAME from performance_schema.events_stages_history
+ where THREAD_ID = $con1_thread_id
+ order by THREAD_ID, EVENT_ID;
+eval select EVENT_NAME from performance_schema.events_stages_history_long
+ where THREAD_ID = $con1_thread_id
+ order by THREAD_ID, EVENT_ID;
+
+echo "=========================== Stages user 2";
+
+eval select EVENT_NAME from performance_schema.events_stages_current
+ where THREAD_ID = $con2_thread_id
+ order by THREAD_ID, EVENT_ID;
+eval select count(*) from performance_schema.events_stages_history
+ where THREAD_ID = $con2_thread_id;
+eval select count(*) from performance_schema.events_stages_history_long
+ where THREAD_ID = $con2_thread_id;
+
+echo "=========================== Stages user 3";
+
+eval select count(*) from performance_schema.events_stages_current
+ where THREAD_ID = $con3_thread_id;
+eval select count(*) from performance_schema.events_stages_history
+ where THREAD_ID = $con3_thread_id;
+eval select count(*) from performance_schema.events_stages_history_long
+ where THREAD_ID = $con3_thread_id;
+
+echo "=========================== Stages user 4";
+
+eval select count(*) from performance_schema.events_stages_current
+ where THREAD_ID = $con4_thread_id;
+eval select count(*) from performance_schema.events_stages_history
+ where THREAD_ID = $con4_thread_id;
+eval select count(*) from performance_schema.events_stages_history_long
+ where THREAD_ID = $con4_thread_id;
+
+echo "=========================== Waits user 1";
+
+eval select EVENT_NAME from performance_schema.events_waits_current
+ where THREAD_ID = $con1_thread_id
+ order by THREAD_ID, EVENT_ID;
+eval select (count(*) > 5) as has_waits from performance_schema.events_waits_history
+ where THREAD_ID = $con1_thread_id;
+eval select (count(*) > 15) as has_waits from performance_schema.events_waits_history_long
+ where THREAD_ID = $con1_thread_id;
+
+echo "=========================== Waits user 2";
+
+eval select EVENT_NAME from performance_schema.events_waits_current
+ where THREAD_ID = $con2_thread_id
+ order by THREAD_ID, EVENT_ID;
+eval select count(*) from performance_schema.events_waits_history
+ where THREAD_ID = $con2_thread_id;
+eval select count(*) from performance_schema.events_waits_history_long
+ where THREAD_ID = $con2_thread_id;
+
+echo "=========================== Waits user 3";
+
+eval select count(*) from performance_schema.events_waits_current
+ where THREAD_ID = $con3_thread_id;
+eval select count(*) from performance_schema.events_waits_history
+ where THREAD_ID = $con3_thread_id;
+eval select count(*) from performance_schema.events_waits_history_long
+ where THREAD_ID = $con3_thread_id;
+
+echo "=========================== Waits user 4";
+
+eval select count(*) from performance_schema.events_waits_current
+ where THREAD_ID = $con4_thread_id;
+eval select count(*) from performance_schema.events_waits_history
+ where THREAD_ID = $con4_thread_id;
+eval select count(*) from performance_schema.events_waits_history_long
+ where THREAD_ID = $con4_thread_id;
+
+--enable_query_log
+
+--echo # Switch to connection default
+--connection default
+
+revoke all privileges, grant option from user1@localhost;
+revoke all privileges, grant option from user2@localhost;
+revoke all privileges, grant option from user3@localhost;
+revoke all privileges, grant option from user4@localhost;
+drop user user1@localhost;
+drop user user2@localhost;
+drop user user3@localhost;
+drop user user4@localhost;
+flush privileges;
+
+truncate table performance_schema.setup_actors;
+
+insert into performance_schema.setup_actors
+values ('%', '%', '%', 'YES', 'YES');
+
+select * from performance_schema.setup_actors;
+
diff --git a/mysql-test/suite/perfschema/t/threads_innodb.test b/mysql-test/suite/perfschema/t/threads_innodb.test
index 66bceab724a..366c3b82ce8 100644
--- a/mysql-test/suite/perfschema/t/threads_innodb.test
+++ b/mysql-test/suite/perfschema/t/threads_innodb.test
@@ -7,6 +7,8 @@
--source include/have_innodb.inc
--source include/have_perfschema.inc
+#--source include/turn_off_only_full_group_by.inc
+
# There are several InnoDB io_handler_threads servicing for read IO, write IO etc.
# The number of these threads is at least for some types configurable.
# We suppress here duplicates rows with the goal to avoid that the test fails
@@ -18,3 +20,4 @@ FROM performance_schema.threads
WHERE name LIKE 'thread/innodb/%'
GROUP BY name;
+#--source include/restore_sql_mode_after_turn_off_only_full_group_by.inc
diff --git a/mysql-test/suite/perfschema/t/threads_insert_delayed.test b/mysql-test/suite/perfschema/t/threads_insert_delayed.test
deleted file mode 100644
index a9f3edc6cfe..00000000000
--- a/mysql-test/suite/perfschema/t/threads_insert_delayed.test
+++ /dev/null
@@ -1,40 +0,0 @@
-
-# Tests for special content of performance_schema.threads
-#
-# The feature INSERT DELAYED (supported by MyISAM,MEMORY,ARCHIVE,BLACKHOLE)
-# causes that a "delayed_insert" thread shows up as soon as the first
-# INSERT DELAYED was issued.
-
---source include/not_embedded.inc
---source include/have_perfschema.inc
-
---disable_warnings
-DROP TABLE IF EXISTS t1;
-DROP TEMPORARY TABLE IF EXISTS t2;
---enable_warnings
-CREATE TABLE t1 (f1 BIGINT) ENGINE = MyISAM;
-CREATE TEMPORARY TABLE t2 AS
-SELECT thread_id FROM performance_schema.threads WHERE 1 = 2;
-
-# Reveal that the delayed_insert thread does not exist.
-# Note(mleich): This expectation is probably not all time true.
-SELECT COUNT(*) = 0 AS expect_1 FROM performance_schema.threads
-WHERE name = 'thread/sql/delayed_insert';
-
-INSERT INTO t2 SELECT thread_id
-FROM performance_schema.threads;
-
-let $wait_condition= SELECT COUNT(*) = 1 AS expect_0 FROM performance_schema.threads
-WHERE name = 'thread/sql/delayed_insert';
-INSERT DELAYED INTO t1 SET f1 = SLEEP(3);
---source include/wait_condition.inc
-
-# Expect to get
-# thread/sql/delayed_insert FOREGROUND YES root localhost
-SELECT name, type, instrumented, processlist_user, processlist_host
-FROM performance_schema.threads
-WHERE thread_id NOT IN (SELECT thread_id FROM t2);
-
-DROP TABLE t1;
-DROP TEMPORARY TABLE t2;
-
diff --git a/mysql-test/suite/perfschema/t/threads_mysql_freebsd.test b/mysql-test/suite/perfschema/t/threads_mysql_freebsd.test
new file mode 100644
index 00000000000..a075263629e
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/threads_mysql_freebsd.test
@@ -0,0 +1,22 @@
+
+# Tests for special content of performance_schema.threads
+#
+# Show MySQL server related content in performance_schema.threads
+
+--source include/freebsd.inc
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+# Every thread should be bound to an operating system thread
+# (this test is not using the thread_pool)
+
+# Note that this test will fail:
+# - on platforms where my_thread_os_id() is not supported,
+# which is not the case on FreeBSD
+# - if some code in the server does not assign a THREAD_OS_ID
+# to an instrumented thread, in which case this is a bug
+# in the component instrumentation.
+
+SELECT THREAD_ID, NAME, THREAD_OS_ID from performance_schema.threads
+ WHERE THREAD_OS_ID is NULL;
+
diff --git a/mysql-test/suite/perfschema/t/threads_mysql_linux.test b/mysql-test/suite/perfschema/t/threads_mysql_linux.test
new file mode 100644
index 00000000000..d56fe73d0c9
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/threads_mysql_linux.test
@@ -0,0 +1,22 @@
+
+# Tests for special content of performance_schema.threads
+#
+# Show MySQL server related content in performance_schema.threads
+
+--source include/linux.inc
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+# Every thread should be bound to an operating system thread
+# (this test is not using the thread_pool)
+
+# Note that this test will fail:
+# - on platforms where my_thread_os_id() is not supported,
+# which is not the case on linux
+# - if some code in the server does not assign a THREAD_OS_ID
+# to an instrumented thread, in which case this is a bug
+# in the component instrumentation.
+
+SELECT THREAD_ID, NAME, THREAD_OS_ID from performance_schema.threads
+ WHERE THREAD_OS_ID is NULL;
+
diff --git a/mysql-test/suite/perfschema/t/threads_mysql_windows.test b/mysql-test/suite/perfschema/t/threads_mysql_windows.test
new file mode 100644
index 00000000000..f7c1145fa5e
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/threads_mysql_windows.test
@@ -0,0 +1,22 @@
+
+# Tests for special content of performance_schema.threads
+#
+# Show MySQL server related content in performance_schema.threads
+
+--source include/windows.inc
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+# Every thread should be bound to an operating system thread
+# (this test is not using the thread_pool)
+
+# Note that this test will fail:
+# - on platforms where my_thread_os_id() is not supported,
+# which is not the case on windows
+# - if some code in the server does not assign a THREAD_OS_ID
+# to an instrumented thread, in which case this is a bug
+# in the component instrumentation.
+
+SELECT THREAD_ID, NAME, THREAD_OS_ID from performance_schema.threads
+ WHERE THREAD_OS_ID is NULL;
+
diff --git a/mysql-test/suite/perfschema/t/transaction-master.opt b/mysql-test/suite/perfschema/t/transaction-master.opt
new file mode 100644
index 00000000000..c720b9a1edb
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/transaction-master.opt
@@ -0,0 +1,4 @@
+--loose-gtid-mode=on
+--loose-enforce-gtid-consistency
+--log-bin
+--log-slave-updates
diff --git a/mysql-test/suite/perfschema/t/transaction.test b/mysql-test/suite/perfschema/t/transaction.test
new file mode 100644
index 00000000000..b616460374e
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/transaction.test
@@ -0,0 +1,734 @@
+############# suite/perfschema/t/transaction.test ####################
+# #
+# Test processing of transaction events by the Performance Schema, #
+# including explicit/implicit transactions, access modes, isolation #
+# levels, statement counts and state transitions. #
+# #
+# #
+######################################################################
+
+--source include/have_perfschema.inc
+--source include/not_embedded.inc
+--source include/have_innodb.inc
+--source include/no_protocol.inc
+--disable_query_log
+--source ../include/transaction_setup.inc
+--enable_query_log
+set global binlog_format=ROW;
+
+--echo #
+--echo # ========================================================================
+--echo # STEP 1 - SETUP
+--echo # ========================================================================
+
+--echo #
+--echo # Control thread
+--echo #
+--connection default
+SET SESSION AUTOCOMMIT= 1;
+eval $get_thread_id;
+let $default_thread_id= `SELECT @my_thread_id`;
+
+--echo #
+--echo # Connection 1
+--echo #
+connect(con1, localhost, root,,);
+--disable_query_log
+eval $get_thread_id;
+let $con1_thread_id= `SELECT @my_thread_id`;
+--enable_query_log
+SET SESSION AUTOCOMMIT= 0;
+SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ, READ WRITE;
+
+--disable_parsing
+--echo #
+--echo # Connection 2
+--echo #
+connect(con2, localhost, root,,);
+--disable_query_log
+eval $get_thread_id;
+let $con2_thread_id= `SELECT @my_thread_id`;
+--enable_query_log
+SET SESSION AUTOCOMMIT= 0;
+SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ, READ WRITE;
+--enable_parsing
+
+--connection default
+--disable_query_log
+eval SET @con1_thread_id= $con1_thread_id;
+#eval SET @con2_thread_id= $con2_thread_id;
+--enable_query_log
+
+--echo #
+--echo # Create test tables, one transactional and one non-transactional
+--echo #
+--connection default
+
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+DROP TABLE IF EXISTS nt1;
+--enable_warnings
+CREATE TABLE t1 (s1 int, s2 varchar(64)) ENGINE=INNODB;
+CREATE TABLE nt1 (s1 int, s2 varchar(64)) ENGINE=MYISAM;
+
+--echo #
+--echo # Disable all events from the control thread
+--echo #
+--disable_query_log
+UPDATE performance_schema.threads
+ SET instrumented='NO' WHERE processlist_id = CONNECTION_ID();
+--enable_query_log
+
+--echo #
+--echo # Clear transaction tables
+--echo #
+CALL clear_transaction_tables();
+
+--echo #
+--echo # ========================================================================
+--echo # STEP 2 - BASIC TRANSACTION
+--echo # ========================================================================
+--echo #
+--connection con1
+SELECT @@global.tx_isolation;
+SELECT @@global.autocommit;
+SELECT @@global.binlog_format;
+SELECT @@tx_isolation;
+SELECT @@autocommit;
+SELECT @@binlog_format;
+
+--echo #
+--echo # STEP 2.1 - START/COMMIT
+--echo #
+START TRANSACTION;
+INSERT INTO t1 VALUES (101, 'COMMITTED');
+COMMIT;
+
+--echo #
+--echo # STEP 2.2 - ROLLBACK
+--echo #
+START TRANSACTION;
+INSERT INTO t1 VALUES (102, 'ROLLED BACK');
+ROLLBACK;
+
+--echo #
+--echo ## Expect 1 committed and 1 rolled back transaction
+--connection default
+CALL transaction_verifier(1, @con1_thread_id, 'transaction', 'COMMITTED', 0, '', '', '', '', 'READ WRITE', 'REPEATABLE READ', 'NO', 0, 0, 0, 1);
+CALL transaction_verifier(1, @con1_thread_id, 'transaction', 'ROLLED BACK', 0, '', '', '', '', 'READ WRITE', 'REPEATABLE READ', 'NO', 0, 0, 0, 1);
+CALL clear_transaction_tables();
+
+--echo #
+--echo # STEP 2.3 - COMMIT AND CHAIN
+--echo #
+--connection con1
+START TRANSACTION;
+INSERT INTO t1 VALUES (103, 'COMMIT AND CHAIN');
+COMMIT AND CHAIN;
+INSERT INTO t1 VALUES (104, 'COMMIT AND CHAIN');
+COMMIT;
+
+--echo #
+--echo ## Expect 2 committed transactions
+--connection default
+CALL transaction_verifier(1, @con1_thread_id, 'transaction', 'COMMITTED', 0, '', '', '', '', 'READ WRITE', 'REPEATABLE READ', 'NO', 0, 0, 0, 2);
+CALL clear_transaction_tables();
+
+--echo #
+--echo # ========================================================================
+--echo # STEP 3 - ISOLATION LEVEL
+--echo # ========================================================================
+--echo #
+--echo # connection con1
+--connection con1
+SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE;
+START TRANSACTION;
+INSERT INTO t1 VALUES (301, 'SERIALIZABLE');
+COMMIT;
+
+SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ;
+START TRANSACTION;
+INSERT INTO t1 VALUES (302, 'REPEATABLE READ');
+COMMIT;
+
+## NOTE - InnoDB requires binlog_format = ROW for READ COMMITTED/UNCOMMITTED
+SELECT @@binlog_format INTO @binlog_save;
+SET SESSION BINLOG_FORMAT=ROW;
+SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
+START TRANSACTION;
+INSERT INTO t1 VALUES (303, 'READ COMMITTED');
+COMMIT;
+
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+START TRANSACTION;
+INSERT INTO t1 VALUES (304, 'READ UNCOMMITTED');
+COMMIT;
+
+SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ;
+SET binlog_format= @binlog_save;
+
+--echo #
+--connection default
+CALL transaction_verifier(1, @con1_thread_id, 'transaction', 'COMMITTED', 0, '', '', '', '', 'READ WRITE', 'SERIALIZABLE', 'NO', 0, 0, 0, 1);
+CALL transaction_verifier(1, @con1_thread_id, 'transaction', 'COMMITTED', 0, '', '', '', '', 'READ WRITE', 'REPEATABLE READ', 'NO', 0, 0, 0, 1);
+CALL transaction_verifier(1, @con1_thread_id, 'transaction', 'COMMITTED', 0, '', '', '', '', 'READ WRITE', 'READ COMMITTED', 'NO', 0, 0, 0, 1);
+CALL transaction_verifier(1, @con1_thread_id, 'transaction', 'COMMITTED', 0, '', '', '', '', 'READ WRITE', 'READ UNCOMMITTED', 'NO', 0, 0, 0, 1);
+CALL clear_transaction_tables();
+
+--echo #
+--echo # ========================================================================
+--echo # STEP 4 - ACCESS MODE
+--echo # ========================================================================
+--echo #
+--echo # STEP 4.1 - READ ONLY, TIMING ENABLED
+--echo #
+--echo #
+--echo # connection con1
+--connection con1
+SET SESSION TRANSACTION READ WRITE;
+START TRANSACTION;
+INSERT INTO t1 VALUES (410, 'READ ONLY');
+INSERT INTO t1 VALUES (411, 'READ ONLY');
+INSERT INTO t1 VALUES (412, 'READ ONLY');
+INSERT INTO t1 VALUES (413, 'READ ONLY');
+COMMIT;
+
+SET SESSION TRANSACTION READ ONLY;
+START TRANSACTION;
+SELECT * FROM t1 ORDER BY s1;
+COMMIT;
+
+--echo #
+--echo ## Expect 1 read only, committed transaction in events_transactions_history
+--connection default
+CALL transaction_verifier(1, @con1_thread_id, 'transaction', 'COMMITTED', 0, '', '', '', '', 'READ ONLY', 'REPEATABLE READ', 'NO', 0, 0, 0, 1);
+CALL clear_transaction_tables();
+
+--echo #
+--echo #
+--echo # STEP 4.2 - READ ONLY, TIMING DISABLED
+--echo #
+--echo #
+--echo ## Disable timing stats for 'transaction'
+UPDATE performance_schema.setup_instruments SET timed = 'NO' WHERE name = 'transaction';
+--echo #
+TRUNCATE performance_schema.events_transactions_summary_global_by_event_name;
+
+--echo # connection con1
+--connection con1
+START TRANSACTION;
+SELECT * FROM t1 ORDER BY s1;
+COMMIT;
+--echo #
+SET SESSION TRANSACTION READ WRITE;
+
+--connection default
+--echo #
+--echo ## Expect 1 event, 0 stats
+SELECT * FROM performance_schema.events_transactions_summary_global_by_event_name;
+--echo #
+--echo ## Restore setup_instruments
+UPDATE performance_schema.setup_instruments SET enabled = 'YES' WHERE name = 'transaction';
+
+--echo #
+--echo # ========================================================================
+--echo # STEP 5 - IMPLICIT START
+--echo # ========================================================================
+--echo # When AUTOCOMMIT is disabled, the first statement following a committed
+--echo # transaction marks the start of a new transaction. Subsequent statements will
+--echo # be part of the transaction until it is committed.
+--echo #
+--connection con1
+SET SESSION AUTOCOMMIT = 0;
+INSERT INTO t1 VALUES (501, 'IMPLICIT START');
+
+--echo #
+--echo ## Expect 1 active transaction in events_transactions_current
+--connection default
+CALL transaction_verifier(0, @con1_thread_id, 'transaction', 'ACTIVE', 0, '', '', '', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1);
+
+--connection con1
+INSERT INTO t1 VALUES (502, 'IMPLICIT START');
+COMMIT;
+
+--echo #
+--echo ## Expect one committed transaction in events_transactions_current and history
+--connection default
+CALL transaction_verifier(0, @con1_thread_id, 'transaction', 'COMMITTED', 0, '', '', '', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1);
+CALL transaction_verifier(1, @con1_thread_id, 'transaction', 'COMMITTED', 0, '', '', '', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1);
+CALL clear_transaction_tables();
+
+--echo #
+--echo # ========================================================================
+--echo # STEP 6 - IMPLICIT COMMIT (DDL, ETC)
+--echo # ========================================================================
+--echo # Transactions are implicitly ended by DDL statements, locking statements
+--echo # and server administration commands.
+--echo #
+--connection con1
+SET SESSION AUTOCOMMIT = 0;
+INSERT INTO t1 VALUES (601, 'IMPLICIT COMMIT');
+
+--echo #
+--echo ## Expect one active transaction in events_transactions_current, zero events in history
+--connection default
+CALL transaction_verifier(0, @con1_thread_id, 'transaction', 'ACTIVE', 0, '', '', '', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1);
+CALL transaction_verifier(1, @con1_thread_id, 'transaction', '', 0, '', '', '', '', '', '', 'NO', 0, 0, 0, 0);
+
+--connection con1
+INSERT INTO t1 VALUES (602, 'IMPLICIT COMMIT');
+
+--echo ## Issue a DDL statement to force a commmit
+CREATE TABLE t2 (s1 INT, s2 VARCHAR(64)) ENGINE=INNODB;
+
+--echo #
+--echo ## Expect 0 active transactions, 1 committed transaction
+--connection default
+CALL transaction_verifier(0, @con1_thread_id, 'transaction', 'ACTIVE', 0, '', '', '', '', 'READ WRITE', '', 'NO', 0, 0, 0, 0);
+CALL transaction_verifier(0, @con1_thread_id, 'transaction', 'COMMITTED', 0, '', '', '', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1);
+CALL transaction_verifier(1, @con1_thread_id, 'transaction', 'COMMITTED', 0, '', '', '', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1);
+CALL clear_transaction_tables();
+DROP TABLE test.t2;
+
+--echo #
+--echo # ========================================================================
+--echo # STEP 7 - XA TRANSACTIONS
+--echo # ========================================================================
+--echo #
+--echo # STEP 7.1 - XA START
+--echo #
+--connection con1
+XA START 'XA_CON1_GTRID_001', 'XA_CON1_BQUAL_001', 1234567890;
+
+--echo #
+--echo ## Expect 1 active XA transaction, state ACTIVE
+--connection default
+
+CALL transaction_verifier(0, @con1_thread_id, 'transaction', 'ACTIVE', 1234567890, 'XA_CON1_GTRID_001', 'XA_CON1_BQUAL_001', 'ACTIVE', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1);
+
+--echo #
+--echo # STEP 7.2 - XA END
+--echo #
+--connection con1
+INSERT INTO t1 VALUES (701, 'XA');
+XA END 'XA_CON1_GTRID_001', 'XA_CON1_BQUAL_001', 1234567890;
+
+--echo #
+--echo ## Expect 1 active XA transaction, state IDLE
+--connection default
+CALL transaction_verifier(0, @con1_thread_id, 'transaction', 'ACTIVE', 1234567890, 'XA_CON1_GTRID_001', 'XA_CON1_BQUAL_001', 'IDLE', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1);
+
+--echo #
+--echo #
+--echo # STEP 7.3 - XA PREPARE
+--echo #
+--connection con1
+XA PREPARE 'XA_CON1_GTRID_001', 'XA_CON1_BQUAL_001', 1234567890;
+
+--echo #
+--echo ## Expect 1 active XA transaction, state PREPARED
+--connection default
+CALL transaction_verifier(0, @con1_thread_id, 'transaction', 'ACTIVE', 1234567890, 'XA_CON1_GTRID_001', 'XA_CON1_BQUAL_001', 'PREPARED', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1);
+
+--echo #
+--echo #
+--echo # STEP 7.4 - XA COMMIT
+--echo #
+--connection con1
+XA COMMIT 'XA_CON1_GTRID_001', 'XA_CON1_BQUAL_001', 1234567890;
+
+--echo #
+--echo ## Expect 1 committed XA transaction, state COMMITTED in current and history
+--connection default
+CALL transaction_verifier(0, @con1_thread_id, 'transaction', 'COMMITTED', 1234567890, 'XA_CON1_GTRID_001', 'XA_CON1_BQUAL_001', 'COMMITTED', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1);
+CALL transaction_verifier(1, @con1_thread_id, 'transaction', 'COMMITTED', 1234567890, 'XA_CON1_GTRID_001', 'XA_CON1_BQUAL_001', 'COMMITTED', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1);
+
+CALL clear_transaction_tables();
+
+--echo #
+--echo #
+--echo # STEP 7.5 - XA ROLLBACK
+--echo #
+--connection con1
+XA START 'XA_CON1_002';
+INSERT INTO t1 VALUES (702, 'XA');
+XA END 'XA_CON1_002';
+XA PREPARE 'XA_CON1_002';
+
+--echo #
+--echo ## Expect 1 active XA transaction, state PREPARED
+--connection default
+CALL transaction_verifier(0, @con1_thread_id, 'transaction', 'ACTIVE', 0, 'XA_CON1_002', '', 'PREPARED', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1);
+
+--connection con1
+XA ROLLBACK 'XA_CON1_002';
+
+--echo #
+--echo ## Expect 1 XA transaction, state ROLLBACK ONLY in current and history
+--connection default
+CALL transaction_verifier(0, @con1_thread_id, 'transaction', 'ROLLED BACK', 0, 'XA_CON1_002', '', 'ROLLBACK ONLY', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1);
+CALL transaction_verifier(1, @con1_thread_id, 'transaction', 'ROLLED BACK', 0, 'XA_CON1_002', '', 'ROLLBACK ONLY', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1);
+CALL clear_transaction_tables();
+SELECT * FROM performance_schema.events_transactions_current ORDER BY event_id;
+
+--echo #
+--echo # STEP 7.6 - XA TRANSACTION - LONG GTRID AND BQUAL
+--echo #
+--connection con1
+XA START 'GTRID_6789012345678901234567890123456789012345678901234567890123','BQUAL_6789012345678901234567890123456789012345678901234567890123',1234567890;
+INSERT INTO t1 VALUES (703, 'XA LONG');
+XA END 'GTRID_6789012345678901234567890123456789012345678901234567890123','BQUAL_6789012345678901234567890123456789012345678901234567890123',1234567890;
+XA PREPARE 'GTRID_6789012345678901234567890123456789012345678901234567890123','BQUAL_6789012345678901234567890123456789012345678901234567890123',1234567890;
+XA COMMIT 'GTRID_6789012345678901234567890123456789012345678901234567890123','BQUAL_6789012345678901234567890123456789012345678901234567890123',1234567890;
+
+--echo #
+--echo ## Expect 1 committed XA transaction, state COMMITTED in current and history
+--connection default
+CALL transaction_verifier(0, @con1_thread_id, 'transaction', 'COMMITTED', 1234567890, 'GTRID_6789012345678901234567890123456789012345678901234567890123', 'BQUAL_6789012345678901234567890123456789012345678901234567890123', 'COMMITTED', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1);
+CALL transaction_verifier(1, @con1_thread_id, 'transaction', 'COMMITTED', 1234567890, 'GTRID_6789012345678901234567890123456789012345678901234567890123', 'BQUAL_6789012345678901234567890123456789012345678901234567890123', 'COMMITTED', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1);
+CALL clear_transaction_tables();
+
+--echo #
+--echo # STEP 7.7 - XA TRANSACTION - LONG GTRID AND BINARY BQUAL
+--echo #
+--connection con1
+XA START 'GTRID_6789012345678901234567890123456789012345678901234567890123',0x425155414C5FA5A53839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233,1234567890;
+INSERT INTO t1 VALUES (704, 'XA LONG/BINARY');
+XA END 'GTRID_6789012345678901234567890123456789012345678901234567890123',0x425155414C5FA5A53839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233,1234567890;
+XA PREPARE 'GTRID_6789012345678901234567890123456789012345678901234567890123',0x425155414C5FA5A53839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233,1234567890;
+XA COMMIT 'GTRID_6789012345678901234567890123456789012345678901234567890123',0x425155414C5FA5A53839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233,1234567890;
+--echo #
+--echo ## Expect 1 committed XA transaction, state COMMITTED in current and history
+--connection default
+CALL transaction_verifier(0, @con1_thread_id, 'transaction', 'COMMITTED', 1234567890, 'GTRID_6789012345678901234567890123456789012345678901234567890123', '0x425155414C5FA5A53839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233', 'COMMITTED', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1);
+CALL transaction_verifier(1, @con1_thread_id, 'transaction', 'COMMITTED', 1234567890, 'GTRID_6789012345678901234567890123456789012345678901234567890123', '0x425155414C5FA5A53839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233', 'COMMITTED', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1);
+CALL clear_transaction_tables();
+
+--echo #
+--echo # ========================================================================
+--echo # STEP 8 - TRANSACTIONAL AND NON-TRANSACTIONAL TABLES
+--echo # ========================================================================
+--echo #
+--echo ## MariaDB bug: MDEV-6012? MDEV-14436?
+set @mariadb_bug=1;
+
+## Statements that work with non-transactional engines have no effect on the
+## transaction state of the connection. For implicit transactions,
+## the transaction event begins with the first statement that uses a
+## transactional engine. This means that statements operating exclusively on
+## non-transactional tables will be ignored, even following START TRANSACTION.
+
+--connection con1
+SET SESSION AUTOCOMMIT = 0;
+SELECT * FROM performance_schema.events_transactions_current ORDER BY event_id;
+
+--echo #
+--echo #
+--echo # STEP 8.1 - UPDATE NON-TRANSACTIONAL TABLE
+--echo #
+INSERT INTO nt1 VALUES (801, 'NON-TRANSACTIONAL');
+
+--echo #
+--echo ## Expect 0 transactions in events_transactions_current
+--connection default
+CALL transaction_verifier(0, @con1_thread_id, 'transaction', '', 0, '', '', '', '', '', '', '', 0, 0, 0, @mariadb_bug);
+
+--connection con1
+COMMIT;
+
+--echo #
+--echo ## Expect 0 transactions in events_transactions_history
+--connection default
+CALL transaction_verifier(1, @con1_thread_id, 'transaction', '', 0, '', '', '', '', '', '', '', 0, 0, 0, @mariadb_bug);
+
+--echo #
+--echo #
+--echo # STEP 8.2 - UPDATE TRANSACTIONAL AND NON-TRANSACTIONAL TABLES
+--echo #
+--echo #
+--echo ## First non-transactional...
+--echo #
+--connection con1
+INSERT INTO nt1 VALUES (802, 'NON-TRANSACTIONAL');
+
+--echo #
+--echo ## Expect 0 transactions in events_transactions_current
+--connection default
+CALL transaction_verifier(0, @con1_thread_id, 'transaction', '', 0, '', '', '', '', '', '', '', 0, 0, 0, @mariadb_bug);
+
+--echo #
+--echo ## Now transactional. Transaction should be started.
+--connection con1
+INSERT INTO t1 VALUES (802, 'TRANSACTIONAL');
+
+--echo #
+--echo ## Expect 1 transaction in events_transactions_current
+--connection default
+CALL transaction_verifier(0, @con1_thread_id, 'transaction', 'ACTIVE', 0, '', '', '', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1);
+
+## Commit
+--echo #
+--connection con1
+COMMIT;
+
+--echo #
+--echo ## Expect 1 committed transaction in events_transactions_current and history
+--connection default
+CALL transaction_verifier(0, @con1_thread_id, 'transaction', 'COMMITTED', 0, '', '', '', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1);
+CALL transaction_verifier(1, @con1_thread_id, 'transaction', 'COMMITTED', 0, '', '', '', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1+@mariadb_bug);
+CALL clear_transaction_tables();
+
+--echo #
+--echo # ========================================================================
+--echo # STEP 9 - SAVEPOINTS
+--echo # ========================================================================
+--echo #
+--echo # STEP 9.1 - SAVEPOINT 1
+--echo #
+--connection con1
+START TRANSACTION;
+INSERT INTO t1 VALUES (901, 'SAVEPOINT');
+SAVEPOINT SVP001;
+
+--echo #
+--echo ## Expect 1 active transaction with 1 savepoint
+--connection default
+CALL transaction_verifier(0, @con1_thread_id, 'transaction', 'ACTIVE', 0, '', '', '', '', 'READ WRITE', '', 'NO', 1, 0, 0, 1);
+
+--echo #
+--echo #
+--echo # STEP 9.2 - SAVEPOINTS 2 and 3
+--echo #
+--connection con1
+INSERT INTO t1 VALUES (902, 'SAVEPOINT');
+SAVEPOINT SVP002;
+INSERT INTO t1 VALUES (903, 'SAVEPOINT');
+SAVEPOINT SVP003;
+INSERT INTO t1 VALUES (904, 'SAVEPOINT');
+SELECT COUNT(*) FROM t1 WHERE s1 > 900;
+
+--echo #
+--echo #
+--echo # STEP 9.3 - ROLLBACK TO SAVEPOINT 2
+--echo #
+--connection con1
+ROLLBACK TO SVP002;
+
+--echo #
+--echo ## Expect 1 active transaction with 3 savepoints, 1 rollback to savepoint
+--connection default
+CALL transaction_verifier(0, @con1_thread_id, 'transaction', 'ACTIVE', 0, '', '', '', '', 'READ WRITE', '', 'NO', 3, 1, 0, 1);
+
+--echo #
+--echo #
+--echo # STEP 9.4 - RELEASE SAVEPOINT 1
+--echo #
+--connection con1
+RELEASE SAVEPOINT SVP001;
+
+--echo #
+--echo ## Expect 1 active transaction with 3 savepoints, 1 rollback to savepoint, 1 release savepoint
+--connection default
+CALL transaction_verifier(0, @con1_thread_id, 'transaction', 'ACTIVE', 0, '', '', '', '', 'READ WRITE', '', 'NO', 3, 1, 1, 1);
+
+--echo #
+--echo # STEP 9.5 - COMMIT
+--echo #
+--connection con1
+COMMIT;
+
+--echo #
+--echo ## Expect 1 committed transaction with 3 savepoints, 1 rollback to savepoint, 1 release savepoint
+--connection default
+CALL transaction_verifier(1, @con1_thread_id, 'transaction', 'COMMITTED', 0, '', '', '', '', 'READ WRITE', '', 'NO', 3, 1, 1, 1);
+CALL clear_transaction_tables();
+
+--echo #
+--echo # ========================================================================
+--echo # STEP 10 - GTIDs
+--echo # ========================================================================
+--echo # GTIDs are tested in transaction_gtid.test.
+
+--echo #
+--echo # ========================================================================
+--echo # STEP 11 - MISCELLANY
+--echo # ========================================================================
+--echo #
+--echo # STEP 11.1 - TRUNCATE DURING ACTIVE TRANSACTION
+--echo #
+--echo #
+--echo # Verify that truncating events_transactions_current during an active transaction
+--echo # does not leave an orphaned transaction event, and that the row index to
+--echo # events_transactions_history is reset to 0.
+--echo #
+--connection con1
+START TRANSACTION;
+INSERT INTO t1 VALUES (1110, 'INSERT 1110');
+--connection default
+TRUNCATE performance_schema.events_transactions_current;
+--connection con1
+--echo #
+COMMIT;
+--echo #
+START TRANSACTION;
+INSERT INTO t1 VALUES (1111, 'INSERT 1111');
+COMMIT;
+
+--echo #
+--echo ## Expect 1 transaction for connection 1
+--connection default
+CALL transaction_verifier(1, @con1_thread_id, 'transaction', 'COMMITTED', 0, '', '', '', '', '', '', '', 0, 0, 0, 1);
+CALL clear_transaction_tables();
+
+--echo #
+--echo #
+--echo # STEP 11.2 - DISABLE THREAD INSTRUMENTATION
+--echo #
+--connection default
+UPDATE performance_schema.setup_consumers
+ SET enabled = 'NO'
+ WHERE name = 'thread_instrumentation';
+--echo #
+TRUNCATE performance_schema.events_transactions_summary_global_by_event_name;
+
+--connection con1
+--echo #
+START TRANSACTION;
+INSERT INTO t1 VALUES (1120, 'INSERT 1120');
+COMMIT;
+
+--connection default
+--echo #
+--echo ## Expect 1 event with non-zero summary stats
+--replace_column 3 sum_timer_wait 4 min_timer_wait 5 avg_timer_wait
+SELECT EVENT_NAME, COUNT_STAR, SUM_TIMER_WAIT, MIN_TIMER_WAIT, AVG_TIMER_WAIT, COUNT_READ_WRITE
+ FROM performance_schema.events_transactions_summary_global_by_event_name
+ WHERE count_star = 1 and sum_timer_wait != 0;
+
+--echo #
+--echo ## Disable timing stats for 'transaction'
+UPDATE performance_schema.setup_instruments SET timed = 'NO' WHERE name = 'transaction';
+--echo #
+TRUNCATE performance_schema.events_transactions_summary_global_by_event_name;
+
+--connection default
+--echo #
+START TRANSACTION;
+INSERT INTO t1 VALUES (1121, 'INSERT 1121');
+COMMIT;
+
+--connection default
+--echo #
+--echo ## Expect 1 event, 0 stats
+SELECT * FROM performance_schema.events_transactions_summary_global_by_event_name;
+
+--echo #
+--echo ## Restore setup_consumers and setup_instruments
+UPDATE performance_schema.setup_consumers SET enabled = 'YES' WHERE name = 'thread_instrumentation';
+UPDATE performance_schema.setup_instruments SET enabled = 'YES' WHERE name = 'transaction';
+--echo #
+DELETE FROM t1;
+CALL clear_history();
+
+--echo #
+--echo #
+--echo # STEP 11.3 - STATEMENT ROLLBACK - AUTOCOMMIT OFF - BINLOG FORMAT 'STATEMENT'
+--echo #
+--connection con1
+SET SESSION binlog_format = STATEMENT;
+SET SESSION AUTOCOMMIT = 0;
+
+# A transaction with a rolled back statement should not show as rolled back.
+#
+# Force a statement rollback by attempting to update a transactional table
+# and a non-replicatable table with binlog_format = STATEMENT.
+
+--echo #
+START TRANSACTION;
+INSERT INTO t1 VALUES (1130, 'INSERT 1130');
+--echo #
+--echo ## Expect binlog statement mode error
+--error 0, ER_BINLOG_STMT_MODE_AND_NO_REPL_TABLES
+UPDATE t1, performance_schema.setup_instruments pfs
+ SET t1.s1 = 1, pfs.timed = 'NO';
+--echo #
+COMMIT;
+--echo #
+SET SESSION AUTOCOMMIT = 1;
+
+--echo #
+--echo ## Expect 1 committed transaction
+--connection default
+CALL transaction_verifier(1, @con1_thread_id, 'transaction', 'COMMITTED', 0, '', '', '', '', '', '', 'NO', 0, 0, 0, 1);
+--echo #
+DELETE FROM t1;
+CALL clear_history();
+
+--echo #
+--echo #
+--echo # STEP 11.4 - STATEMENT ROLLBACK - AUTOCOMMIT ON - BINLOG FORMAT 'STATEMENT'
+--echo #
+--connection con1
+SET SESSION binlog_format = STATEMENT;
+SET SESSION AUTOCOMMIT = 1;
+
+# A rolled back autocommit statement should be recorded as a rolled back transaction
+#
+# Force a statement rollback by attempting to update a transactional table
+# and a non-replicatable table with binlog_format = STATEMENT.
+--echo #
+--echo ## Expect binlog statement mode error
+--error 0, ER_BINLOG_STMT_MODE_AND_NO_REPL_TABLES
+UPDATE t1, performance_schema.setup_instruments pfs
+ SET t1.s1 = 1, pfs.timed = 'NO';
+
+--echo #
+--echo ## Expect 1 rolled back transaction
+--connection default
+CALL transaction_verifier(1, @con1_thread_id, 'transaction', 'ROLLED BACK', 0, '', '', '', '', '', '', 'YES', 0, 0, 0, 1);
+CALL clear_history();
+
+--disable_parsing
+# TODO: Add wait timer
+--echo #
+--echo #
+--echo # STEP 11.5 - DROPPED CONNECTION DURING TRANSACTION
+--echo #
+--connection con2
+START TRANSACTION;
+INSERT INTO t1 VALUES (1150, 'DROP CONNECTION');
+--echo #
+--echo ## Expect 1 active transaction for connection 2
+--connection default
+CALL transaction_verifier(0, @con2_thread_id, 'transaction', 'ACTIVE', 0, '', '', '', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1);
+
+--echo #
+--echo ## Drop connection
+--connection con2
+--disconnect con2
+--source include/wait_until_disconnected.inc
+--connection default
+
+--echo #
+--echo ## Expect 0 transactions for connection 2
+CALL transaction_verifier(0, @con2_thread_id, '', '', 0, '', '', '', '', '', '', '', 0, 0, 0, 0);
+CALL transaction_verifier(1, @con2_thread_id, '', '', 0, '', '', '', '', '', '', '', 0, 0, 0, 0);
+CALL clear_transaction_tables();
+
+--enable_parsing
+
+--echo #
+--echo # ========================================================================
+--echo # CLEAN UP
+--echo # ========================================================================
+--echo #
+
+--disconnect con1
+##--disconnect con2
+
+--connection default
+DROP TABLE t1;
+DROP TABLE nt1;
+
+--source ../include/transaction_cleanup.inc
+set global binlog_format=default;
diff --git a/mysql-test/suite/perfschema/t/transaction_gtid.test b/mysql-test/suite/perfschema/t/transaction_gtid.test
new file mode 100644
index 00000000000..c97c042b943
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/transaction_gtid.test
@@ -0,0 +1,194 @@
+# ==== Purpose ====
+#
+# Verify that the GTID column of
+# performance_schema.events_transactions_current and
+# performance_schema.events_transactions_history has the correct
+# value, during different parts of the transaction life cycle.
+#
+# There are several cases:
+#
+# - When GTID_MODE=ON, a GTID of the form UUID:NUMBER is generated.
+# When GTID_MODE=OFF, transactions have the special GTID
+# "ANONYMOUS".
+#
+# - On a master, the GTID is generated during the transaction commit;
+# prior to that it is "AUTOMATIC". On a slave, the GTID is specified
+# (using SET GTID_NEXT) prior to executing the transaction.
+#
+# ==== Implementation ====
+#
+# Execute a transaction like:
+# BEGIN;
+# INSERT;
+# COMMIT;
+# On a different connection, check the GTID columns of the tables
+# between each statement.
+#
+# Transactions to be checked are executed on connection
+# 'default'. Auxiliary statements to read or truncate the tables are
+# executed on connection 'server_1'.
+#
+# Also execute a ROLLBACK transaction.
+#
+# Execute the transaction in these two cases:
+# - GTID_MODE=ON,
+# - GTID_MODE=OFF.
+#
+# Execute the transaction in these two cases:
+# - GTID_NEXT='UUID:NUMBER'/'ANONYMOUS' (when GTID_MODE=ON/OFF)
+# - GTID_NEXT='AUTOMATIC'.
+#
+# Due to implementation details, there is a window in time at the
+# beginning of the transaction when the GTID has not been copied from
+# the server to the performance_schema internal structures. During
+# this window, the GTID should be AUTOMATIC even if GTID_NEXT is set
+# to 'UUID:NUMBER' or 'ANONYMOUS'. To verify this, we use a debug
+# sync point during the execution of the BEGIN statement.
+#
+# ==== References ====
+#
+# WL#7592: GTIDS: generate Gtid_log_event and Previous_gtids_log_event always
+# - The current behavior was specified and the test was introduced in
+# this worklog.
+
+--source include/have_debug_sync.inc
+--source include/not_gtid_enabled.inc
+--let $rpl_topology= none
+--let $rpl_server_count= 1
+--source include/rpl_init.inc
+
+--echo # ==== Configure ====
+
+--connection default
+
+SET GLOBAL ENFORCE_GTID_CONSISTENCY = ON;
+
+--let $thread_id= `SELECT THREAD_ID FROM performance_schema.threads WHERE PROCESSLIST_ID = CONNECTION_ID()`
+--let $server_uuid= `SELECT @@GLOBAL.SERVER_UUID`
+
+CREATE TABLE t1 (a INT);
+
+# These are parameters to include/execute_at_sync_point.inc,
+# which will remain the same each time the script is invoked.
+--let $statement_connection= default
+--let $auxiliary_connection= server_1
+--let $auxiliary_file= suite/perfschema/include/show_transaction_gtid.inc
+--let $quiet= 1
+
+--echo # ==== Test ====
+
+--let $n= 1
+while ($n <= 4) {
+ if ($n == 1) {
+ --echo ---- Case 1: Specify ANONYMOUS prior to transaction ----
+ --let $gtid= ANONYMOUS
+ }
+ if ($n == 2) {
+ --echo ---- Case 2: Generate ANONYMOUS at commit ----
+ --let $gtid= AUTOMATIC
+ }
+ if ($n == 3) {
+ --let $rpl_gtid_mode= ON
+ --source include/rpl_set_gtid_mode.inc
+ --echo ---- Case 3: Specify GTID prior to transaction ----
+ --let $gtid= aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:1
+ }
+ if ($n == 4) {
+ --echo ---- Case 4: Generate GTID at commit ----
+ --let $gtid= AUTOMATIC
+ }
+
+ # Execute a transaction, show the GTID column of the tables
+ # after ROLLBACK.
+
+ --echo * BEGIN ... ROLLBACK
+ --source ../include/reset_transaction_gtid.inc
+
+ --source ../include/show_transaction_gtid.inc
+ eval SET SESSION GTID_NEXT = '$gtid';
+ BEGIN;
+ eval INSERT INTO t1 VALUES ($n);
+ ROLLBACK;
+ --source ../include/show_transaction_gtid.inc
+
+ # Same transaction as above, but with a commit. Show the GTID column
+ # of the tables between each statement, as well as in the middle of
+ # the BEGIN statement.
+
+ --echo * BEGIN ... COMMIT
+ --source ../include/reset_transaction_gtid.inc
+
+ --source ../include/show_transaction_gtid.inc
+ eval SET SESSION GTID_NEXT = '$gtid';
+ --source ../include/show_transaction_gtid.inc
+ --let $statement= BEGIN
+ --let $sync_point= after_set_transaction_psi_before_set_transaction_gtid
+ --source include/execute_at_sync_point.inc
+ --source ../include/show_transaction_gtid.inc
+ eval INSERT INTO t1 VALUES ($n);
+ --source ../include/show_transaction_gtid.inc
+ COMMIT;
+ --source ../include/show_transaction_gtid.inc
+
+ # A transaction executed with AUTOCOMMIT=OFF and no BEGIN. Show the
+ # GTID column between each statement, as well as in the middle of
+ # the first DML statement.
+
+ --echo * AUTOCOMMIT = OFF
+ SET @@SESSION.AUTOCOMMIT = 0;
+ --source ../include/reset_transaction_gtid.inc
+
+ --source ../include/show_transaction_gtid.inc
+ eval SET SESSION GTID_NEXT = '$gtid';
+ --source ../include/show_transaction_gtid.inc
+ --let $statement= INSERT INTO t1 VALUES ($n)
+ --let $sync_point= begin_decide_logging_format
+ --source include/execute_at_sync_point.inc
+ --source ../include/show_transaction_gtid.inc
+ COMMIT;
+ --source ../include/show_transaction_gtid.inc
+
+ # A single-statement transaction executed with AUTOCOMMIT=ON and no
+ # BEGIN. Show the GTID column before and after, as well as in the
+ # middle of the statement.
+
+ --echo * AUTOCOMMIT = ON
+ SET @@SESSION.AUTOCOMMIT = 1;
+ --source ../include/reset_transaction_gtid.inc
+
+ --source ../include/show_transaction_gtid.inc
+ eval SET SESSION GTID_NEXT = '$gtid';
+ --source ../include/show_transaction_gtid.inc
+ --let $statement= INSERT INTO t1 VALUES ($n)
+ --let $sync_point= begin_decide_logging_format
+ --source include/execute_at_sync_point.inc
+ --source ../include/show_transaction_gtid.inc
+
+ # Disabled because DDL is not inserted into the tables
+ if (0) {
+ # An implicitly committing statement (DDL), no BEGIN.
+ --echo * implicit commit (DDL)
+ --source ../include/reset_transaction_gtid.inc
+
+ --source ../include/show_transaction_gtid.inc
+ eval SET SESSION GTID_NEXT = '$gtid';
+ --source ../include/show_transaction_gtid.inc
+ --let $statement= CREATE TABLE t_$n (a INT)
+ --let $sync_point= begin_decide_logging_format
+ --source include/execute_at_sync_point.inc
+ --source ../include/show_transaction_gtid.inc
+ }
+
+ --inc $n
+}
+
+--echo # ==== Clean up ====
+
+DROP TABLE t1;
+# DROP TABLE t_1, t_2, t_3, t_4;
+
+--let $rpl_gtid_mode= OFF
+--source include/rpl_set_gtid_mode.inc
+SET GLOBAL ENFORCE_GTID_CONSISTENCY = OFF;
+
+--source include/rpl_end.inc
diff --git a/mysql-test/suite/perfschema/t/transaction_nested_events-master.opt b/mysql-test/suite/perfschema/t/transaction_nested_events-master.opt
new file mode 100644
index 00000000000..d68f0498edf
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/transaction_nested_events-master.opt
@@ -0,0 +1,19 @@
+--event-scheduler
+--query_cache_size=0
+--loose-performance_schema_events_statements_history_size=20
+--loose-performance_schema_events_statements_history_long_size=50
+--loose-performance_schema_events_transactions_history_long_size=50
+--loose-performance_schema_max_thread_instances=30
+
+--loose-performance-schema-consumer-events-stages-current=OFF
+--loose-performance-schema-consumer-events-stages-history=OFF
+--loose-performance-schema-consumer-events-stages-history-long=OFF
+--loose-performance-schema-consumer-events-statements-current=ON
+--loose-performance-schema-consumer-events-statements-history=ON
+--loose-performance-schema-consumer-events-statements-history-long=ON
+--loose-performance-schema-consumer-events-transactions-current=ON
+--loose-performance-schema-consumer-events-transactions-history=ON
+--loose-performance-schema-consumer-events-transactions-history-long=ON
+--loose-performance-schema-consumer-events-waits-current=OFF
+--loose-performance-schema-consumer-events-waits-history=OFF
+--loose-performance-schema-consumer-events-waits-history-long=OFF
diff --git a/mysql-test/suite/perfschema/t/transaction_nested_events.test b/mysql-test/suite/perfschema/t/transaction_nested_events.test
new file mode 100644
index 00000000000..1be7dc0f937
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/transaction_nested_events.test
@@ -0,0 +1,387 @@
+########## suite/perfschema/t/transaction_nested_events.test #########
+# #
+# This test checks the following #
+# 1) nested events #
+# 2) various scenarios of stored program & transaction combinations #
+# #
+# #
+######################################################################
+
+--source include/have_perfschema.inc
+--source include/not_embedded.inc
+--source include/have_innodb.inc
+--source include/no_protocol.inc
+--source include/maybe_pool_of_threads.inc
+
+--disable_query_log
+--source ../include/transaction_setup.inc
+--enable_query_log
+
+--echo #
+--echo #========================================================================
+--echo # STEP 1 - SETUP
+--echo #========================================================================
+
+--echo #
+--echo ## Setup control thread
+--echo #
+--connection default
+SET SESSION AUTOCOMMIT= 1;
+--disable_warnings
+USE test;
+DROP DATABASE IF EXISTS db;
+--enable_warnings
+--echo #
+--echo ## Create test database, test tables, one transactional and one non-transactional
+CREATE DATABASE db;
+CREATE TABLE db.t1 (s1 int, s2 varchar(64)) ENGINE=INNODB;
+CREATE TABLE db.nt1 (s1 int, s2 varchar(64)) ENGINE=MYISAM;
+
+--echo #
+--echo ## Setup connection 1
+connect(con1, localhost, root,,);
+USE db;
+SET SESSION AUTOCOMMIT = 1;
+eval $get_thread_id;
+let $con1_thread_id= `SELECT @my_thread_id`;
+
+--connection default
+--disable_query_log
+eval SET @con1_thread_id= $con1_thread_id;
+--enable_query_log
+
+--echo #
+--echo ## Disable events from the control (default) connection
+UPDATE performance_schema.threads SET instrumented = 'NO' WHERE processlist_id = CONNECTION_ID();
+
+# Use this to select events from all threads
+eval SET @all_threads= 0;
+
+--echo #
+--echo ## Enable only transaction and statement instruments
+UPDATE performance_schema.setup_instruments SET enabled='NO', timed='NO';
+UPDATE performance_schema.setup_instruments SET enabled='YES'
+ WHERE name LIKE ('statement/%') OR name = 'transaction';
+
+--echo #
+--echo ## Clear statement and transaction history
+CALL test.clear_history();
+
+--echo #
+--echo #========================================================================
+--echo # STEP 2 - BASIC TRANSACTION
+--echo #========================================================================
+--echo #
+--echo # STEP 2.1 - IMPLICIT
+--echo #
+--connection con1
+INSERT INTO t1 VALUES (210, "INSERT 210");
+INSERT INTO t1 VALUES (211, "INSERT 211");
+INSERT INTO t1 VALUES (212, "INSERT 212");
+UPDATE t1 SET s1 = s1 + 1 WHERE s1 = 212;
+
+## Verify and reset
+--source ../include/transaction_nested_events_verifier.inc
+
+--echo #
+--echo # STEP 2.2 - EXPLICIT
+--echo #
+--connection con1
+START TRANSACTION;
+INSERT INTO t1 VALUES (220, "INSERT 220"), (221, "INSERT 221");
+UPDATE t1 SET s2 = "UPDATE 221" WHERE s1 = 221;
+COMMIT;
+
+## Verify and reset
+--source ../include/transaction_nested_events_verifier.inc
+
+--echo #========================================================================
+--echo # STEP 3 - TRANSACTIONS AND STORED PROCEDURES
+--echo #========================================================================
+--echo #
+--echo # STEP 3.1 - STORED PROCEDURE STARTED WITHIN TRANSACTION
+--echo #
+--connection con1
+CREATE PROCEDURE tp_update() UPDATE t1 SET s1 = s1 + 1;
+--echo #
+START TRANSACTION;
+INSERT INTO t1 VALUES (310, "INSERT 310");
+INSERT INTO t1 VALUES (311, "INSERT 311");
+INSERT INTO t1 VALUES (312, "INSERT 312");
+INSERT INTO t1 VALUES (313, "INSERT 313");
+CALL tp_update();
+COMMIT;
+
+## Verify and reset
+--source ../include/transaction_nested_events_verifier.inc
+
+--echo #
+--echo # STEP 3.2 - TRANSACTION STARTED WITHIN STORED PROCEDURE
+--echo #
+--connection con1
+CREATE PROCEDURE tp_start() START TRANSACTION;
+--echo #
+CALL tp_start();
+INSERT INTO t1 VALUES (320, "INSERT 320"),(321, "INSERT 321");
+INSERT INTO t1 VALUES (322, "INSERT 322"),(323, "INSERT 323");
+UPDATE t1 SET s1 = s1 + 1 WHERE s1 > 320;
+--echo #
+SELECT * FROM t1 ORDER BY s1;
+COMMIT;
+
+## Verify and reset
+--source ../include/transaction_nested_events_verifier.inc
+
+--echo #
+--echo # STEP 3.3 - TRANSACTION ENDED WITHIN STORED PROCEDURE
+--echo #
+--connection con1
+CREATE PROCEDURE tp_rollback() ROLLBACK;
+CREATE PROCEDURE tp_commit() COMMIT;
+
+--echo #
+--echo ## COMMIT within stored procedure
+START TRANSACTION;
+INSERT INTO t1 VALUES (330, "INSERT 330"),(331, "INSERT 331");
+INSERT INTO t1 VALUES (332, "INSERT 332"),(333, "INSERT 333");
+DELETE FROM t1 WHERE s1 > 331;
+CALL tp_commit();
+--echo #
+SELECT * FROM t1 ORDER BY s1;
+
+--echo #
+--echo ## ROLLBACK within stored procedure
+START TRANSACTION;
+UPDATE t1 SET s1 = s1*2 WHERE s1 > 331;
+CALL tp_rollback();
+--echo #
+SELECT * FROM t1 ORDER BY s1;
+
+## Verify and reset
+--source ../include/transaction_nested_events_verifier.inc
+
+--echo #========================================================================
+--echo # STEP 4 - TRANSACTIONS AND STORED FUNCTIONS
+--echo #========================================================================
+--echo #
+--echo #
+--echo # STEP 4.1 - FUNCTION WITHIN A TRANSACTION
+--echo #
+--connection con1
+DELIMITER |;
+CREATE FUNCTION fn_add(x INT, y INT) RETURNS INT
+BEGIN
+ INSERT INTO t1 VALUES (x, "INSERT x"),(y, "INSERT y");
+RETURN x+y;
+END |
+DELIMITER ;|
+
+--echo #
+--echo ## Clear history
+--connection default
+CALL test.clear_history();
+--connection con1
+
+--echo #
+START TRANSACTION;
+INSERT INTO t1 VALUES (410, "INSERT 410");
+INSERT INTO t1 VALUES (411, "INSERT 411");
+INSERT INTO t1 VALUES (412, "INSERT 412");
+DELETE FROM t1 WHERE s1 > 410;
+--echo #
+SELECT * FROM t1 ORDER BY s1;
+--echo #
+SELECT fn_add(413, 414);
+COMMIT;
+--echo #
+SELECT * FROM t1 ORDER BY s1;
+
+## Verify and reset
+--source ../include/transaction_nested_events_verifier.inc
+
+--connection con1
+--echo #
+--echo ## Again, but this time with a rollback
+--echo #
+START TRANSACTION;
+SELECT fn_add(415, 416);
+--echo #
+ROLLBACK;
+--echo #
+SELECT * FROM t1 ORDER BY s1;
+
+## Verify and reset
+--source ../include/transaction_nested_events_verifier.inc
+
+--echo #
+--echo # STEP 4.2 - TRANSACTION CANNOT BE STARTED OR ENDED WITHIN FUNCTION
+--echo #
+--connection con1
+DELIMITER |;
+--error ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG
+CREATE FUNCTION fn_err1() RETURNS VARCHAR(10) BEGIN START TRANSACTION ; RETURN 'invalid' ; END|
+DELIMITER ;|
+
+--echo #
+--echo ## Expect 0 transactions
+--connection default
+SELECT COUNT(*) FROM performance_schema.events_transactions_history;
+--connection con1
+
+--echo #
+--echo ## Expect stored function does not exist
+--echo #
+--error ER_SP_DOES_NOT_EXIST
+SELECT fn_err1();
+
+--echo #
+--echo ## Expect 1 transactions
+--connection default
+SELECT COUNT(*) FROM performance_schema.events_transactions_history;
+--connection con1
+
+--echo #
+DELIMITER |;
+--error ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG
+CREATE FUNCTION fn_err2() RETURNS VARCHAR(10) BEGIN COMMIT; RETURN 'invalid' ; END|
+DELIMITER ;|
+
+--echo #
+--echo ## Expect stored function does not exist
+--echo #
+START TRANSACTION;
+DELETE FROM t1 WHERE s1 > 320;
+--error ER_SP_DOES_NOT_EXIST
+SELECT fn_err2();
+
+--echo #
+--echo ## Expect 2 transactions
+--connection default
+SELECT COUNT(*) FROM performance_schema.events_transactions_history;
+
+--echo #
+--echo ## Clear transaction and statement tables
+CALL test.clear_history();
+
+--echo #========================================================================
+--echo # STEP 5 - TRANSACTIONS AND TRIGGERS
+--echo #========================================================================
+--echo #
+--echo #
+--echo # STEP 5.1 - FORCE STATEMENT ROLLBACK FROM TRIGGER
+--echo #
+--connection con1
+--echo ## Create a trigger to force statement rollback
+--echo #
+DELIMITER |;
+CREATE TRIGGER trigger_before_update BEFORE UPDATE ON t1
+FOR EACH ROW
+BEGIN
+ IF OLD.s1 >= 505 THEN
+ SIGNAL sqlstate '45001' SET message_text = "FORCE ERROR";
+ END IF;
+END;|
+DELIMITER ;|
+
+--echo #
+--echo ## Clear history
+--connection default
+CALL test.clear_history();
+--connection con1
+
+--echo #
+--echo ## Insert multiple rows, then update. Trigger will force rollback the
+--echo ## UPDATE statement, but the transaction should not roll back.
+--echo #
+START TRANSACTION;
+INSERT INTO t1 VALUES (500, "INSERT 500");
+INSERT INTO t1 VALUES (501, "INSERT 501");
+INSERT INTO t1 VALUES (502, "INSERT 502");
+INSERT INTO t1 VALUES (503, "INSERT 503");
+INSERT INTO t1 VALUES (504, "INSERT 504");
+INSERT INTO t1 VALUES (505, "INSERT 505");
+--echo #
+SELECT * FROM t1 ORDER BY s1;
+--echo #
+--echo ## Expect error when UPDATE hits record 505
+--echo #
+--error ER_SIGNAL_EXCEPTION
+UPDATE t1 SET s1 = s1 * 2 WHERE s1 >= 500;
+--echo #
+--echo ## Verify that INSERT succeeded, UPDATE failed and transaction did not rollback
+--echo #
+SELECT * FROM t1 ORDER BY s1;
+COMMIT;
+--echo #
+DROP TRIGGER trigger_before_update;
+
+## Verify and reset
+--source ../include/transaction_nested_events_verifier.inc
+
+--echo # TODO: Detect statement events from scheduled event
+--disable_parsing
+--echo #========================================================================
+--echo # STEP 6 - SCHEDULED EVENTS
+--echo #========================================================================
+--connection con1
+
+# Check that the event_scheduler is really running
+#--source include/running_event_scheduler.inc
+
+--echo #
+--echo ## Create a one-time event that will insert, update, commit and rollback.
+--echo #
+DELIMITER |;
+CREATE EVENT trx_event ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 5 SECOND DO
+BEGIN
+ START TRANSACTION;
+ INSERT INTO t1 VALUES (600, "INSERT 600");
+ INSERT INTO t1 VALUES (601, "INSERT 601");
+ INSERT INTO t1 VALUES (602, "INSERT 602");
+ COMMIT;
+ START TRANSACTION;
+ UPDATE t1 SET s1 = s1 + 1, s2 = 'THIS SHOULD NOT BE HERE';
+ ROLLBACK;
+ START TRANSACTION;
+ INSERT INTO t1 VALUES (699, "INSERT 699");
+ COMMIT;
+END;|
+DELIMITER ;|
+
+--echo #
+--echo ## Clear history
+--connection default
+CALL test.clear_history();
+--connection con1
+--echo #
+--echo ## Wait a few seconds for scheduled event to execute and finish.
+# Check based on the expected content in t1.
+let $wait_condition= SELECT COUNT(*) = 4 FROM t1;
+--source include/wait_condition.inc
+--echo #
+--echo ## Confirm that the scheduled event completed and the content of t1 is right.
+--echo #
+SELECT * FROM t1 ORDER BY s1;
+--echo #
+--echo ## Verify and reset
+--echo #
+eval SET @all_threads= 1;
+--source ../include/transaction_nested_events_verifier.inc
+eval SET @all_threads= 0;
+
+--enable_parsing
+
+--echo #=======================================================================
+--echo # Cleanup
+--echo #=======================================================================
+--connection con1
+--disconnect con1
+--source include/wait_until_disconnected.inc
+--connection default
+DROP DATABASE db;
+UPDATE performance_schema.setup_instruments SET enabled='YES', timed='YES';
+
+--source ../include/transaction_cleanup.inc
+
+
+
diff --git a/mysql-test/suite/perfschema/t/user_var_func.test b/mysql-test/suite/perfschema/t/user_var_func.test
new file mode 100644
index 00000000000..3c9ea4f3cf3
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/user_var_func.test
@@ -0,0 +1,101 @@
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+set @v1a="Hello";
+set @v2a="World";
+set @v3a=65;
+set @v4a=NULL;
+
+select @v1a, @v2a, @v3a, @v4a, @v_unknown;
+
+select VARIABLE_NAME, VARIABLE_VALUE
+ from performance_schema.user_variables_by_thread
+ order by VARIABLE_NAME;
+
+connect(con1, localhost, root,,);
+
+set @v1b="Salut";
+set @v2b="La compagnie";
+set @v3b=12;
+set @v4b=NULL;
+
+select @v1b, @v2b, @v3b, @v4b, @v_unknown;
+
+select VARIABLE_NAME, VARIABLE_VALUE
+ from performance_schema.user_variables_by_thread
+ order by VARIABLE_NAME;
+
+--connection default
+--disconnect con1
+
+# Wait till all disconnects are completed
+let $count_sessions= 1;
+--source include/wait_until_count_sessions.inc
+
+select VARIABLE_NAME, VARIABLE_VALUE
+ from performance_schema.user_variables_by_thread
+ order by VARIABLE_NAME;
+
+# Make sure large values are not truncated
+set @blob_under_16_bits=repeat("a", 65000);
+set @blob_under_24_bits=repeat("a", 1000000);
+
+# Not testable because of limitation on max_allowed_packet
+# set @blob_under_32_bits=repeat("a", 20000000);
+
+select length(@blob_under_16_bits);
+select length(@blob_under_24_bits);
+# select length(@blob_under_32_bits);
+
+select variable_name, length(variable_value)
+ from performance_schema.user_variables_by_thread
+ where VARIABLE_NAME like "blob%"
+ order by VARIABLE_NAME;
+
+
+# Check the behaviour with procedures if the values passed inside procedures gets reflected in the table performance_schema.user_variables_by_thread.
+
+set @a=10;
+
+DELIMITER |;
+CREATE procedure test_user_val
+(IN input INT,OUT output INT)
+BEGIN
+ SELECT input + input
+ INTO output;
+END|
+DELIMITER ;|
+
+CALL test_user_val(@a , @total);
+select VARIABLE_NAME,VARIABLE_VALUE from performance_schema.user_variables_by_thread
+where variable_name in ('a','total') order by VARIABLE_NAME;
+
+
+# Checking behaviour around triggers if the values in performance_schema.user_variables_by_thread are updated from within trigger
+
+create table t1 (c1 int);
+
+DELIMITER |;
+CREATE TRIGGER test_uvar_trigger
+ AFTER INSERT ON t1
+ FOR EACH ROW BEGIN
+ set @a=@a+@a;
+END|
+DELIMITER ;|
+
+insert into t1 values(1);
+select VARIABLE_NAME,VARIABLE_VALUE from performance_schema.user_variables_by_thread
+where variable_name ='a' order by VARIABLE_NAME;
+
+insert into t1 values(1);
+select VARIABLE_NAME,VARIABLE_VALUE from performance_schema.user_variables_by_thread
+where variable_name ='a' order by VARIABLE_NAME;
+
+drop table t1;
+drop procedure test_user_val;
+#drop TRIGGER test_uvar_trigger;
+
+
+
+
diff --git a/mysql-test/suite/perfschema/t/view_table_io.test b/mysql-test/suite/perfschema/t/view_table_io.test
index 703f5414ba4..f5b017dc8ad 100644
--- a/mysql-test/suite/perfschema/t/view_table_io.test
+++ b/mysql-test/suite/perfschema/t/view_table_io.test
@@ -3,6 +3,9 @@
# base table used within the view shows up whereas
# the view itself never shows up.
+## To skip the test with QC enabled till BUG#14830950 is fixed.
+#-- source include/have_QC_Disabled.inc
+
--source include/not_embedded.inc
--source include/have_perfschema.inc
--source ../include/table_io_setup_helper.inc
diff --git a/mysql-test/suite/perfschema_stress/t/modify.test b/mysql-test/suite/perfschema_stress/t/modify.test
index f89b72f49bd..ee0ce0f30ef 100644
--- a/mysql-test/suite/perfschema_stress/t/modify.test
+++ b/mysql-test/suite/perfschema_stress/t/modify.test
@@ -1,3 +1,8 @@
+# The include statement below is a temp one for tests that are yet to
+#be ported to run with InnoDB,
+#but needs to be kept for tests that would need MyISAM in future.
+--source include/force_myisam_default.inc
+
--source include/not_embedded.inc
--source suite/perfschema_stress/include/settings.inc
diff --git a/mysql-test/suite/perfschema_stress/t/read.test b/mysql-test/suite/perfschema_stress/t/read.test
index 829c03985ed..c963adeb604 100644
--- a/mysql-test/suite/perfschema_stress/t/read.test
+++ b/mysql-test/suite/perfschema_stress/t/read.test
@@ -1,3 +1,8 @@
+# The include statement below is a temp one for tests that are yet to
+#be ported to run with InnoDB,
+#but needs to be kept for tests that would need MyISAM in future.
+--source include/force_myisam_default.inc
+
--source include/not_embedded.inc
--source include/have_perfschema.inc
diff --git a/mysql-test/suite/perfschema_stress/t/setup.test b/mysql-test/suite/perfschema_stress/t/setup.test
index 15247862e26..4e0828fafbf 100644
--- a/mysql-test/suite/perfschema_stress/t/setup.test
+++ b/mysql-test/suite/perfschema_stress/t/setup.test
@@ -1,3 +1,8 @@
+# The include statement below is a temp one for tests that are yet to
+#be ported to run with InnoDB,
+#but needs to be kept for tests that would need MyISAM in future.
+--source include/force_myisam_default.inc
+
if (`SELECT VERSION() LIKE '%embedded%'`)
{
--skip This test cannot run with the embedded server.
diff --git a/mysql-test/suite/perfschema_stress/t/work.test b/mysql-test/suite/perfschema_stress/t/work.test
index 17ddb411c7c..d3d9593b95d 100644
--- a/mysql-test/suite/perfschema_stress/t/work.test
+++ b/mysql-test/suite/perfschema_stress/t/work.test
@@ -1,3 +1,8 @@
+# The include statement below is a temp one for tests that are yet to
+#be ported to run with InnoDB,
+#but needs to be kept for tests that would need MyISAM in future.
+--source include/force_myisam_default.inc
+
--source include/not_embedded.inc
--source suite/perfschema_stress/include/settings.inc
diff --git a/mysql-test/suite/period/engines.combinations b/mysql-test/suite/period/engines.combinations
index b740ec62a42..62bf838de6c 100644
--- a/mysql-test/suite/period/engines.combinations
+++ b/mysql-test/suite/period/engines.combinations
@@ -3,4 +3,5 @@ innodb
default-storage-engine=innodb
[myisam]
+innodb
default-storage-engine=myisam
diff --git a/mysql-test/suite/period/r/alter.result b/mysql-test/suite/period/r/alter.result
index a6466c8944b..7b9d1fea861 100644
--- a/mysql-test/suite/period/r/alter.result
+++ b/mysql-test/suite/period/r/alter.result
@@ -190,3 +190,21 @@ alter table t1 add primary key(x, s, e);
ERROR 23000: Duplicate entry '1-2020-03-01-2020-03-02' for key 'PRIMARY'
alter table t1 add system versioning;
drop table t1;
+#
+# MDEV-21941 RENAME doesn't work for system time or period fields
+#
+create or replace table t1 (
+a int, s date, e date,
+period for mytime(s, e));
+alter table t1 rename column s to x;
+alter table t1 rename column e to y;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `x` date NOT NULL,
+ `y` date NOT NULL,
+ PERIOD FOR `mytime` (`x`, `y`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+drop table t1;
+# End of 10.5 tests
diff --git a/mysql-test/suite/period/r/create.result b/mysql-test/suite/period/r/create.result
index da4cf998918..69d7e918804 100644
--- a/mysql-test/suite/period/r/create.result
+++ b/mysql-test/suite/period/r/create.result
@@ -7,8 +7,8 @@ t CREATE TABLE `t` (
`id` int(11) NOT NULL,
`s` date NOT NULL,
`e` date NOT NULL,
- PRIMARY KEY (`id`),
- PERIOD FOR `mytime` (`s`, `e`)
+ PERIOD FOR `mytime` (`s`, `e`),
+ PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
create or replace table t (id int primary key, s timestamp(6), e timestamp(6),
period for mytime(s,e));
@@ -18,8 +18,8 @@ t CREATE TABLE `t` (
`id` int(11) NOT NULL,
`s` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000',
`e` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000',
- PRIMARY KEY (`id`),
- PERIOD FOR `mytime` (`s`, `e`)
+ PERIOD FOR `mytime` (`s`, `e`),
+ PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
# SQL16, Part 2, 11.3 <table definition>, Syntax Rules, 2)a)
# 2) If a <table period definition> TPD is specified, then:
diff --git a/mysql-test/suite/period/r/delete.result b/mysql-test/suite/period/r/delete.result
index a58f57761b6..1954c0fdf81 100644
--- a/mysql-test/suite/period/r/delete.result
+++ b/mysql-test/suite/period/r/delete.result
@@ -388,3 +388,8 @@ ERROR 22003: Out of range value for column 'f' at row ROW
delete ignore from t
for portion of app from '2015-07-07 00:00:00' to '2020-03-11 08:48:52';
drop table t;
+create table t1 (pk int, s date, e date, period for se (s,e), primary key (pk,se without overlaps));
+insert into t1 values (1,'2020-01-01','2020-02-20');
+delete from t1 for portion of se from '2020-01-30' to '2020-01-31';
+drop table t1;
+# End of 10.5 tests
diff --git a/mysql-test/suite/period/r/long_unique.result b/mysql-test/suite/period/r/long_unique.result
new file mode 100644
index 00000000000..5c5f4297fb9
--- /dev/null
+++ b/mysql-test/suite/period/r/long_unique.result
@@ -0,0 +1,17 @@
+#
+# Assertion `inited == NONE || update_handler != this' failed in
+# handler::ha_write_row
+#
+CREATE TABLE t1 (f VARCHAR(4096), s DATE, e DATE, PERIOD FOR app(s,e), UNIQUE(f)) ENGINE=MyISAM;
+INSERT INTO t1 VALUES ('foo', '2023-08-30', '2025-07-09'),('bar', '2021-01-01', '2021-12-31');
+DELETE FROM t1 FOR PORTION OF app FROM '2023-08-29' TO '2025-07-01';
+DROP TABLE t1;
+#
+# MDEV-21819 Assertion `inited == NONE || update_handler != this'
+# failed in handler::ha_write_row
+#
+CREATE OR REPLACE TABLE t1 (a INT, b BLOB, s DATE, e DATE, PERIOD FOR app(s,e), UNIQUE(b)) ENGINE=MyISAM PARTITION BY HASH(a) PARTITIONS 2;
+INSERT INTO t1 VALUES (1,'foo','2022-01-01', '2025-01-01');
+DELETE FROM t1 FOR PORTION OF app FROM '2023-01-01' TO '2024-01-01';
+ERROR 23000: Duplicate entry 'foo' for key 'b'
+DROP TABLE t1;
diff --git a/mysql-test/suite/period/r/overlaps.result b/mysql-test/suite/period/r/overlaps.result
new file mode 100644
index 00000000000..b8f23ce413c
--- /dev/null
+++ b/mysql-test/suite/period/r/overlaps.result
@@ -0,0 +1,353 @@
+create or replace table t(id int, s date, e date,
+period for p(s,e),
+primary key(id, p without overlaps)
+) partition by key (id);
+show create table t;
+Table Create Table
+t CREATE TABLE `t` (
+ `id` int(11) NOT NULL,
+ `s` date NOT NULL,
+ `e` date NOT NULL,
+ PERIOD FOR `p` (`s`, `e`),
+ PRIMARY KEY (`id`,`p` WITHOUT OVERLAPS)
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
+ PARTITION BY KEY (`id`)
+insert into t values (1, '2003-01-01', '2003-03-01'),
+(1, '2003-05-01', '2003-07-01');
+insert into t values (1, '2003-02-01', '2003-04-01');
+ERROR 23000: Duplicate entry '1-2003-04-01-2003-02-01' for key 'PRIMARY'
+insert into t values (1, '2003-04-01', '2003-06-01');
+ERROR 23000: Duplicate entry '1-2003-06-01-2003-04-01' for key 'PRIMARY'
+insert into t values (1, '2003-05-15', '2003-06-15');
+ERROR 23000: Duplicate entry '1-2003-06-15-2003-05-15' for key 'PRIMARY'
+insert into t values (1, '2003-04-01', '2003-08-01');
+ERROR 23000: Duplicate entry '1-2003-08-01-2003-04-01' for key 'PRIMARY'
+insert into t values (1, '2003-03-01', '2003-05-01');
+# expand/shrink period
+update t set s= '2002-12-01' where s = '2003-01-01';
+update t set s= '2003-01-01' where s = '2002-12-01';
+update t set e= '2003-08-01' where s = '2003-05-01';
+update t set e= '2003-07-01' where s = '2003-05-01';
+# move left/right
+update t set s= '2002-12-15', e= '2003-01-15' where s = '2003-01-01';
+update t set s= '2003-01-01', e= '2003-02-01' where s = '2002-12-15';
+# diminish/enlarge
+update t set s= '2003-01-10', e= '2003-01-20' where s = '2003-01-01';
+update t set s= '2003-01-01', e= '2003-02-01' where s = '2003-01-10';
+select * from t;
+id s e
+1 2003-01-01 2003-02-01
+1 2003-03-01 2003-05-01
+1 2003-05-01 2003-07-01
+# intersect left/right, strict inclusion/containment
+update t set e= '2003-04-01' where s = '2003-01-01';
+ERROR 23000: Duplicate entry '1-2003-04-01-2003-01-01' for key 'PRIMARY'
+update t set s= '2003-04-01' where s = '2003-05-01';
+ERROR 23000: Duplicate entry '1-2003-07-01-2003-04-01' for key 'PRIMARY'
+update t set s= '2003-03-10', e= '2003-03-20' where s = '2003-01-01';
+ERROR 23000: Duplicate entry '1-2003-03-20-2003-03-10' for key 'PRIMARY'
+update t set s= '2003-04-01', e= '2003-08-01' where s = '2003-03-01';
+ERROR 23000: Duplicate entry '1-2003-08-01-2003-04-01' for key 'PRIMARY'
+# inclusion/containment with partial match
+update t set s= '2003-03-01', e= '2003-04-01' where s = '2003-01-01';
+ERROR 23000: Duplicate entry '1-2003-04-01-2003-03-01' for key 'PRIMARY'
+update t set s= '2003-04-01', e= '2003-05-01' where s = '2003-01-01';
+ERROR 23000: Duplicate entry '1-2003-05-01-2003-04-01' for key 'PRIMARY'
+update t set s= '2003-03-01' where s = '2003-05-01';
+ERROR 23000: Duplicate entry '1-2003-07-01-2003-03-01' for key 'PRIMARY'
+update t set e= '2003-05-01' where s = '2003-01-01';
+ERROR 23000: Duplicate entry '1-2003-05-01-2003-01-01' for key 'PRIMARY'
+select * from t where year(s) = 2003;
+id s e
+1 2003-01-01 2003-02-01
+1 2003-03-01 2003-05-01
+1 2003-05-01 2003-07-01
+# UPDATE ... FOR PORTION test
+insert t values (2, '2003-04-15', '2003-05-01');
+update t for portion of p from '2003-01-01' to '2003-01-15'
+ set id= 2;
+select * from t;
+id s e
+1 2003-01-15 2003-02-01
+1 2003-03-01 2003-05-01
+1 2003-05-01 2003-07-01
+2 2003-01-01 2003-01-15
+2 2003-04-15 2003-05-01
+update t for portion of p from '2003-01-15' to '2003-02-01'
+ set id= 2;
+select * from t;
+id s e
+1 2003-03-01 2003-05-01
+1 2003-05-01 2003-07-01
+2 2003-01-01 2003-01-15
+2 2003-01-15 2003-02-01
+2 2003-04-15 2003-05-01
+# Next, test UPDATE ... FOR PORTION resulting with an error
+# Since MyISAM/Aria engines lack atomicity, the results would differ with
+# innodb. So a table is going to be copied to one with explicit engine.
+create table t_myisam (id int, s date, e date,
+period for p(s,e),
+primary key(id, p without overlaps))
+engine=myisam
+select * from t;
+update t_myisam for portion of p from '2003-04-01' to '2003-06-01'
+ set id= 2 order by s desc;
+ERROR 23000: Duplicate entry '2-2003-05-01-2003-04-01' for key 'PRIMARY'
+select * from t_myisam;
+id s e
+1 2003-03-01 2003-05-01
+1 2003-06-01 2003-07-01
+2 2003-01-01 2003-01-15
+2 2003-01-15 2003-02-01
+2 2003-04-15 2003-05-01
+2 2003-05-01 2003-06-01
+create table t_innodb (id int, s date, e date,
+period for p(s,e),
+primary key(id, p without overlaps))
+engine=innodb
+select * from t;
+update t_innodb for portion of p from '2003-04-01' to '2003-06-01'
+ set id= 2 order by s desc;
+ERROR 23000: Duplicate entry '2-2003-05-01-2003-04-01' for key 'PRIMARY'
+select * from t_innodb;
+id s e
+1 2003-03-01 2003-05-01
+1 2003-05-01 2003-07-01
+2 2003-01-01 2003-01-15
+2 2003-01-15 2003-02-01
+2 2003-04-15 2003-05-01
+drop table t_myisam, t_innodb;
+create or replace table t(id int, s date, e date,
+period for p(s,e),
+primary key(id, q without overlaps));
+ERROR HY000: Period `q` is not found in table
+create or replace table t(id int, s date, e date,
+primary key(id, p without overlaps));
+ERROR HY000: Period `p` is not found in table
+create or replace table t(id int, s date, e date,
+period for p(s,e),
+primary key(id, s, p without overlaps));
+ERROR HY000: Key `PRIMARY` cannot explicitly include column `s`
+create or replace table t(id int, s date, e date,
+period for p(s,e),
+primary key(id));
+insert into t values (1, '2003-03-01', '2003-05-01');
+insert into t values (1, '2003-04-01', '2003-05-01');
+ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
+create or replace table t(id int, u int, s date, e date,
+period for p(s,e),
+primary key(id, p without overlaps),
+unique(u));
+show create table t;
+Table Create Table
+t CREATE TABLE `t` (
+ `id` int(11) NOT NULL,
+ `u` int(11) DEFAULT NULL,
+ `s` date NOT NULL,
+ `e` date NOT NULL,
+ PERIOD FOR `p` (`s`, `e`),
+ PRIMARY KEY (`id`,`p` WITHOUT OVERLAPS),
+ UNIQUE KEY `u` (`u`)
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
+insert into t values (1, 1, '2003-03-01', '2003-05-01');
+insert into t values (1, 2, '2003-05-01', '2003-07-01');
+insert into t values (1, 3, '2003-04-01', '2003-05-01');
+ERROR 23000: Duplicate entry '1-2003-05-01-2003-04-01' for key 'PRIMARY'
+create or replace table t(id int, u int, s date, e date,
+period for p(s,e),
+primary key(id, p without overlaps),
+unique(u, p without overlaps));
+show create table t;
+Table Create Table
+t CREATE TABLE `t` (
+ `id` int(11) NOT NULL,
+ `u` int(11) DEFAULT NULL,
+ `s` date NOT NULL,
+ `e` date NOT NULL,
+ PERIOD FOR `p` (`s`, `e`),
+ PRIMARY KEY (`id`,`p` WITHOUT OVERLAPS),
+ UNIQUE KEY `u` (`u`,`p` WITHOUT OVERLAPS)
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
+insert into t values (2, NULL, '2003-03-01', '2003-05-01');
+insert into t values (2, NULL, '2003-03-01', '2003-05-01');
+ERROR 23000: Duplicate entry '2-2003-05-01-2003-03-01' for key 'PRIMARY'
+insert into t values (3, NULL, '2003-03-01', '2003-05-01');
+insert into t values (1, 1, '2003-03-01', '2003-05-01');
+insert into t values (1, 2, '2003-05-01', '2003-07-01');
+insert into t values (4, NULL, '2003-03-01', '2003-05-01');
+create sequence seq start=5 engine=myisam;
+update t set id= nextval(seq), u= nextval(seq), s='2003-05-01', e='2003-07-01'
+ where u is NULL;
+select * from t;
+id u s e
+1 1 2003-03-01 2003-05-01
+1 2 2003-05-01 2003-07-01
+5 6 2003-05-01 2003-07-01
+7 8 2003-05-01 2003-07-01
+9 10 2003-05-01 2003-07-01
+drop sequence seq;
+create or replace table t(id int, s date, e date,
+period for p(s,e));
+insert into t values (1, '2003-01-01', '2003-03-01'),
+(1, '2003-05-01', '2003-07-01'),
+(1, '2003-02-01', '2003-04-01');
+alter table t add primary key(id, p without overlaps);
+ERROR 23000: Duplicate entry '1-2003-04-01-2003-02-01' for key 'PRIMARY'
+# Historical rows are not checked against constraints
+set @@system_versioning_alter_history= keep;
+alter table t add system versioning;
+delete from t;
+alter table t add primary key(id, p without overlaps);
+insert into t values (1, '2003-01-01', '2003-03-01'),
+(1, '2003-03-01', '2003-05-01');
+# `without overlaps` is not lost on alter table
+alter table t add y int;
+show create table t;
+Table Create Table
+t CREATE TABLE `t` (
+ `id` int(11) NOT NULL,
+ `s` date NOT NULL,
+ `e` date NOT NULL,
+ `y` int(11) DEFAULT NULL,
+ PERIOD FOR `p` (`s`, `e`),
+ PRIMARY KEY (`id`,`p` WITHOUT OVERLAPS)
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
+alter table t drop y;
+create or replace table t1 like t;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `id` int(11) NOT NULL,
+ `s` date NOT NULL,
+ `e` date NOT NULL,
+ PERIOD FOR `p` (`s`, `e`),
+ PRIMARY KEY (`id`,`p` WITHOUT OVERLAPS)
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
+create or replace table t1 (x int, s date, e date,
+period for p(s,e),
+primary key(x, p without overlaps));
+alter table t1 partition by key (x);
+create or replace table t1 (x int, s date, e date, period for p (s, e))
+partition by hash (x);
+alter table t1 add primary key (x, p without overlaps);
+create or replace table t2 (x int, s date, e date,
+period for p (s, e),
+key(x, p without overlaps));
+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 'without overlaps))' at line 3
+create or replace table t2 (x int, s date, e date,
+period for p (s, e),
+unique(x, p without overlaps, x, p without overlaps));
+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 ' x, p without overlaps))' at line 3
+create or replace table t1 (x varchar(100), s date, e date,
+period for p(s,e),
+primary key(x, p without overlaps));
+create or replace table t1 (x varchar(100) compressed, s date, e date,
+period for p(s,e),
+primary key(x, p without overlaps));
+ERROR HY000: Compressed column 'x' can't be used in key specification
+create or replace table t (x int, s date, e date, period for apptime(s,e),
+unique(x, apptime without overlaps) using hash);
+ERROR HY000: Key `x` cannot have WITHOUT OVERLAPS
+create or replace table t (x int, s date, e date, period for apptime(s,e),
+b blob, unique(x, b, apptime without overlaps));
+ERROR HY000: Key `x` cannot have WITHOUT OVERLAPS
+create or replace table t (x int, s date, e date, b blob unique,
+period for apptime(s,e),
+unique(x, apptime without overlaps));
+insert into t values (1, '2020-03-01', '2020-03-05', 'test');
+insert into t values (1, '2020-03-05', '2020-03-10', 'test');
+ERROR 23000: Duplicate entry 'test' for key 'b'
+insert into t values (1, '2020-03-05', '2020-03-10', 'test2');
+insert into t values (1, '2020-03-03', '2020-03-10', 'test3');
+ERROR 23000: Duplicate entry '1-2020-03-10-2020-03-03' for key 'x'
+create or replace table t (x int, s date, e date, period for apptime(s,e),
+unique(x, apptime without overlaps));
+replace into t values (1, '2020-03-03', '2020-03-10');
+ERROR 42000: This version of MariaDB doesn't yet support 'WITHOUT OVERLAPS'
+insert into t values (1, '2020-03-03', '2020-03-10')
+on duplicate key update x = 2;
+ERROR 42000: This version of MariaDB doesn't yet support 'WITHOUT OVERLAPS'
+select * from t;
+x s e
+select * into outfile 'tmp_t.txt' from t;
+load data infile 'tmp_t.txt' into table t;
+load data infile 'tmp_t.txt' replace into table t;
+ERROR 42000: This version of MariaDB doesn't yet support 'WITHOUT OVERLAPS'
+insert into t values (1, '2020-03-01', '2020-03-05');
+select * into outfile 'tmp_t.txt' from t;
+load data infile 'tmp_t.txt' into table t;
+ERROR 23000: Duplicate entry '1-2020-03-05-2020-03-01' for key 'x'
+load data infile 'tmp_t.txt' ignore into table t;
+Warnings:
+Warning 1062 Duplicate entry '1-2020-03-05-2020-03-01' for key 'x'
+load data infile 'tmp_t.txt' replace into table t;
+ERROR 42000: This version of MariaDB doesn't yet support 'WITHOUT OVERLAPS'
+# MDEV-22599 WITHOUT OVERLAPS does not work with prefix indexes
+create or replace table t1 (a varchar(6), s timestamp, e timestamp,
+period for p(s,e),
+unique(a(3), p without overlaps));
+insert into t1 values ('foo', '2012-01-01', '2015-12-31');
+insert into t1 values ('foobar', '2013-01-01', '2014-01-01');
+ERROR 23000: Duplicate entry 'foo-2014-01-01 00:00:00-2013-01-01 00:00:00' for key 'a'
+insert into t1 values ('bar', '2012-01-01', '2015-12-31'),
+('baz', '2013-01-01', '2014-01-01');
+select * from t1;
+a s e
+foo 2012-01-01 00:00:00 2015-12-31 00:00:00
+bar 2012-01-01 00:00:00 2015-12-31 00:00:00
+baz 2013-01-01 00:00:00 2014-01-01 00:00:00
+# MDEV-22753 Server crashes in handler::ha_check_overlaps or error 190
+# "Incompatible key or row definition" upon INSERT into versioned
+# partitioned table with WITHOUT OVERLAPS
+create or replace table t1 (f int, s date, e date, period for p(s,e),
+unique(f, p without overlaps)
+) engine=innodb with system versioning
+partition by system_time limit 1000
+(partition p1 history, partition pn current);
+alter table t1 add partition (partition p2 history);
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `f` int(11) DEFAULT NULL,
+ `s` date NOT NULL,
+ `e` date NOT NULL,
+ PERIOD FOR `p` (`s`, `e`),
+ UNIQUE KEY `f` (`f`,`p` WITHOUT OVERLAPS)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
+ PARTITION BY SYSTEM_TIME LIMIT 1000
+(PARTITION `p1` HISTORY ENGINE = InnoDB,
+ PARTITION `p2` HISTORY ENGINE = InnoDB,
+ PARTITION `pn` CURRENT ENGINE = InnoDB)
+insert into t1 values (1,'2013-01-12','2015-11-04'),
+(2,'2016-03-15','2024-11-09');
+# MDEV-22714 Assertion `index->table->is_instant()' failed upon
+# multi-update on table with WITHOUT OVERLAPS
+create or replace table t (a int);
+insert into t values (0),(null),(0);
+create or replace table t1 (f int, s date, e date, period for p(s,e),
+unique(f, p without overlaps));
+insert into t1 values (0,'2026-02-12','2036-09-16'),
+(null,'2025-03-09','2032-12-05');
+update ignore t join t1 set f = a;
+# MDEV-22639 Assertion `inited != NONE' failed in
+# handler::ha_check_overlaps upon multi-table update
+create or replace table t (f int, s date, e date, period for p(s,e),
+unique(f, p without overlaps)) engine=myisam;
+insert into t values (1,'1988-08-25','2024-03-06');
+create or replace table t1 (a int) engine=myisam;
+insert into t1 values (1),(2);
+update t join t1 set s = '2020-01-01';
+# MDEV-22608 ASAN use-after-poison in TABLE::check_period_overlaps
+create or replace table t1 (s date, e date, b bit, period for p(s,e),
+unique(b, p without overlaps)) engine=myisam;
+insert into t1 values ('2024-12-21','2034-06-29',0),
+('2024-12-21','2034-06-29',1);
+update t1 set b = 1;
+ERROR 23000: Duplicate entry '\x01-2034-06-29-2024-12-21' for key 'b'
+# MDEV-22677 Server crashes in ha_partition::open upon update on
+# partitioned HEAP table with WITHOUT OVERLAPS
+create or replace table t (id int, s date, e date, period for p(s,e),
+primary key(id, p without overlaps)
+) engine=heap partition by hash(id);
+update t set id = 1;
+drop table t, t1;
diff --git a/mysql-test/suite/period/t/alter.test b/mysql-test/suite/period/t/alter.test
index 3fa3c5c87d5..68d9adf476a 100644
--- a/mysql-test/suite/period/t/alter.test
+++ b/mysql-test/suite/period/t/alter.test
@@ -151,3 +151,19 @@ alter table t1 add system versioning;
# cleanup
drop table t1;
+
+--echo #
+--echo # MDEV-21941 RENAME doesn't work for system time or period fields
+--echo #
+create or replace table t1 (
+ a int, s date, e date,
+ period for mytime(s, e));
+
+alter table t1 rename column s to x;
+alter table t1 rename column e to y;
+
+show create table t1;
+# cleanup
+drop table t1;
+
+--echo # End of 10.5 tests
diff --git a/mysql-test/suite/period/t/delete.test b/mysql-test/suite/period/t/delete.test
index 2a5f65d80ba..91670469bab 100644
--- a/mysql-test/suite/period/t/delete.test
+++ b/mysql-test/suite/period/t/delete.test
@@ -225,3 +225,13 @@ delete ignore from t
--enable_warnings
drop table t;
+
+#
+# MDEV-22424 Server crashes in handler::check_duplicate_long_entry_key or Assertion `inited == NONE || lookup_handler != this' failed upon DELETE FOR PORTION on table with long unique key
+#
+create table t1 (pk int, s date, e date, period for se (s,e), primary key (pk,se without overlaps));
+insert into t1 values (1,'2020-01-01','2020-02-20');
+delete from t1 for portion of se from '2020-01-30' to '2020-01-31';
+drop table t1;
+
+--echo # End of 10.5 tests
diff --git a/mysql-test/suite/period/t/long_unique.test b/mysql-test/suite/period/t/long_unique.test
new file mode 100644
index 00000000000..c2dcd3f6c3f
--- /dev/null
+++ b/mysql-test/suite/period/t/long_unique.test
@@ -0,0 +1,23 @@
+--source include/have_partition.inc
+
+--echo #
+--echo # Assertion `inited == NONE || update_handler != this' failed in
+--echo # handler::ha_write_row
+--echo #
+
+CREATE TABLE t1 (f VARCHAR(4096), s DATE, e DATE, PERIOD FOR app(s,e), UNIQUE(f)) ENGINE=MyISAM;
+INSERT INTO t1 VALUES ('foo', '2023-08-30', '2025-07-09'),('bar', '2021-01-01', '2021-12-31');
+DELETE FROM t1 FOR PORTION OF app FROM '2023-08-29' TO '2025-07-01';
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-21819 Assertion `inited == NONE || update_handler != this'
+--echo # failed in handler::ha_write_row
+--echo #
+
+CREATE OR REPLACE TABLE t1 (a INT, b BLOB, s DATE, e DATE, PERIOD FOR app(s,e), UNIQUE(b)) ENGINE=MyISAM PARTITION BY HASH(a) PARTITIONS 2;
+INSERT INTO t1 VALUES (1,'foo','2022-01-01', '2025-01-01');
+--error ER_DUP_ENTRY
+DELETE FROM t1 FOR PORTION OF app FROM '2023-01-01' TO '2024-01-01';
+DROP TABLE t1;
+
diff --git a/mysql-test/suite/period/t/overlaps.test b/mysql-test/suite/period/t/overlaps.test
new file mode 100644
index 00000000000..6cd78769d4a
--- /dev/null
+++ b/mysql-test/suite/period/t/overlaps.test
@@ -0,0 +1,346 @@
+--source include/have_partition.inc
+
+# Test both myisam and innodb
+--source suite/period/engines.inc
+
+let $default_engine= `select @@default_storage_engine`;
+
+create or replace table t(id int, s date, e date,
+ period for p(s,e),
+ primary key(id, p without overlaps)
+) partition by key (id);
+
+--replace_result $default_engine DEFAULT_ENGINE
+show create table t;
+
+
+insert into t values (1, '2003-01-01', '2003-03-01'),
+ (1, '2003-05-01', '2003-07-01');
+
+--error ER_DUP_ENTRY
+insert into t values (1, '2003-02-01', '2003-04-01');
+--error ER_DUP_ENTRY
+insert into t values (1, '2003-04-01', '2003-06-01');
+--error ER_DUP_ENTRY
+insert into t values (1, '2003-05-15', '2003-06-15');
+--error ER_DUP_ENTRY
+insert into t values (1, '2003-04-01', '2003-08-01');
+
+insert into t values (1, '2003-03-01', '2003-05-01');
+
+--echo # expand/shrink period
+update t set s= '2002-12-01' where s = '2003-01-01';
+update t set s= '2003-01-01' where s = '2002-12-01';
+
+update t set e= '2003-08-01' where s = '2003-05-01';
+update t set e= '2003-07-01' where s = '2003-05-01';
+
+--echo # move left/right
+update t set s= '2002-12-15', e= '2003-01-15' where s = '2003-01-01';
+update t set s= '2003-01-01', e= '2003-02-01' where s = '2002-12-15';
+
+--echo # diminish/enlarge
+update t set s= '2003-01-10', e= '2003-01-20' where s = '2003-01-01';
+update t set s= '2003-01-01', e= '2003-02-01' where s = '2003-01-10';
+
+select * from t;
+
+--echo # intersect left/right, strict inclusion/containment
+--error ER_DUP_ENTRY
+update t set e= '2003-04-01' where s = '2003-01-01';
+--error ER_DUP_ENTRY
+update t set s= '2003-04-01' where s = '2003-05-01';
+--error ER_DUP_ENTRY
+update t set s= '2003-03-10', e= '2003-03-20' where s = '2003-01-01';
+--error ER_DUP_ENTRY
+update t set s= '2003-04-01', e= '2003-08-01' where s = '2003-03-01';
+
+--echo # inclusion/containment with partial match
+--error ER_DUP_ENTRY
+update t set s= '2003-03-01', e= '2003-04-01' where s = '2003-01-01';
+--error ER_DUP_ENTRY
+update t set s= '2003-04-01', e= '2003-05-01' where s = '2003-01-01';
+--error ER_DUP_ENTRY
+update t set s= '2003-03-01' where s = '2003-05-01';
+--error ER_DUP_ENTRY
+update t set e= '2003-05-01' where s = '2003-01-01';
+
+select * from t where year(s) = 2003;
+
+--echo # UPDATE ... FOR PORTION test
+insert t values (2, '2003-04-15', '2003-05-01');
+
+update t for portion of p from '2003-01-01' to '2003-01-15'
+ set id= 2;
+--sorted_result
+select * from t;
+
+update t for portion of p from '2003-01-15' to '2003-02-01'
+ set id= 2;
+--sorted_result
+select * from t;
+
+--echo # Next, test UPDATE ... FOR PORTION resulting with an error
+--echo # Since MyISAM/Aria engines lack atomicity, the results would differ with
+--echo # innodb. So a table is going to be copied to one with explicit engine.
+
+create table t_myisam (id int, s date, e date,
+ period for p(s,e),
+ primary key(id, p without overlaps))
+ engine=myisam
+ select * from t;
+--error ER_DUP_ENTRY
+update t_myisam for portion of p from '2003-04-01' to '2003-06-01'
+ set id= 2 order by s desc;
+--sorted_result
+select * from t_myisam;
+
+create table t_innodb (id int, s date, e date,
+ period for p(s,e),
+ primary key(id, p without overlaps))
+ engine=innodb
+ select * from t;
+--error ER_DUP_ENTRY
+update t_innodb for portion of p from '2003-04-01' to '2003-06-01'
+ set id= 2 order by s desc;
+--sorted_result
+select * from t_innodb;
+
+drop table t_myisam, t_innodb;
+
+--error ER_PERIOD_NOT_FOUND
+create or replace table t(id int, s date, e date,
+ period for p(s,e),
+ primary key(id, q without overlaps));
+
+--error ER_PERIOD_NOT_FOUND
+create or replace table t(id int, s date, e date,
+ primary key(id, p without overlaps));
+
+--error ER_KEY_CONTAINS_PERIOD_FIELDS
+create or replace table t(id int, s date, e date,
+ period for p(s,e),
+ primary key(id, s, p without overlaps));
+
+create or replace table t(id int, s date, e date,
+ period for p(s,e),
+ primary key(id));
+insert into t values (1, '2003-03-01', '2003-05-01');
+--error ER_DUP_ENTRY
+insert into t values (1, '2003-04-01', '2003-05-01');
+
+create or replace table t(id int, u int, s date, e date,
+ period for p(s,e),
+ primary key(id, p without overlaps),
+ unique(u));
+--replace_result $default_engine DEFAULT_ENGINE
+show create table t;
+insert into t values (1, 1, '2003-03-01', '2003-05-01');
+insert into t values (1, 2, '2003-05-01', '2003-07-01');
+--error ER_DUP_ENTRY
+insert into t values (1, 3, '2003-04-01', '2003-05-01');
+
+
+
+create or replace table t(id int, u int, s date, e date,
+ period for p(s,e),
+ primary key(id, p without overlaps),
+ unique(u, p without overlaps));
+--replace_result $default_engine DEFAULT_ENGINE
+show create table t;
+
+insert into t values (2, NULL, '2003-03-01', '2003-05-01');
+--error ER_DUP_ENTRY
+insert into t values (2, NULL, '2003-03-01', '2003-05-01');
+insert into t values (3, NULL, '2003-03-01', '2003-05-01');
+insert into t values (1, 1, '2003-03-01', '2003-05-01');
+insert into t values (1, 2, '2003-05-01', '2003-07-01');
+insert into t values (4, NULL, '2003-03-01', '2003-05-01');
+
+create sequence seq start=5 engine=myisam;
+update t set id= nextval(seq), u= nextval(seq), s='2003-05-01', e='2003-07-01'
+ where u is NULL;
+
+--sorted_result
+select * from t;
+drop sequence seq;
+
+create or replace table t(id int, s date, e date,
+ period for p(s,e));
+
+insert into t values (1, '2003-01-01', '2003-03-01'),
+ (1, '2003-05-01', '2003-07-01'),
+ (1, '2003-02-01', '2003-04-01');
+
+--replace_regex /#sql-\w+/#sql-temp/
+--error ER_DUP_ENTRY
+alter table t add primary key(id, p without overlaps);
+
+--echo # Historical rows are not checked against constraints
+set @@system_versioning_alter_history= keep;
+alter table t add system versioning;
+delete from t;
+alter table t add primary key(id, p without overlaps);
+
+insert into t values (1, '2003-01-01', '2003-03-01'),
+ (1, '2003-03-01', '2003-05-01');
+
+
+--echo # `without overlaps` is not lost on alter table
+alter table t add y int;
+--replace_result $default_engine DEFAULT_ENGINE
+show create table t;
+alter table t drop y;
+
+create or replace table t1 like t;
+--replace_result $default_engine DEFAULT_ENGINE
+show create table t1;
+
+create or replace table t1 (x int, s date, e date,
+ period for p(s,e),
+ primary key(x, p without overlaps));
+alter table t1 partition by key (x);
+
+create or replace table t1 (x int, s date, e date, period for p (s, e))
+ partition by hash (x);
+alter table t1 add primary key (x, p without overlaps);
+
+--error ER_PARSE_ERROR
+create or replace table t2 (x int, s date, e date,
+ period for p (s, e),
+ key(x, p without overlaps));
+
+--error ER_PARSE_ERROR
+create or replace table t2 (x int, s date, e date,
+ period for p (s, e),
+ unique(x, p without overlaps, x, p without overlaps));
+
+create or replace table t1 (x varchar(100), s date, e date,
+ period for p(s,e),
+ primary key(x, p without overlaps));
+
+--error ER_COMPRESSED_COLUMN_USED_AS_KEY
+create or replace table t1 (x varchar(100) compressed, s date, e date,
+ period for p(s,e),
+ primary key(x, p without overlaps));
+
+--error ER_KEY_CANT_HAVE_WITHOUT_OVERLAPS
+create or replace table t (x int, s date, e date, period for apptime(s,e),
+ unique(x, apptime without overlaps) using hash);
+
+--error ER_KEY_CANT_HAVE_WITHOUT_OVERLAPS
+create or replace table t (x int, s date, e date, period for apptime(s,e),
+ b blob, unique(x, b, apptime without overlaps));
+
+create or replace table t (x int, s date, e date, b blob unique,
+ period for apptime(s,e),
+ unique(x, apptime without overlaps));
+
+insert into t values (1, '2020-03-01', '2020-03-05', 'test');
+--error ER_DUP_ENTRY
+insert into t values (1, '2020-03-05', '2020-03-10', 'test');
+insert into t values (1, '2020-03-05', '2020-03-10', 'test2');
+--error ER_DUP_ENTRY
+insert into t values (1, '2020-03-03', '2020-03-10', 'test3');
+
+let $MYSQLD_DATADIR= `select @@datadir`;
+create or replace table t (x int, s date, e date, period for apptime(s,e),
+ unique(x, apptime without overlaps));
+--error ER_NOT_SUPPORTED_YET
+replace into t values (1, '2020-03-03', '2020-03-10');
+--error ER_NOT_SUPPORTED_YET
+insert into t values (1, '2020-03-03', '2020-03-10')
+ on duplicate key update x = 2;
+
+select * from t;
+select * into outfile 'tmp_t.txt' from t;
+load data infile 'tmp_t.txt' into table t;
+--error ER_NOT_SUPPORTED_YET
+load data infile 'tmp_t.txt' replace into table t;
+remove_file $MYSQLD_DATADIR/test/tmp_t.txt;
+
+insert into t values (1, '2020-03-01', '2020-03-05');
+select * into outfile 'tmp_t.txt' from t;
+--error ER_DUP_ENTRY
+load data infile 'tmp_t.txt' into table t;
+
+load data infile 'tmp_t.txt' ignore into table t;
+
+--error ER_NOT_SUPPORTED_YET
+load data infile 'tmp_t.txt' replace into table t;
+
+remove_file $MYSQLD_DATADIR/test/tmp_t.txt;
+
+
+--echo # MDEV-22599 WITHOUT OVERLAPS does not work with prefix indexes
+create or replace table t1 (a varchar(6), s timestamp, e timestamp,
+ period for p(s,e),
+ unique(a(3), p without overlaps));
+
+insert into t1 values ('foo', '2012-01-01', '2015-12-31');
+--error ER_DUP_ENTRY
+insert into t1 values ('foobar', '2013-01-01', '2014-01-01');
+
+insert into t1 values ('bar', '2012-01-01', '2015-12-31'),
+ ('baz', '2013-01-01', '2014-01-01');
+select * from t1;
+
+--echo # MDEV-22753 Server crashes in handler::ha_check_overlaps or error 190
+--echo # "Incompatible key or row definition" upon INSERT into versioned
+--echo # partitioned table with WITHOUT OVERLAPS
+create or replace table t1 (f int, s date, e date, period for p(s,e),
+ unique(f, p without overlaps)
+ ) engine=innodb with system versioning
+ partition by system_time limit 1000
+ (partition p1 history, partition pn current);
+alter table t1 add partition (partition p2 history);
+show create table t1;
+insert into t1 values (1,'2013-01-12','2015-11-04'),
+ (2,'2016-03-15','2024-11-09');
+
+
+--echo # MDEV-22714 Assertion `index->table->is_instant()' failed upon
+--echo # multi-update on table with WITHOUT OVERLAPS
+
+create or replace table t (a int);
+insert into t values (0),(null),(0);
+
+create or replace table t1 (f int, s date, e date, period for p(s,e),
+ unique(f, p without overlaps));
+
+insert into t1 values (0,'2026-02-12','2036-09-16'),
+ (null,'2025-03-09','2032-12-05');
+
+update ignore t join t1 set f = a;
+
+--echo # MDEV-22639 Assertion `inited != NONE' failed in
+--echo # handler::ha_check_overlaps upon multi-table update
+
+create or replace table t (f int, s date, e date, period for p(s,e),
+ unique(f, p without overlaps)) engine=myisam;
+insert into t values (1,'1988-08-25','2024-03-06');
+create or replace table t1 (a int) engine=myisam;
+insert into t1 values (1),(2);
+
+update t join t1 set s = '2020-01-01';
+
+
+--echo # MDEV-22608 ASAN use-after-poison in TABLE::check_period_overlaps
+
+create or replace table t1 (s date, e date, b bit, period for p(s,e),
+ unique(b, p without overlaps)) engine=myisam;
+insert into t1 values ('2024-12-21','2034-06-29',0),
+ ('2024-12-21','2034-06-29',1);
+--error ER_DUP_ENTRY
+update t1 set b = 1;
+
+
+--echo # MDEV-22677 Server crashes in ha_partition::open upon update on
+--echo # partitioned HEAP table with WITHOUT OVERLAPS
+
+create or replace table t (id int, s date, e date, period for p(s,e),
+ primary key(id, p without overlaps)
+ ) engine=heap partition by hash(id);
+update t set id = 1;
+
+drop table t, t1;
diff --git a/mysql-test/suite/plugins/r/multiauth.result b/mysql-test/suite/plugins/r/multiauth.result
index 8e19433322d..8ae45d1fb9f 100644
--- a/mysql-test/suite/plugins/r/multiauth.result
+++ b/mysql-test/suite/plugins/r/multiauth.result
@@ -106,6 +106,7 @@ select json_detailed(priv) from mysql.global_priv where user='mysqltest1';
json_detailed(priv)
{
"access": 0,
+ "version_id": VERSION_ID,
"plugin": "mysql_native_password",
"authentication_string": "*7D8C3DF236D9163B6C274A9D47704BC496988460",
"auth_or":
@@ -154,7 +155,7 @@ CREATE USER `mysqltest1`@`%` IDENTIFIED VIA mysql_native_password USING '*BFE3F4
drop user mysqltest1;
# switching from mysql.global_priv to mysql.user
create user mysqltest1 identified via ed25519 as password("good") OR unix_socket OR mysql_native_password as password("works");
-ERROR HY000: Column count of mysql.user is wrong. Expected 3, found 47. Created with MariaDB XX.YY.ZZ, now running XX.YY.ZZ. Please use mysql_upgrade to fix this error
+ERROR HY000: Column count of mysql.user is wrong. Expected 3, found 47. Created with MariaDB XX.YY.ZZ, now running XX.YY.ZZ. Please use mariadb-upgrade to fix this error
# switching back from mysql.user to mysql.global_priv
create user 'USER' identified via mysql_native_password as '1234567890123456789012345678901234567890a' OR unix_socket;
create user mysqltest1 identified via mysql_native_password as '1234567890123456789012345678901234567890a' OR unix_socket;
diff --git a/mysql-test/suite/plugins/r/simple_password_check.result b/mysql-test/suite/plugins/r/simple_password_check.result
index 2e706115bd1..f8f56bc8b15 100644
--- a/mysql-test/suite/plugins/r/simple_password_check.result
+++ b/mysql-test/suite/plugins/r/simple_password_check.result
@@ -28,6 +28,7 @@ NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
+GLOBAL_VALUE_PATH NULL
VARIABLE_NAME SIMPLE_PASSWORD_CHECK_LETTERS_SAME_CASE
SESSION_VALUE NULL
GLOBAL_VALUE 1
@@ -42,6 +43,7 @@ NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
+GLOBAL_VALUE_PATH NULL
VARIABLE_NAME SIMPLE_PASSWORD_CHECK_MINIMAL_LENGTH
SESSION_VALUE NULL
GLOBAL_VALUE 8
@@ -56,6 +58,7 @@ NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
+GLOBAL_VALUE_PATH NULL
VARIABLE_NAME SIMPLE_PASSWORD_CHECK_OTHER_CHARACTERS
SESSION_VALUE NULL
GLOBAL_VALUE 1
@@ -70,6 +73,7 @@ NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
+GLOBAL_VALUE_PATH NULL
create user foo1 identified by 'pwd';
ERROR HY000: Your password does not satisfy the current policy requirements
create user foo1;
diff --git a/mysql-test/suite/plugins/r/test_sql_service.result b/mysql-test/suite/plugins/r/test_sql_service.result
new file mode 100644
index 00000000000..af414d6c6e7
--- /dev/null
+++ b/mysql-test/suite/plugins/r/test_sql_service.result
@@ -0,0 +1,8 @@
+install plugin test_sql_service soname 'test_sql_service';
+set global test_sql_service_run_test= 1;
+show status like 'test_sql_service%';
+Variable_name Value
+Test_sql_service_passed 0
+uninstall plugin test_sql_service;
+Warnings:
+Warning 1620 Plugin is busy and will be uninstalled on shutdown
diff --git a/mysql-test/suite/plugins/t/dialog.test b/mysql-test/suite/plugins/t/dialog.test
index 0507686acf3..1dd52cfde34 100644
--- a/mysql-test/suite/plugins/t/dialog.test
+++ b/mysql-test/suite/plugins/t/dialog.test
@@ -15,8 +15,6 @@ if (!$DIALOG_EXAMPLES_SO) {
eval install plugin three_attempts soname '$DIALOG_EXAMPLES_SO';
create user test_dialog identified via three_attempts using 'SECRET';
-let $plugindir=`SELECT @@global.plugin_dir`;
-
--write_file $MYSQLTEST_VARDIR/tmp/dialog_good.txt
foo
1234
@@ -34,19 +32,19 @@ EOF
--echo #
--echo # -pSECRET is picked up, no questions asked.
--echo #
---exec echo "select user(), current_user();"|$MYSQL_TEST -u test_dialog -pSECRET --plugin-dir=$plugindir
+--exec echo "select user(), current_user();"|$MYSQL_TEST -u test_dialog -pSECRET
--echo #
--echo # without -p. up to three questions are asked on the stdin.
--echo # athentication is successful, the correct pasword is on the third line
--echo #
---exec $MYSQL_TEST -u test_dialog --plugin-dir=$plugindir < $MYSQLTEST_VARDIR/tmp/dialog_good.txt
+--exec $MYSQL_TEST -u test_dialog < $MYSQLTEST_VARDIR/tmp/dialog_good.txt
--echo #
--echo # athentication is unsuccessful, first three lines are all wrong
--echo #
--error 1
---exec $MYSQL_TEST -u test_dialog --plugin-dir=$plugindir < $MYSQLTEST_VARDIR/tmp/dialog_bad.txt
+--exec $MYSQL_TEST -u test_dialog < $MYSQLTEST_VARDIR/tmp/dialog_bad.txt
--remove_file $MYSQLTEST_VARDIR/tmp/dialog_good.txt
--remove_file $MYSQLTEST_VARDIR/tmp/dialog_bad.txt
diff --git a/mysql-test/suite/plugins/t/multiauth.test b/mysql-test/suite/plugins/t/multiauth.test
index 87970e2c781..f0eea21ee76 100644
--- a/mysql-test/suite/plugins/t/multiauth.test
+++ b/mysql-test/suite/plugins/t/multiauth.test
@@ -1,5 +1,10 @@
--source include/not_ubsan.inc
--source include/platform.inc
+
+let $REGEX_VERSION_ID=/$mysql_get_server_version/VERSION_ID/;
+let $REGEX_PASSWORD_LAST_CHANGED=/password_last_changed": [0-9]*/password_last_changed": #/;
+let $REGEX_GLOBAL_PRIV=$REGEX_PASSWORD_LAST_CHANGED $REGEX_VERSION_ID;
+
#
# MDEV-11340 Allow multiple alternative authentication methods for the same user
#
@@ -132,7 +137,7 @@ drop user mysqltest1;
#
create user mysqltest1 identified via ed25519 as password("good") OR unix_socket OR mysql_native_password as password("works");
show grants for mysqltest1;
---replace_regex /password_last_changed": [0-9]*/password_last_changed": #/
+--replace_regex $REGEX_GLOBAL_PRIV
select json_detailed(priv) from mysql.global_priv where user='mysqltest1';
select password,plugin,authentication_string from mysql.user where user='mysqltest1';
flush privileges;
diff --git a/mysql-test/suite/plugins/t/pam.test b/mysql-test/suite/plugins/t/pam.test
index 1bb1fa2c230..2611f25ee63 100644
--- a/mysql-test/suite/plugins/t/pam.test
+++ b/mysql-test/suite/plugins/t/pam.test
@@ -40,19 +40,19 @@ EOF
--echo # athentication is unsuccessful
--echo #
--error 1
---exec $MYSQL_TEST -u test_pam --plugin-dir=$plugindir < $MYSQLTEST_VARDIR/tmp/pam_ugly.txt
+--exec $MYSQL_TEST -u test_pam < $MYSQLTEST_VARDIR/tmp/pam_ugly.txt
--echo #
--echo # athentication is successful
--echo #
--error 0
---exec $MYSQL_TEST -u test_pam -pgoodpassword --plugin-dir=$plugindir < $MYSQLTEST_VARDIR/tmp/pam_good2.txt
+--exec $MYSQL_TEST -u test_pam -pgoodpassword < $MYSQLTEST_VARDIR/tmp/pam_good2.txt
--echo #
--echo # athentication is unsuccessful
--echo #
--error 1
---exec $MYSQL_TEST -u test_pam -pbadpassword --plugin-dir=$plugindir < $MYSQLTEST_VARDIR/tmp/pam_good2.txt
+--exec $MYSQL_TEST -u test_pam -pbadpassword < $MYSQLTEST_VARDIR/tmp/pam_good2.txt
drop user test_pam;
drop user pam_test;
diff --git a/mysql-test/suite/plugins/t/pam_cleartext.test b/mysql-test/suite/plugins/t/pam_cleartext.test
index 7542c8f51f6..0824ee8f4fe 100644
--- a/mysql-test/suite/plugins/t/pam_cleartext.test
+++ b/mysql-test/suite/plugins/t/pam_cleartext.test
@@ -13,22 +13,22 @@ EOF
--echo # same test as in pam.test now fails
--echo #
--error 1
---exec $MYSQL_TEST -u test_pam --plugin-dir=$plugindir < $MYSQLTEST_VARDIR/tmp/pam_good.txt
+--exec $MYSQL_TEST -u test_pam < $MYSQLTEST_VARDIR/tmp/pam_good.txt
--error 1
---exec $MYSQL_TEST -u test_pam --plugin-dir=$plugindir -p'something' < $MYSQLTEST_VARDIR/tmp/pam_good.txt
+--exec $MYSQL_TEST -u test_pam -p'something' < $MYSQLTEST_VARDIR/tmp/pam_good.txt
--remove_file $MYSQLTEST_VARDIR/tmp/pam_good.txt
--echo #
--echo # success
--echo #
---exec $MYSQL -u test_pam --plugin-dir=$plugindir -p'cleartext good' -e 'select user(), current_user(), database()'
+--exec $MYSQL -u test_pam -p'cleartext good' -e 'select user(), current_user(), database()'
--echo #
--echo # failure
--echo #
--error 1
---exec $MYSQL -u test_pam --plugin-dir=$plugindir -p'cleartext bad' -e 'select user(), current_user(), database()'
+--exec $MYSQL -u test_pam -p'cleartext bad' -e 'select user(), current_user(), database()'
drop user test_pam;
drop user pam_test;
diff --git a/mysql-test/suite/plugins/t/pam_v1.test b/mysql-test/suite/plugins/t/pam_v1.test
index c9c0a97f6a9..754251167e9 100644
--- a/mysql-test/suite/plugins/t/pam_v1.test
+++ b/mysql-test/suite/plugins/t/pam_v1.test
@@ -22,25 +22,25 @@ EOF
--echo # athentication is successful, challenge/pin are ok
--echo # note that current_user() differs from user()
--echo #
---exec $MYSQL_TEST -u test_pam --plugin-dir=$plugindir < $MYSQLTEST_VARDIR/tmp/pam_good.txt
+--exec $MYSQL_TEST -u test_pam < $MYSQLTEST_VARDIR/tmp/pam_good.txt
--echo #
--echo # athentication is unsuccessful
--echo #
--error 1
---exec $MYSQL_TEST -u test_pam --plugin-dir=$plugindir < $MYSQLTEST_VARDIR/tmp/pam_bad.txt
+--exec $MYSQL_TEST -u test_pam < $MYSQLTEST_VARDIR/tmp/pam_bad.txt
--echo #
--echo # athentication is successful
--echo #
--error 0
---exec $MYSQL_TEST -u test_pam -pgoodpassword --plugin-dir=$plugindir < $MYSQLTEST_VARDIR/tmp/pam_good2.txt
+--exec $MYSQL_TEST -u test_pam -pgoodpassword < $MYSQLTEST_VARDIR/tmp/pam_good2.txt
--echo #
--echo # athentication is unsuccessful
--echo #
--error 1
---exec $MYSQL_TEST -u test_pam -pbadpassword --plugin-dir=$plugindir < $MYSQLTEST_VARDIR/tmp/pam_good2.txt
+--exec $MYSQL_TEST -u test_pam -pbadpassword < $MYSQLTEST_VARDIR/tmp/pam_good2.txt
--remove_file $MYSQLTEST_VARDIR/tmp/pam_good.txt
--remove_file $MYSQLTEST_VARDIR/tmp/pam_good2.txt
diff --git a/mysql-test/suite/plugins/t/test_sql_service.opt b/mysql-test/suite/plugins/t/test_sql_service.opt
new file mode 100644
index 00000000000..089ed94b688
--- /dev/null
+++ b/mysql-test/suite/plugins/t/test_sql_service.opt
@@ -0,0 +1,2 @@
+--thread_handling='one-thread-per-connection'
+
diff --git a/mysql-test/suite/plugins/t/test_sql_service.test b/mysql-test/suite/plugins/t/test_sql_service.test
new file mode 100644
index 00000000000..3384b523bda
--- /dev/null
+++ b/mysql-test/suite/plugins/t/test_sql_service.test
@@ -0,0 +1,18 @@
+
+--source include/not_embedded.inc
+
+if (!$TEST_SQL_SERVICE_SO) {
+ skip No TEST_SQL_SERVICE plugin;
+}
+
+# An unfortunate wait for check-testcase.test to complete disconnect.
+let count_sessions= 1;
+source include/wait_until_count_sessions.inc;
+
+install plugin test_sql_service soname 'test_sql_service';
+
+set global test_sql_service_run_test= 1;
+show status like 'test_sql_service%';
+
+uninstall plugin test_sql_service;
+
diff --git a/mysql-test/suite/roles/admin.result b/mysql-test/suite/roles/admin.result
index a7841fd3b57..2ecbfae4516 100644
--- a/mysql-test/suite/roles/admin.result
+++ b/mysql-test/suite/roles/admin.result
@@ -8,9 +8,9 @@ create role role3 with admin role1;
create role role4 with admin root@localhost;
connect c1, localhost, foo,,;
create role role5 with admin root@localhost;
-ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
+ERROR 42000: Access denied; you need (at least one of) the SUPER, SET USER privilege(s) for this operation
create role role5 with admin role3;
-ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
+ERROR 42000: Access denied; you need (at least one of) the SUPER, SET USER privilege(s) for this operation
create role role5 with admin foo@localhost;
connection default;
call mtr.add_suppression("Invalid roles_mapping table entry user:'foo@bar', rolename:'role6'");
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 412ddf9d423..55cbbd8843d 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
@@ -6,7 +6,7 @@ alter table user drop column default_role;
alter table user drop column max_statement_time;
flush privileges;
create role test_role;
-ERROR HY000: Column count of mysql.user is wrong. Expected 45, found 44. Created with MariaDB MYSQL_VERSION_ID, now running MYSQL_VERSION_ID. Please use mysql_upgrade to fix this error
+ERROR HY000: Column count of mysql.user is wrong. Expected 45, found 44. Created with MariaDB MYSQL_VERSION_ID, now running MYSQL_VERSION_ID. Please use mariadb-upgrade to fix this error
drop role test_role;
ERROR HY000: Operation DROP ROLE failed for 'test_role'
alter table user add column is_role enum('N', 'Y') default 'N' not null
diff --git a/mysql-test/suite/roles/definer.result b/mysql-test/suite/roles/definer.result
index 30911265436..ecfa8113220 100644
--- a/mysql-test/suite/roles/definer.result
+++ b/mysql-test/suite/roles/definer.result
@@ -666,7 +666,7 @@ CREATE DEFINER='r1' PROCEDURE user1_proc2() SQL SECURITY INVOKER
BEGIN
SELECT NOW(), VERSION();
END;//
-ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
+ERROR 42000: Access denied; you need (at least one of) the SUPER, SET USER privilege(s) for this operation
set role r1;
CREATE DEFINER='r1' PROCEDURE user1_proc2() SQL SECURITY INVOKER
BEGIN
diff --git a/mysql-test/suite/rpl/disabled.def b/mysql-test/suite/rpl/disabled.def
index 34f23c5494e..6b8340699aa 100644
--- a/mysql-test/suite/rpl/disabled.def
+++ b/mysql-test/suite/rpl/disabled.def
@@ -18,3 +18,4 @@ rpl_semi_sync_after_sync : fails after MDEV-16172
rpl_semi_sync_slave_compressed_protocol : MDEV-25580 2021-05-05 Sujatha
rpl_auto_increment_update_failure : disabled for now
rpl_current_user : waits for MDEV-22374 fix
+rpl_parallel2 : waits for MDEV-23089
diff --git a/mysql-test/suite/rpl/include/check_type.inc b/mysql-test/suite/rpl/include/check_type.inc
index baba7a21e86..c72754cad4f 100644
--- a/mysql-test/suite/rpl/include/check_type.inc
+++ b/mysql-test/suite/rpl/include/check_type.inc
@@ -17,7 +17,7 @@
if (!$engine_type)
{
# Use the default storage engine
- let $engine_type=`SELECT @@storage_engine`;
+ let $engine_type=`SELECT @@default_storage_engine`;
}
connection master;
diff --git a/mysql-test/suite/rpl/include/rpl_parallel.inc b/mysql-test/suite/rpl/include/rpl_parallel.inc
deleted file mode 100644
index b88d2126d4d..00000000000
--- a/mysql-test/suite/rpl/include/rpl_parallel.inc
+++ /dev/null
@@ -1,2217 +0,0 @@
-#
-# This include file is used by more than one test suite
-# (currently rpl and binlog_encryption).
-# Please check all dependent tests after modifying it
-#
-
---source include/have_innodb.inc
---source include/have_debug.inc
---source include/have_debug_sync.inc
---source include/master-slave.inc
-
-# Test various aspects of parallel replication.
-
---connection server_2
-SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
---error ER_SLAVE_MUST_STOP
-SET GLOBAL slave_parallel_threads=10;
---source include/stop_slave.inc
-SET GLOBAL slave_parallel_threads=10;
-
-# Check that we do not spawn any worker threads when no slave is running.
-SELECT IF(COUNT(*) < 10, "OK", CONCAT("Found too many system user processes: ", COUNT(*))) FROM information_schema.processlist WHERE user = "system user";
-
-CHANGE MASTER TO master_use_gtid=slave_pos;
---source include/start_slave.inc
-
-# Check that worker threads get spawned when slave starts.
-SELECT IF(COUNT(*) >= 10, "OK", CONCAT("Found too few system user processes: ", COUNT(*))) FROM information_schema.processlist WHERE user = "system user";
-# ... and that worker threads get removed when slave stops.
---source include/stop_slave.inc
-SELECT IF(COUNT(*) < 10, "OK", CONCAT("Found too many system user processes: ", COUNT(*))) FROM information_schema.processlist WHERE user = "system user";
---source include/start_slave.inc
-SELECT IF(COUNT(*) >= 10, "OK", CONCAT("Found too few system user processes: ", COUNT(*))) FROM information_schema.processlist WHERE user = "system user";
-
---echo *** Test long-running query in domain 1 can run in parallel with short queries in domain 0 ***
-
---connection server_1
-ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
-CREATE TABLE t1 (a int PRIMARY KEY) ENGINE=MyISAM;
-CREATE TABLE t2 (a int PRIMARY KEY) ENGINE=InnoDB;
-INSERT INTO t1 VALUES (1);
-INSERT INTO t2 VALUES (1);
---save_master_pos
-
---connection server_2
---sync_with_master
-
-# Block the table t1 to simulate a replicated query taking a long time.
---connect (con_temp1,127.0.0.1,root,,test,$SERVER_MYPORT_2,)
-LOCK TABLE t1 WRITE;
-
---connection server_1
-SET gtid_domain_id=1;
-# This query will be blocked on the slave until UNLOCK TABLES.
-INSERT INTO t1 VALUES (2);
-SET gtid_domain_id=0;
-# These t2 queries can be replicated in parallel with the prior t1 query, as
-# they are in a separate replication domain.
-INSERT INTO t2 VALUES (2);
-INSERT INTO t2 VALUES (3);
-BEGIN;
-INSERT INTO t2 VALUES (4);
-INSERT INTO t2 VALUES (5);
-COMMIT;
-INSERT INTO t2 VALUES (6);
-
---connection server_2
---let $wait_condition= SELECT COUNT(*) = 6 FROM t2
---source include/wait_condition.inc
-
-SELECT * FROM t2 ORDER by a;
-
---connection con_temp1
-SELECT * FROM t1;
-UNLOCK TABLES;
-
---connection server_2
---let $wait_condition= SELECT COUNT(*) = 2 FROM t1
---source include/wait_condition.inc
-
-SELECT * FROM t1 ORDER BY a;
-
-
---echo *** Test two transactions in different domains committed in opposite order on slave but in a single group commit. ***
---connection server_2
---source include/stop_slave.inc
-
---connection server_1
-# Use a stored function to inject a debug_sync into the appropriate THD.
-# The function does nothing on the master, and on the slave it injects the
-# desired debug_sync action(s).
-SET sql_log_bin=0;
---delimiter ||
-CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
- RETURNS INT DETERMINISTIC
- BEGIN
- RETURN x;
- END
-||
---delimiter ;
-SET sql_log_bin=1;
-
-SET @old_format= @@SESSION.binlog_format;
-SET binlog_format='statement';
-SET gtid_domain_id=1;
-INSERT INTO t2 VALUES (foo(10,
- 'commit_before_enqueue SIGNAL ready1 WAIT_FOR cont1',
- 'commit_after_release_LOCK_prepare_ordered SIGNAL ready2'));
-
---connection server_2
-FLUSH LOGS;
---source include/wait_for_binlog_checkpoint.inc
-SET sql_log_bin=0;
---delimiter ||
-CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
- RETURNS INT DETERMINISTIC
- BEGIN
- IF d1 != '' THEN
- SET debug_sync = d1;
- END IF;
- IF d2 != '' THEN
- SET debug_sync = d2;
- END IF;
- RETURN x;
- END
-||
---delimiter ;
-SET sql_log_bin=1;
-SET @old_format=@@GLOBAL.binlog_format;
-SET GLOBAL binlog_format=statement;
-# We need to restart all parallel threads for the new global setting to
-# be copied to the session-level values.
-SET GLOBAL slave_parallel_threads=0;
-SET GLOBAL slave_parallel_threads=10;
---source include/start_slave.inc
-
-# First make sure the first insert is ready to commit, but not queued yet.
-SET debug_sync='now WAIT_FOR ready1';
-
---connection server_1
-SET gtid_domain_id=2;
-INSERT INTO t2 VALUES (foo(11,
- 'commit_before_enqueue SIGNAL ready3 WAIT_FOR cont3',
- 'commit_after_release_LOCK_prepare_ordered SIGNAL ready4 WAIT_FOR cont4'));
-SET gtid_domain_id=0;
-SELECT * FROM t2 WHERE a >= 10 ORDER BY a;
-
---connection server_2
-# Now wait for the second insert to queue itself as the leader, and then
-# wait for more commits to queue up.
-SET debug_sync='now WAIT_FOR ready3';
-SET debug_sync='now SIGNAL cont3';
-SET debug_sync='now WAIT_FOR ready4';
-# Now allow the first insert to queue up to participate in group commit.
-SET debug_sync='now SIGNAL cont1';
-SET debug_sync='now WAIT_FOR ready2';
-# Finally allow the second insert to proceed and do the group commit.
-SET debug_sync='now SIGNAL cont4';
-
---let $wait_condition= SELECT COUNT(*) = 2 FROM t2 WHERE a >= 10
---source include/wait_condition.inc
-SELECT * FROM t2 WHERE a >= 10 ORDER BY a;
-# The two INSERT transactions should have been committed in opposite order,
-# but in the same group commit (seen by precense of cid=# in the SHOW
-# BINLOG output).
---let $binlog_file= slave-bin.000002
---source include/show_binlog_events.inc
-FLUSH LOGS;
---source include/wait_for_binlog_checkpoint.inc
-
-# Restart all the slave parallel worker threads, to clear all debug_sync actions.
---connection server_2
---source include/stop_slave.inc
-SET GLOBAL slave_parallel_threads=0;
-SET GLOBAL slave_parallel_threads=10;
-SET debug_sync='RESET';
---source include/start_slave.inc
-
-
---echo *** Test that group-committed transactions on the master can replicate in parallel on the slave. ***
---connection server_1
-SET debug_sync='RESET';
-FLUSH LOGS;
---source include/wait_for_binlog_checkpoint.inc
-CREATE TABLE t3 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB;
-# Create some sentinel rows so that the rows inserted in parallel fall into
-# separate gaps and do not cause gap lock conflicts.
-INSERT INTO t3 VALUES (1,1), (3,3), (5,5), (7,7);
---save_master_pos
---connection server_2
---sync_with_master
-
-# We want to test that the transactions can execute out-of-order on
-# the slave, but still end up committing in-order, and in a single
-# group commit.
-#
-# The idea is to group-commit three transactions together on the master:
-# A, B, and C. On the slave, C will execute the insert first, then A,
-# and then B. But B manages to complete before A has time to commit, so
-# all three end up committing together.
-#
-# So we start by setting up some row locks that will block transactions
-# A and B from executing, allowing C to run first.
-
---connection con_temp1
-BEGIN;
-INSERT INTO t3 VALUES (2,102);
---connect (con_temp2,127.0.0.1,root,,test,$SERVER_MYPORT_2,)
-BEGIN;
-INSERT INTO t3 VALUES (4,104);
-
-# On the master, queue three INSERT transactions as a single group commit.
---connect (con_temp3,127.0.0.1,root,,test,$SERVER_MYPORT_1,)
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1';
-SET binlog_format=statement;
-send INSERT INTO t3 VALUES (2, foo(12,
- 'commit_after_release_LOCK_prepare_ordered SIGNAL slave_queued1 WAIT_FOR slave_cont1',
- ''));
-
---connection server_1
-SET debug_sync='now WAIT_FOR master_queued1';
-
---connect (con_temp4,127.0.0.1,root,,test,$SERVER_MYPORT_1,)
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2';
-SET binlog_format=statement;
-send INSERT INTO t3 VALUES (4, foo(14,
- 'commit_after_release_LOCK_prepare_ordered SIGNAL slave_queued2',
- ''));
-
---connection server_1
-SET debug_sync='now WAIT_FOR master_queued2';
-
---connect (con_temp5,127.0.0.1,root,,test,$SERVER_MYPORT_1,)
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued3';
-SET binlog_format=statement;
-send INSERT INTO t3 VALUES (6, foo(16,
- 'group_commit_waiting_for_prior SIGNAL slave_queued3',
- ''));
-
---connection server_1
-SET debug_sync='now WAIT_FOR master_queued3';
-SET debug_sync='now SIGNAL master_cont1';
-
---connection con_temp3
-REAP;
---connection con_temp4
-REAP;
---connection con_temp5
-REAP;
-SET debug_sync='RESET';
-
---connection server_1
-SELECT * FROM t3 ORDER BY a;
---let $binlog_file= master-bin.000002
---source include/show_binlog_events.inc
-
-# First, wait until insert 3 is ready to queue up for group commit, but is
-# waiting for insert 2 to commit before it can do so itself.
---connection server_2
-SET debug_sync='now WAIT_FOR slave_queued3';
-
-# Next, let insert 1 proceed, and allow it to queue up as the group commit
-# leader, but let it wait for insert 2 to also queue up before proceeding.
---connection con_temp1
-ROLLBACK;
---connection server_2
-SET debug_sync='now WAIT_FOR slave_queued1';
-
-# Now let insert 2 proceed and queue up.
---connection con_temp2
-ROLLBACK;
---connection server_2
-SET debug_sync='now WAIT_FOR slave_queued2';
-# And finally, we can let insert 1 proceed and do the group commit with all
-# three insert transactions together.
-SET debug_sync='now SIGNAL slave_cont1';
-
-# Wait for the commit to complete and check that all three transactions
-# group-committed together (will be seen in the binlog as all three having
-# cid=# on their GTID event).
---let $wait_condition= SELECT COUNT(*) = 3 FROM t3 WHERE a IN (2,4,6)
---source include/wait_condition.inc
-SELECT * FROM t3 ORDER BY a;
---let $binlog_file= slave-bin.000003
---source include/show_binlog_events.inc
-
-
---echo *** Test STOP SLAVE in parallel mode ***
---connection server_2
---source include/stop_slave.inc
-# Respawn all worker threads to clear any left-over debug_sync or other stuff.
-SET debug_sync='RESET';
-SET GLOBAL slave_parallel_threads=0;
-SET GLOBAL slave_parallel_threads=10;
-
---connection server_1
-# Set up a couple of transactions. The first will be blocked halfway
-# through on a lock, and while it is blocked we initiate STOP SLAVE.
-# We then test that the halfway-initiated transaction is allowed to
-# complete, but no subsequent ones.
-# We have to use statement-based mode and set
-# binlog_direct_non_transactional_updates=0; otherwise the binlog will
-# be split into two event groups, one for the MyISAM part and one for the
-# InnoDB part.
-SET binlog_direct_non_transactional_updates=0;
-SET sql_log_bin=0;
-CALL mtr.add_suppression("Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction");
-SET sql_log_bin=1;
-BEGIN;
-INSERT INTO t2 VALUES (20);
---disable_warnings
-INSERT INTO t1 VALUES (20);
---enable_warnings
-INSERT INTO t2 VALUES (21);
-INSERT INTO t3 VALUES (20, 20);
-COMMIT;
-INSERT INTO t3 VALUES(21, 21);
-INSERT INTO t3 VALUES(22, 22);
-SET binlog_format=@old_format;
---save_master_pos
-
-# Start a connection that will block the replicated transaction halfway.
---connection con_temp1
-BEGIN;
-INSERT INTO t2 VALUES (21);
-
---connection server_2
-START SLAVE;
-# Wait for the MyISAM change to be visible, after which replication will wait
-# for con_temp1 to roll back.
---let $wait_condition= SELECT COUNT(*) = 1 FROM t1 WHERE a=20
---source include/wait_condition.inc
-
---connection con_temp2
-# Initiate slave stop. It will have to wait for the current event group
-# to complete.
-# The dbug injection causes debug_sync to signal 'wait_for_done_waiting'
-# when the SQL driver thread is ready.
-SET @old_dbug= @@GLOBAL.debug_dbug;
-SET GLOBAL debug_dbug="+d,rpl_parallel_wait_for_done_trigger";
-send STOP SLAVE;
-
---connection con_temp1
-SET debug_sync='now WAIT_FOR wait_for_done_waiting';
-ROLLBACK;
-
---connection con_temp2
-reap;
-SET GLOBAL debug_dbug=@old_dbug;
-SET debug_sync='RESET';
-
---connection server_2
---source include/wait_for_slave_to_stop.inc
-# We should see the first transaction applied, but not the two others.
-SELECT * FROM t1 WHERE a >= 20 ORDER BY a;
-SELECT * FROM t2 WHERE a >= 20 ORDER BY a;
-SELECT * FROM t3 WHERE a >= 20 ORDER BY a;
-
---source include/start_slave.inc
---sync_with_master
-SELECT * FROM t1 WHERE a >= 20 ORDER BY a;
-SELECT * FROM t2 WHERE a >= 20 ORDER BY a;
-SELECT * FROM t3 WHERE a >= 20 ORDER BY a;
-
-
---connection server_2
-# Respawn all worker threads to clear any left-over debug_sync or other stuff.
---source include/stop_slave.inc
-SET GLOBAL binlog_format=@old_format;
-SET GLOBAL slave_parallel_threads=0;
-SET GLOBAL slave_parallel_threads=10;
---source include/start_slave.inc
-
-
---echo *** Test killing slave threads at various wait points ***
---echo *** 1. Test killing transaction waiting in commit for previous transaction to commit ***
-
-# Set up three transactions on the master that will be group-committed
-# together so they can be replicated in parallel on the slave.
---connection con_temp3
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1';
-SET binlog_format=statement;
-send INSERT INTO t3 VALUES (31, foo(31,
- 'commit_before_prepare_ordered WAIT_FOR t2_waiting',
- 'commit_after_prepare_ordered SIGNAL t1_ready WAIT_FOR t1_cont'));
-
---connection server_1
-SET debug_sync='now WAIT_FOR master_queued1';
-
---connection con_temp4
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2';
-SET binlog_format=statement;
-BEGIN;
-# This insert is just so we can get T2 to wait while a query is running that we
-# can see in SHOW PROCESSLIST so we can get its thread_id to kill later.
-INSERT INTO t3 VALUES (32, foo(32,
- 'ha_write_row_end SIGNAL t2_query WAIT_FOR t2_cont',
- ''));
-# This insert sets up debug_sync points so that T2 will tell when it is at its
-# wait point where we want to kill it - and when it has been killed.
-INSERT INTO t3 VALUES (33, foo(33,
- 'group_commit_waiting_for_prior SIGNAL t2_waiting',
- 'group_commit_waiting_for_prior_killed SIGNAL t2_killed'));
-send COMMIT;
-
---connection server_1
-SET debug_sync='now WAIT_FOR master_queued2';
-
---connection con_temp5
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued3';
-SET binlog_format=statement;
-send INSERT INTO t3 VALUES (34, foo(34,
- '',
- ''));
-
---connection server_1
-SET debug_sync='now WAIT_FOR master_queued3';
-SET debug_sync='now SIGNAL master_cont1';
-
---connection con_temp3
-REAP;
---connection con_temp4
-REAP;
---connection con_temp5
-REAP;
-
---connection server_1
-SELECT * FROM t3 WHERE a >= 30 ORDER BY a;
-SET debug_sync='RESET';
-
---connection server_2
-SET sql_log_bin=0;
-CALL mtr.add_suppression("Query execution was interrupted");
-CALL mtr.add_suppression("Commit failed due to failure of an earlier commit on which this one depends");
-CALL mtr.add_suppression("Slave: Connection was killed");
-SET sql_log_bin=1;
-# Wait until T2 is inside executing its insert of 32, then find it in SHOW
-# PROCESSLIST to know its thread id for KILL later.
-SET debug_sync='now WAIT_FOR t2_query';
---let $thd_id= `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE INFO LIKE '%foo(32%' AND INFO NOT LIKE '%LIKE%'`
-SET debug_sync='now SIGNAL t2_cont';
-
-# Wait until T2 has entered its wait for T1 to commit, and T1 has
-# progressed into its commit phase.
-SET debug_sync='now WAIT_FOR t1_ready';
-
-# Now kill the transaction T2.
---replace_result $thd_id THD_ID
-eval KILL $thd_id;
-
-# Wait until T2 has reacted on the kill.
-SET debug_sync='now WAIT_FOR t2_killed';
-
-# Now we can allow T1 to proceed.
-SET debug_sync='now SIGNAL t1_cont';
-
---let $slave_sql_errno= 1317,1927,1964
---source include/wait_for_slave_sql_error.inc
-STOP SLAVE IO_THREAD;
-SELECT * FROM t3 WHERE a >= 30 ORDER BY a;
-
-# Now we have to disable the debug_sync statements, so they do not trigger
-# when the events are retried.
-SET debug_sync='RESET';
-SET GLOBAL slave_parallel_threads=0;
-SET GLOBAL slave_parallel_threads=10;
-SET sql_log_bin=0;
-DROP FUNCTION foo;
---delimiter ||
-CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
- RETURNS INT DETERMINISTIC
- BEGIN
- RETURN x;
- END
-||
---delimiter ;
-SET sql_log_bin=1;
-
---connection server_1
-INSERT INTO t3 VALUES (39,0);
---save_master_pos
-
---connection server_2
---source include/start_slave.inc
---sync_with_master
-SELECT * FROM t3 WHERE a >= 30 ORDER BY a;
-# Restore the foo() function.
-SET sql_log_bin=0;
-DROP FUNCTION foo;
---delimiter ||
-CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
- RETURNS INT DETERMINISTIC
- BEGIN
- IF d1 != '' THEN
- SET debug_sync = d1;
- END IF;
- IF d2 != '' THEN
- SET debug_sync = d2;
- END IF;
- RETURN x;
- END
-||
---delimiter ;
-SET sql_log_bin=1;
-
-
---connection server_2
-# Respawn all worker threads to clear any left-over debug_sync or other stuff.
---source include/stop_slave.inc
-SET GLOBAL binlog_format=@old_format;
-SET GLOBAL slave_parallel_threads=0;
-SET GLOBAL slave_parallel_threads=10;
---source include/start_slave.inc
-
-
---echo *** 2. Same as (1), but without restarting IO thread after kill of SQL threads ***
-
-# Set up three transactions on the master that will be group-committed
-# together so they can be replicated in parallel on the slave.
---connection con_temp3
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1';
-SET binlog_format=statement;
-send INSERT INTO t3 VALUES (41, foo(41,
- 'commit_before_prepare_ordered WAIT_FOR t2_waiting',
- 'commit_after_prepare_ordered SIGNAL t1_ready WAIT_FOR t1_cont'));
-
---connection server_1
-SET debug_sync='now WAIT_FOR master_queued1';
-
---connection con_temp4
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2';
-SET binlog_format=statement;
-BEGIN;
-# This insert is just so we can get T2 to wait while a query is running that we
-# can see in SHOW PROCESSLIST so we can get its thread_id to kill later.
-INSERT INTO t3 VALUES (42, foo(42,
- 'ha_write_row_end SIGNAL t2_query WAIT_FOR t2_cont',
- ''));
-# This insert sets up debug_sync points so that T2 will tell when it is at its
-# wait point where we want to kill it - and when it has been killed.
-INSERT INTO t3 VALUES (43, foo(43,
- 'group_commit_waiting_for_prior SIGNAL t2_waiting',
- 'group_commit_waiting_for_prior_killed SIGNAL t2_killed'));
-send COMMIT;
-
---connection server_1
-SET debug_sync='now WAIT_FOR master_queued2';
-
---connection con_temp5
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued3';
-SET binlog_format=statement;
-send INSERT INTO t3 VALUES (44, foo(44,
- '',
- ''));
-
---connection server_1
-SET debug_sync='now WAIT_FOR master_queued3';
-SET debug_sync='now SIGNAL master_cont1';
-
---connection con_temp3
-REAP;
---connection con_temp4
-REAP;
---connection con_temp5
-REAP;
-
---connection server_1
-SELECT * FROM t3 WHERE a >= 40 ORDER BY a;
-SET debug_sync='RESET';
-
---connection server_2
-# Wait until T2 is inside executing its insert of 42, then find it in SHOW
-# PROCESSLIST to know its thread id for KILL later.
-SET debug_sync='now WAIT_FOR t2_query';
---let $thd_id= `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE INFO LIKE '%foo(42%' AND INFO NOT LIKE '%LIKE%'`
-SET debug_sync='now SIGNAL t2_cont';
-
-# Wait until T2 has entered its wait for T1 to commit, and T1 has
-# progressed into its commit phase.
-SET debug_sync='now WAIT_FOR t1_ready';
-
-# Now kill the transaction T2.
---replace_result $thd_id THD_ID
-eval KILL $thd_id;
-
-# Wait until T2 has reacted on the kill.
-SET debug_sync='now WAIT_FOR t2_killed';
-
-# Now we can allow T1 to proceed.
-SET debug_sync='now SIGNAL t1_cont';
-
---let $slave_sql_errno= 1317,1927,1964
---source include/wait_for_slave_sql_error.inc
-
-# Now we have to disable the debug_sync statements, so they do not trigger
-# when the events are retried.
-SET debug_sync='RESET';
-SET GLOBAL slave_parallel_threads=0;
-SET GLOBAL slave_parallel_threads=10;
-SET sql_log_bin=0;
-DROP FUNCTION foo;
---delimiter ||
-CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
- RETURNS INT DETERMINISTIC
- BEGIN
- RETURN x;
- END
-||
---delimiter ;
-SET sql_log_bin=1;
-
---connection server_1
-INSERT INTO t3 VALUES (49,0);
---save_master_pos
-
---connection server_2
-START SLAVE SQL_THREAD;
---sync_with_master
-SELECT * FROM t3 WHERE a >= 40 ORDER BY a;
-# Restore the foo() function.
-SET sql_log_bin=0;
-DROP FUNCTION foo;
---delimiter ||
-CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
- RETURNS INT DETERMINISTIC
- BEGIN
- IF d1 != '' THEN
- SET debug_sync = d1;
- END IF;
- IF d2 != '' THEN
- SET debug_sync = d2;
- END IF;
- RETURN x;
- END
-||
---delimiter ;
-SET sql_log_bin=1;
-
-
---connection server_2
-# Respawn all worker threads to clear any left-over debug_sync or other stuff.
---source include/stop_slave.inc
-SET GLOBAL binlog_format=@old_format;
-SET GLOBAL slave_parallel_threads=0;
-SET GLOBAL slave_parallel_threads=10;
---source include/start_slave.inc
-
-
---echo *** 3. Same as (2), but not using gtid mode ***
-
---connection server_2
---source include/stop_slave.inc
-CHANGE MASTER TO master_use_gtid=no;
---source include/start_slave.inc
-
---connection server_1
-# Set up three transactions on the master that will be group-committed
-# together so they can be replicated in parallel on the slave.
---connection con_temp3
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1';
-SET binlog_format=statement;
-send INSERT INTO t3 VALUES (51, foo(51,
- 'commit_before_prepare_ordered WAIT_FOR t2_waiting',
- 'commit_after_prepare_ordered SIGNAL t1_ready WAIT_FOR t1_cont'));
-
---connection server_1
-SET debug_sync='now WAIT_FOR master_queued1';
-
---connection con_temp4
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2';
-SET binlog_format=statement;
-BEGIN;
-# This insert is just so we can get T2 to wait while a query is running that we
-# can see in SHOW PROCESSLIST so we can get its thread_id to kill later.
-INSERT INTO t3 VALUES (52, foo(52,
- 'ha_write_row_end SIGNAL t2_query WAIT_FOR t2_cont',
- ''));
-# This insert sets up debug_sync points so that T2 will tell when it is at its
-# wait point where we want to kill it - and when it has been killed.
-INSERT INTO t3 VALUES (53, foo(53,
- 'group_commit_waiting_for_prior SIGNAL t2_waiting',
- 'group_commit_waiting_for_prior_killed SIGNAL t2_killed'));
-send COMMIT;
-
---connection server_1
-SET debug_sync='now WAIT_FOR master_queued2';
-
---connection con_temp5
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued3';
-SET binlog_format=statement;
-send INSERT INTO t3 VALUES (54, foo(54,
- '',
- ''));
-
---connection server_1
-SET debug_sync='now WAIT_FOR master_queued3';
-SET debug_sync='now SIGNAL master_cont1';
-
---connection con_temp3
-REAP;
---connection con_temp4
-REAP;
---connection con_temp5
-REAP;
-
---connection server_1
-SELECT * FROM t3 WHERE a >= 50 ORDER BY a;
-SET debug_sync='RESET';
-
---connection server_2
-# Wait until T2 is inside executing its insert of 52, then find it in SHOW
-# PROCESSLIST to know its thread id for KILL later.
-SET debug_sync='now WAIT_FOR t2_query';
---let $thd_id= `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE INFO LIKE '%foo(52%' AND INFO NOT LIKE '%LIKE%'`
-SET debug_sync='now SIGNAL t2_cont';
-
-# Wait until T2 has entered its wait for T1 to commit, and T1 has
-# progressed into its commit phase.
-SET debug_sync='now WAIT_FOR t1_ready';
-
-# Now kill the transaction T2.
---replace_result $thd_id THD_ID
-eval KILL $thd_id;
-
-# Wait until T2 has reacted on the kill.
-SET debug_sync='now WAIT_FOR t2_killed';
-
-# Now we can allow T1 to proceed.
-SET debug_sync='now SIGNAL t1_cont';
-
---let $slave_sql_errno= 1317,1927,1964
---source include/wait_for_slave_sql_error.inc
-SELECT * FROM t3 WHERE a >= 50 ORDER BY a;
-
-# Now we have to disable the debug_sync statements, so they do not trigger
-# when the events are retried.
-SET debug_sync='RESET';
-SET GLOBAL slave_parallel_threads=0;
-SET GLOBAL slave_parallel_threads=10;
-SET sql_log_bin=0;
-DROP FUNCTION foo;
---delimiter ||
-CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
- RETURNS INT DETERMINISTIC
- BEGIN
- RETURN x;
- END
-||
---delimiter ;
-SET sql_log_bin=1;
-
---connection server_1
-INSERT INTO t3 VALUES (59,0);
---save_master_pos
-
---connection server_2
-START SLAVE SQL_THREAD;
---sync_with_master
-SELECT * FROM t3 WHERE a >= 50 ORDER BY a;
-# Restore the foo() function.
-SET sql_log_bin=0;
-DROP FUNCTION foo;
---delimiter ||
-CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
- RETURNS INT DETERMINISTIC
- BEGIN
- IF d1 != '' THEN
- SET debug_sync = d1;
- END IF;
- IF d2 != '' THEN
- SET debug_sync = d2;
- END IF;
- RETURN x;
- END
-||
---delimiter ;
-SET sql_log_bin=1;
-
-
---source include/stop_slave.inc
-CHANGE MASTER TO master_use_gtid=slave_pos;
---source include/start_slave.inc
-
---connection server_2
-# Respawn all worker threads to clear any left-over debug_sync or other stuff.
---source include/stop_slave.inc
-SET GLOBAL binlog_format=@old_format;
-SET GLOBAL slave_parallel_threads=0;
-SET GLOBAL slave_parallel_threads=4;
---source include/start_slave.inc
-
-
---echo *** 4. Test killing thread that is waiting to start transaction until previous transaction commits ***
-
-# We set up four transactions T1, T2, T3, and T4 on the master. T2, T3, and T4
-# can run in parallel with each other (same group commit and commit id),
-# but not in parallel with T1.
-#
-# We use four worker threads, each Ti will be queued on each their own
-# worker thread. We will delay T1 commit, T3 will wait for T1 to begin
-# commit before it can start. We will kill T3 during this wait, and
-# check that everything works correctly.
-#
-# It is rather tricky to get the correct thread id of the worker to kill.
-# We start by injecting four dummy transactions in a debug_sync-controlled
-# manner to be able to get known thread ids for the workers in a pool with
-# just 4 worker threads. Then we let in each of the real test transactions
-# T1-T4 one at a time in a way which allows us to know which transaction
-# ends up with which thread id.
-
---connection server_1
-SET binlog_format=statement;
-SET gtid_domain_id=2;
-BEGIN;
-# This debug_sync will linger on and be used to control T4 later.
-INSERT INTO t3 VALUES (70, foo(70,
- 'rpl_parallel_start_waiting_for_prior SIGNAL t4_waiting', ''));
-INSERT INTO t3 VALUES (60, foo(60,
- 'ha_write_row_end SIGNAL d2_query WAIT_FOR d2_cont2',
- 'rpl_parallel_end_of_group SIGNAL d2_done WAIT_FOR d2_cont'));
-COMMIT;
-SET gtid_domain_id=0;
-
---connection server_2
-SET debug_sync='now WAIT_FOR d2_query';
---let $d2_thd_id= `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE INFO LIKE '%foo(60%' AND INFO NOT LIKE '%LIKE%'`
-
---connection server_1
-SET gtid_domain_id=1;
-BEGIN;
-# These debug_sync's will linger on and be used to control T3 later.
-INSERT INTO t3 VALUES (61, foo(61,
- 'rpl_parallel_start_waiting_for_prior SIGNAL t3_waiting',
- 'rpl_parallel_start_waiting_for_prior_killed SIGNAL t3_killed'));
-INSERT INTO t3 VALUES (62, foo(62,
- 'ha_write_row_end SIGNAL d1_query WAIT_FOR d1_cont2',
- 'rpl_parallel_end_of_group SIGNAL d1_done WAIT_FOR d1_cont'));
-COMMIT;
-SET gtid_domain_id=0;
-
---connection server_2
-SET debug_sync='now WAIT_FOR d1_query';
---let $d1_thd_id= `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE INFO LIKE '%foo(62%' AND INFO NOT LIKE '%LIKE%'`
-
---connection server_1
-SET gtid_domain_id=0;
-INSERT INTO t3 VALUES (63, foo(63,
- 'ha_write_row_end SIGNAL d0_query WAIT_FOR d0_cont2',
- 'rpl_parallel_end_of_group SIGNAL d0_done WAIT_FOR d0_cont'));
-
---connection server_2
-SET debug_sync='now WAIT_FOR d0_query';
---let $d0_thd_id= `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE INFO LIKE '%foo(63%' AND INFO NOT LIKE '%LIKE%'`
-
---connection server_1
-SET gtid_domain_id=3;
-BEGIN;
-# These debug_sync's will linger on and be used to control T2 later.
-INSERT INTO t3 VALUES (68, foo(68,
- 'rpl_parallel_start_waiting_for_prior SIGNAL t2_waiting', ''));
-INSERT INTO t3 VALUES (69, foo(69,
- 'ha_write_row_end SIGNAL d3_query WAIT_FOR d3_cont2',
- 'rpl_parallel_end_of_group SIGNAL d3_done WAIT_FOR d3_cont'));
-COMMIT;
-SET gtid_domain_id=0;
-
---connection server_2
-SET debug_sync='now WAIT_FOR d3_query';
---let $d3_thd_id= `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE INFO LIKE '%foo(69%' AND INFO NOT LIKE '%LIKE%'`
-
-SET debug_sync='now SIGNAL d2_cont2';
-SET debug_sync='now WAIT_FOR d2_done';
-SET debug_sync='now SIGNAL d1_cont2';
-SET debug_sync='now WAIT_FOR d1_done';
-SET debug_sync='now SIGNAL d0_cont2';
-SET debug_sync='now WAIT_FOR d0_done';
-SET debug_sync='now SIGNAL d3_cont2';
-SET debug_sync='now WAIT_FOR d3_done';
-
-# Now prepare the real transactions T1, T2, T3, T4 on the master.
-
---connection con_temp3
-# Create transaction T1.
-SET binlog_format=statement;
-INSERT INTO t3 VALUES (64, foo(64,
- 'rpl_parallel_before_mark_start_commit SIGNAL t1_waiting WAIT_FOR t1_cont', ''));
-
-# Create transaction T2, as a group commit leader on the master.
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2 WAIT_FOR master_cont2';
-send INSERT INTO t3 VALUES (65, foo(65, '', ''));
-
---connection server_1
-SET debug_sync='now WAIT_FOR master_queued2';
-
---connection con_temp4
-# Create transaction T3, participating in T2's group commit.
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued3';
-send INSERT INTO t3 VALUES (66, foo(66, '', ''));
-
---connection server_1
-SET debug_sync='now WAIT_FOR master_queued3';
-
---connection con_temp5
-# Create transaction T4, participating in group commit with T2 and T3.
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued4';
-send INSERT INTO t3 VALUES (67, foo(67, '', ''));
-
---connection server_1
-SET debug_sync='now WAIT_FOR master_queued4';
-SET debug_sync='now SIGNAL master_cont2';
-
---connection con_temp3
-REAP;
---connection con_temp4
-REAP;
---connection con_temp5
-REAP;
-
---connection server_1
-SELECT * FROM t3 WHERE a >= 60 ORDER BY a;
-SET debug_sync='RESET';
-
---connection server_2
-# Now we have the four transactions pending for replication on the slave.
-# Let them be queued for our three worker threads in a controlled fashion.
-# We put them at a stage where T1 is delayed and T3 is waiting for T1 to
-# commit before T3 can start. Then we kill T3.
-
-# Make the worker D0 free, and wait for T1 to be queued in it.
-SET debug_sync='now SIGNAL d0_cont';
-SET debug_sync='now WAIT_FOR t1_waiting';
-
-# Make the worker D3 free, and wait for T2 to be queued in it.
-SET debug_sync='now SIGNAL d3_cont';
-SET debug_sync='now WAIT_FOR t2_waiting';
-
-# Now release worker D1, and wait for T3 to be queued in it.
-# T3 will wait for T1 to commit before it can start.
-SET debug_sync='now SIGNAL d1_cont';
-SET debug_sync='now WAIT_FOR t3_waiting';
-
-# Release worker D2. Wait for T4 to be queued, so we are sure it has
-# received the debug_sync signal (else we might overwrite it with the
-# next debug_sync).
-SET debug_sync='now SIGNAL d2_cont';
-SET debug_sync='now WAIT_FOR t4_waiting';
-
-# Now we kill the waiting transaction T3 in worker D1.
---replace_result $d1_thd_id THD_ID
-eval KILL $d1_thd_id;
-
-# Wait until T3 has reacted on the kill.
-SET debug_sync='now WAIT_FOR t3_killed';
-
-# Now we can allow T1 to proceed.
-SET debug_sync='now SIGNAL t1_cont';
-
---let $slave_sql_errno= 1317,1927,1964
---source include/wait_for_slave_sql_error.inc
-STOP SLAVE IO_THREAD;
-# Since T2, T3, and T4 run in parallel, we can not be sure if T2 will have time
-# to commit or not before the stop. However, T1 should commit, and T3/T4 may
-# not have committed. (After slave restart we check that all become committed
-# eventually).
-SELECT * FROM t3 WHERE a >= 60 AND a != 65 ORDER BY a;
-
-# Now we have to disable the debug_sync statements, so they do not trigger
-# when the events are retried.
-SET debug_sync='RESET';
-SET GLOBAL slave_parallel_threads=0;
-SET GLOBAL slave_parallel_threads=10;
-SET sql_log_bin=0;
-DROP FUNCTION foo;
---delimiter ||
-CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
- RETURNS INT DETERMINISTIC
- BEGIN
- RETURN x;
- END
-||
---delimiter ;
-SET sql_log_bin=1;
-
---connection server_1
-UPDATE t3 SET b=b+1 WHERE a=60;
---save_master_pos
-
---connection server_2
---source include/start_slave.inc
---sync_with_master
-SELECT * FROM t3 WHERE a >= 60 ORDER BY a;
-# Restore the foo() function.
-SET sql_log_bin=0;
-DROP FUNCTION foo;
---delimiter ||
-CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
- RETURNS INT DETERMINISTIC
- BEGIN
- IF d1 != '' THEN
- SET debug_sync = d1;
- END IF;
- IF d2 != '' THEN
- SET debug_sync = d2;
- END IF;
- RETURN x;
- END
-||
---delimiter ;
-SET sql_log_bin=1;
-
---connection server_2
-# Respawn all worker threads to clear any left-over debug_sync or other stuff.
---source include/stop_slave.inc
-SET GLOBAL binlog_format=@old_format;
-SET GLOBAL slave_parallel_threads=0;
-SET GLOBAL slave_parallel_threads=10;
---source include/start_slave.inc
-
-
---echo *** 5. Test killing thread that is waiting for queue of max length to shorten ***
-
-# Find the thread id of the driver SQL thread that we want to kill.
---let $wait_condition= SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE '%Slave has read all relay log%'
---source include/wait_condition.inc
---let $thd_id= `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE '%Slave has read all relay log%'`
-SET @old_max_queued= @@GLOBAL.slave_parallel_max_queued;
-SET GLOBAL slave_parallel_max_queued=9000;
-
---connection server_1
---let bigstring= `SELECT REPEAT('x', 10000)`
-SET binlog_format=statement;
-# Create an event that will wait to be signalled.
-INSERT INTO t3 VALUES (80, foo(0,
- 'ha_write_row_end SIGNAL query_waiting WAIT_FOR query_cont', ''));
-
---connection server_2
-SET debug_sync='now WAIT_FOR query_waiting';
-# Inject that the SQL driver thread will signal `wait_queue_ready' to debug_sync
-# as it goes to wait for the event queue to become smaller than the value of
-# @@slave_parallel_max_queued.
-SET @old_dbug= @@GLOBAL.debug_dbug;
-SET GLOBAL debug_dbug="+d,rpl_parallel_wait_queue_max";
-
---connection server_1
---disable_query_log
-# Create an event that will fill up the queue.
-# The Xid event at the end of the event group will have to wait for the Query
-# event with the INSERT to drain so the queue becomes shorter. However that in
-# turn waits for the prior event group to continue.
-eval INSERT INTO t3 VALUES (81, LENGTH('$bigstring'));
---enable_query_log
-SELECT * FROM t3 WHERE a >= 80 ORDER BY a;
-
---connection server_2
-SET debug_sync='now WAIT_FOR wait_queue_ready';
-
---replace_result $thd_id THD_ID
-eval KILL $thd_id;
-
-SET debug_sync='now WAIT_FOR wait_queue_killed';
-SET debug_sync='now SIGNAL query_cont';
-
---let $slave_sql_errno= 1317,1927,1964
---source include/wait_for_slave_sql_error.inc
-STOP SLAVE IO_THREAD;
-
-SET GLOBAL debug_dbug=@old_dbug;
-SET GLOBAL slave_parallel_max_queued= @old_max_queued;
-
---connection server_1
-INSERT INTO t3 VALUES (82,0);
-SET binlog_format=@old_format;
---save_master_pos
-
---connection server_2
-SET debug_sync='RESET';
---source include/start_slave.inc
---sync_with_master
-SELECT * FROM t3 WHERE a >= 80 ORDER BY a;
-
-
---connection server_2
---source include/stop_slave.inc
-SET GLOBAL binlog_format=@old_format;
-SET GLOBAL slave_parallel_threads=0;
-SET GLOBAL slave_parallel_threads=10;
---source include/start_slave.inc
-
---echo *** MDEV-5788 Incorrect free of rgi->deferred_events in parallel replication ***
-
---connection server_2
-# Use just two worker threads, so we are sure to get the rpl_group_info added
-# to the free list, which is what triggered the bug.
---source include/stop_slave.inc
-SET GLOBAL replicate_ignore_table="test.t3";
-SET GLOBAL slave_parallel_threads=2;
---source include/start_slave.inc
-
---connection server_1
-INSERT INTO t3 VALUES (100, rand());
-INSERT INTO t3 VALUES (101, rand());
-
---save_master_pos
-
---connection server_2
---sync_with_master
-
---connection server_1
-INSERT INTO t3 VALUES (102, rand());
-INSERT INTO t3 VALUES (103, rand());
-INSERT INTO t3 VALUES (104, rand());
-INSERT INTO t3 VALUES (105, rand());
-
---save_master_pos
-
---connection server_2
---sync_with_master
---source include/stop_slave.inc
-SET GLOBAL replicate_ignore_table="";
---source include/start_slave.inc
-
---connection server_1
-INSERT INTO t3 VALUES (106, rand());
-INSERT INTO t3 VALUES (107, rand());
---save_master_pos
-
---connection server_2
---sync_with_master
---replace_column 2 #
-SELECT * FROM t3 WHERE a >= 100 ORDER BY a;
-
-
---echo *** MDEV-5921: In parallel replication, an error is not correctly signalled to the next transaction ***
-
---connection server_2
---source include/stop_slave.inc
-SET GLOBAL slave_parallel_threads=10;
---source include/start_slave.inc
-
---connection server_1
-INSERT INTO t3 VALUES (110, 1);
---save_master_pos
-
---connection server_2
---sync_with_master
-SELECT * FROM t3 WHERE a >= 110 ORDER BY a;
-# Inject a duplicate key error.
-SET sql_log_bin=0;
-INSERT INTO t3 VALUES (111, 666);
-SET sql_log_bin=1;
-
---connection server_1
-
-# Create a group commit with two inserts, the first one conflicts with a row on the slave
---connect (con1,127.0.0.1,root,,test,$SERVER_MYPORT_1,)
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1';
-send INSERT INTO t3 VALUES (111, 2);
---connection server_1
-SET debug_sync='now WAIT_FOR master_queued1';
-
---connect (con2,127.0.0.1,root,,test,$SERVER_MYPORT_1,)
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2';
-send INSERT INTO t3 VALUES (112, 3);
-
---connection server_1
-SET debug_sync='now WAIT_FOR master_queued2';
-SET debug_sync='now SIGNAL master_cont1';
-
---connection con1
-REAP;
---connection con2
-REAP;
-SET debug_sync='RESET';
---save_master_pos
-
---connection server_2
---let $slave_sql_errno= 1062
---source include/wait_for_slave_sql_error.inc
---source include/wait_for_slave_sql_to_stop.inc
-# We should not see the row (112,3) here, it should be rolled back due to
-# error signal from the prior transaction.
-SELECT * FROM t3 WHERE a >= 110 ORDER BY a;
-SET sql_log_bin=0;
-DELETE FROM t3 WHERE a=111 AND b=666;
-SET sql_log_bin=1;
-START SLAVE SQL_THREAD;
---sync_with_master
-SELECT * FROM t3 WHERE a >= 110 ORDER BY a;
-
-
---echo ***MDEV-5914: Parallel replication deadlock due to InnoDB lock conflicts ***
---connection server_2
---source include/stop_slave.inc
-
---connection server_1
-CREATE TABLE t4 (a INT PRIMARY KEY, b INT, KEY b_idx(b)) ENGINE=InnoDB;
-INSERT INTO t4 VALUES (1,NULL), (2,2), (3,NULL), (4,4), (5, NULL), (6, 6);
-
-# Create a group commit with UPDATE and DELETE, in that order.
-# The bug was that while the UPDATE's row lock does not block the DELETE, the
-# DELETE's gap lock _does_ block the UPDATE. This could cause a deadlock
-# on the slave.
---connection con1
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1';
-send UPDATE t4 SET b=NULL WHERE a=6;
---connection server_1
-SET debug_sync='now WAIT_FOR master_queued1';
-
---connection con2
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2';
-send DELETE FROM t4 WHERE b <= 3;
-
---connection server_1
-SET debug_sync='now WAIT_FOR master_queued2';
-SET debug_sync='now SIGNAL master_cont1';
-
---connection con1
-REAP;
---connection con2
-REAP;
-SET debug_sync='RESET';
---save_master_pos
-
---connection server_2
---source include/start_slave.inc
---sync_with_master
---source include/stop_slave.inc
-
-SELECT * FROM t4 ORDER BY a;
-
-
-# Another example, this one with INSERT vs. DELETE
---connection server_1
-DELETE FROM t4;
-INSERT INTO t4 VALUES (1,NULL), (2,2), (3,NULL), (4,4), (5, NULL), (6, 6);
-
-# Create a group commit with INSERT and DELETE, in that order.
-# The bug was that while the INSERT's insert intention lock does not block
-# the DELETE, the DELETE's gap lock _does_ block the INSERT. This could cause
-# a deadlock on the slave.
---connection con1
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1';
-send INSERT INTO t4 VALUES (7, NULL);
---connection server_1
-SET debug_sync='now WAIT_FOR master_queued1';
-
---connection con2
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2';
-send DELETE FROM t4 WHERE b <= 3;
-
---connection server_1
-SET debug_sync='now WAIT_FOR master_queued2';
-SET debug_sync='now SIGNAL master_cont1';
-
---connection con1
-REAP;
---connection con2
-REAP;
-SET debug_sync='RESET';
---save_master_pos
-
---connection server_2
---source include/start_slave.inc
---sync_with_master
---source include/stop_slave.inc
-
-SELECT * FROM t4 ORDER BY a;
-
-
-# MDEV-6549, failing to update gtid_slave_pos for a transaction that was retried.
-# The problem was that when a transaction updates the mysql.gtid_slave_pos
-# table, it clears the flag that marks that there is a GTID position that
-# needs to be updated. Then, if the transaction got killed after that due
-# to a deadlock, the subsequent retry would fail to notice that the GTID needs
-# to be recorded in gtid_slave_pos.
-#
-# (In the original bug report, the symptom was an assertion; this was however
-# just a side effect of the missing update of gtid_slave_pos, which also
-# happened to cause a missing clear of OPTION_GTID_BEGIN).
---connection server_1
-DELETE FROM t4;
-INSERT INTO t4 VALUES (1,NULL), (2,2), (3,NULL), (4,4), (5, NULL), (6, 6);
-
-# Create two transactions that can run in parallel on the slave but cause
-# a deadlock if the second runs before the first.
---connection con1
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1';
-send UPDATE t4 SET b=NULL WHERE a=6;
---connection server_1
-SET debug_sync='now WAIT_FOR master_queued1';
-
---connection con2
-# Must use statement-based binlogging. Otherwise the transaction will not be
-# binlogged at all, as it modifies no rows.
-SET @old_format= @@SESSION.binlog_format;
-SET binlog_format='statement';
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2';
-send DELETE FROM t4 WHERE b <= 1;
-
---connection server_1
-SET debug_sync='now WAIT_FOR master_queued2';
-SET debug_sync='now SIGNAL master_cont1';
-
---connection con1
-REAP;
---connection con2
-REAP;
-SET @old_format=@@GLOBAL.binlog_format;
-SET debug_sync='RESET';
---save_master_pos
---let $last_gtid= `SELECT @@last_gtid`
-
---connection server_2
-# Disable the usual skip of gap locks for transactions that are run in
-# parallel, using DBUG. This allows the deadlock to occur, and this in turn
-# triggers a retry of the second transaction, and the code that was buggy and
-# caused the gtid_slave_pos update to be skipped in the retry.
-SET @old_dbug= @@GLOBAL.debug_dbug;
-SET GLOBAL debug_dbug="+d,disable_thd_need_ordering_with";
---source include/start_slave.inc
---sync_with_master
-SET GLOBAL debug_dbug=@old_dbug;
-
-SELECT * FROM t4 ORDER BY a;
-# Check that the GTID of the second transaction was correctly recorded in
-# gtid_slave_pos, in the variable as well as in the table.
---replace_result $last_gtid GTID
-eval SET @last_gtid= '$last_gtid';
-SELECT IF(@@gtid_slave_pos LIKE CONCAT('%',@last_gtid,'%'), "GTID found ok",
- CONCAT("GTID ", @last_gtid, " not found in gtid_slave_pos=", @@gtid_slave_pos))
- AS result;
-SELECT "ROW FOUND" AS `Is the row found?`
- FROM mysql.gtid_slave_pos
- WHERE CONCAT(domain_id, "-", server_id, "-", seq_no) = @last_gtid;
-
-
---echo *** MDEV-5938: Exec_master_log_pos not updated at log rotate in parallel replication ***
---connection server_2
---source include/stop_slave.inc
-SET GLOBAL slave_parallel_threads=1;
-SET DEBUG_SYNC= 'RESET';
---source include/start_slave.inc
-
---connection server_1
-CREATE TABLE t5 (a INT PRIMARY KEY, b INT);
-INSERT INTO t5 VALUES (1,1);
-INSERT INTO t5 VALUES (2,2), (3,8);
-INSERT INTO t5 VALUES (4,16);
---save_master_pos
-
---connection server_2
---sync_with_master
-let $io_file= query_get_value(SHOW SLAVE STATUS, Master_Log_File, 1);
-let $io_pos= query_get_value(SHOW SLAVE STATUS, Read_Master_Log_Pos, 1);
-let $sql_file= query_get_value(SHOW SLAVE STATUS, Relay_Master_Log_File, 1);
-let $sql_pos= query_get_value(SHOW SLAVE STATUS, Exec_Master_Log_Pos, 1);
---disable_query_log
-eval SELECT IF('$io_file' = '$sql_file', "OK", "Not ok, $io_file <> $sql_file") AS test_check;
-eval SELECT IF('$io_pos' = '$sql_pos', "OK", "Not ok, $io_pos <> $sql_pos") AS test_check;
---enable_query_log
-
---connection server_1
-FLUSH LOGS;
---source include/wait_for_binlog_checkpoint.inc
---save_master_pos
-
---connection server_2
---sync_with_master
-let $io_file= query_get_value(SHOW SLAVE STATUS, Master_Log_File, 1);
-let $io_pos= query_get_value(SHOW SLAVE STATUS, Read_Master_Log_Pos, 1);
-let $sql_file= query_get_value(SHOW SLAVE STATUS, Relay_Master_Log_File, 1);
-let $sql_pos= query_get_value(SHOW SLAVE STATUS, Exec_Master_Log_Pos, 1);
---disable_query_log
-eval SELECT IF('$io_file' = '$sql_file', "OK", "Not ok, $io_file <> $sql_file") AS test_check;
-eval SELECT IF('$io_pos' = '$sql_pos', "OK", "Not ok, $io_pos <> $sql_pos") AS test_check;
---enable_query_log
-
-
---echo *** MDEV_6435: Incorrect error handling when query binlogged partially on master with "killed" error ***
-
---connection server_1
-CREATE TABLE t6 (a INT) ENGINE=MyISAM;
-CREATE TRIGGER tr AFTER INSERT ON t6 FOR EACH ROW SET @a = 1;
-
---connection con1
-SET @old_format= @@binlog_format;
-SET binlog_format= statement;
---let $conid = `SELECT CONNECTION_ID()`
-SET debug_sync='sp_head_execute_before_loop SIGNAL ready WAIT_FOR cont';
-send INSERT INTO t6 VALUES (1), (2), (3);
-
---connection server_1
-SET debug_sync='now WAIT_FOR ready';
---replace_result $conid CONID
-eval KILL QUERY $conid;
-SET debug_sync='now SIGNAL cont';
-
---connection con1
---error ER_QUERY_INTERRUPTED
---reap
-SET binlog_format= @old_format;
-SET debug_sync='RESET';
---let $after_error_gtid_pos= `SELECT @@gtid_binlog_pos`
-
---connection server_1
-SET debug_sync='RESET';
-
-
---connection server_2
---let $slave_sql_errno= 1317
---source include/wait_for_slave_sql_error.inc
-STOP SLAVE IO_THREAD;
---replace_result $after_error_gtid_pos AFTER_ERROR_GTID_POS
-eval SET GLOBAL gtid_slave_pos= '$after_error_gtid_pos';
---source include/start_slave.inc
-
---connection server_1
-INSERT INTO t6 VALUES (4);
-SELECT * FROM t6 ORDER BY a;
---save_master_pos
-
---connection server_2
---sync_with_master
-SELECT * FROM t6 ORDER BY a;
-
-
---echo *** MDEV-6551: Some replication errors are ignored if slave_parallel_threads > 0 ***
-
---connection server_1
-INSERT INTO t2 VALUES (31);
---let $gtid1= `SELECT @@LAST_GTID`
---source include/save_master_gtid.inc
-
---connection server_2
---source include/sync_with_master_gtid.inc
---source include/stop_slave.inc
-SET GLOBAL slave_parallel_threads= 0;
---source include/start_slave.inc
-
-# Force a duplicate key error on the slave.
-SET sql_log_bin= 0;
-INSERT INTO t2 VALUES (32);
-SET sql_log_bin= 1;
-
---connection server_1
-INSERT INTO t2 VALUES (32);
---let $gtid2= `SELECT @@LAST_GTID`
-# Rotate the binlog; the bug is triggered when the master binlog file changes
-# after the event group that causes the duplicate key error.
-FLUSH LOGS;
-INSERT INTO t2 VALUES (33);
-INSERT INTO t2 VALUES (34);
-SELECT * FROM t2 WHERE a >= 30 ORDER BY a;
---source include/save_master_gtid.inc
-
---connection server_2
---let $slave_sql_errno= 1062
---source include/wait_for_slave_sql_error.inc
-
---connection server_2
---source include/stop_slave_io.inc
-SET GLOBAL slave_parallel_threads=10;
-START SLAVE;
-
---let $slave_sql_errno= 1062
---source include/wait_for_slave_sql_error.inc
-
-# Note: IO thread is still running at this point.
-# The bug seems to have been that restarting the SQL thread after an error with
-# the IO thread still running, somehow picks up a later relay log position and
-# thus ends up skipping the failing event, rather than re-executing.
-
-START SLAVE SQL_THREAD;
---let $slave_sql_errno= 1062
---source include/wait_for_slave_sql_error.inc
-
-SELECT * FROM t2 WHERE a >= 30 ORDER BY a;
-
-# Skip the duplicate error, so we can proceed.
---error ER_SLAVE_SKIP_NOT_IN_GTID
-SET sql_slave_skip_counter= 1;
---source include/stop_slave_io.inc
---disable_query_log
-eval SET GLOBAL gtid_slave_pos = REPLACE(@@gtid_slave_pos, "$gtid1", "$gtid2");
---enable_query_log
---source include/start_slave.inc
---source include/sync_with_master_gtid.inc
-
-SELECT * FROM t2 WHERE a >= 30 ORDER BY a;
-
-
---echo *** MDEV-6775: Wrong binlog order in parallel replication ***
---connection server_1
-# A bit tricky bug to reproduce. On the master, we binlog in statement-mode
-# two transactions, an UPDATE followed by a DELETE. On the slave, we replicate
-# with binlog-mode set to ROW, which means the DELETE, which modifies no rows,
-# is not binlogged. Then we inject a wait in the group commit code on the
-# slave, shortly before the actual commit of the UPDATE. The bug was that the
-# DELETE could wake up from wait_for_prior_commit() before the commit of the
-# UPDATE. So the test could see the slave position updated to after DELETE,
-# while the UPDATE was still not visible.
-DELETE FROM t4;
-INSERT INTO t4 VALUES (1,NULL), (3,NULL), (4,4), (5, NULL), (6, 6);
---source include/save_master_gtid.inc
-
---connection server_2
---source include/sync_with_master_gtid.inc
---source include/stop_slave.inc
-SET @old_dbug= @@GLOBAL.debug_dbug;
-SET GLOBAL debug_dbug="+d,inject_binlog_commit_before_get_LOCK_log";
-SET @old_format=@@GLOBAL.binlog_format;
-SET GLOBAL binlog_format=ROW;
-# Re-spawn the worker threads to be sure they pick up the new binlog format
-SET GLOBAL slave_parallel_threads=0;
-SET GLOBAL slave_parallel_threads=10;
-
---connection con1
-SET @old_format= @@binlog_format;
-SET binlog_format= statement;
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1';
-send UPDATE t4 SET b=NULL WHERE a=6;
---connection server_1
-SET debug_sync='now WAIT_FOR master_queued1';
-
---connection con2
-SET @old_format= @@binlog_format;
-SET binlog_format= statement;
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2';
-send DELETE FROM t4 WHERE b <= 3;
-
---connection server_1
-SET debug_sync='now WAIT_FOR master_queued2';
-SET debug_sync='now SIGNAL master_cont1';
-
---connection con1
-REAP;
-SET binlog_format= @old_format;
---connection con2
-REAP;
-SET binlog_format= @old_format;
-SET debug_sync='RESET';
---save_master_pos
-SELECT * FROM t4 ORDER BY a;
-
---connection server_2
---source include/start_slave.inc
-SET debug_sync= 'now WAIT_FOR waiting';
---sync_with_master
-SELECT * FROM t4 ORDER BY a;
-SET debug_sync= 'now SIGNAL cont';
-
-# Re-spawn the worker threads to remove any DBUG injections or DEBUG_SYNC.
---source include/stop_slave.inc
-SET GLOBAL debug_dbug=@old_dbug;
-SET GLOBAL binlog_format= @old_format;
-SET GLOBAL slave_parallel_threads=0;
-SET GLOBAL slave_parallel_threads=10;
---source include/start_slave.inc
-
-
---echo *** MDEV-7237: Parallel replication: incorrect relaylog position after stop/start the slave ***
---connection server_1
-INSERT INTO t2 VALUES (40);
---save_master_pos
-
---connection server_2
---sync_with_master
---source include/stop_slave.inc
-CHANGE MASTER TO master_use_gtid=no;
-SET @old_dbug= @@GLOBAL.debug_dbug;
-# This DBUG injection causes a DEBUG_SYNC signal "scheduled_gtid_0_x_100" when
-# GTID 0-1-100 has been scheduled for and fetched by a worker thread.
-SET GLOBAL debug_dbug="+d,rpl_parallel_scheduled_gtid_0_x_100";
-# This DBUG injection causes a DEBUG_SYNC signal "wait_for_done_waiting" when
-# STOP SLAVE has signalled all worker threads to stop.
-SET GLOBAL debug_dbug="+d,rpl_parallel_wait_for_done_trigger";
-# Reset worker threads to make DBUG setting catch on.
-SET GLOBAL slave_parallel_threads=0;
-SET GLOBAL slave_parallel_threads=10;
-
-
---connection server_1
-# Setup some transaction for the slave to replicate.
-INSERT INTO t2 VALUES (41);
-INSERT INTO t2 VALUES (42);
-# Need to log the DELETE in statement format, so we can see it in processlist.
-SET @old_format= @@binlog_format;
-SET binlog_format= statement;
-DELETE FROM t2 WHERE a=40;
-SET binlog_format= @old_format;
-INSERT INTO t2 VALUES (43);
-INSERT INTO t2 VALUES (44);
-# Force the slave to switch to a new relay log file.
-FLUSH LOGS;
-INSERT INTO t2 VALUES (45);
-# Inject a GTID 0-1-100, which will trigger a DEBUG_SYNC signal when this
-# transaction has been fetched by a worker thread.
-SET gtid_seq_no=100;
-INSERT INTO t2 VALUES (46);
---save_master_pos
-
---connection con_temp2
-# Temporarily block the DELETE on a=40 from completing.
-BEGIN;
-SELECT * FROM t2 WHERE a=40 FOR UPDATE;
-
-
---connection server_2
---source include/start_slave.inc
-
-# Wait for a worker thread to start on the DELETE that will be blocked
-# temporarily by the SELECT FOR UPDATE.
---let $wait_condition= SELECT count(*) > 0 FROM information_schema.processlist WHERE state='updating' and info LIKE '%DELETE FROM t2 WHERE a=40%'
---source include/wait_condition.inc
-
-# The DBUG injection set above will make the worker thread signal the following
-# debug_sync when the GTID 0-1-100 has been reached by a worker thread.
-# Thus, at this point, the SQL driver thread has reached the next
-# relay log file name, while a worker thread is still processing a
-# transaction in the previous relay log file, blocked on the SELECT FOR
-# UPDATE.
-SET debug_sync= 'now WAIT_FOR scheduled_gtid_0_x_100';
-# At this point, the SQL driver thread is in the new relay log file, while
-# the DELETE from the old relay log file is not yet complete. We will stop
-# the slave at this point. The bug was that the DELETE statement would
-# update the slave position to the _new_ relay log file name instead of
-# its own old file name. Thus, by stoping and restarting the slave at this
-# point, we would get an error at restart due to incorrect position. (If
-# we would let the slave catch up before stopping, the incorrect position
-# would be corrected by a later transaction).
-
-send STOP SLAVE;
-
---connection con_temp2
-# Wait for STOP SLAVE to have proceeded sufficiently that it has signalled
-# all worker threads to stop; this ensures that we will stop after the DELETE
-# transaction (and not after a later transaction that might have been able
-# to set a fixed position).
-SET debug_sync= 'now WAIT_FOR wait_for_done_waiting';
-# Now release the row lock that was blocking the replication of DELETE.
-ROLLBACK;
-
---connection server_2
-reap;
---source include/wait_for_slave_sql_to_stop.inc
-SELECT * FROM t2 WHERE a >= 40 ORDER BY a;
-# Now restart the slave. With the bug present, this would start at an
-# incorrect relay log position, causing relay log read error (or if unlucky,
-# silently skip a number of events).
---source include/start_slave.inc
---sync_with_master
-SELECT * FROM t2 WHERE a >= 40 ORDER BY a;
---source include/stop_slave.inc
-SET GLOBAL debug_dbug=@old_dbug;
-SET DEBUG_SYNC= 'RESET';
-SET GLOBAL slave_parallel_threads=0;
-SET GLOBAL slave_parallel_threads=10;
-CHANGE MASTER TO master_use_gtid=slave_pos;
---source include/start_slave.inc
-
-
---echo *** MDEV-7326 Server deadlock in connection with parallel replication ***
-# We use three transactions, each in a separate group commit.
-# T1 does mark_start_commit(), then gets a deadlock error.
-# T2 wakes up and starts running
-# T1 does unmark_start_commit()
-# T3 goes to wait for T2 to start its commit
-# T2 does mark_start_commit()
-# The bug was that at this point, T3 got deadlocked. Because T1 has unmarked(),
-# T3 did not yet see the count_committing_event_groups reach its target value
-# yet. But when T1 later re-did mark_start_commit(), it failed to send a wakeup
-# to T3.
-
---connection server_2
---source include/stop_slave.inc
-SET GLOBAL slave_parallel_threads=0;
-SET GLOBAL slave_parallel_threads=3;
-SET GLOBAL debug_dbug="+d,rpl_parallel_simulate_temp_err_xid";
---source include/start_slave.inc
-
---connection server_1
-SET @old_format= @@SESSION.binlog_format;
-SET binlog_format= STATEMENT;
-# This debug_sync will linger on and be used to control T3 later.
-INSERT INTO t1 VALUES (foo(50,
- "rpl_parallel_start_waiting_for_prior SIGNAL t3_ready",
- "rpl_parallel_end_of_group SIGNAL prep_ready WAIT_FOR prep_cont"));
---save_master_pos
---connection server_2
-# Wait for the debug_sync point for T3 to be set. But let the preparation
-# transaction remain hanging, so that T1 and T2 will be scheduled for the
-# remaining two worker threads.
-SET DEBUG_SYNC= "now WAIT_FOR prep_ready";
-
---connection server_1
-INSERT INTO t2 VALUES (foo(50,
- "rpl_parallel_simulate_temp_err_xid SIGNAL t1_ready1 WAIT_FOR t1_cont1",
- "rpl_parallel_retry_after_unmark SIGNAL t1_ready2 WAIT_FOR t1_cont2"));
---save_master_pos
-
---connection server_2
-SET DEBUG_SYNC= "now WAIT_FOR t1_ready1";
-# T1 has now done mark_start_commit(). It will later do a rollback and retry.
-
---connection server_1
-# Use a MyISAM table for T2 and T3, so they do not trigger the
-# rpl_parallel_simulate_temp_err_xid DBUG insertion on XID event.
-INSERT INTO t1 VALUES (foo(51,
- "rpl_parallel_before_mark_start_commit SIGNAL t2_ready1 WAIT_FOR t2_cont1",
- "rpl_parallel_after_mark_start_commit SIGNAL t2_ready2"));
-
---connection server_2
-SET DEBUG_SYNC= "now WAIT_FOR t2_ready1";
-# T2 has now started running, but has not yet done mark_start_commit()
-SET DEBUG_SYNC= "now SIGNAL t1_cont1";
-SET DEBUG_SYNC= "now WAIT_FOR t1_ready2";
-# T1 has now done unmark_start_commit() in preparation for its retry.
-
---connection server_1
-INSERT INTO t1 VALUES (52);
-SET BINLOG_FORMAT= @old_format;
-SELECT * FROM t2 WHERE a>=50 ORDER BY a;
-SELECT * FROM t1 WHERE a>=50 ORDER BY a;
-
---connection server_2
-# Let the preparation transaction complete, so that the same worker thread
-# can continue with the transaction T3.
-SET DEBUG_SYNC= "now SIGNAL prep_cont";
-SET DEBUG_SYNC= "now WAIT_FOR t3_ready";
-# T3 has now gone to wait for T2 to start committing
-SET DEBUG_SYNC= "now SIGNAL t2_cont1";
-SET DEBUG_SYNC= "now WAIT_FOR t2_ready2";
-# T2 has now done mark_start_commit().
-# Let things run, and check that T3 does not get deadlocked.
-SET DEBUG_SYNC= "now SIGNAL t1_cont2";
---sync_with_master
-
---connection server_1
---save_master_pos
---connection server_2
---sync_with_master
-SELECT * FROM t2 WHERE a>=50 ORDER BY a;
-SELECT * FROM t1 WHERE a>=50 ORDER BY a;
-SET DEBUG_SYNC="reset";
-
-# Re-spawn the worker threads to remove any DBUG injections or DEBUG_SYNC.
---source include/stop_slave.inc
-SET GLOBAL debug_dbug=@old_dbug;
-SET GLOBAL slave_parallel_threads=0;
-SET GLOBAL slave_parallel_threads=10;
---source include/start_slave.inc
-
-
---echo *** MDEV-7326 Server deadlock in connection with parallel replication ***
-# Similar to the previous test, but with T2 and T3 in the same GCO.
-# We use three transactions, T1 in one group commit and T2/T3 in another.
-# T1 does mark_start_commit(), then gets a deadlock error.
-# T2 wakes up and starts running
-# T1 does unmark_start_commit()
-# T3 goes to wait for T1 to start its commit
-# T2 does mark_start_commit()
-# The bug was that at this point, T3 got deadlocked. T2 increments the
-# count_committing_event_groups but does not signal T3, as they are in
-# the same GCO. Then later when T1 increments, it would also not signal
-# T3, because now the count_committing_event_groups is not equal to the
-# wait_count of T3 (it is one larger).
-
---connection server_2
---source include/stop_slave.inc
-SET GLOBAL slave_parallel_threads=0;
-SET GLOBAL slave_parallel_threads=3;
-SET GLOBAL debug_dbug="+d,rpl_parallel_simulate_temp_err_xid";
---source include/start_slave.inc
-
---connection server_1
-SET @old_format= @@SESSION.binlog_format;
-SET binlog_format= STATEMENT;
-# This debug_sync will linger on and be used to control T3 later.
-INSERT INTO t1 VALUES (foo(60,
- "rpl_parallel_start_waiting_for_prior SIGNAL t3_ready",
- "rpl_parallel_end_of_group SIGNAL prep_ready WAIT_FOR prep_cont"));
---save_master_pos
---connection server_2
-# Wait for the debug_sync point for T3 to be set. But let the preparation
-# transaction remain hanging, so that T1 and T2 will be scheduled for the
-# remaining two worker threads.
-SET DEBUG_SYNC= "now WAIT_FOR prep_ready";
-
---connection server_1
-INSERT INTO t2 VALUES (foo(60,
- "rpl_parallel_simulate_temp_err_xid SIGNAL t1_ready1 WAIT_FOR t1_cont1",
- "rpl_parallel_retry_after_unmark SIGNAL t1_ready2 WAIT_FOR t1_cont2"));
---save_master_pos
-
---connection server_2
-SET DEBUG_SYNC= "now WAIT_FOR t1_ready1";
-# T1 has now done mark_start_commit(). It will later do a rollback and retry.
-
-# Do T2 and T3 in a single group commit.
-# Use a MyISAM table for T2 and T3, so they do not trigger the
-# rpl_parallel_simulate_temp_err_xid DBUG insertion on XID event.
---connection con_temp3
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1';
-SET binlog_format=statement;
-send INSERT INTO t1 VALUES (foo(61,
- "rpl_parallel_before_mark_start_commit SIGNAL t2_ready1 WAIT_FOR t2_cont1",
- "rpl_parallel_after_mark_start_commit SIGNAL t2_ready2"));
-
---connection server_1
-SET debug_sync='now WAIT_FOR master_queued1';
-
---connection con_temp4
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2';
-send INSERT INTO t6 VALUES (62);
-
---connection server_1
-SET debug_sync='now WAIT_FOR master_queued2';
-SET debug_sync='now SIGNAL master_cont1';
-
---connection con_temp3
-REAP;
---connection con_temp4
-REAP;
-
---connection server_1
-SET debug_sync='RESET';
-SET BINLOG_FORMAT= @old_format;
-SELECT * FROM t2 WHERE a>=60 ORDER BY a;
-SELECT * FROM t1 WHERE a>=60 ORDER BY a;
-SELECT * FROM t6 WHERE a>=60 ORDER BY a;
-
---connection server_2
-SET DEBUG_SYNC= "now WAIT_FOR t2_ready1";
-# T2 has now started running, but has not yet done mark_start_commit()
-SET DEBUG_SYNC= "now SIGNAL t1_cont1";
-SET DEBUG_SYNC= "now WAIT_FOR t1_ready2";
-# T1 has now done unmark_start_commit() in preparation for its retry.
-
---connection server_2
-# Let the preparation transaction complete, so that the same worker thread
-# can continue with the transaction T3.
-SET DEBUG_SYNC= "now SIGNAL prep_cont";
-SET DEBUG_SYNC= "now WAIT_FOR t3_ready";
-# T3 has now gone to wait for T2 to start committing
-SET DEBUG_SYNC= "now SIGNAL t2_cont1";
-SET DEBUG_SYNC= "now WAIT_FOR t2_ready2";
-# T2 has now done mark_start_commit().
-# Let things run, and check that T3 does not get deadlocked.
-SET DEBUG_SYNC= "now SIGNAL t1_cont2";
---sync_with_master
-
---connection server_1
---save_master_pos
---connection server_2
---sync_with_master
-SELECT * FROM t2 WHERE a>=60 ORDER BY a;
-SELECT * FROM t1 WHERE a>=60 ORDER BY a;
-SELECT * FROM t6 WHERE a>=60 ORDER BY a;
-SET DEBUG_SYNC="reset";
-
-# Re-spawn the worker threads to remove any DBUG injections or DEBUG_SYNC.
---source include/stop_slave.inc
-SET GLOBAL debug_dbug=@old_dbug;
-SET GLOBAL slave_parallel_threads=0;
-SET GLOBAL slave_parallel_threads=10;
---source include/start_slave.inc
-
---echo *** MDEV-7335: Potential parallel slave deadlock with specific binlog corruption ***
-
---connection server_2
---source include/stop_slave.inc
-SET GLOBAL slave_parallel_threads=1;
-SET @old_dbug= @@GLOBAL.debug_dbug;
-SET GLOBAL debug_dbug="+d,slave_discard_xid_for_gtid_0_x_1000";
-
---connection server_1
-INSERT INTO t2 VALUES (101);
-INSERT INTO t2 VALUES (102);
-INSERT INTO t2 VALUES (103);
-INSERT INTO t2 VALUES (104);
-INSERT INTO t2 VALUES (105);
-# Inject a partial event group (missing XID at the end). The bug was that such
-# partial group was not handled appropriately, leading to server deadlock.
-SET gtid_seq_no=1000;
-INSERT INTO t2 VALUES (106);
-INSERT INTO t2 VALUES (107);
-INSERT INTO t2 VALUES (108);
-INSERT INTO t2 VALUES (109);
-INSERT INTO t2 VALUES (110);
-INSERT INTO t2 VALUES (111);
-INSERT INTO t2 VALUES (112);
-INSERT INTO t2 VALUES (113);
-INSERT INTO t2 VALUES (114);
-INSERT INTO t2 VALUES (115);
-INSERT INTO t2 VALUES (116);
-INSERT INTO t2 VALUES (117);
-INSERT INTO t2 VALUES (118);
-INSERT INTO t2 VALUES (119);
-INSERT INTO t2 VALUES (120);
-INSERT INTO t2 VALUES (121);
-INSERT INTO t2 VALUES (122);
-INSERT INTO t2 VALUES (123);
-INSERT INTO t2 VALUES (124);
-INSERT INTO t2 VALUES (125);
-INSERT INTO t2 VALUES (126);
-INSERT INTO t2 VALUES (127);
-INSERT INTO t2 VALUES (128);
-INSERT INTO t2 VALUES (129);
-INSERT INTO t2 VALUES (130);
---source include/save_master_gtid.inc
-
---connection server_2
---source include/start_slave.inc
---source include/sync_with_master_gtid.inc
-# The partial event group (a=106) should be rolled back and thus missing.
-SELECT * FROM t2 WHERE a >= 100 ORDER BY a;
-
---source include/stop_slave.inc
-SET GLOBAL debug_dbug=@old_dbug;
-SET GLOBAL slave_parallel_threads=10;
---source include/start_slave.inc
-
---echo *** MDEV-6676 - test syntax of @@slave_parallel_mode ***
---connection server_2
-
---let $status_items= Parallel_Mode
---source include/show_slave_status.inc
---source include/stop_slave.inc
-SET GLOBAL slave_parallel_mode='aggressive';
---let $status_items= Parallel_Mode
---source include/show_slave_status.inc
-SET GLOBAL slave_parallel_mode='conservative';
---let $status_items= Parallel_Mode
---source include/show_slave_status.inc
-
-
---echo *** MDEV-6676 - test that empty parallel_mode does not replicate in parallel ***
---connection server_1
-INSERT INTO t2 VALUES (1040);
---source include/save_master_gtid.inc
-
---connection server_2
-SET GLOBAL slave_parallel_mode='none';
-# Test that we do not use parallel apply, by injecting an unconditional
-# crash in the parallel apply code.
-SET @old_dbug= @@GLOBAL.debug_dbug;
-SET GLOBAL debug_dbug="+d,slave_crash_if_parallel_apply";
---source include/start_slave.inc
---source include/sync_with_master_gtid.inc
-SELECT * FROM t2 WHERE a >= 1040 ORDER BY a;
---source include/stop_slave.inc
-SET GLOBAL debug_dbug=@old_dbug;
-
---echo *** MDEV-6676 - test disabling domain-based parallel replication ***
---connection server_1
-# Let's do a bunch of transactions that will conflict if run out-of-order in
-# domain-based parallel replication mode.
-SET gtid_domain_id = 1;
-INSERT INTO t2 VALUES (1041);
-INSERT INTO t2 VALUES (1042);
-INSERT INTO t2 VALUES (1043);
-INSERT INTO t2 VALUES (1044);
-INSERT INTO t2 VALUES (1045);
-INSERT INTO t2 VALUES (1046);
-DELETE FROM t2 WHERE a >= 1041;
-SET gtid_domain_id = 2;
-INSERT INTO t2 VALUES (1041);
-INSERT INTO t2 VALUES (1042);
-INSERT INTO t2 VALUES (1043);
-INSERT INTO t2 VALUES (1044);
-INSERT INTO t2 VALUES (1045);
-INSERT INTO t2 VALUES (1046);
-SET gtid_domain_id = 0;
---source include/save_master_gtid.inc
---connection server_2
-SET GLOBAL slave_parallel_mode=minimal;
---source include/start_slave.inc
---source include/sync_with_master_gtid.inc
-SELECT * FROM t2 WHERE a >= 1040 ORDER BY a;
-
---echo *** MDEV-7888: ANALYZE TABLE does wakeup_subsequent_commits(), causing wrong binlog order and parallel replication hang ***
-
---connection server_2
---source include/stop_slave.inc
-SET GLOBAL slave_parallel_mode='conservative';
-SET GLOBAL slave_parallel_threads=10;
-
-SET @old_dbug= @@GLOBAL.debug_dbug;
-SET GLOBAL debug_dbug= '+d,inject_analyze_table_sleep';
-
---connection server_1
-# Inject two group commits. The bug was that ANALYZE TABLE would call
-# wakeup_subsequent_commits() too early, allowing the following transaction
-# in the same group to run ahead and binlog and free the GCO. Then we get
-# wrong binlog order and later access freed GCO, which causes lost wakeup
-# of following GCO and thus replication hang.
-# We injected a small sleep in ANALYZE to make the race easier to hit (this
-# can only cause false negatives in versions with the bug, not false positives,
-# so sleep is ok here. And it's in general not possible to trigger reliably
-# the race with debug_sync, since the bugfix makes the race impossible).
-
-SET @old_dbug_slave= @@SESSION.debug_dbug;
-SET SESSION debug_dbug="+d,binlog_force_commit_id";
-
-# Group commit with cid=10000, two event groups.
-SET @commit_id= 10000;
-ANALYZE TABLE t2;
-INSERT INTO t3 VALUES (120, 0);
-
-# Group commit with cid=10001, one event group.
-SET @commit_id= 10001;
-INSERT INTO t3 VALUES (121, 0);
-
-SET SESSION debug_dbug=@old_dbug_slave;
-
-SELECT * FROM t3 WHERE a >= 120 ORDER BY a;
---source include/save_master_gtid.inc
-
---connection server_2
---source include/start_slave.inc
---source include/sync_with_master_gtid.inc
-
-SELECT * FROM t3 WHERE a >= 120 ORDER BY a;
-
---source include/stop_slave.inc
-SET GLOBAL debug_dbug= @old_dbug;
---source include/start_slave.inc
-
-
---echo *** MDEV-7929: record_gtid() for non-transactional event group calls wakeup_subsequent_commits() too early, causing slave hang. ***
-
---connection server_2
---source include/stop_slave.inc
-SET @old_dbug= @@GLOBAL.debug_dbug;
-SET GLOBAL debug_dbug= '+d,inject_record_gtid_serverid_100_sleep';
-
---connection server_1
-# Inject two group commits. The bug was that record_gtid for a
-# non-transactional event group would commit its own transaction, which would
-# cause ha_commit_trans() to call wakeup_subsequent_commits() too early. This
-# in turn lead to access to freed group_commit_orderer object, losing a wakeup
-# and causing slave threads to hang.
-# We inject a small sleep in the corresponding record_gtid() to make the race
-# easier to hit.
-
-SET @old_dbug_slave= @@SESSION.debug_dbug;
-SET SESSION debug_dbug="+d,binlog_force_commit_id";
-
-# Group commit with cid=10010, two event groups.
-SET @old_server_id= @@SESSION.server_id;
-SET SESSION server_id= 100;
-SET @commit_id= 10010;
-ALTER TABLE t1 COMMENT "Hulubulu!";
-SET SESSION server_id= @old_server_id;
-INSERT INTO t3 VALUES (130, 0);
-
-# Group commit with cid=10011, one event group.
-SET @commit_id= 10011;
-INSERT INTO t3 VALUES (131, 0);
-
-SET SESSION debug_dbug=@old_dbug_slave;
-SELECT * FROM t3 WHERE a >= 130 ORDER BY a;
---source include/save_master_gtid.inc
-
---connection server_2
---source include/start_slave.inc
---source include/sync_with_master_gtid.inc
-
-SELECT * FROM t3 WHERE a >= 130 ORDER BY a;
-
---source include/stop_slave.inc
-SET GLOBAL debug_dbug= @old_dbug;
---source include/start_slave.inc
-
-
---echo *** MDEV-8031: Parallel replication stops on "connection killed" error (probably incorrectly handled deadlock kill) ***
-
---connection server_1
-INSERT INTO t3 VALUES (201,0), (202,0);
---source include/save_master_gtid.inc
-
---connection server_2
---source include/sync_with_master_gtid.inc
---source include/stop_slave.inc
-SET @old_dbug= @@GLOBAL.debug_dbug;
-SET GLOBAL debug_dbug= '+d,inject_mdev8031';
-
---connection server_1
-# We artificially create a situation that hopefully resembles the original
-# bug which was only seen "in the wild", and only once.
-# Setup a fake group commit with lots of conflicts that will lead to deadloc
-# kill. The slave DBUG injection causes the slave to be deadlock killed at
-# a particular point during the retry, and then later do a small sleep at
-# another critical point where the prior transaction then has a chance to
-# complete. Finally an extra KILL check catches an unhandled, lingering
-# deadlock kill. So rather artificial, but at least it exercises the
-# relevant code paths.
-SET @old_dbug_slave= @@SESSION.debug_dbug;
-SET SESSION debug_dbug="+d,binlog_force_commit_id";
-
-SET @commit_id= 10200;
-INSERT INTO t3 VALUES (203, 1);
-INSERT INTO t3 VALUES (204, 1);
-INSERT INTO t3 VALUES (205, 1);
-UPDATE t3 SET b=b+1 WHERE a=201;
-UPDATE t3 SET b=b+1 WHERE a=201;
-UPDATE t3 SET b=b+1 WHERE a=201;
-UPDATE t3 SET b=b+1 WHERE a=202;
-UPDATE t3 SET b=b+1 WHERE a=202;
-UPDATE t3 SET b=b+1 WHERE a=202;
-UPDATE t3 SET b=b+1 WHERE a=202;
-UPDATE t3 SET b=b+1 WHERE a=203;
-UPDATE t3 SET b=b+1 WHERE a=203;
-UPDATE t3 SET b=b+1 WHERE a=204;
-UPDATE t3 SET b=b+1 WHERE a=204;
-UPDATE t3 SET b=b+1 WHERE a=204;
-UPDATE t3 SET b=b+1 WHERE a=203;
-UPDATE t3 SET b=b+1 WHERE a=205;
-UPDATE t3 SET b=b+1 WHERE a=205;
-SET SESSION debug_dbug=@old_dbug_slave;
-
-SELECT * FROM t3 WHERE a>=200 ORDER BY a;
---source include/save_master_gtid.inc
-
---connection server_2
---source include/start_slave.inc
---source include/sync_with_master_gtid.inc
-
-SELECT * FROM t3 WHERE a>=200 ORDER BY a;
---source include/stop_slave.inc
-SET GLOBAL debug_dbug= @old_dbug;
---source include/start_slave.inc
-
-
---echo *** Check getting deadlock killed inside open_binlog() during retry. ***
-
---connection server_2
---source include/stop_slave.inc
-SET @old_dbug= @@GLOBAL.debug_dbug;
-SET GLOBAL debug_dbug= '+d,inject_retry_event_group_open_binlog_kill';
-SET @old_max= @@GLOBAL.max_relay_log_size;
-SET GLOBAL max_relay_log_size= 4096;
-
---connection server_1
-SET @old_dbug_slave= @@SESSION.debug_dbug;
-SET SESSION debug_dbug="+d,binlog_force_commit_id";
-
---let $large= `SELECT REPEAT("*", 8192)`
-SET @commit_id= 10210;
---echo Omit long queries that cause relaylog rotations and transaction retries...
---disable_query_log
-eval UPDATE t3 SET b=b+1 WHERE a=201 /* $large */;
-eval UPDATE t3 SET b=b+1 WHERE a=201 /* $large */;
-eval UPDATE t3 SET b=b+1 WHERE a=201 /* $large */;
-eval UPDATE t3 SET b=b+1 WHERE a=202 /* $large */;
-eval UPDATE t3 SET b=b+1 WHERE a=202 /* $large */;
-eval UPDATE t3 SET b=b+1 WHERE a=202 /* $large */;
-eval UPDATE t3 SET b=b+1 WHERE a=202 /* $large */;
-eval UPDATE t3 SET b=b+1 WHERE a=203 /* $large */;
-eval UPDATE t3 SET b=b+1 WHERE a=203 /* $large */;
-eval UPDATE t3 SET b=b+1 WHERE a=204 /* $large */;
-eval UPDATE t3 SET b=b+1 WHERE a=204 /* $large */;
-eval UPDATE t3 SET b=b+1 WHERE a=204 /* $large */;
-eval UPDATE t3 SET b=b+1 WHERE a=203 /* $large */;
-eval UPDATE t3 SET b=b+1 WHERE a=205 /* $large */;
-eval UPDATE t3 SET b=b+1 WHERE a=205 /* $large */;
---enable_query_log
-SET SESSION debug_dbug=@old_dbug_slave;
-
-SELECT * FROM t3 WHERE a>=200 ORDER BY a;
---source include/save_master_gtid.inc
-
---connection server_2
---source include/start_slave.inc
---source include/sync_with_master_gtid.inc
-
-SELECT * FROM t3 WHERE a>=200 ORDER BY a;
---source include/stop_slave.inc
-SET GLOBAL debug_dbug= @old_dbug;
-SET GLOBAL max_relay_log_size= @old_max;
---source include/start_slave.inc
-
---echo *** MDEV-8725: Assertion on ROLLBACK statement in the binary log ***
---connection server_1
-# Inject an event group terminated by ROLLBACK, by mixing MyISAM and InnoDB
-# in a transaction. The bug was an assertion on the ROLLBACK due to
-# mark_start_commit() being already called.
---disable_warnings
-BEGIN;
-INSERT INTO t2 VALUES (2000);
-INSERT INTO t1 VALUES (2000);
-INSERT INTO t2 VALUES (2001);
-ROLLBACK;
---enable_warnings
-SELECT * FROM t1 WHERE a>=2000 ORDER BY a;
-SELECT * FROM t2 WHERE a>=2000 ORDER BY a;
---source include/save_master_gtid.inc
-
---connection server_2
---source include/sync_with_master_gtid.inc
-SELECT * FROM t1 WHERE a>=2000 ORDER BY a;
-SELECT * FROM t2 WHERE a>=2000 ORDER BY a;
-
-
-# Clean up.
---connection server_2
---source include/stop_slave.inc
-SET GLOBAL slave_parallel_threads=@old_parallel_threads;
---source include/start_slave.inc
-SET DEBUG_SYNC= 'RESET';
-
---connection server_1
-DROP function foo;
-DROP TABLE t1,t2,t3,t4,t5,t6;
-SET DEBUG_SYNC= 'RESET';
-
---source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/include/rpl_parallel_analyze_table_hang.inc b/mysql-test/suite/rpl/include/rpl_parallel_analyze_table_hang.inc
new file mode 100644
index 00000000000..62a7501c36b
--- /dev/null
+++ b/mysql-test/suite/rpl/include/rpl_parallel_analyze_table_hang.inc
@@ -0,0 +1,73 @@
+--echo *** MDEV-7888: ANALYZE TABLE does wakeup_subsequent_commits(), causing wrong binlog order and parallel replication hang ***
+--source include/have_innodb.inc
+--source include/have_debug.inc
+--source include/have_debug_sync.inc
+--source include/master-slave.inc
+
+--connection server_2
+SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
+SET @old_parallel_mode=@@GLOBAL.slave_parallel_mode;
+--source include/stop_slave.inc
+SET GLOBAL slave_parallel_mode='conservative';
+SET GLOBAL slave_parallel_threads=10;
+CHANGE MASTER TO master_use_gtid=slave_pos;
+--source include/start_slave.inc
+
+--connection server_1
+ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+CREATE TABLE t2 (a int PRIMARY KEY) ENGINE=InnoDB;
+CREATE TABLE t3 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB;
+--save_master_pos
+
+--connection server_2
+--sync_with_master
+--source include/stop_slave.inc
+SET @old_dbug= @@GLOBAL.debug_dbug;
+SET GLOBAL debug_dbug= '+d,inject_analyze_table_sleep';
+
+--connection server_1
+# Inject two group commits. The bug was that ANALYZE TABLE would call
+# wakeup_subsequent_commits() too early, allowing the following transaction
+# in the same group to run ahead and binlog and free the GCO. Then we get
+# wrong binlog order and later access freed GCO, which causes lost wakeup
+# of following GCO and thus replication hang.
+# We injected a small sleep in ANALYZE to make the race easier to hit (this
+# can only cause false negatives in versions with the bug, not false positives,
+# so sleep is ok here. And it's in general not possible to trigger reliably
+# the race with debug_sync, since the bugfix makes the race impossible).
+
+SET @old_dbug= @@SESSION.debug_dbug;
+SET SESSION debug_dbug="+d,binlog_force_commit_id";
+
+# Group commit with cid=10000, two event groups.
+SET @commit_id= 10000;
+ANALYZE TABLE t2;
+INSERT INTO t3 VALUES (120, 0);
+
+# Group commit with cid=10001, one event group.
+SET @commit_id= 10001;
+INSERT INTO t3 VALUES (121, 0);
+
+SET SESSION debug_dbug=@old_dbug;
+
+SELECT * FROM t3 WHERE a >= 120 ORDER BY a;
+--source include/save_master_gtid.inc
+
+--connection server_2
+--source include/start_slave.inc
+--source include/sync_with_master_gtid.inc
+
+SELECT * FROM t3 WHERE a >= 120 ORDER BY a;
+
+# Clean up.
+--source include/stop_slave.inc
+SET GLOBAL debug_dbug= @old_dbug;
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+SET GLOBAL slave_parallel_mode=@old_parallel_mode;
+--source include/start_slave.inc
+
+--connection server_1
+DROP TABLE t2,t3;
+
+--source include/rpl_end.inc
+
diff --git a/mysql-test/suite/rpl/include/rpl_parallel_deadlock_corrupt_binlog.inc b/mysql-test/suite/rpl/include/rpl_parallel_deadlock_corrupt_binlog.inc
new file mode 100644
index 00000000000..3a135ef5cc4
--- /dev/null
+++ b/mysql-test/suite/rpl/include/rpl_parallel_deadlock_corrupt_binlog.inc
@@ -0,0 +1,79 @@
+--echo *** MDEV-7335: Potential parallel slave deadlock with specific binlog corruption ***
+--source include/have_innodb.inc
+--source include/have_debug.inc
+--source include/have_debug_sync.inc
+--source include/master-slave.inc
+
+--connection server_2
+--source include/stop_slave.inc
+SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
+SET GLOBAL slave_parallel_threads=10;
+CHANGE MASTER TO master_use_gtid=slave_pos;
+--source include/start_slave.inc
+
+--connection server_1
+ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+CREATE TABLE t2 (a int PRIMARY KEY) ENGINE=InnoDB;
+--save_master_pos
+
+--connection server_2
+--sync_with_master
+--source include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=1;
+SET @old_dbug= @@GLOBAL.debug_dbug;
+SET GLOBAL debug_dbug="+d,slave_discard_xid_for_gtid_0_x_1000";
+
+--connection server_1
+INSERT INTO t2 VALUES (101);
+INSERT INTO t2 VALUES (102);
+INSERT INTO t2 VALUES (103);
+INSERT INTO t2 VALUES (104);
+INSERT INTO t2 VALUES (105);
+# Inject a partial event group (missing XID at the end). The bug was that such
+# partial group was not handled appropriately, leading to server deadlock.
+SET gtid_seq_no=1000;
+INSERT INTO t2 VALUES (106);
+INSERT INTO t2 VALUES (107);
+INSERT INTO t2 VALUES (108);
+INSERT INTO t2 VALUES (109);
+INSERT INTO t2 VALUES (110);
+INSERT INTO t2 VALUES (111);
+INSERT INTO t2 VALUES (112);
+INSERT INTO t2 VALUES (113);
+INSERT INTO t2 VALUES (114);
+INSERT INTO t2 VALUES (115);
+INSERT INTO t2 VALUES (116);
+INSERT INTO t2 VALUES (117);
+INSERT INTO t2 VALUES (118);
+INSERT INTO t2 VALUES (119);
+INSERT INTO t2 VALUES (120);
+INSERT INTO t2 VALUES (121);
+INSERT INTO t2 VALUES (122);
+INSERT INTO t2 VALUES (123);
+INSERT INTO t2 VALUES (124);
+INSERT INTO t2 VALUES (125);
+INSERT INTO t2 VALUES (126);
+INSERT INTO t2 VALUES (127);
+INSERT INTO t2 VALUES (128);
+INSERT INTO t2 VALUES (129);
+INSERT INTO t2 VALUES (130);
+--source include/save_master_gtid.inc
+
+--connection server_2
+--source include/start_slave.inc
+--source include/sync_with_master_gtid.inc
+# The partial event group (a=106) should be rolled back and thus missing.
+SELECT * FROM t2 WHERE a >= 100 ORDER BY a;
+
+# Cleanup
+--source include/stop_slave.inc
+SET GLOBAL debug_dbug=@old_dbug;
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+--source include/start_slave.inc
+SET DEBUG_SYNC= 'RESET';
+
+--connection server_1
+DROP TABLE t2;
+SET DEBUG_SYNC= 'RESET';
+
+--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/include/rpl_parallel_domain.inc b/mysql-test/suite/rpl/include/rpl_parallel_domain.inc
new file mode 100644
index 00000000000..eda08cc2916
--- /dev/null
+++ b/mysql-test/suite/rpl/include/rpl_parallel_domain.inc
@@ -0,0 +1,87 @@
+# Test should work with both conservative and optimistic modes
+
+--source include/have_innodb.inc
+--source include/have_debug.inc
+--source include/have_debug_sync.inc
+--source include/master-slave.inc
+
+# Test various aspects of parallel replication.
+
+--connection server_2
+SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
+--error ER_SLAVE_MUST_STOP
+SET GLOBAL slave_parallel_threads=10;
+--source include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=10;
+
+# Check that we do not spawn any worker threads when no slave is running.
+SELECT IF(COUNT(*) < 10, "OK", CONCAT("Found too many system user processes: ", COUNT(*))) FROM information_schema.processlist WHERE user = "system user";
+
+CHANGE MASTER TO master_use_gtid=slave_pos;
+--source include/start_slave.inc
+
+# Check that worker threads get spawned when slave starts.
+SELECT IF(COUNT(*) >= 10, "OK", CONCAT("Found too few system user processes: ", COUNT(*))) FROM information_schema.processlist WHERE user = "system user";
+# ... and that worker threads get removed when slave stops.
+--source include/stop_slave.inc
+SELECT IF(COUNT(*) < 10, "OK", CONCAT("Found too many system user processes: ", COUNT(*))) FROM information_schema.processlist WHERE user = "system user";
+--source include/start_slave.inc
+SELECT IF(COUNT(*) >= 10, "OK", CONCAT("Found too few system user processes: ", COUNT(*))) FROM information_schema.processlist WHERE user = "system user";
+
+--echo *** Test long-running query in domain 1 can run in parallel with short queries in domain 0 ***
+
+--connection server_1
+ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+CREATE TABLE t1 (a int PRIMARY KEY) ENGINE=MyISAM;
+CREATE TABLE t2 (a int PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t2 VALUES (1);
+--save_master_pos
+
+--connection server_2
+--sync_with_master
+
+# Block the table t1 to simulate a replicated query taking a long time.
+--connect (con_temp1,127.0.0.1,root,,test,$SERVER_MYPORT_2,)
+LOCK TABLE t1 WRITE;
+
+--connection server_1
+SET gtid_domain_id=1;
+# This query will be blocked on the slave until UNLOCK TABLES.
+INSERT INTO t1 VALUES (2);
+SET gtid_domain_id=0;
+# These t2 queries can be replicated in parallel with the prior t1 query, as
+# they are in a separate replication domain.
+INSERT INTO t2 VALUES (2);
+INSERT INTO t2 VALUES (3);
+BEGIN;
+INSERT INTO t2 VALUES (4);
+INSERT INTO t2 VALUES (5);
+COMMIT;
+INSERT INTO t2 VALUES (6);
+
+--connection server_2
+--let $wait_condition= SELECT COUNT(*) = 6 FROM t2
+--source include/wait_condition.inc
+
+SELECT * FROM t2 ORDER by a;
+
+--connection con_temp1
+SELECT * FROM t1;
+UNLOCK TABLES;
+
+--connection server_2
+--let $wait_condition= SELECT COUNT(*) = 2 FROM t1
+--source include/wait_condition.inc
+
+SELECT * FROM t1 ORDER BY a;
+
+# Clean up.
+--connection server_2
+--source include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+--source include/start_slave.inc
+
+--connection server_1
+DROP TABLE t1,t2;
+--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/include/rpl_parallel_domain_slave_single_grp.inc b/mysql-test/suite/rpl/include/rpl_parallel_domain_slave_single_grp.inc
new file mode 100644
index 00000000000..856efd065df
--- /dev/null
+++ b/mysql-test/suite/rpl/include/rpl_parallel_domain_slave_single_grp.inc
@@ -0,0 +1,128 @@
+# Test is independent of slave_parallel_mode
+--echo *** Test two transactions in different domains committed in opposite order on slave but in a single group commit. ***
+
+--source include/have_innodb.inc
+--source include/have_debug.inc
+--source include/have_debug_sync.inc
+--source include/master-slave.inc
+
+# Test various aspects of parallel replication.
+
+--connection server_2
+SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
+--source include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=10;
+CHANGE MASTER TO master_use_gtid=slave_pos;
+--source include/start_slave.inc
+
+--connection server_1
+ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+CREATE TABLE t1 (a int PRIMARY KEY) ENGINE=MyISAM;
+CREATE TABLE t2 (a int PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t2 VALUES (1);
+--save_master_pos
+
+--connection server_2
+--sync_with_master
+--source include/stop_slave.inc
+
+--connection server_1
+# Use a stored function to inject a debug_sync into the appropriate THD.
+# The function does nothing on the master, and on the slave it injects the
+# desired debug_sync action(s).
+SET sql_log_bin=0;
+--delimiter ||
+CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
+ RETURNS INT DETERMINISTIC
+ BEGIN
+ RETURN x;
+ END
+||
+--delimiter ;
+SET sql_log_bin=1;
+
+SET @old_format= @@SESSION.binlog_format;
+SET binlog_format='statement';
+SET gtid_domain_id=1;
+INSERT INTO t2 VALUES (foo(10,
+ 'commit_before_enqueue SIGNAL ready1 WAIT_FOR cont1',
+ 'commit_after_release_LOCK_prepare_ordered SIGNAL ready2'));
+
+--connection server_2
+FLUSH LOGS;
+--source include/wait_for_binlog_checkpoint.inc
+SET sql_log_bin=0;
+--delimiter ||
+CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
+ RETURNS INT DETERMINISTIC
+ BEGIN
+ IF d1 != '' THEN
+ SET debug_sync = d1;
+ END IF;
+ IF d2 != '' THEN
+ SET debug_sync = d2;
+ END IF;
+ RETURN x;
+ END
+||
+--delimiter ;
+SET sql_log_bin=1;
+SET @old_format=@@GLOBAL.binlog_format;
+SET GLOBAL binlog_format=statement;
+# We need to restart all parallel threads for the new global setting to
+# be copied to the session-level values.
+SET GLOBAL slave_parallel_threads=0;
+SET GLOBAL slave_parallel_threads=10;
+--source include/start_slave.inc
+
+# First make sure the first insert is ready to commit, but not queued yet.
+SET debug_sync='now WAIT_FOR ready1';
+
+--connection server_1
+SET gtid_domain_id=2;
+INSERT INTO t2 VALUES (foo(11,
+ 'commit_before_enqueue SIGNAL ready3 WAIT_FOR cont3',
+ 'commit_after_release_LOCK_prepare_ordered SIGNAL ready4 WAIT_FOR cont4'));
+SET gtid_domain_id=0;
+SELECT * FROM t2 WHERE a >= 10 ORDER BY a;
+
+--connection server_2
+# Now wait for the second insert to queue itself as the leader, and then
+# wait for more commits to queue up.
+SET debug_sync='now WAIT_FOR ready3';
+SET debug_sync='now SIGNAL cont3';
+SET debug_sync='now WAIT_FOR ready4';
+# Now allow the first insert to queue up to participate in group commit.
+SET debug_sync='now SIGNAL cont1';
+SET debug_sync='now WAIT_FOR ready2';
+# Finally allow the second insert to proceed and do the group commit.
+SET debug_sync='now SIGNAL cont4';
+
+--let $wait_condition= SELECT COUNT(*) = 2 FROM t2 WHERE a >= 10
+--source include/wait_condition.inc
+SELECT * FROM t2 WHERE a >= 10 ORDER BY a;
+# The two INSERT transactions should have been committed in opposite order,
+# but in the same group commit (seen by precense of cid=# in the SHOW
+# BINLOG output).
+--let $binlog_file= slave-bin.000002
+--source include/show_binlog_events.inc
+FLUSH LOGS;
+--source include/wait_for_binlog_checkpoint.inc
+
+
+# Clean up.
+--connection server_2
+--source include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+--source include/start_slave.inc
+SET DEBUG_SYNC= 'RESET';
+SET GLOBAL binlog_format=@old_format;
+
+--connection server_1
+DROP function foo;
+DROP TABLE t1,t2;
+SET DEBUG_SYNC= 'RESET';
+SET GLOBAL binlog_format=@old_format;
+
+--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/include/rpl_parallel_free_deferred_event.inc b/mysql-test/suite/rpl/include/rpl_parallel_free_deferred_event.inc
new file mode 100644
index 00000000000..41f372eddf8
--- /dev/null
+++ b/mysql-test/suite/rpl/include/rpl_parallel_free_deferred_event.inc
@@ -0,0 +1,67 @@
+--echo *** MDEV-5788 Incorrect free of rgi->deferred_events in parallel replication ***
+
+--source include/have_innodb.inc
+--source include/master-slave.inc
+
+--connection server_2
+--source include/stop_slave.inc
+CHANGE MASTER TO master_use_gtid=slave_pos;
+--source include/start_slave.inc
+
+--connection server_1
+ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+CREATE TABLE t3 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB;
+--save_master_pos
+
+--connection server_2
+--sync_with_master
+SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
+# Use just two worker threads, so we are sure to get the rpl_group_info added
+# to the free list, which is what triggered the bug.
+--source include/stop_slave.inc
+SET GLOBAL replicate_ignore_table="test.t3";
+SET GLOBAL slave_parallel_threads=2;
+--source include/start_slave.inc
+
+--connection server_1
+INSERT INTO t3 VALUES (100, rand());
+INSERT INTO t3 VALUES (101, rand());
+--save_master_pos
+
+--connection server_2
+--sync_with_master
+
+--connection server_1
+INSERT INTO t3 VALUES (102, rand());
+INSERT INTO t3 VALUES (103, rand());
+INSERT INTO t3 VALUES (104, rand());
+INSERT INTO t3 VALUES (105, rand());
+--save_master_pos
+
+--connection server_2
+--sync_with_master
+--source include/stop_slave.inc
+SET GLOBAL replicate_ignore_table="";
+--source include/start_slave.inc
+
+--connection server_1
+INSERT INTO t3 VALUES (106, rand());
+INSERT INTO t3 VALUES (107, rand());
+--save_master_pos
+
+--connection server_2
+--sync_with_master
+--replace_column 2 #
+SELECT * FROM t3 WHERE a >= 100 ORDER BY a;
+
+
+# Clean up.
+--connection server_2
+--source include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+--source include/start_slave.inc
+
+--connection server_1
+DROP TABLE t3;
+
+--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/include/rpl_parallel_gco_wait_kill.inc b/mysql-test/suite/rpl/include/rpl_parallel_gco_wait_kill.inc
new file mode 100644
index 00000000000..d918b2ea692
--- /dev/null
+++ b/mysql-test/suite/rpl/include/rpl_parallel_gco_wait_kill.inc
@@ -0,0 +1,366 @@
+--echo *** Test killing thread that is waiting to start transaction until previous transaction commits ***
+
+--source include/have_innodb.inc
+--source include/have_debug.inc
+--source include/have_debug_sync.inc
+--source include/have_binlog_format_statement.inc
+--source include/master-slave.inc
+
+--connection server_2
+SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
+SET @old_parallel_mode= @@GLOBAL.slave_parallel_mode;
+--source include/stop_slave.inc
+SET sql_log_bin=0;
+CALL mtr.add_suppression("Query execution was interrupted");
+CALL mtr.add_suppression("Slave: Connection was killed");
+CALL mtr.add_suppression("Commit failed due to failure of an earlier commit on which this one depends");
+SET sql_log_bin=1;
+SET GLOBAL slave_parallel_threads=10;
+SET GLOBAL slave_parallel_mode= 'conservative';
+CHANGE MASTER TO master_use_gtid=slave_pos;
+--source include/start_slave.inc
+
+--connection server_1
+--connect (con_temp3,127.0.0.1,root,,test,$SERVER_MYPORT_1,)
+--connect (con_temp4,127.0.0.1,root,,test,$SERVER_MYPORT_1,)
+--connect (con_temp5,127.0.0.1,root,,test,$SERVER_MYPORT_1,)
+ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+CREATE TABLE t3 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB;
+--save_master_pos
+
+--connection server_2
+--sync_with_master
+
+--connection server_1
+# Use a stored function to inject a debug_sync into the appropriate THD.
+# The function does nothing on the master, and on the slave it injects the
+# desired debug_sync action(s).
+SET sql_log_bin=0;
+--delimiter ||
+CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
+ RETURNS INT DETERMINISTIC
+ BEGIN
+ RETURN x;
+ END
+||
+--delimiter ;
+SET sql_log_bin=1;
+
+--connection server_2
+SET sql_log_bin=0;
+--delimiter ||
+CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
+ RETURNS INT DETERMINISTIC
+ BEGIN
+ IF d1 != '' THEN
+ SET debug_sync = d1;
+ END IF;
+ IF d2 != '' THEN
+ SET debug_sync = d2;
+ END IF;
+ RETURN x;
+ END
+||
+--delimiter ;
+SET sql_log_bin=1;
+# We need to restart all parallel threads for the new global setting to
+# be copied to the session-level values.
+--source include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=0;
+SET GLOBAL slave_parallel_threads=4;
+--source include/start_slave.inc
+
+
+# We set up four transactions T1, T2, T3, and T4 on the master. T2, T3, and T4
+# can run in parallel with each other (same group commit and commit id),
+# but not in parallel with T1.
+#
+# We use four worker threads, each Ti will be queued on each their own
+# worker thread. We will delay T1 commit, T3 will wait for T1 to begin
+# commit before it can start. We will kill T3 during this wait, and
+# check that everything works correctly.
+#
+# It is rather tricky to get the correct thread id of the worker to kill.
+# We start by injecting four dummy transactions in a debug_sync-controlled
+# manner to be able to get known thread ids for the workers in a pool with
+# just 4 worker threads. Then we let in each of the real test transactions
+# T1-T4 one at a time in a way which allows us to know which transaction
+# ends up with which thread id.
+
+--connection server_1
+SET gtid_domain_id=2;
+BEGIN;
+# This debug_sync will linger on and be used to control T4 later.
+INSERT INTO t3 VALUES (70, foo(70,
+ 'rpl_parallel_start_waiting_for_prior SIGNAL t4_waiting', ''));
+INSERT INTO t3 VALUES (60, foo(60,
+ 'ha_write_row_end SIGNAL d2_query WAIT_FOR d2_cont2',
+ 'rpl_parallel_end_of_group SIGNAL d2_done WAIT_FOR d2_cont'));
+COMMIT;
+SET gtid_domain_id=0;
+
+--connection server_2
+SET debug_sync='now WAIT_FOR d2_query';
+--let $d2_thd_id= `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE INFO LIKE '%foo(60%' AND INFO NOT LIKE '%LIKE%'`
+
+--connection server_1
+SET gtid_domain_id=1;
+BEGIN;
+# These debug_sync's will linger on and be used to control T3 later.
+INSERT INTO t3 VALUES (61, foo(61,
+ 'rpl_parallel_start_waiting_for_prior SIGNAL t3_waiting',
+ 'rpl_parallel_start_waiting_for_prior_killed SIGNAL t3_killed'));
+INSERT INTO t3 VALUES (62, foo(62,
+ 'ha_write_row_end SIGNAL d1_query WAIT_FOR d1_cont2',
+ 'rpl_parallel_end_of_group SIGNAL d1_done WAIT_FOR d1_cont'));
+COMMIT;
+SET gtid_domain_id=0;
+
+--connection server_2
+SET debug_sync='now WAIT_FOR d1_query';
+--let $d1_thd_id= `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE INFO LIKE '%foo(62%' AND INFO NOT LIKE '%LIKE%'`
+
+--connection server_1
+SET gtid_domain_id=0;
+INSERT INTO t3 VALUES (63, foo(63,
+ 'ha_write_row_end SIGNAL d0_query WAIT_FOR d0_cont2',
+ 'rpl_parallel_end_of_group SIGNAL d0_done WAIT_FOR d0_cont'));
+
+--connection server_2
+SET debug_sync='now WAIT_FOR d0_query';
+--let $d0_thd_id= `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE INFO LIKE '%foo(63%' AND INFO NOT LIKE '%LIKE%'`
+
+--connection server_1
+SET gtid_domain_id=3;
+BEGIN;
+# These debug_sync's will linger on and be used to control T2 later.
+INSERT INTO t3 VALUES (68, foo(68,
+ 'rpl_parallel_start_waiting_for_prior SIGNAL t2_waiting', ''));
+INSERT INTO t3 VALUES (69, foo(69,
+ 'ha_write_row_end SIGNAL d3_query WAIT_FOR d3_cont2',
+ 'rpl_parallel_end_of_group SIGNAL d3_done WAIT_FOR d3_cont'));
+COMMIT;
+SET gtid_domain_id=0;
+
+--connection server_2
+SET debug_sync='now WAIT_FOR d3_query';
+--let $d3_thd_id= `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE INFO LIKE '%foo(69%' AND INFO NOT LIKE '%LIKE%'`
+
+SET debug_sync='now SIGNAL d2_cont2';
+SET debug_sync='now WAIT_FOR d2_done';
+SET debug_sync='now SIGNAL d1_cont2';
+SET debug_sync='now WAIT_FOR d1_done';
+SET debug_sync='now SIGNAL d0_cont2';
+SET debug_sync='now WAIT_FOR d0_done';
+SET debug_sync='now SIGNAL d3_cont2';
+SET debug_sync='now WAIT_FOR d3_done';
+
+# Now prepare the real transactions T1, T2, T3, T4 on the master.
+
+--connection con_temp3
+# Create transaction T1.
+INSERT INTO t3 VALUES (64, foo(64,
+ 'rpl_parallel_before_mark_start_commit SIGNAL t1_waiting WAIT_FOR t1_cont', ''));
+
+# Create transaction T2, as a group commit leader on the master.
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2 WAIT_FOR master_cont2';
+send INSERT INTO t3 VALUES (65, foo(65, '', ''));
+
+--connection server_1
+SET debug_sync='now WAIT_FOR master_queued2';
+
+--connection con_temp4
+# Create transaction T3, participating in T2's group commit.
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued3';
+send INSERT INTO t3 VALUES (66, foo(66, '', ''));
+
+--connection server_1
+SET debug_sync='now WAIT_FOR master_queued3';
+
+--connection con_temp5
+# Create transaction T4, participating in group commit with T2 and T3.
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued4';
+send INSERT INTO t3 VALUES (67, foo(67, '', ''));
+
+--connection server_1
+SET debug_sync='now WAIT_FOR master_queued4';
+SET debug_sync='now SIGNAL master_cont2';
+
+--connection con_temp3
+REAP;
+--connection con_temp4
+REAP;
+--connection con_temp5
+REAP;
+
+--connection server_1
+SELECT * FROM t3 WHERE a >= 60 ORDER BY a;
+SET debug_sync='RESET';
+
+--connection server_2
+# Now we have the four transactions pending for replication on the slave.
+# Let them be queued for our three worker threads in a controlled fashion.
+# We put them at a stage where T1 is delayed and T3 is waiting for T1 to
+# commit before T3 can start. Then we kill T3.
+
+# Make the worker D0 free, and wait for T1 to be queued in it.
+SET debug_sync='now SIGNAL d0_cont';
+SET debug_sync='now WAIT_FOR t1_waiting';
+
+# Make the worker D3 free, and wait for T2 to be queued in it.
+SET debug_sync='now SIGNAL d3_cont';
+SET debug_sync='now WAIT_FOR t2_waiting';
+
+# Now release worker D1, and wait for T3 to be queued in it.
+# T3 will wait for T1 to commit before it can start.
+SET debug_sync='now SIGNAL d1_cont';
+SET debug_sync='now WAIT_FOR t3_waiting';
+
+# Release worker D2. Wait for T4 to be queued, so we are sure it has
+# received the debug_sync signal (else we might overwrite it with the
+# next debug_sync).
+SET debug_sync='now SIGNAL d2_cont';
+SET debug_sync='now WAIT_FOR t4_waiting';
+
+# Now we kill the waiting transaction T3 in worker D1.
+--replace_result $d1_thd_id THD_ID
+eval KILL $d1_thd_id;
+
+# Wait until T3 has reacted on the kill.
+SET debug_sync='now WAIT_FOR t3_killed';
+
+# Now we can allow T1 to proceed.
+SET debug_sync='now SIGNAL t1_cont';
+
+--let $slave_sql_errno= 1317,1927,1964
+--source include/wait_for_slave_sql_error.inc
+STOP SLAVE IO_THREAD;
+# Since T2, T3, and T4 run in parallel, we can not be sure if T2 will have time
+# to commit or not before the stop. However, T1 should commit, and T3/T4 may
+# not have committed. (After slave restart we check that all become committed
+# eventually).
+SELECT * FROM t3 WHERE a >= 60 AND a != 65 ORDER BY a;
+
+# Now we have to disable the debug_sync statements, so they do not trigger
+# when the events are retried.
+SET debug_sync='RESET';
+SET GLOBAL slave_parallel_threads=0;
+SET GLOBAL slave_parallel_threads=10;
+SET sql_log_bin=0;
+DROP FUNCTION foo;
+--delimiter ||
+CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
+ RETURNS INT DETERMINISTIC
+ BEGIN
+ RETURN x;
+ END
+||
+--delimiter ;
+SET sql_log_bin=1;
+
+--connection server_1
+UPDATE t3 SET b=b+1 WHERE a=60;
+--save_master_pos
+
+--connection server_2
+--source include/start_slave.inc
+--sync_with_master
+SELECT * FROM t3 WHERE a >= 60 ORDER BY a;
+# Restore the foo() function.
+SET sql_log_bin=0;
+DROP FUNCTION foo;
+--delimiter ||
+CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
+ RETURNS INT DETERMINISTIC
+ BEGIN
+ IF d1 != '' THEN
+ SET debug_sync = d1;
+ END IF;
+ IF d2 != '' THEN
+ SET debug_sync = d2;
+ END IF;
+ RETURN x;
+ END
+||
+--delimiter ;
+SET sql_log_bin=1;
+
+--connection server_2
+# Respawn all worker threads to clear any left-over debug_sync or other stuff.
+--source include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=0;
+SET GLOBAL slave_parallel_threads=10;
+--source include/start_slave.inc
+
+--echo *** 5. Test killing thread that is waiting for queue of max length to shorten ***
+
+# Find the thread id of the driver SQL thread that we want to kill.
+--let $wait_condition= SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE '%Slave has read all relay log%'
+--source include/wait_condition.inc
+--let $thd_id= `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE '%Slave has read all relay log%'`
+SET @old_max_queued= @@GLOBAL.slave_parallel_max_queued;
+SET GLOBAL slave_parallel_max_queued=9000;
+
+--connection server_1
+--let bigstring= `SELECT REPEAT('x', 10000)`
+# Create an event that will wait to be signalled.
+INSERT INTO t3 VALUES (80, foo(0,
+ 'ha_write_row_end SIGNAL query_waiting WAIT_FOR query_cont', ''));
+
+--connection server_2
+SET debug_sync='now WAIT_FOR query_waiting';
+# Inject that the SQL driver thread will signal `wait_queue_ready' to debug_sync
+# as it goes to wait for the event queue to become smaller than the value of
+# @@slave_parallel_max_queued.
+SET @old_dbug= @@GLOBAL.debug_dbug;
+SET GLOBAL debug_dbug="+d,rpl_parallel_wait_queue_max";
+
+--connection server_1
+--disable_query_log
+# Create an event that will fill up the queue.
+# The Xid event at the end of the event group will have to wait for the Query
+# event with the INSERT to drain so the queue becomes shorter. However that in
+# turn waits for the prior event group to continue.
+eval INSERT INTO t3 VALUES (81, LENGTH('$bigstring'));
+--enable_query_log
+SELECT * FROM t3 WHERE a >= 80 ORDER BY a;
+
+--connection server_2
+SET debug_sync='now WAIT_FOR wait_queue_ready';
+
+--replace_result $thd_id THD_ID
+eval KILL $thd_id;
+
+SET debug_sync='now WAIT_FOR wait_queue_killed';
+SET debug_sync='now SIGNAL query_cont';
+
+--let $slave_sql_errno= 1317,1927,1964
+--source include/wait_for_slave_sql_error.inc
+STOP SLAVE IO_THREAD;
+
+SET GLOBAL debug_dbug=@old_dbug;
+SET GLOBAL slave_parallel_max_queued= @old_max_queued;
+
+--connection server_1
+INSERT INTO t3 VALUES (82,0);
+--save_master_pos
+
+--connection server_2
+SET debug_sync='RESET';
+--source include/start_slave.inc
+--sync_with_master
+SELECT * FROM t3 WHERE a >= 80 ORDER BY a;
+
+--connection server_2
+--source include/stop_slave.inc
+SET GLOBAL slave_parallel_mode=@old_parallel_mode;
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+--source include/start_slave.inc
+SET DEBUG_SYNC= 'RESET';
+
+--connection server_1
+DROP function foo;
+DROP TABLE t3;
+SET DEBUG_SYNC= 'RESET';
+
+--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/include/rpl_parallel_gtid_slave_pos_update_fail.inc b/mysql-test/suite/rpl/include/rpl_parallel_gtid_slave_pos_update_fail.inc
new file mode 100644
index 00000000000..da1a07d3b87
--- /dev/null
+++ b/mysql-test/suite/rpl/include/rpl_parallel_gtid_slave_pos_update_fail.inc
@@ -0,0 +1,98 @@
+# MDEV-6549, failing to update gtid_slave_pos for a transaction that was retried.
+
+# The problem was that when a transaction updates the mysql.gtid_slave_pos
+# table, it clears the flag that marks that there is a GTID position that
+# needs to be updated. Then, if the transaction got killed after that due
+# to a deadlock, the subsequent retry would fail to notice that the GTID needs
+# to be recorded in gtid_slave_pos.
+#
+# (In the original bug report, the symptom was an assertion; this was however
+# just a side effect of the missing update of gtid_slave_pos, which also
+# happened to cause a missing clear of OPTION_GTID_BEGIN).
+--source include/have_innodb.inc
+--source include/have_debug.inc
+--source include/have_debug_sync.inc
+# Must use statement-based binlogging. Otherwise the transaction will not be
+# binlogged at all, as it modifies no rows.
+--source include/have_binlog_format_statement.inc
+--source include/master-slave.inc
+
+--connection server_2
+SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
+--source include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=10;
+CHANGE MASTER TO master_use_gtid=slave_pos;
+--source include/start_slave.inc
+
+--connection server_1
+ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+CREATE TABLE t4 (a INT PRIMARY KEY, b INT, KEY b_idx(b)) ENGINE=InnoDB;
+INSERT INTO t4 VALUES (1,NULL), (2,2), (3,NULL), (4,4), (5, NULL), (6, 6);
+--connect (con1,127.0.0.1,root,,test,$SERVER_MYPORT_1,)
+--connect (con2,127.0.0.1,root,,test,$SERVER_MYPORT_1,)
+--save_master_pos
+
+--connection server_2
+--sync_with_master
+--source include/stop_slave.inc
+
+# Create two transactions that can run in parallel on the slave but cause
+# a deadlock if the second runs before the first.
+--connection con1
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1';
+send UPDATE t4 SET b=NULL WHERE a=6;
+--connection server_1
+SET debug_sync='now WAIT_FOR master_queued1';
+
+--connection con2
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2';
+send DELETE FROM t4 WHERE b <= 1;
+
+--connection server_1
+SET debug_sync='now WAIT_FOR master_queued2';
+SET debug_sync='now SIGNAL master_cont1';
+
+--connection con1
+REAP;
+--connection con2
+REAP;
+SET debug_sync='RESET';
+--save_master_pos
+--let $last_gtid= `SELECT @@last_gtid`
+
+--connection server_2
+# Disable the usual skip of gap locks for transactions that are run in
+# parallel, using DBUG. This allows the deadlock to occur, and this in turn
+# triggers a retry of the second transaction, and the code that was buggy and
+# caused the gtid_slave_pos update to be skipped in the retry.
+SET @old_dbug= @@GLOBAL.debug_dbug;
+SET GLOBAL debug_dbug="+d,disable_thd_need_ordering_with";
+--source include/start_slave.inc
+--sync_with_master
+SET GLOBAL debug_dbug=@old_dbug;
+
+SELECT * FROM t4 ORDER BY a;
+# Check that the GTID of the second transaction was correctly recorded in
+# gtid_slave_pos, in the variable as well as in the table.
+--replace_result $last_gtid GTID
+eval SET @last_gtid= '$last_gtid';
+SELECT IF(@@gtid_slave_pos LIKE CONCAT('%',@last_gtid,'%'), "GTID found ok",
+ CONCAT("GTID ", @last_gtid, " not found in gtid_slave_pos=", @@gtid_slave_pos))
+ AS result;
+SELECT "ROW FOUND" AS `Is the row found?`
+ FROM mysql.gtid_slave_pos
+ WHERE CONCAT(domain_id, "-", server_id, "-", seq_no) = @last_gtid;
+
+# Clean up.
+--connection server_2
+--source include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+--source include/start_slave.inc
+SET DEBUG_SYNC= 'RESET';
+
+--connection server_1
+DROP TABLE t4;
+SET DEBUG_SYNC= 'RESET';
+--disconnect con1
+--disconnect con2
+--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/include/rpl_parallel_ignore_error_on_rotate.inc b/mysql-test/suite/rpl/include/rpl_parallel_ignore_error_on_rotate.inc
new file mode 100644
index 00000000000..2fab9f8032b
--- /dev/null
+++ b/mysql-test/suite/rpl/include/rpl_parallel_ignore_error_on_rotate.inc
@@ -0,0 +1,96 @@
+--echo *** MDEV-6551: Some replication errors are ignored if slave_parallel_threads > 0 ***
+
+--source include/have_innodb.inc
+--source include/have_binlog_format_statement.inc
+--source include/master-slave.inc
+
+--connection server_2
+--source include/stop_slave.inc
+SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
+SET @old_parallel_mode=@@GLOBAL.slave_parallel_mode;
+SET GLOBAL slave_parallel_threads=1;
+CHANGE MASTER TO master_use_gtid=slave_pos;
+CALL mtr.add_suppression("Commit failed due to failure of an earlier commit on which this one depends");
+--source include/start_slave.inc
+
+--connection server_1
+ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+CREATE TABLE t2 (a int PRIMARY KEY) ENGINE=InnoDB;
+SET gtid_domain_id=1;
+INSERT INTO t2 VALUES (1);
+SET gtid_domain_id=0;
+SET gtid_domain_id=2;
+INSERT INTO t2 VALUES (2);
+SET gtid_domain_id=0;
+INSERT INTO t2 VALUES (31);
+--let $gtid1= `SELECT @@LAST_GTID`
+--source include/save_master_gtid.inc
+
+--connection server_2
+--source include/sync_with_master_gtid.inc
+--source include/stop_slave.inc
+SET GLOBAL slave_parallel_threads= 0;
+--source include/start_slave.inc
+
+# Force a duplicate key error on the slave.
+SET sql_log_bin= 0;
+INSERT INTO t2 VALUES (32);
+SET sql_log_bin= 1;
+
+--connection server_1
+INSERT INTO t2 VALUES (32);
+--let $gtid2= `SELECT @@LAST_GTID`
+# Rotate the binlog; the bug is triggered when the master binlog file changes
+# after the event group that causes the duplicate key error.
+FLUSH LOGS;
+INSERT INTO t2 VALUES (33);
+INSERT INTO t2 VALUES (34);
+SELECT * FROM t2 WHERE a >= 30 ORDER BY a;
+--source include/save_master_gtid.inc
+
+--connection server_2
+--let $slave_sql_errno= 1062
+--source include/wait_for_slave_sql_error.inc
+
+--connection server_2
+--source include/stop_slave_io.inc
+SET GLOBAL slave_parallel_threads=10;
+START SLAVE;
+
+--let $slave_sql_errno= 1062
+--source include/wait_for_slave_sql_error.inc
+
+# Note: IO thread is still running at this point.
+# The bug seems to have been that restarting the SQL thread after an error with
+# the IO thread still running, somehow picks up a later relay log position and
+# thus ends up skipping the failing event, rather than re-executing.
+
+START SLAVE SQL_THREAD;
+--let $slave_sql_errno= 1062
+--source include/wait_for_slave_sql_error.inc
+
+SELECT * FROM t2 WHERE a >= 30 ORDER BY a;
+
+# Skip the duplicate error, so we can proceed.
+--error ER_SLAVE_SKIP_NOT_IN_GTID
+SET sql_slave_skip_counter= 1;
+--source include/stop_slave_io.inc
+--disable_query_log
+eval SET GLOBAL gtid_slave_pos = REPLACE(@@gtid_slave_pos, "$gtid1", "$gtid2");
+--enable_query_log
+--source include/start_slave.inc
+--source include/sync_with_master_gtid.inc
+
+SELECT * FROM t2 WHERE a >= 30 ORDER BY a;
+
+# Clean up.
+--connection server_2
+--source include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+SET GLOBAL slave_parallel_mode=@old_parallel_mode;
+--source include/start_slave.inc
+
+--connection server_1
+DROP TABLE t2;
+
+--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/include/rpl_parallel_incorrect_relay_pos.inc b/mysql-test/suite/rpl/include/rpl_parallel_incorrect_relay_pos.inc
new file mode 100644
index 00000000000..3cf0afd63ca
--- /dev/null
+++ b/mysql-test/suite/rpl/include/rpl_parallel_incorrect_relay_pos.inc
@@ -0,0 +1,128 @@
+--echo *** MDEV-7237: Parallel replication: incorrect relaylog position after stop/start the slave ***
+
+--source include/have_innodb.inc
+--source include/have_debug.inc
+--source include/have_debug_sync.inc
+--source include/master-slave.inc
+
+--connection server_2
+--source include/stop_slave.inc
+CALL mtr.add_suppression("Commit failed due to failure of an earlier commit on which this one depends");
+SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
+SET @old_parallel_mode=@@GLOBAL.slave_parallel_mode;
+SET GLOBAL slave_parallel_threads=10;
+# Test assumes that 'conservative' mode is in effect. i.e
+# Do not start parallel execution of this event group until all prior groups
+# have reached the commit phase. Upon execution of STOP SLAVE there can be one
+# group which is executing and the rest are doing group commit order wait.
+SET GLOBAL slave_parallel_mode='conservative';
+CHANGE MASTER TO master_use_gtid=slave_pos;
+--source include/start_slave.inc
+
+--connection server_1
+ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+CREATE TABLE t2 (a int PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t2 VALUES (40);
+--save_master_pos
+
+--connection server_2
+--sync_with_master
+--connect (con_temp2,127.0.0.1,root,,test,$SERVER_MYPORT_2,)
+--source include/stop_slave.inc
+CHANGE MASTER TO master_use_gtid=no;
+SET @old_dbug= @@GLOBAL.debug_dbug;
+# This DBUG injection causes a DEBUG_SYNC signal "scheduled_gtid_0_x_100" when
+# GTID 0-1-100 has been scheduled for and fetched by a worker thread.
+SET GLOBAL debug_dbug="+d,rpl_parallel_scheduled_gtid_0_x_100";
+# This DBUG injection causes a DEBUG_SYNC signal "wait_for_done_waiting" when
+# STOP SLAVE has signalled all worker threads to stop.
+SET GLOBAL debug_dbug="+d,rpl_parallel_wait_for_done_trigger";
+# Reset worker threads to make DBUG setting catch on.
+SET GLOBAL slave_parallel_threads=0;
+SET GLOBAL slave_parallel_threads=10;
+
+
+--connection server_1
+# Setup some transaction for the slave to replicate.
+INSERT INTO t2 VALUES (41);
+INSERT INTO t2 VALUES (42);
+# Need to log the DELETE in statement format, so we can see it in processlist.
+SET @old_format= @@binlog_format;
+SET binlog_format= statement;
+DELETE FROM t2 WHERE a=40;
+SET binlog_format= @old_format;
+INSERT INTO t2 VALUES (43);
+INSERT INTO t2 VALUES (44);
+# Force the slave to switch to a new relay log file.
+FLUSH LOGS;
+INSERT INTO t2 VALUES (45);
+# Inject a GTID 0-1-100, which will trigger a DEBUG_SYNC signal when this
+# transaction has been fetched by a worker thread.
+SET gtid_seq_no=100;
+INSERT INTO t2 VALUES (46);
+--save_master_pos
+
+--connection con_temp2
+# Temporarily block the DELETE on a=40 from completing.
+BEGIN;
+SELECT * FROM t2 WHERE a=40 FOR UPDATE;
+
+--connection server_2
+--source include/start_slave.inc
+
+# Wait for a worker thread to start on the DELETE that will be blocked
+# temporarily by the SELECT FOR UPDATE.
+--let $wait_condition= SELECT count(*) > 0 FROM information_schema.processlist WHERE state='updating' and info LIKE '%DELETE FROM t2 WHERE a=40%'
+--source include/wait_condition.inc
+
+# The DBUG injection set above will make the worker thread signal the following
+# debug_sync when the GTID 0-1-100 has been reached by a worker thread.
+# Thus, at this point, the SQL driver thread has reached the next
+# relay log file name, while a worker thread is still processing a
+# transaction in the previous relay log file, blocked on the SELECT FOR
+# UPDATE.
+SET debug_sync= 'now WAIT_FOR scheduled_gtid_0_x_100';
+# At this point, the SQL driver thread is in the new relay log file, while
+# the DELETE from the old relay log file is not yet complete. We will stop
+# the slave at this point. The bug was that the DELETE statement would
+# update the slave position to the _new_ relay log file name instead of
+# its own old file name. Thus, by stoping and restarting the slave at this
+# point, we would get an error at restart due to incorrect position. (If
+# we would let the slave catch up before stopping, the incorrect position
+# would be corrected by a later transaction).
+
+send STOP SLAVE;
+
+--connection con_temp2
+# Wait for STOP SLAVE to have proceeded sufficiently that it has signalled
+# all worker threads to stop; this ensures that we will stop after the DELETE
+# transaction (and not after a later transaction that might have been able
+# to set a fixed position).
+SET debug_sync= 'now WAIT_FOR wait_for_done_waiting';
+# Now release the row lock that was blocking the replication of DELETE.
+ROLLBACK;
+
+--connection server_2
+reap;
+--source include/wait_for_slave_sql_to_stop.inc
+SELECT * FROM t2 WHERE a >= 40 ORDER BY a;
+# Now restart the slave. With the bug present, this would start at an
+# incorrect relay log position, causing relay log read error (or if unlucky,
+# silently skip a number of events).
+--source include/start_slave.inc
+--sync_with_master
+SELECT * FROM t2 WHERE a >= 40 ORDER BY a;
+
+# Clean up.
+--source include/stop_slave.inc
+SET GLOBAL debug_dbug=@old_dbug;
+SET DEBUG_SYNC= 'RESET';
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+SET GLOBAL slave_parallel_mode=@old_parallel_mode;
+CHANGE MASTER TO master_use_gtid=slave_pos;
+--source include/start_slave.inc
+
+--connection server_1
+DROP TABLE t2;
+
+--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/include/rpl_parallel_innodb_lock_conflict.inc b/mysql-test/suite/rpl/include/rpl_parallel_innodb_lock_conflict.inc
new file mode 100644
index 00000000000..90304937445
--- /dev/null
+++ b/mysql-test/suite/rpl/include/rpl_parallel_innodb_lock_conflict.inc
@@ -0,0 +1,107 @@
+--echo ***MDEV-5914: Parallel replication deadlock due to InnoDB lock conflicts ***
+
+--source include/have_innodb.inc
+--source include/have_debug.inc
+--source include/have_debug_sync.inc
+--source include/master-slave.inc
+
+--connection server_2
+SET sql_log_bin=0;
+CALL mtr.add_suppression("Commit failed due to failure of an earlier commit on which this one depends");
+SET sql_log_bin=1;
+SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
+--source include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=10;
+CHANGE MASTER TO master_use_gtid=slave_pos;
+
+--connection server_1
+ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+CREATE TABLE t4 (a INT PRIMARY KEY, b INT, KEY b_idx(b)) ENGINE=InnoDB;
+INSERT INTO t4 VALUES (1,NULL), (2,2), (3,NULL), (4,4), (5, NULL), (6, 6);
+--connect (con1,127.0.0.1,root,,test,$SERVER_MYPORT_1,)
+--connect (con2,127.0.0.1,root,,test,$SERVER_MYPORT_1,)
+
+# Create a group commit with UPDATE and DELETE, in that order.
+# The bug was that while the UPDATE's row lock does not block the DELETE, the
+# DELETE's gap lock _does_ block the UPDATE. This could cause a deadlock
+# on the slave.
+--connection con1
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1';
+send UPDATE t4 SET b=NULL WHERE a=6;
+--connection server_1
+SET debug_sync='now WAIT_FOR master_queued1';
+
+--connection con2
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2';
+send DELETE FROM t4 WHERE b <= 3;
+
+--connection server_1
+SET debug_sync='now WAIT_FOR master_queued2';
+SET debug_sync='now SIGNAL master_cont1';
+
+--connection con1
+REAP;
+--connection con2
+REAP;
+SET debug_sync='RESET';
+--save_master_pos
+
+--connection server_2
+--source include/start_slave.inc
+--sync_with_master
+--source include/stop_slave.inc
+
+SELECT * FROM t4 ORDER BY a;
+
+
+# Another example, this one with INSERT vs. DELETE
+--connection server_1
+DELETE FROM t4;
+INSERT INTO t4 VALUES (1,NULL), (2,2), (3,NULL), (4,4), (5, NULL), (6, 6);
+
+# Create a group commit with INSERT and DELETE, in that order.
+# The bug was that while the INSERT's insert intention lock does not block
+# the DELETE, the DELETE's gap lock _does_ block the INSERT. This could cause
+# a deadlock on the slave.
+--connection con1
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1';
+send INSERT INTO t4 VALUES (7, NULL);
+--connection server_1
+SET debug_sync='now WAIT_FOR master_queued1';
+
+--connection con2
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2';
+send DELETE FROM t4 WHERE b <= 3;
+
+--connection server_1
+SET debug_sync='now WAIT_FOR master_queued2';
+SET debug_sync='now SIGNAL master_cont1';
+
+--connection con1
+REAP;
+--connection con2
+REAP;
+SET debug_sync='RESET';
+--save_master_pos
+
+--connection server_2
+--source include/start_slave.inc
+--sync_with_master
+--source include/stop_slave.inc
+
+SELECT * FROM t4 ORDER BY a;
+
+
+# Clean up.
+--connection server_2
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+--source include/start_slave.inc
+SET DEBUG_SYNC= 'RESET';
+
+--connection server_1
+--disconnect con1
+--disconnect con2
+DROP TABLE t4;
+SET DEBUG_SYNC= 'RESET';
+
+--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/include/rpl_parallel_missed_error_handling.inc b/mysql-test/suite/rpl/include/rpl_parallel_missed_error_handling.inc
new file mode 100644
index 00000000000..33b1bcb11d9
--- /dev/null
+++ b/mysql-test/suite/rpl/include/rpl_parallel_missed_error_handling.inc
@@ -0,0 +1,87 @@
+--echo *** MDEV-5921: In parallel replication, an error is not correctly signalled to the next transaction ***
+
+--source include/have_innodb.inc
+--source include/have_debug.inc
+--source include/have_debug_sync.inc
+--source include/master-slave.inc
+
+--connection server_2
+--source include/stop_slave.inc
+SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
+SET GLOBAL slave_parallel_threads=10;
+CHANGE MASTER TO master_use_gtid=slave_pos;
+CALL mtr.add_suppression("Commit failed due to failure of an earlier commit on which this one depends");
+--source include/start_slave.inc
+
+--connection server_1
+ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+CREATE TABLE t3 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB;
+--save_master_pos
+
+--connection server_2
+--sync_with_master
+
+--connection server_1
+INSERT INTO t3 VALUES (110, 1);
+--save_master_pos
+
+--connection server_2
+--sync_with_master
+SELECT * FROM t3 WHERE a >= 110 ORDER BY a;
+# Inject a duplicate key error.
+SET sql_log_bin=0;
+INSERT INTO t3 VALUES (111, 666);
+SET sql_log_bin=1;
+
+--connection server_1
+
+# Create a group commit with two inserts, the first one conflicts with a row on the slave
+--connect (con1,127.0.0.1,root,,test,$SERVER_MYPORT_1,)
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1';
+send INSERT INTO t3 VALUES (111, 2);
+--connection server_1
+SET debug_sync='now WAIT_FOR master_queued1';
+
+--connect (con2,127.0.0.1,root,,test,$SERVER_MYPORT_1,)
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2';
+send INSERT INTO t3 VALUES (112, 3);
+
+--connection server_1
+SET debug_sync='now WAIT_FOR master_queued2';
+SET debug_sync='now SIGNAL master_cont1';
+
+--connection con1
+REAP;
+--connection con2
+REAP;
+SET debug_sync='RESET';
+--save_master_pos
+
+--connection server_2
+--let $slave_sql_errno= 1062
+--source include/wait_for_slave_sql_error.inc
+--source include/wait_for_slave_sql_to_stop.inc
+# We should not see the row (112,3) here, it should be rolled back due to
+# error signal from the prior transaction.
+SELECT * FROM t3 WHERE a >= 110 ORDER BY a;
+SET sql_log_bin=0;
+DELETE FROM t3 WHERE a=111 AND b=666;
+SET sql_log_bin=1;
+START SLAVE SQL_THREAD;
+--sync_with_master
+SELECT * FROM t3 WHERE a >= 110 ORDER BY a;
+
+# Clean up.
+--connection server_2
+--source include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+--source include/start_slave.inc
+SET DEBUG_SYNC= 'RESET';
+
+--connection server_1
+--disconnect con1
+--disconnect con2
+DROP TABLE t3;
+SET DEBUG_SYNC= 'RESET';
+
+--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/include/rpl_parallel_mode.inc b/mysql-test/suite/rpl/include/rpl_parallel_mode.inc
new file mode 100644
index 00000000000..67104069e9a
--- /dev/null
+++ b/mysql-test/suite/rpl/include/rpl_parallel_mode.inc
@@ -0,0 +1,87 @@
+--echo *** MDEV-6676 - test syntax of @@slave_parallel_mode ***
+
+--source include/have_innodb.inc
+--source include/have_debug.inc
+--source include/master-slave.inc
+
+--connection server_2
+--source include/stop_slave.inc
+SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
+SET @old_parallel_mode=@@GLOBAL.slave_parallel_mode;
+SET GLOBAL slave_parallel_threads=10;
+CHANGE MASTER TO master_use_gtid=slave_pos;
+--source include/start_slave.inc
+
+--connection server_1
+ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+CREATE TABLE t2 (a int PRIMARY KEY) ENGINE=InnoDB;
+--save_master_pos
+
+--connection server_2
+--sync_with_master
+
+--let $status_items= Parallel_Mode
+--source include/show_slave_status.inc
+--source include/stop_slave.inc
+SET GLOBAL slave_parallel_mode='aggressive';
+--let $status_items= Parallel_Mode
+--source include/show_slave_status.inc
+SET GLOBAL slave_parallel_mode='conservative';
+--let $status_items= Parallel_Mode
+--source include/show_slave_status.inc
+
+--echo *** MDEV-6676 - test that empty parallel_mode does not replicate in parallel ***
+--connection server_1
+INSERT INTO t2 VALUES (1040);
+--source include/save_master_gtid.inc
+
+--connection server_2
+SET GLOBAL slave_parallel_mode='none';
+# Test that we do not use parallel apply, by injecting an unconditional
+# crash in the parallel apply code.
+SET @old_dbug= @@GLOBAL.debug_dbug;
+SET GLOBAL debug_dbug="+d,slave_crash_if_parallel_apply";
+--source include/start_slave.inc
+--source include/sync_with_master_gtid.inc
+SELECT * FROM t2 WHERE a >= 1040 ORDER BY a;
+--source include/stop_slave.inc
+SET GLOBAL debug_dbug=@old_dbug;
+
+
+--echo *** MDEV-6676 - test disabling domain-based parallel replication ***
+--connection server_1
+# Let's do a bunch of transactions that will conflict if run out-of-order in
+# domain-based parallel replication mode.
+SET gtid_domain_id = 1;
+INSERT INTO t2 VALUES (1041);
+INSERT INTO t2 VALUES (1042);
+INSERT INTO t2 VALUES (1043);
+INSERT INTO t2 VALUES (1044);
+INSERT INTO t2 VALUES (1045);
+INSERT INTO t2 VALUES (1046);
+DELETE FROM t2 WHERE a >= 1041;
+SET gtid_domain_id = 2;
+INSERT INTO t2 VALUES (1041);
+INSERT INTO t2 VALUES (1042);
+INSERT INTO t2 VALUES (1043);
+INSERT INTO t2 VALUES (1044);
+INSERT INTO t2 VALUES (1045);
+INSERT INTO t2 VALUES (1046);
+SET gtid_domain_id = 0;
+--source include/save_master_gtid.inc
+--connection server_2
+SET GLOBAL slave_parallel_mode=minimal;
+--source include/start_slave.inc
+--source include/sync_with_master_gtid.inc
+SELECT * FROM t2 WHERE a >= 1040 ORDER BY a;
+
+# Cleanup
+--source include/stop_slave.inc
+SET GLOBAL debug_dbug=@old_dbug;
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+SET GLOBAL slave_parallel_mode=@old_parallel_mode;
+--source include/start_slave.inc
+
+--connection server_1
+DROP TABLE t2;
+--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/include/rpl_parallel_partial_binlog_trans.inc b/mysql-test/suite/rpl/include/rpl_parallel_partial_binlog_trans.inc
new file mode 100644
index 00000000000..7247925285f
--- /dev/null
+++ b/mysql-test/suite/rpl/include/rpl_parallel_partial_binlog_trans.inc
@@ -0,0 +1,71 @@
+--echo *** MDEV_6435: Incorrect error handling when query binlogged partially on master with "killed" error ***
+
+--source include/have_innodb.inc
+--source include/have_debug.inc
+--source include/have_debug_sync.inc
+--source include/have_binlog_format_statement.inc
+--source include/master-slave.inc
+
+--connection server_2
+--source include/stop_slave.inc
+SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
+SET GLOBAL slave_parallel_threads=1;
+CHANGE MASTER TO master_use_gtid=slave_pos;
+--source include/start_slave.inc
+
+--connection server_1
+ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+CREATE TABLE t6 (a INT) ENGINE=MyISAM;
+CREATE TRIGGER tr AFTER INSERT ON t6 FOR EACH ROW SET @a = 1;
+--connect (con1,127.0.0.1,root,,test,$SERVER_MYPORT_1,)
+
+--connection con1
+--let $conid = `SELECT CONNECTION_ID()`
+SET debug_sync='sp_head_execute_before_loop SIGNAL ready WAIT_FOR cont';
+send INSERT INTO t6 VALUES (1), (2), (3);
+
+--connection server_1
+SET debug_sync='now WAIT_FOR ready';
+--replace_result $conid CONID
+eval KILL QUERY $conid;
+SET debug_sync='now SIGNAL cont';
+
+--connection con1
+--error ER_QUERY_INTERRUPTED
+--reap
+SET debug_sync='RESET';
+--let $after_error_gtid_pos= `SELECT @@gtid_binlog_pos`
+
+--connection server_1
+SET debug_sync='RESET';
+
+--connection server_2
+--let $slave_sql_errno= 1317
+--source include/wait_for_slave_sql_error.inc
+STOP SLAVE IO_THREAD;
+--replace_result $after_error_gtid_pos AFTER_ERROR_GTID_POS
+eval SET GLOBAL gtid_slave_pos= '$after_error_gtid_pos';
+--source include/start_slave.inc
+
+--connection server_1
+INSERT INTO t6 VALUES (4);
+SELECT * FROM t6 ORDER BY a;
+--save_master_pos
+
+--connection server_2
+--sync_with_master
+SELECT * FROM t6 ORDER BY a;
+
+# Clean up.
+--connection server_2
+--source include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+--source include/start_slave.inc
+SET DEBUG_SYNC= 'RESET';
+
+--connection server_1
+DROP TABLE t6;
+SET DEBUG_SYNC= 'RESET';
+--disconnect con1
+
+--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/include/rpl_parallel_record_gtid_wakeup.inc b/mysql-test/suite/rpl/include/rpl_parallel_record_gtid_wakeup.inc
new file mode 100644
index 00000000000..0f94d8f9943
--- /dev/null
+++ b/mysql-test/suite/rpl/include/rpl_parallel_record_gtid_wakeup.inc
@@ -0,0 +1,72 @@
+--echo *** MDEV-7929: record_gtid() for non-transactional event group calls wakeup_subsequent_commits() too early, causing slave hang. ***
+
+--source include/have_innodb.inc
+--source include/have_debug.inc
+--source include/have_debug_sync.inc
+--source include/master-slave.inc
+
+--connection server_2
+SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
+--source include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=10;
+CHANGE MASTER TO master_use_gtid=slave_pos;
+--source include/start_slave.inc
+
+--connection server_1
+ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+CREATE TABLE t1 (a int PRIMARY KEY) ENGINE=MyISAM;
+CREATE TABLE t3 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB;
+--save_master_pos
+
+--connection server_2
+--sync_with_master
+--source include/stop_slave.inc
+SET @old_dbug= @@GLOBAL.debug_dbug;
+SET GLOBAL debug_dbug= '+d,inject_record_gtid_serverid_100_sleep';
+
+--connection server_1
+# Inject two group commits. The bug was that record_gtid for a
+# non-transactional event group would commit its own transaction, which would
+# cause ha_commit_trans() to call wakeup_subsequent_commits() too early. This
+# in turn lead to access to freed group_commit_orderer object, losing a wakeup
+# and causing slave threads to hang.
+# We inject a small sleep in the corresponding record_gtid() to make the race
+# easier to hit.
+
+SET @old_dbug= @@SESSION.debug_dbug;
+SET SESSION debug_dbug="+d,binlog_force_commit_id";
+
+# Group commit with cid=10010, two event groups.
+SET @old_server_id= @@SESSION.server_id;
+SET SESSION server_id= 100;
+SET @commit_id= 10010;
+ALTER TABLE t1 COMMENT "Hulubulu!";
+SET SESSION server_id= @old_server_id;
+INSERT INTO t3 VALUES (130, 0);
+
+# Group commit with cid=10011, one event group.
+SET @commit_id= 10011;
+INSERT INTO t3 VALUES (131, 0);
+
+SET SESSION debug_dbug=@old_dbug;
+
+SELECT * FROM t3 WHERE a >= 130 ORDER BY a;
+--source include/save_master_gtid.inc
+
+--connection server_2
+--source include/start_slave.inc
+--source include/sync_with_master_gtid.inc
+
+SELECT * FROM t3 WHERE a >= 130 ORDER BY a;
+
+# Clean up.
+--source include/stop_slave.inc
+SET GLOBAL debug_dbug= @old_dbug;
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+--source include/start_slave.inc
+
+--connection server_1
+DROP TABLE t1,t3;
+
+--source include/rpl_end.inc
+
diff --git a/mysql-test/suite/rpl/include/rpl_parallel_retry_deadlock.inc b/mysql-test/suite/rpl/include/rpl_parallel_retry_deadlock.inc
new file mode 100644
index 00000000000..54ac859bb33
--- /dev/null
+++ b/mysql-test/suite/rpl/include/rpl_parallel_retry_deadlock.inc
@@ -0,0 +1,281 @@
+--echo *** MDEV-7326 Server deadlock in connection with parallel replication ***
+--source include/have_innodb.inc
+--source include/have_debug.inc
+--source include/have_debug_sync.inc
+--source include/master-slave.inc
+
+--connection server_2
+SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
+SET @old_parallel_mode=@@GLOBAL.slave_parallel_mode;
+--source include/stop_slave.inc
+# Test assumes that 'conservative' mode is in effect. i.e
+# Do not start parallel execution of this event group until all prior groups
+# have reached the commit phase. Refer 'rpl_parallel_start_waiting_for_prior'
+# debug simumation.
+SET GLOBAL slave_parallel_mode='conservative';
+SET GLOBAL slave_parallel_threads=10;
+CHANGE MASTER TO master_use_gtid=slave_pos;
+--source include/start_slave.inc
+
+--connection server_1
+ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+CREATE TABLE t1 (a int PRIMARY KEY) ENGINE=MyISAM;
+CREATE TABLE t2 (a int PRIMARY KEY) ENGINE=InnoDB;
+CREATE TABLE t6 (a INT) ENGINE=MyISAM;
+--save_master_pos
+
+--connection server_2
+--sync_with_master
+
+--connection server_1
+# Use a stored function to inject a debug_sync into the appropriate THD.
+# The function does nothing on the master, and on the slave it injects the
+# desired debug_sync action(s).
+SET sql_log_bin=0;
+--delimiter ||
+CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
+ RETURNS INT DETERMINISTIC
+ BEGIN
+ RETURN x;
+ END
+||
+--delimiter ;
+SET sql_log_bin=1;
+
+--connection server_2
+SET sql_log_bin=0;
+--delimiter ||
+CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
+ RETURNS INT DETERMINISTIC
+ BEGIN
+ IF d1 != '' THEN
+ SET debug_sync = d1;
+ END IF;
+ IF d2 != '' THEN
+ SET debug_sync = d2;
+ END IF;
+ RETURN x;
+ END
+||
+--delimiter ;
+SET sql_log_bin=1;
+
+# We use three transactions, each in a separate group commit.
+# T1 does mark_start_commit(), then gets a deadlock error.
+# T2 wakes up and starts running
+# T1 does unmark_start_commit()
+# T3 goes to wait for T2 to start its commit
+# T2 does mark_start_commit()
+# The bug was that at this point, T3 got deadlocked. Because T1 has unmarked(),
+# T3 did not yet see the count_committing_event_groups reach its target value
+# yet. But when T1 later re-did mark_start_commit(), it failed to send a wakeup
+# to T3.
+
+--connection server_2
+--source include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=0;
+SET GLOBAL slave_parallel_threads=3;
+SET GLOBAL debug_dbug="+d,rpl_parallel_simulate_temp_err_xid";
+--source include/start_slave.inc
+
+--connection server_1
+SET @old_format= @@SESSION.binlog_format;
+SET binlog_format= STATEMENT;
+# This debug_sync will linger on and be used to control T3 later.
+INSERT INTO t1 VALUES (foo(50,
+ "rpl_parallel_start_waiting_for_prior SIGNAL t3_ready",
+ "rpl_parallel_end_of_group SIGNAL prep_ready WAIT_FOR prep_cont"));
+--save_master_pos
+--connection server_2
+# Wait for the debug_sync point for T3 to be set. But let the preparation
+# transaction remain hanging, so that T1 and T2 will be scheduled for the
+# remaining two worker threads.
+SET DEBUG_SYNC= "now WAIT_FOR prep_ready";
+
+--connection server_1
+INSERT INTO t2 VALUES (foo(50,
+ "rpl_parallel_simulate_temp_err_xid SIGNAL t1_ready1 WAIT_FOR t1_cont1",
+ "rpl_parallel_retry_after_unmark SIGNAL t1_ready2 WAIT_FOR t1_cont2"));
+--save_master_pos
+
+--connection server_2
+SET DEBUG_SYNC= "now WAIT_FOR t1_ready1";
+# T1 has now done mark_start_commit(). It will later do a rollback and retry.
+
+--connection server_1
+# Use a MyISAM table for T2 and T3, so they do not trigger the
+# rpl_parallel_simulate_temp_err_xid DBUG insertion on XID event.
+INSERT INTO t1 VALUES (foo(51,
+ "rpl_parallel_before_mark_start_commit SIGNAL t2_ready1 WAIT_FOR t2_cont1",
+ "rpl_parallel_after_mark_start_commit SIGNAL t2_ready2"));
+
+--connection server_2
+SET DEBUG_SYNC= "now WAIT_FOR t2_ready1";
+# T2 has now started running, but has not yet done mark_start_commit()
+SET DEBUG_SYNC= "now SIGNAL t1_cont1";
+SET DEBUG_SYNC= "now WAIT_FOR t1_ready2";
+# T1 has now done unmark_start_commit() in preparation for its retry.
+
+--connection server_1
+INSERT INTO t1 VALUES (52);
+SET BINLOG_FORMAT= @old_format;
+SELECT * FROM t2 WHERE a>=50 ORDER BY a;
+SELECT * FROM t1 WHERE a>=50 ORDER BY a;
+
+--connection server_2
+# Let the preparation transaction complete, so that the same worker thread
+# can continue with the transaction T3.
+SET DEBUG_SYNC= "now SIGNAL prep_cont";
+SET DEBUG_SYNC= "now WAIT_FOR t3_ready";
+# T3 has now gone to wait for T2 to start committing
+SET DEBUG_SYNC= "now SIGNAL t2_cont1";
+SET DEBUG_SYNC= "now WAIT_FOR t2_ready2";
+# T2 has now done mark_start_commit().
+# Let things run, and check that T3 does not get deadlocked.
+SET DEBUG_SYNC= "now SIGNAL t1_cont2";
+--sync_with_master
+
+--connection server_1
+--save_master_pos
+--connection server_2
+--sync_with_master
+SELECT * FROM t2 WHERE a>=50 ORDER BY a;
+SELECT * FROM t1 WHERE a>=50 ORDER BY a;
+SET DEBUG_SYNC="reset";
+
+# Re-spawn the worker threads to remove any DBUG injections or DEBUG_SYNC.
+--source include/stop_slave.inc
+SET GLOBAL debug_dbug=@old_dbug;
+SET GLOBAL slave_parallel_mode=@old_parallel_mode;
+SET GLOBAL slave_parallel_threads=0;
+SET GLOBAL slave_parallel_threads=10;
+--source include/start_slave.inc
+
+
+--echo *** MDEV-7326 Server deadlock in connection with parallel replication ***
+# Similar to the previous test, but with T2 and T3 in the same GCO.
+# We use three transactions, T1 in one group commit and T2/T3 in another.
+# T1 does mark_start_commit(), then gets a deadlock error.
+# T2 wakes up and starts running
+# T1 does unmark_start_commit()
+# T3 goes to wait for T1 to start its commit
+# T2 does mark_start_commit()
+# The bug was that at this point, T3 got deadlocked. T2 increments the
+# count_committing_event_groups but does not signal T3, as they are in
+# the same GCO. Then later when T1 increments, it would also not signal
+# T3, because now the count_committing_event_groups is not equal to the
+# wait_count of T3 (it is one larger).
+
+--connect (con_temp3,127.0.0.1,root,,test,$SERVER_MYPORT_1,)
+--connect (con_temp4,127.0.0.1,root,,test,$SERVER_MYPORT_1,)
+
+--connection server_2
+--source include/stop_slave.inc
+SET @old_parallel_mode= @@GLOBAL.slave_parallel_mode;
+SET GLOBAL slave_parallel_mode='conservative';
+SET GLOBAL slave_parallel_threads=0;
+SET GLOBAL slave_parallel_threads=3;
+SET GLOBAL debug_dbug="+d,rpl_parallel_simulate_temp_err_xid";
+--source include/start_slave.inc
+
+--connection server_1
+SET @old_format= @@SESSION.binlog_format;
+SET binlog_format= STATEMENT;
+# This debug_sync will linger on and be used to control T3 later.
+INSERT INTO t1 VALUES (foo(60,
+ "rpl_parallel_start_waiting_for_prior SIGNAL t3_ready",
+ "rpl_parallel_end_of_group SIGNAL prep_ready WAIT_FOR prep_cont"));
+--save_master_pos
+--connection server_2
+# Wait for the debug_sync point for T3 to be set. But let the preparation
+# transaction remain hanging, so that T1 and T2 will be scheduled for the
+# remaining two worker threads.
+SET DEBUG_SYNC= "now WAIT_FOR prep_ready";
+
+--connection server_1
+INSERT INTO t2 VALUES (foo(60,
+ "rpl_parallel_simulate_temp_err_xid SIGNAL t1_ready1 WAIT_FOR t1_cont1",
+ "rpl_parallel_retry_after_unmark SIGNAL t1_ready2 WAIT_FOR t1_cont2"));
+--save_master_pos
+
+--connection server_2
+SET DEBUG_SYNC= "now WAIT_FOR t1_ready1";
+# T1 has now done mark_start_commit(). It will later do a rollback and retry.
+
+# Do T2 and T3 in a single group commit.
+# Use a MyISAM table for T2 and T3, so they do not trigger the
+# rpl_parallel_simulate_temp_err_xid DBUG insertion on XID event.
+--connection con_temp3
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1';
+SET binlog_format=statement;
+send INSERT INTO t1 VALUES (foo(61,
+ "rpl_parallel_before_mark_start_commit SIGNAL t2_ready1 WAIT_FOR t2_cont1",
+ "rpl_parallel_after_mark_start_commit SIGNAL t2_ready2"));
+
+--connection server_1
+SET debug_sync='now WAIT_FOR master_queued1';
+
+--connection con_temp4
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2';
+send INSERT INTO t6 VALUES (62);
+
+--connection server_1
+SET debug_sync='now WAIT_FOR master_queued2';
+SET debug_sync='now SIGNAL master_cont1';
+
+--connection con_temp3
+REAP;
+--connection con_temp4
+REAP;
+
+--connection server_1
+SET debug_sync='RESET';
+SET BINLOG_FORMAT= @old_format;
+SELECT * FROM t2 WHERE a>=60 ORDER BY a;
+SELECT * FROM t1 WHERE a>=60 ORDER BY a;
+SELECT * FROM t6 WHERE a>=60 ORDER BY a;
+
+--connection server_2
+SET DEBUG_SYNC= "now WAIT_FOR t2_ready1";
+# T2 has now started running, but has not yet done mark_start_commit()
+SET DEBUG_SYNC= "now SIGNAL t1_cont1";
+SET DEBUG_SYNC= "now WAIT_FOR t1_ready2";
+# T1 has now done unmark_start_commit() in preparation for its retry.
+
+--connection server_2
+# Let the preparation transaction complete, so that the same worker thread
+# can continue with the transaction T3.
+SET DEBUG_SYNC= "now SIGNAL prep_cont";
+SET DEBUG_SYNC= "now WAIT_FOR t3_ready";
+# T3 has now gone to wait for T2 to start committing
+SET DEBUG_SYNC= "now SIGNAL t2_cont1";
+SET DEBUG_SYNC= "now WAIT_FOR t2_ready2";
+# T2 has now done mark_start_commit().
+# Let things run, and check that T3 does not get deadlocked.
+SET DEBUG_SYNC= "now SIGNAL t1_cont2";
+--sync_with_master
+
+--connection server_1
+--save_master_pos
+--connection server_2
+--sync_with_master
+SELECT * FROM t2 WHERE a>=60 ORDER BY a;
+SELECT * FROM t1 WHERE a>=60 ORDER BY a;
+SELECT * FROM t6 WHERE a>=60 ORDER BY a;
+SET DEBUG_SYNC="reset";
+
+# Clean up.
+--source include/stop_slave.inc
+SET GLOBAL debug_dbug=@old_dbug;
+SET GLOBAL slave_parallel_mode=@old_parallel_mode;
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+--source include/start_slave.inc
+
+--connection server_1
+DROP function foo;
+DROP TABLE t1,t2,t6;
+--disconnect con_temp3
+--disconnect con_temp4
+SET DEBUG_SYNC= 'RESET';
+
+--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/include/rpl_parallel_rollback_assert.inc b/mysql-test/suite/rpl/include/rpl_parallel_rollback_assert.inc
new file mode 100644
index 00000000000..eec331b3d64
--- /dev/null
+++ b/mysql-test/suite/rpl/include/rpl_parallel_rollback_assert.inc
@@ -0,0 +1,62 @@
+--echo *** MDEV-8725: Assertion on ROLLBACK statement in the binary log ***
+--source include/have_innodb.inc
+--source include/master-slave.inc
+
+--connection server_2
+SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
+--source include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=10;
+CHANGE MASTER TO master_use_gtid=slave_pos;
+--source include/start_slave.inc
+
+--connection server_1
+ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+CREATE TABLE t1 (a int PRIMARY KEY) ENGINE=MyISAM;
+CREATE TABLE t2 (a int PRIMARY KEY) ENGINE=InnoDB;
+--save_master_pos
+
+--connection server_2
+--sync_with_master
+
+--connection server_1
+# Inject an event group terminated by ROLLBACK, by mixing MyISAM and InnoDB
+# in a transaction. The bug was an assertion on the ROLLBACK due to
+# mark_start_commit() being already called.
+--disable_warnings
+BEGIN;
+INSERT INTO t2 VALUES (2000);
+INSERT INTO t1 VALUES (2000);
+INSERT INTO t2 VALUES (2001);
+ROLLBACK;
+--enable_warnings
+SELECT * FROM t1 WHERE a>=2000 ORDER BY a;
+SELECT * FROM t2 WHERE a>=2000 ORDER BY a;
+--source include/save_master_gtid.inc
+
+--connection server_2
+--source include/sync_with_master_gtid.inc
+
+--connection server_1
+INSERT INTO t2 VALUES (2020);
+--source include/save_master_gtid.inc
+
+--connection server_2
+--source include/sync_with_master_gtid.inc
+SELECT * FROM t2 WHERE a>=2000 ORDER BY a;
+let $rows_in_t1= `SELECT COUNT(*) FROM t1 WHERE a>=2000 ORDER BY a`;
+if ($rows_in_t1 == 0)
+{
+--query_vertical SHOW SLAVE STATUS
+}
+SELECT * FROM t1 WHERE a>=2000 ORDER BY a;
+
+# Clean up.
+--source include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+--source include/start_slave.inc
+
+--connection server_1
+DROP TABLE t1,t2;
+
+--source include/rpl_end.inc
+
diff --git a/mysql-test/suite/rpl/include/rpl_parallel_single_grpcmt.inc b/mysql-test/suite/rpl/include/rpl_parallel_single_grpcmt.inc
new file mode 100644
index 00000000000..cf4c547b73b
--- /dev/null
+++ b/mysql-test/suite/rpl/include/rpl_parallel_single_grpcmt.inc
@@ -0,0 +1,170 @@
+--echo *** Test that group-committed transactions on the master can replicate in parallel on the slave. ***
+
+--source include/have_innodb.inc
+--source include/have_debug.inc
+--source include/have_debug_sync.inc
+--source include/have_binlog_format_statement.inc
+--source include/master-slave.inc
+
+# Test various aspects of parallel replication.
+
+--connection server_1
+# The function does nothing on the master, and on the slave it injects the
+# desired debug_sync action(s).
+SET sql_log_bin=0;
+--delimiter ||
+CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
+ RETURNS INT DETERMINISTIC
+ BEGIN
+ RETURN x;
+ END
+||
+--delimiter ;
+SET sql_log_bin=1;
+
+--connection server_2
+--source include/stop_slave.inc
+SET sql_log_bin=0;
+--delimiter ||
+CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
+ RETURNS INT DETERMINISTIC
+ BEGIN
+ IF d1 != '' THEN
+ SET debug_sync = d1;
+ END IF;
+ IF d2 != '' THEN
+ SET debug_sync = d2;
+ END IF;
+ RETURN x;
+ END
+||
+--delimiter ;
+SET sql_log_bin=1;
+
+# We need to restart all parallel threads for the new global setting to
+# be copied to the session-level values.
+SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
+SET GLOBAL slave_parallel_threads=10;
+CHANGE MASTER TO master_use_gtid=slave_pos;
+--source include/start_slave.inc
+
+--connection server_1
+ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+CREATE TABLE t3 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB;
+# Create some sentinel rows so that the rows inserted in parallel fall into
+# separate gaps and do not cause gap lock conflicts.
+INSERT INTO t3 VALUES (1,1), (3,3), (5,5), (7,7);
+--save_master_pos
+--connection server_2
+--sync_with_master
+
+
+# We want to test that the transactions can execute out-of-order on
+# the slave, but still end up committing in-order, and in a single
+# group commit.
+#
+# The idea is to group-commit three transactions together on the master:
+# A, B, and C. On the slave, C will execute the insert first, then A,
+# and then B. But B manages to complete before A has time to commit, so
+# all three end up committing together.
+#
+# So we start by setting up some row locks that will block transactions
+# A and B from executing, allowing C to run first.
+
+--connect (con_temp1,127.0.0.1,root,,test,$SERVER_MYPORT_2,)
+BEGIN;
+INSERT INTO t3 VALUES (2,102);
+--connect (con_temp2,127.0.0.1,root,,test,$SERVER_MYPORT_2,)
+BEGIN;
+INSERT INTO t3 VALUES (4,104);
+
+# On the master, queue three INSERT transactions as a single group commit.
+--connect (con_temp3,127.0.0.1,root,,test,$SERVER_MYPORT_1,)
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1';
+SET binlog_format=statement;
+send INSERT INTO t3 VALUES (2, foo(12,
+ 'commit_after_release_LOCK_prepare_ordered SIGNAL slave_queued1 WAIT_FOR slave_cont1',
+ ''));
+
+--connection server_1
+SET debug_sync='now WAIT_FOR master_queued1';
+
+--connect (con_temp4,127.0.0.1,root,,test,$SERVER_MYPORT_1,)
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2';
+SET binlog_format=statement;
+send INSERT INTO t3 VALUES (4, foo(14,
+ 'commit_after_release_LOCK_prepare_ordered SIGNAL slave_queued2',
+ ''));
+
+--connection server_1
+SET debug_sync='now WAIT_FOR master_queued2';
+
+--connect (con_temp5,127.0.0.1,root,,test,$SERVER_MYPORT_1,)
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued3';
+SET binlog_format=statement;
+send INSERT INTO t3 VALUES (6, foo(16,
+ 'group_commit_waiting_for_prior SIGNAL slave_queued3',
+ ''));
+
+--connection server_1
+SET debug_sync='now WAIT_FOR master_queued3';
+SET debug_sync='now SIGNAL master_cont1';
+
+--connection con_temp3
+REAP;
+--connection con_temp4
+REAP;
+--connection con_temp5
+REAP;
+SET debug_sync='RESET';
+
+--connection server_1
+SELECT * FROM t3 ORDER BY a;
+--let $binlog_file= master-bin.000001
+--source include/show_binlog_events.inc
+
+# First, wait until insert 3 is ready to queue up for group commit, but is
+# waiting for insert 2 to commit before it can do so itself.
+--connection server_2
+SET debug_sync='now WAIT_FOR slave_queued3';
+
+# Next, let insert 1 proceed, and allow it to queue up as the group commit
+# leader, but let it wait for insert 2 to also queue up before proceeding.
+--connection con_temp1
+ROLLBACK;
+--connection server_2
+SET debug_sync='now WAIT_FOR slave_queued1';
+
+# Now let insert 2 proceed and queue up.
+--connection con_temp2
+ROLLBACK;
+--connection server_2
+SET debug_sync='now WAIT_FOR slave_queued2';
+# And finally, we can let insert 1 proceed and do the group commit with all
+# three insert transactions together.
+SET debug_sync='now SIGNAL slave_cont1';
+
+# Wait for the commit to complete and check that all three transactions
+# group-committed together (will be seen in the binlog as all three having
+# cid=# on their GTID event).
+--let $wait_condition= SELECT COUNT(*) = 3 FROM t3 WHERE a IN (2,4,6)
+--source include/wait_condition.inc
+SELECT * FROM t3 ORDER BY a;
+--let $binlog_file= slave-bin.000001
+--source include/show_binlog_events.inc
+
+
+# Clean up.
+--connection server_2
+--source include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+--source include/start_slave.inc
+SET DEBUG_SYNC= 'RESET';
+
+--connection server_1
+DROP function foo;
+DROP TABLE t3;
+SET DEBUG_SYNC= 'RESET';
+
+--disable_connect_log
+--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/include/rpl_parallel_slave_bgc_kill.inc b/mysql-test/suite/rpl/include/rpl_parallel_slave_bgc_kill.inc
new file mode 100644
index 00000000000..a78dbad052f
--- /dev/null
+++ b/mysql-test/suite/rpl/include/rpl_parallel_slave_bgc_kill.inc
@@ -0,0 +1,454 @@
+--echo *** Test killing slave threads at various wait points ***
+
+--source include/have_innodb.inc
+--source include/have_debug.inc
+--source include/have_debug_sync.inc
+--source include/have_binlog_format_statement.inc
+--source include/master-slave.inc
+
+# Test various aspects of parallel replication.
+
+--connection server_2
+SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
+SET @old_parallel_mode=@@GLOBAL.slave_parallel_mode;
+--source include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=10;
+SET GLOBAL slave_parallel_mode='conservative';
+CHANGE MASTER TO master_use_gtid=slave_pos;
+--source include/start_slave.inc
+
+--connection server_1
+--connect (con_temp3,127.0.0.1,root,,test,$SERVER_MYPORT_1,)
+--connect (con_temp4,127.0.0.1,root,,test,$SERVER_MYPORT_1,)
+--connect (con_temp5,127.0.0.1,root,,test,$SERVER_MYPORT_1,)
+ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+CREATE TABLE t1 (a int PRIMARY KEY) ENGINE=MyISAM;
+CREATE TABLE t2 (a int PRIMARY KEY) ENGINE=InnoDB;
+CREATE TABLE t3 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB;
+--save_master_pos
+
+--connection server_2
+--sync_with_master
+
+--connection server_1
+# Use a stored function to inject a debug_sync into the appropriate THD.
+# The function does nothing on the master, and on the slave it injects the
+# desired debug_sync action(s).
+SET sql_log_bin=0;
+--delimiter ||
+CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
+ RETURNS INT DETERMINISTIC
+ BEGIN
+ RETURN x;
+ END
+||
+--delimiter ;
+SET sql_log_bin=1;
+
+--connection server_2
+SET sql_log_bin=0;
+--delimiter ||
+CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
+ RETURNS INT DETERMINISTIC
+ BEGIN
+ IF d1 != '' THEN
+ SET debug_sync = d1;
+ END IF;
+ IF d2 != '' THEN
+ SET debug_sync = d2;
+ END IF;
+ RETURN x;
+ END
+||
+--delimiter ;
+SET sql_log_bin=1;
+
+--echo *** 1. Test killing transaction waiting in commit for previous transaction to commit ***
+
+# Set up three transactions on the master that will be group-committed
+# together so they can be replicated in parallel on the slave.
+--connection con_temp3
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1';
+send INSERT INTO t3 VALUES (31, foo(31,
+ 'commit_before_prepare_ordered WAIT_FOR t2_waiting',
+ 'commit_after_prepare_ordered SIGNAL t1_ready WAIT_FOR t1_cont'));
+
+--connection server_1
+SET debug_sync='now WAIT_FOR master_queued1';
+
+--connection con_temp4
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2';
+BEGIN;
+# This insert is just so we can get T2 to wait while a query is running that we
+# can see in SHOW PROCESSLIST so we can get its thread_id to kill later.
+INSERT INTO t3 VALUES (32, foo(32,
+ 'ha_write_row_end SIGNAL t2_query WAIT_FOR t2_cont',
+ ''));
+# This insert sets up debug_sync points so that T2 will tell when it is at its
+# wait point where we want to kill it - and when it has been killed.
+INSERT INTO t3 VALUES (33, foo(33,
+ 'group_commit_waiting_for_prior SIGNAL t2_waiting',
+ 'group_commit_waiting_for_prior_killed SIGNAL t2_killed'));
+send COMMIT;
+
+--connection server_1
+SET debug_sync='now WAIT_FOR master_queued2';
+
+--connection con_temp5
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued3';
+send INSERT INTO t3 VALUES (34, foo(34,
+ '',
+ ''));
+
+--connection server_1
+SET debug_sync='now WAIT_FOR master_queued3';
+SET debug_sync='now SIGNAL master_cont1';
+
+--connection con_temp3
+REAP;
+--connection con_temp4
+REAP;
+--connection con_temp5
+REAP;
+
+--connection server_1
+SELECT * FROM t3 WHERE a >= 30 ORDER BY a;
+SET debug_sync='RESET';
+
+--connection server_2
+SET sql_log_bin=0;
+CALL mtr.add_suppression("Query execution was interrupted");
+CALL mtr.add_suppression("Commit failed due to failure of an earlier commit on which this one depends");
+CALL mtr.add_suppression("Slave: Connection was killed");
+SET sql_log_bin=1;
+# Wait until T2 is inside executing its insert of 32, then find it in SHOW
+# PROCESSLIST to know its thread id for KILL later.
+SET debug_sync='now WAIT_FOR t2_query';
+--let $thd_id= `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE INFO LIKE '%foo(32%' AND INFO NOT LIKE '%LIKE%'`
+SET debug_sync='now SIGNAL t2_cont';
+
+# Wait until T2 has entered its wait for T1 to commit, and T1 has
+# progressed into its commit phase.
+SET debug_sync='now WAIT_FOR t1_ready';
+
+# Now kill the transaction T2.
+--replace_result $thd_id THD_ID
+eval KILL $thd_id;
+
+# Wait until T2 has reacted on the kill.
+SET debug_sync='now WAIT_FOR t2_killed';
+
+# Now we can allow T1 to proceed.
+SET debug_sync='now SIGNAL t1_cont';
+
+--let $slave_sql_errno= 1317,1927,1964
+--source include/wait_for_slave_sql_error.inc
+STOP SLAVE IO_THREAD;
+SELECT * FROM t3 WHERE a >= 30 ORDER BY a;
+
+# Now we have to disable the debug_sync statements, so they do not trigger
+# when the events are retried.
+SET debug_sync='RESET';
+SET GLOBAL slave_parallel_threads=0;
+SET GLOBAL slave_parallel_threads=10;
+SET sql_log_bin=0;
+DROP FUNCTION foo;
+--delimiter ||
+CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
+ RETURNS INT DETERMINISTIC
+ BEGIN
+ RETURN x;
+ END
+||
+--delimiter ;
+SET sql_log_bin=1;
+
+--connection server_1
+INSERT INTO t3 VALUES (39,0);
+--save_master_pos
+
+--connection server_2
+--source include/start_slave.inc
+--sync_with_master
+SELECT * FROM t3 WHERE a >= 30 ORDER BY a;
+# Restore the foo() function.
+SET sql_log_bin=0;
+DROP FUNCTION foo;
+--delimiter ||
+CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
+ RETURNS INT DETERMINISTIC
+ BEGIN
+ IF d1 != '' THEN
+ SET debug_sync = d1;
+ END IF;
+ IF d2 != '' THEN
+ SET debug_sync = d2;
+ END IF;
+ RETURN x;
+ END
+||
+--delimiter ;
+SET sql_log_bin=1;
+
+
+--connection server_2
+# Respawn all worker threads to clear any left-over debug_sync or other stuff.
+--source include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=0;
+SET GLOBAL slave_parallel_threads=10;
+--source include/start_slave.inc
+
+
+--echo *** 2. Same as (1), but without restarting IO thread after kill of SQL threads ***
+
+# Set up three transactions on the master that will be group-committed
+# together so they can be replicated in parallel on the slave.
+--connection con_temp3
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1';
+send INSERT INTO t3 VALUES (41, foo(41,
+ 'commit_before_prepare_ordered WAIT_FOR t2_waiting',
+ 'commit_after_prepare_ordered SIGNAL t1_ready WAIT_FOR t1_cont'));
+
+--connection server_1
+SET debug_sync='now WAIT_FOR master_queued1';
+
+--connection con_temp4
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2';
+BEGIN;
+# This insert is just so we can get T2 to wait while a query is running that we
+# can see in SHOW PROCESSLIST so we can get its thread_id to kill later.
+INSERT INTO t3 VALUES (42, foo(42,
+ 'ha_write_row_end SIGNAL t2_query WAIT_FOR t2_cont',
+ ''));
+# This insert sets up debug_sync points so that T2 will tell when it is at its
+# wait point where we want to kill it - and when it has been killed.
+INSERT INTO t3 VALUES (43, foo(43,
+ 'group_commit_waiting_for_prior SIGNAL t2_waiting',
+ 'group_commit_waiting_for_prior_killed SIGNAL t2_killed'));
+send COMMIT;
+
+--connection server_1
+SET debug_sync='now WAIT_FOR master_queued2';
+
+--connection con_temp5
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued3';
+send INSERT INTO t3 VALUES (44, foo(44,
+ '',
+ ''));
+
+--connection server_1
+SET debug_sync='now WAIT_FOR master_queued3';
+SET debug_sync='now SIGNAL master_cont1';
+
+--connection con_temp3
+REAP;
+--connection con_temp4
+REAP;
+--connection con_temp5
+REAP;
+
+--connection server_1
+SELECT * FROM t3 WHERE a >= 40 ORDER BY a;
+SET debug_sync='RESET';
+
+--connection server_2
+# Wait until T2 is inside executing its insert of 42, then find it in SHOW
+# PROCESSLIST to know its thread id for KILL later.
+SET debug_sync='now WAIT_FOR t2_query';
+--let $thd_id= `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE INFO LIKE '%foo(42%' AND INFO NOT LIKE '%LIKE%'`
+SET debug_sync='now SIGNAL t2_cont';
+
+# Wait until T2 has entered its wait for T1 to commit, and T1 has
+# progressed into its commit phase.
+SET debug_sync='now WAIT_FOR t1_ready';
+
+# Now kill the transaction T2.
+--replace_result $thd_id THD_ID
+eval KILL $thd_id;
+
+# Wait until T2 has reacted on the kill.
+SET debug_sync='now WAIT_FOR t2_killed';
+
+# Now we can allow T1 to proceed.
+SET debug_sync='now SIGNAL t1_cont';
+
+--let $slave_sql_errno= 1317,1927,1964
+--source include/wait_for_slave_sql_error.inc
+
+# Now we have to disable the debug_sync statements, so they do not trigger
+# when the events are retried.
+SET debug_sync='RESET';
+SET GLOBAL slave_parallel_threads=0;
+SET GLOBAL slave_parallel_threads=10;
+SET sql_log_bin=0;
+DROP FUNCTION foo;
+--delimiter ||
+CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
+ RETURNS INT DETERMINISTIC
+ BEGIN
+ RETURN x;
+ END
+||
+--delimiter ;
+SET sql_log_bin=1;
+
+--connection server_1
+INSERT INTO t3 VALUES (49,0);
+--save_master_pos
+
+--connection server_2
+START SLAVE SQL_THREAD;
+--sync_with_master
+SELECT * FROM t3 WHERE a >= 40 ORDER BY a;
+# Restore the foo() function.
+SET sql_log_bin=0;
+DROP FUNCTION foo;
+--delimiter ||
+CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
+ RETURNS INT DETERMINISTIC
+ BEGIN
+ IF d1 != '' THEN
+ SET debug_sync = d1;
+ END IF;
+ IF d2 != '' THEN
+ SET debug_sync = d2;
+ END IF;
+ RETURN x;
+ END
+||
+--delimiter ;
+SET sql_log_bin=1;
+
+
+--connection server_2
+# Respawn all worker threads to clear any left-over debug_sync or other stuff.
+--source include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=0;
+SET GLOBAL slave_parallel_threads=10;
+--source include/start_slave.inc
+
+
+--echo *** 3. Same as (2), but not using gtid mode ***
+
+--connection server_2
+--source include/stop_slave.inc
+CHANGE MASTER TO master_use_gtid=no;
+--source include/start_slave.inc
+
+--connection server_1
+# Set up three transactions on the master that will be group-committed
+# together so they can be replicated in parallel on the slave.
+--connection con_temp3
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1';
+send INSERT INTO t3 VALUES (51, foo(51,
+ 'commit_before_prepare_ordered WAIT_FOR t2_waiting',
+ 'commit_after_prepare_ordered SIGNAL t1_ready WAIT_FOR t1_cont'));
+
+--connection server_1
+SET debug_sync='now WAIT_FOR master_queued1';
+
+--connection con_temp4
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2';
+BEGIN;
+# This insert is just so we can get T2 to wait while a query is running that we
+# can see in SHOW PROCESSLIST so we can get its thread_id to kill later.
+INSERT INTO t3 VALUES (52, foo(52,
+ 'ha_write_row_end SIGNAL t2_query WAIT_FOR t2_cont',
+ ''));
+# This insert sets up debug_sync points so that T2 will tell when it is at its
+# wait point where we want to kill it - and when it has been killed.
+INSERT INTO t3 VALUES (53, foo(53,
+ 'group_commit_waiting_for_prior SIGNAL t2_waiting',
+ 'group_commit_waiting_for_prior_killed SIGNAL t2_killed'));
+send COMMIT;
+
+--connection server_1
+SET debug_sync='now WAIT_FOR master_queued2';
+
+--connection con_temp5
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued3';
+send INSERT INTO t3 VALUES (54, foo(54,
+ '',
+ ''));
+
+--connection server_1
+SET debug_sync='now WAIT_FOR master_queued3';
+SET debug_sync='now SIGNAL master_cont1';
+
+--connection con_temp3
+REAP;
+--connection con_temp4
+REAP;
+--connection con_temp5
+REAP;
+
+--connection server_1
+SELECT * FROM t3 WHERE a >= 50 ORDER BY a;
+SET debug_sync='RESET';
+
+--connection server_2
+# Wait until T2 is inside executing its insert of 52, then find it in SHOW
+# PROCESSLIST to know its thread id for KILL later.
+SET debug_sync='now WAIT_FOR t2_query';
+--let $thd_id= `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE INFO LIKE '%foo(52%' AND INFO NOT LIKE '%LIKE%'`
+SET debug_sync='now SIGNAL t2_cont';
+
+# Wait until T2 has entered its wait for T1 to commit, and T1 has
+# progressed into its commit phase.
+SET debug_sync='now WAIT_FOR t1_ready';
+
+# Now kill the transaction T2.
+--replace_result $thd_id THD_ID
+eval KILL $thd_id;
+
+# Wait until T2 has reacted on the kill.
+SET debug_sync='now WAIT_FOR t2_killed';
+
+# Now we can allow T1 to proceed.
+SET debug_sync='now SIGNAL t1_cont';
+
+--let $slave_sql_errno= 1317,1927,1964
+--source include/wait_for_slave_sql_error.inc
+SELECT * FROM t3 WHERE a >= 50 ORDER BY a;
+
+# Now we have to disable the debug_sync statements, so they do not trigger
+# when the events are retried.
+SET debug_sync='RESET';
+SET GLOBAL slave_parallel_threads=0;
+SET GLOBAL slave_parallel_threads=10;
+SET sql_log_bin=0;
+DROP FUNCTION foo;
+--delimiter ||
+CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
+ RETURNS INT DETERMINISTIC
+ BEGIN
+ RETURN x;
+ END
+||
+--delimiter ;
+SET sql_log_bin=1;
+
+--connection server_1
+INSERT INTO t3 VALUES (59,0);
+--save_master_pos
+
+--connection server_2
+START SLAVE SQL_THREAD;
+--sync_with_master
+SELECT * FROM t3 WHERE a >= 50 ORDER BY a;
+
+# Clean up.
+--connection server_2
+--source include/stop_slave.inc
+CHANGE MASTER TO master_use_gtid=slave_pos;
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+SET GLOBAL slave_parallel_mode=@old_parallel_mode;
+--source include/start_slave.inc
+SET DEBUG_SYNC= 'RESET';
+
+--connection server_1
+DROP function foo;
+DROP TABLE t1,t2,t3;
+SET DEBUG_SYNC= 'RESET';
+
+--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/include/rpl_parallel_stop_on_con_kill.inc b/mysql-test/suite/rpl/include/rpl_parallel_stop_on_con_kill.inc
new file mode 100644
index 00000000000..63c483ea6ad
--- /dev/null
+++ b/mysql-test/suite/rpl/include/rpl_parallel_stop_on_con_kill.inc
@@ -0,0 +1,129 @@
+--echo *** MDEV-8031: Parallel replication stops on "connection killed" error (probably incorrectly handled deadlock kill) ***
+
+--source include/have_innodb.inc
+--source include/have_debug.inc
+--source include/have_debug_sync.inc
+--source include/master-slave.inc
+
+--connection server_2
+SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
+--source include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=10;
+CHANGE MASTER TO master_use_gtid=slave_pos;
+--source include/start_slave.inc
+
+--connection server_1
+ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+CREATE TABLE t3 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB;
+INSERT INTO t3 VALUES (201,0), (202,0);
+--source include/save_master_gtid.inc
+
+--connection server_2
+--source include/sync_with_master_gtid.inc
+--source include/stop_slave.inc
+SET @old_dbug= @@GLOBAL.debug_dbug;
+SET GLOBAL debug_dbug= '+d,inject_mdev8031';
+
+--connection server_1
+# We artificially create a situation that hopefully resembles the original
+# bug which was only seen "in the wild", and only once.
+# Setup a fake group commit with lots of conflicts that will lead to deadloc
+# kill. The slave DBUG injection causes the slave to be deadlock killed at
+# a particular point during the retry, and then later do a small sleep at
+# another critical point where the prior transaction then has a chance to
+# complete. Finally an extra KILL check catches an unhandled, lingering
+# deadlock kill. So rather artificial, but at least it exercises the
+# relevant code paths.
+SET @old_dbug= @@SESSION.debug_dbug;
+SET SESSION debug_dbug="+d,binlog_force_commit_id";
+
+SET @commit_id= 10200;
+INSERT INTO t3 VALUES (203, 1);
+INSERT INTO t3 VALUES (204, 1);
+INSERT INTO t3 VALUES (205, 1);
+UPDATE t3 SET b=b+1 WHERE a=201;
+UPDATE t3 SET b=b+1 WHERE a=201;
+UPDATE t3 SET b=b+1 WHERE a=201;
+UPDATE t3 SET b=b+1 WHERE a=202;
+UPDATE t3 SET b=b+1 WHERE a=202;
+UPDATE t3 SET b=b+1 WHERE a=202;
+UPDATE t3 SET b=b+1 WHERE a=202;
+UPDATE t3 SET b=b+1 WHERE a=203;
+UPDATE t3 SET b=b+1 WHERE a=203;
+UPDATE t3 SET b=b+1 WHERE a=204;
+UPDATE t3 SET b=b+1 WHERE a=204;
+UPDATE t3 SET b=b+1 WHERE a=204;
+UPDATE t3 SET b=b+1 WHERE a=203;
+UPDATE t3 SET b=b+1 WHERE a=205;
+UPDATE t3 SET b=b+1 WHERE a=205;
+SET SESSION debug_dbug=@old_dbug;
+
+SELECT * FROM t3 WHERE a>=200 ORDER BY a;
+--source include/save_master_gtid.inc
+
+--connection server_2
+--source include/start_slave.inc
+--source include/sync_with_master_gtid.inc
+
+SELECT * FROM t3 WHERE a>=200 ORDER BY a;
+--source include/stop_slave.inc
+SET GLOBAL debug_dbug= @old_dbug;
+--source include/start_slave.inc
+
+
+--echo *** Check getting deadlock killed inside open_binlog() during retry. ***
+
+--connection server_2
+--source include/stop_slave.inc
+SET @old_dbug= @@GLOBAL.debug_dbug;
+SET GLOBAL debug_dbug= '+d,inject_retry_event_group_open_binlog_kill';
+SET @old_max= @@GLOBAL.max_relay_log_size;
+SET GLOBAL max_relay_log_size= 4096;
+
+--connection server_1
+SET @old_dbug= @@SESSION.debug_dbug;
+SET SESSION debug_dbug="+d,binlog_force_commit_id";
+
+--let $large= `SELECT REPEAT("*", 8192)`
+SET @commit_id= 10210;
+--echo Omit long queries that cause relaylog rotations and transaction retries...
+--disable_query_log
+eval UPDATE t3 SET b=b+1 WHERE a=201 /* $large */;
+eval UPDATE t3 SET b=b+1 WHERE a=201 /* $large */;
+eval UPDATE t3 SET b=b+1 WHERE a=201 /* $large */;
+eval UPDATE t3 SET b=b+1 WHERE a=202 /* $large */;
+eval UPDATE t3 SET b=b+1 WHERE a=202 /* $large */;
+eval UPDATE t3 SET b=b+1 WHERE a=202 /* $large */;
+eval UPDATE t3 SET b=b+1 WHERE a=202 /* $large */;
+eval UPDATE t3 SET b=b+1 WHERE a=203 /* $large */;
+eval UPDATE t3 SET b=b+1 WHERE a=203 /* $large */;
+eval UPDATE t3 SET b=b+1 WHERE a=204 /* $large */;
+eval UPDATE t3 SET b=b+1 WHERE a=204 /* $large */;
+eval UPDATE t3 SET b=b+1 WHERE a=204 /* $large */;
+eval UPDATE t3 SET b=b+1 WHERE a=203 /* $large */;
+eval UPDATE t3 SET b=b+1 WHERE a=205 /* $large */;
+eval UPDATE t3 SET b=b+1 WHERE a=205 /* $large */;
+--enable_query_log
+SET SESSION debug_dbug=@old_dbug;
+
+SELECT * FROM t3 WHERE a>=200 ORDER BY a;
+--source include/save_master_gtid.inc
+
+--connection server_2
+--source include/start_slave.inc
+--source include/sync_with_master_gtid.inc
+
+SELECT * FROM t3 WHERE a>=200 ORDER BY a;
+
+# Cleanup
+--source include/stop_slave.inc
+SET GLOBAL debug_dbug= @old_debg;
+SET GLOBAL max_relay_log_size= @old_max;
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+--source include/start_slave.inc
+
+--connection server_1
+DROP TABLE t3;
+
+--source include/rpl_end.inc
+
diff --git a/mysql-test/suite/rpl/include/rpl_parallel_stop_slave.inc b/mysql-test/suite/rpl/include/rpl_parallel_stop_slave.inc
new file mode 100644
index 00000000000..4eeddc927e0
--- /dev/null
+++ b/mysql-test/suite/rpl/include/rpl_parallel_stop_slave.inc
@@ -0,0 +1,114 @@
+--echo *** Test STOP SLAVE in parallel mode ***
+
+--source include/have_innodb.inc
+--source include/have_debug.inc
+--source include/have_debug_sync.inc
+--source include/have_binlog_format_statement.inc
+--source include/master-slave.inc
+
+--connection server_2
+SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
+SET @old_parallel_mode=@@GLOBAL.slave_parallel_mode;
+--source include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=10;
+SET GLOBAL slave_parallel_mode='conservative';
+
+CHANGE MASTER TO master_use_gtid=slave_pos;
+--source include/start_slave.inc
+--connect (con_temp1,127.0.0.1,root,,test,$SERVER_MYPORT_2,)
+--connect (con_temp2,127.0.0.1,root,,test,$SERVER_MYPORT_2,)
+
+--connection server_1
+ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+CREATE TABLE t1 (a int PRIMARY KEY) ENGINE=MyISAM;
+CREATE TABLE t2 (a int PRIMARY KEY) ENGINE=InnoDB;
+CREATE TABLE t3 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB;
+--save_master_pos
+
+--connection server_2
+--sync_with_master
+--source include/stop_slave.inc
+
+--connection server_1
+# Set up a couple of transactions. The first will be blocked halfway
+# through on a lock, and while it is blocked we initiate STOP SLAVE.
+# We then test that the halfway-initiated transaction is allowed to
+# complete, but no subsequent ones.
+# We have to use statement-based mode and set
+# binlog_direct_non_transactional_updates=0; otherwise the binlog will
+# be split into two event groups, one for the MyISAM part and one for the
+# InnoDB part.
+SET binlog_direct_non_transactional_updates=0;
+SET sql_log_bin=0;
+CALL mtr.add_suppression("Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction");
+SET sql_log_bin=1;
+BEGIN;
+INSERT INTO t2 VALUES (20);
+--disable_warnings
+INSERT INTO t1 VALUES (20);
+--enable_warnings
+INSERT INTO t2 VALUES (21);
+INSERT INTO t3 VALUES (20, 20);
+COMMIT;
+INSERT INTO t3 VALUES(21, 21);
+INSERT INTO t3 VALUES(22, 22);
+--save_master_pos
+
+# Start a connection that will block the replicated transaction halfway.
+--connection con_temp1
+BEGIN;
+INSERT INTO t2 VALUES (21);
+
+--connection server_2
+START SLAVE;
+# Wait for the MyISAM change to be visible, after which replication will wait
+# for con_temp1 to roll back.
+--let $wait_condition= SELECT COUNT(*) = 1 FROM t1 WHERE a=20
+--source include/wait_condition.inc
+
+--connection con_temp2
+# Initiate slave stop. It will have to wait for the current event group
+# to complete.
+# The dbug injection causes debug_sync to signal 'wait_for_done_waiting'
+# when the SQL driver thread is ready.
+SET @old_dbug= @@GLOBAL.debug_dbug;
+SET GLOBAL debug_dbug="+d,rpl_parallel_wait_for_done_trigger";
+send STOP SLAVE;
+
+--connection con_temp1
+SET debug_sync='now WAIT_FOR wait_for_done_waiting';
+ROLLBACK;
+
+--connection con_temp2
+reap;
+SET GLOBAL debug_dbug=@old_dbug;
+SET debug_sync='RESET';
+
+--connection server_2
+--source include/wait_for_slave_to_stop.inc
+# We should see the first transaction applied, but not the two others.
+SELECT * FROM t1 WHERE a >= 20 ORDER BY a;
+SELECT * FROM t2 WHERE a >= 20 ORDER BY a;
+SELECT * FROM t3 WHERE a >= 20 ORDER BY a;
+
+--source include/start_slave.inc
+--sync_with_master
+SELECT * FROM t1 WHERE a >= 20 ORDER BY a;
+SELECT * FROM t2 WHERE a >= 20 ORDER BY a;
+SELECT * FROM t3 WHERE a >= 20 ORDER BY a;
+
+--connection server_2
+# Respawn all worker threads to clear any left-over debug_sync or other stuff.
+--source include/stop_slave.inc
+SET GLOBAL slave_parallel_mode=@old_parallel_mode;
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+--source include/start_slave.inc
+SET DEBUG_SYNC= 'RESET';
+--disconnect con_temp1
+--disconnect con_temp2
+
+--connection server_1
+DROP TABLE t1,t2,t3;
+SET DEBUG_SYNC= 'RESET';
+
+--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/include/rpl_parallel_wrong_binlog_order.inc b/mysql-test/suite/rpl/include/rpl_parallel_wrong_binlog_order.inc
new file mode 100644
index 00000000000..093693d453e
--- /dev/null
+++ b/mysql-test/suite/rpl/include/rpl_parallel_wrong_binlog_order.inc
@@ -0,0 +1,91 @@
+--echo *** MDEV-6775: Wrong binlog order in parallel replication ***
+
+# A bit tricky bug to reproduce. On the master, we binlog in statement-mode
+# two transactions, an UPDATE followed by a DELETE. On the slave, we replicate
+# with binlog-mode set to ROW, which means the DELETE, which modifies no rows,
+# is not binlogged. Then we inject a wait in the group commit code on the
+# slave, shortly before the actual commit of the UPDATE. The bug was that the
+# DELETE could wake up from wait_for_prior_commit() before the commit of the
+# UPDATE. So the test could see the slave position updated to after DELETE,
+# while the UPDATE was still not visible.
+
+--source include/have_innodb.inc
+--source include/have_debug.inc
+--source include/have_debug_sync.inc
+--source include/master-slave.inc
+
+--connection server_2
+SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
+--source include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=10;
+CHANGE MASTER TO master_use_gtid=slave_pos;
+--source include/start_slave.inc
+
+--connection server_1
+ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+CREATE TABLE t4 (a INT PRIMARY KEY, b INT, KEY b_idx(b)) ENGINE=InnoDB;
+INSERT INTO t4 VALUES (1,NULL), (3,NULL), (4,4), (5, NULL), (6, 6);
+--connect (con1,127.0.0.1,root,,test,$SERVER_MYPORT_1,)
+--connect (con2,127.0.0.1,root,,test,$SERVER_MYPORT_1,)
+--source include/save_master_gtid.inc
+
+--connection server_2
+--source include/sync_with_master_gtid.inc
+--source include/stop_slave.inc
+SET @old_dbug= @@GLOBAL.debug_dbug;
+SET GLOBAL debug_dbug="+d,inject_binlog_commit_before_get_LOCK_log";
+SET @old_format=@@GLOBAL.binlog_format;
+SET GLOBAL binlog_format=ROW;
+# Re-spawn the worker threads to be sure they pick up the new binlog format
+SET GLOBAL slave_parallel_threads=0;
+SET GLOBAL slave_parallel_threads=10;
+
+--connection con1
+SET @old_format= @@binlog_format;
+SET binlog_format= statement;
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1';
+send UPDATE t4 SET b=NULL WHERE a=6;
+--connection server_1
+SET debug_sync='now WAIT_FOR master_queued1';
+
+--connection con2
+SET @old_format= @@binlog_format;
+SET binlog_format= statement;
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2';
+send DELETE FROM t4 WHERE b <= 3;
+
+--connection server_1
+SET debug_sync='now WAIT_FOR master_queued2';
+SET debug_sync='now SIGNAL master_cont1';
+
+--connection con1
+REAP;
+SET binlog_format= @old_format;
+--connection con2
+REAP;
+SET binlog_format= @old_format;
+SET debug_sync='RESET';
+--save_master_pos
+SELECT * FROM t4 ORDER BY a;
+
+--connection server_2
+--source include/start_slave.inc
+SET debug_sync= 'now WAIT_FOR waiting';
+--sync_with_master
+SELECT * FROM t4 ORDER BY a;
+SET debug_sync= 'now SIGNAL cont';
+
+# Re-spawn the worker threads to remove any DBUG injections or DEBUG_SYNC.
+--source include/stop_slave.inc
+SET GLOBAL debug_dbug=@old_dbug;
+SET GLOBAL binlog_format= @old_format;
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+--source include/start_slave.inc
+SET DEBUG_SYNC= 'RESET';
+
+--connection server_1
+DROP TABLE t4;
+SET DEBUG_SYNC= 'RESET';
+--disconnect con1
+--disconnect con2
+--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/include/rpl_parallel_wrong_exec_master_pos.inc b/mysql-test/suite/rpl/include/rpl_parallel_wrong_exec_master_pos.inc
new file mode 100644
index 00000000000..672ade57ca3
--- /dev/null
+++ b/mysql-test/suite/rpl/include/rpl_parallel_wrong_exec_master_pos.inc
@@ -0,0 +1,56 @@
+--echo *** MDEV-5938: Exec_master_log_pos not updated at log rotate in parallel replication ***
+--source include/have_innodb.inc
+--source include/master-slave.inc
+
+--connection server_2
+--source include/stop_slave.inc
+SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
+SET GLOBAL slave_parallel_threads=1;
+CHANGE MASTER TO master_use_gtid=slave_pos;
+--source include/start_slave.inc
+
+--connection server_1
+ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+CREATE TABLE t5 (a INT PRIMARY KEY, b INT);
+INSERT INTO t5 VALUES (1,1);
+INSERT INTO t5 VALUES (2,2), (3,8);
+INSERT INTO t5 VALUES (4,16);
+--save_master_pos
+
+--connection server_2
+--sync_with_master
+let $io_file= query_get_value(SHOW SLAVE STATUS, Master_Log_File, 1);
+let $io_pos= query_get_value(SHOW SLAVE STATUS, Read_Master_Log_Pos, 1);
+let $sql_file= query_get_value(SHOW SLAVE STATUS, Relay_Master_Log_File, 1);
+let $sql_pos= query_get_value(SHOW SLAVE STATUS, Exec_Master_Log_Pos, 1);
+--disable_query_log
+eval SELECT IF('$io_file' = '$sql_file', "OK", "Not ok, $io_file <> $sql_file") AS test_check;
+eval SELECT IF('$io_pos' = '$sql_pos', "OK", "Not ok, $io_pos <> $sql_pos") AS test_check;
+--enable_query_log
+
+--connection server_1
+FLUSH LOGS;
+--source include/wait_for_binlog_checkpoint.inc
+--save_master_pos
+
+--connection server_2
+--sync_with_master
+let $io_file= query_get_value(SHOW SLAVE STATUS, Master_Log_File, 1);
+let $io_pos= query_get_value(SHOW SLAVE STATUS, Read_Master_Log_Pos, 1);
+let $sql_file= query_get_value(SHOW SLAVE STATUS, Relay_Master_Log_File, 1);
+let $sql_pos= query_get_value(SHOW SLAVE STATUS, Exec_Master_Log_Pos, 1);
+--disable_query_log
+eval SELECT IF('$io_file' = '$sql_file', "OK", "Not ok, $io_file <> $sql_file") AS test_check;
+eval SELECT IF('$io_pos' = '$sql_pos', "OK", "Not ok, $io_pos <> $sql_pos") AS test_check;
+--enable_query_log
+
+# Clean up.
+--connection server_2
+--source include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+--source include/start_slave.inc
+
+--connection server_1
+DROP TABLE t5;
+
+--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/include/rpl_stm_relay_ign_space.inc b/mysql-test/suite/rpl/include/rpl_stm_relay_ign_space.inc
index 41339f539f8..654a5d47cb9 100644
--- a/mysql-test/suite/rpl/include/rpl_stm_relay_ign_space.inc
+++ b/mysql-test/suite/rpl/include/rpl_stm_relay_ign_space.inc
@@ -41,7 +41,7 @@ INSERT INTO t1 VALUES ('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# wait for the SQL thread to sleep
--let $show_statement= SHOW PROCESSLIST
--let $field= State
---let $condition= = 'Slave has read all relay log; waiting for the slave I/O thread to update it'
+--let $condition= = 'Slave has read all relay log; waiting for more updates'
--source include/wait_show_condition.inc
# now the io thread has set rli->ignore_space_limit
diff --git a/mysql-test/suite/rpl/include/rpl_xa_mixed_engines.inc b/mysql-test/suite/rpl/include/rpl_xa_mixed_engines.inc
new file mode 100644
index 00000000000..0707a04090a
--- /dev/null
+++ b/mysql-test/suite/rpl/include/rpl_xa_mixed_engines.inc
@@ -0,0 +1,183 @@
+#
+# The test file is invoked from rpl.rpl_xa_survive_disconnect_mixed_engines
+#
+# The test file is orginized as three sections: setup, run and cleanup.
+# The main logics is resided in the run section which generates
+# three types of XA transaction: two kinds of mixed and one on non-transactional
+# table.
+#
+# param $command one of three of: 'setup', 'run' or 'cleanup'
+# param $xa_terminate how to conclude: 'XA COMMIT' or 'XA ROLLBACK'
+# param $one_phase 'one_phase' can be opted with XA COMMIT above
+# param $xa_prepare_opt '1' or empty can be opted to test with and without XA PREPARE
+# param $xid arbitrary name for xa trx, defaults to 'xa_trx'
+# Note '' is merely to underline, not a part of the value.
+#
+
+if ($command == setup)
+{
+ # Test randomizes the following variable's value:
+ SET @@session.binlog_direct_non_transactional_updates := if(floor(rand()*10)%2,'ON','OFF');
+ CREATE TABLE t (a INT) ENGINE=innodb;
+ CREATE TABLE tm (a INT) ENGINE=myisam;
+}
+if (!$xid)
+{
+ --let $xid=xa_trx
+}
+if ($command == run)
+{
+ ## Non-temporary table cases
+ # Non transactional table goes first
+ --eval XA START '$xid'
+ --disable_warnings
+ INSERT INTO tm VALUES (1);
+ INSERT INTO t VALUES (1);
+ --enable_warnings
+ --eval XA END '$xid'
+ if ($xa_prepare_opt)
+ {
+ --eval XA PREPARE '$xid'
+ }
+ --eval $xa_terminate '$xid' $one_phase
+
+ # Transactional table goes first
+ --eval XA START '$xid'
+ --disable_warnings
+ INSERT INTO t VALUES (2);
+ INSERT INTO tm VALUES (2);
+ --enable_warnings
+ --eval XA END '$xid'
+ if ($xa_prepare_opt)
+ {
+ --eval XA PREPARE '$xid'
+ }
+ --eval $xa_terminate '$xid' $one_phase
+
+ # The pure non-transactional table
+ --eval XA START '$xid'
+ --disable_warnings
+ INSERT INTO tm VALUES (3);
+ --enable_warnings
+ --eval XA END '$xid'
+ if ($xa_prepare_opt)
+ {
+ --eval XA PREPARE '$xid'
+ }
+ --eval $xa_terminate '$xid' $one_phase
+
+ ## Temporary tables
+ # create outside xa use at the tail
+ CREATE TEMPORARY TABLE tmp_i LIKE t;
+ CREATE TEMPORARY TABLE tmp_m LIKE tm;
+ --eval XA START '$xid'
+ --disable_warnings
+ INSERT INTO t VALUES (4);
+ INSERT INTO tm VALUES (4);
+ INSERT INTO tmp_i VALUES (4);
+ INSERT INTO tmp_m VALUES (4);
+ INSERT INTO t SELECT * FROM tmp_i;
+ INSERT INTO tm SELECT * FROM tmp_m;
+ --enable_warnings
+ --eval XA END '$xid'
+ if ($xa_prepare_opt)
+ {
+ --eval XA PREPARE '$xid'
+ }
+ --eval $xa_terminate '$xid' $one_phase
+
+ # temporary tables at the head
+ --eval XA START '$xid'
+ --disable_warnings
+ INSERT INTO tmp_i VALUES (5);
+ INSERT INTO tmp_m VALUES (5);
+ INSERT INTO t SELECT * FROM tmp_i;
+ INSERT INTO tm SELECT * FROM tmp_m;
+ INSERT INTO t VALUES (5);
+ INSERT INTO tm VALUES (5);
+ --enable_warnings
+ --eval XA END '$xid'
+ if ($xa_prepare_opt)
+ {
+ --eval XA PREPARE '$xid'
+ }
+ --eval $xa_terminate '$xid' $one_phase
+
+ # create inside xa use at the tail
+ DROP TEMPORARY TABLE tmp_i;
+ DROP TEMPORARY TABLE tmp_m;
+
+ --eval XA START '$xid'
+ --disable_warnings
+ INSERT INTO t VALUES (6);
+ INSERT INTO tm VALUES (6);
+ CREATE TEMPORARY TABLE tmp_i LIKE t;
+ CREATE TEMPORARY TABLE tmp_m LIKE tm;
+ INSERT INTO tmp_i VALUES (6);
+ INSERT INTO tmp_m VALUES (6);
+ INSERT INTO t SELECT * FROM tmp_i;
+ INSERT INTO tm SELECT * FROM tmp_m;
+ --enable_warnings
+ --eval XA END '$xid'
+ if ($xa_prepare_opt)
+ {
+ --eval XA PREPARE '$xid'
+ }
+ --eval $xa_terminate '$xid' $one_phase
+
+ # use at the head
+ DROP TEMPORARY TABLE tmp_i;
+ DROP TEMPORARY TABLE tmp_m;
+ --eval XA START '$xid'
+ --disable_warnings
+ CREATE TEMPORARY TABLE tmp_i LIKE t;
+ CREATE TEMPORARY TABLE tmp_m LIKE tm;
+ INSERT INTO tmp_i VALUES (7);
+ INSERT INTO tmp_m VALUES (7);
+ INSERT INTO t SELECT * FROM tmp_i;
+ INSERT INTO tm SELECT * FROM tmp_m;
+ INSERT INTO t VALUES (7);
+ INSERT INTO tm VALUES (7);
+ --enable_warnings
+ --eval XA END '$xid'
+ if ($xa_prepare_opt)
+ {
+ --eval XA PREPARE '$xid'
+ }
+ --eval $xa_terminate '$xid' $one_phase
+
+ # use at the tail and drop
+ --eval XA START '$xid'
+ --disable_warnings
+ INSERT INTO t VALUES (8);
+ INSERT INTO tm VALUES (8);
+ INSERT INTO tmp_i VALUES (8);
+ INSERT INTO tmp_m VALUES (8);
+ INSERT INTO t SELECT * FROM tmp_i;
+ INSERT INTO tm SELECT * FROM tmp_m;
+ DROP TEMPORARY TABLE tmp_i;
+ DROP TEMPORARY TABLE tmp_m;
+ --enable_warnings
+ --eval XA END '$xid'
+ if ($xa_prepare_opt)
+ {
+ --eval XA PREPARE '$xid'
+ }
+ --eval $xa_terminate '$xid' $one_phase
+
+ ## Ineffective transactional table operation case
+
+ --eval XA START '$xid'
+ UPDATE t SET a = 99 where a = -1;
+ --eval XA END '$xid'
+ if ($xa_prepare_opt)
+ {
+ --eval XA PREPARE '$xid'
+ }
+ --eval $xa_terminate '$xid' $one_phase
+}
+
+if ($command == cleanup)
+{
+ DROP TABLE t, tm;
+}
diff --git a/mysql-test/suite/rpl/r/create_or_replace_mix.result b/mysql-test/suite/rpl/r/create_or_replace_mix.result
index b44b2a5c10f..9036ab425ae 100644
--- a/mysql-test/suite/rpl/r/create_or_replace_mix.result
+++ b/mysql-test/suite/rpl/r/create_or_replace_mix.result
@@ -85,9 +85,12 @@ 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)
-master-bin.000001 # Gtid # # BEGIN GTID #-#-#
+master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `test`.`t1`/* Generated to handle failed CREATE OR REPLACE */
-master-bin.000001 # Query # # ROLLBACK
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # use `test`; create temporary table t9 (a int)
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`t9`/* Generated to handle failed CREATE OR REPLACE */
connection server_2;
show tables;
Tables_in_test
@@ -100,9 +103,8 @@ 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`; create table t1 (a int)
-master-bin.000001 # Gtid # # BEGIN GTID #-#-#
+master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `test`.`t1`/* Generated to handle failed CREATE OR REPLACE */
-master-bin.000001 # Query # # ROLLBACK
drop table if exists t1,t2;
Warnings:
Note 1051 Unknown table 'test.t1'
@@ -157,7 +159,7 @@ slave-bin.000001 # Query # # use `test`; create table t4 (server_2_to_be_delete
slave-bin.000001 # Gtid # # GTID #-#-#
slave-bin.000001 # Query # # use `test`; create table t1 (new_table int)
slave-bin.000001 # Gtid # # BEGIN GTID #-#-#
-slave-bin.000001 # Query # # use `test`; CREATE TABLE `t2` (
+slave-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE `t2` (
`a` int(11) DEFAULT NULL
)
slave-bin.000001 # Annotate_rows # # create table t2 select * from t9
@@ -226,26 +228,12 @@ Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000001 # Gtid # # GTID #-#-#
slave-bin.000001 # Query # # use `test`; create table t1 (a int)
slave-bin.000001 # Gtid # # BEGIN GTID #-#-#
-slave-bin.000001 # Annotate_rows # # insert into t1 values (0),(1),(2)
-slave-bin.000001 # Table_map # # table_id: # (test.t1)
-slave-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
+slave-bin.000001 # Query # # use `test`; insert into t1 values (0),(1),(2)
slave-bin.000001 # Query # # COMMIT
-slave-bin.000001 # Gtid # # BEGIN GTID #-#-#
-slave-bin.000001 # Query # # use `test`; CREATE TABLE `t2` (
- `a` int(11) DEFAULT NULL
-) ENGINE=MyISAM
-slave-bin.000001 # Annotate_rows # # create table t2 engine=myisam select * from t1
-slave-bin.000001 # Table_map # # table_id: # (test.t2)
-slave-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
-slave-bin.000001 # Query # # COMMIT
-slave-bin.000001 # Gtid # # BEGIN GTID #-#-#
-slave-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE `t2` (
- `a` int(11) DEFAULT NULL
-) ENGINE=InnoDB
-slave-bin.000001 # Annotate_rows # # create or replace table t2 engine=innodb select * from t1
-slave-bin.000001 # Table_map # # table_id: # (test.t2)
-slave-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
-slave-bin.000001 # Xid # # COMMIT /* XID */
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `test`; create table t2 engine=myisam select * from t1
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `test`; create or replace table t2 engine=innodb select * from t1
connection server_1;
drop table t1;
#
diff --git a/mysql-test/suite/rpl/r/create_or_replace_statement.result b/mysql-test/suite/rpl/r/create_or_replace_statement.result
index 4d6409b1710..9036ab425ae 100644
--- a/mysql-test/suite/rpl/r/create_or_replace_statement.result
+++ b/mysql-test/suite/rpl/r/create_or_replace_statement.result
@@ -162,6 +162,7 @@ slave-bin.000001 # Gtid # # BEGIN GTID #-#-#
slave-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE `t2` (
`a` int(11) DEFAULT NULL
)
+slave-bin.000001 # Annotate_rows # # create table t2 select * from t9
slave-bin.000001 # Table_map # # table_id: # (test.t2)
slave-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
slave-bin.000001 # Query # # COMMIT
@@ -173,6 +174,7 @@ slave-bin.000001 # Gtid # # BEGIN GTID #-#-#
slave-bin.000001 # Query # # use `test`; CREATE TABLE `t5` (
`a` int(11) DEFAULT NULL
)
+slave-bin.000001 # Annotate_rows # # create table t5 select * from t9
slave-bin.000001 # Table_map # # table_id: # (test.t5)
slave-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
slave-bin.000001 # Query # # COMMIT
diff --git a/mysql-test/suite/rpl/r/grant_replication_slave.result b/mysql-test/suite/rpl/r/grant_replication_slave.result
new file mode 100644
index 00000000000..6ded7e72327
--- /dev/null
+++ b/mysql-test/suite/rpl/r/grant_replication_slave.result
@@ -0,0 +1,43 @@
+#
+# MDEV-21743 Split up SUPER privilege to smaller privileges
+#
+create user rpl@localhost;
+grant replication slave on *.* to rpl@localhost;
+include/master-slave.inc
+[connection master]
+connection slave;
+stop slave;
+change master to master_user='rpl';
+connection master;
+create database mysqltest1;
+create table mysqltest1.t1 (a int);
+insert mysqltest1.t1 values (1),(2),(3);
+select * from mysqltest1.t1;
+a
+1
+2
+3
+flush tables;
+create user foo@localhost;
+grant select on *.* to foo@localhost;
+connection slave;
+start slave;
+connection master;
+connection slave;
+select * from mysqltest1.t1;
+a
+1
+2
+3
+show grants for foo@localhost;
+Grants for foo@localhost
+GRANT SELECT ON *.* TO `foo`@`localhost`
+connection master;
+drop user foo@localhost;
+drop database mysqltest1;
+connection slave;
+stop slave;
+change master to master_user='root';
+start slave;
+include/rpl_end.inc
+drop user rpl@localhost;
diff --git a/mysql-test/suite/rpl/r/rpl_binlog_rollback_cleanup.result b/mysql-test/suite/rpl/r/rpl_binlog_rollback_cleanup.result
index a677cbfecf6..90446776e5b 100644
--- a/mysql-test/suite/rpl/r/rpl_binlog_rollback_cleanup.result
+++ b/mysql-test/suite/rpl/r/rpl_binlog_rollback_cleanup.result
@@ -3,7 +3,7 @@ include/master-slave.inc
connection master;
SET GLOBAL max_binlog_cache_size = 65536;
CREATE TABLE t1(a INT PRIMARY KEY, data VARCHAR(30000)) ENGINE=INNODB;
-ERROR HY000: Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage; increase this mysqld variable and try again
+ERROR HY000: Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage
SET GLOBAL max_binlog_cache_size= ORIGINAL_VALUE;
DROP TABLE t1;
include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_blackhole_row_annotate.result b/mysql-test/suite/rpl/r/rpl_blackhole_row_annotate.result
index 2e75080810b..52da842d855 100644
--- a/mysql-test/suite/rpl/r/rpl_blackhole_row_annotate.result
+++ b/mysql-test/suite/rpl/r/rpl_blackhole_row_annotate.result
@@ -200,7 +200,7 @@ ROLLBACK/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=#/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=1411383296/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
diff --git a/mysql-test/suite/rpl/r/rpl_create_drop_view.result b/mysql-test/suite/rpl/r/rpl_create_drop_view.result
index facd40a6018..079eb749b37 100644
--- a/mysql-test/suite/rpl/r/rpl_create_drop_view.result
+++ b/mysql-test/suite/rpl/r/rpl_create_drop_view.result
@@ -93,7 +93,8 @@ id
80
40
connection master;
-DROP VIEW v1;
+RENAME TABLE v1 TO v2;
+DROP VIEW v2;
DROP TABLE t1;
DROP VIEW v1;
ERROR 42S02: Unknown VIEW: 'test.v1'
diff --git a/mysql-test/suite/rpl/r/rpl_create_or_replace_fail.result b/mysql-test/suite/rpl/r/rpl_create_or_replace_fail.result
index 5cb2cd36d02..a85b286328b 100644
--- a/mysql-test/suite/rpl/r/rpl_create_or_replace_fail.result
+++ b/mysql-test/suite/rpl/r/rpl_create_or_replace_fail.result
@@ -4,7 +4,7 @@ CREATE TEMPORARY TABLE t1 (a INT NOT NULL);
LOAD DATA INFILE 'x' INTO TABLE x;
ERROR 42S02: Table 'test.x' doesn't exist
CREATE OR REPLACE TEMPORARY TABLE t1 (x INT) PARTITION BY HASH(x);
-ERROR HY000: Cannot create temporary table with partitions
+ERROR HY000: Partitioned tables do not support CREATE TEMPORARY TABLE
"************** DROP TEMPORARY TABLE Should be present in Binary log **************"
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
diff --git a/mysql-test/suite/rpl/r/rpl_delayed_slave.result b/mysql-test/suite/rpl/r/rpl_delayed_slave.result
index bcfd49934b4..e7daa3328ce 100644
--- a/mysql-test/suite/rpl/r/rpl_delayed_slave.result
+++ b/mysql-test/suite/rpl/r/rpl_delayed_slave.result
@@ -185,7 +185,7 @@ DROP FUNCTION delay_on_slave;
connection slave;
SELECT @@GLOBAL.slave_parallel_mode;
@@GLOBAL.slave_parallel_mode
-conservative
+optimistic
SELECT @@GLOBAL.slave_parallel_threads;
@@GLOBAL.slave_parallel_threads
0
diff --git a/mysql-test/suite/rpl/r/rpl_dual_pos_advance.result b/mysql-test/suite/rpl/r/rpl_dual_pos_advance.result
index 676d74b9478..a9243d23bf6 100644
--- a/mysql-test/suite/rpl/r/rpl_dual_pos_advance.result
+++ b/mysql-test/suite/rpl/r/rpl_dual_pos_advance.result
@@ -20,7 +20,7 @@ insert into t3 values(4);
connection server_1;
start slave until master_log_file="MASTER_LOG_FILE",master_log_pos=MASTER_LOG_POS;
Warnings:
-Note 1278 It is recommended to use --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL; otherwise, you will get problems if you get an unexpected slave's mysqld restart
+Note 1278 It is recommended to use --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL; otherwise, you will get problems if you get an unexpected slave's mariadbd restart
include/wait_for_slave_sql_to_stop.inc
show tables;
Tables_in_test
@@ -28,14 +28,14 @@ t1
t2
start slave until master_log_file="MASTER_LOG_FILE",master_log_pos=MASTER_LOG_POS;
Warnings:
-Note 1278 It is recommended to use --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL; otherwise, you will get problems if you get an unexpected slave's mysqld restart
+Note 1278 It is recommended to use --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL; otherwise, you will get problems if you get an unexpected slave's mariadbd restart
include/wait_for_slave_sql_to_stop.inc
select * from t3;
n
1
start slave until master_log_file="MASTER_LOG_FILE",master_log_pos=MASTER_LOG_POS;
Warnings:
-Note 1278 It is recommended to use --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL; otherwise, you will get problems if you get an unexpected slave's mysqld restart
+Note 1278 It is recommended to use --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL; otherwise, you will get problems if you get an unexpected slave's mariadbd restart
include/wait_for_slave_sql_to_stop.inc
select * from t3;
n
diff --git a/mysql-test/suite/rpl/r/rpl_foreign_key_innodb.result b/mysql-test/suite/rpl/r/rpl_foreign_key_innodb.result
index 7f2a82f1efb..cd8bb938828 100644
--- a/mysql-test/suite/rpl/r/rpl_foreign_key_innodb.result
+++ b/mysql-test/suite/rpl/r/rpl_foreign_key_innodb.result
@@ -55,4 +55,21 @@ count(*)
0
connection master;
drop table t2,t1;
+set foreign_key_checks=1;
+#
+# MDEV-25530 Error 1451 on slave: Cannot delete or update a parent row: a foreign key constraint fails
+#
+create table t1 (id int primary key)engine=innodb;
+create table t2 (id int not null primary key auto_increment,
+id2 int default null, key f1 (id2),
+constraint f1 foreign key (id2) references t1 (id) on delete cascade) engine=innodb;
+drop table t1,t2;
+ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails
+connection slave;
+show tables;
+Tables_in_test
+t1
+connection master;
+drop table t1;
+connection slave;
include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_hrtime.result b/mysql-test/suite/rpl/r/rpl_hrtime.result
index d878a8d9df9..406b1d145d1 100644
--- a/mysql-test/suite/rpl/r/rpl_hrtime.result
+++ b/mysql-test/suite/rpl/r/rpl_hrtime.result
@@ -37,7 +37,7 @@ ROLLBACK/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1293832861/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=1411383296/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
diff --git a/mysql-test/suite/rpl/r/rpl_mdev382.result b/mysql-test/suite/rpl/r/rpl_mdev382.result
index 7e26e82d8c9..5ec40d81ade 100644
--- a/mysql-test/suite/rpl/r/rpl_mdev382.result
+++ b/mysql-test/suite/rpl/r/rpl_mdev382.result
@@ -179,7 +179,7 @@ ROLLBACK/*!*/;
use `db1``; select 'oops!'`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -279,7 +279,7 @@ ROLLBACK/*!*/;
use `db1``; select 'oops!'`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -388,7 +388,7 @@ START TRANSACTION
use `ts``et`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=1411383296/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
diff --git a/mysql-test/suite/rpl/r/rpl_mdev6386.result b/mysql-test/suite/rpl/r/rpl_mdev6386.result
index 91ba9569343..d0e5144857a 100644
--- a/mysql-test/suite/rpl/r/rpl_mdev6386.result
+++ b/mysql-test/suite/rpl/r/rpl_mdev6386.result
@@ -7,6 +7,7 @@ connection slave;
connection slave;
include/stop_slave.inc
SET sql_log_bin= 0;
+CALL mtr.add_suppression("Commit failed due to failure of an earlier commit on which this one depends");
INSERT INTO t1 VALUES (1, 2);
SET sql_log_bin= 1;
CHANGE MASTER TO master_use_gtid= current_pos;
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 9fbb7b0ab19..8b6ee56a3b4 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
@@ -1,6 +1,6 @@
include/master-slave.inc
[connection master]
-set session storage_engine=innodb;
+set session default_storage_engine=innodb;
#########################################################################
# CONFIGURATION
#########################################################################
diff --git a/mysql-test/suite/rpl/r/rpl_parallel.result b/mysql-test/suite/rpl/r/rpl_parallel.result
deleted file mode 100644
index c5ae4d9984c..00000000000
--- a/mysql-test/suite/rpl/r/rpl_parallel.result
+++ /dev/null
@@ -1,1690 +0,0 @@
-include/master-slave.inc
-[connection master]
-connection server_2;
-SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
-SET GLOBAL slave_parallel_threads=10;
-ERROR HY000: This operation cannot be performed as you have a running slave ''; run STOP SLAVE '' first
-include/stop_slave.inc
-SET GLOBAL slave_parallel_threads=10;
-SELECT IF(COUNT(*) < 10, "OK", CONCAT("Found too many system user processes: ", COUNT(*))) FROM information_schema.processlist WHERE user = "system user";
-IF(COUNT(*) < 10, "OK", CONCAT("Found too many system user processes: ", COUNT(*)))
-OK
-CHANGE MASTER TO master_use_gtid=slave_pos;
-include/start_slave.inc
-SELECT IF(COUNT(*) >= 10, "OK", CONCAT("Found too few system user processes: ", COUNT(*))) FROM information_schema.processlist WHERE user = "system user";
-IF(COUNT(*) >= 10, "OK", CONCAT("Found too few system user processes: ", COUNT(*)))
-OK
-include/stop_slave.inc
-SELECT IF(COUNT(*) < 10, "OK", CONCAT("Found too many system user processes: ", COUNT(*))) FROM information_schema.processlist WHERE user = "system user";
-IF(COUNT(*) < 10, "OK", CONCAT("Found too many system user processes: ", COUNT(*)))
-OK
-include/start_slave.inc
-SELECT IF(COUNT(*) >= 10, "OK", CONCAT("Found too few system user processes: ", COUNT(*))) FROM information_schema.processlist WHERE user = "system user";
-IF(COUNT(*) >= 10, "OK", CONCAT("Found too few system user processes: ", COUNT(*)))
-OK
-*** Test long-running query in domain 1 can run in parallel with short queries in domain 0 ***
-connection server_1;
-ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
-CREATE TABLE t1 (a int PRIMARY KEY) ENGINE=MyISAM;
-CREATE TABLE t2 (a int PRIMARY KEY) ENGINE=InnoDB;
-INSERT INTO t1 VALUES (1);
-INSERT INTO t2 VALUES (1);
-connection server_2;
-connect con_temp1,127.0.0.1,root,,test,$SERVER_MYPORT_2,;
-LOCK TABLE t1 WRITE;
-connection server_1;
-SET gtid_domain_id=1;
-INSERT INTO t1 VALUES (2);
-SET gtid_domain_id=0;
-INSERT INTO t2 VALUES (2);
-INSERT INTO t2 VALUES (3);
-BEGIN;
-INSERT INTO t2 VALUES (4);
-INSERT INTO t2 VALUES (5);
-COMMIT;
-INSERT INTO t2 VALUES (6);
-connection server_2;
-SELECT * FROM t2 ORDER by a;
-a
-1
-2
-3
-4
-5
-6
-connection con_temp1;
-SELECT * FROM t1;
-a
-1
-UNLOCK TABLES;
-connection server_2;
-SELECT * FROM t1 ORDER BY a;
-a
-1
-2
-*** Test two transactions in different domains committed in opposite order on slave but in a single group commit. ***
-connection server_2;
-include/stop_slave.inc
-connection server_1;
-SET sql_log_bin=0;
-CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
-RETURNS INT DETERMINISTIC
-BEGIN
-RETURN x;
-END
-||
-SET sql_log_bin=1;
-SET @old_format= @@SESSION.binlog_format;
-SET binlog_format='statement';
-SET gtid_domain_id=1;
-INSERT INTO t2 VALUES (foo(10,
-'commit_before_enqueue SIGNAL ready1 WAIT_FOR cont1',
-'commit_after_release_LOCK_prepare_ordered SIGNAL ready2'));
-connection server_2;
-FLUSH LOGS;
-SET sql_log_bin=0;
-CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
-RETURNS INT DETERMINISTIC
-BEGIN
-IF d1 != '' THEN
-SET debug_sync = d1;
-END IF;
-IF d2 != '' THEN
-SET debug_sync = d2;
-END IF;
-RETURN x;
-END
-||
-SET sql_log_bin=1;
-SET @old_format=@@GLOBAL.binlog_format;
-SET GLOBAL binlog_format=statement;
-SET GLOBAL slave_parallel_threads=0;
-SET GLOBAL slave_parallel_threads=10;
-include/start_slave.inc
-SET debug_sync='now WAIT_FOR ready1';
-connection server_1;
-SET gtid_domain_id=2;
-INSERT INTO t2 VALUES (foo(11,
-'commit_before_enqueue SIGNAL ready3 WAIT_FOR cont3',
-'commit_after_release_LOCK_prepare_ordered SIGNAL ready4 WAIT_FOR cont4'));
-SET gtid_domain_id=0;
-SELECT * FROM t2 WHERE a >= 10 ORDER BY a;
-a
-10
-11
-connection server_2;
-SET debug_sync='now WAIT_FOR ready3';
-SET debug_sync='now SIGNAL cont3';
-SET debug_sync='now WAIT_FOR ready4';
-SET debug_sync='now SIGNAL cont1';
-SET debug_sync='now WAIT_FOR ready2';
-SET debug_sync='now SIGNAL cont4';
-SELECT * FROM t2 WHERE a >= 10 ORDER BY a;
-a
-10
-11
-include/show_binlog_events.inc
-Log_name Pos Event_type Server_id End_log_pos Info
-slave-bin.000002 # Binlog_checkpoint # # slave-bin.000002
-slave-bin.000002 # Gtid # # BEGIN GTID #-#-# cid=#
-slave-bin.000002 # Query # # use `test`; INSERT INTO t2 VALUES (foo(11,
-'commit_before_enqueue SIGNAL ready3 WAIT_FOR cont3',
-'commit_after_release_LOCK_prepare_ordered SIGNAL ready4 WAIT_FOR cont4'))
-slave-bin.000002 # Xid # # COMMIT /* XID */
-slave-bin.000002 # Gtid # # BEGIN GTID #-#-# cid=#
-slave-bin.000002 # Query # # use `test`; INSERT INTO t2 VALUES (foo(10,
-'commit_before_enqueue SIGNAL ready1 WAIT_FOR cont1',
-'commit_after_release_LOCK_prepare_ordered SIGNAL ready2'))
-slave-bin.000002 # Xid # # COMMIT /* XID */
-FLUSH LOGS;
-connection server_2;
-include/stop_slave.inc
-SET GLOBAL slave_parallel_threads=0;
-SET GLOBAL slave_parallel_threads=10;
-SET debug_sync='RESET';
-include/start_slave.inc
-*** Test that group-committed transactions on the master can replicate in parallel on the slave. ***
-connection server_1;
-SET debug_sync='RESET';
-FLUSH LOGS;
-CREATE TABLE t3 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB;
-INSERT INTO t3 VALUES (1,1), (3,3), (5,5), (7,7);
-connection server_2;
-connection con_temp1;
-BEGIN;
-INSERT INTO t3 VALUES (2,102);
-connect con_temp2,127.0.0.1,root,,test,$SERVER_MYPORT_2,;
-BEGIN;
-INSERT INTO t3 VALUES (4,104);
-connect con_temp3,127.0.0.1,root,,test,$SERVER_MYPORT_1,;
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1';
-SET binlog_format=statement;
-INSERT INTO t3 VALUES (2, foo(12,
-'commit_after_release_LOCK_prepare_ordered SIGNAL slave_queued1 WAIT_FOR slave_cont1',
-''));
-connection server_1;
-SET debug_sync='now WAIT_FOR master_queued1';
-connect con_temp4,127.0.0.1,root,,test,$SERVER_MYPORT_1,;
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2';
-SET binlog_format=statement;
-INSERT INTO t3 VALUES (4, foo(14,
-'commit_after_release_LOCK_prepare_ordered SIGNAL slave_queued2',
-''));
-connection server_1;
-SET debug_sync='now WAIT_FOR master_queued2';
-connect con_temp5,127.0.0.1,root,,test,$SERVER_MYPORT_1,;
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued3';
-SET binlog_format=statement;
-INSERT INTO t3 VALUES (6, foo(16,
-'group_commit_waiting_for_prior SIGNAL slave_queued3',
-''));
-connection server_1;
-SET debug_sync='now WAIT_FOR master_queued3';
-SET debug_sync='now SIGNAL master_cont1';
-connection con_temp3;
-connection con_temp4;
-connection con_temp5;
-SET debug_sync='RESET';
-connection server_1;
-SELECT * FROM t3 ORDER BY a;
-a b
-1 1
-2 12
-3 3
-4 14
-5 5
-6 16
-7 7
-include/show_binlog_events.inc
-Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000002 # Binlog_checkpoint # # master-bin.000002
-master-bin.000002 # Gtid # # GTID #-#-#
-master-bin.000002 # Query # # use `test`; CREATE TABLE t3 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB
-master-bin.000002 # Gtid # # BEGIN GTID #-#-#
-master-bin.000002 # Query # # use `test`; INSERT INTO t3 VALUES (1,1), (3,3), (5,5), (7,7)
-master-bin.000002 # Xid # # COMMIT /* XID */
-master-bin.000002 # Gtid # # BEGIN GTID #-#-# cid=#
-master-bin.000002 # Query # # use `test`; INSERT INTO t3 VALUES (2, foo(12,
-'commit_after_release_LOCK_prepare_ordered SIGNAL slave_queued1 WAIT_FOR slave_cont1',
-''))
-master-bin.000002 # Xid # # COMMIT /* XID */
-master-bin.000002 # Gtid # # BEGIN GTID #-#-# cid=#
-master-bin.000002 # Query # # use `test`; INSERT INTO t3 VALUES (4, foo(14,
-'commit_after_release_LOCK_prepare_ordered SIGNAL slave_queued2',
-''))
-master-bin.000002 # Xid # # COMMIT /* XID */
-master-bin.000002 # Gtid # # BEGIN GTID #-#-# cid=#
-master-bin.000002 # Query # # use `test`; INSERT INTO t3 VALUES (6, foo(16,
-'group_commit_waiting_for_prior SIGNAL slave_queued3',
-''))
-master-bin.000002 # Xid # # COMMIT /* XID */
-connection server_2;
-SET debug_sync='now WAIT_FOR slave_queued3';
-connection con_temp1;
-ROLLBACK;
-connection server_2;
-SET debug_sync='now WAIT_FOR slave_queued1';
-connection con_temp2;
-ROLLBACK;
-connection server_2;
-SET debug_sync='now WAIT_FOR slave_queued2';
-SET debug_sync='now SIGNAL slave_cont1';
-SELECT * FROM t3 ORDER BY a;
-a b
-1 1
-2 12
-3 3
-4 14
-5 5
-6 16
-7 7
-include/show_binlog_events.inc
-Log_name Pos Event_type Server_id End_log_pos Info
-slave-bin.000003 # Binlog_checkpoint # # slave-bin.000003
-slave-bin.000003 # Gtid # # GTID #-#-#
-slave-bin.000003 # Query # # use `test`; CREATE TABLE t3 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB
-slave-bin.000003 # Gtid # # BEGIN GTID #-#-#
-slave-bin.000003 # Query # # use `test`; INSERT INTO t3 VALUES (1,1), (3,3), (5,5), (7,7)
-slave-bin.000003 # Xid # # COMMIT /* XID */
-slave-bin.000003 # Gtid # # BEGIN GTID #-#-# cid=#
-slave-bin.000003 # Query # # use `test`; INSERT INTO t3 VALUES (2, foo(12,
-'commit_after_release_LOCK_prepare_ordered SIGNAL slave_queued1 WAIT_FOR slave_cont1',
-''))
-slave-bin.000003 # Xid # # COMMIT /* XID */
-slave-bin.000003 # Gtid # # BEGIN GTID #-#-# cid=#
-slave-bin.000003 # Query # # use `test`; INSERT INTO t3 VALUES (4, foo(14,
-'commit_after_release_LOCK_prepare_ordered SIGNAL slave_queued2',
-''))
-slave-bin.000003 # Xid # # COMMIT /* XID */
-slave-bin.000003 # Gtid # # BEGIN GTID #-#-# cid=#
-slave-bin.000003 # Query # # use `test`; INSERT INTO t3 VALUES (6, foo(16,
-'group_commit_waiting_for_prior SIGNAL slave_queued3',
-''))
-slave-bin.000003 # Xid # # COMMIT /* XID */
-*** Test STOP SLAVE in parallel mode ***
-connection server_2;
-include/stop_slave.inc
-SET debug_sync='RESET';
-SET GLOBAL slave_parallel_threads=0;
-SET GLOBAL slave_parallel_threads=10;
-connection server_1;
-SET binlog_direct_non_transactional_updates=0;
-SET sql_log_bin=0;
-CALL mtr.add_suppression("Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction");
-SET sql_log_bin=1;
-BEGIN;
-INSERT INTO t2 VALUES (20);
-INSERT INTO t1 VALUES (20);
-INSERT INTO t2 VALUES (21);
-INSERT INTO t3 VALUES (20, 20);
-COMMIT;
-INSERT INTO t3 VALUES(21, 21);
-INSERT INTO t3 VALUES(22, 22);
-SET binlog_format=@old_format;
-connection con_temp1;
-BEGIN;
-INSERT INTO t2 VALUES (21);
-connection server_2;
-START SLAVE;
-connection con_temp2;
-SET @old_dbug= @@GLOBAL.debug_dbug;
-SET GLOBAL debug_dbug="+d,rpl_parallel_wait_for_done_trigger";
-STOP SLAVE;
-connection con_temp1;
-SET debug_sync='now WAIT_FOR wait_for_done_waiting';
-ROLLBACK;
-connection con_temp2;
-SET GLOBAL debug_dbug=@old_dbug;
-SET debug_sync='RESET';
-connection server_2;
-include/wait_for_slave_to_stop.inc
-SELECT * FROM t1 WHERE a >= 20 ORDER BY a;
-a
-20
-SELECT * FROM t2 WHERE a >= 20 ORDER BY a;
-a
-20
-21
-SELECT * FROM t3 WHERE a >= 20 ORDER BY a;
-a b
-20 20
-include/start_slave.inc
-SELECT * FROM t1 WHERE a >= 20 ORDER BY a;
-a
-20
-SELECT * FROM t2 WHERE a >= 20 ORDER BY a;
-a
-20
-21
-SELECT * FROM t3 WHERE a >= 20 ORDER BY a;
-a b
-20 20
-21 21
-22 22
-connection server_2;
-include/stop_slave.inc
-SET GLOBAL binlog_format=@old_format;
-SET GLOBAL slave_parallel_threads=0;
-SET GLOBAL slave_parallel_threads=10;
-include/start_slave.inc
-*** Test killing slave threads at various wait points ***
-*** 1. Test killing transaction waiting in commit for previous transaction to commit ***
-connection con_temp3;
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1';
-SET binlog_format=statement;
-INSERT INTO t3 VALUES (31, foo(31,
-'commit_before_prepare_ordered WAIT_FOR t2_waiting',
-'commit_after_prepare_ordered SIGNAL t1_ready WAIT_FOR t1_cont'));
-connection server_1;
-SET debug_sync='now WAIT_FOR master_queued1';
-connection con_temp4;
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2';
-SET binlog_format=statement;
-BEGIN;
-INSERT INTO t3 VALUES (32, foo(32,
-'ha_write_row_end SIGNAL t2_query WAIT_FOR t2_cont',
-''));
-INSERT INTO t3 VALUES (33, foo(33,
-'group_commit_waiting_for_prior SIGNAL t2_waiting',
-'group_commit_waiting_for_prior_killed SIGNAL t2_killed'));
-COMMIT;
-connection server_1;
-SET debug_sync='now WAIT_FOR master_queued2';
-connection con_temp5;
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued3';
-SET binlog_format=statement;
-INSERT INTO t3 VALUES (34, foo(34,
-'',
-''));
-connection server_1;
-SET debug_sync='now WAIT_FOR master_queued3';
-SET debug_sync='now SIGNAL master_cont1';
-connection con_temp3;
-connection con_temp4;
-connection con_temp5;
-connection server_1;
-SELECT * FROM t3 WHERE a >= 30 ORDER BY a;
-a b
-31 31
-32 32
-33 33
-34 34
-SET debug_sync='RESET';
-connection server_2;
-SET sql_log_bin=0;
-CALL mtr.add_suppression("Query execution was interrupted");
-CALL mtr.add_suppression("Commit failed due to failure of an earlier commit on which this one depends");
-CALL mtr.add_suppression("Slave: Connection was killed");
-SET sql_log_bin=1;
-SET debug_sync='now WAIT_FOR t2_query';
-SET debug_sync='now SIGNAL t2_cont';
-SET debug_sync='now WAIT_FOR t1_ready';
-KILL THD_ID;
-SET debug_sync='now WAIT_FOR t2_killed';
-SET debug_sync='now SIGNAL t1_cont';
-include/wait_for_slave_sql_error.inc [errno=1317,1927,1964]
-STOP SLAVE IO_THREAD;
-SELECT * FROM t3 WHERE a >= 30 ORDER BY a;
-a b
-31 31
-SET debug_sync='RESET';
-SET GLOBAL slave_parallel_threads=0;
-SET GLOBAL slave_parallel_threads=10;
-SET sql_log_bin=0;
-DROP FUNCTION foo;
-CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
-RETURNS INT DETERMINISTIC
-BEGIN
-RETURN x;
-END
-||
-SET sql_log_bin=1;
-connection server_1;
-INSERT INTO t3 VALUES (39,0);
-connection server_2;
-include/start_slave.inc
-SELECT * FROM t3 WHERE a >= 30 ORDER BY a;
-a b
-31 31
-32 32
-33 33
-34 34
-39 0
-SET sql_log_bin=0;
-DROP FUNCTION foo;
-CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
-RETURNS INT DETERMINISTIC
-BEGIN
-IF d1 != '' THEN
-SET debug_sync = d1;
-END IF;
-IF d2 != '' THEN
-SET debug_sync = d2;
-END IF;
-RETURN x;
-END
-||
-SET sql_log_bin=1;
-connection server_2;
-include/stop_slave.inc
-SET GLOBAL binlog_format=@old_format;
-SET GLOBAL slave_parallel_threads=0;
-SET GLOBAL slave_parallel_threads=10;
-include/start_slave.inc
-*** 2. Same as (1), but without restarting IO thread after kill of SQL threads ***
-connection con_temp3;
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1';
-SET binlog_format=statement;
-INSERT INTO t3 VALUES (41, foo(41,
-'commit_before_prepare_ordered WAIT_FOR t2_waiting',
-'commit_after_prepare_ordered SIGNAL t1_ready WAIT_FOR t1_cont'));
-connection server_1;
-SET debug_sync='now WAIT_FOR master_queued1';
-connection con_temp4;
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2';
-SET binlog_format=statement;
-BEGIN;
-INSERT INTO t3 VALUES (42, foo(42,
-'ha_write_row_end SIGNAL t2_query WAIT_FOR t2_cont',
-''));
-INSERT INTO t3 VALUES (43, foo(43,
-'group_commit_waiting_for_prior SIGNAL t2_waiting',
-'group_commit_waiting_for_prior_killed SIGNAL t2_killed'));
-COMMIT;
-connection server_1;
-SET debug_sync='now WAIT_FOR master_queued2';
-connection con_temp5;
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued3';
-SET binlog_format=statement;
-INSERT INTO t3 VALUES (44, foo(44,
-'',
-''));
-connection server_1;
-SET debug_sync='now WAIT_FOR master_queued3';
-SET debug_sync='now SIGNAL master_cont1';
-connection con_temp3;
-connection con_temp4;
-connection con_temp5;
-connection server_1;
-SELECT * FROM t3 WHERE a >= 40 ORDER BY a;
-a b
-41 41
-42 42
-43 43
-44 44
-SET debug_sync='RESET';
-connection server_2;
-SET debug_sync='now WAIT_FOR t2_query';
-SET debug_sync='now SIGNAL t2_cont';
-SET debug_sync='now WAIT_FOR t1_ready';
-KILL THD_ID;
-SET debug_sync='now WAIT_FOR t2_killed';
-SET debug_sync='now SIGNAL t1_cont';
-include/wait_for_slave_sql_error.inc [errno=1317,1927,1964]
-SET debug_sync='RESET';
-SET GLOBAL slave_parallel_threads=0;
-SET GLOBAL slave_parallel_threads=10;
-SET sql_log_bin=0;
-DROP FUNCTION foo;
-CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
-RETURNS INT DETERMINISTIC
-BEGIN
-RETURN x;
-END
-||
-SET sql_log_bin=1;
-connection server_1;
-INSERT INTO t3 VALUES (49,0);
-connection server_2;
-START SLAVE SQL_THREAD;
-SELECT * FROM t3 WHERE a >= 40 ORDER BY a;
-a b
-41 41
-42 42
-43 43
-44 44
-49 0
-SET sql_log_bin=0;
-DROP FUNCTION foo;
-CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
-RETURNS INT DETERMINISTIC
-BEGIN
-IF d1 != '' THEN
-SET debug_sync = d1;
-END IF;
-IF d2 != '' THEN
-SET debug_sync = d2;
-END IF;
-RETURN x;
-END
-||
-SET sql_log_bin=1;
-connection server_2;
-include/stop_slave.inc
-SET GLOBAL binlog_format=@old_format;
-SET GLOBAL slave_parallel_threads=0;
-SET GLOBAL slave_parallel_threads=10;
-include/start_slave.inc
-*** 3. Same as (2), but not using gtid mode ***
-connection server_2;
-include/stop_slave.inc
-CHANGE MASTER TO master_use_gtid=no;
-include/start_slave.inc
-connection server_1;
-connection con_temp3;
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1';
-SET binlog_format=statement;
-INSERT INTO t3 VALUES (51, foo(51,
-'commit_before_prepare_ordered WAIT_FOR t2_waiting',
-'commit_after_prepare_ordered SIGNAL t1_ready WAIT_FOR t1_cont'));
-connection server_1;
-SET debug_sync='now WAIT_FOR master_queued1';
-connection con_temp4;
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2';
-SET binlog_format=statement;
-BEGIN;
-INSERT INTO t3 VALUES (52, foo(52,
-'ha_write_row_end SIGNAL t2_query WAIT_FOR t2_cont',
-''));
-INSERT INTO t3 VALUES (53, foo(53,
-'group_commit_waiting_for_prior SIGNAL t2_waiting',
-'group_commit_waiting_for_prior_killed SIGNAL t2_killed'));
-COMMIT;
-connection server_1;
-SET debug_sync='now WAIT_FOR master_queued2';
-connection con_temp5;
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued3';
-SET binlog_format=statement;
-INSERT INTO t3 VALUES (54, foo(54,
-'',
-''));
-connection server_1;
-SET debug_sync='now WAIT_FOR master_queued3';
-SET debug_sync='now SIGNAL master_cont1';
-connection con_temp3;
-connection con_temp4;
-connection con_temp5;
-connection server_1;
-SELECT * FROM t3 WHERE a >= 50 ORDER BY a;
-a b
-51 51
-52 52
-53 53
-54 54
-SET debug_sync='RESET';
-connection server_2;
-SET debug_sync='now WAIT_FOR t2_query';
-SET debug_sync='now SIGNAL t2_cont';
-SET debug_sync='now WAIT_FOR t1_ready';
-KILL THD_ID;
-SET debug_sync='now WAIT_FOR t2_killed';
-SET debug_sync='now SIGNAL t1_cont';
-include/wait_for_slave_sql_error.inc [errno=1317,1927,1964]
-SELECT * FROM t3 WHERE a >= 50 ORDER BY a;
-a b
-51 51
-SET debug_sync='RESET';
-SET GLOBAL slave_parallel_threads=0;
-SET GLOBAL slave_parallel_threads=10;
-SET sql_log_bin=0;
-DROP FUNCTION foo;
-CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
-RETURNS INT DETERMINISTIC
-BEGIN
-RETURN x;
-END
-||
-SET sql_log_bin=1;
-connection server_1;
-INSERT INTO t3 VALUES (59,0);
-connection server_2;
-START SLAVE SQL_THREAD;
-SELECT * FROM t3 WHERE a >= 50 ORDER BY a;
-a b
-51 51
-52 52
-53 53
-54 54
-59 0
-SET sql_log_bin=0;
-DROP FUNCTION foo;
-CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
-RETURNS INT DETERMINISTIC
-BEGIN
-IF d1 != '' THEN
-SET debug_sync = d1;
-END IF;
-IF d2 != '' THEN
-SET debug_sync = d2;
-END IF;
-RETURN x;
-END
-||
-SET sql_log_bin=1;
-include/stop_slave.inc
-CHANGE MASTER TO master_use_gtid=slave_pos;
-include/start_slave.inc
-connection server_2;
-include/stop_slave.inc
-SET GLOBAL binlog_format=@old_format;
-SET GLOBAL slave_parallel_threads=0;
-SET GLOBAL slave_parallel_threads=4;
-include/start_slave.inc
-*** 4. Test killing thread that is waiting to start transaction until previous transaction commits ***
-connection server_1;
-SET binlog_format=statement;
-SET gtid_domain_id=2;
-BEGIN;
-INSERT INTO t3 VALUES (70, foo(70,
-'rpl_parallel_start_waiting_for_prior SIGNAL t4_waiting', ''));
-INSERT INTO t3 VALUES (60, foo(60,
-'ha_write_row_end SIGNAL d2_query WAIT_FOR d2_cont2',
-'rpl_parallel_end_of_group SIGNAL d2_done WAIT_FOR d2_cont'));
-COMMIT;
-SET gtid_domain_id=0;
-connection server_2;
-SET debug_sync='now WAIT_FOR d2_query';
-connection server_1;
-SET gtid_domain_id=1;
-BEGIN;
-INSERT INTO t3 VALUES (61, foo(61,
-'rpl_parallel_start_waiting_for_prior SIGNAL t3_waiting',
-'rpl_parallel_start_waiting_for_prior_killed SIGNAL t3_killed'));
-INSERT INTO t3 VALUES (62, foo(62,
-'ha_write_row_end SIGNAL d1_query WAIT_FOR d1_cont2',
-'rpl_parallel_end_of_group SIGNAL d1_done WAIT_FOR d1_cont'));
-COMMIT;
-SET gtid_domain_id=0;
-connection server_2;
-SET debug_sync='now WAIT_FOR d1_query';
-connection server_1;
-SET gtid_domain_id=0;
-INSERT INTO t3 VALUES (63, foo(63,
-'ha_write_row_end SIGNAL d0_query WAIT_FOR d0_cont2',
-'rpl_parallel_end_of_group SIGNAL d0_done WAIT_FOR d0_cont'));
-connection server_2;
-SET debug_sync='now WAIT_FOR d0_query';
-connection server_1;
-SET gtid_domain_id=3;
-BEGIN;
-INSERT INTO t3 VALUES (68, foo(68,
-'rpl_parallel_start_waiting_for_prior SIGNAL t2_waiting', ''));
-INSERT INTO t3 VALUES (69, foo(69,
-'ha_write_row_end SIGNAL d3_query WAIT_FOR d3_cont2',
-'rpl_parallel_end_of_group SIGNAL d3_done WAIT_FOR d3_cont'));
-COMMIT;
-SET gtid_domain_id=0;
-connection server_2;
-SET debug_sync='now WAIT_FOR d3_query';
-SET debug_sync='now SIGNAL d2_cont2';
-SET debug_sync='now WAIT_FOR d2_done';
-SET debug_sync='now SIGNAL d1_cont2';
-SET debug_sync='now WAIT_FOR d1_done';
-SET debug_sync='now SIGNAL d0_cont2';
-SET debug_sync='now WAIT_FOR d0_done';
-SET debug_sync='now SIGNAL d3_cont2';
-SET debug_sync='now WAIT_FOR d3_done';
-connection con_temp3;
-SET binlog_format=statement;
-INSERT INTO t3 VALUES (64, foo(64,
-'rpl_parallel_before_mark_start_commit SIGNAL t1_waiting WAIT_FOR t1_cont', ''));
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2 WAIT_FOR master_cont2';
-INSERT INTO t3 VALUES (65, foo(65, '', ''));
-connection server_1;
-SET debug_sync='now WAIT_FOR master_queued2';
-connection con_temp4;
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued3';
-INSERT INTO t3 VALUES (66, foo(66, '', ''));
-connection server_1;
-SET debug_sync='now WAIT_FOR master_queued3';
-connection con_temp5;
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued4';
-INSERT INTO t3 VALUES (67, foo(67, '', ''));
-connection server_1;
-SET debug_sync='now WAIT_FOR master_queued4';
-SET debug_sync='now SIGNAL master_cont2';
-connection con_temp3;
-connection con_temp4;
-connection con_temp5;
-connection server_1;
-SELECT * FROM t3 WHERE a >= 60 ORDER BY a;
-a b
-60 60
-61 61
-62 62
-63 63
-64 64
-65 65
-66 66
-67 67
-68 68
-69 69
-70 70
-SET debug_sync='RESET';
-connection server_2;
-SET debug_sync='now SIGNAL d0_cont';
-SET debug_sync='now WAIT_FOR t1_waiting';
-SET debug_sync='now SIGNAL d3_cont';
-SET debug_sync='now WAIT_FOR t2_waiting';
-SET debug_sync='now SIGNAL d1_cont';
-SET debug_sync='now WAIT_FOR t3_waiting';
-SET debug_sync='now SIGNAL d2_cont';
-SET debug_sync='now WAIT_FOR t4_waiting';
-KILL THD_ID;
-SET debug_sync='now WAIT_FOR t3_killed';
-SET debug_sync='now SIGNAL t1_cont';
-include/wait_for_slave_sql_error.inc [errno=1317,1927,1964]
-STOP SLAVE IO_THREAD;
-SELECT * FROM t3 WHERE a >= 60 AND a != 65 ORDER BY a;
-a b
-60 60
-61 61
-62 62
-63 63
-64 64
-68 68
-69 69
-70 70
-SET debug_sync='RESET';
-SET GLOBAL slave_parallel_threads=0;
-SET GLOBAL slave_parallel_threads=10;
-SET sql_log_bin=0;
-DROP FUNCTION foo;
-CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
-RETURNS INT DETERMINISTIC
-BEGIN
-RETURN x;
-END
-||
-SET sql_log_bin=1;
-connection server_1;
-UPDATE t3 SET b=b+1 WHERE a=60;
-connection server_2;
-include/start_slave.inc
-SELECT * FROM t3 WHERE a >= 60 ORDER BY a;
-a b
-60 61
-61 61
-62 62
-63 63
-64 64
-65 65
-66 66
-67 67
-68 68
-69 69
-70 70
-SET sql_log_bin=0;
-DROP FUNCTION foo;
-CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
-RETURNS INT DETERMINISTIC
-BEGIN
-IF d1 != '' THEN
-SET debug_sync = d1;
-END IF;
-IF d2 != '' THEN
-SET debug_sync = d2;
-END IF;
-RETURN x;
-END
-||
-SET sql_log_bin=1;
-connection server_2;
-include/stop_slave.inc
-SET GLOBAL binlog_format=@old_format;
-SET GLOBAL slave_parallel_threads=0;
-SET GLOBAL slave_parallel_threads=10;
-include/start_slave.inc
-*** 5. Test killing thread that is waiting for queue of max length to shorten ***
-SET @old_max_queued= @@GLOBAL.slave_parallel_max_queued;
-SET GLOBAL slave_parallel_max_queued=9000;
-connection server_1;
-SET binlog_format=statement;
-INSERT INTO t3 VALUES (80, foo(0,
-'ha_write_row_end SIGNAL query_waiting WAIT_FOR query_cont', ''));
-connection server_2;
-SET debug_sync='now WAIT_FOR query_waiting';
-SET @old_dbug= @@GLOBAL.debug_dbug;
-SET GLOBAL debug_dbug="+d,rpl_parallel_wait_queue_max";
-connection server_1;
-SELECT * FROM t3 WHERE a >= 80 ORDER BY a;
-a b
-80 0
-81 10000
-connection server_2;
-SET debug_sync='now WAIT_FOR wait_queue_ready';
-KILL THD_ID;
-SET debug_sync='now WAIT_FOR wait_queue_killed';
-SET debug_sync='now SIGNAL query_cont';
-include/wait_for_slave_sql_error.inc [errno=1317,1927,1964]
-STOP SLAVE IO_THREAD;
-SET GLOBAL debug_dbug=@old_dbug;
-SET GLOBAL slave_parallel_max_queued= @old_max_queued;
-connection server_1;
-INSERT INTO t3 VALUES (82,0);
-SET binlog_format=@old_format;
-connection server_2;
-SET debug_sync='RESET';
-include/start_slave.inc
-SELECT * FROM t3 WHERE a >= 80 ORDER BY a;
-a b
-80 0
-81 10000
-82 0
-connection server_2;
-include/stop_slave.inc
-SET GLOBAL binlog_format=@old_format;
-SET GLOBAL slave_parallel_threads=0;
-SET GLOBAL slave_parallel_threads=10;
-include/start_slave.inc
-*** MDEV-5788 Incorrect free of rgi->deferred_events in parallel replication ***
-connection server_2;
-include/stop_slave.inc
-SET GLOBAL replicate_ignore_table="test.t3";
-SET GLOBAL slave_parallel_threads=2;
-include/start_slave.inc
-connection server_1;
-INSERT INTO t3 VALUES (100, rand());
-INSERT INTO t3 VALUES (101, rand());
-connection server_2;
-connection server_1;
-INSERT INTO t3 VALUES (102, rand());
-INSERT INTO t3 VALUES (103, rand());
-INSERT INTO t3 VALUES (104, rand());
-INSERT INTO t3 VALUES (105, rand());
-connection server_2;
-include/stop_slave.inc
-SET GLOBAL replicate_ignore_table="";
-include/start_slave.inc
-connection server_1;
-INSERT INTO t3 VALUES (106, rand());
-INSERT INTO t3 VALUES (107, rand());
-connection server_2;
-SELECT * FROM t3 WHERE a >= 100 ORDER BY a;
-a b
-106 #
-107 #
-*** MDEV-5921: In parallel replication, an error is not correctly signalled to the next transaction ***
-connection server_2;
-include/stop_slave.inc
-SET GLOBAL slave_parallel_threads=10;
-include/start_slave.inc
-connection server_1;
-INSERT INTO t3 VALUES (110, 1);
-connection server_2;
-SELECT * FROM t3 WHERE a >= 110 ORDER BY a;
-a b
-110 1
-SET sql_log_bin=0;
-INSERT INTO t3 VALUES (111, 666);
-SET sql_log_bin=1;
-connection server_1;
-connect con1,127.0.0.1,root,,test,$SERVER_MYPORT_1,;
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1';
-INSERT INTO t3 VALUES (111, 2);
-connection server_1;
-SET debug_sync='now WAIT_FOR master_queued1';
-connect con2,127.0.0.1,root,,test,$SERVER_MYPORT_1,;
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2';
-INSERT INTO t3 VALUES (112, 3);
-connection server_1;
-SET debug_sync='now WAIT_FOR master_queued2';
-SET debug_sync='now SIGNAL master_cont1';
-connection con1;
-connection con2;
-SET debug_sync='RESET';
-connection server_2;
-include/wait_for_slave_sql_error.inc [errno=1062]
-include/wait_for_slave_sql_to_stop.inc
-SELECT * FROM t3 WHERE a >= 110 ORDER BY a;
-a b
-110 1
-111 666
-SET sql_log_bin=0;
-DELETE FROM t3 WHERE a=111 AND b=666;
-SET sql_log_bin=1;
-START SLAVE SQL_THREAD;
-SELECT * FROM t3 WHERE a >= 110 ORDER BY a;
-a b
-110 1
-111 2
-112 3
-***MDEV-5914: Parallel replication deadlock due to InnoDB lock conflicts ***
-connection server_2;
-include/stop_slave.inc
-connection server_1;
-CREATE TABLE t4 (a INT PRIMARY KEY, b INT, KEY b_idx(b)) ENGINE=InnoDB;
-INSERT INTO t4 VALUES (1,NULL), (2,2), (3,NULL), (4,4), (5, NULL), (6, 6);
-connection con1;
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1';
-UPDATE t4 SET b=NULL WHERE a=6;
-connection server_1;
-SET debug_sync='now WAIT_FOR master_queued1';
-connection con2;
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2';
-DELETE FROM t4 WHERE b <= 3;
-connection server_1;
-SET debug_sync='now WAIT_FOR master_queued2';
-SET debug_sync='now SIGNAL master_cont1';
-connection con1;
-connection con2;
-SET debug_sync='RESET';
-connection server_2;
-include/start_slave.inc
-include/stop_slave.inc
-SELECT * FROM t4 ORDER BY a;
-a b
-1 NULL
-3 NULL
-4 4
-5 NULL
-6 NULL
-connection server_1;
-DELETE FROM t4;
-INSERT INTO t4 VALUES (1,NULL), (2,2), (3,NULL), (4,4), (5, NULL), (6, 6);
-connection con1;
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1';
-INSERT INTO t4 VALUES (7, NULL);
-connection server_1;
-SET debug_sync='now WAIT_FOR master_queued1';
-connection con2;
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2';
-DELETE FROM t4 WHERE b <= 3;
-connection server_1;
-SET debug_sync='now WAIT_FOR master_queued2';
-SET debug_sync='now SIGNAL master_cont1';
-connection con1;
-connection con2;
-SET debug_sync='RESET';
-connection server_2;
-include/start_slave.inc
-include/stop_slave.inc
-SELECT * FROM t4 ORDER BY a;
-a b
-1 NULL
-3 NULL
-4 4
-5 NULL
-6 6
-7 NULL
-connection server_1;
-DELETE FROM t4;
-INSERT INTO t4 VALUES (1,NULL), (2,2), (3,NULL), (4,4), (5, NULL), (6, 6);
-connection con1;
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1';
-UPDATE t4 SET b=NULL WHERE a=6;
-connection server_1;
-SET debug_sync='now WAIT_FOR master_queued1';
-connection con2;
-SET @old_format= @@SESSION.binlog_format;
-SET binlog_format='statement';
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2';
-DELETE FROM t4 WHERE b <= 1;
-connection server_1;
-SET debug_sync='now WAIT_FOR master_queued2';
-SET debug_sync='now SIGNAL master_cont1';
-connection con1;
-connection con2;
-SET @old_format=@@GLOBAL.binlog_format;
-SET debug_sync='RESET';
-connection server_2;
-SET @old_dbug= @@GLOBAL.debug_dbug;
-SET GLOBAL debug_dbug="+d,disable_thd_need_ordering_with";
-include/start_slave.inc
-SET GLOBAL debug_dbug=@old_dbug;
-SELECT * FROM t4 ORDER BY a;
-a b
-1 NULL
-2 2
-3 NULL
-4 4
-5 NULL
-6 NULL
-SET @last_gtid= 'GTID';
-SELECT IF(@@gtid_slave_pos LIKE CONCAT('%',@last_gtid,'%'), "GTID found ok",
-CONCAT("GTID ", @last_gtid, " not found in gtid_slave_pos=", @@gtid_slave_pos))
-AS result;
-result
-GTID found ok
-SELECT "ROW FOUND" AS `Is the row found?`
- FROM mysql.gtid_slave_pos
-WHERE CONCAT(domain_id, "-", server_id, "-", seq_no) = @last_gtid;
-Is the row found?
-ROW FOUND
-*** MDEV-5938: Exec_master_log_pos not updated at log rotate in parallel replication ***
-connection server_2;
-include/stop_slave.inc
-SET GLOBAL slave_parallel_threads=1;
-SET DEBUG_SYNC= 'RESET';
-include/start_slave.inc
-connection server_1;
-CREATE TABLE t5 (a INT PRIMARY KEY, b INT);
-INSERT INTO t5 VALUES (1,1);
-INSERT INTO t5 VALUES (2,2), (3,8);
-INSERT INTO t5 VALUES (4,16);
-connection server_2;
-test_check
-OK
-test_check
-OK
-connection server_1;
-FLUSH LOGS;
-connection server_2;
-test_check
-OK
-test_check
-OK
-*** MDEV_6435: Incorrect error handling when query binlogged partially on master with "killed" error ***
-connection server_1;
-CREATE TABLE t6 (a INT) ENGINE=MyISAM;
-CREATE TRIGGER tr AFTER INSERT ON t6 FOR EACH ROW SET @a = 1;
-connection con1;
-SET @old_format= @@binlog_format;
-SET binlog_format= statement;
-SET debug_sync='sp_head_execute_before_loop SIGNAL ready WAIT_FOR cont';
-INSERT INTO t6 VALUES (1), (2), (3);
-connection server_1;
-SET debug_sync='now WAIT_FOR ready';
-KILL QUERY CONID;
-SET debug_sync='now SIGNAL cont';
-connection con1;
-ERROR 70100: Query execution was interrupted
-SET binlog_format= @old_format;
-SET debug_sync='RESET';
-connection server_1;
-SET debug_sync='RESET';
-connection server_2;
-include/wait_for_slave_sql_error.inc [errno=1317]
-STOP SLAVE IO_THREAD;
-SET GLOBAL gtid_slave_pos= 'AFTER_ERROR_GTID_POS';
-include/start_slave.inc
-connection server_1;
-INSERT INTO t6 VALUES (4);
-SELECT * FROM t6 ORDER BY a;
-a
-1
-4
-connection server_2;
-SELECT * FROM t6 ORDER BY a;
-a
-4
-*** MDEV-6551: Some replication errors are ignored if slave_parallel_threads > 0 ***
-connection server_1;
-INSERT INTO t2 VALUES (31);
-include/save_master_gtid.inc
-connection server_2;
-include/sync_with_master_gtid.inc
-include/stop_slave.inc
-SET GLOBAL slave_parallel_threads= 0;
-include/start_slave.inc
-SET sql_log_bin= 0;
-INSERT INTO t2 VALUES (32);
-SET sql_log_bin= 1;
-connection server_1;
-INSERT INTO t2 VALUES (32);
-FLUSH LOGS;
-INSERT INTO t2 VALUES (33);
-INSERT INTO t2 VALUES (34);
-SELECT * FROM t2 WHERE a >= 30 ORDER BY a;
-a
-31
-32
-33
-34
-include/save_master_gtid.inc
-connection server_2;
-include/wait_for_slave_sql_error.inc [errno=1062]
-connection server_2;
-include/stop_slave_io.inc
-SET GLOBAL slave_parallel_threads=10;
-START SLAVE;
-include/wait_for_slave_sql_error.inc [errno=1062]
-START SLAVE SQL_THREAD;
-include/wait_for_slave_sql_error.inc [errno=1062]
-SELECT * FROM t2 WHERE a >= 30 ORDER BY a;
-a
-31
-32
-SET sql_slave_skip_counter= 1;
-ERROR HY000: When using parallel replication and GTID with multiple replication domains, @@sql_slave_skip_counter can not be used. Instead, setting @@gtid_slave_pos explicitly can be used to skip to after a given GTID position
-include/stop_slave_io.inc
-include/start_slave.inc
-include/sync_with_master_gtid.inc
-SELECT * FROM t2 WHERE a >= 30 ORDER BY a;
-a
-31
-32
-33
-34
-*** MDEV-6775: Wrong binlog order in parallel replication ***
-connection server_1;
-DELETE FROM t4;
-INSERT INTO t4 VALUES (1,NULL), (3,NULL), (4,4), (5, NULL), (6, 6);
-include/save_master_gtid.inc
-connection server_2;
-include/sync_with_master_gtid.inc
-include/stop_slave.inc
-SET @old_dbug= @@GLOBAL.debug_dbug;
-SET GLOBAL debug_dbug="+d,inject_binlog_commit_before_get_LOCK_log";
-SET @old_format=@@GLOBAL.binlog_format;
-SET GLOBAL binlog_format=ROW;
-SET GLOBAL slave_parallel_threads=0;
-SET GLOBAL slave_parallel_threads=10;
-connection con1;
-SET @old_format= @@binlog_format;
-SET binlog_format= statement;
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1';
-UPDATE t4 SET b=NULL WHERE a=6;
-connection server_1;
-SET debug_sync='now WAIT_FOR master_queued1';
-connection con2;
-SET @old_format= @@binlog_format;
-SET binlog_format= statement;
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2';
-DELETE FROM t4 WHERE b <= 3;
-connection server_1;
-SET debug_sync='now WAIT_FOR master_queued2';
-SET debug_sync='now SIGNAL master_cont1';
-connection con1;
-SET binlog_format= @old_format;
-connection con2;
-SET binlog_format= @old_format;
-SET debug_sync='RESET';
-SELECT * FROM t4 ORDER BY a;
-a b
-1 NULL
-3 NULL
-4 4
-5 NULL
-6 NULL
-connection server_2;
-include/start_slave.inc
-SET debug_sync= 'now WAIT_FOR waiting';
-SELECT * FROM t4 ORDER BY a;
-a b
-1 NULL
-3 NULL
-4 4
-5 NULL
-6 NULL
-SET debug_sync= 'now SIGNAL cont';
-include/stop_slave.inc
-SET GLOBAL debug_dbug=@old_dbug;
-SET GLOBAL binlog_format= @old_format;
-SET GLOBAL slave_parallel_threads=0;
-SET GLOBAL slave_parallel_threads=10;
-include/start_slave.inc
-*** MDEV-7237: Parallel replication: incorrect relaylog position after stop/start the slave ***
-connection server_1;
-INSERT INTO t2 VALUES (40);
-connection server_2;
-include/stop_slave.inc
-CHANGE MASTER TO master_use_gtid=no;
-SET @old_dbug= @@GLOBAL.debug_dbug;
-SET GLOBAL debug_dbug="+d,rpl_parallel_scheduled_gtid_0_x_100";
-SET GLOBAL debug_dbug="+d,rpl_parallel_wait_for_done_trigger";
-SET GLOBAL slave_parallel_threads=0;
-SET GLOBAL slave_parallel_threads=10;
-connection server_1;
-INSERT INTO t2 VALUES (41);
-INSERT INTO t2 VALUES (42);
-SET @old_format= @@binlog_format;
-SET binlog_format= statement;
-DELETE FROM t2 WHERE a=40;
-SET binlog_format= @old_format;
-INSERT INTO t2 VALUES (43);
-INSERT INTO t2 VALUES (44);
-FLUSH LOGS;
-INSERT INTO t2 VALUES (45);
-SET gtid_seq_no=100;
-INSERT INTO t2 VALUES (46);
-connection con_temp2;
-BEGIN;
-SELECT * FROM t2 WHERE a=40 FOR UPDATE;
-a
-40
-connection server_2;
-include/start_slave.inc
-SET debug_sync= 'now WAIT_FOR scheduled_gtid_0_x_100';
-STOP SLAVE;
-connection con_temp2;
-SET debug_sync= 'now WAIT_FOR wait_for_done_waiting';
-ROLLBACK;
-connection server_2;
-include/wait_for_slave_sql_to_stop.inc
-SELECT * FROM t2 WHERE a >= 40 ORDER BY a;
-a
-41
-42
-include/start_slave.inc
-SELECT * FROM t2 WHERE a >= 40 ORDER BY a;
-a
-41
-42
-43
-44
-45
-46
-include/stop_slave.inc
-SET GLOBAL debug_dbug=@old_dbug;
-SET DEBUG_SYNC= 'RESET';
-SET GLOBAL slave_parallel_threads=0;
-SET GLOBAL slave_parallel_threads=10;
-CHANGE MASTER TO master_use_gtid=slave_pos;
-include/start_slave.inc
-*** MDEV-7326 Server deadlock in connection with parallel replication ***
-connection server_2;
-include/stop_slave.inc
-SET GLOBAL slave_parallel_threads=0;
-SET GLOBAL slave_parallel_threads=3;
-SET GLOBAL debug_dbug="+d,rpl_parallel_simulate_temp_err_xid";
-include/start_slave.inc
-connection server_1;
-SET @old_format= @@SESSION.binlog_format;
-SET binlog_format= STATEMENT;
-INSERT INTO t1 VALUES (foo(50,
-"rpl_parallel_start_waiting_for_prior SIGNAL t3_ready",
-"rpl_parallel_end_of_group SIGNAL prep_ready WAIT_FOR prep_cont"));
-connection server_2;
-SET DEBUG_SYNC= "now WAIT_FOR prep_ready";
-connection server_1;
-INSERT INTO t2 VALUES (foo(50,
-"rpl_parallel_simulate_temp_err_xid SIGNAL t1_ready1 WAIT_FOR t1_cont1",
-"rpl_parallel_retry_after_unmark SIGNAL t1_ready2 WAIT_FOR t1_cont2"));
-connection server_2;
-SET DEBUG_SYNC= "now WAIT_FOR t1_ready1";
-connection server_1;
-INSERT INTO t1 VALUES (foo(51,
-"rpl_parallel_before_mark_start_commit SIGNAL t2_ready1 WAIT_FOR t2_cont1",
-"rpl_parallel_after_mark_start_commit SIGNAL t2_ready2"));
-connection server_2;
-SET DEBUG_SYNC= "now WAIT_FOR t2_ready1";
-SET DEBUG_SYNC= "now SIGNAL t1_cont1";
-SET DEBUG_SYNC= "now WAIT_FOR t1_ready2";
-connection server_1;
-INSERT INTO t1 VALUES (52);
-SET BINLOG_FORMAT= @old_format;
-SELECT * FROM t2 WHERE a>=50 ORDER BY a;
-a
-50
-SELECT * FROM t1 WHERE a>=50 ORDER BY a;
-a
-50
-51
-52
-connection server_2;
-SET DEBUG_SYNC= "now SIGNAL prep_cont";
-SET DEBUG_SYNC= "now WAIT_FOR t3_ready";
-SET DEBUG_SYNC= "now SIGNAL t2_cont1";
-SET DEBUG_SYNC= "now WAIT_FOR t2_ready2";
-SET DEBUG_SYNC= "now SIGNAL t1_cont2";
-connection server_1;
-connection server_2;
-SELECT * FROM t2 WHERE a>=50 ORDER BY a;
-a
-50
-SELECT * FROM t1 WHERE a>=50 ORDER BY a;
-a
-50
-51
-52
-SET DEBUG_SYNC="reset";
-include/stop_slave.inc
-SET GLOBAL debug_dbug=@old_dbug;
-SET GLOBAL slave_parallel_threads=0;
-SET GLOBAL slave_parallel_threads=10;
-include/start_slave.inc
-*** MDEV-7326 Server deadlock in connection with parallel replication ***
-connection server_2;
-include/stop_slave.inc
-SET GLOBAL slave_parallel_threads=0;
-SET GLOBAL slave_parallel_threads=3;
-SET GLOBAL debug_dbug="+d,rpl_parallel_simulate_temp_err_xid";
-include/start_slave.inc
-connection server_1;
-SET @old_format= @@SESSION.binlog_format;
-SET binlog_format= STATEMENT;
-INSERT INTO t1 VALUES (foo(60,
-"rpl_parallel_start_waiting_for_prior SIGNAL t3_ready",
-"rpl_parallel_end_of_group SIGNAL prep_ready WAIT_FOR prep_cont"));
-connection server_2;
-SET DEBUG_SYNC= "now WAIT_FOR prep_ready";
-connection server_1;
-INSERT INTO t2 VALUES (foo(60,
-"rpl_parallel_simulate_temp_err_xid SIGNAL t1_ready1 WAIT_FOR t1_cont1",
-"rpl_parallel_retry_after_unmark SIGNAL t1_ready2 WAIT_FOR t1_cont2"));
-connection server_2;
-SET DEBUG_SYNC= "now WAIT_FOR t1_ready1";
-connection con_temp3;
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1';
-SET binlog_format=statement;
-INSERT INTO t1 VALUES (foo(61,
-"rpl_parallel_before_mark_start_commit SIGNAL t2_ready1 WAIT_FOR t2_cont1",
-"rpl_parallel_after_mark_start_commit SIGNAL t2_ready2"));
-connection server_1;
-SET debug_sync='now WAIT_FOR master_queued1';
-connection con_temp4;
-SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2';
-INSERT INTO t6 VALUES (62);
-connection server_1;
-SET debug_sync='now WAIT_FOR master_queued2';
-SET debug_sync='now SIGNAL master_cont1';
-connection con_temp3;
-connection con_temp4;
-connection server_1;
-SET debug_sync='RESET';
-SET BINLOG_FORMAT= @old_format;
-SELECT * FROM t2 WHERE a>=60 ORDER BY a;
-a
-60
-SELECT * FROM t1 WHERE a>=60 ORDER BY a;
-a
-60
-61
-SELECT * FROM t6 WHERE a>=60 ORDER BY a;
-a
-62
-connection server_2;
-SET DEBUG_SYNC= "now WAIT_FOR t2_ready1";
-SET DEBUG_SYNC= "now SIGNAL t1_cont1";
-SET DEBUG_SYNC= "now WAIT_FOR t1_ready2";
-connection server_2;
-SET DEBUG_SYNC= "now SIGNAL prep_cont";
-SET DEBUG_SYNC= "now WAIT_FOR t3_ready";
-SET DEBUG_SYNC= "now SIGNAL t2_cont1";
-SET DEBUG_SYNC= "now WAIT_FOR t2_ready2";
-SET DEBUG_SYNC= "now SIGNAL t1_cont2";
-connection server_1;
-connection server_2;
-SELECT * FROM t2 WHERE a>=60 ORDER BY a;
-a
-60
-SELECT * FROM t1 WHERE a>=60 ORDER BY a;
-a
-60
-61
-SELECT * FROM t6 WHERE a>=60 ORDER BY a;
-a
-62
-SET DEBUG_SYNC="reset";
-include/stop_slave.inc
-SET GLOBAL debug_dbug=@old_dbug;
-SET GLOBAL slave_parallel_threads=0;
-SET GLOBAL slave_parallel_threads=10;
-include/start_slave.inc
-*** MDEV-7335: Potential parallel slave deadlock with specific binlog corruption ***
-connection server_2;
-include/stop_slave.inc
-SET GLOBAL slave_parallel_threads=1;
-SET @old_dbug= @@GLOBAL.debug_dbug;
-SET GLOBAL debug_dbug="+d,slave_discard_xid_for_gtid_0_x_1000";
-connection server_1;
-INSERT INTO t2 VALUES (101);
-INSERT INTO t2 VALUES (102);
-INSERT INTO t2 VALUES (103);
-INSERT INTO t2 VALUES (104);
-INSERT INTO t2 VALUES (105);
-SET gtid_seq_no=1000;
-INSERT INTO t2 VALUES (106);
-INSERT INTO t2 VALUES (107);
-INSERT INTO t2 VALUES (108);
-INSERT INTO t2 VALUES (109);
-INSERT INTO t2 VALUES (110);
-INSERT INTO t2 VALUES (111);
-INSERT INTO t2 VALUES (112);
-INSERT INTO t2 VALUES (113);
-INSERT INTO t2 VALUES (114);
-INSERT INTO t2 VALUES (115);
-INSERT INTO t2 VALUES (116);
-INSERT INTO t2 VALUES (117);
-INSERT INTO t2 VALUES (118);
-INSERT INTO t2 VALUES (119);
-INSERT INTO t2 VALUES (120);
-INSERT INTO t2 VALUES (121);
-INSERT INTO t2 VALUES (122);
-INSERT INTO t2 VALUES (123);
-INSERT INTO t2 VALUES (124);
-INSERT INTO t2 VALUES (125);
-INSERT INTO t2 VALUES (126);
-INSERT INTO t2 VALUES (127);
-INSERT INTO t2 VALUES (128);
-INSERT INTO t2 VALUES (129);
-INSERT INTO t2 VALUES (130);
-include/save_master_gtid.inc
-connection server_2;
-include/start_slave.inc
-include/sync_with_master_gtid.inc
-SELECT * FROM t2 WHERE a >= 100 ORDER BY a;
-a
-101
-102
-103
-104
-105
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-include/stop_slave.inc
-SET GLOBAL debug_dbug=@old_dbug;
-SET GLOBAL slave_parallel_threads=10;
-include/start_slave.inc
-*** MDEV-6676 - test syntax of @@slave_parallel_mode ***
-connection server_2;
-Parallel_Mode = 'conservative'
-include/stop_slave.inc
-SET GLOBAL slave_parallel_mode='aggressive';
-Parallel_Mode = 'aggressive'
-SET GLOBAL slave_parallel_mode='conservative';
-Parallel_Mode = 'conservative'
-*** MDEV-6676 - test that empty parallel_mode does not replicate in parallel ***
-connection server_1;
-INSERT INTO t2 VALUES (1040);
-include/save_master_gtid.inc
-connection server_2;
-SET GLOBAL slave_parallel_mode='none';
-SET @old_dbug= @@GLOBAL.debug_dbug;
-SET GLOBAL debug_dbug="+d,slave_crash_if_parallel_apply";
-include/start_slave.inc
-include/sync_with_master_gtid.inc
-SELECT * FROM t2 WHERE a >= 1040 ORDER BY a;
-a
-1040
-include/stop_slave.inc
-SET GLOBAL debug_dbug=@old_dbug;
-*** MDEV-6676 - test disabling domain-based parallel replication ***
-connection server_1;
-SET gtid_domain_id = 1;
-INSERT INTO t2 VALUES (1041);
-INSERT INTO t2 VALUES (1042);
-INSERT INTO t2 VALUES (1043);
-INSERT INTO t2 VALUES (1044);
-INSERT INTO t2 VALUES (1045);
-INSERT INTO t2 VALUES (1046);
-DELETE FROM t2 WHERE a >= 1041;
-SET gtid_domain_id = 2;
-INSERT INTO t2 VALUES (1041);
-INSERT INTO t2 VALUES (1042);
-INSERT INTO t2 VALUES (1043);
-INSERT INTO t2 VALUES (1044);
-INSERT INTO t2 VALUES (1045);
-INSERT INTO t2 VALUES (1046);
-SET gtid_domain_id = 0;
-include/save_master_gtid.inc
-connection server_2;
-SET GLOBAL slave_parallel_mode=minimal;
-include/start_slave.inc
-include/sync_with_master_gtid.inc
-SELECT * FROM t2 WHERE a >= 1040 ORDER BY a;
-a
-1040
-1041
-1042
-1043
-1044
-1045
-1046
-*** MDEV-7888: ANALYZE TABLE does wakeup_subsequent_commits(), causing wrong binlog order and parallel replication hang ***
-connection server_2;
-include/stop_slave.inc
-SET GLOBAL slave_parallel_mode='conservative';
-SET GLOBAL slave_parallel_threads=10;
-SET @old_dbug= @@GLOBAL.debug_dbug;
-SET GLOBAL debug_dbug= '+d,inject_analyze_table_sleep';
-connection server_1;
-SET @old_dbug_slave= @@SESSION.debug_dbug;
-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;
-INSERT INTO t3 VALUES (121, 0);
-SET SESSION debug_dbug=@old_dbug_slave;
-SELECT * FROM t3 WHERE a >= 120 ORDER BY a;
-a b
-120 0
-121 0
-include/save_master_gtid.inc
-connection server_2;
-include/start_slave.inc
-include/sync_with_master_gtid.inc
-SELECT * FROM t3 WHERE a >= 120 ORDER BY a;
-a b
-120 0
-121 0
-include/stop_slave.inc
-SET GLOBAL debug_dbug= @old_dbug;
-include/start_slave.inc
-*** MDEV-7929: record_gtid() for non-transactional event group calls wakeup_subsequent_commits() too early, causing slave hang. ***
-connection server_2;
-include/stop_slave.inc
-SET @old_dbug= @@GLOBAL.debug_dbug;
-SET GLOBAL debug_dbug= '+d,inject_record_gtid_serverid_100_sleep';
-connection server_1;
-SET @old_dbug_slave= @@SESSION.debug_dbug;
-SET SESSION debug_dbug="+d,binlog_force_commit_id";
-SET @old_server_id= @@SESSION.server_id;
-SET SESSION server_id= 100;
-SET @commit_id= 10010;
-ALTER TABLE t1 COMMENT "Hulubulu!";
-SET SESSION server_id= @old_server_id;
-INSERT INTO t3 VALUES (130, 0);
-SET @commit_id= 10011;
-INSERT INTO t3 VALUES (131, 0);
-SET SESSION debug_dbug=@old_dbug_slave;
-SELECT * FROM t3 WHERE a >= 130 ORDER BY a;
-a b
-130 0
-131 0
-include/save_master_gtid.inc
-connection server_2;
-include/start_slave.inc
-include/sync_with_master_gtid.inc
-SELECT * FROM t3 WHERE a >= 130 ORDER BY a;
-a b
-130 0
-131 0
-include/stop_slave.inc
-SET GLOBAL debug_dbug= @old_dbug;
-include/start_slave.inc
-*** MDEV-8031: Parallel replication stops on "connection killed" error (probably incorrectly handled deadlock kill) ***
-connection server_1;
-INSERT INTO t3 VALUES (201,0), (202,0);
-include/save_master_gtid.inc
-connection server_2;
-include/sync_with_master_gtid.inc
-include/stop_slave.inc
-SET @old_dbug= @@GLOBAL.debug_dbug;
-SET GLOBAL debug_dbug= '+d,inject_mdev8031';
-connection server_1;
-SET @old_dbug_slave= @@SESSION.debug_dbug;
-SET SESSION debug_dbug="+d,binlog_force_commit_id";
-SET @commit_id= 10200;
-INSERT INTO t3 VALUES (203, 1);
-INSERT INTO t3 VALUES (204, 1);
-INSERT INTO t3 VALUES (205, 1);
-UPDATE t3 SET b=b+1 WHERE a=201;
-UPDATE t3 SET b=b+1 WHERE a=201;
-UPDATE t3 SET b=b+1 WHERE a=201;
-UPDATE t3 SET b=b+1 WHERE a=202;
-UPDATE t3 SET b=b+1 WHERE a=202;
-UPDATE t3 SET b=b+1 WHERE a=202;
-UPDATE t3 SET b=b+1 WHERE a=202;
-UPDATE t3 SET b=b+1 WHERE a=203;
-UPDATE t3 SET b=b+1 WHERE a=203;
-UPDATE t3 SET b=b+1 WHERE a=204;
-UPDATE t3 SET b=b+1 WHERE a=204;
-UPDATE t3 SET b=b+1 WHERE a=204;
-UPDATE t3 SET b=b+1 WHERE a=203;
-UPDATE t3 SET b=b+1 WHERE a=205;
-UPDATE t3 SET b=b+1 WHERE a=205;
-SET SESSION debug_dbug=@old_dbug_slave;
-SELECT * FROM t3 WHERE a>=200 ORDER BY a;
-a b
-201 3
-202 4
-203 4
-204 4
-205 3
-include/save_master_gtid.inc
-connection server_2;
-include/start_slave.inc
-include/sync_with_master_gtid.inc
-SELECT * FROM t3 WHERE a>=200 ORDER BY a;
-a b
-201 3
-202 4
-203 4
-204 4
-205 3
-include/stop_slave.inc
-SET GLOBAL debug_dbug= @old_dbug;
-include/start_slave.inc
-*** Check getting deadlock killed inside open_binlog() during retry. ***
-connection server_2;
-include/stop_slave.inc
-SET @old_dbug= @@GLOBAL.debug_dbug;
-SET GLOBAL debug_dbug= '+d,inject_retry_event_group_open_binlog_kill';
-SET @old_max= @@GLOBAL.max_relay_log_size;
-SET GLOBAL max_relay_log_size= 4096;
-connection server_1;
-SET @old_dbug_slave= @@SESSION.debug_dbug;
-SET SESSION debug_dbug="+d,binlog_force_commit_id";
-SET @commit_id= 10210;
-Omit long queries that cause relaylog rotations and transaction retries...
-SET SESSION debug_dbug=@old_dbug_slave;
-SELECT * FROM t3 WHERE a>=200 ORDER BY a;
-a b
-201 6
-202 8
-203 7
-204 7
-205 5
-include/save_master_gtid.inc
-connection server_2;
-include/start_slave.inc
-include/sync_with_master_gtid.inc
-SELECT * FROM t3 WHERE a>=200 ORDER BY a;
-a b
-201 6
-202 8
-203 7
-204 7
-205 5
-include/stop_slave.inc
-SET GLOBAL debug_dbug= @old_dbug;
-SET GLOBAL max_relay_log_size= @old_max;
-include/start_slave.inc
-*** MDEV-8725: Assertion on ROLLBACK statement in the binary log ***
-connection server_1;
-BEGIN;
-INSERT INTO t2 VALUES (2000);
-INSERT INTO t1 VALUES (2000);
-INSERT INTO t2 VALUES (2001);
-ROLLBACK;
-SELECT * FROM t1 WHERE a>=2000 ORDER BY a;
-a
-2000
-SELECT * FROM t2 WHERE a>=2000 ORDER BY a;
-a
-include/save_master_gtid.inc
-connection server_2;
-include/sync_with_master_gtid.inc
-SELECT * FROM t1 WHERE a>=2000 ORDER BY a;
-a
-2000
-SELECT * FROM t2 WHERE a>=2000 ORDER BY a;
-a
-connection server_2;
-include/stop_slave.inc
-SET GLOBAL slave_parallel_threads=@old_parallel_threads;
-include/start_slave.inc
-SET DEBUG_SYNC= 'RESET';
-connection server_1;
-DROP function foo;
-DROP TABLE t1,t2,t3,t4,t5,t6;
-SET DEBUG_SYNC= 'RESET';
-include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_parallel_analyze_table_hang.result b/mysql-test/suite/rpl/r/rpl_parallel_analyze_table_hang.result
new file mode 100644
index 00000000000..3c3cd2601e8
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_parallel_analyze_table_hang.result
@@ -0,0 +1,51 @@
+*** MDEV-7888: ANALYZE TABLE does wakeup_subsequent_commits(), causing wrong binlog order and parallel replication hang ***
+include/master-slave.inc
+[connection master]
+connection server_2;
+SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
+SET @old_parallel_mode=@@GLOBAL.slave_parallel_mode;
+include/stop_slave.inc
+SET GLOBAL slave_parallel_mode='conservative';
+SET GLOBAL slave_parallel_threads=10;
+CHANGE MASTER TO master_use_gtid=slave_pos;
+include/start_slave.inc
+connection server_1;
+ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+CREATE TABLE t2 (a int PRIMARY KEY) ENGINE=InnoDB;
+CREATE TABLE t3 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB;
+connection server_2;
+include/stop_slave.inc
+SET @old_dbug= @@GLOBAL.debug_dbug;
+SET GLOBAL debug_dbug= '+d,inject_analyze_table_sleep';
+connection server_1;
+SET @old_dbug= @@SESSION.debug_dbug;
+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;
+INSERT INTO t3 VALUES (121, 0);
+SET SESSION debug_dbug=@old_dbug;
+SELECT * FROM t3 WHERE a >= 120 ORDER BY a;
+a b
+120 0
+121 0
+include/save_master_gtid.inc
+connection server_2;
+include/start_slave.inc
+include/sync_with_master_gtid.inc
+SELECT * FROM t3 WHERE a >= 120 ORDER BY a;
+a b
+120 0
+121 0
+include/stop_slave.inc
+SET GLOBAL debug_dbug= @old_dbug;
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+SET GLOBAL slave_parallel_mode=@old_parallel_mode;
+include/start_slave.inc
+connection server_1;
+DROP TABLE t2,t3;
+include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_parallel_conflicts.result b/mysql-test/suite/rpl/r/rpl_parallel_conflicts.result
index b15de6fc215..09597ba81c1 100644
--- a/mysql-test/suite/rpl/r/rpl_parallel_conflicts.result
+++ b/mysql-test/suite/rpl/r/rpl_parallel_conflicts.result
@@ -8,6 +8,12 @@ CREATE TABLE t7 (a int PRIMARY KEY, b INT) ENGINE=InnoDB;
CREATE TABLE t8 (a int PRIMARY KEY, b INT) ENGINE=InnoDB;
connection server_2;
include/stop_slave.inc
+SET @old_mode= @@GLOBAL.slave_parallel_mode;
+SET GLOBAL slave_parallel_mode='conservative';
+SET @old_threads= @@GLOBAL.slave_parallel_threads;
+SET GLOBAL slave_parallel_threads=40;
+SET @old_transaction_retries= @@GLOBAL.slave_transaction_retries;
+SET GLOBAL slave_transaction_retries=5;
connection server_1;
INSERT INTO t7 VALUES (1,1), (2,2), (3,3), (4,4), (5,5);
SET @old_dbug= @@SESSION.debug_dbug;
@@ -325,6 +331,9 @@ a b
104 4
include/stop_slave.inc
SET GLOBAL debug_dbug=@old_dbug;
+SET GLOBAL slave_parallel_mode=@old_mode;
+SET GLOBAL slave_parallel_threads=@old_threads;
+SET GLOBAL slave_transaction_retries=@old_transaction_retries;
include/start_slave.inc
SET DEBUG_SYNC= 'RESET';
connection server_1;
diff --git a/mysql-test/suite/rpl/r/rpl_parallel_deadlock_corrupt_binlog.result b/mysql-test/suite/rpl/r/rpl_parallel_deadlock_corrupt_binlog.result
new file mode 100644
index 00000000000..74d1d53b67c
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_parallel_deadlock_corrupt_binlog.result
@@ -0,0 +1,93 @@
+*** MDEV-7335: Potential parallel slave deadlock with specific binlog corruption ***
+include/master-slave.inc
+[connection master]
+connection server_2;
+include/stop_slave.inc
+SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
+SET GLOBAL slave_parallel_threads=10;
+CHANGE MASTER TO master_use_gtid=slave_pos;
+include/start_slave.inc
+connection server_1;
+ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+CREATE TABLE t2 (a int PRIMARY KEY) ENGINE=InnoDB;
+connection server_2;
+include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=1;
+SET @old_dbug= @@GLOBAL.debug_dbug;
+SET GLOBAL debug_dbug="+d,slave_discard_xid_for_gtid_0_x_1000";
+connection server_1;
+INSERT INTO t2 VALUES (101);
+INSERT INTO t2 VALUES (102);
+INSERT INTO t2 VALUES (103);
+INSERT INTO t2 VALUES (104);
+INSERT INTO t2 VALUES (105);
+SET gtid_seq_no=1000;
+INSERT INTO t2 VALUES (106);
+INSERT INTO t2 VALUES (107);
+INSERT INTO t2 VALUES (108);
+INSERT INTO t2 VALUES (109);
+INSERT INTO t2 VALUES (110);
+INSERT INTO t2 VALUES (111);
+INSERT INTO t2 VALUES (112);
+INSERT INTO t2 VALUES (113);
+INSERT INTO t2 VALUES (114);
+INSERT INTO t2 VALUES (115);
+INSERT INTO t2 VALUES (116);
+INSERT INTO t2 VALUES (117);
+INSERT INTO t2 VALUES (118);
+INSERT INTO t2 VALUES (119);
+INSERT INTO t2 VALUES (120);
+INSERT INTO t2 VALUES (121);
+INSERT INTO t2 VALUES (122);
+INSERT INTO t2 VALUES (123);
+INSERT INTO t2 VALUES (124);
+INSERT INTO t2 VALUES (125);
+INSERT INTO t2 VALUES (126);
+INSERT INTO t2 VALUES (127);
+INSERT INTO t2 VALUES (128);
+INSERT INTO t2 VALUES (129);
+INSERT INTO t2 VALUES (130);
+include/save_master_gtid.inc
+connection server_2;
+include/start_slave.inc
+include/sync_with_master_gtid.inc
+SELECT * FROM t2 WHERE a >= 100 ORDER BY a;
+a
+101
+102
+103
+104
+105
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+include/stop_slave.inc
+SET GLOBAL debug_dbug=@old_dbug;
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+include/start_slave.inc
+SET DEBUG_SYNC= 'RESET';
+connection server_1;
+DROP TABLE t2;
+SET DEBUG_SYNC= 'RESET';
+include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_parallel_domain.result b/mysql-test/suite/rpl/r/rpl_parallel_domain.result
new file mode 100644
index 00000000000..69b9678d149
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_parallel_domain.result
@@ -0,0 +1,71 @@
+include/master-slave.inc
+[connection master]
+connection server_2;
+SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
+SET GLOBAL slave_parallel_threads=10;
+ERROR HY000: This operation cannot be performed as you have a running slave ''; run STOP SLAVE '' first
+include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=10;
+SELECT IF(COUNT(*) < 10, "OK", CONCAT("Found too many system user processes: ", COUNT(*))) FROM information_schema.processlist WHERE user = "system user";
+IF(COUNT(*) < 10, "OK", CONCAT("Found too many system user processes: ", COUNT(*)))
+OK
+CHANGE MASTER TO master_use_gtid=slave_pos;
+include/start_slave.inc
+SELECT IF(COUNT(*) >= 10, "OK", CONCAT("Found too few system user processes: ", COUNT(*))) FROM information_schema.processlist WHERE user = "system user";
+IF(COUNT(*) >= 10, "OK", CONCAT("Found too few system user processes: ", COUNT(*)))
+OK
+include/stop_slave.inc
+SELECT IF(COUNT(*) < 10, "OK", CONCAT("Found too many system user processes: ", COUNT(*))) FROM information_schema.processlist WHERE user = "system user";
+IF(COUNT(*) < 10, "OK", CONCAT("Found too many system user processes: ", COUNT(*)))
+OK
+include/start_slave.inc
+SELECT IF(COUNT(*) >= 10, "OK", CONCAT("Found too few system user processes: ", COUNT(*))) FROM information_schema.processlist WHERE user = "system user";
+IF(COUNT(*) >= 10, "OK", CONCAT("Found too few system user processes: ", COUNT(*)))
+OK
+*** Test long-running query in domain 1 can run in parallel with short queries in domain 0 ***
+connection server_1;
+ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+CREATE TABLE t1 (a int PRIMARY KEY) ENGINE=MyISAM;
+CREATE TABLE t2 (a int PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t2 VALUES (1);
+connection server_2;
+connect con_temp1,127.0.0.1,root,,test,$SERVER_MYPORT_2,;
+LOCK TABLE t1 WRITE;
+connection server_1;
+SET gtid_domain_id=1;
+INSERT INTO t1 VALUES (2);
+SET gtid_domain_id=0;
+INSERT INTO t2 VALUES (2);
+INSERT INTO t2 VALUES (3);
+BEGIN;
+INSERT INTO t2 VALUES (4);
+INSERT INTO t2 VALUES (5);
+COMMIT;
+INSERT INTO t2 VALUES (6);
+connection server_2;
+SELECT * FROM t2 ORDER by a;
+a
+1
+2
+3
+4
+5
+6
+connection con_temp1;
+SELECT * FROM t1;
+a
+1
+UNLOCK TABLES;
+connection server_2;
+SELECT * FROM t1 ORDER BY a;
+a
+1
+2
+connection server_2;
+include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+include/start_slave.inc
+connection server_1;
+DROP TABLE t1,t2;
+include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_parallel_domain_slave_single_grp.result b/mysql-test/suite/rpl/r/rpl_parallel_domain_slave_single_grp.result
new file mode 100644
index 00000000000..613aac64487
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_parallel_domain_slave_single_grp.result
@@ -0,0 +1,101 @@
+*** Test two transactions in different domains committed in opposite order on slave but in a single group commit. ***
+include/master-slave.inc
+[connection master]
+connection server_2;
+SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
+include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=10;
+CHANGE MASTER TO master_use_gtid=slave_pos;
+include/start_slave.inc
+connection server_1;
+ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+CREATE TABLE t1 (a int PRIMARY KEY) ENGINE=MyISAM;
+CREATE TABLE t2 (a int PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t2 VALUES (1);
+connection server_2;
+include/stop_slave.inc
+connection server_1;
+SET sql_log_bin=0;
+CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
+RETURNS INT DETERMINISTIC
+BEGIN
+RETURN x;
+END
+||
+SET sql_log_bin=1;
+SET @old_format= @@SESSION.binlog_format;
+SET binlog_format='statement';
+SET gtid_domain_id=1;
+INSERT INTO t2 VALUES (foo(10,
+'commit_before_enqueue SIGNAL ready1 WAIT_FOR cont1',
+'commit_after_release_LOCK_prepare_ordered SIGNAL ready2'));
+connection server_2;
+FLUSH LOGS;
+SET sql_log_bin=0;
+CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
+RETURNS INT DETERMINISTIC
+BEGIN
+IF d1 != '' THEN
+SET debug_sync = d1;
+END IF;
+IF d2 != '' THEN
+SET debug_sync = d2;
+END IF;
+RETURN x;
+END
+||
+SET sql_log_bin=1;
+SET @old_format=@@GLOBAL.binlog_format;
+SET GLOBAL binlog_format=statement;
+SET GLOBAL slave_parallel_threads=0;
+SET GLOBAL slave_parallel_threads=10;
+include/start_slave.inc
+SET debug_sync='now WAIT_FOR ready1';
+connection server_1;
+SET gtid_domain_id=2;
+INSERT INTO t2 VALUES (foo(11,
+'commit_before_enqueue SIGNAL ready3 WAIT_FOR cont3',
+'commit_after_release_LOCK_prepare_ordered SIGNAL ready4 WAIT_FOR cont4'));
+SET gtid_domain_id=0;
+SELECT * FROM t2 WHERE a >= 10 ORDER BY a;
+a
+10
+11
+connection server_2;
+SET debug_sync='now WAIT_FOR ready3';
+SET debug_sync='now SIGNAL cont3';
+SET debug_sync='now WAIT_FOR ready4';
+SET debug_sync='now SIGNAL cont1';
+SET debug_sync='now WAIT_FOR ready2';
+SET debug_sync='now SIGNAL cont4';
+SELECT * FROM t2 WHERE a >= 10 ORDER BY a;
+a
+10
+11
+include/show_binlog_events.inc
+Log_name Pos Event_type Server_id End_log_pos Info
+slave-bin.000002 # Binlog_checkpoint # # slave-bin.000002
+slave-bin.000002 # Gtid # # BEGIN GTID #-#-# cid=#
+slave-bin.000002 # Query # # use `test`; INSERT INTO t2 VALUES (foo(11,
+'commit_before_enqueue SIGNAL ready3 WAIT_FOR cont3',
+'commit_after_release_LOCK_prepare_ordered SIGNAL ready4 WAIT_FOR cont4'))
+slave-bin.000002 # Xid # # COMMIT /* XID */
+slave-bin.000002 # Gtid # # BEGIN GTID #-#-# cid=#
+slave-bin.000002 # Query # # use `test`; INSERT INTO t2 VALUES (foo(10,
+'commit_before_enqueue SIGNAL ready1 WAIT_FOR cont1',
+'commit_after_release_LOCK_prepare_ordered SIGNAL ready2'))
+slave-bin.000002 # Xid # # COMMIT /* XID */
+FLUSH LOGS;
+connection server_2;
+include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+include/start_slave.inc
+SET DEBUG_SYNC= 'RESET';
+SET GLOBAL binlog_format=@old_format;
+connection server_1;
+DROP function foo;
+DROP TABLE t1,t2;
+SET DEBUG_SYNC= 'RESET';
+SET GLOBAL binlog_format=@old_format;
+include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_parallel_free_deferred_event.result b/mysql-test/suite/rpl/r/rpl_parallel_free_deferred_event.result
new file mode 100644
index 00000000000..6718561a321
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_parallel_free_deferred_event.result
@@ -0,0 +1,44 @@
+*** MDEV-5788 Incorrect free of rgi->deferred_events in parallel replication ***
+include/master-slave.inc
+[connection master]
+connection server_2;
+include/stop_slave.inc
+CHANGE MASTER TO master_use_gtid=slave_pos;
+include/start_slave.inc
+connection server_1;
+ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+CREATE TABLE t3 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB;
+connection server_2;
+SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
+include/stop_slave.inc
+SET GLOBAL replicate_ignore_table="test.t3";
+SET GLOBAL slave_parallel_threads=2;
+include/start_slave.inc
+connection server_1;
+INSERT INTO t3 VALUES (100, rand());
+INSERT INTO t3 VALUES (101, rand());
+connection server_2;
+connection server_1;
+INSERT INTO t3 VALUES (102, rand());
+INSERT INTO t3 VALUES (103, rand());
+INSERT INTO t3 VALUES (104, rand());
+INSERT INTO t3 VALUES (105, rand());
+connection server_2;
+include/stop_slave.inc
+SET GLOBAL replicate_ignore_table="";
+include/start_slave.inc
+connection server_1;
+INSERT INTO t3 VALUES (106, rand());
+INSERT INTO t3 VALUES (107, rand());
+connection server_2;
+SELECT * FROM t3 WHERE a >= 100 ORDER BY a;
+a b
+106 #
+107 #
+connection server_2;
+include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+include/start_slave.inc
+connection server_1;
+DROP TABLE t3;
+include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_parallel_gco_wait_kill.result b/mysql-test/suite/rpl/r/rpl_parallel_gco_wait_kill.result
new file mode 100644
index 00000000000..4472550c4f2
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_parallel_gco_wait_kill.result
@@ -0,0 +1,257 @@
+*** Test killing thread that is waiting to start transaction until previous transaction commits ***
+include/master-slave.inc
+[connection master]
+connection server_2;
+SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
+SET @old_parallel_mode= @@GLOBAL.slave_parallel_mode;
+include/stop_slave.inc
+SET sql_log_bin=0;
+CALL mtr.add_suppression("Query execution was interrupted");
+CALL mtr.add_suppression("Slave: Connection was killed");
+CALL mtr.add_suppression("Commit failed due to failure of an earlier commit on which this one depends");
+SET sql_log_bin=1;
+SET GLOBAL slave_parallel_threads=10;
+SET GLOBAL slave_parallel_mode= 'conservative';
+CHANGE MASTER TO master_use_gtid=slave_pos;
+include/start_slave.inc
+connection server_1;
+connect con_temp3,127.0.0.1,root,,test,$SERVER_MYPORT_1,;
+connect con_temp4,127.0.0.1,root,,test,$SERVER_MYPORT_1,;
+connect con_temp5,127.0.0.1,root,,test,$SERVER_MYPORT_1,;
+ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+CREATE TABLE t3 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB;
+connection server_2;
+connection server_1;
+SET sql_log_bin=0;
+CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
+RETURNS INT DETERMINISTIC
+BEGIN
+RETURN x;
+END
+||
+SET sql_log_bin=1;
+connection server_2;
+SET sql_log_bin=0;
+CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
+RETURNS INT DETERMINISTIC
+BEGIN
+IF d1 != '' THEN
+SET debug_sync = d1;
+END IF;
+IF d2 != '' THEN
+SET debug_sync = d2;
+END IF;
+RETURN x;
+END
+||
+SET sql_log_bin=1;
+include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=0;
+SET GLOBAL slave_parallel_threads=4;
+include/start_slave.inc
+connection server_1;
+SET gtid_domain_id=2;
+BEGIN;
+INSERT INTO t3 VALUES (70, foo(70,
+'rpl_parallel_start_waiting_for_prior SIGNAL t4_waiting', ''));
+INSERT INTO t3 VALUES (60, foo(60,
+'ha_write_row_end SIGNAL d2_query WAIT_FOR d2_cont2',
+'rpl_parallel_end_of_group SIGNAL d2_done WAIT_FOR d2_cont'));
+COMMIT;
+SET gtid_domain_id=0;
+connection server_2;
+SET debug_sync='now WAIT_FOR d2_query';
+connection server_1;
+SET gtid_domain_id=1;
+BEGIN;
+INSERT INTO t3 VALUES (61, foo(61,
+'rpl_parallel_start_waiting_for_prior SIGNAL t3_waiting',
+'rpl_parallel_start_waiting_for_prior_killed SIGNAL t3_killed'));
+INSERT INTO t3 VALUES (62, foo(62,
+'ha_write_row_end SIGNAL d1_query WAIT_FOR d1_cont2',
+'rpl_parallel_end_of_group SIGNAL d1_done WAIT_FOR d1_cont'));
+COMMIT;
+SET gtid_domain_id=0;
+connection server_2;
+SET debug_sync='now WAIT_FOR d1_query';
+connection server_1;
+SET gtid_domain_id=0;
+INSERT INTO t3 VALUES (63, foo(63,
+'ha_write_row_end SIGNAL d0_query WAIT_FOR d0_cont2',
+'rpl_parallel_end_of_group SIGNAL d0_done WAIT_FOR d0_cont'));
+connection server_2;
+SET debug_sync='now WAIT_FOR d0_query';
+connection server_1;
+SET gtid_domain_id=3;
+BEGIN;
+INSERT INTO t3 VALUES (68, foo(68,
+'rpl_parallel_start_waiting_for_prior SIGNAL t2_waiting', ''));
+INSERT INTO t3 VALUES (69, foo(69,
+'ha_write_row_end SIGNAL d3_query WAIT_FOR d3_cont2',
+'rpl_parallel_end_of_group SIGNAL d3_done WAIT_FOR d3_cont'));
+COMMIT;
+SET gtid_domain_id=0;
+connection server_2;
+SET debug_sync='now WAIT_FOR d3_query';
+SET debug_sync='now SIGNAL d2_cont2';
+SET debug_sync='now WAIT_FOR d2_done';
+SET debug_sync='now SIGNAL d1_cont2';
+SET debug_sync='now WAIT_FOR d1_done';
+SET debug_sync='now SIGNAL d0_cont2';
+SET debug_sync='now WAIT_FOR d0_done';
+SET debug_sync='now SIGNAL d3_cont2';
+SET debug_sync='now WAIT_FOR d3_done';
+connection con_temp3;
+INSERT INTO t3 VALUES (64, foo(64,
+'rpl_parallel_before_mark_start_commit SIGNAL t1_waiting WAIT_FOR t1_cont', ''));
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2 WAIT_FOR master_cont2';
+INSERT INTO t3 VALUES (65, foo(65, '', ''));
+connection server_1;
+SET debug_sync='now WAIT_FOR master_queued2';
+connection con_temp4;
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued3';
+INSERT INTO t3 VALUES (66, foo(66, '', ''));
+connection server_1;
+SET debug_sync='now WAIT_FOR master_queued3';
+connection con_temp5;
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued4';
+INSERT INTO t3 VALUES (67, foo(67, '', ''));
+connection server_1;
+SET debug_sync='now WAIT_FOR master_queued4';
+SET debug_sync='now SIGNAL master_cont2';
+connection con_temp3;
+connection con_temp4;
+connection con_temp5;
+connection server_1;
+SELECT * FROM t3 WHERE a >= 60 ORDER BY a;
+a b
+60 60
+61 61
+62 62
+63 63
+64 64
+65 65
+66 66
+67 67
+68 68
+69 69
+70 70
+SET debug_sync='RESET';
+connection server_2;
+SET debug_sync='now SIGNAL d0_cont';
+SET debug_sync='now WAIT_FOR t1_waiting';
+SET debug_sync='now SIGNAL d3_cont';
+SET debug_sync='now WAIT_FOR t2_waiting';
+SET debug_sync='now SIGNAL d1_cont';
+SET debug_sync='now WAIT_FOR t3_waiting';
+SET debug_sync='now SIGNAL d2_cont';
+SET debug_sync='now WAIT_FOR t4_waiting';
+KILL THD_ID;
+SET debug_sync='now WAIT_FOR t3_killed';
+SET debug_sync='now SIGNAL t1_cont';
+include/wait_for_slave_sql_error.inc [errno=1317,1927,1964]
+STOP SLAVE IO_THREAD;
+SELECT * FROM t3 WHERE a >= 60 AND a != 65 ORDER BY a;
+a b
+60 60
+61 61
+62 62
+63 63
+64 64
+68 68
+69 69
+70 70
+SET debug_sync='RESET';
+SET GLOBAL slave_parallel_threads=0;
+SET GLOBAL slave_parallel_threads=10;
+SET sql_log_bin=0;
+DROP FUNCTION foo;
+CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
+RETURNS INT DETERMINISTIC
+BEGIN
+RETURN x;
+END
+||
+SET sql_log_bin=1;
+connection server_1;
+UPDATE t3 SET b=b+1 WHERE a=60;
+connection server_2;
+include/start_slave.inc
+SELECT * FROM t3 WHERE a >= 60 ORDER BY a;
+a b
+60 61
+61 61
+62 62
+63 63
+64 64
+65 65
+66 66
+67 67
+68 68
+69 69
+70 70
+SET sql_log_bin=0;
+DROP FUNCTION foo;
+CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
+RETURNS INT DETERMINISTIC
+BEGIN
+IF d1 != '' THEN
+SET debug_sync = d1;
+END IF;
+IF d2 != '' THEN
+SET debug_sync = d2;
+END IF;
+RETURN x;
+END
+||
+SET sql_log_bin=1;
+connection server_2;
+include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=0;
+SET GLOBAL slave_parallel_threads=10;
+include/start_slave.inc
+*** 5. Test killing thread that is waiting for queue of max length to shorten ***
+SET @old_max_queued= @@GLOBAL.slave_parallel_max_queued;
+SET GLOBAL slave_parallel_max_queued=9000;
+connection server_1;
+INSERT INTO t3 VALUES (80, foo(0,
+'ha_write_row_end SIGNAL query_waiting WAIT_FOR query_cont', ''));
+connection server_2;
+SET debug_sync='now WAIT_FOR query_waiting';
+SET @old_dbug= @@GLOBAL.debug_dbug;
+SET GLOBAL debug_dbug="+d,rpl_parallel_wait_queue_max";
+connection server_1;
+SELECT * FROM t3 WHERE a >= 80 ORDER BY a;
+a b
+80 0
+81 10000
+connection server_2;
+SET debug_sync='now WAIT_FOR wait_queue_ready';
+KILL THD_ID;
+SET debug_sync='now WAIT_FOR wait_queue_killed';
+SET debug_sync='now SIGNAL query_cont';
+include/wait_for_slave_sql_error.inc [errno=1317,1927,1964]
+STOP SLAVE IO_THREAD;
+SET GLOBAL debug_dbug=@old_dbug;
+SET GLOBAL slave_parallel_max_queued= @old_max_queued;
+connection server_1;
+INSERT INTO t3 VALUES (82,0);
+connection server_2;
+SET debug_sync='RESET';
+include/start_slave.inc
+SELECT * FROM t3 WHERE a >= 80 ORDER BY a;
+a b
+80 0
+81 10000
+82 0
+connection server_2;
+include/stop_slave.inc
+SET GLOBAL slave_parallel_mode=@old_parallel_mode;
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+include/start_slave.inc
+SET DEBUG_SYNC= 'RESET';
+connection server_1;
+DROP function foo;
+DROP TABLE t3;
+SET DEBUG_SYNC= 'RESET';
+include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_parallel_gtid_slave_pos_update_fail.result b/mysql-test/suite/rpl/r/rpl_parallel_gtid_slave_pos_update_fail.result
new file mode 100644
index 00000000000..2e7e7f547af
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_parallel_gtid_slave_pos_update_fail.result
@@ -0,0 +1,65 @@
+include/master-slave.inc
+[connection master]
+connection server_2;
+SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
+include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=10;
+CHANGE MASTER TO master_use_gtid=slave_pos;
+include/start_slave.inc
+connection server_1;
+ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+CREATE TABLE t4 (a INT PRIMARY KEY, b INT, KEY b_idx(b)) ENGINE=InnoDB;
+INSERT INTO t4 VALUES (1,NULL), (2,2), (3,NULL), (4,4), (5, NULL), (6, 6);
+connect con1,127.0.0.1,root,,test,$SERVER_MYPORT_1,;
+connect con2,127.0.0.1,root,,test,$SERVER_MYPORT_1,;
+connection server_2;
+include/stop_slave.inc
+connection con1;
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1';
+UPDATE t4 SET b=NULL WHERE a=6;
+connection server_1;
+SET debug_sync='now WAIT_FOR master_queued1';
+connection con2;
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2';
+DELETE FROM t4 WHERE b <= 1;
+connection server_1;
+SET debug_sync='now WAIT_FOR master_queued2';
+SET debug_sync='now SIGNAL master_cont1';
+connection con1;
+connection con2;
+SET debug_sync='RESET';
+connection server_2;
+SET @old_dbug= @@GLOBAL.debug_dbug;
+SET GLOBAL debug_dbug="+d,disable_thd_need_ordering_with";
+include/start_slave.inc
+SET GLOBAL debug_dbug=@old_dbug;
+SELECT * FROM t4 ORDER BY a;
+a b
+1 NULL
+2 2
+3 NULL
+4 4
+5 NULL
+6 NULL
+SET @last_gtid= 'GTID';
+SELECT IF(@@gtid_slave_pos LIKE CONCAT('%',@last_gtid,'%'), "GTID found ok",
+CONCAT("GTID ", @last_gtid, " not found in gtid_slave_pos=", @@gtid_slave_pos))
+AS result;
+result
+GTID found ok
+SELECT "ROW FOUND" AS `Is the row found?`
+ FROM mysql.gtid_slave_pos
+WHERE CONCAT(domain_id, "-", server_id, "-", seq_no) = @last_gtid;
+Is the row found?
+ROW FOUND
+connection server_2;
+include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+include/start_slave.inc
+SET DEBUG_SYNC= 'RESET';
+connection server_1;
+DROP TABLE t4;
+SET DEBUG_SYNC= 'RESET';
+disconnect con1;
+disconnect con2;
+include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_parallel_ignore_error_on_rotate.result b/mysql-test/suite/rpl/r/rpl_parallel_ignore_error_on_rotate.result
new file mode 100644
index 00000000000..d00740dba3d
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_parallel_ignore_error_on_rotate.result
@@ -0,0 +1,74 @@
+*** MDEV-6551: Some replication errors are ignored if slave_parallel_threads > 0 ***
+include/master-slave.inc
+[connection master]
+connection server_2;
+include/stop_slave.inc
+SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
+SET @old_parallel_mode=@@GLOBAL.slave_parallel_mode;
+SET GLOBAL slave_parallel_threads=1;
+CHANGE MASTER TO master_use_gtid=slave_pos;
+CALL mtr.add_suppression("Commit failed due to failure of an earlier commit on which this one depends");
+include/start_slave.inc
+connection server_1;
+ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+CREATE TABLE t2 (a int PRIMARY KEY) ENGINE=InnoDB;
+SET gtid_domain_id=1;
+INSERT INTO t2 VALUES (1);
+SET gtid_domain_id=0;
+SET gtid_domain_id=2;
+INSERT INTO t2 VALUES (2);
+SET gtid_domain_id=0;
+INSERT INTO t2 VALUES (31);
+include/save_master_gtid.inc
+connection server_2;
+include/sync_with_master_gtid.inc
+include/stop_slave.inc
+SET GLOBAL slave_parallel_threads= 0;
+include/start_slave.inc
+SET sql_log_bin= 0;
+INSERT INTO t2 VALUES (32);
+SET sql_log_bin= 1;
+connection server_1;
+INSERT INTO t2 VALUES (32);
+FLUSH LOGS;
+INSERT INTO t2 VALUES (33);
+INSERT INTO t2 VALUES (34);
+SELECT * FROM t2 WHERE a >= 30 ORDER BY a;
+a
+31
+32
+33
+34
+include/save_master_gtid.inc
+connection server_2;
+include/wait_for_slave_sql_error.inc [errno=1062]
+connection server_2;
+include/stop_slave_io.inc
+SET GLOBAL slave_parallel_threads=10;
+START SLAVE;
+include/wait_for_slave_sql_error.inc [errno=1062]
+START SLAVE SQL_THREAD;
+include/wait_for_slave_sql_error.inc [errno=1062]
+SELECT * FROM t2 WHERE a >= 30 ORDER BY a;
+a
+31
+32
+SET sql_slave_skip_counter= 1;
+ERROR HY000: When using parallel replication and GTID with multiple replication domains, @@sql_slave_skip_counter can not be used. Instead, setting @@gtid_slave_pos explicitly can be used to skip to after a given GTID position
+include/stop_slave_io.inc
+include/start_slave.inc
+include/sync_with_master_gtid.inc
+SELECT * FROM t2 WHERE a >= 30 ORDER BY a;
+a
+31
+32
+33
+34
+connection server_2;
+include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+SET GLOBAL slave_parallel_mode=@old_parallel_mode;
+include/start_slave.inc
+connection server_1;
+DROP TABLE t2;
+include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_parallel_incorrect_relay_pos.result b/mysql-test/suite/rpl/r/rpl_parallel_incorrect_relay_pos.result
new file mode 100644
index 00000000000..6ca7f2b68e8
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_parallel_incorrect_relay_pos.result
@@ -0,0 +1,75 @@
+*** MDEV-7237: Parallel replication: incorrect relaylog position after stop/start the slave ***
+include/master-slave.inc
+[connection master]
+connection server_2;
+include/stop_slave.inc
+CALL mtr.add_suppression("Commit failed due to failure of an earlier commit on which this one depends");
+SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
+SET @old_parallel_mode=@@GLOBAL.slave_parallel_mode;
+SET GLOBAL slave_parallel_threads=10;
+SET GLOBAL slave_parallel_mode='conservative';
+CHANGE MASTER TO master_use_gtid=slave_pos;
+include/start_slave.inc
+connection server_1;
+ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+CREATE TABLE t2 (a int PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t2 VALUES (40);
+connection server_2;
+connect con_temp2,127.0.0.1,root,,test,$SERVER_MYPORT_2,;
+include/stop_slave.inc
+CHANGE MASTER TO master_use_gtid=no;
+SET @old_dbug= @@GLOBAL.debug_dbug;
+SET GLOBAL debug_dbug="+d,rpl_parallel_scheduled_gtid_0_x_100";
+SET GLOBAL debug_dbug="+d,rpl_parallel_wait_for_done_trigger";
+SET GLOBAL slave_parallel_threads=0;
+SET GLOBAL slave_parallel_threads=10;
+connection server_1;
+INSERT INTO t2 VALUES (41);
+INSERT INTO t2 VALUES (42);
+SET @old_format= @@binlog_format;
+SET binlog_format= statement;
+DELETE FROM t2 WHERE a=40;
+SET binlog_format= @old_format;
+INSERT INTO t2 VALUES (43);
+INSERT INTO t2 VALUES (44);
+FLUSH LOGS;
+INSERT INTO t2 VALUES (45);
+SET gtid_seq_no=100;
+INSERT INTO t2 VALUES (46);
+connection con_temp2;
+BEGIN;
+SELECT * FROM t2 WHERE a=40 FOR UPDATE;
+a
+40
+connection server_2;
+include/start_slave.inc
+SET debug_sync= 'now WAIT_FOR scheduled_gtid_0_x_100';
+STOP SLAVE;
+connection con_temp2;
+SET debug_sync= 'now WAIT_FOR wait_for_done_waiting';
+ROLLBACK;
+connection server_2;
+include/wait_for_slave_sql_to_stop.inc
+SELECT * FROM t2 WHERE a >= 40 ORDER BY a;
+a
+41
+42
+include/start_slave.inc
+SELECT * FROM t2 WHERE a >= 40 ORDER BY a;
+a
+41
+42
+43
+44
+45
+46
+include/stop_slave.inc
+SET GLOBAL debug_dbug=@old_dbug;
+SET DEBUG_SYNC= 'RESET';
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+SET GLOBAL slave_parallel_mode=@old_parallel_mode;
+CHANGE MASTER TO master_use_gtid=slave_pos;
+include/start_slave.inc
+connection server_1;
+DROP TABLE t2;
+include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_parallel_innodb_lock_conflict.result b/mysql-test/suite/rpl/r/rpl_parallel_innodb_lock_conflict.result
new file mode 100644
index 00000000000..1411db16af6
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_parallel_innodb_lock_conflict.result
@@ -0,0 +1,79 @@
+***MDEV-5914: Parallel replication deadlock due to InnoDB lock conflicts ***
+include/master-slave.inc
+[connection master]
+connection server_2;
+SET sql_log_bin=0;
+CALL mtr.add_suppression("Commit failed due to failure of an earlier commit on which this one depends");
+SET sql_log_bin=1;
+SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
+include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=10;
+CHANGE MASTER TO master_use_gtid=slave_pos;
+connection server_1;
+ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+CREATE TABLE t4 (a INT PRIMARY KEY, b INT, KEY b_idx(b)) ENGINE=InnoDB;
+INSERT INTO t4 VALUES (1,NULL), (2,2), (3,NULL), (4,4), (5, NULL), (6, 6);
+connect con1,127.0.0.1,root,,test,$SERVER_MYPORT_1,;
+connect con2,127.0.0.1,root,,test,$SERVER_MYPORT_1,;
+connection con1;
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1';
+UPDATE t4 SET b=NULL WHERE a=6;
+connection server_1;
+SET debug_sync='now WAIT_FOR master_queued1';
+connection con2;
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2';
+DELETE FROM t4 WHERE b <= 3;
+connection server_1;
+SET debug_sync='now WAIT_FOR master_queued2';
+SET debug_sync='now SIGNAL master_cont1';
+connection con1;
+connection con2;
+SET debug_sync='RESET';
+connection server_2;
+include/start_slave.inc
+include/stop_slave.inc
+SELECT * FROM t4 ORDER BY a;
+a b
+1 NULL
+3 NULL
+4 4
+5 NULL
+6 NULL
+connection server_1;
+DELETE FROM t4;
+INSERT INTO t4 VALUES (1,NULL), (2,2), (3,NULL), (4,4), (5, NULL), (6, 6);
+connection con1;
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1';
+INSERT INTO t4 VALUES (7, NULL);
+connection server_1;
+SET debug_sync='now WAIT_FOR master_queued1';
+connection con2;
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2';
+DELETE FROM t4 WHERE b <= 3;
+connection server_1;
+SET debug_sync='now WAIT_FOR master_queued2';
+SET debug_sync='now SIGNAL master_cont1';
+connection con1;
+connection con2;
+SET debug_sync='RESET';
+connection server_2;
+include/start_slave.inc
+include/stop_slave.inc
+SELECT * FROM t4 ORDER BY a;
+a b
+1 NULL
+3 NULL
+4 4
+5 NULL
+6 6
+7 NULL
+connection server_2;
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+include/start_slave.inc
+SET DEBUG_SYNC= 'RESET';
+connection server_1;
+disconnect con1;
+disconnect con2;
+DROP TABLE t4;
+SET DEBUG_SYNC= 'RESET';
+include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_parallel_mdev6589.result b/mysql-test/suite/rpl/r/rpl_parallel_mdev6589.result
index e05e824eed3..47cdb3496da 100644
--- a/mysql-test/suite/rpl/r/rpl_parallel_mdev6589.result
+++ b/mysql-test/suite/rpl/r/rpl_parallel_mdev6589.result
@@ -92,6 +92,7 @@ MASTER_GTID_WAIT('WAIT_POS')
0
connection con_temp1;
COMMIT;
+CALL mtr.add_suppression("Commit failed due to failure of an earlier commit on which this one depends");
SET sql_log_bin=1;
connection server_2;
include/wait_for_slave_sql_error.inc [errno=1062]
diff --git a/mysql-test/suite/rpl/r/rpl_parallel_missed_error_handling.result b/mysql-test/suite/rpl/r/rpl_parallel_missed_error_handling.result
new file mode 100644
index 00000000000..e9d04c02d7a
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_parallel_missed_error_handling.result
@@ -0,0 +1,65 @@
+*** MDEV-5921: In parallel replication, an error is not correctly signalled to the next transaction ***
+include/master-slave.inc
+[connection master]
+connection server_2;
+include/stop_slave.inc
+SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
+SET GLOBAL slave_parallel_threads=10;
+CHANGE MASTER TO master_use_gtid=slave_pos;
+CALL mtr.add_suppression("Commit failed due to failure of an earlier commit on which this one depends");
+include/start_slave.inc
+connection server_1;
+ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+CREATE TABLE t3 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB;
+connection server_2;
+connection server_1;
+INSERT INTO t3 VALUES (110, 1);
+connection server_2;
+SELECT * FROM t3 WHERE a >= 110 ORDER BY a;
+a b
+110 1
+SET sql_log_bin=0;
+INSERT INTO t3 VALUES (111, 666);
+SET sql_log_bin=1;
+connection server_1;
+connect con1,127.0.0.1,root,,test,$SERVER_MYPORT_1,;
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1';
+INSERT INTO t3 VALUES (111, 2);
+connection server_1;
+SET debug_sync='now WAIT_FOR master_queued1';
+connect con2,127.0.0.1,root,,test,$SERVER_MYPORT_1,;
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2';
+INSERT INTO t3 VALUES (112, 3);
+connection server_1;
+SET debug_sync='now WAIT_FOR master_queued2';
+SET debug_sync='now SIGNAL master_cont1';
+connection con1;
+connection con2;
+SET debug_sync='RESET';
+connection server_2;
+include/wait_for_slave_sql_error.inc [errno=1062]
+include/wait_for_slave_sql_to_stop.inc
+SELECT * FROM t3 WHERE a >= 110 ORDER BY a;
+a b
+110 1
+111 666
+SET sql_log_bin=0;
+DELETE FROM t3 WHERE a=111 AND b=666;
+SET sql_log_bin=1;
+START SLAVE SQL_THREAD;
+SELECT * FROM t3 WHERE a >= 110 ORDER BY a;
+a b
+110 1
+111 2
+112 3
+connection server_2;
+include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+include/start_slave.inc
+SET DEBUG_SYNC= 'RESET';
+connection server_1;
+disconnect con1;
+disconnect con2;
+DROP TABLE t3;
+SET DEBUG_SYNC= 'RESET';
+include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_parallel_mode.result b/mysql-test/suite/rpl/r/rpl_parallel_mode.result
new file mode 100644
index 00000000000..313290b1fd2
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_parallel_mode.result
@@ -0,0 +1,75 @@
+*** MDEV-6676 - test syntax of @@slave_parallel_mode ***
+include/master-slave.inc
+[connection master]
+connection server_2;
+include/stop_slave.inc
+SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
+SET @old_parallel_mode=@@GLOBAL.slave_parallel_mode;
+SET GLOBAL slave_parallel_threads=10;
+CHANGE MASTER TO master_use_gtid=slave_pos;
+include/start_slave.inc
+connection server_1;
+ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+CREATE TABLE t2 (a int PRIMARY KEY) ENGINE=InnoDB;
+connection server_2;
+Parallel_Mode = 'optimistic'
+include/stop_slave.inc
+SET GLOBAL slave_parallel_mode='aggressive';
+Parallel_Mode = 'aggressive'
+SET GLOBAL slave_parallel_mode='conservative';
+Parallel_Mode = 'conservative'
+*** MDEV-6676 - test that empty parallel_mode does not replicate in parallel ***
+connection server_1;
+INSERT INTO t2 VALUES (1040);
+include/save_master_gtid.inc
+connection server_2;
+SET GLOBAL slave_parallel_mode='none';
+SET @old_dbug= @@GLOBAL.debug_dbug;
+SET GLOBAL debug_dbug="+d,slave_crash_if_parallel_apply";
+include/start_slave.inc
+include/sync_with_master_gtid.inc
+SELECT * FROM t2 WHERE a >= 1040 ORDER BY a;
+a
+1040
+include/stop_slave.inc
+SET GLOBAL debug_dbug=@old_dbug;
+*** MDEV-6676 - test disabling domain-based parallel replication ***
+connection server_1;
+SET gtid_domain_id = 1;
+INSERT INTO t2 VALUES (1041);
+INSERT INTO t2 VALUES (1042);
+INSERT INTO t2 VALUES (1043);
+INSERT INTO t2 VALUES (1044);
+INSERT INTO t2 VALUES (1045);
+INSERT INTO t2 VALUES (1046);
+DELETE FROM t2 WHERE a >= 1041;
+SET gtid_domain_id = 2;
+INSERT INTO t2 VALUES (1041);
+INSERT INTO t2 VALUES (1042);
+INSERT INTO t2 VALUES (1043);
+INSERT INTO t2 VALUES (1044);
+INSERT INTO t2 VALUES (1045);
+INSERT INTO t2 VALUES (1046);
+SET gtid_domain_id = 0;
+include/save_master_gtid.inc
+connection server_2;
+SET GLOBAL slave_parallel_mode=minimal;
+include/start_slave.inc
+include/sync_with_master_gtid.inc
+SELECT * FROM t2 WHERE a >= 1040 ORDER BY a;
+a
+1040
+1041
+1042
+1043
+1044
+1045
+1046
+include/stop_slave.inc
+SET GLOBAL debug_dbug=@old_dbug;
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+SET GLOBAL slave_parallel_mode=@old_parallel_mode;
+include/start_slave.inc
+connection server_1;
+DROP TABLE t2;
+include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_parallel_optimistic_xa.result b/mysql-test/suite/rpl/r/rpl_parallel_optimistic_xa.result
new file mode 100644
index 00000000000..4136f1885db
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_parallel_optimistic_xa.result
@@ -0,0 +1,51 @@
+include/master-slave.inc
+[connection master]
+call mtr.add_suppression("Deadlock found when trying to get lock; try restarting transaction");
+call mtr.add_suppression("WSREP: handlerton rollback failed");
+CREATE VIEW v_processlist as SELECT * FROM performance_schema.threads where type = 'FOREGROUND';
+connection master;
+ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+connection slave;
+include/stop_slave.inc
+SET @old_parallel_threads = @@GLOBAL.slave_parallel_threads;
+SET @@global.slave_parallel_threads = 7;
+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;
+CHANGE MASTER TO master_use_gtid=slave_pos;
+connection master;
+CREATE TABLE t0 (a int, b INT) ENGINE=InnoDB;
+CREATE TABLE t1 (a int PRIMARY KEY, b INT) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1, 0);
+include/save_master_gtid.inc
+connection slave;
+include/start_slave.inc
+include/sync_with_master_gtid.inc
+include/stop_slave.inc
+connection master;
+include/save_master_gtid.inc
+connection slave;
+include/start_slave.inc
+include/sync_with_master_gtid.inc
+include/diff_tables.inc [master:t0, slave:t0]
+include/diff_tables.inc [master:t1, slave:t1]
+connection slave;
+include/stop_slave.inc
+set global log_warnings=default;
+SET GLOBAL slave_parallel_mode=@old_parallel_mode;
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+include/start_slave.inc
+connection master;
+DROP VIEW v_processlist;
+DROP TABLE t0, t1;
+include/save_master_gtid.inc
+connection slave;
+include/sync_with_master_gtid.inc
+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 master;
+include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_parallel_optimistic_xa_lsu_off.result b/mysql-test/suite/rpl/r/rpl_parallel_optimistic_xa_lsu_off.result
new file mode 100644
index 00000000000..4136f1885db
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_parallel_optimistic_xa_lsu_off.result
@@ -0,0 +1,51 @@
+include/master-slave.inc
+[connection master]
+call mtr.add_suppression("Deadlock found when trying to get lock; try restarting transaction");
+call mtr.add_suppression("WSREP: handlerton rollback failed");
+CREATE VIEW v_processlist as SELECT * FROM performance_schema.threads where type = 'FOREGROUND';
+connection master;
+ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+connection slave;
+include/stop_slave.inc
+SET @old_parallel_threads = @@GLOBAL.slave_parallel_threads;
+SET @@global.slave_parallel_threads = 7;
+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;
+CHANGE MASTER TO master_use_gtid=slave_pos;
+connection master;
+CREATE TABLE t0 (a int, b INT) ENGINE=InnoDB;
+CREATE TABLE t1 (a int PRIMARY KEY, b INT) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1, 0);
+include/save_master_gtid.inc
+connection slave;
+include/start_slave.inc
+include/sync_with_master_gtid.inc
+include/stop_slave.inc
+connection master;
+include/save_master_gtid.inc
+connection slave;
+include/start_slave.inc
+include/sync_with_master_gtid.inc
+include/diff_tables.inc [master:t0, slave:t0]
+include/diff_tables.inc [master:t1, slave:t1]
+connection slave;
+include/stop_slave.inc
+set global log_warnings=default;
+SET GLOBAL slave_parallel_mode=@old_parallel_mode;
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+include/start_slave.inc
+connection master;
+DROP VIEW v_processlist;
+DROP TABLE t0, t1;
+include/save_master_gtid.inc
+connection slave;
+include/sync_with_master_gtid.inc
+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 master;
+include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_parallel_partial_binlog_trans.result b/mysql-test/suite/rpl/r/rpl_parallel_partial_binlog_trans.result
new file mode 100644
index 00000000000..ab1cac692a0
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_parallel_partial_binlog_trans.result
@@ -0,0 +1,51 @@
+*** MDEV_6435: Incorrect error handling when query binlogged partially on master with "killed" error ***
+include/master-slave.inc
+[connection master]
+connection server_2;
+include/stop_slave.inc
+SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
+SET GLOBAL slave_parallel_threads=1;
+CHANGE MASTER TO master_use_gtid=slave_pos;
+include/start_slave.inc
+connection server_1;
+ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+CREATE TABLE t6 (a INT) ENGINE=MyISAM;
+CREATE TRIGGER tr AFTER INSERT ON t6 FOR EACH ROW SET @a = 1;
+connect con1,127.0.0.1,root,,test,$SERVER_MYPORT_1,;
+connection con1;
+SET debug_sync='sp_head_execute_before_loop SIGNAL ready WAIT_FOR cont';
+INSERT INTO t6 VALUES (1), (2), (3);
+connection server_1;
+SET debug_sync='now WAIT_FOR ready';
+KILL QUERY CONID;
+SET debug_sync='now SIGNAL cont';
+connection con1;
+ERROR 70100: Query execution was interrupted
+SET debug_sync='RESET';
+connection server_1;
+SET debug_sync='RESET';
+connection server_2;
+include/wait_for_slave_sql_error.inc [errno=1317]
+STOP SLAVE IO_THREAD;
+SET GLOBAL gtid_slave_pos= 'AFTER_ERROR_GTID_POS';
+include/start_slave.inc
+connection server_1;
+INSERT INTO t6 VALUES (4);
+SELECT * FROM t6 ORDER BY a;
+a
+1
+4
+connection server_2;
+SELECT * FROM t6 ORDER BY a;
+a
+4
+connection server_2;
+include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+include/start_slave.inc
+SET DEBUG_SYNC= 'RESET';
+connection server_1;
+DROP TABLE t6;
+SET DEBUG_SYNC= 'RESET';
+disconnect con1;
+include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_parallel_record_gtid_wakeup.result b/mysql-test/suite/rpl/r/rpl_parallel_record_gtid_wakeup.result
new file mode 100644
index 00000000000..cbe53e4f623
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_parallel_record_gtid_wakeup.result
@@ -0,0 +1,48 @@
+*** MDEV-7929: record_gtid() for non-transactional event group calls wakeup_subsequent_commits() too early, causing slave hang. ***
+include/master-slave.inc
+[connection master]
+connection server_2;
+SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
+include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=10;
+CHANGE MASTER TO master_use_gtid=slave_pos;
+include/start_slave.inc
+connection server_1;
+ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+CREATE TABLE t1 (a int PRIMARY KEY) ENGINE=MyISAM;
+CREATE TABLE t3 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB;
+connection server_2;
+include/stop_slave.inc
+SET @old_dbug= @@GLOBAL.debug_dbug;
+SET GLOBAL debug_dbug= '+d,inject_record_gtid_serverid_100_sleep';
+connection server_1;
+SET @old_dbug= @@SESSION.debug_dbug;
+SET SESSION debug_dbug="+d,binlog_force_commit_id";
+SET @old_server_id= @@SESSION.server_id;
+SET SESSION server_id= 100;
+SET @commit_id= 10010;
+ALTER TABLE t1 COMMENT "Hulubulu!";
+SET SESSION server_id= @old_server_id;
+INSERT INTO t3 VALUES (130, 0);
+SET @commit_id= 10011;
+INSERT INTO t3 VALUES (131, 0);
+SET SESSION debug_dbug=@old_dbug;
+SELECT * FROM t3 WHERE a >= 130 ORDER BY a;
+a b
+130 0
+131 0
+include/save_master_gtid.inc
+connection server_2;
+include/start_slave.inc
+include/sync_with_master_gtid.inc
+SELECT * FROM t3 WHERE a >= 130 ORDER BY a;
+a b
+130 0
+131 0
+include/stop_slave.inc
+SET GLOBAL debug_dbug= @old_dbug;
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+include/start_slave.inc
+connection server_1;
+DROP TABLE t1,t3;
+include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_parallel_retry_deadlock.result b/mysql-test/suite/rpl/r/rpl_parallel_retry_deadlock.result
new file mode 100644
index 00000000000..1f5a23db848
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_parallel_retry_deadlock.result
@@ -0,0 +1,192 @@
+*** MDEV-7326 Server deadlock in connection with parallel replication ***
+include/master-slave.inc
+[connection master]
+connection server_2;
+SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
+SET @old_parallel_mode=@@GLOBAL.slave_parallel_mode;
+include/stop_slave.inc
+SET GLOBAL slave_parallel_mode='conservative';
+SET GLOBAL slave_parallel_threads=10;
+CHANGE MASTER TO master_use_gtid=slave_pos;
+include/start_slave.inc
+connection server_1;
+ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+CREATE TABLE t1 (a int PRIMARY KEY) ENGINE=MyISAM;
+CREATE TABLE t2 (a int PRIMARY KEY) ENGINE=InnoDB;
+CREATE TABLE t6 (a INT) ENGINE=MyISAM;
+connection server_2;
+connection server_1;
+SET sql_log_bin=0;
+CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
+RETURNS INT DETERMINISTIC
+BEGIN
+RETURN x;
+END
+||
+SET sql_log_bin=1;
+connection server_2;
+SET sql_log_bin=0;
+CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
+RETURNS INT DETERMINISTIC
+BEGIN
+IF d1 != '' THEN
+SET debug_sync = d1;
+END IF;
+IF d2 != '' THEN
+SET debug_sync = d2;
+END IF;
+RETURN x;
+END
+||
+SET sql_log_bin=1;
+connection server_2;
+include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=0;
+SET GLOBAL slave_parallel_threads=3;
+SET GLOBAL debug_dbug="+d,rpl_parallel_simulate_temp_err_xid";
+include/start_slave.inc
+connection server_1;
+SET @old_format= @@SESSION.binlog_format;
+SET binlog_format= STATEMENT;
+INSERT INTO t1 VALUES (foo(50,
+"rpl_parallel_start_waiting_for_prior SIGNAL t3_ready",
+"rpl_parallel_end_of_group SIGNAL prep_ready WAIT_FOR prep_cont"));
+connection server_2;
+SET DEBUG_SYNC= "now WAIT_FOR prep_ready";
+connection server_1;
+INSERT INTO t2 VALUES (foo(50,
+"rpl_parallel_simulate_temp_err_xid SIGNAL t1_ready1 WAIT_FOR t1_cont1",
+"rpl_parallel_retry_after_unmark SIGNAL t1_ready2 WAIT_FOR t1_cont2"));
+connection server_2;
+SET DEBUG_SYNC= "now WAIT_FOR t1_ready1";
+connection server_1;
+INSERT INTO t1 VALUES (foo(51,
+"rpl_parallel_before_mark_start_commit SIGNAL t2_ready1 WAIT_FOR t2_cont1",
+"rpl_parallel_after_mark_start_commit SIGNAL t2_ready2"));
+connection server_2;
+SET DEBUG_SYNC= "now WAIT_FOR t2_ready1";
+SET DEBUG_SYNC= "now SIGNAL t1_cont1";
+SET DEBUG_SYNC= "now WAIT_FOR t1_ready2";
+connection server_1;
+INSERT INTO t1 VALUES (52);
+SET BINLOG_FORMAT= @old_format;
+SELECT * FROM t2 WHERE a>=50 ORDER BY a;
+a
+50
+SELECT * FROM t1 WHERE a>=50 ORDER BY a;
+a
+50
+51
+52
+connection server_2;
+SET DEBUG_SYNC= "now SIGNAL prep_cont";
+SET DEBUG_SYNC= "now WAIT_FOR t3_ready";
+SET DEBUG_SYNC= "now SIGNAL t2_cont1";
+SET DEBUG_SYNC= "now WAIT_FOR t2_ready2";
+SET DEBUG_SYNC= "now SIGNAL t1_cont2";
+connection server_1;
+connection server_2;
+SELECT * FROM t2 WHERE a>=50 ORDER BY a;
+a
+50
+SELECT * FROM t1 WHERE a>=50 ORDER BY a;
+a
+50
+51
+52
+SET DEBUG_SYNC="reset";
+include/stop_slave.inc
+SET GLOBAL debug_dbug=@old_dbug;
+SET GLOBAL slave_parallel_mode=@old_parallel_mode;
+SET GLOBAL slave_parallel_threads=0;
+SET GLOBAL slave_parallel_threads=10;
+include/start_slave.inc
+*** MDEV-7326 Server deadlock in connection with parallel replication ***
+connect con_temp3,127.0.0.1,root,,test,$SERVER_MYPORT_1,;
+connect con_temp4,127.0.0.1,root,,test,$SERVER_MYPORT_1,;
+connection server_2;
+include/stop_slave.inc
+SET @old_parallel_mode= @@GLOBAL.slave_parallel_mode;
+SET GLOBAL slave_parallel_mode='conservative';
+SET GLOBAL slave_parallel_threads=0;
+SET GLOBAL slave_parallel_threads=3;
+SET GLOBAL debug_dbug="+d,rpl_parallel_simulate_temp_err_xid";
+include/start_slave.inc
+connection server_1;
+SET @old_format= @@SESSION.binlog_format;
+SET binlog_format= STATEMENT;
+INSERT INTO t1 VALUES (foo(60,
+"rpl_parallel_start_waiting_for_prior SIGNAL t3_ready",
+"rpl_parallel_end_of_group SIGNAL prep_ready WAIT_FOR prep_cont"));
+connection server_2;
+SET DEBUG_SYNC= "now WAIT_FOR prep_ready";
+connection server_1;
+INSERT INTO t2 VALUES (foo(60,
+"rpl_parallel_simulate_temp_err_xid SIGNAL t1_ready1 WAIT_FOR t1_cont1",
+"rpl_parallel_retry_after_unmark SIGNAL t1_ready2 WAIT_FOR t1_cont2"));
+connection server_2;
+SET DEBUG_SYNC= "now WAIT_FOR t1_ready1";
+connection con_temp3;
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1';
+SET binlog_format=statement;
+INSERT INTO t1 VALUES (foo(61,
+"rpl_parallel_before_mark_start_commit SIGNAL t2_ready1 WAIT_FOR t2_cont1",
+"rpl_parallel_after_mark_start_commit SIGNAL t2_ready2"));
+connection server_1;
+SET debug_sync='now WAIT_FOR master_queued1';
+connection con_temp4;
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2';
+INSERT INTO t6 VALUES (62);
+connection server_1;
+SET debug_sync='now WAIT_FOR master_queued2';
+SET debug_sync='now SIGNAL master_cont1';
+connection con_temp3;
+connection con_temp4;
+connection server_1;
+SET debug_sync='RESET';
+SET BINLOG_FORMAT= @old_format;
+SELECT * FROM t2 WHERE a>=60 ORDER BY a;
+a
+60
+SELECT * FROM t1 WHERE a>=60 ORDER BY a;
+a
+60
+61
+SELECT * FROM t6 WHERE a>=60 ORDER BY a;
+a
+62
+connection server_2;
+SET DEBUG_SYNC= "now WAIT_FOR t2_ready1";
+SET DEBUG_SYNC= "now SIGNAL t1_cont1";
+SET DEBUG_SYNC= "now WAIT_FOR t1_ready2";
+connection server_2;
+SET DEBUG_SYNC= "now SIGNAL prep_cont";
+SET DEBUG_SYNC= "now WAIT_FOR t3_ready";
+SET DEBUG_SYNC= "now SIGNAL t2_cont1";
+SET DEBUG_SYNC= "now WAIT_FOR t2_ready2";
+SET DEBUG_SYNC= "now SIGNAL t1_cont2";
+connection server_1;
+connection server_2;
+SELECT * FROM t2 WHERE a>=60 ORDER BY a;
+a
+60
+SELECT * FROM t1 WHERE a>=60 ORDER BY a;
+a
+60
+61
+SELECT * FROM t6 WHERE a>=60 ORDER BY a;
+a
+62
+SET DEBUG_SYNC="reset";
+include/stop_slave.inc
+SET GLOBAL debug_dbug=@old_dbug;
+SET GLOBAL slave_parallel_mode=@old_parallel_mode;
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+include/start_slave.inc
+connection server_1;
+DROP function foo;
+DROP TABLE t1,t2,t6;
+disconnect con_temp3;
+disconnect con_temp4;
+SET DEBUG_SYNC= 'RESET';
+include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_parallel_rollback_assert.result b/mysql-test/suite/rpl/r/rpl_parallel_rollback_assert.result
new file mode 100644
index 00000000000..af9c5f14687
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_parallel_rollback_assert.result
@@ -0,0 +1,45 @@
+*** MDEV-8725: Assertion on ROLLBACK statement in the binary log ***
+include/master-slave.inc
+[connection master]
+connection server_2;
+SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
+include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=10;
+CHANGE MASTER TO master_use_gtid=slave_pos;
+include/start_slave.inc
+connection server_1;
+ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+CREATE TABLE t1 (a int PRIMARY KEY) ENGINE=MyISAM;
+CREATE TABLE t2 (a int PRIMARY KEY) ENGINE=InnoDB;
+connection server_2;
+connection server_1;
+BEGIN;
+INSERT INTO t2 VALUES (2000);
+INSERT INTO t1 VALUES (2000);
+INSERT INTO t2 VALUES (2001);
+ROLLBACK;
+SELECT * FROM t1 WHERE a>=2000 ORDER BY a;
+a
+2000
+SELECT * FROM t2 WHERE a>=2000 ORDER BY a;
+a
+include/save_master_gtid.inc
+connection server_2;
+include/sync_with_master_gtid.inc
+connection server_1;
+INSERT INTO t2 VALUES (2020);
+include/save_master_gtid.inc
+connection server_2;
+include/sync_with_master_gtid.inc
+SELECT * FROM t2 WHERE a>=2000 ORDER BY a;
+a
+2020
+SELECT * FROM t1 WHERE a>=2000 ORDER BY a;
+a
+2000
+include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+include/start_slave.inc
+connection server_1;
+DROP TABLE t1,t2;
+include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_parallel_single_grpcmt.result b/mysql-test/suite/rpl/r/rpl_parallel_single_grpcmt.result
new file mode 100644
index 00000000000..18ffac4fa5d
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_parallel_single_grpcmt.result
@@ -0,0 +1,160 @@
+*** Test that group-committed transactions on the master can replicate in parallel on the slave. ***
+include/master-slave.inc
+[connection master]
+connection server_1;
+SET sql_log_bin=0;
+CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
+RETURNS INT DETERMINISTIC
+BEGIN
+RETURN x;
+END
+||
+SET sql_log_bin=1;
+connection server_2;
+include/stop_slave.inc
+SET sql_log_bin=0;
+CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
+RETURNS INT DETERMINISTIC
+BEGIN
+IF d1 != '' THEN
+SET debug_sync = d1;
+END IF;
+IF d2 != '' THEN
+SET debug_sync = d2;
+END IF;
+RETURN x;
+END
+||
+SET sql_log_bin=1;
+SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
+SET GLOBAL slave_parallel_threads=10;
+CHANGE MASTER TO master_use_gtid=slave_pos;
+include/start_slave.inc
+connection server_1;
+ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+CREATE TABLE t3 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB;
+INSERT INTO t3 VALUES (1,1), (3,3), (5,5), (7,7);
+connection server_2;
+connect con_temp1,127.0.0.1,root,,test,$SERVER_MYPORT_2,;
+BEGIN;
+INSERT INTO t3 VALUES (2,102);
+connect con_temp2,127.0.0.1,root,,test,$SERVER_MYPORT_2,;
+BEGIN;
+INSERT INTO t3 VALUES (4,104);
+connect con_temp3,127.0.0.1,root,,test,$SERVER_MYPORT_1,;
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1';
+SET binlog_format=statement;
+INSERT INTO t3 VALUES (2, foo(12,
+'commit_after_release_LOCK_prepare_ordered SIGNAL slave_queued1 WAIT_FOR slave_cont1',
+''));
+connection server_1;
+SET debug_sync='now WAIT_FOR master_queued1';
+connect con_temp4,127.0.0.1,root,,test,$SERVER_MYPORT_1,;
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2';
+SET binlog_format=statement;
+INSERT INTO t3 VALUES (4, foo(14,
+'commit_after_release_LOCK_prepare_ordered SIGNAL slave_queued2',
+''));
+connection server_1;
+SET debug_sync='now WAIT_FOR master_queued2';
+connect con_temp5,127.0.0.1,root,,test,$SERVER_MYPORT_1,;
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued3';
+SET binlog_format=statement;
+INSERT INTO t3 VALUES (6, foo(16,
+'group_commit_waiting_for_prior SIGNAL slave_queued3',
+''));
+connection server_1;
+SET debug_sync='now WAIT_FOR master_queued3';
+SET debug_sync='now SIGNAL master_cont1';
+connection con_temp3;
+connection con_temp4;
+connection con_temp5;
+SET debug_sync='RESET';
+connection server_1;
+SELECT * FROM t3 ORDER BY a;
+a b
+1 1
+2 12
+3 3
+4 14
+5 5
+6 16
+7 7
+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`; ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # use `test`; CREATE TABLE t3 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB
+master-bin.000001 # Gtid # # BEGIN GTID #-#-#
+master-bin.000001 # Query # # use `test`; INSERT INTO t3 VALUES (1,1), (3,3), (5,5), (7,7)
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Gtid # # BEGIN GTID #-#-# cid=#
+master-bin.000001 # Query # # use `test`; INSERT INTO t3 VALUES (2, foo(12,
+'commit_after_release_LOCK_prepare_ordered SIGNAL slave_queued1 WAIT_FOR slave_cont1',
+''))
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Gtid # # BEGIN GTID #-#-# cid=#
+master-bin.000001 # Query # # use `test`; INSERT INTO t3 VALUES (4, foo(14,
+'commit_after_release_LOCK_prepare_ordered SIGNAL slave_queued2',
+''))
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Gtid # # BEGIN GTID #-#-# cid=#
+master-bin.000001 # Query # # use `test`; INSERT INTO t3 VALUES (6, foo(16,
+'group_commit_waiting_for_prior SIGNAL slave_queued3',
+''))
+master-bin.000001 # Xid # # COMMIT /* XID */
+connection server_2;
+SET debug_sync='now WAIT_FOR slave_queued3';
+connection con_temp1;
+ROLLBACK;
+connection server_2;
+SET debug_sync='now WAIT_FOR slave_queued1';
+connection con_temp2;
+ROLLBACK;
+connection server_2;
+SET debug_sync='now WAIT_FOR slave_queued2';
+SET debug_sync='now SIGNAL slave_cont1';
+SELECT * FROM t3 ORDER BY a;
+a b
+1 1
+2 12
+3 3
+4 14
+5 5
+6 16
+7 7
+include/show_binlog_events.inc
+Log_name Pos Event_type Server_id End_log_pos Info
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `test`; ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `test`; CREATE TABLE t3 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB
+slave-bin.000001 # Gtid # # BEGIN GTID #-#-#
+slave-bin.000001 # Query # # use `test`; INSERT INTO t3 VALUES (1,1), (3,3), (5,5), (7,7)
+slave-bin.000001 # Xid # # COMMIT /* XID */
+slave-bin.000001 # Gtid # # BEGIN GTID #-#-# cid=#
+slave-bin.000001 # Query # # use `test`; INSERT INTO t3 VALUES (2, foo(12,
+'commit_after_release_LOCK_prepare_ordered SIGNAL slave_queued1 WAIT_FOR slave_cont1',
+''))
+slave-bin.000001 # Xid # # COMMIT /* XID */
+slave-bin.000001 # Gtid # # BEGIN GTID #-#-# cid=#
+slave-bin.000001 # Query # # use `test`; INSERT INTO t3 VALUES (4, foo(14,
+'commit_after_release_LOCK_prepare_ordered SIGNAL slave_queued2',
+''))
+slave-bin.000001 # Xid # # COMMIT /* XID */
+slave-bin.000001 # Gtid # # BEGIN GTID #-#-# cid=#
+slave-bin.000001 # Query # # use `test`; INSERT INTO t3 VALUES (6, foo(16,
+'group_commit_waiting_for_prior SIGNAL slave_queued3',
+''))
+slave-bin.000001 # Xid # # COMMIT /* XID */
+connection server_2;
+include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+include/start_slave.inc
+SET DEBUG_SYNC= 'RESET';
+connection server_1;
+DROP function foo;
+DROP TABLE t3;
+SET DEBUG_SYNC= 'RESET';
+include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_parallel_slave_bgc_kill.result b/mysql-test/suite/rpl/r/rpl_parallel_slave_bgc_kill.result
new file mode 100644
index 00000000000..320bf0e49f8
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_parallel_slave_bgc_kill.result
@@ -0,0 +1,323 @@
+*** Test killing slave threads at various wait points ***
+include/master-slave.inc
+[connection master]
+connection server_2;
+SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
+SET @old_parallel_mode=@@GLOBAL.slave_parallel_mode;
+include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=10;
+SET GLOBAL slave_parallel_mode='conservative';
+CHANGE MASTER TO master_use_gtid=slave_pos;
+include/start_slave.inc
+connection server_1;
+connect con_temp3,127.0.0.1,root,,test,$SERVER_MYPORT_1,;
+connect con_temp4,127.0.0.1,root,,test,$SERVER_MYPORT_1,;
+connect con_temp5,127.0.0.1,root,,test,$SERVER_MYPORT_1,;
+ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+CREATE TABLE t1 (a int PRIMARY KEY) ENGINE=MyISAM;
+CREATE TABLE t2 (a int PRIMARY KEY) ENGINE=InnoDB;
+CREATE TABLE t3 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB;
+connection server_2;
+connection server_1;
+SET sql_log_bin=0;
+CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
+RETURNS INT DETERMINISTIC
+BEGIN
+RETURN x;
+END
+||
+SET sql_log_bin=1;
+connection server_2;
+SET sql_log_bin=0;
+CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
+RETURNS INT DETERMINISTIC
+BEGIN
+IF d1 != '' THEN
+SET debug_sync = d1;
+END IF;
+IF d2 != '' THEN
+SET debug_sync = d2;
+END IF;
+RETURN x;
+END
+||
+SET sql_log_bin=1;
+*** 1. Test killing transaction waiting in commit for previous transaction to commit ***
+connection con_temp3;
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1';
+INSERT INTO t3 VALUES (31, foo(31,
+'commit_before_prepare_ordered WAIT_FOR t2_waiting',
+'commit_after_prepare_ordered SIGNAL t1_ready WAIT_FOR t1_cont'));
+connection server_1;
+SET debug_sync='now WAIT_FOR master_queued1';
+connection con_temp4;
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2';
+BEGIN;
+INSERT INTO t3 VALUES (32, foo(32,
+'ha_write_row_end SIGNAL t2_query WAIT_FOR t2_cont',
+''));
+INSERT INTO t3 VALUES (33, foo(33,
+'group_commit_waiting_for_prior SIGNAL t2_waiting',
+'group_commit_waiting_for_prior_killed SIGNAL t2_killed'));
+COMMIT;
+connection server_1;
+SET debug_sync='now WAIT_FOR master_queued2';
+connection con_temp5;
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued3';
+INSERT INTO t3 VALUES (34, foo(34,
+'',
+''));
+connection server_1;
+SET debug_sync='now WAIT_FOR master_queued3';
+SET debug_sync='now SIGNAL master_cont1';
+connection con_temp3;
+connection con_temp4;
+connection con_temp5;
+connection server_1;
+SELECT * FROM t3 WHERE a >= 30 ORDER BY a;
+a b
+31 31
+32 32
+33 33
+34 34
+SET debug_sync='RESET';
+connection server_2;
+SET sql_log_bin=0;
+CALL mtr.add_suppression("Query execution was interrupted");
+CALL mtr.add_suppression("Commit failed due to failure of an earlier commit on which this one depends");
+CALL mtr.add_suppression("Slave: Connection was killed");
+SET sql_log_bin=1;
+SET debug_sync='now WAIT_FOR t2_query';
+SET debug_sync='now SIGNAL t2_cont';
+SET debug_sync='now WAIT_FOR t1_ready';
+KILL THD_ID;
+SET debug_sync='now WAIT_FOR t2_killed';
+SET debug_sync='now SIGNAL t1_cont';
+include/wait_for_slave_sql_error.inc [errno=1317,1927,1964]
+STOP SLAVE IO_THREAD;
+SELECT * FROM t3 WHERE a >= 30 ORDER BY a;
+a b
+31 31
+SET debug_sync='RESET';
+SET GLOBAL slave_parallel_threads=0;
+SET GLOBAL slave_parallel_threads=10;
+SET sql_log_bin=0;
+DROP FUNCTION foo;
+CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
+RETURNS INT DETERMINISTIC
+BEGIN
+RETURN x;
+END
+||
+SET sql_log_bin=1;
+connection server_1;
+INSERT INTO t3 VALUES (39,0);
+connection server_2;
+include/start_slave.inc
+SELECT * FROM t3 WHERE a >= 30 ORDER BY a;
+a b
+31 31
+32 32
+33 33
+34 34
+39 0
+SET sql_log_bin=0;
+DROP FUNCTION foo;
+CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
+RETURNS INT DETERMINISTIC
+BEGIN
+IF d1 != '' THEN
+SET debug_sync = d1;
+END IF;
+IF d2 != '' THEN
+SET debug_sync = d2;
+END IF;
+RETURN x;
+END
+||
+SET sql_log_bin=1;
+connection server_2;
+include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=0;
+SET GLOBAL slave_parallel_threads=10;
+include/start_slave.inc
+*** 2. Same as (1), but without restarting IO thread after kill of SQL threads ***
+connection con_temp3;
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1';
+INSERT INTO t3 VALUES (41, foo(41,
+'commit_before_prepare_ordered WAIT_FOR t2_waiting',
+'commit_after_prepare_ordered SIGNAL t1_ready WAIT_FOR t1_cont'));
+connection server_1;
+SET debug_sync='now WAIT_FOR master_queued1';
+connection con_temp4;
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2';
+BEGIN;
+INSERT INTO t3 VALUES (42, foo(42,
+'ha_write_row_end SIGNAL t2_query WAIT_FOR t2_cont',
+''));
+INSERT INTO t3 VALUES (43, foo(43,
+'group_commit_waiting_for_prior SIGNAL t2_waiting',
+'group_commit_waiting_for_prior_killed SIGNAL t2_killed'));
+COMMIT;
+connection server_1;
+SET debug_sync='now WAIT_FOR master_queued2';
+connection con_temp5;
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued3';
+INSERT INTO t3 VALUES (44, foo(44,
+'',
+''));
+connection server_1;
+SET debug_sync='now WAIT_FOR master_queued3';
+SET debug_sync='now SIGNAL master_cont1';
+connection con_temp3;
+connection con_temp4;
+connection con_temp5;
+connection server_1;
+SELECT * FROM t3 WHERE a >= 40 ORDER BY a;
+a b
+41 41
+42 42
+43 43
+44 44
+SET debug_sync='RESET';
+connection server_2;
+SET debug_sync='now WAIT_FOR t2_query';
+SET debug_sync='now SIGNAL t2_cont';
+SET debug_sync='now WAIT_FOR t1_ready';
+KILL THD_ID;
+SET debug_sync='now WAIT_FOR t2_killed';
+SET debug_sync='now SIGNAL t1_cont';
+include/wait_for_slave_sql_error.inc [errno=1317,1927,1964]
+SET debug_sync='RESET';
+SET GLOBAL slave_parallel_threads=0;
+SET GLOBAL slave_parallel_threads=10;
+SET sql_log_bin=0;
+DROP FUNCTION foo;
+CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
+RETURNS INT DETERMINISTIC
+BEGIN
+RETURN x;
+END
+||
+SET sql_log_bin=1;
+connection server_1;
+INSERT INTO t3 VALUES (49,0);
+connection server_2;
+START SLAVE SQL_THREAD;
+SELECT * FROM t3 WHERE a >= 40 ORDER BY a;
+a b
+41 41
+42 42
+43 43
+44 44
+49 0
+SET sql_log_bin=0;
+DROP FUNCTION foo;
+CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
+RETURNS INT DETERMINISTIC
+BEGIN
+IF d1 != '' THEN
+SET debug_sync = d1;
+END IF;
+IF d2 != '' THEN
+SET debug_sync = d2;
+END IF;
+RETURN x;
+END
+||
+SET sql_log_bin=1;
+connection server_2;
+include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=0;
+SET GLOBAL slave_parallel_threads=10;
+include/start_slave.inc
+*** 3. Same as (2), but not using gtid mode ***
+connection server_2;
+include/stop_slave.inc
+CHANGE MASTER TO master_use_gtid=no;
+include/start_slave.inc
+connection server_1;
+connection con_temp3;
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1';
+INSERT INTO t3 VALUES (51, foo(51,
+'commit_before_prepare_ordered WAIT_FOR t2_waiting',
+'commit_after_prepare_ordered SIGNAL t1_ready WAIT_FOR t1_cont'));
+connection server_1;
+SET debug_sync='now WAIT_FOR master_queued1';
+connection con_temp4;
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2';
+BEGIN;
+INSERT INTO t3 VALUES (52, foo(52,
+'ha_write_row_end SIGNAL t2_query WAIT_FOR t2_cont',
+''));
+INSERT INTO t3 VALUES (53, foo(53,
+'group_commit_waiting_for_prior SIGNAL t2_waiting',
+'group_commit_waiting_for_prior_killed SIGNAL t2_killed'));
+COMMIT;
+connection server_1;
+SET debug_sync='now WAIT_FOR master_queued2';
+connection con_temp5;
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued3';
+INSERT INTO t3 VALUES (54, foo(54,
+'',
+''));
+connection server_1;
+SET debug_sync='now WAIT_FOR master_queued3';
+SET debug_sync='now SIGNAL master_cont1';
+connection con_temp3;
+connection con_temp4;
+connection con_temp5;
+connection server_1;
+SELECT * FROM t3 WHERE a >= 50 ORDER BY a;
+a b
+51 51
+52 52
+53 53
+54 54
+SET debug_sync='RESET';
+connection server_2;
+SET debug_sync='now WAIT_FOR t2_query';
+SET debug_sync='now SIGNAL t2_cont';
+SET debug_sync='now WAIT_FOR t1_ready';
+KILL THD_ID;
+SET debug_sync='now WAIT_FOR t2_killed';
+SET debug_sync='now SIGNAL t1_cont';
+include/wait_for_slave_sql_error.inc [errno=1317,1927,1964]
+SELECT * FROM t3 WHERE a >= 50 ORDER BY a;
+a b
+51 51
+SET debug_sync='RESET';
+SET GLOBAL slave_parallel_threads=0;
+SET GLOBAL slave_parallel_threads=10;
+SET sql_log_bin=0;
+DROP FUNCTION foo;
+CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
+RETURNS INT DETERMINISTIC
+BEGIN
+RETURN x;
+END
+||
+SET sql_log_bin=1;
+connection server_1;
+INSERT INTO t3 VALUES (59,0);
+connection server_2;
+START SLAVE SQL_THREAD;
+SELECT * FROM t3 WHERE a >= 50 ORDER BY a;
+a b
+51 51
+52 52
+53 53
+54 54
+59 0
+connection server_2;
+include/stop_slave.inc
+CHANGE MASTER TO master_use_gtid=slave_pos;
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+SET GLOBAL slave_parallel_mode=@old_parallel_mode;
+include/start_slave.inc
+SET DEBUG_SYNC= 'RESET';
+connection server_1;
+DROP function foo;
+DROP TABLE t1,t2,t3;
+SET DEBUG_SYNC= 'RESET';
+include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_parallel_stop_on_con_kill.result b/mysql-test/suite/rpl/r/rpl_parallel_stop_on_con_kill.result
new file mode 100644
index 00000000000..bf0ed9e4374
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_parallel_stop_on_con_kill.result
@@ -0,0 +1,102 @@
+*** MDEV-8031: Parallel replication stops on "connection killed" error (probably incorrectly handled deadlock kill) ***
+include/master-slave.inc
+[connection master]
+connection server_2;
+SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
+include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=10;
+CHANGE MASTER TO master_use_gtid=slave_pos;
+include/start_slave.inc
+connection server_1;
+ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+CREATE TABLE t3 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB;
+INSERT INTO t3 VALUES (201,0), (202,0);
+include/save_master_gtid.inc
+connection server_2;
+include/sync_with_master_gtid.inc
+include/stop_slave.inc
+SET @old_dbug= @@GLOBAL.debug_dbug;
+SET GLOBAL debug_dbug= '+d,inject_mdev8031';
+connection server_1;
+SET @old_dbug= @@SESSION.debug_dbug;
+SET SESSION debug_dbug="+d,binlog_force_commit_id";
+SET @commit_id= 10200;
+INSERT INTO t3 VALUES (203, 1);
+INSERT INTO t3 VALUES (204, 1);
+INSERT INTO t3 VALUES (205, 1);
+UPDATE t3 SET b=b+1 WHERE a=201;
+UPDATE t3 SET b=b+1 WHERE a=201;
+UPDATE t3 SET b=b+1 WHERE a=201;
+UPDATE t3 SET b=b+1 WHERE a=202;
+UPDATE t3 SET b=b+1 WHERE a=202;
+UPDATE t3 SET b=b+1 WHERE a=202;
+UPDATE t3 SET b=b+1 WHERE a=202;
+UPDATE t3 SET b=b+1 WHERE a=203;
+UPDATE t3 SET b=b+1 WHERE a=203;
+UPDATE t3 SET b=b+1 WHERE a=204;
+UPDATE t3 SET b=b+1 WHERE a=204;
+UPDATE t3 SET b=b+1 WHERE a=204;
+UPDATE t3 SET b=b+1 WHERE a=203;
+UPDATE t3 SET b=b+1 WHERE a=205;
+UPDATE t3 SET b=b+1 WHERE a=205;
+SET SESSION debug_dbug=@old_dbug;
+SELECT * FROM t3 WHERE a>=200 ORDER BY a;
+a b
+201 3
+202 4
+203 4
+204 4
+205 3
+include/save_master_gtid.inc
+connection server_2;
+include/start_slave.inc
+include/sync_with_master_gtid.inc
+SELECT * FROM t3 WHERE a>=200 ORDER BY a;
+a b
+201 3
+202 4
+203 4
+204 4
+205 3
+include/stop_slave.inc
+SET GLOBAL debug_dbug= @old_dbug;
+include/start_slave.inc
+*** Check getting deadlock killed inside open_binlog() during retry. ***
+connection server_2;
+include/stop_slave.inc
+SET @old_dbug= @@GLOBAL.debug_dbug;
+SET GLOBAL debug_dbug= '+d,inject_retry_event_group_open_binlog_kill';
+SET @old_max= @@GLOBAL.max_relay_log_size;
+SET GLOBAL max_relay_log_size= 4096;
+connection server_1;
+SET @old_dbug= @@SESSION.debug_dbug;
+SET SESSION debug_dbug="+d,binlog_force_commit_id";
+SET @commit_id= 10210;
+Omit long queries that cause relaylog rotations and transaction retries...
+SET SESSION debug_dbug=@old_dbug;
+SELECT * FROM t3 WHERE a>=200 ORDER BY a;
+a b
+201 6
+202 8
+203 7
+204 7
+205 5
+include/save_master_gtid.inc
+connection server_2;
+include/start_slave.inc
+include/sync_with_master_gtid.inc
+SELECT * FROM t3 WHERE a>=200 ORDER BY a;
+a b
+201 6
+202 8
+203 7
+204 7
+205 5
+include/stop_slave.inc
+SET GLOBAL debug_dbug= @old_debg;
+SET GLOBAL max_relay_log_size= @old_max;
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+include/start_slave.inc
+connection server_1;
+DROP TABLE t3;
+include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_parallel_stop_slave.result b/mysql-test/suite/rpl/r/rpl_parallel_stop_slave.result
new file mode 100644
index 00000000000..6c9fd168e73
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_parallel_stop_slave.result
@@ -0,0 +1,85 @@
+*** Test STOP SLAVE in parallel mode ***
+include/master-slave.inc
+[connection master]
+connection server_2;
+SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
+SET @old_parallel_mode=@@GLOBAL.slave_parallel_mode;
+include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=10;
+SET GLOBAL slave_parallel_mode='conservative';
+CHANGE MASTER TO master_use_gtid=slave_pos;
+include/start_slave.inc
+connect con_temp1,127.0.0.1,root,,test,$SERVER_MYPORT_2,;
+connect con_temp2,127.0.0.1,root,,test,$SERVER_MYPORT_2,;
+connection server_1;
+ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+CREATE TABLE t1 (a int PRIMARY KEY) ENGINE=MyISAM;
+CREATE TABLE t2 (a int PRIMARY KEY) ENGINE=InnoDB;
+CREATE TABLE t3 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB;
+connection server_2;
+include/stop_slave.inc
+connection server_1;
+SET binlog_direct_non_transactional_updates=0;
+SET sql_log_bin=0;
+CALL mtr.add_suppression("Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction");
+SET sql_log_bin=1;
+BEGIN;
+INSERT INTO t2 VALUES (20);
+INSERT INTO t1 VALUES (20);
+INSERT INTO t2 VALUES (21);
+INSERT INTO t3 VALUES (20, 20);
+COMMIT;
+INSERT INTO t3 VALUES(21, 21);
+INSERT INTO t3 VALUES(22, 22);
+connection con_temp1;
+BEGIN;
+INSERT INTO t2 VALUES (21);
+connection server_2;
+START SLAVE;
+connection con_temp2;
+SET @old_dbug= @@GLOBAL.debug_dbug;
+SET GLOBAL debug_dbug="+d,rpl_parallel_wait_for_done_trigger";
+STOP SLAVE;
+connection con_temp1;
+SET debug_sync='now WAIT_FOR wait_for_done_waiting';
+ROLLBACK;
+connection con_temp2;
+SET GLOBAL debug_dbug=@old_dbug;
+SET debug_sync='RESET';
+connection server_2;
+include/wait_for_slave_to_stop.inc
+SELECT * FROM t1 WHERE a >= 20 ORDER BY a;
+a
+20
+SELECT * FROM t2 WHERE a >= 20 ORDER BY a;
+a
+20
+21
+SELECT * FROM t3 WHERE a >= 20 ORDER BY a;
+a b
+20 20
+include/start_slave.inc
+SELECT * FROM t1 WHERE a >= 20 ORDER BY a;
+a
+20
+SELECT * FROM t2 WHERE a >= 20 ORDER BY a;
+a
+20
+21
+SELECT * FROM t3 WHERE a >= 20 ORDER BY a;
+a b
+20 20
+21 21
+22 22
+connection server_2;
+include/stop_slave.inc
+SET GLOBAL slave_parallel_mode=@old_parallel_mode;
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+include/start_slave.inc
+SET DEBUG_SYNC= 'RESET';
+disconnect con_temp1;
+disconnect con_temp2;
+connection server_1;
+DROP TABLE t1,t2,t3;
+SET DEBUG_SYNC= 'RESET';
+include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_parallel_wrong_binlog_order.result b/mysql-test/suite/rpl/r/rpl_parallel_wrong_binlog_order.result
new file mode 100644
index 00000000000..f6781f64d30
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_parallel_wrong_binlog_order.result
@@ -0,0 +1,75 @@
+*** MDEV-6775: Wrong binlog order in parallel replication ***
+include/master-slave.inc
+[connection master]
+connection server_2;
+SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
+include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=10;
+CHANGE MASTER TO master_use_gtid=slave_pos;
+include/start_slave.inc
+connection server_1;
+ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+CREATE TABLE t4 (a INT PRIMARY KEY, b INT, KEY b_idx(b)) ENGINE=InnoDB;
+INSERT INTO t4 VALUES (1,NULL), (3,NULL), (4,4), (5, NULL), (6, 6);
+connect con1,127.0.0.1,root,,test,$SERVER_MYPORT_1,;
+connect con2,127.0.0.1,root,,test,$SERVER_MYPORT_1,;
+include/save_master_gtid.inc
+connection server_2;
+include/sync_with_master_gtid.inc
+include/stop_slave.inc
+SET @old_dbug= @@GLOBAL.debug_dbug;
+SET GLOBAL debug_dbug="+d,inject_binlog_commit_before_get_LOCK_log";
+SET @old_format=@@GLOBAL.binlog_format;
+SET GLOBAL binlog_format=ROW;
+SET GLOBAL slave_parallel_threads=0;
+SET GLOBAL slave_parallel_threads=10;
+connection con1;
+SET @old_format= @@binlog_format;
+SET binlog_format= statement;
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1';
+UPDATE t4 SET b=NULL WHERE a=6;
+connection server_1;
+SET debug_sync='now WAIT_FOR master_queued1';
+connection con2;
+SET @old_format= @@binlog_format;
+SET binlog_format= statement;
+SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued2';
+DELETE FROM t4 WHERE b <= 3;
+connection server_1;
+SET debug_sync='now WAIT_FOR master_queued2';
+SET debug_sync='now SIGNAL master_cont1';
+connection con1;
+SET binlog_format= @old_format;
+connection con2;
+SET binlog_format= @old_format;
+SET debug_sync='RESET';
+SELECT * FROM t4 ORDER BY a;
+a b
+1 NULL
+3 NULL
+4 4
+5 NULL
+6 NULL
+connection server_2;
+include/start_slave.inc
+SET debug_sync= 'now WAIT_FOR waiting';
+SELECT * FROM t4 ORDER BY a;
+a b
+1 NULL
+3 NULL
+4 4
+5 NULL
+6 NULL
+SET debug_sync= 'now SIGNAL cont';
+include/stop_slave.inc
+SET GLOBAL debug_dbug=@old_dbug;
+SET GLOBAL binlog_format= @old_format;
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+include/start_slave.inc
+SET DEBUG_SYNC= 'RESET';
+connection server_1;
+DROP TABLE t4;
+SET DEBUG_SYNC= 'RESET';
+disconnect con1;
+disconnect con2;
+include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_parallel_wrong_exec_master_pos.result b/mysql-test/suite/rpl/r/rpl_parallel_wrong_exec_master_pos.result
new file mode 100644
index 00000000000..47cfa5e08e2
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_parallel_wrong_exec_master_pos.result
@@ -0,0 +1,34 @@
+*** MDEV-5938: Exec_master_log_pos not updated at log rotate in parallel replication ***
+include/master-slave.inc
+[connection master]
+connection server_2;
+include/stop_slave.inc
+SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
+SET GLOBAL slave_parallel_threads=1;
+CHANGE MASTER TO master_use_gtid=slave_pos;
+include/start_slave.inc
+connection server_1;
+ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+CREATE TABLE t5 (a INT PRIMARY KEY, b INT);
+INSERT INTO t5 VALUES (1,1);
+INSERT INTO t5 VALUES (2,2), (3,8);
+INSERT INTO t5 VALUES (4,16);
+connection server_2;
+test_check
+OK
+test_check
+OK
+connection server_1;
+FLUSH LOGS;
+connection server_2;
+test_check
+OK
+test_check
+OK
+connection server_2;
+include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+include/start_slave.inc
+connection server_1;
+DROP TABLE t5;
+include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_parallel_xa_same_xid.result b/mysql-test/suite/rpl/r/rpl_parallel_xa_same_xid.result
new file mode 100644
index 00000000000..03fe5157623
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_parallel_xa_same_xid.result
@@ -0,0 +1,23 @@
+include/master-slave.inc
+[connection master]
+connection slave;
+call mtr.add_suppression("WSREP: handlerton rollback failed");
+include/stop_slave.inc
+ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+SET @old_parallel_threads = @@GLOBAL.slave_parallel_threads;
+SET @old_parallel_mode = @@GLOBAL.slave_parallel_mode;
+SET @@global.slave_parallel_mode ='optimistic';
+include/start_slave.inc
+connection master;
+CREATE TABLE t1 (a INT, b INT) ENGINE=InnoDB;
+CREATE TABLE t2 (a INT AUTO_INCREMENT PRIMARY KEY, b INT) ENGINE=InnoDB;
+include/sync_slave_sql_with_master.inc
+include/diff_tables.inc [master:t1, slave:t1]
+connection slave;
+include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+SET GLOBAL slave_parallel_mode=@old_parallel_mode;
+include/start_slave.inc
+connection master;
+DROP TABLE t1, t2;
+include/rpl_end.inc
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
index 2ff34004702..3815ec9375d 100644
--- 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
@@ -1,31 +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
+--- /home/my/maria-test/mysql-test/suite/rpl/r/rpl_row_big_table_id.result 2019-08-18 15:19:56.829962449 +0300
++++ /home/my/maria-test/mysql-test/suite/rpl/r/rpl_row_big_table_id,32bit.reject 2019-08-18 15:20:19.253763968 +0300
+@@ -20,22 +20,22 @@
+ master-bin.000001 # Query 1 # use `test`; ALTER TABLE t comment ''
+ master-bin.000001 # Gtid 1 # BEGIN GTID #-#-#
+ master-bin.000001 # Annotate_rows 1 # INSERT INTO t SET a= 1
+-master-bin.000001 # Table_map 1 # table_id: 4294967295 (test.t)
+-master-bin.000001 # Write_rows_v1 1 # table_id: 4294967295 flags: STMT_END_F
++master-bin.000001 # Table_map 1 # table_id: 1 (test.t)
++master-bin.000001 # Write_rows_v1 1 # table_id: 1 flags: STMT_END_F
+ master-bin.000001 # Query 1 # COMMIT
+ master-bin.000001 # Gtid 1 # GTID #-#-#
+ master-bin.000001 # Query 1 # use `test`; ALTER TABLE t comment ''
+ master-bin.000001 # Gtid 1 # BEGIN GTID #-#-#
+ master-bin.000001 # Annotate_rows 1 # INSERT INTO t SET a= 2
+-master-bin.000001 # Table_map 1 # table_id: 4294967296 (test.t)
+-master-bin.000001 # Write_rows_v1 1 # table_id: 4294967296 flags: STMT_END_F
++master-bin.000001 # Table_map 1 # table_id: 4294967294 (test.t)
++master-bin.000001 # Write_rows_v1 1 # table_id: 4294967294 flags: STMT_END_F
+ master-bin.000001 # Query 1 # COMMIT
+ master-bin.000001 # Gtid 1 # GTID #-#-#
+ master-bin.000001 # Query 1 # use `test`; ALTER TABLE t comment ''
+ master-bin.000001 # Gtid 1 # BEGIN GTID #-#-#
+ master-bin.000001 # Annotate_rows 1 # INSERT INTO t SET a= 3
+-master-bin.000001 # Table_map 1 # table_id: 4294967297 (test.t)
+-master-bin.000001 # Write_rows_v1 1 # table_id: 4294967297 flags: STMT_END_F
++master-bin.000001 # Table_map 1 # table_id: 1 (test.t)
++master-bin.000001 # Write_rows_v1 1 # table_id: 1 flags: STMT_END_F
+ master-bin.000001 # 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
index 4899dda5e5a..694a6132244 100644
--- a/mysql-test/suite/rpl/r/rpl_row_big_table_id.result
+++ b/mysql-test/suite/rpl/r/rpl_row_big_table_id.result
@@ -1,9 +1,7 @@
include/master-slave.inc
[connection master]
-connection master;
-include/rpl_restart_server.inc [server_number=1]
-SET @saved_dbug = @@SESSION.debug_dbug;
-SET @@debug_dbug="d,simulate_big_table_id";
+SET @old_debug_dbug= @@debug_dbug;
+SET @@debug_dbug="+d,simulate_big_table_id";
CREATE TABLE t (a int);
INSERT INTO t SET a= 0;
ALTER TABLE t comment '';
@@ -14,35 +12,35 @@ 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
+master-bin.000001 # Gtid 1 # BEGIN GTID #-#-#
+master-bin.000001 # Annotate_rows 1 # INSERT INTO t SET a= 0
+master-bin.000001 # Table_map 1 # table_id: 4294967294 (test.t)
+master-bin.000001 # Write_rows_v1 1 # table_id: 4294967294 flags: STMT_END_F
+master-bin.000001 # Query 1 # COMMIT
+master-bin.000001 # Gtid 1 # GTID #-#-#
+master-bin.000001 # Query 1 # use `test`; ALTER TABLE t comment ''
+master-bin.000001 # Gtid 1 # BEGIN GTID #-#-#
+master-bin.000001 # Annotate_rows 1 # INSERT INTO t SET a= 1
+master-bin.000001 # Table_map 1 # table_id: 4294967295 (test.t)
+master-bin.000001 # Write_rows_v1 1 # table_id: 4294967295 flags: STMT_END_F
+master-bin.000001 # Query 1 # COMMIT
+master-bin.000001 # Gtid 1 # GTID #-#-#
+master-bin.000001 # Query 1 # use `test`; ALTER TABLE t comment ''
+master-bin.000001 # Gtid 1 # BEGIN GTID #-#-#
+master-bin.000001 # Annotate_rows 1 # INSERT INTO t SET a= 2
+master-bin.000001 # Table_map 1 # table_id: 4294967296 (test.t)
+master-bin.000001 # Write_rows_v1 1 # table_id: 4294967296 flags: STMT_END_F
+master-bin.000001 # Query 1 # COMMIT
+master-bin.000001 # Gtid 1 # GTID #-#-#
+master-bin.000001 # Query 1 # use `test`; ALTER TABLE t comment ''
+master-bin.000001 # Gtid 1 # BEGIN GTID #-#-#
+master-bin.000001 # Annotate_rows 1 # INSERT INTO t SET a= 3
+master-bin.000001 # Table_map 1 # table_id: 4294967297 (test.t)
+master-bin.000001 # Write_rows_v1 1 # table_id: 4294967297 flags: STMT_END_F
+master-bin.000001 # Query 1 # COMMIT
connection slave;
connection master;
+SET debug_dbug=@old_debug_dbug;
DROP TABLE t;
-SET debug_dbug= @saved_dbug;
connection slave;
include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_row_create_table.result b/mysql-test/suite/rpl/r/rpl_row_create_table.result
index b8a1e2f8246..7ed8338bbfb 100644
--- a/mysql-test/suite/rpl/r/rpl_row_create_table.result
+++ b/mysql-test/suite/rpl/r/rpl_row_create_table.result
@@ -222,7 +222,7 @@ DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8,t9;
connection slave;
STOP SLAVE;
include/wait_for_slave_to_stop.inc
-SET GLOBAL storage_engine=@storage_engine;
+SET GLOBAL default_storage_engine=@@default_storage_engine;
START SLAVE;
include/wait_for_slave_to_start.inc
================ BUG#22864 ================
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 c97f8968136..a6fc13c31e7 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
@@ -1,6 +1,6 @@
include/master-slave.inc
[connection master]
-set session storage_engine=innodb;
+set session default_storage_engine=innodb;
#########################################################################
# CONFIGURATION
#########################################################################
diff --git a/mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result b/mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result
index 42d7fc39b5c..baabcf65dc5 100644
--- a/mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result
+++ b/mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result
@@ -168,7 +168,7 @@ ROLLBACK/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=1411383296/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -191,7 +191,7 @@ ROLLBACK/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=1411383296/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -306,7 +306,7 @@ ROLLBACK/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=1411383296/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@@ -335,7 +335,7 @@ ROLLBACK/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=1411383296/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
diff --git a/mysql-test/suite/rpl/r/rpl_row_triggers.result b/mysql-test/suite/rpl/r/rpl_row_triggers.result
index ad78c33e2b9..07a66d13bcf 100644
--- a/mysql-test/suite/rpl/r/rpl_row_triggers.result
+++ b/mysql-test/suite/rpl/r/rpl_row_triggers.result
@@ -338,4 +338,136 @@ connection master;
set binlog_row_image = @binlog_row_image.saved;
drop table t1;
connection slave;
+#
+# enterprise 10.4 tests start
+#
+#
+# MENT-607 : Make slave_run_triggers_for_rbr enforce triggers to run
+# on slave, even when there are triggers on the master
+#
+# Triggers on slave WILL work (with ENFORCE) if master has some
+connection master;
+CREATE TABLE t1 (C1 CHAR(1) primary key, C2 CHAR(1)) engine=innodb;
+SELECT * FROM t1;
+C1 C2
+create trigger t1_dummy before delete on t1 for each row
+set @dummy= 1;
+connection slave;
+connection slave;
+SET @old_slave_exec_mode= @@global.slave_exec_mode;
+SET @old_slave_run_triggers_for_rbr= @@global.slave_run_triggers_for_rbr;
+SET @@global.slave_exec_mode= IDEMPOTENT;
+SET @@global.slave_run_triggers_for_rbr= ENFORCE;
+SELECT * FROM t1;
+C1 C2
+create table t2 (id char(2) primary key, cnt int, o char(1), n char(1));
+insert into t2 values
+('u0', 0, ' ', ' '),('u1', 0, ' ', ' '),
+('d0', 0, ' ', ' '),('d1', 0, ' ', ' '),
+('i0', 0, ' ', ' '),('i1', 0, ' ', ' ');
+create trigger t1_cnt_b before update on t1 for each row
+update t2 set cnt=cnt+1, o=old.C1, n=new.C1 where id = 'u0';
+create trigger t1_cnt_ib before insert on t1 for each row
+update t2 set cnt=cnt+1, n=new.C1, o=' ' where id = 'i0';
+create trigger t1_cnt_a after update on t1 for each row
+update t2 set cnt=cnt+1, o=old.C1, n=new.C1 where id = 'u1';
+create trigger t1_cnt_da after delete on t1 for each row
+update t2 set cnt=cnt+1, o=old.C1, n=' ' where id = 'd1';
+create trigger t1_cnt_ia after insert on t1 for each row
+update t2 set cnt=cnt+1, n=new.C1, o=' ' where id = 'i1';
+SELECT * FROM t2 order by id;
+id cnt o n
+d0 0
+d1 0
+i0 0
+i1 0
+u0 0
+u1 0
+connection master;
+# INSERT triggers test
+insert into t1 values ('a','b');
+connection slave;
+connection slave;
+SELECT * FROM t2 order by id;
+id cnt o n
+d0 0
+d1 0
+i0 1 a
+i1 1 a
+u0 0
+u1 0
+connection master;
+# UPDATE triggers test
+update t1 set C1= 'd';
+connection slave;
+connection slave;
+SELECT * FROM t2 order by id;
+id cnt o n
+d0 0
+d1 0
+i0 1 a
+i1 1 a
+u0 1 a d
+u1 1 a d
+connection master;
+# DELETE triggers test
+delete from t1 where C1='d';
+connection slave;
+connection slave;
+SELECT * FROM t2 order by id;
+id cnt o n
+d0 0
+d1 1 d
+i0 1 a
+i1 1 a
+u0 1 a d
+u1 1 a d
+# INSERT triggers which cause also UPDATE test (insert duplicate row)
+insert into t1 values ('0','1');
+SELECT * FROM t2 order by id;
+id cnt o n
+d0 0
+d1 1 d
+i0 2 0
+i1 2 0
+u0 1 a d
+u1 1 a d
+connection master;
+insert into t1 values ('0','1');
+connection slave;
+connection slave;
+SELECT * FROM t2 order by id;
+id cnt o n
+d0 0
+d1 2 0
+i0 3 0
+i1 3 0
+u0 1 a d
+u1 1 a d
+# INSERT triggers which cause also DELETE test
+# (insert duplicate row in table referenced by foreign key)
+insert into t1 values ('1','1');
+connection master;
+CREATE TABLE t3 (C1 CHAR(1) primary key, FOREIGN KEY (C1) REFERENCES t1(C1) ) engine=innodb;
+insert into t1 values ('1','1');
+connection slave;
+connection slave;
+SELECT * FROM t2 order by id;
+id cnt o n
+d0 0
+d1 3 1
+i0 5 1
+i1 5 1
+u0 1 a d
+u1 1 a d
+connection master;
+drop table t3,t1;
+connection slave;
+connection slave;
+SET @@global.slave_exec_mode= @old_slave_exec_mode;
+SET @@global.slave_run_triggers_for_rbr= @old_slave_run_triggers_for_rbr;
+drop table t2;
+#
+# enterprise 10.4 tests end
+#
include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_show_slave_hosts.result b/mysql-test/suite/rpl/r/rpl_show_slave_hosts.result
index bd605c6e0fb..79803cca0d0 100644
--- a/mysql-test/suite/rpl/r/rpl_show_slave_hosts.result
+++ b/mysql-test/suite/rpl/r/rpl_show_slave_hosts.result
@@ -10,11 +10,11 @@ connection master;
SHOW SLAVE HOSTS;
Server_id Host Port Master_id
3 slave2 SLAVE_PORT 1
-2 SLAVE_PORT 1
+2 localhost SLAVE_PORT 1
connection slave2;
include/stop_slave_io.inc
connection master;
SHOW SLAVE HOSTS;
Server_id Host Port Master_id
-2 SLAVE_PORT 1
+2 localhost SLAVE_PORT 1
include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_skip_replication.result b/mysql-test/suite/rpl/r/rpl_skip_replication.result
index ded85f3edd5..59d5b50e5cc 100644
--- a/mysql-test/suite/rpl/r/rpl_skip_replication.result
+++ b/mysql-test/suite/rpl/r/rpl_skip_replication.result
@@ -7,7 +7,7 @@ SELECT,UPDATE ON *.* TO 'nonsuperuser'@'127.0.0.1';
connect nonpriv, 127.0.0.1, nonsuperuser,, test, $SLAVE_MYPORT,;
connection nonpriv;
SET GLOBAL replicate_events_marked_for_skip=FILTER_ON_MASTER;
-ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
+ERROR 42000: Access denied; you need (at least one of) the SUPER, REPLICATION SLAVE ADMIN privilege(s) for this operation
disconnect nonpriv;
connection slave;
DROP USER'nonsuperuser'@'127.0.0.1';
diff --git a/mysql-test/suite/rpl/r/rpl_slave_alias_replica.result b/mysql-test/suite/rpl/r/rpl_slave_alias_replica.result
new file mode 100644
index 00000000000..2a49e80075f
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_slave_alias_replica.result
@@ -0,0 +1,55 @@
+include/master-slave.inc
+[connection master]
+"Command: STOP SLAVE --> STOP REPLICA"
+connection slave;
+STOP REPLICA;
+include/wait_for_slave_io_to_stop.inc
+include/wait_for_slave_sql_to_stop.inc
+connection master;
+CREATE USER 'repl_user';
+"Privilege: SLAVE --> REPLICA"
+GRANT REPLICATION REPLICA on *.* TO repl_user;
+FLUSH PRIVILEGES;
+connection slave;
+"SHOW SLAVE STATUS --> SHOW REPLICA STATUS"
+CHANGE MASTER TO MASTER_USER= 'repl_user';
+"Command: START SLAVE --> START REPLICA"
+START REPLICA;
+include/wait_for_slave_io_to_start.inc
+include/wait_for_slave_sql_to_start.inc
+connection master;
+connection slave;
+connection master;
+"Command: SHOW SLAVE HOSTS --> SHOW REPLICA HOSTS"
+DROP USER 'repl_user';
+connection slave;
+"Command: SHOW SLAVE IO/SQL THREAD --> SHOW REPLICA IO/SQL THREAD"
+STOP REPLICA IO_THREAD;
+STOP REPLICA SQL_THREAD;
+include/wait_for_slave_io_to_stop.inc
+include/wait_for_slave_sql_to_stop.inc
+"Command: RESET SLAVE ALL --> RESET REPLICA ALL"
+RESET REPLICA ALL;
+connection master;
+RESET MASTER;
+CREATE TABLE t(f INT) ENGINE=INNODB;
+INSERT INTO t VALUES (10);
+DROP TABLE t;
+connection slave;
+CHANGE MASTER TO MASTER_HOST='127.0.0.1',MASTER_PORT=MASTER_PORT,MASTER_USER='root';
+"Command: START SLAVE UNTIL --> START REPLICA UNTIL"
+START REPLICA UNTIL MASTER_LOG_FILE='MASTER_LOG_FILE', MASTER_LOG_POS=MASTER_POS;
+include/wait_for_slave_sql_to_stop.inc
+include/stop_slave_io.inc
+SELECT * FROM t;
+f
+10
+include/check_slave_param.inc [Exec_Master_Log_Pos]
+"MASTER_USE_GTID=SLAVE_POS --> MASTER_USE_GTID=REPLICA_POS"
+CHANGE MASTER TO master_host = '127.0.0.1', master_port = MASTER_PORT, MASTER_USE_GTID=REPLICA_POS;
+include/start_slave.inc
+connection master;
+CREATE TABLE t2 (f INT PRIMARY KEY) ENGINE=INNODB;
+INSERT INTO t2 VALUES (10);
+DROP TABLE t2;
+include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_sp.result b/mysql-test/suite/rpl/r/rpl_sp.result
index 5216a3b0a44..2fc2f5ba236 100644
--- a/mysql-test/suite/rpl/r/rpl_sp.result
+++ b/mysql-test/suite/rpl/r/rpl_sp.result
@@ -784,7 +784,7 @@ DELIMITER /*!*/;
ROLLBACK/*!*/;
SET TIMESTAMP=t/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
diff --git a/mysql-test/suite/rpl/r/rpl_spec_variables.result b/mysql-test/suite/rpl/r/rpl_spec_variables.result
index 8b4c398f308..10bb496b9d7 100644
--- a/mysql-test/suite/rpl/r/rpl_spec_variables.result
+++ b/mysql-test/suite/rpl/r/rpl_spec_variables.result
@@ -134,7 +134,7 @@ COUNT(*)
70
connection slave;
LOAD DATA LOCAL INFILE 'FILE2' INTO TABLE t1 (b);
-ERROR 42000: The used command is not allowed with this MariaDB version
+ERROR HY000: The used command is not allowed because the MariaDB server or client has disabled the local infile capability
SELECT COUNT(*) FROM t1;
COUNT(*)
70
@@ -167,13 +167,13 @@ DROP TABLE IF EXISTS t1,t2;
* storage_engine *
connection master;
-SET @restore_master_storage_engine=@@global.storage_engine;
-SET @@global.storage_engine=InnoDB;
-SET @@session.storage_engine=InnoDB;
+SET @restore_master_storage_engine=@@global.default_storage_engine;
+SET @@global.default_storage_engine=InnoDB;
+SET @@session.default_storage_engine=InnoDB;
connection slave;
-SET @restore_slave_storage_engine=@@global.storage_engine;
-SET @@global.storage_engine=Memory;
-SET @@session.storage_engine=Memory;
+SET @restore_slave_storage_engine=@@global.default_storage_engine;
+SET @@global.default_storage_engine=Memory;
+SET @@session.default_storage_engine=Memory;
connection master;
CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY, b VARCHAR(10));
CREATE TABLE t2 (a INT NOT NULL PRIMARY KEY, b VARCHAR(10)) ENGINE=InnoDB;
@@ -216,8 +216,8 @@ t3 CREATE TABLE `t3` (
`b` varchar(10) DEFAULT NULL,
PRIMARY KEY (`a`)
) ENGINE=MEMORY DEFAULT CHARSET=latin1
-SET @@global.storage_engine=InnoDB;
-SET @@session.storage_engine=InnoDB;
+SET @@global.default_storage_engine=InnoDB;
+SET @@session.default_storage_engine=InnoDB;
connection master;
DROP TABLE IF EXISTS t1,t2,t3;
@@ -253,13 +253,13 @@ DROP TABLE t1;
connection master;
SET @@global.character_set_database=@restore_master_character_set_database;
SET @@global.collation_server=@restore_master_collation_server;
-SET @@global.storage_engine=@restore_master_storage_engine;
+SET @@global.default_storage_engine=@restore_master_storage_engine;
SET @@global.sql_mode=@old_sql_mode_master;
connection slave;
SET @@global.character_set_database=@restore_slave_character_set_database;
SET @@global.collation_server=@restore_slave_collation_server;
SET @@global.max_heap_table_size=@restore_slave_max_heap_table_size;
-SET @@global.storage_engine=@restore_slave_storage_engine;
+SET @@global.default_storage_engine=@restore_slave_storage_engine;
SET @@global.sql_mode=@old_sql_mode_slave;
call mtr.add_suppression("The table 't[12]' is full");
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 9fbb7b0ab19..8b6ee56a3b4 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
@@ -1,6 +1,6 @@
include/master-slave.inc
[connection master]
-set session storage_engine=innodb;
+set session default_storage_engine=innodb;
#########################################################################
# CONFIGURATION
#########################################################################
diff --git a/mysql-test/suite/rpl/r/rpl_sync_with_innodb_thd_conc.result b/mysql-test/suite/rpl/r/rpl_sync_with_innodb_thd_conc.result
deleted file mode 100644
index cd9ac1db9b1..00000000000
--- a/mysql-test/suite/rpl/r/rpl_sync_with_innodb_thd_conc.result
+++ /dev/null
@@ -1,18 +0,0 @@
-include/master-slave.inc
-[connection master]
-connection slave;
-SET @old_innodb_thread_concurrency := @@innodb_thread_concurrency;
-SET @old_innodb_thread_sleep_delay := @@innodb_thread_sleep_delay;
-SET GLOBAL innodb_thread_concurrency = 100;
-connection master;
-CREATE TABLE t(f INT) ENGINE=INNODB;
-INSERT INTO t VALUES (10);
-connection slave;
-include/diff_tables.inc [master:t, slave:t]
-"===== Clean up======="
-connection master;
-DROP TABLE t;
-connection slave;
-SET GLOBAL innodb_thread_concurrency = @old_innodb_thread_concurrency;
-SET GLOBAL innodb_thread_sleep_delay = @old_innodb_thread_sleep_delay;
-include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_table_options.result b/mysql-test/suite/rpl/r/rpl_table_options.result
index 14af4e390c2..7afec3fac43 100644
--- a/mysql-test/suite/rpl/r/rpl_table_options.result
+++ b/mysql-test/suite/rpl/r/rpl_table_options.result
@@ -1,7 +1,7 @@
include/master-slave.inc
[connection master]
install plugin example soname 'ha_example.so';
-set storage_engine=example;
+set default_storage_engine=example;
connection slave;
connection master;
create table t1 (a int not null) ull=12340;
@@ -28,7 +28,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1 `ull`=12350
connection master;
drop table t1;
-set storage_engine=default;
+set default_storage_engine=default;
select 1;
1
1
diff --git a/mysql-test/suite/rpl/r/rpl_temporary.result b/mysql-test/suite/rpl/r/rpl_temporary.result
index e2999cdd225..650fe1db9e0 100644
--- a/mysql-test/suite/rpl/r/rpl_temporary.result
+++ b/mysql-test/suite/rpl/r/rpl_temporary.result
@@ -40,12 +40,12 @@ connect con3,localhost,zedjzlcsjhd,,;
connection con3;
SET @save_select_limit=@@session.sql_select_limit;
SET @@session.sql_select_limit=10, @@session.pseudo_thread_id=100;
-ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
+ERROR 42000: Access denied; you need (at least one of) the SUPER, BINLOG REPLAY privilege(s) for this operation
SELECT @@session.sql_select_limit = @save_select_limit;
@@session.sql_select_limit = @save_select_limit
1
SET @@session.sql_select_limit=10, @@session.sql_log_bin=0;
-ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
+ERROR 42000: Access denied; you need (at least one of) the SUPER, BINLOG ADMIN privilege(s) for this operation
SELECT @@session.sql_select_limit = @save_select_limit;
@@session.sql_select_limit = @save_select_limit
1
diff --git a/mysql-test/suite/rpl/r/rpl_temporary_errors.result b/mysql-test/suite/rpl/r/rpl_temporary_errors.result
index 8654fe218dc..c126871e460 100644
--- a/mysql-test/suite/rpl/r/rpl_temporary_errors.result
+++ b/mysql-test/suite/rpl/r/rpl_temporary_errors.result
@@ -3,7 +3,7 @@ include/master-slave.inc
call mtr.add_suppression("Deadlock found");
call mtr.add_suppression("Can't find record in 't.'");
connection master;
-CREATE TABLE t1 (a INT PRIMARY KEY, b INT);
+CREATE TABLE t1 (a INT PRIMARY KEY, b INT) ENGINE=innodb;
INSERT INTO t1 VALUES (1,1), (2,2), (3,3), (4,4);
connection slave;
SHOW STATUS LIKE 'Slave_retried_transactions';
@@ -11,34 +11,67 @@ Variable_name Value
Slave_retried_transactions 0
set @@global.slave_exec_mode= 'IDEMPOTENT';
UPDATE t1 SET a = 5, b = 47 WHERE a = 1;
-SELECT * FROM t1;
+SELECT * FROM t1 ORDER BY a;
a b
-5 47
2 2
3 3
4 4
+5 47
connection master;
UPDATE t1 SET a = 5, b = 5 WHERE a = 1;
-SELECT * FROM t1;
+SELECT * FROM t1 ORDER BY a;
a b
-5 5
2 2
3 3
4 4
+5 5
connection slave;
set @@global.slave_exec_mode= default;
SHOW STATUS LIKE 'Slave_retried_transactions';
Variable_name Value
Slave_retried_transactions 0
-SELECT * FROM t1;
+SELECT * FROM t1 ORDER BY a;
a b
-5 47
2 2
3 3
4 4
+5 47
include/check_slave_is_running.inc
connection slave;
call mtr.add_suppression("Slave SQL.*Could not execute Update_rows event on table test.t1");
+call mtr.add_suppression("Slave SQL for channel '': worker thread retried transaction");
+call mtr.add_suppression("The slave coordinator and worker threads are stopped");
+connection slave;
+set @save_innodb_lock_wait_timeout=@@global.innodb_lock_wait_timeout;
+set @save_slave_transaction_retries=@@global.slave_transaction_retries;
+set @@global.innodb_lock_wait_timeout=1;
+set @@global.slave_transaction_retries=2;
+include/restart_slave.inc
+connection slave1;
+BEGIN;
+INSERT INTO t1 SET a = 6, b = 7;
+connection master;
+INSERT INTO t1 SET a = 99, b = 99;
+XA START 'xa1';
+INSERT INTO t1 SET a = 6, b = 6;
+XA END 'xa1';
+XA PREPARE 'xa1';
+connection slave;
+include/wait_for_slave_sql_error.inc [errno=1213,1205]
+set @@global.innodb_lock_wait_timeout=1;
+set @@global.slave_transaction_retries=100;
+include/restart_slave.inc
+Warnings:
+Note 1255 Slave already has been stopped
+connection slave1;
+ROLLBACK;
+connection master;
+XA COMMIT 'xa1';
+include/sync_slave_sql_with_master.inc
+connection slave;
+include/assert.inc [XA transaction record must be in the table]
+set @@global.innodb_lock_wait_timeout=@save_innodb_lock_wait_timeout;
+set @@global.slave_transaction_retries= @save_slave_transaction_retries;
connection master;
DROP TABLE t1;
connection slave;
diff --git a/mysql-test/suite/rpl/r/rpl_xa.result b/mysql-test/suite/rpl/r/rpl_xa.result
new file mode 100644
index 00000000000..a90e6e0b996
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_xa.result
@@ -0,0 +1,222 @@
+include/master-slave.inc
+[connection master]
+connection master;
+create table t1 (a int, b int) engine=InnoDB;
+insert into t1 values(0, 0);
+xa start 't';
+insert into t1 values(1, 2);
+xa end 't';
+xa prepare 't';
+xa commit 't';
+connection slave;
+include/diff_tables.inc [master:t1, slave:t1]
+connection master;
+xa start 't';
+insert into t1 values(3, 4);
+xa end 't';
+xa prepare 't';
+xa rollback 't';
+connection slave;
+include/diff_tables.inc [master:t1, slave:t1]
+connection master;
+SET pseudo_slave_mode=1;
+create table t2 (a int) engine=InnoDB;
+xa start 't';
+insert into t1 values (5, 6);
+xa end 't';
+xa prepare 't';
+xa start 's';
+insert into t2 values (0);
+xa end 's';
+xa prepare 's';
+include/save_master_gtid.inc
+connection slave;
+include/sync_with_master_gtid.inc
+xa recover;
+formatID gtrid_length bqual_length data
+1 1 0 s
+1 1 0 t
+connection master;
+xa commit 't';
+xa commit 's';
+SET pseudo_slave_mode=0;
+connection slave;
+include/diff_tables.inc [master:t1, slave:t1]
+include/diff_tables.inc [master:t2, slave:t2]
+connection master;
+*** At the start of read-only section gtid list is:
+flush logs;
+show binlog events in 'master-bin.000002' limit 1,1;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000002 # Gtid_list 1 # [0-1-11]
+set @query1="select 1";
+set @query2="select count(*) into @s2 from t1";
+connection master;
+connect master_$xid, 127.0.0.1,root,,$db,$MASTER_MYPORT,;
+xa start 'ro_2';
+select count(*) into @s2 from t1;
+xa end 'ro_2';
+xa prepare 'ro_2';;
+disconnect master_ro_2;
+connection master;
+connect master_$xid, 127.0.0.1,root,,$db,$MASTER_MYPORT,;
+xa start 'ro_1';
+select 1;
+1
+1
+xa end 'ro_1';
+xa prepare 'ro_1';;
+disconnect master_ro_1;
+connection master;
+connect master_$xid, 127.0.0.1,root,,$db,$MASTER_MYPORT,;
+xa start 'ro_2';
+select count(*) into @s2 from t1;
+xa end 'ro_2';
+xa prepare 'ro_2';;
+disconnect master_ro_2;
+connection master;
+connect master_$xid, 127.0.0.1,root,,$db,$MASTER_MYPORT,;
+xa start 'ro_1';
+select 1;
+1
+1
+xa end 'ro_1';
+xa prepare 'ro_1';;
+disconnect master_ro_1;
+*** 2 prepared xa:s must be in the list:
+connection master;
+xa recover;
+formatID gtrid_length bqual_length data
+1 4 0 ro_1
+1 4 0 ro_2
+*** Zero prepared xa:s must be in the list:
+xa recover;
+formatID gtrid_length bqual_length data
+*** At the end of read-only section gtid list has 0 more compare with previous check:
+flush logs;
+show binlog events in 'master-bin.000003' limit 1,1;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000003 # Gtid_list 1 # [0-1-11]
+create database test_ign;
+set @@sql_log_bin = 0;
+create table test_ign.t (a int) engine=InnoDB;
+set @@sql_log_bin = 1;
+connect master_$xid, 127.0.0.1,root,,$db,$MASTER_MYPORT,;
+xa start 'rw_no_binlog';
+insert into test_ign.t set a=1;
+xa end 'rw_no_binlog';
+xa prepare 'rw_no_binlog';;
+disconnect master_rw_no_binlog;
+*** rw_no_binlog must be in the list:
+connection master;
+xa recover;
+formatID gtrid_length bqual_length data
+1 12 0 rw_no_binlog
+*** Zero must be in the list:
+connection master;
+xa recover;
+formatID gtrid_length bqual_length data
+*** At the end of --binlog-ignore-db section gtid list has 2 more:
+flush logs;
+show binlog events in 'master-bin.000004' limit 1,1;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000004 # Gtid_list 1 # [0-1-13]
+connection master;
+create table t3 (a int) engine=innodb;
+*** the disconnected prepare case
+connect master_$xid, 127.0.0.1,root,,$db,$MASTER_MYPORT,;
+set @@binlog_format=statement;
+xa start 'rw_binlog_only';
+delete from t3;
+xa end 'rw_binlog_only';
+xa prepare 'rw_binlog_only';
+disconnect master_rw_binlog_only;
+connection master;
+*** rw_binlog_only must be in the list:
+xa recover;
+formatID gtrid_length bqual_length data
+1 14 0 rw_binlog_only
+*** Zero must be in the list:
+xa recover;
+formatID gtrid_length bqual_length data
+*** the same connection complete case.
+connection master;
+connect master_$xid, 127.0.0.1,root,,$db,$MASTER_MYPORT,;
+set @@binlog_format=statement;
+xa start 'rw_binlog_only';
+delete from t3;
+xa end 'rw_binlog_only';
+xa prepare 'rw_binlog_only';
+*** rw_binlog_only must be in the list:
+xa recover;
+formatID gtrid_length bqual_length data
+1 14 0 rw_binlog_only
+disconnect master_rw_binlog_only;
+*** Zero must be in the list:
+connection master;
+xa recover;
+formatID gtrid_length bqual_length data
+*** At the end of ineffective in engine section gtid list has 5 more:
+flush logs;
+show binlog events in 'master-bin.000005' limit 1,1;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000005 # Gtid_list 1 # [0-1-18]
+create table tm (a int) engine=myisam;
+connection master;
+connect master_$xid, 127.0.0.1,root,,$db,$MASTER_MYPORT,;
+xa start 'rw_myisam';
+insert into tm set a=1;
+xa end 'rw_myisam';
+xa prepare 'rw_myisam';;
+disconnect master_rw_myisam;
+connection master;
+connect master_$xid, 127.0.0.1,root,,$db,$MASTER_MYPORT,;
+xa start 'rw_myisam';
+insert into tm set a=1;
+xa end 'rw_myisam';
+xa prepare 'rw_myisam';;
+disconnect master_rw_myisam;
+*** rw_myisam prepared must be in the list:
+connection master;
+xa recover;
+formatID gtrid_length bqual_length data
+1 9 0 rw_myisam
+*** Zero prepared xa:s must be in the list:
+xa recover;
+formatID gtrid_length bqual_length data
+*** At the end of MyISAM "xa" section gtid list has 7 more compare with previous check:
+flush logs;
+show binlog events in 'master-bin.000006' limit 1,1;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000006 # Gtid_list 1 # [0-1-25]
+connect master_$xid, 127.0.0.1,root,,$db,$MASTER_MYPORT,;
+set @@session.sql_log_bin = OFF;
+xa start 'skip_binlog';
+insert into t2 values(1);
+xa end 'skip_binlog';
+xa prepare 'skip_binlog';
+disconnect master_skip_binlog;
+*** skip_binlog must be in the list:
+connection master;
+xa recover;
+formatID gtrid_length bqual_length data
+1 11 0 skip_binlog
+set @@session.sql_log_bin = OFF;
+xa rollback 'skip_binlog';
+set @@session.sql_log_bin = ON;
+include/save_master_gtid.inc
+*** Zero must be in the list:
+connection master;
+xa recover;
+formatID gtrid_length bqual_length data
+*** At the end of skip_log_binb section gtid list has 0 more:
+flush logs;
+show binlog events in 'master-bin.000007' limit 1,1;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000007 # Gtid_list 1 # [0-1-25]
+connection slave;
+include/sync_with_master_gtid.inc
+connection master;
+drop database test_ign;
+drop table t1, t2, t3, tm;
+include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_xa_gap_lock.result b/mysql-test/suite/rpl/r/rpl_xa_gap_lock.result
new file mode 100644
index 00000000000..cb760abe2d2
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_xa_gap_lock.result
@@ -0,0 +1,44 @@
+include/master-slave.inc
+[connection master]
+connection slave;
+SET @saved_innodb_limit_optimistic_insert_debug = @@GLOBAL.innodb_limit_optimistic_insert_debug;
+SET @@GLOBAL.innodb_limit_optimistic_insert_debug = 2;
+connection master;
+CREATE TABLE t1 (
+c1 INT NOT NULL,
+KEY(c1)
+) ENGINE=InnoDB;
+CREATE TABLE t2 (
+c1 INT NOT NULL,
+FOREIGN KEY(c1) REFERENCES t1(c1)
+) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1), (3), (4);
+connection master1;
+XA START 'XA1';
+INSERT INTO t1 values(2);
+XA END 'XA1';
+connection master;
+XA START 'XA2';
+INSERT INTO t2 values(3);
+XA END 'XA2';
+XA PREPARE 'XA2';
+connection master1;
+XA PREPARE 'XA1';
+XA COMMIT 'XA1';
+connection master;
+XA COMMIT 'XA2';
+include/sync_slave_sql_with_master.inc
+include/stop_slave.inc
+DROP TABLE t2, t1;
+RESET SLAVE;
+RESET MASTER;
+connection master;
+Restore binary log from the master into the slave
+include/diff_tables.inc [master:test.t1, slave:test.t1]
+include/diff_tables.inc [master:test.t2, slave:test.t2]
+DROP TABLE t2, t1;
+connection slave;
+CHANGE MASTER TO MASTER_LOG_FILE='LOG_FILE', MASTER_LOG_POS=LOG_POS;
+SET @@GLOBAL.innodb_limit_optimistic_insert_debug = @saved_innodb_limit_optimistic_insert_debug;
+include/start_slave.inc
+include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_xa_gtid_pos_auto_engine.result b/mysql-test/suite/rpl/r/rpl_xa_gtid_pos_auto_engine.result
new file mode 100644
index 00000000000..ffd0426ab0d
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_xa_gtid_pos_auto_engine.result
@@ -0,0 +1,238 @@
+include/master-slave.inc
+[connection master]
+connection slave;
+call mtr.add_suppression("The automatically created table.*name may not be entirely in lowercase");
+include/stop_slave.inc
+CHANGE MASTER TO master_use_gtid=slave_pos;
+SET @@global.gtid_pos_auto_engines="innodb";
+include/start_slave.inc
+connection master;
+create table t1 (a int, b int) engine=InnoDB;
+insert into t1 values(0, 0);
+xa start 't';
+insert into t1 values(1, 2);
+xa end 't';
+xa prepare 't';
+xa commit 't';
+connection slave;
+include/diff_tables.inc [master:t1, slave:t1]
+connection master;
+xa start 't';
+insert into t1 values(3, 4);
+xa end 't';
+xa prepare 't';
+xa rollback 't';
+connection slave;
+include/diff_tables.inc [master:t1, slave:t1]
+connection master;
+SET pseudo_slave_mode=1;
+create table t2 (a int) engine=InnoDB;
+xa start 't';
+insert into t1 values (5, 6);
+xa end 't';
+xa prepare 't';
+xa start 's';
+insert into t2 values (0);
+xa end 's';
+xa prepare 's';
+include/save_master_gtid.inc
+connection slave;
+include/sync_with_master_gtid.inc
+SELECT @@global.gtid_slave_pos = CONCAT(domain_id,"-",server_id,"-",seq_no) FROM mysql.gtid_slave_pos WHERE seq_no = (SELECT DISTINCT max(seq_no) FROM mysql.gtid_slave_pos);
+@@global.gtid_slave_pos = CONCAT(domain_id,"-",server_id,"-",seq_no)
+1
+xa recover;
+formatID gtrid_length bqual_length data
+1 1 0 s
+1 1 0 t
+connection master;
+xa commit 't';
+xa commit 's';
+SET pseudo_slave_mode=0;
+connection slave;
+include/diff_tables.inc [master:t1, slave:t1]
+include/diff_tables.inc [master:t2, slave:t2]
+connection master;
+*** At the start of read-only section gtid list is:
+flush logs;
+show binlog events in 'master-bin.000002' limit 1,1;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000002 # Gtid_list 1 # [0-1-11]
+set @query1="select 1";
+set @query2="select count(*) into @s2 from t1";
+connection master;
+connect master_$xid, 127.0.0.1,root,,$db,$MASTER_MYPORT,;
+xa start 'ro_2';
+select count(*) into @s2 from t1;
+xa end 'ro_2';
+xa prepare 'ro_2';;
+disconnect master_ro_2;
+connection master;
+connect master_$xid, 127.0.0.1,root,,$db,$MASTER_MYPORT,;
+xa start 'ro_1';
+select 1;
+1
+1
+xa end 'ro_1';
+xa prepare 'ro_1';;
+disconnect master_ro_1;
+connection master;
+connect master_$xid, 127.0.0.1,root,,$db,$MASTER_MYPORT,;
+xa start 'ro_2';
+select count(*) into @s2 from t1;
+xa end 'ro_2';
+xa prepare 'ro_2';;
+disconnect master_ro_2;
+connection master;
+connect master_$xid, 127.0.0.1,root,,$db,$MASTER_MYPORT,;
+xa start 'ro_1';
+select 1;
+1
+1
+xa end 'ro_1';
+xa prepare 'ro_1';;
+disconnect master_ro_1;
+*** 2 prepared xa:s must be in the list:
+connection master;
+xa recover;
+formatID gtrid_length bqual_length data
+1 4 0 ro_1
+1 4 0 ro_2
+*** Zero prepared xa:s must be in the list:
+xa recover;
+formatID gtrid_length bqual_length data
+*** At the end of read-only section gtid list has 0 more compare with previous check:
+flush logs;
+show binlog events in 'master-bin.000003' limit 1,1;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000003 # Gtid_list 1 # [0-1-11]
+create database test_ign;
+set @@sql_log_bin = 0;
+create table test_ign.t (a int) engine=InnoDB;
+set @@sql_log_bin = 1;
+connect master_$xid, 127.0.0.1,root,,$db,$MASTER_MYPORT,;
+xa start 'rw_no_binlog';
+insert into test_ign.t set a=1;
+xa end 'rw_no_binlog';
+xa prepare 'rw_no_binlog';;
+disconnect master_rw_no_binlog;
+*** rw_no_binlog must be in the list:
+connection master;
+xa recover;
+formatID gtrid_length bqual_length data
+1 12 0 rw_no_binlog
+*** Zero must be in the list:
+connection master;
+xa recover;
+formatID gtrid_length bqual_length data
+*** At the end of --binlog-ignore-db section gtid list has 2 more:
+flush logs;
+show binlog events in 'master-bin.000004' limit 1,1;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000004 # Gtid_list 1 # [0-1-13]
+connection master;
+create table t3 (a int) engine=innodb;
+*** the disconnected prepare case
+connect master_$xid, 127.0.0.1,root,,$db,$MASTER_MYPORT,;
+set @@binlog_format=statement;
+xa start 'rw_binlog_only';
+delete from t3;
+xa end 'rw_binlog_only';
+xa prepare 'rw_binlog_only';
+disconnect master_rw_binlog_only;
+connection master;
+*** rw_binlog_only must be in the list:
+xa recover;
+formatID gtrid_length bqual_length data
+1 14 0 rw_binlog_only
+*** Zero must be in the list:
+xa recover;
+formatID gtrid_length bqual_length data
+*** the same connection complete case.
+connection master;
+connect master_$xid, 127.0.0.1,root,,$db,$MASTER_MYPORT,;
+set @@binlog_format=statement;
+xa start 'rw_binlog_only';
+delete from t3;
+xa end 'rw_binlog_only';
+xa prepare 'rw_binlog_only';
+*** rw_binlog_only must be in the list:
+xa recover;
+formatID gtrid_length bqual_length data
+1 14 0 rw_binlog_only
+disconnect master_rw_binlog_only;
+*** Zero must be in the list:
+connection master;
+xa recover;
+formatID gtrid_length bqual_length data
+*** At the end of ineffective in engine section gtid list has 5 more:
+flush logs;
+show binlog events in 'master-bin.000005' limit 1,1;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000005 # Gtid_list 1 # [0-1-18]
+create table tm (a int) engine=myisam;
+connection master;
+connect master_$xid, 127.0.0.1,root,,$db,$MASTER_MYPORT,;
+xa start 'rw_myisam';
+insert into tm set a=1;
+xa end 'rw_myisam';
+xa prepare 'rw_myisam';;
+disconnect master_rw_myisam;
+connection master;
+connect master_$xid, 127.0.0.1,root,,$db,$MASTER_MYPORT,;
+xa start 'rw_myisam';
+insert into tm set a=1;
+xa end 'rw_myisam';
+xa prepare 'rw_myisam';;
+disconnect master_rw_myisam;
+*** rw_myisam prepared must be in the list:
+connection master;
+xa recover;
+formatID gtrid_length bqual_length data
+1 9 0 rw_myisam
+*** Zero prepared xa:s must be in the list:
+xa recover;
+formatID gtrid_length bqual_length data
+*** At the end of MyISAM "xa" section gtid list has 7 more compare with previous check:
+flush logs;
+show binlog events in 'master-bin.000006' limit 1,1;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000006 # Gtid_list 1 # [0-1-25]
+connect master_$xid, 127.0.0.1,root,,$db,$MASTER_MYPORT,;
+set @@session.sql_log_bin = OFF;
+xa start 'skip_binlog';
+insert into t2 values(1);
+xa end 'skip_binlog';
+xa prepare 'skip_binlog';
+disconnect master_skip_binlog;
+*** skip_binlog must be in the list:
+connection master;
+xa recover;
+formatID gtrid_length bqual_length data
+1 11 0 skip_binlog
+set @@session.sql_log_bin = OFF;
+xa rollback 'skip_binlog';
+set @@session.sql_log_bin = ON;
+include/save_master_gtid.inc
+*** Zero must be in the list:
+connection master;
+xa recover;
+formatID gtrid_length bqual_length data
+*** At the end of skip_log_binb section gtid list has 0 more:
+flush logs;
+show binlog events in 'master-bin.000007' limit 1,1;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000007 # Gtid_list 1 # [0-1-25]
+connection slave;
+include/sync_with_master_gtid.inc
+connection master;
+drop database test_ign;
+drop table t1, t2, t3, tm;
+connection slave;
+include/stop_slave.inc
+SET @@global.gtid_pos_auto_engines="";
+SET @@session.sql_log_bin=0;
+DROP TABLE mysql.gtid_slave_pos_InnoDB;
+SET @@session.sql_log_bin=1;
+include/start_slave.inc
+include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_xa_survive_disconnect.result b/mysql-test/suite/rpl/r/rpl_xa_survive_disconnect.result
new file mode 100644
index 00000000000..0ee7b497077
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_xa_survive_disconnect.result
@@ -0,0 +1,319 @@
+include/master-slave.inc
+[connection master]
+connection master;
+call mtr.add_suppression("Found 2 prepared XA transactions");
+CREATE VIEW v_processlist as SELECT * FROM performance_schema.threads where type = 'FOREGROUND';
+CREATE DATABASE d1;
+CREATE DATABASE d2;
+CREATE TABLE d1.t (a INT) ENGINE=innodb;
+CREATE TABLE d2.t (a INT) ENGINE=innodb;
+connect master_conn1, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@session.binlog_format= statement;
+XA START '1-stmt';
+INSERT INTO d1.t VALUES (1);
+XA END '1-stmt';
+XA PREPARE '1-stmt';
+disconnect master_conn1;
+connection master;
+connect master_conn2, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@session.binlog_format= row;
+XA START '1-row';
+INSERT INTO d2.t VALUES (1);
+XA END '1-row';
+XA PREPARE '1-row';
+disconnect master_conn2;
+connection master;
+XA START '2';
+INSERT INTO d1.t VALUES (2);
+XA END '2';
+XA PREPARE '2';
+XA COMMIT '2';
+XA COMMIT '1-row';
+XA COMMIT '1-stmt';
+include/show_binlog_events.inc
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Gtid # # BEGIN GTID #-#-#
+master-bin.000001 # Query # # use `mtr`; INSERT INTO test_suppressions (pattern) VALUES ( NAME_CONST('pattern',_latin1'Found 2 prepared XA transactions' COLLATE 'latin1_swedish_ci'))
+master-bin.000001 # Query # # COMMIT
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # use `test`; CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v_processlist` AS SELECT * FROM performance_schema.threads where type = 'FOREGROUND'
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # CREATE DATABASE d1
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # CREATE DATABASE d2
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # use `test`; CREATE TABLE d1.t (a INT) ENGINE=innodb
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # use `test`; CREATE TABLE d2.t (a INT) ENGINE=innodb
+master-bin.000001 # Gtid # # XA START X'312d73746d74',X'',1 GTID #-#-#
+master-bin.000001 # Query # # use `test`; INSERT INTO d1.t VALUES (1)
+master-bin.000001 # Query # # XA END X'312d73746d74',X'',1
+master-bin.000001 # XA_prepare # # XA PREPARE X'312d73746d74',X'',1
+master-bin.000001 # Gtid # # XA START X'312d726f77',X'',1 GTID #-#-#
+master-bin.000001 # Annotate_rows # # INSERT INTO d2.t VALUES (1)
+master-bin.000001 # Table_map # # table_id: # (d2.t)
+master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
+master-bin.000001 # Query # # XA END X'312d726f77',X'',1
+master-bin.000001 # XA_prepare # # XA PREPARE X'312d726f77',X'',1
+master-bin.000001 # Gtid # # XA START X'32',X'',1 GTID #-#-#
+master-bin.000001 # Query # # use `test`; INSERT INTO d1.t VALUES (2)
+master-bin.000001 # Query # # XA END X'32',X'',1
+master-bin.000001 # XA_prepare # # XA PREPARE X'32',X'',1
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # XA COMMIT X'32',X'',1
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # XA COMMIT X'312d726f77',X'',1
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # XA COMMIT X'312d73746d74',X'',1
+include/sync_slave_sql_with_master.inc
+include/stop_slave.inc
+connection master;
+connect master2, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+connection master2;
+SET @@session.binlog_format= statement;
+XA START '3-stmt';
+INSERT INTO d1.t VALUES (3);
+XA END '3-stmt';
+XA PREPARE '3-stmt';
+disconnect master2;
+connect master2, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+connection master2;
+SET @@session.binlog_format= row;
+XA START '3-row';
+INSERT INTO d2.t VALUES (4);
+XA END '3-row';
+XA PREPARE '3-row';
+disconnect master2;
+connection master;
+connect master2, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+connection master2;
+XA START '4';
+SELECT * FROM d1.t;
+a
+1
+2
+XA END '4';
+XA PREPARE '4';
+disconnect master2;
+connect master_bulk_conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'bulk_trx_10';
+INSERT INTO d1.t VALUES (10);
+INSERT INTO d2.t VALUES (10);
+XA END 'bulk_trx_10';
+XA PREPARE 'bulk_trx_10';
+disconnect master_bulk_conn10;
+connection master;
+connect master_bulk_conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'bulk_trx_9';
+INSERT INTO d1.t VALUES (9);
+INSERT INTO d2.t VALUES (9);
+XA END 'bulk_trx_9';
+XA PREPARE 'bulk_trx_9';
+disconnect master_bulk_conn9;
+connection master;
+connect master_bulk_conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'bulk_trx_8';
+INSERT INTO d1.t VALUES (8);
+INSERT INTO d2.t VALUES (8);
+XA END 'bulk_trx_8';
+XA PREPARE 'bulk_trx_8';
+disconnect master_bulk_conn8;
+connection master;
+connect master_bulk_conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'bulk_trx_7';
+INSERT INTO d1.t VALUES (7);
+INSERT INTO d2.t VALUES (7);
+XA END 'bulk_trx_7';
+XA PREPARE 'bulk_trx_7';
+disconnect master_bulk_conn7;
+connection master;
+connect master_bulk_conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'bulk_trx_6';
+INSERT INTO d1.t VALUES (6);
+INSERT INTO d2.t VALUES (6);
+XA END 'bulk_trx_6';
+XA PREPARE 'bulk_trx_6';
+disconnect master_bulk_conn6;
+connection master;
+connect master_bulk_conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'bulk_trx_5';
+INSERT INTO d1.t VALUES (5);
+INSERT INTO d2.t VALUES (5);
+XA END 'bulk_trx_5';
+XA PREPARE 'bulk_trx_5';
+disconnect master_bulk_conn5;
+connection master;
+connect master_bulk_conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'bulk_trx_4';
+INSERT INTO d1.t VALUES (4);
+INSERT INTO d2.t VALUES (4);
+XA END 'bulk_trx_4';
+XA PREPARE 'bulk_trx_4';
+disconnect master_bulk_conn4;
+connection master;
+connect master_bulk_conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'bulk_trx_3';
+INSERT INTO d1.t VALUES (3);
+INSERT INTO d2.t VALUES (3);
+XA END 'bulk_trx_3';
+XA PREPARE 'bulk_trx_3';
+disconnect master_bulk_conn3;
+connection master;
+connect master_bulk_conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'bulk_trx_2';
+INSERT INTO d1.t VALUES (2);
+INSERT INTO d2.t VALUES (2);
+XA END 'bulk_trx_2';
+XA PREPARE 'bulk_trx_2';
+disconnect master_bulk_conn2;
+connection master;
+connect master_bulk_conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'bulk_trx_1';
+INSERT INTO d1.t VALUES (1);
+INSERT INTO d2.t VALUES (1);
+XA END 'bulk_trx_1';
+XA PREPARE 'bulk_trx_1';
+disconnect master_bulk_conn1;
+connection master;
+connection slave;
+include/start_slave.inc
+connection master;
+include/sync_slave_sql_with_master.inc
+include/stop_slave.inc
+connection master;
+XA COMMIT 'bulk_trx_10';
+XA ROLLBACK 'bulk_trx_9';
+XA COMMIT 'bulk_trx_8';
+XA ROLLBACK 'bulk_trx_7';
+XA COMMIT 'bulk_trx_6';
+XA ROLLBACK 'bulk_trx_5';
+XA COMMIT 'bulk_trx_4';
+XA ROLLBACK 'bulk_trx_3';
+XA COMMIT 'bulk_trx_2';
+XA ROLLBACK 'bulk_trx_1';
+include/rpl_restart_server.inc [server_number=1]
+connection slave;
+include/start_slave.inc
+connection master;
+*** '3-stmt','3-row' xa-transactions must be in the list ***
+XA RECOVER;
+formatID gtrid_length bqual_length data
+1 6 0 3-stmt
+1 5 0 3-row
+XA COMMIT '3-stmt';
+XA ROLLBACK '3-row';
+include/sync_slave_sql_with_master.inc
+connection master;
+connect master_conn2, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START '0123456789012345678901234567890123456789012345678901234567890124','0123456789012345678901234567890123456789012345678901234567890124',2147483647;
+INSERT INTO d1.t VALUES (64);
+XA END '0123456789012345678901234567890123456789012345678901234567890124','0123456789012345678901234567890123456789012345678901234567890124',2147483647;
+XA PREPARE '0123456789012345678901234567890123456789012345678901234567890124','0123456789012345678901234567890123456789012345678901234567890124',2147483647;
+disconnect master_conn2;
+connection master;
+connect master_conn3, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START X'FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF',X'00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',0;
+INSERT INTO d1.t VALUES (0);
+XA END X'FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF',X'00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',0;
+XA PREPARE X'FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF',X'00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',0;
+disconnect master_conn3;
+connection master;
+disconnect master_conn4;
+connection master;
+XA COMMIT '0123456789012345678901234567890123456789012345678901234567890124','0123456789012345678901234567890123456789012345678901234567890124',2147483647;
+XA COMMIT X'FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF',X'00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',0;
+XA COMMIT 'RANDOM XID'
+include/sync_slave_sql_with_master.inc
+connect master_bulk_conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+connection master_bulk_conn10;
+XA START 'one_phase_10';
+INSERT INTO d1.t VALUES (10);
+INSERT INTO d2.t VALUES (10);
+XA END 'one_phase_10';
+XA COMMIT 'one_phase_10' ONE PHASE;
+disconnect master_bulk_conn10;
+connect master_bulk_conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+connection master_bulk_conn9;
+XA START 'one_phase_9';
+INSERT INTO d1.t VALUES (9);
+INSERT INTO d2.t VALUES (9);
+XA END 'one_phase_9';
+XA COMMIT 'one_phase_9' ONE PHASE;
+disconnect master_bulk_conn9;
+connect master_bulk_conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+connection master_bulk_conn8;
+XA START 'one_phase_8';
+INSERT INTO d1.t VALUES (8);
+INSERT INTO d2.t VALUES (8);
+XA END 'one_phase_8';
+XA COMMIT 'one_phase_8' ONE PHASE;
+disconnect master_bulk_conn8;
+connect master_bulk_conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+connection master_bulk_conn7;
+XA START 'one_phase_7';
+INSERT INTO d1.t VALUES (7);
+INSERT INTO d2.t VALUES (7);
+XA END 'one_phase_7';
+XA COMMIT 'one_phase_7' ONE PHASE;
+disconnect master_bulk_conn7;
+connect master_bulk_conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+connection master_bulk_conn6;
+XA START 'one_phase_6';
+INSERT INTO d1.t VALUES (6);
+INSERT INTO d2.t VALUES (6);
+XA END 'one_phase_6';
+XA COMMIT 'one_phase_6' ONE PHASE;
+disconnect master_bulk_conn6;
+connect master_bulk_conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+connection master_bulk_conn5;
+XA START 'one_phase_5';
+INSERT INTO d1.t VALUES (5);
+INSERT INTO d2.t VALUES (5);
+XA END 'one_phase_5';
+XA COMMIT 'one_phase_5' ONE PHASE;
+disconnect master_bulk_conn5;
+connect master_bulk_conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+connection master_bulk_conn4;
+XA START 'one_phase_4';
+INSERT INTO d1.t VALUES (4);
+INSERT INTO d2.t VALUES (4);
+XA END 'one_phase_4';
+XA COMMIT 'one_phase_4' ONE PHASE;
+disconnect master_bulk_conn4;
+connect master_bulk_conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+connection master_bulk_conn3;
+XA START 'one_phase_3';
+INSERT INTO d1.t VALUES (3);
+INSERT INTO d2.t VALUES (3);
+XA END 'one_phase_3';
+XA COMMIT 'one_phase_3' ONE PHASE;
+disconnect master_bulk_conn3;
+connect master_bulk_conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+connection master_bulk_conn2;
+XA START 'one_phase_2';
+INSERT INTO d1.t VALUES (2);
+INSERT INTO d2.t VALUES (2);
+XA END 'one_phase_2';
+XA COMMIT 'one_phase_2' ONE PHASE;
+disconnect master_bulk_conn2;
+connect master_bulk_conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+connection master_bulk_conn1;
+XA START 'one_phase_1';
+INSERT INTO d1.t VALUES (1);
+INSERT INTO d2.t VALUES (1);
+XA END 'one_phase_1';
+XA COMMIT 'one_phase_1' ONE PHASE;
+disconnect master_bulk_conn1;
+connection master;
+include/sync_slave_sql_with_master.inc
+include/diff_tables.inc [master:d1.t, slave:d1.t]
+include/diff_tables.inc [master:d2.t, slave:d2.t]
+connection master;
+DELETE FROM d1.t;
+DELETE FROM d2.t;
+DROP TABLE d1.t, d2.t;
+DROP DATABASE d1;
+DROP DATABASE d2;
+DROP VIEW v_processlist;
+include/sync_slave_sql_with_master.inc
+include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_xa_survive_disconnect_lsu_off.result b/mysql-test/suite/rpl/r/rpl_xa_survive_disconnect_lsu_off.result
new file mode 100644
index 00000000000..0ee7b497077
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_xa_survive_disconnect_lsu_off.result
@@ -0,0 +1,319 @@
+include/master-slave.inc
+[connection master]
+connection master;
+call mtr.add_suppression("Found 2 prepared XA transactions");
+CREATE VIEW v_processlist as SELECT * FROM performance_schema.threads where type = 'FOREGROUND';
+CREATE DATABASE d1;
+CREATE DATABASE d2;
+CREATE TABLE d1.t (a INT) ENGINE=innodb;
+CREATE TABLE d2.t (a INT) ENGINE=innodb;
+connect master_conn1, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@session.binlog_format= statement;
+XA START '1-stmt';
+INSERT INTO d1.t VALUES (1);
+XA END '1-stmt';
+XA PREPARE '1-stmt';
+disconnect master_conn1;
+connection master;
+connect master_conn2, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+SET @@session.binlog_format= row;
+XA START '1-row';
+INSERT INTO d2.t VALUES (1);
+XA END '1-row';
+XA PREPARE '1-row';
+disconnect master_conn2;
+connection master;
+XA START '2';
+INSERT INTO d1.t VALUES (2);
+XA END '2';
+XA PREPARE '2';
+XA COMMIT '2';
+XA COMMIT '1-row';
+XA COMMIT '1-stmt';
+include/show_binlog_events.inc
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Gtid # # BEGIN GTID #-#-#
+master-bin.000001 # Query # # use `mtr`; INSERT INTO test_suppressions (pattern) VALUES ( NAME_CONST('pattern',_latin1'Found 2 prepared XA transactions' COLLATE 'latin1_swedish_ci'))
+master-bin.000001 # Query # # COMMIT
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # use `test`; CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v_processlist` AS SELECT * FROM performance_schema.threads where type = 'FOREGROUND'
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # CREATE DATABASE d1
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # CREATE DATABASE d2
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # use `test`; CREATE TABLE d1.t (a INT) ENGINE=innodb
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # use `test`; CREATE TABLE d2.t (a INT) ENGINE=innodb
+master-bin.000001 # Gtid # # XA START X'312d73746d74',X'',1 GTID #-#-#
+master-bin.000001 # Query # # use `test`; INSERT INTO d1.t VALUES (1)
+master-bin.000001 # Query # # XA END X'312d73746d74',X'',1
+master-bin.000001 # XA_prepare # # XA PREPARE X'312d73746d74',X'',1
+master-bin.000001 # Gtid # # XA START X'312d726f77',X'',1 GTID #-#-#
+master-bin.000001 # Annotate_rows # # INSERT INTO d2.t VALUES (1)
+master-bin.000001 # Table_map # # table_id: # (d2.t)
+master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
+master-bin.000001 # Query # # XA END X'312d726f77',X'',1
+master-bin.000001 # XA_prepare # # XA PREPARE X'312d726f77',X'',1
+master-bin.000001 # Gtid # # XA START X'32',X'',1 GTID #-#-#
+master-bin.000001 # Query # # use `test`; INSERT INTO d1.t VALUES (2)
+master-bin.000001 # Query # # XA END X'32',X'',1
+master-bin.000001 # XA_prepare # # XA PREPARE X'32',X'',1
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # XA COMMIT X'32',X'',1
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # XA COMMIT X'312d726f77',X'',1
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # XA COMMIT X'312d73746d74',X'',1
+include/sync_slave_sql_with_master.inc
+include/stop_slave.inc
+connection master;
+connect master2, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+connection master2;
+SET @@session.binlog_format= statement;
+XA START '3-stmt';
+INSERT INTO d1.t VALUES (3);
+XA END '3-stmt';
+XA PREPARE '3-stmt';
+disconnect master2;
+connect master2, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+connection master2;
+SET @@session.binlog_format= row;
+XA START '3-row';
+INSERT INTO d2.t VALUES (4);
+XA END '3-row';
+XA PREPARE '3-row';
+disconnect master2;
+connection master;
+connect master2, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+connection master2;
+XA START '4';
+SELECT * FROM d1.t;
+a
+1
+2
+XA END '4';
+XA PREPARE '4';
+disconnect master2;
+connect master_bulk_conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'bulk_trx_10';
+INSERT INTO d1.t VALUES (10);
+INSERT INTO d2.t VALUES (10);
+XA END 'bulk_trx_10';
+XA PREPARE 'bulk_trx_10';
+disconnect master_bulk_conn10;
+connection master;
+connect master_bulk_conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'bulk_trx_9';
+INSERT INTO d1.t VALUES (9);
+INSERT INTO d2.t VALUES (9);
+XA END 'bulk_trx_9';
+XA PREPARE 'bulk_trx_9';
+disconnect master_bulk_conn9;
+connection master;
+connect master_bulk_conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'bulk_trx_8';
+INSERT INTO d1.t VALUES (8);
+INSERT INTO d2.t VALUES (8);
+XA END 'bulk_trx_8';
+XA PREPARE 'bulk_trx_8';
+disconnect master_bulk_conn8;
+connection master;
+connect master_bulk_conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'bulk_trx_7';
+INSERT INTO d1.t VALUES (7);
+INSERT INTO d2.t VALUES (7);
+XA END 'bulk_trx_7';
+XA PREPARE 'bulk_trx_7';
+disconnect master_bulk_conn7;
+connection master;
+connect master_bulk_conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'bulk_trx_6';
+INSERT INTO d1.t VALUES (6);
+INSERT INTO d2.t VALUES (6);
+XA END 'bulk_trx_6';
+XA PREPARE 'bulk_trx_6';
+disconnect master_bulk_conn6;
+connection master;
+connect master_bulk_conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'bulk_trx_5';
+INSERT INTO d1.t VALUES (5);
+INSERT INTO d2.t VALUES (5);
+XA END 'bulk_trx_5';
+XA PREPARE 'bulk_trx_5';
+disconnect master_bulk_conn5;
+connection master;
+connect master_bulk_conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'bulk_trx_4';
+INSERT INTO d1.t VALUES (4);
+INSERT INTO d2.t VALUES (4);
+XA END 'bulk_trx_4';
+XA PREPARE 'bulk_trx_4';
+disconnect master_bulk_conn4;
+connection master;
+connect master_bulk_conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'bulk_trx_3';
+INSERT INTO d1.t VALUES (3);
+INSERT INTO d2.t VALUES (3);
+XA END 'bulk_trx_3';
+XA PREPARE 'bulk_trx_3';
+disconnect master_bulk_conn3;
+connection master;
+connect master_bulk_conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'bulk_trx_2';
+INSERT INTO d1.t VALUES (2);
+INSERT INTO d2.t VALUES (2);
+XA END 'bulk_trx_2';
+XA PREPARE 'bulk_trx_2';
+disconnect master_bulk_conn2;
+connection master;
+connect master_bulk_conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START 'bulk_trx_1';
+INSERT INTO d1.t VALUES (1);
+INSERT INTO d2.t VALUES (1);
+XA END 'bulk_trx_1';
+XA PREPARE 'bulk_trx_1';
+disconnect master_bulk_conn1;
+connection master;
+connection slave;
+include/start_slave.inc
+connection master;
+include/sync_slave_sql_with_master.inc
+include/stop_slave.inc
+connection master;
+XA COMMIT 'bulk_trx_10';
+XA ROLLBACK 'bulk_trx_9';
+XA COMMIT 'bulk_trx_8';
+XA ROLLBACK 'bulk_trx_7';
+XA COMMIT 'bulk_trx_6';
+XA ROLLBACK 'bulk_trx_5';
+XA COMMIT 'bulk_trx_4';
+XA ROLLBACK 'bulk_trx_3';
+XA COMMIT 'bulk_trx_2';
+XA ROLLBACK 'bulk_trx_1';
+include/rpl_restart_server.inc [server_number=1]
+connection slave;
+include/start_slave.inc
+connection master;
+*** '3-stmt','3-row' xa-transactions must be in the list ***
+XA RECOVER;
+formatID gtrid_length bqual_length data
+1 6 0 3-stmt
+1 5 0 3-row
+XA COMMIT '3-stmt';
+XA ROLLBACK '3-row';
+include/sync_slave_sql_with_master.inc
+connection master;
+connect master_conn2, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START '0123456789012345678901234567890123456789012345678901234567890124','0123456789012345678901234567890123456789012345678901234567890124',2147483647;
+INSERT INTO d1.t VALUES (64);
+XA END '0123456789012345678901234567890123456789012345678901234567890124','0123456789012345678901234567890123456789012345678901234567890124',2147483647;
+XA PREPARE '0123456789012345678901234567890123456789012345678901234567890124','0123456789012345678901234567890123456789012345678901234567890124',2147483647;
+disconnect master_conn2;
+connection master;
+connect master_conn3, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+XA START X'FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF',X'00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',0;
+INSERT INTO d1.t VALUES (0);
+XA END X'FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF',X'00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',0;
+XA PREPARE X'FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF',X'00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',0;
+disconnect master_conn3;
+connection master;
+disconnect master_conn4;
+connection master;
+XA COMMIT '0123456789012345678901234567890123456789012345678901234567890124','0123456789012345678901234567890123456789012345678901234567890124',2147483647;
+XA COMMIT X'FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF',X'00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',0;
+XA COMMIT 'RANDOM XID'
+include/sync_slave_sql_with_master.inc
+connect master_bulk_conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+connection master_bulk_conn10;
+XA START 'one_phase_10';
+INSERT INTO d1.t VALUES (10);
+INSERT INTO d2.t VALUES (10);
+XA END 'one_phase_10';
+XA COMMIT 'one_phase_10' ONE PHASE;
+disconnect master_bulk_conn10;
+connect master_bulk_conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+connection master_bulk_conn9;
+XA START 'one_phase_9';
+INSERT INTO d1.t VALUES (9);
+INSERT INTO d2.t VALUES (9);
+XA END 'one_phase_9';
+XA COMMIT 'one_phase_9' ONE PHASE;
+disconnect master_bulk_conn9;
+connect master_bulk_conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+connection master_bulk_conn8;
+XA START 'one_phase_8';
+INSERT INTO d1.t VALUES (8);
+INSERT INTO d2.t VALUES (8);
+XA END 'one_phase_8';
+XA COMMIT 'one_phase_8' ONE PHASE;
+disconnect master_bulk_conn8;
+connect master_bulk_conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+connection master_bulk_conn7;
+XA START 'one_phase_7';
+INSERT INTO d1.t VALUES (7);
+INSERT INTO d2.t VALUES (7);
+XA END 'one_phase_7';
+XA COMMIT 'one_phase_7' ONE PHASE;
+disconnect master_bulk_conn7;
+connect master_bulk_conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+connection master_bulk_conn6;
+XA START 'one_phase_6';
+INSERT INTO d1.t VALUES (6);
+INSERT INTO d2.t VALUES (6);
+XA END 'one_phase_6';
+XA COMMIT 'one_phase_6' ONE PHASE;
+disconnect master_bulk_conn6;
+connect master_bulk_conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+connection master_bulk_conn5;
+XA START 'one_phase_5';
+INSERT INTO d1.t VALUES (5);
+INSERT INTO d2.t VALUES (5);
+XA END 'one_phase_5';
+XA COMMIT 'one_phase_5' ONE PHASE;
+disconnect master_bulk_conn5;
+connect master_bulk_conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+connection master_bulk_conn4;
+XA START 'one_phase_4';
+INSERT INTO d1.t VALUES (4);
+INSERT INTO d2.t VALUES (4);
+XA END 'one_phase_4';
+XA COMMIT 'one_phase_4' ONE PHASE;
+disconnect master_bulk_conn4;
+connect master_bulk_conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+connection master_bulk_conn3;
+XA START 'one_phase_3';
+INSERT INTO d1.t VALUES (3);
+INSERT INTO d2.t VALUES (3);
+XA END 'one_phase_3';
+XA COMMIT 'one_phase_3' ONE PHASE;
+disconnect master_bulk_conn3;
+connect master_bulk_conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+connection master_bulk_conn2;
+XA START 'one_phase_2';
+INSERT INTO d1.t VALUES (2);
+INSERT INTO d2.t VALUES (2);
+XA END 'one_phase_2';
+XA COMMIT 'one_phase_2' ONE PHASE;
+disconnect master_bulk_conn2;
+connect master_bulk_conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,;
+connection master_bulk_conn1;
+XA START 'one_phase_1';
+INSERT INTO d1.t VALUES (1);
+INSERT INTO d2.t VALUES (1);
+XA END 'one_phase_1';
+XA COMMIT 'one_phase_1' ONE PHASE;
+disconnect master_bulk_conn1;
+connection master;
+include/sync_slave_sql_with_master.inc
+include/diff_tables.inc [master:d1.t, slave:d1.t]
+include/diff_tables.inc [master:d2.t, slave:d2.t]
+connection master;
+DELETE FROM d1.t;
+DELETE FROM d2.t;
+DROP TABLE d1.t, d2.t;
+DROP DATABASE d1;
+DROP DATABASE d2;
+DROP VIEW v_processlist;
+include/sync_slave_sql_with_master.inc
+include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_xa_survive_disconnect_mixed_engines.result b/mysql-test/suite/rpl/r/rpl_xa_survive_disconnect_mixed_engines.result
new file mode 100644
index 00000000000..09bfffc0da4
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_xa_survive_disconnect_mixed_engines.result
@@ -0,0 +1,373 @@
+include/master-slave.inc
+[connection master]
+connection master;
+CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
+SET @@session.binlog_direct_non_transactional_updates := if(floor(rand()*10)%2,'ON','OFF');
+CREATE TABLE t (a INT) ENGINE=innodb;
+CREATE TABLE tm (a INT) ENGINE=myisam;
+=== COMMIT ===
+XA START 'xa_trx';
+INSERT INTO tm VALUES (1);
+INSERT INTO t VALUES (1);
+XA END 'xa_trx';
+XA PREPARE 'xa_trx';
+XA COMMIT 'xa_trx' ;
+XA START 'xa_trx';
+INSERT INTO t VALUES (2);
+INSERT INTO tm VALUES (2);
+XA END 'xa_trx';
+XA PREPARE 'xa_trx';
+XA COMMIT 'xa_trx' ;
+XA START 'xa_trx';
+INSERT INTO tm VALUES (3);
+XA END 'xa_trx';
+XA PREPARE 'xa_trx';
+XA COMMIT 'xa_trx' ;
+CREATE TEMPORARY TABLE tmp_i LIKE t;
+CREATE TEMPORARY TABLE tmp_m LIKE tm;
+XA START 'xa_trx';
+INSERT INTO t VALUES (4);
+INSERT INTO tm VALUES (4);
+INSERT INTO tmp_i VALUES (4);
+INSERT INTO tmp_m VALUES (4);
+INSERT INTO t SELECT * FROM tmp_i;
+INSERT INTO tm SELECT * FROM tmp_m;
+XA END 'xa_trx';
+XA PREPARE 'xa_trx';
+XA COMMIT 'xa_trx' ;
+XA START 'xa_trx';
+INSERT INTO tmp_i VALUES (5);
+INSERT INTO tmp_m VALUES (5);
+INSERT INTO t SELECT * FROM tmp_i;
+INSERT INTO tm SELECT * FROM tmp_m;
+INSERT INTO t VALUES (5);
+INSERT INTO tm VALUES (5);
+XA END 'xa_trx';
+XA PREPARE 'xa_trx';
+XA COMMIT 'xa_trx' ;
+DROP TEMPORARY TABLE tmp_i;
+DROP TEMPORARY TABLE tmp_m;
+XA START 'xa_trx';
+INSERT INTO t VALUES (6);
+INSERT INTO tm VALUES (6);
+CREATE TEMPORARY TABLE tmp_i LIKE t;
+CREATE TEMPORARY TABLE tmp_m LIKE tm;
+INSERT INTO tmp_i VALUES (6);
+INSERT INTO tmp_m VALUES (6);
+INSERT INTO t SELECT * FROM tmp_i;
+INSERT INTO tm SELECT * FROM tmp_m;
+XA END 'xa_trx';
+XA PREPARE 'xa_trx';
+XA COMMIT 'xa_trx' ;
+DROP TEMPORARY TABLE tmp_i;
+DROP TEMPORARY TABLE tmp_m;
+XA START 'xa_trx';
+CREATE TEMPORARY TABLE tmp_i LIKE t;
+CREATE TEMPORARY TABLE tmp_m LIKE tm;
+INSERT INTO tmp_i VALUES (7);
+INSERT INTO tmp_m VALUES (7);
+INSERT INTO t SELECT * FROM tmp_i;
+INSERT INTO tm SELECT * FROM tmp_m;
+INSERT INTO t VALUES (7);
+INSERT INTO tm VALUES (7);
+XA END 'xa_trx';
+XA PREPARE 'xa_trx';
+XA COMMIT 'xa_trx' ;
+XA START 'xa_trx';
+INSERT INTO t VALUES (8);
+INSERT INTO tm VALUES (8);
+INSERT INTO tmp_i VALUES (8);
+INSERT INTO tmp_m VALUES (8);
+INSERT INTO t SELECT * FROM tmp_i;
+INSERT INTO tm SELECT * FROM tmp_m;
+DROP TEMPORARY TABLE tmp_i;
+DROP TEMPORARY TABLE tmp_m;
+XA END 'xa_trx';
+XA PREPARE 'xa_trx';
+XA COMMIT 'xa_trx' ;
+XA START 'xa_trx';
+UPDATE t SET a = 99 where a = -1;
+XA END 'xa_trx';
+XA PREPARE 'xa_trx';
+XA COMMIT 'xa_trx' ;
+include/sync_slave_sql_with_master.inc
+connection master;
+=== COMMIT ONE PHASE ===
+XA START 'xa_trx';
+INSERT INTO tm VALUES (1);
+INSERT INTO t VALUES (1);
+XA END 'xa_trx';
+XA COMMIT 'xa_trx' ONE PHASE;
+XA START 'xa_trx';
+INSERT INTO t VALUES (2);
+INSERT INTO tm VALUES (2);
+XA END 'xa_trx';
+XA COMMIT 'xa_trx' ONE PHASE;
+XA START 'xa_trx';
+INSERT INTO tm VALUES (3);
+XA END 'xa_trx';
+XA COMMIT 'xa_trx' ONE PHASE;
+CREATE TEMPORARY TABLE tmp_i LIKE t;
+CREATE TEMPORARY TABLE tmp_m LIKE tm;
+XA START 'xa_trx';
+INSERT INTO t VALUES (4);
+INSERT INTO tm VALUES (4);
+INSERT INTO tmp_i VALUES (4);
+INSERT INTO tmp_m VALUES (4);
+INSERT INTO t SELECT * FROM tmp_i;
+INSERT INTO tm SELECT * FROM tmp_m;
+XA END 'xa_trx';
+XA COMMIT 'xa_trx' ONE PHASE;
+XA START 'xa_trx';
+INSERT INTO tmp_i VALUES (5);
+INSERT INTO tmp_m VALUES (5);
+INSERT INTO t SELECT * FROM tmp_i;
+INSERT INTO tm SELECT * FROM tmp_m;
+INSERT INTO t VALUES (5);
+INSERT INTO tm VALUES (5);
+XA END 'xa_trx';
+XA COMMIT 'xa_trx' ONE PHASE;
+DROP TEMPORARY TABLE tmp_i;
+DROP TEMPORARY TABLE tmp_m;
+XA START 'xa_trx';
+INSERT INTO t VALUES (6);
+INSERT INTO tm VALUES (6);
+CREATE TEMPORARY TABLE tmp_i LIKE t;
+CREATE TEMPORARY TABLE tmp_m LIKE tm;
+INSERT INTO tmp_i VALUES (6);
+INSERT INTO tmp_m VALUES (6);
+INSERT INTO t SELECT * FROM tmp_i;
+INSERT INTO tm SELECT * FROM tmp_m;
+XA END 'xa_trx';
+XA COMMIT 'xa_trx' ONE PHASE;
+DROP TEMPORARY TABLE tmp_i;
+DROP TEMPORARY TABLE tmp_m;
+XA START 'xa_trx';
+CREATE TEMPORARY TABLE tmp_i LIKE t;
+CREATE TEMPORARY TABLE tmp_m LIKE tm;
+INSERT INTO tmp_i VALUES (7);
+INSERT INTO tmp_m VALUES (7);
+INSERT INTO t SELECT * FROM tmp_i;
+INSERT INTO tm SELECT * FROM tmp_m;
+INSERT INTO t VALUES (7);
+INSERT INTO tm VALUES (7);
+XA END 'xa_trx';
+XA COMMIT 'xa_trx' ONE PHASE;
+XA START 'xa_trx';
+INSERT INTO t VALUES (8);
+INSERT INTO tm VALUES (8);
+INSERT INTO tmp_i VALUES (8);
+INSERT INTO tmp_m VALUES (8);
+INSERT INTO t SELECT * FROM tmp_i;
+INSERT INTO tm SELECT * FROM tmp_m;
+DROP TEMPORARY TABLE tmp_i;
+DROP TEMPORARY TABLE tmp_m;
+XA END 'xa_trx';
+XA COMMIT 'xa_trx' ONE PHASE;
+XA START 'xa_trx';
+UPDATE t SET a = 99 where a = -1;
+XA END 'xa_trx';
+XA COMMIT 'xa_trx' ONE PHASE;
+include/sync_slave_sql_with_master.inc
+connection master;
+=== ROLLBACK with PREPARE ===
+XA START 'xa_trx';
+INSERT INTO tm VALUES (1);
+INSERT INTO t VALUES (1);
+XA END 'xa_trx';
+XA PREPARE 'xa_trx';
+xa rollback 'xa_trx' ;
+Warnings:
+Warning 1196 Some non-transactional changed tables couldn't be rolled back
+XA START 'xa_trx';
+INSERT INTO t VALUES (2);
+INSERT INTO tm VALUES (2);
+XA END 'xa_trx';
+XA PREPARE 'xa_trx';
+xa rollback 'xa_trx' ;
+Warnings:
+Warning 1196 Some non-transactional changed tables couldn't be rolled back
+XA START 'xa_trx';
+INSERT INTO tm VALUES (3);
+XA END 'xa_trx';
+XA PREPARE 'xa_trx';
+xa rollback 'xa_trx' ;
+Warnings:
+Warning 1196 Some non-transactional changed tables couldn't be rolled back
+CREATE TEMPORARY TABLE tmp_i LIKE t;
+CREATE TEMPORARY TABLE tmp_m LIKE tm;
+XA START 'xa_trx';
+INSERT INTO t VALUES (4);
+INSERT INTO tm VALUES (4);
+INSERT INTO tmp_i VALUES (4);
+INSERT INTO tmp_m VALUES (4);
+INSERT INTO t SELECT * FROM tmp_i;
+INSERT INTO tm SELECT * FROM tmp_m;
+XA END 'xa_trx';
+XA PREPARE 'xa_trx';
+xa rollback 'xa_trx' ;
+Warnings:
+Warning 1196 Some non-transactional changed tables couldn't be rolled back
+XA START 'xa_trx';
+INSERT INTO tmp_i VALUES (5);
+INSERT INTO tmp_m VALUES (5);
+INSERT INTO t SELECT * FROM tmp_i;
+INSERT INTO tm SELECT * FROM tmp_m;
+INSERT INTO t VALUES (5);
+INSERT INTO tm VALUES (5);
+XA END 'xa_trx';
+XA PREPARE 'xa_trx';
+xa rollback 'xa_trx' ;
+Warnings:
+Warning 1196 Some non-transactional changed tables couldn't be rolled back
+DROP TEMPORARY TABLE tmp_i;
+DROP TEMPORARY TABLE tmp_m;
+XA START 'xa_trx';
+INSERT INTO t VALUES (6);
+INSERT INTO tm VALUES (6);
+CREATE TEMPORARY TABLE tmp_i LIKE t;
+CREATE TEMPORARY TABLE tmp_m LIKE tm;
+INSERT INTO tmp_i VALUES (6);
+INSERT INTO tmp_m VALUES (6);
+INSERT INTO t SELECT * FROM tmp_i;
+INSERT INTO tm SELECT * FROM tmp_m;
+XA END 'xa_trx';
+XA PREPARE 'xa_trx';
+xa rollback 'xa_trx' ;
+Warnings:
+Warning 1196 Some non-transactional changed tables couldn't be rolled back
+DROP TEMPORARY TABLE tmp_i;
+DROP TEMPORARY TABLE tmp_m;
+XA START 'xa_trx';
+CREATE TEMPORARY TABLE tmp_i LIKE t;
+CREATE TEMPORARY TABLE tmp_m LIKE tm;
+INSERT INTO tmp_i VALUES (7);
+INSERT INTO tmp_m VALUES (7);
+INSERT INTO t SELECT * FROM tmp_i;
+INSERT INTO tm SELECT * FROM tmp_m;
+INSERT INTO t VALUES (7);
+INSERT INTO tm VALUES (7);
+XA END 'xa_trx';
+XA PREPARE 'xa_trx';
+xa rollback 'xa_trx' ;
+Warnings:
+Warning 1196 Some non-transactional changed tables couldn't be rolled back
+XA START 'xa_trx';
+INSERT INTO t VALUES (8);
+INSERT INTO tm VALUES (8);
+INSERT INTO tmp_i VALUES (8);
+INSERT INTO tmp_m VALUES (8);
+INSERT INTO t SELECT * FROM tmp_i;
+INSERT INTO tm SELECT * FROM tmp_m;
+DROP TEMPORARY TABLE tmp_i;
+DROP TEMPORARY TABLE tmp_m;
+XA END 'xa_trx';
+XA PREPARE 'xa_trx';
+xa rollback 'xa_trx' ;
+Warnings:
+Warning 1196 Some non-transactional changed tables couldn't be rolled back
+XA START 'xa_trx';
+UPDATE t SET a = 99 where a = -1;
+XA END 'xa_trx';
+XA PREPARE 'xa_trx';
+xa rollback 'xa_trx' ;
+include/sync_slave_sql_with_master.inc
+connection master;
+=== ROLLBACK with no PREPARE ===
+XA START 'xa_trx';
+INSERT INTO tm VALUES (1);
+INSERT INTO t VALUES (1);
+XA END 'xa_trx';
+xa rollback 'xa_trx' ;
+Warnings:
+Warning 1196 Some non-transactional changed tables couldn't be rolled back
+XA START 'xa_trx';
+INSERT INTO t VALUES (2);
+INSERT INTO tm VALUES (2);
+XA END 'xa_trx';
+xa rollback 'xa_trx' ;
+Warnings:
+Warning 1196 Some non-transactional changed tables couldn't be rolled back
+XA START 'xa_trx';
+INSERT INTO tm VALUES (3);
+XA END 'xa_trx';
+xa rollback 'xa_trx' ;
+Warnings:
+Warning 1196 Some non-transactional changed tables couldn't be rolled back
+CREATE TEMPORARY TABLE tmp_i LIKE t;
+CREATE TEMPORARY TABLE tmp_m LIKE tm;
+XA START 'xa_trx';
+INSERT INTO t VALUES (4);
+INSERT INTO tm VALUES (4);
+INSERT INTO tmp_i VALUES (4);
+INSERT INTO tmp_m VALUES (4);
+INSERT INTO t SELECT * FROM tmp_i;
+INSERT INTO tm SELECT * FROM tmp_m;
+XA END 'xa_trx';
+xa rollback 'xa_trx' ;
+Warnings:
+Warning 1196 Some non-transactional changed tables couldn't be rolled back
+XA START 'xa_trx';
+INSERT INTO tmp_i VALUES (5);
+INSERT INTO tmp_m VALUES (5);
+INSERT INTO t SELECT * FROM tmp_i;
+INSERT INTO tm SELECT * FROM tmp_m;
+INSERT INTO t VALUES (5);
+INSERT INTO tm VALUES (5);
+XA END 'xa_trx';
+xa rollback 'xa_trx' ;
+Warnings:
+Warning 1196 Some non-transactional changed tables couldn't be rolled back
+DROP TEMPORARY TABLE tmp_i;
+DROP TEMPORARY TABLE tmp_m;
+XA START 'xa_trx';
+INSERT INTO t VALUES (6);
+INSERT INTO tm VALUES (6);
+CREATE TEMPORARY TABLE tmp_i LIKE t;
+CREATE TEMPORARY TABLE tmp_m LIKE tm;
+INSERT INTO tmp_i VALUES (6);
+INSERT INTO tmp_m VALUES (6);
+INSERT INTO t SELECT * FROM tmp_i;
+INSERT INTO tm SELECT * FROM tmp_m;
+XA END 'xa_trx';
+xa rollback 'xa_trx' ;
+Warnings:
+Warning 1196 Some non-transactional changed tables couldn't be rolled back
+DROP TEMPORARY TABLE tmp_i;
+DROP TEMPORARY TABLE tmp_m;
+XA START 'xa_trx';
+CREATE TEMPORARY TABLE tmp_i LIKE t;
+CREATE TEMPORARY TABLE tmp_m LIKE tm;
+INSERT INTO tmp_i VALUES (7);
+INSERT INTO tmp_m VALUES (7);
+INSERT INTO t SELECT * FROM tmp_i;
+INSERT INTO tm SELECT * FROM tmp_m;
+INSERT INTO t VALUES (7);
+INSERT INTO tm VALUES (7);
+XA END 'xa_trx';
+xa rollback 'xa_trx' ;
+Warnings:
+Warning 1196 Some non-transactional changed tables couldn't be rolled back
+XA START 'xa_trx';
+INSERT INTO t VALUES (8);
+INSERT INTO tm VALUES (8);
+INSERT INTO tmp_i VALUES (8);
+INSERT INTO tmp_m VALUES (8);
+INSERT INTO t SELECT * FROM tmp_i;
+INSERT INTO tm SELECT * FROM tmp_m;
+DROP TEMPORARY TABLE tmp_i;
+DROP TEMPORARY TABLE tmp_m;
+XA END 'xa_trx';
+xa rollback 'xa_trx' ;
+Warnings:
+Warning 1196 Some non-transactional changed tables couldn't be rolled back
+XA START 'xa_trx';
+UPDATE t SET a = 99 where a = -1;
+XA END 'xa_trx';
+xa rollback 'xa_trx' ;
+include/sync_slave_sql_with_master.inc
+include/diff_tables.inc [master:tm, slave:tm]
+connection master;
+DROP TABLE t, tm;
+include/sync_slave_sql_with_master.inc
+include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/create_or_replace.inc b/mysql-test/suite/rpl/t/create_or_replace.inc
index 35a6ead60ca..df46cc36e97 100644
--- a/mysql-test/suite/rpl/t/create_or_replace.inc
+++ b/mysql-test/suite/rpl/t/create_or_replace.inc
@@ -56,6 +56,7 @@ create or replace table t1 (a int primary key) select a from t2;
# Same with temporary table
create temporary table t9 (a int);
+
--error ER_DUP_ENTRY
create or replace temporary table t9 (a int primary key) select a from t2;
diff --git a/mysql-test/suite/rpl/t/grant_replication_slave.test b/mysql-test/suite/rpl/t/grant_replication_slave.test
new file mode 100644
index 00000000000..c5aca0a60e1
--- /dev/null
+++ b/mysql-test/suite/rpl/t/grant_replication_slave.test
@@ -0,0 +1,39 @@
+--echo #
+--echo # MDEV-21743 Split up SUPER privilege to smaller privileges
+--echo #
+
+# Checking that REPLICATION SLAVE is enough to start replication
+
+create user rpl@localhost;
+grant replication slave on *.* to rpl@localhost;
+
+source include/master-slave.inc;
+connection slave;
+stop slave;
+change master to master_user='rpl';
+connection master;
+
+create database mysqltest1;
+create table mysqltest1.t1 (a int);
+insert mysqltest1.t1 values (1),(2),(3);
+select * from mysqltest1.t1;
+flush tables;
+create user foo@localhost;
+grant select on *.* to foo@localhost;
+
+connection slave;
+start slave;
+connection master;
+sync_slave_with_master;
+select * from mysqltest1.t1;
+show grants for foo@localhost;
+connection master;
+drop user foo@localhost;
+drop database mysqltest1;
+sync_slave_with_master;
+stop slave;
+change master to master_user='root';
+start slave;
+
+source include/rpl_end.inc;
+drop user rpl@localhost;
diff --git a/mysql-test/suite/rpl/t/rpl_create_drop_view.test b/mysql-test/suite/rpl/t/rpl_create_drop_view.test
index c26243ab3c6..4abb3ffb252 100644
--- a/mysql-test/suite/rpl/t/rpl_create_drop_view.test
+++ b/mysql-test/suite/rpl/t/rpl_create_drop_view.test
@@ -38,7 +38,8 @@ SELECT * FROM t1;
SELECT * FROM v1;
connection master;
-DROP VIEW v1;
+RENAME TABLE v1 TO v2;
+DROP VIEW v2;
DROP TABLE t1;
--error ER_UNKNOWN_VIEW
diff --git a/mysql-test/suite/rpl/t/rpl_create_or_replace_fail.test b/mysql-test/suite/rpl/t/rpl_create_or_replace_fail.test
index e75f34b0b56..8624d3c9f1b 100644
--- a/mysql-test/suite/rpl/t/rpl_create_or_replace_fail.test
+++ b/mysql-test/suite/rpl/t/rpl_create_or_replace_fail.test
@@ -38,7 +38,7 @@ CREATE TEMPORARY TABLE t1 (a INT NOT NULL);
--error ER_NO_SUCH_TABLE
LOAD DATA INFILE 'x' INTO TABLE x;
---error ER_PARTITION_NO_TEMPORARY
+--error ER_FEATURE_NOT_SUPPORTED_WITH_PARTITIONING
CREATE OR REPLACE TEMPORARY TABLE t1 (x INT) PARTITION BY HASH(x);
--echo "************** DROP TEMPORARY TABLE Should be present in Binary log **************"
diff --git a/mysql-test/suite/rpl/t/rpl_create_xa_prepared.inc b/mysql-test/suite/rpl/t/rpl_create_xa_prepared.inc
new file mode 100644
index 00000000000..b823ebf62ee
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_create_xa_prepared.inc
@@ -0,0 +1,9 @@
+# param $xid to name xa and take part in the connection name
+# param $query to execute as the xa body
+# param $db_ign the default database
+
+--connect (master_$xid, 127.0.0.1,root,,$db,$MASTER_MYPORT,)
+--eval xa start '$xid'
+--eval $query
+--eval xa end '$xid'
+--eval xa prepare '$xid';
diff --git a/mysql-test/suite/rpl/t/rpl_delayed_slave.combinations b/mysql-test/suite/rpl/t/rpl_delayed_slave.combinations
index 8adc75e834f..bac7cb337c9 100644
--- a/mysql-test/suite/rpl/t/rpl_delayed_slave.combinations
+++ b/mysql-test/suite/rpl/t/rpl_delayed_slave.combinations
@@ -1,5 +1,4 @@
[nonparallel]
[parallel]
---slave-parallel-mode=conservative
--slave-parallel-threads=10
diff --git a/mysql-test/suite/rpl/t/rpl_failed_drop_tbl_binlog.opt b/mysql-test/suite/rpl/t/rpl_failed_drop_tbl_binlog.opt
new file mode 100644
index 00000000000..14fe8f7b579
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_failed_drop_tbl_binlog.opt
@@ -0,0 +1 @@
+--loose-innodb-adaptive-hash-index
diff --git a/mysql-test/suite/rpl/t/rpl_foreign_key_innodb.test b/mysql-test/suite/rpl/t/rpl_foreign_key_innodb.test
index 53db1723325..2c4af75e020 100644
--- a/mysql-test/suite/rpl/t/rpl_foreign_key_innodb.test
+++ b/mysql-test/suite/rpl/t/rpl_foreign_key_innodb.test
@@ -57,5 +57,22 @@ select count(*) from t1 /* must be zero */;
connection master;
drop table t2,t1;
+set foreign_key_checks=1;
+
+--echo #
+--echo # MDEV-25530 Error 1451 on slave: Cannot delete or update a parent row: a foreign key constraint fails
+--echo #
+
+create table t1 (id int primary key)engine=innodb;
+create table t2 (id int not null primary key auto_increment,
+ id2 int default null, key f1 (id2),
+ constraint f1 foreign key (id2) references t1 (id) on delete cascade) engine=innodb;
+error ER_ROW_IS_REFERENCED_2;
+drop table t1,t2;
+sync_slave_with_master;
+show tables;
+connection master;
+drop table t1;
+sync_slave_with_master;
--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_gtid_crash-master.opt b/mysql-test/suite/rpl/t/rpl_gtid_crash-master.opt
index 425fda95086..590d44a6d12 100644
--- a/mysql-test/suite/rpl/t/rpl_gtid_crash-master.opt
+++ b/mysql-test/suite/rpl/t/rpl_gtid_crash-master.opt
@@ -1 +1 @@
---skip-stack-trace --skip-core-file
+--loose-skip-stack-trace --skip-core-file
diff --git a/mysql-test/suite/rpl/t/rpl_gtid_crash_myisam-master.opt b/mysql-test/suite/rpl/t/rpl_gtid_crash_myisam-master.opt
index 32711eb9726..16d8af5b6f1 100644
--- a/mysql-test/suite/rpl/t/rpl_gtid_crash_myisam-master.opt
+++ b/mysql-test/suite/rpl/t/rpl_gtid_crash_myisam-master.opt
@@ -1 +1 @@
---skip-stack-trace --skip-core-file --skip-innodb
+--loose-skip-stack-trace --skip-core-file --skip-innodb
diff --git a/mysql-test/suite/rpl/t/rpl_heartbeat_basic.test b/mysql-test/suite/rpl/t/rpl_heartbeat_basic.test
index 4c8d3a1fedb..f12c5921ba2 100644
--- a/mysql-test/suite/rpl/t/rpl_heartbeat_basic.test
+++ b/mysql-test/suite/rpl/t/rpl_heartbeat_basic.test
@@ -12,7 +12,7 @@
--source include/master-slave.inc
#
# The test runs long and does not have any specifics to
-# binlog_format. It is choosen therefore to run with MIXED mode
+# binlog_format. It is chosen therefore to run with MIXED mode
# in order to not slow down much `make test'.
#
--source include/have_binlog_format_mixed.inc
diff --git a/mysql-test/suite/rpl/t/rpl_mdev6386.test b/mysql-test/suite/rpl/t/rpl_mdev6386.test
index e85b1ae0132..e6fb72dc788 100644
--- a/mysql-test/suite/rpl/t/rpl_mdev6386.test
+++ b/mysql-test/suite/rpl/t/rpl_mdev6386.test
@@ -10,6 +10,7 @@ CREATE TABLE t1 (a INT PRIMARY KEY, b INT) Engine=InnoDB;
--source include/stop_slave.inc
# Provoke a duplicate key error on replication.
SET sql_log_bin= 0;
+CALL mtr.add_suppression("Commit failed due to failure of an earlier commit on which this one depends");
INSERT INTO t1 VALUES (1, 2);
SET sql_log_bin= 1;
CHANGE MASTER TO master_use_gtid= current_pos;
diff --git a/mysql-test/suite/rpl/t/rpl_mixed_implicit_commit_binlog.test b/mysql-test/suite/rpl/t/rpl_mixed_implicit_commit_binlog.test
index e3dc6cbaa73..8e40295ecfb 100644
--- a/mysql-test/suite/rpl/t/rpl_mixed_implicit_commit_binlog.test
+++ b/mysql-test/suite/rpl/t/rpl_mixed_implicit_commit_binlog.test
@@ -7,6 +7,6 @@
--source include/master-slave.inc
--let $engine=Innodb
-set session storage_engine=innodb;
+set session default_storage_engine=innodb;
--source include/rpl_implicit_commit_binlog.test
--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_parallel.test b/mysql-test/suite/rpl/t/rpl_parallel.test
deleted file mode 100644
index ee39bfa7a39..00000000000
--- a/mysql-test/suite/rpl/t/rpl_parallel.test
+++ /dev/null
@@ -1 +0,0 @@
---source include/rpl_parallel.inc
diff --git a/mysql-test/suite/rpl/t/rpl_parallel_analyze_table_hang.test b/mysql-test/suite/rpl/t/rpl_parallel_analyze_table_hang.test
new file mode 100644
index 00000000000..c1f1b9bac43
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_parallel_analyze_table_hang.test
@@ -0,0 +1 @@
+--source include/rpl_parallel_analyze_table_hang.inc
diff --git a/mysql-test/suite/rpl/t/rpl_parallel_conflicts-slave.opt b/mysql-test/suite/rpl/t/rpl_parallel_conflicts-slave.opt
deleted file mode 100644
index af7bd138793..00000000000
--- a/mysql-test/suite/rpl/t/rpl_parallel_conflicts-slave.opt
+++ /dev/null
@@ -1 +0,0 @@
---slave_parallel_threads=40 --slave_parallel_mode=conservative --slave_transaction_retries=5
diff --git a/mysql-test/suite/rpl/t/rpl_parallel_conflicts.test b/mysql-test/suite/rpl/t/rpl_parallel_conflicts.test
index fc294f68197..0ba6a2b2dc1 100644
--- a/mysql-test/suite/rpl/t/rpl_parallel_conflicts.test
+++ b/mysql-test/suite/rpl/t/rpl_parallel_conflicts.test
@@ -15,7 +15,12 @@ CREATE TABLE t8 (a int PRIMARY KEY, b INT) ENGINE=InnoDB;
--connection server_2
--sync_with_master
--source include/stop_slave.inc
-
+SET @old_mode= @@GLOBAL.slave_parallel_mode;
+SET GLOBAL slave_parallel_mode='conservative';
+SET @old_threads= @@GLOBAL.slave_parallel_threads;
+SET GLOBAL slave_parallel_threads=40;
+SET @old_transaction_retries= @@GLOBAL.slave_transaction_retries;
+SET GLOBAL slave_transaction_retries=5;
# Using dbug error injection, we artificially create event groups with a lot of
# conflicting transactions in each event group. The bugs were originally seen
@@ -249,6 +254,9 @@ SELECT * FROM t7 ORDER BY a;
--source include/stop_slave.inc
SET GLOBAL debug_dbug=@old_dbug;
+SET GLOBAL slave_parallel_mode=@old_mode;
+SET GLOBAL slave_parallel_threads=@old_threads;
+SET GLOBAL slave_transaction_retries=@old_transaction_retries;
# Clean up.
--source include/start_slave.inc
diff --git a/mysql-test/suite/rpl/t/rpl_parallel_deadlock_corrupt_binlog.test b/mysql-test/suite/rpl/t/rpl_parallel_deadlock_corrupt_binlog.test
new file mode 100644
index 00000000000..9ee06f59858
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_parallel_deadlock_corrupt_binlog.test
@@ -0,0 +1 @@
+--source include/rpl_parallel_deadlock_corrupt_binlog.inc
diff --git a/mysql-test/suite/rpl/t/rpl_parallel_domain.test b/mysql-test/suite/rpl/t/rpl_parallel_domain.test
new file mode 100644
index 00000000000..f5864380f02
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_parallel_domain.test
@@ -0,0 +1 @@
+--source include/rpl_parallel_domain.inc
diff --git a/mysql-test/suite/rpl/t/rpl_parallel_domain_slave_single_grp.test b/mysql-test/suite/rpl/t/rpl_parallel_domain_slave_single_grp.test
new file mode 100644
index 00000000000..5ddd2af323c
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_parallel_domain_slave_single_grp.test
@@ -0,0 +1 @@
+--source include/rpl_parallel_domain_slave_single_grp.inc
diff --git a/mysql-test/suite/rpl/t/rpl_parallel_free_deferred_event.test b/mysql-test/suite/rpl/t/rpl_parallel_free_deferred_event.test
new file mode 100644
index 00000000000..e2a41d0db7e
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_parallel_free_deferred_event.test
@@ -0,0 +1 @@
+--source include/rpl_parallel_free_deferred_event.inc
diff --git a/mysql-test/suite/rpl/t/rpl_parallel_gco_wait_kill.test b/mysql-test/suite/rpl/t/rpl_parallel_gco_wait_kill.test
new file mode 100644
index 00000000000..d9dc4dfd293
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_parallel_gco_wait_kill.test
@@ -0,0 +1 @@
+--source include/rpl_parallel_gco_wait_kill.inc
diff --git a/mysql-test/suite/rpl/t/rpl_parallel_gtid_slave_pos_update_fail.test b/mysql-test/suite/rpl/t/rpl_parallel_gtid_slave_pos_update_fail.test
new file mode 100644
index 00000000000..0756caca084
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_parallel_gtid_slave_pos_update_fail.test
@@ -0,0 +1 @@
+--source include/rpl_parallel_gtid_slave_pos_update_fail.inc
diff --git a/mysql-test/suite/rpl/t/rpl_parallel_ignore_error_on_rotate.test b/mysql-test/suite/rpl/t/rpl_parallel_ignore_error_on_rotate.test
new file mode 100644
index 00000000000..92c84d497a7
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_parallel_ignore_error_on_rotate.test
@@ -0,0 +1 @@
+--source include/rpl_parallel_ignore_error_on_rotate.inc
diff --git a/mysql-test/suite/rpl/t/rpl_parallel_incorrect_relay_pos.test b/mysql-test/suite/rpl/t/rpl_parallel_incorrect_relay_pos.test
new file mode 100644
index 00000000000..e0226d9453e
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_parallel_incorrect_relay_pos.test
@@ -0,0 +1 @@
+--source include/rpl_parallel_incorrect_relay_pos.inc
diff --git a/mysql-test/suite/rpl/t/rpl_parallel_innodb_lock_conflict.test b/mysql-test/suite/rpl/t/rpl_parallel_innodb_lock_conflict.test
new file mode 100644
index 00000000000..3838973c201
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_parallel_innodb_lock_conflict.test
@@ -0,0 +1 @@
+--source include/rpl_parallel_innodb_lock_conflict.inc
diff --git a/mysql-test/suite/rpl/t/rpl_parallel_mdev6589.test b/mysql-test/suite/rpl/t/rpl_parallel_mdev6589.test
index 5929fad71df..981c6216376 100644
--- a/mysql-test/suite/rpl/t/rpl_parallel_mdev6589.test
+++ b/mysql-test/suite/rpl/t/rpl_parallel_mdev6589.test
@@ -99,6 +99,7 @@ eval SELECT MASTER_GTID_WAIT('$wait_pos');
# duplicate key error.
--connection con_temp1
COMMIT;
+CALL mtr.add_suppression("Commit failed due to failure of an earlier commit on which this one depends");
SET sql_log_bin=1;
--connection server_2
diff --git a/mysql-test/suite/rpl/t/rpl_parallel_missed_error_handling.test b/mysql-test/suite/rpl/t/rpl_parallel_missed_error_handling.test
new file mode 100644
index 00000000000..de9dc7f782a
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_parallel_missed_error_handling.test
@@ -0,0 +1 @@
+--source include/rpl_parallel_missed_error_handling.inc
diff --git a/mysql-test/suite/rpl/t/rpl_parallel_mode.test b/mysql-test/suite/rpl/t/rpl_parallel_mode.test
new file mode 100644
index 00000000000..afd9e038912
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_parallel_mode.test
@@ -0,0 +1 @@
+--source include/rpl_parallel_mode.inc
diff --git a/mysql-test/suite/rpl/t/rpl_parallel_optimistic_xa.test b/mysql-test/suite/rpl/t/rpl_parallel_optimistic_xa.test
new file mode 100644
index 00000000000..35c22d1e92e
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_parallel_optimistic_xa.test
@@ -0,0 +1,235 @@
+# The tests verify concurrent execution of replicated (MDEV-742)
+# XA transactions in the parallel optimistic mode.
+
+--source include/have_innodb.inc
+--source include/have_perfschema.inc
+--source include/master-slave.inc
+
+# Tests' global declarations
+--let $trx = _trx_
+
+call mtr.add_suppression("Deadlock found when trying to get lock; try restarting transaction");
+call mtr.add_suppression("WSREP: handlerton rollback failed");
+#call mtr.add_suppression("Can't find record in 't1'");
+CREATE VIEW v_processlist as SELECT * FROM performance_schema.threads where type = 'FOREGROUND';
+
+--connection master
+ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+--save_master_pos
+
+# Prepare to restart slave into optimistic parallel mode
+--connection slave
+--sync_with_master
+--source include/stop_slave.inc
+SET @old_parallel_threads = @@GLOBAL.slave_parallel_threads;
+SET @@global.slave_parallel_threads = 7;
+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;
+
+CHANGE MASTER TO master_use_gtid=slave_pos;
+
+# LOAD GENERATOR creates XA:s interleaved in binlog when they are from
+# different connections. All the following block XA:s of the same connection
+# update the same data which challenges slave optimistic scheduler's correctness.
+# Slave must eventually apply such load, and correctly (checked).
+
+--connection master
+CREATE TABLE t0 (a int, b INT) ENGINE=InnoDB;
+CREATE TABLE t1 (a int PRIMARY KEY, b INT) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1, 0);
+
+
+# I. Logging some sequence of XA:s by one connection.
+#
+# The slave applier's task is to successfully execute a series of
+# Prepare and Complete parts of a sequence of XA:s
+
+--let $trx_num = 300
+--let $i = $trx_num
+--let $conn = master
+--disable_query_log
+while($i > 0)
+{
+ # 'decision' to commit 0, or rollback 1
+ --let $decision = `SELECT $i % 2`
+ --eval XA START '$conn$trx$i'
+ --eval UPDATE t1 SET b = 1 - 2 * $decision WHERE a = 1
+ --eval XA END '$conn$trx$i'
+ --let $one_phase = `SELECT IF(floor(rand()*10)%2, "ONE PHASE", 0)`
+ if (!$one_phase)
+ {
+ --eval XA PREPARE '$conn$trx$i'
+ --let $one_phase =
+ }
+
+ --let $term = COMMIT
+ if ($decision)
+ {
+ --let $term = ROLLBACK
+ --let $one_phase =
+ }
+ --eval XA $term '$conn$trx$i' $one_phase
+
+ --dec $i
+}
+--enable_query_log
+--source include/save_master_gtid.inc
+
+--connection slave
+--source include/start_slave.inc
+--source include/sync_with_master_gtid.inc
+--source include/stop_slave.inc
+
+
+# II. Logging XS:s from multiple connections in random interweaving manner:
+#
+# in a loop ($i) per connection
+# arrange an inner ($k) loop where
+# start and prepare an XA;
+# decide whether to terminate it and then continue to loop innerly
+# OR disconnect to break the inner loop;
+# the disconnected one's XA is taken care by 'master' connection
+#
+# Effectively binlog must collect a well mixed XA- prepared and terminated
+# groups for slave to handle.
+
+--connection master
+# Total # of connections
+--let $conn_num=53
+
+--let $i = $conn_num
+--disable_query_log
+while($i > 0)
+{
+ --connect (master_conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,)
+--dec $i
+}
+--enable_query_log
+
+--let $i = $conn_num
+while($i > 0)
+{
+ --let $conn_i = conn$i
+ # $i2 indexes the current connection's "own" row
+ --let $i2 = `SELECT $i + 2`
+--disable_query_log
+ --connection master_conn$i
+--enable_query_log
+ --disable_query_log
+ --let $i_conn_id = `SELECT connection_id()`
+
+ --let $decision = 0
+ # the row id of the last connection that committed its XA
+ --let $c_max = 1
+ --let $k = 0
+ while ($decision < 3)
+ {
+ --inc $k
+ --eval XA START '$conn_i$trx$k'
+ # UPDATE depends on previously *committed* transactions
+ --eval UPDATE t1 SET b = b + $k + 1 WHERE a = $c_max
+ if (`SELECT $k % 2 = 1`)
+ {
+ --eval REPLACE INTO t1 VALUES ($i2, $k)
+ }
+ if (`SELECT $k % 2 = 0`)
+ {
+ --eval DELETE FROM t1 WHERE a = $i2
+ }
+ CREATE TEMPORARY TABLE tmp LIKE t0;
+ --eval INSERT INTO tmp SET a=$i, b= $k
+ INSERT INTO t0 SELECT * FROM tmp;
+ DROP TEMPORARY TABLE tmp;
+ --eval XA END '$conn_i$trx$k'
+
+ --let $term = COMMIT
+ --let $decision = `SELECT (floor(rand()*10 % 10) + ($i+$k)) % 4`
+ if ($decision == 1)
+ {
+ --let $term = ROLLBACK
+ }
+ if ($decision < 2)
+ {
+ --eval XA PREPARE '$conn_i$trx$k'
+ --eval XA $term '$conn_i$trx$k'
+ # Iteration counter is taken care *now*
+ }
+ if ($decision == 2)
+ {
+ --eval XA COMMIT '$conn_i$trx$k' ONE PHASE
+ }
+ }
+
+ # $decision = 3
+ --eval XA PREPARE '$conn_i$trx$k'
+ # disconnect now
+ --disconnect master_conn$i
+ --connection master
+
+ --let $wait_condition= SELECT count(*) = 0 FROM v_processlist WHERE PROCESSLIST_ID = $i_conn_id
+ --source include/wait_condition.inc
+
+ --disable_query_log
+ --let $decision = `SELECT ($i+$k) % 2`
+ --let $term = COMMIT
+ if ($decision == 1)
+ {
+ --let $term = ROLLBACK
+ }
+ --eval XA $term '$conn_i$trx$k'
+ --let $c_max = $i2
+
+--dec $i
+}
+--enable_query_log
+--source include/save_master_gtid.inc
+
+--connection slave
+--source include/start_slave.inc
+--source include/sync_with_master_gtid.inc
+
+#
+# Overall consistency check
+#
+--let $diff_tables= master:t0, slave:t0
+--source include/diff_tables.inc
+--let $diff_tables= master:t1, slave:t1
+--source include/diff_tables.inc
+
+
+#
+# Clean up.
+#
+--connection slave
+--source include/stop_slave.inc
+set global log_warnings=default;
+SET GLOBAL slave_parallel_mode=@old_parallel_mode;
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+--source include/start_slave.inc
+
+--connection master
+DROP VIEW v_processlist;
+DROP TABLE t0, t1;
+--source include/save_master_gtid.inc
+
+--connection slave
+--source include/sync_with_master_gtid.inc
+# 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 master
+--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_parallel_optimistic_xa_lsu_off-slave.opt b/mysql-test/suite/rpl/t/rpl_parallel_optimistic_xa_lsu_off-slave.opt
new file mode 100644
index 00000000000..88cf77fd281
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_parallel_optimistic_xa_lsu_off-slave.opt
@@ -0,0 +1 @@
+--log-slave-updates=OFF
diff --git a/mysql-test/suite/rpl/t/rpl_parallel_optimistic_xa_lsu_off.test b/mysql-test/suite/rpl/t/rpl_parallel_optimistic_xa_lsu_off.test
new file mode 100644
index 00000000000..f82b522eefe
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_parallel_optimistic_xa_lsu_off.test
@@ -0,0 +1,2 @@
+# --log-slave-updates OFF version of rpl_parallel_optimistic_xa
+--source rpl_parallel_optimistic_xa.test
diff --git a/mysql-test/suite/rpl/t/rpl_parallel_partial_binlog_trans.test b/mysql-test/suite/rpl/t/rpl_parallel_partial_binlog_trans.test
new file mode 100644
index 00000000000..7be26edabb8
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_parallel_partial_binlog_trans.test
@@ -0,0 +1 @@
+--source include/rpl_parallel_partial_binlog_trans.inc
diff --git a/mysql-test/suite/rpl/t/rpl_parallel_record_gtid_wakeup.test b/mysql-test/suite/rpl/t/rpl_parallel_record_gtid_wakeup.test
new file mode 100644
index 00000000000..4529a268103
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_parallel_record_gtid_wakeup.test
@@ -0,0 +1 @@
+--source include/rpl_parallel_record_gtid_wakeup.inc
diff --git a/mysql-test/suite/rpl/t/rpl_parallel_retry_deadlock.test b/mysql-test/suite/rpl/t/rpl_parallel_retry_deadlock.test
new file mode 100644
index 00000000000..50b216b6f58
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_parallel_retry_deadlock.test
@@ -0,0 +1 @@
+--source include/rpl_parallel_retry_deadlock.inc
diff --git a/mysql-test/suite/rpl/t/rpl_parallel_rollback_assert.test b/mysql-test/suite/rpl/t/rpl_parallel_rollback_assert.test
new file mode 100644
index 00000000000..f66375b7fb4
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_parallel_rollback_assert.test
@@ -0,0 +1 @@
+--source include/rpl_parallel_rollback_assert.inc
diff --git a/mysql-test/suite/rpl/t/rpl_parallel_single_grpcmt.test b/mysql-test/suite/rpl/t/rpl_parallel_single_grpcmt.test
new file mode 100644
index 00000000000..20919823945
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_parallel_single_grpcmt.test
@@ -0,0 +1 @@
+--source include/rpl_parallel_single_grpcmt.inc
diff --git a/mysql-test/suite/rpl/t/rpl_parallel_slave_bgc_kill.test b/mysql-test/suite/rpl/t/rpl_parallel_slave_bgc_kill.test
new file mode 100644
index 00000000000..7b0f9485e5e
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_parallel_slave_bgc_kill.test
@@ -0,0 +1 @@
+--source include/rpl_parallel_slave_bgc_kill.inc
diff --git a/mysql-test/suite/rpl/t/rpl_parallel_stop_on_con_kill.test b/mysql-test/suite/rpl/t/rpl_parallel_stop_on_con_kill.test
new file mode 100644
index 00000000000..64b4cb77dd4
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_parallel_stop_on_con_kill.test
@@ -0,0 +1 @@
+--source include/rpl_parallel_stop_on_con_kill.inc
diff --git a/mysql-test/suite/rpl/t/rpl_parallel_stop_slave.test b/mysql-test/suite/rpl/t/rpl_parallel_stop_slave.test
new file mode 100644
index 00000000000..131ddc2efd9
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_parallel_stop_slave.test
@@ -0,0 +1 @@
+--source include/rpl_parallel_stop_slave.inc
diff --git a/mysql-test/suite/rpl/t/rpl_parallel_temptable-master.opt b/mysql-test/suite/rpl/t/rpl_parallel_temptable-master.opt
index 425fda95086..590d44a6d12 100644
--- a/mysql-test/suite/rpl/t/rpl_parallel_temptable-master.opt
+++ b/mysql-test/suite/rpl/t/rpl_parallel_temptable-master.opt
@@ -1 +1 @@
---skip-stack-trace --skip-core-file
+--loose-skip-stack-trace --skip-core-file
diff --git a/mysql-test/suite/rpl/t/rpl_parallel_wrong_binlog_order.test b/mysql-test/suite/rpl/t/rpl_parallel_wrong_binlog_order.test
new file mode 100644
index 00000000000..3c920e1539a
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_parallel_wrong_binlog_order.test
@@ -0,0 +1 @@
+--source include/rpl_parallel_wrong_binlog_order.inc
diff --git a/mysql-test/suite/rpl/t/rpl_parallel_wrong_exec_master_pos.test b/mysql-test/suite/rpl/t/rpl_parallel_wrong_exec_master_pos.test
new file mode 100644
index 00000000000..9cd700f57fa
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_parallel_wrong_exec_master_pos.test
@@ -0,0 +1 @@
+--source include/rpl_parallel_wrong_exec_master_pos.inc
diff --git a/mysql-test/suite/rpl/t/rpl_parallel_xa_same_xid.test b/mysql-test/suite/rpl/t/rpl_parallel_xa_same_xid.test
new file mode 100644
index 00000000000..888dd2f177b
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_parallel_xa_same_xid.test
@@ -0,0 +1,138 @@
+# The tests verify concurrent execution of replicated (MDEV-742)
+# XA transactions in the parallel optimistic mode.
+# Prove optimistic scheduler handles xid-namesake XA:s.
+# That is despite running in parallel there must be no conflicts
+# caused by multiple transactions' same xid.
+
+--source include/have_binlog_format_mixed_or_row.inc
+--source include/have_innodb.inc
+--source include/have_perfschema.inc
+--source include/master-slave.inc
+
+--let $xid_num = 19
+--let $repeat = 17
+--let $workers = 7
+--connection slave
+call mtr.add_suppression("WSREP: handlerton rollback failed");
+
+--source include/stop_slave.inc
+# a measure against MDEV-20605
+ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+
+SET @old_parallel_threads = @@GLOBAL.slave_parallel_threads;
+--disable_query_log
+--eval SET @@global.slave_parallel_threads = $workers
+--enable_query_log
+SET @old_parallel_mode = @@GLOBAL.slave_parallel_mode;
+SET @@global.slave_parallel_mode ='optimistic';
+--source include/start_slave.inc
+
+--connection master
+CREATE TABLE t1 (a INT, b INT) ENGINE=InnoDB;
+
+--let $i = $xid_num
+--let $t = t1
+--disable_query_log
+while ($i)
+{
+--let $k = $repeat
+while ($k)
+{
+--eval XA START 'xid_$i'
+--eval INSERT INTO $t SET a=$i, b=$k
+--eval XA END 'xid_$i'
+--let $one_phase = `SELECT IF(floor(rand()*10)%2, "ONE PHASE", 0)`
+ if (!$one_phase)
+ {
+ --eval XA PREPARE 'xid_$i'
+ --eval XA COMMIT 'xid_$i'
+ }
+ if ($one_phase)
+ {
+ --eval XA COMMIT 'xid_$i' ONE PHASE
+ }
+
+ if (!$one_phase)
+ {
+ --eval XA START 'xid_$i'
+ --eval INSERT INTO $t SET a=$i, b=$k
+ --eval XA END 'xid_$i'
+ --eval XA PREPARE 'xid_$i'
+ --eval XA ROLLBACK 'xid_$i'
+ }
+
+--dec $k
+}
+
+--dec $i
+}
+--enable_query_log
+
+
+
+# Above-like test complicates execution env to create
+# data conflicts as well. They will be resolved by the optmistic
+# scheduler as usual.
+
+CREATE TABLE t2 (a INT AUTO_INCREMENT PRIMARY KEY, b INT) ENGINE=InnoDB;
+
+--let $i = $xid_num
+--let $t = t2
+--disable_query_log
+while ($i)
+{
+--let $k = $repeat
+while ($k)
+{
+--eval XA START 'xid_$i'
+--eval INSERT INTO $t SET a=NULL, b=$k
+--eval UPDATE $t SET b=$k + 1 WHERE a=last_insert_id() % $workers
+--eval XA END 'xid_$i'
+--let $one_phase = `SELECT IF(floor(rand()*10)%2, "ONE PHASE", 0)`
+ if (!$one_phase)
+ {
+ --eval XA PREPARE 'xid_$i'
+ --eval XA COMMIT 'xid_$i'
+ }
+ if ($one_phase)
+ {
+ --eval XA COMMIT 'xid_$i' ONE PHASE
+ }
+
+--eval XA START 'xid_$i'
+--eval UPDATE $t SET b=$k + 1 WHERE a=last_insert_id() % $workers
+--eval DELETE FROM $t WHERE a=last_insert_id()
+--eval XA END 'xid_$i'
+--eval XA PREPARE 'xid_$i'
+--eval XA ROLLBACK 'xid_$i'
+
+--let $do_drop_create = `SELECT IF(floor(rand()*10)%100, 1, 0)`
+if ($do_drop_create)
+{
+ DROP TABLE t1;
+ CREATE TABLE t1 (a INT, b INT) ENGINE=InnoDB;
+}
+--dec $k
+}
+
+--dec $i
+}
+--enable_query_log
+
+--source include/sync_slave_sql_with_master.inc
+--let $diff_tables= master:t1, slave:t1
+--source include/diff_tables.inc
+
+#
+# Clean up.
+#
+--connection slave
+--source include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+SET GLOBAL slave_parallel_mode=@old_parallel_mode;
+--source include/start_slave.inc
+
+--connection master
+DROP TABLE t1, t2;
+
+--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_row_big_table_id.opt b/mysql-test/suite/rpl/t/rpl_row_big_table_id.opt
new file mode 100644
index 00000000000..7c3d2411b28
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_row_big_table_id.opt
@@ -0,0 +1 @@
+--verbose=1
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
index abf22cc876e..4bfdceef297 100644
--- a/mysql-test/suite/rpl/t/rpl_row_big_table_id.test
+++ b/mysql-test/suite/rpl/t/rpl_row_big_table_id.test
@@ -4,6 +4,8 @@
# MDEV-17803 Row-based event is not applied when
# table map id is greater 32 bit int
#
+# This test is depending on that the server was restarted before test was run
+#
# Verify row-based events applying when table map id value is about and greater
# than 1 << 32.
##################################################################
@@ -12,13 +14,8 @@
--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 @saved_dbug = @@SESSION.debug_dbug;
-SET @@debug_dbug="d,simulate_big_table_id";
+SET @old_debug_dbug= @@debug_dbug;
+SET @@debug_dbug="+d,simulate_big_table_id";
CREATE TABLE t (a int);
--let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1)
@@ -51,8 +48,10 @@ if (`SELECT sum(a) != 6 FROM t`)
# Cleanup
--connection master
+SET debug_dbug=@old_debug_dbug;
+
DROP TABLE t;
-SET debug_dbug= @saved_dbug;
+
--sync_slave_with_master
--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_row_create_table.test b/mysql-test/suite/rpl/t/rpl_row_create_table.test
index cb76d6c4dcb..b62955e2cd4 100644
--- a/mysql-test/suite/rpl/t/rpl_row_create_table.test
+++ b/mysql-test/suite/rpl/t/rpl_row_create_table.test
@@ -12,10 +12,10 @@ connection master;
# effect, since the variable is only read on start-up.
sync_slave_with_master;
--disable_query_log
-set @storage_engine = @@global.storage_engine;
+set @@default_storage_engine = @@global.default_storage_engine;
STOP SLAVE;
--source include/wait_for_slave_to_stop.inc
-SET GLOBAL storage_engine=memory;
+SET GLOBAL default_storage_engine=memory;
START SLAVE;
--source include/wait_for_slave_to_start.inc
--enable_query_log
@@ -106,7 +106,7 @@ sync_slave_with_master;
# Here we reset the value of the default storage engine
STOP SLAVE;
--source include/wait_for_slave_to_stop.inc
-SET GLOBAL storage_engine=@storage_engine;
+SET GLOBAL default_storage_engine=@@default_storage_engine;
START SLAVE;
--source include/wait_for_slave_to_start.inc
--enable_ps_protocol
diff --git a/mysql-test/suite/rpl/t/rpl_row_implicit_commit_binlog.test b/mysql-test/suite/rpl/t/rpl_row_implicit_commit_binlog.test
index 68e07ef1f44..ba204b05e22 100644
--- a/mysql-test/suite/rpl/t/rpl_row_implicit_commit_binlog.test
+++ b/mysql-test/suite/rpl/t/rpl_row_implicit_commit_binlog.test
@@ -7,6 +7,6 @@
--source include/master-slave.inc
--let $engine=Innodb
-set session storage_engine=innodb;
+set session default_storage_engine=innodb;
--source include/rpl_implicit_commit_binlog.test
--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_row_triggers.test b/mysql-test/suite/rpl/t/rpl_row_triggers.test
index d5f29b9207d..68002dbe7e2 100644
--- a/mysql-test/suite/rpl/t/rpl_row_triggers.test
+++ b/mysql-test/suite/rpl/t/rpl_row_triggers.test
@@ -323,4 +323,120 @@ drop table t1;
--sync_slave_with_master
+--echo #
+--echo # enterprise 10.4 tests start
+--echo #
+
+--echo #
+--echo # MENT-607 : Make slave_run_triggers_for_rbr enforce triggers to run
+--echo # on slave, even when there are triggers on the master
+--echo #
+
+--echo # Triggers on slave WILL work (with ENFORCE) if master has some
+
+connection master;
+CREATE TABLE t1 (C1 CHAR(1) primary key, C2 CHAR(1)) engine=innodb;
+SELECT * FROM t1;
+
+create trigger t1_dummy before delete on t1 for each row
+ set @dummy= 1;
+
+sync_slave_with_master;
+
+connection slave;
+SET @old_slave_exec_mode= @@global.slave_exec_mode;
+SET @old_slave_run_triggers_for_rbr= @@global.slave_run_triggers_for_rbr;
+SET @@global.slave_exec_mode= IDEMPOTENT;
+SET @@global.slave_run_triggers_for_rbr= ENFORCE;
+SELECT * FROM t1;
+create table t2 (id char(2) primary key, cnt int, o char(1), n char(1));
+insert into t2 values
+ ('u0', 0, ' ', ' '),('u1', 0, ' ', ' '),
+ ('d0', 0, ' ', ' '),('d1', 0, ' ', ' '),
+ ('i0', 0, ' ', ' '),('i1', 0, ' ', ' ');
+create trigger t1_cnt_b before update on t1 for each row
+ update t2 set cnt=cnt+1, o=old.C1, n=new.C1 where id = 'u0';
+create trigger t1_cnt_ib before insert on t1 for each row
+ update t2 set cnt=cnt+1, n=new.C1, o=' ' where id = 'i0';
+create trigger t1_cnt_a after update on t1 for each row
+ update t2 set cnt=cnt+1, o=old.C1, n=new.C1 where id = 'u1';
+create trigger t1_cnt_da after delete on t1 for each row
+ update t2 set cnt=cnt+1, o=old.C1, n=' ' where id = 'd1';
+create trigger t1_cnt_ia after insert on t1 for each row
+ update t2 set cnt=cnt+1, n=new.C1, o=' ' where id = 'i1';
+SELECT * FROM t2 order by id;
+
+connection master;
+--echo # INSERT triggers test
+insert into t1 values ('a','b');
+
+sync_slave_with_master;
+
+connection slave;
+SELECT * FROM t2 order by id;
+
+connection master;
+
+--echo # UPDATE triggers test
+update t1 set C1= 'd';
+
+sync_slave_with_master;
+
+connection slave;
+SELECT * FROM t2 order by id;
+
+connection master;
+--echo # DELETE triggers test
+delete from t1 where C1='d';
+
+sync_slave_with_master;
+
+connection slave;
+SELECT * FROM t2 order by id;
+
+--echo # INSERT triggers which cause also UPDATE test (insert duplicate row)
+insert into t1 values ('0','1');
+
+SELECT * FROM t2 order by id;
+
+connection master;
+
+insert into t1 values ('0','1');
+
+sync_slave_with_master;
+
+connection slave;
+SELECT * FROM t2 order by id;
+
+
+--echo # INSERT triggers which cause also DELETE test
+--echo # (insert duplicate row in table referenced by foreign key)
+insert into t1 values ('1','1');
+
+connection master;
+
+CREATE TABLE t3 (C1 CHAR(1) primary key, FOREIGN KEY (C1) REFERENCES t1(C1) ) engine=innodb;
+
+insert into t1 values ('1','1');
+
+sync_slave_with_master;
+
+connection slave;
+SELECT * FROM t2 order by id;
+
+connection master;
+
+drop table t3,t1;
+
+sync_slave_with_master;
+
+connection slave;
+SET @@global.slave_exec_mode= @old_slave_exec_mode;
+SET @@global.slave_run_triggers_for_rbr= @old_slave_run_triggers_for_rbr;
+drop table t2;
+
+--echo #
+--echo # enterprise 10.4 tests end
+--echo #
+
--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_slave_alias_replica.test b/mysql-test/suite/rpl/t/rpl_slave_alias_replica.test
new file mode 100644
index 00000000000..324821a325f
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_slave_alias_replica.test
@@ -0,0 +1,102 @@
+# ==== Purpose ====
+#
+# Test verifies that SQL statements which use keyword 'REPLICA' a synonym for
+# 'SLAVE' work as expected.
+#
+# ==== Implementation ====
+#
+# List of commands being verified are
+# On Master: SHOW REPLICA HOSTS
+# : Privilege "REPLICA"
+#
+# On Slave: START REPLICA
+# START REPLICA UNTIL
+# STOP REPLICA
+# SHOW REPLICA STATUS
+# RESET REPLICA ALL
+# REPLICA_POS
+#
+# ==== References ====
+#
+# MDEV-20601: Make REPLICA a synonym for SLAVE in SQL statements
+#
+
+--source include/have_innodb.inc
+--source include/master-slave.inc
+
+--echo "Command: STOP SLAVE --> STOP REPLICA"
+--connection slave
+STOP REPLICA;
+--source include/wait_for_slave_io_to_stop.inc
+--source include/wait_for_slave_sql_to_stop.inc
+
+--connection master
+CREATE USER 'repl_user';
+--echo "Privilege: SLAVE --> REPLICA"
+GRANT REPLICATION REPLICA on *.* TO repl_user;
+FLUSH PRIVILEGES;
+
+--connection slave
+--echo "SHOW SLAVE STATUS --> SHOW REPLICA STATUS"
+--let $master_user= query_get_value(SHOW REPLICA STATUS, Master_User, 1)
+CHANGE MASTER TO MASTER_USER= 'repl_user';
+--echo "Command: START SLAVE --> START REPLICA"
+START REPLICA;
+--source include/wait_for_slave_io_to_start.inc
+--source include/wait_for_slave_sql_to_start.inc
+
+--connection master
+--sync_slave_with_master
+
+--connection master
+--echo "Command: SHOW SLAVE HOSTS --> SHOW REPLICA HOSTS"
+let $show_statement= SHOW REPLICA HOSTS;
+let $field= Server_id;
+# Slave's server_id 2
+let $condition= ='2';
+source include/wait_show_condition.inc;
+DROP USER 'repl_user';
+--sync_slave_with_master
+
+--echo "Command: SHOW SLAVE IO/SQL THREAD --> SHOW REPLICA IO/SQL THREAD"
+STOP REPLICA IO_THREAD;
+STOP REPLICA SQL_THREAD;
+--source include/wait_for_slave_io_to_stop.inc
+--source include/wait_for_slave_sql_to_stop.inc
+--echo "Command: RESET SLAVE ALL --> RESET REPLICA ALL"
+RESET REPLICA ALL;
+
+--connection master
+RESET MASTER;
+CREATE TABLE t(f INT) ENGINE=INNODB;
+INSERT INTO t VALUES (10);
+let $master_log_file= query_get_value(SHOW MASTER STATUS, File, 1);
+let $master_pos= query_get_value(SHOW MASTER STATUS, Position, 1);
+DROP TABLE t;
+
+--connection slave
+--replace_result $MASTER_MYPORT MASTER_PORT
+eval CHANGE MASTER TO MASTER_HOST='127.0.0.1',MASTER_PORT=$MASTER_MYPORT,MASTER_USER='$master_user';
+--echo "Command: START SLAVE UNTIL --> START REPLICA UNTIL"
+--replace_result $master_log_file MASTER_LOG_FILE $master_pos MASTER_POS
+--eval START REPLICA UNTIL MASTER_LOG_FILE='$master_log_file', MASTER_LOG_POS=$master_pos
+--source include/wait_for_slave_sql_to_stop.inc
+--source include/stop_slave_io.inc
+
+SELECT * FROM t;
+--let $slave_param= Exec_Master_Log_Pos
+--let $slave_param_value= $master_pos
+--source include/check_slave_param.inc
+
+--replace_result $MASTER_MYPORT MASTER_PORT
+--echo "MASTER_USE_GTID=SLAVE_POS --> MASTER_USE_GTID=REPLICA_POS"
+--replace_result $MASTER_MYPORT MASTER_PORT
+--eval CHANGE MASTER TO master_host = '127.0.0.1', master_port = $MASTER_MYPORT, MASTER_USE_GTID=REPLICA_POS
+--source include/start_slave.inc
+
+--connection master
+CREATE TABLE t2 (f INT PRIMARY KEY) ENGINE=INNODB;
+INSERT INTO t2 VALUES (10);
+DROP TABLE t2;
+
+--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_slow_query_log.test b/mysql-test/suite/rpl/t/rpl_slow_query_log.test
index df88d42ed68..558d28b6e60 100644
--- a/mysql-test/suite/rpl/t/rpl_slow_query_log.test
+++ b/mysql-test/suite/rpl/t/rpl_slow_query_log.test
@@ -12,9 +12,9 @@
# iii) On master, do one short time query and one long time query, on slave
# and check that slow query is logged to slow query log but fast query
# is not.
-# iv) On slave, check that slow queries go into the slow log and fast dont,
+# iv) On slave, check that slow queries go into the slow log and fast don't,
# when issued through a regular client connection
-# v) On slave, check that slow queries go into the slow log and fast dont
+# v) On slave, check that slow queries go into the slow log and fast don't
# when we use SET TIMESTAMP= 1 on a regular client connection.
# vi) check that when setting slow_query_log= OFF in a connection 'extra2'
# prevents logging slow queries in a connection 'extra'
diff --git a/mysql-test/suite/rpl/t/rpl_spec_variables.test b/mysql-test/suite/rpl/t/rpl_spec_variables.test
index e2d5175036c..fdd000d06fc 100644
--- a/mysql-test/suite/rpl/t/rpl_spec_variables.test
+++ b/mysql-test/suite/rpl/t/rpl_spec_variables.test
@@ -154,7 +154,7 @@ CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT PRIMARY KEY, b VARCHAR(20), c CHA
SELECT COUNT(*) FROM t1;
--sync_slave_with_master
--replace_regex /\'.+\'/'FILE2'/
---error 1148
+--error ER_LOAD_INFILE_CAPABILITY_DISABLED
--eval LOAD DATA LOCAL INFILE '$MYSQLTEST_VARDIR/tmp/words2.dat' INTO TABLE t1 (b)
SELECT COUNT(*) FROM t1;
@@ -220,14 +220,14 @@ DROP TABLE IF EXISTS t1,t2;
--echo * storage_engine *
--connection master
-SET @restore_master_storage_engine=@@global.storage_engine;
-SET @@global.storage_engine=InnoDB;
-SET @@session.storage_engine=InnoDB;
+SET @restore_master_storage_engine=@@global.default_storage_engine;
+SET @@global.default_storage_engine=InnoDB;
+SET @@session.default_storage_engine=InnoDB;
--connection slave
-SET @restore_slave_storage_engine=@@global.storage_engine;
-SET @@global.storage_engine=Memory;
-SET @@session.storage_engine=Memory;
+SET @restore_slave_storage_engine=@@global.default_storage_engine;
+SET @@global.default_storage_engine=Memory;
+SET @@session.default_storage_engine=Memory;
--connection master
CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY, b VARCHAR(10));
@@ -245,8 +245,8 @@ SHOW CREATE TABLE t1;
SHOW CREATE TABLE t2;
SHOW CREATE TABLE t3;
-SET @@global.storage_engine=InnoDB;
-SET @@session.storage_engine=InnoDB;
+SET @@global.default_storage_engine=InnoDB;
+SET @@session.default_storage_engine=InnoDB;
--connection master
--disable_warnings
@@ -293,14 +293,15 @@ DROP TABLE t1;
--connection master
SET @@global.character_set_database=@restore_master_character_set_database;
SET @@global.collation_server=@restore_master_collation_server;
-SET @@global.storage_engine=@restore_master_storage_engine;
+SET @@global.default_storage_engine=@restore_master_storage_engine;
SET @@global.sql_mode=@old_sql_mode_master;
--sync_slave_with_master
SET @@global.character_set_database=@restore_slave_character_set_database;
SET @@global.collation_server=@restore_slave_collation_server;
SET @@global.max_heap_table_size=@restore_slave_max_heap_table_size;
-SET @@global.storage_engine=@restore_slave_storage_engine;
+SET @@global.default_storage_engine=@restore_slave_storage_engine;
SET @@global.sql_mode=@old_sql_mode_slave;
+
# Put at the end since the test otherwise emptied the table.
remove_file $MYSQLTEST_VARDIR/tmp/words.dat;
remove_file $MYSQLTEST_VARDIR/tmp/words2.dat;
diff --git a/mysql-test/suite/rpl/t/rpl_stm_implicit_commit_binlog.test b/mysql-test/suite/rpl/t/rpl_stm_implicit_commit_binlog.test
index a095f7f7905..6b1271825ed 100644
--- a/mysql-test/suite/rpl/t/rpl_stm_implicit_commit_binlog.test
+++ b/mysql-test/suite/rpl/t/rpl_stm_implicit_commit_binlog.test
@@ -7,6 +7,6 @@
--source include/master-slave.inc
--let $engine=Innodb
-set session storage_engine=innodb;
+set session default_storage_engine=innodb;
--source include/rpl_implicit_commit_binlog.test
--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_sync_with_innodb_thd_conc.test b/mysql-test/suite/rpl/t/rpl_sync_with_innodb_thd_conc.test
deleted file mode 100644
index b4c2971d2fb..00000000000
--- a/mysql-test/suite/rpl/t/rpl_sync_with_innodb_thd_conc.test
+++ /dev/null
@@ -1,41 +0,0 @@
-# ==== Purpose ====
-#
-# Test verifies that replication shouldn't hang when number of active threads
-# on the slave server are less than the allowed innodb_thread_concurrency value.
-#
-# ==== Implementation ====
-#
-# Steps:
-# 0 - Have master slave replication setup with engine being Innodb.
-# 1 - Configure innodb_thread_concurrency = 100.
-# 2 - Do some DML on master and sync the slave with master.
-# 3 - Ensure replication doesn't hang.
-#
-# ==== References ====
-#
-# MDEV-20247: Replication hangs with "preparing" and never starts
-#
-
---source include/master-slave.inc
---source include/have_innodb.inc
-
---connection slave
-SET @old_innodb_thread_concurrency := @@innodb_thread_concurrency;
-SET @old_innodb_thread_sleep_delay := @@innodb_thread_sleep_delay;
-SET GLOBAL innodb_thread_concurrency = 100;
-
---connection master
-CREATE TABLE t(f INT) ENGINE=INNODB;
-INSERT INTO t VALUES (10);
---sync_slave_with_master
-
---let $diff_tables=master:t, slave:t
---source include/diff_tables.inc
-
---echo "===== Clean up======="
---connection master
-DROP TABLE t;
---sync_slave_with_master
-SET GLOBAL innodb_thread_concurrency = @old_innodb_thread_concurrency;
-SET GLOBAL innodb_thread_sleep_delay = @old_innodb_thread_sleep_delay;
---source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_table_options.test b/mysql-test/suite/rpl/t/rpl_table_options.test
index 6dd1c9bd20d..335bf8d83c1 100644
--- a/mysql-test/suite/rpl/t/rpl_table_options.test
+++ b/mysql-test/suite/rpl/t/rpl_table_options.test
@@ -4,7 +4,7 @@
--replace_regex /\.dll/.so/
eval install plugin example soname '$HA_EXAMPLE_SO';
-set storage_engine=example;
+set default_storage_engine=example;
sync_slave_with_master;
connection master;
@@ -29,7 +29,7 @@ show create table t1;
connection master;
drop table t1;
-set storage_engine=default;
+set default_storage_engine=default;
select 1;
# Cleanup
diff --git a/mysql-test/suite/rpl/t/rpl_temporary_errors.test b/mysql-test/suite/rpl/t/rpl_temporary_errors.test
index 6392fb90b9b..85e16afa270 100644
--- a/mysql-test/suite/rpl/t/rpl_temporary_errors.test
+++ b/mysql-test/suite/rpl/t/rpl_temporary_errors.test
@@ -6,7 +6,7 @@ call mtr.add_suppression("Deadlock found");
call mtr.add_suppression("Can't find record in 't.'");
connection master;
-CREATE TABLE t1 (a INT PRIMARY KEY, b INT);
+CREATE TABLE t1 (a INT PRIMARY KEY, b INT) ENGINE=innodb;
INSERT INTO t1 VALUES (1,1), (2,2), (3,3), (4,4);
sync_slave_with_master;
SHOW STATUS LIKE 'Slave_retried_transactions';
@@ -14,20 +14,94 @@ SHOW STATUS LIKE 'Slave_retried_transactions';
# the following UPDATE t1 to pass the mode is switched temprorarily
set @@global.slave_exec_mode= 'IDEMPOTENT';
UPDATE t1 SET a = 5, b = 47 WHERE a = 1;
-SELECT * FROM t1;
+SELECT * FROM t1 ORDER BY a;
connection master;
UPDATE t1 SET a = 5, b = 5 WHERE a = 1;
-SELECT * FROM t1;
+SELECT * FROM t1 ORDER BY a;
#SHOW BINLOG EVENTS;
sync_slave_with_master;
set @@global.slave_exec_mode= default;
SHOW STATUS LIKE 'Slave_retried_transactions';
-SELECT * FROM t1;
+SELECT * FROM t1 ORDER BY a;
source include/check_slave_is_running.inc;
connection slave;
call mtr.add_suppression("Slave SQL.*Could not execute Update_rows event on table test.t1");
+call mtr.add_suppression("Slave SQL for channel '': worker thread retried transaction");
+call mtr.add_suppression("The slave coordinator and worker threads are stopped");
+#
+# Bug#24764800 REPLICATION FAILING ON SLAVE WITH XAER_RMFAIL ERROR
+#
+# Verify that a temporary failing replicated xa transaction completes
+# upon slave applier restart after previous
+# @@global.slave_transaction_retries number of retries in vain.
+#
+connection slave;
+
+set @save_innodb_lock_wait_timeout=@@global.innodb_lock_wait_timeout;
+set @save_slave_transaction_retries=@@global.slave_transaction_retries;
+
+# Slave applier parameters for the failed retry
+set @@global.innodb_lock_wait_timeout=1;
+set @@global.slave_transaction_retries=2;
+--source include/restart_slave_sql.inc
+
+# Temporary error implement: a record is blocked by slave local trx
+connection slave1;
+BEGIN;
+INSERT INTO t1 SET a = 6, b = 7;
+
+connection master;
+INSERT INTO t1 SET a = 99, b = 99; # slave applier warm up trx
+XA START 'xa1';
+INSERT INTO t1 SET a = 6, b = 6; # this record eventually must be found on slave
+XA END 'xa1';
+XA PREPARE 'xa1';
+
+connection slave;
+# convert_error(ER_LOCK_WAIT_TIMEOUT)
+--let $err_timeout= 1205
+# convert_error(ER_LOCK_DEADLOCK)
+--let $err_deadlock= 1213
+--let $slave_sql_errno=$err_deadlock,$err_timeout
+--let $show_slave_sql_error=
+--source include/wait_for_slave_sql_error.inc
+
+# b. Slave applier parameters for successful retry after restart
+set @@global.innodb_lock_wait_timeout=1;
+set @@global.slave_transaction_retries=100;
+
+--source include/restart_slave_sql.inc
+
+--let $last_retries= query_get_value(SHOW GLOBAL STATUS LIKE 'Slave_retried_transactions', Value, 1)
+--let $status_type=GLOBAL
+--let $status_var=Slave_retried_transactions
+--let $status_var_value=`SELECT 1 + $last_retries`
+--let $$status_var_comparsion= >
+--source include/wait_for_status_var.inc
+
+# Release the record after just one retry
+connection slave1;
+ROLLBACK;
+
+connection master;
+XA COMMIT 'xa1';
+
+--source include/sync_slave_sql_with_master.inc
+
+# Proof of correctness: the committed XA is on the slave
+connection slave;
+--let $assert_text=XA transaction record must be in the table
+--let $assert_cond=count(*)=1 FROM t1 WHERE a=6 AND b=6
+--source include/assert.inc
+
+# Bug#24764800 cleanup:
+set @@global.innodb_lock_wait_timeout=@save_innodb_lock_wait_timeout;
+set @@global.slave_transaction_retries= @save_slave_transaction_retries;
+#
+# Total cleanup:
+#
connection master;
DROP TABLE t1;
--sync_slave_with_master
diff --git a/mysql-test/suite/rpl/t/rpl_xa-master.opt b/mysql-test/suite/rpl/t/rpl_xa-master.opt
new file mode 100644
index 00000000000..6794216dc45
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_xa-master.opt
@@ -0,0 +1 @@
+--binlog-ignore-db=test_ign
diff --git a/mysql-test/suite/rpl/t/rpl_xa.inc b/mysql-test/suite/rpl/t/rpl_xa.inc
new file mode 100644
index 00000000000..38344da5e66
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_xa.inc
@@ -0,0 +1,355 @@
+#
+# This "body" file checks general properties of XA transaction replication
+# as of MDEV-7974.
+# Parameters:
+# --let rpl_xa_check= SELECT ...
+#
+connection master;
+create table t1 (a int, b int) engine=InnoDB;
+insert into t1 values(0, 0);
+xa start 't';
+insert into t1 values(1, 2);
+xa end 't';
+xa prepare 't';
+xa commit 't';
+
+sync_slave_with_master;
+let $diff_tables= master:t1, slave:t1;
+source include/diff_tables.inc;
+
+connection master;
+
+xa start 't';
+insert into t1 values(3, 4);
+xa end 't';
+xa prepare 't';
+xa rollback 't';
+
+sync_slave_with_master;
+let $diff_tables= master:t1, slave:t1;
+source include/diff_tables.inc;
+
+connection master;
+--disable_warnings
+SET pseudo_slave_mode=1;
+--enable_warnings
+create table t2 (a int) engine=InnoDB;
+xa start 't';
+insert into t1 values (5, 6);
+xa end 't';
+xa prepare 't';
+xa start 's';
+insert into t2 values (0);
+xa end 's';
+xa prepare 's';
+--source include/save_master_gtid.inc
+
+connection slave;
+source include/sync_with_master_gtid.inc;
+if ($rpl_xa_check)
+{
+ --eval $rpl_xa_check
+ if ($rpl_xa_verbose)
+ {
+ --eval SELECT $rpl_xa_check_lhs
+ --eval SELECT $rpl_xa_check_rhs
+ }
+}
+sorted_result;
+xa recover;
+
+connection master;
+xa commit 't';
+xa commit 's';
+--disable_warnings
+SET pseudo_slave_mode=0;
+--enable_warnings
+sync_slave_with_master;
+let $diff_tables= master:t1, slave:t1;
+source include/diff_tables.inc;
+let $diff_tables= master:t2, slave:t2;
+source include/diff_tables.inc;
+
+#
+# Read-only XA remains prepared after disconnect and must rollback at XA-complete
+# after recoonect. To the read-only also belongs non-transactional engine XA.
+#
+--connection master
+
+--echo *** At the start of read-only section gtid list is:
+flush logs;
+--let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1)
+--source include/show_gtid_list.inc
+
+
+set @query1="select 1";
+set @query2="select count(*) into @s2 from t1";
+--let $ro_cases=2
+--let $db=test
+
+# No disconnect
+--let $p_trx=$ro_cases
+while ($p_trx)
+{
+--connection master
+ --let $xid=ro_$p_trx
+ --let $query=`SELECT @query$p_trx`
+ --source rpl_create_xa_prepared.inc
+ --let $complete=`select if(floor(rand()*10)%2,'COMMIT','ROLLBACK')`
+ --error 0
+ --disable_query_log
+ --disable_result_log
+ --eval xa $complete '$xid'
+ --enable_result_log
+ --enable_query_log
+
+ --disconnect master_$xid
+ --source include/wait_until_disconnected.inc
+
+ --dec $p_trx
+}
+
+
+--let $p_trx=$ro_cases
+# With diconnect
+while ($p_trx)
+{
+--connection master
+ --let $xid=ro_$p_trx
+ --let $query=`SELECT @query$p_trx`
+ --source rpl_create_xa_prepared.inc
+
+ --disconnect master_$xid
+ --source include/wait_until_disconnected.inc
+
+ --dec $p_trx
+}
+
+--echo *** $ro_cases prepared xa:s must be in the list:
+--connection master
+sorted_result;
+xa recover;
+
+--let $p_trx=$ro_cases
+while ($p_trx)
+{
+ --let $xid=ro_$p_trx
+ --let $complete=`select if(floor(rand()*10)%2,'COMMIT','ROLLBACK')`
+ --disable_query_log
+ --disable_result_log
+ --error ER_XA_RBROLLBACK
+ --eval xa $complete '$xid'
+ --enable_result_log
+ --enable_query_log
+
+ --dec $p_trx
+}
+--echo *** Zero prepared xa:s must be in the list:
+xa recover;
+
+--echo *** At the end of read-only section gtid list has 0 more compare with previous check:
+flush logs;
+--let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1)
+--source include/show_gtid_list.inc
+
+
+#
+# XA logging cases while some of XA resources are read-only
+#
+# A1. Binlog filter
+
+
+--let $db=test_ign
+--eval create database $db
+set @@sql_log_bin = 0;
+--eval create table $db.t (a int) engine=InnoDB
+set @@sql_log_bin = 1;
+
+--let $xid=rw_no_binlog
+--let $query=insert into $db.t set a=1
+--source rpl_create_xa_prepared.inc
+--disconnect master_$xid
+--source include/wait_until_disconnected.inc
+
+--echo *** $xid must be in the list:
+--connection master
+xa recover;
+
+--let $complete=`select if(floor(rand()*10)%2,'COMMIT','ROLLBACK')`
+--error 0
+--disable_query_log
+--disable_result_log
+--eval xa $complete '$xid'
+--enable_result_log
+--enable_query_log
+
+--echo *** Zero must be in the list:
+--connection master
+xa recover;
+# restore for the following tests
+--let $db=test
+
+--echo *** At the end of --binlog-ignore-db section gtid list has 2 more:
+flush logs;
+--let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1)
+--source include/show_gtid_list.inc
+
+#
+# A2. Opposite to A1, ineffective execution in Engine may create a
+# binlog transaction
+#
+connection master;
+create table t3 (a int) engine=innodb;
+
+--echo *** the disconnected prepare case
+--let $xid=rw_binlog_only
+--let $query=delete from t3
+--connect (master_$xid, 127.0.0.1,root,,$db,$MASTER_MYPORT,)
+ set @@binlog_format=statement;
+ # --source rpl_create_xa_prepared.inc
+ --eval xa start '$xid'
+ --eval $query
+ --eval xa end '$xid'
+ --eval xa prepare '$xid'
+
+ --disconnect master_$xid
+ --source include/wait_until_disconnected.inc
+
+connection master;
+--echo *** $xid must be in the list:
+xa recover;
+
+ --let $complete=`select if(floor(rand()*10)%2,'COMMIT','ROLLBACK')`
+ --disable_query_log
+ --disable_result_log
+ --eval xa $complete '$xid'
+ --enable_result_log
+ --enable_query_log
+
+--echo *** Zero must be in the list:
+xa recover;
+
+--echo *** the same connection complete case.
+connection master;
+ --let $xid=rw_binlog_only
+ --let $query=delete from t3
+--connect (master_$xid, 127.0.0.1,root,,$db,$MASTER_MYPORT,)
+ set @@binlog_format=statement;
+ # --source rpl_create_xa_prepared.inc
+ --eval xa start '$xid'
+ --eval $query
+ --eval xa end '$xid'
+ --eval xa prepare '$xid'
+
+--echo *** $xid must be in the list:
+xa recover;
+
+--disable_query_log
+ --disable_result_log
+ --eval xa $complete '$xid'
+ --enable_result_log
+ --enable_query_log
+--disconnect master_$xid
+--source include/wait_until_disconnected.inc
+
+--echo *** Zero must be in the list:
+--connection master
+xa recover;
+
+--echo *** At the end of ineffective in engine section gtid list has 5 more:
+flush logs;
+--let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1)
+--source include/show_gtid_list.inc
+
+#
+# A3 MyISAM "xa" logs empty XA-prepare group, followed by
+# an XA-complete event
+create table tm (a int) engine=myisam;
+
+# No disconnect
+--connection master
+ --let $xid=rw_myisam
+ --let $query=insert into tm set a=1
+ --source rpl_create_xa_prepared.inc
+ --let $complete=`select if(floor(rand()*10)%2,'COMMIT','ROLLBACK')`
+ --error 0
+ --disable_query_log
+ --disable_result_log
+ --eval xa $complete '$xid'
+ --enable_result_log
+ --enable_query_log
+
+ --disconnect master_$xid
+ --source include/wait_until_disconnected.inc
+
+# With diconnect
+--connection master
+ --source rpl_create_xa_prepared.inc
+ --disconnect master_$xid
+ --source include/wait_until_disconnected.inc
+
+--echo *** $xid prepared must be in the list:
+--connection master
+xa recover;
+
+ --let $complete=`select if(floor(rand()*10)%2,'COMMIT','ROLLBACK')`
+ --disable_query_log
+ --disable_result_log
+ --eval xa $complete '$xid'
+ --enable_result_log
+ --enable_query_log
+
+--echo *** Zero prepared xa:s must be in the list:
+xa recover;
+
+--echo *** At the end of MyISAM "xa" section gtid list has 7 more compare with previous check:
+flush logs;
+--let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1)
+--source include/show_gtid_list.inc
+
+
+# B. Session binlog disable does not log even empty XA-prepare
+# Therefore XA-complete should be also run in sql_log_bin-OFF environment.
+
+--let $db=test
+--let $xid=skip_binlog
+--let $query=insert into t2 values(1)
+--connect (master_$xid, 127.0.0.1,root,,$db,$MASTER_MYPORT,)
+set @@session.sql_log_bin = OFF;
+--eval xa start '$xid'
+ --eval $query
+--eval xa end '$xid'
+--eval xa prepare '$xid'
+
+--disconnect master_$xid
+--source include/wait_until_disconnected.inc
+
+--echo *** $xid must be in the list:
+--connection master
+xa recover;
+
+# now commit it carefully to avoid binlogging as the prepare part did
+set @@session.sql_log_bin = OFF;
+--eval xa rollback '$xid'
+set @@session.sql_log_bin = ON;
+--source include/save_master_gtid.inc
+
+--echo *** Zero must be in the list:
+--connection master
+xa recover;
+
+--echo *** At the end of skip_log_binb section gtid list has 0 more:
+flush logs;
+--let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1)
+--source include/show_gtid_list.inc
+
+#
+# sync slave successfully to prove its consistency
+#
+--connection slave
+source include/sync_with_master_gtid.inc;
+
+
+connection master;
+--eval drop database test_ign
+drop table t1, t2, t3, tm;
diff --git a/mysql-test/suite/rpl/t/rpl_xa.test b/mysql-test/suite/rpl/t/rpl_xa.test
new file mode 100644
index 00000000000..05a1abe59ae
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_xa.test
@@ -0,0 +1,5 @@
+source include/have_innodb.inc;
+source include/master-slave.inc;
+
+source rpl_xa.inc;
+source include/rpl_end.inc;
diff --git a/mysql-test/suite/rpl/t/rpl_xa_gap_lock-slave.opt b/mysql-test/suite/rpl/t/rpl_xa_gap_lock-slave.opt
new file mode 100644
index 00000000000..4602a43ce25
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_xa_gap_lock-slave.opt
@@ -0,0 +1 @@
+--transaction-isolation=READ-COMMITTED
diff --git a/mysql-test/suite/rpl/t/rpl_xa_gap_lock.test b/mysql-test/suite/rpl/t/rpl_xa_gap_lock.test
new file mode 100644
index 00000000000..9c48891b889
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_xa_gap_lock.test
@@ -0,0 +1,137 @@
+# ==== Purpose ====
+#
+# This test will generate two XA transactions on the master in a way that
+# they will block each other on the slave if the transaction isolation level
+# used by the slave applier is more restrictive than the READ COMMITTED one.
+#
+# Consider:
+# E=execute, P=prepare, C=commit;
+# 1=first transaction, 2=second transaction;
+#
+# Master does: E1, E2, P2, P1, C1, C2
+# Slave does: E2, P2, E1, P1, C1, C2
+#
+# The transactions are designed so that, if the applier transaction isolation
+# level is more restrictive than the READ COMMITTED, E1 will be blocked on
+# the slave waiting for gap locks to be released.
+#
+# Step 1
+#
+# The test will verify that the transactions don't block each other because
+# the applier thread automatically changed the isolation level.
+#
+# Step 2
+#
+# The test will verify that applying master's binary log dump in slave doesn't
+# block because mysqlbinlog is informing the isolation level to be used.
+#
+# ==== Related Bugs and Worklogs ====
+#
+# BUG#25040331: INTERLEAVED XA TRANSACTIONS MAY DEADLOCK SLAVE APPLIER WITH
+# REPEATABLE READ
+#
+--source include/have_debug.inc
+--source include/have_innodb.inc
+# The test case only make sense for RBR
+--source include/have_binlog_format_row.inc
+--source include/master-slave.inc
+
+--connection slave
+# To hit the issue, we need to split the data in two pages.
+# This global variable will help us.
+SET @saved_innodb_limit_optimistic_insert_debug = @@GLOBAL.innodb_limit_optimistic_insert_debug;
+SET @@GLOBAL.innodb_limit_optimistic_insert_debug = 2;
+
+#
+# Step 1 - Using async replication
+#
+
+# Let's generate the workload on the master
+--connection master
+CREATE TABLE t1 (
+ c1 INT NOT NULL,
+ KEY(c1)
+) ENGINE=InnoDB;
+
+CREATE TABLE t2 (
+ c1 INT NOT NULL,
+ FOREIGN KEY(c1) REFERENCES t1(c1)
+) ENGINE=InnoDB;
+
+INSERT INTO t1 VALUES (1), (3), (4);
+
+--connection master1
+XA START 'XA1';
+INSERT INTO t1 values(2);
+XA END 'XA1';
+
+# This transaction will reference the gap where XA1
+# was inserted, and will be prepared and committed
+# before XA1, so the slave will prepare it (but will
+# not commit it) before preparing XA1.
+--connection master
+XA START 'XA2';
+INSERT INTO t2 values(3);
+XA END 'XA2';
+
+# The XA2 prepare should be binary logged first
+XA PREPARE 'XA2';
+
+# The XA1 prepare should be binary logged
+# after XA2 prepare and before XA2 commit.
+--connection master1
+XA PREPARE 'XA1';
+
+# The commit order doesn't matter much for the issue being tested.
+XA COMMIT 'XA1';
+--connection master
+XA COMMIT 'XA2';
+
+# Everything is fine if the slave can sync with the master.
+--source include/sync_slave_sql_with_master.inc
+
+#
+# Step 2 - Using mysqlbinlog dump to restore the salve
+#
+--source include/stop_slave.inc
+DROP TABLE t2, t1;
+RESET SLAVE;
+RESET MASTER;
+
+--connection master
+--let $master_data_dir= `SELECT @@datadir`
+--let $master_log_file= query_get_value(SHOW MASTER STATUS, File, 1)
+--let $mysql_server= $MYSQL --defaults-group-suffix=.2
+--echo Restore binary log from the master into the slave
+--exec $MYSQL_BINLOG --force-if-open $master_data_dir/$master_log_file | $mysql_server
+
+--let $diff_tables= master:test.t1, slave:test.t1
+--source include/diff_tables.inc
+--let $diff_tables= master:test.t2, slave:test.t2
+--source include/diff_tables.inc
+
+#
+# Cleanup
+#
+--let $master_file= query_get_value(SHOW MASTER STATUS, File, 1)
+--let $master_pos= query_get_value(SHOW MASTER STATUS, Position, 1)
+DROP TABLE t2, t1;
+
+## When GTID_MODE=OFF, we need to skip already applied transactions
+--connection slave
+#--let $gtid_mode= `SELECT @@GTID_MODE`
+#if ($gtid_mode == OFF)
+#{
+# --disable_query_log
+# --disable_result_log
+# --eval CHANGE MASTER TO MASTER_LOG_FILE='$master_file', MASTER_LOG_POS=$master_pos
+# --enable_result_log
+# --enable_query_log
+#}
+--replace_result $master_file LOG_FILE $master_pos LOG_POS
+--eval CHANGE MASTER TO MASTER_LOG_FILE='$master_file', MASTER_LOG_POS=$master_pos
+
+SET @@GLOBAL.innodb_limit_optimistic_insert_debug = @saved_innodb_limit_optimistic_insert_debug;
+--source include/start_slave.inc
+
+--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_xa_gtid_pos_auto_engine-master.opt b/mysql-test/suite/rpl/t/rpl_xa_gtid_pos_auto_engine-master.opt
new file mode 100644
index 00000000000..6794216dc45
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_xa_gtid_pos_auto_engine-master.opt
@@ -0,0 +1 @@
+--binlog-ignore-db=test_ign
diff --git a/mysql-test/suite/rpl/t/rpl_xa_gtid_pos_auto_engine.test b/mysql-test/suite/rpl/t/rpl_xa_gtid_pos_auto_engine.test
new file mode 100644
index 00000000000..b83493762c3
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_xa_gtid_pos_auto_engine.test
@@ -0,0 +1,29 @@
+--source include/have_innodb.inc
+--source include/master-slave.inc
+
+--connection slave
+call mtr.add_suppression("The automatically created table.*name may not be entirely in lowercase");
+
+--source include/stop_slave.inc
+CHANGE MASTER TO master_use_gtid=slave_pos;
+
+SET @@global.gtid_pos_auto_engines="innodb";
+--source include/start_slave.inc
+--let $rpl_xa_check_lhs= @@global.gtid_slave_pos
+--let $rpl_xa_check_rhs= CONCAT(domain_id,"-",server_id,"-",seq_no) FROM mysql.gtid_slave_pos WHERE seq_no = (SELECT DISTINCT max(seq_no) FROM mysql.gtid_slave_pos)
+--let $rpl_xa_check=SELECT $rpl_xa_check_lhs = $rpl_xa_check_rhs
+--source rpl_xa.inc
+
+--connection slave
+--source include/stop_slave.inc
+SET @@global.gtid_pos_auto_engines="";
+SET @@session.sql_log_bin=0;
+DROP TABLE mysql.gtid_slave_pos_InnoDB;
+if (`SHOW COUNT(*) WARNINGS`)
+{
+ show tables in mysql like 'gtid_slave_pos%';
+}
+SET @@session.sql_log_bin=1;
+--source include/start_slave.inc
+
+--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_xa_survive_disconnect.test b/mysql-test/suite/rpl/t/rpl_xa_survive_disconnect.test
new file mode 100644
index 00000000000..28d189364d6
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_xa_survive_disconnect.test
@@ -0,0 +1,297 @@
+# BUG #12161 Xa recovery and client disconnection
+# the test verifies that
+# a. disconnection does not lose a prepared transaction
+# so it can be committed from another connection
+# c. the prepared transaction is logged
+# d. interleaved prepared transactions are correctly applied on the slave.
+
+#
+# Both replication format are checked through explict
+# set @@binlog_format in the test.
+#
+--source include/have_innodb.inc
+--source include/have_binlog_format_mixed.inc
+#
+# Prepared XA can't get available to an external connection
+# until a connection, that either leaves actively or is killed,
+# has completed a necessary part of its cleanup.
+# Selecting from P_S.threads provides a method to learn that.
+#
+--source include/have_perfschema.inc
+--source include/master-slave.inc
+
+--connection master
+call mtr.add_suppression("Found 2 prepared XA transactions");
+CREATE VIEW v_processlist as SELECT * FROM performance_schema.threads where type = 'FOREGROUND';
+
+CREATE DATABASE d1;
+CREATE DATABASE d2;
+
+CREATE TABLE d1.t (a INT) ENGINE=innodb;
+CREATE TABLE d2.t (a INT) ENGINE=innodb;
+
+connect (master_conn1, 127.0.0.1,root,,test,$MASTER_MYPORT,);
+--let $conn_id=`SELECT connection_id()`
+SET @@session.binlog_format= statement;
+XA START '1-stmt';
+INSERT INTO d1.t VALUES (1);
+XA END '1-stmt';
+XA PREPARE '1-stmt';
+
+--disconnect master_conn1
+
+--connection master
+
+--let $wait_condition= SELECT count(*) = 0 FROM v_processlist WHERE PROCESSLIST_ID = $conn_id
+--source include/wait_condition.inc
+
+connect (master_conn2, 127.0.0.1,root,,test,$MASTER_MYPORT,);
+--let $conn_id=`SELECT connection_id()`
+SET @@session.binlog_format= row;
+XA START '1-row';
+INSERT INTO d2.t VALUES (1);
+XA END '1-row';
+XA PREPARE '1-row';
+
+--disconnect master_conn2
+
+--connection master
+--let $wait_condition= SELECT count(*) = 0 FROM v_processlist WHERE PROCESSLIST_ID = $conn_id
+--source include/wait_condition.inc
+
+XA START '2';
+INSERT INTO d1.t VALUES (2);
+XA END '2';
+XA PREPARE '2';
+XA COMMIT '2';
+
+XA COMMIT '1-row';
+XA COMMIT '1-stmt';
+source include/show_binlog_events.inc;
+
+# the proof: slave is in sync with the table updated by the prepared transactions.
+--source include/sync_slave_sql_with_master.inc
+
+--source include/stop_slave.inc
+
+#
+# Recover with Master server restart
+#
+--connection master
+
+connect (master2, 127.0.0.1,root,,test,$MASTER_MYPORT,);
+--connection master2
+SET @@session.binlog_format= statement;
+XA START '3-stmt';
+INSERT INTO d1.t VALUES (3);
+XA END '3-stmt';
+XA PREPARE '3-stmt';
+--disconnect master2
+
+connect (master2, 127.0.0.1,root,,test,$MASTER_MYPORT,);
+--connection master2
+SET @@session.binlog_format= row;
+XA START '3-row';
+INSERT INTO d2.t VALUES (4);
+XA END '3-row';
+XA PREPARE '3-row';
+--disconnect master2
+
+--connection master
+
+#
+# Testing read-only
+#
+connect (master2, 127.0.0.1,root,,test,$MASTER_MYPORT,);
+--connection master2
+XA START '4';
+SELECT * FROM d1.t;
+XA END '4';
+XA PREPARE '4';
+--disconnect master2
+
+#
+# Logging few disconnected XA:s for replication.
+#
+--let $bulk_trx_num=10
+--let $i = $bulk_trx_num
+
+while($i > 0)
+{
+ --connect (master_bulk_conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,)
+ --let $conn_id=`SELECT connection_id()`
+
+ --eval XA START 'bulk_trx_$i'
+ --eval INSERT INTO d1.t VALUES ($i)
+ --eval INSERT INTO d2.t VALUES ($i)
+ --eval XA END 'bulk_trx_$i'
+ --eval XA PREPARE 'bulk_trx_$i'
+
+ --disconnect master_bulk_conn$i
+
+ --connection master
+ --let $wait_condition= SELECT count(*) = 0 FROM v_processlist WHERE PROCESSLIST_ID = $conn_id
+ --source include/wait_condition.inc
+
+ --dec $i
+}
+
+#
+# Prove the slave applier is capable to resume the prepared XA:s
+# upon its restart.
+#
+--connection slave
+--source include/start_slave.inc
+--connection master
+--source include/sync_slave_sql_with_master.inc
+--source include/stop_slave.inc
+
+--connection master
+--let $i = $bulk_trx_num
+while($i > 0)
+{
+ --let $command=COMMIT
+ if (`SELECT $i % 2`)
+ {
+ --let $command=ROLLBACK
+ }
+ --eval XA $command 'bulk_trx_$i'
+ --dec $i
+}
+
+--let $rpl_server_number= 1
+--source include/rpl_restart_server.inc
+
+--connection slave
+--source include/start_slave.inc
+
+--connection master
+--echo *** '3-stmt','3-row' xa-transactions must be in the list ***
+XA RECOVER;
+XA COMMIT '3-stmt';
+XA ROLLBACK '3-row';
+
+--source include/sync_slave_sql_with_master.inc
+
+#
+# Testing replication with marginal XID values and in two formats.
+#
+
+--connection master
+--let $wait_condition= SELECT count(*) = 0 FROM v_processlist WHERE PROCESSLIST_ID = $conn_id
+--source include/wait_condition.inc
+
+# Max size XID incl max value of formatID
+--let $formatid_range=`SELECT (1<<31)`
+--let $max_formatid=`SELECT (1<<31) - 1`
+
+connect (master_conn2, 127.0.0.1,root,,test,$MASTER_MYPORT,);
+--let $conn_id=`SELECT connection_id()`
+
+--let $gtrid=0123456789012345678901234567890123456789012345678901234567890124
+--let $bqual=0123456789012345678901234567890123456789012345678901234567890124
+--eval XA START '$gtrid','$bqual',$max_formatid
+ INSERT INTO d1.t VALUES (64);
+--eval XA END '$gtrid','$bqual',$max_formatid
+--eval XA PREPARE '$gtrid','$bqual',$max_formatid
+
+--disconnect master_conn2
+
+--connection master
+--let $wait_condition= SELECT count(*) = 0 FROM v_processlist WHERE PROCESSLIST_ID = $conn_id
+--source include/wait_condition.inc
+
+# Max size XID with non-ascii chars
+connect (master_conn3, 127.0.0.1,root,,test,$MASTER_MYPORT,);
+--let $conn_id=`SELECT connection_id()`
+
+--let $gtrid_hex=FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+--let $bqual_hex=00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+--eval XA START X'$gtrid_hex',X'$bqual_hex',0
+ INSERT INTO d1.t VALUES (0);
+--eval XA END X'$gtrid_hex',X'$bqual_hex',0
+--eval XA PREPARE X'$gtrid_hex',X'$bqual_hex',0
+
+--disconnect master_conn3
+
+--connection master
+--let $wait_condition= SELECT count(*) = 0 FROM v_processlist WHERE PROCESSLIST_ID = $conn_id
+--source include/wait_condition.inc
+
+# Random XID
+--disable_query_log
+
+connect (master_conn4, 127.0.0.1,root,,test,$MASTER_MYPORT,);
+--let $conn_id=`SELECT connection_id()`
+
+--let $gtridlen=`SELECT 2*(1 + round(rand()*100) % 31)`
+--let $bquallen=`SELECT 2*(1 + round(rand()*100) % 31)`
+--let $gtrid_rand=`SELECT substring(concat(MD5(rand()), MD5(rand())), 1, $gtridlen)`
+--let $bqual_rand=`SELECT substring(concat(MD5(rand()), MD5(rand())), 1, $bquallen)`
+--let $formt_rand=`SELECT floor((rand()*10000000000) % $formatid_range)`
+--eval XA START X'$gtrid_rand',X'$bqual_rand',$formt_rand
+ INSERT INTO d1.t VALUES (0);
+--eval XA END X'$gtrid_rand',X'$bqual_rand',$formt_rand
+--eval XA PREPARE X'$gtrid_rand',X'$bqual_rand',$formt_rand
+
+--enable_query_log
+
+--disconnect master_conn4
+
+--connection master
+--let $wait_condition= SELECT count(*) = 0 FROM v_processlist WHERE PROCESSLIST_ID = $conn_id
+--source include/wait_condition.inc
+
+--eval XA COMMIT '$gtrid','$bqual',$max_formatid
+--eval XA COMMIT X'$gtrid_hex',X'$bqual_hex',0
+--disable_query_log
+--echo XA COMMIT 'RANDOM XID'
+--eval XA COMMIT X'$gtrid_rand',X'$bqual_rand',$formt_rand
+--enable_query_log
+
+--source include/sync_slave_sql_with_master.inc
+
+#
+# Testing ONE PHASE
+#
+--let $onephase_trx_num=10
+--let $i = $onephase_trx_num
+while($i > 0)
+{
+ --connect (master_bulk_conn$i, 127.0.0.1,root,,test,$MASTER_MYPORT,)
+
+ --connection master_bulk_conn$i
+ --eval XA START 'one_phase_$i'
+ --eval INSERT INTO d1.t VALUES ($i)
+ --eval INSERT INTO d2.t VALUES ($i)
+ --eval XA END 'one_phase_$i'
+ --eval XA COMMIT 'one_phase_$i' ONE PHASE
+
+ --disconnect master_bulk_conn$i
+ --dec $i
+}
+--connection master
+--source include/sync_slave_sql_with_master.inc
+
+#
+# Overall consistency check
+#
+--let $diff_tables= master:d1.t, slave:d1.t
+--source include/diff_tables.inc
+--let $diff_tables= master:d2.t, slave:d2.t
+--source include/diff_tables.inc
+#
+# cleanup
+#
+--connection master
+
+DELETE FROM d1.t;
+DELETE FROM d2.t;
+DROP TABLE d1.t, d2.t;
+DROP DATABASE d1;
+DROP DATABASE d2;
+DROP VIEW v_processlist;
+
+--source include/sync_slave_sql_with_master.inc
+
+--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_xa_survive_disconnect_lsu_off-slave.opt b/mysql-test/suite/rpl/t/rpl_xa_survive_disconnect_lsu_off-slave.opt
new file mode 100644
index 00000000000..94c3650024f
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_xa_survive_disconnect_lsu_off-slave.opt
@@ -0,0 +1,2 @@
+--log-slave-updates=off
+
diff --git a/mysql-test/suite/rpl/t/rpl_xa_survive_disconnect_lsu_off.test b/mysql-test/suite/rpl/t/rpl_xa_survive_disconnect_lsu_off.test
new file mode 100644
index 00000000000..df3811df6ae
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_xa_survive_disconnect_lsu_off.test
@@ -0,0 +1,8 @@
+# ==== Purpose ====
+# 'rpl_xa_survive_disconnect_lsu_off' verifies the same properties as the sourced file
+# in conditions of the slave does not log own updates
+# (lsu in the name stands for log_slave_updates).
+# Specifically this mode aims at proving correct operations on the slave
+# mysql.gtid_executed.
+
+--source ./rpl_xa_survive_disconnect.test
diff --git a/mysql-test/suite/rpl/t/rpl_xa_survive_disconnect_mixed_engines.test b/mysql-test/suite/rpl/t/rpl_xa_survive_disconnect_mixed_engines.test
new file mode 100644
index 00000000000..f52a9630a87
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_xa_survive_disconnect_mixed_engines.test
@@ -0,0 +1,68 @@
+# BUG#12161 Xa recovery and client disconnection
+#
+# The test verifies correct XA transaction two phase logging and its applying
+# in a case the transaction updates transactional and non-transactional tables.
+# Transactions are terminated according to specfied parameters to
+# a sourced inc-file.
+
+--source include/have_innodb.inc
+--source include/master-slave.inc
+
+--connection master
+CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
+
+--let $command=setup
+--source include/rpl_xa_mixed_engines.inc
+
+--echo === COMMIT ===
+--let $command=run
+--let $xa_terminate=XA COMMIT
+--let $xa_prepare_opt=1
+--source include/rpl_xa_mixed_engines.inc
+
+--source include/sync_slave_sql_with_master.inc
+--connection master
+
+--echo === COMMIT ONE PHASE ===
+
+--let $command=run
+--let $xa_terminate=XA COMMIT
+--let $one_phase=ONE PHASE
+--let $xa_prepare_opt=
+--source include/rpl_xa_mixed_engines.inc
+--let $one_phase=
+--source include/sync_slave_sql_with_master.inc
+--connection master
+
+--echo === ROLLBACK with PREPARE ===
+
+--let $command=run
+--let $xa_terminate=xa rollback
+--let $xa_prepare_opt=1
+--source include/rpl_xa_mixed_engines.inc
+
+--source include/sync_slave_sql_with_master.inc
+--connection master
+
+--echo === ROLLBACK with no PREPARE ===
+
+--let $command=run
+--let $xa_terminate=xa rollback
+--let $xa_prepare_opt=
+--source include/rpl_xa_mixed_engines.inc
+--let $xa_rollback_only=
+
+--source include/sync_slave_sql_with_master.inc
+
+--let $diff_tables= master:tm, slave:tm
+--source include/diff_tables.inc
+
+# Cleanup
+
+--connection master
+--let $command=cleanup
+--source include/rpl_xa_mixed_engines.inc
+
+--source include/sync_slave_sql_with_master.inc
+
+--source include/rpl_end.inc
diff --git a/mysql-test/suite/s3/alter.result b/mysql-test/suite/s3/alter.result
new file mode 100644
index 00000000000..da9ddb11ea7
--- /dev/null
+++ b/mysql-test/suite/s3/alter.result
@@ -0,0 +1,130 @@
+drop table if exists t1,t2,t3;
+#
+# Test ALTER TABLE to and from s3
+#
+create table t1 (a int, b int) engine=aria;
+insert into t1 select seq,seq+10 from seq_1_to_1000;
+alter table t1 engine=s3;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL
+) ENGINE=S3 DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+alter table t1 comment="hello";
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL
+) ENGINE=S3 DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 COMMENT='hello'
+alter table t1 engine=aria;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 COMMENT='hello'
+alter table t1 engine=s3;
+alter table t1 engine=innodb;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 COMMENT='hello'
+select count(*), sum(a), sum(b) from t1;
+count(*) sum(a) sum(b)
+1000 500500 510500
+drop table t1;
+#
+# Test ALTER TABLE to and from s3 with rename
+#
+create table t1 (a int, b int) engine=aria select seq as a,seq+10 as b from seq_1_to_10;
+alter table t1 rename to t2, engine=s3;
+select count(*), sum(a), sum(b) from t2;
+count(*) sum(a) sum(b)
+10 55 155
+show create table t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL
+) ENGINE=S3 DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+alter table t2 rename to t3, engine=aria;
+show create table t3;
+Table Create Table
+t3 CREATE TABLE `t3` (
+ `a` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+select count(*), sum(a), sum(b) from t3;
+count(*) sum(a) sum(b)
+10 55 155
+drop table t3;
+#
+# Test changing options for a s3 table
+#
+create table t1 (a int, b int) engine=aria select seq as a,seq+10 as b from seq_1_to_1000;
+alter table t1 engine=s3;
+alter table t1 engine=s3, compression_algorithm="zlib";
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL
+) ENGINE=S3 DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 `compression_algorithm`='zlib'
+select count(*), sum(a), sum(b) from t1;
+count(*) sum(a) sum(b)
+1000 500500 510500
+drop table t1;
+#
+# Test ALTER TABLE for S3
+#
+create table t1 (a int, b int) engine=aria select seq as a,seq+10 as b from seq_1_to_10;
+alter table t1 add column c int, engine=s3;
+alter table t1 add column d int;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL,
+ `c` int(11) DEFAULT NULL,
+ `d` int(11) DEFAULT NULL
+) ENGINE=S3 DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+select count(*), sum(a), sum(b), sum(c), sum(d) from t1;
+count(*) sum(a) sum(b) sum(c) sum(d)
+10 55 155 NULL NULL
+drop table t1;
+#
+# Test ALTER TABLE with locked table for S3
+#
+create table t1 (a int, b int) engine=aria select seq as a,seq+10 as b from seq_1_to_10;
+lock table t1 write;
+alter table t1 add column c int, engine=s3;
+ERROR HY000: Table 't1' is read only
+unlock tables;
+select count(*), sum(a), sum(b), sum(c) from t1;
+count(*) sum(a) sum(b) sum(c)
+10 55 155 NULL
+lock table t1 write;
+ERROR HY000: Table 't1' is read only
+lock table t1 read;
+select count(*), sum(a), sum(b), sum(c) from t1;
+count(*) sum(a) sum(b) sum(c)
+10 55 155 NULL
+unlock tables;
+drop table t1;
+#
+# Test RENAME TABLE
+#
+create table t1 (a int, b int) engine=aria select seq as a, seq+10 as b from seq_1_to_10;
+alter table t1 engine=s3;
+rename table t1 to t3;
+alter table t3 rename t2;
+select count(*), sum(a), sum(b) from t2;
+count(*) sum(a) sum(b)
+10 55 155
+select count(*), sum(a), sum(b) from t1;
+ERROR 42S02: Table 'database.t1' doesn't exist
+drop table t2;
diff --git a/mysql-test/suite/s3/alter.test b/mysql-test/suite/s3/alter.test
new file mode 100644
index 00000000000..4504804c91a
--- /dev/null
+++ b/mysql-test/suite/s3/alter.test
@@ -0,0 +1,100 @@
+--source include/have_s3.inc
+--source include/have_sequence.inc
+--source include/have_innodb.inc
+
+#
+# Create unique database for running the tests
+#
+--source create_database.inc
+--disable_warnings
+drop table if exists t1,t2,t3;
+--enable_warnings
+
+--echo #
+--echo # Test ALTER TABLE to and from s3
+--echo #
+
+create table t1 (a int, b int) engine=aria;
+insert into t1 select seq,seq+10 from seq_1_to_1000;
+alter table t1 engine=s3;
+show create table t1;
+alter table t1 comment="hello";
+show create table t1;
+alter table t1 engine=aria;
+show create table t1;
+alter table t1 engine=s3;
+alter table t1 engine=innodb;
+show create table t1;
+select count(*), sum(a), sum(b) from t1;
+drop table t1;
+
+--echo #
+--echo # Test ALTER TABLE to and from s3 with rename
+--echo #
+
+create table t1 (a int, b int) engine=aria select seq as a,seq+10 as b from seq_1_to_10;
+alter table t1 rename to t2, engine=s3;
+select count(*), sum(a), sum(b) from t2;
+show create table t2;
+alter table t2 rename to t3, engine=aria;
+show create table t3;
+select count(*), sum(a), sum(b) from t3;
+drop table t3;
+
+--echo #
+--echo # Test changing options for a s3 table
+--echo #
+
+create table t1 (a int, b int) engine=aria select seq as a,seq+10 as b from seq_1_to_1000;
+alter table t1 engine=s3;
+alter table t1 engine=s3, compression_algorithm="zlib";
+show create table t1;
+select count(*), sum(a), sum(b) from t1;
+drop table t1;
+
+--echo #
+--echo # Test ALTER TABLE for S3
+--echo #
+
+create table t1 (a int, b int) engine=aria select seq as a,seq+10 as b from seq_1_to_10;
+alter table t1 add column c int, engine=s3;
+alter table t1 add column d int;
+show create table t1;
+select count(*), sum(a), sum(b), sum(c), sum(d) from t1;
+drop table t1;
+
+--echo #
+--echo # Test ALTER TABLE with locked table for S3
+--echo #
+
+create table t1 (a int, b int) engine=aria select seq as a,seq+10 as b from seq_1_to_10;
+lock table t1 write;
+--error ER_OPEN_AS_READONLY
+alter table t1 add column c int, engine=s3;
+unlock tables;
+select count(*), sum(a), sum(b), sum(c) from t1;
+--error ER_OPEN_AS_READONLY
+lock table t1 write;
+lock table t1 read;
+select count(*), sum(a), sum(b), sum(c) from t1;
+unlock tables;
+drop table t1;
+
+--echo #
+--echo # Test RENAME TABLE
+--echo #
+
+create table t1 (a int, b int) engine=aria select seq as a, seq+10 as b from seq_1_to_10;
+alter table t1 engine=s3;
+rename table t1 to t3;
+alter table t3 rename t2;
+select count(*), sum(a), sum(b) from t2;
+--replace_result $database database
+--error ER_NO_SUCH_TABLE
+select count(*), sum(a), sum(b) from t1;
+drop table t2;
+
+#
+# clean up
+#
+--source drop_database.inc
diff --git a/mysql-test/suite/s3/alter2.result b/mysql-test/suite/s3/alter2.result
new file mode 100644
index 00000000000..8d2cae035c9
--- /dev/null
+++ b/mysql-test/suite/s3/alter2.result
@@ -0,0 +1,49 @@
+#
+# MDEV-19575 Assertion `page_st == 1' failed upon SELECT from S3
+# table which is being converted into Aria
+#
+CREATE TABLE t1 (f INT);
+insert into t1 values (1),(2);
+ALTER TABLE t1 ENGINE=S3;
+select * from t1;
+f
+1
+2
+connect con1,localhost,root,,$database;
+ALTER TABLE t1 ENGINE=Aria;
+connection default;
+SELECT * FROM t1;
+f
+1
+2
+connection con1;
+disconnect con1;
+connection default;
+DROP TABLE t1;
+#
+# MDEV-20302 Server hangs upon concurrent SELECT from partitioned S3
+# table
+#
+CREATE TABLE t1 (
+pk INT AUTO_INCREMENT,
+c CHAR(12),
+PRIMARY KEY(pk),
+KEY(c)
+) ENGINE=Aria
+PARTITION BY KEY(pk) PARTITIONS 2;
+CREATE VIEW v1 AS SELECT * FROM t1;
+INSERT INTO t1 VALUES (NULL,'ill'),(NULL,'loop');
+ALTER TABLE t1 ENGINE=S3;
+connect con1,localhost,root,,$database;
+SELECT * FROM t1 WHERE c BETWEEN 'bar' AND 'foo';
+connection default;
+SELECT pk FROM v1;
+pk
+1
+2
+connection con1;
+pk c
+disconnect con1;
+connection default;
+DROP VIEW v1;
+DROP TABLE t1;
diff --git a/mysql-test/suite/s3/alter2.test b/mysql-test/suite/s3/alter2.test
new file mode 100644
index 00000000000..856b141573b
--- /dev/null
+++ b/mysql-test/suite/s3/alter2.test
@@ -0,0 +1,64 @@
+--source include/have_s3.inc
+--source include/have_partition.inc
+--source create_database.inc
+
+--echo #
+--echo # MDEV-19575 Assertion `page_st == 1' failed upon SELECT from S3
+--echo # table which is being converted into Aria
+--echo #
+
+CREATE TABLE t1 (f INT);
+insert into t1 values (1),(2);
+
+ALTER TABLE t1 ENGINE=S3;
+select * from t1;
+--connect (con1,localhost,root,,$database)
+--send
+ ALTER TABLE t1 ENGINE=Aria;
+
+--connection default
+SELECT * FROM t1;
+
+# Cleanup
+
+--connection con1
+--reap
+--disconnect con1
+--connection default
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-20302 Server hangs upon concurrent SELECT from partitioned S3
+--echo # table
+--echo #
+
+CREATE TABLE t1 (
+ pk INT AUTO_INCREMENT,
+ c CHAR(12),
+ PRIMARY KEY(pk),
+ KEY(c)
+) ENGINE=Aria
+ PARTITION BY KEY(pk) PARTITIONS 2;
+
+CREATE VIEW v1 AS SELECT * FROM t1;
+INSERT INTO t1 VALUES (NULL,'ill'),(NULL,'loop');
+ALTER TABLE t1 ENGINE=S3;
+--connect (con1,localhost,root,,$database)
+--send
+ SELECT * FROM t1 WHERE c BETWEEN 'bar' AND 'foo';
+
+--connection default
+SELECT pk FROM v1;
+
+--connection con1
+--reap
+
+--disconnect con1
+--connection default
+DROP VIEW v1;
+DROP TABLE t1;
+
+#
+# clean up
+#
+--source drop_database.inc
diff --git a/mysql-test/suite/s3/amazon.result b/mysql-test/suite/s3/amazon.result
new file mode 100644
index 00000000000..29075118a63
--- /dev/null
+++ b/mysql-test/suite/s3/amazon.result
@@ -0,0 +1,7 @@
+set @save_s3_protocol_version=@@global.s3_protocol_version;
+set @@global.s3_protocol_version="Original";
+create table t1 (pk int primary key, a int);
+insert into t1 values (1,1),(2,2),(3,3),(4,4);
+alter table t1 engine=S3;
+drop table t1;
+set @@global.s3_protocol_version=@save_s3_protocol_version;
diff --git a/mysql-test/suite/s3/amazon.test b/mysql-test/suite/s3/amazon.test
new file mode 100644
index 00000000000..3c64cc2841b
--- /dev/null
+++ b/mysql-test/suite/s3/amazon.test
@@ -0,0 +1,27 @@
+--source include/have_s3.inc
+
+if (`SELECT @@s3_host_name <> "s3.amazonaws.com"`)
+{
+ skip Not connected to AWS;
+}
+
+--source create_database.inc
+
+#
+# Check options against amazon
+#
+
+set @save_s3_protocol_version=@@global.s3_protocol_version;
+set @@global.s3_protocol_version="Original";
+
+create table t1 (pk int primary key, a int);
+insert into t1 values (1,1),(2,2),(3,3),(4,4);
+--replace_result $database database
+alter table t1 engine=S3;
+drop table t1;
+
+#
+# clean up
+#
+set @@global.s3_protocol_version=@save_s3_protocol_version;
+--source drop_database.inc
diff --git a/mysql-test/suite/s3/arguments.result b/mysql-test/suite/s3/arguments.result
new file mode 100644
index 00000000000..4a371aabc9b
--- /dev/null
+++ b/mysql-test/suite/s3/arguments.result
@@ -0,0 +1,58 @@
+drop table if exists t1;
+#
+# Test options
+#
+create or replace table t1 (a int, b int, key(a)) engine=aria;
+insert into t1 select seq,seq+10 from seq_1_to_10;
+alter table t1 engine=s3, s3_block_size=819200, compression_algorithm="zlib";
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL,
+ KEY `a` (`a`)
+) ENGINE=S3 DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 `s3_block_size`=819200 `compression_algorithm`='zlib'
+alter table t1 engine=s3, s3_block_size=8192;
+ERROR HY000: Incorrect value '8192' for option 's3_block_size'
+alter table t1 engine=s3, s3_block_size=65536;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL,
+ KEY `a` (`a`)
+) ENGINE=S3 DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 `compression_algorithm`='zlib' `s3_block_size`=65536
+alter table t1 engine=s3, s3_block_size=100000;
+ERROR HY000: Incorrect value '100000' for option 's3_block_size'
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL,
+ KEY `a` (`a`)
+) ENGINE=S3 DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 `compression_algorithm`='zlib' `s3_block_size`=65536
+alter table t1 engine=s3, compression_algorithm="wss";
+ERROR HY000: Incorrect value 'wss' for option 'compression_algorithm'
+drop table t1;
+# Check that key variables are not shown to the end user
+show variables like "s3%key";
+Variable_name Value
+s3_access_key *****
+s3_secret_key *****
+# Show some "static" s3 variables
+set @tmp= @@global.s3_block_size;
+show variables like "s3_block_size";
+Variable_name Value
+s3_block_size 4194304
+set @@global.s3_block_size=65536;
+show variables like "s3_block_size";
+Variable_name Value
+s3_block_size 65536
+set @@global.s3_block_size= @tmp;
+set @@s3_block_size=65536;
+ERROR HY000: Variable 's3_block_size' is a GLOBAL variable and should be set with SET GLOBAL
+# Check s3 variables that can't be changed by end user
+set @@s3_access_key="abc";
+ERROR HY000: Variable 's3_access_key' is a read only variable
+set @@s3_secret_key="abc";
+ERROR HY000: Variable 's3_secret_key' is a read only variable
diff --git a/mysql-test/suite/s3/arguments.test b/mysql-test/suite/s3/arguments.test
new file mode 100644
index 00000000000..76ef4c960dd
--- /dev/null
+++ b/mysql-test/suite/s3/arguments.test
@@ -0,0 +1,54 @@
+--source include/have_s3.inc
+--source include/have_sequence.inc
+
+#
+# Create unique database for running the tests
+#
+--source create_database.inc
+--disable_warnings
+drop table if exists t1;
+--enable_warnings
+
+--echo #
+--echo # Test options
+--echo #
+
+create or replace table t1 (a int, b int, key(a)) engine=aria;
+insert into t1 select seq,seq+10 from seq_1_to_10;
+alter table t1 engine=s3, s3_block_size=819200, compression_algorithm="zlib";
+show create table t1;
+--error ER_BAD_OPTION_VALUE
+alter table t1 engine=s3, s3_block_size=8192;
+alter table t1 engine=s3, s3_block_size=65536;
+show create table t1;
+--error ER_BAD_OPTION_VALUE
+alter table t1 engine=s3, s3_block_size=100000;
+show create table t1;
+--error ER_BAD_OPTION_VALUE
+alter table t1 engine=s3, compression_algorithm="wss";
+drop table t1;
+
+--echo # Check that key variables are not shown to the end user
+
+show variables like "s3%key";
+
+--echo # Show some "static" s3 variables
+set @tmp= @@global.s3_block_size;
+show variables like "s3_block_size";
+set @@global.s3_block_size=65536;
+show variables like "s3_block_size";
+set @@global.s3_block_size= @tmp;
+--error ER_GLOBAL_VARIABLE
+set @@s3_block_size=65536;
+
+--echo # Check s3 variables that can't be changed by end user
+
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set @@s3_access_key="abc";
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set @@s3_secret_key="abc";
+
+#
+# clean up
+#
+--source drop_database.inc
diff --git a/mysql-test/suite/s3/backup.result b/mysql-test/suite/s3/backup.result
new file mode 100644
index 00000000000..55065d7baa8
--- /dev/null
+++ b/mysql-test/suite/s3/backup.result
@@ -0,0 +1,18 @@
+#
+# MDEV-19585 Assertion `!is_set() || (m_status == DA_OK_BULK &&
+# is_bulk_op())' failed upon SELECT from S3 table with concurrent
+# BACKUP stage
+#
+CREATE TABLE t1 (a INT);
+ALTER TABLE t1 ENGINE=S3;
+connect con1,localhost,root,,test;
+BACKUP STAGE START;
+connection default;
+SELECT * FROM t1;
+connection con1;
+BACKUP STAGE BLOCK_COMMIT;
+BACKUP STAGE END;
+disconnect con1;
+connection default;
+a
+DROP TABLE t1;
diff --git a/mysql-test/suite/s3/backup.test b/mysql-test/suite/s3/backup.test
new file mode 100644
index 00000000000..06f61429707
--- /dev/null
+++ b/mysql-test/suite/s3/backup.test
@@ -0,0 +1,33 @@
+--source include/have_s3.inc
+--source create_database.inc
+
+--echo #
+--echo # MDEV-19585 Assertion `!is_set() || (m_status == DA_OK_BULK &&
+--echo # is_bulk_op())' failed upon SELECT from S3 table with concurrent
+--echo # BACKUP stage
+--echo #
+
+CREATE TABLE t1 (a INT);
+ALTER TABLE t1 ENGINE=S3;
+
+--connect (con1,localhost,root,,test)
+BACKUP STAGE START;
+
+--connection default
+--send
+SELECT * FROM t1;
+
+--connection con1
+BACKUP STAGE BLOCK_COMMIT;
+
+# Cleanup
+BACKUP STAGE END;
+--disconnect con1
+--connection default
+--reap
+DROP TABLE t1;
+
+#
+# clean up
+#
+--source drop_database.inc
diff --git a/mysql-test/suite/s3/basic.result b/mysql-test/suite/s3/basic.result
new file mode 100644
index 00000000000..ac391ba3574
--- /dev/null
+++ b/mysql-test/suite/s3/basic.result
@@ -0,0 +1,156 @@
+drop table if exists t1;
+#
+# Test simple create of s3 table
+#
+create or replace table t1 (a int, b int, c varchar(1000), key (a), key(c)) engine=aria;
+insert into t1 select seq, seq+10, repeat(char(65+ mod(seq, 20)),mod(seq,1000)) from seq_1_to_10000;
+alter table t1 engine=s3;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL,
+ `c` varchar(1000) DEFAULT NULL,
+ KEY `a` (`a`),
+ KEY `c` (`c`)
+) ENGINE=S3 DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+select * from information_schema.tables where table_schema="database" and table_name="t1";;
+TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT MAX_INDEX_LENGTH TEMPORARY
+def # t1 BASE TABLE S3 10 Page 10000 567 5677056 # 761856 0 NULL # # # latin1_swedish_ci NULL page_checksum=1 2305843009213685760 #
+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 S3 10 Page 10000 567 5677056 # 761856 0 NULL # # # latin1_swedish_ci NULL page_checksum=1 # N
+select a,b from t1 limit 10;
+a b
+1 11
+2 12
+3 13
+4 14
+5 15
+6 16
+7 17
+8 18
+9 19
+10 20
+select count(*) from t1;
+count(*)
+10000
+select a,b from t1 where a between 10 and 20;
+a b
+10 20
+11 21
+12 22
+13 23
+14 24
+15 25
+16 26
+17 27
+18 28
+19 29
+20 30
+explain select * from t1 where a between 10 and 20;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range a a 5 NULL # Using index condition
+insert into t1 values (1,1);
+ERROR HY000: Table 't1' is read only
+update t1 set b=100 where a=1;
+ERROR HY000: Table 't1' is read only
+delete from t1 where a>10;
+ERROR HY000: Table 't1' is read only
+#
+# Analyze, repair, optimize and check table
+#
+set @@use_stat_tables='never';
+truncate mysql.table_stats;
+check table t1 fast;
+Table Op Msg_type Msg_text
+database.t1 check status Table is already up to date
+check table t1 quick;
+Table Op Msg_type Msg_text
+database.t1 check status OK
+check table t1 extended;
+Table Op Msg_type Msg_text
+database.t1 check status OK
+analyze table t1;
+Table Op Msg_type Msg_text
+database.t1 analyze status Table 'database.t1' is read only
+analyze table t1 persistent for all;
+Table Op Msg_type Msg_text
+database.t1 analyze status Table 'database.t1' is read only
+database.t1 analyze status Engine-independent statistics collected
+database.t1 analyze status OK
+repair table t1;
+Table Op Msg_type Msg_text
+database.t1 repair Error Table 't1' is read only
+database.t1 repair status Operation failed
+optimize table t1;
+Table Op Msg_type Msg_text
+database.t1 optimize Error Table 't1' is read only
+database.t1 optimize status Operation failed
+select * from mysql.table_stats;
+db_name table_name cardinality
+database t1 10000
+#
+# Converting table back to Aria
+#
+alter table t1 engine=aria;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL,
+ `c` varchar(1000) DEFAULT NULL,
+ KEY `a` (`a`),
+ KEY `c` (`c`)
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+select a,b from t1 limit 10;
+a b
+1 11
+2 12
+3 13
+4 14
+5 15
+6 16
+7 17
+8 18
+9 19
+10 20
+select count(*) from t1;
+count(*)
+10000
+delete from t1 where a=1;
+drop table t1;
+#
+# status
+#
+show variables like "s3%";
+Variable_name Value
+s3_access_key X
+s3_block_size X
+s3_bucket X
+s3_debug X
+s3_host_name X
+s3_pagecache_age_threshold X
+s3_pagecache_buffer_size X
+s3_pagecache_division_limit X
+s3_pagecache_file_hash_size X
+s3_port X
+s3_protocol_version X
+s3_region X
+s3_replicate_alter_as_create_select X
+s3_secret_key X
+s3_slave_ignore_updates X
+s3_use_http X
+show variables like "s3_slave%";
+Variable_name Value
+s3_slave_ignore_updates OFF
+show variables like "s3_replicate%";
+Variable_name Value
+s3_replicate_alter_as_create_select ON
+show status like "s3%";
+Variable_name Value
+S3_pagecache_blocks_not_flushed X
+S3_pagecache_blocks_unused X
+S3_pagecache_blocks_used X
+S3_pagecache_read_requests X
+S3_pagecache_reads X
diff --git a/mysql-test/suite/s3/basic.test b/mysql-test/suite/s3/basic.test
new file mode 100644
index 00000000000..99c2d8adb5d
--- /dev/null
+++ b/mysql-test/suite/s3/basic.test
@@ -0,0 +1,88 @@
+--source include/have_s3.inc
+--source include/have_sequence.inc
+
+#
+# Create unique database for running the tests
+#
+--source create_database.inc
+--disable_warnings
+drop table if exists t1;
+--enable_warnings
+
+--echo #
+--echo # Test simple create of s3 table
+--echo #
+
+create or replace table t1 (a int, b int, c varchar(1000), key (a), key(c)) engine=aria;
+insert into t1 select seq, seq+10, repeat(char(65+ mod(seq, 20)),mod(seq,1000)) from seq_1_to_10000;
+alter table t1 engine=s3;
+show create table t1;
+
+--replace_column 2 # 11 # 15 # 16 # 17 # 23 #
+--replace_result $database database
+--eval select * from information_schema.tables where table_schema="$database" and table_name="t1";
+--replace_column 8 # 12 # 13 # 14 # 19 #
+show table status like "t1";
+select a,b from t1 limit 10;
+select count(*) from t1;
+select a,b from t1 where a between 10 and 20;
+--replace_column 9 #
+explain select * from t1 where a between 10 and 20;
+--error ER_OPEN_AS_READONLY
+insert into t1 values (1,1);
+--error ER_OPEN_AS_READONLY
+update t1 set b=100 where a=1;
+--error ER_OPEN_AS_READONLY
+delete from t1 where a>10;
+
+
+--echo #
+--echo # Analyze, repair, optimize and check table
+--echo #
+
+set @@use_stat_tables='never';
+truncate mysql.table_stats;
+--replace_result $database database
+check table t1 fast;
+--replace_result $database database
+check table t1 quick;
+--replace_result $database database
+check table t1 extended;
+--replace_result $database database
+analyze table t1;
+--replace_result $database database
+analyze table t1 persistent for all;
+--replace_result $database database
+repair table t1;
+--replace_result $database database
+optimize table t1;
+--replace_result $database database
+select * from mysql.table_stats;
+
+--echo #
+--echo # Converting table back to Aria
+--echo #
+
+alter table t1 engine=aria;
+show create table t1;
+select a,b from t1 limit 10;
+select count(*) from t1;
+delete from t1 where a=1;
+drop table t1;
+
+--echo #
+--echo # status
+--echo #
+
+--replace_column 2 X
+show variables like "s3%";
+show variables like "s3_slave%";
+show variables like "s3_replicate%";
+
+--replace_column 2 X
+show status like "s3%";
+
+#
+# clean up
+#
+--source drop_database.inc
diff --git a/mysql-test/suite/s3/create_database.inc b/mysql-test/suite/s3/create_database.inc
new file mode 100644
index 00000000000..880cdd3a8d5
--- /dev/null
+++ b/mysql-test/suite/s3/create_database.inc
@@ -0,0 +1,10 @@
+#
+# Create unique database to not conflict with concurrently running tests as
+# the s3 database is shared
+#
+
+let $database=`select concat("s3_test_",replace(uuid(),"-",""))`;
+--disable_query_log
+--eval create database $database;
+--eval use $database;
+--enable_query_log
diff --git a/mysql-test/suite/s3/disabled.def b/mysql-test/suite/s3/disabled.def
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/mysql-test/suite/s3/disabled.def
diff --git a/mysql-test/suite/s3/discovery.result b/mysql-test/suite/s3/discovery.result
new file mode 100644
index 00000000000..abc97867e89
--- /dev/null
+++ b/mysql-test/suite/s3/discovery.result
@@ -0,0 +1,57 @@
+drop table if exists t1,t2;
+#
+# Test discovery of s3
+#
+create table t1 (a int, b int) engine=aria select seq as a, seq+10 as b from seq_1_to_10;
+alter table t1 engine=s3;
+#
+# Check discovery by select
+#
+flush tables;
+select * from t1 limit 1;
+a b
+1 11
+#
+# Check if changes to .frm is copied to S3
+#
+alter table t1 change column b c int not null;
+flush tables;
+select * from t1 limit 1;
+a c
+1 11
+#
+# Check if SHOW TABLES finds the S3 tables
+#
+create table t2 (a int, b int) engine=aria select seq as a, seq+10 as b from seq_1_to_10;
+alter table t2 engine=s3;
+flush tables;
+SHOW TABLES;
+Tables_in_database
+t1
+t2
+drop table t2;
+#
+# Check if DROP TABLE works with discovery
+#
+select count(*) from t1;
+count(*)
+10
+flush tables;
+drop table t1;
+select count(*), sum(a) from t1;
+ERROR 42S02: Table 'database.t1' doesn't exist
+#
+# Check if S3 detects that the .frm is too old
+#
+create table t1 (a int, b int) engine=aria select seq as a, seq+10 as b from seq_1_to_10;
+alter table t1 engine=s3;
+alter table t1 add column c int, engine=s3;
+flush tables;
+select * from t1 limit 1;
+a b c
+1 11 NULL
+flush tables;
+select * from t1 limit 1;
+a b c
+1 11 NULL
+drop table t1;
diff --git a/mysql-test/suite/s3/discovery.test b/mysql-test/suite/s3/discovery.test
new file mode 100644
index 00000000000..b85776acac5
--- /dev/null
+++ b/mysql-test/suite/s3/discovery.test
@@ -0,0 +1,84 @@
+--source include/have_s3.inc
+--source include/have_sequence.inc
+
+#
+# Create unique database for running the tests
+#
+--source create_database.inc
+--disable_warnings
+drop table if exists t1,t2;
+--enable_warnings
+
+let $datadir=`select @@datadir`;
+
+--echo #
+--echo # Test discovery of s3
+--echo #
+
+create table t1 (a int, b int) engine=aria select seq as a, seq+10 as b from seq_1_to_10;
+alter table t1 engine=s3;
+
+--echo #
+--echo # Check discovery by select
+--echo #
+
+--remove_file $datadir/$database/t1.frm
+flush tables;
+select * from t1 limit 1;
+
+--echo #
+--echo # Check if changes to .frm is copied to S3
+--echo #
+
+alter table t1 change column b c int not null;
+flush tables;
+--remove_file $datadir/$database/t1.frm
+select * from t1 limit 1;
+
+--echo #
+--echo # Check if SHOW TABLES finds the S3 tables
+--echo #
+
+create table t2 (a int, b int) engine=aria select seq as a, seq+10 as b from seq_1_to_10;
+alter table t2 engine=s3;
+
+flush tables;
+--remove_file $datadir/$database/t1.frm
+--replace_result $database database
+SHOW TABLES;
+drop table t2;
+
+--echo #
+--echo # Check if DROP TABLE works with discovery
+--echo #
+
+select count(*) from t1;
+flush tables;
+--remove_file $datadir/$database/t1.frm
+drop table t1;
+--replace_result $database database
+--error ER_NO_SUCH_TABLE
+select count(*), sum(a) from t1;
+
+--echo #
+--echo # Check if S3 detects that the .frm is too old
+--echo #
+
+create table t1 (a int, b int) engine=aria select seq as a, seq+10 as b from seq_1_to_10;
+alter table t1 engine=s3;
+--copy_file $datadir/$database/t1.frm $datadir/$database/t1.frm-old
+alter table t1 add column c int, engine=s3;
+flush tables;
+--remove_file $datadir/$database/t1.frm
+--copy_file $datadir/$database/t1.frm-old $datadir/$database/t1.frm
+--remove_file $datadir/$database/t1.frm-old
+select * from t1 limit 1;
+flush tables;
+--remove_file $datadir/$database/t1.frm
+select * from t1 limit 1;
+drop table t1;
+
+#
+# clean up
+#
+--source drop_database.inc
diff --git a/mysql-test/suite/s3/drop_database.inc b/mysql-test/suite/s3/drop_database.inc
new file mode 100644
index 00000000000..a5425f4ed47
--- /dev/null
+++ b/mysql-test/suite/s3/drop_database.inc
@@ -0,0 +1,9 @@
+
+#
+# Drop database created by the s3 tests
+#
+
+--disable_query_log
+use test;
+--eval drop database $database;
+--enable_query_log
diff --git a/mysql-test/suite/mariabackup/ddl_incremental_encrypted.opt b/mysql-test/suite/s3/encryption.opt
index 1de4aa13350..8f13b08c5c4 100644
--- a/mysql-test/suite/mariabackup/ddl_incremental_encrypted.opt
+++ b/mysql-test/suite/s3/encryption.opt
@@ -1,7 +1,4 @@
--plugin-load-add=$FILE_KEY_MANAGEMENT_SO
---innodb-file-per-table
---innodb-encryption-threads=4
---innodb-encrypt-tables
---innodb-encrypt-log
+--aria-encrypt-tables=1
--loose-file-key-management
--loose-file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys.txt
diff --git a/mysql-test/suite/s3/encryption.result b/mysql-test/suite/s3/encryption.result
new file mode 100644
index 00000000000..c60490d342a
--- /dev/null
+++ b/mysql-test/suite/s3/encryption.result
@@ -0,0 +1,23 @@
+#
+# MDEV-20306
+# Assertion `!(end_of_data > info->scan.dir_end)' failed in
+# _ma_scan_block_record upon converting table from S3 to Aria
+# with encryption enabled
+#
+drop table if exists t1;
+CREATE TABLE t1 (a INT) ENGINE=Aria;
+INSERT INTO t1 VALUES (1);
+ALTER TABLE t1 ENGINE=S3;
+select * from t1;
+a
+1
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL
+) ENGINE=S3 DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+ALTER TABLE t1 ENGINE=Aria;
+select * from t1;
+a
+1
+DROP TABLE t1;
diff --git a/mysql-test/suite/s3/encryption.test b/mysql-test/suite/s3/encryption.test
new file mode 100644
index 00000000000..82434627309
--- /dev/null
+++ b/mysql-test/suite/s3/encryption.test
@@ -0,0 +1,36 @@
+--source include/have_s3.inc
+
+if (`SELECT COUNT(*)=0 FROM INFORMATION_SCHEMA.PLUGINS WHERE PLUGIN_NAME = 'file_key_management' AND PLUGIN_STATUS='ACTIVE'`)
+{
+ --skip Test requires file_key_management plugin
+}
+
+#
+# Create unique database for running the tests
+#
+--source create_database.inc
+
+--echo #
+--echo # MDEV-20306
+--echo # Assertion `!(end_of_data > info->scan.dir_end)' failed in
+--echo # _ma_scan_block_record upon converting table from S3 to Aria
+--echo # with encryption enabled
+--echo #
+
+--disable_warnings
+drop table if exists t1;
+--enable_warnings
+
+CREATE TABLE t1 (a INT) ENGINE=Aria;
+INSERT INTO t1 VALUES (1);
+ALTER TABLE t1 ENGINE=S3;
+select * from t1;
+show create table t1;
+ALTER TABLE t1 ENGINE=Aria;
+select * from t1;
+DROP TABLE t1;
+
+#
+# clean up
+#
+--source drop_database.inc
diff --git a/mysql-test/suite/s3/innodb.result b/mysql-test/suite/s3/innodb.result
new file mode 100644
index 00000000000..eaa9cf93c86
--- /dev/null
+++ b/mysql-test/suite/s3/innodb.result
@@ -0,0 +1,31 @@
+drop table if exists t1,t2,t3;
+#
+# Test ALTER TABLE to and from s3
+#
+create table t1 (a int, b int) engine=innodb;
+insert into t1 select seq,seq+10 from seq_1_to_1000;
+alter table t1 engine=s3;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL
+) ENGINE=S3 DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+alter table t1 comment="hello";
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL
+) ENGINE=S3 DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 COMMENT='hello'
+alter table t1 engine=innodb;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 COMMENT='hello'
+select count(*), sum(a), sum(b) from t1;
+count(*) sum(a) sum(b)
+1000 500500 510500
+drop table t1;
diff --git a/mysql-test/suite/s3/innodb.test b/mysql-test/suite/s3/innodb.test
new file mode 100644
index 00000000000..e2687064bdb
--- /dev/null
+++ b/mysql-test/suite/s3/innodb.test
@@ -0,0 +1,35 @@
+--source include/have_s3.inc
+--source include/have_sequence.inc
+--source include/have_innodb.inc
+
+#
+# Testing converting InnoDB tables to S3
+#
+
+#
+# Create unique database for running the tests
+#
+--source create_database.inc
+--disable_warnings
+drop table if exists t1,t2,t3;
+--enable_warnings
+
+--echo #
+--echo # Test ALTER TABLE to and from s3
+--echo #
+
+create table t1 (a int, b int) engine=innodb;
+insert into t1 select seq,seq+10 from seq_1_to_1000;
+alter table t1 engine=s3;
+show create table t1;
+alter table t1 comment="hello";
+show create table t1;
+alter table t1 engine=innodb;
+show create table t1;
+select count(*), sum(a), sum(b) from t1;
+drop table t1;
+
+#
+# clean up
+#
+--source drop_database.inc
diff --git a/mysql-test/suite/s3/my.cnf b/mysql-test/suite/s3/my.cnf
new file mode 100644
index 00000000000..f851aa18d6d
--- /dev/null
+++ b/mysql-test/suite/s3/my.cnf
@@ -0,0 +1,33 @@
+!include include/default_mysqld.cnf
+!include include/default_client.cnf
+
+[mysqld.1]
+plugin-load-add=@ENV.HA_S3_SO
+s3=ON
+s3-host-name=@ENV.S3_HOST_NAME
+s3-protocol-version=@ENV.S3_PROTOCOL_VERSION
+s3-bucket=@ENV.S3_BUCKET
+s3-access-key=@ENV.S3_ACCESS_KEY
+s3-secret-key=@ENV.S3_SECRET_KEY
+s3-region=@ENV.S3_REGION
+s3-port=@ENV.S3_PORT
+s3-use-http=@ENV.S3_USE_HTTP
+
+#s3-host-name=s3.amazonaws.com
+#s3-protocol-version=Amazon
+#s3-bucket=MariaDB
+#s3-access-key=...
+#s3-secret-key=...
+#s3-region=eu-north-1
+
+##
+## Configuration for local MinIO
+##
+#s3-host-name="127.0.0.1"
+## Note: s3-host-name="localhost" doesn't work. It causes
+## libmarias3 to use the wrong variant of the protocol.
+#s3-bucket=storage-engine
+#s3-access-key=minio
+#s3-secret-key=minioadmin
+#s3-port=9000
+#s3-use-http=ON
diff --git a/mysql-test/suite/s3/mysqldump.result b/mysql-test/suite/s3/mysqldump.result
new file mode 100644
index 00000000000..995cbf5bc63
--- /dev/null
+++ b/mysql-test/suite/s3/mysqldump.result
@@ -0,0 +1,60 @@
+create table t1 (pk int primary key, a int);
+insert into t1 values (1,1),(2,2),(3,3),(4,4);
+alter table t1 engine=S3;
+#####
+# mysqldump with --copy-s3-tables=0 (by default)
+###
+#####
+# mysqldump with --copy-s3-tables=0 (by default) XML
+###
+<?xml version="1.0"?>
+<mysqldump xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+<database name="database">
+</database>
+</mysqldump>
+#####
+# mysqldump with --copy-s3-tables=1
+###
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `t1` (
+ `pk` int(11) NOT NULL,
+ `a` int(11) DEFAULT NULL,
+ PRIMARY KEY (`pk`)
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+INSERT INTO `t1` VALUES (1,1),(2,2),(3,3),(4,4);
+ATER TABLE `t1` ENGINE=S3;
+#####
+# mysqldump with --copy-s3-tables=1 XML
+###
+<?xml version="1.0"?>
+<mysqldump xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+<database name="database">
+ <table_structure name="t1">
+ <field Field="pk" Type="int(11)" Null="NO" Key="PRI" Extra="" Comment="" />
+ <field Field="a" Type="int(11)" Null="YES" Key="" Default="NULL" Extra="" Comment="" />
+ <key Table="t1" Non_unique="0" Key_name="PRIMARY" Seq_in_index="1" Column_name="pk" Collation="A" Cardinality="4" Null="" Index_type="BTREE" Comment="" Index_comment="" />
+ <options Name="t1" Engine="Aria" Version="10" Row_format="Page" Rows="4" Avg_row_length="4096" Data_length="16384" Max_data_length="17592186011648" Index_length="16384" Data_free="0" Create_time="--TIME--" Collation="latin1_swedish_ci" Create_options="" Comment="" Max_index_length="9007199254732800" Temporary="N" />
+ </table_structure>
+ <table_data name="t1">
+ <row>
+ <field name="pk">1</field>
+ <field name="a">1</field>
+ </row>
+ <row>
+ <field name="pk">2</field>
+ <field name="a">2</field>
+ </row>
+ <row>
+ <field name="pk">3</field>
+ <field name="a">3</field>
+ </row>
+ <row>
+ <field name="pk">4</field>
+ <field name="a">4</field>
+ </row>
+ </table_data>
+</database>
+</mysqldump>
+drop table t1;
diff --git a/mysql-test/suite/s3/mysqldump.test b/mysql-test/suite/s3/mysqldump.test
new file mode 100644
index 00000000000..83d2310d636
--- /dev/null
+++ b/mysql-test/suite/s3/mysqldump.test
@@ -0,0 +1,33 @@
+--source include/have_s3.inc
+--source create_database.inc
+
+create table t1 (pk int primary key, a int);
+insert into t1 values (1,1),(2,2),(3,3),(4,4);
+alter table t1 engine=S3;
+
+--echo #####
+--echo # mysqldump with --copy-s3-tables=0 (by default)
+--echo ###
+--exec $MYSQL_DUMP --compact $database
+--echo #####
+--echo # mysqldump with --copy-s3-tables=0 (by default) XML
+--echo ###
+--replace_regex /[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}(.[0-9]{2})*/--TIME--/
+--replace_result $database database
+--exec $MYSQL_DUMP --compact -X $database
+--echo #####
+--echo # mysqldump with --copy-s3-tables=1
+--echo ###
+--exec $MYSQL_DUMP --compact --copy-s3-tables=1 $database
+--echo #####
+--echo # mysqldump with --copy-s3-tables=1 XML
+--echo ###
+--replace_regex /[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}(.[0-9]{2})*/--TIME--/
+--replace_result $database database
+--exec $MYSQL_DUMP --compact --copy-s3-tables=1 -X $database
+
+drop table t1;
+#
+# clean up
+#
+--source drop_database.inc
diff --git a/mysql-test/suite/s3/no_s3-master.opt b/mysql-test/suite/s3/no_s3-master.opt
new file mode 100644
index 00000000000..ad13d335ae9
--- /dev/null
+++ b/mysql-test/suite/s3/no_s3-master.opt
@@ -0,0 +1 @@
+--s3-bucket=storage-engine --s3-access-key="" --s3-secret-key="" --s3-region=eu-north-1
diff --git a/mysql-test/suite/s3/no_s3.result b/mysql-test/suite/s3/no_s3.result
new file mode 100644
index 00000000000..9333944cf66
--- /dev/null
+++ b/mysql-test/suite/s3/no_s3.result
@@ -0,0 +1,11 @@
+create table t1 (a int, b int) engine=aria select seq,seq+10 from seq_1_to_2;
+alter table t1 engine=s3;
+ERROR HY000: Can't create table `test`.`t1` (errno: 138 "Unsupported extension used for table")
+drop table t1;
+select * from s3_unique_table;
+ERROR 42000: Table 's3_unique_table' uses an extension that doesn't exist in this MariaDB version
+truncate table s3_unique_table;
+ERROR 42000: Table 's3_unique_table' uses an extension that doesn't exist in this MariaDB version
+rename table s3_unique_table to t1;
+ERROR HY000: Error on rename of './test/s3_unique_table' to './test/t1' (errno: 138 "Unsupported extension used for table")
+drop table s3_unique_table;
diff --git a/mysql-test/suite/s3/no_s3.test b/mysql-test/suite/s3/no_s3.test
new file mode 100644
index 00000000000..6c5df76bfa3
--- /dev/null
+++ b/mysql-test/suite/s3/no_s3.test
@@ -0,0 +1,25 @@
+--source include/have_sequence.inc
+
+let $datadir=`select @@datadir`;
+
+if (`select @@global.s3_secret_key <> "" or @@global.s3_access_key <> ""`)
+{
+ skip S3 engine options given (probably from command line);
+}
+
+#
+# Test what happens when we don't have s3 enabled
+#
+create table t1 (a int, b int) engine=aria select seq,seq+10 from seq_1_to_2;
+--error ER_CANT_CREATE_TABLE
+alter table t1 engine=s3;
+drop table t1;
+
+--copy_file std_data/s3_unique_table.frm $datadir/test/s3_unique_table.frm
+--error ER_UNSUPPORTED_EXTENSION
+select * from s3_unique_table;
+--error ER_UNSUPPORTED_EXTENSION
+truncate table s3_unique_table;
+--error ER_ERROR_ON_RENAME
+rename table s3_unique_table to t1;
+drop table s3_unique_table;
diff --git a/mysql-test/suite/s3/partition.result b/mysql-test/suite/s3/partition.result
new file mode 100644
index 00000000000..86a70b3c694
--- /dev/null
+++ b/mysql-test/suite/s3/partition.result
@@ -0,0 +1,166 @@
+# Test for COALESCE PARTITION, ALTER TABLE and ADD PARTITIONS
+# for tables with HASH partitions
+CREATE TABLE t1 (
+c1 INT DEFAULT NULL
+) ENGINE=Aria
+PARTITION BY HASH (c1)
+PARTITIONS 3;
+INSERT INTO t1 VALUE (1), (2), (101), (102), (201), (202);
+ALTER TABLE t1 ENGINE=S3;
+SELECT count(*) FROM t1;
+count(*)
+6
+SHOW TABLES;
+Tables_in_s3
+t1
+ALTER TABLE t1 COALESCE PARTITION 2;
+ERROR 42000: Table 't1' uses an extension that doesn't exist in this MariaDB version
+SHOW WARNINGS;
+Level Code Message
+Error 1112 Table 't1' uses an extension that doesn't exist in this MariaDB version
+Error 6 Error on delete of './s3/t1#P#p0#TMP#.MAI' (Errcode: 2 "No such file or directory")
+Error 6 Error on delete of './s3/t1#P#p0#TMP#.MAD' (Errcode: 2 "No such file or directory")
+ALTER TABLE t1 ADD PARTITION PARTITIONS 6;
+SELECT count(*) FROM t1;
+count(*)
+6
+ALTER TABLE t1 ADD COLUMN c INT;
+SELECT count(*) FROM t1;
+count(*)
+6
+DROP TABLE t1;
+# Test for simple change engine to S3
+CREATE TABLE t1 (
+c1 int DEFAULT NULL,
+c2 int DEFAULT NULL
+) ENGINE=Aria
+PARTITION BY RANGE (c1)
+SUBPARTITION BY HASH(c2)
+SUBPARTITIONS 2
+(PARTITION p0 VALUES LESS THAN (100),
+PARTITION p1 VALUES LESS THAN (200),
+PARTITION p3 VALUES LESS THAN (300));
+INSERT INTO t1 VALUE (1,1), (2,2), (101,101), (102,102), (201,201), (202,202);
+ALTER TABLE t1 ENGINE=S3;
+SELECT count(*) FROM t1;
+count(*)
+6
+# Test for rename table
+RENAME TABLE t1 TO t2;
+SELECT count(*) FROM t2;
+count(*)
+6
+# Test for TRUNCATE, ANALYZE, CHECK, REBUILD, OPTIMIZE, REPAIR,
+# ADD, DROP, REORGANIZE partition
+ALTER TABLE t2 TRUNCATE PARTITION p3;
+ERROR HY000: Table 't2' is read only
+ALTER TABLE t2 ANALYZE PARTITION p3;
+Table Op Msg_type Msg_text
+s3.t2 analyze status Table 's3.t2' is read only
+s3.t2 analyze status Engine-independent statistics collected
+s3.t2 analyze status OK
+SELECT count(*) FROM t2;
+count(*)
+6
+ALTER TABLE t2 CHECK PARTITION p3;
+Table Op Msg_type Msg_text
+s3.t2 check status OK
+SELECT count(*) FROM t2;
+count(*)
+6
+ALTER TABLE t2 REBUILD PARTITION p0, p1;
+ERROR 42000: Table 't2' uses an extension that doesn't exist in this MariaDB version
+ALTER TABLE t2 OPTIMIZE PARTITION p0, p1;
+Table Op Msg_type Msg_text
+s3.t2 optimize Error Table 't2' is read only
+s3.t2 optimize status Operation failed
+SELECT count(*) FROM t2;
+count(*)
+6
+ALTER TABLE t2 REPAIR PARTITION p0, p1;
+Table Op Msg_type Msg_text
+s3.t2 repair Error Table 't2' is read only
+s3.t2 repair status Operation failed
+SELECT count(*) FROM t2;
+count(*)
+6
+ALTER TABLE t2 ADD PARTITION (PARTITION p4 VALUES LESS THAN (400));
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c1` int(11) DEFAULT NULL,
+ `c2` int(11) DEFAULT NULL
+) ENGINE=S3 DEFAULT CHARSET=latin1
+ PARTITION BY RANGE (`c1`)
+SUBPARTITION BY HASH (`c2`)
+SUBPARTITIONS 2
+(PARTITION `p0` VALUES LESS THAN (100) ENGINE = S3,
+ PARTITION `p1` VALUES LESS THAN (200) ENGINE = S3,
+ PARTITION `p3` VALUES LESS THAN (300) ENGINE = S3,
+ PARTITION `p4` VALUES LESS THAN (400) ENGINE = S3)
+ALTER TABLE t2
+REORGANIZE PARTITION p4 INTO (
+PARTITION n0 VALUES LESS THAN (500),
+PARTITION n1 VALUES LESS THAN (600)
+);
+ERROR 42000: Table 't2' uses an extension that doesn't exist in this MariaDB version
+ALTER TABLE t2 DROP PARTITION p3;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c1` int(11) DEFAULT NULL,
+ `c2` int(11) DEFAULT NULL
+) ENGINE=S3 DEFAULT CHARSET=latin1
+ PARTITION BY RANGE (`c1`)
+SUBPARTITION BY HASH (`c2`)
+SUBPARTITIONS 2
+(PARTITION `p0` VALUES LESS THAN (100) ENGINE = S3,
+ PARTITION `p1` VALUES LESS THAN (200) ENGINE = S3,
+ PARTITION `p4` VALUES LESS THAN (400) ENGINE = S3)
+SELECT count(*) from t2;
+count(*)
+4
+# Test for ALTER TABLE
+ALTER TABLE t2 ADD COLUMN c INT;
+SELECT count(*) FROM t2;
+count(*)
+4
+ALTER TABLE t2 DROP COLUMN c;
+SELECT count(*) FROM t2;
+count(*)
+4
+# Test for REMOVE PARTITIONING
+ALTER TABLE t2 REMOVE PARTITIONING;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c1` int(11) DEFAULT NULL,
+ `c2` int(11) DEFAULT NULL
+) ENGINE=S3 DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+SELECT count(*) FROM t2;
+count(*)
+4
+DROP TABLE t2;
+# Test for EXCHANGE PARTITION
+CREATE TABLE t1 (
+c1 int DEFAULT NULL
+) ENGINE=Aria
+PARTITION BY RANGE (c1)
+(PARTITION p0 VALUES LESS THAN (100),
+PARTITION p1 VALUES LESS THAN (200));
+INSERT INTO t1 VALUE (1), (2), (101), (102);
+ALTER TABLE t1 ENGINE=S3;
+CREATE TABLE t_part (
+c1 int DEFAULT NULL
+) ENGINE=Aria;
+INSERT INTO t_part VALUE (120), (130), (140);
+ALTER TABLE t_part ENGINE=S3;
+ALTER TABLE t1 EXCHANGE PARTITION p1 WITH TABLE t_part;
+SELECT count(*) FROM t_part;
+count(*)
+2
+SELECT count(*) FROM t1;
+count(*)
+5
+DROP TABLE t1;
+DROP TABLE t_part;
diff --git a/mysql-test/suite/s3/partition.test b/mysql-test/suite/s3/partition.test
new file mode 100644
index 00000000000..03bbc2f0da9
--- /dev/null
+++ b/mysql-test/suite/s3/partition.test
@@ -0,0 +1,118 @@
+--source include/have_partition.inc
+--source include/have_s3.inc
+--source create_database.inc
+
+--echo # Test for COALESCE PARTITION, ALTER TABLE and ADD PARTITIONS
+--echo # for tables with HASH partitions
+CREATE TABLE t1 (
+ c1 INT DEFAULT NULL
+) ENGINE=Aria
+ PARTITION BY HASH (c1)
+ PARTITIONS 3;
+INSERT INTO t1 VALUE (1), (2), (101), (102), (201), (202);
+ALTER TABLE t1 ENGINE=S3;
+SELECT count(*) FROM t1;
+# Check that partition tables are not shown;
+--replace_result $database s3
+SHOW TABLES;
+
+--replace_result $database s3
+--error ER_UNSUPPORTED_EXTENSION
+ALTER TABLE t1 COALESCE PARTITION 2;
+--replace_result $database s3
+SHOW WARNINGS;
+ALTER TABLE t1 ADD PARTITION PARTITIONS 6;
+SELECT count(*) FROM t1;
+ALTER TABLE t1 ADD COLUMN c INT;
+SELECT count(*) FROM t1;
+DROP TABLE t1;
+
+--echo # Test for simple change engine to S3
+CREATE TABLE t1 (
+ c1 int DEFAULT NULL,
+ c2 int DEFAULT NULL
+) ENGINE=Aria
+ PARTITION BY RANGE (c1)
+ SUBPARTITION BY HASH(c2)
+ SUBPARTITIONS 2
+ (PARTITION p0 VALUES LESS THAN (100),
+ PARTITION p1 VALUES LESS THAN (200),
+ PARTITION p3 VALUES LESS THAN (300));
+
+INSERT INTO t1 VALUE (1,1), (2,2), (101,101), (102,102), (201,201), (202,202);
+ALTER TABLE t1 ENGINE=S3;
+SELECT count(*) FROM t1;
+
+--echo # Test for rename table
+RENAME TABLE t1 TO t2;
+SELECT count(*) FROM t2;
+
+--echo # Test for TRUNCATE, ANALYZE, CHECK, REBUILD, OPTIMIZE, REPAIR,
+--echo # ADD, DROP, REORGANIZE partition
+--error ER_OPEN_AS_READONLY
+ALTER TABLE t2 TRUNCATE PARTITION p3;
+--replace_result $database s3
+ALTER TABLE t2 ANALYZE PARTITION p3;
+SELECT count(*) FROM t2;
+--replace_result $database s3
+ALTER TABLE t2 CHECK PARTITION p3;
+SELECT count(*) FROM t2;
+--replace_result $database s3
+--error ER_UNSUPPORTED_EXTENSION
+ALTER TABLE t2 REBUILD PARTITION p0, p1;
+--replace_result $database s3
+ALTER TABLE t2 OPTIMIZE PARTITION p0, p1;
+SELECT count(*) FROM t2;
+--replace_result $database s3
+ALTER TABLE t2 REPAIR PARTITION p0, p1;
+SELECT count(*) FROM t2;
+--replace_result $database s3
+ALTER TABLE t2 ADD PARTITION (PARTITION p4 VALUES LESS THAN (400));
+SHOW CREATE TABLE t2;
+--replace_result $database s3
+--error ER_UNSUPPORTED_EXTENSION
+ALTER TABLE t2
+ REORGANIZE PARTITION p4 INTO (
+ PARTITION n0 VALUES LESS THAN (500),
+ PARTITION n1 VALUES LESS THAN (600)
+);
+ALTER TABLE t2 DROP PARTITION p3;
+SHOW CREATE TABLE t2;
+SELECT count(*) from t2;
+
+--echo # Test for ALTER TABLE
+ALTER TABLE t2 ADD COLUMN c INT;
+SELECT count(*) FROM t2;
+ALTER TABLE t2 DROP COLUMN c;
+SELECT count(*) FROM t2;
+
+--echo # Test for REMOVE PARTITIONING
+ALTER TABLE t2 REMOVE PARTITIONING;
+SHOW CREATE TABLE t2;
+SELECT count(*) FROM t2;
+DROP TABLE t2;
+
+--echo # Test for EXCHANGE PARTITION
+CREATE TABLE t1 (
+ c1 int DEFAULT NULL
+) ENGINE=Aria
+ PARTITION BY RANGE (c1)
+ (PARTITION p0 VALUES LESS THAN (100),
+ PARTITION p1 VALUES LESS THAN (200));
+INSERT INTO t1 VALUE (1), (2), (101), (102);
+ALTER TABLE t1 ENGINE=S3;
+CREATE TABLE t_part (
+ c1 int DEFAULT NULL
+) ENGINE=Aria;
+INSERT INTO t_part VALUE (120), (130), (140);
+ALTER TABLE t_part ENGINE=S3;
+ALTER TABLE t1 EXCHANGE PARTITION p1 WITH TABLE t_part;
+SELECT count(*) FROM t_part;
+SELECT count(*) FROM t1;
+DROP TABLE t1;
+DROP TABLE t_part;
+
+#
+# clean up
+#
+--source drop_database.inc
diff --git a/mysql-test/suite/s3/partition_create_fail.result b/mysql-test/suite/s3/partition_create_fail.result
new file mode 100644
index 00000000000..923a54b5971
--- /dev/null
+++ b/mysql-test/suite/s3/partition_create_fail.result
@@ -0,0 +1,15 @@
+SET @saved_dbug = @@debug_dbug;
+CREATE TABLE p0 (
+c1 int primary key,
+c2 int DEFAULT NULL
+) ENGINE=InnoDB;
+insert into p0 select seq,seq from seq_1_to_10;
+SET debug_dbug='+d,failed_create_partitioning_metadata';
+alter table p0 engine=s3
+PARTITION BY RANGE (c1)
+(PARTITION p0 VALUES LESS THAN (100));
+ERROR HY000: Simulated crash
+SET debug_dbug=@saved_dbug;
+drop table p0;
+drop table p0;
+ERROR 42S02: Unknown table 's3.p0'
diff --git a/mysql-test/suite/s3/partition_create_fail.test b/mysql-test/suite/s3/partition_create_fail.test
new file mode 100644
index 00000000000..ed77a43e336
--- /dev/null
+++ b/mysql-test/suite/s3/partition_create_fail.test
@@ -0,0 +1,39 @@
+--source include/have_partition.inc
+--source include/have_s3.inc
+--source include/have_debug.inc
+--source include/have_innodb.inc
+--source include/have_sequence.inc
+--source create_database.inc
+
+SET @saved_dbug = @@debug_dbug;
+
+# Test failure in create of partition table
+
+CREATE TABLE p0 (
+ c1 int primary key,
+ c2 int DEFAULT NULL
+) ENGINE=InnoDB;
+insert into p0 select seq,seq from seq_1_to_10;
+
+SET debug_dbug='+d,failed_create_partitioning_metadata';
+
+--error 1041
+alter table p0 engine=s3
+ PARTITION BY RANGE (c1)
+(PARTITION p0 VALUES LESS THAN (100));
+
+SET debug_dbug=@saved_dbug;
+
+drop table p0;
+
+# If something went wrong, then we have a copy of the .frm file in S3 and
+# the following drop table will not fail
+
+--replace_result $database s3
+--error ER_BAD_TABLE_ERROR
+drop table p0;
+
+#
+# clean up
+#
+--source drop_database.inc
diff --git a/mysql-test/suite/s3/partition_move.result b/mysql-test/suite/s3/partition_move.result
new file mode 100644
index 00000000000..e183334f083
--- /dev/null
+++ b/mysql-test/suite/s3/partition_move.result
@@ -0,0 +1,74 @@
+CREATE TABLE p0 (
+c1 int primary key,
+c2 int DEFAULT NULL
+) ENGINE=InnoDB;
+insert into p0 select seq,seq from seq_1_to_99;
+alter table p0 engine=s3 , rename to archive
+PARTITION BY RANGE (c1)
+(PARTITION p0 VALUES LESS THAN (100));
+show create table archive;
+Table Create Table
+archive CREATE TABLE `archive` (
+ `c1` int(11) NOT NULL,
+ `c2` int(11) DEFAULT NULL,
+ PRIMARY KEY (`c1`)
+) ENGINE=S3 DEFAULT CHARSET=latin1
+ PARTITION BY RANGE (`c1`)
+(PARTITION `p0` VALUES LESS THAN (100) ENGINE = S3)
+CREATE TABLE t1 (
+c1 int primary key,
+c2 int DEFAULT NULL
+) ENGINE=InnoDB
+PARTITION BY RANGE (c1)
+(PARTITION p1 VALUES LESS THAN (200),
+PARTITION p2 VALUES LESS THAN (300),
+PARTITION p3 VALUES LESS THAN (400));
+insert into t1 select seq,seq from seq_100_to_399;
+create table p1 like t1;
+alter table p1 remove partitioning;
+alter table t1 exchange partition p1 with table p1;
+alter table t1 drop partition p1;
+show create table p1;
+Table Create Table
+p1 CREATE TABLE `p1` (
+ `c1` int(11) NOT NULL,
+ `c2` int(11) DEFAULT NULL,
+ PRIMARY KEY (`c1`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+select count(*) from p1;
+count(*)
+100
+alter table p1 engine=s3;
+alter table archive add partition (partition p1 values less than (200));
+alter table archive exchange partition p1 with table p1;
+select count(*) from p1;
+count(*)
+0
+drop table p1;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `c1` int(11) NOT NULL,
+ `c2` int(11) DEFAULT NULL,
+ PRIMARY KEY (`c1`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY RANGE (`c1`)
+(PARTITION `p2` VALUES LESS THAN (300) ENGINE = InnoDB,
+ PARTITION `p3` VALUES LESS THAN (400) ENGINE = InnoDB)
+show create table archive;
+Table Create Table
+archive CREATE TABLE `archive` (
+ `c1` int(11) NOT NULL,
+ `c2` int(11) DEFAULT NULL,
+ PRIMARY KEY (`c1`)
+) ENGINE=S3 DEFAULT CHARSET=latin1
+ PARTITION BY RANGE (`c1`)
+(PARTITION `p0` VALUES LESS THAN (100) ENGINE = S3,
+ PARTITION `p1` VALUES LESS THAN (200) ENGINE = S3)
+select count(*) from t1;
+count(*)
+200
+select count(*) from archive;
+count(*)
+199
+drop table t1,archive;
diff --git a/mysql-test/suite/s3/partition_move.test b/mysql-test/suite/s3/partition_move.test
new file mode 100644
index 00000000000..35edbd75b5a
--- /dev/null
+++ b/mysql-test/suite/s3/partition_move.test
@@ -0,0 +1,80 @@
+--source include/have_partition.inc
+--source include/have_innodb.inc
+--source include/have_s3.inc
+--source include/have_sequence.inc
+--source create_database.inc
+
+#
+# The purpose of this test is to show how to move an partition from an existing
+# InnoDB partitioned table (t1) to a partitioned table in S3 (archive)
+#
+
+#
+# We start by creating a partioned table in S3 with one existing partion p0
+#
+
+CREATE TABLE p0 (
+ c1 int primary key,
+ c2 int DEFAULT NULL
+) ENGINE=InnoDB;
+insert into p0 select seq,seq from seq_1_to_99;
+
+alter table p0 engine=s3 , rename to archive
+ PARTITION BY RANGE (c1)
+(PARTITION p0 VALUES LESS THAN (100));
+
+show create table archive;
+
+#
+# Then we create the table t1 that contains multiple partitions.
+# Partition p1 is the one that we want to move to 'archive'
+#
+
+CREATE TABLE t1 (
+ c1 int primary key,
+ c2 int DEFAULT NULL
+) ENGINE=InnoDB
+ PARTITION BY RANGE (c1)
+ (PARTITION p1 VALUES LESS THAN (200),
+ PARTITION p2 VALUES LESS THAN (300),
+ PARTITION p3 VALUES LESS THAN (400));
+insert into t1 select seq,seq from seq_100_to_399;
+
+#
+# Then it's time to do the real work.
+#
+
+# First we move partition p1 to a normal InnoDB table
+
+create table p1 like t1;
+alter table p1 remove partitioning;
+alter table t1 exchange partition p1 with table p1;
+alter table t1 drop partition p1;
+
+show create table p1;
+select count(*) from p1;
+
+# Then change the table engine to s3 and move it into archive
+
+alter table p1 engine=s3;
+alter table archive add partition (partition p1 values less than (200));
+alter table archive exchange partition p1 with table p1;
+
+# p1 will be empty as this was the new partition that we just created
+select count(*) from p1;
+drop table p1;
+
+#
+# The p1 partition has now been moved from t1 to archive. Check the result
+#
+
+show create table t1;
+show create table archive;
+select count(*) from t1;
+select count(*) from archive;
+drop table t1,archive;
+
+#
+# clean up
+#
+--source drop_database.inc
diff --git a/mysql-test/suite/s3/replication.inc b/mysql-test/suite/s3/replication.inc
new file mode 100644
index 00000000000..cfa38d93f98
--- /dev/null
+++ b/mysql-test/suite/s3/replication.inc
@@ -0,0 +1,209 @@
+--source include/have_s3.inc
+--source include/have_sequence.inc
+
+#
+# Tests for S3 replication
+#
+
+sync_slave_with_master;
+let $SLAVE_DATADIR= `select @@datadir`;
+connection master;
+
+#
+# Create unique database for running the tests
+#
+--source create_database.inc
+
+--echo #
+--echo # Test ALTER TABLE ENGINE S3
+--echo #
+
+create table t1 (a int, b int) engine=aria;
+insert into t1 select seq,seq+10 from seq_1_to_10;
+sync_slave_with_master;
+connection master;
+alter table t1 engine=s3;
+show create table t1;
+
+sync_slave_with_master;
+--replace_result $database database
+--eval use $database
+select * from t1 limit 2;
+--file_exists $SLAVE_DATADIR/$database/t1.frm
+
+connection master;
+alter table t1 add column c int;
+
+sync_slave_with_master;
+--error 1
+--file_exists $SLAVE_DATADIR/$database/t1.frm
+--replace_result $database database
+select * from t1,t1 as t1_tmp limit 2;
+
+--echo # Now test when the .frm table is out of date on the slave
+stop slave;
+
+connection master;
+alter table t1 add column d int, engine=s3;
+connection slave;
+select * from t1 limit 2;
+start slave;
+connection master;
+sync_slave_with_master;
+select * from t1 limit 2;
+
+--echo # Same without tables in the table cache;
+stop slave;
+flush tables;
+connection master;
+alter table t1 add column e int, engine=s3;
+connection slave;
+select * from t1 limit 2;
+start slave;
+connection master;
+sync_slave_with_master;
+select * from t1 limit 2;
+connection master;
+
+--echo # Convert S3 table to Aria. Rows should be binary logged
+alter table t1 engine=aria;
+sync_slave_with_master;
+select * from t1 limit 2;
+show create table t1;
+
+--echo # Convert S3 table to Aria with rename. Rows should be binary logged
+connection master;
+alter table t1 engine=s3;
+alter table t1 rename t2, engine=aria;
+sync_slave_with_master;
+select * from t2 limit 2;
+show create table t2;
+
+connection master;
+drop table t2;
+sync_slave_with_master;
+connection master;
+
+--echo #
+--echo # Test RENAME
+--echo #
+
+create table t1 (a int, b int) engine=aria;
+insert into t1 select seq,seq+10 from seq_1_to_10;
+alter table t1 engine=s3;
+
+rename table t1 to t2;
+sync_slave_with_master;
+--replace_result $database database
+--error 1
+--file_exists $SLAVE_DATADIR/$database/t2.frm
+--error ER_NO_SUCH_TABLE
+select * from t1 limit 2;
+select * from t2 limit 2;
+connection master;
+
+alter table t2 add column f int, rename t1;
+select * from t1 limit 2;
+sync_slave_with_master;
+--error 1
+--file_exists $SLAVE_DATADIR/$database/t1.frm
+--error 1
+--file_exists $SLAVE_DATADIR/$database/t2.frm
+select * from t1 limit 2;
+--replace_result $database database
+--error ER_NO_SUCH_TABLE
+select * from t2 limit 2;
+
+# Check rename of table when a new table has replaced the original one
+
+connection slave;
+stop slave;
+connection master;
+rename table t1 to t2;
+# Check the different create options with the table
+create table t1 (a int) engine=aria;
+drop table t1;
+create table if not exists t1 (a int, b int) engine=aria;
+drop table t1;
+create or replace table t1 (a int, b int, c int) engine=aria;
+alter table t1 engine=s3;
+connection slave;
+start slave;
+connection master;
+sync_slave_with_master;
+show create table t1;
+select * from t1 limit 2;
+select * from t2 limit 2;
+connection master;
+
+--echo #
+--echo # Test DROP
+--echo #
+drop table t1,t2;
+
+sync_slave_with_master;
+--error 1
+--file_exists $SLAVE_DATADIR/$database/t1.frm
+--error 1
+--file_exists $SLAVE_DATADIR/$database/t2.frm
+--replace_result $database database
+--error ER_NO_SUCH_TABLE
+select * from t1 limit 2;
+--replace_result $database database
+--error ER_NO_SUCH_TABLE
+select * from t2 limit 2;
+
+connection master;
+
+--echo #
+--echo # Test LIKE
+--echo #
+
+create table t1 (a int,b int);
+alter table t1 engine=s3;
+--replace_result $database database
+--error ER_CANT_CREATE_TABLE
+create table t2 like t1;
+sync_slave_with_master;
+--replace_result $database database
+--error ER_NO_SUCH_TABLE
+show create table t2;
+connection master;
+--replace_result $database database
+drop table if exists t1,t2;
+
+--echo #
+--echo # Check slave binary log
+--echo #
+
+sync_slave_with_master;
+--let $binlog_database=$database
+--source include/show_binlog_events.inc
+connection master;
+
+--echo #
+--echo # MDEV-24351: S3, same-backend replication: Dropping a table on master
+--echo # causes error on slave
+--echo #
+show variables like 's3_replicate_alter_as_create_select';
+
+connection slave;
+create table t3 (a int, b int) engine=aria;
+insert into t3 values (1,1),(2,2),(3,3);
+alter table t3 engine=s3;
+
+connection master;
+let $binlog_start= query_get_value("SHOW MASTER STATUS", Position, 1);
+drop table t3;
+--echo # Must show "DROP TABLE IF EXISTS t3", not just "DROP TABLE t3"
+--source include/show_binlog_events.inc
+
+sync_slave_with_master;
+connection master;
+
+--echo #
+--echo # clean up
+--echo #
+--source drop_database.inc
+sync_slave_with_master;
+--source include/rpl_end.inc
diff --git a/mysql-test/suite/s3/replication_delayed.cnf b/mysql-test/suite/s3/replication_delayed.cnf
new file mode 100644
index 00000000000..9313546f637
--- /dev/null
+++ b/mysql-test/suite/s3/replication_delayed.cnf
@@ -0,0 +1,3 @@
+!include ../rpl/my.cnf
+!include ./my.cnf
+!include ./slave.cnf
diff --git a/mysql-test/suite/s3/replication_delayed.result b/mysql-test/suite/s3/replication_delayed.result
new file mode 100644
index 00000000000..cad8b905d0b
--- /dev/null
+++ b/mysql-test/suite/s3/replication_delayed.result
@@ -0,0 +1,124 @@
+include/master-slave.inc
+[connection master]
+set binlog_format=mixed;
+RESET MASTER;
+connection slave;
+set binlog_format=mixed;
+RESET MASTER;
+connection master;
+connection slave;
+use database;
+connection master;
+#
+# MDEV-23691 S3 storage engine: delayed slave can drop the table
+#
+connection slave;
+stop slave;
+connection master;
+create /*or replace*/ table t100 (
+pk varchar(100)
+) engine = 'innodb';
+insert into t100 values ('old data');
+alter table t100 engine=s3;
+drop table t100;
+create /*or replace*/ table t100 (
+pk varchar(100)
+) engine= innodb;
+insert into t100 select 'new data' from seq_1_to_10;
+alter table t100 engine=s3;
+select count(*), 'before slave start' from t100;
+count(*) before slave start
+10 before slave start
+connection slave;
+start slave;
+connection master;
+connection slave;
+connection master;
+flush tables;
+select count(*), 'after slave start' from t100;
+count(*) after slave start
+10 after slave start
+show create table t100;
+Table Create Table
+t100 CREATE TABLE `t100` (
+ `pk` varchar(100) DEFAULT NULL
+) ENGINE=S3 DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+connection slave;
+select count(*) from t100;
+count(*)
+10
+connection master;
+drop table t100;
+#
+# Test delayed slave with inserts
+#
+connection slave;
+stop slave;
+connection master;
+create table t1 (a int) engine=innodb;
+insert into t1 values (1),(2),(3);
+insert into t1 select * from seq_4_to_6;
+alter table t1 engine=s3;
+connection slave;
+start slave;
+connection master;
+connection slave;
+select * from t1;
+a
+1
+2
+3
+4
+5
+6
+connection master;
+drop table t1;
+#
+# Check slave binary log
+#
+connection slave;
+include/show_binlog_events.inc
+Log_name Pos Event_type Server_id End_log_pos Info
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # create database database
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; create /*or replace*/ table t100 (
+pk varchar(100)
+) engine = 'innodb'
+slave-bin.000001 # Gtid # # BEGIN GTID #-#-#
+slave-bin.000001 # Query # # use `database`; insert into t100 values ('old data')
+slave-bin.000001 # Query # # COMMIT
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; alter table t100 engine=s3
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; DROP TABLE IF EXISTS `t100` /* generated by server */
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; create /*or replace*/ table t100 (
+pk varchar(100)
+) engine= innodb
+slave-bin.000001 # Gtid # # BEGIN GTID #-#-#
+slave-bin.000001 # Query # # use `database`; insert into t100 select 'new data' from seq_1_to_10
+slave-bin.000001 # Query # # COMMIT
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; alter table t100 engine=s3
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; flush tables
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; DROP TABLE IF EXISTS `t100` /* generated by server */
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; create table t1 (a int) engine=innodb
+slave-bin.000001 # Gtid # # BEGIN GTID #-#-#
+slave-bin.000001 # Query # # use `database`; insert into t1 values (1),(2),(3)
+slave-bin.000001 # Query # # COMMIT
+slave-bin.000001 # Gtid # # BEGIN GTID #-#-#
+slave-bin.000001 # Query # # use `database`; insert into t1 select * from seq_4_to_6
+slave-bin.000001 # Query # # COMMIT
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; alter table t1 engine=s3
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; DROP TABLE IF EXISTS `t1` /* generated by server */
+connection master;
+#
+# clean up
+#
+include/rpl_end.inc
diff --git a/mysql-test/suite/s3/replication_delayed.test b/mysql-test/suite/s3/replication_delayed.test
new file mode 100644
index 00000000000..0ae93b850c4
--- /dev/null
+++ b/mysql-test/suite/s3/replication_delayed.test
@@ -0,0 +1,115 @@
+--source include/have_s3.inc
+--source include/have_innodb.inc
+--source include/have_binlog_format_mixed.inc
+--source include/master-slave.inc
+--source include/have_sequence.inc
+
+# First clear the binlog
+set binlog_format=mixed;
+RESET MASTER;
+connection slave;
+set binlog_format=mixed;
+RESET MASTER;
+connection master;
+
+#
+# Create unique database for running the tests
+#
+--source create_database.inc
+sync_slave_with_master;
+--replace_result $database database
+--eval use $database
+connection master;
+
+--echo #
+--echo # MDEV-23691 S3 storage engine: delayed slave can drop the table
+--echo #
+
+connection slave;
+stop slave;
+connection master;
+
+#
+# Create version 1 of the table
+#
+
+create /*or replace*/ table t100 (
+ pk varchar(100)
+) engine = 'innodb';
+
+insert into t100 values ('old data');
+alter table t100 engine=s3;
+
+#
+# Create version 2 of the table
+#
+drop table t100;
+create /*or replace*/ table t100 (
+ pk varchar(100)
+) engine= innodb;
+insert into t100 select 'new data' from seq_1_to_10;
+alter table t100 engine=s3;
+
+select count(*), 'before slave start' from t100;
+
+#
+# Now, start the slave
+#
+connection slave;
+start slave;
+connection master;
+sync_slave_with_master;
+#select count(*) from t100;
+connection master;
+
+flush tables;
+select count(*), 'after slave start' from t100;
+show create table t100;
+
+connection slave;
+
+select count(*) from t100;
+
+connection master;
+
+drop table t100;
+
+--echo #
+--echo # Test delayed slave with inserts
+--echo #
+
+
+# Stop slave
+
+connection slave;
+stop slave;
+connection master;
+
+# Create tables with data while slave is stopped
+create table t1 (a int) engine=innodb;
+insert into t1 values (1),(2),(3);
+insert into t1 select * from seq_4_to_6;
+alter table t1 engine=s3;
+
+connection slave;
+start slave;
+connection master;
+sync_slave_with_master;
+select * from t1;
+connection master;
+drop table t1;
+
+--echo #
+--echo # Check slave binary log
+--echo #
+
+sync_slave_with_master;
+--let $binlog_database=$database
+--source include/show_binlog_events.inc
+connection master;
+
+--echo #
+--echo # clean up
+--echo #
+--source drop_database.inc
+--source include/rpl_end.inc
diff --git a/mysql-test/suite/s3/replication_mixed.cnf b/mysql-test/suite/s3/replication_mixed.cnf
new file mode 100644
index 00000000000..9313546f637
--- /dev/null
+++ b/mysql-test/suite/s3/replication_mixed.cnf
@@ -0,0 +1,3 @@
+!include ../rpl/my.cnf
+!include ./my.cnf
+!include ./slave.cnf
diff --git a/mysql-test/suite/s3/replication_mixed.result b/mysql-test/suite/s3/replication_mixed.result
new file mode 100644
index 00000000000..6b9b87a7891
--- /dev/null
+++ b/mysql-test/suite/s3/replication_mixed.result
@@ -0,0 +1,300 @@
+include/master-slave.inc
+[connection master]
+set binlog_format=mixed;
+RESET MASTER;
+connection slave;
+set binlog_format=mixed;
+RESET MASTER;
+connection master;
+connection slave;
+connection master;
+#
+# Test ALTER TABLE ENGINE S3
+#
+create table t1 (a int, b int) engine=aria;
+insert into t1 select seq,seq+10 from seq_1_to_10;
+connection slave;
+connection master;
+alter table t1 engine=s3;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL
+) ENGINE=S3 DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+connection slave;
+use database;
+select * from t1 limit 2;
+a b
+1 11
+2 12
+connection master;
+alter table t1 add column c int;
+connection slave;
+select * from t1,t1 as t1_tmp limit 2;
+a b c a b c
+1 11 NULL 1 11 NULL
+2 12 NULL 1 11 NULL
+# Now test when the .frm table is out of date on the slave
+stop slave;
+connection master;
+alter table t1 add column d int, engine=s3;
+connection slave;
+select * from t1 limit 2;
+a b c d
+1 11 NULL NULL
+2 12 NULL NULL
+start slave;
+connection master;
+connection slave;
+select * from t1 limit 2;
+a b c d
+1 11 NULL NULL
+2 12 NULL NULL
+# Same without tables in the table cache;
+stop slave;
+flush tables;
+connection master;
+alter table t1 add column e int, engine=s3;
+connection slave;
+select * from t1 limit 2;
+a b c d e
+1 11 NULL NULL NULL
+2 12 NULL NULL NULL
+start slave;
+connection master;
+connection slave;
+select * from t1 limit 2;
+a b c d e
+1 11 NULL NULL NULL
+2 12 NULL NULL NULL
+connection master;
+# Convert S3 table to Aria. Rows should be binary logged
+alter table t1 engine=aria;
+connection slave;
+select * from t1 limit 2;
+a b c d e
+1 11 NULL NULL NULL
+2 12 NULL NULL NULL
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL,
+ `c` int(11) DEFAULT NULL,
+ `d` int(11) DEFAULT NULL,
+ `e` int(11) DEFAULT NULL
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+# Convert S3 table to Aria with rename. Rows should be binary logged
+connection master;
+alter table t1 engine=s3;
+alter table t1 rename t2, engine=aria;
+connection slave;
+select * from t2 limit 2;
+a b c d e
+1 11 NULL NULL NULL
+2 12 NULL NULL NULL
+show create table t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL,
+ `c` int(11) DEFAULT NULL,
+ `d` int(11) DEFAULT NULL,
+ `e` int(11) DEFAULT NULL
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+connection master;
+drop table t2;
+connection slave;
+connection master;
+#
+# Test RENAME
+#
+create table t1 (a int, b int) engine=aria;
+insert into t1 select seq,seq+10 from seq_1_to_10;
+alter table t1 engine=s3;
+rename table t1 to t2;
+connection slave;
+select * from t1 limit 2;
+ERROR 42S02: Table 'database.t1' doesn't exist
+select * from t2 limit 2;
+a b
+1 11
+2 12
+connection master;
+alter table t2 add column f int, rename t1;
+select * from t1 limit 2;
+a b f
+1 11 NULL
+2 12 NULL
+connection slave;
+select * from t1 limit 2;
+a b f
+1 11 NULL
+2 12 NULL
+select * from t2 limit 2;
+ERROR 42S02: Table 'database.t2' doesn't exist
+connection slave;
+stop slave;
+connection master;
+rename table t1 to t2;
+create table t1 (a int) engine=aria;
+drop table t1;
+create table if not exists t1 (a int, b int) engine=aria;
+drop table t1;
+create or replace table t1 (a int, b int, c int) engine=aria;
+alter table t1 engine=s3;
+connection slave;
+start slave;
+connection master;
+connection slave;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL,
+ `c` int(11) DEFAULT NULL
+) ENGINE=S3 DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+select * from t1 limit 2;
+a b c
+select * from t2 limit 2;
+a b f
+1 11 NULL
+2 12 NULL
+connection master;
+#
+# Test DROP
+#
+drop table t1,t2;
+connection slave;
+select * from t1 limit 2;
+ERROR 42S02: Table 'database.t1' doesn't exist
+select * from t2 limit 2;
+ERROR 42S02: Table 'database.t2' doesn't exist
+connection master;
+#
+# Test LIKE
+#
+create table t1 (a int,b int);
+alter table t1 engine=s3;
+create table t2 like t1;
+ERROR HY000: Can't create table `database`.`t2` (errno: 131 "Command not supported by the engine")
+connection slave;
+show create table t2;
+ERROR 42S02: Table 'database.t2' doesn't exist
+connection master;
+drop table if exists t1,t2;
+Warnings:
+Note 1051 Unknown table 'database.t2'
+#
+# Check slave binary log
+#
+connection slave;
+include/show_binlog_events.inc
+Log_name Pos Event_type Server_id End_log_pos Info
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # create database database
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; create table t1 (a int, b int) engine=aria
+slave-bin.000001 # Gtid # # BEGIN GTID #-#-#
+slave-bin.000001 # Query # # use `database`; insert into t1 select seq,seq+10 from seq_1_to_10
+slave-bin.000001 # Query # # COMMIT
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; alter table t1 engine=s3
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; set @@sql_if_exists=1; alter table t1 add column c int
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; set @@sql_if_exists=1; alter table t1 add column d int, engine=s3
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; flush tables
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; set @@sql_if_exists=1; alter table t1 add column e int, engine=s3
+slave-bin.000001 # Gtid # # BEGIN GTID #-#-#
+slave-bin.000001 # Query # # use `database`; DROP TABLE IF EXISTS `t1` /* generated by server */
+slave-bin.000001 # Query # # use `database`; CREATE OR REPLACE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL,
+ `c` int(11) DEFAULT NULL,
+ `d` int(11) DEFAULT NULL,
+ `e` int(11) DEFAULT NULL
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+slave-bin.000001 # Annotate_rows # # alter table t1 engine=aria
+slave-bin.000001 # Table_map # # table_id: # (database.t1)
+slave-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
+slave-bin.000001 # Query # # COMMIT
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; alter table t1 engine=s3
+slave-bin.000001 # Gtid # # BEGIN GTID #-#-#
+slave-bin.000001 # Query # # use `database`; DROP TABLE IF EXISTS `t1` /* generated by server */
+slave-bin.000001 # Query # # use `database`; CREATE OR REPLACE TABLE `t2` (
+ `a` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL,
+ `c` int(11) DEFAULT NULL,
+ `d` int(11) DEFAULT NULL,
+ `e` int(11) DEFAULT NULL
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+slave-bin.000001 # Annotate_rows # # alter table t1 rename t2, engine=aria
+slave-bin.000001 # Table_map # # table_id: # (database.t2)
+slave-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
+slave-bin.000001 # Query # # COMMIT
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; DROP TABLE IF EXISTS `t2` /* generated by server */
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; create table t1 (a int, b int) engine=aria
+slave-bin.000001 # Gtid # # BEGIN GTID #-#-#
+slave-bin.000001 # Query # # use `database`; insert into t1 select seq,seq+10 from seq_1_to_10
+slave-bin.000001 # Query # # COMMIT
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; alter table t1 engine=s3
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; set @@sql_if_exists=1; rename table t1 to t2
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; set @@sql_if_exists=1; alter table t2 add column f int, rename t1
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; set @@sql_if_exists=1; rename table t1 to t2
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; create table t1 (a int) engine=aria
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; DROP TABLE IF EXISTS `t1` /* generated by server */
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; create table if not exists t1 (a int, b int) engine=aria
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; DROP TABLE IF EXISTS `t1` /* generated by server */
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; create or replace table t1 (a int, b int, c int) engine=aria
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; alter table t1 engine=s3
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; DROP TABLE IF EXISTS `t1`,`t2` /* generated by server */
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; create table t1 (a int,b int)
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; alter table t1 engine=s3
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; DROP TABLE IF EXISTS `t1`,`t2` /* generated by server */
+connection master;
+#
+# MDEV-24351: S3, same-backend replication: Dropping a table on master
+# causes error on slave
+#
+show variables like 's3_replicate_alter_as_create_select';
+Variable_name Value
+s3_replicate_alter_as_create_select ON
+connection slave;
+create table t3 (a int, b int) engine=aria;
+insert into t3 values (1,1),(2,2),(3,3);
+alter table t3 engine=s3;
+connection master;
+drop table t3;
+# Must show "DROP TABLE IF EXISTS t3", not just "DROP TABLE t3"
+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 `database`; DROP TABLE IF EXISTS `t3` /* generated by server */
+connection slave;
+connection master;
+#
+# clean up
+#
+connection slave;
+include/rpl_end.inc
diff --git a/mysql-test/suite/s3/replication_mixed.test b/mysql-test/suite/s3/replication_mixed.test
new file mode 100644
index 00000000000..d10d586dab9
--- /dev/null
+++ b/mysql-test/suite/s3/replication_mixed.test
@@ -0,0 +1,11 @@
+--source include/have_binlog_format_mixed.inc
+--source include/master-slave.inc
+
+set binlog_format=mixed;
+RESET MASTER;
+connection slave;
+set binlog_format=mixed;
+RESET MASTER;
+connection master;
+
+--source replication.inc
diff --git a/mysql-test/suite/s3/replication_partition.cnf b/mysql-test/suite/s3/replication_partition.cnf
new file mode 100644
index 00000000000..9313546f637
--- /dev/null
+++ b/mysql-test/suite/s3/replication_partition.cnf
@@ -0,0 +1,3 @@
+!include ../rpl/my.cnf
+!include ./my.cnf
+!include ./slave.cnf
diff --git a/mysql-test/suite/s3/replication_partition.result b/mysql-test/suite/s3/replication_partition.result
new file mode 100644
index 00000000000..0a57a1b872d
--- /dev/null
+++ b/mysql-test/suite/s3/replication_partition.result
@@ -0,0 +1,290 @@
+include/master-slave.inc
+[connection master]
+connection slave;
+use database;
+connection master;
+#
+# Check replication of parititioned S3 tables
+#
+CREATE TABLE t1 (
+c1 INT DEFAULT NULL
+) ENGINE=Aria
+PARTITION BY HASH (c1)
+PARTITIONS 3;
+INSERT INTO t1 VALUE (1), (2), (101), (102), (201), (202);
+ALTER TABLE t1 ENGINE=S3;
+connection slave;
+connection master;
+ALTER TABLE t1 ADD PARTITION PARTITIONS 6;
+select sum(c1) from t1;
+sum(c1)
+609
+connection slave;
+connection master;
+ALTER TABLE t1 ADD COLUMN c INT;
+select sum(c1) from t1;
+sum(c1)
+609
+connection slave;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `c1` int(11) DEFAULT NULL,
+ `c` int(11) DEFAULT NULL
+) ENGINE=S3 DEFAULT CHARSET=latin1
+ PARTITION BY HASH (`c1`)
+PARTITIONS 9
+select sum(c1) from t1;
+sum(c1)
+609
+connection master;
+drop table t1;
+#
+# Checking that the slave is keeping in sync with changed partitions
+#
+CREATE TABLE t1 (
+c1 int primary key,
+c2 int DEFAULT NULL
+) ENGINE=InnoDB
+PARTITION BY RANGE (c1)
+(PARTITION p1 VALUES LESS THAN (200),
+PARTITION p2 VALUES LESS THAN (300),
+PARTITION p3 VALUES LESS THAN (400));
+insert into t1 select seq*100,seq*100 from seq_1_to_3;
+alter table t1 engine=S3;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `c1` int(11) NOT NULL,
+ `c2` int(11) DEFAULT NULL,
+ PRIMARY KEY (`c1`)
+) ENGINE=S3 DEFAULT CHARSET=latin1
+ PARTITION BY RANGE (`c1`)
+(PARTITION `p1` VALUES LESS THAN (200) ENGINE = S3,
+ PARTITION `p2` VALUES LESS THAN (300) ENGINE = S3,
+ PARTITION `p3` VALUES LESS THAN (400) ENGINE = S3)
+connection slave;
+select sum(c1) from t1;
+sum(c1)
+600
+stop slave;
+connection master;
+ALTER TABLE t1 ADD PARTITION (PARTITION p4 VALUES LESS THAN (500));
+connection slave;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `c1` int(11) NOT NULL,
+ `c2` int(11) DEFAULT NULL,
+ PRIMARY KEY (`c1`)
+) ENGINE=S3 DEFAULT CHARSET=latin1
+ PARTITION BY RANGE (`c1`)
+(PARTITION `p1` VALUES LESS THAN (200) ENGINE = S3,
+ PARTITION `p2` VALUES LESS THAN (300) ENGINE = S3,
+ PARTITION `p3` VALUES LESS THAN (400) ENGINE = S3,
+ PARTITION `p4` VALUES LESS THAN (500) ENGINE = S3)
+select sum(c1) from t1;
+sum(c1)
+600
+start slave;
+connection master;
+connection slave;
+select sum(c1)+0 from t1;
+sum(c1)+0
+600
+stop slave;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `c1` int(11) NOT NULL,
+ `c2` int(11) DEFAULT NULL,
+ PRIMARY KEY (`c1`)
+) ENGINE=S3 DEFAULT CHARSET=latin1
+ PARTITION BY RANGE (`c1`)
+(PARTITION `p1` VALUES LESS THAN (200) ENGINE = S3,
+ PARTITION `p2` VALUES LESS THAN (300) ENGINE = S3,
+ PARTITION `p3` VALUES LESS THAN (400) ENGINE = S3,
+ PARTITION `p4` VALUES LESS THAN (500) ENGINE = S3)
+connection master;
+drop table t1;
+connection slave;
+select sum(c1) from t1;
+ERROR 42S02: Table 'database.t1' doesn't exist
+start slave;
+connection master;
+connection slave;
+connection master;
+#
+# Check altering partitioned table to S3 and back
+# Checks also rename partitoned table and drop partition
+#
+CREATE TABLE t2 (
+c1 int primary key,
+c2 int DEFAULT NULL
+) ENGINE=InnoDB
+PARTITION BY RANGE (c1)
+(PARTITION p1 VALUES LESS THAN (200),
+PARTITION p2 VALUES LESS THAN (300),
+PARTITION p3 VALUES LESS THAN (400));
+insert into t2 select seq*100,seq*100 from seq_1_to_3;
+alter table t2 engine=S3;
+rename table t2 to t1;
+alter table t1 drop partition p1;
+connection slave;
+select sum(c1) from t1;
+sum(c1)
+500
+connection master;
+alter table t1 engine=innodb;
+connection slave;
+select sum(c1) from t1;
+sum(c1)
+500
+connection master;
+drop table t1;
+#
+# Check that slaves ignores changes to S3 tables.
+#
+connection master;
+CREATE TABLE t1 (
+c1 int primary key,
+c2 int DEFAULT NULL
+) ENGINE=InnoDB
+PARTITION BY RANGE (c1)
+(PARTITION p1 VALUES LESS THAN (200),
+PARTITION p2 VALUES LESS THAN (300),
+PARTITION p3 VALUES LESS THAN (400));
+insert into t1 select seq*100,seq*100 from seq_1_to_3;
+create table t2 like t1;
+alter table t2 remove partitioning;
+insert into t2 values (450,450);
+connection slave;
+stop slave;
+connection master;
+alter table t1 engine=s3;
+alter table t2 engine=s3;
+ALTER TABLE t1 ADD PARTITION (PARTITION p4 VALUES LESS THAN (500));
+alter table t1 exchange partition p4 with table t2;
+select count(*) from t1;
+count(*)
+4
+drop table t1,t2;
+connection slave;
+start slave;
+connection master;
+connection slave;
+select sum(c1) from t1;
+ERROR 42S02: Table 'database.t1' doesn't exist
+connection master;
+#
+# Check slave binary log
+#
+connection slave;
+include/show_binlog_events.inc
+Log_name Pos Event_type Server_id End_log_pos Info
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # create database database
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; CREATE TABLE t1 (
+c1 INT DEFAULT NULL
+) ENGINE=Aria
+PARTITION BY HASH (c1)
+PARTITIONS 3
+slave-bin.000001 # Gtid # # BEGIN GTID #-#-#
+slave-bin.000001 # Query # # use `database`; INSERT INTO t1 VALUE (1), (2), (101), (102), (201), (202)
+slave-bin.000001 # Query # # COMMIT
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; ALTER TABLE t1 ENGINE=S3
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; set @@sql_if_exists=1; ALTER TABLE t1 ADD PARTITION PARTITIONS 6
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; set @@sql_if_exists=1; ALTER TABLE t1 ADD COLUMN c INT
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; DROP TABLE IF EXISTS `t1` /* generated by server */
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; CREATE TABLE t1 (
+c1 int primary key,
+c2 int DEFAULT NULL
+) ENGINE=InnoDB
+PARTITION BY RANGE (c1)
+(PARTITION p1 VALUES LESS THAN (200),
+PARTITION p2 VALUES LESS THAN (300),
+PARTITION p3 VALUES LESS THAN (400))
+slave-bin.000001 # Gtid # # BEGIN GTID #-#-#
+slave-bin.000001 # Query # # use `database`; insert into t1 select seq*100,seq*100 from seq_1_to_3
+slave-bin.000001 # Xid # # COMMIT /* XID */
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; alter table t1 engine=S3
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; set @@sql_if_exists=1; ALTER TABLE t1 ADD PARTITION (PARTITION p4 VALUES LESS THAN (500))
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; DROP TABLE IF EXISTS `t1` /* generated by server */
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; CREATE TABLE t2 (
+c1 int primary key,
+c2 int DEFAULT NULL
+) ENGINE=InnoDB
+PARTITION BY RANGE (c1)
+(PARTITION p1 VALUES LESS THAN (200),
+PARTITION p2 VALUES LESS THAN (300),
+PARTITION p3 VALUES LESS THAN (400))
+slave-bin.000001 # Gtid # # BEGIN GTID #-#-#
+slave-bin.000001 # Query # # use `database`; insert into t2 select seq*100,seq*100 from seq_1_to_3
+slave-bin.000001 # Xid # # COMMIT /* XID */
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; alter table t2 engine=S3
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; set @@sql_if_exists=1; rename table t2 to t1
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; set @@sql_if_exists=1; alter table t1 drop partition p1
+slave-bin.000001 # Gtid # # BEGIN GTID #-#-#
+slave-bin.000001 # Query # # use `database`; DROP TABLE IF EXISTS `t1` /* generated by server */
+slave-bin.000001 # Query # # use `database`; CREATE OR REPLACE TABLE `t1` (
+ `c1` int(11) NOT NULL,
+ `c2` int(11) DEFAULT NULL,
+ PRIMARY KEY (`c1`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY RANGE (`c1`)
+(PARTITION `p2` VALUES LESS THAN (300) ENGINE = InnoDB,
+ PARTITION `p3` VALUES LESS THAN (400) ENGINE = InnoDB)
+slave-bin.000001 # Annotate_rows # # alter table t1 engine=innodb
+slave-bin.000001 # Table_map # # table_id: # (database.t1)
+slave-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
+slave-bin.000001 # Xid # # COMMIT /* XID */
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; DROP TABLE IF EXISTS `t1` /* generated by server */
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; CREATE TABLE t1 (
+c1 int primary key,
+c2 int DEFAULT NULL
+) ENGINE=InnoDB
+PARTITION BY RANGE (c1)
+(PARTITION p1 VALUES LESS THAN (200),
+PARTITION p2 VALUES LESS THAN (300),
+PARTITION p3 VALUES LESS THAN (400))
+slave-bin.000001 # Gtid # # BEGIN GTID #-#-#
+slave-bin.000001 # Query # # use `database`; insert into t1 select seq*100,seq*100 from seq_1_to_3
+slave-bin.000001 # Xid # # COMMIT /* XID */
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; create table t2 like t1
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; alter table t2 remove partitioning
+slave-bin.000001 # Gtid # # BEGIN GTID #-#-#
+slave-bin.000001 # Query # # use `database`; insert into t2 values (450,450)
+slave-bin.000001 # Xid # # COMMIT /* XID */
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; alter table t1 engine=s3
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; alter table t2 engine=s3
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; set @@sql_if_exists=1; ALTER TABLE t1 ADD PARTITION (PARTITION p4 VALUES LESS THAN (500))
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; set @@sql_if_exists=1; alter table t1 exchange partition p4 with table t2
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; DROP TABLE IF EXISTS `t1`,`t2` /* generated by server */
+connection master;
+#
+# clean up
+#
+connection slave;
+include/rpl_end.inc
diff --git a/mysql-test/suite/s3/replication_partition.test b/mysql-test/suite/s3/replication_partition.test
new file mode 100644
index 00000000000..254924f9051
--- /dev/null
+++ b/mysql-test/suite/s3/replication_partition.test
@@ -0,0 +1,170 @@
+--source include/have_s3.inc
+--source include/have_partition.inc
+--source include/have_binlog_format_mixed.inc
+--source include/have_innodb.inc
+--source include/have_sequence.inc
+--source include/master-slave.inc
+--source create_database.inc
+
+sync_slave_with_master;
+
+if (`select @@s3_slave_ignore_updates <> 1`)
+{
+ die "Slave is not configured with s3-slave-ignore-updates=1";
+}
+
+let $MYSQLD_DATADIR= `select @@datadir`;
+--replace_result $database database
+--eval use $database
+connection master;
+
+--echo #
+--echo # Check replication of parititioned S3 tables
+--echo #
+
+CREATE TABLE t1 (
+ c1 INT DEFAULT NULL
+) ENGINE=Aria
+ PARTITION BY HASH (c1)
+ PARTITIONS 3;
+INSERT INTO t1 VALUE (1), (2), (101), (102), (201), (202);
+ALTER TABLE t1 ENGINE=S3;
+sync_slave_with_master;
+connection master;
+ALTER TABLE t1 ADD PARTITION PARTITIONS 6;
+select sum(c1) from t1;
+sync_slave_with_master;
+connection master;
+ALTER TABLE t1 ADD COLUMN c INT;
+select sum(c1) from t1;
+sync_slave_with_master;
+show create table t1;
+select sum(c1) from t1;
+connection master;
+drop table t1;
+
+--echo #
+--echo # Checking that the slave is keeping in sync with changed partitions
+--echo #
+
+CREATE TABLE t1 (
+ c1 int primary key,
+ c2 int DEFAULT NULL
+) ENGINE=InnoDB
+ PARTITION BY RANGE (c1)
+ (PARTITION p1 VALUES LESS THAN (200),
+ PARTITION p2 VALUES LESS THAN (300),
+ PARTITION p3 VALUES LESS THAN (400));
+insert into t1 select seq*100,seq*100 from seq_1_to_3;
+alter table t1 engine=S3;
+show create table t1;
+
+sync_slave_with_master;
+select sum(c1) from t1;
+--file_exists $MYSQLD_DATADIR/$database/t1.frm
+--file_exists $MYSQLD_DATADIR/$database/t1.par
+stop slave;
+connection master;
+ALTER TABLE t1 ADD PARTITION (PARTITION p4 VALUES LESS THAN (500));
+connection slave;
+show create table t1;
+select sum(c1) from t1;
+start slave;
+connection master;
+sync_slave_with_master;
+select sum(c1)+0 from t1;
+stop slave;
+
+# Ensure the slave is using the new table
+show create table t1;
+
+connection master;
+drop table t1;
+connection slave;
+--file_exists $MYSQLD_DATADIR/$database/t1.par
+--replace_result $database database
+--error ER_NO_SUCH_TABLE
+select sum(c1) from t1;
+--error 1
+--file_exists $MYSQLD_DATADIR/$database/t1.par
+start slave;
+connection master;
+sync_slave_with_master;
+connection master;
+
+--echo #
+--echo # Check altering partitioned table to S3 and back
+--echo # Checks also rename partitoned table and drop partition
+--echo #
+
+CREATE TABLE t2 (
+ c1 int primary key,
+ c2 int DEFAULT NULL
+) ENGINE=InnoDB
+ PARTITION BY RANGE (c1)
+ (PARTITION p1 VALUES LESS THAN (200),
+ PARTITION p2 VALUES LESS THAN (300),
+ PARTITION p3 VALUES LESS THAN (400));
+insert into t2 select seq*100,seq*100 from seq_1_to_3;
+alter table t2 engine=S3;
+rename table t2 to t1;
+alter table t1 drop partition p1;
+sync_slave_with_master;
+select sum(c1) from t1;
+connection master;
+alter table t1 engine=innodb;
+sync_slave_with_master;
+select sum(c1) from t1;
+connection master;
+drop table t1;
+
+--echo #
+--echo # Check that slaves ignores changes to S3 tables.
+--echo #
+
+connection master;
+CREATE TABLE t1 (
+ c1 int primary key,
+ c2 int DEFAULT NULL
+) ENGINE=InnoDB
+ PARTITION BY RANGE (c1)
+ (PARTITION p1 VALUES LESS THAN (200),
+ PARTITION p2 VALUES LESS THAN (300),
+ PARTITION p3 VALUES LESS THAN (400));
+insert into t1 select seq*100,seq*100 from seq_1_to_3;
+create table t2 like t1;
+alter table t2 remove partitioning;
+insert into t2 values (450,450);
+sync_slave_with_master;
+stop slave;
+connection master;
+alter table t1 engine=s3;
+alter table t2 engine=s3;
+ALTER TABLE t1 ADD PARTITION (PARTITION p4 VALUES LESS THAN (500));
+alter table t1 exchange partition p4 with table t2;
+select count(*) from t1;
+drop table t1,t2;
+connection slave;
+start slave;
+connection master;
+sync_slave_with_master;
+--replace_result $database database
+--error ER_NO_SUCH_TABLE
+select sum(c1) from t1;
+connection master;
+
+--echo #
+--echo # Check slave binary log
+--echo #
+
+sync_slave_with_master;
+--let $binlog_database=$database
+--source include/show_binlog_events.inc
+connection master;
+
+--echo #
+--echo # clean up
+--echo #
+--source drop_database.inc
+sync_slave_with_master;
+--source include/rpl_end.inc
diff --git a/mysql-test/suite/s3/replication_stmt.cnf b/mysql-test/suite/s3/replication_stmt.cnf
new file mode 100644
index 00000000000..9313546f637
--- /dev/null
+++ b/mysql-test/suite/s3/replication_stmt.cnf
@@ -0,0 +1,3 @@
+!include ../rpl/my.cnf
+!include ./my.cnf
+!include ./slave.cnf
diff --git a/mysql-test/suite/s3/replication_stmt.result b/mysql-test/suite/s3/replication_stmt.result
new file mode 100644
index 00000000000..4b8306687db
--- /dev/null
+++ b/mysql-test/suite/s3/replication_stmt.result
@@ -0,0 +1,300 @@
+include/master-slave.inc
+[connection master]
+set binlog_format=statement;
+RESET MASTER;
+connection slave;
+set binlog_format=statement;
+RESET MASTER;
+connection master;
+connection slave;
+connection master;
+#
+# Test ALTER TABLE ENGINE S3
+#
+create table t1 (a int, b int) engine=aria;
+insert into t1 select seq,seq+10 from seq_1_to_10;
+connection slave;
+connection master;
+alter table t1 engine=s3;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL
+) ENGINE=S3 DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+connection slave;
+use database;
+select * from t1 limit 2;
+a b
+1 11
+2 12
+connection master;
+alter table t1 add column c int;
+connection slave;
+select * from t1,t1 as t1_tmp limit 2;
+a b c a b c
+1 11 NULL 1 11 NULL
+2 12 NULL 1 11 NULL
+# Now test when the .frm table is out of date on the slave
+stop slave;
+connection master;
+alter table t1 add column d int, engine=s3;
+connection slave;
+select * from t1 limit 2;
+a b c d
+1 11 NULL NULL
+2 12 NULL NULL
+start slave;
+connection master;
+connection slave;
+select * from t1 limit 2;
+a b c d
+1 11 NULL NULL
+2 12 NULL NULL
+# Same without tables in the table cache;
+stop slave;
+flush tables;
+connection master;
+alter table t1 add column e int, engine=s3;
+connection slave;
+select * from t1 limit 2;
+a b c d e
+1 11 NULL NULL NULL
+2 12 NULL NULL NULL
+start slave;
+connection master;
+connection slave;
+select * from t1 limit 2;
+a b c d e
+1 11 NULL NULL NULL
+2 12 NULL NULL NULL
+connection master;
+# Convert S3 table to Aria. Rows should be binary logged
+alter table t1 engine=aria;
+connection slave;
+select * from t1 limit 2;
+a b c d e
+1 11 NULL NULL NULL
+2 12 NULL NULL NULL
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL,
+ `c` int(11) DEFAULT NULL,
+ `d` int(11) DEFAULT NULL,
+ `e` int(11) DEFAULT NULL
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+# Convert S3 table to Aria with rename. Rows should be binary logged
+connection master;
+alter table t1 engine=s3;
+alter table t1 rename t2, engine=aria;
+connection slave;
+select * from t2 limit 2;
+a b c d e
+1 11 NULL NULL NULL
+2 12 NULL NULL NULL
+show create table t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL,
+ `c` int(11) DEFAULT NULL,
+ `d` int(11) DEFAULT NULL,
+ `e` int(11) DEFAULT NULL
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+connection master;
+drop table t2;
+connection slave;
+connection master;
+#
+# Test RENAME
+#
+create table t1 (a int, b int) engine=aria;
+insert into t1 select seq,seq+10 from seq_1_to_10;
+alter table t1 engine=s3;
+rename table t1 to t2;
+connection slave;
+select * from t1 limit 2;
+ERROR 42S02: Table 'database.t1' doesn't exist
+select * from t2 limit 2;
+a b
+1 11
+2 12
+connection master;
+alter table t2 add column f int, rename t1;
+select * from t1 limit 2;
+a b f
+1 11 NULL
+2 12 NULL
+connection slave;
+select * from t1 limit 2;
+a b f
+1 11 NULL
+2 12 NULL
+select * from t2 limit 2;
+ERROR 42S02: Table 'database.t2' doesn't exist
+connection slave;
+stop slave;
+connection master;
+rename table t1 to t2;
+create table t1 (a int) engine=aria;
+drop table t1;
+create table if not exists t1 (a int, b int) engine=aria;
+drop table t1;
+create or replace table t1 (a int, b int, c int) engine=aria;
+alter table t1 engine=s3;
+connection slave;
+start slave;
+connection master;
+connection slave;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL,
+ `c` int(11) DEFAULT NULL
+) ENGINE=S3 DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+select * from t1 limit 2;
+a b c
+select * from t2 limit 2;
+a b f
+1 11 NULL
+2 12 NULL
+connection master;
+#
+# Test DROP
+#
+drop table t1,t2;
+connection slave;
+select * from t1 limit 2;
+ERROR 42S02: Table 'database.t1' doesn't exist
+select * from t2 limit 2;
+ERROR 42S02: Table 'database.t2' doesn't exist
+connection master;
+#
+# Test LIKE
+#
+create table t1 (a int,b int);
+alter table t1 engine=s3;
+create table t2 like t1;
+ERROR HY000: Can't create table `database`.`t2` (errno: 131 "Command not supported by the engine")
+connection slave;
+show create table t2;
+ERROR 42S02: Table 'database.t2' doesn't exist
+connection master;
+drop table if exists t1,t2;
+Warnings:
+Note 1051 Unknown table 'database.t2'
+#
+# Check slave binary log
+#
+connection slave;
+include/show_binlog_events.inc
+Log_name Pos Event_type Server_id End_log_pos Info
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # create database database
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; create table t1 (a int, b int) engine=aria
+slave-bin.000001 # Gtid # # BEGIN GTID #-#-#
+slave-bin.000001 # Query # # use `database`; insert into t1 select seq,seq+10 from seq_1_to_10
+slave-bin.000001 # Query # # COMMIT
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; alter table t1 engine=s3
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; set @@sql_if_exists=1; alter table t1 add column c int
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; set @@sql_if_exists=1; alter table t1 add column d int, engine=s3
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; flush tables
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; set @@sql_if_exists=1; alter table t1 add column e int, engine=s3
+slave-bin.000001 # Gtid # # BEGIN GTID #-#-#
+slave-bin.000001 # Query # # use `database`; DROP TABLE IF EXISTS `t1` /* generated by server */
+slave-bin.000001 # Query # # use `database`; CREATE OR REPLACE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL,
+ `c` int(11) DEFAULT NULL,
+ `d` int(11) DEFAULT NULL,
+ `e` int(11) DEFAULT NULL
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+slave-bin.000001 # Annotate_rows # # alter table t1 engine=aria
+slave-bin.000001 # Table_map # # table_id: # (database.t1)
+slave-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
+slave-bin.000001 # Query # # COMMIT
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; alter table t1 engine=s3
+slave-bin.000001 # Gtid # # BEGIN GTID #-#-#
+slave-bin.000001 # Query # # use `database`; DROP TABLE IF EXISTS `t1` /* generated by server */
+slave-bin.000001 # Query # # use `database`; CREATE OR REPLACE TABLE `t2` (
+ `a` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL,
+ `c` int(11) DEFAULT NULL,
+ `d` int(11) DEFAULT NULL,
+ `e` int(11) DEFAULT NULL
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+slave-bin.000001 # Annotate_rows # # alter table t1 rename t2, engine=aria
+slave-bin.000001 # Table_map # # table_id: # (database.t2)
+slave-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
+slave-bin.000001 # Query # # COMMIT
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; DROP TABLE IF EXISTS `t2` /* generated by server */
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; create table t1 (a int, b int) engine=aria
+slave-bin.000001 # Gtid # # BEGIN GTID #-#-#
+slave-bin.000001 # Query # # use `database`; insert into t1 select seq,seq+10 from seq_1_to_10
+slave-bin.000001 # Query # # COMMIT
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; alter table t1 engine=s3
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; set @@sql_if_exists=1; rename table t1 to t2
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; set @@sql_if_exists=1; alter table t2 add column f int, rename t1
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; set @@sql_if_exists=1; rename table t1 to t2
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; create table t1 (a int) engine=aria
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; DROP TABLE IF EXISTS `t1` /* generated by server */
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; create table if not exists t1 (a int, b int) engine=aria
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; DROP TABLE IF EXISTS `t1` /* generated by server */
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; create or replace table t1 (a int, b int, c int) engine=aria
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; alter table t1 engine=s3
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; DROP TABLE IF EXISTS `t1`,`t2` /* generated by server */
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; create table t1 (a int,b int)
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; alter table t1 engine=s3
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `database`; DROP TABLE IF EXISTS `t1`,`t2` /* generated by server */
+connection master;
+#
+# MDEV-24351: S3, same-backend replication: Dropping a table on master
+# causes error on slave
+#
+show variables like 's3_replicate_alter_as_create_select';
+Variable_name Value
+s3_replicate_alter_as_create_select ON
+connection slave;
+create table t3 (a int, b int) engine=aria;
+insert into t3 values (1,1),(2,2),(3,3);
+alter table t3 engine=s3;
+connection master;
+drop table t3;
+# Must show "DROP TABLE IF EXISTS t3", not just "DROP TABLE t3"
+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 `database`; DROP TABLE IF EXISTS `t3` /* generated by server */
+connection slave;
+connection master;
+#
+# clean up
+#
+connection slave;
+include/rpl_end.inc
diff --git a/mysql-test/suite/s3/replication_stmt.test b/mysql-test/suite/s3/replication_stmt.test
new file mode 100644
index 00000000000..aba5d155e6c
--- /dev/null
+++ b/mysql-test/suite/s3/replication_stmt.test
@@ -0,0 +1,11 @@
+--source include/have_binlog_format_statement.inc
+--source include/master-slave.inc
+
+set binlog_format=statement;
+RESET MASTER;
+connection slave;
+set binlog_format=statement;
+RESET MASTER;
+connection master;
+
+--source replication.inc
diff --git a/mysql-test/suite/s3/select.result b/mysql-test/suite/s3/select.result
new file mode 100644
index 00000000000..94a6fdf12d6
--- /dev/null
+++ b/mysql-test/suite/s3/select.result
@@ -0,0 +1,8 @@
+create table t1 (pk int primary key, a int);
+insert into t1 values (1,1),(2,2),(3,3),(4,4);
+alter table t1 engine=S3;
+select a from t1 where pk in (2, 3);
+a
+2
+3
+drop table t1;
diff --git a/mysql-test/suite/s3/select.test b/mysql-test/suite/s3/select.test
new file mode 100644
index 00000000000..223311cb32b
--- /dev/null
+++ b/mysql-test/suite/s3/select.test
@@ -0,0 +1,17 @@
+--source include/have_s3.inc
+--source create_database.inc
+
+#
+# MDEV-19465 Server crashes in s3_block_read upon IN quer
+#
+
+create table t1 (pk int primary key, a int);
+insert into t1 values (1,1),(2,2),(3,3),(4,4);
+alter table t1 engine=S3;
+select a from t1 where pk in (2, 3);
+drop table t1;
+
+#
+# clean up
+#
+--source drop_database.inc
diff --git a/mysql-test/suite/s3/slave.cnf b/mysql-test/suite/s3/slave.cnf
new file mode 100644
index 00000000000..4f4d3d39ac7
--- /dev/null
+++ b/mysql-test/suite/s3/slave.cnf
@@ -0,0 +1,34 @@
+[mysqld.2]
+plugin-load-add=@ENV.HA_S3_SO
+s3=ON
+s3-slave-ignore-updates=1
+s3-host-name=@ENV.S3_HOST_NAME
+s3-protocol-version=@ENV.S3_PROTOCOL_VERSION
+s3-bucket=@ENV.S3_BUCKET
+s3-access-key=@ENV.S3_ACCESS_KEY
+s3-secret-key=@ENV.S3_SECRET_KEY
+s3-region=@ENV.S3_REGION
+s3-port=@ENV.S3_PORT
+s3-use-http=@ENV.S3_USE_HTTP
+
+# You can change the following when running the tests against
+# your own S3 setup
+
+#s3-host-name=s3.amazonaws.com
+#s3-protocol-version=Amazon
+#s3-bucket=MariaDB
+#s3-access-key=...
+#s3-secret-key=...
+#s3-region=eu-north-1
+
+##
+## Configuration for local MinIO
+##
+#s3-host-name="127.0.0.1"
+## Note: s3-host-name="localhost" doesn't work. It causes
+## libmarias3 to use the wrong variant of the protocol.
+#s3-bucket=storage-engine
+#s3-access-key=minio
+#s3-secret-key=minioadmin
+#s3-port=9000
+#s3-use-http=ON
diff --git a/mysql-test/suite/s3/suite.pm b/mysql-test/suite/s3/suite.pm
new file mode 100644
index 00000000000..cdefbc5e323
--- /dev/null
+++ b/mysql-test/suite/s3/suite.pm
@@ -0,0 +1,67 @@
+package My::Suite::S3;
+
+use Socket;
+
+@ISA = qw(My::Suite);
+
+return "Need S3 engine" unless $::mysqld_variables{'s3'} eq "ON" or $ENV{HA_S3_SO};
+
+my $paddr = sockaddr_in(9000, INADDR_ANY);
+my $protocol = getprotobyname("tcp");
+socket(SOCK, PF_INET, SOCK_STREAM, $protocol);
+
+if(connect(SOCK, $paddr))
+{
+ $ENV{'S3_HOST_NAME'} = "127.0.0.1";
+ $ENV{'S3_PORT'} = 9000;
+ $ENV{'S3_BUCKET'} = "storage-engine";
+ $ENV{'S3_ACCESS_KEY'} = "minio";
+ $ENV{'S3_SECRET_KEY'} = "minioadmin";
+ $ENV{'S3_REGION'} = "";
+ $ENV{'S3_PROTOCOL_VERSION'} = "Auto";
+ $ENV{'S3_USE_HTTP'} = "ON";
+}
+else
+{
+ if (!$ENV{'S3_HOST_NAME'})
+ {
+ $ENV{'S3_HOST_NAME'} = "s3.amazonaws.com";
+ }
+
+ if (!$ENV{'S3_BUCKET'})
+ {
+ $ENV{'S3_BUCKET'} = "MariaDB";
+ }
+
+ if (!$ENV{'S3_REGION'})
+ {
+ $ENV{'S3_REGION'} = "";
+ }
+
+ if (!$ENV{'S3_ACCESS_KEY'})
+ {
+ return "Environment variable S3_ACCESS_KEY need to be set";
+ }
+
+ if (!$ENV{'S3_SECRET_KEY'})
+ {
+ return "Environment variable S3_SECRET_KEY need to be set";
+ }
+
+ if (!$ENV{'S3_PROTOCOL_VERSION'})
+ {
+ $ENV{'S3_PROTOCOL_VERSION'} = "Auto";
+ }
+
+ if (!$ENV{'S3_PORT'})
+ {
+ $ENV{'S3_PORT'} = 0;
+ }
+
+ if (!$ENV{'S3_USE_HTTP'})
+ {
+ $ENV{'S3_USE_HTTP'} = "OFF";
+ }
+}
+bless { };
+
diff --git a/mysql-test/suite/s3/unsupported.result b/mysql-test/suite/s3/unsupported.result
new file mode 100644
index 00000000000..e12b57af2ba
--- /dev/null
+++ b/mysql-test/suite/s3/unsupported.result
@@ -0,0 +1,15 @@
+create sequence s1;
+alter table s1 engine=s3;
+ERROR HY000: Can't create table `database`.`s1` (errno: 138 "Unsupported extension used for table")
+drop sequence s1;
+create temporary table t1 (a int);
+alter table t1 engine=S3;
+ERROR HY000: Can't create table `database`.`t1` (errno: 131 "Command not supported by the engine")
+drop temporary table t1;
+#
+# CREATE of S3 table
+#
+create or replace table t1 (a int, b int, key (a)) engine=S3;
+ERROR HY000: Can't create table `database`.`t1` (errno: 131 "Command not supported by the engine")
+select * from t1;
+ERROR 42S02: Table 'database.t1' doesn't exist
diff --git a/mysql-test/suite/s3/unsupported.test b/mysql-test/suite/s3/unsupported.test
new file mode 100644
index 00000000000..dbc9584ec3c
--- /dev/null
+++ b/mysql-test/suite/s3/unsupported.test
@@ -0,0 +1,43 @@
+--source include/have_s3.inc
+--source create_database.inc
+
+#
+# Test unsupported features in S3
+#
+#
+
+#
+# MDEV-19463 Altering sequence to S3 leaves unremovable garbage behind
+#
+
+create sequence s1;
+--replace_result $database database
+--error ER_CANT_CREATE_TABLE
+alter table s1 engine=s3;
+drop sequence s1;
+
+#
+# MDEV-19461 Assertion failure upon altering temporary S3 table
+#
+
+create temporary table t1 (a int);
+--replace_result $database database
+--error ER_CANT_CREATE_TABLE
+alter table t1 engine=S3;
+drop temporary table t1;
+
+--echo #
+--echo # CREATE of S3 table
+--echo #
+
+--replace_result $database database
+--error ER_CANT_CREATE_TABLE
+create or replace table t1 (a int, b int, key (a)) engine=S3;
+--replace_result $database database
+--error ER_NO_SUCH_TABLE
+select * from t1;
+
+#
+# clean up
+#
+--source drop_database.inc
diff --git a/mysql-test/suite/sql_sequence/create.result b/mysql-test/suite/sql_sequence/create.result
index 5a53a66c9a8..6f70f335d88 100644
--- a/mysql-test/suite/sql_sequence/create.result
+++ b/mysql-test/suite/sql_sequence/create.result
@@ -165,7 +165,7 @@ drop sequence t1;
ERROR 42S02: 'test.t1' is not a SEQUENCE
drop sequence if exists t1;
Warnings:
-Note 4091 Unknown SEQUENCE: 'test.t1'
+Note 4090 'test.t1' is not a SEQUENCE
create sequence t1 start with 10 maxvalue=9;
ERROR HY000: Sequence 'test.t1' values are conflicting
create sequence t1 minvalue= 100 maxvalue=10;
@@ -421,12 +421,11 @@ CREATE SEQUENCE s1;
drop sequence s1;
drop sequence if exists t1,t2,t3,t4;
Warnings:
-Note 4091 Unknown SEQUENCE: 'test.t3'
+Note 4090 'test.t3' is not a SEQUENCE
Note 4091 Unknown SEQUENCE: 'test.t4'
drop table if exists t1,t2,t3;
Warnings:
-Note 1051 Unknown table 'test.t1'
-Note 1051 Unknown table 'test.t2'
+Note 1051 Unknown table 'test.t1,test.t2'
CREATE TABLE t1 (a int);
CREATE TABLE t2 (a int);
CREATE SEQUENCE s1;
@@ -441,15 +440,15 @@ CREATE TABLE t1 (a int);
CREATE TABLE t2 (a int);
CREATE SEQUENCE s1;
drop sequence t1,t2,s1,s2;
-ERROR 42S02: Unknown SEQUENCE: 'test.t1,test.t2,test.s2'
+ERROR 42S02: 'test.t1' is not a SEQUENCE
drop table if exists t1,t2;
CREATE TABLE t1 (a int);
CREATE TABLE t2 (a int);
CREATE SEQUENCE s1;
drop sequence if exists t1,t2,s1,s2;
Warnings:
-Note 4091 Unknown SEQUENCE: 'test.t1'
-Note 4091 Unknown SEQUENCE: 'test.t2'
+Note 4090 'test.t1' is not a SEQUENCE
+Note 4090 'test.t2' is not a SEQUENCE
Note 4091 Unknown SEQUENCE: 'test.s2'
drop table if exists t1,t2;
CREATE TEMPORARY SEQUENCE s1;
@@ -666,7 +665,7 @@ create temporary sequence s;
drop temporary table s;
create temporary table s (i int);
drop temporary sequence s;
-ERROR 42S02: 'test.s' is not a SEQUENCE
+ERROR 42S02: Unknown SEQUENCE: 'test.s'
drop table s;
#
# MDEV-15115 Assertion failure in CREATE SEQUENCE...ROW_FORMAT=REDUNDANT
diff --git a/mysql-test/suite/sql_sequence/create.test b/mysql-test/suite/sql_sequence/create.test
index ac3aae845cd..61430740560 100644
--- a/mysql-test/suite/sql_sequence/create.test
+++ b/mysql-test/suite/sql_sequence/create.test
@@ -342,7 +342,7 @@ drop table if exists t1,t2,s1,s2;
CREATE TABLE t1 (a int);
CREATE TABLE t2 (a int);
CREATE SEQUENCE s1;
---error ER_UNKNOWN_SEQUENCES
+--error ER_NOT_SEQUENCE2
drop sequence t1,t2,s1,s2;
drop table if exists t1,t2;
@@ -489,7 +489,7 @@ drop table s;
create temporary sequence s;
drop temporary table s;
create temporary table s (i int);
---error ER_NOT_SEQUENCE2
+--error ER_UNKNOWN_SEQUENCES
drop temporary sequence s;
drop table s;
diff --git a/mysql-test/suite/sql_sequence/default.result b/mysql-test/suite/sql_sequence/default.result
index 2f048c9e4e2..4969e832652 100644
--- a/mysql-test/suite/sql_sequence/default.result
+++ b/mysql-test/suite/sql_sequence/default.result
@@ -1,8 +1,6 @@
drop table if exists t1,s1,s2;
Warnings:
-Note 1051 Unknown table 'test.t1'
-Note 1051 Unknown table 'test.s1'
-Note 1051 Unknown table 'test.s2'
+Note 1051 Unknown table 'test.t1,test.s1,test.s2'
drop view if exists v1;
Warnings:
Note 4092 Unknown VIEW: 'test.v1'
diff --git a/mysql-test/suite/sql_sequence/other.result b/mysql-test/suite/sql_sequence/other.result
index 643233149d2..5226ce78789 100644
--- a/mysql-test/suite/sql_sequence/other.result
+++ b/mysql-test/suite/sql_sequence/other.result
@@ -310,9 +310,9 @@ CREATE TABLE t1 (a INT);
CREATE TEMPORARY TABLE tmp (b INT);
LOCK TABLE t1 READ;
DROP SEQUENCE tmp;
-ERROR 42S02: 'test.tmp' is not a SEQUENCE
+ERROR 42S02: Unknown SEQUENCE: 'test.tmp'
DROP TEMPORARY SEQUENCE tmp;
-ERROR 42S02: 'test.tmp' is not a SEQUENCE
+ERROR 42S02: Unknown SEQUENCE: 'test.tmp'
DROP SEQUENCE t1;
ERROR HY000: Table 't1' was locked with a READ lock and can't be updated
DROP TEMPORARY SEQUENCE t1;
@@ -324,19 +324,17 @@ DROP TEMPORARY SEQUENCE t1;
ERROR 42S02: Unknown SEQUENCE: 'test.t1'
DROP TABLE t1;
CREATE TABLE t (a INT);
-CREATE TEMPORARY TABLE s (f INT);
CREATE SEQUENCE s;
LOCK TABLE t WRITE;
DROP SEQUENCE s;
-ERROR 42S02: 'test.s' is not a SEQUENCE
+ERROR HY000: Table 's' was not locked with LOCK TABLES
DROP TEMPORARY SEQUENCE s;
-ERROR 42S02: 'test.s' is not a SEQUENCE
+ERROR 42S02: Unknown SEQUENCE: 'test.s'
UNLOCK TABLES;
CREATE TEMPORARY SEQUENCE s;
LOCK TABLE t WRITE;
DROP TEMPORARY SEQUENCE s;
UNLOCK TABLES;
-DROP TEMPORARY TABLE s;
DROP SEQUENCE s;
create table s(a INT);
CREATE TEMPORARY TABLE s (f INT);
@@ -352,9 +350,10 @@ CREATE VIEW v1 as SELECT * FROM t;
CREATE SEQUENCE s;
DROP SEQUENCE IF EXISTS v1;
Warnings:
-Note 4091 Unknown SEQUENCE: 'test.v1'
+Note 1965 'test.v1' is a view
DROP VIEW IF EXISTS s;
Warnings:
+Warning 1347 'test.s' is not of type 'VIEW'
Note 4092 Unknown VIEW: 'test.s'
DROP VIEW v1;
DROP SEQUENCE s;
diff --git a/mysql-test/suite/sql_sequence/other.test b/mysql-test/suite/sql_sequence/other.test
index 0fbb2d0e2f9..639cc5c36b0 100644
--- a/mysql-test/suite/sql_sequence/other.test
+++ b/mysql-test/suite/sql_sequence/other.test
@@ -325,9 +325,9 @@ drop sequence s1;
CREATE TABLE t1 (a INT);
CREATE TEMPORARY TABLE tmp (b INT);
LOCK TABLE t1 READ;
---error ER_NOT_SEQUENCE2
+--error ER_UNKNOWN_SEQUENCES
DROP SEQUENCE tmp;
---error ER_NOT_SEQUENCE2
+--error ER_UNKNOWN_SEQUENCES
DROP TEMPORARY SEQUENCE tmp;
--error ER_TABLE_NOT_LOCKED_FOR_WRITE
DROP SEQUENCE t1;
@@ -344,19 +344,17 @@ DROP TABLE t1;
CREATE TABLE t (a INT);
-CREATE TEMPORARY TABLE s (f INT);
CREATE SEQUENCE s;
LOCK TABLE t WRITE;
---error ER_NOT_SEQUENCE2
+--error ER_TABLE_NOT_LOCKED
DROP SEQUENCE s;
---error ER_NOT_SEQUENCE2
+--error ER_UNKNOWN_SEQUENCES
DROP TEMPORARY SEQUENCE s;
UNLOCK TABLES;
CREATE TEMPORARY SEQUENCE s;
LOCK TABLE t WRITE;
DROP TEMPORARY SEQUENCE s;
UNLOCK TABLES;
-DROP TEMPORARY TABLE s;
DROP SEQUENCE s;
create table s(a INT);
diff --git a/mysql-test/suite/sql_sequence/rebuild.result b/mysql-test/suite/sql_sequence/rebuild.result
index 80ac6fa34f3..6348d1775ab 100644
--- a/mysql-test/suite/sql_sequence/rebuild.result
+++ b/mysql-test/suite/sql_sequence/rebuild.result
@@ -5,159 +5,14 @@ CREATE SEQUENCE s1 ENGINE=InnoDB;
ALTER TABLE s1 FORCE;
CREATE TABLE t1 (a INT) ENGINE=MyISAM;
CREATE TABLE t2 (b VARCHAR(64)) ENGINE=MyISAM;
-CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW INSERT INTO t2 SELECT TABLE_NAME FROM INFORMATION_SCHEMA.PARTITIONS;
+CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW INSERT INTO t2 SELECT TABLE_NAME FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_SCHEMA='test';
INSERT INTO t1 VALUES (1);
select * from t1;
a
1
select * from t2;
b
-ALL_PLUGINS
-APPLICABLE_ROLES
-CHARACTER_SETS
-CHECK_CONSTRAINTS
-CLIENT_STATISTICS
-COLLATIONS
-COLLATION_CHARACTER_SET_APPLICABILITY
-COLUMNS
-COLUMN_PRIVILEGES
-ENABLED_ROLES
-ENGINES
-EVENTS
-FILES
-GEOMETRY_COLUMNS
-GLOBAL_STATUS
-GLOBAL_VARIABLES
-INDEX_STATISTICS
-INNODB_BUFFER_PAGE
-INNODB_BUFFER_PAGE_LRU
-INNODB_BUFFER_POOL_STATS
-INNODB_CMPMEM
-INNODB_CMP_PER_INDEX
-INNODB_LOCKS
-INNODB_LOCK_WAITS
-INNODB_METRICS
-INNODB_SYS_COLUMNS
-INNODB_SYS_FIELDS
-INNODB_SYS_FOREIGN
-INNODB_SYS_FOREIGN_COLS
-INNODB_SYS_INDEXES
-INNODB_SYS_TABLES
-INNODB_SYS_VIRTUAL
-INNODB_TRX
-KEYWORDS
-KEY_CACHES
-KEY_COLUMN_USAGE
-OPTIMIZER_TRACE
-PARAMETERS
-PARTITIONS
-PLUGINS
-PROCESSLIST
-PROFILING
-REFERENTIAL_CONSTRAINTS
-ROUTINES
-SCHEMATA
-SCHEMA_PRIVILEGES
-SESSION_STATUS
-SESSION_VARIABLES
-SPATIAL_REF_SYS
-SQL_FUNCTIONS
-STATISTICS
-SYSTEM_VARIABLES
-TABLES
-TABLESPACES
-TABLE_CONSTRAINTS
-TABLE_PRIVILEGES
-TABLE_STATISTICS
-TRIGGERS
-USER_PRIVILEGES
-USER_STATISTICS
-VIEWS
-accounts
-column_stats
-columns_priv
-cond_instances
-db
-event
-events_stages_current
-events_stages_history
-events_stages_history_long
-events_stages_summary_by_account_by_event_name
-events_stages_summary_by_host_by_event_name
-events_stages_summary_by_thread_by_event_name
-events_stages_summary_by_user_by_event_name
-events_stages_summary_global_by_event_name
-events_statements_current
-events_statements_history
-events_statements_history_long
-events_statements_summary_by_account_by_event_name
-events_statements_summary_by_digest
-events_statements_summary_by_host_by_event_name
-events_statements_summary_by_thread_by_event_name
-events_statements_summary_by_user_by_event_name
-events_statements_summary_global_by_event_name
-events_waits_current
-events_waits_history
-events_waits_history_long
-events_waits_summary_by_account_by_event_name
-events_waits_summary_by_host_by_event_name
-events_waits_summary_by_instance
-events_waits_summary_by_thread_by_event_name
-events_waits_summary_by_user_by_event_name
-events_waits_summary_global_by_event_name
-file_instances
-file_summary_by_event_name
-file_summary_by_instance
-func
-general_log
-global_priv
-global_suppressions
-gtid_slave_pos
-help_category
-help_keyword
-help_relation
-help_topic
-host_cache
-hosts
-index_stats
-innodb_index_stats
-innodb_table_stats
-mutex_instances
-objects_summary_global_by_type
-performance_timers
-plugin
-proc
-procs_priv
-proxies_priv
-roles_mapping
-rwlock_instances
s1
-servers
-session_account_connect_attrs
-session_connect_attrs
-setup_actors
-setup_consumers
-setup_instruments
-setup_objects
-setup_timers
-slow_log
-socket_instances
-socket_summary_by_event_name
-socket_summary_by_instance
t1
t2
-table_io_waits_summary_by_index_usage
-table_io_waits_summary_by_table
-table_lock_waits_summary_by_table
-table_stats
-tables_priv
-test_suppressions
-threads
-time_zone
-time_zone_leap_second
-time_zone_name
-time_zone_transition
-time_zone_transition_type
-transaction_registry
-users
DROP TABLE t1, t2, s1;
diff --git a/mysql-test/suite/sql_sequence/rebuild.test b/mysql-test/suite/sql_sequence/rebuild.test
index 2994b90c98f..ae8a06671a3 100644
--- a/mysql-test/suite/sql_sequence/rebuild.test
+++ b/mysql-test/suite/sql_sequence/rebuild.test
@@ -9,7 +9,7 @@ CREATE SEQUENCE s1 ENGINE=InnoDB;
ALTER TABLE s1 FORCE;
CREATE TABLE t1 (a INT) ENGINE=MyISAM;
CREATE TABLE t2 (b VARCHAR(64)) ENGINE=MyISAM;
-CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW INSERT INTO t2 SELECT TABLE_NAME FROM INFORMATION_SCHEMA.PARTITIONS;
+CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW INSERT INTO t2 SELECT TABLE_NAME FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_SCHEMA='test';
INSERT INTO t1 VALUES (1);
--sorted_result
select * from t1;
diff --git a/mysql-test/suite/storage_engine/create_table.result b/mysql-test/suite/storage_engine/create_table.result
index 2ca144fe50c..a3580c45219 100644
--- a/mysql-test/suite/storage_engine/create_table.result
+++ b/mysql-test/suite/storage_engine/create_table.result
@@ -34,7 +34,7 @@ SELECT * FROM t1;
1
2
DROP TABLE t1;
-SET storage_engine = <STORAGE_ENGINE>;
+SET default_storage_engine = <STORAGE_ENGINE>;
CREATE TABLE t1 (a <INT_COLUMN>) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>;
SHOW CREATE TABLE t1;
Table Create Table
diff --git a/mysql-test/suite/storage_engine/create_table.test b/mysql-test/suite/storage_engine/create_table.test
index 2f8971d8b27..eae259cfae2 100644
--- a/mysql-test/suite/storage_engine/create_table.test
+++ b/mysql-test/suite/storage_engine/create_table.test
@@ -82,7 +82,7 @@ if (!$mysql_errname)
# Use the engine as default
--source mask_engine.inc
-eval SET storage_engine = $storage_engine;
+eval SET default_storage_engine = $storage_engine;
--let $tbl_opts = $default_tbl_opts
--let $create_definition = a $int_col
diff --git a/mysql-test/suite/sys_vars/inc/secure_timestamp_func.inc b/mysql-test/suite/sys_vars/inc/secure_timestamp_func.inc
index 8bc3e42df59..4ea7a2aff46 100644
--- a/mysql-test/suite/sys_vars/inc/secure_timestamp_func.inc
+++ b/mysql-test/suite/sys_vars/inc/secure_timestamp_func.inc
@@ -7,13 +7,40 @@ source include/master-slave.inc;
connection slave;
select @@secure_timestamp;
-### SUPER
+--echo ### ALL PRIVILEGES
+disable_abort_on_error;
+set timestamp=1234567890.101112;
+enable_abort_on_error;
+select if(now(6) > 20100101, 'READONLY', 'EDITABLE') as 'ALL PRIVILEGES';
+set timestamp=default;
+
+--echo ### SUPER
+create user foo@127.0.0.1;
+grant super on *.* TO `foo`@`127.0.0.1`;
+connect con2,127.0.0.1,foo,,test,$SLAVE_MYPORT;
disable_abort_on_error;
set timestamp=1234567890.101112;
enable_abort_on_error;
select if(now(6) > 20100101, 'READONLY', 'EDITABLE') as 'SUPER';
+disconnect con2;
+connection slave;
+drop user foo@127.0.0.1;
+set timestamp=default;
+
+--echo ### BINLOG REPLAY
+create user foo@127.0.0.1;
+grant binlog replay on *.* TO `foo`@`127.0.0.1`;
+connect con2,127.0.0.1,foo,,test,$SLAVE_MYPORT;
+disable_abort_on_error;
+set timestamp=1234567890.101112;
+enable_abort_on_error;
+select if(now(6) > 20100101, 'READONLY', 'EDITABLE') as 'BINLOG REPLAY';
+disconnect con2;
+connection slave;
+drop user foo@127.0.0.1;
+set timestamp=default;
-### non-privileged user
+--echo ### non-privileged user
create user foo@127.0.0.1;
connect con2,127.0.0.1,foo,,test,$SLAVE_MYPORT;
disable_abort_on_error;
@@ -23,6 +50,7 @@ select if(now(6) > 20100101, 'READONLY', 'EDITABLE') as 'non-privileged';
disconnect con2;
connection slave;
drop user foo@127.0.0.1;
+set timestamp=default;
### replication
connection master;
diff --git a/mysql-test/suite/sys_vars/inc/sysvar_global_and_session_grant.inc b/mysql-test/suite/sys_vars/inc/sysvar_global_and_session_grant.inc
new file mode 100644
index 00000000000..0c6d070583b
--- /dev/null
+++ b/mysql-test/suite/sys_vars/inc/sysvar_global_and_session_grant.inc
@@ -0,0 +1,49 @@
+--source include/not_embedded.inc
+
+
+--eval SET @global=@@global.$var
+
+--echo # Test that "SET $var" is not allowed without $grant or SUPER
+
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+--eval REVOKE $grant, SUPER ON *.* FROM user1@localhost
+--connect(user1,localhost,user1,,)
+--connection user1
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+--eval SET GLOBAL $var=$value
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+--eval SET $var=$value
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+--eval SET SESSION $var=$value
+--disconnect user1
+--connection default
+DROP USER user1@localhost;
+
+--echo # Test that "SET $var" is allowed with $grant
+
+CREATE USER user1@localhost;
+--eval GRANT $grant ON *.* TO user1@localhost
+--connect(user1,localhost,user1,,)
+--connection user1
+--eval SET GLOBAL $var=$value
+--eval SET $var=$value
+--eval SET SESSION $var=$value
+--disconnect user1
+--connection default
+DROP USER user1@localhost;
+
+--echo # Test that "SET $var" is allowed with SUPER
+
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+--connect(user1,localhost,user1,,)
+--connection user1
+--eval SET GLOBAL $var=$value
+--eval SET $var=$value
+--eval SET SESSION $var=$value
+--disconnect user1
+--connection default
+DROP USER user1@localhost;
+
+--eval SET @@global.$var=@global
diff --git a/mysql-test/suite/sys_vars/inc/sysvar_global_grant.inc b/mysql-test/suite/sys_vars/inc/sysvar_global_grant.inc
new file mode 100644
index 00000000000..f452c1b19d9
--- /dev/null
+++ b/mysql-test/suite/sys_vars/inc/sysvar_global_grant.inc
@@ -0,0 +1,53 @@
+--source include/not_embedded.inc
+
+
+--eval SET @global=@@global.$var
+
+--echo # Test that "SET $var" is not allowed without $grant or SUPER
+
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+--eval REVOKE $grant, SUPER ON *.* FROM user1@localhost
+--connect(user1,localhost,user1,,)
+--connection user1
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+--eval SET GLOBAL $var=$value
+--error ER_GLOBAL_VARIABLE
+--eval SET $var=$value
+--error ER_GLOBAL_VARIABLE
+--eval SET SESSION $var=$value
+--disconnect user1
+--connection default
+DROP USER user1@localhost;
+
+--echo # Test that "SET $var" is allowed with $grant
+
+CREATE USER user1@localhost;
+--eval GRANT $grant ON *.* TO user1@localhost
+--connect(user1,localhost,user1,,)
+--connection user1
+--eval SET GLOBAL $var=$value
+--error ER_GLOBAL_VARIABLE
+--eval SET $var=$value
+--error ER_GLOBAL_VARIABLE
+--eval SET SESSION $var=$value
+--disconnect user1
+--connection default
+DROP USER user1@localhost;
+
+--echo # Test that "SET $var" is allowed with SUPER
+
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+--connect(user1,localhost,user1,,)
+--connection user1
+--eval SET GLOBAL $var=$value
+--error ER_GLOBAL_VARIABLE
+--eval SET $var=$value
+--error ER_GLOBAL_VARIABLE
+--eval SET SESSION $var=$value
+--disconnect user1
+--connection default
+DROP USER user1@localhost;
+
+--eval SET @@global.$var=@global
diff --git a/mysql-test/suite/sys_vars/inc/sysvar_global_grant_alone.inc b/mysql-test/suite/sys_vars/inc/sysvar_global_grant_alone.inc
new file mode 100644
index 00000000000..6a1cf1a74c0
--- /dev/null
+++ b/mysql-test/suite/sys_vars/inc/sysvar_global_grant_alone.inc
@@ -0,0 +1,41 @@
+--source include/not_embedded.inc
+
+
+--eval SET @global=@@global.$var
+
+--echo # Test that "SET GLOBAL $var" is not allowed without $grant or SUPER
+
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+--eval REVOKE $grant, SUPER ON *.* FROM user1@localhost
+--connect(user1,localhost,user1,,)
+--connection user1
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+--eval SET GLOBAL $var=$value
+--disconnect user1
+--connection default
+DROP USER user1@localhost;
+
+--echo # Test that "SET GLOBAL $var" is allowed with $grant
+
+CREATE USER user1@localhost;
+--eval GRANT $grant ON *.* TO user1@localhost
+--connect(user1,localhost,user1,,)
+--connection user1
+--eval SET GLOBAL $var=$value
+--disconnect user1
+--connection default
+DROP USER user1@localhost;
+
+--echo # Test that "SET GLOBAL $var" is allowed with SUPER
+
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+--connect(user1,localhost,user1,,)
+--connection user1
+--eval SET GLOBAL $var=$value
+--disconnect user1
+--connection default
+DROP USER user1@localhost;
+
+--eval SET @@global.$var=@global
diff --git a/mysql-test/suite/sys_vars/inc/sysvar_session_grant.inc b/mysql-test/suite/sys_vars/inc/sysvar_session_grant.inc
new file mode 100644
index 00000000000..1cdc6e7190a
--- /dev/null
+++ b/mysql-test/suite/sys_vars/inc/sysvar_session_grant.inc
@@ -0,0 +1,51 @@
+--source include/not_embedded.inc
+
+
+--eval SET @session=@@session.$var
+
+--echo # Test that "SET $var" is not allowed without $grant or SUPER
+
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+--eval REVOKE $grant, SUPER ON *.* FROM user1@localhost
+--connect(user1,localhost,user1,,)
+--connection user1
+--error ER_LOCAL_VARIABLE
+--eval SET GLOBAL $var=$value
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+--eval SET $var=$value
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+--eval SET SESSION $var=$value
+--disconnect user1
+--connection default
+DROP USER user1@localhost;
+
+--echo # Test that "SET $var" is allowed with $grant
+
+CREATE USER user1@localhost;
+--eval GRANT $grant ON *.* TO user1@localhost
+--connect(user1,localhost,user1,,)
+--connection user1
+--error ER_LOCAL_VARIABLE
+--eval SET GLOBAL $var=$value
+--eval SET $var=$value
+--eval SET SESSION $var=$value
+--disconnect user1
+--connection default
+DROP USER user1@localhost;
+
+--echo # Test that "SET $var" is allowed with SUPER
+
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+--connect(user1,localhost,user1,,)
+--connection user1
+--error ER_LOCAL_VARIABLE
+--eval SET GLOBAL $var=$value
+--eval SET $var=$value
+--eval SET SESSION $var=$value
+--disconnect user1
+--connection default
+DROP USER user1@localhost;
+
+--eval SET @@session.$var=@session
diff --git a/mysql-test/suite/sys_vars/inc/sysvar_session_grant_alone.inc b/mysql-test/suite/sys_vars/inc/sysvar_session_grant_alone.inc
new file mode 100644
index 00000000000..af38623a010
--- /dev/null
+++ b/mysql-test/suite/sys_vars/inc/sysvar_session_grant_alone.inc
@@ -0,0 +1,45 @@
+--source include/not_embedded.inc
+
+
+--eval SET @session=@@session.$var
+
+--echo # Test that "SET $var" is not allowed without $grant or SUPER
+
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+--eval REVOKE $grant, SUPER ON *.* FROM user1@localhost
+--connect(user1,localhost,user1,,)
+--connection user1
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+--eval SET $var=$value
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+--eval SET SESSION $var=$value
+--disconnect user1
+--connection default
+DROP USER user1@localhost;
+
+--echo # Test that "SET $var" is allowed with $grant
+
+CREATE USER user1@localhost;
+--eval GRANT $grant ON *.* TO user1@localhost
+--connect(user1,localhost,user1,,)
+--connection user1
+--eval SET $var=$value
+--eval SET SESSION $var=$value
+--disconnect user1
+--connection default
+DROP USER user1@localhost;
+
+--echo # Test that "SET $var" is allowed with SUPER
+
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+--connect(user1,localhost,user1,,)
+--connection user1
+--eval SET $var=$value
+--eval SET SESSION $var=$value
+--disconnect user1
+--connection default
+DROP USER user1@localhost;
+
+--eval SET @@session.$var=@session
diff --git a/mysql-test/suite/sys_vars/inc/sysvars_server.inc b/mysql-test/suite/sys_vars/inc/sysvars_server.inc
index 025f8a8922d..8fca98e0383 100644
--- a/mysql-test/suite/sys_vars/inc/sysvars_server.inc
+++ b/mysql-test/suite/sys_vars/inc/sysvars_server.inc
@@ -1,5 +1,6 @@
--source include/have_perfschema.inc
--source include/word_size.inc
+--source include/platform.inc
--vertical_results
# need stable timestamp, because its current value is printed below
diff --git a/mysql-test/suite/sys_vars/r/aria_sort_buffer_size_basic,32bit.rdiff b/mysql-test/suite/sys_vars/r/aria_sort_buffer_size_basic,32bit.rdiff
new file mode 100644
index 00000000000..c30b99f1f95
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/aria_sort_buffer_size_basic,32bit.rdiff
@@ -0,0 +1,9 @@
+--- suite/sys_vars/r/aria_sort_buffer_size_basic.result 2021-02-02 02:58:55.686921205 +0200
++++ suite/sys_vars/r/aria_sort_buffer_size_basic.reject 2021-02-02 11:02:12.361178360 +0200
+@@ -44,5 +44,5 @@
+ set session aria_sort_buffer_size=cast(-1 as unsigned int);
+ select @@session.aria_sort_buffer_size;
+ @@session.aria_sort_buffer_size
+-9223372036854775807
++2147483647
+ SET @@global.aria_sort_buffer_size = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/r/aria_sort_buffer_size_basic.result b/mysql-test/suite/sys_vars/r/aria_sort_buffer_size_basic.result
index 56522566ec9..b2a87db3f8c 100644
--- a/mysql-test/suite/sys_vars/r/aria_sort_buffer_size_basic.result
+++ b/mysql-test/suite/sys_vars/r/aria_sort_buffer_size_basic.result
@@ -44,5 +44,5 @@ select @@global.aria_sort_buffer_size;
set session aria_sort_buffer_size=cast(-1 as unsigned int);
select @@session.aria_sort_buffer_size;
@@session.aria_sort_buffer_size
-18446744073709551615
+9223372036854775807
SET @@global.aria_sort_buffer_size = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/r/big_tables_basic.result b/mysql-test/suite/sys_vars/r/big_tables_basic.result
index 29781987d47..a4ee8e83e5e 100644
--- a/mysql-test/suite/sys_vars/r/big_tables_basic.result
+++ b/mysql-test/suite/sys_vars/r/big_tables_basic.result
@@ -4,16 +4,24 @@ SELECT @start_value;
0
'#--------------------FN_DYNVARS_005_01------------------------#'
SET @@big_tables = 1;
+Warnings:
+Warning 1287 '@@big_tables' is deprecated and will be removed in a future release
SET @@big_tables = DEFAULT;
+Warnings:
+Warning 1287 '@@big_tables' is deprecated and will be removed in a future release
SELECT @@big_tables;
@@big_tables
0
'#--------------------FN_DYNVARS_005_02------------------------#'
SET @@big_tables = 0;
+Warnings:
+Warning 1287 '@@big_tables' is deprecated and will be removed in a future release
SELECT @@big_tables;
@@big_tables
0
SET @@big_tables = 1;
+Warnings:
+Warning 1287 '@@big_tables' is deprecated and will be removed in a future release
SELECT @@big_tables;
@@big_tables
1
@@ -44,10 +52,14 @@ SET @@big_tables = '';
ERROR 42000: Variable 'big_tables' can't be set to the value of ''
'#-------------------FN_DYNVARS_005_04----------------------------#'
SET @@global.big_tables = 1-@@global.big_tables;
+Warnings:
+Warning 1287 '@@big_tables' is deprecated and will be removed in a future release
SELECT @@global.big_tables;
@@global.big_tables
1
SET @@global.big_tables = 1-@@global.big_tables;
+Warnings:
+Warning 1287 '@@big_tables' is deprecated and will be removed in a future release
'#----------------------FN_DYNVARS_005_05------------------------#'
SELECT IF(@@big_tables, "ON", "OFF") = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
@@ -56,33 +68,47 @@ IF(@@big_tables, "ON", "OFF") = VARIABLE_VALUE
1
'#---------------------FN_DYNVARS_005_06----------------------#'
SET @@big_tables = OFF;
+Warnings:
+Warning 1287 '@@big_tables' is deprecated and will be removed in a future release
SELECT @@big_tables;
@@big_tables
0
SET @@big_tables = ON;
+Warnings:
+Warning 1287 '@@big_tables' is deprecated and will be removed in a future release
SELECT @@big_tables;
@@big_tables
1
'#---------------------FN_DYNVARS_005_07----------------------#'
SET @@big_tables = TRUE;
+Warnings:
+Warning 1287 '@@big_tables' is deprecated and will be removed in a future release
SELECT @@big_tables;
@@big_tables
1
SET @@big_tables = FALSE;
+Warnings:
+Warning 1287 '@@big_tables' is deprecated and will be removed in a future release
SELECT @@big_tables;
@@big_tables
0
'#---------------------FN_DYNVARS_005_08----------------------#'
SET @@big_tables = 0;
+Warnings:
+Warning 1287 '@@big_tables' is deprecated and will be removed in a future release
SELECT @@big_tables = @@session.big_tables;
@@big_tables = @@session.big_tables
1
SET @@big_tables = 1;
+Warnings:
+Warning 1287 '@@big_tables' is deprecated and will be removed in a future release
SELECT @@big_tables = @@local.big_tables and @@local.big_tables = @@session.big_tables;
@@big_tables = @@local.big_tables and @@local.big_tables = @@session.big_tables
1
'#---------------------FN_DYNVARS_005_09----------------------#'
SET big_tables = 1;
+Warnings:
+Warning 1287 '@@big_tables' is deprecated and will be removed in a future release
SELECT @@big_tables;
@@big_tables
1
@@ -93,6 +119,8 @@ ERROR 42S02: Unknown table 'session' in field list
select big_tables;
ERROR 42S22: Unknown column 'big_tables' in 'field list'
SET @@big_tables = @start_value;
+Warnings:
+Warning 1287 '@@big_tables' is deprecated and will be removed in a future release
SELECT @@big_tables;
@@big_tables
0
diff --git a/mysql-test/suite/sys_vars/r/binlog_annotate_row_events_grant.result b/mysql-test/suite/sys_vars/r/binlog_annotate_row_events_grant.result
new file mode 100644
index 00000000000..1ff25d209bd
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/binlog_annotate_row_events_grant.result
@@ -0,0 +1,42 @@
+#
+# MDEV-21971 Bind BINLOG ADMIN to binlog_annotate_row_events and binlog_row_image global and session variables
+#
+SET @global=@@global.binlog_annotate_row_events;
+# Test that "SET binlog_annotate_row_events" is not allowed without BINLOG ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE BINLOG ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL binlog_annotate_row_events=1;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, BINLOG ADMIN privilege(s) for this operation
+SET binlog_annotate_row_events=1;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, BINLOG ADMIN privilege(s) for this operation
+SET SESSION binlog_annotate_row_events=1;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, BINLOG ADMIN privilege(s) for this operation
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET binlog_annotate_row_events" is allowed with BINLOG ADMIN
+CREATE USER user1@localhost;
+GRANT BINLOG ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL binlog_annotate_row_events=1;
+SET binlog_annotate_row_events=1;
+SET SESSION binlog_annotate_row_events=1;
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET binlog_annotate_row_events" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL binlog_annotate_row_events=1;
+SET binlog_annotate_row_events=1;
+SET SESSION binlog_annotate_row_events=1;
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@global.binlog_annotate_row_events=@global;
diff --git a/mysql-test/suite/sys_vars/r/binlog_cache_size_grant.result b/mysql-test/suite/sys_vars/r/binlog_cache_size_grant.result
new file mode 100644
index 00000000000..e6898e58968
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/binlog_cache_size_grant.result
@@ -0,0 +1,46 @@
+#
+# MDEV-21963 Bind BINLOG ADMIN to a number of global system variables
+#
+SET @global=@@global.binlog_cache_size;
+# Test that "SET binlog_cache_size" is not allowed without BINLOG ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE BINLOG ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL binlog_cache_size=65536;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, BINLOG ADMIN privilege(s) for this operation
+SET binlog_cache_size=65536;
+ERROR HY000: Variable 'binlog_cache_size' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION binlog_cache_size=65536;
+ERROR HY000: Variable 'binlog_cache_size' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET binlog_cache_size" is allowed with BINLOG ADMIN
+CREATE USER user1@localhost;
+GRANT BINLOG ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL binlog_cache_size=65536;
+SET binlog_cache_size=65536;
+ERROR HY000: Variable 'binlog_cache_size' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION binlog_cache_size=65536;
+ERROR HY000: Variable 'binlog_cache_size' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET binlog_cache_size" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL binlog_cache_size=65536;
+SET binlog_cache_size=65536;
+ERROR HY000: Variable 'binlog_cache_size' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION binlog_cache_size=65536;
+ERROR HY000: Variable 'binlog_cache_size' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@global.binlog_cache_size=@global;
diff --git a/mysql-test/suite/sys_vars/r/binlog_commit_wait_count_grant.result b/mysql-test/suite/sys_vars/r/binlog_commit_wait_count_grant.result
new file mode 100644
index 00000000000..930772f7499
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/binlog_commit_wait_count_grant.result
@@ -0,0 +1,46 @@
+#
+# MDEV-21963 Bind BINLOG ADMIN to a number of global system variables
+#
+SET @global=@@global.binlog_commit_wait_count;
+# Test that "SET binlog_commit_wait_count" is not allowed without BINLOG ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE BINLOG ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL binlog_commit_wait_count=65536;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, BINLOG ADMIN privilege(s) for this operation
+SET binlog_commit_wait_count=65536;
+ERROR HY000: Variable 'binlog_commit_wait_count' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION binlog_commit_wait_count=65536;
+ERROR HY000: Variable 'binlog_commit_wait_count' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET binlog_commit_wait_count" is allowed with BINLOG ADMIN
+CREATE USER user1@localhost;
+GRANT BINLOG ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL binlog_commit_wait_count=65536;
+SET binlog_commit_wait_count=65536;
+ERROR HY000: Variable 'binlog_commit_wait_count' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION binlog_commit_wait_count=65536;
+ERROR HY000: Variable 'binlog_commit_wait_count' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET binlog_commit_wait_count" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL binlog_commit_wait_count=65536;
+SET binlog_commit_wait_count=65536;
+ERROR HY000: Variable 'binlog_commit_wait_count' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION binlog_commit_wait_count=65536;
+ERROR HY000: Variable 'binlog_commit_wait_count' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@global.binlog_commit_wait_count=@global;
diff --git a/mysql-test/suite/sys_vars/r/binlog_commit_wait_usec_grant.result b/mysql-test/suite/sys_vars/r/binlog_commit_wait_usec_grant.result
new file mode 100644
index 00000000000..cfbb759e959
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/binlog_commit_wait_usec_grant.result
@@ -0,0 +1,46 @@
+#
+# MDEV-21963 Bind BINLOG ADMIN to a number of global system variables
+#
+SET @global=@@global.binlog_commit_wait_usec;
+# Test that "SET binlog_commit_wait_usec" is not allowed without BINLOG ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE BINLOG ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL binlog_commit_wait_usec=65536;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, BINLOG ADMIN privilege(s) for this operation
+SET binlog_commit_wait_usec=65536;
+ERROR HY000: Variable 'binlog_commit_wait_usec' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION binlog_commit_wait_usec=65536;
+ERROR HY000: Variable 'binlog_commit_wait_usec' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET binlog_commit_wait_usec" is allowed with BINLOG ADMIN
+CREATE USER user1@localhost;
+GRANT BINLOG ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL binlog_commit_wait_usec=65536;
+SET binlog_commit_wait_usec=65536;
+ERROR HY000: Variable 'binlog_commit_wait_usec' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION binlog_commit_wait_usec=65536;
+ERROR HY000: Variable 'binlog_commit_wait_usec' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET binlog_commit_wait_usec" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL binlog_commit_wait_usec=65536;
+SET binlog_commit_wait_usec=65536;
+ERROR HY000: Variable 'binlog_commit_wait_usec' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION binlog_commit_wait_usec=65536;
+ERROR HY000: Variable 'binlog_commit_wait_usec' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@global.binlog_commit_wait_usec=@global;
diff --git a/mysql-test/suite/sys_vars/r/binlog_direct_non_transactional_updates_grant.result b/mysql-test/suite/sys_vars/r/binlog_direct_non_transactional_updates_grant.result
new file mode 100644
index 00000000000..e70dbbf408f
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/binlog_direct_non_transactional_updates_grant.result
@@ -0,0 +1,44 @@
+SET @global= @@global.binlog_direct_non_transactional_updates;
+SET @session= @@global.binlog_direct_non_transactional_updates;
+#
+#
+#
+# Test that "SET binlog_direct_non_transactional_updates" is not allowed without BINLOG ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE BINLOG ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET binlog_direct_non_transactional_updates=0;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, BINLOG ADMIN privilege(s) for this operation
+SET GLOBAL binlog_direct_non_transactional_updates=0;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, BINLOG ADMIN privilege(s) for this operation
+SET SESSION binlog_direct_non_transactional_updates=0;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, BINLOG ADMIN privilege(s) for this operation
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET binlog_direct_non_transactional_updates" is allowed with BINLOG ADMIN
+CREATE USER user1@localhost;
+GRANT BINLOG ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET binlog_direct_non_transactional_updates=0;
+SET GLOBAL binlog_direct_non_transactional_updates=0;
+SET SESSION binlog_direct_non_transactional_updates=0;
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET binlog_direct_non_transactional_updates" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET binlog_direct_non_transactional_updates=0;
+SET GLOBAL binlog_direct_non_transactional_updates=0;
+SET SESSION binlog_direct_non_transactional_updates=0;
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET GLOBAL binlog_direct_non_transactional_updates=@global;
+SET SESSION binlog_direct_non_transactional_updates=@session;
diff --git a/mysql-test/suite/sys_vars/r/binlog_file_cache_size_grant.result b/mysql-test/suite/sys_vars/r/binlog_file_cache_size_grant.result
new file mode 100644
index 00000000000..3cd5aaf57d4
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/binlog_file_cache_size_grant.result
@@ -0,0 +1,46 @@
+#
+# MDEV-21963 Bind BINLOG ADMIN to a number of global system variables
+#
+SET @global=@@global.binlog_file_cache_size;
+# Test that "SET binlog_file_cache_size" is not allowed without BINLOG ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE BINLOG ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL binlog_file_cache_size=65536;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, BINLOG ADMIN privilege(s) for this operation
+SET binlog_file_cache_size=65536;
+ERROR HY000: Variable 'binlog_file_cache_size' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION binlog_file_cache_size=65536;
+ERROR HY000: Variable 'binlog_file_cache_size' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET binlog_file_cache_size" is allowed with BINLOG ADMIN
+CREATE USER user1@localhost;
+GRANT BINLOG ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL binlog_file_cache_size=65536;
+SET binlog_file_cache_size=65536;
+ERROR HY000: Variable 'binlog_file_cache_size' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION binlog_file_cache_size=65536;
+ERROR HY000: Variable 'binlog_file_cache_size' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET binlog_file_cache_size" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL binlog_file_cache_size=65536;
+SET binlog_file_cache_size=65536;
+ERROR HY000: Variable 'binlog_file_cache_size' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION binlog_file_cache_size=65536;
+ERROR HY000: Variable 'binlog_file_cache_size' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@global.binlog_file_cache_size=@global;
diff --git a/mysql-test/suite/sys_vars/r/binlog_format_grant.result b/mysql-test/suite/sys_vars/r/binlog_format_grant.result
new file mode 100644
index 00000000000..b3cd77a6bd4
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/binlog_format_grant.result
@@ -0,0 +1,40 @@
+#
+#
+#
+# Test that "SET binlog_format" is not allowed without BINLOG ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE BINLOG ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET binlog_format=mixed;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, BINLOG ADMIN privilege(s) for this operation
+SET GLOBAL binlog_format=mixed;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, BINLOG ADMIN privilege(s) for this operation
+SET SESSION binlog_format=mixed;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, BINLOG ADMIN privilege(s) for this operation
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET binlog_format" is allowed with BINLOG ADMIN
+CREATE USER user1@localhost;
+GRANT BINLOG ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET binlog_format=mixed;
+SET GLOBAL binlog_format=mixed;
+SET SESSION binlog_format=mixed;
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET binlog_format" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET binlog_format=mixed;
+SET GLOBAL binlog_format=mixed;
+SET SESSION binlog_format=mixed;
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
diff --git a/mysql-test/suite/sys_vars/r/binlog_row_image_grant.result b/mysql-test/suite/sys_vars/r/binlog_row_image_grant.result
new file mode 100644
index 00000000000..d9cf65d9932
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/binlog_row_image_grant.result
@@ -0,0 +1,42 @@
+#
+# MDEV-21971 Bind BINLOG ADMIN to binlog_annotate_row_events and binlog_row_image global and session variables
+#
+SET @global=@@global.binlog_row_image;
+# Test that "SET binlog_row_image" is not allowed without BINLOG ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE BINLOG ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL binlog_row_image=1;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, BINLOG ADMIN privilege(s) for this operation
+SET binlog_row_image=1;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, BINLOG ADMIN privilege(s) for this operation
+SET SESSION binlog_row_image=1;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, BINLOG ADMIN privilege(s) for this operation
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET binlog_row_image" is allowed with BINLOG ADMIN
+CREATE USER user1@localhost;
+GRANT BINLOG ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL binlog_row_image=1;
+SET binlog_row_image=1;
+SET SESSION binlog_row_image=1;
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET binlog_row_image" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL binlog_row_image=1;
+SET binlog_row_image=1;
+SET SESSION binlog_row_image=1;
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@global.binlog_row_image=@global;
diff --git a/mysql-test/suite/sys_vars/r/binlog_row_metadata_basic.result b/mysql-test/suite/sys_vars/r/binlog_row_metadata_basic.result
new file mode 100644
index 00000000000..09287cff7fd
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/binlog_row_metadata_basic.result
@@ -0,0 +1,90 @@
+NO_LOG Expected
+SELECT @@GLOBAL.binlog_row_metadata;
+@@GLOBAL.binlog_row_metadata
+NO_LOG
+SELECT @@SESSION.binlog_row_metadata;
+ERROR HY000: Variable 'binlog_row_metadata' is a GLOBAL variable
+'#---------------------BS_STVARS_002_01----------------------#'
+SET @start_value= @@global.binlog_row_metadata;
+SELECT COUNT(@@GLOBAL.binlog_row_metadata);
+COUNT(@@GLOBAL.binlog_row_metadata)
+1
+1 Expected
+'#---------------------BS_STVARS_002_02----------------------#'
+SET @@GLOBAL.binlog_row_metadata=0;
+SELECT @@GLOBAL.binlog_row_metadata;
+@@GLOBAL.binlog_row_metadata
+NO_LOG
+NO_LOG Expected
+SET @@GLOBAL.binlog_row_metadata=1;
+SELECT @@GLOBAL.binlog_row_metadata;
+@@GLOBAL.binlog_row_metadata
+MINIMAL
+MINIMAL Expected
+SET @@GLOBAL.binlog_row_metadata=2;
+SELECT @@GLOBAL.binlog_row_metadata;
+@@GLOBAL.binlog_row_metadata
+FULL
+FULL Expected
+SET @@GLOBAL.binlog_row_metadata=NO_LOG;
+SELECT @@GLOBAL.binlog_row_metadata;
+@@GLOBAL.binlog_row_metadata
+NO_LOG
+NO_LOG Expected
+SET @@GLOBAL.binlog_row_metadata=MINIMAL;
+SELECT @@GLOBAL.binlog_row_metadata;
+@@GLOBAL.binlog_row_metadata
+MINIMAL
+MINIMAL Expected
+SET @@GLOBAL.binlog_row_metadata=FULL;
+SELECT @@GLOBAL.binlog_row_metadata;
+@@GLOBAL.binlog_row_metadata
+FULL
+FULL Expected
+SET @@GLOBAL.binlog_row_metadata='NO_LOG';
+SELECT @@GLOBAL.binlog_row_metadata;
+@@GLOBAL.binlog_row_metadata
+NO_LOG
+NO_LOG Expected
+SET @@GLOBAL.binlog_row_metadata='MINIMAL';
+SELECT @@GLOBAL.binlog_row_metadata;
+@@GLOBAL.binlog_row_metadata
+MINIMAL
+MINIMAL Expected
+SET @@GLOBAL.binlog_row_metadata='FULL';
+SELECT @@GLOBAL.binlog_row_metadata;
+@@GLOBAL.binlog_row_metadata
+FULL
+FULL Expected
+'#---------------------BS_STVARS_002_03----------------------#'
+SET @@GLOBAL.binlog_row_metadata='MINIMAl';
+SELECT *
+FROM information_schema.global_variables
+WHERE VARIABLE_NAME='binlog_row_metadata';
+VARIABLE_NAME VARIABLE_VALUE
+BINLOG_ROW_METADATA MINIMAL
+'#---------------------BS_STVARS_002_04----------------------#'
+SELECT *
+FROM information_schema.session_variables
+WHERE VARIABLE_NAME LIKE 'binlog_row_metadata';
+VARIABLE_NAME VARIABLE_VALUE
+BINLOG_ROW_METADATA MINIMAL
+'#---------------------BS_STVARS_002_05----------------------#'
+SELECT COUNT(@@binlog_row_metadata);
+COUNT(@@binlog_row_metadata)
+1
+1 Expected
+SELECT COUNT(@@GLOBAL.binlog_row_metadata);
+COUNT(@@GLOBAL.binlog_row_metadata)
+1
+1 Expected
+'#---------------------BS_STVARS_002_06----------------------#'
+SET GLOBAL binlog_row_metadata = full1;
+ERROR 42000: Variable 'binlog_row_metadata' can't be set to the value of 'full1'
+SET GLOBAL binlog_row_metadata = "full1";
+ERROR 42000: Variable 'binlog_row_metadata' can't be set to the value of 'full1'
+SET GLOBAL binlog_row_metadata = 3;
+ERROR 42000: Variable 'binlog_row_metadata' can't be set to the value of '3'
+SET GLOBAL binlog_row_metadata = -1;
+ERROR 42000: Variable 'binlog_row_metadata' can't be set to the value of '-1'
+SET @@global.binlog_row_metadata= @start_value;
diff --git a/mysql-test/suite/sys_vars/r/binlog_row_metadata_grant.result b/mysql-test/suite/sys_vars/r/binlog_row_metadata_grant.result
new file mode 100644
index 00000000000..43282278aa3
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/binlog_row_metadata_grant.result
@@ -0,0 +1,46 @@
+#
+# MDEV-21963 Bind BINLOG ADMIN to a number of global system variables
+#
+SET @global=@@global.binlog_row_metadata;
+# Test that "SET binlog_row_metadata" is not allowed without BINLOG ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE BINLOG ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL binlog_row_metadata=NO_LOG;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, BINLOG ADMIN privilege(s) for this operation
+SET binlog_row_metadata=NO_LOG;
+ERROR HY000: Variable 'binlog_row_metadata' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION binlog_row_metadata=NO_LOG;
+ERROR HY000: Variable 'binlog_row_metadata' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET binlog_row_metadata" is allowed with BINLOG ADMIN
+CREATE USER user1@localhost;
+GRANT BINLOG ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL binlog_row_metadata=NO_LOG;
+SET binlog_row_metadata=NO_LOG;
+ERROR HY000: Variable 'binlog_row_metadata' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION binlog_row_metadata=NO_LOG;
+ERROR HY000: Variable 'binlog_row_metadata' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET binlog_row_metadata" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL binlog_row_metadata=NO_LOG;
+SET binlog_row_metadata=NO_LOG;
+ERROR HY000: Variable 'binlog_row_metadata' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION binlog_row_metadata=NO_LOG;
+ERROR HY000: Variable 'binlog_row_metadata' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@global.binlog_row_metadata=@global;
diff --git a/mysql-test/suite/sys_vars/r/binlog_stmt_cache_size_grant.result b/mysql-test/suite/sys_vars/r/binlog_stmt_cache_size_grant.result
new file mode 100644
index 00000000000..87070de932c
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/binlog_stmt_cache_size_grant.result
@@ -0,0 +1,46 @@
+#
+# MDEV-21963 Bind BINLOG ADMIN to a number of global system variables
+#
+SET @global=@@global.binlog_stmt_cache_size;
+# Test that "SET binlog_stmt_cache_size" is not allowed without BINLOG ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE BINLOG ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL binlog_stmt_cache_size=65536;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, BINLOG ADMIN privilege(s) for this operation
+SET binlog_stmt_cache_size=65536;
+ERROR HY000: Variable 'binlog_stmt_cache_size' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION binlog_stmt_cache_size=65536;
+ERROR HY000: Variable 'binlog_stmt_cache_size' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET binlog_stmt_cache_size" is allowed with BINLOG ADMIN
+CREATE USER user1@localhost;
+GRANT BINLOG ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL binlog_stmt_cache_size=65536;
+SET binlog_stmt_cache_size=65536;
+ERROR HY000: Variable 'binlog_stmt_cache_size' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION binlog_stmt_cache_size=65536;
+ERROR HY000: Variable 'binlog_stmt_cache_size' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET binlog_stmt_cache_size" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL binlog_stmt_cache_size=65536;
+SET binlog_stmt_cache_size=65536;
+ERROR HY000: Variable 'binlog_stmt_cache_size' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION binlog_stmt_cache_size=65536;
+ERROR HY000: Variable 'binlog_stmt_cache_size' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@global.binlog_stmt_cache_size=@global;
diff --git a/mysql-test/suite/sys_vars/r/connect_timeout_grant.result b/mysql-test/suite/sys_vars/r/connect_timeout_grant.result
new file mode 100644
index 00000000000..96351490f6f
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/connect_timeout_grant.result
@@ -0,0 +1,46 @@
+SET @global=@@global.connect_timeout;
+#
+# MDEV-21961 Bind CONNECTION ADMIN to a number of global system variables
+#
+# Test that "SET connect_timeout" is not allowed without CONNECTION ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE CONNECTION ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL connect_timeout=10;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, CONNECTION ADMIN privilege(s) for this operation
+SET connect_timeout=10;
+ERROR HY000: Variable 'connect_timeout' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION connect_timeout=10;
+ERROR HY000: Variable 'connect_timeout' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET connect_timeout" is allowed with CONNECTION ADMIN
+CREATE USER user1@localhost;
+GRANT CONNECTION ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL connect_timeout=10;
+SET connect_timeout=10;
+ERROR HY000: Variable 'connect_timeout' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION connect_timeout=10;
+ERROR HY000: Variable 'connect_timeout' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET connect_timeout" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL connect_timeout=10;
+SET connect_timeout=10;
+ERROR HY000: Variable 'connect_timeout' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION connect_timeout=10;
+ERROR HY000: Variable 'connect_timeout' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@global.connect_timeout=@global;
diff --git a/mysql-test/suite/sys_vars/r/default_regex_flags_basic.result b/mysql-test/suite/sys_vars/r/default_regex_flags_basic.result
index d25f3ca1c88..e384943cd2f 100644
--- a/mysql-test/suite/sys_vars/r/default_regex_flags_basic.result
+++ b/mysql-test/suite/sys_vars/r/default_regex_flags_basic.result
@@ -13,8 +13,8 @@ SELECT @@default_regex_flags;
SET default_regex_flags='UNKNOWN';
ERROR 42000: Variable 'default_regex_flags' can't be set to the value of 'UNKNOWN'
-SET default_regex_flags=123;
-ERROR 42000: Variable 'default_regex_flags' can't be set to the value of '123'
+SET default_regex_flags=325;
+ERROR 42000: Variable 'default_regex_flags' can't be set to the value of '325'
SET default_regex_flags=123.0;
ERROR 42000: Incorrect argument type to variable 'default_regex_flags'
SET default_regex_flags=123e0;
@@ -31,7 +31,7 @@ DOTALL
SET @@default_regex_flags=63;
SELECT @@default_regex_flags;
@@default_regex_flags
-DOTALL,DUPNAMES,EXTENDED,EXTRA,MULTILINE,UNGREEDY
+DOTALL,DUPNAMES,EXTENDED,EXTENDED_MORE,EXTRA,MULTILINE
SET @@default_regex_flags='DOTALL';
SELECT @@default_regex_flags;
@@default_regex_flags
diff --git a/mysql-test/suite/sys_vars/r/disconnect_on_expired_password_grant.result b/mysql-test/suite/sys_vars/r/disconnect_on_expired_password_grant.result
new file mode 100644
index 00000000000..b7152351a5d
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/disconnect_on_expired_password_grant.result
@@ -0,0 +1,46 @@
+SET @global=@@global.disconnect_on_expired_password;
+#
+# MDEV-21961 Bind CONNECTION ADMIN to a number of global system variables
+#
+# Test that "SET disconnect_on_expired_password" is not allowed without CONNECTION ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE CONNECTION ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL disconnect_on_expired_password=1;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, CONNECTION ADMIN privilege(s) for this operation
+SET disconnect_on_expired_password=1;
+ERROR HY000: Variable 'disconnect_on_expired_password' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION disconnect_on_expired_password=1;
+ERROR HY000: Variable 'disconnect_on_expired_password' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET disconnect_on_expired_password" is allowed with CONNECTION ADMIN
+CREATE USER user1@localhost;
+GRANT CONNECTION ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL disconnect_on_expired_password=1;
+SET disconnect_on_expired_password=1;
+ERROR HY000: Variable 'disconnect_on_expired_password' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION disconnect_on_expired_password=1;
+ERROR HY000: Variable 'disconnect_on_expired_password' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET disconnect_on_expired_password" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL disconnect_on_expired_password=1;
+SET disconnect_on_expired_password=1;
+ERROR HY000: Variable 'disconnect_on_expired_password' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION disconnect_on_expired_password=1;
+ERROR HY000: Variable 'disconnect_on_expired_password' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@global.disconnect_on_expired_password=@global;
diff --git a/mysql-test/suite/sys_vars/r/expire_logs_days_grant.result b/mysql-test/suite/sys_vars/r/expire_logs_days_grant.result
new file mode 100644
index 00000000000..f7a3ddc76c1
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/expire_logs_days_grant.result
@@ -0,0 +1,46 @@
+#
+# MDEV-21963 Bind BINLOG ADMIN to a number of global system variables
+#
+SET @global=@@global.expire_logs_days;
+# Test that "SET expire_logs_days" is not allowed without BINLOG ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE BINLOG ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL expire_logs_days=33;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, BINLOG ADMIN privilege(s) for this operation
+SET expire_logs_days=33;
+ERROR HY000: Variable 'expire_logs_days' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION expire_logs_days=33;
+ERROR HY000: Variable 'expire_logs_days' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET expire_logs_days" is allowed with BINLOG ADMIN
+CREATE USER user1@localhost;
+GRANT BINLOG ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL expire_logs_days=33;
+SET expire_logs_days=33;
+ERROR HY000: Variable 'expire_logs_days' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION expire_logs_days=33;
+ERROR HY000: Variable 'expire_logs_days' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET expire_logs_days" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL expire_logs_days=33;
+SET expire_logs_days=33;
+ERROR HY000: Variable 'expire_logs_days' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION expire_logs_days=33;
+ERROR HY000: Variable 'expire_logs_days' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@global.expire_logs_days=@global;
diff --git a/mysql-test/suite/sys_vars/r/extra_max_connections_grant.result b/mysql-test/suite/sys_vars/r/extra_max_connections_grant.result
new file mode 100644
index 00000000000..2f211dd5661
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/extra_max_connections_grant.result
@@ -0,0 +1,46 @@
+SET @global=@@global.extra_max_connections;
+#
+# MDEV-21961 Bind CONNECTION ADMIN to a number of global system variables
+#
+# Test that "SET extra_max_connections" is not allowed without CONNECTION ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE CONNECTION ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL extra_max_connections=10;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, CONNECTION ADMIN privilege(s) for this operation
+SET extra_max_connections=10;
+ERROR HY000: Variable 'extra_max_connections' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION extra_max_connections=10;
+ERROR HY000: Variable 'extra_max_connections' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET extra_max_connections" is allowed with CONNECTION ADMIN
+CREATE USER user1@localhost;
+GRANT CONNECTION ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL extra_max_connections=10;
+SET extra_max_connections=10;
+ERROR HY000: Variable 'extra_max_connections' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION extra_max_connections=10;
+ERROR HY000: Variable 'extra_max_connections' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET extra_max_connections" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL extra_max_connections=10;
+SET extra_max_connections=10;
+ERROR HY000: Variable 'extra_max_connections' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION extra_max_connections=10;
+ERROR HY000: Variable 'extra_max_connections' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@global.extra_max_connections=@global;
diff --git a/mysql-test/suite/sys_vars/r/general_log_file_basic.result b/mysql-test/suite/sys_vars/r/general_log_file_basic.result
index 6a80749453b..e04f7ee37a4 100644
--- a/mysql-test/suite/sys_vars/r/general_log_file_basic.result
+++ b/mysql-test/suite/sys_vars/r/general_log_file_basic.result
@@ -19,7 +19,7 @@ ERROR 42000: Variable 'general_log_file' can't be set to the value of '/tmp/my.c
SET @@global.general_log_file = '.my.cnf';
ERROR 42000: Variable 'general_log_file' can't be set to the value of '.my.cnf'
SET @@global.general_log_file = 'my.cnf\0foo';
-ERROR 42000: Variable 'general_log_file' can't be set to the value of 'my.cnf'
+ERROR 42000: Variable 'general_log_file' can't be set to the value of 'my.cnf\0000foo'
SET @@global.general_log_file = 'my.ini';
ERROR 42000: Variable 'general_log_file' can't be set to the value of 'my.ini'
'#----------------------FN_DYNVARS_004_03------------------------#'
diff --git a/mysql-test/suite/sys_vars/r/gtid_binlog_state_grant.result b/mysql-test/suite/sys_vars/r/gtid_binlog_state_grant.result
new file mode 100644
index 00000000000..0ccf610cc28
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/gtid_binlog_state_grant.result
@@ -0,0 +1,46 @@
+#
+# MDEV-21973 Bind REPLICATION {MASTER|SLAVE} ADMIN to gtid_* GLOBAL-only system variables
+#
+# Test that "SET gtid_binlog_state" is not allowed without REPLICATION MASTER ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE REPLICATION MASTER ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL gtid_binlog_state='0-1-10';
+ERROR 42000: Access denied; you need (at least one of) the SUPER, REPLICATION MASTER ADMIN privilege(s) for this operation
+SET gtid_binlog_state='0-1-10';
+ERROR HY000: Variable 'gtid_binlog_state' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION gtid_binlog_state='0-1-10';
+ERROR HY000: Variable 'gtid_binlog_state' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET gtid_binlog_state" is allowed with REPLICATION MASTER ADMIN
+CREATE USER user1@localhost;
+GRANT REPLICATION MASTER ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL gtid_binlog_state='0-1-10';
+ERROR HY000: Binlog closed, cannot RESET MASTER
+SET gtid_binlog_state='0-1-10';
+ERROR HY000: Variable 'gtid_binlog_state' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION gtid_binlog_state='0-1-10';
+ERROR HY000: Variable 'gtid_binlog_state' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET gtid_binlog_state" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL gtid_binlog_state='0-1-10';
+ERROR HY000: Binlog closed, cannot RESET MASTER
+SET gtid_binlog_state='0-1-10';
+ERROR HY000: Variable 'gtid_binlog_state' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION gtid_binlog_state='0-1-10';
+ERROR HY000: Variable 'gtid_binlog_state' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
diff --git a/mysql-test/suite/sys_vars/r/gtid_cleanup_batch_size_grant.result b/mysql-test/suite/sys_vars/r/gtid_cleanup_batch_size_grant.result
new file mode 100644
index 00000000000..326fb47d48c
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/gtid_cleanup_batch_size_grant.result
@@ -0,0 +1,46 @@
+#
+# MDEV-21973 Bind REPLICATION {MASTER|SLAVE} ADMIN to gtid_* GLOBAL-only system variables
+#
+SET @global=@@global.gtid_cleanup_batch_size;
+# Test that "SET gtid_cleanup_batch_size" is not allowed without REPLICATION SLAVE ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE REPLICATION SLAVE ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL gtid_cleanup_batch_size=1;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, REPLICATION SLAVE ADMIN privilege(s) for this operation
+SET gtid_cleanup_batch_size=1;
+ERROR HY000: Variable 'gtid_cleanup_batch_size' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION gtid_cleanup_batch_size=1;
+ERROR HY000: Variable 'gtid_cleanup_batch_size' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET gtid_cleanup_batch_size" is allowed with REPLICATION SLAVE ADMIN
+CREATE USER user1@localhost;
+GRANT REPLICATION SLAVE ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL gtid_cleanup_batch_size=1;
+SET gtid_cleanup_batch_size=1;
+ERROR HY000: Variable 'gtid_cleanup_batch_size' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION gtid_cleanup_batch_size=1;
+ERROR HY000: Variable 'gtid_cleanup_batch_size' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET gtid_cleanup_batch_size" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL gtid_cleanup_batch_size=1;
+SET gtid_cleanup_batch_size=1;
+ERROR HY000: Variable 'gtid_cleanup_batch_size' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION gtid_cleanup_batch_size=1;
+ERROR HY000: Variable 'gtid_cleanup_batch_size' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@global.gtid_cleanup_batch_size=@global;
diff --git a/mysql-test/suite/sys_vars/r/gtid_domain_id_grant.result b/mysql-test/suite/sys_vars/r/gtid_domain_id_grant.result
new file mode 100644
index 00000000000..096f5136ab0
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/gtid_domain_id_grant.result
@@ -0,0 +1,69 @@
+#
+# MDEV-21975 Add BINLOG REPLAY privilege and bind new privileges to gtid_seq_no, preudo_thread_id, server_id, gtid_domain_id
+#
+SET @global=@@global.gtid_domain_id;
+# Test that "SET GLOBAL gtid_domain_id" is not allowed without REPLICATION MASTER ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE REPLICATION MASTER ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL gtid_domain_id=1;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, REPLICATION MASTER ADMIN privilege(s) for this operation
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET GLOBAL gtid_domain_id" is allowed with REPLICATION MASTER ADMIN
+CREATE USER user1@localhost;
+GRANT REPLICATION MASTER ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL gtid_domain_id=1;
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET GLOBAL gtid_domain_id" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL gtid_domain_id=1;
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@global.gtid_domain_id=@global;
+SET @session=@@session.gtid_domain_id;
+# Test that "SET gtid_domain_id" is not allowed without BINLOG REPLAY or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE BINLOG REPLAY, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET gtid_domain_id=1;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, BINLOG REPLAY privilege(s) for this operation
+SET SESSION gtid_domain_id=1;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, BINLOG REPLAY privilege(s) for this operation
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET gtid_domain_id" is allowed with BINLOG REPLAY
+CREATE USER user1@localhost;
+GRANT BINLOG REPLAY ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET gtid_domain_id=1;
+SET SESSION gtid_domain_id=1;
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET gtid_domain_id" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET gtid_domain_id=1;
+SET SESSION gtid_domain_id=1;
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@session.gtid_domain_id=@session;
diff --git a/mysql-test/suite/sys_vars/r/gtid_ignore_duplicates_grant.result b/mysql-test/suite/sys_vars/r/gtid_ignore_duplicates_grant.result
new file mode 100644
index 00000000000..f4c95fb6192
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/gtid_ignore_duplicates_grant.result
@@ -0,0 +1,46 @@
+#
+# MDEV-21973 Bind REPLICATION {MASTER|SLAVE} ADMIN to gtid_* GLOBAL-only system variables
+#
+SET @global=@@global.gtid_ignore_duplicates;
+# Test that "SET gtid_ignore_duplicates" is not allowed without REPLICATION SLAVE ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE REPLICATION SLAVE ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL gtid_ignore_duplicates=1;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, REPLICATION SLAVE ADMIN privilege(s) for this operation
+SET gtid_ignore_duplicates=1;
+ERROR HY000: Variable 'gtid_ignore_duplicates' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION gtid_ignore_duplicates=1;
+ERROR HY000: Variable 'gtid_ignore_duplicates' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET gtid_ignore_duplicates" is allowed with REPLICATION SLAVE ADMIN
+CREATE USER user1@localhost;
+GRANT REPLICATION SLAVE ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL gtid_ignore_duplicates=1;
+SET gtid_ignore_duplicates=1;
+ERROR HY000: Variable 'gtid_ignore_duplicates' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION gtid_ignore_duplicates=1;
+ERROR HY000: Variable 'gtid_ignore_duplicates' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET gtid_ignore_duplicates" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL gtid_ignore_duplicates=1;
+SET gtid_ignore_duplicates=1;
+ERROR HY000: Variable 'gtid_ignore_duplicates' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION gtid_ignore_duplicates=1;
+ERROR HY000: Variable 'gtid_ignore_duplicates' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@global.gtid_ignore_duplicates=@global;
diff --git a/mysql-test/suite/sys_vars/r/gtid_pos_auto_engines_grant.result b/mysql-test/suite/sys_vars/r/gtid_pos_auto_engines_grant.result
new file mode 100644
index 00000000000..60fae07cf7c
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/gtid_pos_auto_engines_grant.result
@@ -0,0 +1,46 @@
+#
+# MDEV-21973 Bind REPLICATION {MASTER|SLAVE} ADMIN to gtid_* GLOBAL-only system variables
+#
+SET @global=@@global.gtid_pos_auto_engines;
+# Test that "SET gtid_pos_auto_engines" is not allowed without REPLICATION SLAVE ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE REPLICATION SLAVE ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL gtid_pos_auto_engines='';
+ERROR 42000: Access denied; you need (at least one of) the SUPER, REPLICATION SLAVE ADMIN privilege(s) for this operation
+SET gtid_pos_auto_engines='';
+ERROR HY000: Variable 'gtid_pos_auto_engines' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION gtid_pos_auto_engines='';
+ERROR HY000: Variable 'gtid_pos_auto_engines' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET gtid_pos_auto_engines" is allowed with REPLICATION SLAVE ADMIN
+CREATE USER user1@localhost;
+GRANT REPLICATION SLAVE ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL gtid_pos_auto_engines='';
+SET gtid_pos_auto_engines='';
+ERROR HY000: Variable 'gtid_pos_auto_engines' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION gtid_pos_auto_engines='';
+ERROR HY000: Variable 'gtid_pos_auto_engines' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET gtid_pos_auto_engines" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL gtid_pos_auto_engines='';
+SET gtid_pos_auto_engines='';
+ERROR HY000: Variable 'gtid_pos_auto_engines' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION gtid_pos_auto_engines='';
+ERROR HY000: Variable 'gtid_pos_auto_engines' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@global.gtid_pos_auto_engines=@global;
diff --git a/mysql-test/suite/sys_vars/r/gtid_seq_no_grant.result b/mysql-test/suite/sys_vars/r/gtid_seq_no_grant.result
new file mode 100644
index 00000000000..0d08cde546c
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/gtid_seq_no_grant.result
@@ -0,0 +1,44 @@
+#
+# MDEV-21975 Add BINLOG REPLAY privilege and bind new privileges to gtid_seq_no, preudo_thread_id, server_id, gtid_domain_id
+#
+SET @session=@@session.gtid_seq_no;
+# Test that "SET gtid_seq_no" is not allowed without BINLOG REPLAY or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE BINLOG REPLAY, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL gtid_seq_no=1;
+ERROR HY000: Variable 'gtid_seq_no' is a SESSION variable and can't be used with SET GLOBAL
+SET gtid_seq_no=1;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, BINLOG REPLAY privilege(s) for this operation
+SET SESSION gtid_seq_no=1;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, BINLOG REPLAY privilege(s) for this operation
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET gtid_seq_no" is allowed with BINLOG REPLAY
+CREATE USER user1@localhost;
+GRANT BINLOG REPLAY ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL gtid_seq_no=1;
+ERROR HY000: Variable 'gtid_seq_no' is a SESSION variable and can't be used with SET GLOBAL
+SET gtid_seq_no=1;
+SET SESSION gtid_seq_no=1;
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET gtid_seq_no" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL gtid_seq_no=1;
+ERROR HY000: Variable 'gtid_seq_no' is a SESSION variable and can't be used with SET GLOBAL
+SET gtid_seq_no=1;
+SET SESSION gtid_seq_no=1;
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@session.gtid_seq_no=@session;
diff --git a/mysql-test/suite/sys_vars/r/gtid_slave_pos_grant.result b/mysql-test/suite/sys_vars/r/gtid_slave_pos_grant.result
new file mode 100644
index 00000000000..52918706e3f
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/gtid_slave_pos_grant.result
@@ -0,0 +1,46 @@
+#
+# MDEV-21973 Bind REPLICATION {MASTER|SLAVE} ADMIN to gtid_* GLOBAL-only system variables
+#
+SET @global=@@global.gtid_slave_pos;
+# Test that "SET gtid_slave_pos" is not allowed without REPLICATION SLAVE ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE REPLICATION SLAVE ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL gtid_slave_pos='';
+ERROR 42000: Access denied; you need (at least one of) the SUPER, REPLICATION SLAVE ADMIN privilege(s) for this operation
+SET gtid_slave_pos='';
+ERROR HY000: Variable 'gtid_slave_pos' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION gtid_slave_pos='';
+ERROR HY000: Variable 'gtid_slave_pos' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET gtid_slave_pos" is allowed with REPLICATION SLAVE ADMIN
+CREATE USER user1@localhost;
+GRANT REPLICATION SLAVE ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL gtid_slave_pos='';
+SET gtid_slave_pos='';
+ERROR HY000: Variable 'gtid_slave_pos' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION gtid_slave_pos='';
+ERROR HY000: Variable 'gtid_slave_pos' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET gtid_slave_pos" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL gtid_slave_pos='';
+SET gtid_slave_pos='';
+ERROR HY000: Variable 'gtid_slave_pos' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION gtid_slave_pos='';
+ERROR HY000: Variable 'gtid_slave_pos' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@global.gtid_slave_pos=@global;
diff --git a/mysql-test/suite/sys_vars/r/gtid_strict_mode_grant.result b/mysql-test/suite/sys_vars/r/gtid_strict_mode_grant.result
new file mode 100644
index 00000000000..0ea4d0ab0b3
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/gtid_strict_mode_grant.result
@@ -0,0 +1,46 @@
+#
+# MDEV-21973 Bind REPLICATION {MASTER|SLAVE} ADMIN to gtid_* GLOBAL-only system variables
+#
+SET @global=@@global.gtid_strict_mode;
+# Test that "SET gtid_strict_mode" is not allowed without REPLICATION SLAVE ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE REPLICATION SLAVE ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL gtid_strict_mode=1;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, REPLICATION SLAVE ADMIN privilege(s) for this operation
+SET gtid_strict_mode=1;
+ERROR HY000: Variable 'gtid_strict_mode' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION gtid_strict_mode=1;
+ERROR HY000: Variable 'gtid_strict_mode' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET gtid_strict_mode" is allowed with REPLICATION SLAVE ADMIN
+CREATE USER user1@localhost;
+GRANT REPLICATION SLAVE ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL gtid_strict_mode=1;
+SET gtid_strict_mode=1;
+ERROR HY000: Variable 'gtid_strict_mode' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION gtid_strict_mode=1;
+ERROR HY000: Variable 'gtid_strict_mode' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET gtid_strict_mode" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL gtid_strict_mode=1;
+SET gtid_strict_mode=1;
+ERROR HY000: Variable 'gtid_strict_mode' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION gtid_strict_mode=1;
+ERROR HY000: Variable 'gtid_strict_mode' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@global.gtid_strict_mode=@global;
diff --git a/mysql-test/suite/sys_vars/r/init_connect_grant.result b/mysql-test/suite/sys_vars/r/init_connect_grant.result
new file mode 100644
index 00000000000..6c3726708f4
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/init_connect_grant.result
@@ -0,0 +1,46 @@
+SET @global=@@global.init_connect;
+#
+# MDEV-21961 Bind CONNECTION ADMIN to a number of global system variables
+#
+# Test that "SET init_connect" is not allowed without CONNECTION ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE CONNECTION ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL init_connect="SET @xxx=1";
+ERROR 42000: Access denied; you need (at least one of) the SUPER, CONNECTION ADMIN privilege(s) for this operation
+SET init_connect="SET @xxx=1";
+ERROR HY000: Variable 'init_connect' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION init_connect="SET @xxx=1";
+ERROR HY000: Variable 'init_connect' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET init_connect" is allowed with CONNECTION ADMIN
+CREATE USER user1@localhost;
+GRANT CONNECTION ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL init_connect="SET @xxx=1";
+SET init_connect="SET @xxx=1";
+ERROR HY000: Variable 'init_connect' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION init_connect="SET @xxx=1";
+ERROR HY000: Variable 'init_connect' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET init_connect" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL init_connect="SET @xxx=1";
+SET init_connect="SET @xxx=1";
+ERROR HY000: Variable 'init_connect' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION init_connect="SET @xxx=1";
+ERROR HY000: Variable 'init_connect' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@global.init_connect=@global;
diff --git a/mysql-test/suite/sys_vars/r/init_slave_grant.result b/mysql-test/suite/sys_vars/r/init_slave_grant.result
new file mode 100644
index 00000000000..59639b92482
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/init_slave_grant.result
@@ -0,0 +1,46 @@
+#
+# MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
+#
+SET @global=@@global.init_slave;
+# Test that "SET init_slave" is not allowed without REPLICATION SLAVE ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE REPLICATION SLAVE ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL init_slave='SET @x=1';
+ERROR 42000: Access denied; you need (at least one of) the SUPER, REPLICATION SLAVE ADMIN privilege(s) for this operation
+SET init_slave='SET @x=1';
+ERROR HY000: Variable 'init_slave' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION init_slave='SET @x=1';
+ERROR HY000: Variable 'init_slave' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET init_slave" is allowed with REPLICATION SLAVE ADMIN
+CREATE USER user1@localhost;
+GRANT REPLICATION SLAVE ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL init_slave='SET @x=1';
+SET init_slave='SET @x=1';
+ERROR HY000: Variable 'init_slave' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION init_slave='SET @x=1';
+ERROR HY000: Variable 'init_slave' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET init_slave" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL init_slave='SET @x=1';
+SET init_slave='SET @x=1';
+ERROR HY000: Variable 'init_slave' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION init_slave='SET @x=1';
+ERROR HY000: Variable 'init_slave' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@global.init_slave=@global;
diff --git a/mysql-test/suite/sys_vars/r/innodb_adaptive_max_sleep_delay_basic.result b/mysql-test/suite/sys_vars/r/innodb_adaptive_max_sleep_delay_basic.result
index b3ba28a4411..c5f468a7427 100644
--- a/mysql-test/suite/sys_vars/r/innodb_adaptive_max_sleep_delay_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_adaptive_max_sleep_delay_basic.result
@@ -1,37 +1,48 @@
SELECT @@GLOBAL.innodb_adaptive_max_sleep_delay;
@@GLOBAL.innodb_adaptive_max_sleep_delay
-150000
+0
150000 Expected
SET @@GLOBAL.innodb_adaptive_max_sleep_delay=100;
+Warnings:
+Warning 138 The parameter innodb_adaptive_max_sleep_delay is deprecated and has no effect.
SET @@GLOBAL.innodb_adaptive_max_sleep_delay=0;
+Warnings:
+Warning 138 The parameter innodb_adaptive_max_sleep_delay is deprecated and has no effect.
SELECT @@GLOBAL.innodb_adaptive_max_sleep_delay;
@@GLOBAL.innodb_adaptive_max_sleep_delay
0
SET @@GLOBAL.innodb_adaptive_max_sleep_delay=100000;
+Warnings:
+Warning 138 The parameter innodb_adaptive_max_sleep_delay is deprecated and has no effect.
SELECT @@GLOBAL.innodb_adaptive_max_sleep_delay;
@@GLOBAL.innodb_adaptive_max_sleep_delay
-100000
+0
SET @@GLOBAL.innodb_adaptive_max_sleep_delay=1000000;
+Warnings:
+Warning 138 The parameter innodb_adaptive_max_sleep_delay is deprecated and has no effect.
SELECT @@GLOBAL.innodb_adaptive_max_sleep_delay;
@@GLOBAL.innodb_adaptive_max_sleep_delay
-1000000
+0
SET @@GLOBAL.innodb_adaptive_max_sleep_delay=1000001;
Warnings:
Warning 1292 Truncated incorrect innodb_adaptive_max_sleep_delay value: '1000001'
+Warning 138 The parameter innodb_adaptive_max_sleep_delay is deprecated and has no effect.
SELECT @@GLOBAL.innodb_adaptive_max_sleep_delay;
@@GLOBAL.innodb_adaptive_max_sleep_delay
-1000000
+0
1000000 Expected
SET @@GLOBAL.innodb_adaptive_max_sleep_delay=4294967295;
Warnings:
Warning 1292 Truncated incorrect innodb_adaptive_max_sleep_delay value: '4294967295'
+Warning 138 The parameter innodb_adaptive_max_sleep_delay is deprecated and has no effect.
SELECT @@GLOBAL.innodb_adaptive_max_sleep_delay;
@@GLOBAL.innodb_adaptive_max_sleep_delay
-1000000
+0
1000000 Expected
SET @@GLOBAL.innodb_adaptive_max_sleep_delay=-1;
Warnings:
Warning 1292 Truncated incorrect innodb_adaptive_max_sleep_delay value: '-1'
+Warning 138 The parameter innodb_adaptive_max_sleep_delay is deprecated and has no effect.
SELECT @@GLOBAL.innodb_adaptive_max_sleep_delay;
@@GLOBAL.innodb_adaptive_max_sleep_delay
0
@@ -39,6 +50,7 @@ SELECT @@GLOBAL.innodb_adaptive_max_sleep_delay;
SET @@GLOBAL.innodb_adaptive_max_sleep_delay=-1024;
Warnings:
Warning 1292 Truncated incorrect innodb_adaptive_max_sleep_delay value: '-1024'
+Warning 138 The parameter innodb_adaptive_max_sleep_delay is deprecated and has no effect.
SELECT @@GLOBAL.innodb_adaptive_max_sleep_delay;
@@GLOBAL.innodb_adaptive_max_sleep_delay
0
@@ -70,3 +82,5 @@ Expected error 'Variable is a GLOBAL variable'
SELECT innodb_adaptive_max_sleep_delay = @@SESSION.innodb_adaptive_max_sleep_delay;
ERROR 42S22: Unknown column 'innodb_adaptive_max_sleep_delay' in 'field list'
SET @@GLOBAL.innodb_adaptive_max_sleep_delay=150000;
+Warnings:
+Warning 138 The parameter innodb_adaptive_max_sleep_delay is deprecated and has no effect.
diff --git a/mysql-test/suite/sys_vars/r/innodb_background_scrub_data_check_interval_basic.result b/mysql-test/suite/sys_vars/r/innodb_background_scrub_data_check_interval_basic.result
index 5a8734a9446..6020098acb9 100644
--- a/mysql-test/suite/sys_vars/r/innodb_background_scrub_data_check_interval_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_background_scrub_data_check_interval_basic.result
@@ -4,60 +4,74 @@ SET @start_global_value = @@global.innodb_background_scrub_data_check_interval;
#
select @@global.innodb_background_scrub_data_check_interval;
@@global.innodb_background_scrub_data_check_interval
-3600
+0
set global innodb_background_scrub_data_check_interval=10;
+Warnings:
+Warning 138 The parameter innodb_background_scrub_data_check_interval is deprecated and has no effect.
select @@global.innodb_background_scrub_data_check_interval;
@@global.innodb_background_scrub_data_check_interval
-10
+0
set global innodb_background_scrub_data_check_interval=DEFAULT;
+Warnings:
+Warning 138 The parameter innodb_background_scrub_data_check_interval is deprecated and has no effect.
select @@global.innodb_background_scrub_data_check_interval;
@@global.innodb_background_scrub_data_check_interval
-3600
+0
set global innodb_background_scrub_data_check_interval=20;
+Warnings:
+Warning 138 The parameter innodb_background_scrub_data_check_interval is deprecated and has no effect.
select @@global.innodb_background_scrub_data_check_interval;
@@global.innodb_background_scrub_data_check_interval
-20
+0
set global innodb_background_scrub_data_check_interval=DEFAULT;
+Warnings:
+Warning 138 The parameter innodb_background_scrub_data_check_interval is deprecated and has no effect.
select @@global.innodb_background_scrub_data_check_interval;
@@global.innodb_background_scrub_data_check_interval
-3600
+0
#
# exists as global only
#
select @@global.innodb_background_scrub_data_check_interval;
@@global.innodb_background_scrub_data_check_interval
-3600
+0
select @@session.innodb_background_scrub_data_check_interval;
ERROR HY000: Variable 'innodb_background_scrub_data_check_interval' is a GLOBAL variable
show global variables like 'innodb_background_scrub_data_check_interval';
Variable_name Value
-innodb_background_scrub_data_check_interval 3600
+innodb_background_scrub_data_check_interval 0
show session variables like 'innodb_background_scrub_data_check_interval';
Variable_name Value
-innodb_background_scrub_data_check_interval 3600
+innodb_background_scrub_data_check_interval 0
select * from information_schema.global_variables
where variable_name='innodb_background_scrub_data_check_interval';
VARIABLE_NAME VARIABLE_VALUE
-INNODB_BACKGROUND_SCRUB_DATA_CHECK_INTERVAL 3600
+INNODB_BACKGROUND_SCRUB_DATA_CHECK_INTERVAL 0
select * from information_schema.session_variables
where variable_name='innodb_background_scrub_data_check_interval';
VARIABLE_NAME VARIABLE_VALUE
-INNODB_BACKGROUND_SCRUB_DATA_CHECK_INTERVAL 3600
+INNODB_BACKGROUND_SCRUB_DATA_CHECK_INTERVAL 0
#
# show that it's writable
#
set global innodb_background_scrub_data_check_interval=10;
+Warnings:
+Warning 138 The parameter innodb_background_scrub_data_check_interval is deprecated and has no effect.
select @@global.innodb_background_scrub_data_check_interval;
@@global.innodb_background_scrub_data_check_interval
-10
+0
set global innodb_background_scrub_data_check_interval=20;
+Warnings:
+Warning 138 The parameter innodb_background_scrub_data_check_interval is deprecated and has no effect.
select @@global.innodb_background_scrub_data_check_interval;
@@global.innodb_background_scrub_data_check_interval
-20
+0
set global innodb_background_scrub_data_check_interval=1;
+Warnings:
+Warning 138 The parameter innodb_background_scrub_data_check_interval is deprecated and has no effect.
select @@global.innodb_background_scrub_data_check_interval;
@@global.innodb_background_scrub_data_check_interval
-1
+0
set session innodb_background_scrub_data_check_interval=1;
ERROR HY000: Variable 'innodb_background_scrub_data_check_interval' is a GLOBAL variable and should be set with SET GLOBAL
#
@@ -70,3 +84,5 @@ ERROR 42000: Incorrect argument type to variable 'innodb_background_scrub_data_c
set global innodb_background_scrub_data_check_interval="foo";
ERROR 42000: Incorrect argument type to variable 'innodb_background_scrub_data_check_interval'
SET @@global.innodb_background_scrub_data_check_interval = @start_global_value;
+Warnings:
+Warning 138 The parameter innodb_background_scrub_data_check_interval is deprecated and has no effect.
diff --git a/mysql-test/suite/sys_vars/r/innodb_background_scrub_data_compressed_basic.result b/mysql-test/suite/sys_vars/r/innodb_background_scrub_data_compressed_basic.result
index 7a1fd978bd2..cf78f063adc 100644
--- a/mysql-test/suite/sys_vars/r/innodb_background_scrub_data_compressed_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_background_scrub_data_compressed_basic.result
@@ -25,17 +25,23 @@ INNODB_BACKGROUND_SCRUB_DATA_COMPRESSED OFF
# show that it's writable
#
set global innodb_background_scrub_data_compressed=ON;
+Warnings:
+Warning 138 The parameter innodb_background_scrub_data_compressed is deprecated and has no effect.
select @@global.innodb_background_scrub_data_compressed;
@@global.innodb_background_scrub_data_compressed
-1
+0
set global innodb_background_scrub_data_compressed=OFF;
+Warnings:
+Warning 138 The parameter innodb_background_scrub_data_compressed is deprecated and has no effect.
select @@global.innodb_background_scrub_data_compressed;
@@global.innodb_background_scrub_data_compressed
0
set global innodb_background_scrub_data_compressed=1;
+Warnings:
+Warning 138 The parameter innodb_background_scrub_data_compressed is deprecated and has no effect.
select @@global.innodb_background_scrub_data_compressed;
@@global.innodb_background_scrub_data_compressed
-1
+0
set session innodb_background_scrub_data_compressed=1;
ERROR HY000: Variable 'innodb_background_scrub_data_compressed' is a GLOBAL variable and should be set with SET GLOBAL
#
@@ -48,3 +54,5 @@ ERROR 42000: Incorrect argument type to variable 'innodb_background_scrub_data_c
set global innodb_background_scrub_data_compressed="foo";
ERROR 42000: Variable 'innodb_background_scrub_data_compressed' can't be set to the value of 'foo'
SET @@global.innodb_background_scrub_data_compressed = @start_global_value;
+Warnings:
+Warning 138 The parameter innodb_background_scrub_data_compressed is deprecated and has no effect.
diff --git a/mysql-test/suite/sys_vars/r/innodb_background_scrub_data_interval_basic.result b/mysql-test/suite/sys_vars/r/innodb_background_scrub_data_interval_basic.result
index 49bbc8cd34a..338736c385e 100644
--- a/mysql-test/suite/sys_vars/r/innodb_background_scrub_data_interval_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_background_scrub_data_interval_basic.result
@@ -4,38 +4,44 @@ SET @start_global_value = @@global.innodb_background_scrub_data_interval;
#
select @@global.innodb_background_scrub_data_interval;
@@global.innodb_background_scrub_data_interval
-604800
+0
select @@session.innodb_background_scrub_data_interval;
ERROR HY000: Variable 'innodb_background_scrub_data_interval' is a GLOBAL variable
show global variables like 'innodb_background_scrub_data_interval';
Variable_name Value
-innodb_background_scrub_data_interval 604800
+innodb_background_scrub_data_interval 0
show session variables like 'innodb_background_scrub_data_interval';
Variable_name Value
-innodb_background_scrub_data_interval 604800
+innodb_background_scrub_data_interval 0
select * from information_schema.global_variables
where variable_name='innodb_background_scrub_data_interval';
VARIABLE_NAME VARIABLE_VALUE
-INNODB_BACKGROUND_SCRUB_DATA_INTERVAL 604800
+INNODB_BACKGROUND_SCRUB_DATA_INTERVAL 0
select * from information_schema.session_variables
where variable_name='innodb_background_scrub_data_interval';
VARIABLE_NAME VARIABLE_VALUE
-INNODB_BACKGROUND_SCRUB_DATA_INTERVAL 604800
+INNODB_BACKGROUND_SCRUB_DATA_INTERVAL 0
#
# show that it's writable
#
set global innodb_background_scrub_data_interval=100;
+Warnings:
+Warning 138 The parameter innodb_background_scrub_data_interval is deprecated and has no effect.
select @@global.innodb_background_scrub_data_interval;
@@global.innodb_background_scrub_data_interval
-100
+0
set global innodb_background_scrub_data_interval=200;
+Warnings:
+Warning 138 The parameter innodb_background_scrub_data_interval is deprecated and has no effect.
select @@global.innodb_background_scrub_data_interval;
@@global.innodb_background_scrub_data_interval
-200
+0
set global innodb_background_scrub_data_interval=300;
+Warnings:
+Warning 138 The parameter innodb_background_scrub_data_interval is deprecated and has no effect.
select @@global.innodb_background_scrub_data_interval;
@@global.innodb_background_scrub_data_interval
-300
+0
set session innodb_background_scrub_data_interval=400;
ERROR HY000: Variable 'innodb_background_scrub_data_interval' is a GLOBAL variable and should be set with SET GLOBAL
#
@@ -48,3 +54,5 @@ ERROR 42000: Incorrect argument type to variable 'innodb_background_scrub_data_i
set global innodb_background_scrub_data_interval="foo";
ERROR 42000: Incorrect argument type to variable 'innodb_background_scrub_data_interval'
SET @@global.innodb_background_scrub_data_interval = @start_global_value;
+Warnings:
+Warning 138 The parameter innodb_background_scrub_data_interval is deprecated and has no effect.
diff --git a/mysql-test/suite/sys_vars/r/innodb_background_scrub_data_uncompressed_basic.result b/mysql-test/suite/sys_vars/r/innodb_background_scrub_data_uncompressed_basic.result
index c85bde6493f..93337b838f9 100644
--- a/mysql-test/suite/sys_vars/r/innodb_background_scrub_data_uncompressed_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_background_scrub_data_uncompressed_basic.result
@@ -25,17 +25,23 @@ INNODB_BACKGROUND_SCRUB_DATA_UNCOMPRESSED OFF
# show that it's writable
#
set global innodb_background_scrub_data_uncompressed=ON;
+Warnings:
+Warning 138 The parameter innodb_background_scrub_data_uncompressed is deprecated and has no effect.
select @@global.innodb_background_scrub_data_uncompressed;
@@global.innodb_background_scrub_data_uncompressed
-1
+0
set global innodb_background_scrub_data_uncompressed=OFF;
+Warnings:
+Warning 138 The parameter innodb_background_scrub_data_uncompressed is deprecated and has no effect.
select @@global.innodb_background_scrub_data_uncompressed;
@@global.innodb_background_scrub_data_uncompressed
0
set global innodb_background_scrub_data_uncompressed=1;
+Warnings:
+Warning 138 The parameter innodb_background_scrub_data_uncompressed is deprecated and has no effect.
select @@global.innodb_background_scrub_data_uncompressed;
@@global.innodb_background_scrub_data_uncompressed
-1
+0
set session innodb_background_scrub_data_uncompressed=1;
ERROR HY000: Variable 'innodb_background_scrub_data_uncompressed' is a GLOBAL variable and should be set with SET GLOBAL
#
@@ -48,3 +54,5 @@ ERROR 42000: Incorrect argument type to variable 'innodb_background_scrub_data_u
set global innodb_background_scrub_data_uncompressed="foo";
ERROR 42000: Variable 'innodb_background_scrub_data_uncompressed' can't be set to the value of 'foo'
SET @@global.innodb_background_scrub_data_uncompressed = @start_global_value;
+Warnings:
+Warning 138 The parameter innodb_background_scrub_data_uncompressed is deprecated and has no effect.
diff --git a/mysql-test/suite/sys_vars/r/innodb_buffer_pool_evict_basic.result b/mysql-test/suite/sys_vars/r/innodb_buffer_pool_evict_basic.result
index 459ad95bdc6..1b8e7bf3a56 100644
--- a/mysql-test/suite/sys_vars/r/innodb_buffer_pool_evict_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_buffer_pool_evict_basic.result
@@ -1,7 +1,9 @@
SELECT @@global.innodb_buffer_pool_evict;
@@global.innodb_buffer_pool_evict
+CREATE TABLE t(a INT) ENGINE=InnoDB ROW_FORMAT=COMPRESSED;
SET GLOBAL innodb_buffer_pool_evict = 'uncompressed';
SELECT @@global.innodb_buffer_pool_evict;
@@global.innodb_buffer_pool_evict
+DROP TABLE t;
diff --git a/mysql-test/suite/sys_vars/r/innodb_checksum_algorithm_basic.result b/mysql-test/suite/sys_vars/r/innodb_checksum_algorithm_basic.result
index 5a9c201f494..29b607e46b1 100644
--- a/mysql-test/suite/sys_vars/r/innodb_checksum_algorithm_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_checksum_algorithm_basic.result
@@ -1,7 +1,7 @@
SET @orig = @@global.innodb_checksum_algorithm;
SELECT @orig;
@orig
-crc32
+full_crc32
SET GLOBAL innodb_checksum_algorithm = 'crc32';
SELECT @@global.innodb_checksum_algorithm;
@@global.innodb_checksum_algorithm
@@ -60,4 +60,4 @@ strict_full_crc32
SET GLOBAL innodb_checksum_algorithm = @orig;
SELECT @@global.innodb_checksum_algorithm;
@@global.innodb_checksum_algorithm
-crc32
+full_crc32
diff --git a/mysql-test/suite/sys_vars/r/innodb_checksums_basic.result b/mysql-test/suite/sys_vars/r/innodb_checksums_basic.result
deleted file mode 100644
index bb3cbac1863..00000000000
--- a/mysql-test/suite/sys_vars/r/innodb_checksums_basic.result
+++ /dev/null
@@ -1,53 +0,0 @@
-'#---------------------BS_STVARS_023_01----------------------#'
-SELECT COUNT(@@GLOBAL.innodb_checksums);
-COUNT(@@GLOBAL.innodb_checksums)
-1
-1 Expected
-'#---------------------BS_STVARS_023_02----------------------#'
-SET @@GLOBAL.innodb_checksums=1;
-ERROR HY000: Variable 'innodb_checksums' is a read only variable
-Expected error 'Read only variable'
-SELECT COUNT(@@GLOBAL.innodb_checksums);
-COUNT(@@GLOBAL.innodb_checksums)
-1
-1 Expected
-'#---------------------BS_STVARS_023_03----------------------#'
-SELECT IF(@@GLOBAL.innodb_checksums, "ON", "OFF") = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='innodb_checksums';
-IF(@@GLOBAL.innodb_checksums, "ON", "OFF") = VARIABLE_VALUE
-1
-1 Expected
-SELECT COUNT(@@GLOBAL.innodb_checksums);
-COUNT(@@GLOBAL.innodb_checksums)
-1
-1 Expected
-SELECT COUNT(VARIABLE_VALUE)
-FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='innodb_checksums';
-COUNT(VARIABLE_VALUE)
-1
-1 Expected
-'#---------------------BS_STVARS_023_04----------------------#'
-SELECT @@innodb_checksums = @@GLOBAL.innodb_checksums;
-@@innodb_checksums = @@GLOBAL.innodb_checksums
-1
-1 Expected
-'#---------------------BS_STVARS_023_05----------------------#'
-SELECT COUNT(@@innodb_checksums);
-COUNT(@@innodb_checksums)
-1
-1 Expected
-SELECT COUNT(@@local.innodb_checksums);
-ERROR HY000: Variable 'innodb_checksums' is a GLOBAL variable
-Expected error 'Variable is a GLOBAL variable'
-SELECT COUNT(@@SESSION.innodb_checksums);
-ERROR HY000: Variable 'innodb_checksums' is a GLOBAL variable
-Expected error 'Variable is a GLOBAL variable'
-SELECT COUNT(@@GLOBAL.innodb_checksums);
-COUNT(@@GLOBAL.innodb_checksums)
-1
-1 Expected
-SELECT innodb_checksums = @@SESSION.innodb_checksums;
-ERROR 42S22: Unknown column 'innodb_checksums' in 'field list'
-Expected error 'Readonly variable'
diff --git a/mysql-test/suite/sys_vars/r/innodb_commit_concurrency_basic.result b/mysql-test/suite/sys_vars/r/innodb_commit_concurrency_basic.result
index 474818829c5..3c1f6a7d2aa 100644
--- a/mysql-test/suite/sys_vars/r/innodb_commit_concurrency_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_commit_concurrency_basic.result
@@ -4,35 +4,49 @@ SELECT @global_start_value;
0
'#--------------------FN_DYNVARS_046_01------------------------#'
SET @@global.innodb_commit_concurrency = 0;
+Warnings:
+Warning 138 The parameter innodb_commit_concurrency is deprecated and has no effect.
SET @@global.innodb_commit_concurrency = DEFAULT;
+Warnings:
+Warning 138 The parameter innodb_commit_concurrency is deprecated and has no effect.
SELECT @@global.innodb_commit_concurrency;
@@global.innodb_commit_concurrency
0
'#---------------------FN_DYNVARS_046_02-------------------------#'
SET innodb_commit_concurrency = 1;
ERROR HY000: Variable 'innodb_commit_concurrency' is a GLOBAL variable and should be set with SET GLOBAL
+SET GLOBAL innodb_commit_concurrency = 1;
+Warnings:
+Warning 138 The parameter innodb_commit_concurrency is deprecated and has no effect.
SELECT @@innodb_commit_concurrency;
@@innodb_commit_concurrency
0
SELECT local.innodb_commit_concurrency;
ERROR 42S02: Unknown table 'local' in field list
SET global innodb_commit_concurrency = 0;
+Warnings:
+Warning 138 The parameter innodb_commit_concurrency is deprecated and has no effect.
SELECT @@global.innodb_commit_concurrency;
@@global.innodb_commit_concurrency
0
'#--------------------FN_DYNVARS_046_03------------------------#'
SET @@global.innodb_commit_concurrency = 0;
+Warnings:
+Warning 138 The parameter innodb_commit_concurrency is deprecated and has no effect.
SELECT @@global.innodb_commit_concurrency;
@@global.innodb_commit_concurrency
0
'#--------------------FN_DYNVARS_046_04-------------------------#'
-SET @@global.innodb_commit_concurrency = 1;
-ERROR 42000: Variable 'innodb_commit_concurrency' can't be set to the value of '1'
+SELECT @@global.innodb_commit_concurrency;
+@@global.innodb_commit_concurrency
+0
SELECT @@global.innodb_commit_concurrency;
@@global.innodb_commit_concurrency
0
SET @@global.innodb_commit_concurrency = -1;
-ERROR 42000: Variable 'innodb_commit_concurrency' can't be set to the value of '-1'
+Warnings:
+Warning 1292 Truncated incorrect innodb_commit_concurrency value: '-1'
+Warning 138 The parameter innodb_commit_concurrency is deprecated and has no effect.
SELECT @@global.innodb_commit_concurrency;
@@global.innodb_commit_concurrency
0
@@ -52,7 +66,9 @@ SELECT @@global.innodb_commit_concurrency;
@@global.innodb_commit_concurrency
0
SET @@global.innodb_commit_concurrency = 1001;
-ERROR 42000: Variable 'innodb_commit_concurrency' can't be set to the value of '1001'
+Warnings:
+Warning 1292 Truncated incorrect innodb_commit_concurrency value: '1001'
+Warning 138 The parameter innodb_commit_concurrency is deprecated and has no effect.
SELECT @@global.innodb_commit_concurrency;
@@global.innodb_commit_concurrency
0
@@ -82,6 +98,8 @@ SELECT @@global.innodb_commit_concurrency;
@@global.innodb_commit_concurrency
0
SET @@global.innodb_commit_concurrency = @global_start_value;
+Warnings:
+Warning 138 The parameter innodb_commit_concurrency is deprecated and has no effect.
SELECT @@global.innodb_commit_concurrency;
@@global.innodb_commit_concurrency
0
diff --git a/mysql-test/suite/sys_vars/r/innodb_concurrency_tickets_basic.result b/mysql-test/suite/sys_vars/r/innodb_concurrency_tickets_basic.result
index dd4488a97b3..5d35833dd88 100644
--- a/mysql-test/suite/sys_vars/r/innodb_concurrency_tickets_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_concurrency_tickets_basic.result
@@ -1,93 +1,103 @@
SET @global_start_value = @@global.innodb_concurrency_tickets;
SELECT @global_start_value;
@global_start_value
-5000
+0
'#--------------------FN_DYNVARS_046_01------------------------#'
SET @@global.innodb_concurrency_tickets = 0;
Warnings:
-Warning 1292 Truncated incorrect innodb_concurrency_tickets value: '0'
+Warning 138 The parameter innodb_concurrency_tickets is deprecated and has no effect.
SET @@global.innodb_concurrency_tickets = DEFAULT;
+Warnings:
+Warning 138 The parameter innodb_concurrency_tickets is deprecated and has no effect.
SELECT @@global.innodb_concurrency_tickets;
@@global.innodb_concurrency_tickets
-5000
+0
'#---------------------FN_DYNVARS_046_02-------------------------#'
SET innodb_concurrency_tickets = 1;
ERROR HY000: Variable 'innodb_concurrency_tickets' is a GLOBAL variable and should be set with SET GLOBAL
SELECT @@innodb_concurrency_tickets;
@@innodb_concurrency_tickets
-5000
+0
SELECT local.innodb_concurrency_tickets;
ERROR 42S02: Unknown table 'local' in field list
SET global innodb_concurrency_tickets = 0;
Warnings:
-Warning 1292 Truncated incorrect innodb_concurrency_tickets value: '0'
+Warning 138 The parameter innodb_concurrency_tickets is deprecated and has no effect.
SELECT @@global.innodb_concurrency_tickets;
@@global.innodb_concurrency_tickets
-1
+0
'#--------------------FN_DYNVARS_046_03------------------------#'
SET @@global.innodb_concurrency_tickets = 1;
+Warnings:
+Warning 138 The parameter innodb_concurrency_tickets is deprecated and has no effect.
SELECT @@global.innodb_concurrency_tickets;
@@global.innodb_concurrency_tickets
-1
+0
SET @@global.innodb_concurrency_tickets = 1000;
+Warnings:
+Warning 138 The parameter innodb_concurrency_tickets is deprecated and has no effect.
SELECT @@global.innodb_concurrency_tickets;
@@global.innodb_concurrency_tickets
-1000
+0
SET @@global.innodb_concurrency_tickets = 4294967295;
+Warnings:
+Warning 138 The parameter innodb_concurrency_tickets is deprecated and has no effect.
SELECT @@global.innodb_concurrency_tickets;
@@global.innodb_concurrency_tickets
-4294967295
+0
'#--------------------FN_DYNVARS_046_04-------------------------#'
SET @@global.innodb_concurrency_tickets = 4294967296;
SELECT @@global.innodb_concurrency_tickets IN (4294967296,4294967295);
@@global.innodb_concurrency_tickets IN (4294967296,4294967295)
-1
+0
SET @@global.innodb_concurrency_tickets = 12345678901;
SELECT @@global.innodb_concurrency_tickets IN (12345678901,4294967295);
@@global.innodb_concurrency_tickets IN (12345678901,4294967295)
-1
+0
SET @@global.innodb_concurrency_tickets = 18446744073709551615;
SELECT @@global.innodb_concurrency_tickets IN (18446744073709551615,4294967295);
@@global.innodb_concurrency_tickets IN (18446744073709551615,4294967295)
-1
+0
'#--------------------FN_DYNVARS_046_05-------------------------#'
SET @@global.innodb_concurrency_tickets = -1;
Warnings:
Warning 1292 Truncated incorrect innodb_concurrency_tickets value: '-1'
+Warning 138 The parameter innodb_concurrency_tickets is deprecated and has no effect.
SELECT @@global.innodb_concurrency_tickets;
@@global.innodb_concurrency_tickets
-1
+0
SET @@global.innodb_concurrency_tickets = -1024;
Warnings:
Warning 1292 Truncated incorrect innodb_concurrency_tickets value: '-1024'
+Warning 138 The parameter innodb_concurrency_tickets is deprecated and has no effect.
SELECT @@global.innodb_concurrency_tickets;
@@global.innodb_concurrency_tickets
-1
+0
SET @@global.innodb_concurrency_tickets = "T";
ERROR 42000: Incorrect argument type to variable 'innodb_concurrency_tickets'
SELECT @@global.innodb_concurrency_tickets;
@@global.innodb_concurrency_tickets
-1
+0
SET @@global.innodb_concurrency_tickets = "Y";
ERROR 42000: Incorrect argument type to variable 'innodb_concurrency_tickets'
SELECT @@global.innodb_concurrency_tickets;
@@global.innodb_concurrency_tickets
-1
+0
SET @@global.innodb_concurrency_tickets = 1.1;
ERROR 42000: Incorrect argument type to variable 'innodb_concurrency_tickets'
SELECT @@global.innodb_concurrency_tickets;
@@global.innodb_concurrency_tickets
-1
+0
SET @@global.innodb_concurrency_tickets = " ";
ERROR 42000: Incorrect argument type to variable 'innodb_concurrency_tickets'
SELECT @@global.innodb_concurrency_tickets;
@@global.innodb_concurrency_tickets
-1
+0
SET @@global.innodb_concurrency_tickets = ' ';
ERROR 42000: Incorrect argument type to variable 'innodb_concurrency_tickets'
SELECT @@global.innodb_concurrency_tickets;
@@global.innodb_concurrency_tickets
-1
+0
'#----------------------FN_DYNVARS_046_06------------------------#'
SELECT @@global.innodb_concurrency_tickets =
VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
@@ -97,34 +107,38 @@ VARIABLE_VALUE
1
SELECT @@global.innodb_concurrency_tickets;
@@global.innodb_concurrency_tickets
-1
+0
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_concurrency_tickets';
VARIABLE_VALUE
-1
+0
'#---------------------FN_DYNVARS_046_07-------------------------#'
SET @@global.innodb_concurrency_tickets = OFF;
ERROR 42000: Incorrect argument type to variable 'innodb_concurrency_tickets'
SELECT @@global.innodb_concurrency_tickets;
@@global.innodb_concurrency_tickets
-1
+0
SET @@global.innodb_concurrency_tickets = ON;
ERROR 42000: Incorrect argument type to variable 'innodb_concurrency_tickets'
SELECT @@global.innodb_concurrency_tickets;
@@global.innodb_concurrency_tickets
-1
+0
'#---------------------FN_DYNVARS_046_08----------------------#'
SET @@global.innodb_concurrency_tickets = TRUE;
+Warnings:
+Warning 138 The parameter innodb_concurrency_tickets is deprecated and has no effect.
SELECT @@global.innodb_concurrency_tickets;
@@global.innodb_concurrency_tickets
-1
+0
SET @@global.innodb_concurrency_tickets = FALSE;
Warnings:
-Warning 1292 Truncated incorrect innodb_concurrency_tickets value: '0'
+Warning 138 The parameter innodb_concurrency_tickets is deprecated and has no effect.
SELECT @@global.innodb_concurrency_tickets;
@@global.innodb_concurrency_tickets
-1
+0
SET @@global.innodb_concurrency_tickets = @global_start_value;
+Warnings:
+Warning 138 The parameter innodb_concurrency_tickets is deprecated and has no effect.
SELECT @@global.innodb_concurrency_tickets;
@@global.innodb_concurrency_tickets
-5000
+0
diff --git a/mysql-test/suite/sys_vars/r/innodb_debug_force_scrubbing_basic.result b/mysql-test/suite/sys_vars/r/innodb_debug_force_scrubbing_basic.result
deleted file mode 100644
index eced486ad70..00000000000
--- a/mysql-test/suite/sys_vars/r/innodb_debug_force_scrubbing_basic.result
+++ /dev/null
@@ -1,50 +0,0 @@
-SET @start_global_value = @@global.innodb_debug_force_scrubbing;
-#
-# exists as global only
-#
-select @@global.innodb_debug_force_scrubbing;
-@@global.innodb_debug_force_scrubbing
-0
-select @@session.innodb_debug_force_scrubbing;
-ERROR HY000: Variable 'innodb_debug_force_scrubbing' is a GLOBAL variable
-show global variables like 'innodb_debug_force_scrubbing';
-Variable_name Value
-innodb_debug_force_scrubbing OFF
-show session variables like 'innodb_debug_force_scrubbing';
-Variable_name Value
-innodb_debug_force_scrubbing OFF
-select * from information_schema.global_variables
-where variable_name='innodb_debug_force_scrubbing';
-VARIABLE_NAME VARIABLE_VALUE
-INNODB_DEBUG_FORCE_SCRUBBING OFF
-select * from information_schema.session_variables
-where variable_name='innodb_debug_force_scrubbing';
-VARIABLE_NAME VARIABLE_VALUE
-INNODB_DEBUG_FORCE_SCRUBBING OFF
-#
-# show that it's writable
-#
-set global innodb_debug_force_scrubbing=ON;
-select @@global.innodb_debug_force_scrubbing;
-@@global.innodb_debug_force_scrubbing
-1
-set global innodb_debug_force_scrubbing=OFF;
-select @@global.innodb_debug_force_scrubbing;
-@@global.innodb_debug_force_scrubbing
-0
-set global innodb_debug_force_scrubbing=1;
-select @@global.innodb_debug_force_scrubbing;
-@@global.innodb_debug_force_scrubbing
-1
-set session innodb_debug_force_scrubbing=1;
-ERROR HY000: Variable 'innodb_debug_force_scrubbing' is a GLOBAL variable and should be set with SET GLOBAL
-#
-# incorrect types
-#
-set global innodb_debug_force_scrubbing=1.1;
-ERROR 42000: Incorrect argument type to variable 'innodb_debug_force_scrubbing'
-set global innodb_debug_force_scrubbing=1e1;
-ERROR 42000: Incorrect argument type to variable 'innodb_debug_force_scrubbing'
-set global innodb_debug_force_scrubbing="foo";
-ERROR 42000: Variable 'innodb_debug_force_scrubbing' can't be set to the value of 'foo'
-SET @@global.innodb_debug_force_scrubbing = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/r/innodb_disable_background_merge_basic.result b/mysql-test/suite/sys_vars/r/innodb_disable_background_merge_basic.result
deleted file mode 100644
index c4bf621a33d..00000000000
--- a/mysql-test/suite/sys_vars/r/innodb_disable_background_merge_basic.result
+++ /dev/null
@@ -1,4 +0,0 @@
-SET @orig = @@global.innodb_disable_background_merge;
-SELECT @orig;
-@orig
-0
diff --git a/mysql-test/suite/sys_vars/r/innodb_doublewrite_batch_size_basic.result b/mysql-test/suite/sys_vars/r/innodb_doublewrite_batch_size_basic.result
deleted file mode 100644
index cec90ea8950..00000000000
--- a/mysql-test/suite/sys_vars/r/innodb_doublewrite_batch_size_basic.result
+++ /dev/null
@@ -1,24 +0,0 @@
-select @@global.innodb_doublewrite_batch_size between 1 and 127;
-@@global.innodb_doublewrite_batch_size between 1 and 127
-1
-select @@global.innodb_doublewrite_batch_size;
-@@global.innodb_doublewrite_batch_size
-120
-select @@session.innodb_doublewrite_batch_size;
-ERROR HY000: Variable 'innodb_doublewrite_batch_size' is a GLOBAL variable
-show global variables like 'innodb_doublewrite_batch_size';
-Variable_name Value
-innodb_doublewrite_batch_size 120
-show session variables like 'innodb_doublewrite_batch_size';
-Variable_name Value
-innodb_doublewrite_batch_size 120
-select * from information_schema.global_variables where variable_name='innodb_doublewrite_batch_size';
-VARIABLE_NAME VARIABLE_VALUE
-INNODB_DOUBLEWRITE_BATCH_SIZE 120
-select * from information_schema.session_variables where variable_name='innodb_doublewrite_batch_size';
-VARIABLE_NAME VARIABLE_VALUE
-INNODB_DOUBLEWRITE_BATCH_SIZE 120
-set global innodb_doublewrite_batch_size=1;
-ERROR HY000: Variable 'innodb_doublewrite_batch_size' is a read only variable
-set @@session.innodb_doublewrite_batch_size='some';
-ERROR HY000: Variable 'innodb_doublewrite_batch_size' is a read only variable
diff --git a/mysql-test/suite/sys_vars/r/innodb_flush_sync_basic.result b/mysql-test/suite/sys_vars/r/innodb_flush_sync_basic.result
index 9e3f7d95eb9..f45954ae1f8 100644
--- a/mysql-test/suite/sys_vars/r/innodb_flush_sync_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_flush_sync_basic.result
@@ -1,16 +1,11 @@
SET @start_global_value = @@global.innodb_flush_sync;
-SELECT @start_global_value;
-@start_global_value
-1
Valid values are 'ON' and 'OFF'
select @@global.innodb_flush_sync in (0, 1);
@@global.innodb_flush_sync in (0, 1)
1
-select @@global.innodb_flush_sync;
-@@global.innodb_flush_sync
-1
select @@session.innodb_flush_sync;
ERROR HY000: Variable 'innodb_flush_sync' is a GLOBAL variable
+SET GLOBAL innodb_flush_sync = ON;
show global variables like 'innodb_flush_sync';
Variable_name Value
innodb_flush_sync ON
@@ -87,6 +82,3 @@ INNODB_FLUSH_SYNC ON
set global innodb_flush_sync='AUTO';
ERROR 42000: Variable 'innodb_flush_sync' can't be set to the value of 'AUTO'
SET @@global.innodb_flush_sync = @start_global_value;
-SELECT @@global.innodb_flush_sync;
-@@global.innodb_flush_sync
-1
diff --git a/mysql-test/suite/sys_vars/r/innodb_idle_flush_pct_basic.result b/mysql-test/suite/sys_vars/r/innodb_idle_flush_pct_basic.result
deleted file mode 100644
index 915343fcff2..00000000000
--- a/mysql-test/suite/sys_vars/r/innodb_idle_flush_pct_basic.result
+++ /dev/null
@@ -1,89 +0,0 @@
-SET @start_global_value = @@global.innodb_idle_flush_pct;
-SELECT @start_global_value;
-@start_global_value
-100
-Valid values are between 0 and 100
-select @@global.innodb_idle_flush_pct between 0 and 100;
-@@global.innodb_idle_flush_pct between 0 and 100
-1
-select @@global.innodb_idle_flush_pct;
-@@global.innodb_idle_flush_pct
-100
-select @@session.innodb_idle_flush_pct;
-ERROR HY000: Variable 'innodb_idle_flush_pct' is a GLOBAL variable
-show global variables like 'innodb_idle_flush_pct';
-Variable_name Value
-innodb_idle_flush_pct 100
-show session variables like 'innodb_idle_flush_pct';
-Variable_name Value
-innodb_idle_flush_pct 100
-select * from information_schema.global_variables where variable_name='innodb_idle_flush_pct';
-VARIABLE_NAME VARIABLE_VALUE
-INNODB_IDLE_FLUSH_PCT 100
-select * from information_schema.session_variables where variable_name='innodb_idle_flush_pct';
-VARIABLE_NAME VARIABLE_VALUE
-INNODB_IDLE_FLUSH_PCT 100
-set global innodb_idle_flush_pct=10;
-Warnings:
-Warning 131 innodb_idle_flush_pct is DEPRECATED and has no effect.
-select @@global.innodb_idle_flush_pct;
-@@global.innodb_idle_flush_pct
-10
-select * from information_schema.global_variables where variable_name='innodb_idle_flush_pct';
-VARIABLE_NAME VARIABLE_VALUE
-INNODB_IDLE_FLUSH_PCT 10
-select * from information_schema.session_variables where variable_name='innodb_idle_flush_pct';
-VARIABLE_NAME VARIABLE_VALUE
-INNODB_IDLE_FLUSH_PCT 10
-set session innodb_idle_flush_pct=1;
-ERROR HY000: Variable 'innodb_idle_flush_pct' is a GLOBAL variable and should be set with SET GLOBAL
-set global innodb_idle_flush_pct=1.1;
-ERROR 42000: Incorrect argument type to variable 'innodb_idle_flush_pct'
-set global innodb_idle_flush_pct=1e1;
-ERROR 42000: Incorrect argument type to variable 'innodb_idle_flush_pct'
-set global innodb_idle_flush_pct="bar";
-ERROR 42000: Incorrect argument type to variable 'innodb_idle_flush_pct'
-set global innodb_idle_flush_pct=-7;
-Warnings:
-Warning 1292 Truncated incorrect innodb_idle_flush_pct value: '-7'
-Warning 131 innodb_idle_flush_pct is DEPRECATED and has no effect.
-select @@global.innodb_idle_flush_pct;
-@@global.innodb_idle_flush_pct
-0
-select * from information_schema.global_variables where variable_name='innodb_idle_flush_pct';
-VARIABLE_NAME VARIABLE_VALUE
-INNODB_IDLE_FLUSH_PCT 0
-set global innodb_idle_flush_pct=106;
-Warnings:
-Warning 1292 Truncated incorrect innodb_idle_flush_pct value: '106'
-Warning 131 innodb_idle_flush_pct is DEPRECATED and has no effect.
-select @@global.innodb_idle_flush_pct;
-@@global.innodb_idle_flush_pct
-100
-select * from information_schema.global_variables where variable_name='innodb_idle_flush_pct';
-VARIABLE_NAME VARIABLE_VALUE
-INNODB_IDLE_FLUSH_PCT 100
-set global innodb_idle_flush_pct=0;
-Warnings:
-Warning 131 innodb_idle_flush_pct is DEPRECATED and has no effect.
-select @@global.innodb_idle_flush_pct;
-@@global.innodb_idle_flush_pct
-0
-set global innodb_idle_flush_pct=100;
-Warnings:
-Warning 131 innodb_idle_flush_pct is DEPRECATED and has no effect.
-select @@global.innodb_idle_flush_pct;
-@@global.innodb_idle_flush_pct
-100
-set global innodb_idle_flush_pct=DEFAULT;
-Warnings:
-Warning 131 innodb_idle_flush_pct is DEPRECATED and has no effect.
-select @@global.innodb_idle_flush_pct;
-@@global.innodb_idle_flush_pct
-100
-SET @@global.innodb_idle_flush_pct = @start_global_value;
-Warnings:
-Warning 131 innodb_idle_flush_pct is DEPRECATED and has no effect.
-SELECT @@global.innodb_idle_flush_pct;
-@@global.innodb_idle_flush_pct
-100
diff --git a/mysql-test/suite/sys_vars/r/innodb_locks_unsafe_for_binlog_basic.result b/mysql-test/suite/sys_vars/r/innodb_locks_unsafe_for_binlog_basic.result
deleted file mode 100644
index c2229d54d02..00000000000
--- a/mysql-test/suite/sys_vars/r/innodb_locks_unsafe_for_binlog_basic.result
+++ /dev/null
@@ -1,53 +0,0 @@
-'#---------------------BS_STVARS_031_01----------------------#'
-SELECT COUNT(@@GLOBAL.innodb_locks_unsafe_for_binlog);
-COUNT(@@GLOBAL.innodb_locks_unsafe_for_binlog)
-1
-1 Expected
-'#---------------------BS_STVARS_031_02----------------------#'
-SET @@GLOBAL.innodb_locks_unsafe_for_binlog=1;
-ERROR HY000: Variable 'innodb_locks_unsafe_for_binlog' is a read only variable
-Expected error 'Read only variable'
-SELECT COUNT(@@GLOBAL.innodb_locks_unsafe_for_binlog);
-COUNT(@@GLOBAL.innodb_locks_unsafe_for_binlog)
-1
-1 Expected
-'#---------------------BS_STVARS_031_03----------------------#'
-SELECT IF(@@GLOBAL.innodb_locks_unsafe_for_binlog, "ON", "OFF") = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='innodb_locks_unsafe_for_binlog';
-IF(@@GLOBAL.innodb_locks_unsafe_for_binlog, "ON", "OFF") = VARIABLE_VALUE
-1
-1 Expected
-SELECT COUNT(@@GLOBAL.innodb_locks_unsafe_for_binlog);
-COUNT(@@GLOBAL.innodb_locks_unsafe_for_binlog)
-1
-1 Expected
-SELECT COUNT(VARIABLE_VALUE)
-FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='innodb_locks_unsafe_for_binlog';
-COUNT(VARIABLE_VALUE)
-1
-1 Expected
-'#---------------------BS_STVARS_031_04----------------------#'
-SELECT @@innodb_locks_unsafe_for_binlog = @@GLOBAL.innodb_locks_unsafe_for_binlog;
-@@innodb_locks_unsafe_for_binlog = @@GLOBAL.innodb_locks_unsafe_for_binlog
-1
-1 Expected
-'#---------------------BS_STVARS_031_05----------------------#'
-SELECT COUNT(@@innodb_locks_unsafe_for_binlog);
-COUNT(@@innodb_locks_unsafe_for_binlog)
-1
-1 Expected
-SELECT COUNT(@@local.innodb_locks_unsafe_for_binlog);
-ERROR HY000: Variable 'innodb_locks_unsafe_for_binlog' is a GLOBAL variable
-Expected error 'Variable is a GLOBAL variable'
-SELECT COUNT(@@SESSION.innodb_locks_unsafe_for_binlog);
-ERROR HY000: Variable 'innodb_locks_unsafe_for_binlog' is a GLOBAL variable
-Expected error 'Variable is a GLOBAL variable'
-SELECT COUNT(@@GLOBAL.innodb_locks_unsafe_for_binlog);
-COUNT(@@GLOBAL.innodb_locks_unsafe_for_binlog)
-1
-1 Expected
-SELECT innodb_locks_unsafe_for_binlog = @@SESSION.innodb_locks_unsafe_for_binlog;
-ERROR 42S22: Unknown column 'innodb_locks_unsafe_for_binlog' in 'field list'
-Expected error 'Readonly variable'
diff --git a/mysql-test/suite/sys_vars/r/innodb_log_checksums_basic.result b/mysql-test/suite/sys_vars/r/innodb_log_checksums_basic.result
index 7724ef9c2ee..bf70bbb1bea 100644
--- a/mysql-test/suite/sys_vars/r/innodb_log_checksums_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_log_checksums_basic.result
@@ -29,16 +29,22 @@ SELECT @@global.innodb_log_checksums;
1
SET GLOBAL innodb_log_checksums = OFF;
Warnings:
-Warning 138 innodb_log_checksums is deprecated and has no effect outside recovery
+Warning 138 The parameter innodb_log_checksums is deprecated and has no effect.
SELECT @@global.innodb_log_checksums;
@@global.innodb_log_checksums
1
SET GLOBAL innodb_log_checksums = default;
+Warnings:
+Warning 138 The parameter innodb_log_checksums is deprecated and has no effect.
SET GLOBAL innodb_log_checksums = ON;
+Warnings:
+Warning 138 The parameter innodb_log_checksums is deprecated and has no effect.
SELECT @@global.innodb_log_checksums;
@@global.innodb_log_checksums
1
SET GLOBAL innodb_log_checksums = @orig;
+Warnings:
+Warning 138 The parameter innodb_log_checksums is deprecated and has no effect.
SELECT @@global.innodb_log_checksums;
@@global.innodb_log_checksums
1
diff --git a/mysql-test/suite/sys_vars/r/innodb_log_compressed_pages_basic.result b/mysql-test/suite/sys_vars/r/innodb_log_compressed_pages_basic.result
index 8cb8d900b59..62c7bf73176 100644
--- a/mysql-test/suite/sys_vars/r/innodb_log_compressed_pages_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_log_compressed_pages_basic.result
@@ -9,18 +9,26 @@ COUNT(@@GLOBAL.innodb_log_compressed_pages)
1 Expected
'#---------------------BS_STVARS_028_02----------------------#'
SET @@global.innodb_log_compressed_pages = 0;
+Warnings:
+Warning 138 The parameter innodb_log_compressed_pages is deprecated and has no effect.
SELECT @@global.innodb_log_compressed_pages;
@@global.innodb_log_compressed_pages
-0
+1
SET @@global.innodb_log_compressed_pages ='On' ;
+Warnings:
+Warning 138 The parameter innodb_log_compressed_pages is deprecated and has no effect.
SELECT @@global.innodb_log_compressed_pages;
@@global.innodb_log_compressed_pages
1
SET @@global.innodb_log_compressed_pages ='Off' ;
+Warnings:
+Warning 138 The parameter innodb_log_compressed_pages is deprecated and has no effect.
SELECT @@global.innodb_log_compressed_pages;
@@global.innodb_log_compressed_pages
-0
+1
SET @@global.innodb_log_compressed_pages = 1;
+Warnings:
+Warning 138 The parameter innodb_log_compressed_pages is deprecated and has no effect.
SELECT @@global.innodb_log_compressed_pages;
@@global.innodb_log_compressed_pages
1
@@ -64,6 +72,8 @@ COUNT(@@GLOBAL.innodb_log_compressed_pages)
SELECT innodb_log_compressed_pages = @@SESSION.innodb_log_compressed_pages;
ERROR 42S22: Unknown column 'innodb_log_compressed_pages' in 'field list'
SET @@global.innodb_log_compressed_pages = @start_global_value;
+Warnings:
+Warning 138 The parameter innodb_log_compressed_pages is deprecated and has no effect.
SELECT @@global.innodb_log_compressed_pages;
@@global.innodb_log_compressed_pages
1
diff --git a/mysql-test/suite/sys_vars/r/innodb_log_optimize_ddl_basic.result b/mysql-test/suite/sys_vars/r/innodb_log_optimize_ddl_basic.result
index 72477a04cf5..45773ff8d6a 100644
--- a/mysql-test/suite/sys_vars/r/innodb_log_optimize_ddl_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_log_optimize_ddl_basic.result
@@ -7,7 +7,11 @@ ERROR HY000: Variable 'innodb_log_optimize_ddl' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT @@GLOBAL.innodb_log_optimize_ddl INTO @innodb_log_optimize_ddl_save;
SET @@GLOBAL.innodb_log_optimize_ddl = ON;
+Warnings:
+Warning 138 The parameter innodb_log_optimize_ddl is deprecated and has no effect.
SET @@GLOBAL.innodb_log_optimize_ddl = OFF;
+Warnings:
+Warning 138 The parameter innodb_log_optimize_ddl is deprecated and has no effect.
SET @@GLOBAL.innodb_log_optimize_ddl = 13;
ERROR 42000: Variable 'innodb_log_optimize_ddl' can't be set to the value of '13'
SET @@GLOBAL.innodb_log_optimize_ddl = 'ABC';
@@ -34,3 +38,5 @@ Expected error 'Variable is a GLOBAL variable'
SELECT innodb_log_optimize_ddl;
ERROR 42S22: Unknown column 'innodb_log_optimize_ddl' in 'field list'
SET GLOBAL innodb_log_optimize_ddl = @innodb_log_optimize_ddl_save;
+Warnings:
+Warning 138 The parameter innodb_log_optimize_ddl is deprecated and has no effect.
diff --git a/mysql-test/suite/sys_vars/r/innodb_max_dirty_pages_pct_basic.result b/mysql-test/suite/sys_vars/r/innodb_max_dirty_pages_pct_basic.result
index 20b619972dd..e83f528a94e 100644
--- a/mysql-test/suite/sys_vars/r/innodb_max_dirty_pages_pct_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_max_dirty_pages_pct_basic.result
@@ -17,13 +17,13 @@ SET @@global.innodb_max_dirty_pages_pct = 0;
SET @@global.innodb_max_dirty_pages_pct = DEFAULT;
SELECT @@global.innodb_max_dirty_pages_pct;
@@global.innodb_max_dirty_pages_pct
-75.000000
+90.000000
'#---------------------FN_DYNVARS_046_02-------------------------#'
SET innodb_max_dirty_pages_pct = 1;
ERROR HY000: Variable 'innodb_max_dirty_pages_pct' is a GLOBAL variable and should be set with SET GLOBAL
SELECT @@innodb_max_dirty_pages_pct;
@@innodb_max_dirty_pages_pct
-75.000000
+90.000000
SELECT local.innodb_max_dirty_pages_pct;
ERROR 42S02: Unknown table 'local' in field list
SET global innodb_max_dirty_pages_pct = 0;
diff --git a/mysql-test/suite/sys_vars/r/innodb_max_dirty_pages_pct_func.result b/mysql-test/suite/sys_vars/r/innodb_max_dirty_pages_pct_func.result
index 8b68f182789..43cdf17ee27 100644
--- a/mysql-test/suite/sys_vars/r/innodb_max_dirty_pages_pct_func.result
+++ b/mysql-test/suite/sys_vars/r/innodb_max_dirty_pages_pct_func.result
@@ -1,26 +1,28 @@
+SET @innodb_max_dirty_pages_pct_lwm = @@global.innodb_max_dirty_pages_pct_lwm;
SET @innodb_max_dirty_pages_pct = @@global.innodb_max_dirty_pages_pct;
'#--------------------FN_DYNVARS_044_02-------------------------#'
+SET @@global.innodb_max_dirty_pages_pct_lwm = 0;
SET @@global.innodb_max_dirty_pages_pct = 80;
-'connect (con1,localhost,root,,,,)'
+SET @@global.innodb_max_dirty_pages_pct_lwm = 80;
connect con1,localhost,root,,,,;
-'connection con1'
connection con1;
SELECT @@global.innodb_max_dirty_pages_pct;
@@global.innodb_max_dirty_pages_pct
80.000000
SET @@global.innodb_max_dirty_pages_pct = 70;
-'connect (con2,localhost,root,,,,)'
+Warnings:
+Warning 1210 innodb_max_dirty_pages_pct cannot be set lower than innodb_max_dirty_pages_pct_lwm.
+Warning 1210 Lowering innodb_max_dirty_page_pct_lwm to 70.000000
+SELECT @@global.innodb_max_dirty_pages_pct_lwm;
+@@global.innodb_max_dirty_pages_pct_lwm
+70.000000
connect con2,localhost,root,,,,;
-'connection con2'
connection con2;
SELECT @@global.innodb_max_dirty_pages_pct;
@@global.innodb_max_dirty_pages_pct
70.000000
-'connection default'
connection default;
-'disconnect con2'
disconnect con2;
-'disconnect con1'
disconnect con1;
SET @@global.innodb_max_dirty_pages_pct = @innodb_max_dirty_pages_pct;
'#--------------------FN_DYNVARS_044_02-------------------------#'
@@ -85,6 +87,22 @@ b CHAR(200)
) ENGINE = INNODB;
'---Check when innodb_max_dirty_pages_pct is 10---'
SET @@global.innodb_max_dirty_pages_pct = 10;
+Warnings:
+Warning 1210 innodb_max_dirty_pages_pct cannot be set lower than innodb_max_dirty_pages_pct_lwm.
+Warning 1210 Lowering innodb_max_dirty_page_pct_lwm to 10.000000
+SELECT @@global.innodb_max_dirty_pages_pct_lwm;
+@@global.innodb_max_dirty_pages_pct_lwm
+10.000000
+SET GLOBAL innodb_max_dirty_pages_pct_lwm = 15;
+Warnings:
+Warning 1210 innodb_max_dirty_pages_pct_lwm cannot be set higher than innodb_max_dirty_pages_pct.
+Warning 1210 Setting innodb_max_dirty_page_pct_lwm to 10.000000
+SELECT @@global.innodb_max_dirty_pages_pct_lwm;
+@@global.innodb_max_dirty_pages_pct_lwm
+10.000000
+SELECT @@global.innodb_max_dirty_pages_pct;
+@@global.innodb_max_dirty_pages_pct
+10.000000
FLUSH STATUS;
CALL add_until(10);
FLUSH TABLES;
@@ -98,4 +116,6 @@ DROP PROCEDURE add_until;
DROP PROCEDURE check_pct;
DROP FUNCTION dirty_pct;
DROP TABLE t1;
+SET GLOBAL innodb_max_dirty_pages_pct_lwm = 0;
SET @@global.innodb_max_dirty_pages_pct = @innodb_max_dirty_pages_pct;
+SET @@global.innodb_max_dirty_pages_pct_lwm = @innodb_max_dirty_pages_pct_lwm;
diff --git a/mysql-test/suite/sys_vars/r/innodb_page_cleaners_basic.result b/mysql-test/suite/sys_vars/r/innodb_page_cleaners_basic.result
index 3113d77668c..db9d94c5fac 100644
--- a/mysql-test/suite/sys_vars/r/innodb_page_cleaners_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_page_cleaners_basic.result
@@ -7,32 +7,40 @@ SELECT @@innodb_page_cleaners;
1
1 Expected
SET @@GLOBAL.innodb_page_cleaners=2;
+Warnings:
+Warning 138 The parameter innodb_page_cleaners is deprecated and has no effect.
Expected to pass
SELECT @@innodb_page_cleaners;
@@innodb_page_cleaners
-2
+1
2 Expected
SET @@GLOBAL.innodb_page_cleaners=1;
+Warnings:
+Warning 138 The parameter innodb_page_cleaners is deprecated and has no effect.
Expected to pass
SELECT @@innodb_page_cleaners;
@@innodb_page_cleaners
1
1 Expected
SET @@GLOBAL.innodb_page_cleaners=6;
+Warnings:
+Warning 138 The parameter innodb_page_cleaners is deprecated and has no effect.
Expected to pass
SELECT @@innodb_page_cleaners;
@@innodb_page_cleaners
-6
+1
6 Expected
SET @@GLOBAL.innodb_page_cleaners=4;
+Warnings:
+Warning 138 The parameter innodb_page_cleaners is deprecated and has no effect.
Expected to pass
SELECT @@innodb_page_cleaners;
@@innodb_page_cleaners
-4
+1
4 Expected
SET @@GLOBAL.innodb_page_cleaners=0;
Warnings:
-Warning 1292 Truncated incorrect innodb_page_cleaners value: '0'
+Warning 138 The parameter innodb_page_cleaners is deprecated and has no effect.
Warning expected
SELECT @@innodb_page_cleaners;
@@innodb_page_cleaners
diff --git a/mysql-test/suite/sys_vars/r/innodb_page_hash_locks_basic.result b/mysql-test/suite/sys_vars/r/innodb_page_hash_locks_basic.result
deleted file mode 100644
index e8915387aad..00000000000
--- a/mysql-test/suite/sys_vars/r/innodb_page_hash_locks_basic.result
+++ /dev/null
@@ -1,24 +0,0 @@
-select @@global.innodb_page_hash_locks between 1 and 1024;
-@@global.innodb_page_hash_locks between 1 and 1024
-1
-select @@global.innodb_page_hash_locks;
-@@global.innodb_page_hash_locks
-16
-select @@session.innodb_page_hash_locks;
-ERROR HY000: Variable 'innodb_page_hash_locks' is a GLOBAL variable
-show global variables like 'innodb_page_hash_locks';
-Variable_name Value
-innodb_page_hash_locks 16
-show session variables like 'innodb_page_hash_locks';
-Variable_name Value
-innodb_page_hash_locks 16
-select * from information_schema.global_variables where variable_name='innodb_page_hash_locks';
-VARIABLE_NAME VARIABLE_VALUE
-INNODB_PAGE_HASH_LOCKS 16
-select * from information_schema.session_variables where variable_name='innodb_page_hash_locks';
-VARIABLE_NAME VARIABLE_VALUE
-INNODB_PAGE_HASH_LOCKS 16
-set global innodb_page_hash_locks=1;
-ERROR HY000: Variable 'innodb_page_hash_locks' is a read only variable
-set @@session.innodb_page_hash_locks='some';
-ERROR HY000: Variable 'innodb_page_hash_locks' is a read only variable
diff --git a/mysql-test/suite/sys_vars/r/innodb_replication_delay_basic.result b/mysql-test/suite/sys_vars/r/innodb_replication_delay_basic.result
index 5e0fb425f6b..53a499ff34b 100644
--- a/mysql-test/suite/sys_vars/r/innodb_replication_delay_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_replication_delay_basic.result
@@ -24,33 +24,43 @@ select * from information_schema.session_variables where variable_name='innodb_r
VARIABLE_NAME VARIABLE_VALUE
INNODB_REPLICATION_DELAY 0
set global innodb_replication_delay=10;
+Warnings:
+Warning 138 The parameter innodb_replication_delay is deprecated and has no effect.
select @@global.innodb_replication_delay;
@@global.innodb_replication_delay
-10
+0
select * from information_schema.global_variables where variable_name='innodb_replication_delay';
VARIABLE_NAME VARIABLE_VALUE
-INNODB_REPLICATION_DELAY 10
+INNODB_REPLICATION_DELAY 0
select * from information_schema.session_variables where variable_name='innodb_replication_delay';
VARIABLE_NAME VARIABLE_VALUE
-INNODB_REPLICATION_DELAY 10
+INNODB_REPLICATION_DELAY 0
set session innodb_replication_delay=1;
ERROR HY000: Variable 'innodb_replication_delay' is a GLOBAL variable and should be set with SET GLOBAL
set global innodb_replication_delay=DEFAULT;
+Warnings:
+Warning 138 The parameter innodb_replication_delay is deprecated and has no effect.
select @@global.innodb_replication_delay;
@@global.innodb_replication_delay
0
set global innodb_replication_delay=0;
+Warnings:
+Warning 138 The parameter innodb_replication_delay is deprecated and has no effect.
select @@global.innodb_replication_delay;
@@global.innodb_replication_delay
0
set global innodb_replication_delay=65535;
+Warnings:
+Warning 138 The parameter innodb_replication_delay is deprecated and has no effect.
select @@global.innodb_replication_delay;
@@global.innodb_replication_delay
-65535
+0
set global innodb_replication_delay=4294967295;
+Warnings:
+Warning 138 The parameter innodb_replication_delay is deprecated and has no effect.
select @@global.innodb_replication_delay;
@@global.innodb_replication_delay
-4294967295
+0
set global innodb_replication_delay=1.1;
ERROR 42000: Incorrect argument type to variable 'innodb_replication_delay'
set global innodb_replication_delay=1e1;
@@ -61,21 +71,23 @@ set global innodb_replication_delay=' ';
ERROR 42000: Incorrect argument type to variable 'innodb_replication_delay'
select @@global.innodb_replication_delay;
@@global.innodb_replication_delay
-4294967295
+0
set global innodb_replication_delay=" ";
ERROR 42000: Incorrect argument type to variable 'innodb_replication_delay'
select @@global.innodb_replication_delay;
@@global.innodb_replication_delay
-4294967295
+0
set global innodb_replication_delay=-7;
Warnings:
Warning 1292 Truncated incorrect innodb_replication_delay value: '-7'
+Warning 138 The parameter innodb_replication_delay is deprecated and has no effect.
select @@global.innodb_replication_delay;
@@global.innodb_replication_delay
0
set global innodb_replication_delay=-1024;
Warnings:
Warning 1292 Truncated incorrect innodb_replication_delay value: '-1024'
+Warning 138 The parameter innodb_replication_delay is deprecated and has no effect.
select @@global.innodb_replication_delay;
@@global.innodb_replication_delay
0
@@ -85,16 +97,18 @@ INNODB_REPLICATION_DELAY 0
SET @@global.innodb_replication_delay = 4294967296;
SELECT @@global.innodb_replication_delay IN (4294967296,4294967295);
@@global.innodb_replication_delay IN (4294967296,4294967295)
-1
+0
SET @@global.innodb_replication_delay = 12345678901;
SELECT @@global.innodb_replication_delay IN (12345678901,4294967295);
@@global.innodb_replication_delay IN (12345678901,4294967295)
-1
+0
SET @@global.innodb_replication_delay = 18446744073709551615;
SELECT @@global.innodb_replication_delay IN (18446744073709551615,4294967295);
@@global.innodb_replication_delay IN (18446744073709551615,4294967295)
-1
+0
SET @@global.innodb_replication_delay = @start_global_value;
+Warnings:
+Warning 138 The parameter innodb_replication_delay is deprecated and has no effect.
SELECT @@global.innodb_replication_delay;
@@global.innodb_replication_delay
0
diff --git a/mysql-test/suite/sys_vars/r/innodb_rollback_segments_basic.result b/mysql-test/suite/sys_vars/r/innodb_rollback_segments_basic.result
deleted file mode 100644
index a8d392eee38..00000000000
--- a/mysql-test/suite/sys_vars/r/innodb_rollback_segments_basic.result
+++ /dev/null
@@ -1,64 +0,0 @@
-SET @start_global_value = @@global.innodb_rollback_segments;
-SELECT @start_global_value;
-@start_global_value
-128
-Valid values are zero or above
-SELECT @@global.innodb_rollback_segments >=0;
-@@global.innodb_rollback_segments >=0
-1
-SELECT @@global.innodb_rollback_segments <=128;
-@@global.innodb_rollback_segments <=128
-1
-SELECT @@global.innodb_rollback_segments;
-@@global.innodb_rollback_segments
-128
-SELECT @@session.innodb_rollback_segments;
-ERROR HY000: Variable 'innodb_rollback_segments' is a GLOBAL variable
-SHOW global variables LIKE 'innodb_rollback_segments';
-Variable_name Value
-innodb_rollback_segments 128
-SHOW session variables LIKE 'innodb_rollback_segments';
-Variable_name Value
-innodb_rollback_segments 128
-SELECT * FROM information_schema.global_variables
-WHERE variable_name='innodb_rollback_segments';
-VARIABLE_NAME VARIABLE_VALUE
-INNODB_ROLLBACK_SEGMENTS 128
-SELECT * FROM information_schema.session_variables
-WHERE variable_name='innodb_rollback_segments';
-VARIABLE_NAME VARIABLE_VALUE
-INNODB_ROLLBACK_SEGMENTS 128
-SET global innodb_rollback_segments=100;
-SELECT @@global.innodb_rollback_segments;
-@@global.innodb_rollback_segments
-100
-SELECT * FROM information_schema.global_variables
-WHERE variable_name='innodb_rollback_segments';
-VARIABLE_NAME VARIABLE_VALUE
-INNODB_ROLLBACK_SEGMENTS 100
-SELECT * FROM information_schema.session_variables
-WHERE variable_name='innodb_rollback_segments';
-VARIABLE_NAME VARIABLE_VALUE
-INNODB_ROLLBACK_SEGMENTS 100
-SET session innodb_rollback_segments=1;
-ERROR HY000: Variable 'innodb_rollback_segments' is a GLOBAL variable and should be set with SET GLOBAL
-SET global innodb_rollback_segments=1.1;
-ERROR 42000: Incorrect argument type to variable 'innodb_rollback_segments'
-SET global innodb_rollback_segments=1e1;
-ERROR 42000: Incorrect argument type to variable 'innodb_rollback_segments'
-SET global innodb_rollback_segments="foo";
-ERROR 42000: Incorrect argument type to variable 'innodb_rollback_segments'
-SET global innodb_rollback_segments=-7;
-Warnings:
-Warning 1292 Truncated incorrect innodb_rollback_segments value: '-7'
-SELECT @@global.innodb_rollback_segments;
-@@global.innodb_rollback_segments
-1
-SELECT * FROM information_schema.global_variables
-WHERE variable_name='innodb_rollback_segments';
-VARIABLE_NAME VARIABLE_VALUE
-INNODB_ROLLBACK_SEGMENTS 1
-SET @@global.innodb_rollback_segments = @start_global_value;
-SELECT @@global.innodb_rollback_segments;
-@@global.innodb_rollback_segments
-128
diff --git a/mysql-test/suite/sys_vars/r/innodb_scrub_log_basic.result b/mysql-test/suite/sys_vars/r/innodb_scrub_log_basic.result
index fc3a31fc5a2..f56d80455c5 100644
--- a/mysql-test/suite/sys_vars/r/innodb_scrub_log_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_scrub_log_basic.result
@@ -45,4 +45,4 @@ SELECT @@GLOBAL.innodb_scrub_log;
0 Expected
SELECT innodb_scrub_log;
ERROR 42S22: Unknown column 'innodb_scrub_log' in 'field list'
-Expected error 'Unknow column in field list'
+Expected error 'Unknown column in field list'
diff --git a/mysql-test/suite/sys_vars/r/innodb_scrub_log_speed_basic.result b/mysql-test/suite/sys_vars/r/innodb_scrub_log_speed_basic.result
index e51dab0718a..9fba89438fb 100644
--- a/mysql-test/suite/sys_vars/r/innodb_scrub_log_speed_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_scrub_log_speed_basic.result
@@ -3,12 +3,16 @@ SELECT @@GLOBAL.innodb_scrub_log_speed;
256
200 Expected
SET @@GLOBAL.innodb_scrub_log_speed=100;
+Warnings:
+Warning 138 The parameter innodb_scrub_log_speed is deprecated and has no effect.
1 Expected
SELECT @@GLOBAL.innodb_scrub_log_speed;
@@GLOBAL.innodb_scrub_log_speed
-100
+256
100 Expected
SET @@GLOBAL.innodb_scrub_log_speed=DEFAULT;
+Warnings:
+Warning 138 The parameter innodb_scrub_log_speed is deprecated and has no effect.
1 Expected
SELECT @@GLOBAL.innodb_scrub_log_speed;
@@GLOBAL.innodb_scrub_log_speed
@@ -50,4 +54,4 @@ SELECT @@GLOBAL.innodb_scrub_log_speed;
200 Expected
SELECT innodb_scrub_log_speed;
ERROR 42S22: Unknown column 'innodb_scrub_log_speed' in 'field list'
-Expected error 'Unknow column in field list'
+Expected error 'Unknown column in field list'
diff --git a/mysql-test/suite/sys_vars/r/innodb_stats_sample_pages_basic.result b/mysql-test/suite/sys_vars/r/innodb_stats_sample_pages_basic.result
deleted file mode 100644
index 8618d602922..00000000000
--- a/mysql-test/suite/sys_vars/r/innodb_stats_sample_pages_basic.result
+++ /dev/null
@@ -1,77 +0,0 @@
-SET @start_global_value = @@global.innodb_stats_sample_pages;
-SELECT @start_global_value;
-@start_global_value
-8
-Valid values are one or above
-select @@global.innodb_stats_sample_pages >=1;
-@@global.innodb_stats_sample_pages >=1
-1
-select @@global.innodb_stats_sample_pages;
-@@global.innodb_stats_sample_pages
-8
-select @@session.innodb_stats_sample_pages;
-ERROR HY000: Variable 'innodb_stats_sample_pages' is a GLOBAL variable
-show global variables like 'innodb_stats_sample_pages';
-Variable_name Value
-innodb_stats_sample_pages 8
-show session variables like 'innodb_stats_sample_pages';
-Variable_name Value
-innodb_stats_sample_pages 8
-select * from information_schema.global_variables where variable_name='innodb_stats_sample_pages';
-VARIABLE_NAME VARIABLE_VALUE
-INNODB_STATS_SAMPLE_PAGES 8
-select * from information_schema.session_variables where variable_name='innodb_stats_sample_pages';
-VARIABLE_NAME VARIABLE_VALUE
-INNODB_STATS_SAMPLE_PAGES 8
-set global innodb_stats_sample_pages=10;
-Warnings:
-Warning 131 Using innodb_stats_sample_pages is deprecated and the variable may be removed in future releases. Please use innodb_stats_transient_sample_pages instead.
-select @@global.innodb_stats_sample_pages;
-@@global.innodb_stats_sample_pages
-10
-select * from information_schema.global_variables where variable_name='innodb_stats_sample_pages';
-VARIABLE_NAME VARIABLE_VALUE
-INNODB_STATS_SAMPLE_PAGES 10
-select * from information_schema.session_variables where variable_name='innodb_stats_sample_pages';
-VARIABLE_NAME VARIABLE_VALUE
-INNODB_STATS_SAMPLE_PAGES 10
-set session innodb_stats_sample_pages=1;
-ERROR HY000: Variable 'innodb_stats_sample_pages' is a GLOBAL variable and should be set with SET GLOBAL
-set global innodb_stats_sample_pages=DEFAULT;
-Warnings:
-Warning 131 Using innodb_stats_sample_pages is deprecated and the variable may be removed in future releases. Please use innodb_stats_transient_sample_pages instead.
-select @@global.innodb_stats_sample_pages;
-@@global.innodb_stats_sample_pages
-8
-set global innodb_stats_sample_pages = 1.1;
-ERROR 42000: Incorrect argument type to variable 'innodb_stats_sample_pages'
-set global innodb_stats_sample_pages = 1e1;
-ERROR 42000: Incorrect argument type to variable 'innodb_stats_sample_pages'
-set global innodb_stats_sample_pages = "foo";
-ERROR 42000: Incorrect argument type to variable 'innodb_stats_sample_pages'
-set global innodb_stats_sample_pages=' ';
-ERROR 42000: Incorrect argument type to variable 'innodb_stats_sample_pages'
-select @@global.innodb_stats_sample_pages;
-@@global.innodb_stats_sample_pages
-8
-set global innodb_stats_sample_pages=" ";
-ERROR 42000: Incorrect argument type to variable 'innodb_stats_sample_pages'
-select @@global.innodb_stats_sample_pages;
-@@global.innodb_stats_sample_pages
-8
-set global innodb_stats_sample_pages=-7;
-Warnings:
-Warning 1292 Truncated incorrect innodb_stats_sample_pages value: '-7'
-Warning 131 Using innodb_stats_sample_pages is deprecated and the variable may be removed in future releases. Please use innodb_stats_transient_sample_pages instead.
-select @@global.innodb_stats_sample_pages;
-@@global.innodb_stats_sample_pages
-1
-select * from information_schema.global_variables where variable_name='innodb_stats_sample_pages';
-VARIABLE_NAME VARIABLE_VALUE
-INNODB_STATS_SAMPLE_PAGES 1
-SET @@global.innodb_stats_sample_pages = @start_global_value;
-Warnings:
-Warning 131 Using innodb_stats_sample_pages is deprecated and the variable may be removed in future releases. Please use innodb_stats_transient_sample_pages instead.
-SELECT @@global.innodb_stats_sample_pages;
-@@global.innodb_stats_sample_pages
-8
diff --git a/mysql-test/suite/sys_vars/r/innodb_stats_transient_sample_pages_basic.result b/mysql-test/suite/sys_vars/r/innodb_stats_transient_sample_pages_basic.result
index 4113b168f39..89000c3136b 100644
--- a/mysql-test/suite/sys_vars/r/innodb_stats_transient_sample_pages_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_stats_transient_sample_pages_basic.result
@@ -2,9 +2,9 @@ SET @start_global_value = @@global.innodb_stats_transient_sample_pages;
SELECT @start_global_value;
@start_global_value
8
-Valid values are zero or above
-SELECT @@global.innodb_stats_transient_sample_pages >=0;
-@@global.innodb_stats_transient_sample_pages >=0
+Valid values are one or above
+SELECT @@global.innodb_stats_transient_sample_pages >=1;
+@@global.innodb_stats_transient_sample_pages >=1
1
SELECT @@global.innodb_stats_transient_sample_pages;
@@global.innodb_stats_transient_sample_pages
diff --git a/mysql-test/suite/sys_vars/r/innodb_thread_concurrency_basic.result b/mysql-test/suite/sys_vars/r/innodb_thread_concurrency_basic.result
index ca3c253604a..39d1a659a20 100644
--- a/mysql-test/suite/sys_vars/r/innodb_thread_concurrency_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_thread_concurrency_basic.result
@@ -4,7 +4,11 @@ SELECT @global_start_value;
0
'#--------------------FN_DYNVARS_046_01------------------------#'
SET @@global.innodb_thread_concurrency = 0;
+Warnings:
+Warning 138 The parameter innodb_thread_concurrency is deprecated and has no effect.
SET @@global.innodb_thread_concurrency = DEFAULT;
+Warnings:
+Warning 138 The parameter innodb_thread_concurrency is deprecated and has no effect.
SELECT @@global.innodb_thread_concurrency;
@@global.innodb_thread_concurrency
0
@@ -17,26 +21,35 @@ SELECT @@innodb_thread_concurrency;
SELECT local.innodb_thread_concurrency;
ERROR 42S02: Unknown table 'local' in field list
SET global innodb_thread_concurrency = 0;
+Warnings:
+Warning 138 The parameter innodb_thread_concurrency is deprecated and has no effect.
SELECT @@global.innodb_thread_concurrency;
@@global.innodb_thread_concurrency
0
'#--------------------FN_DYNVARS_046_03------------------------#'
SET @@global.innodb_thread_concurrency = 0;
+Warnings:
+Warning 138 The parameter innodb_thread_concurrency is deprecated and has no effect.
SELECT @@global.innodb_thread_concurrency;
@@global.innodb_thread_concurrency
0
SET @@global.innodb_thread_concurrency = 1;
+Warnings:
+Warning 138 The parameter innodb_thread_concurrency is deprecated and has no effect.
SELECT @@global.innodb_thread_concurrency;
@@global.innodb_thread_concurrency
-1
+0
SET @@global.innodb_thread_concurrency = 1000;
+Warnings:
+Warning 138 The parameter innodb_thread_concurrency is deprecated and has no effect.
SELECT @@global.innodb_thread_concurrency;
@@global.innodb_thread_concurrency
-1000
+0
'#--------------------FN_DYNVARS_046_04-------------------------#'
SET @@global.innodb_thread_concurrency = -1;
Warnings:
Warning 1292 Truncated incorrect innodb_thread_concurrency value: '-1'
+Warning 138 The parameter innodb_thread_concurrency is deprecated and has no effect.
SELECT @@global.innodb_thread_concurrency;
@@global.innodb_thread_concurrency
0
@@ -63,14 +76,15 @@ SELECT @@global.innodb_thread_concurrency;
SET @@global.innodb_thread_concurrency = 1001;
Warnings:
Warning 1292 Truncated incorrect innodb_thread_concurrency value: '1001'
+Warning 138 The parameter innodb_thread_concurrency is deprecated and has no effect.
SELECT @@global.innodb_thread_concurrency;
@@global.innodb_thread_concurrency
-1000
+0
SET @@global.innodb_thread_concurrency = 255.01;
ERROR 42000: Incorrect argument type to variable 'innodb_thread_concurrency'
SELECT @@global.innodb_thread_concurrency;
@@global.innodb_thread_concurrency
-1000
+0
'#----------------------FN_DYNVARS_046_05------------------------#'
SELECT @@global.innodb_thread_concurrency =
VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
@@ -80,32 +94,38 @@ VARIABLE_VALUE
1
SELECT @@global.innodb_thread_concurrency;
@@global.innodb_thread_concurrency
-1000
+0
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_thread_concurrency';
VARIABLE_VALUE
-1000
+0
'#---------------------FN_DYNVARS_046_06-------------------------#'
SET @@global.innodb_thread_concurrency = OFF;
ERROR 42000: Incorrect argument type to variable 'innodb_thread_concurrency'
SELECT @@global.innodb_thread_concurrency;
@@global.innodb_thread_concurrency
-1000
+0
SET @@global.innodb_thread_concurrency = ON;
ERROR 42000: Incorrect argument type to variable 'innodb_thread_concurrency'
SELECT @@global.innodb_thread_concurrency;
@@global.innodb_thread_concurrency
-1000
+0
'#---------------------FN_DYNVARS_046_07----------------------#'
SET @@global.innodb_thread_concurrency = TRUE;
+Warnings:
+Warning 138 The parameter innodb_thread_concurrency is deprecated and has no effect.
SELECT @@global.innodb_thread_concurrency;
@@global.innodb_thread_concurrency
-1
+0
SET @@global.innodb_thread_concurrency = FALSE;
+Warnings:
+Warning 138 The parameter innodb_thread_concurrency is deprecated and has no effect.
SELECT @@global.innodb_thread_concurrency;
@@global.innodb_thread_concurrency
0
SET @@global.innodb_thread_concurrency = @global_start_value;
+Warnings:
+Warning 138 The parameter innodb_thread_concurrency is deprecated and has no effect.
SELECT @@global.innodb_thread_concurrency;
@@global.innodb_thread_concurrency
0
diff --git a/mysql-test/suite/sys_vars/r/innodb_thread_sleep_delay_basic.result b/mysql-test/suite/sys_vars/r/innodb_thread_sleep_delay_basic.result
index c2017ee0b66..b6310bb5652 100644
--- a/mysql-test/suite/sys_vars/r/innodb_thread_sleep_delay_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_thread_sleep_delay_basic.result
@@ -1,38 +1,40 @@
SET @start_global_value = @@global.innodb_thread_sleep_delay;
SELECT @start_global_value;
@start_global_value
-10000
+0
Valid values are zero or above
select @@global.innodb_thread_sleep_delay >=0;
@@global.innodb_thread_sleep_delay >=0
1
select @@global.innodb_thread_sleep_delay;
@@global.innodb_thread_sleep_delay
-10000
+0
select @@session.innodb_thread_sleep_delay;
ERROR HY000: Variable 'innodb_thread_sleep_delay' is a GLOBAL variable
show global variables like 'innodb_thread_sleep_delay';
Variable_name Value
-innodb_thread_sleep_delay 10000
+innodb_thread_sleep_delay 0
show session variables like 'innodb_thread_sleep_delay';
Variable_name Value
-innodb_thread_sleep_delay 10000
+innodb_thread_sleep_delay 0
select * from information_schema.global_variables where variable_name='innodb_thread_sleep_delay';
VARIABLE_NAME VARIABLE_VALUE
-INNODB_THREAD_SLEEP_DELAY 10000
+INNODB_THREAD_SLEEP_DELAY 0
select * from information_schema.session_variables where variable_name='innodb_thread_sleep_delay';
VARIABLE_NAME VARIABLE_VALUE
-INNODB_THREAD_SLEEP_DELAY 10000
+INNODB_THREAD_SLEEP_DELAY 0
set global innodb_thread_sleep_delay=10;
+Warnings:
+Warning 138 The parameter innodb_thread_sleep_delay is deprecated and has no effect.
select @@global.innodb_thread_sleep_delay;
@@global.innodb_thread_sleep_delay
-10
+0
select * from information_schema.global_variables where variable_name='innodb_thread_sleep_delay';
VARIABLE_NAME VARIABLE_VALUE
-INNODB_THREAD_SLEEP_DELAY 10
+INNODB_THREAD_SLEEP_DELAY 0
select * from information_schema.session_variables where variable_name='innodb_thread_sleep_delay';
VARIABLE_NAME VARIABLE_VALUE
-INNODB_THREAD_SLEEP_DELAY 10
+INNODB_THREAD_SLEEP_DELAY 0
set session innodb_thread_sleep_delay=1;
ERROR HY000: Variable 'innodb_thread_sleep_delay' is a GLOBAL variable and should be set with SET GLOBAL
set global innodb_thread_sleep_delay=1.1;
@@ -45,9 +47,11 @@ set global innodb_thread_sleep_delay=18446744073709551616;
Warnings:
Warning 1916 Got overflow when converting '18446744073709551616' to INT. Value truncated
Warning 1292 Truncated incorrect innodb_thread_sleep_delay value: '9223372036854775807'
+Warning 138 The parameter innodb_thread_sleep_delay is deprecated and has no effect.
set global innodb_thread_sleep_delay=-7;
Warnings:
Warning 1292 Truncated incorrect innodb_thread_sleep_delay value: '-7'
+Warning 138 The parameter innodb_thread_sleep_delay is deprecated and has no effect.
select @@global.innodb_thread_sleep_delay;
@@global.innodb_thread_sleep_delay
0
@@ -55,34 +59,46 @@ select * from information_schema.global_variables where variable_name='innodb_th
VARIABLE_NAME VARIABLE_VALUE
INNODB_THREAD_SLEEP_DELAY 0
set global innodb_thread_sleep_delay=0;
+Warnings:
+Warning 138 The parameter innodb_thread_sleep_delay is deprecated and has no effect.
select @@global.innodb_thread_sleep_delay;
@@global.innodb_thread_sleep_delay
0
set global innodb_thread_sleep_delay=1000;
+Warnings:
+Warning 138 The parameter innodb_thread_sleep_delay is deprecated and has no effect.
select @@global.innodb_thread_sleep_delay;
@@global.innodb_thread_sleep_delay
-1000
+0
set global innodb_thread_sleep_delay=1000000;
+Warnings:
+Warning 138 The parameter innodb_thread_sleep_delay is deprecated and has no effect.
select @@global.innodb_thread_sleep_delay;
@@global.innodb_thread_sleep_delay
-1000000
+0
set global innodb_thread_sleep_delay=1000001;
Warnings:
Warning 1292 Truncated incorrect innodb_thread_sleep_delay value: '1000001'
+Warning 138 The parameter innodb_thread_sleep_delay is deprecated and has no effect.
select @@global.innodb_thread_sleep_delay;
@@global.innodb_thread_sleep_delay
-1000000
+0
set global innodb_thread_sleep_delay=4294967295;
Warnings:
Warning 1292 Truncated incorrect innodb_thread_sleep_delay value: '4294967295'
+Warning 138 The parameter innodb_thread_sleep_delay is deprecated and has no effect.
select @@global.innodb_thread_sleep_delay;
@@global.innodb_thread_sleep_delay
-1000000
+0
set global innodb_thread_sleep_delay=555;
+Warnings:
+Warning 138 The parameter innodb_thread_sleep_delay is deprecated and has no effect.
select @@global.innodb_thread_sleep_delay;
@@global.innodb_thread_sleep_delay
-555
+0
SET @@global.innodb_thread_sleep_delay = @start_global_value;
+Warnings:
+Warning 138 The parameter innodb_thread_sleep_delay is deprecated and has no effect.
SELECT @@global.innodb_thread_sleep_delay;
@@global.innodb_thread_sleep_delay
-10000
+0
diff --git a/mysql-test/suite/sys_vars/r/innodb_undo_logs_basic.result b/mysql-test/suite/sys_vars/r/innodb_undo_logs_basic.result
index 1310d7151fd..d6ff67ccc7d 100644
--- a/mysql-test/suite/sys_vars/r/innodb_undo_logs_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_undo_logs_basic.result
@@ -1,68 +1,44 @@
-SELECT @@GLOBAL.innodb_undo_logs;
-@@GLOBAL.innodb_undo_logs
+SELECT @@global.innodb_undo_logs;
+@@global.innodb_undo_logs
128
-128 Expected
-SET @@GLOBAL.innodb_undo_logs=128;
-SELECT COUNT(@@GLOBAL.innodb_undo_logs);
-COUNT(@@GLOBAL.innodb_undo_logs)
-1
-1 Expected
-SELECT VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='innodb_undo_logs';
-VARIABLE_VALUE
-128
-128 Expected
-SELECT @@innodb_undo_logs = @@GLOBAL.innodb_undo_logs;
-@@innodb_undo_logs = @@GLOBAL.innodb_undo_logs
-1
-1 Expected
-SELECT COUNT(@@innodb_undo_logs);
-COUNT(@@innodb_undo_logs)
-1
-1 Expected
-SELECT COUNT(@@local.innodb_undo_logs);
-ERROR HY000: Variable 'innodb_undo_logs' is a GLOBAL variable
-Expected error 'Variable is a GLOBAL variable'
-SELECT COUNT(@@SESSION.innodb_undo_logs);
+SELECT @@session.innodb_undo_logs;
ERROR HY000: Variable 'innodb_undo_logs' is a GLOBAL variable
-Expected error 'Variable is a GLOBAL variable'
-SELECT innodb_undo_logs = @@SESSION.innodb_undo_logs;
-ERROR 42S22: Unknown column 'innodb_undo_logs' in 'field list'
-Begin bug 13604034
-select @@innodb_undo_logs;
-@@innodb_undo_logs
-128
-128 Expected
-set global innodb_undo_logs = 129;
+SHOW global variables LIKE 'innodb_undo_logs';
+Variable_name Value
+innodb_undo_logs 128
+SHOW session variables LIKE 'innodb_undo_logs';
+Variable_name Value
+innodb_undo_logs 128
+SELECT * FROM information_schema.global_variables
+WHERE variable_name='innodb_undo_logs';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_UNDO_LOGS 128
+SELECT * FROM information_schema.session_variables
+WHERE variable_name='innodb_undo_logs';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_UNDO_LOGS 128
+SET global innodb_undo_logs=100;
Warnings:
-Warning 1292 Truncated incorrect innodb_undo_logs value: '129'
-select @@innodb_undo_logs;
-@@innodb_undo_logs
+Warning 138 The parameter innodb_undo_logs is deprecated and has no effect.
+SELECT @@global.innodb_undo_logs;
+@@global.innodb_undo_logs
128
-128 Expected
-set global innodb_undo_logs = 0;
-Warnings:
-Warning 1292 Truncated incorrect innodb_undo_logs value: '0'
-select @@innodb_undo_logs;
-@@innodb_undo_logs
-1
-1 Expected
-set global innodb_undo_logs = -1;
+SET session innodb_undo_logs=1;
+ERROR HY000: Variable 'innodb_undo_logs' is a GLOBAL variable and should be set with SET GLOBAL
+SET global innodb_undo_logs=1.1;
+ERROR 42000: Incorrect argument type to variable 'innodb_undo_logs'
+SET global innodb_undo_logs=1e1;
+ERROR 42000: Incorrect argument type to variable 'innodb_undo_logs'
+SET global innodb_undo_logs="foo";
+ERROR 42000: Incorrect argument type to variable 'innodb_undo_logs'
+SET global innodb_undo_logs=-7;
Warnings:
-Warning 1292 Truncated incorrect innodb_undo_logs value: '-1'
-select @@innodb_undo_logs;
-@@innodb_undo_logs
-1
-1 Expected
-set global innodb_undo_logs = 50;
-select @@innodb_undo_logs;
-@@innodb_undo_logs
-50
-50 Expected
-set global innodb_undo_logs = default;
-select @@innodb_undo_logs;
-@@innodb_undo_logs
+Warning 1292 Truncated incorrect innodb_undo_logs value: '-7'
+Warning 138 The parameter innodb_undo_logs is deprecated and has no effect.
+SELECT @@global.innodb_undo_logs;
+@@global.innodb_undo_logs
128
-128 Expected
-End bug 13604034
+SELECT * FROM information_schema.global_variables
+WHERE variable_name='innodb_undo_logs';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_UNDO_LOGS 128
diff --git a/mysql-test/suite/sys_vars/r/local_infile_func.result b/mysql-test/suite/sys_vars/r/local_infile_func.result
index 1c116090f88..9b41f715d11 100644
--- a/mysql-test/suite/sys_vars/r/local_infile_func.result
+++ b/mysql-test/suite/sys_vars/r/local_infile_func.result
@@ -29,7 +29,7 @@ DROP TABLE IF EXISTS t1;
create table t1(a int);
LOAD DATA LOCAL INFILE
'MYSQLTEST_VARDIR/std_data/numbers.txt' INTO TABLE test.t1;
-ERROR 42000: The used command is not allowed with this MariaDB version
+ERROR HY000: The used command is not allowed because the MariaDB server or client has disabled the local infile capability
SELECT count(*) from t1;
count(*)
0
diff --git a/mysql-test/suite/sys_vars/r/log_bin_compress_grant.result b/mysql-test/suite/sys_vars/r/log_bin_compress_grant.result
new file mode 100644
index 00000000000..f75f22a75f8
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/log_bin_compress_grant.result
@@ -0,0 +1,46 @@
+#
+# MDEV-21963 Bind BINLOG ADMIN to a number of global system variables
+#
+SET @global=@@global.log_bin_compress;
+# Test that "SET log_bin_compress" is not allowed without BINLOG ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE BINLOG ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL log_bin_compress=1;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, BINLOG ADMIN privilege(s) for this operation
+SET log_bin_compress=1;
+ERROR HY000: Variable 'log_bin_compress' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION log_bin_compress=1;
+ERROR HY000: Variable 'log_bin_compress' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET log_bin_compress" is allowed with BINLOG ADMIN
+CREATE USER user1@localhost;
+GRANT BINLOG ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL log_bin_compress=1;
+SET log_bin_compress=1;
+ERROR HY000: Variable 'log_bin_compress' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION log_bin_compress=1;
+ERROR HY000: Variable 'log_bin_compress' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET log_bin_compress" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL log_bin_compress=1;
+SET log_bin_compress=1;
+ERROR HY000: Variable 'log_bin_compress' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION log_bin_compress=1;
+ERROR HY000: Variable 'log_bin_compress' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@global.log_bin_compress=@global;
diff --git a/mysql-test/suite/sys_vars/r/log_bin_compress_min_len_grant.result b/mysql-test/suite/sys_vars/r/log_bin_compress_min_len_grant.result
new file mode 100644
index 00000000000..b1ccafb1dd2
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/log_bin_compress_min_len_grant.result
@@ -0,0 +1,46 @@
+#
+# MDEV-21963 Bind BINLOG ADMIN to a number of global system variables
+#
+SET @global=@@global.log_bin_compress_min_len;
+# Test that "SET log_bin_compress_min_len" is not allowed without BINLOG ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE BINLOG ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL log_bin_compress_min_len=512;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, BINLOG ADMIN privilege(s) for this operation
+SET log_bin_compress_min_len=512;
+ERROR HY000: Variable 'log_bin_compress_min_len' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION log_bin_compress_min_len=512;
+ERROR HY000: Variable 'log_bin_compress_min_len' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET log_bin_compress_min_len" is allowed with BINLOG ADMIN
+CREATE USER user1@localhost;
+GRANT BINLOG ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL log_bin_compress_min_len=512;
+SET log_bin_compress_min_len=512;
+ERROR HY000: Variable 'log_bin_compress_min_len' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION log_bin_compress_min_len=512;
+ERROR HY000: Variable 'log_bin_compress_min_len' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET log_bin_compress_min_len" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL log_bin_compress_min_len=512;
+SET log_bin_compress_min_len=512;
+ERROR HY000: Variable 'log_bin_compress_min_len' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION log_bin_compress_min_len=512;
+ERROR HY000: Variable 'log_bin_compress_min_len' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@global.log_bin_compress_min_len=@global;
diff --git a/mysql-test/suite/sys_vars/r/log_bin_trust_function_creators_grant.result b/mysql-test/suite/sys_vars/r/log_bin_trust_function_creators_grant.result
new file mode 100644
index 00000000000..ef9af94d8f6
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/log_bin_trust_function_creators_grant.result
@@ -0,0 +1,46 @@
+#
+# MDEV-21963 Bind BINLOG ADMIN to a number of global system variables
+#
+SET @global=@@global.log_bin_trust_function_creators;
+# Test that "SET log_bin_trust_function_creators" is not allowed without BINLOG ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE BINLOG ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL log_bin_trust_function_creators=1;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, BINLOG ADMIN privilege(s) for this operation
+SET log_bin_trust_function_creators=1;
+ERROR HY000: Variable 'log_bin_trust_function_creators' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION log_bin_trust_function_creators=1;
+ERROR HY000: Variable 'log_bin_trust_function_creators' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET log_bin_trust_function_creators" is allowed with BINLOG ADMIN
+CREATE USER user1@localhost;
+GRANT BINLOG ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL log_bin_trust_function_creators=1;
+SET log_bin_trust_function_creators=1;
+ERROR HY000: Variable 'log_bin_trust_function_creators' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION log_bin_trust_function_creators=1;
+ERROR HY000: Variable 'log_bin_trust_function_creators' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET log_bin_trust_function_creators" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL log_bin_trust_function_creators=1;
+SET log_bin_trust_function_creators=1;
+ERROR HY000: Variable 'log_bin_trust_function_creators' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION log_bin_trust_function_creators=1;
+ERROR HY000: Variable 'log_bin_trust_function_creators' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@global.log_bin_trust_function_creators=@global;
diff --git a/mysql-test/suite/sys_vars/r/master_verify_checksum_grant.result b/mysql-test/suite/sys_vars/r/master_verify_checksum_grant.result
new file mode 100644
index 00000000000..4791e4cd7e0
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/master_verify_checksum_grant.result
@@ -0,0 +1,46 @@
+#
+# MDEV-21972 Bind REPLICATION MASTER ADMIN to master_verify_checksum
+#
+SET @global=@@global.master_verify_checksum;
+# Test that "SET master_verify_checksum" is not allowed without REPLICATION MASTER ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE REPLICATION MASTER ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL master_verify_checksum=1;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, REPLICATION MASTER ADMIN privilege(s) for this operation
+SET master_verify_checksum=1;
+ERROR HY000: Variable 'master_verify_checksum' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION master_verify_checksum=1;
+ERROR HY000: Variable 'master_verify_checksum' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET master_verify_checksum" is allowed with REPLICATION MASTER ADMIN
+CREATE USER user1@localhost;
+GRANT REPLICATION MASTER ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL master_verify_checksum=1;
+SET master_verify_checksum=1;
+ERROR HY000: Variable 'master_verify_checksum' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION master_verify_checksum=1;
+ERROR HY000: Variable 'master_verify_checksum' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET master_verify_checksum" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL master_verify_checksum=1;
+SET master_verify_checksum=1;
+ERROR HY000: Variable 'master_verify_checksum' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION master_verify_checksum=1;
+ERROR HY000: Variable 'master_verify_checksum' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@global.master_verify_checksum=@global;
diff --git a/mysql-test/suite/sys_vars/r/max_binlog_cache_size_grant.result b/mysql-test/suite/sys_vars/r/max_binlog_cache_size_grant.result
new file mode 100644
index 00000000000..350194c46cc
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/max_binlog_cache_size_grant.result
@@ -0,0 +1,46 @@
+#
+# MDEV-21963 Bind BINLOG ADMIN to a number of global system variables
+#
+SET @global=@@global.max_binlog_cache_size;
+# Test that "SET max_binlog_cache_size" is not allowed without BINLOG ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE BINLOG ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL max_binlog_cache_size=4096;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, BINLOG ADMIN privilege(s) for this operation
+SET max_binlog_cache_size=4096;
+ERROR HY000: Variable 'max_binlog_cache_size' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION max_binlog_cache_size=4096;
+ERROR HY000: Variable 'max_binlog_cache_size' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET max_binlog_cache_size" is allowed with BINLOG ADMIN
+CREATE USER user1@localhost;
+GRANT BINLOG ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL max_binlog_cache_size=4096;
+SET max_binlog_cache_size=4096;
+ERROR HY000: Variable 'max_binlog_cache_size' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION max_binlog_cache_size=4096;
+ERROR HY000: Variable 'max_binlog_cache_size' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET max_binlog_cache_size" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL max_binlog_cache_size=4096;
+SET max_binlog_cache_size=4096;
+ERROR HY000: Variable 'max_binlog_cache_size' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION max_binlog_cache_size=4096;
+ERROR HY000: Variable 'max_binlog_cache_size' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@global.max_binlog_cache_size=@global;
diff --git a/mysql-test/suite/sys_vars/r/max_binlog_size_grant.result b/mysql-test/suite/sys_vars/r/max_binlog_size_grant.result
new file mode 100644
index 00000000000..34e1fde76fe
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/max_binlog_size_grant.result
@@ -0,0 +1,46 @@
+#
+# MDEV-21963 Bind BINLOG ADMIN to a number of global system variables
+#
+SET @global=@@global.max_binlog_size;
+# Test that "SET max_binlog_size" is not allowed without BINLOG ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE BINLOG ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL max_binlog_size=4096;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, BINLOG ADMIN privilege(s) for this operation
+SET max_binlog_size=4096;
+ERROR HY000: Variable 'max_binlog_size' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION max_binlog_size=4096;
+ERROR HY000: Variable 'max_binlog_size' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET max_binlog_size" is allowed with BINLOG ADMIN
+CREATE USER user1@localhost;
+GRANT BINLOG ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL max_binlog_size=4096;
+SET max_binlog_size=4096;
+ERROR HY000: Variable 'max_binlog_size' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION max_binlog_size=4096;
+ERROR HY000: Variable 'max_binlog_size' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET max_binlog_size" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL max_binlog_size=4096;
+SET max_binlog_size=4096;
+ERROR HY000: Variable 'max_binlog_size' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION max_binlog_size=4096;
+ERROR HY000: Variable 'max_binlog_size' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@global.max_binlog_size=@global;
diff --git a/mysql-test/suite/sys_vars/r/max_binlog_stmt_cache_size_grant.result b/mysql-test/suite/sys_vars/r/max_binlog_stmt_cache_size_grant.result
new file mode 100644
index 00000000000..2ddd164f7c1
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/max_binlog_stmt_cache_size_grant.result
@@ -0,0 +1,46 @@
+#
+# MDEV-21963 Bind BINLOG ADMIN to a number of global system variables
+#
+SET @global=@@global.max_binlog_stmt_cache_size;
+# Test that "SET max_binlog_stmt_cache_size" is not allowed without BINLOG ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE BINLOG ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL max_binlog_stmt_cache_size=4096;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, BINLOG ADMIN privilege(s) for this operation
+SET max_binlog_stmt_cache_size=4096;
+ERROR HY000: Variable 'max_binlog_stmt_cache_size' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION max_binlog_stmt_cache_size=4096;
+ERROR HY000: Variable 'max_binlog_stmt_cache_size' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET max_binlog_stmt_cache_size" is allowed with BINLOG ADMIN
+CREATE USER user1@localhost;
+GRANT BINLOG ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL max_binlog_stmt_cache_size=4096;
+SET max_binlog_stmt_cache_size=4096;
+ERROR HY000: Variable 'max_binlog_stmt_cache_size' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION max_binlog_stmt_cache_size=4096;
+ERROR HY000: Variable 'max_binlog_stmt_cache_size' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET max_binlog_stmt_cache_size" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL max_binlog_stmt_cache_size=4096;
+SET max_binlog_stmt_cache_size=4096;
+ERROR HY000: Variable 'max_binlog_stmt_cache_size' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION max_binlog_stmt_cache_size=4096;
+ERROR HY000: Variable 'max_binlog_stmt_cache_size' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@global.max_binlog_stmt_cache_size=@global;
diff --git a/mysql-test/suite/sys_vars/r/max_connect_errors_grant.result b/mysql-test/suite/sys_vars/r/max_connect_errors_grant.result
new file mode 100644
index 00000000000..527a4ecaf72
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/max_connect_errors_grant.result
@@ -0,0 +1,46 @@
+SET @global=@@global.max_connect_errors;
+#
+# MDEV-21961 Bind CONNECTION ADMIN to a number of global system variables
+#
+# Test that "SET max_connect_errors" is not allowed without CONNECTION ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE CONNECTION ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL max_connect_errors=10;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, CONNECTION ADMIN privilege(s) for this operation
+SET max_connect_errors=10;
+ERROR HY000: Variable 'max_connect_errors' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION max_connect_errors=10;
+ERROR HY000: Variable 'max_connect_errors' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET max_connect_errors" is allowed with CONNECTION ADMIN
+CREATE USER user1@localhost;
+GRANT CONNECTION ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL max_connect_errors=10;
+SET max_connect_errors=10;
+ERROR HY000: Variable 'max_connect_errors' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION max_connect_errors=10;
+ERROR HY000: Variable 'max_connect_errors' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET max_connect_errors" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL max_connect_errors=10;
+SET max_connect_errors=10;
+ERROR HY000: Variable 'max_connect_errors' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION max_connect_errors=10;
+ERROR HY000: Variable 'max_connect_errors' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@global.max_connect_errors=@global;
diff --git a/mysql-test/suite/sys_vars/r/max_connections_grant.result b/mysql-test/suite/sys_vars/r/max_connections_grant.result
new file mode 100644
index 00000000000..e55904d4cc1
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/max_connections_grant.result
@@ -0,0 +1,46 @@
+SET @global=@@global.max_connections;
+#
+# MDEV-21961 Bind CONNECTION ADMIN to a number of global system variables
+#
+# Test that "SET max_connections" is not allowed without CONNECTION ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE CONNECTION ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL max_connections=10;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, CONNECTION ADMIN privilege(s) for this operation
+SET max_connections=10;
+ERROR HY000: Variable 'max_connections' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION max_connections=10;
+ERROR HY000: Variable 'max_connections' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET max_connections" is allowed with CONNECTION ADMIN
+CREATE USER user1@localhost;
+GRANT CONNECTION ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL max_connections=10;
+SET max_connections=10;
+ERROR HY000: Variable 'max_connections' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION max_connections=10;
+ERROR HY000: Variable 'max_connections' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET max_connections" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL max_connections=10;
+SET max_connections=10;
+ERROR HY000: Variable 'max_connections' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION max_connections=10;
+ERROR HY000: Variable 'max_connections' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@global.max_connections=@global;
diff --git a/mysql-test/suite/sys_vars/r/max_long_data_size_basic.result b/mysql-test/suite/sys_vars/r/max_long_data_size_basic.result
deleted file mode 100644
index 679a0d3611f..00000000000
--- a/mysql-test/suite/sys_vars/r/max_long_data_size_basic.result
+++ /dev/null
@@ -1,14 +0,0 @@
-select @@global.max_long_data_size=20;
-@@global.max_long_data_size=20
-0
-select @@session.max_long_data_size;
-ERROR HY000: Variable 'max_long_data_size' is a GLOBAL variable
-SELECT @@global.max_long_data_size = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='max_long_data_size';
-@@global.max_long_data_size = VARIABLE_VALUE
-1
-set global max_long_data_size=1;
-ERROR HY000: Variable 'max_long_data_size' is a read only variable
-set session max_long_data_size=1;
-ERROR HY000: Variable 'max_long_data_size' is a read only variable
diff --git a/mysql-test/suite/sys_vars/r/max_password_errors_grant.result b/mysql-test/suite/sys_vars/r/max_password_errors_grant.result
new file mode 100644
index 00000000000..4ae0dfb887a
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/max_password_errors_grant.result
@@ -0,0 +1,46 @@
+SET @global=@@global.max_password_errors;
+#
+# MDEV-21961 Bind CONNECTION ADMIN to a number of global system variables
+#
+# Test that "SET max_password_errors" is not allowed without CONNECTION ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE CONNECTION ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL max_password_errors=10;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, CONNECTION ADMIN privilege(s) for this operation
+SET max_password_errors=10;
+ERROR HY000: Variable 'max_password_errors' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION max_password_errors=10;
+ERROR HY000: Variable 'max_password_errors' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET max_password_errors" is allowed with CONNECTION ADMIN
+CREATE USER user1@localhost;
+GRANT CONNECTION ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL max_password_errors=10;
+SET max_password_errors=10;
+ERROR HY000: Variable 'max_password_errors' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION max_password_errors=10;
+ERROR HY000: Variable 'max_password_errors' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET max_password_errors" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL max_password_errors=10;
+SET max_password_errors=10;
+ERROR HY000: Variable 'max_password_errors' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION max_password_errors=10;
+ERROR HY000: Variable 'max_password_errors' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@global.max_password_errors=@global;
diff --git a/mysql-test/suite/sys_vars/r/multi_range_count_basic.result b/mysql-test/suite/sys_vars/r/multi_range_count_basic.result
deleted file mode 100644
index 67ea0f7d03a..00000000000
--- a/mysql-test/suite/sys_vars/r/multi_range_count_basic.result
+++ /dev/null
@@ -1,233 +0,0 @@
-SET @start_global_value = @@global.multi_range_count;
-SELECT @start_global_value;
-@start_global_value
-256
-SET @start_session_value = @@session.multi_range_count;
-SELECT @start_session_value;
-@start_session_value
-256
-'#--------------------FN_DYNVARS_090_01-------------------------#'
-SET @@global.multi_range_count = 100;
-Warnings:
-Warning 1287 '@@multi_range_count' is deprecated and will be removed in a future release. Please use '@@mrr_buffer_size' instead
-SET @@global.multi_range_count = DEFAULT;
-Warnings:
-Warning 1287 '@@multi_range_count' is deprecated and will be removed in a future release. Please use '@@mrr_buffer_size' instead
-SELECT @@global.multi_range_count;
-@@global.multi_range_count
-256
-SET @@session.multi_range_count = 200;
-Warnings:
-Warning 1287 '@@multi_range_count' is deprecated and will be removed in a future release. Please use '@@mrr_buffer_size' instead
-SET @@session.multi_range_count = DEFAULT;
-Warnings:
-Warning 1287 '@@multi_range_count' is deprecated and will be removed in a future release. Please use '@@mrr_buffer_size' instead
-SELECT @@session.multi_range_count;
-@@session.multi_range_count
-256
-'#--------------------FN_DYNVARS_090_02-------------------------#'
-SET @@global.multi_range_count = DEFAULT;
-Warnings:
-Warning 1287 '@@multi_range_count' is deprecated and will be removed in a future release. Please use '@@mrr_buffer_size' instead
-SELECT @@global.multi_range_count = 256;
-@@global.multi_range_count = 256
-1
-SET @@session.multi_range_count = DEFAULT;
-Warnings:
-Warning 1287 '@@multi_range_count' is deprecated and will be removed in a future release. Please use '@@mrr_buffer_size' instead
-SELECT @@session.multi_range_count = 256;
-@@session.multi_range_count = 256
-1
-'#--------------------FN_DYNVARS_090_03-------------------------#'
-SET @@global.multi_range_count = 1;
-Warnings:
-Warning 1287 '@@multi_range_count' is deprecated and will be removed in a future release. Please use '@@mrr_buffer_size' instead
-SELECT @@global.multi_range_count;
-@@global.multi_range_count
-1
-SET @@global.multi_range_count = 60020;
-Warnings:
-Warning 1287 '@@multi_range_count' is deprecated and will be removed in a future release. Please use '@@mrr_buffer_size' instead
-SELECT @@global.multi_range_count;
-@@global.multi_range_count
-60020
-SET @@global.multi_range_count = 65535;
-Warnings:
-Warning 1287 '@@multi_range_count' is deprecated and will be removed in a future release. Please use '@@mrr_buffer_size' instead
-SELECT @@global.multi_range_count;
-@@global.multi_range_count
-65535
-SET @@global.multi_range_count = 4294967295;
-Warnings:
-Warning 1287 '@@multi_range_count' is deprecated and will be removed in a future release. Please use '@@mrr_buffer_size' instead
-SELECT @@global.multi_range_count;
-@@global.multi_range_count
-4294967295
-SET @@global.multi_range_count = 4294967294;
-Warnings:
-Warning 1287 '@@multi_range_count' is deprecated and will be removed in a future release. Please use '@@mrr_buffer_size' instead
-SELECT @@global.multi_range_count;
-@@global.multi_range_count
-4294967294
-'#--------------------FN_DYNVARS_090_04-------------------------#'
-SET @@session.multi_range_count = 1;
-Warnings:
-Warning 1287 '@@multi_range_count' is deprecated and will be removed in a future release. Please use '@@mrr_buffer_size' instead
-SELECT @@session.multi_range_count;
-@@session.multi_range_count
-1
-SET @@session.multi_range_count = 50050;
-Warnings:
-Warning 1287 '@@multi_range_count' is deprecated and will be removed in a future release. Please use '@@mrr_buffer_size' instead
-SELECT @@session.multi_range_count;
-@@session.multi_range_count
-50050
-SET @@session.multi_range_count = 65535;
-Warnings:
-Warning 1287 '@@multi_range_count' is deprecated and will be removed in a future release. Please use '@@mrr_buffer_size' instead
-SELECT @@session.multi_range_count;
-@@session.multi_range_count
-65535
-SET @@session.multi_range_count = 4294967295;
-Warnings:
-Warning 1287 '@@multi_range_count' is deprecated and will be removed in a future release. Please use '@@mrr_buffer_size' instead
-SELECT @@session.multi_range_count;
-@@session.multi_range_count
-4294967295
-SET @@session.multi_range_count = 4294967294;
-Warnings:
-Warning 1287 '@@multi_range_count' is deprecated and will be removed in a future release. Please use '@@mrr_buffer_size' instead
-SELECT @@session.multi_range_count;
-@@session.multi_range_count
-4294967294
-'#------------------FN_DYNVARS_090_05-----------------------#'
-SET @@global.multi_range_count = 0;
-Warnings:
-Warning 1287 '@@multi_range_count' is deprecated and will be removed in a future release. Please use '@@mrr_buffer_size' instead
-Warning 1292 Truncated incorrect multi_range_count value: '0'
-SELECT @@global.multi_range_count;
-@@global.multi_range_count
-1
-SET @@global.multi_range_count = 4294967296;
-SELECT @@global.multi_range_count;
-@@global.multi_range_count
-4294967295
-SET @@global.multi_range_count = -1024;
-Warnings:
-Warning 1287 '@@multi_range_count' is deprecated and will be removed in a future release. Please use '@@mrr_buffer_size' instead
-Warning 1292 Truncated incorrect multi_range_count value: '-1024'
-SELECT @@global.multi_range_count;
-@@global.multi_range_count
-1
-SET @@global.multi_range_count = 429496729500;
-SELECT @@global.multi_range_count;
-@@global.multi_range_count
-4294967295
-SET @@global.multi_range_count = 65530.34;
-ERROR 42000: Incorrect argument type to variable 'multi_range_count'
-SELECT @@global.multi_range_count;
-@@global.multi_range_count
-4294967295
-SET @@global.multi_range_count = test;
-ERROR 42000: Incorrect argument type to variable 'multi_range_count'
-SELECT @@global.multi_range_count;
-@@global.multi_range_count
-4294967295
-SET @@session.multi_range_count = 0;
-Warnings:
-Warning 1287 '@@multi_range_count' is deprecated and will be removed in a future release. Please use '@@mrr_buffer_size' instead
-Warning 1292 Truncated incorrect multi_range_count value: '0'
-SELECT @@session.multi_range_count;
-@@session.multi_range_count
-1
-SET @@session.multi_range_count = 4294967296;
-SELECT @@session.multi_range_count;
-@@session.multi_range_count
-4294967295
-SET @@session.multi_range_count = -1;
-Warnings:
-Warning 1287 '@@multi_range_count' is deprecated and will be removed in a future release. Please use '@@mrr_buffer_size' instead
-Warning 1292 Truncated incorrect multi_range_count value: '-1'
-SELECT @@session.multi_range_count;
-@@session.multi_range_count
-1
-SET @@session.multi_range_count = 65530.34.;
-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
-SET @@session.multi_range_count = 4294967295021;
-SELECT @@session.multi_range_count;
-@@session.multi_range_count
-4294967295
-'Bug # 34837: Errors are not coming on assigning invalid values to variable';
-SET @@session.multi_range_count = test;
-ERROR 42000: Incorrect argument type to variable 'multi_range_count'
-SELECT @@session.multi_range_count;
-@@session.multi_range_count
-4294967295
-'#------------------FN_DYNVARS_090_06-----------------------#'
-SELECT @@global.multi_range_count = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='multi_range_count';
-@@global.multi_range_count = VARIABLE_VALUE
-1
-'#------------------FN_DYNVARS_090_07-----------------------#'
-SELECT @@session.multi_range_count = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.SESSION_VARIABLES
-WHERE VARIABLE_NAME='multi_range_count';
-@@session.multi_range_count = VARIABLE_VALUE
-1
-'#------------------FN_DYNVARS_090_08-----------------------#'
-SET @@global.multi_range_count = TRUE;
-Warnings:
-Warning 1287 '@@multi_range_count' is deprecated and will be removed in a future release. Please use '@@mrr_buffer_size' instead
-SELECT @@global.multi_range_count;
-@@global.multi_range_count
-1
-SET @@global.multi_range_count = FALSE;
-Warnings:
-Warning 1287 '@@multi_range_count' is deprecated and will be removed in a future release. Please use '@@mrr_buffer_size' instead
-Warning 1292 Truncated incorrect multi_range_count value: '0'
-SELECT @@global.multi_range_count;
-@@global.multi_range_count
-1
-'#---------------------FN_DYNVARS_090_09----------------------#'
-SET @@global.multi_range_count = 10;
-Warnings:
-Warning 1287 '@@multi_range_count' is deprecated and will be removed in a future release. Please use '@@mrr_buffer_size' instead
-SELECT @@multi_range_count = @@global.multi_range_count;
-@@multi_range_count = @@global.multi_range_count
-0
-'#---------------------FN_DYNVARS_090_10----------------------#'
-SET @@multi_range_count = 100;
-Warnings:
-Warning 1287 '@@multi_range_count' is deprecated and will be removed in a future release. Please use '@@mrr_buffer_size' instead
-SELECT @@multi_range_count = @@local.multi_range_count;
-@@multi_range_count = @@local.multi_range_count
-1
-SELECT @@local.multi_range_count = @@session.multi_range_count;
-@@local.multi_range_count = @@session.multi_range_count
-1
-'#---------------------FN_DYNVARS_090_11----------------------#'
-SET multi_range_count = 1;
-Warnings:
-Warning 1287 '@@multi_range_count' is deprecated and will be removed in a future release. Please use '@@mrr_buffer_size' instead
-SELECT @@multi_range_count;
-@@multi_range_count
-1
-SELECT local.multi_range_count;
-ERROR 42S02: Unknown table 'local' in field list
-SELECT session.multi_range_count;
-ERROR 42S02: Unknown table 'session' in field list
-SELECT multi_range_count = @@session.multi_range_count;
-ERROR 42S22: Unknown column 'multi_range_count' in 'field list'
-SET @@global.multi_range_count = @start_global_value;
-Warnings:
-Warning 1287 '@@multi_range_count' is deprecated and will be removed in a future release. Please use '@@mrr_buffer_size' instead
-SELECT @@global.multi_range_count;
-@@global.multi_range_count
-256
-SET @@session.multi_range_count = @start_session_value;
-Warnings:
-Warning 1287 '@@multi_range_count' is deprecated and will be removed in a future release. Please use '@@mrr_buffer_size' instead
-SELECT @@session.multi_range_count;
-@@session.multi_range_count
-256
diff --git a/mysql-test/suite/sys_vars/r/old_alter_table_basic.result b/mysql-test/suite/sys_vars/r/old_alter_table_basic.result
index 8b668340d1a..3cc7fff79ba 100644
--- a/mysql-test/suite/sys_vars/r/old_alter_table_basic.result
+++ b/mysql-test/suite/sys_vars/r/old_alter_table_basic.result
@@ -21,7 +21,11 @@ select * from information_schema.session_variables where variable_name='old_alte
VARIABLE_NAME VARIABLE_VALUE
OLD_ALTER_TABLE DEFAULT
set global old_alter_table=1;
+Warnings:
+Warning 1287 '@@old_alter_table' is deprecated and will be removed in a future release. Please use '@@alter_algorithm' instead
set session old_alter_table=1;
+Warnings:
+Warning 1287 '@@old_alter_table' is deprecated and will be removed in a future release. Please use '@@alter_algorithm' instead
select @@global.old_alter_table;
@@global.old_alter_table
COPY
@@ -41,7 +45,11 @@ select * from information_schema.session_variables where variable_name='old_alte
VARIABLE_NAME VARIABLE_VALUE
OLD_ALTER_TABLE COPY
set global old_alter_table=2;
+Warnings:
+Warning 1287 '@@old_alter_table' is deprecated and will be removed in a future release. Please use '@@alter_algorithm' instead
set session old_alter_table=2;
+Warnings:
+Warning 1287 '@@old_alter_table' is deprecated and will be removed in a future release. Please use '@@alter_algorithm' instead
select @@global.old_alter_table;
@@global.old_alter_table
INPLACE
@@ -61,7 +69,11 @@ select * from information_schema.session_variables where variable_name='old_alte
VARIABLE_NAME VARIABLE_VALUE
OLD_ALTER_TABLE INPLACE
set global old_alter_table=3;
+Warnings:
+Warning 1287 '@@old_alter_table' is deprecated and will be removed in a future release. Please use '@@alter_algorithm' instead
set session old_alter_table=3;
+Warnings:
+Warning 1287 '@@old_alter_table' is deprecated and will be removed in a future release. Please use '@@alter_algorithm' instead
select @@global.old_alter_table;
@@global.old_alter_table
NOCOPY
@@ -81,7 +93,11 @@ select * from information_schema.session_variables where variable_name='old_alte
VARIABLE_NAME VARIABLE_VALUE
OLD_ALTER_TABLE NOCOPY
set global old_alter_table=4;
+Warnings:
+Warning 1287 '@@old_alter_table' is deprecated and will be removed in a future release. Please use '@@alter_algorithm' instead
set session old_alter_table=4;
+Warnings:
+Warning 1287 '@@old_alter_table' is deprecated and will be removed in a future release. Please use '@@alter_algorithm' instead
select @@global.old_alter_table;
@@global.old_alter_table
INSTANT
@@ -107,6 +123,8 @@ ERROR 42000: Incorrect argument type to variable 'old_alter_table'
set global old_alter_table="foo";
ERROR 42000: Variable 'old_alter_table' can't be set to the value of 'foo'
SET @@global.old_alter_table = @start_global_value;
+Warnings:
+Warning 1287 '@@old_alter_table' is deprecated and will be removed in a future release. Please use '@@alter_algorithm' instead
SELECT @@global.old_alter_table;
@@global.old_alter_table
DEFAULT
diff --git a/mysql-test/suite/sys_vars/r/optimizer_switch_basic.result b/mysql-test/suite/sys_vars/r/optimizer_switch_basic.result
index 5c76684306a..80bd2d7af5f 100644
--- a/mysql-test/suite/sys_vars/r/optimizer_switch_basic.result
+++ b/mysql-test/suite/sys_vars/r/optimizer_switch_basic.result
@@ -1,60 +1,60 @@
set @@global.optimizer_switch=@@optimizer_switch;
select @@global.optimizer_switch;
@@global.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=on,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,condition_pushdown_from_having=on
+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=on,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,condition_pushdown_from_having=on,not_null_range_scan=off
select @@session.optimizer_switch;
@@session.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=on,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,condition_pushdown_from_having=on
+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=on,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,condition_pushdown_from_having=on,not_null_range_scan=off
show global variables like 'optimizer_switch';
Variable_name Value
-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=on,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,condition_pushdown_from_having=on
+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=on,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,condition_pushdown_from_having=on,not_null_range_scan=off
show session variables like 'optimizer_switch';
Variable_name Value
-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=on,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,condition_pushdown_from_having=on
+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=on,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,condition_pushdown_from_having=on,not_null_range_scan=off
select * from information_schema.global_variables where variable_name='optimizer_switch';
VARIABLE_NAME VARIABLE_VALUE
-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=on,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,condition_pushdown_from_having=on
+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=on,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,condition_pushdown_from_having=on,not_null_range_scan=off
select * from information_schema.session_variables where variable_name='optimizer_switch';
VARIABLE_NAME VARIABLE_VALUE
-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=on,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,condition_pushdown_from_having=on
+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=on,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,condition_pushdown_from_having=on,not_null_range_scan=off
set global optimizer_switch=4101;
set session optimizer_switch=2058;
select @@global.optimizer_switch;
@@global.optimizer_switch
-index_merge=on,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=off,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=off,in_to_exists=on,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off,extended_keys=off,exists_to_in=off,orderby_uses_equalities=off,condition_pushdown_for_derived=off,split_materialized=off,condition_pushdown_for_subquery=off,rowid_filter=off,condition_pushdown_from_having=off
+index_merge=on,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=off,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=off,in_to_exists=on,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off,extended_keys=off,exists_to_in=off,orderby_uses_equalities=off,condition_pushdown_for_derived=off,split_materialized=off,condition_pushdown_for_subquery=off,rowid_filter=off,condition_pushdown_from_having=off,not_null_range_scan=off
select @@session.optimizer_switch;
@@session.optimizer_switch
-index_merge=off,index_merge_union=on,index_merge_sort_union=off,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=on,in_to_exists=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off,extended_keys=off,exists_to_in=off,orderby_uses_equalities=off,condition_pushdown_for_derived=off,split_materialized=off,condition_pushdown_for_subquery=off,rowid_filter=off,condition_pushdown_from_having=off
+index_merge=off,index_merge_union=on,index_merge_sort_union=off,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=on,in_to_exists=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off,extended_keys=off,exists_to_in=off,orderby_uses_equalities=off,condition_pushdown_for_derived=off,split_materialized=off,condition_pushdown_for_subquery=off,rowid_filter=off,condition_pushdown_from_having=off,not_null_range_scan=off
set global optimizer_switch="index_merge_sort_union=on";
set session optimizer_switch="index_merge=off";
select @@global.optimizer_switch;
@@global.optimizer_switch
-index_merge=on,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=off,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=off,in_to_exists=on,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off,extended_keys=off,exists_to_in=off,orderby_uses_equalities=off,condition_pushdown_for_derived=off,split_materialized=off,condition_pushdown_for_subquery=off,rowid_filter=off,condition_pushdown_from_having=off
+index_merge=on,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=off,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=off,in_to_exists=on,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off,extended_keys=off,exists_to_in=off,orderby_uses_equalities=off,condition_pushdown_for_derived=off,split_materialized=off,condition_pushdown_for_subquery=off,rowid_filter=off,condition_pushdown_from_having=off,not_null_range_scan=off
select @@session.optimizer_switch;
@@session.optimizer_switch
-index_merge=off,index_merge_union=on,index_merge_sort_union=off,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=on,in_to_exists=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off,extended_keys=off,exists_to_in=off,orderby_uses_equalities=off,condition_pushdown_for_derived=off,split_materialized=off,condition_pushdown_for_subquery=off,rowid_filter=off,condition_pushdown_from_having=off
+index_merge=off,index_merge_union=on,index_merge_sort_union=off,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=on,in_to_exists=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off,extended_keys=off,exists_to_in=off,orderby_uses_equalities=off,condition_pushdown_for_derived=off,split_materialized=off,condition_pushdown_for_subquery=off,rowid_filter=off,condition_pushdown_from_having=off,not_null_range_scan=off
show global variables like 'optimizer_switch';
Variable_name Value
-optimizer_switch index_merge=on,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=off,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=off,in_to_exists=on,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off,extended_keys=off,exists_to_in=off,orderby_uses_equalities=off,condition_pushdown_for_derived=off,split_materialized=off,condition_pushdown_for_subquery=off,rowid_filter=off,condition_pushdown_from_having=off
+optimizer_switch index_merge=on,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=off,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=off,in_to_exists=on,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off,extended_keys=off,exists_to_in=off,orderby_uses_equalities=off,condition_pushdown_for_derived=off,split_materialized=off,condition_pushdown_for_subquery=off,rowid_filter=off,condition_pushdown_from_having=off,not_null_range_scan=off
show session variables like 'optimizer_switch';
Variable_name Value
-optimizer_switch index_merge=off,index_merge_union=on,index_merge_sort_union=off,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=on,in_to_exists=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off,extended_keys=off,exists_to_in=off,orderby_uses_equalities=off,condition_pushdown_for_derived=off,split_materialized=off,condition_pushdown_for_subquery=off,rowid_filter=off,condition_pushdown_from_having=off
+optimizer_switch index_merge=off,index_merge_union=on,index_merge_sort_union=off,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=on,in_to_exists=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off,extended_keys=off,exists_to_in=off,orderby_uses_equalities=off,condition_pushdown_for_derived=off,split_materialized=off,condition_pushdown_for_subquery=off,rowid_filter=off,condition_pushdown_from_having=off,not_null_range_scan=off
select * from information_schema.global_variables where variable_name='optimizer_switch';
VARIABLE_NAME VARIABLE_VALUE
-OPTIMIZER_SWITCH index_merge=on,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=off,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=off,in_to_exists=on,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off,extended_keys=off,exists_to_in=off,orderby_uses_equalities=off,condition_pushdown_for_derived=off,split_materialized=off,condition_pushdown_for_subquery=off,rowid_filter=off,condition_pushdown_from_having=off
+OPTIMIZER_SWITCH index_merge=on,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=off,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=off,in_to_exists=on,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off,extended_keys=off,exists_to_in=off,orderby_uses_equalities=off,condition_pushdown_for_derived=off,split_materialized=off,condition_pushdown_for_subquery=off,rowid_filter=off,condition_pushdown_from_having=off,not_null_range_scan=off
select * from information_schema.session_variables where variable_name='optimizer_switch';
VARIABLE_NAME VARIABLE_VALUE
-OPTIMIZER_SWITCH index_merge=off,index_merge_union=on,index_merge_sort_union=off,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=on,in_to_exists=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off,extended_keys=off,exists_to_in=off,orderby_uses_equalities=off,condition_pushdown_for_derived=off,split_materialized=off,condition_pushdown_for_subquery=off,rowid_filter=off,condition_pushdown_from_having=off
+OPTIMIZER_SWITCH index_merge=off,index_merge_union=on,index_merge_sort_union=off,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=on,in_to_exists=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off,extended_keys=off,exists_to_in=off,orderby_uses_equalities=off,condition_pushdown_for_derived=off,split_materialized=off,condition_pushdown_for_subquery=off,rowid_filter=off,condition_pushdown_from_having=off,not_null_range_scan=off
set session optimizer_switch="default";
select @@session.optimizer_switch;
@@session.optimizer_switch
-index_merge=on,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=off,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=off,in_to_exists=on,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off,extended_keys=off,exists_to_in=off,orderby_uses_equalities=off,condition_pushdown_for_derived=off,split_materialized=off,condition_pushdown_for_subquery=off,rowid_filter=off,condition_pushdown_from_having=off
+index_merge=on,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=off,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=off,in_to_exists=on,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off,extended_keys=off,exists_to_in=off,orderby_uses_equalities=off,condition_pushdown_for_derived=off,split_materialized=off,condition_pushdown_for_subquery=off,rowid_filter=off,condition_pushdown_from_having=off,not_null_range_scan=off
set optimizer_switch = replace(@@optimizer_switch, '=off', '=on');
Warnings:
Warning 1681 'engine_condition_pushdown=on' is deprecated and will be removed in a future release
select @@optimizer_switch;
@@optimizer_switch
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=on,engine_condition_pushdown=on,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=on,mrr_cost_based=on,mrr_sort_keys=on,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=on,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,condition_pushdown_from_having=on
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=on,engine_condition_pushdown=on,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=on,mrr_cost_based=on,mrr_sort_keys=on,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=on,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,condition_pushdown_from_having=on,not_null_range_scan=on
set global optimizer_switch=1.1;
ERROR 42000: Incorrect argument type to variable 'optimizer_switch'
set global optimizer_switch=1e1;
diff --git a/mysql-test/suite/sys_vars/r/preudo_thread_id_grant.result b/mysql-test/suite/sys_vars/r/preudo_thread_id_grant.result
new file mode 100644
index 00000000000..d306a192727
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/preudo_thread_id_grant.result
@@ -0,0 +1,44 @@
+#
+# MDEV-21975 Add BINLOG REPLAY privilege and bind new privileges to gtid_seq_no, preudo_thread_id, server_id, gtid_domain_id
+#
+SET @session=@@session.pseudo_thread_id;
+# Test that "SET pseudo_thread_id" is not allowed without BINLOG REPLAY or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE BINLOG REPLAY, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL pseudo_thread_id=1;
+ERROR HY000: Variable 'pseudo_thread_id' is a SESSION variable and can't be used with SET GLOBAL
+SET pseudo_thread_id=1;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, BINLOG REPLAY privilege(s) for this operation
+SET SESSION pseudo_thread_id=1;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, BINLOG REPLAY privilege(s) for this operation
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET pseudo_thread_id" is allowed with BINLOG REPLAY
+CREATE USER user1@localhost;
+GRANT BINLOG REPLAY ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL pseudo_thread_id=1;
+ERROR HY000: Variable 'pseudo_thread_id' is a SESSION variable and can't be used with SET GLOBAL
+SET pseudo_thread_id=1;
+SET SESSION pseudo_thread_id=1;
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET pseudo_thread_id" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL pseudo_thread_id=1;
+ERROR HY000: Variable 'pseudo_thread_id' is a SESSION variable and can't be used with SET GLOBAL
+SET pseudo_thread_id=1;
+SET SESSION pseudo_thread_id=1;
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@session.pseudo_thread_id=@session;
diff --git a/mysql-test/suite/sys_vars/r/proxy_protocol_networks_grant.result b/mysql-test/suite/sys_vars/r/proxy_protocol_networks_grant.result
new file mode 100644
index 00000000000..b6bae272443
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/proxy_protocol_networks_grant.result
@@ -0,0 +1,46 @@
+SET @global=@@global.proxy_protocol_networks;
+#
+# MDEV-21961 Bind CONNECTION ADMIN to a number of global system variables
+#
+# Test that "SET proxy_protocol_networks" is not allowed without CONNECTION ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE CONNECTION ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL proxy_protocol_networks="";
+ERROR 42000: Access denied; you need (at least one of) the SUPER, CONNECTION ADMIN privilege(s) for this operation
+SET proxy_protocol_networks="";
+ERROR HY000: Variable 'proxy_protocol_networks' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION proxy_protocol_networks="";
+ERROR HY000: Variable 'proxy_protocol_networks' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET proxy_protocol_networks" is allowed with CONNECTION ADMIN
+CREATE USER user1@localhost;
+GRANT CONNECTION ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL proxy_protocol_networks="";
+SET proxy_protocol_networks="";
+ERROR HY000: Variable 'proxy_protocol_networks' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION proxy_protocol_networks="";
+ERROR HY000: Variable 'proxy_protocol_networks' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET proxy_protocol_networks" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL proxy_protocol_networks="";
+SET proxy_protocol_networks="";
+ERROR HY000: Variable 'proxy_protocol_networks' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION proxy_protocol_networks="";
+ERROR HY000: Variable 'proxy_protocol_networks' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@global.proxy_protocol_networks=@global;
diff --git a/mysql-test/suite/sys_vars/r/read_binlog_speed_limit_grant.result b/mysql-test/suite/sys_vars/r/read_binlog_speed_limit_grant.result
new file mode 100644
index 00000000000..03536c1c371
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/read_binlog_speed_limit_grant.result
@@ -0,0 +1,46 @@
+#
+# MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
+#
+SET @global=@@global.read_binlog_speed_limit;
+# Test that "SET read_binlog_speed_limit" is not allowed without REPLICATION SLAVE ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE REPLICATION SLAVE ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL read_binlog_speed_limit=65536;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, REPLICATION SLAVE ADMIN privilege(s) for this operation
+SET read_binlog_speed_limit=65536;
+ERROR HY000: Variable 'read_binlog_speed_limit' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION read_binlog_speed_limit=65536;
+ERROR HY000: Variable 'read_binlog_speed_limit' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET read_binlog_speed_limit" is allowed with REPLICATION SLAVE ADMIN
+CREATE USER user1@localhost;
+GRANT REPLICATION SLAVE ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL read_binlog_speed_limit=65536;
+SET read_binlog_speed_limit=65536;
+ERROR HY000: Variable 'read_binlog_speed_limit' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION read_binlog_speed_limit=65536;
+ERROR HY000: Variable 'read_binlog_speed_limit' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET read_binlog_speed_limit" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL read_binlog_speed_limit=65536;
+SET read_binlog_speed_limit=65536;
+ERROR HY000: Variable 'read_binlog_speed_limit' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION read_binlog_speed_limit=65536;
+ERROR HY000: Variable 'read_binlog_speed_limit' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@global.read_binlog_speed_limit=@global;
diff --git a/mysql-test/suite/sys_vars/r/read_only_func.result b/mysql-test/suite/sys_vars/r/read_only_func.result
index ae63e39c153..e93f280dbb5 100644
--- a/mysql-test/suite/sys_vars/r/read_only_func.result
+++ b/mysql-test/suite/sys_vars/r/read_only_func.result
@@ -20,7 +20,7 @@ id name
CREATE user sameea;
CONNECT connn,localhost,sameea,,;
SET Global read_ONLY=ON;
-ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
+ERROR 42000: Access denied; you need (at least one of) the SUPER, READ_ONLY ADMIN privilege(s) for this operation
CREATE TABLE t2
(
id INT NOT NULL auto_increment,
diff --git a/mysql-test/suite/sys_vars/r/read_only_grant.result b/mysql-test/suite/sys_vars/r/read_only_grant.result
new file mode 100644
index 00000000000..8884546e92d
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/read_only_grant.result
@@ -0,0 +1,44 @@
+#
+# MDEV-21960 Bind READ_ONLY ADMIN to @@read_only
+#
+# Test that "SET read_only" is not allowed without READ_ONLY ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE READ_ONLY ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL read_only=0;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, READ_ONLY ADMIN privilege(s) for this operation
+SET read_only=0;
+ERROR HY000: Variable 'read_only' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION read_only=0;
+ERROR HY000: Variable 'read_only' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET read_only" is allowed with READ_ONLY ADMIN
+CREATE USER user1@localhost;
+GRANT READ_ONLY ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL read_only=0;
+SET read_only=0;
+ERROR HY000: Variable 'read_only' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION read_only=0;
+ERROR HY000: Variable 'read_only' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET read_only" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL read_only=0;
+SET read_only=0;
+ERROR HY000: Variable 'read_only' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION read_only=0;
+ERROR HY000: Variable 'read_only' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
diff --git a/mysql-test/suite/sys_vars/r/relay_log_purge_grant.result b/mysql-test/suite/sys_vars/r/relay_log_purge_grant.result
new file mode 100644
index 00000000000..0823bf1ff9d
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/relay_log_purge_grant.result
@@ -0,0 +1,46 @@
+#
+# MDEV-21969 Bind REPLICATION SLAVE ADMIN to relay_log_*, sync_master_info, sync_relay_log, sync_relay_log_info
+#
+SET @global=@@global.relay_log_purge;
+# Test that "SET relay_log_purge" is not allowed without REPLICATION SLAVE ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE REPLICATION SLAVE ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL relay_log_purge=1;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, REPLICATION SLAVE ADMIN privilege(s) for this operation
+SET relay_log_purge=1;
+ERROR HY000: Variable 'relay_log_purge' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION relay_log_purge=1;
+ERROR HY000: Variable 'relay_log_purge' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET relay_log_purge" is allowed with REPLICATION SLAVE ADMIN
+CREATE USER user1@localhost;
+GRANT REPLICATION SLAVE ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL relay_log_purge=1;
+SET relay_log_purge=1;
+ERROR HY000: Variable 'relay_log_purge' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION relay_log_purge=1;
+ERROR HY000: Variable 'relay_log_purge' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET relay_log_purge" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL relay_log_purge=1;
+SET relay_log_purge=1;
+ERROR HY000: Variable 'relay_log_purge' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION relay_log_purge=1;
+ERROR HY000: Variable 'relay_log_purge' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@global.relay_log_purge=@global;
diff --git a/mysql-test/suite/sys_vars/r/relay_log_recovery_grant.result b/mysql-test/suite/sys_vars/r/relay_log_recovery_grant.result
new file mode 100644
index 00000000000..9e90c99ff0d
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/relay_log_recovery_grant.result
@@ -0,0 +1,46 @@
+#
+# MDEV-21969 Bind REPLICATION SLAVE ADMIN to relay_log_*, sync_master_info, sync_relay_log, sync_relay_log_info
+#
+SET @global=@@global.relay_log_recovery;
+# Test that "SET relay_log_recovery" is not allowed without REPLICATION SLAVE ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE REPLICATION SLAVE ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL relay_log_recovery=1;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, REPLICATION SLAVE ADMIN privilege(s) for this operation
+SET relay_log_recovery=1;
+ERROR HY000: Variable 'relay_log_recovery' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION relay_log_recovery=1;
+ERROR HY000: Variable 'relay_log_recovery' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET relay_log_recovery" is allowed with REPLICATION SLAVE ADMIN
+CREATE USER user1@localhost;
+GRANT REPLICATION SLAVE ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL relay_log_recovery=1;
+SET relay_log_recovery=1;
+ERROR HY000: Variable 'relay_log_recovery' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION relay_log_recovery=1;
+ERROR HY000: Variable 'relay_log_recovery' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET relay_log_recovery" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL relay_log_recovery=1;
+SET relay_log_recovery=1;
+ERROR HY000: Variable 'relay_log_recovery' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION relay_log_recovery=1;
+ERROR HY000: Variable 'relay_log_recovery' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@global.relay_log_recovery=@global;
diff --git a/mysql-test/suite/sys_vars/r/replicate_do_db_grant.result b/mysql-test/suite/sys_vars/r/replicate_do_db_grant.result
new file mode 100644
index 00000000000..1f352590072
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/replicate_do_db_grant.result
@@ -0,0 +1,46 @@
+#
+# MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
+#
+SET @global=@@global.replicate_do_db;
+# Test that "SET replicate_do_db" is not allowed without REPLICATION SLAVE ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE REPLICATION SLAVE ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL replicate_do_db='';
+ERROR 42000: Access denied; you need (at least one of) the SUPER, REPLICATION SLAVE ADMIN privilege(s) for this operation
+SET replicate_do_db='';
+ERROR HY000: Variable 'replicate_do_db' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION replicate_do_db='';
+ERROR HY000: Variable 'replicate_do_db' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET replicate_do_db" is allowed with REPLICATION SLAVE ADMIN
+CREATE USER user1@localhost;
+GRANT REPLICATION SLAVE ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL replicate_do_db='';
+SET replicate_do_db='';
+ERROR HY000: Variable 'replicate_do_db' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION replicate_do_db='';
+ERROR HY000: Variable 'replicate_do_db' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET replicate_do_db" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL replicate_do_db='';
+SET replicate_do_db='';
+ERROR HY000: Variable 'replicate_do_db' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION replicate_do_db='';
+ERROR HY000: Variable 'replicate_do_db' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@global.replicate_do_db=@global;
diff --git a/mysql-test/suite/sys_vars/r/replicate_do_table_grant.result b/mysql-test/suite/sys_vars/r/replicate_do_table_grant.result
new file mode 100644
index 00000000000..31290979695
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/replicate_do_table_grant.result
@@ -0,0 +1,46 @@
+#
+# MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
+#
+SET @global=@@global.replicate_do_table;
+# Test that "SET replicate_do_table" is not allowed without REPLICATION SLAVE ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE REPLICATION SLAVE ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL replicate_do_table='';
+ERROR 42000: Access denied; you need (at least one of) the SUPER, REPLICATION SLAVE ADMIN privilege(s) for this operation
+SET replicate_do_table='';
+ERROR HY000: Variable 'replicate_do_table' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION replicate_do_table='';
+ERROR HY000: Variable 'replicate_do_table' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET replicate_do_table" is allowed with REPLICATION SLAVE ADMIN
+CREATE USER user1@localhost;
+GRANT REPLICATION SLAVE ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL replicate_do_table='';
+SET replicate_do_table='';
+ERROR HY000: Variable 'replicate_do_table' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION replicate_do_table='';
+ERROR HY000: Variable 'replicate_do_table' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET replicate_do_table" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL replicate_do_table='';
+SET replicate_do_table='';
+ERROR HY000: Variable 'replicate_do_table' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION replicate_do_table='';
+ERROR HY000: Variable 'replicate_do_table' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@global.replicate_do_table=@global;
diff --git a/mysql-test/suite/sys_vars/r/replicate_events_marked_for_skip_grant.result b/mysql-test/suite/sys_vars/r/replicate_events_marked_for_skip_grant.result
new file mode 100644
index 00000000000..f649294f7e5
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/replicate_events_marked_for_skip_grant.result
@@ -0,0 +1,46 @@
+#
+# MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
+#
+SET @global=@@global.replicate_events_marked_for_skip;
+# Test that "SET replicate_events_marked_for_skip" is not allowed without REPLICATION SLAVE ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE REPLICATION SLAVE ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL replicate_events_marked_for_skip=REPLICATE;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, REPLICATION SLAVE ADMIN privilege(s) for this operation
+SET replicate_events_marked_for_skip=REPLICATE;
+ERROR HY000: Variable 'replicate_events_marked_for_skip' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION replicate_events_marked_for_skip=REPLICATE;
+ERROR HY000: Variable 'replicate_events_marked_for_skip' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET replicate_events_marked_for_skip" is allowed with REPLICATION SLAVE ADMIN
+CREATE USER user1@localhost;
+GRANT REPLICATION SLAVE ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL replicate_events_marked_for_skip=REPLICATE;
+SET replicate_events_marked_for_skip=REPLICATE;
+ERROR HY000: Variable 'replicate_events_marked_for_skip' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION replicate_events_marked_for_skip=REPLICATE;
+ERROR HY000: Variable 'replicate_events_marked_for_skip' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET replicate_events_marked_for_skip" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL replicate_events_marked_for_skip=REPLICATE;
+SET replicate_events_marked_for_skip=REPLICATE;
+ERROR HY000: Variable 'replicate_events_marked_for_skip' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION replicate_events_marked_for_skip=REPLICATE;
+ERROR HY000: Variable 'replicate_events_marked_for_skip' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@global.replicate_events_marked_for_skip=@global;
diff --git a/mysql-test/suite/sys_vars/r/replicate_ignore_db_grant.result b/mysql-test/suite/sys_vars/r/replicate_ignore_db_grant.result
new file mode 100644
index 00000000000..612fab62771
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/replicate_ignore_db_grant.result
@@ -0,0 +1,46 @@
+#
+# MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
+#
+SET @global=@@global.replicate_ignore_db;
+# Test that "SET replicate_ignore_db" is not allowed without REPLICATION SLAVE ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE REPLICATION SLAVE ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL replicate_ignore_db='';
+ERROR 42000: Access denied; you need (at least one of) the SUPER, REPLICATION SLAVE ADMIN privilege(s) for this operation
+SET replicate_ignore_db='';
+ERROR HY000: Variable 'replicate_ignore_db' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION replicate_ignore_db='';
+ERROR HY000: Variable 'replicate_ignore_db' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET replicate_ignore_db" is allowed with REPLICATION SLAVE ADMIN
+CREATE USER user1@localhost;
+GRANT REPLICATION SLAVE ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL replicate_ignore_db='';
+SET replicate_ignore_db='';
+ERROR HY000: Variable 'replicate_ignore_db' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION replicate_ignore_db='';
+ERROR HY000: Variable 'replicate_ignore_db' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET replicate_ignore_db" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL replicate_ignore_db='';
+SET replicate_ignore_db='';
+ERROR HY000: Variable 'replicate_ignore_db' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION replicate_ignore_db='';
+ERROR HY000: Variable 'replicate_ignore_db' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@global.replicate_ignore_db=@global;
diff --git a/mysql-test/suite/sys_vars/r/replicate_ignore_table_grant.result b/mysql-test/suite/sys_vars/r/replicate_ignore_table_grant.result
new file mode 100644
index 00000000000..9f2354a8704
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/replicate_ignore_table_grant.result
@@ -0,0 +1,46 @@
+#
+# MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
+#
+SET @global=@@global.replicate_ignore_table;
+# Test that "SET replicate_ignore_table" is not allowed without REPLICATION SLAVE ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE REPLICATION SLAVE ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL replicate_ignore_table='';
+ERROR 42000: Access denied; you need (at least one of) the SUPER, REPLICATION SLAVE ADMIN privilege(s) for this operation
+SET replicate_ignore_table='';
+ERROR HY000: Variable 'replicate_ignore_table' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION replicate_ignore_table='';
+ERROR HY000: Variable 'replicate_ignore_table' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET replicate_ignore_table" is allowed with REPLICATION SLAVE ADMIN
+CREATE USER user1@localhost;
+GRANT REPLICATION SLAVE ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL replicate_ignore_table='';
+SET replicate_ignore_table='';
+ERROR HY000: Variable 'replicate_ignore_table' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION replicate_ignore_table='';
+ERROR HY000: Variable 'replicate_ignore_table' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET replicate_ignore_table" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL replicate_ignore_table='';
+SET replicate_ignore_table='';
+ERROR HY000: Variable 'replicate_ignore_table' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION replicate_ignore_table='';
+ERROR HY000: Variable 'replicate_ignore_table' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@global.replicate_ignore_table=@global;
diff --git a/mysql-test/suite/sys_vars/r/replicate_wild_do_table_grant.result b/mysql-test/suite/sys_vars/r/replicate_wild_do_table_grant.result
new file mode 100644
index 00000000000..1c9e12ded65
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/replicate_wild_do_table_grant.result
@@ -0,0 +1,46 @@
+#
+# MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
+#
+SET @global=@@global.replicate_wild_do_table;
+# Test that "SET replicate_wild_do_table" is not allowed without REPLICATION SLAVE ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE REPLICATION SLAVE ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL replicate_wild_do_table='';
+ERROR 42000: Access denied; you need (at least one of) the SUPER, REPLICATION SLAVE ADMIN privilege(s) for this operation
+SET replicate_wild_do_table='';
+ERROR HY000: Variable 'replicate_wild_do_table' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION replicate_wild_do_table='';
+ERROR HY000: Variable 'replicate_wild_do_table' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET replicate_wild_do_table" is allowed with REPLICATION SLAVE ADMIN
+CREATE USER user1@localhost;
+GRANT REPLICATION SLAVE ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL replicate_wild_do_table='';
+SET replicate_wild_do_table='';
+ERROR HY000: Variable 'replicate_wild_do_table' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION replicate_wild_do_table='';
+ERROR HY000: Variable 'replicate_wild_do_table' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET replicate_wild_do_table" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL replicate_wild_do_table='';
+SET replicate_wild_do_table='';
+ERROR HY000: Variable 'replicate_wild_do_table' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION replicate_wild_do_table='';
+ERROR HY000: Variable 'replicate_wild_do_table' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@global.replicate_wild_do_table=@global;
diff --git a/mysql-test/suite/sys_vars/r/replicate_wild_ignore_table_grant.result b/mysql-test/suite/sys_vars/r/replicate_wild_ignore_table_grant.result
new file mode 100644
index 00000000000..27a82173d50
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/replicate_wild_ignore_table_grant.result
@@ -0,0 +1,46 @@
+#
+# MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
+#
+SET @global=@@global.replicate_wild_ignore_table;
+# Test that "SET replicate_wild_ignore_table" is not allowed without REPLICATION SLAVE ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE REPLICATION SLAVE ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL replicate_wild_ignore_table='';
+ERROR 42000: Access denied; you need (at least one of) the SUPER, REPLICATION SLAVE ADMIN privilege(s) for this operation
+SET replicate_wild_ignore_table='';
+ERROR HY000: Variable 'replicate_wild_ignore_table' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION replicate_wild_ignore_table='';
+ERROR HY000: Variable 'replicate_wild_ignore_table' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET replicate_wild_ignore_table" is allowed with REPLICATION SLAVE ADMIN
+CREATE USER user1@localhost;
+GRANT REPLICATION SLAVE ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL replicate_wild_ignore_table='';
+SET replicate_wild_ignore_table='';
+ERROR HY000: Variable 'replicate_wild_ignore_table' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION replicate_wild_ignore_table='';
+ERROR HY000: Variable 'replicate_wild_ignore_table' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET replicate_wild_ignore_table" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL replicate_wild_ignore_table='';
+SET replicate_wild_ignore_table='';
+ERROR HY000: Variable 'replicate_wild_ignore_table' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION replicate_wild_ignore_table='';
+ERROR HY000: Variable 'replicate_wild_ignore_table' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@global.replicate_wild_ignore_table=@global;
diff --git a/mysql-test/suite/sys_vars/r/rpl_semi_sync_master_enabled_grant.result b/mysql-test/suite/sys_vars/r/rpl_semi_sync_master_enabled_grant.result
new file mode 100644
index 00000000000..3c5b3d070d5
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/rpl_semi_sync_master_enabled_grant.result
@@ -0,0 +1,46 @@
+#
+# MDEV-21967 Bind REPLICATION {MASTER|SLAVE} ADMIN to rpl_semi_sync_* variables
+#
+SET @global=@@global.rpl_semi_sync_master_enabled;
+# Test that "SET rpl_semi_sync_master_enabled" is not allowed without REPLICATION MASTER ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE REPLICATION MASTER ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL rpl_semi_sync_master_enabled=1;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, REPLICATION MASTER ADMIN privilege(s) for this operation
+SET rpl_semi_sync_master_enabled=1;
+ERROR HY000: Variable 'rpl_semi_sync_master_enabled' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION rpl_semi_sync_master_enabled=1;
+ERROR HY000: Variable 'rpl_semi_sync_master_enabled' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET rpl_semi_sync_master_enabled" is allowed with REPLICATION MASTER ADMIN
+CREATE USER user1@localhost;
+GRANT REPLICATION MASTER ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL rpl_semi_sync_master_enabled=1;
+SET rpl_semi_sync_master_enabled=1;
+ERROR HY000: Variable 'rpl_semi_sync_master_enabled' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION rpl_semi_sync_master_enabled=1;
+ERROR HY000: Variable 'rpl_semi_sync_master_enabled' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET rpl_semi_sync_master_enabled" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL rpl_semi_sync_master_enabled=1;
+SET rpl_semi_sync_master_enabled=1;
+ERROR HY000: Variable 'rpl_semi_sync_master_enabled' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION rpl_semi_sync_master_enabled=1;
+ERROR HY000: Variable 'rpl_semi_sync_master_enabled' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@global.rpl_semi_sync_master_enabled=@global;
diff --git a/mysql-test/suite/sys_vars/r/rpl_semi_sync_master_timeout_grant.result b/mysql-test/suite/sys_vars/r/rpl_semi_sync_master_timeout_grant.result
new file mode 100644
index 00000000000..2e8b51d5fa8
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/rpl_semi_sync_master_timeout_grant.result
@@ -0,0 +1,46 @@
+#
+# MDEV-21967 Bind REPLICATION {MASTER|SLAVE} ADMIN to rpl_semi_sync_* variables
+#
+SET @global=@@global.rpl_semi_sync_master_timeout;
+# Test that "SET rpl_semi_sync_master_timeout" is not allowed without REPLICATION MASTER ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE REPLICATION MASTER ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL rpl_semi_sync_master_timeout=20000;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, REPLICATION MASTER ADMIN privilege(s) for this operation
+SET rpl_semi_sync_master_timeout=20000;
+ERROR HY000: Variable 'rpl_semi_sync_master_timeout' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION rpl_semi_sync_master_timeout=20000;
+ERROR HY000: Variable 'rpl_semi_sync_master_timeout' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET rpl_semi_sync_master_timeout" is allowed with REPLICATION MASTER ADMIN
+CREATE USER user1@localhost;
+GRANT REPLICATION MASTER ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL rpl_semi_sync_master_timeout=20000;
+SET rpl_semi_sync_master_timeout=20000;
+ERROR HY000: Variable 'rpl_semi_sync_master_timeout' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION rpl_semi_sync_master_timeout=20000;
+ERROR HY000: Variable 'rpl_semi_sync_master_timeout' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET rpl_semi_sync_master_timeout" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL rpl_semi_sync_master_timeout=20000;
+SET rpl_semi_sync_master_timeout=20000;
+ERROR HY000: Variable 'rpl_semi_sync_master_timeout' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION rpl_semi_sync_master_timeout=20000;
+ERROR HY000: Variable 'rpl_semi_sync_master_timeout' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@global.rpl_semi_sync_master_timeout=@global;
diff --git a/mysql-test/suite/sys_vars/r/rpl_semi_sync_master_trace_level_grant.result b/mysql-test/suite/sys_vars/r/rpl_semi_sync_master_trace_level_grant.result
new file mode 100644
index 00000000000..c31d063f1d9
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/rpl_semi_sync_master_trace_level_grant.result
@@ -0,0 +1,46 @@
+#
+# MDEV-21967 Bind REPLICATION {MASTER|SLAVE} ADMIN to rpl_semi_sync_* variables
+#
+SET @global=@@global.rpl_semi_sync_master_trace_level;
+# Test that "SET rpl_semi_sync_master_trace_level" is not allowed without REPLICATION MASTER ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE REPLICATION MASTER ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL rpl_semi_sync_master_trace_level=64;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, REPLICATION MASTER ADMIN privilege(s) for this operation
+SET rpl_semi_sync_master_trace_level=64;
+ERROR HY000: Variable 'rpl_semi_sync_master_trace_level' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION rpl_semi_sync_master_trace_level=64;
+ERROR HY000: Variable 'rpl_semi_sync_master_trace_level' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET rpl_semi_sync_master_trace_level" is allowed with REPLICATION MASTER ADMIN
+CREATE USER user1@localhost;
+GRANT REPLICATION MASTER ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL rpl_semi_sync_master_trace_level=64;
+SET rpl_semi_sync_master_trace_level=64;
+ERROR HY000: Variable 'rpl_semi_sync_master_trace_level' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION rpl_semi_sync_master_trace_level=64;
+ERROR HY000: Variable 'rpl_semi_sync_master_trace_level' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET rpl_semi_sync_master_trace_level" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL rpl_semi_sync_master_trace_level=64;
+SET rpl_semi_sync_master_trace_level=64;
+ERROR HY000: Variable 'rpl_semi_sync_master_trace_level' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION rpl_semi_sync_master_trace_level=64;
+ERROR HY000: Variable 'rpl_semi_sync_master_trace_level' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@global.rpl_semi_sync_master_trace_level=@global;
diff --git a/mysql-test/suite/sys_vars/r/rpl_semi_sync_master_wait_no_slave_grant.result b/mysql-test/suite/sys_vars/r/rpl_semi_sync_master_wait_no_slave_grant.result
new file mode 100644
index 00000000000..14e239f7c4c
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/rpl_semi_sync_master_wait_no_slave_grant.result
@@ -0,0 +1,46 @@
+#
+# MDEV-21967 Bind REPLICATION {MASTER|SLAVE} ADMIN to rpl_semi_sync_* variables
+#
+SET @global=@@global.rpl_semi_sync_master_wait_no_slave;
+# Test that "SET rpl_semi_sync_master_wait_no_slave" is not allowed without REPLICATION MASTER ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE REPLICATION MASTER ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL rpl_semi_sync_master_wait_no_slave=1;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, REPLICATION MASTER ADMIN privilege(s) for this operation
+SET rpl_semi_sync_master_wait_no_slave=1;
+ERROR HY000: Variable 'rpl_semi_sync_master_wait_no_slave' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION rpl_semi_sync_master_wait_no_slave=1;
+ERROR HY000: Variable 'rpl_semi_sync_master_wait_no_slave' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET rpl_semi_sync_master_wait_no_slave" is allowed with REPLICATION MASTER ADMIN
+CREATE USER user1@localhost;
+GRANT REPLICATION MASTER ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL rpl_semi_sync_master_wait_no_slave=1;
+SET rpl_semi_sync_master_wait_no_slave=1;
+ERROR HY000: Variable 'rpl_semi_sync_master_wait_no_slave' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION rpl_semi_sync_master_wait_no_slave=1;
+ERROR HY000: Variable 'rpl_semi_sync_master_wait_no_slave' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET rpl_semi_sync_master_wait_no_slave" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL rpl_semi_sync_master_wait_no_slave=1;
+SET rpl_semi_sync_master_wait_no_slave=1;
+ERROR HY000: Variable 'rpl_semi_sync_master_wait_no_slave' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION rpl_semi_sync_master_wait_no_slave=1;
+ERROR HY000: Variable 'rpl_semi_sync_master_wait_no_slave' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@global.rpl_semi_sync_master_wait_no_slave=@global;
diff --git a/mysql-test/suite/sys_vars/r/rpl_semi_sync_master_wait_point_grant.result b/mysql-test/suite/sys_vars/r/rpl_semi_sync_master_wait_point_grant.result
new file mode 100644
index 00000000000..5760c45900e
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/rpl_semi_sync_master_wait_point_grant.result
@@ -0,0 +1,46 @@
+#
+# MDEV-21967 Bind REPLICATION {MASTER|SLAVE} ADMIN to rpl_semi_sync_* variables
+#
+SET @global=@@global.rpl_semi_sync_master_wait_point;
+# Test that "SET rpl_semi_sync_master_wait_point" is not allowed without REPLICATION MASTER ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE REPLICATION MASTER ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL rpl_semi_sync_master_wait_point=AFTER_SYNC;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, REPLICATION MASTER ADMIN privilege(s) for this operation
+SET rpl_semi_sync_master_wait_point=AFTER_SYNC;
+ERROR HY000: Variable 'rpl_semi_sync_master_wait_point' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION rpl_semi_sync_master_wait_point=AFTER_SYNC;
+ERROR HY000: Variable 'rpl_semi_sync_master_wait_point' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET rpl_semi_sync_master_wait_point" is allowed with REPLICATION MASTER ADMIN
+CREATE USER user1@localhost;
+GRANT REPLICATION MASTER ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL rpl_semi_sync_master_wait_point=AFTER_SYNC;
+SET rpl_semi_sync_master_wait_point=AFTER_SYNC;
+ERROR HY000: Variable 'rpl_semi_sync_master_wait_point' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION rpl_semi_sync_master_wait_point=AFTER_SYNC;
+ERROR HY000: Variable 'rpl_semi_sync_master_wait_point' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET rpl_semi_sync_master_wait_point" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL rpl_semi_sync_master_wait_point=AFTER_SYNC;
+SET rpl_semi_sync_master_wait_point=AFTER_SYNC;
+ERROR HY000: Variable 'rpl_semi_sync_master_wait_point' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION rpl_semi_sync_master_wait_point=AFTER_SYNC;
+ERROR HY000: Variable 'rpl_semi_sync_master_wait_point' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@global.rpl_semi_sync_master_wait_point=@global;
diff --git a/mysql-test/suite/sys_vars/r/rpl_semi_sync_slave_delay_master_grant.result b/mysql-test/suite/sys_vars/r/rpl_semi_sync_slave_delay_master_grant.result
new file mode 100644
index 00000000000..9e1c3073da9
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/rpl_semi_sync_slave_delay_master_grant.result
@@ -0,0 +1,46 @@
+#
+# MDEV-21967 Bind REPLICATION {MASTER|SLAVE} ADMIN to rpl_semi_sync_* variables
+#
+SET @global=@@global.rpl_semi_sync_slave_delay_master;
+# Test that "SET rpl_semi_sync_slave_delay_master" is not allowed without REPLICATION SLAVE ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE REPLICATION SLAVE ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL rpl_semi_sync_slave_delay_master=1;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, REPLICATION SLAVE ADMIN privilege(s) for this operation
+SET rpl_semi_sync_slave_delay_master=1;
+ERROR HY000: Variable 'rpl_semi_sync_slave_delay_master' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION rpl_semi_sync_slave_delay_master=1;
+ERROR HY000: Variable 'rpl_semi_sync_slave_delay_master' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET rpl_semi_sync_slave_delay_master" is allowed with REPLICATION SLAVE ADMIN
+CREATE USER user1@localhost;
+GRANT REPLICATION SLAVE ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL rpl_semi_sync_slave_delay_master=1;
+SET rpl_semi_sync_slave_delay_master=1;
+ERROR HY000: Variable 'rpl_semi_sync_slave_delay_master' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION rpl_semi_sync_slave_delay_master=1;
+ERROR HY000: Variable 'rpl_semi_sync_slave_delay_master' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET rpl_semi_sync_slave_delay_master" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL rpl_semi_sync_slave_delay_master=1;
+SET rpl_semi_sync_slave_delay_master=1;
+ERROR HY000: Variable 'rpl_semi_sync_slave_delay_master' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION rpl_semi_sync_slave_delay_master=1;
+ERROR HY000: Variable 'rpl_semi_sync_slave_delay_master' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@global.rpl_semi_sync_slave_delay_master=@global;
diff --git a/mysql-test/suite/sys_vars/r/rpl_semi_sync_slave_enabled_grant.result b/mysql-test/suite/sys_vars/r/rpl_semi_sync_slave_enabled_grant.result
new file mode 100644
index 00000000000..f370b82d751
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/rpl_semi_sync_slave_enabled_grant.result
@@ -0,0 +1,46 @@
+#
+# MDEV-21967 Bind REPLICATION {MASTER|SLAVE} ADMIN to rpl_semi_sync_* variables
+#
+SET @global=@@global.rpl_semi_sync_slave_enabled;
+# Test that "SET rpl_semi_sync_slave_enabled" is not allowed without REPLICATION SLAVE ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE REPLICATION SLAVE ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL rpl_semi_sync_slave_enabled=1;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, REPLICATION SLAVE ADMIN privilege(s) for this operation
+SET rpl_semi_sync_slave_enabled=1;
+ERROR HY000: Variable 'rpl_semi_sync_slave_enabled' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION rpl_semi_sync_slave_enabled=1;
+ERROR HY000: Variable 'rpl_semi_sync_slave_enabled' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET rpl_semi_sync_slave_enabled" is allowed with REPLICATION SLAVE ADMIN
+CREATE USER user1@localhost;
+GRANT REPLICATION SLAVE ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL rpl_semi_sync_slave_enabled=1;
+SET rpl_semi_sync_slave_enabled=1;
+ERROR HY000: Variable 'rpl_semi_sync_slave_enabled' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION rpl_semi_sync_slave_enabled=1;
+ERROR HY000: Variable 'rpl_semi_sync_slave_enabled' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET rpl_semi_sync_slave_enabled" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL rpl_semi_sync_slave_enabled=1;
+SET rpl_semi_sync_slave_enabled=1;
+ERROR HY000: Variable 'rpl_semi_sync_slave_enabled' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION rpl_semi_sync_slave_enabled=1;
+ERROR HY000: Variable 'rpl_semi_sync_slave_enabled' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@global.rpl_semi_sync_slave_enabled=@global;
diff --git a/mysql-test/suite/sys_vars/r/rpl_semi_sync_slave_kill_conn_timeout_grant.result b/mysql-test/suite/sys_vars/r/rpl_semi_sync_slave_kill_conn_timeout_grant.result
new file mode 100644
index 00000000000..f5e0f3b3e3a
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/rpl_semi_sync_slave_kill_conn_timeout_grant.result
@@ -0,0 +1,46 @@
+#
+# MDEV-21967 Bind REPLICATION {MASTER|SLAVE} ADMIN to rpl_semi_sync_* variables
+#
+SET @global=@@global.rpl_semi_sync_slave_kill_conn_timeout;
+# Test that "SET rpl_semi_sync_slave_kill_conn_timeout" is not allowed without REPLICATION SLAVE ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE REPLICATION SLAVE ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL rpl_semi_sync_slave_kill_conn_timeout=1;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, REPLICATION SLAVE ADMIN privilege(s) for this operation
+SET rpl_semi_sync_slave_kill_conn_timeout=1;
+ERROR HY000: Variable 'rpl_semi_sync_slave_kill_conn_timeout' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION rpl_semi_sync_slave_kill_conn_timeout=1;
+ERROR HY000: Variable 'rpl_semi_sync_slave_kill_conn_timeout' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET rpl_semi_sync_slave_kill_conn_timeout" is allowed with REPLICATION SLAVE ADMIN
+CREATE USER user1@localhost;
+GRANT REPLICATION SLAVE ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL rpl_semi_sync_slave_kill_conn_timeout=1;
+SET rpl_semi_sync_slave_kill_conn_timeout=1;
+ERROR HY000: Variable 'rpl_semi_sync_slave_kill_conn_timeout' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION rpl_semi_sync_slave_kill_conn_timeout=1;
+ERROR HY000: Variable 'rpl_semi_sync_slave_kill_conn_timeout' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET rpl_semi_sync_slave_kill_conn_timeout" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL rpl_semi_sync_slave_kill_conn_timeout=1;
+SET rpl_semi_sync_slave_kill_conn_timeout=1;
+ERROR HY000: Variable 'rpl_semi_sync_slave_kill_conn_timeout' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION rpl_semi_sync_slave_kill_conn_timeout=1;
+ERROR HY000: Variable 'rpl_semi_sync_slave_kill_conn_timeout' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@global.rpl_semi_sync_slave_kill_conn_timeout=@global;
diff --git a/mysql-test/suite/sys_vars/r/rpl_semi_sync_slave_trace_level_grant.result b/mysql-test/suite/sys_vars/r/rpl_semi_sync_slave_trace_level_grant.result
new file mode 100644
index 00000000000..a1471906bba
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/rpl_semi_sync_slave_trace_level_grant.result
@@ -0,0 +1,46 @@
+#
+# MDEV-21967 Bind REPLICATION {MASTER|SLAVE} ADMIN to rpl_semi_sync_* variables
+#
+SET @global=@@global.rpl_semi_sync_slave_trace_level;
+# Test that "SET rpl_semi_sync_slave_trace_level" is not allowed without REPLICATION SLAVE ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE REPLICATION SLAVE ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL rpl_semi_sync_slave_trace_level=64;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, REPLICATION SLAVE ADMIN privilege(s) for this operation
+SET rpl_semi_sync_slave_trace_level=64;
+ERROR HY000: Variable 'rpl_semi_sync_slave_trace_level' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION rpl_semi_sync_slave_trace_level=64;
+ERROR HY000: Variable 'rpl_semi_sync_slave_trace_level' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET rpl_semi_sync_slave_trace_level" is allowed with REPLICATION SLAVE ADMIN
+CREATE USER user1@localhost;
+GRANT REPLICATION SLAVE ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL rpl_semi_sync_slave_trace_level=64;
+SET rpl_semi_sync_slave_trace_level=64;
+ERROR HY000: Variable 'rpl_semi_sync_slave_trace_level' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION rpl_semi_sync_slave_trace_level=64;
+ERROR HY000: Variable 'rpl_semi_sync_slave_trace_level' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET rpl_semi_sync_slave_trace_level" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL rpl_semi_sync_slave_trace_level=64;
+SET rpl_semi_sync_slave_trace_level=64;
+ERROR HY000: Variable 'rpl_semi_sync_slave_trace_level' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION rpl_semi_sync_slave_trace_level=64;
+ERROR HY000: Variable 'rpl_semi_sync_slave_trace_level' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@global.rpl_semi_sync_slave_trace_level=@global;
diff --git a/mysql-test/suite/sys_vars/r/secure_auth_grant.result b/mysql-test/suite/sys_vars/r/secure_auth_grant.result
new file mode 100644
index 00000000000..ed33eb33951
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/secure_auth_grant.result
@@ -0,0 +1,46 @@
+SET @global=@@global.secure_auth;
+#
+# MDEV-21961 Bind CONNECTION ADMIN to a number of global system variables
+#
+# Test that "SET secure_auth" is not allowed without CONNECTION ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE CONNECTION ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL secure_auth=1;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, CONNECTION ADMIN privilege(s) for this operation
+SET secure_auth=1;
+ERROR HY000: Variable 'secure_auth' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION secure_auth=1;
+ERROR HY000: Variable 'secure_auth' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET secure_auth" is allowed with CONNECTION ADMIN
+CREATE USER user1@localhost;
+GRANT CONNECTION ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL secure_auth=1;
+SET secure_auth=1;
+ERROR HY000: Variable 'secure_auth' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION secure_auth=1;
+ERROR HY000: Variable 'secure_auth' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET secure_auth" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL secure_auth=1;
+SET secure_auth=1;
+ERROR HY000: Variable 'secure_auth' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION secure_auth=1;
+ERROR HY000: Variable 'secure_auth' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@global.secure_auth=@global;
diff --git a/mysql-test/suite/sys_vars/r/secure_timestamp_no.result b/mysql-test/suite/sys_vars/r/secure_timestamp_no.result
index 34eeb083c28..fcf04f94476 100644
--- a/mysql-test/suite/sys_vars/r/secure_timestamp_no.result
+++ b/mysql-test/suite/sys_vars/r/secure_timestamp_no.result
@@ -4,10 +4,37 @@ connection slave;
select @@secure_timestamp;
@@secure_timestamp
NO
+### ALL PRIVILEGES
+set timestamp=1234567890.101112;
+select if(now(6) > 20100101, 'READONLY', 'EDITABLE') as 'ALL PRIVILEGES';
+ALL PRIVILEGES
+EDITABLE
+set timestamp=default;
+### SUPER
+create user foo@127.0.0.1;
+grant super on *.* TO `foo`@`127.0.0.1`;
+connect con2,127.0.0.1,foo,,test,$SLAVE_MYPORT;
set timestamp=1234567890.101112;
select if(now(6) > 20100101, 'READONLY', 'EDITABLE') as 'SUPER';
SUPER
EDITABLE
+disconnect con2;
+connection slave;
+drop user foo@127.0.0.1;
+set timestamp=default;
+### BINLOG REPLAY
+create user foo@127.0.0.1;
+grant binlog replay on *.* TO `foo`@`127.0.0.1`;
+connect con2,127.0.0.1,foo,,test,$SLAVE_MYPORT;
+set timestamp=1234567890.101112;
+select if(now(6) > 20100101, 'READONLY', 'EDITABLE') as 'BINLOG REPLAY';
+BINLOG REPLAY
+EDITABLE
+disconnect con2;
+connection slave;
+drop user foo@127.0.0.1;
+set timestamp=default;
+### non-privileged user
create user foo@127.0.0.1;
connect con2,127.0.0.1,foo,,test,$SLAVE_MYPORT;
set timestamp=1234567890.101112;
@@ -17,6 +44,7 @@ EDITABLE
disconnect con2;
connection slave;
drop user foo@127.0.0.1;
+set timestamp=default;
connection master;
set time_zone='+00:00';
set timestamp=1234567890.101112;
diff --git a/mysql-test/suite/sys_vars/r/secure_timestamp_rpl.result b/mysql-test/suite/sys_vars/r/secure_timestamp_rpl.result
index e2d79745a46..d4b25257da3 100644
--- a/mysql-test/suite/sys_vars/r/secure_timestamp_rpl.result
+++ b/mysql-test/suite/sys_vars/r/secure_timestamp_rpl.result
@@ -4,21 +4,49 @@ connection slave;
select @@secure_timestamp;
@@secure_timestamp
REPLICATION
+### ALL PRIVILEGES
set timestamp=1234567890.101112;
-ERROR HY000: The MariaDB server is running with the --secure-timestamp=REPLICATION option so it cannot execute this statement
+select if(now(6) > 20100101, 'READONLY', 'EDITABLE') as 'ALL PRIVILEGES';
+ALL PRIVILEGES
+EDITABLE
+set timestamp=default;
+### SUPER
+create user foo@127.0.0.1;
+grant super on *.* TO `foo`@`127.0.0.1`;
+connect con2,127.0.0.1,foo,,test,$SLAVE_MYPORT;
+set timestamp=1234567890.101112;
+ERROR 42000: Access denied; you need (at least one of) the BINLOG REPLAY privilege(s) for this operation
select if(now(6) > 20100101, 'READONLY', 'EDITABLE') as 'SUPER';
SUPER
READONLY
+disconnect con2;
+connection slave;
+drop user foo@127.0.0.1;
+set timestamp=default;
+### BINLOG REPLAY
+create user foo@127.0.0.1;
+grant binlog replay on *.* TO `foo`@`127.0.0.1`;
+connect con2,127.0.0.1,foo,,test,$SLAVE_MYPORT;
+set timestamp=1234567890.101112;
+select if(now(6) > 20100101, 'READONLY', 'EDITABLE') as 'BINLOG REPLAY';
+BINLOG REPLAY
+EDITABLE
+disconnect con2;
+connection slave;
+drop user foo@127.0.0.1;
+set timestamp=default;
+### non-privileged user
create user foo@127.0.0.1;
connect con2,127.0.0.1,foo,,test,$SLAVE_MYPORT;
set timestamp=1234567890.101112;
-ERROR HY000: The MariaDB server is running with the --secure-timestamp=REPLICATION option so it cannot execute this statement
+ERROR 42000: Access denied; you need (at least one of) the BINLOG REPLAY privilege(s) for this operation
select if(now(6) > 20100101, 'READONLY', 'EDITABLE') as 'non-privileged';
non-privileged
READONLY
disconnect con2;
connection slave;
drop user foo@127.0.0.1;
+set timestamp=default;
connection master;
set time_zone='+00:00';
set timestamp=1234567890.101112;
diff --git a/mysql-test/suite/sys_vars/r/secure_timestamp_super.result b/mysql-test/suite/sys_vars/r/secure_timestamp_super.result
index 6fbb5e5fbf0..e005fdabf8a 100644
--- a/mysql-test/suite/sys_vars/r/secure_timestamp_super.result
+++ b/mysql-test/suite/sys_vars/r/secure_timestamp_super.result
@@ -4,20 +4,48 @@ connection slave;
select @@secure_timestamp;
@@secure_timestamp
SUPER
+### ALL PRIVILEGES
+set timestamp=1234567890.101112;
+select if(now(6) > 20100101, 'READONLY', 'EDITABLE') as 'ALL PRIVILEGES';
+ALL PRIVILEGES
+EDITABLE
+set timestamp=default;
+### SUPER
+create user foo@127.0.0.1;
+grant super on *.* TO `foo`@`127.0.0.1`;
+connect con2,127.0.0.1,foo,,test,$SLAVE_MYPORT;
set timestamp=1234567890.101112;
select if(now(6) > 20100101, 'READONLY', 'EDITABLE') as 'SUPER';
SUPER
EDITABLE
+disconnect con2;
+connection slave;
+drop user foo@127.0.0.1;
+set timestamp=default;
+### BINLOG REPLAY
+create user foo@127.0.0.1;
+grant binlog replay on *.* TO `foo`@`127.0.0.1`;
+connect con2,127.0.0.1,foo,,test,$SLAVE_MYPORT;
+set timestamp=1234567890.101112;
+select if(now(6) > 20100101, 'READONLY', 'EDITABLE') as 'BINLOG REPLAY';
+BINLOG REPLAY
+EDITABLE
+disconnect con2;
+connection slave;
+drop user foo@127.0.0.1;
+set timestamp=default;
+### non-privileged user
create user foo@127.0.0.1;
connect con2,127.0.0.1,foo,,test,$SLAVE_MYPORT;
set timestamp=1234567890.101112;
-ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
+ERROR 42000: Access denied; you need (at least one of) the SUPER, BINLOG REPLAY privilege(s) for this operation
select if(now(6) > 20100101, 'READONLY', 'EDITABLE') as 'non-privileged';
non-privileged
READONLY
disconnect con2;
connection slave;
drop user foo@127.0.0.1;
+set timestamp=default;
connection master;
set time_zone='+00:00';
set timestamp=1234567890.101112;
diff --git a/mysql-test/suite/sys_vars/r/secure_timestamp_yes.result b/mysql-test/suite/sys_vars/r/secure_timestamp_yes.result
index d317cfc30b2..44b310809f6 100644
--- a/mysql-test/suite/sys_vars/r/secure_timestamp_yes.result
+++ b/mysql-test/suite/sys_vars/r/secure_timestamp_yes.result
@@ -4,11 +4,40 @@ connection slave;
select @@secure_timestamp;
@@secure_timestamp
YES
+### ALL PRIVILEGES
+set timestamp=1234567890.101112;
+ERROR HY000: The MariaDB server is running with the --secure-timestamp=YES option so it cannot execute this statement
+select if(now(6) > 20100101, 'READONLY', 'EDITABLE') as 'ALL PRIVILEGES';
+ALL PRIVILEGES
+READONLY
+set timestamp=default;
+### SUPER
+create user foo@127.0.0.1;
+grant super on *.* TO `foo`@`127.0.0.1`;
+connect con2,127.0.0.1,foo,,test,$SLAVE_MYPORT;
set timestamp=1234567890.101112;
ERROR HY000: The MariaDB server is running with the --secure-timestamp=YES option so it cannot execute this statement
select if(now(6) > 20100101, 'READONLY', 'EDITABLE') as 'SUPER';
SUPER
READONLY
+disconnect con2;
+connection slave;
+drop user foo@127.0.0.1;
+set timestamp=default;
+### BINLOG REPLAY
+create user foo@127.0.0.1;
+grant binlog replay on *.* TO `foo`@`127.0.0.1`;
+connect con2,127.0.0.1,foo,,test,$SLAVE_MYPORT;
+set timestamp=1234567890.101112;
+ERROR HY000: The MariaDB server is running with the --secure-timestamp=YES option so it cannot execute this statement
+select if(now(6) > 20100101, 'READONLY', 'EDITABLE') as 'BINLOG REPLAY';
+BINLOG REPLAY
+READONLY
+disconnect con2;
+connection slave;
+drop user foo@127.0.0.1;
+set timestamp=default;
+### non-privileged user
create user foo@127.0.0.1;
connect con2,127.0.0.1,foo,,test,$SLAVE_MYPORT;
set timestamp=1234567890.101112;
@@ -19,6 +48,7 @@ READONLY
disconnect con2;
connection slave;
drop user foo@127.0.0.1;
+set timestamp=default;
connection master;
set time_zone='+00:00';
set timestamp=1234567890.101112;
diff --git a/mysql-test/suite/sys_vars/r/server_id_grant.result b/mysql-test/suite/sys_vars/r/server_id_grant.result
new file mode 100644
index 00000000000..f562560e8da
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/server_id_grant.result
@@ -0,0 +1,69 @@
+#
+# MDEV-21975 Add BINLOG REPLAY privilege and bind new privileges to gtid_seq_no, preudo_thread_id, server_id, gtid_domain_id
+#
+SET @global=@@global.server_id;
+# Test that "SET GLOBAL server_id" is not allowed without REPLICATION MASTER ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE REPLICATION MASTER ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL server_id=1;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, REPLICATION MASTER ADMIN privilege(s) for this operation
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET GLOBAL server_id" is allowed with REPLICATION MASTER ADMIN
+CREATE USER user1@localhost;
+GRANT REPLICATION MASTER ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL server_id=1;
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET GLOBAL server_id" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL server_id=1;
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@global.server_id=@global;
+SET @session=@@session.server_id;
+# Test that "SET server_id" is not allowed without BINLOG REPLAY or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE BINLOG REPLAY, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET server_id=1;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, BINLOG REPLAY privilege(s) for this operation
+SET SESSION server_id=1;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, BINLOG REPLAY privilege(s) for this operation
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET server_id" is allowed with BINLOG REPLAY
+CREATE USER user1@localhost;
+GRANT BINLOG REPLAY ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET server_id=1;
+SET SESSION server_id=1;
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET server_id" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET server_id=1;
+SET SESSION server_id=1;
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@session.server_id=@session;
diff --git a/mysql-test/suite/sys_vars/r/session_track_system_variables_basic.result b/mysql-test/suite/sys_vars/r/session_track_system_variables_basic.result
index 377b50e4481..c3f4a4ee4eb 100644
--- a/mysql-test/suite/sys_vars/r/session_track_system_variables_basic.result
+++ b/mysql-test/suite/sys_vars/r/session_track_system_variables_basic.result
@@ -12,19 +12,13 @@ SELECT @@session.session_track_system_variables;
autocommit,character_set_client,character_set_connection,character_set_results,time_zone
# via INFORMATION_SCHEMA.GLOBAL_VARIABLES
-SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME LIKE 'session_track%' ORDER BY VARIABLE_NAME;
+SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME LIKE 'session_track_system_variables' ORDER BY VARIABLE_NAME;
VARIABLE_NAME VARIABLE_VALUE
-SESSION_TRACK_SCHEMA ON
-SESSION_TRACK_STATE_CHANGE OFF
SESSION_TRACK_SYSTEM_VARIABLES autocommit,character_set_client,character_set_connection,character_set_results,time_zone
-SESSION_TRACK_TRANSACTION_INFO OFF
# via INFORMATION_SCHEMA.SESSION_VARIABLES
-SELECT * FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME LIKE 'session_track%' ORDER BY VARIABLE_NAME;
+SELECT * FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME LIKE 'session_track_system_variables' ORDER BY VARIABLE_NAME;
VARIABLE_NAME VARIABLE_VALUE
-SESSION_TRACK_SCHEMA ON
-SESSION_TRACK_STATE_CHANGE OFF
SESSION_TRACK_SYSTEM_VARIABLES autocommit,character_set_client,character_set_connection,character_set_results,time_zone
-SESSION_TRACK_TRANSACTION_INFO OFF
SET @global_saved_tmp = @@global.session_track_system_variables;
# Altering global variable's value
diff --git a/mysql-test/suite/sys_vars/r/slave_compressed_protocol_grant.result b/mysql-test/suite/sys_vars/r/slave_compressed_protocol_grant.result
new file mode 100644
index 00000000000..2f3f52982ea
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/slave_compressed_protocol_grant.result
@@ -0,0 +1,46 @@
+#
+# MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
+#
+SET @global=@@global.slave_compressed_protocol;
+# Test that "SET slave_compressed_protocol" is not allowed without REPLICATION SLAVE ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE REPLICATION SLAVE ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL slave_compressed_protocol=1;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, REPLICATION SLAVE ADMIN privilege(s) for this operation
+SET slave_compressed_protocol=1;
+ERROR HY000: Variable 'slave_compressed_protocol' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION slave_compressed_protocol=1;
+ERROR HY000: Variable 'slave_compressed_protocol' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET slave_compressed_protocol" is allowed with REPLICATION SLAVE ADMIN
+CREATE USER user1@localhost;
+GRANT REPLICATION SLAVE ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL slave_compressed_protocol=1;
+SET slave_compressed_protocol=1;
+ERROR HY000: Variable 'slave_compressed_protocol' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION slave_compressed_protocol=1;
+ERROR HY000: Variable 'slave_compressed_protocol' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET slave_compressed_protocol" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL slave_compressed_protocol=1;
+SET slave_compressed_protocol=1;
+ERROR HY000: Variable 'slave_compressed_protocol' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION slave_compressed_protocol=1;
+ERROR HY000: Variable 'slave_compressed_protocol' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@global.slave_compressed_protocol=@global;
diff --git a/mysql-test/suite/sys_vars/r/slave_ddl_exec_mode_grant.result b/mysql-test/suite/sys_vars/r/slave_ddl_exec_mode_grant.result
new file mode 100644
index 00000000000..d4f21f1e0ea
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/slave_ddl_exec_mode_grant.result
@@ -0,0 +1,46 @@
+#
+# MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
+#
+SET @global=@@global.slave_ddl_exec_mode;
+# Test that "SET slave_ddl_exec_mode" is not allowed without REPLICATION SLAVE ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE REPLICATION SLAVE ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL slave_ddl_exec_mode=STRICT;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, REPLICATION SLAVE ADMIN privilege(s) for this operation
+SET slave_ddl_exec_mode=STRICT;
+ERROR HY000: Variable 'slave_ddl_exec_mode' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION slave_ddl_exec_mode=STRICT;
+ERROR HY000: Variable 'slave_ddl_exec_mode' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET slave_ddl_exec_mode" is allowed with REPLICATION SLAVE ADMIN
+CREATE USER user1@localhost;
+GRANT REPLICATION SLAVE ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL slave_ddl_exec_mode=STRICT;
+SET slave_ddl_exec_mode=STRICT;
+ERROR HY000: Variable 'slave_ddl_exec_mode' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION slave_ddl_exec_mode=STRICT;
+ERROR HY000: Variable 'slave_ddl_exec_mode' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET slave_ddl_exec_mode" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL slave_ddl_exec_mode=STRICT;
+SET slave_ddl_exec_mode=STRICT;
+ERROR HY000: Variable 'slave_ddl_exec_mode' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION slave_ddl_exec_mode=STRICT;
+ERROR HY000: Variable 'slave_ddl_exec_mode' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@global.slave_ddl_exec_mode=@global;
diff --git a/mysql-test/suite/sys_vars/r/slave_domain_parallel_threads_grant.result b/mysql-test/suite/sys_vars/r/slave_domain_parallel_threads_grant.result
new file mode 100644
index 00000000000..f31e48e276d
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/slave_domain_parallel_threads_grant.result
@@ -0,0 +1,46 @@
+#
+# MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
+#
+SET @global=@@global.slave_domain_parallel_threads;
+# Test that "SET slave_domain_parallel_threads" is not allowed without REPLICATION SLAVE ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE REPLICATION SLAVE ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL slave_domain_parallel_threads=0;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, REPLICATION SLAVE ADMIN privilege(s) for this operation
+SET slave_domain_parallel_threads=0;
+ERROR HY000: Variable 'slave_domain_parallel_threads' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION slave_domain_parallel_threads=0;
+ERROR HY000: Variable 'slave_domain_parallel_threads' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET slave_domain_parallel_threads" is allowed with REPLICATION SLAVE ADMIN
+CREATE USER user1@localhost;
+GRANT REPLICATION SLAVE ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL slave_domain_parallel_threads=0;
+SET slave_domain_parallel_threads=0;
+ERROR HY000: Variable 'slave_domain_parallel_threads' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION slave_domain_parallel_threads=0;
+ERROR HY000: Variable 'slave_domain_parallel_threads' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET slave_domain_parallel_threads" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL slave_domain_parallel_threads=0;
+SET slave_domain_parallel_threads=0;
+ERROR HY000: Variable 'slave_domain_parallel_threads' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION slave_domain_parallel_threads=0;
+ERROR HY000: Variable 'slave_domain_parallel_threads' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@global.slave_domain_parallel_threads=@global;
diff --git a/mysql-test/suite/sys_vars/r/slave_exec_mode_grant.result b/mysql-test/suite/sys_vars/r/slave_exec_mode_grant.result
new file mode 100644
index 00000000000..c1cfdba7c2a
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/slave_exec_mode_grant.result
@@ -0,0 +1,46 @@
+#
+# MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
+#
+SET @global=@@global.slave_exec_mode;
+# Test that "SET slave_exec_mode" is not allowed without REPLICATION SLAVE ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE REPLICATION SLAVE ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL slave_exec_mode=STRICT;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, REPLICATION SLAVE ADMIN privilege(s) for this operation
+SET slave_exec_mode=STRICT;
+ERROR HY000: Variable 'slave_exec_mode' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION slave_exec_mode=STRICT;
+ERROR HY000: Variable 'slave_exec_mode' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET slave_exec_mode" is allowed with REPLICATION SLAVE ADMIN
+CREATE USER user1@localhost;
+GRANT REPLICATION SLAVE ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL slave_exec_mode=STRICT;
+SET slave_exec_mode=STRICT;
+ERROR HY000: Variable 'slave_exec_mode' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION slave_exec_mode=STRICT;
+ERROR HY000: Variable 'slave_exec_mode' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET slave_exec_mode" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL slave_exec_mode=STRICT;
+SET slave_exec_mode=STRICT;
+ERROR HY000: Variable 'slave_exec_mode' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION slave_exec_mode=STRICT;
+ERROR HY000: Variable 'slave_exec_mode' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@global.slave_exec_mode=@global;
diff --git a/mysql-test/suite/sys_vars/r/slave_max_allowed_packet_grant.result b/mysql-test/suite/sys_vars/r/slave_max_allowed_packet_grant.result
new file mode 100644
index 00000000000..664d580e1a6
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/slave_max_allowed_packet_grant.result
@@ -0,0 +1,46 @@
+#
+# MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
+#
+SET @global=@@global.slave_max_allowed_packet;
+# Test that "SET slave_max_allowed_packet" is not allowed without REPLICATION SLAVE ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE REPLICATION SLAVE ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL slave_max_allowed_packet=65536;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, REPLICATION SLAVE ADMIN privilege(s) for this operation
+SET slave_max_allowed_packet=65536;
+ERROR HY000: Variable 'slave_max_allowed_packet' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION slave_max_allowed_packet=65536;
+ERROR HY000: Variable 'slave_max_allowed_packet' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET slave_max_allowed_packet" is allowed with REPLICATION SLAVE ADMIN
+CREATE USER user1@localhost;
+GRANT REPLICATION SLAVE ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL slave_max_allowed_packet=65536;
+SET slave_max_allowed_packet=65536;
+ERROR HY000: Variable 'slave_max_allowed_packet' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION slave_max_allowed_packet=65536;
+ERROR HY000: Variable 'slave_max_allowed_packet' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET slave_max_allowed_packet" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL slave_max_allowed_packet=65536;
+SET slave_max_allowed_packet=65536;
+ERROR HY000: Variable 'slave_max_allowed_packet' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION slave_max_allowed_packet=65536;
+ERROR HY000: Variable 'slave_max_allowed_packet' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@global.slave_max_allowed_packet=@global;
diff --git a/mysql-test/suite/sys_vars/r/slave_net_timeout_grant.result b/mysql-test/suite/sys_vars/r/slave_net_timeout_grant.result
new file mode 100644
index 00000000000..2b6664ab31f
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/slave_net_timeout_grant.result
@@ -0,0 +1,46 @@
+#
+# MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
+#
+SET @global=@@global.slave_net_timeout;
+# Test that "SET slave_net_timeout" is not allowed without REPLICATION SLAVE ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE REPLICATION SLAVE ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL slave_net_timeout=60;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, REPLICATION SLAVE ADMIN privilege(s) for this operation
+SET slave_net_timeout=60;
+ERROR HY000: Variable 'slave_net_timeout' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION slave_net_timeout=60;
+ERROR HY000: Variable 'slave_net_timeout' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET slave_net_timeout" is allowed with REPLICATION SLAVE ADMIN
+CREATE USER user1@localhost;
+GRANT REPLICATION SLAVE ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL slave_net_timeout=60;
+SET slave_net_timeout=60;
+ERROR HY000: Variable 'slave_net_timeout' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION slave_net_timeout=60;
+ERROR HY000: Variable 'slave_net_timeout' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET slave_net_timeout" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL slave_net_timeout=60;
+SET slave_net_timeout=60;
+ERROR HY000: Variable 'slave_net_timeout' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION slave_net_timeout=60;
+ERROR HY000: Variable 'slave_net_timeout' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@global.slave_net_timeout=@global;
diff --git a/mysql-test/suite/sys_vars/r/slave_parallel_max_queued_grant.result b/mysql-test/suite/sys_vars/r/slave_parallel_max_queued_grant.result
new file mode 100644
index 00000000000..315de47853b
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/slave_parallel_max_queued_grant.result
@@ -0,0 +1,46 @@
+#
+# MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
+#
+SET @global=@@global.slave_parallel_max_queued;
+# Test that "SET slave_parallel_max_queued" is not allowed without REPLICATION SLAVE ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE REPLICATION SLAVE ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL slave_parallel_max_queued=65536;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, REPLICATION SLAVE ADMIN privilege(s) for this operation
+SET slave_parallel_max_queued=65536;
+ERROR HY000: Variable 'slave_parallel_max_queued' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION slave_parallel_max_queued=65536;
+ERROR HY000: Variable 'slave_parallel_max_queued' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET slave_parallel_max_queued" is allowed with REPLICATION SLAVE ADMIN
+CREATE USER user1@localhost;
+GRANT REPLICATION SLAVE ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL slave_parallel_max_queued=65536;
+SET slave_parallel_max_queued=65536;
+ERROR HY000: Variable 'slave_parallel_max_queued' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION slave_parallel_max_queued=65536;
+ERROR HY000: Variable 'slave_parallel_max_queued' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET slave_parallel_max_queued" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL slave_parallel_max_queued=65536;
+SET slave_parallel_max_queued=65536;
+ERROR HY000: Variable 'slave_parallel_max_queued' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION slave_parallel_max_queued=65536;
+ERROR HY000: Variable 'slave_parallel_max_queued' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@global.slave_parallel_max_queued=@global;
diff --git a/mysql-test/suite/sys_vars/r/slave_parallel_mode_grant.result b/mysql-test/suite/sys_vars/r/slave_parallel_mode_grant.result
new file mode 100644
index 00000000000..6d5da37da7a
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/slave_parallel_mode_grant.result
@@ -0,0 +1,46 @@
+#
+# MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
+#
+SET @global=@@global.slave_parallel_mode;
+# Test that "SET slave_parallel_mode" is not allowed without REPLICATION SLAVE ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE REPLICATION SLAVE ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL slave_parallel_mode=1;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, REPLICATION SLAVE ADMIN privilege(s) for this operation
+SET slave_parallel_mode=1;
+ERROR HY000: Variable 'slave_parallel_mode' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION slave_parallel_mode=1;
+ERROR HY000: Variable 'slave_parallel_mode' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET slave_parallel_mode" is allowed with REPLICATION SLAVE ADMIN
+CREATE USER user1@localhost;
+GRANT REPLICATION SLAVE ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL slave_parallel_mode=1;
+SET slave_parallel_mode=1;
+ERROR HY000: Variable 'slave_parallel_mode' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION slave_parallel_mode=1;
+ERROR HY000: Variable 'slave_parallel_mode' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET slave_parallel_mode" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL slave_parallel_mode=1;
+SET slave_parallel_mode=1;
+ERROR HY000: Variable 'slave_parallel_mode' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION slave_parallel_mode=1;
+ERROR HY000: Variable 'slave_parallel_mode' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@global.slave_parallel_mode=@global;
diff --git a/mysql-test/suite/sys_vars/r/slave_parallel_threads_grant.result b/mysql-test/suite/sys_vars/r/slave_parallel_threads_grant.result
new file mode 100644
index 00000000000..147252f78e3
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/slave_parallel_threads_grant.result
@@ -0,0 +1,46 @@
+#
+# MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
+#
+SET @global=@@global.slave_parallel_threads;
+# Test that "SET slave_parallel_threads" is not allowed without REPLICATION SLAVE ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE REPLICATION SLAVE ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL slave_parallel_threads=256;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, REPLICATION SLAVE ADMIN privilege(s) for this operation
+SET slave_parallel_threads=256;
+ERROR HY000: Variable 'slave_parallel_threads' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION slave_parallel_threads=256;
+ERROR HY000: Variable 'slave_parallel_threads' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET slave_parallel_threads" is allowed with REPLICATION SLAVE ADMIN
+CREATE USER user1@localhost;
+GRANT REPLICATION SLAVE ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL slave_parallel_threads=256;
+SET slave_parallel_threads=256;
+ERROR HY000: Variable 'slave_parallel_threads' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION slave_parallel_threads=256;
+ERROR HY000: Variable 'slave_parallel_threads' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET slave_parallel_threads" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL slave_parallel_threads=256;
+SET slave_parallel_threads=256;
+ERROR HY000: Variable 'slave_parallel_threads' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION slave_parallel_threads=256;
+ERROR HY000: Variable 'slave_parallel_threads' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@global.slave_parallel_threads=@global;
diff --git a/mysql-test/suite/sys_vars/r/slave_parallel_workers_grant.result b/mysql-test/suite/sys_vars/r/slave_parallel_workers_grant.result
new file mode 100644
index 00000000000..1985cc429e5
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/slave_parallel_workers_grant.result
@@ -0,0 +1,46 @@
+#
+# MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
+#
+SET @global=@@global.slave_parallel_workers;
+# Test that "SET slave_parallel_workers" is not allowed without REPLICATION SLAVE ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE REPLICATION SLAVE ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL slave_parallel_workers=256;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, REPLICATION SLAVE ADMIN privilege(s) for this operation
+SET slave_parallel_workers=256;
+ERROR HY000: Variable 'slave_parallel_workers' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION slave_parallel_workers=256;
+ERROR HY000: Variable 'slave_parallel_workers' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET slave_parallel_workers" is allowed with REPLICATION SLAVE ADMIN
+CREATE USER user1@localhost;
+GRANT REPLICATION SLAVE ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL slave_parallel_workers=256;
+SET slave_parallel_workers=256;
+ERROR HY000: Variable 'slave_parallel_workers' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION slave_parallel_workers=256;
+ERROR HY000: Variable 'slave_parallel_workers' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET slave_parallel_workers" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL slave_parallel_workers=256;
+SET slave_parallel_workers=256;
+ERROR HY000: Variable 'slave_parallel_workers' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION slave_parallel_workers=256;
+ERROR HY000: Variable 'slave_parallel_workers' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@global.slave_parallel_workers=@global;
diff --git a/mysql-test/suite/sys_vars/r/slave_run_triggers_for_rbr_grant.result b/mysql-test/suite/sys_vars/r/slave_run_triggers_for_rbr_grant.result
new file mode 100644
index 00000000000..fd33c95f768
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/slave_run_triggers_for_rbr_grant.result
@@ -0,0 +1,46 @@
+#
+# MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
+#
+SET @global=@@global.slave_run_triggers_for_rbr;
+# Test that "SET slave_run_triggers_for_rbr" is not allowed without REPLICATION SLAVE ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE REPLICATION SLAVE ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL slave_run_triggers_for_rbr=YES;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, REPLICATION SLAVE ADMIN privilege(s) for this operation
+SET slave_run_triggers_for_rbr=YES;
+ERROR HY000: Variable 'slave_run_triggers_for_rbr' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION slave_run_triggers_for_rbr=YES;
+ERROR HY000: Variable 'slave_run_triggers_for_rbr' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET slave_run_triggers_for_rbr" is allowed with REPLICATION SLAVE ADMIN
+CREATE USER user1@localhost;
+GRANT REPLICATION SLAVE ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL slave_run_triggers_for_rbr=YES;
+SET slave_run_triggers_for_rbr=YES;
+ERROR HY000: Variable 'slave_run_triggers_for_rbr' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION slave_run_triggers_for_rbr=YES;
+ERROR HY000: Variable 'slave_run_triggers_for_rbr' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET slave_run_triggers_for_rbr" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL slave_run_triggers_for_rbr=YES;
+SET slave_run_triggers_for_rbr=YES;
+ERROR HY000: Variable 'slave_run_triggers_for_rbr' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION slave_run_triggers_for_rbr=YES;
+ERROR HY000: Variable 'slave_run_triggers_for_rbr' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@global.slave_run_triggers_for_rbr=@global;
diff --git a/mysql-test/suite/sys_vars/r/slave_sql_verify_checksum_grant.result b/mysql-test/suite/sys_vars/r/slave_sql_verify_checksum_grant.result
new file mode 100644
index 00000000000..1cc4f3f3ef9
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/slave_sql_verify_checksum_grant.result
@@ -0,0 +1,46 @@
+#
+# MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
+#
+SET @global=@@global.slave_sql_verify_checksum;
+# Test that "SET slave_sql_verify_checksum" is not allowed without REPLICATION SLAVE ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE REPLICATION SLAVE ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL slave_sql_verify_checksum=1;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, REPLICATION SLAVE ADMIN privilege(s) for this operation
+SET slave_sql_verify_checksum=1;
+ERROR HY000: Variable 'slave_sql_verify_checksum' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION slave_sql_verify_checksum=1;
+ERROR HY000: Variable 'slave_sql_verify_checksum' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET slave_sql_verify_checksum" is allowed with REPLICATION SLAVE ADMIN
+CREATE USER user1@localhost;
+GRANT REPLICATION SLAVE ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL slave_sql_verify_checksum=1;
+SET slave_sql_verify_checksum=1;
+ERROR HY000: Variable 'slave_sql_verify_checksum' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION slave_sql_verify_checksum=1;
+ERROR HY000: Variable 'slave_sql_verify_checksum' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET slave_sql_verify_checksum" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL slave_sql_verify_checksum=1;
+SET slave_sql_verify_checksum=1;
+ERROR HY000: Variable 'slave_sql_verify_checksum' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION slave_sql_verify_checksum=1;
+ERROR HY000: Variable 'slave_sql_verify_checksum' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@global.slave_sql_verify_checksum=@global;
diff --git a/mysql-test/suite/sys_vars/r/slave_transaction_retry_interval_grant.result b/mysql-test/suite/sys_vars/r/slave_transaction_retry_interval_grant.result
new file mode 100644
index 00000000000..e2e5e3963b5
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/slave_transaction_retry_interval_grant.result
@@ -0,0 +1,46 @@
+#
+# MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
+#
+SET @global=@@global.slave_transaction_retry_interval;
+# Test that "SET slave_transaction_retry_interval" is not allowed without REPLICATION SLAVE ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE REPLICATION SLAVE ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL slave_transaction_retry_interval=256;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, REPLICATION SLAVE ADMIN privilege(s) for this operation
+SET slave_transaction_retry_interval=256;
+ERROR HY000: Variable 'slave_transaction_retry_interval' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION slave_transaction_retry_interval=256;
+ERROR HY000: Variable 'slave_transaction_retry_interval' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET slave_transaction_retry_interval" is allowed with REPLICATION SLAVE ADMIN
+CREATE USER user1@localhost;
+GRANT REPLICATION SLAVE ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL slave_transaction_retry_interval=256;
+SET slave_transaction_retry_interval=256;
+ERROR HY000: Variable 'slave_transaction_retry_interval' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION slave_transaction_retry_interval=256;
+ERROR HY000: Variable 'slave_transaction_retry_interval' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET slave_transaction_retry_interval" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL slave_transaction_retry_interval=256;
+SET slave_transaction_retry_interval=256;
+ERROR HY000: Variable 'slave_transaction_retry_interval' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION slave_transaction_retry_interval=256;
+ERROR HY000: Variable 'slave_transaction_retry_interval' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@global.slave_transaction_retry_interval=@global;
diff --git a/mysql-test/suite/sys_vars/r/slave_type_conversions_grant.result b/mysql-test/suite/sys_vars/r/slave_type_conversions_grant.result
new file mode 100644
index 00000000000..01022e73dcb
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/slave_type_conversions_grant.result
@@ -0,0 +1,46 @@
+#
+# MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
+#
+SET @global=@@global.slave_type_conversions;
+# Test that "SET slave_type_conversions" is not allowed without REPLICATION SLAVE ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE REPLICATION SLAVE ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL slave_type_conversions=ALL_NON_LOSSY;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, REPLICATION SLAVE ADMIN privilege(s) for this operation
+SET slave_type_conversions=ALL_NON_LOSSY;
+ERROR HY000: Variable 'slave_type_conversions' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION slave_type_conversions=ALL_NON_LOSSY;
+ERROR HY000: Variable 'slave_type_conversions' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET slave_type_conversions" is allowed with REPLICATION SLAVE ADMIN
+CREATE USER user1@localhost;
+GRANT REPLICATION SLAVE ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL slave_type_conversions=ALL_NON_LOSSY;
+SET slave_type_conversions=ALL_NON_LOSSY;
+ERROR HY000: Variable 'slave_type_conversions' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION slave_type_conversions=ALL_NON_LOSSY;
+ERROR HY000: Variable 'slave_type_conversions' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET slave_type_conversions" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL slave_type_conversions=ALL_NON_LOSSY;
+SET slave_type_conversions=ALL_NON_LOSSY;
+ERROR HY000: Variable 'slave_type_conversions' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION slave_type_conversions=ALL_NON_LOSSY;
+ERROR HY000: Variable 'slave_type_conversions' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@global.slave_type_conversions=@global;
diff --git a/mysql-test/suite/sys_vars/r/slow_launch_time_grant.result b/mysql-test/suite/sys_vars/r/slow_launch_time_grant.result
new file mode 100644
index 00000000000..45aef07d473
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/slow_launch_time_grant.result
@@ -0,0 +1,46 @@
+SET @global=@@global.slow_launch_time;
+#
+# MDEV-21961 Bind CONNECTION ADMIN to a number of global system variables
+#
+# Test that "SET slow_launch_time" is not allowed without CONNECTION ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE CONNECTION ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL slow_launch_time=10;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, CONNECTION ADMIN privilege(s) for this operation
+SET slow_launch_time=10;
+ERROR HY000: Variable 'slow_launch_time' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION slow_launch_time=10;
+ERROR HY000: Variable 'slow_launch_time' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET slow_launch_time" is allowed with CONNECTION ADMIN
+CREATE USER user1@localhost;
+GRANT CONNECTION ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL slow_launch_time=10;
+SET slow_launch_time=10;
+ERROR HY000: Variable 'slow_launch_time' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION slow_launch_time=10;
+ERROR HY000: Variable 'slow_launch_time' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET slow_launch_time" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL slow_launch_time=10;
+SET slow_launch_time=10;
+ERROR HY000: Variable 'slow_launch_time' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION slow_launch_time=10;
+ERROR HY000: Variable 'slow_launch_time' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@global.slow_launch_time=@global;
diff --git a/mysql-test/suite/sys_vars/r/slow_query_log_file_basic.result b/mysql-test/suite/sys_vars/r/slow_query_log_file_basic.result
index 74cf0da9338..47bc780c96a 100644
--- a/mysql-test/suite/sys_vars/r/slow_query_log_file_basic.result
+++ b/mysql-test/suite/sys_vars/r/slow_query_log_file_basic.result
@@ -16,7 +16,7 @@ ERROR 42000: Variable 'slow_query_log_file' can't be set to the value of '/tmp/m
SET @@global.general_log_file = '.my.cnf';
ERROR 42000: Variable 'general_log_file' can't be set to the value of '.my.cnf'
SET @@global.general_log_file = 'my.cnf\0foo';
-ERROR 42000: Variable 'general_log_file' can't be set to the value of 'my.cnf'
+ERROR 42000: Variable 'general_log_file' can't be set to the value of 'my.cnf\0000foo'
SET @@global.general_log_file = 'my.ini';
ERROR 42000: Variable 'general_log_file' can't be set to the value of 'my.ini'
'#----------------------FN_DYNVARS_004_03------------------------#'
diff --git a/mysql-test/suite/sys_vars/r/sql_big_tables_basic.result b/mysql-test/suite/sys_vars/r/sql_big_tables_basic.result
deleted file mode 100644
index 09553ae7d57..00000000000
--- a/mysql-test/suite/sys_vars/r/sql_big_tables_basic.result
+++ /dev/null
@@ -1,109 +0,0 @@
-SET @session_start_value = @@session.sql_big_tables;
-SELECT @session_start_value;
-@session_start_value
-0
-'#--------------------FN_DYNVARS_154_01------------------------#'
-SET @@session.sql_big_tables = 0;
-SET @@session.sql_big_tables = DEFAULT;
-SELECT @@session.sql_big_tables;
-@@session.sql_big_tables
-0
-SET @@session.sql_big_tables = 1;
-SET @@session.sql_big_tables = DEFAULT;
-SELECT @@session.sql_big_tables;
-@@session.sql_big_tables
-0
-'#---------------------FN_DYNVARS_154_02-------------------------#'
-SET sql_big_tables = 1;
-SELECT @@sql_big_tables;
-@@sql_big_tables
-1
-SELECT session.sql_big_tables;
-ERROR 42S02: Unknown table 'session' in field list
-SELECT local.sql_big_tables;
-ERROR 42S02: Unknown table 'local' in field list
-SET session sql_big_tables = 0;
-SELECT @@session.sql_big_tables;
-@@session.sql_big_tables
-0
-'#--------------------FN_DYNVARS_154_03------------------------#'
-SET @@session.sql_big_tables = 0;
-SELECT @@session.sql_big_tables;
-@@session.sql_big_tables
-0
-SET @@session.sql_big_tables = 1;
-SELECT @@session.sql_big_tables;
-@@session.sql_big_tables
-1
-'#--------------------FN_DYNVARS_154_04-------------------------#'
-SET @@session.sql_big_tables = -1;
-ERROR 42000: Variable 'sql_big_tables' can't be set to the value of '-1'
-SET @@session.sql_big_tables = 2;
-ERROR 42000: Variable 'sql_big_tables' can't be set to the value of '2'
-SET @@session.sql_big_tables = "T";
-ERROR 42000: Variable 'sql_big_tables' can't be set to the value of 'T'
-SET @@session.sql_big_tables = "Y";
-ERROR 42000: Variable 'sql_big_tables' can't be set to the value of 'Y'
-SET @@session.sql_big_tables = TRÜE;
-ERROR 42000: Variable 'sql_big_tables' can't be set to the value of 'TRÜE'
-SET @@session.sql_big_tables = ÕN;
-ERROR 42000: Variable 'sql_big_tables' can't be set to the value of 'ÕN'
-SET @@session.sql_big_tables = OF;
-ERROR 42000: Variable 'sql_big_tables' can't be set to the value of 'OF'
-SET @@session.sql_big_tables = ÓFF;
-ERROR 42000: Variable 'sql_big_tables' can't be set to the value of 'ÓFF'
-SET @@session.sql_big_tables = '¹';
-ERROR 42000: Variable 'sql_big_tables' can't be set to the value of '¹'
-SET @@session.sql_big_tables = NO;
-ERROR 42000: Variable 'sql_big_tables' can't be set to the value of 'NO'
-'#-------------------FN_DYNVARS_154_05----------------------------#'
-SET @@global.sql_big_tables = 1-@@global.sql_big_tables;
-SELECT @@global.sql_big_tables;
-@@global.sql_big_tables
-1
-SET @@global.sql_big_tables = 1-@@global.sql_big_tables;
-SELECT @@global.sql_big_tables;
-@@global.sql_big_tables
-0
-'#----------------------FN_DYNVARS_154_06------------------------#'
-SELECT count(VARIABLE_VALUE)
-FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='sql_big_tables';
-count(VARIABLE_VALUE)
-1
-'#----------------------FN_DYNVARS_154_07------------------------#'
-SELECT IF(@@session.sql_big_tables, "ON", "OFF") = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.SESSION_VARIABLES
-WHERE VARIABLE_NAME='sql_big_tables';
-IF(@@session.sql_big_tables, "ON", "OFF") = VARIABLE_VALUE
-1
-SELECT @@session.sql_big_tables;
-@@session.sql_big_tables
-1
-SELECT VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.SESSION_VARIABLES
-WHERE VARIABLE_NAME='sql_big_tables';
-VARIABLE_VALUE
-ON
-'#---------------------FN_DYNVARS_154_08-------------------------#'
-SET @@session.sql_big_tables = OFF;
-SELECT @@session.sql_big_tables;
-@@session.sql_big_tables
-0
-SET @@session.sql_big_tables = ON;
-SELECT @@session.sql_big_tables;
-@@session.sql_big_tables
-1
-'#---------------------FN_DYNVARS_154_09----------------------#'
-SET @@session.sql_big_tables = TRUE;
-SELECT @@session.sql_big_tables;
-@@session.sql_big_tables
-1
-SET @@session.sql_big_tables = FALSE;
-SELECT @@session.sql_big_tables;
-@@session.sql_big_tables
-0
-SET @@session.sql_big_tables = @session_start_value;
-SELECT @@session.sql_big_tables;
-@@session.sql_big_tables
-0
diff --git a/mysql-test/suite/sys_vars/r/sql_big_tables_func.result b/mysql-test/suite/sys_vars/r/sql_big_tables_func.result
deleted file mode 100644
index cf42cb742b2..00000000000
--- a/mysql-test/suite/sys_vars/r/sql_big_tables_func.result
+++ /dev/null
@@ -1,96 +0,0 @@
-** Setup **
-
-SET @old_big_tables = @@SESSION.sql_big_tables;
-CREATE TABLE t1(a varchar(20), b varchar(20));
-INSERT INTO t1 VALUES('aa','bb');
-INSERT INTO t1 VALUES('aa','bb');
-INSERT INTO t1 VALUES('aa','bb');
-INSERT INTO t1 VALUES('aa','bb');
-INSERT INTO t1 VALUES('aa','bb');
-'#--------------------FN_DYNVARS_155_01-------------------------#'
-SET SESSION sql_big_tables = 1;
-SET @diskTableCount = 0;
-SET @tempTableCount = 0;
-select count(a), b from t1 group by b;
-count(a) b
-5 bb
-SET @diskTableCount = 1 - @diskTableCount;
-SET @tempTableCount = 1 - @tempTableCount;
-SELECT @diskTableCount;
-@diskTableCount
-1
-1 Expected
-SELECT @tempTableCount;
-@tempTableCount
-1
-1 Expected
-'#--------------------FN_DYNVARS_155_02-------------------------#'
-SET SESSION sql_big_tables = 0;
-SET @diskTableCount = 1;
-SET @tempTableCount = 1;
-SELECT * FROM (SELECT ta.b as a, tb.a as b FROM t1 as ta INNER JOIN t1 as tb ON ta.a = tb.a) sub;
-a b
-bb aa
-bb aa
-bb aa
-bb aa
-bb aa
-bb aa
-bb aa
-bb aa
-bb aa
-bb aa
-bb aa
-bb aa
-bb aa
-bb aa
-bb aa
-bb aa
-bb aa
-bb aa
-bb aa
-bb aa
-bb aa
-bb aa
-bb aa
-bb aa
-bb aa
-SET @diskTableCount = 1 - @diskTableCount;
-SET @tempTableCount = 2 - @tempTableCount;
-SELECT @diskTableCount;
-@diskTableCount
-0
-0 Expected
-SELECT @tempTableCount;
-@tempTableCount
-1
-1 Expected
-'#--------------------FN_DYNVARS_155_03-------------------------#'
-** Connecting con_int1 using root **
-** Connection con_int1 **
-SELECT @@SESSION.sql_big_tables;
-@@SESSION.sql_big_tables
-0
-0 / FALSE Expected;
-SET SESSION sql_big_tables = FALSE;
-** Connecting con_int2 using root **
-** Connection con_int2 **
-SELECT @@SESSION.sql_big_tables;
-@@SESSION.sql_big_tables
-0
-0 / FALSE Expected;
-SET SESSION sql_big_tables = TRUE;
-** Connection con_int1 **
-SELECT @@SESSION.sql_big_tables;
-@@SESSION.sql_big_tables
-0
-0 / FALSE Expected;
-** Connection con_int2 **
-SELECT @@SESSION.sql_big_tables;
-@@SESSION.sql_big_tables
-1
-1 / TRUE Expected;
-** Connection default **
-Disconnecting Connections con_int1, con_int2
-SET SESSION sql_big_tables = @old_big_tables;
-DROP TABLE t1;
diff --git a/mysql-test/suite/sys_vars/r/sql_log_bin_grant.result b/mysql-test/suite/sys_vars/r/sql_log_bin_grant.result
new file mode 100644
index 00000000000..574c53e1f0a
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/sql_log_bin_grant.result
@@ -0,0 +1,42 @@
+#
+#
+#
+# Test that "SET sql_log_bin" is not allowed without BINLOG ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE BINLOG ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET sql_log_bin=1;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, BINLOG ADMIN privilege(s) for this operation
+SET GLOBAL sql_log_bin=1;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, BINLOG ADMIN privilege(s) for this operation
+SET SESSION sql_log_bin=1;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, BINLOG ADMIN privilege(s) for this operation
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET sql_log_bin" is allowed with BINLOG ADMIN
+CREATE USER user1@localhost;
+GRANT BINLOG ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET sql_log_bin=1;
+SET GLOBAL sql_log_bin=1;
+ERROR HY000: Variable 'sql_log_bin' is a SESSION variable
+SET SESSION sql_log_bin=1;
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET sql_log_bin" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET sql_log_bin=1;
+SET GLOBAL sql_log_bin=1;
+ERROR HY000: Variable 'sql_log_bin' is a SESSION variable
+SET SESSION sql_log_bin=1;
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
diff --git a/mysql-test/suite/sys_vars/r/storage_engine_basic.result b/mysql-test/suite/sys_vars/r/storage_engine_basic.result
index 9461707dd79..013c36c80a0 100644
--- a/mysql-test/suite/sys_vars/r/storage_engine_basic.result
+++ b/mysql-test/suite/sys_vars/r/storage_engine_basic.result
@@ -2,46 +2,70 @@ SET @start_global_value = @@global.storage_engine;
SET @start_session_value = @@session.storage_engine;
'#--------------------FN_DYNVARS_005_01-------------------------#'
SET @@global.storage_engine = INNODB;
+Warnings:
+Warning 1287 '@@storage_engine' is deprecated and will be removed in a future release. Please use '@@default_storage_engine' instead
SET @@global.storage_engine = DEFAULT;
+Warnings:
+Warning 1287 '@@storage_engine' is deprecated and will be removed in a future release. Please use '@@default_storage_engine' instead
SELECT @@global.storage_engine;
@@global.storage_engine
InnoDB
SET @@session.storage_engine = INNODB;
+Warnings:
+Warning 1287 '@@storage_engine' is deprecated and will be removed in a future release. Please use '@@default_storage_engine' instead
SET @@session.storage_engine = DEFAULT;
+Warnings:
+Warning 1287 '@@storage_engine' is deprecated and will be removed in a future release. Please use '@@default_storage_engine' instead
SELECT @@session.storage_engine;
@@session.storage_engine
InnoDB
'#--------------------FN_DYNVARS_005_02-------------------------#'
SET @@global.storage_engine = MYISAM;
+Warnings:
+Warning 1287 '@@storage_engine' is deprecated and will be removed in a future release. Please use '@@default_storage_engine' instead
SELECT @@global.storage_engine;
@@global.storage_engine
MyISAM
SET @@global.storage_engine = MERGE;
+Warnings:
+Warning 1287 '@@storage_engine' is deprecated and will be removed in a future release. Please use '@@default_storage_engine' instead
SELECT @@global.storage_engine;
@@global.storage_engine
MRG_MyISAM
SET @@global.storage_engine = MEMORY;
+Warnings:
+Warning 1287 '@@storage_engine' is deprecated and will be removed in a future release. Please use '@@default_storage_engine' instead
SELECT @@global.storage_engine;
@@global.storage_engine
MEMORY
SET @@global.storage_engine = INNODB;
+Warnings:
+Warning 1287 '@@storage_engine' is deprecated and will be removed in a future release. Please use '@@default_storage_engine' instead
SELECT @@global.storage_engine;
@@global.storage_engine
InnoDB
'#--------------------FN_DYNVARS_005_03-------------------------#'
SET @@session.storage_engine = MYISAM;
+Warnings:
+Warning 1287 '@@storage_engine' is deprecated and will be removed in a future release. Please use '@@default_storage_engine' instead
SELECT @@session.storage_engine;
@@session.storage_engine
MyISAM
SET @@session.storage_engine = MERGE;
+Warnings:
+Warning 1287 '@@storage_engine' is deprecated and will be removed in a future release. Please use '@@default_storage_engine' instead
SELECT @@session.storage_engine;
@@session.storage_engine
MRG_MyISAM
SET @@session.storage_engine = MEMORY;
+Warnings:
+Warning 1287 '@@storage_engine' is deprecated and will be removed in a future release. Please use '@@default_storage_engine' instead
SELECT @@session.storage_engine;
@@session.storage_engine
MEMORY
SET @@session.storage_engine = INNODB;
+Warnings:
+Warning 1287 '@@storage_engine' is deprecated and will be removed in a future release. Please use '@@default_storage_engine' instead
SELECT @@session.storage_engine;
@@session.storage_engine
InnoDB
@@ -83,6 +107,8 @@ SET @@global.storage_engine = FALSE;
ERROR 42000: Incorrect argument type to variable 'storage_engine'
'#---------------------FN_DYNVARS_001_8----------------------#'
SET @@storage_engine = MYISAM;
+Warnings:
+Warning 1287 '@@storage_engine' is deprecated and will be removed in a future release. Please use '@@default_storage_engine' instead
SELECT @@storage_engine = @@local.storage_engine;
@@storage_engine = @@local.storage_engine
1
@@ -91,6 +117,8 @@ SELECT @@local.storage_engine = @@session.storage_engine;
1
'#---------------------FN_DYNVARS_001_9----------------------#'
SET storage_engine = MEMORY;
+Warnings:
+Warning 1287 '@@storage_engine' is deprecated and will be removed in a future release. Please use '@@default_storage_engine' instead
SELECT @@storage_engine;
@@storage_engine
MEMORY
@@ -101,5 +129,11 @@ ERROR 42S02: Unknown table 'session' in field list
SELECT storage_engine = @@session.storage_engine;
ERROR 42S22: Unknown column 'storage_engine' in 'field list'
SET @@storage_engine = @start_global_value;
+Warnings:
+Warning 1287 '@@storage_engine' is deprecated and will be removed in a future release. Please use '@@default_storage_engine' instead
SET @@global.storage_engine = @start_global_value;
+Warnings:
+Warning 1287 '@@storage_engine' is deprecated and will be removed in a future release. Please use '@@default_storage_engine' instead
SET @@session.storage_engine = @start_session_value;
+Warnings:
+Warning 1287 '@@storage_engine' is deprecated and will be removed in a future release. Please use '@@default_storage_engine' instead
diff --git a/mysql-test/suite/sys_vars/r/sync_binlog_grant.result b/mysql-test/suite/sys_vars/r/sync_binlog_grant.result
new file mode 100644
index 00000000000..1fcdf8b000e
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/sync_binlog_grant.result
@@ -0,0 +1,46 @@
+#
+# MDEV-21963 Bind BINLOG ADMIN to a number of global system variables
+#
+SET @global=@@global.sync_binlog;
+# Test that "SET sync_binlog" is not allowed without BINLOG ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE BINLOG ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL sync_binlog=10;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, BINLOG ADMIN privilege(s) for this operation
+SET sync_binlog=10;
+ERROR HY000: Variable 'sync_binlog' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION sync_binlog=10;
+ERROR HY000: Variable 'sync_binlog' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET sync_binlog" is allowed with BINLOG ADMIN
+CREATE USER user1@localhost;
+GRANT BINLOG ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL sync_binlog=10;
+SET sync_binlog=10;
+ERROR HY000: Variable 'sync_binlog' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION sync_binlog=10;
+ERROR HY000: Variable 'sync_binlog' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET sync_binlog" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL sync_binlog=10;
+SET sync_binlog=10;
+ERROR HY000: Variable 'sync_binlog' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION sync_binlog=10;
+ERROR HY000: Variable 'sync_binlog' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@global.sync_binlog=@global;
diff --git a/mysql-test/suite/sys_vars/r/sync_master_info_grant.result b/mysql-test/suite/sys_vars/r/sync_master_info_grant.result
new file mode 100644
index 00000000000..40b04ea4480
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/sync_master_info_grant.result
@@ -0,0 +1,46 @@
+#
+# MDEV-21969 Bind REPLICATION SLAVE ADMIN to relay_log_*, sync_master_info, sync_relay_log, sync_relay_log_info
+#
+SET @global=@@global.sync_master_info;
+# Test that "SET sync_master_info" is not allowed without REPLICATION SLAVE ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE REPLICATION SLAVE ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL sync_master_info=20000;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, REPLICATION SLAVE ADMIN privilege(s) for this operation
+SET sync_master_info=20000;
+ERROR HY000: Variable 'sync_master_info' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION sync_master_info=20000;
+ERROR HY000: Variable 'sync_master_info' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET sync_master_info" is allowed with REPLICATION SLAVE ADMIN
+CREATE USER user1@localhost;
+GRANT REPLICATION SLAVE ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL sync_master_info=20000;
+SET sync_master_info=20000;
+ERROR HY000: Variable 'sync_master_info' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION sync_master_info=20000;
+ERROR HY000: Variable 'sync_master_info' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET sync_master_info" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL sync_master_info=20000;
+SET sync_master_info=20000;
+ERROR HY000: Variable 'sync_master_info' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION sync_master_info=20000;
+ERROR HY000: Variable 'sync_master_info' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@global.sync_master_info=@global;
diff --git a/mysql-test/suite/sys_vars/r/sync_relay_log_grant.result b/mysql-test/suite/sys_vars/r/sync_relay_log_grant.result
new file mode 100644
index 00000000000..f71e8325858
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/sync_relay_log_grant.result
@@ -0,0 +1,46 @@
+#
+# MDEV-21969 Bind REPLICATION SLAVE ADMIN to relay_log_*, sync_master_info, sync_relay_log, sync_relay_log_info
+#
+SET @global=@@global.sync_relay_log;
+# Test that "SET sync_relay_log" is not allowed without REPLICATION SLAVE ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE REPLICATION SLAVE ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL sync_relay_log=20000;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, REPLICATION SLAVE ADMIN privilege(s) for this operation
+SET sync_relay_log=20000;
+ERROR HY000: Variable 'sync_relay_log' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION sync_relay_log=20000;
+ERROR HY000: Variable 'sync_relay_log' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET sync_relay_log" is allowed with REPLICATION SLAVE ADMIN
+CREATE USER user1@localhost;
+GRANT REPLICATION SLAVE ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL sync_relay_log=20000;
+SET sync_relay_log=20000;
+ERROR HY000: Variable 'sync_relay_log' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION sync_relay_log=20000;
+ERROR HY000: Variable 'sync_relay_log' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET sync_relay_log" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL sync_relay_log=20000;
+SET sync_relay_log=20000;
+ERROR HY000: Variable 'sync_relay_log' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION sync_relay_log=20000;
+ERROR HY000: Variable 'sync_relay_log' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@global.sync_relay_log=@global;
diff --git a/mysql-test/suite/sys_vars/r/sync_relay_log_info_grant.result b/mysql-test/suite/sys_vars/r/sync_relay_log_info_grant.result
new file mode 100644
index 00000000000..25727aac07c
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/sync_relay_log_info_grant.result
@@ -0,0 +1,46 @@
+#
+# MDEV-21969 Bind REPLICATION SLAVE ADMIN to relay_log_*, sync_master_info, sync_relay_log, sync_relay_log_info
+#
+SET @global=@@global.sync_relay_log_info;
+# Test that "SET sync_relay_log_info" is not allowed without REPLICATION SLAVE ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE REPLICATION SLAVE ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL sync_relay_log_info=20000;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, REPLICATION SLAVE ADMIN privilege(s) for this operation
+SET sync_relay_log_info=20000;
+ERROR HY000: Variable 'sync_relay_log_info' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION sync_relay_log_info=20000;
+ERROR HY000: Variable 'sync_relay_log_info' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET sync_relay_log_info" is allowed with REPLICATION SLAVE ADMIN
+CREATE USER user1@localhost;
+GRANT REPLICATION SLAVE ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL sync_relay_log_info=20000;
+SET sync_relay_log_info=20000;
+ERROR HY000: Variable 'sync_relay_log_info' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION sync_relay_log_info=20000;
+ERROR HY000: Variable 'sync_relay_log_info' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET sync_relay_log_info" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL sync_relay_log_info=20000;
+SET sync_relay_log_info=20000;
+ERROR HY000: Variable 'sync_relay_log_info' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION sync_relay_log_info=20000;
+ERROR HY000: Variable 'sync_relay_log_info' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@global.sync_relay_log_info=@global;
diff --git a/mysql-test/suite/sys_vars/r/sysvars_aria,32bit.rdiff b/mysql-test/suite/sys_vars/r/sysvars_aria,32bit.rdiff
index 979f9d8903a..f0cbbd874ee 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_aria,32bit.rdiff
+++ b/mysql-test/suite/sys_vars/r/sysvars_aria,32bit.rdiff
@@ -1,16 +1,16 @@
---- sysvars_aria.result 2015-01-09 11:49:32.000000000 +0100
-+++ sysvars_aria,32bit.result 2015-01-09 17:30:11.000000000 +0100
-@@ -7,7 +7,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
+--- suite/sys_vars/r/sysvars_aria.result 2021-02-02 02:58:55.686921205 +0200
++++ suite/sys_vars/r/sysvars_aria,32bit.reject 2021-02-02 10:55:53.876791633 +0200
+@@ -5,7 +5,7 @@
+ SESSION_VALUE NULL
DEFAULT_VALUE 8192
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Block size to be used for Aria index pages.
- NUMERIC_MIN_VALUE 1024
+ NUMERIC_MIN_VALUE 4096
NUMERIC_MAX_VALUE 32768
-@@ -21,7 +21,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
+@@ -17,7 +17,7 @@
+ SESSION_VALUE NULL
DEFAULT_VALUE 30
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
@@ -18,8 +18,8 @@
VARIABLE_COMMENT Interval between tries to do an automatic checkpoints. In seconds; 0 means 'no automatic checkpoints' which makes sense only for testing.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -35,7 +35,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
+@@ -29,7 +29,7 @@
+ SESSION_VALUE NULL
DEFAULT_VALUE 1048576
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
@@ -27,8 +27,8 @@
VARIABLE_COMMENT Number of bytes that the transaction log has to grow between checkpoints before a new checkpoint is written to the log.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -63,7 +63,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
+@@ -53,7 +53,7 @@
+ SESSION_VALUE NULL
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
@@ -36,17 +36,17 @@
VARIABLE_COMMENT Number of consecutive log recovery failures after which logs will be automatically deleted to cure the problem; 0 (the default) disables the feature.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 255
-@@ -91,7 +91,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
+@@ -77,7 +77,7 @@
+ SESSION_VALUE NULL
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT Interval between commite in microseconds (1/1000000c). 0 stands for no waiting for other threads to come and do a commit in "hard" mode and no sync()/commit at all in "soft" mode. Option has only an effect if aria_group_commit is used
+ VARIABLE_COMMENT Interval between commits in microseconds (1/1000000 sec). 0 stands for no waiting for other threads to come and do a commit in "hard" mode and no sync()/commit at all in "soft" mode. Option has only an effect if aria_group_commit is used
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -105,7 +105,7 @@
- GLOBAL_VALUE_ORIGIN CONFIG
+@@ -89,7 +89,7 @@
+ SESSION_VALUE NULL
DEFAULT_VALUE 1073741824
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
@@ -54,8 +54,8 @@
VARIABLE_COMMENT Limit for transaction log size
NUMERIC_MIN_VALUE 8388608
NUMERIC_MAX_VALUE 4294967295
-@@ -147,10 +147,10 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
+@@ -125,10 +125,10 @@
+ SESSION_VALUE NULL
DEFAULT_VALUE 300
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
@@ -67,8 +67,8 @@
NUMERIC_BLOCK_SIZE 100
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -175,7 +175,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
+@@ -149,7 +149,7 @@
+ SESSION_VALUE NULL
DEFAULT_VALUE 100
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
@@ -76,8 +76,8 @@
VARIABLE_COMMENT The minimum percentage of warm blocks in key cache
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 100
-@@ -189,7 +189,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
+@@ -161,7 +161,7 @@
+ SESSION_VALUE NULL
DEFAULT_VALUE 512
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
@@ -85,8 +85,8 @@
VARIABLE_COMMENT Number of hash buckets for open and changed files. If you have a lot of Aria files open you should increase this for faster flush of changes. A good value is probably 1/10 of number of possible open Aria files.
NUMERIC_MIN_VALUE 128
NUMERIC_MAX_VALUE 16384
-@@ -231,7 +231,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
+@@ -197,7 +197,7 @@
+ SESSION_VALUE 1
DEFAULT_VALUE 1
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
@@ -94,12 +94,12 @@
VARIABLE_COMMENT Number of threads to use when repairing Aria tables. The value of 1 disables parallel repair.
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 128
-@@ -248,7 +248,7 @@
+@@ -212,7 +212,7 @@
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The buffer that is allocated when sorting the index when doing a REPAIR or when creating indexes with CREATE INDEX or ALTER TABLE.
NUMERIC_MIN_VALUE 4096
--NUMERIC_MAX_VALUE 18446744073709551615
-+NUMERIC_MAX_VALUE 4294967295
+-NUMERIC_MAX_VALUE 9223372036854775807
++NUMERIC_MAX_VALUE 2147483647
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
diff --git a/mysql-test/suite/sys_vars/r/sysvars_aria.result b/mysql-test/suite/sys_vars/r/sysvars_aria.result
index 7b74c85b6da..8cec099d28c 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_aria.result
+++ b/mysql-test/suite/sys_vars/r/sysvars_aria.result
@@ -78,7 +78,7 @@ SESSION_VALUE NULL
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
-VARIABLE_COMMENT Interval between commite in microseconds (1/1000000c). 0 stands for no waiting for other threads to come and do a commit in "hard" mode and no sync()/commit at all in "soft" mode. Option has only an effect if aria_group_commit is used
+VARIABLE_COMMENT Interval between commits in microseconds (1/1000000 sec). 0 stands for no waiting for other threads to come and do a commit in "hard" mode and no sync()/commit at all in "soft" mode. Option has only an effect if aria_group_commit is used
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
NUMERIC_BLOCK_SIZE 1
@@ -212,7 +212,7 @@ VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The buffer that is allocated when sorting the index when doing a REPAIR or when creating indexes with CREATE INDEX or ALTER TABLE.
NUMERIC_MIN_VALUE 4096
-NUMERIC_MAX_VALUE 18446744073709551615
+NUMERIC_MAX_VALUE 9223372036854775807
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
diff --git a/mysql-test/suite/sys_vars/r/sysvars_debug.result b/mysql-test/suite/sys_vars/r/sysvars_debug.result
index f50e796bff4..0d77b0211a1 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_debug.result
+++ b/mysql-test/suite/sys_vars/r/sysvars_debug.result
@@ -15,10 +15,11 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
+GLOBAL_VALUE_PATH NULL
VARIABLE_NAME DEBUG_BINLOG_FSYNC_SLEEP
SESSION_VALUE NULL
GLOBAL_VALUE 314
-GLOBAL_VALUE_ORIGIN CONFIG
+GLOBAL_VALUE_ORIGIN COMMAND-LINE
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -29,6 +30,7 @@ NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
+GLOBAL_VALUE_PATH NULL
VARIABLE_NAME DEBUG_DBUG
SESSION_VALUE
GLOBAL_VALUE
@@ -43,6 +45,7 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
+GLOBAL_VALUE_PATH NULL
VARIABLE_NAME DEBUG_MUTEX_DEADLOCK_DETECTOR
SESSION_VALUE NULL
GLOBAL_VALUE ON
@@ -57,6 +60,7 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST OFF,ON
READ_ONLY YES
COMMAND_LINE_ARGUMENT OPTIONAL
+GLOBAL_VALUE_PATH NULL
VARIABLE_NAME DEBUG_NO_THREAD_ALARM
SESSION_VALUE NULL
GLOBAL_VALUE OFF
@@ -71,6 +75,7 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST OFF,ON
READ_ONLY YES
COMMAND_LINE_ARGUMENT OPTIONAL
+GLOBAL_VALUE_PATH NULL
VARIABLE_NAME DEBUG_SYNC
SESSION_VALUE ON - current signal: ''
GLOBAL_VALUE NULL
@@ -85,3 +90,4 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
+GLOBAL_VALUE_PATH NULL
diff --git a/mysql-test/suite/sys_vars/r/sysvars_innodb,32bit.rdiff b/mysql-test/suite/sys_vars/r/sysvars_innodb,32bit.rdiff
index bfbbfb43c74..f6a9305d373 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_innodb,32bit.rdiff
+++ b/mysql-test/suite/sys_vars/r/sysvars_innodb,32bit.rdiff
@@ -1,3 +1,5 @@
+--- sysvars_innodb.result
++++ sysvars_innodb,32bit.result
@@ -49,7 +49,7 @@
SESSION_VALUE NULL
DEFAULT_VALUE 8
@@ -7,24 +9,6 @@
VARIABLE_COMMENT Number of InnoDB Adaptive Hash Index Partitions (default 8)
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 512
-@@ -61,7 +61,7 @@
- SESSION_VALUE NULL
- DEFAULT_VALUE 150000
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT The upper limit of the sleep delay in usec. Value of 0 disables it.
- NUMERIC_MIN_VALUE 0
- NUMERIC_MAX_VALUE 1000000
-@@ -73,7 +73,7 @@
- SESSION_VALUE NULL
- DEFAULT_VALUE 64
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT Data file autoextend increment in megabytes
- NUMERIC_MIN_VALUE 1
- NUMERIC_MAX_VALUE 1000
@@ -85,7 +85,7 @@
SESSION_VALUE NULL
DEFAULT_VALUE 1
@@ -40,7 +24,7 @@
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT Size of a single memory chunk within each buffer pool instance for resizing buffer pool. Online buffer pool resizing happens at this granularity. 0 means disable resizing buffer pool.
+ VARIABLE_COMMENT Size of a single memory chunk for resizing buffer pool. Online buffer pool resizing happens at this granularity. 0 means disable resizing buffer pool.
NUMERIC_MIN_VALUE 1048576
-NUMERIC_MAX_VALUE 9223372036854775807
+NUMERIC_MAX_VALUE 2147483647
@@ -62,7 +46,7 @@
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT Number of buffer pool instances, set to higher value on high-end machines to increase scalability
+ VARIABLE_COMMENT Deprecated parameter with no effect.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 64
@@ -289,7 +289,7 @@
@@ -74,16 +58,7 @@
VARIABLE_COMMENT A number between [0, 100] that tells how oftern buffer pool dump status in percentages should be printed. E.g. 10 means that buffer pool dump status is printed when every 10% of number of buffer pool pages are dumped. Default is 0 (only start and end status is printed).
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 100
-@@ -397,7 +397,7 @@
- SESSION_VALUE NULL
- DEFAULT_VALUE 0
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT Helps in performance tuning in heavily concurrent environments.
- NUMERIC_MIN_VALUE 0
- NUMERIC_MAX_VALUE 1000
-@@ -433,7 +433,7 @@
+@@ -421,7 +421,7 @@
SESSION_VALUE NULL
DEFAULT_VALUE 5
VARIABLE_SCOPE GLOBAL
@@ -92,7 +67,7 @@
VARIABLE_COMMENT If the compression failure rate of a table is greater than this number more padding is added to the pages to reduce the failures. A value of zero implies no padding
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 100
-@@ -457,7 +457,7 @@
+@@ -445,7 +445,7 @@
SESSION_VALUE NULL
DEFAULT_VALUE 50
VARIABLE_SCOPE GLOBAL
@@ -101,29 +76,7 @@
VARIABLE_COMMENT Percentage of empty space on a data page that can be reserved to make the page compressible.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 75
-@@ -469,10 +469,10 @@
- SESSION_VALUE NULL
- DEFAULT_VALUE 5000
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT Number of times a thread is allowed to enter InnoDB within the same SQL query after it has once got the ticket
- NUMERIC_MIN_VALUE 1
--NUMERIC_MAX_VALUE 18446744073709551615
-+NUMERIC_MAX_VALUE 4294967295
- NUMERIC_BLOCK_SIZE 0
- ENUM_VALUE_LIST NULL
- READ_ONLY NO
-@@ -697,7 +697,7 @@
- SESSION_VALUE NULL
- DEFAULT_VALUE 120
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT Number of pages reserved in doublewrite buffer for batch flushing
- NUMERIC_MIN_VALUE 1
- NUMERIC_MAX_VALUE 127
-@@ -793,7 +793,7 @@
+@@ -745,7 +745,7 @@
SESSION_VALUE NULL
DEFAULT_VALUE 600
VARIABLE_SCOPE GLOBAL
@@ -132,16 +85,7 @@
VARIABLE_COMMENT Maximum number of seconds that semaphore times out in InnoDB.
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 4294967295
-@@ -841,7 +841,7 @@
- SESSION_VALUE NULL
- DEFAULT_VALUE 0
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT Make the first page of the given tablespace dirty.
- NUMERIC_MIN_VALUE 0
- NUMERIC_MAX_VALUE 4294967295
-@@ -853,7 +853,7 @@
+@@ -805,7 +805,7 @@
SESSION_VALUE NULL
DEFAULT_VALUE 30
VARIABLE_SCOPE GLOBAL
@@ -150,7 +94,7 @@
VARIABLE_COMMENT Number of iterations over which the background flushing is averaged.
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 1000
-@@ -877,7 +877,7 @@
+@@ -829,7 +829,7 @@
SESSION_VALUE NULL
DEFAULT_VALUE 1
VARIABLE_SCOPE GLOBAL
@@ -159,7 +103,7 @@
VARIABLE_COMMENT Controls the durability/speed trade-off for commits. Set to 0 (write and flush redo log to disk only once per second), 1 (flush to disk at each commit), 2 (write to log at commit but flush to disk only once per second) or 3 (flush to disk at prepare and at commit, slower and usually redundant). 1 and 3 guarantees that after a crash, committed transactions will not be lost and will be consistent with the binlog and other transactional engines. 2 can get inconsistent and lose transactions if there is a power failure or kernel crash but not if mysqld crashes. 0 has no guarantees in case of crash. 0 and 2 can be faster than 1 or 3.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 3
-@@ -901,7 +901,7 @@
+@@ -853,7 +853,7 @@
SESSION_VALUE NULL
DEFAULT_VALUE 1
VARIABLE_SCOPE GLOBAL
@@ -168,16 +112,16 @@
VARIABLE_COMMENT Set to 0 (don't flush neighbors from buffer pool), 1 (flush contiguous neighbors from buffer pool) or 2 (flush neighbors from buffer pool), when flushing a block
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 2
-@@ -949,7 +949,7 @@
+@@ -901,7 +901,7 @@
SESSION_VALUE NULL
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT Helps to save your data in case the disk image of the database becomes corrupt.
+ VARIABLE_COMMENT Helps to save your data in case the disk image of the database becomes corrupt. Value 5 can return bogus data, and 6 can permanently corrupt data.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 6
-@@ -973,7 +973,7 @@
+@@ -925,7 +925,7 @@
SESSION_VALUE NULL
DEFAULT_VALUE 8000000
VARIABLE_SCOPE GLOBAL
@@ -186,7 +130,7 @@
VARIABLE_COMMENT InnoDB Fulltext search cache size in bytes
NUMERIC_MIN_VALUE 1600000
NUMERIC_MAX_VALUE 80000000
-@@ -1009,7 +1009,7 @@
+@@ -961,7 +961,7 @@
SESSION_VALUE NULL
DEFAULT_VALUE 84
VARIABLE_SCOPE GLOBAL
@@ -195,7 +139,7 @@
VARIABLE_COMMENT InnoDB Fulltext search maximum token size in characters
NUMERIC_MIN_VALUE 10
NUMERIC_MAX_VALUE 84
-@@ -1021,7 +1021,7 @@
+@@ -973,7 +973,7 @@
SESSION_VALUE NULL
DEFAULT_VALUE 3
VARIABLE_SCOPE GLOBAL
@@ -204,7 +148,7 @@
VARIABLE_COMMENT InnoDB Fulltext search minimum token size in characters
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 16
-@@ -1033,7 +1033,7 @@
+@@ -985,7 +985,7 @@
SESSION_VALUE NULL
DEFAULT_VALUE 2000
VARIABLE_SCOPE GLOBAL
@@ -213,7 +157,7 @@
VARIABLE_COMMENT InnoDB Fulltext search number of words to optimize for each optimize table call
NUMERIC_MIN_VALUE 1000
NUMERIC_MAX_VALUE 10000
-@@ -1045,10 +1045,10 @@
+@@ -997,10 +997,10 @@
SESSION_VALUE NULL
DEFAULT_VALUE 2000000000
VARIABLE_SCOPE GLOBAL
@@ -226,7 +170,7 @@
NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -1069,7 +1069,7 @@
+@@ -1021,7 +1021,7 @@
SESSION_VALUE NULL
DEFAULT_VALUE 2
VARIABLE_SCOPE GLOBAL
@@ -235,7 +179,7 @@
VARIABLE_COMMENT InnoDB Fulltext search parallel sort degree, will round up to nearest power of 2 number
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 16
-@@ -1081,7 +1081,7 @@
+@@ -1033,7 +1033,7 @@
SESSION_VALUE NULL
DEFAULT_VALUE 640000000
VARIABLE_SCOPE GLOBAL
@@ -244,16 +188,7 @@
VARIABLE_COMMENT Total memory allocated for InnoDB Fulltext Search cache
NUMERIC_MIN_VALUE 32000000
NUMERIC_MAX_VALUE 1600000000
-@@ -1105,7 +1105,7 @@
- SESSION_VALUE NULL
- DEFAULT_VALUE 100
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT DEPRECATED. This setting has no effect.
- NUMERIC_MIN_VALUE 0
- NUMERIC_MAX_VALUE 100
-@@ -1141,22 +1141,22 @@
+@@ -1093,22 +1093,22 @@
SESSION_VALUE NULL
DEFAULT_VALUE 200
VARIABLE_SCOPE GLOBAL
@@ -281,7 +216,7 @@
NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -1213,7 +1213,7 @@
+@@ -1153,7 +1153,7 @@
SESSION_VALUE 50
DEFAULT_VALUE 50
VARIABLE_SCOPE SESSION
@@ -290,7 +225,7 @@
VARIABLE_COMMENT Timeout in seconds an InnoDB transaction may wait for a lock before being rolled back. Values above 100000000 disable the timeout.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 1073741824
-@@ -1225,10 +1225,10 @@
+@@ -1165,10 +1165,10 @@
SESSION_VALUE NULL
DEFAULT_VALUE 16777216
VARIABLE_SCOPE GLOBAL
@@ -303,16 +238,16 @@
NUMERIC_BLOCK_SIZE 1024
ENUM_VALUE_LIST NULL
READ_ONLY YES
-@@ -1273,7 +1273,7 @@
+@@ -1213,7 +1213,7 @@
SESSION_VALUE NULL
- DEFAULT_VALUE 2
+ DEFAULT_VALUE 1
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT Number of log files in the log group. InnoDB writes to the files in a circular fashion.
+ VARIABLE_COMMENT Deprecated parameter with no effect.
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 100
-@@ -1321,7 +1321,7 @@
+@@ -1261,7 +1261,7 @@
SESSION_VALUE NULL
DEFAULT_VALUE 8192
VARIABLE_SCOPE GLOBAL
@@ -321,7 +256,20 @@
VARIABLE_COMMENT Redo log write ahead unit size to avoid read-on-write, it should match the OS cache block IO size
NUMERIC_MIN_VALUE 512
NUMERIC_MAX_VALUE 16384
-@@ -1333,10 +1333,10 @@
+@@ -1273,10 +1273,10 @@
+ SESSION_VALUE NULL
+ DEFAULT_VALUE 100
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT How many pages to flush on LRU eviction
+ NUMERIC_MIN_VALUE 1
+-NUMERIC_MAX_VALUE 18446744073709551615
++NUMERIC_MAX_VALUE 4294967295
+ NUMERIC_BLOCK_SIZE 0
+ ENUM_VALUE_LIST NULL
+ READ_ONLY NO
+@@ -1285,10 +1285,10 @@
SESSION_VALUE NULL
DEFAULT_VALUE 1024
VARIABLE_SCOPE GLOBAL
@@ -334,7 +282,7 @@
NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -1381,10 +1381,10 @@
+@@ -1333,10 +1333,10 @@
SESSION_VALUE NULL
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
@@ -347,7 +295,7 @@
NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -1393,7 +1393,7 @@
+@@ -1345,7 +1345,7 @@
SESSION_VALUE NULL
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
@@ -356,7 +304,7 @@
VARIABLE_COMMENT Maximum delay of user threads in micro-seconds
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 10000000
-@@ -1525,10 +1525,10 @@
+@@ -1465,10 +1465,10 @@
SESSION_VALUE NULL
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
@@ -369,25 +317,16 @@
NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY YES
-@@ -1549,7 +1549,7 @@
+@@ -1489,7 +1489,7 @@
SESSION_VALUE NULL
- DEFAULT_VALUE 4
+ DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT Page cleaner threads can be from 1 to 64. Default is 4.
- NUMERIC_MIN_VALUE 1
+ VARIABLE_COMMENT Deprecated parameter with no effect.
+ NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 64
-@@ -1573,7 +1573,7 @@
- SESSION_VALUE NULL
- DEFAULT_VALUE 16
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT Number of rw_locks protecting buffer pool page_hash. Rounded up to the next power of 2
- NUMERIC_MIN_VALUE 1
- NUMERIC_MAX_VALUE 1024
-@@ -1585,7 +1585,7 @@
+@@ -1513,7 +1513,7 @@
SESSION_VALUE NULL
DEFAULT_VALUE 16384
VARIABLE_SCOPE GLOBAL
@@ -396,7 +335,7 @@
VARIABLE_COMMENT Page size to use for all InnoDB tablespaces.
NUMERIC_MIN_VALUE 4096
NUMERIC_MAX_VALUE 65536
-@@ -1621,7 +1621,7 @@
+@@ -1549,7 +1549,7 @@
SESSION_VALUE NULL
DEFAULT_VALUE 300
VARIABLE_SCOPE GLOBAL
@@ -405,7 +344,7 @@
VARIABLE_COMMENT Number of UNDO log pages to purge in one batch from the history list.
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 5000
-@@ -1633,7 +1633,7 @@
+@@ -1561,7 +1561,7 @@
SESSION_VALUE NULL
DEFAULT_VALUE 128
VARIABLE_SCOPE GLOBAL
@@ -414,16 +353,7 @@
VARIABLE_COMMENT Dictates rate at which UNDO records are purged. Value N means purge rollback segment(s) on every Nth iteration of purge invocation
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 128
-@@ -1645,7 +1645,7 @@
- SESSION_VALUE NULL
- DEFAULT_VALUE 4
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT Purge threads can be from 1 to 32. Default is 4.
- NUMERIC_MIN_VALUE 1
- NUMERIC_MAX_VALUE 32
-@@ -1669,7 +1669,7 @@
+@@ -1597,7 +1597,7 @@
SESSION_VALUE NULL
DEFAULT_VALUE 56
VARIABLE_SCOPE GLOBAL
@@ -432,47 +362,7 @@
VARIABLE_COMMENT Number of pages that must be accessed sequentially for InnoDB to trigger a readahead.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 64
-@@ -1681,7 +1681,7 @@
- SESSION_VALUE NULL
- DEFAULT_VALUE 4
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT Number of background read I/O threads in InnoDB.
- NUMERIC_MIN_VALUE 1
- NUMERIC_MAX_VALUE 64
-@@ -1705,10 +1705,10 @@
- SESSION_VALUE NULL
- DEFAULT_VALUE 0
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT Replication thread delay (ms) on the slave server if innodb_thread_concurrency is reached (0 by default)
- NUMERIC_MIN_VALUE 0
--NUMERIC_MAX_VALUE 18446744073709551615
-+NUMERIC_MAX_VALUE 4294967295
- NUMERIC_BLOCK_SIZE 0
- ENUM_VALUE_LIST NULL
- READ_ONLY NO
-@@ -1729,7 +1729,7 @@
- SESSION_VALUE NULL
- DEFAULT_VALUE 128
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT Number of undo logs to use (deprecated).
- NUMERIC_MIN_VALUE 1
- NUMERIC_MAX_VALUE 128
-@@ -1741,7 +1741,7 @@
- SESSION_VALUE NULL
- DEFAULT_VALUE 0
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT An InnoDB page number.
- NUMERIC_MIN_VALUE 0
- NUMERIC_MAX_VALUE 4294967295
-@@ -1789,7 +1789,7 @@
+@@ -1705,7 +1705,7 @@
SESSION_VALUE NULL
DEFAULT_VALUE 1048576
VARIABLE_SCOPE GLOBAL
@@ -481,7 +371,7 @@
VARIABLE_COMMENT Memory buffer size for index creation
NUMERIC_MIN_VALUE 65536
NUMERIC_MAX_VALUE 67108864
-@@ -1969,7 +1969,7 @@
+@@ -1873,7 +1873,7 @@
SESSION_VALUE NULL
DEFAULT_VALUE 1
VARIABLE_SCOPE GLOBAL
@@ -490,7 +380,7 @@
VARIABLE_COMMENT Size of the mutex/lock wait array.
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 1024
-@@ -1993,10 +1993,10 @@
+@@ -1897,10 +1897,10 @@
SESSION_VALUE NULL
DEFAULT_VALUE 30
VARIABLE_SCOPE GLOBAL
@@ -503,34 +393,16 @@
NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -2029,7 +2029,7 @@
- SESSION_VALUE NULL
- DEFAULT_VALUE 0
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT Helps in performance tuning in heavily concurrent environments. Sets the maximum number of threads allowed inside InnoDB. Value 0 will disable the thread throttling.
- NUMERIC_MIN_VALUE 0
- NUMERIC_MAX_VALUE 1000
-@@ -2041,7 +2041,7 @@
- SESSION_VALUE NULL
- DEFAULT_VALUE 10000
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT Time of innodb thread sleeping before joining InnoDB queue (usec). Value 0 disable a sleep
- NUMERIC_MIN_VALUE 0
- NUMERIC_MAX_VALUE 1000000
-@@ -2101,7 +2101,7 @@
+@@ -2005,7 +2005,7 @@
SESSION_VALUE NULL
DEFAULT_VALUE 128
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT Number of undo logs to use.
- NUMERIC_MIN_VALUE 1
+ VARIABLE_COMMENT Deprecated parameter with no effect.
+ NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 128
-@@ -2125,7 +2125,7 @@
+@@ -2029,7 +2029,7 @@
SESSION_VALUE NULL
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
@@ -539,12 +411,3 @@
VARIABLE_COMMENT Number of undo tablespaces to use.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 127
-@@ -2149,7 +2149,7 @@
- SESSION_VALUE NULL
- DEFAULT_VALUE 4
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT Number of background write I/O threads in InnoDB.
- NUMERIC_MIN_VALUE 1
- NUMERIC_MAX_VALUE 64
diff --git a/mysql-test/suite/sys_vars/r/sysvars_innodb.result b/mysql-test/suite/sys_vars/r/sysvars_innodb.result
index 7a4b67b3600..ecd107f67c8 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_innodb.result
+++ b/mysql-test/suite/sys_vars/r/sysvars_innodb.result
@@ -35,10 +35,10 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_ADAPTIVE_HASH_INDEX
SESSION_VALUE NULL
-DEFAULT_VALUE ON
+DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
-VARIABLE_COMMENT Enable InnoDB adaptive hash index (enabled by default). Disable with --skip-innodb-adaptive-hash-index.
+VARIABLE_COMMENT Enable InnoDB adaptive hash index (disabled by default).
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
@@ -59,10 +59,10 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_ADAPTIVE_MAX_SLEEP_DELAY
SESSION_VALUE NULL
-DEFAULT_VALUE 150000
+DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
-VARIABLE_COMMENT The upper limit of the sleep delay in usec. Value of 0 disables it.
+VARIABLE_TYPE INT UNSIGNED
+VARIABLE_COMMENT Deprecated parameter with no effect.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 1000000
NUMERIC_BLOCK_SIZE 0
@@ -73,7 +73,7 @@ VARIABLE_NAME INNODB_AUTOEXTEND_INCREMENT
SESSION_VALUE NULL
DEFAULT_VALUE 64
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Data file autoextend increment in megabytes
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 1000
@@ -107,12 +107,12 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_BACKGROUND_SCRUB_DATA_CHECK_INTERVAL
SESSION_VALUE NULL
-DEFAULT_VALUE 3600
+DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
-VARIABLE_COMMENT check if spaces needs scrubbing every innodb_background_scrub_data_check_interval seconds
-NUMERIC_MIN_VALUE 1
-NUMERIC_MAX_VALUE 4294967295
+VARIABLE_COMMENT Deprecated parameter with no effect.
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 0
NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY NO
@@ -122,21 +122,21 @@ SESSION_VALUE NULL
DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
-VARIABLE_COMMENT Enable scrubbing of compressed data by background threads (same as encryption_threads)
+VARIABLE_COMMENT Deprecated parameter with no effect.
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
-COMMAND_LINE_ARGUMENT REQUIRED
+COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_BACKGROUND_SCRUB_DATA_INTERVAL
SESSION_VALUE NULL
-DEFAULT_VALUE 604800
+DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
-VARIABLE_COMMENT scrub spaces that were last scrubbed longer than innodb_background_scrub_data_interval seconds ago
-NUMERIC_MIN_VALUE 1
-NUMERIC_MAX_VALUE 4294967295
+VARIABLE_COMMENT Deprecated parameter with no effect.
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 0
NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY NO
@@ -146,19 +146,19 @@ SESSION_VALUE NULL
DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
-VARIABLE_COMMENT Enable scrubbing of uncompressed data by background threads (same as encryption_threads)
+VARIABLE_COMMENT Deprecated parameter with no effect.
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
-COMMAND_LINE_ARGUMENT REQUIRED
+COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_BUFFER_POOL_CHUNK_SIZE
SESSION_VALUE NULL
DEFAULT_VALUE 134217728
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
-VARIABLE_COMMENT Size of a single memory chunk within each buffer pool instance for resizing buffer pool. Online buffer pool resizing happens at this granularity. 0 means disable resizing buffer pool.
+VARIABLE_COMMENT Size of a single memory chunk for resizing buffer pool. Online buffer pool resizing happens at this granularity. 0 means disable resizing buffer pool.
NUMERIC_MIN_VALUE 1048576
NUMERIC_MAX_VALUE 9223372036854775807
NUMERIC_BLOCK_SIZE 1048576
@@ -230,7 +230,7 @@ SESSION_VALUE NULL
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
-VARIABLE_COMMENT Number of buffer pool instances, set to higher value on high-end machines to increase scalability
+VARIABLE_COMMENT Deprecated parameter with no effect.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 64
NUMERIC_BLOCK_SIZE 0
@@ -357,21 +357,9 @@ NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
-VARIABLE_NAME INNODB_CHECKSUMS
-SESSION_VALUE NULL
-DEFAULT_VALUE ON
-VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BOOLEAN
-VARIABLE_COMMENT DEPRECATED. Use innodb_checksum_algorithm=NONE instead of setting this to OFF. Enable InnoDB checksums validation (enabled by default). Disable with --skip-innodb-checksums.
-NUMERIC_MIN_VALUE NULL
-NUMERIC_MAX_VALUE NULL
-NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST OFF,ON
-READ_ONLY YES
-COMMAND_LINE_ARGUMENT NONE
VARIABLE_NAME INNODB_CHECKSUM_ALGORITHM
SESSION_VALUE NULL
-DEFAULT_VALUE crc32
+DEFAULT_VALUE full_crc32
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE ENUM
VARIABLE_COMMENT The algorithm InnoDB uses for page checksumming. Possible values are FULL_CRC32 for new files, always use CRC-32C; for old, see CRC32 below; STRICT_FULL_CRC32 for new files, always use CRC-32C; for old, see STRICT_CRC32 below; CRC32 write crc32, allow any of the other checksums to match when reading; STRICT_CRC32 write crc32, do not allow other algorithms to match when reading; INNODB write a software calculated checksum, allow any other checksums to match when reading; STRICT_INNODB write a software calculated checksum, do not allow other algorithms to match when reading; NONE write a constant magic number, do not do any checksum verification when reading (same as innodb_checksums=OFF); STRICT_NONE write a constant magic number, do not allow values other than that magic number when reading; Files updated when this option is set to crc32 or strict_crc32 will not be readable by MariaDB versions older than 10.0.4; new files created with full_crc32 are readable by MariaDB 10.4.3+
@@ -397,8 +385,8 @@ VARIABLE_NAME INNODB_COMMIT_CONCURRENCY
SESSION_VALUE NULL
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
-VARIABLE_COMMENT Helps in performance tuning in heavily concurrent environments.
+VARIABLE_TYPE INT UNSIGNED
+VARIABLE_COMMENT Deprecated parameter with no effect.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 1000
NUMERIC_BLOCK_SIZE 0
@@ -467,12 +455,12 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_CONCURRENCY_TICKETS
SESSION_VALUE NULL
-DEFAULT_VALUE 5000
+DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
-VARIABLE_COMMENT Number of times a thread is allowed to enter InnoDB within the same SQL query after it has once got the ticket
-NUMERIC_MIN_VALUE 1
-NUMERIC_MAX_VALUE 18446744073709551615
+VARIABLE_TYPE INT UNSIGNED
+VARIABLE_COMMENT Deprecated parameter with no effect.
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 4294967295
NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY NO
@@ -525,30 +513,6 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT NONE
-VARIABLE_NAME INNODB_DEBUG_FORCE_SCRUBBING
-SESSION_VALUE NULL
-DEFAULT_VALUE OFF
-VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BOOLEAN
-VARIABLE_COMMENT Perform extra scrubbing to increase test exposure
-NUMERIC_MIN_VALUE NULL
-NUMERIC_MAX_VALUE NULL
-NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST OFF,ON
-READ_ONLY NO
-COMMAND_LINE_ARGUMENT REQUIRED
-VARIABLE_NAME INNODB_DEBUG_SYNC
-SESSION_VALUE NULL
-DEFAULT_VALUE
-VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE VARCHAR
-VARIABLE_COMMENT debug_sync for innodb purge threads. Use it to set up sync points for all purge threads at once. The commands will be applied sequentially at the beginning of purging the next undo record.
-NUMERIC_MIN_VALUE NULL
-NUMERIC_MAX_VALUE NULL
-NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
-READ_ONLY NO
-COMMAND_LINE_ARGUMENT NONE
VARIABLE_NAME INNODB_DEFAULT_ENCRYPTION_KEY_ID
SESSION_VALUE 1
DEFAULT_VALUE 1
@@ -657,18 +621,6 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
-VARIABLE_NAME INNODB_DISABLE_BACKGROUND_MERGE
-SESSION_VALUE NULL
-DEFAULT_VALUE OFF
-VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BOOLEAN
-VARIABLE_COMMENT Disable change buffering merges by the master thread
-NUMERIC_MIN_VALUE NULL
-NUMERIC_MAX_VALUE NULL
-NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST OFF,ON
-READ_ONLY NO
-COMMAND_LINE_ARGUMENT NONE
VARIABLE_NAME INNODB_DISABLE_RESIZE_BUFFER_POOL_DEBUG
SESSION_VALUE NULL
DEFAULT_VALUE ON
@@ -705,18 +657,6 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST OFF,ON
READ_ONLY YES
COMMAND_LINE_ARGUMENT NONE
-VARIABLE_NAME INNODB_DOUBLEWRITE_BATCH_SIZE
-SESSION_VALUE NULL
-DEFAULT_VALUE 120
-VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
-VARIABLE_COMMENT Number of pages reserved in doublewrite buffer for batch flushing
-NUMERIC_MIN_VALUE 1
-NUMERIC_MAX_VALUE 127
-NUMERIC_BLOCK_SIZE 0
-ENUM_VALUE_LIST NULL
-READ_ONLY YES
-COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_ENCRYPTION_ROTATE_KEY_AGE
SESSION_VALUE NULL
DEFAULT_VALUE 1
@@ -746,7 +686,7 @@ SESSION_VALUE NULL
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
-VARIABLE_COMMENT Number of threads performing background key rotation and scrubbing
+VARIABLE_COMMENT Number of threads performing background key rotation
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 255
NUMERIC_BLOCK_SIZE 0
@@ -853,7 +793,7 @@ VARIABLE_NAME INNODB_FIL_MAKE_PAGE_DIRTY_DEBUG
SESSION_VALUE NULL
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Make the first page of the given tablespace dirty.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
@@ -950,7 +890,7 @@ SESSION_VALUE NULL
DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
-VARIABLE_COMMENT Do not allow to create table without primary key (off by default)
+VARIABLE_COMMENT Do not allow creating a table without primary key (off by default)
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
@@ -962,7 +902,7 @@ SESSION_VALUE NULL
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
-VARIABLE_COMMENT Helps to save your data in case the disk image of the database becomes corrupt.
+VARIABLE_COMMENT Helps to save your data in case the disk image of the database becomes corrupt. Value 5 can return bogus data, and 6 can permanently corrupt data.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 6
NUMERIC_BLOCK_SIZE 0
@@ -1113,18 +1053,6 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
-VARIABLE_NAME INNODB_IDLE_FLUSH_PCT
-SESSION_VALUE NULL
-DEFAULT_VALUE 100
-VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
-VARIABLE_COMMENT DEPRECATED. This setting has no effect.
-NUMERIC_MIN_VALUE 0
-NUMERIC_MAX_VALUE 100
-NUMERIC_BLOCK_SIZE 0
-ENUM_VALUE_LIST NULL
-READ_ONLY NO
-COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_IMMEDIATE_SCRUB_DATA_UNCOMPRESSED
SESSION_VALUE NULL
DEFAULT_VALUE OFF
@@ -1197,18 +1125,6 @@ NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
-VARIABLE_NAME INNODB_LOCKS_UNSAFE_FOR_BINLOG
-SESSION_VALUE NULL
-DEFAULT_VALUE OFF
-VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BOOLEAN
-VARIABLE_COMMENT DEPRECATED. This option may be removed in future releases. Please use READ COMMITTED transaction isolation level instead. Force InnoDB to not use next-key locking, to use only row-level locking.
-NUMERIC_MIN_VALUE NULL
-NUMERIC_MAX_VALUE NULL
-NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST OFF,ON
-READ_ONLY YES
-COMMAND_LINE_ARGUMENT NONE
VARIABLE_NAME INNODB_LOCK_SCHEDULE_ALGORITHM
SESSION_VALUE NULL
DEFAULT_VALUE fcfs
@@ -1262,7 +1178,7 @@ SESSION_VALUE NULL
DEFAULT_VALUE ON
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
-VARIABLE_COMMENT DEPRECATED. Whether to require checksums for InnoDB redo log blocks.
+VARIABLE_COMMENT Deprecated parameter with no effect.
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
@@ -1274,7 +1190,7 @@ SESSION_VALUE NULL
DEFAULT_VALUE ON
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
-VARIABLE_COMMENT Enables/disables the logging of entire compressed page images. InnoDB logs the compressed pages to prevent corruption if the zlib compression algorithm changes. When turned OFF, InnoDB will assume that the zlib compression algorithm doesn't change.
+VARIABLE_COMMENT Deprecated parameter with no effect.
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
@@ -1283,10 +1199,10 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_LOG_FILES_IN_GROUP
SESSION_VALUE NULL
-DEFAULT_VALUE 2
+DEFAULT_VALUE 1
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
-VARIABLE_COMMENT Number of log files in the log group. InnoDB writes to the files in a circular fashion.
+VARIABLE_COMMENT Deprecated parameter with no effect.
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 100
NUMERIC_BLOCK_SIZE 0
@@ -1295,12 +1211,12 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_LOG_FILE_SIZE
SESSION_VALUE NULL
-DEFAULT_VALUE 50331648
+DEFAULT_VALUE 100663296
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Size of each log file in a log group.
NUMERIC_MIN_VALUE 1048576
-NUMERIC_MAX_VALUE 17592186044415
+NUMERIC_MAX_VALUE 18446744073709551615
NUMERIC_BLOCK_SIZE 65536
ENUM_VALUE_LIST NULL
READ_ONLY YES
@@ -1322,7 +1238,7 @@ SESSION_VALUE NULL
DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
-VARIABLE_COMMENT DEPRECATED. Ignored in MariaDB 10.5. Reduce redo logging when natively creating indexes or rebuilding tables. Enabling this may slow down backup and cause delay due to page flushing.
+VARIABLE_COMMENT Deprecated parameter with no effect.
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
@@ -1341,9 +1257,21 @@ NUMERIC_BLOCK_SIZE 512
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_LRU_FLUSH_SIZE
+SESSION_VALUE NULL
+DEFAULT_VALUE 32
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT How many pages to flush on LRU eviction
+NUMERIC_MIN_VALUE 1
+NUMERIC_MAX_VALUE 18446744073709551615
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_LRU_SCAN_DEPTH
SESSION_VALUE NULL
-DEFAULT_VALUE 1024
+DEFAULT_VALUE 1536
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT How deep to scan LRU to keep it clean
@@ -1367,7 +1295,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_MAX_DIRTY_PAGES_PCT
SESSION_VALUE NULL
-DEFAULT_VALUE 75.000000
+DEFAULT_VALUE 90.000000
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE DOUBLE
VARIABLE_COMMENT Percentage of dirty pages allowed in bufferpool.
@@ -1382,7 +1310,7 @@ SESSION_VALUE NULL
DEFAULT_VALUE 0.000000
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE DOUBLE
-VARIABLE_COMMENT Percentage of dirty pages at which flushing kicks in.
+VARIABLE_COMMENT Percentage of dirty pages at which flushing kicks in. The value 0 (default) means 'refer to innodb_max_dirty_pages_pct'.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 99.999
NUMERIC_BLOCK_SIZE NULL
@@ -1559,11 +1487,11 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT NONE
VARIABLE_NAME INNODB_PAGE_CLEANERS
SESSION_VALUE NULL
-DEFAULT_VALUE 4
+DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
-VARIABLE_COMMENT Page cleaner threads can be from 1 to 64. Default is 4.
-NUMERIC_MIN_VALUE 1
+VARIABLE_COMMENT Deprecated parameter with no effect.
+NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 64
NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
@@ -1581,18 +1509,6 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
-VARIABLE_NAME INNODB_PAGE_HASH_LOCKS
-SESSION_VALUE NULL
-DEFAULT_VALUE 16
-VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
-VARIABLE_COMMENT Number of rw_locks protecting buffer pool page_hash. Rounded up to the next power of 2
-NUMERIC_MIN_VALUE 1
-NUMERIC_MAX_VALUE 1024
-NUMERIC_BLOCK_SIZE 0
-ENUM_VALUE_LIST NULL
-READ_ONLY YES
-COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_PAGE_SIZE
SESSION_VALUE NULL
DEFAULT_VALUE 16384
@@ -1657,8 +1573,8 @@ VARIABLE_NAME INNODB_PURGE_THREADS
SESSION_VALUE NULL
DEFAULT_VALUE 4
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
-VARIABLE_COMMENT Purge threads can be from 1 to 32. Default is 4.
+VARIABLE_TYPE INT UNSIGNED
+VARIABLE_COMMENT Number of tasks for purging transaction history
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 32
NUMERIC_BLOCK_SIZE 0
@@ -1693,7 +1609,7 @@ VARIABLE_NAME INNODB_READ_IO_THREADS
SESSION_VALUE NULL
DEFAULT_VALUE 4
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Number of background read I/O threads in InnoDB.
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 64
@@ -1717,10 +1633,10 @@ VARIABLE_NAME INNODB_REPLICATION_DELAY
SESSION_VALUE NULL
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
-VARIABLE_COMMENT Replication thread delay (ms) on the slave server if innodb_thread_concurrency is reached (0 by default)
+VARIABLE_TYPE INT UNSIGNED
+VARIABLE_COMMENT Deprecated parameter with no effect.
NUMERIC_MIN_VALUE 0
-NUMERIC_MAX_VALUE 18446744073709551615
+NUMERIC_MAX_VALUE 4294967295
NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY NO
@@ -1737,23 +1653,11 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST OFF,ON
READ_ONLY YES
COMMAND_LINE_ARGUMENT OPTIONAL
-VARIABLE_NAME INNODB_ROLLBACK_SEGMENTS
-SESSION_VALUE NULL
-DEFAULT_VALUE 128
-VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
-VARIABLE_COMMENT Number of undo logs to use (deprecated).
-NUMERIC_MIN_VALUE 1
-NUMERIC_MAX_VALUE 128
-NUMERIC_BLOCK_SIZE 0
-ENUM_VALUE_LIST NULL
-READ_ONLY NO
-COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_SAVED_PAGE_NUMBER_DEBUG
SESSION_VALUE NULL
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT An InnoDB page number.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
@@ -1766,7 +1670,7 @@ SESSION_VALUE NULL
DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
-VARIABLE_COMMENT Enable background redo log (ib_logfile0, ib_logfile1...) scrubbing
+VARIABLE_COMMENT Deprecated parameter with no effect.
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
@@ -1778,7 +1682,7 @@ SESSION_VALUE NULL
DEFAULT_VALUE 256
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
-VARIABLE_COMMENT Background redo log scrubbing speed in bytes/sec
+VARIABLE_COMMENT Deprecated parameter with no effect.
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 50000
NUMERIC_BLOCK_SIZE 0
@@ -1893,18 +1797,6 @@ NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
-VARIABLE_NAME INNODB_STATS_SAMPLE_PAGES
-SESSION_VALUE NULL
-DEFAULT_VALUE 8
-VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
-VARIABLE_COMMENT Deprecated, use innodb_stats_transient_sample_pages instead
-NUMERIC_MIN_VALUE 1
-NUMERIC_MAX_VALUE 18446744073709551615
-NUMERIC_BLOCK_SIZE 0
-ENUM_VALUE_LIST NULL
-READ_ONLY NO
-COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_STATS_TRADITIONAL
SESSION_VALUE NULL
DEFAULT_VALUE ON
@@ -2029,8 +1921,8 @@ VARIABLE_NAME INNODB_THREAD_CONCURRENCY
SESSION_VALUE NULL
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
-VARIABLE_COMMENT Helps in performance tuning in heavily concurrent environments. Sets the maximum number of threads allowed inside InnoDB. Value 0 will disable the thread throttling.
+VARIABLE_TYPE INT UNSIGNED
+VARIABLE_COMMENT Deprecated parameter with no effect.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 1000
NUMERIC_BLOCK_SIZE 0
@@ -2039,10 +1931,10 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_THREAD_SLEEP_DELAY
SESSION_VALUE NULL
-DEFAULT_VALUE 10000
+DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
-VARIABLE_COMMENT Time of innodb thread sleeping before joining InnoDB queue (usec). Value 0 disable a sleep
+VARIABLE_TYPE INT UNSIGNED
+VARIABLE_COMMENT Deprecated parameter with no effect.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 1000000
NUMERIC_BLOCK_SIZE 0
@@ -2102,8 +1994,8 @@ SESSION_VALUE NULL
DEFAULT_VALUE 128
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
-VARIABLE_COMMENT Number of undo logs to use.
-NUMERIC_MIN_VALUE 1
+VARIABLE_COMMENT Deprecated parameter with no effect.
+NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 128
NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
@@ -2149,9 +2041,9 @@ VARIABLE_NAME INNODB_WRITE_IO_THREADS
SESSION_VALUE NULL
DEFAULT_VALUE 4
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Number of background write I/O threads in InnoDB.
-NUMERIC_MIN_VALUE 1
+NUMERIC_MIN_VALUE 2
NUMERIC_MAX_VALUE 64
NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
diff --git a/mysql-test/suite/sys_vars/r/sysvars_server_embedded,32bit.rdiff b/mysql-test/suite/sys_vars/r/sysvars_server_embedded,32bit.rdiff
index 9ec15d3079a..c8049d28c35 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_server_embedded,32bit.rdiff
+++ b/mysql-test/suite/sys_vars/r/sysvars_server_embedded,32bit.rdiff
@@ -1,6 +1,6 @@
---- sysvars_server_embedded.result
-+++ sysvars_server_embedded.result
-@@ -34,7 +34,7 @@ READ_ONLY NO
+--- suite/sys_vars/r/sysvars_server_embedded.result 2021-02-02 14:07:21.616784062 +0200
++++ suite/sys_vars/r/sysvars_server_embedded,32bit.reject 2021-02-02 18:56:53.727764717 +0200
+@@ -35,7 +35,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_BLOCK_SIZE
VARIABLE_SCOPE GLOBAL
@@ -9,7 +9,7 @@
VARIABLE_COMMENT Block size to be used for Aria index pages.
NUMERIC_MIN_VALUE 4096
NUMERIC_MAX_VALUE 32768
-@@ -44,7 +44,7 @@ READ_ONLY YES
+@@ -45,7 +45,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_CHECKPOINT_INTERVAL
VARIABLE_SCOPE GLOBAL
@@ -18,7 +18,7 @@
VARIABLE_COMMENT Interval between tries to do an automatic checkpoints. In seconds; 0 means 'no automatic checkpoints' which makes sense only for testing.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -54,7 +54,7 @@ READ_ONLY NO
+@@ -55,7 +55,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_CHECKPOINT_LOG_ACTIVITY
VARIABLE_SCOPE GLOBAL
@@ -27,7 +27,7 @@
VARIABLE_COMMENT Number of bytes that the transaction log has to grow between checkpoints before a new checkpoint is written to the log.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -74,7 +74,7 @@ READ_ONLY NO
+@@ -75,7 +75,7 @@
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME ARIA_FORCE_START_AFTER_RECOVERY_FAILURES
VARIABLE_SCOPE GLOBAL
@@ -36,16 +36,16 @@
VARIABLE_COMMENT Number of consecutive log recovery failures after which logs will be automatically deleted to cure the problem; 0 (the default) disables the feature.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 255
-@@ -94,7 +94,7 @@ READ_ONLY NO
+@@ -95,7 +95,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_GROUP_COMMIT_INTERVAL
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT Interval between commite in microseconds (1/1000000c). 0 stands for no waiting for other threads to come and do a commit in "hard" mode and no sync()/commit at all in "soft" mode. Option has only an effect if aria_group_commit is used
+ VARIABLE_COMMENT Interval between commits in microseconds (1/1000000 sec). 0 stands for no waiting for other threads to come and do a commit in "hard" mode and no sync()/commit at all in "soft" mode. Option has only an effect if aria_group_commit is used
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -104,7 +104,7 @@ READ_ONLY NO
+@@ -105,7 +105,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_LOG_FILE_SIZE
VARIABLE_SCOPE GLOBAL
@@ -54,7 +54,7 @@
VARIABLE_COMMENT Limit for transaction log size
NUMERIC_MIN_VALUE 8388608
NUMERIC_MAX_VALUE 4294967295
-@@ -134,10 +134,10 @@ READ_ONLY NO
+@@ -135,10 +135,10 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_PAGECACHE_AGE_THRESHOLD
VARIABLE_SCOPE GLOBAL
@@ -67,7 +67,7 @@
NUMERIC_BLOCK_SIZE 100
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -154,7 +154,7 @@ READ_ONLY YES
+@@ -155,7 +155,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_PAGECACHE_DIVISION_LIMIT
VARIABLE_SCOPE GLOBAL
@@ -76,7 +76,7 @@
VARIABLE_COMMENT The minimum percentage of warm blocks in key cache
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 100
-@@ -164,7 +164,7 @@ READ_ONLY NO
+@@ -165,7 +165,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_PAGECACHE_FILE_HASH_SIZE
VARIABLE_SCOPE GLOBAL
@@ -85,7 +85,7 @@
VARIABLE_COMMENT Number of hash buckets for open and changed files. If you have a lot of Aria files open you should increase this for faster flush of changes. A good value is probably 1/10 of number of possible open Aria files.
NUMERIC_MIN_VALUE 128
NUMERIC_MAX_VALUE 16384
-@@ -194,7 +194,7 @@ READ_ONLY NO
+@@ -195,7 +195,7 @@
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME ARIA_REPAIR_THREADS
VARIABLE_SCOPE SESSION
@@ -94,16 +94,16 @@
VARIABLE_COMMENT Number of threads to use when repairing Aria tables. The value of 1 disables parallel repair.
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 128
-@@ -207,7 +207,7 @@ VARIABLE_SCOPE SESSION
+@@ -208,7 +208,7 @@
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The buffer that is allocated when sorting the index when doing a REPAIR or when creating indexes with CREATE INDEX or ALTER TABLE.
NUMERIC_MIN_VALUE 4096
--NUMERIC_MAX_VALUE 18446744073709551615
-+NUMERIC_MAX_VALUE 4294967295
+-NUMERIC_MAX_VALUE 9223372036854775807
++NUMERIC_MAX_VALUE 2147483647
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -264,7 +264,7 @@ READ_ONLY NO
+@@ -265,7 +265,7 @@
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME AUTO_INCREMENT_INCREMENT
VARIABLE_SCOPE SESSION
@@ -112,7 +112,7 @@
VARIABLE_COMMENT Auto-increment columns are incremented by this
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 65535
-@@ -274,7 +274,7 @@ READ_ONLY NO
+@@ -275,7 +275,7 @@
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME AUTO_INCREMENT_OFFSET
VARIABLE_SCOPE SESSION
@@ -121,7 +121,7 @@
VARIABLE_COMMENT Offset added to Auto-increment columns. Used when auto-increment-increment != 1
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 65535
-@@ -284,7 +284,7 @@ READ_ONLY NO
+@@ -285,7 +285,7 @@
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME BACK_LOG
VARIABLE_SCOPE GLOBAL
@@ -130,7 +130,7 @@
VARIABLE_COMMENT The number of outstanding connection requests MariaDB can have. This comes into play when the main MariaDB thread gets very many connection requests in a very short time
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 65535
-@@ -337,7 +337,7 @@ VARIABLE_SCOPE GLOBAL
+@@ -338,7 +338,7 @@
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The size of the transactional cache for updates to transactional engines for the binary log. If you often use transactions containing many statements, you can increase this to get more performance
NUMERIC_MIN_VALUE 4096
@@ -139,7 +139,7 @@
NUMERIC_BLOCK_SIZE 4096
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -354,20 +354,20 @@ READ_ONLY NO
+@@ -355,20 +355,20 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME BINLOG_COMMIT_WAIT_COUNT
VARIABLE_SCOPE GLOBAL
@@ -164,7 +164,7 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -387,7 +387,7 @@ VARIABLE_SCOPE GLOBAL
+@@ -388,7 +388,7 @@
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The size of file cache for the binary log
NUMERIC_MIN_VALUE 8192
@@ -173,7 +173,7 @@
NUMERIC_BLOCK_SIZE 4096
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -427,7 +427,7 @@ VARIABLE_SCOPE GLOBAL
+@@ -438,7 +438,7 @@
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The size of the statement cache for updates to non-transactional engines for the binary log. If you often use statements updating a great number of rows, you can increase this to get more performance.
NUMERIC_MIN_VALUE 4096
@@ -182,7 +182,7 @@
NUMERIC_BLOCK_SIZE 4096
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -437,7 +437,7 @@ VARIABLE_SCOPE SESSION
+@@ -448,7 +448,7 @@
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Size of tree cache used in bulk insert optimisation. Note that this is a limit per thread!
NUMERIC_MIN_VALUE 0
@@ -191,7 +191,7 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -624,7 +624,7 @@ READ_ONLY NO
+@@ -635,7 +635,7 @@
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME CONNECT_TIMEOUT
VARIABLE_SCOPE GLOBAL
@@ -200,7 +200,7 @@
VARIABLE_COMMENT The number of seconds the mysqld server is waiting for a connect packet before responding with 'Bad handshake'
NUMERIC_MIN_VALUE 2
NUMERIC_MAX_VALUE 31536000
-@@ -674,7 +674,7 @@ READ_ONLY YES
+@@ -685,7 +685,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME DEADLOCK_SEARCH_DEPTH_LONG
VARIABLE_SCOPE SESSION
@@ -209,7 +209,7 @@
VARIABLE_COMMENT Long search depth for the two-step deadlock detection
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 33
-@@ -684,7 +684,7 @@ READ_ONLY NO
+@@ -695,7 +695,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME DEADLOCK_SEARCH_DEPTH_SHORT
VARIABLE_SCOPE SESSION
@@ -218,7 +218,7 @@
VARIABLE_COMMENT Short search depth for the two-step deadlock detection
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 32
-@@ -694,7 +694,7 @@ READ_ONLY NO
+@@ -705,7 +705,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME DEADLOCK_TIMEOUT_LONG
VARIABLE_SCOPE SESSION
@@ -227,7 +227,7 @@
VARIABLE_COMMENT Long timeout for the two-step deadlock detection (in microseconds)
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -704,7 +704,7 @@ READ_ONLY NO
+@@ -715,7 +715,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME DEADLOCK_TIMEOUT_SHORT
VARIABLE_SCOPE SESSION
@@ -236,7 +236,7 @@
VARIABLE_COMMENT Short timeout for the two-step deadlock detection (in microseconds)
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -754,7 +754,7 @@ READ_ONLY NO
+@@ -765,7 +765,7 @@
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME DEFAULT_WEEK_FORMAT
VARIABLE_SCOPE SESSION
@@ -245,7 +245,7 @@
VARIABLE_COMMENT The default week format used by WEEK() functions
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 7
-@@ -764,7 +764,7 @@ READ_ONLY NO
+@@ -775,7 +775,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME DELAYED_INSERT_LIMIT
VARIABLE_SCOPE GLOBAL
@@ -254,7 +254,7 @@
VARIABLE_COMMENT After inserting delayed_insert_limit rows, the INSERT DELAYED handler will check if there are any SELECT statements pending. If so, it allows these to execute before continuing.
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 4294967295
-@@ -774,7 +774,7 @@ READ_ONLY NO
+@@ -785,7 +785,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME DELAYED_INSERT_TIMEOUT
VARIABLE_SCOPE GLOBAL
@@ -263,7 +263,7 @@
VARIABLE_COMMENT How long a INSERT DELAYED thread should wait for INSERT statements before terminating
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 31536000
-@@ -784,7 +784,7 @@ READ_ONLY NO
+@@ -795,7 +795,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME DELAYED_QUEUE_SIZE
VARIABLE_SCOPE GLOBAL
@@ -272,7 +272,7 @@
VARIABLE_COMMENT What size queue (in rows) should be allocated for handling INSERT DELAYED. If the queue becomes full, any client that does INSERT DELAYED will wait until there is room in the queue again
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 4294967295
-@@ -814,7 +814,7 @@ READ_ONLY NO
+@@ -825,7 +825,7 @@
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME DIV_PRECISION_INCREMENT
VARIABLE_SCOPE SESSION
@@ -281,7 +281,7 @@
VARIABLE_COMMENT Precision of the result of '/' operator will be increased on that value
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 38
-@@ -894,7 +894,7 @@ READ_ONLY NO
+@@ -905,7 +905,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME EXPIRE_LOGS_DAYS
VARIABLE_SCOPE GLOBAL
@@ -290,7 +290,7 @@
VARIABLE_COMMENT If non-zero, binary logs will be purged after expire_logs_days days; possible purges happen at startup and at binary log rotation
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 99
-@@ -924,7 +924,7 @@ READ_ONLY YES
+@@ -935,7 +935,7 @@
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME EXTRA_MAX_CONNECTIONS
VARIABLE_SCOPE GLOBAL
@@ -299,7 +299,7 @@
VARIABLE_COMMENT The number of connections on extra-port
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 100000
-@@ -954,7 +954,7 @@ READ_ONLY NO
+@@ -965,7 +965,7 @@
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME FLUSH_TIME
VARIABLE_SCOPE GLOBAL
@@ -308,7 +308,7 @@
VARIABLE_COMMENT A dedicated thread is created to flush all tables at the given interval
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 31536000
-@@ -984,7 +984,7 @@ READ_ONLY NO
+@@ -995,7 +995,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME FT_MAX_WORD_LEN
VARIABLE_SCOPE GLOBAL
@@ -317,7 +317,7 @@
VARIABLE_COMMENT The maximum length of the word to be included in a FULLTEXT index. Note: FULLTEXT indexes must be rebuilt after changing this variable
NUMERIC_MIN_VALUE 10
NUMERIC_MAX_VALUE 84
-@@ -994,7 +994,7 @@ READ_ONLY YES
+@@ -1005,7 +1005,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME FT_MIN_WORD_LEN
VARIABLE_SCOPE GLOBAL
@@ -326,7 +326,7 @@
VARIABLE_COMMENT The minimum length of the word to be included in a FULLTEXT index. Note: FULLTEXT indexes must be rebuilt after changing this variable
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 84
-@@ -1004,7 +1004,7 @@ READ_ONLY YES
+@@ -1015,7 +1015,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME FT_QUERY_EXPANSION_LIMIT
VARIABLE_SCOPE GLOBAL
@@ -335,16 +335,7 @@
VARIABLE_COMMENT Number of best matches to use for query expansion
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 1000
-@@ -1047,7 +1047,7 @@ VARIABLE_SCOPE SESSION
- VARIABLE_TYPE BIGINT UNSIGNED
- VARIABLE_COMMENT The maximum length of the result of function GROUP_CONCAT()
- NUMERIC_MIN_VALUE 4
--NUMERIC_MAX_VALUE 18446744073709551615
-+NUMERIC_MAX_VALUE 4294967295
- NUMERIC_BLOCK_SIZE 1
- ENUM_VALUE_LIST NULL
- READ_ONLY NO
-@@ -1174,7 +1174,7 @@ READ_ONLY YES
+@@ -1185,7 +1185,7 @@
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME HISTOGRAM_SIZE
VARIABLE_SCOPE SESSION
@@ -353,7 +344,7 @@
VARIABLE_COMMENT Number of bytes used for a histogram. If set to 0, no histograms are created by ANALYZE.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 255
-@@ -1204,7 +1204,7 @@ READ_ONLY YES
+@@ -1215,7 +1215,7 @@
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME HOST_CACHE_SIZE
VARIABLE_SCOPE GLOBAL
@@ -362,7 +353,7 @@
VARIABLE_COMMENT How many host names should be cached to avoid resolving.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 65536
-@@ -1314,7 +1314,7 @@ READ_ONLY NO
+@@ -1325,7 +1325,7 @@
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME INTERACTIVE_TIMEOUT
VARIABLE_SCOPE SESSION
@@ -371,7 +362,7 @@
VARIABLE_COMMENT The number of seconds the server waits for activity on an interactive connection before closing it
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 31536000
-@@ -1347,7 +1347,7 @@ VARIABLE_SCOPE SESSION
+@@ -1358,7 +1358,7 @@
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The size of the buffer that is used for joins
NUMERIC_MIN_VALUE 128
@@ -380,7 +371,7 @@
NUMERIC_BLOCK_SIZE 128
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -1364,7 +1364,7 @@ READ_ONLY NO
+@@ -1375,7 +1375,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME JOIN_CACHE_LEVEL
VARIABLE_SCOPE SESSION
@@ -389,7 +380,7 @@
VARIABLE_COMMENT Controls what join operations can be executed with join buffers. Odd numbers are used for plain join buffers while even numbers are used for linked buffers
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 8
-@@ -1387,7 +1387,7 @@ VARIABLE_SCOPE GLOBAL
+@@ -1398,7 +1398,7 @@
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The size of the buffer used for index blocks for MyISAM tables. Increase this to get better index handling (for all reads and multiple writes) to as much as you can afford
NUMERIC_MIN_VALUE 0
@@ -398,7 +389,7 @@
NUMERIC_BLOCK_SIZE 4096
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -1544,7 +1544,7 @@ READ_ONLY YES
+@@ -1555,7 +1555,7 @@
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME LOCK_WAIT_TIMEOUT
VARIABLE_SCOPE SESSION
@@ -407,7 +398,7 @@
VARIABLE_COMMENT Timeout in seconds to wait for a lock before returning an error.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 31536000
-@@ -1664,7 +1664,7 @@ READ_ONLY NO
+@@ -1675,7 +1675,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME LOG_SLOW_RATE_LIMIT
VARIABLE_SCOPE SESSION
@@ -416,7 +407,7 @@
VARIABLE_COMMENT Write to slow log every #th slow query. Set to 1 to log everything. Increase it to reduce the size of the slow or the performance impact of slow logging
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 4294967295
-@@ -1694,7 +1694,7 @@ READ_ONLY NO
+@@ -1705,7 +1705,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME LOG_WARNINGS
VARIABLE_SCOPE SESSION
@@ -425,7 +416,7 @@
VARIABLE_COMMENT Log some not critical warnings to the general log file.Value can be between 0 and 11. Higher values mean more verbosity
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -1744,7 +1744,7 @@ READ_ONLY NO
+@@ -1755,7 +1755,7 @@
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME MAX_ALLOWED_PACKET
VARIABLE_SCOPE SESSION
@@ -434,7 +425,7 @@
VARIABLE_COMMENT Max packet length to send to or receive from the server
NUMERIC_MIN_VALUE 1024
NUMERIC_MAX_VALUE 1073741824
-@@ -1757,14 +1757,14 @@ VARIABLE_SCOPE GLOBAL
+@@ -1768,14 +1768,14 @@
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Sets the total size of the transactional cache
NUMERIC_MIN_VALUE 4096
@@ -451,7 +442,7 @@
VARIABLE_COMMENT Binary log will be rotated automatically when the size exceeds this value.
NUMERIC_MIN_VALUE 4096
NUMERIC_MAX_VALUE 1073741824
-@@ -1777,14 +1777,14 @@ VARIABLE_SCOPE GLOBAL
+@@ -1788,14 +1788,14 @@
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Sets the total size of the statement cache
NUMERIC_MIN_VALUE 4096
@@ -468,7 +459,7 @@
VARIABLE_COMMENT The number of simultaneous clients allowed
NUMERIC_MIN_VALUE 10
NUMERIC_MAX_VALUE 100000
-@@ -1794,7 +1794,7 @@ READ_ONLY NO
+@@ -1805,7 +1805,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_CONNECT_ERRORS
VARIABLE_SCOPE GLOBAL
@@ -477,7 +468,7 @@
VARIABLE_COMMENT If there is more than this number of interrupted connections from a host this host will be blocked from further connections
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 4294967295
-@@ -1804,7 +1804,7 @@ READ_ONLY NO
+@@ -1815,7 +1815,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_DELAYED_THREADS
VARIABLE_SCOPE SESSION
@@ -486,7 +477,7 @@
VARIABLE_COMMENT Don't start more than this number of threads to handle INSERT DELAYED statements. If set to zero INSERT DELAYED will be not used
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 16384
-@@ -1824,7 +1824,7 @@ READ_ONLY YES
+@@ -1835,7 +1835,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_ERROR_COUNT
VARIABLE_SCOPE SESSION
@@ -495,7 +486,7 @@
VARIABLE_COMMENT Max number of errors/warnings to store for a statement
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 65535
-@@ -1837,14 +1837,14 @@ VARIABLE_SCOPE SESSION
+@@ -1848,14 +1848,14 @@
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Don't allow creation of heap tables bigger than this
NUMERIC_MIN_VALUE 16384
@@ -512,7 +503,7 @@
VARIABLE_COMMENT Don't start more than this number of threads to handle INSERT DELAYED statements. If set to zero INSERT DELAYED will be not used
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 16384
-@@ -1864,7 +1864,7 @@ READ_ONLY NO
+@@ -1875,7 +1875,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_LENGTH_FOR_SORT_DATA
VARIABLE_SCOPE SESSION
@@ -521,16 +512,7 @@
VARIABLE_COMMENT Max number of bytes in sorted records
NUMERIC_MIN_VALUE 4
NUMERIC_MAX_VALUE 8388608
-@@ -1874,7 +1874,7 @@ READ_ONLY NO
- COMMAND_LINE_ARGUMENT REQUIRED
- VARIABLE_NAME MAX_LONG_DATA_SIZE
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT The maximum BLOB length to send to server from mysql_send_long_data API. Deprecated option; use max_allowed_packet instead.
- NUMERIC_MIN_VALUE 1024
- NUMERIC_MAX_VALUE 4294967295
-@@ -1904,7 +1904,7 @@ READ_ONLY NO
+@@ -1905,7 +1905,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_RECURSIVE_ITERATIONS
VARIABLE_SCOPE SESSION
@@ -539,7 +521,7 @@
VARIABLE_COMMENT Maximum number of iterations when executing recursive queries
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -1917,14 +1917,14 @@ VARIABLE_SCOPE SESSION
+@@ -1918,14 +1918,14 @@
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The maximum size of the container of a rowid filter
NUMERIC_MIN_VALUE 1024
@@ -556,16 +538,16 @@
VARIABLE_COMMENT Limit assumed max number of seeks when looking up rows based on a key
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 4294967295
-@@ -1944,7 +1944,7 @@ READ_ONLY NO
+@@ -1945,7 +1945,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_SORT_LENGTH
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT The number of bytes to use when sorting BLOB or TEXT values (only the first max_sort_length bytes of each value are used; the rest are ignored)
- NUMERIC_MIN_VALUE 4
+ NUMERIC_MIN_VALUE 64
NUMERIC_MAX_VALUE 8388608
-@@ -1954,7 +1954,7 @@ READ_ONLY NO
+@@ -1955,7 +1955,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_SP_RECURSION_DEPTH
VARIABLE_SCOPE SESSION
@@ -574,7 +556,7 @@
VARIABLE_COMMENT Maximum stored procedure recursion depth
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 255
-@@ -1974,7 +1974,7 @@ READ_ONLY NO
+@@ -1975,7 +1975,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_TMP_TABLES
VARIABLE_SCOPE SESSION
@@ -583,7 +565,7 @@
VARIABLE_COMMENT Unused, will be removed.
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 4294967295
-@@ -1994,7 +1994,7 @@ READ_ONLY NO
+@@ -1995,7 +1995,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_WRITE_LOCK_COUNT
VARIABLE_SCOPE GLOBAL
@@ -592,7 +574,7 @@
VARIABLE_COMMENT After this many write locks, allow some read locks to run in between
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 4294967295
-@@ -2004,7 +2004,7 @@ READ_ONLY NO
+@@ -2005,7 +2005,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME METADATA_LOCKS_CACHE_SIZE
VARIABLE_SCOPE GLOBAL
@@ -601,7 +583,7 @@
VARIABLE_COMMENT Unused
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 1048576
-@@ -2014,7 +2014,7 @@ READ_ONLY YES
+@@ -2015,7 +2015,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME METADATA_LOCKS_HASH_INSTANCES
VARIABLE_SCOPE GLOBAL
@@ -610,7 +592,7 @@
VARIABLE_COMMENT Unused
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 1024
-@@ -2024,7 +2024,7 @@ READ_ONLY YES
+@@ -2025,7 +2025,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MIN_EXAMINED_ROW_LIMIT
VARIABLE_SCOPE SESSION
@@ -619,7 +601,7 @@
VARIABLE_COMMENT Don't write queries to slow log that examine fewer rows than that
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -2034,7 +2034,7 @@ READ_ONLY NO
+@@ -2035,7 +2035,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MRR_BUFFER_SIZE
VARIABLE_SCOPE SESSION
@@ -628,19 +610,7 @@
VARIABLE_COMMENT Size of buffer to use when using MRR with range access
NUMERIC_MIN_VALUE 8192
NUMERIC_MAX_VALUE 2147483647
-@@ -2044,17 +2044,17 @@ READ_ONLY NO
- COMMAND_LINE_ARGUMENT REQUIRED
- VARIABLE_NAME MULTI_RANGE_COUNT
- VARIABLE_SCOPE SESSION
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT Ignored. Use mrr_buffer_size instead
- NUMERIC_MIN_VALUE 1
--NUMERIC_MAX_VALUE 18446744073709551615
-+NUMERIC_MAX_VALUE 4294967295
- NUMERIC_BLOCK_SIZE 1
- ENUM_VALUE_LIST NULL
- READ_ONLY NO
+@@ -2045,7 +2045,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MYISAM_BLOCK_SIZE
VARIABLE_SCOPE GLOBAL
@@ -649,7 +619,7 @@
VARIABLE_COMMENT Block size to be used for MyISAM index pages
NUMERIC_MIN_VALUE 1024
NUMERIC_MAX_VALUE 16384
-@@ -2064,7 +2064,7 @@ READ_ONLY YES
+@@ -2055,7 +2055,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MYISAM_DATA_POINTER_SIZE
VARIABLE_SCOPE GLOBAL
@@ -658,7 +628,7 @@
VARIABLE_COMMENT Default pointer size to be used for MyISAM tables
NUMERIC_MIN_VALUE 2
NUMERIC_MAX_VALUE 7
-@@ -2087,7 +2087,7 @@ VARIABLE_SCOPE GLOBAL
+@@ -2078,7 +2078,7 @@
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Restricts the total memory used for memory mapping of MySQL tables
NUMERIC_MIN_VALUE 7
@@ -667,7 +637,7 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY YES
-@@ -2104,10 +2104,10 @@ READ_ONLY YES
+@@ -2095,10 +2095,10 @@
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME MYISAM_REPAIR_THREADS
VARIABLE_SCOPE SESSION
@@ -680,7 +650,7 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -2117,7 +2117,7 @@ VARIABLE_SCOPE SESSION
+@@ -2108,7 +2108,7 @@
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The buffer that is allocated when sorting the index when doing a REPAIR or when creating indexes with CREATE INDEX or ALTER TABLE
NUMERIC_MIN_VALUE 4096
@@ -689,7 +659,7 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -2154,7 +2154,7 @@ READ_ONLY NO
+@@ -2145,7 +2145,7 @@
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME NET_BUFFER_LENGTH
VARIABLE_SCOPE SESSION
@@ -698,7 +668,7 @@
VARIABLE_COMMENT Buffer length for TCP/IP and socket communication
NUMERIC_MIN_VALUE 1024
NUMERIC_MAX_VALUE 1048576
-@@ -2164,7 +2164,7 @@ READ_ONLY NO
+@@ -2155,7 +2155,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME NET_READ_TIMEOUT
VARIABLE_SCOPE SESSION
@@ -707,7 +677,7 @@
VARIABLE_COMMENT Number of seconds to wait for more data from a connection before aborting the read
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 31536000
-@@ -2174,7 +2174,7 @@ READ_ONLY NO
+@@ -2165,7 +2165,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME NET_RETRY_COUNT
VARIABLE_SCOPE SESSION
@@ -716,7 +686,7 @@
VARIABLE_COMMENT If a read on a communication port is interrupted, retry this many times before giving up
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 4294967295
-@@ -2184,7 +2184,7 @@ READ_ONLY NO
+@@ -2175,7 +2175,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME NET_WRITE_TIMEOUT
VARIABLE_SCOPE SESSION
@@ -725,7 +695,7 @@
VARIABLE_COMMENT Number of seconds to wait for a block to be written to a connection before aborting the write
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 31536000
-@@ -2234,7 +2234,7 @@ READ_ONLY NO
+@@ -2225,7 +2225,7 @@
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME OPEN_FILES_LIMIT
VARIABLE_SCOPE GLOBAL
@@ -734,7 +704,19 @@
VARIABLE_COMMENT If this is not 0, then mysqld will use this value to reserve file descriptors to use with setrlimit(). If this value is 0 or autoset then mysqld will reserve max_connections*5 or max_connections + table_cache*2 (whichever is larger) number of file descriptors
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -2244,7 +2244,7 @@ READ_ONLY YES
+@@ -2235,17 +2235,17 @@
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME OPTIMIZER_MAX_SEL_ARG_WEIGHT
+ VARIABLE_SCOPE SESSION
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT The maximum weight of the SEL_ARG graph. Set to 0 for no limit
+ NUMERIC_MIN_VALUE 0
+-NUMERIC_MAX_VALUE 18446744073709551615
++NUMERIC_MAX_VALUE 4294967295
+ NUMERIC_BLOCK_SIZE 1
+ ENUM_VALUE_LIST NULL
+ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME OPTIMIZER_PRUNE_LEVEL
VARIABLE_SCOPE SESSION
@@ -743,7 +725,7 @@
VARIABLE_COMMENT Controls the heuristic(s) applied during query optimization to prune less-promising partial plans from the optimizer search space. Meaning: 0 - do not apply any heuristic, thus perform exhaustive search; 1 - prune plans based on number of retrieved rows
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 1
-@@ -2254,7 +2254,7 @@ READ_ONLY NO
+@@ -2255,7 +2255,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME OPTIMIZER_SEARCH_DEPTH
VARIABLE_SCOPE SESSION
@@ -752,7 +734,7 @@
VARIABLE_COMMENT Maximum depth of search performed by the query optimizer. Values larger than the number of relations in a query result in better query plans, but take longer to compile a query. Values smaller than the number of tables in a relation result in faster optimization, but may produce very bad query plans. If set to 0, the system will automatically pick a reasonable value.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 62
-@@ -2264,7 +2264,7 @@ READ_ONLY NO
+@@ -2265,7 +2265,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME OPTIMIZER_SELECTIVITY_SAMPLING_LIMIT
VARIABLE_SCOPE SESSION
@@ -761,7 +743,7 @@
VARIABLE_COMMENT Controls number of record samples to check condition selectivity
NUMERIC_MIN_VALUE 10
NUMERIC_MAX_VALUE 4294967295
-@@ -2294,17 +2294,17 @@ READ_ONLY NO
+@@ -2295,17 +2295,17 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME OPTIMIZER_TRACE_MAX_MEM_SIZE
VARIABLE_SCOPE SESSION
@@ -782,7 +764,7 @@
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
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 5
-@@ -2324,7 +2324,7 @@ READ_ONLY YES
+@@ -2325,7 +2325,7 @@
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME PERFORMANCE_SCHEMA_ACCOUNTS_SIZE
VARIABLE_SCOPE GLOBAL
@@ -791,7 +773,7 @@
VARIABLE_COMMENT Maximum number of instrumented user@host accounts. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -2334,7 +2334,7 @@ READ_ONLY YES
+@@ -2335,7 +2335,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_DIGESTS_SIZE
VARIABLE_SCOPE GLOBAL
@@ -799,8 +781,8 @@
+VARIABLE_TYPE INT
VARIABLE_COMMENT Size of the statement digest. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
- NUMERIC_MAX_VALUE 200
-@@ -2344,7 +2344,7 @@ READ_ONLY YES
+ NUMERIC_MAX_VALUE 1048576
+@@ -2345,7 +2345,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_STAGES_HISTORY_LONG_SIZE
VARIABLE_SCOPE GLOBAL
@@ -809,7 +791,7 @@
VARIABLE_COMMENT Number of rows in EVENTS_STAGES_HISTORY_LONG. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -2354,7 +2354,7 @@ READ_ONLY YES
+@@ -2355,7 +2355,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_STAGES_HISTORY_SIZE
VARIABLE_SCOPE GLOBAL
@@ -818,7 +800,7 @@
VARIABLE_COMMENT Number of rows per thread in EVENTS_STAGES_HISTORY. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1024
-@@ -2364,7 +2364,7 @@ READ_ONLY YES
+@@ -2365,7 +2365,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_STATEMENTS_HISTORY_LONG_SIZE
VARIABLE_SCOPE GLOBAL
@@ -827,7 +809,7 @@
VARIABLE_COMMENT Number of rows in EVENTS_STATEMENTS_HISTORY_LONG. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -2374,7 +2374,7 @@ READ_ONLY YES
+@@ -2375,7 +2375,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_STATEMENTS_HISTORY_SIZE
VARIABLE_SCOPE GLOBAL
@@ -836,7 +818,25 @@
VARIABLE_COMMENT Number of rows per thread in EVENTS_STATEMENTS_HISTORY. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1024
-@@ -2384,7 +2384,7 @@ READ_ONLY YES
+@@ -2385,7 +2385,7 @@
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_TRANSACTIONS_HISTORY_LONG_SIZE
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT
++VARIABLE_TYPE INT
+ VARIABLE_COMMENT Number of rows in EVENTS_TRANSACTIONS_HISTORY_LONG. Use 0 to disable, -1 for automated sizing.
+ NUMERIC_MIN_VALUE -1
+ NUMERIC_MAX_VALUE 1048576
+@@ -2395,7 +2395,7 @@
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_TRANSACTIONS_HISTORY_SIZE
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT
++VARIABLE_TYPE INT
+ VARIABLE_COMMENT Number of rows per thread in EVENTS_TRANSACTIONS_HISTORY. Use 0 to disable, -1 for automated sizing.
+ NUMERIC_MIN_VALUE -1
+ NUMERIC_MAX_VALUE 1024
+@@ -2405,7 +2405,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_WAITS_HISTORY_LONG_SIZE
VARIABLE_SCOPE GLOBAL
@@ -845,7 +845,7 @@
VARIABLE_COMMENT Number of rows in EVENTS_WAITS_HISTORY_LONG. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -2394,7 +2394,7 @@ READ_ONLY YES
+@@ -2415,7 +2415,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_WAITS_HISTORY_SIZE
VARIABLE_SCOPE GLOBAL
@@ -854,7 +854,7 @@
VARIABLE_COMMENT Number of rows per thread in EVENTS_WAITS_HISTORY. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1024
-@@ -2404,7 +2404,7 @@ READ_ONLY YES
+@@ -2425,7 +2425,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_HOSTS_SIZE
VARIABLE_SCOPE GLOBAL
@@ -863,7 +863,7 @@
VARIABLE_COMMENT Maximum number of instrumented hosts. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -2414,7 +2414,7 @@ READ_ONLY YES
+@@ -2435,7 +2435,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_COND_CLASSES
VARIABLE_SCOPE GLOBAL
@@ -872,7 +872,7 @@
VARIABLE_COMMENT Maximum number of condition instruments.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 256
-@@ -2424,7 +2424,7 @@ READ_ONLY YES
+@@ -2445,7 +2445,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_COND_INSTANCES
VARIABLE_SCOPE GLOBAL
@@ -881,7 +881,7 @@
VARIABLE_COMMENT Maximum number of instrumented condition objects. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -2434,7 +2434,7 @@ READ_ONLY YES
+@@ -2455,7 +2455,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_DIGEST_LENGTH
VARIABLE_SCOPE GLOBAL
@@ -890,7 +890,7 @@
VARIABLE_COMMENT Maximum length considered for digest text, when stored in performance_schema tables.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 1048576
-@@ -2444,7 +2444,7 @@ READ_ONLY YES
+@@ -2465,7 +2465,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_FILE_CLASSES
VARIABLE_SCOPE GLOBAL
@@ -899,7 +899,7 @@
VARIABLE_COMMENT Maximum number of file instruments.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 256
-@@ -2454,7 +2454,7 @@ READ_ONLY YES
+@@ -2475,7 +2475,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_FILE_HANDLES
VARIABLE_SCOPE GLOBAL
@@ -908,7 +908,7 @@
VARIABLE_COMMENT Maximum number of opened instrumented files.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 1048576
-@@ -2464,7 +2464,7 @@ READ_ONLY YES
+@@ -2485,7 +2485,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_FILE_INSTANCES
VARIABLE_SCOPE GLOBAL
@@ -917,7 +917,34 @@
VARIABLE_COMMENT Maximum number of instrumented files. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -2474,7 +2474,7 @@ READ_ONLY YES
+@@ -2495,7 +2495,7 @@
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_INDEX_STAT
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT
++VARIABLE_TYPE INT
+ VARIABLE_COMMENT Maximum number of index statistics for instrumented tables. Use 0 to disable, -1 for automated scaling.
+ NUMERIC_MIN_VALUE -1
+ NUMERIC_MAX_VALUE 1048576
+@@ -2505,7 +2505,7 @@
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_MEMORY_CLASSES
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT Maximum number of memory pool instruments.
+ NUMERIC_MIN_VALUE 0
+ NUMERIC_MAX_VALUE 1024
+@@ -2515,7 +2515,7 @@
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_METADATA_LOCKS
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT
++VARIABLE_TYPE INT
+ VARIABLE_COMMENT Maximum number of metadata locks. Use 0 to disable, -1 for automated scaling.
+ NUMERIC_MIN_VALUE -1
+ NUMERIC_MAX_VALUE 104857600
+@@ -2525,7 +2525,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_MUTEX_CLASSES
VARIABLE_SCOPE GLOBAL
@@ -926,7 +953,7 @@
VARIABLE_COMMENT Maximum number of mutex instruments.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 256
-@@ -2484,7 +2484,7 @@ READ_ONLY YES
+@@ -2535,7 +2535,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_MUTEX_INSTANCES
VARIABLE_SCOPE GLOBAL
@@ -935,7 +962,25 @@
VARIABLE_COMMENT Maximum number of instrumented MUTEX objects. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 104857600
-@@ -2494,7 +2494,7 @@ READ_ONLY YES
+@@ -2545,7 +2545,7 @@
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_PREPARED_STATEMENTS_INSTANCES
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT
++VARIABLE_TYPE INT
+ VARIABLE_COMMENT Maximum number of instrumented prepared statements. Use 0 to disable, -1 for automated scaling.
+ NUMERIC_MIN_VALUE -1
+ NUMERIC_MAX_VALUE 1048576
+@@ -2555,7 +2555,7 @@
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_PROGRAM_INSTANCES
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT
++VARIABLE_TYPE INT
+ VARIABLE_COMMENT Maximum number of instrumented programs. Use 0 to disable, -1 for automated scaling.
+ NUMERIC_MIN_VALUE -1
+ NUMERIC_MAX_VALUE 1048576
+@@ -2565,7 +2565,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_RWLOCK_CLASSES
VARIABLE_SCOPE GLOBAL
@@ -944,7 +989,7 @@
VARIABLE_COMMENT Maximum number of rwlock instruments.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 256
-@@ -2504,7 +2504,7 @@ READ_ONLY YES
+@@ -2575,7 +2575,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_RWLOCK_INSTANCES
VARIABLE_SCOPE GLOBAL
@@ -953,7 +998,7 @@
VARIABLE_COMMENT Maximum number of instrumented RWLOCK objects. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 104857600
-@@ -2514,7 +2514,7 @@ READ_ONLY YES
+@@ -2585,7 +2585,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_SOCKET_CLASSES
VARIABLE_SCOPE GLOBAL
@@ -962,7 +1007,7 @@
VARIABLE_COMMENT Maximum number of socket instruments.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 256
-@@ -2524,7 +2524,7 @@ READ_ONLY YES
+@@ -2595,7 +2595,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_SOCKET_INSTANCES
VARIABLE_SCOPE GLOBAL
@@ -971,7 +1016,16 @@
VARIABLE_COMMENT Maximum number of opened instrumented sockets. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -2534,7 +2534,7 @@ READ_ONLY YES
+@@ -2605,7 +2605,7 @@
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_SQL_TEXT_LENGTH
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT
++VARIABLE_TYPE INT
+ VARIABLE_COMMENT Maximum length of displayed sql text.
+ NUMERIC_MIN_VALUE 0
+ NUMERIC_MAX_VALUE 1048576
+@@ -2615,7 +2615,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_STAGE_CLASSES
VARIABLE_SCOPE GLOBAL
@@ -980,7 +1034,7 @@
VARIABLE_COMMENT Maximum number of stage instruments.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 256
-@@ -2544,7 +2544,7 @@ READ_ONLY YES
+@@ -2625,7 +2625,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_STATEMENT_CLASSES
VARIABLE_SCOPE GLOBAL
@@ -989,7 +1043,16 @@
VARIABLE_COMMENT Maximum number of statement instruments.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 256
-@@ -2554,7 +2554,7 @@ READ_ONLY YES
+@@ -2635,7 +2635,7 @@
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_STATEMENT_STACK
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT Number of rows per thread in EVENTS_STATEMENTS_CURRENT.
+ NUMERIC_MIN_VALUE 1
+ NUMERIC_MAX_VALUE 256
+@@ -2645,7 +2645,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_TABLE_HANDLES
VARIABLE_SCOPE GLOBAL
@@ -998,7 +1061,7 @@
VARIABLE_COMMENT Maximum number of opened instrumented tables. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -2564,7 +2564,7 @@ READ_ONLY YES
+@@ -2655,7 +2655,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_TABLE_INSTANCES
VARIABLE_SCOPE GLOBAL
@@ -1007,7 +1070,16 @@
VARIABLE_COMMENT Maximum number of instrumented tables. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -2574,7 +2574,7 @@ READ_ONLY YES
+@@ -2665,7 +2665,7 @@
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_TABLE_LOCK_STAT
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT
++VARIABLE_TYPE INT
+ VARIABLE_COMMENT Maximum number of lock statistics for instrumented tables. Use 0 to disable, -1 for automated scaling.
+ NUMERIC_MIN_VALUE -1
+ NUMERIC_MAX_VALUE 1048576
+@@ -2675,7 +2675,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_THREAD_CLASSES
VARIABLE_SCOPE GLOBAL
@@ -1016,7 +1088,7 @@
VARIABLE_COMMENT Maximum number of thread instruments.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 256
-@@ -2584,7 +2584,7 @@ READ_ONLY YES
+@@ -2685,7 +2685,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_THREAD_INSTANCES
VARIABLE_SCOPE GLOBAL
@@ -1025,7 +1097,7 @@
VARIABLE_COMMENT Maximum number of instrumented threads. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -2594,7 +2594,7 @@ READ_ONLY YES
+@@ -2695,7 +2695,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_SESSION_CONNECT_ATTRS_SIZE
VARIABLE_SCOPE GLOBAL
@@ -1034,25 +1106,25 @@
VARIABLE_COMMENT Size of session attribute string buffer per thread. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -2604,7 +2604,7 @@ READ_ONLY YES
+@@ -2705,7 +2705,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_SETUP_ACTORS_SIZE
VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
+-VARIABLE_TYPE BIGINT
++VARIABLE_TYPE INT
VARIABLE_COMMENT Maximum number of rows in SETUP_ACTORS.
- NUMERIC_MIN_VALUE 0
+ NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1024
-@@ -2614,7 +2614,7 @@ READ_ONLY YES
+@@ -2715,7 +2715,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_SETUP_OBJECTS_SIZE
VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
+-VARIABLE_TYPE BIGINT
++VARIABLE_TYPE INT
VARIABLE_COMMENT Maximum number of rows in SETUP_OBJECTS.
- NUMERIC_MIN_VALUE 0
+ NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -2624,7 +2624,7 @@ READ_ONLY YES
+@@ -2725,7 +2725,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_USERS_SIZE
VARIABLE_SCOPE GLOBAL
@@ -1061,7 +1133,7 @@
VARIABLE_COMMENT Maximum number of instrumented users. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -2674,7 +2674,7 @@ READ_ONLY YES
+@@ -2775,7 +2775,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PRELOAD_BUFFER_SIZE
VARIABLE_SCOPE SESSION
@@ -1070,7 +1142,7 @@
VARIABLE_COMMENT The size of the buffer that is allocated when preloading indexes
NUMERIC_MIN_VALUE 1024
NUMERIC_MAX_VALUE 1073741824
-@@ -2694,7 +2694,7 @@ READ_ONLY NO
+@@ -2795,7 +2795,7 @@
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME PROFILING_HISTORY_SIZE
VARIABLE_SCOPE SESSION
@@ -1079,7 +1151,7 @@
VARIABLE_COMMENT Number of statements about which profiling information is maintained. If set to 0, no profiles are stored. See SHOW PROFILES.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 100
-@@ -2704,7 +2704,7 @@ READ_ONLY NO
+@@ -2805,7 +2805,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PROGRESS_REPORT_TIME
VARIABLE_SCOPE SESSION
@@ -1088,7 +1160,7 @@
VARIABLE_COMMENT Seconds between sending progress reports to the client for time-consuming statements. Set to 0 to disable progress reporting.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -2764,7 +2764,7 @@ READ_ONLY NO
+@@ -2865,7 +2865,7 @@
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME QUERY_ALLOC_BLOCK_SIZE
VARIABLE_SCOPE SESSION
@@ -1097,7 +1169,7 @@
VARIABLE_COMMENT Allocation block size for query parsing and execution
NUMERIC_MIN_VALUE 1024
NUMERIC_MAX_VALUE 4294967295
-@@ -2774,7 +2774,7 @@ READ_ONLY NO
+@@ -2875,7 +2875,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME QUERY_CACHE_LIMIT
VARIABLE_SCOPE GLOBAL
@@ -1106,7 +1178,7 @@
VARIABLE_COMMENT Don't cache results that are bigger than this
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -2784,7 +2784,7 @@ READ_ONLY NO
+@@ -2885,7 +2885,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME QUERY_CACHE_MIN_RES_UNIT
VARIABLE_SCOPE GLOBAL
@@ -1115,7 +1187,7 @@
VARIABLE_COMMENT The minimum size for blocks allocated by the query cache
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -2797,7 +2797,7 @@ VARIABLE_SCOPE GLOBAL
+@@ -2898,7 +2898,7 @@
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The memory allocated to store results from old queries
NUMERIC_MIN_VALUE 0
@@ -1124,7 +1196,7 @@
NUMERIC_BLOCK_SIZE 1024
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -2834,7 +2834,7 @@ READ_ONLY NO
+@@ -2935,7 +2935,7 @@
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME QUERY_PREALLOC_SIZE
VARIABLE_SCOPE SESSION
@@ -1133,7 +1205,7 @@
VARIABLE_COMMENT Persistent buffer for query parsing and execution
NUMERIC_MIN_VALUE 1024
NUMERIC_MAX_VALUE 4294967295
-@@ -2847,7 +2847,7 @@ VARIABLE_SCOPE SESSION ONLY
+@@ -2948,7 +2948,7 @@
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Sets the internal state of the RAND() generator for replication purposes
NUMERIC_MIN_VALUE 0
@@ -1142,7 +1214,7 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -2857,14 +2857,14 @@ VARIABLE_SCOPE SESSION ONLY
+@@ -2958,14 +2958,14 @@
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Sets the internal state of the RAND() generator for replication purposes
NUMERIC_MIN_VALUE 0
@@ -1159,7 +1231,7 @@
VARIABLE_COMMENT Allocation block size for storing ranges during optimization
NUMERIC_MIN_VALUE 4096
NUMERIC_MAX_VALUE 4294967295
-@@ -2874,7 +2874,7 @@ READ_ONLY NO
+@@ -2975,7 +2975,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME READ_BUFFER_SIZE
VARIABLE_SCOPE SESSION
@@ -1168,7 +1240,7 @@
VARIABLE_COMMENT Each thread that does a sequential scan allocates a buffer of this size for each table it scans. If you do many sequential scans, you may want to increase this value
NUMERIC_MIN_VALUE 8192
NUMERIC_MAX_VALUE 2147483647
-@@ -2894,7 +2894,7 @@ READ_ONLY NO
+@@ -2995,7 +2995,7 @@
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME READ_RND_BUFFER_SIZE
VARIABLE_SCOPE SESSION
@@ -1177,8 +1249,8 @@
VARIABLE_COMMENT When reading rows in sorted order after a sort, the rows are read through this buffer to avoid a disk seeks
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 2147483647
-@@ -2904,10 +2904,10 @@ READ_ONLY NO
- COMMAND_LINE_ARGUMENT REQUIRED
+@@ -3015,10 +3015,10 @@
+ COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME ROWID_MERGE_BUFF_SIZE
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
@@ -1190,7 +1262,7 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -2944,7 +2944,7 @@ READ_ONLY YES
+@@ -3055,7 +3055,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SERVER_ID
VARIABLE_SCOPE SESSION
@@ -1199,7 +1271,7 @@
VARIABLE_COMMENT Uniquely identifies the server instance in the community of replication partners
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 4294967295
-@@ -3014,7 +3014,7 @@ READ_ONLY NO
+@@ -3125,7 +3125,7 @@
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME SLAVE_MAX_ALLOWED_PACKET
VARIABLE_SCOPE GLOBAL
@@ -1208,7 +1280,7 @@
VARIABLE_COMMENT The maximum packet length to sent successfully from the master to slave.
NUMERIC_MIN_VALUE 1024
NUMERIC_MAX_VALUE 1073741824
-@@ -3024,7 +3024,7 @@ READ_ONLY NO
+@@ -3135,7 +3135,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SLOW_LAUNCH_TIME
VARIABLE_SCOPE GLOBAL
@@ -1217,7 +1289,7 @@
VARIABLE_COMMENT If creating the thread takes longer than this value (in seconds), the Slow_launch_threads counter will be incremented
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 31536000
-@@ -3067,7 +3067,7 @@ VARIABLE_SCOPE SESSION
+@@ -3178,7 +3178,7 @@
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Each thread that needs to do a sort allocates a buffer of this size
NUMERIC_MIN_VALUE 1024
@@ -1226,7 +1298,7 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -3274,7 +3274,7 @@ READ_ONLY NO
+@@ -3395,7 +3395,7 @@
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME STORED_PROGRAM_CACHE
VARIABLE_SCOPE GLOBAL
@@ -1235,7 +1307,7 @@
VARIABLE_COMMENT The soft upper limit for number of cached stored routines for one connection.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 524288
-@@ -3354,7 +3354,7 @@ READ_ONLY NO
+@@ -3475,7 +3475,7 @@
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME TABLE_DEFINITION_CACHE
VARIABLE_SCOPE GLOBAL
@@ -1244,7 +1316,7 @@
VARIABLE_COMMENT The number of cached table definitions
NUMERIC_MIN_VALUE 400
NUMERIC_MAX_VALUE 2097152
-@@ -3364,7 +3364,7 @@ READ_ONLY NO
+@@ -3485,7 +3485,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME TABLE_OPEN_CACHE
VARIABLE_SCOPE GLOBAL
@@ -1253,7 +1325,7 @@
VARIABLE_COMMENT The number of cached open tables
NUMERIC_MIN_VALUE 10
NUMERIC_MAX_VALUE 1048576
-@@ -3424,7 +3424,7 @@ READ_ONLY NO
+@@ -3545,7 +3545,7 @@
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME THREAD_CACHE_SIZE
VARIABLE_SCOPE GLOBAL
@@ -1262,16 +1334,7 @@
VARIABLE_COMMENT How many threads we should keep in a cache for reuse. These are freed after 5 minutes of idle time
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 16384
-@@ -3434,7 +3434,7 @@ READ_ONLY NO
- COMMAND_LINE_ARGUMENT REQUIRED
- VARIABLE_NAME THREAD_CONCURRENCY
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT Permits the application to give the threads system a hint for the desired number of threads that should be run at the same time.This variable has no effect, and is deprecated. It will be removed in a future release.
- NUMERIC_MIN_VALUE 1
- NUMERIC_MAX_VALUE 512
-@@ -3527,7 +3527,7 @@ VARIABLE_SCOPE SESSION
+@@ -3628,7 +3628,7 @@
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Max size for data for an internal temporary on-disk MyISAM or Aria table.
NUMERIC_MIN_VALUE 1024
@@ -1280,19 +1343,19 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -3537,7 +3537,7 @@ VARIABLE_SCOPE SESSION
+@@ -3638,7 +3638,7 @@
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT If an internal in-memory temporary table exceeds this size, MariaDB will automatically convert it to an on-disk MyISAM or Aria table. Same as tmp_table_size.
- NUMERIC_MIN_VALUE 1024
+ NUMERIC_MIN_VALUE 0
-NUMERIC_MAX_VALUE 18446744073709551615
+NUMERIC_MAX_VALUE 4294967295
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -3547,14 +3547,14 @@ VARIABLE_SCOPE SESSION
+@@ -3648,14 +3648,14 @@
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Alias for tmp_memory_table_size. If an internal in-memory temporary table exceeds this size, MariaDB will automatically convert it to an on-disk MyISAM or Aria table.
- NUMERIC_MIN_VALUE 1024
+ NUMERIC_MIN_VALUE 0
-NUMERIC_MAX_VALUE 18446744073709551615
+NUMERIC_MAX_VALUE 4294967295
NUMERIC_BLOCK_SIZE 1
@@ -1306,7 +1369,7 @@
VARIABLE_COMMENT Allocation block size for transactions to be stored in binary log
NUMERIC_MIN_VALUE 1024
NUMERIC_MAX_VALUE 134217728
-@@ -3564,7 +3564,7 @@ READ_ONLY NO
+@@ -3665,7 +3665,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME TRANSACTION_PREALLOC_SIZE
VARIABLE_SCOPE SESSION
@@ -1315,7 +1378,7 @@
VARIABLE_COMMENT Persistent buffer for transactions to be stored in binary log
NUMERIC_MIN_VALUE 1024
NUMERIC_MAX_VALUE 134217728
-@@ -3704,7 +3704,7 @@ READ_ONLY YES
+@@ -3805,7 +3805,7 @@
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME WAIT_TIMEOUT
VARIABLE_SCOPE SESSION
@@ -1324,7 +1387,7 @@
VARIABLE_COMMENT The number of seconds the server waits for activity on a connection before closing it
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 31536000
-@@ -3731,7 +3731,7 @@ order by variable_name;
+@@ -3832,7 +3832,7 @@
VARIABLE_NAME LOG_TC_SIZE
GLOBAL_VALUE_ORIGIN AUTO
VARIABLE_SCOPE GLOBAL
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 9e562426291..5511d758d50 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result
+++ b/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result
@@ -95,7 +95,7 @@ COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_GROUP_COMMIT_INTERVAL
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
-VARIABLE_COMMENT Interval between commite in microseconds (1/1000000c). 0 stands for no waiting for other threads to come and do a commit in "hard" mode and no sync()/commit at all in "soft" mode. Option has only an effect if aria_group_commit is used
+VARIABLE_COMMENT Interval between commits in microseconds (1/1000000 sec). 0 stands for no waiting for other threads to come and do a commit in "hard" mode and no sync()/commit at all in "soft" mode. Option has only an effect if aria_group_commit is used
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
NUMERIC_BLOCK_SIZE 1
@@ -207,7 +207,7 @@ VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The buffer that is allocated when sorting the index when doing a REPAIR or when creating indexes with CREATE INDEX or ALTER TABLE.
NUMERIC_MIN_VALUE 4096
-NUMERIC_MAX_VALUE 18446744073709551615
+NUMERIC_MAX_VALUE 9223372036854775807
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
@@ -305,7 +305,7 @@ COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME BIG_TABLES
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
-VARIABLE_COMMENT Old variable, which if set to 1, allows large result sets by saving all temporary sets to disk, avoiding 'table full' errors. No longer needed, as the server now handles this automatically. sql_big_tables is a synonym.
+VARIABLE_COMMENT Old variable, which if set to 1, allows large result sets by saving all temporary sets to disk, avoiding 'table full' errors. No longer needed, as the server now handles this automatically.
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
@@ -422,6 +422,16 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST MINIMAL,NOBLOB,FULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME BINLOG_ROW_METADATA
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE ENUM
+VARIABLE_COMMENT Controls whether metadata is logged using FULL , MINIMAL format and NO_LOG.FULL causes all metadata to be logged; MINIMAL means that only metadata actually required by slave is logged; NO_LOG NO metadata will be logged.Default: NO_LOG.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST NO_LOG,MINIMAL,FULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME BINLOG_STMT_CACHE_SIZE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -729,7 +739,7 @@ VARIABLE_COMMENT Default flags for the regex library
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST DOTALL,DUPNAMES,EXTENDED,EXTRA,MULTILINE,UNGREEDY
+ENUM_VALUE_LIST DOTALL,DUPNAMES,EXTENDED,EXTENDED_MORE,EXTRA,MULTILINE,UNGREEDY
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME DEFAULT_STORAGE_ENGINE
@@ -1465,7 +1475,7 @@ COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME LARGE_PAGE_SIZE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
-VARIABLE_COMMENT If large page support is enabled, this shows the size of memory pages
+VARIABLE_COMMENT Previously showed the size of large memory pages, unused since multiple page size support was added
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
NUMERIC_BLOCK_SIZE 1
@@ -1872,16 +1882,6 @@ NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
-VARIABLE_NAME MAX_LONG_DATA_SIZE
-VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
-VARIABLE_COMMENT The maximum BLOB length to send to server from mysql_send_long_data API. Deprecated option; use max_allowed_packet instead.
-NUMERIC_MIN_VALUE 1024
-NUMERIC_MAX_VALUE 4294967295
-NUMERIC_BLOCK_SIZE 1
-ENUM_VALUE_LIST NULL
-READ_ONLY YES
-COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_PASSWORD_ERRORS
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
@@ -2042,16 +2042,6 @@ NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
-VARIABLE_NAME MULTI_RANGE_COUNT
-VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
-VARIABLE_COMMENT Ignored. Use mrr_buffer_size instead
-NUMERIC_MIN_VALUE 1
-NUMERIC_MAX_VALUE 18446744073709551615
-NUMERIC_BLOCK_SIZE 1
-ENUM_VALUE_LIST NULL
-READ_ONLY NO
-COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MYISAM_BLOCK_SIZE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -2242,6 +2232,16 @@ NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME OPTIMIZER_MAX_SEL_ARG_WEIGHT
+VARIABLE_SCOPE SESSION
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT The maximum weight of the SEL_ARG graph. Set to 0 for no limit
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 18446744073709551615
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME OPTIMIZER_PRUNE_LEVEL
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
@@ -2279,7 +2279,7 @@ VARIABLE_COMMENT Fine-tune the optimizer behavior
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST index_merge,index_merge_union,index_merge_sort_union,index_merge_intersection,index_merge_sort_intersection,engine_condition_pushdown,index_condition_pushdown,derived_merge,derived_with_keys,firstmatch,loosescan,materialization,in_to_exists,semijoin,partial_match_rowid_merge,partial_match_table_scan,subquery_cache,mrr,mrr_cost_based,mrr_sort_keys,outer_join_with_cache,semijoin_with_cache,join_cache_incremental,join_cache_hashed,join_cache_bka,optimize_join_buffer_size,table_elimination,extended_keys,exists_to_in,orderby_uses_equalities,condition_pushdown_for_derived,split_materialized,condition_pushdown_for_subquery,rowid_filter,condition_pushdown_from_having,default
+ENUM_VALUE_LIST index_merge,index_merge_union,index_merge_sort_union,index_merge_intersection,index_merge_sort_intersection,engine_condition_pushdown,index_condition_pushdown,derived_merge,derived_with_keys,firstmatch,loosescan,materialization,in_to_exists,semijoin,partial_match_rowid_merge,partial_match_table_scan,subquery_cache,mrr,mrr_cost_based,mrr_sort_keys,outer_join_with_cache,semijoin_with_cache,join_cache_incremental,join_cache_hashed,join_cache_bka,optimize_join_buffer_size,table_elimination,extended_keys,exists_to_in,orderby_uses_equalities,condition_pushdown_for_derived,split_materialized,condition_pushdown_for_subquery,rowid_filter,condition_pushdown_from_having,not_null_range_scan,default
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME OPTIMIZER_TRACE
@@ -2382,6 +2382,26 @@ NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_TRANSACTIONS_HISTORY_LONG_SIZE
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT
+VARIABLE_COMMENT Number of rows in EVENTS_TRANSACTIONS_HISTORY_LONG. Use 0 to disable, -1 for automated sizing.
+NUMERIC_MIN_VALUE -1
+NUMERIC_MAX_VALUE 1048576
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_TRANSACTIONS_HISTORY_SIZE
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT
+VARIABLE_COMMENT Number of rows per thread in EVENTS_TRANSACTIONS_HISTORY. Use 0 to disable, -1 for automated sizing.
+NUMERIC_MIN_VALUE -1
+NUMERIC_MAX_VALUE 1024
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_WAITS_HISTORY_LONG_SIZE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT
@@ -2472,6 +2492,36 @@ NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_INDEX_STAT
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT
+VARIABLE_COMMENT Maximum number of index statistics for instrumented tables. Use 0 to disable, -1 for automated scaling.
+NUMERIC_MIN_VALUE -1
+NUMERIC_MAX_VALUE 1048576
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_MEMORY_CLASSES
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Maximum number of memory pool instruments.
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 1024
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_METADATA_LOCKS
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT
+VARIABLE_COMMENT Maximum number of metadata locks. Use 0 to disable, -1 for automated scaling.
+NUMERIC_MIN_VALUE -1
+NUMERIC_MAX_VALUE 104857600
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_MUTEX_CLASSES
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -2492,6 +2542,26 @@ NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_PREPARED_STATEMENTS_INSTANCES
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT
+VARIABLE_COMMENT Maximum number of instrumented prepared statements. Use 0 to disable, -1 for automated scaling.
+NUMERIC_MIN_VALUE -1
+NUMERIC_MAX_VALUE 1048576
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_PROGRAM_INSTANCES
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT
+VARIABLE_COMMENT Maximum number of instrumented programs. Use 0 to disable, -1 for automated scaling.
+NUMERIC_MIN_VALUE -1
+NUMERIC_MAX_VALUE 1048576
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_RWLOCK_CLASSES
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -2532,6 +2602,16 @@ NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_SQL_TEXT_LENGTH
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT
+VARIABLE_COMMENT Maximum length of displayed sql text.
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 1048576
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_STAGE_CLASSES
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -2552,6 +2632,16 @@ NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_STATEMENT_STACK
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Number of rows per thread in EVENTS_STATEMENTS_CURRENT.
+NUMERIC_MIN_VALUE 1
+NUMERIC_MAX_VALUE 256
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_TABLE_HANDLES
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT
@@ -2572,6 +2662,16 @@ NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_TABLE_LOCK_STAT
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT
+VARIABLE_COMMENT Maximum number of lock statistics for instrumented tables. Use 0 to disable, -1 for automated scaling.
+NUMERIC_MIN_VALUE -1
+NUMERIC_MAX_VALUE 1048576
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_THREAD_CLASSES
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -2604,9 +2704,9 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_SETUP_ACTORS_SIZE
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE BIGINT
VARIABLE_COMMENT Maximum number of rows in SETUP_ACTORS.
-NUMERIC_MIN_VALUE 0
+NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1024
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
@@ -2614,9 +2714,9 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_SETUP_OBJECTS_SIZE
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE BIGINT
VARIABLE_COMMENT Maximum number of rows in SETUP_OBJECTS.
-NUMERIC_MIN_VALUE 0
+NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
@@ -2902,6 +3002,16 @@ NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME REQUIRE_SECURE_TRANSPORT
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT When this option is enabled, connections attempted using insecure transport will be rejected. Secure transports are SSL/TLS, Unix sockets or named pipes.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME ROWID_MERGE_BUFF_SIZE
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
@@ -3102,6 +3212,16 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
+VARIABLE_NAME SQL_IF_EXISTS
+VARIABLE_SCOPE SESSION
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT If set to 1 adds an implicate IF EXISTS to ALTER, RENAME and DROP of TABLES, VIEWS, FUNCTIONS and PACKAGES
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME SQL_LOG_BIN
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
@@ -3432,16 +3552,6 @@ NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
-VARIABLE_NAME THREAD_CONCURRENCY
-VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
-VARIABLE_COMMENT Permits the application to give the threads system a hint for the desired number of threads that should be run at the same time.This variable has no effect, and is deprecated. It will be removed in a future release.
-NUMERIC_MIN_VALUE 1
-NUMERIC_MAX_VALUE 512
-NUMERIC_BLOCK_SIZE 1
-ENUM_VALUE_LIST NULL
-READ_ONLY YES
-COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME THREAD_HANDLING
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE ENUM
@@ -3462,16 +3572,6 @@ NUMERIC_BLOCK_SIZE 1024
ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
-VARIABLE_NAME TIMED_MUTEXES
-VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BOOLEAN
-VARIABLE_COMMENT Specify whether to time mutexes. Deprecated, has no effect.
-NUMERIC_MIN_VALUE NULL
-NUMERIC_MAX_VALUE NULL
-NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST OFF,ON
-READ_ONLY NO
-COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME TIMESTAMP
VARIABLE_SCOPE SESSION ONLY
VARIABLE_TYPE DOUBLE
@@ -3536,7 +3636,7 @@ VARIABLE_NAME TMP_MEMORY_TABLE_SIZE
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT If an internal in-memory temporary table exceeds this size, MariaDB will automatically convert it to an on-disk MyISAM or Aria table. Same as tmp_table_size.
-NUMERIC_MIN_VALUE 1024
+NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 18446744073709551615
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
@@ -3546,7 +3646,7 @@ VARIABLE_NAME TMP_TABLE_SIZE
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Alias for tmp_memory_table_size. If an internal in-memory temporary table exceeds this size, MariaDB will automatically convert it to an on-disk MyISAM or Aria table.
-NUMERIC_MIN_VALUE 1024
+NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 18446744073709551615
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
diff --git a/mysql-test/suite/sys_vars/r/sysvars_server_notembedded,32bit.rdiff b/mysql-test/suite/sys_vars/r/sysvars_server_notembedded,32bit.rdiff
index bfe56dbc1a9..3ce1ed7b082 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_server_notembedded,32bit.rdiff
+++ b/mysql-test/suite/sys_vars/r/sysvars_server_notembedded,32bit.rdiff
@@ -1,6 +1,6 @@
---- sysvars_server_notembedded.result
-+++ sysvars_server_notembedded.result
-@@ -34,7 +34,7 @@ READ_ONLY NO
+--- sysvars_server_notembedded.result 2020-04-29 11:35:30.046243428 +0300
++++ sysvars_server_notembedded,32bit.reject 2020-04-30 11:45:50.488748076 +0300
+@@ -35,7 +35,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_BLOCK_SIZE
VARIABLE_SCOPE GLOBAL
@@ -9,7 +9,7 @@
VARIABLE_COMMENT Block size to be used for Aria index pages.
NUMERIC_MIN_VALUE 4096
NUMERIC_MAX_VALUE 32768
-@@ -44,7 +44,7 @@ READ_ONLY YES
+@@ -45,7 +45,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_CHECKPOINT_INTERVAL
VARIABLE_SCOPE GLOBAL
@@ -18,7 +18,7 @@
VARIABLE_COMMENT Interval between tries to do an automatic checkpoints. In seconds; 0 means 'no automatic checkpoints' which makes sense only for testing.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -54,7 +54,7 @@ READ_ONLY NO
+@@ -55,7 +55,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_CHECKPOINT_LOG_ACTIVITY
VARIABLE_SCOPE GLOBAL
@@ -27,7 +27,7 @@
VARIABLE_COMMENT Number of bytes that the transaction log has to grow between checkpoints before a new checkpoint is written to the log.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -74,7 +74,7 @@ READ_ONLY NO
+@@ -75,7 +75,7 @@
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME ARIA_FORCE_START_AFTER_RECOVERY_FAILURES
VARIABLE_SCOPE GLOBAL
@@ -36,16 +36,16 @@
VARIABLE_COMMENT Number of consecutive log recovery failures after which logs will be automatically deleted to cure the problem; 0 (the default) disables the feature.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 255
-@@ -94,7 +94,7 @@ READ_ONLY NO
+@@ -95,7 +95,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_GROUP_COMMIT_INTERVAL
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT Interval between commite in microseconds (1/1000000c). 0 stands for no waiting for other threads to come and do a commit in "hard" mode and no sync()/commit at all in "soft" mode. Option has only an effect if aria_group_commit is used
+ VARIABLE_COMMENT Interval between commits in microseconds (1/1000000 sec). 0 stands for no waiting for other threads to come and do a commit in "hard" mode and no sync()/commit at all in "soft" mode. Option has only an effect if aria_group_commit is used
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -104,7 +104,7 @@ READ_ONLY NO
+@@ -105,7 +105,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_LOG_FILE_SIZE
VARIABLE_SCOPE GLOBAL
@@ -54,7 +54,7 @@
VARIABLE_COMMENT Limit for transaction log size
NUMERIC_MIN_VALUE 8388608
NUMERIC_MAX_VALUE 4294967295
-@@ -134,10 +134,10 @@ READ_ONLY NO
+@@ -135,10 +135,10 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_PAGECACHE_AGE_THRESHOLD
VARIABLE_SCOPE GLOBAL
@@ -67,7 +67,7 @@
NUMERIC_BLOCK_SIZE 100
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -154,7 +154,7 @@ READ_ONLY YES
+@@ -155,7 +155,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_PAGECACHE_DIVISION_LIMIT
VARIABLE_SCOPE GLOBAL
@@ -76,7 +76,7 @@
VARIABLE_COMMENT The minimum percentage of warm blocks in key cache
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 100
-@@ -164,7 +164,7 @@ READ_ONLY NO
+@@ -165,7 +165,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_PAGECACHE_FILE_HASH_SIZE
VARIABLE_SCOPE GLOBAL
@@ -85,7 +85,7 @@
VARIABLE_COMMENT Number of hash buckets for open and changed files. If you have a lot of Aria files open you should increase this for faster flush of changes. A good value is probably 1/10 of number of possible open Aria files.
NUMERIC_MIN_VALUE 128
NUMERIC_MAX_VALUE 16384
-@@ -194,7 +194,7 @@ READ_ONLY NO
+@@ -195,7 +195,7 @@
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME ARIA_REPAIR_THREADS
VARIABLE_SCOPE SESSION
@@ -94,16 +94,16 @@
VARIABLE_COMMENT Number of threads to use when repairing Aria tables. The value of 1 disables parallel repair.
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 128
-@@ -207,7 +207,7 @@ VARIABLE_SCOPE SESSION
+@@ -208,7 +208,7 @@
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The buffer that is allocated when sorting the index when doing a REPAIR or when creating indexes with CREATE INDEX or ALTER TABLE.
NUMERIC_MIN_VALUE 4096
--NUMERIC_MAX_VALUE 18446744073709551615
-+NUMERIC_MAX_VALUE 4294967295
+-NUMERIC_MAX_VALUE 9223372036854775807
++NUMERIC_MAX_VALUE 2147483647
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -264,7 +264,7 @@ READ_ONLY NO
+@@ -265,7 +265,7 @@
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME AUTO_INCREMENT_INCREMENT
VARIABLE_SCOPE SESSION
@@ -112,7 +112,7 @@
VARIABLE_COMMENT Auto-increment columns are incremented by this
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 65535
-@@ -274,7 +274,7 @@ READ_ONLY NO
+@@ -275,7 +275,7 @@
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME AUTO_INCREMENT_OFFSET
VARIABLE_SCOPE SESSION
@@ -121,7 +121,7 @@
VARIABLE_COMMENT Offset added to Auto-increment columns. Used when auto-increment-increment != 1
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 65535
-@@ -284,7 +284,7 @@ READ_ONLY NO
+@@ -285,7 +285,7 @@
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME BACK_LOG
VARIABLE_SCOPE GLOBAL
@@ -130,7 +130,7 @@
VARIABLE_COMMENT The number of outstanding connection requests MariaDB can have. This comes into play when the main MariaDB thread gets very many connection requests in a very short time
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 65535
-@@ -337,7 +337,7 @@ VARIABLE_SCOPE GLOBAL
+@@ -338,7 +338,7 @@
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The size of the transactional cache for updates to transactional engines for the binary log. If you often use transactions containing many statements, you can increase this to get more performance
NUMERIC_MIN_VALUE 4096
@@ -139,7 +139,7 @@
NUMERIC_BLOCK_SIZE 4096
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -354,20 +354,20 @@ READ_ONLY NO
+@@ -355,20 +355,20 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME BINLOG_COMMIT_WAIT_COUNT
VARIABLE_SCOPE GLOBAL
@@ -164,7 +164,7 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -387,7 +387,7 @@ VARIABLE_SCOPE GLOBAL
+@@ -388,7 +388,7 @@
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The size of file cache for the binary log
NUMERIC_MIN_VALUE 8192
@@ -173,7 +173,7 @@
NUMERIC_BLOCK_SIZE 4096
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -427,7 +427,7 @@ VARIABLE_SCOPE GLOBAL
+@@ -438,7 +438,7 @@
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The size of the statement cache for updates to non-transactional engines for the binary log. If you often use statements updating a great number of rows, you can increase this to get more performance.
NUMERIC_MIN_VALUE 4096
@@ -182,7 +182,7 @@
NUMERIC_BLOCK_SIZE 4096
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -437,7 +437,7 @@ VARIABLE_SCOPE SESSION
+@@ -448,7 +448,7 @@
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Size of tree cache used in bulk insert optimisation. Note that this is a limit per thread!
NUMERIC_MIN_VALUE 0
@@ -191,7 +191,7 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -624,7 +624,7 @@ READ_ONLY NO
+@@ -635,7 +635,7 @@
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME CONNECT_TIMEOUT
VARIABLE_SCOPE GLOBAL
@@ -200,7 +200,7 @@
VARIABLE_COMMENT The number of seconds the mysqld server is waiting for a connect packet before responding with 'Bad handshake'
NUMERIC_MIN_VALUE 2
NUMERIC_MAX_VALUE 31536000
-@@ -674,7 +674,7 @@ READ_ONLY YES
+@@ -685,7 +685,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME DEADLOCK_SEARCH_DEPTH_LONG
VARIABLE_SCOPE SESSION
@@ -209,7 +209,7 @@
VARIABLE_COMMENT Long search depth for the two-step deadlock detection
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 33
-@@ -684,7 +684,7 @@ READ_ONLY NO
+@@ -695,7 +695,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME DEADLOCK_SEARCH_DEPTH_SHORT
VARIABLE_SCOPE SESSION
@@ -218,7 +218,7 @@
VARIABLE_COMMENT Short search depth for the two-step deadlock detection
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 32
-@@ -694,7 +694,7 @@ READ_ONLY NO
+@@ -705,7 +705,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME DEADLOCK_TIMEOUT_LONG
VARIABLE_SCOPE SESSION
@@ -227,7 +227,7 @@
VARIABLE_COMMENT Long timeout for the two-step deadlock detection (in microseconds)
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -704,7 +704,7 @@ READ_ONLY NO
+@@ -715,7 +715,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME DEADLOCK_TIMEOUT_SHORT
VARIABLE_SCOPE SESSION
@@ -236,7 +236,7 @@
VARIABLE_COMMENT Short timeout for the two-step deadlock detection (in microseconds)
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -764,7 +764,7 @@ READ_ONLY NO
+@@ -775,7 +775,7 @@
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME DEFAULT_WEEK_FORMAT
VARIABLE_SCOPE SESSION
@@ -245,7 +245,7 @@
VARIABLE_COMMENT The default week format used by WEEK() functions
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 7
-@@ -774,7 +774,7 @@ READ_ONLY NO
+@@ -785,7 +785,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME DELAYED_INSERT_LIMIT
VARIABLE_SCOPE GLOBAL
@@ -254,7 +254,7 @@
VARIABLE_COMMENT After inserting delayed_insert_limit rows, the INSERT DELAYED handler will check if there are any SELECT statements pending. If so, it allows these to execute before continuing.
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 4294967295
-@@ -784,7 +784,7 @@ READ_ONLY NO
+@@ -795,7 +795,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME DELAYED_INSERT_TIMEOUT
VARIABLE_SCOPE GLOBAL
@@ -263,7 +263,7 @@
VARIABLE_COMMENT How long a INSERT DELAYED thread should wait for INSERT statements before terminating
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 31536000
-@@ -794,7 +794,7 @@ READ_ONLY NO
+@@ -805,7 +805,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME DELAYED_QUEUE_SIZE
VARIABLE_SCOPE GLOBAL
@@ -272,7 +272,7 @@
VARIABLE_COMMENT What size queue (in rows) should be allocated for handling INSERT DELAYED. If the queue becomes full, any client that does INSERT DELAYED will wait until there is room in the queue again
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 4294967295
-@@ -824,7 +824,7 @@ READ_ONLY NO
+@@ -835,7 +835,7 @@
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME DIV_PRECISION_INCREMENT
VARIABLE_SCOPE SESSION
@@ -281,7 +281,7 @@
VARIABLE_COMMENT Precision of the result of '/' operator will be increased on that value
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 38
-@@ -914,7 +914,7 @@ READ_ONLY NO
+@@ -925,7 +925,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME EXPIRE_LOGS_DAYS
VARIABLE_SCOPE GLOBAL
@@ -290,7 +290,7 @@
VARIABLE_COMMENT If non-zero, binary logs will be purged after expire_logs_days days; possible purges happen at startup and at binary log rotation
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 99
-@@ -944,7 +944,7 @@ READ_ONLY YES
+@@ -955,7 +955,7 @@
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME EXTRA_MAX_CONNECTIONS
VARIABLE_SCOPE GLOBAL
@@ -299,7 +299,7 @@
VARIABLE_COMMENT The number of connections on extra-port
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 100000
-@@ -974,7 +974,7 @@ READ_ONLY NO
+@@ -985,7 +985,7 @@
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME FLUSH_TIME
VARIABLE_SCOPE GLOBAL
@@ -308,7 +308,7 @@
VARIABLE_COMMENT A dedicated thread is created to flush all tables at the given interval
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 31536000
-@@ -1004,7 +1004,7 @@ READ_ONLY NO
+@@ -1015,7 +1015,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME FT_MAX_WORD_LEN
VARIABLE_SCOPE GLOBAL
@@ -317,7 +317,7 @@
VARIABLE_COMMENT The maximum length of the word to be included in a FULLTEXT index. Note: FULLTEXT indexes must be rebuilt after changing this variable
NUMERIC_MIN_VALUE 10
NUMERIC_MAX_VALUE 84
-@@ -1014,7 +1014,7 @@ READ_ONLY YES
+@@ -1025,7 +1025,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME FT_MIN_WORD_LEN
VARIABLE_SCOPE GLOBAL
@@ -326,7 +326,7 @@
VARIABLE_COMMENT The minimum length of the word to be included in a FULLTEXT index. Note: FULLTEXT indexes must be rebuilt after changing this variable
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 84
-@@ -1024,7 +1024,7 @@ READ_ONLY YES
+@@ -1035,7 +1035,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME FT_QUERY_EXPANSION_LIMIT
VARIABLE_SCOPE GLOBAL
@@ -335,7 +335,7 @@
VARIABLE_COMMENT Number of best matches to use for query expansion
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 1000
-@@ -1067,7 +1067,7 @@ VARIABLE_SCOPE SESSION
+@@ -1078,7 +1078,7 @@
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The maximum length of the result of function GROUP_CONCAT()
NUMERIC_MIN_VALUE 4
@@ -344,7 +344,7 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -1274,7 +1274,7 @@ READ_ONLY YES
+@@ -1285,7 +1285,7 @@
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME HISTOGRAM_SIZE
VARIABLE_SCOPE SESSION
@@ -353,7 +353,7 @@
VARIABLE_COMMENT Number of bytes used for a histogram. If set to 0, no histograms are created by ANALYZE.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 255
-@@ -1304,7 +1304,7 @@ READ_ONLY YES
+@@ -1315,7 +1315,7 @@
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME HOST_CACHE_SIZE
VARIABLE_SCOPE GLOBAL
@@ -362,7 +362,7 @@
VARIABLE_COMMENT How many host names should be cached to avoid resolving.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 65536
-@@ -1414,7 +1414,7 @@ READ_ONLY NO
+@@ -1425,7 +1425,7 @@
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME INTERACTIVE_TIMEOUT
VARIABLE_SCOPE SESSION
@@ -371,7 +371,7 @@
VARIABLE_COMMENT The number of seconds the server waits for activity on an interactive connection before closing it
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 31536000
-@@ -1447,7 +1447,7 @@ VARIABLE_SCOPE SESSION
+@@ -1458,7 +1458,7 @@
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The size of the buffer that is used for joins
NUMERIC_MIN_VALUE 128
@@ -380,7 +380,7 @@
NUMERIC_BLOCK_SIZE 128
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -1464,7 +1464,7 @@ READ_ONLY NO
+@@ -1475,7 +1475,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME JOIN_CACHE_LEVEL
VARIABLE_SCOPE SESSION
@@ -389,7 +389,7 @@
VARIABLE_COMMENT Controls what join operations can be executed with join buffers. Odd numbers are used for plain join buffers while even numbers are used for linked buffers
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 8
-@@ -1487,7 +1487,7 @@ VARIABLE_SCOPE GLOBAL
+@@ -1498,7 +1498,7 @@
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The size of the buffer used for index blocks for MyISAM tables. Increase this to get better index handling (for all reads and multiple writes) to as much as you can afford
NUMERIC_MIN_VALUE 0
@@ -398,7 +398,7 @@
NUMERIC_BLOCK_SIZE 4096
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -1654,7 +1654,7 @@ READ_ONLY YES
+@@ -1665,7 +1665,7 @@
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME LOCK_WAIT_TIMEOUT
VARIABLE_SCOPE SESSION
@@ -407,7 +407,7 @@
VARIABLE_COMMENT Timeout in seconds to wait for a lock before returning an error.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 31536000
-@@ -1804,7 +1804,7 @@ READ_ONLY NO
+@@ -1815,7 +1815,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME LOG_SLOW_RATE_LIMIT
VARIABLE_SCOPE SESSION
@@ -416,7 +416,7 @@
VARIABLE_COMMENT Write to slow log every #th slow query. Set to 1 to log everything. Increase it to reduce the size of the slow or the performance impact of slow logging
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 4294967295
-@@ -1834,7 +1834,7 @@ READ_ONLY NO
+@@ -1845,7 +1845,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME LOG_WARNINGS
VARIABLE_SCOPE SESSION
@@ -425,7 +425,7 @@
VARIABLE_COMMENT Log some not critical warnings to the general log file.Value can be between 0 and 11. Higher values mean more verbosity
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -1894,7 +1894,7 @@ READ_ONLY NO
+@@ -1905,7 +1905,7 @@
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME MAX_ALLOWED_PACKET
VARIABLE_SCOPE SESSION
@@ -434,7 +434,7 @@
VARIABLE_COMMENT Max packet length to send to or receive from the server
NUMERIC_MIN_VALUE 1024
NUMERIC_MAX_VALUE 1073741824
-@@ -1907,14 +1907,14 @@ VARIABLE_SCOPE GLOBAL
+@@ -1918,14 +1918,14 @@
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Sets the total size of the transactional cache
NUMERIC_MIN_VALUE 4096
@@ -451,7 +451,7 @@
VARIABLE_COMMENT Binary log will be rotated automatically when the size exceeds this value.
NUMERIC_MIN_VALUE 4096
NUMERIC_MAX_VALUE 1073741824
-@@ -1927,14 +1927,14 @@ VARIABLE_SCOPE GLOBAL
+@@ -1938,14 +1938,14 @@
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Sets the total size of the statement cache
NUMERIC_MIN_VALUE 4096
@@ -468,7 +468,7 @@
VARIABLE_COMMENT The number of simultaneous clients allowed
NUMERIC_MIN_VALUE 10
NUMERIC_MAX_VALUE 100000
-@@ -1944,7 +1944,7 @@ READ_ONLY NO
+@@ -1955,7 +1955,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_CONNECT_ERRORS
VARIABLE_SCOPE GLOBAL
@@ -477,7 +477,7 @@
VARIABLE_COMMENT If there is more than this number of interrupted connections from a host this host will be blocked from further connections
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 4294967295
-@@ -1954,7 +1954,7 @@ READ_ONLY NO
+@@ -1965,7 +1965,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_DELAYED_THREADS
VARIABLE_SCOPE SESSION
@@ -486,7 +486,7 @@
VARIABLE_COMMENT Don't start more than this number of threads to handle INSERT DELAYED statements. If set to zero INSERT DELAYED will be not used
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 16384
-@@ -1974,7 +1974,7 @@ READ_ONLY YES
+@@ -1985,7 +1985,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_ERROR_COUNT
VARIABLE_SCOPE SESSION
@@ -495,7 +495,7 @@
VARIABLE_COMMENT Max number of errors/warnings to store for a statement
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 65535
-@@ -1987,14 +1987,14 @@ VARIABLE_SCOPE SESSION
+@@ -1998,14 +1998,14 @@
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Don't allow creation of heap tables bigger than this
NUMERIC_MIN_VALUE 16384
@@ -512,7 +512,7 @@
VARIABLE_COMMENT Don't start more than this number of threads to handle INSERT DELAYED statements. If set to zero INSERT DELAYED will be not used
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 16384
-@@ -2014,7 +2014,7 @@ READ_ONLY NO
+@@ -2025,7 +2025,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_LENGTH_FOR_SORT_DATA
VARIABLE_SCOPE SESSION
@@ -521,16 +521,7 @@
VARIABLE_COMMENT Max number of bytes in sorted records
NUMERIC_MIN_VALUE 4
NUMERIC_MAX_VALUE 8388608
-@@ -2024,7 +2024,7 @@ READ_ONLY NO
- COMMAND_LINE_ARGUMENT REQUIRED
- VARIABLE_NAME MAX_LONG_DATA_SIZE
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT The maximum BLOB length to send to server from mysql_send_long_data API. Deprecated option; use max_allowed_packet instead.
- NUMERIC_MIN_VALUE 1024
- NUMERIC_MAX_VALUE 4294967295
-@@ -2054,7 +2054,7 @@ READ_ONLY NO
+@@ -2055,7 +2055,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_RECURSIVE_ITERATIONS
VARIABLE_SCOPE SESSION
@@ -539,7 +530,7 @@
VARIABLE_COMMENT Maximum number of iterations when executing recursive queries
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -2077,14 +2077,14 @@ VARIABLE_SCOPE SESSION
+@@ -2078,14 +2078,14 @@
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The maximum size of the container of a rowid filter
NUMERIC_MIN_VALUE 1024
@@ -556,7 +547,7 @@
VARIABLE_COMMENT Limit assumed max number of seeks when looking up rows based on a key
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 4294967295
-@@ -2104,7 +2104,7 @@ READ_ONLY NO
+@@ -2105,7 +2105,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_SORT_LENGTH
VARIABLE_SCOPE SESSION
@@ -565,7 +556,7 @@
VARIABLE_COMMENT The number of bytes to use when sorting BLOB or TEXT values (only the first max_sort_length bytes of each value are used; the rest are ignored)
NUMERIC_MIN_VALUE 4
NUMERIC_MAX_VALUE 8388608
-@@ -2114,7 +2114,7 @@ READ_ONLY NO
+@@ -2115,7 +2115,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_SP_RECURSION_DEPTH
VARIABLE_SCOPE SESSION
@@ -574,7 +565,7 @@
VARIABLE_COMMENT Maximum stored procedure recursion depth
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 255
-@@ -2134,7 +2134,7 @@ READ_ONLY NO
+@@ -2135,7 +2135,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_TMP_TABLES
VARIABLE_SCOPE SESSION
@@ -583,7 +574,7 @@
VARIABLE_COMMENT Unused, will be removed.
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 4294967295
-@@ -2154,7 +2154,7 @@ READ_ONLY NO
+@@ -2155,7 +2155,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_WRITE_LOCK_COUNT
VARIABLE_SCOPE GLOBAL
@@ -592,7 +583,7 @@
VARIABLE_COMMENT After this many write locks, allow some read locks to run in between
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 4294967295
-@@ -2164,7 +2164,7 @@ READ_ONLY NO
+@@ -2165,7 +2165,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME METADATA_LOCKS_CACHE_SIZE
VARIABLE_SCOPE GLOBAL
@@ -601,7 +592,7 @@
VARIABLE_COMMENT Unused
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 1048576
-@@ -2174,7 +2174,7 @@ READ_ONLY YES
+@@ -2175,7 +2175,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME METADATA_LOCKS_HASH_INSTANCES
VARIABLE_SCOPE GLOBAL
@@ -610,7 +601,7 @@
VARIABLE_COMMENT Unused
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 1024
-@@ -2184,7 +2184,7 @@ READ_ONLY YES
+@@ -2185,7 +2185,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MIN_EXAMINED_ROW_LIMIT
VARIABLE_SCOPE SESSION
@@ -619,7 +610,7 @@
VARIABLE_COMMENT Don't write queries to slow log that examine fewer rows than that
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -2194,7 +2194,7 @@ READ_ONLY NO
+@@ -2195,7 +2195,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MRR_BUFFER_SIZE
VARIABLE_SCOPE SESSION
@@ -628,19 +619,7 @@
VARIABLE_COMMENT Size of buffer to use when using MRR with range access
NUMERIC_MIN_VALUE 8192
NUMERIC_MAX_VALUE 2147483647
-@@ -2204,17 +2204,17 @@ READ_ONLY NO
- COMMAND_LINE_ARGUMENT REQUIRED
- VARIABLE_NAME MULTI_RANGE_COUNT
- VARIABLE_SCOPE SESSION
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT Ignored. Use mrr_buffer_size instead
- NUMERIC_MIN_VALUE 1
--NUMERIC_MAX_VALUE 18446744073709551615
-+NUMERIC_MAX_VALUE 4294967295
- NUMERIC_BLOCK_SIZE 1
- ENUM_VALUE_LIST NULL
- READ_ONLY NO
+@@ -2205,7 +2205,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MYISAM_BLOCK_SIZE
VARIABLE_SCOPE GLOBAL
@@ -649,7 +628,7 @@
VARIABLE_COMMENT Block size to be used for MyISAM index pages
NUMERIC_MIN_VALUE 1024
NUMERIC_MAX_VALUE 16384
-@@ -2224,7 +2224,7 @@ READ_ONLY YES
+@@ -2215,7 +2215,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MYISAM_DATA_POINTER_SIZE
VARIABLE_SCOPE GLOBAL
@@ -658,7 +637,7 @@
VARIABLE_COMMENT Default pointer size to be used for MyISAM tables
NUMERIC_MIN_VALUE 2
NUMERIC_MAX_VALUE 7
-@@ -2247,7 +2247,7 @@ VARIABLE_SCOPE GLOBAL
+@@ -2238,7 +2238,7 @@
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Restricts the total memory used for memory mapping of MySQL tables
NUMERIC_MIN_VALUE 7
@@ -667,7 +646,7 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY YES
-@@ -2264,10 +2264,10 @@ READ_ONLY YES
+@@ -2255,10 +2255,10 @@
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME MYISAM_REPAIR_THREADS
VARIABLE_SCOPE SESSION
@@ -680,7 +659,7 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -2277,7 +2277,7 @@ VARIABLE_SCOPE SESSION
+@@ -2268,7 +2268,7 @@
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The buffer that is allocated when sorting the index when doing a REPAIR or when creating indexes with CREATE INDEX or ALTER TABLE
NUMERIC_MIN_VALUE 4096
@@ -689,7 +668,7 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -2314,7 +2314,7 @@ READ_ONLY NO
+@@ -2305,7 +2305,7 @@
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME NET_BUFFER_LENGTH
VARIABLE_SCOPE SESSION
@@ -698,7 +677,7 @@
VARIABLE_COMMENT Buffer length for TCP/IP and socket communication
NUMERIC_MIN_VALUE 1024
NUMERIC_MAX_VALUE 1048576
-@@ -2324,7 +2324,7 @@ READ_ONLY NO
+@@ -2315,7 +2315,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME NET_READ_TIMEOUT
VARIABLE_SCOPE SESSION
@@ -707,7 +686,7 @@
VARIABLE_COMMENT Number of seconds to wait for more data from a connection before aborting the read
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 31536000
-@@ -2334,7 +2334,7 @@ READ_ONLY NO
+@@ -2325,7 +2325,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME NET_RETRY_COUNT
VARIABLE_SCOPE SESSION
@@ -716,7 +695,7 @@
VARIABLE_COMMENT If a read on a communication port is interrupted, retry this many times before giving up
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 4294967295
-@@ -2344,7 +2344,7 @@ READ_ONLY NO
+@@ -2335,7 +2335,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME NET_WRITE_TIMEOUT
VARIABLE_SCOPE SESSION
@@ -725,7 +704,7 @@
VARIABLE_COMMENT Number of seconds to wait for a block to be written to a connection before aborting the write
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 31536000
-@@ -2394,7 +2394,7 @@ READ_ONLY NO
+@@ -2385,7 +2385,7 @@
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME OPEN_FILES_LIMIT
VARIABLE_SCOPE GLOBAL
@@ -734,7 +713,20 @@
VARIABLE_COMMENT If this is not 0, then mysqld will use this value to reserve file descriptors to use with setrlimit(). If this value is 0 or autoset then mysqld will reserve max_connections*5 or max_connections + table_cache*2 (whichever is larger) number of file descriptors
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -2404,7 +2404,7 @@ READ_ONLY YES
+@@ -2395,10 +2395,10 @@
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME OPTIMIZER_MAX_SEL_ARG_WEIGHT
+ VARIABLE_SCOPE SESSION
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT The maximum weight of the SEL_ARG graph. Set to 0 for no limit
+ NUMERIC_MIN_VALUE 0
+-NUMERIC_MAX_VALUE 18446744073709551615
++NUMERIC_MAX_VALUE 4294967295
+ NUMERIC_BLOCK_SIZE 1
+ ENUM_VALUE_LIST NULL
+ READ_ONLY NO
+@@ -2405,7 +2405,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME OPTIMIZER_PRUNE_LEVEL
VARIABLE_SCOPE SESSION
@@ -743,7 +735,7 @@
VARIABLE_COMMENT Controls the heuristic(s) applied during query optimization to prune less-promising partial plans from the optimizer search space. Meaning: 0 - do not apply any heuristic, thus perform exhaustive search; 1 - prune plans based on number of retrieved rows
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 1
-@@ -2414,7 +2414,7 @@ READ_ONLY NO
+@@ -2415,7 +2415,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME OPTIMIZER_SEARCH_DEPTH
VARIABLE_SCOPE SESSION
@@ -752,7 +744,7 @@
VARIABLE_COMMENT Maximum depth of search performed by the query optimizer. Values larger than the number of relations in a query result in better query plans, but take longer to compile a query. Values smaller than the number of tables in a relation result in faster optimization, but may produce very bad query plans. If set to 0, the system will automatically pick a reasonable value.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 62
-@@ -2424,7 +2424,7 @@ READ_ONLY NO
+@@ -2425,7 +2425,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME OPTIMIZER_SELECTIVITY_SAMPLING_LIMIT
VARIABLE_SCOPE SESSION
@@ -761,7 +753,7 @@
VARIABLE_COMMENT Controls number of record samples to check condition selectivity
NUMERIC_MIN_VALUE 10
NUMERIC_MAX_VALUE 4294967295
-@@ -2454,17 +2454,17 @@ READ_ONLY NO
+@@ -2455,17 +2455,17 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME OPTIMIZER_TRACE_MAX_MEM_SIZE
VARIABLE_SCOPE SESSION
@@ -782,7 +774,7 @@
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
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 5
-@@ -2484,7 +2484,7 @@ READ_ONLY YES
+@@ -2485,7 +2485,7 @@
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME PERFORMANCE_SCHEMA_ACCOUNTS_SIZE
VARIABLE_SCOPE GLOBAL
@@ -791,7 +783,7 @@
VARIABLE_COMMENT Maximum number of instrumented user@host accounts. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -2494,7 +2494,7 @@ READ_ONLY YES
+@@ -2495,7 +2495,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_DIGESTS_SIZE
VARIABLE_SCOPE GLOBAL
@@ -800,7 +792,7 @@
VARIABLE_COMMENT Size of the statement digest. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 200
-@@ -2504,7 +2504,7 @@ READ_ONLY YES
+@@ -2505,7 +2505,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_STAGES_HISTORY_LONG_SIZE
VARIABLE_SCOPE GLOBAL
@@ -809,7 +801,7 @@
VARIABLE_COMMENT Number of rows in EVENTS_STAGES_HISTORY_LONG. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -2514,7 +2514,7 @@ READ_ONLY YES
+@@ -2515,7 +2515,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_STAGES_HISTORY_SIZE
VARIABLE_SCOPE GLOBAL
@@ -818,7 +810,7 @@
VARIABLE_COMMENT Number of rows per thread in EVENTS_STAGES_HISTORY. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1024
-@@ -2524,7 +2524,7 @@ READ_ONLY YES
+@@ -2525,7 +2525,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_STATEMENTS_HISTORY_LONG_SIZE
VARIABLE_SCOPE GLOBAL
@@ -827,7 +819,7 @@
VARIABLE_COMMENT Number of rows in EVENTS_STATEMENTS_HISTORY_LONG. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -2534,7 +2534,7 @@ READ_ONLY YES
+@@ -2535,7 +2535,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_STATEMENTS_HISTORY_SIZE
VARIABLE_SCOPE GLOBAL
@@ -836,7 +828,25 @@
VARIABLE_COMMENT Number of rows per thread in EVENTS_STATEMENTS_HISTORY. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1024
-@@ -2544,7 +2544,7 @@ READ_ONLY YES
+@@ -2545,7 +2545,7 @@
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_TRANSACTIONS_HISTORY_LONG_SIZE
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT
++VARIABLE_TYPE INT
+ VARIABLE_COMMENT Number of rows in EVENTS_TRANSACTIONS_HISTORY_LONG. Use 0 to disable, -1 for automated sizing.
+ NUMERIC_MIN_VALUE -1
+ NUMERIC_MAX_VALUE 1048576
+@@ -2555,7 +2555,7 @@
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_TRANSACTIONS_HISTORY_SIZE
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT
++VARIABLE_TYPE INT
+ VARIABLE_COMMENT Number of rows per thread in EVENTS_TRANSACTIONS_HISTORY. Use 0 to disable, -1 for automated sizing.
+ NUMERIC_MIN_VALUE -1
+ NUMERIC_MAX_VALUE 1024
+@@ -2565,7 +2565,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_WAITS_HISTORY_LONG_SIZE
VARIABLE_SCOPE GLOBAL
@@ -845,7 +855,7 @@
VARIABLE_COMMENT Number of rows in EVENTS_WAITS_HISTORY_LONG. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -2554,7 +2554,7 @@ READ_ONLY YES
+@@ -2575,7 +2575,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_WAITS_HISTORY_SIZE
VARIABLE_SCOPE GLOBAL
@@ -854,7 +864,7 @@
VARIABLE_COMMENT Number of rows per thread in EVENTS_WAITS_HISTORY. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1024
-@@ -2564,7 +2564,7 @@ READ_ONLY YES
+@@ -2585,7 +2585,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_HOSTS_SIZE
VARIABLE_SCOPE GLOBAL
@@ -863,7 +873,7 @@
VARIABLE_COMMENT Maximum number of instrumented hosts. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -2574,7 +2574,7 @@ READ_ONLY YES
+@@ -2595,7 +2595,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_COND_CLASSES
VARIABLE_SCOPE GLOBAL
@@ -872,7 +882,7 @@
VARIABLE_COMMENT Maximum number of condition instruments.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 256
-@@ -2584,7 +2584,7 @@ READ_ONLY YES
+@@ -2605,7 +2605,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_COND_INSTANCES
VARIABLE_SCOPE GLOBAL
@@ -881,7 +891,7 @@
VARIABLE_COMMENT Maximum number of instrumented condition objects. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -2594,7 +2594,7 @@ READ_ONLY YES
+@@ -2615,7 +2615,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_DIGEST_LENGTH
VARIABLE_SCOPE GLOBAL
@@ -890,7 +900,7 @@
VARIABLE_COMMENT Maximum length considered for digest text, when stored in performance_schema tables.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 1048576
-@@ -2604,7 +2604,7 @@ READ_ONLY YES
+@@ -2625,7 +2625,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_FILE_CLASSES
VARIABLE_SCOPE GLOBAL
@@ -899,7 +909,7 @@
VARIABLE_COMMENT Maximum number of file instruments.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 256
-@@ -2614,7 +2614,7 @@ READ_ONLY YES
+@@ -2635,7 +2635,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_FILE_HANDLES
VARIABLE_SCOPE GLOBAL
@@ -908,7 +918,7 @@
VARIABLE_COMMENT Maximum number of opened instrumented files.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 1048576
-@@ -2624,7 +2624,7 @@ READ_ONLY YES
+@@ -2645,7 +2645,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_FILE_INSTANCES
VARIABLE_SCOPE GLOBAL
@@ -917,7 +927,34 @@
VARIABLE_COMMENT Maximum number of instrumented files. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -2634,7 +2634,7 @@ READ_ONLY YES
+@@ -2655,7 +2655,7 @@
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_INDEX_STAT
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT
++VARIABLE_TYPE INT
+ VARIABLE_COMMENT Maximum number of index statistics for instrumented tables. Use 0 to disable, -1 for automated scaling.
+ NUMERIC_MIN_VALUE -1
+ NUMERIC_MAX_VALUE 1048576
+@@ -2665,7 +2665,7 @@
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_MEMORY_CLASSES
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT Maximum number of memory pool instruments.
+ NUMERIC_MIN_VALUE 0
+ NUMERIC_MAX_VALUE 1024
+@@ -2675,7 +2675,7 @@
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_METADATA_LOCKS
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT
++VARIABLE_TYPE INT
+ VARIABLE_COMMENT Maximum number of metadata locks. Use 0 to disable, -1 for automated scaling.
+ NUMERIC_MIN_VALUE -1
+ NUMERIC_MAX_VALUE 104857600
+@@ -2685,7 +2685,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_MUTEX_CLASSES
VARIABLE_SCOPE GLOBAL
@@ -926,7 +963,7 @@
VARIABLE_COMMENT Maximum number of mutex instruments.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 256
-@@ -2644,7 +2644,7 @@ READ_ONLY YES
+@@ -2695,7 +2695,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_MUTEX_INSTANCES
VARIABLE_SCOPE GLOBAL
@@ -935,7 +972,25 @@
VARIABLE_COMMENT Maximum number of instrumented MUTEX objects. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 104857600
-@@ -2654,7 +2654,7 @@ READ_ONLY YES
+@@ -2705,7 +2705,7 @@
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_PREPARED_STATEMENTS_INSTANCES
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT
++VARIABLE_TYPE INT
+ VARIABLE_COMMENT Maximum number of instrumented prepared statements. Use 0 to disable, -1 for automated scaling.
+ NUMERIC_MIN_VALUE -1
+ NUMERIC_MAX_VALUE 1048576
+@@ -2715,7 +2715,7 @@
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_PROGRAM_INSTANCES
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT
++VARIABLE_TYPE INT
+ VARIABLE_COMMENT Maximum number of instrumented programs. Use 0 to disable, -1 for automated scaling.
+ NUMERIC_MIN_VALUE -1
+ NUMERIC_MAX_VALUE 1048576
+@@ -2725,7 +2725,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_RWLOCK_CLASSES
VARIABLE_SCOPE GLOBAL
@@ -944,7 +999,7 @@
VARIABLE_COMMENT Maximum number of rwlock instruments.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 256
-@@ -2664,7 +2664,7 @@ READ_ONLY YES
+@@ -2735,7 +2735,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_RWLOCK_INSTANCES
VARIABLE_SCOPE GLOBAL
@@ -953,7 +1008,7 @@
VARIABLE_COMMENT Maximum number of instrumented RWLOCK objects. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 104857600
-@@ -2674,7 +2674,7 @@ READ_ONLY YES
+@@ -2745,7 +2745,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_SOCKET_CLASSES
VARIABLE_SCOPE GLOBAL
@@ -962,7 +1017,7 @@
VARIABLE_COMMENT Maximum number of socket instruments.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 256
-@@ -2684,7 +2684,7 @@ READ_ONLY YES
+@@ -2755,7 +2755,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_SOCKET_INSTANCES
VARIABLE_SCOPE GLOBAL
@@ -971,7 +1026,16 @@
VARIABLE_COMMENT Maximum number of opened instrumented sockets. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -2694,7 +2694,7 @@ READ_ONLY YES
+@@ -2765,7 +2765,7 @@
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_SQL_TEXT_LENGTH
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT
++VARIABLE_TYPE INT
+ VARIABLE_COMMENT Maximum length of displayed sql text.
+ NUMERIC_MIN_VALUE 0
+ NUMERIC_MAX_VALUE 1048576
+@@ -2775,7 +2775,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_STAGE_CLASSES
VARIABLE_SCOPE GLOBAL
@@ -980,7 +1044,7 @@
VARIABLE_COMMENT Maximum number of stage instruments.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 256
-@@ -2704,7 +2704,7 @@ READ_ONLY YES
+@@ -2785,7 +2785,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_STATEMENT_CLASSES
VARIABLE_SCOPE GLOBAL
@@ -989,7 +1053,16 @@
VARIABLE_COMMENT Maximum number of statement instruments.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 256
-@@ -2714,7 +2714,7 @@ READ_ONLY YES
+@@ -2795,7 +2795,7 @@
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_STATEMENT_STACK
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT Number of rows per thread in EVENTS_STATEMENTS_CURRENT.
+ NUMERIC_MIN_VALUE 1
+ NUMERIC_MAX_VALUE 256
+@@ -2805,7 +2805,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_TABLE_HANDLES
VARIABLE_SCOPE GLOBAL
@@ -998,7 +1071,7 @@
VARIABLE_COMMENT Maximum number of opened instrumented tables. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -2724,7 +2724,7 @@ READ_ONLY YES
+@@ -2815,7 +2815,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_TABLE_INSTANCES
VARIABLE_SCOPE GLOBAL
@@ -1007,7 +1080,16 @@
VARIABLE_COMMENT Maximum number of instrumented tables. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -2734,7 +2734,7 @@ READ_ONLY YES
+@@ -2825,7 +2825,7 @@
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_TABLE_LOCK_STAT
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT
++VARIABLE_TYPE INT
+ VARIABLE_COMMENT Maximum number of lock statistics for instrumented tables. Use 0 to disable, -1 for automated scaling.
+ NUMERIC_MIN_VALUE -1
+ NUMERIC_MAX_VALUE 1048576
+@@ -2835,7 +2835,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_THREAD_CLASSES
VARIABLE_SCOPE GLOBAL
@@ -1016,7 +1098,7 @@
VARIABLE_COMMENT Maximum number of thread instruments.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 256
-@@ -2744,7 +2744,7 @@ READ_ONLY YES
+@@ -2845,7 +2845,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_THREAD_INSTANCES
VARIABLE_SCOPE GLOBAL
@@ -1025,7 +1107,7 @@
VARIABLE_COMMENT Maximum number of instrumented threads. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -2754,7 +2754,7 @@ READ_ONLY YES
+@@ -2855,7 +2855,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_SESSION_CONNECT_ATTRS_SIZE
VARIABLE_SCOPE GLOBAL
@@ -1034,25 +1116,25 @@
VARIABLE_COMMENT Size of session attribute string buffer per thread. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -2764,7 +2764,7 @@ READ_ONLY YES
+@@ -2865,7 +2865,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_SETUP_ACTORS_SIZE
VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
+-VARIABLE_TYPE BIGINT
++VARIABLE_TYPE INT
VARIABLE_COMMENT Maximum number of rows in SETUP_ACTORS.
- NUMERIC_MIN_VALUE 0
+ NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1024
-@@ -2774,7 +2774,7 @@ READ_ONLY YES
+@@ -2875,7 +2875,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_SETUP_OBJECTS_SIZE
VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
+-VARIABLE_TYPE BIGINT
++VARIABLE_TYPE INT
VARIABLE_COMMENT Maximum number of rows in SETUP_OBJECTS.
- NUMERIC_MIN_VALUE 0
+ NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -2784,7 +2784,7 @@ READ_ONLY YES
+@@ -2885,7 +2885,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_USERS_SIZE
VARIABLE_SCOPE GLOBAL
@@ -1061,7 +1143,7 @@
VARIABLE_COMMENT Maximum number of instrumented users. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -2834,7 +2834,7 @@ READ_ONLY YES
+@@ -2935,7 +2935,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PRELOAD_BUFFER_SIZE
VARIABLE_SCOPE SESSION
@@ -1070,7 +1152,7 @@
VARIABLE_COMMENT The size of the buffer that is allocated when preloading indexes
NUMERIC_MIN_VALUE 1024
NUMERIC_MAX_VALUE 1073741824
-@@ -2854,7 +2854,7 @@ READ_ONLY NO
+@@ -2955,7 +2955,7 @@
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME PROFILING_HISTORY_SIZE
VARIABLE_SCOPE SESSION
@@ -1079,7 +1161,7 @@
VARIABLE_COMMENT Number of statements about which profiling information is maintained. If set to 0, no profiles are stored. See SHOW PROFILES.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 100
-@@ -2864,7 +2864,7 @@ READ_ONLY NO
+@@ -2965,7 +2965,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PROGRESS_REPORT_TIME
VARIABLE_SCOPE SESSION
@@ -1088,7 +1170,7 @@
VARIABLE_COMMENT Seconds between sending progress reports to the client for time-consuming statements. Set to 0 to disable progress reporting.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -2924,7 +2924,7 @@ READ_ONLY NO
+@@ -3025,7 +3025,7 @@
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME QUERY_ALLOC_BLOCK_SIZE
VARIABLE_SCOPE SESSION
@@ -1097,7 +1179,7 @@
VARIABLE_COMMENT Allocation block size for query parsing and execution
NUMERIC_MIN_VALUE 1024
NUMERIC_MAX_VALUE 4294967295
-@@ -2934,7 +2934,7 @@ READ_ONLY NO
+@@ -3035,7 +3035,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME QUERY_CACHE_LIMIT
VARIABLE_SCOPE GLOBAL
@@ -1106,7 +1188,7 @@
VARIABLE_COMMENT Don't cache results that are bigger than this
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -2944,7 +2944,7 @@ READ_ONLY NO
+@@ -3045,7 +3045,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME QUERY_CACHE_MIN_RES_UNIT
VARIABLE_SCOPE GLOBAL
@@ -1115,7 +1197,7 @@
VARIABLE_COMMENT The minimum size for blocks allocated by the query cache
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -2957,7 +2957,7 @@ VARIABLE_SCOPE GLOBAL
+@@ -3058,7 +3058,7 @@
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The memory allocated to store results from old queries
NUMERIC_MIN_VALUE 0
@@ -1124,7 +1206,7 @@
NUMERIC_BLOCK_SIZE 1024
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -2994,7 +2994,7 @@ READ_ONLY NO
+@@ -3095,7 +3095,7 @@
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME QUERY_PREALLOC_SIZE
VARIABLE_SCOPE SESSION
@@ -1133,7 +1215,7 @@
VARIABLE_COMMENT Persistent buffer for query parsing and execution
NUMERIC_MIN_VALUE 1024
NUMERIC_MAX_VALUE 4294967295
-@@ -3007,7 +3007,7 @@ VARIABLE_SCOPE SESSION ONLY
+@@ -3108,7 +3108,7 @@
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Sets the internal state of the RAND() generator for replication purposes
NUMERIC_MIN_VALUE 0
@@ -1142,7 +1224,7 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -3017,14 +3017,14 @@ VARIABLE_SCOPE SESSION ONLY
+@@ -3118,14 +3118,14 @@
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Sets the internal state of the RAND() generator for replication purposes
NUMERIC_MIN_VALUE 0
@@ -1159,7 +1241,7 @@
VARIABLE_COMMENT Allocation block size for storing ranges during optimization
NUMERIC_MIN_VALUE 4096
NUMERIC_MAX_VALUE 4294967295
-@@ -3037,14 +3037,14 @@ VARIABLE_SCOPE GLOBAL
+@@ -3138,14 +3138,14 @@
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Maximum speed(KB/s) to read binlog from master (0 = no limit)
NUMERIC_MIN_VALUE 0
@@ -1176,7 +1258,7 @@
VARIABLE_COMMENT Each thread that does a sequential scan allocates a buffer of this size for each table it scans. If you do many sequential scans, you may want to increase this value
NUMERIC_MIN_VALUE 8192
NUMERIC_MAX_VALUE 2147483647
-@@ -3064,7 +3064,7 @@ READ_ONLY NO
+@@ -3165,7 +3165,7 @@
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME READ_RND_BUFFER_SIZE
VARIABLE_SCOPE SESSION
@@ -1185,8 +1267,8 @@
VARIABLE_COMMENT When reading rows in sorted order after a sort, the rows are read through this buffer to avoid a disk seeks
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 2147483647
-@@ -3264,10 +3264,10 @@ READ_ONLY YES
- COMMAND_LINE_ARGUMENT REQUIRED
+@@ -3375,10 +3375,10 @@
+ COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME ROWID_MERGE_BUFF_SIZE
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
@@ -1198,7 +1280,7 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -3284,20 +3284,20 @@ READ_ONLY NO
+@@ -3395,20 +3395,20 @@
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME RPL_SEMI_SYNC_MASTER_TIMEOUT
VARIABLE_SCOPE GLOBAL
@@ -1223,7 +1305,7 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -3354,10 +3354,10 @@ READ_ONLY NO
+@@ -3465,10 +3465,10 @@
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME RPL_SEMI_SYNC_SLAVE_TRACE_LEVEL
VARIABLE_SCOPE GLOBAL
@@ -1236,7 +1318,7 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -3394,7 +3394,7 @@ READ_ONLY YES
+@@ -3505,7 +3505,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SERVER_ID
VARIABLE_SCOPE SESSION
@@ -1245,7 +1327,7 @@
VARIABLE_COMMENT Uniquely identifies the server instance in the community of replication partners
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 4294967295
-@@ -3524,7 +3524,7 @@ READ_ONLY NO
+@@ -3645,7 +3645,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SLAVE_DOMAIN_PARALLEL_THREADS
VARIABLE_SCOPE GLOBAL
@@ -1254,7 +1336,7 @@
VARIABLE_COMMENT Maximum number of parallel threads to use on slave for events in a single replication domain. When using multiple domains, this can be used to limit a single domain from grabbing all threads and thus stalling other domains. The default of 0 means to allow a domain to grab as many threads as it wants, up to the value of slave_parallel_threads.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 16383
-@@ -3554,7 +3554,7 @@ READ_ONLY YES
+@@ -3675,7 +3675,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SLAVE_MAX_ALLOWED_PACKET
VARIABLE_SCOPE GLOBAL
@@ -1263,7 +1345,7 @@
VARIABLE_COMMENT The maximum packet length to sent successfully from the master to slave.
NUMERIC_MIN_VALUE 1024
NUMERIC_MAX_VALUE 1073741824
-@@ -3574,7 +3574,7 @@ READ_ONLY NO
+@@ -3695,7 +3695,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SLAVE_PARALLEL_MAX_QUEUED
VARIABLE_SCOPE GLOBAL
@@ -1272,7 +1354,7 @@
VARIABLE_COMMENT Limit on how much memory SQL threads should use per parallel replication thread when reading ahead in the relay log looking for opportunities for parallel replication. Only used when --slave-parallel-threads > 0.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 2147483647
-@@ -3594,7 +3594,7 @@ READ_ONLY NO
+@@ -3715,7 +3715,7 @@
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME SLAVE_PARALLEL_THREADS
VARIABLE_SCOPE GLOBAL
@@ -1281,7 +1363,7 @@
VARIABLE_COMMENT If non-zero, number of threads to spawn to apply in parallel events on the slave that were group-committed on the master or were logged with GTID in different replication domains. Note that these threads are in addition to the IO and SQL threads, which are always created by a replication slave
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 16383
-@@ -3604,7 +3604,7 @@ READ_ONLY NO
+@@ -3725,7 +3725,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SLAVE_PARALLEL_WORKERS
VARIABLE_SCOPE GLOBAL
@@ -1290,7 +1372,7 @@
VARIABLE_COMMENT Alias for slave_parallel_threads
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 16383
-@@ -3644,7 +3644,7 @@ READ_ONLY NO
+@@ -3765,7 +3765,7 @@
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME SLAVE_TRANSACTION_RETRIES
VARIABLE_SCOPE GLOBAL
@@ -1299,7 +1381,7 @@
VARIABLE_COMMENT Number of times the slave SQL thread will retry a transaction in case it failed with a deadlock, elapsed lock wait timeout or listed in slave_transaction_retry_errors, before giving up and stopping
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -3664,7 +3664,7 @@ READ_ONLY YES
+@@ -3785,7 +3785,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SLAVE_TRANSACTION_RETRY_INTERVAL
VARIABLE_SCOPE GLOBAL
@@ -1308,7 +1390,7 @@
VARIABLE_COMMENT Interval of the slave SQL thread will retry a transaction in case it failed with a deadlock or elapsed lock wait timeout or listed in slave_transaction_retry_errors
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 3600
-@@ -3684,7 +3684,7 @@ READ_ONLY NO
+@@ -3805,7 +3805,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SLOW_LAUNCH_TIME
VARIABLE_SCOPE GLOBAL
@@ -1317,7 +1399,7 @@
VARIABLE_COMMENT If creating the thread takes longer than this value (in seconds), the Slow_launch_threads counter will be incremented
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 31536000
-@@ -3727,7 +3727,7 @@ VARIABLE_SCOPE SESSION
+@@ -3848,7 +3848,7 @@
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Each thread that needs to do a sort allocates a buffer of this size
NUMERIC_MIN_VALUE 1024
@@ -1326,7 +1408,7 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -3944,7 +3944,7 @@ READ_ONLY NO
+@@ -4075,7 +4075,7 @@
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME STORED_PROGRAM_CACHE
VARIABLE_SCOPE GLOBAL
@@ -1335,7 +1417,7 @@
VARIABLE_COMMENT The soft upper limit for number of cached stored routines for one connection.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 524288
-@@ -4044,7 +4044,7 @@ READ_ONLY NO
+@@ -4175,7 +4175,7 @@
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME TABLE_DEFINITION_CACHE
VARIABLE_SCOPE GLOBAL
@@ -1344,7 +1426,7 @@
VARIABLE_COMMENT The number of cached table definitions
NUMERIC_MIN_VALUE 400
NUMERIC_MAX_VALUE 2097152
-@@ -4054,7 +4054,7 @@ READ_ONLY NO
+@@ -4185,7 +4185,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME TABLE_OPEN_CACHE
VARIABLE_SCOPE GLOBAL
@@ -1353,7 +1435,7 @@
VARIABLE_COMMENT The number of cached open tables
NUMERIC_MIN_VALUE 10
NUMERIC_MAX_VALUE 1048576
-@@ -4114,7 +4114,7 @@ READ_ONLY NO
+@@ -4245,7 +4245,7 @@
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME THREAD_CACHE_SIZE
VARIABLE_SCOPE GLOBAL
@@ -1362,16 +1444,7 @@
VARIABLE_COMMENT How many threads we should keep in a cache for reuse. These are freed after 5 minutes of idle time
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 16384
-@@ -4124,7 +4124,7 @@ READ_ONLY NO
- COMMAND_LINE_ARGUMENT REQUIRED
- VARIABLE_NAME THREAD_CONCURRENCY
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT Permits the application to give the threads system a hint for the desired number of threads that should be run at the same time.This variable has no effect, and is deprecated. It will be removed in a future release.
- NUMERIC_MIN_VALUE 1
- NUMERIC_MAX_VALUE 512
-@@ -4287,7 +4287,7 @@ VARIABLE_SCOPE SESSION
+@@ -4418,7 +4418,7 @@
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Max size for data for an internal temporary on-disk MyISAM or Aria table.
NUMERIC_MIN_VALUE 1024
@@ -1380,19 +1453,19 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -4297,7 +4297,7 @@ VARIABLE_SCOPE SESSION
+@@ -4428,7 +4428,7 @@
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT If an internal in-memory temporary table exceeds this size, MariaDB will automatically convert it to an on-disk MyISAM or Aria table. Same as tmp_table_size.
- NUMERIC_MIN_VALUE 1024
+ NUMERIC_MIN_VALUE 0
-NUMERIC_MAX_VALUE 18446744073709551615
+NUMERIC_MAX_VALUE 4294967295
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -4307,14 +4307,14 @@ VARIABLE_SCOPE SESSION
+@@ -4438,14 +4438,14 @@
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Alias for tmp_memory_table_size. If an internal in-memory temporary table exceeds this size, MariaDB will automatically convert it to an on-disk MyISAM or Aria table.
- NUMERIC_MIN_VALUE 1024
+ NUMERIC_MIN_VALUE 0
-NUMERIC_MAX_VALUE 18446744073709551615
+NUMERIC_MAX_VALUE 4294967295
NUMERIC_BLOCK_SIZE 1
@@ -1406,7 +1479,7 @@
VARIABLE_COMMENT Allocation block size for transactions to be stored in binary log
NUMERIC_MIN_VALUE 1024
NUMERIC_MAX_VALUE 134217728
-@@ -4324,7 +4324,7 @@ READ_ONLY NO
+@@ -4455,7 +4455,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME TRANSACTION_PREALLOC_SIZE
VARIABLE_SCOPE SESSION
@@ -1415,7 +1488,7 @@
VARIABLE_COMMENT Persistent buffer for transactions to be stored in binary log
NUMERIC_MIN_VALUE 1024
NUMERIC_MAX_VALUE 134217728
-@@ -4464,7 +4464,7 @@ READ_ONLY YES
+@@ -4595,7 +4595,7 @@
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME WAIT_TIMEOUT
VARIABLE_SCOPE SESSION
@@ -1424,7 +1497,7 @@
VARIABLE_COMMENT The number of seconds the server waits for activity on a connection before closing it
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 31536000
-@@ -4491,7 +4491,7 @@ order by variable_name;
+@@ -4622,7 +4622,7 @@
VARIABLE_NAME LOG_TC_SIZE
GLOBAL_VALUE_ORIGIN AUTO
VARIABLE_SCOPE GLOBAL
diff --git a/mysql-test/suite/sys_vars/r/sysvars_server_notembedded,aix.rdiff b/mysql-test/suite/sys_vars/r/sysvars_server_notembedded,aix.rdiff
new file mode 100644
index 00000000000..3fd273569c9
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/sysvars_server_notembedded,aix.rdiff
@@ -0,0 +1,105 @@
+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 bb3378139f2..ddab28508ec 100644
+--- a/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result
++++ b/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result
+@@ -4259,99 +4259,9 @@ VARIABLE_COMMENT Define threads usage for handling queries
+ NUMERIC_MIN_VALUE NULL
+ NUMERIC_MAX_VALUE NULL
+ NUMERIC_BLOCK_SIZE NULL
+-ENUM_VALUE_LIST one-thread-per-connection,no-threads,pool-of-threads
++ENUM_VALUE_LIST one-thread-per-connection,no-threads
+ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
+-VARIABLE_NAME THREAD_POOL_DEDICATED_LISTENER
+-VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BOOLEAN
+-VARIABLE_COMMENT If set to 1,listener thread will not pick up queries
+-NUMERIC_MIN_VALUE NULL
+-NUMERIC_MAX_VALUE NULL
+-NUMERIC_BLOCK_SIZE NULL
+-ENUM_VALUE_LIST OFF,ON
+-READ_ONLY NO
+-COMMAND_LINE_ARGUMENT OPTIONAL
+-VARIABLE_NAME THREAD_POOL_EXACT_STATS
+-VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BOOLEAN
+-VARIABLE_COMMENT If set to 1, provides better statistics in information_schema threadpool tables
+-NUMERIC_MIN_VALUE NULL
+-NUMERIC_MAX_VALUE NULL
+-NUMERIC_BLOCK_SIZE NULL
+-ENUM_VALUE_LIST OFF,ON
+-READ_ONLY NO
+-COMMAND_LINE_ARGUMENT OPTIONAL
+-VARIABLE_NAME THREAD_POOL_IDLE_TIMEOUT
+-VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE INT UNSIGNED
+-VARIABLE_COMMENT Timeout in seconds for an idle thread in the thread pool.Worker thread will be shut down after timeout
+-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 THREAD_POOL_MAX_THREADS
+-VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE INT UNSIGNED
+-VARIABLE_COMMENT Maximum allowed number of worker threads in the thread pool
+-NUMERIC_MIN_VALUE 1
+-NUMERIC_MAX_VALUE 65536
+-NUMERIC_BLOCK_SIZE 1
+-ENUM_VALUE_LIST NULL
+-READ_ONLY NO
+-COMMAND_LINE_ARGUMENT REQUIRED
+-VARIABLE_NAME THREAD_POOL_OVERSUBSCRIBE
+-VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE INT UNSIGNED
+-VARIABLE_COMMENT How many additional active worker threads in a group are allowed.
+-NUMERIC_MIN_VALUE 1
+-NUMERIC_MAX_VALUE 1000
+-NUMERIC_BLOCK_SIZE 1
+-ENUM_VALUE_LIST NULL
+-READ_ONLY NO
+-COMMAND_LINE_ARGUMENT REQUIRED
+-VARIABLE_NAME THREAD_POOL_PRIORITY
+-VARIABLE_SCOPE SESSION
+-VARIABLE_TYPE ENUM
+-VARIABLE_COMMENT Threadpool priority. High priority connections usually start executing earlier than low priority.If priority set to 'auto', the the actual priority(low or high) is determined based on whether or not connection is inside transaction.
+-NUMERIC_MIN_VALUE NULL
+-NUMERIC_MAX_VALUE NULL
+-NUMERIC_BLOCK_SIZE NULL
+-ENUM_VALUE_LIST high,low,auto
+-READ_ONLY NO
+-COMMAND_LINE_ARGUMENT REQUIRED
+-VARIABLE_NAME THREAD_POOL_PRIO_KICKUP_TIMER
+-VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE INT UNSIGNED
+-VARIABLE_COMMENT The number of milliseconds before a dequeued low-priority statement is moved to the high-priority queue
+-NUMERIC_MIN_VALUE 0
+-NUMERIC_MAX_VALUE 4294967295
+-NUMERIC_BLOCK_SIZE 1
+-ENUM_VALUE_LIST NULL
+-READ_ONLY NO
+-COMMAND_LINE_ARGUMENT REQUIRED
+-VARIABLE_NAME THREAD_POOL_SIZE
+-VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE INT UNSIGNED
+-VARIABLE_COMMENT Number of thread groups in the pool. This parameter is roughly equivalent to maximum number of concurrently executing threads (threads in a waiting state do not count as executing).
+-NUMERIC_MIN_VALUE 1
+-NUMERIC_MAX_VALUE 100000
+-NUMERIC_BLOCK_SIZE 1
+-ENUM_VALUE_LIST NULL
+-READ_ONLY NO
+-COMMAND_LINE_ARGUMENT REQUIRED
+-VARIABLE_NAME THREAD_POOL_STALL_LIMIT
+-VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE INT UNSIGNED
+-VARIABLE_COMMENT Maximum query execution time in milliseconds,before an executing non-yielding thread is considered stalled.If a worker thread is stalled, additional worker thread may be created to handle remaining clients.
+-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 THREAD_STACK
+ VARIABLE_SCOPE GLOBAL
+ VARIABLE_TYPE BIGINT UNSIGNED
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 b9e4aac3288..5eeb5698eba 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result
+++ b/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result
@@ -95,7 +95,7 @@ COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_GROUP_COMMIT_INTERVAL
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
-VARIABLE_COMMENT Interval between commite in microseconds (1/1000000c). 0 stands for no waiting for other threads to come and do a commit in "hard" mode and no sync()/commit at all in "soft" mode. Option has only an effect if aria_group_commit is used
+VARIABLE_COMMENT Interval between commits in microseconds (1/1000000 sec). 0 stands for no waiting for other threads to come and do a commit in "hard" mode and no sync()/commit at all in "soft" mode. Option has only an effect if aria_group_commit is used
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
NUMERIC_BLOCK_SIZE 1
@@ -207,7 +207,7 @@ VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The buffer that is allocated when sorting the index when doing a REPAIR or when creating indexes with CREATE INDEX or ALTER TABLE.
NUMERIC_MIN_VALUE 4096
-NUMERIC_MAX_VALUE 18446744073709551615
+NUMERIC_MAX_VALUE 9223372036854775807
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
@@ -305,7 +305,7 @@ COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME BIG_TABLES
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
-VARIABLE_COMMENT Old variable, which if set to 1, allows large result sets by saving all temporary sets to disk, avoiding 'table full' errors. No longer needed, as the server now handles this automatically. sql_big_tables is a synonym.
+VARIABLE_COMMENT Old variable, which if set to 1, allows large result sets by saving all temporary sets to disk, avoiding 'table full' errors. No longer needed, as the server now handles this automatically.
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
@@ -422,6 +422,16 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST MINIMAL,NOBLOB,FULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME BINLOG_ROW_METADATA
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE ENUM
+VARIABLE_COMMENT Controls whether metadata is logged using FULL , MINIMAL format and NO_LOG.FULL causes all metadata to be logged; MINIMAL means that only metadata actually required by slave is logged; NO_LOG NO metadata will be logged.Default: NO_LOG.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST NO_LOG,MINIMAL,FULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME BINLOG_STMT_CACHE_SIZE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -739,7 +749,7 @@ VARIABLE_COMMENT Default flags for the regex library
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST DOTALL,DUPNAMES,EXTENDED,EXTRA,MULTILINE,UNGREEDY
+ENUM_VALUE_LIST DOTALL,DUPNAMES,EXTENDED,EXTENDED_MORE,EXTRA,MULTILINE,UNGREEDY
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME DEFAULT_STORAGE_ENGINE
@@ -1565,7 +1575,7 @@ COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME LARGE_PAGE_SIZE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
-VARIABLE_COMMENT If large page support is enabled, this shows the size of memory pages
+VARIABLE_COMMENT Previously showed the size of large memory pages, unused since multiple page size support was added
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
NUMERIC_BLOCK_SIZE 1
@@ -2022,16 +2032,6 @@ NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
-VARIABLE_NAME MAX_LONG_DATA_SIZE
-VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
-VARIABLE_COMMENT The maximum BLOB length to send to server from mysql_send_long_data API. Deprecated option; use max_allowed_packet instead.
-NUMERIC_MIN_VALUE 1024
-NUMERIC_MAX_VALUE 4294967295
-NUMERIC_BLOCK_SIZE 1
-ENUM_VALUE_LIST NULL
-READ_ONLY YES
-COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_PASSWORD_ERRORS
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
@@ -2202,16 +2202,6 @@ NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
-VARIABLE_NAME MULTI_RANGE_COUNT
-VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
-VARIABLE_COMMENT Ignored. Use mrr_buffer_size instead
-NUMERIC_MIN_VALUE 1
-NUMERIC_MAX_VALUE 18446744073709551615
-NUMERIC_BLOCK_SIZE 1
-ENUM_VALUE_LIST NULL
-READ_ONLY NO
-COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MYISAM_BLOCK_SIZE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -2402,6 +2392,16 @@ NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME OPTIMIZER_MAX_SEL_ARG_WEIGHT
+VARIABLE_SCOPE SESSION
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT The maximum weight of the SEL_ARG graph. Set to 0 for no limit
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 18446744073709551615
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME OPTIMIZER_PRUNE_LEVEL
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
@@ -2439,7 +2439,7 @@ VARIABLE_COMMENT Fine-tune the optimizer behavior
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST index_merge,index_merge_union,index_merge_sort_union,index_merge_intersection,index_merge_sort_intersection,engine_condition_pushdown,index_condition_pushdown,derived_merge,derived_with_keys,firstmatch,loosescan,materialization,in_to_exists,semijoin,partial_match_rowid_merge,partial_match_table_scan,subquery_cache,mrr,mrr_cost_based,mrr_sort_keys,outer_join_with_cache,semijoin_with_cache,join_cache_incremental,join_cache_hashed,join_cache_bka,optimize_join_buffer_size,table_elimination,extended_keys,exists_to_in,orderby_uses_equalities,condition_pushdown_for_derived,split_materialized,condition_pushdown_for_subquery,rowid_filter,condition_pushdown_from_having,default
+ENUM_VALUE_LIST index_merge,index_merge_union,index_merge_sort_union,index_merge_intersection,index_merge_sort_intersection,engine_condition_pushdown,index_condition_pushdown,derived_merge,derived_with_keys,firstmatch,loosescan,materialization,in_to_exists,semijoin,partial_match_rowid_merge,partial_match_table_scan,subquery_cache,mrr,mrr_cost_based,mrr_sort_keys,outer_join_with_cache,semijoin_with_cache,join_cache_incremental,join_cache_hashed,join_cache_bka,optimize_join_buffer_size,table_elimination,extended_keys,exists_to_in,orderby_uses_equalities,condition_pushdown_for_derived,split_materialized,condition_pushdown_for_subquery,rowid_filter,condition_pushdown_from_having,not_null_range_scan,default
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME OPTIMIZER_TRACE
@@ -2542,6 +2542,26 @@ NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_TRANSACTIONS_HISTORY_LONG_SIZE
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT
+VARIABLE_COMMENT Number of rows in EVENTS_TRANSACTIONS_HISTORY_LONG. Use 0 to disable, -1 for automated sizing.
+NUMERIC_MIN_VALUE -1
+NUMERIC_MAX_VALUE 1048576
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_TRANSACTIONS_HISTORY_SIZE
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT
+VARIABLE_COMMENT Number of rows per thread in EVENTS_TRANSACTIONS_HISTORY. Use 0 to disable, -1 for automated sizing.
+NUMERIC_MIN_VALUE -1
+NUMERIC_MAX_VALUE 1024
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_WAITS_HISTORY_LONG_SIZE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT
@@ -2632,6 +2652,36 @@ NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_INDEX_STAT
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT
+VARIABLE_COMMENT Maximum number of index statistics for instrumented tables. Use 0 to disable, -1 for automated scaling.
+NUMERIC_MIN_VALUE -1
+NUMERIC_MAX_VALUE 1048576
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_MEMORY_CLASSES
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Maximum number of memory pool instruments.
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 1024
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_METADATA_LOCKS
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT
+VARIABLE_COMMENT Maximum number of metadata locks. Use 0 to disable, -1 for automated scaling.
+NUMERIC_MIN_VALUE -1
+NUMERIC_MAX_VALUE 104857600
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_MUTEX_CLASSES
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -2652,6 +2702,26 @@ NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_PREPARED_STATEMENTS_INSTANCES
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT
+VARIABLE_COMMENT Maximum number of instrumented prepared statements. Use 0 to disable, -1 for automated scaling.
+NUMERIC_MIN_VALUE -1
+NUMERIC_MAX_VALUE 1048576
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_PROGRAM_INSTANCES
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT
+VARIABLE_COMMENT Maximum number of instrumented programs. Use 0 to disable, -1 for automated scaling.
+NUMERIC_MIN_VALUE -1
+NUMERIC_MAX_VALUE 1048576
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_RWLOCK_CLASSES
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -2692,6 +2762,16 @@ NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_SQL_TEXT_LENGTH
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT
+VARIABLE_COMMENT Maximum length of displayed sql text.
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 1048576
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_STAGE_CLASSES
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -2712,6 +2792,16 @@ NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_STATEMENT_STACK
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Number of rows per thread in EVENTS_STATEMENTS_CURRENT.
+NUMERIC_MIN_VALUE 1
+NUMERIC_MAX_VALUE 256
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_TABLE_HANDLES
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT
@@ -2732,6 +2822,16 @@ NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_TABLE_LOCK_STAT
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT
+VARIABLE_COMMENT Maximum number of lock statistics for instrumented tables. Use 0 to disable, -1 for automated scaling.
+NUMERIC_MIN_VALUE -1
+NUMERIC_MAX_VALUE 1048576
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_THREAD_CLASSES
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -2764,9 +2864,9 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_SETUP_ACTORS_SIZE
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE BIGINT
VARIABLE_COMMENT Maximum number of rows in SETUP_ACTORS.
-NUMERIC_MIN_VALUE 0
+NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1024
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
@@ -2774,9 +2874,9 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_SETUP_OBJECTS_SIZE
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE BIGINT
VARIABLE_COMMENT Maximum number of rows in SETUP_OBJECTS.
-NUMERIC_MIN_VALUE 0
+NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
@@ -3262,6 +3362,16 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME REQUIRE_SECURE_TRANSPORT
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT When this option is enabled, connections attempted using insecure transport will be rejected. Secure transports are SSL/TLS, Unix sockets or named pipes.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME ROWID_MERGE_BUFF_SIZE
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
@@ -3615,11 +3725,11 @@ COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SLAVE_RUN_TRIGGERS_FOR_RBR
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE ENUM
-VARIABLE_COMMENT Modes for how triggers in row-base replication on slave side will be executed. Legal values are NO (default), YES and LOGGING. NO means that trigger for RBR will not be running on slave. YES and LOGGING means that triggers will be running on slave, if there was not triggers running on the master for the statement. LOGGING also means results of that the executed triggers work will be written to the binlog.
+VARIABLE_COMMENT Modes for how triggers in row-base replication on slave side will be executed. Legal values are NO (default), YES, LOGGING and ENFORCE. NO means that trigger for RBR will not be running on slave. YES and LOGGING means that triggers will be running on slave, if there was not triggers running on the master for the statement. LOGGING also means results of that the executed triggers work will be written to the binlog. ENFORCE means that triggers will always be run on the slave, even if there are triggers on the master. ENFORCE implies LOGGING.
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NO,YES,LOGGING
+ENUM_VALUE_LIST NO,YES,LOGGING,ENFORCE
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SLAVE_SKIP_ERRORS
@@ -3762,6 +3872,16 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
+VARIABLE_NAME SQL_IF_EXISTS
+VARIABLE_SCOPE SESSION
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT If set to 1 adds an implicate IF EXISTS to ALTER, RENAME and DROP of TABLES, VIEWS, FUNCTIONS and PACKAGES
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME SQL_LOG_BIN
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
@@ -4122,16 +4242,6 @@ NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
-VARIABLE_NAME THREAD_CONCURRENCY
-VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
-VARIABLE_COMMENT Permits the application to give the threads system a hint for the desired number of threads that should be run at the same time.This variable has no effect, and is deprecated. It will be removed in a future release.
-NUMERIC_MIN_VALUE 1
-NUMERIC_MAX_VALUE 512
-NUMERIC_BLOCK_SIZE 1
-ENUM_VALUE_LIST NULL
-READ_ONLY YES
-COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME THREAD_HANDLING
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE ENUM
@@ -4142,6 +4252,26 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST one-thread-per-connection,no-threads,pool-of-threads
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME THREAD_POOL_DEDICATED_LISTENER
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT If set to 1,listener thread will not pick up queries
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME THREAD_POOL_EXACT_STATS
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT If set to 1, provides better statistics in information_schema threadpool tables
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME THREAD_POOL_IDLE_TIMEOUT
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
@@ -4206,7 +4336,7 @@ VARIABLE_NAME THREAD_POOL_STALL_LIMIT
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Maximum query execution time in milliseconds,before an executing non-yielding thread is considered stalled.If a worker thread is stalled, additional worker thread may be created to handle remaining clients.
-NUMERIC_MIN_VALUE 10
+NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 4294967295
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
@@ -4222,16 +4352,6 @@ NUMERIC_BLOCK_SIZE 1024
ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
-VARIABLE_NAME TIMED_MUTEXES
-VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BOOLEAN
-VARIABLE_COMMENT Specify whether to time mutexes. Deprecated, has no effect.
-NUMERIC_MIN_VALUE NULL
-NUMERIC_MAX_VALUE NULL
-NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST OFF,ON
-READ_ONLY NO
-COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME TIMESTAMP
VARIABLE_SCOPE SESSION ONLY
VARIABLE_TYPE DOUBLE
@@ -4296,7 +4416,7 @@ VARIABLE_NAME TMP_MEMORY_TABLE_SIZE
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT If an internal in-memory temporary table exceeds this size, MariaDB will automatically convert it to an on-disk MyISAM or Aria table. Same as tmp_table_size.
-NUMERIC_MIN_VALUE 1024
+NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 18446744073709551615
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
@@ -4306,7 +4426,7 @@ VARIABLE_NAME TMP_TABLE_SIZE
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Alias for tmp_memory_table_size. If an internal in-memory temporary table exceeds this size, MariaDB will automatically convert it to an on-disk MyISAM or Aria table.
-NUMERIC_MIN_VALUE 1024
+NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 18446744073709551615
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
diff --git a/mysql-test/suite/sys_vars/r/sysvars_star.result b/mysql-test/suite/sys_vars/r/sysvars_star.result
new file mode 100644
index 00000000000..eede5c17b36
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/sysvars_star.result
@@ -0,0 +1,113 @@
+set completion_type=CHAIN;
+set global low_priority_updates=1;
+install soname 'sql_errlog';
+select * from information_schema.system_variables
+where variable_name in (
+'completion_type', #session!=global, origin=compile-time
+'low_priority_updates', #global!=default, origin=sql
+'column_compression_threshold', #origin=command-line
+'plugin_maturity', #origin=config
+'sql_error_log_rate', #plugin, origin=command-line
+'sql_error_log_rotations' #plugin, origin=config
+)
+order by variable_name;
+VARIABLE_NAME COLUMN_COMPRESSION_THRESHOLD
+SESSION_VALUE 120
+GLOBAL_VALUE 120
+GLOBAL_VALUE_ORIGIN COMMAND-LINE
+DEFAULT_VALUE 100
+VARIABLE_SCOPE SESSION
+VARIABLE_TYPE INT UNSIGNED
+VARIABLE_COMMENT Minimum column data length eligible for compression
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 4294967295
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+GLOBAL_VALUE_PATH NULL
+VARIABLE_NAME COMPLETION_TYPE
+SESSION_VALUE CHAIN
+GLOBAL_VALUE NO_CHAIN
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE NO_CHAIN
+VARIABLE_SCOPE SESSION
+VARIABLE_TYPE ENUM
+VARIABLE_COMMENT The transaction completion type
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST NO_CHAIN,CHAIN,RELEASE
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+GLOBAL_VALUE_PATH NULL
+VARIABLE_NAME LOW_PRIORITY_UPDATES
+SESSION_VALUE OFF
+GLOBAL_VALUE ON
+GLOBAL_VALUE_ORIGIN SQL
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE SESSION
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT INSERTvar/UPDATE has lower priority than selects
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+GLOBAL_VALUE_PATH NULL
+VARIABLE_NAME PLUGIN_MATURITY
+SESSION_VALUE NULL
+GLOBAL_VALUE alpha
+GLOBAL_VALUE_ORIGIN CONFIG
+DEFAULT_VALUE gamma
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE ENUM
+VARIABLE_COMMENT The lowest desirable plugin maturity. Plugins less mature than that will not be installed or loaded
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST unknown,experimental,alpha,beta,gamma,stable
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
+GLOBAL_VALUE_PATH var/my.cnf
+VARIABLE_NAME SQL_ERROR_LOG_RATE
+SESSION_VALUE NULL
+GLOBAL_VALUE 100
+GLOBAL_VALUE_ORIGIN COMMAND-LINE
+DEFAULT_VALUE 1
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE INT UNSIGNED
+VARIABLE_COMMENT Sampling rate. If set to 0(zero), the logging is disabled.
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 1000000
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+GLOBAL_VALUE_PATH NULL
+VARIABLE_NAME SQL_ERROR_LOG_ROTATIONS
+SESSION_VALUE NULL
+GLOBAL_VALUE 5
+GLOBAL_VALUE_ORIGIN CONFIG
+DEFAULT_VALUE 9
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE INT UNSIGNED
+VARIABLE_COMMENT Number of rotations before log is removed.
+NUMERIC_MIN_VALUE 1
+NUMERIC_MAX_VALUE 999
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
+GLOBAL_VALUE_PATH var/my.cnf
+create user foo@localhost;
+connect foo,localhost,foo;
+select global_value_path from information_schema.system_variables where variable_name='plugin_maturity';
+global_value_path NULL
+connection default;
+select global_value_path from information_schema.system_variables where variable_name='plugin_maturity';
+global_value_path var/my.cnf
+drop user foo@localhost;
+set global low_priority_updates=default;
+uninstall soname 'sql_errlog';
diff --git a/mysql-test/suite/sys_vars/r/sysvars_wsrep.result b/mysql-test/suite/sys_vars/r/sysvars_wsrep.result
index 4bff3d4441e..f73bfbd13e7 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_wsrep.result
+++ b/mysql-test/suite/sys_vars/r/sysvars_wsrep.result
@@ -15,6 +15,7 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
+GLOBAL_VALUE_PATH NULL
VARIABLE_NAME WSREP_CAUSAL_READS
SESSION_VALUE OFF
GLOBAL_VALUE OFF
@@ -29,6 +30,7 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
+GLOBAL_VALUE_PATH NULL
VARIABLE_NAME WSREP_CERTIFICATION_RULES
SESSION_VALUE NULL
GLOBAL_VALUE strict
@@ -43,6 +45,7 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST strict,optimized
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
+GLOBAL_VALUE_PATH NULL
VARIABLE_NAME WSREP_CERTIFY_NONPK
SESSION_VALUE NULL
GLOBAL_VALUE ON
@@ -57,6 +60,7 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
+GLOBAL_VALUE_PATH NULL
VARIABLE_NAME WSREP_CLUSTER_ADDRESS
SESSION_VALUE NULL
GLOBAL_VALUE
@@ -71,6 +75,7 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
+GLOBAL_VALUE_PATH NULL
VARIABLE_NAME WSREP_CLUSTER_NAME
SESSION_VALUE NULL
GLOBAL_VALUE my_wsrep_cluster
@@ -85,6 +90,7 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
+GLOBAL_VALUE_PATH NULL
VARIABLE_NAME WSREP_CONVERT_LOCK_TO_TRX
SESSION_VALUE NULL
GLOBAL_VALUE OFF
@@ -99,6 +105,7 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
+GLOBAL_VALUE_PATH NULL
VARIABLE_NAME WSREP_DATA_HOME_DIR
SESSION_VALUE NULL
GLOBAL_VALUE DATADIR
@@ -113,6 +120,7 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
+GLOBAL_VALUE_PATH NULL
VARIABLE_NAME WSREP_DBUG_OPTION
SESSION_VALUE NULL
GLOBAL_VALUE
@@ -127,6 +135,7 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
+GLOBAL_VALUE_PATH NULL
VARIABLE_NAME WSREP_DEBUG
SESSION_VALUE NULL
GLOBAL_VALUE NONE
@@ -141,6 +150,7 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NONE,SERVER,TRANSACTION,STREAMING,CLIENT
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
+GLOBAL_VALUE_PATH NULL
VARIABLE_NAME WSREP_DESYNC
SESSION_VALUE NULL
GLOBAL_VALUE OFF
@@ -155,6 +165,7 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
+GLOBAL_VALUE_PATH NULL
VARIABLE_NAME WSREP_DIRTY_READS
SESSION_VALUE OFF
GLOBAL_VALUE OFF
@@ -169,6 +180,7 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
+GLOBAL_VALUE_PATH NULL
VARIABLE_NAME WSREP_DRUPAL_282555_WORKAROUND
SESSION_VALUE NULL
GLOBAL_VALUE OFF
@@ -183,6 +195,7 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
+GLOBAL_VALUE_PATH NULL
VARIABLE_NAME WSREP_FORCED_BINLOG_FORMAT
SESSION_VALUE NULL
GLOBAL_VALUE NONE
@@ -197,6 +210,7 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST MIXED,STATEMENT,ROW,NONE
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
+GLOBAL_VALUE_PATH NULL
VARIABLE_NAME WSREP_GTID_DOMAIN_ID
SESSION_VALUE NULL
GLOBAL_VALUE 0
@@ -211,6 +225,7 @@ NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
+GLOBAL_VALUE_PATH NULL
VARIABLE_NAME WSREP_GTID_MODE
SESSION_VALUE NULL
GLOBAL_VALUE OFF
@@ -225,6 +240,22 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
+GLOBAL_VALUE_PATH NULL
+VARIABLE_NAME WSREP_GTID_SEQ_NO
+SESSION_VALUE 0
+GLOBAL_VALUE NULL
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 0
+VARIABLE_SCOPE SESSION ONLY
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Internal server usage, manually set WSREP GTID seqno.
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 18446744073709551615
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT NULL
+GLOBAL_VALUE_PATH NULL
VARIABLE_NAME WSREP_IGNORE_APPLY_ERRORS
SESSION_VALUE NULL
GLOBAL_VALUE 7
@@ -239,6 +270,7 @@ NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
+GLOBAL_VALUE_PATH NULL
VARIABLE_NAME WSREP_LOAD_DATA_SPLITTING
SESSION_VALUE NULL
GLOBAL_VALUE OFF
@@ -253,6 +285,7 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
+GLOBAL_VALUE_PATH NULL
VARIABLE_NAME WSREP_LOG_CONFLICTS
SESSION_VALUE NULL
GLOBAL_VALUE OFF
@@ -267,6 +300,7 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
+GLOBAL_VALUE_PATH NULL
VARIABLE_NAME WSREP_MAX_WS_ROWS
SESSION_VALUE NULL
GLOBAL_VALUE 0
@@ -281,6 +315,7 @@ NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
+GLOBAL_VALUE_PATH NULL
VARIABLE_NAME WSREP_MAX_WS_SIZE
SESSION_VALUE NULL
GLOBAL_VALUE 2147483647
@@ -295,6 +330,7 @@ NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
+GLOBAL_VALUE_PATH NULL
VARIABLE_NAME WSREP_MYSQL_REPLICATION_BUNDLE
SESSION_VALUE NULL
GLOBAL_VALUE 0
@@ -309,6 +345,7 @@ NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
+GLOBAL_VALUE_PATH NULL
VARIABLE_NAME WSREP_NODE_ADDRESS
SESSION_VALUE NULL
GLOBAL_VALUE
@@ -323,6 +360,7 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
+GLOBAL_VALUE_PATH NULL
VARIABLE_NAME WSREP_NODE_INCOMING_ADDRESS
SESSION_VALUE NULL
GLOBAL_VALUE AUTO
@@ -337,6 +375,7 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
+GLOBAL_VALUE_PATH NULL
VARIABLE_NAME WSREP_NODE_NAME
SESSION_VALUE NULL
GLOBAL_VALUE HOSTNAME
@@ -351,6 +390,7 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
+GLOBAL_VALUE_PATH NULL
VARIABLE_NAME WSREP_NOTIFY_CMD
SESSION_VALUE NULL
GLOBAL_VALUE
@@ -365,6 +405,7 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
+GLOBAL_VALUE_PATH NULL
VARIABLE_NAME WSREP_ON
SESSION_VALUE OFF
GLOBAL_VALUE OFF
@@ -379,6 +420,7 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
+GLOBAL_VALUE_PATH NULL
VARIABLE_NAME WSREP_OSU_METHOD
SESSION_VALUE TOI
GLOBAL_VALUE TOI
@@ -393,6 +435,7 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST TOI,RSU
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
+GLOBAL_VALUE_PATH NULL
VARIABLE_NAME WSREP_PATCH_VERSION
SESSION_VALUE NULL
GLOBAL_VALUE wsrep_MAJVER.MINVER
@@ -407,6 +450,7 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT NULL
+GLOBAL_VALUE_PATH NULL
VARIABLE_NAME WSREP_PROVIDER
SESSION_VALUE NULL
GLOBAL_VALUE none
@@ -421,6 +465,7 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
+GLOBAL_VALUE_PATH NULL
VARIABLE_NAME WSREP_PROVIDER_OPTIONS
SESSION_VALUE NULL
GLOBAL_VALUE
@@ -435,6 +480,7 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
+GLOBAL_VALUE_PATH NULL
VARIABLE_NAME WSREP_RECOVER
SESSION_VALUE NULL
GLOBAL_VALUE OFF
@@ -449,6 +495,7 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST OFF,ON
READ_ONLY YES
COMMAND_LINE_ARGUMENT OPTIONAL
+GLOBAL_VALUE_PATH NULL
VARIABLE_NAME WSREP_REJECT_QUERIES
SESSION_VALUE NULL
GLOBAL_VALUE NONE
@@ -463,6 +510,7 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NONE,ALL,ALL_KILL
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
+GLOBAL_VALUE_PATH NULL
VARIABLE_NAME WSREP_REPLICATE_MYISAM
SESSION_VALUE NULL
GLOBAL_VALUE OFF
@@ -477,6 +525,7 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
+GLOBAL_VALUE_PATH NULL
VARIABLE_NAME WSREP_RESTART_SLAVE
SESSION_VALUE NULL
GLOBAL_VALUE OFF
@@ -491,6 +540,7 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
+GLOBAL_VALUE_PATH NULL
VARIABLE_NAME WSREP_RETRY_AUTOCOMMIT
SESSION_VALUE 1
GLOBAL_VALUE 1
@@ -505,6 +555,7 @@ NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
+GLOBAL_VALUE_PATH NULL
VARIABLE_NAME WSREP_SLAVE_FK_CHECKS
SESSION_VALUE NULL
GLOBAL_VALUE ON
@@ -519,6 +570,7 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
+GLOBAL_VALUE_PATH NULL
VARIABLE_NAME WSREP_SLAVE_THREADS
SESSION_VALUE NULL
GLOBAL_VALUE 1
@@ -533,6 +585,7 @@ NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
+GLOBAL_VALUE_PATH NULL
VARIABLE_NAME WSREP_SLAVE_UK_CHECKS
SESSION_VALUE NULL
GLOBAL_VALUE OFF
@@ -547,6 +600,7 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
+GLOBAL_VALUE_PATH NULL
VARIABLE_NAME WSREP_SR_STORE
SESSION_VALUE NULL
GLOBAL_VALUE table
@@ -561,6 +615,7 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST none,table
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
+GLOBAL_VALUE_PATH NULL
VARIABLE_NAME WSREP_SST_AUTH
SESSION_VALUE NULL
GLOBAL_VALUE
@@ -575,6 +630,7 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
+GLOBAL_VALUE_PATH NULL
VARIABLE_NAME WSREP_SST_DONOR
SESSION_VALUE NULL
GLOBAL_VALUE
@@ -589,6 +645,7 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
+GLOBAL_VALUE_PATH NULL
VARIABLE_NAME WSREP_SST_DONOR_REJECTS_QUERIES
SESSION_VALUE NULL
GLOBAL_VALUE OFF
@@ -603,6 +660,7 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
+GLOBAL_VALUE_PATH NULL
VARIABLE_NAME WSREP_SST_METHOD
SESSION_VALUE NULL
GLOBAL_VALUE rsync
@@ -617,6 +675,7 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
+GLOBAL_VALUE_PATH NULL
VARIABLE_NAME WSREP_SST_RECEIVE_ADDRESS
SESSION_VALUE NULL
GLOBAL_VALUE AUTO
@@ -631,6 +690,7 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
+GLOBAL_VALUE_PATH NULL
VARIABLE_NAME WSREP_START_POSITION
SESSION_VALUE NULL
GLOBAL_VALUE 00000000-0000-0000-0000-000000000000:-1
@@ -645,6 +705,22 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
+GLOBAL_VALUE_PATH NULL
+VARIABLE_NAME WSREP_STRICT_DDL
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT If set, reject DDL on affected tables not supporting Galera replication
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+GLOBAL_VALUE_PATH NULL
VARIABLE_NAME WSREP_SYNC_WAIT
SESSION_VALUE 0
GLOBAL_VALUE 0
@@ -659,6 +735,7 @@ NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
+GLOBAL_VALUE_PATH NULL
VARIABLE_NAME WSREP_TRX_FRAGMENT_SIZE
SESSION_VALUE 0
GLOBAL_VALUE 0
@@ -673,6 +750,7 @@ NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
+GLOBAL_VALUE_PATH NULL
VARIABLE_NAME WSREP_TRX_FRAGMENT_UNIT
SESSION_VALUE bytes
GLOBAL_VALUE bytes
@@ -687,3 +765,4 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST bytes,rows,statements
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
+GLOBAL_VALUE_PATH NULL
diff --git a/mysql-test/suite/sys_vars/r/thread_concurrency_basic.result b/mysql-test/suite/sys_vars/r/thread_concurrency_basic.result
deleted file mode 100644
index ea8c0168212..00000000000
--- a/mysql-test/suite/sys_vars/r/thread_concurrency_basic.result
+++ /dev/null
@@ -1,21 +0,0 @@
-select @@global.thread_concurrency;
-@@global.thread_concurrency
-10
-select @@session.thread_concurrency;
-ERROR HY000: Variable 'thread_concurrency' is a GLOBAL variable
-show global variables like 'thread_concurrency';
-Variable_name Value
-thread_concurrency 10
-show session variables like 'thread_concurrency';
-Variable_name Value
-thread_concurrency 10
-select * from information_schema.global_variables where variable_name='thread_concurrency';
-VARIABLE_NAME VARIABLE_VALUE
-THREAD_CONCURRENCY 10
-select * from information_schema.session_variables where variable_name='thread_concurrency';
-VARIABLE_NAME VARIABLE_VALUE
-THREAD_CONCURRENCY 10
-set global thread_concurrency=1;
-ERROR HY000: Variable 'thread_concurrency' is a read only variable
-set session thread_concurrency=1;
-ERROR HY000: Variable 'thread_concurrency' is a read only variable
diff --git a/mysql-test/suite/sys_vars/r/thread_pool_idle_timeout_grant.result b/mysql-test/suite/sys_vars/r/thread_pool_idle_timeout_grant.result
new file mode 100644
index 00000000000..f9e14eaff0e
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/thread_pool_idle_timeout_grant.result
@@ -0,0 +1,46 @@
+SET @global=@@global.thread_pool_idle_timeout;
+#
+# MDEV-21961 Bind CONNECTION ADMIN to a number of global system variables
+#
+# Test that "SET thread_pool_idle_timeout" is not allowed without CONNECTION ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE CONNECTION ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL thread_pool_idle_timeout=10;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, CONNECTION ADMIN privilege(s) for this operation
+SET thread_pool_idle_timeout=10;
+ERROR HY000: Variable 'thread_pool_idle_timeout' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION thread_pool_idle_timeout=10;
+ERROR HY000: Variable 'thread_pool_idle_timeout' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET thread_pool_idle_timeout" is allowed with CONNECTION ADMIN
+CREATE USER user1@localhost;
+GRANT CONNECTION ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL thread_pool_idle_timeout=10;
+SET thread_pool_idle_timeout=10;
+ERROR HY000: Variable 'thread_pool_idle_timeout' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION thread_pool_idle_timeout=10;
+ERROR HY000: Variable 'thread_pool_idle_timeout' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET thread_pool_idle_timeout" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL thread_pool_idle_timeout=10;
+SET thread_pool_idle_timeout=10;
+ERROR HY000: Variable 'thread_pool_idle_timeout' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION thread_pool_idle_timeout=10;
+ERROR HY000: Variable 'thread_pool_idle_timeout' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@global.thread_pool_idle_timeout=@global;
diff --git a/mysql-test/suite/sys_vars/r/thread_pool_max_threads_grant.result b/mysql-test/suite/sys_vars/r/thread_pool_max_threads_grant.result
new file mode 100644
index 00000000000..17511766787
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/thread_pool_max_threads_grant.result
@@ -0,0 +1,46 @@
+SET @global=@@global.thread_pool_max_threads;
+#
+# MDEV-21961 Bind CONNECTION ADMIN to a number of global system variables
+#
+# Test that "SET thread_pool_max_threads" is not allowed without CONNECTION ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE CONNECTION ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL thread_pool_max_threads=10;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, CONNECTION ADMIN privilege(s) for this operation
+SET thread_pool_max_threads=10;
+ERROR HY000: Variable 'thread_pool_max_threads' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION thread_pool_max_threads=10;
+ERROR HY000: Variable 'thread_pool_max_threads' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET thread_pool_max_threads" is allowed with CONNECTION ADMIN
+CREATE USER user1@localhost;
+GRANT CONNECTION ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL thread_pool_max_threads=10;
+SET thread_pool_max_threads=10;
+ERROR HY000: Variable 'thread_pool_max_threads' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION thread_pool_max_threads=10;
+ERROR HY000: Variable 'thread_pool_max_threads' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET thread_pool_max_threads" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL thread_pool_max_threads=10;
+SET thread_pool_max_threads=10;
+ERROR HY000: Variable 'thread_pool_max_threads' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION thread_pool_max_threads=10;
+ERROR HY000: Variable 'thread_pool_max_threads' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@global.thread_pool_max_threads=@global;
diff --git a/mysql-test/suite/sys_vars/r/thread_pool_oversubscribe_grant.result b/mysql-test/suite/sys_vars/r/thread_pool_oversubscribe_grant.result
new file mode 100644
index 00000000000..965be157f02
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/thread_pool_oversubscribe_grant.result
@@ -0,0 +1,46 @@
+SET @global=@@global.thread_pool_oversubscribe;
+#
+# MDEV-21961 Bind CONNECTION ADMIN to a number of global system variables
+#
+# Test that "SET thread_pool_oversubscribe" is not allowed without CONNECTION ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE CONNECTION ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL thread_pool_oversubscribe=10;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, CONNECTION ADMIN privilege(s) for this operation
+SET thread_pool_oversubscribe=10;
+ERROR HY000: Variable 'thread_pool_oversubscribe' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION thread_pool_oversubscribe=10;
+ERROR HY000: Variable 'thread_pool_oversubscribe' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET thread_pool_oversubscribe" is allowed with CONNECTION ADMIN
+CREATE USER user1@localhost;
+GRANT CONNECTION ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL thread_pool_oversubscribe=10;
+SET thread_pool_oversubscribe=10;
+ERROR HY000: Variable 'thread_pool_oversubscribe' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION thread_pool_oversubscribe=10;
+ERROR HY000: Variable 'thread_pool_oversubscribe' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET thread_pool_oversubscribe" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL thread_pool_oversubscribe=10;
+SET thread_pool_oversubscribe=10;
+ERROR HY000: Variable 'thread_pool_oversubscribe' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION thread_pool_oversubscribe=10;
+ERROR HY000: Variable 'thread_pool_oversubscribe' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@global.thread_pool_oversubscribe=@global;
diff --git a/mysql-test/suite/sys_vars/r/thread_pool_stall_limit_basic.result b/mysql-test/suite/sys_vars/r/thread_pool_stall_limit_basic.result
index eda4e6baebe..0a4d8dea6d2 100644
--- a/mysql-test/suite/sys_vars/r/thread_pool_stall_limit_basic.result
+++ b/mysql-test/suite/sys_vars/r/thread_pool_stall_limit_basic.result
@@ -37,7 +37,7 @@ Warnings:
Warning 1292 Truncated incorrect thread_pool_stall_limit value: '-1'
select @@global.thread_pool_stall_limit;
@@global.thread_pool_stall_limit
-10
+1
set global thread_pool_stall_limit=10000000000;
Warnings:
Warning 1292 Truncated incorrect thread_pool_stall_limit value: '10000000000'
diff --git a/mysql-test/suite/sys_vars/r/thread_pool_stall_limit_grant.result b/mysql-test/suite/sys_vars/r/thread_pool_stall_limit_grant.result
new file mode 100644
index 00000000000..08462dc4733
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/thread_pool_stall_limit_grant.result
@@ -0,0 +1,46 @@
+SET @global=@@global.thread_pool_stall_limit;
+#
+# MDEV-21961 Bind CONNECTION ADMIN to a number of global system variables
+#
+# Test that "SET thread_pool_stall_limit" is not allowed without CONNECTION ADMIN or SUPER
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE CONNECTION ADMIN, SUPER ON *.* FROM user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL thread_pool_stall_limit=400;
+ERROR 42000: Access denied; you need (at least one of) the SUPER, CONNECTION ADMIN privilege(s) for this operation
+SET thread_pool_stall_limit=400;
+ERROR HY000: Variable 'thread_pool_stall_limit' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION thread_pool_stall_limit=400;
+ERROR HY000: Variable 'thread_pool_stall_limit' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET thread_pool_stall_limit" is allowed with CONNECTION ADMIN
+CREATE USER user1@localhost;
+GRANT CONNECTION ADMIN ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL thread_pool_stall_limit=400;
+SET thread_pool_stall_limit=400;
+ERROR HY000: Variable 'thread_pool_stall_limit' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION thread_pool_stall_limit=400;
+ERROR HY000: Variable 'thread_pool_stall_limit' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+# Test that "SET thread_pool_stall_limit" is allowed with SUPER
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+connect user1,localhost,user1,,;
+connection user1;
+SET GLOBAL thread_pool_stall_limit=400;
+SET thread_pool_stall_limit=400;
+ERROR HY000: Variable 'thread_pool_stall_limit' is a GLOBAL variable and should be set with SET GLOBAL
+SET SESSION thread_pool_stall_limit=400;
+ERROR HY000: Variable 'thread_pool_stall_limit' is a GLOBAL variable and should be set with SET GLOBAL
+disconnect user1;
+connection default;
+DROP USER user1@localhost;
+SET @@global.thread_pool_stall_limit=@global;
diff --git a/mysql-test/suite/sys_vars/r/timed_mutexes_basic.result b/mysql-test/suite/sys_vars/r/timed_mutexes_basic.result
deleted file mode 100644
index 715c105fa46..00000000000
--- a/mysql-test/suite/sys_vars/r/timed_mutexes_basic.result
+++ /dev/null
@@ -1,124 +0,0 @@
-SET @global_start_value = @@global.timed_mutexes;
-SELECT @global_start_value;
-@global_start_value
-0
-'#--------------------FN_DYNVARS_177_01------------------------#'
-SET @@global.timed_mutexes = 1;
-Warnings:
-Warning 1287 '@@timed_mutexes' is deprecated and will be removed in a future release
-SET @@global.timed_mutexes = DEFAULT;
-Warnings:
-Warning 1287 '@@timed_mutexes' is deprecated and will be removed in a future release
-SELECT @@global.timed_mutexes;
-@@global.timed_mutexes
-0
-'#---------------------FN_DYNVARS_177_02-------------------------#'
-SET timed_mutexes = 1;
-ERROR HY000: Variable 'timed_mutexes' is a GLOBAL variable and should be set with SET GLOBAL
-SELECT @@timed_mutexes;
-@@timed_mutexes
-0
-SELECT global.timed_mutexes;
-ERROR 42S02: Unknown table 'global' in field list
-SET global timed_mutexes = 1;
-Warnings:
-Warning 1287 '@@timed_mutexes' is deprecated and will be removed in a future release
-SELECT @@global.timed_mutexes;
-@@global.timed_mutexes
-1
-'#--------------------FN_DYNVARS_177_03------------------------#'
-SET @@global.timed_mutexes = 0;
-Warnings:
-Warning 1287 '@@timed_mutexes' is deprecated and will be removed in a future release
-SELECT @@global.timed_mutexes;
-@@global.timed_mutexes
-0
-SET @@global.timed_mutexes = 1;
-Warnings:
-Warning 1287 '@@timed_mutexes' is deprecated and will be removed in a future release
-SELECT @@global.timed_mutexes;
-@@global.timed_mutexes
-1
-'#--------------------FN_DYNVARS_177_04-------------------------#'
-SET @@global.timed_mutexes = -1;
-ERROR 42000: Variable 'timed_mutexes' can't be set to the value of '-1'
-SET @@global.timed_mutexes = 2;
-ERROR 42000: Variable 'timed_mutexes' can't be set to the value of '2'
-SET @@global.timed_mutexes = "T";
-ERROR 42000: Variable 'timed_mutexes' can't be set to the value of 'T'
-SET @@global.timed_mutexes = "Y";
-ERROR 42000: Variable 'timed_mutexes' can't be set to the value of 'Y'
-SET @@global.timed_mutexes = _true;
-ERROR 42000: Variable 'timed_mutexes' can't be set to the value of '_true'
-SET @@global.timed_mutexes = 0N;
-ERROR 42000: Variable 'timed_mutexes' can't be set to the value of '0N'
-SET @@global.timed_mutexes = 1+1;
-ERROR 42000: Variable 'timed_mutexes' can't be set to the value of '2'
-SET @@global.timed_mutexes = 0FF;
-ERROR 42000: Variable 'timed_mutexes' can't be set to the value of '0FF'
-SET @@global.timed_mutexes = '0';
-ERROR 42000: Variable 'timed_mutexes' can't be set to the value of '0'
-SET @@global.timed_mutexes = N;
-ERROR 42000: Variable 'timed_mutexes' can't be set to the value of 'N'
-'#-------------------FN_DYNVARS_177_05----------------------------#'
-SET @@session.timed_mutexes = 0;
-ERROR HY000: Variable 'timed_mutexes' is a GLOBAL variable and should be set with SET GLOBAL
-SET @@timed_mutexes = 0;
-ERROR HY000: Variable 'timed_mutexes' is a GLOBAL variable and should be set with SET GLOBAL
-SET @@local.timed_mutexes = 0;
-ERROR HY000: Variable 'timed_mutexes' is a GLOBAL variable and should be set with SET GLOBAL
-SELECT @@session.timed_mutexes;
-ERROR HY000: Variable 'timed_mutexes' is a GLOBAL variable
-SELECT @@local.timed_mutexes;
-ERROR HY000: Variable 'timed_mutexes' is a GLOBAL variable
-'#----------------------FN_DYNVARS_177_06------------------------#'
-SELECT count(VARIABLE_VALUE) FROM INFORMATION_SCHEMA.SESSION_VARIABLES
-WHERE VARIABLE_NAME='timed_mutexes';
-count(VARIABLE_VALUE)
-1
-'#----------------------FN_DYNVARS_177_07------------------------#'
-SELECT IF(@@global.timed_mutexes, "ON", "OFF") = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='timed_mutexes';
-IF(@@global.timed_mutexes, "ON", "OFF") = VARIABLE_VALUE
-1
-SELECT @@global.timed_mutexes;
-@@global.timed_mutexes
-1
-SELECT VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='timed_mutexes';
-VARIABLE_VALUE
-ON
-'#---------------------FN_DYNVARS_177_08-------------------------#'
-SET @@global.timed_mutexes = OFF;
-Warnings:
-Warning 1287 '@@timed_mutexes' is deprecated and will be removed in a future release
-SELECT @@global.timed_mutexes;
-@@global.timed_mutexes
-0
-SET @@global.timed_mutexes = ON;
-Warnings:
-Warning 1287 '@@timed_mutexes' is deprecated and will be removed in a future release
-SELECT @@global.timed_mutexes;
-@@global.timed_mutexes
-1
-'#---------------------FN_DYNVARS_177_09----------------------#'
-SET @@global.timed_mutexes = TRUE;
-Warnings:
-Warning 1287 '@@timed_mutexes' is deprecated and will be removed in a future release
-SELECT @@global.timed_mutexes;
-@@global.timed_mutexes
-1
-SET @@global.timed_mutexes = FALSE;
-Warnings:
-Warning 1287 '@@timed_mutexes' is deprecated and will be removed in a future release
-SELECT @@global.timed_mutexes;
-@@global.timed_mutexes
-0
-SET @@global.timed_mutexes = @global_start_value;
-Warnings:
-Warning 1287 '@@timed_mutexes' is deprecated and will be removed in a future release
-SELECT @@global.timed_mutexes;
-@@global.timed_mutexes
-0
diff --git a/mysql-test/suite/sys_vars/r/tmp_disk_table_size_func.result b/mysql-test/suite/sys_vars/r/tmp_disk_table_size_func.result
index bc2301cfd39..7b26106384b 100644
--- a/mysql-test/suite/sys_vars/r/tmp_disk_table_size_func.result
+++ b/mysql-test/suite/sys_vars/r/tmp_disk_table_size_func.result
@@ -4,8 +4,6 @@
SET @start_tmp_memory_table_size=@@session.tmp_memory_table_size;
SET @start_tmp_disk_table_size=@@session.tmp_disk_table_size;
set @@session.tmp_memory_table_size=1000;
-Warnings:
-Warning 1292 Truncated incorrect tmp_memory_table_size value: '1000'
set @@session.tmp_disk_table_size=3000000;
create table t1 (a int primary key, b varchar(2000));
insert into t1 select seq,repeat(char(mod(seq,62)+64),seq) from seq_1_to_2000;
diff --git a/mysql-test/suite/sys_vars/r/tmp_memory_table_size_basic.result b/mysql-test/suite/sys_vars/r/tmp_memory_table_size_basic.result
deleted file mode 100644
index dddba1a6dfe..00000000000
--- a/mysql-test/suite/sys_vars/r/tmp_memory_table_size_basic.result
+++ /dev/null
@@ -1,165 +0,0 @@
-SET @start_global_value = @@global.tmp_memory_table_size;
-SET @start_session_value = @@session.tmp_memory_table_size;
-'#--------------------FN_DYNVARS_005_01-------------------------#'
-SET @@global.tmp_memory_table_size = 10000;
-SELECT @@global.tmp_memory_table_size;
-@@global.tmp_memory_table_size
-10000
-SET @@global.tmp_memory_table_size = DEFAULT;
-SELECT @@global.tmp_memory_table_size;
-@@global.tmp_memory_table_size
-16777216
-SET @@session.tmp_memory_table_size = 20000;
-SELECT @@session.tmp_memory_table_size;
-@@session.tmp_memory_table_size
-20000
-SET @@session.tmp_memory_table_size = DEFAULT;
-SELECT @@session.tmp_memory_table_size;
-@@session.tmp_memory_table_size
-16777216
-'#--------------------FN_DYNVARS_005_02-------------------------#'
-SELECT @@global.tmp_memory_table_size >= 16777216;
-@@global.tmp_memory_table_size >= 16777216
-1
-SELECT @@session.tmp_memory_table_size >= 16777216;
-@@session.tmp_memory_table_size >= 16777216
-1
-'#--------------------FN_DYNVARS_005_03-------------------------#'
-SET @@global.tmp_memory_table_size = 1024;
-SELECT @@global.tmp_memory_table_size;
-@@global.tmp_memory_table_size
-1024
-SET @@global.tmp_memory_table_size = 60020;
-SELECT @@global.tmp_memory_table_size;
-@@global.tmp_memory_table_size
-60020
-SET @@global.tmp_memory_table_size = 4294967295;
-SELECT @@global.tmp_memory_table_size;
-@@global.tmp_memory_table_size
-4294967295
-'#--------------------FN_DYNVARS_005_04-------------------------#'
-SET @@session.tmp_memory_table_size = 1024;
-SELECT @@session.tmp_memory_table_size;
-@@session.tmp_memory_table_size
-1024
-SET @@session.tmp_memory_table_size = 4294967295;
-SELECT @@session.tmp_memory_table_size;
-@@session.tmp_memory_table_size
-4294967295
-SET @@session.tmp_memory_table_size = 65535;
-SELECT @@session.tmp_memory_table_size;
-@@session.tmp_memory_table_size
-65535
-'#------------------FN_DYNVARS_005_05-----------------------#'
-SET @@global.tmp_memory_table_size = 0;
-Warnings:
-Warning 1292 Truncated incorrect tmp_memory_table_size value: '0'
-SELECT @@global.tmp_memory_table_size;
-@@global.tmp_memory_table_size
-1024
-SET @@global.tmp_memory_table_size = -1024;
-Warnings:
-Warning 1292 Truncated incorrect tmp_memory_table_size value: '-1024'
-SELECT @@global.tmp_memory_table_size;
-@@global.tmp_memory_table_size
-1024
-SET @@global.tmp_memory_table_size = 1000;
-Warnings:
-Warning 1292 Truncated incorrect tmp_memory_table_size value: '1000'
-SELECT @@global.tmp_memory_table_size;
-@@global.tmp_memory_table_size
-1024
-SET @@global.tmp_memory_table_size = ON;
-ERROR 42000: Incorrect argument type to variable 'tmp_memory_table_size'
-SET @@global.tmp_memory_table_size = OFF;
-ERROR 42000: Incorrect argument type to variable 'tmp_memory_table_size'
-SET @@global.tmp_memory_table_size = True;
-Warnings:
-Warning 1292 Truncated incorrect tmp_memory_table_size value: '1'
-SELECT @@global.tmp_memory_table_size;
-@@global.tmp_memory_table_size
-1024
-SET @@global.tmp_memory_table_size = False;
-Warnings:
-Warning 1292 Truncated incorrect tmp_memory_table_size value: '0'
-SELECT @@global.tmp_memory_table_size;
-@@global.tmp_memory_table_size
-1024
-SET @@global.tmp_memory_table_size = 65530.34;
-ERROR 42000: Incorrect argument type to variable 'tmp_memory_table_size'
-SET @@global.tmp_memory_table_size ="Test";
-ERROR 42000: Incorrect argument type to variable 'tmp_memory_table_size'
-SET @@session.tmp_memory_table_size = ON;
-ERROR 42000: Incorrect argument type to variable 'tmp_memory_table_size'
-SET @@session.tmp_memory_table_size = OFF;
-ERROR 42000: Incorrect argument type to variable 'tmp_memory_table_size'
-SET @@session.tmp_memory_table_size = True;
-Warnings:
-Warning 1292 Truncated incorrect tmp_memory_table_size value: '1'
-SELECT @@session.tmp_memory_table_size;
-@@session.tmp_memory_table_size
-1024
-SET @@session.tmp_memory_table_size = False;
-Warnings:
-Warning 1292 Truncated incorrect tmp_memory_table_size value: '0'
-SELECT @@session.tmp_memory_table_size;
-@@session.tmp_memory_table_size
-1024
-SET @@session.tmp_memory_table_size = "Test";
-ERROR 42000: Incorrect argument type to variable 'tmp_memory_table_size'
-SET @@session.tmp_memory_table_size = 12345678901;
-SELECT @@session.tmp_memory_table_size IN (12345678901,4294967295);
-@@session.tmp_memory_table_size IN (12345678901,4294967295)
-1
-'#------------------FN_DYNVARS_005_06-----------------------#'
-SELECT @@global.tmp_memory_table_size = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='tmp_memory_table_size';
-@@global.tmp_memory_table_size = VARIABLE_VALUE
-1
-'#------------------FN_DYNVARS_005_07-----------------------#'
-SELECT @@session.tmp_memory_table_size = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.SESSION_VARIABLES
-WHERE VARIABLE_NAME='tmp_memory_table_size';
-@@session.tmp_memory_table_size = VARIABLE_VALUE
-1
-'#---------------------FN_DYNVARS_001_09----------------------#'
-SET @@global.tmp_memory_table_size = 1024;
-SET @@tmp_memory_table_size = 4294967295;
-SELECT @@tmp_memory_table_size = @@global.tmp_memory_table_size;
-@@tmp_memory_table_size = @@global.tmp_memory_table_size
-0
-'#---------------------FN_DYNVARS_001_10----------------------#'
-SET @@tmp_memory_table_size = 100;
-Warnings:
-Warning 1292 Truncated incorrect tmp_memory_table_size value: '100'
-SELECT @@tmp_memory_table_size = @@local.tmp_memory_table_size;
-@@tmp_memory_table_size = @@local.tmp_memory_table_size
-1
-SELECT @@local.tmp_memory_table_size = @@session.tmp_memory_table_size;
-@@local.tmp_memory_table_size = @@session.tmp_memory_table_size
-1
-'#---------------------FN_DYNVARS_001_11----------------------#'
-SET tmp_memory_table_size = 1027;
-SELECT @@tmp_memory_table_size;
-@@tmp_memory_table_size
-1027
-SELECT local.tmp_memory_table_size;
-ERROR 42S02: Unknown table 'local' in field list
-SELECT global.tmp_memory_table_size;
-ERROR 42S02: Unknown table 'global' in field list
-SELECT tmp_memory_table_size = @@session.tmp_memory_table_size;
-ERROR 42S22: Unknown column 'tmp_memory_table_size' in 'field list'
-
-"Check that tmp_memory_table_size and tmp_table_size are the same"
-
-set @@session.tmp_memory_table_size=100000;
-select @@session.tmp_memory_table_size,@@session.tmp_table_size;
-@@session.tmp_memory_table_size @@session.tmp_table_size
-100000 100000
-set @@session.tmp_memory_table_size=200000;
-select @@session.tmp_memory_table_size,@@session.tmp_table_size;
-@@session.tmp_memory_table_size @@session.tmp_table_size
-200000 200000
-SET @@global.tmp_memory_table_size = @start_global_value;
-SET @@session.tmp_memory_table_size = @start_session_value;
diff --git a/mysql-test/suite/sys_vars/r/tmp_table_size_basic.result b/mysql-test/suite/sys_vars/r/tmp_table_size_basic.result
deleted file mode 100644
index 06b624ad5c8..00000000000
--- a/mysql-test/suite/sys_vars/r/tmp_table_size_basic.result
+++ /dev/null
@@ -1,146 +0,0 @@
-SET @start_global_value = @@global.tmp_table_size;
-SET @start_session_value = @@session.tmp_table_size;
-'#--------------------FN_DYNVARS_005_01-------------------------#'
-SET @@global.tmp_table_size = 100;
-Warnings:
-Warning 1292 Truncated incorrect tmp_table_size value: '100'
-SET @@global.tmp_table_size = DEFAULT;
-SET @@session.tmp_table_size = 200;
-Warnings:
-Warning 1292 Truncated incorrect tmp_table_size value: '200'
-SET @@session.tmp_table_size = DEFAULT;
-'#--------------------FN_DYNVARS_005_02-------------------------#'
-SELECT @@global.tmp_table_size >= 16777216;
-@@global.tmp_table_size >= 16777216
-1
-SELECT @@session.tmp_table_size >= 16777216;
-@@session.tmp_table_size >= 16777216
-1
-'#--------------------FN_DYNVARS_005_03-------------------------#'
-SET @@global.tmp_table_size = 1024;
-SELECT @@global.tmp_table_size;
-@@global.tmp_table_size
-1024
-SET @@global.tmp_table_size = 60020;
-SELECT @@global.tmp_table_size;
-@@global.tmp_table_size
-60020
-SET @@global.tmp_table_size = 4294967295;
-SELECT @@global.tmp_table_size;
-@@global.tmp_table_size
-4294967295
-'#--------------------FN_DYNVARS_005_04-------------------------#'
-SET @@session.tmp_table_size = 1024;
-SELECT @@session.tmp_table_size;
-@@session.tmp_table_size
-1024
-SET @@session.tmp_table_size = 4294967295;
-SELECT @@session.tmp_table_size;
-@@session.tmp_table_size
-4294967295
-SET @@session.tmp_table_size = 65535;
-SELECT @@session.tmp_table_size;
-@@session.tmp_table_size
-65535
-'#------------------FN_DYNVARS_005_05-----------------------#'
-SET @@global.tmp_table_size = 0;
-Warnings:
-Warning 1292 Truncated incorrect tmp_table_size value: '0'
-SELECT @@global.tmp_table_size;
-@@global.tmp_table_size
-1024
-SET @@global.tmp_table_size = -1024;
-Warnings:
-Warning 1292 Truncated incorrect tmp_table_size value: '-1024'
-SELECT @@global.tmp_table_size;
-@@global.tmp_table_size
-1024
-SET @@global.tmp_table_size = 1000;
-Warnings:
-Warning 1292 Truncated incorrect tmp_table_size value: '1000'
-SELECT @@global.tmp_table_size;
-@@global.tmp_table_size
-1024
-SET @@global.tmp_table_size = ON;
-ERROR 42000: Incorrect argument type to variable 'tmp_table_size'
-SET @@global.tmp_table_size = OFF;
-ERROR 42000: Incorrect argument type to variable 'tmp_table_size'
-SET @@global.tmp_table_size = True;
-Warnings:
-Warning 1292 Truncated incorrect tmp_table_size value: '1'
-SELECT @@global.tmp_table_size;
-@@global.tmp_table_size
-1024
-SET @@global.tmp_table_size = False;
-Warnings:
-Warning 1292 Truncated incorrect tmp_table_size value: '0'
-SELECT @@global.tmp_table_size;
-@@global.tmp_table_size
-1024
-SET @@global.tmp_table_size = 65530.34;
-ERROR 42000: Incorrect argument type to variable 'tmp_table_size'
-SET @@global.tmp_table_size ="Test";
-ERROR 42000: Incorrect argument type to variable 'tmp_table_size'
-SET @@session.tmp_table_size = ON;
-ERROR 42000: Incorrect argument type to variable 'tmp_table_size'
-SET @@session.tmp_table_size = OFF;
-ERROR 42000: Incorrect argument type to variable 'tmp_table_size'
-SET @@session.tmp_table_size = True;
-Warnings:
-Warning 1292 Truncated incorrect tmp_table_size value: '1'
-SELECT @@session.tmp_table_size;
-@@session.tmp_table_size
-1024
-SET @@session.tmp_table_size = False;
-Warnings:
-Warning 1292 Truncated incorrect tmp_table_size value: '0'
-SELECT @@session.tmp_table_size;
-@@session.tmp_table_size
-1024
-SET @@session.tmp_table_size = "Test";
-ERROR 42000: Incorrect argument type to variable 'tmp_table_size'
-SET @@session.tmp_table_size = 12345678901;
-SELECT @@session.tmp_table_size IN (12345678901,4294967295);
-@@session.tmp_table_size IN (12345678901,4294967295)
-1
-'#------------------FN_DYNVARS_005_06-----------------------#'
-SELECT @@global.tmp_table_size = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='tmp_table_size';
-@@global.tmp_table_size = VARIABLE_VALUE
-1
-'#------------------FN_DYNVARS_005_07-----------------------#'
-SELECT @@session.tmp_table_size = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.SESSION_VARIABLES
-WHERE VARIABLE_NAME='tmp_table_size';
-@@session.tmp_table_size = VARIABLE_VALUE
-1
-'#---------------------FN_DYNVARS_001_09----------------------#'
-SET @@global.tmp_table_size = 1024;
-SET @@tmp_table_size = 4294967295;
-SELECT @@tmp_table_size = @@global.tmp_table_size;
-@@tmp_table_size = @@global.tmp_table_size
-0
-'#---------------------FN_DYNVARS_001_10----------------------#'
-SET @@tmp_table_size = 100;
-Warnings:
-Warning 1292 Truncated incorrect tmp_table_size value: '100'
-SELECT @@tmp_table_size = @@local.tmp_table_size;
-@@tmp_table_size = @@local.tmp_table_size
-1
-SELECT @@local.tmp_table_size = @@session.tmp_table_size;
-@@local.tmp_table_size = @@session.tmp_table_size
-1
-'#---------------------FN_DYNVARS_001_11----------------------#'
-SET tmp_table_size = 1027;
-SELECT @@tmp_table_size;
-@@tmp_table_size
-1027
-SELECT local.tmp_table_size;
-ERROR 42S02: Unknown table 'local' in field list
-SELECT global.tmp_table_size;
-ERROR 42S02: Unknown table 'global' in field list
-SELECT tmp_table_size = @@session.tmp_table_size;
-ERROR 42S22: Unknown column 'tmp_table_size' in 'field list'
-SET @@global.tmp_table_size = @start_global_value;
-SET @@session.tmp_table_size = @start_session_value;
diff --git a/mysql-test/suite/sys_vars/r/wsrep_strict_ddl_basic.result b/mysql-test/suite/sys_vars/r/wsrep_strict_ddl_basic.result
new file mode 100644
index 00000000000..6d686f9de2e
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/wsrep_strict_ddl_basic.result
@@ -0,0 +1,45 @@
+#
+# wsrep_strict_ddl
+#
+# save the initial value
+SET @wsrep_strict_ddl_global_saved = @@global.wsrep_strict_ddl;
+# default
+SELECT @@global.wsrep_strict_ddl;
+@@global.wsrep_strict_ddl
+0
+
+# scope
+SELECT @@session.wsrep_strict_ddl;
+ERROR HY000: Variable 'wsrep_strict_ddl' is a GLOBAL variable
+SET @@global.wsrep_strict_ddl=OFF;
+SELECT @@global.wsrep_strict_ddl;
+@@global.wsrep_strict_ddl
+0
+SET @@global.wsrep_strict_ddl=ON;
+SELECT @@global.wsrep_strict_ddl;
+@@global.wsrep_strict_ddl
+1
+
+# valid values
+SET @@global.wsrep_strict_ddl='OFF';
+SELECT @@global.wsrep_strict_ddl;
+@@global.wsrep_strict_ddl
+0
+SET @@global.wsrep_strict_ddl=ON;
+SELECT @@global.wsrep_strict_ddl;
+@@global.wsrep_strict_ddl
+1
+SET @@global.wsrep_strict_ddl=default;
+SELECT @@global.wsrep_strict_ddl;
+@@global.wsrep_strict_ddl
+0
+
+# invalid values
+SET @@global.wsrep_strict_ddl=NULL;
+ERROR 42000: Variable 'wsrep_strict_ddl' can't be set to the value of 'NULL'
+SET @@global.wsrep_strict_ddl='junk';
+ERROR 42000: Variable 'wsrep_strict_ddl' can't be set to the value of 'junk'
+
+# restore the initial value
+SET @@global.wsrep_strict_ddl = @wsrep_strict_ddl_global_saved;
+# End of test
diff --git a/mysql-test/suite/sys_vars/t/all_vars.test b/mysql-test/suite/sys_vars/t/all_vars.test
index c0127e1ef12..06edc04d25c 100644
--- a/mysql-test/suite/sys_vars/t/all_vars.test
+++ b/mysql-test/suite/sys_vars/t/all_vars.test
@@ -1,5 +1,4 @@
--source include/not_embedded.inc
---source include/not_threadpool.inc
#
# load everything we want to include in the testing
diff --git a/mysql-test/suite/sys_vars/t/aria_sort_buffer_size_basic.test b/mysql-test/suite/sys_vars/t/aria_sort_buffer_size_basic.test
index 818d66328f8..aa748778402 100644
--- a/mysql-test/suite/sys_vars/t/aria_sort_buffer_size_basic.test
+++ b/mysql-test/suite/sys_vars/t/aria_sort_buffer_size_basic.test
@@ -1,5 +1,6 @@
# ulong session
--source include/have_maria.inc
+--source include/word_size.inc
SET @start_global_value = @@global.aria_sort_buffer_size;
diff --git a/mysql-test/suite/sys_vars/t/binlog_annotate_row_events_grant.test b/mysql-test/suite/sys_vars/t/binlog_annotate_row_events_grant.test
new file mode 100644
index 00000000000..d289267a031
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/binlog_annotate_row_events_grant.test
@@ -0,0 +1,9 @@
+--echo #
+--echo # MDEV-21971 Bind BINLOG ADMIN to binlog_annotate_row_events and binlog_row_image global and session variables
+--echo #
+
+--let var = binlog_annotate_row_events
+--let grant = BINLOG ADMIN
+--let value = 1
+
+--source suite/sys_vars/inc/sysvar_global_and_session_grant.inc
diff --git a/mysql-test/suite/sys_vars/t/binlog_cache_size_grant.test b/mysql-test/suite/sys_vars/t/binlog_cache_size_grant.test
new file mode 100644
index 00000000000..bad55766f6e
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/binlog_cache_size_grant.test
@@ -0,0 +1,9 @@
+--echo #
+--echo # MDEV-21963 Bind BINLOG ADMIN to a number of global system variables
+--echo #
+
+--let var = binlog_cache_size
+--let grant = BINLOG ADMIN
+--let value = 65536
+
+--source suite/sys_vars/inc/sysvar_global_grant.inc
diff --git a/mysql-test/suite/sys_vars/t/binlog_commit_wait_count_grant.test b/mysql-test/suite/sys_vars/t/binlog_commit_wait_count_grant.test
new file mode 100644
index 00000000000..5095747ddb1
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/binlog_commit_wait_count_grant.test
@@ -0,0 +1,9 @@
+--echo #
+--echo # MDEV-21963 Bind BINLOG ADMIN to a number of global system variables
+--echo #
+
+--let var = binlog_commit_wait_count
+--let grant = BINLOG ADMIN
+--let value = 65536
+
+--source suite/sys_vars/inc/sysvar_global_grant.inc
diff --git a/mysql-test/suite/sys_vars/t/binlog_commit_wait_usec_grant.test b/mysql-test/suite/sys_vars/t/binlog_commit_wait_usec_grant.test
new file mode 100644
index 00000000000..87a8cd20e20
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/binlog_commit_wait_usec_grant.test
@@ -0,0 +1,9 @@
+--echo #
+--echo # MDEV-21963 Bind BINLOG ADMIN to a number of global system variables
+--echo #
+
+--let var = binlog_commit_wait_usec
+--let grant = BINLOG ADMIN
+--let value = 65536
+
+--source suite/sys_vars/inc/sysvar_global_grant.inc
diff --git a/mysql-test/suite/sys_vars/t/binlog_direct_non_transactional_updates_grant.test b/mysql-test/suite/sys_vars/t/binlog_direct_non_transactional_updates_grant.test
new file mode 100644
index 00000000000..7de1a119308
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/binlog_direct_non_transactional_updates_grant.test
@@ -0,0 +1,56 @@
+source include/have_log_bin.inc;
+
+SET @global= @@global.binlog_direct_non_transactional_updates;
+SET @session= @@global.binlog_direct_non_transactional_updates;
+
+
+--echo #
+--echo #
+--echo #
+
+--echo # Test that "SET binlog_direct_non_transactional_updates" is not allowed without BINLOG ADMIN or SUPER
+
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE BINLOG ADMIN, SUPER ON *.* FROM user1@localhost;
+--connect(user1,localhost,user1,,)
+--connection user1
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+SET binlog_direct_non_transactional_updates=0;
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+SET GLOBAL binlog_direct_non_transactional_updates=0;
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+SET SESSION binlog_direct_non_transactional_updates=0;
+--disconnect user1
+--connection default
+DROP USER user1@localhost;
+
+--echo # Test that "SET binlog_direct_non_transactional_updates" is allowed with BINLOG ADMIN
+
+CREATE USER user1@localhost;
+GRANT BINLOG ADMIN ON *.* TO user1@localhost;
+--connect(user1,localhost,user1,,)
+--connection user1
+SET binlog_direct_non_transactional_updates=0;
+SET GLOBAL binlog_direct_non_transactional_updates=0;
+SET SESSION binlog_direct_non_transactional_updates=0;
+--disconnect user1
+--connection default
+DROP USER user1@localhost;
+
+--echo # Test that "SET binlog_direct_non_transactional_updates" is allowed with SUPER
+
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+--connect(user1,localhost,user1,,)
+--connection user1
+SET binlog_direct_non_transactional_updates=0;
+SET GLOBAL binlog_direct_non_transactional_updates=0;
+SET SESSION binlog_direct_non_transactional_updates=0;
+--disconnect user1
+--connection default
+DROP USER user1@localhost;
+
+
+SET GLOBAL binlog_direct_non_transactional_updates=@global;
+SET SESSION binlog_direct_non_transactional_updates=@session;
diff --git a/mysql-test/suite/sys_vars/t/binlog_file_cache_size_grant.test b/mysql-test/suite/sys_vars/t/binlog_file_cache_size_grant.test
new file mode 100644
index 00000000000..b6362d14562
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/binlog_file_cache_size_grant.test
@@ -0,0 +1,9 @@
+--echo #
+--echo # MDEV-21963 Bind BINLOG ADMIN to a number of global system variables
+--echo #
+
+--let var = binlog_file_cache_size
+--let grant = BINLOG ADMIN
+--let value = 65536
+
+--source suite/sys_vars/inc/sysvar_global_grant.inc
diff --git a/mysql-test/suite/sys_vars/t/binlog_format_grant.test b/mysql-test/suite/sys_vars/t/binlog_format_grant.test
new file mode 100644
index 00000000000..6f89c75a79e
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/binlog_format_grant.test
@@ -0,0 +1,49 @@
+source include/have_log_bin.inc;
+
+
+--echo #
+--echo #
+--echo #
+
+--echo # Test that "SET binlog_format" is not allowed without BINLOG ADMIN or SUPER
+
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE BINLOG ADMIN, SUPER ON *.* FROM user1@localhost;
+--connect(user1,localhost,user1,,)
+--connection user1
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+SET binlog_format=mixed;
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+SET GLOBAL binlog_format=mixed;
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+SET SESSION binlog_format=mixed;
+--disconnect user1
+--connection default
+DROP USER user1@localhost;
+
+--echo # Test that "SET binlog_format" is allowed with BINLOG ADMIN
+
+CREATE USER user1@localhost;
+GRANT BINLOG ADMIN ON *.* TO user1@localhost;
+--connect(user1,localhost,user1,,)
+--connection user1
+SET binlog_format=mixed;
+SET GLOBAL binlog_format=mixed;
+SET SESSION binlog_format=mixed;
+--disconnect user1
+--connection default
+DROP USER user1@localhost;
+
+--echo # Test that "SET binlog_format" is allowed with SUPER
+
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+--connect(user1,localhost,user1,,)
+--connection user1
+SET binlog_format=mixed;
+SET GLOBAL binlog_format=mixed;
+SET SESSION binlog_format=mixed;
+--disconnect user1
+--connection default
+DROP USER user1@localhost;
diff --git a/mysql-test/suite/sys_vars/t/binlog_row_image_grant.test b/mysql-test/suite/sys_vars/t/binlog_row_image_grant.test
new file mode 100644
index 00000000000..e50b3750ad3
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/binlog_row_image_grant.test
@@ -0,0 +1,9 @@
+--echo #
+--echo # MDEV-21971 Bind BINLOG ADMIN to binlog_annotate_row_events and binlog_row_image global and session variables
+--echo #
+
+--let var = binlog_row_image
+--let grant = BINLOG ADMIN
+--let value = 1
+
+--source suite/sys_vars/inc/sysvar_global_and_session_grant.inc
diff --git a/mysql-test/suite/sys_vars/t/binlog_row_metadata_basic.test b/mysql-test/suite/sys_vars/t/binlog_row_metadata_basic.test
new file mode 100644
index 00000000000..d08acd5a348
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/binlog_row_metadata_basic.test
@@ -0,0 +1,121 @@
+################## mysql-test\t\binlog_row_metadata_basic.test ################
+# #
+# Variable Name: binlog_row_metadata #
+# Scope: Global #
+# Data Type: enumeration #
+# #
+# Creation Date: 2017-01-23 #
+# Author : Libing Song #
+# #
+# #
+# Description:Test Cases of Dynamic System Variable binlog_row_metadata #
+# that checks the behavior of this variable in the following ways #
+# * Value Check #
+# * Scope Check #
+# #
+# Reference: #
+# http://dev.mysql.com/doc/refman/8.X/en/server-system-variables.html #
+# #
+###############################################################################
+
+
+--echo NO_LOG Expected
+SELECT @@GLOBAL.binlog_row_metadata;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+SELECT @@SESSION.binlog_row_metadata;
+
+--echo '#---------------------BS_STVARS_002_01----------------------#'
+####################################################################
+# Displaying default value #
+####################################################################
+SET @start_value= @@global.binlog_row_metadata;
+
+SELECT COUNT(@@GLOBAL.binlog_row_metadata);
+--echo 1 Expected
+
+--echo '#---------------------BS_STVARS_002_02----------------------#'
+####################################################################
+# Check if Value can set #
+####################################################################
+SET @@GLOBAL.binlog_row_metadata=0;
+SELECT @@GLOBAL.binlog_row_metadata;
+--echo NO_LOG Expected
+
+SET @@GLOBAL.binlog_row_metadata=1;
+SELECT @@GLOBAL.binlog_row_metadata;
+--echo MINIMAL Expected
+
+SET @@GLOBAL.binlog_row_metadata=2;
+SELECT @@GLOBAL.binlog_row_metadata;
+--echo FULL Expected
+
+SET @@GLOBAL.binlog_row_metadata=NO_LOG;
+SELECT @@GLOBAL.binlog_row_metadata;
+--echo NO_LOG Expected
+
+SET @@GLOBAL.binlog_row_metadata=MINIMAL;
+SELECT @@GLOBAL.binlog_row_metadata;
+--echo MINIMAL Expected
+
+SET @@GLOBAL.binlog_row_metadata=FULL;
+SELECT @@GLOBAL.binlog_row_metadata;
+--echo FULL Expected
+
+SET @@GLOBAL.binlog_row_metadata='NO_LOG';
+SELECT @@GLOBAL.binlog_row_metadata;
+--echo NO_LOG Expected
+
+SET @@GLOBAL.binlog_row_metadata='MINIMAL';
+SELECT @@GLOBAL.binlog_row_metadata;
+--echo MINIMAL Expected
+
+SET @@GLOBAL.binlog_row_metadata='FULL';
+SELECT @@GLOBAL.binlog_row_metadata;
+--echo FULL Expected
+
+--echo '#---------------------BS_STVARS_002_03----------------------#'
+#################################################################
+# Check if the value in GLOBAL Table matches value in variable #
+#################################################################
+
+SET @@GLOBAL.binlog_row_metadata='MINIMAl';
+SELECT *
+FROM information_schema.global_variables
+WHERE VARIABLE_NAME='binlog_row_metadata';
+
+--echo '#---------------------BS_STVARS_002_04----------------------#'
+#################################################################
+# Check if the value in SESSION Table matches value in variable #
+#################################################################
+
+SELECT *
+FROM information_schema.session_variables
+WHERE VARIABLE_NAME LIKE 'binlog_row_metadata';
+
+--echo '#---------------------BS_STVARS_002_05----------------------#'
+################################################################################
+# Check if binlog_row_metadata can be accessed with and without @@ sign #
+################################################################################
+
+SELECT COUNT(@@binlog_row_metadata);
+--echo 1 Expected
+SELECT COUNT(@@GLOBAL.binlog_row_metadata);
+--echo 1 Expected
+
+--echo '#---------------------BS_STVARS_002_06----------------------#'
+################################################################################
+# Check if binlog_row_metadata can handle invalid values correctly #
+################################################################################
+--error ER_WRONG_VALUE_FOR_VAR
+SET GLOBAL binlog_row_metadata = full1;
+
+--error ER_WRONG_VALUE_FOR_VAR
+SET GLOBAL binlog_row_metadata = "full1";
+
+--error ER_WRONG_VALUE_FOR_VAR
+SET GLOBAL binlog_row_metadata = 3;
+
+--error ER_WRONG_VALUE_FOR_VAR
+SET GLOBAL binlog_row_metadata = -1;
+
+SET @@global.binlog_row_metadata= @start_value;
diff --git a/mysql-test/suite/sys_vars/t/binlog_row_metadata_grant.test b/mysql-test/suite/sys_vars/t/binlog_row_metadata_grant.test
new file mode 100644
index 00000000000..8dac8218617
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/binlog_row_metadata_grant.test
@@ -0,0 +1,9 @@
+--echo #
+--echo # MDEV-21963 Bind BINLOG ADMIN to a number of global system variables
+--echo #
+
+--let var = binlog_row_metadata
+--let grant = BINLOG ADMIN
+--let value = NO_LOG
+
+--source suite/sys_vars/inc/sysvar_global_grant.inc
diff --git a/mysql-test/suite/sys_vars/t/binlog_stmt_cache_size_grant.test b/mysql-test/suite/sys_vars/t/binlog_stmt_cache_size_grant.test
new file mode 100644
index 00000000000..9b9afad12b7
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/binlog_stmt_cache_size_grant.test
@@ -0,0 +1,9 @@
+--echo #
+--echo # MDEV-21963 Bind BINLOG ADMIN to a number of global system variables
+--echo #
+
+--let var = binlog_stmt_cache_size
+--let grant = BINLOG ADMIN
+--let value = 65536
+
+--source suite/sys_vars/inc/sysvar_global_grant.inc
diff --git a/mysql-test/suite/sys_vars/t/connect_timeout_grant.test b/mysql-test/suite/sys_vars/t/connect_timeout_grant.test
new file mode 100644
index 00000000000..61a7a3eb530
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/connect_timeout_grant.test
@@ -0,0 +1,56 @@
+--source include/not_embedded.inc
+
+SET @global=@@global.connect_timeout;
+
+--echo #
+--echo # MDEV-21961 Bind CONNECTION ADMIN to a number of global system variables
+--echo #
+
+--echo # Test that "SET connect_timeout" is not allowed without CONNECTION ADMIN or SUPER
+
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE CONNECTION ADMIN, SUPER ON *.* FROM user1@localhost;
+--connect(user1,localhost,user1,,)
+--connection user1
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+SET GLOBAL connect_timeout=10;
+--error ER_GLOBAL_VARIABLE
+SET connect_timeout=10;
+--error ER_GLOBAL_VARIABLE
+SET SESSION connect_timeout=10;
+--disconnect user1
+--connection default
+DROP USER user1@localhost;
+
+--echo # Test that "SET connect_timeout" is allowed with CONNECTION ADMIN
+
+CREATE USER user1@localhost;
+GRANT CONNECTION ADMIN ON *.* TO user1@localhost;
+--connect(user1,localhost,user1,,)
+--connection user1
+SET GLOBAL connect_timeout=10;
+--error ER_GLOBAL_VARIABLE
+SET connect_timeout=10;
+--error ER_GLOBAL_VARIABLE
+SET SESSION connect_timeout=10;
+--disconnect user1
+--connection default
+DROP USER user1@localhost;
+
+--echo # Test that "SET connect_timeout" is allowed with SUPER
+
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+--connect(user1,localhost,user1,,)
+--connection user1
+SET GLOBAL connect_timeout=10;
+--error ER_GLOBAL_VARIABLE
+SET connect_timeout=10;
+--error ER_GLOBAL_VARIABLE
+SET SESSION connect_timeout=10;
+--disconnect user1
+--connection default
+DROP USER user1@localhost;
+
+SET @@global.connect_timeout=@global;
diff --git a/mysql-test/suite/sys_vars/t/default_regex_flags_basic.test b/mysql-test/suite/sys_vars/t/default_regex_flags_basic.test
index 94607432fd9..ca72c5ceafc 100644
--- a/mysql-test/suite/sys_vars/t/default_regex_flags_basic.test
+++ b/mysql-test/suite/sys_vars/t/default_regex_flags_basic.test
@@ -9,7 +9,7 @@ SELECT @@default_regex_flags;
--error ER_WRONG_VALUE_FOR_VAR
SET default_regex_flags='UNKNOWN';
--error ER_WRONG_VALUE_FOR_VAR
-SET default_regex_flags=123;
+SET default_regex_flags=325;
--error ER_WRONG_TYPE_FOR_VAR
SET default_regex_flags=123.0;
--error ER_WRONG_TYPE_FOR_VAR
diff --git a/mysql-test/suite/sys_vars/t/disconnect_on_expired_password_grant.test b/mysql-test/suite/sys_vars/t/disconnect_on_expired_password_grant.test
new file mode 100644
index 00000000000..0d317d298f4
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/disconnect_on_expired_password_grant.test
@@ -0,0 +1,56 @@
+--source include/not_embedded.inc
+
+SET @global=@@global.disconnect_on_expired_password;
+
+--echo #
+--echo # MDEV-21961 Bind CONNECTION ADMIN to a number of global system variables
+--echo #
+
+--echo # Test that "SET disconnect_on_expired_password" is not allowed without CONNECTION ADMIN or SUPER
+
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE CONNECTION ADMIN, SUPER ON *.* FROM user1@localhost;
+--connect(user1,localhost,user1,,)
+--connection user1
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+SET GLOBAL disconnect_on_expired_password=1;
+--error ER_GLOBAL_VARIABLE
+SET disconnect_on_expired_password=1;
+--error ER_GLOBAL_VARIABLE
+SET SESSION disconnect_on_expired_password=1;
+--disconnect user1
+--connection default
+DROP USER user1@localhost;
+
+--echo # Test that "SET disconnect_on_expired_password" is allowed with CONNECTION ADMIN
+
+CREATE USER user1@localhost;
+GRANT CONNECTION ADMIN ON *.* TO user1@localhost;
+--connect(user1,localhost,user1,,)
+--connection user1
+SET GLOBAL disconnect_on_expired_password=1;
+--error ER_GLOBAL_VARIABLE
+SET disconnect_on_expired_password=1;
+--error ER_GLOBAL_VARIABLE
+SET SESSION disconnect_on_expired_password=1;
+--disconnect user1
+--connection default
+DROP USER user1@localhost;
+
+--echo # Test that "SET disconnect_on_expired_password" is allowed with SUPER
+
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+--connect(user1,localhost,user1,,)
+--connection user1
+SET GLOBAL disconnect_on_expired_password=1;
+--error ER_GLOBAL_VARIABLE
+SET disconnect_on_expired_password=1;
+--error ER_GLOBAL_VARIABLE
+SET SESSION disconnect_on_expired_password=1;
+--disconnect user1
+--connection default
+DROP USER user1@localhost;
+
+SET @@global.disconnect_on_expired_password=@global;
diff --git a/mysql-test/suite/sys_vars/t/expire_logs_days_grant.test b/mysql-test/suite/sys_vars/t/expire_logs_days_grant.test
new file mode 100644
index 00000000000..65099b745f8
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/expire_logs_days_grant.test
@@ -0,0 +1,9 @@
+--echo #
+--echo # MDEV-21963 Bind BINLOG ADMIN to a number of global system variables
+--echo #
+
+--let var = expire_logs_days
+--let grant = BINLOG ADMIN
+--let value = 33
+
+--source suite/sys_vars/inc/sysvar_global_grant.inc
diff --git a/mysql-test/suite/sys_vars/t/extra_max_connections_grant.test b/mysql-test/suite/sys_vars/t/extra_max_connections_grant.test
new file mode 100644
index 00000000000..058364ec0a8
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/extra_max_connections_grant.test
@@ -0,0 +1,56 @@
+--source include/not_embedded.inc
+
+SET @global=@@global.extra_max_connections;
+
+--echo #
+--echo # MDEV-21961 Bind CONNECTION ADMIN to a number of global system variables
+--echo #
+
+--echo # Test that "SET extra_max_connections" is not allowed without CONNECTION ADMIN or SUPER
+
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE CONNECTION ADMIN, SUPER ON *.* FROM user1@localhost;
+--connect(user1,localhost,user1,,)
+--connection user1
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+SET GLOBAL extra_max_connections=10;
+--error ER_GLOBAL_VARIABLE
+SET extra_max_connections=10;
+--error ER_GLOBAL_VARIABLE
+SET SESSION extra_max_connections=10;
+--disconnect user1
+--connection default
+DROP USER user1@localhost;
+
+--echo # Test that "SET extra_max_connections" is allowed with CONNECTION ADMIN
+
+CREATE USER user1@localhost;
+GRANT CONNECTION ADMIN ON *.* TO user1@localhost;
+--connect(user1,localhost,user1,,)
+--connection user1
+SET GLOBAL extra_max_connections=10;
+--error ER_GLOBAL_VARIABLE
+SET extra_max_connections=10;
+--error ER_GLOBAL_VARIABLE
+SET SESSION extra_max_connections=10;
+--disconnect user1
+--connection default
+DROP USER user1@localhost;
+
+--echo # Test that "SET extra_max_connections" is allowed with SUPER
+
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+--connect(user1,localhost,user1,,)
+--connection user1
+SET GLOBAL extra_max_connections=10;
+--error ER_GLOBAL_VARIABLE
+SET extra_max_connections=10;
+--error ER_GLOBAL_VARIABLE
+SET SESSION extra_max_connections=10;
+--disconnect user1
+--connection default
+DROP USER user1@localhost;
+
+SET @@global.extra_max_connections=@global;
diff --git a/mysql-test/suite/sys_vars/t/gtid_binlog_state_grant.test b/mysql-test/suite/sys_vars/t/gtid_binlog_state_grant.test
new file mode 100644
index 00000000000..b1cfa320c0f
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/gtid_binlog_state_grant.test
@@ -0,0 +1,67 @@
+--source include/not_embedded.inc
+
+
+--echo #
+--echo # MDEV-21973 Bind REPLICATION {MASTER|SLAVE} ADMIN to gtid_* GLOBAL-only system variables
+--echo #
+
+#
+# Binlog is not opened in this test.
+# So the test returns "access denied" on the lack of privileges,
+# or "Binlog closed, cannot RESET MASTER" on success.
+#
+
+
+--let var = gtid_binlog_state
+--let grant = REPLICATION MASTER ADMIN
+--let value = '0-1-10'
+
+
+--echo # Test that "SET $var" is not allowed without $grant or SUPER
+
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+--eval REVOKE $grant, SUPER ON *.* FROM user1@localhost
+--connect(user1,localhost,user1,,)
+--connection user1
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+--eval SET GLOBAL $var=$value
+--error ER_GLOBAL_VARIABLE
+--eval SET $var=$value
+--error ER_GLOBAL_VARIABLE
+--eval SET SESSION $var=$value
+--disconnect user1
+--connection default
+DROP USER user1@localhost;
+
+--echo # Test that "SET $var" is allowed with $grant
+
+CREATE USER user1@localhost;
+--eval GRANT $grant ON *.* TO user1@localhost
+--connect(user1,localhost,user1,,)
+--connection user1
+--error ER_FLUSH_MASTER_BINLOG_CLOSED
+--eval SET GLOBAL $var=$value
+--error ER_GLOBAL_VARIABLE
+--eval SET $var=$value
+--error ER_GLOBAL_VARIABLE
+--eval SET SESSION $var=$value
+--disconnect user1
+--connection default
+DROP USER user1@localhost;
+
+--echo # Test that "SET $var" is allowed with SUPER
+
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+--connect(user1,localhost,user1,,)
+--connection user1
+--error ER_FLUSH_MASTER_BINLOG_CLOSED
+--eval SET GLOBAL $var=$value
+--error ER_GLOBAL_VARIABLE
+--eval SET $var=$value
+--error ER_GLOBAL_VARIABLE
+--eval SET SESSION $var=$value
+--disconnect user1
+--connection default
+DROP USER user1@localhost;
diff --git a/mysql-test/suite/sys_vars/t/gtid_cleanup_batch_size_grant.test b/mysql-test/suite/sys_vars/t/gtid_cleanup_batch_size_grant.test
new file mode 100644
index 00000000000..73e68cc28b4
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/gtid_cleanup_batch_size_grant.test
@@ -0,0 +1,9 @@
+--echo #
+--echo # MDEV-21973 Bind REPLICATION {MASTER|SLAVE} ADMIN to gtid_* GLOBAL-only system variables
+--echo #
+
+--let var = gtid_cleanup_batch_size
+--let grant = REPLICATION SLAVE ADMIN
+--let value = 1
+
+--source suite/sys_vars/inc/sysvar_global_grant.inc
diff --git a/mysql-test/suite/sys_vars/t/gtid_domain_id_grant.test b/mysql-test/suite/sys_vars/t/gtid_domain_id_grant.test
new file mode 100644
index 00000000000..7b92c86e391
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/gtid_domain_id_grant.test
@@ -0,0 +1,16 @@
+--echo #
+--echo # MDEV-21975 Add BINLOG REPLAY privilege and bind new privileges to gtid_seq_no, preudo_thread_id, server_id, gtid_domain_id
+--echo #
+
+--let var = gtid_domain_id
+--let grant = REPLICATION MASTER ADMIN
+--let value = 1
+
+--source suite/sys_vars/inc/sysvar_global_grant_alone.inc
+
+
+--let var = gtid_domain_id
+--let grant = BINLOG REPLAY
+--let value = 1
+
+--source suite/sys_vars/inc/sysvar_session_grant_alone.inc
diff --git a/mysql-test/suite/sys_vars/t/gtid_ignore_duplicates_grant.test b/mysql-test/suite/sys_vars/t/gtid_ignore_duplicates_grant.test
new file mode 100644
index 00000000000..69e8cb8d3c3
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/gtid_ignore_duplicates_grant.test
@@ -0,0 +1,9 @@
+--echo #
+--echo # MDEV-21973 Bind REPLICATION {MASTER|SLAVE} ADMIN to gtid_* GLOBAL-only system variables
+--echo #
+
+--let var = gtid_ignore_duplicates
+--let grant = REPLICATION SLAVE ADMIN
+--let value = 1
+
+--source suite/sys_vars/inc/sysvar_global_grant.inc
diff --git a/mysql-test/suite/sys_vars/t/gtid_pos_auto_engines_grant.test b/mysql-test/suite/sys_vars/t/gtid_pos_auto_engines_grant.test
new file mode 100644
index 00000000000..500f70852a9
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/gtid_pos_auto_engines_grant.test
@@ -0,0 +1,9 @@
+--echo #
+--echo # MDEV-21973 Bind REPLICATION {MASTER|SLAVE} ADMIN to gtid_* GLOBAL-only system variables
+--echo #
+
+--let var = gtid_pos_auto_engines
+--let grant = REPLICATION SLAVE ADMIN
+--let value = ''
+
+--source suite/sys_vars/inc/sysvar_global_grant.inc
diff --git a/mysql-test/suite/sys_vars/t/gtid_seq_no_grant.test b/mysql-test/suite/sys_vars/t/gtid_seq_no_grant.test
new file mode 100644
index 00000000000..ccbe0cf1374
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/gtid_seq_no_grant.test
@@ -0,0 +1,9 @@
+--echo #
+--echo # MDEV-21975 Add BINLOG REPLAY privilege and bind new privileges to gtid_seq_no, preudo_thread_id, server_id, gtid_domain_id
+--echo #
+
+--let var = gtid_seq_no
+--let grant = BINLOG REPLAY
+--let value = 1
+
+--source suite/sys_vars/inc/sysvar_session_grant.inc
diff --git a/mysql-test/suite/sys_vars/t/gtid_slave_pos_grant.test b/mysql-test/suite/sys_vars/t/gtid_slave_pos_grant.test
new file mode 100644
index 00000000000..e5512847639
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/gtid_slave_pos_grant.test
@@ -0,0 +1,9 @@
+--echo #
+--echo # MDEV-21973 Bind REPLICATION {MASTER|SLAVE} ADMIN to gtid_* GLOBAL-only system variables
+--echo #
+
+--let var = gtid_slave_pos
+--let grant = REPLICATION SLAVE ADMIN
+--let value = ''
+
+--source suite/sys_vars/inc/sysvar_global_grant.inc
diff --git a/mysql-test/suite/sys_vars/t/gtid_strict_mode_grant.test b/mysql-test/suite/sys_vars/t/gtid_strict_mode_grant.test
new file mode 100644
index 00000000000..18c3cc76e45
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/gtid_strict_mode_grant.test
@@ -0,0 +1,9 @@
+--echo #
+--echo # MDEV-21973 Bind REPLICATION {MASTER|SLAVE} ADMIN to gtid_* GLOBAL-only system variables
+--echo #
+
+--let var = gtid_strict_mode
+--let grant = REPLICATION SLAVE ADMIN
+--let value = 1
+
+--source suite/sys_vars/inc/sysvar_global_grant.inc
diff --git a/mysql-test/suite/sys_vars/t/init_connect_grant.test b/mysql-test/suite/sys_vars/t/init_connect_grant.test
new file mode 100644
index 00000000000..685f0900833
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/init_connect_grant.test
@@ -0,0 +1,56 @@
+--source include/not_embedded.inc
+
+SET @global=@@global.init_connect;
+
+--echo #
+--echo # MDEV-21961 Bind CONNECTION ADMIN to a number of global system variables
+--echo #
+
+--echo # Test that "SET init_connect" is not allowed without CONNECTION ADMIN or SUPER
+
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE CONNECTION ADMIN, SUPER ON *.* FROM user1@localhost;
+--connect(user1,localhost,user1,,)
+--connection user1
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+SET GLOBAL init_connect="SET @xxx=1";
+--error ER_GLOBAL_VARIABLE
+SET init_connect="SET @xxx=1";
+--error ER_GLOBAL_VARIABLE
+SET SESSION init_connect="SET @xxx=1";
+--disconnect user1
+--connection default
+DROP USER user1@localhost;
+
+--echo # Test that "SET init_connect" is allowed with CONNECTION ADMIN
+
+CREATE USER user1@localhost;
+GRANT CONNECTION ADMIN ON *.* TO user1@localhost;
+--connect(user1,localhost,user1,,)
+--connection user1
+SET GLOBAL init_connect="SET @xxx=1";
+--error ER_GLOBAL_VARIABLE
+SET init_connect="SET @xxx=1";
+--error ER_GLOBAL_VARIABLE
+SET SESSION init_connect="SET @xxx=1";
+--disconnect user1
+--connection default
+DROP USER user1@localhost;
+
+--echo # Test that "SET init_connect" is allowed with SUPER
+
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+--connect(user1,localhost,user1,,)
+--connection user1
+SET GLOBAL init_connect="SET @xxx=1";
+--error ER_GLOBAL_VARIABLE
+SET init_connect="SET @xxx=1";
+--error ER_GLOBAL_VARIABLE
+SET SESSION init_connect="SET @xxx=1";
+--disconnect user1
+--connection default
+DROP USER user1@localhost;
+
+SET @@global.init_connect=@global;
diff --git a/mysql-test/suite/sys_vars/t/init_slave_grant.test b/mysql-test/suite/sys_vars/t/init_slave_grant.test
new file mode 100644
index 00000000000..b2efbd1336c
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/init_slave_grant.test
@@ -0,0 +1,9 @@
+--echo #
+--echo # MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
+--echo #
+
+--let var = init_slave
+--let grant = REPLICATION SLAVE ADMIN
+--let value = 'SET @x=1'
+
+--source suite/sys_vars/inc/sysvar_global_grant.inc
diff --git a/mysql-test/suite/sys_vars/t/innodb_buffer_pool_dump_pct_function.opt b/mysql-test/suite/sys_vars/t/innodb_buffer_pool_dump_pct_function.opt
index 8d74d91426a..787f6ce532d 100644
--- a/mysql-test/suite/sys_vars/t/innodb_buffer_pool_dump_pct_function.opt
+++ b/mysql-test/suite/sys_vars/t/innodb_buffer_pool_dump_pct_function.opt
@@ -2,5 +2,4 @@
--loose-innodb_buffer_pool_load_at_startup=0
--loose-innodb_buffer_pool_dump_at_shutdown=0
--loose-innodb-buffer-pool-size=8M
---loose-innodb-buffer-pool-instances=1
--loose-innodb-page-size=16k
diff --git a/mysql-test/suite/sys_vars/t/innodb_buffer_pool_evict_basic.test b/mysql-test/suite/sys_vars/t/innodb_buffer_pool_evict_basic.test
index 11634e1e0c7..7d64e210865 100644
--- a/mysql-test/suite/sys_vars/t/innodb_buffer_pool_evict_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_buffer_pool_evict_basic.test
@@ -4,7 +4,9 @@
SELECT @@global.innodb_buffer_pool_evict;
+CREATE TABLE t(a INT) ENGINE=InnoDB ROW_FORMAT=COMPRESSED;
SET GLOBAL innodb_buffer_pool_evict = 'uncompressed';
# Should always be empty.
SELECT @@global.innodb_buffer_pool_evict;
+DROP TABLE t;
diff --git a/mysql-test/suite/sys_vars/t/innodb_checksums_basic.test b/mysql-test/suite/sys_vars/t/innodb_checksums_basic.test
deleted file mode 100644
index 5db0a18e8fd..00000000000
--- a/mysql-test/suite/sys_vars/t/innodb_checksums_basic.test
+++ /dev/null
@@ -1,106 +0,0 @@
-
-
-################## mysql-test\t\innodb_checksums_basic.test ###################
-# #
-# Variable Name: innodb_checksums #
-# Scope: Global #
-# Access Type: Static #
-# Data Type: boolean #
-# #
-# #
-# Creation Date: 2008-02-07 #
-# Author : Sharique Abdullah #
-# #
-# #
-# Description:Test Cases of Dynamic System Variable innodb_checksums #
-# that checks the behavior of this variable in the following ways #
-# * Value Check #
-# * Scope Check #
-# #
-# Reference: http://dev.mysql.com/doc/refman/5.1/en/ #
-# server-system-variables.html #
-# #
-###############################################################################
-
---source include/have_innodb.inc
-
---echo '#---------------------BS_STVARS_023_01----------------------#'
-####################################################################
-# Displaying default value #
-####################################################################
-SELECT COUNT(@@GLOBAL.innodb_checksums);
---echo 1 Expected
-
-
---echo '#---------------------BS_STVARS_023_02----------------------#'
-####################################################################
-# Check if Value can set #
-####################################################################
-
---error ER_INCORRECT_GLOBAL_LOCAL_VAR
-SET @@GLOBAL.innodb_checksums=1;
---echo Expected error 'Read only variable'
-
-SELECT COUNT(@@GLOBAL.innodb_checksums);
---echo 1 Expected
-
-
-
-
---echo '#---------------------BS_STVARS_023_03----------------------#'
-#################################################################
-# Check if the value in GLOBAL Table matches value in variable #
-#################################################################
-
---disable_warnings
-SELECT IF(@@GLOBAL.innodb_checksums, "ON", "OFF") = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='innodb_checksums';
---enable_warnings
---echo 1 Expected
-
-SELECT COUNT(@@GLOBAL.innodb_checksums);
---echo 1 Expected
-
---disable_warnings
-SELECT COUNT(VARIABLE_VALUE)
-FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='innodb_checksums';
---enable_warnings
---echo 1 Expected
-
-
-
---echo '#---------------------BS_STVARS_023_04----------------------#'
-################################################################################
-# Check if accessing variable with and without GLOBAL point to same variable #
-################################################################################
-SELECT @@innodb_checksums = @@GLOBAL.innodb_checksums;
---echo 1 Expected
-
-
-
---echo '#---------------------BS_STVARS_023_05----------------------#'
-################################################################################
-# Check if innodb_checksums can be accessed with and without @@ sign #
-################################################################################
-
-SELECT COUNT(@@innodb_checksums);
---echo 1 Expected
-
---Error ER_INCORRECT_GLOBAL_LOCAL_VAR
-SELECT COUNT(@@local.innodb_checksums);
---echo Expected error 'Variable is a GLOBAL variable'
-
---Error ER_INCORRECT_GLOBAL_LOCAL_VAR
-SELECT COUNT(@@SESSION.innodb_checksums);
---echo Expected error 'Variable is a GLOBAL variable'
-
-SELECT COUNT(@@GLOBAL.innodb_checksums);
---echo 1 Expected
-
---Error ER_BAD_FIELD_ERROR
-SELECT innodb_checksums = @@SESSION.innodb_checksums;
---echo Expected error 'Readonly variable'
-
-
diff --git a/mysql-test/suite/sys_vars/t/innodb_commit_concurrency_basic.test b/mysql-test/suite/sys_vars/t/innodb_commit_concurrency_basic.test
index 4ed706b372b..67be561348a 100644
--- a/mysql-test/suite/sys_vars/t/innodb_commit_concurrency_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_commit_concurrency_basic.test
@@ -52,8 +52,9 @@ SELECT @@global.innodb_commit_concurrency;
# Check if innodb_commit_concurrency can be accessed with and without @@ sign#
################################################################################
---Error ER_GLOBAL_VARIABLE
+--error ER_GLOBAL_VARIABLE
SET innodb_commit_concurrency = 1;
+SET GLOBAL innodb_commit_concurrency = 1;
SELECT @@innodb_commit_concurrency;
@@ -79,14 +80,8 @@ SELECT @@global.innodb_commit_concurrency;
# Change the value of innodb_commit_concurrency to invalid value #
###########################################################################
-#
-# InnoDB doesn't allow innodb_commit_concurrency to change from
-# zero to non-zero or vice versa
-#
---Error ER_WRONG_VALUE_FOR_VAR
-SET @@global.innodb_commit_concurrency = 1;
SELECT @@global.innodb_commit_concurrency;
---Error ER_WRONG_VALUE_FOR_VAR
+SELECT @@global.innodb_commit_concurrency;
SET @@global.innodb_commit_concurrency = -1;
SELECT @@global.innodb_commit_concurrency;
--Error ER_WRONG_TYPE_FOR_VAR
@@ -98,7 +93,6 @@ SELECT @@global.innodb_commit_concurrency;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.innodb_commit_concurrency = 1.1;
SELECT @@global.innodb_commit_concurrency;
---Error ER_WRONG_VALUE_FOR_VAR
SET @@global.innodb_commit_concurrency = 1001;
SELECT @@global.innodb_commit_concurrency;
diff --git a/mysql-test/suite/sys_vars/t/innodb_debug_force_scrubbing_basic.test b/mysql-test/suite/sys_vars/t/innodb_debug_force_scrubbing_basic.test
deleted file mode 100644
index cc00f0f6f3d..00000000000
--- a/mysql-test/suite/sys_vars/t/innodb_debug_force_scrubbing_basic.test
+++ /dev/null
@@ -1,42 +0,0 @@
-# bool global
---source include/have_innodb.inc
---source include/have_debug.inc
-
-SET @start_global_value = @@global.innodb_debug_force_scrubbing;
-
---echo #
---echo # exists as global only
---echo #
-select @@global.innodb_debug_force_scrubbing;
---error ER_INCORRECT_GLOBAL_LOCAL_VAR
-select @@session.innodb_debug_force_scrubbing;
-show global variables like 'innodb_debug_force_scrubbing';
-show session variables like 'innodb_debug_force_scrubbing';
-select * from information_schema.global_variables
-where variable_name='innodb_debug_force_scrubbing';
-select * from information_schema.session_variables
-where variable_name='innodb_debug_force_scrubbing';
-
---echo #
---echo # show that it's writable
---echo #
-set global innodb_debug_force_scrubbing=ON;
-select @@global.innodb_debug_force_scrubbing;
-set global innodb_debug_force_scrubbing=OFF;
-select @@global.innodb_debug_force_scrubbing;
-set global innodb_debug_force_scrubbing=1;
-select @@global.innodb_debug_force_scrubbing;
---error ER_GLOBAL_VARIABLE
-set session innodb_debug_force_scrubbing=1;
-
---echo #
---echo # incorrect types
---echo #
---error ER_WRONG_TYPE_FOR_VAR
-set global innodb_debug_force_scrubbing=1.1;
---error ER_WRONG_TYPE_FOR_VAR
-set global innodb_debug_force_scrubbing=1e1;
---error ER_WRONG_VALUE_FOR_VAR
-set global innodb_debug_force_scrubbing="foo";
-
-SET @@global.innodb_debug_force_scrubbing = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/t/innodb_disable_background_merge_basic.test b/mysql-test/suite/sys_vars/t/innodb_disable_background_merge_basic.test
deleted file mode 100644
index 9ab1a90efe1..00000000000
--- a/mysql-test/suite/sys_vars/t/innodb_disable_background_merge_basic.test
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# Basic test for innodb_disable_background_merge.
-#
-
--- source include/have_innodb.inc
-
-# The config variable is a debug variable
--- source include/have_debug.inc
-
-# Check the default value
-SET @orig = @@global.innodb_disable_background_merge;
-SELECT @orig;
diff --git a/mysql-test/suite/sys_vars/t/innodb_doublewrite_batch_size_basic.test b/mysql-test/suite/sys_vars/t/innodb_doublewrite_batch_size_basic.test
deleted file mode 100644
index 5e9104b5335..00000000000
--- a/mysql-test/suite/sys_vars/t/innodb_doublewrite_batch_size_basic.test
+++ /dev/null
@@ -1,24 +0,0 @@
---source include/have_innodb.inc
---source include/have_debug.inc
-
-#
-# exists as global only
-#
-select @@global.innodb_doublewrite_batch_size between 1 and 127;
-select @@global.innodb_doublewrite_batch_size;
---error ER_INCORRECT_GLOBAL_LOCAL_VAR
-select @@session.innodb_doublewrite_batch_size;
-show global variables like 'innodb_doublewrite_batch_size';
-show session variables like 'innodb_doublewrite_batch_size';
---disable_warnings
-select * from information_schema.global_variables where variable_name='innodb_doublewrite_batch_size';
-select * from information_schema.session_variables where variable_name='innodb_doublewrite_batch_size';
---enable_warnings
-
-#
-# show that it's read-only
-#
---error ER_INCORRECT_GLOBAL_LOCAL_VAR
-set global innodb_doublewrite_batch_size=1;
---error ER_INCORRECT_GLOBAL_LOCAL_VAR
-set @@session.innodb_doublewrite_batch_size='some';
diff --git a/mysql-test/suite/sys_vars/t/innodb_flush_sync_basic.test b/mysql-test/suite/sys_vars/t/innodb_flush_sync_basic.test
index a73575864bd..cb91cf87d83 100644
--- a/mysql-test/suite/sys_vars/t/innodb_flush_sync_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_flush_sync_basic.test
@@ -1,16 +1,15 @@
--source include/have_innodb.inc
SET @start_global_value = @@global.innodb_flush_sync;
-SELECT @start_global_value;
#
# exists as global only
#
--echo Valid values are 'ON' and 'OFF'
select @@global.innodb_flush_sync in (0, 1);
-select @@global.innodb_flush_sync;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
select @@session.innodb_flush_sync;
+SET GLOBAL innodb_flush_sync = ON;
show global variables like 'innodb_flush_sync';
show session variables like 'innodb_flush_sync';
--disable_warnings
@@ -18,9 +17,6 @@ select * from information_schema.global_variables where variable_name='innodb_fl
select * from information_schema.session_variables where variable_name='innodb_flush_sync';
--enable_warnings
-#
-# show that it's writable
-#
set global innodb_flush_sync='OFF';
select @@global.innodb_flush_sync;
--disable_warnings
@@ -74,4 +70,3 @@ set global innodb_flush_sync='AUTO';
#
SET @@global.innodb_flush_sync = @start_global_value;
-SELECT @@global.innodb_flush_sync;
diff --git a/mysql-test/suite/sys_vars/t/innodb_idle_flush_pct_basic.test b/mysql-test/suite/sys_vars/t/innodb_idle_flush_pct_basic.test
deleted file mode 100644
index 7175a59e238..00000000000
--- a/mysql-test/suite/sys_vars/t/innodb_idle_flush_pct_basic.test
+++ /dev/null
@@ -1,63 +0,0 @@
-
-#
-# 2013-04-01 - Added
-#
-
---source include/have_innodb.inc
-
-SET @start_global_value = @@global.innodb_idle_flush_pct;
-SELECT @start_global_value;
-
-#
-# exists as global only
-#
---echo Valid values are between 0 and 100
-select @@global.innodb_idle_flush_pct between 0 and 100;
-select @@global.innodb_idle_flush_pct;
---error ER_INCORRECT_GLOBAL_LOCAL_VAR
-select @@session.innodb_idle_flush_pct;
-show global variables like 'innodb_idle_flush_pct';
-show session variables like 'innodb_idle_flush_pct';
-select * from information_schema.global_variables where variable_name='innodb_idle_flush_pct';
-select * from information_schema.session_variables where variable_name='innodb_idle_flush_pct';
-
-#
-# show that it's writable
-#
-set global innodb_idle_flush_pct=10;
-select @@global.innodb_idle_flush_pct;
-select * from information_schema.global_variables where variable_name='innodb_idle_flush_pct';
-select * from information_schema.session_variables where variable_name='innodb_idle_flush_pct';
---error ER_GLOBAL_VARIABLE
-set session innodb_idle_flush_pct=1;
-
-#
-# incorrect types
-#
---error ER_WRONG_TYPE_FOR_VAR
-set global innodb_idle_flush_pct=1.1;
---error ER_WRONG_TYPE_FOR_VAR
-set global innodb_idle_flush_pct=1e1;
---error ER_WRONG_TYPE_FOR_VAR
-set global innodb_idle_flush_pct="bar";
-
-set global innodb_idle_flush_pct=-7;
-select @@global.innodb_idle_flush_pct;
-select * from information_schema.global_variables where variable_name='innodb_idle_flush_pct';
-set global innodb_idle_flush_pct=106;
-select @@global.innodb_idle_flush_pct;
-select * from information_schema.global_variables where variable_name='innodb_idle_flush_pct';
-
-#
-# min/max/DEFAULT values
-#
-set global innodb_idle_flush_pct=0;
-select @@global.innodb_idle_flush_pct;
-set global innodb_idle_flush_pct=100;
-select @@global.innodb_idle_flush_pct;
-set global innodb_idle_flush_pct=DEFAULT;
-select @@global.innodb_idle_flush_pct;
-
-
-SET @@global.innodb_idle_flush_pct = @start_global_value;
-SELECT @@global.innodb_idle_flush_pct;
diff --git a/mysql-test/suite/sys_vars/t/innodb_locks_unsafe_for_binlog_basic.test b/mysql-test/suite/sys_vars/t/innodb_locks_unsafe_for_binlog_basic.test
deleted file mode 100644
index 755c5c62c70..00000000000
--- a/mysql-test/suite/sys_vars/t/innodb_locks_unsafe_for_binlog_basic.test
+++ /dev/null
@@ -1,106 +0,0 @@
-
-
-################## mysql-test\t\innodb_locks_unsafe_for_binlog_basic.test #####
-# #
-# Variable Name: innodb_locks_unsafe_for_binlog #
-# Scope: Global #
-# Access Type: Static #
-# Data Type: boolean #
-# #
-# #
-# Creation Date: 2008-02-07 #
-# Author : Sharique Abdullah #
-# #
-# #
-# Description:Test Cases of Dynamic System Variable innodb_locks_unsafe_for_binlog#
-# that checks the behavior of this variable in the following ways #
-# * Value Check #
-# * Scope Check #
-# #
-# Reference: http://dev.mysql.com/doc/refman/5.1/en/ #
-# server-system-variables.html #
-# #
-###############################################################################
-
---source include/have_innodb.inc
-
---echo '#---------------------BS_STVARS_031_01----------------------#'
-####################################################################
-# Displaying default value #
-####################################################################
-SELECT COUNT(@@GLOBAL.innodb_locks_unsafe_for_binlog);
---echo 1 Expected
-
-
---echo '#---------------------BS_STVARS_031_02----------------------#'
-####################################################################
-# Check if Value can set #
-####################################################################
-
---error ER_INCORRECT_GLOBAL_LOCAL_VAR
-SET @@GLOBAL.innodb_locks_unsafe_for_binlog=1;
---echo Expected error 'Read only variable'
-
-SELECT COUNT(@@GLOBAL.innodb_locks_unsafe_for_binlog);
---echo 1 Expected
-
-
-
-
---echo '#---------------------BS_STVARS_031_03----------------------#'
-#################################################################
-# Check if the value in GLOBAL Table matches value in variable #
-#################################################################
-
---disable_warnings
-SELECT IF(@@GLOBAL.innodb_locks_unsafe_for_binlog, "ON", "OFF") = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='innodb_locks_unsafe_for_binlog';
---enable_warnings
---echo 1 Expected
-
-SELECT COUNT(@@GLOBAL.innodb_locks_unsafe_for_binlog);
---echo 1 Expected
-
---disable_warnings
-SELECT COUNT(VARIABLE_VALUE)
-FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='innodb_locks_unsafe_for_binlog';
---enable_warnings
---echo 1 Expected
-
-
-
---echo '#---------------------BS_STVARS_031_04----------------------#'
-################################################################################
-# Check if accessing variable with and without GLOBAL point to same variable #
-################################################################################
-SELECT @@innodb_locks_unsafe_for_binlog = @@GLOBAL.innodb_locks_unsafe_for_binlog;
---echo 1 Expected
-
-
-
---echo '#---------------------BS_STVARS_031_05----------------------#'
-################################################################################
-# Check if innodb_locks_unsafe_for_binlog can be accessed with and without @@ sign #
-################################################################################
-
-SELECT COUNT(@@innodb_locks_unsafe_for_binlog);
---echo 1 Expected
-
---Error ER_INCORRECT_GLOBAL_LOCAL_VAR
-SELECT COUNT(@@local.innodb_locks_unsafe_for_binlog);
---echo Expected error 'Variable is a GLOBAL variable'
-
---Error ER_INCORRECT_GLOBAL_LOCAL_VAR
-SELECT COUNT(@@SESSION.innodb_locks_unsafe_for_binlog);
---echo Expected error 'Variable is a GLOBAL variable'
-
-SELECT COUNT(@@GLOBAL.innodb_locks_unsafe_for_binlog);
---echo 1 Expected
-
---Error ER_BAD_FIELD_ERROR
-SELECT innodb_locks_unsafe_for_binlog = @@SESSION.innodb_locks_unsafe_for_binlog;
---echo Expected error 'Readonly variable'
-
-
diff --git a/mysql-test/suite/sys_vars/t/innodb_log_files_in_group_basic.opt b/mysql-test/suite/sys_vars/t/innodb_log_files_in_group_basic.opt
new file mode 100644
index 00000000000..3ad42ad65d8
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/innodb_log_files_in_group_basic.opt
@@ -0,0 +1 @@
+--innodb-log-files-in-group=2
diff --git a/mysql-test/suite/sys_vars/t/innodb_max_dirty_pages_pct_func.test b/mysql-test/suite/sys_vars/t/innodb_max_dirty_pages_pct_func.test
index c7a9e567e69..0720aca65b9 100644
--- a/mysql-test/suite/sys_vars/t/innodb_max_dirty_pages_pct_func.test
+++ b/mysql-test/suite/sys_vars/t/innodb_max_dirty_pages_pct_func.test
@@ -25,6 +25,7 @@
--source include/have_innodb.inc
# safe initial value
+SET @innodb_max_dirty_pages_pct_lwm = @@global.innodb_max_dirty_pages_pct_lwm;
SET @innodb_max_dirty_pages_pct = @@global.innodb_max_dirty_pages_pct;
--echo '#--------------------FN_DYNVARS_044_02-------------------------#'
@@ -32,23 +33,19 @@ SET @innodb_max_dirty_pages_pct = @@global.innodb_max_dirty_pages_pct;
# Check if setting innodb_max_dirty_pages_pct is changed in new connection #
############################################################################
+SET @@global.innodb_max_dirty_pages_pct_lwm = 0;
SET @@global.innodb_max_dirty_pages_pct = 80;
---echo 'connect (con1,localhost,root,,,,)'
+SET @@global.innodb_max_dirty_pages_pct_lwm = 80;
connect (con1,localhost,root,,,,);
---echo 'connection con1'
connection con1;
SELECT @@global.innodb_max_dirty_pages_pct;
SET @@global.innodb_max_dirty_pages_pct = 70;
---echo 'connect (con2,localhost,root,,,,)'
+SELECT @@global.innodb_max_dirty_pages_pct_lwm;
connect (con2,localhost,root,,,,);
---echo 'connection con2'
connection con2;
SELECT @@global.innodb_max_dirty_pages_pct;
---echo 'connection default'
connection default;
---echo 'disconnect con2'
disconnect con2;
---echo 'disconnect con1'
disconnect con1;
# restore initial value
SET @@global.innodb_max_dirty_pages_pct = @innodb_max_dirty_pages_pct;
@@ -138,6 +135,10 @@ b CHAR(200)
#==========================================================
SET @@global.innodb_max_dirty_pages_pct = 10;
+SELECT @@global.innodb_max_dirty_pages_pct_lwm;
+SET GLOBAL innodb_max_dirty_pages_pct_lwm = 15;
+SELECT @@global.innodb_max_dirty_pages_pct_lwm;
+SELECT @@global.innodb_max_dirty_pages_pct;
FLUSH STATUS;
@@ -164,7 +165,9 @@ DROP FUNCTION dirty_pct;
DROP TABLE t1;
# restore initial value
+SET GLOBAL innodb_max_dirty_pages_pct_lwm = 0;
SET @@global.innodb_max_dirty_pages_pct = @innodb_max_dirty_pages_pct;
+SET @@global.innodb_max_dirty_pages_pct_lwm = @innodb_max_dirty_pages_pct_lwm;
##################################################################
# End of functionality Testing for innodb_max_dirty_pages_pct #
diff --git a/mysql-test/suite/sys_vars/t/innodb_page_hash_locks_basic.test b/mysql-test/suite/sys_vars/t/innodb_page_hash_locks_basic.test
deleted file mode 100644
index ee4798c1f90..00000000000
--- a/mysql-test/suite/sys_vars/t/innodb_page_hash_locks_basic.test
+++ /dev/null
@@ -1,24 +0,0 @@
---source include/have_innodb.inc
---source include/have_debug.inc
-
-#
-# exists as global only
-#
-select @@global.innodb_page_hash_locks between 1 and 1024;
-select @@global.innodb_page_hash_locks;
---error ER_INCORRECT_GLOBAL_LOCAL_VAR
-select @@session.innodb_page_hash_locks;
-show global variables like 'innodb_page_hash_locks';
-show session variables like 'innodb_page_hash_locks';
---disable_warnings
-select * from information_schema.global_variables where variable_name='innodb_page_hash_locks';
-select * from information_schema.session_variables where variable_name='innodb_page_hash_locks';
---enable_warnings
-
-#
-# show that it's read-only
-#
---error ER_INCORRECT_GLOBAL_LOCAL_VAR
-set global innodb_page_hash_locks=1;
---error ER_INCORRECT_GLOBAL_LOCAL_VAR
-set @@session.innodb_page_hash_locks='some';
diff --git a/mysql-test/suite/sys_vars/t/innodb_rollback_segments_basic.test b/mysql-test/suite/sys_vars/t/innodb_rollback_segments_basic.test
deleted file mode 100644
index 33223d4c064..00000000000
--- a/mysql-test/suite/sys_vars/t/innodb_rollback_segments_basic.test
+++ /dev/null
@@ -1,64 +0,0 @@
-#
-# 2011-08-01 Added
-#
-
---source include/have_innodb.inc
-
-SET @start_global_value = @@global.innodb_rollback_segments;
-SELECT @start_global_value;
-
-#
-# exists as global only
-#
---echo Valid values are zero or above
-SELECT @@global.innodb_rollback_segments >=0;
-SELECT @@global.innodb_rollback_segments <=128;
-SELECT @@global.innodb_rollback_segments;
-
---error ER_INCORRECT_GLOBAL_LOCAL_VAR
-SELECT @@session.innodb_rollback_segments;
-SHOW global variables LIKE 'innodb_rollback_segments';
-SHOW session variables LIKE 'innodb_rollback_segments';
---disable_warnings
-SELECT * FROM information_schema.global_variables
-WHERE variable_name='innodb_rollback_segments';
-SELECT * FROM information_schema.session_variables
-WHERE variable_name='innodb_rollback_segments';
---enable_warnings
-
-#
-# show that it's writable
-#
-SET global innodb_rollback_segments=100;
-SELECT @@global.innodb_rollback_segments;
---disable_warnings
-SELECT * FROM information_schema.global_variables
-WHERE variable_name='innodb_rollback_segments';
-SELECT * FROM information_schema.session_variables
-WHERE variable_name='innodb_rollback_segments';
---enable_warnings
---error ER_GLOBAL_VARIABLE
-SET session innodb_rollback_segments=1;
-
-#
-# incorrect types
-#
---error ER_WRONG_TYPE_FOR_VAR
-SET global innodb_rollback_segments=1.1;
---error ER_WRONG_TYPE_FOR_VAR
-SET global innodb_rollback_segments=1e1;
---error ER_WRONG_TYPE_FOR_VAR
-SET global innodb_rollback_segments="foo";
-SET global innodb_rollback_segments=-7;
-SELECT @@global.innodb_rollback_segments;
---disable_warnings
-SELECT * FROM information_schema.global_variables
-WHERE variable_name='innodb_rollback_segments';
---enable_warnings
-
-#
-# cleanup
-#
-
-SET @@global.innodb_rollback_segments = @start_global_value;
-SELECT @@global.innodb_rollback_segments;
diff --git a/mysql-test/suite/sys_vars/t/innodb_scrub_log_basic.test b/mysql-test/suite/sys_vars/t/innodb_scrub_log_basic.test
index 302f2a963c4..74d76f31f49 100644
--- a/mysql-test/suite/sys_vars/t/innodb_scrub_log_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_scrub_log_basic.test
@@ -47,4 +47,4 @@ SELECT @@GLOBAL.innodb_scrub_log;
--Error ER_BAD_FIELD_ERROR
SELECT innodb_scrub_log;
---echo Expected error 'Unknow column in field list'
+--echo Expected error 'Unknown column in field list'
diff --git a/mysql-test/suite/sys_vars/t/innodb_scrub_log_speed_basic.test b/mysql-test/suite/sys_vars/t/innodb_scrub_log_speed_basic.test
index 5e750eebd65..59a217373a2 100644
--- a/mysql-test/suite/sys_vars/t/innodb_scrub_log_speed_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_scrub_log_speed_basic.test
@@ -52,4 +52,4 @@ SELECT @@GLOBAL.innodb_scrub_log_speed;
--Error ER_BAD_FIELD_ERROR
SELECT innodb_scrub_log_speed;
---echo Expected error 'Unknow column in field list'
+--echo Expected error 'Unknown column in field list'
diff --git a/mysql-test/suite/sys_vars/t/innodb_stats_sample_pages_basic.test b/mysql-test/suite/sys_vars/t/innodb_stats_sample_pages_basic.test
deleted file mode 100644
index 0e4fcb508ac..00000000000
--- a/mysql-test/suite/sys_vars/t/innodb_stats_sample_pages_basic.test
+++ /dev/null
@@ -1,72 +0,0 @@
-
-#
-# 2010-01-27 - Added
-#
-
---source include/have_innodb.inc
-
-SET @start_global_value = @@global.innodb_stats_sample_pages;
-SELECT @start_global_value;
-
-#
-# exists as global only
-#
---echo Valid values are one or above
-select @@global.innodb_stats_sample_pages >=1;
-select @@global.innodb_stats_sample_pages;
---error ER_INCORRECT_GLOBAL_LOCAL_VAR
-select @@session.innodb_stats_sample_pages;
-show global variables like 'innodb_stats_sample_pages';
-show session variables like 'innodb_stats_sample_pages';
---disable_warnings
-select * from information_schema.global_variables where variable_name='innodb_stats_sample_pages';
-select * from information_schema.session_variables where variable_name='innodb_stats_sample_pages';
---enable_warnings
-
-#
-# show that it's writable
-#
-set global innodb_stats_sample_pages=10;
-select @@global.innodb_stats_sample_pages;
---disable_warnings
-select * from information_schema.global_variables where variable_name='innodb_stats_sample_pages';
-select * from information_schema.session_variables where variable_name='innodb_stats_sample_pages';
---enable_warnings
---error ER_GLOBAL_VARIABLE
-set session innodb_stats_sample_pages=1;
-
-#
-# show the default value
-#
-set global innodb_stats_sample_pages=DEFAULT;
-select @@global.innodb_stats_sample_pages;
-
-
-#
-# invalid values
-#
---error ER_WRONG_TYPE_FOR_VAR
-set global innodb_stats_sample_pages = 1.1;
---error ER_WRONG_TYPE_FOR_VAR
-set global innodb_stats_sample_pages = 1e1;
---error ER_WRONG_TYPE_FOR_VAR
-set global innodb_stats_sample_pages = "foo";
---error ER_WRONG_TYPE_FOR_VAR
-set global innodb_stats_sample_pages=' ';
-select @@global.innodb_stats_sample_pages;
---error ER_WRONG_TYPE_FOR_VAR
-set global innodb_stats_sample_pages=" ";
-select @@global.innodb_stats_sample_pages;
-
-set global innodb_stats_sample_pages=-7;
-select @@global.innodb_stats_sample_pages;
---disable_warnings
-select * from information_schema.global_variables where variable_name='innodb_stats_sample_pages';
---enable_warnings
-
-
-#
-# cleanup
-#
-SET @@global.innodb_stats_sample_pages = @start_global_value;
-SELECT @@global.innodb_stats_sample_pages;
diff --git a/mysql-test/suite/sys_vars/t/innodb_stats_transient_sample_pages_basic.test b/mysql-test/suite/sys_vars/t/innodb_stats_transient_sample_pages_basic.test
index 897d3de42e0..d3d50890a8c 100644
--- a/mysql-test/suite/sys_vars/t/innodb_stats_transient_sample_pages_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_stats_transient_sample_pages_basic.test
@@ -11,8 +11,8 @@ SELECT @start_global_value;
#
# exists as global only
#
---echo Valid values are zero or above
-SELECT @@global.innodb_stats_transient_sample_pages >=0;
+--echo Valid values are one or above
+SELECT @@global.innodb_stats_transient_sample_pages >=1;
SELECT @@global.innodb_stats_transient_sample_pages;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@session.innodb_stats_transient_sample_pages;
diff --git a/mysql-test/suite/sys_vars/t/innodb_undo_logs_basic.opt b/mysql-test/suite/sys_vars/t/innodb_undo_logs_basic.opt
new file mode 100644
index 00000000000..71866672bd9
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/innodb_undo_logs_basic.opt
@@ -0,0 +1 @@
+--innodb-undo-logs=42
diff --git a/mysql-test/suite/sys_vars/t/innodb_undo_logs_basic.test b/mysql-test/suite/sys_vars/t/innodb_undo_logs_basic.test
index f83b5ede247..54ee06d94cb 100644
--- a/mysql-test/suite/sys_vars/t/innodb_undo_logs_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_undo_logs_basic.test
@@ -1,97 +1,42 @@
-################## mysql-test/t/innodb_undo_logs_basic.test ############
-# #
-# Variable Name: innodb_undo_logs #
-# Scope: Global #
-# Access Type: Static #
-# Data Type: numeric #
-# #
-# #
-# Creation Date: 2011-07-05 #
-# Author : Sunny Bains #
-# #
-# #
-# Description: Read-only config global variable innodb_undo_logs #
-# * Value check #
-# * Scope check #
-# #
-###############################################################################
+#
+# 2011-08-01 Added
+#
--source include/have_innodb.inc
-####################################################################
-# Display default value #
-####################################################################
-SELECT @@GLOBAL.innodb_undo_logs;
---echo 128 Expected
-
-
-####################################################################
-# Check if value can be set #
-####################################################################
-
-SET @@GLOBAL.innodb_undo_logs=128;
-
-SELECT COUNT(@@GLOBAL.innodb_undo_logs);
---echo 1 Expected
-
-
-################################################################################
-# Check if the value in GLOBAL table matches value in variable #
-################################################################################
+#
+# exists as global only
+#
+SELECT @@global.innodb_undo_logs;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+SELECT @@session.innodb_undo_logs;
+SHOW global variables LIKE 'innodb_undo_logs';
+SHOW session variables LIKE 'innodb_undo_logs';
--disable_warnings
-SELECT VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='innodb_undo_logs';
+SELECT * FROM information_schema.global_variables
+WHERE variable_name='innodb_undo_logs';
+SELECT * FROM information_schema.session_variables
+WHERE variable_name='innodb_undo_logs';
--enable_warnings
---echo 128 Expected
-
-
-################################################################################
-# Check if accessing variable with and without GLOBAL point to same variable #
-################################################################################
-SELECT @@innodb_undo_logs = @@GLOBAL.innodb_undo_logs;
---echo 1 Expected
-
-################################################################################
-# Check if innodb_undo_logs can be accessed with and without @@ sign #
-################################################################################
-
-SELECT COUNT(@@innodb_undo_logs);
---echo 1 Expected
-
---Error ER_INCORRECT_GLOBAL_LOCAL_VAR
-SELECT COUNT(@@local.innodb_undo_logs);
---echo Expected error 'Variable is a GLOBAL variable'
-
---Error ER_INCORRECT_GLOBAL_LOCAL_VAR
-SELECT COUNT(@@SESSION.innodb_undo_logs);
---echo Expected error 'Variable is a GLOBAL variable'
-
---Error ER_BAD_FIELD_ERROR
-SELECT innodb_undo_logs = @@SESSION.innodb_undo_logs;
-
-# Begin Bug 13604034
-# SET GLOBAL INNODB_UNDO_LOGS=0 SUCCEEDS BUT LEADS TO AN ASSERT
-# MAX_UNDO_LOGS > 0
---echo Begin bug 13604034
-select @@innodb_undo_logs;
---echo 128 Expected
-set global innodb_undo_logs = 129;
-select @@innodb_undo_logs;
---echo 128 Expected
-set global innodb_undo_logs = 0;
-select @@innodb_undo_logs;
---echo 1 Expected
-set global innodb_undo_logs = -1;
-select @@innodb_undo_logs;
---echo 1 Expected
-set global innodb_undo_logs = 50;
-select @@innodb_undo_logs;
---echo 50 Expected
-set global innodb_undo_logs = default;
-select @@innodb_undo_logs;
---echo 128 Expected
---echo End bug 13604034
-# End Bug 13604034
+SET global innodb_undo_logs=100;
+SELECT @@global.innodb_undo_logs;
+--error ER_GLOBAL_VARIABLE
+SET session innodb_undo_logs=1;
+
+#
+# incorrect types
+#
+--error ER_WRONG_TYPE_FOR_VAR
+SET global innodb_undo_logs=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+SET global innodb_undo_logs=1e1;
+--error ER_WRONG_TYPE_FOR_VAR
+SET global innodb_undo_logs="foo";
+SET global innodb_undo_logs=-7;
+SELECT @@global.innodb_undo_logs;
+--disable_warnings
+SELECT * FROM information_schema.global_variables
+WHERE variable_name='innodb_undo_logs';
+--enable_warnings
diff --git a/mysql-test/suite/sys_vars/t/innodb_use_native_aio_basic.test b/mysql-test/suite/sys_vars/t/innodb_use_native_aio_basic.test
index 524b5a7b161..67a5755fc17 100644
--- a/mysql-test/suite/sys_vars/t/innodb_use_native_aio_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_use_native_aio_basic.test
@@ -82,7 +82,7 @@ SELECT @@innodb_use_native_aio = @@GLOBAL.innodb_use_native_aio;
--echo '#---------------------BS_STVARS_035_05----------------------#'
################################################################################
-# Check if innodb_log_file_size can be accessed with and without @@ sign #
+# Check if innodb_use_native_aio can be accessed with and without @@ sign #
################################################################################
SELECT COUNT(@@innodb_use_native_aio);
diff --git a/mysql-test/suite/sys_vars/t/local_infile_func.test b/mysql-test/suite/sys_vars/t/local_infile_func.test
index 99bb9c65715..be26fb5bff9 100644
--- a/mysql-test/suite/sys_vars/t/local_infile_func.test
+++ b/mysql-test/suite/sys_vars/t/local_infile_func.test
@@ -74,7 +74,7 @@ DROP TABLE IF EXISTS t1;
create table t1(a int);
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
---Error ER_NOT_ALLOWED_COMMAND
+--Error ER_LOAD_INFILE_CAPABILITY_DISABLED
eval LOAD DATA LOCAL INFILE
'$MYSQLTEST_VARDIR/std_data/numbers.txt' INTO TABLE test.t1;
diff --git a/mysql-test/suite/sys_vars/t/log_bin_compress_grant.test b/mysql-test/suite/sys_vars/t/log_bin_compress_grant.test
new file mode 100644
index 00000000000..3b2c7849948
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/log_bin_compress_grant.test
@@ -0,0 +1,9 @@
+--echo #
+--echo # MDEV-21963 Bind BINLOG ADMIN to a number of global system variables
+--echo #
+
+--let var = log_bin_compress
+--let grant = BINLOG ADMIN
+--let value = 1
+
+--source suite/sys_vars/inc/sysvar_global_grant.inc
diff --git a/mysql-test/suite/sys_vars/t/log_bin_compress_min_len_grant.test b/mysql-test/suite/sys_vars/t/log_bin_compress_min_len_grant.test
new file mode 100644
index 00000000000..26eff8c9b30
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/log_bin_compress_min_len_grant.test
@@ -0,0 +1,9 @@
+--echo #
+--echo # MDEV-21963 Bind BINLOG ADMIN to a number of global system variables
+--echo #
+
+--let var = log_bin_compress_min_len
+--let grant = BINLOG ADMIN
+--let value = 512
+
+--source suite/sys_vars/inc/sysvar_global_grant.inc
diff --git a/mysql-test/suite/sys_vars/t/log_bin_trust_function_creators_grant.test b/mysql-test/suite/sys_vars/t/log_bin_trust_function_creators_grant.test
new file mode 100644
index 00000000000..0744987e189
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/log_bin_trust_function_creators_grant.test
@@ -0,0 +1,9 @@
+--echo #
+--echo # MDEV-21963 Bind BINLOG ADMIN to a number of global system variables
+--echo #
+
+--let var = log_bin_trust_function_creators
+--let grant = BINLOG ADMIN
+--let value = 1
+
+--source suite/sys_vars/inc/sysvar_global_grant.inc
diff --git a/mysql-test/suite/sys_vars/t/master_verify_checksum_grant.test b/mysql-test/suite/sys_vars/t/master_verify_checksum_grant.test
new file mode 100644
index 00000000000..33fa2a8a527
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/master_verify_checksum_grant.test
@@ -0,0 +1,9 @@
+--echo #
+--echo # MDEV-21972 Bind REPLICATION MASTER ADMIN to master_verify_checksum
+--echo #
+
+--let var = master_verify_checksum
+--let grant = REPLICATION MASTER ADMIN
+--let value = 1
+
+--source suite/sys_vars/inc/sysvar_global_grant.inc
diff --git a/mysql-test/suite/sys_vars/t/max_binlog_cache_size_grant.test b/mysql-test/suite/sys_vars/t/max_binlog_cache_size_grant.test
new file mode 100644
index 00000000000..ae1178ca82c
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/max_binlog_cache_size_grant.test
@@ -0,0 +1,9 @@
+--echo #
+--echo # MDEV-21963 Bind BINLOG ADMIN to a number of global system variables
+--echo #
+
+--let var = max_binlog_cache_size
+--let grant = BINLOG ADMIN
+--let value = 4096
+
+--source suite/sys_vars/inc/sysvar_global_grant.inc
diff --git a/mysql-test/suite/sys_vars/t/max_binlog_size_grant.test b/mysql-test/suite/sys_vars/t/max_binlog_size_grant.test
new file mode 100644
index 00000000000..05b7b2669fd
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/max_binlog_size_grant.test
@@ -0,0 +1,9 @@
+--echo #
+--echo # MDEV-21963 Bind BINLOG ADMIN to a number of global system variables
+--echo #
+
+--let var = max_binlog_size
+--let grant = BINLOG ADMIN
+--let value = 4096
+
+--source suite/sys_vars/inc/sysvar_global_grant.inc
diff --git a/mysql-test/suite/sys_vars/t/max_binlog_stmt_cache_size_grant.test b/mysql-test/suite/sys_vars/t/max_binlog_stmt_cache_size_grant.test
new file mode 100644
index 00000000000..d9decb6e40f
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/max_binlog_stmt_cache_size_grant.test
@@ -0,0 +1,9 @@
+--echo #
+--echo # MDEV-21963 Bind BINLOG ADMIN to a number of global system variables
+--echo #
+
+--let var = max_binlog_stmt_cache_size
+--let grant = BINLOG ADMIN
+--let value = 4096
+
+--source suite/sys_vars/inc/sysvar_global_grant.inc
diff --git a/mysql-test/suite/sys_vars/t/max_connect_errors_grant.test b/mysql-test/suite/sys_vars/t/max_connect_errors_grant.test
new file mode 100644
index 00000000000..d349d93818d
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/max_connect_errors_grant.test
@@ -0,0 +1,56 @@
+--source include/not_embedded.inc
+
+SET @global=@@global.max_connect_errors;
+
+--echo #
+--echo # MDEV-21961 Bind CONNECTION ADMIN to a number of global system variables
+--echo #
+
+--echo # Test that "SET max_connect_errors" is not allowed without CONNECTION ADMIN or SUPER
+
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE CONNECTION ADMIN, SUPER ON *.* FROM user1@localhost;
+--connect(user1,localhost,user1,,)
+--connection user1
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+SET GLOBAL max_connect_errors=10;
+--error ER_GLOBAL_VARIABLE
+SET max_connect_errors=10;
+--error ER_GLOBAL_VARIABLE
+SET SESSION max_connect_errors=10;
+--disconnect user1
+--connection default
+DROP USER user1@localhost;
+
+--echo # Test that "SET max_connect_errors" is allowed with CONNECTION ADMIN
+
+CREATE USER user1@localhost;
+GRANT CONNECTION ADMIN ON *.* TO user1@localhost;
+--connect(user1,localhost,user1,,)
+--connection user1
+SET GLOBAL max_connect_errors=10;
+--error ER_GLOBAL_VARIABLE
+SET max_connect_errors=10;
+--error ER_GLOBAL_VARIABLE
+SET SESSION max_connect_errors=10;
+--disconnect user1
+--connection default
+DROP USER user1@localhost;
+
+--echo # Test that "SET max_connect_errors" is allowed with SUPER
+
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+--connect(user1,localhost,user1,,)
+--connection user1
+SET GLOBAL max_connect_errors=10;
+--error ER_GLOBAL_VARIABLE
+SET max_connect_errors=10;
+--error ER_GLOBAL_VARIABLE
+SET SESSION max_connect_errors=10;
+--disconnect user1
+--connection default
+DROP USER user1@localhost;
+
+SET @@global.max_connect_errors=@global;
diff --git a/mysql-test/suite/sys_vars/t/max_connections_grant.test b/mysql-test/suite/sys_vars/t/max_connections_grant.test
new file mode 100644
index 00000000000..d51bd08ed9d
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/max_connections_grant.test
@@ -0,0 +1,56 @@
+--source include/not_embedded.inc
+
+SET @global=@@global.max_connections;
+
+--echo #
+--echo # MDEV-21961 Bind CONNECTION ADMIN to a number of global system variables
+--echo #
+
+--echo # Test that "SET max_connections" is not allowed without CONNECTION ADMIN or SUPER
+
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE CONNECTION ADMIN, SUPER ON *.* FROM user1@localhost;
+--connect(user1,localhost,user1,,)
+--connection user1
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+SET GLOBAL max_connections=10;
+--error ER_GLOBAL_VARIABLE
+SET max_connections=10;
+--error ER_GLOBAL_VARIABLE
+SET SESSION max_connections=10;
+--disconnect user1
+--connection default
+DROP USER user1@localhost;
+
+--echo # Test that "SET max_connections" is allowed with CONNECTION ADMIN
+
+CREATE USER user1@localhost;
+GRANT CONNECTION ADMIN ON *.* TO user1@localhost;
+--connect(user1,localhost,user1,,)
+--connection user1
+SET GLOBAL max_connections=10;
+--error ER_GLOBAL_VARIABLE
+SET max_connections=10;
+--error ER_GLOBAL_VARIABLE
+SET SESSION max_connections=10;
+--disconnect user1
+--connection default
+DROP USER user1@localhost;
+
+--echo # Test that "SET max_connections" is allowed with SUPER
+
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+--connect(user1,localhost,user1,,)
+--connection user1
+SET GLOBAL max_connections=10;
+--error ER_GLOBAL_VARIABLE
+SET max_connections=10;
+--error ER_GLOBAL_VARIABLE
+SET SESSION max_connections=10;
+--disconnect user1
+--connection default
+DROP USER user1@localhost;
+
+SET @@global.max_connections=@global;
diff --git a/mysql-test/suite/sys_vars/t/max_long_data_size_basic.test b/mysql-test/suite/sys_vars/t/max_long_data_size_basic.test
deleted file mode 100644
index eefa61bd4b7..00000000000
--- a/mysql-test/suite/sys_vars/t/max_long_data_size_basic.test
+++ /dev/null
@@ -1,17 +0,0 @@
-select @@global.max_long_data_size=20;
---error ER_INCORRECT_GLOBAL_LOCAL_VAR
-select @@session.max_long_data_size;
-
-# Show that value of the variable matches the value in the GLOBAL I_S table
-SELECT @@global.max_long_data_size = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='max_long_data_size';
-
-#
-# show that it's read-only
-#
---error ER_INCORRECT_GLOBAL_LOCAL_VAR
-set global max_long_data_size=1;
---error ER_INCORRECT_GLOBAL_LOCAL_VAR
-set session max_long_data_size=1;
-
diff --git a/mysql-test/suite/sys_vars/t/max_password_errors_grant.test b/mysql-test/suite/sys_vars/t/max_password_errors_grant.test
new file mode 100644
index 00000000000..f11c1fb8226
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/max_password_errors_grant.test
@@ -0,0 +1,56 @@
+--source include/not_embedded.inc
+
+SET @global=@@global.max_password_errors;
+
+--echo #
+--echo # MDEV-21961 Bind CONNECTION ADMIN to a number of global system variables
+--echo #
+
+--echo # Test that "SET max_password_errors" is not allowed without CONNECTION ADMIN or SUPER
+
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE CONNECTION ADMIN, SUPER ON *.* FROM user1@localhost;
+--connect(user1,localhost,user1,,)
+--connection user1
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+SET GLOBAL max_password_errors=10;
+--error ER_GLOBAL_VARIABLE
+SET max_password_errors=10;
+--error ER_GLOBAL_VARIABLE
+SET SESSION max_password_errors=10;
+--disconnect user1
+--connection default
+DROP USER user1@localhost;
+
+--echo # Test that "SET max_password_errors" is allowed with CONNECTION ADMIN
+
+CREATE USER user1@localhost;
+GRANT CONNECTION ADMIN ON *.* TO user1@localhost;
+--connect(user1,localhost,user1,,)
+--connection user1
+SET GLOBAL max_password_errors=10;
+--error ER_GLOBAL_VARIABLE
+SET max_password_errors=10;
+--error ER_GLOBAL_VARIABLE
+SET SESSION max_password_errors=10;
+--disconnect user1
+--connection default
+DROP USER user1@localhost;
+
+--echo # Test that "SET max_password_errors" is allowed with SUPER
+
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+--connect(user1,localhost,user1,,)
+--connection user1
+SET GLOBAL max_password_errors=10;
+--error ER_GLOBAL_VARIABLE
+SET max_password_errors=10;
+--error ER_GLOBAL_VARIABLE
+SET SESSION max_password_errors=10;
+--disconnect user1
+--connection default
+DROP USER user1@localhost;
+
+SET @@global.max_password_errors=@global;
diff --git a/mysql-test/suite/sys_vars/t/multi_range_count_basic.test b/mysql-test/suite/sys_vars/t/multi_range_count_basic.test
deleted file mode 100644
index b54b3d348aa..00000000000
--- a/mysql-test/suite/sys_vars/t/multi_range_count_basic.test
+++ /dev/null
@@ -1,234 +0,0 @@
-############## mysql-test\t\multi_range_count_basic.test ###############
-# #
-# Variable Name: multi_range_count #
-# Scope: GLOBAL | SESSION #
-# Access Type: Dynamic #
-# Data Type: numeric #
-# Default Value: 256 #
-# Range:1-4294967295 #
-# #
-# #
-# Creation Date: 2008-02-07 #
-# Author: Salman #
-# #
-# Description: Test Cases of Dynamic System Variable multi_range_count #
-# that checks the behavior of this variable in the following ways#
-# * Default Value #
-# * Valid & Invalid values #
-# * Scope & Access method #
-# * Data Integrity #
-# #
-# Reference: http://dev.mysql.com/doc/refman/5.1/en/ #
-# server-system-variables.html #
-# #
-###############################################################################
-
---source include/load_sysvars.inc
-
-#################################################################
-# START OF multi_range_count TESTS #
-#################################################################
-
-
-#############################################################
-# Save initial value #
-#############################################################
-
-SET @start_global_value = @@global.multi_range_count;
-SELECT @start_global_value;
-SET @start_session_value = @@session.multi_range_count;
-SELECT @start_session_value;
-
-
---echo '#--------------------FN_DYNVARS_090_01-------------------------#'
-#################################################################
-# Display the DEFAULT value of multi_range_count #
-#################################################################
-
-SET @@global.multi_range_count = 100;
-SET @@global.multi_range_count = DEFAULT;
-SELECT @@global.multi_range_count;
-
-SET @@session.multi_range_count = 200;
-SET @@session.multi_range_count = DEFAULT;
-SELECT @@session.multi_range_count;
-
-
---echo '#--------------------FN_DYNVARS_090_02-------------------------#'
-#################################################################
-# Check the DEFAULT value of multi_range_count #
-#################################################################
-
-SET @@global.multi_range_count = DEFAULT;
-SELECT @@global.multi_range_count = 256;
-
-SET @@session.multi_range_count = DEFAULT;
-SELECT @@session.multi_range_count = 256;
-
-
---echo '#--------------------FN_DYNVARS_090_03-------------------------#'
-###########################################################################
-# Change the value of multi_range_count to a valid value for GLOBAL Scope #
-###########################################################################
-
-SET @@global.multi_range_count = 1;
-SELECT @@global.multi_range_count;
-SET @@global.multi_range_count = 60020;
-SELECT @@global.multi_range_count;
-SET @@global.multi_range_count = 65535;
-SELECT @@global.multi_range_count;
-SET @@global.multi_range_count = 4294967295;
-SELECT @@global.multi_range_count;
-SET @@global.multi_range_count = 4294967294;
-SELECT @@global.multi_range_count;
-
-
-
---echo '#--------------------FN_DYNVARS_090_04-------------------------#'
-############################################################################
-# Change the value of multi_range_count to a valid value for SESSION Scope #
-############################################################################
-
-SET @@session.multi_range_count = 1;
-SELECT @@session.multi_range_count;
-SET @@session.multi_range_count = 50050;
-SELECT @@session.multi_range_count;
-SET @@session.multi_range_count = 65535;
-SELECT @@session.multi_range_count;
-SET @@session.multi_range_count = 4294967295;
-SELECT @@session.multi_range_count;
-SET @@session.multi_range_count = 4294967294;
-SELECT @@session.multi_range_count;
-
-
---echo '#------------------FN_DYNVARS_090_05-----------------------#'
-#############################################################
-# Change the value of multi_range_count to an invalid value #
-#############################################################
-
-SET @@global.multi_range_count = 0;
-SELECT @@global.multi_range_count;
---disable_warnings
-SET @@global.multi_range_count = 4294967296;
---enable_warnings
---replace_result 4294967296 4294967295
-SELECT @@global.multi_range_count;
-SET @@global.multi_range_count = -1024;
-SELECT @@global.multi_range_count;
---disable_warnings
-SET @@global.multi_range_count = 429496729500;
---enable_warnings
---replace_result 429496729500 4294967295
-SELECT @@global.multi_range_count;
---Error ER_WRONG_TYPE_FOR_VAR
-SET @@global.multi_range_count = 65530.34;
---replace_result 429496729500 4294967295
-SELECT @@global.multi_range_count;
---Error ER_WRONG_TYPE_FOR_VAR
-SET @@global.multi_range_count = test;
---replace_result 429496729500 4294967295
-SELECT @@global.multi_range_count;
-
-SET @@session.multi_range_count = 0;
-SELECT @@session.multi_range_count;
---disable_warnings
-SET @@session.multi_range_count = 4294967296;
---enable_warnings
---replace_result 4294967296 4294967295
-SELECT @@session.multi_range_count;
-SET @@session.multi_range_count = -1;
-SELECT @@session.multi_range_count;
---Error ER_PARSE_ERROR
-SET @@session.multi_range_count = 65530.34.;
---disable_warnings
-SET @@session.multi_range_count = 4294967295021;
---enable_warnings
---replace_result 4294967295021 4294967295
-SELECT @@session.multi_range_count;
---echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
-
---Error ER_WRONG_TYPE_FOR_VAR
-SET @@session.multi_range_count = test;
---replace_result 4294967295021 4294967295
-SELECT @@session.multi_range_count;
-
-
---echo '#------------------FN_DYNVARS_090_06-----------------------#'
-####################################################################
-# Check if the value in GLOBAL Table matches value in variable #
-####################################################################
-
-
-SELECT @@global.multi_range_count = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='multi_range_count';
-
---echo '#------------------FN_DYNVARS_090_07-----------------------#'
-####################################################################
-# Check if the value in SESSION Table matches value in variable #
-####################################################################
-
-SELECT @@session.multi_range_count = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.SESSION_VARIABLES
-WHERE VARIABLE_NAME='multi_range_count';
-
-
---echo '#------------------FN_DYNVARS_090_08-----------------------#'
-####################################################################
-# Check if TRUE and FALSE values can be used on variable #
-####################################################################
-
-SET @@global.multi_range_count = TRUE;
-SELECT @@global.multi_range_count;
-SET @@global.multi_range_count = FALSE;
-SELECT @@global.multi_range_count;
-
-
---echo '#---------------------FN_DYNVARS_090_09----------------------#'
-#################################################################################
-# Check if accessing variable with and without GLOBAL point to same variable #
-#################################################################################
-
-SET @@global.multi_range_count = 10;
-SELECT @@multi_range_count = @@global.multi_range_count;
-
-
---echo '#---------------------FN_DYNVARS_090_10----------------------#'
-########################################################################################################
-# Check if accessing variable with SESSION,LOCAL and without SCOPE points to same session variable #
-########################################################################################################
-
-SET @@multi_range_count = 100;
-SELECT @@multi_range_count = @@local.multi_range_count;
-SELECT @@local.multi_range_count = @@session.multi_range_count;
-
-
---echo '#---------------------FN_DYNVARS_090_11----------------------#'
-############################################################################
-# Check if multi_range_count can be accessed with and without @@ sign #
-############################################################################
-
-SET multi_range_count = 1;
-SELECT @@multi_range_count;
---Error ER_UNKNOWN_TABLE
-SELECT local.multi_range_count;
---Error ER_UNKNOWN_TABLE
-SELECT session.multi_range_count;
---Error ER_BAD_FIELD_ERROR
-SELECT multi_range_count = @@session.multi_range_count;
-
-
-####################################
-# Restore initial value #
-####################################
-
-SET @@global.multi_range_count = @start_global_value;
-SELECT @@global.multi_range_count;
-SET @@session.multi_range_count = @start_session_value;
-SELECT @@session.multi_range_count;
-
-
-######################################################
-# END OF multi_range_count TESTS #
-######################################################
-
diff --git a/mysql-test/suite/sys_vars/t/preudo_thread_id_grant.test b/mysql-test/suite/sys_vars/t/preudo_thread_id_grant.test
new file mode 100644
index 00000000000..eebf2cd340e
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/preudo_thread_id_grant.test
@@ -0,0 +1,9 @@
+--echo #
+--echo # MDEV-21975 Add BINLOG REPLAY privilege and bind new privileges to gtid_seq_no, preudo_thread_id, server_id, gtid_domain_id
+--echo #
+
+--let var = pseudo_thread_id
+--let grant = BINLOG REPLAY
+--let value = 1
+
+--source suite/sys_vars/inc/sysvar_session_grant.inc
diff --git a/mysql-test/suite/sys_vars/t/proxy_protocol_networks_grant.test b/mysql-test/suite/sys_vars/t/proxy_protocol_networks_grant.test
new file mode 100644
index 00000000000..f2dd8158424
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/proxy_protocol_networks_grant.test
@@ -0,0 +1,56 @@
+--source include/not_embedded.inc
+
+SET @global=@@global.proxy_protocol_networks;
+
+--echo #
+--echo # MDEV-21961 Bind CONNECTION ADMIN to a number of global system variables
+--echo #
+
+--echo # Test that "SET proxy_protocol_networks" is not allowed without CONNECTION ADMIN or SUPER
+
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE CONNECTION ADMIN, SUPER ON *.* FROM user1@localhost;
+--connect(user1,localhost,user1,,)
+--connection user1
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+SET GLOBAL proxy_protocol_networks="";
+--error ER_GLOBAL_VARIABLE
+SET proxy_protocol_networks="";
+--error ER_GLOBAL_VARIABLE
+SET SESSION proxy_protocol_networks="";
+--disconnect user1
+--connection default
+DROP USER user1@localhost;
+
+--echo # Test that "SET proxy_protocol_networks" is allowed with CONNECTION ADMIN
+
+CREATE USER user1@localhost;
+GRANT CONNECTION ADMIN ON *.* TO user1@localhost;
+--connect(user1,localhost,user1,,)
+--connection user1
+SET GLOBAL proxy_protocol_networks="";
+--error ER_GLOBAL_VARIABLE
+SET proxy_protocol_networks="";
+--error ER_GLOBAL_VARIABLE
+SET SESSION proxy_protocol_networks="";
+--disconnect user1
+--connection default
+DROP USER user1@localhost;
+
+--echo # Test that "SET proxy_protocol_networks" is allowed with SUPER
+
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+--connect(user1,localhost,user1,,)
+--connection user1
+SET GLOBAL proxy_protocol_networks="";
+--error ER_GLOBAL_VARIABLE
+SET proxy_protocol_networks="";
+--error ER_GLOBAL_VARIABLE
+SET SESSION proxy_protocol_networks="";
+--disconnect user1
+--connection default
+DROP USER user1@localhost;
+
+SET @@global.proxy_protocol_networks=@global;
diff --git a/mysql-test/suite/sys_vars/t/read_binlog_speed_limit_grant.test b/mysql-test/suite/sys_vars/t/read_binlog_speed_limit_grant.test
new file mode 100644
index 00000000000..cb060e6c420
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/read_binlog_speed_limit_grant.test
@@ -0,0 +1,9 @@
+--echo #
+--echo # MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
+--echo #
+
+--let var = read_binlog_speed_limit
+--let grant = REPLICATION SLAVE ADMIN
+--let value = 65536
+
+--source suite/sys_vars/inc/sysvar_global_grant.inc
diff --git a/mysql-test/suite/sys_vars/t/read_only_grant.test b/mysql-test/suite/sys_vars/t/read_only_grant.test
new file mode 100644
index 00000000000..d6abef93aed
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/read_only_grant.test
@@ -0,0 +1,52 @@
+--source include/not_embedded.inc
+
+--echo #
+--echo # MDEV-21960 Bind READ_ONLY ADMIN to @@read_only
+--echo #
+
+--echo # Test that "SET read_only" is not allowed without READ_ONLY ADMIN or SUPER
+
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE READ_ONLY ADMIN, SUPER ON *.* FROM user1@localhost;
+--connect(user1,localhost,user1,,)
+--connection user1
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+SET GLOBAL read_only=0;
+--error ER_GLOBAL_VARIABLE
+SET read_only=0;
+--error ER_GLOBAL_VARIABLE
+SET SESSION read_only=0;
+--disconnect user1
+--connection default
+DROP USER user1@localhost;
+
+--echo # Test that "SET read_only" is allowed with READ_ONLY ADMIN
+
+CREATE USER user1@localhost;
+GRANT READ_ONLY ADMIN ON *.* TO user1@localhost;
+--connect(user1,localhost,user1,,)
+--connection user1
+SET GLOBAL read_only=0;
+--error ER_GLOBAL_VARIABLE
+SET read_only=0;
+--error ER_GLOBAL_VARIABLE
+SET SESSION read_only=0;
+--disconnect user1
+--connection default
+DROP USER user1@localhost;
+
+--echo # Test that "SET read_only" is allowed with SUPER
+
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+--connect(user1,localhost,user1,,)
+--connection user1
+SET GLOBAL read_only=0;
+--error ER_GLOBAL_VARIABLE
+SET read_only=0;
+--error ER_GLOBAL_VARIABLE
+SET SESSION read_only=0;
+--disconnect user1
+--connection default
+DROP USER user1@localhost;
diff --git a/mysql-test/suite/sys_vars/t/relay_log_purge_grant.test b/mysql-test/suite/sys_vars/t/relay_log_purge_grant.test
new file mode 100644
index 00000000000..f93d7048d86
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/relay_log_purge_grant.test
@@ -0,0 +1,9 @@
+--echo #
+--echo # MDEV-21969 Bind REPLICATION SLAVE ADMIN to relay_log_*, sync_master_info, sync_relay_log, sync_relay_log_info
+--echo #
+
+--let var = relay_log_purge
+--let grant = REPLICATION SLAVE ADMIN
+--let value = 1
+
+--source suite/sys_vars/inc/sysvar_global_grant.inc
diff --git a/mysql-test/suite/sys_vars/t/relay_log_recovery_grant.test b/mysql-test/suite/sys_vars/t/relay_log_recovery_grant.test
new file mode 100644
index 00000000000..1c052618bdb
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/relay_log_recovery_grant.test
@@ -0,0 +1,9 @@
+--echo #
+--echo # MDEV-21969 Bind REPLICATION SLAVE ADMIN to relay_log_*, sync_master_info, sync_relay_log, sync_relay_log_info
+--echo #
+
+--let var = relay_log_recovery
+--let grant = REPLICATION SLAVE ADMIN
+--let value = 1
+
+--source suite/sys_vars/inc/sysvar_global_grant.inc
diff --git a/mysql-test/suite/sys_vars/t/replicate_do_db_grant.test b/mysql-test/suite/sys_vars/t/replicate_do_db_grant.test
new file mode 100644
index 00000000000..fa6023ce73e
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/replicate_do_db_grant.test
@@ -0,0 +1,9 @@
+--echo #
+--echo # MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
+--echo #
+
+--let var = replicate_do_db
+--let grant = REPLICATION SLAVE ADMIN
+--let value = ''
+
+--source suite/sys_vars/inc/sysvar_global_grant.inc
diff --git a/mysql-test/suite/sys_vars/t/replicate_do_table_grant.test b/mysql-test/suite/sys_vars/t/replicate_do_table_grant.test
new file mode 100644
index 00000000000..7dc800a331f
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/replicate_do_table_grant.test
@@ -0,0 +1,9 @@
+--echo #
+--echo # MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
+--echo #
+
+--let var = replicate_do_table
+--let grant = REPLICATION SLAVE ADMIN
+--let value = ''
+
+--source suite/sys_vars/inc/sysvar_global_grant.inc
diff --git a/mysql-test/suite/sys_vars/t/replicate_events_marked_for_skip_grant.test b/mysql-test/suite/sys_vars/t/replicate_events_marked_for_skip_grant.test
new file mode 100644
index 00000000000..1baed3fecaa
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/replicate_events_marked_for_skip_grant.test
@@ -0,0 +1,9 @@
+--echo #
+--echo # MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
+--echo #
+
+--let var = replicate_events_marked_for_skip
+--let grant = REPLICATION SLAVE ADMIN
+--let value = REPLICATE
+
+--source suite/sys_vars/inc/sysvar_global_grant.inc
diff --git a/mysql-test/suite/sys_vars/t/replicate_ignore_db_grant.test b/mysql-test/suite/sys_vars/t/replicate_ignore_db_grant.test
new file mode 100644
index 00000000000..c073ccf2b7d
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/replicate_ignore_db_grant.test
@@ -0,0 +1,9 @@
+--echo #
+--echo # MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
+--echo #
+
+--let var = replicate_ignore_db
+--let grant = REPLICATION SLAVE ADMIN
+--let value = ''
+
+--source suite/sys_vars/inc/sysvar_global_grant.inc
diff --git a/mysql-test/suite/sys_vars/t/replicate_ignore_table_grant.test b/mysql-test/suite/sys_vars/t/replicate_ignore_table_grant.test
new file mode 100644
index 00000000000..d34a95cc55b
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/replicate_ignore_table_grant.test
@@ -0,0 +1,9 @@
+--echo #
+--echo # MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
+--echo #
+
+--let var = replicate_ignore_table
+--let grant = REPLICATION SLAVE ADMIN
+--let value = ''
+
+--source suite/sys_vars/inc/sysvar_global_grant.inc
diff --git a/mysql-test/suite/sys_vars/t/replicate_wild_do_table_grant.test b/mysql-test/suite/sys_vars/t/replicate_wild_do_table_grant.test
new file mode 100644
index 00000000000..f787b3336e6
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/replicate_wild_do_table_grant.test
@@ -0,0 +1,9 @@
+--echo #
+--echo # MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
+--echo #
+
+--let var = replicate_wild_do_table
+--let grant = REPLICATION SLAVE ADMIN
+--let value = ''
+
+--source suite/sys_vars/inc/sysvar_global_grant.inc
diff --git a/mysql-test/suite/sys_vars/t/replicate_wild_ignore_table_grant.test b/mysql-test/suite/sys_vars/t/replicate_wild_ignore_table_grant.test
new file mode 100644
index 00000000000..f4ed0cc5072
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/replicate_wild_ignore_table_grant.test
@@ -0,0 +1,9 @@
+--echo #
+--echo # MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
+--echo #
+
+--let var = replicate_wild_ignore_table
+--let grant = REPLICATION SLAVE ADMIN
+--let value = ''
+
+--source suite/sys_vars/inc/sysvar_global_grant.inc
diff --git a/mysql-test/suite/sys_vars/t/rpl_semi_sync_master_enabled_grant.test b/mysql-test/suite/sys_vars/t/rpl_semi_sync_master_enabled_grant.test
new file mode 100644
index 00000000000..813f42403aa
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/rpl_semi_sync_master_enabled_grant.test
@@ -0,0 +1,9 @@
+--echo #
+--echo # MDEV-21967 Bind REPLICATION {MASTER|SLAVE} ADMIN to rpl_semi_sync_* variables
+--echo #
+
+--let var = rpl_semi_sync_master_enabled
+--let grant = REPLICATION MASTER ADMIN
+--let value = 1
+
+--source suite/sys_vars/inc/sysvar_global_grant.inc
diff --git a/mysql-test/suite/sys_vars/t/rpl_semi_sync_master_timeout_grant.test b/mysql-test/suite/sys_vars/t/rpl_semi_sync_master_timeout_grant.test
new file mode 100644
index 00000000000..6fbf219bffa
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/rpl_semi_sync_master_timeout_grant.test
@@ -0,0 +1,9 @@
+--echo #
+--echo # MDEV-21967 Bind REPLICATION {MASTER|SLAVE} ADMIN to rpl_semi_sync_* variables
+--echo #
+
+--let var = rpl_semi_sync_master_timeout
+--let grant = REPLICATION MASTER ADMIN
+--let value = 20000
+
+--source suite/sys_vars/inc/sysvar_global_grant.inc
diff --git a/mysql-test/suite/sys_vars/t/rpl_semi_sync_master_trace_level_grant.test b/mysql-test/suite/sys_vars/t/rpl_semi_sync_master_trace_level_grant.test
new file mode 100644
index 00000000000..66aa8272956
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/rpl_semi_sync_master_trace_level_grant.test
@@ -0,0 +1,9 @@
+--echo #
+--echo # MDEV-21967 Bind REPLICATION {MASTER|SLAVE} ADMIN to rpl_semi_sync_* variables
+--echo #
+
+--let var = rpl_semi_sync_master_trace_level
+--let grant = REPLICATION MASTER ADMIN
+--let value = 64
+
+--source suite/sys_vars/inc/sysvar_global_grant.inc
diff --git a/mysql-test/suite/sys_vars/t/rpl_semi_sync_master_wait_no_slave_grant.test b/mysql-test/suite/sys_vars/t/rpl_semi_sync_master_wait_no_slave_grant.test
new file mode 100644
index 00000000000..33571013b46
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/rpl_semi_sync_master_wait_no_slave_grant.test
@@ -0,0 +1,9 @@
+--echo #
+--echo # MDEV-21967 Bind REPLICATION {MASTER|SLAVE} ADMIN to rpl_semi_sync_* variables
+--echo #
+
+--let var = rpl_semi_sync_master_wait_no_slave
+--let grant = REPLICATION MASTER ADMIN
+--let value = 1
+
+--source suite/sys_vars/inc/sysvar_global_grant.inc
diff --git a/mysql-test/suite/sys_vars/t/rpl_semi_sync_master_wait_point_grant.test b/mysql-test/suite/sys_vars/t/rpl_semi_sync_master_wait_point_grant.test
new file mode 100644
index 00000000000..7f997d850b6
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/rpl_semi_sync_master_wait_point_grant.test
@@ -0,0 +1,9 @@
+--echo #
+--echo # MDEV-21967 Bind REPLICATION {MASTER|SLAVE} ADMIN to rpl_semi_sync_* variables
+--echo #
+
+--let var = rpl_semi_sync_master_wait_point
+--let grant = REPLICATION MASTER ADMIN
+--let value = AFTER_SYNC
+
+--source suite/sys_vars/inc/sysvar_global_grant.inc
diff --git a/mysql-test/suite/sys_vars/t/rpl_semi_sync_slave_delay_master_grant.test b/mysql-test/suite/sys_vars/t/rpl_semi_sync_slave_delay_master_grant.test
new file mode 100644
index 00000000000..2e065913701
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/rpl_semi_sync_slave_delay_master_grant.test
@@ -0,0 +1,9 @@
+--echo #
+--echo # MDEV-21967 Bind REPLICATION {MASTER|SLAVE} ADMIN to rpl_semi_sync_* variables
+--echo #
+
+--let var = rpl_semi_sync_slave_delay_master
+--let grant = REPLICATION SLAVE ADMIN
+--let value = 1
+
+--source suite/sys_vars/inc/sysvar_global_grant.inc
diff --git a/mysql-test/suite/sys_vars/t/rpl_semi_sync_slave_enabled_grant.test b/mysql-test/suite/sys_vars/t/rpl_semi_sync_slave_enabled_grant.test
new file mode 100644
index 00000000000..d0515fbbfe6
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/rpl_semi_sync_slave_enabled_grant.test
@@ -0,0 +1,9 @@
+--echo #
+--echo # MDEV-21967 Bind REPLICATION {MASTER|SLAVE} ADMIN to rpl_semi_sync_* variables
+--echo #
+
+--let var = rpl_semi_sync_slave_enabled
+--let grant = REPLICATION SLAVE ADMIN
+--let value = 1
+
+--source suite/sys_vars/inc/sysvar_global_grant.inc
diff --git a/mysql-test/suite/sys_vars/t/rpl_semi_sync_slave_kill_conn_timeout_grant.test b/mysql-test/suite/sys_vars/t/rpl_semi_sync_slave_kill_conn_timeout_grant.test
new file mode 100644
index 00000000000..ccbd2d96496
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/rpl_semi_sync_slave_kill_conn_timeout_grant.test
@@ -0,0 +1,9 @@
+--echo #
+--echo # MDEV-21967 Bind REPLICATION {MASTER|SLAVE} ADMIN to rpl_semi_sync_* variables
+--echo #
+
+--let var = rpl_semi_sync_slave_kill_conn_timeout
+--let grant = REPLICATION SLAVE ADMIN
+--let value = 1
+
+--source suite/sys_vars/inc/sysvar_global_grant.inc
diff --git a/mysql-test/suite/sys_vars/t/rpl_semi_sync_slave_trace_level_grant.test b/mysql-test/suite/sys_vars/t/rpl_semi_sync_slave_trace_level_grant.test
new file mode 100644
index 00000000000..0314dd1aa02
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/rpl_semi_sync_slave_trace_level_grant.test
@@ -0,0 +1,9 @@
+--echo #
+--echo # MDEV-21967 Bind REPLICATION {MASTER|SLAVE} ADMIN to rpl_semi_sync_* variables
+--echo #
+
+--let var = rpl_semi_sync_slave_trace_level
+--let grant = REPLICATION SLAVE ADMIN
+--let value = 64
+
+--source suite/sys_vars/inc/sysvar_global_grant.inc
diff --git a/mysql-test/suite/sys_vars/t/secure_auth_grant.test b/mysql-test/suite/sys_vars/t/secure_auth_grant.test
new file mode 100644
index 00000000000..f597ec790cb
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/secure_auth_grant.test
@@ -0,0 +1,56 @@
+--source include/not_embedded.inc
+
+SET @global=@@global.secure_auth;
+
+--echo #
+--echo # MDEV-21961 Bind CONNECTION ADMIN to a number of global system variables
+--echo #
+
+--echo # Test that "SET secure_auth" is not allowed without CONNECTION ADMIN or SUPER
+
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE CONNECTION ADMIN, SUPER ON *.* FROM user1@localhost;
+--connect(user1,localhost,user1,,)
+--connection user1
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+SET GLOBAL secure_auth=1;
+--error ER_GLOBAL_VARIABLE
+SET secure_auth=1;
+--error ER_GLOBAL_VARIABLE
+SET SESSION secure_auth=1;
+--disconnect user1
+--connection default
+DROP USER user1@localhost;
+
+--echo # Test that "SET secure_auth" is allowed with CONNECTION ADMIN
+
+CREATE USER user1@localhost;
+GRANT CONNECTION ADMIN ON *.* TO user1@localhost;
+--connect(user1,localhost,user1,,)
+--connection user1
+SET GLOBAL secure_auth=1;
+--error ER_GLOBAL_VARIABLE
+SET secure_auth=1;
+--error ER_GLOBAL_VARIABLE
+SET SESSION secure_auth=1;
+--disconnect user1
+--connection default
+DROP USER user1@localhost;
+
+--echo # Test that "SET secure_auth" is allowed with SUPER
+
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+--connect(user1,localhost,user1,,)
+--connection user1
+SET GLOBAL secure_auth=1;
+--error ER_GLOBAL_VARIABLE
+SET secure_auth=1;
+--error ER_GLOBAL_VARIABLE
+SET SESSION secure_auth=1;
+--disconnect user1
+--connection default
+DROP USER user1@localhost;
+
+SET @@global.secure_auth=@global;
diff --git a/mysql-test/suite/sys_vars/t/server_id_grant.test b/mysql-test/suite/sys_vars/t/server_id_grant.test
new file mode 100644
index 00000000000..9b0072b94d5
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/server_id_grant.test
@@ -0,0 +1,16 @@
+--echo #
+--echo # MDEV-21975 Add BINLOG REPLAY privilege and bind new privileges to gtid_seq_no, preudo_thread_id, server_id, gtid_domain_id
+--echo #
+
+--let var = server_id
+--let grant = REPLICATION MASTER ADMIN
+--let value = 1
+
+--source suite/sys_vars/inc/sysvar_global_grant_alone.inc
+
+
+--let var = server_id
+--let grant = BINLOG REPLAY
+--let value = 1
+
+--source suite/sys_vars/inc/sysvar_session_grant_alone.inc
diff --git a/mysql-test/suite/sys_vars/t/session_track_system_variables_basic.test b/mysql-test/suite/sys_vars/t/session_track_system_variables_basic.test
index ceb2353d823..8c1d5dd6546 100644
--- a/mysql-test/suite/sys_vars/t/session_track_system_variables_basic.test
+++ b/mysql-test/suite/sys_vars/t/session_track_system_variables_basic.test
@@ -12,10 +12,10 @@ SELECT @@session.session_track_system_variables;
--echo
--echo # via INFORMATION_SCHEMA.GLOBAL_VARIABLES
-SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME LIKE 'session_track%' ORDER BY VARIABLE_NAME;
+SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME LIKE 'session_track_system_variables' ORDER BY VARIABLE_NAME;
--echo # via INFORMATION_SCHEMA.SESSION_VARIABLES
-SELECT * FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME LIKE 'session_track%' ORDER BY VARIABLE_NAME;
+SELECT * FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME LIKE 'session_track_system_variables' ORDER BY VARIABLE_NAME;
# Save the global value to be used to restore the original value.
SET @global_saved_tmp = @@global.session_track_system_variables;
diff --git a/mysql-test/suite/sys_vars/t/slave_compressed_protocol_grant.test b/mysql-test/suite/sys_vars/t/slave_compressed_protocol_grant.test
new file mode 100644
index 00000000000..2db1a0f4fe0
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/slave_compressed_protocol_grant.test
@@ -0,0 +1,9 @@
+--echo #
+--echo # MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
+--echo #
+
+--let var = slave_compressed_protocol
+--let grant = REPLICATION SLAVE ADMIN
+--let value = 1
+
+--source suite/sys_vars/inc/sysvar_global_grant.inc
diff --git a/mysql-test/suite/sys_vars/t/slave_ddl_exec_mode_grant.test b/mysql-test/suite/sys_vars/t/slave_ddl_exec_mode_grant.test
new file mode 100644
index 00000000000..b6cee5ce18a
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/slave_ddl_exec_mode_grant.test
@@ -0,0 +1,9 @@
+--echo #
+--echo # MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
+--echo #
+
+--let var = slave_ddl_exec_mode
+--let grant = REPLICATION SLAVE ADMIN
+--let value = STRICT
+
+--source suite/sys_vars/inc/sysvar_global_grant.inc
diff --git a/mysql-test/suite/sys_vars/t/slave_domain_parallel_threads_grant.test b/mysql-test/suite/sys_vars/t/slave_domain_parallel_threads_grant.test
new file mode 100644
index 00000000000..138a8bfacb2
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/slave_domain_parallel_threads_grant.test
@@ -0,0 +1,9 @@
+--echo #
+--echo # MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
+--echo #
+
+--let var = slave_domain_parallel_threads
+--let grant = REPLICATION SLAVE ADMIN
+--let value = 0
+
+--source suite/sys_vars/inc/sysvar_global_grant.inc
diff --git a/mysql-test/suite/sys_vars/t/slave_exec_mode_grant.test b/mysql-test/suite/sys_vars/t/slave_exec_mode_grant.test
new file mode 100644
index 00000000000..47634ea3bd3
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/slave_exec_mode_grant.test
@@ -0,0 +1,9 @@
+--echo #
+--echo # MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
+--echo #
+
+--let var = slave_exec_mode
+--let grant = REPLICATION SLAVE ADMIN
+--let value = STRICT
+
+--source suite/sys_vars/inc/sysvar_global_grant.inc
diff --git a/mysql-test/suite/sys_vars/t/slave_max_allowed_packet_grant.test b/mysql-test/suite/sys_vars/t/slave_max_allowed_packet_grant.test
new file mode 100644
index 00000000000..2a873f11c71
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/slave_max_allowed_packet_grant.test
@@ -0,0 +1,9 @@
+--echo #
+--echo # MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
+--echo #
+
+--let var = slave_max_allowed_packet
+--let grant = REPLICATION SLAVE ADMIN
+--let value = 65536
+
+--source suite/sys_vars/inc/sysvar_global_grant.inc
diff --git a/mysql-test/suite/sys_vars/t/slave_net_timeout_grant.test b/mysql-test/suite/sys_vars/t/slave_net_timeout_grant.test
new file mode 100644
index 00000000000..3cb6f9a9fdb
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/slave_net_timeout_grant.test
@@ -0,0 +1,9 @@
+--echo #
+--echo # MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
+--echo #
+
+--let var = slave_net_timeout
+--let grant = REPLICATION SLAVE ADMIN
+--let value = 60
+
+--source suite/sys_vars/inc/sysvar_global_grant.inc
diff --git a/mysql-test/suite/sys_vars/t/slave_parallel_max_queued_grant.test b/mysql-test/suite/sys_vars/t/slave_parallel_max_queued_grant.test
new file mode 100644
index 00000000000..e23fe1a3dd4
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/slave_parallel_max_queued_grant.test
@@ -0,0 +1,9 @@
+--echo #
+--echo # MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
+--echo #
+
+--let var = slave_parallel_max_queued
+--let grant = REPLICATION SLAVE ADMIN
+--let value = 65536
+
+--source suite/sys_vars/inc/sysvar_global_grant.inc
diff --git a/mysql-test/suite/sys_vars/t/slave_parallel_mode_grant.test b/mysql-test/suite/sys_vars/t/slave_parallel_mode_grant.test
new file mode 100644
index 00000000000..a61640ede49
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/slave_parallel_mode_grant.test
@@ -0,0 +1,9 @@
+--echo #
+--echo # MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
+--echo #
+
+--let var = slave_parallel_mode
+--let grant = REPLICATION SLAVE ADMIN
+--let value = 1
+
+--source suite/sys_vars/inc/sysvar_global_grant.inc
diff --git a/mysql-test/suite/sys_vars/t/slave_parallel_threads_grant.test b/mysql-test/suite/sys_vars/t/slave_parallel_threads_grant.test
new file mode 100644
index 00000000000..8a8511223ae
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/slave_parallel_threads_grant.test
@@ -0,0 +1,9 @@
+--echo #
+--echo # MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
+--echo #
+
+--let var = slave_parallel_threads
+--let grant = REPLICATION SLAVE ADMIN
+--let value = 256
+
+--source suite/sys_vars/inc/sysvar_global_grant.inc
diff --git a/mysql-test/suite/sys_vars/t/slave_parallel_workers_grant.test b/mysql-test/suite/sys_vars/t/slave_parallel_workers_grant.test
new file mode 100644
index 00000000000..05974560dde
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/slave_parallel_workers_grant.test
@@ -0,0 +1,9 @@
+--echo #
+--echo # MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
+--echo #
+
+--let var = slave_parallel_workers
+--let grant = REPLICATION SLAVE ADMIN
+--let value = 256
+
+--source suite/sys_vars/inc/sysvar_global_grant.inc
diff --git a/mysql-test/suite/sys_vars/t/slave_run_triggers_for_rbr_grant.test b/mysql-test/suite/sys_vars/t/slave_run_triggers_for_rbr_grant.test
new file mode 100644
index 00000000000..91acd1ff918
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/slave_run_triggers_for_rbr_grant.test
@@ -0,0 +1,9 @@
+--echo #
+--echo # MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
+--echo #
+
+--let var = slave_run_triggers_for_rbr
+--let grant = REPLICATION SLAVE ADMIN
+--let value = YES
+
+--source suite/sys_vars/inc/sysvar_global_grant.inc
diff --git a/mysql-test/suite/sys_vars/t/slave_sql_verify_checksum_grant.test b/mysql-test/suite/sys_vars/t/slave_sql_verify_checksum_grant.test
new file mode 100644
index 00000000000..683d53a6fef
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/slave_sql_verify_checksum_grant.test
@@ -0,0 +1,9 @@
+--echo #
+--echo # MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
+--echo #
+
+--let var = slave_sql_verify_checksum
+--let grant = REPLICATION SLAVE ADMIN
+--let value = 1
+
+--source suite/sys_vars/inc/sysvar_global_grant.inc
diff --git a/mysql-test/suite/sys_vars/t/slave_transaction_retry_interval_grant.test b/mysql-test/suite/sys_vars/t/slave_transaction_retry_interval_grant.test
new file mode 100644
index 00000000000..47a51fc9c2b
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/slave_transaction_retry_interval_grant.test
@@ -0,0 +1,9 @@
+--echo #
+--echo # MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
+--echo #
+
+--let var = slave_transaction_retry_interval
+--let grant = REPLICATION SLAVE ADMIN
+--let value = 256
+
+--source suite/sys_vars/inc/sysvar_global_grant.inc
diff --git a/mysql-test/suite/sys_vars/t/slave_type_conversions_grant.test b/mysql-test/suite/sys_vars/t/slave_type_conversions_grant.test
new file mode 100644
index 00000000000..d3c9b239def
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/slave_type_conversions_grant.test
@@ -0,0 +1,9 @@
+--echo #
+--echo # MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
+--echo #
+
+--let var = slave_type_conversions
+--let grant = REPLICATION SLAVE ADMIN
+--let value = ALL_NON_LOSSY
+
+--source suite/sys_vars/inc/sysvar_global_grant.inc
diff --git a/mysql-test/suite/sys_vars/t/slow_launch_time_grant.test b/mysql-test/suite/sys_vars/t/slow_launch_time_grant.test
new file mode 100644
index 00000000000..1a81930593e
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/slow_launch_time_grant.test
@@ -0,0 +1,56 @@
+--source include/not_embedded.inc
+
+SET @global=@@global.slow_launch_time;
+
+--echo #
+--echo # MDEV-21961 Bind CONNECTION ADMIN to a number of global system variables
+--echo #
+
+--echo # Test that "SET slow_launch_time" is not allowed without CONNECTION ADMIN or SUPER
+
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE CONNECTION ADMIN, SUPER ON *.* FROM user1@localhost;
+--connect(user1,localhost,user1,,)
+--connection user1
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+SET GLOBAL slow_launch_time=10;
+--error ER_GLOBAL_VARIABLE
+SET slow_launch_time=10;
+--error ER_GLOBAL_VARIABLE
+SET SESSION slow_launch_time=10;
+--disconnect user1
+--connection default
+DROP USER user1@localhost;
+
+--echo # Test that "SET slow_launch_time" is allowed with CONNECTION ADMIN
+
+CREATE USER user1@localhost;
+GRANT CONNECTION ADMIN ON *.* TO user1@localhost;
+--connect(user1,localhost,user1,,)
+--connection user1
+SET GLOBAL slow_launch_time=10;
+--error ER_GLOBAL_VARIABLE
+SET slow_launch_time=10;
+--error ER_GLOBAL_VARIABLE
+SET SESSION slow_launch_time=10;
+--disconnect user1
+--connection default
+DROP USER user1@localhost;
+
+--echo # Test that "SET slow_launch_time" is allowed with SUPER
+
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+--connect(user1,localhost,user1,,)
+--connection user1
+SET GLOBAL slow_launch_time=10;
+--error ER_GLOBAL_VARIABLE
+SET slow_launch_time=10;
+--error ER_GLOBAL_VARIABLE
+SET SESSION slow_launch_time=10;
+--disconnect user1
+--connection default
+DROP USER user1@localhost;
+
+SET @@global.slow_launch_time=@global;
diff --git a/mysql-test/suite/sys_vars/t/sql_log_bin_grant.test b/mysql-test/suite/sys_vars/t/sql_log_bin_grant.test
new file mode 100644
index 00000000000..d7ffc2b613b
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/sql_log_bin_grant.test
@@ -0,0 +1,51 @@
+source include/have_log_bin.inc;
+
+
+--echo #
+--echo #
+--echo #
+
+--echo # Test that "SET sql_log_bin" is not allowed without BINLOG ADMIN or SUPER
+
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE BINLOG ADMIN, SUPER ON *.* FROM user1@localhost;
+--connect(user1,localhost,user1,,)
+--connection user1
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+SET sql_log_bin=1;
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+SET GLOBAL sql_log_bin=1;
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+SET SESSION sql_log_bin=1;
+--disconnect user1
+--connection default
+DROP USER user1@localhost;
+
+--echo # Test that "SET sql_log_bin" is allowed with BINLOG ADMIN
+
+CREATE USER user1@localhost;
+GRANT BINLOG ADMIN ON *.* TO user1@localhost;
+--connect(user1,localhost,user1,,)
+--connection user1
+SET sql_log_bin=1;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+SET GLOBAL sql_log_bin=1;
+SET SESSION sql_log_bin=1;
+--disconnect user1
+--connection default
+DROP USER user1@localhost;
+
+--echo # Test that "SET sql_log_bin" is allowed with SUPER
+
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+--connect(user1,localhost,user1,,)
+--connection user1
+SET sql_log_bin=1;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+SET GLOBAL sql_log_bin=1;
+SET SESSION sql_log_bin=1;
+--disconnect user1
+--connection default
+DROP USER user1@localhost;
diff --git a/mysql-test/suite/sys_vars/t/sync_binlog_grant.test b/mysql-test/suite/sys_vars/t/sync_binlog_grant.test
new file mode 100644
index 00000000000..114be48e19f
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/sync_binlog_grant.test
@@ -0,0 +1,9 @@
+--echo #
+--echo # MDEV-21963 Bind BINLOG ADMIN to a number of global system variables
+--echo #
+
+--let var = sync_binlog
+--let grant = BINLOG ADMIN
+--let value = 10
+
+--source suite/sys_vars/inc/sysvar_global_grant.inc
diff --git a/mysql-test/suite/sys_vars/t/sync_master_info_grant.test b/mysql-test/suite/sys_vars/t/sync_master_info_grant.test
new file mode 100644
index 00000000000..c46979e4cd5
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/sync_master_info_grant.test
@@ -0,0 +1,9 @@
+--echo #
+--echo # MDEV-21969 Bind REPLICATION SLAVE ADMIN to relay_log_*, sync_master_info, sync_relay_log, sync_relay_log_info
+--echo #
+
+--let var = sync_master_info
+--let grant = REPLICATION SLAVE ADMIN
+--let value = 20000
+
+--source suite/sys_vars/inc/sysvar_global_grant.inc
diff --git a/mysql-test/suite/sys_vars/t/sync_relay_log_grant.test b/mysql-test/suite/sys_vars/t/sync_relay_log_grant.test
new file mode 100644
index 00000000000..6812885a75e
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/sync_relay_log_grant.test
@@ -0,0 +1,9 @@
+--echo #
+--echo # MDEV-21969 Bind REPLICATION SLAVE ADMIN to relay_log_*, sync_master_info, sync_relay_log, sync_relay_log_info
+--echo #
+
+--let var = sync_relay_log
+--let grant = REPLICATION SLAVE ADMIN
+--let value = 20000
+
+--source suite/sys_vars/inc/sysvar_global_grant.inc
diff --git a/mysql-test/suite/sys_vars/t/sync_relay_log_info_grant.test b/mysql-test/suite/sys_vars/t/sync_relay_log_info_grant.test
new file mode 100644
index 00000000000..1b563b5dea3
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/sync_relay_log_info_grant.test
@@ -0,0 +1,9 @@
+--echo #
+--echo # MDEV-21969 Bind REPLICATION SLAVE ADMIN to relay_log_*, sync_master_info, sync_relay_log, sync_relay_log_info
+--echo #
+
+--let var = sync_relay_log_info
+--let grant = REPLICATION SLAVE ADMIN
+--let value = 20000
+
+--source suite/sys_vars/inc/sysvar_global_grant.inc
diff --git a/mysql-test/suite/sys_vars/t/sysvars_star.cnf b/mysql-test/suite/sys_vars/t/sysvars_star.cnf
new file mode 100644
index 00000000000..d1dacd8c9cb
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/sysvars_star.cnf
@@ -0,0 +1,5 @@
+!include include/default_my.cnf
+
+[server]
+loose-sql-error-log-rotations=5
+plugin-maturity=alpha
diff --git a/mysql-test/suite/sys_vars/t/sysvars_star.opt b/mysql-test/suite/sys_vars/t/sysvars_star.opt
new file mode 100644
index 00000000000..58af6adeed4
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/sysvars_star.opt
@@ -0,0 +1,2 @@
+--column-compression-threshold=120
+--loose-sql-error-log-rate=100
diff --git a/mysql-test/suite/sys_vars/t/sysvars_star.test b/mysql-test/suite/sys_vars/t/sysvars_star.test
new file mode 100644
index 00000000000..2f0ef5c9ab0
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/sysvars_star.test
@@ -0,0 +1,41 @@
+#
+# MDEV-12684 Show what config file a sysvar got a value from
+#
+
+source include/not_embedded.inc;
+if (!$SQL_ERRLOG_SO) {
+ skip No sql_errlog plugin;
+}
+
+#system_versioning_alter_history
+#binlog_format
+set completion_type=CHAIN;
+set global low_priority_updates=1;
+
+install soname 'sql_errlog';
+
+vertical_results;
+replace_regex /\/.*\//var\//;
+select * from information_schema.system_variables
+ where variable_name in (
+ 'completion_type', #session!=global, origin=compile-time
+ 'low_priority_updates', #global!=default, origin=sql
+ 'column_compression_threshold', #origin=command-line
+ 'plugin_maturity', #origin=config
+ 'sql_error_log_rate', #plugin, origin=command-line
+ 'sql_error_log_rotations' #plugin, origin=config
+ )
+ order by variable_name;
+
+create user foo@localhost;
+
+connect foo,localhost,foo;
+select global_value_path from information_schema.system_variables where variable_name='plugin_maturity';
+connection default;
+replace_regex /\/.*\//var\//;
+select global_value_path from information_schema.system_variables where variable_name='plugin_maturity';
+
+drop user foo@localhost;
+set global low_priority_updates=default;
+disable_warnings;
+uninstall soname 'sql_errlog';
diff --git a/mysql-test/suite/sys_vars/t/thread_concurrency_basic.test b/mysql-test/suite/sys_vars/t/thread_concurrency_basic.test
deleted file mode 100644
index 6d4ca3e2b4d..00000000000
--- a/mysql-test/suite/sys_vars/t/thread_concurrency_basic.test
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# only global
-#
-select @@global.thread_concurrency;
---error ER_INCORRECT_GLOBAL_LOCAL_VAR
-select @@session.thread_concurrency;
-show global variables like 'thread_concurrency';
-show session variables like 'thread_concurrency';
-select * from information_schema.global_variables where variable_name='thread_concurrency';
-select * from information_schema.session_variables where variable_name='thread_concurrency';
-
-#
-# show that it's read-only
-#
---error ER_INCORRECT_GLOBAL_LOCAL_VAR
-set global thread_concurrency=1;
---error ER_INCORRECT_GLOBAL_LOCAL_VAR
-set session thread_concurrency=1;
diff --git a/mysql-test/suite/sys_vars/t/thread_pool_idle_timeout_basic.test b/mysql-test/suite/sys_vars/t/thread_pool_idle_timeout_basic.test
index 4afcc0379f0..b06a5069514 100644
--- a/mysql-test/suite/sys_vars/t/thread_pool_idle_timeout_basic.test
+++ b/mysql-test/suite/sys_vars/t/thread_pool_idle_timeout_basic.test
@@ -1,6 +1,7 @@
# uint global
--source include/not_windows.inc
--source include/not_embedded.inc
+--source include/not_aix.inc
SET @start_global_value = @@global.thread_pool_idle_timeout;
#
diff --git a/mysql-test/suite/sys_vars/t/thread_pool_idle_timeout_grant.test b/mysql-test/suite/sys_vars/t/thread_pool_idle_timeout_grant.test
new file mode 100644
index 00000000000..8f5f2491e12
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/thread_pool_idle_timeout_grant.test
@@ -0,0 +1,58 @@
+--source include/not_windows.inc
+--source include/not_embedded.inc
+--source include/not_aix.inc
+
+SET @global=@@global.thread_pool_idle_timeout;
+
+--echo #
+--echo # MDEV-21961 Bind CONNECTION ADMIN to a number of global system variables
+--echo #
+
+--echo # Test that "SET thread_pool_idle_timeout" is not allowed without CONNECTION ADMIN or SUPER
+
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE CONNECTION ADMIN, SUPER ON *.* FROM user1@localhost;
+--connect(user1,localhost,user1,,)
+--connection user1
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+SET GLOBAL thread_pool_idle_timeout=10;
+--error ER_GLOBAL_VARIABLE
+SET thread_pool_idle_timeout=10;
+--error ER_GLOBAL_VARIABLE
+SET SESSION thread_pool_idle_timeout=10;
+--disconnect user1
+--connection default
+DROP USER user1@localhost;
+
+--echo # Test that "SET thread_pool_idle_timeout" is allowed with CONNECTION ADMIN
+
+CREATE USER user1@localhost;
+GRANT CONNECTION ADMIN ON *.* TO user1@localhost;
+--connect(user1,localhost,user1,,)
+--connection user1
+SET GLOBAL thread_pool_idle_timeout=10;
+--error ER_GLOBAL_VARIABLE
+SET thread_pool_idle_timeout=10;
+--error ER_GLOBAL_VARIABLE
+SET SESSION thread_pool_idle_timeout=10;
+--disconnect user1
+--connection default
+DROP USER user1@localhost;
+
+--echo # Test that "SET thread_pool_idle_timeout" is allowed with SUPER
+
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+--connect(user1,localhost,user1,,)
+--connection user1
+SET GLOBAL thread_pool_idle_timeout=10;
+--error ER_GLOBAL_VARIABLE
+SET thread_pool_idle_timeout=10;
+--error ER_GLOBAL_VARIABLE
+SET SESSION thread_pool_idle_timeout=10;
+--disconnect user1
+--connection default
+DROP USER user1@localhost;
+
+SET @@global.thread_pool_idle_timeout=@global;
diff --git a/mysql-test/suite/sys_vars/t/thread_pool_max_threads_basic.test b/mysql-test/suite/sys_vars/t/thread_pool_max_threads_basic.test
index 3d5cd5f5198..392dbd3a145 100644
--- a/mysql-test/suite/sys_vars/t/thread_pool_max_threads_basic.test
+++ b/mysql-test/suite/sys_vars/t/thread_pool_max_threads_basic.test
@@ -1,5 +1,6 @@
# uint global
--source include/not_embedded.inc
+--source include/not_aix.inc
SET @start_global_value = @@global.thread_pool_max_threads;
#
diff --git a/mysql-test/suite/sys_vars/t/thread_pool_max_threads_grant.test b/mysql-test/suite/sys_vars/t/thread_pool_max_threads_grant.test
new file mode 100644
index 00000000000..299d5ff4f44
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/thread_pool_max_threads_grant.test
@@ -0,0 +1,58 @@
+# uint global
+--source include/not_embedded.inc
+--source include/not_aix.inc
+
+SET @global=@@global.thread_pool_max_threads;
+
+--echo #
+--echo # MDEV-21961 Bind CONNECTION ADMIN to a number of global system variables
+--echo #
+
+--echo # Test that "SET thread_pool_max_threads" is not allowed without CONNECTION ADMIN or SUPER
+
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE CONNECTION ADMIN, SUPER ON *.* FROM user1@localhost;
+--connect(user1,localhost,user1,,)
+--connection user1
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+SET GLOBAL thread_pool_max_threads=10;
+--error ER_GLOBAL_VARIABLE
+SET thread_pool_max_threads=10;
+--error ER_GLOBAL_VARIABLE
+SET SESSION thread_pool_max_threads=10;
+--disconnect user1
+--connection default
+DROP USER user1@localhost;
+
+--echo # Test that "SET thread_pool_max_threads" is allowed with CONNECTION ADMIN
+
+CREATE USER user1@localhost;
+GRANT CONNECTION ADMIN ON *.* TO user1@localhost;
+--connect(user1,localhost,user1,,)
+--connection user1
+SET GLOBAL thread_pool_max_threads=10;
+--error ER_GLOBAL_VARIABLE
+SET thread_pool_max_threads=10;
+--error ER_GLOBAL_VARIABLE
+SET SESSION thread_pool_max_threads=10;
+--disconnect user1
+--connection default
+DROP USER user1@localhost;
+
+--echo # Test that "SET thread_pool_max_threads" is allowed with SUPER
+
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+--connect(user1,localhost,user1,,)
+--connection user1
+SET GLOBAL thread_pool_max_threads=10;
+--error ER_GLOBAL_VARIABLE
+SET thread_pool_max_threads=10;
+--error ER_GLOBAL_VARIABLE
+SET SESSION thread_pool_max_threads=10;
+--disconnect user1
+--connection default
+DROP USER user1@localhost;
+
+SET @@global.thread_pool_max_threads=@global;
diff --git a/mysql-test/suite/sys_vars/t/thread_pool_min_threads_basic.test b/mysql-test/suite/sys_vars/t/thread_pool_min_threads_basic.test
index 131fbe98502..1447c83d39c 100644
--- a/mysql-test/suite/sys_vars/t/thread_pool_min_threads_basic.test
+++ b/mysql-test/suite/sys_vars/t/thread_pool_min_threads_basic.test
@@ -1,6 +1,7 @@
# uint global
--source include/not_embedded.inc
--source include/windows.inc
+--source include/not_aix.inc
SET @start_global_value = @@global.thread_pool_min_threads;
#
diff --git a/mysql-test/suite/sys_vars/t/thread_pool_oversubscribe_basic.test b/mysql-test/suite/sys_vars/t/thread_pool_oversubscribe_basic.test
index 74f0f5e6ea7..43817febafd 100644
--- a/mysql-test/suite/sys_vars/t/thread_pool_oversubscribe_basic.test
+++ b/mysql-test/suite/sys_vars/t/thread_pool_oversubscribe_basic.test
@@ -1,6 +1,7 @@
# uint global
--source include/not_windows.inc
--source include/not_embedded.inc
+--source include/not_aix.inc
SET @start_global_value = @@global.thread_pool_oversubscribe;
#
diff --git a/mysql-test/suite/sys_vars/t/thread_pool_oversubscribe_grant.test b/mysql-test/suite/sys_vars/t/thread_pool_oversubscribe_grant.test
new file mode 100644
index 00000000000..f3a96c69e8a
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/thread_pool_oversubscribe_grant.test
@@ -0,0 +1,58 @@
+--source include/not_windows.inc
+--source include/not_embedded.inc
+--source include/not_aix.inc
+
+SET @global=@@global.thread_pool_oversubscribe;
+
+--echo #
+--echo # MDEV-21961 Bind CONNECTION ADMIN to a number of global system variables
+--echo #
+
+--echo # Test that "SET thread_pool_oversubscribe" is not allowed without CONNECTION ADMIN or SUPER
+
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE CONNECTION ADMIN, SUPER ON *.* FROM user1@localhost;
+--connect(user1,localhost,user1,,)
+--connection user1
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+SET GLOBAL thread_pool_oversubscribe=10;
+--error ER_GLOBAL_VARIABLE
+SET thread_pool_oversubscribe=10;
+--error ER_GLOBAL_VARIABLE
+SET SESSION thread_pool_oversubscribe=10;
+--disconnect user1
+--connection default
+DROP USER user1@localhost;
+
+--echo # Test that "SET thread_pool_oversubscribe" is allowed with CONNECTION ADMIN
+
+CREATE USER user1@localhost;
+GRANT CONNECTION ADMIN ON *.* TO user1@localhost;
+--connect(user1,localhost,user1,,)
+--connection user1
+SET GLOBAL thread_pool_oversubscribe=10;
+--error ER_GLOBAL_VARIABLE
+SET thread_pool_oversubscribe=10;
+--error ER_GLOBAL_VARIABLE
+SET SESSION thread_pool_oversubscribe=10;
+--disconnect user1
+--connection default
+DROP USER user1@localhost;
+
+--echo # Test that "SET thread_pool_oversubscribe" is allowed with SUPER
+
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+--connect(user1,localhost,user1,,)
+--connection user1
+SET GLOBAL thread_pool_oversubscribe=10;
+--error ER_GLOBAL_VARIABLE
+SET thread_pool_oversubscribe=10;
+--error ER_GLOBAL_VARIABLE
+SET SESSION thread_pool_oversubscribe=10;
+--disconnect user1
+--connection default
+DROP USER user1@localhost;
+
+SET @@global.thread_pool_oversubscribe=@global;
diff --git a/mysql-test/suite/sys_vars/t/thread_pool_size_basic.opt b/mysql-test/suite/sys_vars/t/thread_pool_size_basic.opt
index 7a2696875b8..b680d0c4b4f 100644
--- a/mysql-test/suite/sys_vars/t/thread_pool_size_basic.opt
+++ b/mysql-test/suite/sys_vars/t/thread_pool_size_basic.opt
@@ -1 +1 @@
---loose-thread-handling=pool-of-threads
+--loose-thread-handling=pool-of-threads --loose-thread-pool-mode=generic \ No newline at end of file
diff --git a/mysql-test/suite/sys_vars/t/thread_pool_size_basic.test b/mysql-test/suite/sys_vars/t/thread_pool_size_basic.test
index 5d432eb9940..3d17f3befa0 100644
--- a/mysql-test/suite/sys_vars/t/thread_pool_size_basic.test
+++ b/mysql-test/suite/sys_vars/t/thread_pool_size_basic.test
@@ -1,5 +1,4 @@
# uint global
---source include/not_windows.inc
--source include/not_embedded.inc
--source include/have_pool_of_threads.inc
SET @start_global_value = @@global.thread_pool_size;
diff --git a/mysql-test/suite/sys_vars/t/thread_pool_stall_limit_basic.test b/mysql-test/suite/sys_vars/t/thread_pool_stall_limit_basic.test
index 9b4e1df7ab0..2d1dc59476c 100644
--- a/mysql-test/suite/sys_vars/t/thread_pool_stall_limit_basic.test
+++ b/mysql-test/suite/sys_vars/t/thread_pool_stall_limit_basic.test
@@ -1,6 +1,6 @@
# uint global
---source include/not_windows.inc
--source include/not_embedded.inc
+--source include/not_aix.inc
SET @start_global_value = @@global.thread_pool_stall_limit;
#
diff --git a/mysql-test/suite/sys_vars/t/thread_pool_stall_limit_grant.test b/mysql-test/suite/sys_vars/t/thread_pool_stall_limit_grant.test
new file mode 100644
index 00000000000..ae0ed8a785b
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/thread_pool_stall_limit_grant.test
@@ -0,0 +1,58 @@
+# uint global
+--source include/not_embedded.inc
+--source include/not_aix.inc
+
+SET @global=@@global.thread_pool_stall_limit;
+
+--echo #
+--echo # MDEV-21961 Bind CONNECTION ADMIN to a number of global system variables
+--echo #
+
+--echo # Test that "SET thread_pool_stall_limit" is not allowed without CONNECTION ADMIN or SUPER
+
+CREATE USER user1@localhost;
+GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
+REVOKE CONNECTION ADMIN, SUPER ON *.* FROM user1@localhost;
+--connect(user1,localhost,user1,,)
+--connection user1
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+SET GLOBAL thread_pool_stall_limit=400;
+--error ER_GLOBAL_VARIABLE
+SET thread_pool_stall_limit=400;
+--error ER_GLOBAL_VARIABLE
+SET SESSION thread_pool_stall_limit=400;
+--disconnect user1
+--connection default
+DROP USER user1@localhost;
+
+--echo # Test that "SET thread_pool_stall_limit" is allowed with CONNECTION ADMIN
+
+CREATE USER user1@localhost;
+GRANT CONNECTION ADMIN ON *.* TO user1@localhost;
+--connect(user1,localhost,user1,,)
+--connection user1
+SET GLOBAL thread_pool_stall_limit=400;
+--error ER_GLOBAL_VARIABLE
+SET thread_pool_stall_limit=400;
+--error ER_GLOBAL_VARIABLE
+SET SESSION thread_pool_stall_limit=400;
+--disconnect user1
+--connection default
+DROP USER user1@localhost;
+
+--echo # Test that "SET thread_pool_stall_limit" is allowed with SUPER
+
+CREATE USER user1@localhost;
+GRANT SUPER ON *.* TO user1@localhost;
+--connect(user1,localhost,user1,,)
+--connection user1
+SET GLOBAL thread_pool_stall_limit=400;
+--error ER_GLOBAL_VARIABLE
+SET thread_pool_stall_limit=400;
+--error ER_GLOBAL_VARIABLE
+SET SESSION thread_pool_stall_limit=400;
+--disconnect user1
+--connection default
+DROP USER user1@localhost;
+
+SET @@global.thread_pool_stall_limit=@global;
diff --git a/mysql-test/suite/sys_vars/t/timed_mutexes_basic.test b/mysql-test/suite/sys_vars/t/timed_mutexes_basic.test
deleted file mode 100644
index 9422ecdabf9..00000000000
--- a/mysql-test/suite/sys_vars/t/timed_mutexes_basic.test
+++ /dev/null
@@ -1,169 +0,0 @@
-################## mysql-test\t\timed_mutexes_basic.test ######################
-# #
-# Variable Name: timed_mutexes #
-# Scope: GLOBAL #
-# Access Type: Dynamic #
-# Data Type: boolean #
-# Default Value: OFF #
-# Valid Values: ON, OFF #
-# #
-# #
-# Creation Date: 2008-02-07 #
-# Author: Rizwan #
-# #
-# Description: Test Cases of Dynamic System Variable timed_mutexes #
-# that checks the behavior of this variable in the following ways#
-# * Default Value #
-# * Valid & Invalid values #
-# * Scope & Access method #
-# * Data Integrity #
-# #
-# Reference: http://dev.mysql.com/doc/refman/5.1/en/ #
-# server-system-variables.html #
-# #
-###############################################################################
-
---source include/load_sysvars.inc
-########################################################################
-# START OF timed_mutexes TESTS #
-########################################################################
-
-
-##############################################################################
-# Saving initial value of timed_mutexes in a temporary variable #
-##############################################################################
-
-SET @global_start_value = @@global.timed_mutexes;
-SELECT @global_start_value;
-
---echo '#--------------------FN_DYNVARS_177_01------------------------#'
-########################################################################
-# Display the DEFAULT value of timed_mutexes #
-########################################################################
-
-SET @@global.timed_mutexes = 1;
-SET @@global.timed_mutexes = DEFAULT;
-SELECT @@global.timed_mutexes;
-
---echo '#---------------------FN_DYNVARS_177_02-------------------------#'
-#############################################################################
-# Check if timed_mutexes can be accessed with and without @@ sign #
-#############################################################################
-
---Error ER_GLOBAL_VARIABLE
-SET timed_mutexes = 1;
-SELECT @@timed_mutexes;
---Error ER_UNKNOWN_TABLE
-SELECT global.timed_mutexes;
-
-SET global timed_mutexes = 1;
-SELECT @@global.timed_mutexes;
-
-
---echo '#--------------------FN_DYNVARS_177_03------------------------#'
-########################################################################
-# Change the value of timed_mutexes to a valid value #
-########################################################################
-
-SET @@global.timed_mutexes = 0;
-SELECT @@global.timed_mutexes;
-SET @@global.timed_mutexes = 1;
-SELECT @@global.timed_mutexes;
-
-
---echo '#--------------------FN_DYNVARS_177_04-------------------------#'
-###########################################################################
-# Change the value of timed_mutexes to invalid value #
-###########################################################################
-
---Error ER_WRONG_VALUE_FOR_VAR
-SET @@global.timed_mutexes = -1;
---Error ER_WRONG_VALUE_FOR_VAR
-SET @@global.timed_mutexes = 2;
---Error ER_WRONG_VALUE_FOR_VAR
-SET @@global.timed_mutexes = "T";
---Error ER_WRONG_VALUE_FOR_VAR
-SET @@global.timed_mutexes = "Y";
---Error ER_WRONG_VALUE_FOR_VAR
-SET @@global.timed_mutexes = _true;
---Error ER_WRONG_VALUE_FOR_VAR
-SET @@global.timed_mutexes = 0N;
---Error ER_WRONG_VALUE_FOR_VAR
-SET @@global.timed_mutexes = 1+1;
---Error ER_WRONG_VALUE_FOR_VAR
-SET @@global.timed_mutexes = 0FF;
---Error ER_WRONG_VALUE_FOR_VAR
-SET @@global.timed_mutexes = '0';
---Error ER_WRONG_VALUE_FOR_VAR
-SET @@global.timed_mutexes = N;
-
-
---echo '#-------------------FN_DYNVARS_177_05----------------------------#'
-###########################################################################
-# Test if accessing session timed_mutexes gives error #
-###########################################################################
-
---Error ER_GLOBAL_VARIABLE
-SET @@session.timed_mutexes = 0;
---Error ER_GLOBAL_VARIABLE
-SET @@timed_mutexes = 0;
---Error ER_GLOBAL_VARIABLE
-SET @@local.timed_mutexes = 0;
---Error ER_INCORRECT_GLOBAL_LOCAL_VAR
-SELECT @@session.timed_mutexes;
---Error ER_INCORRECT_GLOBAL_LOCAL_VAR
-SELECT @@local.timed_mutexes;
-
---echo '#----------------------FN_DYNVARS_177_06------------------------#'
-#########################################################################
-# Check if the value in SESSION Table contains variable value #
-#########################################################################
-
-SELECT count(VARIABLE_VALUE) FROM INFORMATION_SCHEMA.SESSION_VARIABLES
-WHERE VARIABLE_NAME='timed_mutexes';
-
-
---echo '#----------------------FN_DYNVARS_177_07------------------------#'
-#########################################################################
-# Check if the value in GLOBAL Table matches value in variable #
-#########################################################################
-
-SELECT IF(@@global.timed_mutexes, "ON", "OFF") = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='timed_mutexes';
-SELECT @@global.timed_mutexes;
-
-SELECT VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='timed_mutexes';
-
---echo '#---------------------FN_DYNVARS_177_08-------------------------#'
-###################################################################
-# Check if ON and OFF values can be used on variable #
-###################################################################
-
-SET @@global.timed_mutexes = OFF;
-SELECT @@global.timed_mutexes;
-SET @@global.timed_mutexes = ON;
-SELECT @@global.timed_mutexes;
-
---echo '#---------------------FN_DYNVARS_177_09----------------------#'
-###################################################################
-# Check if TRUE and FALSE values can be used on variable #
-###################################################################
-
-SET @@global.timed_mutexes = TRUE;
-SELECT @@global.timed_mutexes;
-SET @@global.timed_mutexes = FALSE;
-SELECT @@global.timed_mutexes;
-
-##############################
-# Restore initial value #
-##############################
-
-SET @@global.timed_mutexes = @global_start_value;
-SELECT @@global.timed_mutexes;
-
-###############################################################
-# END OF timed_mutexes TESTS #
-###############################################################
diff --git a/mysql-test/suite/sys_vars/t/tmp_memory_table_size_basic.test b/mysql-test/suite/sys_vars/t/tmp_memory_table_size_basic.test
deleted file mode 100644
index f5fcb17c8a5..00000000000
--- a/mysql-test/suite/sys_vars/t/tmp_memory_table_size_basic.test
+++ /dev/null
@@ -1,209 +0,0 @@
-###################### tmp_memory_table_size_basic.test ######################
-# #
-# Variable Name: tmp_memory_table_size #
-# Scope: GLOBAL | SESSION #
-# Access Type: Dynamic #
-# Data Type: numeric #
-# #
-# Description: Test Cases of Dynamic System Variable tmp_table_size #
-# that checks the behavior of this variable in the following ways#
-# * Default Value #
-# * Valid & Invalid values #
-# * Scope & Access method #
-# * Data Integrity #
-# #
-###############################################################################
-
---source include/load_sysvars.inc
-
-##############################################################
-# START OF tmp_memory_table_size TESTS #
-##############################################################
-
-#############################################################
-# Save initial value #
-#############################################################
-
-SET @start_global_value = @@global.tmp_memory_table_size;
-SET @start_session_value = @@session.tmp_memory_table_size;
-
---echo '#--------------------FN_DYNVARS_005_01-------------------------#'
-##############################################################
-# Display the DEFAULT value of tmp_memory_table_size #
-##############################################################
-
-SET @@global.tmp_memory_table_size = 10000;
-SELECT @@global.tmp_memory_table_size;
-SET @@global.tmp_memory_table_size = DEFAULT;
-SELECT @@global.tmp_memory_table_size;
-
-SET @@session.tmp_memory_table_size = 20000;
-SELECT @@session.tmp_memory_table_size;
-SET @@session.tmp_memory_table_size = DEFAULT;
-SELECT @@session.tmp_memory_table_size;
-
---echo '#--------------------FN_DYNVARS_005_02-------------------------#'
-########################################################################
-# Check the DEFAULT value of tmp_memory_table_size #
-########################################################################
-# The DEFAULT value is system dependend.
-# Therefore we have only a plausibility check here
-SELECT @@global.tmp_memory_table_size >= 16777216;
-SELECT @@session.tmp_memory_table_size >= 16777216;
-
---echo '#--------------------FN_DYNVARS_005_03-------------------------#'
-########################################################################
-# Change the value of tmp_memory_table_size to a valid value for GLOBAL Scope #
-########################################################################
-
-SET @@global.tmp_memory_table_size = 1024;
-SELECT @@global.tmp_memory_table_size;
-SET @@global.tmp_memory_table_size = 60020;
-SELECT @@global.tmp_memory_table_size;
-SET @@global.tmp_memory_table_size = 4294967295;
-SELECT @@global.tmp_memory_table_size;
-
-
---echo '#--------------------FN_DYNVARS_005_04-------------------------#'
-#########################################################################
-# Change the value of tmp_memory_table_size to a valid value for SESSION Scope #
-#########################################################################
-
-SET @@session.tmp_memory_table_size = 1024;
-SELECT @@session.tmp_memory_table_size;
-
-SET @@session.tmp_memory_table_size = 4294967295;
-SELECT @@session.tmp_memory_table_size;
-SET @@session.tmp_memory_table_size = 65535;
-SELECT @@session.tmp_memory_table_size;
-
-
---echo '#------------------FN_DYNVARS_005_05-----------------------#'
-##########################################################
-# Change the value of tmp_memory_table_size to an invalid value #
-##########################################################
-
-SET @@global.tmp_memory_table_size = 0;
-SELECT @@global.tmp_memory_table_size;
-
-SET @@global.tmp_memory_table_size = -1024;
-SELECT @@global.tmp_memory_table_size;
-
-SET @@global.tmp_memory_table_size = 1000;
-SELECT @@global.tmp_memory_table_size;
-
---Error ER_WRONG_TYPE_FOR_VAR
-SET @@global.tmp_memory_table_size = ON;
-
---Error ER_WRONG_TYPE_FOR_VAR
-SET @@global.tmp_memory_table_size = OFF;
-
-SET @@global.tmp_memory_table_size = True;
-SELECT @@global.tmp_memory_table_size;
-
-SET @@global.tmp_memory_table_size = False;
-SELECT @@global.tmp_memory_table_size;
-
---Error ER_WRONG_TYPE_FOR_VAR
-SET @@global.tmp_memory_table_size = 65530.34;
-
---Error ER_WRONG_TYPE_FOR_VAR
-SET @@global.tmp_memory_table_size ="Test";
-
---Error ER_WRONG_TYPE_FOR_VAR
-SET @@session.tmp_memory_table_size = ON;
-
---Error ER_WRONG_TYPE_FOR_VAR
-SET @@session.tmp_memory_table_size = OFF;
-
-SET @@session.tmp_memory_table_size = True;
-SELECT @@session.tmp_memory_table_size;
-
-SET @@session.tmp_memory_table_size = False;
-SELECT @@session.tmp_memory_table_size;
-
---Error ER_WRONG_TYPE_FOR_VAR
-SET @@session.tmp_memory_table_size = "Test";
-
---disable_warnings
-SET @@session.tmp_memory_table_size = 12345678901;
---enable_warnings
-# With a 64 bit mysqld:12345678901,with a 32 bit mysqld: 4294967295
-SELECT @@session.tmp_memory_table_size IN (12345678901,4294967295);
-
---echo '#------------------FN_DYNVARS_005_06-----------------------#'
-####################################################################
-# Check if the value in GLOBAL Table matches value in variable #
-####################################################################
-
-SELECT @@global.tmp_memory_table_size = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='tmp_memory_table_size';
-
---echo '#------------------FN_DYNVARS_005_07-----------------------#'
-####################################################################
-# Check if the value in SESSION Table matches value in variable #
-####################################################################
-
-SELECT @@session.tmp_memory_table_size = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.SESSION_VARIABLES
-WHERE VARIABLE_NAME='tmp_memory_table_size';
-
---echo '#---------------------FN_DYNVARS_001_09----------------------#'
-########################################################################
-# Check if global and session variables are independent of each other #
-########################################################################
-
-SET @@global.tmp_memory_table_size = 1024;
-SET @@tmp_memory_table_size = 4294967295;
-SELECT @@tmp_memory_table_size = @@global.tmp_memory_table_size;
-
---echo '#---------------------FN_DYNVARS_001_10----------------------#'
-##################################################################
-# Check if accessing variable with SESSION,LOCAL and without #
-# SCOPE points to same session variable #
-##################################################################
-
-SET @@tmp_memory_table_size = 100;
-SELECT @@tmp_memory_table_size = @@local.tmp_memory_table_size;
-SELECT @@local.tmp_memory_table_size = @@session.tmp_memory_table_size;
-
-
---echo '#---------------------FN_DYNVARS_001_11----------------------#'
-#########################################################################
-# Check if tmp_memory_table_size can be accessed with and without @@ sign #
-#########################################################################
-
-SET tmp_memory_table_size = 1027;
-SELECT @@tmp_memory_table_size;
-
---Error ER_UNKNOWN_TABLE
-SELECT local.tmp_memory_table_size;
-
---Error ER_UNKNOWN_TABLE
-SELECT global.tmp_memory_table_size;
-
---Error ER_BAD_FIELD_ERROR
-SELECT tmp_memory_table_size = @@session.tmp_memory_table_size;
-
---echo
---echo "Check that tmp_memory_table_size and tmp_table_size are the same"
---echo
-
-set @@session.tmp_memory_table_size=100000;
-select @@session.tmp_memory_table_size,@@session.tmp_table_size;
-set @@session.tmp_memory_table_size=200000;
-select @@session.tmp_memory_table_size,@@session.tmp_table_size;
-
-
-####################################
-# Restore initial value #
-####################################
-
-SET @@global.tmp_memory_table_size = @start_global_value;
-SET @@session.tmp_memory_table_size = @start_session_value;
-
-###################################################
-# END OF tmp_memory_table_size TESTS #
-###################################################
-
diff --git a/mysql-test/suite/sys_vars/t/tmp_table_size_basic.test b/mysql-test/suite/sys_vars/t/tmp_table_size_basic.test
deleted file mode 100644
index 116196ddb07..00000000000
--- a/mysql-test/suite/sys_vars/t/tmp_table_size_basic.test
+++ /dev/null
@@ -1,207 +0,0 @@
-########################### tmp_table_size_basic.test ##########################
-# #
-# Variable Name: tmp_table_size #
-# Scope: GLOBAL | SESSION #
-# Access Type: Dynamic #
-# Data Type: numeric #
-# Default Value: system dependend #
-# Range: 1024-system dependend #
-# #
-# #
-# Creation Date: 2008-02-13 #
-# Author: Salman #
-# #
-# Description: Test Cases of Dynamic System Variable tmp_table_size #
-# that checks the behavior of this variable in the following ways #
-# * Default Value #
-# * Valid & Invalid values #
-# * Scope & Access method #
-# * Data Integrity #
-# Modified: 2008-12-04 HHunger #
-# removed the differences between 64 and 32 bit platforms #
-# #
-# Reference: #
-# http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html #
-# #
-################################################################################
-
---source include/load_sysvars.inc
-
-##############################################################
-# START OF tmp_table_size TESTS #
-##############################################################
-
-#############################################################
-# Save initial value #
-#############################################################
-
-SET @start_global_value = @@global.tmp_table_size;
-SET @start_session_value = @@session.tmp_table_size;
-
---echo '#--------------------FN_DYNVARS_005_01-------------------------#'
-##############################################################
-# Display the DEFAULT value of tmp_table_size #
-##############################################################
-
-SET @@global.tmp_table_size = 100;
-SET @@global.tmp_table_size = DEFAULT;
-
-SET @@session.tmp_table_size = 200;
-SET @@session.tmp_table_size = DEFAULT;
-
---echo '#--------------------FN_DYNVARS_005_02-------------------------#'
-########################################################################
-# Check the DEFAULT value of tmp_table_size #
-########################################################################
-# The DEFAULT value is system dependend.
-# Therefore we have only a plausibility check here
-SELECT @@global.tmp_table_size >= 16777216;
-
-SELECT @@session.tmp_table_size >= 16777216;
-
---echo '#--------------------FN_DYNVARS_005_03-------------------------#'
-########################################################################
-# Change the value of tmp_table_size to a valid value for GLOBAL Scope #
-########################################################################
-
-SET @@global.tmp_table_size = 1024;
-SELECT @@global.tmp_table_size;
-SET @@global.tmp_table_size = 60020;
-SELECT @@global.tmp_table_size;
-SET @@global.tmp_table_size = 4294967295;
-SELECT @@global.tmp_table_size;
-
-
---echo '#--------------------FN_DYNVARS_005_04-------------------------#'
-#########################################################################
-# Change the value of tmp_table_size to a valid value for SESSION Scope #
-#########################################################################
-
-SET @@session.tmp_table_size = 1024;
-SELECT @@session.tmp_table_size;
-
-SET @@session.tmp_table_size = 4294967295;
-SELECT @@session.tmp_table_size;
-SET @@session.tmp_table_size = 65535;
-SELECT @@session.tmp_table_size;
-
-
---echo '#------------------FN_DYNVARS_005_05-----------------------#'
-##########################################################
-# Change the value of tmp_table_size to an invalid value #
-##########################################################
-
-SET @@global.tmp_table_size = 0;
-SELECT @@global.tmp_table_size;
-
-SET @@global.tmp_table_size = -1024;
-SELECT @@global.tmp_table_size;
-
-SET @@global.tmp_table_size = 1000;
-SELECT @@global.tmp_table_size;
-
---Error ER_WRONG_TYPE_FOR_VAR
-SET @@global.tmp_table_size = ON;
-
---Error ER_WRONG_TYPE_FOR_VAR
-SET @@global.tmp_table_size = OFF;
-
-SET @@global.tmp_table_size = True;
-SELECT @@global.tmp_table_size;
-
-SET @@global.tmp_table_size = False;
-SELECT @@global.tmp_table_size;
-
---Error ER_WRONG_TYPE_FOR_VAR
-SET @@global.tmp_table_size = 65530.34;
-
---Error ER_WRONG_TYPE_FOR_VAR
-SET @@global.tmp_table_size ="Test";
-
---Error ER_WRONG_TYPE_FOR_VAR
-SET @@session.tmp_table_size = ON;
-
---Error ER_WRONG_TYPE_FOR_VAR
-SET @@session.tmp_table_size = OFF;
-
-SET @@session.tmp_table_size = True;
-SELECT @@session.tmp_table_size;
-
-SET @@session.tmp_table_size = False;
-SELECT @@session.tmp_table_size;
-
---Error ER_WRONG_TYPE_FOR_VAR
-SET @@session.tmp_table_size = "Test";
-
---disable_warnings
-SET @@session.tmp_table_size = 12345678901;
---enable_warnings
-# With a 64 bit mysqld:12345678901,with a 32 bit mysqld: 4294967295
-SELECT @@session.tmp_table_size IN (12345678901,4294967295);
-
---echo '#------------------FN_DYNVARS_005_06-----------------------#'
-####################################################################
-# Check if the value in GLOBAL Table matches value in variable #
-####################################################################
-
-SELECT @@global.tmp_table_size = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='tmp_table_size';
-
---echo '#------------------FN_DYNVARS_005_07-----------------------#'
-####################################################################
-# Check if the value in SESSION Table matches value in variable #
-####################################################################
-
-SELECT @@session.tmp_table_size = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.SESSION_VARIABLES
-WHERE VARIABLE_NAME='tmp_table_size';
-
---echo '#---------------------FN_DYNVARS_001_09----------------------#'
-########################################################################
-# Check if global and session variables are independent of each other #
-########################################################################
-
-SET @@global.tmp_table_size = 1024;
-SET @@tmp_table_size = 4294967295;
-SELECT @@tmp_table_size = @@global.tmp_table_size;
-
---echo '#---------------------FN_DYNVARS_001_10----------------------#'
-##################################################################
-# Check if accessing variable with SESSION,LOCAL and without #
-# SCOPE points to same session variable #
-##################################################################
-
-SET @@tmp_table_size = 100;
-SELECT @@tmp_table_size = @@local.tmp_table_size;
-SELECT @@local.tmp_table_size = @@session.tmp_table_size;
-
-
---echo '#---------------------FN_DYNVARS_001_11----------------------#'
-#########################################################################
-# Check if tmp_table_size can be accessed with and without @@ sign #
-#########################################################################
-
-SET tmp_table_size = 1027;
-SELECT @@tmp_table_size;
-
---Error ER_UNKNOWN_TABLE
-SELECT local.tmp_table_size;
-
---Error ER_UNKNOWN_TABLE
-SELECT global.tmp_table_size;
-
---Error ER_BAD_FIELD_ERROR
-SELECT tmp_table_size = @@session.tmp_table_size;
-
-####################################
-# Restore initial value #
-####################################
-
-SET @@global.tmp_table_size = @start_global_value;
-SET @@session.tmp_table_size = @start_session_value;
-
-###################################################
-# END OF tmp_table_size TESTS #
-###################################################
-
diff --git a/mysql-test/suite/sys_vars/t/wait_timeout_func.test b/mysql-test/suite/sys_vars/t/wait_timeout_func.test
index ee129b147dd..d388fc9f263 100644
--- a/mysql-test/suite/sys_vars/t/wait_timeout_func.test
+++ b/mysql-test/suite/sys_vars/t/wait_timeout_func.test
@@ -22,7 +22,6 @@
###############################################################################
--source include/not_embedded.inc
---source include/not_threadpool.inc
SET @start_value= @@global.wait_timeout;
diff --git a/mysql-test/suite/sys_vars/t/wsrep_strict_ddl_basic.test b/mysql-test/suite/sys_vars/t/wsrep_strict_ddl_basic.test
new file mode 100644
index 00000000000..04d20ff3db5
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/wsrep_strict_ddl_basic.test
@@ -0,0 +1,42 @@
+--source include/have_wsrep.inc
+
+--echo #
+--echo # wsrep_strict_ddl
+--echo #
+
+--echo # save the initial value
+SET @wsrep_strict_ddl_global_saved = @@global.wsrep_strict_ddl;
+
+--echo # default
+SELECT @@global.wsrep_strict_ddl;
+
+--echo
+--echo # scope
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+SELECT @@session.wsrep_strict_ddl;
+SET @@global.wsrep_strict_ddl=OFF;
+SELECT @@global.wsrep_strict_ddl;
+SET @@global.wsrep_strict_ddl=ON;
+SELECT @@global.wsrep_strict_ddl;
+
+--echo
+--echo # valid values
+SET @@global.wsrep_strict_ddl='OFF';
+SELECT @@global.wsrep_strict_ddl;
+SET @@global.wsrep_strict_ddl=ON;
+SELECT @@global.wsrep_strict_ddl;
+SET @@global.wsrep_strict_ddl=default;
+SELECT @@global.wsrep_strict_ddl;
+
+--echo
+--echo # invalid values
+--error ER_WRONG_VALUE_FOR_VAR
+SET @@global.wsrep_strict_ddl=NULL;
+--error ER_WRONG_VALUE_FOR_VAR
+SET @@global.wsrep_strict_ddl='junk';
+
+--echo
+--echo # restore the initial value
+SET @@global.wsrep_strict_ddl = @wsrep_strict_ddl_global_saved;
+
+--echo # End of test
diff --git a/mysql-test/suite/vcol/inc/vcol_column_def_options.inc b/mysql-test/suite/vcol/inc/vcol_column_def_options.inc
index 2f28136ad63..61eac0014bc 100644
--- a/mysql-test/suite/vcol/inc/vcol_column_def_options.inc
+++ b/mysql-test/suite/vcol/inc/vcol_column_def_options.inc
@@ -103,11 +103,11 @@ drop table t1;
create table t2 (a int);
-create table t1 (a int, b int as (a % 2) persistent references t2(a));
+create table t1 (a int, b int as (a % 2) persistent);
show create table t1;
drop table t1;
create table t1 (a int, b int as (a % 2));
---error ER_PARSE_ERROR
-alter table t1 modify b int as (a % 2) persistent references t2(a);
+--error ER_UNSUPPORTED_ACTION_ON_GENERATED_COLUMN
+alter table t1 modify b int as (a % 2) persistent;
show create table t1;
drop table t1;
diff --git a/mysql-test/suite/vcol/inc/vcol_ins_upd.inc b/mysql-test/suite/vcol/inc/vcol_ins_upd.inc
index 945884b3cd5..8cf0fb9ed6c 100644
--- a/mysql-test/suite/vcol/inc/vcol_ins_upd.inc
+++ b/mysql-test/suite/vcol/inc/vcol_ins_upd.inc
@@ -225,7 +225,7 @@ select * from t1;
delete from t1;
drop table t1;
-let $innodb_engine = `SELECT @@session.storage_engine='innodb'`;
+let $innodb_engine = `SELECT @@session.default_storage_engine='innodb'`;
if ($innodb_engine)
{
--echo #
diff --git a/mysql-test/suite/vcol/inc/vcol_select.inc b/mysql-test/suite/vcol/inc/vcol_select.inc
index cbd1f2cdd26..56e1fc7ad16 100644
--- a/mysql-test/suite/vcol/inc/vcol_select.inc
+++ b/mysql-test/suite/vcol/inc/vcol_select.inc
@@ -146,7 +146,7 @@ eval explain $s;
#### This bug is presumably in base SQL routines as the same happens
#### with this table:
#### create table t4 (a int primary key, b int, c int unique);
-let $myisam_engine = `SELECT @@session.storage_engine='myisam'`;
+let $myisam_engine = `SELECT @@session.default_storage_engine='myisam'`;
if (!$myisam_engine)
{
--echo # SELECT * FROM tbl_name WHERE <non-vcol expr> ORDER BY <non-indexed vcol>
@@ -171,7 +171,7 @@ eval explain $s;
#### This bug is presumably in base SQL routines as the same happens
#### with this table:
#### create table t4 (a int primary key, b int, c int unique);
-let $innodb_engine = `SELECT @@session.storage_engine='innodb'`;
+let $innodb_engine = `SELECT @@session.default_storage_engine='innodb'`;
if (!$innodb_engine)
{
--echo # SELECT * FROM tbl_name WHERE <indexed vcol expr> ORDER BY <non-vcol>
diff --git a/mysql-test/suite/vcol/r/binlog.result b/mysql-test/suite/vcol/r/binlog.result
index 463928b97b8..519877e9bc0 100644
--- a/mysql-test/suite/vcol/r/binlog.result
+++ b/mysql-test/suite/vcol/r/binlog.result
@@ -88,7 +88,7 @@ CREATE TEMPORARY TABLE t1 SELECT UUID();
show create table t1;
Table Create Table
t1 CREATE TEMPORARY TABLE `t1` (
- `UUID()` varchar(36) CHARACTER SET utf8 DEFAULT NULL
+ `UUID()` varchar(36) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
CREATE TABLE t2 (a INT PRIMARY KEY, b TEXT, c INT GENERATED ALWAYS AS(b));
INSERT INTO t2 (a,b) VALUES (1,1);
diff --git a/mysql-test/suite/vcol/r/rpl_vcol.result b/mysql-test/suite/vcol/r/rpl_vcol.result
index b3f764da22c..d95ca8b1f75 100644
--- a/mysql-test/suite/vcol/r/rpl_vcol.result
+++ b/mysql-test/suite/vcol/r/rpl_vcol.result
@@ -1,4 +1,4 @@
-SET @@session.storage_engine = 'InnoDB';
+SET @@session.default_storage_engine = 'InnoDB';
include/master-slave.inc
[connection master]
connection master;
diff --git a/mysql-test/suite/vcol/r/vcol_archive.result b/mysql-test/suite/vcol/r/vcol_archive.result
index ec743088ec2..5c11e8bb9e1 100644
--- a/mysql-test/suite/vcol/r/vcol_archive.result
+++ b/mysql-test/suite/vcol/r/vcol_archive.result
@@ -1,4 +1,4 @@
-SET @@session.storage_engine = 'archive';
+SET @@session.default_storage_engine = 'archive';
create table t1 (a int, b int as (a+1));
ERROR HY000: ARCHIVE storage engine does not support generated columns
create table t1 (a int not null);
diff --git a/mysql-test/suite/vcol/r/vcol_blackhole.result b/mysql-test/suite/vcol/r/vcol_blackhole.result
index 52d40e9a2b8..0bbe439fcc5 100644
--- a/mysql-test/suite/vcol/r/vcol_blackhole.result
+++ b/mysql-test/suite/vcol/r/vcol_blackhole.result
@@ -1,4 +1,4 @@
-SET @@session.storage_engine = 'blackhole';
+SET @@session.default_storage_engine = 'blackhole';
create table t1 (a int, b int as (a+1));
ERROR HY000: BLACKHOLE storage engine does not support generated columns
create table t1 (a int not null);
diff --git a/mysql-test/suite/vcol/r/vcol_blocked_sql_funcs.result b/mysql-test/suite/vcol/r/vcol_blocked_sql_funcs.result
index 19e8efb06ad..a0f33091297 100644
--- a/mysql-test/suite/vcol/r/vcol_blocked_sql_funcs.result
+++ b/mysql-test/suite/vcol/r/vcol_blocked_sql_funcs.result
@@ -1,4 +1,4 @@
-SET @@session.storage_engine = 'MyISAM';
+SET @@session.default_storage_engine = 'MyISAM';
# RAND()
create or replace table t1 (b double as (rand()));
create or replace table t1 (b double as (rand()) PERSISTENT);
diff --git a/mysql-test/suite/vcol/r/vcol_column_def_options_innodb.result b/mysql-test/suite/vcol/r/vcol_column_def_options_innodb.result
index 0f80365f6a7..c0008f8f179 100644
--- a/mysql-test/suite/vcol/r/vcol_column_def_options_innodb.result
+++ b/mysql-test/suite/vcol/r/vcol_column_def_options_innodb.result
@@ -1,4 +1,4 @@
-SET @@session.storage_engine = 'InnoDB';
+SET @@session.default_storage_engine = 'InnoDB';
#
# Section 1. Wrong column definition options
# - NOT NULL
@@ -126,7 +126,7 @@ a b
2 0
drop table t1;
create table t2 (a int);
-create table t1 (a int, b int as (a % 2) persistent references t2(a));
+create table t1 (a int, b int as (a % 2) persistent);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -135,8 +135,8 @@ t1 CREATE TABLE `t1` (
) ENGINE=InnoDB DEFAULT CHARSET=latin1
drop table t1;
create table t1 (a int, b int as (a % 2));
-alter table t1 modify b int as (a % 2) persistent references t2(a);
-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 'references t2(a)' at line 1
+alter table t1 modify b int as (a % 2) persistent;
+ERROR HY000: This is not yet supported for generated columns
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
diff --git a/mysql-test/suite/vcol/r/vcol_column_def_options_myisam.result b/mysql-test/suite/vcol/r/vcol_column_def_options_myisam.result
index e53a7594663..0aea337b074 100644
--- a/mysql-test/suite/vcol/r/vcol_column_def_options_myisam.result
+++ b/mysql-test/suite/vcol/r/vcol_column_def_options_myisam.result
@@ -1,4 +1,4 @@
-SET @@session.storage_engine = 'MyISAM';
+SET @@session.default_storage_engine = 'MyISAM';
#
# Section 1. Wrong column definition options
# - NOT NULL
@@ -126,7 +126,7 @@ a b
2 0
drop table t1;
create table t2 (a int);
-create table t1 (a int, b int as (a % 2) persistent references t2(a));
+create table t1 (a int, b int as (a % 2) persistent);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -135,8 +135,8 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 (a int, b int as (a % 2));
-alter table t1 modify b int as (a % 2) persistent references t2(a);
-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 'references t2(a)' at line 1
+alter table t1 modify b int as (a % 2) persistent;
+ERROR HY000: This is not yet supported for generated columns
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
diff --git a/mysql-test/suite/vcol/r/vcol_csv.result b/mysql-test/suite/vcol/r/vcol_csv.result
index 9a0a76576f6..f8a0941c020 100644
--- a/mysql-test/suite/vcol/r/vcol_csv.result
+++ b/mysql-test/suite/vcol/r/vcol_csv.result
@@ -1,4 +1,4 @@
-SET @@session.storage_engine = 'CSV';
+SET @@session.default_storage_engine = 'CSV';
create table t1 (a int, b int as (a+1));
ERROR HY000: CSV storage engine does not support generated columns
create table t1 (a int not null);
diff --git a/mysql-test/suite/vcol/r/vcol_handler_aria.result b/mysql-test/suite/vcol/r/vcol_handler_aria.result
index df36d0fbbf3..d2e6affc4b4 100644
--- a/mysql-test/suite/vcol/r/vcol_handler_aria.result
+++ b/mysql-test/suite/vcol/r/vcol_handler_aria.result
@@ -1,4 +1,4 @@
-SET @@session.storage_engine = 'maria';
+SET @@session.default_storage_engine = 'maria';
create table t1 (a int,
b int as (-a),
c int as (-a) persistent,
diff --git a/mysql-test/suite/vcol/r/vcol_handler_innodb.result b/mysql-test/suite/vcol/r/vcol_handler_innodb.result
index f7576299e9a..c3358acdbb7 100644
--- a/mysql-test/suite/vcol/r/vcol_handler_innodb.result
+++ b/mysql-test/suite/vcol/r/vcol_handler_innodb.result
@@ -1,4 +1,4 @@
-SET @@session.storage_engine = 'InnoDB';
+SET @@session.default_storage_engine = 'InnoDB';
create table t1 (a int,
b int as (-a),
c int as (-a) persistent,
diff --git a/mysql-test/suite/vcol/r/vcol_handler_myisam.result b/mysql-test/suite/vcol/r/vcol_handler_myisam.result
index ff93756adc5..3596ab1f4ca 100644
--- a/mysql-test/suite/vcol/r/vcol_handler_myisam.result
+++ b/mysql-test/suite/vcol/r/vcol_handler_myisam.result
@@ -1,4 +1,4 @@
-SET @@session.storage_engine = 'MyISAM';
+SET @@session.default_storage_engine = 'MyISAM';
create table t1 (a int,
b int as (-a),
c int as (-a) persistent,
diff --git a/mysql-test/suite/vcol/r/vcol_ins_upd_innodb.result b/mysql-test/suite/vcol/r/vcol_ins_upd_innodb.result
index 3629307a54d..6807f89fdbe 100644
--- a/mysql-test/suite/vcol/r/vcol_ins_upd_innodb.result
+++ b/mysql-test/suite/vcol/r/vcol_ins_upd_innodb.result
@@ -1,4 +1,4 @@
-SET @@session.storage_engine = 'InnoDB';
+SET @@session.default_storage_engine = 'InnoDB';
create table t1 (a int,
b int as (-a),
c int as (-a) persistent);
diff --git a/mysql-test/suite/vcol/r/vcol_ins_upd_myisam.result b/mysql-test/suite/vcol/r/vcol_ins_upd_myisam.result
index 8eb59ca32ff..43206dba31b 100644
--- a/mysql-test/suite/vcol/r/vcol_ins_upd_myisam.result
+++ b/mysql-test/suite/vcol/r/vcol_ins_upd_myisam.result
@@ -1,4 +1,4 @@
-SET @@session.storage_engine = 'MyISAM';
+SET @@session.default_storage_engine = 'MyISAM';
create table t1 (a int,
b int as (-a),
c int as (-a) persistent);
diff --git a/mysql-test/suite/vcol/r/vcol_keys_innodb.result b/mysql-test/suite/vcol/r/vcol_keys_innodb.result
index 9419c35bb38..759de6fbb23 100644
--- a/mysql-test/suite/vcol/r/vcol_keys_innodb.result
+++ b/mysql-test/suite/vcol/r/vcol_keys_innodb.result
@@ -1,4 +1,4 @@
-SET @@session.storage_engine = 'InnoDB';
+SET @@session.default_storage_engine = 'InnoDB';
# - UNIQUE KEY
# - INDEX
# - FULLTEXT INDEX
@@ -239,7 +239,7 @@ col_dec decimal(18,9) not null default 0,
col_enum enum('','a','b','c','d','e','f','foo','bar') not null default '',
col_date date not null default '1900-01-01',
col_timestamp timestamp(3) not null default '1971-01-01 00:00:00',
-vcol_datetime datetime as (col_datetime) virtual,
+vcol_datetime datetime as (truncate(col_datetime,0)) virtual,
vcol_dec decimal(18,9) zerofill as (col_dec) virtual,
vcol_bit bit(63) as (col_bit) virtual,
vcol_char binary(51) as (col_char) virtual,
@@ -257,11 +257,6 @@ insert into t1 (col_varchar,col_int,col_datetime,col_time,col_blob,col_bit,col_y
('foo',1,'2010-05-08 13:08:12.034783','18:32:14','foo',b'0111110101001001',1992,'f',0.2,'','1994-12-26','2019-01-11 00:00:00'),
('bar',6,'1900-01-01 00:00:00','00:00:00','bar',b'10011000001101011000101',1985,'b',0.7,'','2028-04-06','1971-01-01 00:00:00');
alter table t1 add index(vcol_datetime);
-Warnings:
-Warning 1901 Function or expression '`col_datetime`' cannot be used in the GENERATED ALWAYS AS clause of `vcol_datetime`
-Warning 1105 Expression depends on the @@sql_mode value TIME_ROUND_FRACTIONAL
-Warning 1901 Function or expression '`col_datetime`' cannot be used in the GENERATED ALWAYS AS clause of `vcol_datetime`
-Warning 1105 Expression depends on the @@sql_mode value TIME_ROUND_FRACTIONAL
drop table t1;
create table t1 (
pk int,
diff --git a/mysql-test/suite/vcol/r/vcol_keys_myisam.result b/mysql-test/suite/vcol/r/vcol_keys_myisam.result
index 803f7446810..1e6c854e0d9 100644
--- a/mysql-test/suite/vcol/r/vcol_keys_myisam.result
+++ b/mysql-test/suite/vcol/r/vcol_keys_myisam.result
@@ -1,4 +1,4 @@
-SET @@session.storage_engine = 'MyISAM';
+SET @@session.default_storage_engine = 'MyISAM';
# - UNIQUE KEY
# - INDEX
# - FULLTEXT INDEX
diff --git a/mysql-test/suite/vcol/r/vcol_memory.result b/mysql-test/suite/vcol/r/vcol_memory.result
index 1324be82101..3284d97398e 100644
--- a/mysql-test/suite/vcol/r/vcol_memory.result
+++ b/mysql-test/suite/vcol/r/vcol_memory.result
@@ -1,4 +1,4 @@
-SET @@session.storage_engine = 'memory';
+SET @@session.default_storage_engine = 'memory';
create table t1 (a int, b int as (a+1));
ERROR HY000: MEMORY storage engine does not support generated columns
create table t1 (a int not null);
diff --git a/mysql-test/suite/vcol/r/vcol_non_stored_columns_innodb.result b/mysql-test/suite/vcol/r/vcol_non_stored_columns_innodb.result
index 84817469fa2..058c389e885 100644
--- a/mysql-test/suite/vcol/r/vcol_non_stored_columns_innodb.result
+++ b/mysql-test/suite/vcol/r/vcol_non_stored_columns_innodb.result
@@ -1,4 +1,4 @@
-SET @@session.storage_engine = 'InnoDB';
+SET @@session.default_storage_engine = 'InnoDB';
# Case 1. All non-stored columns.
# This scenario is currently impossible due to the fact that virtual columns
# with a constant expression are not allowed.
diff --git a/mysql-test/suite/vcol/r/vcol_non_stored_columns_myisam.result b/mysql-test/suite/vcol/r/vcol_non_stored_columns_myisam.result
index b4b41635110..bc1ba990596 100644
--- a/mysql-test/suite/vcol/r/vcol_non_stored_columns_myisam.result
+++ b/mysql-test/suite/vcol/r/vcol_non_stored_columns_myisam.result
@@ -1,4 +1,4 @@
-SET @@session.storage_engine = 'MyISAM';
+SET @@session.default_storage_engine = 'MyISAM';
# Case 1. All non-stored columns.
# This scenario is currently impossible due to the fact that virtual columns
# with a constant expression are not allowed.
diff --git a/mysql-test/suite/vcol/r/vcol_partition_innodb.result b/mysql-test/suite/vcol/r/vcol_partition_innodb.result
index 4c869a0a37d..c25fc7b2490 100644
--- a/mysql-test/suite/vcol/r/vcol_partition_innodb.result
+++ b/mysql-test/suite/vcol/r/vcol_partition_innodb.result
@@ -1,4 +1,4 @@
-SET @@session.storage_engine = 'InnoDB';
+SET @@session.default_storage_engine = 'InnoDB';
drop table if exists t1;
# Case 1. Partitioning by RANGE based on a non-stored virtual column.
CREATE TABLE t1 (
diff --git a/mysql-test/suite/vcol/r/vcol_partition_myisam.result b/mysql-test/suite/vcol/r/vcol_partition_myisam.result
index aeeaec2ac22..a7733ddf2d6 100644
--- a/mysql-test/suite/vcol/r/vcol_partition_myisam.result
+++ b/mysql-test/suite/vcol/r/vcol_partition_myisam.result
@@ -1,4 +1,4 @@
-SET @@session.storage_engine = 'MyISAM';
+SET @@session.default_storage_engine = 'MyISAM';
drop table if exists t1;
# Case 1. Partitioning by RANGE based on a non-stored virtual column.
CREATE TABLE t1 (
diff --git a/mysql-test/suite/vcol/r/vcol_select_innodb.result b/mysql-test/suite/vcol/r/vcol_select_innodb.result
index 0f6cdf918f9..e275a66091c 100644
--- a/mysql-test/suite/vcol/r/vcol_select_innodb.result
+++ b/mysql-test/suite/vcol/r/vcol_select_innodb.result
@@ -1,4 +1,4 @@
-SET @@session.storage_engine = 'InnoDB';
+SET @@session.default_storage_engine = 'InnoDB';
create table t1 (a int,
b int as (-a),
c int as (-a) persistent,
@@ -73,8 +73,8 @@ a b c
1 -1 -1
explain select * from t1 where c in (select c from t3 where c between -2 and -1);
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t3 index c c 5 NULL 6 Using where; Using index
-1 PRIMARY t1 ALL c NULL NULL NULL 5 Using where; Using join buffer (flat, BNL join)
+1 PRIMARY t3 range c c 5 NULL 2 Using where; Using index
+1 PRIMARY t1 ref c c 5 test.t3.c 1
# select_type=UNION, type=system
# select_type=UNION RESULT, type=<union1,2>
select * from t1 union select * from t2;
@@ -133,7 +133,7 @@ count(distinct c)
3
explain select count(distinct c) from t1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL c 5 NULL 6 Using index for group-by (scanning)
+1 SIMPLE t1 range NULL c 5 NULL 6 Using index for group-by
###
### filesort & range-based utils
###
diff --git a/mysql-test/suite/vcol/r/vcol_select_myisam.result b/mysql-test/suite/vcol/r/vcol_select_myisam.result
index 017531f31eb..05f86347706 100644
--- a/mysql-test/suite/vcol/r/vcol_select_myisam.result
+++ b/mysql-test/suite/vcol/r/vcol_select_myisam.result
@@ -1,4 +1,4 @@
-SET @@session.storage_engine = 'MyISAM';
+SET @@session.default_storage_engine = 'MyISAM';
create table t1 (a int,
b int as (-a),
c int as (-a) persistent,
@@ -73,8 +73,8 @@ a b c
1 -1 -1
explain select * from t1 where c in (select c from t3 where c between -2 and -1);
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t1 range c c 5 NULL 3 Using index condition
-1 PRIMARY t3 eq_ref c c 5 test.t1.c 1 Using index
+1 PRIMARY t3 range c c 5 NULL 2 Using where; Using index
+1 PRIMARY t1 ref c c 5 test.t3.c 2
# select_type=UNION, type=system
# select_type=UNION RESULT, type=<union1,2>
select * from t1 union select * from t2;
@@ -133,7 +133,7 @@ count(distinct c)
3
explain select count(distinct c) from t1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL c 5 NULL 6 Using index for group-by (scanning)
+1 SIMPLE t1 range NULL c 5 NULL 6 Using index for group-by
###
### filesort & range-based utils
###
diff --git a/mysql-test/suite/vcol/r/vcol_sql_mode.result b/mysql-test/suite/vcol/r/vcol_sql_mode.result
index ecbafc87b84..ba75aeb0e6c 100644
--- a/mysql-test/suite/vcol/r/vcol_sql_mode.result
+++ b/mysql-test/suite/vcol/r/vcol_sql_mode.result
@@ -26,46 +26,31 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
CREATE TABLE t1 (a CHAR(5), v TIME AS (a) VIRTUAL, KEY(v));
-Warnings:
-Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
-Warning 1105 Expression depends on the @@sql_mode value TIME_ROUND_FRACTIONAL
-DROP TABLE t1;
+ERROR HY000: Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
CREATE TABLE t1 (c CHAR(8), v BINARY(8) AS (c), KEY(v));
-Warnings:
-Warning 1901 Function or expression '`c`' cannot be used in the GENERATED ALWAYS AS clause of `v`
-Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
+ERROR HY000: Function or expression '`c`' cannot be used in the GENERATED ALWAYS AS clause of `v`
SHOW WARNINGS;
Level Code Message
-Warning 1901 Function or expression '`c`' cannot be used in the GENERATED ALWAYS AS clause of `v`
+Error 1901 Function or expression '`c`' cannot be used in the GENERATED ALWAYS AS clause of `v`
Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
-DROP TABLE t1;
CREATE TABLE t1 (a CHAR(5), v BIT(64) AS (a) VIRTUAL, KEY(v));
-Warnings:
-Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
-Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
+ERROR HY000: Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
SHOW WARNINGS;
Level Code Message
-Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
+Error 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
-DROP TABLE t1;
CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (a) VIRTUAL, KEY(v));
-Warnings:
-Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
-Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
+ERROR HY000: Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
SHOW WARNINGS;
Level Code Message
-Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
+Error 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
-DROP TABLE t1;
CREATE TABLE t1 (a CHAR(5), v TEXT AS (a) VIRTUAL, KEY(v(100)));
-Warnings:
-Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
-Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
+ERROR HY000: Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
SHOW WARNINGS;
Level Code Message
-Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
+Error 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
-DROP TABLE t1;
# PAD_CHAR_TO_FULL_LENGTH + TRIM resolving dependency
CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (RTRIM(a)) VIRTUAL, KEY(v));
SHOW CREATE TABLE t1;
@@ -141,94 +126,67 @@ t1 CREATE TABLE `t1` (
DROP TABLE t1;
# PAD_CHAR_TO_FULL_LENGTH + TRIM not resolving dependency
CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (TRIM(LEADING ' ' FROM a)) VIRTUAL, KEY(v));
-Warnings:
-Warning 1901 Function or expression 'trim(leading ' ' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v`
-Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
+ERROR HY000: Function or expression 'trim(leading ' ' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v`
SHOW WARNINGS;
Level Code Message
-Warning 1901 Function or expression 'trim(leading ' ' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v`
+Error 1901 Function or expression 'trim(leading ' ' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v`
Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
-DROP TABLE t1;
CREATE TABLE t1 (a CHAR(5), v TEXT AS (TRIM(LEADING ' ' FROM a)) VIRTUAL, KEY(v(100)));
-Warnings:
-Warning 1901 Function or expression 'trim(leading ' ' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v`
-Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
+ERROR HY000: Function or expression 'trim(leading ' ' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v`
SHOW WARNINGS;
Level Code Message
-Warning 1901 Function or expression 'trim(leading ' ' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v`
+Error 1901 Function or expression 'trim(leading ' ' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v`
Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
-DROP TABLE t1;
CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (TRIM(TRAILING '' FROM a)) VIRTUAL, KEY(v));
-Warnings:
-Warning 1901 Function or expression 'trim(trailing '' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v`
-Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
+ERROR HY000: Function or expression 'trim(trailing '' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v`
SHOW WARNINGS;
Level Code Message
-Warning 1901 Function or expression 'trim(trailing '' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v`
+Error 1901 Function or expression 'trim(trailing '' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v`
Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
-DROP TABLE t1;
CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (TRIM(BOTH '' FROM a)) VIRTUAL, KEY(v));
-Warnings:
-Warning 1901 Function or expression 'trim(both '' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v`
-Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
+ERROR HY000: Function or expression 'trim(both '' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v`
SHOW WARNINGS;
Level Code Message
-Warning 1901 Function or expression 'trim(both '' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v`
+Error 1901 Function or expression 'trim(both '' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v`
Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
-DROP TABLE t1;
CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (TRIM(TRAILING 'x' FROM a)) VIRTUAL, KEY(v));
-Warnings:
-Warning 1901 Function or expression 'trim(trailing 'x' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v`
-Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
+ERROR HY000: Function or expression 'trim(trailing 'x' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v`
SHOW WARNINGS;
Level Code Message
-Warning 1901 Function or expression 'trim(trailing 'x' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v`
+Error 1901 Function or expression 'trim(trailing 'x' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v`
Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
-DROP TABLE t1;
CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (TRIM(BOTH 'x' FROM a)) VIRTUAL, KEY(v));
-Warnings:
-Warning 1901 Function or expression 'trim(both 'x' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v`
-Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
+ERROR HY000: Function or expression 'trim(both 'x' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v`
SHOW WARNINGS;
Level Code Message
-Warning 1901 Function or expression 'trim(both 'x' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v`
+Error 1901 Function or expression 'trim(both 'x' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v`
Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
-DROP TABLE t1;
CREATE TABLE t1 (
a CHAR(5),
v VARCHAR(5) AS (TRIM(TRAILING ' ' FROM a)) VIRTUAL, KEY(v));
-Warnings:
-Warning 1901 Function or expression 'trim(trailing ' ' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v`
-Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
+ERROR HY000: Function or expression 'trim(trailing ' ' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v`
SHOW WARNINGS;
Level Code Message
-Warning 1901 Function or expression 'trim(trailing ' ' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v`
+Error 1901 Function or expression 'trim(trailing ' ' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v`
Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
-DROP TABLE t1;
CREATE TABLE t1 (
a CHAR(5),
v VARCHAR(5) AS (TRIM(BOTH ' ' FROM a)) VIRTUAL, KEY(v));
-Warnings:
-Warning 1901 Function or expression 'trim(both ' ' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v`
-Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
+ERROR HY000: Function or expression 'trim(both ' ' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v`
SHOW WARNINGS;
Level Code Message
-Warning 1901 Function or expression 'trim(both ' ' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v`
+Error 1901 Function or expression 'trim(both ' ' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v`
Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
-DROP TABLE t1;
# PAD_CHAR_TO_FULL_LENGTH + TRIM(... non_constant FROM a)
CREATE TABLE t1 (
a CHAR(5),
b CHAR(5),
v TEXT AS (TRIM(TRAILING b FROM a)) VIRTUAL, KEY(v(100)));
-Warnings:
-Warning 1901 Function or expression 'trim(trailing `b` from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v`
-Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
+ERROR HY000: Function or expression 'trim(trailing `b` from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v`
SHOW WARNINGS;
Level Code Message
-Warning 1901 Function or expression 'trim(trailing `b` from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v`
+Error 1901 Function or expression 'trim(trailing `b` from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v`
Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
-DROP TABLE t1;
# PAD_CHAR_TO_FULL_LENGTH + RPAD resolving dependency
CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (RPAD(a,5,' ')) VIRTUAL, KEY(v));
SHOW CREATE TABLE t1;
@@ -268,28 +226,22 @@ t1 CREATE TABLE `t1` (
DROP TABLE t1;
# PAD_CHAR_TO_FULL_LENGTH + RPAD not resolving dependency
CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (RPAD(a,4,' ')) VIRTUAL, KEY(v));
-Warnings:
-Warning 1901 Function or expression 'rpad(`a`,4,' ')' cannot be used in the GENERATED ALWAYS AS clause of `v`
-Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
+ERROR HY000: Function or expression 'rpad(`a`,4,' ')' cannot be used in the GENERATED ALWAYS AS clause of `v`
SHOW WARNINGS;
Level Code Message
-Warning 1901 Function or expression 'rpad(`a`,4,' ')' cannot be used in the GENERATED ALWAYS AS clause of `v`
+Error 1901 Function or expression 'rpad(`a`,4,' ')' cannot be used in the GENERATED ALWAYS AS clause of `v`
Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
-DROP TABLE t1;
CREATE TABLE t1 (
a CHAR(5),
b CHAR(5),
v VARCHAR(5) AS (RPAD(a,NULL,b)) VIRTUAL,
KEY(v)
);
-Warnings:
-Warning 1901 Function or expression 'rpad(`a`,NULL,`b`)' cannot be used in the GENERATED ALWAYS AS clause of `v`
-Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
+ERROR HY000: Function or expression 'rpad(`a`,NULL,`b`)' cannot be used in the GENERATED ALWAYS AS clause of `v`
SHOW WARNINGS;
Level Code Message
-Warning 1901 Function or expression 'rpad(`a`,NULL,`b`)' cannot be used in the GENERATED ALWAYS AS clause of `v`
+Error 1901 Function or expression 'rpad(`a`,NULL,`b`)' cannot be used in the GENERATED ALWAYS AS clause of `v`
Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
-DROP TABLE t1;
# PAD_CHAR_TO_FULL_LENGTH + comparison
CREATE TABLE t1 (a CHAR(5), v INT AS (a='a') VIRTUAL, KEY(v));
SHOW CREATE TABLE t1;
@@ -304,14 +256,11 @@ CREATE TABLE t1 (
a CHAR(5) CHARACTER SET latin1 COLLATE latin1_nopad_bin,
v INT AS (a='a') VIRTUAL, KEY(v)
);
-Warnings:
-Warning 1901 Function or expression '`a` = 'a'' cannot be used in the GENERATED ALWAYS AS clause of `v`
-Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
+ERROR HY000: Function or expression '`a` = 'a'' cannot be used in the GENERATED ALWAYS AS clause of `v`
SHOW WARNINGS;
Level Code Message
-Warning 1901 Function or expression '`a` = 'a'' cannot be used in the GENERATED ALWAYS AS clause of `v`
+Error 1901 Function or expression '`a` = 'a'' cannot be used in the GENERATED ALWAYS AS clause of `v`
Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
-DROP TABLE t1;
# PAD_CHAR_TO_FULL_LENGTH + LIKE
CREATE TABLE t1 (a CHAR(5), v INT AS (a LIKE 'a%') VIRTUAL, KEY(v));
SHOW CREATE TABLE t1;
@@ -332,24 +281,18 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
CREATE TABLE t1 (a CHAR(5), v INT AS (a LIKE 'a') VIRTUAL, KEY(v));
-Warnings:
-Warning 1901 Function or expression '`a` like 'a'' cannot be used in the GENERATED ALWAYS AS clause of `v`
-Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
+ERROR HY000: Function or expression '`a` like 'a'' cannot be used in the GENERATED ALWAYS AS clause of `v`
SHOW WARNINGS;
Level Code Message
-Warning 1901 Function or expression '`a` like 'a'' cannot be used in the GENERATED ALWAYS AS clause of `v`
+Error 1901 Function or expression '`a` like 'a'' cannot be used in the GENERATED ALWAYS AS clause of `v`
Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
-DROP TABLE t1;
# PAD_CHAR_TO_FULL_LENGTH + LENGTH(char_column) = hard dependency
CREATE TABLE t1 (a CHAR(5), v INT AS (LENGTH(a)) VIRTUAL, KEY(v));
-Warnings:
-Warning 1901 Function or expression 'octet_length(`a`)' cannot be used in the GENERATED ALWAYS AS clause of `v`
-Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
+ERROR HY000: Function or expression 'octet_length(`a`)' cannot be used in the GENERATED ALWAYS AS clause of `v`
SHOW WARNINGS;
Level Code Message
-Warning 1901 Function or expression 'octet_length(`a`)' cannot be used in the GENERATED ALWAYS AS clause of `v`
+Error 1901 Function or expression 'octet_length(`a`)' cannot be used in the GENERATED ALWAYS AS clause of `v`
Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
-DROP TABLE t1;
#
# Testing NO_UNSIGNED_SUBTRACTION
#
@@ -359,42 +302,33 @@ b INT UNSIGNED,
c INT GENERATED ALWAYS AS (a-b) VIRTUAL,
KEY (c)
);
-Warnings:
-Warning 1901 Function or expression '`a` - `b`' cannot be used in the GENERATED ALWAYS AS clause of `c`
-Warning 1105 Expression depends on the @@sql_mode value NO_UNSIGNED_SUBTRACTION
+ERROR HY000: Function or expression '`a` - `b`' cannot be used in the GENERATED ALWAYS AS clause of `c`
SHOW WARNINGS;
Level Code Message
-Warning 1901 Function or expression '`a` - `b`' cannot be used in the GENERATED ALWAYS AS clause of `c`
+Error 1901 Function or expression '`a` - `b`' cannot be used in the GENERATED ALWAYS AS clause of `c`
Warning 1105 Expression depends on the @@sql_mode value NO_UNSIGNED_SUBTRACTION
-DROP TABLE t1;
CREATE TABLE t1 (
a INT UNSIGNED,
b INT UNSIGNED,
c INT GENERATED ALWAYS AS (CAST(a AS SIGNED)-b) VIRTUAL,
KEY (c)
);
-Warnings:
-Warning 1901 Function or expression 'cast(`a` as signed) - `b`' cannot be used in the GENERATED ALWAYS AS clause of `c`
-Warning 1105 Expression depends on the @@sql_mode value NO_UNSIGNED_SUBTRACTION
+ERROR HY000: Function or expression 'cast(`a` as signed) - `b`' cannot be used in the GENERATED ALWAYS AS clause of `c`
SHOW WARNINGS;
Level Code Message
-Warning 1901 Function or expression 'cast(`a` as signed) - `b`' cannot be used in the GENERATED ALWAYS AS clause of `c`
+Error 1901 Function or expression 'cast(`a` as signed) - `b`' cannot be used in the GENERATED ALWAYS AS clause of `c`
Warning 1105 Expression depends on the @@sql_mode value NO_UNSIGNED_SUBTRACTION
-DROP TABLE t1;
CREATE TABLE t1 (
a INT UNSIGNED,
b INT UNSIGNED,
c INT GENERATED ALWAYS AS (a-CAST(b AS SIGNED)) VIRTUAL,
KEY (c)
);
-Warnings:
-Warning 1901 Function or expression '`a` - cast(`b` as signed)' cannot be used in the GENERATED ALWAYS AS clause of `c`
-Warning 1105 Expression depends on the @@sql_mode value NO_UNSIGNED_SUBTRACTION
+ERROR HY000: Function or expression '`a` - cast(`b` as signed)' cannot be used in the GENERATED ALWAYS AS clause of `c`
SHOW WARNINGS;
Level Code Message
-Warning 1901 Function or expression '`a` - cast(`b` as signed)' cannot be used in the GENERATED ALWAYS AS clause of `c`
+Error 1901 Function or expression '`a` - cast(`b` as signed)' cannot be used in the GENERATED ALWAYS AS clause of `c`
Warning 1105 Expression depends on the @@sql_mode value NO_UNSIGNED_SUBTRACTION
-DROP TABLE t1;
CREATE TABLE t1 (
a INT UNSIGNED,
b INT UNSIGNED,
@@ -435,16 +369,12 @@ c CHAR(5),
v VARCHAR(5) GENERATED ALWAYS AS (RPAD(c,a-b,' ')) VIRTUAL,
KEY (v)
);
-Warnings:
-Warning 1901 Function or expression 'rpad(`c`,`a` - `b`,' ')' cannot be used in the GENERATED ALWAYS AS clause of `v`
-Warning 1105 Expression depends on the @@sql_mode value NO_UNSIGNED_SUBTRACTION
-Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
+ERROR HY000: Function or expression 'rpad(`c`,`a` - `b`,' ')' cannot be used in the GENERATED ALWAYS AS clause of `v`
SHOW WARNINGS;
Level Code Message
-Warning 1901 Function or expression 'rpad(`c`,`a` - `b`,' ')' cannot be used in the GENERATED ALWAYS AS clause of `v`
+Error 1901 Function or expression 'rpad(`c`,`a` - `b`,' ')' cannot be used in the GENERATED ALWAYS AS clause of `v`
Warning 1105 Expression depends on the @@sql_mode value NO_UNSIGNED_SUBTRACTION
Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
-DROP TABLE t1;
CREATE TABLE t1 (
a INT UNSIGNED,
b INT UNSIGNED,
@@ -452,14 +382,11 @@ c CHAR(5),
v VARCHAR(5) GENERATED ALWAYS AS (RPAD(c,CAST(a AS DECIMAL(20,1))-b,' ')) VIRTUAL,
KEY (v)
);
-Warnings:
-Warning 1901 Function or expression 'rpad(`c`,cast(`a` as decimal(20,1)) - `b`,' ')' cannot be used in the GENERATED ALWAYS AS clause of `v`
-Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
+ERROR HY000: Function or expression 'rpad(`c`,cast(`a` as decimal(20,1)) - `b`,' ')' cannot be used in the GENERATED ALWAYS AS clause of `v`
SHOW WARNINGS;
Level Code Message
-Warning 1901 Function or expression 'rpad(`c`,cast(`a` as decimal(20,1)) - `b`,' ')' cannot be used in the GENERATED ALWAYS AS clause of `v`
+Error 1901 Function or expression 'rpad(`c`,cast(`a` as decimal(20,1)) - `b`,' ')' cannot be used in the GENERATED ALWAYS AS clause of `v`
Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
-DROP TABLE t1;
# ALTER TABLE ADD KEY(vcol_depending_on_sql_mode) --> error
CREATE TABLE t1 (
a INT UNSIGNED,
@@ -468,62 +395,32 @@ c CHAR(5),
v VARCHAR(5) GENERATED ALWAYS AS (c) VIRTUAL
);
ALTER TABLE t1 ADD KEY(v);
-Warnings:
-Warning 1901 Function or expression '`c`' cannot be used in the GENERATED ALWAYS AS clause of `v`
-Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
-Warning 1901 Function or expression '`c`' cannot be used in the GENERATED ALWAYS AS clause of `v`
-Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
-Warning 1901 Function or expression '`c`' cannot be used in the GENERATED ALWAYS AS clause of `v`
-Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
+ERROR HY000: Function or expression '`c`' cannot be used in the GENERATED ALWAYS AS clause of `v`
SHOW WARNINGS;
Level Code Message
-Warning 1901 Function or expression '`c`' cannot be used in the GENERATED ALWAYS AS clause of `v`
-Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
-Warning 1901 Function or expression '`c`' cannot be used in the GENERATED ALWAYS AS clause of `v`
-Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
-Warning 1901 Function or expression '`c`' cannot be used in the GENERATED ALWAYS AS clause of `v`
-Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
-ALTER TABLE t1 DROP KEY v;
-Warnings:
-Warning 1901 Function or expression '`c`' cannot be used in the GENERATED ALWAYS AS clause of `v`
+Error 1901 Function or expression '`c`' cannot be used in the GENERATED ALWAYS AS clause of `v`
Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
CREATE INDEX v ON t1 (v);
-Warnings:
-Warning 1901 Function or expression '`c`' cannot be used in the GENERATED ALWAYS AS clause of `v`
-Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
-Warning 1901 Function or expression '`c`' cannot be used in the GENERATED ALWAYS AS clause of `v`
-Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
-Warning 1901 Function or expression '`c`' cannot be used in the GENERATED ALWAYS AS clause of `v`
-Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
+ERROR HY000: Function or expression '`c`' cannot be used in the GENERATED ALWAYS AS clause of `v`
SHOW WARNINGS;
Level Code Message
-Warning 1901 Function or expression '`c`' cannot be used in the GENERATED ALWAYS AS clause of `v`
-Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
-Warning 1901 Function or expression '`c`' cannot be used in the GENERATED ALWAYS AS clause of `v`
-Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
-Warning 1901 Function or expression '`c`' cannot be used in the GENERATED ALWAYS AS clause of `v`
+Error 1901 Function or expression '`c`' cannot be used in the GENERATED ALWAYS AS clause of `v`
Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
DROP TABLE t1;
# A virtual column on the second position in an index - cannot depend on sql_mode
CREATE TABLE t1 (id int, a CHAR(5), v TEXT AS (a) VIRTUAL, KEY(id, v(100)));
-Warnings:
-Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
-Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
+ERROR HY000: Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
SHOW WARNINGS;
Level Code Message
-Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
+Error 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
-DROP TABLE t1;
# A persisten virtual column cannot depend on sql_mode
CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (a) PERSISTENT);
-Warnings:
-Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
-Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
+ERROR HY000: Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
SHOW WARNINGS;
Level Code Message
-Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
+Error 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
-DROP TABLE t1;
CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (RTRIM(a)) PERSISTENT);
SHOW CREATE TABLE t1;
Table Create Table
diff --git a/mysql-test/suite/vcol/r/vcol_sql_mode_datetime.result b/mysql-test/suite/vcol/r/vcol_sql_mode_datetime.result
index 151b95095a8..3033ffb66b4 100644
--- a/mysql-test/suite/vcol/r/vcol_sql_mode_datetime.result
+++ b/mysql-test/suite/vcol/r/vcol_sql_mode_datetime.result
@@ -40,30 +40,21 @@ d DATETIME,
v DATETIME(3) AS (t) VIRTUAL,
KEY(v,d)
);
-Warnings:
-Warning 1901 Function or expression '`t`' cannot be used in the GENERATED ALWAYS AS clause of `v`
-Warning 1105 Expression depends on the @@sql_mode value TIME_ROUND_FRACTIONAL
-DROP TABLE t1;
+ERROR HY000: Function or expression '`t`' cannot be used in the GENERATED ALWAYS AS clause of `v`
CREATE TABLE t1 (
t DATETIME(4),
d DATETIME,
v DATETIME(3) AS (COALESCE(t)) VIRTUAL,
KEY(v,d)
);
-Warnings:
-Warning 1901 Function or expression 'coalesce(`t`)' cannot be used in the GENERATED ALWAYS AS clause of `v`
-Warning 1105 Expression depends on the @@sql_mode value TIME_ROUND_FRACTIONAL
-DROP TABLE t1;
+ERROR HY000: Function or expression 'coalesce(`t`)' cannot be used in the GENERATED ALWAYS AS clause of `v`
CREATE TABLE t1 (
t DATETIME(4),
d DATETIME,
v DATETIME(3) AS ('2001-01-01 10:20:30.1234') VIRTUAL,
KEY(v,d)
);
-Warnings:
-Warning 1901 Function or expression ''2001-01-01 10:20:30.1234'' cannot be used in the GENERATED ALWAYS AS clause of `v`
-Warning 1105 Expression depends on the @@sql_mode value TIME_ROUND_FRACTIONAL
-DROP TABLE t1;
+ERROR HY000: Function or expression ''2001-01-01 10:20:30.1234'' cannot be used in the GENERATED ALWAYS AS clause of `v`
# OK: lower FSP + ROUND + virtual index
SET sql_mode=DEFAULT;
CREATE TABLE t1 (
@@ -104,10 +95,7 @@ a DATETIME(6),
v VARCHAR(30) GENERATED ALWAYS AS (CAST(a AS DATETIME(3))) VIRTUAL,
KEY (v)
);
-Warnings:
-Warning 1901 Function or expression 'cast(`a` as datetime(3))' cannot be used in the GENERATED ALWAYS AS clause of `v`
-Warning 1105 Expression depends on the @@sql_mode value TIME_ROUND_FRACTIONAL
-DROP TABLE t1;
+ERROR HY000: Function or expression 'cast(`a` as datetime(3))' cannot be used in the GENERATED ALWAYS AS clause of `v`
CREATE TABLE t1 (
a DATETIME(6),
v VARCHAR(30) GENERATED ALWAYS AS (TRUNCATE(a,3)) VIRTUAL,
diff --git a/mysql-test/suite/vcol/r/vcol_sql_mode_time.result b/mysql-test/suite/vcol/r/vcol_sql_mode_time.result
index adf650fff9f..300b91726d1 100644
--- a/mysql-test/suite/vcol/r/vcol_sql_mode_time.result
+++ b/mysql-test/suite/vcol/r/vcol_sql_mode_time.result
@@ -40,30 +40,21 @@ d TIME,
v TIME(3) AS (t) VIRTUAL,
KEY(v,d)
);
-Warnings:
-Warning 1901 Function or expression '`t`' cannot be used in the GENERATED ALWAYS AS clause of `v`
-Warning 1105 Expression depends on the @@sql_mode value TIME_ROUND_FRACTIONAL
-DROP TABLE t1;
+ERROR HY000: Function or expression '`t`' cannot be used in the GENERATED ALWAYS AS clause of `v`
CREATE TABLE t1 (
t TIME(4),
d TIME,
v TIME(3) AS (COALESCE(t)) VIRTUAL,
KEY(v,d)
);
-Warnings:
-Warning 1901 Function or expression 'coalesce(`t`)' cannot be used in the GENERATED ALWAYS AS clause of `v`
-Warning 1105 Expression depends on the @@sql_mode value TIME_ROUND_FRACTIONAL
-DROP TABLE t1;
+ERROR HY000: Function or expression 'coalesce(`t`)' cannot be used in the GENERATED ALWAYS AS clause of `v`
CREATE TABLE t1 (
t TIME(4),
d TIME,
v TIME(3) AS ('2001-01-01 10:20:30.1234') VIRTUAL,
KEY(v,d)
);
-Warnings:
-Warning 1901 Function or expression ''2001-01-01 10:20:30.1234'' cannot be used in the GENERATED ALWAYS AS clause of `v`
-Warning 1105 Expression depends on the @@sql_mode value TIME_ROUND_FRACTIONAL
-DROP TABLE t1;
+ERROR HY000: Function or expression ''2001-01-01 10:20:30.1234'' cannot be used in the GENERATED ALWAYS AS clause of `v`
# OK: lower FSP + ROUND + virtual index
SET sql_mode=DEFAULT;
CREATE TABLE t1 (
@@ -104,10 +95,7 @@ a TIME(6),
v VARCHAR(30) GENERATED ALWAYS AS (CAST(a AS TIME(3))) VIRTUAL,
KEY (v)
);
-Warnings:
-Warning 1901 Function or expression 'cast(`a` as time(3))' cannot be used in the GENERATED ALWAYS AS clause of `v`
-Warning 1105 Expression depends on the @@sql_mode value TIME_ROUND_FRACTIONAL
-DROP TABLE t1;
+ERROR HY000: Function or expression 'cast(`a` as time(3))' cannot be used in the GENERATED ALWAYS AS clause of `v`
CREATE TABLE t1 (
a TIME(6),
v VARCHAR(30) GENERATED ALWAYS AS (TRUNCATE(a,3)) VIRTUAL,
diff --git a/mysql-test/suite/vcol/r/vcol_sql_mode_timestamp.result b/mysql-test/suite/vcol/r/vcol_sql_mode_timestamp.result
index 7c82856717d..df1cee04542 100644
--- a/mysql-test/suite/vcol/r/vcol_sql_mode_timestamp.result
+++ b/mysql-test/suite/vcol/r/vcol_sql_mode_timestamp.result
@@ -40,30 +40,21 @@ d DATETIME,
v TIMESTAMP(3) AS (t) VIRTUAL,
KEY(v,d)
);
-Warnings:
-Warning 1901 Function or expression '`t`' cannot be used in the GENERATED ALWAYS AS clause of `v`
-Warning 1105 Expression depends on the @@sql_mode value TIME_ROUND_FRACTIONAL
-DROP TABLE t1;
+ERROR HY000: Function or expression '`t`' cannot be used in the GENERATED ALWAYS AS clause of `v`
CREATE TABLE t1 (
t TIMESTAMP(4),
d DATETIME,
v TIMESTAMP(3) AS (COALESCE(t)) VIRTUAL,
KEY(v,d)
);
-Warnings:
-Warning 1901 Function or expression 'coalesce(`t`)' cannot be used in the GENERATED ALWAYS AS clause of `v`
-Warning 1105 Expression depends on the @@sql_mode value TIME_ROUND_FRACTIONAL
-DROP TABLE t1;
+ERROR HY000: Function or expression 'coalesce(`t`)' cannot be used in the GENERATED ALWAYS AS clause of `v`
CREATE TABLE t1 (
t TIMESTAMP(4),
d DATETIME,
v TIMESTAMP(3) AS ('2001-01-01 10:20:30.1234') VIRTUAL,
KEY(v,d)
);
-Warnings:
-Warning 1901 Function or expression ''2001-01-01 10:20:30.1234'' cannot be used in the GENERATED ALWAYS AS clause of `v`
-Warning 1105 Expression depends on the @@sql_mode value TIME_ROUND_FRACTIONAL
-DROP TABLE t1;
+ERROR HY000: Function or expression ''2001-01-01 10:20:30.1234'' cannot be used in the GENERATED ALWAYS AS clause of `v`
# OK: lower FSP + ROUND + virtual index
SET sql_mode=DEFAULT;
CREATE TABLE t1 (
@@ -105,12 +96,10 @@ b TIMESTAMP AS (a) VIRTUAL,
KEY (b)
);
ALTER TABLE t1 MODIFY a BLOB FIRST;
-Warnings:
-Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `b`
-Warning 1105 Expression depends on the @@sql_mode value TIME_ROUND_FRACTIONAL
-Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `b`
-Warning 1105 Expression depends on the @@sql_mode value TIME_ROUND_FRACTIONAL
-Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `b`
+ERROR HY000: Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `b`
+SHOW WARNINGS;
+Level Code Message
+Error 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `b`
Warning 1105 Expression depends on the @@sql_mode value TIME_ROUND_FRACTIONAL
DROP TABLE t1;
#
diff --git a/mysql-test/suite/vcol/r/vcol_sql_mode_upgrade.result b/mysql-test/suite/vcol/r/vcol_sql_mode_upgrade.result
index fe1cb7b5779..d3954770c7b 100644
--- a/mysql-test/suite/vcol/r/vcol_sql_mode_upgrade.result
+++ b/mysql-test/suite/vcol/r/vcol_sql_mode_upgrade.result
@@ -52,66 +52,40 @@ Warnings:
Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
CREATE TABLE t2 LIKE t1;
-Warnings:
-Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
-Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
-DROP TABLE t2;
+ERROR HY000: Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
FLUSH TABLES;
CREATE TABLE t2 LIKE t1;
-Warnings:
-Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
-Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
-Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
-Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
-DROP TABLE t2;
+ERROR HY000: Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` char(5) DEFAULT NULL,
`v` varchar(5) GENERATED ALWAYS AS (`a`) STORED
) ENGINE=MyISAM DEFAULT CHARSET=latin1
-ALTER TABLE t1 ADD b INT DEFAULT a;
Warnings:
Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
-Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
-Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
-Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
-Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
+ALTER TABLE t1 ADD b INT DEFAULT a;
+ERROR HY000: Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` char(5) DEFAULT NULL,
- `v` varchar(5) GENERATED ALWAYS AS (`a`) STORED,
- `b` int(11) DEFAULT `a`
+ `v` varchar(5) GENERATED ALWAYS AS (`a`) STORED
) ENGINE=MyISAM DEFAULT CHARSET=latin1
-Warnings:
-Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
-Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
SELECT * FROM t1;
-a v b
-1 1 1
-2 2 2
-3 3 3
+a v
+1 1
+2 2
+3 3
FLUSH TABLES;
ALTER TABLE t1 ADD c INT DEFAULT a;
-Warnings:
-Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
-Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
-Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
-Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
-Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
-Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
-Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
-Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
+ERROR HY000: Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
SELECT * FROM t1;
-a v b c
-1 1 1 1
-2 2 2 2
-3 3 3 3
-Warnings:
-Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
-Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
+a v
+1 1
+2 2
+3 3
DROP TABLE t1;
#
# Fixing a Maria-10.2.26 table with a stored VARCHAR column
@@ -203,18 +177,10 @@ Warnings:
Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
CREATE TABLE t2 LIKE t1;
-Warnings:
-Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
-Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
-DROP TABLE t2;
+ERROR HY000: Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
FLUSH TABLES;
CREATE TABLE t2 LIKE t1;
-Warnings:
-Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
-Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
-Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
-Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
-DROP TABLE t2;
+ERROR HY000: Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -222,33 +188,19 @@ t1 CREATE TABLE `t1` (
`v` varchar(5) GENERATED ALWAYS AS (`a`) VIRTUAL,
KEY `v` (`v`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
-ALTER TABLE t1 ADD b INT DEFAULT a;
Warnings:
Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
-Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
-Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
-Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
-Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
+ALTER TABLE t1 ADD b INT DEFAULT a;
+ERROR HY000: Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
FLUSH TABLES;
ALTER TABLE t1 ADD c INT DEFAULT a;
-Warnings:
-Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
-Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
-Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
-Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
-Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
-Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
-Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
-Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
+ERROR HY000: Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
SELECT * FROM t1;
-a v b c
-1 1 1 1
-2 2 2 2
-3 3 3 3
-Warnings:
-Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
-Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH
+a v
+1 1
+2 2
+3 3
DROP TABLE t1;
#
# Fixing a Maria-10.2.26 table with a virtual VARCHAR column
diff --git a/mysql-test/suite/vcol/r/vcol_supported_sql_funcs.result b/mysql-test/suite/vcol/r/vcol_supported_sql_funcs.result
index 10ab32f9486..587ac9c150d 100644
--- a/mysql-test/suite/vcol/r/vcol_supported_sql_funcs.result
+++ b/mysql-test/suite/vcol/r/vcol_supported_sql_funcs.result
@@ -1,4 +1,4 @@
-SET @@session.storage_engine = 'MyISAM';
+SET @@session.default_storage_engine = 'MyISAM';
#
# NUMERIC FUNCTIONS
#
diff --git a/mysql-test/suite/vcol/r/vcol_trigger_sp_innodb.result b/mysql-test/suite/vcol/r/vcol_trigger_sp_innodb.result
index 403515482f0..c4f6e0c5125 100644
--- a/mysql-test/suite/vcol/r/vcol_trigger_sp_innodb.result
+++ b/mysql-test/suite/vcol/r/vcol_trigger_sp_innodb.result
@@ -1,4 +1,4 @@
-SET @@session.storage_engine = 'InnoDB';
+SET @@session.default_storage_engine = 'InnoDB';
create table t1 (a int,
b int as (a/10),
c int as (a/10) persistent);
diff --git a/mysql-test/suite/vcol/r/vcol_trigger_sp_myisam.result b/mysql-test/suite/vcol/r/vcol_trigger_sp_myisam.result
index de605bf8722..467e7f8bb4e 100644
--- a/mysql-test/suite/vcol/r/vcol_trigger_sp_myisam.result
+++ b/mysql-test/suite/vcol/r/vcol_trigger_sp_myisam.result
@@ -1,4 +1,4 @@
-SET @@session.storage_engine = 'MyISAM';
+SET @@session.default_storage_engine = 'MyISAM';
create table t1 (a int,
b int as (a/10),
c int as (a/10) persistent);
diff --git a/mysql-test/suite/vcol/r/vcol_view_innodb.result b/mysql-test/suite/vcol/r/vcol_view_innodb.result
index b5d722f4d58..e6895243371 100644
--- a/mysql-test/suite/vcol/r/vcol_view_innodb.result
+++ b/mysql-test/suite/vcol/r/vcol_view_innodb.result
@@ -1,4 +1,4 @@
-SET @@session.storage_engine = 'InnoDB';
+SET @@session.default_storage_engine = 'InnoDB';
create table t1 (a int not null,
b int as (-a),
c int as (-a) persistent);
diff --git a/mysql-test/suite/vcol/r/vcol_view_myisam.result b/mysql-test/suite/vcol/r/vcol_view_myisam.result
index 8f86774c418..9c0dcba2128 100644
--- a/mysql-test/suite/vcol/r/vcol_view_myisam.result
+++ b/mysql-test/suite/vcol/r/vcol_view_myisam.result
@@ -1,4 +1,4 @@
-SET @@session.storage_engine = 'MyISAM';
+SET @@session.default_storage_engine = 'MyISAM';
create table t1 (a int not null,
b int as (-a),
c int as (-a) persistent);
diff --git a/mysql-test/suite/vcol/t/rpl_vcol.test b/mysql-test/suite/vcol/t/rpl_vcol.test
index 03837df1b99..d893ebac855 100644
--- a/mysql-test/suite/vcol/t/rpl_vcol.test
+++ b/mysql-test/suite/vcol/t/rpl_vcol.test
@@ -28,7 +28,7 @@
##### Storage engine to be tested
# Set the session storage engine
--source include/have_innodb.inc
-SET @@session.storage_engine = 'InnoDB';
+SET @@session.default_storage_engine = 'InnoDB';
#------------------------------------------------------------------------------#
# Cleanup
diff --git a/mysql-test/suite/vcol/t/vcol_archive.test b/mysql-test/suite/vcol/t/vcol_archive.test
index c0c9ecc445d..b708b3a451a 100644
--- a/mysql-test/suite/vcol/t/vcol_archive.test
+++ b/mysql-test/suite/vcol/t/vcol_archive.test
@@ -32,7 +32,7 @@
##### Storage engine to be tested
# Set the session storage engine
--source include/have_archive.inc
-SET @@session.storage_engine = 'archive';
+SET @@session.default_storage_engine = 'archive';
##### Workarounds for known open engine specific bugs
# none
diff --git a/mysql-test/suite/vcol/t/vcol_blackhole.test b/mysql-test/suite/vcol/t/vcol_blackhole.test
index eac074d9595..6cbc68a994f 100644
--- a/mysql-test/suite/vcol/t/vcol_blackhole.test
+++ b/mysql-test/suite/vcol/t/vcol_blackhole.test
@@ -32,7 +32,7 @@
##### Storage engine to be tested
# Set the session storage engine
--source include/have_blackhole.inc
-SET @@session.storage_engine = 'blackhole';
+SET @@session.default_storage_engine = 'blackhole';
##### Workarounds for known open engine specific bugs
# none
diff --git a/mysql-test/suite/vcol/t/vcol_blocked_sql_funcs.test b/mysql-test/suite/vcol/t/vcol_blocked_sql_funcs.test
index 3e9e5936476..d00ab8276e7 100644
--- a/mysql-test/suite/vcol/t/vcol_blocked_sql_funcs.test
+++ b/mysql-test/suite/vcol/t/vcol_blocked_sql_funcs.test
@@ -32,7 +32,7 @@
##### Storage engine to be tested
# Set the session storage engine
-eval SET @@session.storage_engine = 'MyISAM';
+eval SET @@session.default_storage_engine = 'MyISAM';
##### Workarounds for known open engine specific bugs
# none
diff --git a/mysql-test/suite/vcol/t/vcol_column_def_options_innodb.test b/mysql-test/suite/vcol/t/vcol_column_def_options_innodb.test
index 38baa2b3024..6fb6a5040b1 100644
--- a/mysql-test/suite/vcol/t/vcol_column_def_options_innodb.test
+++ b/mysql-test/suite/vcol/t/vcol_column_def_options_innodb.test
@@ -34,7 +34,7 @@
##### Storage engine to be tested
# Set the session storage engine
--source include/have_innodb.inc
-eval SET @@session.storage_engine = 'InnoDB';
+eval SET @@session.default_storage_engine = 'InnoDB';
##### Workarounds for known open engine specific bugs
# none
diff --git a/mysql-test/suite/vcol/t/vcol_column_def_options_myisam.test b/mysql-test/suite/vcol/t/vcol_column_def_options_myisam.test
index 5c3a4619834..63081429ada 100644
--- a/mysql-test/suite/vcol/t/vcol_column_def_options_myisam.test
+++ b/mysql-test/suite/vcol/t/vcol_column_def_options_myisam.test
@@ -33,7 +33,7 @@
##### Storage engine to be tested
# Set the session storage engine
-eval SET @@session.storage_engine = 'MyISAM';
+eval SET @@session.default_storage_engine = 'MyISAM';
##### Workarounds for known open engine specific bugs
# none
diff --git a/mysql-test/suite/vcol/t/vcol_csv.test b/mysql-test/suite/vcol/t/vcol_csv.test
index 75ddf819818..0c218df6388 100644
--- a/mysql-test/suite/vcol/t/vcol_csv.test
+++ b/mysql-test/suite/vcol/t/vcol_csv.test
@@ -32,7 +32,7 @@
##### Storage engine to be tested
# Set the session storage engine
--source include/have_csv.inc
-SET @@session.storage_engine = 'CSV';
+SET @@session.default_storage_engine = 'CSV';
##### Workarounds for known open engine specific bugs
# none
diff --git a/mysql-test/suite/vcol/t/vcol_handler_aria.test b/mysql-test/suite/vcol/t/vcol_handler_aria.test
index 9b69e600767..0787321e295 100644
--- a/mysql-test/suite/vcol/t/vcol_handler_aria.test
+++ b/mysql-test/suite/vcol/t/vcol_handler_aria.test
@@ -35,7 +35,7 @@
##### Storage engine to be tested
# Set the session storage engine
-eval SET @@session.storage_engine = 'maria';
+eval SET @@session.default_storage_engine = 'maria';
##### Workarounds for known open engine specific bugs
# none
diff --git a/mysql-test/suite/vcol/t/vcol_handler_innodb.test b/mysql-test/suite/vcol/t/vcol_handler_innodb.test
index bf443c6bbd3..c86cbd0daae 100644
--- a/mysql-test/suite/vcol/t/vcol_handler_innodb.test
+++ b/mysql-test/suite/vcol/t/vcol_handler_innodb.test
@@ -34,7 +34,7 @@
##### Storage engine to be tested
# Set the session storage engine
--source include/have_innodb.inc
-eval SET @@session.storage_engine = 'InnoDB';
+eval SET @@session.default_storage_engine = 'InnoDB';
##### Workarounds for known open engine specific bugs
# none
diff --git a/mysql-test/suite/vcol/t/vcol_handler_myisam.test b/mysql-test/suite/vcol/t/vcol_handler_myisam.test
index 5aa16da180a..424752d9d23 100644
--- a/mysql-test/suite/vcol/t/vcol_handler_myisam.test
+++ b/mysql-test/suite/vcol/t/vcol_handler_myisam.test
@@ -33,7 +33,7 @@
##### Storage engine to be tested
# Set the session storage engine
-eval SET @@session.storage_engine = 'MyISAM';
+eval SET @@session.default_storage_engine = 'MyISAM';
##### Workarounds for known open engine specific bugs
# none
diff --git a/mysql-test/suite/vcol/t/vcol_ins_upd_innodb.test b/mysql-test/suite/vcol/t/vcol_ins_upd_innodb.test
index 5d9ac12e930..fd1af0abd9e 100644
--- a/mysql-test/suite/vcol/t/vcol_ins_upd_innodb.test
+++ b/mysql-test/suite/vcol/t/vcol_ins_upd_innodb.test
@@ -34,7 +34,7 @@
##### Storage engine to be tested
# Set the session storage engine
--source include/have_innodb.inc
-eval SET @@session.storage_engine = 'InnoDB';
+eval SET @@session.default_storage_engine = 'InnoDB';
##### Workarounds for known open engine specific bugs
# none
diff --git a/mysql-test/suite/vcol/t/vcol_ins_upd_myisam.test b/mysql-test/suite/vcol/t/vcol_ins_upd_myisam.test
index 7840c191194..d73d0aa613c 100644
--- a/mysql-test/suite/vcol/t/vcol_ins_upd_myisam.test
+++ b/mysql-test/suite/vcol/t/vcol_ins_upd_myisam.test
@@ -33,7 +33,7 @@
##### Storage engine to be tested
# Set the session storage engine
-eval SET @@session.storage_engine = 'MyISAM';
+eval SET @@session.default_storage_engine = 'MyISAM';
##### Workarounds for known open engine specific bugs
# none
diff --git a/mysql-test/suite/vcol/t/vcol_keys_innodb.test b/mysql-test/suite/vcol/t/vcol_keys_innodb.test
index c475dd71a69..488a2b936d0 100644
--- a/mysql-test/suite/vcol/t/vcol_keys_innodb.test
+++ b/mysql-test/suite/vcol/t/vcol_keys_innodb.test
@@ -34,7 +34,7 @@
##### Storage engine to be tested
# Set the session storage engine
--source include/have_innodb.inc
-SET @@session.storage_engine = 'InnoDB';
+SET @@session.default_storage_engine = 'InnoDB';
##### Workarounds for known open engine specific bugs
# none
@@ -80,7 +80,7 @@ create table t1 (
col_enum enum('','a','b','c','d','e','f','foo','bar') not null default '',
col_date date not null default '1900-01-01',
col_timestamp timestamp(3) not null default '1971-01-01 00:00:00',
- vcol_datetime datetime as (col_datetime) virtual,
+ vcol_datetime datetime as (truncate(col_datetime,0)) virtual,
vcol_dec decimal(18,9) zerofill as (col_dec) virtual,
vcol_bit bit(63) as (col_bit) virtual,
vcol_char binary(51) as (col_char) virtual,
diff --git a/mysql-test/suite/vcol/t/vcol_keys_myisam.test b/mysql-test/suite/vcol/t/vcol_keys_myisam.test
index 6c3a94d2086..b8cbf9ef705 100644
--- a/mysql-test/suite/vcol/t/vcol_keys_myisam.test
+++ b/mysql-test/suite/vcol/t/vcol_keys_myisam.test
@@ -35,7 +35,7 @@
##### Storage engine to be tested
# Set the session storage engine
-SET @@session.storage_engine = 'MyISAM';
+SET @@session.default_storage_engine = 'MyISAM';
##### Workarounds for known open engine specific bugs
# none
diff --git a/mysql-test/suite/vcol/t/vcol_memory.test b/mysql-test/suite/vcol/t/vcol_memory.test
index f481427fa93..b78850ede89 100644
--- a/mysql-test/suite/vcol/t/vcol_memory.test
+++ b/mysql-test/suite/vcol/t/vcol_memory.test
@@ -31,7 +31,7 @@
##### Storage engine to be tested
# Set the session storage engine
-SET @@session.storage_engine = 'memory';
+SET @@session.default_storage_engine = 'memory';
##### Workarounds for known open engine specific bugs
# none
diff --git a/mysql-test/suite/vcol/t/vcol_non_stored_columns_innodb.test b/mysql-test/suite/vcol/t/vcol_non_stored_columns_innodb.test
index 88ed6157294..8f7a467136d 100644
--- a/mysql-test/suite/vcol/t/vcol_non_stored_columns_innodb.test
+++ b/mysql-test/suite/vcol/t/vcol_non_stored_columns_innodb.test
@@ -36,7 +36,7 @@
##### Storage engine to be tested
# Set the session storage engine
--source include/have_innodb.inc
-eval SET @@session.storage_engine = 'InnoDB';
+eval SET @@session.default_storage_engine = 'InnoDB';
##### Workarounds for known open engine specific bugs
# none
diff --git a/mysql-test/suite/vcol/t/vcol_non_stored_columns_myisam.test b/mysql-test/suite/vcol/t/vcol_non_stored_columns_myisam.test
index 32481e792ec..74c11ba8b7d 100644
--- a/mysql-test/suite/vcol/t/vcol_non_stored_columns_myisam.test
+++ b/mysql-test/suite/vcol/t/vcol_non_stored_columns_myisam.test
@@ -35,7 +35,7 @@
##### Storage engine to be tested
# Set the session storage engine
-eval SET @@session.storage_engine = 'MyISAM';
+eval SET @@session.default_storage_engine = 'MyISAM';
##### Workarounds for known open engine specific bugs
# none
diff --git a/mysql-test/suite/vcol/t/vcol_partition_innodb.test b/mysql-test/suite/vcol/t/vcol_partition_innodb.test
index 7790a82800c..7b8e8de25d4 100644
--- a/mysql-test/suite/vcol/t/vcol_partition_innodb.test
+++ b/mysql-test/suite/vcol/t/vcol_partition_innodb.test
@@ -34,7 +34,7 @@
##### Storage engine to be tested
# Set the session storage engine
--source include/have_innodb.inc
-eval SET @@session.storage_engine = 'InnoDB';
+eval SET @@session.default_storage_engine = 'InnoDB';
##### Workarounds for known open engine specific bugs
# none
diff --git a/mysql-test/suite/vcol/t/vcol_partition_myisam.test b/mysql-test/suite/vcol/t/vcol_partition_myisam.test
index 25f0d42c300..b41a2482fac 100644
--- a/mysql-test/suite/vcol/t/vcol_partition_myisam.test
+++ b/mysql-test/suite/vcol/t/vcol_partition_myisam.test
@@ -34,7 +34,7 @@
##### Storage engine to be tested
# Set the session storage engine
-eval SET @@session.storage_engine = 'MyISAM';
+eval SET @@session.default_storage_engine = 'MyISAM';
##### Workarounds for known open engine specific bugs
# none
diff --git a/mysql-test/suite/vcol/t/vcol_select_innodb.test b/mysql-test/suite/vcol/t/vcol_select_innodb.test
index 8b85d04bfb5..606801a213a 100644
--- a/mysql-test/suite/vcol/t/vcol_select_innodb.test
+++ b/mysql-test/suite/vcol/t/vcol_select_innodb.test
@@ -35,7 +35,7 @@
##### Storage engine to be tested
# Set the session storage engine
--source include/have_innodb.inc
-eval SET @@session.storage_engine = 'InnoDB';
+eval SET @@session.default_storage_engine = 'InnoDB';
##### Workarounds for known open engine specific bugs
# none
diff --git a/mysql-test/suite/vcol/t/vcol_select_myisam.test b/mysql-test/suite/vcol/t/vcol_select_myisam.test
index d60288d45ed..1e1adf29b3c 100644
--- a/mysql-test/suite/vcol/t/vcol_select_myisam.test
+++ b/mysql-test/suite/vcol/t/vcol_select_myisam.test
@@ -34,7 +34,7 @@
##### Storage engine to be tested
# Set the session storage engine
-eval SET @@session.storage_engine = 'MyISAM';
+eval SET @@session.default_storage_engine = 'MyISAM';
##### Workarounds for known open engine specific bugs
# none
diff --git a/mysql-test/suite/vcol/t/vcol_sql_mode.test b/mysql-test/suite/vcol/t/vcol_sql_mode.test
index 44d3686ac01..f52345c7ffb 100644
--- a/mysql-test/suite/vcol/t/vcol_sql_mode.test
+++ b/mysql-test/suite/vcol/t/vcol_sql_mode.test
@@ -18,28 +18,24 @@ CREATE TABLE t1 (a CHAR(5), v INT AS (a) VIRTUAL, KEY(v));
SHOW CREATE TABLE t1;
DROP TABLE t1;
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
CREATE TABLE t1 (a CHAR(5), v TIME AS (a) VIRTUAL, KEY(v));
-DROP TABLE t1;
-#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
CREATE TABLE t1 (c CHAR(8), v BINARY(8) AS (c), KEY(v));
SHOW WARNINGS;
-DROP TABLE t1;
-#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
CREATE TABLE t1 (a CHAR(5), v BIT(64) AS (a) VIRTUAL, KEY(v));
SHOW WARNINGS;
-DROP TABLE t1;
-#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (a) VIRTUAL, KEY(v));
SHOW WARNINGS;
-DROP TABLE t1;
-#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
CREATE TABLE t1 (a CHAR(5), v TEXT AS (a) VIRTUAL, KEY(v(100)));
SHOW WARNINGS;
-DROP TABLE t1;
--echo # PAD_CHAR_TO_FULL_LENGTH + TRIM resolving dependency
@@ -79,61 +75,52 @@ DROP TABLE t1;
--echo # PAD_CHAR_TO_FULL_LENGTH + TRIM not resolving dependency
-#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (TRIM(LEADING ' ' FROM a)) VIRTUAL, KEY(v));
SHOW WARNINGS;
-DROP TABLE t1;
-#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
CREATE TABLE t1 (a CHAR(5), v TEXT AS (TRIM(LEADING ' ' FROM a)) VIRTUAL, KEY(v(100)));
SHOW WARNINGS;
-DROP TABLE t1;
-#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (TRIM(TRAILING '' FROM a)) VIRTUAL, KEY(v));
SHOW WARNINGS;
-DROP TABLE t1;
-#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (TRIM(BOTH '' FROM a)) VIRTUAL, KEY(v));
SHOW WARNINGS;
-DROP TABLE t1;
-#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (TRIM(TRAILING 'x' FROM a)) VIRTUAL, KEY(v));
SHOW WARNINGS;
-DROP TABLE t1;
-#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (TRIM(BOTH 'x' FROM a)) VIRTUAL, KEY(v));
SHOW WARNINGS;
-DROP TABLE t1;
# more than one space
-#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
CREATE TABLE t1 (
a CHAR(5),
v VARCHAR(5) AS (TRIM(TRAILING ' ' FROM a)) VIRTUAL, KEY(v));
SHOW WARNINGS;
-DROP TABLE t1;
# more than one space
-#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
CREATE TABLE t1 (
a CHAR(5),
v VARCHAR(5) AS (TRIM(BOTH ' ' FROM a)) VIRTUAL, KEY(v));
SHOW WARNINGS;
-DROP TABLE t1;
--echo # PAD_CHAR_TO_FULL_LENGTH + TRIM(... non_constant FROM a)
-#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
CREATE TABLE t1 (
a CHAR(5),
b CHAR(5),
v TEXT AS (TRIM(TRAILING b FROM a)) VIRTUAL, KEY(v(100)));
SHOW WARNINGS;
-DROP TABLE t1;
--echo # PAD_CHAR_TO_FULL_LENGTH + RPAD resolving dependency
@@ -157,12 +144,11 @@ DROP TABLE t1;
--echo # PAD_CHAR_TO_FULL_LENGTH + RPAD not resolving dependency
-#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (RPAD(a,4,' ')) VIRTUAL, KEY(v));
SHOW WARNINGS;
-DROP TABLE t1;
-#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
CREATE TABLE t1 (
a CHAR(5),
b CHAR(5),
@@ -170,7 +156,6 @@ CREATE TABLE t1 (
KEY(v)
);
SHOW WARNINGS;
-DROP TABLE t1;
--echo # PAD_CHAR_TO_FULL_LENGTH + comparison
@@ -179,13 +164,12 @@ CREATE TABLE t1 (a CHAR(5), v INT AS (a='a') VIRTUAL, KEY(v));
SHOW CREATE TABLE t1;
DROP TABLE t1;
-#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
CREATE TABLE t1 (
a CHAR(5) CHARACTER SET latin1 COLLATE latin1_nopad_bin,
v INT AS (a='a') VIRTUAL, KEY(v)
);
SHOW WARNINGS;
-DROP TABLE t1;
--echo # PAD_CHAR_TO_FULL_LENGTH + LIKE
@@ -198,25 +182,23 @@ CREATE TABLE t1 (a CHAR(5), v INT AS (a LIKE NULL) VIRTUAL, KEY(v));
SHOW CREATE TABLE t1;
DROP TABLE t1;
-#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
CREATE TABLE t1 (a CHAR(5), v INT AS (a LIKE 'a') VIRTUAL, KEY(v));
SHOW WARNINGS;
-DROP TABLE t1;
--echo # PAD_CHAR_TO_FULL_LENGTH + LENGTH(char_column) = hard dependency
-#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
CREATE TABLE t1 (a CHAR(5), v INT AS (LENGTH(a)) VIRTUAL, KEY(v));
SHOW WARNINGS;
-DROP TABLE t1;
--echo #
--echo # Testing NO_UNSIGNED_SUBTRACTION
--echo #
-#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
CREATE TABLE t1 (
a INT UNSIGNED,
b INT UNSIGNED,
@@ -224,9 +206,8 @@ CREATE TABLE t1 (
KEY (c)
);
SHOW WARNINGS;
-DROP TABLE t1;
-#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
CREATE TABLE t1 (
a INT UNSIGNED,
b INT UNSIGNED,
@@ -234,9 +215,8 @@ CREATE TABLE t1 (
KEY (c)
);
SHOW WARNINGS;
-DROP TABLE t1;
-#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
CREATE TABLE t1 (
a INT UNSIGNED,
b INT UNSIGNED,
@@ -244,7 +224,6 @@ CREATE TABLE t1 (
KEY (c)
);
SHOW WARNINGS;
-DROP TABLE t1;
CREATE TABLE t1 (
a INT UNSIGNED,
@@ -271,7 +250,7 @@ DROP TABLE t1;
--echo # Comnination: PAD_CHAR_TO_FULL_LENGTH + NO_UNSIGNED_SUBTRACTION
--echo #
-#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
CREATE TABLE t1 (
a INT UNSIGNED,
b INT UNSIGNED,
@@ -280,14 +259,13 @@ CREATE TABLE t1 (
KEY (v)
);
SHOW WARNINGS;
-DROP TABLE t1;
# The below solves the dependency on NO_UNSIGNED_SUBTRACTION
# but does not solve the dependency on PAD_CHAR_TO_FULL_LENGTH,
# because the 'length' argument to RPAD() is not a constant.
-#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
CREATE TABLE t1 (
a INT UNSIGNED,
b INT UNSIGNED,
@@ -296,7 +274,6 @@ CREATE TABLE t1 (
KEY (v)
);
SHOW WARNINGS;
-DROP TABLE t1;
@@ -314,12 +291,10 @@ CREATE TABLE t1 (
c CHAR(5),
v VARCHAR(5) GENERATED ALWAYS AS (c) VIRTUAL
);
-#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
ALTER TABLE t1 ADD KEY(v);
SHOW WARNINGS;
-ALTER TABLE t1 DROP KEY v;
-
-#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
CREATE INDEX v ON t1 (v);
SHOW WARNINGS;
DROP TABLE t1;
@@ -327,18 +302,16 @@ DROP TABLE t1;
--echo # A virtual column on the second position in an index - cannot depend on sql_mode
-#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
CREATE TABLE t1 (id int, a CHAR(5), v TEXT AS (a) VIRTUAL, KEY(id, v(100)));
SHOW WARNINGS;
-DROP TABLE t1;
--echo # A persisten virtual column cannot depend on sql_mode
-#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (a) PERSISTENT);
SHOW WARNINGS;
-DROP TABLE t1;
CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (RTRIM(a)) PERSISTENT);
SHOW CREATE TABLE t1;
diff --git a/mysql-test/suite/vcol/t/vcol_sql_mode_datetime.test b/mysql-test/suite/vcol/t/vcol_sql_mode_datetime.test
index bef1e09b719..19ebd9648a7 100644
--- a/mysql-test/suite/vcol/t/vcol_sql_mode_datetime.test
+++ b/mysql-test/suite/vcol/t/vcol_sql_mode_datetime.test
@@ -47,32 +47,29 @@ DROP TABLE t1;
--echo # NOT OK: lower FSP + virtual index
-#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
CREATE TABLE t1 (
t DATETIME(4),
d DATETIME,
v DATETIME(3) AS (t) VIRTUAL,
KEY(v,d)
);
-DROP TABLE t1;
-#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
CREATE TABLE t1 (
t DATETIME(4),
d DATETIME,
v DATETIME(3) AS (COALESCE(t)) VIRTUAL,
KEY(v,d)
);
-DROP TABLE t1;
-#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
CREATE TABLE t1 (
t DATETIME(4),
d DATETIME,
v DATETIME(3) AS ('2001-01-01 10:20:30.1234') VIRTUAL,
KEY(v,d)
);
-DROP TABLE t1;
--echo # OK: lower FSP + ROUND + virtual index
@@ -110,13 +107,12 @@ SET sql_mode=DEFAULT;
--echo # MDEV-20423 Assertion `0' failed or `btr_validate_index(index, 0, false)' in row_upd_sec_index_entry or error code 126: Index is corrupted upon DELETE with TIME_ROUND_FRACTIONAL
--echo #
-#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
CREATE TABLE t1 (
a DATETIME(6),
v VARCHAR(30) GENERATED ALWAYS AS (CAST(a AS DATETIME(3))) VIRTUAL,
KEY (v)
);
-DROP TABLE t1;
CREATE TABLE t1 (
a DATETIME(6),
diff --git a/mysql-test/suite/vcol/t/vcol_sql_mode_time.test b/mysql-test/suite/vcol/t/vcol_sql_mode_time.test
index 05160a43ebb..2ce2a9eb5d7 100644
--- a/mysql-test/suite/vcol/t/vcol_sql_mode_time.test
+++ b/mysql-test/suite/vcol/t/vcol_sql_mode_time.test
@@ -47,32 +47,29 @@ DROP TABLE t1;
--echo # NOT OK: lower FSP + virtual index
-#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
CREATE TABLE t1 (
t TIME(4),
d TIME,
v TIME(3) AS (t) VIRTUAL,
KEY(v,d)
);
-DROP TABLE t1;
-#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
CREATE TABLE t1 (
t TIME(4),
d TIME,
v TIME(3) AS (COALESCE(t)) VIRTUAL,
KEY(v,d)
);
-DROP TABLE t1;
-#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
CREATE TABLE t1 (
t TIME(4),
d TIME,
v TIME(3) AS ('2001-01-01 10:20:30.1234') VIRTUAL,
KEY(v,d)
);
-DROP TABLE t1;
--echo # OK: lower FSP + ROUND + virtual index
@@ -111,13 +108,12 @@ SET sql_mode=DEFAULT;
--echo # MDEV-20423 Assertion `0' failed or `btr_validate_index(index, 0, false)' in row_upd_sec_index_entry or error code 126: Index is corrupted upon DELETE with TIME_ROUND_FRACTIONAL
--echo #
-#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
CREATE TABLE t1 (
a TIME(6),
v VARCHAR(30) GENERATED ALWAYS AS (CAST(a AS TIME(3))) VIRTUAL,
KEY (v)
);
-DROP TABLE t1;
CREATE TABLE t1 (
a TIME(6),
diff --git a/mysql-test/suite/vcol/t/vcol_sql_mode_timestamp.test b/mysql-test/suite/vcol/t/vcol_sql_mode_timestamp.test
index 4f38da75948..e3dee5828f0 100644
--- a/mysql-test/suite/vcol/t/vcol_sql_mode_timestamp.test
+++ b/mysql-test/suite/vcol/t/vcol_sql_mode_timestamp.test
@@ -47,32 +47,29 @@ DROP TABLE t1;
--echo # NOT OK: lower FSP + virtual index
-#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
CREATE TABLE t1 (
t TIMESTAMP(4),
d DATETIME,
v TIMESTAMP(3) AS (t) VIRTUAL,
KEY(v,d)
);
-DROP TABLE t1;
-#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
CREATE TABLE t1 (
t TIMESTAMP(4),
d DATETIME,
v TIMESTAMP(3) AS (COALESCE(t)) VIRTUAL,
KEY(v,d)
);
-DROP TABLE t1;
-#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
CREATE TABLE t1 (
t TIMESTAMP(4),
d DATETIME,
v TIMESTAMP(3) AS ('2001-01-01 10:20:30.1234') VIRTUAL,
KEY(v,d)
);
-DROP TABLE t1;
--echo # OK: lower FSP + ROUND + virtual index
@@ -115,10 +112,11 @@ CREATE TABLE t1 (
b TIMESTAMP AS (a) VIRTUAL,
KEY (b)
);
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
ALTER TABLE t1 MODIFY a BLOB FIRST;
+SHOW WARNINGS;
DROP TABLE t1;
-
--echo #
--echo # End of 10.4 tests
--echo #
diff --git a/mysql-test/suite/vcol/t/vcol_sql_mode_upgrade.test b/mysql-test/suite/vcol/t/vcol_sql_mode_upgrade.test
index 26b76fbcfe1..71e34231ac1 100644
--- a/mysql-test/suite/vcol/t/vcol_sql_mode_upgrade.test
+++ b/mysql-test/suite/vcol/t/vcol_sql_mode_upgrade.test
@@ -25,21 +25,19 @@ SELECT * FROM t1;
FLUSH TABLES;
SELECT * FROM t1;
-#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
CREATE TABLE t2 LIKE t1;
-DROP TABLE t2;
FLUSH TABLES;
-#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
CREATE TABLE t2 LIKE t1;
-DROP TABLE t2;
SHOW CREATE TABLE t1;
-#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
ALTER TABLE t1 ADD b INT DEFAULT a;
SHOW CREATE TABLE t1;
SELECT * FROM t1;
FLUSH TABLES;
-#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
ALTER TABLE t1 ADD c INT DEFAULT a;
SELECT * FROM t1;
DROP TABLE t1;
@@ -92,20 +90,18 @@ SELECT * FROM t1;
FLUSH TABLES;
SELECT * FROM t1;
-#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
CREATE TABLE t2 LIKE t1;
-DROP TABLE t2;
FLUSH TABLES;
-#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
CREATE TABLE t2 LIKE t1;
-DROP TABLE t2;
SHOW CREATE TABLE t1;
-#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
ALTER TABLE t1 ADD b INT DEFAULT a;
FLUSH TABLES;
-#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
ALTER TABLE t1 ADD c INT DEFAULT a;
SELECT * FROM t1;
DROP TABLE t1;
diff --git a/mysql-test/suite/vcol/t/vcol_supported_sql_funcs.test b/mysql-test/suite/vcol/t/vcol_supported_sql_funcs.test
index d1e21af059b..36c1ba09692 100644
--- a/mysql-test/suite/vcol/t/vcol_supported_sql_funcs.test
+++ b/mysql-test/suite/vcol/t/vcol_supported_sql_funcs.test
@@ -32,7 +32,7 @@
##### Storage engine to be tested
# Set the session storage engine
-eval SET @@session.storage_engine = 'MyISAM';
+eval SET @@session.default_storage_engine = 'MyISAM';
##### Workarounds for known open engine specific bugs
# none
diff --git a/mysql-test/suite/vcol/t/vcol_trigger_sp_innodb.test b/mysql-test/suite/vcol/t/vcol_trigger_sp_innodb.test
index 5a36fb1c06d..c35a1279629 100644
--- a/mysql-test/suite/vcol/t/vcol_trigger_sp_innodb.test
+++ b/mysql-test/suite/vcol/t/vcol_trigger_sp_innodb.test
@@ -35,7 +35,7 @@
##### Storage engine to be tested
# Set the session storage engine
--source include/have_innodb.inc
-eval SET @@session.storage_engine = 'InnoDB';
+eval SET @@session.default_storage_engine = 'InnoDB';
##### Workarounds for known open engine specific bugs
# none
diff --git a/mysql-test/suite/vcol/t/vcol_trigger_sp_myisam.test b/mysql-test/suite/vcol/t/vcol_trigger_sp_myisam.test
index c475a31eaa6..d5f36d805f1 100644
--- a/mysql-test/suite/vcol/t/vcol_trigger_sp_myisam.test
+++ b/mysql-test/suite/vcol/t/vcol_trigger_sp_myisam.test
@@ -34,7 +34,7 @@
##### Storage engine to be tested
# Set the session storage engine
-eval SET @@session.storage_engine = 'MyISAM';
+eval SET @@session.default_storage_engine = 'MyISAM';
##### Workarounds for known open engine specific bugs
# none
diff --git a/mysql-test/suite/vcol/t/vcol_view_innodb.test b/mysql-test/suite/vcol/t/vcol_view_innodb.test
index 01fced8e4c3..fd77489f5dc 100644
--- a/mysql-test/suite/vcol/t/vcol_view_innodb.test
+++ b/mysql-test/suite/vcol/t/vcol_view_innodb.test
@@ -34,7 +34,7 @@
##### Storage engine to be tested
# Set the session storage engine
--source include/have_innodb.inc
-eval SET @@session.storage_engine = 'InnoDB';
+eval SET @@session.default_storage_engine = 'InnoDB';
##### Workarounds for known open engine specific bugs
# none
diff --git a/mysql-test/suite/vcol/t/vcol_view_myisam.test b/mysql-test/suite/vcol/t/vcol_view_myisam.test
index 2ebd36431bc..1b4a387a1ae 100644
--- a/mysql-test/suite/vcol/t/vcol_view_myisam.test
+++ b/mysql-test/suite/vcol/t/vcol_view_myisam.test
@@ -33,7 +33,7 @@
##### Storage engine to be tested
# Set the session storage engine
-eval SET @@session.storage_engine = 'MyISAM';
+eval SET @@session.default_storage_engine = 'MyISAM';
##### Workarounds for known open engine specific bugs
# none
diff --git a/mysql-test/suite/versioning/r/alter.result b/mysql-test/suite/versioning/r/alter.result
index b2dbbba7027..e07f1408ab7 100644
--- a/mysql-test/suite/versioning/r/alter.result
+++ b/mysql-test/suite/versioning/r/alter.result
@@ -762,3 +762,27 @@ delete from t1;
set system_versioning_alter_history= keep;
alter ignore table t1 drop pk;
drop table t1;
+#
+# MDEV-21941 RENAME doesn't work for system time or period fields
+#
+create or replace table t1 (a int) with system versioning;
+alter table t1 rename column row_start to x;
+ERROR 42S22: Unknown column 'row_start' in 't1'
+create or replace table t1 (
+a int,
+row_start timestamp(6) as row start invisible,
+row_end timestamp(6) as row end invisible,
+period for system_time (row_start, row_end)
+) with system versioning;
+alter table t1 rename column row_start to x;
+alter table t1 rename column row_end to y;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `x` timestamp(6) GENERATED ALWAYS AS ROW START INVISIBLE,
+ `y` timestamp(6) GENERATED ALWAYS AS ROW END INVISIBLE,
+ PERIOD FOR SYSTEM_TIME (`x`, `y`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
+drop table t1;
+# End of 10.5 tests
diff --git a/mysql-test/suite/versioning/r/create.result b/mysql-test/suite/versioning/r/create.result
index 75f7b560f30..05e248e40f4 100644
--- a/mysql-test/suite/versioning/r/create.result
+++ b/mysql-test/suite/versioning/r/create.result
@@ -519,7 +519,7 @@ row_start bigint as row start,
row_end bigint as row end,
period for system_time (row_start, row_end)
) engine=myisam with system versioning;
-ERROR HY000: `row_start` must be of type TIMESTAMP(6) for system-versioned table `t1`
+ERROR HY000: `row_start` must be of type BIGINT(20) UNSIGNED for system-versioned table `t1`
create table t (
a int,
row_start datetime(6) generated always as row start,
diff --git a/mysql-test/suite/versioning/r/cte.result b/mysql-test/suite/versioning/r/cte.result
index 5c54a23701e..4c0867d579b 100644
--- a/mysql-test/suite/versioning/r/cte.result
+++ b/mysql-test/suite/versioning/r/cte.result
@@ -138,14 +138,13 @@ 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 emp ALL PRIMARY NULL NULL NULL 4 100.00 Using where
-1 PRIMARY <subquery4> eq_ref distinct_key distinct_key 4 func 1 100.00
-4 MATERIALIZED <derived2> ALL NULL NULL NULL NULL 4 100.00
+1 PRIMARY <derived2> ref key0 key0 5 test.emp.emp_id 2 100.00 FirstMatch(emp)
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
3 RECURSIVE UNION <derived2> ref key0 key0 5 test.e.mgr 2 100.00
NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL NULL
Warnings:
-Note 1003 with recursive ancestors as (/* select#2 */ select `test`.`e`.`emp_id` AS `emp_id`,`test`.`e`.`name` AS `name`,`test`.`e`.`mgr` AS `mgr`,`test`.`e`.`salary` AS `salary` from `test`.`emp` FOR SYSTEM_TIME AS OF TIMESTAMP @`ts_1` `e` where `test`.`e`.`name` = 'bill' and `test`.`e`.`row_end` > @`ts_1` and `test`.`e`.`row_start` <= @`ts_1` union /* select#3 */ select `test`.`e`.`emp_id` AS `emp_id`,`test`.`e`.`name` AS `name`,`test`.`e`.`mgr` AS `mgr`,`test`.`e`.`salary` AS `salary` from `test`.`emp` FOR SYSTEM_TIME AS OF TIMESTAMP @`ts_1` `e` join `ancestors` `a` where `a`.`emp_id` = `test`.`e`.`mgr` and `test`.`e`.`row_end` > @`ts_1` and `test`.`e`.`row_start` <= @`ts_1`)/* select#1 */ select `test`.`emp`.`name` AS `name` from `test`.`emp` semi join (`ancestors`) where `test`.`emp`.`row_end` = TIMESTAMP'2038-01-19 03:14:07.999999'
+Note 1003 with recursive ancestors as (/* select#2 */ select `test`.`e`.`emp_id` AS `emp_id`,`test`.`e`.`name` AS `name`,`test`.`e`.`mgr` AS `mgr`,`test`.`e`.`salary` AS `salary` from `test`.`emp` FOR SYSTEM_TIME AS OF TIMESTAMP @`ts_1` `e` where `test`.`e`.`name` = 'bill' and `test`.`e`.`row_end` > @`ts_1` and `test`.`e`.`row_start` <= @`ts_1` union /* select#3 */ select `test`.`e`.`emp_id` AS `emp_id`,`test`.`e`.`name` AS `name`,`test`.`e`.`mgr` AS `mgr`,`test`.`e`.`salary` AS `salary` from `test`.`emp` FOR SYSTEM_TIME AS OF TIMESTAMP @`ts_1` `e` join `ancestors` `a` where `a`.`emp_id` = `test`.`e`.`mgr` and `test`.`e`.`row_end` > @`ts_1` and `test`.`e`.`row_start` <= @`ts_1`)/* select#1 */ select `test`.`emp`.`name` AS `name` from `test`.`emp` semi join (`ancestors`) where `ancestors`.`emp_id` = `test`.`emp`.`emp_id` and `test`.`emp`.`row_end` = TIMESTAMP'2038-01-19 03:14:07.999999'
with recursive
ancestors
as
diff --git a/mysql-test/suite/versioning/r/delete_history.result b/mysql-test/suite/versioning/r/delete_history.result
index 4fc4618d110..a5a6de19bc6 100644
--- a/mysql-test/suite/versioning/r/delete_history.result
+++ b/mysql-test/suite/versioning/r/delete_history.result
@@ -1,3 +1,4 @@
+call mtr.add_suppression("need more HISTORY partitions");
create table t (a int);
delete history from t before system_time now();
ERROR HY000: Table `t` is not system-versioned
@@ -56,16 +57,15 @@ select * from t for system_time all;
a
drop procedure truncate_sp;
# Truncate partitioned
-create or replace table t (a int)
-with system versioning
-partition by system_time limit 1 (
-partition p0 history,
-partition p1 history,
-partition pn current);
+create or replace table t (a int) with system versioning
+partition by system_time limit 1 partitions 3;
insert into t values (1);
update t set a= 2;
update t set a= 3;
delete history from t;
+Warnings:
+Warning 4114 Versioned table `test`.`t`: last HISTORY partition (`p1`) is out of LIMIT, need more HISTORY partitions
+# The above warning is one command late (MDEV-20345) ^^^
select * from t for system_time all;
a
3
diff --git a/mysql-test/suite/versioning/r/foreign.result b/mysql-test/suite/versioning/r/foreign.result
index 2dbceebb539..3c8508507fd 100644
--- a/mysql-test/suite/versioning/r/foreign.result
+++ b/mysql-test/suite/versioning/r/foreign.result
@@ -458,3 +458,41 @@ set foreign_key_checks= on;
delete history from t1;
delete from t1;
drop table t1;
+#
+# MDEV-20729 Fix REFERENCES constraint in column definition
+#
+create or replace table t1(
+id int
+);
+# system fields can't be foreign keys:
+create or replace table t2(
+x int,
+sys_start SYS_DATATYPE as row start references t1(id),
+sys_end SYS_DATATYPE as row end,
+period for system_time(sys_start, sys_end)
+) engine innodb with system versioning;
+Got one of the listed errors
+create or replace table t2(
+x int,
+sys_start SYS_DATATYPE as row start,
+sys_end SYS_DATATYPE as row end references t1(id),
+period for system_time(sys_start, sys_end)
+) engine innodb with system versioning;
+Got one of the listed errors
+create or replace table t2(
+x int,
+sys_start SYS_DATATYPE as row start,
+sys_end SYS_DATATYPE as row end,
+period for system_time(sys_start, sys_end),
+foreign key (sys_start) references t1(id)
+) engine innodb with system versioning;
+ERROR HY000: Can't create table `test`.`t2` (errno: 150 "Foreign key constraint is incorrectly formed")
+create or replace table t2(
+x int,
+sys_start SYS_DATATYPE as row start,
+sys_end SYS_DATATYPE as row end,
+period for system_time(sys_start, sys_end),
+foreign key (sys_end) references t1(id)
+) engine innodb with system versioning;
+ERROR HY000: Can't create table `test`.`t2` (errno: 150 "Foreign key constraint is incorrectly formed")
+drop table t1;
diff --git a/mysql-test/suite/versioning/r/partition.result b/mysql-test/suite/versioning/r/partition.result
index 9ccc900cd12..d6e6d827ddc 100644
--- a/mysql-test/suite/versioning/r/partition.result
+++ b/mysql-test/suite/versioning/r/partition.result
@@ -1,3 +1,4 @@
+call mtr.add_suppression("need more HISTORY partitions");
set system_versioning_alter_history=keep;
# Check conventional partitioning on temporal tables
create or replace table t1 (
@@ -120,12 +121,30 @@ select x from t1;
x
1
2
-# Bug #260: incorrect IB partitioning warning
+# rename works
+create or replace table t1 (x int) with system versioning
+partition by system_time;
+alter table t1 reorganize partition p0 into
+(partition custom_name history);
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) DEFAULT NULL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
+ PARTITION BY SYSTEM_TIME
+(PARTITION `custom_name` HISTORY ENGINE = DEFAULT_ENGINE,
+ PARTITION `pn` CURRENT ENGINE = DEFAULT_ENGINE)
+# merge and split doesn't (MDEV-19938)
+create or replace table t1 (x int) with system versioning
+partition by system_time limit 10 partitions 3;
+alter table t1 reorganize partition p0, p1 into (partition p00 history);
+ERROR HY000: REORGANIZE PARTITION can only be used to reorganize partitions not to change their numbers
+alter table t1 reorganize partition p1 into (partition p1 history, partition p2 history);
+ERROR HY000: REORGANIZE PARTITION can only be used to reorganize partitions not to change their numbers
+# Bug tempesta-tech/mariadb#260: incorrect IB partitioning warning
create or replace table t1 (x int)
with system versioning
-partition by system_time limit 1 (
-partition p0 history,
-partition pn current);
+partition by system_time limit 1;
alter table t1 change x big int;
create or replace table t1 (i int) engine myisam partition by hash(i) partitions 2;
alter table t1 add partition (partition px history);
@@ -133,9 +152,7 @@ ERROR HY000: Wrong partitioning type, expected type: `SYSTEM_TIME`
## INSERT, UPDATE, DELETE
create or replace table t1 (x int)
with system versioning
-partition by system_time (
-partition p0 history,
-partition pn current);
+partition by system_time;
set @now= now(6);
insert into t1 values (1);
set @str= concat('select x, row_start < @now as A, row_end > @now as B from t1 partition (p0)');
@@ -221,26 +238,18 @@ select @ts2 = @ts3;
## rotation by LIMIT
create or replace table t1 (x int)
with system versioning
-partition by system_time limit 0 (
-partition p0 history,
-partition p1 history,
-partition pn current);
+partition by system_time limit 0 partitions 3;
ERROR HY000: Wrong parameters for partitioned `t1`: wrong value for 'LIMIT'
create or replace table t1 (x int)
with system versioning
-partition by system_time limit 2 (
-partition p0 history,
-partition p1 history,
-partition pn current);
+partition by system_time limit 2 partitions 3;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`x` int(11) DEFAULT NULL
) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
PARTITION BY SYSTEM_TIME LIMIT 2
-(PARTITION `p0` HISTORY ENGINE = DEFAULT_ENGINE,
- PARTITION `p1` HISTORY ENGINE = DEFAULT_ENGINE,
- PARTITION `pn` CURRENT ENGINE = DEFAULT_ENGINE)
+PARTITIONS 3
alter table t1 drop partition non_existent;
ERROR HY000: Error in list of partitions to DROP
insert into t1 values (1), (2), (3), (4), (5), (6);
@@ -266,11 +275,11 @@ x
6
insert into t1 values (7), (8);
Warnings:
-Warning 4114 Versioned table `test`.`t1`: partition `p1` is full, add more HISTORY partitions
+Warning 4114 Versioned table `test`.`t1`: last HISTORY partition (`p1`) is out of LIMIT, need more HISTORY partitions
### warn about full partition
delete from t1;
Warnings:
-Warning 4114 Versioned table `test`.`t1`: partition `p1` is full, add more HISTORY partitions
+Warning 4114 Versioned table `test`.`t1`: last HISTORY partition (`p1`) is out of LIMIT, need more HISTORY partitions
select * from t1 partition (p1) order by x;
x
4
@@ -278,45 +287,341 @@ x
6
7
8
-### Assertion in ALTER on warning from partitioning LIMIT [#446]
-create or replace table t1 (x int) with system versioning;
-insert into t1 values (1), (2);
-delete from t1;
-alter table t1 partition by system_time limit 1 (
-partition p1 history,
-partition pn current);
## rotation by INTERVAL
create or replace table t1 (x int)
with system versioning
-partition by system_time interval 0 second (
-partition p0 history,
-partition p1 history,
-partition pn current);
+partition by system_time interval 0 second partitions 3;
ERROR HY000: Wrong parameters for partitioned `t1`: wrong value for 'INTERVAL'
-create or replace table t1 (x int)
-with system versioning
-partition by system_time interval 1 second starts 12345 (
-partition p0 history,
-partition p1 history,
-partition pn current);
-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 'starts 12345 (
+create table t1 (i int) with system versioning
+partition by system_time interval 6 day limit 98;
+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 'limit 98' at line 2
+create or replace table t1 (pk int) with system versioning
+partition by system_time interval 10 year partitions 3;
+ERROR 22003: TIMESTAMP value is out of range in 'INTERVAL'
+# INTERVAL and ALTER TABLE
+create or replace table t1 (i int) with system versioning
+partition by system_time interval 1 hour;
+set @ts=(select partition_description from information_schema.partitions
+where table_schema='test' and table_name='t1' and partition_name='p0');
+alter table t1 add column b int;
+select partition_name,partition_ordinal_position,partition_method,timediff(partition_description, @ts) from information_schema.partitions where table_schema='test' and table_name='t1';
+partition_name partition_ordinal_position partition_method timediff(partition_description, @ts)
+p0 1 SYSTEM_TIME 00:00:00.000000
+pn 2 SYSTEM_TIME NULL
+Warnings:
+Warning 1292 Incorrect time value: 'CURRENT'
+alter table t1 add partition (partition p1 history, partition p2 history);
+select partition_name,partition_ordinal_position,partition_method,timediff(partition_description, @ts) from information_schema.partitions where table_schema='test' and table_name='t1';
+partition_name partition_ordinal_position partition_method timediff(partition_description, @ts)
+p0 1 SYSTEM_TIME 00:00:00.000000
+p1 2 SYSTEM_TIME 01:00:00.000000
+p2 3 SYSTEM_TIME 02:00:00.000000
+pn 4 SYSTEM_TIME NULL
+Warnings:
+Warning 1292 Incorrect time value: 'CURRENT'
+alter table t1 drop partition p0;
+select partition_name,partition_ordinal_position,partition_method,timediff(partition_description, @ts) from information_schema.partitions where table_schema='test' and table_name='t1';
+partition_name partition_ordinal_position partition_method timediff(partition_description, @ts)
+p1 1 SYSTEM_TIME 01:00:00.000000
+p2 2 SYSTEM_TIME 02:00:00.000000
+pn 3 SYSTEM_TIME NULL
+Warnings:
+Warning 1292 Incorrect time value: 'CURRENT'
+alter table t1 drop partition p2;
+ERROR HY000: Can only drop oldest partitions when rotating by INTERVAL
+select partition_name,partition_ordinal_position,partition_method,timediff(partition_description, @ts) from information_schema.partitions where table_schema='test' and table_name='t1';
+partition_name partition_ordinal_position partition_method timediff(partition_description, @ts)
+p1 1 SYSTEM_TIME 01:00:00.000000
+p2 2 SYSTEM_TIME 02:00:00.000000
+pn 3 SYSTEM_TIME NULL
+Warnings:
+Warning 1292 Incorrect time value: 'CURRENT'
+set timestamp=unix_timestamp('2001-02-03 10:20:30');
+create or replace table t1 (i int) with system versioning
+partition by system_time interval 1 day
+subpartition by key (i) subpartitions 2
+(partition p1 history, partition pn current);
+set timestamp=unix_timestamp('2001-02-03 10:20:40');
+insert t1 values (1);
+delete from t1;
+set timestamp=unix_timestamp('2001-02-04 10:20:50');
+insert t1 values (2);
+delete from t1;
+select subpartition_name,partition_description,table_rows from information_schema.partitions where table_schema='test' and table_name='t1';
+subpartition_name partition_description table_rows
+p1sp0 2001-02-04 00:00:00 1
+p1sp1 2001-02-04 00:00:00 1
+pnsp0 CURRENT 0
+pnsp1 CURRENT 0
+set timestamp=unix_timestamp('2001-02-04 10:20:55');
+alter table t1 add partition (partition p0 history, partition p2 history);
+set timestamp=unix_timestamp('2001-02-04 10:30:00');
+insert t1 values (4),(5);
+set timestamp=unix_timestamp('2001-02-04 10:30:10');
+update t1 set i=6 where i=5;
+select subpartition_name,partition_description,table_rows from information_schema.partitions where table_schema='test' and table_name='t1';
+subpartition_name partition_description table_rows
+p1sp0 2001-02-04 00:00:00 1
+p1sp1 2001-02-04 00:00:00 0
+p0sp0 2001-02-05 00:00:00 1
+p0sp1 2001-02-05 00:00:00 1
+p2sp0 2001-02-06 00:00:00 0
+p2sp1 2001-02-06 00:00:00 0
+pnsp0 CURRENT 0
+pnsp1 CURRENT 2
+## pruning check
+set @ts=(select partition_description from information_schema.partitions
+where table_schema='test' and table_name='t1' and partition_name='p0' limit 1);
+select * from t1;
+i
+4
+6
+explain partitions select * from t1;
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 pn_pnsp0,pn_pnsp1 ALL NULL NULL NULL NULL # Using where
+explain partitions select * from t1 for system_time as of '2001-02-04 10:20:30';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p0_p0sp0,p0_p0sp1,p2_p2sp0,p2_p2sp1,pn_pnsp0,pn_pnsp1 ALL NULL NULL NULL NULL # Using where
+set @ts=(select row_end from t1 for system_time all where i=1);
+select * from t1 for system_time all where row_end = @ts;
+i
+1
+explain partitions select * from t1 for system_time all where row_end = @ts;
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p1_p1sp0,p1_p1sp1 # NULL NULL NULL NULL # #
+#
+# MDEV-16023 Unfortunate error message WARN_VERS_PART_FULL
+#
+set timestamp= unix_timestamp('2020-07-29 10:30:10');
+create or replace table t1 (a int) with system versioning
+partition by system_time interval 1 second (
partition p0 history,
partition p1 history,
-partition pn current)' at line 3
-create table t1 (i int) with system versioning
-partition by system_time interval 6 day limit 98
-(partition p0 history, partition ver_pn current);
-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 'limit 98
-(partition p0 history, partition ver_pn current)' at line 2
+partition pc current
+);
+set timestamp= unix_timestamp('2020-07-29 10:30:14');
+insert into t1 values (1),(2),(3);
+show warnings;
+Level Code Message
+# Cleanup
+set timestamp= default;
+## INTERVAL ... STARTS
+create or replace table t1 (i int) with system versioning
+partition by system_time interval 1 day starts 'a';
+ERROR HY000: Wrong parameters for partitioned `t1`: wrong value for 'STARTS'
+create or replace table t1 (i int) with system versioning
+partition by system_time interval 1 day starts '00:00:00';
+ERROR HY000: Wrong parameters for partitioned `t1`: wrong value for 'STARTS'
+create or replace table t1 (i int) with system versioning
+partition by system_time interval 1 day starts '2000-00-01 00:00:00';
+ERROR HY000: Wrong parameters for partitioned `t1`: wrong value for 'STARTS'
+create or replace table t1 (i int) with system versioning
+partition by system_time interval 1 day starts 946684800;
+ERROR HY000: Wrong parameters for partitioned `t1`: wrong value for 'STARTS'
+create or replace table t1 (i int) with system versioning
+partition by system_time interval 1 day starts '2000-01-01 00:00:00';
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `i` int(11) DEFAULT NULL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
+ PARTITION BY SYSTEM_TIME INTERVAL 1 DAY STARTS TIMESTAMP'2000-01-01 00:00:00'
+PARTITIONS 2
+# Test STARTS warning
+set timestamp= unix_timestamp('2000-01-01 00:00:00');
+create or replace table t1 (i int) with system versioning
+partition by system_time interval 1 day;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `i` int(11) DEFAULT NULL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
+ PARTITION BY SYSTEM_TIME INTERVAL 1 DAY STARTS TIMESTAMP'2000-01-01 00:00:00'
+PARTITIONS 2
+create or replace table t1 (i int) with system versioning
+partition by system_time interval 1 day starts '2000-01-01 00:00:01';
+Warnings:
+Warning 4164 `t1`: STARTS is later than query time, first history partition may exceed INTERVAL value
+# Test default STARTS rounding
+set timestamp= unix_timestamp('1999-12-15 13:33:33');
+create or replace table t1 (i int) with system versioning
+partition by system_time interval 1 second;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `i` int(11) DEFAULT NULL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
+ PARTITION BY SYSTEM_TIME INTERVAL 1 SECOND STARTS TIMESTAMP'1999-12-15 13:33:33'
+PARTITIONS 2
+create or replace table t1 (i int) with system versioning
+partition by system_time interval 1 minute;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `i` int(11) DEFAULT NULL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
+ PARTITION BY SYSTEM_TIME INTERVAL 1 MINUTE STARTS TIMESTAMP'1999-12-15 13:33:00'
+PARTITIONS 2
+create or replace table t1 (i int) with system versioning
+partition by system_time interval 1 hour;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `i` int(11) DEFAULT NULL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
+ PARTITION BY SYSTEM_TIME INTERVAL 1 HOUR STARTS TIMESTAMP'1999-12-15 13:00:00'
+PARTITIONS 2
+create or replace table t1 (i int) with system versioning
+partition by system_time interval 1 day;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `i` int(11) DEFAULT NULL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
+ PARTITION BY SYSTEM_TIME INTERVAL 1 DAY STARTS TIMESTAMP'1999-12-15 00:00:00'
+PARTITIONS 2
+create or replace table t1 (i int) with system versioning
+partition by system_time interval 1 month;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `i` int(11) DEFAULT NULL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
+ PARTITION BY SYSTEM_TIME INTERVAL 1 MONTH STARTS TIMESTAMP'1999-12-15 00:00:00'
+PARTITIONS 2
+create or replace table t1 (i int) with system versioning
+partition by system_time interval 1 year;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `i` int(11) DEFAULT NULL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
+ PARTITION BY SYSTEM_TIME INTERVAL 1 YEAR STARTS TIMESTAMP'1999-12-15 00:00:00'
+PARTITIONS 2
+# seconds equivalent of 1 day does not round:
+create or replace table t1 (i int) with system versioning
+partition by system_time interval 86400 second;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `i` int(11) DEFAULT NULL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
+ PARTITION BY SYSTEM_TIME INTERVAL 86400 SECOND STARTS TIMESTAMP'1999-12-15 13:33:33'
+PARTITIONS 2
+# STARTS value is in local time_zone:
+set time_zone="+03:00";
+create or replace table t1 (i int) with system versioning
+partition by system_time interval 1 day starts '2000-01-01 00:00:00';
+Warnings:
+Warning 4164 `t1`: STARTS is later than query time, first history partition may exceed INTERVAL value
+set timestamp= unix_timestamp('2000-01-01 00:00:00');
+create or replace table t2 (i int) with system versioning
+partition by system_time interval 1 day;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `i` int(11) DEFAULT NULL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
+ PARTITION BY SYSTEM_TIME INTERVAL 1 DAY STARTS TIMESTAMP'2000-01-01 00:00:00'
+PARTITIONS 2
+show create table t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `i` int(11) DEFAULT NULL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
+ PARTITION BY SYSTEM_TIME INTERVAL 1 DAY STARTS TIMESTAMP'2000-01-01 00:00:00'
+PARTITIONS 2
+set time_zone="+00:00";
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `i` int(11) DEFAULT NULL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
+ PARTITION BY SYSTEM_TIME INTERVAL 1 DAY STARTS TIMESTAMP'1999-12-31 21:00:00'
+PARTITIONS 2
+show create table t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `i` int(11) DEFAULT NULL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
+ PARTITION BY SYSTEM_TIME INTERVAL 1 DAY STARTS TIMESTAMP'1999-12-31 21:00:00'
+PARTITIONS 2
+# Test rotation
+set timestamp= unix_timestamp('2001-01-01 00:00:00');
+# it's ok to add partitions for past:
+create or replace table t1 (i int) with system versioning
+partition by system_time interval 1 day starts '2000-01-01 00:00:00'
+partitions 3;
+# we are warned when we push to present:
+insert into t1 values (0);
+set timestamp= unix_timestamp('2001-01-01 00:00:01');
+update t1 set i= i + 1;
+set timestamp= unix_timestamp('2001-01-01 00:00:02');
+update t1 set i= i + 1;
+select *, row_end from t1 partition (p0);
+i row_end
+select *, row_end from t1 partition (p1);
+i row_end
+0 2001-01-01 00:00:01.000000
+1 2001-01-01 00:00:02.000000
+set timestamp= unix_timestamp('2000-01-01 00:00:00');
+# now we "overflow" first partition a bit:
+create or replace table t1 (i int) with system versioning
+partition by system_time interval 1 day starts '2000-01-03 00:00:00'
+partitions 3;
+Warnings:
+Warning 4164 `t1`: STARTS is later than query time, first history partition may exceed INTERVAL value
+insert into t1 values (0);
+set timestamp= unix_timestamp('2000-01-01 00:00:01');
+update t1 set i= i + 1;
+set timestamp= unix_timestamp('2000-01-02 00:00:01');
+update t1 set i= i + 1;
+set timestamp= unix_timestamp('2000-01-03 00:00:01');
+update t1 set i= i + 1;
+set timestamp= unix_timestamp('2000-01-04 00:00:01');
+update t1 set i= i + 1;
+select *, row_end from t1 partition (p0);
+i row_end
+0 2000-01-01 00:00:01.000000
+1 2000-01-02 00:00:01.000000
+2 2000-01-03 00:00:01.000000
+select *, row_end from t1 partition (p1);
+i row_end
+3 2000-01-04 00:00:01.000000
+set timestamp= unix_timestamp('2000-01-01 00:00:00');
+# and this is how it usually goes:
+create or replace table t1 (i int) with system versioning
+partition by system_time interval 1 day
+partitions 3;
+insert into t1 values (0);
+set timestamp= unix_timestamp('2000-01-01 00:00:01');
+update t1 set i= i + 1;
+set timestamp= unix_timestamp('2000-01-02 00:00:01');
+update t1 set i= i + 1;
+set timestamp= unix_timestamp('2000-01-03 00:00:01');
+update t1 set i= i + 1;
+set timestamp= unix_timestamp('2000-01-04 00:00:01');
+update t1 set i= i + 1;
+alter table t1 add partition (partition p2 history, partition p3 history);
+select *, row_end from t1 partition (p0);
+i row_end
+0 2000-01-01 00:00:01.000000
+select *, row_end from t1 partition (p1);
+i row_end
+1 2000-01-02 00:00:01.000000
+select *, row_end from t1 partition (p2);
+i row_end
+2 2000-01-03 00:00:01.000000
+select *, row_end from t1 partition (p3);
+i row_end
+3 2000-01-04 00:00:01.000000
+drop tables t1, t2;
## Subpartitions
create or replace table t1 (x int)
with system versioning
-partition by system_time limit 2
+partition by system_time limit 2 partitions 3
subpartition by key (x)
-subpartitions 2 (
-partition p0 history,
-partition p1 history,
-partition pn current);
+subpartitions 2;
insert into t1 (x) values (1), (2), (3), (4), (5);
select * from t1 partition (pnsp0);
x
@@ -331,34 +636,34 @@ x
delete from t1 where x < 3;
delete from t1;
delete from t1;
+Warnings:
+Warning 4114 Versioned table `test`.`t1`: last HISTORY partition (`p1`) is out of LIMIT, need more HISTORY partitions
select * from t1 partition (p0sp0);
x
1
-3
-5
select * from t1 partition (p0sp1);
x
2
-4
select * from t1 partition (p1sp0);
x
+3
+5
select * from t1 partition (p1sp1);
x
-create or replace table t1 (
-a bigint,
-row_start SYS_DATATYPE as row start invisible,
-row_end SYS_DATATYPE as row end invisible,
-period for system_time(row_start, row_end))
+4
+# check implicit sys fields for implicit engine of partitioned table
+create or replace table t1 (a bigint)
with system versioning
partition by range (a)
(partition p0 values less than (20) engine innodb,
partition p1 values less than maxvalue engine innodb);
insert into t1 values (1);
+select * from t1 partition (p0);
+a
+1
+# check for partition engine
create or replace table t1 (
-f_int1 integer default 0,
-row_start SYS_DATATYPE as row start invisible,
-row_end SYS_DATATYPE as row end invisible,
-period for system_time(row_start, row_end)
+f_int1 integer default 0
) with system versioning
partition by range(f_int1)
subpartition by hash(f_int1)
@@ -366,18 +671,99 @@ subpartition by hash(f_int1)
(subpartition subpart11 storage engine = 'innodb',
subpartition subpart12 storage engine = 'innodb'));
insert into t1 values (1);
+select * from t1 partition (part1);
+f_int1
+1
+#
+# TRX_ID versioning (moved from partition_innodb.test)
+#
+# MDEV-15951 system versioning by trx id doesn't work with partitioning
+# currently trx_id does not support partitioning by system_time
+create or replace table t1(
+i int,
+row_start bigint unsigned generated always as row start,
+row_end bigint unsigned generated always as row end,
+period for system_time(row_start, row_end)
+) engine=InnoDB with system versioning partition by system_time (
+partition p0 history,
+partition pn current
+);
+ERROR HY000: `row_start` must be of type TIMESTAMP(6) for system-versioned table `t1`
+create or replace table t1(
+i int,
+row_start bigint unsigned generated always as row start,
+row_end bigint unsigned generated always as row end,
+period for system_time(row_start, row_end)
+) engine=InnoDB with system versioning;
+alter table t1 partition by system_time (
+partition p0 history,
+partition pn current
+);
+ERROR HY000: `row_start` must be of type TIMESTAMP(6) for system-versioned table `t1`
+drop table t1;
+create or replace table t (
+a int primary key,
+row_start bigint unsigned as row start invisible,
+row_end bigint unsigned as row end invisible,
+period for system_time(row_start, row_end)
+) engine=innodb with system versioning
+partition by key() (
+partition p1,
+partition p2
+);
+ERROR HY000: Transaction-precise system-versioned tables do not support partitioning by ROW START or ROW END
+create or replace table t (
+a int primary key,
+row_start bigint unsigned as row start invisible,
+row_end bigint unsigned as row end invisible,
+period for system_time(row_start, row_end)
+) engine=innodb with system versioning
+partition by key(a, row_start) (
+partition p1,
+partition p2
+);
+ERROR HY000: Transaction-precise system-versioned tables do not support partitioning by ROW START or ROW END
+create or replace table t (
+a int primary key,
+row_start bigint unsigned as row start invisible,
+row_end bigint unsigned as row end invisible,
+period for system_time(row_start, row_end)
+) engine=innodb with system versioning
+partition by hash(a + row_end * 2) (
+partition p1,
+partition p2
+);
+ERROR HY000: Transaction-precise system-versioned tables do not support partitioning by ROW START or ROW END
+create or replace table t (
+a int primary key,
+row_start bigint unsigned as row start invisible,
+row_end bigint unsigned as row end invisible,
+period for system_time(row_start, row_end)
+) engine=innodb with system versioning
+partition by range columns (a, row_start) (
+partition p1 values less than (100, 100)
+);
+ERROR HY000: Transaction-precise system-versioned tables do not support partitioning by ROW START or ROW END
+#
+# Assertion in ALTER on warning from partitioning LIMIT [#446]
+#
+create or replace table t1 (x int) with system versioning;
+insert into t1 values (1), (2);
+delete from t1;
+alter table t1 partition by system_time limit 1 (
+partition p1 history,
+partition pn current);
+#
+# MDEV-14649 Assertion `t->mysql_col_len == 8' failed in row_insert_for_mysql
+#
create or replace table t1 (i int) engine=innodb partition by key(i);
-alter table t1
-add column row_start SYS_DATATYPE as row start invisible,
-add column row_end SYS_DATATYPE as row end invisible,
-add period for system_time(row_start, row_end),
-add system versioning;
+alter table t1 add system versioning;
insert into t1 values();
+#
# MDEV-14722 Assertion in ha_commit_trans for sub-statement
+#
create or replace table t1 (i int) with system versioning
-partition by system_time interval 1 day (
-partition p1 history,
-partition pc current);
+partition by system_time interval 1 day;
create or replace table t2 (f int);
create or replace trigger tr before insert on t2
for each row select table_rows from information_schema.tables
@@ -385,25 +771,29 @@ where table_name = 't1' into @a;
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
insert into t2 values (1);
+#
# MDEV-14740 Locking assertion for system_time partitioning
+#
create or replace table t1 (i int) with system versioning
-partition by system_time interval 1 week (
-partition p1 history,
-partition pn current);
+partition by system_time interval 1 week;
create or replace table t2 (f int);
create or replace trigger tr before insert on t2
for each row select count(*) from t1 into @a;
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
insert into t2 values (1);
+#
# MDEV-14747 ALTER PARTITION BY SYSTEM_TIME after LOCK TABLES
+#
create or replace table t1 (x int) with system versioning;
lock table t1 write;
alter table t1 partition by system_time interval 1 week (
partition p1 history,
partition pn current);
unlock tables;
+#
# MDEV-14748 Assertion in ha_myisammrg::attach_children()
+#
create or replace table t1 (x int) engine=myisam with system versioning
partition by system_time interval 1 month (partition p1 history, partition pn current);
create or replace table t2 (x int) engine=myisam;
@@ -412,7 +802,9 @@ create or replace table t4 (x int) engine=myisam;
create or replace trigger tr after insert on t4 for each row insert into t2
( select x from t3 ) union ( select x from t1 );
insert into t4 values (1);
+#
# MDEV-14821 Assertion failure
+#
create or replace table t1 (x int) with system versioning;
insert into t1 values (0), (1);
update t1 set x= x + 1;
@@ -422,64 +814,21 @@ partition p2 history,
partition pn current);
delete from t1 where x = 1;
delete from t1 where x = 2;
+#
# MDEV-14923 Assertion upon INSERT into locked versioned partitioned table
+#
create or replace table t1 (x int) with system versioning
-partition by system_time (partition p1 history, partition pn current);
+partition by system_time;
lock table t1 write;
-alter table t1 add partition (partition p1 history);
-ERROR HY000: Duplicate partition name p1
+alter table t1 add partition (partition p0 history);
+ERROR HY000: Duplicate partition name p0
insert into t1 values (1);
unlock tables;
-create or replace table t1 (pk int) with system versioning
-partition by system_time interval 10 year (
-partition p1 history,
-partition p2 history,
-partition pn current
-);
-ERROR 22003: TIMESTAMP value is out of range in 'INTERVAL'
-create or replace table t1 (i int) with system versioning
-partition by system_time interval 1 hour (
-partition p0 history, partition pn current);
-set @ts=(select partition_description from information_schema.partitions
-where table_schema='test' and table_name='t1' and partition_name='p0');
-alter table t1 add column b int;
-select partition_name,partition_ordinal_position,partition_method,timediff(partition_description, @ts) from information_schema.partitions where table_schema='test' and table_name='t1';
-partition_name partition_ordinal_position partition_method timediff(partition_description, @ts)
-p0 1 SYSTEM_TIME 00:00:00.000000
-pn 2 SYSTEM_TIME NULL
-Warnings:
-Warning 1292 Incorrect time value: 'CURRENT'
-alter table t1 add partition (partition p1 history, partition p2 history);
-select partition_name,partition_ordinal_position,partition_method,timediff(partition_description, @ts) from information_schema.partitions where table_schema='test' and table_name='t1';
-partition_name partition_ordinal_position partition_method timediff(partition_description, @ts)
-p0 1 SYSTEM_TIME 00:00:00.000000
-p1 2 SYSTEM_TIME 01:00:00.000000
-p2 3 SYSTEM_TIME 02:00:00.000000
-pn 4 SYSTEM_TIME NULL
-Warnings:
-Warning 1292 Incorrect time value: 'CURRENT'
-alter table t1 drop partition p0;
-select partition_name,partition_ordinal_position,partition_method,timediff(partition_description, @ts) from information_schema.partitions where table_schema='test' and table_name='t1';
-partition_name partition_ordinal_position partition_method timediff(partition_description, @ts)
-p1 1 SYSTEM_TIME 01:00:00.000000
-p2 2 SYSTEM_TIME 02:00:00.000000
-pn 3 SYSTEM_TIME NULL
-Warnings:
-Warning 1292 Incorrect time value: 'CURRENT'
-alter table t1 drop partition p2;
-ERROR HY000: Can only drop oldest partitions when rotating by INTERVAL
-select partition_name,partition_ordinal_position,partition_method,timediff(partition_description, @ts) from information_schema.partitions where table_schema='test' and table_name='t1';
-partition_name partition_ordinal_position partition_method timediff(partition_description, @ts)
-p1 1 SYSTEM_TIME 01:00:00.000000
-p2 2 SYSTEM_TIME 02:00:00.000000
-pn 3 SYSTEM_TIME NULL
-Warnings:
-Warning 1292 Incorrect time value: 'CURRENT'
#
# MDEV-15103 Assertion in ha_partition::part_records() for updating VIEW
#
create or replace table t1 (pk int primary key, f int) with system versioning
-partition by system_time limit 100 (partition p1 history, partition pn current);
+partition by system_time limit 100;
insert into t1 values (1,10), (2,20);
create or replace view v1 as select * from t1;
update v1 set f= 30;
@@ -487,10 +836,12 @@ update v1 set f= 30;
# MDEV-15168 Unexpected ER_VERS_ENGINE_UNSUPPORTED upon dropping versioning on a partitioned table
#
create or replace table t (a int) with system versioning
-partition by system_time (partition p1 history, partition pn current);
+partition by system_time;
alter table t drop system versioning;
ERROR HY000: Can not DROP SYSTEM VERSIONING for table `t` partitioned BY SYSTEM_TIME
+#
# MDEV-15191 Assertion `bit < (map)->n_bits' failed in bitmap_is_set upon INSERT
+#
create or replace table t1 (i int) with system versioning;
insert into t1 values (1), (2);
update t1 set i= 3;
@@ -499,17 +850,19 @@ lock table t1 write;
alter table t1 add partition (partition p2 history);
insert into t1 values (4);
unlock tables;
+#
# MDEV-15036 Assertion `!is_set() || (m_status == DA_OK_BULK && is_bulk_op())' in Diagnostics_area::set_ok_status or unexpected ER_RANGE_NOT_INCREASING_ERROR
+#
create or replace table t1 (a int) with system versioning
-partition by system_time limit 2 (
-partition p1 history, partition p2 history,
-partition p3 history, partition pn current);
+partition by system_time limit 2 partitions 4;
insert into t1 values (1),(2),(3);
update t1 set a = 4;
delete from t1;
delete from t1 where a is not null;
+#
# MDEV-14823 Wrong error message upon selecting from a system_time partition
-create or replace table t1 (i int) with system versioning partition by system_time limit 10 (partition p0 history, partition pn current);
+#
+create or replace table t1 (i int) with system versioning partition by system_time limit 10;
select * from t1 partition (p0) for system_time all;
ERROR HY000: SYSTEM_TIME partitions in table `t1` does not support historical query
# MDEV-18929 2nd execution of SP does not detect ER_VERS_NOT_VERSIONED
@@ -520,7 +873,9 @@ ERROR HY000: SYSTEM_TIME partitions in table `t1` does not support historical qu
call sp;
ERROR HY000: SYSTEM_TIME partitions in table `t1` does not support historical query
drop procedure sp;
+#
# MDEV-15380 Index for versioned table gets corrupt after partitioning and DELETE
+#
create or replace table t1 (pk int primary key)
engine=myisam
with system versioning
@@ -538,14 +893,11 @@ set timestamp=1523466002.799571;
insert into t1 values (11),(12);
set timestamp=1523466004.169435;
delete from t1 where pk in (11, 12);
-set timestamp= default;
#
# MDEV-18136 Server crashes in Item_func_dyncol_create::prepare_arguments
#
create or replace table t1 (pk int) with system versioning
-partition by system_time interval 7 second (
-partition ver_p1 history,
-partition ver_pn current);
+partition by system_time interval 7 second;
alter table t1
partition by system_time interval column_get(column_create(7,7), 7 as int) second (
partition ver_p1 history,
@@ -555,9 +907,10 @@ Table Create Table
t1 CREATE TABLE `t1` (
`pk` int(11) DEFAULT NULL
) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
- PARTITION BY SYSTEM_TIME INTERVAL 7 SECOND
+ PARTITION BY SYSTEM_TIME INTERVAL 7 SECOND STARTS TIMESTAMP'2018-04-11 17:00:04'
(PARTITION `ver_p1` HISTORY ENGINE = DEFAULT_ENGINE,
PARTITION `ver_pn` CURRENT ENGINE = DEFAULT_ENGINE)
+set timestamp= default;
#
# MDEV-19175 Server crashes in ha_partition::vers_can_native upon INSERT DELAYED into versioned partitioned table
#
@@ -573,7 +926,7 @@ insert into t1 values (0), (1), (2), (3);
delete from t1 where x < 3;
delete from t1;
Warnings:
-Warning 4114 Versioned table `test`.`t1`: partition `p1` is full, add more HISTORY partitions
+Warning 4114 Versioned table `test`.`t1`: last HISTORY partition (`p1`) is out of LIMIT, need more HISTORY partitions
unlock tables;
#
# MDEV-20336 Assertion bitmap_is_set(read_partitions) upon SELECT FOR UPDATE from versioned table
@@ -581,6 +934,38 @@ unlock tables;
create or replace table t1 (pk int primary key) with system versioning partition by system_time limit 100 (partition p1 history, partition pn current);
execute immediate 'select * from t1 for update';
pk
+#
+# MDEV-19903 Setup default partitions for system versioning
+#
+create or replace table t1 (x int) with system versioning partition by system_time;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) DEFAULT NULL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
+ PARTITION BY SYSTEM_TIME
+PARTITIONS 2
+# 2 partitions are created: p0 and pn
+select PARTITION_NAME, PARTITION_METHOD, PARTITION_DESCRIPTION from information_schema.partitions where table_name = 't1' order by PARTITION_NAME;
+PARTITION_NAME PARTITION_METHOD PARTITION_DESCRIPTION
+p0 SYSTEM_TIME NULL
+pn SYSTEM_TIME CURRENT
+create or replace table t1 (x int) with system versioning partition by system_time limit 10 partitions 4;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) DEFAULT NULL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
+ PARTITION BY SYSTEM_TIME LIMIT 10
+PARTITIONS 4
+# 4 partitions are created: p0, p1, p2 and pn
+select PARTITION_NAME, PARTITION_METHOD, PARTITION_DESCRIPTION from information_schema.partitions where table_name = 't1' order by PARTITION_NAME;
+PARTITION_NAME PARTITION_METHOD PARTITION_DESCRIPTION
+p0 SYSTEM_TIME NULL
+p1 SYSTEM_TIME NULL
+p2 SYSTEM_TIME NULL
+pn SYSTEM_TIME CURRENT
+# Test cleanup
drop view v1;
drop tables t, t1, t2, t3, t4;
#
@@ -686,7 +1071,7 @@ drop table t1;
# MDEV-22112 Assertion `tab_part_info->part_type == RANGE_PARTITION || tab_part_info->part_type == LIST_PARTITION' failed in prep_alter_part_table
#
create table t1 (a int) with system versioning partition by system_time;
-ERROR HY000: For SYSTEM_TIME partitions each partition must be defined
+drop table t1;
create table t1 (a int) with system versioning partition by system_time
(partition p1 history, partition pn current);
alter table t1 add partition (partition p2);
@@ -776,4 +1161,123 @@ partition by system_time (partition p1 history, partition pn current);
insert into t1 values (1);
replace into t1 values (1);
drop table t1;
+#
+# MDEV-18794 Assertion `!m_innodb' failed in ha_partition::cmp_ref upon SELECT from partitioned table
+#
+create or replace table t1 (pk int auto_increment, i int, c char(1), primary key (pk), key(i))
+engine=innodb with system versioning partition by key() partitions 2;
+insert into t1 (i, c) values (1, 'a'), (2, 'b'), (null, 'c'), (null, 'b');
+alter table t1 drop system versioning;
+replace into t1 select * from t1;
+select * from t1 where i > 0 or pk = 1000 limit 1;
+pk i c
+1 1 a
+drop table t1;
# End of 10.4 tests
+#
+# MDEV-22153 ALTER add default history partitions makes table inaccessible
+#
+create or replace table t1 (x int) with system versioning partition by system_time;
+alter table t1 add partition partitions 1;
+Warnings:
+Warning 4115 Maybe missing parameters: no rotation condition for multiple HISTORY partitions.
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) DEFAULT NULL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
+ PARTITION BY SYSTEM_TIME
+PARTITIONS 3
+alter table t1 add partition partitions 2;
+Warnings:
+Warning 4115 Maybe missing parameters: no rotation condition for multiple HISTORY partitions.
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) DEFAULT NULL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
+ PARTITION BY SYSTEM_TIME
+PARTITIONS 5
+alter table t1 add partition partitions 3;
+Warnings:
+Warning 4115 Maybe missing parameters: no rotation condition for multiple HISTORY partitions.
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) DEFAULT NULL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
+ PARTITION BY SYSTEM_TIME
+PARTITIONS 8
+drop tables t1;
+#
+# MDEV-22207 Drop default history partitions renders table inaccessible
+#
+create or replace table t1 (i int) with system versioning
+partition by system_time limit 1 partitions 5;
+alter table t1 drop partition p0, p2;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `i` int(11) DEFAULT NULL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
+ PARTITION BY SYSTEM_TIME LIMIT 1
+(PARTITION `p1` HISTORY ENGINE = DEFAULT_ENGINE,
+ PARTITION `p3` HISTORY ENGINE = DEFAULT_ENGINE,
+ PARTITION `pn` CURRENT ENGINE = DEFAULT_ENGINE)
+alter table t1 add partition partitions 1;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `i` int(11) DEFAULT NULL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
+ PARTITION BY SYSTEM_TIME LIMIT 1
+(PARTITION `p1` HISTORY ENGINE = DEFAULT_ENGINE,
+ PARTITION `p3` HISTORY ENGINE = DEFAULT_ENGINE,
+ PARTITION `p2` HISTORY ENGINE = DEFAULT_ENGINE,
+ PARTITION `pn` CURRENT ENGINE = DEFAULT_ENGINE)
+drop tables t1;
+#
+# MDEV-22155 ALTER add default history partitions name clash on non-default partitions
+#
+create or replace table t1 (x int) with system versioning
+partition by system_time limit 1
+(partition p2 history, partition p8 history, partition pn current);
+alter table t1 add partition partitions 1;
+alter table t1 add partition partitions 2;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) DEFAULT NULL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
+ PARTITION BY SYSTEM_TIME LIMIT 1
+(PARTITION `p2` HISTORY ENGINE = DEFAULT_ENGINE,
+ PARTITION `p8` HISTORY ENGINE = DEFAULT_ENGINE,
+ PARTITION `p3` HISTORY ENGINE = DEFAULT_ENGINE,
+ PARTITION `p4` HISTORY ENGINE = DEFAULT_ENGINE,
+ PARTITION `p5` HISTORY ENGINE = DEFAULT_ENGINE,
+ PARTITION `pn` CURRENT ENGINE = DEFAULT_ENGINE)
+alter table t1 add partition partitions 8;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) DEFAULT NULL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
+ PARTITION BY SYSTEM_TIME LIMIT 1
+(PARTITION `p2` HISTORY ENGINE = DEFAULT_ENGINE,
+ PARTITION `p8` HISTORY ENGINE = DEFAULT_ENGINE,
+ PARTITION `p3` HISTORY ENGINE = DEFAULT_ENGINE,
+ PARTITION `p4` HISTORY ENGINE = DEFAULT_ENGINE,
+ PARTITION `p5` HISTORY ENGINE = DEFAULT_ENGINE,
+ PARTITION `p9` HISTORY ENGINE = DEFAULT_ENGINE,
+ PARTITION `p10` HISTORY ENGINE = DEFAULT_ENGINE,
+ PARTITION `p11` HISTORY ENGINE = DEFAULT_ENGINE,
+ PARTITION `p12` HISTORY ENGINE = DEFAULT_ENGINE,
+ PARTITION `p13` HISTORY ENGINE = DEFAULT_ENGINE,
+ PARTITION `p14` HISTORY ENGINE = DEFAULT_ENGINE,
+ PARTITION `p15` HISTORY ENGINE = DEFAULT_ENGINE,
+ PARTITION `p16` HISTORY ENGINE = DEFAULT_ENGINE,
+ PARTITION `pn` CURRENT ENGINE = DEFAULT_ENGINE)
+drop tables t1;
+#
+# End of 10.5 tests
+#
diff --git a/mysql-test/suite/versioning/r/partition_innodb.result b/mysql-test/suite/versioning/r/partition_innodb.result
deleted file mode 100644
index 1bc0549a735..00000000000
--- a/mysql-test/suite/versioning/r/partition_innodb.result
+++ /dev/null
@@ -1,80 +0,0 @@
-# MDEV-15951 system versioning by trx id doesn't work with partitioning
-# currently trx_id does not support partitioning by system_time
-create or replace table t1(
-i int,
-row_start bigint unsigned generated always as row start,
-row_end bigint unsigned generated always as row end,
-period for system_time(row_start, row_end)
-) engine=InnoDB with system versioning partition by system_time (
-partition p0 history,
-partition pn current
-);
-ERROR HY000: `row_start` must be of type TIMESTAMP(6) for system-versioned table `t1`
-create or replace table t1(
-i int,
-row_start bigint unsigned generated always as row start,
-row_end bigint unsigned generated always as row end,
-period for system_time(row_start, row_end)
-) engine=InnoDB with system versioning;
-alter table t1 partition by system_time (
-partition p0 history,
-partition pn current
-);
-ERROR HY000: `row_start` must be of type TIMESTAMP(6) for system-versioned table `t1`
-drop table t1;
-create or replace table t (
-a int primary key,
-row_start bigint unsigned as row start invisible,
-row_end bigint unsigned as row end invisible,
-period for system_time(row_start, row_end)
-) engine=innodb with system versioning
-partition by key() (
-partition p1,
-partition p2
-);
-ERROR HY000: Transaction-precise system-versioned tables do not support partitioning by ROW START or ROW END
-create or replace table t (
-a int primary key,
-row_start bigint unsigned as row start invisible,
-row_end bigint unsigned as row end invisible,
-period for system_time(row_start, row_end)
-) engine=innodb with system versioning
-partition by key(a, row_start) (
-partition p1,
-partition p2
-);
-ERROR HY000: Transaction-precise system-versioned tables do not support partitioning by ROW START or ROW END
-create or replace table t (
-a int primary key,
-row_start bigint unsigned as row start invisible,
-row_end bigint unsigned as row end invisible,
-period for system_time(row_start, row_end)
-) engine=innodb with system versioning
-partition by hash(a + row_end * 2) (
-partition p1,
-partition p2
-);
-ERROR HY000: Transaction-precise system-versioned tables do not support partitioning by ROW START or ROW END
-create or replace table t (
-a int primary key,
-row_start bigint unsigned as row start invisible,
-row_end bigint unsigned as row end invisible,
-period for system_time(row_start, row_end)
-) engine=innodb with system versioning
-partition by range columns (a, row_start) (
-partition p1 values less than (100, 100)
-);
-ERROR HY000: Transaction-precise system-versioned tables do not support partitioning by ROW START or ROW END
-#
-# MDEV-18794 Assertion `!m_innodb' failed in ha_partition::cmp_ref upon SELECT from partitioned table
-#
-create or replace table t1 (pk int auto_increment, i int, c char(1), primary key (pk), key(i))
-engine=innodb with system versioning partition by key() partitions 2;
-insert into t1 (i, c) values (1, 'a'), (2, 'b'), (null, 'c'), (null, 'b');
-alter table t1 drop system versioning;
-replace into t1 select * from t1;
-select * from t1 where i > 0 or pk = 1000 limit 1;
-pk i c
-1 1 a
-drop table t1;
-# End of 10.3 tests
diff --git a/mysql-test/suite/versioning/r/partition_rotation.result b/mysql-test/suite/versioning/r/partition_rotation.result
deleted file mode 100644
index ff312c937cc..00000000000
--- a/mysql-test/suite/versioning/r/partition_rotation.result
+++ /dev/null
@@ -1,70 +0,0 @@
-set timestamp=unix_timestamp('2001-02-03 10:20:30');
-create or replace table t1 (i int) with system versioning
-partition by system_time interval 1 day
-subpartition by key (i) subpartitions 2
-(partition p1 history, partition pn current);
-set timestamp=unix_timestamp('2001-02-03 10:20:40');
-insert t1 values (1);
-delete from t1;
-set timestamp=unix_timestamp('2001-02-04 10:20:50');
-insert t1 values (2);
-delete from t1;
-select subpartition_name,partition_description,table_rows from information_schema.partitions where table_schema='test' and table_name='t1';
-subpartition_name partition_description table_rows
-p1sp0 2001-02-04 10:20:30 1
-p1sp1 2001-02-04 10:20:30 1
-pnsp0 CURRENT 0
-pnsp1 CURRENT 0
-set timestamp=unix_timestamp('2001-02-04 10:20:55');
-alter table t1 add partition (partition p0 history, partition p2 history);
-set timestamp=unix_timestamp('2001-02-04 10:30:00');
-insert t1 values (4),(5);
-set timestamp=unix_timestamp('2001-02-04 10:30:10');
-update t1 set i=6 where i=5;
-select subpartition_name,partition_description,table_rows from information_schema.partitions where table_schema='test' and table_name='t1';
-subpartition_name partition_description table_rows
-p1sp0 2001-02-04 10:20:30 1
-p1sp1 2001-02-04 10:20:30 0
-p0sp0 2001-02-05 10:20:30 1
-p0sp1 2001-02-05 10:20:30 1
-p2sp0 2001-02-06 10:20:30 0
-p2sp1 2001-02-06 10:20:30 0
-pnsp0 CURRENT 0
-pnsp1 CURRENT 2
-## pruning check
-set @ts=(select partition_description from information_schema.partitions
-where table_schema='test' and table_name='t1' and partition_name='p0' limit 1);
-select * from t1;
-i
-4
-6
-explain partitions select * from t1;
-id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 pn_pnsp0,pn_pnsp1 ALL NULL NULL NULL NULL 2 Using where
-explain partitions select * from t1 for system_time as of '2001-02-04 10:20:30';
-id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0_p0sp0,p0_p0sp1,p2_p2sp0,p2_p2sp1,pn_pnsp0,pn_pnsp1 ALL NULL NULL NULL NULL # Using where
-set @ts=(select row_end from t1 for system_time all where i=1);
-select * from t1 for system_time all where row_end = @ts;
-i
-1
-explain partitions select * from t1 for system_time all where row_end = @ts;
-id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p1_p1sp0,p1_p1sp1 # NULL NULL NULL NULL # #
-#
-# MDEV-16023 Unfortunate error message WARN_VERS_PART_FULL
-#
-set timestamp= unix_timestamp('2020-07-29 10:30:10');
-create or replace table t1 (a int) with system versioning
-partition by system_time interval 1 second (
-partition p0 history,
-partition p1 history,
-partition pc current
-);
-set timestamp= unix_timestamp('2020-07-29 10:30:14');
-insert into t1 values (1),(2),(3);
-show warnings;
-Level Code Message
-# Cleanup
-set timestamp= default;
-drop table t1;
diff --git a/mysql-test/suite/versioning/r/select.result b/mysql-test/suite/versioning/r/select.result
index aa46d810ed1..6df18403ee3 100644
--- a/mysql-test/suite/versioning/r/select.result
+++ b/mysql-test/suite/versioning/r/select.result
@@ -397,12 +397,9 @@ x
select x from t1 for system_time as of transaction @trx_start;
x
1
-## no specifier (auto-detection)
+## no specifier (defaults to timestamp)
select x from t1 for system_time as of @ts;
x
-select x from t1 for system_time as of @trx_start;
-x
-1
### Issue #365, bug 4 (related to #226, optimized fields)
create or replace table t1 (i int, b int) with system versioning;
insert into t1 values (0, 0), (0, 0);
diff --git a/mysql-test/suite/versioning/r/select2,trx_id.rdiff b/mysql-test/suite/versioning/r/select2,trx_id.rdiff
index 4075b1b0f28..bdc20d1dc4f 100644
--- a/mysql-test/suite/versioning/r/select2,trx_id.rdiff
+++ b/mysql-test/suite/versioning/r/select2,trx_id.rdiff
@@ -14,7 +14,7 @@
9 109
3 33
-select x as ASOF2_x, y from t1 for system_time as of @t0;
-+select x as ASOF2_x, y from t1 for system_time as of @x0;
++select x as ASOF2_x, y from t1 for system_time as of transaction @x0;
ASOF2_x y
0 100
1 101
@@ -23,7 +23,7 @@
8 108
9 109
-select x as FROMTO2_x, y from t1 for system_time from '1970-01-01 00:00' to @t1;
-+select x as FROMTO2_x, y from t1 for system_time from @x0 to @x1;
++select x as FROMTO2_x, y from t1 for system_time from transaction @x0 to transaction @x1;
FROMTO2_x y
0 100
1 101
@@ -31,7 +31,7 @@
7 107
8 108
9 109
--select x as BETWAND2_x, y from t1 for system_time between timestamp '1970-01-01 00:00' and timestamp @t1;
+-select x as BETWAND2_x, y from t1 for system_time between '1970-01-01 00:00' and timestamp @t1;
+select x as BETWAND2_x, y from t1 for system_time between transaction @x0 and transaction @x1;
BETWAND2_x y
0 100
diff --git a/mysql-test/suite/versioning/r/select2.result b/mysql-test/suite/versioning/r/select2.result
index 8c9c519c349..353bdf8e696 100644
--- a/mysql-test/suite/versioning/r/select2.result
+++ b/mysql-test/suite/versioning/r/select2.result
@@ -110,7 +110,7 @@ FROMTO2_x y
7 107
8 108
9 109
-select x as BETWAND2_x, y from t1 for system_time between timestamp '1970-01-01 00:00' and timestamp @t1;
+select x as BETWAND2_x, y from t1 for system_time between '1970-01-01 00:00' and timestamp @t1;
BETWAND2_x y
0 100
1 101
diff --git a/mysql-test/suite/versioning/r/trx_id.result b/mysql-test/suite/versioning/r/trx_id.result
index 1210262fcd0..f09284a61ae 100644
--- a/mysql-test/suite/versioning/r/trx_id.result
+++ b/mysql-test/suite/versioning/r/trx_id.result
@@ -262,41 +262,41 @@ ERROR HY000: Illegal parameter data type row for operation 'FOR SYSTEM_TIME'
#
# DOUBLE is not supported, use explicit CAST
#
-SELECT * FROM t1 FOR SYSTEM_TIME AS OF RAND();
+SELECT * FROM t1 FOR SYSTEM_TIME AS OF TRANSACTION RAND();
ERROR HY000: Illegal parameter data type double for operation 'FOR SYSTEM_TIME'
-SELECT * FROM t1 FOR SYSTEM_TIME AS OF (RAND());
+SELECT * FROM t1 FOR SYSTEM_TIME AS OF TRANSACTION (RAND());
ERROR HY000: Illegal parameter data type double for operation 'FOR SYSTEM_TIME'
-SELECT * FROM t1 FOR SYSTEM_TIME AS OF COALESCE(RAND());
+SELECT * FROM t1 FOR SYSTEM_TIME AS OF TRANSACTION COALESCE(RAND());
ERROR HY000: Illegal parameter data type double for operation 'FOR SYSTEM_TIME'
-SELECT * FROM t2 FOR SYSTEM_TIME AS OF RAND();
+SELECT * FROM t2 FOR SYSTEM_TIME AS OF TRANSACTION RAND();
ERROR HY000: Illegal parameter data type double for operation 'FOR SYSTEM_TIME'
-SELECT * FROM t2 FOR SYSTEM_TIME AS OF (RAND());
+SELECT * FROM t2 FOR SYSTEM_TIME AS OF TRANSACTION (RAND());
ERROR HY000: Illegal parameter data type double for operation 'FOR SYSTEM_TIME'
-SELECT * FROM t2 FOR SYSTEM_TIME AS OF COALESCE(RAND());
+SELECT * FROM t2 FOR SYSTEM_TIME AS OF TRANSACTION COALESCE(RAND());
ERROR HY000: Illegal parameter data type double for operation 'FOR SYSTEM_TIME'
#
# DECIMAL is not supported, use explicit CAST
#
-SELECT * FROM t1 FOR SYSTEM_TIME AS OF 10.1;
+SELECT * FROM t1 FOR SYSTEM_TIME AS OF TRANSACTION 10.1;
ERROR HY000: Illegal parameter data type decimal for operation 'FOR SYSTEM_TIME'
-SELECT * FROM t1 FOR SYSTEM_TIME AS OF COALESCE(10.1);
+SELECT * FROM t1 FOR SYSTEM_TIME AS OF TRANSACTION COALESCE(10.1);
ERROR HY000: Illegal parameter data type decimal for operation 'FOR SYSTEM_TIME'
-SELECT * FROM t2 FOR SYSTEM_TIME AS OF 10.1;
+SELECT * FROM t2 FOR SYSTEM_TIME AS OF TRANSACTION 10.1;
ERROR HY000: Illegal parameter data type decimal for operation 'FOR SYSTEM_TIME'
-SELECT * FROM t2 FOR SYSTEM_TIME AS OF COALESCE(10.1);
+SELECT * FROM t2 FOR SYSTEM_TIME AS OF TRANSACTION COALESCE(10.1);
ERROR HY000: Illegal parameter data type decimal for operation 'FOR SYSTEM_TIME'
#
# YEAR is not supported, use explicit CAST
#
BEGIN NOT ATOMIC
DECLARE var YEAR;
-SELECT * FROM t1 FOR SYSTEM_TIME AS OF var;
+SELECT * FROM t1 FOR SYSTEM_TIME AS OF TRANSACTION var;
END;
$$
ERROR HY000: Illegal parameter data type year for operation 'FOR SYSTEM_TIME'
BEGIN NOT ATOMIC
DECLARE var YEAR;
-SELECT * FROM t2 FOR SYSTEM_TIME AS OF var;
+SELECT * FROM t2 FOR SYSTEM_TIME AS OF TRANSACTION var;
END;
$$
ERROR HY000: Illegal parameter data type year for operation 'FOR SYSTEM_TIME'
@@ -305,13 +305,13 @@ ERROR HY000: Illegal parameter data type year for operation 'FOR SYSTEM_TIME'
#
BEGIN NOT ATOMIC
DECLARE var ENUM('xxx') DEFAULT 'xxx';
-SELECT * FROM t1 FOR SYSTEM_TIME AS OF var;
+SELECT * FROM t1 FOR SYSTEM_TIME AS OF TRANSACTION var;
END;
$$
ERROR HY000: Illegal parameter data type enum for operation 'FOR SYSTEM_TIME'
BEGIN NOT ATOMIC
DECLARE var ENUM('xxx') DEFAULT 'xxx';
-SELECT * FROM t2 FOR SYSTEM_TIME AS OF var;
+SELECT * FROM t2 FOR SYSTEM_TIME AS OF TRANSACTION var;
END;
$$
ERROR HY000: Illegal parameter data type enum for operation 'FOR SYSTEM_TIME'
@@ -320,28 +320,19 @@ ERROR HY000: Illegal parameter data type enum for operation 'FOR SYSTEM_TIME'
#
BEGIN NOT ATOMIC
DECLARE var SET('xxx') DEFAULT 'xxx';
-SELECT * FROM t1 FOR SYSTEM_TIME AS OF var;
+SELECT * FROM t1 FOR SYSTEM_TIME AS OF TRANSACTION var;
END;
$$
ERROR HY000: Illegal parameter data type set for operation 'FOR SYSTEM_TIME'
BEGIN NOT ATOMIC
DECLARE var SET('xxx') DEFAULT 'xxx';
-SELECT * FROM t2 FOR SYSTEM_TIME AS OF var;
+SELECT * FROM t2 FOR SYSTEM_TIME AS OF TRANSACTION var;
END;
$$
ERROR HY000: Illegal parameter data type set for operation 'FOR SYSTEM_TIME'
-#
-# BIT is resolved to TRANSACTION
-#
-BEGIN NOT ATOMIC
-DECLARE var BIT(10);
-SELECT * FROM t1 FOR SYSTEM_TIME AS OF var;
-END;
-$$
-x
BEGIN NOT ATOMIC
DECLARE var BIT(10);
-SELECT * FROM t2 FOR SYSTEM_TIME AS OF var;
+SELECT * FROM t2 FOR SYSTEM_TIME AS OF TRANSACTION var;
END;
$$
ERROR HY000: Transaction-precise system versioning for `t2` is not supported
@@ -353,20 +344,6 @@ x
1
SELECT * FROM t2 FOR SYSTEM_TIME AS OF '2038-12-30 00:00:00';
x
-#
-# HEX hybrids resolve to TRANSACTION
-#
-SELECT * FROM t1 FOR SYSTEM_TIME AS OF (0xFFFFFFFF);
-ERROR HY000: TRX_ID 4294967295 not found in `mysql.transaction_registry`
-SELECT * FROM t2 FOR SYSTEM_TIME AS OF (0xFFFFFFFF);
-ERROR HY000: Transaction-precise system versioning for `t2` is not supported
-#
-# BIT literals resolve to TRANSACTION
-#
-SELECT * FROM t1 FOR SYSTEM_TIME AS OF (b'11111111111111111111111111111111');
-ERROR HY000: TRX_ID 4294967295 not found in `mysql.transaction_registry`
-SELECT * FROM t2 FOR SYSTEM_TIME AS OF (b'11111111111111111111111111111111');
-ERROR HY000: Transaction-precise system versioning for `t2` is not supported
DROP TABLE t1, t2;
#
# MDEV-16094 Crash when using AS OF with a stored function
@@ -389,11 +366,11 @@ PERIOD FOR SYSTEM_TIME(start_timestamp, end_timestamp)
) ENGINE=InnoDB WITH SYSTEM VERSIONING;
SELECT * FROM tts FOR SYSTEM_TIME AS OF fts();
x start_timestamp end_timestamp
-SELECT * FROM tts FOR SYSTEM_TIME AS OF ftx();
+SELECT * FROM tts FOR SYSTEM_TIME AS OF TRANSACTION ftx();
ERROR HY000: Transaction-precise system versioning for `tts` is not supported
SELECT * FROM ttx FOR SYSTEM_TIME AS OF fts();
x start_timestamp end_timestamp
-SELECT * FROM ttx FOR SYSTEM_TIME AS OF ftx();
+SELECT * FROM ttx FOR SYSTEM_TIME AS OF TRANSACTION ftx();
x start_timestamp end_timestamp
DROP TABLE tts;
DROP TABLE ttx;
diff --git a/mysql-test/suite/versioning/t/alter.test b/mysql-test/suite/versioning/t/alter.test
index 16f391b1454..9d3101fb4ad 100644
--- a/mysql-test/suite/versioning/t/alter.test
+++ b/mysql-test/suite/versioning/t/alter.test
@@ -653,3 +653,27 @@ set system_versioning_alter_history= keep;
alter ignore table t1 drop pk;
# cleanup
drop table t1;
+
+
+--echo #
+--echo # MDEV-21941 RENAME doesn't work for system time or period fields
+--echo #
+create or replace table t1 (a int) with system versioning;
+--error ER_BAD_FIELD_ERROR
+alter table t1 rename column row_start to x;
+
+create or replace table t1 (
+ a int,
+ row_start timestamp(6) as row start invisible,
+ row_end timestamp(6) as row end invisible,
+ period for system_time (row_start, row_end)
+) with system versioning;
+
+alter table t1 rename column row_start to x;
+alter table t1 rename column row_end to y;
+
+show create table t1;
+# cleanup
+drop table t1;
+
+--echo # End of 10.5 tests
diff --git a/mysql-test/suite/versioning/t/delete_history.test b/mysql-test/suite/versioning/t/delete_history.test
index 94e58590dd9..e3b60011644 100644
--- a/mysql-test/suite/versioning/t/delete_history.test
+++ b/mysql-test/suite/versioning/t/delete_history.test
@@ -2,6 +2,8 @@
--source include/have_partition.inc
--source suite/versioning/engines.inc
+call mtr.add_suppression("need more HISTORY partitions");
+
create table t (a int);
--error ER_VERS_NOT_VERSIONED
delete history from t before system_time now();
@@ -56,16 +58,13 @@ select * from t for system_time all;
drop procedure truncate_sp;
--echo # Truncate partitioned
-create or replace table t (a int)
-with system versioning
-partition by system_time limit 1 (
- partition p0 history,
- partition p1 history,
- partition pn current);
+create or replace table t (a int) with system versioning
+partition by system_time limit 1 partitions 3;
insert into t values (1);
update t set a= 2;
update t set a= 3;
delete history from t;
+--echo # The above warning is one command late (MDEV-20345) ^^^
select * from t for system_time all;
--echo # VIEW
diff --git a/mysql-test/suite/versioning/t/foreign.test b/mysql-test/suite/versioning/t/foreign.test
index 20c35028565..441491e461f 100644
--- a/mysql-test/suite/versioning/t/foreign.test
+++ b/mysql-test/suite/versioning/t/foreign.test
@@ -494,4 +494,47 @@ delete from t1;
# cleanup
drop table t1;
+--echo #
+--echo # MDEV-20729 Fix REFERENCES constraint in column definition
+--echo #
+create or replace table t1(
+ id int
+);
+--echo # system fields can't be foreign keys:
+--replace_result $sys_datatype_expl SYS_DATATYPE
+--error ER_PARSE_ERROR,ER_PARSE_ERROR
+eval create or replace table t2(
+ x int,
+ sys_start $sys_datatype_expl as row start references t1(id),
+ sys_end $sys_datatype_expl as row end,
+ period for system_time(sys_start, sys_end)
+) engine innodb with system versioning;
+--replace_result $sys_datatype_expl SYS_DATATYPE
+--error ER_PARSE_ERROR,ER_PARSE_ERROR
+eval create or replace table t2(
+ x int,
+ sys_start $sys_datatype_expl as row start,
+ sys_end $sys_datatype_expl as row end references t1(id),
+ period for system_time(sys_start, sys_end)
+) engine innodb with system versioning;
+--replace_result $sys_datatype_expl SYS_DATATYPE
+--error ER_CANT_CREATE_TABLE
+eval create or replace table t2(
+ x int,
+ sys_start $sys_datatype_expl as row start,
+ sys_end $sys_datatype_expl as row end,
+ period for system_time(sys_start, sys_end),
+ foreign key (sys_start) references t1(id)
+) engine innodb with system versioning;
+--replace_result $sys_datatype_expl SYS_DATATYPE
+--error ER_CANT_CREATE_TABLE
+eval create or replace table t2(
+ x int,
+ sys_start $sys_datatype_expl as row start,
+ sys_end $sys_datatype_expl as row end,
+ period for system_time(sys_start, sys_end),
+ foreign key (sys_end) references t1(id)
+) engine innodb with system versioning;
+drop table t1;
+
--source suite/versioning/common_finish.inc
diff --git a/mysql-test/suite/versioning/t/partition.test b/mysql-test/suite/versioning/t/partition.test
index c6279444a6a..ac7a3ebfd55 100644
--- a/mysql-test/suite/versioning/t/partition.test
+++ b/mysql-test/suite/versioning/t/partition.test
@@ -2,6 +2,8 @@
-- source suite/versioning/common.inc
-- source suite/versioning/engines.inc
+call mtr.add_suppression("need more HISTORY partitions");
+
set system_versioning_alter_history=keep;
--echo # Check conventional partitioning on temporal tables
@@ -121,12 +123,27 @@ alter table t1 drop partition p0;
select x from t1;
---echo # Bug #260: incorrect IB partitioning warning
+--echo # rename works
+create or replace table t1 (x int) with system versioning
+partition by system_time;
+alter table t1 reorganize partition p0 into
+(partition custom_name history);
+--replace_result $default_engine DEFAULT_ENGINE
+show create table t1;
+
+--echo # merge and split doesn't (MDEV-19938)
+create or replace table t1 (x int) with system versioning
+partition by system_time limit 10 partitions 3;
+--error ER_REORG_HASH_ONLY_ON_SAME_NO
+alter table t1 reorganize partition p0, p1 into (partition p00 history);
+--error ER_REORG_HASH_ONLY_ON_SAME_NO
+alter table t1 reorganize partition p1 into (partition p1 history, partition p2 history);
+
+
+--echo # Bug tempesta-tech/mariadb#260: incorrect IB partitioning warning
create or replace table t1 (x int)
with system versioning
-partition by system_time limit 1 (
- partition p0 history,
- partition pn current);
+partition by system_time limit 1;
alter table t1 change x big int;
create or replace table t1 (i int) engine myisam partition by hash(i) partitions 2;
@@ -137,9 +154,7 @@ alter table t1 add partition (partition px history);
--echo ## INSERT, UPDATE, DELETE
create or replace table t1 (x int)
with system versioning
-partition by system_time (
- partition p0 history,
- partition pn current);
+partition by system_time;
set @now= now(6);
insert into t1 values (1);
@@ -202,17 +217,11 @@ select @ts2 = @ts3;
--error ER_PART_WRONG_VALUE
create or replace table t1 (x int)
with system versioning
-partition by system_time limit 0 (
- partition p0 history,
- partition p1 history,
- partition pn current);
+partition by system_time limit 0 partitions 3;
create or replace table t1 (x int)
with system versioning
-partition by system_time limit 2 (
- partition p0 history,
- partition p1 history,
- partition pn current);
+partition by system_time limit 2 partitions 3;
--replace_result $default_engine DEFAULT_ENGINE
show create table t1;
@@ -232,45 +241,251 @@ insert into t1 values (7), (8);
delete from t1;
select * from t1 partition (p1) order by x;
---echo ### Assertion in ALTER on warning from partitioning LIMIT [#446]
-create or replace table t1 (x int) with system versioning;
-insert into t1 values (1), (2);
-delete from t1;
-alter table t1 partition by system_time limit 1 (
- partition p1 history,
- partition pn current);
--echo ## rotation by INTERVAL
--error ER_PART_WRONG_VALUE
create or replace table t1 (x int)
with system versioning
-partition by system_time interval 0 second (
- partition p0 history,
- partition p1 history,
- partition pn current);
+partition by system_time interval 0 second partitions 3;
--error ER_PARSE_ERROR
-create or replace table t1 (x int)
-with system versioning
-partition by system_time interval 1 second starts 12345 (
+create table t1 (i int) with system versioning
+partition by system_time interval 6 day limit 98;
+
+--error ER_DATA_OUT_OF_RANGE
+create or replace table t1 (pk int) with system versioning
+partition by system_time interval 10 year partitions 3;
+
+--echo # INTERVAL and ALTER TABLE
+create or replace table t1 (i int) with system versioning
+partition by system_time interval 1 hour;
+
+set @ts=(select partition_description from information_schema.partitions
+ where table_schema='test' and table_name='t1' and partition_name='p0');
+
+alter table t1 add column b int;
+select partition_name,partition_ordinal_position,partition_method,timediff(partition_description, @ts) from information_schema.partitions where table_schema='test' and table_name='t1';
+alter table t1 add partition (partition p1 history, partition p2 history);
+select partition_name,partition_ordinal_position,partition_method,timediff(partition_description, @ts) from information_schema.partitions where table_schema='test' and table_name='t1';
+alter table t1 drop partition p0;
+select partition_name,partition_ordinal_position,partition_method,timediff(partition_description, @ts) from information_schema.partitions where table_schema='test' and table_name='t1';
+--error ER_VERS_DROP_PARTITION_INTERVAL
+alter table t1 drop partition p2;
+select partition_name,partition_ordinal_position,partition_method,timediff(partition_description, @ts) from information_schema.partitions where table_schema='test' and table_name='t1';
+
+#
+# partition rotation (moved from partition_rotation.test)
+#
+set timestamp=unix_timestamp('2001-02-03 10:20:30');
+create or replace table t1 (i int) with system versioning
+partition by system_time interval 1 day
+ subpartition by key (i) subpartitions 2
+ (partition p1 history, partition pn current);
+set timestamp=unix_timestamp('2001-02-03 10:20:40');
+insert t1 values (1); delete from t1;
+set timestamp=unix_timestamp('2001-02-04 10:20:50');
+insert t1 values (2); delete from t1;
+
+select subpartition_name,partition_description,table_rows from information_schema.partitions where table_schema='test' and table_name='t1';
+
+set timestamp=unix_timestamp('2001-02-04 10:20:55');
+alter table t1 add partition (partition p0 history, partition p2 history);
+set timestamp=unix_timestamp('2001-02-04 10:30:00');
+insert t1 values (4),(5);
+set timestamp=unix_timestamp('2001-02-04 10:30:10');
+update t1 set i=6 where i=5;
+
+select subpartition_name,partition_description,table_rows from information_schema.partitions where table_schema='test' and table_name='t1';
+
+--echo ## pruning check
+set @ts=(select partition_description from information_schema.partitions
+ where table_schema='test' and table_name='t1' and partition_name='p0' limit 1);
+--sorted_result
+select * from t1;
+--replace_column 10 #
+explain partitions select * from t1;
+--replace_column 10 #
+explain partitions select * from t1 for system_time as of '2001-02-04 10:20:30';
+set @ts=(select row_end from t1 for system_time all where i=1);
+select * from t1 for system_time all where row_end = @ts;
+--replace_column 5 # 10 # 11 #
+explain partitions select * from t1 for system_time all where row_end = @ts;
+
+--echo #
+--echo # MDEV-16023 Unfortunate error message WARN_VERS_PART_FULL
+--echo #
+
+set timestamp= unix_timestamp('2020-07-29 10:30:10');
+create or replace table t1 (a int) with system versioning
+ partition by system_time interval 1 second (
partition p0 history,
partition p1 history,
- partition pn current);
+ partition pc current
+ );
---error ER_PARSE_ERROR
-create table t1 (i int) with system versioning
- partition by system_time interval 6 day limit 98
- (partition p0 history, partition ver_pn current);
+set timestamp= unix_timestamp('2020-07-29 10:30:14');
+insert into t1 values (1),(2),(3);
+show warnings;
+
+--echo # Cleanup
+set timestamp= default;
+
+--echo ## INTERVAL ... STARTS
+--error ER_PART_WRONG_VALUE
+create or replace table t1 (i int) with system versioning
+partition by system_time interval 1 day starts 'a';
+
+--error ER_PART_WRONG_VALUE
+create or replace table t1 (i int) with system versioning
+partition by system_time interval 1 day starts '00:00:00';
+
+--error ER_PART_WRONG_VALUE
+create or replace table t1 (i int) with system versioning
+partition by system_time interval 1 day starts '2000-00-01 00:00:00';
+
+--error ER_PART_WRONG_VALUE
+create or replace table t1 (i int) with system versioning
+partition by system_time interval 1 day starts 946684800;
+
+create or replace table t1 (i int) with system versioning
+partition by system_time interval 1 day starts '2000-01-01 00:00:00';
+--replace_result $default_engine DEFAULT_ENGINE
+show create table t1;
+
+--echo # Test STARTS warning
+set timestamp= unix_timestamp('2000-01-01 00:00:00');
+create or replace table t1 (i int) with system versioning
+partition by system_time interval 1 day;
+--replace_result $default_engine DEFAULT_ENGINE
+show create table t1;
+
+create or replace table t1 (i int) with system versioning
+partition by system_time interval 1 day starts '2000-01-01 00:00:01';
+
+--echo # Test default STARTS rounding
+set timestamp= unix_timestamp('1999-12-15 13:33:33');
+create or replace table t1 (i int) with system versioning
+partition by system_time interval 1 second;
+--replace_result $default_engine DEFAULT_ENGINE
+show create table t1;
+
+create or replace table t1 (i int) with system versioning
+partition by system_time interval 1 minute;
+--replace_result $default_engine DEFAULT_ENGINE
+show create table t1;
+
+create or replace table t1 (i int) with system versioning
+partition by system_time interval 1 hour;
+--replace_result $default_engine DEFAULT_ENGINE
+show create table t1;
+
+create or replace table t1 (i int) with system versioning
+partition by system_time interval 1 day;
+--replace_result $default_engine DEFAULT_ENGINE
+show create table t1;
+
+create or replace table t1 (i int) with system versioning
+partition by system_time interval 1 month;
+--replace_result $default_engine DEFAULT_ENGINE
+show create table t1;
+
+create or replace table t1 (i int) with system versioning
+partition by system_time interval 1 year;
+--replace_result $default_engine DEFAULT_ENGINE
+show create table t1;
+
+--echo # seconds equivalent of 1 day does not round:
+create or replace table t1 (i int) with system versioning
+partition by system_time interval 86400 second;
+--replace_result $default_engine DEFAULT_ENGINE
+show create table t1;
+
+--echo # STARTS value is in local time_zone:
+set time_zone="+03:00";
+create or replace table t1 (i int) with system versioning
+partition by system_time interval 1 day starts '2000-01-01 00:00:00';
+
+set timestamp= unix_timestamp('2000-01-01 00:00:00');
+create or replace table t2 (i int) with system versioning
+partition by system_time interval 1 day;
+
+--replace_result $default_engine DEFAULT_ENGINE
+show create table t1;
+--replace_result $default_engine DEFAULT_ENGINE
+show create table t2;
+set time_zone="+00:00";
+--replace_result $default_engine DEFAULT_ENGINE
+show create table t1;
+--replace_result $default_engine DEFAULT_ENGINE
+show create table t2;
+
+--echo # Test rotation
+set timestamp= unix_timestamp('2001-01-01 00:00:00');
+--echo # it's ok to add partitions for past:
+create or replace table t1 (i int) with system versioning
+partition by system_time interval 1 day starts '2000-01-01 00:00:00'
+partitions 3;
+
+--echo # we are warned when we push to present:
+insert into t1 values (0);
+set timestamp= unix_timestamp('2001-01-01 00:00:01');
+update t1 set i= i + 1;
+set timestamp= unix_timestamp('2001-01-01 00:00:02');
+update t1 set i= i + 1;
+
+select *, row_end from t1 partition (p0);
+select *, row_end from t1 partition (p1);
+
+set timestamp= unix_timestamp('2000-01-01 00:00:00');
+--echo # now we "overflow" first partition a bit:
+create or replace table t1 (i int) with system versioning
+partition by system_time interval 1 day starts '2000-01-03 00:00:00'
+partitions 3;
+
+insert into t1 values (0);
+set timestamp= unix_timestamp('2000-01-01 00:00:01');
+update t1 set i= i + 1;
+set timestamp= unix_timestamp('2000-01-02 00:00:01');
+update t1 set i= i + 1;
+set timestamp= unix_timestamp('2000-01-03 00:00:01');
+update t1 set i= i + 1;
+set timestamp= unix_timestamp('2000-01-04 00:00:01');
+update t1 set i= i + 1;
+
+select *, row_end from t1 partition (p0);
+select *, row_end from t1 partition (p1);
+
+set timestamp= unix_timestamp('2000-01-01 00:00:00');
+--echo # and this is how it usually goes:
+create or replace table t1 (i int) with system versioning
+partition by system_time interval 1 day
+partitions 3;
+
+insert into t1 values (0);
+set timestamp= unix_timestamp('2000-01-01 00:00:01');
+update t1 set i= i + 1;
+set timestamp= unix_timestamp('2000-01-02 00:00:01');
+update t1 set i= i + 1;
+set timestamp= unix_timestamp('2000-01-03 00:00:01');
+update t1 set i= i + 1;
+set timestamp= unix_timestamp('2000-01-04 00:00:01');
+update t1 set i= i + 1;
+
+alter table t1 add partition (partition p2 history, partition p3 history);
+
+select *, row_end from t1 partition (p0);
+select *, row_end from t1 partition (p1);
+select *, row_end from t1 partition (p2);
+select *, row_end from t1 partition (p3);
+
+drop tables t1, t2;
--echo ## Subpartitions
create or replace table t1 (x int)
with system versioning
-partition by system_time limit 2
+partition by system_time limit 2 partitions 3
subpartition by key (x)
-subpartitions 2 (
- partition p0 history,
- partition p1 history,
- partition pn current);
+subpartitions 2;
insert into t1 (x) values (1), (2), (3), (4), (5);
select * from t1 partition (pnsp0);
@@ -285,24 +500,18 @@ select * from t1 partition (p0sp1);
select * from t1 partition (p1sp0);
select * from t1 partition (p1sp1);
---replace_result $sys_datatype_expl SYS_DATATYPE
-eval create or replace table t1 (
- a bigint,
- row_start $sys_datatype_expl as row start invisible,
- row_end $sys_datatype_expl as row end invisible,
- period for system_time(row_start, row_end))
+--echo # check implicit sys fields for implicit engine of partitioned table
+create or replace table t1 (a bigint)
with system versioning
partition by range (a)
(partition p0 values less than (20) engine innodb,
partition p1 values less than maxvalue engine innodb);
insert into t1 values (1);
+select * from t1 partition (p0);
---replace_result $sys_datatype_expl SYS_DATATYPE
-eval create or replace table t1 (
- f_int1 integer default 0,
- row_start $sys_datatype_expl as row start invisible,
- row_end $sys_datatype_expl as row end invisible,
- period for system_time(row_start, row_end)
+--echo # check for partition engine
+create or replace table t1 (
+ f_int1 integer default 0
) with system versioning
partition by range(f_int1)
subpartition by hash(f_int1)
@@ -310,38 +519,127 @@ subpartition by hash(f_int1)
(subpartition subpart11 storage engine = 'innodb',
subpartition subpart12 storage engine = 'innodb'));
insert into t1 values (1);
+select * from t1 partition (part1);
+
+--echo #
+--echo # TRX_ID versioning (moved from partition_innodb.test)
+--echo #
+--echo # MDEV-15951 system versioning by trx id doesn't work with partitioning
+--echo # currently trx_id does not support partitioning by system_time
+--error ER_VERS_FIELD_WRONG_TYPE
+create or replace table t1(
+ i int,
+ row_start bigint unsigned generated always as row start,
+ row_end bigint unsigned generated always as row end,
+ period for system_time(row_start, row_end)
+) engine=InnoDB with system versioning partition by system_time (
+ partition p0 history,
+ partition pn current
+);
+
+create or replace table t1(
+ i int,
+ row_start bigint unsigned generated always as row start,
+ row_end bigint unsigned generated always as row end,
+ period for system_time(row_start, row_end)
+) engine=InnoDB with system versioning;
+
+--error ER_VERS_FIELD_WRONG_TYPE
+alter table t1 partition by system_time (
+ partition p0 history,
+ partition pn current
+);
+
+drop table t1;
+
+--error ER_VERS_TRX_PART_HISTORIC_ROW_NOT_SUPPORTED
+create or replace table t (
+ a int primary key,
+ row_start bigint unsigned as row start invisible,
+ row_end bigint unsigned as row end invisible,
+ period for system_time(row_start, row_end)
+) engine=innodb with system versioning
+partition by key() (
+ partition p1,
+ partition p2
+);
+
+--error ER_VERS_TRX_PART_HISTORIC_ROW_NOT_SUPPORTED
+create or replace table t (
+ a int primary key,
+ row_start bigint unsigned as row start invisible,
+ row_end bigint unsigned as row end invisible,
+ period for system_time(row_start, row_end)
+) engine=innodb with system versioning
+partition by key(a, row_start) (
+ partition p1,
+ partition p2
+);
+
+--error ER_VERS_TRX_PART_HISTORIC_ROW_NOT_SUPPORTED
+create or replace table t (
+ a int primary key,
+ row_start bigint unsigned as row start invisible,
+ row_end bigint unsigned as row end invisible,
+ period for system_time(row_start, row_end)
+) engine=innodb with system versioning
+partition by hash(a + row_end * 2) (
+ partition p1,
+ partition p2
+);
+
+--error ER_VERS_TRX_PART_HISTORIC_ROW_NOT_SUPPORTED
+create or replace table t (
+ a int primary key,
+ row_start bigint unsigned as row start invisible,
+ row_end bigint unsigned as row end invisible,
+ period for system_time(row_start, row_end)
+) engine=innodb with system versioning
+partition by range columns (a, row_start) (
+ partition p1 values less than (100, 100)
+);
+--echo #
+--echo # Assertion in ALTER on warning from partitioning LIMIT [#446]
+--echo #
+create or replace table t1 (x int) with system versioning;
+insert into t1 values (1), (2);
+delete from t1;
+alter table t1 partition by system_time limit 1 (
+ partition p1 history,
+ partition pn current);
+
+--echo #
+--echo # MDEV-14649 Assertion `t->mysql_col_len == 8' failed in row_insert_for_mysql
+--echo #
create or replace table t1 (i int) engine=innodb partition by key(i);
---replace_result $sys_datatype_expl SYS_DATATYPE
-eval alter table t1
- add column row_start $sys_datatype_expl as row start invisible,
- add column row_end $sys_datatype_expl as row end invisible,
- add period for system_time(row_start, row_end),
- add system versioning;
+alter table t1 add system versioning;
insert into t1 values();
+--echo #
--echo # MDEV-14722 Assertion in ha_commit_trans for sub-statement
+--echo #
create or replace table t1 (i int) with system versioning
-partition by system_time interval 1 day (
- partition p1 history,
- partition pc current);
+partition by system_time interval 1 day;
create or replace table t2 (f int);
create or replace trigger tr before insert on t2
for each row select table_rows from information_schema.tables
where table_name = 't1' into @a;
insert into t2 values (1);
+--echo #
--echo # MDEV-14740 Locking assertion for system_time partitioning
+--echo #
create or replace table t1 (i int) with system versioning
-partition by system_time interval 1 week (
- partition p1 history,
- partition pn current);
+partition by system_time interval 1 week;
create or replace table t2 (f int);
create or replace trigger tr before insert on t2
for each row select count(*) from t1 into @a;
insert into t2 values (1);
+--echo #
--echo # MDEV-14747 ALTER PARTITION BY SYSTEM_TIME after LOCK TABLES
+--echo #
create or replace table t1 (x int) with system versioning;
lock table t1 write;
alter table t1 partition by system_time interval 1 week (
@@ -349,7 +647,9 @@ alter table t1 partition by system_time interval 1 week (
partition pn current);
unlock tables;
+--echo #
--echo # MDEV-14748 Assertion in ha_myisammrg::attach_children()
+--echo #
create or replace table t1 (x int) engine=myisam with system versioning
partition by system_time interval 1 month (partition p1 history, partition pn current);
create or replace table t2 (x int) engine=myisam;
@@ -359,7 +659,9 @@ create or replace trigger tr after insert on t4 for each row insert into t2
( select x from t3 ) union ( select x from t1 );
insert into t4 values (1);
+--echo #
--echo # MDEV-14821 Assertion failure
+--echo #
create or replace table t1 (x int) with system versioning;
insert into t1 values (0), (1);
update t1 set x= x + 1;
@@ -370,46 +672,22 @@ alter table t1 partition by system_time limit 1 (
delete from t1 where x = 1;
delete from t1 where x = 2;
+--echo #
--echo # MDEV-14923 Assertion upon INSERT into locked versioned partitioned table
+--echo #
create or replace table t1 (x int) with system versioning
-partition by system_time (partition p1 history, partition pn current);
+partition by system_time;
lock table t1 write;
--error ER_SAME_NAME_PARTITION
-alter table t1 add partition (partition p1 history);
+alter table t1 add partition (partition p0 history);
insert into t1 values (1);
unlock tables;
---error ER_DATA_OUT_OF_RANGE
-create or replace table t1 (pk int) with system versioning
-partition by system_time interval 10 year (
- partition p1 history,
- partition p2 history,
- partition pn current
-);
-
-# INTERVAL and ALTER TABLE
-create or replace table t1 (i int) with system versioning
-partition by system_time interval 1 hour (
- partition p0 history, partition pn current);
-
-set @ts=(select partition_description from information_schema.partitions
- where table_schema='test' and table_name='t1' and partition_name='p0');
-
-alter table t1 add column b int;
-select partition_name,partition_ordinal_position,partition_method,timediff(partition_description, @ts) from information_schema.partitions where table_schema='test' and table_name='t1';
-alter table t1 add partition (partition p1 history, partition p2 history);
-select partition_name,partition_ordinal_position,partition_method,timediff(partition_description, @ts) from information_schema.partitions where table_schema='test' and table_name='t1';
-alter table t1 drop partition p0;
-select partition_name,partition_ordinal_position,partition_method,timediff(partition_description, @ts) from information_schema.partitions where table_schema='test' and table_name='t1';
---error ER_VERS_DROP_PARTITION_INTERVAL
-alter table t1 drop partition p2;
-select partition_name,partition_ordinal_position,partition_method,timediff(partition_description, @ts) from information_schema.partitions where table_schema='test' and table_name='t1';
-
--echo #
--echo # MDEV-15103 Assertion in ha_partition::part_records() for updating VIEW
--echo #
create or replace table t1 (pk int primary key, f int) with system versioning
-partition by system_time limit 100 (partition p1 history, partition pn current);
+partition by system_time limit 100;
insert into t1 values (1,10), (2,20);
create or replace view v1 as select * from t1;
update v1 set f= 30;
@@ -418,11 +696,13 @@ update v1 set f= 30;
--echo # MDEV-15168 Unexpected ER_VERS_ENGINE_UNSUPPORTED upon dropping versioning on a partitioned table
--echo #
create or replace table t (a int) with system versioning
- partition by system_time (partition p1 history, partition pn current);
+partition by system_time;
--error ER_DROP_VERSIONING_SYSTEM_TIME_PARTITION
alter table t drop system versioning;
+--echo #
--echo # MDEV-15191 Assertion `bit < (map)->n_bits' failed in bitmap_is_set upon INSERT
+--echo #
create or replace table t1 (i int) with system versioning;
insert into t1 values (1), (2);
update t1 set i= 3;
@@ -432,18 +712,20 @@ alter table t1 add partition (partition p2 history);
insert into t1 values (4);
unlock tables;
+--echo #
--echo # MDEV-15036 Assertion `!is_set() || (m_status == DA_OK_BULK && is_bulk_op())' in Diagnostics_area::set_ok_status or unexpected ER_RANGE_NOT_INCREASING_ERROR
+--echo #
create or replace table t1 (a int) with system versioning
-partition by system_time limit 2 (
- partition p1 history, partition p2 history,
- partition p3 history, partition pn current);
+partition by system_time limit 2 partitions 4;
insert into t1 values (1),(2),(3);
update t1 set a = 4;
delete from t1;
delete from t1 where a is not null;
+--echo #
--echo # MDEV-14823 Wrong error message upon selecting from a system_time partition
-create or replace table t1 (i int) with system versioning partition by system_time limit 10 (partition p0 history, partition pn current);
+--echo #
+create or replace table t1 (i int) with system versioning partition by system_time limit 10;
--error ER_VERS_QUERY_IN_PARTITION
select * from t1 partition (p0) for system_time all;
--echo # MDEV-18929 2nd execution of SP does not detect ER_VERS_NOT_VERSIONED
@@ -455,7 +737,9 @@ call sp;
call sp;
drop procedure sp;
+--echo #
--echo # MDEV-15380 Index for versioned table gets corrupt after partitioning and DELETE
+--echo #
create or replace table t1 (pk int primary key)
engine=myisam
with system versioning
@@ -473,21 +757,19 @@ set timestamp=1523466002.799571;
insert into t1 values (11),(12);
set timestamp=1523466004.169435;
delete from t1 where pk in (11, 12);
-set timestamp= default;
--echo #
--echo # MDEV-18136 Server crashes in Item_func_dyncol_create::prepare_arguments
--echo #
create or replace table t1 (pk int) with system versioning
-partition by system_time interval 7 second (
- partition ver_p1 history,
- partition ver_pn current);
+partition by system_time interval 7 second;
alter table t1
partition by system_time interval column_get(column_create(7,7), 7 as int) second (
partition ver_p1 history,
partition ver_pn current);
--replace_result $default_engine DEFAULT_ENGINE
show create table t1;
+set timestamp= default;
--echo #
--echo # MDEV-19175 Server crashes in ha_partition::vers_can_native upon INSERT DELAYED into versioned partitioned table
@@ -514,6 +796,22 @@ unlock tables;
create or replace table t1 (pk int primary key) with system versioning partition by system_time limit 100 (partition p1 history, partition pn current);
execute immediate 'select * from t1 for update';
+--echo #
+--echo # MDEV-19903 Setup default partitions for system versioning
+--echo #
+create or replace table t1 (x int) with system versioning partition by system_time;
+--replace_result $default_engine DEFAULT_ENGINE
+show create table t1;
+--echo # 2 partitions are created: p0 and pn
+select PARTITION_NAME, PARTITION_METHOD, PARTITION_DESCRIPTION from information_schema.partitions where table_name = 't1' order by PARTITION_NAME;
+
+create or replace table t1 (x int) with system versioning partition by system_time limit 10 partitions 4;
+--replace_result $default_engine DEFAULT_ENGINE
+show create table t1;
+--echo # 4 partitions are created: p0, p1, p2 and pn
+select PARTITION_NAME, PARTITION_METHOD, PARTITION_DESCRIPTION from information_schema.partitions where table_name = 't1' order by PARTITION_NAME;
+
+--echo # Test cleanup
drop view v1;
drop tables t, t1, t2, t3, t4;
@@ -631,10 +929,8 @@ drop table t1;
--echo # MDEV-22112 Assertion `tab_part_info->part_type == RANGE_PARTITION || tab_part_info->part_type == LIST_PARTITION' failed in prep_alter_part_table
--echo #
-### TMP: Please remove this error check in 10.5 (MDEV-19903)
---error ER_PARTITIONS_MUST_BE_DEFINED_ERROR
create table t1 (a int) with system versioning partition by system_time;
-### TMP end
+drop table t1;
create table t1 (a int) with system versioning partition by system_time
(partition p1 history, partition pn current);
@@ -739,6 +1035,67 @@ replace into t1 values (1);
# cleanup
drop table t1;
+--echo #
+--echo # MDEV-18794 Assertion `!m_innodb' failed in ha_partition::cmp_ref upon SELECT from partitioned table
+--echo #
+create or replace table t1 (pk int auto_increment, i int, c char(1), primary key (pk), key(i))
+engine=innodb with system versioning partition by key() partitions 2;
+insert into t1 (i, c) values (1, 'a'), (2, 'b'), (null, 'c'), (null, 'b');
+alter table t1 drop system versioning;
+replace into t1 select * from t1;
+select * from t1 where i > 0 or pk = 1000 limit 1;
+drop table t1;
+
--echo # End of 10.4 tests
+--echo #
+--echo # MDEV-22153 ALTER add default history partitions makes table inaccessible
+--echo #
+create or replace table t1 (x int) with system versioning partition by system_time;
+alter table t1 add partition partitions 1;
+--replace_result $default_engine DEFAULT_ENGINE
+show create table t1;
+alter table t1 add partition partitions 2;
+--replace_result $default_engine DEFAULT_ENGINE
+show create table t1;
+alter table t1 add partition partitions 3;
+--replace_result $default_engine DEFAULT_ENGINE
+show create table t1;
+drop tables t1;
+
+--echo #
+--echo # MDEV-22207 Drop default history partitions renders table inaccessible
+--echo #
+create or replace table t1 (i int) with system versioning
+partition by system_time limit 1 partitions 5;
+
+alter table t1 drop partition p0, p2;
+--replace_result $default_engine DEFAULT_ENGINE
+show create table t1;
+alter table t1 add partition partitions 1;
+--replace_result $default_engine DEFAULT_ENGINE
+show create table t1;
+
+drop tables t1;
+
+--echo #
+--echo # MDEV-22155 ALTER add default history partitions name clash on non-default partitions
+--echo #
+create or replace table t1 (x int) with system versioning
+partition by system_time limit 1
+(partition p2 history, partition p8 history, partition pn current);
+alter table t1 add partition partitions 1;
+alter table t1 add partition partitions 2;
+--replace_result $default_engine DEFAULT_ENGINE
+show create table t1;
+alter table t1 add partition partitions 8;
+--replace_result $default_engine DEFAULT_ENGINE
+show create table t1;
+
+drop tables t1;
+
+--echo #
+--echo # End of 10.5 tests
+--echo #
+
--source suite/versioning/common_finish.inc
diff --git a/mysql-test/suite/versioning/t/partition_innodb.test b/mysql-test/suite/versioning/t/partition_innodb.test
deleted file mode 100644
index e09a684961e..00000000000
--- a/mysql-test/suite/versioning/t/partition_innodb.test
+++ /dev/null
@@ -1,93 +0,0 @@
---source include/have_innodb.inc
---source include/have_partition.inc
---source suite/versioning/common.inc
-
---echo # MDEV-15951 system versioning by trx id doesn't work with partitioning
---echo # currently trx_id does not support partitioning by system_time
---error ER_VERS_FIELD_WRONG_TYPE
-create or replace table t1(
- i int,
- row_start bigint unsigned generated always as row start,
- row_end bigint unsigned generated always as row end,
- period for system_time(row_start, row_end)
-) engine=InnoDB with system versioning partition by system_time (
- partition p0 history,
- partition pn current
-);
-
-create or replace table t1(
- i int,
- row_start bigint unsigned generated always as row start,
- row_end bigint unsigned generated always as row end,
- period for system_time(row_start, row_end)
-) engine=InnoDB with system versioning;
-
---error ER_VERS_FIELD_WRONG_TYPE
-alter table t1 partition by system_time (
- partition p0 history,
- partition pn current
-);
-
-drop table t1;
-
---error ER_VERS_TRX_PART_HISTORIC_ROW_NOT_SUPPORTED
-create or replace table t (
- a int primary key,
- row_start bigint unsigned as row start invisible,
- row_end bigint unsigned as row end invisible,
- period for system_time(row_start, row_end)
-) engine=innodb with system versioning
-partition by key() (
- partition p1,
- partition p2
-);
-
---error ER_VERS_TRX_PART_HISTORIC_ROW_NOT_SUPPORTED
-create or replace table t (
- a int primary key,
- row_start bigint unsigned as row start invisible,
- row_end bigint unsigned as row end invisible,
- period for system_time(row_start, row_end)
-) engine=innodb with system versioning
-partition by key(a, row_start) (
- partition p1,
- partition p2
-);
-
---error ER_VERS_TRX_PART_HISTORIC_ROW_NOT_SUPPORTED
-create or replace table t (
- a int primary key,
- row_start bigint unsigned as row start invisible,
- row_end bigint unsigned as row end invisible,
- period for system_time(row_start, row_end)
-) engine=innodb with system versioning
-partition by hash(a + row_end * 2) (
- partition p1,
- partition p2
-);
-
---error ER_VERS_TRX_PART_HISTORIC_ROW_NOT_SUPPORTED
-create or replace table t (
- a int primary key,
- row_start bigint unsigned as row start invisible,
- row_end bigint unsigned as row end invisible,
- period for system_time(row_start, row_end)
-) engine=innodb with system versioning
-partition by range columns (a, row_start) (
- partition p1 values less than (100, 100)
-);
-
---echo #
---echo # MDEV-18794 Assertion `!m_innodb' failed in ha_partition::cmp_ref upon SELECT from partitioned table
---echo #
-create or replace table t1 (pk int auto_increment, i int, c char(1), primary key (pk), key(i))
-engine=innodb with system versioning partition by key() partitions 2;
-insert into t1 (i, c) values (1, 'a'), (2, 'b'), (null, 'c'), (null, 'b');
-alter table t1 drop system versioning;
-replace into t1 select * from t1;
-select * from t1 where i > 0 or pk = 1000 limit 1;
-drop table t1;
-
---echo # End of 10.3 tests
-
---source suite/versioning/common_finish.inc
diff --git a/mysql-test/suite/versioning/t/partition_rotation.test b/mysql-test/suite/versioning/t/partition_rotation.test
deleted file mode 100644
index efcd393c7e0..00000000000
--- a/mysql-test/suite/versioning/t/partition_rotation.test
+++ /dev/null
@@ -1,58 +0,0 @@
---source include/have_partition.inc
-
-#
-# partition rotation
-#
-set timestamp=unix_timestamp('2001-02-03 10:20:30');
-create or replace table t1 (i int) with system versioning
-partition by system_time interval 1 day
- subpartition by key (i) subpartitions 2
- (partition p1 history, partition pn current);
-set timestamp=unix_timestamp('2001-02-03 10:20:40');
-insert t1 values (1); delete from t1;
-set timestamp=unix_timestamp('2001-02-04 10:20:50');
-insert t1 values (2); delete from t1;
-
-select subpartition_name,partition_description,table_rows from information_schema.partitions where table_schema='test' and table_name='t1';
-
-set timestamp=unix_timestamp('2001-02-04 10:20:55');
-alter table t1 add partition (partition p0 history, partition p2 history);
-set timestamp=unix_timestamp('2001-02-04 10:30:00');
-insert t1 values (4),(5);
-set timestamp=unix_timestamp('2001-02-04 10:30:10');
-update t1 set i=6 where i=5;
-
-select subpartition_name,partition_description,table_rows from information_schema.partitions where table_schema='test' and table_name='t1';
-
---echo ## pruning check
-set @ts=(select partition_description from information_schema.partitions
- where table_schema='test' and table_name='t1' and partition_name='p0' limit 1);
---sorted_result
-select * from t1;
-explain partitions select * from t1;
---replace_column 10 #
-explain partitions select * from t1 for system_time as of '2001-02-04 10:20:30';
-set @ts=(select row_end from t1 for system_time all where i=1);
-select * from t1 for system_time all where row_end = @ts;
---replace_column 5 # 10 # 11 #
-explain partitions select * from t1 for system_time all where row_end = @ts;
-
---echo #
---echo # MDEV-16023 Unfortunate error message WARN_VERS_PART_FULL
---echo #
-
-set timestamp= unix_timestamp('2020-07-29 10:30:10');
-create or replace table t1 (a int) with system versioning
- partition by system_time interval 1 second (
- partition p0 history,
- partition p1 history,
- partition pc current
- );
-
-set timestamp= unix_timestamp('2020-07-29 10:30:14');
-insert into t1 values (1),(2),(3);
-show warnings;
-
---echo # Cleanup
-set timestamp= default;
-drop table t1;
diff --git a/mysql-test/suite/versioning/t/select.test b/mysql-test/suite/versioning/t/select.test
index 1d5d0f323be..d2615940ac8 100644
--- a/mysql-test/suite/versioning/t/select.test
+++ b/mysql-test/suite/versioning/t/select.test
@@ -55,8 +55,8 @@ select x as ALL_x, y from t1 for system_time all;
--disable_query_log
if ($MTR_COMBINATION_TRX_ID)
{
- select x as ASOF2_x, y from t1 for system_time as of @x0;
- select x as FROMTO2_x, y from t1 for system_time from @x0 to @x1;
+ select x as ASOF2_x, y from t1 for system_time as of transaction @x0;
+ select x as FROMTO2_x, y from t1 for system_time from transaction @x0 to transaction @x1;
select x as BETWAND2_x, y from t1 for system_time between transaction @x0 and transaction @x1;
}
if ($MTR_COMBINATION_TIMESTAMP)
@@ -269,9 +269,8 @@ select x from t1 for system_time as of timestamp @ts;
--echo ## TRANSACTION specifier
select x from t1 for system_time as of transaction @trx_start;
---echo ## no specifier (auto-detection)
+--echo ## no specifier (defaults to timestamp)
select x from t1 for system_time as of @ts;
-select x from t1 for system_time as of @trx_start;
--echo ### Issue #365, bug 4 (related to #226, optimized fields)
create or replace table t1 (i int, b int) with system versioning;
@@ -385,6 +384,12 @@ insert into t1 values (1);
delete from t1;
select row_start from t1 for system_time all into @t1;
select row_end from t1 for system_time all into @t2;
+--disable_query_log
+if($MTR_COMBINATION_TRX_ID) {
+ set @t1= trt_begin_ts(@t1);
+ set @t2= trt_commit_ts(@t2);
+}
+--enable_query_log
select * from t1 for system_time between @t1 and @t2;
select * from t1 for system_time between @t2 and @t1;
select * from t1 for system_time from @t1 to @t2;
diff --git a/mysql-test/suite/versioning/t/select2.test b/mysql-test/suite/versioning/t/select2.test
index 7ede218cabf..1ab7bcf27c1 100644
--- a/mysql-test/suite/versioning/t/select2.test
+++ b/mysql-test/suite/versioning/t/select2.test
@@ -41,14 +41,14 @@ select x as BETWAND_x, y from t1 for system_time between '1970-01-01 00:00' and
select x as ALL_x, y from t1 for system_time all;
if($MTR_COMBINATION_TRX_ID) {
- select x as ASOF2_x, y from t1 for system_time as of @x0;
- select x as FROMTO2_x, y from t1 for system_time from @x0 to @x1;
+ select x as ASOF2_x, y from t1 for system_time as of transaction @x0;
+ select x as FROMTO2_x, y from t1 for system_time from transaction @x0 to transaction @x1;
select x as BETWAND2_x, y from t1 for system_time between transaction @x0 and transaction @x1;
}
if(!$MTR_COMBINATION_TRX_ID) {
select x as ASOF2_x, y from t1 for system_time as of @t0;
select x as FROMTO2_x, y from t1 for system_time from '1970-01-01 00:00' to @t1;
- select x as BETWAND2_x, y from t1 for system_time between timestamp '1970-01-01 00:00' and timestamp @t1;
+ select x as BETWAND2_x, y from t1 for system_time between '1970-01-01 00:00' and timestamp @t1;
}
drop table t1;
diff --git a/mysql-test/suite/versioning/t/trx_id.test b/mysql-test/suite/versioning/t/trx_id.test
index 08f183536f6..7c22aa2a8be 100644
--- a/mysql-test/suite/versioning/t/trx_id.test
+++ b/mysql-test/suite/versioning/t/trx_id.test
@@ -240,18 +240,18 @@ SELECT * FROM t2 FOR SYSTEM_TIME AS OF (1,1);
--echo #
--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION
-SELECT * FROM t1 FOR SYSTEM_TIME AS OF RAND();
+SELECT * FROM t1 FOR SYSTEM_TIME AS OF TRANSACTION RAND();
--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION
-SELECT * FROM t1 FOR SYSTEM_TIME AS OF (RAND());
+SELECT * FROM t1 FOR SYSTEM_TIME AS OF TRANSACTION (RAND());
--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION
-SELECT * FROM t1 FOR SYSTEM_TIME AS OF COALESCE(RAND());
+SELECT * FROM t1 FOR SYSTEM_TIME AS OF TRANSACTION COALESCE(RAND());
--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION
-SELECT * FROM t2 FOR SYSTEM_TIME AS OF RAND();
+SELECT * FROM t2 FOR SYSTEM_TIME AS OF TRANSACTION RAND();
--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION
-SELECT * FROM t2 FOR SYSTEM_TIME AS OF (RAND());
+SELECT * FROM t2 FOR SYSTEM_TIME AS OF TRANSACTION (RAND());
--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION
-SELECT * FROM t2 FOR SYSTEM_TIME AS OF COALESCE(RAND());
+SELECT * FROM t2 FOR SYSTEM_TIME AS OF TRANSACTION COALESCE(RAND());
--echo #
@@ -259,14 +259,14 @@ SELECT * FROM t2 FOR SYSTEM_TIME AS OF COALESCE(RAND());
--echo #
--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION
-SELECT * FROM t1 FOR SYSTEM_TIME AS OF 10.1;
+SELECT * FROM t1 FOR SYSTEM_TIME AS OF TRANSACTION 10.1;
--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION
-SELECT * FROM t1 FOR SYSTEM_TIME AS OF COALESCE(10.1);
+SELECT * FROM t1 FOR SYSTEM_TIME AS OF TRANSACTION COALESCE(10.1);
--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION
-SELECT * FROM t2 FOR SYSTEM_TIME AS OF 10.1;
+SELECT * FROM t2 FOR SYSTEM_TIME AS OF TRANSACTION 10.1;
--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION
-SELECT * FROM t2 FOR SYSTEM_TIME AS OF COALESCE(10.1);
+SELECT * FROM t2 FOR SYSTEM_TIME AS OF TRANSACTION COALESCE(10.1);
--echo #
@@ -277,7 +277,7 @@ DELIMITER $$;
--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION
BEGIN NOT ATOMIC
DECLARE var YEAR;
- SELECT * FROM t1 FOR SYSTEM_TIME AS OF var;
+ SELECT * FROM t1 FOR SYSTEM_TIME AS OF TRANSACTION var;
END;
$$
DELIMITER ;$$
@@ -286,7 +286,7 @@ DELIMITER $$;
--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION
BEGIN NOT ATOMIC
DECLARE var YEAR;
- SELECT * FROM t2 FOR SYSTEM_TIME AS OF var;
+ SELECT * FROM t2 FOR SYSTEM_TIME AS OF TRANSACTION var;
END;
$$
DELIMITER ;$$
@@ -300,7 +300,7 @@ DELIMITER $$;
--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION
BEGIN NOT ATOMIC
DECLARE var ENUM('xxx') DEFAULT 'xxx';
- SELECT * FROM t1 FOR SYSTEM_TIME AS OF var;
+ SELECT * FROM t1 FOR SYSTEM_TIME AS OF TRANSACTION var;
END;
$$
DELIMITER ;$$
@@ -310,7 +310,7 @@ DELIMITER $$;
--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION
BEGIN NOT ATOMIC
DECLARE var ENUM('xxx') DEFAULT 'xxx';
- SELECT * FROM t2 FOR SYSTEM_TIME AS OF var;
+ SELECT * FROM t2 FOR SYSTEM_TIME AS OF TRANSACTION var;
END;
$$
DELIMITER ;$$
@@ -324,7 +324,7 @@ DELIMITER $$;
--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION
BEGIN NOT ATOMIC
DECLARE var SET('xxx') DEFAULT 'xxx';
- SELECT * FROM t1 FOR SYSTEM_TIME AS OF var;
+ SELECT * FROM t1 FOR SYSTEM_TIME AS OF TRANSACTION var;
END;
$$
DELIMITER ;$$
@@ -333,29 +333,17 @@ DELIMITER $$;
--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION
BEGIN NOT ATOMIC
DECLARE var SET('xxx') DEFAULT 'xxx';
- SELECT * FROM t2 FOR SYSTEM_TIME AS OF var;
+ SELECT * FROM t2 FOR SYSTEM_TIME AS OF TRANSACTION var;
END;
$$
DELIMITER ;$$
---echo #
---echo # BIT is resolved to TRANSACTION
---echo #
-
-DELIMITER $$;
-BEGIN NOT ATOMIC
- DECLARE var BIT(10);
- SELECT * FROM t1 FOR SYSTEM_TIME AS OF var;
-END;
-$$
-DELIMITER ;$$
-
DELIMITER $$;
--error ER_VERS_ENGINE_UNSUPPORTED
BEGIN NOT ATOMIC
DECLARE var BIT(10);
- SELECT * FROM t2 FOR SYSTEM_TIME AS OF var;
+ SELECT * FROM t2 FOR SYSTEM_TIME AS OF TRANSACTION var;
END;
$$
DELIMITER ;$$
@@ -367,27 +355,6 @@ DELIMITER ;$$
SELECT * FROM t1 FOR SYSTEM_TIME AS OF '2038-12-30 00:00:00';
SELECT * FROM t2 FOR SYSTEM_TIME AS OF '2038-12-30 00:00:00';
-
-
---echo #
---echo # HEX hybrids resolve to TRANSACTION
---echo #
-
---error ER_VERS_NO_TRX_ID
-SELECT * FROM t1 FOR SYSTEM_TIME AS OF (0xFFFFFFFF);
---error ER_VERS_ENGINE_UNSUPPORTED
-SELECT * FROM t2 FOR SYSTEM_TIME AS OF (0xFFFFFFFF);
-
-
---echo #
---echo # BIT literals resolve to TRANSACTION
---echo #
-
---error ER_VERS_NO_TRX_ID
-SELECT * FROM t1 FOR SYSTEM_TIME AS OF (b'11111111111111111111111111111111');
---error ER_VERS_ENGINE_UNSUPPORTED
-SELECT * FROM t2 FOR SYSTEM_TIME AS OF (b'11111111111111111111111111111111');
-
DROP TABLE t1, t2;
@@ -416,9 +383,9 @@ CREATE TABLE tts
SELECT * FROM tts FOR SYSTEM_TIME AS OF fts();
--error ER_VERS_ENGINE_UNSUPPORTED
-SELECT * FROM tts FOR SYSTEM_TIME AS OF ftx();
+SELECT * FROM tts FOR SYSTEM_TIME AS OF TRANSACTION ftx();
SELECT * FROM ttx FOR SYSTEM_TIME AS OF fts();
-SELECT * FROM ttx FOR SYSTEM_TIME AS OF ftx();
+SELECT * FROM ttx FOR SYSTEM_TIME AS OF TRANSACTION ftx();
DROP TABLE tts;
DROP TABLE ttx;
diff --git a/mysql-test/suite/wsrep/r/MDEV-23466.result b/mysql-test/suite/wsrep/r/MDEV-23466.result
index 6d167c9c95e..a019704d7d3 100644
--- a/mysql-test/suite/wsrep/r/MDEV-23466.result
+++ b/mysql-test/suite/wsrep/r/MDEV-23466.result
@@ -1,3 +1,3 @@
SELECT WSREP_LAST_SEEN_GTID();
WSREP_LAST_SEEN_GTID()
-00000000-0000-0000-0000-000000000000:-1
+0-0-0
diff --git a/mysql-test/suite/wsrep/r/variables.result b/mysql-test/suite/wsrep/r/variables.result
index c8174930840..c21e4dc0323 100644
--- a/mysql-test/suite/wsrep/r/variables.result
+++ b/mysql-test/suite/wsrep/r/variables.result
@@ -104,6 +104,7 @@ WSREP_DRUPAL_282555_WORKAROUND
WSREP_FORCED_BINLOG_FORMAT
WSREP_GTID_DOMAIN_ID
WSREP_GTID_MODE
+WSREP_GTID_SEQ_NO
WSREP_IGNORE_APPLY_ERRORS
WSREP_LOAD_DATA_SPLITTING
WSREP_LOG_CONFLICTS
@@ -134,6 +135,7 @@ WSREP_SST_DONOR_REJECTS_QUERIES
WSREP_SST_METHOD
WSREP_SST_RECEIVE_ADDRESS
WSREP_START_POSITION
+WSREP_STRICT_DDL
WSREP_SYNC_WAIT
WSREP_TRX_FRAGMENT_SIZE
WSREP_TRX_FRAGMENT_UNIT
diff --git a/mysql-test/suite/wsrep/r/variables_debug.result b/mysql-test/suite/wsrep/r/variables_debug.result
index fe2bffb3f08..65f5b0ee274 100644
--- a/mysql-test/suite/wsrep/r/variables_debug.result
+++ b/mysql-test/suite/wsrep/r/variables_debug.result
@@ -105,6 +105,7 @@ WSREP_DRUPAL_282555_WORKAROUND
WSREP_FORCED_BINLOG_FORMAT
WSREP_GTID_DOMAIN_ID
WSREP_GTID_MODE
+WSREP_GTID_SEQ_NO
WSREP_IGNORE_APPLY_ERRORS
WSREP_LOAD_DATA_SPLITTING
WSREP_LOG_CONFLICTS
@@ -135,6 +136,7 @@ WSREP_SST_DONOR_REJECTS_QUERIES
WSREP_SST_METHOD
WSREP_SST_RECEIVE_ADDRESS
WSREP_START_POSITION
+WSREP_STRICT_DDL
WSREP_SYNC_WAIT
WSREP_TRX_FRAGMENT_SIZE
WSREP_TRX_FRAGMENT_UNIT
diff --git a/mysql-test/unstable-tests b/mysql-test/unstable-tests
index a76912f4c78..c22ded07f2f 100644
--- a/mysql-test/unstable-tests
+++ b/mysql-test/unstable-tests
@@ -23,166 +23,206 @@
#
##############################################################################
#
-# Based on bb-10.4-release d348555cd (MDEV-23328 Server hang due to Galera lock conflict resolution)
+# Based on bb-10.5-release ae7989ca2 (galera.galera_gra_log crashes)
# for main suite changes and failures, and
-# bb-10.4-release 80c951ce2875aac521b82323b5b6ebf638593445
+# 10.5 8e1e2856f2523c225a81840059e93fa9f61fbacf
# for the rest
-
-main.alter_table_trans : MDEV-12084 - timeout
-main.analyze_stmt_slow_query_log : MDEV-12237 - Wrong result
-main.auth_named_pipe : MDEV-14724 - System error 2
-main.auto_increment_ranges_innodb : Modified in 10.4.18
-main.backup_stages : MDEV-23401 - Bad file descriptor
-main.binary_to_hex : MDEV-20211 - Wrong result
-main.check_constraint : Modified in 10.4.18
-main.connect : MDEV-17282 - Wrong result
-main.connect2 : MDEV-13885 - Server crash
-main.create : Modified in 10.4.18
-main.create_delayed : MDEV-10605 - failed with timeout
-main.create_drop_event : MDEV-16271 - Wrong result
-main.cte_nonrecursive : Modified in 10.4.18
-main.cte_nonrecursive_not_embedded : Added in 10.4.18
-main.cte_recursive : Modified in 10.4.18
-main.ctype_binary : MDEV-24080 - Data too long for column
-main.ctype_cp932_binlog_stm : MDEV-20534 - Wrong result
-main.ctype_ucs : MDEV-17681 - Data too long for column
-main.ctype_upgrade : MDEV-16945 - Error upon mysql_upgrade
-main.ctype_utf16 : MDEV-10675: timeout or extra warnings
-main.ctype_utf16le : MDEV-10675: timeout or extra warnings
-main.ctype_utf8mb4 : Modified in 10.4.18
-main.ctype_utf8mb4_heap : Include file modified in 10.4.18
-main.ctype_utf8mb4_innodb : MDEV-17744 - Timeout; MDEV-18567 - ASAN use-after-poison; include file modified in 10.4.18
-main.ctype_utf8mb4_myisam : Include file modified in 10.4.18
-main.debug_sync : MDEV-10607 - internal error
-main.delayed : MDEV-20961 - Assertion failure
-main.derived_cond_pushdown : MDEV-20532 - Floating point differences; modified in 10.4.18
-main.dirty_close : MDEV-19368 - mysqltest failed but provided no output
-main.distinct : MDEV-14194 - Crash
-main.drop_bad_db_type : MDEV-15676 - Wrong result
-main.dyncol : MDEV-19455 - Extra warning
-main.empty_string_literal : Modified in 10.4.18
-main.events_2 : MDEV-13277 - Crash
-main.events_bugs : MDEV-12892 - Crash
-main.events_restart : MDEV-12236 - Server shutdown problem
-main.events_slowlog : MDEV-12821 - Wrong result
-main.flush : MDEV-19368 - mysqltest failed but provided no output
-main.flush_ssl : MDEV-21276 - Aria recovery failure
-main.func_gconcat : MDEV-21379 - Valgrind warnings; modified in 10.4.18
-main.func_like : Modified in 10.4.18
-main.func_math : MDEV-20966 - Wrong error code
-main.gis : MDEV-13411 - wrong result on P8
-main.gis-json : Modified in 10.4.18
-main.gis_notembedded : MDEV-21264 - Wrong result with non-default charset
-main.group_by : Modified in 10.4.18
-main.host_cache_size_functionality : MDEV-10606 - sporadic failure on shutdown
-main.index_intersect_innodb : MDEV-10643 - failed with timeout
-main.index_merge_innodb : MDEV-7142 - Plan mismatch
-main.information_schema : Modified in 10.4.18
-main.innodb_icp : MDEV-20168 - Wrong execution plans
-main.innodb_mrr_cpk : MDEV-24737 - Server crash
-main.invisible_field_grant_completely : MDEV-22254 - Syscall param write points to uninitialised bytes
-main.ipv4_and_ipv6 : MDEV-20964 - Wrong result
-main.ipv6 : MDEV-20964 - Wrong result
-main.join_cache : MDEV-17743 - Bad address from storage engine MyISAM
-main.kill : MDEV-24801 - Wrong errno on reap; modified in 10.4.18
-main.kill-2 : MDEV-13257 - Wrong result
-main.kill_processlist-6619 : MDEV-10793 - Wrong result
-main.loaddata : MDEV-19368 - mysqltest failed but provided no output
-main.locale : MDEV-20521 - Missing warning
-main.lock_tables_lost_commit : MDEV-24624 - Timeout
-main.lock_user : Modified in 10.4.18
-main.lock_view : Modified in 10.4.18
-main.log_slow : MDEV-13263 - Wrong result
-main.log_tables-big : MDEV-13408 - wrong result
-main.log_tables_upgrade : MDEV-20962 - Wrong result
-main.mdev-504 : MDEV-15171 - warning
-main.mdev375 : MDEV-10607 - sporadic "can't connect"
-main.merge : MDEV-10607 - sporadic "can't connect"
-main.myisam : Modified in 10.4.18
-main.mysql : MDEV-20156 - Wrong result
-main.mysql_client_test : MDEV-19369 - error: 5888, status: 23, errno: 2; MDEV-19511 - Big endian issue
-main.mysql_client_test_comp : MDEV-16641 - Error in exec
-main.mysql_client_test_nonblock : CONC-208 - Error on Power; MDEV-15096 - exec failed
-main.mysql_cp932 : MDEV-21275 - Wrong result
-main.mysql_upgrade : MDEV-20161 - Wrong result; MDEV-20166 - FATAL ERROR: Upgrade failed; modified in 10.4.18
-main.mysql_upgrade-6984 : MDEV-22514 - Wrong result
-main.mysql_upgrade_no_innodb : MDEV-20537 - Wrong result
-main.mysql_upgrade_noengine : MDEV-14355 - Wrong result
-main.mysql_upgrade_view : MDEV-20161 - Wrong result; MDEV-23392 - Wrong result
-main.mysqladmin : MDEV-20535 - Wrong result
-main.mysqlcheck : MDEV-20164 - Wrong result
-main.mysqld_option_err : MDEV-21236 - Wrong error; MDEV-21571 - Crash on bootstrap
-main.mysqldump : Modified in 10.4.18
-main.mysqldump-max : MDEV-21272 - Wrong result
-main.mysqldump-system : Modified in 10.4.18
-main.mysqlshow : MDEV-20965 - Wrong result
-main.mysqlslap : MDEV-11801 - timeout
-main.mysqltest : MDEV-13887 - Wrong result
-main.old-mode : MDEV-19373 - Wrong result
-main.openssl_6975 : MDEV-17184 - Failures with OpenSSL 1.1.1
-main.order_by : Modified in 10.4.18
-main.order_by_optimizer_innodb : MDEV-10683 - Wrong result
-main.parser : Modified in 10.4.18
-main.partition_debug_sync : MDEV-15669 - Deadlock found when trying to get lock
-main.partition_innodb : MDEV-20169 - Wrong result; MDEV-23427 - Server crash
-main.partition_innodb_plugin : MDEV-12901 - Valgrind warnings
-main.partition_innodb_semi_consistent : MDEV-19411 - Failed to start mysqld.1
-main.plugin_auth : MDEV-20957 - Upgrade file was not properly created
-main.plugin_auth_qa_2 : MDEV-20165 - Wrong result
-main.pool_of_threads : MDEV-18135 - SSL error: key too small
-main.precedence : Modified in 10.4.18
-main.processlist_notembedded : MDEV-23752 - Not explainable command; modified in 10.4.18
-main.ps : MDEV-11017 - sporadic wrong Prepared_stmt_count
-main.ps_error : MDEV-24079 - Memory not freed
-main.ps_show_log : Added in 10.4.18
-main.query_cache : MDEV-16180 - Wrong result; modified in 10.4.18
-main.query_cache_debug : MDEV-15281 - Query cache is disabled
-main.range : Modified in 10.4.18
-main.range_innodb : MDEV-23371 - Server crash
-main.range_notembedded : Added in 10.4.18
-main.range_vs_index_merge_innodb : MDEV-15283 - Server has gone away
-main.rowid_filter_innodb : MDEV-20538 - Wrong result
-main.select : MDEV-20532 - Floating point differences
-main.select_jcl6 : MDEV-20532 - Floating point differences
-main.select_pkeycache : MDEV-20532 - Floating point differences
-main.set_password : Modified in 10.4.18
-main.set_statement : MDEV-13183 - Wrong result
-main.set_statement_notembedded : MDEV-19414 - Wrong result
-main.shm : MDEV-12727 - Mismatch, ERROR 2013
-main.show_explain : MDEV-10674 - Wrong result code
-main.skip_grants : Modified in 10.4.18
-main.sp : MDEV-7866 - Mismatch; modified in 10.4.18
-main.sp-security : MDEV-10607 - sporadic "can't connect"
-main.sp-ucs2 : Modified in 10.4.18
-main.sp_notembedded : MDEV-10607 - internal error
-main.ssl : MDEV-17184 - Failures with OpenSSL 1.1.1
-main.ssl_7937 : MDEV-20958 - Wrong result
-main.ssl_ca : MDEV-10895 - SSL connection error on Power
-main.ssl_cipher : MDEV-17184 - Failures with OpenSSL 1.1.1
-main.ssl_timeout : MDEV-11244 - Crash
-main.stat_tables : Modified in 10.4.18
-main.stat_tables_par_innodb : MDEV-14155 - Wrong rounding
-main.status : MDEV-13255 - Wrong result
-main.subselect : MDEV-20551 - Valgrind failure
-main.subselect4 : Modified in 10.4.18
-main.subselect_innodb : MDEV-10614 - Wrong result
-main.table_value_constr : Modified in 10.4.18
-main.tc_heuristic_recover : MDEV-14189 - Wrong result
-main.temp_table_symlink : MDEV-24058 - Wrong error code
-main.type_blob : MDEV-15195 - Wrong result
-main.type_datetime_hires : MDEV-10687 - Timeout
-main.type_float : MDEV-20532 - Floating point differences
-main.type_newdecimal : MDEV-20532 - Floating point differences
-main.type_ranges : MDEV-20532 - Floating point differences
-main.type_temporal_innodb : MDEV-24025 - Wrong result
-main.type_year : Modified in 10.4.18
-main.union : Modified in 10.4.18
-main.user_limits : Modified in 10.4.18
-main.userstat : MDEV-12904 - SSL errors
-main.view : Modified in 10.4.18
-main.wait_timeout : MDEV-19023 - Lost connection to MySQL server during query
-main.xa : MDEV-11769 - lock wait timeout; modified in 10.4.18
+main.alter_events : Added in 10.5.9
+main.alter_table_mdev539_maria : MDEV-23922 - Timeout or crash
+main.alter_table_trans : MDEV-12084 - timeout
+main.alter_user : Modified in 10.5.9
+main.analyze_stmt_slow_query_log : MDEV-12237 - Wrong result
+main.auth_named_pipe : MDEV-14724 - System error 2
+main.auto_increment_ranges_innodb : Modified in 10.5.9
+main.backup_stages : MDEV-23401 - Bad file descriptor
+main.binary_to_hex : MDEV-20211 - Wrong result
+main.check_constraint : Modified in 10.5.9
+main.client_xml : MDEV-24085 - Wrong result
+main.column_compression : MDEV-23954 - Wrong result
+main.connect : MDEV-17282 - Wrong result
+main.connect-abstract : MDEV-20162 - Could not execute 'check-testcase'
+main.connect2 : MDEV-13885 - Server crash
+main.create : Modified in 10.5.9
+main.create_delayed : MDEV-10605 - failed with timeout
+main.create_drop_event : MDEV-16271 - Wrong result
+main.create_or_replace : MDEV-22954 - Wrong result
+main.cte_nonrecursive : Modified in 10.5.9
+main.cte_nonrecursive_not_embedded : Added in 10.5.9
+main.cte_recursive : Modified in 10.5.9
+main.ctype_binary : MDEV-24080 - Data too long for column
+main.ctype_cp932_binlog_row : MDEV-20540 - Wrong result
+main.ctype_cp932_binlog_stm : MDEV-20534 - Wrong result
+main.ctype_ucs : MDEV-17681 - Data too long for column
+main.ctype_upgrade : MDEV-16945 - Error upon mysql_upgrade
+main.ctype_utf16 : MDEV-10675 - Timeout or extra warnings
+main.ctype_utf16le : MDEV-10675 - Timeout or extra warnings
+main.ctype_utf8mb4 : Modified in 10.5.9
+main.ctype_utf8mb4_heap : Include file modified in 10.5.9
+main.ctype_utf8mb4_innodb : MDEV-17744 - Timeout; MDEV-18567 - ASAN use-after-poison; include file modified in 10.5.9
+main.ctype_utf8mb4_myisam : Include file modified in 10.5.9
+main.debug_sync : MDEV-10607 - internal error
+main.delayed : MDEV-20961 - Assertion failure
+main.derived_cond_pushdown : MDEV-20532 - Floating point differences; modified in 10.5.9
+main.dirty_close : MDEV-19368 - mysqltest failed but provided no output
+main.distinct : MDEV-14194 - Crash
+main.drop : Modified in 10.5.9
+main.drop_bad_db_type : MDEV-15676 - Wrong result
+main.dyncol : MDEV-19455 - Extra warning
+main.empty_string_literal : Modified in 10.5.9
+main.events_2 : MDEV-13277 - Crash
+main.events_bugs : MDEV-12892 - Crash
+main.events_restart : MDEV-12236 - Server shutdown problem
+main.events_slowlog : MDEV-12821 - Wrong result
+main.failed_auth_unixsocket : MDEV-23933 - Access denied
+main.flush : MDEV-19368 - mysqltest failed but provided no output
+main.flush_block_commit_notembedded : MDEV-23974 - InnoDB error
+main.flush_read_lock : MDEV-22953 - Unknown XID
+main.flush_ssl : MDEV-21276 - Aria recovery failure
+main.func_gconcat : MDEV-21379 - Valgrind warnings; modified in 10.5.9
+main.func_like : Modified in 10.5.9
+main.func_math : MDEV-20966 - Wrong error code
+main.func_str : Modified in 10.5.9
+main.gis : MDEV-13411 - wrong result on P8
+main.gis-json : Modified in 10.5.9
+main.gis_notembedded : MDEV-21264 - Wrong result with non-default charset
+main.grant : Modified in 10.5.9
+main.grant_kill : MDEV-23915 - Wrong result
+main.grant_slave_admin : Modified in 10.5.9
+main.grant_slave_monitor : Added in 10.5.9
+main.group_by : Modified in 10.5.9
+main.having : MDEV-23420 - Server crash
+main.host_cache_size_functionality : MDEV-10606 - sporadic failure on shutdown
+main.index_intersect : MDEV-23921 - Wrong result
+main.index_intersect_innodb : MDEV-23921 - Wrong result; MDEV-10643 - failed with timeout
+main.index_merge_innodb : MDEV-7142 - Plan mismatch
+main.information_schema : Modified in 10.5.9
+main.information_schema_all_engines : MDEV-23421 - Wrong result
+main.innodb_ext_key : MDEV-20169 - Wrong result
+main.innodb_icp : MDEV-20168 - Wrong execution plans
+main.innodb_mrr_cpk : MDEV-24737 - Server crash
+main.invisible_field_grant_completely : MDEV-22254 - Syscall param write points to uninitialised bytes
+main.ipv4_and_ipv6 : MDEV-20964 - Wrong result
+main.ipv6 : MDEV-20964 - Wrong result
+main.join_cache : MDEV-17743 - Bad address from storage engine MyISAM
+main.join_outer : MDEV-24456 - Timeout on riscv64
+main.join_outer_jcl6 : MDEV-24456 - Timeout on riscv64
+main.kill : MDEV-24801 - Wrong errno on reap; modified in 10.5.9
+main.kill-2 : MDEV-13257 - Wrong result
+main.kill_processlist-6619 : MDEV-10793 - Wrong result
+main.loaddata : MDEV-19368 - mysqltest failed but provided no output
+main.locale : MDEV-20521 - Missing warning
+main.lock_tables_lost_commit : MDEV-24624 - Timeout
+main.lock_user : Modified in 10.5.9
+main.lock_view : Modified in 10.5.9
+main.log_slow : MDEV-13263 - Wrong result
+main.log_tables-big : MDEV-13408 - wrong result
+main.log_tables_upgrade : MDEV-20962 - Wrong result
+main.mdev-504 : MDEV-15171 - warning
+main.mdev375 : MDEV-10607 - sporadic "can't connect"
+main.mdl : MDEV-22954 - Wrong result
+main.merge : MDEV-10607 - sporadic "can't connect"
+main.myisam : Modified in 10.5.9
+main.myisam_icp_notembedded : MDEV-23420 - Server crash
+main.mysql : MDEV-20156 - Wrong result
+main.mysql_client_test : MDEV-19369 - error: 5888, status: 23, errno: 2; MDEV-19511 - Big endian issue
+main.mysql_client_test_comp : MDEV-16641 - Error in exec
+main.mysql_client_test_nonblock : CONC-208 - Error on Power; MDEV-15096 - exec failed
+main.mysql_cp932 : MDEV-21275 - Wrong result
+main.mysql_json_mysql_upgrade : Added in 10.5.9
+main.mysql_json_mysql_upgrade_with_plugin_loaded : Added in 10.5.9
+main.mysql_json_table_recreate : Modified in 10.5.9
+main.mysql_upgrade : MDEV-20161 - Wrong result; MDEV-20166 - FATAL ERROR: Upgrade failed; modified in 10.5.9
+main.mysql_upgrade-6984 : MDEV-22514 - Wrong result
+main.mysql_upgrade_mysql_json_datatype : Modified in 10.5.9
+main.mysql_upgrade_no_innodb : MDEV-20537 - Wrong result
+main.mysql_upgrade_noengine : MDEV-14355 - Wrong result
+main.mysql_upgrade_to_100502 : Modified in 10.5.9
+main.mysql_upgrade_view : MDEV-23392 - Wrong result; MDEV-20161 - Wrong result
+main.mysqladmin : MDEV-20535 - Wrong result
+main.mysqlbinlog : Modified in 10.5.9
+main.mysqlbinlog_row_compressed : MDEV-22964 - Wrong result
+main.mysqlcheck : MDEV-20164 - Wrong result
+main.mysqld_option_err : MDEV-21236 - Wrong error; MDEV-21571 - Crash on bootstrap
+main.mysqldump : Modified in 10.5.9
+main.mysqldump-max : MDEV-21272 - Wrong result
+main.mysqldump-system : Added in 10.5.9
+main.mysqlshow : MDEV-20965 - Wrong result
+main.mysqlslap : MDEV-11801 - timeout
+main.mysqltest : MDEV-13887 - Wrong result
+main.old-mode : MDEV-19373 - Wrong result
+main.openssl_6975 : MDEV-17184 - Failures with OpenSSL 1.1.1
+main.order_by : Modified in 10.5.9
+main.order_by_optimizer_innodb : MDEV-10683 - Wrong result
+main.parser : Modified in 10.5.9
+main.partition_debug_sync : MDEV-15669 - Deadlock found when trying to get lock
+main.partition_innodb : MDEV-20169 - Wrong result; MDEV-23427 - Server crash
+main.partition_innodb_plugin : MDEV-12901 - Valgrind warnings
+main.partition_innodb_semi_consistent : MDEV-19411 - Failed to start mysqld.1
+main.plugin_auth : MDEV-20957 - Upgrade file was not properly created
+main.plugin_auth_qa_2 : MDEV-20165 - Wrong result
+main.pool_of_threads : MDEV-18135 - SSL error: key too small
+main.precedence : Modified in 10.5.9
+main.processlist_notembedded : MDEV-23752 - Not explainable command; modified in 10.5.9
+main.ps : MDEV-11017 - sporadic wrong Prepared_stmt_count
+main.ps_error : MDEV-24079 - Memory not freed
+main.ps_show_log : Added in 10.5.9
+main.query_cache : MDEV-16180 - Wrong result; modified in 10.5.9
+main.query_cache_debug : MDEV-15281 - Query cache is disabled
+main.range : Modified in 10.5.9
+main.range_innodb : MDEV-23371 - Server crash
+main.range_notembedded : Added in 10.5.9
+main.range_vs_index_merge_innodb : MDEV-15283 - Server has gone away
+main.repair_symlink-5543 : MDEV-23920 - Wrong result; modified in 10.5.9
+main.rowid_filter_innodb : MDEV-20538 - Wrong result
+main.select : MDEV-20532 - Floating point differences
+main.select_jcl6 : MDEV-20532 - Floating point differences
+main.select_pkeycache : MDEV-20532 - Floating point differences
+main.select_safe : MDEV-23420 - Server crash
+main.set_operation : Modified in 10.5.9
+main.set_password : Modified in 10.5.9
+main.set_statement : MDEV-13183 - Wrong result
+main.set_statement_notembedded : MDEV-19414 - Wrong result
+main.shm : MDEV-12727 - Mismatch, ERROR 2013
+main.show_explain : MDEV-10674 - Wrong result code
+main.skip_grants : Modified in 10.5.9
+main.sp : MDEV-7866 - Mismatch; modified in 10.5.9
+main.sp-big : MDEV-24457 - Result mismatch on riscv64
+main.sp-security : MDEV-10607 - sporadic "can't connect"
+main.sp-ucs2 : Modified in 10.5.9
+main.sp_notembedded : MDEV-10607 - internal error
+main.sp_trans_log : MDEV-24886 - Timeout
+main.ssl : MDEV-17184 - Failures with OpenSSL 1.1.1
+main.ssl_7937 : MDEV-20958 - Wrong result
+main.ssl_ca : MDEV-10895 - SSL connection error on Power
+main.ssl_cipher : MDEV-17184 - Failures with OpenSSL 1.1.1
+main.ssl_timeout : MDEV-11244 - Crash
+main.stat_tables : Modified in 10.5.9
+main.stat_tables_innodb : MDEV-20169 - Wrong result
+main.stat_tables_par_innodb : MDEV-14155 - Wrong rounding
+main.status : MDEV-13255 - Wrong result
+main.subselect : MDEV-20551 - Valgrind failure
+main.subselect4 : Modified in 10.5.9
+main.subselect_innodb : MDEV-10614 - Wrong result
+main.symlink-myisam-11902 : Modified in 10.5.9
+main.table_value_constr : Modified in 10.5.9
+main.tc_heuristic_recover : MDEV-14189 - Wrong result
+main.temp_table_symlink : MDEV-24058 - Wrong error code
+main.tls_version : MDEV-23417 - Wrong result
+main.type_blob : MDEV-15195 - Wrong result
+main.type_datetime_hires : MDEV-10687 - Timeout
+main.type_float : MDEV-20532 - Floating point differences
+main.type_newdecimal : MDEV-20532 - Floating point differences
+main.type_ranges : MDEV-20532 - Floating point differences
+main.type_temporal_innodb : MDEV-24025 - Wrong result
+main.type_year : Modified in 10.5.9
+main.union : Modified in 10.5.9
+main.user_limits : Modified in 10.5.9
+main.userstat : MDEV-12904 - SSL errors
+main.view : Modified in 10.5.9
+main.wait_timeout : MDEV-19023 - Lost connection to MySQL server during query
+main.xa : MDEV-11769 - lock wait timeout; modified in 10.5.9
+main.xml : MDEV-21968 - Crash on armhf
#-----------------------------------------------------------------------
@@ -215,7 +255,7 @@ binlog.show_concurrent_rotate : MDEV-20215 - Wrong result
#-----------------------------------------------------------------------
binlog_encryption.binlog_xa_recover : MDEV-12908 - Extra checkpoint
-binlog_encryption.encrypted_master : MDEV-23637 - Assertion failure; MDEV-14201 - Extra warnings
+binlog_encryption.encrypted_master : MDEV-23905 - Failure upon post-check; MDEV-23637 - Assertion failure; MDEV-14201 - Extra warnings
binlog_encryption.encrypted_master_switch_to_unencrypted : MDEV-14190 - Can't init tc log
binlog_encryption.encrypted_slave : MDEV-18135 - SSL error: key too small
binlog_encryption.encryption_combo : MDEV-14199 - Table is marked as crashed
@@ -229,6 +269,7 @@ binlog_encryption.rpl_loadfile : MDEV-16645 - Timeout
binlog_encryption.rpl_mixed_binlog_max_cache_size : MDEV-20956 - Incorrect checksum for freed object
binlog_encryption.rpl_parallel : MDEV-10653 - Timeout in include
binlog_encryption.rpl_parallel_ignored_errors : MDEV-22471 - Slave crash
+binlog_encryption.rpl_parallel_stop_on_con_kill : MDEV-24086 - Timeout
binlog_encryption.rpl_relayrotate : MDEV-15194 - Timeout
binlog_encryption.rpl_semi_sync : MDEV-11673 - Valgrind
binlog_encryption.rpl_skip_replication : MDEV-13571 - Unexpected warning; MDEV-20573 - Wrong result
@@ -276,16 +317,13 @@ encryption.innodb_encrypt_log : MDEV-13725 - Wrong result
encryption.innodb_encrypt_log_corruption : MDEV-14379 - Server crash
encryption.innodb_encrypt_temporary_tables : MDEV-20142 - Wrong result
encryption.innodb_encryption : MDEV-14728 - Unable to get certificate; MDEV-15675 - Timeout
-encryption.innodb_encryption-page-compression : MDEV-12630 - crash or assertion failure
+encryption.innodb_encryption-page-compression : MDEV-12630 - Crash or assertion failure; MDEV-21843 - Assertion failure
encryption.innodb_encryption_discard_import : MDEV-16116 - Wrong result
encryption.innodb_encryption_filekeys : MDEV-15673 - Timeout
encryption.innodb_encryption_row_compressed : MDEV-16113 - Crash
encryption.innodb_encryption_tables : MDEV-17339 - Crash on restart
encryption.innodb_first_page : MDEV-10689 - Crash
encryption.innodb_onlinealter_encryption : MDEV-17287 - SIGABRT on server restart
-encryption.innodb_scrub : MDEV-8139 - scrubbing tests need fixing (fixed in 10.5+)
-encryption.innodb_scrub_background : MDEV-8139 - scrubbing tests need fixing (fixed in 10.5+)
-encryption.innodb_scrub_compressed : MDEV-8139 - scrubbing tests need fixing (fixed in 10.5+)
#-----------------------------------------------------------------------
@@ -335,7 +373,7 @@ galera_3nodes.* : Suite is not stable yet
#-----------------------------------------------------------------------
gcol.innodb_virtual_basic : MDEV-16950 - Failing assertion
-gcol.innodb_virtual_debug : MDEV-23111 - Server crash
+gcol.innodb_virtual_debug : MDEV-23111 - Server crash; MDEV-23112 - Server crash
gcol.innodb_virtual_fk : MDEV-20640 - Assertion failure
gcol.innodb_virtual_fk_restart : MDEV-17466 - Assertion failure
gcol.innodb_virtual_purge : MDEV-22952 - Lock wait timeout
@@ -350,11 +388,13 @@ innodb.alter_large_dml : MDEV-20148 - Debug sync point wai
innodb.binlog_consistent : MDEV-10618 - Server fails to start
innodb.blob-crash : MDEV-20481 - Crash during recovery
innodb.doublewrite : MDEV-12905 - Server crash
+innodb.foreign_key : MDEV-21283 - Extra warning
innodb.group_commit_crash : MDEV-14191 - InnoDB registration failed
innodb.group_commit_crash_no_optimize_thread : MDEV-11770 - Checksum mismatch
innodb.ibuf_not_empty : MDEV-19021 - Wrong result
innodb.innodb-32k-crash : MDEV-20194 - Extra warnings
innodb.innodb-64k-crash : MDEV-13872 - Failure and crash on startup
+innodb.innodb-alter : MDEV-22955 - Extra warning
innodb.innodb-alter-debug : MDEV-13182 - InnoDB: adjusting FSP_SPACE_FLAGS
innodb.innodb-alter-table : MDEV-10619 - Testcase timeout
innodb.innodb-bigblob : MDEV-18655 - ASAN unknown crash
@@ -384,8 +424,10 @@ innodb.innodb_bulk_create_index_replication : MDEV-15273 - Slave failed to star
innodb.innodb_defrag_stats_many_tables : MDEV-14198 - Table is full
innodb.innodb_force_recovery_rollback : MDEV-22889 - Wrong result
innodb.innodb_information_schema : MDEV-8851 - Wrong result
+innodb.innodb_information_schema_buffer : MDEV-23418 - Wrong result
innodb.innodb_max_recordsize_32k : MDEV-14801 - Operation failed
innodb.innodb_max_recordsize_64k : MDEV-15203 - Wrong result
+innodb.innodb_mutexes : MDEV-23416 - Extra warning
innodb.innodb_mysql : MDEV-19873 - Wrong result
innodb.innodb_simulate_comp_failures_small : MDEV-20526 - ASAN use-after-poison
innodb.innodb_stats : MDEV-10682 - wrong result
@@ -398,6 +440,7 @@ innodb.log_corruption : MDEV-13251 - Wrong result
innodb.log_data_file_size : MDEV-14204 - Server failed to start; MDEV-20648 - Assertion failure
innodb.log_file_name : MDEV-14193 - Exception
innodb.log_file_size : MDEV-15668 - Not found pattern
+innodb.max_record_size : MDEV-23420 - Server crash
innodb.monitor : MDEV-16179 - Wrong result
innodb.purge_secondary : MDEV-15681 - Wrong result
innodb.purge_thread_shutdown : MDEV-13792 - Wrong result
@@ -416,6 +459,7 @@ innodb.xa_recovery : MDEV-15279 - mysqld got exception
#-----------------------------------------------------------------------
innodb_fts.fulltext2 : MDEV-24074 - Server crash
+innodb_fts.innodb_fts_misc : MDEV-22955 - Extra warning
innodb_fts.innodb_fts_misc_debug : MDEV-14156 - Unexpected warning
innodb_fts.innodb_fts_plugin : MDEV-13888 - Errors in server log
innodb_fts.innodb_fts_stopword_charset : MDEV-13259 - Table crashed
@@ -440,7 +484,6 @@ innodb_zip.create_options : MDEV-24076 - Assertion failure
innodb_zip.index_large_prefix_4k : MDEV-21679 - Row size too large
innodb_zip.innochecksum : MDEV-14486 - Server failed to shut down
innodb_zip.innochecksum_3 : MDEV-13279 - Extra warnings
-innodb_zip.recover : MDEV-22512 - Server failed to restart (fixed in 10.5+)
innodb_zip.wl5522_debug_zip : MDEV-11600 - Operating system error number 2
innodb_zip.wl6470_1 : MDEV-14240 - Assertion failure
innodb_zip.wl6501_1 : MDEV-10891 - Can't create UNIX socket
@@ -468,6 +511,7 @@ mariabackup.innodb_redo_overwrite : MDEV-24023 - Wrong result
mariabackup.log_checksum_mismatch : MDEV-16571 - Wrong result
mariabackup.mdev-14447 : MDEV-15201 - Timeout
mariabackup.partial_exclude : MDEV-15270 - Error on exec
+mariabackup.undo_space_id : MDEV-24022 - InnoDB error
mariabackup.unencrypted_page_compressed : MDEV-18653 - Wrong error
mariabackup.xb_compressed_encrypted : MDEV-14812 - Segmentation fault
mariabackup.xb_file_key_management : MDEV-16571 - Wrong result
@@ -493,7 +537,7 @@ mroonga/wrapper.repair_table_no_index_file : MDEV-14807 - Wrong error message
#-----------------------------------------------------------------------
multi_source.gtid : MDEV-14202 - Crash
-multi_source.info_logs : MDEV-12629 - Valgrind, MDEV-10042 - wrong result; MDEV-21290 - Wrong result
+multi_source.info_logs : MDEV-12629 - Valgrind; MDEV-10042 - wrong result; MDEV-21290 - Wrong result
multi_source.load_data : MDEV-21235 - Slave crash
multi_source.mdev-8874 : MDEV-19415 - AddressSanitizer: heap-use-after-free
multi_source.mdev-9544 : MDEV-19415 - AddressSanitizer: heap-use-after-free
@@ -530,6 +574,10 @@ perfschema.hostcache_ipv4_addrinfo_again_allow : MDEV-12759 - Crash
perfschema.hostcache_ipv6_addrinfo_again_allow : MDEV-12752 - Crash
perfschema.hostcache_ipv6_addrinfo_bad_allow : MDEV-13260 - Crash
perfschema.hostcache_ipv6_ssl : MDEV-10696 - Crash
+perfschema.memory_aggregate_no_a : MDEV-22949 - Wrong result
+perfschema.memory_aggregate_no_a_no_h : MDEV-22949 - Wrong result
+perfschema.memory_aggregate_no_a_no_u : MDEV-22949 - Wrong result
+perfschema.memory_aggregate_no_a_no_u_no_h : MDEV-22949 - Wrong result
perfschema.nesting : MDEV-23458 - Wrong result
perfschema.pfs_upgrade_event : MDEV-20957 - Wrong result
perfschema.pfs_upgrade_func : MDEV-20957 - Upgrade file was not properly created
@@ -539,6 +587,7 @@ perfschema.pfs_upgrade_view : MDEV-20533 - Upgrade file was n
perfschema.privilege_table_io : MDEV-13184 - Extra lines
perfschema.relaylog : MDEV-18134 - Wrong result; MDEV-24075 - Extra warning
perfschema.rpl_gtid_func : MDEV-16897 - Wrong result
+perfschema.show_aggregate : MDEV-22962 - Wrong results
perfschema.socket_instances_func : MDEV-20140 - Wrong result
perfschema.socket_summary_by_event_name_func : MDEV-10622 - Wrong result
perfschema.socket_summary_by_instance_func : MDEV-19413 - Wrong result
@@ -547,6 +596,7 @@ perfschema.stage_mdl_global : MDEV-11803 - wrong result on sl
perfschema.stage_mdl_procedure : MDEV-11545 - Missing row
perfschema.stage_mdl_table : MDEV-12638 - Wrong result
perfschema.start_server_low_digest : MDEV-21221 - Wrong result
+perfschema.threads_history : MDEV-22948 - Wrong result
perfschema.threads_mysql : MDEV-10677 - Wrong result
#-----------------------------------------------------------------------
@@ -630,6 +680,7 @@ rpl.rpl_flushlog_loop : MDEV-21570 - Server crash
rpl.rpl_get_lock : MDEV-19368 - mysqltest failed but provided no output
rpl.rpl_gtid_basic : MDEV-10681 - server startup problem
rpl.rpl_gtid_crash : MDEV-13643 - Lost connection
+rpl.rpl_gtid_delete_domain : MDEV-14463 - Timeout
rpl.rpl_gtid_errorhandling : MDEV-13261 - Crash
rpl.rpl_gtid_mdev9033 : MDEV-10680 - warnings
rpl.rpl_gtid_reconnect : MDEV-14497 - Crash
@@ -648,9 +699,10 @@ rpl.rpl_mariadb_slave_capability : MDEV-11018 - Extra lines in binlog
rpl.rpl_mdev12179 : MDEV-19043 - Table marked as crashed
rpl.rpl_mdev6020 : MDEV-23426 - Server crash, ASAN failures; MDEV-15272 - Server crash
rpl.rpl_mixed_mixing_engines : MDEV-21266 - Timeout
+rpl.rpl_multi_engine : MDEV-23419 - Server crash
rpl.rpl_non_direct_row_mixing_engines : MDEV-16561 - Timeout in master_pos_wait
-rpl.rpl_old_master : MDEV-22956 - Failing assertion
-rpl.rpl_parallel : MDEV-10653 - Timeouts; MDEV-24110 - Slave crash
+rpl.rpl_old_master : MDEV-22956 - Assertion failure
+rpl.rpl_parallel : MDEV-10653 - Timeouts
rpl.rpl_parallel_conflicts : MDEV-15272 - Server crash
rpl.rpl_parallel_multilevel : MDEV-20160 - Server crash
rpl.rpl_parallel_multilevel2 : MDEV-14723 - Timeout
@@ -675,9 +727,10 @@ rpl.rpl_row_img_eng_noblob : MDEV-13875 - command "diff_files" failed
rpl.rpl_row_index_choice : MDEV-15196 - Slave crash
rpl.rpl_row_sp001 : MDEV-9329 - Fails on Ubuntu/s390x
rpl.rpl_row_until : MDEV-14052 - Master will not send events with checksum
+rpl.rpl_semi_sync : MDEV-24118 - Assertion failure
rpl.rpl_semi_sync_event_after_sync : MDEV-11806 - warnings
rpl.rpl_semi_sync_skip_repl : MDEV-23371 - Server crash
-rpl.rpl_semi_sync_uninstall_plugin : MDEV-24561 - Wrong usage of mutex; MDEV-7140 - Assorted failures
+rpl.rpl_semi_sync_uninstall_plugin : MDEV-7140 - Assorted failures; MDEV-24561 - Wrong usage of mutex
rpl.rpl_semi_sync_wait_point : MDEV-11807 - timeout in wait condition
rpl.rpl_show_slave_hosts : MDEV-10681 - Crash
rpl.rpl_shutdown_wait_slaves : MDEV-22517 - Timeout on sync_with_master
@@ -687,6 +740,7 @@ rpl.rpl_slow_query_log : MDEV-13250 - Test abort
rpl.rpl_sp_effects : MDEV-13249 - Crash
rpl.rpl_start_stop_slave : MDEV-13567 - Sync slave timeout
rpl.rpl_stm_relay_ign_space : MDEV-14360 - Test assertion
+rpl.rpl_stm_start_stop_slave : MDEV-23180 - ASAN heap-use-after-free
rpl.rpl_stm_stop_middle_group : MDEV-13791 - Server crash
rpl.rpl_sync : MDEV-10633 - Database page corruption
rpl.rpl_temporary_error2 : MDEV-10634 - Wrong number of retries
@@ -700,7 +754,7 @@ rpl.sec_behind_master-5114 : MDEV-13878 - Wrong result
#-----------------------------------------------------------------------
-rpl-tokudb.* : MDEV-14354 - Tests failing with tcmalloc
+rpl-tokudb.* : TokuDB is deprecated and not maintained anymore
rpl-tokudb.rpl_deadlock_tokudb : MDEV-20529 - mysqltest failed but provided no output
rpl-tokudb.rpl_tokudb_commit_after_flush : MDEV-16966 - Server crash
@@ -710,6 +764,10 @@ rpl/extra/rpl_tests.* : MDEV-10994 - Not maintained
#-----------------------------------------------------------------------
+s3.replication_partition : MDEV-24087 - Replication failure
+
+#-----------------------------------------------------------------------
+
sphinx.* : MDEV-10986 - Tests have not been maintained
sphinx.sphinx : MDEV-10986 - Sporadic failures
sphinx.union-5539 : MDEV-10986 - Sporadic failures
@@ -746,6 +804,7 @@ storage_engine.* : Tests are not always timely maintained
#-----------------------------------------------------------------------
stress.ddl_innodb : MDEV-10635 - Testcase timeout
+stress.misc : MDEV-23420 - Server crash
#-----------------------------------------------------------------------
@@ -753,6 +812,7 @@ sys_vars.autocommit_func2 : MDEV-9329 - Fails on Ubuntu
sys_vars.host_cache_size_auto : MDEV-20112 - Wrong result
sys_vars.innodb_buffer_pool_dump_at_shutdown_basic : MDEV-14280 - Unexpected error
sys_vars.innodb_checksum_algorithm_basic : MDEV-21568 - Errno: 2000
+sys_vars.innodb_fatal_semaphore_wait_threshold : MDEV-22961 - Server failed to dissapear
sys_vars.innodb_flush_method_func : MDEV-24810 - Server failed to restart
sys_vars.keep_files_on_create_basic : MDEV-10676 - timeout
sys_vars.log_slow_admin_statements_func : MDEV-12235 - Server crash
@@ -762,58 +822,7 @@ sys_vars.wait_timeout_func : MDEV-12896 - Wrong result
#-----------------------------------------------------------------------
-tokudb.change_column_all_1000_10 : MDEV-12640 - Lost connection
-tokudb.change_column_bin : MDEV-12640 - Lost connection
-tokudb.change_column_char : MDEV-12822 - Lost connection
-tokudb.change_column_varbin : MDEV-17682 - Timeout
-tokudb.cluster_filter : MDEV-10678 - Wrong execution plan
-tokudb.cluster_filter_hidden : MDEV-10678 - Wrong execution plan
-tokudb.cluster_filter_unpack_varchar : MDEV-10636 - Wrong execution plan
-tokudb.dir_per_db : MDEV-11537 - Wrong result
-tokudb.dir_per_db_rename_to_nonexisting_schema : MDEV-14359 - Directory not empty
-tokudb.hotindex-del-0 : MDEV-16559 - Timeout
-tokudb.hotindex-insert-0 : MDEV-15271 - Timeout
-tokudb.hotindex-insert-1 : MDEV-13870 - Lost connection to MySQL server
-tokudb.hotindex-insert-2 : MDEV-15271 - Timeout
-tokudb.hotindex-insert-bigchar : MDEV-12640 - Crash
-tokudb.hotindex-update-0 : MDEV-15198 - Timeout
-tokudb.hotindex-update-1 : MDEV-12640 - Crash
-tokudb.locks-select-update-1 : MDEV-13406 - Lock wait timeout
-tokudb.rows-32m-rand-insert : MDEV-12640 - Crash
-tokudb.rows-32m-seq-insert : MDEV-12640 - Crash
-tokudb.savepoint-5 : MDEV-15280 - Wrong result
-tokudb.type_datetime : MDEV-15193 - Wrong result
-
-#-----------------------------------------------------------------------
-
-tokudb_alter_table.hcad_all_add2 : MDEV-15269 - Timeout
-
-#-----------------------------------------------------------------------
-
-tokudb_backup.* : MDEV-11001 - Missing include file (Won't fix)
-
-#-----------------------------------------------------------------------
-
-tokudb_bugs.checkpoint_lock : MDEV-10637 - Wrong processlist output
-tokudb_bugs.checkpoint_lock_3 : MDEV-10637 - Wrong processlist output
-tokudb_bugs.frm_store : MDEV-12823 - Valgrind
-tokudb_bugs.frm_store2 : MDEV-12823 - Valgrind
-tokudb_bugs.frm_store3 : MDEV-12823 - Valgrind
-tokudb_bugs.xa : MDEV-11804 - Lock wait timeout
-tokudb_bugs.xa-3 : MDEV-22512 - Server failed to restart (fixed in 10.5+)
-tokudb_bugs.xa-4 : MDEV-22512 - Server failed to restart (fixed in 10.5+)
-
-#-----------------------------------------------------------------------
-
-tokudb_parts.partition_alter4_tokudb : MDEV-12640 - Lost connection
-
-#-----------------------------------------------------------------------
-
-tokudb_rpl.* : MDEV-11001 - Missing include file (Won't fix)
-
-#-----------------------------------------------------------------------
-
-tokudb_sys_vars.* : MDEV-11001 - Missing include file (Won't fix)
+tokudb.* : TokuDB is deprecated and not maintained anymore
#-----------------------------------------------------------------------
@@ -835,7 +844,8 @@ vcol.vcol_misc : MDEV-16651 - Wrong error message
#-----------------------------------------------------------------------
-versioning.update : MDEV-22475 - Wrong result code
+versioning.replace : MDEV-22960 - OS errors, crash
+versioning.update : MDEV-22475 - Wrong result code
#-----------------------------------------------------------------------
diff --git a/mysql-test/valgrind.supp b/mysql-test/valgrind.supp
index e58d0a10124..1f2aa47820b 100644
--- a/mysql-test/valgrind.supp
+++ b/mysql-test/valgrind.supp
@@ -657,182 +657,6 @@
#
-# Some problem inside glibc on Ubuntu 9.04, x86 (but not amd64):
-#
-# ==5985== 19 bytes in 1 blocks are still reachable in loss record 1 of 6
-# ==5985== at 0x7AF3FDE: malloc (vg_replace_malloc.c:207)
-# ... 11,12, or 13 functions w/o symbols ...
-# ==5985== by 0x8717185: nptl_pthread_exit_hack_handler (my_thr_init.c:55)
-#
-# Since valgrind 3.3.0 doesn't support '...' multi-function pattern, using
-# multiple suppressions:
-#
-{
- Mem loss inside nptl_pthread_exit_hack_handler
- Memcheck:Leak
- fun:*
- fun:*
- fun:*
- fun:*
- fun:*
- fun:*
- fun:*
- fun:*
- fun:*
- fun:*
- fun:*
- fun:*
- fun:nptl_pthread_exit_hack_handler
-}
-
-{
- Mem loss inside nptl_pthread_exit_hack_handler
- Memcheck:Leak
- fun:*
- fun:*
- fun:*
- fun:*
- fun:*
- fun:*
- fun:*
- fun:*
- fun:*
- fun:*
- fun:*
- fun:*
- fun:*
- fun:nptl_pthread_exit_hack_handler
-}
-
-{
- Mem loss inside nptl_pthread_exit_hack_handler
- Memcheck:Leak
- fun:*
- fun:*
- fun:*
- fun:*
- fun:*
- fun:*
- fun:*
- fun:*
- fun:*
- fun:*
- fun:*
- fun:*
- fun:*
- fun:*
- fun:nptl_pthread_exit_hack_handler
-}
-
-#
-# BUG#45630
-# Suppress valgrind failures within nptl_pthread_exit_hack_handler on Ubuntu 9.04, x86 (but not amd64)
-#
-
-{
- Mem loss within nptl_pthread_exit_hack_handler 1
- Memcheck:Leak
- fun:malloc
- obj:*/ld-*.so
- obj:*/ld-*.so
- obj:*/ld-*.so
- obj:*/ld-*.so
- obj:*/ld-*.so
- obj:*/libc-*.so
- obj:*/ld-*.so
- fun:__libc_dlopen_mode
- fun:pthread_cancel_init
- fun:_Unwind_ForcedUnwind
- fun:__pthread_unwind
- fun:pthread_exit
- fun:nptl_pthread_exit_hack_handler
- fun:start_thread
- fun:clone
-}
-
-{
- Mem loss within nptl_pthread_exit_hack_handler 2
- Memcheck:Leak
- fun:malloc
- obj:*/ld-*.so
- obj:*/ld-*.so
- obj:*/ld-*.so
- obj:*/ld-*.so
- obj:*/libc-*.so
- obj:*/ld-*.so
- fun:__libc_dlopen_mode
- fun:pthread_cancel_init
- fun:_Unwind_ForcedUnwind
- fun:__pthread_unwind
- fun:pthread_exit
- fun:nptl_pthread_exit_hack_handler
- fun:start_thread
- fun:clone
-}
-
-{
- Mem loss within nptl_pthread_exit_hack_handler 3
- Memcheck:Leak
- fun:calloc
- obj:*/ld-*.so
- obj:*/ld-*.so
- obj:*/ld-*.so
- obj:*/ld-*.so
- obj:*/libc-*.so
- obj:*/ld-*.so
- fun:__libc_dlopen_mode
- fun:pthread_cancel_init
- fun:_Unwind_ForcedUnwind
- fun:__pthread_unwind
- fun:pthread_exit
- fun:nptl_pthread_exit_hack_handler
- fun:start_thread
- fun:clone
-}
-
-{
- Mem loss within nptl_pthread_exit_hack_handler 4
- Memcheck:Leak
- fun:malloc
- obj:*/ld-*.so
- obj:*/ld-*.so
- obj:*/ld-*.so
- obj:*/ld-*.so
- obj:*/ld-*.so
- obj:*/ld-*.so
- obj:*/libc-*.so
- obj:*/ld-*.so
- fun:__libc_dlopen_mode
- fun:pthread_cancel_init
- fun:_Unwind_ForcedUnwind
- fun:__pthread_unwind
- fun:pthread_exit
- fun:nptl_pthread_exit_hack_handler
- fun:start_thread
-}
-
-{
- Mem loss within nptl_pthread_exit_hack_handler 5
- Memcheck:Leak
- fun:calloc
- obj:*/ld-*.so
- obj:*/ld-*.so
- obj:*/ld-*.so
- obj:*/ld-*.so
- obj:*/ld-*.so
- obj:*/ld-*.so
- obj:*/libc-*.so
- obj:*/ld-*.so
- fun:__libc_dlopen_mode
- fun:pthread_cancel_init
- fun:_Unwind_ForcedUnwind
- fun:__pthread_unwind
- fun:pthread_exit
- fun:nptl_pthread_exit_hack_handler
- fun:start_thread
-}
-
-#
# Problem with glibc and gethostbyaddr_r
#
@@ -846,113 +670,6 @@
fun: gethostbyaddr_r
}
-# suppressions for glibc 2.6.1 64 bit
-
-{
- Mem loss within nptl_pthread_exit_hack_handler 6
- Memcheck:Leak
- fun:malloc
- obj:*/ld-*.so
- obj:*/ld-*.so
- obj:*/ld-*.so
- obj:*/ld-*.so
- obj:*/ld-*.so
- obj:*/ld-*.so
- obj:*/libc-*.so
- obj:*/ld-*.so
- obj:*/libc-*.so
- fun:__libc_dlopen_mode
- fun:pthread_cancel_init
- fun:_Unwind_ForcedUnwind
- fun:__pthread_unwind
- fun:pthread_exit
- fun:nptl_pthread_exit_hack_handler
-}
-
-{
- Mem loss within nptl_pthread_exit_hack_handler 7
- Memcheck:Leak
- fun:malloc
- obj:*/ld-*.so
- obj:*/ld-*.so
- obj:*/ld-*.so
- obj:*/ld-*.so
- obj:*/libc-*.so
- obj:*/ld-*.so
- obj:*/libc-*.so
- fun:__libc_dlopen_mode
- fun:pthread_cancel_init
- fun:_Unwind_ForcedUnwind
- fun:__pthread_unwind
- fun:pthread_exit
- fun:nptl_pthread_exit_hack_handler
- fun:start_thread
- fun:clone
-}
-
-{
- Mem loss within nptl_pthread_exit_hack_handler 8
- Memcheck:Leak
- fun:calloc
- obj:*/ld-*.so
- obj:*/ld-*.so
- obj:*/ld-*.so
- obj:*/ld-*.so
- obj:*/libc-*.so
- obj:*/ld-*.so
- obj:*/libc-*.so
- fun:__libc_dlopen_mode
- fun:pthread_cancel_init
- fun:_Unwind_ForcedUnwind
- fun:__pthread_unwind
- fun:pthread_exit
- fun:nptl_pthread_exit_hack_handler
- fun:start_thread
- fun:clone
-}
-
-{
- Mem loss within nptl_pthread_exit_hack_handler 8
- Memcheck:Leak
- fun:calloc
- obj:*/ld-*.so
- obj:*/ld-*.so
- obj:*/ld-*.so
- obj:*/ld-*.so
- obj:*/ld-*.so
- obj:*/ld-*.so
- obj:*/libc-*.so
- obj:*/ld-*.so
- obj:*/libc-*.so
- fun:__libc_dlopen_mode
- fun:pthread_cancel_init
- fun:_Unwind_ForcedUnwind
- fun:__pthread_unwind
- fun:pthread_exit
- fun:nptl_pthread_exit_hack_handler
-}
-
-{
- Invalid read within nptl_pthread_exit_hack_handler
- Memcheck:Addr8
- obj:*/ld-*.so
- obj:*/ld-*.so
- obj:*/ld-*.so
- obj:*/ld-*.so
- obj:*/ld-*.so
- obj:*/ld-*.so
- obj:*/ld-*.so
- obj:*/libc-*.so
- obj:*/ld-*.so
- obj:*/libc-*.so
- fun:__libc_dlopen_mode
- fun:pthread_cancel_init
- fun:_Unwind_ForcedUnwind
- fun:__pthread_unwind
- fun:pthread_exit
- fun:nptl_pthread_exit_hack_handler
-}
-
{
memory "leak" in backtrace() of glibc 2.9 (not present in 2.13)
Memcheck:Leak
@@ -1033,45 +750,6 @@
# Note the wildcard in the (mangled) function signatures of
# write_keys() and find_all_keys().
# They both return ha_rows, which is platform dependent.
-#
-# The '...' wildcards are for 'fun:inline_mysql_file_write' and
-# 'fun:find_all_keys' which *may* be inlined.
-{
- Bug#12856915 VALGRIND FAILURE IN FILESORT/CREATE_SORT_INDEX / one
- Memcheck:Param
- write(buf)
- obj:*/libpthread*.so
- fun:my_write
- ...
- fun:my_b_flush_io_cache
- fun:_my_b_write
- fun:_Z*10write_keysP13st_sort_paramPPhjP11st_io_cacheS4_
- ...
- fun:_Z8filesortP3THDP5TABLEP13st_sort_fieldjP10SQL_SELECTybPy
-}
-
-{
- Bug#12856915 VALGRIND FAILURE IN FILESORT/CREATE_SORT_INDEX / two
- Memcheck:Param
- write(buf)
- obj:*/libpthread*.so
- fun:my_write
- ...
- fun:my_b_flush_io_cache
- fun:_Z15merge_many_buffP13st_sort_paramPhP10st_buffpekPjP11st_io_cache
- fun:_Z8filesortP3THDP5TABLEP13st_sort_fieldjP10SQL_SELECTybPy
-}
-
-{
- Bug#12856915 VALGRIND FAILURE IN FILESORT/CREATE_SORT_INDEX / three
- Memcheck:Param
- write(buf)
- obj:*/libpthread*.so
- fun:my_write
- ...
- fun:my_b_flush_io_cache
- fun:_Z8filesortP3THDP5TABLEP13st_sort_fieldjP10SQL_SELECTybPy
-}
{
OpenSSL still reachable.
@@ -1638,6 +1316,81 @@
fun:clone
}
+{
+ codership test wsrep_info.plugin
+ Memcheck:Leak
+ match-leak-kinds: possible
+ fun:malloc
+ fun:tls_get_addr_tail
+}
+
+{
+ codership/galera
+ Memcheck:Addr4
+ fun:_ZN14Wsrep_thd_args11thread_typeEv
+ fun:_Z15start_wsrep_THDPv
+ fun:start_thread
+ fun:clone
+}
+
+{
+ codership/galera
+ Memcheck:Leak
+ match-leak-kinds: indirect
+ fun:malloc
+ fun:strdup
+ fun:dummy_init
+ fun:_ZN5wsrep18wsrep_provider_v26C1ERNS_12server_stateERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_
+ fun:_ZN5wsrep8provider13make_providerERNS_12server_stateERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_
+ fun:_ZN5wsrep12server_state13load_providerERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_
+ fun:_Z10wsrep_initv
+}
+
+{
+ codership/galera
+ Memcheck:Leak
+ match-leak-kinds: indirect
+ fun:malloc
+ fun:wsrep_dummy_loader
+ fun:wsrep_load
+ fun:_ZN5wsrep18wsrep_provider_v26C1ERNS_12server_stateERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_
+ fun:_ZN5wsrep8provider13make_providerERNS_12server_stateERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_
+ fun:_ZN5wsrep12server_state13load_providerERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_
+ fun:_Z10wsrep_initv
+}
+
+{
+ codership/galera
+ Memcheck:Leak
+ match-leak-kinds: indirect
+ fun:malloc
+ fun:wsrep_load
+ fun:_ZN5wsrep18wsrep_provider_v26C1ERNS_12server_stateERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_
+ fun:_ZN5wsrep8provider13make_providerERNS_12server_stateERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_
+ fun:_ZN5wsrep12server_state13load_providerERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_
+ fun:_Z10wsrep_initv
+}
+
+{
+ codership/galera
+ Memcheck:Leak
+ match-leak-kinds: definite
+ fun:_Znwm
+ fun:_ZN5wsrep8provider13make_providerERNS_12server_stateERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_
+ fun:_ZN5wsrep12server_state13load_providerERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_
+ fun:_Z10wsrep_initv
+}
+
+{
+ MDEV-20378 wsrep_info.plugin
+ Memcheck:Addr4
+ fun:_ZN14Wsrep_thd_args11thread_typeEv
+ fun:_Z15start_wsrep_THDPv
+ fun:pfs_spawn_thread
+ fun:start_thread
+ fun:clone
+}
+
#
# MDEV-11061: OpenSSL 0.9.8 problems
#
@@ -1800,7 +1553,48 @@
obj:/usr/lib64/libcrypto.so*
}
+#
+# libmarias3 problems
+#
+{
+ libmarias3 crypto
+ Memcheck:Leak
+ match-leak-kinds: reachable
+ fun:malloc
+ ...
+ obj:/usr/lib64/libcrypto.so*
+}
+{
+ OpenSSL 1.1.0i wrong jump
+ Memcheck:Cond
+ fun:bcmp
+ fun:fips_rsa_encrypt_test
+ ...
+ fun:OPENSSL_init_library
+}
+
+#
+# libmarias3 problems
+#
+{
+ libmarias3 curl
+ Memcheck:Leak
+ match-leak-kinds: reachable
+ fun:malloc
+ ...
+ obj:/usr/lib64/libcrypto.so*
+}
+
+{
+ libmarias3 libxml2
+ Memcheck:Leak
+ match-leak-kinds: reachable
+ fun:calloc
+ fun:xmlGetGlobalState
+ ...
+ fun:s3_deinit_library
+}
##
## The following is a copy of facebook/mysql-5.6 suppressions:
@@ -1913,7 +1707,108 @@
...
}
+{
+ From rocksdb.mariadb_plugin.test
+ Memcheck:Leak
+ match-leak-kinds: reachable
+ fun:calloc
+ fun:__cxa_thread_atexit_impl
+ fun:__tls_init
+ fun:_ZTWN7rocksdb12perf_contextE
+ fun:_ZN7rocksdb17InstrumentedMutex4LockEv
+ ...
+ fun:_ZNSt10unique_ptrIN7rocksdb9DBOptionsESt14default_deleteIS1_EED1Ev
+ fun:__run_exit_handlers
+}
+
##
## RocksDB Storage Engine suppressions end
##
+#
+# wolfSSL problems, to be removed after fixed by wolfSSL team
+#
+
+{
+ WolfSSL_accept
+ Memcheck:Cond
+ ...
+ fun:wolfSSL_accept
+}
+
+{
+ WolfSSL_connect
+ Memcheck:Cond
+ ...
+ fun:wolfSSL_connect
+}
+
+{
+ WolfSSL send param
+ Memcheck:Param
+ socketcall.sendto(msg)
+ fun:send
+ ...
+ fun:wolfSSL_connect
+}
+
+#
+# Temporary suppressions to be able to run all tests in 10.5 with --valgrind
+#
+
+#
+# InnoDB errors
+#
+
+{
+ InnoDB encryption
+ Memcheck:Addr2
+ fun:memmove
+ fun:wolfSSL_EVP_CipherUpdate
+}
+
+{
+ InnoDB row_in_step
+ Memcheck:Cond
+ fun:_Z12row_ins_stepP9que_thr_t
+ ...
+ fun:_ZN11ha_innobase10update_rowEPKhS1_
+}
+
+{
+ InnoDB leak
+ Memcheck:Leak
+ match-leak-kinds: indirect,definite
+ fun:malloc
+ fun:_Z26mem_heap_create_block_funcP16mem_block_info_tmPKcjm
+ ...
+ fun:_ZN11ha_innobase10delete_rowEPKh
+}
+
+{
+ InnoDB leak
+ Memcheck:Leak
+ match-leak-kinds: indirect,definite
+ fun:malloc
+ fun:_Z26mem_heap_create_block_funcP16mem_block_info_tmPKcjm
+ ...
+ fun:_ZN7handler13ha_update_rowEPKhS1_
+}
+
+#
+# Optimizer
+#
+
+{
+ innodb_fts.fulltext_misc
+ Memcheck:Param
+ write(buf)
+ fun:write
+ fun:my_write
+ fun:inline_mysql_file_write
+ fun:_my_b_cache_write
+ fun:my_b_flush_io_cache
+ fun:end_io_cache
+ ...
+ fun:_Z11mysql_unionP3THDP3LEXP13select_resultP18st_select_lex_unitm
+}